tarantool-1.5.1.218.g1a69fd6/0000755000000000000000000000000012242653271013762 5ustar rootroottarantool-1.5.1.218.g1a69fd6/cmake_install.cmake0000664000000000000000000000567512213333034017577 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/tarantool" TYPE FILE FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/README.md" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/LICENSE" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/box-protocol.txt" ) ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/extra/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) IF(CMAKE_INSTALL_COMPONENT) SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") ELSE(CMAKE_INSTALL_COMPONENT) SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt") ENDIF(CMAKE_INSTALL_COMPONENT) FILE(WRITE "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/${CMAKE_INSTALL_MANIFEST}" "") FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES}) FILE(APPEND "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/${CMAKE_INSTALL_MANIFEST}" "${file}\n") ENDFOREACH(file) tarantool-1.5.1.218.g1a69fd6/client/0000775000000000000000000000000012213333320015226 5ustar rootroottarantool-1.5.1.218.g1a69fd6/client/cmake_install.cmake0000664000000000000000000000300112213333034021032 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/client/tarancheck/0000775000000000000000000000000012242653271017345 5ustar rootroottarantool-1.5.1.218.g1a69fd6/client/tarancheck/cmake_install.cmake0000664000000000000000000000413212213333034023143 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarancheck" AND NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarancheck") FILE(RPATH_CHECK FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarancheck" RPATH "") ENDIF() FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/tarancheck") IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarancheck" AND NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarancheck") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarancheck") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_verify.c0000664000000000000000000001326012231715257021506 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "tc_key.h" #include "tc_hash.h" #include "tc_options.h" #include "tc_config.h" #include "tc_space.h" #include "tc_generate.h" #include "tc_verify.h" #include "tc_file.h" int tc_verify_cmp(struct tc_spaces *s, uint64_t lsn, struct tnt_iter_storage *is, struct tnt_stream_snapshot *ss) { struct tc_space *space = tc_space_match(s, ss->log.current.row_snap.space); if (space == NULL) return -1; int rc = 0; struct tc_key *k = tc_generate_key(space, &is->t); if (k == NULL) { printf("failed to create key\n"); rc = -1; goto done; } /* 1. check in hash, if found then skip */ const struct tc_key *node = k; mh_int_t pos = mh_pk_get(space->hash_log, &node, space); const struct tc_key *v = NULL; if (pos != mh_end(space->hash_log)) v = *mh_pk_node(space->hash_log, pos); if (v) { rc = 0; goto done; } /* 2. if key was not found in xlog hash, then try snapshot hash */ node = k; pos = mh_pk_get(space->hash_snap, &node, space); v = NULL; if (pos != mh_end(space->hash_snap)) v = *mh_pk_node(space->hash_snap, pos); if (v) { /* generate and compare checksum */ uint32_t crc = crc32c(0, (unsigned char*)is->t.data, is->t.size); if (crc != v->crc) { printf("(snapshot %"PRIu64") checksum missmatch\n", lsn); rc = -1; } } else { /* not found */ printf("(snapshot %"PRIu64") key missed\n", lsn); rc = -1; } done: free(k); return rc; } int tc_verify_process(struct tc_spaces *s, uint64_t lsn, char *snap_dir) { char path[1024]; snprintf(path, sizeof(path), "%s/%020llu.snap", snap_dir, (long long unsigned)lsn); printf("(snapshot) %s\n", path); struct tnt_stream st; tnt_snapshot(&st); if (tnt_snapshot_open(&st, path) == -1) { printf("failed to open snapshot file\n"); tnt_stream_free(&st); return -1; } struct tnt_iter i; tnt_iter_storage(&i, &st); int errors = 0; int rc = 0; while (tnt_next(&i)) { struct tnt_iter_storage *is = TNT_ISTORAGE(&i); struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(TNT_IREQUEST_STREAM(&i)); int result = tc_verify_cmp(s, lsn, is, ss); if (result == -1) errors++; } if (i.status == TNT_ITER_FAIL) { printf("snapshot parsing failed: %s\n", tnt_snapshot_strerror(&st)); rc = -1; } if (errors) rc = -1; tnt_iter_free(&i); tnt_stream_free(&st); return rc; } int tc_verify_match(struct tc_spaces *ss, uint64_t last_xlog_lsn, uint64_t last_snap_lsn, char *path) { struct tnt_dir snap_dir; tnt_dir_init(&snap_dir, TNT_DIR_SNAPSHOT); int rc = tnt_dir_scan(&snap_dir, path); if (rc == -1) { printf("failed to open snap directory\n"); tnt_dir_free(&snap_dir); return -1; } int i; for (i = 0; i < snap_dir.count; i++) { if (snap_dir.files[i].lsn >= last_snap_lsn && snap_dir.files[i].lsn <= last_xlog_lsn) break; } if (i == snap_dir.count) { printf("no suitable snapshot found (lsn >= %"PRIu64" && lsn <= %"PRIu64")\n", last_snap_lsn, last_xlog_lsn); tnt_dir_free(&snap_dir); return -1; } rc = tc_verify_process(ss, snap_dir.files[i].lsn, path); tnt_dir_free(&snap_dir); return rc; } int tc_verify(struct tc_options *opts) { printf(">>> Signature file verification\n"); /* 1. create spaces according to a configuration file */ struct tc_spaces ss; int rc = tc_space_init(&ss); if (rc == -1) return -1; rc = tc_space_fill(&ss, opts); if (rc == -1) goto error; /* 2. load signature file */ uint64_t last_xlog_lsn = 0; uint64_t last_snap_lsn = 0; rc = tc_file_load(&ss, (char*)opts->file, &last_xlog_lsn, &last_snap_lsn); if (rc == -1) goto error; printf("(signature) loading %s\n", opts->file); printf("configured spaces: %"PRIu32"\n", mh_size(ss.t)); printf("last xlog lsn: %"PRIu64"\n", last_xlog_lsn); printf("last snapshot lsn: %"PRIu64"\n", last_snap_lsn); /* 3. start verification process */ rc = tc_verify_match(&ss, last_xlog_lsn, last_snap_lsn, opts->cfg.snap_dir); printf("%s\n", (rc == 0) ? "OK": "FAILED"); tc_space_free(&ss); return rc; error: tc_space_free(&ss); return -1; } tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_key.h0000664000000000000000000000047312202131537020770 0ustar rootroot#ifndef TC_KEY_H_INCLUDED #define TC_KEY_H_INCLUDED struct tc_key_field { int offset; int size; }; struct tc_key { uint32_t crc; size_t size; struct tc_key_field i[]; }; #define TC_KEY_DATA(K, I) ((char*)(K) + sizeof(struct tc_key) + (K)->i[(I)].offset) #define TC_KEY_SIZE(K, I) ((K)->i[(I)].size) #endif tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_verify.h0000664000000000000000000000015312202131537021477 0ustar rootroot#ifndef TC_VERIFY_H_INCLUDED #define TC_VERIFY_H_INCLUDED int tc_verify(struct tc_options *opts); #endif tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_file.h0000664000000000000000000000041612202131537021114 0ustar rootroot#ifndef TC_FILE_H_INCLUDED #define TC_FILE_H_INCLUDED int tc_file_save(struct tc_spaces *s, uint64_t last_snap_lsn , uint64_t last_xlog_lsn, char *file); int tc_file_load(struct tc_spaces *s, char *file, uint64_t *last_xlog_lsn, uint64_t *last_snap_lsn); #endif tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_options.c0000664000000000000000000000600612242653271021674 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include "tc_options.h" static const void *opts_def = gopt_start( gopt_option('G', GOPT_ARG, gopt_shorts('G'), gopt_longs("generate"), " ", "generate signature file"), gopt_option('V', GOPT_ARG, gopt_shorts('V'), gopt_longs("verify"), " ", "verify signature file"), gopt_option('?', 0, gopt_shorts('?'), gopt_longs("help"), NULL, "display this help and exit"), gopt_option('v', 0, gopt_shorts('v'), gopt_longs("version"), NULL, "display version information and exit") ); void tc_options_init(struct tc_options *opts) { memset(opts, 0, sizeof(struct tc_options)); init_tarantool_cfg(&opts->cfg); } void tc_options_free(struct tc_options *opts) { destroy_tarantool_cfg(&opts->cfg); } int tc_options_usage(void) { printf("Tarantool checksum: checksum master and replica logs.\n"); printf("usage: tarancheck \n\n"); gopt_help(opts_def); return 1; } enum tc_options_mode tc_options_process(struct tc_options *opts, int argc, char **argv) { void *opt = gopt_sort(&argc, (const char**)argv, opts_def); /* usage */ if (gopt(opt, '?') || argc != 2) { opts->mode = TC_MODE_USAGE; goto done; } /* version */ if (gopt(opt, 'v')) { opts->mode = TC_MODE_VERSION; goto done; } /* generate or verify */ if (gopt_arg(opt, 'G', &opts->file)) { opts->mode = TC_MODE_GENERATE; } else if (gopt_arg(opt, 'V', &opts->file)) { opts->mode = TC_MODE_VERIFY; } else { opts->mode = TC_MODE_USAGE; goto done; } opts->file_config = argv[1]; done: gopt_free(opt); return opts->mode; } tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tarancheck0000775000000000000000000130221212213333055021370 0ustar rootrootELF>7@@@*@8@&#@@@@@@@@@ bb5 bb@@DDPtdYYBYBQtd/lib64/ld-linux-x86-64.so.2GNU GNUF&.\:C遞7 .@N51+ (ƐB%I,"$@t J`^PmTA0Af@Ǖh3G#Ex$ ÀX&te79<=@BEFGIKMNQTVXZ[\]_abdegjmoprtuy{|}~Eʸw0~ΗqlScoL2>Z?|`­6V C#q|겚M& N{^g;Z|(ԑrŮ6iKyСgUay`e3d߇%aC&b G (͹"Ӣ 8qB2b[=cV4OV[rX _\~7SxҼmzbg㴍 a/*9Ɏ,J{ pBJ~DQeG(6fId8zbeV %vt"EGzMܬ#qXl:O5灏z(fV[5b9T2)7 SYIS_"j沃i͆ Yg^ mnꖲb2:˸=k|+@6;䬓)沆^2%brNp5j C]L6/aCK땆EGL&CVoR9~0 h !(A + HawoX: N  hz N@ 1A A@h]  pA(  !BKM  J@"8WB  AX  A+ $A  A~ BU  B  By  B71 AD0 *BE  RAT H@K  x3@q F@q  A) )Bd B) A u@xA |@ < A#N  A 7Ax |B /Bp  A sA~ 0Ab A# B ` ;A  @c }<@  EAQ A "]@  BC AQb Q>@  O@.  A:  :A LA: 7@l  Yg@ bA2#  lA77  B$  h B$  A  AQ  @  A&  A B$  B  :[@ga BH H@I2 /G@5 b X@  ^@A  A%  u+BP Me@S qA_ A1 BQ ;A  AbJ KB {A  aA :A AKe  4P@ tA  RA  BH  Bq< @! bq@U A  B;  gAfA t@n A& Ay  pA IA +B\$ A$ A69/B 'c AAb  AZ @"B e=@?/B  (AJ A b ?@  yBB  Z@|  @W8b5 /B6 b A@  A o@h  @+  0O@m >@I A  YA~ A` Av? 9A A| B (AR r A$  4Ax AK Bys  A! N@4- `6@ M@ Av Z@" A ͿA  L@.  Ak  kAJ oA! Յ@ I@4bz |A"w6@^  A  +B A%5  A$  Ad ,B f@.4WB`  c@t  <@qlibgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6fflushstrcpyexitsprintfstrrchrperrorclosedirputsputcharstdinstrtollstrdup__assert_failstrtodstrtolfgetcfgetscallocstrlenmemsetstrcspn__errno_locationmemcmpclearerrstdoutfseeko64memcpyfclosevprintfmallocstrcasecmpftello64opendir__ctype_b_locstderrfwritefreadatoistrchrfprintfqsortreaddir64_rfopen64_IO_getc__libc_start_mainferrorstpcpysnprintfprscfg_yyset_linenogopt__libc_csu_finiprscfg_yylex_destroygopt_sorttnt_request_setorigintc_options_freeconfetti_strcmptc_verify_processtc_file_savetc_space_createprscfg_yyset_outgopt_freeprscfg_yy_scan_buffertnt_replytnt_xlog_errortc_file_load_keytnt_xlog_openmh_pk_newtc_verify_cmptnt_fieldtnt_dir_inittnt_requestmh_u32ptr_deletetnt_request_frommh_u32ptr_clearprscfg_yylex_inittnt_tuple_set_ascrc32tnt_iter_storagemh_pk_resizetnt_tuple_setprscfg_yy_scan_bytestc_verifytnt_list_freetc_options_initcrc32c_edataprscfg_yyget_lengPMurHash32_Resultmh_u32ptr_newmh_pk_del_resizeprscfg_yyget_outtnt_mem_freetnt_xlog_strerrorPMurHash32_Processparse_cfg_file_tarantool_cfgtnt_reply_inittnt_enc_readtc_space_fillofswap_tarantool_cfgsearch_equaltnt_log_marker_v11init_tarantool_cfgmh_pk_clearparse_cfg_buffer_tarantool_cfgtnt_iter_replymh_u32ptr_start_resizedup_tarantool_cfgprscfg_yy_scan_stringprscfg_yylexprscfg_yyset_extratnt_log_guesstnt_reply_fromtc_options_usagegopt_argprscfg_yylex_init_extratnt_mem_allocparseCfgDefgopt_helptnt_snapshot_opentnt_tuple_inittnt_log_closeprscfg_yyset_lvalmh_u32ptr_resizemh_pk_reservemh_u32ptr_reservetnt_dir_freeprscfg_yyget_linenotarantool_cfg_iterator_initprscfg_yyget_debugprscfg_yyget_lval__data_starttc_generate_keycheck_cfg_tarantool_cfgprscfg_yyparsetnt_dir_match_gtprscfg_yyset_columnprscfg_yypop_buffer_statetnt_log_openprscfg_yy_switch_to_buffertnt_log_next_tofreeCfgDefsearch_hashtc_space_freetnt_enc_writetnt_log_marker_eof_v11_IO_stdin_usedmh_pk_deletetnt_tupleprscfg_yypush_buffer_stateprscfg_yyset_intnt_itertnt_dir_scantarantool_cfg_iterator_nexttnt_snapshot_close__libc_csu_initprscfg_yyrestartprscfg_yy_create_buffertnt_reply_freecrc32_tablecmp_tarantool_cfgtnt_list_inittc_space_inittc_generatetnt_snapshot_errnoparseCfgDefBuffer_endtnt_request_initfill_default_tarantool_cfgprscfg_yyget_intnt_log_strerrortnt_log_seekprscfg_yyget_columntnt_snapshot_strerrortc_space_fillout_warningtnt_mem_realloc__bss_starttnt_log_nextPMurHash32_testtnt_log_errnotc_file_loadtnt_tuple_addtnt_snapshottnt_iter_requestprscfg_yyfreetnt_nextPMurHash32tnt_stream_freetc_verify_matchgopt_arg_itc_space_matchtnt_xlog_closetnt_log_errorgopt_argstnt_enc_sizeprscfg_yy_delete_buffermh_pk_start_resizetc_file_save_spaceprscfg_yy_flush_bufferdestroy_tarantool_cfgtnt_iter_listtnt_xlogtnt_request_freetnt_rewindprscfg_yyget_texttc_space_key_typeofprscfg_yyset_debugtc_options_processprscfg_yyalloctnt_listtnt_stream_reqidtnt_stream_inittnt_mem_inittc_config_loadmh_u32ptr_del_resizetnt_tuple_freetnt_mem_duptnt_xlog_errnotnt_iter_freetnt_list_attnt_snapshot_errorprscfg_yyrealloctnt_dir_match_incprscfg_yyget_extraGCC_3.0GCC_3.3.1GLIBC_2.3GLIBC_2.14GLIBC_2.2.50P&y  a_&  ii ( 2 ui = b"bebZb|b b(b0b8b@bHbPb Xb `b hb pb xbbbbbbbbbbȒbВbؒbbbbbbb b!b" b#(b$0b%8b&@bHb'Pb(Xb)`b*hb+pbxb,b.b/b0b1b3b4b5b6HHu^"Ht#H5b^"%d^"@%b^"h%Z^"h%R^"h%J^"h%B^"h%:^"h%2^"h%*^"hp%"^"h`%^"h P%^"h @% ^"h 0%^"h %]"h %]"h%]"h%]"h%]"h%]"h%]"h%]"h%]"h%]"h%]"hp%]"h`%]"hP%]"h@%]"h0%]"h %z]"h%r]"h%j]"h%b]"h %Z]"h!%R]"h"%J]"h#%B]"h$%:]"h%%2]"h&%*]"h'p%"]"h(`%]"h)P%]"h*@% ]"h+0%]"h, %\"h-%\"h.%\"h/%\"h0%\"h1%\"h2%\"h3%\"h41I^HHPTI/BH/BHǩM@bUH-bHHw]øHt]bbUH-bHHHH?HHHu]úHt]b="uUH~]"@H=HX"tHtUbH]{vUH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uEJHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!ЅBEEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uEHUHXHHUHPHHEHBHÐUHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH8H}HuHUHEHHUHH[EHE؋HEUHE؋@HEЃEHEH@UHHЋE!Ѕt3HEHUHHHHEHHUHH4tE\HEH@UHHЋE!Ѕu HE؋@HE؋PMEΉE?H8[]UHSH8H}HuHUHEHHUHH5EHE؋HEUHE؋@HEЃEHEHUHHHHEHHUHH;tE[HEH@UHHHEH@MHHȋ0E HE؋PMEΉEHEH@UHHЋE!Ѕ1EE~HE؋PMEΉ\EHEH@UHHЋE!Ѕt3HEHHEHUHHHHUHHtEWHH@bHHt  WHƒH/yHH@!H`HHHHt HL>H`HH`H`HHHH@@HHHHH@HH)HHI=HH@ bH8! Ht =DžTHHHHHH@@w=THHHHtHHHHuHH@@PT9t =HHHu6HH@@HHHXaHHHHH@\HH@@HHHHHH]aH@THHH@HHHH@u a<HH@HHH@@+THHHHHg_q{`HHHHHHHHu ;HHHH DDt D;HHHHHHHHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDž<HHHH@@HHHHH@H0HH@H@@k:<H0H0tH0HHuHH@H@@P<9Rt  :HHHH@@HHHHH@Hu:HH@H@@HHH&^H0H0H(~HH@H@@HHHHHH@@HHHHH@HH ^H(HHHHHHu +HHH蟘$$t $HHHHHHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDž|HHHH@@HHHHHPHH@H@@HHHHH@HpHH@H@H@@|HpHptHpHHuHH@H@H@@P|9t HHHH@@HHHHHPHH@H@@HHHHH@HuAHH@H@H@@HHH;HpHpHhHH@H@H@@HHHHHH@@HHHHHHHH@H@@HHHHH@HHM;Hh|HHHhHHpHhu QHHHH@@HHHHHPHH@H@@HHHHHhHPHH@H@H@@+|HHHpH9q#:HHpHHpHHu HpHHQ t aHpHHpHpHHHH@@HHHHHHHH@H@@HHHHH@HH)HHHHH@H@H@@HH9HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHHHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHH4HH@ Hn6HHuh4u HH9tHH9u,4"u HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHH@HH;t FHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHPHH@bHHt DždHHHXHH@@RdHXHXtHXHHuHH@@Pd9t HHHu6HH@@HHH34HXHXHP\HH@@HHHHHH84HPdHHHPHHXHPu <HHPHHH@@+dHHHXHB2qV3HHXHHXHHu HXHHt HXHHXHXHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžLHHHH@@HHHHH@H@HH@H@@F LH@H@tH@HHuHH@H@@PL9Rt  HHHH@@HHHHH@Hu:HH@H@@HHH1H@H@H8~HH@H@@HHHHHH@@HHHHH@HH0H8LHHH8HH@H8u  HHHH@@HHHHH8HPHH@H@@+LHHH@H.q /HH@HH@HHu J H@HH辉t  H@HH@H@HHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDž4HHHH@@HHHHHPHH@H@@HHHHH@H(HH@H@H@@! 4H(H(tH(HHuHH@H@H@@P49t HHHH@@HHHHHPHH@H@@HHHHH@HuAHH@H@H@@HHH,H(H(H HH@H@H@@HHHHHH@@HHHHHHHH@H@@HHHHH@HHl,H 4HHH HH(H u pHHHH@@HHHHHPHH@H@@HHHHH HPHH@H@H@@+4HHH(H.*qB+HH(HH(HHu H(HHp t H(HH(H(HHHH@@HHHHHHHH@H@@HHHHH@HH)HHHHH@H@H@@HH9HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHHHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHH%%HH@Hu}HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHPHH@HH6&t HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@Ht|HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@Hc#HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHH@HtHH@H%HCHH@HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@Hu#!H@t H[]UHSH(H}EH!c}tNH!cHH!HH)HHH!{9BHHǸ"HHH!H!HEHcHH}!HH)HHHj!HѺMB4"HusernameH!!HEbw"HHEHHEHHu*HEHm(>B3-"HE@t!B2V!Hbind_ipaHw!u!ddrHEb'!HHEHHEHHu*HEH(>BN2 HE@ t!B1= HEP$HEHB>BHǸHadmin_poH>!f=!rt8!HEb `HHEHHEHHu*HEH(>B1HEP(HEHB>BHǸHreplicatH!Hion_portH!!HEbA HHEHHEHHu*HEH7(>Bh0HEP,HEHB>BHǸHlog_leveH!f!lHEb !HHEHHEHHu*HEH(>B/_HEH@0HUHHEEE>BH׸7Hslab_allHV!Hoc_arenaHM!N!HE b pHHEHHEHHu*HEH(>B/HEP8HEHB>BHǸHslab_allH!Hoc_minimH!f!al!HE bH HHEHHEHHu*HEH>(>Bo.HEH@@HUHHEEE>BH׸Hslab_allH!Hoc_factoH!f!rHE bHEH@HHtHEH@HHHUHHEHHu7HEH@HHt*HEHg(>B-'Hwork_dirHH!I!HE bHEH@PHtHEH@PHHUHHEHHu7HEH@PHt*HEH(>B,Hsnap_dirH!!HE baHEH@XHtHEH@XHvHUHHEHHu7HEH@XHt*HEH3(>Bd,Hwal_dirH!HEbHEH@`HtHEH@`HHUHHEHHu7HEH@`Ht*HEH(>B+`Hscript_dH!f!ir{!HEb+HEH@hHtHEH@hH@HUHHEHHu7HEH@hHt*HEH(>B.+Hpid_fileH!!HEbHEH@pHtHEH@pHHUHHEHHu7HEH@pHt*HEHc(>B*#K!loggfF!erA!HEbmHHEHHEHHu*HEH(>B*HE@xt!Br)HEHHUHHEEE>BH׸Hio_colleH!Hct_interH!!valHEb HHEHHEHHu*HEH(>B(JHEHEHB>BHǸ)HbacklogHH!HEb zHHEHHEHHu*HEH(>B)(HEHEHB>BHǸHreadaheaH!f!dHEbg HHEHHEHHu*HEH](>B'HEHHUHHEEE>BH׸Hsnap_io_H!Hrate_limH!f!it!HEb "HHEHHEHHu*HEH (>B&`HEHEHB>BHǸ?Hrows_perH^!\!_walY!HEb HHEHHEHHu*HEH (>B.&HEHEHB>BHǸHwal_writH!Her_inboxH!!_sizf!eHEbQHEHHtHEHH`HUHHEHHu:HEHHt*HEH (>BK%Hwal_modeH!!HEb &HHEHHEHHu*HEH (>B$dHEHHUHHEEE>BH׸9Hwal_fsynHX!Hc_delayHO!HEb y HHEHHEHHu*HEH (>B($HEHHUHHEEE>BH׸ Hwal_dir_H!Hrescan_dH!!elay!HEbC HHEHHEHHu*HEH9 (>Bj#HEt!B"BHEt!B!HEHEHB>BHǸd Hprimary_H!!port~!HEb, HHEHHEHHu*HEH"(>BS!HEHEHB>BHǸ HsecondarH!޹!y_pofٹ!rtԹ!HEb HHEHHEHHu*HEHv(>B 6HEHHUHHEEE>BH׸ Htoo_longH*!H_threshoH!!f !ld!HE bHEHHtHEHH HUHHEHHu:HEHHt*HEH(>BLHcustom_pHm!Hroc_titlHd!fc!eHE!b  HHEHHEHHu*HEH(>B4 HEHEHB>BHǸHmemcacheH!!d_pof!rt!HE"ba HHEHHEHHu*HEHW(>B HEHEHB>BHǸHmemcacheH!Hd_spaceH !HE#b 6HHEHHEHHu*HEH(>Bt HEt!B1 HEHEHB>BHǸHmemcacheH!Hd_expireH!H_per_looH!f!pHE%bM HHEHHEHHu*HEHC(>Bt HEHHUHHEEE>BH׸HmemcacheH!Hd_expireH!H_full_swH!!eepHE&b HEHHtHEHHHUHHEHHu:HEHHt*HEHN(>B HreplicatH/!Hion_sourH&!f%!ce !HE'b HE'HEHHo HEHHE@HHHHHH HE' 5 H@BHHEHHEHHu*HEH[(>B HEHHE@HHHH@BbHE)bt HHEHHEHHu*HEHj(>B*HEHHE@HHHHPHEHB>BHǸHE@Z>BbHE*b 2HHEHHEHHu*HEH(>BpHEHHE@HHHHPHEHB>BHǸ8HE@p>Bb6HE+bHE+HEHHE@HHHHH@HYHEHHE@HHHHHPHE@HHHHHHE+H(ABHEHHE@HHHHHPHE@HHHHH@HtCHEHHE@HHHHHPHE@HHHHH@H"HUHHEHHuhHEHHE@HHHHHPHE@HHHHH@Ht*HEH(>BnHEPHE@AЉ>BbdHE-b.HHEHHEHHu*HEH$(>BUHEHHE@HHHHHPHE@HHHH@Bb;HE.bHE.HEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHE./v0 HHEHHEHHu*HEH8(>BiHEHHE@HHHHHPHE@HHHHHPHE@ HHHHPHEHB>BHǸHEH HEPHE@AAЉ>Bb|HE0bFHEHHE@HHHHHPHE@HHHHHPHE@ HHHHH@HtZHEHHE@HHHHHPHE@HHHHHPHE@ HHHHH@HHUHHEHHuHEHHE@HHHHHPHE@HHHHHPHE@ HHHHH@Ht*HEH@(>BqHEH HEPHE@AAЉ>BbHE.HE@ PHEP b+HE+HE@PHEPHE@ J6HE'HE@PHEPHE@HE@ HEHQ(HE¾?B xHEH'UHH0H}HEHEEHE؋u%EbH¾=B HE@HEHHE@HHHHHEHHE@HHHH@HEHHE@HHHHHPHE@HHHHHHE@PHEPHEHHt'HEHHE@HHHHHEHUHH}HuHEHEHEHHHE@HEHHE@HHHHHUHHURHcHHHHEHHE@HHHHH@H.HE@HEHHE@HHHHHPHE@HHHHHUHHURHcHHHHJHURHcHHHHEHHE@HHHHHPHE@HHHHH@HHE@ HEHHE@HHHHHPHE@HHHHHPHE@ HHHHHUHHURHcHHHHJHURHcHHHHJHUR HcHHHHE@ PHEP HEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHE@PHEPHEHHE@HHHHHPHE@HHHHHHE@PHEPHEHHE@HHHHH*]UHSHH(H H0HXH(H@HtH(H@HusernHX!X!amebHEPHE@8t=Hc->localHVX!H_hot_staHMX!KX!ndbyHX!b}HEHPHEH@HHt5Hc->bind_HW!W!ipadfW!drW!b)HEP HE@ 8t%Hc->coredHW!W!umpbHEȋP$HE@$9t.Hc->adminHzW!xW!_porfsW!tbHEȋP(HE@(9t6Hc->repliH:W!Hcation_pH1W!/W!ortbh}u>HEȋP,HE@,9t,Hc->log_lHV!V!evelV!b$HE@0HEH0f.zf.t6Hc->slab_HV!Halloc_arHV!V!enabHEȋP8HE@89t?Hc->slab_HZV!Halloc_miHQV!OV!nimafJV!lbHE@@HEH@f.zf.t=Hc->slab_HU!Halloc_faHU!U!ctorU!b$HEHPHHEH@HHH{t%Hc->work_HU!U!dirbHEHPPHEH@PHH7t%Hc->snap_H]U![U!dirbHEHPXHEH@XHHt+Hc->wal_dHU!fU!irU!bRHEHP`HEH@`HHt.Hc->scripHT!T!t_difT!rbHEHPhHEH@hHH\t%Hc->pid_fHT!T!ilebHEHPpHEH@pHHt$Hc->loggeH>T!f=T!rb~HEPxHE@x8tloggeHT!Hr_nonbloHS!fS!ckS!b.}ujHEHEf.zf.tFHc->io_coHS!Hllect_inHS!S!tervfS!alS!bHEȋHE9t+Hc->backlHBS!fAS!ogreadaHR!R!headR!b1}ucHEHEf.zf.t?Hc->snap_HR!Hio_rate_HR!R!limifR!tbHEȋHE9t,Hc->rows_HLR!Hper_walHCR!bHEȋHE9tDHc->wal_wHR!Hriter_inHQ!Hbox_sizeHQ!Q!b(}uJHEHHEHHHst%Hc->wal_mHQ!Q!odeb}u`HEHEf.zf.twal_fHJQ!Hsync_delHAQ!f@Q!ay;Q!brHEHEf.zf.t=Hc->wal_dHP!Hir_rescaHP!Hn_delayHP!bHEHE8tFHc->panicHP!H_on_snapHP!P!_errfP!or~P!bHEHE8t?Hc->panicH3P!H_on_wal_H*P!(P!errof#P!rbXHEȋHE9t,Hc->primaHO!Hry_portHO!bHEȋHE9t5Hc->seconHO!Hdary_porHO!fO!tb}ucHEHEf.zf.t?Hc->too_lH9O!Hong_threH0O!.O!sholf)O!db^HEHHEHHHt=Hc->custoHN!Hm_proc_tHN!N!itleN!bHEȋHE9t5Hc->memcaHN!Hched_porHwN!fvN!tbHEȋHE9tmemcaH3N!Hched_spaH*N!f)N!ce$N!b[HEHE8t6Hc->memcaHM!Hched_expHM!M!ireb }ufHEȋHE9tNHc->memcaHM!Hched_expHM!Hire_per_HwM!uM!looprM!b }u{HEHEf.zf.tWHc->memcaHM!Hched_expHM!Hire_fullHL!L!_swefL!epL!b }udHEHHEHHHit?Hc->repliHL!Hcation_sHL!L!ourcfL!eb HE@HE@m HEHHE@HHHHPHEHHE@HHHH@8t6Hc->spaceHK!H[]->enabHK!K!ledb HEHHE@HHHHPHEHHE@HHHH@9t=Hc->spaceHqK!H[]->cardHhK!HinalityH_K!b HEHHE@HHHHPHEHHE@HHHH@9tMHc->spaceHJ!H[]->estiHJ!Hmated_roHJ!fJ!wsJ!b HE@HE@bHEHHE@HHHHHPHE@HHHHHPHEHHE@HHHHHHHE@HHHHH@HHtFHc->spaceHJ!H[]->indeHI!Hx[]->typHI!fI!eb# HEHHE@HHHHHPHE@HHHHPHEHHE@HHHHHHHE@HHHH@8tGHc->spaceHII!H[]->indeH@I!Hx[]->uniH7I!5I!quebf HE@ HE@ CHEHHE@HHHHHPHE@HHHHHPHE@ HHHHPHEHHE@HHHHHHHE@HHHHHHHE@ HHHH@9thHc->spaceHEH!H[]->indeHkeyH3H!H_field[]H*H!H->fieldnH!H!f H!obAHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHPHEHHE@HHHHHHHE@HHHHHHHE@ HHHHH@HHthHc->spaceH.G!H[]->indeH%G!Hx[]->keyHG!H_field[]HG!G!->tyf G!peG!b*HE@ PHEP HE@ PHEP HEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHEHHE@HHHHHPHE@HHHHH@HtUHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHEHHE@HHHHHPHE@HHHHHPHEHHE@HHHHHHHE@HHHHH@H9uBHEHHE@HHHHHPHE@HHHHH@H{HEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHuQHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHtUHc->spaceHC!H[]->indeHC!Hx[]->keyHC!H_field[]HC!C!bHE@PHEPHE@PHEPHEHHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHteHEHHE@HHHHH@Ht>HEHHE@HHHHHPHE@HHHHHHEHHE@HHHHHPHEHHE@HHHHH@H9u+HEHHE@HHHHH@HHEHHE@HHHHH@HHEHHE@HHHHH@HttHEHHE@HHHHHPHE@HHHHHu:HEHHE@HHHHHPHE@HHHHHt6Hc->spaceH A!H[]->indeHA!A!x[]bNHE@PHEPHE@PHEPHEHHtZHEHHE@HHHHHt7HEHHt'HEHHE@HHHHH)HEHHEHH9uHEHHHEHHtVHEHHtFHEHHE@HHHHHu#HEHHE@HHHHHt(Hc->spaceH?!f?![]?!bÐUHH H}HuHE<"HEHEHEHEHE'td'"t?,tS\uHEHE<\uAH}tHEHUHHEHEH}tHEHUHHE<H}uHEH読#HUHEHH腭HHEHH)HUHHH}HuHxttHHŀCBHƿHEHEHEHEEt"HxHEBE̋tHHŀCBEHHTŐE}}yEEȸ3+ẺEĸ}NEĉEEȉEE̋UH FB;Eu|}tv}uEHEHEoEHHŀCBEHHTŐEEHHŀCBHƿHHEHHEHEH;Ev [HEHEEE;E[}wGEHŠGBHEFB0HEFB&HEFBHEFBHE(GBHE`GBHEH裫HUHHEHEH;Ev HEHEHEHH;Es1HEHHEHHEHH;Es HEHHEHHEETHE<%u?HEHH H @H HHPH H@H H@H H@ HHx$H HxHPHxH@ HxHxuKHHuHGBH mHHH@HH@(藠HHuHGBH8 HH@HEHHHHPHHHPHH@HH@ HEHHHp$HpHHPHpH@ HpHpuHHh9HhH@HUH(HHRHRRPHhH@ HhHhuHt2HEH(HHPHHP HEH(HHHPHEH(HHUH(HHRHPHH`(HEH(HH`HPH`H@ H`H`uHEH(HH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHPHEHH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHP"HEHH HDž HEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH wHEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH HEHHH H HEHHHCHEHHHSH H HuHGBHH HUHHH @H H@BDž 6Dž HEHHrHDž HDž EHHHHEEHHHHEEHEHEH HEHDBEEHEBHEЉE}x9}23EH FBfHEf9uEHEBEpEH`EBEV}t"E=wEHABE}EHDžXFBMHUHHHxTTuHHXTHHH9tHHڗHH+HHHu%HHHDžDžT1MHUHHHTHHXHXHHHoTN}uj} }u^(HHEƿGB!E3EHHHHEEHHHHEEHEEEEHEBE}t8E}x.}2(EH FB<uEHEBE}JHEH;EtlEH`FBHHUƿGB]HmHmHEEfHEHEHHEEE/E"HHBHE}t@E=wEHABEHHEƿHBEHHHHEEHHHHE5HEH`FBHHUƿ3HBYHmHmHEH;EuHpH9Et HEHHHH9tHHEHHx []UHHH}HuHEH3HEH¾PIBUHH0H}HuHEHEɖHHEHHEHHEH}uGB~HEHUH HHJHHHRHPHEHHtLHEHHHHEHHEHHu'GBHEHHH}tHEHUHPHEHEHEHEHEHEHEH@HEH}HEUHH H}HuHUHEHHHEH}uGBrHEHUHPHEHHEH@HHEHHEHHEHHEH@HEHUHP HEHESHEH@HUHHHE3HEH@H(HEH}u6GB贩HEH.HEH"HEHUH HHJHHHJHHHJHHHR HP HEHOt>HEH@HHEHHEHHEHHEH@HEHUHP HEHE9HEH@HUHHHEHE¾lIB 軨HEH@ HEHEH@HPHEHNHEHEH}dHEUHH H}~HEtrt&6HEH@H%HEH@HHEH@HHEH@ HEHEH@HHEH豎HEHEH}wUHH@H}HuHUHEHH+HEH!HEHEHEH,H}t HEU}tH[!H2HDUHH@H}HuHUHEHH+HEH!HEHEHEH,H}t HEU}tH!HH躐UHAVAUATSH0H}HuHEHEHEHUHHE؋@HHE@HHE؋@Lu HE@LHEH@HuH!HEHPHEH@HuH!HEHPHEH@(HtHEHP(HEH@HHHHu@HEHHEHP(HEH@HHHEH@HU@HHHEHHEǀHE؋t9HEH@@HHEHHH)HȉHE؉HEǀHEHX@HE@0IHED`L JBAIcIBft9HED`hHEHXp'Ic OBDA;~AƉ NBAIcNBAHQBD9uIcNBAЉOBDHA;PHEHXpHED`hIcIBDHELHEHHE؋HHHHEHHHEHHH)HȉHE؉P8HE؈P0HEHX@A$_ DHHSBHE@0HEHXpHED`hSHEHPP> HEH@HEHHE؋@LBHE@L  HEH8RBFHHEHHHuHEH@ƿGB 'HEHHE؋@8HcHEHHHW*HHEHHHuHEH@ƿGB&\HEHHE؋@8HcHEHHH)HHEHHHuHEH@ƿGB^&HEHHEH@ƿ@RB(&HEH`RBHHEHHHuHEH@ƿGB%HE@LjHEH@ HEHHEH@ HHHHEHHHuHEH@ƿGBr%HEH@HE@LHE@LHEHHEǀHE@LHEH@ƿhRB$HEHHE؋@8HHHEHEHHE؋@8HcHEHHH(HHEHHHuHEH@ƿGB|$HEHHUEHΉHE@LHEHHE؋@8HcHEHHH'HHEHHHuHEH@ƿGB#HEHHUHƿ*YHEHHUHƿ/=HE@LKHEǀ3HEHHE؋@8HcHEHHH&HHEHHHuHEH@ƿGB7#HE@LHEHHHEH%HEH@ƿGB"wHEHPPiHEHHHEH@HHHEHHUHHHHE@LHEHHHE؋P8HEHHEHH#$HEH@ƿGB1"HEHHEH$tHEH@ƿGB!HEHPPHEH@ƿRB!jHEHPPPHEHPPHEH@-HEH@PHE؉PLHEHPPHEH@ƿRBF!HEHƿRB[HHEHHH)HȃEHE@0HEHP(HEH@HHH@WBH.IHHHPHH@Hu+HHGH HHPHHPHEо HiHHEH}uHHHHPHE H)HHEH}uHHWHH@ vAt r9t3HE@WBHH@(AHEFWBHH@(AHUHEHHGtHH,HELWBHGtHHHHPHH.GHEH}uHH_HERWBHGtHETWBHGuHH@HFHHHPHH@ H"HUHHH}HEH@Ht$HEHPH H9tHEH@HSEHEH@UHHH}HuHEHUHPHEH@HMHH GUHH}HE]UHSHH}HE苀uAHE苘HE苀@GAHWB&cE&cHE苀HHHbH@H[]UHH}HE]ÐUHH}H HEH}t HEHo HE]UHHH}HV HUHֿUHHH}HuH/ HMHUHHUHH H}HEHDHEHEHHHEH}uHEHPHMHEHH4EHEUHHH}H HUHÐUHHH}HE HCUHHH}HEH@HtHEH@HHEH@HEHEH@HE@t HEHTUHH@H}HuЉUH}EH}uO uHEH}u =HEغ H#CHE@}u HE HEH@Hu HEH@Ẻ/EHEHPEHH‹EHHEHEH@HUHH"DHEH}u}t HEHgHE؋PHE؉HMHEHHdCHEHPHEH‹ẺH.H}t)UHEHHEHHHEHHEHHCHEHUHPHEHUHPHEUHH HH`HhLpLxt )E)M)U)])e)m)u)}HHuEHHu Hu HDžDž0HEH HPH(HHH CHHHHHH% t HHjHH<%t kHHHHl/l*t%dsuHHHH0HHHHH0s#H(HЋH HHH HHHH$HH'HHHUHH0H}HuH}wpHEHE؋EIHEHUHHEHH&E}u3UEЉHEHEH;Ev}muH=UHH0H}HuHUHUHEHH?u H}EH}u&HEH}uuHEHEHEHUHPHEH9HHEHPHEH@Ht!HEH@HUHMHH;HE}t HEHUHH0H}HuHU؉MH}EH}u)HEH}u UHEHEHPHEHPHEH@HhHHEHPHEH@Ht2HEH@UԉHEH@HHHUHEHH:HE}t HEHUHHH}HEH9UHH H}HEHHt]E HEHUHHHHEHE@;EwHEHH/HE@ tHEHUHHHXH`HhLpLxt )E)M)U)])e)m)u)}H(H(uUH(H(u H(H8H(@ PH(P Dž0Dž40HEH8HPH@00s#H@0HЋ00H8HHH8HHHHHtHHH(HH뎐H(H9UHH H}HuH}EH}u)HEH}u HE@HHEHHH8HEH}u(HEHH6}t HEHR>HEHUHHEHHE@HHHEHHE@PHEPHEÐUHHH}H}tHEH6HELHEH}u0HEH6HE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HH< HEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHxHEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@AHEH@NBHEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@BHEH@|BHEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHnHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHH!UHH H}HuHEH'HEH}uYHEHEH@BHEH@HEH@ BHEH(HEHEHUHHEHHxHEUHH H}HEH(HEHEHH HEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@JBHEH@HEH@ BHEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHfHEHH2HEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@~BHEH@HEH@ BHEH(HEHEHUHHEHHHE@hHE@hHHHiHHEHPpHEH@pHu&HEH(H6HEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHMUHH@H}HuHUHEHp HMHEкHHu HE؋@EEHEHEH}tUHuHMHEHHYHEHP8HEHHf E}<}2EHcHEHH$HEHH!UHE؉P,HE؋@8HHHEHP0HEH@0HHE؋@8‹EHcHEHHEH@0HHC!HEHP0HE؋@8HHE؋P8E)EEUHcHU؋R8HHUH4HUHJ@HHFHu!HEH@0HHEH@06HE@hHE؋@hHHHHHEHPpHEH@pHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pH HUH$HHEH@pHP HE؋@,HBHEH@pHP0HEH@0HHEH@pHP0HE؋@8HBHEH@pHP@HEH@HHHEH@pHP@HEH@PHBHEHt2HEH@HH}t HEH@UHH`H}HuHUHEHp HMHEHHu lHE@EEH8HEH}UHuHMHEHHHEEEHEH0HEUHEHЋEEEBEUEHHEHHEHHEԃ}UԋEEEE;ErHEH0HdHEȋUMHEHHEHHsHt/EEEE;EGHEH/HEH0HH}t HEHHUHH`H}HuHUHEHp HMHEHHu THE@`HEH@XHE@EEHkHEH}UHuHMHEHHqHEEEEHEH@HHEH@XHtHEH@XHHEH@XH}t HEHHUHH H}HuHUHMH}tHEHHHE HH*HEHpHMHE HHu HE@tWw ttcrE=HUHMHEHHHUHMHEHHBpHUHMHEHHWHUHMHEHH>HUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHoHEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾ2BHEH}t HUHEHEHgÐUHH}HuHEHExHEƒHEHEHx7HEHEH ЉHEUHEHxMHEHEH HEH ЉHEHEHxcHEHEH HEH HEH ЉHEHEHxsHEHEH HEH HEH HEH ЉHE]UHH}u}vs}?vT}v5}vEȀHEHEEȀHEHEEȀHEHEEȀHEHEEƒHEHE]UH}}w5}?w%}w}w]ÐUHSHHhH`HXH`HHEHEHEH<-HEHHHEHH<-uHEHHHErHXHE[HEHHHEH@HHt.HE؋@uHEHHHVHEHE(HE؋uHEHEHH"HEHHHxH`HHEHEHEHxHEHxH`HHHEH<-HEHHwHEHH<-BHEHHHXHEHEH@HEHE!HEHHHEHEHHE HEHEHEtHEHE8tHE<=tHEHEt|HEtdHEHHpHUHEHHHH)HȉH`HH͠ IWBHǸHxHHEHEHEHEHEHEHHuHE(HEt HEH@HEHEHHHEudHEHHXHEHHXBHH`HH IؾXBHǸHxH HXHEHE(HEHE9uHE@HxHEyHEHE9udHEHHXHEHHXBHH`HHO Iؾ8XBHǸ*HxH+ HEHEH;EyHE@HEHH=H HPHEHPHEH@HHEHEHHt HEH<-u]HEHHtKHEHHHHH`HHu XBHǸSHxHT :HEHHEHPHEHH=H HtdHEHHXHEHHXBHf H`HH IؾXBHǸ HxH HEH@HEbHEHEHHEHHEHEHEHHuJHEHHHEHXHEHEHEH@H HlHE@urHxHE[HEHE9uFHEH`HH XBHǸ HxH  HEHEH;EuHEHEHE@HEHtHEHPHEHPHEHEHHt HEH<-uXHEHHtFHEH`HH 0YBHǸ HxH  HEHHEHPHEHEH@HEHEYHE(HE\HEH`HH ]YBHǸj HxHk Q HEHEHHEHHEHEHEHH6HEHEHHUH`HH)HHHhHxHĨ[]UHH}uHEHEHEHE;EHEHEHEuHE]UHH}uHUHEHEHE+HE;EuH}uHEHPHEHHEHEHEuHE]UHH}uHUHEHE&HE;EuH}u HEH@HmHEHEuи]UHH@H}؉uHUHMHEHHEHHEHEHEHEHEKHE;Eu;HEH;EuUHEHHHEHMHEHPHEHHEHEHEuHEH;Et HEHHUHEHH)HHUHHH}HEHUHSHxH}HEHEEE6H HEH HMH HEfE HEH@HEEvYBHEt&EHEHEƿyYBZvYBIHEH@HEHEHH}t}YBvYBHEH@Ht:HEHXHEHHU)HEHHHƿYBHEHẺƿYBHEH@ HHEH@ HEEHcHEHHEHmHEH;Ev HE< uHEH;EuEHcHEHHEHUHEHH)HHU؉ƿYBHEHEHEtHEHƿYBHEHUHcH9NHEH% YBHE(HEHHx[]ÐHl$Ld$H-` L%` H\$Ll$Lt$L|$H8L)AIHI1!Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH 5a 0`   0 ` Y0`ffffff?generateverifyhelpversion generate signature fileverify signature filedisplay this help and exitdisplay version information and exitTarantool checksum: checksum master and replica logs.usage: tarancheck rfailed to open config file: %s  5a 0`   0 ` Y0`NUMNUM64STRcan't allocate key fieldsspace %i is already defined failed to create space %d primary index is not defined 5a 0`   0 ` Y0`w+r 5a 0`   0 ` Y0`/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/tc_generate.c((k)->i[(i)].size) == 4((a)->i[(i)].size) == 4((b)->i[(i)].size) == 4((a)->i[(i)].size) == 8((b)->i[(i)].size) == 8bad xlog operation %d space %d is not defined failed to create key%s/%020llu.xlog(xlog) %020llu.xlog failed to open xlog file(xlog) %020llu.xlog %.3fM processed xlog parsing failed: %s failed to open wal directoryfailed to match xlog with snapshot lsn%s/%020llu.snap(snapshot) %020llu.snap failed to open snapshot filesnapshot parsing failed: %s >>> Signature file generationconfigured spaces: %d snap_dir: %s wal_dir: %s snapshot directory is not specifiedxlog directory is not specifiedfailed to open snapshot directoryfailed to match greatest snapshot lsnlast snapshot lsn: %llu last xlog lsn: %llu (signature) saving %s search_equalsearch_hash$tI 5a 0`   0 ` Y0`failed to create key(snapshot %lu) checksum missmatch (snapshot %lu) key missed %s/%020llu.snap(snapshot) %s failed to open snapshot filesnapshot parsing failed: %s failed to open snap directoryno suitable snapshot found (lsn >= %lu && lsn <= %lu) >>> Signature file verification(signature) loading %s configured spaces: %u last xlog lsn: %lu last snapshot lsn: %lu OKFAILEDINADDR_ANY.tarantool.pidfsync_delayusernamelocal_hot_standbybind_ipaddrcoredumpadmin_portreplication_portlog_levelslab_alloc_arenaslab_alloc_minimalslab_alloc_factorwork_dirsnap_dirwal_dirscript_dirpid_fileloggerlogger_nonblockio_collect_intervalbacklogreadaheadsnap_io_rate_limitrows_per_walwal_writer_inbox_sizewal_modewal_fsync_delaywal_dir_rescan_delaypanic_on_snap_errorpanic_on_wal_errorprimary_portsecondary_porttoo_long_thresholdcustom_proc_titlememcached_portmemcached_spacememcached_expirememcached_expire_per_loopmemcached_expire_full_sweepreplication_sourcespaceenabledcardinalityestimated_rowsindextypeuniquekey_fieldfieldnotrueyesenableon1falsenodisableoff0%s[%d]Option '%s' is not supportedCould not find '%s' optionWrong value type for '%s' optionWrong array index in '%s' optionCould not accept read only '%s' optionCould not parse integer value for '%s' optionWrong range for '%s' optionNot enough memory to accept '%s' optionOption '%s' is not set (or has a default value)Unknown error for '%s' option\AAAMAAAAeAAA{ANo memory to output value%d%gspace[%d].enabledspace[%d].cardinalityspace[%d].estimated_rowsspace[%d].index[%d].typespace[%d].index[%d].uniquespace[%d].index[%d].key_field[%d].fieldnospace[%d].index[%d].key_field[%d].typeUnknown state for tarantool_cfg_iterator_t: %d}A}AAAgAAAMAAAFAAA- A Ac!A!A"AC#A#A$A'%A%A&A='A'A(AK)A*A*Ab+A,A,A-A-.A.A/AA0A 1A1A1A1A1A1A1A1A1A1A1AS;A)2A)2A3A3A4A4A4A4A4A4A5A5A`6A7A7A7AOption '%s' is not set     $enderror$undefinedOPT_PKEY_PINDEX_PNULL_PSTRING_P'['']''=''{''}''.'','$acceptcfgsection_listsectionnamed_sectionparam_listparam$@1valueevaluestruct_listqnameqelemqualifierelemnameoptcomma_optBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB CBCBCB!CB'CB.CB:CB@CBFCBPCBUCBZCB^CB          %+  " !&#$### ')', /10 .64 !7"#$5)*23(&-  '+.  *5  3  , 1 6            syntax errorsyntax error, unexpected %ssyntax error, unexpected %s, expecting %ssyntax error, unexpected %s, expecting %s or %ssyntax error, unexpected %s, expecting %s or %s or %ssyntax error, unexpected %s, expecting %s or %s or %s or %sAAAAAɈADeletingNo memoryError: discardingError: poppingmemory exhaustedCleanup: discarding lookaheadCleanup: poppingZAZAA͍AA,A>??;;;;@;;;AA;;;@;;;B;;C;;;;;;D;DD;@;;AA;B;;;DDDA;;;;;;;;;;;    .:98-*76430,*/-,*;;;;;;;;;;;;;;;;;;;!";#;$;%!";#;$;%';;(;;)';;(;;) &&&&+;++1;;122225;55 ;;;;;;;;;;;;;;;;;;A90/-*)(%  <<<<====>>>>????@@@BBCCCCDDD;;;;;;;;;;;;;;;;;;;OPTsyntax error: Unknown characterNULLUnexpected end of string (expecting value)Unexpected end of string (expecting closing quote)Unexpected end of string (inside comment)flex scanner jammedfatal flex scanner internal error--no action foundAA^A^A*AeAAArAAAArAA̫A̫A̫A̫A{A"AAAA^AVAAAAUA^AAAAAA5AjAfatal flex scanner internal error--end of buffer missedfatal error - scanner input buffer overflowinput in flex scanner failedout of dynamic memory in yy_get_next_buffer()flex scanner push-back overflowout of dynamic memory in prscfg_yy_create_buffer()out of dynamic memory in prscfg_yyensure_buffer_stack()out of dynamic memory in prscfg_yy_scan_buffer()out of dynamic memory in prscfg_yy_scan_bytes()bad buffer in prscfg_yy_scan_bytes()out of memory expanding start-condition stackstart-condition stack underflow%s prscfg_yyset_lineno called with no bufferprscfg_yyset_column called with no bufferscan_yyerror: %s at line %d....xlog.snap.snap.xlog rXLOG SNAP 0.11 okfailmemory allocation failedfile type mismatchfile version mismatchfile crc failed or bad eof markersystem error%s (errno: %d)%s: --%.*s: abbreviated option is ambiguous =%s: --%.*s: unknown option %s: --%.*s: option may not be repeated (in any long or short form) %s: --%s: option requires an option argument %s: --%.*s: option may not take an option argument %s: -%c: option may not be repeated (in any long or short form) %s: -%c: option requires an option argument %s: -%c: unknown option -%c, --%s%-*s--%-*s%.*s %s;dP ~, T L| p l $ cL Gl  "$ D {d  g Y, T | H f x$ D d 9$sDnl"o 4>T\t   4 \^<\~|'!!4w#\$c&()@)f*<9,d-/h0025<Q6\6|6!7d ؼ,Tf|} ,LBl|,a--0R0:E|E4FT G|PG(HJxKL,LTX|_`acmdDed1ffgJhh.j$:kDldmmnoUpp$pDqdiqqqqqq$jrDrds$s=s\syss$$tD uluvv w*w `w,wTjx|xxxxy$zLzl8}}~~~ 4 T ׀t U t !:BI:BR:BY:Bi:B}:B:B:B:B:B:B:B:B:B;B;B';B6;BI;B[;Bj;Bz;B;B;B;B;B;B8b;B;Bxb;B;Bb;B;Bb;B;B8b;BPbjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V0WWBZWB_WBxWBWBWBWB`6@GCC: (Debian 4.7.3-4) 4.7.3,7@,N@,4P@,eQ@ ,H,^@i ,7(j@f,W@t, r@,AwN,*A,>8A,A<,;LA<,A?,dA# ,gA,yA ,A,H B,%B,h B,d$|B,%@"B 7@N@$8int  u<U7 ?b( p   T# T# w# ew#if3TAy & O g q q  4 U     3- s   F# B # r y#s  5   F# r y#  # > #5  O ~  F# W "#  ## ? $# 9 %~# O &+ (  )F#  -y#  5#  ;y#  A# # G#$ 6 J#( G M#,  P #0  S#8  V #@ + Yy#H B \y#P  _y#X  by#`  ey#h  my#p  p#x  s # O v# P y#  | #  #  # g y#  #  # < # b #  # | #  #  y#  #  # S #  ˜#  # m y# - # H   ?# ?# * Scrc # -#i S#bp  key #val w#G +8[@p\@#b]F# ^# m_# `# a# b# d#$ e#( f#, gL#0b 8[p\#b]F# ^# m_# `# a# b# d#$ e#( f#, g#0R 1 ,  $ $  r k #  #  #cfg # C      c  r r#n ?#   # 3 ?# ( 0id #  # E #pk #A7@8@linch d8@9@`hLP Hargw@k͒`iΒdincϒ\bv9@:@ hLP Hargw@k`idinc\^XN:@ <@  hNLXxNTargOwH,j <@}<@5 hjLXxjTargkwHsmLhynd_uL}<@e=@i hwLh|e=@>@@ hLh>@Q>@ hLhQ>@?@g hLargwsLP\x>@?@iX>@?@nLZ??@A@` hLXTPargwHsLhA@KB@% hLh dargwXKB@yB@ u linch dUyB@C@ hH  @arg k͒XiΒ\incϒT  uC@E@ hH  @arg kXi\incT^PNE@F@@ hNXxNTargO HjF@/G@8hjXxjTargk Hsmhyndu/G@H@lhwhH@H@`hhH@I@hhI@J@ jharg sP\*I@LJ@iX9I@8J@nL?J@L@hXTParg HshL@L@(hh darg X8L@M@@vv8~8y~ ap: ~!'A?M@N@A?}A'}"2C,}rcF?h"kGl p"L  /BN@4P@int  u<Ut7t 4 ( k4# f4# s# l# a# h#  s= ;# B# rn#s 5  ;# rn# t# >#=5H O  ;# W"t# ## ?$# 9%#O& (b );# -n# 5t# ;n# At# #G#$ 6J#( GM#, Pb#0 S#8 Vb#@ +Yn#H B\n#P _n#X bn#` en#h mn#p pt#x sb# Ov# Py# |b# # # gn# b# b# <t# bt# # |# b# n# # # St# # b# mn# -i#Ao 1$$   k u#  # # cfg#7N@N@ 27h<N@O@` H2<h@4O@0O@ Iu0O@4P@ 2IXI4TIHoptKlha P@n, (b]D]4P@Q@8$8int  u<UiiU7 ?O0K ?# # x# # # a#( /#0 #8 #@ #H #P T#X o #` N #h F ?#p ?#t p#x M# [# # #  &{# /# 0# 1# !2# (3-# j5?# =7#  .# # |$?#    s9 F# B# r#s5  F# r# # >#95DO  F# W"# ## ?$# 9%#O&(^ )F# -# 5# ;# A# #G#$ 6J#( GM#, P^#0 S#8 V^#@ +Y#H B\#P _#X b#` e#h m#p p#x s^# Ov# Py# |^# # # g# ^# ^# <# b# # |# ^# # # # S# ®# ^# mΏ# -e#Ak1$$  k q#  # #cfg #+?4P@Q@ T2+THf-Zh2?`R3?\w4?Xrc5?d [FQ@^@$8int  u<U7 ?3Ts F# B# ry#s5 < F# ry# # ><#B5O  F# W"# ## ?$# 9%#HO&S ( )F# -y# 5# ;y# A# #G#$ 6J#( GM#, P#0 S#8 V#@ +Yy#H B\y#P _y#X by#` ey#h my#p p#x s# Ov# Py# |# # # gy# # # <# b# # |# # y# # # S# ˜# # my# -#AHM  ?# ?#*  crc #  -# i # $ p  key # val w#G+8[o p\o# b]u# ^# m_# `# a# b# d#$ e#( f#, g{#08[$ p\$# b]u# ^# m_# `# a# b# d#$ e#( f#, g0#0*M1 [$$   k 6#  #  # cfg #C c  r # n ?#  # 3 ?#( _ id #  0# E 0# pk # x t {# oQ@2Q@ h{hxdA2Q@`Q@@ linch d`Q@eR@ zh{P zHargw@k`idinc\veR@.T@  h{P zHargw@k`idinc\^X .T@V@`  h{H z@ret argwx\?XIV@oNV@W@  hN{XxNTargOwH$W@W@ ' h0hxd-?W@X@ Z s-Z h_4X@ Z@ - s4Z !X@Y@i7T-9- Hpos<X !X@xX@ i7\ X@Y@ k?*@jY@Y@kH*X- Z@Z@@ sXZ HidXD-Y- h aPf- Z@:[@ sfZ HidfD gPkhd-i- h2p:[@[@, &pyh~?[@"]@` s~- cs~ ` -Pkn?l! ckBX"0kHckB@"?"]@ ^@9 sZ Xn?TcsH-- hrc?d? ^@^@  sZ H2 @i?l$^@^@cs`rc?\[  #pL 1B [` ^@%j@ $8int  u<UiiU73T 78O0K?##x### a#( /#0 #8 #@ #H #P T#X o #` N #h F ?#p ?#t p#x M# [# # #  &{# /# 0# 1# !2# (3-# j5?# =7# .##|$?#    AH8 ?# ?#* m crc #  -# i m# |  key # val #G+8[Z p\Z# b]`#^#m_# `#a#b# d#$e#(f#,gf#0|8[ p\# b]`#^#m_# `#a#b# d#$e#(f#,g#08lC Fc mr !# n ?#  #3 ?#F(  id # #E # pk m#  t f# 6Y 7#$ 8#- 9# :#;# <# ?-@#, A# B# C# Z^@^@hfhxd^@^@hhxd^@&_@@jlinch du&_@!a@hH @argkXi\incT^P8I !a@c@hH @retargx\?XI|c@6 F?c@Me@`6 sFfF hHYposQ\(d@xd@ kTPd@e@k]HS i?Me@f@ si  j- kkhmfv Ppos|\f@gf@ -Hrc?D f@Yg@ = f Hkh8Pkh ?Yg@%j@y s ~~- y ~ y ~hf Xi?l$h@i@shY~ -Pc`h@(i@: kH  posĬDFi@i@k  posլ   L 2B  $ (j@@$8int  u<UiiU*i7WX{,m ?w 0Ft1M3T 78O0K ?# # x# # # a#( /#0 #8 #@ #H #P T#X o #` N ##h F ?#p ?#t p#x M# [# )# 9#  &{# /# 0# 1# !2# (3-# j5?# =7?#  .# ## |$?# 9  O  / r 0#len 1# 0 2# 5ns 6#  7#  :ns ;#M  >ns ?#  @#  Cns D#  E#  H3  I#j Lwns M# 9 N#  O#  P#  #  $# %# &-# D! '?#  4ptr 5#wZ 8 l 9# 3 :# D! ;?# . +C  -#  .-#< ( &hh '#t (w#F ( +h ,#t -w# ( 0h 1#t 2w# 5op 6# 4 7#  8# M 9# :# ;# " mH >h ?#t @w#ops A#(  B#0opv C#8opc D#@4@ Gh H# 0 I# S J# h K# ! L#t Mw#  Ph Q3#l R#H YR ZCO [hdel \$ ]u ^ _" x U 1 V# n W-#h XO#r `# vc a?#hv b#p0 #op $# 0 %# &# '# (# 3 )#( X& D!'?# 1(# f ) # W *( # 1+H # },i #( J - #0 (. #8 / #@ 0#H 1#P 02#T- ?" " R H -. ?c c N ? " o ?    ?#     + 0-P tu.# /# _ 0# 1# 2# 3?# 4#(A lB #tuC# D#O sP#rQR#) (\ s]#t^w#l 8i sj#rk# s : ER 4  lP O   2   z r{ # | # D!}?# . # . #  #  #(?  R      %,  4| :  z 0~ d 1#lsn2#tm3~ # len4# 5#A 8 tag9# :#op;# > tag?# @# -A# B# C#W F- e   xLL rMRtNw^HQ hdrR, #rowS # ] T #(  U #@-  X1 rY #fdZ1# [#  \# 1]c# ^#( V`L #0 a- #x b # c?# ?QQW] 7?Q i #log$ ##log$ #! @ &lsn'# &(#` +K r,# r -# 9.K# 3/?#s F# B# r#sQ5  F# r# # >#5OB  F# W"# ## ?$# 9%B#HO&( )F# -# 5# ;# A# #G#$ 6J#( GM#, P~ #0 S#8 V~ #@ +Y#H B\#P _#X b#` e#h m#p p#x s~ # Ov# Py# |~ # # # g# ~ # ~ # <# b# # |# ~ # # # # S# # ~ # mΚ# -ϭ#NH  ?# ?#* crc #  -#i # & Okey #val #G+8[p\#b] # ^V# m_V# `V# aV# bV# dV#$ eV#( fV#, g#0&Va8[p\#b] # ^V# m_V# `V# aV# bV# dV#$ eV#( fV#, g#01$$ 6 k #  # #cfgY#C[c  r 6#n ?# # 3?#[(id# # E#pk# t#(j@Fj@KhhxVdVFj@tj@@VlincVh VdUVtj@k@hH @arg!kVXiV\incVTuVk@m@hH @arg!kVXiV\incVT^VP I Vm@o@`:!hH" @!ret:!arg!#xV\?X$Io@% :o@bq@k:Hs:!@h<li=?h&B @7B'Wp@p@a32Bd(p@q@a64GX  %{ Y?bq@t@ aYHbZ@sZ!i_?l&B 37B)`avehbvfd*avnXbvoP   ?t@t@r" hns]`tX% t@w@s!~t~+ -hi?doff-XkP't@[u@itR ~(u@v@itR ~ ?w@Cx@@bsbr" nsXtP+-!hk޿`+ HposV\c?Cx@z@Psbuuu"u; Pu+r Vwstv#iR u3?\#rc?X$z@*#r" P#xsgH g, %?z@{@!s%bX"%P" &H"; &P@!i'?#rc)?l :?{@}@`!s:b" :"- ;P"r ;>@#rcA?h$d|@ Q#i[?l j?}@k~@i!sjb!isji!ssko-m!`#koX wH#posxVT#vyh(}@L~@ ~@#posVP  m ?k~@@ 7!sbu!lsnu"Bur Vw#stv#iR u#rc?l$@*#isi`#ssoX- ?@@"2#s`#rc?lB@$ e@ -  V +L @3B. #  @@$8int  u<UiiU*i7WX{,m ?w 0Ft1M3T 78O0K ?# # x# # # a#( /#0 #8 #@ #H #P T#X o #` N ##h F ?#p ?#t p#x M# [# )# 9#  &{# /# 0# 1# !2# (3-# j5?# =7?#  .# ## |$?# 9  O  / r 0#len 1# 0 2# 5ns 6#  7#  :ns ;#M  >ns ?#  @#  Cns D#  E#  H3  I#j Lwns M# 9 N#  O#  P#  #  $# %# &-# D! '?#  4ptr 5#wZ 8 l 9# 3 :# D! ;?# . +C  -#  .-#< ( &hh '#t (w#F ( +h ,#t -w# ( 0h 1#t 2w# 5op 6# 4 7#  8# M 9# :# ;# " mH >h ?#t @w#ops A#(  B#0opv C#8opc D#@4@ Gh H# 0 I# S J# h K# ! L#t Mw#  Ph Q3#l R#H YR ZCO [hdel \$ ]u ^ _" x U 1 V# n W-#h XO#r `# vc a?#hv b#p0 #op $# 0 %# &# '# (# 3 )#( X& D!'?# 1(# f ) # W *( # 1+H # },i #( J - #0 (. #8 / #@ 0#H 1#P 02#T- ?" " R H -. ?c c N ? " o ?    ?#     + 0-P tu.# /# _ 0# 1# 2# 3?# 4#(A lB #tuC# D#O sP#rQR#) (\ s]#t^w#l 8i sj#rk# s : ER 4  lP O   2   z r{ # | # D!}?# . # . #  #  #(?  R      %,  4| :  z 0~ d 1#lsn2#tm3~ # len4# 5#A 8 tag9# :#op;# > tag?# @# -A# B# C#W F- e   xLL rMRtNw^HQ hdrR, #rowS # ] T #(  U #@-  X1 rY #fdZ1# [#  \# 1]c# ^#( V`L #0 a- #x b # c?# ?QQW] 7?Q i#log$ #! @ &lsn'# &(#` +0 r,# r -# 9.0# 3/?#sm F# B# r#s65  F# r# # >#m5xO'  F# W"# ## ?$# 9%'#-O&( )F# -# 5# ;# A# #G#$ 6J#( GM#, P~ #0 S#8 V~ #@ +Y#H B\#P _#X b#` e#h m#p p#x s~ # Ov# Py# |~ # # # g# ~ # ~ # <# b# # |# ~ # # # # S# # ~ # mΚ# -ϒ#3H  ?# ?#* crc #  -#i #   4key #val #G+8[p\#b]# ^;# m_;# `;# a;# b;# d;#$ e;#( f;#, g#0 ;F8[p\#b]# ^;# m_;# `;# a;# b;# d;#$ e;#( f;#, g#01$$  k #  # #cfg>#C@c g r #n ?# # 3?#@(id# # E#pkg#t#@@0hhx;d;@܂@@;linc;h ;dU;܂@@hȪH @argk;Xi;\inc;T:?@Յ@s:lsn;is<ss= -?XrcC?lkDP!h@  L@posM;LvN`"Q@@crc^H m?Յ@@`smulsnmuBmu r owstuvi}R u ?lrc?h"@@is`ssX /$?T #?@@fss-  r  B@rc?hi?l?@@ 2Hss`rc?l! @ - X P ;  L  `7B!q l@Aintu &-<  A$iUMMU-7O0K-#~#x~#~#~# a~#( /~#0 ~#8 ~#@ ~#H ~#P T~#X o #` N #h F -#p -#t #x [# 4# # #  &# /# 0# 1# !2# (3# j5-# =7# .##|$-#    pB&~#9-#. B# p  n~m( S#w-#n#&###.# Hm &eOgqq4U   3sT#BB#r~#sp5 T#r~##>#5Oa T#W"##B#?$B#9%a#gO&()T#-~#5#;~#A# #GB#$6JB#(GMB#,Pw#0SB#8Vw#@+Y~#HB\~#P_~#X b~#`e~#hm~#pp#xsw#OvB#PyB#|w#B#B#g~#w#w#<#b#B#|B#w#~#B#B#S#B#w#m~#-#mx8 ,"r # -# W-# J-# r  w.?  # :  GH_4Zt !"K#$%e&'H()0**+,-(.!/Q018-@|@ ahb`|@@ c hI-@u@@$ cI h}u@@r c1}r }c2}r }~x}x-@&@ ch-&@v@` cgh-v@@ ch[e@A c[ yopt[y[-y9@@ blnn _<@@ bln ^@@ i32M|@@ i32M|7@ @ i32M{)@1@D dblw{Q@K@j i32M{k@s@ dblw{@@ blnB ]¦@@ dbl[w{@@ i32eM{ڨ@@' i32sM{ϩ@@M dblw{Ǫ@ǫ@s i32M{@@ i32M{@Ϯ@ dblw{@@ dblw{@ʱ@  bln \@@/ bln [@@U i32M{״@׵@{ i32M{@϶@ dblw{=@=@ i32)M{]@]@ i327Mz}@*@ blnE ZJ@@8 i32^Mz?@@^ dbljwz?@@ l|-T ar|-z y|H!|@@@ bln "@@ l- ar-z y!@@ i32Mz"@@ l- ar-z y!@4@ i32Mz".@8@ l- ar-z y!~l@@V l-~ ar-z y~!~G@@ l-~ ar-z ya~!+a~@=@ l-~ ar-z y~!~@@I l-~ ar-z ya~!+a~@@  bln },@~@ l-~ ar-z y~!~"@@ l-} ar-z ya}!+a}@G@^ l-} ar-z y}!}@@ l-} ar-z ya}!+a}@@ l-} ar-z y}!)}@A i32Mz/@@v l -} ar -z y }! }@@ l-} ar-z ya|!+a|"@@ l-| ar-z y|!)|AbAf l'-| ar'-z y'|!'|AA l+-| ar+-z y+a|!++a|"A A l/-| ar/-y y/|!)/|ZF~AAFH bufG c ptrG~ c iH-\ #$WAtA+cW XoptWPW-LW@PWuW rXed!Yh%y-tA;A@ c XfhP-L@Pu! -d!3h%N-;AA pc XK"~P-L@Pu! -d!3h&ABA! ih%m~BA;A`!ihc `vX buf b'bA~%""-;ACA!c" H!#P i#` res$-l(}CA)FA "c} Hopt}@!~P i~h%6-)FAgA"$dst ~src ~!~ i~NArPA l-\ ar-~ yP!HwPAVRA l-D ar-~ y!SAUA4 l- ar-~ ya!+aUA\XA l- ar-~ ya!+a\A^A l-~ ar-~ y~!)~"^AaA l-~ ar-~ y~!)~)gAlA"qc H!P ih%dd-lAlA@#s1d~hs2d~`%p~lAA#[c1p c2p p-!nqP!xq@ i1qh i2q`!r b Hk [ @b[ `b[ bx[ b[ b/[ b@[ b[  b [ @b[ `b$[ b;[ b[ b[ b[ b[  b[ @b[ `bH[ bI[ b[ b[ b[ b`[  b[ @b[ `b5[ b[[ b[ bu[ b[ b[  b[ @b![ `b!L[ b![ b! [ b!f [ b![ b H !I  b! `b!1 b!+ b H! ! " !  b!' ! b!), ! b Hn! !"1^! @b!R7^! b(AAO<$8  uint<UiiUO0Knb##x### a#( /#0 #8 #@ #H #P T#X o #` N #h F b#p b#t p#x F# T# # #  &{# /# 0# 1# !2# (3-# j5b# =7# .##|$b#u  n   p  & #9 b#. #p  L v   m(  1#w b# L#& ## #. # v&m v &COgqq4U   ]  #( b#A b# ) b# b#H b#] C.! P# Nstre fgvhbP# Ib7u [ b5?T[w Ep. 05!}@^ #i#׏#v$؏#^#b# b#$b#(^b#,#b#0b#4b#8b#<$-T?Vb }# i# i# ! -# #!-# !"#( ##0 $b#4 "%b#8 &#@ j#'b#H "(b#L I$)b#P *b#T +b#X O,#` "-{#h z.#p /0b#x *1b#| $3# n4b# V5b# 7 #8AA$r XPC ÆA7AÆAyyn8hyyp`!bAɉA`$ >! ~ ~ ~b~Y 8@!8ha"8%`W ' .#*b\bAA yynIbAA!PbRbSbyyxTbXBA‰AyypPyyibL8E $  ɉAA$ h~ bd: XWP!{"bA֞A %Wl0b\}abXbT<bP^z! H @#n" #  8yyn b-$ b bn!"mm>!8mb ;yA 6tAÝAA+AZAq"CA$$A,`A$JA^A ޝA" < A8~#`$c ~l!d2~"A|A {h8~|AۋA{i8~OAAa $optA(A $optAA $iA AB$str~$idx~ۓAA $i~A=A"$i~͔A A$i~AGA$str}$idx~AFA$i~FAA$i~A5A$i~#~:b~ E " 2 Q%$b֞AA%z&Wh'msg`%?$AAA%&lH'end@($h$ptrX(`[AAA@&K$X&Pb he `)AA&Xph$bAġA' *def$6$%P!%Hl%hc&`9'b\hEġA{A`'^*defEXlEPptrFh+ {AA'*defXptrh!AA (*fhi Wh'@-$bd!X#A(A(K" Wh'@-$bd!Lb(AzA(, W#{\r!SJ!]b\yygH-Ab"ChA6#HߨAANAk0o^̫A{A(.bDAHA$_b@AA!~{bzAkA@)/Wyyg!\y]abSib^bL AA bH@AAbbAA!"bõAAc@bDn@-$AøA![^,pl{kAtA)Wl@#n{Sr!o\yygpPAVAvo],{tAJA*.#{LW@!bSyygXr!\oS)JA0A`**cbJ!^Wr!SyygHAAab\!]y\+0A A*'##iHW@yygX+>- A'A +x-XW-Pyyg/h M'AͿA+WMXyygOh!:"\ͿAA+\iX \bTW\Hb^h+ixA6A@,j*bxXWxPyygzh)!6AA,*bXiPWH#blyyg`+AA-%*bXWPyygh+& AA`-vXWPyygh+AA-WXyygh)"ALA .)WX!!bdyyghAJA"b`!#,LAbA.,X ,^PW,Hb.h!QbAA.QhWQ`!7^AA@/]^H$^bDW^b`PbufaXnb^`icbl)P|AA/!|b\W|Pyyg~hA?A!^`)_!AA0WXyygh)A(A`0P*msghW`-g(AAA0WXyygh-BbAAA 1WXyygh-bAAl1"WXyygh- iAA1hWXyygh-iA9A,2WXyygh-b9ARA2WXyygh-BRAoA2:WXyygh."oAAL3C#XWPyyg h+$AA3"b\WPyygh+  A|A 4- b\W Pyyg"h.x1|AAl4~$1iXW1Pyyg3h.7AA4 7iXW7Pyyg9h-=bAA,5 W=Xyyg?h. #CAA5f Cb\WCPyygEh-*K AA5 WKXyygMh.QA:AL6 ,Q XWQPyygSh!#^b:AA64!P!^4!h!t{bAA 7!@#{~P!{4!~"~~,G bA@Al7!WXyygh!r#b@AaA7"WXyygh!aAA,8c" ^hW`!e$AA8"*ptrh ^`WX+AA8"*ptrhW`% "bAAL9<#'msg׏h&)bd% AA9#'fhiX&x P(Yލh%AA :#&K"X&x P(Yh/dAMAl: $&Yh)MAlA:=$Yh)$lAA,;o$Yh,R"bAA;$WhbA{A;$WX*sP*lbL#)b{A2AL<8%W)X*s)T#52AA<%*src5X 5-Pdst6h( %c .%0b% AB % % !%% CB % .& !:& DB % !C9& DB % .N& 79Nd&  EB >& 9y& #Y& `EB i& 9& 7Tb& EB &#m& EB i& 9& 22"w' EB &x!'  FB &#6' `FB >& wK' ;"sa' IB ;' v' "}'  JB f' ' Y'  NB ' w' D' NB ''  OB ' w( #(( OB (C( QB ($buf %c11 1"C%A8AbIuint< 3^ #%AA =}ph1}%}keylen7h1SlcShptr`endHn7\i7P AjA:_i7X A A]k1SD 4AA_i7T S   E%SAkAl=hST%SP6%SLk1 S`n 7d%SkAA=u%S\keyPlen7Xh1 Sl% Sh$(A8A,>key(Hlen(7D%(S@out(h1*S\%*SXptr+hend,`-%S&8AAJint  u<&-^U47 7-& &e#-p#&B#& ;#&! #  { DIR$ & !C @ &llsn'#&(#` +r,*#r -#9.#3/4#C&-8AqA>d-hr-*dl%4qA)A>Gd4XA'Ai:4lG&E4)AAL?dEXtopFP&FHlsnF@VNh&W4AsA? _aWX_bWPaX hbY `C&_4sAA @d_}r _}dirch AdepgPdeh}rci4dtopi4}ANAextq}lsnX$&4Ans ?W#  @W#  C6ns DW#  EW#  HQ  IW#j Lns MW# 9 NW#  OW#  PW#  #  $W# %# &-# D! '?#  4ptr 5#Z 82 l 92# 3 :W# D! ;?# < ( &]h '#t (#F ( +h ,#t -# ( 0h 1#t 2# 5op 6A# 4 7W#  8# M 9W# :W# ;#  mH >th ?#t @#ops A#(  BW#0opv Ct#8opc DW#@4@ Gh H6# 0 I# S JW# h K# ! LW#t M#  Ph QQ#l R#H YG Z8O []del \$ ]zu ^ _ x U 1 V# n W-#h Xm#r `# vc a?#hv b#p0 #op $W# 0 %W# &W# '# (# 3 )W#( X & D! '?# 1 (# f )# W * # 1 += # } ,^ #( J -y #0 ( . #8  / #@ 0#H  1W#P 0 2W#T-?  G = -# ?X X C ?y  d ?     %  4| :  z 0; d 1W#lsn2b#tm3; # len4W# 5W#A 8x tag9L# :b#op;L# > tag?L# @b# -AW# BW# CW#W F e   xL rMGtN^HQN hdrR #rowSB # ] Tx #(  UN #@  X rY #fdZ # [#  \# 1] # ^E #( V` #0 a #x b # c?#?    T W ?E  WN &  #f log$T #&.ARA,A s.Xsx/ hK '6?RAAA s6Xr6 Psx8 hrow: ` 'NAAAG sNX 'P?l'q?AALB sqXqPsxr h'AAB sXsx h ' AA Csh'A4AlC7sh!&?4ALACshc(S&LAA"O$8int  u<UiiU*i7WX{,mO0K ?# # x# # # a#( /#0 #8 #@ #H #P T#X o #` N #h F ?#p ?#t p#x M# [# # #  &{# /# 0# 1# !2# (3-# j5?# =7#  .# # |$?#    .+A  -# .-#w 0Ft1M3T 78 / r 0W#len 1W# 0 2W# 5ns 6W#  7W#  :ns ;W#M  >ns ?W#  @W#  C6ns DW#  EW#  HQ  IW#j Lns MW# 9 NW#  OW#  PW#  #  $W# %# &-# D! '?#  4ptr 5#Z 82 l 92# 3 :W# D! ;?# < ( &]h '#t (#F ( +h ,#t -# ( 0h 1#t 2# 5op 6A# 4 7W#  8# M 9W# :W# ;#  mH >th ?#t @#ops A#(  BW#0opv Ct#8opc DW#@4@ Gh H6# 0 I# S JW# h K# ! LW#t M#  Ph QQ#l R#H YG Z8O []del \$ ]zu ^ _ x U 1 V# n W-#h Xm#r `# vc a?#hv b#p0 #op $W# 0 %W# &W# '# (# 3 )W#( X & D! '?# 1 (# f )# W * # 1 += # } ,^ #( J -y #0 ( . #8  / #@ 0#H  1W#P 0 2W#T-?  G = -# ?X X C ?y  d ?     %  4| :  z 0; d 1W#lsn2b#tm3; # len4W# 5W#A 8x tag9L# :b#op;L# > tag?L# @b# -AW# BW# CW#W F e   xL rMGtN^HQN hdrR #rowSB # ] Tx #(  UN #@  X rY #fdZ # [#  \# 1] # ^E #( V` #0 a #x b # c?#?    T W ?E  WN & #f log$T #(.LAA,D s.Xss/ hK '6?AAD s6Xt6Pss8 hrow: ` (NAADG sNX 'P?l'q?AALE sqXqPssr h'A:AE sXss h ( :ARA Fsh'RApAlF7sh!x(?pAAFsh(AAQ  uint<U$>w 0)37(z>(_AA,Gbuf_X _oPpahcrcbd   z ?*ABAGfcrcÅ\bufP oHph )BA=AGcrcL*@(H)lil*` *\(h*d  ))=AALHK*\K"P(7X)lK*AAHK*lK"`(7ha* b) b(! b4)Y b) bJ) b)* b`)9 bv)q b)0 b@*S&AAIS$8int  u<UiiU7WX{O0 K ?# # x# # # a#( /#0 #8 #@ #H #P T#X o #` N #h F ?#p ?#t p#x M# [# # #  &{# /# 0# 1# !2# (3-# j5?# =7#   .# # |$?# .+0  -# .-#w 0Ft1M3T 78 / r 0F# len 1F# 0 2F#  5 ns 6F#  7F#  : ns ;F# M  > ns ?F#  @F#  C% ns DF#  EF#   H@  IF# j L ns MF# 9 NF#  OF#  PF# #  $F# %# &-# D! '?#  4 ptr 5# Z 8! l 9!# 3 :F# D! ;?#  < ( &L h '# t (# F ( +q h ,# t -# ( 0 h 1# t 2#  5 op 60# 4 7F#  8# M 9F# :F# ;# mH >c h ?# t @# ops A#(  BF#0 opv Cc#8 opc DF#@ 4@ G h H%# 0 I# S JF# h K# ! LF# t M#  P h Q@# l R#H Y6 Z'O [Ldel \q$ ]iu ^ _  x U 1 V# n W-# h X\# r `# vc a?#h v b#p  % 4| :   z  0% d 1F# lsn 2Q# tm 3%# len 4F# 5F#A  8b tag 9;# :Q# op ;;#  > tag ?;# @Q# - AF# BF# CF#W  Fe   x Lr M6t N ^H Q8 hdr R# row S,# ] Tb#(  U8 #@ X r Y# fd Z #  [#  \# 1 ] #  ^/ #( V `#0 a#x b#  c?#?    > F ?/  F8  **a r+# *,#*-ADA I -Xext0h+;?DA~AlI l; he;d*F?~AvAI0 lF X FPGFl_*X?vAA,J lX HbufX @ X  ^h_FXd tF` F\A9Ace?d+?AAJ\ l Hbuf@ F 8 W+\`off-Xrc?l+?A$AJ l XbufP FL 8 @tuh*/ $AALK/ l H 8 @bufď` F\rc?lu+/ A AKh l hF+? A>A L l heۖdR*>AAlLRl }}r}+@$ rc` hA}Abuf R}b+A AL l h!* ? AEA,M l  h"  `# &EAYAM  l& h!+;YAAMi l; XuAAmsg=R &c#*F?AALN lF h5 $b+/ b%&l*B 4WB'F&/+C 8WBy,,AAZV$8int  u<U7+!ww- +(wAAN D!(X ptr)wh ,/wA:A O2 /-h \,3w:AcAlOu ptr3wh 3-` ,7ycAAO sz7yX len8-h szp9y`,@AA,P ptr@whl,%  bh-,AAW$8int  u<U7b( p  T# T# w# ew#if3T 0x4. --- . -=.,a-.j-<- # $# %y# &-# D!'?# 4ptr5#x Z8 l9# 3:# D!;?# .0A APJt0h%.; ApAPyt;hE-YpAALQtYH Y@ Y '[?lg?h6-h-`-jyX AAQet}fmt}3~p~APAlen?~sy~_AAsy~AYAi?~AAull}AlA!ul8}AAElldž}AwAli},?AIA RbufH -@--hdA)A \?`(-IA1AlRctXbufP -H '?l As-'1AARt'Xbuf'P '-Hnum'D ')?l 7AS-DA7A,SlDh-O7AASYlOX iRlZcAASlc~3k~! ptrn~"-AALTlXtP '?l-y`U.ABZ$4int  u<U*e7,muw 0B3P / r0# len1# 02#5& ns6# 7# :@ ns;#M >h ns?# @# C nsD# E# H I#jL nsM# 9N#  O# P#  #4 $# %# &)# D!';# 4O ptr5O#Z8 l9# 3:# D!;;# 4.+  -s# .)#< ( & h '# t (#F ( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6# 4 7#  8# M 9# :# ;#  lmH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*4@ GZ h H# 0 I# S J# h K# ! L# t M#  P h Q# l RU# H Y ZO [del \$ ]u ^Z _ x U$ 1 V# n W)# h X# r `# vc a;#h v b$#p0 # op $# 0 %# &# '# (U# 3 )#( X &? D! ';# 1 (_# f )# W *# 1 +# } ,#( J -#0 ( .#8  /)#@ 0s#H  1#P 0 2#TYY)?Y$;eYY);Y*;Y;YO)Y? #Z    + 0 - tu .O#  /# _ 0# 1# 2#  3;#  4#( A l B# tu CO#  D#U O' s PY# r Q#) ( \L s ]Y# t ^#l 8 iq s jY# r k*#  s: E 4 Zl O  L2 ' z9 r {/#  |q# D! };# . O # . a #  a # #(;I I 9 a I U @/,I AAT i,I h.:;ANB U i:I Xip; hZ.bNBBlU ibI Xipc h yI BBUe iyI XtyOPip hF.;B|B,V iI Xil h/|BBV iI Xil hI BBV1 iI XlPil h.;BBLW} iI Xir} hrc;dLY.BBW iI Xir} hl I BJB X iI XsYPir} h.;JBBlXV iI XirV hrc;dw.BBX iI XirV hI B~B,Y iI XsYPirV h}/ ;~BBY4 i I Xis 4 hrc;d'g/B)BYx iI Xis4 h ) +I )BBLZ i+I Xs+YPis34 h!Y/ABBZ iAI h .U;BB [.iUI h!N/dBKBl[_idI h"m.vI KBB[ivI XtvOP#9vL$ 'x;l!/BB]$4int  u<U*e7,muw 0B3P / r0# len1# 02#5& ns6# 7# :@ ns;#M >h ns?# @# C nsD# E# H I#jL nsM# 9N#  O# P#  #4 $# %# &)# D!';# 4O ptr5O#Z8 l9# 3:# D!;;# 4.+  -s# .)#< ( & h '# t (#F ( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6# 4 7#  8# M 9# :# ;#  lmH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*4@ GZ h H# 0 I# S J# h K# ! L# t M#  P h Q# l RU# H Y ZO [del \$ ]u ^Z _ x U$ 1 V# n W)# h X# r `# vc a;#h v b$#p0 # op $# 0 %# &# '# (U# 3 )#( X &? D! ';# 1 (_# f )# W *# 1 +# } ,#( J -#0 ( .#8  /)#@ 0s#H  1#P 0 2#TYY)?Y$;eYY);Y*;Y;YO)Y06BB,\~s6YX06Told8l/FYByB\sFYh!0\yBB\s\Yhq"0Be B_$4int  u<U*e7,mu3P #$# %# &)#D!';# 4 ptr5#Z8Nl9N#3:#D!;;#  /r0# len1#02#R0!  s 0# op$#0%# &# '# (#3)#( s0/BBL]E r/Eh C0:BB]z r:Eh^0K;B& B ^L rKE rcvK ptrKshdrMT P\bufPphA di`0 Bm0Lt@10& B Bl^ ptrX bufP Hsrchoff`s; Be B^\ rE bufÀ ) off\hdrbh>0)Xptrh@rc;d)Tsl $71h B{Bb$4int  u<U*e7,muw 0B3P /r0# len1#02#5 ns6#7# :5 ns;#M >] ns?#@# C nsD#E# HI#jL nsM#9N# O#P#  #)$# %# &)#D!';# 4D ptr5D#Z8l9#3:#D!;;# ).+ -s#.)# 1 $  s < ( & h '# t (#F ( +% h ,# t -# ( 0J h 15# t 2# 5 op 6#4 7# 8#M 9# :# ;#  lmH > h ?]# t @# ops A#( B#0 opv C#8 opc D#@J4@ Gz h H#0 I#S J# h K#! L# t M#  P h Q# l RJ#H Y ZO [del \%$ ]u ^z _ x UD1 V#n W)# h X# r `# vc a;#h v bD#p02h B B,_yr2yh0? BB_r?yh1wBBB_rwyhbufw` w)X< };BBBL`cr}yXrcv}Pptr}sH lbuf`F ;BB`ryXrcvPptrsH lbuf` ;B|B a7ryXrcvðPptrsH DZlbufȀ`4;|BBlaryHrcv@ptrs lbuf` _B;\;B?Baryrcvptrs \buf P = Bi&l3&Loff'h j,d,H -`tu6DWBB /0;DmE;?BB,b rEyrcvEptrEs K\bufLP WBiRlRLksSh1bDpp`B*B  UV;H.B Boprz; 1;B2Bbp ryhrcv`ptrsXhdrp P(12BBb ptr XbufP! Hsrchoff `s  ;B{BLc rybuf! )off hdrp >0)Xptr @rc;dB&B1p h)"s lO%1|B="Beint  u<Un7n3E1&0|BY!Bcbuf&|h  &` 1KY!B!B d!bufKhh  Kd 1\0!B="Bld  \l&f2=3@"B /Bf$8  uint<UiiUKcb##x### a#( /#0 #8 #@ #H #P T#X o #` N #h F b#p b#t p#x F# T# # #  &{# /# 0# 1# !2# (3-# j5b# =7# .##|$b#j  c   b7 b 3( jkey!b#"b#3##)2$#]2%#92&# 3( 73*key+b#arg,#3.u30@"B*Bd0~0~20~21~&3z%B3)B3)Ba"Bu#B33X34-P"BF#B3>Hu#B*B3I@3J3K$B (BP3V)2W;$B\%B.2Z2[&B&B13}P33~(B )B13~ j /2-*B+B,e2XkeybT2ٴh3-`2-+Bu+Be2XkeybTargH2h3-`>2u+B+Be2XkeybTi-H2h3-+B,BLfs2HkeybD32-I2X3h2`S2 ,B,Bf2 h42,B /B g2~optX23x3,B.B3 3!W)2) .B.B926H.B.Bp8@    "% : ; I$ > $ >   I&II !I/  : ;  : ; I8  : ;  (  : ;  : ; I8 !I.: ; ' I@B : ; I : ; I .: ; ' I@B 4: ; I 4: ;I .: ;' @B : ;I .? : ;' @B 4: ;I .? : ;I@B  .? : ;' I@B : ;I .? : ; ' @B  !.? : ; ' I@B "4: ; I % $ > $ >   I&I: ; I&  : ;  : ; I8 : ; I8  : ;   : ; ( .? : ; ' @B : ; I .? : ; ' I@B .? : ; ' I@B 4: ; I  : ; 4: ; I % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ;  : ; (  : ; I8 .? : ; ' I@B : ; I 4: ; I 4: ; I % : ; I$ > $ >   I&I : ;  : ; I8  : ;  : ; I8 I !I : ; ( .: ; ' I@B : ; I : ; I .: ; ' I@B 4: ; I 4: ;I .: ;' I@B : ;I : ;I 4: ;I  : ;.: ;' @B .? : ; ' I@B .? : ; ' @B  4: ; I ! U" U#!I/ % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ : ; I8 !I : ; ( .: ; ' I@B : ; I : ; I .: ; ' I@B 4: ; I 4: ;I &I.: ;' I@B : ;I : ;I 4: ;I  : ;.? : ; ' I@B    4: ; I % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ;  : ; !I.: ; ' I@B : ; I : ; I .: ; ' I@B 4: ; I 4: ;I .: ;' I@B !: ;I ": ;I #4: ;I $ : ;%.? : ; ' I@B &4I4  ' ( ) U* U+4: ; I ,!I/-.? : ;' I@B .4: ; I? < % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ;  : ; !I.: ; ' I@B : ; I : ; I .: ; ' I@B 4: ; I .? : ; ' I@B  4: ; I ! : ; " #!I/% $ > $ > : ; I I  : ;  : ; I8 : ;I8 : ; I !I/  : ; (  : ;  : ; I : ;  : ;  : ; : ;: ;I.: ; ' I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .: ; ' I@B .: ;' I@B : ;I : ;I   4: ;I !4: ;I " #!I/$.: ;' @B %.? : ;' I@B &.? : ;I@B ' : ;(.: ;' @B ).? : ;' @B % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I : ; (  : ;  : ; I : ;  : ;  : ; I: ;I : ; : ;I : ;.: ;' I@B : ;I  : ; 4: ;I 4: ;I   .: ;' @B !.? : ;' I@B " U# U$4: ; I %.: ; ' I@B &: ; I ': ; I (4: ; I ).: ;' @B *: ;I +.? : ;' @B ,.: ;' I@B -.? : ;' I@B ..? : ;' @B /.: ; ' @B 0!I/14: ; I? < % $ > $ > : ; I.? : ; ' @B : ; I : ; I 4: ; I    I & &I.? : ;' I@B : ;I : ;I 4: ;I .? : ;' I@B 4: ;I .? : ;' @B  % $ > $ > : ; I I& : ;  : ; I8 I !I/ : ; I <  : ; (  : ;  : ; I8 .? : ; ' @B : ; I : ; I .? : ; ' @B  4: ; I .: ; ' I@B 4: ; I .: ; ' I@B &I.? : ; ' I@B  : ; .? : ; ' I@B .? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?  % : ; I$ > $ >   II!I/  : ;  : ; I8 : ;I8 : ; : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;.? : ; ' I@B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I  4: ;I .? : ;' @B  : ;I !.? : ;' I@B ": ;I #.? : ;' I@B $4: ;I %4: ; I? < &4: ; I?  '&I% : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I% $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I& : ; I8 .? : ; ' I@B : ; I 4: ; I  : ;    U.? : ; ' I@B : ; I .? : ;' @B : ;I 4: ;I 4: ;I 4: ; I? <  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgmhash.htc_main.cstddef.htypes.hstdarg.hstdint.hprscfg.htarantool_box_cfg.htc_key.htc_hash.htc_options.htc_space.h 7@g=.M=2Z5YtM=YJv6g/2T9=t=6I5Mt/(K/2/g'DK2gD23[6(0G*x JuyYL+ $f<uܯugD׻u'v0Y3/S}.g=.M=2.Z5YtM=Y.Jv6g/2.T9=t=6I5Mt/(K/2/g'DK2gD23[6((G*x JuyYL+ $f<uܯugD׻u'v0Y3/S|.1'-vZ!gu!L0!gu!L#Y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/x86_64-linux-gnu/systc_options.cgopt.htarantool_box_cfg.htypes.htc_options.h N@6Y01KY2/X[Y1ɼɼ0g /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgtc_config.cstddef.htypes.htypes.hstdio.hlibio.htarantool_box_cfg.htc_options.h 4P@+uuuu1gu/gu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgmhash.htc_space.cstddef.htypes.hstdint.htarantool_box_cfg.htc_key.htc_hash.htc_options.htc_space.h Q@3g=.M=2Z5YtM=YJv6g/2T9=t]=K* 1G5&uu)\(C! =y=6I5M~t.=uY1Y5J hu/6IvzJu/6IvzJ c vuuYK0YɃK2KvKvKuY2/׼"%gɟu/uyJ#&Y1/Ku=Ku=vvYguY1u/tugqJ$Yu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includemhash.htc_file.cstddef.htypes.hstdint.hstdio.hlibio.htc_key.htc_hash.htc_space.h ^@,3g=?.M=Y.Jv6g/2.T9=t]=K* 1G5&uu)\(C! =}te>iuY6*zJDuY6*vzJ <{͙ KuuY5YgwwJ .w#u=uuu&v2'Zuu#uZ&uYu#sXYu#vsXbJ/ػK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgmhash.htc_generate.cstddef.htypes.htypes.hstdint.hstdio.hlibio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htnt_log.htnt_xlog.htnt_snapshot.htnt_dir.htarantool_box_cfg.htc_key.htc_hash.htc_options.htc_space.h (j@3g=.M=2.Z5YtM=Y.Jv6g/2.T9=t]=K* 1G5&uu)\(C! =}tv"nX0f#[%K1@p J=3=K"dXhff##ff%%ע(Ppt w22ɟu/sa6'1gYguɟɟgZYgZ_נ]iiotDA& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgmhash.htc_verify.cstddef.htypes.htypes.hstdint.hstdio.hlibio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htnt_log.htnt_snapshot.htnt_dir.htarantool_box_cfg.htc_key.htc_hash.htc_options.htc_space.h @3g=.M=2.Z5Y~tvs"uuuu\Ƀuu\Ƀv"YYw12ɟuu/sgzJ6vgu3vYg;eJ"w*1gYءuY\IftXiXD # /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitstarantool_box_cfg.cstdint.hstddef.htypes.hstdio.hlibio.hprscfg.htarantool_box_cfg.h @/utztttY1vɭɻ׭1vK!!KKKKuKK׭KY11Y1KuY1KuY.ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu$..Kvɟu$..Kvɟu$..vɟu. ɟhɟu$..Kvɟu. ɟhɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu. ɟɟu$..uɟu$..ɟu. ɟɟu$..uɟu$..uɟu.YJX<gɟu. ɟɟu. ɟ#ɟusLsLsLsLsLsLsLsLhZɟusLsLsLsLsLsLsLsLhZɟu$..uɟu$..uɟu. ɟɟu#(.YJX<gɟu$..uɟu$..uɟusLsLsLsLsLsLsLsLhZɟu$..ɟu. ɟɟu.YJX<gןt  . t 7 t7%Zɟ.t  . - P tC>5YYsLsLsLsLsLsLsLsLh74ɟ.t  . - P tC>5YY$..67ɟ.t  . - P tC>5YY$..67ן1  . 6 Y I&JA5Y?   1  a ^&JFZɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcWchSVZJXK<Wɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcWsLsLsLsLsLsLsLsL\Yן4"  . 6 \ L&JA5YV&  1 : ~ n&JcWa   S $  &JhZɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcW|*  S A  &J}$..~ɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcW|*  S A  &J}y|JXK<ywtX0YvYfNUTuzYw؄YhZ'Z'Z'Z'Z'Z'Z'Z'Z't0'tX.@@@@@@@@@@#P3/1gtttuttu%1gtttuttu%.tuYK1?" Xuɻ=u==tX!+ Xuɻ===tX!u====)====*)==2==*+ Xuɻ=u Xuɻ=u Xuɻ= Xuɻ= Xuɻ=u Xuɻ===tX!"==-,==#==#==-2==#"==#5JXu=u==-"==-3==tX!,==tX!2==#"==#+==-2JXu=+==#+==#"==tX!)==#<==-=JXu=2 <'==&-!"==:"==:"+>>CXu>=,===D!,BU"==h6UZXuU=6"(z.[" y.[$0Y2vKY/&K'KYBK&B@K=K>KYYKK&TKKYWKKh>UI'<>'1=YE+YtBYUr>h'3.JXK.JXK===Y=Y.JX.JX.JX.JX.JX.JXK.X.tX./.X.tX./.X.tX./!gt  . t 7 t7%Y*t  . ) L t?:NPOO,15t  - t Q tQ?YDt  - ) f tYTGJLXKGGFKOt  G  q nYYd  G 5  |&JqadfXKaaw  ae GT 0-Y//0=Z+Y>ABYUXTz UA=l>*&`#'03tuttX0w/1/=3+=!$!,g!",!53$=2g$<ugu"g$5u"u:g%g$2$3<5u"u+g$5%3u+u2,guDg$Mg%5YH,F3FCY<v=Y^^sBUwBK\+:&eI+,@#7<fwY ] /usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/x86_64-linux-gnu/sysy.tab.cprscfg.yprscfg_scan.cprscfg.lstddef.htypes.hstdio.hlibio.hprscfg.hprscfg.cy.tab.htypes.h A情*u=Y'*uqf@ u#.tɣftX>hhu0(qJ4gʭu/hxYwX tY.2u",.,.׳vuuuuz6[KIZ_ !ihXBgf!j=3gPvg0NX9 !(  #uf[X$W![X[5t/X5t/[X$W![X8X8[<XfX<XZX<XWX!X[<Xu_<X+<Xa,uu<XZ4\<X+<Xa892("[<<YW[<<YW[X<<W!X<<W!\!0[<X.1.1. . w4"f"$VL}X f?Q#//Y׭# kig\z.vl. x!hKfZ!lrX 4g{X u{.< u{. << =yjX=1ɽ/r+Y1Yu=ɻ=xuiK1hu=w1/廻~z1vYuvgwo1Y"u=.󻻻ZZu=.󻻻,0H;K1/h000#n1h=ugv1h=ugv.j沭׻u@+؅>!0g $"LhjyX_Zu/Y./Y./YZu/YY׮Z]׮Z$1/Y1/YZ1/Y+ZZZuצ)ZZ#YZZ!ZY\X $% ; "iK]\# "g X-\*Z2vX<<< Y /ɰ;4"J["4\XM?g@&v`.%w%5ff 5 f <  X Vw$uu#v3P#-1)=˄v.X=u0Y #rJ/|؃Y"0g %#JXY[+DžM/#==.?'׻u@X/{X!&$n 1$9%! .1Ku&hK5XgʭhxJ 6=0Xg5󃯲Xgo  .󃯽!&$=˻l 5#X>׻w 4vՅ"׻[v"'1 .?uLMKu0K . .5guJ%uK1\&81&5u4v4v444u5555 .11u131 .uwx .y1Y2/X#gg/Y.1D/1o.Y1Y0Z1Y0Z1Y22 .1=/Y,v.Yw!Y,u&Yw>uvgK! /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/includePMurHash.cstdint.h A/-?YF8X2M-?!4ؑg"i=B!g!4YɃ 'K+3 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_dir.ctypes.hstdint.hdirent.htnt_dir.hdirent.h 8A,0u/G2uXg-vguY0/u.tY0gYs>u[*'&.j@   /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_log.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_log.h A,uuKuuKuKuY1gY4uu('0/1>ugx/guF  (w @[KuY+M13iwr.g/3jH=sվu0ttY1ugugv!0g1Y2ك"#uuh00"gK#uYJN0=10.HgI,vv; /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_mem.cstddef.htnt_mem.h A'uK0K0g0=uuK0KCI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_tuple.cstddef.hstdarg.hstdint.htnt_tuple.hctype.h A/Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h A+uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h B6= .uYhuuYK .H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h B.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h h B2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> w> v w w w v w w w v w w w vwwwvwwwnvnowopwpswsvwwwBvBCwCDwDGwGvwwwevefwwwvww"w"KvKLwLMwMPwPqvqrwrswsvwvDvDEwEFwFIwIvwwwvww!w!svstwwwwvwxwxywy|w|vwwwpvpqwqrwruwuvwww!v!"w"#w#&w&qvqrwrswsvwvvwwwvwwwvwwwovopwpqwqtwt6v67w78w8;w;vwww=v=>w>?w?BwBvwwwvwww$v$%w%&w&)w)vwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwww(v()w)*w*-w-vwwwvwwwvwwwbvbcwcdwdgwgvwwwvwww v  w  w  w a,va,b,wb,c,wc,f,wf,R3vR3S3wS3T3wT3W3wW3[4v[4\4w\4]4w]4`4w`415v1525w2535w3565w657v77w77w77w77v77w77w77w79v99w99w99w99v99w99w99w9n:vn:o:wo:p:wp:s:ws:;v;;w;;w;";w";;v;;w;;w;;w;<v<<w<<w<<w<=v==w==w==w=>v>>w>>w>>w>3@v3@4@w4@5@w5@8@w8@IAvIAJAwJAKAwKANAwNA{Av{A|Aw|A}Aw}AAwAfBvfBgBwgBhBwhBkBwkBoCvoCpCwpCqCwqCtCwtCCvCCwCCwCCwCDvDDwDDwD(Dv(D)Dw)D*Dw*D-Dw-DDvDDwDDwDDwDDvDDwDDwDDwDEvEEwEEwE Ew E Ev E!Ew!E"Ew"E%Ew%E9Ev9E:Ew:E;Ew;E>Ew>EVEvVEWEwWEXEwXE[Ew[EwEvwExEwxEyEwyE|Ew|EEvEEwEEwEEwEcFvcFdFwdFeFweFhFwhFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFGwG!Gv!G"Gw"G#Gw#G&Gw&GGvGGwGGwGGwGHvHHwHHwHHwH'Iv'I(Iw(I)Iw)I,Iw,IHJvHJIJwIJJJwJJMJwMJfJvfJgJwgJhJwhJkJwkJJvJJwJJwJJwJJvJJwJJwJJwJJvJJwJJwJJwJiKviKjKwjKkKwkKnKwnKKvKKwKKwKKwK4Lv4L5Lw5L6Lw6L9Lw9LSLvSLTLwTLULwULXLwXLmLvmLnLwnLoLwoLrLwrLLvLLwLLwLLwLbMvbMcMwcMdMwdMgMwgMNvNNwNNwNNwNvNvvNwNwwwCvCDwDEwEHwHvwww$v$%w%&w&)w)vwww8v89w9:w:=w=vwwwvwww:v:;w;<w<?w?vwwwvwwwvwwwAvABwBCwCFwFvwwwvwwwvwwwvwwwvww w #v#$w$%w%(w(;v;<wwwAvABwBCwCFwFvwwwvwwwvwwwvwwwvww w #v#$w$%w%(w(;v;<www_v_`w`awadwdvwwwvwwwvwww>v>?www{v{|w|}w}wvwwwvwwwvwwwvwww[v[\w\]w]`w`vww"w"BvBCwCDwDGwGuvuvwvwwwzwzvwwwB vB C wC D wD G wG | v| } w} ~ w~ w v w w w  v  w  w  w " v" # www*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvwww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  www|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwvwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vwwwvwwwuvuvwvwwwzwzvwwwvwwwvwww4 v4 5 w5 6 w6 9 w9 v w w w E vE F wF G wG J wJ _ v_ ` w` a wa d wd v w x   s s5 ef a7E\    9= y .symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N @V@I ^o+@+ko-@-pz .@ .`.@. x3@x33@3`7@7/B/ /B/) YBY`bB`b%Bbbbbbbb1 b`a 0P).5s@(C iO04Zlge &(s3P1% ez@@<@`@@@+@-@ .@ .@ x3@ 3@ 7@/B/BYB`bBBbbbbbbbb !" b 07@. `7@A 7@Wbfb 7@b/B| 7@. 8@ 9@ :@$ KB@.% yB@&/ C@> E@$HUbjbbbb b0b@b`b(b'1B|2 Q@ 2Q@. `Q@ eR@A .T@e V@$O W@Z [@l2B|2 ^@O ^@ ^@./ &_@v !a@e@3B|O (j@ Fj@.% tj@&/ k@v m@e@7B 37B  t@ w@% Cx@ z@  {@| }@X1 k~@F`7B|O @ @.% ܂@&Rf @xs @9 &@P v@G@b`bbb&b8bPba by@b`bbbbbb b @b"`b=bLb]bwbb b@b`bbb b4bJbd b}@b`bbbbb b- b0C`b0]b0zb0 bHbHbH@b` b`0 @< AVGc PcY Atf CAqb zb %cABCBDB!DB! EB8`EBEB8EBEB3 FB3`FB8 A A  ɉA%  AAe  AF$  MA<  lAR  ֞ABa  Aq  A){  A  ġA  A  AG  A IBx  JB  NBL NB  OB OB8 QB8 %c  Av'  'AC  A6P  2A]X  JA`  {Ah  Ar  A7  kA   tA  zA  6A  A   Ai  A    )A  AW) 4  ABB  RAfS b  LABt  Af  b  AZ b b b b b" b8 bN bd  BAv  =AF   DA:  ~A  vAP  A  A  A3 b &c  b, 8  AK V  A}d  Ax  NBO  Bf  |B!  B  B*  JB  B*  ~B  B*6CO & Bj\j BB} B B |B  B ?B 2BjB bb)ȓb6b?bRb^bt Av *BE /B @A! @"B B) N@  lAY1 Յ@C Me@SP Z@` A"q ,B LA b b B A f@( A66 /G@@ @N KBXj~ 8A9 B >@I BUb e=@ :A( 1A9 A`? )BP I@] IAk A @W 7Ax N@4 ADb 9A A }<@ F@q"6 AG/BMa A#n A AD tA B$ |B "]@ u@x- bq@:S4WBf |@ y H@ ;A B ?@ )FA   bA2" (AR / oA!BV A|d B s O@. +B\ A A# A ,Bk A6 A$ AK!6 A%H^} Q>@ L@h A@h qA AAb A@ A%9 AKbX t@nh| ;A A AK Av A  >A A4 $AD S {A^s o@h X@ Y!B8WB/B H@I  A A10 |A"@ ByI sA~V BAN#r A&6@ /B 0A ͿA B;+b7 lA7I A$W W@:e @q pA A'c h B$ 7@ @ A  YA~ A:' Ab; RAQ`6@f ^@t L@ :A)b A% A A Yg@ M@ pA A B A B kAJ' yBB7 @+G u+BPR Z@|a A&p EA  +B !BK A J@ c@ A gAf(: ByH AQ Bbw B7 RA :[@g A  0O@ aA Ak& B$7 BqG[q A+ 4P@ <@q Ad x3@ cA_ 4A BC A :A A)(AbU ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include "tc_key.h" #include "tc_hash.h" #include "tc_options.h" #include "tc_space.h" int tc_space_init(struct tc_spaces *s) { s->t = mh_u32ptr_new(); if (s->t == NULL) return -1; return 0; } void tc_space_free(struct tc_spaces *s) { while (mh_size(s->t) > 0) { mh_int_t i = mh_first(s->t); struct tc_space *space = mh_u32ptr_node(s->t, i)->val; mh_u32ptr_del(s->t, i, NULL); mh_int_t pos = 0; while (pos != mh_end(space->hash_log)) { if (mh_exist((space->hash_log), pos)) { struct tc_key *k = *mh_pk_node(space->hash_log, pos); free(k); } pos++; } pos = 0; while (pos != mh_end(space->hash_snap)) { if (mh_exist((space->hash_snap), pos)) { struct tc_key *k = *mh_pk_node(space->hash_snap, pos); free(k); } pos++; } mh_pk_delete(space->hash_log); mh_pk_delete(space->hash_snap); free(space->pk.fields); free(space); } mh_u32ptr_delete(s->t); } struct tc_space *tc_space_create(struct tc_spaces *s, uint32_t id) { struct tc_space *space = malloc(sizeof(struct tc_space)); if (space == NULL) return NULL; memset(space, 0, sizeof(struct tc_space)); space->id = id; space->hash_log = mh_pk_new(); space->hash_snap = mh_pk_new(); const struct mh_u32ptr_node_t node = { .key = space->id, .val = space }; mh_u32ptr_put(s->t, &node, NULL, space); return space; } struct tc_space *tc_space_match(struct tc_spaces *s, uint32_t id) { const struct mh_u32ptr_node_t node = { .key = id }; mh_int_t k = mh_u32ptr_get(s->t, &node, NULL); struct tc_space *space = NULL; if (k != mh_end(s->t)) space = mh_u32ptr_node(s->t, k)->val; return space; } enum tc_space_key_type tc_space_key_typeof(char *name) { if (strcmp(name, "NUM") == 0) return TC_SPACE_KEY_NUM; else if (strcmp(name, "NUM64") == 0) return TC_SPACE_KEY_NUM64; else if (strcmp(name, "STR") == 0) return TC_SPACE_KEY_STRING; return TC_SPACE_KEY_UNKNOWN; } static int tc_space_key_init(struct tc_space *s, tarantool_cfg_space *cs) { struct tarantool_cfg_space_index *primary = cs->index[0]; /* calculate primary key part count */ while (primary->key_field[s->pk.count]) { tarantool_cfg_space_index_key_field *ck = primary->key_field[s->pk.count]; if (ck->fieldno == -1) break; s->pk.count++; } /* allocate key fields */ size_t size = sizeof(struct tc_space_key_field) * s->pk.count; s->pk.fields = malloc(size); if (s->pk.fields == NULL) { printf("can't allocate key fields\n"); return -1; } memset(s->pk.fields, 0, size); /* init key fields */ int kn = 0; while (primary->key_field[kn]) { struct tc_space_key_field *k = &s->pk.fields[kn]; tarantool_cfg_space_index_key_field *ck = primary->key_field[kn]; if (ck->fieldno == -1) break; k->n = ck->fieldno; k->type = tc_space_key_typeof(ck->type); kn++; } return 0; } int tc_space_fillof(struct tc_spaces *s, int n, tarantool_cfg_space *cs) { struct tc_space *space = tc_space_match(s, n); if (space) { printf("space %i is already defined\n", n); return -1; } space = tc_space_create(s, n); if (space == NULL) { printf("failed to create space %d\n", n); return -1; } if (cs->index[0] == NULL) { printf("primary index is not defined\n"); return -1; } memset(&space->pk, 0, sizeof(space->pk)); int rc = tc_space_key_init(space, cs); if (rc == -1) return -1; return 0; } int tc_space_fill(struct tc_spaces *s, struct tc_options *opts) { int i = 0; for (; opts->cfg.space[i]; i++) { tarantool_cfg_space *cs = opts->cfg.space[i]; if (!CNF_STRUCT_DEFINED(cs) || !cs->enabled) continue; int rc = tc_space_fillof(s, i, cs); if (rc == -1) return -1; } return 0; } tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_space.h0000664000000000000000000000141112231715257021275 0ustar rootroot#ifndef TC_SPACE_H_INCLUDED #define TC_SPACE_H_INCLUDED enum tc_space_key_type { TC_SPACE_KEY_UNKNOWN = -1, TC_SPACE_KEY_NUM = 0, TC_SPACE_KEY_NUM64, TC_SPACE_KEY_STRING }; struct tc_space_key_field { enum tc_space_key_type type; int n; }; struct tc_space_key { struct tc_space_key_field *fields; int count; }; struct tc_space { uint32_t id; struct mh_pk_t *hash_log; struct mh_pk_t *hash_snap; struct tc_space_key pk; }; struct tc_spaces { struct mh_u32ptr_t *t; }; int tc_space_init(struct tc_spaces *s); void tc_space_free(struct tc_spaces *s); struct tc_space *tc_space_create(struct tc_spaces *s, uint32_t id); struct tc_space *tc_space_match(struct tc_spaces *s, uint32_t id); int tc_space_fill(struct tc_spaces *s, struct tc_options *opts); #endif tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_options.h0000664000000000000000000000076512202131537021677 0ustar rootroot#ifndef TC_OPTIONS_H_INCLUDED #define TC_OPTIONS_H_INCLUDED enum tc_options_mode { TC_MODE_USAGE, TC_MODE_VERSION, TC_MODE_GENERATE, TC_MODE_VERIFY }; struct tc_options { enum tc_options_mode mode; const char *file; const char *file_config; struct tarantool_cfg cfg; }; void tc_options_init(struct tc_options *opts); void tc_options_free(struct tc_options *opts); enum tc_options_mode tc_options_process(struct tc_options *opts, int argc, char **argv); int tc_options_usage(void); #endif tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_config.h0000664000000000000000000000016012202131537021436 0ustar rootroot#ifndef TC_CONFIG_H_INCLUDED #define TC_CONFIG_H_INCLUDED int tc_config_load(struct tc_options *opts); #endif tarantool-1.5.1.218.g1a69fd6/client/tarancheck/CMakeLists.txt0000664000000000000000000000172212202131537022077 0ustar rootrootproject(tnt_checksum) set (util_checksum "tarancheck") set (util_checksum_sources tc_main.c tc_options.c tc_config.c tc_space.c tc_file.c tc_generate.c tc_verify.c) set (util_checksum_libs tntrpl tntnet tnt gopt) set_source_files_properties(${CMAKE_SOURCE_DIR}/cfg/tarantool_box_cfg.c ${CMAKE_SOURCE_DIR}/cfg/prscfg.c PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter" GENERATED True) set_source_files_properties(${util_checksum_sources} PROPERTIES OBJECT_DEPENDS ${CMAKE_SOURCE_DIR}/cfg/tarantool_box_cfg.h) list(APPEND util_checksum_sources ${CMAKE_SOURCE_DIR}/cfg/tarantool_box_cfg.c ${CMAKE_SOURCE_DIR}/cfg/prscfg.c) list(APPEND util_checksum_sources ${CMAKE_SOURCE_DIR}/third_party/PMurHash.c) set_source_files_compile_flags( ${util_checksum_sources}) add_executable(${util_checksum} ${util_checksum_sources}) target_link_libraries (${util_checksum} ${util_checksum_libs}) install (TARGETS ${util_checksum} DESTINATION bin) tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_file.c0000664000000000000000000001245412202131537021114 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "tc_key.h" #include "tc_hash.h" #include "tc_options.h" #include "tc_config.h" #include "tc_space.h" #include "tc_file.h" struct tc_file_header { uint32_t magic; uint32_t version; uint64_t last_xlog_lsn; uint64_t last_snap_lsn; uint32_t spaces; uint32_t data_offset; }; struct tc_file_header_space { uint32_t space; uint64_t count_log; uint64_t count_snap; uint32_t data_offset; }; int tc_file_save_space(struct tc_space *s, FILE *f) { struct tc_file_header_space h = { .space = s->id, .count_log = s->hash_log->size, .count_snap = s->hash_snap->size, .data_offset = 0 }; fwrite(&h, sizeof(struct tc_file_header_space), 1, f); mh_int_t pos = 0; while (pos != mh_end(s->hash_log)) { if (mh_exist((s->hash_log), pos)) { const struct tc_key *k = *mh_pk_node(s->hash_log, pos); if (fwrite((char*)k, sizeof(struct tc_key) + k->size, 1, f) != 1) return -1; } pos++; } pos = 0; while (pos != mh_end(s->hash_snap)) { if (mh_exist((s->hash_snap), pos)) { const struct tc_key *k = *mh_pk_node(s->hash_snap, pos); if (fwrite((char*)k, sizeof(struct tc_key) + k->size, 1, f) != 1) return -1; } pos++; } return 0; } #define TC_FILE_MAGIC 0x123456 int tc_file_save(struct tc_spaces *s, uint64_t last_snap_lsn, uint64_t last_xlog_lsn, char *file) { struct tc_file_header h = { .magic = TC_FILE_MAGIC, .version = 1, .last_xlog_lsn = last_xlog_lsn, .last_snap_lsn = last_snap_lsn, .spaces = s->t->size, .data_offset = 0 }; FILE *f = fopen(file, "w+"); if (f == NULL) return -1; fwrite(&h, sizeof(struct tc_file_header), 1, f); mh_int_t pos = 0; while (pos != mh_end(s->t)) { if (mh_exist((s->t), pos)) { struct tc_space *space = mh_u32ptr_node(s->t, pos)->val; int rc = tc_file_save_space(space, f); if (rc == -1) { fclose(f); return -1; } } pos++; } fclose(f); return 0; } struct tc_key *tc_file_load_key(FILE *f) { struct tc_key kh; if (fread(&kh, sizeof(struct tc_key), 1, f) != 1) return NULL; struct tc_key *k = malloc(sizeof(struct tc_key) + kh.size); if (k == NULL) return NULL; memcpy(k, &kh, sizeof(struct tc_key)); if (fread((char*)k + sizeof(struct tc_key), kh.size, 1, f) != 1) { free(k); return NULL; } return k; } int tc_file_load(struct tc_spaces *s, char *file, uint64_t *last_xlog_lsn, uint64_t *last_snap_lsn) { struct tc_file_header h; memset(&h, 0, sizeof(h)); FILE *f = fopen(file, "r"); if (f == NULL) return -1; if (fread(&h, sizeof(struct tc_file_header), 1, f) != 1) { fclose(f); return -1; } if (h.magic != TC_FILE_MAGIC) { fclose(f); return -1; } int i = 0; for (; i < h.spaces; i++) { struct tc_file_header_space sh; if (fread(&sh, sizeof(struct tc_file_header_space), 1, f) != 1) { fclose(f); return -1; } struct tc_space *space = tc_space_match(s, sh.space); if (space == NULL) { fclose(f); return -1; } uint64_t c = 0; while (c < sh.count_log) { struct tc_key *k = tc_file_load_key(f); if (k == NULL) { fclose(f); return -1; } const struct tc_key *node = k; mh_int_t pos = mh_pk_put(space->hash_log, &node, NULL, space); if (pos == mh_end(space->hash_log)) { fclose(f); return -1; } c++; } c = 0; while (c < sh.count_snap) { struct tc_key *k = tc_file_load_key(f); if (k == NULL) { fclose(f); return -1; } const struct tc_key *node = k; mh_int_t pos = mh_pk_put(space->hash_snap, &node, NULL, space); if (pos == mh_end(space->hash_log)) { fclose(f); return -1; } c++; } } *last_xlog_lsn = h.last_xlog_lsn; *last_snap_lsn = h.last_snap_lsn; fclose(f); return 0; } tarantool-1.5.1.218.g1a69fd6/client/tarancheck/Makefile0000664000000000000000000004421212213333034020776 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarancheck/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarancheck/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarancheck/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarancheck/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarancheck/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. client/tarancheck/CMakeFiles/tarancheck.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarancheck/CMakeFiles/tarancheck.dir/rule .PHONY : client/tarancheck/CMakeFiles/tarancheck.dir/rule # Convenience name for target. tarancheck: client/tarancheck/CMakeFiles/tarancheck.dir/rule .PHONY : tarancheck # fast build rule for target. tarancheck/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/build .PHONY : tarancheck/fast __/__/cfg/prscfg.o: __/__/cfg/prscfg.c.o .PHONY : __/__/cfg/prscfg.o # target to build an object file __/__/cfg/prscfg.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/cfg/prscfg.c.o .PHONY : __/__/cfg/prscfg.c.o __/__/cfg/prscfg.i: __/__/cfg/prscfg.c.i .PHONY : __/__/cfg/prscfg.i # target to preprocess a source file __/__/cfg/prscfg.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/cfg/prscfg.c.i .PHONY : __/__/cfg/prscfg.c.i __/__/cfg/prscfg.s: __/__/cfg/prscfg.c.s .PHONY : __/__/cfg/prscfg.s # target to generate assembly for a file __/__/cfg/prscfg.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/cfg/prscfg.c.s .PHONY : __/__/cfg/prscfg.c.s __/__/cfg/tarantool_box_cfg.o: __/__/cfg/tarantool_box_cfg.c.o .PHONY : __/__/cfg/tarantool_box_cfg.o # target to build an object file __/__/cfg/tarantool_box_cfg.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/cfg/tarantool_box_cfg.c.o .PHONY : __/__/cfg/tarantool_box_cfg.c.o __/__/cfg/tarantool_box_cfg.i: __/__/cfg/tarantool_box_cfg.c.i .PHONY : __/__/cfg/tarantool_box_cfg.i # target to preprocess a source file __/__/cfg/tarantool_box_cfg.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/cfg/tarantool_box_cfg.c.i .PHONY : __/__/cfg/tarantool_box_cfg.c.i __/__/cfg/tarantool_box_cfg.s: __/__/cfg/tarantool_box_cfg.c.s .PHONY : __/__/cfg/tarantool_box_cfg.s # target to generate assembly for a file __/__/cfg/tarantool_box_cfg.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/cfg/tarantool_box_cfg.c.s .PHONY : __/__/cfg/tarantool_box_cfg.c.s __/__/third_party/PMurHash.o: __/__/third_party/PMurHash.c.o .PHONY : __/__/third_party/PMurHash.o # target to build an object file __/__/third_party/PMurHash.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/third_party/PMurHash.c.o .PHONY : __/__/third_party/PMurHash.c.o __/__/third_party/PMurHash.i: __/__/third_party/PMurHash.c.i .PHONY : __/__/third_party/PMurHash.i # target to preprocess a source file __/__/third_party/PMurHash.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/third_party/PMurHash.c.i .PHONY : __/__/third_party/PMurHash.c.i __/__/third_party/PMurHash.s: __/__/third_party/PMurHash.c.s .PHONY : __/__/third_party/PMurHash.s # target to generate assembly for a file __/__/third_party/PMurHash.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/__/__/third_party/PMurHash.c.s .PHONY : __/__/third_party/PMurHash.c.s tc_config.o: tc_config.c.o .PHONY : tc_config.o # target to build an object file tc_config.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_config.c.o .PHONY : tc_config.c.o tc_config.i: tc_config.c.i .PHONY : tc_config.i # target to preprocess a source file tc_config.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_config.c.i .PHONY : tc_config.c.i tc_config.s: tc_config.c.s .PHONY : tc_config.s # target to generate assembly for a file tc_config.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_config.c.s .PHONY : tc_config.c.s tc_file.o: tc_file.c.o .PHONY : tc_file.o # target to build an object file tc_file.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_file.c.o .PHONY : tc_file.c.o tc_file.i: tc_file.c.i .PHONY : tc_file.i # target to preprocess a source file tc_file.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_file.c.i .PHONY : tc_file.c.i tc_file.s: tc_file.c.s .PHONY : tc_file.s # target to generate assembly for a file tc_file.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_file.c.s .PHONY : tc_file.c.s tc_generate.o: tc_generate.c.o .PHONY : tc_generate.o # target to build an object file tc_generate.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_generate.c.o .PHONY : tc_generate.c.o tc_generate.i: tc_generate.c.i .PHONY : tc_generate.i # target to preprocess a source file tc_generate.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_generate.c.i .PHONY : tc_generate.c.i tc_generate.s: tc_generate.c.s .PHONY : tc_generate.s # target to generate assembly for a file tc_generate.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_generate.c.s .PHONY : tc_generate.c.s tc_main.o: tc_main.c.o .PHONY : tc_main.o # target to build an object file tc_main.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_main.c.o .PHONY : tc_main.c.o tc_main.i: tc_main.c.i .PHONY : tc_main.i # target to preprocess a source file tc_main.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_main.c.i .PHONY : tc_main.c.i tc_main.s: tc_main.c.s .PHONY : tc_main.s # target to generate assembly for a file tc_main.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_main.c.s .PHONY : tc_main.c.s tc_options.o: tc_options.c.o .PHONY : tc_options.o # target to build an object file tc_options.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_options.c.o .PHONY : tc_options.c.o tc_options.i: tc_options.c.i .PHONY : tc_options.i # target to preprocess a source file tc_options.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_options.c.i .PHONY : tc_options.c.i tc_options.s: tc_options.c.s .PHONY : tc_options.s # target to generate assembly for a file tc_options.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_options.c.s .PHONY : tc_options.c.s tc_space.o: tc_space.c.o .PHONY : tc_space.o # target to build an object file tc_space.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_space.c.o .PHONY : tc_space.c.o tc_space.i: tc_space.c.i .PHONY : tc_space.i # target to preprocess a source file tc_space.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_space.c.i .PHONY : tc_space.c.i tc_space.s: tc_space.c.s .PHONY : tc_space.s # target to generate assembly for a file tc_space.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_space.c.s .PHONY : tc_space.c.s tc_verify.o: tc_verify.c.o .PHONY : tc_verify.o # target to build an object file tc_verify.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_verify.c.o .PHONY : tc_verify.c.o tc_verify.i: tc_verify.c.i .PHONY : tc_verify.i # target to preprocess a source file tc_verify.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_verify.c.i .PHONY : tc_verify.c.i tc_verify.s: tc_verify.c.s .PHONY : tc_verify.s # target to generate assembly for a file tc_verify.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/tc_verify.c.s .PHONY : tc_verify.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... tarancheck" @echo "... __/__/cfg/prscfg.o" @echo "... __/__/cfg/prscfg.i" @echo "... __/__/cfg/prscfg.s" @echo "... __/__/cfg/tarantool_box_cfg.o" @echo "... __/__/cfg/tarantool_box_cfg.i" @echo "... __/__/cfg/tarantool_box_cfg.s" @echo "... __/__/third_party/PMurHash.o" @echo "... __/__/third_party/PMurHash.i" @echo "... __/__/third_party/PMurHash.s" @echo "... tc_config.o" @echo "... tc_config.i" @echo "... tc_config.s" @echo "... tc_file.o" @echo "... tc_file.i" @echo "... tc_file.s" @echo "... tc_generate.o" @echo "... tc_generate.i" @echo "... tc_generate.s" @echo "... tc_main.o" @echo "... tc_main.i" @echo "... tc_main.s" @echo "... tc_options.o" @echo "... tc_options.i" @echo "... tc_options.s" @echo "... tc_space.o" @echo "... tc_space.i" @echo "... tc_space.s" @echo "... tc_verify.o" @echo "... tc_verify.i" @echo "... tc_verify.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_generate.c0000664000000000000000000003050312231715257021773 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "tc_key.h" #include "tc_hash.h" #include "tc_options.h" #include "tc_config.h" #include "tc_space.h" #include "tc_generate.h" #include "tc_file.h" uint32_t search_hash(const struct tc_key *k, struct tc_space *s) { uint32_t h = 13; int i; for (i = 0; i < s->pk.count; i++) { switch (s->pk.fields[i].type) { case TC_SPACE_KEY_NUM: { assert(TC_KEY_SIZE(k, i) == 4); uint32_t a32 = *(uint32_t *)TC_KEY_DATA(k, i); h = (h << 9) ^ (h >> 23) ^ a32; break; } case TC_SPACE_KEY_NUM64: { uint64_t a64 = *(uint64_t *) (TC_KEY_DATA(k, i)); h = (h << 9) ^ (h >> 23) ^ (uint32_t) (a64); h = (h << 9) ^ (h >> 23) ^ (uint32_t) (a64 >> 32); break; } case TC_SPACE_KEY_STRING: h = PMurHash32(h, TC_KEY_DATA(k, i), TC_KEY_SIZE(k, i)); break; case TC_SPACE_KEY_UNKNOWN: assert(1); break; } } return h; } int search_equal(const struct tc_key *a, const struct tc_key *b, struct tc_space *s) { if (a->size != b->size) return 0; int i; for (i = 0; i < s->pk.count; i++) { switch (s->pk.fields[i].type) { case TC_SPACE_KEY_NUM: { assert(TC_KEY_SIZE(a, i) == 4); assert(TC_KEY_SIZE(b, i) == 4); uint32_t av = *((uint32_t *) TC_KEY_DATA(a, i)); uint32_t bv = *((uint32_t *) TC_KEY_DATA(b, i)); if (av != bv) return 0; break; } case TC_SPACE_KEY_NUM64: { assert(TC_KEY_SIZE(a, i) == 8); assert(TC_KEY_SIZE(b, i) == 8); uint64_t av = *((uint64_t *) TC_KEY_DATA(a, i)); uint64_t bv = *((uint64_t *) TC_KEY_DATA(b, i)); if (av != bv) return 0; break; } case TC_SPACE_KEY_STRING: if (TC_KEY_SIZE(a, i) != TC_KEY_SIZE(b, i)) return 0; if (memcmp(TC_KEY_DATA(a, i), TC_KEY_DATA(b, i), TC_KEY_SIZE(a, i)) != 0) return 0; break; case TC_SPACE_KEY_UNKNOWN: assert(1); break; } } return 1; } static inline int tc_generate_of(struct tnt_request *r, uint32_t *ns, struct tnt_tuple **t) { switch (r->h.type) { case TNT_OP_INSERT: *ns = r->r.insert.h.ns; *t = &r->r.insert.t; return 0; case TNT_OP_UPDATE: *ns = r->r.update.h.ns; *t = &r->r.update.t; return 0; case TNT_OP_DELETE: *ns = r->r.del.h.ns; *t = &r->r.del.t; return 0; } return -1; } struct tc_key* tc_generate_key(struct tc_space *s, struct tnt_tuple *t) { size_t size = 0; /* calculate total key size */ int i; for (i = 0; i < s->pk.count; i++) { struct tnt_iter it; tnt_iter(&it, t); if (tnt_field(&it, t, s->pk.fields[i].n) == NULL) return NULL; if (it.status != TNT_ITER_OK) return NULL; size += TNT_IFIELD_SIZE(&it); } /* allocate key */ size_t off = s->pk.count * sizeof(struct tc_key_field); size = off + size; struct tc_key *k = malloc(sizeof(struct tc_key) + size); if (k == NULL) return NULL; k->size = size; k->crc = 0; /* initialize key */ for (i = 0; i < s->pk.count; i++) { struct tnt_iter it; tnt_iter(&it, t); if (tnt_field(&it, t, s->pk.fields[i].n) == NULL) { free(k); tnt_iter_free(&it); return NULL; } if (it.status != TNT_ITER_OK) { free(k); tnt_iter_free(&it); return NULL; } k->i[i].size = TNT_IFIELD_SIZE(&it); k->i[i].offset = off; memcpy((char*)k + sizeof(struct tc_key) + off, TNT_IFIELD_DATA(&it), TNT_IFIELD_SIZE(&it)); off += TNT_IFIELD_SIZE(&it); tnt_iter_free(&it); } return k; } static int tc_generate_entry(struct tc_spaces *s, struct tnt_request *r) { /* 1. match space */ uint32_t ns = 0; struct tnt_tuple *t = NULL; if (tc_generate_of(r, &ns, &t) == -1) { printf("bad xlog operation %d\n", r->h.type); return -1; } struct tc_space *space = tc_space_match(s, ns); if (space == NULL) { printf("space %d is not defined\n", ns); return -1; } /* 2. create key */ struct tc_key *k = tc_generate_key(space, t); if (k == NULL) { printf("failed to create key\n"); return -1; } /* 3. put into hash */ const struct tc_key *node = k; mh_int_t pos = mh_pk_put(space->hash_log, &node, NULL, space); if (pos == mh_end(space->hash_log)) { free(k); return -1; } return 0; } static int tc_generate_xlog(struct tc_spaces *s, char *wal_dir, uint64_t file_lsn, uint64_t start, uint64_t *last) { char path[1024]; snprintf(path, sizeof(path), "%s/%020llu.xlog", wal_dir, (unsigned long long) file_lsn); printf("(xlog) %020llu.xlog\r", (unsigned long long) file_lsn); fflush(stdout); struct tnt_stream st; tnt_xlog(&st); if (tnt_xlog_open(&st, path) == -1) { printf("failed to open xlog file\n"); tnt_stream_free(&st); return -1; } struct tnt_iter i; tnt_iter_request(&i, &st); int count = 0; int rc = 0; while (tnt_next(&i)) { struct tnt_request *r = TNT_IREQUEST_PTR(&i); struct tnt_stream_xlog *xs = TNT_SXLOG_CAST(TNT_IREQUEST_STREAM(&i)); if (xs->log.current.hdr.lsn > *last) *last = xs->log.current.hdr.lsn; if (xs->log.current.hdr.lsn <= start) continue; rc = tc_generate_entry(s, r); if (rc == -1) goto done; if (count % 10000 == 0) { printf("(xlog) %020llu.xlog %.3fM processed\r", (unsigned long long) file_lsn, (float)count / 1000000); fflush(stdout); } count++; } printf("\n"); if (i.status == TNT_ITER_FAIL) { printf("xlog parsing failed: %s\n", tnt_xlog_strerror(&st)); rc = -1; } done: tnt_iter_free(&i); tnt_stream_free(&st); return rc; } static int tc_generate_waldir_xlog(struct tc_spaces *s, struct tnt_dir *wal_dir, uint64_t snap_lsn, uint64_t *last, int i) { int rc; if (i < wal_dir->count) { rc = tc_generate_xlog(s, wal_dir->path, wal_dir->files[i].lsn, snap_lsn, last); if (rc == -1) return -1; } for (i++; i < wal_dir->count; i++) { rc = tc_generate_xlog(s, wal_dir->path, wal_dir->files[i].lsn, 0, last); if (rc == -1) return -1; } return 0; } static int tc_generate_waldir(struct tc_spaces *s, uint64_t last_snap_lsn, uint64_t *last_xlog_lsn, char *path) { /* get latest existing lsn after snapshot */ struct tnt_dir wal_dir; tnt_dir_init(&wal_dir, TNT_DIR_XLOG); int rc = tnt_dir_scan(&wal_dir, path); if (rc == -1) { printf("failed to open wal directory\n"); tnt_dir_free(&wal_dir); return -1; } /* match xlog file containling latest snapshot lsn record */ if (last_snap_lsn == 1) { rc = tc_generate_waldir_xlog(s, &wal_dir, last_snap_lsn, last_xlog_lsn, 0); if (rc == -1) { tnt_dir_free(&wal_dir); return -1; } goto done; } uint64_t xlog_inc = 0; rc = tnt_dir_match_inc(&wal_dir, last_snap_lsn, &xlog_inc); if (rc == -1) { printf("failed to match xlog with snapshot lsn\n"); tnt_dir_free(&wal_dir); return -1; } /* index all xlog records from xlog file (a:last_snap_lsn) to * latest existing xlog lsn */ int i = 0; while (i < wal_dir.count && wal_dir.files[i].lsn != xlog_inc) i++; rc = tc_generate_waldir_xlog(s, &wal_dir, last_snap_lsn, last_xlog_lsn, i); if (rc == -1) { tnt_dir_free(&wal_dir); return -1; } done: tnt_dir_free(&wal_dir); return 0; } static int tc_generate_snaprow(struct tc_spaces *s, struct tnt_iter_storage *is, struct tnt_stream_snapshot *ss) { struct tc_space *space = tc_space_match(s, ss->log.current.row_snap.space); struct tc_key *k = tc_generate_key(space, &is->t); if (k == NULL) { printf("failed to create key\n"); return -1; } /* foreach snapshot row which does not exist in index dump: * calculate crc and add to the index */ const struct tc_key *node = k; mh_int_t pos = mh_pk_get(space->hash_log, &node, space); const struct tc_key *v = NULL; if (pos != mh_end(space->hash_log)) v = *mh_pk_node(space->hash_log, pos); if (v == NULL) { k->crc = crc32c(0, (unsigned char*)is->t.data, is->t.size); const struct tc_key *node = k; mh_int_t pos = mh_pk_put(space->hash_snap, &node, NULL, space); if (pos == mh_end(space->hash_snap)) { free(k); return -1; } } else { free(k); } return 0; } static int tc_generate_snapshot(struct tc_spaces *s, uint64_t lsn, char *snap_dir) { char path[1024]; snprintf(path, sizeof(path), "%s/%020llu.snap", snap_dir, (unsigned long long) lsn); printf("(snapshot) %020llu.snap\n", (unsigned long long) lsn); struct tnt_stream st; tnt_snapshot(&st); if (tnt_snapshot_open(&st, path) == -1) { printf("failed to open snapshot file\n"); tnt_stream_free(&st); return -1; } struct tnt_iter i; tnt_iter_storage(&i, &st); int rc = 0; while (tnt_next(&i)) { struct tnt_iter_storage *is = TNT_ISTORAGE(&i); struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(TNT_IREQUEST_STREAM(&i)); rc = tc_generate_snaprow(s, is, ss); if (rc == -1) goto done; } if (i.status == TNT_ITER_FAIL) { printf("snapshot parsing failed: %s\n", tnt_snapshot_strerror(&st)); rc = -1; } done: tnt_iter_free(&i); tnt_stream_free(&st); return rc; } int tc_generate(struct tc_options *opts) { printf(">>> Signature file generation\n"); /* 1. create spaces according to a configuration file */ struct tc_spaces s; int rc = tc_space_init(&s); if (rc == -1) return -1; rc = tc_space_fill(&s, opts); if (rc == -1) { tc_space_free(&s); return -1; } printf("configured spaces: %d\n", mh_size(s.t)); printf("snap_dir: %s\n", opts->cfg.snap_dir); printf("wal_dir: %s\n", opts->cfg.wal_dir); /* 2. find newest snapshot lsn */ struct tnt_dir snap_dir; tnt_dir_init(&snap_dir, TNT_DIR_SNAPSHOT); if (opts->cfg.snap_dir == NULL) { printf("snapshot directory is not specified\n"); tc_space_free(&s); return -1; } if (opts->cfg.wal_dir == NULL) { printf("xlog directory is not specified\n"); tc_space_free(&s); return -1; } rc = tnt_dir_scan(&snap_dir, opts->cfg.snap_dir); if (rc == -1) { printf("failed to open snapshot directory\n"); goto error; } uint64_t last_snap_lsn = 0; rc = tnt_dir_match_gt(&snap_dir, &last_snap_lsn); if (rc == -1) { printf("failed to match greatest snapshot lsn\n"); goto error; } printf("last snapshot lsn: %llu\n", (unsigned long long) last_snap_lsn); /* 3. * a. get latest existing lsn after snapshot * b. index all xlogs from newest snapshot lsn to latest xlog lsn */ uint64_t last_xlog_lsn = 0; rc = tc_generate_waldir(&s, last_snap_lsn, &last_xlog_lsn, opts->cfg.wal_dir); if (rc == -1) goto error; printf("last xlog lsn: %llu\n", (unsigned long long) last_xlog_lsn); /* 4. build index on each snapshot row which doesnt not exist in * index dump (2) */ rc = tc_generate_snapshot(&s, last_snap_lsn, opts->cfg.snap_dir); if (rc == -1) goto error; /* 5. save signature file with both 2 and 3 indexes */ printf("(signature) saving %s\n", opts->file); rc = tc_file_save(&s, last_snap_lsn, last_xlog_lsn, (char*)opts->file); if (rc == -1) goto error; tnt_dir_free(&snap_dir); tc_space_free(&s); return 0; error: tnt_dir_free(&snap_dir); tc_space_free(&s); return -1; } tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_main.c0000664000000000000000000000512412202131537021115 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "tc_key.h" #define MH_SOURCE 1 #include "tc_hash.h" #include "tc_options.h" #include "tc_config.h" #include "tc_space.h" #include "tc_generate.h" #include "tc_verify.h" void out_warning(ConfettyError v, char *format, ...) { (void)v; va_list ap; va_start(ap, format); vprintf(format, ap); printf("\n"); va_end(ap); } int main(int argc, char *argv[]) { struct tc_options opts; tc_options_init(&opts); int rc; enum tc_options_mode mode = tc_options_process(&opts, argc, argv); switch (mode) { case TC_MODE_USAGE: return tc_options_usage(); case TC_MODE_VERSION: return 0; case TC_MODE_VERIFY: rc = tc_config_load(&opts); if (rc == -1) return 1; rc = tc_verify(&opts); if (rc == -1) break; break; case TC_MODE_GENERATE: rc = tc_config_load(&opts); if (rc == -1) return 1; rc = tc_generate(&opts); if (rc == -1) break; break; } tc_options_free(&opts); return 0; } tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_hash.h0000664000000000000000000000137112202131537021121 0ustar rootroot#ifndef TC_HASH_H_INCLUDED #define TC_HASH_H_INCLUDED #if !MH_SOURCE #define MH_UNDEF #endif #include #define mh_name _u32ptr struct mh_u32ptr_node_t { uint32_t key; void *val; }; #define mh_node_t struct mh_u32ptr_node_t #define mh_arg_t void * #define mh_hash(a, arg) (a->key) #define mh_eq(a, b, arg) ((a->key) == (b->key)) #include struct tc_space; uint32_t search_hash(const struct tc_key *k, struct tc_space *s); int search_equal(const struct tc_key *a, const struct tc_key *b, struct tc_space *s); #define mh_name _pk #define mh_node_t struct tc_key * #define mh_arg_t struct tc_space * #define mh_hash(a, arg) search_hash(*(a), arg) #define mh_eq(a, b, arg) search_equal(*(a), *(b), arg) #include #endif tarantool-1.5.1.218.g1a69fd6/client/tarancheck/tc_config.c0000664000000000000000000000375312202131537021444 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include "tc_options.h" #include "tc_config.h" int tc_config_load(struct tc_options *opts) { FILE *f = fopen(opts->file_config, "r"); if (f == NULL) { printf("failed to open config file: %s\n", opts->file_config); return -1; } int accepted = 0, skipped = 0, optional = 0; int rc = parse_cfg_file_tarantool_cfg(&opts->cfg, f, 0, &accepted, &skipped, &optional); fclose(f); if (rc == -1) return -1; rc = check_cfg_tarantool_cfg(&opts->cfg); if (rc == -1) return -1; return 0; } tarantool-1.5.1.218.g1a69fd6/client/tarantar/0000775000000000000000000000000012231715276017060 5ustar rootroottarantool-1.5.1.218.g1a69fd6/client/tarantar/cmake_install.cmake0000664000000000000000000000411012213333035022651 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantar" AND NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantar") FILE(RPATH_CHECK FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantar" RPATH "") ENDIF() FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/tarantar") IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantar" AND NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantar") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantar") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/client/tarantar/config.h0000664000000000000000000000016012202131537020461 0ustar rootroot#ifndef TS_CONFIG_H_INCLUDED #define TS_CONFIG_H_INCLUDED int ts_config_load(struct ts_options *opts); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/sha1.c0000664000000000000000000001554512231715276020072 0ustar rootroot /* from valgrind tests */ /* ================ sha1.c ================ */ /* SHA-1 in C By Steve Reid 100% Public Domain Test Vectors (from FIPS PUB 180-1) "abc" A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 A million repetitions of "a" 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F */ /* #define LITTLE_ENDIAN * This should be #define'd already, if true. */ /* #define SHA1HANDSOFF * Copies data before messing with it. */ #define SHA1HANDSOFF #include #include #include /* for u_int*_t */ #include "sha1.h" #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* blk0() and blk() perform the initial expand. */ /* I got the idea of expanding during the round function from SSLeay */ #define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ #define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); /* Hash a single 512-bit block. This is the core of the algorithm. */ void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) { uint32_t a, b, c, d, e; typedef union { unsigned char c[64]; uint32_t l[16]; } CHAR64LONG16; #ifdef SHA1HANDSOFF CHAR64LONG16 block[1]; /* use array to appear as a pointer */ memcpy(block, buffer, 64); #else /* The following had better never be used because it causes the * pointer-to-const buffer to be cast into a pointer to non-const. * And the result is written through. I threw a "const" in, hoping * this will cause a diagnostic. */ CHAR64LONG16* block = (const CHAR64LONG16*)buffer; #endif /* Copy context->state[] to working vars */ a = state[0]; b = state[1]; c = state[2]; d = state[3]; e = state[4]; /* 4 rounds of 20 operations each. Loop unrolled. */ R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); /* Add the working vars back into context.state[] */ state[0] += a; state[1] += b; state[2] += c; state[3] += d; state[4] += e; /* Wipe variables */ a = b = c = d = e = 0; #ifdef SHA1HANDSOFF memset(block, '\0', sizeof(block)); #endif } /* SHA1Init - Initialize new context */ void SHA1Init(SHA1_CTX* context) { /* SHA1 initialization constants */ context->state[0] = 0x67452301; context->state[1] = 0xEFCDAB89; context->state[2] = 0x98BADCFE; context->state[3] = 0x10325476; context->state[4] = 0xC3D2E1F0; context->count[0] = context->count[1] = 0; } /* Run your data through this. */ void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len) { uint32_t i, j; j = context->count[0]; if ((context->count[0] += len << 3) < j) context->count[1]++; context->count[1] += (len>>29); j = (j >> 3) & 63; if ((j + len) > 63) { memcpy(&context->buffer[j], data, (i = 64-j)); SHA1Transform(context->state, context->buffer); for ( ; i + 63 < len; i += 64) { SHA1Transform(context->state, &data[i]); } j = 0; } else i = 0; memcpy(&context->buffer[j], &data[i], len - i); } /* Add padding and return the message digest. */ void SHA1Final(unsigned char digest[20], SHA1_CTX* context) { unsigned i; unsigned char finalcount[8]; unsigned char c; #if 0 /* untested "improvement" by DHR */ /* Convert context->count to a sequence of bytes * in finalcount. Second element first, but * big-endian order within element. * But we do it all backwards. */ unsigned char *fcp = &finalcount[8]; for (i = 0; i < 2; i++) { uint32_t t = context->count[i]; int j; for (j = 0; j < 4; t >>= 8, j++) *--fcp = (unsigned char) t; } #else for (i = 0; i < 8; i++) { finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)] >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */ } #endif c = 0200; SHA1Update(context, &c, 1); while ((context->count[0] & 504) != 448) { c = 0000; SHA1Update(context, &c, 1); } SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ for (i = 0; i < 20; i++) { digest[i] = (unsigned char) ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); } /* Wipe variables */ memset(context, '\0', sizeof(*context)); memset(&finalcount, '\0', sizeof(finalcount)); } /* ================ end of sha1.c ================ */ #if 0 #define BUFSIZE 4096 int main(int argc, char **argv) { SHA1_CTX ctx; unsigned char hash[20], buf[BUFSIZE]; int i; for(i=0;i #include #include #include #include #include #include "ref.h" int ts_reftable_init(struct ts_reftable *t) { t->count = 0; t->top = 16; t->r = malloc(sizeof(struct ts_ref) * t->top); if (t == NULL) return -1; return 0; } void ts_reftable_free(struct ts_reftable *t) { if (t->r) { free(t->r); t->r = NULL; } } int ts_reftable_add(struct ts_reftable *t, char *file, int is_snap) { if (t->count == t->top) { t->top *= 2; void *p = realloc(t->r, sizeof(struct ts_ref) * t->top); if (p == NULL) return -1; t->r = p; } int id = t->count; t->r[id].file = strdup(file); t->r[id].is_snap = is_snap; if (t->r[id].file == NULL) return -1; t->count++; return id; } struct ts_ref *ts_reftable_map(struct ts_reftable *t, int id) { assert(id < t->count); return &t->r[id]; } tarantool-1.5.1.218.g1a69fd6/client/tarantar/options.c0000664000000000000000000000657112212057124020716 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include "options.h" static const void *opts_def = gopt_start( gopt_option('c', 0, gopt_shorts('c'), gopt_longs("create"), NULL, "create snapshot file"), gopt_option('i', GOPT_ARG, gopt_shorts('i'), gopt_longs("interval"), " ", "periodically create snapshot"), gopt_option('n', GOPT_ARG, gopt_shorts('n'), gopt_longs("lsn"), " ", "snapshot lsn (latest by default)"), gopt_option('l', GOPT_ARG, gopt_shorts('l'), gopt_longs("limit"), " ", "memory limit (bytes)"), gopt_option('?', 0, gopt_shorts(0), gopt_longs("help"), NULL, "display this help and exit"), gopt_option('v', 0, gopt_shorts('v'), gopt_longs("version"), NULL, "display version information and exit") ); void ts_options_init(struct ts_options *opts) { memset(opts, 0, sizeof(struct ts_options)); init_tarantool_cfg(&opts->cfg); } void ts_options_free(struct ts_options *opts) { destroy_tarantool_cfg(&opts->cfg); } int ts_options_usage(void) { printf("Tarantool xlog compression utility.\n\n"); printf("Usage: tarantar \n"); gopt_help(opts_def); return 1; } enum ts_options_mode ts_options_process(struct ts_options *opts, int argc, char **argv) { void *opt = gopt_sort(&argc, (const char**)argv, opts_def); /* usage */ if (gopt(opt, '?')) { opts->mode = TS_MODE_USAGE; goto done; } /* version */ if (gopt(opt, 'v')) { opts->mode = TS_MODE_VERSION; goto done; } /* lsn */ const char *arg = NULL; if (gopt_arg(opt, 'n', &arg)) { opts->to_lsn = atoll(arg); opts->to_lsn_set = 1; } /* limit */ if (gopt_arg(opt, 'l', &arg)) opts->limit = strtoll(arg, NULL, 10); /* sleep */ if (gopt_arg(opt, 'i', &arg)) opts->interval = atoi(arg); /* generate or verify */ if (gopt(opt, 'c')) { opts->mode = TS_MODE_CREATE; } else { opts->mode = TS_MODE_USAGE; goto done; } opts->file_config = argv[1]; done: gopt_free(opt); return opts->mode; } tarantool-1.5.1.218.g1a69fd6/client/tarantar/ts.h0000664000000000000000000000046312212057124017650 0ustar rootroot#ifndef TS_H_INCLUDED #define TS_H_INCLUDED struct ts { struct ts_options opts; struct ts_spaces s; struct ts_reftable rt; uint64_t last_snap_lsn; uint64_t last_xlog_lsn; int to_lsn_set; uint64_t alloc; uint64_t to_lsn; struct slab_cache sc; struct region ra; }; void ts_oomcheck(void); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/ref.h0000664000000000000000000000061512202131537017775 0ustar rootroot#ifndef TS_REF_H_INCLUDED #define TS_REF_H_INCLUDED struct ts_ref { char *file; int is_snap; }; struct ts_reftable { struct ts_ref *r; int count; int top; }; int ts_reftable_init(struct ts_reftable *t); void ts_reftable_free(struct ts_reftable *t); int ts_reftable_add(struct ts_reftable *t, char *file, int is_snap); struct ts_ref *ts_reftable_map(struct ts_reftable *t, int id); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/main.c0000664000000000000000000001043612231715257020153 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #ifdef __linux__ #include #endif #include #include #include #include #define MH_SOURCE 1 #include "key.h" #include "hash.h" #include "options.h" #include "config.h" #include "space.h" #include "ref.h" #include "ts.h" #include "indexate.h" #include "snapshot.h" struct ts tss; static void ts_init(void) { ts_options_init(&tss.opts); memset(&tss.s, 0, sizeof(tss.s)); memset(&tss.ra, 0, sizeof(tss.ra)); memset(&tss.sc, 0, sizeof(tss.sc)); } static int ts_prepare(void) { int rc = ts_reftable_init(&tss.rt); if (rc == -1) return -1; tss.last_snap_lsn = 0; tss.last_xlog_lsn = 0; slab_cache_create(&tss.sc); region_create(&tss.ra, &tss.sc); return 0; } static void ts_free(void) { ts_reftable_free(&tss.rt); region_free(&tss.ra); slab_cache_destroy(&tss.sc); } static void ts_shutdown(void) { ts_space_free(&tss.s); ts_options_free(&tss.opts); ts_free(); } void ts_oomcheck(void) { #ifdef __linux__ struct mallinfo mi = mallinfo(); if (tss.opts.limit > 0 && mi.uordblks > tss.opts.limit) { printf("\nmemory limit reached (%"PRIu64")\n", tss.opts.limit); exit(2); } return; #else if (tss.opts.limit > 0 && tss.alloc > tss.opts.limit) { printf("\nmemory limit reached (%"PRIu64")\n", tss.opts.limit); exit(2); } #endif } int main(int argc, char *argv[]) { ts_init(); /* parse arguments */ switch (ts_options_process(&tss.opts, argc, argv)) { case TS_MODE_USAGE: ts_options_free(&tss.opts); return ts_options_usage(); case TS_MODE_VERSION: ts_options_free(&tss.opts); return 0; case TS_MODE_CREATE: break; } /* load configuration file */ int rc = ts_config_load(&tss.opts); if (rc == -1) { ts_options_free(&tss.opts); return 1; } if (tss.opts.cfg.snap_dir == NULL) { printf("snap_dir and wal_dir must be defined.\n"); ts_options_free(&tss.opts); return 1; } /* create spaces */ rc = ts_space_init(&tss.s); if (rc == -1) { ts_space_free(&tss.s); ts_options_free(&tss.opts); return 1; } rc = ts_space_fill(&tss.s, &tss.opts); if (rc == -1) { ts_space_free(&tss.s); ts_options_free(&tss.opts); return 1; } printf("snap_dir: %s\n", tss.opts.cfg.snap_dir); printf("wal_dir: %s\n", tss.opts.cfg.wal_dir); printf("spaces: %d\n", mh_size(tss.s.t)); printf("interval: %d\n", tss.opts.interval); printf("memory_limit: %dM\n", (int)(tss.opts.limit / 1024 / 1024)); do { time_t tm = time(NULL); printf("\nSTART SNAPSHOTTING %s\n", ctime(&tm)); rc = ts_prepare(); if (rc == -1) goto done; /* indexate snapshot and xlog data */ rc = ts_indexate(); if (rc == -1) goto done; /* write snapshot */ rc = ts_snapshot_create(); if (rc == -1) goto done; ts_free(); ts_space_recycle(&tss.s); sleep(tss.opts.interval); } while (tss.opts.interval > 0); done: ts_shutdown(); return (rc == -1 ? 1 : 0); } tarantool-1.5.1.218.g1a69fd6/client/tarantar/update.cc0000664000000000000000000000620012202131537020635 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include extern "C" { #include #include #include #include #include "key.h" #include "hash.h" #include "options.h" #include "space.h" #include "sha1.h" #include "ref.h" #include "ts.h" #include "indexate.h" extern struct ts tss; static inline void* _alloc(void *arg, unsigned int size) { (void)arg; return region_alloc(&tss.ra, size); } struct tnt_tuple* ts_update(struct tnt_request *r, struct tnt_tuple *old) { void *buf = NULL; uint32_t new_size = 0; uint32_t new_count = 0; try { struct tuple_update *u = tuple_update_prepare((region_alloc_func)_alloc, NULL, (const char*)(r->r.update.ops), (const char*)(r->r.update.ops + r->r.update.ops_size), (const char*)(old->data + sizeof(uint32_t)), (const char*)(old->data + sizeof(uint32_t) + old->size - sizeof(uint32_t)), old->cardinality, &new_size, &new_count); if (u == NULL) return NULL; buf = tnt_mem_alloc(new_size); if (buf == NULL) { region_reset(&tss.ra); return NULL; } memset(buf, 0, new_size); tuple_update_execute(u, (char*)buf); } catch (const Exception&) { if (buf) free(buf); region_reset(&tss.ra); fflush(NULL); printf("update failed\n"); return NULL; } region_reset(&tss.ra); struct tnt_tuple *n = tnt_tuple_set_as(NULL, buf, new_size, new_count); if (n == NULL) { free(buf); return NULL; } free(buf); return n; } } // extern "C" tarantool-1.5.1.218.g1a69fd6/client/tarantar/indexate.c0000664000000000000000000002316312231715276021032 0ustar rootroot #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "key.h" #include "hash.h" #include "options.h" #include "space.h" #include "sha1.h" #include "ref.h" #include "ts.h" #include "indexate.h" #include "update.h" #include "cursor.h" extern struct ts tss; inline uint32_t search_hash(const struct ts_key *k, struct ts_space *s) { register uint32_t *v = (uint32_t*)k->key; switch (s->key_div) { case 5: return v[0] ^ v[1] ^ v[2] ^ v[3] ^ v[4]; case 4: return v[0] ^ v[1] ^ v[2] ^ v[3]; case 3: return v[0] ^ v[1] ^ v[2]; case 2: return v[0] ^ v[1]; case 1: return v[0]; } return 0; } inline int search_equal(const struct ts_key *a, const struct ts_key *b, struct ts_space *s) { return memcmp(a->key, b->key, s->key_size) == 0; } static int snapshot_process_row(struct ts_spaces *s, int fileid, uint64_t offset, struct tnt_iter_storage *is, struct tnt_stream_snapshot *ss) { struct ts_space *space = ts_space_match(s, ss->log.current.row_snap.space); struct ts_key *k = ts_space_keyalloc(space, &is->t, fileid, offset, 0); if (k == NULL) { printf("failed to create key\n"); return -1; } const struct ts_key *node = k; /* make sure that there is no collisions possible */ assert(mh_pk_get(space->index, &node, space) == mh_end(space->index)); mh_int_t pos = mh_pk_put(space->index, &node, NULL, space); if (pos == mh_end(space->index)) { ts_space_keyfree(space, k); return -1; } return 0; } static int snapshot_process(void) { char path[1024]; snprintf(path, sizeof(path), "%s/%020llu.snap", tss.opts.cfg.snap_dir, (unsigned long long) tss.last_snap_lsn); int fileid = ts_reftable_add(&tss.rt, path, 1); if (fileid == -1) return -1; struct tnt_stream st; tnt_snapshot(&st); if (tnt_snapshot_open(&st, path) == -1) { printf("failed to open snapshot file\n"); tnt_stream_free(&st); return -1; } struct tnt_iter i; tnt_iter_storage(&i, &st); int rc = 0; int count = 0; while (tnt_next(&i)) { struct tnt_iter_storage *is = TNT_ISTORAGE(&i); struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(TNT_IREQUEST_STREAM(&i)); rc = snapshot_process_row(&tss.s, fileid, ss->log.current_offset, is, ss); if (rc == -1) goto done; if (count % 10000 == 0) { printf("(snapshot) %020llu.snap %.3fM processed\r", (unsigned long long) tss.last_snap_lsn, (float)count / 1000000); fflush(stdout); } count++; } printf("\n"); if (i.status == TNT_ITER_FAIL) { printf("snapshot parsing failed: %s\n", tnt_snapshot_strerror(&st)); rc = -1; } done: tnt_iter_free(&i); tnt_stream_free(&st); return rc; } static inline int snapdir_process(void) { /* open snapshot directory */ struct tnt_dir snap_dir; tnt_dir_init(&snap_dir, TNT_DIR_SNAPSHOT); int rc = tnt_dir_scan(&snap_dir, tss.opts.cfg.snap_dir); if (rc == -1) { printf("failed to open snapshot directory\n"); goto error; } /* find newest snapshot lsn */ rc = tnt_dir_match_gt(&snap_dir, &tss.last_snap_lsn); if (rc == -1) { printf("failed to match greatest snapshot lsn\n"); goto error; } printf("last snapshot lsn: %"PRIu64"\n", tss.last_snap_lsn); /* process snapshot */ rc = snapshot_process(); if (rc == -1) goto error; return 0; error: tnt_dir_free(&snap_dir); return -1; } static int xlog_process_row(struct ts_spaces *s, int fileid, uint64_t offset, struct tnt_request *r) { /* validate operation */ uint32_t ns = 0; struct tnt_tuple *t = NULL; switch (r->h.type) { case TNT_OP_INSERT: ns = r->r.insert.h.ns; t = &r->r.insert.t; break; case TNT_OP_DELETE: ns = r->r.del.h.ns; t = &r->r.del.t; break; case TNT_OP_DELETE_1_3: ns = r->r.del_1_3.h.ns; t = &r->r.del_1_3.t; break; case TNT_OP_UPDATE: ns = r->r.update.h.ns; t = &r->r.update.t; break; default: assert(0); break; } /* match space */ struct ts_space *space = ts_space_match(s, ns); if (space == NULL) { printf("space %d is not defined\n", ns); return -1; } /* create key */ struct ts_key *k = ts_space_keyalloc(space, t, fileid, offset, 0); if (k == NULL) { printf("failed to create key\n"); return -1; } /* place to the index */ const struct ts_key *node = k; mh_int_t pos; switch (r->h.type) { case TNT_OP_INSERT: pos = mh_pk_put(space->index, &node, NULL, space); if (pos == mh_end(space->index)) { ts_space_keyfree(space, k); return -1; } ts_oomcheck(); break; case TNT_OP_DELETE_1_3: case TNT_OP_DELETE: { pos = mh_pk_get(space->index, &node, space); assert(pos != mh_end(space->index)); struct ts_key *key = *mh_pk_node(space->index, pos); mh_pk_del(space->index, pos, space); ts_space_keyfree(space, key); ts_space_keyfree(space, k); break; } case TNT_OP_UPDATE: { /* read old tuple, check index first - it may contain tuple from a * previous update */ pos = mh_pk_get(space->index, &node, space); assert(pos != mh_end(space->index)); struct ts_key *key = *mh_pk_node(space->index, pos); struct tnt_tuple *old = NULL; struct ts_cursor cursor; memset(&cursor, 0, sizeof(cursor)); if (key->flags & TS_KEY_WITH_DATA) { uint32_t size = *(uint32_t*)(key->key + space->key_size); old = tnt_tuple_set(NULL, key->key + space->key_size + sizeof(uint32_t), size); if (old == NULL) { ts_space_keyfree(space, k); return -1; } } else { /* load from file */ if (ts_cursor_open(&cursor, key)) { ts_space_keyfree(space, k); return -1; } old = ts_cursor_tuple(&cursor); } /* remove key tuple from index, due to possibility of the key * being changed by update */ mh_pk_del(space->index, pos, space); ts_space_keyfree(space, k); ts_space_keyfree(space, key); /* free old key */ struct tnt_tuple *n = ts_update(r, old); if (n == NULL) { return -1; } /* free old tuple */ tnt_tuple_free(old); /* close file */ ts_cursor_close(&cursor); /* create new key with new tuple */ k = ts_space_keyalloc(space, n, fileid, offset, 1); if (k == NULL) { printf("failed to create key\n"); tnt_tuple_free(n); return -1; } tnt_tuple_free(n); node = k; pos = mh_pk_put(space->index, &node, NULL, space); if (pos == mh_end(space->index)) { ts_space_keyfree(space, k); return -1; } break; } default: break; } return 0; } static int xlog_process(struct ts_spaces *s, char *wal_dir, uint64_t file_lsn, uint64_t start, uint64_t *last) { char path[1024]; snprintf(path, sizeof(path), "%s/%020llu.xlog", wal_dir, (unsigned long long) file_lsn); int fileid = ts_reftable_add(&tss.rt, path, 0); if (fileid == -1) return -1; struct tnt_stream st; tnt_xlog(&st); if (tnt_xlog_open(&st, path) == -1) { printf("failed to open xlog file\n"); tnt_stream_free(&st); return -1; } struct tnt_iter i; tnt_iter_request(&i, &st); int count = 0; int rc = 0; while (tnt_next(&i)) { struct tnt_request *r = TNT_IREQUEST_PTR(&i); struct tnt_stream_xlog *xs = TNT_SXLOG_CAST(TNT_IREQUEST_STREAM(&i)); if (xs->log.current.hdr.lsn > *last) *last = xs->log.current.hdr.lsn; if (xs->log.current.hdr.lsn <= start) continue; if (tss.opts.to_lsn_set && xs->log.current.hdr.lsn > tss.opts.to_lsn) { rc = 1; goto done; } rc = xlog_process_row(s, fileid, xs->log.current_offset, r); if (rc == -1) goto done; if (count % 10000 == 0) { printf("(xlog) %020llu.xlog %.3fM processed\r", (unsigned long long) file_lsn, (float)count / 1000000); fflush(stdout); } count++; } printf("\n"); if (i.status == TNT_ITER_FAIL) { printf("xlog parsing failed: %s\n", tnt_xlog_strerror(&st)); rc = -1; } done: tnt_iter_free(&i); tnt_stream_free(&st); return rc; } static int waldir_processof(struct ts_spaces *s, struct tnt_dir *wal_dir, int i) { int rc; if (i < wal_dir->count) { rc = xlog_process(s, wal_dir->path, wal_dir->files[i].lsn, tss.last_snap_lsn, &tss.last_xlog_lsn); if (rc == -1 || rc == -1) return rc; } for (i++; i < wal_dir->count; i++) { rc = xlog_process(s, wal_dir->path, wal_dir->files[i].lsn, 0, &tss.last_xlog_lsn); if (rc == -1) return -1; } return rc; } static int waldir_process(void) { /* get latest existing lsn after snapshot */ struct tnt_dir wal_dir; tnt_dir_init(&wal_dir, TNT_DIR_XLOG); int rc = tnt_dir_scan(&wal_dir, tss.opts.cfg.wal_dir); if (rc == -1) { printf("failed to open wal directory\n"); tnt_dir_free(&wal_dir); return -1; } /* match xlog file containling latest snapshot lsn record */ if (tss.last_snap_lsn == 1) { rc = waldir_processof(&tss.s, &wal_dir, 0); if (rc == -1) { tnt_dir_free(&wal_dir); return -1; } goto done; } uint64_t xlog_inc = 0; rc = tnt_dir_match_inc(&wal_dir, tss.last_snap_lsn, &xlog_inc); if (rc == -1) { printf("failed to match xlog with snapshot lsn\n"); tnt_dir_free(&wal_dir); return -1; } /* index all xlog records from xlog file (a:last_snap_lsn) to * latest existing xlog lsn */ int i = 0; while (i < wal_dir.count && wal_dir.files[i].lsn != xlog_inc) i++; rc = waldir_processof(&tss.s, &wal_dir, i); if (rc == -1) { tnt_dir_free(&wal_dir); return -1; } done: tnt_dir_free(&wal_dir); return 0; } int ts_indexate(void) { int rc = snapdir_process(); if (rc == -1) return -1; rc = waldir_process(); if (rc == -1) return -1; return 0; } tarantool-1.5.1.218.g1a69fd6/client/tarantar/snapshot.c0000664000000000000000000001343412231715276021070 0ustar rootroot #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "key.h" #include "hash.h" #include "options.h" #include "space.h" #include "sha1.h" #include "ref.h" #include "ts.h" #include "indexate.h" #include "snapshot.h" extern struct ts tss; static int ts_snapshot_write(FILE *snapshot, uint32_t space, uint64_t lsn, struct tnt_tuple *t) { /* write snapshot row */ if (fwrite(&tnt_log_marker_v11, sizeof(tnt_log_marker_v11), 1, snapshot) != 1) { printf("failed to write row\n"); return -1; } struct { struct tnt_log_header_v11 h; struct tnt_log_row_snap_v11 row; } h = { .h = { .crc32_hdr = 0, .lsn = lsn, .tm = 0.0, .len = sizeof(struct tnt_log_row_snap_v11) + t->size - sizeof(uint32_t), .crc32_data = 0 }, .row = { .tag = 65535, /* snapshot */ .cookie = 0, .space = space, .tuple_size = t->cardinality, .data_size = t->size - sizeof(uint32_t) } }; /* calculate checksum */ h.h.crc32_data = crc32c(0, (unsigned char*)&h.row, sizeof(h.row)); h.h.crc32_data = crc32c(h.h.crc32_data, (unsigned char*)t->data + sizeof(uint32_t), t->size - sizeof(uint32_t)); h.h.crc32_hdr = crc32c(0, (unsigned char*)&h.h, sizeof(h.h)); if (fwrite(&h, sizeof(h), 1, snapshot) != 1) { printf("failed to write row\n"); return -1; } if (fwrite(t->data + sizeof(uint32_t), t->size - sizeof(uint32_t), 1, snapshot) != 1) { printf("failed to write row\n"); return -1; } return 0; } static int ts_snapshot_xfer(FILE *snapshot, struct tnt_log *current, struct ts_ref *r, struct ts_key *k, uint32_t space, uint64_t lsn) { int rc = tnt_log_seek(current, k->offset); if (rc == -1) { printf("failed to seek for: %s:%"PRIu64"\n", r->file, k->offset); return -1; } if (tnt_log_next(current) == NULL) { printf("failed to read: %s:%"PRIu64"\n", r->file, k->offset); return -1; } struct tnt_tuple *t = NULL; if (r->is_snap) { t = ¤t->current_value.t; } else { struct tnt_request *rp = ¤t->current_value.r; switch (rp->h.type) { case TNT_OP_INSERT: t = &rp->r.insert.t; break; case TNT_OP_DELETE_1_3: case TNT_OP_DELETE: /* skip */ //t = &rp->r.del.t; return 0; case TNT_OP_UPDATE: assert(0); break; default: assert(0); break; } } /* write snapshot row */ if (ts_snapshot_write(snapshot, space, lsn, t) != 0) return -1; if (r->is_snap) { tnt_tuple_free(t); } else { tnt_request_free(¤t->current_value.r); } return 0; } int ts_snapshot_create(void) { /* TODO: * * index can be sorted by file:offset to reduce io overhead, but * will have unsorted index on disk. */ unsigned long long snap_lsn = tss.last_xlog_lsn; if (snap_lsn == 0 || tss.last_snap_lsn == snap_lsn) { printf("snapshot exists, skip.\n"); return 0; } char path[1024]; snprintf(path, sizeof(path), "%s/%020llu.snap.inprocess", tss.opts.cfg.snap_dir, (unsigned long long) snap_lsn); FILE *snapshot = fopen(path, "a"); if (snapshot == NULL) { printf("failed to create snapshot: %s\n", path); return -1; } fputs(TNT_LOG_MAGIC_SNAP, snapshot); fputs(TNT_LOG_VERSION, snapshot); fputs("\n", snapshot); char *current_file = NULL; struct tnt_log current; memset(¤t, 0, sizeof(current)); int count = 0; int rc; mh_int_t i; mh_foreach(tss.s.t, i) { struct ts_space *space = mh_u32ptr_node(tss.s.t, i)->val; mh_int_t pos = 0; while (pos != mh_end(space->index)) { if (mh_exist((space->index), pos)) { struct ts_key *k = *mh_pk_node(space->index, pos); struct ts_ref *r = ts_reftable_map(&tss.rt, k->file); if (count % 10000 == 0) { printf("( >> ) %020llu.snap %.3fM processed\r", (unsigned long long) snap_lsn, (float)count / 1000000); fflush(stdout); } count++; /* first, check if key has a data */ if (k->flags & TS_KEY_WITH_DATA) { uint32_t size = *(uint32_t*)(k->key + space->key_size); struct tnt_tuple *t = tnt_tuple_set(NULL, k->key + space->key_size + sizeof(uint32_t), size); if (t == NULL) { printf("failed to allocate tuple\n"); goto error; } rc = ts_snapshot_write(snapshot, space->id, snap_lsn, t); if (rc == -1) goto error; pos++; continue; } /* otherwise, load from snapshot or xlog */ if (current_file != r->file) { tnt_log_close(¤t); rc = tnt_log_open(¤t, r->file, (r->is_snap ? TNT_LOG_SNAPSHOT : TNT_LOG_XLOG)); if (rc == -1) { printf("failed to open file: %s\n", r->file); goto error; } current_file = r->file; } /* transfer from file to snapshot */ rc = ts_snapshot_xfer(snapshot, ¤t, r, k, space->id, snap_lsn); if (rc == -1) goto error; } pos++; } } /* write eof */ if (fwrite(&tnt_log_marker_eof_v11, sizeof(tnt_log_marker_eof_v11), 1, snapshot) != 1) { printf("failed to write row\n"); goto error; } if (fflush(snapshot) != 0) { printf("flush failed\n"); goto error; } if (fsync(fileno(snapshot)) != 0) { printf("sync failed\n"); goto error; } if (fclose(snapshot) != 0) { printf("failed to write row\n"); } char newpath[1024]; strncpy(newpath, path, sizeof(newpath)); char *ext = strrchr(newpath, '.'); *ext = 0; rename(path, newpath); tnt_log_close(¤t); printf("\n"); return 0; error: tnt_log_close(¤t); fclose(snapshot); return -1; } tarantool-1.5.1.218.g1a69fd6/client/tarantar/config.c0000664000000000000000000000405312202131537020461 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include "options.h" #include "config.h" int ts_config_load(struct ts_options *opts) { FILE *f = fopen(opts->file_config, "r"); if (f == NULL) { printf("failed to open config file: %s\n", opts->file_config); return -1; } int accepted = 0, skipped = 0, optional = 0; int rc = parse_cfg_file_tarantool_cfg(&opts->cfg, f, 0, &accepted, &skipped, &optional); fclose(f); if (rc == -1) return -1; rc = check_cfg_tarantool_cfg(&opts->cfg); if (rc == -1) return -1; return 0; } tarantool-1.5.1.218.g1a69fd6/client/tarantar/tarantar0000775000000000000000000174162012213333060020620 0ustar rootrootELF>U@@X6@8@&#@@@@@@@@@r_r_ ``c`c=p  ` `c `c@@DDPtdCC,,Qtd/lib64/ld-linux-x86-64.so.2GNU GNUhj ]iKMwxL (*(1` Fb!$ADB`PI1d8pRH $ĀCA r<BQ dQA `2r@e1E$"@D"@(p*! ((A@ J`  AS PL (  @ ,(F %iTB:5HLNOQTXYZ[]^_`bcefghijlnpqstvxy{~   %&()*-./0124689:;>?ABDFGHJKNQRSTVWXY\^_cefk.ͽmnR9q|r5 zlr NuZQЇ.?R(Kڛh S<(Աɧ{}HSco;wyIk$#3%qĢNUzbe|^J~G+@6Ґ_zP* jߑ 4b) Y6U.VVgoR/':Qo\h+2?bɐxOݬ#`gGHE y`e+8|jm.*56㷡) 8s.h!aCͬKk CH) [ f:=|6V u8'CpLaYU2/Zh땆#>}~7M&ƾGcSz|9JNum,u~C-:3d5}ĸgd8[|!w0B>:5֟hK#E%aC~? Z~qXi:Zr>CAG 2LG?<z{R7~U a:O5*CEjyl2e|]so>߇. YgZ],J7iO^~$CNUn`U?g<[|^mqZ ŝ9A@L'$cq89%KtlSiO!56V;[j |B Bg @R t@q BE!@B(  9BP  BK @  0BZ  $B!  B#!B &" L Bw  B B X]A  rB#| A u!C# " J@1 n@ Y@x  b@`T@ ,B! BC T@!C brB!" @=R B$  TB*  B  @  tBv  B  ^A4 dmB ]B%# s~Bkb  cB) B" L Bw Dm@YcXG rB) B 0 Bpd{ zrBxc5 B%2 %Bb @a #Bn  ݐB)0  >pB*!B(  B; A" J@1 U@X Bv ,B$  @`$" L Bw aBy!@B(  TB 2B cBX  n@5aC! cXF B gB B  u@J @ mBK B<  Br  4tBr dc6 PBv  U@%  @V B  A!cXY Buc qB dBk~ iAY B  w@cJ BC!C(fcQ  ̉Bq" !B&< FB2C3 Br B rB+ Af } B1 Bb B"_ " @ p@" @ ³A7" 6 B  =BBm " D@&cpY!0B ^@H' @Be )B  4gBK  @9 sB# @H oB6p 8B6 !B, @ ߊB   B@." @&  BW" !B=  R@h" !B&  dB @|a  gB:  BC<  BJ  sB$u$B;  ܀@  m@7 KhB @Bp dc\ pB&} " 6 Bk Ba B1  _AC" @=O@T@fc jB~V BU *v@ x@  ˻BL6  P@d AR ) B tAjpP@k!B(f sBd  @`  @{ @q  HBG EB" j@=?" @ BE!(Bq!B" !B= " @F z@h B" B=a j@q ȁ@l 0@ \pB  B v@I |B !Bt @g~R@ @B  `B gB B" f!B&Xc <^B|> @D|" @= B$n B @N  B @p w@  B   +B!B  B Bg nB9 `hB9  ZdB%"  }B$O B BL BJ B xBG" j@=  Bga B " B= Bu@ 6Bv &pB hB BQ  &_AN#X }Bx SB! 6BG " (!B= 2B vBC" @&0 \B  HBG!B  uB} BF `@ w (dc?0dc@8dcA@dcHdcBPdcdXdcC`dcDhdcEpdcFxdcGdcHdcIdcJdcKHH#HtH5#%#@%#h%#h%#h%#h%#h%#h%#h%#hp%#h`%#h P%#h @%#h 0%#h %#h %#h%#h%z#h%r#h%j#h%b#h%Z#h%R#h%J#h%B#hp%:#h`%2#hP%*#h@%"#h0%#h %#h% #h%#h%#h %#h!%#h"%#h#%#h$%#h%%#h&%#h'p%#h(`%#h)P%#h*@%#h+0%#h, %#h-%#h.%#h/%z#h0%r#h1%j#h2%b#h3%Z#h4%R#h5%J#h6%B#h7p%:#h8`%2#h9P%*#h:@%"#h;0%#h< %#h=% #h>%#h?%#h@%#hA%#hB%#hC%#hD%#hE%#hF%#hGp%#hH`%#hIP%#hJ@%#hK01I^HHPTI BHBH@7cUH-cHHw]øHt]ccUH-cHHHH?HHHu]úHt]c=H#uUH~]H#@H=P #tHtU`cH]{vUHHpH}HuHEHHUHPHUHPHUHPHUHP HUHP(HUHP0HUH@8HEHEEHE@EHE@EHE@ EHE@EEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEE‹E‹EyZEEEU1#E3UEE% ȉEċE‹E‹EyZEEEU1#E3UEE% ȉEȋE‹E‹EyZEEEU1#E3UEE% ȉE̋E‹E‹EyZEEEU1#E3UEE% ȉEЋE‹E‹EyZEEEU1#E3UEE% ȉEԋE‹E‹EyZEEEU1#E3UEE% ȉE؋E‹E‹EyZEEEU1#E3UEE% ȉE܋E‹E‹EyZEEEU1#E3UMԋE1E1E1EE‹E‹EyZEEEU1#E3UM؋E1E1E1EE‹E‹EyZEEEU1#E3UM܋E1E1E1EE‹E‹EyZEEEU1#E3UME1E1E1EE‹E‹EyZEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EċE‹E‹EnEEEU1Љ3UME1E1E1EȋE‹E‹EnEEEU1Љ3UME1E1E1E̋E‹E‹EnEEEU1Љ3UMċE1E1E1EЋE‹E‹EnEEEU1Љ3UMȋE1E1E1EԋE‹E‹EnEEEU1Љ3UM̋E1E1E1E؋E‹E‹EnEEEU1Љ3UMЋE1E1E1E܋E‹E‹EnEEEU1Љ3UMԋE1E1E1EE‹E‹EnEEEU1Љ3UM؋E1E1E1EE‹E‹EnEEEU1Љ3UM܋E1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU1Љ3UME1E1E1EE‹E‹EnEEEU #EUM!ʉ ыUE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EċEčE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EȋEȍE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1E̋E̍E‹E-$CpEEEU #EUM!ʉ ыUċE1‹E1‹E1EЋEЍE‹E-$CpEEEU #EUM!ʉ ыUȋE1‹E1‹E1EԋEԍE‹E-$CpEEEU #EUM!ʉ ыŰE1‹E1‹E1E؋E؍E‹E-$CpEEEU #EUM!ʉ ыUЋE1‹E1‹E1E܋E܍E‹E-$CpEEEU #EUM!ʉ ыUԋE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыU؋E1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыU܋E1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EEE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EċEčE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1EȋEȍE‹E-$CpEEEU #EUM!ʉ ыUE1‹E1‹E1E̋E̍E‹E-$CpEEEU1Љ3UMċE1E1E1EЋE‹E‹E-*>5EEEU1Љ3UMȋE1E1E1EԋE‹E‹E-*>5EEEU1Љ3UM̋E1E1E1E؋E‹E‹E-*>5EEEU1Љ3UMЋE1E1E1E܋E‹E‹E-*>5EEEU1Љ3UMԋE1E1E1EE‹E‹E-*>5EEEU1Љ3UM؋E1E1E1EE‹E‹E-*>5EEEU1Љ3UM܋E1E1E1EE‹E‹E-*>5EEEU1Љ3UME1E1E1EE‹E‹E-*>5EEEU1Љ3UME1E1E1EE‹E‹E-*>5EEEU1Љ3UME1E1E1EE‹E‹E-*>5EEEU1Љ3UME1E1E1EE‹E‹E-*>5EEEU1Љ3UME1E1E1EE‹E‹E-*>5EEEU1Љ3UME1E1E1EE‹E‹E-*>5EEEU1Љ3UME1E1E1EċE‹E‹E-*>5EEEU1Љ3UME1E1E1EȋE‹E‹E-*>5EEEU1Љ3UME1E1E1E̋E‹E‹E-*>5EEEU1Љ3UMċE1E1E1EЋE‹E‹E-*>5EEEU1Љ3UMȋE1E1E1EԋE‹E‹E-*>5EEEU1Љ3UM̋E1E1E1E؋E‹E‹E-*>5EEEU1Љ3UMЋE1E1E1E܋E‹E‹E-*>5EEHEEHEHEHHUH UʉHEHHUH UʉHEH HUH UʉHEHHUH UʉEEEEEEEEEHE@HNUHH}HE#EgHE@HE@ܺHE@ vT2HE@HE@HEPHEP]UHH0H}HuUHE@EHE@UHEPHE@;EsHE@PHEPHE@UHEPE?EE܋UЃ?vy@+EEUEHHHEHHH HEHHUHEHPHEHHUHEHHEHHoE@E?;ErEEEU܉)ȉMHUH4UHJHUHHJ HHUHSH8H}HuE9}HEHcHTEЃӉ؉‹ETE}vE߀HMHEHHTEHMHEHH6HE@%=uHMHEHH E5UHEH4EHEҋEЃӉ؈E}vHE\HHEHH8[]ÐUHH}HEHUHPHEHUH]UHH}HEH@HEHPHEH]UHHH}HEHHEHHUHHH}HuHEHUHHEHHHE@(UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uEJHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!ЅBEEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uE(@d@d@dH*y#HuBS@d}rhdm E}uhdA @dLA@dhdE}uhd @d Hx#Hƿ&B/Hx#Hƿ4BHy#@ƿBBw#ƿPBHw#Hƿ^B>HEHEHHƿqB=E}tB.E}t46E}t&khdeMw#6@w#i}HSÐUHH0H}HEH@ BHHEH}u$HEH@ HƿBEEEHEHx(HuHMHUHEIIHѺHEHEH}u%HEH(HE}uHrUHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uEJHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!ЅBEEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uE1UHHH}HEH(H UH忸B蠰B薰H7"H]UHH0H}uHUH"HMHEHHgHEHE?H HtHE@HEvH HtHE@HEHUHEnH Ht"HEHeHHEHPHE@ HUHElH Ht HE H诲HHEHHUHEiH] HtHEHHUBHEcH HtHE@HEHPHEHP HE@HEHg HE@H茲ÐUHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH8H}HuHUHEHHUHHEHE؋HEUHE؋@HEЃEHEH@UHHЋE!Ѕt3HEHUHHHHEHHUHHtE\HEH@UHHЋE!Ѕu HE؋@HE؋PMEΉE?H8[]UHSH8H}HuHUHEHHUHHYEHE؋HEUHE؋@HEЃEHEHUHHHHEHHUHHtE[HEH@UHHHEH@MHHȋ0E HE؋PMEΉEHEH@UHHЋE!Ѕ1EE~HE؋PMEΉ\EHEH@UHHЋE!Ѕt3HEHHEHUHHHHUHHntEHh[]ÐUHHH}HEHBt HEH臆ÐUHHH}HEHHEH`UHHH}HEHPBHEHt HEH#ÐUHHH}HEHHEHUHHH}HEHPBHEHyt HEH迅ÐUHHH}HEHHEH蘅UHHH}HEHBHEHyt HEH[ÐUHHH}HEHHEH4UHSHHH}HuU܉MLELMHELMLEЋM؋UHuH}H<$HǸQHEHBHEHSHHEHHH5HH[]ÐUHH,H`HhLpLxt )E)M)U)])e)m)u)}H Dž8Dž<0HEH@HPHHH8H HH~ DHzUHHXLH@HH8Lxt )E)M)U)])e)m)u)}L0UHH H}HuUHMqHMUHEHƿ@BĂjUHH}HuHEHEE+HE3E%fcU1ЉEHEH}HmuċE]UH}HuHUHEHE+HE3E%jcU1ЉEHEH}HmuċE]UH}HuЉU؉M̋E̋U؉)EE̋U؉)+EEE/HE3E%ncU1ЉEHEEE;ErE#HE1EHEHE1EHEHE1EHEHE1EHEE%cE%c1ЉEEEE%c3UE%~c1ЉEHEHzc1EHEHEHvc1EHEHEHrc1EHEHEHnc1EHEEE;EE/HE3E%ncU1ЉEHEEE;ErɋE]UHH }HuU}uE'HEƒ)ЉEMUHuEUHH}HuU}wUHMEHΉ9UHMEHΉxÐUHHH}Hupu uHH9tHH9up"u utH@8HH;t muHHP8PuHH@cHHt uHƒH]oHH@HqHHfWf.zfWf.t$}f.wf.kvn"u wtt*H@@f.z f.t DtHHHB@(tHH@cHyHt sHƒH5ntOHH@HuHH@HHt%HHPHHH@HHnt {sHH@HHtHH@HHtlHH@HtHH@HmHHBHHH@H sHH@HHrrHH@ cH=Ht rHƒHltOHH@HuHH@PHt%HHPPHH@HHlt ?rHH@PHtHH@PH8kHH@HtHH@HulHHBPHH@HqHH@PHqqHH@@cHHt ~qHƒHktOHH@HuHH@XHt%HHPXHH@HHkt qHH@XHtHH@XHiHH@HtHH@H9kHHBXHH@HpHH@XH~pypHH@`cHHt BpHƒHjtOHH@HuHH@`Ht%HHP`HH@HHajt oHH@`HtHH@`HhHH@HtHH@HiHHB`HH@HVoHH@`HBo=oHH@cHHt oHƒHEitOHH@HuHH@hHt%HHPhHH@HH%it nHH@hHtHH@hHgHH@HtHH@HhHHBhHH@HnHH@hHnnHH@cHMHt mHƒH htOHH@HuHH@pHt%HHPpHH@HHgt OmHH@pHtHH@pHHfHH@HtHH@HgHHBpHH@HlHH@pHllHH@cHHt lHƒHfHH@ BHdtpHH@BHdtTHH@BHdt8HH@BHdtHH@BHdu EHH@BHjdtpHH@$BHNdtTHH@'BH2dt8HH@/BHdtHH@3BHcuE :kt H@xE9t kUHPxjHH@cHJHt jHƒHeHH@HfHHfWf.zfWf.t$&f.wf.vd"u  jHHHjHH@cHRHt iHƒHdHH@ HcHHucu hiHH9tHH9uc"u ,it"HHH;t iHHhHH@ cH2Ht hHƒHbHH@ HkbHHubu HhHH9tHH9uyb"u  hHHgHH@@cH=Ht gHƒHaHH@HcHHfWf.zfWf.t$f.wf.va"u gHHHfHH@`cHEHt fHƒHaHH@ H~`HHu`u [fHH9tHH9u`"u ft"HHH;t eHHeHH@cH%Ht eHƒH_HH@ H^_HHu_u ;eHH9tHH9ul_"u dt"HHH;t dHHdHH@cHHt dHƒH^HHHtHHHR]HH@HtHH@H^HHHH@HcHHHccHH@cHHt cHƒH]HH@H_HHfWf.zfWf.t$f.wf.vX]"u bHHHbHH@cHHt bHƒH\HH@H^HHfWf.zfWf.t$f.wf.v`\"u at-Hf.z f.t aHHHaHH@cHHt laHƒH[HH@ BHYtpHH@BHYtTHH@BHYt8HH@BHYtHH@BHmYu EHH@BHHYtpHH@$BH,YtTHH@'BHYt8HH@/BHXtHH@3BHXuE `t#HE9t _UH_HH@ cH"Ht _HƒHYHH@ BHXtpHH@BHWtTHH@BHWt8HH@BHWtHH@BHWu EHH@BH{WtpHH@$BH_WtTHH@'BHCWt8HH@/BH'WtHH@3BH WuE K^t#HE9t ^UH^HH@@cHUHt ]HƒHXHH@ HWHHuWu k]HH9tHH9uW"u /]t"HHH;t ]HH\HH@`cH5Ht \HƒHVHH@ HnVHHuVu K\HH9tHH9u|V"u \t"HHH;t [HH[HH@cHHt [HƒHUHH@HWHHfWf.zfWf.t$f.wf.vXU"u ZHHHZHH@cH.Ht ZHƒHTtUHH@HuHHHt(HHHH@HHTt ZHHHtHHH SHH@HtHH@HITHHHH@HYHHHYYHH@cHHt LYHƒHSHH@ HSHHuRSu XHH9tHH9uS"u Xt"HHH;t ~XHH^XHH@cHHt ,XHƒHkRHH@ HQHHu2Ru WHH9tHH9uQ"u Wt"HHH;t ^WHH>WHH@cHHt  WHƒHKQHH@ BH}OtpHH@BHaOtTHH@BHEOt8HH@BH)OtHH@BH Ou EHH@BHNtpHH@$BHNtTHH@'BHNt8HH@/BHNtHH@3BHxNuE Ut#HE9t UUHqUHH@ cHHt ?UHƒH~OHH@ HNHHuEOu THH9tHH9u O"u THH|THH@@cHHt JTHƒHNHH@HKPHHxfWf.xzfWf.xt$f.xwxf.vN"u SHHxHSHH@`cHHt RSHƒHMHHHtHHH"LHH@HtHH@H_MHHHH@HRHHHRRHH@cHHt aREHHHE EHEH}t HEHHuERt RHHHuJHEHEHE7HHH~MHEЋEHHHEHHEH}u QHHUH+EHHHEؾHlIb JHHEHHEHHu 4QHEHHrttt t QHEHHEHUHHHH)HHyPHH@cHHt PEHHHEHH@@cPEHEH}t HEHHuHH@@PẼ9t PHHHu-HH@@HHHHHEHEHEPHH@@HHHHHH]KHEEHHHEHHEH}u tOHHUHHH@@+EHHHEH?GbGHHEHHEHHu OHEHHEppt pNHEHHEHUHHHH)HHHHH@@HH9`HHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHHHHH@@HHHHHHHHRRHcHHHGHH@ BH)FtpHH@BH FtTHH@BHEt8HH@BHEtHH@BHEu EHH@BHEtpHH@$BHxEtTHH@'BH\Et8HH@/BH@EtHH@3BH$EuE dLtAHHHH@@HHHH@E9t LHHHH@@HHHHUPKHH@cH2Ht KEHHHEHH@@wKEHEH}t HEHHuHH@@PE9t )KHHHu-HH@@HHHCHEHEHEPHH@@HHHHHHqFHEEHHHEHHEH}u JHHUHHH@@+EHHHEHSBbCHHEHHEHHu JHEHHYllt lIHEHHEHUHHHH)HHHHH@@HH9`HHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHHHHH@@HHHHHHHHRRHcHHH CHH@ HBH`H`uBu eHHH9`tHH9`uB"u )Ht@HHHH@@HHHH@HH;`t GHHHH@@HHHHH`PGHH@ cHHt rGEHHHEHH@@:GEHEH}t HEHHuHH@@PE9t FHHHu-HH@@HHH?HEHEHEPHH@@HHHHHH4BHEEHHHEHHEH}u KFHHUHHH@@+EHHHEH>b>HHEHHEHHu EHEHH\\t \EHEHHEHUHHHH)HHHHH@@HH9`HHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHHHHH@@HHHHHHHHRRHcHHH>HH@ HK>HPHPu>u (DHH9PtHH9PuY>"u Ct@HHHH@@HHHH@HH;Pt CHHHH@@HHHHHPPgCHH@`cH踻`Ht 4CEHHHxHH@@BEHxHxtHxHHuHH@@PE9t BHHHu6HH@@HHH<;HxHxHpYHH@@HHHHHH=HpEHHHpHHxHpu AHHpHHH@@+EHHHxH9qe:HHxHHxHHu sAHxHH访LLt LGAHxHHxHxHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžlHHHH@@HHHHH@H`lH`H`tH`HHu؋l?t ?HHHH@@HHHHH@Hu!^8H`H`HXaHHHH@@HHHHH@H:HXlHHHXHH`HXu ?HHHH@@HHHHHXHP+lHHH`H6q j7HH`HH`HHu x>H`HHHHt HL>H`HH`H`HHHH@@HHHHH@HH)HHI=HH@cH8! Ht =DžTHHHHHH@@w=THHHHtHHHHuHH@@PT9t =HHHu6HH@@HHH5HHHHH@\HH@@HHHHHHY8H@THHH@HHHH@u a<HH@HHH@@+THHHHH#4q4HHHHHHHHu ;HHHH DDt D;HHHHHHHHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDž<HHHH@@HHHHH@H0HH@H@@k:<H0H0tH0HHuHH@H@@P<9Rt  :HHHH@@HHHHH@Hu:HH@H@@HHH2H0H0H(~HH@H@@HHHHHH@@HHHHH@HH5H($t8HH@BH"$tHH@BH$u ƅHH@BH#tpHH@$BH#tTHH@'BH#t8HH@/BH#tHH@3BHn#u ƅ *tfHHHH@@HHHHHPHH@H@@HHHH@9t <*HHHH@@HHHHHPHH@H@@HHHHP)HH@`cH/ Ht )DžHHHHH@@m)HHtHHHuHH@@P9t )HHHu6HH@@HHH!HHH\HH@@HHHHHHO$HHHHHHHu W(HHHHH@@+HHHH q HHHHHHu 'HHH44t 4'HHHHHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžHHHH@@HHHHH@HHH@H@@a&HHtHHHuHH@H@@P9Rt &HHHH@@HHHHH@Hu:HH@H@@HHHxHHH~HH@H@@HHHHHH@@HHHHH@HH HHHHHHHu %HHHH@@HHHHHHPHH@H@@+HHHHq WHHHHHHu e$HHH٢00t 09$HHHHHHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDžHHHH@@HHHHHPHH@H@@HHHHH@HHHtHHHu؋""t "HHHH@@HHHHHPHH@H@@HHHHH@Hu$HHHHHHH@@HHHHHPHH@H@@HHHHH@HHHHHHHHu !HHHH@@HHHHHPHH@H@@HHHHHHP+HHHHqHHHHHHHu V HHH,,t ,* HHHHHHHH@@HHHHHHHH@H@@HHHHH@HH)HH'HH@cHHt qDžHHHHH@@3HHtHHHuHH@@P9t HHHu6HH@@HHHpHHH\HH@@HHHHHHHHHHHHHu HHHHH@@+HHHHqHHHHHHu HHHܛ((t (uHHHHHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžHHHH@@HHHHH@HHH@H@@'HHtHHHuHH@H@@P9Rt HHHH@@HHHHH@Hu:HH@H@@HHH>HHH~HH@H@@HHHHHH@@HHHHH@HHHHHHHHHu HHHH@@HHHHHHPHH@H@@+HHHHiq HHHHHHu +HHH蟘$$t $HHHHHHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDž|HHHH@@HHHHHPHH@H@@HHHHH@HpHH@H@H@@|HpHptHpHHuHH@H@H@@P|9t HHHH@@HHHHHPHH@H@@HHHHH@HuAHH@H@H@@HHHHpHpHhHH@H@H@@HHHHHH@@HHHHHHHH@H@@HHHHH@HHIHh|HHHhHHpHhu QHHHH@@HHHHHPHH@H@@HHHHHhHPHH@H@H@@+|HHHpH qHHpHHpHHu HpHHQ t aHpHHpHpHHHH@@HHHHHHHH@H@@HHHHH@HH)HHHHH@H@H@@HH9HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHHHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHH HH@ H: HHu u HH9tHH9uH "u HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHH@HH;t FHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHPHH@ cHHt DždHHHXHH@@RdHXHXtHXHHuHH@@Pd9t HHHu6HH@@HHHHXHXHP\HH@@HHHHHH4 HPdHHHPHHXHPu <HHPHHH@@+dHHHXHqHHXHHXHHu HXHHt HXHHXHXHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžLHHHH@@HHHHH@H@HH@H@@F LH@H@tH@HHuHH@H@@PL9Rt  HHHH@@HHHHH@Hu:HH@H@@HHH]H@H@H8~HH@H@@HHHHHH@@HHHHH@HHH8LHHH8HH@H8u  HHHH@@HHHHH8HPHH@H@@+LHHH@Hq <HH@HH@HHu J H@HH辉t  H@HH@H@HHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDž4HHHH@@HHHHHPHH@H@@HHHHH@H(HH@H@H@@! 4H(H(tH(HHuHH@H@H@@P49t HHHH@@HHHHHPHH@H@@HHHHH@HuAHH@H@H@@HHHH(H(H HH@H@H@@HHHHHH@@HHHHHHHH@H@@HHHHH@HHhH 4HHH HH(H u pHHHH@@HHHHHPHH@H@@HHHHH HPHH@H@H@@+4HHH(HqHH(HH(HHu H(HHp t H(HH(H(HHHH@@HHHHHHHH@H@@HHHHH@HH)HHHHH@H@H@@HH9HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHHHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHH%HH@Hu}HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHPHH@HHt HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@Ht|HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@HoHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHH@HtHH@H<HCHH@HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@Hu#!H@t H[]UHSH(H}EH"c}tNH"cHH΅"HH)HHH"cBHHǸHHH"H"HEHcHHy"HH)HHHf"HѺ5BHǸQHHHE"HE؋@xTH3"HE؋PcHH"HH)HHH"Ѻ8BHǸHHH"EHEH@HEH}cH([]UHH@H}HuUHMLELMHEHE(UHMHEHH{}E} EHŸBH}HEЋPHEЉHEH@HH‹E=BǸqH}HEPHEkHEH@HH‹EZBǸqH}<HEȋPHEȉ(HEH@HH‹ExBǸBqH}HEȋPHEȉHEH@HMH‹EBǸpH}HEȋPHEȉHEH@HH‹EBǸpH}sHEȋPHEȉ_HEH@HH‹EBǸppH}0HEȋPHEȉHEH@H{H‹EBǸ*pH}HEȋPHEȉHEH@H5H‹E@BǸoH}HEȋPHEȉHEH@HH‹EhBǸoH}tkHEȋPHEȉZHEH@HH‹EBǸ_oH}t/HEȋPHEȉ HEH@ HEH}HUHEHH,UHH@H}HuUHMLELMHUHEHHnHEH}t HEH}t HEH}t HEH}uEt6LEH}HMЋUHuHEMIHHEHQHcUHH@H}HuUHMLELMHUHEHH1HEH}t HEH}t HEH}t HEH}uEt6LEH}HMЋUHuHEMIHHEH芌HUHHXHEH}uHEHpHEUHH H}HuHUHEHHE1"H0BHEH@HtHEH@HHUHHEHHu7HEH@Ht*HEHBl"HusernameH^"^"HEcw"KHHEHHEHHu*HEHyBl-"HE@t BBHUHHHHlocal_hoH ^"Ht_standbH^"f^"yHEc!HEH@HtHEH@H5HUHHEHHu7HEH@Ht*HEHBBkV!Hbind_ipaHs]"q]"ddrHEc'!HHEHHEHHu*HEH)Bj HE@ t BBHUHHHHcoredumpH\"\"HEc [HHEHHEHHu*HEHB)j= HEP$HEH*BHǸHadmin_poH:\"f9\"rt4\"HEc HHEHHEHHu*HEHBiHEP(HEH*BHǸ HreplicatH["Hion_portH["["HEcA HHEHHEHHu*HEHCBhHEP,HEH*BHǸeHlog_leveHZ"fZ"lHEc }HHEHHEHHu*HEHBKh_HEH@0HUHHEE-BH׸Hslab_allHRZ"Hoc_arenaHIZ"JZ"HE c HHEHHEHHu*HEHBgHEP8HEH*BHǸHslab_allHY"Hoc_minimHY"fY"alY"HE cH HHEHHEHHu*HEHJBfHEH@@HUHHEE-BH׸bHslab_allHX"Hoc_factoHX"fX"rHE cHEH@HHtHEH@HHHUHHEHHu7HEH@HHt*HEHsBf'Hwork_dirHDX"EX"HE cHEH@PHtHEH@PHlHUHHEHHu7HEH@PHt*HEHByeHsnap_dirHW"W"HE caHEH@XHtHEH@XHHUHHEHHu7HEH@XHt*HEH?BdHwal_dirHW"HEcHEH@`HtHEH@`H?HUHHEHHu7HEH@`Ht*HEHBLd`Hscript_dH}V"f|V"irwV"HEc+HEH@hHtHEH@hHHUHHEHHu7HEH@hHt*HEH BcHpid_fileHU"U"HEcHEH@pHtHEH@pHHUHHEHHu7HEH@pHt*HEHoBc#GU"loggfBU"er=U"HEcHHEHHEHHu*HEHBbHE@xt BBHUHHHOHlogger_nHT"HonblockHT"HEcK HHEHHEHHu*HEHMBaHEHHUHHEE-BH׸bHio_colleHS"Hct_interHS"S"valHEc hHHEHHEHHu*HEHB6aJHEHEH*BHǸHbacklogHDS"HEc HHEHHEHHu*HEHB`HEHEH*BHǸ#HreadaheaHR"fR"dHEcg ;HHEHHEHHu*HEHiB `HEHHUHHEE-BH׸~Hsnap_io_H R"Hrate_limHR"fR"itQ"HEc ~HHEHHEHHu*HEHBL_`HEHEH*BHǸHrows_perHZQ"XQ"_walUQ"HEc HHEHHEHHu*HEH B^HEHEH*BHǸ(Hwal_writHP"Her_inboxHP"P"_sizfP"eHEcQHEHHtHEHHHUHHEHHu:HEHHt*HEH&B]Hwal_modeHO"O"HEc HHEHHEHHu*HEHBP]dHEHHUHHEE-BH׸Hwal_fsynHTO"Hc_delayHKO"HEc HHEHHEHHu*HEHB\HEHHUHHEE-BH׸Hwal_dir_HN"Hrescan_dHN"N"elayN"HEcCHHEHHEHHu*HEHEB[HEt BBHUHHHHpanic_onHM"H_snap_erHM"M"rorHEc`HHEHHEHHu*HEHB.[BHEt BBHUHHHHpanic_onH2M"H_wal_errH)M"f(M"or#M"HEc HHEHHEHHu*HEHBqZHEHEH*BHǸHprimary_HL"}L"portzL"HEc, HHEHHEHHu*HEH.BYHEHEH*BHǸMHsecondarHK"K"y_pofK"rtK"HEc THHEHHEHHu*HEHB"Y6HEHHUHHEE-BH׸Htoo_longH&K"H_threshoHK"fK"ldK"HE cHEHHtHEHH.HUHHEHHu:HEHHt*HEHB8XLHcustom_pHiJ"Hroc_titlH`J"f_J"eHE!c  HHEHHEHHu*HEHBW HEHEH*BHǸ.HmemcacheHI"I"d_pofI"rtI"HE"ca 5HHEHHEHHu*HEHcBW HEHEH*BHǸHmemcacheHI"Hd_spaceHI"HE#c HHEHHEHHu*HEHB`Vt HEt BBHUHHHHmemcacheHdH"Hd_expireH[H"\H"HE$c HHEHHEHHu*HEH BU HEHEH*BHǸ+HmemcacheHG"Hd_expireHG"H_per_looHG"fG"pHE%cM !HHEHHEHHu*HEHOBT HEHHUHHEE-BH׸dHmemcacheHF"Hd_expireHF"H_full_swHF"F"eepHE&c HEHHtHEHHHUHHEHHu:HEHHt*HEHZBS HreplicatH+F"Hion_sourH"F"f!F"ceF"HE'c HE'HEHHo HEHHE@HHHHHH HE' 5 HB9HHEHHEHHu*HEHgBS HEHHE@HHHH@HEHHE@HHHHHPHE@HHHHHHE@PHEPHEHHt'HEHHE@HHHHHEHUHH}HuHEHEHEHHHE@HEHHE@HHHHHUHHURHcHHHHEHHE@HHHHH@H.HE@HEHHE@HHHHHPHE@HHHHHUHHURHcHHHHJHURHcHHHHEHHE@HHHHHPHE@HHHHH@HHE@ HEHHE@HHHHHPHE@HHHHHPHE@ HHHHHUHHURHcHHHHJHURHcHHHHJHUR HcHHHHE@ PHEP HEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHE@PHEPHEHHE@HHHHHPHE@HHHHHHE@PHEPHEHHE@HHHHH*]UHSHH(H H0HXH(H@HtH(H@HHH H@HtH H@HH(HBH H@HtH(H@Hu B H PH(PH(H@HtH(H@HH H@HtH H@HH(HBH H@HtH(H@Hu H P H(P H P$H(P$H P(H(P(H P,H(P,H H@0H(HB0H P8H(P8H H@@H(HB@H(H@HHtH(H@HHH H@HHtH H@HHH(HBHH H@HHtH(H@HHu H(H@PHtH(H@PHH H@PHtH H@PHYH(HBPH H@PHtH(H@PHu H(H@XHtH(H@XHH H@XHtH H@XHH(HBXH H@XHtH(H@XHu H(H@`HtH(H@`HH H@`HtH H@`HUH(HB`H H@`HtH(H@`Hu H(H@hHtH(H@hHH H@hHtH H@hHH(HBhH H@hHtH(H@hHu H(H@pHtH(H@pHH H@pHtH H@pHQH(HBpH H@pHtH(H@pHu H PxH(PxH HH(HH H(H H(H HH(HH H(H H(H(HHtH(HH׾H HHtH HHH(HH HHtH(HHu H HH(HH HH(HH H(H H(H H(H H(H HH(HH(HHtH(HH肽H HHtH HH蹾H(HH HHtH(HHu mH H(H H(H H(H H(H HH(HH(HHtH(HHfH HHtH HH蝽H(HH HHtH(HHu QH(HǀH HH#HX@EH(HHE EHEH}t HEHHuEH(HHuHEHEHE7H(HHսHE؋EHHHEHHEH}u aH(HUH+EHHHEHùbwHHEHHEHHu HEHH?TTt THEHHEHUH(HHH)HHykEH(HHEHX@jEHEH}t HEHHuHX@PEԃ9tH(HHu)HX@HHH\HEHEHELHX@HHH(HHHHEEHHHEHHEH}u H(HUHHX@+EHHHEȾHb訸HHEHHEHHu 1HEHH=PPt PHEHHEHUH(HHH)HHHHX@HH9dH(HHX@HHHHH HHXRHcHHHH(HHX@HHHHH HHXRHcHHHRPH(HHX@HHHHH HHXRHcHHHRPH(HHX@HHHHH HHXRHcHHHRPH(HHX@HHHHH@H HHX@HHHHH@HHX@EH(HHX@HHHHH@HE EHEH}t HEHHuE$H(HHX@HHHHH@HuصHEHEHEQH(HHX@HHHHH@H腸HEEHHHEHHEH}u H(HHX@HHHHHUHP+EHHHEHYb HHEHHEHHu HEHH:LLt LmHEHHEHUH(HHX@HHHHH@HH)HH_EH(HHX@HHHHH@HEHX@EHEH}t HEHHuHX@PE9H(HHX@HHHHH@Hu)HX@HHH褳HEHEHEfHX@HHH(HHX@HHHHH@HHusernH!!amecHEPHE@8t=Hc->localHR!H_hot_staHI!G!ndbyD!c}HEHPHEH@HHt5Hc->bind_H!!ipadf!dr!c)HEP HE@ 8t%Hc->coredH!!umpcHEȋP$HE@$9t.Hc->adminHv!t!_porfo!tcHEȋP(HE@(9t6Hc->repliH6!Hcation_pH-!+!ortch}u>HEȋP,HE@,9t,Hc->log_lH!!evel!c$HE@0HEH0f.zf.t6Hc->slab_H!Halloc_arH!!enacHEȋP8HE@89t?Hc->slab_HV!Halloc_miHM!K!nimafF!lcHE@@HEH@f.zf.t=Hc->slab_H!Halloc_faH!!ctor!c$HEHPHHEH@HHH{t%Hc->work_H!!dircHEHPPHEH@PHH7t%Hc->snap_HY!W!dircHEHPXHEH@XHHt+Hc->wal_dH!f!ir!cRHEHP`HEH@`HHt.Hc->scripH!!t_dif!rcHEHPhHEH@hHH\t%Hc->pid_fH~!|!ilecHEHPpHEH@pHHt$Hc->loggeH:!f9!rc~HEPxHE@x8tloggeH!Hr_nonbloH!f!ck!c.}ujHEHEf.zf.tFHc->io_coH!Hllect_inH!!tervf!al!cHEȋHE9t+Hc->backlH>!f=!og8!c{}uDHEȋHE9t,Hc->readaH!!head!c1}ucHEHEf.zf.t?Hc->snap_H!Hio_rate_H!!limif!tcHEȋHE9t,Hc->rows_HH!Hper_walH?!cHEȋHE9tDHc->wal_wH!Hriter_inH!Hbox_sizeH!!c(}uJHEHHEHHHst%Hc->wal_mH!!odec}u`HEHEf.zf.twal_fHF!Hsync_delH=!fwal_dH!Hir_rescaH!Hn_delayH!cHEHE8tFHc->panicH!H_on_snapH!!_errf!orz!cHEHE8t?Hc->panicH/!H_on_wal_H&!$!errof!rcXHEȋHE9t,Hc->primaH!Hry_portH!cHEȋHE9t5Hc->seconH!Hdary_porH!f!tc}ucHEHEf.zf.t?Hc->too_lH5!Hong_threH,!*!sholf%!dc^HEHHEHHHt=Hc->custoH!Hm_proc_tH!!itle!cHEȋHE9t5Hc->memcaH|!Hched_porHs!fr!tcHEȋHE9tmemcaH/!Hched_spaH&!f%!ce !c[HEHE8t6Hc->memcaH!Hched_expH!!irec }ufHEȋHE9tNHc->memcaH!Hched_expH|!Hire_per_Hs!q!loopn!c }u{HEHEf.zf.tWHc->memcaH !Hched_expH!Hire_fullH!!_swef!ep!c }udHEHHEHHHit?Hc->repliH!Hcation_sH!!ourcf{!ec HE@HE@m HEHHE@HHHHPHEHHE@HHHH@8t6Hc->spaceH!H[]->enabH!!ledc HEHHE@HHHHPHEHHE@HHHH@9t=Hc->spaceHm!H[]->cardHd!HinalityH[!c HEHHE@HHHHPHEHHE@HHHH@9tMHc->spaceH!H[]->estiH!Hmated_roH!f!ws!c HE@HE@bHEHHE@HHHHHPHE@HHHHHPHEHHE@HHHHHHHE@HHHHH@HHtFHc->spaceH!H[]->indeH!Hx[]->typH!f!ec# HEHHE@HHHHHPHE@HHHHPHEHHE@HHHHHHHE@HHHH@8tGHc->spaceHE!H[]->indeHuniH3!1!quecf HE@ HE@ CHEHHE@HHHHHPHE@HHHHHPHE@ HHHHPHEHHE@HHHHHHHE@HHHHHHHE@ HHHH@9thHc->spaceHA!H[]->indeH8!Hx[]->keyH/!H_field[]H&!H->fieldnH!f!ocAHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHPHEHHE@HHHHHHHE@HHHHHHHE@ HHHHH@HHthHc->spaceH*!H[]->indeH!!Hx[]->keyH!H_field[]H! !->tyf!pe!c*HE@ PHEP HE@ PHEP HEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHEHHE@HHHHHPHE@HHHHH@HtUHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHEHHE@HHHHHPHE@HHHHHPHEHHE@HHHHHHHE@HHHHH@H9uBHEHHE@HHHHHPHE@HHHHH@H{HEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHuQHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHtUHc->spaceH!H[]->indeH!Hx[]->keyH!H_field[]H|!}!cHE@PHEPHE@PHEPHEHHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHteHEHHE@HHHHH@Ht>HEHHE@HHHHHPHE@HHHHHHEHHE@HHHHHPHEHHE@HHHHH@H9u+HEHHE@HHHHH@HHEHHE@HHHHH@HHEHHE@HHHHH@HttHEHHE@HHHHHPHE@HHHHHu:HEHHE@HHHHHPHE@HHHHHt6Hc->spaceH!H[]->indeH!!x[]cNHE@PHEPHE@PHEPHEHHtZHEHHE@HHHHHt7HEHHt'HEHHE@HHHHH)HEHHEHH9uHEHHHEHHtVHEHHtFHEHHE@HHHHHu#HEHHE@HHHHHt(Hc->spaceH!f![]!cÐUHH H}HuHE<"HEHEHEHEHE'td'"t?,tS\uHEHE<\uAH}tHEHUHHEHEH}tHEHUHHE<H}uHEH#HUHEHHHHEHH)HUHHH}HuHxttHHŀBHƿHEHEHEHEEt"HxHBE̋tHHŀBEHHTŐE}}yEEȸ3+ẺEĸ}NEĉEEȉEE̋UH B;Eu|}tv}uEHEHEoEHHŀBEHHTŐEEHHŀBHƿHHEHHEHEH;Ev [HEHEEE;E[}wGEHŠBHEB0HEB&HEBHEBHE(BHE`BHEHHUHHEHEH;Ev HEHEHEHH;Es1HEHHEHHEHH;Es HEHHEHHEETHE<%u?HEHH H @H HHPH H@H H@H H@ HHx$H HxHPHxH@ HxHxuKRuHHuHBH mHHH@HH@(tHHuHBH8 HH@HEHHHHPHHHPHH@HH@ HEHHHp$HpHHPHpH@ HpHpuHHh9HhH@HUH(HHRHRRPHhH@ HhHhuHt2HEH(HHPHHP HEH(HHHPHEH(HHUH(HHRHPHH`(HEH(HH`HPH`H@ H`H`uHEH(HH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHPHEHH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHP"HEHH HDž HEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH wHEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH HEHHH H HEHHHrCHEHHHqpH H HuHBHH HUHHH @H H@BDž 6Dž HEHH~pHDž HDž EHHHHEEHHHHEEHEHEH HEHBEEHBHEЉE}x9}23EH BfHEf9uEHBEpEH`BEV}t"E=wEHBE}EHDžXBMHUHHHxTTuHHXTHHH9tHHnHHnHHHu%HHHDžDžT1MHUHHHTHHXHXHHHoTN}uj} }u^(HHEƿB!E3EHHHHEEHHHHEEHEEEEHBE}t8E}x.}2(EH B<uEHBE}JHEH;EtlEH`BHHUƿB]HmHmHEEfHEHEHHEEE/E"HBHE}t@E=wEHBEHHEƿBEHHHHEEHHHHE5HEH`BHHUƿ3BYHmHmHEH;EuHpH9Et HEHlHHH9tHHkEHnHx []UHHH}HuHEH3HEH¾PB_UHH0H}HuHEHE%kHHEHHEHHEH}uBHEHUH HHJHHHRHPHEHHtLHEHHblHHEHHEHHu'BHEHjHH}tHEHUHPHEHEHEHEHEHEHEH@HEH}HEUHH H}HuHUHEHHHEH}uBHEHUHPHEHlUHH H}/HEHHiHEH@HEHEHiHEHEH}uUHH@H}HEHEHEEHEHEH@HHtVHEH@HUHHHEH}uc}xHE؋UPEHEHUHPHEHEHEH@@EHEH@HEH}uHEHUHPHkUHH H}HuHEr#(ghHEH}u6BLHEHKHEH?3HEHUH HHJHHHJHHHJHHHR HP HEHlt>HEH@HHEHhHEHHEHHEH@HEHUHP HEHESHEH@HUHHHE3HEH@H(JgHEH}u6B/HEH.HEH"HEHUH HHJHHHJHHHJHHHR HP HEHOt>HEH@HHEHfHEHHEHHEH@HEHUHP HEHE9HEH@HUHHHEHE¾lB 6HEH@ HEHEH@HPHEHZfHEHEH}dHEUHH H}~HEtrt&6HEH@H f%HEH@HHEH@HHEH@ HEHEH@HHEHeHEHEH}wUHH@H}HuHUHEHH+HEH"HEHEHEH,H}t HEU}tHW"H2HhUHH@H}HuHUHEHH+HEH "HEHEHEH,H}t HEU}tH"HHvgUHAVAUATSH0H}HuHEHEHEHUHHE؋@HHE@HHE؋@Lu HE@LHEH@HuH!HEHPHEH@HuH!HEHPHEH@(HtHEHP(HEH@HHHHu@HEHHEHP(HEH@HHHEH@HU@HHHEHHEǀHE؋t9HEH@@HHEHHH)HȉHE؉HEǀHEHX@HE@0IHED`L BAIcBft9HED`hHEHXp'Ic BDA;~AƉ BAIcBAHBD9uIcBAЉBDHA;PHEHXpHED`hIcBDHELHEHHE؋HHHHEHHHEHHH)HȉHE؉P8HE؈P0HEHX@A$_ DHHBHE@0HEHXpHED`hSHEHPP> HEH@HEHHE؋@LBHE@L  HEH8BbHHEHHHuHEH@ƿB 'HEHHE؋@8HcHEHHHW*HHEHHHuHEH@ƿB&\HEHHE؋@8HcHEHHH)HHEHHHuHEH@ƿB^&HEHHEH@ƿ@B(&HEH`BZaHHEHHHuHEH@ƿB%HE@LjHEH@ HEHHEH@ HH@_HHEHHHuHEH@ƿBr%HEH@HE@LHE@LHEHHEǀHE@LHEH@ƿhB$HEHHE؋@8HHHEHEHHE؋@8HcHEHHH(HHEHHHuHEH@ƿB|$HEHHUEHΉHE@LHEHHE؋@8HcHEHHH'HHEHHHuHEH@ƿB#HEHHUHƿ*YHEHHUHƿ/=HE@LKHEǀ3HEHHE؋@8HcHEHHH&HHEHHHuHEH@ƿB7#HE@LHEHHHEH%HEH@ƿB"wHEHPPiHEHHHEH@HHHEHHUHHHHE@LHEHHHE؋P8HEHHEHH#$HEH@ƿB1"HEHHEH$tHEH@ƿB!HEHPPHEH@ƿB!jHEHPPPHEHPPHEH@-HEH@PHE؉PLHEHPPHEH@ƿBF!HEHƿB[HHEHHH)HȃEHE@0HEHP(HEH@HHH@_HHEHHEHHus> (HEHH;HEHHUHHHXHPH`HXHH}HPu=H`Hƿ<HHPHHPHHu= JHPHH=;HPHHXHHHPHH H>UHH}HEHEHEH@(HEH@HEH@ HEH@@HE@HHE@LHE@THE@XHEH@`HEH@HEH@]UHH H}HEHEgHEH@(HtHEHP(HEH@HHHHUHHHEHP(HEH@HHHHEH HEH@(Ht#HEHP(HEH@HHHHiHEH@(HUHHHEH@(HEH@`HUHHHEH@`HEHjHUHEHHVHEUHHH}HuHEH9UHH H}HuHUHUHEHHUHATSH@H}HuHUHUHEHHMHE؉P HE؋@ =vuL !D$fH$HCACACfHCAҿQHùCfHCH!BCHHE؋@ uuL !D$hH$HCACAChHCAҿHùChHCHE!BCHHEHHU؋R HHHUHRHHHHEHPHEH@HEHE؋@ HHHEHHE$HUHEHHHEP0HUHEHHHEP8HE@8< vzL| !D$uH$HCA9CACuHCAҿHù,uHCH߸K@BHHE@8HcHHHHHcHEHPHUHEHHHHEHPHEHHHEPHE@HEH;EHEH;EL{ !D$~H$HCACAC~HCAҿHùC~HCH-!BCHIHLHIH|LHIHfLHIHPLHH@[A\]UHH@H}HuHUHMLELMHUHE0HHEH}u CHCCpHE0H/HEHUHHEHUHPHUHMHEHHHUHuHEMHHEHHEP$HEHEP(HE HEUHHH}HuHUHEHHUHH}u}u}uc8cUH]ÐUHH H}H}u`HE.HHEH}u=HECHu!HECHuUHHH}uHEU}uHEUHH H}HuEH}t HEHjHEH@HdHHEH@HH9HEHHHEH@HHHEHPHEHѺHKHtHEH@U19tHEH HEH@HHHEHPHUHH@H}HuHUHEH@HHHEHPHEEHEHPHEHѺHHt^HUHEHHHEH@HE}uHUHEHH_EE ЉEU9uHEH@HUHz0HHtHUHEHH3HEH@HHHEHPHEH0HHƿooEHE؋@0;EtHEؾHdHE؋@DHqHEH}uHEؾH2HEHPHE؋@DHEHѺH HtHUHEHH)cHE؋PDHEHƿnEHE؋@H;EtHEHHEؾHHEHUHHE؋PDHEȉHHUHH@H}HuЉUHMHEHHLHEк HH3HE@VEHE؋@D EEHEH,HEHE؋@DHxHEHp HEHMHUIHHH>E}tHEؾHHUHH0H}HuUHMHEHHEHHXHEHH_HEHfHE@jHEHpHEHHEH}uHEH7H}tUHH0H}HuHEEHEH@ HUHuHMHЉE}tnHEH@(UHuHMH}ЉE}tHEHx9HE؋uEHMHEHH, HEH@HEH0H(UHHH}HEHPxHEHHUHHH}uUHEHHEHUHHpHHHECHHtKHCHHHHPHH@Hu+HHGH8!HHPHHPHEо HHEH}uHHHHPHE HHEH}uHHWHH@ _Bt r9t3HECHH@(:bBHECHH@(cBHUHEHHtHH,HECHtHHHHPHHHEH}uHH_HECH8tHECH#uHH@HHHHPHH@ HNUHHH}HEH@Ht$HEHPH6!H9tHEH@H/HEH@UHHH}HuHEHUHPHEH@HMHHUHH}HE]UHSHH}HE苀uAHE苘HE苀\AHwC@c}@cHE苀HHH cH@H[]UHH}HE]ÐUHH}uHEUHEH@HEH@HE@]UHH H}HEH@HtHEH@H HEH@HEH@HttECHEH@UHcHHH@Ht!HEH@UHcHHH@Hc EHE@;EHEH@HC HEH@UHH0H}HuHUHMHEPHE9u`HEt HEHUHEHHHHEH@HHC HHEHPHEH@HuhHEHPHE@HHHHEHEHUHHEH HHEHPHEH@HuHE@PHEPUHH}HuHEHEHEHEHEHHEHH9uHEHHEHH9v]UHH`HHHHdHHHPHH@Hu HH@HHEH}HEDžRHEHlHHCHHHCHHH.H'HHHHttHEH}u}t HEHgHE؋PHE؉HMHEHHPHEHPHEH‹ẺH.H}t)UHEHHEHHHEHHEHHHEHUHPHEHUHPHEUHH HH`HhLpLxt )E)M)U)])e)m)u)}HHuEHHu Hu HDžDž0HEH HPH(HHHIHHHHHH% t HHjHH<%t kHHHHl/l*t%dsuHHHHEHUHHEHHE@HHHEHHE@PHEPHEÐUHHH}H}tHEHHELHEH}u0HEHgHE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HH< HEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHxHEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@EBHEH@BHEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@ڃBHEH@@BHEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHnHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHH!UHH H}HuHEH'HEH}uYHEHEH@ڄBHEH@HEH@ [BHEH(HEHEHUHHEHHxHEUHH H}HEH(HEHEHH HEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@BHEH@HEH@ BHEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHfHEHH2HEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@BBHEH@HEH@ ÇBHEH(HEHEHUHHEHHHE@hHE@hHHHiHHEHPpHEH@pHu&HEH(H6HEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHMUHH@H}HuHUHEHp HMHEкHHu HE؋@EEHEHEH}tUHuHMHEHHYHEHP8HEHHf E}<}2EHcHEHH$HEHH蒽UHE؉P,HE؋@8HHHEHP0HEH@0HHE؋@8‹EHcHEHHEH@0HH/HEHP0HE؋@8HHE؋P8E)EEUHcHU؋R8HHUH4HUHJ@HHFHu!HEH@0HHEH@06HE@hHE؋@hHHHHHEHPpHEH@pHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pH HUH$HHEH@pHP HE؋@,HBHEH@pHP0HEH@0HHEH@pHP0HE؋@8HBHEH@pHP@HEH@HHHEH@pHP@HEH@PHBHEHt2HEH@HH}t HEH@UHH`H}HuHUHEHp HMHEHHu lHE@EEH8HEH}UHuHMHEHHHEEEHEH0HEUHEHЋEEEBEUEHHEHHEHHEԃ}UԋEEEE;ErHEH0HdHEȋUMHEHHEHHsHt/EEEE;EGHEH/HEH0HH}t HEHHUHH`H}HuHUHEHp HMHEHHu THE@`HEH@XHE@EEHkHEH}UHuHMHEHHqHEEEEHEH@HHEH@XHtHEH@XHHEH@XH}t HEHHUHH H}HuHUHMH}tHEHHHE HHĴ*HEHpHMHE HHu HE@tWw ttcrE=HUHMHEHHHUHMHEHHBpHUHMHEHHWHUHMHEHH>HUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHH[HEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾBHEH}t HUHEHEHCÐUHH}HuHEHExHEƒHEHEHx7HEHEH ЉHEUHEHxMHEHEH HEH ЉHEHEHxcHEHEH HEH HEH ЉHEHEHxsHEHEH HEH HEH HEH ЉHE]UHH}u}vs}?vT}v5}vEȀHEHEEȀHEHEEȀHEHEEȀHEHEEƒHEHE]UH}}w5}?w%}w}w]ÐUHSHHhH`HXH`HHEHEHEH<-HEHHHEHH<-uHEHHHErHXHE[HEHHHEH@HHt.HE؋@uHEHHHҫHEHE(HE؋uHEHEHH"HEHHHxH`HHEHEHEHxHEHxH`HHխ苪HEH<-HEHHwHEHH<-BHEHHHXHEHEH@HEHE!HEHHHEHEHHE HEHEHEtHEHE8tHE<=tHEHEt|HEtdHEHHpHUHEHHHH)HȉH`HH ICHǸ贬HxHթ;HEHEHEHEHEHEHHuHE(HEt HEH@HEHEHHHEudHEHHXHEHHCH胫H`HH IؾCHǸHxH rHXHEHE(HEHE9uHE@HxHEyHEHE9udHEHHXHEHHCHΪH`HHS IؾCHǸ6HxHW轧HEHEH;EyHE@HEHH=H HPHEHPHEH@HHEHEHHt HEH<-u]HEHHtKHEHHHHH`HHy 0 CHǸ_HxH耧HEHHEHPHEHH=HZHtdHEHHXHEHHCHbH`HH Iؾ` CHǸʩHxHQHEH@HEbHEHEHHEHHEHEHEHHuJHEHHHEHXHEHEHEH@HkHlHE@urHxHE[HEHE9uFHEH`HH CHǸʨHxHQHEHEH;EuHEHEHE@HEHtHEHPHEHPHEHEHHt HEH<-uXHEHHtFHEH`HH CHǸHxH#艤HEHHEHPHEHEH@HEHEYHE(HE\HEH`HH CHǸvHxH藤HEHEHHEHHEHEHEHH6HEHEHHUH`HH)HHHhHxHĨ[]UHH}uHEHEHEHE;EHEHEHEuHE]UHH}uHUHEHEHE+HE;EuH}uHEHPHEHHEHEHEuHE]UHH}uHUHEHE&HE;EuH}u HEH@HmHEHEuи]UHH@H}؉uHUHMHEHHEHHEHEHEHEHEKHE;Eu;HEH;EuUHEHHHEHMHEHPHEHHEHEHEuHEH;Et HEHHUHEHH)HHUHHH}HEH>UHSHxH}HEHEEE6H HEH HMH HEfE HEH@HEE& C腠HEt&EHEHEƿ) CV& CEHEH@HEHEHH}t- C& CHEH@Ht:HEHXHEHH?U)HEHHHƿ0 C辟HEHẺƿ9 C衟HEH@ HHEH@ HEEHcHEHHEHmHEH;Ev HE< uHEH;EuEHcHEHHEHUHEHH)HHU؉ƿ@ CHEHEHEtHEHƿF CHEHHE@,< uHEH= HHEHH\HEHEHEH;EtHEH=HEHEHEH}uUHH0H}؉EԀ} vC C C<EHHHHEHHEHEH@H;E @HEH}u nHEHHEHUH`HHHEHxHEH@ HHEHxHEHPHEHH_HEHPHEH@ HHEHPHE HEH.9HEHHEHEHHEHE@,:EHEHPHEH@ H)HEHPHUHEHHHEHE@,:EuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHUHEHHHEHTHEUHH H}HuHEHEHE} HEHiHEH}u MHUHEHiHEHUH`HHHEHxHEH@ HHEHxHEHpHEHHEHpHEUHEH2UHH H}HuHEHRHE@,< u_HEHHEHxHEH@ H)HEHxHEHpHEH@ H)HEHpHEH蚑HUHEHHHEHRHEH}HEP,HE@,8HEHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHUHMHEHH$HEHEHHEH}t$HEP,HE@,8uHEHuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEHHEHPHE@,HHHHEHHHfUHSHxH}HEHEHEHEEHEH`HEHEHHEHEHEHEP(H9t4HEH(HHj AȉѺC CHǸFEHE@,< u&HEH@ HEHEH@ HEHEH@ HErHEHX HE@,H9tEHEHX HE@,HH IHѺC CHǸ谑E OHEHEHHEHEHEHEH;EHEHxH;Et7HEHxH] HMIHѺC8 CHǸ4EHEHE HUHEHH)HHEHEH@HEHEH@HEHEHXEHHغHHHt>EbHHEHPH IHѺCp CHǸ膐EHEHXEHHغHHHt>EHHEHPHD IHѺC CHǸEHE HEH@H;EHEHUHH;Et7H HuHMHUIIHѺCCHǸ辏EHEHpH;Et7HEHpH HMIHѺCPCHǸvE}u跋Hx[]ÐUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HEHPHEH]UHHH}HEHHEHHUHH}HuHEHUHHPHEHH!]UH0]UH8]UHHH}HHEHUHH}HEH@]UHSH(H}HuиHHEHrHH)HHEHEHHUHHfHEH}ufHEЉHEP0HEHPHEHHHHEHP HEH@ HHEHP HEHPHEHHEHPHEHH([]UHH0H}HEHHHEHEHHEHEHHUHHHEHEHEHPHEHH9t'HEHHHEHEHHEH}uHEHHUHH0H}HuHEHfH;EsCGPCC莈HEH;H+EHEHEHHHEHEHHEHE@0H;E~HEP0HE)HEP0HEfHE@0H)EHEHHgHEHP HEH@ H)HEHP HUHEHHH>HEHHMH}tCYPCC袇HEHUHPÐHl$Ld$H-o L%X H\$Ll$Lt$L|$H8L)AIHI19Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH 5a 0`   0 ` Y0` memory limit reached (%lu) snap_dir and wal_dir must be defined.snap_dir: %s wal_dir: %s spaces: %d interval: %d memory_limit: %dM START SNAPSHOTTING %s ffffff?rfailed to open config file: %s  5a 0`   0 ` Y0`NUMNUM64STRcan't allocate key fieldsbad key typespace %i is already defined failed to create space %d primary index is not definedcreateintervallsnlimithelpversioncreate snapshot file periodically create snapshot snapshot lsn (latest by default) memory limit (bytes)display this help and exitdisplay version information and exitTarantool xlog compression utility. Usage: tarantar  5a 0`   0 ` Y0`@{@o@[@?@@failed to create key/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/indexate.cmh_pk_get(space->index, &node, space) == ({ (space->index)->n_buckets; })%s/%020llu.snapfailed to open snapshot file(snapshot) %020llu.snap %.3fM processed snapshot parsing failed: %s failed to open snapshot directoryfailed to match greatest snapshot lsnlast snapshot lsn: %lu 0space %d is not defined pos != ({ (space->index)->n_buckets; })%s/%020llu.xlogfailed to open xlog file(xlog) %020llu.xlog %.3fM processed xlog parsing failed: %s failed to open wal directoryfailed to match xlog with snapshot lsnxlog_process_rowsnapshot_process_row$tI/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/ref.cid < t->countts_reftable_map 5a 0`   0 ` Y0`failed to open file: %s failed to seek for: %s:%d failed to read: %s:%d /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/cursor.c0ts_cursor_tuple 5a 0`   0 ` Y0`failed to write rowfailed to seek for: %s:%d failed to read: %s:%d /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/snapshot.c0snapshot exists, skip.%s/%020llu.snap.inprocessafailed to create snapshot: %s SNAP 0.11 ( >> ) %020llu.snap %.3fM processed failed to allocate tuplefailed to open file: %s flush failedsync failedts_snapshot_xfer$tI/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/region.hsize <= rslab_unused(slab)LoggedError%s at %s:%iregionnew slabupdate failed 5a 0`   0 ` Y0`void* slab_alloc(rslab*, size_t)j@@LB@@R@J@|@9Exception0cB0B11LoggedError0cBB11ClientError0cBB6ObjectНc(Bassert: %s:%d %s INADDR_ANY.tarantool.pidfsync_delayusernamelocal_hot_standbybind_ipaddrcoredumpadmin_portreplication_portlog_levelslab_alloc_arenaslab_alloc_minimalslab_alloc_factorwork_dirsnap_dirwal_dirscript_dirpid_fileloggerlogger_nonblockio_collect_intervalbacklogreadaheadsnap_io_rate_limitrows_per_walwal_writer_inbox_sizewal_modewal_fsync_delaywal_dir_rescan_delaypanic_on_snap_errorpanic_on_wal_errorprimary_portsecondary_porttoo_long_thresholdcustom_proc_titlememcached_portmemcached_spacememcached_expirememcached_expire_per_loopmemcached_expire_full_sweepreplication_sourcespaceenabledcardinalityestimated_rowsindextypeuniquekey_fieldfieldnotrueyesenableon1falsenodisableoff0%s[%d]Option '%s' is not supportedCould not find '%s' optionWrong value type for '%s' optionWrong array index in '%s' optionCould not accept read only '%s' optionCould not parse integer value for '%s' optionWrong range for '%s' optionNot enough memory to accept '%s' optionOption '%s' is not set (or has a default value)Unknown error for '%s' option@ZAZAZA1[Aw[A[A\AI\A\A\A_ZANo memory to output value%d%gspace[%d].enabledspace[%d].cardinalityspace[%d].estimated_rowsspace[%d].index[%d].typespace[%d].index[%d].uniquespace[%d].index[%d].key_field[%d].fieldnospace[%d].index[%d].key_field[%d].typeUnknown state for tarantool_cfg_iterator_t: %da_Aa_A_A`AKaAaAbA1cAcAzdA*eAeAwfAgAgAGhAhA}iA'jAjApkA lAlAkmA!nAnAqoA/pApAqAFrArAsAetAuAuAhvA%wAwAxAxAxAxAxAxAxAxAxAxA7A yA yAyAzAr{A|{A|{A|{A|{A|{A|A|AD}Am~Aw~Aw~AOption '%s' is not set     $enderror$undefinedOPT_PKEY_PINDEX_PNULL_PSTRING_P'['']''=''{''}''.'','$acceptcfgsection_listsectionnamed_sectionparam_listparam$@1valueevaluestruct_listqnameqelemqualifierelemnameoptcomma_optBBBBBBBBBBBBBBBBBBBB BBB!B'B.B:B@BFBPBUBZB^B          %+  " !&#$### ')', /10 .64 !7"#$5)*23(&-  '+.  *5  3  , 1 6            syntax errorsyntax error, unexpected %ssyntax error, unexpected %s, expecting %ssyntax error, unexpected %s, expecting %s or %ssyntax error, unexpected %s, expecting %s or %s or %ssyntax error, unexpected %s, expecting %s or %s or %s or %s{AAAAAADeletingNo memoryError: discardingError: poppingmemory exhaustedCleanup: discarding lookaheadCleanup: popping>A>AAAAA A3AAA$ApAAA AACAAAAAA0AA0A@AAPAAA A$A1Agram_yyerror: %s at line %dUnkown paramType: %d              (8IQX_41,'!-(&"!  hlptx|;<<==>>??;;;;@;;;AA;;;@;;;B;;C;;;;;;D;DD;@;;AA;B;;;DDDA;;;;;;;;;;;    .:98-*76430,*/-,*;;;;;;;;;;;;;;;;;;;!";#;$;%!";#;$;%';;(;;)';;(;;) &&&&+;++1;;122225;55 ;;;;;;;;;;;;;;;;;;A90/-*)(%  <<<<====>>>>????@@@BBCCCCDDD;;;;;;;;;;;;;;;;;;;OPTsyntax error: Unknown characterNULLUnexpected end of string (expecting value)Unexpected end of string (expecting closing quote)Unexpected end of string (inside comment)flex scanner jammedfatal flex scanner internal error--no action foundAABABAAIAAAVAlAAAVAwAAAAA_AAAAABA:A~AAA9ABAiAAAAAANAfatal flex scanner internal error--end of buffer missedfatal error - scanner input buffer overflowinput in flex scanner failedout of dynamic memory in yy_get_next_buffer()flex scanner push-back overflowout of dynamic memory in prscfg_yy_create_buffer()out of dynamic memory in prscfg_yyensure_buffer_stack()out of dynamic memory in prscfg_yy_scan_buffer()out of dynamic memory in prscfg_yy_scan_bytes()bad buffer in prscfg_yy_scan_bytes()out of memory expanding start-condition stackstart-condition stack underflow%s prscfg_yyset_lineno called with no bufferprscfg_yyset_column called with no bufferscan_yyerror: %s at line %dER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not existSystemError%s in %s/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/exception.ccClientError%s at %s:%d, %s@D@LB B!BnB(!Bf!BLB!B!BLB/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.csizeoffset < rope_size(rope)offset == 0node->leaf_size != 0node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_sizenode->height == (((rope_node_height(node->link[0])) > (rope_node_height(node->link[1])) ? (rope_node_height(node->link[0])) : (rope_node_height(node->link[1]))) + 1)┌──└──│ %s%snil{ len = %zu, height = %d, data = ''}size = %zu string = ''rope_checkrope_eraserope_extract_noderope_insert/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalseIllegalParams%s at %s:%ivarint is too short (expected 1+ bytes)varint is too short (expected 2+ bytes)BER int is too short (expected 3+ bytes)BER int is too short (expected 4+ bytes)BER int is too short (expected 5+ bytes)incorrect BER integer formatpacket too short (expected 8 bits)packet too short (expected 32 bits)packet too short (expected a field)incorrect packet format (expected a 32-bit int)UPDATE_OP_SETUPDATE_OP_ADDUPDATE_OP_ANDUPDATE_OP_XORUPDATE_OP_ORUPDATE_OP_SPLICEUPDATE_OP_DELETEUPDATE_OP_INSERTUPDATE_OP_SUBTRACTUPDATE_OP_MAXClientError/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple_update.cc32-bit int32-bit or 64-bit intoffset is out of boundarg->offset >= 0 && arg->offset <= field_lenfield splice format erroroffset > 0 && prev->tail_len > 0op->meta != NULLfield->tail_len == 0 || field_count > 1update->new_tuple_fcount == total_field_counttoo many operations for updateno operations for updatecan't unpack update operationsupdate != NULLtuple_update_preparepick_varint32load_varint32do_update_opsupdate_field_splitinit_update_op_splice13IllegalParams0cCB.snap.xlog rXLOG SNAP 0.11 okfailmemory allocation failedfile type mismatchfile version mismatchfile crc failed or bad eof markersystem error%s (errno: %d)....xlog.snap%s: --%.*s: abbreviated option is ambiguous =%s: --%.*s: unknown option %s: --%.*s: option may not be repeated (in any long or short form) %s: --%s: option requires an option argument %s: --%.*s: option may not take an option argument %s: -%c: option may not be repeated (in any long or short form) %s: -%c: option requires an option argument %s: -%c: unknown option -%c, --%s%-*s--%-*s%.*s %s/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.hsize <= (4294967295U)order <= SLAB_ORDER_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab->magic == slab_magic && slab->order == orderslab->magic == slab_magicslab->order <= SLAB_HUGEslab->order == SLAB_HUGE || (((intptr_t) slab & ~(slab_order_size(slab->order) - 1)) == (intptr_t) slab && slab->size == slab_order_size(slab->order))slab->in_use == slab->order + 1order <= SLAB_HUGEError in munmap(): %s 0slab->order <= SLAB_ORDER_LASTslab->order > 0slab_buddy(slab) == buddy%s: incorrect slab magic, expected %d, got %d%s: incorrect slab size, expected %zu, got %zu%s: incorrect slab statistics, total %zu, factual %zu %s: incorrect order statistics, the total %zu is not multiple of slab size %zu %s: incorrect order statistics, the used %zu is not multiple of slab size %zu %s: incorrect totals, ordered %zu, huge %zu, total %zu %s: incorrect used total, total %zu, sum %zu slab_cache_checkslab_order_sizeslab_assertslab_set_freeslab_mergeslab_buddyPslab_orderslab_createslab_get_with_orderslab_mmapmunmap_checkedslab_splitslab_from_ptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/region.cnew_size <= region_used(region)cut_size == 0region_truncate;,EHExT]]^`=` b`@````acdRe8:fXfx&ghj kNk tlHonpoppqq~s@bu`uvnvvv wH@yp z>zlzq{:}(PÀx8r(PpS@h4R&8TXzuڗ ٙ@h$ڝԢZ(PpRЩ"ѫ84XRxp4F(Hh׵"HtpZ(HhTz޻dn(Hhrmpz(iHhjHI hM8 /N` N 6O r z }!8!yX!ңx! !!!! " @"5`""""o"#8#`#n#_#h#>$$($P$p$${$*$$%0%P%@p%V%%s%|%&0&5P&p&&&-&F&c'0'P'pp''''' (.0(P(x(4(U(s(()8)v`))A )` )z ) *o 0*& X* * * *X * +H 8+~ X+ ++\++,Fx*\ ,H,h,8,v,,,-(-<H-Uh-s---3-.*0.X.*..d../8/ `/!/^!/-"/"/$0&80 'X0?'x0P'0b'0'0'0P(1(81(X1(x1 +10111223823X2&4x252N5252637 3V7@38h3O83838393k949(4:H4:h4:4_;4<4`<4^?5B@5C`5D5D5E5F5UI 6MH6Mh6N65N6LN6N6O7O07JRX7S7S7jT7T7T8DW08WP8Wp8W8[X8pX8X8aY9TZ89ZX9)]9t]9H^9^9^:_ :`@:6``:N`:l`:`:`:,a;b ;Lb@;rb`;b;b;b;b;c<7c <c@<c`<c<Dd<e<k<l=m0=mP= np=n=o=p=Uq="s>qs8>sX>Ptx>qt>t>ku>u>v?v8?vX?Rwx?w?w?x?x?x@y8@yX@yx@Mz@z@z@z@} Ad~@A<hA`AAAԂABP(B]HBpBBBpBPC- CƔ@C`CCCICCZDt(DPDpDHDDڢDDE60E[PEpEEE-EwEFѥ@F`FF0FFFoG0GPGpG۫G'GĬGGH0H$XHExHH˵HݵHH'IL8IvXIxIIǶIIIͷ Jg@J`J0JzRx 6*zRx |7XAC S <NYAC T \N7AC 2 $|P5AC E+ Q!AC \ Q%AC ` Q*AC e $Q5AC p $9Q.AC i $DGQAC E $l$RAC E $S$AC E TqAC l UAC  UAC  ]VIAC D $<VAC E d XAC  YhAC c Z.AC i $&Z&AC E $$[AC E $\$AC E <]qAC l \D^AC  | _AC  _IAC D $_AC E 6aAC  bhAC c $BcLAC G DncXAC S dc$AC _ cAC Z zPLRxpP@ $$c`ZCAC [ $Lc.ZCAC ) $teZCAC  <fAC Y \~f.AC i $|fAC E $igAC E $ ieAC E[ $Gk$AC E ClAC Y <AlWAC R \xl:AC u $|lAC E $nAC E $,oZCAC  Dp|AC w pgAC b 4p:AC 5 TsAC  tsAC  $[tLZCAC G $vYZCAC T $xAC E $ AyNAC ED 4hy4AC o T|yAC Y tzy.AC i $yZCAC  zAC Y z.AC i $z&AC E $$ {AC E $L }eAC E[ $t $AC E $ AC A  oBAC } $D [CAC  $l.AC H! $*[CAC  $9[CAC  $P[CAC H  |AC  $,*f_[CAC a  h9AC t  VAC Q 4 4AC o $T ΎAC E | JAC E  ЏRAC M  AC   aAC \  ԑAC Y  ґAC Y $Бn[CAC  d .AC  $}[CAC H  J1AC l  \&AC a  b=AC x  &AC a , =AC x L &AC a l =AC x  ȟ&AC a  $AC M  ;AC v  1'AC b  8AC P ,-AC U L'9AC Eo l@qAC l AC  nAC i zPLRx`T@ $$@[CAC G !AC \ $l[CAC E $[CAC Ez $ |[CAC  VAC Q >HAC h`AC [  ZAC U ,AC  LFAC A lDAC  xAC s ` AC  JAC  xAC s  q9AC t ,PAC K LGAC B $lAC H $(VAC EL )tAC o $< (-[CAC  $d -[CAC  ,f.@AC { L.N#AC I# $ Q\CAC  YAC   $\ AC H |fAC a YAC T R7AC 2 <lAC  \1AC  |ݞ%AC ` $\CAC H BAC } ij)AC $ $dʹe \CAC ` , FAC A $0,\CAC  tAC  wAC  $:\CAC  $<RH\CAC  $R AC KB $,AC K $T AC E $|AC C $6AC K $AC E AC  AC  4)AC  TAC  tRAC  AC  u1AC ,  AC  rvAC q AC  42AC m TAC  t AC  iAC d 7AC AC T bAC ] bAC ] 4aAC U T[AC U tUAC T NAC X K!AC \ LvAC q vAC q "AC ] 4"AC ] TAC T tAC Z AC X %AC ` AC  $T\V\CAC  AC  <!AC  \AC Y |)AC d AC Y 6AC q $<d\CAC  $dp\CAC  ,jGAC B LAC Z lAC U AC O $~AC E $7AC E ]AC X AC P <"AC ] \JAC E |gAC b XGAC B AC  6AC q $aAC GU $X AC  DBrAC m daAC \ CAC ~ CAC ~ $4w|\CAC Em =AC x  &AC a ,=AC x L&AC a l=AC x &AC a AC Z AC X AC T  AC Y $,AC E TXAC  tAC  ;hAC c AC  $sAC Ei $=AC E $$ pAC Ef L AC  l AC  $\CAC  $!\CAC  $<\CAC H !JRAC M $!|ZAC U D!AC  $e\CAC  $!AC J $\CAC E !ivAC q !AC Z "AC L <"AC M \"AC X |"eAC ` "lAC g "0BAC Ex "R*AC e "\AC T #U7AC 2 $tl\CAC G $%]CAC G $8]CAC G $K]CAC G #OMAC H #|JAC E $T^]CAC G D$[KAC F d$AC  $ AC  $SAC N $UAC P $q]CAC G  %<AC w ,%5AC p L%MAC H l%MAC H %.MAC H %[MAC H %MAC H %AC   &+5AC p ,&@AC  $L&AC E t&<LAC G $h]CAC G $> ]CAC G & AC  $<]CAC  ,'AC I $*]CAC % $]CAC  $^CAC  $-^CAC G 'AC   (r%AC ` ,(w.AC i L(AC P l(||AC w (:AC u $ $I^CAC  $4$PX^CAC K $\$g^CAC  $)AC  $$u^CAC  l)%AC ` )3AC n $ %^CAC } ) KAC F )7:AC u *QAC O $4*E~AC Et \*AC O |*9AC t *AC  *A AC  *!WAC R $\&K!~^CAC y $+#KAC F D+#AC  d+$BAC } +$fAC a +$AC  +%6AC q +%&AC a ,%AC S $,%AC Y D,%AC S d,%BAC } ,%fAC a ,$&AC  ,&6AC q ,'&AC a - 'AC S $-'AC Y D-'AC S d-&+AC f -'#AC ^ -')AC d -'_AC Z -N'#AC ^ .T'$AC _ $.X'dAC _ D.'AC  $))^CAC  $).^CAC  ./AC  ./AC  .0$AC _ /0xAC s $*0k^CAC f \/.2AC  |/2}AC x /U3AC  /5OAC J /15yAC t /5fAC a 05!AC \ <05yAC t \0*6AC | |06*AC e 06AC  06AC | 0_7*AC e 0i7AC  17AC | <138*AC e \1=8AC  |18CAC ~ 18AC Z 187AC r 18AC  1X9$AC _ 2\9qAC l <29BAC } \29$AC _ |29;AC v $-9 _CAC  2m5!M5Y(1I$1 ? : Gp a2%[O] %  \? 6xO$#@{)r       F h ( ,w,d   rYwzU@%^BU@CM P@ $B`c`co`@0.@ @  (bc H@`H@ oG@ooD@ `cFP@VP@fP@vP@P@P@P@P@P@P@P@P@Q@Q@&Q@6Q@FQ@VQ@fQ@vQ@Q@Q@Q@Q@Q@Q@Q@Q@R@R@&R@6R@FR@VR@fR@vR@R@R@R@R@R@R@R@R@S@S@&S@6S@FS@VS@fS@vS@S@S@S@S@S@S@S@S@T@T@&T@6T@FT@VT@fT@vT@T@T@T@T@T@T@T@T@cBiBnBlBBvBcdcdcBidcdcB Bnecec(B0Bl ec0ecQBZB?c@ecoBvPec`ecBec@0w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V0BBBBBBBBBB BBB&B1B:BABQBeBmBwBBBBBBBBBBB1BCBRBbBsBBBBBcBBcBB8cBBxcBBcBДcBBcB0cBBxcBcBBؕcBcBcBB8cBPcBhcBBB!B0BkB}BBBBB BB5BEB]BpBBBBBBBBB BB&B4B?BMBXBfBqBBBBBBBBBBBBBB B.B9BEBNBZBcBxBBBBBBBBBB BB!B*B6B?BKBTB`BiBuB~BBBBBB BB[BhBBBBBB B%B8BwBBBBBBB0BPB`BBBBBBBBB4BHBpBzB{BBOKB?HBPLBtHBPLBIBPLB[IBPLBIBNOBIBLBJBJBPLBHBCCCC+CHCjC@T@GCC: (Debian 4.7.3-4) 4.7.3,U@, p@#,0@,@,<@,C@,d@,f@b,3z$@$@%J@1|@&@=@&@=D@&j@=@&@,3T@R,@?,@,LAwN,tB6 BJ@1|@&@=@&@=D@&j@=@&L Bw B=!B&(!B=f!B&!B=!B&,;!B37B*'J@1|@&@=@&@=D@&j@=@&!B=!B&,=<^B# ,M`hB,R8nB<,`tpB<,corB,uqsB ,xȀB,DB,!B,,B,`@B,B ,{бBA,BxU@ p@uzintBp\ . #: #4.#sese4e?] 1U@Dm@ .1 4.1 a3sl b3sh c3sd d3s` e3s\ @4 c5 l67ve%9s4senDm@m@` nh ]|m@n@y |X |Plen|sL i~sl j~sh fn@ p@    iB\RP c4O44eO p@/@|08uintzFiHKw ?p} 0F 3T 78( e  g?# c h?#  i?#  j?# & k?# , l?#  m?#  n?# b o?#  p?#$   F# :! # j" #    F# j" # " # 6# # H r  F# O# "#  ## 7 $# 1" %r#xH & # (  )F#  -# # 5# " ;# w" A#  G#$ . J#( ?" M#,  P#0 " S#8  V#@ # Y#H :$ \#P _#X ! b#` $ e#h ! m#p % p#x $ s# G v# H y#  |# " # ! # _# # " #  # 4 # Z # # # t$ # # #  # # # K$ #  ®# $ # e ΄# D #~- .# E/# )J     `s Ma-# b-#\ q r# tJ#  # s# sp N fHP R# Ss# @T##( 3p x $ # z #  #key x# Fp key #val #G8[ep\e#b]k# ^# @_# `# ra# -b# d#$ e#( f#, gq#08[p\#b]k# ^# @_# `# ra# -b# d#$ e#( f#, g&#0 3wK  A  ^(   # c# ,#  ?# $?# r# i# cfg#(    4  H  j"#n?#I I # :?#( c# =?# ?#id# 1" &#pk! #w$ t%q# $# ?# # r # # : ?#top ?#  ts0 IK#s #rt # # % #  ?#  # r #sc #ra#8 p@-p@ 8hLf-p@Rp@& f& hJRp@|p@@\ \ hs\|p@p@ f\ h\`8p@p@  linchddp@q@`j hqP6j Hargɂ@kͷ`iηdincϷ\p Qq@s@ hqP6j Harg@k`idinc\kXNs@t@ D hNqXxNTargOHyjt@Bu@ hjqXxjTargkHsmqhynduqBu@*v@ hwqh*v@v@@hqhv@w@Ahqhw@x@hqargsqP\ =w@gx@iX Lw@Sx@nL!~?x@z@`LhqX"T"PargHsqhhz@{@hqh"dargX{@>{@  linchdm>{@d|@`h&H6`@argqkͷXiη\incϷTfl3O d|@_~@h&H6`@argqkXi\incTkPN_~@@@GhN&XxNTargOqHj@@hj&XxjTargkqHsm&hyndu&@܀@ hw&h5܀@@` h&h0@ȁ@ Dh&h3ȁ@n@ h&argqs&P\ @@iX @@nL!?n@R@ Oh&X"T"PargqHs&hR@@ h&h"dargqX#%?@@@ zH?@^@ rcJ?l#uU^@@ #$]@@` $e@@ Xmih@%v?@/@ v?\3vPrc?l& @ @ @tm` p'L `B(tss<)  @d0@@*|08uintzii?p780 ?# # S# # # #( N#0 #8 B#@ #H r#P e#X \ #`  #h  ?#p ?#t up#x M# D[# -# o# y&{# !/# (0# /1# 62# =3-# b#5?# 7# 7 E# # e0?#    D F# :!# j"#   F# j"# "# 6##DOH  F# O#"# ## 7 $# 1"%#H&#(i )F# -# #5# ";# w"A# G#$ .J#( ?"M#, Pi#0 "S#8 Vi#@ #Y#H :$\#P _#X !b#` $e#h !m#p %p#x $si# Gv# Hy# |i# "# !# _## "i# i# 4# Z# ## t$# #i# # # # K$# ®# $i# eΏ# Dp#v  A^(   # c# |#  ?# $ ?# r # i # cfg #(`+?0@@ I+Hf-h2?`J3?\o4?Xrc5?dDT @@|08uintzk im my?Tp}0F3T78 /# j"0# len1# ,G2# 5K ns6# 7## :e ns;#> ns?# @# C nsD# E# H I#o L nsM# 1"N# zO# P# < #Y  $#  %#  &-#  '?#  4t ptr 5t#  8  9# : :#  ;?# YG  + -w# ) .-# ( & h '## t (#w ( +* h ,K# t -# ( 0O h 1e# t 2#1 5 op 6# 8 7# 8# 9#  :#  ;#  p H > h ?# t @# ops A#( B#0 opv C#8 opc D#@O @ G h H# K I# J# K# b L# t M#  P h Q# l Rz# H Y6 Z [del \* ]"z ^ _P x UI H V# 9 W-# h X# r `# vc a?#h v bI#p 0 # op $# ,G %# N< &#  '# (z# : )#(] X &d  '?# H (# )# *# H +# ,#( -!#0 KB .<#8 /N#@  0w#H \ 1#P ,G 2#T~~-d~I?~~-?~O?!~ ?<~t'N~B #N     \ 0- tu.t#  /# 0# F 1# 2# B 3?# 4#( A! lB!# tuCt# D#z OL sP~# rQ# (\q s]~# t^# 8i sj~# rkO# sk   8 '% q LE z^ j"{T# +|# }?# Et # E #  # #(?n n ^  n z  F# :!# j"#   F# j"# "# 6# #   H}  F# O#"# ## 7 $# 1"%} #  H&* #( )F# -# #5# ";# w"A# G#$ .J#( ?"M#, P #0 "S#8 V #@ #Y#H :$\#P _#X !b#` $e#h !m#p %p#x $s # Gv# Hy# | # "# !# _## " #  # 4# Z# ## t$# # # # # # K$# ®# $ # e΄# D #  -+ .+ # E/+ # )\     ` Ma-# b-#\ q r # t\ #  #  # p N fHP/ R/# S # @T5#( E p  $# z#  # key # Fp  key # val w#G8[w p\w# b]}# ^# @_# `# ra# -b# d#$ e#( f#, g#08[, p\,# b]}# ^# @_# `# ra# -b# d#$ e#( f#, g8#02E]A^(   # c# >#  ?# $?# r# i# cfg #(4 H2 j"# n?#[ [# :?# ( c# =?# ?# id# 1" 8# pk!2#w$ t%# $# ?# 5 r 5# : ?# top ?# ts0 I]# s# rt# # % #  ?#  # r # sc # ra #\  . # : # 4.+#  p + p F; p?]3 w@.@ hhxd8.@\@@ linchdd\@a@HhȃP6HHargw@k`idinc\NQa@*@hP6HHargw@k`idinc\kX *@@`e!hH"6H@!rete!argw#x\3 ?X$ I@w%N@@!hNX!xNT!argOwH ,@ѐ@ h8hxd 9-ѐ@(@As9AXk92P&:-ha' 9?(@b@zs9zh(M @b@@@Ls@ziB\)o@Ñ@iCX)ˑ@@-&DDAHposEP*&@N@kH2@*@@nCT( S@@sSziU\)@p@iVX)x@T@&DWAHposZP*@@k]2@*T@@nVT'L kA@@tskzHidkD&DlAh&6sNP' xA@@`sxzHidxD&6yNPkzd&D{Ah' @o@@h9 ?o@@ sAcs &+ X&-H& ?l&=?hkn?d+ckP,0k[@ck  'u ?@@AszXn?Tcs H&DAhrc?d'. ?@C@szHI@i?l*@@cs `rc?\] 2C@@@sA}tt} ?}z?} ?}?l#k2`#ctx ;#i ?h*@қ@#it} h +2@@S!s+A~!t+t~" +?~"z,?~" ,?~.?l#k12X#off9?h#i:?d*Y@D@#it<~- W2@@!sWAH!tWt@" W?"zX?" X?#kZ2X.^ k@@`!skAX!kk2P   p&L5 B/tss7;-] @@uintztt4p7- ( k4# f4# s# l# a# h#   H ;# :!# j"n#   ;# j"n# "t# 6##HS H  ;# O#"t# ## 7 $# 1"%#H& #(m );# -n# #5t# ";n# w"At# G#$ .J#( ?"M#, Pm#0 "S#8 Vm#@ #Yn#H :$\n#P _n#X !bn#` $en#h !mn#p %pt#x $sm# Gv# Hy# |m# "# !# _#n# "m# m# 4t# Zt# ## t$# #m# n# # # K$t# # $m# en# Dt#z A ^(   # c# #  4# $4# r# i# cfg#( ;@$@@I;@h"@$@B@ wI@@hD4B@p@2Np@@IN@XN4T3NHoptPlh sס@arg]`n, fc!@@|08uintziik iX{m m?p}0Fc1M3T780 ?# # S# # # #( N#0 #8 B#@ #H r#P e#X \ #`  ##h  ?#p ?#t up#x M# D[# -)# o9# y&{# !/# (0# /1# 62# =3-# b#5?# 7?# 7 E# ## e0?# 9  O  / j" 0#len 1# ,G 2#  5ns 6#  7##  :ns ;# >ns ?#  @#  Cns D#  E#  H3  I#o  Lwns M# 1" N# z O#  P# < #  $#  %#  &-#  '?#  4ptr 5#w  8  9# : :#  ;?# G  +C -# ) .-# ( &hh '#t (w#w ( +h ,#t -w# ( 0h 1#t 2w#1 5op 6# 8 7# 8# 9#  :#  ;# "  H >h ?#t @w#ops A#( B#0opv C#8opc D#@ @ Gh H# K I# J# K# b L#t Mw#  Ph Q3#l R#H YR6 ZC [hdel \ ]z ^ _"P x U H V# 9 W-#h XO#r `# vc a?#hv b#p 0 #op $# ,G %# N< &#  '# (# : )#(] X& '?# H(# ) # *( # H+H # ,i #( - #0 KB. #8 / #@ 0#H \ 1#P ,G2#T- ?" " R H -. ?c c N ? " o ?     # N     \ 0-P tu.#  /# 0# F 1# 2# B 3?# 4#( A lB #tuC# D# O sP#rQR# (\ s]#t^w# 8i sj#rk# s k  R 8 P   %    E z j"{ # +| # }?# E # E #  #  #(?  R     %,  BRa0~ W1#lsn2#tm3~ # len4# |5# 8 tag9# :#op;# > tag?# @# DA# u>B# C#JF- _sxLL rMRtNw6HQ hdrR, #rowS # T #( U #@- X1 j"Y #fdZ1# [# z\# H]c# !^#( .`L #0 a- #x b # lc?# ?QQW] 7?Q i!#log$ #)#log$ #!E&lsn'# @(# +K j",# 6-# L.K# :/?# F# :!# j"#Q  F# j"# "# 6##HB  F# O#"# ## 7 $# 1"%B#HH&#( )F# -# #5# ";# w"A# G#$ .J#( ?"M#, P~ #0 "S#8 V~ #@ #Y#H :$\#P _#X !b#` $e#h !m#p %p#x $s~ # Gv# Hy# |~ # "# !# _## "~ # ~ # 4# Z# ## t$# #~ # # # # K$# # $~ # eΚ# Dϭ#N- .# E/#)    `C Ma-# b-#\ ql r# t# # C# C NfHP R# SC# @T#(l   H $# z#  #key H# FW key #val #G8[5p\5#b];# ^# @_# `# ra# -b# d#$ e#( f#, gA#0W8[p\#b];# ^# @_# `# ra# -b# d#$ e#( f#, g#0GA^(   # c# #  ?# $?# r# i# cfgY#(4 H j"#n?# # :?#(|c# =?# ?#id# 1" #pk!#w$t%A# $# ?# r # : ?#top ?# ts0 I#s|#rt# # % #  ?#  # r #sc l#ra#Pr#k# . # @@@hhxd@D@X linchdmD@j@hH6@arg k͇X i·\ incχTj@e@`hhH6@arg kX i\ incT!kP"e@ʧ@#hH$6@#ret#arg%x\!3 ?X& I@'Nʧ@@ I#hNX#xNT#argOH(>"@@k"`s"X v$]S)15?@ɩ@a5hb6`s6X<?ɩ@@@s<H *D@h kB`*6HP+ B posM\|   RV?@@a*6Xaw* \?T st`v igR u rci?\*:j?X, ߬@-` islH ssm@ r.l?@ʭ@*:$@ rc?l,@t?ʭ@IJ@`s} ?}z?}r" | nsl t`+& pB*DP kH*6 pos·D/@3@ key03@@ key oldX*S}%n0ɰ@7@* & "'?IJ@|@* #s'u$ 'u$'u$5(u$=(* u!6*aw! .?T%st2v%i:R u!:<?\%rc=?X& [G@-%r?" H%xs@0 @"b?|@J@  #sbX$ b P#ib?L%rcd?l"=u?J@@ !! x@%rc{?h& @!%i?l1?@@A!%rc?l Q! *Lf!  BA!2#3tss6o z@@uintztp$n#4# r #: 4#top 4#   4@B@@  t h B@v@U t h j4v@u@ t H $n@ 4 id&4T@@ p!lX Z/u@@`$ t/ h id/4d4 Bt4e$Vh  @"@|08uintziiX{?p}0Fc1M3T780 ?# # S# # # #( N#0 #8 B#@ #H r#P e#X \ #`   #h  ?#p ?#t up#x M# D[# -# o## y&{# !/# (0# /1# 62# =3-# b#5?# 7)# 7 E#  # e0?# #  9  /p j"0#len1# ,G2# 5ns6# 7## :ns;#>ns?# @# CnsD# E# H I#o LansM# 1"N# zO# P# < #  $#  %#  &-#  '?#  4ptr 5#a  8  9# : :#  ;?# G  +- -# ) .-# ( &Rh 'p#t (a#w ( +wh ,#t -a# ( 0h 1#t 2a#1 5op 6# 8 7# 8# 9#  :#  ;#   H >ih ?#t @a#ops A#( B#0opv Ci#8opc D#@ @ Gh H# K I# J# K# b L#t Ma#  Ph Q#l R#H Y<6 Z- [Rdel \w ]oz ^ _ P x U H V# 9 W-#h X9#r `# vc a?#hv b#p< % BRa 01 W 1#lsn 2#tm 31# len 4# | 5# 8ntag 9#  :#op ;#  >tag ?#  @# D A# u> B#  C#J F_sx Lr M<t Na6H QD hdr R#row S8#  Tn#(  UD #@ X j" Y#fd Z #  [# z \# H ] # ! ^; #( . `#0  a#x  b# l c?#?    J  ?;  D   x  F# :! # j" # A    F# j" # " # 6#  # x   H 2  F# O# "#  ## 7 $# 1" %2 #8  H & # (  )F#  -# # 5# " ;# w" A#  G#$ . J#( ?" M#,  P1#0 " S#8  V1#@ # Y#H :$ \#P _#X ! b#` $ e#h ! m#p % p#x $ s1# G v# H y#  |1# " # ! # _# # " 1#  1# 4 # Z # # # t$ # # 1#  # # # K$ #  ¹# $ 1# e Ώ# D ϝ # > - . # E/ # )     `3 Ma-# b-#\ q\ r # t # # 3# 3 NfHP R# S3# @T#(\   8 $# z#  #key 8# FG pkey #val #G8[%p\%#b]+# ^w# @_w# `w# raw# -bw# dw#$ ew#( fw#, g1#0Gw\A^(   # c# =#  ?# $?# r# i# cfgI #(w$t%1# $# ?# Cr C# : ?#top ?# ts0 I\#s#rt# # % #  ?#  # r #sc \#ra#PrC#k7# .J #"?@@fc"fXk"7Prc'?l`<@@ ch @BD@@rpC`   W@"@"cWfh w2 !LG  B""tssIS+$@#@D|08uintziiX{?p}0Fc1M3T780 ?# # S# # # #( N#0 #8 B#@ #H r#P e#X \ #`   #h  ?#p ?#t up#x M# D[# -# o## y&{# !/# (0# /1# 62# =3-# b#5?# 7)# 7 E#  # e0?# #  9  /p j" 0#len 1# ,G 2#  5ns 6#  7##  :ns ;# >ns ?#  @#  Cns D#  E#  H  I#o  Lans M# 1" N# z O#  P# < #  $#  %#  &-#  '?#  4ptr 5#a  8  9# : :#  ;?# G  +- -# ) .-# ( &Rh 'p#t (a#w ( +wh ,#t -a# ( 0h 1#t 2a#1 5op 6# 8 7# 8# 9#  :#  ;#   H >ih ?#t @a#ops A#( B#0opv Ci#8opc D#@ @ Gh H# K I# J# K# b L#t Ma#  Ph Q#l R#H Y<6 Z- [Rdel \w ]oz ^ _ P x U H V# 9 W-#h X9#r `# vc a?#hv b#p< % BRa 01 W 1#lsn 2#tm 31# len 4# | 5# 8ntag 9#  :#op ;#  >tag ?#  @# D A# u> B#  C#J F_sx Lr M<t Na6H QD hdr R#row S8#  Tn#(  UD #@ X j" Y#fd Z #  [# z \# H ] # ! ^; #( . `#0  a#x  b# l c?#?    J  ?;  D  x F# :!# j"#A   F# j"# "# 6# # x  H2  F# O#"# ## 7 $# 1"%2 #8  H& #( )F# -# #5# ";# w"A# G#$ .J#( ?"M#, P1#0 "S#8 V1#@ #Y#H :$\#P _#X !b#` $e#h !m#p %p#x $s1# Gv# Hy# |1# "# !# _## "1# 1# 4# Z# ## t$# #1# # # # K$# ¹# $1# eΏ# Dϝ # > - . # E/ # )     `3 Ma-# b-#\ q\ r # t # # 3# 3 NfHP R# S3# @T#(\   8 $# z#  #key 8# FG pkey #val #G8[%p\%#b]+# ^w# @_w# `w# raw# -bw# dw#$ ew#( fw#, g1#0Gw8[p\#b]+# ^w# @_w# `w# raw# -bw# dw#$ ew#( fw#, g#07 A^( {  # c# #  ?# $?# r# i# cfgI #(4 H j"{#n?#   # :?#(lc# =?# ?#id# 1" #pk!#w$t%1# $# ?# r # : ?#top ?# ts0 I #sl#rt# # % #  ?#  # r #sc \#ra#3 %$@B@h1hxwd B@`@@ hhxwd$?`@@ 4$ D$lsn$t$2,h-#row.n# h/apU?@w@!X4U H.U @rVkWDWlsnW rcY?d tch!h `B"@%@ rphX h X#?w@#@`!$ $6v$4 $X$.J t$:?T rc? iwP%@$3l ext~&@@T iwL'$D poswD( k r( $ t"e@@ nwH ) w $L `B* * f7* g7+tss!fHP|0<uzintffp} 0C 3Q 7<9 #   $#  %# M &#  xz q      5 @            ' e s     u  ! - V b n z! " # $ % & 6' E( V) E* O+ , - . {/ 0 1 2 3 4 5 6 o7 ;8 9 b:  )    w O ( 7 { { 1   C# :! # j" }#  ^  C# j" }# " # 6# ^#d H   C# O# "#  ## 7 $# 1" %#jH &u# (3  )C#  -}# # 5# " ;}# w" A#  G#$ . J#( ?" M#,  P3#0 " S#8  V3#@ # Y}#H :$ \}#P _}#X ! b}#` $ e}#h ! m}#p % p#x $ s3# G v# H y#  |3# " # ! # _# }# " 3#  3# 4 # Z # # # t$ # # 3#  }# # # K$ #  ¡# $ 3# e }# D :#@-o .o# E/o#F)     0A ~IF# KF# R1# LT#( KV#, \#-`* Ma1# b1#\ qS rF# t#~ ~# *#*t N fHP R# S*# @T#(St8k q# Mr#0 /J j"0#len1# ,G2# 5rns6# 7## :ns;#>ns?# @# CnsD# E# H I#o L; nsM# 1"N# zO# P# < # $# %}# &1# 'f# 4 ptr5 #;  8 9 # ::# ;f#  G + -{# ) .1# (&, h'J#t(; #w (+Q h,r#t-; # (0v h1#t2; #1 5 op6# 87# 8 # 9# :# ;}# t H>C h?#t@; #opsA}#( B#0opvCC #8opcD#@v  @G hH# K I # J# K}# b L#tM; #  P hQ#lR #P xUp HY" 6Z  [, del\Q  ]I z ^ _ HV}# 9 W1#hX#r` # vcaf#hvbp #p   key #val {#G8[Z p\Z #b]` # ^ # @_ # ` # ra # -b # d #$ e #( f #, gf #0|     A ^(  # c# l #  f# $f# r# i# cfg#(w$t%# C $}# f# xr x# : f#top f# ts0 I #s #rtC# # % #  f#  # r #sc S#ra#h[#EQ fsf]k< Q < V [ P#!V""G& f!V*(4 #I+N $;%:[vf&e$#'4#'6Q#'9#(')log, *e/2C Q*e1Ua %dwf+t&a f,-&4&.//0hJ@{@!(11h0|@@ "W`1h2f$p//0`;@@"1ph0`@@"1ph[2eU//0@C@@#>G1h0D@j@#mv1h2Qh//0vj@@$1h0vV@@`$1h3o1$@6@$14Mo1hF3f6@q@ %j4&1h31q@@%41h4k1`5v1@@%6+|{@@@&4|h61@@&74`6{@q@'4X41P7@o@8 B9ptr}ht 6S{q@@`'B4fBX41P7@@:`7@@:HhNF;@@'4fBX77@~@:`77@W@:Hh6S{@d@ (#4fBH41@7@[@9ptr{X6={d@@(d@@9uI2P7@B@?8@@ ,=&.sjj</A$kAkQA2kBk < 0C@R@@)&<1jX1tP1L1HBk1@111CD y&E^ f f ,D` >k>Qt:L @BqFtss:~IT@@$uintzttp( e 3 I# yI# l# l#f G&T x  X - < b   % 5 U  G3L,T@@)v,T~ (,n~ap.~o5@^@*#C"54~f5~54~5~ (6~@@^@@`*~o@h$@`@I\AP44`> fc~f@@&zuint|0>}0)37z>_@@*buf_X_oPpahcrcbd   z @b@ +fcrcÅ\bufPoHph ub@]@l+crcL@q;Hlil`\hd  )]@@+'\4.Pq;7Xhl'@@,,'l4.`q;7ha jc nc! rcY vc zc& ~c c<9 cRq c0 fc!d!@A'int&-zu|0iMM-p0-#~#S~#~#~# ~#( N~#0 ~#8 B~#@ ~#H r~#P e~#X \ #`  #h  -#p -#t u#x [# D4# -# o# y&# !/# (0# /1# 62# =3# b#5-# 7# 7E##e0-#    h#B@~#1"-#E B# h#  n#"~ e+( !S#o-##n#@#"#E# He+ G&ex X-<b%5 U  G3T#:!B#j"~#p T#j"~#"#6##Ha T#O#"##B#7 $B#1"%a#gH&#()T#-~##5#";~#w"A# GB#$.JB#(?"MB#,Pw#0"SB#8Vw#@#Y~#H:$\~#P _~#X!b~#`$e~#h!m~#p%p#x$sw#GvB#HyB#|w#"B#!B#_#~#"w#w#4#Z##B#t$B##w#~# B# B#K$#B#$w#e~#D#m#x  8 .r # !-# O-# B!-# #r $#"o"&7"" z  2$   $!%$?@"!W#"x,R#l$#  ! "C$#$$%]&"'@#()( *""+,"- #.!/I"0!1#8"-@`@, ahb`$`@j@, c h$I-j@Y@L-$ cI h }Y@@-r c1}r }c2}r } ~x}x-@ @ . ch- @Z@l. cgh-Z@@. ch$[e@XA,/c[ yopt[y[-y@@ blnn _ @@ bln ^@@ i32M|@@ i32M|@@ i32M{ @@D dblw{5@/@j i32M{O@W@ dblw{@@ blnB ]@~@ dbl[w{@@ i32eM{@@' i32sM{@@M dblw{@@s i32M{@@ i32M{@@ dblw{@@ dblw{@@  bln \@{@/ bln [@@U i32M{@@{ i32M{@@ dblw{!@!A i32)M{AAAA i327MzaAA blnE Z.AA8 i32^Mz#AA^ dbljwz#AA l|-T ar|-z y|H!"|@A A bln "A A l- ar-z y!" AA i32Mz" AA l- ar-z y!"AA i32Mz"AA l- ar-z y!"~PAAV l-~ ar-z y~!"~+AA l-~ ar-z ya~!#"a~A!A l-~ ar-z y~!"~A AI l-~ ar-z ya~!#"a~$A.A  bln }%Ab'A l-~ ar-z y~!"~"'A*A l-} ar-z ya}!#"a}.A+1A^ l-} ar-z y}!"}1A4A l-} ar-z ya}!#"a}5A8A l-} ar-z y}!!#}8AGA i32Mz9Ae;Av l -} ar -z y }!" };A>A l-} ar-z ya|!#"a|"?ACA l-| ar-z y|!!#|GAFJAf l'-| ar'-z y'|!"'|JAMA l+-| ar+-z y+a|!#"+a|"NARA l/-| ar/-y y/|!!#/|RF~XAYA/$FH bufG c ptrG~ c iH-\ #$#WYAX]A/+cW XoptWPW-LW@HWmW rXed! Yh%q#-X]A^AL0c XfhP-L@Hm!-d!Jh%F -^A^A0pc X4.~P-L@Hm!-d!Jh&^A&_A 1 ih%e ~&_AtAl1ihc `vX buf c'F_A~%$"-tAA1c" H!#P i#` res$-l(}A A,2c} Hopt}@!~P i~h%.- AA2$dst ~src ~!~ i~ߕAVA l-\ ar-~ yP!"H[A:A l-D ar-~ y!"AڜA4 l- ar-~ ya!#"aߜA@A l- ar-~ ya!#"aAtA l-~ ar-~ y~!!#~"yAA l-~ ar-~ y~!!#~)xAiA2qc H!P ih%\$d-iA³AL3s1d~hs2d~`%#p~³AA3[c1p c2p p-!fqP!pq@ i1qh i2q`!"r c Hk [ c#[ c"[ cp"[  c[ @c'[ `c8"[ c[ c"[ c{[ c[ c3$[  c [ @c [ `c$[ c![ c%[ c$[ c@[ cA[  c[ @c"[ `c![ cX#[ c"[ cy[ c-[ cS[  c#[ @cm$[ `c#[ c[ c [ c! [ c!D$[ c![  c!$ [ @c!^ [ `c!"[ c H !A# c! c!)   c!#" `c H! !" ! c!"' ! c!!#, ! `c Hn! !!1^! c!J"7^!  c(c~%AsBwK|08uzintii0nb##S### #( N#0 #8 B#@ #H r#P e#X \ #`  #h  b#p b#t up#x F# DT# -# o# y&{# !/# (0# /1# 62# =3-# b#5b# 7# 7E##e0b#u  n   h#  @ #1" b#E #h#  L# v"   e+( ! 1#o b## L#@ #" #E # v&e+ vG &Cx X-<b%5 U  O, ) #q; b# b# !* b#) b#@+ b#O, C- 9/ Nstre6f$gn&hb9/ Ibm* [ bp-&?(T*[)ww,E*h*.,0-}'(@^ /i#'׏#_0؏#*^#'b# +b#$%b#(V+b#,*b#0*b#4+b#8*b#<y0-*T?)Vb * u*# ~&i# )i# - -# x/!-# -"#( (##0 '$b#4 .%b#8 *&#@ S/'b#H .(b#L 20)b#P ,*b#T ++b#X G+,#` .-{#h r'.#p '%0b#x "(1b#| /3# f&4b# N&5b# ,7 #(8AA 4d,X(P;% AAAyyn8hyyp`i-bAAl4 '- ~% ~( ~%b~Q) 8@%!8hY)"8 (%`I,' /*b\FAhA yynIbAhA-Pb'Rb)SbyyxTbX&AAyypPyyibL8E $  &AA4 %hp,bd2% XO%P!d.bAA,5O%l(*b\(}Y*bX)bT4+bPV(zx- H( @/n. / ,8yyn b0 b% b(n-"m%m'-8m*b,;]A,6XA&A)A#)A(>AZ.'A 0A$&DA0JA*^A,A"< %A8~#@(c ~U-d2~A`A s&h8~`AAs&i8~3AAa $optA A $optAA $iAAB$str~$idx~AA $i~A!A"$i~AA$i~A+A$str}$idx~A*A$i~*A}A$i~AA$i~#p)~2(b~ E " 2 Q%j0bAA5z&O%h'msg`%(0A%A5&H'end@(0h$ptrX(&`S'%AAL6K0X@Pb he `)+AA6$Xph'$bAA 7 *def$0%P-%H%hc&`1"'b\`+EA_Al7^*defEXEPptrFh+,_AA7*defXptrh!&AA,8*fhiO%h%@0bd!A/A A84.O%h%@0bd!D)b A^A8$' O%/{\[-S3-]+b\yygH*-AK.CLA/HAA2Ak%0o^A_A(EbDA,A0_b@lAA-~{)b^AOBL9/O%yyg-\q]Y%bSib^(bLAkA &bH$AhAb*bAAi="bAAc@bDn@-AAi=[^,h%l{OBXB9O%l@/n{S[-o\yygpPB:B%vo],({XB.B :./{LO%@}-bSyygX[-\%oS)).BBl:*cb3-^O%[-SyygHBBY%b\-]q\+&BB:' /iHO%@yygX+6*-B B,;x'-XO%-Pyyg/h %M BB;O%MXyygOh!#.\BkB;$\iX\bTO%\Hb^h+a)xkBBL<j*bxXO%xPyygzh)-BB<*bX$iPO%H/blyyg`+(B} B =%*bXO%Pyygh+,} B Bl=v'XO%Pyygh+& B B=O%Xyygh). B0 B,>)O%X -bdyygh B. B.b`!/,0 BFB>,X,^PO%,Hb.h!&QFBxB>(QhO%Q`!/)^xBcBL?]+^H0^bDO%^b`PbufaXnb^`icbl)H(|cBlB?-|b\O%|Pyyg~hB#Bi=^`)H-lBB @O%Xyygh)+B Bl@P*msghO%`-_' B%B@O%Xyygh-:&b%BBAO%Xyygh-'bBBxA"O%Xyygh-+iBBAhO%Xyygh-)iBB8BO%Xyygh-+bB6BBO%Xyygh-:'6BSBB:O%Xyygh.s.SBtBXC,/XO%Pyyg h+/tBBC.b\O%Pyygh+, B`BD-' b\O% Pyyg"h.p(1`BBxD~01iXO%1Pyyg3h.(7BBD,7iXO%7Pyyg9h-'=bBB8E O%=Xyyg?h..CBBEf 'Cb\O%CPyygEh-"+K BBE O%KXyygMh.*QBBXF $'Q XO%QPyygSh!/^bBBF4!9-^4!h!l+{bBBG!)/{~9-{4!~.~~,9,bB$BxG!O%Xyygh![/b$BEBG"O%Xyygh!y)EBcB8Hc"^hO%`!N0cBBH"*ptrh^`O%X+&BBH"*ptrhO%`%-bBBXI<#'msg׏h&!*bd%,BfBI#'fhiX&j,P(Q%ލh%'fBBJ#&4.X&j,P(Q%h/\(B1BxJ $&Q%h)+1BPBJ=$Q%h)0PBjB8Ko$Q%h,;.bjB~BK$O%h*b~B_BK$O%X*sP*lbLp/)b_BBXL8%O%)X*s)T)5BsBL%*src5X5-Pdst6h(( c .%0Z&% B % % !)%% B % .& ,:& B %,C9& B % .N& 71'Nd&  B >& 9y& /Y& `B i& 9& 7L'b& B &.m& B i& 9& 2.w' B &a-'  B &/6' `B >& wK' ;.sa' B ;' v' -}'  B f' ' Q*'  B ' w' D%' B '''  B ' w( /(( B (&C( B ($buf c1*11.>S0Xint}0@zuin9#$c#%c#M&5# x q      5 @            ' e s     u  ! - V b n z! " # $ % & 6' E( V) E* O+ , - . {/ 0 1 2 3 4 5 6 o7 ;8 9 b: u+ \9   c$H1\Y(<SLL2#y## #zf1 int}03u  9#A$#%#M&#p )    w O ;U}}#2e#;mslogc1~2Z33 ~;M2m;YC^m:ome$m#4#6#9#'log,}e$+*e*=I*0 }d}_* y  yV  PA#V"QG&QV*QW I+]QWP3<6}#3R#P3Zf6<3@U1GlogGw3 GP306;8\36;A16MO3 (6  B  B Sq1x#q1}_eq1p_p1S_h_# '!3kC"C# Sk S2s#22i2p p p   $L % } }I%A G&6 'q|(| Q)c16 BK BM*qh'(|(+hJ@{@xM*h+|@@M(1*h,2tBB8Nd-2l'r(.$$.$ *+d1BBN*rh*|`*\'+(/e* 0+V2BGBN$ 5 *h*`0N$E Z ((+5 ;@@XO  *E h+5 @@O  *E h' ( .$0.0 6+ (1HBBP + * h* `* \1B8BxPM  2 ~- (8~3B6B4ap:~18BnBP  2 h- (A`5apAMX1nBB8Q  2 X G'  S (S .$M.M.2M67apQ m+ k2BBQ~  * ~*$ ~*/ ~*: ~3TBB8G ~'2  (S .$Y.Y/msgY.2Z+ 3BLBQ* S * h* `* \* P* X1LBBXRu  2 h ~0^U (S (+ @C@R  * h+ D@j@S  * h0h 0 (0 ( + j@@xS[ d * h+ V@@S  * h' ( .$i.i/msgi + 3BB8T * h* `* \* P''S(S.$p.p/msgp _+3B5 BT~*'h*1`*<\*GP''"#(0 .$k.k.2k9k+22L B BT&S"&#*X*P*L*H9k*@0<cx( (+S3 B!BXU*ch+S@1!B(!BU*ch0x(S(+2(!Be!BV!**h+2f!B!BxVPY*h0si~( (+Y2!B!BV*ih+Y4!B!B8W*ih :;y<;`>!  4  6!B7B\|0?uint5&fz5'F4(444  - U4. 6(/> N41F# 43[# m95[# 7# 49>#UNN =0< 7>U# 6@# KBx# 5D# F# H#(U5K =M#topO# 6Q#[UUN-k -=J=m f,p6U[!B"BW6UUh6g["B,"BW=gh7,"BE"BXXith=`D46FE"Bc"BX@66Uh4@c"B#BYp6@U`5JU#B#BxY=JXJPJ[L6LUh>5\#B#$BY=\Xit^Uh6_U`6sU#$B$B8Z=sX6sUPzs[L}4u[lx`7}U$B%BZ"}UXs4}FT6Uh5U%B%BZ"U`s4F\6%B'BX[6%44F5U`"UX6FTa5UHg4FD4F@5U_5Ue4F4F#5'B(B[6%4 5U`"UX6FTa5UHg4FD4F@'Br(B4Ue6U4F 5F4(BT)B\y6H*y@I5O z [lP 6 U` P6[\[!g50T)B)Bx\60X"dir0FTI50mP 62Uh#6QF)B+B\=Q|zQ[|Q|Q[|$ bC ;4XUh 6]| %4``*Bi+B 5lUX=N N-#/7U+B,B8]\ =|z[|$l  PC 6| %4h ;4U`=l N\ #y5F,B0B]q =|z[|$  :C 6| %4X 6UP s4FL%-B/BO [ E ;4UY/B"0B 6U@= N q &m60B0B] "ith#5 U0BN1BX^ "it h#4UN1B2B^# "ith'5<2B2B_ =<|5< | Z5>| 6AUh  4 '6L2B4Bx_ =L| Z5N| 6QUX$  /Cq (+4i4B6B_ 6iUQEj 6kD"dirkF 4m @ Jo  4q[\ 6r7PD N)56B7B8`=hZ6 `!"Ht8`|0Cukintx}zk 1}m ܢ &k (1} 0 3 # < K9 5I = 9 ; %9 )> ; : U> x; ; 7 ( 7TZ n 85&4(  8 8 >)TL;*  - U4.6(/6N41k#43n#m95n#7#496#FFX=0<7>#6@#KBy#5D#FT#  H#(U5K=M#topO#6Q#LX-9 #> $r# %r#M &# )N ;  x q      5 @            ' e s     u  ! - V b n z! " # $ % & 6' E( V) E* O+ , - . {/ 0 1 2 3 4 5 6 o7 ;8 9 b:p  )    w O 19d9d8 >9d+dr 0giI#6j#=k#opsl+#B9m# q>n#$=o#(= @+<#E#=9#arg#7#0:#4L<#8{<sZq;t#ur#n<y{<|;}<z#f#N7 z#i8#w9r#<#;#'<##; +set17Z=<6< L L +Dm7]c x x r 399+#f>R#:#;~D<9+#=#+;(<ops#oldr#:r#9# 2s  #!2fr   "2u  r r#2< kh #!  # k<$ <%V  &P #"V"L S ' 'G& i v ' k"V* '  -  (I+3  '  - ); #:  kk$ e$  #*4r#*6#*9 #+'rT [  ,log, x   -e/   r -e1     #d   k} .X   $ k / 0  $ $ 16Un7B/7B`l 26Uh1h9[n/7B@7B` 26[h1.=a@7BR7BXa 26ah36gnR7Bo7Ba 2=gh4Y:no7B7Bbz 2=nh24ny`25nX2>oP2Q;oH26p@3:7B@8Bxb 24yX25P2>H2Q;@2657B>8B6=h39k@8B8BbU 2=X2P28H3>à8B8B8c 2=h2znd47Ӭ8B8Bc 7it h2=`8S  9 9f' : hJ@{@c&/; h: |@@XdU^; h3748B:Bd24>X58B:B<[9 CC=b7h}X > $99f :;@@e3<;h:@@xebk;h > U99fk:q@C@e;h:qD@j@8f;h>h 99f :j@@fIR; h:V@@fx; h3<T:B@BXg2T>H7endTr@5;B@B<[9 5C=bWX6XP3;@BABgf2->H7endr@5@BAB=r_36>ABBBh2->H7endr@5ABBB=r\3<rBBCBxh52>H7endr@25BBvCB=strrX3;rCBCBh2>X7endrP5CBCB68rh69d38rCBDB8i2>h7endr`2X3:DBDBiZ2>H7endr@5)DBDB6\1}98DB>EBi2l1<έ>EBEBXj7bufέX2T5IEBEB6:h89?a=d>8@EBFBj?P;h; `4;FBFBk28h7oldr`2S<\29X19FBFGBxk7f˩X5FBDGB6=+hA7FGBHBk=27\2"8XA,8HB?HB8ly7op+h2"8dA\7?HBtHBl7argh7inr`7outX144:tHBHBl7argh7inr`7outXZ4?>HBIBXmc7argh7inr`7outX43<IB[IBm7argh7inr`7outXBs:[IBIBnCarghCinr`CoutXB1;IBIBxnICarghCinr`CoutXD=IBJBnCarghCinr`CoutXDE:!JBJB8oCarg!hCin"r`Cout#XD8)JBOKBoKE)LXCop)+P5JBMKBF8,hD[<3OKBLBoE3LHCop3+@5KBKBF86XD<BLBPLBXpEBLhCopB+`D7IPLBNOBpjEILCopI+5cLBEOBF8MXGargOPF9PLD<wNOBRBqEwLCopw+5aOBRBF8zXF9}TGargHFrGendr@<[9- C}-XH78RBwSBxqE->XCendrPE:8H5RBuSBF5rh5 SB0SBGlen8`H7wSBsTBqE5EE8Ez85SBqTBFLhF`FEX<[9 `CF8r@GendrPF9L}XBr=sTBTB8rCctxhCmem`I==TBUBrELEA;rE=rE:5TBUBF9`F8rHGendrXF9T5JUBUBGilD[;UBVBrhEL|5UBVBGit|F6h5UBSVBF8`F9 \De:VBEYBXszEL|E9|5VBBYBFA7@F:lGit|F6`<[9z QC5 WBXBF8!F:#F9$F8(rXF<)PGop++HD8_EYB\BsE_LHEl>_r@E%=`r5\YB\BGopm+XFx7n+PJ:7L\B]BtEIXE6PEl>rHE%=r@E=rE;rE=Eg=E:5]B]BFLh<[9  C}XI:?8]B]BxtA ELhE9`>sQ f 9f 9f :A 2!B!Bt  ;Q h:A 4!B!B8u  ;Q hK9]B%^Bu!E:klE:khL==%^B:^Bu-!MN y"! Z! k r k r r/N` >g!:!r}!X OL=dm! c~!X F39! cP 8cl'>?<^B_hBeh|08uintziiX{p0  ?# # S# # # #( N#0 #8 B#@ #H r#P e#X \ #`  #h  ?#p ?#t up#x M# D[# -# o# y&{# !/# (0# /1# 62# =3-# b#5?# 7# 7  E# # e0?# G +0 -# ) .-#}0Fc1M3T78 / j" 0F# len 1F# ,G 2F#  5 ns 6F#  7F# #  : ns ;F#  > ns ?F#  @F#  C% ns DF#  EF#  H@  IF# o  L ns MF# 1" NF# z OF#  PF# < #  $F#  %#  &-#  '?#   4 ptr 5#  8!  9!# : :F#  ;?#  ( &L h '# t (# w ( +q h ,# t -#  ( 0 h 1# t 2# 1 5 op 60# 8 7F# 8# 9F#  :F#  ;# H >c h ?# t @# ops A#( BF#0 opv Cc#8 opc DF#@ @ G h H%# K I# JF# K# b LF# t M#  P h Q@# l R#H Y66 Z' [Ldel \q ]iz ^ _ P x U H V# 9 W-# h X\# r `# vc a?#h v b#p % BR a 0% W 1F# lsn 2Q# tm 3%# len 4F# | 5F#  8b tag 9;#  :Q# op ;;#  > tag ?;#  @Q# D AF# u> BF#  CF#J F_sx Lr M6t N 6H Q8 hdr R# row S,#  Tb#(  U8 #@  X j" Y# fd Z #  [# z \# H ] # ! ^/ #( . `#0  a#x  b# l c?#?    > F ?/  F8  >*a j"+# 2,#>-<^B^BXv $-Xext0h@;?^B^Bv l; he;d>F?^B_Bw0 lF XFPGFl>X?_B:bBxw lX HbufX @X ^h_FXWtF`|F\g`B`Bce?d??:bBcBw\ l Hbuf@F8 c?\`off-Xrc?l(@?cBcB8x l XbufPFL8 @tuh>/ cBZdBx/ l H8 @bufď`F\rc?l?/ ZdBdBxh l hR??dBdBXy l heۖd>dB4gByRl }$}j"}@@J?rc`LhfBfBbuf R}b@4gBgBz l h!> ?gBgBxz l  h"z `#&gBgBz  l& h!?;gBKhB8{i l; XgB*hBmsg=R @c#>F?KhB_hB{ lF h5 $n?/  c%*&B C'F&C C)A@?`hB6nBvkuintz@-^4p7-@ Ae#Dp# AB#A ;#@! #  { DIR$ @ !CE&llsn'#@(# +j",*#6-#L.#:/4#C@-`hBhB{d-hj"-*dl@4hBQiBX|Gd4XhBOiBi:4l@E4QiBDjB|dEXtopFP@FHlsnF@.Nh)AW4DjBjB} _aWX_bWPaX hbY `C A_4jBmBx}d_}6_}dirchlBdepgPdeh}rci4dtopi4}$kBvlBextq}lsnX@4mBdmB}(dhout(`@4dmB6nB8~dXlsnPout(H.4l:4hc+rA?8nBtpBm|08uintziik iX{m mp0 ?# # S# # # #( N#0 #8 B#@ #H r#P e#X \ #`  #h  ?#p ?#t up#x M# D[# -# o# y&{# !/# (0# /1# 62# =3-# b#5?# 7# 7 E# # e0?#    G +A -# ) .-#}0Fc1M3T78 / j" 0W#len 1W# ,G 2W#  5ns 6W#  7W##  :ns ;W# >ns ?W#  @W#  C6ns DW#  EW#  HQ  IW#o  Lns MW# 1" NW# z OW#  PW# < #  $W#  %#  &-#  '?#  4ptr 5#  82  92# : :W#  ;?#  ( &]h '#t (#w ( +h ,#t -# ( 0h 1#t 2#1 5op 6A# 8 7W# 8# 9W#  :W#  ;#   H >th ?#t @#ops A#( BW#0opv Ct#8opc DW#@ @ Gh H6# K I# JW# K# b LW#t M#  Ph QQ#l R#H YG6 Z8 []del \ ]zz ^ _P x U H V# 9 W-#h Xm#r `# vc a?#hv b#p 0 #op $W# ,G %W# N< &W#  '# (# : )W#(] X &  '?# H (# )# * # H += # ,^ #( -y #0 KB . #8 / #@  0#H \ 1W#P ,G 2W#T-?  G = -# ?X X C ?y  d ?    %  BRa0; W1W#lsn2b#tm3; # len4W# |5W# 8x tag9L# :b#op;L# > tag?L# @b# DAW# u>BW# CW#JF _sxL rMGtN6HQN hdrR #rowSB # Tx #( UN #@ X j"Y #fdZ # [# z\# H] # !^E #( .` #0 a #x b # lc?#?    T W ?E  WN & !#f log$T #DA.8nBznB~ s.Xsx/ hK aA6?znBnB~ s6Xr6 Psx8 hrow: ` ANnBoBXG sNXP?lAq?oBpB sqX$qPsxr hApB&pB sXsx h RA &pB>pBxshA>pB\pB؀7sh!5A?\pBtpB8shck-cB?tpBrBp|08uintziik iX{m mp0 ?# # S# # # #( N#0 #8 B#@ #H r#P e#X \ #`  #h  ?#p ?#t up#x M# D[# -# o# y&{# !/# (0# /1# 62# =3-# b#5?# 7# 7 E# # e0?#    G +A -# ) .-#}0Fc1M3T78 / j" 0W#len 1W# ,G 2W#  5ns 6W#  7W##  :ns ;W# >ns ?W#  @W#  C6ns DW#  EW#  HQ  IW#o  Lns MW# 1" NW# z OW#  PW# < #  $W#  %#  &-#  '?#  4ptr 5#  82  92# : :W#  ;?#  ( &]h '#t (#w ( +h ,#t -# ( 0h 1#t 2#1 5op 6A# 8 7W# 8# 9W#  :W#  ;#   H >th ?#t @#ops A#( BW#0opv Ct#8opc DW#@ @ Gh H6# K I# JW# K# b LW#t M#  Ph QQ#l R#H YG6 Z8 []del \ ]zz ^ _P x U H V# 9 W-#h Xm#r `# vc a?#hv b#p 0 #op $W# ,G %W# N< &W#  '# (# : )W#(] X &  '?# H (# )# * # H += # ,^ #( -y #0 KB . #8 / #@  0#H \ 1W#P ,G 2W#T-?  G = -# ?X X C ?y  d ?    %  BRa0; W1W#lsn2b#tm3; # len4W# |5W# 8x tag9L# :b#op;L# > tag?L# @b# DAW# u>BW# CW#JF _sxL rMGtN6HQN hdrR #rowSB # Tx #( UN #@ X j"Y #fdZ # [# z\# H] # !^E #( .` #0 a #x b # lc?#?    T W ?E  WN & )#f log$T #B.tpBpB s.Xss/ hK >B6?pBqB s6Xt6Pss8 hrow: ` VBNqBrBXG sNXP?lBq?rBh ns?# @# C nsD# E# H I#o L nsM# 1"N# zO# P# < #4 $# %# &)# ';# 4O ptr5O# 8 9# ::# ;;# 4G + -s# ) .)# ( & h '# t (#w ( + h ,&# t -# ( 0* h 1@# t 2#1 5 op 6# 8 7# 8# 9#  :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@* @ GZ h H# K I# J# K# b L# t M#  P h Q# l RU# H Y6 Z [del \ ]z ^Z _P x U$ H V# 9 W)# h X# r `# vc a;#h v b$#p 0 # op $# ,G %# N< &#  '# (U# : )#(] X &?  ';# H (_# )# *# H +# ,#( -#0 KB .#8 /)#@  0s#H \ 1#P ,G 2#TYY)?Y$;eYY);Y*;Y;YO)Y  #ZN     \ 0 - tu .O#  /#  0# F 1# 2# B 3;# 4#(  A l B# tu CO# D#U O' s PY# r Q# ( \L s ]Y# t ^# 8 iq s jY# r k*#  sk   8 Z  % L 'E z9 j" {/# + |q#  };# E O # E a # a #  #(;I I 9 a I U QF,I ȀBEB i,I hE:;EBB i:I Xip; hZEbBaBX ibI Xipc hE yI aBڃBe iyI XtyOPip hWE;ڃB@B iI Xil hF@BaBx iI Xil h I aBڄB،1 iI XlPil hE;ڄB[B8} iI Xir} hrc;dLjE[BB iI Xir} h I BB iI XsYPir} hE;BBXV iI XirV hrc;dEBB iI XirV h I BBB iI XsYPirV hF ;BBÇBx4 i I Xis 4 hrc;d'xFÇBB؏x iI Xis4 h  +I BvB8 i+I Xs+YPis34 h!jFAvBB iAI h EU;B؈B.iUI h!_Fd؈BBX_idI h"~EvI BBivI XtvOP#1"vL$x;lj4FBBy|04uintzk em mup}0B3P / j"0# len1# ,G2# 5& ns6# 7## :@ ns;#>h ns?# @# C nsD# E# H I#o L nsM# 1"N# zO# P# < #4 $# %# &)# ';# 4O ptr5O# 8 9# ::# ;;# 4G + -s# ) .)# ( & h '# t (#w ( + h ,&# t -# ( 0* h 1@# t 2#1 5 op 6# 8 7# 8# 9#  :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@* @ GZ h H# K I# J# K# b L# t M#  P h Q# l RU# H Y6 Z [del \ ]z ^Z _P x U$ H V# 9 W)# h X# r `# vc a;#h v b$#p 0 # op $# ,G %# N< &#  '# (U# : )#(] X &?  ';# H (_# )# *# H +# ,#( -#0 KB .#8 /)#@  0s#H \ 1#P ,G 2#TYY)?Y$;eYY);Y*;Y;YO)Y!G6B̉B~s6YX,G6Told8lFFỶB=BxsFYh2G\=BBؒs\Yhq5GB)B{|04uintzk em mup3P< #$#%#&)#';# 4 ptr5# 8N9N#::#;;#  /j"0# len1#,G2#cG!  s  0# op$#,G%#N<&#'# (#:)#( G/BB8E r/Eh TG:BߊBz r:EhoGK;ߊBBL rKE rcvK ptrKshdrMTP\bufPphdi`GBp~GLt@BGBTBX ptrX bufPHsrchoff`s ;TB)B\ rE bufÀ) off\hdrbhOG)Xptrh@rc;d)Tsl 6HH,B?BA~|04uintzk em mup}0B3P /j"0# len1#,G2# 5 ns6#7## :5 ns;#>] ns?#@# C nsD#E# HI#o L nsM#1"N#zO#P# < #)$#%#&)#';# 4D ptr5D# 89#::#;;# )G + -s#) .)#H $  s  ( & h '# t (#w ( +% h ,# t -# ( 0J h 15# t 2#1 5 op 6#8 7# 8# 9# :# ;#  l H > h ?]# t @# ops A#( B#0 opv C#8 opc D#@J @ Gz h H#K I# J#  K#b L# t M#  P h Q# l RJ#H Y6 Z [del \% ]z ^z _P x UDH V#9 W)# h X# r `# vc a;#h v bD#pG2,BPByr2yhH?PBݐBxr?yhHwݐBBؕrwyhbufw`w)X };BĒB8cr}yXrcv}Pptr}sHlbuf`w ;ĒBBryXrcvPptrsHlbuf` ;B@B7ryXrcvðPptrsHDZlbufȀ` ;@BMBXryHrcv@ptrslbuf`#BF ;\ ;MBBryrcvptrs\buf P=ϚBi&l:&Loff'hj,d,H-`tu6DBYB /B 0;D E;BB rEyrcvEptrEsK\bufLPBiRlRLksShHbDpp`BB  UB V;HB͝BoprF z; (H;BBxp ryhrcv`ptrsXhdrp P9HB`Bؘ ptr XbufP!Hsrchoff `s P ;`B?B8 rybuf!)off hdrp OG)Xptr @rc;dBBHp h)"s lO8H@BBuintznnp3EH&0@BBbuf&|h &` HKBB!bufKhh Kd H\0BBX \l9wINJBϱB|08uzintiicb##S### #( N#0 #8 B#@ #H r#P e#X \ #`  #h  b#p b#t up#x F# DT# -# o# y&{# !/# (0# /1# 62# =3-# b#5b# 7# 7E##e0b#j  c   b bp J( jkey!b#"b#J##:I$#nI%#JI&# J( HJ*key+b#arg,#J.uJ0BB0~30~I0~I1~7JzBJ̜BJʳB%B9BK3X"J4-PB BJ>H9BBKI@ KJJK٦BЪBPJV:IWB B.IZI[ҨBfBBJ}JJ~\BΫBBJ~ j @I-BݭBIXkeybTIٴh:-`I-ݭB9BxIXkeybTargHIh:-`OI9BB؛IXkeybTi-HIhJ-BJB8sIHkeybDJJ-ZIXJhI`dI JBdBI hEIdBϱBI~optXJ,JJBBJ J!W:I)аBBJI6HBxBp8@    .;KLбBBint}0T3mzuwB|0t-.#E/#)     0AZ~I#K#R# LTb#(KVI#,\I#-`Ma#b#\ qr#tZ#  ##   BB   p;##S### #(N#0#8B#@#Hr#Pe#X\ $#` *#h ;#p;#tu#x[#D-#-0#o@#y&#!/#(0#/1#62#=3#b#5;#7F#7$E$#*#e0;# @  V 8бBBX8hLBB8BMBh&B`$MZ8BwB&Zh0KbwBʲBx6MbX6KdhoʲBܲB؞jMohZKܲBB8&h;B&B&hLf&BKBfhZKBuBX88huBBhk`BBKIBBx͆h C   M{BgBءEKI\U C U E?L5gBB8ptr5XK5IT 8C"8{h:`   MLABB,AX< C <  ,LNB}BNhN` CMW}B BXWhW`K` B B `hzLf B{B\ fXKh CdLn{BݷBx nhKnIdnX  C,KxݷB_Bؤ6 "xq;xF  CB\Bbuf{K  F 6 [ ?PK_B|B8 KIL  C`maphzXP    YL|B޹B8 h8  CK޹BB H@  -CpLIoi=`^LXeKB˻BX4 ÓXP^LH4  CLhK˻BB ϓX׻BBiIoKBB( ד`htmpH1BEB ( XBB( P.  $ > : ; I : ;  : ; I8 I!I/ .? : ; ' @B  : ; I 4: ; I  : ;  : ; I4: ; I  I&I.? : ; ' @B : ; I I% : ; I$ > $ >   I&I : ;  : ; I8  : ;   : ;  ( I!I/  : ; I8 !I : ;  : ; .: ; ' @B : ; I .: ; ' @B .: ; ' I@B : ; I .: ; ' I@B 4: ; I 4: ;I .: ;' @B : ;I .? : ;' @B 4: ;I .? : ;I@B  !.? : ;' I@B ": ;I #.: ; ' @B $.? : ; ' @B %.? : ; ' I@B & : ; '4: ; I (4: ; I?  % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ;  : ; (  : ; I8 .? : ; ' I@B : ; I 4: ; I 4: ; I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; (  : ;  : ; !I : ;  : ; .: ; ' I@B : ; I : ; I .: ; ' I@B 4: ; I 4: ;I .: ;' I@B !: ;I ": ;I #4: ;I $ : ;%.: ;' @B &4: ; I '.? : ; ' I@B (.? : ; ' @B ) * + U, U-.? : ;' I@B ..? : ;' @B /4: ; I? < % $ > $ >   I&I: ; I&  : ;  : ; I8 : ; I8  : ;   : ; ( .? : ; ' @B : ; I .? : ; ' I@B .? : ; ' I@B 4: ; I  : ; 4: ; I % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ;  : ;  : ; !I : ; .: ; ' I@B : ; I : ; I .: ; ' I@B  4: ; I !4: ;I ".: ;' I@B #: ;I $: ;I %4: ;I & : ;'.: ;' @B (.? : ; ' I@B ).? : ; ' I@B *4: ; I +4I4  , : ; - U.!I// 0 1.? : ;' I@B 24: ; I? < 34: ; I? < % $ > $ >   I : ;  : ; I8  : ; I8 .? : ; ' I@B  : ; I .? : ; ' @B  : ; I 4: ; I  4I4  I!I/ &I% : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;  : ; !I : ; .? : ; ' I@B : ; I 4: ; I 4I4    .? : ; ' @B !4: ; I "4: ; I? < % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;  : ; !I : ; .: ; ' I@B : ; I .: ; ' I@B : ; I  : ;  4: ; I !4I4  " #.? : ; ' I@B $4: ; I % : ; & ' U( U)!I/*4: ; I? < +4: ; I? < % UR: ; I$ > $ >   I&I : ;  : ; I8  : ;  ( I I : ;  : ; I!I/  : ; I8  : ;  : ; I : ; I : ;  : ; I8 2 .? 4 < dI4 .? L 4 < d.? : ; < d/I : ;  I8 4 !.? : ; < d".? : ; L < d#.? : ; @I< d$< %.? L 4 < d& I' : ; I8 2 (.? : ; @I< d).? : ; @L M < d*.? : ; 2 < d+!I/,- I..G d/I4 0.1@@dB 11 2.G: ; d3.: ; I@B 4: ; I 5.: ; I@B 6.: ; I@B 7 84I4  94: ; I :4: ; I ;.: ; @B <: ; I =.? : ; I@B > ?4I @< A: ; IB: ; C!D4: ; I? < EF4: ; I? < % $ > $ >   I&I: ; II !I/  : ;  : ; I8  : ;  ( .? : ; ' @B : ; I : ; I 4: ; I .? : ; ' @B ' I4: ; I?  % $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?  % $ > $ > : ; I I  : ;  : ; I8 : ;I8 : ; I !I/  : ; (  : ;  : ; I : ;  : ;  : ; : ;: ;I.: ; ' I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .: ; ' I@B .: ;' I@B : ;I : ;I   4: ;I !4: ;I " #!I/$.: ;' @B %.? : ;' I@B &.? : ;I@B ' : ;(.: ;' @B ).? : ;' @B % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I : ; (  : ;  : ; I : ;  : ;  : ; I: ;I : ; : ;I : ;.: ;' I@B : ;I  : ; 4: ;I 4: ;I   .: ;' @B !.? : ;' I@B " U# U$4: ; I %.: ; ' I@B &: ; I ': ; I (4: ; I ).: ;' @B *: ;I +.? : ;' @B ,.: ;' I@B -.? : ;' I@B ..? : ;' @B /.: ; ' @B 0!I/14: ; I? < % $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?  % UR: ; II!I/ $ >  : ;  : ; I8  $ >  &I  I  : ;  (  : ; I8 2  : ; I8 2 .? 4 < dI4 I.? : ; @L M < d.? : ; @I< d.? : ; < d.? L 4 < d.? : ; 2 < d I : ;  I8 4 .? : ; L < d.? : ; @I< d.? : ; @2 < d .? L 4 < d!.? : ; < d"#/I$!I/%I& I'.G d(I4 ).1@@dB *1 +.1@@dB ,.: ; I@B -: ; I .: ; I/: ; I0.G: ; d1.G@dB 2I4  3 44: ; I 5: ; I 6 74: ; I841 9: ; :!;4: ; I? < <% $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/  : ;  : ; I8 &I.: ; ' I@B : ; I .: ; ' I@B .: ; ' @B : ; I .: ; ' @B 4: ; I .? : ; ' @B 4: ; I  U .: ;' I@B : ;I 4: ;I !.: ;' I@B ": ;I #.? : ;' I@B $4I4  % &.: ;' @B '.? : ;' @B (.: ;' @B ).? : ;' @B % UR$ > : ; I&I$ >  I  : ;  (  : ;  I I  : ;  : ; I8 I!I/  : ;  : ; I8 9.: ; < dI4 4: ; I< :: ;  : ;  : ;  : ; I I8  : ;  : ; I : ;  I8 2 !.? 4 < d".? : ; < d#.? L 4 < d$ I% : ; & I8 4 '.? : ; L < d(.? : ; @I< d)< * : ; I8 2 +.? : ; @I< d,.? : ; @L M < d-.? : ; 2 < d.!I//0 I1.: ; I@B 2: ; I 3.: ; I@B 4.: ; @B 5 64: ; I 7: ; I 8.G d9I4 :.1@@dB ;1 <4I4  =4: ; I >.G: ; d?: ; I@.1@dB A.: ; @B B.: ;@B C: ;I D.: ;@B E: ;I F4: ;I G4: ;I H.: ;I@B I.? : ;@@B J.? : ;@I@B K.4 @B L.4 @B M!N4: ; I? < O4: ; I?  P4G % : ; I$ > $ >   II!I/  : ;  : ; I8 : ;I8 : ; : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;.? : ; ' I@B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I  4: ;I .? : ;' @B  : ;I !.? : ;' I@B ": ;I #.? : ;' I@B $4: ;I %4: ; I? < &4: ; I?  '&I% $ > $ > : ; I I& : ;  : ; I8 I !I/ : ; I <  : ; (  : ;  : ; I8 .? : ; ' @B : ; I : ; I .? : ; ' @B  4: ; I .: ; ' I@B 4: ; I .: ; ' I@B &I.? : ; ' I@B  : ; .? : ; ' I@B .? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I% $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I& : ; I8 .? : ; ' I@B : ; I 4: ; I  : ;    U.? : ; ' I@B : ; I .? : ;' @B : ;I 4: ;I 4: ;I 4: ; I? < % $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  &I : ;I8 : ; .: ; ' @B : ; I .: ; ' @B .: ; ' I@B 4: ; I .: ; I@B .: ; ' I@B 4I4  .? : ; ' I@B : ; I  4: ; I .? : ; ' @B  4: ;I .? : ;' I@B !: ;I ".? : ;' @B #4: ; I? < % $ > : ; I$ >   : ;  : ; I8  I  : ;  I !I/ .: ; ' @B  : ; I .: ; ' @B .: ; ' I@B .: ; I@B .: ; ' I@B .? : ; ' I@B 4: ; I .? : ; ' @B 4: ; I   &I4I4   /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/include/x86_64-linux-gnu/syssha1.csha1.htypes.h U@1 CZ441"Y/g/Ju64-JkKu/Kr2u$-JkYYz| /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgrlist.hslab_cache.hregion.hmhash.hmain.cstddef.htypes.htime.htypes.hstdint.hmalloc.htarantool_box_cfg.hkey.hhash.hoptions.hspace.href.hts.h  p@8+..U..g=.M=2Z5YtM=YJv6g/2T9=t=6I5Mt/(K/2/g'DK2gD23[6(0G*x JuyYL+ $f<uܯugD׻u'v0Y3/S}.g=.M=2.Z5YtM=Y.Jv6g/2.T9=t=6I5Mt/(K/2/g'DK2gD23[6((G*x JuyYL+ $f<uܯugD׻u'v0Y3/S|.K===2guY2K2KY2!"'1Z$ug!ggɃiihYɠY= /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgconfig.cstddef.htypes.htypes.hstdint.hstdio.hlibio.htarantool_box_cfg.hoptions.h 0@+uuuu1gu/gu/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/smallmhash.hspace.hspace.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htarantool_box_cfg.hrlist.hslab_cache.h region.h key.hhash.hoptions.href.hts.hsha1.h @3g=.M=2Z5YtM=YJv6g/2T9=t]=K* 1G5&uu)\(C! =y=6I5M~t.(K)=uY15Ju/6IvzJtJJ  5Jf.w5Ju/6IvzJ pJ  5Jf.vuuYL!0YɃK2KvKvKuY20swz"%gɟuwuYugK0Zu0K0K0fJ# fgʟiY1/Ku=Ku=vvYguY1u/tugqJ$Y3,uuɅuZ;堟pJ.h3=3,uugɄuuZ;堟%oJ.3=30"uu$YKw*j /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgoptions.ctypes.hstdint.hgopt.htarantool_box_cfg.hoptions.h @:Y01KY2/Y[Y\g1Y$( /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/smallmhash.hindexate.cstddef.htypes.htypes.hstdint.hstdio.hlibio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htnt_log.htnt_xlog.htnt_snapshot.htnt_dir.htarantool_box_cfg.hrlist.hslab_cache.h region.h key.hhash.hoptions.hspace.href.hts.hcursor.h @3g=.M=2.Z5YtM=Y.Jv6g/2.T9=t]=K* 1G5&uu)\(C! =y=6I5M}tɃv$>LYA=,4s"Ku,#/v2s+gɟuuYs'*gs#sJfs ɢg2=g0hs#2%u000uu=&uX#/YZ//]!0u//3/1u&uv#/|3/2gɟuuYsg!L=uZ#*rfy fs ɢ0<fgZg:gpJ=2ggyu/Iggmt 2guguYp /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantarref.cref.h @ uuY11=!&u$u=w=( /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/smallcursor.cstddef.htypes.htypes.hstdint.hstdio.hlibio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_log.htarantool_box_cfg.hrlist.hslab_cache.h region.h key.hhash.hmhash.hoptions.hspace.href.hts.hcursor.h @"JtXgg#vK#vY2Z0vK2>"z 'v /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/smallmhash.hsnapshot.cstddef.htypes.htypes.hstdint.hstdio.hlibio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_log.htarantool_box_cfg.hrlist.hslab_cache.h region.h key.hhash.hoptions.hspace.href.hts.h $@,.hy} tf <sf=?#w'w4g塄ػZ0vY1tɟ/uuw5JuY:Z*MY>u[ɠK\sJtXgZ/OJ8J  5Jf:.ZZgZuuKt<#  .l /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/usr/include/x86_64-linux-gnu/bitsobject.hexception.hrlist.hslab_cache.hregion.hupdate.ccstddef.htypes.hstdint.herrcode.hsay.htuple_update.htarantool_box_cfg.htnt_proto.h tnt_tuple.h uio.h tnt_request.h hash.hmhash.hoptions.hspace.href.hts.h J@% |@% @## @# @# D@ j@# @ $@".<tX=.B.K23%| =K6ggM/5,./gx"1~2u tӽ~NO<uuvZ .uwouzX @6Tj+ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgcompat.cstdarg.hprscfg.h T@+1'--'4h  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includecrc32.cstddef.hstdint.h @u/+Y./+=.K"eJ!KKO;ZZ:]kJ"eJ=4#gZ/=4!gZ># /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitstarantool_box_cfg.cstdint.hstddef.htypes.hstdio.hlibio.hprscfg.htarantool_box_cfg.h @/utztttY1vɭɻ׭1vK!!KKKKuKK׭KY11Y1KuY1KuY.ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu$..Kvɟu$..Kvɟu$..vɟu. ɟhɟu$..Kvɟu. ɟhɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu. ɟɟu$..uɟu$..ɟu. ɟɟu$..uɟu$..uɟu.YJX<gɟu. ɟɟu. ɟ#ɟusLsLsLsLsLsLsLsLhZɟusLsLsLsLsLsLsLsLhZɟu$..uɟu$..uɟu. ɟɟu#(.YJX<gɟu$..uɟu$..uɟusLsLsLsLsLsLsLsLhZɟu$..ɟu. ɟɟu.YJX<gןt  . t 7 t7%Zɟ.t  . - P tC>5YYsLsLsLsLsLsLsLsLh74ɟ.t  . - P tC>5YY$..67ɟ.t  . - P tC>5YY$..67ן1  . 6 Y I&JA5Y?   1  a ^&JFZɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcWchSVZJXK<Wɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcWsLsLsLsLsLsLsLsL\Yן4"  . 6 \ L&JA5YV&  1 : ~ n&JcWa   S $  &JhZɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcW|*  S A  &J}$..~ɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcW|*  S A  &J}y|JXK<ywtX0YvYfNUTuzYw؄YhZ'Z'Z'Z'Z'Z'Z'Z'Z't0'tX.@@@@@@@@@@#P3/1gtttuttu%1gtttuttu%.tuYK1?" Xuɻ=u==tX!+ Xuɻ===tX!u====)====*)==2==*+ Xuɻ=u Xuɻ=u Xuɻ= Xuɻ= Xuɻ=u Xuɻ===tX!"==-,==#==#==-2==#"==#5JXu=u==-"==-3==tX!,==tX!2==#"==#+==-2JXu=+==#+==#"==tX!)==#<==-=JXu=2 <'==&-!"==:"==:"+>>CXu>=,===D!,BU"==h6UZXuU=6"(z.[" y.[$0Y2vKY/&K'KYBK&B@K=K>KYYKK&TKKYWKKh>UI'<>'1=YE+YtBYUr>h'3.JXK.JXK===Y=Y.JX.JX.JX.JX.JX.JXK.X.tX./.X.tX./.X.tX./!gt  . t 7 t7%Y*t  . ) L t?:NPOO,15t  - t Q tQ?YDt  - ) f tYTGJLXKGGFKOt  G  q nYYd  G 5  |&JqadfXKaaw  ae GT 0-Y//0=Z+Y>ABYUXTz UA=l>*&`#'03tuttX0w/1/=3+=!$!,g!",!53$=2g$<ugu"g$5u"u:g%g$2$3<5u"u+g$5%3u+u2,guDg$Mg%5YH,F3FCY<v=Y^^sBUwBK\+:&eI+,@#7<fwY ] /usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/x86_64-linux-gnu/sysy.tab.cprscfg.yprscfg_scan.cprscfg.lstddef.htypes.hstdio.hlibio.hprscfg.hprscfg.cy.tab.htypes.h A情*u=Y'*uqf@ u#.tɣftX>hhu0(qJ4gʭu/hxYwX tY.2u",.,.׳vuuuuz6[KIZ_ !ihXBgf!j=3gPvg0NX9 !(  #uf[X$W![X[5t/X5t/[X$W![X8X8[<XfX<XZX<XWX!X[<Xu_<X+<Xa,uu<XZ4\<X+<Xa892("[<<YW[<<YW[X<<W!X<<W!\!0[<X.1.1. . w4"f"$VL}X f?Q#//Y׭# kig\z.vl. x!hKfZ!lrX 4g{X u{.< u{. << =yjX=1ɽ/r+Y1Yu=ɻ=xuiK1hu=w1/廻~z1vYuvgwo1Y"u=.󻻻ZZu=.󻻻,0H;K1/h000#n1h=ugv1h=ugv.j沭׻u@+؅>!0g $"LhjyX_Zu/Y./Y./YZu/YY׮Z]׮Z$1/Y1/YZ1/Y+ZZZuצ)ZZ#YZZ!ZY\X $% ; "iK]\# "g X-\*Z2vX<<< Y /ɰ;4"J["4\XM?g@&v`.%w%5ff 5 f <  X Vw$uu#v3P#-1)=˄v.X=u0Y #rJ/|؃Y"0g %#JXY[+DžM/#==.?'׻u@X/{X!&$n 1$9%! .1Ku&hK5XgʭhxJ 6=0Xg5󃯲Xgo  .󃯽!&$=˻l 5#X>׻w 4vՅ"׻[v"'1 .?uLMKu0K . .5guJ%uK1\&81&5u4v4v444u5555 .11u131 .uwx .y1Y2/X#gg/Y.1D/1o.Y1Y0Z1Y0Z1Y22 .1=/Y,v.Yw!Y,u&Yw>uvgK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.cX3 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includeobject.herrcode.hexception.ccexception.hstdarg.hstdint.hsay.h 6 B! J@% |@% tBu./-05>02@2'-2=2I1&-0-602S>g*?g* @## @# @# D@ j@# @ L B-Tj  B;# !B; (!B# f!B !B# !B% /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope.cstddef.htypes.hstdio.h !BtY..~.tY6!>s-w"IW;hx0uvuK2/ʻ˻u t2/$2-iK21z=Y/K4 Kg $ "J%<# tY/L4MKgc  t=Y>0[h h<J K .(///K.%L#u# .&ugs"3u"&uu.$s'/s6XLu g/gi!.>Y /:@2L2==Ov=#3N,zLx;.J.JLs,N)WW:MqX,u"t/2uI/s>tYx/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hobject.hpickle.hexception.htuple_update.ccstddef.htypes.hunistd.hstdint.htuple_update.herrcode.hsay.h 7BtY2u225.Yuu&K#.K&t.~.t!"!*!@!u9!uL2/tvc"!#c"!*c"!@c"!u9c"!uLcW``` X`/.c (.c &Yc"=2YYK2=3/Ygc"1uguuuuY3gYZZZ0K<!g!2XKt2nJ/廼/4=2h2h2h2h2h2=*4=22g&0x2/#]n#[2K[/Zn#Zn#&eX]3/#滻?.?/"g%x&Y?$#`+O=/!HtXNg6ut>$>)3 .h3K)7J$L- .'2ywftL Pz.f*c#fg#Gf.<Ahc!c$2Zh!*vX.chJZ X X/YtYggK2/.f{.J J@% |@% @## @# @# D@ j@# @ !B# !B  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_log.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_log.h <^B,uuKuuKuKuY1gY4uu('0/1>ugx/guF  (w @[KuY+M13iwr.g/3jH=sվu0ttY1ugugv!0g1Y2ك"#uuh00"gK#uYJN0=10.HgI,vv+3 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_dir.ctypes.hstdint.hdirent.htnt_dir.hdirent.h `hB,0u/G2uXg-vguY0/u.tY0gYs>u[*'&.j@ stdint.htnt_tuple.hctype.h sB/Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h ȀB+uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h B6= .uYhuuYK .H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h B.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h ,B2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> rslab_unused_ZNK9Exception3logEv_ZN6ObjectaSERKS___in_chrgts_updaterlist_emptyER_INDEX_TYPE_ZN11ClientErrorD2EvCNF_MISSEDCNF_NOMEMORYCNF_SYNTAXERRORCNF_NOTSETassert_failout_warningCNF_WRONGTYPEfilenamesay_snapCNF_OKCNF_WRONGRANGECNF_INTERNALERROR__gnuc_va_listgp_offset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/compat.creg_save_areaoverflow_arg_areaCNF_WRONGINDEXCNF_RDONLYConfettyErrorCNF_OPTIONALCNF_WRONGINTassertionfp_offsetfunctionuintptr_trunning_lengthcrc32sctp_crc_tableil8_o40/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/crc32.csctp_crc_tableil8_o48sctp_crc_tableil8_o64sctp_crc_tableil8_o80sctp_crc_tableil8_o88to_even_wordcrc32c_sb8_64_bitmultitable_crc32csctp_crc_tableil8_o56crc32_tablesctp_crc_tableil8_o32init_bytesp_bufterm1term2end_bytescrc32c_tablesctp_crc_tableil8_o72singletable_crc32cdup_tarantool_cfgS_name__readaheaddumpOptDefS_name__replication_sourcedestroy_tarantool_cfgiteratoragainS_name__snap_io_rate_limitS_name__space__cardinalityn_acceptedS_name__memcached_expire_per_loopS_name__space__index__typeS_name__work_dirS_name__panic_on_snap_errorn_skippedS_name__panic_on_wal_errorn_optionalS_name__wal_dir_rescan_delayonly_check_rdonlyS_name__slab_alloc_arenaS_name__usernamearrayTypeS_name__custom_proc_titlestructvalscalarTypeorig_optS_name__admin_portS_name__replication_portS_name__backlogidx_name__space__indexiterator1iterator2S_name__slab_alloc_factor_BoolacceptDefault_name__spacecleanFlagsacceptDefault_name__space__indextarantool_cfg_iterator_initacceptDefault_name__space__index__key_fieldS_name__space__estimated_rowsparse_cfg_buffer_tarantool_cfgtarantool_cfg_iterator_nextS_name__memcached_spacetarantool_cfg_iterator_ttmpcfgS_name__wal_dirS_name__memcached_portswap_tarantool_cfgarrayvalS_name__script_dirparamTypeS_name__space__index__key_field__fieldnoidx_name__space__index__key_field/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/tarantool_box_cfg.cS_name__wal_writer_inbox_sizeidx_name__space_S_FinishedS_name__loggerS_name__slab_alloc_minimalparentS_name__space__indexS_name__log_levelS_name__space__index__key_field__typeS_name__coredumpdiffS_name__bind_ipaddrS_name__spacecmpNameAtomsS_name__space__index__uniquescalarvalS_name__rows_per_walS_name__wal_fsync_delayparamValueacceptCfgDefS_name__space__index__key_fieldS_name__space__enabledS_name__wal_modeNameAtomparse_cfg_file_tarantool_cfgcmp_tarantool_cfgIteratorStateS_name__primary_portS_name__local_hot_standbystructTypeS_name__too_long_threshold_S_InitialacceptValuecheck_cfg_tarantool_cfgS_name__snap_dirS_name__memcached_expireconfetti_strcmpS_name__secondary_portatominit_tarantool_cfgS_name__pid_fileS_name__memcached_expire_full_sweepS_name__io_collect_intervalfill_default_tarantool_cfgS_name__logger_nonblockyyextrayylineno_ryyvaluepdo_not_strip_quotesyyscannernumber_to_moveyy_get_previous_state/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/prscfg.cyy_baseyysizeyytokenyy_is_interactiveyy_cyymsgprscfg_yy_load_buffer_stateprscfg_yyfreeyyreduceyytype_uint8prscfg_yyget_linenoyy_more_lenyytranslateyy_more_flagyynewbytesyyin_rprscfg_yyrestartprscfg_yy_scan_stringnum_to_readyydestructyyexhaustedlabendptrprscfg_yypop_buffer_stateyy_chkparseCfgDefyy_ch_bufprscfg_yyget_columnyylval_paramyydefactprscfg_yyget_textyypactprependNameprscfg_yyget_extrayy_last_accepting_cposyy_n_charsYY_BUFFER_STATEnew_bufferprscfg_yyget_debugyychecklimcompileNamebdebugprscfgScannerInitBufferyy_defcolumn_noyyformatyytnamerryyss1yy_flex_debug_ryysyntax_error_statusyy_push_stateyyssaprscfgScannerFinishprscfg_yyset_inyysspoutputyytype_int8yyvalyy_hold_charyy_try_NUL_transyylvalret_valyybackupyy_buffer_stateyystrprscfg_yyset_outprscfg_yy_flush_bufferyyout_rstrdupnyyacceptlabprscfg_yy_scan_bytesprscfg_yylexyysize0yysize1prscfg_yy_delete_bufferprscfg_yyallocyytnamecommentCounteryyxendyyunputyystateyyabortlabyy_state_typestrbufyy_get_next_bufferyymsgpprscfg_yyget_outyy_c_buf_pyyguts_tyylenyy_bs_linenoprscfg_yycharprscfg_yy_switch_to_bufferyy_metaprscfg_yynerrsflex_int16_tyyextra_ryyerrlab1addstringstdinprscfg_yyset_lvalyyvs_allocyytype_int16yy_bs_columnyy_matchyy_c_buf_p_offsetyy_buf_sizeYY_CHARyy_buffer_statusprscfg_yyget_lengprscfg_yyget_lvalyyerrstatusostateyy_start_stackyy_at_bolplainOptDefprscfg_yylex_init_extrafreeNameprscfgScannerStartValueyy_is_our_bufferyybytesyy_actyy_fatal_erroryy_start_stack_depthyy_fill_bufferprscfg_yyget_inyynewstateyysetstateprscfg_yypush_buffer_stateyy_init_globalsyyargprscfg_yy_extra_typeyyresyyextyytypeyyss_allocprscfgScannerInitout_stryylval_rflex_int32_tyyreturnprscfg_yyset_columnyy_start_stack_ptrfreeCfgDefyystacksizeyyr1yyr2endPtrnum_to_allocprscfg_yyscan_tyymsg_allocyy_bpptr_yy_globalsyy_pop_stateyyptryy_cpyycheckyysyntax_erroryyssyy_is_jamnew_stateyy_buffer_stack_topyy_next_stateyy_buffer_stackprscfg_yy_init_bufferyyxbegindestyymsgbufyy_ecscan_yyerroryy_last_accepting_stateyytableprscfg_yy_create_bufferprscfgGetLineNoyy_find_actionyydefaultprscfg_yyparseprscfg_yyset_extrayy_startprscfg_yyensure_buffer_stackdummy_yygutsstderryy_acceptyyvsgrow_sizeline_numberyyleng_ryypgotoprscfg_yyset_debugyy_input_fileyycountdo_actionyy_user_definedYYSTYPEparseCfgDefBufferyy_initprscfg_yylex_destroyaddcharyy_buffer_stack_maxyyvsayy_nxtyyvspyydefgotoyystosprscfg_yy_scan_bufferoerrnoyy_current_stateprscfg_yylex_inityytext_rprscfg_yyset_linenoyyerrlabyyresultbeginPtrcloneNameyy_did_buffer_switch_on_eofprscfg_yyreallocyy_buf_posprscfg_yyerroryy_size_tnewListin_strprepyyerrorlab_yybytes_lenyy_amount_of_matched_textprscfgScannerEndValue/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errcode.c_ZN11SystemErrorC2EPKcj_ZN11SystemErrorD0Ev_ZNK11SystemError6errnumEv~ErrorInjection_ZN6ObjectC2Ev_ZN9ExceptionC2EPKcj_ZN11SystemError4initEPKcP13__va_list_tag_ZNK11ClientError3logEv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/exception.cc_ZN11LoggedErrorC2IIPKcEEES2_jjDpT__ZN9ExceptionC2ERKS__ZN11ClientErrorC2EPKcjjz~IllegalParams_ZN14ErrorInjectionD2Evm_errcodetnt_errcode_desc_ZN13IllegalParamsD2Ev_ZN14ErrorInjectionD0Evtypedef __va_list_tag __va_list_tagLoggedError_ZNK11ClientError7errcodeEv~SystemError_ZN11SystemError4initEPKcz_ZNK11SystemError3logEv_ZN14ErrorInjectionC2EPKcjS1__ZN11SystemErrorD2Ev_ZN13IllegalParamsC2EPKcjS1_m_errnum_ZN11ClientErrorC2EPKcjS1_j_ZN13IllegalParamsD0Evtree_sizep_endrope_node_printnew_noderope_node_heightROPE_HEIGHT_MAXl_left_heightdirectionold_sizel_right_heightrope_iter_nextrope_relinkconninsert_heightavl_route_to_offsetrope_split_funcchild_prefix_lenr_leftr_left_heightr_right_heightl_leftavl_rebalance_after_deleterope_clearadjust_sizerope_iterl_rightavl_route_to_nextrope_erasevisit_leafrope_traverserssize_tavl_rotate_doublersize_trope_node_newsplit_nodesplit_ctxrope_pretty_printrope_iter_startsave/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.cleft_sizeprint_leafr_rightrope_iter_down_to_leafchild_prefixmirrorrope_insertrope_sizerope_node_splitalloc_ctxavl_rebalance_after_insertrope_checkrope_noderope_node_sizeavl_rotate_singlerootrope_iter_createrope_extract_nodenew_data_endop_splice_argdo_update_op_setdo_op_funcops_endtuple_range_sizeinit_update_op_arithupdate_field_splitload_varint32update_op_codes_MAXop_check_field_no_Z20tuple_update_preparePFPvS_mES_PKcS3_S3_S3_jPjS4_field_maxop_adjust_field_no_Z20tuple_update_executeP12tuple_updatePccut_length/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple_update.ccold_fieldpick_field_strupdate_read_opsinit_update_op_insertinit_optail_lenUPDATE_OP_ADDUPDATE_OP_XORupdate_op_metaop_countupdate_op_codes__FUNCTION__rope_leaf_sizepastevarint32_sizeofrope_appendstqh_firstnew_dataupdate_op_codes_strs_initupdate_field_len__static_initialization_and_destruction_0new_field_lenworks_in_placetuple_update_preparedo_update_op_adddo_update_op_insertrope_createdo_update_opsdo_update_op_xorpick_field_u32rope_newtuple_update_executetotal_field_count__priorityp_new_fcounttargettail__initialize_pUPDATE_OP_DELETEUPDATE_OP_ANDUPDATE_OP_MAXupdate_op_argdo_update_op_ortuple_datarope_free_funcupdate_calc_new_tuple_lengthUPDATE_OP_SUBTRACTUPDATE_OP_SPLICEtail_offsetupdate_fieldold_data_endpick_fieldbooli64_valTNT_ERRMSG_MAXupdate_field_initpick_u8init_update_op_deletepack_varint32tail_lengthdo_update_op_andop_listopcodeold_leninit_update_op_setop_arith_argop_set_argnew_fieldinit_update_op_splicepick_strstqe_nextBOX_UPDATE_OP_CNT_MAXpaste_lengthi32_valpick_varint32val_sizeinit_op_functuple_data_endUPDATE_OP_SETexpr_endrope_leaf_data_GLOBAL__sub_I_update_op_codes_strsnamesp_new_sizeregion_alloc_free_stub_Z18update_create_ropeP12tuple_updatePKcS2_jold_fcountupdate_create_ropedo_update_op_spliceold_datastqh_lastnew_tuple_fcountrope_alloc_funcrope_extractUPDATE_OP_ORpick_u32do_update_op_subtractUPDATE_OP_INSERTdo_opexprnew_tuple_sizetnt_log_opentnt_log_readtnt_log_next_totnt_log_guesstnt_log_seektnt_log_errnotnt_log_error_desctnt_log_eof/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_log.cversiontnt_log_open_errhdr_iprototnt_log_error_listtnt_log_next/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpltnt_log_process_xlogtnt_log_strerrortnt_log_closefiletypetnt_log_seterrtnt_log_process_snapshot/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_dir.ctnt_dir_free__ino64_ttnt_dir_initd_nametnt_dir_match_gttnt_dir_match_inctnt_dir_put__dirstreamdirentd_typetnt_dir_scand_inod_reclentnt_dir_cmptnt_xlog_errnotnt_xlog_freetnt_xlog_errortnt_xlog_request/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_xlog.ctnt_xlog_opentnt_xlogtnt_xlog_strerrortnt_xlog_closetnt_snapshot_opentnt_snapshot_closetnt_snapshot_strerrortnt_snapshot_read_tupletnt_snapshot/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_snapshot.ctnt_snapshot_errnotnt_snapshot_freetnt_snapshot_errortnt_mem_inittnt_allocator_ttnt_mem_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnttnt_mem_realloc_tnt_realloc/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_mem.ctnt_mem_duptnt_mem_alloc_ISgraphtnt_tuple_validate_ISspace_ISlower_ISalpha_ISdigittnt_tuple_setnsize_ISalnumtnt_tuple_addtnt_list_init_ISblank_ISpuncttnt_tuple_set_as/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_tuple.cndatafld_offtnt_list_attnt_list_free_IScntrl_ISxdigittnt_tuple_inittnt_tuple_free_ISupper_ISprinttnt_iter_list_nexttnt_iter_reply_freetnt_fieldtnt_iter_request_freetnt_iter_reply_nexttnt_nexttnt_iter_request_nexttnt_iter_field_nexttnt_iter_field_rewind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_iter.ctnt_iter_inittnt_rewindtnt_iter_freetnt_iter_storage_freetnt_iter_storage_nexttnt_iter_list_rewindtnt_stream_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_stream.ctnt_stream_reqidtnt_stream_freetnt_reply_cboffvtnt_reply_freetnt_reply_ttnt_reply_fromtsizetnt_reply_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_reply.crollbacktnt_request_inittnt_request_freehdr_tnt_request_ttnt_request_fromtnt_request_cb/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_request.copvsztnt_request_setorigintnt_enc_writetnt_enc_sizetnt_enc_read/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_enc.clongsgoptgopt_helpgopt_arg_iargs_stopgopt_freehelp_arg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/gopt.cgopt_argoption_cpopt_defname_cpvptr_optsopt_specslong_opt_widthargs_lenargs_ptropt_counthelp_widthfound_longopt_popt_s/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebehelp_paddinggopt_argshas_shortsopt_spec_popt_spec_sopt_spec_tnext_optioncontinue_2opt_tbreak_2short_optgopt_sortarg_pnext_operandmunmap_checkedslab_putrlist_shiftslab_get_with_orderslab_mmaprlist_nextslab_mergeslab_cache_checkslab_splitslab_cache_destroypoison_charslab_cache_createslab_is_freeslab_order/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab_getdont_panicslab_from_ptrslab_assertslab_buddyslab_createnew_orderslab_poisonrlist_addmergedslab_magicorderedslab_set_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/smallslab_set_usedhugeslab_order_sizerlist_del__func__slab_min_sizecut_sizeregion_alloc_slowregion_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/region.cregion_usedregion_truncatewwWvWXwXYwY\w\vwwwvwwwvwww v !w!"w"%w%EvEFwFGwGJwJovopwpqwqtwtvwwwvwwwvwwwvwwwvwww5v56w67w7:w:vww"w"vwww v  w  w wvwww v w w w  v  w  w  w 1 v1 2 w2 3 w3 6 w6 W vW X wX Y wY \ w\ RvRSwSTwTWwWvvvwwwxwx{w{vwwwvwwwrvrswstwtwwwvwwwavabwbcwcfwfEvEFwFGwGJwJvwwwvwwwQvQRwRSwSVwVuvuvwvwwwzwzvwwwvwww"v"#wwwvwwwvww"w"KvKLwLMwMPwPPvPQwQRwRUwUvwww~v~wwwvwwwvwwwvwwwQvQRwRSwSVwVvw w  w v w w w { v{ | w| } w} w v w w w ^ v^ _ w_ ` w` c wc vwwwvwww2v23w34w47w7~v~wwwvwwwvwwwvwww3v34w45w58w8QvQRwRSwSVwVvwwwvwwwvww"w"KvKLwLMwMPwPqvqrwrswsvwvlvlmwmnwnqwqvwwwvwwwvwwwvwwwvwww v  w  w w v w w w vwwwvwwwQvQRwRSwSVwVvwwwvwwwUvUVwVWwWZwZvwwwvwwwvwwwQvQRwRSwSVwVvwwwavabwwwvww"w";v;<w<=w=@w@vwwwRvRSwSTwTWwWvwJ@K@wK@N@wN@z@vz@{@w|@}@w}@@w@@v@@w@@w@@w@@v@@w@@w@@w@@v@@w@@w@ @w @B@vB@C@wD@E@wE@H@wH@i@vi@j@wj@k@wk@n@wn@@v@@w@@w@@w@@v@@w$@%@w%@(@w(@5@v5@6@w6@7@w7@:@w:@p@vp@q@wq@r@wr@u@wu@@v@@w@@w@@w@@v@@w@@w@@w@@v@@w@@w@@w@@v@@w@@w@@w@p@vp@q@wq@r@wr@u@wu@@v@@w@@w@@w@@v@@w@@w@@w@c@vc@d@wd@e@we@h@wh@@v@@w@@w@@w@H@vH@I@w@@w@@w@Q@vQ@R@wwwvwww v  w  w wRvww_v_`w`awadwdvwwwvwwwvwww>v>?wwwwvwxwxywy|w|vwwwpvpqwqrwruwuvwww!v!"w"#w#&w&qvqrwrswsvwvvwwwvwwwvwwwovopwpqwqtwt6v67w78w8;w;vwww=v=>w>?w?BwBvwwwvwww$v$%w%&w&)w)vwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwww(v()w)*w*-w-vwwwvwwwvwwwbvbcwcdwdgwgvwwwvwww v  w  w  w a,va,b,wb,c,wc,f,wf,R3vR3S3wS3T3wT3W3wW3[4v[4\4w\4]4w]4`4w`415v1525w2535w3565w657v77w77w77w77v77w77w77w79v99w99w99w99v99w99w99w9n:vn:o:wo:p:wp:s:ws:;v;;w;;w;";w";;v;;w;;w;;w;<v<<w<<w<<w<=v==w==w==w=>v>>w>>w>>w>3@v3@4@w4@5@w5@8@w8@IAvIAJAwJAKAwKANAwNA{Av{A|Aw|A}Aw}AAwAfBvfBgBwgBhBwhBkBwkBoCvoCpCwpCqCwqCtCwtCCvCCwCCwCCwCDvDDwDDwD(Dv(D)Dw)D*Dw*D-Dw-DDvDDwDDwDDwDDvDDwDDwDDwDEvEEwEEwE Ew E Ev E!Ew!E"Ew"E%Ew%E9Ev9E:Ew:E;Ew;E>Ew>EVEvVEWEwWEXEwXE[Ew[EwEvwExEwxEyEwyE|Ew|EEvEEwEEwEEwEcFvcFdFwdFeFweFhFwhFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFGwG!Gv!G"Gw"G#Gw#G&Gw&GGvGGwGGwGGwGHvHHwHHwHHwH'Iv'I(Iw(I)Iw)I,Iw,IHJvHJIJwIJJJwJJMJwMJfJvfJgJwgJhJwhJkJwkJJvJJwJJwJJwJJvJJwJJwJJwJJvJJwJJwJJwJiKviKjKwjKkKwkKnKwnKKvKKwKKwKKwK4Lv4L5Lw5L6Lw6L9Lw9LSLvSLTLwTLULwULXLwXLmLvmLnLwnLoLwoLrLwrLLvLLwLLwLLwLbMvbMcMwcMdMwdMgMwgMNvNNwNNwNNwNvNvvNwNw6 B7 Bw7 B: Bw: BJ BvJ BK BwJ@K@wK@N@wN@z@vz@{@w|@}@w}@@w@@v@@wtBuBwuBxBwxBBvBBwBBwBBwBBvBBwBBwBBwBFBvFBGBw@@w@@w@@v@@w@@w@@w@@v@@wHBIBwIBLBwLBBvBBwBBwBBwB7Bv7B8Bw8B9Bw9B<Bw<BmBvmBnBwnBoBwoBrBwrBBvBBwBBwBBwBBvBBwBBwBBwBKBvKBLBwLBMBwMBPBwPBBvBBw@@w@ @w @B@vB@C@wD@E@wE@H@wH@i@vi@j@wj@k@wk@n@wn@@v@@w@@w@@w@@v@@wBBwBBwBBvBBwBBwBBwB4 Bv4 B5 BwL BM BwM BP BwP B Bv B Bw B Bw B Bw B!Bv!B!Bw!B!Bw!B!Bw!B'!Bv'!B(!Bw(!B)!Bw)!B,!Bw,!Bd!Bvd!Be!Bwf!Bg!Bwg!Bj!Bwj!B!Bv!B!Bw!B!Bw!B!Bw!B!Bv!B!Bw!B!Bw!B!Bw!B!Bv!B!Bwwwvw w #w#;v;<w<=w=@w@TvTUwUVwVYwYrvrswstwtwwwvwwwvwww2v23w34w47w7vwww)v)*w*+w+.w.vwww)v)*w*+w+.w.vwwwcvcdwdewehwhvwww v w w w v w w  w vwwwvwww]v]^w^_w_bwb,v,-w-.w.1w1vwwwvwwwvwwwvw7B7Bw7B7Bw7B.7Bv.7B/7Bw/7B07Bw07B37Bw37B?7Bv?7B@7Bw@7BA7BwA7BD7BwD7BQ7BvQ7BR7BwR7BS7BwS7BV7BwV7Bn7Bvn7Bo7Bwo7Bp7Bwp7Bs7Bws7B7Bv7B7Bw7B7Bw7B7Bw7B?8Bv?8B@8Bw@8BA8BwA8BD8BwD8B8Bv8B8Bw8B8Bw8B8Bw8B8Bv8B8Bw8B8Bw8B8Bw8B8Bv8B8BwJ@K@wK@N@wN@z@vz@{@w|@}@w}@@w@@v@@w8B8Bw8B8Bw8B:Bv:B:Bw@@w@@w@@v@@w@@w@@w@@v@@w@@w@ @w @B@vB@C@wD@E@wE@H@wH@i@vi@j@wj@k@wk@n@wn@@v@@w@@w@@w@@v@@w:B:Bw:B;Bw;B@Bv@B@Bw@B@Bw@B@Bw@BABvABABwABABwABABwABBBvBBBBwBBBBwBBBBwBB~CBv~CBCBwCBCBwCBCBwCBCBvCBCBwCBCBwCBCBwCBDBvDBDBwDBDBwDBDBwDBDBvDBDBwDBDBwDBDBwDB=EBv=EB>EBw>EB?EBw?EBBEBwBEBEBvEBEBwEBEBwEBEBwEBFBvFBFBwFBFBwFBFBwFBFBvFBFBwFBFBwFBFBwFBEGBvEGBFGBwFGBGGBwGGBJGBwJGBHBvHBHBwHBHBwHBHBwHB>HBv>HB?HBw?HB@HBw@HBCHBwCHBsHBvsHBtHBwtHBuHBwuHBxHBwxHBHBvHBHBwHBHBwHBHBwHB IBv IBIBwIBIBwIBIBwIBZIBvZIB[IBw[IB\IBw\IB_IBw_IBIBvIBIBwIBIBwIBIBwIBIBvIBIBwIBIBwIBIBwIBJBvJBJBwJBJBwJBJBwJBJBvJBJBwJBJBwJBJBwJBNKBvNKBOKBwOKBPKBwPKBSKBwSKBLBvLBLBwLBLBwLBLBwLBOLBvOLBPLBwPLBQLBwQLBTLBwTLBMOBvMOBNOBwNOBOOBwOOBROBwROBRBvRBRBwRBRBwRBRBwRBvSBvvSBwSBwwSBxSBwxSB{SBw{SBrTBvrTBsTBwsTBtTBwtTBwTBwwTBTBvTBTBwTBTBwTBTBwTBUBvUBUBwUBUBwUBUBwUBVBvVBVBwVBVBwVBVBwVBDYBvDYBEYBwEYBFYBwFYBIYBwIYB\Bv\B\Bw\B\Bw\B\Bw\B]Bv]B]Bw]B]Bw]B]Bw]B]Bv]B]Bw!B!Bw!B!Bw!B!Bv!B!Bw!B!Bw!B!Bw!B!Bv!B!Bw]B]Bw]B]Bw]B$^Bv$^B%^Bw%^B&^Bw&^B)^Bw)^B9^Bv9^B:^Bwww{v{|w|}w}wvwwwvwwwvwwwvwww[v[\w\]w]`w`vww"w"BvBCwCDwDGwGuvuvwvwwwzwzvwwwB vB C wC D wD G wG | v| } w} ~ w~ w v w w w  v  w  w  w " v" # www8v89w9:w:=w=vwwwvwww:v:;w;<w<?w?vwwwvwwwvwwwAvABwBCwCFwFvwwwvwwwvwwwvwwwvww w #v#$w$%w%(w(;v;<wwwAvABwBCwCFwFvwwwvwwwvwwwvwwwvww w #v#$w$%w%(w(;v;<www*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvwww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  www|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwvwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vwwwvwwwuvuvwvwwwzwzvwwwvwwwvwww4 v4 5 w5 6 w6 9 w9 v w w w E vE F wF G wG J wJ _ v_ ` w` a wa d wd v www v !w!"w"%w%gvghwhiwilwlvwwwvwww v  w  w wvww"w"UvUVwVWwWZwZzvz{w{|w|wvwwwvwwwvwwwLvLMwMNwNQwQvwww!v!"w"#w#&w&vwwwvwww8v89w9:w:=w=OvOPwPQwQTwTvwww v  w wwvwwwvwww v www v  w  w  w v w w w F vF G wG H wH K wK v w w w v w w w v w w w vwww@v@Awww v !w!"w"%w%gvghwhiwilwlvwwwvwwwvwwwvwww'v'(w()w),w,QvQRwRSwSVwVxvxywyzwz}w}vwwwvwwwvwwwvwwwvwwwBvBCwCDwDGwGwvwxw [ 89 NOA0)s$@I@J@{@|@@@@@@@C@D@j@j@@@@@R@7E\tB5 B6 BK BJ@{@|@@@@@@@C@D@j@j@@@@L B B B!B!B(!B(!Be!Bf!B!B!B!B!B!B#\"#@?TU7B:^BJ@{@|@@@@@@@C@D@j@j@@@@!B!B!B!B    9= y .symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@` N  @ "V0.@0.^oD@DkoG@Gz`H@`HH@H  P@P0P@0PU@U$u$B$ @B@E C, C t<ZCZ`c``c``c` `c ` bc b(bc(bxdcd9 ce 0ĝ )75f>CO01MZe.@4s?8L% 7@@<@`@ @0.@D@G@ `H@ H@ P@ 0P@ U@$B@BC CZC`c`c`c `c bc(bcdcc !" `c 0U@. `U@A U@Wcf`c U@`c p@! -p@% Rp@* |p@5`B| p@.( p@6 q@I s@$W {@.g >{@&q d|@ _~@$ @L @X ^@$ @B| @ .@.( \@6 a@ *@eI @$ @ ѐ@W o@:  C@L# @Y<Fdc[dcpdcdcecec ec0ecc@ecPec.`ecDecZfcc B| @W @.g D@&q j@n e@e ʧ@$x ɩ@B @. @ ʭ@pB IJ@ |@ J@f$B= B|F@B_`B| $@ B@j `@| @`B $@ 6@; q@' @ @ @9 @qB!. q@C @nP @] d@!d@B|yjc @Zncrcvczc~cc.cDcZ b@l ]@F~ @x @9 @P Z@Gcc/cB cR@cd`c|ccccc c@c`cc)c7cNcicx c@c`ccccc c2  cL @c` `cv c c c c c  c @c2 `cL cY c0o c0  c0 `c0 cH cH `cH c`7  c`\  @h  XAVs c | c  YAt  A c c  c B B B! B!  B8 `B B8 B B3  B3 `B8  A!  A0  A%;  %AeG  AFP  1Bh  PB~  AB  jB  A)  A  A  B  BG  fB Bx  B  BL B  B$ B8+ B82 c6  BvS  Bo  B6|  B]  .B  _B  ~B  B7  OB   XB  ^A  B  cB   lBi B(2? tB"V] !Bl "Bv ,"B E"B c"B #B #$Bh $B %Bs %B 'Bp (B0 T)BBbC [PCt:C  0BR/C  4B] 7B /7B @7Bl R7B o7Be 7Bl @8BB 8B*v 8B) 8B7@CCg :B5C @B AB BB CBM CBJ DB6 DBKL >EBb EB EB8c FBS$ FBUI FGBb HB< ?HB5 tHBM HBM IBM1 [IBM[ IBM IB JB5 JB OKBD LBLy PLB NOBC'c; RBY wSBw`C sTB UB VBQCN EYBx C ]B. %^B ^B:* ^B6 _BPC :bBX cBq dB3 c@c QiB DjBW 8nBB znBf tpBB  pBf#-c:F s{BYd ȀB}r EB BO ڃBf @B! ڄB [B* B B* BB. ÇB*DQ] Bjjx B ĒB B @B  MB B Bj  бB! BG# 8B?- wBS ʲB9 ܲB B8 &B% KB* uB'D BP Bl[C t BJC C8C BC  BC  }B B( B[4CE {BbQC j ݷByC _BC  |BbC  ޹B -C  BC !C:CH B! 5BG# |B? B9 B B8 B% & nBaV& p&dc}&" 6 B& @`& B@.&&& TB*& sB$' B "' B='!BL'e'" J@1t' aBy}' ܀@'" (!B='!cX'" @' 9BP( ݭB\( HBG'(<( m@7G(cZ( u@Jj( @9v( 4tB( R@h(( +B!( B ( }B$(( >pB ) B) 'sB_ ) n@5*) cB);)P) gB~a) `Bm) ˻BL) @`) B)!B))) B) TB) BC* =BB"* @0*" L BwT* &_AN#p*" D@&**" @* @* HBG** BK + $B! + B*+ B3+G+" B=\+ Bk+ B{++ `hB9+ `@ + B+ w@+ gB+ vBC+ gB,R@ , cB0, EB?, BR," (!B=j, BC,,!B, @B,,, dmB, z@h - }Bx- sBd&-!C:-" @=L- ߊB [- Bgp- SB!- *v@- xB- uB- BE- n@- ]B%-.%." @=:.N.cZ. AR g. ȁ@t. iAY. ³A7.! cX. U@X. Af. B. v@I /fc/ B"/!B(4/H/ kB`//" |@&/ \B/ )B/!B/ @/ x@ 0 B 0 hB 0" @&20S0g0 Bu0" 6 B0 A0 w@0 B;0cp0!B(0 FB20 B$0C 1 @g!151I1]1 $@m1" L Bw11 `B"1 &pB1 B$11pd12" J@12" j@=)2>2 2BL2 @^2 B%p2 rB)2" !B=2 B22" f!B&2 p@2 B 3 3xc43 BbH3]3 Bi3 Bw33 mBK3C3333 B4"4 rB644@T@I4 @DP4!(B\4p4 @44 B4c4 A 4!B 4`T@4fc4 @B45 B@4515G5 @|V5 @Ng5 By5 aBy55 X]A5 BC5" @5 nB6 8B606" !B&E6Y6 tAq66" !B=6 Bv6c6 qB6 ,B$66 7 @.7 P@7 A!757 dBk?7" L Bwc7 BCcrtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrysha1.cmain.crlist_createsmall_stats_resetslab_list_createregion_create__ac_prime_listmh_u32ptr_next_slotmh_u32ptr_getmh_u32ptr_put_slotmh_u32ptr_delmh_pk_next_slotmh_pk_getmh_pk_put_slotmh_pk_delts_initts_preparets_freets_shutdownconfig.cspace.cmh_u32ptr_nodemh_u32ptr_putmh_pk_nodets_space_keysizets_space_key_initts_space_keyalloc_shats_space_keyalloc_sparseoptions.c__compound_literal.0__compound_literal.1__compound_literal.2__compound_literal.3__compound_literal.4__compound_literal.5__compound_literal.6__compound_literal.7__compound_literal.8__compound_literal.9__compound_literal.10__compound_literal.11__compound_literal.12opts_defindexate.cmh_pk_putsnapshot_process_row__PRETTY_FUNCTION__.5290snapshot_processsnapdir_processxlog_process_row__PRETTY_FUNCTION__.5326xlog_processwaldir_processofwaldir_processref.c__PRETTY_FUNCTION__.2972cursor.c__PRETTY_FUNCTION__.5281snapshot.cts_snapshot_writets_snapshot_xfer__PRETTY_FUNCTION__.5957update.ccrlist_firstrlist_emptyslab_size_alignrslab_sizeofrslab_datarslab_unusedslab_alloc_ZZ10slab_allocE19__PRETTY_FUNCTION__region_alloc_nothrowregion_resetregion_alloc_alloc_ZL15__ac_prime_listcompat.ccrc32.ccrc32c_tablesingletable_crc32csctp_crc_tableil8_o32sctp_crc_tableil8_o40sctp_crc_tableil8_o48sctp_crc_tableil8_o56sctp_crc_tableil8_o64sctp_crc_tableil8_o72sctp_crc_tableil8_o80sctp_crc_tableil8_o88crc32c_sb8_64_bitmultitable_crc32ctarantool_box_cfg.ccmpNameAtomsacceptDefault_name__spaceacceptDefault_name__space__indexacceptDefault_name__space__index__key_field_name__username_name__local_hot_standby_name__bind_ipaddr_name__coredump_name__admin_port_name__replication_port_name__log_level_name__slab_alloc_arena_name__slab_alloc_minimal_name__slab_alloc_factor_name__work_dir_name__snap_dir_name__wal_dir_name__script_dir_name__pid_file_name__logger_name__logger_nonblock_name__io_collect_interval_name__backlog_name__readahead_name__snap_io_rate_limit_name__rows_per_wal_name__wal_writer_inbox_size_name__wal_mode_name__wal_fsync_delay_name__wal_dir_rescan_delay_name__panic_on_snap_error_name__panic_on_wal_error_name__primary_port_name__secondary_port_name__too_long_threshold_name__custom_proc_title_name__memcached_port_name__memcached_space_name__memcached_expire_name__memcached_expire_per_loop_name__memcached_expire_full_sweep_name__replication_source_name__space_name__space__enabled_name__space__cardinality_name__space__estimated_rows_name__space__index_name__space__index__type_name__space__index__unique_name__space__index__key_field_name__space__index__key_field__fieldno_name__space__index__key_field__typeacceptValuedumpOptDefbuf.4496ptr.4497acceptCfgDefcleanFlagsbuf.4611diff.4822prscfg.coutputyytranslateyytnameyyr1yyr2yydefactyydefgotoyypactyypgotoyytableyycheckyystosyytnamerryysyntax_erroryydestructprependNamefreeNameprscfgScannerStartValueprscfgScannerEndValueprscfg_yyerrorprscfgGetLineNocloneNamecompileNameplainOptDefprscfgScannerInitprscfgScannerFinishprscfgScannerInitBufferyy_acceptyy_ecyy_metayy_baseyy_defyy_nxtyy_chkbufprscfg_yyensure_buffer_stackprscfg_yy_load_buffer_statescan_yyerrorstrdupnyyunputaddcharaddstringyy_fatal_erroryy_get_previous_stateyy_try_NUL_transyy_get_next_bufferprscfg_yy_init_bufferyy_push_stateyy_pop_stateyy_init_globalserrcode.cexception.cc_ZL16tnt_errcode_descjrope.crope_node_sizerope_sizerope_iter_createrope_node_heightrope_relinkrope_node_newrope_node_splitavl_rotate_singleavl_rotate_doubleavl_rebalance_after_insertavl_rebalance_after_deleteavl_route_to_offsetavl_route_to_next__PRETTY_FUNCTION__.3131__PRETTY_FUNCTION__.3140__PRETTY_FUNCTION__.3148rope_iter_down_to_leaf__PRETTY_FUNCTION__.3190rope_node_printtuple_update.ccrope_leaf_sizerope_leaf_datarope_createrope_newrope_appendrope_extract_ZL13load_varint32PPKc_ZZL13load_varint32PPKcE12__FUNCTION___ZL13pick_varint32PPKcS0__ZZL13pick_varint32PPKcS0_E12__FUNCTION___ZL7pick_u8PPKcS0__ZL8pick_u32PPKcS0__ZL8pick_strPPKcS0_j_ZL10pick_fieldPPKcS0__ZL14pick_field_strPPKcS0_Pj_ZL14pick_field_u32PPKcS0__ZL15varint32_sizeofj_ZL13pack_varint32Pcj_ZN12_GLOBAL__N_125update_op_codes_strs_initC2EPPKc_ZN12_GLOBAL__N_125update_op_codes_strs_initC1EPPKc_ZN12_GLOBAL__N_1L25update_op_codes_strs_initE_ZL17update_field_initP12update_fieldPKcjj_ZL16update_field_lenP12update_field_ZL17op_check_field_nojj_ZL18op_adjust_field_noP9update_opj_ZL16do_update_op_setP10op_set_argPKcPc_ZL16do_update_op_addP12op_arith_argPKcPc_ZL21do_update_op_subtractP12op_arith_argPKcPc_ZL16do_update_op_andP12op_arith_argPKcPc_ZL16do_update_op_xorP12op_arith_argPKcPc_ZL15do_update_op_orP12op_arith_argPKcPc_ZL19do_update_op_spliceP13op_splice_argPKcPc_ZL19do_update_op_insertP10op_set_argPKcPc_ZL21init_update_op_insertP12tuple_updateP9update_op_ZL18init_update_op_setP12tuple_updateP9update_op_ZL21init_update_op_deleteP12tuple_updateP9update_op_ZL20init_update_op_arithP12tuple_updateP9update_op_ZL21init_update_op_spliceP12tuple_updateP9update_op_ZZL21init_update_op_spliceP12tuple_updateP9update_opE12__FUNCTION___ZL14update_op_meta_ZL16tuple_range_sizePPKcS0_m_ZL18update_field_splitPvS_mm_ZZL18update_field_splitPvS_mmE12__FUNCTION___ZL22region_alloc_free_stubPvS__ZL28update_calc_new_tuple_lengthP12tuple_update_ZL13do_update_opsP12tuple_updatePc_ZZL13do_update_opsP12tuple_updatePcE12__FUNCTION___ZL15update_read_opsP12tuple_updatePKcS2__ZZ20tuple_update_preparePFPvS_mES_PKcS3_S3_S3_jPjS4_E12__FUNCTION___Z41__static_initialization_and_destruction_0ii_GLOBAL__sub_I_update_op_codes_strstnt_log.ctnt_log_seterrtnt_log_eoftnt_log_readtnt_log_process_xlogtnt_log_process_snapshottnt_log_open_errtnt_log_error_listmsg.4461tnt_dir.ctnt_dir_puttnt_dir_cmptnt_xlog.ctnt_xlog_freetnt_xlog_requesttnt_snapshot.ctnt_snapshot_freetnt_snapshot_read_tupletnt_mem.c_tnt_realloctnt_tuple.ctnt_tuple_validatetnt_iter.ctnt_iter_inittnt_iter_field_nexttnt_iter_field_rewindtnt_iter_list_nexttnt_iter_list_rewindtnt_iter_reply_nexttnt_iter_reply_freetnt_iter_request_nexttnt_iter_request_freetnt_iter_storage_nexttnt_iter_storage_freetnt_stream.ctnt_reply.ctnt_reply_cbtnt_request.ctnt_request_inserttnt_request_delete_1_3tnt_request_deletetnt_request_calltnt_request_selecttnt_request_updatetnt_request_cbtnt_enc.cgopt.cslab_cache.crlist_addrlist_delrlist_shiftrlist_nextslab_sizeofslab_order__PRETTY_FUNCTION__.1752slab_order_size__PRETTY_FUNCTION__.1756slab_magic__PRETTY_FUNCTION__.3149slab_assert__PRETTY_FUNCTION__.3155slab_set_free__PRETTY_FUNCTION__.3160slab_set_usedslab_is_freeslab_poisonpoison_char.3171slab_create__PRETTY_FUNCTION__.3177munmap_checked__PRETTY_FUNCTION__.3183slab_mmap__PRETTY_FUNCTION__.3187slab_buddy__PRETTY_FUNCTION__.3195slab_split__PRETTY_FUNCTION__.3200slab_merge__PRETTY_FUNCTION__.3209__PRETTY_FUNCTION__.3235__func__.3272region.cregion_used__PRETTY_FUNCTION__.2511__FRAME_END____JCR_END___GLOBAL_OFFSET_TABLE___TMC_END____dso_handle__init_array_end__init_array_start_DYNAMICdata_startctime@@GLIBC_2.2.5ts_config_loadmh_pk_del_resizetnt_dir_scanfileno@@GLIBC_2.2.5update_op_codes_strsSHA1Initprintf@@GLIBC_2.2.5swap_tarantool_cfgtnt_mem_freegopt_freetarantool_cfg_iterator_initprscfg_yyget_lvalts_cursor_closetnt_mem_init__gcc_personality_v0@@GCC_3.3.1fseeko64@@GLIBC_2.2.5memset@@GLIBC_2.2.5rope_iter_nextts_reftable_init_ZN9ExceptionC1EPKcjgopt_sort__libc_csu_finisnprintf@@GLIBC_2.2.5tnt_snapshot_strerror_ZN11LoggedErrorD0Evparse_cfg_buffer_tarantool_cfgparseCfgDefBufferslab_cache_destroymmap64@@GLIBC_2.2.5_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZTV9Exception_ZN9ExceptionD2Ev_start_ZN11ClientErrorC1EPKcjS1_jregion_alloc_slowfill_default_tarantool_cfg_ZN11ClientErrorD2Evrope_pretty_printtnt_snapshot_errnotnt_rewindprscfg_yypush_buffer_stateprscfg_yy_scan_bufferabort@@GLIBC_2.2.5tnt_tuple_setstpcpy@@GLIBC_2.2.5tnt_tuple_set_asprscfg_yyget_texttnt_listts_updatetnt_request_free_ZN11LoggedErrorD2Evtnt_xlog_close_ZTV14ErrorInjection__gmon_start___Jv_RegisterClassesputs@@GLIBC_2.2.5mh_u32ptr_newassert_fail_ZTV13IllegalParams_ZdlPv@@GLIBCXX_3.4ts_cursor_tupleexit@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5strcasecmp@@GLIBC_2.2.5tnt_log_guess_finiout_warning_ZTV11ClientError_ZN13IllegalParamsD0Evputchar@@GLIBC_2.2.5prscfg_yypop_buffer_state_ZTI13IllegalParams_ZTS9Exceptionprscfg_yyget_linenoprscfg_yyset_debug_ZTI6Object_ZNK11ClientError3logEvprscfg_yyrestartprscfg_yylex_init_extrats_space_fillofrope_checkmalloc@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5strerror_r@@GLIBC_2.2.5tnt_xlog_errnots_cursor_openprscfg_yyget_extrats_reftable_addrope_cleartnt_log_openmh_pk_new_ZN11LoggedErrorC1IJPKcEEES2_jjDpT_tnt_xlog_opentnt_request_fromregion_truncatetnt_snapshot_closemh_u32ptr_del_resizeprscfg_yyget_lengtnt_snapshot_errorprscfg_yyset_outtnt_log_errnoprscfg_yyget_outrope_erasemh_pk_deleterope_iter_startts_space_recycletssfreeCfgDeffgets@@GLIBC_2.2.5_ZN9ExceptionC2EPKcjtnt_stream_inittnt_log_seek_ITM_deregisterTMCloneTabletnt_request_setorigintnt_mem_allocts_space_create_IO_stdin_used_ZTI11ClientErrortnt_log_closeprscfg_yyset_lineno_ZN9ExceptionC2ERKS_tnt_log_nextfputc@@GLIBC_2.2.5_ZN11SystemErrorD2Evtnt_nextfree@@GLIBC_2.2.5say_snapts_space_init_IO_getc@@GLIBC_2.2.5strlen@@GLIBC_2.2.5_ZN11ClientErrorC2EPKcjS1_j_ZNK11SystemError3logEv_ITM_registerTMCloneTable__data_start_ZN6ObjectC2Evcrc32ts_options_usageferror@@GLIBC_2.2.5opendir@@GLIBC_2.2.5_Z18update_create_ropeP12tuple_updatePKcS2_jtnt_tuple_init_ZN11ClientErrorC1EPKcjjzprscfg_yy_switch_to_buffer_ZTI9Exception__ctype_b_loc@@GLIBC_2.3_ZN6ObjectD1Evtnt_itermh_pk_clear_ZN14ErrorInjectionD1Ev_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT_gopt_arg_igopt_arg_ZN11SystemErrorC2EPKcjsprintf@@GLIBC_2.2.5SHA1Updatestdin@@GLIBC_2.2.5ts_reftable_mapts_indexatetnt_tuple_addmh_pk_reservereaddir64_r@@GLIBC_2.2.5rope_extract_node_ZN11ClientErrorC2EPKcjjztnt_list_initfgetc@@GLIBC_2.2.5tnt_xlog_strerrortnt_fieldtnt_mem_dupSHA1Finalprscfg_yyreallocstrrchr@@GLIBC_2.2.5tnt_log_strerrortnt_requestslab_cache_createts_oomcheckprscfg_yyget_in_ZTS11ClientErrorsleep@@GLIBC_2.2.5fsync@@GLIBC_2.2.5prscfg_yy_create_buffertnt_reply_ZN13IllegalParamsC1EPKcjS1_tnt_stream_freets_space_free_ZN11LoggedErrorC2IIPKcEEES2_jjDpT_tarantool_cfg_iterator_next_ZN11ClientErrorD0Evstrerror@@GLIBC_2.2.5_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT_ts_space_fill_ZN11SystemErrorC1EPKcjvprintf@@GLIBC_2.2.5tnt_enc_sizeprscfg_yylex_destroygopt_argsslab_getstrtol@@GLIBC_2.2.5_ZN11SystemErrorD1Evtnt_iter_reply__libc_csu_initatoi@@GLIBC_2.2.5tnt_dir_initinit_tarantool_cfgprscfg_yy_flush_bufferts_snapshot_createtnt_log_errortnt_iter_freeslab_from_ptr__cxa_pure_virtual@@CXXABI_1.3tnt_log_next_toprscfg_yyallocprscfg_yyget_debug_ZN14ErrorInjectionD2Ev_ZN14ErrorInjectionC2EPKcjS1_strchr@@GLIBC_2.2.5_ZTS11LoggedErrorsearch_equalvsnprintf@@GLIBC_2.2.5fread@@GLIBC_2.2.5tnt_dir_match_incmh_u32ptr_reservetnt_list_freetnt_tuple_free_ZTS13IllegalParams_ZN9ExceptionD1Evtnt_reply_from_ZN9ExceptionC1ERKS_prscfg_yyset_extramh_u32ptr_clearprscfg_yy_scan_bytestnt_tuplegoptmh_pk_start_resize_Z20tuple_update_executeP12tuple_updatePc__errno_location@@GLIBC_2.2.5qsort@@GLIBC_2.2.5_ZN11ClientErrorD1Evstrdup@@GLIBC_2.2.5__bss_startprscfg_yylexmh_pk_resizeconfetti_strcmpcmp_tarantool_cfg_ZTVN10__cxxabiv120__si_class_type_infoE@@CXXABI_1.3SHA1Transformdestroy_tarantool_cfgregion_freemh_u32ptr_delete_saytnt_iter_storage_ZTV11SystemErrorstrcmp@@GLIBC_2.2.5prscfg_yy_delete_buffer__cxa_allocate_exception@@CXXABI_1.3_ZN6ObjectD0Ev_Z20tuple_update_preparePFPvS_mES_PKcS3_S3_S3_jPjS4_rope_insert_ZTI11LoggedErrorsearch_hashmh_u32ptr_start_resizeslab_puttnt_dir_free_ZN9ExceptionD0Ev__cxa_free_exception@@CXXABI_1.3strcpy@@GLIBC_2.2.5prscfg_yyfree_ZN6ObjectC1Evprscfg_yyparsemh_u32ptr_resizetnt_reply_freetnt_error_codes_ZTV11LoggedErrorprscfg_yy_scan_stringtnt_reply_inittnt_log_marker_v11ts_space_key_typeofmemcmp@@GLIBC_2.2.5calloc@@GLIBC_2.2.5munmap@@GLIBC_2.2.5ts_options_free_ZN11LoggedErrorC1IIPKcEEES2_jjDpT_atoll@@GLIBC_2.2.5prscfg_yyset_intnt_xlog_errortnt_stream_reqid__cxa_throw@@CXXABI_1.3_endfclose@@GLIBC_2.2.5_ZN6ObjectD2Ev_ZN11LoggedErrorD1Evstrncpy@@GLIBC_2.2.5rope_traversets_space_keyallocprscfg_yyset_lvaltnt_mem_realloc_ZN13IllegalParamsD1Ev_ZN11SystemError4initEPKcz__cxa_end_catch@@CXXABI_1.3_ZN14ErrorInjectionD0Evts_options_processtnt_iter_requestclosedir@@GLIBC_2.2.5stderr@@GLIBC_2.2.5prscfg_yyget_columnstrcspn@@GLIBC_2.2.5tnt_list_attnt_enc_writeclearerr@@GLIBC_2.2.5tnt_dir_match_gttnt_log_marker_eof_v11fopen64@@GLIBC_2.2.5strtoll@@GLIBC_2.2.5__cxa_begin_catch@@CXXABI_1.3slab_cache_checkfwrite@@GLIBC_2.2.5tnt_snapshot_openrealloc@@GLIBC_2.2.5crc32c_ZTS6Objectperror@@GLIBC_2.2.5ts_options_initslab_get_with_order_edatadup_tarantool_cfg_ZTV6Object__gxx_personality_v0@@CXXABI_1.3crc32_tabletnt_enc_readfprintf@@GLIBC_2.2.5ts_reftable_free_Unwind_Resume@@GCC_3.0ftello64@@GLIBC_2.2.5ts_space_matchts_space_keyfreeprscfg_yylex_inittnt_iter_listmemcpy@@GLIBC_2.14parse_cfg_file_tarantool_cfg_ZN14ErrorInjectionC1EPKcjS1__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT_tnt_xlog_ZN11SystemError4initEPKcP13__va_list_tag_ZN11SystemErrorD0Evrename@@GLIBC_2.2.5check_cfg_tarantool_cfgstrtod@@GLIBC_2.2.5_ZN13IllegalParamsD2Evprscfg_yyset_columnstdout@@GLIBC_2.2.5tnt_snapshottnt_request_initmallinfo@@GLIBC_2.2.5time@@GLIBC_2.2.5main_initparseCfgDeffflush@@GLIBC_2.2.5gopt_help_ZN11LoggedErrorC2IJPKcEEES2_jjDpT__ZN13IllegalParamsC2EPKcjS1_tarantool-1.5.1.218.g1a69fd6/client/tarantar/cursor.h0000664000000000000000000000047112202131537020536 0ustar rootroot#ifndef TS_CURSOR_H_INCLUDED #define TS_CURSOR_H_INCLUDED struct ts_cursor { struct ts_ref *r; struct ts_key *k; struct tnt_log current; }; int ts_cursor_open(struct ts_cursor *c, struct ts_key *k); struct tnt_tuple* ts_cursor_tuple(struct ts_cursor *c); void ts_cursor_close(struct ts_cursor *c); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/cursor.c0000664000000000000000000000377712231715276020557 0ustar rootroot #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "key.h" #include "hash.h" #include "options.h" #include "space.h" #include "sha1.h" #include "ref.h" #include "ts.h" #include "cursor.h" extern struct ts tss; int ts_cursor_open(struct ts_cursor *c, struct ts_key *k) { c->k = k; c->r = ts_reftable_map(&tss.rt, k->file); int rc = tnt_log_open(&c->current, c->r->file, (c->r->is_snap ? TNT_LOG_SNAPSHOT : TNT_LOG_XLOG)); if (rc == -1) { printf("failed to open file: %s\n", c->r->file); return -1; } rc = tnt_log_seek(&c->current, k->offset); if (rc == -1) { printf("failed to seek for: %s:%"PRIu64"\n", c->r->file, k->offset); tnt_log_close(&c->current); return -1; } if (tnt_log_next(&c->current) == NULL) { printf("failed to read: %s:%"PRIu64"\n", c->r->file, k->offset); tnt_log_close(&c->current); return -1; } return 0; } struct tnt_tuple* ts_cursor_tuple(struct ts_cursor *c) { struct tnt_tuple *t = NULL; if (c->r->is_snap) { t = &c->current.current_value.t; } else { struct tnt_request *rp = &c->current.current_value.r; switch (rp->h.type) { case TNT_OP_INSERT: t = &rp->r.insert.t; break; case TNT_OP_DELETE_1_3: t = &rp->r.del_1_3.t; return t; case TNT_OP_DELETE: t = &rp->r.del.t; return t; case TNT_OP_UPDATE: assert(0); break; default: assert(0); break; } } return t; } void ts_cursor_close(struct ts_cursor *c) { if (c->r == NULL) return; if (c->r->is_snap) { tnt_tuple_free(&c->current.current_value.t); } else { tnt_request_free(&c->current.current_value.r); } tnt_log_close(&c->current); } tarantool-1.5.1.218.g1a69fd6/client/tarantar/hash.h0000664000000000000000000000137112202131537020144 0ustar rootroot#ifndef TC_HASH_H_INCLUDED #define TC_HASH_H_INCLUDED #if !MH_SOURCE #define MH_UNDEF #endif #include #define mh_name _u32ptr struct mh_u32ptr_node_t { uint32_t key; void *val; }; #define mh_node_t struct mh_u32ptr_node_t #define mh_arg_t void * #define mh_hash(a, arg) (a->key) #define mh_eq(a, b, arg) ((a->key) == (b->key)) #include struct ts_space; uint32_t search_hash(const struct ts_key *k, struct ts_space *s); int search_equal(const struct ts_key *a, const struct ts_key *b, struct ts_space *s); #define mh_name _pk #define mh_node_t struct ts_key * #define mh_arg_t struct ts_space * #define mh_hash(a, arg) search_hash(*(a), arg) #define mh_eq(a, b, arg) search_equal(*(a), *(b), arg) #include #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/space.c0000664000000000000000000002125012231715276020317 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include "key.h" #include "hash.h" #include "options.h" #include "config.h" #include "space.h" #include "ref.h" #include "ts.h" #include "sha1.h" #include "indexate.h" #include "snapshot.h" extern struct ts tss; int ts_space_init(struct ts_spaces *s) { s->t = mh_u32ptr_new(); if (s->t == NULL) return -1; return 0; } void ts_space_recycle(struct ts_spaces *s) { mh_int_t i; mh_foreach(s->t, i) { struct ts_space *space = mh_u32ptr_node(s->t, i)->val; mh_int_t pos = 0; while (pos != mh_end(space->index)) { if (mh_exist((space->index), pos)) { struct ts_key *k = *mh_pk_node(space->index, pos); free(k); } pos++; } mh_pk_delete(space->index); space->index = mh_pk_new(); } } void ts_space_free(struct ts_spaces *s) { mh_int_t i; mh_foreach(s->t, i) { struct ts_space *space = mh_u32ptr_node(s->t, i)->val; mh_u32ptr_del(s->t, i, NULL); mh_int_t pos = 0; while (pos != mh_end(space->index)) { if (mh_exist((space->index), pos)) { struct ts_key *k = *mh_pk_node(space->index, pos); free(k); } pos++; } mh_pk_delete(space->index); free(space->pk.fields); free(space); } mh_u32ptr_delete(s->t); } struct ts_space *ts_space_create(struct ts_spaces *s, uint32_t id) { struct ts_space *space = malloc(sizeof(struct ts_space)); if (space == NULL) return NULL; memset(space, 0, sizeof(struct ts_space)); space->id = id; space->index = mh_pk_new(); const struct mh_u32ptr_node_t node = { .key = space->id, .val = space }; mh_u32ptr_put(s->t, &node, NULL, space); return space; } struct ts_space *ts_space_match(struct ts_spaces *s, uint32_t id) { const struct mh_u32ptr_node_t node = { .key = id }; mh_int_t k = mh_u32ptr_get(s->t, &node, NULL); struct ts_space *space = NULL; if (k != mh_end(s->t)) space = mh_u32ptr_node(s->t, k)->val; return space; } enum ts_space_key_type ts_space_key_typeof(char *name) { if (strcmp(name, "NUM") == 0) return TS_SPACE_KEY_NUM; else if (strcmp(name, "NUM64") == 0) return TS_SPACE_KEY_NUM64; else if (strcmp(name, "STR") == 0) return TS_SPACE_KEY_STRING; return TS_SPACE_KEY_UNKNOWN; } static int ts_space_key_init(struct ts_space *s, tarantool_cfg_space *cs) { struct tarantool_cfg_space_index *primary = cs->index[0]; /* calculate primary key part count */ while (primary->key_field[s->pk.count]) { struct tarantool_cfg_space_index_key_field *ck = primary->key_field[s->pk.count]; /*typeof(primary->key_field[s->pk.count]) ck = primary->key_field[s->pk.count];*/ if (ck->fieldno == -1) break; s->pk.count++; } /* allocate key fields */ size_t size = sizeof(struct ts_space_key_field) * s->pk.count; s->pk.fields = malloc(size); if (s->pk.fields == NULL) { printf("can't allocate key fields\n"); return -1; } memset(s->pk.fields, 0, size); int key_has_string = 0; int key_size = 0; /* init key fields */ int kn = 0; while (primary->key_field[kn]) { struct ts_space_key_field *k = &s->pk.fields[kn]; struct tarantool_cfg_space_index_key_field *ck = primary->key_field[kn]; /*typeof(primary->key_field[s->pk.count]) ck = primary->key_field[kn];*/ if (ck->fieldno == -1) break; k->n = ck->fieldno; k->type = ts_space_key_typeof(ck->type); if (key_has_string) { kn++; continue; } switch (k->type) { case TS_SPACE_KEY_STRING: key_has_string = 1; break; case TS_SPACE_KEY_NUM: key_size += 4; break; case TS_SPACE_KEY_NUM64: key_size += 8; break; default: printf("bad key type\n"); return -1; } kn++; } /* decide key compaction type */ if (key_has_string || key_size > 20) { s->c = TS_SPACE_COMPACT_CHECKSUM; s->key_size = 20; s->key_div = 5; } else { s->c = TS_SPACE_COMPACT_SPARSE; s->key_size = key_size; s->key_div = key_size / 4; } return 0; } int ts_space_fillof(struct ts_spaces *s, int n, tarantool_cfg_space *cs) { struct ts_space *space = ts_space_match(s, n); if (space) { printf("space %i is already defined\n", n); return -1; } space = ts_space_create(s, n); if (space == NULL) { printf("failed to create space %d\n", n); return -1; } if (cs->index[0] == NULL) { printf("primary index is not defined\n"); return -1; } memset(&space->pk, 0, sizeof(space->pk)); int rc = ts_space_key_init(space, cs); if (rc == -1) return -1; return 0; } int ts_space_fill(struct ts_spaces *s, struct ts_options *opts) { int i = 0; for (; opts->cfg.space[i]; i++) { tarantool_cfg_space *cs = opts->cfg.space[i]; if (!CNF_STRUCT_DEFINED(cs) || !cs->enabled) continue; int rc = ts_space_fillof(s, i, cs); if (rc == -1) return -1; } return 0; } static inline struct ts_key* ts_space_keyalloc_sha(struct ts_space *s, struct tnt_tuple *t, int fileid, uint64_t offset, int attach) { int size = sizeof(struct ts_key) + s->key_size; if (attach) size += sizeof(uint32_t) + t->size; struct ts_key *k = malloc(size); if (k == NULL) return NULL; k->file = fileid; k->offset = offset; k->flags = 0; SHA1_CTX ctx; SHA1Init(&ctx); int i = 0; while (i < s->pk.count) { struct tnt_iter it; tnt_iter(&it, t); if (tnt_field(&it, t, s->pk.fields[i].n) == NULL) { free(k); tnt_iter_free(&it); return NULL; } if (it.status != TNT_ITER_OK) { free(k); tnt_iter_free(&it); return NULL; } SHA1Update(&ctx, (const unsigned char*)TNT_IFIELD_DATA(&it), TNT_IFIELD_SIZE(&it)); tnt_iter_free(&it); i++; } SHA1Final(k->key, &ctx); if (attach) { k->flags = TS_KEY_WITH_DATA; memcpy(k->key + s->key_size, &t->size, sizeof(uint32_t)); memcpy(k->key + s->key_size + sizeof(uint32_t), t->data, t->size); } return k; } static inline struct ts_key* ts_space_keyalloc_sparse(struct ts_space *s, struct tnt_tuple *t, int fileid, uint64_t offset, int attach) { int size = sizeof(struct ts_key) + s->key_size; if (attach) size += sizeof(uint32_t) + t->size; struct ts_key *k = malloc(size); if (k == NULL) return NULL; memset(k, 0, size); k->file = fileid; k->offset = offset; k->flags = 0; int off = 0; int i = 0; while (i < s->pk.count) { struct tnt_iter it; tnt_iter(&it, t); if (tnt_field(&it, t, s->pk.fields[i].n) == NULL) { free(k); tnt_iter_free(&it); return NULL; } if (it.status != TNT_ITER_OK) { free(k); tnt_iter_free(&it); return NULL; } memcpy(k->key + off, TNT_IFIELD_DATA(&it), TNT_IFIELD_SIZE(&it)); off += TNT_IFIELD_SIZE(&it); tnt_iter_free(&it); i++; } if (attach) { k->flags = TS_KEY_WITH_DATA; memcpy(k->key + s->key_size, &t->size, sizeof(uint32_t)); memcpy(k->key + s->key_size + sizeof(uint32_t), t->data, t->size); } return k; } struct ts_key* ts_space_keyalloc(struct ts_space *s, struct tnt_tuple *t, int fileid, uint64_t offset, int attach) { struct ts_key *k = NULL; switch (s->c) { case TS_SPACE_COMPACT_CHECKSUM: k = ts_space_keyalloc_sha(s, t, fileid, offset, attach); break; case TS_SPACE_COMPACT_SPARSE: k = ts_space_keyalloc_sparse(s, t, fileid, offset, attach); break; } if (k == NULL) return NULL; tss.alloc += ts_space_keysize(s, k); ts_oomcheck(); return k; } void ts_space_keyfree(struct ts_space *s, struct ts_key *k) { tss.alloc -= ts_space_keysize(s, k); free(k); } tarantool-1.5.1.218.g1a69fd6/client/tarantar/space.h0000664000000000000000000000253312231715276020327 0ustar rootroot#ifndef TS_SPACE_H_INCLUDED #define TS_SPACE_H_INCLUDED enum ts_space_key_type { TS_SPACE_KEY_UNKNOWN = -1, TS_SPACE_KEY_NUM = 0, TS_SPACE_KEY_NUM64, TS_SPACE_KEY_STRING }; enum ts_space_compact { TS_SPACE_COMPACT_CHECKSUM, TS_SPACE_COMPACT_SPARSE }; struct ts_space_key_field { enum ts_space_key_type type; int n; }; struct ts_space_key { struct ts_space_key_field *fields; int count; }; struct ts_space { enum ts_space_compact c; int key_size; int key_div; uint32_t id; struct mh_pk_t *index; struct ts_space_key pk; }; struct ts_spaces { struct mh_u32ptr_t *t; }; int ts_space_init(struct ts_spaces *s); void ts_space_free(struct ts_spaces *s); void ts_space_recycle(struct ts_spaces *s); struct ts_space *ts_space_create(struct ts_spaces *s, uint32_t id); struct ts_space *ts_space_match(struct ts_spaces *s, uint32_t id); int ts_space_fill(struct ts_spaces *s, struct ts_options *opts); struct ts_key* ts_space_keyalloc(struct ts_space *s, struct tnt_tuple *t, int fileid, uint64_t offset, int attach); void ts_space_keyfree(struct ts_space *s, struct ts_key *k); static inline size_t ts_space_keysize(struct ts_space *s, struct ts_key *k) { size_t size = sizeof(struct ts_key) + s->key_size; if (k->flags == TS_KEY_WITH_DATA) size += sizeof(uint32_t) + *(uint32_t*)(k->key + s->key_size); return size; } #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/CMakeLists.txt0000664000000000000000000000204412202131537021606 0ustar rootrootproject(tnt_snap) set (util_snap "tarantar") set (util_snap_sources sha1.c main.c config.c space.c options.c indexate.c ref.c cursor.c snapshot.c update.cc compat.c) set (util_snap_libs tntrpl tntnet tnt) list(APPEND util_snap_sources ${CMAKE_SOURCE_DIR}/third_party/crc32.c ${CMAKE_SOURCE_DIR}/cfg/tarantool_box_cfg.c ${CMAKE_SOURCE_DIR}/cfg/prscfg.c ${CMAKE_SOURCE_DIR}/src/errcode.c ${CMAKE_SOURCE_DIR}/src/exception.cc ${CMAKE_SOURCE_DIR}/src/rope.c ${CMAKE_SOURCE_DIR}/src/box/tuple_update.cc ) set_source_files_properties(${CMAKE_SOURCE_DIR}/cfg/tarantool_box_cfg.c ${CMAKE_SOURCE_DIR}/cfg/prscfg.c PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter" GENERATED True) set_source_files_properties(${util_snap_sources} PROPERTIES OBJECT_DEPENDS ${CMAKE_SOURCE_DIR}/cfg/tarantool_box_cfg.h) set_source_files_compile_flags(${util_snap_sources}) add_executable(${util_snap} ${util_snap_sources}) target_link_libraries (${util_snap} ${util_snap_libs} gopt small) install (TARGETS ${util_snap} DESTINATION bin) tarantool-1.5.1.218.g1a69fd6/client/tarantar/Makefile0000664000000000000000000006336112213333035020516 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/tarantar/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarantar/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarantar/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarantar/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarantar/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. client/tarantar/CMakeFiles/tarantar.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/tarantar/CMakeFiles/tarantar.dir/rule .PHONY : client/tarantar/CMakeFiles/tarantar.dir/rule # Convenience name for target. tarantar: client/tarantar/CMakeFiles/tarantar.dir/rule .PHONY : tarantar # fast build rule for target. tarantar/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/build .PHONY : tarantar/fast __/__/cfg/prscfg.o: __/__/cfg/prscfg.c.o .PHONY : __/__/cfg/prscfg.o # target to build an object file __/__/cfg/prscfg.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/cfg/prscfg.c.o .PHONY : __/__/cfg/prscfg.c.o __/__/cfg/prscfg.i: __/__/cfg/prscfg.c.i .PHONY : __/__/cfg/prscfg.i # target to preprocess a source file __/__/cfg/prscfg.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/cfg/prscfg.c.i .PHONY : __/__/cfg/prscfg.c.i __/__/cfg/prscfg.s: __/__/cfg/prscfg.c.s .PHONY : __/__/cfg/prscfg.s # target to generate assembly for a file __/__/cfg/prscfg.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/cfg/prscfg.c.s .PHONY : __/__/cfg/prscfg.c.s __/__/cfg/tarantool_box_cfg.o: __/__/cfg/tarantool_box_cfg.c.o .PHONY : __/__/cfg/tarantool_box_cfg.o # target to build an object file __/__/cfg/tarantool_box_cfg.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/cfg/tarantool_box_cfg.c.o .PHONY : __/__/cfg/tarantool_box_cfg.c.o __/__/cfg/tarantool_box_cfg.i: __/__/cfg/tarantool_box_cfg.c.i .PHONY : __/__/cfg/tarantool_box_cfg.i # target to preprocess a source file __/__/cfg/tarantool_box_cfg.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/cfg/tarantool_box_cfg.c.i .PHONY : __/__/cfg/tarantool_box_cfg.c.i __/__/cfg/tarantool_box_cfg.s: __/__/cfg/tarantool_box_cfg.c.s .PHONY : __/__/cfg/tarantool_box_cfg.s # target to generate assembly for a file __/__/cfg/tarantool_box_cfg.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/cfg/tarantool_box_cfg.c.s .PHONY : __/__/cfg/tarantool_box_cfg.c.s __/__/src/box/tuple_update.o: __/__/src/box/tuple_update.cc.o .PHONY : __/__/src/box/tuple_update.o # target to build an object file __/__/src/box/tuple_update.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/box/tuple_update.cc.o .PHONY : __/__/src/box/tuple_update.cc.o __/__/src/box/tuple_update.i: __/__/src/box/tuple_update.cc.i .PHONY : __/__/src/box/tuple_update.i # target to preprocess a source file __/__/src/box/tuple_update.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/box/tuple_update.cc.i .PHONY : __/__/src/box/tuple_update.cc.i __/__/src/box/tuple_update.s: __/__/src/box/tuple_update.cc.s .PHONY : __/__/src/box/tuple_update.s # target to generate assembly for a file __/__/src/box/tuple_update.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/box/tuple_update.cc.s .PHONY : __/__/src/box/tuple_update.cc.s __/__/src/errcode.o: __/__/src/errcode.c.o .PHONY : __/__/src/errcode.o # target to build an object file __/__/src/errcode.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/errcode.c.o .PHONY : __/__/src/errcode.c.o __/__/src/errcode.i: __/__/src/errcode.c.i .PHONY : __/__/src/errcode.i # target to preprocess a source file __/__/src/errcode.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/errcode.c.i .PHONY : __/__/src/errcode.c.i __/__/src/errcode.s: __/__/src/errcode.c.s .PHONY : __/__/src/errcode.s # target to generate assembly for a file __/__/src/errcode.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/errcode.c.s .PHONY : __/__/src/errcode.c.s __/__/src/exception.o: __/__/src/exception.cc.o .PHONY : __/__/src/exception.o # target to build an object file __/__/src/exception.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/exception.cc.o .PHONY : __/__/src/exception.cc.o __/__/src/exception.i: __/__/src/exception.cc.i .PHONY : __/__/src/exception.i # target to preprocess a source file __/__/src/exception.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/exception.cc.i .PHONY : __/__/src/exception.cc.i __/__/src/exception.s: __/__/src/exception.cc.s .PHONY : __/__/src/exception.s # target to generate assembly for a file __/__/src/exception.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/exception.cc.s .PHONY : __/__/src/exception.cc.s __/__/src/rope.o: __/__/src/rope.c.o .PHONY : __/__/src/rope.o # target to build an object file __/__/src/rope.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/rope.c.o .PHONY : __/__/src/rope.c.o __/__/src/rope.i: __/__/src/rope.c.i .PHONY : __/__/src/rope.i # target to preprocess a source file __/__/src/rope.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/rope.c.i .PHONY : __/__/src/rope.c.i __/__/src/rope.s: __/__/src/rope.c.s .PHONY : __/__/src/rope.s # target to generate assembly for a file __/__/src/rope.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/src/rope.c.s .PHONY : __/__/src/rope.c.s __/__/third_party/crc32.o: __/__/third_party/crc32.c.o .PHONY : __/__/third_party/crc32.o # target to build an object file __/__/third_party/crc32.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/third_party/crc32.c.o .PHONY : __/__/third_party/crc32.c.o __/__/third_party/crc32.i: __/__/third_party/crc32.c.i .PHONY : __/__/third_party/crc32.i # target to preprocess a source file __/__/third_party/crc32.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/third_party/crc32.c.i .PHONY : __/__/third_party/crc32.c.i __/__/third_party/crc32.s: __/__/third_party/crc32.c.s .PHONY : __/__/third_party/crc32.s # target to generate assembly for a file __/__/third_party/crc32.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/__/__/third_party/crc32.c.s .PHONY : __/__/third_party/crc32.c.s compat.o: compat.c.o .PHONY : compat.o # target to build an object file compat.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/compat.c.o .PHONY : compat.c.o compat.i: compat.c.i .PHONY : compat.i # target to preprocess a source file compat.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/compat.c.i .PHONY : compat.c.i compat.s: compat.c.s .PHONY : compat.s # target to generate assembly for a file compat.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/compat.c.s .PHONY : compat.c.s config.o: config.c.o .PHONY : config.o # target to build an object file config.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/config.c.o .PHONY : config.c.o config.i: config.c.i .PHONY : config.i # target to preprocess a source file config.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/config.c.i .PHONY : config.c.i config.s: config.c.s .PHONY : config.s # target to generate assembly for a file config.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/config.c.s .PHONY : config.c.s cursor.o: cursor.c.o .PHONY : cursor.o # target to build an object file cursor.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/cursor.c.o .PHONY : cursor.c.o cursor.i: cursor.c.i .PHONY : cursor.i # target to preprocess a source file cursor.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/cursor.c.i .PHONY : cursor.c.i cursor.s: cursor.c.s .PHONY : cursor.s # target to generate assembly for a file cursor.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/cursor.c.s .PHONY : cursor.c.s indexate.o: indexate.c.o .PHONY : indexate.o # target to build an object file indexate.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/indexate.c.o .PHONY : indexate.c.o indexate.i: indexate.c.i .PHONY : indexate.i # target to preprocess a source file indexate.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/indexate.c.i .PHONY : indexate.c.i indexate.s: indexate.c.s .PHONY : indexate.s # target to generate assembly for a file indexate.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/indexate.c.s .PHONY : indexate.c.s main.o: main.c.o .PHONY : main.o # target to build an object file main.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/main.c.o .PHONY : main.c.o main.i: main.c.i .PHONY : main.i # target to preprocess a source file main.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/main.c.i .PHONY : main.c.i main.s: main.c.s .PHONY : main.s # target to generate assembly for a file main.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/main.c.s .PHONY : main.c.s options.o: options.c.o .PHONY : options.o # target to build an object file options.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/options.c.o .PHONY : options.c.o options.i: options.c.i .PHONY : options.i # target to preprocess a source file options.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/options.c.i .PHONY : options.c.i options.s: options.c.s .PHONY : options.s # target to generate assembly for a file options.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/options.c.s .PHONY : options.c.s ref.o: ref.c.o .PHONY : ref.o # target to build an object file ref.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/ref.c.o .PHONY : ref.c.o ref.i: ref.c.i .PHONY : ref.i # target to preprocess a source file ref.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/ref.c.i .PHONY : ref.c.i ref.s: ref.c.s .PHONY : ref.s # target to generate assembly for a file ref.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/ref.c.s .PHONY : ref.c.s sha1.o: sha1.c.o .PHONY : sha1.o # target to build an object file sha1.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/sha1.c.o .PHONY : sha1.c.o sha1.i: sha1.c.i .PHONY : sha1.i # target to preprocess a source file sha1.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/sha1.c.i .PHONY : sha1.c.i sha1.s: sha1.c.s .PHONY : sha1.s # target to generate assembly for a file sha1.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/sha1.c.s .PHONY : sha1.c.s snapshot.o: snapshot.c.o .PHONY : snapshot.o # target to build an object file snapshot.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/snapshot.c.o .PHONY : snapshot.c.o snapshot.i: snapshot.c.i .PHONY : snapshot.i # target to preprocess a source file snapshot.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/snapshot.c.i .PHONY : snapshot.c.i snapshot.s: snapshot.c.s .PHONY : snapshot.s # target to generate assembly for a file snapshot.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/snapshot.c.s .PHONY : snapshot.c.s space.o: space.c.o .PHONY : space.o # target to build an object file space.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/space.c.o .PHONY : space.c.o space.i: space.c.i .PHONY : space.i # target to preprocess a source file space.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/space.c.i .PHONY : space.c.i space.s: space.c.s .PHONY : space.s # target to generate assembly for a file space.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/space.c.s .PHONY : space.c.s update.o: update.cc.o .PHONY : update.o # target to build an object file update.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/update.cc.o .PHONY : update.cc.o update.i: update.cc.i .PHONY : update.i # target to preprocess a source file update.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/update.cc.i .PHONY : update.cc.i update.s: update.cc.s .PHONY : update.s # target to generate assembly for a file update.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/update.cc.s .PHONY : update.cc.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... tarantar" @echo "... __/__/cfg/prscfg.o" @echo "... __/__/cfg/prscfg.i" @echo "... __/__/cfg/prscfg.s" @echo "... __/__/cfg/tarantool_box_cfg.o" @echo "... __/__/cfg/tarantool_box_cfg.i" @echo "... __/__/cfg/tarantool_box_cfg.s" @echo "... __/__/src/box/tuple_update.o" @echo "... __/__/src/box/tuple_update.i" @echo "... __/__/src/box/tuple_update.s" @echo "... __/__/src/errcode.o" @echo "... __/__/src/errcode.i" @echo "... __/__/src/errcode.s" @echo "... __/__/src/exception.o" @echo "... __/__/src/exception.i" @echo "... __/__/src/exception.s" @echo "... __/__/src/rope.o" @echo "... __/__/src/rope.i" @echo "... __/__/src/rope.s" @echo "... __/__/third_party/crc32.o" @echo "... __/__/third_party/crc32.i" @echo "... __/__/third_party/crc32.s" @echo "... compat.o" @echo "... compat.i" @echo "... compat.s" @echo "... config.o" @echo "... config.i" @echo "... config.s" @echo "... cursor.o" @echo "... cursor.i" @echo "... cursor.s" @echo "... indexate.o" @echo "... indexate.i" @echo "... indexate.s" @echo "... main.o" @echo "... main.i" @echo "... main.s" @echo "... options.o" @echo "... options.i" @echo "... options.s" @echo "... ref.o" @echo "... ref.i" @echo "... ref.s" @echo "... sha1.o" @echo "... sha1.i" @echo "... sha1.s" @echo "... snapshot.o" @echo "... snapshot.i" @echo "... snapshot.s" @echo "... space.o" @echo "... space.i" @echo "... space.s" @echo "... update.o" @echo "... update.i" @echo "... update.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/client/tarantar/key.h0000664000000000000000000000031412231715276020017 0ustar rootroot#ifndef TS_KEY_H_INCLUDED #define TS_KEY_H_INCLUDED #define TS_KEY_WITH_DATA 1 struct ts_key { uint16_t file; uint64_t offset; uint8_t flags; unsigned char key[]; } __attribute__((packed)); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/options.h0000664000000000000000000000102312212057124020706 0ustar rootroot#ifndef TS_OPTIONS_H_INCLUDED #define TS_OPTIONS_H_INCLUDED enum ts_options_mode { TS_MODE_USAGE, TS_MODE_VERSION, TS_MODE_CREATE }; struct ts_options { uint64_t limit; enum ts_options_mode mode; int to_lsn_set; int interval; uint64_t to_lsn; const char *file_config; struct tarantool_cfg cfg; }; void ts_options_init(struct ts_options *opts); void ts_options_free(struct ts_options *opts); enum ts_options_mode ts_options_process(struct ts_options *opts, int argc, char **argv); int ts_options_usage(void); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/sha1.h0000664000000000000000000000104612231715276020066 0ustar rootroot#ifndef TS_SHA1_H_INCLUDED #define TS_SHA1_H_INCLUDED #include /* ================ sha1.h ================ */ /* SHA-1 in C By Steve Reid 100% Public Domain */ typedef struct { uint32_t state[5]; uint32_t count[2]; unsigned char buffer[64]; } SHA1_CTX; void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); void SHA1Init(SHA1_CTX* context); void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len); void SHA1Final(unsigned char digest[20], SHA1_CTX* context); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/update.h0000664000000000000000000000021612202131537020500 0ustar rootroot#ifndef TS_UPDATE_H_INCLUDED #define TS_UPDATE_H_INCLUDED struct tnt_tuple *ts_update(struct tnt_request *r, struct tnt_tuple *old); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/indexate.h0000664000000000000000000000013612202131537021020 0ustar rootroot#ifndef TS_INDEXATE_H_INCLUDED #define TS_INDEXATE_H_INCLUDED int ts_indexate(void); #endif tarantool-1.5.1.218.g1a69fd6/client/tarantar/compat.c0000664000000000000000000000411512202131537020476 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include "options.h" #include "config.h" void out_warning(ConfettyError v, char *format, ...) { (void)v; va_list ap; va_start(ap, format); vprintf(format, ap); printf("\n"); va_end(ap); } void say_snap(int level, const char *filename, int line, const char *error, const char *format, ...) { (void)level; (void)filename; (void)line; (void)error; (void)format; } sayfunc_t _say = say_snap; void assert_fail(const char *assertion, const char *file, unsigned int line, const char *function) { (void)function; fflush(NULL); printf("assert: %s:%d %s\n", file, line, assertion); exit(1); } tarantool-1.5.1.218.g1a69fd6/client/tarantool/0000775000000000000000000000000012242653271017245 5ustar rootroottarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_buf.c0000664000000000000000000000643412202131537020652 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include "client/tarantool/tc_buf.h" /* Strip trailing ws from (char*) */ size_t strip_end_ws(char *str) { size_t last = 0; for (size_t i = 0; str[i] != 0; ++i) if (!isspace(str[i])) last = i + 1; str[last] = '\0'; return last; } /* Init membuf */ int tc_buf(struct tc_buf *buf) { buf->size = TC_BUF_INIT_SIZE; buf->used = 0; buf->data = (char *)malloc(buf->size); if (buf->data == NULL) return -1; return 0; } /* Append len bytes of memory from str pointed memory */ int tc_buf_append(struct tc_buf *buf, void *str, size_t len) { if (buf->size - buf->used < len) { if (buf->size < len) buf->size = len; buf->size *= TC_BUF_MULTIPLIER; char *nd = (char *)realloc(buf->data, buf->size); if (nd == NULL) return -1; buf->data = nd; } memcpy(buf->data + buf->used, str, len); buf->used += len; return 0; } /* Remove last "num" symbols */ size_t tc_buf_delete(struct tc_buf *buf, size_t num) { if (buf->used > num) { buf->used -= num; } else { num = buf->used; buf->used = 0; } return num; } inline int tc_buf_isempty(struct tc_buf *buf) { return (buf->used == 0); } inline void tc_buf_clear(struct tc_buf *buf) { buf->used = 0; } /* Free membuffer */ void tc_buf_free(struct tc_buf *buf) { if (buf->data) free(buf->data); } /* Init buffer as STR */ int tc_buf_str(struct tc_buf *buf) { if (tc_buf(buf)) return -1; return tc_buf_append(buf, (void *)"\0", 1); } /* Append str to STR */ int tc_buf_str_append(struct tc_buf *buf, char *str, size_t len) { tc_buf_delete(buf, 1); if (tc_buf_append(buf, (void *)str, len)) return -1; if (tc_buf_append(buf, (void *)"\0", 1)) return -1; return 0; } /* Remove trailing ws from STR */ int tc_buf_str_stripws(struct tc_buf *buf) { if (buf->data) { buf->used = 1 + strip_end_ws(buf->data); return 0; } return -1; } inline int tc_buf_str_isempty(struct tc_buf *buf) { return (buf->used == 1 ? 1 : 0) || (tc_buf_isempty(buf)); } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_store.h0000664000000000000000000000271412202131537021234 0ustar rootroot#ifndef TC_STORE_H_INCLUDED #define TC_STORE_H_INCLUDED /* * Copyright (C) 2012 Mail.RU * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ int tc_store_cat(void); int tc_store_play(void); int tc_store_remote(void); #endif /* TC_STORE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_store.c0000664000000000000000000001717012231715276021243 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_opt.h" #include "client/tarantool/tc_admin.h" #include "client/tarantool/tc.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc_print_xlog.h" #include "client/tarantool/tc_print_snap.h" #include "client/tarantool/tc_query.h" #include "client/tarantool/tc_store.h" extern struct tc tc; typedef int (*tc_iter_t)(struct tnt_iter *i); static int tc_store_error(char *fmt, ...) { char msg[256]; va_list args; va_start(args, fmt); vsnprintf(msg, sizeof(msg), fmt, args); va_end(args); tc_printf("error: %s\n", msg); return -1; } static int tc_store_foreach(struct tnt_iter *i, tc_iter_t cb) { while (tnt_next(i)) { if (cb(i) == -1) { tnt_iter_free(i); return -1; } } int rc = 0; if (i->status == TNT_ITER_FAIL) rc = tc_store_error("parsing failed"); return rc; } static void tc_store_print(struct tnt_log_header_v11 *hdr, struct tnt_request *r) { tc_printf("%s lsn: %"PRIu64", time: %f, len: %"PRIu32"\n", tc_query_type(r->h.type), hdr->lsn, hdr->tm, hdr->len); switch (r->h.type) { case TNT_OP_INSERT: tc_print_tuple(&r->r.insert.t); break; case TNT_OP_DELETE: tc_print_tuple(&r->r.del.t); break; case TNT_OP_DELETE_1_3: tc_print_tuple(&r->r.del_1_3.t); break; case TNT_OP_UPDATE: tc_print_tuple(&r->r.update.t); break; case TNT_OP_CALL: tc_print_tuple(&r->r.call.t); break; } } static int tc_store_check_skip(struct tnt_iter *i, struct tnt_request *r) { struct tnt_stream_xlog *s = TNT_SXLOG_CAST(TNT_IREQUEST_STREAM(i)); if (tc.opt.space_set) { if (r->h.type == TNT_OP_CALL) return 1; uint32_t ns = *(uint32_t*)&r->r; if (ns != tc.opt.space) return 1; } if (tc.opt.lsn_from_set) { if (s->log.current.hdr.lsn < tc.opt.lsn_from) return 1; } if (tc.opt.lsn_to_set) { if (s->log.current.hdr.lsn > tc.opt.lsn_to) return 1; } return 0; } static int tc_store_xlog_printer(struct tnt_iter *i) { struct tnt_request *r = TNT_IREQUEST_PTR(i); if (tc_store_check_skip(i, r)) return 0; struct tnt_stream_xlog *s = TNT_SXLOG_CAST(TNT_IREQUEST_STREAM(i)); ((tc_printerf_xlog_t)tc.opt.xlog_printer)(&s->log.current, r); return 0; } static int tc_store_snap_printer(struct tnt_iter *i) { struct tnt_tuple *tu = TNT_ISTORAGE_TUPLE(i); struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(TNT_ISTORAGE_STREAM(i)); if (tc.opt.space_set) { if (ss->log.current.row_snap.space != tc.opt.space) return 0; } ((tc_printerf_snap_t)tc.opt.snap_printer)(&ss->log.current, tu); return 0; } static int tc_store_foreach_request(struct tnt_stream *s, tc_iter_t cb) { struct tnt_iter i; tnt_iter_request(&i, s); int rc = tc_store_foreach(&i, cb); tnt_iter_free(&i); return rc; } static int tc_store_foreach_xlog(tc_iter_t cb) { struct tnt_stream s; tnt_xlog(&s); if (tnt_xlog_open(&s, (char*)tc.opt.file) == -1) { tnt_stream_free(&s); return 1; } int rc = tc_store_foreach_request(&s, cb); tnt_stream_free(&s); return rc; } static int tc_store_foreach_snap(tc_iter_t cb) { struct tnt_stream s; tnt_snapshot(&s); if (tnt_snapshot_open(&s, (char*)tc.opt.file) == -1) { tnt_stream_free(&s); return 1; } struct tnt_iter i; tnt_iter_storage(&i, &s); int rc = tc_store_foreach(&i, cb); tnt_iter_free(&i); tnt_stream_free(&s); return rc; } int tc_store_cat(void) { enum tnt_log_type type = tnt_log_guess((char*)tc.opt.file); if (type == TNT_LOG_NONE) return 1; int print_headers = tc.opt.raw && tc.opt.raw_with_headers; if (print_headers) { char *h = (type == TNT_LOG_SNAPSHOT ? TNT_LOG_MAGIC_SNAP : TNT_LOG_MAGIC_XLOG); fputs(h, stdout); fputs(TNT_LOG_VERSION, stdout); fputs("\n", stdout); } int rc; switch (type) { case TNT_LOG_SNAPSHOT: rc = tc_store_foreach_snap(tc_store_snap_printer); break; case TNT_LOG_XLOG: rc = tc_store_foreach_xlog(tc_store_xlog_printer); break; case TNT_LOG_NONE: rc = 1; break; default: return -1; } if (rc == 0 && print_headers) { fwrite(&tnt_log_marker_eof_v11, sizeof(tnt_log_marker_eof_v11), 1, stdout); } return rc; } static int tc_store_snap_resender(struct tnt_iter *i) { struct tnt_tuple *tu = TNT_ISTORAGE_TUPLE(i); struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(TNT_ISTORAGE_STREAM(i)); if (tc.opt.space_set) { if (ss->log.current.row_snap.space != tc.opt.space) return 0; } if (tnt_insert(tc.net, ss->log.current.row_snap.space, TNT_FLAG_ADD, tu) == -1) return tc_store_error("failed to write request"); char *e = NULL; if (tc_query_foreach(NULL, NULL, &e) == -1) { tc_store_error("%s", e); free(e); return -1; } return 0; } static int tc_store_xlog_resender(struct tnt_iter *i) { struct tnt_request *r = TNT_IREQUEST_PTR(i); if (tc_store_check_skip(i, r)) return 0; if (tc.net->write_request(tc.net, r) == -1) return tc_store_error("failed to write request"); char *e = NULL; if (tc_query_foreach(NULL, NULL, &e) == -1) { tc_store_error("%s", e); free(e); return -1; } return 0; } int tc_store_play(void) { enum tnt_log_type type = tnt_log_guess((char *)tc.opt.file); if (type == TNT_LOG_NONE) return 1; int rc; switch (type) { case TNT_LOG_SNAPSHOT: rc = tc_store_foreach_snap(tc_store_snap_resender); break; case TNT_LOG_XLOG: rc = tc_store_foreach_xlog(tc_store_xlog_resender); break; case TNT_LOG_NONE: rc = 1; break; default: return -1; } return rc; } static int tc_store_printer_from_rpl(struct tnt_iter *i) { struct tnt_request *r = TNT_IREQUEST_PTR(i); struct tnt_stream_rpl *s = TNT_RPL_CAST(TNT_IREQUEST_STREAM(i)); tc_store_print(&s->hdr, r); return 0; } int tc_store_remote(void) { if (tc.opt.lsn == LLONG_MAX || tc.opt.lsn == LLONG_MIN) { tc_store_error("bad lsn number"); return 1; } struct tnt_stream s; tnt_rpl(&s); tnt_rpl_attach(&s, tc.net); int rc = 0; if (tnt_rpl_open(&s, tc.opt.lsn) == -1) { rc = 1; goto done; } if (tc_store_foreach_request(&s, tc_store_printer_from_rpl) == -1) rc = 1; done: tnt_stream_free(&s); return rc; } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_buf.h0000664000000000000000000000366112202131537020656 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define TC_BUF_INIT_SIZE 4096 #define TC_BUF_MULTIPLIER 2 size_t strip_end_ws(char *str); struct tc_buf { size_t size; size_t used; char *data; }; int tc_buf(struct tc_buf *buf); void *tc_buf_realloc(void *data, size_t size); int tc_buf_append(struct tc_buf *buf, void *str, size_t len); size_t tc_buf_delete(struct tc_buf *buf, size_t len); int tc_buf_isempty(struct tc_buf *buf); void tc_buf_clear(struct tc_buf *buf); void tc_buf_free(struct tc_buf *buf); int tc_buf_str(struct tc_buf *buf); int tc_buf_str_append(struct tc_buf *buf, char *str, size_t len); int tc_buf_str_stripws(struct tc_buf *buf); int tc_buf_str_isempty(struct tc_buf *buf); tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_admin.c0000664000000000000000000000714612231715257021200 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_admin.h" int tc_admin_connect(struct tc_admin *a, const char *host, int port) { a->host = host; a->port = port; a->fd = socket(AF_INET, SOCK_STREAM, 0); if (a->fd < 0) return -1; int opt = 1; if (setsockopt(a->fd, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)) == -1) goto error; struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(a->port); struct hostent *he = gethostbyname(a->host); if (he) memcpy(&addr.sin_addr, (void*)(he->h_addr), he->h_length); else goto error; if (connect(a->fd, (struct sockaddr*)&addr, sizeof(addr)) == -1) goto error; return 0; error: close(a->fd); return -1; } int tc_admin_reconnect(struct tc_admin *a) { tc_admin_close(a); return tc_admin_connect(a, a->host, a->port); } void tc_admin_close(struct tc_admin *a) { if (a->fd > 0) close(a->fd); a->fd = 0; } static int tc_admin_send(struct tc_admin *a, char *buf, size_t size) { ssize_t rc, off = 0; do { rc = send(a->fd, buf + off, size - off, 0); if (rc <= 0) return -1; off += rc; } while (off != size); return 0; } int tc_admin_query(struct tc_admin *a, char *q) { if (tc_admin_send(a, q, strlen(q)) == -1) return -1; if (tc_admin_send(a, "\n", 1) == -1) return -1; return 0; } int tc_admin_reply(struct tc_admin *a, char **r, size_t *size) { char *buf = NULL; size_t off = 0; while (1) { char rx[8096]; ssize_t rxi = recv(a->fd, rx, sizeof(rx), 0); if (rxi <= 0) break; char *bufn = (char *)realloc(buf, off + rxi + 1); if (bufn == NULL) { free(buf); break; } buf = bufn; memcpy(buf + off, rx, rxi); off += rxi; buf[off] = 0; if (off >= 8) { int done_cr = !memcmp(buf, "---\n", 4) && !memcmp(buf + off - 4, "...\n", 4); int done_crlf = !done_cr && off >= 10 && !memcmp(buf, "---\r\n", 5) && !memcmp(buf + off - 5, "...\r\n", 5); if (done_crlf || done_cr) { *r = buf; *size = off; return 0; } } } if (buf) free(buf); return -1; } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_cli.c0000664000000000000000000002663512231715276020664 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_opt.h" #include "client/tarantool/tc_admin.h" #include "client/tarantool/tc.h" #include "client/tarantool/tc_query.h" #include "client/tarantool/tc_cli.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc_buf.h" #define TC_DEFAULT_HISTORY_FILE ".tarantool_history" #define TC_ALLOCATION_ERROR "error: memory allocation failed for %zu bytes\n" #define TC_REALLOCATION_ERROR "error: memory reallocation failed for %zu bytes\n" extern struct tc tc; static inline int tc_cli_error(char *e) { if (e) { tc_printf("%s\n", e); free(e); } return 1; } static int tc_cli_reconnect(void) { if (tnt_connect(tc.net) == -1) { tc_printf("reconnect: %s\n", tnt_strerror(tc.net)); return 1; } if (tc_admin_reconnect(&tc.admin) == -1) { tc_printf("reconnect: admin console connection failed\n"); return 1; } tc_printf("reconnected\n"); return 0; } enum tc_keywords { TC_EXIT = TNT_TK_CUSTOM + 1, TC_TEE, TC_NOTEE, TC_LOADFILE, TC_HELP, TC_SETOPT, TC_SETOPT_DELIM }; static struct tnt_lex_keyword tc_lex_keywords[] = { { "e", 1, TC_EXIT }, { "ex", 2, TC_EXIT }, { "exi", 3, TC_EXIT }, { "exit", 4, TC_EXIT }, { "q", 1, TC_EXIT }, { "qu", 2, TC_EXIT }, { "qui", 3, TC_EXIT }, { "quit", 4, TC_EXIT }, { "help", 4, TC_HELP }, { "tee", 3, TC_TEE }, { "notee", 5, TC_NOTEE }, { "loadfile", 8, TC_LOADFILE }, { "setopt", 6, TC_SETOPT}, { "delimiter", 9, TC_SETOPT_DELIM}, { NULL, 0, TNT_TK_NONE } }; enum tc_cli_cmd_ret { TC_CLI_OK, TC_CLI_ERROR, TC_CLI_EXIT }; static void tc_cmd_usage(void) { char usage[] = "---\n" "console client commands:\n" " - help\n" " - tee 'path'\n" " - notee\n" " - loadfile 'path'\n" " - setopt key=val\n" " - (possible pairs: delim=\'str\')\n" "...\n"; tc_printf("%s", usage); } static int tc_cli_admin(char *cmd, int exit) { char *e = NULL; tc_query_admin_t cb = (exit) ? NULL : tc_query_admin_printer; if (tc_query_admin(cmd, cb, &e) == -1) return tc_cli_error(e); return 0; } int tc_cmd_tee_close(void) { if (tc.tee_fd == -1) return 0; fsync(tc.tee_fd); int rc = close(tc.tee_fd); tc.tee_fd = -1; return rc; } static int tc_cmd_tee_open(char *path) { tc_cmd_tee_close(); tc.tee_fd = open(path, O_WRONLY|O_CREAT|O_APPEND, 0644); if (tc.tee_fd == -1) { tc_printf("error: open(): %s\n", strerror(errno)); return -1; } return 0; } static int tc_cmd_dostring(char *buf, size_t size, int *reconnect) { struct tnt_tuple args; tnt_tuple_init(&args); tnt_tuple_add(&args, buf, size); int rc = tnt_call(tc.net, 0, "box.dostring", &args); if (rc < 0) goto error; rc = tnt_flush(tc.net); if (rc < 0) goto error; tnt_tuple_free(&args); char *e = NULL; if (tc_query_foreach(tc_query_printer, NULL, &e) == -1) { *reconnect = tc_cli_error(e); return -1; } return 0; error: tc_printf("error: %s\n", tnt_strerror(tc.net)); tnt_tuple_free(&args); return -1; } static int tc_cmd_loadfile(char *path, int *reconnect) { struct stat st; if (stat(path, &st) == -1) { tc_printf("error: stat(): %s\n", strerror(errno)); return -1; } int fd = open(path, O_RDONLY); if (fd == -1) return -1; char *buf = (char *)malloc(st.st_size); if (buf == NULL) { tc_printf(TC_ALLOCATION_ERROR, st.st_size); return -1; } size_t off = 0; do { ssize_t r = read(fd, buf + off, st.st_size - off); if (r == -1) { close(fd); free(buf); tc_printf("error: read(): %s\n", strerror(errno)); return -1; } off += r; } while (off != st.st_size); close(fd); int rc = tc_cmd_dostring(buf, st.st_size, reconnect); free(buf); return rc; } static enum tc_cli_cmd_ret tc_cmd_try(char *cmd, size_t size, int *reconnect) { enum tc_cli_cmd_ret rc = TC_CLI_OK; struct tnt_lex lex; if (!tnt_lex_init(&lex, tc_lex_keywords, (unsigned char*)cmd, size)) return TC_CLI_ERROR; struct tnt_tk *tk; switch (tnt_lex(&lex, &tk)) { case TC_EXIT: rc = TC_CLI_EXIT; break; case TC_HELP: tc_cmd_usage(); break; case TC_TEE: if (tnt_lex(&lex, &tk) != TNT_TK_STRING) { rc = TC_CLI_ERROR; goto done; } if (tc_cmd_tee_open((char*)TNT_TK_S(tk)->data) == -1) rc = TC_CLI_ERROR; goto done; case TC_NOTEE: tc_cmd_tee_close(); goto done; case TC_LOADFILE: if (tnt_lex(&lex, &tk) != TNT_TK_STRING) { rc = TC_CLI_ERROR; goto done; } if (tc_cmd_loadfile((char*)TNT_TK_S(tk)->data, reconnect) == -1) rc = TC_CLI_ERROR; goto done; case TC_SETOPT: switch (tnt_lex(&lex, &tk)) { case TC_SETOPT_DELIM: if (tnt_lex(&lex, &tk) == '=' && tnt_lex(&lex, &tk) == TNT_TK_STRING) { if (!TNT_TK_S(tk)->size) { tc.opt.delim = ""; tc.opt.delim_len = 0; goto done; } char * temp = (char *)malloc(TNT_TK_S(tk)->size); if (temp == NULL) tc_error(TC_ALLOCATION_ERROR, TNT_TK_S(tk)->size); strncpy(temp, (const char *)TNT_TK_S(tk)->data, TNT_TK_S(tk)->size + 1); tc.opt.delim = temp; tc.opt.delim_len = strlen(tc.opt.delim); } else { tc_printf("---\n"); tc_printf(" - Expected delim='string'\n"); tc_printf("---\n"); } break; default: tc_printf("---\n"); tc_printf(" - Unknown option to set\n"); tc_printf("---\n"); } goto done; } *reconnect = tc_cli_admin(cmd, rc == TC_CLI_EXIT); if (*reconnect) return TC_CLI_ERROR; done: tnt_lex_free(&lex); return rc; } static enum tc_cli_cmd_ret tc_cli_cmd(char *cmd, size_t size) { int reconnect = 0; do { if (reconnect) { reconnect = tc_cli_reconnect(); if (reconnect) return TC_CLI_ERROR; } char *e = NULL; if (tnt_query_is(cmd, size)) { if (tc_query(cmd, &e) == 0) { if (tc_query_foreach(tc_query_printer, NULL, &e) == -1) reconnect = tc_cli_error(e); } else { reconnect = tc_cli_error(e); } /* reconnect only for network errors */ if (reconnect && tnt_error(tc.net) != TNT_ESYSTEM) reconnect = 0; } else { enum tc_cli_cmd_ret rc = tc_cmd_try(cmd, size, &reconnect); if (reconnect) continue; if (rc == TC_CLI_EXIT || rc == TC_CLI_ERROR) return rc; } } while (reconnect); return TC_CLI_OK; } int tc_cli_cmdv(void) { int i, rc = 0; for (i = 0 ; i < tc.opt.cmdc ; i++) { char *cmd = tc.opt.cmdv[i]; int cmd_len = strlen(tc.opt.cmdv[i]); tc_print_cmd2tee(NULL, cmd, cmd_len); enum tc_cli_cmd_ret ret = tc_cli_cmd(cmd, cmd_len); if (ret == TC_CLI_EXIT) break; if (ret == TC_CLI_ERROR) { rc = 1; break; } } return rc; } static void tc_cli_init(void) { /* ignoring SIGPIPE for reconnection handling */ struct sigaction sa; memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sa.sa_handler = SIG_IGN; if (sigaction(SIGPIPE, &sa, NULL) == -1) tc_error("signal initialization failed\n"); } static char* tc_cli_readline_pipe() { int size = 8192, pos = 0; const size_t wcsize = sizeof(wchar_t); char *str = (char *)malloc(size); if (str == NULL) tc_error(TC_ALLOCATION_ERROR, size); wchar_t c; while ((c = getwchar())) { if (size < (pos + wcsize)) { size *= 2; char *nd = (char *)realloc(str, size); if (nd == NULL) tc_error(TC_REALLOCATION_ERROR, size); str = nd; } if (c == '\r' || c == '\n' || c == WEOF) { char c_t = (c != WEOF ? getchar() : '\n'); if (c_t != '\r' && c_t != '\n') ungetc(c_t, stdin); wctomb(str + pos++, 0); break; } else pos += wctomb(str + pos, c); } if (pos == 1 && c == WEOF) { free(str); return NULL; } return str; } static int check_delim(char* str, size_t len, size_t sep_len) { const char *sep = tc.opt.delim; len = strip_end_ws(str); if (sep_len == 0) return 1; if (len < sep_len) return 0; size_t i; for (i = len; sep_len > 0; --sep_len, --i) if (str[i - 1] != sep[sep_len - 1]) return 0; str[i] = '\0'; len = strip_end_ws(str); return 1; } int tc_cli(void) { /* initializing cli */ tc_cli_init(); /* loading history file */ char *home = getenv("HOME"); char history[1024]; snprintf(history, sizeof(history), "%s/%s", home, TC_DEFAULT_HISTORY_FILE); read_history(history); /* setting prompt */ char prompt[128]; int prompt_len = snprintf(prompt, sizeof(prompt), "%s> ", tc.opt.host) - 2; char prompt_delim[128]; /* interactive mode */ char *part_cmd; struct tc_buf cmd; if (tc_buf_str(&cmd)) tc_error(TC_REALLOCATION_ERROR, cmd.size); while (1) { if (isatty(STDIN_FILENO)) { snprintf(prompt_delim, sizeof(prompt_delim), "%*s> ", prompt_len, "-"); part_cmd = readline(!tc_buf_str_isempty(&cmd) ? prompt_delim : prompt); } else { clearerr(stdin); part_cmd = tc_cli_readline_pipe(); } if (!part_cmd) break; size_t part_cmd_len = strlen(part_cmd); int delim_exists = check_delim(part_cmd, part_cmd_len, tc.opt.delim_len); if (tc_buf_str_append(&cmd, part_cmd, strlen(part_cmd))) tc_error(TC_REALLOCATION_ERROR, cmd.size); free(part_cmd); if (!delim_exists && !feof(stdin)) { if (tc_buf_str_append(&cmd, " ", 1)) tc_error(TC_REALLOCATION_ERROR, cmd.size); continue; } tc_buf_str_stripws(&cmd); if (delim_exists && tc_buf_str_isempty(&cmd)) goto next; tc_print_cmd2tee(cmd.used != 1 ? prompt_delim : prompt, cmd.data, cmd.used - 1); enum tc_cli_cmd_ret ret = tc_cli_cmd(cmd.data, cmd.used - 1); if (isatty(STDIN_FILENO)) add_history(cmd.data); next: tc_buf_clear(&cmd); if (ret == TC_CLI_EXIT || feof(stdin)) { tc_buf_free(&cmd); break; } } /* updating history file */ write_history(history); clear_history(); return 0; } #undef TC_ALLOCATION_ERROR #undef TC_REALLOCATION_ERROR tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_print.c0000664000000000000000000001405712231715276021244 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_opt.h" #include "client/tarantool/tc_admin.h" #include "client/tarantool/tc.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc_query.h" extern struct tc tc; /*##################### Base printing functions #####################*/ void tc_print_tee(char *buf, size_t size) { if (tc.tee_fd == -1) return; size_t off = 0; do { ssize_t r = write(tc.tee_fd, buf + off, size - off); if (r == -1) { printf("error: read(): %s\n", strerror(errno)); return; } off += r; } while (off != size); } void tc_print_cmd2tee(char *prompt, char *cmd, int size) { if (tc.tee_fd == -1) return; if (prompt) tc_print_tee(prompt, strlen(prompt)); tc_print_tee(cmd, size); tc_print_tee("\n", 1); } void tc_print_buf(char *buf, size_t size) { printf("%-.*s", (int)size, buf); fflush(stdout); tc_print_tee(buf, size); } void tc_printf(char *fmt, ...) { va_list args; va_start(args, fmt); if (tc.tee_fd == -1) { vprintf(fmt, args); va_end(args); return; } char *buf; int size = vasprintf(&buf, fmt, args); va_end(args); if (size >= 0) { tc_print_buf(buf, size); free(buf); } } /*##################### string functions #####################*/ static int tc_str_valid(char *data, uint32_t size) { int length; wchar_t dest; mbtowc(NULL, NULL, 0); while ((length = mbtowc(&dest, data, size)) > -1 && size > 0) { if (length == 0) ++length; data += length; size -= length; } if (length == -1) return 0; return 1; } void tc_print_string(char *data, uint32_t size, char lua) { if (tc_str_valid(data, size)) { wchar_t dest; int length; mbtowc (NULL, NULL, 0); while ((length = mbtowc(&dest, data, size)) > -1 && size > 0) { if (dest >= 0x20) { if (lua) switch (dest) { case '\'': tc_printf("\\\'"); break; case '\\': tc_printf("\\\\"); break; default: tc_printf ("%lc", dest); } else tc_printf ("%lc", dest); } else { switch (dest) { case 0x00: tc_printf("\\0"); length++; /* Cause of mbtowc returns 0 when \0 */ break; case 0x07: tc_printf("\\a"); break; case 0x08: tc_printf("\\b"); break; case 0x09: tc_printf("\\t"); break; case 0x0A: tc_printf("\\n"); break; case 0x0B: tc_printf("\\v"); break; case 0x0C: tc_printf("\\f"); break; case 0x0D: tc_printf("\\r"); break; default: tc_printf("\\x%02lX", (unsigned long int)dest); break; } } size -= length; data += length; } } else { while (size-- > 0) { tc_printf("\\x%02X", (unsigned char)*data); data++; } } } /*##################### Tuple and Fields #####################*/ /* tarantool */ void tc_print_fields(struct tnt_tuple *tu) { struct tnt_iter ifl; tnt_iter(&ifl, tu); while (tnt_next(&ifl)) { if (TNT_IFIELD_IDX(&ifl) != 0) tc_printf(", "); char *data = TNT_IFIELD_DATA(&ifl); uint32_t size = TNT_IFIELD_SIZE(&ifl); switch (size) { case 4: tc_printf("%"PRIu32, *((uint32_t*)data)); break; case 8: tc_printf("%"PRIu64, *((uint64_t*)data)); break; default: tc_printf("'"); tc_print_string(data, size, 0); tc_printf("'"); } } if (ifl.status == TNT_ITER_FAIL) tc_printf(""); tnt_iter_free(&ifl); } void tc_print_tuple(struct tnt_tuple *tu) { tc_printf("["); tc_print_fields(tu); tc_printf("]\n"); } void tc_print_list(struct tnt_list *l) { struct tnt_iter it; tnt_iter_list(&it, l); while (tnt_next(&it)) { struct tnt_tuple *tu = TNT_ILIST_TUPLE(&it); tc_print_tuple(tu); } tnt_iter_free(&it); } /* lua */ void tc_print_lua_field(char *data, uint32_t size, char string) { if (string) goto _string; switch (size){ case 4: tc_printf("%"PRIu32, *((uint32_t*)data)); break; case 8: tc_printf("%"PRIu64"LL", *((uint64_t*)data)); break; default: _string: tc_printf("\'"); tc_print_string(data, size, 1); tc_printf("\'"); } } void tc_print_lua_fields(struct tnt_tuple *tu) { struct tnt_iter ifl; tnt_iter(&ifl, tu); while (tnt_next(&ifl)) { if ((TNT_IFIELD_IDX(&ifl)) != 0) tc_printf(", "); char *data = TNT_IFIELD_DATA(&ifl); uint32_t size = TNT_IFIELD_SIZE(&ifl); tc_print_lua_field(data, size, tc.opt.str_instead_int); } if (ifl.status == TNT_ITER_FAIL) tc_printf(""); tnt_iter_free(&ifl); } void tc_print_lua_tuple(struct tnt_tuple *tu) { tc_printf("{"); tc_print_lua_fields(tu); tc_printf("}"); } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_query.c0000664000000000000000000001031112242653271021240 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_opt.h" #include "client/tarantool/tc_admin.h" #include "client/tarantool/tc.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc_query.h" extern struct tc tc; char *tc_query_type(uint32_t type) { switch (type) { case TNT_OP_PING: return "Ping"; case TNT_OP_INSERT: return "Insert"; case TNT_OP_DELETE: return "Delete"; case TNT_OP_UPDATE: return "Update"; case TNT_OP_SELECT: return "Select"; case TNT_OP_CALL: return "Call"; } return "Unknown"; } char *tc_query_op(struct tnt_reply *r) { return tc_query_type(r->op); } int tc_query_printer(struct tnt_reply *r, void *ptr, char **e) { (void)ptr; (void)e; tc_printf("%s OK, %d rows affected\n", tc_query_op(r), r->count); tc_print_list(TNT_REPLY_LIST(r)); return 0; } char *tc_query_error(char *fmt, ...) { char msg[256]; va_list args; va_start(args, fmt); vsnprintf(msg, sizeof(msg), fmt, args); va_end(args); char *ptr = strdup(msg); if (ptr == NULL) tc_error("memory allocation failed"); return ptr; } int tc_query_foreach(tc_query_t cb, void *cba, char **e) { int rc = -1; struct tnt_iter i; tnt_iter_reply(&i, tc.net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); if (tnt_error(tc.net) != TNT_EOK) { *e = tc_query_error("%s ERROR, %s", tc_query_op(r), tnt_strerror(tc.net)); goto error; } else if (r->code != 0) { *e = tc_query_error("%s ERROR, %s (%s)", tc_query_op(r), ((r->error) ? r->error : ""), tnt_errcode_str(r->code >> 8)); goto error; } /* invoking callback if supplied */ if (cb) { if (cb(r, cba, e) == -1) goto error; } } rc = (i.status == TNT_ITER_FAIL) ? -1 : 0; error: tnt_iter_free(&i); return rc; } int tc_query(char *q, char **e) { int rc = tnt_query(tc.net, q, strlen(q), e); if (rc == -1) return -1; rc = tnt_flush(tc.net); if (rc < 0) { char *ee = tnt_strerror(tc.net); if (ee) { *e = tc_query_error("%s", ee); } return -1; } return 0; } int tc_query_admin_printer(char *r, char **e) { (void)e; tc_printf("%s", r); return 0; } int tc_query_admin(char *q, tc_query_admin_t cb, char **e) { if (tc_admin_query(&tc.admin, q) == -1) { *e = tc_query_error("failed to send admin query"); return -1; } if (cb == NULL) return 0; char *reply = NULL; size_t reply_size = 0; if (tc_admin_reply(&tc.admin, &reply, &reply_size) == -1) { *e = tc_query_error("failed to recv admin reply"); return -1; } if (cb && reply) { if (cb(reply, e) == -1) { free(reply); return -1; } } free(reply); return 0; } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_print.h0000664000000000000000000000361112202131537021231 0ustar rootroot#ifndef TC_PRINT_H_INCLUDED #define TC_PRINT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ void tc_print_tee(char *buf, size_t size); void tc_print_cmd2tee(char *prompt, char *cmd, int size); void tc_printf(char *fmt, ...); void tc_print_buf(char *buf, size_t size); void tc_print_string(char *data, uint32_t size, char lua); void tc_print_fields(struct tnt_tuple *tu); void tc_print_tuple(struct tnt_tuple *tu); void tc_print_list(struct tnt_list *l); void tc_print_lua_field(char *data, uint32_t size, char string); void tc_print_lua_fields(struct tnt_tuple *tu); void tc_print_lua_tuple(struct tnt_tuple *tu); #endif /* TC_PRINT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_print_xlog.c0000664000000000000000000001272212242653271022270 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_opt.h" #include "client/tarantool/tc_admin.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc_print_xlog.h" #include "client/tarantool/tc_query.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc.h" extern struct tc tc; static void tc_printer_xlog_raw(struct tnt_log_row *row, struct tnt_request *r) { if (tc.opt.raw_with_headers) { fwrite(&tnt_log_marker_v11, sizeof(tnt_log_marker_v11), 1, stdout); } fwrite(&(row->hdr), sizeof(row->hdr), 1, stdout); fwrite(r->origin, r->origin_size, 1, stdout); } static void tc_printer_xlog_tarantool(struct tnt_log_row *row, struct tnt_request *r) { struct sockaddr_in *peer = (void *)&row->row.cookie; tc_printf("%s, lsn: %"PRIu64", time: %lf, len: %"PRIu32", space: " "%"PRIu32", cookie: %s:%d ", tc_query_type(r->h.type), row->hdr.lsn, row->hdr.tm, row->hdr.len, r->r.insert.h.ns, inet_ntoa(peer->sin_addr), ntohs(peer->sin_port) ); switch (r->h.type) { case TNT_OP_INSERT: tc_print_tuple(&r->r.insert.t); break; case TNT_OP_DELETE: tc_print_tuple(&r->r.del.t); break; case TNT_OP_UPDATE: tc_print_tuple(&r->r.update.t); break; } } static void tc_printer_xlog_lua(struct tnt_log_row *row, struct tnt_request *r) { tc_printf("lua box."); switch (r->h.type) { case TNT_OP_INSERT: if (r->r.insert.h.flags && TNT_FLAG_REPLACE == TNT_FLAG_REPLACE) tc_printf("replace("); else tc_printf("insert("); tc_printf("%"PRIu32", ", r->r.insert.h.ns); tc_print_lua_fields(&r->r.insert.t); break; case TNT_OP_DELETE: tc_printf("delete("); tc_printf("%"PRIu32", ", r->r.del.h.ns); tc_print_lua_tuple(&r->r.del.t); break; case TNT_OP_UPDATE: tc_printf("update("); tc_printf("%"PRIu32", ", r->r.update.h.ns); tc_print_lua_tuple(&r->r.update.t); tc_printf(", '"); for (uint32_t i = 0; i < r->r.update.opc; i++) { switch (r->r.update.opv[i].op) { case TNT_UPDATE_ASSIGN: tc_printf("=p"); break; case TNT_UPDATE_ADD: tc_printf("+p"); break; case TNT_UPDATE_AND: tc_printf("&p"); break; case TNT_UPDATE_XOR: tc_printf("^p"); break; case TNT_UPDATE_OR: tc_printf("|p"); break; case TNT_UPDATE_SPLICE: tc_printf(":p"); break; case TNT_UPDATE_DELETE: tc_printf("#p"); break; case TNT_UPDATE_INSERT: tc_printf("!p"); break; } } tc_printf("'"); for (uint32_t i = 0; i < r->r.update.opc; i++) { tc_printf(", %"PRIu32, r->r.update.opv[i].field); switch (r->r.update.opv[i].op){ case TNT_UPDATE_ADD: case TNT_UPDATE_AND: case TNT_UPDATE_XOR: case TNT_UPDATE_OR: tc_printf(", "); tc_print_lua_field(r->r.update.opv[i].data, r->r.update.opv[i].size, 0); break; case TNT_UPDATE_SPLICE: tc_printf(", box.pack('ppp'"); char *data = r->r.update.opv[i].data; size_t pos = 1; tc_printf(", %"PRId32, *(int32_t *)(data + pos)); pos += 5; tc_printf(", %"PRId32", ", *(int32_t *)(data + pos)); pos += 4 + r->r.update.opv[i].size_enc_len; tc_printf("\'"); tc_print_string(data, r->r.update.opv[i].size - pos, 1); tc_printf("\'"); tc_printf(")"); break; case TNT_UPDATE_DELETE: tc_printf(", \'\'"); break; case TNT_UPDATE_INSERT: case TNT_UPDATE_ASSIGN: tc_printf(", "); tc_print_lua_field(r->r.update.opv[i].data, r->r.update.opv[i].size, tc.opt.str_instead_int); break; } } break; } tc_printf(") -- %"PRIu64, row->hdr.lsn); if (tc.opt.delim_len > 0) tc_printf("%s\n", tc.opt.delim); else tc_printf("\n"); } tc_printerf_xlog_t tc_print_getxlogcb(const char *name) { if (name == NULL) return tc_printer_xlog_tarantool; if (!strcasecmp(name, "tarantool")) return tc_printer_xlog_tarantool; if (!strcasecmp(name, "raw")) return tc_printer_xlog_raw; if (!strcasecmp(name, "lua")) return tc_printer_xlog_lua; return NULL; } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_opt.h0000664000000000000000000000412012202131537020673 0ustar rootroot#ifndef TC_OPT_H_INCLUDED #define TC_OPT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define TC_VERSION_MAJOR "0" #define TC_VERSION_MINOR "2" enum tc_opt_mode { TC_OPT_USAGE, TC_OPT_VERSION, TC_OPT_RPL, TC_OPT_WAL_CAT, TC_OPT_WAL_PLAY, TC_OPT_CMD, TC_OPT_INTERACTIVE }; struct tc_opt { enum tc_opt_mode mode; const char *host; int port; int port_admin; uint64_t lsn; uint64_t lsn_from; int lsn_from_set; uint64_t lsn_to; int lsn_to_set; int space; int space_set; const char *format; int raw; int raw_with_headers; int str_instead_int; void *xlog_printer; void *snap_printer; const char *file; char **cmdv; int cmdc; const char *delim; size_t delim_len; }; void tc_opt_usage(void); void tc_opt_version(void); enum tc_opt_mode tc_opt_init(struct tc_opt *opt, int argc, char **argv); #endif /* TC_OPT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc.c0000664000000000000000000001343312242653271020023 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_opt.h" #include "client/tarantool/tc_admin.h" #include "client/tarantool/tc.h" #include "client/tarantool/tc_cli.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc_store.h" #include "client/tarantool/tc_query.h" #include "client/tarantool/tc_print_snap.h" #include "client/tarantool/tc_print_xlog.h" #define TC_DEFAULT_PORT 33013 struct tc tc; static void tc_init(void) { memset(&tc, 0, sizeof(tc)); tc.tee_fd = -1; setlocale(LC_ALL, ""); } static void tc_free(void) { if (tc.net) { tnt_stream_free(tc.net); } tc_admin_close(&tc.admin); tc_cmd_tee_close(); } void tc_error(char *fmt, ...) { char msg[256]; va_list args; tc_free(); /* - - - - */ va_start(args, fmt); vsnprintf(msg, sizeof(msg), fmt, args); va_end(args); tc_printf("error: %s\n", msg); exit(1); } static int get_admin_port(void) { char *e = NULL; tc_query("call box.dostring('return box.cfg.admin_port')", &e); struct tnt_iter i, it, ifl; tnt_iter_reply(&i, tc.net); struct tnt_reply *r = TNT_IREPLY_PTR(&i); if (!tnt_next(&i)) { tnt_iter_free(&i); } if (tnt_error(tc.net) != TNT_EOK) { tc_error(tc_query_error("%s ERROR, %s", tc_query_op(r), tnt_strerror(tc.net))); } else if (r->code != 0) { tc_error(tc_query_error("%s ERROR, %s (%s)", tc_query_op(r), ((r->error) ? r->error : ""), tnt_strerror(tc.net))); } tnt_iter_list(&it, TNT_REPLY_LIST(r)); if (!tnt_next(&it)) { tnt_iter_free(&it); tnt_iter_free(&i); } struct tnt_tuple *tu = TNT_ILIST_TUPLE(&it); tnt_iter(&ifl, tu); if (!tnt_next(&ifl)) { goto end; } int port = *((uint32_t* )TNT_IFIELD_DATA(&ifl)); end: tnt_iter_free(&ifl); tnt_iter_free(&it); tnt_iter_free(&i); if (e != NULL) free(e); return port; } static void tc_connect(void) { if (tc.opt.port == 0) tc.opt.port = TC_DEFAULT_PORT; /* allocating stream */ tc.net = tnt_net(NULL); if (tc.net == NULL) tc_error("stream allocation error"); /* initializing network stream */ tnt_set(tc.net, TNT_OPT_HOSTNAME, tc.opt.host); tnt_set(tc.net, TNT_OPT_PORT, tc.opt.port); tnt_set(tc.net, TNT_OPT_SEND_BUF, 0); tnt_set(tc.net, TNT_OPT_RECV_BUF, 0); if (tnt_init(tc.net) == -1) tc_error("%s", tnt_strerror(tc.net)); /* connecting to server */ if (tnt_connect(tc.net) == -1) tc_error("%s", tnt_strerror(tc.net)); if (tc.opt.port_admin == 0) tc.opt.port_admin = get_admin_port(); } static int get_primary_port(void) { char *reply = NULL; size_t size = 0; int port = 0; if (tc_admin_query(&tc.admin, "lua box.cfg.primary_port") == -1) tc_error("cannot send query"); if (tc_admin_reply(&tc.admin, &reply, &size) == -1) tc_error("cannot recv query"); sscanf(reply, "---\n - %d\n...", &port); free(reply); return port; } static void tc_connect_admin(void) { if (tc_admin_connect(&tc.admin, tc.opt.host, tc.opt.port_admin) == -1) tc_error("admin console connection failed"); if (tc.opt.port == 0) tc.opt.port = get_primary_port(); } static void tc_connect_both(void) { if (!tc.opt.port && tc.opt.port_admin) { tc_connect_admin(); tc_connect(); } else { tc_connect(); tc_connect_admin(); } } static void tc_validate(void) { tc.opt.xlog_printer = tc_print_getxlogcb(tc.opt.format); tc.opt.snap_printer = tc_print_getsnapcb(tc.opt.format); if (tc.opt.xlog_printer == NULL) tc_error("unsupported output xlog format '%s'", tc.opt.format); if (tc.opt.snap_printer == NULL) tc_error("unsupported output snap format '%s'", tc.opt.format); if (tc.opt.format && strcmp(tc.opt.format, "raw") == 0) tc.opt.raw = 1; } int main(int argc, char *argv[]) { tc_init(); int rc = 0; enum tc_opt_mode mode = tc_opt_init(&tc.opt, argc, argv); tc_validate(); switch (mode) { case TC_OPT_USAGE: tc_opt_usage(); break; case TC_OPT_VERSION: tc_opt_version(); break; case TC_OPT_RPL: tc_connect(); rc = tc_store_remote(); break; case TC_OPT_WAL_CAT: rc = tc_store_cat(); break; case TC_OPT_WAL_PLAY: tc_connect(); rc = tc_store_play(); break; case TC_OPT_CMD: tc_connect_both(); rc = tc_cli_cmdv(); break; case TC_OPT_INTERACTIVE: tc_connect_both(); rc = tc_cli(); break; } tc_free(); return rc; } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_print_snap.h0000664000000000000000000000303712231715276022266 0ustar rootroot#ifndef TC_PRINT_SNAP_H_INCLUDED #define TC_PRINT_SNAP_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ typedef void (*tc_printerf_snap_t)(struct tnt_log_row *row, struct tnt_tuple *tu); tc_printerf_snap_t tc_print_getsnapcb(const char *name); #endif /* TC_PRINT_SNAP_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/CMakeLists.txt0000664000000000000000000000130212231715257022002 0ustar rootrootproject(tnt_cli) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH}) include(FindReadline) if (NOT READLINE_FOUND) message(FATAL_ERROR "readline library not found.") endif() set (cli "tarantool") set (cli_sources tc.c tc_opt.c tc_admin.c tc_query.c tc_print.c tc_buf.c tc_cli.c tc_store.c tc_print_xlog.c tc_print_snap.c) set (cli_libs tntrpl tntnet tntsql tnt gopt ${READLINE_LIBRARIES}) include_directories(${READLINE_INCLUDE_DIR}) list(APPEND cli_sources ${CMAKE_SOURCE_DIR}/src/errcode.c) add_executable(${cli} ${cli_sources}) set_source_files_compile_flags("TARANTOOL" ${cli_sources}) target_link_libraries (${cli} ${cli_libs}) install (TARGETS ${cli} DESTINATION bin) tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_admin.h0000664000000000000000000000330712202131537021167 0ustar rootroot#ifndef TC_ADMIN_H_INCLUDED #define TC_ADMIN_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct tc_admin { const char *host; int port; int fd; }; int tc_admin_connect(struct tc_admin *a, const char *host, int port); int tc_admin_reconnect(struct tc_admin *a); void tc_admin_close(struct tc_admin *a); int tc_admin_query(struct tc_admin *a, char *q); int tc_admin_reply(struct tc_admin *a, char **r, size_t *size); #endif /* TC_ADMIN_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_query.h0000664000000000000000000000356212242653271021257 0ustar rootroot#ifndef TC_QUERY_H_INCLUDED #define TC_QUERY_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ typedef int (*tc_query_t)(struct tnt_reply *r, void *ptr, char **e); typedef int (*tc_query_admin_t)(char *r, char **e); char *tc_query_type(uint32_t type); int tc_query_printer(struct tnt_reply *r, void *ptr, char **e); int tc_query_foreach(tc_query_t cb, void *cba, char **e); int tc_query(char *q, char **e); int tc_query_admin_printer(char *r, char **e); int tc_query_admin(char *q, tc_query_admin_t cb, char **e); char *tc_query_error(char *fmt, ...); char *tc_query_op(struct tnt_reply *r); #endif /* TC_QUERY_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc.h0000664000000000000000000000275312202131537020023 0ustar rootroot#ifndef TC_H_INCLUDED #define TC_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct tc { struct tc_opt opt; struct tc_admin admin; struct tnt_stream *net; int tee_fd; }; void tc_error(char *fmt, ...); #endif /* TC_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_print_snap.c0000664000000000000000000000316612231715276022264 0ustar rootroot#include #include #include #include #include #include #include #include #include #include "client/tarantool/tc_opt.h" #include "client/tarantool/tc_admin.h" #include "client/tarantool/tc.h" #include "client/tarantool/tc_print.h" #include "client/tarantool/tc_print_snap.h" #include "client/tarantool/tc_query.h" #include "client/tarantool/tc_store.h" extern struct tc tc; static void tc_printer_snap_raw( struct tnt_log_row *row, struct tnt_tuple *tu) { if (tc.opt.raw_with_headers) { fwrite(&tnt_log_marker_v11, sizeof(tnt_log_marker_v11), 1, stdout); } fwrite(&(row->row_snap), sizeof(row->row_snap), 1, stdout); fwrite(tu->data, tu->size, 1, stdout); } static void tc_printer_snap_tarantool( struct tnt_log_row *row, struct tnt_tuple *tu) { tc_printf("space: %"PRIu32" ", row->row_snap.space); tc_print_tuple(tu); } static void tc_printer_snap_lua( struct tnt_log_row *row, struct tnt_tuple *tu) { tc_printf("lua box.insert(%"PRIu32", ", row->row_snap.space); tc_print_lua_fields(tu); tc_printf(")"); if (tc.opt.delim_len > 0) tc_printf("%s\n", tc.opt.delim); else tc_printf("\n"); } tc_printerf_snap_t tc_print_getsnapcb(const char *name) { if (name == NULL) return tc_printer_snap_tarantool; if (!strcasecmp(name, "tarantool")) return tc_printer_snap_tarantool; if (!strcasecmp(name, "raw")) return tc_printer_snap_raw; if (!strcasecmp(name, "lua")) return tc_printer_snap_lua; return NULL; } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_cli.h0000664000000000000000000000267312231715257020664 0ustar rootroot#ifndef TC_CLI_H_INCLUDED #define TC_CLI_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ int tc_cli_cmdv(void); int tc_cli(void); int tc_cmd_tee_close(void); #endif /* TC_CLI_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_opt.c0000664000000000000000000001374712242653271020715 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include "client/tarantool/tc_opt.h" #define TC_DEFAULT_HOST "localhost" /* supported cli options */ static const void *tc_options_def = gopt_start( gopt_option('h', GOPT_ARG, gopt_shorts('h'), gopt_longs("host"), " ", "server address"), gopt_option('p', GOPT_ARG, gopt_shorts('p'), gopt_longs("port"), " ", "server port"), gopt_option('a', GOPT_ARG, gopt_shorts('a'), gopt_longs("admin-port"), " ", "server admin port"), gopt_option('C', GOPT_ARG, gopt_shorts('C'), gopt_longs("cat"), " ", "print xlog or snapshot file content"), gopt_option('P', GOPT_ARG, gopt_shorts('P'), gopt_longs("play"), " ", "replay xlog file to the specified server"), gopt_option('S', GOPT_ARG, gopt_shorts('S'), gopt_longs("space"), " ", "filter by space number"), gopt_option('F', GOPT_ARG, gopt_shorts('F'), gopt_longs("from"), " ", "start xlog file from the specified lsn"), gopt_option('T', GOPT_ARG, gopt_shorts('T'), gopt_longs("to"), " ", "stop on specified xlog lsn"), gopt_option('M', GOPT_ARG, gopt_shorts('M'), gopt_longs("format"), " ", "cat output format (tarantool, raw)"), gopt_option('H', 0, gopt_shorts('H'), gopt_longs("header"), NULL, "add file headers for the raw output"), gopt_option('R', GOPT_ARG, gopt_shorts('R'), gopt_longs("rpl"), " ", "act as replica for the specified server"), gopt_option('B', 0, gopt_shorts('B'), gopt_longs("bin"), NULL, "print STR in lua printer instead" " of NUM32 and NUM64, except arithmetic update arguments"), gopt_option('D', GOPT_ARG, gopt_shorts('D'), gopt_longs("delim"), " ", "if you use --cat, then it will add delim to an end of every line of your " "Lua file, when used at CLI start of client, then it's replacement of " "setopt delim='' command"), gopt_option('?', 0, gopt_shorts('?'), gopt_longs("help"), NULL, "display this help and exit"), gopt_option('V', 0, gopt_shorts('V'), gopt_longs("version"), NULL, "display version information and exit") ); void tc_opt_usage(void) { printf("usage: tarantool [options] [query]\n\n"); printf("tarantool client.\n"); gopt_help(tc_options_def); exit(0); } void tc_opt_version(void) { printf("tarantool client, version %s.%s\n", TC_VERSION_MAJOR, TC_VERSION_MINOR); exit(0); } enum tc_opt_mode tc_opt_init(struct tc_opt *opt, int argc, char **argv) { /* usage */ void *tc_options = gopt_sort(&argc, (const char**)argv, tc_options_def); if (gopt(tc_options, '?')) { opt->mode = TC_OPT_USAGE; goto done; } /* version */ if (gopt(tc_options, 'V')) { opt->mode = TC_OPT_VERSION; goto done; } /* server host */ gopt_arg(tc_options, 'h', &opt->host); if (opt->host == NULL) opt->host = TC_DEFAULT_HOST; /* server port */ const char *arg = NULL; opt->port = 0; if (gopt_arg(tc_options, 'p', &arg)) opt->port = atoi(arg); /* server admin port */ opt->port_admin = 0; if (gopt_arg(tc_options, 'a', &arg)) opt->port_admin = atoi(arg); /* space */ opt->space = 0; opt->space_set = 0; if (gopt_arg(tc_options, 'S', &arg)) { opt->space = atoi(arg); opt->space_set = 1; } /* from lsn */ opt->lsn_from = 0; if (gopt_arg(tc_options, 'F', &arg)) { opt->lsn_from = strtoll(arg, NULL, 10); opt->lsn_from_set = 1; } /* to lsn */ opt->lsn_to = 0; if (gopt_arg(tc_options, 'T', &arg)) { opt->lsn_to = strtoll(arg, NULL, 10); opt->lsn_to_set = 1; } /* output format */ opt->raw = 0; opt->format = NULL; if (gopt_arg(tc_options, 'M', &arg)) opt->format = arg; opt->raw_with_headers = 0; if (gopt(tc_options, 'H')) opt->raw_with_headers = 1; /* string instead of num and num64 */ opt->str_instead_int = 0; if (gopt(tc_options, 'B')) opt->str_instead_int = 1; /* set delimiter on start */ opt->delim = ""; opt->delim_len = 0; if (gopt_arg(tc_options, 'D', &opt->delim)) opt->delim_len = strlen(opt->delim); /* replica mode */ if (gopt_arg(tc_options, 'R', &arg)) { opt->mode = TC_OPT_RPL; opt->lsn = strtoll(arg, NULL, 10); goto done; } /* wal-cat mode */ if (gopt_arg(tc_options, 'C', &opt->file)) { opt->mode = TC_OPT_WAL_CAT; if (strcmp(opt->file, "-") == 0) opt->file = NULL; goto done; } /* wal-play mode */ if (gopt_arg(tc_options, 'P', &opt->file)) { opt->mode = TC_OPT_WAL_PLAY; goto done; } /* default */ if (argc >= 2) { opt->cmdv = argv + 1; opt->cmdc = argc - 1; opt->mode = TC_OPT_CMD; } else { opt->mode = TC_OPT_INTERACTIVE; } done: gopt_free(tc_options); return opt->mode; } tarantool-1.5.1.218.g1a69fd6/client/tarantool/tc_print_xlog.h0000664000000000000000000000304012231715276022270 0ustar rootroot#ifndef TC_PRINT_XLOG_H_INCLUDED #define TC_PRINT_XLOG_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ typedef void (*tc_printerf_xlog_t)(struct tnt_log_row *row, struct tnt_request *r); tc_printerf_xlog_t tc_print_getxlogcb(const char *name); #endif /* TC_PRINT_XLOG_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/client/CMakeLists.txt0000664000000000000000000000106212202131537017771 0ustar rootroot enable_tnt_compile_flags() # function to build tarantool clients that use connector/c # function(tarantool_client client_name) set (client_sources ${ARGV}) list(REMOVE_ITEM client_sources ${client_name}) add_executable(${client_name} ${client_sources} ${CMAKE_SOURCE_DIR}/src/errcode.c) set (client_libs tntrpl tntnet tntsql tnt) target_link_libraries (${client_name} ${client_libs}) endfunction() include_directories("${PROJECT_SOURCE_DIR}/connector/c/include") foreach (client ${TARANTOOL_CLIENTS}) add_subdirectory(${client}) endforeach() tarantool-1.5.1.218.g1a69fd6/client/Makefile0000664000000000000000000001521412213333034016673 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/client/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 client/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/scripts/0000775000000000000000000000000012202131537015443 5ustar rootroottarantool-1.5.1.218.g1a69fd6/scripts/static.py0000775000000000000000000002174212202131537017315 0ustar rootroot#!/usr/bin/env python # # This script is used to build www.tarantool.org # import os import re import sys import yaml import jinja2 import markdown import argparse import fnmatch import glob import shutil import datetime default_lang = { 'source-encoding': 'utf-8', 'output-encoding': 'utf-8', 'suffix': '.html' } class Config(object): def __init__(self): self.source_path = '.' self.config_file = '_config' self.ignore_file = '_ignore' self.corpus_dir = '.' self.layout_dir = '_layout' self.output_dir = 'www' self.abs_output_path = None self.config = {} def __getitem__(self, key): return self.config[key] @property def config_path(self): return os.path.join(self.source_path, self.config_file) @property def corpus_path(self): return os.path.join(self.source_path, self.corpus_dir) @property def layout_path(self): return os.path.join(self.source_path, self.layout_dir) @property def output_path(self): if self.abs_output_path: return self.abs_output_path return os.path.join(self.source_path, self.output_dir) @output_path.setter def output_path(self, value): self.abs_output_path = value def check(self, key, config): if config and key in config: value = config[key] print 'set %s to %s' % (key, value) setattr(self, key, value) del config[key] def load(self): f = open(self.config_path) config = yaml.load(f) f.close() self.check('layout_dir', config) self.check('output_dir', config) self.config = config #print config def check_ignore_dir(self, path, name, ignore_list): if fnmatch.fnmatch(name, '_*'): return True pathname = os.path.normpath(os.path.join(path, name)) if pathname in ignore_list: return True return False def check_ignore_file(self, path, name, ignore_list): if fnmatch.fnmatch(name, '_*'): return True if fnmatch.fnmatch(name, '*~'): return True pathname = os.path.normpath(os.path.join(path, name)) if pathname in ignore_list: return True return False def load_ignore_file(self, path, ignore_list): try: f = open(os.path.join(path, self.ignore_file)) words = f.read().split() f.close() for word in words: pattern = os.path.normpath(os.path.join(path, word)) names = glob.glob(pattern) ignore_list.extend(names) except: pass def get_corpus(self): list = [] ignore_list = [ os.path.normpath(self.output_path) ] root = self.corpus_path walker = os.walk(root) for curdir, subdirs, files in walker: self.load_ignore_file(curdir, ignore_list) for s in subdirs[:]: if self.check_ignore_dir(curdir, s, ignore_list): subdirs.remove(s) for f in files: if not self.check_ignore_file(curdir, f, ignore_list): dir = curdir.replace(root, '') list.append(os.path.normpath(os.path.join(dir, f))) #print list return list class Scanner(object): HEAD_OPEN = r'{%' HEAD_CLOSE = r'%}' WS = re.compile(r'\s+') WORD = re.compile(r'\w+') BODY = re.compile(r'.*?(?=\s*^\s*%s)' % re.escape(HEAD_OPEN), re.M | re.S) def __init__(self, name, config): f = open(os.path.join(config.source_path, name)) self.data = f.read() f.close() self.name = name self.pos = 0 self.token = None def __iter__(self): return self def match(self, cre): m = cre.match(self.data, self.pos) if m: self.pos = m.end() self.token = m.group() return True return False def match_str(self, str): if self.data.startswith(str, self.pos): self.pos += len(str) self.token = str return True return False def read_tags(self): tags = [] if self.match_str(self.HEAD_OPEN): self.match(self.WS) while self.match(self.WORD): tags.append(self.token) self.match(self.WS) if not self.match_str(self.HEAD_CLOSE): print self.data[self.pos:] raise RuntimeError() return tags def read_text(self): self.match(self.WS) if self.match(self.BODY): text = self.token else: text = self.data[self.pos:] self.pos = len(self.data) return text def next(self): self.match(self.WS) if self.pos == len(self.data): raise StopIteration return self.name, self.read_tags(), self.read_text() @jinja2.contextfilter def langselect(context, data): if isinstance(data, dict): lang = context['pagelang'] if lang in data: data = data[lang] else: data = data['en'] return data def make_environ(path): env = jinja2.Environment(loader = jinja2.FileSystemLoader(path)) env.filters['langselect'] = langselect env.globals['date'] = datetime.datetime.today() return env class BaseHandler(object): def __init__(self, config): self.config = config def enter(self, entry): pass def render(self, entry): pass class PageHandler(BaseHandler): def __init__(self, config): super(PageHandler, self).__init__(config) self.environ = make_environ(config.layout_path) def write(self, name, data): print 'Writing %s' % name f = open(os.path.join(self.config.output_path, name), 'w') f.write(data) f.close def render(self, entry): name, tags, text = entry if len(tags) < 2: raise StandardError('missing template name for page entry') layout = tags[1] lang = tags[2] if tags and len(tags) > 2 else Nil if lang and lang in self.config['languages']: langdesc = self.config['languages'][lang] else: langdesc = default_lang text = unicode(text, langdesc['source-encoding']) text = markdown.markdown(text, ['tables']) filename = name + langdesc['suffix'] template = self.environ.get_template(layout, globals=self.config.config) page = template.render( content=text, filename=filename, pagename=name, pagelang=lang) self.write(filename, page.encode(langdesc['output-encoding'])) class DataHandler(BaseHandler): pass class TextHandler(BaseHandler): def enter(self, entry): name, tags, text = entry if len(tags) < 2: raise StandardError('missing item name for text entry') item = tags[1] lang = tags[2] if tags and len(tags) > 2 else 'en' if lang and lang in self.config['languages']: langdesc = self.config['languages'][lang] else: langdesc = default_lang text = unicode(text, langdesc['source-encoding']) text = markdown.markdown(text) self.config.config.setdefault(item, {})[lang] = text; class PostHandler(TextHandler): pass class Renderer(object): def __init__(self, config): self.handlers = { 'page': PageHandler(config), 'data': DataHandler(config), 'text': TextHandler(config), 'post': PostHandler(config) } def get_handler(self, tags): entry_type = tags[0] if tags and len(tags) > 0 else 'page' if entry_type not in self.handlers: raise ValueError('bad entry type %s' % entry_type) return self.handlers[entry_type] def enter_entry(self, entry): handler = self.get_handler(entry[1]) handler.enter(entry); def render_entry(self, entry): handler = self.get_handler(entry[1]) handler.render(entry); def render(self, entries): for entry in entries: self.enter_entry(entry) for entry in entries: self.render_entry(entry) def parse_args(config): parser = argparse.ArgumentParser() parser.add_argument('--config-file') parser.add_argument('--source-path') parser.add_argument('--output-path') parser.parse_args(namespace = config) def load_entries(config): entries = [] corpus = config.get_corpus() for name in corpus: scanner = Scanner(name, config) for entry in iter(scanner): entries.append(entry) print 'Loaded content file "%s"' % name return entries def main(): config = Config() parse_args(config) config.load() renderer = Renderer(config) entries = load_entries(config) renderer.render(entries) if __name__ == '__main__': main() tarantool-1.5.1.218.g1a69fd6/scripts/trace.pl0000775000000000000000000000077612202131537017113 0ustar rootroot#!/usr/bin/perl -s use strict; use warnings; use IPC::Open2 qw/open2/; our ($exe); die "$0: no valid -exe given" unless -f $exe; our($out, $in); my $addr2line_pid = open2($in, $out, qw/addr2line -f -e/, $exe) or die "can't spawn addr2line: $!"; sub addr_to_name { my ($f) = @_; print $out "$f\n"; my $name = <$in>; my $junk = <$in>; chomp $name; return $name; } while (<>) { chomp; next unless /(.*)(E|X)(0x\w+)/; my $f = addr_to_name($3); print "$1$2 $f\n"; } tarantool-1.5.1.218.g1a69fd6/README.MacOSX0000664000000000000000000000537012242653271015742 0ustar rootrootOS X Readme =========== This manual explains how to manually build tarantool from sources. Supporting kinds of build with default Apple developer software and external as homebrew as MacPorts. If you want to build at the Homebrew environment execute just: brew install http://tarantool.org/dist/tarantool.rb Target OS: MacOS X "Lion" First of all, make sure mac ports are available (to install packages from). 1. Install necessary packages (ports): ------------- Default build depended by Developer tools by Apple and -DDARWIN_BUILD_TYPE=None: sudo xcode-select --install sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer To enable build type with MacPorts set up the flag -DDARWIN_BUILD_TYPE=Ports: port install autoconf binutils cmake ncurses zlib readline 2. Upgrade clang to 3.2+ ------------- Go to http://developer.apple.com/ to download and install the latest version of "Command Line Tools for Xcode". This package contains /usr/bin/clang and /usr/bin/clang++ binaries. Check that clang version is at least 3.2. 3. Install necessary python modules: pyYAML, daemon ------------- NB: it is recommended to install python modules through setup.py, using the default python (which should be >= 2.6.x and < 3.x); tar -xzf module.tar.gz cd module-dir sudo python setup.py install where module is the name of the installed module and module-dir is the name of the directory the module's archive deflates into. 4. Download & build tarantool source code: ------------- NOTE: If you want to get DMG package go to section 6. git clone --recursive git://github.com/tarantool/tarantool.git cd tarantool mkdir build && cd build CC=clang CXX=clang++ cmake .. \ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ -DENABLE_CLIENT=true \ -DDARWIN_BUILD_TYPE=Ports make 5. Run tarantool test suite ------------- NB: the following tests are not runnable on MacOS X at this point: box/lua.test box_big/lua.test connector_c/xlog_rpl.test To disable those add each of them to the 'disabled' clause in suite.ini file in the appropriate directory; for instance, tarantool/test/box/suite.ini must be edited to disable any test in the 'box' suite; To run all tests then, execute: cd ~/build/tarantool/test ./run 6. Build DMG package ------------- Building DMG depended by "Auxiliary Tools for Xcode", which be able to download from: https://developer.apple.com (necessary login with Apple ID account). Execute commands to get DMG package by root (if you not root you'll get files with incorrect permissions): mkdir build && cd build sudo -s cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DCMAKE_BUILD_TYPE=Rel \ -DENABLE_BACKTRACE=OFF \ -DCMAKE_C_COMPILER="clang" \ -DCMAKE_CXX_COMPILER="clang++" \ -DDARWIN_BUILD_TYPE=None \ -DENABLE_CLIENT=ON make package -- EOF tarantool-1.5.1.218.g1a69fd6/AUTHORS0000664000000000000000000000106112202131537015022 0ustar rootrootTarantool is a collective effort, and incorporates many contributions from the community. Below follows a list of people, who contributed their code. Aleksey Demakov, Aleksey Mashanov, Alexandre Kalendarev, Damien Lefortier, Dmitry E. Oboukhov, Dmitry Simonenko, Konstantin Osipov, Konstantin Shulgin, Mons Anderson, Pavel Cherenkov, Roman Antipin, Roman Tokarev, Roman Tsisyk, Teodor Sigaev, Timofey Khryukin, Yuriy Nevinitsin, Yuriy Vostrikov Veniamin Gvozdikov NOTE: If you can commit a change to this list, please do not hesitate to add your name to it. tarantool-1.5.1.218.g1a69fd6/libgopt.a0000664000000000000000000004432212213333043015561 0ustar rootroot! / 1378727459 0 0 0 98 ` gopt_sortgoptgopt_arggopt_arg_igopt_argsgopt_freegopt_helpgopt.c.o/ 1378727458 1000 1000 100664 18416 ` ELF>%@@UHSHHhH`HXH`HHEHEHEH<-HEHHHEHH<-uHEHHHErHXHE[HEHHHEH@HHt.HE؋@uHEHHHHEHE(HE؋uHEHEHH"HEHHHxH`HHEHEHEHxHEHxH`HHHEH<-HEHHwHEHH<-BHEHHHXHEHEH@HEHE!HEHHHEHEHHE HEHEHEtHEHE8tHE<=tHEHEt|HEtdHEHHpHUHEHHHH)HȉH`HHIHǸHxHHEHEHEHEHEHEHHuHE(HEt HEH@HEHEHHHEudHEHHXHEHHHH`HHIؾHǸHxHHXHEHE(HEHE9uHE@HxHEyHEHE9udHEHHXHEHHHH`HHIؾHǸHxHHEHEH;EyHE@HEHH=HHPHEHPHEH@HHEHEHHt HEH<-u]HEHHtKHEHHHHH`HHHǸHxHHEHHEHPHEHH=HHtdHEHHXHEHHHH`HHIؾHǸHxHHEH@HEbHEHEHHEHHEHEHEHHuJHEHHHEHXHEHEHEH@HHlHE@urHxHE[HEHE9uFHEH`HHHǸHxHHEHEH;EuHEHEHE@HEHtHEHPHEHPHEHEHHt HEH<-uXHEHHtFHEH`HHHǸHxHHEHHEHPHEHEH@HEHEYHE(HE\HEH`HHHǸHxHHEHEHHEHHEHEHEHH6HEHEHHUH`HH)HHHhHxHĨ[]UHH}uHEHEHEHE;EHEHEHEuHE]UHH}uHUHEHEHE+HE;EuH}uHEHPHEHHEHEHEuHE]UHH}uHUHEHE&HE;EuH}u HEH@HmHEHEuи]UHH@H}؉uHUHMHEHHEHHEHEHEHEHEKHE;Eu;HEH;EuUHEHHHEHMHEHPHEHHEHEHEuHEH;Et HEHHUHEHH)HHUHHH}HEHUHSHxH}HEHEEE6H HEH HMH HEfE HEH@HEEHEt&EHEHEƿHEH@HEHEHH}tHEH@Ht:HEHXHEHHU)HEHHHƿHEHẺƿHEH@ HHEH@ HEEHcHEHHEHmHEH;Ev HE< uHEH;EuEHcHEHHEHUHEHH)HHU؉ƿHEHEHEtHEHƿHEHUHcH9NHEH HE(HEHHx[]%s: --%.*s: abbreviated option is ambiguous =%s: --%.*s: unknown option %s: --%.*s: option may not be repeated (in any long or short form) %s: --%s: option requires an option argument %s: --%.*s: option may not take an option argument %s: -%c: option may not be repeated (in any long or short form) %s: -%c: option requires an option argument %s: -%c: unknown option -%c, --%s%-*s--%-*s%.*s %s r8intiicb##### #( #0 #8 #@ #H #P #X  #`  #h  b#p b#t p#x F# T# # # &{# /# 0# 1# 2# 3-# 5b# 7# ##b#j  c   b b ( jkey!b#"b###$#%#&# ( *key+b#arg,#.u00~0~0~1~z3X4-P>HI@JKPVW.Z[}~~ j -XkeybTٴh-`-XkeybTargHh-`XkeybTi-Hh-sHkeybD-Xh`  h~optX !W)6Hp8@    % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I& : ; I8 .? : ; ' I@B : ; I 4: ; I  : ;    U.? : ; ' I@B : ; I .? : ;' @B : ;I 4: ;I 4: ;I 4: ; I? < wwvwwwvwww4 v4 5 w5 6 w6 9 w9 v w w w E vE F wF G wG J wJ _ v_ ` w` a wa d wd v w,  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includegopt.cstddef.htypes.hlibio.hstdio.h /Y Z!Yx/(JXK+XvX' i僮! YYZY/YV$孟Kٻ[YhKX!/KX!$!Y2@K堼XXu-X\YY%׭/-X!MY-Y XY^ wX!-Z..#u/-XK0僄/uTXK0/uTXY0gg/7XK00 uu0YKK"gI6Y/W&wX ؟ZX(__off_tlongs_IO_read_ptr_chainshortssize_tgopt_shortbufgopt_helpgopt_arg_iargs_stopgopt_free_IO_buf_basehelp_arglong long unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/gopt.cgopt_arglong long intsigned charoption_cpopt_defname_cp_fileno_IO_read_endlong inthelpvptr_opts_flags_IO_buf_end_cur_columnopt_specslong_opt_width_old_offset_offsetcountargs_len_IO_markerunsigned intlong unsigned int_IO_write_ptr_sbufshort unsigned int_IO_save_base_lockargs_ptr_flags2_modeoptssizetypeopt_count_IO_write_endhelp_width_IO_lock_t_IO_FILEGNU C 4.7.3found_long_pos_markersopt_popt_sunsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebeshort inthelp_padding_vtable_offsetgopt_argshas_shortscharopt_spec_popt_spec_sopt_spec_t_next__off64_t_IO_read_base_IO_save_end__pad1__pad2__pad3__pad4__pad5next_optionargs_unused2stderrcontinue_2opt_t_IO_backup_basebreak_2flagsshort_optgopt_sortargcarg_pargv_IO_write_basenext_operandGCC: (Debian 4.7.3-4) 4.7.3zRx  AC H @EAC @ `\AC W PAC K AC  AC U zPLRx ($kAC Ea .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @ 0& , 1 9PK7H\j*z0uF0 pjG0'0###(G$+x P/     '.3:BGOET\]5 Ph rF |` kgopt.cgopt_sortstrchrstrlenmallocperrorexitstderrfprintffreestrcspngoptgopt_arggopt_arg_igopt_argsgopt_freegopt_help__gcc_personality_v0printfputs_Unwind_Resume*s} M -Uhp /} - % P2AK  "Nn -v = TY Hfu u  Z   "  "  ": D "K U "y   "  "= G "f p "|  #  # $  n  ! ) . ); B I P W ^ l :q | O . # e R  - Y   A  h Y+ : I gX g v %   e  5   t { # 3 C #S d Zk w I    ~  3$ 2 "@ N u\ Ck >v       q )  z !* 09!A5N \ 7jr{ (5    (   /7b@ Q V e 0j (yX  0 ` H )   +35 ; E Ho )}  I5    H )  F   H+ : I TW e )u ^}F `   H ?`   @  { O   ! * ": I Y a j Cy t    Dd5  F !`  tarantool-1.5.1.218.g1a69fd6/README.md0000664000000000000000000000550312231715276015250 0ustar rootrootTARANTOOL, http://tarantool.org Tarantool is a framework for in-memory key/value storage and Box is a yet another in-memory key-value database. Key features of the pair include: * log streaming replication * hot standby * a simple binary protocol, as well as emulation of memcached protocol * extensibility and speed Caveats: * supported platforms are Linux/x86 and FreeBSD/x86 * supported compilers are clang and gcc. COMPILATION AND INSTALL Tarantool is written in C and C++. To build, you will need GCC or Apple CLang compiler. CMake is used for configuration management. 3 standard CMake build types are supported: * Debug -- used by project maintainers * RelWithDebugInfo -- the most common release configuration, also provides debugging capabilities * Release -- use only if the highest performance is required The only external library dependency is readline: libreadline-dev is required to build the command line client. There are two OPTIONAL dependencies: - uuid-dev. It is required for box.uuid_* functions. - GNU bfd (part of GNU binutils). It's used to print a stack trace after a crash. Please follow these steps to compile Tarantool: tarantool $ git submodule init; git submodule update # if compiling from git tarantool $ cmake . tarantool $ make To use a different release type, say, RelWithDebugInfo, use: tarantool $ cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo Additional build options can be set similarly: tarantool $ cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=true -- builds the command line client. 'make' creates tarantool_box executable in directory src/box and tarantool executable in client/tarantool. There is no 'make install' goal, but no installation is required either. Tarantool regression testing framework (test/test-run.py) is the simplest way to setup and start the server, but it requires a few additional Python modules: * daemon * pyyaml * pexpect. Once all pre-requisites are installed, try: tarantool $ cd test && ./test-run.py --suite box --start-and-exit This will create a 'var' subdirectory in directory 'test', populate it with necessary files, and start the server. To connect, you could use a simple command-line client: ''' tarantool $ ./test/tarantool ''' Alternatively, if a customized server configuration is required, you could follow these steps: ``` tarantool $ emacs cfg/tarantool.cfg # edit the configuration # Initialize the storage directory, path to this directory # is specified in the configuration file: tarantool $ src/box/tarantool_box --config cfg/tarantool.cfg --init-storage # # run tarantool $ src/box/tarantool_box --config cfg/tarantool.cfg ``` Please report bugs at http://github.com/tarantool/tarantool/issues We also warmly welcome your feedback in the discussion mailing list, tarantool@googlegroups.com. Thank you for your interest in Tarantool! tarantool-1.5.1.218.g1a69fd6/doc/0000775000000000000000000000000012213333320014515 5ustar rootroottarantool-1.5.1.218.g1a69fd6/doc/cmake_install.cmake0000664000000000000000000000261012213333035020327 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/man/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/doc/box-protocol.txt0000664000000000000000000003204612202131537017716 0ustar rootrootTarantool IPROTO protocol. ; ; The latest version of this document can be found in ; tarantool source tree, doc/box-protocol.txt ; ; IPROTO is a binary request/response protocol that features a ; complete access to Tarantool functionality, including: ; - request multiplexing, e.g. ability to asynchronously issue ; multiple requests via the same connection ; - response format that supports zero-copy writes ; ; The atoms of representation in the protocol include: ; ; int8 - a single 8-bit byte (i.e. an octet) ; ; int32 - a 32-bit integer in little-endian format (Intel x86) ; int64 - a 64-bit integer in little-endian format (Intel x86) ; ; int32_varint - a 1 to 5 byte representation of an integer ; ; This is what Perl's "pack" function calls "BER compressed ; integer (BER stands for Basic Encoding Rules, but in reality it ; has little to do with ASN.1 standard). ; See http://en.wikipedia.org/wiki/Variable-length_quantity ; for encoding description, or core/pickle.m for implementation ; in Tarantool. ; All requests and responses utilize the same basic structure: ::= | ::=
; If is non-zero, the rest of server ; response is an error message. ; ::=
{} ; ;
has a fixed structure of three 4-byte integers (12 bytes):
::= ; represents a request type, a single server command, ; such as PING, SELECT, UPDATE, DELETE, INSERT, etc. ; is replicated intact in the response header. ; The currently supported types are: ; - 13 -- ; - 17 -- the user only needs to ; define fields of the key used for search. ; ::= ; Tarantool understands only 3 field types: unsigned 4-byte ; int, unsigned 8-byte int and an octet string. ; Even this type awareness is very limited: it's only used when ; the field participates in an index. For example, when a numeric ; 32-bit index is defined on a field, and a non-32-bit value ; is supplied for that field, an ER_BAD_PARAMS ; is returned. ; ::= + ; ; Compressed integer ; ::= + ; ; SELECT may return zero, one or several tuples. ; CALL response is identical to one for SELECT. ; starts with the number of found ; tuples: ; ::= * ; ; Tuples returned by the server (we call them "fully qualified") ; are always preceded with calculated information: ; total size of the tuple and number of fields in it. ; This is how the tuple is stored on server side. ; While this information can be often derived from body length, ; it allows the recipient to simplify memory allocation and tuple ; decoding. Certain requests, such as ; or ; - , : same as in ; Index number for tuple lookup does not need to be provided, ; since only primary key updates are allowed. ; - specifies possibly zero operation count ; ::= + ; ; Operations are optional and exist solely to allow ; updates of individual fields. ; ::= ; ; Field index, specifies argument(s) of the operation ; ::= ; ; The operation(s) below operate on fields of arbitrary types: ; 0 - assign operation argument to field ; ; will extend the tuple if == + 1 ; ; The following operation(s) are only defined for integer ; types (32 and 64 bit): ; 1 - add argument to field , both arguments ; are treated as signed 32 or 64 -bit ints ; 2 - bitwise AND of argument and field ; 3 - bitwise XOR of argument and field ; 4 - bitwise OR of argument and field ; For arithmetic operations, size of the argument must be ; less or equal to the size of the field: it's possible ; to add 32-bit ints to 32- and 64- bit fields, but ; 64-bit ints can be added only to 64-bit fields. ; Tarantool 1.3.5 features one more command, which operates ; on strings: ; 5 - implementation of Perl 'splice' command ; ; The operation(s) below operate on fields of arbitrary types: ; 6 - delete ; 7 - insert before ::= # 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 ; ; It's an error to specify an argument of a type that ; differs from expected type. ; ::= | ; For simple operations field contains either a string ; to assign, a number to add or subtract. ; When is splice, has to carry not one argument, ; but 3: offset in the target field, number of bytes to remove, ; string argument to inject. Since is always a , ; field data in case of splice argument contains 3 nested ; objects, which store the arguments: ::= ::= ::= ::= ; ::= ; ; , request = 21 ; Similarly to updates, always uses the ; primary key. ; ::= ; ; returns the number of deleted tuples. ; Currently it's always either 0 or 1. ; If BOX_RETURN_TUPLE is specified, and there is an old ; tuple, (count > 0), DELETE returns the deleted tuple. ; ::= | ; ; CALL request body contains , ; the number of procedure args, and the arguments themselves, ; which are passed into the procedure as Lua strings. ; ::= ; ; is a valid Lua identifier, something like ; 'type', or 'box.process'. ; ::= ; ; In case of an error, always contains ; . If it's not 0, it is followed by an ; error message. Otherwise, the response, just like in case of ; SELECT, is a sequence of s. ::= ; ; The server response, in addition to response header and body, ; contains a return code. It's a 4-byte integer, which has ; a lower 1-byte completion status part, and a higher 3-byte ; error code part. ; ::= ; The completion status is complementary: ; it can be deduced from the error code. There are only ; 3 completion status codes in use: ; 0 - success; The only possible error code with this status is 0, ER_OK ; 1 - try again; An indicator of an intermittent error. ; Usually is returned when two clients attempt to change ; the same tuple simultaneously. ; ( is not always done atomically) ; 2 - error ; ; The error code holds the actual error. Existing error codes include: ; ; Completion status 0 (success) ; ----------------------------- ; 0x00000000 -- ER_OK ; ; Completion status 1 (try again) ; ------------------------------- ; 0x00000401 -- ER_TUPLE_IS_RO ; The requested data is blocked from modification ; ; 0x00000601 -- ER_TUPLE_IS_LOCKED ; The requested data is not available ; ; 0x00000701 -- ER_MEMORY_ISSUE ; An error occurred when allocating memory ; ; Completion status 2 (error) ; --------------------------- ; ; 0x00000102 -- ER_NONMASTER ; An attempt was made to change data on a read-only port ; ; 0x00000202 -- ER_ILLEGAL_PARAMS ; Malformed query ; ; 0x00000a02 -- ER_UNSUPPORTED_COMMAND ; The query is not recognized ; ; 0x00001e02 -- ER_WRONG_FIELD ; An unknown field was requested ; ; 0x00001f02 -- ER_WRONG_NUMBER ; An out-of-range numeric value was included in the query ; ; 0x00002002 -- ER_DUPLICATE ; An attempt was made to create an object with an existing key. ; ; 0x00002602 -- ER_WRONG_VERSION ; The protocol version is not supported ; ; 0x00002702 -- ER_WAL_IO ; WAL I/O error ; ; Convenience macros which define hexadecimal constants for ; return codes (completion status + code) can be found ; in include/iproto.h. ; ; vim: syntax=bnf tarantool-1.5.1.218.g1a69fd6/doc/www-data/0000775000000000000000000000000012202131537016254 5ustar rootroottarantool-1.5.1.218.g1a69fd6/doc/www-data/logo.png0000664000000000000000000001230112202131537017717 0ustar rootrootPNG  IHDR=vԂ CiCCPICC ProfilexڥSwX>eVBd|![TB C`EB"V@DQmAZU\8i}z}ss~HsQ5B'$&@ $pdc<k8ԅ2g8O@vB@%S`P-`6N}-ʑrD"+", %:d+s$`y( 01<t # W(xrIzZ\aaB$\#  L.њAbxxO!"H9ɍLJ$e6II}aL&[dYA."WOGo(tʼnHIH)(Q$UjJFPEԅRj=KNi4/Z -VIkݥFtwz]B_A_24V #dldcfb`2fLfSl`egQaةUD*UjTZT#eƮކ:>>">}9yNcA=ǃ\&o !Yա¬ahxH3MgJgF@?bKĽHG"jF;F/Ś5oցYbbJcZ*c;T^Ǘ&',M(IlK"'%M0{d9s̹8WgnT I!ħHy/ &RBpGT.{ģi^ieiҽҷexgTd<$Ւ;3_gEdݜCI9&ՐfI;ssɬeE!yslLѭPQȯSWpdV /]ńK \2weȲeˍ.YbJʬ?rXUz+ i,R)Xv::ɺ,_*q((yAW_U~icƞRH6{o_^lxKry[/VLعMm2ʤjSZ_᳣iΒvIvάbiOq]_snثd}}w654=Pڈ6*&7mMM9%oS8zHwe-nAZf% 9~{7<^sBDI“N-:5qZv3:M8{3\ ϟ:u]^jzۥ.?qium~ozɫW\v:}7o$)VoOYqxڽ~yuĐPY ‡̇  x''O~Vų~{} bKGD pHYs  tIME 'ڿ IDATx[]U{hK+f1P;E" Ԣ"z@$1 JB4><D}Bx%QRXbҖ;3ˇ^liu;3&]s~_߷ηWyե@$P%*IU$P%IJ@$ TI@$*u. vV 5\ھ-f_Kt5eF`@m_W˾+YPMfSŧrTI*GvKFћNھfe*7ղJHQ%9U*ZU7p'nj_!Gm_4P*>TŧrT9$GQ;$oUc 8?]ھf R-9e_~*^0Y@G:qۏՉ%Z.L2\_/3sOE3!=lJ5n=%zRF _ T9օs5u] 70Oa$PӏOFU*rT9@XG*PSu~`ǧE'PˍOW >5e|@=_1nǧYħjW#PsU`]T܌Z$GXvg<8(HcS}9jމTJ'܂]>ŨyǧFjޠ9.4 ԼOeI]Qs`O4!H89OF[M><L>=5-GzHgPW?,흢+>}{>f `N :Jam<WǶZڀoԴA&p>ei%Ruv{҇4NZ!PsԵ .F&_3ZǟK[B׭ jwi}z'*wwKÚ,HjT e:Oׅ4S ?n Wi\_ q;tiUP@ߗۇ31W'/_jLX,y˃|c_\nvSt cH9A |X?>ߕG ڟxtB,z$PuG4r׈3p7p~@-Qj6cnñ!aڜ8 -@ 'GOp~[oj9~f`2^ZN"6ܜS9jZQ(e9҈s{O p1\6/E۰;Suwijp@ǙG4GPӍv_ Բ@=fq=+ZBtj XK+P9jyc8v(Pۜ{m1;,7݁#q V.`}9jZi^ˌ^&PB;Hj6k U"Pj:0pA`Ct\@N6>R NJO\mƧVR;t2tzsZ%R+">ݡ 1\i4z)G9]ӅTY^ uq ;ԏ_`X%RFS@^D/1,Hٞ/B_";ݕ樖^35¼=Muŵ7[յ; 3Zuz)NKO>̢UmV;=}O}j8\^-zbħGOs-jD`Odjmcr/S;+4&!qֻ컦~(=b,{5ePMZzȤn5eP?hqM8S>>nSXYt{{rԔ\&PO u .xUN&Sqb~R>d1SڪaԚțz:C=ίh?RWq |dV"%'R OR D^7s5l/|‰ X`Lusv?C5x5p5|yρV5 \E},&4mEl\p8zϕ8o*IJ@$ TIJ@$* TI4B@qkIENDB`tarantool-1.5.1.218.g1a69fd6/doc/www-data/mail-logo.png0000664000000000000000000000637012202131537020650 0ustar rootrootPNG  IHDRF1e/iCCPICC Profilexc``2ptqre``+) rwRR` ``\\yy | 2 U +'300%@q9@HR6. r!+ v.z H}:b'A2 vIj^ʢ#ǔTbϼĒZ@! A!ahii "q(v!( cd2f` G1G)I/15C}}sïPo pHYsgR oIDATX Xypd\d@B!L<P<:h+:mZ騥تU*NJckxTZ:U4 H6sn޻=By{}hN&<7D1hZ$I|3#>3yDB_<.WP,IKP^$C,'n:|5!`i.0F4:؟bbӳOp g:2#`%z @\p6e /)FZ`fAcX!0!7HM|SfSW8 k}EX"3Ό,WɜP&Pux"Cu Yfv.xAt Ojғ`F>ivj}dօɊPea~}u=L#gdk8 mYy[8B5mn?7ue; 0ꘖ! H<ԦL\k18WLzI'`DZ p [G{pyhm1 WN䇊N 2Q(u  3I')`렏 lXm7w4׃2㞃E(Gn ]_tZ$ܣ!$((718V|j F1xvy/G]x{Ќ.S%XRV^{k9#x☍ò1~G*E!7SϾUhۊʹ7SFy/Q0NOueT1R` 1 =)(-=j"`SB0'Բ85MĂ8pEd.ȏ.3>*S7A^6K)bPgLR[g/Un Kkq"Xڜ;n~5b87&`U *jXHĉKs\,ɦﭩ萂fli8&M"&INE~NXGi$>Akjr4$kO3]~T k`!JBlb/r-0 tT10(cN,F1E:,R2'X c pq/$))@RKdL0icXRfZP?~CQև>bMs$ⳬŸϏsw{v 6V'_3f&ɰ:Ke(D+$\<5qZ,HbWFXyZskK1r.)a pE}'Lx`[&L4p MB\/.Si'1<3i"_i;TFQ[]NSGnxێ`ywa}xutk5)dDZFѫ}f\[ ūDA^R͆=L" _q+͸cydujM[qqUW1?2dK%[_YՅ 3`̊O|NtȄ01t8p~8maHY{<'0" g.N=z{O᭖:,0&188tb0 h?@Ȍ?oڇS.pƣOo~0c œ>5~]'^2#/bǾ>+CK)V>G[:`|ʎ־"^1Nb$ZX+Y߽Ti% Շ\-ܨ܏&GB=X$+J<} ]I/!Q-'9 ?Saٜ8O&i]!̼ O٬FtUR!NʪZ=4B۞9Ƶx؛CmȨ"DFO$ s%?rq I_xȖGQ8; ,QD1YY3M͌ ~LjQ/#D:zM>MAJ dzwd7LEqjܽ{9#ʿIENDB`tarantool-1.5.1.218.g1a69fd6/doc/www-data/global.css0000664000000000000000000002215112202131537020227 0ustar rootroot/* This stylesheet heavily borrows from http://necolas.github.com/normalize.css */ /* ============================================================================= Base ========================================================================== */ /* * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units * http://clagnut.com/blog/348/#c790 * 2. Keeps page centred in all browsers regardless of content height * 3. Prevents iOS text size adjust after orientation change, without disabling user zoom * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */ html { font-size: 120%; /* 1 */ overflow-y: scroll; /* 2 */ -webkit-text-size-adjust: 100%; /* 3 */ -ms-text-size-adjust: 100%; /* 3 */ } /* * Addresses margins handled incorrectly in IE6/7 */ body { margin: 0; } /* ============================================================================= Links ========================================================================== */ a { color: #201e9e; } /* * Addresses outline displayed oddly in Chrome */ a:focus { outline: thin dotted; } /* * Improves readability when focused and also mouse hovered in all browsers * people.opera.com/patrickl/experiments/keyboard/test */ a:active { outline: 0; } a:hover { outline: 0; background-color: rgba(0,0,0,0.1); -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3); box-shadow: 0 1px 3px rgba(0,0,0,0.3); } a.imglink:hover { border : 0; background-color: inherit; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } a:visited { color: #3f3f3f; } /* ============================================================================= Typography ========================================================================== */ /* * Neutralise smaller font-size in 'section' and 'article' in FF4+, Chrome, S5 */ h1 { font-size: 1.5em; } /* * Addresses style set to 'bolder' in FF3+, S4/5, Chrome */ b, strong { font-weight: bold; } blockquote { margin: 1em 40px; } /* * Corrects font family set oddly in IE6, S4/5, Chrome * en.wikipedia.org/wiki/User:Davidgothberg/Test59 */ pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 80%; } /* * Improves readability of pre-formatted text in all browsers */ pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; text-decoration: none; outline: 0; background-color: rgba(0,0,0,0.1); -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3); box-shadow: 0 1px 3px rgba(0,0,0,0.3); } /* * 1. Addresses CSS quotes not supported in IE6/7 * 2. Addresses quote property not supported in S4 */ /* 1 */ q { quotes: none; } /* 2 */ q:before, q:after { content: ''; content: none; } /* * XXX */ small { font-size: 75%; } /* * Prevents sub and sup affecting line-height in all browsers * gist.github.com/413930 */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } /* ============================================================================= Lists ========================================================================== */ ul, ol { margin-left: 0; padding: 0 0 0 40px; } dd { margin: 0 0 0 40px; } /* ============================================================================= Embedded content ========================================================================== */ /* * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3 * 2. Improves image quality when scaled in IE7 * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */ img { border: 0; /* 1 */ -ms-interpolation-mode: bicubic; /* 2 */ } .ycsb { width: 768px; } /* ============================================================================= Tables ========================================================================== */ /* * Remove most spacing between table cells */ table { border-collapse: collapse; border-spacing: 0; } /* =========================================================================== Layout ======================================================================== */ /* * Top-level page sections: * body > #wrapper > #header #content #footer */ #wrapper { width: 768px; margin: 0 auto; padding: 0; } #header, #footer, #content { margin: 0 auto; padding: 0; overflow: hidden; } #header { margin-bottom: 5px; } /* * http://sonspring.com/journal/clearing-floats */ .clear { clear: both; display: block; visibility: hidden; width: 0; height: 0; } /* ========================================================================== Grid ======================================================================== */ .grid { width: 768px; overflow: hidden; margin-left: auto; margin-right: auto; padding: 0 10px 0 0; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; clear: both; } .lwrap { float: left; } .rwrap { float: right; } .span_1, .span_2, .span_3, .span_4, .span_5, .span_6, .span_7, .span_8, .span_9, .span_10, .span_11, .span_12 { float: left; dsiplay: inline; /* IE workaround */ margin-left: 10px; } .span_1 { width: 70px; } .span_2 { width: 150px; } .span_3 { width: 230px; } .span_4 { width: 303px; } .span_5 { width: 390px; } .span_6 { width: 470px; } .span_7 { width: 550px; } .span_8 { width: 630px; } .span_9 { width: 710px; } .span_10 { width: 790px; } .span_11 { width: 870px; } .span_12 { width: 950px; } .lpad_1 { padding-left: 80px; } .lpad_2 { padding-left: 160px; } .lpad_3 { padding-left: 240px; } .lpad_4 { padding-left: 320px; } .lpad_5 { padding-left: 400px; } .lpad_6 { padding-left: 480px; } .lpad_7 { padding-left: 560px; } .lpad_8 { padding-left: 640px; } .lpad_9 { padding-left: 720px; } .lpad_10 { padding-left: 800px; } .lpad_11 { padding-left: 880px; } .rpad_1 { padding-right: 80px; } .rpad_2 { padding-right: 160px; } .rpad_3 { padding-right: 240px; } .rpad_4 { padding-right: 320px; } .rpad_5 { padding-right: 400px; } .rpad_6 { padding-right: 480px; } .rpad_7 { padding-right: 560px; } .rpad_8 { padding-right: 640px; } .rpad_9 { padding-right: 720px; } .rpad_10 { padding-right: 800px; } .rpad_11 { padding-right: 880px; } /* ============================================================================= Custom styles ========================================================================== */ html, body, #wrapper { height: 100%; } #wrapper, #header, #content, #footer { background-color: #fff; } #content { padding-bottom: 5px; } #footer img { vertical-align: middle; } #footer { text-align: right; padding-top: 16px } #blurb { margin: 40px auto; } #blurb h1 { font-size: 2em; line-height: 1; text-align: center; } #blurb h2 { font-size: 1.2em; font-weight: normal; line-height: 1; text-align: center } #blurb h3 { text-align: center } /* ============================================================================= Styles for tabs and buttons used in benchmark*.html ========================================================================== */ .b-schedule{ height: 100%; width: 768px; margin:0 auto; padding: 0; } .header{ font-size: 2em; line-height: 1; text-align: center; margin: 40 auto; } .b-tabs{ height: 100%; } .b-tabs__list{ padding: 0px; list-style: none; border: 1px solid #b2b2b2; border-bottom: 0; -webkit-border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; -webkit-user-select: none; box-shadow: 0 2px 4px -3px #000; -webkit-padding-start: 0; background-color: #f5f5f5; -webkit-padding-start: 0; overflow: hidden; margin: 0; } .b-tabs__li{ float: left; padding: 10px; cursor: pointer; border-right: 1px solid #b2b2b2; } .b-tabs__li:last-child{ border-right: none; } .b-tabs__li_on, .b-tabs__li:active{ background-color: #fafafa; padding: 11px 9px 9px 11px; color: #3f3f3f; } .b-tabs__body{ position: relative; padding: 20px; height: 980px; border: 2px solid black; } #picture1, #picture2{ min-width: 400px; margin: 0 auto; } .b-tabs__buttons{ padding: 0; right: 20px; border: 2px solid #b2b2b2; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-user-select: none; box-shadow: 0 2px 4px -3px #000; -webkit-padding-start: 0; background-color: #eaeaea; outline: none; cursor: pointer; list-style: none; float: right; } .b-button{ float: left; margin: 0; padding: 3px; border-right: 1px solid #b2b2b2; font-size: medium; } .b-button:last-child{ border: none; } .b-button_on, .b-button:active{ background-color: #fafafa; padding: 4px 2px 3px 4px; color: #3f3f3f; } h3 { text-align:center; } tarantool-1.5.1.218.g1a69fd6/doc/www-data/highcharts.js0000664000000000000000000000137612202131537020745 0ustar rootroot(function($){ $.fn.renderChart = function(url, options) { var batch = $.fn.renderChart.nextBatch; $.fn.renderChart.nextBatch += 1; var objects = this; objects.data('renderChart_batch', batch); options = options || {}; $.ajax({ url: url, dataType: 'json', success: function(config) { config = $.extend(true, config, options); config.chart = config.chart || {}; if (config.tooltip && config.tooltip.formatter){ config.tooltip.formatter = Function(config.tooltip.formatter); } objects.each(function() { if ($(this).data('renderChart_batch') == batch) { config.chart.renderTo = this; new Highcharts.Chart(config); } }); } }); return this; }; $.fn.renderChart.nextBatch = 0; })(jQuery); tarantool-1.5.1.218.g1a69fd6/doc/www-data/favicon.ico0000664000000000000000000000471612202131537020405 0ustar rootroot (0   ]tvJgUsI-o#Qs|; H lBH C  it/<5| w3 hB4TPyF tarantool-1.5.1.218.g1a69fd6/doc/www-data/robots.txt0000664000000000000000000000003612202131537020324 0ustar rootrootUser-Agent: * Disallow: /dist tarantool-1.5.1.218.g1a69fd6/doc/www-data/tabs.js0000664000000000000000000001517112202131537017550 0ustar rootroot(function(){ var dOn = $(document); dOn.on({ click: function(){ if (!($(this).hasClass('b-button_on'))){ $('.b-button_on').removeClass('b-button_on'); $(this).addClass('b-button_on'); switch ($(this).html()) { case 'A_Read' : { $('#picture2').renderChart('ycsb/A_READ_latency.json'); break; } case 'A_Update' : { $('#picture2').renderChart('ycsb/A_UPDATE_latency.json'); break; } case 'B_Read' : { $('#picture2').renderChart('ycsb/B_READ_latency.json'); break; } case 'B_Update' : { $('#picture2').renderChart('ycsb/B_UPDATE_latency.json'); break; } case 'C_Read' : { $('#picture2').renderChart('ycsb/C_READ_latency.json'); break; } case 'D_Insert' : { $('#picture2').renderChart('ycsb/D_INSERT_latency.json'); break; } case 'D_Read' : { $('#picture2').renderChart('ycsb/D_READ_latency.json'); break; } case 'E_Insert' : { $('#picture2').renderChart('ycsb/E_INSERT_latency.json'); break; } case 'E_Scan' : { $('#picture2').renderChart('ycsb/E_SCAN_latency.json'); break; } case 'F_Read' : { $('#picture2').renderChart('ycsb/F_READ_latency.json'); break; } case 'F_Read-Modify-Write' : { $('#picture2').renderChart('ycsb/F_READ-MODIFY-WRITE_latency.json'); break; } case 'F_Update' : { $('#picture2').renderChart('ycsb/F_UPDATE_latency.json'); break; } case 'LOAD_Insert' : { $('#picture2').renderChart('ycsb/LOAD_INSERT_latency.json'); break; } } } } }, '.b-button'); dOn.on({ click: function(){ if (!($(this).hasClass('b-tabs__li_on'))){ $('.b-tabs__li_on').removeClass('b-tabs__li_on'); $(this).addClass('b-tabs__li_on'); $('.b-button').remove(); var head = $('.b-tabs__header'), ul = $('.b-tabs__buttons'), li, desc = $('.b-tabs__description'); switch ($(this).html()) { case 'A' : { head.html('Workload A') $('#picture1').renderChart('ycsb/A_throughput.json'); $('#picture2').renderChart('ycsb/A_READ_latency.json'); li = $('
  • A_Read
  • '); ul.append(li); li = $('
  • A_Update
  • '); ul.append(li); desc.html('50/50 update/read ratio'); break; } case 'B' : { head.html('Workload B') $('#picture1').renderChart('ycsb/B_throughput.json'); $('#picture2').renderChart('ycsb/B_READ_latency.json'); li = $('
  • B_Read
  • '); ul.append(li); li = $('
  • B_Update
  • '); ul.append(li); desc.html('5/95 update/read ratio'); break; } case 'C' : { head.html('Workload C') $('#picture1').renderChart('ycsb/C_throughput.json'); $('#picture2').renderChart('ycsb/C_READ_latency.json'); li = $('
  • C_Read
  • '); ul.append(li); desc.html('100% read-only'); break; } case 'D' : { head.html('Workload D') $('#picture1').renderChart('ycsb/D_throughput.json'); $('#picture2').renderChart('ycsb/D_READ_latency.json'); li = $('
  • D_Read
  • '); ul.append(li); li = $('
  • D_Insert
  • '); ul.append(li); desc.html('5/95 insert/read ratio, the read load is skewed towards the end of the key range'); break; } case 'E' : { head.html('Workload E') $('#picture1').renderChart('ycsb/E_throughput.json'); $('#picture2').renderChart('ycsb/E_INSERT_latency.json'); li = $('
  • E_Insert
  • '); ul.append(li); li = $('
  • E_Scan
  • '); ul.append(li); desc.html('5/95 ratio of insert/reads over a range of 10 records'); break; } case 'F' : { head.html('Workload F') $('#picture1').renderChart('ycsb/F_throughput.json'); $('#picture2').renderChart('ycsb/F_READ_latency.json'); li = $('
  • F_Read
  • '); ul.append(li); li = $('
  • F_Read-Modify-Write
  • '); ul.append(li); li = $('
  • F_Update
  • '); ul.append(li); desc.html('95% read/modify/write, 5% read'); break; } case 'LOAD' : { head.html('Insert only') $('#picture1').renderChart('ycsb/LOAD_throughput.json'); $('#picture2').renderChart('ycsb/LOAD_INSERT_latency.json'); li = $('
  • L_Insert
  • '); ul.append(li); desc.html(''); break; } } } } }, '.b-tabs__li'); })(); (function(){ var dOn = $(document); dOn.ready(function() { $('#picture1').renderChart('ycsb/A_throughput.json'); $('#picture2').renderChart('ycsb/A_READ_latency.json'); }); })(); tarantool-1.5.1.218.g1a69fd6/doc/www-data/bg_header.png0000664000000000000000000000060412202131537020662 0ustar rootrootPNG  IHDR2zsRGBuPLTE\VJ|Dw\3k;qL}:pM~!^-g+e=r?tGzEx5l#_I{Z.g@tX6m)d$`(cBvZ0iRQ&bO8o2jTW pHYs  tIME # IIDATXA2QDk˾?I~X'&& [2L*)&%&JIĤ¤r J-L*_L*L*&=&&ʈ-oL*WL*5&JXkL*-&;1̘TSk̜~tIENDB`tarantool-1.5.1.218.g1a69fd6/doc/developer/0000775000000000000000000000000012231715276016520 5ustar rootroottarantool-1.5.1.218.g1a69fd6/doc/developer/developer.xml0000664000000000000000000001236112231715276021232 0ustar rootroot %tnt; ]> Tarantool Developer Guide What documentation there is Tarantool documentation consists of: a user guide a developer guide (you're reading it) protocol description box-protocol.txt coding style guides for Lua, Objective C, C, Python (for other connectors, we use conventions of the connector programming language community) Compiling
    How to fix a compile time error about missing confetti An error about missing confetti: Generating prscfg.h, prscfg.c... [ 13%] Generating prscfg.h, prscfg.c /bin/sh: CONFETTI-NOTFOUND: not found This error is caused by cmake, trying to re-create generated files prscfg.h, prscfg.c in cfg/ directory. These files are under revision control and normally need not to be regenerated. The fix is to $ git checkout cfg/prscfg.h $ git checkout cfg/prscfg.c $ touch cfg/prscfg.[hc] The other alternative, if you have actually modified core_cfg.cfg_tmpl is to install confetti from and let cmake use it.
    How to build the XML manual To build XML manual, you'll need: xsltproc docbook5-xml docbook-xsl-ns w3c-sgml-lib libsaxon-java- for saxon processing libxml-commons-resolver1.1-java libxml2-utils libxerces2-java libxslthl-java lynx jing When all pre-requisites are met, you should run: $ cmake . -DENABLE_DOC=yes to enable documentation builder. If you want to make tarantool user guide, you should run the following command from taratnool root directory: $ make html or $ cd doc/user $ make The html version of the user guide will be generated in doc/www-data. To building the developer guilde, you should run: $ cd doc/developer $ make The html version of the developer guide will be generated in doc/www-data.
    Release management
    How to make a minor release git tag -a 1.4.4 -m "Next minor in 1.4 series" vim CMakeLists.txt # edit CPACK_PACKAGE_VERSION_PATCH git push --tags Update the Web site in doc/www-data. Update all blueprints, upload the ChangeLog, based on git logoutput. The ChangeLog must only include items which are mentioned as bugs or blueprints on Launchpad. If anything significant is there, which is not mentioned, something went wrong in release planning and the release should be held up until this is cleared. Click 'Release milestone'. Create a milestone for the next minor release. Alert the driver to target bugs and blueprints to the new milestone.
    Developer guidelines
    How to work on a bug Any defect, even minor, if it changes the user-visible server behavior, needs a bug report. Report a bug at http://github.com/tarantool/tarantool/issues. When reporting a bug, try to come up with a test case right away. Set the current maintenance milestone for the bug fix, and specify the series. Assign the bug to yourself. Put the status to 'In progress' Once the patch is ready, put the bug the bug to 'In review' and solicit a review for the fix. Once there is a positive code review, push the patch and set the status to 'Closed' Patches for bugs should contain a reference to the respective Launchpad bug page or at least bug id. Each patch should have a test, unless coming up with one is difficult in the current framework, in which case QA should be alerted. There are two things you need to do when your patch makes it into the master: put the bug to 'fix committed', delete the remote branch.
    tarantool-1.5.1.218.g1a69fd6/doc/developer/intro.xml0000664000000000000000000000531112202131537020363 0ustar rootroot arantool is a single-threaded server that supports cooperative multi-processing, developed with work accounting for high loads (e.g. tens of thousands of RPS). It is possible to divide the system functionality into two logical groups: core and module. Currently, modules are installed into the system at compilation time. The core level includes the base functionality, such as network communications, operations on binary logs, replication over the network, fast switchover to the reserve server, etc. The modules implement the business logic of a concrete application, using the core API. Tarantool/Silverbox is a key-based memory-based data store. Storage of data in memory allows the use of simpler algorithms, decrease of the number of processor instructions, and, most importantly, avoidance of the slowest component in any server system, the hard disk. Database performance of saved information in memory is noticeably higher than that of equivalent systems, which utilize the disk. It was developed for internal goals of the company Mail.Ru. Once deployed the system proved to be attractive for a number of different projects in the company, and was subsequently adopted by them. The high productivity and reliability of the system under heavy loads made it possible to increase the stability of the services that adopted Tarantool. The first version of the server, which implemented the basic goals for a storage family, went online in 2008. Since that time, Tarantool server has been reworked and perfected for providing specialized storage. The code is written in C and uses gcc extensions. Basics Tarantool’s custom allocators avoid external fragmentation of base memory and degradation of performance when working with large numbers of small objects; The system is optimized for work with large volumes of data; Tarantool uses snapshot files, which contain the state of the database at the time of copy to disk; Transaction logging in binary log files preserves all changes to database state, allowing automatic restoration of information after system reboot; The system provides high availability, automatic switchover to an available replica in case of crash of any part of the system; The system is fully compatible with the memcached protocol; Local replicas allow system update without interruption to client services; The system provides data replication over the network; Tarantool supplies a simply binary protocol for replication, supporting the creation of additional logic. The system currently builds only under gcc; Tarantool has currently been tested only under Linux; When very frequent and rapid changes are made in a large quantity of data, the saving of the snapshot requires a large amount of memory. tarantool-1.5.1.218.g1a69fd6/doc/developer/CMakeLists.txt0000664000000000000000000000224412202131537021250 0ustar rootroot if (JING STREQUAL "JING-NOTFOUND") message (FATAL_ERROR "jing is missing") endif() set(PATH_DEVGUIDE_HTML "${PROJECT_BINARY_DIR}/doc/www-data/tarantool_developer_guide.html") set(PATH_DEVGUIDE_TXT "${PROJECT_BINARY_DIR}/doc/developer/tarantool_developer_guide.txt") add_custom_target(doc-check-dev ALL COMMAND ${JING} http://docbook.org/xml/5.0/rng/docbookxi.rng ${CMAKE_SOURCE_DIR}/doc/developer/developer.xml) add_custom_command(OUTPUT ${PATH_DEVGUIDE_HTML} COMMAND ${XSLTPROC} --nonet --stringparam collect.xref.targets "all" --xinclude -o ${PATH_DEVGUIDE_HTML} ${CMAKE_SOURCE_DIR}/doc/user/tnt-html.xsl ${CMAKE_SOURCE_DIR}/doc/developer/developer.xml) add_custom_command(OUTPUT ${PATH_DEVGUIDE_TXT} DEPENDS ${PATH_DEVGUIDE_HTML} COMMAND ${LYNX} -dump ${PATH_DEVGUIDE_HTML} > ${PATH_DEVGUIDE_TXT}) add_custom_target(dev-html DEPENDS ${PATH_DEVGUIDE_HTML}) add_custom_target(dev-txt DEPENDS ${PATH_DEVGUIDE_TXT}) add_custom_target(doc-autogen-dev ALL DEPENDS ${PATH_DEVGUIDE_HTML} ${PATH_DEVGUIDE_TXT}) install (FILES ${PATH_DEVGUIDE_HTML} ${PATH_DEVGUIDE_TXT} DESTINATION share/doc/tarantool) tarantool-1.5.1.218.g1a69fd6/doc/man/0000775000000000000000000000000012213333320015270 5ustar rootroottarantool-1.5.1.218.g1a69fd6/doc/man/cmake_install.cmake0000664000000000000000000000300112213333035021075 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/man # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/man/man1" TYPE FILE FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/man/tarantool_box.1") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/doc/man/tarantool_box.pod0000664000000000000000000000333712202131537020661 0ustar rootroot=head1 NAME tarantool_box - open-source NoSQL database =head1 SYNOPSIS tarantool_box [OPTIONS] =head1 DESCRIPTION Tarantool is an open-source NoSQL database, developed by Mail.ru. Its key properties include: =over =item * Licence: simplified BSD =item * All data is maintained in RAM =item * Data persistence is implemented using Write Ahead Log and snapshotting =item * Supports asynchronous replication and hot standby =item * Uses coroutines and asynchronous I/O to implement high-performance lock-free access to data =item * Available on Linux and FreeBSD =item * Stored procedures in Lua are supported. =back =head2 Data model The basic atom of storage in Tarantool is called tuple. A tuple can have arbitrary number of fields. The first field in the tuple is always the identifying unique key. Tuples form spaces. It is possible to search tuples in spaces using the primary or secondary keys. Fields in a tuple are type-agnostic. It is possible to change, as well as add or remove fields. =head1 Command-line options =over =item --cfg-get=KEY Returns a value from configuration file described by B. =item --check-config Checks configuration file for errors. =item -c FILE, --config=FILE Points a path to configuration file (default: B). =item --cat=FILE Cats snapshot file to stdout in readable format and exits. =item --init-storage Initializes storage (an empty snapshot file) and exits. =item -v, --verbose Increases verbosity level in log messages. =item -B, --background Redirects input/output streams to a log file and runs as daemon. =item -h, --help Displays helpscreen and exits. =item -V, --version Prints program version and exits. =back tarantool-1.5.1.218.g1a69fd6/doc/man/tarantool.pod0000664000000000000000000000176312202131537020012 0ustar rootroot=head1 NAME tarantool - readline SQL-client for L. =head1 SYNOPSIS tarantool [OPTIONS] =head1 Command-line options =over =item -h , --host Define server address. =item -p , --port Define server port. =item -a , --admin-port Define server admin port. =item -C , --cat Output xlog file or snapshot content. Filename '-' stands for stdin. =item -P , --play Replay xlog file to the specified server. =item -R , --rpl Act as replica for the specified server. =item -S , --space Filter xlog file records by space number. =item -F , --from Start xlog file from the specified lsn. =item -T , --to Stop on specified xlog lsn. =item -M , --format Cat output format (default: tarantool). =item -H, --header Add file header to the 'raw' output format.. =item --help Display helpscreen and exits. =item -v, --version Display version and exits. =back tarantool-1.5.1.218.g1a69fd6/doc/man/tarantool.10000664000000000000000000001230612213333050017357 0ustar rootroot.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "TARANTOOL 1" .TH TARANTOOL 1 "2013-08-12" "perl v5.14.2" "readline SQL-client for tarantool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" tarantool \- readline SQL\-client for tarantool. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& tarantool [OPTIONS] .Ve .SH "Command-line options" .IX Header "Command-line options" .IP "\-h , \-\-host " 4 .IX Item "-h , --host " Define server address. .IP "\-p , \-\-port " 4 .IX Item "-p , --port " Define server port. .IP "\-a , \-\-admin\-port " 4 .IX Item "-a , --admin-port " Define server admin port. .IP "\-C , \-\-cat " 4 .IX Item "-C , --cat " Output xlog file or snapshot content. Filename '\-' stands for stdin. .IP "\-P , \-\-play " 4 .IX Item "-P , --play " Replay xlog file to the specified server. .IP "\-R , \-\-rpl " 4 .IX Item "-R , --rpl " Act as replica for the specified server. .IP "\-S , \-\-space " 4 .IX Item "-S , --space " Filter xlog file records by space number. .IP "\-F , \-\-from " 4 .IX Item "-F , --from " Start xlog file from the specified lsn. .IP "\-T , \-\-to " 4 .IX Item "-T , --to " Stop on specified xlog lsn. .IP "\-M , \-\-format " 4 .IX Item "-M , --format " Cat output format (default: tarantool). .IP "\-H, \-\-header" 4 .IX Item "-H, --header" Add file header to the 'raw' output format.. .IP "\-\-help" 4 .IX Item "--help" Display helpscreen and exits. .IP "\-v, \-\-version" 4 .IX Item "-v, --version" Display version and exits. tarantool-1.5.1.218.g1a69fd6/doc/man/tarantool_box.10000664000000000000000000001346212213333047020241 0ustar rootroot.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "TARANTOOL_BOX 1" .TH TARANTOOL_BOX 1 "2013-08-12" "perl v5.14.2" "high performance key/value storage server" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" tarantool_box \- open\-source NoSQL database .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& tarantool_box [OPTIONS] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Tarantool is an open-source NoSQL database, developed by Mail.ru. .PP Its key properties include: .IP "\(bu" 4 Licence: simplified \s-1BSD\s0 .IP "\(bu" 4 All data is maintained in \s-1RAM\s0 .IP "\(bu" 4 Data persistence is implemented using Write Ahead Log and snapshotting .IP "\(bu" 4 Supports asynchronous replication and hot standby .IP "\(bu" 4 Uses coroutines and asynchronous I/O to implement high-performance lock-free access to data .IP "\(bu" 4 Available on Linux and FreeBSD .IP "\(bu" 4 Stored procedures in Lua are supported. .SS "Data model" .IX Subsection "Data model" The basic atom of storage in Tarantool is called tuple. A tuple can have arbitrary number of fields. The first field in the tuple is always the identifying unique key. Tuples form spaces. It is possible to search tuples in spaces using the primary or secondary keys. Fields in a tuple are type-agnostic. It is possible to change, as well as add or remove fields. .SH "Command-line options" .IX Header "Command-line options" .IP "\-\-cfg\-get=KEY" 4 .IX Item "--cfg-get=KEY" Returns a value from configuration file described by \fB\s-1KEY\s0\fR. .IP "\-\-check\-config" 4 .IX Item "--check-config" Checks configuration file for errors. .IP "\-c \s-1FILE\s0, \-\-config=FILE" 4 .IX Item "-c FILE, --config=FILE" Points a path to configuration file (default: \fB/etc/tarantool.cfg\fR). .IP "\-\-cat=FILE" 4 .IX Item "--cat=FILE" Cats snapshot file to stdout in readable format and exits. .IP "\-\-init\-storage" 4 .IX Item "--init-storage" Initializes storage (an empty snapshot file) and exits. .IP "\-v, \-\-verbose" 4 .IX Item "-v, --verbose" Increases verbosity level in log messages. .IP "\-B, \-\-background" 4 .IX Item "-B, --background" Redirects input/output streams to a log file and runs as daemon. .IP "\-h, \-\-help" 4 .IX Item "-h, --help" Displays helpscreen and exits. .IP "\-V, \-\-version" 4 .IX Item "-V, --version" Prints program version and exits. tarantool-1.5.1.218.g1a69fd6/doc/man/CMakeLists.txt0000664000000000000000000000107612202131537020040 0ustar rootrootadd_custom_target(man ALL COMMAND ${POD2MAN} -c 'high performance key/value storage server' ${CMAKE_SOURCE_DIR}/doc/man/tarantool_box.pod > ${PROJECT_BINARY_DIR}/doc/man/tarantool_box.1 COMMAND ${POD2MAN} -c 'readline SQL-client for tarantool' ${CMAKE_SOURCE_DIR}/doc/man/tarantool.pod > ${PROJECT_BINARY_DIR}/doc/man/tarantool.1 ) install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool_box.1 DESTINATION ${CMAKE_MAN_DIR}/man1/) if (ENABLE_CLIENT) install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool.1 DESTINATION ${CMAKE_MAN_DIR}/man1/) endif() tarantool-1.5.1.218.g1a69fd6/doc/man/Makefile0000664000000000000000000001625712213333035016746 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/man/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/man/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/man/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/man/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/man/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. doc/man/CMakeFiles/man.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/man/CMakeFiles/man.dir/rule .PHONY : doc/man/CMakeFiles/man.dir/rule # Convenience name for target. man: doc/man/CMakeFiles/man.dir/rule .PHONY : man # fast build rule for target. man/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f doc/man/CMakeFiles/man.dir/build.make doc/man/CMakeFiles/man.dir/build .PHONY : man/fast # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... man" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/doc/tnt.ent.cmake0000664000000000000000000000053612202131537017121 0ustar rootroot %isopub; tarantool-1.5.1.218.g1a69fd6/doc/isopub.ent0000664000000000000000000001514412202131537016537 0ustar rootroot tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/0000775000000000000000000000000012231715276016673 5ustar rootroottarantool-1.5.1.218.g1a69fd6/doc/www-data.in/cmake_install.cmake0000664000000000000000000000226312213333035022473 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/www-data.in # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/intro0000664000000000000000000002160712202131537017745 0ustar rootroot{% page intro en %} ## What is Tarantool? Tarantool is an in-memory NoSQL database. The code is available for free under the terms of BSD license. Supported platforms are GNU/Linux, Mac OS and FreeBSD. ## An overview of the architecture The server maintains all its data in random-access memory, and therefore has very low read latency. At the same time, a copy of the data is kept on non-volatile storage (a disk drive), and inserts and updates are performed atomically. To ensure atomicity, consistency and crash-safety of the persistent copy, a write-ahead log (WAL) is maintained, and each change is recorded in the WAL before it is considered complete. The logging subsystem supports group commit. If update and delete rate is high, a constantly growing write-ahead log file (or files) can pose a disk space problem, and significantly increase time necessary to restart from disk. A simple solution is employed: the server can be requested to save a concise snapshot of its current data. The underlying operating system's copy-on-write feature is employed to take the snapshot in a quick, resource-savvy and non-blocking manner. The copy-on-write technique guarantees that snapshotting has minimal impact on server performance. Tarantool is lock-free. Instead of the operating system's concurrency primitives, such as threads and mutexes, Tarantool uses a cooperative multitasking environment to simultaneously operate on thousands of connections. A fixed number of independent execution threads within the server do not share state, but exchange data using low overhead message queues. While this approach limits server scalability to a few CPU cores, it removes competition for the memory bus and sets the scalability limit to the top of memory and network throughput. CPU utilization of a typical highly-loaded Tarantool server is under 10%. ## Key features Unlike most of NoSQL databases, Tarantool supports primary, secondary keys, multi-part keys, HASH, TREE and BITSET index types. Tarantool supports Lua stored procedures, which can access and modify data atomically. Procedures can be created, modified and dropped at runtime. Use of Lua as an extension language does not end with stored procedures: Lua programs can be used during startup, to define triggers and background tasks, interact with networked peers. Unlike popular application development frameworks implemented around "reactor" pattern, networking in server-side Lua is sequential, yet very efficient, as is built on top of the cooperating multitasking environment used by the server itself. Extended with Lua, Tarantool typically replaces more not one but a few existing components with a single well-performing system, changing and simplifying complex multi-tier Web application architectures. Tarantool supports replication. Replicas may run locally or on a remote host. Tarantool replication is asynchronous and does not block writes to the master. When or if the master becomes unavailable, the replica can be switched to assume the role of the master without server restart. ## How stable is the software? The software is production-ready. Tarantool has been created and is actively used at Mail.Ru, one of the leading Russian web content providers. At Mail.Ru, the software serves the hottest data, such as online users and their sessions, online application properties, mapping between users and their serving shards, and so on. Outside Mail.Ru the software is used by a growing number of projects in online gaming, digital marketing, social media industries. While product development is sponsored by Mail.Ru, the roadmap, bugs database and the development process are fully open. The software incorporates patches from dozens of community contributors, and most of the programming language drivers are written and supported by the community. {% page intro ru %} ## What is Tarantool? Tarantool is an in-memory NoSQL database. The code is available for free under the terms of BSD license. Supported platforms are GNU/Linux, Mac OS and FreeBSD. ## An overview of the architecture The server maintains all its data in random-access memory, and therefore has very low read latency. At the same time, a copy of the data is kept on non-volatile storage (a disk drive), and inserts and updates are performed atomically. To ensure atomicity, consistency and crash-safety of the persistent copy, a write-ahead log (WAL) is maintained, and each change is recorded in the WAL before it is considered complete. The logging subsystem supports group commit. If update and delete rate is high, a constantly growing write-ahead log file (or files) can pose a disk space problem, and significantly increase time necessary to restart from disk. A simple solution is employed: the server can be requested to save a concise snapshot of its current data. The underlying operating system's copy-on-write feature is employed to take the snapshot in a quick, resource-savvy and non-blocking manner. The copy-on-write technique guarantees that snapshotting has minimal impact on server performance. Tarantool is lock-free. Instead of the operating system's concurrency primitives, such as threads and mutexes, Tarantool uses a cooperative multitasking environment to simultaneously operate on thousands of connections. A fixed number of independent execution threads within the server do not share state, but exchange data using low overhead message queues. While this approach limits server scalability to a few CPU cores, it removes competition for the memory bus and sets the scalability limit to the top of memory and network throughput. CPU utilization of a typical highly-loaded Tarantool server is under 10%. ## Key features Unlike most of NoSQL databases, Tarantool supports primary, secondary keys, multi-part keys, HASH, TREE and BITSET index types. Tarantool supports Lua stored procedures, which can access and modify data atomically. Procedures can be created, modified and dropped at runtime. Use of Lua as an extension language does not end with stored procedures: Lua programs can be used during startup, to define triggers and background tasks, interact with networked peers. Unlike popular application development frameworks implemented around "reactor" pattern, networking in server-side Lua is sequential, yet very efficient, as is built on top of the cooperating multitasking environment used by the server itself. Extended with Lua, Tarantool typically replaces not one but a few existing components with a single well-performing system, changing and simplifying complex multi-tier Web application architectures. Tarantool supports replication. Replicas may run locally or on a remote host. Tarantool replication is asynchronous and does not block writes to the master. When or if the master becomes unavailable, the replica can be switched to assume the role of the master without server restart. ## How stable is the software? The software is production-ready. Tarantool has been created and is actively used at Mail.Ru, one of the leading Russian web content providers. At Mail.Ru, the software serves the hottest data, such as online users and their sessions, online application properties, mapping between users and their serving shards, and so on. Outside Mail.Ru the software is used by a growing number of projects in online gaming, digital marketing, social media industries. While product development is sponsored by Mail.Ru, the roadmap, bugs database and the development process are fully open. The software incorporates patches from dozens of community contributors, and most of the programming language drivers are written and supported by the community. tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/0000775000000000000000000000000012203403774020343 5ustar rootroottarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/intro0000664000000000000000000000010412202131537021406 0ustar rootroot{% extends "base" %} {% set title = "Tarantool: an introduction" %} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/base0000664000000000000000000000232712202131537021176 0ustar rootroot {{ title }} {% include "script" ignore missing %}
    {% block content %}
    {{ content }}
    {% endblock content %}
    tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/download0000664000000000000000000000007612202131537022072 0ustar rootroot{% extends "base" %} {% set title = "Tarantool: downloads" %} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/script0000664000000000000000000000165712202131537021575 0ustar rootroot tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/support0000664000000000000000000000010412202131537021767 0ustar rootroot{% extends "base" %} {% set title = "Tarantool: getting support" %} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/index0000664000000000000000000000102312203403774021371 0ustar rootroot{% extends "base" %} {% set title = "Tarantool -- an in-memory NoSQL database" %} {% block header %} {% endblock header %} {% block content %}
    {{ blurb | langselect }}
    {{ tagline | langselect }} {{ features | langselect }} {{ example | langselect }} {{ links | langselect }} {% endblock content%} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/benchmark0000664000000000000000000000021312202131537022206 0ustar rootroot{% extends "base" %} {% set title = "Tarantool: a benchmark" %} {% block content %} {{ benchmark | langselect }} {% endblock content%} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_layout/faq0000664000000000000000000000022412202131537021025 0ustar rootroot{% extends "base" %} {% set title = "Tarantool: Frequently Asked Questions" %} {% block content %} {{ faq | langselect }} {% endblock content%} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_config0000664000000000000000000000066712202131537020221 0ustar rootroot languages: en: { source-encoding: 'utf-8', output-encoding: 'utf-8', suffix: '.html' } ru: { source-encoding: 'utf-8', output-encoding: 'utf-8', suffix: '.ru.html' } # i18n for small bits home_tag: { en: 'Tarantool - Front page', ru: 'Tarantool - Главная' } # implement language switch in the header, note the reversed language tags lang_tag: { en: 'Русский', ru: 'English' } lang_ext: { en: '.ru.html', ru: '.html' } tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/download0000664000000000000000000002262512213333034020420 0ustar rootroot{% page download en %} # All downloads All published releases are available at http://tarantool.org/dist. # How to choose the right version for download Tarantool uses a 3-digit versioning scheme <major>-<minor>-<patch>. Major digits change rarely. A minor version increase indicates one or few incompatibile changes. Patch verison counter is increased whenever the source tree receives a few important bugfixes. The version string may also contain a git revision id, to ease identification of the unqiue commit used to generate the build. The current version of the stable branch is **1.5.1-83-gf2974d6**. An automatic build system creates, tests and publishes packages for every push into the stable branch. All binary packages contain symbol information. Additionally, **-debug-** packages contain asserts and are compiled without optimization. ## Source tarball The latest source archive is tarantool-1.5.1-83-gf2974d6-src.tar.gz. Please consult with README for build instructions on your system. ## Binary downloads To simplify problem analysis and avoid various bugs induced by compilation parameters and environment, it is recommended that production systems use the builds provided on this site. ### Debian GNU/Linux and Ubuntu We maintain an always up-to-date Debian GNU/Linux and Ubuntu package repository at http://tarantool.org/dist/debian and http://tarantool.org/dist/ubuntu respectively. At the moment the repository contains builds for Debian "Sid", "Jessie", "Wheezy" and Ubuntu "Precise", "Quantal", "Raring", "Saucy". It can be added to your apt sources list with: wget http://tarantool.org/dist/public.key sudo apt-key add ./public.key release=`lsb_release -c -s` # For Debian: echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list # For Ubuntu: echo "deb http://tarantool.org/dist/ubuntu/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/ubuntu/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list sudo apt-get update sudo apt-get install tarantool tarantool-client ### CentOS 5-6 and RHEL 5-6 CentOS repository is available at http://tarantool.org/dist/centos. Add the following section to your yum repository list (/etc/yum.repos.d/tarantool.repo) to enable it: [tarantool] name=CentOS-$releasever - Tarantool baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/ enabled=1 gpgcheck=0 ### Gentoo Linux Tarantool is available from `tarantool` portage overlay. Use [layman](http://wiki.gentoo.org/wiki/Layman) to add the overlay to your system: # layman -S # layman -a tarantool # emerge dev-db/tarantool -av ### Other Linux distributions
    Static builds for Linux
    Binary tarball (.tar.gz) 32-bit 64-bit
    ### FreeBSD Tarantool is available from the FreeBSD Ports collection (`databases/tarantool`). ### OS X You can install Tarantool using homebrew: $ brew install --use-clang http://tarantool.org/dist/tarantool.rb Please upgrade `clang` to version 3.2 or later using ```Command Line Tools for Xcode``` disk image version 4.6+ from [Apple Developer](https://developer.apple.com/downloads/) web-site. # Development branch In the same manner as for [the stable branch](http://github.com/tarantool/tarantool/tree/stable), every push into [the master branch](http://github.com/tarantool/tarantool) is [available online](http://tarantool.org/dist/master). The server roadmap is maintained on [Launchpad](http://launchpad.net/tarantool). ## Connectors - Perl driver, [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.37/lib/DR/Tarantool.pm) - Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java) - Ruby driver, [http://github.com/mailru/tarantool-ruby](https://github.com/mailru/tarantool-ruby) - Python driver, [http://pypi.python.org/pypi/tarantool](http://pypi.python.org/pypi/tarantool) - PHP driver, [https://github.com/tarantool/tarantool-php](https://github.com/tarantool/tarantool-php) - node.js driver, [https://github.com/devgru/node-tarantool](https://github.com/devgru/node-tarantool) - Erlang driver, [https://github.com/rtsisyk/etarantool](https://github.com/rtsisyk/etarantool) - C connector [is maintained in the server source tree](https://github.com/tarantool/tarantool/blob/master/connector/c) {% page download ru %} ### Как правильно выбрать версию сервера Tarantool использует стандартную схему нумерования релизов <major>-<minor>-<patch>. Первая цифра в версии изменяется крайне редко, по итогам накопления большого количества новых возможностей. Изменение средней цифры является индикатором несовместимых изменений в сервере, таких как изменение протокола, удаление опций командной строки или конфигурационного файла. Последняя цифра увеличивается при создании очередного релиза, направленного на устранение обнаруженных ошибок. В конце строки версии также может присутствовать git commit id, что упрощает определение конкретной версии репозитория, использованной для создания релиза. Текущая стабильная версия **1.5.1-83-gf2974d6**. #### Исходный код Архив .tar.gz с последний версией исходного кода доступен по следующей ссылке: tarantool-1.5.1-83-gf2974d6-src.tar.gz. Файл README.<OS> содержит инструкции по сборке из исходников. ### Бинарные пакеты Для использования в высоконагруженных проектах рекомендуются пакеты, опубликованные на этом сайте. #### Debian GNU/Linux and Ubuntu Мы поддерживаем собственные репозитории .deb пакетов, который содержит последние версии сервера и клиентских библиотек для *Debian GNU/Linux* и *Ubuntu*: http://tarantool.org/dist/debian, http://tarantool.org/dist/ubuntu. Репозитории содержат пакеты для Debian "Sid", "Jessy", "Wheezy" и Ubuntu "Precise", "Quantal", "Raring", "Saucy". Для установки можно воспользоваться следующим скриптом: wget http://tarantool.org/dist/public.key sudo apt-key add ./public.key release=`lsb_release -c -s` echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list sudo apt-get update sudo apt-get install tarantool tarantool-client CentOS GNU/Linux репозиторий доступен по адресу: http://tarantool.org/dist/centos. Добавьте следующую секцию в Ваш список репозиториев (/etc/yum.repos.d/tarantool.repo) чтобы сделать его доступным для Yum: [tarantool] name=CentOS-$releasever - Tarantool baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/ enabled=1 gpgcheck=0 ### Архив старых релизов Архив старых релизов доступен по адресу http://tarantool.org/dist. ### Доступ из языков программирования - Perl driver [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.37/lib/DR/Tarantool.pm) - [Ruby driver](https://github.com/mailru/tarantool-ruby) - Python driver, [hosted at pypi.python.org](http://pypi.python.org/pypi/tarantool) - PHP driver [https://github.com/tarantool/tarantool-php](https://github.com/tarantool/tarantool-php) - Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java) - node.js driver, [https://github.com/devgru/node-tarantool](https://github.com/devgru/node-tarantool) tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/support0000664000000000000000000000201412202131537020315 0ustar rootroot{% page support en %} # Getting support We are happy to provide help on [tarantool@groups.google.com](http://groups.google.com/group/tarantool). If you need immediate help, try to ping maintainers on [#tarantool](http://webchat.freenode.net/?channels=#tarantool) channel at irc.freenode.net. Terms of commercial 24x7 support are available upon request, please send an inquiry to [support@tarantool.org](mailto:support@tarantool.org). {% page support ru %} # Помощь и поддержа Техническую поддержку можно получить в русскоязычном списке рассылки [tarantool-ru@groups.google.com](http://groups.google.com/group/tarantool-ru) или на irc.freenode.net, канал [#tarantool](http://webchat.freenode.net/?channels=#tarantool). Для того чтобы узнать условия коммерческой поддержки, необходимо сделать запрос по адресу [support@tarantool.org](mailto:support@tarantool.org). tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/download.cmake0000664000000000000000000002265712231715276021520 0ustar rootroot{% page download en %} # All downloads All published releases are available at http://tarantool.org/dist. # How to choose the right version for download Tarantool uses a 3-digit versioning scheme <major>-<minor>-<patch>. Major digits change rarely. A minor version increase indicates one or few incompatibile changes. Patch verison counter is increased whenever the source tree receives a few important bugfixes. The version string may also contain a git revision id, to ease identification of the unqiue commit used to generate the build. The current version of the stable branch is **@PACKAGE_VERSION@**. An automatic build system creates, tests and publishes packages for every push into the stable branch. All binary packages contain symbol information. Additionally, **-debug-** packages contain asserts and are compiled without optimization. ## Source tarball The latest source archive is tarantool-@PACKAGE_VERSION@-src.tar.gz. Please consult with README for build instructions on your system. ## Binary downloads To simplify problem analysis and avoid various bugs induced by compilation parameters and environment, it is recommended that production systems use the builds provided on this site. ### Debian GNU/Linux and Ubuntu We maintain an always up-to-date Debian GNU/Linux and Ubuntu package repository at http://tarantool.org/dist/debian and http://tarantool.org/dist/ubuntu respectively. At the moment the repository contains builds for Debian "Sid", "Jessie", "Wheezy" and Ubuntu "Precise", "Quantal", "Raring", "Saucy". It can be added to your apt sources list with: wget http://tarantool.org/dist/public.key sudo apt-key add ./public.key release=`lsb_release -c -s` # For Debian: echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list # For Ubuntu: echo "deb http://tarantool.org/dist/ubuntu/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/ubuntu/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list sudo apt-get update sudo apt-get install tarantool tarantool-client ### CentOS 5-6 and RHEL 5-6 CentOS repository is available at http://tarantool.org/dist/centos. Add the following section to your yum repository list (/etc/yum.repos.d/tarantool.repo) to enable it: [tarantool] name=CentOS-$releasever - Tarantool baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/ enabled=1 gpgcheck=0 ### Gentoo Linux Tarantool is available from `tarantool` portage overlay. Use [layman](http://wiki.gentoo.org/wiki/Layman) to add the overlay to your system: # layman -S # layman -a tarantool # emerge dev-db/tarantool -av ### Other Linux distributions
    Static builds for Linux
    Binary tarball (.tar.gz) 32-bit 64-bit
    ### FreeBSD Tarantool is available from the FreeBSD Ports collection (`databases/tarantool`). ### OS X You can install Tarantool using homebrew: $ brew install --use-clang http://tarantool.org/dist/tarantool.rb Please upgrade `clang` to version 3.2 or later using ```Command Line Tools for Xcode``` disk image version 4.6+ from [Apple Developer](https://developer.apple.com/downloads/) web-site. # Development branch In the same manner as for [the stable branch](http://github.com/tarantool/tarantool/tree/stable), every push into [the master branch](http://github.com/tarantool/tarantool) is [available online](http://tarantool.org/dist/master). The server roadmap is maintained on [Github](http://github.com/tarantool/tarantool/issues?labels=feature). ## Connectors - Perl driver, [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.37/lib/DR/Tarantool.pm) - Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java) - Ruby driver, [http://github.com/mailru/tarantool-ruby](https://github.com/mailru/tarantool-ruby) - Python driver, [http://pypi.python.org/pypi/tarantool](http://pypi.python.org/pypi/tarantool) - PHP driver, [https://github.com/tarantool/tarantool-php](https://github.com/tarantool/tarantool-php) - node.js driver, [https://github.com/devgru/node-tarantool](https://github.com/devgru/node-tarantool) - Erlang driver, [https://github.com/rtsisyk/etarantool](https://github.com/rtsisyk/etarantool) - C connector [is maintained in the server source tree](https://github.com/tarantool/tarantool/blob/master/connector/c) {% page download ru %} ### Как правильно выбрать версию сервера Tarantool использует стандартную схему нумерования релизов <major>-<minor>-<patch>. Первая цифра в версии изменяется крайне редко, по итогам накопления большого количества новых возможностей. Изменение средней цифры является индикатором несовместимых изменений в сервере, таких как изменение протокола, удаление опций командной строки или конфигурационного файла. Последняя цифра увеличивается при создании очередного релиза, направленного на устранение обнаруженных ошибок. В конце строки версии также может присутствовать git commit id, что упрощает определение конкретной версии репозитория, использованной для создания релиза. Текущая стабильная версия **@PACKAGE_VERSION@**. #### Исходный код Архив .tar.gz с последний версией исходного кода доступен по следующей ссылке: tarantool-@PACKAGE_VERSION@-src.tar.gz. Файл README.<OS> содержит инструкции по сборке из исходников. ### Бинарные пакеты Для использования в высоконагруженных проектах рекомендуются пакеты, опубликованные на этом сайте. #### Debian GNU/Linux and Ubuntu Мы поддерживаем собственные репозитории .deb пакетов, который содержит последние версии сервера и клиентских библиотек для *Debian GNU/Linux* и *Ubuntu*: http://tarantool.org/dist/debian, http://tarantool.org/dist/ubuntu. Репозитории содержат пакеты для Debian "Sid", "Jessy", "Wheezy" и Ubuntu "Precise", "Quantal", "Raring", "Saucy". Для установки можно воспользоваться следующим скриптом: wget http://tarantool.org/dist/public.key sudo apt-key add ./public.key release=`lsb_release -c -s` echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee -a /etc/apt/sources.list.d/tarantool.list sudo apt-get update sudo apt-get install tarantool tarantool-client CentOS GNU/Linux репозиторий доступен по адресу: http://tarantool.org/dist/centos. Добавьте следующую секцию в Ваш список репозиториев (/etc/yum.repos.d/tarantool.repo) чтобы сделать его доступным для Yum: [tarantool] name=CentOS-$releasever - Tarantool baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/ enabled=1 gpgcheck=0 ### Архив старых релизов Архив старых релизов доступен по адресу http://tarantool.org/dist. ### Доступ из языков программирования - Perl driver [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.37/lib/DR/Tarantool.pm) - [Ruby driver](https://github.com/mailru/tarantool-ruby) - Python driver, [hosted at pypi.python.org](http://pypi.python.org/pypi/tarantool) - PHP driver [https://github.com/tarantool/tarantool-php](https://github.com/tarantool/tarantool-php) - Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java) - node.js driver, [https://github.com/devgru/node-tarantool](https://github.com/devgru/node-tarantool) tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/index0000664000000000000000000000404612202131537017717 0ustar rootroot{% page index en %} {% text blurb en %} # Tarantool ## An in-memory NoSQL database ###[Overview](intro.html)   [Documentation](tarantool_user_guide.html)   [Download](download.html)   [Support](support.html) {% text blurb ru %} # Tarantool ## NoSQL СУБД для высокой нагрузки ###[Введение](intro.html)   [Документация](tarantool_user_guide.html)   [Скачать](download.html)   [Поддержка](support.html) {% text tagline en %} # Introduction Tarantool is an in-memory database designed to store the most volatile and highly accessible web content. Tarantool has been extensively used in production since 2009. It's **open source**, BSD licensed. {% text tagline ru %} ## Что такое Tarantool? Tarantool - расширяемая, транзакционная СУБД для хранения наиболее запрашиваемых и часто меняющихся данных. {% text features en %} # Features - [lowest CPU overhead](benchmark.html) to store or serve a piece of content, - optional Write Ahead Logging for persistency and reliability, - universal data access with [rich Lua stored procedures](http://github.com/mailru/tntlua), which can exchange messages between each other or networked peers, - asynchronous master-slave replication and hot backup. {% text example en %} # Get started
    # apt-get install tarantool tarantool-client
    # cd /etc/tarantool
    # cp instances.available/example.cfg instances.enabled/fqueue.cfg
    # cd /usr/share/tarantool/lua
    # wget http://github.com/mailru/tntlua/raw/master/fqueue.lua -O init.lua
    # service tarantool start
    tarantool: Staring instances
        Starting 'fqueue' ... ok
    
    A fast and customizable message queue server is up and running. {% text links en %} # Learn more - [YCSB benchmark results](benchmark.html) - [FAQ](faq.html) - [Source repository](http://github.com/tarantool/tarantool) - [Lua stored procedures repository]( http://github.com/mailru/tntlua) {% page index ru %} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/_ignore0000664000000000000000000000013712202131537020227 0ustar rootrootREADME *.py *.pyc CMakeLists.txt CMakeFiles cmake_install.cmake download.cmake Makefile .*.swp tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/CMakeLists.txt0000664000000000000000000000032112202131537021415 0ustar rootrootadd_custom_target(www-data ALL COMMAND ${PROJECT_SOURCE_DIR}/scripts/static.py --source-path ${PROJECT_SOURCE_DIR}/doc/www-data.in --output-path ${PROJECT_BINARY_DIR}/doc/www-data) tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/benchmark0000664000000000000000000000732012202131537020540 0ustar rootroot{% page benchmark en %} {% text benchmark en %} # Preface There are lies, then there is statistics, but the first place in misrepresenting the truth is undoubtedly owned by benchmarks. Comparing Tarantool with other systems, apples to apples, is not strictly correct: the server networking subsystem is fully asynchronous and it's possible to proxy all clients via a single socket. In this case, responses to queries are sent as soon they are ready. Most production application use asynchronous and batched I/O with Tarantool. As long as the overhead of system calls and context switches is the single largest contributor to the cost of serving a single request, use of batched and multiplexed I/O produces an order of magnitude better results, when compared with traditional multi-threaded workloads. A tool we developed for our own use, [nosqlbench](http://github.com/mailru/nosqlbench), is utilizing this approach at full. However, to compare with the rest of the world, a standardized benchmarking kit is more appropriate. This is why Yahoo! Cloud Serving Benchmark (c) was used to produce the charts below. A fork of YCSB with Tarantool support is available [here](https://github.com/bigbes92/YCSB). Since YCSB was developed to compare cloud key/value servers, it provides a very narrow view at performance of a tested server. For example, performance of secondary keys or overhead of locking (which Tarantool doesn't have) is not tested at all. # What is YCSB Yahoo! Cloud Serving Benchmark (c) consists of two components: - the client, which generates the load according to a workload type and analyzes latency and throughput, - workload files, which define a single benchmark by describing the size of the data set, the total amount of requests, the ratio of read and write queries. There are 6 major workload types in YCSB: - workload **A**, 50/50 update/read ratio, size of the data set is 200 000 key/value pairs, - workload **B**, 5/95 update/read ratio, the same size of the data set, - workload **C** is 100% read-only, - workload **D** 5/95 insert/read ratio, the read load is skewed towards the end of the key range, - workload **E**, 5/95 ratio of insert/reads over a range of 10 records, - workload **F**, 95% read/modify/write, 5% read. For additional information on YCSB and workload types, please visit [YCSB official page on Github](http://github.com/brianfrankcooper/YCSB). All charts below were measured using 1M queries per test, averaged over 8 consecutive test runs. Configuration files for the tested systems can be found [here](https://github.com/bigbes92/ycsb-expand-db/tree/master/confs).
    • A
    • B
    • C
    • D
    • E
    • F
    • LOAD

    Workload A

    • A_Read
    • A_Update

    50/50 update/read ratio

    {% page benchmark ru %} tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/Makefile0000664000000000000000000001647612213333035020336 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/www-data.in/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/www-data.in/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/www-data.in/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/www-data.in/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/www-data.in/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. doc/www-data.in/CMakeFiles/www-data.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/www-data.in/CMakeFiles/www-data.dir/rule .PHONY : doc/www-data.in/CMakeFiles/www-data.dir/rule # Convenience name for target. www-data: doc/www-data.in/CMakeFiles/www-data.dir/rule .PHONY : www-data # fast build rule for target. www-data/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f doc/www-data.in/CMakeFiles/www-data.dir/build.make doc/www-data.in/CMakeFiles/www-data.dir/build .PHONY : www-data/fast # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... www-data" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/doc/www-data.in/faq0000664000000000000000000000543512202131537017362 0ustar rootroot{% page faq en %} {% text faq en %} ## Frequently Asked Questions **Q. Why Tarantool?** A. Tarantool is a result of a long trial and error process within Mail.Ru. It's the Nth generation of a family of custom in-memory data servers, developed for various web applications. Besides, when Tarantool development started (2008) there were no stable and sufficiently functional open source alternative. ** Q. Why Lua?** A. Lua is a ligthweight, fast, extensible multi-paradigm language. Lua also happens to be very easy to embed. Lua coroutines relate very closely to Tarantool fibers, and Lua architecture works well with Tarantool internals. Lua is the first, but, hopefully, not the last stored program language for Tarantool. **Q. What's the key advantage of Tarantool?** A. Tarantool provides a fairly rich core feature set (HASH, TREE BITSET indexes, secondary indexes, composite indexes, asynchronous replication, hot standby, data durability) along with support for Lua stored procedures. These two properties make it possible to code fast, atomic and reliable in-memory data servers which handle non-trivial application-specific logic. The win over traditional SQL servers is in performance: low-overhead, lock-free architecture means Tarantool can serve an order of magnitude more requests per second, on comparable hardware. The win over NoSQL alternatives is in flexibility: Lua allows flexible processing of data stored in a compact, denormalized format. **Q. What are your development plans?** A. They are standard. Performance. Better support for transactions. Master-master replication, automatic sharding. **Q. Who is developing Tarantool?** A. There is a small engineering team employed by Mail.ru -- check out our commit logs on github. The development is fully open, and most of the connectors authors and maintainers in different distributions are from the community. **Q. How serious is Mail.Ru about Tarantool?** A. Tarantool is an open source project, distributed under a BSD license, and as such does not depend on any one sponsor. However, it is currently and integral part of Mail.Ru backbone, so it gets a lot of support from Mail.ru. **Q. Why is Tarantool primary port number 33013?** A. It's a prime number which is easy to remember, because 3313, 3301, 313, 13 and 3 are also prime numbers. **Q. My arena_used/items_used in SHOW SLAB output is >> 1. What does it mean and what should I do?** A. If the ratio of arena_used to items_used >> 1, that indicates that there is fragmentation accumulated by the slab allocator. Imagine there are a lot of small tuples stored in the system initially, and later on each tuple becomes bigger and doesn't fit into its old slab size. The old slabs are never relinquished by the allocator. Currently this can be solved only by a server restart. {% page faq ru %} tarantool-1.5.1.218.g1a69fd6/doc/sql.txt0000664000000000000000000000327412202131537016067 0ustar rootroot; ; Tarantool SQL parser is implemented entirely on the client side. ; This BNF provides a reference of the supported subset of ; SQL, to which all clients are strongly encouraged ; to stick. ; ; Convention: UPPERCASE letters are used for terminals and literals. ; Lowercase letters are used for . SQL is ; case-insensitive, so this convention is present only to improve ; legibility of the BNF. ; ; Tarantool features not supported in SQL: ; - multipart keys ; - update operations, except SET ; - all index-specific queries, such as range queries, bitset ; expression evaluation, iteration. These are only available ; in Lua. ::= | | | | ::= SELECT * FROM ::= WHERE ::= WHERE ::= = ::= [{OR }+] ; LIMIT is optional ::= | LIMIT NUM[, NUM] ::= ( [{, }+]) ::= = [{, = }+] ::= STR | NUM ::= ID ; Only integer numbers, optionally signed, are supported NUM ::= [+-]?[0-9]+ ; Strings must be single-quoted STR ::= '.*' ; Identifiers must be standard SQL, but end with digits. ; These digits are used to infer the namespace or index id. ID ::= [a-z_]+[0-9]+ ; vim: syntax=bnf tarantool-1.5.1.218.g1a69fd6/doc/user/0000775000000000000000000000000012242653271015507 5ustar rootroottarantool-1.5.1.218.g1a69fd6/doc/user/language-reference.xml0000664000000000000000000004025412242653271021755 0ustar rootroot %tnt; ]> Language reference
    This chapter provides a reference of Tarantool data operations and administrative commands.
    Digression: data and administrative ports Unlike many other key/value servers, Tarantool uses different TCP ports and client/server protocols for data manipulation and administrative statements. During start up, the server can connect to up to five TCP ports: Read/write data port, to handle INSERTs, UPDATEs, DELETEs, SELECTs and CALLs. This port speaks the native Tarantool protocol, and provides full data access. The default value of the port is 33013, as defined in configuration option. Read only port, which only accepts SELECTs and CALLs, default port number 33014, as defined in configuration option. Administrative port, which defaults to 33015, and is defined in configuration option. Replication port (see ), by default set to 33016, used to send updates to replicas. Replication is optional, and if this port is not set in the configuration file, the corresponding server process is not started. Memcached port. Optional, read-write data port that speaks Memcached text protocol. This port is off by default. In absence of authentication, this approach allows system administrators to restrict access to read/write or administrative ports. The client, however, has to be aware of the separation, and tarantool command line client automatically selects the correct port for you with help of a simple regular expression. SELECTs, UPDATEs, INSERTs, DELETEs and CALLs are sent to the primary port. SHOW, RELOAD, SAVE and other statements are sent to the administrative port.
    Data manipulation Five basic request types are supported: INSERT, UPDATE, DELETE, SELECT and CALL. All requests, including INSERT, UPDATE and DELETE may return data. A SELECT can be requested to limit the number of returned tuples. This is useful when searching in a non-unique index or when a special wildcard (zero-length string) value is supplied as search key or a key part. UPDATE statement supports operations on fields — assignment, arithmetic operations (the field must be numeric), cutting and pasting fragments of a field, — as well as operations on a tuple: push and pop of a field at the tail of a tuple, deletion and insertion of a field. Multiple operations can be combined into a single update, and in this case they are performed atomically. Each operation expects field number as its first argument. When a sequence of changes is present, field identifier in each operation is assumed to be relative to the most recent state of the tuple, i.e. as if all previous operations in a multi-operation update have already been applied. In other words, it's always safe to merge multiple UPDATE statements into a single one, with no change in semantics. Tarantool protocol was designed with focus on asynchronous I/O and easy integration with proxies. Each client request starts with a 12-byte binary header, containing three fields: request type, length, and a numeric id. The mandatory length, present in request header simplifies client or proxy I/O. A response to a request is sent to the client as soon as it is ready. It always carries in its header the same type and id as in the request. The id makes it possible to match a request to a response, even if the latter arrived out of order. Request type defines the format of the payload. INSERTs, UPDATEs and DELETEs can only be made by the primary key, so an index id and a key (possibly multipart) are always present in these requests. SELECTs can use secondary keys. UPDATE only needs to list the fields that are actually changed. With this one exception, all commands operate on whole tuple(s). Unless implementing a client driver, one needn't concern oneself with the complications of the binary protocol. Language-specific drivers provide a friendly way to store domain language data structures in Tarantool, and the command line client supports a subset of standard SQL. A complete description of both, the binary protocol and the supported SQL, is maintained in annotated Backus-Naur form in the source tree: please see doc/box-protocol.txt and doc/sql.txt respectively.
    Memcached protocol If full access to Tarantool functionality is not needed, or there is no readily available connector for the programming language in use, any existing client driver for Memcached will make do as a Tarantool connector. To enable text Memcached protocol, turn on in the configuration file. Since Memcached has no notion of spaces or secondary indexes, this port only makes it possible to access one dedicated space (see ) via its primary key. Unless tuple expiration is enabled with , TTL part of the message is stored but ignored. Notice, that is also accessible using the primary port or Lua. A common use of the Memcached port in Tarantool is when a Memcached default expiration algorithm is insufficient, and a custom Lua expiration procedure is used. Tarantool does not support the binary protocol of Memcached. If top performance is a must, Tarantool's own binary protocol should be used.
    Administrative console The administrative console uses a simple text protocol. All commands are case-insensitive. You can connect to the administrative port using any telnet client, or a tool like rlwrap, if access to readline features is desired. Additionally, tarantool, the SQL-capable command line client, understands all administrative statements and automatically directs them to the administrative port. The server response to an administrative command, even though it is always in plain text, can be quite complex. It is encoded using YAML markup to simplify automated parsing. To learn about all supported administrative commands, you can type help in the administrative console. A reference description also follows below: save snapshot Take a snapshot of all data and store it in /<latest-lsn>.snap. To take a snapshot, Tarantool first enters the delayed garbage collection mode for all data. In this mode, tuples which were allocated before the snapshot has started are not freed until the snapshot has finished. To preserve consistency of the primary key, used to iterate over tuples, a copy-on-write technique is employed. If the master process changes part of a primary key, the corresponding process page is split, and the snapshot process obtains an old copy of the page. Since a snapshot is written sequentially, one can expect a very high write performance (averaging to 80MB/second on modern disks), which means an average database instance gets saved in a matter of minutes. Note, that as long as there are any changes to the parent index memory through concurrent updates, there are going to be page splits, and therefore one needs to have some extra free memory to run this command. 10% of is, on average, sufficient. This statement waits until a snapshot is taken and returns operation result. For example: localhost> show info --- info: version: "1.4.6" lsn: 843301 ... localhost> save snapshot --- ok ... localhost> save snapshot --- fail: can't save snapshot, errno 17 (File exists) ... Taking a snapshot does not cause the server to start a new write ahead log. Once a snapshot is taken, old WALs can be deleted as long as all replicas are up to date. But the WAL which was current at the time save snapshot started must be kept for recovery, since it still contains log records written after the start of save snapshot. An alternative way to save a snapshot is to send the server SIGUSR1 UNIX signal. While this approach could be handy, it is not recommended for use in automation: a signal provides no way to find out whether the snapshot was taken successfully or not. reload configuration Re-read the configuration file. If the file contains changes to dynamic parameters, update the runtime settings. If configuration syntax is incorrect, or a read-only parameter is changed, produce an error and do nothing. show configuration Show the current settings. Displays all settings, including those that have default values and thus are not necessarily present in the configuration file. show info localhost> show info --- info: version: "1.4.5-128-ga91962c" uptime: 441524 pid: 12315 logger_pid: 12316 lsn: 15481913304 recovery_lag: 0.000 recovery_last_update: 1306964594.980 status: primary config: "/usr/local/etc/tarantool.cfg" recovery_lag holds the difference (in seconds) between the current time on the machine (wall clock time) and the time stamp of the last applied record. In replication setup, this difference can indicate the delay taking place before a change is applied to a replica. recovery_last_update is the wall clock time of the last change recorded in the write ahead log. To convert it to human-readable time, you can use date -d@1306964594.980. status is either "primary" or "replica/<hostname>". show stat Show the average number of requests per second, and the total number of requests since startup, broken down by request type: INSERT or SELECT or UPDATE or DELETE." localhost> show stat --- statistics: INSERT: { rps: 139 , total: 48207694 } SELECT_LIMIT: { rps: 0 , total: 0 } SELECT: { rps: 1246 , total: 388322317 } UPDATE_FIELDS: { rps: 1874 , total: 743350520 } DELETE: { rps: 147 , total: 48902544 } show slab Show the statistics of the slab allocator. The slab allocator is the main allocator used to store tuples. This can be used to monitor the total memory use and memory fragmentation. items_used contains the % of already used to store tuples. arena_used contains the % of that is already distributed to the slab allocator. show palloc A pool allocator is used for temporary memory, when serving client requests. Every fiber has its own temporary pool. Shows the current state of pools of all fibers. save coredump Fork and dump a core. Since Tarantool stores all tuples in memory, it can take some time. Mainly useful for debugging. show fiber Show all running fibers, with their stack. Mainly useful for debugging. lua ... Execute a chunk of Lua code. This can be used to define, invoke, debug and drop stored procedures, inspect server environment, perform automated administrative tasks.
    tarantool-1.5.1.218.g1a69fd6/doc/user/stored-procedures.xml0000664000000000000000000032652112242653271021713 0ustar rootroot %tnt; ]>
    Writing stored procedures in Lua
    Lua is a light-weight, multi-paradigm, embeddable language. Stored procedures in Lua can be used to implement data manipulation patterns or data structures. A server-side procedure written in Lua can select and modify data, access configuration and perform administrative tasks. It is possible to dynamically define, invoke, alter and drop Lua procedures. Lua procedures can run in the background and perform administrative tasks, such as data expiration or re-sharding. Tarantool uses the LuaJIT just-in-time Lua compiler and virtual machine. Apart from increased performance, this provides such features as bitwise operations and 64-bit integer arithmetic.
    Procedures can be invoked from the administrative console and using the binary protocol, for example: localhost> lua function f1() return 'hello' end --- ... localhost> call f1() Found 1 tuple: ['hello'] In the language of the administrative console evaluates an arbitrary Lua chunk. CALL is an SQL standard statement, so its syntax was adopted by Tarantool command line client to invoke the CALL command of the binary protocol. In the example above, a Lua procedure is first defined using the text protocol of the administrative port, and then invoked using the Tarantool client-side SQL parser plus the binary protocol on the . Since it's possible to execute any Lua chunk in the administrative console, the newly created function f1() can be called there too: localhost> lua f1() --- - hello ... localhost> lua 1+2 --- - 3 ... localhost> lua "hello".." world" --- - hello world ... Lua procedures could also be called at the time of initialization using a dedicated init.lua script, located in . An example of such a script is given below: = tuple_ts + args.ttl end function purge(args, tuple) box.space[0]:delete(tuple[0]) end -- Run task expirationd.run_task("exprd space 0", 0, is_expired, purge, { field_no = 1, ttl = 30 * 60 }) ]]> The initialization script can select and modify data. However, if the server is a running replica, data change requests from the start script fail just the same way they would fail if they were sent from a remote client. Another common task to perform in the initialization script is to start background fibers for data expiration, re-sharding, or communication with networked peers. Finally, the script can be used to define Lua triggers invoked on various events within the system. There is a single global instance of the Lua interpreter, which is shared across all connections. Anything prefixed with lua on the administrative console is sent directly to this interpreter. Any change of the interpreter state is immediately available to all client connections. Each connection, however, is using its own Lua coroutine — a mechanism akin to Tarantool fibers. A coroutine has an own execution stack and a Lua closure — set of local variables and definitions. The interpreter environment is not restricted when is loaded. But before the server starts accepting requests, the standard Lua APIs, such as for file I/O, process control and module management are unset, to avoid possible trivial security attacks. In the binary protocol, it's only possible to invoke existing procedures, but not define or alter them. The CALL request packet contains the command code for CALL (22), the name of a procedure to be called, and a tuple for procedure arguments. Currently, Tarantool tuples are type-agnostic, thus each field of the tuple is passed into the procedure as an argument of type string. For example: kostja@atlas:~$ cat arg.lua function f1(a) local s = a if type(a) == 'string' then s = '' for i=1, #a, 1 do s = s..string.format('0x%x ', string.byte(a, i)) end end return type(a), s end kostja@atlas:~$ tarantool localhost> lua dofile('arg.lua') --- ... localhost> lua f1('1234') --- - string - 0x31 0x32 0x33 0x34 ... localhost> call f1('1234') Call OK, 2 rows affected ['string'] ['0x31 0x32 0x33 0x34 '] localhost> lua f1(1234) --- - number - 1234 ... localhost> call f1(1234) Call OK, 2 rows affected ['string'] ['0xd2 0x4 0x0 0x0 '] In the above example, the way the procedure receives its argument is identical in two protocols, when the argument is a string. A numeric field, however, when submitted via the binary protocol, is seen by the procedure as a 4-byte blob, not as a Lua number type. In addition to conventional method invocation, Lua provides object-oriented syntax. Access to the latter is available on the administrative console only: localhost> lua box.space[0]:truncate() --- ... localhost> call box.space[0]:truncate() error: 1:15 expected '(' Since it's impossible to invoke object methods from the binary protocol, the object-oriented syntax is often used to restrict certain operations to be used by a system administrator only. Every value, returned from a stored function by means of a return clause, is converted to a Tarantool tuple. Tuples are returned as such, in binary form; a Lua scalar, such as a string or an integer, is converted to a tuple with only one field. When the returned value is a Lua table, the resulting tuple contains only table values, but not keys. When a function in Lua terminates with an error, the error is sent to the client as return code, with the original error message preserved. Similarly, an error which has occurred inside Tarantool (observed on the client as an error code), when it happens during execution of a Lua procedure, produces a genuine Lua error: localhost> lua function f1() error("oops") end --- ... localhost> call f1() Call ERROR, Lua error: [string "function f1() error("oops") end"]:1: oops (ER_PROC_LUA) localhost> call box.insert('99', 1, 'test') Call ERROR, Space 99 is disabled (ER_SPACE_DISABLED) localhost> lua pcall(box.insert, 99, 1, 'test') --- - false - Space 99 is disabled ... It's possible not only to invoke trivial Lua code, but call into Tarantool storage functionality, using the box Lua library. The contents of the library can be inspected at runtime: localhost> lua for k, v in pairs(box) do print(k, ": ", type(v)) end --- fiber: table space: table cfg: table on_reload_configuration: function update: function process: function delete: function insert: function select: function index: table unpack: function replace: function select_range: function pack: function ... As is shown in the listing, the box package contains: high-level functions, such as process(), update(), select(), select_range(), insert(), replace(), delete(), to manipulate tuples and access spaces from Lua. libraries, such as cfg, space, fiber, index, tuple, to access server configuration, create, resume and interrupt fibers, inspect contents of spaces, indexes and tuples, send and receive data over the network. Global Lua names added by Tarantool tonumber64(value) Convert a given string or a Lua number to a 64-bit integer. The returned value supports all arithmetic operations, but uses 64-bit integer arithmetic, rather than floating-point arithmetic as in the built-in number type. Example localhost> lua tonumber64('123456789'), tonumber64(123456789) --- - 123456789 - 123456789 ... localhost> lua i=tonumber64(1) --- ... localhost> lua type(i), type(i*2), type(i/2), i, i*2, i/2 --- - cdata - cdata - cdata - 1 - 2 - 0 ...
    Package <code>box</code> box.process(op, request) Process a request passed in as a binary string. This is an entry point into the server request processor. It can be used to insert, update, select and delete tuples from within a Lua procedure. This is a low-level API, and it expects all arguments to be packed in accordance with the binary protocol (iproto header excluded). Normally, there is no need to use box.process() directly: box.select(), box.update() and other convenience wrappers invoke box.process() with correctly packed arguments. Parameters op — number, any Tarantool command code, except 22 (CALL). See doc/box-protocol.txt. request — command arguments packed in binary format. Returns This function returns zero or more tuples. In Lua, a tuple is represented by a userdata object of type box.tuple. If a Lua procedure is called from the administrative console, returned tuples are printed out in YAML format. When called from the binary protocol, the binary format is used. Errors Any server error produced by the executed command. Please note that, since all requests from Lua enter the core through box.process(), all checks and triggers run by the core automatically apply. For example, if the server is in read-only mode, an update or delete fails. Analogously, if a system-wide "instead of" trigger is defined, it is run. box.select(space_no, index_no, ...) Search for a tuple or tuples in the given space. A wrapper around box.process(). Parameters space_no — space id, index_no — index number in the space, to be used for match ...— index key, possibly multipart. Returns Returns zero or more tuples. Errors Same as in box.process(). Any error results in a Lua exception. Example localhost> call box.insert(0, 'test', 'my first tuple') Call OK, 1 rows affected ['test', 'my first tuple'] localhost> call box.select(0, 0, 'test') Call OK, 1 rows affected ['test', 'my first tuple'] localhost> lua box.insert(5, 'testtest', 'firstname', 'lastname') --- - 'testtest': {'firstname', 'lastname'} ... localhost> lua box.select(5, 1, 'firstname', 'lastname') --- - 'testtest': {'firstname', 'lastname'} ... box.insert(space_no, ...) box.select_limit(space_no, index_no, offset, limit, ...) Search for tuples in the given space. This is a full version of the built-in SELECT command, in which one can specify offset and limit for a multi-tuple return. The server may return multiple tuples when the index is non-unique or a partial key is used for search. box.replace(space_no, ...) Insert a tuple into a space. Tuple fields follow space_no. If a tuple with the same primary key already exists, box.insert() returns an error, while box.replace() replaces the existing tuple with a new one. These functions are wrappers around box.process() Returns Returns the inserted tuple. box.update(space_no, key, format, ...) Update a tuple identified by a primary key. If a key is multipart, it is passed in as a Lua table. Update arguments follow, described by format. The format and arguments are passed to box.pack() and the result is sent to box.process(). A correct format is a sequence of pairs: update operation, operation arguments. A single character of format describes either an operation which needs to take place or operation argument. A format specifier also works as a placeholder for the number of a field, which needs to be updated, or for an argument value. For example: +p=p — add a value to one field and assign another, :p — splice a field: start at offset, cut length bytes, and add a string. #p — delete a field. !p — insert a field (before the one specified). Possible format specifiers are: + for addition, - for subtraction, & for bitwise AND, | for bitwise OR, ^ for bitwise exclusive OR (XOR), : for string splice and p for operation argument. Returns Returns the updated tuple. Example #Assume that the initial state of the database is ... # space[0] has one tuple set and one primary key whose type is 32-bit integer. # There is one row, with field[0] = 999 and field[1] = 'A'. #In the following update ... # The first argument is 0, that is, the affected space is space[0] # The second argument is 999, that is, the affected tuple is identified by primary key value = 999 # The third argument is '=p', that is, there is one operation, assignment to a field # The fourth argument is 1, that is, the affected field is field[1] # The fifth argument is 'B', that is, field[1] contents change to 'B' # Therefore, after the following update, field[0] = 999 and field[1] = 'B'. lua box.update(0, 999, '=p', 1, 'B') #In the following update, the arguments are the same, except that ... # the key is passed as a Lua table (inside braces). This is unnecessary # when the primary key has only one field, but would be necessary if the # primary key had more than one field. # Therefore, after the following update, field[0] = 999 and field[1] = 'B' (no change). lua box.update(0, {999}, '=p', 1, 'B') #In the following update, the arguments are the same, except that ... # The fourth argument is 2, that is the affected field is field[2]. # It is okay that, until now, field[2] has not existed. It gets added. # Therefore, after the following update, field[0] = 999, field[1] = 'B', field[2] = 1. lua box.update(0, 999, '=p', 2, 1) #In the following update, the arguments are the same, except that ... # The third argument is '+p', that is, the operation is addition rather than assignment. # Since field[2] previously contained 10, this means we're adding 1 to 1. # Therefore, after the following update, field[0] = 999, field[1] = 'B', field[2] = 2. lua box.update(0, 999, '+p', 2, 1) #In the following update ... # The idea is to modify two fields at once. # The third argument is '|p=p', that is, there are two operations, OR and assignment. # The fourth and fifth arguments mean that field[2] gets ORed with 1. # The fifth and sixth arguments mean that field[1] gets assigned 'C'. # Therefore, after the following update, field[0] = 999, field[1] = 'C', field[2] = 3. lua box.update(0, 999, '|p=p', 2, 1, 1, 'C') #In the following update ... # The idea is to delete field[1], then subtract 3 from field[2], but ... # after the delete, there is a renumbering -- so field[2] becomes field[1] # before we subtract 3 from it, and that's why the sixth argument is 1 not 2. # Therefore, after the following update, field[0] = 999, field[1] = 0. lua box.update(0, 999, '#p-p', 1, 0, 1, 3) #In the following update ... # We're making a long string so that the splice will work in the next example. # Therefore, after the following update, field[0[ = 999, field[1] = 'XYZ'. lua box.update(0, 999, '=p', 1, 'XYZ') #In the following update ... # The third argument is ':p', that is, this is the example of splice. # The fifth argument is actually four arguments packed together ... # a filler, an offset, the number of bytes to cut (1), and the string to add ('!') # Therefore, after the following update, field[0[ = 999, field[1] = 'X!Z'. lua box.update(0, 999, ':p', 1, box.pack('ppp', 1, 1, '!')) box.delete(space_no, ...) Delete a tuple identified by a primary key. Returns Returns the deleted tuple. Example localhost> call box.delete(0, 'test') Call OK, 1 rows affected ['test', 'my first tuple'] localhost> call box.delete(0, 'test') Call OK, 0 rows affected localhost> call box.delete(0, 'tes') Call ERROR, Illegal parameters, key is not u32 (ER_ILLEGAL_PARAMS) box.select_range(space_no, index_no, limit, key, ...) Select a range of tuples, starting from the offset specified by key. The key can be multipart. Limit selection with at most limit tuples. If no key is specified, start from the first key in the index. For TREE indexes, this returns tuples in sorted order. For HASH indexes, the order of tuples is unspecified, and can change significantly if data is inserted or deleted between two calls to box.select_range(). If key is nil or unspecified, the selection starts from the start of the index. This is a simple wrapper around box.space[space_no]:select_range(index_no, ...). BITSET index does not support this call. Example localhost> show configuration --- ... space[4].cardinality: "-1" space[4].estimated_rows: "0" space[4].index[0].type: "HASH" space[4].index[0].unique: "true" space[4].index[0].key_field[0].fieldno: "0" space[4].index[0].key_field[0].type: "STR" space[4].index[1].type: "TREE" space[4].index[1].unique: "false" space[4].index[1].key_field[0].fieldno: "1" space[4].index[1].key_field[0].type: "STR" ... localhost> insert into t4 values ('0', '0') Insert OK, 1 rows affected localhost> insert into t4 values ('1', '1') Insert OK, 1 rows affected localhost> insert into t4 values ('2', '2') Insert OK, 1 rows affected localhost> insert into t4 values ('3', '3') Insert OK, 1 rows affected ocalhost> lua box.select_range(4, 0, 10) --- - '3': {'3'} - '0': {'0'} - '1': {'1'} - '2': {'2'} ... localhost> lua box.select_range(4, 1, 10) --- - '0': {'0'} - '1': {'1'} - '2': {'2'} - '3': {'3'} ... localhost> lua box.select_range(4, 1, 2) --- - '0': {'0'} - '1': {'1'} ... localhost> lua box.select_range(4, 1, 2, '1') --- - '1': {'1'} - '2': {'2'} ... box.select_reverse_range(space_no, index_no, limit, key, ...) Select a reverse range of tuples, starting from the offset specified by key. The key can be multipart. Limit selection with at most limit tuples. If no key is specified, start from the last key in the index. For TREE indexes, this returns tuples in sorted order. For other index types this call is not supported. If key is nil or unspecified, the selection starts from the end of the index. Example localhost> show configuration --- ... space[4].cardinality: "-1" space[4].estimated_rows: "0" space[4].index[0].type: "HASH" space[4].index[0].unique: "true" space[4].index[0].key_field[0].fieldno: "0" space[4].index[0].key_field[0].type: "STR" space[4].index[1].type: "TREE" space[4].index[1].unique: "false" space[4].index[1].key_field[0].fieldno: "1" space[4].index[1].key_field[0].type: "STR" ... localhost> insert into t4 values ('0', '0') Insert OK, 1 rows affected localhost> insert into t4 values ('1', '1') Insert OK, 1 rows affected localhost> insert into t4 values ('2', '2') Insert OK, 1 rows affected localhost> insert into t4 values ('3', '3') Insert OK, 1 rows affected localhost> lua box.select_reverse_range(4, 0, 10) --- error: 'Illegal parameters, hash iterator is forward only ... localhost> lua box.select_reverse_range(4, 1, 10) --- - '3': {'3'} - '2': {'2'} - '1': {'1'} - '0': {'0'} ... localhost> lua box.select_reverse_range(4, 1, 2) --- - '3': {'3'} - '2': {'2'} ... localhost> lua box.select_reverse_range(4, 1, 2, '1') --- - '1': {'1'} - '0': {'0'} ... box.pack(format, ...) To use Tarantool binary protocol primitives from Lua, it's necessary to convert Lua variables to binary format. This helper function is prototyped after Perl 'pack'. It takes a format and a list of arguments, and returns a binary string with all arguments packed according to the format. Format specifiers b — converts Lua variable to a 1-byte integer, and stores the integer in the resulting string s — converts Lua variable to a 2-byte integer, and stores the integer in the resulting string, low byte first, i — converts Lua variable to a 4-byte integer, and stores the integer in the resulting string, low byte first, l — converts Lua variable to a 8-byte integer, and stores the integer in the resulting string, low byte first, n — converts Lua variable to a 2-byte integer, and stores the integer in the resulting string, big endian, N — converts Lua variable to a 4-byte integer, and stores the integer in the resulting string, big endian, Q — converts Lua variable to a 8-byte integer, and stores the integer in the resulting string, big endian, f — converts Lua variable to a 4-byte float, and stores the float in the resulting string, d — converts Lua variable to a 8-byte double, and stores the double in the resulting string, w — converts Lua integer to a BER-encoded integer, p — stores the length of the argument as a BER-encoded integer followed by the argument itself (a little-endian 4-byte integer for integers, and a binary blob for other types), =, +, &, |, ^, : — stores the corresponding Tarantool UPDATE operation code: field assignment, addition, conjunction, disjunction, exclusive disjunction, splice (from Perl SPLICE function). Expects field number to update as an argument. These format specifiers only store the corresponding operation code and field number to update, but do not describe operation arguments. Errors Unknown format specifier. Example localhost> lua box.insert(0, 0, 'hello world') --- - 0: {'hello world'} ... localhost> lua box.update(0, 0, "=p", 1, 'bye world') --- - 0: {'bye world'} ... localhost> lua box.update(0, 0, ":p", 1, box.pack('ppp', 0, 3, 'hello')) --- - 0: {'hello world'} ... localhost> lua box.update(0, 0, "=p", 1, 4) --- - 0: {4} ... localhost> lua box.update(0, 0, "+p", 1, 4) --- - 0: {8} ... localhost> lua box.update(0, 0, "^p", 1, 4) --- - 0: {12} ... box.unpack(format, binary) Counterpart to box.pack(). Example localhost> lua tuple=box.replace(2, 0) --- ... localhost> lua string.len(tuple[0]) --- - 4 ... localhost> lua box.unpack('i', tuple[0]) --- - 0 ... localhost> lua box.unpack('bsil', box.pack('bsil', 255, 65535, 4294967295, tonumber64('18446744073709551615'))) --- - 255 - 65535 - 4294967295 - 18446744073709551615 ... localhost> lua num, str, num64 = box.unpack('ppp', box.pack('ppp', 666, 'string', tonumber64('666666666666666'))) --- ... localhost> lua print(box.unpack('i', num)); --- 666 ... localhost> lua print(str); --- string ... localhost> lua print(box.unpack('l', num64)) --- 666666666666666 ... localhost> lua box.unpack('=p', box.pack('=p', 1, '666')) --- - 1 - 666 box.print(...) Redefines Lua print() built-in to print either to the log file (when Lua is used from the binary port) or back to the user (for the administrative console). When printing to the log file, INFO log level is used. When printing to the administrative console, all output is sent directly to the socket. Note: the administrative console output must be YAML-compatible. box.dostring(s, ...) Evaluates an arbitrary chunk of Lua code passed in s. If there is a compilation error, it's raised as a Lua error. In case of compilation success, all arguments which follow s are passed to the compiled chunk and the chunk is invoked. This function is mainly useful to define and run an arbitrary piece of Lua code, without having to introduce changes to the global Lua environment. Example lua box.dostring('abc') --- error: '[string "abc"]:1: ''='' expected near ''<eof>''' ... lua box.dostring('return 1') --- - 1 ... lua box.dostring('return ...', 'hello', 'world') --- - hello - world ... lua box.dostring('local f = function(key) t=box.select(0, 0, key); if t ~= nil then return t[0] else return nil end end return f(...)', 0) --- - nil ... box.time() Returns current system time (in seconds) as a Lua number. The time is taken from the event loop clock, which makes this call very cheap, but still useful for constructing artificial tuple keys. box.time64() Returns current system time (in seconds) as a 64-bit integer. The time is taken from the event loop clock. box.uuid() Generate 128-bit (16 bytes) unique id. The id is returned in binary form. Requires libuuid library to be installed. The library is loaded at runtime, and if the library is not available, this function returns an error. box.uuid_hex() Generate hex-string of 128-bit (16 bytes) unique id. Return 32-byte string. Example lua box.uuid_hex() --- - a4f29fa0eb6d11e19f7737696d7fa8ff ... box.raise(errcode, errtext) Raises a client error. The difference between this function and the built-in error() function in Lua is that when the error reaches the client, its error code is preserved, whereas every Lua error is presented to the client as ER_PROC_LUA. This function makes it possible to emulate any kind of native exception, such as unique constraint violation, no such space/index, etc. A complete list of errors is present in errcode.h file in the source tree. Lua constants which correspond to Tarantool errors are defined in box.error module. The error message can be arbitrary. Throws client error. Lua procedure can emulate any request errors (for example: unique key exception). Example lua box.raise(box.error.ER_WAL_IO, 'Wal I/O error') --- error: 'Wal I/O error' ... box.auto_increment(space_no, ...) Insert values into space designated by space_no, using an auto-increment primary key. The space must have a NUM or NUM64 primary key index of type TREE. Example localhost> lua box.auto_increment(0, "I am a duplicate") --- - 1: {'I am a duplicate'} ... localhost> lua box.auto_increment(0, "I am a duplicate") --- - 2: {'I am a duplicate'} ... box.counter.inc(space_no, key) Increments a counter identified by the key. The key can be multipart, but there must be an index covering all fields of the key. If there is no tuple identified by the given key, creates a new one with initial counter value set to 1. Returns the new counter value. Example localhost> lua box.counter.inc(0, 'top.mail.ru') --- - 1 ... localhost> lua box.counter.inc(0, 'top.mail.ru') --- - 2 ... box.counter.dec(space_no, key) Decrements a counter identified by the given key. If the key is not found, is a no-op. When counter value drops to 0, the tuple is deleted. Example localhost> lua box.counter.dec(0, 'top.mail.ru') --- - 1 ... localhost> lua box.counter.dec(0, 'top.mail.ru') --- - 0 ...
    Package <code>box.tuple</code> This package provides read-only access for the box.tuple userdata type. It allows, for a single tuple: selective retrieval of the field contents, retrieval of information about size, iteration over all the fields, and conversion to a Lua table. box.tuple.new(...) Construct a new tuple from a Lua table or a scalar. Alternatively, one can get new tuples from tarantool's SQL-like statements: SELECT, INSERT, UPDATE, REPLACE, which can be regarded as statements that do new() implicitly. In the following example, x and t will be new tuple objects. Saying lua t returns the entire tuple t. Example localhost>localhost> lua x=box.insert(0,'a',tonumber('1'),tonumber64('2')):totable() --- ... localhost> lua t=box.tuple.new({'abc','def','ghi','abc'}) --- ... localhost> lua t --- - 'abc': {'def', 'ghi', 'abc'} ... # The # operand in Lua means "return count of components". So, if t is a tuple instance, #t will return the number of fields. In the following example, a tuple named t is created and then the number of fields in t is returned. Example localhost> lua t=box.tuple.new({'Field#1','Field#2','Field#3','Field#4'}) --- ... localhost> lua #t --- - 4 ... bsize() If t is a tuple instance, t:bsize() will return the number of bytes in the tuple. It is useful to check this number when making changes to data, because there is a fixed maximum: one megabyte. Every field has one or more "length" bytes preceding the actual contents, so bsize() returns a value which is slightly greater than the sum of the lengths of the contents. In the following example, a tuple named t is created which has three fields, and for each field it takes one byte to store the length and three bytes to store the contents, so bsize() returns 3*(1+3). Example localhost> lua t=box.tuple.new({'aaa','bbb','ccc'}) --- ... localhost> lua t:bsize() --- - 12 ... [ ] If t is a tuple instance, t[n] will return the nth field in the tuple. The first field is t[0]. In the following example, a tuple named t is created and then the second field in t is returned. Example localhost> lua t=box.tuple.new({'Field#1','Field#2','Field#3','Field#4'}) --- ... localhost> lua t[1] --- - Field#2 ... find() or findall() If t is a tuple instance, t:find(search-value) will return the number of the first field in t that matches search-value, and t:findall(search-value) will return numbers of all fields in t that match search-value. Optionally one can put a numeric argument n before the search-value to indicate start searching at field number n. In the following example, a tuple named t is created and then: the number of the first field in t which matches 'a' is returned, then the numbers of all the fields in t which match 'a' are returned, then the numbers of all the fields in t which match 'a' and are at or after the second field are returned. Example localhost> lua t=box.tuple.new({'a','b','c','a'}) --- ... localhost> lua t:find('a') --- - 0 ... localhost> lua t:findall('a') --- - 0 - 3 ... localhost> lua t:findall(1,'a') --- - 3 ... transform() If t is a tuple instance, t:transform(n1,n2) will return a tuple where, starting from field n1, a number of fields (n2) are removed. Optionally one can add more arguments after n2 to indicate new values that will replace what was removed. In the following example, a tuple named t is created and then, starting from the second field, two fields are removed but one new one is added, then the result is returned. Example localhost> lua t=box.tuple.new({'Field#1','Field#2','Field#3','Field#4','Field#5'}) --- ... localhost> lua t:transform(1,2,'x') --- - 'Field#1': {'x', 'Field#4', 'Field#5'} ... slice() If t is a tuple instance, t:slice(n) will return all fields starting with field number n, and t:slice(n1,n2) will return a tuple containing fields starting with field number n1, but stopping before field number n2. In the following example, a tuple named t is created and then, starting from the second field, fields before the fourth field are selected, then the result is returned. Example localhost> lua t=box.tuple.new({'Field#1','Field#2','Field#3','Field#4','Field#5'}) --- ... localhost> lua t:slice(1,3) --- - Field#2 - Field#3 ... unpack() If t is a tuple instance, t:unpack(n) will return all fields. In effect, unpack() is the same as slice(0,-1). In the following example, a tuple named t is created and then all its fields are selected, then the result is returned. Example localhost> lua t=box.tuple.new({'Field#1','Field#2','Field#3','Field#4','Field#5'}) --- ... localhost> lua t:unpack() --- - Field#1 - Field#2 - Field#3 - Field#4 - Field#5 ... pairs() In Lua, pairs() is a method which returns: function, value, nil. It is useful for Lua iterators, because Lua iterators traverse a value's components until an end marker is reached. In the following example, a tuple named t is created and then all its fields are selected using a Lua for-end loop. Example localhost> lua t=box.tuple.new({'Field#1','Field#2','Field#3','Field#4','Field#5'}) --- ... localhost> lua for k,v in t:pairs() do print(v) end --- Field#1 Field#2 Field#3 Field#4 Field#5 ...
    Package <code>box.cjson</code> This package provides JSON manipulation routines. It's based on the Lua-CJSON package by Mark Pulford. For a complete manual on Lua-CJSON please read the official documentation. box.cjson.encode(object) Convert a Lua object to a JSON string. box.cjson.decode(string) Convert a JSON string to a Lua object. Example lua box.cjson.encode(123) --- - 123 ... lua box.cjson.encode({123}) --- - [123] ... lua box.cjson.encode({123, 234, 345}) --- - [123,234,345] ... lua box.cjson.encode({abc = 234, cde = 345}) --- - {"cde":345,"abc":234} ... lua box.cjson.encode({hello = { 'world' } }) --- - {"hello":["world"]} ... lua box.cjson.decode('123') --- - 123 ... lua box.cjson.decode('[123, "hello"]')[2] --- - hello ... lua box.cjson.decode('{"hello": "world"}').hello --- - world ...
    Package <code>box.space</code> This package is a container for all configured spaces. A space object provides access to space attributes, such as id, whether or not a space is enabled, space cardinality, and estimated number of rows. It also contains object-oriented versions of box functions. For example, instead of box.insert(0, ...) one can write box.space[0]:insert(...). Package source code is available in file src/box/lua/box.lua A list of all space members follows. space.n Ordinal space number, box.space[i].n == i space.enabled Whether or not this space is enabled in the configuration file. space.cardinality A limit on tuple field count for tuples in this space. This limit can be set in the configuration file. Value 0 stands for unlimited. space.index[] A container for all defined indexes. An index is a Lua object of type box.index with methods to search tuples and iterate over them in predefined order. space:select(index_no, ...) space:select_range(index_no, limit, key) Select a range of tuples, starting from the offset specified by key. The key can be multipart. Limit selection with at most limit tuples. If no key is specified, start from the first key in the index. For TREE indexes, this returns tuples in sorted order. For other indexes, the order of tuples is unspecified, and can change significantly if data is inserted or deleted between two calls to select_range(). If key is nil or unspecified, the selection starts from the start of the index. space:select_reverse_range(limit, key) Select a reverse range of tuples, limited by limit, starting from key. The key can be multipart. For TREE indexes, this returns tuples in descending order. For other index types this call is not supported. space:insert(...) space:replace(...) space:delete(key) space:update(key, format, ...) space:insert(...) Object-oriented forms of respective box methods. space:len() Returns number of tuples in the space. space:truncate() Deletes all tuples. space:pairs() A helper function to iterate over all space tuples, Lua style. Example localhost> lua for k,v in box.space[0]:pairs() do print(v) end --- 1: {'hello'} 2: {'my '} 3: {'Lua '} 4: {'world'} ...
    Package <code >box.index</code> This package implements methods of type box.index. Indexes are contained in box.space[i].index[] array within each space object. They provide an API for ordered iteration over tuples. This API is a direct binding to corresponding methods of index objects in the storage engine. index.unique Boolean, true if the index is unique. index.type A string for index type, either 'TREE', 'HASH', or 'BITSET'. index.key_field[] An array describing index key fields. index.idx The underlying userdata which does all the magic. index:iterator(type, ...) This method provides iteration support within an index. Parameter type is used to identify the semantics of iteration. Different index types support different iterators. The remaining arguments of the function are varying and depend on the iteration type. For example, a TREE index maintains a strict order of keys and can return all tuples in ascending or descending order, starting from the specified key. Other index types, however, do not support ordering. To understand consistency of tuples returned by an iterator, it's essential to know the principles of the Tarantool transaction processing subsystem. An iterator in Tarantool does not own a consistent read view. Instead, each procedure is granted exclusive access to all tuples and spaces until it encounters a "context switch": by causing a write to disk, network, or by an explicit call to box.fiber.yield(). When the execution flow returns to the yielded procedure, the data set could have changed significantly. Iteration, resumed after a yield point, does not preserve the read view, but continues with the new content of the database. Parameters type — iteration strategy as defined in tables below. Returns This method returns an iterator closure, i.e. a function which can be used to get the next value on each invocation. Errors Selected iteration type is not supported in the subject index type or supplied parameters do not match iteration type. Examples localhost> show configuration --- ... space[0].enabled: "true" space[0].index[0].type: "HASH" space[0].index[0].unique: "true" space[0].index[0].key_field[0].fieldno: "0" space[0].index[0].key_field[0].type: "NUM" space[0].index[1].type: "TREE" space[0].index[1].unique: "false" space[0].index[1].key_field[0].fieldno: "1" space[0].index[1].key_field[0].type: "NUM" space[0].index[1].key_field[1].fieldno: "2" space[0].index[1].key_field[1].type: "NUM" ... localhost> INSERT INTO t0 VALUES (1, 1, 0) Insert OK, 1 rows affected localhost> INSERT INTO t0 VALUES (2, 1, 1) Insert OK, 1 rows affected localhost> INSERT INTO t0 VALUES (3, 1, 2) Insert OK, 1 rows affected localhost> INSERT INTO t0 VALUES (4, 2, 0) Insert OK, 1 rows affected localhost> INSERT INTO t0 VALUES (5, 2, 1) Insert OK, 1 rows affected localhost> INSERT INTO t0 VALUES (6, 2, 2) Insert OK, 1 rows affected localhost> lua it = box.space[0].index[1]:iterator(box.index.EQ, 1); print(it(), " ", it(), " ", it()); --- 1: {1, 0} 2: {1, 1} 3: {1, 2} ... localhost> lua it = box.space[0].index[1]:iterator(box.index.EQ, 1, 2); print(it(), " ", it(), " ", it()); --- 3: {1, 2} nil nil ... localhost> lua i = box.space[0].index[1]:iterator(box.index.GE, 2, 1); print(it(), " ", it(), " ", it()); --- 5: {2, 1} 6: {2, 2} nil ... localhost> lua for v in box.space[0].index[1]:iterator(box.index.ALL) do print(v) end --- 1: {1, 0} 2: {1, 1} 3: {1, 2} 4: {2, 0} 5: {2, 1} 6: {2, 2} ... localhost> lua i = box.space[0].index[0]:iterator(box.index.LT, 1); --- error: 'Iterator type is not supported' index:min() The smallest value in the index. Available only for indexes of type 'TREE'. index:max() The biggest value in the index. Available only for indexes of type 'TREE'. index:random(randint) Return a random value from an index. A random non-negative integer must be supplied as input, and a value is selected accordingly in index-specific fashion. This method is useful when it's important to get insight into data distribution in an index without having to iterate over the entire data set. index:count() Iterate over an index, counting the number of tuples which equal the provided search criteria. The argument can either point to a tuple, a key, or one or more key parts. Returns the number of matched tuples.
    Package <code>box.fiber</code> Functions in this package allow you to create, run and manage existing fibers. A fiber is an independent execution thread implemented using a mechanism of cooperative multitasking. A fiber has three possible states: running, suspended or dead. When a fiber is created with box.fiber.create(), it is suspended. When a fiber is started with box.fiber.resume(), it is running. When a fiber's control is yielded back to the caller with box.fiber.yield(), it is suspended. When a fiber ends (due to return or by reaching the end of the fiber function), it is dead. A fiber can also be attached or detached. An attached fiber is a child of the creator, and is running only if the creator has called box.fiber.resume(). A detached fiber is a child of Tarantool internal sched fiber, and gets scheduled only if there is a libev event associated with it. To detach, a running fiber must invoke box.fiber.detach(). A detached fiber loses connection with its parent forever. All fibers are part of the fiber registry, box.fiber. This registry can be searched (box.fiber.find()) either by fiber id (fid), which is numeric, or by fiber name, which is a string. If there is more than one fiber with the given name, the first fiber that matches is returned. Once fiber function is done or calls return, the fiber is considered dead. Its carcass is put into a fiber pool, and can be reused when another fiber is created. A runaway fiber can be stopped with box.fiber.cancel(). However, box.fiber.cancel() is advisory — it works only if the runaway fiber calls box.fiber.testcancel() once in a while. Most box.* hooks, such as box.delete() or box.update(), do call box.fiber.testcancel(). box.select() doesn't. In practice, a runaway fiber can only become unresponsive if it does a lot of computations and doesn't check whether it's been canceled. The other potential problem comes from detached fibers which never get scheduled, because they are not subscribed to any events, or because no relevant events occur. Such morphing fibers can be killed with box.fiber.cancel() at any time, since box.fiber.cancel() sends an asynchronous wakeup event to the fiber, and box.fiber.testcancel() is checked whenever such an event occurs. Like all Lua objects, dead fibers are garbage collected: the garbage collector frees pool allocator memory owned by the fiber, resets all fiber data, and returns the fiber to the fiber pool. box.fiber.id(fiber) Return a numeric id of the fiber. box.fiber.self() Return box.fiber userdata object for the currently scheduled fiber. box.fiber.find(id) Locate a fiber userdata object by id. box.fiber.create(function) Create a fiber for a function. Errors Can hit a recursion limit. box.fiber.resume(fiber, ...) Resume a created or suspended fiber. box.fiber.yield(...) Yield control to the calling fiber, if the fiber is attached, or to sched otherwise. If the fiber is attached, whatever arguments are passed to this call, are passed on to the calling fiber. If the fiber is detached, box.fiber.yield() returns back everything passed into it after temporarily yielding control back to the scheduler. box.fiber.detach() Detach the current fiber. This is a cancellation point. This is a yield point. box.fiber.wrap(function, ...) This is a quick way to create and start a detached fiber. The fiber function is passed in the first argument, the function arguments follow. The fiber is created, detached, and resumed immediately. box.fiber.sleep(time) Yield to the sched fiber and sleep time seconds. Only the current fiber can be made to sleep. box.fiber.status(fiber) Returns the status of the fiber. If no argument is provided, the current fiber's status is returned. The status can be either dead, suspended, attached or running. box.fiber.cancel(fiber) Cancel a fiber. Running and suspended fibers can be canceled. Returns an error if the subject fiber does not permit cancel. box.fiber.testcancel() Check if the current fiber has been canceled and throw an exception if this is the case.
    Package <code>box.session</code> Learn session state, set on-connect and on-disconnect triggers. A session is an object associated with each client connection. Through this module, it's possible to query session state, as well as set a Lua chunk executed on a connect or disconnect event. box.session.id() Return a unique monotonic identifier of the current session. The identifier can be used to check whether or not a session is alive. 0 means there is no session (e.g. a procedure is running in a detached fiber). box.session.fd(id) Return an integer file descriptor associated with the connected client. box.session.exists(id) Return true if a session is alive, false otherwise. box.session.peer(id) Return the host address and port for the session peer, for example "127.0.0.1:55457", or "0.0.0.0:0" if the session is not connected. This module also makes it possible to define triggers on connect and disconnect events. Please see the triggers chapter for details.
    Package <code>box.ipc</code> — inter procedure communication box.ipc.channel(capacity) Create a new communication channel with predefined capacity. The channel can be used to synchronously exchange messages between stored procedures. The channel is garbage collected when no one is using it, just like any other Lua object. Channels can be worked with using functional or object-oriented syntax. For example, the following two lines are equivalent: channel:put(message) box.ipc.channel.put(channel, message) box.ipc.channel.put(channel, message, timeout) Send a message using a channel. If the channel is full, box.ipc.channel.put() blocks until there is a free slot in the channel. If timeout is provided, and the channel doesn't become empty for the duration of the timeout, box.ipc.channel.put() returns false. Otherwise it returns true. box.ipc.channel.get(channel, timeout) Fetch a message from a channel. If the channel is empty, box.ipc.channel.get() blocks until there is a message. If timeout is provided, and there are no new messages for the duration of the timeout, box.ipc.channel.get() returns error. box.ipc.channel.broadcast(channel, message, timeout) If the channel is empty, is equivalent to box.ipc.channel.put(). Otherwise sends the message to all readers of the channel. box.ipc.channel.is_empty(channel) Check if the channel is empty (has no messages). box.ipc.channel.is_full(channel) Check if the channel is full (has no room for a new message). box.ipc.channel.has_readers(channel) Check if the channel is empty and has readers waiting for a message. box.ipc.channel.has_writers(channel) Check if the channel is full and has writers waiting for empty room. Example local channel = box.ipc.channel(10) function consumer_fiber() while true do local task = channel:get() ... end end function consumer2_fiber() while true do local task = channel:get(10) -- 10 seconds if task ~= nil then ... else print("timeout!") end end end function producer_fiber() while true do task = box.select(...) ... if channel:is_empty() then # channel is empty end if channel:is_full() then # channel is full end ... if channel:has_readers() then # there are some fibers that wait data end ... if channel:has_writers() then # there are some fibers that wait readers end channel:put(task) end end function producer2_fiber() while true do task = box.select(...) if channel:put(task, 10) then -- 10 seconds ... else print("timeout!") end end end
    Package <code>box.socket</code> — TCP and UDP sockets BSD sockets is a mechanism to exchange data with a local or remote host in connection-oriented (TCP) or datagram-oriented (UDP) mode. Semantics of the calls in the box.socket API closely follow semantics of the corresponding POSIX calls. Function names and signatures are mostly compatible with luasocket. Similarly to luasocket, box.socket doesn't throw exceptions on errors. On success, most calls return a socket object. On error, a multiple return of nil, status, errno, errstr is produced. Status can be one of "error", "timeout", "eof" or "limit". On success, status is always nil. A call which returns data (recv(), recvfrom(), readline()) on success returns a Lua string of the requested size and nil status. On error or timeout, an empty string is followed by the corresponding status, error number and message. A call which sends data (send(), sendto()) on success returns the number of bytes sent, and the status is, again, nil. On error or timeout 0 is returned, followed by status, error number and message. The last error can be retrieved from the socket using socket:error(). Any call except error() clears the last error first (but may set a new one). Calls which require a socket address and in POSIX expect struct sockaddr_in, in box.socket simply accept host name and port as additional arguments. Name resolution is done automatically. If it fails, status is set to "error", errno is set to -1 and error string is set to "Host name resolution failed". All calls that can take time block the calling fiber and can get it preempted. The implementation, however, uses non-blocking cooperative I/O, so Tarantool continues processing queries while a call is blocked. A timeout can be provided for any socket call which can take a long time. As with all other box libraries, the API can be used in procedural style (e.g. box.socket.close(socket)) as well as in object-oriented style (socket:close()). A closed socket should not be used any more. Alternatively, the socket will be closed when its userdata is garbage collected by Lua. box.socket.tcp() Create a new TCP socket. Returns A new socket or nil. box.socket.udp() Create a new UDP socket. Returns A new socket or nil. socket:connect(host, port, [timeout]) Connect a socket to a remote host. Can be used with IPv6 and IPv4 addresses, as well as domain names. If multiple addresses correspond to a domain, tries them all until successfully connected. Returns Returns a connected socket on success, nil, status, errno, errstr on error or timeout. socket:send(data, [timeout]) Send data over a connected socket. Returns The number of bytes sent. On success, this is exactly the length of data. In case of error or timeout, returns the number of bytes sent before error, followed by status, errno, errstr. socket:recv(size, [timeout]) Read size bytes from a connected socket. An internal read-ahead buffer is used to reduce the cost of this call. Returns A string of the requested length on success. On error or timeout, returns an empty string, followed by status, errno, errstr. If there was some data read before a timeout occurred, it will be available on the next call. In case the writing side has closed its end, returns the remainder read from the socket (possibly an empty string), followed by "eof" status. socket:readline([limit], [separator list], [timeout]) Read a line from a connected socket. socket:readline() with no arguments reads data from a socket until '\n' or eof. If a limit is set, the call reads data until a separator is found, or the limit is reached. By default, there is no limit. Instead of the default separator, a Lua table can be used with one or multiple separators. Then the data is read until the first matching separator is found. Returns A Lua string with data in case of success or an empty string in case of error. When multiple separators were provided in a separator table, the matched separator is returned as the third argument. <code>readline()</code> returns data, nil, separatorsuccess "", "timeout", ETIMEDOUT, errstrtimeout "", "error", errno, errstrerror data, "limit"limit data, "eof"eof
    socket:bind(host, port[, timeout]) Bind a socket to the given host/port. A UDP socket after binding can be used to receive data (see recvfrom()). A TCP socket can be used to accept new connections, after it's been put in listen mode. The timeout is used for name resolution only. If host name is an IP address, the call never yields and the timeout is unused. Returns Socket object on success, nil, status, errno, errstr on error. socket:listen() Start listening for incoming connections. The listen backlog, on Linux, is taken from /proc/sys/net/core/somaxconn, whereas on BSD it is set to SOMAXCONN. Returns Socket on success, nil, "error", errno, errstr on error. socket:accept([timeout]) Wait for a new client connection and create a connected socket. Returns peer_socket, nil, peer_host, peer_port on success. nil, status, errno, errstr on error. socket:sendto(data, host, port, [timeout]) Send a message on a UDP socket to a specified host. Returns The number of bytes sent on success, 0, status, errno, errstr on error or timeout. socket:recvfrom(limit[, timeout]) Receive a message on a UDP socket. Returns Message, nil, client address, client port on success, "", status, errno, errstr on error or timeout. socket:shutdown(how) Shutdown a reading, writing or both ends of a socket. Accepts box.socket.SHUT_RD, box.socket.SHUT_WR and box.socket.SHUT_RDWR. Returns Socket on success, nil, "error", errno, errstr on error. socket:close() Close (destroy) a socket. A closed socket should not be used any more. socket:error() Retrieve the last error that occurred on a socket. Returns errno, errstr. 0, "Success" if there is no error.
    Package <code>box.net.box</code> — working with networked Tarantool peers Library box.net contains connectors to remote database systems, such as MariaDB or PostgreSQL. The first supported system is Tarantool itself. The basic object provided by box.net.box library is a connection. A connection is created by calling box.net.box.new(). To execute remote requests, simply invoke methods of the connection object, a physical connection is established upon request and is re-established if necessary. When done, issue conn:close(). Connection objects are garbage collected just like any other objects in Lua, so an explicit destruction is not mandatory. However, since close() is a system call, it is a good programming practice to close a connection explicitly when it is no longer needed, to avoid lengthy stalls of the garbage collector. The library also provides a pre-created connection object to the local server, box.net.self. This connection is always established. The purpose of this object is to make polymorphic use of the box.net.box API easier. There is an important difference, however, between the embedded connection and a remote one. With the embedded connection, requests which do not modify data do not yield. When using a remote connection, it is important to keep in mind that any request can yield, and local database state may have changed by the time it returns. All box.net.box methods are fiber-safe. It's safe to share and use the same connection object across multiple concurrent fibers. In fact, it's perhaps the best programming practice with Tarantool: when multiple fibers use the same connection, all requests are pipelined through the same network socket, but each fiber gets a correct response back. Reducing the number of active sockets lowers the overhead of system calls and increases the overall server performance. There are, however cases, when a single connection is not enough: when it's necessary to prioritize requests, use different authentication ids, etc. All remote calls support execution timeouts. A specialized wrapper, box.net.box.timeout() allows setting a timeout. Using a wrapper object makes the remote connection API compatible with the local one, removing the need for a separate timeout argument, ignored by the local version. Once sent, a request can not be revoked from the remote server even if a timeout expires: the expired timeout only aborts the wait for the remote server response. box.net.box.timeout(), Object-oriented and functional APIs are equivalent: conn:close() is identical to box.net.box.close(conn). conn = box.net.box.new(host, port [, reconnect_interval]) Create a new connection. The connection is established on demand, at the time of the first request. It is re-established automatically after a disconnect. The argument reconnect_interval (in seconds) is responsible for the amount of time the server sleeps between failing attempts to reconnect. The returned object supports methods for making remote calls, such as select, update or delete. conn:ping() Execute a PING command. Returns true on success, false on error. conn:close() Close a connection. The connection is also closed when it's garbage collected. It's still recommended to close connections explicitly, to spare the garbage collector from heavy work such as closing the socket. conn:select(space_no, index_no, ...) See box.select(...). Please note, that unlike a local box.select() any call to a remote server yields, thus local data may change while remote select() is running. conn:select_limit(space_no, index_no, offset, limit, ...) See box.select_limit(...) conn:select_range(space_no, index_no, limit, key, ...) See box.select_range(...). conn:insert(space_no, ...) See box.insert(...). conn:replace(space_no, ...) See box.replace(...). conn:update(...) See box.update(...). conn:delete(space_no, key) See box.delete(...). conn:call(proc_name, ...) Call a remote stored procedure, such as box.select_reverse_range(). Please keep in mind that the call is using the binary protocol to pack procedure arguments, and since the latter is type-agnostic it's recommended to pass all arguments of remote stored procedure as strings, for example: conn:call("box.select_reverse_range", "1", "4", "10", "Smith") conn:timeout(timeout) Returns a closure which is identical to the invoked function, except for the added timeout functionality. -- wait for 'update' until it is finished local tuple = conn:update('1', 'key', ...) -- send update but don't bother to wait for results local other = conn:timeout(0):update('1', 'arg1', ...) Example -- connect to the local server local self = box.net.box.new('127.0.0.1', box.info.primary_port) self:insert("1", "Hello", "World")
    Packages <code>box.cfg</code>, <code>box.info</code>, <code>box.slab</code> and <code>box.stat</code>: server introspection Package <code xml:id="box.cfg">box.cfg</code> This package provides read-only access to all server configuration parameters. box.cfg Example localhost> lua for k, v in pairs(box.cfg) do print(k, " = ", v) end --- io_collect_interval = 0 pid_file = box.pid panic_on_wal_error = false slab_alloc_factor = 2 slab_alloc_minimal = 64 admin_port = 33015 logger = cat - >> tarantool.log ... Package <code>box.info</code> This package provides access to information about server variables: pid, uptime, version and such. Its contents are identical to the output from . box.info() Since box.info contents are dynamic, it's not possible to iterate over keys with the Lua pairs() function. For this purpose, box.info() builds and returns a Lua table with all keys and values provided in the package. Example localhost> lua for k,v in pairs(box.info()) do print(k, ": ", v) end --- version: 1.4.7-92-g4ba95ca status: primary pid: 1747 lsn: 1712 recovery_last_update: 1306964594.980 recovery_lag: 0.000 uptime: 39 build: table: 0x419cb880 logger_pid: 1748 config: /home/unera/work/tarantool/test/box/tarantool_good.cfg ... box.info.status, box.info.pid, box.info.lsn, ... Example localhost> lua box.info.pid --- - 1747 ... localhost> lua box.info.logger_pid --- - 1748 ... localhost> lua box.info.version --- - 1.4.7-92-g4ba95ca ... localhost> lua box.info.config --- - /home/unera/work/tarantool/test/box/tarantool_good.cfg ... localhost> lua box.info.uptime --- - 3672 ... localhost> lua box.info.lsn --- - 1712 ... localhost> lua box.info.status --- - primary ... localhost> lua box.info.recovery_lag --- - 0.000 ... localhost> lua box.info.recovery_last_update --- - 1306964594.980 ... localhost> lua box.info.snapshot_pid --- - 0 ... localhost> lua for k, v in pairs(box.info.build) do print(k .. ': ', v) end --- flags: -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCORO_ASM -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -fgnu89-inline -pthread -Wno-sign-compare -Wno-strict-aliasing -std=gnu99 -Wall -Wextra -Werror target: Linux-x86_64-Debug compiler: /usr/bin/gcc options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_STATIC=OFF -DENABLE_GCOV=OFF -DENABLE_TRACE=ON -DENABLE_BACKTRACE=ON -DENABLE_CLIENT=OFF ... Package <code>box.slab</code> This package provides access to slab allocator statistics. box.slab Example localhost> lua box.slab.arena_used --- - 4194304 ... localhost> lua box.slab.arena_size --- - 104857600 ... localhost> lua for k, v in pairs(box.slab.slabs) do print(k) end --- 64 128 ... localhost> lua for k, v in pairs(box.slab.slabs[64]) do print(k, ':', v) end --- items:1 bytes_used:160 item_size:64 slabs:1 bytes_free:4194144 ... Package <code xml:id="box.stat">box.stat</code> This package provides access to request statistics. box.stat Example localhost> lua box.stat -- a virtual table --- - table: 0x41a07a08 ... localhost> lua box.stat() -- a full table (the same) --- - table: 0x41a0ebb0 ... localhost> lua for k, v in pairs(box.stat()) do print(k) end --- DELETE SELECT REPLACE CALL UPDATE DELETE_1_3 ... localhost> lua for k, v in pairs(box.stat().DELETE) do print(k, ': ', v) end --- total: 23210 rps: 22 ... localhost> lua for k, v in pairs(box.stat.DELETE) do print(k, ': ', v) end -- the same --- total: 23210 rps: 22 ... localhost> lua for k, v in pairs(box.stat.SELECT) do print(k, ': ', v) end --- total: 34553330 rps: 23 ... localhost> Additional examples can be found in the open source Lua stored procedures repository and in the server test suite.
    Limitations of stored procedures There are two limitations in stored procedures support one should be aware of: execution atomicity and lack of typing. Cooperative multitasking environment Tarantool core is built around a cooperative multi-tasking paradigm: unless a running fiber deliberately yields control to some other fiber, it is not preempted. Yield points are built into all calls from Tarantool core to the operating system. Any system call which can block is performed in a asynchronous manner and the fiber waiting on the system call is preempted with a fiber ready to run. This model makes all programmatic locks unnecessary: cooperative multitasking ensures that there is no concurrency around a resource, no race conditions and no memory consistency issues. When requests are small, e.g. simple UPDATE, INSERT, DELETE, SELECT, fiber scheduling is fair: it takes only a little time to process the request, schedule a disk write, and yield to a fiber serving the next client. A stored procedure, however, can perform complex computations, or be written in such a way that control is not given away for a long time. This can lead to unfair scheduling, when a single client throttles the rest of the system, or to apparent stalls in request processing. Avoiding this situation is the responsibility of the stored procedure author. Most of the box calls, such as box.insert(), box.update(), box.delete() are yield points; box.select() and box.select_range(), however, are not. It should also be noted that, in absence of transactions, any yield in a stored procedure is a potential change in the database state. Effectively, it's only possible to have CAS (compare-and-swap) -like atomic stored procedures: i.e. procedures which select and then modify a record. Multiple data change requests always run through a built-in yield point. Lack of field types When invoking a stored procedure from the binary protocol, it's not possible to convey types of arguments. Tuples are type-agnostic. The conventional workaround is to use strings to pass all (textual and numeric) data.
    tarantool-1.5.1.218.g1a69fd6/doc/user/errcode.xml0000664000000000000000000000631012242653271017654 0ustar rootroot List of error codes In the current version of the binary protocol, error message, which is normally more descriptive than error code, is not present in server response. The actual message may contain a file name, a detailed reason or an operating system error code. All such messages, however, are logged in the error log. When using Memcached protocol, the error message is sent to the client along with the code. Below follow only general descriptions of some popular codes. A complete list of errors can be found in file errcode.h in the source tree. List of error codes ER_NONMASTER Attempt to execute an update on a running replica. ER_ILLEGAL_PARAMS Illegal parameters. Malformed protocol message. ER_MEMORY_ISSUE Out of memory: limit is reached. ER_WAL_IO Failed to record the change in the write ahead log. Some sort of disk error. ER_KEY_PART_COUNT Key part count is greater than index part count ER_NO_SUCH_SPACE Attempt to access a space that is not configured (doesn't exist). ER_NO_SUCH_INDEX No index with the given id exists. ER_PROC_LUA An error inside Lua procedure. ER_FIBER_STACK Recursion limit reached when creating a new fiber. This is usually an indicator of a bug in a stored procedure, recursively invoking itself ad infinitum. ER_UPDATE_FIELD A error occured during update of a field. tarantool-1.5.1.218.g1a69fd6/doc/user/space.xml0000664000000000000000000000546712242653271017340 0ustar rootroot Space settings explained Space is a composite parameter, that is, it has properties. /* * Each tuple consists of fields. Three field types are * supported. */ enum { STR, NUM, NUM64 } field_type; /* * Tarantool is interested in field types only inasmuch as * it needs to build indexes on fields. An index * can cover one or more fields. */ struct index_field_t { unsigned int fieldno; enum field_type type; }; /* * HASH and TREE and BITSET index types are supported. */ enum { HASH, TREE, BITSET } index_type; struct index_t { index_field_t key_field[]; enum index_type type; /* Secondary index may be non-unique */ bool unique; }; struct space_t { /* A space can be quickly disabled and re-enabled at run time. */ bool enabled; /* * If cardinality is given, each tuple in the space must have exactly * this many fields. */ unsigned int cardinality; /* estimated_rows is only used for HASH indexes, to preallocate memory. */ unsigned int estimated_rows; struct index_t index[]; }; The way a space is defined in a configuration file is similar to how one would initialize a C structure in a program. For example, a minimal storage configuration looks like the following: space[0].enabled = 1 space[0].index[0].type = HASH space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = NUM64 The parameters listed above are mandatory. Other space properties are set in the same way. An alternative syntax, mainly useful when defining large spaces, exists: space[0] = { enabled = 1, index = [ { type = HASH, key_field = [ { fieldno = 0, type = NUM64 } ] } ] } When defining a space, please be aware of these restrictions: at least one space must be configured, each configured space needs at least one unique index, "unique" property doesn't have a default, and must be set explicitly, space configuration can not be changed dynamically, currently you need to restart the server even to disable or enable a space, HASH indexes can not be non-unique. tarantool-1.5.1.218.g1a69fd6/doc/user/server-administration.xml0000664000000000000000000002232512242653271022566 0ustar rootroot %tnt; ]> Server administration Typical server administration tasks include starting and stopping the server, reloading configuration, taking snapshots, log rotation.
    Server signal handling The server is configured to gracefully shutdown on SIGTERM and SIGINT (keyboard interrupt) or SIGHUP. SIGUSR1 can be used to save a snapshot. All other signals are blocked or ignored. The signals are processed in the main event loop. Thus, if the control flow never reaches the event loop (thanks to a runaway stored procedure), the server stops responding to any signal, and can be only killed with SIGKILL (this signal can not be ignored).
    Utility <code>tarantar</code> The tarantar utility program will create new snapshots by reading existing snapshots and write-ahead-log (xlog) files. Thus it differs from , which creates new snapshots from the database. Since tarantar uses less memory than SAVE SNAPSHOT, it is especially appropriate for taking periodic snapshots as a background task. To prepare: ensure that the configuration file contains and clauses. Tarantar does not assume that wal_dir and snap_dir have default values. To run: tarantar [options] configuration-file where possible options are: -i seconds-count or --interval seconds-count — repeat every seconds-count seconds. example: -i 3600 -n lsn-number or --lsn lsn-number — start from lsn = lsn-number. if not specified, lsn = latest. example: -n 5 -l bytes-count or --limit bytes-count — do not use more than bytes-count bytes of memory. example: -l 5000000 --help — display a help message and exit. example: --help -v or --version — display version and exit. example: -v Example: $ ~/tarantool/client/tarantar/tarantar -c -i 30 ./tarantool.cfg snap_dir: /home/user/tarantool_test/work_dir wal_dir: /home/user/tarantool_test/work_dir spaces: 1 interval: 30 memory_limit: 0M START SNAPSHOTTING Fri Oct 25 09:35:25 2013 last snapshot lsn: 7 (snapshot) 00000000000000000007.snap 0.000M processed ( >> ) 00000000000000000006.snap 0.000M processed START SNAPSHOTTING Fri Oct 25 09:35:55 2013 last snapshot lsn: 7 (snapshot) 00000000000000000007.snap 0.000M processed ( >> ) 00000000000000000006.snap 0.000M processed snapshot exists, skip. ... For an explanation of tarantar's design see the Tarantool wiki.
    Utility <code>tarancheck</code> The tarancheck utility program will generate and verify signature files. A signature file contains, along with basic information that identifies the database, checksums calculated for each index in each space of the database, based on the latest snapshot and all subsequent entries in the write-ahead log. Signature files are useful for ensuring that databases have been saved without error, and for quick comparisons to see whether a database's components have been modified. The main reason that tarancheck was created was so that users would be able to compare the consistency of two running servers, the master and the replica. By creating a signature file on the master using the master directory, and then copying the signature file to the replica, one will be able to confirm that the replica is not corrupt. There is one necessary warning. Since either the master or the replica is likely to be active when tarancheck runs, the check can only be applicable for the database as of the last transaction that was run on both the master and the replica. That is why tarancheck displays last_xlog_lsn, which is the log sequence number of the write-ahead log, when it finishes. To prepare: ensure that the configuration file contains and clauses. Tarancheck does not assume that wal_dir and snap_dir have default values. To run: tarancheck [options] configuration-file where possible options are: -G signature file or --generate signature-file — generate signature file. example: -G x.crc -V signature file or --verify signature-file — verify signature file. example: --verify x.crc --help — display a help message and exit. example: --help -v or --version — display version and exit. example: -v Example: $ ~/tarantool/client/tarantar/tarancheck --generate=x.crc tarantool.cfg >>> Signature file generation configured spaces: 1 snap_dir: ./work_dir wal_dir: ./work_dir last snapshot lsn: 1 last xlog lsn: 0 (snapshot) 00000000000000000001.snap (signature) saving x.crc
    Utility <code>tarantool_deploy</code> With tarantool_deploy one can set up so that, during system boot, one or more instances of the tarantool_box server will start. This utility is for use on Red Hat or CentOS where Tarantool was installed using rpm --install. Technically, tarantool_deploy will place instructions in /etc/init.d which will initiate tarantool_box with appropriate options and with settings that maximize resource usage. The root password is necessary. These options are available, as shown by tarantool_deploy --help: Tarantool deployment script: add more Tarantool instances. usage: tarantool_deploy.sh [options] <instance> --prefix <path> installation path (/usr) --prefix_etc <path> installation etc path (/etc) --prefix_var <path> installation var path (/var) --status display deployment status --dry don't create anything, show commands --debug show commands --yes don't prompt --help display this usage The default prefixes (/usr and /etc and /var) are appropriate if a Tarantool installation was done with default settings, for example tarantool_box should be in /usr/bin. The only necessary argument is the "instance", which is an arbitrary numeric identification formatted as digit.digit. The following is a sample run: $ tarantool_deploy.sh 0.1 tarantool_deploy.sh: About to deploy Tarantool instance 0.1. tarantool_deploy.sh: Continue? [n/y] y tarantool_deploy.sh: >>> deploy instance 0.1 tarantool_deploy.sh: >>> updating deployment config tarantool_deploy.sh: done
    System-specific administration notes
    This chapter provides a cheatsheet for most common server management routines on every supported operating system.
    Debian GNU/Linux and Ubuntu Setting up an instance: ln -s /etc/tarantool/instances.available/instance-name.cfg /etc/tarantool/instances.enabled/ Starting all instances: service tarantool start Stopping all instances: service tarantool stop Starting/stopping one instance: service tarantool-instance-name start/stop
    Fedora, RHEL, CentOS tba
    FreeBSD tba
    Mac OS X tba
    tarantool-1.5.1.218.g1a69fd6/doc/user/preface.xml0000664000000000000000000001531512242653271017643 0ustar rootroot %tnt; ]> Preface
    Tarantool: an overview Tarantool is an in-memory NoSQL database management system. The code is available for free under the terms of the BSD license. Supported platforms are GNU/Linux, Mac OS and FreeBSD. The server maintains all its data in random-access memory, and therefore has very low read latency. The server keeps persistent copies of the data in non-volatile storage, such as disk, when users request "snapshots". The server maintains a write-ahead log (WAL) to ensure consistency and crash safety of the persistent copies. The server performs inserts and updates atomically -- changes are not considered complete until the WAL is written. The logging subsystem supports group commit. When the rate of data changes is high, the write-ahead log file (or files) can grow quickly. This uses up disk space, and increases the time necessary to restart the server (because the server must start with the last snapshot, and then replay the transactions that are in the log). The solution is to make snapshots frequently. Therefore the server ensures that snapshots are quick, resource-savvy, and non-blocking . To accomplish this, the server uses delayed garbage collection for data pages and uses a copy-on-write technique for index pages. This ensures that the snapshot process has a consistent read view. Tarantool is lock-free. Instead of the operating system's concurrency primitives, such as mutexes, Tarantool uses cooperative multitasking to handle thousands of connections simultaneously. There is a fixed number of independent execution threads. The threads do not share state. Instead they exchange data using low-overhead message queues. While this approach limits the number of cores that the server will use, it removes competition for the memory bus and ensures peak scalability of memory access and network throughput. CPU utilization of a typical highly-loaded Tarantool server is under 10%. Unlike most NoSQL DBMSs, Tarantool supports secondary index keys and multi-part index keys as well as primary keys. The possible index types are HASH, TREE, and BITSET. As its key feature, Tarantool supports Lua stored procedures, which can access and modify data atomically. Users can create, modify and drop Lua procedures at runtime. There is a role not only for Lua procedures, but also for Lua programs. During startup, Lua programs can be used to define triggers and background tasks, or interact with networked peers. Unlike popular application development frameworks based on a "reactor" pattern, networking in server-side Lua is sequential, yet very efficient, as it is built on top of the cooperative multitasking environment that Tarantool itself uses. Extended with Lua, Tarantool typically replaces multiple components of an existing system. Complex multi-tier Web application architectures become simpler, and performance is good. Tarantool supports asynchronous replication , locally or to a remote host. Replication does not cause blocking of writes to the master database. If the master becomes unavailable, a replica can assume the master role without requiring a restart. Tarantool is in production today. Tarantool was created by and is actively used at Mail.Ru, one of the leading Russian web content providers. At Mail.Ru the software serves the hottest data, such as online users and their sessions, online application properties, mapping between users and their serving shards, and so on. Outside Mail.Ru the software is used by a growing number of projects in online gaming, digital marketing, and social media industries. While product development is sponsored by Mail.Ru, the roadmap, the bugs database and the development process are fully open. The software incorporates patches from dozens of community contributors. The Tarantool community writes and maintains most of the drivers for programming languages.
    Conventions This manual is written in DocBook 5 XML markup language and is using the standard DocBook XSL formatting conventions: UNIX shell command input is prefixed with '$ ' and is in a fixed-width font: $ tarantool_box File names are also in a fixed-width font: /path/to/var/dir Text that represents user input is in boldface: $ your input here Within user input, replaceable items are in italics: $ tarantool_box --option
    Reporting bugs Please report bugs in Tarantool at . You can contact developers directly on #tarantool IRC channel or via a mailing list, Tarantool Google group.
    tarantool-1.5.1.218.g1a69fd6/doc/user/iterator-types.xml0000664000000000000000000001453312202131537021222 0ustar rootroot %tnt; ]> Common iterator types Type Arguments HASH TREE BITSET Description box.index.ALL none yes yes yes Iterate over all tuples in an index. When iterating over a TREE index, tuples are returned in ascending order of the key. When iterating over a HASH or BITSET index, tuples are returned in physical order or, in other words, unordered. box.index.EQ key yes yes yes Equality iterator: iterate over all tuples matching the key. Parts of a multipart key need to be separated by comma. Semantics of the match depends on the index. A HASH index only supports exact match: all parts of a key participating in the index must be provided. In case of TREE index, only few parts of a key or a key prefix are accepted for search. In this case, all tuples with the same prefix or matching key parts are considered matching the search criteria. When a TREE index is not unique, or only part of a key is given as a search criteria, matching tuples are returned in ascending order. BITSET and HASH indexes are always unique. box.index.GT key yes (*) yes no Iterate over tuples strictly greater than the search key. For TREE indexes, a key prefix or key part can be sufficient. If the key is nil, iteration starts from the smallest key in the index. The tuples are returned in ascending order of the key. HASH index also supports this iterator type, but returns tuples in unspecified order. However, if the server does not receive updates, this iterator can be used to retrieve all tuples via a HASH index piece by piece, by supplying the last key from the previous range as the start key for an iterator over the next range. BITSET index does not support this iteration type yet.
    TREE iterator types Type Arguments Description box.index.REQ key or key part Reverse equality iterator. Is equivalent to box.index.EQ with only distinction that the order of returned tuples is descending, not ascending. box.index.GE key or key part Iterate over all tuples for which the corresponding fields are greater or equal to the search key. The tuples are returned in ascending order. Similarly to box.index.EQ, key prefix or key part can be used to seed the iterator. If the key is nil, iteration starts from the smallest key in the index. box.index.LT key or key part Similar to box.index.GT, but returns all tuples which are strictly less than the search key. The tuples are returned in the descending order of the key. nil key can be used to start from the end of the index range. box.index.LE key or key part Similar to box.index.GE, but returns all tuples which are less or equal to the search key or key prefix, and returns tuples in descending order, from biggest to smallest. If the key is nil, iteration starts from the end of the index range.
    BITSET iterator types Type Arguments Description box.index.BITS_ALL_SET bit mask Matches tuples in which all specified bits are set. box.index.BITS_ANY_SET bit mask Matches tuples in which any of the specified bits is set. box.index.BITS_ALL_NOT_SET bit mask Matches tuples in which none of the specified bits is set.
    tarantool-1.5.1.218.g1a69fd6/doc/user/triggers.xml0000664000000000000000000000520612202131537020052 0ustar rootroot %tnt; ]>
    Defining triggers in Lua
    Triggers are Lua scripts invoked by the system upon a certain event. Tarantool currently only supports system-wide triggers, run when a new connection is established or dropped. Since trigger body is a Lua script, it is external to the server, and a trigger must be set up on each server start. This is most commonly done in the initialization script. Once a trigger for an event exists, it is automatically invoked whenever an event occurs. The performance overhead of triggers, as long as they are not defined, is minimal: merely a pointer dereference and check. If a trigger is defined, its overhead is equivalent to the overhead of calling a stored procedure.
    Triggers on connect and disconnect box.session.on_connect(chunk) Set a callback (trigger) invoked on each connected session. The callback doesn't get any arguments, but is the first thing invoked in the scope of the newly created session. If the trigger fails by raising an error, the error is sent to the client and the connection is shut down. Returns the old value of the trigger. If a trigger always results in an error, it may become impossible to connect to the server to reset it. box.session.on_disconnect(chunk) Set a trigger invoked after a client has disconnected. Returns the old value of the trigger. If the trigger raises an error, the error is logged but otherwise is ignored. The trigger is invoked while the session associated with the client still exists and can access session properties, such as id.
    tarantool-1.5.1.218.g1a69fd6/doc/user/html-highlight.xsl0000664000000000000000000000564612202131537021153 0ustar rootroot tarantool-1.5.1.218.g1a69fd6/doc/user/tnt-fo.xsl0000664000000000000000000000112412202131537017434 0ustar rootroot 1 A4 file:////usr/share/xml/docbook/stylesheet/docbook-xsl-ns/highlighting/xslthl-config.xml tarantool-1.5.1.218.g1a69fd6/doc/user/olinkdb.xml0000664000000000000000000000031612202131537017643 0ustar rootroot tarantool-1.5.1.218.g1a69fd6/doc/user/limitations.xml0000664000000000000000000000454512242653271020575 0ustar rootroot Limitations Number of fields in an index For BITSET indexes, the maximum is 1. For TREE indexes, the theoretical maximum is about 4 billion (BOX_FIELD_MAX) but the practical maximum is the number of fields in a tuple. Number of indexes in a space 10 (BOX_INDEX_MAX). Number of fields in a tuple There is no theoretical maximum. The practical maximum is whatever is specified by space.cardinality in the configuration file, or the maximum tuple length. Number of spaces 255. Number of connections The practical limit is the number of file descriptors that one can set with the operating system. Space size The total maximum size for all spaces is in effect set by the slab_alloc_arena_size parameter in the configuration file, which in turn is limited by the total available memory. Update operations count The maximum number of operations that can be in a single update is 4000 (BOX_UPDATE_OP_CNT_MAX). tarantool-1.5.1.218.g1a69fd6/doc/user/data-and-persistence.xml0000664000000000000000000000114712202131537022217 0ustar rootroot %tnt; ]> Data model and data persistence
    This chapter describes how Tarantool stores values and what operations with data it supports.
    tarantool-1.5.1.218.g1a69fd6/doc/user/tnt.css0000664000000000000000000000071212202131537017016 0ustar rootroot.tntadmin { font-family: monospace; font-weight: bold; text-transform: uppercase; color: green; } .lua { font-family: monospace; font-weight: bold; } .hl-keyword { color: green; font-weight: bold; } .hl-comment{ color: blue; font-weight: bold; } .book { width: 768px; margin: 2pt auto; /*font-family: Verdana, Arial, Helvetica, sans-serif; */ font-size: 120% } .book h1 { margin: 80pt auto; font-size: 150% } tarantool-1.5.1.218.g1a69fd6/doc/user/configuration-reference.xml0000664000000000000000000010241412242653271023036 0ustar rootroot %tnt; ]> Configuration reference
    This chapter provides a reference of options which can be set in the command line or tarantool.cfg configuration file.
    Tarantool splits its configuration parameters between command line options and a configuration file. Command line options are provided only for the most basic properties; the rest must be set in the configuration file. At runtime, this allows to disambiguate the source of a configuration setting: it unequivocally comes either from the command line, or from the configuration file, but never from both.
    Command line options Tarantool follows the GNU standard for its command line interface: long options start with a double dash (), their short counterparts use a single one (). For phrases, both dashes and underscores can be used as word separators ( and both work). If an option requires an argument, you can either separate it with a space or equals sign ( and both work). , Print an annotated list of all available options and exit. , Print product name and version, for example: $ ./tarantool_box --version Tarantool 1.4.0-69-g45551dd In this example: Tarantool is the name of the reusable asynchronous networking programming framework. Box is the name of the storage back-end. The 3-number version follows the standard <major>-<minor>-<patch> scheme, in which <major> number is changed only rarely, <minor> is incremented for each new milestone and indicates possible incompatible changes, and <patch> stands for the number of bug fix releases made after the start of the milestone. The optional commit number and commit SHA1 are output for non-released versions only, and indicate how much this particular build has diverged from the last release. Tarantool uses git describe to produce its version id, and this id can be used at any time to check out the corresponding source from our git repository. /path/to/config.file, Tarantool does not start without a configuration file. By default, the server looks for file named tarantool.cfg in the current working directory. An alternative location can be provided using this option. Check the configuration file for errors. This option is normally used on the command line before reload configuration is issued on the administrative port, to ensure that the new configuration is valid. When configuration is indeed correct, the program produces no output and returns 0. Otherwise, information about discovered error is printed out and the program terminates with a non-zero value. option_name Given option name, print option value. If the option does not exist, or the configuration file is incorrect, an error is returned. If the option is not explicitly specified, its default value is used instead. Example: $ ./tarantool_box --cfg-get=admin_port 33015 Initialize the directory, specified in vardir configuration option by creating an empty snapshot file in it. If vardir doesn't contain at least one snapshot, the server does not start. There is no magic with automatic initialization of vardir on boot to make potential system errors more noticeable. For example, if the operating system reboots and fails to mount the partition on which vardir is expected to reside, the rc.d or service script responsible for server restart will also fail, thanks to this option. The only two options which could affect a running server are: , Increase verbosity level in log messages. This option currently has no effect. , Detach from the controlling terminal and run in the background. Tarantool uses stdout and stderr for debug and error log output. When starting the server with option , make sure to either redirect its standard out and standard error streams, or provide logger option in the configuration file, since otherwise all logging information will be lost.
    The configuration file All advanced configuration parameters must be specified in a configuration file, which is required for server start. If no path to the configuration file is specified on the command line (see ), the server looks for a file named tarantool.cfg in the current working directory. To facilitate centralized and automated configuration management, runtime configuration modifications are supported solely through the administrative statement. Thus, the procedure to change Tarantool configuration at runtime is to edit the configuration file. This ensures that, should the server get killed or restart, no unexpected changes to configuration can occur. Not all configuration file settings are changeable at runtime: such settings will be highlighted in this reference. If the same setting is given more than once, the latest occurrence takes effect. You can always invoke from the administrative console to show the current configuration. Tarantool maintains a set of all allowed configuration parameters in two template files, which are easy to maintain and extend: cfg/core_cfg.cfg_tmpl, src/box/box_cfg.cfg_tmpl. These files can always be used as a reference for any parameter in this manual. In addition, two working examples can be found in the source tree: test/box/tarantool.cfg, test/big/tarantool.cfg. Basic parameters Name Type Default Required? Dynamic? Description username string "" no no UNIX user name to switch to after start. work_dir string "" no no A directory where database working files will be stored. The server switches to work_dir with chdir(2) after start. Can be relative to the current directory. If not specified, defaults to the current directory. script_dir string "" no no If this path is set, it is added to the Lua package search path, so that instance-specific Lua scripts can be loaded and executed. If the directory specified in the path contains init.lua file, it is loaded and executed at server start. wal_dir string "" no no A directory where write ahead log (.xlog) files are stored. Can be relative to work_dir. Most commonly used so that snapshot files and write ahead log files can be stored on separate disks. If not specified, defaults to work_dir. snap_dir string "" no no A directory where snapshot (.snap) files will be stored. Can be relative to work_dir. If not specified, defaults to work_dir. See also . bind_ipaddr string "INADDR_ANY" no no The network interface to bind to. By default, the server binds to all available addresses. Applies to all ports opened by the server. primary_port integer none yes no The read/write data port. Has no default value, so must be specified in the configuration file. Normally set to 33013. Note: a replica also binds to this port, and accepts connections, but these connections can only serve reads until the replica becomes a master. secondary_port integer none no no Additional, read-only port. Normally set to 33014. Not used unless is set. admin_port integer none no no The TCP port to listen on for administrative connections. Has no default value. Not used unless assigned a value. Normally set to 33015. pid_file string tarantool.pid no no Store the process id in this file. Can be relative to work_dir. custom_proc_title string "" no no Inject the given string into server process title (what's shown in the COMMAND column for ps and top commands). For example, ordinarily ps shows the Tarantool server process thus: kostja@shmita:~$ ps -a -o command | grep box tarantool_box: primary pri: 33013 sec: 33014 adm: 33015 But if the configuration file contains custom_proc_title=sessions then the output looks like: kostja@shmita:~$ ps -a -o command | grep box tarantool_box: primary@sessions pri: 33013 sec: 33014 adm: 33015
    Configuring the storage Name Type Default Required? Dynamic? Description slab_alloc_arena float 1.0 no no How much memory Tarantool allocates to actually store tuples, in gigabytes. When the limit is reached, INSERT or UPDATE requests begin failing with error . While the server does not go beyond the defined limit to allocate tuples, there is additional memory used to store indexes and connection information. Depending on actual configuration and workload, Tarantool can consume up to 20% more than the limit set here. slab_alloc_minimal integer 64 no no Size of the smallest allocation unit. It can be tuned down if most of the tuples are very small. slab_alloc_factor float 2.0 no no Use slab_alloc_factor as the multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less wasted memory depending on the total amount of memory available and the distribution of item sizes. space array of objects none yes no This is the main Tarantool parameter, describing the data structure that users get access to via the client/server protocol. It holds an array of entries, and each entry describes a tuple set and its indexes. Every entry is a composite object, best seen as a C programming language "struct" .
    Binary logging and snapshots Name Type Default Required? Dynamic? Description panic_on_snap_error boolean true no no If there is an error reading the snapshot file (at server start), abort. panic_on_wal_error boolean false no no If there is an error reading a write ahead log file (at server start), abort. rows_per_wal integer 500000 no no How many log records to store in a single write ahead log file. When this limit is reached, Tarantool creates another WAL file named <first-lsn-in-wal>.xlog This can be useful for simple rsync-based backups. snap_io_rate_limit float 0.0 no yes Reduce the throttling effect of on INSERT/UPDATE/DELETE performance by setting a limit on how many megabytes per second it can write to disk. The same can be achieved by splitting and locations and moving snapshots to a separate disk. wal_fsync_delay float 0 no yes Do not flush the write ahead log to disk more often than once in wal_fsync_delay seconds. By default the delay is zero, which means there is no flushing after writes (the meaning of wait_fsync_delay=0 meay change in later versions). Setting the delay may be necessary to increase write throughput, but may lead to several last updates being lost in case of a power failure. Such failure, however, does not lead to data corruption: all WAL records have a checksum, and only complete records are processed during recovery. wal_mode string "fsync_delay" no yes Specify fiber-WAL-disk synchronization mode as: none: write ahead log is not maintained; write: fibers wait for their data to be written to the write ahead log (no fsync(2)); fsync: fibers wait for their data, fsync(2) follows each write(2); fsync_delay: fibers wait for their data, fsync(2) is called every N=wal_fsync_delay seconds (N=0.0 means no fsync(2) - equivalent to wal_mode = "write");
    Replication Name Type Default Required? Dynamic? Description replication_port integer 0 no no If replication_port is greater than zero, the server is considered to be a Tarantool master. The master server listens on the specified port for incoming connections from replicas. See also , which complements this setting on the replica side. replication_source string NULL no yes If replication_source is not an empty string, the server is considered to be a Tarantool replica. The replica server will try to connect to the master which replication_source specifies with format ip:port. For example, if replication_source = "1.2.3.4:55555" then the replica server tries to connect to 1.2.3.4 port 55555. A replica server does not accept updates on . This parameter is dynamic, that is, to enter master mode, simply set replication_source to an empty string and issue .
    Networking Name Type Default Required? Dynamic? Description io_collect_interval float 0.0 no yes The server will sleep for io_collect_interval seconds between iterations of the event loop. Can be used to reduce CPU load in deployments in which the number of client connections is large, but requests are not so frequent (for example, each connection issues just a handful of requests per second). readahead integer 16384 no no The size of the read-ahead buffer associated with a client connection. The larger the buffer, the more memory an active connection consumes and the more requests can be read from the operating system buffer in a single system call. The rule of thumb is to make sure the buffer can contain at least a few dozen requests. Therefore, if a typical tuple in a request is large, e.g. a few kilobytes or even megabytes, the read-ahead buffer size should be increased. If batched request processing is not used, it's prudent to leave this setting at its default. backlog integer 1024 no no The size of the listen backlog.
    Logging Name Type Default Required? Dynamic? Description log_level integer 4 no yes How verbose the logging is. There are 5 log verbosity classes: 1 -- ERROR, 2 -- CRITICAL, 3 -- WARNING, 4 -- INFO, 5 -- DEBUG. By setting log_level, one can enable logging of all classes below or equal to the given level. Tarantool prints its logs to the standard error stream by default, but this can be changed with the "logger" configuration parameter. logger string "" no no By default, the log is sent to the standard error stream (stderr). If logger is given a value, Tarantool creates a child process, executes the command indicated by the value, and pipes its standard output to the standard input of the created process. Example setting: tee --append tarantool.log (this will duplicate log output to stdout and a log file). logger_nonblock integer 0 no no If logger_nonblock equals 1, Tarantool does not block on the log file descriptor when it's not ready for write, and drops the message instead. If log_level is high, and a lot of messages go to the log file, setting logger_nonblock to 1 may improve logging performance at the cost of some log messages getting lost. too_long_threshold float 0.5 no yes If processing a request takes longer than the given value (in seconds), warn about it in the log. Has effect only if log_level is less than or equal to 3 (WARNING).
    Memcached protocol support Name Type Default Required? Dynamic? Description memcached_port integer none no no Turn on Memcached protocol support on the given port. All requests on this port are directed to a dedicated space, set in . Memcached-style flags are supported and stored along with the value. The expiration time can also be set and is persistent, but is ignored, unless is turned on. Unlike Memcached, all data still goes to the binary log and to the replica, if the latter is set up, which means that power outage does not lead to loss of all data. Thanks to data persistence, cache warm up time is also very short. memcached_space integer 23 no no Space id to store memcached data in. The format of tuple is [key, metadata, value], with a HASH index based on the key. Since the space format is defined by the Memcached data model, it must not be previously configured. memcached_expire boolean false no no Turn on tuple time-to-live support in . This effectively turns Tarantool into a persistent, replicated and scriptable implementation of Memcached. memcached_expire_per_loop integer 1024 no yes How many records to consider per iteration of the expiration loop. Tuple expiration is performed in a separate green thread within our cooperative multitasking framework and this setting effectively limits how long the expiration loop stays uninterrupted on the CPU. memcached_expire_full_sweep float 3600 no yes Try to make sure that every tuple is considered for expiration within this time frame (in seconds). Together with memcached_expire_per_loop this defines how often the expiration green thread is scheduled on the CPU.
    tarantool-1.5.1.218.g1a69fd6/doc/user/proctitle.xml0000664000000000000000000000447612242653271020251 0ustar rootroot %tnt; ]> Server process titles Linux and FreeBSD operating systems allow a running process to modify its title, which otherwise contains the program name. Tarantool uses this feature to help meet the needs of system administration, such as figuring out what services are running on a host, what TCP/IP ports are in use, and so on. Tarantool process title follows the following naming scheme: program_name: role[@] [ports in use] program_name is typically tarantool_box. The role can be one of the following: primary -- the master node, replica/IP:port -- a replication node, replication_server -- runs only if is set, accepts connections on this port and creates a replication_relay -- a process that servers a single replication connection. Possible port names are: pri for , sec for , adm for and memcached for . For example: tarantool_box: primary pri: 50000 sec: 50001 adm: 50002 tarantool_box: primary@infobox pri: 15013 sec: 15523 adm: 10012 tarantool-1.5.1.218.g1a69fd6/doc/user/tutorial.xml0000664000000000000000000007655512242653271020116 0ustar rootroot %tnt; ]> Getting started This chapter shows how to download, how to install, and how to start Tarantool for the first time. For production, if possible, you should download a binary (executable) package. This will ensure that you have the same build of the same version that the developers have. That makes analysis easier if later you need to report a problem, and avoids subtle problems that might happen if you used different tools or different parameters when building from source. All programs in the binary tarballs are linked statically so there will be no external dependencies. The section about binaries is Downloading and installing a binary package. For development, you will want to download a source package and make the binary by yourself using a C/C++ compiler and common tools. Although this is a bit harder, it gives more control. And the source packages include additional files, for example the Tarantool test suite. The section about source is Downloading and building a source package. If the installation has already been done, then you should try it out. So we've provided some instructions that you can use to make a temporary sandbox. In a few minutes you can start the server, start the client, and type in some database-manipulation statements. The section about sandbox is Starting Tarantool and making your first database.
    Downloading and installing a binary package The repositories for the stable release are at tarantool.org/dist. The repositories for the master release are at tarantool.org/dist/master. Since this is the manual for the stable release, all instructions use tarantool.org/dist. An automatic build system creates, tests and publishes packages for every push into the stable branch. Therefore if you looked at tarantool.org/dist you would see many files. Names of binary packages have the format tarantool-<version>-<OS>-<machine>.tar.gz. Here is one example: tarantool-1.5.1-97-g8e8cd06-linux-x86_64.tar.gz 26-Sep-2013 15:55 3664777 which means Tarantool package, major version = 1, minor version number = 5, patch number 1, git revision id g8e8cd06, is a Linux x86 64-bit compressed tarball, pushed on September 26 2013, which contains 3.6 MB. To download and install the package that's appropriate for your environment, start a shell (terminal) and enter one of the following sets of command-line instructions. # DEBIAN commands for Tarantool stable binary download: # There is always an up-to-date Debian repository at http://tarantool.org/dist/debian # The repository contains builds for Debian unstable "Sid", stable "Wheezy", forthcoming "Jessie", ... # add the tarantool.org repository to your apt sources list: # ($release is an environment variable which will contain the Debian version code e.g. "Wheezy") wget http://tarantool.org/dist/public.key sudo apt-key add ./public.key release=`lsb_release -c -s` # append two lines to a list of source repositories echo "deb http://tarantool.org/dist/debian/ $release main" | sudo tee /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/debian/ $release main" | sudo tee /etc/apt/sources.list.d/tarantool.list # install sudo apt-get update sudo apt-get install tarantool tarantool-client # UBUNTU commands for Tarantool stable binary download: # There is always an up-to-date Ubuntu repository at http://tarantool.org/dist/ubuntu # The repository contains builds for Ubuntu 12.04 "precise", 12.10 "quantal", 13.04 "raring", 13.10 "saucy", ... # add the tarantool.org repository to your apt sources list: # ($release is an environment variable which will contain the Ubuntu version code e.g. "precise") # (if you want the version that comes with Ubuntu, start with the lines that follow the '# install' comment) cd ~ wget http://tarantool.org/dist/public.key sudo apt-key add ./public.key release=`lsb_release -c -s` # append two lines to a list of source repositories echo "deb http://tarantool.org/dist/ubuntu/ $release main" | sudo tee /etc/apt/sources.list.d/tarantool.list echo "deb-src http://tarantool.org/dist/ubuntu/ $release main" | sudo tee /etc/apt/sources.list.d/tarantool.list # install sudo apt-get update sudo apt-get install tarantool tarantool-client # CENTOS commands for Tarantool stable binary download: # These instructions are applicable for CentOS version 5 or 6, and RHEL version 5 or 6 # Pick the CentOS repository which fits your CentOS/RHEL version and your x86 platform: # http://tarantool.org/dist/centos/5/os/i386 for version 5, x86-32 # http://tarantool.org/dist/centos/5/os/x86_64 for version 5, x86-64 # http://tarantool.org/dist/centos/6/os/i386 for version 6, x86-32 # http://tarantool.org/dist/centos/6/os/x86_64 for version 6, x86-64 # Add the following section to your yum repository list (/etc/yum.repos.d/tarantool.repo): # (in the following instructions, $releasever i.e. CentOS release version must be either 5 or 6) # (in the following instructions, $basearch i.e. base architecture must be either i386 or x86_64) # [tarantool] # name=CentOS-$releasever - Tarantool # baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/ # enabled=1 # gpgcheck=0 # For example, if you have CentOS version 6 and x86-64, you can # add the new section thus: echo "[tarantool]" | sudo tee /etc/yum.repos.d/tarantool.repo echo "name=CentOS-6 - Tarantool"| sudo tee /etc/yum.repos.d/tarantool.repo echo "baseurl=http://tarantool.org/dist/centos/6/os/x86_64/" | sudo tee /etc/yum.repos.d/tarantool.repo echo "enabled=1" | sudo tee /etc/yum.repos.d/tarantool.repo echo "gpgcheck=0" | sudo tee /etc/yum.repos.d/tarantool.repo # GENTOO commands for Tarantool stable binary download: # Tarantool is available from tarantool portage overlay. Use layman to add the overlay to your system: layman layman tarantool emerge dev-db/tarantool # ANY-LINUX commands for Tarantool stable binary download: # If you have a GNU/Linux distribution which is not one of the above, # or if you want to install on your own subdirectory without affecting /usr /etc etc., # start your browser and go to # http://tarantool.org/download.html download page. # Look for words similar to "Other Linux distributions". You will want the # binary tarball (.tar.gz) file for your release architecture (32-bit or 64-bit). # Click on either "32-bit" or "64-bit" depending on your release architecture. # This will cause a download of the latest stable tarball. # Suppose it is tarantool-1.5.1-133-g11edda1-linux-x86_64.tar.gz. Say: tar tarantool-1.5.1-133-g11edda1-linux-x86_64.tar.gz # You now have a directory named tarantool-1.5.1-133-g11edda1-linux-x86_64. # Let's move it to ~/tarantool, which is an easier name to remember. mv tarantool-1.5.1-133-g11edda1-linux-x86_64 ~/tarantool # Within it there is a subdirectory /bin containing both server and client. # FREEBSD commands for Tarantool stable binary download: # With your browser go to the FreeBSD ports page # http://www.freebsd.org/ports/index.html # Enter the search term: tarantool # Choose the package you want ... # However, there is a known issue with the binary of Tarantool # version 1.5, see # https://github.com/tarantool/tarantool/issues/19. # MAC OS X commands for Tarantool stable binary download: # This is actually a homebrew recipe # so it's not a true binary download, some source code is involved. # First upgrade Clang (the C compiler) to version 3.2 or later using # Command Line Tools for Xcode disk image version 4.6+ from Apple Developer web-site. brew install --use-clang http://tarantool.org/dist/tarantool.rb # or brew install http://tarantool.org/dist/tarantool.rb More advice for binary downloads is at http://tarantool.org/download.html.
    Downloading and building a source package For downloading Tarantool source and building it, the platforms can differ and the preferences can differ. But the steps are always the same. Here in the manual we'll explain what the steps are, then on the Internet you can look at some example scripts. 1. Get tools and libraries that will be necessary for building and testing. The absolutely necessary ones are: A program for downloading source repositories. In this case the necessary program is git. Although tarantool.org/dist has source tarballs (the files whose names end in -src.tar.gz), the latest complete source downloads are on github.com, and from github one gets with git. A C/C++ compiler. Ordinarily the compiler is GCC version 4.5 or later, on Mac OS X it should be Clang version 3.2 or later. There may be some benefit in rebuilding gcc to suit tarantool requirements. A program for managing the build process. This is always CMake for GNU/Linux and FreeBSD. Here are names of tools and libraries which may have to be installed in advance, using sudo apt-get (for Ubuntu), sudo yum install (for CentOS), or the equivalent on other platforms. Different platforms may use slightly different names. Do not worry about the optional, for build with -DENABLE_DOC ones unless you intend to work on the documentation. binutils-dev or binutils-devel # contains GNU bfd for printing stack traces gcc or clang # see above git # see above uuid-dev # optional, for box_uuid_* functions cmake # see above libreadline-dev # optional, for build with -DENABLE_CLIENT libncurses5-dev or ncurses-devel # optional, for build with -DENABLE_CLIENT xsltproc # optional, for build with -DENABLE_DOC lynx # optional, for build with -DENABLE_DOC jing # optional, for build with -DENABLE_DOC libxml2-utils # optional, for build with -DENABLE_DOC docbook5-xml # optional, for build with -DENABLE_DOC docbook-xsl-ns # optional, for build with -DENABLE_DOC w3c-sgml-lib # optional, for build with -DENABLE_DOC libsaxon-java # optional, for build with -DENABLE_DOC libxml-commons-resolver1.1-java # optional, for build with -DENABLE_DOC libxerces2-java # optional, for build with -DENABLE_DOC libxslthl-java # optional, for build with -DENABLE_DOC autoconf # optional, appears only in Mac OS scripts zlib1g or zlib # optional, appears only in Mac OS scripts 2. Pick a default directory. This can be anywhere. We'll assume that your default directory is ~, and therefore the tarantool download will go inside it, as ~/tarantool. 3. Use git to download from github.com. cd ~ git clone https://github.com/tarantool/tarantool.git The optional argument -b stable causes download from the stable branch instead of the master branch, and the optional last word on the line, tarantool, means download is to ~/tarantool. 4. Use git again so that third-party contributions will be seen as well. This step is only necessary once, the first time you do a download. There is an alternative -- say git clone --recursive in step 3 -- but we prefer this method because it works with older versions of git.cd ~/tarantool git submodule init git submodule update cd ../ 5. Use CMake to initiate the build.cd ~/tarantool make clean # unnecessary, added for good luck rm CMakeCache.txt # unnecessary, added for good luck cmake . # The command to initiate with build type=Debug, no client, no doc The option for specifying build type is type where type = {None | Debug | Release | RelWithDebInfo | MinSizeRel} and a reasonable choice for production is (Debug is used only by project maintainers and Release is used only when the highest performance is required). The option for asking to build client is {true|false} and a reasonable choice is . The option for asking to build documentation is {true|false} and the assumption is that only a minority will need to rebuild the documentation (such as what you're reading now), so details about documentation are in the developer manual, and the reasonable choice is or just don't use the clause at all. 6. Use make to complete the build.make It's possible to say make install too, but that's not generally done. 7. Set up python modules for running the test suite. This step is optional. Say:python --version ... You should see that the python version is between 2.6 and 3. On Ubuntu you can get modules from the repository:sudo apt-get install python-daemon python-yaml python-argparse python-pexpect On CentOS too you can get modules from the repository:sudo yum install python26 python26-PyYAML python26-argparse But in general it is best to set up the modules by getting a tarball and doing the setup with python setup.py, thus: # python module for parsing YAML (pyYAML): # (If wget fails, check the PyYAML web site to see what the current version is.) cd ~ wget http://pyyaml.org/download/pyyaml/PyYAML-3.10.tar.gz tar PyYAML-3.10.tar.gz cd PyYAML-3.10 sudo python setup.py install # python module for spawning child applications (pexpect): # (If wget fails, check the python-pexpect web site to see what the current version is.) cd ~ wget http://pypi.python.org/packages/source/p/pexpect-u/pexpect-u-2.5.1.tar.gz tar pexpect-u-2.5.1.tar. cd pexpect-u-2.5.1 sudo python setup.py install # python module for assisting programs to turn themselves into daemons (daemon): # (if wget fails, check the python-daemon web site to see what the current version is.) cd ~ wget http://pypi.python.org/packages/source/d/daemon/daemon-1.0.tar.gz tar daemon-1.0.tar.gz cd daemon-1.0 sudo python setup.py install 8. Run the test suite. This step is optional. Tarantool's developers always run the test suite before they publish new versions. You should run the test suite too, if you make any changes in the code. Assuming you downloaded to ~/tarantool, the principal steps are:mkdir ~/tarantool/bin # make a subdirectory named bin ln usr/bin/python ~/tarantool/bin/python # link python to bin cd ~/tarantool/test #get on the test subdirectory PATH=~/tarantool/bin:$PATH ./run #run tests using python The output should contain reassuring reports, for example ====================================================================== TEST RESULT ------------------------------------------------------------ box/admin.test [ pass ] box/admin_coredump.test [ pass ] box/args.test [ pass ] box/cjson.test [ pass ] box/configuration.test [ pass ] box/errinj.test [ pass ] box/fiber.test [ pass ] ... etc. There are more than 70 tests in the suite. To prevent later confusion, clean up what's in the bin subdirectory:rm ~/tarantool/bin/python rmdir ~/tarantool/bin 9. Make an rpm. This step is optional. It's only for people who want to redistribute Tarantool. Ordinarily it should be skipped. It will add a new subdirectory: ~/tarantool/RPM.make rpm This is the end of the list of steps to take for source downloads. For your added convenience, github.com has README files with example scripts: README.CentOS for CentOS 5.8, README.FreeBSD for FreeBSD 8.3, README.MacOSX for Mac OS X Lion, README.md for generic GNU/Linux. These example scripts assume that the intent is to download from the master branch, build the server and the client (but not the documentation), and run tests after build.
    Starting Tarantool and making your first database Here is how to create a simple test database after installing. 1. Create a new directory. It's just for tests, you can delete it when the tests are over. mkdir ~/tarantool_sandbox cd ~/tarantool_sandbox mkdir work_dir 2. Create a configuration file. The Tarantool server requires a configuration file with some definitions of ports and database objects. The server, by default, looks for its configuration file in the current working directory and in etc/. Enter the following commands which make a minimal configuration file that will be suitable for day one. echo "slab_alloc_arena = 0.1" | tee tarantool.cfg echo "pid_file = \"box.pid\"" | tee tarantool.cfg echo "primary_port = 33013" | tee tarantool.cfg echo "secondary_port = 33014" | tee tarantool.cfg echo "admin_port = 33015" | tee tarantool.cfg echo "rows_per_wal = 50000" | tee tarantool.cfg echo "space[0].enabled = 1" | tee tarantool.cfg echo "space[0].index[0].type = \"HASH\"" | tee tarantool.cfg echo "space[0].index[0].unique = 1" | tee tarantool.cfg echo "space[0].index[0].key_field[0].fieldno = 0" | tee tarantool.cfg echo "space[0].index[0].key_field[0].type = \"NUM\"" | tee tarantool.cfg echo "logger = \"tee --append tarantool.log\"" | tee tarantool.cfg echo "work_dir = \"work_dir\"" | tee tarantool.cfg (With some downloads a tarantool.cfg file like this is already available in a test subdirectory.) Initialize the storage area. You only have to do this once. /usr/bin/tarantool_box --init-storage #if you downloaded a binary with apt-get or yum ~/tarantool/bin/tarantool_box --init-storage #if you downloaded and untarred a binary tarball to ~/tarantool ~/tarantool/src/box/tarantool_box --init-storage #f you built from a source download Start the server. The server name is tarantool_box. /usr/bin/tarantool_box #if you downloaded a binary with apt-get or yum ~/tarantool/bin/tarantool_box #if you downloaded and untarred a binary tarball to ~/tarantool ~/tarantool/src/box/tarantool_box #f you built from a source download If all goes well, you will see the server displaying progress as it initializes, something like this: 2013-10-18 20:20:36.806 [16560] 1/sched C> version 1.5.1-141-ga794d35 2013-10-18 20:20:36.830 [16560] 1/sched I> Loading plugin: /usr/lib/tarantool/plugins/libmysql.so 2013-10-18 20:20:37.016 [16560] 1/sched I> Plugin 'mysql' was loaded, version: 1 2013-10-18 20:20:37.016 [16560] 1/sched I> Loading plugin: /usr/lib/tarantool/plugins/libpg.so 2013-10-18 20:20:37.044 [16560] 1/sched I> Plugin 'postgresql' was loaded, version: 1 2013-10-18 20:20:37.044 [16560] 1/sched I> space 0 successfully configured 2013-10-18 20:20:37.044 [16560] 1/sched I> recovery start 2013-10-18 20:20:37.060 [16560] 1/sched I> recover from `./00000000000000000001.snap' 2013-10-18 20:20:37.060 [16560] 1/sched I> snapshot recovered, confirmed lsn: 1 2013-10-18 20:20:37.070 [16560] 1/sched I> done `./00000000000000000002.xlog' confirmed_lsn: 2 2013-10-18 20:20:37.070 [16560] 1/sched I> WALs recovered, confirmed lsn: 2 2013-10-18 20:20:37.070 [16560] 1/sched I> building secondary indexes 2013-10-18 20:20:37.070 [16560] 1/sched I> bound to primary port 33013 2013-10-18 20:20:37.070 [16560] 1/sched I> I am primary 2013-10-18 20:20:37.070 [16560] 1/sched I> bound to secondary port 33014 2013-10-18 20:20:37.070 [16560] 1/sched I> bound to admin port 33015 2013-10-18 20:20:37.071 [16560] 1/sched C> log level 4 2013-10-18 20:20:37.071 [16560] 1/sched C> entering event loop Now take the server down, with CtrlC Now start the server again. This time start it in the background. /usr/bin/tarantool_box --background #if you downloaded a binary with apt-get or yum ~/tarantool/bin/tarantool_box --background #if you downloaded and untarred a binary tarball to ~/tarantool ~/tarantool/src/box/tarantool_box --background #f you built from a source download If all went well, there is now an instance of the Tarantool server running in the background. You can confirm that with the command:ps | grep tarantool_box or look at the log file:less work_dir/tarantool.log Please follow distribution-specific instructions to find out how to manage Tarantool instances on your operating system. Alternatively, the server can be started right out of the in-source build. Use the Tarantool regression testing framework: $ ./test/run It will create necessary files in directory ./test/var/, and start the server with minimal configuration. Now that the server is up, you can start the client. The client name is tarantool. /usr/bin/tarantool #If you downloaded a binary with apt-get or yum: ~/tarantool/bin/tarantool #If you downloaded and untarred a binary tarball to ~/tarantool: ~/tarantool/client/tarantool/tarantool #If you built from a source download on ~tarantool If all goes well, a prompt will appear:localhost> The client is waiting for the user to type instructions. To insert three tuples (our name for records) into the first space of the database (which is called t0), try this:localhost> INSERT INTO t0 VALUES (1) localhost> INSERT INTO t0 VALUES (2,'Music') localhost> INSERT INTO t0 VALUES (3,'length',93) To select a tuple from the first space of the database, using the first defined key (which is called k0), try this:localhost> SELECT * FROM t0 WHERE k0 = 3 Your terminal screen should now look like this: localhost> INSERT INTO t0 VALUES (1) Insert OK, 1 rows affected localhost> INSERT INTO t0 VALUES (2,'Music') Insert OK, 1 rows affected localhost> INSERT INTO t0 VALUES (3,'Length',93) Insert OK, 1 rows affected localhost> SELECT * FROM t0 WHERE k0 = 3 Select OK, 1 rows affected [3, 'Length', 93] localhost>> You can repeat INSERT and SELECT indefinitely. When the testing is over: To stop the client: CtrlC. To stop the server: sudo pkill -f tarantool_box. To destroy the test: rm -r ~/tarantool_sandbox. To review ... If you followed all the instructions in this chapter, then so far you have: installed Tarantool from either a binary or a source repository, started up the Tarantool server, inserted and selected tuples with the Tarantool client.
    tarantool-1.5.1.218.g1a69fd6/doc/user/data-model.xml0000664000000000000000000003177212242653271020252 0ustar rootroot
    Dynamic data model If you tried out the Starting Tarantool and making your first database exercise from the last chapter, then your database looks like this: +--------------------------------------------+ | | | SPACE 'space[0]' | | +----------------------------------------+ | | | | | | | TUPLE SET 't0' | | | | +-----------------------------------+ | | | | | Tuple: [ 1 ] | | | | | | Tuple: [ 2, 'Music' ] | | | | | | Tuple: [ 3, 'length', 93 ] | | | | | +-----------------------------------+ | | | | | | | | INDEX 'index[0]' | | | | +-----------------------------------+ | | | | | Key: 1 | | | | | | Key: 2 | | | | | | Key: 3 | | | | | +-----------------------------------+ | | | | | | | +----------------------------------------+ | +--------------------------------------------+ Space A spacethe paradigm of tuples and spaces is derived from distributed computing -- 'space[0]' in the example -- is a container. There is always at least one space; there can be many spaces, numbered as space[0], space[1], and so on. Spaces always contain one tuple set and one or more indexes. Tuple Set A tuple setThere's a Wikipedia article about tuples: https://en.wikipedia.org/wiki/Tuple -- 't0' in the example -- is a group of tuples. There is always one tuple set in a space. For the tarantool client, the identifier of a tuple set is t followed by the space's number, for example t0 refers to the tuple set of space[0]. (The letter t stands for tuple set.) A tuple fills the same role as a row or a record, and the components of a tuple (which we call fields) fill the same role as a row column or record field, except that: the fields of a tuple don't need to have names. That's why there was no need to pre-define the tuple set in the configuration file, and that's why each tuple can have a different number of elements, and that's why we say that Tarantool has a dynamic data model. Any given tuple may have any number of fields and the fields may have any of these three types: NUM (32-bit unsigned integer between 0 and 2,147,483,647), NUM64 (64-bit unsigned integer between 0 and 18,446,744,073,709,551,615), or STR (string, any sequence of octets). The identifier of a field is k followed by the field's number, for example k0 refers to the first field of a tuple. This manual is following the tarantool client convention by using tuple identifier = t followed by the space's number, and using field identifier = k followed by the field's number. The server knows nothing about such identifiers, it only cares about the number. Other clients follow different conventions, and may even have sophisticated ways of mapping meaningful names to numbers. When the tarantool client displays a tuple, it surrounds strings with single quotes, separates fields with commas, and encloses the tuple inside square brackets. For example: [ 3, 'length', 93 ]. Index An index -- 'index[0]' in the example -- is a group of key values and pointers. There is always at least one index in a space; there can be many. The identifier of an index is 'index' followed by the index's number within the space, so in our example there is one index and its identifier is index[0]. An index may be multi-field, that is, the user can declare that an index key value is taken from two or more fields in the tuple, in any order. An index may be unique, that is, the user can declare that it would be illegal to have the same key value twice. An index may have one of three types: HASH which is fastest and uses the least memory but must be unique, TREE which allows partial-key searching and ordered results, and BITSET which can be good for searches that contain '=' and 'AND' in the WHERE clause. The first index -- index[0] -- is called the primary key index and it must be unique; all other indexes -- index[1], index[2], and so on -- are secondary indexes. An index definition always includes at least one identifier of a tuple field and its expected type. Take our example configuration file, which has the lines:space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM"The effect is that, for all tuples in t0, field number 0 (k0) must exist and must be a 32-bit unsigned integer. For the current version of the Tarantool server, space definitions and index definitions must be in the configuration file. Administrators must take care that what's in the configuration file matches what's in the database. If a server is started with the wrong configuration file, it could behave in an unexpected way or crash. However, it is possible to stop the server or disable database accesses, then add new spaces and indexes, then restart the server or re-enable database accesses. The syntax details for defining spaces and indexes are in chapter 7 Configuration reference. Operations The basic operations are: the four data-change operations (INSERT, UPDATE, DELETE, REPLACE), and the data-retrieval operation (SELECT). There are also minor operations like ping which are not available via the tarantool client's SQL-like interface but can only be used with the binary protocol. Also, there are index iterator operations, which can only be used with Lua stored procedures. (Index iterators are for traversing indexes one key at a time, taking advantage of features that are specific to an index type, for example evaluating Boolean expressions when traversing BITSET indexes, or going in descending order when traversing TREE indexes.) Five examples of basic operations: /* Add a new tuple to tuple set t0. The first field, k0, will be 999 (type is NUM). The second field, k1, will be 'Taranto' (type is STR). */ INSERT INTO t0 VALUES (999,'Taranto') /* Update the tuple, changing field k1. The clause "WHERE primary-key-field-identifier = value is mandatory because UPDATE statements must always have a WHERE clause that specifies the primary key, which in this case is k0. */ UPDATE t0 SET k1 = 'Tarantino' WHERE k0 = 999 /* Replace the tuple, adding a new field. This is not possible with the UPDATE statement because the SET clause of an UPDATE statement can only refer to fields that already exist. */ REPLACE INTO t0 VALUES (999,'Tarantella',Tarantula') /* Retrieve the tuple. The WHERE clause is still mandatory, although it does not have to mention the primary key. */ SELECT * FROM t0 WHERE k0 = 999 /* Delete the tuple. Once again the clause "WHERE k0 = value is mandatory. */ DELETE FROM t0 WHERE k0 = 999 How does Tarantool do a basic operation? Let's take this example: UPDATE t0 SET k1 = 'size', k2=0 WHERE k0 = 3 STEP #1: the client parses the statement and changes it to a binary-protocol instruction which has already been checked, and which the server can understand without needing to parse everything again. The client ships a packet to the server. STEP #2: the server's transaction processor thread uses the primary-key index on field k0 to find the location of the tuple in memory. It determines that the tuple can be updated (not much can go wrong when you're merely changing an unindexed field value to something shorter). STEP #3: the transaction processor thread sends a message to the write-ahead loggingThere's a Wikipedia article about write-ahead logging: https://en.wikipedia.org/wiki/Write-ahead_logging (WAL) thread. At this point a yield takes place. To know the significance of that -- and it's quite significant -- you have to know a few facts and a few new words. FACT #1: there is only one transaction processor thread. Some people are used to the idea that there can be multiple threads operating on the database, with (say) thread #1 reading row #x while thread#2 writes row#y. With Tarantool no such thing ever happens. Only the transaction processor thread can access the database, and there is only one transaction processor thread for each instance of the server. FACT #2: the transaction processor thread can handle many fibersThere's a Wikipedia article about fibers: https://en.wikipedia.org/wiki/Fiber_%28computer_science%29. A fiber is a set of computer instructions that may contain yield signals. The transaction processor thread will execute all computer instructions until a yield, then switch to execute the instructions of a different fiber. Thus (say) the thread reads row#x for the sake of fiber#1, then writes row#y for the sake of fiber#2. FACT #3: yields must happen, otherwise the transaction processor thread would stick permanently on the same fiber. There are implicit yields: every data-change operation or network-access causes an implicit yield, and every statement that goes through the tarantool client causes an implicit yield. And there are explicit yields: in a Lua stored procedure one can and should add yield statements to prevent hogging. This is called cooperative multitaskingThere's a Wikipedia article with a section about cooperative multitasking: https://en.wikipedia.org/wiki/Cooperative_multitasking#Cooperative_multitasking.2Ftime-sharing. Since all data-change operations end with an implicit yield and an implicit commit, and since no data-change operation can change more than one tuple, there is no need for any locking. Consider, for example, a stored procedure that does three operations: SELECT /* this does not yield and does not commit */ UPDATE /* this yields and commits */ SELECT /* this does not yield and does not commit */ The combination SELECT plus UPDATE is an atomic transaction: the stored procedure holds a consistent view of the database until the UPDATE ends. For the combination UPDATE plus SELECT the view is not consistent, because after the UPDATE the transaction processor thread can switch to another fiber, and delete the tuple that was just updated. Since locks don't exist, and disk writes only involve the write-ahead log, transactions are usually fast. Also the Tarantool server may not be using up all the threads of a powerful multi-core processor, so advanced users may be able to start a second Tarantool server on the same processor without ill effects. Additional examples of SQL statements can be found in the Tarantool regression test suite. A complete grammar of supported SQL is provided in the Language reference chapter. Since not all Tarantool operations can be expressed in SQL, to gain complete access to data manipulation functionality one must use a Perl, Python, Ruby or other programming language connector. The client/server protocol is open and documented: an annotated BNF can be found in the source tree, file doc/protocol.txt.
    tarantool-1.5.1.218.g1a69fd6/doc/user/persistence-architecture.xml0000664000000000000000000000770412202131537023235 0ustar rootroot %tnt; ]>
    Data persistence To maintain data persistence, Tarantool writes each data change request (INSERT, UPDATE, DELETE) into a write-ahead log. WAL files have extension .xlog and are stored in . A new WAL file is created for every records. Each INSERT, UPDATE or DELETE gets assigned a continuously growing 64-bit log sequence number. The name of the log file is based on the log sequence number of the first record this file contains. Apart from a log sequence number and the data change request (its format is the same as in the binary protocol and is described in doc/box-protocol.txt), each WAL record contains a checksum and a UNIX time stamp. Tarantool processes requests atomically: a change is either accepted and recorded in the WAL, or discarded completely. Let's clarify how this happens, using REPLACE command as an example: The server attempts to locate the original tuple by primary key. If found, a reference to the tuple is retained for later use. The new tuple is then validated. If it violates a unique-key constraint, misses an indexed field, or an index-field type does not match the type of the index, the change is aborted. The new tuple replaces the old tuple in all existing indexes. A message is sent to WAL writer running in a separate thread, requesting that the change is recorded in the WAL. The server switches to work on the next request until the write is acknowledged. On success, a confirmation is sent to the client. Upon failure, a rollback procedure is begun. During the rollback procedure, the transaction processor rolls back all changes to the database which occurred after the first failed change, from latest to oldest, up to the first failed change. All rolled back requests are aborted with error. No new change is applied while rollback is in progress. When the rollback procedure is finished, the servers restarts the processing pipeline. One advantage of the described algorithm is that complete request pipelining is achieved, even for requests on the same value of the primary key. As a result, database performance doesn't degrade even if all requests touch upon the same key in the same space. The transaction processor and the WAL writer threads communicate using asynchronous (yet reliable) messaging; the transaction processor thread, not being blocked on WAL tasks, continues to handle requests quickly even at high volumes of disk I/O. A response to a request is sent as soon as it is ready, even if there were earlier incomplete requests on the same connection. In particular, SELECT performance, even for SELECTs running on a connection packed with UPDATEs and DELETEs, remains unaffected by disk load. WAL writer employs a number of durability modes, as defined in configuration variable . It is possible to turn the write ahead log completely off, by setting to none. Even without the write ahead log it's still possible to take a persistent copy of the entire data set with .
    tarantool-1.5.1.218.g1a69fd6/doc/user/CMakeLists.txt0000664000000000000000000001011012202131537020230 0ustar rootroot if (XMLLINT STREQUAL "XMLLINT-NOTFOUND") message (FATAL_ERROR "xmllint is missing") endif() if (XSLTPROC STREQUAL "XSLTPROC-NOTFOUND") message (FATAL_ERROR "xsltproc is missing") endif() if (LYNX STREQUAL "LYNX-NOTFOUND") message (FATAL_ERROR "lynx is missing") endif() set(PATH_USERGUIDE_HTML "${PROJECT_BINARY_DIR}/doc/www-data/tarantool_user_guide.html") set(PATH_USERGUIDE_TXT "${PROJECT_BINARY_DIR}/doc/user/tarantool_user_guide.txt") # XMLLINT is not able to validate SCHEMATRON constraints, and # therefore is not a good validation tool for DocBook 5. However, # it can validate the entire document, following xinclude # directives, and thus is used here. To validate individual XML # files, or for troubleshooting, I (Kostja) recommend using jing, # since its diagnostics output is significantly more readable: # jing http://docbook.org/xml/5.0/rng/docbookxi.rng file.xml # add_custom_target(doc-check ALL COMMAND ${XMLLINT} --xinclude --noout --relaxng http://docbook.org/xml/5.0/rng/docbookxi.rng ${CMAKE_SOURCE_DIR}/doc/user/user.xml) # # xsltproc-based documentation generation (default) # add_custom_command(OUTPUT ${PATH_USERGUIDE_HTML} COMMAND ${XSLTPROC} --nonet --stringparam collect.xref.targets "all" --xinclude -o ${PATH_USERGUIDE_HTML} ${CMAKE_SOURCE_DIR}/doc/user/tnt-html.xsl ${CMAKE_SOURCE_DIR}/doc/user/user.xml) add_custom_command(OUTPUT ${PATH_USERGUIDE_TXT} DEPENDS ${PATH_USERGUIDE_HTML} COMMAND ${LYNX} -dump ${PATH_USERGUIDE_HTML} > ${PATH_USERGUIDE_TXT}) add_custom_target(html DEPENDS ${PATH_USERGUIDE_HTML}) add_custom_target(txt DEPENDS ${PATH_USERGUIDE_TXT}) add_custom_target(doc-autogen ALL DEPENDS ${PATH_USERGUIDE_HTML} ${PATH_USERGUIDE_TXT}) install (FILES ${PATH_USERGUIDE_HTML} ${PATH_USERGUIDE_TXT} DESTINATION share/doc/tarantool) add_custom_target(pdf COMMAND ${XSLTPROC} --nonet --stringparam collect.xref.targets "all" --xinclude -o tarantool_user_guide.fo ${CMAKE_SOURCE_DIR}/doc/user/tnt-fo.xsl ${CMAKE_SOURCE_DIR}/doc/user/user.xml COMMAND fop tarantool_user_guide.fo tarantool_user_guide.pdf) add_custom_target(relink WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${XSLTPROC} --nonet --stringparam collect.xref.targets "only" --xinclude tnt-html.xsl user.xml) # # Java saxon-based documentation generation (misc) # add_custom_target(html-saxon COMMAND java -cp "/usr/share/java/saxon.jar:/usr/share/java/xml-resolver.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/xercesImpl.jar:/etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar" -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration com.icl.saxon.StyleSheet -x org.apache.xml.resolver.tools.ResolvingXMLReader -y org.apache.xml.resolver.tools.ResolvingXMLReader -r org.apache.xml.resolver.tools.CatalogResolver -u -o ${PATH_USERGUIDE_HTML} user.xml tnt-html.xsl) add_custom_target(pdf-saxon COMMAND java -cp "/usr/share/java/saxon.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/xercesImpl.jar:/etc/xml/resolver:/usr/share/java/xslthl.jar" -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration com.icl.saxon.StyleSheet -x org.apache.xml.resolver.tools.ResolvingXMLReader -y org.apache.xml.resolver.tools.ResolvingXMLReader -r org.apache.xml.resolver.tools.CatalogResolver -u -o tarantool_user_guide.fo user.xml tnt-fo.xsl COMMAND fop tarantool_user_guide.fo tarantool_user_guide.pdf) tarantool-1.5.1.218.g1a69fd6/doc/user/client-reference.xml0000664000000000000000000004511212242653271021446 0ustar rootroot Client reference This appendix shows all legal syntax for the tarantool command-line client, with short notes and examples. Other client programs may have similar options and statement syntaxes. Conventions used in this appendix Tokens are character sequences which are treated as syntactic units within statements. Square brackets [ and ] enclose optional syntax. Three dots in a row ... mean the preceding tokens may be repeated. A vertical bar | means the preceding and following tokens are mutually exclusive alternatives. Options when starting client from the command line General form: tarantool [option...] [statement]. Statement will be described in a later section. Option is one of the following (in alphabetical order by the long form of the option): --admin-port Syntax: short form: -a port-number long form: --a[dmin-port] [=] port-number. Effect: Client will look for the server on the port designated by port-number. Notes: The administrative port is normally set to 33015 in the server configuration file. --bin Syntax: short form: -B long form: --b[in]. Effect: When displaying with the Lua printer, treat values with type NUM as if they are type STR, unless they are arguments in updates used for arithmetic. Example: --bin --cat Syntax: short form: -C file-name long form: --c[at] file-name. Effect: Client will print the contents of the write-ahead log or snapshot designated by file-name. Example: --cat /tarantool_user/work_dir/00000000000000000018.xlog Notes: The client stops after displaying the contents. --delim Syntax: short form: -D delimiter long form: --d[elim] delimiter. Effect: If --cat is used, then put delimiter at end of each line of a Lua file. If --cat is not used, then require that all statements end with delimiter. Example: --delim = '!' Notes: See also the SETOPT DELIMITER statement. --format Syntax: short form: -M tarantool|raw long form: --fo[rmat] tarantool|raw. Effect: set format for output from --cat Example: --format tarantool Notes: The default format is tarantool. --from Syntax: short form: -F log-sequence-number long form: --fr[om] log-sequence-number. Effect: Play only what has a a log sequence number greater than or equal to log-sequence-number. Example: --from 55 Notes: see also --play and --to. --header Syntax: short form: -H long form: --hea[der]. Effect: Add a header if --format=raw. Example: --header Notes: the default is 'no header'. --help Syntax: short form: (none) long form: --hel[p]. Effect: Client displays a help message including a list of options. Example: --help Notes: The client stops after displaying the help. --host Syntax: short form: -h host-name long form: --ho[st] [=] host-name. Effect: Client will look for the server on the computer designated by host-name. Example: --host = 127.0.0.1 Notes: default value is localhost. --play Syntax: short form: -P file-name long form: --pl[ay] ffile-name. Effect: Client will tell server to replay the write-ahead log designated by file-name. Example: --play /tarantool_user/work_dir/00000000000000000018.xlog --port Syntax: short form: -p port-number long form: --po[rt] [=] port-number. Effect: Client will look for the server on the port designated by port-number. Example: --port = 33013 Notes: default value is 33013. --rpl Syntax: short form: -R server-name long form: --rpl server-name. Effect: Act as a replica for the server specified by server-name. Example: --rpl = wombat --space Syntax: short form: -S space-number Long form: --s[pace] space-number. Effect: Play only what is applicable to the space designated by space-number. Example: --space 0 --to Syntax: short form: -T log-sequence-number long form: --t[o] log-sequence-number. Effect: Play only what has a log sequence number less than or equal to log-sequence-number. Example: --to 66 Notes: see also --play and --from. --version Syntax: short form: -v long form: --v[ersion]. Effect: Client displays version information. Example: --version Notes: The client stops after displaying the version. Tokens for use within statements Keywords are: Character sequences containing only letters of the English alphabet. Examples: SELECT, INTO, FIBER. Notes: Keywords are case insensitive so SELECT and Select are the same thing. Tuple set identifiers are: Lower case letter 't' followed by one or more digits. Examples: t0, t55. Field identifiers are: Lower case letter 'k' followed by one or more digits. Examples: k0, k55. Procedure identifiers are: Any sequence of letters, digits, or underscores which is legal according to the rules for Lua identifiers. String literals are: Any sequence of zero or more characters enclosed in single quotes. Examples: 'Hello, world', 'A'. Numeric literals are: Character sequences containing only digits, optionally preceded by + or -. Examples: 55, -. Notes: Tarantool NUM data type is unsigned, so -1 is understood as a large unsigned number. Single-byte tokens are: * or , or ( or ). Examples: * , ( ). Tokens must be separated from each other by one or more spaces, except that spaces are not necessary around single-byte tokens or string literals. Statements in alphabetical order Although an initial statement may be entered on the tarantool command line, generally they are entered following the prompt in interactive mode while tarantool is running. (A prompt will be the name of the host and a greater-than sign, for example localhost>). The end-of-statement marker is a newline (line feed). CALL Syntax: CALL procedure-identifier (). Effect: The client tells the server to execute the procedure identified by procedure-identifier. Example: CALL proc50(). DELETE Syntax: DELETE FROM tuple-set-name WHERE field-name = literal. Effect: Client tells server to delete the tuple identified by the WHERE clause. Example: DELETE FROM t0 WHERE k0='a'. Notes: field-name must identify the primary key. EXIT Syntax: E[XIT]. Effect: The tarantool program stops. Example: EXIT. Notes: same as QUIT. HELP Syntax: H[ELP]. Effect: Client displays a message including a list of possible statements. Example: HELP. INSERT Syntax: INSERT [INTO] tuple-set-identifier VALUES (literal [,literal...]). Effect: Client tells server to add the tuple consisting of the literal values. Example: INSERT INTO t0 VALUES ('a',0). LOADFILE Syntax: LOADFILE string-literal. Effect: The client loads instructions from the file identified by string-literal. Example: LOADFILE '/home/tarantool_user/file5.txt'. LUA Syntax: LUA token [token...]. Effect: Client tells server to execute the tokens as Lua statements. Example: LUA "hello".." world". NOTEE Syntax: NOTEE. Effect: Client ceases to write to a file, thus canceling the effect of the TEE statement. Example: NOTEE. PING Syntax: PING. Effect: Client sends a ping to the server. Example: PING. QUIT Syntax: Q[UIT]. Effect: The client stops. Example: QUIT. Notes: same as EXIT. RELOAD Syntax: RELOAD CONFIGURATION. Effect: Client tells server to re-read the configuration file. Example: RELOAD CONFIGURATION. Notes: The client sends to the server's administrative port. REPLACE Syntax; REPLACE [INTO] tuple-set-identifier VALUES (literal [,literal...]). Effect: Client tells server to add the tuple consisting of the literal values. Example: REPLACE INTO t0 VALUES ('a',0). Notes: REPLACE and INSERT are the same, except that INSERT will return an error if a tuple already exists with the same primary key. SAVE Syntax: SAVE COREDUMP | SNAPSHOT. Effect: Client tells server to save the designated object. Example: SAVE SNAPSHOT. Notes: The client sends to the server's administrative port. SELECT Syntax: SELECT * FROM tuple-set-identifier WHERE field-identifier = literal [AND|OR field-identifier = literal...] [LIMIT numeric-literal [,numeric-literal]]. Effect: Client tells server to find the tuple or tuples identified in the WHERE clause. Example: SELECT * FROM t0 WHERE k0 = 5 AND k1 = 7 LIMIT 1. SET Syntax: SET INJECTION name-token state-token. Effect: In normal mode: error. Notes: This statement is only available in debug mode. SETOPT Syntax: SETOPT DELIMITER = string-literal. The string must be a value in single quotes. Effect: string becomes end-of-statement delimiter, so newline alone is not treated as end of statement. Example: SETOPT DELIMITER = '!'. SHOW Syntax: SHOW CONFIGURATION | FIBER | INFO | INJECTIONS | PALLOC | PLUGINS | SLAB | STAT. Effect: The client asks the server for information about environment or statistics. Example: SHOW INFO. Notes: The client sends to the administrative port. SHOW INJECTIONS is only available in debug mode. TEE Syntax: TEE string-literal. Effect: The client begins logging in the file identified by string-literal. Example: TEE '/home/tarantool_user/log.txt'. Notes: TEE may also be set up via an option on the command line. UPDATE Syntax: UPDATE tuple-set-identifier SET field-identifier = literal [,field-identifier = literal...] WHERE field-identifier = literal. Effect: Client tells server to change the tuple identified in the WHERE clause. Example: UPDATE t1 SET k1= 'K', k2 = 7 WHERE k0 = 0. For a condensed Backus-Naur Form [BNF] description of some of the statements, see doc/box-protocol.txt and doc/sql.txt. tarantool-1.5.1.218.g1a69fd6/doc/user/target.db0000664000000000000000000006617612242653271017324 0ustar rootroot
    Tarantool User Guide, version 1.5.1-179-ge2226a5Tarantool User Guide, version 1.5.1-179-ge2226a5
    PrefaceChapter 1, Preface
    Tarantool: an overviewthe section called “Tarantool: an overview”
    Conventionsthe section called “Conventions”
    Reporting bugsthe section called “Reporting bugs”
    Getting startedChapter 2, Getting started
    Downloading and installing a binary packagethe section called “Downloading and installing a binary package”
    Downloading and building a source packagethe section called “Downloading and building a source package”
    Starting Tarantool and making your first databasethe section called “Starting Tarantool and making your first database”
    Data model and data persistenceChapter 3, Data model and data persistence
    Dynamic data modelthe section called “Dynamic data model”
    Data persistencethe section called “Data persistence”
    Language referenceChapter 4, Language reference
    Data manipulationthe section called “Data manipulation”
    Memcached protocolthe section called “Memcached protocol”
    Administrative consolethe section called “Administrative console”???TITLE???SAVE SNAPSHOT???TITLE???RELOAD CONFIGURATION???TITLE???SHOW CONFIGURATION???TITLE???SHOW INFO???TITLE???SHOW STAT???TITLE???SHOW SLAB???TITLE???SHOW PALLOC???TITLE???SAVE COREDUMP???TITLE???SHOW FIBER???TITLE???LUA ...
    Writing stored procedures in Luathe section called “Writing stored procedures in Lua”???TITLE???init.lua???TITLE???tonumber64
    Package boxthe section called “Package box???TITLE???box???TITLE?????????TITLE???box.select???TITLE?????????TITLE???box.select_limit???TITLE?????????TITLE?????????TITLE?????????TITLE???box.select_range???TITLE???box.select_reverse_range
    Package box.tuplethe section called “Package box.tuple???TITLE???box.tuple
    Package box.cjsonthe section called “Package box.cjson???TITLE???box.cjson
    Package box.spacethe section called “Package box.space???TITLE???box.space???TITLE???box.space[i].select_range()???TITLE???box.space.select_reverse_range
    Package box.indexthe section called “Package box.index???TITLE???box.index???TITLE???box.index.iterator(type, ...)???TITLE??????TITLE???Common iterator typesTable 4.1, “Common iterator types”TREE iterator typesTable 4.2, “TREE iterator types”BITSET iterator typesTable 4.3, “BITSET iterator types”
    Package box.fiberthe section called “Package box.fiber???TITLE??????TITLE??????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE???box.fiber.yield(...)???TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE??????
    Package box.sessionthe section called “Package box.session
    Package box.ipc — inter procedure communicationthe section called “Package box.ipc — inter procedure communication”???TITLE??????TITLE???
    Package box.socket — TCP and UDP socketsthe section called “Package box.socket — TCP and UDP sockets”???TITLE??????TITLE???readline() returnsTable 4.4, “readline() returns”
    Package box.net.box — working with networked Tarantool peersthe section called “Package box.net.box — working with networked Tarantool peers”???TITLE??????TITLE??????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE?????????TITLE??????
    Packages box.cfg, box.info, box.slab and box.stat: server introspectionthe section called “Packages box.cfg, box.info, box.slab and box.stat: server introspection”???TITLE?????????TITLE??????
    Limitations of stored proceduresthe section called “Limitations of stored procedures”
    Defining triggers in Luathe section called “Defining triggers in Lua”
    Triggers on connect and disconnectsession triggers
    ReplicationChapter 5, Replication
    Replication architecturethe section called “Replication architecture”
    Setting up the masterthe section called “Setting up the master”
    Setting up a replicathe section called “Setting up a replica”
    Recovering from a degraded statethe section called “Recovering from a degraded state”
    Server administrationChapter 6, Server administration
    Server signal handlingthe section called “Server signal handling”
    Utility tarantarthe section called “Utility tarantar
    System-specific administration notesthe section called “System-specific administration notes”
    Debian GNU/Linux and Ubuntuthe section called “Debian GNU/Linux and Ubuntu”
    Fedora, RHEL, CentOSthe section called “Fedora, RHEL, CentOS”
    FreeBSDthe section called “FreeBSD”
    Mac OS Xthe section called “Mac OS X”
    Configuration referenceChapter 7, Configuration reference
    Command line optionsthe section called “Command line options”???TITLE??????TITLE??????TITLE??????TITLE???--init-storage
    The option fileoption fileBasic parametersTable 7.1, “Basic parameters”???TITLE???work_dir???TITLE???script_dir???TITLE???wal_dir???TITLE???snap_dir???TITLE???bind_ipaddr???TITLE???primary_port???TITLE???secondary_port???TITLE???admin_port???TITLE???custom_proc_titleConfiguring the storageTable 7.2, “Configuring the storage”???TITLE???slab_alloc_arena???TITLE???the section called “The option file”Binary logging and snapshotsTable 7.3, “Binary logging and snapshots”???TITLE???rows_per_wal???TITLE???wal_modeReplicationTable 7.4, “Replication”???TITLE???replication_port???TITLE???replication_sourceNetworkingTable 7.5, “Networking”LoggingTable 7.6, “Logging”Memcached protocol supportTable 7.7, “Memcached protocol support”???TITLE???memcached_port???TITLE???memcached_space???TITLE???memcached_expire
    ConnectorsChapter 8, Connectors
    Packet examplethe section called “Packet example”
    Cthe section called “C”
    node.jsthe section called “node.js”
    Perlthe section called “Perl”
    PHPthe section called “PHP”
    Pythonthe section called “Python”
    Rubythe section called “Ruby”
    Server process titlesAppendix A, Server process titles
    List of error codesAppendix B, List of error codes???TITLE???ER_NONMASTER???TITLE???ER_ILLEGAL_PARAMS???TITLE???ER_MEMORY_ISSUE???TITLE???ER_WAL_IO???TITLE???ER_KEY_PART_COUNT???TITLE???ER_NO_SUCH_SPACE???TITLE???ER_NO_SUCH_INDEX???TITLE???ER_PROC_LUA???TITLE???ER_FIBER_STACK???TITLE???ER_UPDATE_FIELD
    LimitationsAppendix C, Limitations???TITLE???limitations-index-field-count???TITLE???limitations-index-count???TITLE???limitations-tuple-field-count???TITLE???limitations-space-count???TITLE???limitations-connections-count???TITLE???limitations-slab-alloc-arena-size???TITLE???limitations-updae-count
    tarantool-1.5.1.218.g1a69fd6/doc/user/tnt-html.xsl0000664000000000000000000000350612202131537020002 0ustar rootroot file:////usr/share/xml/docbook/stylesheet/docbook-xsl-ns/highlighting/xslthl-config.xml tarantool-1.5.1.218.g1a69fd6/doc/user/connectors.xml0000664000000000000000000003125012242653271020407 0ustar rootroot %tnt; ]> Connectors
    This chapter documents APIs for various programming languages.
    Apart from the native Tarantool client driver, you can always use a Memcached driver of your choice, after enabling Memcached protocol in the configuration file.
    Packet example The Tarantool API exists so that a client program can send a request packet to the server, and receive a response. Here is an example of a what the client would send for INSERT INTO t0 VALUES ('A','BB'). The BNF description of the components is in file doc/box-protocol.txt. Component Byte#0 Byte#1 Byte#2 Byte#3 type 13 0 0 0 body_length 17 0 0 0 request_id 1 0 0 0 space_no 0 0 0 0 flags 2 0 0 0 cardinality 2 0 0 0 field[0] size 1 field[0] data 65 field[1] size 2 field[1] data 66 66 Now, one could send that packet to the tarantool_box server, and interpret the response (box-protocol.txt has a description of the packet format for responses as well as requests). But it would be easier, and less error-prone, if one could invoke a routine that formats the packet according to typed parameters. Something like response=tarantool_routine("insert",0,"A","B");. And that is why APIs exist for drivers for C, Perl, Python, PHP, Ruby, and so on.
    C Here is a complete C program that inserts ['A','BB'] into space[0] via the C API for the binary protocol. To compile, paste the code into a file named example.c and say gcc -o example example.c -I/tarantool-directory/connector/c/include where tarantool-directory = the directory that contains the necessary file tp.h, and the default library path contains the directory where Tarantool library files were placed at installation time. Before trying to run, check that the server (tarantool_box) is running on localhost (127.0.0.1) and its primary port is the default (33013) and space[0]'s primary key type is string (space[0].index[0].key_field[0].type = "STR" in configuration file). To run, say ./example. The program will format a buffer for sending an INSERT request, then open a socket connection with the tarantool_box server at localhost:33013, then send the request, then check if the server returned an error, then — if all is well — print "Insert succeeded". If the row already exists, the program will print Duplicate key exists in unique index 0. #include <arpa/inet.h> #include <stdio.h> #include <tp.h> /* the usual Tarantool include */ int main() { struct tp request; /* area for sending to server */ struct tp reply; /* area for getting server reply */ int fd; /* file descriptor for socket */ struct sockaddr_in tt; /* the usual socket address info */ tp_init(&request, NULL, 0, tp_realloc, NULL); /* initialize request buffer */ tp_insert(&request, 0, 2); /* append INSERT header */ tp_tuple(&request); /* begin appending body */ tp_sz(&request,""); /* append field[0] */ tp_sz(&request,"BB"); /* append field[1] */ if ((fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) <= 0) /* open the socket, abort if failure */ exit(1); memset(&tt, 0, sizeof(tt)); /* connect to localhost:33013 */ tt.sin_family = AF_INET; tt.sin_addr.s_addr = inet_addr("127.0.0.1"); tt.sin_port = htons(33013); if (connect(fd, (struct sockaddr *) &tt, sizeof(tt)) <= 0) /* connect, abort if failure */ exit(1); int rc = write(fd, tp_buf(&request), tp_used(&request)); /* send the INSERT request */ if (rc != tp_used(&request)) /* abort if send failed */ exit(1); tp_init(&reply, NULL, 0, tp_realloc, NULL); /* initialize reply buffer */ while (1) { ssize_t to_read = tp_req(&reply); if (to_read <= 0) break; ssize_t new_size = tp_ensure(&reply, to_read); if (new_size == -1) /* abort if error e.g. no memory */ exit(1); ssize_t res = read(fd, reply.p, to_read); /* get reply */ if (res <= 0) /* abort if error e.g. no reply */ exit(1); tp_use(&reply, res); } ssize_t server_code = tp_reply(&reply); /* display+abort if error e.g. duplicate key */ if (server_code != 0) { printf("error: %-.*s\n", tp_replyerrorlen(&reply), tp_replyerror(&reply)); tp_free(&reply); exit(1); } tp_free(&request); /* clean up */ tp_free(&reply); close(fd); printf("Insert succeeded\n"); /* congratulate self */ } The example program only shows one command and does not show all that's necessary for good practice. For that, please see connector/c in the source tree.
    Erlang Please see https://github.com/tarantool/tarantool-erlang.
    Java Please see http://dgreenru.github.io/tarantool-java/.
    node.js Please see http://github.com/devgru/node-tarantool.
    Perl The Perl driver requires a schema definition. Please refer to CPAN module DR::Tarantool.
    PHP Please see tarantool-php project at GitHub.
    Python Here is a complete Python program that inserts ['A','BB'] into space[0] via the high-level Python API. To prepare, paste the code into a file named example.py and say: export PYTHONPATH=tarantool-directory/test/lib where tarantool-directory/test/lib = the directory that contains the necessary file box_connection.py. This will be the directory where Tarantool Python library files were placed at installation time for a source download. Before trying to run, check that the server (tarantool_box) is running on localhost (127.0.0.1) and its primary port is the default (33013) and space[0]'s primary key type is string (space[0].index[0].key_field[0].type = "STR" in configuration file). To run, say python example.py. The program will connect to the server, send the request, and display Insert OK, 1 row affected if all went well. If the row already exists, the program will print Duplicate key exists in unique index 0. #!/usr/bin/python from box_connection import BoxConnection c = BoxConnection("127.0.0.1", 33013) result = c.execute("INSERT INTO t0 VALUES ('A','BB')") print result The example program only shows one command and does not show all that's necessary for good practice. For that, please see http://github.com/mailru/tarantool-python and https://github.com/zlobspb/txtarantool.
    Ruby You need Ruby 1.9 or later to use this connector. Connector sources are located in http://github.com/mailru/tarantool-ruby.
    tarantool-1.5.1.218.g1a69fd6/doc/user/user.xml0000664000000000000000000000164512242653271017215 0ustar rootroot %tnt; ]> Tarantool User Guide, version &tnt_version; tarantool-1.5.1.218.g1a69fd6/doc/user/replication.xml0000664000000000000000000001657012242653271020553 0ustar rootroot %tnt; ]> Replication
    To set up replication, it's necessary to prepare the master, configure a replica, and establish procedures for recovery from a degraded state.
    Replication architecture A replica gets all updates from the master by continuously fetching and applying its write ahead log (WAL). Each record in the WAL represents a single Tarantool command such as INSERT or UPDATE or DELETE, and is assigned a monotonically growing log sequence number (LSN). In essence, Tarantool replication is row-based: all data change commands are fully deterministic and operate on a single record. A stored program invocation does not enter the Write Ahead Log. Instead, log events for actual UPDATEs and DELETEs, performed by the Lua code, are written to the log. This ensures that possible non-determinism of Lua does not cause replication to go out of sync. For replication to work correctly, the latest LSN on the replica must match or fall behind the latest LSN on the master. If the replica had its own updates, this would lead to it getting out of sync, since updates from the master having identical LSNs would not be applied. In fact, if replication is ON, Tarantool does not accept updates, even on its .
    Setting up the master To prepare the master for connections from the replica, it's only necessary to enable in the configuration file. An example configuration file can be found in test/replication/cfg/master.cfg. A master with enabled replication_port can accept connections from as many replicas as necessary on that port. Each replica has its own replication state.
    Setting up a replica A server, whether master or replica, always requires a valid snapshot file to boot from. For a master, a snapshot file is usually prepared with with the option. For a replica, it's usually copied from the master. To start replication, configure . Other parameters can also be changed, but existing spaces and their primary keys on the replica must be identical to the ones on the master. Once connected to the master, the replica requests all changes that happened after the latest local LSN. It is therefore necessary to keep WAL files on the master host as long as there are replicas that haven't applied them yet. An example configuration can be found in test/replication/cfg/replica.cfg. If required WAL files are absent, a replica can be "re-seeded" at any time with a newer snapshot file, manually copied from the master. Replication parameters are "dynamic", which allows the replica to become a master and vice versa with the help of the statement.
    Recovering from a degraded state "Degraded state" is a situation when the master becomes unavailable -- due to hardware or network failure, or due to a programming bug. There is no reliable way for a replica to detect that the master is gone for good, since sources of failure and replication environments vary significantly. A separate monitoring script (or scripts, if a decision-making quorum is desirable) is necessary to detect a master failure. Such a script would typically try to update a tuple in an auxiliary space on the master, and raise an alarm if a network or disk error persists for longer than is acceptable. When a master failure is detected, the following needs to be done: First and foremost, make sure that the master does not accept updates. This is necessary to prevent the situation when, should the master failure end up being transient, some updates still go to the master, while others already end up on the replica. If the master is available, the easiest way to turn on read-only mode is to turn Tarantool into a replica of itself. This can be done by setting the master's to point to self. If the master is not available, best bet is to log into the machine and kill the server, or change the machine's network configuration (DNS, IP address). If the machine is not available, it's perhaps prudent to power it off. Record the replica's LSN, by issuing . This LSN may prove useful if there are updates on the master that never reached the replica. Propagate the replica to become a master. This is done by setting on replica to an empty string. Change the application configuration to point to the new master. This can be done either by changing the application's internal routing table, or by setting up the old master's IP address on the new master's machine, or using some other approach. Recover the old master. If there are updates that didn't make it to the new master, they have to be applied manually. You can use the Tarantool command line client to read the server log files.
    tarantool-1.5.1.218.g1a69fd6/doc/coding-style-python.txt0000664000000000000000000007733012202131537021214 0ustar rootrootThe project's coding style for Python Code is based on a version of the PEP8 coding style. The latest version of the Linux style can be found at: http://www.python.org/dev/peps/pep-0008/ ------------------------------------------------------------------------------- Introduction This document gives coding conventions for the Python code comprising the standard library in the main Python distribution. Please see the companion informational PEP describing style guidelines for the C code in the C implementation of Python[1]. This document was adapted from Guido's original Python Style Guide essay[2], with some additions from Barry's style guide[5]. Where there's conflict, Guido's style rules for the purposes of this PEP. This PEP may still be incomplete (in fact, it may never be finished ). A Foolish Consistency is the Hobgoblin of Little Minds One of Guido's key insights is that code is read much more often than it is written. The guidelines provided here are intended to improve the readability of code and make it consistent across the wide spectrum of Python code. As PEP 20 [6] says, "Readability counts". A style guide is about consistency. Consistency with this style guide is important. Consistency within a project is more important. Consistency within one module or function is most important. But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply. When in doubt, use your best judgment. Look at other examples and decide what looks best. And don't hesitate to ask! Two good reasons to break a particular rule: (1) When applying the rule would make the code less readable, even for someone who is used to reading code that follows the rules. (2) To be consistent with surrounding code that also breaks it (maybe for historic reasons) -- although this is also an opportunity to clean up someone else's mess (in true XP style). Code lay-out Indentation Use 4 spaces per indentation level. For really old code that you don't want to mess up, you can continue to use 8-space tabs. Continuation lines should align wrapped elements either vertically using Python's implicit line joining inside parentheses, brackets and braces, or using a hanging indent. When using a hanging indent the following considerations should be applied; there should be no arguments on the first line and further indentation should be used to clearly distinguish itself as a continuation line. Yes: # Aligned with opening delimiter foo = long_function_name(var_one, var_two, var_three, var_four) # More indentation included to distinguish this from the rest. def long_function_name( var_one, var_two, var_three, var_four): print(var_one) No: # Arguments on first line forbidden when not using vertical alignment foo = long_function_name(var_one, var_two, var_three, var_four) # Further indentation required as indentation is not distinguishable def long_function_name( var_one, var_two, var_three, var_four): print(var_one) Optional: # Extra indentation is not necessary. foo = long_function_name( var_one, var_two, var_three, var_four) Tabs or Spaces? Never mix tabs and spaces. The most popular way of indenting Python is with spaces only. The second-most popular way is with tabs only. Code indented with a mixture of tabs and spaces should be converted to using spaces exclusively. When invoking the Python command line interpreter with the -t option, it issues warnings about code that illegally mixes tabs and spaces. When using -tt these warnings become errors. These options are highly recommended! For new projects, spaces-only are strongly recommended over tabs. Most editors have features that make this easy to do. Maximum Line Length Limit all lines to a maximum of 79 characters. There are still many devices around that are limited to 80 character lines; plus, limiting windows to 80 characters makes it possible to have several windows side-by-side. The default wrapping on such devices disrupts the visual structure of the code, making it more difficult to understand. Therefore, please limit all lines to a maximum of 79 characters. For flowing long blocks of text (docstrings or comments), limiting the length to 72 characters is recommended. The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation. Make sure to indent the continued line appropriately. The preferred place to break around a binary operator is *after* the operator, not before it. Some examples: class Rectangle(Blob): def __init__(self, width, height, color='black', emphasis=None, highlight=0): if (width == 0 and height == 0 and color == 'red' and emphasis == 'strong' or highlight > 100): raise ValueError("sorry, you lose") if width == 0 and height == 0 and (color == 'red' or emphasis is None): raise ValueError("I don't think so -- values are %s, %s" % (width, height)) Blob.__init__(self, width, height, color, emphasis, highlight) Blank Lines Separate top-level function and class definitions with two blank lines. Method definitions inside a class are separated by a single blank line. Extra blank lines may be used (sparingly) to separate groups of related functions. Blank lines may be omitted between a bunch of related one-liners (e.g. a set of dummy implementations). Use blank lines in functions, sparingly, to indicate logical sections. Python accepts the control-L (i.e. ^L) form feed character as whitespace; Many tools treat these characters as page separators, so you may use them to separate pages of related sections of your file. Note, some editors and web-based code viewers may not recognize control-L as a form feed and will show another glyph in its place. Encodings (PEP 263) Code in the core Python distribution should always use the ASCII or Latin-1 encoding (a.k.a. ISO-8859-1). For Python 3.0 and beyond, UTF-8 is preferred over Latin-1, see PEP 3120. Files using ASCII should not have a coding cookie. Latin-1 (or UTF-8) should only be used when a comment or docstring needs to mention an author name that requires Latin-1; otherwise, using \x, \u or \U escapes is the preferred way to include non-ASCII data in string literals. For Python 3.0 and beyond, the following policy is prescribed for the standard library (see PEP 3131): All identifiers in the Python standard library MUST use ASCII-only identifiers, and SHOULD use English words wherever feasible (in many cases, abbreviations and technical terms are used which aren't English). In addition, string literals and comments must also be in ASCII. The only exceptions are (a) test cases testing the non-ASCII features, and (b) names of authors. Authors whose names are not based on the latin alphabet MUST provide a latin transliteration of their names. Open source projects with a global audience are encouraged to adopt a similar policy. Imports - Imports should usually be on separate lines, e.g.: Yes: import os import sys No: import sys, os it's okay to say this though: from subprocess import Popen, PIPE - Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants. Imports should be grouped in the following order: 1. standard library imports 2. related third party imports 3. local application/library specific imports You should put a blank line between each group of imports. Put any relevant __all__ specification after the imports. - Relative imports for intra-package imports are highly discouraged. Always use the absolute package path for all imports. Even now that PEP 328 [7] is fully implemented in Python 2.5, its style of explicit relative imports is actively discouraged; absolute imports are more portable and usually more readable. - When importing a class from a class-containing module, it's usually okay to spell this from myclass import MyClass from foo.bar.yourclass import YourClass If this spelling causes local name clashes, then spell them import myclass import foo.bar.yourclass and use "myclass.MyClass" and "foo.bar.yourclass.YourClass" Whitespace in Expressions and Statements Pet Peeves Avoid extraneous whitespace in the following situations: - Immediately inside parentheses, brackets or braces. Yes: spam(ham[1], {eggs: 2}) No: spam( ham[ 1 ], { eggs: 2 } ) - Immediately before a comma, semicolon, or colon: Yes: if x == 4: print x, y; x, y = y, x No: if x == 4 : print x , y ; x , y = y , x - Immediately before the open parenthesis that starts the argument list of a function call: Yes: spam(1) No: spam (1) - Immediately before the open parenthesis that starts an indexing or slicing: Yes: dict['key'] = list[index] No: dict ['key'] = list [index] - More than one space around an assignment (or other) operator to align it with another. Yes: x = 1 y = 2 long_variable = 3 No: x = 1 y = 2 long_variable = 3 Other Recommendations - Always surround these binary operators with a single space on either side: assignment (=), augmented assignment (+=, -= etc.), comparisons (==, <, >, !=, <>, <=, >=, in, not in, is, is not), Booleans (and, or, not). - Use spaces around arithmetic operators: Yes: i = i + 1 submitted += 1 x = x * 2 - 1 hypot2 = x * x + y * y c = (a + b) * (a - b) No: i=i+1 submitted +=1 x = x*2 - 1 hypot2 = x*x + y*y c = (a+b) * (a-b) - Don't use spaces around the '=' sign when used to indicate a keyword argument or a default parameter value. Yes: def complex(real, imag=0.0): return magic(r=real, i=imag) No: def complex(real, imag = 0.0): return magic(r = real, i = imag) - Compound statements (multiple statements on the same line) are generally discouraged. Yes: if foo == 'blah': do_blah_thing() do_one() do_two() do_three() Rather not: if foo == 'blah': do_blah_thing() do_one(); do_two(); do_three() - While sometimes it's okay to put an if/for/while with a small body on the same line, never do this for multi-clause statements. Also avoid folding such long lines! Rather not: if foo == 'blah': do_blah_thing() for x in lst: total += x while t < 10: t = delay() Definitely not: if foo == 'blah': do_blah_thing() else: do_non_blah_thing() try: something() finally: cleanup() do_one(); do_two(); do_three(long, argument, list, like, this) if foo == 'blah': one(); two(); three() Comments Comments that contradict the code are worse than no comments. Always make a priority of keeping the comments up-to-date when the code changes! Comments should be complete sentences. If a comment is a phrase or sentence, its first word should be capitalized, unless it is an identifier that begins with a lower case letter (never alter the case of identifiers!). If a comment is short, the period at the end can be omitted. Block comments generally consist of one or more paragraphs built out of complete sentences, and each sentence should end in a period. You should use two spaces after a sentence-ending period. When writing English, Strunk and White apply. Python coders from non-English speaking countries: please write your comments in English, unless you are 120% sure that the code will never be read by people who don't speak your language. Block Comments Block comments generally apply to some (or all) code that follows them, and are indented to the same level as that code. Each line of a block comment starts with a # and a single space (unless it is indented text inside the comment). Paragraphs inside a block comment are separated by a line containing a single #. Inline Comments Use inline comments sparingly. An inline comment is a comment on the same line as a statement. Inline comments should be separated by at least two spaces from the statement. They should start with a # and a single space. Inline comments are unnecessary and in fact distracting if they state the obvious. Don't do this: x = x + 1 # Increment x But sometimes, this is useful: x = x + 1 # Compensate for border Documentation Strings Conventions for writing good documentation strings (a.k.a. "docstrings") are immortalized in PEP 257 [3]. - Write docstrings for all public modules, functions, classes, and methods. Docstrings are not necessary for non-public methods, but you should have a comment that describes what the method does. This comment should appear after the "def" line. - PEP 257 describes good docstring conventions. Note that most importantly, the """ that ends a multiline docstring should be on a line by itself, and preferably preceded by a blank line, e.g.: """Return a foobang Optional plotz says to frobnicate the bizbaz first. """ - For one liner docstrings, it's okay to keep the closing """ on the same line. Version Bookkeeping If you have to have Subversion, CVS, or RCS crud in your source file, do it as follows. __version__ = "$Revision: 00f8e3bb1197 $" # $Source$ These lines should be included after the module's docstring, before any other code, separated by a blank line above and below. Naming Conventions The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent -- nevertheless, here are the currently recommended naming standards. New modules and packages (including third party frameworks) should be written to these standards, but where an existing library has a different style, internal consistency is preferred. Descriptive: Naming Styles There are a lot of different naming styles. It helps to be able to recognize what naming style is being used, independently from what they are used for. The following naming styles are commonly distinguished: - b (single lowercase letter) - B (single uppercase letter) - lowercase - lower_case_with_underscores - UPPERCASE - UPPER_CASE_WITH_UNDERSCORES - CapitalizedWords (or CapWords, or CamelCase -- so named because of the bumpy look of its letters[4]). This is also sometimes known as StudlyCaps. Note: When using abbreviations in CapWords, capitalize all the letters of the abbreviation. Thus HTTPServerError is better than HttpServerError. - mixedCase (differs from CapitalizedWords by initial lowercase character!) - Capitalized_Words_With_Underscores (ugly!) There's also the style of using a short unique prefix to group related names together. This is not used much in Python, but it is mentioned for completeness. For example, the os.stat() function returns a tuple whose items traditionally have names like st_mode, st_size, st_mtime and so on. (This is done to emphasize the correspondence with the fields of the POSIX system call struct, which helps programmers familiar with that.) The X11 library uses a leading X for all its public functions. In Python, this style is generally deemed unnecessary because attribute and method names are prefixed with an object, and function names are prefixed with a module name. In addition, the following special forms using leading or trailing underscores are recognized (these can generally be combined with any case convention): - _single_leading_underscore: weak "internal use" indicator. E.g. "from M import *" does not import objects whose name starts with an underscore. - single_trailing_underscore_: used by convention to avoid conflicts with Python keyword, e.g. Tkinter.Toplevel(master, class_='ClassName') - __double_leading_underscore: when naming a class attribute, invokes name mangling (inside class FooBar, __boo becomes _FooBar__boo; see below). - __double_leading_and_trailing_underscore__: "magic" objects or attributes that live in user-controlled namespaces. E.g. __init__, __import__ or __file__. Never invent such names; only use them as documented. Prescriptive: Naming Conventions Names to Avoid Never use the characters `l' (lowercase letter el), `O' (uppercase letter oh), or `I' (uppercase letter eye) as single character variable names. In some fonts, these characters are indistinguishable from the numerals one and zero. When tempted to use `l', use `L' instead. Package and Module Names Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged. Since module names are mapped to file names, and some file systems are case insensitive and truncate long names, it is important that module names be chosen to be fairly short -- this won't be a problem on Unix, but it may be a problem when the code is transported to older Mac or Windows versions, or DOS. When an extension module written in C or C++ has an accompanying Python module that provides a higher level (e.g. more object oriented) interface, the C/C++ module has a leading underscore (e.g. _socket). Class Names Almost without exception, class names use the CapWords convention. Classes for internal use have a leading underscore in addition. Exception Names Because exceptions should be classes, the class naming convention applies here. However, you should use the suffix "Error" on your exception names (if the exception actually is an error). Global Variable Names (Let's hope that these variables are meant for use inside one module only.) The conventions are about the same as those for functions. Modules that are designed for use via "from M import *" should use the __all__ mechanism to prevent exporting globals, or use the older convention of prefixing such globals with an underscore (which you might want to do to indicate these globals are "module non-public"). Function Names Function names should be lowercase, with words separated by underscores as necessary to improve readability. mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility. Function and method arguments Always use 'self' for the first argument to instance methods. Always use 'cls' for the first argument to class methods. If a function argument's name clashes with a reserved keyword, it is generally better to append a single trailing underscore rather than use an abbreviation or spelling corruption. Thus "print_" is better than "prnt". (Perhaps better is to avoid such clashes by using a synonym.) Method Names and Instance Variables Use the function naming rules: lowercase with words separated by underscores as necessary to improve readability. Use one leading underscore only for non-public methods and instance variables. To avoid name clashes with subclasses, use two leading underscores to invoke Python's name mangling rules. Python mangles these names with the class name: if class Foo has an attribute named __a, it cannot be accessed by Foo.__a. (An insistent user could still gain access by calling Foo._Foo__a.) Generally, double leading underscores should be used only to avoid name conflicts with attributes in classes designed to be subclassed. Note: there is some controversy about the use of __names (see below). Constants Constants are usually defined on a module level and written in all capital letters with underscores separating words. Examples include MAX_OVERFLOW and TOTAL. Designing for inheritance Always decide whether a class's methods and instance variables (collectively: "attributes") should be public or non-public. If in doubt, choose non-public; it's easier to make it public later than to make a public attribute non-public. Public attributes are those that you expect unrelated clients of your class to use, with your commitment to avoid backward incompatible changes. Non-public attributes are those that are not intended to be used by third parties; you make no guarantees that non-public attributes won't change or even be removed. We don't use the term "private" here, since no attribute is really private in Python (without a generally unnecessary amount of work). Another category of attributes are those that are part of the "subclass API" (often called "protected" in other languages). Some classes are designed to be inherited from, either to extend or modify aspects of the class's behavior. When designing such a class, take care to make explicit decisions about which attributes are public, which are part of the subclass API, and which are truly only to be used by your base class. With this in mind, here are the Pythonic guidelines: - Public attributes should have no leading underscores. - If your public attribute name collides with a reserved keyword, append a single trailing underscore to your attribute name. This is preferable to an abbreviation or corrupted spelling. (However, notwithstanding this rule, 'cls' is the preferred spelling for any variable or argument which is known to be a class, especially the first argument to a class method.) Note 1: See the argument name recommendation above for class methods. - For simple public data attributes, it is best to expose just the attribute name, without complicated accessor/mutator methods. Keep in mind that Python provides an easy path to future enhancement, should you find that a simple data attribute needs to grow functional behavior. In that case, use properties to hide functional implementation behind simple data attribute access syntax. Note 1: Properties only work on new-style classes. Note 2: Try to keep the functional behavior side-effect free, although side-effects such as caching are generally fine. Note 3: Avoid using properties for computationally expensive operations; the attribute notation makes the caller believe that access is (relatively) cheap. - If your class is intended to be subclassed, and you have attributes that you do not want subclasses to use, consider naming them with double leading underscores and no trailing underscores. This invokes Python's name mangling algorithm, where the name of the class is mangled into the attribute name. This helps avoid attribute name collisions should subclasses inadvertently contain attributes with the same name. Note 1: Note that only the simple class name is used in the mangled name, so if a subclass chooses both the same class name and attribute name, you can still get name collisions. Note 2: Name mangling can make certain uses, such as debugging and __getattr__(), less convenient. However the name mangling algorithm is well documented and easy to perform manually. Note 3: Not everyone likes name mangling. Try to balance the need to avoid accidental name clashes with potential use by advanced callers. Programming Recommendations - Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Pyrex, Psyco, and such). For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a+=b or a=a+b. Those statements run more slowly in Jython. In performance sensitive parts of the library, the ''.join() form should be used instead. This will ensure that concatenation occurs in linear time across various implementations. - Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators. Also, beware of writing "if x" when you really mean "if x is not None" -- e.g. when testing whether a variable or argument that defaults to None was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context! - When implementing ordering operations with rich comparisons, it is best to implement all six operations (__eq__, __ne__, __lt__, __le__, __gt__, __ge__) rather than relying on other code to only exercise a particular comparison. To minimize the effort involved, the functools.total_ordering() decorator provides a tool to generate missing comparison methods. PEP 207 indicates that reflexivity rules *are* assumed by Python. Thus, the interpreter may swap y>x with x=x with x<=y, and may swap the arguments of x==y and x!=y. The sort() and min() operations are guaranteed to use the < operator and the max() function uses the > operator. However, it is best to implement all six operations so that confusion doesn't arise in other contexts. - Use class-based exceptions. String exceptions in new code are forbidden, because this language feature is being removed in Python 2.6. Modules or packages should define their own domain-specific base exception class, which should be subclassed from the built-in Exception class. Always include a class docstring. E.g.: class MessageError(Exception): """Base class for errors in the email package.""" Class naming conventions apply here, although you should add the suffix "Error" to your exception classes, if the exception is an error. Non-error exceptions need no special suffix. - When raising an exception, use "raise ValueError('message')" instead of the older form "raise ValueError, 'message'". The paren-using form is preferred because when the exception arguments are long or include string formatting, you don't need to use line continuation characters thanks to the containing parentheses. The older form will be removed in Python 3000. - When catching exceptions, mention specific exceptions whenever possible instead of using a bare 'except:' clause. For example, use: try: import platform_specific_module except ImportError: platform_specific_module = None A bare 'except:' clause will catch SystemExit and KeyboardInterrupt exceptions, making it harder to interrupt a program with Control-C, and can disguise other problems. If you want to catch all exceptions that signal program errors, use 'except Exception:'. A good rule of thumb is to limit use of bare 'except' clauses to two cases: 1) If the exception handler will be printing out or logging the traceback; at least the user will be aware that an error has occurred. 2) If the code needs to do some cleanup work, but then lets the exception propagate upwards with 'raise'. 'try...finally' is a better way to handle this case. - Additionally, for all try/except clauses, limit the 'try' clause to the absolute minimum amount of code necessary. Again, this avoids masking bugs. Yes: try: value = collection[key] except KeyError: return key_not_found(key) else: return handle_value(value) No: try: # Too broad! return handle_value(collection[key]) except KeyError: # Will also catch KeyError raised by handle_value() return key_not_found(key) - Use string methods instead of the string module. String methods are always much faster and share the same API with unicode strings. Override this rule if backward compatibility with Pythons older than 2.0 is required. - Use ''.startswith() and ''.endswith() instead of string slicing to check for prefixes or suffixes. startswith() and endswith() are cleaner and less error prone. For example: Yes: if foo.startswith('bar'): No: if foo[:3] == 'bar': The exception is if your code must work with Python 1.5.2 (but let's hope not!). - Object type comparisons should always use isinstance() instead of comparing types directly. Yes: if isinstance(obj, int): No: if type(obj) is type(1): When checking if an object is a string, keep in mind that it might be a unicode string too! In Python 2.3, str and unicode have a common base class, basestring, so you can do: if isinstance(obj, basestring): - For sequences, (strings, lists, tuples), use the fact that empty sequences are false. Yes: if not seq: if seq: No: if len(seq) if not len(seq) - Don't write string literals that rely on significant trailing whitespace. Such trailing whitespace is visually indistinguishable and some editors (or more recently, reindent.py) will trim them. - Don't compare boolean values to True or False using == Yes: if greeting: No: if greeting == True: Worse: if greeting is True: Rules that apply only to the standard library - Do not use function type annotations in the standard library. These are reserved for users and third-party modules. See PEP 3107 and the bug 10899 for details. References [1] PEP 7, Style Guide for C Code, van Rossum [2] http://www.python.org/doc/essays/styleguide.html [3] PEP 257, Docstring Conventions, Goodger, van Rossum [4] http://www.wikipedia.com/wiki/CamelCase [5] Barry's GNU Mailman style guide http://barry.warsaw.us/software/STYLEGUIDE.txt [6] PEP 20, The Zen of Python [7] PEP 328, Imports: Multi-Line and Absolute/Relative Copyright This document has been placed in the public domain. tarantool-1.5.1.218.g1a69fd6/doc/CMakeLists.txt0000664000000000000000000000023312202131537017257 0ustar rootroot add_subdirectory(man) if (ENABLE_DOC) add_subdirectory(user) add_subdirectory(developer) endif() add_subdirectory(www-data.in EXCLUDE_FROM_ALL) tarantool-1.5.1.218.g1a69fd6/doc/Makefile0000664000000000000000000001517512213333035016171 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/doc/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 doc/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/doc/coding-style.txt0000664000000000000000000010144112202131537017664 0ustar rootrootThe project's coding style is based on a version of the Linux kernel coding style. The latest version of the Linux style can be found at: http://www.kernel.org/doc/Documentation/CodingStyle Since it is open for changes, the version of style that we follow, one from 2007-July-13, will be also copied later in this document. There are a few additional guidelines, either unique to Tarantool or deviating from the Kernel guidelines. A. Chapters 10 "Kconfig configuration files", 11 "Data structures", 13 "Printing kernel messages", 14 "Allocating memory" and 17 "Don't re-invent the kernel macros" do not apply, since they are specific to Linux kernel programming environment. B. The rest of Linux Kernel Coding Style is amended as follows: General guidelines ------------------ We use Git for revision control. The latest development is happening in the 'master' branch. Our git repository is hosted on github, and can be checked out with git clone git://github.com/tarantool/tarantool.git # anonymous # read-only access If you have any questions about Tarantool internals, please post them on the developer discussion list, tarantool-developers@lists.launchpad.net. However, please be warned: Launchpad silently deletes posts from non-subscribed members, thus please be sure to have subscribed to the list prior to posting. Additionally, some engineers are always present on #tarantool channel on irc.freenode.net and tarantool@conference.jabber.ru. Commenting style ---------------- Use Doxygen comment format, Javadoc flavor, i.e. @tag rather than \tag. The main tags in use are @param, @retval, @return, @see, @note and @todo. Every function, except perhaps a very short and obvious one, should have a comment. A sample function comment may look like below: /** Write all data to a descriptor. * * This function is equivalent to 'write', except it would ensure * that all data is written to the file unless a non-ignorable * error occurs. * * @retval 0 Success * * @reval 1 An error occurred (not EINTR) */ static int write_all(int fd, void *data, size_t len) Public structures and important structure members should be commented as well. Header files ------------ Use header guards. Put the header guard in the first line in the header, before the copyright or declarations. Use all-uppercase name for the header guard. Derive the header guard name from the file name, and append _INCLUDED to get a macro name. For example, core/log_io.h -> CORE_LOG_IO_H_INCLUDED. In .c (implementation) file, include the respective declaration header before all other headers, to ensure that the header is self- sufficient. Header "header.h" is self-sufficient if the following compiles without errors: #include "header.h" Allocating memory ----------------- Prefer the supplied slab (salloc) and pool (palloc) allocators to malloc()/free() for any performance-intensive or large memory allocations. Repetitive use of malloc()/free() can lead to memory fragmentation and should therefore be avoided. Always free all allocated memory, even allocated at start-up. We aim at being valgrind leak-check clean, and in most cases it's just as easy to free() the allocated memory as it is to write a valgrind suppression. Freeing all allocated memory is also dynamic-load friendly: assuming a plug-in can be dynamically loaded and unloaded multiple times, reload should not lead to a memory leak. Other ----- Select GNU C99 extensions are acceptable. It's OK to mix declarations and statements, use true and false. The not-so-current list of all GCC C extensions can be found at: http://gcc.gnu.org/onlinedocs/gcc-4.3.5/gcc/C-Extensions.html ********************************************************************** Linux kernel coding style This is a short document describing the preferred coding style for the linux kernel. Coding style is very personal, and I won't _force_ my views on anybody, but this is what goes for anything that I have to be able to maintain, and I'd prefer it for most other things too. Please at least consider the points made here. First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture. Anyway, here goes: Chapter 1: Indentation Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3. Rationale: The whole idea behind indentation is to clearly define where a block of control starts and ends. Especially when you've been looking at your screen for 20 straight hours, you'll find it a lot easier to see how the indentation works if you have large indentations. Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program. In short, 8-char indents make things easier to read, and have the added benefit of warning you when you're nesting your functions too deep. Heed that warning. The preferred way to ease multiple indentation levels in a switch statement is to align the "switch" and its subordinate "case" labels in the same column instead of "double-indenting" the "case" labels. E.g.: switch (suffix) { case 'G': case 'g': mem <<= 30; break; case 'M': case 'm': mem <<= 20; break; case 'K': case 'k': mem <<= 10; /* fall through */ default: break; } Don't put multiple statements on a single line unless you have something to hide: if (condition) do_this; do_something_everytime; Don't put multiple assignments on a single line either. Kernel coding style is super simple. Avoid tricky expressions. Outside of comments, documentation and except in Kconfig, spaces are never used for indentation, and the above example is deliberately broken. Get a decent editor and don't leave whitespace at the end of lines. Chapter 2: Breaking long lines and strings Coding style is all about readability and maintainability using commonly available tools. The limit on the length of lines is 80 columns and this is a strongly preferred limit. Statements longer than 80 columns will be broken into sensible chunks. Descendants are always substantially shorter than the parent and are placed substantially to the right. The same applies to function headers with a long argument list. Long strings are as well broken into shorter strings. The only exception to this is where exceeding 80 columns significantly increases readability and does not hide information. void fun(int a, int b, int c) { if (condition) printk(KERN_WARNING "Warning this is a long printk with " "3 parameters a: %u b: %u " "c: %u \n", a, b, c); else next_statement; } Chapter 3: Placing Braces and Spaces The other issue that always comes up in C styling is the placement of braces. Unlike the indent size, there are few technical reasons to choose one placement strategy over the other, but the preferred way, as shown to us by the prophets Kernighan and Ritchie, is to put the opening brace last on the line, and put the closing brace first, thusly: if (x is true) { we do y } This applies to all non-function statement blocks (if, switch, for, while, do). E.g.: switch (action) { case KOBJ_ADD: return "add"; case KOBJ_REMOVE: return "remove"; case KOBJ_CHANGE: return "change"; default: return NULL; } However, there is one special case, namely functions: they have the opening brace at the beginning of the next line, thus: int function(int x) { body of function } Heretic people all over the world have claimed that this inconsistency is ... well ... inconsistent, but all right-thinking people know that (a) K&R are _right_ and (b) K&R are right. Besides, functions are special anyway (you can't nest them in C). Note that the closing brace is empty on a line of its own, _except_ in the cases where it is followed by a continuation of the same statement, ie a "while" in a do-statement or an "else" in an if-statement, like this: do { body of do-loop } while (condition); and if (x == y) { .. } else if (x > y) { ... } else { .... } Rationale: K&R. Also, note that this brace-placement also minimizes the number of empty (or almost empty) lines, without any loss of readability. Thus, as the supply of new-lines on your screen is not a renewable resource (think 25-line terminal screens here), you have more empty lines to put comments on. Do not unnecessarily use braces where a single statement will do. if (condition) action(); This does not apply if one branch of a conditional statement is a single statement. Use braces in both branches. if (condition) { do_this(); do_that(); } else { otherwise(); } 3.1: Spaces Linux kernel style for use of spaces depends (mostly) on function-versus-keyword usage. Use a space after (most) keywords. The notable exceptions are sizeof, typeof, alignof, and __attribute__, which look somewhat like functions (and are usually used with parentheses in Linux, although they are not required in the language, as in: "sizeof info" after "struct fileinfo info;" is declared). So use a space after these keywords: if, switch, case, for, do, while but not with sizeof, typeof, alignof, or __attribute__. E.g., s = sizeof(struct file); Do not add spaces around (inside) parenthesized expressions. This example is *bad*: s = sizeof( struct file ); When declaring pointer data or a function that returns a pointer type, the preferred use of '*' is adjacent to the data name or function name and not adjacent to the type name. Examples: char *linux_banner; unsigned long long memparse(char *ptr, char **retptr); char *match_strdup(substring_t *s); Use one space around (on each side of) most binary and ternary operators, such as any of these: = + - < > * / % | & ^ <= >= == != ? : but no space after unary operators: & * + - ~ ! sizeof typeof alignof __attribute__ defined no space before the postfix increment & decrement unary operators: ++ -- no space after the prefix increment & decrement unary operators: ++ -- and no space around the '.' and "->" structure member operators. Do not leave trailing whitespace at the ends of lines. Some editors with "smart" indentation will insert whitespace at the beginning of new lines as appropriate, so you can start typing the next line of code right away. However, some such editors do not remove the whitespace if you end up not putting a line of code there, such as if you leave a blank line. As a result, you end up with lines containing trailing whitespace. Git will warn you about patches that introduce trailing whitespace, and can optionally strip the trailing whitespace for you; however, if applying a series of patches, this may make later patches in the series fail by changing their context lines. Chapter 4: Naming C is a Spartan language, and so should your naming be. Unlike Modula-2 and Pascal programmers, C programmers do not use cute names like ThisVariableIsATemporaryCounter. A C programmer would call that variable "tmp", which is much easier to write, and not the least more difficult to understand. HOWEVER, while mixed-case names are frowned upon, descriptive names for global variables are a must. To call a global function "foo" is a shooting offense. GLOBAL variables (to be used only if you _really_ need them) need to have descriptive names, as do global functions. If you have a function that counts the number of active users, you should call that "count_active_users()" or similar, you should _not_ call it "cntusr()". Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged - the compiler knows the types anyway and can check those, and it only confuses the programmer. No wonder MicroSoft makes buggy programs. LOCAL variable names should be short, and to the point. If you have some random integer loop counter, it should probably be called "i". Calling it "loop_counter" is non-productive, if there is no chance of it being mis-understood. Similarly, "tmp" can be just about any type of variable that is used to hold a temporary value. If you are afraid to mix up your local variable names, you have another problem, which is called the function-growth-hormone-imbalance syndrome. See chapter 6 (Functions). Chapter 5: Typedefs Please don't use things like "vps_t". It's a _mistake_ to use typedef for structures and pointers. When you see a vps_t a; in the source, what does it mean? In contrast, if it says struct virtual_container *a; you can actually tell what "a" is. Lots of people think that typedefs "help readability". Not so. They are useful only for: (a) totally opaque objects (where the typedef is actively used to _hide_ what the object is). Example: "pte_t" etc. opaque objects that you can only access using the proper accessor functions. NOTE! Opaqueness and "accessor functions" are not good in themselves. The reason we have them for things like pte_t etc. is that there really is absolutely _zero_ portably accessible information there. (b) Clear integer types, where the abstraction _helps_ avoid confusion whether it is "int" or "long". u8/u16/u32 are perfectly fine typedefs, although they fit into category (d) better than here. NOTE! Again - there needs to be a _reason_ for this. If something is "unsigned long", then there's no reason to do typedef unsigned long myflags_t; but if there is a clear reason for why it under certain circumstances might be an "unsigned int" and under other configurations might be "unsigned long", then by all means go ahead and use a typedef. (c) when you use sparse to literally create a _new_ type for type-checking. (d) New types which are identical to standard C99 types, in certain exceptional circumstances. Although it would only take a short amount of time for the eyes and brain to become accustomed to the standard types like 'uint32_t', some people object to their use anyway. Therefore, the Linux-specific 'u8/u16/u32/u64' types and their signed equivalents which are identical to standard types are permitted -- although they are not mandatory in new code of your own. When editing existing code which already uses one or the other set of types, you should conform to the existing choices in that code. (e) Types safe for use in userspace. In certain structures which are visible to userspace, we cannot require C99 types and cannot use the 'u32' form above. Thus, we use __u32 and similar types in all structures which are shared with userspace. Maybe there are other cases too, but the rule should basically be to NEVER EVER use a typedef unless you can clearly match one of those rules. In general, a pointer, or a struct that has elements that can reasonably be directly accessed should _never_ be a typedef. Chapter 6: Functions Functions should be short and sweet, and do just one thing. They should fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, as we all know), and do one thing and do that well. The maximum length of a function is inversely proportional to the complexity and indentation level of that function. So, if you have a conceptually simple function that is just one long (but simple) case-statement, where you have to do lots of small things for a lot of different cases, it's OK to have a longer function. However, if you have a complex function, and you suspect that a less-than-gifted first-year high-school student might not even understand what the function is all about, you should adhere to the maximum limits all the more closely. Use helper functions with descriptive names (you can ask the compiler to in-line them if you think it's performance-critical, and it will probably do a better job of it than you would have done). Another measure of the function is the number of local variables. They shouldn't exceed 5-10, or you're doing something wrong. Re-think the function, and split it into smaller pieces. A human brain can generally easily keep track of about 7 different things, anything more and it gets confused. You know you're brilliant, but maybe you'd like to understand what you did 2 weeks from now. In source files, separate functions with one blank line. If the function is exported, the EXPORT* macro for it should follow immediately after the closing function brace line. E.g.: int system_is_up(void) { return system_state == SYSTEM_RUNNING; } EXPORT_SYMBOL(system_is_up); In function prototypes, include parameter names with their data types. Although this is not required by the C language, it is preferred in Linux because it is a simple way to add valuable information for the reader. Chapter 7: Centralized exiting of functions Albeit deprecated by some people, the equivalent of the goto statement is used frequently by compilers in form of the unconditional jump instruction. The goto statement comes in handy when a function exits from multiple locations and some common work such as cleanup has to be done. The rationale is: - unconditional statements are easier to understand and follow - nesting is reduced - errors by not updating individual exit points when making modifications are prevented - saves the compiler work to optimize redundant code away ;) int fun(int a) { int result = 0; char *buffer = kmalloc(SIZE); if (buffer == NULL) return -ENOMEM; if (condition1) { while (loop1) { ... } result = 1; goto out; } ... out: kfree(buffer); return result; } Chapter 8: Commenting Comments are good, but there is also a danger of over-commenting. NEVER try to explain HOW your code works in a comment: it's much better to write the code so that the _working_ is obvious, and it's a waste of time to explain badly written code. Generally, you want your comments to tell WHAT your code does, not HOW. Also, try to avoid putting comments inside a function body: if the function is so complex that you need to separately comment parts of it, you should probably go back to chapter 6 for a while. You can make small comments to note or warn about something particularly clever (or ugly), but try to avoid excess. Instead, put the comments at the head of the function, telling people what it does, and possibly WHY it does it. When commenting the kernel API functions, please use the kernel-doc format. See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc for details. Linux style for comments is the C89 "/* ... */" style. Don't use C99-style "// ..." comments. The preferred style for long (multi-line) comments is: /* * This is the preferred style for multi-line * comments in the Linux kernel source code. * Please use it consistently. * * Description: A column of asterisks on the left side, * with beginning and ending almost-blank lines. */ It's also important to comment data, whether they are basic types or derived types. To this end, use just one data declaration per line (no commas for multiple data declarations). This leaves you room for a small comment on each item, explaining its use. Chapter 9: You've made a mess of it That's OK, we all do. You've probably been told by your long-time Unix user helper that "GNU emacs" automatically formats the C sources for you, and you've noticed that yes, it does do that, but the defaults it uses are less than desirable (in fact, they are worse than random typing - an infinite number of monkeys typing into GNU emacs would never make a good program). So, you can either get rid of GNU emacs, or change it to use saner values. To do the latter, you can stick the following in your .emacs file: (defun c-lineup-arglist-tabs-only (ignored) "Line up argument lists by tabs, not spaces" (let* ((anchor (c-langelem-pos c-syntactic-element)) (column (c-langelem-2nd-pos c-syntactic-element)) (offset (- (1+ column) anchor)) (steps (floor offset c-basic-offset))) (* (max steps 1) c-basic-offset))) (add-hook 'c-mode-common-hook (lambda () ;; Add kernel style (c-add-style "linux-tabs-only" '("linux" (c-offsets-alist (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only)))))) (add-hook 'c-mode-hook (lambda () (let ((filename (buffer-file-name))) ;; Enable kernel mode for the appropriate files (when (and filename (string-match (expand-file-name "~/src/linux-trees") filename)) (setq indent-tabs-mode t) (c-set-style "linux-tabs-only"))))) This will make emacs go better with the kernel coding style for C files below ~/src/linux-trees. But even if you fail in getting emacs to do sane formatting, not everything is lost: use "indent". Now, again, GNU indent has the same brain-dead settings that GNU emacs has, which is why you need to give it a few command line options. However, that's not too bad, because even the makers of GNU indent recognize the authority of K&R (the GNU people aren't evil, they are just severely misguided in this matter), so you just give indent the options "-kr -i8" (stands for "K&R, 8 character indents"), or use "scripts/Lindent", which indents in the latest style. "indent" has a lot of options, and especially when it comes to comment re-formatting you may want to take a look at the man page. But remember: "indent" is not a fix for bad programming. Chapter 10: Kconfig configuration files For all of the Kconfig* configuration files throughout the source tree, the indentation is somewhat different. Lines under a "config" definition are indented with one tab, while help text is indented an additional two spaces. Example: config AUDIT bool "Auditing support" depends on NET help Enable auditing infrastructure that can be used with another kernel subsystem, such as SELinux (which requires this for logging of avc messages output). Does not do system-call auditing without CONFIG_AUDITSYSCALL. Features that might still be considered unstable should be defined as dependent on "EXPERIMENTAL": config SLUB depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT bool "SLUB (Unqueued Allocator)" ... while seriously dangerous features (such as write support for certain filesystems) should advertise this prominently in their prompt string: config ADFS_FS_RW bool "ADFS write support (DANGEROUS)" depends on ADFS_FS ... For full documentation on the configuration files, see the file Documentation/kbuild/kconfig-language.txt. Chapter 11: Data structures Data structures that have visibility outside the single-threaded environment they are created and destroyed in should always have reference counts. In the kernel, garbage collection doesn't exist (and outside the kernel garbage collection is slow and inefficient), which means that you absolutely _have_ to reference count all your uses. Reference counting means that you can avoid locking, and allows multiple users to have access to the data structure in parallel - and not having to worry about the structure suddenly going away from under them just because they slept or did something else for a while. Note that locking is _not_ a replacement for reference counting. Locking is used to keep data structures coherent, while reference counting is a memory management technique. Usually both are needed, and they are not to be confused with each other. Many data structures can indeed have two levels of reference counting, when there are users of different "classes". The subclass count counts the number of subclass users, and decrements the global count just once when the subclass count goes to zero. Examples of this kind of "multi-level-reference-counting" can be found in memory management ("struct mm_struct": mm_users and mm_count), and in filesystem code ("struct super_block": s_count and s_active). Remember: if another thread can find your data structure, and you don't have a reference count on it, you almost certainly have a bug. Chapter 12: Macros, Enums and RTL Names of macros defining constants and labels in enums are capitalized. #define CONSTANT 0x12345 Enums are preferred when defining several related constants. CAPITALIZED macro names are appreciated but macros resembling functions may be named in lower case. Generally, inline functions are preferable to macros resembling functions. Macros with multiple statements should be enclosed in a do - while block: #define macrofun(a, b, c) \ do { \ if (a == 5) \ do_this(b, c); \ } while (0) Things to avoid when using macros: 1) macros that affect control flow: #define FOO(x) \ do { \ if (blah(x) < 0) \ return -EBUGGERED; \ } while(0) is a _very_ bad idea. It looks like a function call but exits the "calling" function; don't break the internal parsers of those who will read the code. 2) macros that depend on having a local variable with a magic name: #define FOO(val) bar(index, val) might look like a good thing, but it's confusing as hell when one reads the code and it's prone to breakage from seemingly innocent changes. 3) macros with arguments that are used as l-values: FOO(x) = y; will bite you if somebody e.g. turns FOO into an inline function. 4) forgetting about precedence: macros defining constants using expressions must enclose the expression in parentheses. Beware of similar issues with macros using parameters. #define CONSTANT 0x4000 #define CONSTEXP (CONSTANT | 3) The cpp manual deals with macros exhaustively. The gcc internals manual also covers RTL which is used frequently with assembly language in the kernel. Chapter 13: Printing kernel messages Kernel developers like to be seen as literate. Do mind the spelling of kernel messages to make a good impression. Do not use crippled words like "dont"; use "do not" or "don't" instead. Make the messages concise, clear, and unambiguous. Kernel messages do not have to be terminated with a period. Printing numbers in parentheses (%d) adds no value and should be avoided. There are a number of driver model diagnostic macros in which you should use to make sure messages are matched to the right device and driver, and are tagged with the right level: dev_err(), dev_warn(), dev_info(), and so forth. For messages that aren't associated with a particular device, defines pr_debug() and pr_info(). Coming up with good debugging messages can be quite a challenge; and once you have them, they can be a huge help for remote troubleshooting. Such messages should be compiled out when the DEBUG symbol is not defined (that is, by default they are not included). When you use dev_dbg() or pr_debug(), that's automatic. Many subsystems have Kconfig options to turn on -DDEBUG. A related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to the ones already enabled by DEBUG. Chapter 14: Allocating memory The kernel provides the following general purpose memory allocators: kmalloc(), kzalloc(), kcalloc(), and vmalloc(). Please refer to the API documentation for further information about them. The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed to a memory allocator is not. Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Chapter 15: The inline disease There appears to be a common misperception that gcc has a magic "make me faster" speedup option called "inline". While the use of inlines can be appropriate (for example as a means of replacing macros, see Chapter 12), it very often is not. Abundant use of the inline keyword leads to a much bigger kernel, which in turn slows the system as a whole down, due to a bigger icache footprint for the CPU and simply because there is less memory available for the pagecache. Just think about it; a pagecache miss causes a disk seek, which easily takes 5 milliseconds. There are a LOT of cpu cycles that can go into these 5 milliseconds. A reasonable rule of thumb is to not put inline at functions that have more than 3 lines of code in them. An exception to this rule are the cases where a parameter is known to be a compiletime constant, and as a result of this constantness you *know* the compiler will be able to optimize most of your function away at compile time. For a good example of this later case, see the kmalloc() inline function. Often people argue that adding inline to functions that are static and used only once is always a win since there is no space tradeoff. While this is technically correct, gcc is capable of inlining these automatically without help, and the maintenance issue of removing the inline when a second user appears outweighs the potential value of the hint that tells gcc to do something it would have done anyway. Chapter 16: Function return values and names Functions can return values of many different kinds, and one of the most common is a value indicating whether the function succeeded or failed. Such a value can be represented as an error-code integer (-Exxx = failure, 0 = success) or a "succeeded" boolean (0 = failure, non-zero = success). Mixing up these two sorts of representations is a fertile source of difficult-to-find bugs. If the C language included a strong distinction between integers and booleans then the compiler would find these mistakes for us... but it doesn't. To help prevent such bugs, always follow this convention: If the name of a function is an action or an imperative command, the function should return an error-code integer. If the name is a predicate, the function should return a "succeeded" boolean. For example, "add work" is a command, and the add_work() function returns 0 for success or -EBUSY for failure. In the same way, "PCI device present" is a predicate, and the pci_dev_present() function returns 1 if it succeeds in finding a matching device or 0 if it doesn't. All EXPORTed functions must respect this convention, and so should all public functions. Private (static) functions need not, but it is recommended that they do. Functions whose return value is the actual result of a computation, rather than an indication of whether the computation succeeded, are not subject to this rule. Generally they indicate failure by returning some out-of-range result. Typical examples would be functions that return pointers; they use NULL or the ERR_PTR mechanism to report failure. Chapter 17: Don't re-invent the kernel macros The header file include/linux/kernel.h contains a number of macros that you should use, rather than explicitly coding some variant of them yourself. For example, if you need to calculate the length of an array, take advantage of the macro #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) Similarly, if you need to calculate the size of some structure member, use #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) There are also min() and max() macros that do strict type checking if you need them. Feel free to peruse that header file to see what else is already defined that you shouldn't reproduce in your code. Chapter 18: Editor modelines and other cruft Some editors can interpret configuration information embedded in source files, indicated with special markers. For example, emacs interprets lines marked like this: -*- mode: c -*- Or like this: /* Local Variables: compile-command: "gcc -DMAGIC_DEBUG_FLAG foo.c" End: */ Vim interprets markers that look like this: /* vim:set sw=8 noet */ Do not include any of these in source files. People have their own personal editor configurations, and your source files should not override them. This includes markers for indentation and mode configuration. People may use their own custom mode, or may have some other magic method for making indentation work correctly. Appendix I: References The C Programming Language, Second Edition by Brian W. Kernighan and Dennis M. Ritchie. Prentice Hall, Inc., 1988. ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback). URL: http://cm.bell-labs.com/cm/cs/cbook/ The Practice of Programming by Brian W. Kernighan and Rob Pike. Addison-Wesley, Inc., 1999. ISBN 0-201-61586-X. URL: http://cm.bell-labs.com/cm/cs/tpop/ GNU manuals - where in compliance with K&R and this text - for cpp, gcc, gcc internals and indent, all available from http://www.gnu.org/manual/ WG14 is the international standardization working group for the programming language C, URL: http://www.open-std.org/JTC1/SC22/WG14/ Kernel CodingStyle, by greg@kroah.com at OLS 2002: http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/ -- Last updated on 2007-July-13. tarantool-1.5.1.218.g1a69fd6/doc/coding-style-shell.txt0000664000000000000000000001545312202131537021000 0ustar rootroot Bourne Shell Coding Conventions -------------------------------- Original version by Mike Shapiro and OpenSolaris Shell Project. This document describes the shell coding style used for all the ON shell script changes integrated into Solaris. All new shell code should conform to this coding standard, which is intended to match our existing C coding standard. When in doubt, think "what would be the C-Style equivalent?" Basic Format ------------ Similar to cstyle, the basic format is that all lines are indented by TABs, and continuation lines (which in the shell end with "\") are indented by an equivalent number of TABs and then an additional four spaces, e.g. cp foo bar cp some_realllllllllllllllly_realllllllllllllly_long_path \ to_another_really_long_path If, For, and While ------------------ To match cstyle, the sh token equivalent to the C "{" should appear on the same line, separated by a ";", as in: if [ $x = hello ]; then echo $x fi for i in 1 2 3; do echo $i done while [ $# -gt 0 ]; do echo $1 shift done Test Built-in ------------- DO NOT use the test built-in. Sorry, executive decision. In our Bourne shell, the test built-in is the same as the "[" built-in (if you don't believe me, try "type test" or refer to usr/src/cmd/sh/msg.c). So please do not write: if test $# -gt 0; then instead use: if [ $# -gt 0 ]; then Single-line if-statements ------------------------- It is permissible to use && and || to construct shorthand for an "if" statement in the case where the if statement has a single consequent line: [ $# -eq 0 ] && exit 0 instead of the longer: if [ $# -eq 0 ]; then exit 0 fi DO NOT combine && with { }, as in: [ $# -eq 0 ] && { do something do something else } Use a complete "if-then-fi" construct for this instead. Infinite Loops -------------- The proper way to write an infinite loop in the Bourne shell is to use the ":" built-in, which evaluates to true (exit status 0). This is better than using "true", because that is *not* a built-in in the Bourne shell and thus runs /bin/true. while :; do echo infinite loop done Exit Status and If/While Statements ----------------------------------- Recall that "if" and "while" operate on the exit status of the statement to be executed. In the shell, zero (0) means true and non-zero means false. The exit status of the last command which was executed is available in the $? variable. When using "if" and "while", it is typically not necessary to use $? explicitly, as in: grep foo /etc/passwd >/dev/null 2>&1 if [ $? -eq 0 ]; then echo found fi Instead, you can more concisely write: if grep foo /etc/passwd >/dev/null 2>&1; then echo found fi Or, when appropriate: grep foo /etc/passwd >/dev/null 2>&1 && echo found DO NOT attempt to make pseudo-booleans by setting variables to "true" and "false" and then running the variable as a command instead of using a comparison test. This is non-idiomatic and confusing to many long-time shell programmers. Use: good=true if [[ $good = "true" ]] ; then Not: good=false if $good ; then Variable References ------------------- Variable references begin with $ and *may* have their name enclosed in {}'s. We prefer to only see the {}'s when required. Do not spuriously enclose all your variable names in braces, like this: foo=${bar} This is kind of like writing all your C variable assignments like this: foo = (bar); It compiles, but it looks stupid. Braces are required around variable names in two specific cases: (1) when you are forming the string concatenation of your variable with another string: [ $install = yes ] && root="/a/" || root="/" hosts=${root}etc/inet/hosts and (2) when you are using one of the various substitution/assignment operators: echo ${BASEDIR:-/a} Variable Naming --------------- We prefer that you adopt a shell variable naming scheme where capitalization provides additional meaning (as in our C style): use CAPITAL letters for variables that are exported into the environment, or are equivalent to C constants or #defines. Use lowercase letters for other variable names: BASEDIR=/a; export BASEDIR argc=$# This helps your reader immediately understand the implication of modifying a given variable (i.e. whether it will be inherited by child processes). Quoting ------- Quick review of the quoting basics: Single quotes ('') mean quote but do not expand variable or backquote substitutions. Double quotes ("") mean quote but allow expansion. Backquotes (``) mean execute the command and substitute its standard output (note: stderr is unchanged and may "leak" through unless properly redirected) Use whatever quotes are appropriate for your situation, but please do not unnecessarily quote everything (also see 7 above). For example, references to variables controlled by your script do not have to be quoted unless you are expecting your variable to expand to multiple tokens, or to the empty string. However, any variable which contains values from outside the script, such as user input or filenames, should be quoted to avoid errors from special characters, including whitespace Testing for (Non-)Empty Strings ------------------------------- DO NOT test for (non-)/empty strings by comparing to "" or ''. ALWAYS use the test operators -n (non-zero-length string) and -z (zero-length string): if [ -z "$foo" ]; then echo 'you forgot to set $foo' fi if [ -n "$BASEDIR" ]; then echo "\$BASEDIR is set to $BASEDIR" fi Commenting ---------- Shell comments are preceded by the '#' character. Place single-line comments in the right-hand margin. Use an extra '#' above and below the comment in the case of multi-line comments: cp foo bar # Copy foo to bar # # Modify the permissions on bar. We need to set them to root/sys # in order to match the package prototype. # chown root bar chgrp sys bar Pathnames --------- It is always a good idea to be careful about $PATH settings and pathnames when writing shell scripts. This allows them to function correctly even when the user invoking your script has some strange $PATH set in their environment. There are two acceptable ways to do this: (1) make *all* command references in your script use explicit pathnames: /usr/bin/chown root bar /usr/bin/chgrp sys bar or (2) explicitly reset $PATH in your script: PATH=/usr/bin; export PATH chown root bar chgrp sys bar DO NOT use a mixture of (1) and (2) in the same script. Pick one method and use it consistently. Command arguments ----------------- When passing user input to commands, if the first operand of a command is a variable, use -- for any command that accepts this to flag the end of arguments to avoid problems if the variable expands to a value startingwith -. Interpreter Magic ----------------- The proper interpreter magic for a shell script should be simply #!/bin/sh. End of file ----------- Following 2 lines should be placed at the end of file: # __EOF__ tarantool-1.5.1.218.g1a69fd6/.gitignore0000664000000000000000000000320112231715257015751 0ustar rootroot_CPack_Packages *.a *.cbp *.d *.dylib *.gcno *.gcda *.o *.reject *.so *~ .gitignore .gdb_history CMakeFiles CMakeCache.txt CPackConfig.cmake CPackSourceConfig.cmake Makefile RPM TAGS extra/txt2c client/tarantool/tarantool client/tarancheck/tarancheck client/tarantar/tarantar cmake_install.cmake config.mk connector/c/tnt/libtarantool.so.1 connector/c/tnt/libtarantool.so.1.1 connector/c/tntnet/libtarantoolnet.so.1 connector/c/tntnet/libtarantoolnet.so.1.1 connector/c/tntsql/libtarantoolsql.so.1 connector/c/tntsql/libtarantoolsql.so.1.1 connector/c/tntrpl/libtarantoolrpl.so.1 connector/c/tntrpl/libtarantoolrpl.so.1.1 doc/developer/tarantool_developer_guide.html doc/developer/tarantool_developer_guide.txt doc/man/tarantool.1 doc/man/tarantool_box.1 doc/user/tarantool_user_guide.html doc/user/tarantool_user_guide.txt doc/tnt.ent doc/www-data/*.html doc/www-data/*.ru.html doc/www-data.in/download extra/rpm.spec include/tarantool/config.h install_manifest.txt lcov src/lua/*.lua.c src/box/lua/*.lua.c src/box/tarantool_box src/box/tarantool.cfg tarantool-*.tar.gz test/box/protocol test/box/connector test/connector_c/rpl test/connector_c/snap test/connector_c/tt test/connector_c/tp test/connector_c/update test/connector_c/xlog test/lib/*.pyc test/lib/*/*.pyc test/unit/*.test test/var third_party/luajit/src/luajit third_party/luajit/lib/vmdef.lua third_party/luajit/src/buildvm third_party/luajit/src/lj_bcdef.h third_party/luajit/src/lj_ffdef.h third_party/luajit/src/lj_folddef.h third_party/luajit/src/lj_libdef.h third_party/luajit/src/lj_recdef.h third_party/luajit/src/lj_vm.s VERSION debian/*.debhelper debian/*.log debian/*.substvars *.cdbs-orig tarantool-1.5.1.218.g1a69fd6/libcjson.a0000664000000000000000000024564012213333043015732 0ustar rootroot! / 1378727459 0 0 0 288 ` dd܀܀܀܀܀܀܀܀܀luaopen_cjsonluaopen_cjson_safestrbuf_resizestrbuf_initstrbuf_newstrbuf_set_incrementstrbuf_freestrbuf_free_to_stringstrbuf_append_stringstrbuf_append_fmtstrbuf_append_fmt_retryfpconv_strtodfpconv_g_fmtfpconv_initlua_cjson.c.o/ 1378727459 1000 1000 100664 56032 ` ELF>|@@UHH}HE@ ]UHH}HEPHE@ )ȃ]UHHH}uHEH;E}HEP EHEHUHH}HEHHE@ HH]UHH}uHEP EHEP ]UHHH}EHEHeHEHHE@ HcHUPHEP UHH}EHEHHE@ HcHUPHEP ]UHH H}HuUUHEHEHcHEHHE@ HHHEHHHEP EHEP UHH H}HuUEHcHEHHE@ HHHEHHHEP EHEP UHH}HEHHE@ HH]UHH}HuH}t HEP HEHEH]UHH H}HEHHEH}uHEHǸHEUHHH}uHEH;E~EHHEHtHEHHEH;E|HEHQUHHpH}uHUMDEUHEHtjUHEHEMUHEAȉѺ@HǸE;EE;E~HUHEHHEUHEHcHEHHHUHH H}uHUHMDEH}uHEEUHEHt^}t5UHEHuUHEHUHE#HUuHEHѺHHE}t+HEt HE;EuHEHEH)HEHHHEHHHEHHUHH H}HEHHEHEH HEAHHEH$HEAHHEH(HEAHUHH H}HEHHEHEH,HEAHTUHH H}HEHHEHEH@HEAH UHH H}HEH~HEHEH4HEAHUHH H}HEH4HEHE8EHEH8HEAH+HE8;Et9HE8tHEHHHEHHUHH H}HEHHEHEH0HEAHUHH H}HEHAHEHEH<HEAHEUHH H}HEHHEH}tHEHHHEUHH H}HEHHHEHEHHEHHEHHEHHEǀ HEǀ$HEǀ( HEǀ,HEǀ@HEǀ0HEǀ<HEǀ8HEǀ4HEHHEHEUHc E}~HEǀHEǀHEǀlHEǀtHEǀ HEǀHE HEǀ HE@$ HE@( HE@4 HEǀ HEǀ HEǀ$ HEǀ HEǀ8 HEǀ HEǀ HEǀ HEǀ EEP0HEHc E} ~EHUEHƄE}~HEƀ""HEƀ\\HEƀ//HEƀbHEƀt HEƀn HEƀf HEƀr HEƀuuUHH0H}HuHUMLEHE8u HEHUHEHHEHHHMHEHǸUHH@H}HuЉUHUMHE؉HHEHE‰HEЉHHEо"HEbEHcHEHHHHEH}tHUHEHH!EHcHEHHEЉH-EEHcHEH9rHEо"H HUHH0H}HuHUEEHEHHEHHEHEHEHEfWf.Ez fWf.EtfHEHEEf.EzMf.EuFE f.r3*EMf.v E,EEHEHHEHHEHHE$~VHE$E;E}CHE(;E}4HE uHUHuHEAHEUHH H}HuUHMHE,;E|HEHu5HE8u HEHUHEHǸUHH0H}HuUHMDEHEо[HEE`}tHEо,HkEUHEHHMЋUHuHEHHEHEE;E~HEо]H UHSHHH}HuHUȉMċUHE؉HEHEHEHEЋ0uRHEHEEuHEHEEMHUHuHEAHWHEЋ0u1HEHEEt_HEȺHHEHEEuHEHEEtHEȺHjUHEȾ HcHEЋ4HEHHHEHEEHEUHEȉHxHH[]UHH0H}HuUHMHEо{HiHEHE}tHEо,H:EHEHE}uBHEо"HHUHuHEHHEкHRP}u+HMHEHH HEо:HHUHuHEAHfHMЋUHuHEH=HEHHEHHEо}H3UHH0H}HuUHMHEHKHHMHEHH2AHUHuHEH#HEHtHEкH HEкHEHMЋUHuHEH"HUHMHEHHE}~}HMЋUHuHEAHX~HMЋUHuHEHleHEкH`MHEHHuHEкH2HUHuHEAHwUHH`H}HEHHEHEHtHEHHE8uHEHEHEHHEHHEHEH]HUHuHEHѺHHUHEHH)HEEHcHMHEHHHE8u HEHHUHE}/~}9 E0M }`~}f EW]UHH(H}E=EHcHEH‹EHTEHDy'E}~E E‹E‹EUHH}u}EHE}.EƒHEHEHPE?Ȁ}AE ƒHEHEHPE?ȀHEHPE?Ȁe}WEƒHEHEHPE ?ȀHEHPE?ȀHEHPE?Ȁ]UHH0H}EHEH@HHTE}y 3E%=E%t HEHPEHH<\uHEH@UHcHH/HEHHUHuHEHѺHLUHHpH}HEHtHEHHEHHEHUHEHHEEHEHEHEHv0HEtHEHuHEHǸHEHEHUHEHHHUHMHEHH:HUHEHHE tHUHuHEHѺH3HEHHUHH0H}HuU܋MHEHhEE܉HEHEE;E|HEHHUHEHHHEH+MHEHHEHEHHuE܉HEHUHH H}HEHtHEHHEHHEHHEHE}u@}u$HEHHEHHEHǸUHHHHHPHHHHHHHHHHPHHHH HHHHHHHHHHHHHHHHHHHUHH0H}HEHEHEHEHHEغHHEغHEPEHHTHEؾHHEغHEHHTHEؾHEEHHDHuHUHHH}HEHUHHH}HEHT_OBJ_BEGINT_OBJ_ENDT_ARR_BEGINT_ARR_ENDT_STRINGT_NUMBERT_BOOLEANT_NULLT_COLONT_COMMAT_ENDT_WHITESPACET_ERRORT_UNKNOWN\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f\"\/\\\u007fBUG: Unable to fetch CJSON configurationfound too many argumentsexpected integer between %d and %d__gcCannot serialise %s: %sexcessively sparse arrayCannot serialise, excessive nesting (%d)must not be NaN or Infnannull":table key must be a number or stringtruefalsetype not supportedexpected 1 argument/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/lua_cjson.c*json->ptr == '"'unexpected end of stringinvalid unicode escape codeinvalid escape codeinfinvalid numberinvalid tokenExpected %s but found %s at character %dFound too many nested data structures (%d) at character %dobject key stringcoloncomma or object endcomma or array endvalueJSON parser does not support UTF-16 or UTF-32the endtoo many upvaluesMemory allocation error in CJSON protected callcjson_NAME2.1devel_VERSIONencodedecodeencode_sparse_arrayencode_max_depthdecode_max_depthencode_number_precisionencode_keep_bufferencode_invalid_numbersdecode_invalid_numbersnewjson_next_string_tokenoffon? & # ,{~ # #  1 +v8intZ__24M  _ ?  T# #M "buf#t# $M# %M# &M# 'M# (M# )M#*-M     \Hp q# r# v# xM# yM# zM# {M# |M# }M# ~M# M# M#  ? _ ? (B T#ptrT#tmpB#cfgH# M# TmM # M# Y# M#NsNBhZM/sZBh_ks_Bhlen_MdetseBhjsjBhlenjMdtstBhctZdzMszBhczZdsBhcT`lenM\sBhcT`lenM\ sBhtKsBhlen`HlXcfgHhHlκhMdMWlںMminMmaxMWMl _g ??MlhMdXPM` T T ? M?l Xcfg HhMlXcfgHh Ml Xcfg"Hh(M l(Xcfg*Hh0MZ l0Xcfg2Hh 3MdPM lPX R cfgSHh T ?\M l\Xcfg^HhgMI lgXcfgiHh!s lsXcfguH`ivMl! lhcfgH`"BX"MT"TH! lH"B@"M TXiMlstrT`len-PM lXcfgHP"BHkm`maxMl Mh!d lhcfgH`"M\"BP!4 l4Xcfg4HP"4ML"5B@"5MH 7Mli7Mh!Ji lJHcfgJH@"KB"KMnumMmXlenNMT!h lhXcfghHP"iML"iB@ kMl kMh!PlXcfgHP"ML"B@lenMlMlcfgH`  Bh tXlenM#Mhex_lMZhexTH ZPiMl Mj ?#M"th"Md1M0"10H 3P 4Ml 5Mdlen6M` 7MhN$k"kh"k0`"lTX!s"s0X"sP ut`chv_o%  _ ?Mw"0XpTh&ch2Md!"0X"P th!%"0X"P %hchMd+!IlIX"I0PexpJTH"J@ LTh$Z"Z0h!_l_h"_0`"_M\!mjlmH"m0@ oP!lH"0@ PiMl!lh"0`"XMwl N@  -!lXregPnupMLiMl$M l$Xerr&Ml>Mel>~reg@e~ u ? fMlfH hPiiMl'zMlzh'M/lh T? ?^/  Td ?T % : ; I$ > $ >  I&I< ' I I I !I/  : ;  : ; I8  : ;  : ; I8  : ; (  : ;  : ;  : ; I.: ; ' @B : ; I .: ; ' I@B .: ; ' @B .: ; ' I@B 4: ; I : ; I 4: ; I .: ;' I@B : ;I 4: ;I 4: ;I !.: ;' @B ": ;I #.: ;' I@B $.: ;' @B %4I4  & '.? : ;' I@B wwvwww5v56w67w7:w:qvqrwrswsvwvvwwwvwwwvwww)v)*w*+w+.w.vwwwvwwwvwww#v#$w$%w%(w(gvghwhiwilwlvwwwvwwwvwww8v89w9:w:=w=vwwwvwwwvwwwvwww v  w  w wXvXYwYZwZ]w]vwww v w w w  v  w  w w v w w w } v} ~ w~  w w v w w w vwwwvww"w"}v}~w~wwvwwwvwwwWvWXwXYwY\w\vwwwvwwwKvKLwLMwMPwPvwwwcvcdwdewehwh<v<=w=>w>AwAvwww\v\]w]^w^awavwwwvwwwvwww v  w  w " w" ,!v,!-!w-!.!w.!1!w1!"v""w""w""w"F#vF#G#wG#H#wH#K#wK##v##w##w#$w$$v$$w$$w$$w$%v%%w%%w%%w%&v&&w&&w&&w&&v&&w&&w&&w&&v&&w,&W /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/srcstrbuf.hlua_cjson.cstddef.hlua.hlauxlib.h  .g11/1/6$1$1/(/1/(/1Y1uu*.KuZK4/ 3K=&gv3uwKfY#fKZ)Y5L'''Y3L'3L'2L'2M'#Y.L'Y1L'Y1Ku!Y1MYYYlJן׭;JjJ4׻> .4uLJ5AuvZ4/K3pZZw=2 fM׼' .ug0v=gxJ 2uX"YY\XYY23xjuYg0w=gugu0gi3i&uZZK[WYZKgg-g0Y0YY31Xv؃1׽h׼6fgKfgY1%qJme0e0923g/Y/xYY/wY .wgg0gsLgux=gwvY2$1$BYhu\=g?vZgu\@YoXp #t>&.[ggvuxuxY1(x,[5=,&$u[= Xg/Yf uZ/Yɟ=Yɟ=Yɟ=/!Q/2M4  .w@s$11/O=sgI&1vZ1//i0ڃ/2vZ1ug>0ڃr.J3=Z0K0/0/201vJKu$]/i0 .1Y/IJXK5wgvgyY2!=2wYZYJ1 Y1Yjson_cfg_decode_invalid_numbersjson_cfg_encode_max_depthstrbuf_empty_ptrdebugjson_token_type_tlocal_encode_bufT_ENDT_NULLjson_parse_tunsigned intstrbuf_tencode_sparse_ratiojson_encodeT_WHITESPACElua_cjson_safe_newendptrjson_next_number_tokenT_OBJ_BEGINjson_enum_optionfunclindexjson_encode_exceptionstrbuf_append_char_unsafestrbuf_ensure_empty_lengthjson_parse_array_contextjson_append_numbercodepoint_to_utf8reallocsjson_set_token_errorsettingstrbuf_ensure_nulljson_append_arrayGNU C 4.7.3floatstrbuf_append_memluaL_Regjson_check_encode_depthindexescape2chardecode_invalid_numbersjson_throw_parse_errorlong long unsigned intjson_cfg_decode_max_depthtokenT_BOOLEANT_OBJ_ENDT_ARR_ENDescape_lencurrent_depthbool_optionsjson_cfg_encode_invalid_numbersvalueT_UNKNOWNT_ARR_BEGINjson_fetch_configlua_Statejson_next_tokensize_tjson_lenstrbuf_resetluaopen_cjson_safeincrementdynamicjson_token_type_nameencode_bufjson_is_invalid_numberjson_protect_conversionreasoncharlua_CFunctionT_STRING/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebestrbuf_extend_lengthlua_array_lengthstringjson_cfg_encode_sparse_arrayjson_next_string_tokendata__PRETTY_FUNCTION__array_lengtherrtypeencode_number_precisionjson_arg_initstrbuf_empty_lengthbooleanT_COLONfoundbool_truelong long intch2tokenkeytypejson_append_dataerrmsgdigitdecode_max_depthsizehexdigit2intlua_cjson_newchar2escapejson_decodeluaopen_cjson/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/lua_cjson.ccodepointitemsjson_integer_optionargsjson_process_valueencode_invalid_numbersencode_max_depthstrbuf_append_charjson_decode_ascendjson_token_tshort intlong intoptionslengthluaL_setfuncsutf8optindexT_COMMAjson_append_stringjson_create_configT_NUMBERnumbernamejson_append_objectsizetypeencode_sparse_safejson_parse_object_contextlong unsigned intencode_keep_bufferstring_lenjsonstrbuf_append_mem_unsafeslotstypeunsigned charjson_cfg_encode_number_precisionold_valuejson_cfg_encode_keep_bufferencode_sparse_convertT_ERRORjson_decode_descendstrbuf_stringjson_config_tsigned chardecode_hex4short unsigned intsurrogate_lowdoublejson_destroy_configcommaescstrjson_append_unicode_escapeGCC: (Debian 4.7.3-4) 4.7.3zRx AC P <!AC \ \<AC w |AC X  AC [ HAC C 3AC n aAC \ PAC K < AC [ \)AC d |DAC  mAC h zPLRx  $AC  AC   AC  @JAC E `JAC E JAC E AC  OAC J OAC J IAC D  AC  @uAC p  AC  AC  sAC n AC   vAC El `AC [ (AC   AC  l>AC y wAC r AC   oAC j LAC G  AC  ,AC   AC  pAC  AC } AC V AC   8AC   \AC   8AC   4AC / |AC  AC   AC   (AC  AC Z $AC Z .symtab.strtab.shstrtab.rela.text.rela.data.bss.rela.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @&0+@' &(1/;0 60C6Z[7zUp# fM]t2Pd00 e[0]k 0fttt@{ J  !.6<IrZ oH3*aP )x $Dhm)=N`}9JJJO  O;YIOb ux  ~ s ~v` >Xw"4oOLLd{d=]*-!= V"4bG#p#$%    -6FUct*7=HQ`lt|"2@KUan&|&lua_cjson.cstrbuf_resetstrbuf_empty_lengthstrbuf_ensure_empty_lengthstrbuf_empty_ptrstrbuf_extend_lengthstrbuf_append_charstrbuf_append_char_unsafestrbuf_append_memstrbuf_append_mem_unsafestrbuf_ensure_nullstrbuf_stringjson_token_type_namechar2escapejson_fetch_configjson_arg_initjson_integer_optionjson_enum_optionbool_options.4787json_cfg_encode_sparse_arrayjson_cfg_encode_max_depthjson_cfg_decode_max_depthjson_cfg_encode_number_precisionjson_cfg_encode_keep_bufferjson_cfg_encode_invalid_numbersoptions.4812json_cfg_decode_invalid_numbersjson_destroy_configjson_create_configjson_encode_exceptionjson_append_stringlua_array_lengthjson_check_encode_depthjson_append_arrayjson_append_datajson_append_numberjson_append_objectjson_encodehexdigit2intdecode_hex4codepoint_to_utf8json_append_unicode_escapejson_set_token_errorjson_next_string_token__PRETTY_FUNCTION__.4969json_is_invalid_numberjson_next_number_tokenjson_next_tokenjson_throw_parse_errorjson_decode_ascendjson_decode_descendjson_parse_object_contextjson_process_valuejson_parse_array_contextjson_decodeluaL_setfuncsjson_protect_conversionlua_cjson_newlua_cjson_safe_newstrbuf_resizememcpylua_touserdataluaL_errorlua_gettopluaL_argerrorlua_pushnil__gcc_personality_v0lua_typeluaL_checkintegersnprintflua_pushinteger_Unwind_Resumelua_tobooleanluaL_checkoptionlua_pushbooleanlua_pushstringstrbuf_initstrbuf_freelua_newuserdatalua_createtablelua_pushcclosurelua_setfieldlua_setmetatablelua_typenamelua_tolstringstrbuf_append_stringlua_tonumberfloorlua_settoplua_nextlua_checkstacklua_rawgeti__isinf__isnanfpconv_g_fmtlua_pushlstring__assert_failstrncasecmpfpconv_strtodstrncmplua_rawsetlua_rawsetilua_pushnumberlua_pushlightuserdataluaL_checklstringstrbuf_newluaL_checkstacklua_pushvaluelua_insertlua_pcallfpconv_initlua_getfieldluaopen_cjsonluaopen_cjson_safelJrKK=LQ `^MN OPNRS( :T_OUV RRW/XfYZ[\ rL\]^ Y_ `a[ \ R b  M) c  d V$ P: RT e f  g g ha  i \  M]jgekl- 1[lm Hkl LmNPR Q XNg_hR W }0  LL L ?NM ZO[n\V   Eo W~ p  p H'pjq Ve  A }Ir r LrI \  MDiX\ M^ 39nh Es K VX ^ t _'!VV! xy!n!u!Y!v" r'"N5" B"Oi"w" "M"x# 2#\A#Vb# l#y#z#_#`#g$N$ ,$O?$zP${k$|$P${$ $M$ $} %^M%vY% Lf%`w% 0%n% 6%`% <%n% E%`%V% U% N& %!&_*& 7&`[&~i& #q&_&`&V " ,(50>8H@OHWP_Xe`rhz (0 8@HP&X-`4h;pBxIPS`VxYLAx!!!!\!!!!NU" \(0p89@HPX`hpx $ B F F F!&) E. Fg; FB F[I Fb Fi F p F} F F FM FM F F F F F# FC F F#" F?) FD FR F` Fn F| F FK F F F F/ F F F3 F Fz F' F Ft F FU F% FQ FM# FJ2 FA F?P F_ Fdn F} Fl F F FV F| F F4 FO Fb F|m F<x F F FD F F F Fw C F  6 C`0 F[76?rG Cl F:wr C  FV C F C FA#*+ C@N FU*]e C F C F C`  Fq$' CL F;W$_hg C  Fh C FT F@ C F  F: FoI Fh Fs{ C@ F F F F5 F F 9 C@ F L9T\ C F C` F C F#  % C K F[ Fg o  w C F  F   Y C F Y # C@J F R Z  b C F+   C F F$ F F      C` 1 F@ F$P F Fk  ~ C F F: F, ~   C F FU Fe Fm  u } C F F F F F   C + F; F$j FHr z ~ C@ F F F FV F^ ~  C # F2 FQ F]em C  Fc F F FX C`  FX% C > Fvk Fw C  F F0 FL C  F F F0 F! F7 F?LGO C Y Fh Fw F Fd C@ F F FJ F F d(=0 C: FV^x F= C F F F FW] C` F F FM1 Fm9]AI C` F~ F F/ F C  F F] C F  F Fw%- 5 CL F[ Fk Fvs {-! C@ F F FY-!" C F F F "(G#0 CH FW Fg Fnx FG## C` F#$ C! F-$5%= C v F%& C F F&& C F&& C@@ FLe Fq A* @`6r* @`$h Q $D9d Y$D d m  ~   ,~LU pXL0dP=Y ,t] 8 ! G<-!\"e VG##$ e% t&(&strbuf.c.o/ 1378727459 1000 1000 100664 16360 ` ELF>"@@UHH}HEPHE@ )ȃ]UHHH}uHEH;E}HEP EHEHUHH}HEHHE@ HH]UHHHXH`HhLpLxt )E)M)U)])e)m)u)}H(Dž8Dž<0HEH@HPHHHH8H(HHHHƿ HUHH H}u} E EEHEHHEUPHE@ HE@HE@HE@HE@EHHHHEHHEHHuHEHcUHH } HEH}uRUHEHHE@HEUHHH}u}t}uHEUPUHHH}HE@t8HExHEp HEHHUHAAHǸUHHH}HEHHEHHtHEHHHEHHE@t HEHUHH H}HuHEH %d BUG: Unable to convert numberBUG: length of formatted string changed8intiicb##### #( #0 #8 #@ #H #P #X  #`  #h  b#p b#t p#x F# T#  # # &{# /# 0# 1# 2# 3-# 5b# 7##(n ~~ M#M### ##b#   3 9 Ocb "buf##$b#%b# &b#'b#(b#)b#*]ZbsZh_Gs_hlen_bdushdie fmt 3~arg">~,s,Xlen,bT.blDBlenDb\sFhTsThTbd^s^hhshht+stXlentIPbufvhbsXlenbTbhblsXlenbTbl)sXstr3Pblibhs~lenb~fmt3~arg>~b~s~fmt3~arg>~b~tryb~b~% : ; I$ > $ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I : ;  : ; I8 .: ; ' I@B : ; I .: ; ' @B .: ; ' @B .: ; ' @B 4: ; I .? : ; ' @B 4: ; I .? : ; ' I@B : ; I .: ; ' I@B 4: ; I? < ww v !w!"w"%w%\v\]w]^w^awa|v|}w}~w~wIvIJwJMwMvwwwLvLMwMNwNQwQvwwwvwww*v*+w+,w,/w/vwww8v89w9:w:=w=vwwwvwwwvwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includestrbuf.hstrbuf.cstddef.htypes.hlibio.hstdarg.hstdio.h g1*.Y.2'->$gg1uK1fg1I=I=I&3宭1uʭK1g瓻Z/;22=4>I&#1gu%xJJ <31'h-?&32'-LBؑq#tS'&__off_t_IO_read_ptr_chain/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/strbuf.csize_t_shortbufstrbuf_initgp_offsetva_listdebug_IO_buf_baselong long unsigned intdynamiclong long intsigned char_fileno_IO_read_endstrbuf_append_fmtlong int_flags_IO_buf_end_cur_columnstrbuf_set_incrementreqsizestrbuf_empty_length_old_offset_offsetincrementstrbuf_resize_IO_markerunsigned intstrbuf_free_to_stringoverflow_arg_arealong unsigned int_IO_write_ptr_sbufsizeshort unsigned intspace_IO_save_basestrbuf_append_fmt_retryfmt_len_lock_flags2_modestrbuf_ensure_nullsizetype__gnuc_va_list_IO_write_endcalculate_new_size_IO_lock_t_IO_FILEGNU C 4.7.3empty_len_pos_markersstrbuf_ensure_empty_lengthunsigned charstrbuf_append_string/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebeshort intreallocs_vtable_offsetreg_save_arealengthchar_next__off64_tstrbuf_t_IO_read_base_IO_save_enddebug_stats__pad1__pad2__pad3__pad4__pad5_unused2stderr_IO_backup_basefp_offsetstrbuf_freenewsizestrbuf_new_IO_write_base__va_list_tagGCC: (Debian 4.7.3-4) 4.7.3zRx !AC \ <<AC w \ AC [ zPLRx $AC AC  QAC L 6AC q QAC L <WAC R \dAC _ |AC  AC  AC   dAC   eAC ` .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @-&X,X1X-CPx K0 \jPz0u=0  > 0%e0  >!X( H,o !!<9] L}PQ\    o9}IQM6W+d&;MWestrbuf.cstrbuf_empty_lengthstrbuf_ensure_empty_lengthstrbuf_ensure_nulldiedebug_statscalculate_new_sizestrbuf_resize__gcc_personality_v0stderrvfprintffputcexit_Unwind_Resumestrbuf_initmallocstrbuf_newstrbuf_set_incrementfprintfstrbuf_freefreestrbuf_free_to_stringreallocstrbuf_append_stringstrbuf_append_fmtvsnprintfstrbuf_append_fmt_retryW&3=E  8i  0!#%## `v !% /g({ (     %!) . v; B I P W ^ `l q |  v   !    H     (+ !: I X g v  U q 4 s } O }   # 3 C ]S d  W         ? R Y t     j   ]!   !]# `H cO]W}_ }}I   I l  =M D @KMS[ ,q    )+  + L, 7?9G k Uy 5 9   5  l + 2:B  G / , G   * @!`] } IM @`+9   fpconv.c.o/ 1378727459 1000 1000 100664 11968 ` ELF>0@@UHH H?HMHEEHϸE<0uE<5uEt#HH-EHUHE}/~ }9;}-t }+t}.u"E E}`~ }y]UHHH}HEHEHEHE{uHUHEHH)HUHHpH}Hu<.u!HUHEHHEHE#HEHuE}uHEHUH}~>EHHHEH}u+HH HEHEEHcHMHEHHEHcHEHHE.HHEH}t HEHUHEHHEHEHEHEHHEHH)HHHEHHEH}~ HEHHEHHEEUHH H}u}~}~Mgfff)ȉEMgfff)‰)‰ЉEHE%HEH.E}tEHcHEH‹E0EEHcHEH‹E0EEHcHEHgEEHcHEHUHH`H}EuUHEH<.u)HEHUHMHEE HϸuHEHUHMHEE HϸEHEHEHE8t HE.HUHEHEHEuEUH].%gError: wide characters found or printf() bug.Out of memory/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/fpconv.c1 <= precision && precision <= 14set_number_format g} 8intiicb##### #( #0 #8 #@ #H #P #X  #`  #h  b#p b#t p#x F# T# # # &{# /# 0# 1# 2# 3-# 5b# 7# ##b#j  c       4;buf6`Kb|chK\Mo^bs^Xp`hjTTjj[lbufmhmdpmXnbdoTPfmtXbTd1bhd2bdibl    bystrnumTbbuf@fmtylenbdbh  + % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I.: ; @B 4: ; I .: ; ' I@B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B : ; I .: ; ' @B 4I4  .? : ; @B 4: ; I? < wwvwwwvwww"v"#w#$w$'w'vwwwvwwwVvVWwWXwX[w[fvfgw,g /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includefpconv.cstddef.htypes.hlibio.hstdio.h 4.[= .fgufwfgvY3/WM3hh=u\Ku%gװff(uug=2B)* XL=1K__off_t_IO_read_ptr_chainsize_t_shortbuf_IO_buf_baseendbuflong long unsigned intlong long intsigned char__PRETTY_FUNCTION___filenofpconv_strtod_IO_read_endlong int_flags_IO_buf_end_cur_columndouble_old_offset_offsetlower_ch/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/fpconv.cvalue_IO_markerunsigned intlong unsigned int_IO_write_ptrvalid_number_character_sbufshort unsigned int_IO_save_base_lock_flags2_modeendptrsizetype_IO_write_endset_number_format_IO_lock_t_IO_FILEGNU C 4.7.3stderr_posnptr_markersunsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebeshort intlocalbuf_vtable_offsetbuflenfpconv_g_fmtfpconv_update_localecharprecisionfpconv_init_next__off64_t_IO_read_base_IO_save_end__pad1__pad2__pad3__pad4__pad5_unused2strtod_buffer_size_IO_backup_baselocale_decimal_point_IO_write_baseGCC: (Debian 4.7.3-4) 4.7.3zPLRx  $AC  zRx YAC T <CAC ~  tAC o AC  AC  AC K .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @g!&,19PK@$H \w j z0u-0 - 00 =@ -`x h  4YKC^p    #tWfpconv.clocale_decimal_pointfpconv_update_localevalid_number_characterstrtod_buffer_sizeset_number_format__PRETTY_FUNCTION__.3081__gcc_personality_v0snprintfstderrfwriteabort_Unwind_Resumefpconv_strtodstrtodmallocmemcpystrchrfree__assert_failfpconv_g_fmtfpconv_init 2Qc hmw6M 6  6z!  H "  #  W!g) . ; mB II P `W f^ l q |             - + : bI X @g v      #   # * 1# 83 ?C S Fd k Uw   6 X A  # < GOW `n } O#  #   ;   :8 F OW b iqy   r W  3  Wg @ r /  (1 d#  Wtarantool-1.5.1.218.g1a69fd6/.travis.yml0000664000000000000000000000074312202131537016071 0ustar rootrootlanguage: cpp compiler: - clang - gcc branches: only: - master - stable install: - sudo apt-get update > /dev/null - sudo apt-get -q install binutils-dev python-daemon python-yaml python-pexpect script: - mkdir ./build && cd ./build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebugInfo - make -j8 - make test notifications: irc: channels: - irc.freenode.net#tarantool on_success: change on_failure: always email: false git: depth: 500 tarantool-1.5.1.218.g1a69fd6/connector/0000775000000000000000000000000012213333320015742 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/cmake_install.cmake0000664000000000000000000000262212213333034021556 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/connector/c/0000775000000000000000000000000012213333320016164 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/cmake_install.cmake0000664000000000000000000000352512213333034022003 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/0000775000000000000000000000000012231715257017524 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/cmake_install.cmake0000664000000000000000000000574012213333034023327 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/libtarantoolrpl.a") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolrpl.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolrpl.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolrpl.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") FILE(RPATH_CHECK FILE "${file}" RPATH "") ENDIF() ENDFOREACH() FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/libtarantoolrpl.so.1.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/libtarantoolrpl.so.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/libtarantoolrpl.so" ) FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolrpl.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolrpl.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolrpl.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") FILE(RPATH_REMOVE FILE "${file}") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "${file}") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDFOREACH() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/tnt_xlog.c0000664000000000000000000000771512202131537021527 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include static void tnt_xlog_free(struct tnt_stream *s) { struct tnt_stream_xlog *sx = TNT_SXLOG_CAST(s); tnt_log_close(&sx->log); tnt_mem_free(s->data); s->data = NULL; } static int tnt_xlog_request(struct tnt_stream *s, struct tnt_request *r) { struct tnt_stream_xlog *sx = TNT_SXLOG_CAST(s); struct tnt_log_row *row = tnt_log_next_to(&sx->log, (union tnt_log_value*)r); if (row == NULL && tnt_log_error(&sx->log) == TNT_LOG_EOK) return 1; return (row) ? 0: -1; } /* * tnt_xlog() * * create and initialize xlog stream; * * s - stream pointer, maybe NULL * * if stream pointer is NULL, then new stream will be created. * * returns stream pointer, or NULL on error. */ struct tnt_stream *tnt_xlog(struct tnt_stream *s) { int allocated = s == NULL; s = tnt_stream_init(s); if (s == NULL) return NULL; /* allocating stream data */ s->data = tnt_mem_alloc(sizeof(struct tnt_stream_xlog)); if (s->data == NULL) { if (allocated) tnt_stream_free(s); return NULL; } memset(s->data, 0, sizeof(struct tnt_stream_xlog)); /* initializing interfaces */ s->read = NULL; s->read_request = tnt_xlog_request; s->read_reply = NULL; s->read_tuple = NULL; s->write = NULL; s->writev = NULL; s->free = tnt_xlog_free; /* initializing internal data */ return s; } /* * tnt_xlog_open() * * open xlog file and associate it with stream; * * s - xlog stream pointer * * returns 0 on success, or -1 on error. */ int tnt_xlog_open(struct tnt_stream *s, char *file) { struct tnt_stream_xlog *sx = TNT_SXLOG_CAST(s); return tnt_log_open(&sx->log, file, TNT_LOG_XLOG); } /* * tnt_xlog_close() * * close xlog stream; * * s - xlog stream pointer * * returns 0 on success, or -1 on error. */ void tnt_xlog_close(struct tnt_stream *s) { struct tnt_stream_xlog *sx = TNT_SXLOG_CAST(s); tnt_log_close(&sx->log); } /* * tnt_xlog_error() * * get stream error status; * * s - xlog stream pointer */ enum tnt_log_error tnt_xlog_error(struct tnt_stream *s) { return TNT_SXLOG_CAST(s)->log.error; } /* * tnt_xlog_strerror() * * get stream error status description string; * * s - xlog stream pointer */ char *tnt_xlog_strerror(struct tnt_stream *s) { return tnt_log_strerror(&TNT_SXLOG_CAST(s)->log); } /* * tnt_xlog_errno() * * get saved errno; * * s - xlog stream pointer */ int tnt_xlog_errno(struct tnt_stream *s) { return TNT_SXLOG_CAST(s)->log.errno_; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/tnt_snapshot.c0000664000000000000000000001015512202131537022405 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include static void tnt_snapshot_free(struct tnt_stream *s) { struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(s); tnt_log_close(&ss->log); tnt_mem_free(s->data); s->data = NULL; } static int tnt_snapshot_read_tuple(struct tnt_stream *s, struct tnt_tuple *t) { struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(s); struct tnt_log_row *row = tnt_log_next_to(&ss->log, (union tnt_log_value*)t); if (row == NULL && tnt_log_error(&ss->log) == TNT_LOG_EOK) return 1; return (row) ? 0: -1; } /* * tnt_snapshot() * * create and initialize snapshot stream; * * s - stream pointer, maybe NULL * * if stream pointer is NULL, then new stream will be created. * * returns stream pointer, or NULL on error. */ struct tnt_stream *tnt_snapshot(struct tnt_stream *s) { int allocated = s == NULL; s = tnt_stream_init(s); if (s == NULL) return NULL; /* allocating stream data */ s->data = tnt_mem_alloc(sizeof(struct tnt_stream_snapshot)); if (s->data == NULL) { if (allocated) tnt_stream_free(s); return NULL; } memset(s->data, 0, sizeof(struct tnt_stream_snapshot)); /* initializing interfaces */ s->read = NULL; s->read_request = NULL; s->read_reply = NULL; s->read_tuple = tnt_snapshot_read_tuple; s->write = NULL; s->writev = NULL; s->free = tnt_snapshot_free; /* initializing internal data */ return s; } /* * tnt_snapshot_open() * * open snapshot file and associate it with stream; * * s - snapshot stream pointer * * returns 0 on success, or -1 on error. */ int tnt_snapshot_open(struct tnt_stream *s, char *file) { struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(s); return tnt_log_open(&ss->log, file, TNT_LOG_SNAPSHOT); } /* * tnt_snapshot_close() * * close snapshot stream; * * s - snapshot stream pointer * * returns 0 on success, or -1 on error. */ void tnt_snapshot_close(struct tnt_stream *s) { struct tnt_stream_snapshot *ss = TNT_SSNAPSHOT_CAST(s); tnt_log_close(&ss->log); } /* * tnt_snapshot_error() * * get stream error status; * * s - snapshot stream pointer */ enum tnt_log_error tnt_snapshot_error(struct tnt_stream *s) { return TNT_SSNAPSHOT_CAST(s)->log.error; } /* * tnt_snapshot_strerror() * * get stream error status description string; * * s - snapshot stream pointer */ char *tnt_snapshot_strerror(struct tnt_stream *s) { return tnt_log_strerror(&TNT_SSNAPSHOT_CAST(s)->log); } /* * tnt_snapshot_errno() * * get saved errno; * * s - snapshot stream pointer */ int tnt_snapshot_errno(struct tnt_stream *s) { return TNT_SSNAPSHOT_CAST(s)->log.errno_; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/tnt_log.c0000664000000000000000000002124312202131537021327 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include enum tnt_log_type tnt_log_guess(char *file) { if (file == NULL) return TNT_LOG_XLOG; char *ext = strrchr(file, '.'); if (ext == NULL) return TNT_LOG_NONE; if (strcasecmp(ext, ".snap") == 0) return TNT_LOG_SNAPSHOT; if (strcasecmp(ext, ".xlog") == 0) return TNT_LOG_XLOG; return TNT_LOG_NONE; } inline static int tnt_log_seterr(struct tnt_log *l, enum tnt_log_error e) { l->error = e; if (e == TNT_LOG_ESYSTEM) l->errno_ = errno; return -1; } const uint32_t tnt_log_marker_v11 = 0xba0babed; const uint32_t tnt_log_marker_eof_v11 = 0x10adab1e; inline static int tnt_log_eof(struct tnt_log *l, char *data) { uint32_t marker = 0; if (data) tnt_mem_free(data); /* checking eof condition */ if (ftello(l->fd) == l->offset + sizeof(tnt_log_marker_eof_v11)) { fseeko(l->fd, l->offset, SEEK_SET); if (fread(&marker, sizeof(marker), 1, l->fd) != 1) return tnt_log_seterr(l, TNT_LOG_ESYSTEM); else if (marker != tnt_log_marker_eof_v11) return tnt_log_seterr(l, TNT_LOG_ECORRUPT); l->offset = ftello(l->fd); } /* eof */ return 1; } static int tnt_log_read(struct tnt_log *l, char **buf, uint32_t *size) { /* current record offset (before marker) */ l->current_offset = ftello(l->fd); /* reading marker */ char *data = NULL; uint32_t marker = 0; if (fread(&marker, sizeof(marker), 1, l->fd) != 1) return tnt_log_eof(l, data); /* seeking for marker if necessary */ while (marker != tnt_log_marker_v11) { int c = fgetc(l->fd); if (c == EOF) return tnt_log_eof(l, data); marker = marker >> 8 | ((uint32_t) c & 0xff) << (sizeof(marker) * 8 - 8); } /* reading header */ if (fread(&l->current.hdr, sizeof(l->current.hdr), 1, l->fd) != 1) return tnt_log_eof(l, data); /* updating offset */ l->offset = ftello(l->fd); /* checking header crc, starting from lsn */ uint32_t crc32_hdr = crc32c(0, (unsigned char*)&l->current.hdr + sizeof(uint32_t), sizeof(struct tnt_log_header_v11) - sizeof(uint32_t)); if (crc32_hdr != l->current.hdr.crc32_hdr) return tnt_log_seterr(l, TNT_LOG_ECORRUPT); /* allocating memory and reading data */ data = tnt_mem_alloc(l->current.hdr.len); if (data == NULL) return tnt_log_seterr(l, TNT_LOG_EMEMORY); if (fread(data, l->current.hdr.len, 1, l->fd) != 1) return tnt_log_eof(l, data); /* checking data crc */ uint32_t crc32_data = crc32c(0, (unsigned char*)data, l->current.hdr.len); if (crc32_data != l->current.hdr.crc32_data) { tnt_mem_free(data); return tnt_log_seterr(l, TNT_LOG_ECORRUPT); } *buf = data; *size = l->current.hdr.len; return 0; } static int tnt_log_process_xlog(struct tnt_log *l, char *buf, uint32_t size, union tnt_log_value *value) { (void)size; /* copying row data */ memcpy(&l->current.row, buf, sizeof(l->current.row)); /* preparing pseudo iproto header */ struct tnt_header hdr_iproto; hdr_iproto.type = l->current.row.op; hdr_iproto.len = l->current.hdr.len - sizeof(l->current.row); hdr_iproto.reqid = 0; /* deserializing operation */ tnt_request_init(&value->r); size_t off = 0; int rc = tnt_request(&value->r, buf + sizeof(l->current.row), l->current.hdr.len - sizeof(l->current.row), &off, &hdr_iproto); /* in case of not completed request or parsing error */ if (rc != 0) return tnt_log_seterr(l, TNT_LOG_ECORRUPT); return 0; } static int tnt_log_process_snapshot(struct tnt_log *l, char *buf, uint32_t size, union tnt_log_value *value) { (void)size; /* freeing previously allocated tuple */ tnt_tuple_free(&value->t); /* copying snapshot row data */ memcpy(&l->current.row_snap, buf, sizeof(l->current.row_snap)); /* reading and validating tuple */ struct tnt_tuple *tu = tnt_tuple_set_as(&value->t, buf + sizeof(l->current.row_snap), l->current.row_snap.data_size, l->current.row_snap.tuple_size); if (tu == NULL) return tnt_log_seterr(l, TNT_LOG_ECORRUPT); return (tu) ? 0 : -1; } struct tnt_log_row* tnt_log_next_to(struct tnt_log *l, union tnt_log_value *value) { char *buf = NULL; uint32_t size = 0; int rc = l->read(l, &buf, &size); if (rc != 0) return NULL; rc = l->process(l, buf, size, value); if (rc != 0) { tnt_mem_free(buf); return NULL; } if (l->type == TNT_LOG_XLOG) { tnt_request_setorigin(&value->r, buf, size); } else { tnt_mem_free(buf); } return &l->current; } struct tnt_log_row *tnt_log_next(struct tnt_log *l) { return tnt_log_next_to(l, &l->current_value); } inline static int tnt_log_open_err(struct tnt_log *l, enum tnt_log_error e) { tnt_log_seterr(l, e); tnt_log_close(l); return -1; } enum tnt_log_error tnt_log_open(struct tnt_log *l, char *file, enum tnt_log_type type) { char filetype[32]; char version[32]; char *rc, *magic = "\0"; l->type = type; /* trying to open file */ if (file) { l->fd = fopen(file, "r"); if (l->fd == NULL) return tnt_log_open_err(l, TNT_LOG_ESYSTEM); } else { l->fd = stdin; } /* reading xlog filetype */ rc = fgets(filetype, sizeof(filetype), l->fd); if (rc == NULL) return tnt_log_open_err(l, TNT_LOG_ESYSTEM); /* reading log version */ rc = fgets(version, sizeof(version), l->fd); if (rc == NULL) return tnt_log_open_err(l, TNT_LOG_ESYSTEM); /* checking file type and setting read/process * interfaces */ l->read = tnt_log_read; switch (type) { case TNT_LOG_XLOG: magic = TNT_LOG_MAGIC_XLOG; l->process = tnt_log_process_xlog; break; case TNT_LOG_SNAPSHOT: magic = TNT_LOG_MAGIC_SNAP; l->process = tnt_log_process_snapshot; break; case TNT_LOG_NONE: break; } if (strcmp(filetype, magic)) return tnt_log_open_err(l, TNT_LOG_ETYPE); /* checking version */ if (strcmp(version, TNT_LOG_VERSION)) return tnt_log_open_err(l, TNT_LOG_EVERSION); for (;;) { char buf[256]; rc = fgets(buf, sizeof(buf), l->fd); if (rc == NULL) return tnt_log_open_err(l, TNT_LOG_EFAIL); if (strcmp(rc, "\n") == 0 || strcmp(rc, "\r\n") == 0) break; } /* getting current offset */ l->offset = ftello(l->fd); l->current_offset = 0; return 0; } void tnt_log_close(struct tnt_log *l) { if (l->fd && l->fd != stdin) fclose(l->fd); l->fd = NULL; } int tnt_log_seek(struct tnt_log *l, off_t offset) { l->offset = offset; return fseeko(l->fd, offset, SEEK_SET); } enum tnt_log_error tnt_log_error(struct tnt_log *l) { return l->error; } struct tnt_log_error_desc { enum tnt_log_error type; char *desc; }; static struct tnt_log_error_desc tnt_log_error_list[] = { { TNT_LOG_EOK, "ok" }, { TNT_LOG_EFAIL, "fail" }, { TNT_LOG_EMEMORY, "memory allocation failed" }, { TNT_LOG_ETYPE, "file type mismatch" }, { TNT_LOG_EVERSION, "file version mismatch" }, { TNT_LOG_ECORRUPT, "file crc failed or bad eof marker" }, { TNT_LOG_ESYSTEM, "system error" }, { TNT_LOG_LAST, NULL } }; char *tnt_log_strerror(struct tnt_log *l) { if (l->error == TNT_LOG_ESYSTEM) { static char msg[256]; snprintf(msg, sizeof(msg), "%s (errno: %d)", strerror(l->errno_), l->errno_); return msg; } return tnt_log_error_list[(int)l->error].desc; } int tnt_log_errno(struct tnt_log *l) { return l->errno_; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/libtarantoolrpl.so.1.10000775000000000000000000021725012213333057023601 0ustar rootrootELF>@@8@# BB PP P ,. PP P $$Ptd999QtdGNUu4K'E%1&A$)3āP4 54(13468:;=>?@ADEFGIJMQSUVXgɈWg}`7S׌AZ?I#__mq#>6M2>iI;O5 e=+ 8qX|C[ aBE^ mU~'$%aCaCqϗq`  Gbiq}!x /6@[ 2 SL"P  .7T , / 8Ds " 8 . (1; / 26 %N ,Z 0&C 5a # 8o \ 3) .& "% 3 43 &:| ~  8H 063 1'& &9|  +K - [& G& &m 1 F1( 4  p.6__gmon_start___fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassestnt_log_guessstrrchrstrcasecmp__errno_locationtnt_log_marker_v11tnt_log_marker_eof_v11tnt_mem_freeftello64fseeko64fread_Unwind_Resume__gcc_personality_v0fgetccrc32ctnt_mem_allocmemcpytnt_request_inittnt_requesttnt_tuple_freetnt_tuple_set_astnt_log_next_totnt_request_setorigintnt_log_nexttnt_log_closetnt_log_openfopen64stdinfgetsstrcmpfclosetnt_log_seektnt_log_errortnt_log_strerrorsnprintftnt_log_errnotnt_dir_inittnt_dir_freetnt_mem_realloctnt_mem_duptnt_dir_scanopendirstrchrstrtollreaddir64_rqsortclosedirtnt_dir_match_gttnt_dir_match_inctnt_xlogtnt_stream_inittnt_stream_freememsettnt_xlog_opentnt_xlog_closetnt_xlog_errortnt_xlog_strerrortnt_xlog_errnotnt_snapshottnt_snapshot_opentnt_snapshot_closetnt_snapshot_errortnt_snapshot_strerrortnt_snapshot_errnotnt_io_recvtnt_request_fromtnt_rpltnt_rpl_opentnt_inittnt_connecttnt_io_send_rawtnt_io_recv_rawtnt_rpl_closetnt_closetnt_rpl_attachcrc32_tablecrc32libtarantool.so.1libtarantoolnet.so.1libgcc_s.so.1libc.so.6_edata__bss_start_endlibtarantoolrpl.so.1/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt:/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet:GCC_3.0GCC_3.3.1GLIBC_2.14GLIBC_2.2.5p0P&y Oa_& W~aui lP pP 0 T  T HT 9XT 9hT 9xT 89T K9T h9T 9(R 0R  8R J@R HR @PR 2XR '`R (hR .T !R R R R R R R  R  R 4R  R  R R R R S S S S  S (S 0S ;8S @S LHS PS XS `S ?hS pS xS 5S S S  S "S #S QS $S %S &S RS )S *S +S ,S -S .T /T 0HH9 Ht H59 %9 @%9 h%9 h%9 h%9 h%9 h%9 h%9 h%9 hp%9 h`%9 h P%9 h @%z9 h 0%r9 h %j9 h %b9 h%Z9 h%R9 h%J9 h%B9 h%:9 h%29 h%*9 h%"9 h%9 hp%9 h`% 9 hP%9 h@%8 h0%8 h %8 h%8 h%8 h%8 h %8 h!%8 h"%8 h#%8 h$%8 h%%8 h&%8 h'p%8 h(`%8 h)P%8 h*@%z8 h+0%r8 h, %j8 h-%b8 h.%Z8 h/%R8 h0H a H=a UH)HHw]HD6 Ht]@H` H=` UH)HHHH?HHHu]H<6 Ht]@=` u'H='6 UHt H=7 =h]` fffff.H=3 tH5 HtUH=3 H]WRUHH H}H}udHE.HHEH}uAHEH5Hu#HEH5HuUHHH}uHEU}uHEUHH H}HuEH}t HEHHEH@H|HHEH@HH9HEHHHEH@HHHEHPHEHѺHHtHEHCUH84 9tHEH HEH@HHHEHPHUHH@H}HuHUHEH@HHHEHPHEEHEHPHEHѺHLHt^HUHEHHHEH@HE}uHUHEHH\EE ЉEUH3 9uHEH@HUHz0HHtHUHEHH3HEH@HHHEHPHEH0HHƿEHE؋@0;EtHEؾH^HE؋@DHHEH}uHEؾH,HEHPHE؋@DHEHѺHHtHUHEHH#cHE؋PDHEHƿEHE؋@H;EtHEHHEؾHHEHUHHE؋PDHEȉHUHH@H}HuЉUHMHEHHLHEк HHHE@VEHE؋@D EEHEHHEHE؋@DHxHEHp HEHMHUIHHHE}tHEؾHHUHH0H}HuUHMHEHHEHHXHEHHHEHfHE@jHEHpHEHMHEH}uHEH1H}tUHH0H}HuHEEHEH@ HUHuHMHЉE}tnHEH@(UHuHMH}ЉE}tHEH9HE؋uEHMHEHH HEHHEH0HUHHH}HEHPxHEHHUHHH}uUHEHHEHUHHpHHHHEHHtMHH5H7HHHPHH@Hu.HHBHy. HHHPHHPHEо HOHEH}uHHHHPHE HHEH}uHHlHHHP t rEt!?HHEHH!HP( HrHEHHHP(HUHEHHtHHHEH5$H`tHHHHPHHHEH}uHHcHEH5HtHEH5HuHH@HHHHPHH@ HUHHH}HEH@Ht'HEHPHI, HH9tHEH@HAHEH@UHHH}HuHEHUHPHEH@HMHHUHH}HE]UHSHH}HE苀uGHE苘HE苀AHHH=UV HDV HE苀HHHHh- HDH[]UHH}HE]UHH}uHEUHEH@HEH@HE@]UHH H}HEH@HtHEH@HHEH@HEH@HttECHEH@UHcHHH@Ht!HEH@UHcHHH@HEHE@;EHEH@HHEH@UHH0H}HuHUHMHEPHE9u`HEt HEHUHEHHHHEH@HHHHEHPHEH@HuhHEHPHE@HHHHEHEHUHHEHHHEHPHEH@HuHE@PHEPUHH}HuHEHEHEHEHEHHEHH9uHEHHEHH9v]UHH`HHHHEHHHPHH@Hu *HH@HHEH}HEDžZHEHtHHH5Hm!HHH5HKHH.HKHHHHtt!@HH5MHt%HH54HHHHJ HHHEHH9EtOHH9Et?HUHHxHHHHHE}t| HUHHEHH`E}}uBH@HcHH@H zHqHEHu+H}t HEHWHHx HUHH}HuHE@u+HEHPHE@HHHHHHEH]UHH}HuHUHE@u EHE@EnHEH@UHcHHHH;EwHHEH@UHcHHHHH;Er&HEH@UHcHHHHEH2Em}HEH@UHcHHHHEH]UHH H}HEH@HHEHEHHEH@HHTHEH@HUHH H}HuHEH@HHEHEHUHHGHEH}uHEHuH}tUHH H}H}EHEHHEH}u HHEHPHHEH@HHu}t HEH1xHEH@HHHEH@ HEHHP0HEH@(HEH@8HEH@HEH@HEHrHP@HEUHH H}HuHEH@HHEHEHMHHUHH H}HEH@HHEHEH6UHH}HEH@H]UHHH}HEH@HHUHH}HEH@H]ÐUHH H}HEH@HHEHEHHEH@HHHEH@HUHH H}HuHEH@HHEHEHUHHHEH}uHEHuH}tUHH H}H}EHEHVHEH}u HHEHPHHEH@HHu}t HEHxHEH@HH\HEH@ HEH@0HEH@(HEHHP8HEH@HEH@HEHrHP@HEUHH H}HuHEH@HHEHEHMHHxUHH H}HEH@HHEHEHUHH}HEH@H]UHHH}HEH@HHUHH}HEH@H]ÐUHH H}HEH@HHEHEH@(Ht HEH@(HEH@HHUHH0H}HuHUHEH@HHEHUHMHEHH6UHH0H}HuHEH@HHEHEH@(H@HHEHMHEHHHu{HEHHHE HHHuRHE@&EHE@ EEHEHP(HMHEH5HyuHUHH H}H}EHEHfHEH}u 0HHEHPHHEH@HHHEH@H0HHEH@ HEHHP0HEH@(HEH@8HEH@HEH@HEHHP@HEH@HHEHEH@(HEAHEH@HHtHEH@HHHEH@H}t HEH=UHH0H}HuHEH@HHEHEH@(HJu HEH@(H;u~HEH@(H@HHEHuHEHUHuGEHuHEHHuU 9tHUHH H}HEH@HHEHEH@(Ht HEHDUHH}HuHEH@HHUHP(]UHH}HuHEHEE,HE3EH ҋU1ЉEHEH}HmuËE]UH}HuHUHEHE6HE3E%HH'# U1ЉEHEH}HmuE]UH}HuЉU؉M̋E̋U؉)EE̋U؉)+EEE:HE3E%HH& U1ЉEHEEE;ErE{HE1EHEHE1EHEHE1EHEHE1EHEE%HHB E%H H= 1ЉEEEE%HH9 3UE%H H5 1ЉEHEHHHu1 1EHEHEHHHO- 1EHEHEHHH)) 1EHEHEHHH% 1EHEEE;EvE:HE3E%HH$ U1ЉEHEEE;ErE]UHH }HuU}uE'HEƒ)ЉEMUHuESUHH}HuU}wUHMEHΉUHMEHΉxÐHH.snap.xlog rXLOG SNAP 0.11 okfailmemory allocation failedfile type mismatchfile version mismatchfile crc failed or bad eof markersystem error%s (errno: %d)....xlog.snap ;3dDlJ 1$dDlQ(<u4-T twJ^<\|(F`<\.|Tl <d.B` &,LlzRx $ FJ w?;*3$"DAC { dX:AC u zPLRx  $$R;AC  $L%S"AC N $tP AC  AC  $fAC  d%AC ` 3AC n $$uAC  NAC I :AC u  AC O $,AC E T,AC O t 9AC t 9AC  AC  WAC R $t@AC  ;KAC F <fAC  \BAC } |:fAC a AC  P6AC q f&AC a lAC S dAC Y <bAC S \\BAC } |~fAC a AC  6AC q &AC a AC S AC Y <AC S \CAC ~ |9AC t $AC  6AC 1 $dxAC   [3AC n ,nAC Y LlaAC \ leAC ` iAC d ;FAC A aDAC   %  \? 6xT$#@} ?| 'p0I[p~  8P P ox   x pR  oooo P &6FVfv&6FVfv&6FVfv T 99989K9h990w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V0GCC: (Debian 4.7.3-4) 4.7.3,X ,&,,B,#/B,g1`1,v>5q &8~int}i:iX{y`0 \ m?# # L# D# # #( #0 l#8 t#@ =#H #P R#X  #`  #h 7 ?#p x?#t p#x M# l[# =# r# &{# /# 0# 1# 2# 3-# 5?# 7# Y V # # ?# +0 -# .-#0F1M3T$78 a / < 0F# len 1F#  2F#  5 ns 6F# n 7F#  : ns ;F#  > ns ?F# n @F#  C% ns DF# n EF#  H@ n IF#  L ns MF#  NF#  OF# PF# o #  $F# F %#  &-# 4 '?#  4 ptr 5#  8!  9!# :F# 4 ;?#  ( &L h '# t (# ( +q h ,# t -# K( 0 h 1# t 2#  5 op 60# 7F#  8#  9F#  :F# F ;# H >c h ?# t @# ops A#(  BF#0 opv Cc#8 opc DF#@ @ G h H%# d I# ? JF# i K#  LF# t M# - P h Q@# l R#H Y6 Z' [Ldel \q ]i ^% _ x U  V# e W-# h X\# r `# vc a?#h v b#pd %S,&_I Y 0%  1F# lsn 2Q# tm 3%# len 4F# @ 5F# 0 8b tag 9;#  :Q# op ;;#  > tag ?;#  @Q#  AF#  BF#  CF#  Fyx Lr M6t N GH Q8 hdr R# row S,#  Tb#(  U8 #@  X < Y# fd Z # : [#  \# ] # a ^/ #(  `#0  a#x l b#  c?#?    > F ?/  F8  n*a <+# |,#-  H-Xext0h;? Z` l; he;dF?ZU0 lF XFFPZGFlX?U  lX HbufX @X F^hZ_FXtF`@F\ce?d{? p!\ l Hbuf@F8 \`off-Xrc?l?p!" l XbufPFL8 @tuh/ ""@/ l H8 @bufď`F\rc?l/ ""h l hK?" # l heۖd  #%`Rl }H}<}@ rc`h%|%buf R}b% & l h! ? &G&  l  h" `#d&G&[&  l& h!#;[&&i l; Xw&&msg=R } #,F?&&@ lF h5 $/ @T %^&B 8'F&C 8AqM &,~int-:^4y$7-3 _e#ep#kB#: ;#! #  { DIR$ ' !CN@&llsn'#(# +<,*#t-#.#/4#C-&1'd-h<-*dl41''Gd4Xs''i:4lE4'(`dEXtopFPFHlsnF@NhyW4(3) _aWX_bWPaX hbY `CA_43)+ d_}t_}dirchl+depgPdeh}rci4dtopi4})+extq}lsnX4+,(dhout(`4,,dXlsnPout(H4l4hcq ,/D8~int}i:iiX{my`0\ m?# # L# D# # #( #0 l#8 t#@ =#H #P R#X  #`  #h 7 ?#p x?#t p#x M# l[# =# r# &{# /# 0# 1# 2# 3-# 5?# 7# YV # # ?#    +A -# .-#0F1M3T$78a / < 0W#len 1W#  2W# 5ns 6W# n 7W# :ns ;W# >ns ?W# n @W# C6ns DW# n EW# HQ n IW# Lns MW#  NW#  OW# PW# o #  $W# F %#  &-# 4 '?# 4ptr 5# 82  92# :W# 4 ;?# ( &]h '#t (#( +h ,#t -#K( 0h 1#t 2# 5op 6A# 7W#  8#  9W#  :W# F ;#  H >th ?#t @#ops A#(  BW#0opv Ct#8opc DW#@@ Gh H6# d I# ? JW# i K#  LW#t M# - Ph QQ#l R#H YG Z8 []del \ ]z ^% _x U  V# e W-#h Xm#r `# vc a?#hv b#p0 #op $W#  %W# &W# l '#  (# )W#(X & 4 '?#  (#  )# * # += # ,^ #(  -y #0 - . #8  / #@ F 0#H 1W#P  2W#T-?  G = -# ?X X C ?y  d ?    d% S,&_IY0; 1W#lsn2b#tm3; # len4W# @5W#0 8x tag9L# :b#op;L# > tag?L# @b# AW# BW# CW# F yxL rMGtNGHQN hdrR #rowSB # Tx #( UN #@ X <Y #fdZ # :[# \# ] # a^E #( ` #0 a #x lb # c?#?    T W ?E  WN &  #f log$T #.,-@ s.Xsx/ hK 6?-- s6Xr6 Psx8 hrow: `  N-p. G sNX P?lu q?p..`  sqXHqPsxr h ..  sXsx h  .. sh ./ 7sh!?// shcqE /^18~int}i:iiX{my`0\ m?# # L# D# # #( #0 l#8 t#@ =#H #P R#X  #`  #h 7 ?#p x?#t p#x M# l[# =# r# &{# /# 0# 1# 2# 3-# 5?# 7# YV # # ?#    +A -# .-#0F1M3T$78a / < 0W#len 1W#  2W# 5ns 6W# n 7W# :ns ;W# >ns ?W# n @W# C6ns DW# n EW# HQ n IW# Lns MW#  NW#  OW# PW# o #  $W# F %#  &-# 4 '?# 4ptr 5# 82  92# :W# 4 ;?# ( &]h '#t (#( +h ,#t -#K( 0h 1#t 2# 5op 6A# 7W#  8#  9W#  :W# F ;#  H >th ?#t @#ops A#(  BW#0opv Ct#8opc DW#@@ Gh H6# d I# ? JW# i K#  LW#t M# - Ph QQ#l R#H YG Z8 []del \ ]z ^% _x U  V# e W-#h Xm#r `# vc a?#hv b#p0 #op $W#  %W# &W# l '#  (# )W#(X & 4 '?#  (#  )# * # += # ,^ #(  -y #0 - . #8  / #@ F 0#H 1W#P  2W#T-?  G = -# ?X X C ?y  d ?    d% S,&_IY0; 1W#lsn2b#tm3; # len4W# @5W#0 8x tag9L# :b#op;L# > tag?L# @b# AW# BW# CW# F yxL rMGtNGHQN hdrR #rowSB # Tx #( UN #@ X <Y #fdZ # :[# \# ] # a^E #( ` #0 a #x lb # c?#?    T W ?E  WN &  #f log$T # ./^/@  s.Xss/ hK  6?^//  s6Xt6Pss8 hrow: ` 8 N/0 G sNX P?l q?00`  sqXHqPssr h 01  sXss h   1(1 sh (1F1 7sh! ?F1^1 sh q4 `15$ 8~int i iim6  >  w# !#y+ -# .-#0F1M3T$78a / <03# len13# 23#5 ns63# n73#: ns;3#> ns?3# n@3#C nsD3# nE3#H- nI3#Lq nsM3# N3# O3# P3# o #  $3# F %#  &-# 4 '?# 4 ptr 5#q 8  9# :3# 4 ;?# ( $% ? ( &d h '# t (q#( + h ,# t -q#K( 0 h 1# t 2q# 5 op 6# 73#  8#  93#  :3# F ;# pH >{ h ?# t @q# ops A#(  B3#0 opv C{#8 opc D3#@@ G h H# d I# ? J3# i K#  L3# t Mq# - P h Q-# l R#H YN Z? [ddel \ ] ^% _x U  V# e W-# h XI# r `# vc a?#h v b#p0 # op $3#  %3# &3# l '#  (# )3#(X & 4 '?#  (#  )# *$# +D# ,e#(  -#0 - .#8  /#@ F 0#H 13#P  23#T   -    ?   N  D  -* ?_  _J ?  k ?    x 0h 1#  2?# 3# 4# 5#0 6#@ o 7#H  8#P 9?#X :#` ;#h x ?#| ?# & @# lA, # B?#Y09 13# lsn2># tm39 # len43# @53#0 8v tag9(# :># op;(#  0! hdr" # row#@ # net$#(E 0`11@ s0Xsr1 hv  :11I s:Xbuf:P:Hsn;I hu _ @?12 s@Hr@@srB hsnCI `KIP b23` sbX d?lly3srv ` ?34{ sHlsn>@sr hsnI ` 3\ 44  sXsr h 45 shnet` . 93 qK 58 ~int>0)37 z>/ _5}5buf_X_oPpahcrcbd   z }55@fcrcÅ\bufPoHph 5K8crcLm@( Hblils`y\ hd  )K88\EP( 7X l88`lE`( 7ha X L \ 5 ! `  Y d # h   l  p  9 t  q x 90 T % : ; I$ > $ >   II!I/  : ;  : ; I8 : ;I8 : ; : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;.? : ; ' I@B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I  4: ;I .? : ;' @B  : ;I !.? : ;' I@B ": ;I #.? : ;' I@B $4: ;I %4: ; I? < &4: ; I?  '&I% $ > $ > : ; I I& : ;  : ; I8 I !I/ : ; I <  : ; (  : ;  : ; I8 .? : ; ' @B : ; I : ; I .? : ; ' @B  4: ; I .: ; ' I@B 4: ; I .: ; ' I@B &I.? : ; ' I@B  : ; .? : ; ' I@B .? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 ' I I I!I/  : ;  : ; I : ; I'  : ; ( .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I .? : ; ' I@B  : ; .? : ; ' @B .? : ; ' @B % $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?   /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_log.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_log.h ,uuKuuguguY1gY4uu('0/1>ugx/guF  (w @[KuY+M13iwr.g/3jH=sվu0ttY1ugugv!0g1Y2٭$Muu!h!0!0"gg#uYfj0g10.HgI0v,3 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_dir.ctypes.hstdint.hdirent.htnt_dir.hdirent.h &,0u/G2uXg-vguY0/u.tY0gY">[*'&.j@ count_chaintnt_log_opentnt_header_updateTNT_LOG_EVERSION_shortbuftnt_log_rowTNT_LOG_EFAILtnt_header_IO_buf_baselong long unsigned intTNT_LOG_ETYPEtnt_header_deleteTNT_LOG_XLOGlimitTNT_LOG_EOKTNT_LOG_SNAPSHOTtnt_log_readlong long intfieldtnt_log_marker_v11size_enctnt_listTNT_LOG_ECORRUPT_filenoproc_enc_len_IO_read_end_IO_lock_tproc_enc_flags_IO_buf_end_cur_columntnt_log_next_totnt_header_selectuint16_tdouble_IO_write_ptrtnt_log_guesstnt_request_call_old_offsetdel_1_3tnt_log_seektnt_log_typetnt_request_inserttnt_log_errnocurrent_offsetTNT_LOG_LAST_IO_markerprocessproctnt_log_error_desctnt_header_delete_1_3tnt_logsize_enc_leniovectnt_log_eofshort unsigned intspace_posops_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_log.c_IO_save_basetnt_request_deletestdintnt_log_error_lock_flags2data_sizeiov_baseiov_lentuple_sizecardinalitysizetype_IO_write_endtnt_request_updatetnt_list_ptrtnt_log_marker_eof_v11tnt_request_delete_1_3_IO_read_ptruint64_ttnt_request_selectcrc32_datatnt_log_open_err_IO_FILEorigin_sizeGNU C 4.7.3__off_ttnt_header_callTNT_LOG_NONEhdr_iproto_modecurrent_valuerow_snap_markerstnt_log_error_listtnt_log_nextunsigned charshort int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpltnt_log_header_v11_vtable_offsettnt_log_process_xlogcurrentmagic__pad1originuint32_terrno_TNT_LOG_EMEMORYcookietnt_request_update_optnt_requestproc_lentnt_log_row_snap_v11indexcrc32_hdrtnt_log_strerroralloc__off64_t_IO_read_base_IO_save_endTNT_LOG_ESYSTEMtnt_tupletnt_log_value__pad2__pad3__pad4__pad5_unused2reqidtnt_log_closeuint8_t_IO_backup_basefiletypetnt_log_seterrtnt_header_insert_IO_write_base_sbuftnt_log_process_snapshottnt_log_row_v11tnt_dir_file/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_dir.ctnt_dir_free__ino64_ttnt_dir_initd_nametnt_dir_match_gttnt_dir_match_inctnt_dir_putfilestnt_dir_typetnt_dirTNT_DIR_XLOG__dirstreamdirentd_typetnt_dir_scanTNT_DIR_SNAPSHOTd_inod_offd_reclenpathtnt_dir_cmptnt_stream__ssize_ttnt_xlog_errnotnt_xlog_freetnt_replytuplesread_requestwritevtnt_xlog_errorwritetnt_xlog_requestallocatedtnt_stream_xlog/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_xlog.ctnt_xlog_opentnt_xlogwrcnttnt_xlog_strerrorcodewrite_requesttnt_xlog_closeread_replytnt_stream_snapshottnt_snapshot_opentnt_snapshot_closetnt_snapshot_strerrortnt_snapshot_read_tupletnt_snapshot/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_snapshot.ctnt_snapshot_errnotnt_snapshot_freetnt_snapshot_errorTNT_EBADVALTNT_EOKtnt_rpl_attachtnt_rpl_closetnt_stream_netsend_cb_argrbufTNT_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_rpl.crecv_cb_argtnt_rpl_recv_cbtnt_rpl_versionTNT_ESIZEsend_bufsend_cbTNT_EMEMORYTNT_ESYSTEMtmout_recvtnt_iob_txv_tTNT_EBIG__suseconds_tporttnt_rpltnt_request_ttimevaltv_sectnt_rpl_freeTNT_ERESOLVEtnt_rpl_requestsend_cbvrecv_buftmout_sendtmout_connecttv_usectnt_stream_rpl__time_ttnt_errorTNT_ETMOUTconnectedtnt_iobTNT_EFAILtnt_rpl_openhostnametnt_iob_tx_ttnt_optuintptr_trunning_lengthcrc32sctp_crc_tableil8_o40/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/crc32.csctp_crc_tableil8_o48sctp_crc_tableil8_o64sctp_crc_tableil8_o80sctp_crc_tableil8_o88to_even_wordcrc32c_sb8_64_bitmultitable_crc32csctp_crc_tableil8_o56crc32_tablebuffersctp_crc_tableil8_o32init_bytesp_bufterm1term2end_bytescrc32c_tablesctp_crc_tableil8_o72singletable_crc32cwwvwwwvwwwvwwwvw w  w vwwwevefwfgwgjwj'v'(w()w),w,LvLMwMNwNQwQvwww v  w w # w# l vl m wm n wn q wq v w w w v w w w C vC D wD E wE H wH W vW X www8v89w9:w:=w=vwwwvwww:v:;w;<w<?w?vwww v wwwvwwwAvABwBCwCFwFvwwwvwwwvwwwvwww v  w  w w)v)*w*+w+.w.AvABwwwAvABwBCwCFwFvwwwvwwwvwwwvwww v  w  w w)v)*w*+w+.w.AvABwwwBvBCwCDwDGwG{v{|w|}w}wSvSTwTUwUXwXvwwwjvjkwklwlowovwwwvwww`v`awabwbewevwww.v./w/0w03w3tvtuwuvwvywyvw.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc$.od8   X@x x xHoUo`dn xs ~88 8899`;`;LBLBP PP PP PP P(R (RHpR pR T T( | |  0|| ~8BT -Zq90DJO` "U (  x     8 89`;LBP P P P (R pR  T |  P  . A 0W| fP  pP  : Z US  p! "3)@T <} EO '[ (Wgr ,B -f /B ^/f 9 `1C 19 1X & }5e9\ O` ed {h l p t x  5i K8F HBP 'T C T PP Y| epR { 4  . p.6 3/ &9<H[l 5a 8D|  8 .5 8H]q  06 %N 1' &: +KK #Xdy "  8 26 3) 0&T + F1> 43L~ Qbx [& &: (1|  "% & /  .& G&) = -F `p"  / 1   ,crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrytnt_log.ctnt_log_seterrtnt_log_eoftnt_log_readtnt_log_process_xlogtnt_log_process_snapshottnt_log_open_errtnt_log_error_listmsg.4461tnt_dir.ctnt_dir_puttnt_dir_cmptnt_xlog.ctnt_xlog_freetnt_xlog_requesttnt_snapshot.ctnt_snapshot_freetnt_snapshot_read_tupletnt_rpl.ctnt_rpl_versiontnt_rpl_freetnt_rpl_recv_cbtnt_rpl_requestcrc32.ccrc32c_tablesingletable_crc32csctp_crc_tableil8_o32sctp_crc_tableil8_o40sctp_crc_tableil8_o48sctp_crc_tableil8_o56sctp_crc_tableil8_o64sctp_crc_tableil8_o72sctp_crc_tableil8_o80sctp_crc_tableil8_o88crc32c_sb8_64_bitmultitable_crc32c__FRAME_END____JCR_END__DW.ref.__gcc_personality_v0__dso_handle_DYNAMIC__TMC_END___GLOBAL_OFFSET_TABLE_tnt_request_setoriginstrcasecmp@@GLIBC_2.2.5tnt_rpl_attach__errno_location@@GLIBC_2.2.5_ITM_deregisterTMCloneTabletnt_xlog_errortnt_xlog_opentnt_rpl_openqsort@@GLIBC_2.2.5tnt_dir_inittnt_requestfread@@GLIBC_2.2.5tnt_request_fromstdin@@GLIBC_2.2.5tnt_tuple_set_ascrc32crc32c_edatafclose@@GLIBC_2.2.5opendir@@GLIBC_2.2.5_finitnt_mem_freetnt_xlog_strerrorstrchr@@GLIBC_2.2.5snprintf@@GLIBC_2.2.5readdir64_r@@GLIBC_2.2.5tnt_log_marker_v11strrchr@@GLIBC_2.2.5memset@@GLIBC_2.2.5tnt_log_guesstnt_io_send_rawfgetc@@GLIBC_2.2.5tnt_mem_allocclosedir@@GLIBC_2.2.5tnt_snapshot_opentnt_log_closeftello64@@GLIBC_2.2.5tnt_dir_freefgets@@GLIBC_2.2.5tnt_closestrcmp@@GLIBC_2.2.5tnt_dir_match_gttnt_log_opentnt_connectstrtoll@@GLIBC_2.2.5tnt_log_next_to__gmon_start__fopen64@@GLIBC_2.2.5memcpy@@GLIBC_2.14tnt_log_marker_eof_v11tnt_rpltnt_dir_scantnt_snapshot_close__gcc_personality_v0@@GCC_3.3.1crc32_tabletnt_snapshot_errnotnt_rpl_close_endtnt_request_initfseeko64@@GLIBC_2.2.5tnt_log_strerrortnt_log_seektnt_snapshot_strerrortnt_mem_realloc__bss_starttnt_log_nexttnt_log_errnotnt_io_recvtnt_snapshottnt_stream_freetnt_xlog_closetnt_log_error_Jv_RegisterClassestnt_xlog_ITM_registerTMCloneTabletnt_stream_initstrerror@@GLIBC_2.2.5tnt_init_Unwind_Resume@@GCC_3.0tnt_tuple_free__cxa_finalize@@GLIBC_2.2.5_inittnt_mem_duptnt_xlog_errnotnt_snapshot_errortnt_io_recv_rawtnt_dir_match_inctarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/tnt_dir.c0000664000000000000000000001017412212057124021325 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include void tnt_dir_init(struct tnt_dir *d, enum tnt_dir_type type) { d->type = type; d->path = NULL; d->files = NULL; d->count = 0; } void tnt_dir_free(struct tnt_dir *d) { if (d->path) { tnt_mem_free(d->path); d->path = NULL; } if (d->files) { int i = 0; while (i < d->count) { if (d->files[i].name) tnt_mem_free(d->files[i].name); i++; } tnt_mem_free(d->files); d->files = NULL; } } static int tnt_dir_put(struct tnt_dir *d, int *top, char *name, uint64_t lsn) { if (d->count == *top) { *top = (*top == 0) ? 128 : *top * 2; d->files = tnt_mem_realloc(d->files, sizeof(struct tnt_dir_file) * *top); if (d->files == NULL) return -1; } struct tnt_dir_file *current = &d->files[d->count]; current->lsn = lsn; current->name = (char*)tnt_mem_dup(name); if (current->name == NULL) return -1; d->count++; return 0; } static int tnt_dir_cmp(const void *_a, const void *_b) { const struct tnt_dir_file *a = _a; const struct tnt_dir_file *b = _b; if (a->lsn == b->lsn) return 0; return (a->lsn > b->lsn) ? 1: -1; } int tnt_dir_scan(struct tnt_dir *d, char *path) { d->path = tnt_mem_dup(path); if (d->path == NULL) return -1; DIR *dir = opendir(d->path); if (dir == NULL) goto error; struct dirent *dep = NULL; struct dirent de; int rc, top = 0; while ((rc = readdir_r(dir, &de, &dep)) == 0) { if (dep == NULL) break; if (strcmp(de.d_name, ".") == 0 || strcmp(de.d_name, "..") == 0) continue; char *ext = strchr(de.d_name, '.'); if (ext == NULL) continue; switch (d->type) { case TNT_DIR_XLOG: if (strcmp(ext, ".xlog") != 0) continue; break; case TNT_DIR_SNAPSHOT: if (strcmp(ext, ".snap") != 0) continue; break; } uint64_t lsn = strtoll(de.d_name, &ext, 10); if (lsn == LLONG_MAX || lsn == LLONG_MIN) continue; rc = tnt_dir_put(d, &top, de.d_name, lsn); if (rc == -1) goto error; } if (rc != 0) goto error; qsort(d->files, d->count, sizeof(struct tnt_dir_file), tnt_dir_cmp); closedir(dir); return 0; error: if (dir) closedir(dir); tnt_dir_free(d); return -1; } int tnt_dir_match_gt(struct tnt_dir *d, uint64_t *out) { if (d->count == 0) return -1; *out = d->files[d->count -1].lsn; return 0; } int tnt_dir_match_inc(struct tnt_dir *d, uint64_t lsn, uint64_t *out) { if (d->count == 0) return -1; int current = 0; int count = d->count; while (count > 1) { if (d->files[current].lsn <= lsn && lsn <= d->files[current + 1].lsn) { *out = d->files[current].lsn; return 0; } current++; count--; } *out = d->files[current].lsn; return 0; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/tnt_rpl.c0000664000000000000000000001201612231715257021352 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include static const uint32_t tnt_rpl_version = 11; static void tnt_rpl_free(struct tnt_stream *s) { struct tnt_stream_rpl *sr = TNT_RPL_CAST(s); if (sr->net) { /* network stream should not be free'd here */ sr->net = NULL; } tnt_mem_free(s->data); } static ssize_t tnt_rpl_recv_cb(struct tnt_stream *s, char *buf, ssize_t size) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); return tnt_io_recv(sn, buf, size); } static int tnt_rpl_request(struct tnt_stream *s, struct tnt_request *r) { struct tnt_stream_rpl *sr = TNT_RPL_CAST(s); struct tnt_stream_net *sn = TNT_SNET_CAST(sr->net); /* fetching header */ if (tnt_io_recv(sn, (char*)&sr->hdr, sizeof(sr->hdr)) == -1) return -1; /* fetching row header */ if (tnt_io_recv(sn, (char*)&sr->row, sizeof(sr->row)) == -1) return -1; /* preparing pseudo iproto header */ struct tnt_header hdr_iproto; hdr_iproto.type = sr->row.op; hdr_iproto.len = sr->hdr.len - sizeof(struct tnt_log_row_v11); hdr_iproto.reqid = 0; /* deserializing operation */ if (tnt_request_from(r, (tnt_request_t)tnt_rpl_recv_cb, sr->net, &hdr_iproto) == -1) return -1; return 0; } /* * tnt_rpl() * * create and initialize replication stream; * * s - stream pointer, maybe NULL * * if stream pointer is NULL, then new stream will be created. * * returns stream pointer, or NULL on error. */ struct tnt_stream *tnt_rpl(struct tnt_stream *s) { int allocated = s == NULL; s = tnt_stream_init(s); if (s == NULL) return NULL; /* allocating stream data */ s->data = tnt_mem_alloc(sizeof(struct tnt_stream_rpl)); if (s->data == NULL) goto error; memset(s->data, 0, sizeof(struct tnt_stream_rpl)); /* initializing interfaces */ s->read = NULL; s->read_request = tnt_rpl_request; s->read_reply = NULL; s->read_tuple = NULL; s->write = NULL; s->writev = NULL; s->free = tnt_rpl_free; /* initializing internal data */ struct tnt_stream_rpl *sr = TNT_RPL_CAST(s); sr->net = NULL; return s; error: if (s->data) { tnt_mem_free(s->data); s->data = NULL; } if (allocated) tnt_stream_free(s); return NULL; } /* * tnt_rpl_open() * * connect to a server and initialize handshake; * * s - replication stream pointer * lsn - start lsn * * network stream must be properly initialized before * this function called (see ttnt_rpl_net, tnt_set). * * returns 0 on success, or -1 on error. */ int tnt_rpl_open(struct tnt_stream *s, uint64_t lsn) { struct tnt_stream_rpl *sr = TNT_RPL_CAST(s); /* intializing connection */ if (tnt_init(sr->net) == -1) return -1; if (tnt_connect(sr->net) == -1) return -1; /* sending initial lsn */ struct tnt_stream_net *sn = TNT_SNET_CAST(sr->net); if (tnt_io_send_raw(sn, (char*)&lsn, sizeof(lsn), 1) == -1) return -1; /* reading and checking version */ uint32_t version = 0; if (tnt_io_recv_raw(sn, (char*)&version, sizeof(version), 1) == -1) return -1; if (version != tnt_rpl_version) return -1; return 0; } /* * tnt_rpl_close() * * close a connection; * * s - replication stream pointer * * returns 0 on success, or -1 on error. */ void tnt_rpl_close(struct tnt_stream *s) { struct tnt_stream_rpl *sr = TNT_RPL_CAST(s); if (sr->net) tnt_close(s); } /* * tnt_rpl_attach() * * attach network stream (tnt_stream_net object); * * s - replication stream pointer */ void tnt_rpl_attach(struct tnt_stream *s, struct tnt_stream *net) { TNT_RPL_CAST(s)->net = net; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/libtarantoolrpl.so.10000777000000000000000000000000012213333057027474 2libtarantoolrpl.so.1.1ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/CMakeLists.txt0000664000000000000000000000471712202131537022264 0ustar rootroot#============================================================================# # build flags #============================================================================# # default flags if (${CMAKE_BUILD_TYPE} STREQUAL "None") set (tntrpl_cflags "-std=gnu99") else() set (tntrpl_cflags "-std=gnu99 -Wall -Wextra") set (tntrpl_cflags "${tntrpl_cflags} -Wno-sign-compare -Wno-strict-aliasing") endif() # Only add -Werror if it's a debug build, done by developers. if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") set (tntrpl_cflags "${tntrpl_cflags} -Werror") endif() #============================================================================# # Build tnt rpl project #============================================================================# # # source files # set (tntrpl_sources tnt_log.c tnt_dir.c tnt_xlog.c tnt_snapshot.c tnt_rpl.c ${CMAKE_SOURCE_DIR}/third_party/crc32.c) #----------------------------------------------------------------------------# # Builds #----------------------------------------------------------------------------# # Here we manage to build static/dynamic libraries ourselves, # do not use the top level settings. string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG) set (tnt_cflags "${tnt_cflags} -static-libgcc") endif() # # Static library # project(tntrpl) add_library(tntrpl STATIC ${tntrpl_sources}) set_target_properties(tntrpl PROPERTIES COMPILE_FLAGS "${tntrpl_cflags}") set_target_properties(tntrpl PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tntrpl PROPERTIES OUTPUT_NAME "tarantoolrpl") # # Shared library # project(tntrpl_shared) add_library(tntrpl_shared SHARED ${tntrpl_sources}) target_link_libraries(tntrpl_shared tnt_shared tntnet_shared) set_target_properties(tntrpl_shared PROPERTIES OUTPUT_NAME tntrpl) set_target_properties(tntrpl_shared PROPERTIES COMPILE_FLAGS "${tntrpl_cflags}") set_target_properties(tntrpl_shared PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tntrpl_shared PROPERTIES OUTPUT_NAME "tarantoolrpl") #----------------------------------------------------------------------------# # Install #----------------------------------------------------------------------------# install (TARGETS tntrpl ARCHIVE DESTINATION lib) install (TARGETS tntrpl_shared LIBRARY DESTINATION lib) tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/Makefile0000664000000000000000000004326712213333034021165 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntrpl/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntrpl/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntrpl/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntrpl/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. connector/c/tntrpl/CMakeFiles/tntrpl.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntrpl/CMakeFiles/tntrpl.dir/rule .PHONY : connector/c/tntrpl/CMakeFiles/tntrpl.dir/rule # Convenience name for target. tntrpl: connector/c/tntrpl/CMakeFiles/tntrpl.dir/rule .PHONY : tntrpl # fast build rule for target. tntrpl/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/build .PHONY : tntrpl/fast # Convenience name for target. connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/rule .PHONY : connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/rule # Convenience name for target. tntrpl_shared: connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/rule .PHONY : tntrpl_shared # fast build rule for target. tntrpl_shared/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build .PHONY : tntrpl_shared/fast __/__/__/third_party/crc32.o: __/__/__/third_party/crc32.c.o .PHONY : __/__/__/third_party/crc32.o # target to build an object file __/__/__/third_party/crc32.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/__/__/__/third_party/crc32.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/__/__/__/third_party/crc32.c.o .PHONY : __/__/__/third_party/crc32.c.o __/__/__/third_party/crc32.i: __/__/__/third_party/crc32.c.i .PHONY : __/__/__/third_party/crc32.i # target to preprocess a source file __/__/__/third_party/crc32.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/__/__/__/third_party/crc32.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/__/__/__/third_party/crc32.c.i .PHONY : __/__/__/third_party/crc32.c.i __/__/__/third_party/crc32.s: __/__/__/third_party/crc32.c.s .PHONY : __/__/__/third_party/crc32.s # target to generate assembly for a file __/__/__/third_party/crc32.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/__/__/__/third_party/crc32.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/__/__/__/third_party/crc32.c.s .PHONY : __/__/__/third_party/crc32.c.s tnt_dir.o: tnt_dir.c.o .PHONY : tnt_dir.o # target to build an object file tnt_dir.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_dir.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_dir.c.o .PHONY : tnt_dir.c.o tnt_dir.i: tnt_dir.c.i .PHONY : tnt_dir.i # target to preprocess a source file tnt_dir.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_dir.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_dir.c.i .PHONY : tnt_dir.c.i tnt_dir.s: tnt_dir.c.s .PHONY : tnt_dir.s # target to generate assembly for a file tnt_dir.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_dir.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_dir.c.s .PHONY : tnt_dir.c.s tnt_log.o: tnt_log.c.o .PHONY : tnt_log.o # target to build an object file tnt_log.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_log.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_log.c.o .PHONY : tnt_log.c.o tnt_log.i: tnt_log.c.i .PHONY : tnt_log.i # target to preprocess a source file tnt_log.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_log.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_log.c.i .PHONY : tnt_log.c.i tnt_log.s: tnt_log.c.s .PHONY : tnt_log.s # target to generate assembly for a file tnt_log.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_log.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_log.c.s .PHONY : tnt_log.c.s tnt_rpl.o: tnt_rpl.c.o .PHONY : tnt_rpl.o # target to build an object file tnt_rpl.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_rpl.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_rpl.c.o .PHONY : tnt_rpl.c.o tnt_rpl.i: tnt_rpl.c.i .PHONY : tnt_rpl.i # target to preprocess a source file tnt_rpl.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_rpl.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_rpl.c.i .PHONY : tnt_rpl.c.i tnt_rpl.s: tnt_rpl.c.s .PHONY : tnt_rpl.s # target to generate assembly for a file tnt_rpl.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_rpl.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_rpl.c.s .PHONY : tnt_rpl.c.s tnt_snapshot.o: tnt_snapshot.c.o .PHONY : tnt_snapshot.o # target to build an object file tnt_snapshot.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_snapshot.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_snapshot.c.o .PHONY : tnt_snapshot.c.o tnt_snapshot.i: tnt_snapshot.c.i .PHONY : tnt_snapshot.i # target to preprocess a source file tnt_snapshot.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_snapshot.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_snapshot.c.i .PHONY : tnt_snapshot.c.i tnt_snapshot.s: tnt_snapshot.c.s .PHONY : tnt_snapshot.s # target to generate assembly for a file tnt_snapshot.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_snapshot.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_snapshot.c.s .PHONY : tnt_snapshot.c.s tnt_xlog.o: tnt_xlog.c.o .PHONY : tnt_xlog.o # target to build an object file tnt_xlog.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_xlog.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_xlog.c.o .PHONY : tnt_xlog.c.o tnt_xlog.i: tnt_xlog.c.i .PHONY : tnt_xlog.i # target to preprocess a source file tnt_xlog.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_xlog.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_xlog.c.i .PHONY : tnt_xlog.c.i tnt_xlog.s: tnt_xlog.c.s .PHONY : tnt_xlog.s # target to generate assembly for a file tnt_xlog.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/tnt_xlog.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/tnt_xlog.c.s .PHONY : tnt_xlog.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... tntrpl" @echo "... tntrpl_shared" @echo "... __/__/__/third_party/crc32.o" @echo "... __/__/__/third_party/crc32.i" @echo "... __/__/__/third_party/crc32.s" @echo "... tnt_dir.o" @echo "... tnt_dir.i" @echo "... tnt_dir.s" @echo "... tnt_log.o" @echo "... tnt_log.i" @echo "... tnt_log.s" @echo "... tnt_rpl.o" @echo "... tnt_rpl.i" @echo "... tnt_rpl.s" @echo "... tnt_snapshot.o" @echo "... tnt_snapshot.i" @echo "... tnt_snapshot.s" @echo "... tnt_xlog.o" @echo "... tnt_xlog.i" @echo "... tnt_xlog.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/libtarantoolrpl.a0000664000000000000000000031644612213333044023102 0ustar rootroot! / 1378727460 0 0 0 660 ` #&&&&&&&&&&&ddddd******RRRtnt_log_guesstnt_log_marker_v11tnt_log_marker_eof_v11tnt_log_next_totnt_log_nexttnt_log_closetnt_log_opentnt_log_seektnt_log_errortnt_log_strerrortnt_log_errnotnt_dir_inittnt_dir_freetnt_dir_scantnt_dir_match_gttnt_dir_match_inctnt_xlogtnt_xlog_opentnt_xlog_closetnt_xlog_errortnt_xlog_strerrortnt_xlog_errnotnt_snapshottnt_snapshot_opentnt_snapshot_closetnt_snapshot_errortnt_snapshot_strerrortnt_snapshot_errnotnt_rpltnt_rpl_opentnt_rpl_closetnt_rpl_attachcrc32_tablecrc32crc32c// 18 ` tnt_snapshot.c.o/ tnt_log.c.o/ 1378727460 1000 1000 100664 24888 ` ELF>`2@@UHH H}H}u`HE.HHEH}u=HEHu!HEHuUHHH}uHEU}uHEUHH H}HuEH}t HEHHEH@HHHEH@HH9HEHHHEH@HHHEHPHEHѺHHtHEH@U9tHEH HEH@HHHEHPHUHH@H}HuHUHEH@HHHEHPHEEHEHPHEHѺHHt^HUHEHHHEH@HE}uHUHEHH_EE ЉEU9uHEH@HUHz0HHtHUHEHH3HEH@HHHEHPHEH0HHƿEHE؋@0;EtHEؾHdHE؋@DHHEH}uHEؾH2HEHPHE؋@DHEHѺHHtHUHEHH)cHE؋PDHEHƿEHE؋@H;EtHEHHEؾHHEHUHHE؋PDHEȉHUHH@H}HuЉUHMHEHHLHEк HHHE@VEHE؋@D EEHEHHEHE؋@DHxHEHp HEHMHUIHHHE}tHEؾHHUHH0H}HuUHMHEHHEHHXHEHHHEHfHE@jHEHpHEHHEH}uHEH7H}tUHH0H}HuHEEHEH@ HUHuHMHЉE}tnHEH@(UHuHMH}ЉE}tHEH9HE؋uEHMHEHH HEHHEH0HUHHH}HEHPxHEHHUHHH}uUHEHHEHUHHpHHHEHHtKHHHHHPHH@Hu+HHGHHHPHHPHEо HHEH}uHHHHPHE HHEH}uHHWHH@ t r9t3HEHH@(HEHH@(HUHEHHtHH,HEHtHHHHPHHHEH}uHH_HEHtHEHuHH@HHHHPHH@ HUHHH}HEH@Ht$HEHPHH9tHEH@HHEH@UHHH}HuHEHUHPHEH@HMHHUHH}HE]UHSHH}HE苀uAHE苘HE苀AHHE苀HHHH@H[]UHH}HE].snap.xlog rXLOG SNAP 0.11 okfailmemory allocation failedfile type mismatchfile version mismatchfile crc failed or bad eof markersystem error%s (errno: %d) %  \? 6xO$8intiiX{0  ?# # # # # #( #0 #8 #@ #H #P #X  #`  #h  ?#p ?#t p#x M# [# # # &{# /# 0# 1# 2# 3-# 5?# 7#   # # ?# +0 -# .-#0F1M3T78 / 0F# len 1F# 2F#  5 ns 6F# 7F#  : ns ;F#  > ns ?F# @F#  C% ns DF# EF#  H@ IF#  L ns MF# NF# OF# PF# # $F# %# &-# '?#  4 ptr 5#  8! 9!# :F# ;?#  ( &L h '# t (# ( +q h ,# t -# ( 0 h 1# t 2# 5 op 60# 7F# 8# 9F# :F# ;# H >c h ?# t @# ops A#( BF#0 opv Cc#8 opc DF#@ @ G h H%# I# JF# K# LF# t M# P h Q@# l R#H Y6 Z' [Ldel \q ]i ^ _ x U V# W-# h X\# r `# vc a?#h v b#p %  0% 1F# lsn 2Q# tm 3%# len 4F# 5F# 8b tag 9;# :Q# op ;;#  > tag ?;# @Q# AF# BF# CF# Fx Lr M6t N H Q8 hdr R# row S,# Tb#( U8 #@ X Y# fd Z # [# \# ] # ^/ #( `#0 a#x b# c?#?    > F ?/  F8  *a +# ,#- -Xext0h;? l; he;dF?0 lF XFPGFlX? lX HbufX @X ^h_FXtF`F\ce?d?\ l Hbuf@F8 \`off-Xrc?l? l XbufPFL8 @tuh/ / l H8 @bufď`F\rc?l/ h l h? l heۖdRl }}}@rc`hbuf R}b l h! ? l  h" `#&  l& h!;i l; Xmsg=R #F? lF h5 $/ %&B 'F&C % : ; I$ > $ >   II!I/  : ;  : ; I8 : ;I8 : ; : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;.? : ; ' I@B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I  4: ;I .? : ;' @B  : ;I !.? : ;' I@B ": ;I #.? : ;' I@B $4: ;I %4: ; I? < &4: ; I?  '&Iww{v{|w|}w}wvwwwvwwwvwwwvwww[v[\w\]w]`w`vww"w"BvBCwCDwDGwGuvuvwvwwwzwzvwwwB vB C wC D wD G wG | v| } w} ~ w~ w v w w w  v  w  w  w " v" # w,#  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_log.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_log.h ,uuKuuKuKuY1gY4uu('0/1>ugx/guF  (w @[KuY+M13iwr.g/3jH=sվu0ttY1ugugv!0g1Y2ك"#uuh00"gK#uYJN0=10.HgI,vvcount_chaintnt_log_opensize_ttnt_header_updateTNT_LOG_EVERSION_shortbuftnt_log_rowTNT_LOG_EFAILtypetnt_header_IO_buf_baselong long unsigned intTNT_LOG_ETYPEtnt_header_deleteTNT_LOG_XLOGlimitTNT_LOG_EOKTNT_LOG_SNAPSHOTtnt_log_readlong long intsigned charfieldtnt_log_marker_v11size_enctnt_listTNT_LOG_ECORRUPT_filenoproc_enc_len_IO_read_end_IO_lock_tlong intproc_enc_flags_IO_buf_end_cur_columntnt_log_next_totnt_header_selectuint16_tdouble_IO_write_ptrtnt_log_guesstnt_request_call_old_offsetmarkerdel_1_3tnt_log_seektnt_log_typetnt_request_inserttnt_log_errnocurrent_offsetvalueTNT_LOG_LAST_IO_markerinsertprocessproctnt_log_error_desclong unsigned inttnt_header_delete_1_3tnt_logoff_tsize_enc_leniovectnt_log_eofdatashort unsigned intspace_posops_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_log.c_IO_save_basetnt_request_deletestdintnt_log_error_lock_flags2data_sizecalliov_baseiov_lentuple_sizeversioncardinalitysizetype_offset_IO_write_endtnt_request_updatetnt_list_ptrtnt_log_marker_eof_v11tnt_request_delete_1_3_IO_read_ptruint64_tdesctnt_request_selectcrc32_datatnt_log_open_err_IO_FILEorigin_sizeGNU C 4.7.3__off_ttnt_header_callselectTNT_LOG_NONEhdr_iproto_modecurrent_valuerow_snaperror_markerstnt_log_error_listtnt_log_nextunsigned charshort int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpltnt_log_header_v11file_vtable_offsetFILEtnt_log_process_xlogcurrentmagic__pad1originuint32_terrno_TNT_LOG_EMEMORYcookietnt_request_update_opchartnt_requestproc_lenunsigned inttnt_log_row_snap_v11indexcrc32_hdrtnt_log_strerroralloc_next__off64_toffset_IO_read_base_IO_save_endTNT_LOG_ESYSTEMtnt_tupletnt_log_value__pad2__pad3__pad4__pad5update_unused2reqidtnt_log_closeuint8_t_IO_backup_baseflagsfiletypetnt_log_seterrreadsizelisttnt_header_insert_IO_write_base_sbuftnt_log_process_snapshottnt_log_row_v11GCC: (Debian 4.7.3-4) 4.7.3zRx |AC w <:AC u zPLRx  $AC   HPAC K  lAC  AC   AC  ,%AC ` L3AC n  AC } KAC F :AC u AC O  ~AC Et AC O .symtab.strtab.shstrtab.rela.text.rela.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @# P@`+ &F1  6 > UU PXGaAoW#0z^0 '$(_08'06/S/X/0@_1`8 >N |:&P3HaC3r   |  $39@NUfr\%KvC :}  ~.7@ tnt_log.ctnt_log_seterrtnt_log_eoftnt_log_readtnt_log_process_xlogtnt_log_process_snapshottnt_log_open_errtnt_log_error_listmsg.4461tnt_log_guessstrrchrstrcasecmp__errno_locationtnt_log_marker_v11tnt_log_marker_eof_v11__gcc_personality_v0tnt_mem_freeftello64fseeko64fread_Unwind_Resumefgetccrc32ctnt_mem_allocmemcpytnt_request_inittnt_requesttnt_tuple_freetnt_tuple_set_astnt_log_next_totnt_request_setorigintnt_log_nexttnt_log_closetnt_log_openfopen64stdinfgetsstrcmpfclosetnt_log_seektnt_log_errortnt_log_strerrorstrerrorsnprintftnt_log_errno'B J^ f $!E"g # "7$w" %*&p"%#-'[()#*'%+-#=,k/  12+3k3     4! $)4f3 *4 ,4 # 21 5w ! 9   :  /2(78PHcXh   7 !# ) . ; I lP W ^ e zl |q |   l       ~ d  # 2 "A xP _ n q}  C  O      D  ' !7 )G 0W 7g >w   L q    )  " 1 i< G /R ] mi h U      ! & 2 A Z h v        C 5   ( AM gr  V  ,     09 .j   W  }      + E7 qC (Q    Z ?  3 >  w   ( - G Oc } O #   4     N 4* q? K hf bt     & = 86 C hR c n v |~    |  `      " 1 < D L  p       + q     $ q3 ] h p \x   q  \  @ q 7 _B J CR i t C| v   v  `  h  " 0K8d [ltC |  'C }     }     " * A I _k Tw #  @ L   P  @|k     \ ,0PCpvy :C }   tnt_dir.c.o/ 1378727460 1000 1000 100664 10960 ` ELF> @@UHH}uHEUHEH@HEH@HE@]UHH H}HEH@HtHEH@HHEH@HEH@HttECHEH@UHcHHH@Ht!HEH@UHcHHH@HEHE@;EHEH@HHEH@UHH0H}HuHUHMHEPHE9u`HEt HEHUHEHHHHEH@HHHHEHPHEH@HuhHEHPHE@HHHHEHEHUHHEHHHEHPHEH@HuHE@PHEPUHH}HuHEHEHEHEHEHHEHH9uHEHHEHH9v]UHH`HHHHHHHPHH@Hu HH@HHEH}HEDžRHEHlHHHHHHHH.HHHHHtt $ > : ; I I& : ;  : ; I8 I !I/ : ; I <  : ; (  : ;  : ; I8 .? : ; ' @B : ; I : ; I .? : ; ' @B  4: ; I .: ; ' I@B 4: ; I .: ; ' I@B &I.? : ; ' I@B  : ; .? : ; ' I@B .? : ; ' I@B ww8v89w9:w:=w=vwwwvwww:v:;w;<w<?w?vwwwvwwwvw,+3 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_dir.ctypes.hstdint.hdirent.htnt_dir.hdirent.h ,0u/G2uXg-vguY0/u.tY0gYs>u[*'&.j@ E >L S )Z a f }q A~  s  K        % x+ Q7 f= D ^ km ^y  $ &  9   p9  `){1H S[c  k  5;  !;)1 H $e k  0 ;CK @y   @ @9` ; tnt_xlog.c.o/ 1378727460 1000 1000 100664 16712 ` ELF>"@@UHH H}HEH@HHEHEHHEH@HHHEH@HUHH H}HuHEH@HHEHEHUHHHEH}uHEHuH}tUHH H}H}EHEHHEH}u HHEHPHHEH@HHu}t HEHrHEH@HHHEH@ HEH@0HEH@(HEH@8HEH@HEH@HEH@@HEUHH H}HuHEH@HHEHEHMHHUHH H}HEH@HHEHEHUHH}HEH@H]UHHH}HEH@HHUHH}HEH@H]c8intiiiX{m0 ?# # # # # #( #0 #8 #@ #H #P #X  #`  #h  ?#p ?#t p#x M# [# # # &{# /# 0# 1# 2# 3-# 5?# 7#  # # ?#    +A -# .-#0F1M3T78 / 0W#len 1W# 2W# 5ns 6W# 7W# :ns ;W# >ns ?W# @W# C6ns DW# EW# HQ IW# Lns MW# NW# OW# PW#  # $W# %# &-# '?# 4ptr 5# 82 92# :W# ;?# ( &]h '#t (#( +h ,#t -#( 0h 1#t 2# 5op 6A# 7W# 8# 9W# :W# ;#  H >th ?#t @#ops A#( BW#0opv Ct#8opc DW#@@ Gh H6# I# JW# K# LW#t M#  Ph QQ#l R#H YG Z8 []del \ ]z ^ _x U V# W-#h Xm#r `# vc a?#hv b#p0 #op $W# %W# &W# '# (# )W#(X & '?# (# )# * # += # ,^ #( -y #0 . #8 / #@ 0#H 1W#P 2W#T-?  G = -# ?X X C ?y  d ?    % 0; 1W#lsn2b#tm3; # len4W# 5W# 8x tag9L# :b#op;L# > tag?L# @b# AW# BW# CW#F xL rMGtNHQN hdrR #rowSB # Tx #( UN #@ X Y #fdZ # [# \# ] # ^E #( ` #0 a #x b # c?#?    T W ?E  WN & #f log$T #. s.Xsx/ hK 6? s6Xr6 Psx8 hrow: ` NG sNXP?lq? sqXqPsxr h sXsx h  sh7sh!?sh% : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B wwAvABwBCwCFwFvwwwvwwwvwwwvwwwvww w #v#$w$%w%(w(;v;<w,<h /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_xlog.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_reply.htnt_stream.htnt_log.htnt_xlog.h -2I1tvttY.uKgvK .u . . . ._chainsize_ttnt_header_updateTNT_LOG_EVERSION_shortbufssize_ttnt_log_rowTNT_LOG_EFAILtypetnt_header_IO_buf_baselong long unsigned intTNT_LOG_ETYPEtnt_header_deleteTNT_LOG_XLOGlimitTNT_LOG_EOKTNT_LOG_SNAPSHOTlong long intsigned charfieldsize_enctnt_streamtnt_listTNT_LOG_ECORRUPT_filenoproc_enc_len_IO_read_endlong intproc_enc_flags__ssize_t_IO_buf_end_cur_columntnt_header_selectuint16_tdouble_IO_write_ptrtnt_request_call_old_offset_offsetdel_1_3tnt_list_ptrcounttnt_log_typetnt_request_inserttnt_xlog_errnocurrent_offsetvalueTNT_LOG_LAST_IO_markerinsertprocessproctnt_xlog_freelong unsigned inttnt_header_delete_1_3tnt_logoff_tsize_enc_leniovectnt_replydatashort unsigned intread_tuplespace_posops_sizetuples_IO_save_basetnt_request_deleteread_requestwritevtnt_log_error_locktnt_xlog_error_flags2data_sizecalliov_baseiov_lenwritetnt_xlog_requestcardinalitysizetypeallocated_IO_write_endtnt_request_updatetnt_stream_xlogtuple_sizeTNT_LOG_NONEtnt_request_delete_1_3_IO_read_ptruint64_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_xlog.ctnt_request_selectcrc32_data_IO_lock_t_IO_FILEorigin_sizeGNU C 4.7.3__off_ttnt_header_callselect_modecurrent_valuerow_snaperror_markersunsigned charshort int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpltnt_log_header_v11file_vtable_offsetFILEorigincurrent__pad1tnt_xlog_openuint32_terrno_TNT_LOG_EMEMORYtnt_xlogcookietnt_request_update_opchartnt_requestproc_lenunsigned inttnt_log_row_snap_v11indexcrc32_hdrallocwrcnt_nexttnt_xlog_strerror__off64_toffset_IO_read_base_IO_save_endfreeTNT_LOG_ESYSTEMtnt_tupletnt_log_value__pad2__pad3__pad4__pad5update_unused2codewrite_requestreqidtnt_xlog_closeuint8_t_IO_backup_baseflagsreadread_replysizelisttnt_header_insert_IO_write_base_sbuftnt_log_row_v11GCC: (Debian 4.7.3-4) 4.7.3zRx BAC } <fAC a \AC  |6AC q &AC a AC S AC Y AC S .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @<X+8&|,|6|g1,BP`0[@@0 tlop@ 0i0 3 8 @P!H' H*  BBf   +9FVdm}6&$tnt_xlog.ctnt_xlog_freetnt_xlog_requesttnt_log_closetnt_mem_freetnt_log_next_totnt_log_errortnt_xlogtnt_stream_inittnt_mem_alloctnt_stream_freememsettnt_xlog_opentnt_log_opentnt_xlog_closetnt_xlog_errortnt_xlog_strerrortnt_log_strerrortnt_xlog_errno 0m4L B    7 =!<) . ; zI %P W ;^ e 3l Qq |   j !  ; z   c !  D & 4 C R ma tp  F    / c    1 N( 8 H X h x     M y   % z3 B >M X c .n bz ] ) v V   V ( V7 C VR k ]y      l m   q $ m9 ^       l  J {  Z 7 g 2  X & u1 < H &T b   )      m" 0 9> L \Z ah ,v    s ) @ O    @  c- > C ] y H    k    C2 @ :U a ]| +  \ _    L g ln v B~  B  `   # 9 I T \ d z  /    T    $! @9 D$L<T   @B`$/0 1378727460 1000 1000 100664 16800 ` ELF>8"@@UHH H}HEH@HHEHEHHEH@HHHEH@HUHH H}HuHEH@HHEHEHUHHHEH}uHEHuH}tUHH H}H}EHEHHEH}u HHEHPHHEH@HHu}t HEHrHEH@HHHEH@ HEH@0HEH@(HEH@8HEH@HEH@HEH@@HEUHH H}HuHEH@HHEHEHMHHUHH H}HEH@HHEHEHUHH}HEH@H]UHHH}HEH@HHUHH}HEH@H]c8intiiiX{m0 ?# # # # # #( #0 #8 #@ #H #P #X  #`  #h  ?#p ?#t p#x M# [# # # &{# /# 0# 1# 2# 3-# 5?# 7#  # # ?#    +A -# .-#0F1M3T78 / 0W#len 1W# 2W# 5ns 6W# 7W# :ns ;W# >ns ?W# @W# C6ns DW# EW# HQ IW# Lns MW# NW# OW# PW#  # $W# %# &-# '?# 4ptr 5# 82 92# :W# ;?# ( &]h '#t (#( +h ,#t -#( 0h 1#t 2# 5op 6A# 7W# 8# 9W# :W# ;#  H >th ?#t @#ops A#( BW#0opv Ct#8opc DW#@@ Gh H6# I# JW# K# LW#t M#  Ph QQ#l R#H YG Z8 []del \ ]z ^ _x U V# W-#h Xm#r `# vc a?#hv b#p0 #op $W# %W# &W# '# (# )W#(X & '?# (# )# * # += # ,^ #( -y #0 . #8 / #@ 0#H 1W#P 2W#T-?  G = -# ?X X C ?y  d ?    % 0; 1W#lsn2b#tm3; # len4W# 5W# 8x tag9L# :b#op;L# > tag?L# @b# AW# BW# CW#F xL rMGtNHQN hdrR #rowSB # Tx #( UN #@ X Y #fdZ # [# \# ] # ^E #( ` #0 a #x b # c?#?    T W ?E  WN & #f log$T #. s.Xss/ hK 6? s6Xt6Pss8 hrow: ` NG sNXP?lq? sqXqPssr h sXss h  sh7sh!?sh% : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B wwAvABwBCwCFwFvwwwvwwwvwwwvwwwvww w #v#$w$%w%(w(;v;<w,<p /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_snapshot.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_reply.htnt_stream.htnt_log.htnt_snapshot.h -2I1tvttY.uKgvK .u . . . ._chainsize_ttnt_header_updateTNT_LOG_EVERSION_shortbufssize_ttnt_log_rowTNT_LOG_EFAILtypetnt_header_IO_buf_baselong long unsigned intTNT_LOG_ETYPEtnt_header_deleteTNT_LOG_XLOGlimitTNT_LOG_EOKTNT_LOG_SNAPSHOTlong long intsigned charfieldsize_enctnt_streamtnt_listTNT_LOG_ECORRUPT_filenoproc_enc_len_IO_read_endlong intproc_enctnt_stream_snapshot_flags__ssize_t_IO_buf_end_cur_columntnt_snapshot_opentnt_header_selectuint16_tdouble_IO_write_ptrtnt_snapshot_closetnt_request_call_old_offset_offsetdel_1_3tnt_list_ptrtnt_log_typetnt_request_insertcurrent_offsetvalueTNT_LOG_LASTtnt_snapshot_strerror_IO_markerinsertprocesstnt_snapshot_read_tupleproclong unsigned inttnt_header_delete_1_3tnt_logoff_tsize_enc_leniovectnt_replytnt_snapshotdatashort unsigned intread_tuplespace_posops_sizetuples_IO_save_basetnt_request_deleteread_requestwritevtnt_log_error_lock_flags2data_sizecalliov_baseiov_lenwritecardinalitysizetypeallocated_IO_write_endtnt_request_updatetuple_sizeTNT_LOG_NONEcounttnt_request_delete_1_3_IO_read_ptruint64_ttnt_request_selectcrc32_data_IO_lock_t_IO_FILEorigin_sizeGNU C 4.7.3__off_ttnt_header_callselect_modecurrent_valuerow_snaperror_markers/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_snapshot.cunsigned chartnt_snapshot_errnotnt_snapshot_freeshort int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpltnt_log_header_v11file_vtable_offsetFILEorigincurrent__pad1uint32_terrno_TNT_LOG_EMEMORYcookietnt_request_update_opchartnt_requestproc_lenunsigned inttnt_log_row_snap_v11indexcrc32_hdrtnt_snapshot_errorallocwrcnt_next__off64_toffset_IO_read_base_IO_save_endfreeTNT_LOG_ESYSTEMtnt_tupletnt_log_value__pad2__pad3__pad4__pad5update_unused2codewrite_requestreqiduint8_t_IO_backup_baseflagsreadread_replysizelisttnt_header_insert_IO_write_base_sbuftnt_log_row_v11GCC: (Debian 4.7.3-4) 4.7.3zRx BAC } <fAC a \AC  |6AC q &AC a AC S AC Y AC S .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @<+8&|,|6|g1,BP`0[@0 tto@ 0q0I f h @!x' x*4B"Bf   :HUes6&!$tnt_snapshot.ctnt_snapshot_freetnt_snapshot_read_tupletnt_log_closetnt_mem_freetnt_log_next_totnt_log_errortnt_snapshottnt_stream_inittnt_mem_alloctnt_stream_freememsettnt_snapshot_opentnt_log_opentnt_snapshot_closetnt_snapshot_errortnt_snapshot_strerrortnt_log_strerrortnt_snapshot_errno 0m4d B     !<) . ; I PP #W t^ e l Qq |   ~ Z  ; z   w H  D & 4 C R ma p \ q    /     1 ( 8 H $X +h 2x 9  G |    G % 3 B iM X c Un bz ] c      ( 7 C R k y        "   +$ 9 <^ 1 j D      J L{  Z 7  k ^  & 1 < @H _T b   c P  U +  " 0 > UL Z h }v 6    c  O -   d  - q> C ] =y  = A   /   C2 @ ^U a ]| O       &L cg qn v B~  B  `   # 9 I T \ d z          q$! @9 ^D$L<T   @B`$tnt_rpl.c.o/ 1378727460 1000 1000 100664 16224 ` ELF> @@UHH H}HEH@HHEHEH@(Ht HEH@(HEH@HHUHH0H}HuHUHEH@HHEHUHMHEHHUHH0H}HuHEH@HHEHEH@(H@HHEHMHEHHHuyHEHHHE HHHuPHE@&EHE@ EEHEHP(HMHEоHuHUHH H}H}EHEHHEH}u 0HHEHPHHEH@HHHEH@H0HHEH@ HEH@0HEH@(HEH@8HEH@HEH@HEH@@HEH@HHEHEH@(HEAHEH@HHtHEH@HHHEH@H}t HEHUHH0H}HuHEH@HHEHEH@(Hu HEH@(Hu~HEH@(H@HHEHuHEHHuGEHuHEHHuU9tHUHH H}HEH@HHEHEH@(Ht HEHUHH}HuHEH@HHUHP(]  ?z ' 8intiiim  w# !#+ -# .-#0F1M3T78 / 03# len13# 23#5 ns63# 73#: ns;3#> ns?3# @3#C nsD3# E3#H- I3#Lq nsM3# N3# O3# P3#  # $3# %# &-# '?# 4 ptr 5#q 8 9# :3# ;?#  $% ? ( &d h '# t (q#( + h ,# t -q#( 0 h 1# t 2q# 5 op 6# 73# 8# 93# :3# ;# pH >{ h ?# t @q# ops A#( B3#0 opv C{#8 opc D3#@@ G h H# I# J3# K# L3# t Mq#  P h Q-# l R#H YN Z? [ddel \ ] ^ _x U V# W-# h XI# r `# vc a?#h v b#p0 # op $3# %3# &3# '# (# )3#(X & '?# (# )# *$# +D# ,e#( -#0 .#8 /#@ 0#H 13#P 23#T   -    ?   N  D  -* ?_  _J ?  k ?   x 0h 1# 2?# 3# 4# 5#0 6#@ 7#H 8#P 9?#X :#` ;#h ?#| ?# @# A, # B?#09 13# lsn2># tm39 # len43# 53# 8v tag9(# :># op;(# 0! hdr" # row#@ # net$#(0 s0Xsr1 hv :I s:Xbuf:P:Hsn;I hu @? s@Hr@@srB hsnCI `KIPb sbXd?lysrv `?{ sHlsn>@sr hsnI `3\ sXsr h shnet`. 3% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 ' I I I!I/  : ;  : ; I : ; I'  : ; ( .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I .? : ; ' I@B  : ; .? : ; ' @B .? : ; ' @B wwBvBCwCDwDGwG{v{|w|}w}wQvQRwRSwSVwVvwwwbvbcwcdwdgwgvwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_rpl.cstddef.htypes.htypes.htime.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_reply.htnt_stream.htnt_opt.htnt_iob.htnt_net.htnt_log.htnt_rpl.h /ʼ1=g2v"wwu.uKsf gY.KKvvuuu .ɻ .TNT_EBADVALTNT_EOKsize_ttnt_rpl_attachtnt_header_updateuint64_ttnt_rpl_closetnt_stream_netssize_ttypetnt_headerlong long unsigned inttnt_header_deletesend_cb_argtnt_header_delete_1_3rbuflimitTNT_LASTfreelong long intsigned charfieldsize_enctnt_streamtnt_list/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_rpl.crecv_cb_argproc_enc_lenlong intproc_enctnt_rpl_recv_cb__ssize_ttnt_header_selectuint16_tdoubleread_replydel_1_3tnt_list_ptrtnt_rpl_versionTNT_ESIZEcountsend_bufsend_cbTNT_EMEMORYorigin_sizeinsertunsigned intprocTNT_ESYSTEMlong unsigned inttmout_recvtnt_iob_txv_tTNT_EBIG__suseconds_tsize_enc_leniovectnt_replydataread_tupleops_sizeporttnt_request_deletetnt_rpltnt_request_tread_requestwritevtnt_request_callshort inttimevalcalliov_baseiov_lenwriteversioncardinalitytuplessizetypeallocatedtnt_request_updatetv_sectnt_request_delete_1_3tnt_request_selectcrc32_datatnt_rpl_freeGNU C 4.7.3tnt_header_callselectTNT_ERESOLVEhdr_iprotoerrortnt_rpl_requestsend_cbvrecv_bufunsigned chartmout_sendtnt_log_header_v11tnt_log_row_v11origintmout_connecttv_usecuint32_tcookietnt_request_update_opchartnt_requesttnt_stream_rplproc_len__time_tindexcrc32_hdrtnt_errorTNT_ETMOUTallocwrcntoffsetshort unsigned inttnt_tuple/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrplconnectedupdatecodewrite_requestreqidrecv_cbtnt_iobuint8_tflagsTNT_EFAILreadsizetnt_rpl_openhostnametnt_iob_tx_tlisttnt_header_inserterrno_tnt_opttnt_request_insertsbufGCC: (Debian 4.7.3-4) 4.7.3zRx CAC ~ <9AC t zPLRx  $AC  0AC +  hAC  3AC n AC Y .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @8+&,19P K0-\$jzv0u(>0 X> 09_0 p>h& )< C(C98|    HUavR0c3#-tnt_rpl.ctnt_rpl_versiontnt_rpl_freetnt_rpl_recv_cbtnt_rpl_requesttnt_mem_freetnt_io_recv__gcc_personality_v0tnt_request_from_Unwind_Resumetnt_rpltnt_stream_inittnt_mem_allocmemsettnt_stream_freetnt_rpl_opentnt_inittnt_connecttnt_io_send_rawtnt_io_recv_rawtnt_rpl_closetnt_closetnt_rpl_attach=v) C1Lt | Yw !-"C]$   T!) . ; hI NP 7W J^ e 3l s |x      b =   z  J S ) 4 ? <J oV jr  &     *   . G U 0c r J~ i   $   !  $ @ Ge         Q  "   W    C - E8 C O [ i 7    & u   $) [7 E S a o }    *  ?     z \ # <" 0 > L sZ Ei    - 9  ? E +K \Q W  ] c i o v S  Z  & 8 g + < A z[ w    C  C | `. P ,[ |c Rk   R    & @  ' c/ m a} E c      @     @Ck | R ccrc32.c.o/ 1378727460 1000 1000 100664 19016 ` ELF>P8@@UHH}HuHEHEE+HE3E%U1ЉEHEH}HmuċE]UH}HuHUHEHE+HE3E%U1ЉEHEH}HmuċE]UH}HuЉU؉M̋E̋U؉)EE̋U؉)+EEE/HE3E%U1ЉEHEEE;ErE#HE1EHEHE1EHEHE1EHEHE1EHEE%E%1ЉEEEE%3UE%1ЉEHEH1EHEHEH1EHEHEH1EHEHEH1EHEEE;EE/HE3E%U1ЉEHEEE;ErɋE]UHH }HuU}uE'HEƒ)ЉEMUHuEUHH}HuU}wUHMEHΉ9UHMEHΉx0w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V0int>0)37z>_buf_X_oPpahcrcbd   z fcrcÅ\bufPoHph crcL@Hlil`\hd  )\P7Xll`7ha  ! Y    9 q 0 % $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?  ww_v_`w`awadwdvwwwvwwwvwww>v>?w,? /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includecrc32.cstddef.hstdint.h u/+Y./+=.K"eJ!KKO;ZZ:]kJ"eJ=4#gZ/=4!gZ>size_tuintptr_tcrc32crunning_lengthshort unsigned intcrc32sizesctp_crc_tableil8_o40long unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/crc32.csctp_crc_tableil8_o48sctp_crc_tableil8_o64sctp_crc_tableil8_o80sctp_crc_tableil8_o88to_even_wordunsigned charunsigned intcharuint8_tcrc32c_sb8_64_bitmultitable_crc32csigned charsctp_crc_tableil8_o56sizetypeGNU C 4.7.3crc32_tableshort intbuffersctp_crc_tableil8_o32init_bytesuint32_tlong intp_bufterm1term2end_bytescrc32c_tablesctp_crc_tableil8_o72lengthsingletable_crc32cGCC: (Debian 4.7.3-4) 4.7.3zRx `AC [ <ZAC U \AC  |FAC A DAC  .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @?`A &( ,+6+1BBB/kP0`20[I0 t2oI 0p4M0666Ix7= H@ `Z)? Uk $F    `Dcrc32.ccrc32c_tablesingletable_crc32csctp_crc_tableil8_o32sctp_crc_tableil8_o40sctp_crc_tableil8_o48sctp_crc_tableil8_o56sctp_crc_tableil8_o64sctp_crc_tableil8_o72sctp_crc_tableil8_o80sctp_crc_tableil8_o88crc32c_sb8_64_bitmultitable_crc32ccrc32_tablecrc32crc32c4    $      6  Q     m?% , !3 ': /A [H mO ] d k <p { A   :`  @  :`& `L @g Is{   3       [,4<  F U d 3s  ?    3    E ( 5> yKT aj w   $   @``tarantool-1.5.1.218.g1a69fd6/connector/c/tntrpl/libtarantoolrpl.so0000777000000000000000000000000012213333057027176 2libtarantoolrpl.so.1ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tnt/0000775000000000000000000000000012231715276017007 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tnt/cmake_install.cmake0000664000000000000000000000560012213333034022604 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/libtarantool.a") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantool.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantool.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantool.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") FILE(RPATH_CHECK FILE "${file}" RPATH "") ENDIF() ENDFOREACH() FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/libtarantool.so.1.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/libtarantool.so.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/libtarantool.so" ) FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantool.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantool.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantool.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "${file}") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDFOREACH() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_stream.c0000664000000000000000000000471512202131537021330 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include /* * tnt_stream_reqid() * * set reqid value * * s - stream pointer * reqid - new reqid value * * returns old reqid value * */ uint32_t tnt_stream_reqid(struct tnt_stream *s, uint32_t reqid) { uint32_t old = s->reqid; s->reqid = reqid; return old; } /* * tnt_stream_init() * * free stream object. * * s - stream pointer * */ struct tnt_stream* tnt_stream_init(struct tnt_stream *s) { if (s) { memset(s, 0, sizeof(struct tnt_stream)); return s; } s = tnt_mem_alloc(sizeof(struct tnt_stream)); if (s == NULL) return NULL; memset(s, 0, sizeof(struct tnt_stream)); s->alloc = 1; return s; } /* * tnt_stream_free() * * free stream object. * * s - stream pointer * */ void tnt_stream_free(struct tnt_stream *s) { if (s->free) s->free(s); if (s->alloc) tnt_mem_free(s); } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_enc.c0000664000000000000000000000517412202131537020602 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include int tnt_enc_read(const char *buf, uint32_t *value) { *value = 0; if (!(buf[0] & 0x80)) { *value = buf[0] & 0x7f; return 1; } if (!(buf[1] & 0x80)) { *value = (buf[0] & 0x7f) << 7 | (buf[1] & 0x7f); return 2; } if (!(buf[2] & 0x80)) { *value = (buf[0] & 0x7f) << 14 | (buf[1] & 0x7f) << 7 | (buf[2] & 0x7f); return 3; } if (!(buf[3] & 0x80)) { *value = (buf[0] & 0x7f) << 21 | (buf[1] & 0x7f) << 14 | (buf[2] & 0x7f) << 7 | (buf[3] & 0x7f); return 4; } if (!(buf[4] & 0x80)) { *value = (buf[0] & 0x7f) << 28 | (buf[1] & 0x7f) << 21 | (buf[2] & 0x7f) << 14 | (buf[3] & 0x7f) << 7 | (buf[4] & 0x7f); return 5; } return -1; } void tnt_enc_write(char *buf, uint32_t value) { if (value >= (1 << 7)) { if (value >= (1 << 14)) { if (value >= (1 << 21)) { if (value >= (1 << 28)) *(buf++) = (value >> 28) | 0x80; *(buf++) = (value >> 21) | 0x80; } *(buf++) = ((value >> 14) | 0x80); } *(buf++) = ((value >> 7) | 0x80); } *(buf++) = ((value) & 0x7F); } int tnt_enc_size(uint32_t value) { if (value < (1 << 7)) return 1; if (value < (1 << 14)) return 2; if (value < (1 << 21)) return 3; if (value < (1 << 28)) return 4; return 5; } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_call.c0000664000000000000000000000600212231715276020751 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include /* * tnt_call() * * write call request to stream; * * s - stream pointer * flags - request flags * proc - remote procedure name * args - call arguments * * returns number of bytes written, or -1 on error. */ ssize_t tnt_call(struct tnt_stream *s, uint32_t flags, const char *proc, struct tnt_tuple *args) { /* encoding procedure name */ int proc_len = strlen(proc); int proc_enc_size = tnt_enc_size(proc_len); char proc_enc[5]; tnt_enc_write(proc_enc, proc_len); /* filling major header */ struct tnt_header hdr; hdr.type = TNT_OP_CALL; hdr.len = sizeof(struct tnt_header_call) + proc_enc_size + proc_len + args->size; if (args->size == 0) hdr.len += 4; hdr.reqid = s->reqid; /* filling call header */ struct tnt_header_call hdr_call; hdr_call.flags = flags; /* writing data to stream */ struct iovec v[5]; v[0].iov_base = (void *)&hdr; v[0].iov_len = sizeof(struct tnt_header); v[1].iov_base = (void *)&hdr_call; v[1].iov_len = sizeof(struct tnt_header_call); v[2].iov_base = proc_enc; v[2].iov_len = proc_enc_size; v[3].iov_base = (void *)proc; v[3].iov_len = proc_len; uint32_t argc = 0; if (args->size == 0) { v[4].iov_base = (void *)&argc; v[4].iov_len = 4; } else { v[4].iov_base = args->data; v[4].iov_len = args->size; } return s->writev(s, v, 5); } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/libtarantool.so0000777000000000000000000000000012213333045025221 2libtarantool.so.1ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_delete.c0000664000000000000000000000477512231715276021317 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include /* * tnt_delete() * * write delete request to stream; * * s - stream pointer * ns - space * flags - request flags * k - tuple key * * returns number of bytes written, or -1 on error. */ ssize_t tnt_delete(struct tnt_stream *s, uint32_t ns, uint32_t flags, struct tnt_tuple *k) { /* filling major header */ struct tnt_header hdr; hdr.type = TNT_OP_DELETE; hdr.len = sizeof(struct tnt_header_delete) + k->size; hdr.reqid = s->reqid; /* filling delete header */ struct tnt_header_delete hdr_del; hdr_del.ns = ns; hdr_del.flags = flags; /* writing data to stream */ struct iovec v[3]; v[0].iov_base = (void *)&hdr; v[0].iov_len = sizeof(struct tnt_header); v[1].iov_base = (void *)&hdr_del; v[1].iov_len = sizeof(struct tnt_header_delete); v[2].iov_base = k->data; v[2].iov_len = k->size; return s->writev(s, v, 3); } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_mem.c0000664000000000000000000000374712202131537020617 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include static void *(*_tnt_realloc)(void *ptr, size_t size) = (void *(*)(void*, size_t))realloc; void *tnt_mem_init(tnt_allocator_t alloc) { void *ptr = _tnt_realloc; if (alloc) _tnt_realloc = alloc; return ptr; } void *tnt_mem_alloc(size_t size) { return _tnt_realloc(NULL, size); } void *tnt_mem_realloc(void *ptr, size_t size) { return _tnt_realloc(ptr, size); } char *tnt_mem_dup(char *sz) { size_t len = strlen(sz); char *szp = tnt_mem_alloc(len + 1); if (szp == NULL) return NULL; memcpy(szp, sz, len + 1); return szp; } void tnt_mem_free(void *ptr) { _tnt_realloc(ptr, 0); } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_buf.c0000664000000000000000000001145712202131537020612 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include static void tnt_buf_free(struct tnt_stream *s) { struct tnt_stream_buf *sb = TNT_SBUF_CAST(s); if (sb->data) tnt_mem_free(sb->data); tnt_mem_free(s->data); s->data = NULL; } static ssize_t tnt_buf_read(struct tnt_stream *s, char *buf, size_t size) { struct tnt_stream_buf *sb = TNT_SBUF_CAST(s); if (sb->data == NULL) return 0; if (sb->size == sb->rdoff) return 0; size_t avail = sb->size - sb->rdoff; if (size > avail) size = avail; memcpy(sb->data + sb->rdoff, buf, size); sb->rdoff += size; return size; } static char* tnt_buf_resize(struct tnt_stream *s, size_t size) { struct tnt_stream_buf *sb = TNT_SBUF_CAST(s); size_t off = sb->size; size_t nsize = off + size; char *nd = realloc(sb->data, nsize); if (nd == NULL) { free(sb->data); return NULL; } sb->data = nd; sb->size = nsize; return sb->data + off; } static ssize_t tnt_buf_write(struct tnt_stream *s, const char *buf, size_t size) { char *p = tnt_buf_resize(s, size); if (p == NULL) return -1; memcpy(p, buf, size); s->wrcnt++; return size; } static ssize_t tnt_buf_writev(struct tnt_stream *s, struct iovec *iov, int count) { size_t size = 0; int i; for (i = 0 ; i < count ; i++) size += iov[i].iov_len; char *p = tnt_buf_resize(s, size); if (p == NULL) return -1; for (i = 0 ; i < count ; i++) { memcpy(p, iov[i].iov_base, iov[i].iov_len); p += iov[i].iov_len; } s->wrcnt++; return size; } static ssize_t tnt_buf_write_request(struct tnt_stream *s, struct tnt_request *r) { return tnt_buf_writev(s, r->v, r->vc); } static int tnt_buf_reply(struct tnt_stream *s, struct tnt_reply *r) { struct tnt_stream_buf *sb = TNT_SBUF_CAST(s); if (sb->data == NULL) return -1; if (sb->size == sb->rdoff) return 1; size_t off = 0; int rc = tnt_reply(r, sb->data + sb->rdoff, sb->size - sb->rdoff, &off); if (rc == 0) sb->rdoff += off; return rc; } static int tnt_buf_request(struct tnt_stream *s, struct tnt_request *r) { struct tnt_stream_buf *sb = TNT_SBUF_CAST(s); if (sb->data == NULL) return -1; if (sb->size == sb->rdoff) return 1; size_t off = 0; int rc = tnt_request(r, sb->data + sb->rdoff, sb->size - sb->rdoff, &off, NULL); if (rc == 0) sb->rdoff += off; return rc; } /* * tnt_buf() * * create and initialize buffer stream; * * s - stream pointer, maybe NULL * * if stream pointer is NULL, then new stream will be created. * * returns stream pointer, or NULL on error. */ struct tnt_stream *tnt_buf(struct tnt_stream *s) { int allocated = s == NULL; s = tnt_stream_init(s); if (s == NULL) return NULL; /* allocating stream data */ s->data = tnt_mem_alloc(sizeof(struct tnt_stream_buf)); if (s->data == NULL) { if (allocated) tnt_stream_free(s); return NULL; } /* initializing interfaces */ s->read = tnt_buf_read; s->read_reply = tnt_buf_reply; s->read_request = tnt_buf_request; s->read_tuple = NULL; s->write = tnt_buf_write; s->writev = tnt_buf_writev; s->write_request = tnt_buf_write_request; s->free = tnt_buf_free; /* initializing internal data */ struct tnt_stream_buf *sb = TNT_SBUF_CAST(s); sb->rdoff = 0; sb->size = 0; sb->data = NULL; return s; } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_iter.c0000664000000000000000000002267712202131537021007 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include static struct tnt_iter *tnt_iter_init(struct tnt_iter *i) { if (i) { memset(i, 0, sizeof(struct tnt_iter)); return i; } i = tnt_mem_alloc(sizeof(struct tnt_iter)); if (i == NULL) return NULL; memset(i, 0, sizeof(struct tnt_iter)); i->alloc = 1; i->status = TNT_ITER_OK; return i; } static int tnt_iter_field_next(struct tnt_iter *i) { struct tnt_iter_field *ip = TNT_IFIELD(i); /* initializing iter to the first field */ if (ip->fld_ptr == NULL) { /* in case of insufficient data */ if (ip->tu->size < 4) { i->status = TNT_ITER_FAIL; return 0; } /* tuple could be empty */ if (ip->tu->size == 4) { if (ip->tu->cardinality != 0) i->status = TNT_ITER_FAIL; return 0; } ip->fld_ptr = ip->tu->data + 4; /* skipping tuple cardinality */ ip->fld_index = 0; ip->fld_esize = tnt_enc_read(ip->fld_ptr, &ip->fld_size); if (ip->fld_esize == -1) { i->status = TNT_ITER_FAIL; return 0; } ip->fld_data = ip->fld_ptr + ip->fld_esize; return 1; } else if (ip->tu->cardinality == (ip->fld_index + 1)) /* checking end */ return 0; /* skipping to the next field */ ip->fld_ptr += ip->fld_esize + ip->fld_size; ip->fld_index++; /* reading field size */ ip->fld_esize = tnt_enc_read(ip->fld_ptr, &ip->fld_size); if (ip->fld_esize == -1) { i->status = TNT_ITER_FAIL; return 0; } ip->fld_data = ip->fld_ptr + ip->fld_esize; return 1; } static void tnt_iter_field_rewind(struct tnt_iter *i) { struct tnt_iter_field *ip = TNT_IFIELD(i); ip->fld_ptr = NULL; ip->fld_index = 0; ip->fld_data = NULL; ip->fld_size = 0; ip->fld_esize = 0; } /* * tnt_iter() * * initialize tuple field iterator; * create and initialize tuple field iterator; * * i - tuple field iterator pointer, maybe NULL * t - tuple pointer * * if tuple field iterator pointer is NULL, then new tuple iterator will be created. * * returns tuple iterator pointer, or NULL on error. */ struct tnt_iter* tnt_iter(struct tnt_iter *i, struct tnt_tuple *t) { i = tnt_iter_init(i); if (i == NULL) return NULL; i->type = TNT_ITER_FIELD; i->next = tnt_iter_field_next; i->rewind = tnt_iter_field_rewind; i->free = NULL; struct tnt_iter_field *ip = TNT_IFIELD(i); ip->tu = t; return i; } static int tnt_iter_list_next(struct tnt_iter *i) { struct tnt_iter_list *il = TNT_ILIST(i); if (il->tu_index == il->l->count) return 0; il->tu = il->l->list[il->tu_index++].ptr; return 1; } static void tnt_iter_list_rewind(struct tnt_iter *i) { struct tnt_iter_list *il = TNT_ILIST(i); il->tu_index = 0; } /* * tnt_iter_list() * * initialize tuple list iterator; * create and initialize tuple list iterator; * * i - tuple list iterator pointer, maybe NULL * t - tuple list pointer * * if tuple list iterator pointer is NULL, then new tuple list * iterator will be created. * * returns tuple list iterator pointer, or NULL on error. */ struct tnt_iter* tnt_iter_list(struct tnt_iter *i, struct tnt_list *l) { i = tnt_iter_init(i); if (i == NULL) return NULL; i->type = TNT_ITER_LIST; i->next = tnt_iter_list_next; i->rewind = tnt_iter_list_rewind; i->free = NULL; struct tnt_iter_list *il = TNT_ILIST(i); il->l = l; return i; } static int tnt_iter_reply_next(struct tnt_iter *i) { struct tnt_iter_reply *ir = TNT_IREPLY(i); tnt_reply_free(&ir->r); tnt_reply_init(&ir->r); int rc = ir->s->read_reply(ir->s, &ir->r); if (rc == -1) { i->status = TNT_ITER_FAIL; return 0; } return (rc == 1 /* finish */ ) ? 0 : 1; } static void tnt_iter_reply_free(struct tnt_iter *i) { struct tnt_iter_reply *ir = TNT_IREPLY(i); tnt_reply_free(&ir->r); } /* * tnt_iter_reply() * * initialize tuple reply iterator; * create and initialize reply iterator; * * i - tuple reply iterator pointer, maybe NULL * s - stream pointer * * if stream iterator pointer is NULL, then new stream * iterator will be created. * * returns stream iterator pointer, or NULL on error. */ struct tnt_iter *tnt_iter_reply(struct tnt_iter *i, struct tnt_stream *s) { i = tnt_iter_init(i); if (i == NULL) return NULL; i->type = TNT_ITER_REPLY; i->next = tnt_iter_reply_next; i->rewind = NULL; i->free = tnt_iter_reply_free; struct tnt_iter_reply *ir = TNT_IREPLY(i); ir->s = s; tnt_reply_init(&ir->r); return i; } static int tnt_iter_request_next(struct tnt_iter *i) { struct tnt_iter_request *ir = TNT_IREQUEST(i); tnt_request_free(&ir->r); tnt_request_init(&ir->r); int rc = ir->s->read_request(ir->s, &ir->r); if (rc == -1) { i->status = TNT_ITER_FAIL; return 0; } return (rc == 1 /* finish */ ) ? 0 : 1; } static void tnt_iter_request_free(struct tnt_iter *i) { struct tnt_iter_request *ir = TNT_IREQUEST(i); tnt_request_free(&ir->r); } /* * tnt_iter_request() * * initialize tuple request iterator; * create and initialize request iterator; * * i - tuple request iterator pointer, maybe NULL * s - stream pointer * * if stream iterator pointer is NULL, then new stream * iterator will be created. * * returns stream iterator pointer, or NULL on error. */ struct tnt_iter *tnt_iter_request(struct tnt_iter *i, struct tnt_stream *s) { i = tnt_iter_init(i); if (i == NULL) return NULL; i->type = TNT_ITER_REQUEST; i->next = tnt_iter_request_next; i->rewind = NULL; i->free = tnt_iter_request_free; struct tnt_iter_request *ir = TNT_IREQUEST(i); ir->s = s; tnt_request_init(&ir->r); return i; } static int tnt_iter_storage_next(struct tnt_iter *i) { struct tnt_iter_storage *is = TNT_ISTORAGE(i); tnt_tuple_free(&is->t); tnt_tuple_init(&is->t); int rc = is->s->read_tuple(is->s, &is->t); if (rc == -1) { i->status = TNT_ITER_FAIL; return 0; } return (rc == 1 /* finish */ ) ? 0 : 1; } static void tnt_iter_storage_free(struct tnt_iter *i) { struct tnt_iter_storage *is = TNT_ISTORAGE(i); tnt_tuple_free(&is->t); } /* * tnt_iter_storage() * * initialize tuple storage iterator; * create and initialize storage iterator; * * i - tuple storage iterator pointer, maybe NULL * s - stream pointer * * if stream iterator pointer is NULL, then new stream * iterator will be created. * * returns stream iterator pointer, or NULL on error. */ struct tnt_iter *tnt_iter_storage(struct tnt_iter *i, struct tnt_stream *s) { i = tnt_iter_init(i); if (i == NULL) return NULL; i->type = TNT_ITER_STORAGE; i->next = tnt_iter_storage_next; i->rewind = NULL; i->free = tnt_iter_storage_free; struct tnt_iter_storage *is = TNT_ISTORAGE(i); is->s = s; tnt_tuple_init(&is->t); return i; } /* * tnt_iter_free() * * free iterator. * * i - iterator pointer * */ void tnt_iter_free(struct tnt_iter *i) { if (i->free) i->free(i); if (i->alloc) tnt_mem_free(i); } /* * tnt_next() * * iterates to next field; * iterates to tuple in list; * * i - iterator pointer * * depend on iterator tuple, sets to the * next tuple field or next tuple in the list. * * returns 1 or 0 on end. */ int tnt_next(struct tnt_iter *i) { return i->next(i); } /* * tnt_rewind() * * iterates to first field; * iterates to first tuple in a list; * * i - iterator pointer * * depend on iterator tuple, sets to the * first tuple field or first tuple in a list. */ void tnt_rewind(struct tnt_iter *i) { i->status = TNT_ITER_OK; if (i->rewind) i->rewind(i); } /* * tnt_field() * * set or create iterator to the specified tuple field; * * i - tuple iterator pointer * t - tuple pointer * index - tuple field index * * returns tuple iterator pointer if field found, NULL otherwise. */ struct tnt_iter* tnt_field(struct tnt_iter *i, struct tnt_tuple *t, uint32_t index) { int allocated = i == NULL; if (i == NULL) { i = tnt_iter(i, t); if (i == NULL) return NULL; } else tnt_rewind(i); while (tnt_next(i)) if (TNT_IFIELD_IDX(i) == index) return i; if (allocated) tnt_iter_free(i); return NULL; } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/libtarantool.so.1.10000775000000000000000000026103412213333045022341 0ustar rootrootELF>@@A@8@# hh hh h px  h h h $$PtdYYYQtdGNU*{"ʔ ql#% .0gH@P$nbPD A4& I "&(,/059<=>?ACDFGHV &`eX ;Czbe E|[r6V  !x`eb#E6if  K0mdfoR/hCj.T/*D|#(Ԛ~nꖲ땆N{^w0qX|z lL<BE96P#ǝ.7E    C[ 2 4L"& F hA; E$a ?C DA$ h96\ 0$ eVU Y E 96l A  %k $X0 /C /%x ;0 9/  8 #w %$ h} 1Bo + 7Z -> 0 'X A#m 1q :9 _ 6#| K#  * d{ G)f )$ $xk k  n) KB ;0 ;9 xk  ,X =eG *07  D:ER a0 97 + M <__gmon_start___fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassestnt_mem_inittnt_mem_alloctnt_mem_realloctnt_mem_dupstrlenmemcpytnt_mem_freetnt_enc_readtnt_enc_writetnt_enc_sizetnt_tuple_initmemsettnt_tuple_freetnt_tuple_addtnt_tuple__ctype_b_loc_Unwind_Resume__gcc_personality_v0tnt_tuple_settnt_tuple_set_astnt_list_inittnt_list_freetnt_listtnt_list_attnt_itertnt_iter_listtnt_reply_freetnt_reply_inittnt_iter_replytnt_request_freetnt_request_inittnt_iter_requesttnt_iter_storagetnt_iter_freetnt_nexttnt_rewindtnt_fieldtnt_stream_reqidtnt_stream_inittnt_stream_freetnt_replytnt_requesttnt_buftnt_pingtnt_inserttnt_update_arithtnt_update_arith_i32tnt_update_arith_i64tnt_update_assigntnt_update_splicetnt_update_deletetnt_update_inserttnt_updatetnt_deletetnt_calltnt_selecttnt_reply_fromtnt_request_setorigintnt_request_fromlibgcc_s.so.1libc.so.6_edata__bss_start_endlibtarantool.so.1GCC_3.0GCC_3.3.1GLIBC_2.3GLIBC_2.14GLIBC_2.2.50P&y a_& ii ui  h h `k `k j j j  j  j  hk  pk @j Hj Pj Xj `j ,hj pj xj #j j !j j j 1j 7j j 2j j 3j j $j j  j %j *k &k ;k Fk  k B(k -0k  8k 4@k  Hk Pk +Xk HH-V HtH5:V %>HEHUHHEHHE@HHHEHHE@PHEPHEÐUHHH}H}tHEH{HELHEH}u0HEHCHE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HHXHEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHHEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uOHEHEHHPHEH_HPHEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHEHEH}uOHEHEH6HPHEHHPHEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHH.HEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHH]UHH H}HuHEHHEH}u_HEHEHHPHEH@HEHxHP HEH(HEHEHUHHEHH2HEUHH H}HEH(HEHEHH4HEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}u_HEHEHHPHEH@HEHxHP HEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHH:HEHH HEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}u_HEHEHHPHEH@HEHxHP HEH(HEHEHUHHEHHHEUHHH}HEH@ HtHEH@ HUHHE@t HEHgUHHH}HEH@HUHUHHH}HE@HEH@HtHEH@HUHUHH0H}HuUH}EH}u%HUHEHHtHEH}u'HHEHHE@@;EuHE(HEHu݃}t HEHUHH}uHE@TEHEUPTE]UHHH}H}tHEXH[HE@XkHEH}u$HEXH#HEHEUHHH}HEH@@HtHEH@@HUHHEt HEHÐUHH H}HEH@HHEHEHHtHEHHmHEH@HH]HEH@HUHH0H}HuHUHEH@HHEHEHHu HEHPHEH@H9upHEHPHEH@HH)HHEHEH;EvHEHEHEHHEH@H HUHEHH8HEHPHEHHEHPHEUHH0H}HuHEH@HHEHEH@HEHEHUHHEHEHHUHHHEH}uHEHH%HEHUHHEHUHPHEHHEHUHH0H}HuHUHUHEHHDHEH}u H,HUHMHEHH4HE@PPHEPPHEUHH@H}HuЉUHEEEHHHHEHH@HEEE;E|HUHEHHHEH}u HE[EHHHHEHHPEHHHHEHHHEHHcEHHHHEHH@HEEE;E|HE؋@PPHE؉PPHEUHHH}HuHEPhHEHHpHEHHUHH0H}HuHEH@HHEHEHHu HEHPHEH@H9ujHEHEHPHEH@HH)HEHHEH@H4HUHEHHHpE}uHEHPHEHHEHPEHUHH0H}HuHEH@HHEHEHHu HEHPHEH@H9upHEHEHPHEH@HH)HEHHEH@H4HUHEAHHHE}uHEHPHEHHEHPEHIUHH H}H}EHEHHEH}u HHEHPHHEH@HHu}t HEHxHEHHP HEHHP(HEHHP0HEH@8HEH$HPHEH~HPHEHgHPHEHMHP@HEH@HHEHEH@HEH@HEHHEUHH0H}EEHE؋@TEHEHEHE HEH@HuHMغHHÐUHHpH}uUHME HEH@EHE@TEEEEEHEHEHE HEHEHEHEH@HEHEH@HEHEH@HuHMHH+ÐUHHpH}uHMDEEEEUHEHEHEHEHEHEHEHEHEHEЋEHHEH}tHEHEEHEEHEH@UHuHMHHzUHH H}uЉMEUHMuHEAHUHH H}uЉMEUHMuHEAHUHH H}uHMEUHMuHEAHUHH H}uHUMMHUuHEAHѺHvUHH`H}ȉuĉUMLELM%EEHE EEU‹EHEЃEEHHEH}u HHEHEHEHEHEUHEHEHEHEHEUHEHEHEHEHEHEHUHMHEHHHEHEMHUuHEAHѺHEHEHEHHEUHHH}uuHEAHUHH H}uHUMMHUuHEAHѺHUHHH}uUHxLpEHxH@HpH@HH@Ѓ EHE@TEEEEEHEHEHE HEHEHEHxH@HEHxH@HEHpHPHEHEHpH@HHHEHpH@HH@HEHEH@HuHMHHÐUHHpH}uUHMEHEH@EHE@TEEEEEHEHEHE HEHEHEHEH@HEHEH@HEHEH@HuHMHHKÐUHHHhdHXHPHXHEEEUHEHEUEHPH@ЃEHPH@Hu EEHh@TE苅dEHEHEHE HEHEHEHEHEEHHEHXHEEHHEDž|HPH@HuH|HEHEHPH@HEHPH@HEHhH@HuHhHHÐUHH HDLHEHH HHMHPHEHEH@HEH HuDžHEH@T H@EEHHHHEH}uH HHHEHHHEH@ HEHPHHHEHH@HEH HHHHEH H@EH H+LHPHEЋEHHHHEHHEH@HEHHHHEHHEH@HBEH H~uH H HH@UHuHHHEHEH=HEHÐUHHH}HE0H:UHHH}HEH@HtHEH@HHEHHUHH`H}HuHUHuHMHE HHu EĉEHEHH=HE@(HEH@UHEPHE@UHEHE=u cHEHpHMHEHHu 9mHE@toEH=HHEHPHEH@Hu UHEHpHMHEHHuHEH@HHE t6HEt+HEt HEtHEt z}u jHEHp(HMHEHHu @m}u ,EH?HEH}u UHuHMHEHHuHEHHEHEEE|HEE܋EU);EHEE܃HEHƿ&HEH}t[HEHPHEHHE܃HEEUЃEEHE@(;EtHEH%HEHHHEHH4UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHHEHHEHHEHHEUHHPH}HuHUHMH} w$H}t HH+UHEHHEHEHE@H H;Ev&H}tHE@H+EHP HEHGHEHEHEHEHEHUHEH5HEH}t HUHEHEHÐUHHH}HExHUHHH}HE@tJw ttNr4=HEH(HHEH(HjHEH(HUHEH@0HtHEH@0HHEH@0HEH@HuHEH0HecHEH(HHEH@HHtHEH@HHVHEH@HHEH@XHtHEH@XH-HEH@XHEH@pHtHEH@pHHEH@pHEHHtHEHHHEHUHH}HuHUHEHUHHEHUHP]UHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEH!UHEHH(HEHHHuHEHHE@hHE@hHHHHHEHPpHEH@pHu&HEH(HHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHUHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEHW!UHEHH(HEHHHuHEH"HE@hHE@hHHHHHHEHPpHEH@pHu&HEH(HPHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEH1UHH0H}HuHUHEHp HMHEHHu ~HE@EEH$HEH}u QUHuHMHEHHuHEH!UHEHH(HEHHEHuHEHdHE@hHE@hHHHHHEHPpHEH@pHu&HEH(HHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHsUHH@H}HuHUHEHp HMHEкHHu HE؋@EEHfHEH}tUHuHMHEHHYHEHP8HEHHE}<}2EHcHEHH$HEHH.UHE؉P,HE؋@8HHHEHP0HEH@0HHE؋@8‹EHcHEHHEH@0HHHEHP0HE؋@8HHE؋P8E)EEUHcHU؋R8HHUH4HUHJ@HHHu!HEH@0HHEH@06HE@hHE؋@hHHHHHEHPpHEH@pHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pH HUH$HHEH@pHP HE؋@,HBHEH@pHP0HEH@0HHEH@pHP0HE؋@8HBHEH@pHP@HEH@HHHEH@pHP@HEH@PHBHEH2HEH@HH}t HEHfUHH`H}HuHUHEHp HMHEHHu lHE@EEHYHEH}UHuHMHEHHHEEEHEH0H|EUHEHЋEEEBEUEHHEHHEHHEԃ}UԋEEEE;ErHEH0HHEȋUMHEHHEHHHt/EEEE;EGHEH/HEH0HH}t HEHHUHH`H}HuHUHEHp HMHEHHu THE@`HEH@XHE@EEHHEH}UHuHMHEHHqHEEEEHUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHHEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHKHEHEHEHEHEHMHUHEH5HOEH}t HUHEHEHݼÐHH;Sܺ 7Z$Dd~T$d-4\|e2f<\|@z<%\|My<\ |f D l  T $ D d 0 u 4 \ 0 T  4 T t t 2  < Qd  zRx $PFJ w?;*3$"D +AC f d+#AC ^ .)AC d 7_AC Z v#AC ^ |AC  9AC  $KAC F D$AC _ ddAC _ (AC  zPLRx  $$n[ AC  $L` AC  qAC  49AC  T$AC _ txAC s $WkAC f AC  d}AC x AC  nOAC J <AC z \fAC a |B!AC \ CAC z AC | *AC e  AC  |AC | <*AC e \AC  |VAC | *AC e AC  0CAC ~ SAC Z R7AC r <iAC  \$AC _ |qAC l 5BAC } XQAC L AC  -AC  iAC d <AC  \0AC k $AC  $oAC  #AC  $LZAC U $tHAC  $fAC  dH6AC q ^6AC q t7AC r 9AC t EAC @ 0AC k $9AC t $mAC  $TAC  $He;AC ` $C"AC > $AC _  ;AC v $ AC  L jAC e $AC   $AC _  AC   )AC d  AC   AC  4 VAC  T AC  $AC  $oAC   UAC P  jAC e $d d/AC  )r       F h  LPS  !   = N ( ,w,d    Yh h o`   (j `p oooxo h &6FVfv&6FVfv&6`k GCC: (Debian 4.7.3-4) 4.7.3, ,,e ,x ',40,!1,+7Z,D38,;8>,G<,N=e,V?C,TaDA,eE.n 8\intaEOW:!ww- !(w K `(X ptr)wh X/wKn`2 /-h 3wnu ptr3wh 3-` 97y  sz7yX len8-h szp9y`J@ ptr@wh%  hk O.?\intaEOnnW3E&0buf&|h &` fK@!bufKhh Kd t\0 \l.n'.8\intaEOWH( p  T# T# w# w#Of3T 0x'09 _  # c$# X%y# &-# `'?# v4ptr5#x P8 R9# :# `;?# 0Jt0h;h`yt;hhYhtYHXY@ Y6[?lg?hYh-`0jyX" et}fmt}~p~Hlen?~sy~Wsy~Q i?~y ull} d!!ul8}!!Elldž}!o"li}?"A#bufH -@@-hcd"!#\?`BA#)$ctXbufP -H6?lo$')$ %@t'Xbuf'P '-Hnum'D6)?lo7$D %/%lDhuO/%%YlOX iRlPc%'`lc~k~! ptrn~"W''lXtP6?l0y`.'0u4\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y #ZrTT0 - tu .O#  /#  0#  1#  2#  3;# T 4#( A l B# tu CO#  D#U O' s PY# r Q# ( \L s ]Y# t ^#c8 iq s jY# r k*#@ s  ] ZR   L ' z9  {/# I |q# ` };#  O #  a #  a # X #(;I I 9 a I U ],I 'y(  i,I hq:;y(F* i:I Xip; hZbF** ibI Xipc hyI *+@e iyI XtyOPip h);+z+ iI Xil hz++  iI Xil hI +,` 1 iI XlPil hy;,, } iI Xir} hrc;dL,,  iI Xir} hcI ,T-  iI XsYPir} h1;T-- V iI XirV hrc;dc--@  iI XirV hI -.  iI XsYPirV h ;./ 4 i I Xis 4 hrc;d'/9/` x iI Xis4 h  +I 9//  i+I Xs+YPis34 h!A/ 0  iAI h U; 0*0 .iUI h!kd*0a0 _idI h"JvI a00@ivI XtvOP#vL$6x;l.`01^4\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y601~s6YX6Told8lPFY11sFYh\11`s\Yh .[ 17_ 4\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y #f X $# %)# U &)# +1!2s+YXsb,h/ 4!22 s4YXbuf4P 4)Hsb5h :)`F B2z3sBYH B)@sbChoffD)`YE)XndFP* Qz33sQYXbufQP Q)HpRh[34@U s[YHiov[$@[; \)hi];dp`X l4 5 slYhrl`8 q; 55 sqYHrq@sbrhoffw)Xrcx;d;56`_ sYHr@sbhoff)Xrc;d Y67sYX6;lsb`g. 78 4\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y 478 |s4YHhdr7`v<|P lu .5 884\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y* 788s7Yns77kv8Ohdr;` @PvD l  . 8<4\intaEOemu;W0B3P 74 / 0# len1# 2#.5< ns6# 7#:V ns;#<>~ ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #J c$# X%# &)# `';#v4e ptr5e#P8 R9# :# `;;# J+ -s# .)#&( & h '# t (#G( + h ,<# t -#( 0@ h 1V# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH >  h ?~# t @# ops A#(  B#0 opv C #8 opc D#@@@ Gp h H#  I#  J# E K#  L# t M# ^ P h Q# l Rk# H YO Z [del \4 ] ^p _vx U: # V# 9 W)# h X# r `# vc a;#h v b:#p0 # op $#  %#  &# o '#  (k#  )#(X &U ` ';# n (u#  )#  *#  +#  ,#(  -#0  .-#8  /?#@ X 0s#H  1#P  2#Too)Uo:;{oo);o@;o;-oe?o3 #| X $# %)# U &)# !       h 6 .8h9\s.o]/op/X/ / 2;henc3`iov5\ 6;l l l Vh99@sVoh]VdopW`W\ i99$ sioh]idopj`j\> |9 : s|oh]|dop}`}XV  :D:` soh]dXX ` D:; so] X ) l3 h dsz`bufXpPrcHz ;;  soh]dD ;;X soh]dXؔX `( ;< so~ns~~ke~opso~hdr` ~Pv  l .S <=T4\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y 7<=@s7Yns77k7Ohdr:` ?@PvC l) . =>I4\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y" 8=>s8Y~8~E8~9O~<;l =;h>`hdrAP0 I@vL~+ U~ l U.9 ?CAM4\intaEOemuW0B3P / 0# len1# 2#.5& ns6# 7#:@ ns;#<>h ns?# @#C nsD# E#H I#L nsM# N# O# NP#  #4 c$# X%# &)# `';#v4O ptr5O#P8 R9# :# `;;# 4+ -s# .)#&( & h '# t (#G( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# ] 7#  8#  9# :# X ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J# E K#  L# t M# ^ P h Q# l RU# H YO Z [del \4 ] ^Z _vx U$ # V# 9 W)# h X# r `# vc a;#h v b$#p0 # op $#  %#  &# o '#  (U#  )#(X &? ` ';# n (_#  )#  *#  +#  ,#(  -#0  .#8  /)#@ X 0s#H  1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y #ZrTT0 - tu .O#  /#  0#  1#  2#  3;# T 4#( A l B# tu CO#  D#U O' s PY# r Q# ( \L s ]Y# t ^#c8 iq s jY# r k*#@ s  ] ZR   L ' z9  {/# I |q# ` };#  O #  a #  a # X #(;I I 9 a I U  ;?CAs;Y}ns<}=}=}N=} >} A)hiB~hdrI~ N}vcT;TvU$Hvia;drckU?l?o tEOX@@tdO@q. DAEy4\intaEOemuW3P #c$#X%# &)#`';#v4 ptr5#P8NR9N#:#`;;#  /0# len1#2# !  s 0# op$#%#&#o'#(#)#(  /DAhA`E r/Eh  :hAAz r:Eh K;AD L rKE rcvK ptrKshdrMT P\bufPphZdi`QD0 Lt@ DE ptrX bufP Hsrchoff`s;EE\ rE bufÀ ) off\hdrbh )Xptrh@rc;d)Tsl .EY4\intaEOemuW0B3P /0# len1#2#.5 ns6#7#:5 ns;#<>] ns?#@#C nsD#E#HI#L nsM#N#O#NP#  #)c$#X%# &)#`';#v4D ptr5D#P8R9#:#`;;# )+ -s#.)# $  s &( & h '# t (#G( +% h ,# t -#( 0J h 15# t 2# 5 op 6#] 7# 8# 9# :#X ;#  lH > h ?]# t @# ops A#( B#0 opv C#8 opc D#@J@ Gz h H# I# J# E K# L# t M# ^ P h Q# l RJ#H YO Z [del \%4 ] ^z _vx UD# V#9 W)# h X# r `# vc a;#h v bD#p`2EF@yr2yhq?FGr?yhwGGrwyhbufw` w)X&};GI`cr}yXrcv}Pptr}sH lbuf`G;IFKryXrcvPptrsH lbuf`;FKM 7ryXrcvðPptrsH DZlbufȀ`;MPryHrcv@ptrs lbuf`oO;\^;PQryrcvptrs \buf Po=Qi&l&Loff'h`j,dc,H -`tu6DPQ/0;DE;QeV@ rEyrcvEptrEs K\bufLPoUiRlcRLksShbDpp`zRR UV;HSToprz; ;eVWp ryhrcv`ptrsXhdrp PW$X ptr XbufP! Hsrchoff `s v;$XY` rybuf! )off hdrp  )Xptr @rc;dGXXp h)"s l% : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I .? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I : ; I 4: ; I 4: ; I .? : ; ' I@B I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I   % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I; /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_mem.cstddef.htnt_mem.h  'uK0K0g0=uuK0K /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/includetnt_enc.cstdint.h &K!!;0-!;0;0,;0;0;0+vY2gYZZZ/2uguuuuYCI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_tuple.cstddef.hstdarg.hstdint.htnt_tuple.hctype.h /Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h '+uYhuuYK0ɭg$g'$vY0.uu廻K0Ku/Y0.uu廻K0%gv0.uu廭K0%gv0.uu廭K0%gv0.uu廭K .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 06= .uYhuuYK . /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_buf.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.h 1*1=Ku&gK0uv1=gugK1/Jgu<JK11󻻟KuBgg1󻻟KuHgg .uKg滻K /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_ping.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 74uu$ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_insert.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 88[uסgi$x /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_update.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.htnt_update.h 8/vuuL".g.g.u.Y.uuYuY=ug%K.3Y.#v/ㄡgi!/$ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_delete.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h <7[uסgi$ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_call.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h =9&!u˓*( /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_select.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h ?>2/4Ku׻!Yu/F4"H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h DA.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h E2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> w>AwAvwwwvwww-v-.w./w/2w2dvdewefwfiwivwww#v#$w$%w%(w(vwwwvwwwPvPQwQRwRUwUvwwwvwwwvwww v  w  w w:v:;w;<w<?w?vwwwvwwwvwwwYvYZwwwvwwwvwwwvwwwvww w RvRSwSTwTWwWvwwwvwwwvwww9v9:w:;w;>w>=v=>wwwvwwwdvdewwwBvBCwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vw    9= y .symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges$.o8 @` ` HoxxUopdnpp` xsP~@@BYY YY[[, ff#h hh hh h h hj j((j (j8`k `kxk xk0xkk 4nq%10*<9!G?@UJ`"] Z` xp   @ Y Y[fh h h  h j (j `k xk  h  @. pA Wxk fh  h hk  " '} y(% F*O; +fN z+!c ,w ,* T- -* . /* 1Q !2 2# z3i1 3@ 40V 5d 5t 8 Dj G I FK0 M A PT Qg Wjvfh pk `k  h xk (j  7Z ; G)  < EF a0P 96e <p $X| eVU )$ 9/ 8 A# /%xxk  Y # DA$   ,/ 6#7 ;9I] =ef A u K# $ D:E    * hA; ;0( %$6k ; E$La n)qxk } ?C h - 0 1B h96  97 K + F& *071 K %kT 0$e 1qu + d"  _ /C '  :9crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrytnt_mem.c_tnt_realloctnt_enc.ctnt_tuple.ctnt_tuple_validatetnt_iter.ctnt_iter_inittnt_iter_field_nexttnt_iter_field_rewindtnt_iter_list_nexttnt_iter_list_rewindtnt_iter_reply_nexttnt_iter_reply_freetnt_iter_request_nexttnt_iter_request_freetnt_iter_storage_nexttnt_iter_storage_freetnt_stream.ctnt_buf.ctnt_buf_freetnt_buf_readtnt_buf_resizetnt_buf_writetnt_buf_writevtnt_buf_write_requesttnt_buf_replytnt_buf_requesttnt_ping.ctnt_insert.ctnt_update.ctnt_update_optnt_delete.ctnt_call.ctnt_select.ctnt_reply.ctnt_reply_cbtnt_request.ctnt_request_inserttnt_request_delete_1_3tnt_request_deletetnt_request_calltnt_request_selecttnt_request_updatetnt_request_cb__FRAME_END____JCR_END__DW.ref.__gcc_personality_v0__dso_handle_DYNAMIC__TMC_END___GLOBAL_OFFSET_TABLE_tnt_pingtnt_updatetnt_request_setoriginfree@@GLIBC_2.2.5_ITM_deregisterTMCloneTabletnt_replytnt_fieldtnt_update_arith_i32tnt_deletetnt_requesttnt_request_fromtnt_tuple_set_astnt_iter_storagetnt_inserttnt_tuple_settnt_list_free_edata_finistrlen@@GLIBC_2.2.5tnt_mem_freetnt_reply_inittnt_enc_readtnt_iter_replytnt_buftnt_update_insertmemset@@GLIBC_2.2.5tnt_calltnt_reply_fromtnt_mem_alloctnt_tuple_inittnt_update_splice__gmon_start__tnt_enc_writememcpy@@GLIBC_2.14tnt_tupletnt_iter__gcc_personality_v0@@GCC_3.3.1tnt_reply_freetnt_update_deletetnt_list_init_endtnt_request_initrealloc@@GLIBC_2.2.5tnt_mem_realloc__bss_starttnt_selecttnt_tuple_addtnt_iter_requesttnt_nexttnt_stream_freetnt_update_arith_Jv_RegisterClassestnt_update_arith_i64tnt_enc_sizetnt_iter_listtnt_request_freetnt_rewind_ITM_registerTMCloneTabletnt_listtnt_stream_reqidtnt_stream_init_Unwind_Resume@@GCC_3.0tnt_mem_inittnt_tuple_free__cxa_finalize@@GLIBC_2.2.5_inittnt_mem_duptnt_iter_freetnt_list_at__ctype_b_loc@@GLIBC_2.3tnt_update_assigntarantool-1.5.1.218.g1a69fd6/connector/c/tnt/CMakeLists.txt0000664000000000000000000000461012202131537021536 0ustar rootroot#============================================================================# # build flags #============================================================================# # default flags if (${CMAKE_BUILD_TYPE} STREQUAL "None") set (tnt_cflags "-std=gnu99") else() set (tnt_cflags "-std=gnu99 -Wall -Wextra") set (tnt_cflags "${tnt_cflags} -Wno-sign-compare -Wno-strict-aliasing") endif() # Only add -Werror if it's a debug build, done by developers. if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") set (tnt_cflags "${tnt_cflags} -Werror") endif() #============================================================================# # Build tnt project #============================================================================# # # source files # set (tnt_sources tnt_mem.c tnt_enc.c tnt_tuple.c tnt_iter.c tnt_stream.c tnt_buf.c tnt_ping.c tnt_insert.c tnt_update.c tnt_delete.c tnt_call.c tnt_select.c tnt_reply.c tnt_request.c) #----------------------------------------------------------------------------# # Builds #----------------------------------------------------------------------------# # Here we manage to build static/dynamic libraries ourselves, # do not use the top level settings. string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG) set (tnt_cflags "${tnt_cflags} -static-libgcc") endif() # # Static library # project(tnt) add_library(tnt STATIC ${tnt_sources}) set_target_properties(tnt PROPERTIES COMPILE_FLAGS "${tnt_cflags}") set_target_properties(tnt PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tnt PROPERTIES OUTPUT_NAME "tarantool") # # Shared library # project(tnt_shared) add_library(tnt_shared SHARED ${tnt_sources}) set_target_properties(tnt_shared PROPERTIES OUTPUT_NAME tnt) set_target_properties(tnt_shared PROPERTIES COMPILE_FLAGS "${tnt_cflags}") set_target_properties(tnt_shared PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tnt_shared PROPERTIES OUTPUT_NAME "tarantool") #----------------------------------------------------------------------------# # Install #----------------------------------------------------------------------------# install (TARGETS tnt ARCHIVE DESTINATION lib) install (TARGETS tnt_shared LIBRARY DESTINATION lib) tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_ping.c0000664000000000000000000000413612231715276021001 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include /* * tnt_ping() * * write ping request to stream; * * s - stream pointer * * returns number of bytes written, or -1 on error. */ ssize_t tnt_ping(struct tnt_stream *s) { /* filling major header */ struct tnt_header hdr; hdr.type = TNT_OP_PING; hdr.len = 0; hdr.reqid = s->reqid; /* writing data to stream */ struct iovec v[1]; v[0].iov_base = (void*)&hdr; v[0].iov_len = sizeof(struct tnt_header); return s->writev(s, v, 1); } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/libtarantool.a0000664000000000000000000051354012213333044021640 0ustar rootroot! / 1378727460 0 0 0 964 ` 51p1p1p1p1p1p1p1p1p1prrrrrrrrrňňň$Gj8j8j8j8j8j8j8j84HxxxxCCCCCtnt_mem_inittnt_mem_alloctnt_mem_realloctnt_mem_duptnt_mem_freetnt_enc_readtnt_enc_writetnt_enc_sizetnt_tuple_inittnt_tuple_freetnt_tuple_addtnt_tupletnt_tuple_settnt_tuple_set_astnt_list_inittnt_list_freetnt_listtnt_list_attnt_itertnt_iter_listtnt_iter_replytnt_iter_requesttnt_iter_storagetnt_iter_freetnt_nexttnt_rewindtnt_fieldtnt_stream_reqidtnt_stream_inittnt_stream_freetnt_buftnt_pingtnt_inserttnt_update_arithtnt_update_arith_i32tnt_update_arith_i64tnt_update_assigntnt_update_splicetnt_update_deletetnt_update_inserttnt_updatetnt_deletetnt_calltnt_selecttnt_reply_inittnt_reply_freetnt_reply_fromtnt_replytnt_request_inittnt_request_freetnt_request_setorigintnt_request_fromtnt_requesttnt_mem.c.o/ 1378727458 1000 1000 100664 6336 ` ELF> @@UHH}HHEH}t HEHHE]UHHH}HHUHֿUHHH}HuHHMHUHHUHH H}HEHHEHEHHHEH}uHEHPHMHEHHHEUHHH}HHUH8int!ww- (w (X ptr)wh /w2 /-h 3wu ptr3wh 3-` 7y sz7yX len8-h szp9y`@ ptr@wh%  % : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I ww*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvw,; /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_mem.cstddef.htnt_mem.h 'uK0K0g0=uuK0Klong long intshort unsigned intsize_ttnt_mem_initGNU C 4.7.3tnt_allocator_tlong unsigned inttnt_mem_freelong long unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsizetnt_mem_reallocunsigned charcharlong int_tnt_reallocsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_mem.ctnt_mem_dupshort intunsigned intallocsizetypetnt_mem_allocGCC: (Debian 4.7.3-4) 4.7.3zRx +AC f <#AC ^ \)AC d |_AC Z #AC ^ .symtab.strtab.shstrtab.rela.text.rela.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @+@&1H;H68GZUAe!0`0 yQ?t0 00A ^ ` Hx P( xr     +-+#;N)Kw_W^e#tnt_mem.c_tnt_reallocrealloctnt_mem_inittnt_mem_alloctnt_mem_realloctnt_mem_dupstrlenmemcpytnt_mem_free !:a  5  !) . !; QI P W ^ e }l s  p A (+    +N `$ 4 ?NGwO g w qw   c    @+`Nwtnt_enc.c.o/ 1378727458 1000 1000 100664 5168 ` ELF> @@UHH}HuHEHExHEƒHEHEHx7HEHEH ЉHEUHEHxMHEHEH HEH ЉHEHEHxcHEHEH HEH HEH ЉHEHEHxsHEHEH HEH HEH HEH ЉHE]UHH}u}vs}?vT}v5}vEȀHEHEEȀHEHEEȀHEHEEȀHEHEEƒHEHE]UH}}w5}?w%}w}w]Ointnn3E&0buf&|h &` K!bufKhh Kd \0 \l% $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B wwvwwwuvuvwvwwwzwzvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/includetnt_enc.cstdint.h &K!!;0-!;0;0,;0;0;0+vY2gYZZZ/2uguuuuYlong long inttnt_enc_writeunsigned inttnt_enc_sizeGNU C 4.7.3long unsigned intlong long unsigned intunsigned charcharuint32_tlong inttnt_enc_readshort unsigned intsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_enc.cvalueshort intsizetypeGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <AC  \KAC F .symtab.strtab.shstrtab.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame@!'1S,=WK  [*0V0oZj {0I*0sxH  P3   &vKtnt_enc.ctnt_enc_readtnt_enc_writetnt_enc_size  6 % , B: kA H O V ] d !q yx T ~    v ` # ).v6> D   @`vtnt_tuple.c.o/ 1378727458 1000 1000 100664 16696 ` ELF>0$@@UHHH}HE HUHHH}HEH@HtHEH@HHEH@HEHEH@HE@t HEHUHH@H}HuЉUH}EH}uO HEH}u =HEغ HHE@}u HE HEH@Hu HEH@ẺEHEHPEHH‹EHHEHEH@HUHHHEH}u}t HEHHE؋PHE؉HMHEHHHEHPHEH‹ẺHH}t)UHEHHEHHHEHHEHHHEHUHPHEHUHPHEUHH HH`HhLpLxt )E)M)U)])e)m)u)}HHuEHHu Hu HDžDž0HEH HPH(HHHHHHHHH% t HHjHH<%t kHHHHl/l*t%dsuHHHHEHUHHEHHE@HHHEHHE@PHEPHE)r       F h8int( p  T# T# w# w#f3T 0x  # $# %y# &-# '?# 4ptr5#x 8 9# :# ;?# 0Jt0h;yt;hYtYHY@Y[?lg?hh-`jyXet}fmt}~p~len?~sy~sy~i?~ull}!ul8}Elldž}li}?bufH-@-hd\?`ctXbufP-H?l't'Xbuf'P'-Hnum'D)?l7DlDhOYlOX iRlclc~k~! ptrn~"lXtP?ly`% : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B ww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  w,    CI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_tuple.cstddef.hstdarg.hstdint.htnt_tuple.hctype.h /Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvKcount_ISgraphtnt_tuple_validatesize_tgp_offset_ISspaceva_list_ISlowerlong long unsigned int_ISalpha_ISdigittnt_tuple_setlong long intsigned chartnt_listlong intnsize_ISalnumtnt_tuple_add/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnttnt_list_ptrtnt_list_init_ISblank_ISpuncttnt_tuple_set_asunsigned intoverflow_arg_arealong unsigned intdatasizeshort unsigned intfld_esizefld_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_tuple.cndatasizetypeallocatedfld_off__gnuc_va_listesizetnt_list_atGNU C 4.7.3cardinalityerrortnt_list_freeunsigned charshort intreg_save_areauint32_tchar_IScntrl_ISxdigitalloctnt_tuple_inittnt_tupletnt_tuple_free_ISupperfp_offsetlistargs_ISprint__va_list_tagGCC: (Debian 4.7.3-4) 4.7.3zRx $AC _ <dAC _ \AC  zPLRx  $AC   HAC  AC  AC  $$AC _ DxAC s  kAC f  AC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @ . &\ ,\ 1\ JH C3x Tb r0m?0 0&G? 0m%0!!!?hX#) -=      $/6$dER`n{aI + $O x# k,2 8tnt_tuple.ctnt_tuple_validatetnt_tuple_initmemsettnt_tuple_freetnt_mem_freetnt_tuple_addtnt_mem_alloctnt_enc_sizereallocmemcpytnt_enc_writetnt_tuple__gcc_personality_v0__ctype_b_locstrlen_Unwind_Resumetnt_enc_readtnt_tuple_settnt_tuple_set_astnt_list_inittnt_list_freetnt_listtnt_list_atfreeIRo\`x  [% >     I    0 d  &, g   '   P  ! ) . "; uI |P W V^ e l s   M /  )  c  < % , D3 d: mA H 3P X ` 3f l <r y  \         $,$4 L S$[c `{      >    E aihwq "*FNf qya   ' \A   vaI  5 D S hZ0 e EqI y+  @   h  %+ O   n%O - 5 [ g o2 w `   D2      V @$`   -aI (+ HO h q ;2 tnt_iter.c.o/ 1378727459 1000 1000 100664 21096 ` ELF>(.@@UHHH}H}tHEHHELHEH}u0HEHHE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HHHEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHHEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@HEH@HEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@HEH@HEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEH'HEH}uYHEHEH@HEH@HEH@ HEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHHEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@HEH@HEH@ HEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHHEHHHEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@HEH@HEH@ HEH(HEHEHUHHEHHHEUHHH}HEH@ HtHEH@ HUHHE@t HEHUHHH}HEH@HUHUHHH}HE@HEH@HtHEH@HUHUHH0H}HuUH}EH}u%HUHEHHHEH}u'HHEHHE@@;EuHE(HEHu݃}t HEH4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y #Z0 - tu .O# /# 0# 1# 2# 3;# 4#( A l B# tu CO# D#U O' s PY# r Q#( \L s ]Y# t ^#8 iq s jY# r k*# s  Z   L ' z9 {/# |q# };# O # a # a # #(;I I 9 a I U ,I  i,I h:; i:I Xip; hZb ibI Xipc hyI e iyI XtyOPip h; iI Xil h iI Xil hI 1 iI XlPil h;} iI Xir} hrc;dL iI Xir} hI  iI XsYPir} h;V iI XirV hrc;d iI XirV hI  iI XsYPirV h ;4 i I Xis 4 hrc;d'x iI Xis4 h +I  i+I Xs+YPis34 h!A iAI h U;.iUI h!d_idI h"vI ivI XtvOP#vL$x;l% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I ww|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h +uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gYcountsize_tnexttnt_header_updatetnt_iter_storagessize_ttypetnt_headertnt_iter_list_nextlong long unsigned inttnt_header_deletelimittnt_iter_fieldfreelong long intsigned charfieldtnt_iter_replyTNT_ITER_LISTsize_enctnt_streamtnt_listproc_enc_lenlong intproc_encfld_ptr__ssize_ttnt_iter_reply_freetnt_iter_listtnt_header_selectTNT_ITER_REQUESTdel_1_3tnt_list_ptrTNT_ITER_OKTNT_ITER_STORAGEtnt_request_insertorigin_sizeinsertunsigned intproctnt_fieldlong unsigned intTNT_ITER_REPLYtnt_iter_request_freetnt_iter_reply_nextsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetuplestnt_request_deletestatustnt_iter_typefld_sizeread_requestwritevtnt_nexttnt_request_callcalliov_baseiov_lenwritereplycardinalitysizetypeallocatedtnt_request_updatetnt_iter_request_nexttnt_request_delete_1_3tnt_request_selecttnt_iter_field_nextGNU C 4.7.3tnt_header_callselecterrortnt_header_delete_1_3fld_ptr_prevunsigned charTNT_ITER_FAILfld_indextnt_iterTNT_ITER_FIELDshort inttnt_iter_field_rewindorigin/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_iter.cfld_datatnt_iter_inituint32_ttnt_rewindchartnt_requestproc_lentnt_iter_freeindextnt_iter_storage_freeallocwrcnttnt_iter_storage_nextoffsettnt_tuplerequestupdatecodewrite_requestreqidtnt_iter_requeststoragefld_esizeuint8_tflagsreadtu_indexread_replytnt_iter_list_rewindrewindtnt_request_update_oplisttnt_header_inserttnt_iter_statusGCC: (Debian 4.7.3-4) 4.7.3zRx }AC x <AC  \OAC J |yAC t fAC a !AC \ yAC t AC | *AC e <AC  \AC | |*AC e AC  AC | *AC e AC  CAC ~ <AC Z \7AC r |AC  .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @x9& , 6 1x<BAP`!0[@P0 t!opP 0$0***Pp-h3  7 }}.JODfWx!l*F*z*   yy%4CRct%C7Gtnt_iter.ctnt_iter_inittnt_iter_field_nexttnt_iter_field_rewindtnt_iter_list_nexttnt_iter_list_rewindtnt_iter_reply_nexttnt_iter_reply_freetnt_iter_request_nexttnt_iter_request_freetnt_iter_storage_nexttnt_iter_storage_freememsettnt_mem_alloctnt_enc_readtnt_itertnt_iter_listtnt_reply_freetnt_reply_inittnt_iter_replytnt_request_freetnt_request_inittnt_iter_requesttnt_tuple_freetnt_tuple_inittnt_iter_storagetnt_iter_freetnt_mem_freetnt_nexttnt_rewindtnt_field%5]8 } J  x6F  <j!z"!1 FI p"$%$e z} %(~*)'   ?% * 7 E L YS Z a h  o v $   5 `   B = Y  ' A wZ i     P  &  -   O T& 5 {V b p ~  ?    P + D R ` 2n T| O ' w  $ 2 @ [ g  s   ?  8 + ED YR F` n |      K    l  O#  1 Y0 <  B H bN T [ t     x  B  _( $M r ~     7  p  =      + Oh s { }  z } J ` " J   & . 6  f Mq y x   x   B   @2 = E M  .      F ` : F & ] d l t   _  z   z  ; C K %S @z $ %        `0 8@GH a mGu}      @}`Jx @`Fz% @`Gtnt_stream.c.o/ 1378727459 1000 1000 100664 9552 ` ELF>@@UHH}uHE@TEHEUPTE]UHHH}H}tHEXHHE@XHEH}u$HEXHHEHEUHHH}HEH@@HtHEH@@HUHHEt HEH4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y6~s6YX6Told8lFYsFYh\s\Yh% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B ww#v#$w$%w%(w(vwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 6= .uYhuuYK .countsize_ttnt_header_updatetnt_stream_initssize_ttypetnt_headerlong long unsigned inttnt_header_deletelimitfreelong long intsigned charfieldsize_enctnt_streamtnt_listproc_enc_lenlong intproc_enc__ssize_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_stream.ctnt_stream_reqidtnt_header_selectdel_1_3tnt_list_ptrtnt_request_insertorigin_sizeinsertunsigned intproclong unsigned intsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetuplestnt_request_deleteread_requestwritevtnt_request_callcalliov_baseiov_lenwritecardinalitysizetypetnt_request_updatetnt_request_delete_1_3tnt_request_selectGNU C 4.7.3tnt_header_callselecterrortnt_header_delete_1_3unsigned charshort intoriginuint32_tchartnt_requestproc_lenindextnt_stream_freeallocwrcntoffsettnt_tupleupdatecodewrite_requestreqiduint8_tflagsreadread_replytnt_request_update_oplisttnt_header_insertGCC: (Debian 4.7.3-4) 4.7.3zRx $AC _ <qAC l \BAC } .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @@`&,61 BJP? `_ 0[$0 t o$ 0 0ex%H a   $$q/6DBTtnt_stream.ctnt_stream_reqidtnt_stream_initmemsettnt_mem_alloctnt_stream_freetnt_mem_freeIY   % * 7 E L S Z a h o pv  { / G   < 7   ' A ^Z i     J 7 Y p ` d   & M5 dV b p ~ M  M V q  + D R ` n |  y  7 $ 2 @ .[   \ H  j "  + D R q` n |   M ^ 0 v   #  v # S1 1 9<D$L b  $ ` =   @$`tnt_buf.c.o/ 1378727459 1000 1000 100664 14744 ` ELF>@@UHH H}HEH@HHEHEHHtHEHHHEH@HHHEH@HUHH0H}HuHUHEH@HHEHEHHu HEHPHEH@H9upHEHPHEH@HH)HHEHEH;EvHEHEHEHHEH@H HUHEHHHEHPHEHHEHPHEUHH0H}HuHEH@HHEHEH@HEHEHUHHEHEHHUHHHEH}uHEHH%HEHUHHEHUHPHEHHEHUHH0H}HuHUHUHEHHDHEH}u H,HUHMHEHHHE@PPHEPPHEUHH@H}HuЉUHEEEHHHHEHH@HEEE;E|HUHEHHHEH}u HE[EHHHHEHHPEHHHHEHHHEHHEHHHHEHH@HEEE;E|HE؋@PPHE؉PPHEUHHH}HuHEPhHEHHpHEHHUHH0H}HuHEH@HHEHEHHu HEHPHEH@H9ujHEHEHPHEH@HH)HEHHEH@H4HUHEHHHE}uHEHPHEHHEHPEHUHH0H}HuHEH@HHEHEHHu HEHPHEH@H9upHEHEHPHEH@HH)HEHHEH@H4HUHEAHHHE}uHEHPHEHHEHPEHUHH H}H}EHEHHEH}u HHEHPHHEH@HHu}t HEHHEH@ HEH@(HEH@0HEH@8HEH@HEH@HEH@HEH@@HEH@HHEHEH@HEH@HEHHE   4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y #f $# %)# &)#+s+YXsb,h/4s4YXbuf4P4)Hsb5h:)`BsBYHB)@sbChoffD)`E)XndFPQsQYXbufQPQ)HpRh[U s[YHiov[$@[;\)hi];dp`Xl slYhrl`q; sqYHrq@sbrhoffw)Xrcx;d;_ sYHr@sbhoff)Xrc;dYsYX;lsb`% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I .? : ; ' I@B wwPvPQwQRwRUwUvwwwvwwwvwww v  w  w w:v:;w;<w<?w?vwwwvwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_buf.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.h *1=Ku&gK0uv1=gugK1/Jgu<JK11󻻟KuBgg1󻻟KuHgg .uKgKcountsize_ttnt_header_updatessize_ttypetnt_headerlong long unsigned inttnt_header_deletelimitfreetnt_buf_requesttnt_buf_writevlong long intsigned charfieldsize_enctnt_streamtnt_listproc_enc_lenlong intproc_encnsize__ssize_ttnt_header_selectdel_1_3tnt_list_ptrtnt_request_inserttnt_stream_buforigin_sizeinsertunsigned intproclong unsigned intsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetnt_buf_write_requesttuplestnt_request_deleteread_requestwritevtnt_request_calltnt_buf_freecalliov_baseiov_lenwritetnt_buf_writecardinalitytnt_buf_replysizetypeallocatedtnt_request_updatetnt_request_delete_1_3tnt_request_selectGNU C 4.7.3tnt_header_callselecterrortnt_header_delete_1_3unsigned charshort inttnt_buf_resizerdofforiginuint32_tchartnt_requestproc_len/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_buf.cindexallocwrcntoffsettnt_buf_readtnt_tupleupdatecodewrite_requestreqiduint8_tflagsavailreadread_replytnt_request_update_optnt_buflisttnt_header_insertGCC: (Debian 4.7.3-4) 4.7.3zRx QAC L <AC  \AC  |iAC d AC  0AC k zPLRx  $AC   HAC  DAC   .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @(&,1H6 C*h TUb5`r0m080 `8 0]N0`x8 (p$H ' QQ%4iBQ 0g;u   tnt_buf.ctnt_buf_freetnt_buf_readtnt_buf_resizetnt_buf_writetnt_buf_writevtnt_buf_write_requesttnt_buf_replytnt_buf_requesttnt_mem_freememcpyreallocfree__gcc_personality_v0tnt_reply_Unwind_Resumetnt_requesttnt_buftnt_stream_inittnt_mem_alloctnt_stream_free/?^x !4"J QV ;b z        P% * 7 dE L S RZ a h o jv  6   7  - , '  < ' A NZ i         `  P   & 5 V b 7p ~   + 4   + D R ` vn |  }   $ 2 _@ G[  K  &   ; & ?+ D R ` n |    <        f # 1 0 0< J X  g nvQ~  Q `   $, B k  B    {   / V a  i ;q  \ ;  @ k   a /l t |  s  @Q`  ;  $- Htnt_ping.c.o/ 1378727459 1000 1000 100664 8696 ` ELF>@@UHH0H}EEHE؋@TEHEHEHE HEH@HuHMغHHLPS4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y4|s4YHhdr7`v<|P l% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I 4: ; I IwwYvYZw,Z /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_ping.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 4uu$countsize_ttnt_header_updatetnt_pingssize_ttypetnt_headerlong long unsigned inttnt_header_delete/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_ping.cfreelong long intsigned charfieldsize_enctnt_streamtnt_listproc_enc_lenlong intproc_enc__ssize_ttnt_header_selectdel_1_3tnt_list_ptrtnt_request_insertorigin_sizeinsertunsigned intproclong unsigned intsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetupleslimittnt_request_deleteread_requestwritevtnt_request_callcalliov_baseiov_lenwritecardinalitysizetypetnt_request_updatetnt_request_delete_1_3tnt_request_selectGNU C 4.7.3tnt_header_callselecterrortnt_header_delete_1_3unsigned charshort intoriginuint32_tchartnt_requestproc_lenindexallocwrcntoffsettnt_tupleupdatecodewrite_requestreqiduint8_tflagsreadread_replytnt_request_update_oplisttnt_header_insertGCC: (Debian 4.7.3-4) 4.7.3zPLRx $$ZAC U .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @Z&,1 HC H T1b? `r 0mh!0  ! 0 0fH!H 9    Z*tnt_ping.ctnt_ping__gcc_personality_v0_Unwind_ResumeT   iZ% * 7 E L S wZ a h o Vv   ( @ `  5 0 Z  h' A WZ hi  h  h *  /  6 J   & #5 DV b p ~ #  3 < Q r + ~D R ` n |  _   $ 2 @ [  p < .  @   d+ D ZR G` n |   # D  L n s    # )1 Z1 <DZL   (1 tnt_insert.c.o/ 1378727460 1000 1000 100664 8928 ` ELF>P@@UHHpH}uUHME HEH@EHE@TEEEEEHEHEHE HEHEHEHEH@HEHEH@HEHEH@HuHMHH 4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y7s7Yns77kv8Ohdr;`@PvD l% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I Iwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_insert.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 8[uסgi$countsize_ttnt_header_updatessize_ttypetnt_headerlong long unsigned inttnt_header_deletelimitfreelong long intsigned charfieldsize_enctnt_streamtnt_listproc_enc_lenlong intproc_enc__ssize_ttnt_header_selectdel_1_3tnt_list_ptrtnt_request_insertorigin_sizeinsertunsigned intproclong unsigned intsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetnt_inserttuplestnt_request_deleteread_requestwritevtnt_request_callcalliov_baseiov_lenwritecardinalitysizetypetnt_request_update/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_insert.ctnt_request_selectGNU C 4.7.3tnt_header_callselecterrortnt_header_delete_1_3unsigned chartnt_request_delete_1_3short intoriginuint32_tchartnt_requestproc_lenhdr_insertindexallocwrcntoffsettnt_tupleupdatecodewrite_requestreqiduint8_tflagsreadread_replytnt_request_update_oplisttnt_header_insertGCC: (Debian 4.7.3-4) 4.7.3zPLRx $$AC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @&,1HCx T,b `r? 0mP"0 o " 0d 0;@H"H =   .tnt_insert.ctnt_insert__gcc_personality_v0_Unwind_Resume   % * 7 0E L iS Z ya h o v  k  7 o  , ' i  w' A NZ wi  w  w  , > ` E   _ d& 25 V b p ~ 2 O     + D R ` Bn d| _    $ 2 +@ [ v     O   + UD iR V` n |   2   [ }   | f _# 81 i1 <DL q w !  (1 tnt_update.c.o/ 1378727460 1000 1000 100664 15296 ` ELF>p@@UHHpH}uHMDEEEEUHEHEHEHEHEHEHEHEHEHEЋEHHEH}tHEHEEHEEHEH@UHuHMHHUHH H}uЉMEUHMuHEAHUHH H}uЉMEUHMuHEAHUHH H}uHMEUHMuHEAHUHH H}uHUMMHUuHEAHѺHvUHH`H}ȉuĉUMLELMEEHEEEU‹EHEЃEEHHEH}u HHEHEHEHEHEUHEHEHEHEHEUHEHEHEHEHEHEHUHMHEHHHEHEMHUuHEAHѺHEHEHEHHEUHHH}uuHEAHUHH H}uHUMMHUuHEAHѺHUHHH}uUHxLpEHxH@HpH@HH@Ѓ EHE@TEEEEEHEHEHE HEHEHEHxH@HEHxH@HEHpHPHEHEHpH@HHHEHpH@HH@HEHEH@HuHMHH !  4intemu;0B3P74 / 0# len1# 2#5< ns6# 7#:V ns;#>~ ns?# @#C nsD# E#H I#L nsM# N# O# P#  #J $# %# &)# ';#4e ptr5e#8 9# :# ;;# J+ -s# .)#( & h '# t (#( + h ,<# t -#( 0@ h 1V# t 2# 5 op 6# 7# 8# 9# :# ;#  lH >  h ?~# t @# ops A#( B#0 opv C #8 opc D#@@@ Gp h H# I# J# K# L# t M#  P h Q# l Rk# H Y Z [del \ ] ^p _x U: V# W)# h X# r `# vc a;#h v b:#p0 # op $# %# &# '# (k# )#(X &U ';# (u# )# *# +# ,#( -#0 .-#8 /?#@ 0s#H 1#P 2#Too)Uo:;{oo);o@;o;-oe?o3 #| $# %)# &)# !.\s.o/op///2;henc3`iov5\6;l l lVsVohVdopW`W\i$ siohidopj`j\| s|oh|dop}`}X sohdX` so)lhdsz`bufXpPrcH sohdX sohdؔX` so~ns~~ke~opso~hdr`~Pv  l% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I : ; I 4: ; I 4: ; I .? : ; ' I@B Iwwvwwwvwwwvww w RvRSwSTwTWwWvwwwvwwwvwww9v9:w:;w;>w>=v=>w,>x /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_update.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.htnt_update.h /vuuL".g.g.u.Y.uuYuY=ug%K.3Y.#v/ㄡgi!/$counttnt_update_arithsize_ttnt_header_updateuint64_tssize_ttypetnt_headerlong long unsigned inttnt_header_deleteTNT_UPDATE_ANDTNT_UPDATE_XORTNT_UPDATE_ORlimitfreelong long intsigned charfieldsize_enctnt_streamtnt_list/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_update.cproc_enc_lenlong intproc_enc__ssize_ttnt_header_selecttnt_update_opdel_1_3tnt_list_ptrtnt_request_inserttnt_stream_bufvaluetnt_update_insertorigin_sizeinsertunsigned intproclong unsigned intsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupletnt_update_assignTNT_UPDATE_INSERTops_sizetuplestnt_request_deleteread_requestwritevtnt_request_calltnt_update_deletecalliov_baseiov_lenwritecardinalitysizetypetnt_request_updatetnt_request_delete_1_3tnt_request_selectGNU C 4.7.3tnt_header_callselecterrortnt_header_delete_1_3iovcint32_tunsigned charshort intrdofftnt_update_arith_i32originencsuint32_ttnt_update_splicelengthchartnt_requestproc_lenTNT_UPDATE_ASSIGNindexTNT_UPDATE_ADDallocwrcnthdr_updatedata_lenoffsetTNT_UPDATE_SPLICETNT_UPDATE_DELETEtnt_tupleupdatecodewrite_requestreqiduint8_tflagsoffset_lenreadread_replytnt_updatetnt_request_update_oplength_lenlisttnt_header_inserttnt_update_arith_i64GCC: (Debian 4.7.3-4) 4.7.3zPLRx  $AC  zRx 6AC q <6AC q \7AC r |9AC t EAC @ 0AC k 9AC t  @AC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @>(8&,1H C *8T\b`rU0mX:0 |: 0*0+HH`: $ '    1>L[6l67S9E09:tnt_update.ctnt_update_op__gcc_personality_v0tnt_enc_sizetnt_enc_write_Unwind_Resumetnt_update_arithtnt_update_arith_i32tnt_update_arith_i64tnt_update_assigntnt_update_splicetnt_mem_allocmemcpytnt_mem_freetnt_update_deletetnt_update_inserttnt_update"6!Gp8  F >% * 7 E L <S Z a h So v e  9  Q   0 F A  . = oW hp    R  o  T     2. 7< 4K l x   4 "     A Z h v  7 2  ~ , \: FH V q 3    b    A (Z h v i    4       O + 29 :G F R 2` 7n   % z   [ m l    2 7# N n y `      & 1 9 SA W r  Z S   2 7     T/ > 2M 7\ j x K    @   : . < 2J 7Z e :m >u   @  (1 dS$D:M tnt_delete.c.o/ 1378727460 1000 1000 100664 8920 ` ELF>H@@UHHpH}uUHMEHEH@EHE@TEEEEEHEHEHE HEHEHEHEH@HEHEH@HEHEH@HuHMHH 4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y7s7Yns77k7Ohdr:`?@PvC l% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I Iwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_delete.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 7[uסgi$countsize_ttnt_header_updatessize_ttypetnt_headerlong long unsigned inttnt_header_deletelimitfree/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_delete.csigned charfieldsize_enctnt_streamtnt_listproc_enc_lenlong intproc_enc__ssize_tlong long inttnt_header_selectdel_1_3tnt_list_ptrtnt_request_insertorigin_sizeinsertunsigned intproclong unsigned intsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetuplestnt_request_deleteread_requestwritevtnt_request_callcalliov_baseiov_lenwritecardinalitysizetypetnt_request_updatetnt_request_delete_1_3tnt_deletetnt_request_selectGNU C 4.7.3tnt_header_callselecterrortnt_header_delete_1_3hdr_delunsigned charshort intoriginuint32_tchartnt_requestproc_lenindexallocwrcntoffsettnt_tupleupdatecodewrite_requestreqiduint8_tflagsreadread_replytnt_request_update_oplisttnt_header_insertGCC: (Debian 4.7.3-4) 4.7.3zPLRx $$AC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @&,1HCx T,b `r> 0mH"0 n x" 0c 078H"H x=   .tnt_delete.ctnt_delete__gcc_personality_v0_Unwind_Resume   k% * 7 E L S vZ a h o Ov     7 l  , ' f  t' A NZ ti  t  t ) ) ; ` B C   & /5 CV b p ~ /  , 5 P k + D R ` n |  X   $ 2 @ [  o ; '  L   c+ D fR S` n |   / =  X z    f # 51 f1 <DL q t   (1 tnt_call.c.o/ 1378727460 1000 1000 100664 9536 ` ELF>p@@UHHHhdHXHPHXHEEEUHEHEUEHPH@ЃEHPH@Hu EEHh@TE苅dEHEHEHE HEHEHEHEHEEHHEHXHEEHHEDž|HPH@HuH|HEHEHPH@HEHPH@HEHhH@HuHhHH =4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y8s8Y~8~8~9O~<;l=;h>`hdrAPI@vL~U~ l% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I Iwwdvdew,e /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_call.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h 9&!u˓*countsize_ttnt_header_updatessize_ttypetnt_headerlong long unsigned inttnt_header_deletelimitfreelong long intsigned charfieldsize_enctnt_streamtnt_listproc_enc_lenlong intproc_enc__ssize_ttnt_header_selectdel_1_3tnt_list_ptrtnt_request_insertorigin_sizeinsertunsigned intproclong unsigned intsize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetuplestnt_request_deleteproc_enc_sizeread_requestwritevtnt_request_callcalliov_baseiov_lenwritecardinalitysizetypetnt_request_updatetnt_request_delete_1_3tnt_request_selectGNU C 4.7.3tnt_header_callselecterror/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_call.ctnt_header_delete_1_3unsigned chartnt_callshort intoriginuint32_tchartnt_requestproc_lenindexargcallocwrcntoffsettnt_tupleupdatecodewrite_requestreqiduint8_tflagsreadread_replytnt_request_update_oplistargstnt_header_inserthdr_callGCC: (Debian 4.7.3-4) 4.7.3zPLRx $$eAC ` .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @eH`&,1HC T ,b `rB 0m$0 r $ 0v 0B_`H$H [    e*1>Ltnt_call.ctnt_call__gcc_personality_v0strlentnt_enc_sizetnt_enc_write_Unwind_Resume1>R_  K te% * 7 0E L iS Z ya h o v  k  7 s  , ' m  {' A NZ {i  { W {  + B ` I   _ d& 65 V b p ~ 6 O    ! + D R ` Bn d| _    $ 2 +@ "[ 8    g S   + UD mR Z` nn |   6   _    | f _# <1 m1 <DeL c {r +  "    1  (1 tnt_select.c.o/ 1378727460 1000 1000 100664 11896 ` ELF>`@@UHH HDLHEHH HHHPHEHEH@HEH HuDžHEH@T H@EEHHHHEH}uH HHHEHHHEH@ HEHPHHHEHH@HEH HHHHEH H@EH HLHPHEЋEHHHHEHHEH@HEHHHHEHHEH@HBEH HuH HHH@UHuHHHEHEHHEH N 4intemu0B3P / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @#C nsD# E#H I#L nsM# N# O# P#  #4 $# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*@ GZ h H# I# J# K# L# t M#  P h Q# l RU# H Y Z [del \ ] ^Z _x U$ V# W)# h X# r `# vc a;#h v b$#p0 # op $# %# &# '# (U# )#(X &? ';# (_# )# *# +# ,#( -#0 .#8 /)#@ 0s#H 1#P 2#TYY)?Y$;eYY);Y*;Y;YO)Y #Z0 - tu .O# /# 0# 1# 2# 3;# 4#( A l B# tu CO# D#U O' s PY# r Q#( \L s ]Y# t ^#8 iq s jY# r k*# s  Z   L ' z9 {/# |q# };# O # a # a # #(;I I 9 a I U ;s;Y}ns<}=}=}=}>}A)hiB~hdrI~N}vcT;TvU$Hvia;drcko tEOXtdO@% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I   wwBvBCw,C( /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_select.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h >2/4Ku׻!Yu/F4"countsize_tnexttnt_header_updatetnt_iter_storagessize_ttypetnt_headerlong long unsigned inttnt_header_deletelimittnt_iter_fieldfreelong long intsigned charfieldtnt_iter_replyTNT_ITER_LISTsize_enctnt_streamtnt_listproc_enc_lenlong intproc_encfld_ptr__ssize_ttnt_iter_listtnt_header_selectTNT_ITER_REQUESTdel_1_3tnt_list_ptrTNT_ITER_OKTNT_ITER_STORAGEtnt_request_insertorigin_sizeinsertunsigned intproclong unsigned intTNT_ITER_REPLY/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_select.csize_enc_leniovectnt_replydatasizeshort unsigned intread_tupleops_sizetuplestnt_request_deletestatustnt_iter_typefld_sizeread_requestwritevtnt_request_callcalliov_baseiov_lenwritereplycardinalitysizetypetnt_request_updatetnt_request_delete_1_3tnt_request_selectGNU C 4.7.3tnt_header_callselectkeyserrortnt_header_delete_1_3fld_ptr_prevhdr_selunsigned charTNT_ITER_FAILfld_indextnt_iterTNT_ITER_FIELDshort inttnt_selectoriginfld_datauint32_tchartnt_requestproc_lenindexallocwrcntoffsettnt_tuplerequestupdatecodewrite_requestreqidtnt_iter_requeststoragefld_esizeuint8_tflagsreadtu_indexread_replyrewindtnt_request_update_oplisttnt_header_inserttnt_iter_statusGCC: (Debian 4.7.3-4) 4.7.3zPLRx $$CAC > .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @C&,1H C h T" Obq`r0m-0 ,. 0-03PPH0.H@     C.<ESalytnt_select.ctnt_select__gcc_personality_v0tnt_iter_listtnt_nexttnt_mem_alloctnt_iter_freetnt_rewindtnt_mem_free_Unwind_ResumeOw /=  N C% * 7 E L VS Z a h o v   5 M   B = r  ' |A dZ i   Z  ) - ? v F   L Q& 35 TV b p ~ 3 <   ~ $ + D R ` /n Q| L  t  $ 2 @ $[ ;  L  j X   + BD rR _` vn }|   3   d    i  L# 91 r0 < B H ;N T m[ |t         x( $M r ~ a    P    =  3   + Li t | C  - ? v q Q N UV lp x   (1 tnt_reply.c.o/ 1378727460 1000 1000 100664 9680 ` ELF>@@UHHH}HE0HUHHH}HEH@HtHEH@HHEHHUHH`H}HuHUHuHMHE HHu EĉEHEHHHE@(HEH@UHEPHE@UHEHE=u cHEHpHMHEHHu 9mHE@toEHHHEHPHEH@Hu UHEHpHMHEHHuHEH@HHE t6HEt+HEt HEtHEt z}u jHEHp(HMHEHHu @m}u ,EHHEH}u UHuHMHEHHuHEHHEHEEE|HEE܋EU);EHEE܃HEHƿHEH}t[HEHPHEHHE܃HEEUЃEEHE@(;EtHEH%HEHHHEHHUHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHHEHHEHHEHHEUHHPH}HuHUHMH} w$H}t HH+UHEHHEHEHE@H H;Ev&H}tHE@H+EHP HEHEHEHEHEHEHEHUHEȾHEH}t HUHEHEH ( q4intemu3P #$#%#&)#';#4 ptr5#8N9N#:#;;#  /0# len1#2#!  s 0# op$#%#&#'#(#)#( /E r/Eh :z r:EhK;L rKE rcvK ptrKshdrMTP\bufPphdi`Lt@ ptrX bufPHsrchoff`s;\ rE bufÀ) off\hdrbh)Xptrh@rc;d)Tsl% : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ ww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvw,9=H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h .Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuutnt_reply_cblistreqidcountoffvtnt_reply_freeshort unsigned intssize_tallocdatasizetnt_headerlong unsigned intsize_ttnt_reply_tuint32_tunsigned chartnt_reply_fromcodeunsigned inttsizelong long unsigned inttnt_reply_init__ssize_ttnt_replysizetype/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_reply.cerrorlong long inttnt_list_ptrrollbackcharcardinalityGNU C 4.7.3tuplestypeshort inttnt_tupletotallong intsigned chartnt_listGCC: (Debian 4.7.3-4) 4.7.3zRx $AC _ <;AC v zPLRx  $ AC  jAC e  hAC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @&,1H uC8T 4b r 0m$0  0 L$ 0?0/LP%0  jj    $)0$;?LZ_ i~tnt_reply.ctnt_reply_cbtnt_reply_initmemsettnt_reply_freetnt_mem_freetnt_list_freetnt_reply_from__gcc_personality_v0tnt_list_inittnt_mem_alloctnt_tuple_settnt_list_at_Unwind_Resumememcpytnt_replyIY;9t.IUdy j   % * z7 hE L 2S Z a h o v  k E   S X M y $ 2 @ MU ]a }      e   '$/ M #T$\_d `| _j  X  #=, 1 M Xj`h  X   X3   @$k _ j tnt_request.c.o/1378727460 1000 1000 100664 21408 ` ELF>h0@@UHHH}HExHUHHH}HE@tJw ttNr4=HEH(HHEH(HHEH(HHEH@0HtHEH@0HHEH@0HEH@HuHEH0HcHEH(HHEH@HHtHEH@HHHEH@HHEH@XHtHEH@XHHEH@XHEH@pHtHEH@pHHEH@pHEHHtHEHHHEHUHH}HuHUHEHUHHEHUHP]UHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEH!UHEHH(HEHHHuHEHHE@hHE@hHHHHHEHPpHEH@pHu&HEH(HHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHUHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEH!UHEHH(HEHHHuHEHHE@hHE@hHHHHHEHPpHEH@pHu&HEH(HHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHUHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEH!UHEHH(HEHHHuHEHHE@hHE@hHHHHHEHPpHEH@pHu&HEH(HHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHUHH@H}HuHUHEHp HMHEкHHu HE؋@EEHHEH}tUHuHMHEHHYHEHP8HEHHE}<}2EHcHEHH$HEHHUHE؉P,HE؋@8HHHEHP0HEH@0HHE؋@8‹EHcHEHHEH@0HHHEHP0HE؋@8HHE؋P8E)EEUHcHU؋R8HHUH4HUHJ@HHHu!HEH@0HHEH@06HE@hHE؋@hHHHHHEHPpHEH@pHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pH HUH$HHEH@pHP HE؋@,HBHEH@pHP0HEH@0HHEH@pHP0HE؋@8HBHEH@pHP@HEH@HHHEH@pHP@HEH@PHBHEH2HEH@HH}t HEHUHH`H}HuHUHEHp HMHEHHu lHE@EEHHEH}UHuHMHEHHHEEEHEH0HEUHEHЋEEEBEUEHHEHHEHHEԃ}UԋEEEE;ErHEH0HHEȋUMHEHHEHHHt/EEEE;EGHEH/HEH0HH}t HEHHUHH`H}HuHUHEHp HMHEHHu THE@`HEH@XHE@EEHHEH}UHuHMHEHHqHEEEEHUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHHEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾHEH}t HUHEHEH,w,d   4intemu0B3P /0# len1#2#5 ns6#7#:5 ns;#>] ns?#@#C nsD#E#HI#L nsM#N#O#P#  #)$#%#&)#';#4D ptr5D#89#:#;;# )+-s#.)# $  s ( & h '# t (#( +% h ,# t -#( 0J h 15# t 2# 5 op 6# 7# 8# 9# :# ;#  lH > h ?]# t @# ops A#( B#0 opv C#8 opc D#@J@ Gz h H# I# J#  K# L# t M#  P h Q# l RJ#H Y Z [del \% ] ^z _x UD V# W)# h X# r `# vc a;#h v bD#p2yr2yh?r?yhwrwyhbufw`w)X};cr}yXrcv}Pptr}sHlbuf`;ryXrcvPptrsHlbuf`;7ryXrcvðPptrsHDZlbufȀ`;ryHrcv@ptrslbuf`;\;ryrcvptrs\buf P=i&l&Loff'hj,d,H-`tu6D/0;DE; rEyrcvEptrEsK\bufLPiRlRLksShbDpp` UV;Hoprz; ;p ryhrcv`ptrsXhdrp P ptr XbufP!Hsrchoff `s ; rybuf!)off hdrp )Xptr @rc;dp h)"s l% : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "Iww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vw, y  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h 2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include /* * tnt_insert() * * write insert request to stream; * * s - stream pointer * ns - space * flags - request flags * kv - tuple key-value * * returns number of bytes written, or -1 on error. */ ssize_t tnt_insert(struct tnt_stream *s, uint32_t ns, uint32_t flags, struct tnt_tuple *kv) { /* filling major header */ struct tnt_header hdr; hdr.type = TNT_OP_INSERT; hdr.len = sizeof(struct tnt_header_insert) + kv->size; hdr.reqid = s->reqid; /* filling insert header */ struct tnt_header_insert hdr_insert; hdr_insert.ns = ns; hdr_insert.flags = flags; /* writing data to stream */ struct iovec v[3]; v[0].iov_base = (void *)&hdr; v[0].iov_len = sizeof(struct tnt_header); v[1].iov_base = (void *)&hdr_insert; v[1].iov_len = sizeof(struct tnt_header_insert); v[2].iov_base = kv->data; v[2].iov_len = kv->size; return s->writev(s, v, 3); } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_select.c0000664000000000000000000000653112231715276021324 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include /* * tnt_select() * * write select request to stream; * * s - stream pointer * ns - space * index - request index * offset- request offset * limit - request limit * keys - list of tuples keys * * returns number of bytes written, or -1 on error. */ ssize_t tnt_select(struct tnt_stream *s, uint32_t ns, uint32_t index, uint32_t offset, uint32_t limit, struct tnt_list *keys) { /* calculating tuples sizes */ size_t size = 0; struct tnt_iter i; tnt_iter_list(&i, keys); while (tnt_next(&i)) { struct tnt_tuple *t = TNT_ILIST_TUPLE(&i); size += t->size; } /* filling major header */ struct tnt_header hdr; hdr.type = TNT_OP_SELECT; hdr.len = sizeof(struct tnt_header_select) + 4 + size; hdr.reqid = s->reqid; /* filling select header */ struct tnt_header_select hdr_sel; hdr_sel.ns = ns; hdr_sel.index = index; hdr_sel.offset = offset; hdr_sel.limit = limit; /* allocating write vector */ int vc = 3 + keys->count; struct iovec *v = tnt_mem_alloc(sizeof(struct iovec) * vc); if (v == NULL) { tnt_iter_free(&i); return -1; } /* filling write vector */ v[0].iov_base = (void *)&hdr; v[0].iov_len = sizeof(struct tnt_header); v[1].iov_base = (void *)&hdr_sel; v[1].iov_len = sizeof(struct tnt_header_select); v[2].iov_base = (void *)&keys->count; v[2].iov_len = 4; int vi = 3; tnt_rewind(&i); while (tnt_next(&i)) { struct tnt_tuple *t = TNT_ILIST_TUPLE(&i); v[vi].iov_base = t->data; v[vi].iov_len = t->size; vi++; } tnt_iter_free(&i); /* writing data to stream */ ssize_t rc = s->writev(s, v, vc); tnt_mem_free(v); return rc; } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_reply.c0000664000000000000000000001247612202131537021173 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include /* * tnt_reply_init() * * initialize reply object; * * r - reply object pointer */ void tnt_reply_init(struct tnt_reply *r) { memset(r, 0, sizeof(struct tnt_reply)); } /* * tnt_reply_free() * * free reply object; * * r - reply object pointer */ void tnt_reply_free(struct tnt_reply *r) { if (r->error) tnt_mem_free(r->error); tnt_list_free(&r->tuples); } /* * tnt_reply_from() * * process iproto reply with supplied recv function; * * r - reply object pointer * rcv - supplied recv function * ptr - recv function argument * * returns zero on fully read reply, or -1 on error. */ int tnt_reply_from(struct tnt_reply *r, tnt_reply_t rcv, void *ptr) { /* reading iproto header */ struct tnt_header hdr; if (rcv(ptr, (char*)&hdr, sizeof(struct tnt_header)) == -1) return -1; uint32_t size = hdr.len; tnt_list_init(&r->tuples); r->count = 0; r->error = NULL; r->reqid = hdr.reqid; r->code = 0; r->op = hdr.type; /* ping is the simplest case */ if (r->op == TNT_OP_PING) return 0; /* reading code */ if (rcv(ptr, (char*)&r->code, sizeof(r->code)) == -1) return -1; size -= 4; /* error handling */ if (r->code != 0) { r->error = tnt_mem_alloc(size); if (r->error == NULL) return -1; if (rcv(ptr, r->error, size) == -1) { tnt_mem_free(r->error); return -1; } return 0; } /* checking validity of the operation */ if (r->op != TNT_OP_INSERT && r->op != TNT_OP_UPDATE && r->op != TNT_OP_DELETE && r->op != TNT_OP_SELECT && r->op != TNT_OP_CALL) return -1; /* code only (BOX_QUIET flag) */ if (size == 0) return 0; /* reading count */ if (rcv(ptr, (char*)&r->count, sizeof(r->count)) == -1) return -1; size -= 4; /* count only */ if (size == 0) return 0; /* allocating and reading data */ char *buf = tnt_mem_alloc(size); if (buf == NULL) return -1; if (rcv(ptr, buf, size) == -1) { tnt_mem_free(buf); return -1; } char *p = buf; /* processing tuples */ uint32_t total = 0; uint32_t i; for (i = 0 ; i < r->count ; i++) { uint32_t tsize = *(uint32_t*)(p); /* tuple size */ if (tsize > (size - total)) goto rollback; p += 4; /* [count, enc0, data0, ...] */ struct tnt_tuple *t = tnt_tuple_set(NULL, p, tsize + 4 /* count */); if (t == NULL) goto rollback; tnt_list_at(&r->tuples, t); p += tsize + 4; total += (4 + 4 + tsize); /* length + cardinality + tuple size */ } tnt_mem_free(buf); return 0; rollback: tnt_list_free(&r->tuples); tnt_mem_free(buf); return -1; } /* * tnt_reply() * * process buffer as iproto reply; * * r - reply object pointer * buf - buffer data pointer * size - buffer data size * off - returned offset, maybe NULL * * if reply is fully read, then zero is returned and offset set to the * end of reply data in buffer. * * if reply is not complete, then 1 is returned and offset set to the * size needed to read. * * if there were error while parsing reply, -1 is returned. * * returns zero on fully read reply, or NULL on error. */ static ssize_t tnt_reply_cb(void *ptr[2], char *buf, ssize_t size) { char *src = ptr[0]; ssize_t *off = ptr[1]; memcpy(buf, src + *off, size); *off += size; return size; } int tnt_reply(struct tnt_reply *r, char *buf, size_t size, size_t *off) { /* supplied buffer must contain full reply, * if it doesn't then returning count of bytes * needed to process */ if (size < (sizeof(struct tnt_header))) { if (off) *off = sizeof(struct tnt_header) - size; return 1; } struct tnt_header *hdr = (struct tnt_header*)buf; if (size < sizeof(struct tnt_header) + hdr->len) { if (off) *off = (sizeof(struct tnt_header) + hdr->len) - size; return 1; } size_t offv = 0; void *ptr[2] = { buf, &offv }; int rc = tnt_reply_from(r, (tnt_reply_t)tnt_reply_cb, ptr); if (off) *off = offv; return rc; } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_update.c0000664000000000000000000001600212231715276021321 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include static ssize_t tnt_update_op(struct tnt_stream *s, uint32_t field, uint8_t op, const char *data, uint32_t size) { /* encoding size */ int encs = tnt_enc_size(size); char enc[5]; tnt_enc_write(enc, size); struct iovec iov[4]; int iovc = 3; /* field */ iov[0].iov_base = (void *)&field; iov[0].iov_len = 4; /* operation */ iov[1].iov_base = (void *)&op; iov[1].iov_len = 1; /* encoding size */ iov[2].iov_base = enc; iov[2].iov_len = encs; /* data */ if (data) { iov[3].iov_base = (void *) data; iov[3].iov_len = size; iovc++; } return s->writev(s, iov, iovc); } /* * tnt_update_arith() * * write 32-bit arithmetic update operation to buffer stream; * * s - stream buffer pointer * field - field number * op - update operation type * value - update operation value * * returns number of bytes written, or -1 on error. */ ssize_t tnt_update_arith(struct tnt_stream *s, uint32_t field, uint8_t op, uint32_t value) { return tnt_update_op(s, field, op, (char*)&value, sizeof(value)); } /* * tnt_update_arith_i32() * * write 32-bit arithmetic update operation to buffer stream; * * s - stream buffer pointer * field - field number * op - update operation type * value - update operation value * * returns number of bytes written, or -1 on error. */ ssize_t tnt_update_arith_i32(struct tnt_stream *s, uint32_t field, uint8_t op, uint32_t value) { return tnt_update_op(s, field, op, (char*)&value, sizeof(value)); } /* * tnt_update_arith_i64() * * write 64-bit arithmetic update operation to buffer stream; * * s - stream buffer pointer * field - field number * op - update operation type * value - update operation value * * returns number of bytes written, or -1 on error. */ ssize_t tnt_update_arith_i64(struct tnt_stream *s, uint32_t field, uint8_t op, uint64_t value) { return tnt_update_op(s, field, op, (char*)&value, sizeof(value)); } /* * tnt_update_assign() * * write assign update operation to buffer stream; * * s - stream buffer pointer * field - field number * data - update operation data * value - update operation data size * * returns number of bytes written, or -1 on error. */ ssize_t tnt_update_assign(struct tnt_stream *s, uint32_t field, char *data, uint32_t size) { return tnt_update_op(s, field, TNT_UPDATE_ASSIGN, data, size); } /* * tnt_update_splice() * * write update splice operation to buffer stream; * * s - stream buffer pointer * field - field number * offset - splice offset * length - splice length * data - splice operation data * value - splice operation data size * * returns number of bytes written, or -1 on error. */ ssize_t tnt_update_splice(struct tnt_stream *s, uint32_t field, uint32_t offset, int32_t length, const char *data, size_t size) { /* calculating splice data sizes */ uint32_t offset_len = tnt_enc_size(sizeof(offset)), length_len = tnt_enc_size(sizeof(length)), data_len = tnt_enc_size(size); uint32_t sz = offset_len + sizeof(offset) + length_len + sizeof(length) + data_len + size; /* allocating splice request buffer */ char *buf = tnt_mem_alloc(sz); if (buf == NULL) return -1; /* filling splice request data */ char *p = buf; tnt_enc_write(p, sizeof(offset)); p += offset_len; memcpy(p, &offset, sizeof(offset)); p += sizeof(offset); tnt_enc_write(p, sizeof(length)); p += length_len; memcpy(p, &length, sizeof(length)); p += sizeof(length); tnt_enc_write(p, size); p += data_len; memcpy(p, data, size); p += size; /* writing splice request */ ssize_t rc = tnt_update_op(s, field, TNT_UPDATE_SPLICE, buf, sz); tnt_mem_free(buf); return rc; } /* * tnt_update_delete() * * write update delete operation to buffer stream; * * s - stream buffer pointer * field - field number * * returns number of bytes written, or -1 on error. */ ssize_t tnt_update_delete(struct tnt_stream *s, uint32_t field) { return tnt_update_op(s, field, TNT_UPDATE_DELETE, NULL, 0); } ssize_t tnt_update_insert(struct tnt_stream *s, uint32_t field, const char *data, uint32_t size) { return tnt_update_op(s, field, TNT_UPDATE_INSERT, data, size); } /* * tnt_update() * * write select request to stream; * * s - stream pointer * ns - space * flags - request flags * k - update key tuple * ops - stream buffer pointer * * returns number of bytes written, or -1 on error. */ ssize_t tnt_update(struct tnt_stream *s, uint32_t ns, uint32_t flags, struct tnt_tuple *k, struct tnt_stream *ops) { /* filling major header */ struct tnt_header hdr; hdr.type = TNT_OP_UPDATE; hdr.len = sizeof(struct tnt_header_update) + k->size + 4 + TNT_SBUF_SIZE(ops); hdr.reqid = s->reqid; /* filling update header */ struct tnt_header_update hdr_update; hdr_update.ns = ns; hdr_update.flags = flags; /* writing data to stream */ struct iovec v[5]; v[0].iov_base = (void *)&hdr; v[0].iov_len = sizeof(struct tnt_header); v[1].iov_base = (void *)&hdr_update; v[1].iov_len = sizeof(struct tnt_header_update); v[2].iov_base = k->data; v[2].iov_len = k->size; v[3].iov_base = (void *)&ops->wrcnt; v[3].iov_len = 4; v[4].iov_base = TNT_SBUF_DATA(ops); v[4].iov_len = TNT_SBUF_SIZE(ops); return s->writev(s, v, 5); } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_request.c0000664000000000000000000003255012231715276021535 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include /* * tnt_request_init() * * initialize request object; * * r - reply pointer */ void tnt_request_init(struct tnt_request *r) { memset(r, 0, sizeof(struct tnt_request)); } /* * tnt_request_free() * * free request object; * * r - request object pointer */ void tnt_request_free(struct tnt_request *r) { switch (r->h.type) { case TNT_OP_INSERT: tnt_tuple_free(&r->r.insert.t); break; case TNT_OP_DELETE_1_3: tnt_tuple_free(&r->r.del_1_3.t); break; case TNT_OP_DELETE: tnt_tuple_free(&r->r.del.t); break; case TNT_OP_CALL: if (r->r.call.proc) { tnt_mem_free(r->r.call.proc); r->r.call.proc = NULL; } tnt_tuple_free(&r->r.call.t); break; case TNT_OP_SELECT: tnt_list_free(&r->r.select.l); break; case TNT_OP_UPDATE: tnt_tuple_free(&r->r.update.t); if (r->r.update.ops) { tnt_mem_free(r->r.update.ops); r->r.update.ops = NULL; } if (r->r.update.opv) { tnt_mem_free(r->r.update.opv); r->r.update.opv = NULL; } break; case TNT_OP_PING: break; } if (r->v) { tnt_mem_free(r->v); r->v = NULL; } if (r->origin) { tnt_mem_free(r->origin); r->origin = NULL; } } /* * tnt_request_setorigin() * * set buffer of request source, free it with request free; * * r - request object pointer * buf - supplied buffer * size - buffer size */ void tnt_request_setorigin(struct tnt_request *r, char *buf, size_t size) { r->origin = buf; r->origin_size = size; } static int tnt_request_insert(struct tnt_request *r, tnt_request_t rcv, void *ptr) { if (rcv(ptr, (char*)&r->r.insert, sizeof(struct tnt_header_insert)) == -1) return -1; uint32_t size = r->h.len - sizeof(struct tnt_header_insert); char *buf = tnt_mem_alloc(size); if (buf == NULL) return -1; if (rcv(ptr, buf, size) == -1) { tnt_mem_free(buf); return -1; } if (tnt_tuple_set(&r->r.insert.t, buf, size) == NULL) { tnt_mem_free(buf); return -1; } /* creating resend io vector */ r->vc = 3; r->v = tnt_mem_alloc(r->vc * sizeof(struct iovec)); if (r->v == NULL) { tnt_tuple_free(&r->r.insert.t); tnt_mem_free(buf); return -1; } r->v[0].iov_base = (void *)&r->h; r->v[0].iov_len = sizeof(struct tnt_header); r->v[1].iov_base = (void *)&r->r.insert.h; r->v[1].iov_len = sizeof(struct tnt_header_insert); r->v[2].iov_base = r->r.insert.t.data; r->v[2].iov_len = r->r.insert.t.size; tnt_mem_free(buf); return 0; } static int tnt_request_delete_1_3(struct tnt_request *r, tnt_request_t rcv, void *ptr) { if (rcv(ptr, (char*)&r->r.del_1_3, sizeof(struct tnt_header_delete_1_3)) == -1) return -1; uint32_t size = r->h.len - sizeof(struct tnt_header_delete_1_3); char *buf = tnt_mem_alloc(size); if (buf == NULL) return -1; if (rcv(ptr, buf, size) == -1) { tnt_mem_free(buf); return -1; } if (tnt_tuple_set(&r->r.del_1_3.t, buf, size) == NULL) { tnt_mem_free(buf); return -1; } /* creating resend io vector */ r->vc = 3; r->v = tnt_mem_alloc(r->vc * sizeof(struct iovec)); if (r->v == NULL) { tnt_tuple_free(&r->r.del_1_3.t); tnt_mem_free(buf); return -1; } r->v[0].iov_base = (void *)&r->h; r->v[0].iov_len = sizeof(struct tnt_header); r->v[1].iov_base = (void *)&r->r.del_1_3.h; r->v[1].iov_len = sizeof(struct tnt_header_delete_1_3); r->v[2].iov_base = r->r.del_1_3.t.data; r->v[2].iov_len = r->r.del_1_3.t.size; tnt_mem_free(buf); return 0; } static int tnt_request_delete(struct tnt_request *r, tnt_request_t rcv, void *ptr) { if (rcv(ptr, (char*)&r->r.del, sizeof(struct tnt_header_delete)) == -1) return -1; uint32_t size = r->h.len - sizeof(struct tnt_header_delete); char *buf = tnt_mem_alloc(size); if (buf == NULL) return -1; if (rcv(ptr, buf, size) == -1) { tnt_mem_free(buf); return -1; } if (tnt_tuple_set(&r->r.del.t, buf, size) == NULL) { tnt_mem_free(buf); return -1; } /* creating resend io vector */ r->vc = 3; r->v = tnt_mem_alloc(r->vc * sizeof(struct iovec)); if (r->v == NULL) { tnt_tuple_free(&r->r.del.t); tnt_mem_free(buf); return -1; } r->v[0].iov_base = (void *)&r->h; r->v[0].iov_len = sizeof(struct tnt_header); r->v[1].iov_base = (void *)&r->r.del.h; r->v[1].iov_len = sizeof(struct tnt_header_delete); r->v[2].iov_base = r->r.del.t.data; r->v[2].iov_len = r->r.del.t.size; tnt_mem_free(buf); return 0; } static int tnt_request_call(struct tnt_request *r, tnt_request_t rcv, void *ptr) { if (rcv(ptr, (char*)&r->r.call, sizeof(struct tnt_header_call)) == -1) return -1; uint32_t size = r->h.len - sizeof(struct tnt_header_call); char *buf = tnt_mem_alloc(size); if (buf == NULL) goto error; if (rcv(ptr, buf, size) == -1) goto error; int esize = tnt_enc_read(buf, &r->r.call.proc_len); if (esize == -1 || esize >= 5) goto error; memcpy(r->r.call.proc_enc, buf, esize); /* function name */ r->r.call.proc_enc_len = esize; r->r.call.proc = tnt_mem_alloc(r->r.call.proc_len + 1); if (r->r.call.proc == NULL) goto error; memcpy(r->r.call.proc, buf + esize, r->r.call.proc_len); r->r.call.proc[r->r.call.proc_len] = 0; /* function arguments */ size -= esize + r->r.call.proc_len; if (tnt_tuple_set(&r->r.call.t, buf + esize + r->r.call.proc_len, size) == NULL) { tnt_mem_free(r->r.call.proc); r->r.call.proc = NULL; goto error; } /* creating resend io vector */ r->vc = 5; r->v = tnt_mem_alloc(r->vc * sizeof(struct iovec)); if (r->v == NULL) goto error; r->v[0].iov_base = (void *)&r->h; r->v[0].iov_len = sizeof(struct tnt_header); r->v[1].iov_base = (void *)&r->r.call.h; r->v[1].iov_len = sizeof(struct tnt_header_call); r->v[2].iov_base = r->r.call.proc_enc; r->v[2].iov_len = r->r.call.proc_enc_len; r->v[3].iov_base = r->r.call.proc; r->v[3].iov_len = r->r.call.proc_len; r->v[4].iov_base = r->r.call.t.data; r->v[4].iov_len = r->r.call.t.size; tnt_mem_free(buf); return 0; error: tnt_tuple_free(&r->r.call.t); if (buf) tnt_mem_free(buf); return -1; } static int tnt_request_select(struct tnt_request *r, tnt_request_t rcv, void *ptr) { if (rcv(ptr, (char*)&r->r.select, sizeof(struct tnt_header_select)) == -1) return -1; uint32_t size = r->h.len - sizeof(struct tnt_header_select); char *buf = tnt_mem_alloc(size); if (buf == NULL) goto error; if (rcv(ptr, buf, size) == -1) goto error; /* count of tuples */ uint32_t i, count = *(uint32_t*)buf; uint32_t off = 4; /* processing tuples */ tnt_list_init(&r->r.select.l); for (i = 0 ; i < count ; i++) { /* calculating tuple size */ uint32_t j, cardinality = *(uint32_t*)(buf + off); uint32_t size = 4; for (j = 0 ; j < cardinality ; j++) { uint32_t fld_size = 0; int fld_esize = tnt_enc_read(buf + off + size, &fld_size); if (fld_esize == -1) goto error; size += fld_esize + fld_size; } /* initializing tuple and adding to list */ struct tnt_tuple *tu = tnt_list_at(&r->r.select.l, NULL); if (tnt_tuple_set(tu, buf + off, size) == NULL) goto error; off += size; } tnt_mem_free(buf); return 0; error: tnt_list_free(&r->r.select.l); if (buf) tnt_mem_free(buf); return -1; } static int tnt_request_update(struct tnt_request *r, tnt_request_t rcv, void *ptr) { if (rcv(ptr, (char*)&r->r.update, sizeof(struct tnt_header_update)) == -1) return -1; r->r.update.opc = 0; r->r.update.opv = NULL; uint32_t size = r->h.len - sizeof(struct tnt_header_update); char *buf = tnt_mem_alloc(size); if (buf == NULL) goto error; if (rcv(ptr, buf, size) == -1) goto error; /* calculating key tuple size */ uint32_t i, cardinality = *(uint32_t*)(buf); uint32_t ks = 4; for (i = 0 ; i < cardinality ; i++) { uint32_t fld_size = 0; int fld_esize = tnt_enc_read(buf + ks, &fld_size); if (fld_esize == -1) goto error; ks += fld_esize + fld_size; } /* initializing tuple */ if (tnt_tuple_set(&r->r.update.t, buf, ks) == NULL) goto error; size -= ks /*- 4 */; /* ops data */ r->r.update.opc = *(uint32_t*)(buf + ks); uint32_t opvsz = sizeof(struct tnt_request_update_op) * r->r.update.opc; r->r.update.opv = tnt_mem_alloc(opvsz); if (r->r.update.opv == NULL) goto error; memset(r->r.update.opv, 0, sizeof(opvsz)); /* allocating ops buffer */ r->r.update.ops_size = 4; r->r.update.ops = tnt_mem_alloc(size); if (r->r.update.ops == NULL) goto error; memcpy(r->r.update.ops, buf + ks /*+ 4*/, size); /* parsing operations */ char *p = r->r.update.ops + 4; for (i = 0 ; i < r->r.update.opc ; i++) { struct tnt_request_update_op *op = &r->r.update.opv[i]; /* field */ op->field = *(uint32_t*)(p); p += 4; /* operation */ op->op = *(uint8_t*)(p); p += 1; /* enc_size */ int esize = tnt_enc_read(p, &op->size); if (esize == -1 || esize >= 5) goto error; op->size_enc_len = esize; memcpy(op->size_enc, p, op->size_enc_len); p += op->size_enc_len; op->data = p; p += op->size; r->r.update.ops_size += 4 + 1 + op->size_enc_len + op->size; } /* creating resend io vector */ r->vc = 5; r->v = tnt_mem_alloc(r->vc * sizeof(struct iovec)); if (r->v == NULL) goto error; r->v[0].iov_base = (void *)&r->h; r->v[0].iov_len = sizeof(struct tnt_header); r->v[1].iov_base = (void *)&r->r.update.h; r->v[1].iov_len = sizeof(struct tnt_header_update); r->v[2].iov_base = r->r.update.t.data; r->v[2].iov_len = r->r.update.t.size; r->v[3].iov_base = (void *)&r->r.update.opc; r->v[3].iov_len = 4; r->v[4].iov_base = r->r.update.ops; r->v[4].iov_len = r->r.update.ops_size; tnt_mem_free(buf); return 0; error: tnt_tuple_free(&r->r.update.t); if (r->r.update.ops) { tnt_mem_free(r->r.update.ops); r->r.update.ops = NULL; } if (r->r.update.opv) { tnt_mem_free(r->r.update.opv); r->r.update.opv = NULL; } if (buf) tnt_mem_free(buf); return -1; } /* * tnt_request_from() * * process iproto request with supplied recv function; * * r - request object pointer * rcv - supplied recv function * ptr - recv function argument * hdr - pointer to iproto header, may be NULL * * returns zero on fully read reply, or -1 on error. */ int tnt_request_from(struct tnt_request *r, tnt_request_t rcv, void *ptr, struct tnt_header *hdr) { if (hdr) { memcpy(&r->h, hdr, sizeof(struct tnt_header)); } else { if (rcv(ptr, (char*)&r->h, sizeof(struct tnt_header)) == -1) return -1; } switch (r->h.type) { case TNT_OP_INSERT: return tnt_request_insert(r, rcv, ptr); case TNT_OP_DELETE_1_3: return tnt_request_delete_1_3(r, rcv, ptr); case TNT_OP_DELETE: return tnt_request_delete(r, rcv, ptr); case TNT_OP_CALL: return tnt_request_call(r, rcv, ptr); case TNT_OP_SELECT: return tnt_request_select(r, rcv, ptr); case TNT_OP_UPDATE: return tnt_request_update(r, rcv, ptr); case TNT_OP_PING: return 0; } return -1; } /* * tnt_request() * * process buffer as iproto request (deserilization); * * r - request object pointer * buf - buffer data pointer * size - buffer data size * off - returned offset, maybe NULL * hdr - iproto header, maybe NULL * * if request is fully read, then zero is returned and offset set to the * end of reply data in buffer. * * if request is not complete, then 1 is returned and offset set to the * size needed to read. * * if there were error while parsing reply, -1 is returned. * * returns zero on fully read reply, or NULL on error. */ static ssize_t tnt_request_cb(void *ptr[2], char *buf, ssize_t size) { char *src = ptr[0]; ssize_t *off = ptr[1]; memcpy(buf, src + *off, size); *off += size; return size; } int tnt_request(struct tnt_request *r, char *buf, size_t size, size_t *off, struct tnt_header *hdr) { if (hdr == NULL) { if (size < (sizeof(struct tnt_header))) { if (off) *off = sizeof(struct tnt_header) - size; return 1; } struct tnt_header *hdr_ = (struct tnt_header*)buf; if (size < hdr_->len) { if (off) *off = hdr_->len - size; return 1; } } size_t offv = 0; void *ptr[2] = { buf, &offv }; int rc = tnt_request_from(r, (tnt_request_t)tnt_request_cb, ptr, hdr); if (off) *off = offv; return rc; } tarantool-1.5.1.218.g1a69fd6/connector/c/tnt/tnt_tuple.c0000664000000000000000000002214612202131537021164 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include /* * tnt_tuple_init() * * initialize tuple; * * t - tuple pointer */ void tnt_tuple_init(struct tnt_tuple *t) { memset(t, 0, sizeof(struct tnt_tuple)); } /* * tnt_tuple_free() * * free tuple; * * t - tuple pointer */ void tnt_tuple_free(struct tnt_tuple *t) { if (t->data) tnt_mem_free(t->data); t->size = 0; t->cardinality = 0; t->data = NULL; if (t->alloc) tnt_mem_free(t); } /* * tnt_tuple_add() * * add field to existing tuple; * create new tuple and add field; * create new tuple; * * t - tuple pointer, maybe NULL * data - tuple field data pointer, maybe NULL * size - tuple field data size, maybe zero * * if tuple pointer is NULL, then new tuple will be created. * If tuple pointer is NULL and size is zero, then only * new empty tuple will be created. * if tuple field data is NULL, then new field would be * created, but no data copied to it. * * returns tuple pointer, or NULL on error. */ struct tnt_tuple* tnt_tuple_add(struct tnt_tuple *t, const void *data, uint32_t size) { int allocated = t == NULL; if (t == NULL) { t = tnt_mem_alloc(sizeof(struct tnt_tuple)); if (t == NULL) return NULL; memset(t, 0, sizeof(struct tnt_tuple)); t->alloc = 1; if (size == 0) return t; } if (t->size == 0) t->size = 4; /* cardinality */ int esize = tnt_enc_size(size); size_t nsize = t->size + esize + size; /* reallocating tuple data */ char *ndata = realloc(t->data, nsize); if (ndata == NULL) { if (allocated) tnt_mem_free(t); return NULL; } t->cardinality++; /* updating tuple cardinality */ memcpy(ndata, &t->cardinality, 4); /* setting new field */ tnt_enc_write(ndata + t->size, size); if (data) memcpy(ndata + t->size + esize, data, size); t->data = ndata; t->size = nsize; return t; } /* * tnt_tuple() * * add formated fields to existing tuple; * create new tuple and add formated fields; * * t - tuple pointer, maybe NULL * fmt - printf-alike format (%s, %*s, %d, %l, %ll, %ul, %ull are supported) * * if tuple pointer is NULL, then new tuple will be created. * if tuple pointer is NULL and fmt is NULL, then new empty tuple * will be created. * * returns tuple pointer, or NULL on error. */ struct tnt_tuple* tnt_tuple(struct tnt_tuple *t, const char *fmt, ...) { if (t == NULL) { t = tnt_tuple_add(NULL, NULL, 0); if (t == NULL) return NULL; if (fmt == NULL) return t; } va_list args; va_start(args, fmt); const char *p = fmt; while (*p) { if (isspace(*p)) { p++; continue; } else if (*p != '%') return NULL; p++; switch (*p) { case '*': { if (*(p + 1) == 's') { int len = va_arg(args, int); char *s = va_arg(args, char*); tnt_tuple_add(t, s, len); p += 2; } else return NULL; break; } case 's': { char *s = va_arg(args, char*); tnt_tuple_add(t, s, strlen(s)); p++; break; } case 'd': { int i = va_arg(args, int); tnt_tuple_add(t, (char*)&i, sizeof(int)); p++; break; } case 'u': if (*(p + 1) == 'l') { if (*(p + 2) == 'l') { unsigned long long int ull = va_arg(args, unsigned long long); tnt_tuple_add(t, (char*)&ull, sizeof(unsigned long long int)); p += 3; } else { unsigned long int ul = va_arg(args, unsigned long int); tnt_tuple_add(t, (char*)&ul, sizeof(unsigned long int)); p += 2; } } else return NULL; break; case 'l': if (*(p + 1) == 'l') { long long int ll = va_arg(args, int); tnt_tuple_add(t, (char*)&ll, sizeof(long long int)); p += 2; } else { long int l = va_arg(args, int); tnt_tuple_add(t, (char*)&l, sizeof(long int)); p++; } break; default: return NULL; } } va_end(args); return t; } /* * tnt_tuple_validate() * * check if supplied buffer is a valid tuple; * * buf - iproto tuple buffer representation * size - buffer size * * returns 0, or -1 on error. */ static int tnt_tuple_validate(const void *buf, size_t size) { if (size < sizeof(uint32_t)) return -1; size_t fld_off = sizeof(uint32_t); uint32_t cardinality = *(uint32_t*)buf; while (cardinality-- != 0) { uint32_t fld_size; int fld_esize = tnt_enc_read((const char *)buf + fld_off, &fld_size); if (fld_esize == -1) return -1; fld_off += fld_esize + fld_size; if (fld_off > size) return -1; } return 0; } /* * tnt_tuple_set() * * set tuple from data; * create new tuple and set it from data; * * t - tuple pointer, maybe NULL * buf - iproto tuple buffer representation * size - buffer size * * if tuple pointer is NULL, then new tuple will be created. * * returns tuple pointer, or NULL on error. */ struct tnt_tuple *tnt_tuple_set(struct tnt_tuple *t, const void *buf, size_t size) { if (tnt_tuple_validate(buf, size) == -1) return NULL; int allocated = t == NULL; if (t == NULL) { t = tnt_tuple_add(NULL, NULL, 0); if (t == NULL) return NULL; } t->cardinality = *(uint32_t*)buf; t->size = size; t->data = tnt_mem_alloc(size); if (t->data == NULL) goto error; memcpy(t->data, buf, size); return t; error: if (allocated) tnt_tuple_free(t); return NULL; } /* * tnt_tuple_set_as() * * set tuple from data; * create new tuple and set it from data; * * t - tuple pointer, maybe NULL * buf - iproto tuple fields buffer representation * size - buffer size * num - tuple cardinality * * if tuple pointer is NULL, then new tuple will be created. * * returns tuple pointer, or NULL on error. */ struct tnt_tuple* tnt_tuple_set_as(struct tnt_tuple *t, const void *buf, size_t size, uint32_t num) { int allocated = t == NULL; if (t == NULL) { t = tnt_tuple_add(NULL, NULL, 0); if (t == NULL) return NULL; } t->cardinality = num; t->size = sizeof(uint32_t) + size; t->data = tnt_mem_alloc(t->size); if (t->data == NULL) goto error; memcpy(t->data, &num, sizeof(uint32_t)); memcpy(t->data + sizeof(uint32_t), buf, size); return t; error: if (allocated) tnt_tuple_free(t); return NULL; } /* * tnt_list_init() * * initialize tuple list; * * l - tuple list pointer */ void tnt_list_init(struct tnt_list *l) { memset(l, 0, sizeof(struct tnt_list)); } /* * tnt_list_free() * * free tuple list; * * l - tuple list pointer */ void tnt_list_free(struct tnt_list *l) { if (l->list == NULL) return; uint32_t i; for (i = 0 ; i < l->count ; i++) tnt_tuple_free(l->list[i].ptr); tnt_mem_free(l->list); if (l->alloc) tnt_mem_free(l); } /* * tnt_list() * * add tuples to the list; * * l - tuple list pointer, maybe NULL * * returns tuple list pointer, NULL on error. */ struct tnt_list *tnt_list(struct tnt_list *l, ...) { if (l == NULL) { l = tnt_mem_alloc(sizeof(struct tnt_list)); if (l == NULL) return NULL; memset(l, 0, sizeof(struct tnt_list)); l->alloc++; } va_list args; va_start(args, l); while (1) { struct tnt_tuple *ptr = va_arg(args, struct tnt_tuple*); if (ptr == NULL) break; tnt_list_at(l, ptr); } va_end(args); return l; } /* * tnt_list_at() * * attach tuple to list; * create new tuple and attach it the the list; * * l - tuple list pointer * t - tuple pointer * * returns tuple pointer, NULL on error. */ struct tnt_tuple *tnt_list_at(struct tnt_list *l, struct tnt_tuple *t) { /* allocating tuple if necessary */ int allocated = t == NULL; if (t == NULL) { t = tnt_tuple_add(NULL, NULL, 0); if (t == NULL) return NULL; } /* reallocating tuple data */ char *ndata = realloc(l->list, sizeof(struct tnt_list_ptr) * (l->count + 1)); if (ndata == NULL) { free(l->list); if (allocated) tnt_tuple_free(t); return NULL; } l->list = (struct tnt_list_ptr*)ndata; /* setting pointer data */ l->list[l->count].ptr = t; l->count++; return t; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/0000775000000000000000000000000012213333320017500 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/cmake_install.cmake0000664000000000000000000000574012213333034023320 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/libtarantoolnet.a") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolnet.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolnet.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolnet.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") FILE(RPATH_CHECK FILE "${file}" RPATH "") ENDIF() ENDFOREACH() FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/libtarantoolnet.so.1.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/libtarantoolnet.so.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/libtarantoolnet.so" ) FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolnet.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolnet.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolnet.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") FILE(RPATH_REMOVE FILE "${file}") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "${file}") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDFOREACH() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/tnt_io.c0000664000000000000000000002425712202131537021156 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if !defined(MIN) # define MIN(a, b) (a) < (b) ? (a) : (b) #endif /* !defined(MIN) */ static enum tnt_error tnt_io_resolve(struct sockaddr_in *addr, const char *hostname, unsigned short port) { memset(addr, 0, sizeof(struct sockaddr_in)); addr->sin_family = AF_INET; addr->sin_port = htons(port); struct addrinfo *addr_info = NULL; if (getaddrinfo(hostname, NULL, NULL, &addr_info) == 0) { memcpy(&addr->sin_addr, (void*)&((struct sockaddr_in *)addr_info->ai_addr)->sin_addr, sizeof(addr->sin_addr)); freeaddrinfo(addr_info); return TNT_EOK; } if (addr_info) freeaddrinfo(addr_info); return TNT_ERESOLVE; } static enum tnt_error tnt_io_nonblock(struct tnt_stream_net *s, int set) { int flags = fcntl(s->fd, F_GETFL); if (flags == -1) { s->errno_ = errno; return TNT_ESYSTEM; } if (set) flags |= O_NONBLOCK; else flags &= ~O_NONBLOCK; if (fcntl(s->fd, F_SETFL, flags) == -1) { s->errno_ = errno; return TNT_ESYSTEM; } return TNT_EOK; } static enum tnt_error tnt_io_connect_do(struct tnt_stream_net *s, const char *host, int port) { /* resolving address */ struct sockaddr_in addr; enum tnt_error result = tnt_io_resolve(&addr, host, port); if (result != TNT_EOK) return result; /* setting nonblock */ result = tnt_io_nonblock(s, 1); if (result != TNT_EOK) return result; if (connect(s->fd, (struct sockaddr*)&addr, sizeof(addr)) == -1) { if (errno == EINPROGRESS) { /** waiting for connection while handling signal events */ const int64_t micro = 1000000; int64_t tmout_usec = s->opt.tmout_connect.tv_sec * micro; /* get start connect time */ struct timeval start_connect; if (gettimeofday(&start_connect, NULL) == -1) { s->errno_ = errno; return TNT_ESYSTEM; } /* set initial timer */ struct timeval tmout; memcpy(&tmout, &s->opt.tmout_connect, sizeof(tmout)); while (1) { fd_set fds; FD_ZERO(&fds); FD_SET(s->fd, &fds); int ret = select(s->fd + 1, NULL, &fds, NULL, &tmout); if (ret == -1) { if (errno == EINTR || errno == EAGAIN) { /* get current time */ struct timeval curr; if (gettimeofday(&curr, NULL) == -1) { s->errno_ = errno; return TNT_ESYSTEM; } /* calculate timeout last time */ int64_t passd_usec = (curr.tv_sec - start_connect.tv_sec) * micro + (curr.tv_usec - start_connect.tv_usec); int64_t curr_tmeout = passd_usec - tmout_usec; if (curr_tmeout <= 0) { /* timeout */ return TNT_ETMOUT; } tmout.tv_sec = curr_tmeout / micro; tmout.tv_usec = curr_tmeout % micro; } else { s->errno_ = errno; return TNT_ESYSTEM; } } else if (ret == 0) { /* timeout */ return TNT_ETMOUT; } else { /* we have a event on socket */ break; } } /* checking error status */ int opt = 0; socklen_t len = sizeof(opt); if ((getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &opt, &len) == -1) || opt) { s->errno_ = (opt) ? opt: errno; return TNT_ESYSTEM; } } else { s->errno_ = errno; return TNT_ESYSTEM; } } /* setting block */ result = tnt_io_nonblock(s, 0); if (result != TNT_EOK) return result; return TNT_EOK; } static enum tnt_error tnt_io_xbufmax(struct tnt_stream_net *s, int opt, int min) { int max = 128 * 1024 * 1024; if (min == 0) min = 16384; unsigned int avg = 0; while (min <= max) { avg = ((unsigned int)(min + max)) / 2; if (setsockopt(s->fd, SOL_SOCKET, opt, &avg, sizeof(avg)) == 0) min = avg + 1; else max = avg - 1; } return TNT_EOK; } static enum tnt_error tnt_io_setopts(struct tnt_stream_net *s) { int opt = 1; if (setsockopt(s->fd, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)) == -1) goto error; tnt_io_xbufmax(s, SO_SNDBUF, s->opt.send_buf); tnt_io_xbufmax(s, SO_RCVBUF, s->opt.recv_buf); if (setsockopt(s->fd, SOL_SOCKET, SO_SNDTIMEO, &s->opt.tmout_send, sizeof(s->opt.tmout_send)) == -1) goto error; if (setsockopt(s->fd, SOL_SOCKET, SO_RCVTIMEO, &s->opt.tmout_recv, sizeof(s->opt.tmout_recv)) == -1) goto error; return TNT_EOK; error: s->errno_ = errno; return TNT_ESYSTEM; } enum tnt_error tnt_io_connect(struct tnt_stream_net *s, const char *host, int port) { s->fd = socket(AF_INET, SOCK_STREAM, 0); if (s->fd < 0) { s->errno_ = errno; return TNT_ESYSTEM; } enum tnt_error result = tnt_io_setopts(s); if (result != TNT_EOK) goto out; result = tnt_io_connect_do(s, host, port); if (result != TNT_EOK) goto out; s->connected = 1; return TNT_EOK; out: tnt_io_close(s); return result; } void tnt_io_close(struct tnt_stream_net *s) { if (s->fd > 0) { close(s->fd); s->fd = -1; } s->connected = 0; } ssize_t tnt_io_flush(struct tnt_stream_net *s) { if (s->sbuf.off == 0) return 0; ssize_t rc = tnt_io_send_raw(s, s->sbuf.buf, s->sbuf.off, 1); if (rc == -1) return -1; s->sbuf.off = 0; return rc; } ssize_t tnt_io_send_raw(struct tnt_stream_net *s, const char *buf, size_t size, int all) { size_t off = 0; do { ssize_t r; if (s->sbuf.tx) { r = s->sbuf.tx(s->sbuf.buf, buf + off, size - off); } else { do { r = send(s->fd, buf + off, size - off, 0); } while (r == -1 && (errno == EINTR)); } if (r <= 0) { s->error = TNT_ESYSTEM; s->errno_ = errno; return -1; } off += r; } while (off != size && all); return off; } ssize_t tnt_io_sendv_raw(struct tnt_stream_net *s, struct iovec *iov, int count, int all) { size_t total = 0; while (count > 0) { ssize_t r; if (s->sbuf.txv) { r = s->sbuf.txv(s->sbuf.buf, iov, MIN(count, IOV_MAX)); } else { do { r = writev(s->fd, iov, count); } while (r == -1 && (errno == EINTR)); } if (r <= 0) { s->error = TNT_ESYSTEM; s->errno_ = errno; return -1; } total += r; if (!all) break; while (count > 0) { if (iov->iov_len > (size_t)r) { iov->iov_base += r; iov->iov_len -= r; break; } else { r -= iov->iov_len; iov++; count--; } } } return total; } ssize_t tnt_io_send(struct tnt_stream_net *s, const char *buf, size_t size) { if (s->sbuf.buf == NULL) return tnt_io_send_raw(s, buf, size, 1); if (size > s->sbuf.size) { s->error = TNT_EBIG; return -1; } if ((s->sbuf.off + size) <= s->sbuf.size) { memcpy(s->sbuf.buf + s->sbuf.off, buf, size); s->sbuf.off += size; return size; } ssize_t r = tnt_io_send_raw(s, s->sbuf.buf, s->sbuf.off, 1); if (r == -1) return -1; s->sbuf.off = size; memcpy(s->sbuf.buf, buf, size); return size; } inline static void tnt_io_sendv_put(struct tnt_stream_net *s, struct iovec *iov, int count) { int i; for (i = 0 ; i < count ; i++) { memcpy(s->sbuf.buf + s->sbuf.off, iov[i].iov_base, iov[i].iov_len); s->sbuf.off += iov[i].iov_len; } } ssize_t tnt_io_sendv(struct tnt_stream_net *s, struct iovec *iov, int count) { if (s->sbuf.buf == NULL) return tnt_io_sendv_raw(s, iov, count, 1); size_t size = 0; int i; for (i = 0 ; i < count ; i++) size += iov[i].iov_len; if (size > s->sbuf.size) { s->error = TNT_EBIG; return -1; } if ((s->sbuf.off + size) <= s->sbuf.size) { tnt_io_sendv_put(s, iov, count); return size; } ssize_t r = tnt_io_send_raw(s, s->sbuf.buf, s->sbuf.off, 1); if (r == -1) return -1; s->sbuf.off = 0; tnt_io_sendv_put(s, iov, count); return size; } ssize_t tnt_io_recv_raw(struct tnt_stream_net *s, char *buf, size_t size, int all) { size_t off = 0; do { ssize_t r; if (s->rbuf.tx) { r = s->rbuf.tx(s->rbuf.buf, buf + off, size - off); } else { do { r = recv(s->fd, buf + off, size - off, 0); } while (r == -1 && (errno == EINTR)); } if (r <= 0) { s->error = TNT_ESYSTEM; s->errno_ = errno; return -1; } off += r; } while (off != size && all); return off; } ssize_t tnt_io_recv(struct tnt_stream_net *s, char *buf, size_t size) { if (s->rbuf.buf == NULL) return tnt_io_recv_raw(s, buf, size, 1); size_t lv, rv, off = 0, left = size; while (1) { if ((s->rbuf.off + left) <= s->rbuf.top) { memcpy(buf + off, s->rbuf.buf + s->rbuf.off, left); s->rbuf.off += left; return size; } lv = s->rbuf.top - s->rbuf.off; rv = left - lv; if (lv) { memcpy(buf + off, s->rbuf.buf + s->rbuf.off, lv); off += lv; } s->rbuf.off = 0; ssize_t top = tnt_io_recv_raw(s, s->rbuf.buf, s->rbuf.size, 0); if (top <= 0) { s->errno_ = errno; s->error = TNT_ESYSTEM; return -1; } s->rbuf.top = top; if (rv <= s->rbuf.top) { memcpy(buf + off, s->rbuf.buf, rv); s->rbuf.off = rv; return size; } left -= lv; } return -1; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/tnt_iob.c0000664000000000000000000000365312202131537021315 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include int tnt_iob_init(struct tnt_iob *iob, size_t size, tnt_iob_tx_t tx, tnt_iob_txv_t txv, void *ptr) { iob->tx = tx; iob->txv = txv; iob->ptr = ptr; iob->size = size; iob->off = 0; iob->top = 0; iob->buf = NULL; if (size > 0) { iob->buf = tnt_mem_alloc(size); if (iob->buf == NULL) return -1; memset(iob->buf, 0, size); } return 0; } void tnt_iob_free(struct tnt_iob *iob) { if (iob->buf) tnt_mem_free(iob->buf); } tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/libtarantoolnet.so0000777000000000000000000000000012213333050027142 2libtarantoolnet.so.1ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/libtarantoolnet.so.10000777000000000000000000000000012213333050027440 2libtarantoolnet.so.1.1ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/libtarantoolnet.so.1.10000775000000000000000000013071412213333050023553 0ustar rootrootELF>@8@8@$!<< @@ @  @@ @ $$PtdT5T5T5DDQtdGNUz^`QBvwSR)^#@ !;@1di.#$&)+,-0267:;>N'oі ZDaDqX|˪]BE<95 #CrR*)~Z2}*+k1m&#`XN'AEpb  + S|  -[ =2 L"E !M 4E 1 3v e Pv Y sD E  $D d h3& N)L = /1 u()6  `4 N 2tn 3u 3  #Go Z B3&= 0 % (] (f f__gmon_start___fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassestnt_iob_inittnt_mem_allocmemsettnt_iob_freetnt_mem_freehtonsgetaddrinfomemcpyfreeaddrinfo_Unwind_Resume__gcc_personality_v0fcntl__errno_locationgettimeofdayselectgetsockoptsetsockopttnt_io_connectsockettnt_io_closetnt_io_flushtnt_io_send_rawtnt_io_sendv_rawwritevtnt_io_sendtnt_io_sendvtnt_io_recv_rawtnt_io_recvtnt_opt_inittnt_opt_freetnt_opt_settnt_mem_duptnt_reply_fromtnt_request_fromtnt_nettnt_stream_inittnt_stream_freetnt_settnt_inittnt_connecttnt_closetnt_flushtnt_fdtnt_errortnt_strerrorsnprintftnt_errnolibtarantool.so.1libgcc_s.so.1libc.so.6_edata__bss_start_endlibtarantoolnet.so.1/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt:GCC_3.0GCC_3.3.1GLIBC_2.14GLIBC_2.2.50P&y Ba_& JTui _@ `@  C C C 4C 4D 4D 4(D 48D 4HD  5XD $5hD 65B  B (B 0B 8B C XB 0`B hB pB 2xB 3B B B #B B B  B >B  B  B  B )B  B B ?B B C C C :C  C '(C 0C 8C 8@C 9HC <PC XC =`C /hC pC xC C C C C  C ,C !C "HHU/ HtH5b/ %d/ @%b/ h%Z/ h%R/ h%J/ h%B/ h%:/ h%2/ h%*/ hp%"/ h`%/ h P%/ h @% / h 0%/ h %. h %. h%. h%. h%. h%. h%. h%. h%. h%. h%. hp%. h`%. hP%. h@%. h0%. h %z. h%r. h%j. h%b. h %Z. h!%R. h"%J. h#%B. h$%:. h%%2. h&%*. h'p%". h(`%. h)P%. h*@% . h+0H. H=. UH)HHw]HD, Ht]@H. H=. UH)HHHH?HHHu]H, Ht]@=Y. u'H=, UHt H=- h]0. fffff.H=) tH+ HtUH=) H]WRUHH0H}HuHUHMLEHEHUHP HEHUHP(HEHUHP0HEHUHPHEH@HEH@HEHH}tAHEH.HHEHHEHHuHEHHUHUHHH}HEHHtHEHHÐUHH0H}HufEHEH\HEfE܉HUfBHEHUHEHѺH;u7HEH@HHHEHHHHEHwHEHt HEH[H UHH H}uHE@|ǸE}uHE艐S}t MeHE@|UǸuGHE艐UHATSH0HHHHEHHTE}tEGHHE}tE"HEHH@|HΉsHE@BHH@HEHEHEH0uFHHHPHUH@HEHHHHADeԉ]H@|P?HHcHHR|ʃ?)ʿHHHH HHH@|xHUHIйH¾Ẽ}ZtN H`Hu%HxH`HEHH)HHEHhHUHH)HHHEHEHUHH)HHEH} HEHH?H}HEHEHH?H}HHEm~H}u Dž|DžxH@|HxH|IHѺRt |tH|u |HBH'HHE}tE HH0[A\]UHH H}uUE}uE@EEEUEHE@|HMUAu EE EEE;E~UHH H}EHE@|HUAHѺ!HEPXHEH$HEPpHEH HEHP0HE@|AHѺt8HEHP HE@|AHѺt HE艐UHH0H}HuUܺoHUB|HE@|yHE艐YHEHE}u1UHMHEHH]E}uHE@xHEH?EUHHH}HE@|~HE@|UHE@|HE@xUHH H}HEHHuNHEHHEHHEHHEH}u HHEHǀHEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|HEH}u tH}(HEǀHE艐H HEHEHEH;Et }&HEUHH0H}HuU܉MHEHEHHt5HEH}NUHMHHuHHE/HE@|UHMHΉ[HEH}u tH}+HEǀHE艐HHEHE}ucqHEHPHEH9v.HEHHEHHEHHEHPHEH)HEHP(HUHEH@HH)HHEHEm}}HEUHH0H}HuHUHEHHuHUHuHEH HEHH;EsHEǀHHEHHEHHEHH9wPHEHHEHH HUHEHHHEHHEHHEHHElHEHHEHHEHUHEH}u H1HEHUHHEHHUHMHHHEUHH0H}HuUEEHHHHEHHPEHHHHEHHHMHHMHHHHHEHEHHHHEHH@HHEHEE;EoUHH@H}HuЉUHEHHuUHuHEعHHEEEHHHHEHH@HEEE;E|HEHH;EsHEǀHHEHHEHHEHH9wUHMHEHHsHEdHEHHEHHEعHTHEH}u H)HEHǀUHMHEHH HEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|nHEH}u ntH}(HEǀMHE艐H HEHEHEH;Et }&HEUHHPH}HuHUHEHHuHUHuHEȹHIHEHEHEHEHHEHHEHH9w[HEHHEHH4HEHUH HEHHHEHHEHHEHHELHEHHEHHH)HHEHEHUHH)HHEH}t=HEHHEHH4HEHUH HEHHSHEHEHEHǀHEHHEHHEȹHHEH}(HEȉHEǀHgHUHEHHEHH;Er:HEHHUHMHHUHHHEHUHHE HEH)E7ÐUHHH}HExHHE@;HE@p@HE@X@HEH@HEH@UHHH}HEHHtHEHHUHH0H}uHU؃} EHH HcH HHEHHtHEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHH%HHEHHEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHHHEHHd4HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH HEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH0HEHHXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP@HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPPVHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP`HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPhYHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPpUHH H}HEH@HHEHEH`HEHH`HEHHNHEHbHEH@HHHEH@HUHH0H}HuHUHEH@HHEHUHMHEHHUHH0H}HuHUHEH@HHEHUHMHEHHHEH}tHE@PPHEPPHEUHH0H}HuUHEH@HHEUHMHEHH HEH}tHE@PPHEPPHEUHHH}HuHEPhHEHHpHEHH{UHH0H}HuHUHEH@HHEHUHMHEHHUHHH}HuHE@Pu(HE@PPHEPPHUHEH5HUHHH}HuHUHEH5WHUHH H}H}EHEHbHEH}u SHHEHPHHEH@HHu}t HEHHEH@HHHEHHP HEHHP(HEHHP0HEH@8HEHHPHEHHPHEH(HPHEHHP@HEH@HHEHE@|HEHHEUHHH(H`HhLpLxt )E)M)U)])e)m)u)}$H(H@HHHDž0Dž40HEH8HPH@$HHH0HHHHHuHUHH H}HEH@HHEHEHpPHEH@HHHEH@@HHE@XHH}HIHuHEǀHEHHhHEH@`HHE@pHHuHIȹHTuHEǀFHEHHuHEǀ%HE@uHEǀUHH H}HEH@HHEHE@xt HEHcHEPHEHHEHHHEHEtUHH H}HEH@HHEHEHUHH H}HEH@HHEHEHTUHH}HEH@HHEHE@|]UHH}HEH@HHEHE]UHSH(H}HEH@HHEHE苀uGHE苘HE苀2AHH(H=y Hh HE苀HHHH HDH([]UHH}HEH@HHEHE]HHS7--okfailmemory allocation failedsystem errorbuffer is too bigbad buffer sizegethostbyname(2) failedoperation timeoutbad argument%s (errno: %d);@'\<$ ,@Ttba4T`t!J4Ttq&T4Tr|z:Ww< dzRx $(FJ w?;*3$"DAC  dN)AC d zPLRx  $$8AC  AC  $l[YAC J AC ~ 4GAC  TAC  t=AC x sAC n AC  PAC K %MAC H RAC  4GAC B T AC  tAC  ]AC X %)AC d .AC  pAC k ,9AC t 4EYAC T T~WAC R t0AC k 9AC t LAC G  .AC i 1AC , $)KAC  <AC  \tAC o |*&AC a 0&AC a 6AC X 3 AC [ $3AC E $ AC [  h<[ `   4@ @ o k @B    o oo o @ &6FVfv&6FVfv&6FVfvC 444444 5$565 GCC: (Debian 4.7.3-4) 4.7.3,,Hx,(T,l-DTw)8intn>0&i9(my+ `-w# .-#G!  w -`"  : w ?8$ buf%# off&-# top'-#  (-# tx)# txv*#( ptr+w#0 *?Niob*h *-`tx+Xtxv,Pptr,wH:?Nw`iob?h| Tx()8intn>0i i&iBT9(mi  w# !#6i @% E%# 5 pK+p `-# .-#D! 2s#  ^  MZ # z#  p G V  # ) 7# N M#  h# 1M 3T 7Q"NI |!)j+=,./2_3.:V;<<U2k `\ gO h W B# Fx p0 7u 9?#c :?# ;?# <?#  =p# > # ?#  @#(xx 0  1# - 2?#  3#  4#  5#0  6#@ @ 7#H  8#P  9?#X I :#` ( ;#h b ?#| L?# @# A}# )B?#c9}xF9VX:P-:ML?hL}F sLXsetL?TxM?lD^}Ws^}r^}-^?}a5b}\:nWPoHQqmw~opt?~lenp~fdsz5}ret}?!w{?D|{?@w~}sXopt?Tmin?Pmax?lavgTh } @ sXopt?l}  sXrԹP-?L5}lout . shf` sXrchfe z sXbufP -Hall?Doff-hK !r`"|e !  #sX#iovP$?L#all?H%-h !!r`"7!#j #s7X#buf7P$ 7-H!rDh&kM## #sMX#iovMP$M?L!iN?l"X#$@B #sXH#iovX@$X?% \-h!i]?d!rhX"4q$% #sqX#bufqP$ q-H#allq?D!offs-h%%!ru`'%(#s#buf$ -!lv-X!rv-P!off-h%0-`L&(!topH0Ty(l-intn>0^ ^9 l#!w# I#I##m# !b     8   $ K i  \ x01#-24#3# 4# 5#06#@@7#H8#P94#XI :#`(;#hb<4#p .` ~ ;  E     i  \+(u(` opt+hb {6u(( opt6h =4(l- ' opt=X= T='Htvp?-hT l-4O)8intn>0i i&i9(m  w# !# (  pT T# T# # m# Ok 0F 3T / ; 0j# len 1j# 2j#i  5 ns 6j# x 7j#  : ns ;j#  > ns ?j# x @j#  C> ns Dj# x Ej#w  HY x Ij#e  L ns Mj# Nj#  Oj# + Pj#  # $j# } %#  &-# '?#  4 ptr 5#  8: # 9:#  :j# ;?#  +i ` -# .-#s $tz  ( & h '# t (#j ( + h ,# t -# ( 0 h 1# t 2#9 5c op 6_# 7j# 8c# 9j#  :j# } ;# s pJ H > h ?# t @# ops A#( Bj#0 opv C#8 opc Dj#@, @ G3 h H># Ic# = Jj# N K# # Lj# t M#  PX h QY# l R#H Yt Z [del \ ]p ^3 _s x U B V# W-# h Xu# r `X# vc a?#h v b#p@- !t 0#n op$j# %j# I &j# '# (# )j#(( X&# '?# (C# )c# W *#  +# ,#( ^ -#0 S .#8 / #@ }0#H  1j#P 2j#T ==-n# c=?I ~=~i =- ?= ?=~ ?= =x0 1# -2?# 3# 4# 5#0 6#@ @7#H 8#P 9?#X I :#` (;#h b?#| L? # @ # A # )B?#[  s ;  #e  #{ (l-- s(=Xsn) h  3-. s3=Xbuf3P 3-Hsn4 h :.n.@w s:=Xbuf:P :-Hsn; hrc<` Cn.. sC=XiovCPC?LsnD hrcE`O L..  sL=hrL~`A Q../` x sQ=XbufQP QHsnR h W?./z/  sW=hrW`1 _?z//  s_=hr_~` o=/0 B so=X p?lsn ` ?01  s=~opt?~sn ~T~ ?12@  s=Xsn h] ?2B3 #s=Xsnˮ hQ B3h3 _s=Xsnޮ h h33` s=Xsn h  ?33 s=Xsn h! 33 ""s=X#sn h$ $3`4 "s$=H#sn% X%3:4#msg' D  p! 6?`44 "s6=X#sn7 h G  p &3  C % : ; I$ > $ >   I&I : ;  : ; I8 ' I I : ; I8 .? : ; ' I@B : ; I : ; I .? : ; ' @B % : ; I$ > $ >   I&I : ;  : ; I8  : ;  I !I/  : ; (  : ;  : ; : ;I8 ' II : ; I8 .: ; ' I@B : ; I 4: ; I : ; I  4: ; I  U  : ; .? : ; ' I@B  : ;  .? : ; ' @B !4: ;I ".? : ;' I@B #: ;I $: ;I %4: ;I &.: ;' @B '.? : ;' I@B % $ > $ > : ; I  I : ;  : ; I8  : ;  ( .? : ; ' @B  : ; I .? : ; ' I@B : ; I 4: ; I % : ; I$ > $ >   I&I : ;  : ; I8 I !I/ : ; I8 ' II : ;  : ; I : ; I'  : ; (  : ; : ;I8 .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I .? : ; ' I@B 4: ; I .? : ; ' @B  .? : ; ' I@B !.? : ;' I@B ": ;I #4: ;I $.? : ;' I@B % &4: ;I n /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iob.cstddef.htypes.htypes.huio.htnt_iob.h ,uYuvY27  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/netinet/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_io.cstddef.htypes.htypes.htime.hselect.huio.hsocket.hsockaddr.hin.hstdint.hnetdb.htnt_opt.htnt_iob.hsocket_type.htnt_net.h x:YY/wv0gvguvY2""ggg)?Y=i'V0=;vKv/pX vX=h4fw=yggY!uguu/$Y0u.uw&&utC?#Y2/vhho?$=1׮0u+uK2g>.0uK2YZ50ug0Kg0YxJofK2=׼"-h+uK10,KW$0J2/J׼"Yh+uYK2g>.0uK2="5#Ku5+uד%hZp' /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_opt.ctypes.htime.htnt_opt.htnt_net.h (+Y220.$,$Z$Z$Z$Z$"Z$"Z$"Z$Z$"Z$"0$0Zt( Y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_net.cstddef.htypes.htypes.htime.hstdarg.hstdio.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_opt.htnt_iob.htnt_net.h l-'!1=g1=uK1/uK11=g1ug1 .uKg滭K .2&"--t .IK/סI8vvvY .)uY . . .u ..ɻIgI0 tiov_len/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_iob.ctnt_iob_txv_tshort unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnettnt_iob_inittnt_iobunsigned chariovecshort inttnt_iob_freelong long unsigned int__ssize_tsizetypelong long inttnt_iob_tx_tGNU C 4.7.3iov_baseTNT_EBADVALai_flagsTNT_EOKIPPROTO_MTPIPPROTO_PIMaddrinfotnt_stream_netSOCK_NONBLOCKIPPROTO_ENCAPIPPROTO_IGMPin_addr_tsend_cb_argrbufIPPROTO_RSVPIPPROTO_UDPTNT_LASTtnt_io_sendrecv_cb_argtnt_io_recv_rawtnt_io_connect_doIPPROTO_NONEai_familytmoutSOCK_STREAMuint16_tIPPROTO_DCCPsockaddr_inTNT_ESIZEcountsend_bufsend_cbsin_zeroIPPROTO_COMPTNT_EMEMORYSOCK_RDMfd_setai_socktypeIPPROTO_ESPtmout_recvTNT_EBIG__suseconds_tIPPROTO_ICMPV6IPPROTO_FRAGMENTsin_addrs_addrSOCK_CLOEXECtnt_io_sendv_puttnt_io_sendv_rawIPPROTO_TPtimevalIPPROTO_IPV6sin_familypassd_usectnt_io_connectin_port_ttv_secIPPROTO_TCPai_protocolIPPROTO_MAXSOCK_DCCPTNT_ERESOLVEai_addrlensin_port__socket_typesend_cbvIPPROTO_PUPIPPROTO_SCTPrecv_bufIPPROTO_RAWcurrIPPROTO_IDPtmout_send__fd_maskai_addraddr_infosa_familytnt_optai_next__time_ttnt_io_flushtmout_connectSOCK_PACKETtmout_usecmicrotnt_io_setoptsuint32_tIPPROTO_HOPOPTSIPPROTO_UDPLITE__socklen_tIPPROTO_EGPsockaddrtnt_io_resolvehost__d0__d1tnt_errorTNT_ETMOUTIPPROTO_ICMPtnt_io_send_rawIPPROTO_GREtnt_io_nonblocktnt_io_xbufmaxtotalconnectedtv_usecsa_family_ttnt_io_recvfds_bitscurr_tmeoutSOCK_DGRAMtnt_io_closeTNT_EFAILTNT_ESYSTEMstart_connectIPPROTO_AHIPPROTO_ROUTINGsa_dataIPPROTO_IPIPhostnameSOCK_RAWai_canonname/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_io.cint64_tSOCK_SEQPACKETtnt_io_sendverrno_leftresultIPPROTO_DSTOPTSsbufIPPROTO_IPtnt_opt_initTNT_OPT_RECV_CB/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_opt.cargsTNT_OPT_TMOUT_CONNECTTNT_OPT_TMOUT_RECVfp_offsetTNT_OPT_SEND_CBVgp_offsetTNT_OPT_SEND_CB_ARGTNT_OPT_TMOUT_SENDTNT_OPT_SEND_BUFTNT_OPT_RECV_BUFreg_save_areatnt_opt_freetnt_opt_typeTNT_OPT_HOSTNAMEoverflow_arg_areatnt_opt_setTNT_OPT_RECV_CB_ARGTNT_OPT_SEND_CBTNT_OPT_PORT__va_list_tagtnt_header_deletetnt_tupletnt_requestlimittnt_net_requesttnt_net_recv_cbtnt_closetnt_error_desctnt_request_delete_1_3tuplesreqidtnt_inittnt_header_updatefieldindextnt_flushtnt_strerrortnt_net_replytnt_request_insertdel_1_3read_replyorigin_sizetnt_net_read__gnuc_va_listtnt_streamtnt_error_listorigincodeprocread_tupleread_requestuint8_ttnt_request_ttnt_headertnt_request_deletetnt_list_ptrtnt_header_delete_1_3tnt_errnoproc_enctnt_replysize_enc_lentnt_listsize_encalloctnt_net_writevallocatedwrcntproc_lentnt_request_callproc_enc_lentnt_request_updatetnt_connecttnt_header_inserttnt_net_freeops_sizetnt_nettnt_fdtnt_setcardinalitytnt_net_writetnt_request_select/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_net.ctnt_reply_ttnt_request_update_optnt_net_write_requesttnt_header_selecttnt_header_callwwvwwwvwwwvwwwjvjkwklwlowovww w vwwwvwww=v=>w>?w?BwBzvz{w{|w|wvwwwvwww< v< = w= > w> A wA v w w w ; v; < w< = w= @ w@ v w w w vwwwvwww\v\]w]^w^awavwwwSvSTwwwovopwpqwqtwtvwwwvwwwXvXYwYZwZ]w]vwwwvwww v www;v;<w<=w=@w@lvlmwmnwnqwqYvYZwZ[w[^w^avabwbcwcfwfvwwwvwww!v!"w"#w#&w&>v>?w?@w@CwC^v^_w_`w`cwcvwwwvwC.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges$.o8 @kHo Uo `d n  xs~44 44T5T5D66D;;7@ @@ @@ @@ @B B(@B @BxC C D D  0DD\E#_h1-nR 90y Di@O0ٔ]8` #F 4       4 4T56;@ @ @ @ B @B C D   @  . A WD f@  `@  x F     #+5? l-pL -9Y .Yg n.Wv .0 .9 ./L z/.C D ;@ C C @ D *@B @ =M 3Zl u()   !M D % 4+8 (DWi 3 s s f h3& `4 0 B3&: 3A 2tM \ 0d e Pu /1 #G E D  %  (] , N)9N h 1"  $ crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrytnt_iob.ctnt_io.ctnt_io_resolvetnt_io_nonblocktnt_io_connect_dotnt_io_xbufmaxtnt_io_setoptstnt_io_sendv_puttnt_opt.ctnt_net.ctnt_net_freetnt_net_readtnt_net_writetnt_net_writevtnt_net_write_requesttnt_net_recv_cbtnt_net_replytnt_net_requesttnt_error_listmsg.3723__FRAME_END____JCR_END__DW.ref.__gcc_personality_v0__dso_handle_DYNAMIC__TMC_END___GLOBAL_OFFSET_TABLE_tnt_io_closetnt_strerrorrecv@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5tnt_opt_free_ITM_deregisterTMCloneTabletnt_io_connectwritev@@GLIBC_2.2.5tnt_request_fromtnt_io_sendsetsockopt@@GLIBC_2.2.5fcntl@@GLIBC_2.2.5_edata_finitnt_mem_freetnt_opt_sethtons@@GLIBC_2.2.5send@@GLIBC_2.2.5tnt_errorsnprintf@@GLIBC_2.2.5tnt_io_flushgettimeofday@@GLIBC_2.2.5memset@@GLIBC_2.2.5tnt_io_send_rawtnt_reply_fromtnt_flushclose@@GLIBC_2.2.5tnt_mem_alloctnt_errnogetsockopt@@GLIBC_2.2.5tnt_closetnt_fdtnt_connect__gmon_start__tnt_settnt_io_sendv_rawmemcpy@@GLIBC_2.14select@@GLIBC_2.2.5tnt_nettnt_io_sendv__gcc_personality_v0@@GCC_3.3.1tnt_iob_init_end__bss_starttnt_io_recvtnt_stream_freetnt_opt_init_Jv_RegisterClassestnt_iob_freeconnect@@GLIBC_2.2.5_ITM_registerTMCloneTablegetaddrinfo@@GLIBC_2.2.5tnt_stream_initstrerror@@GLIBC_2.2.5tnt_init_Unwind_Resume@@GCC_3.0__cxa_finalize@@GLIBC_2.2.5_inittnt_mem_duptnt_io_recv_rawfreeaddrinfo@@GLIBC_2.2.5socket@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/tnt_opt.c0000664000000000000000000000615512202131537021346 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include void tnt_opt_init(struct tnt_opt *opt) { memset(opt, 0, sizeof(struct tnt_opt)); opt->port = 15312; opt->recv_buf = 16384; opt->send_buf = 16384; opt->tmout_connect.tv_sec = 16; opt->tmout_connect.tv_usec = 0; } void tnt_opt_free(struct tnt_opt *opt) { if (opt->hostname) tnt_mem_free(opt->hostname); } int tnt_opt_set(struct tnt_opt *opt, enum tnt_opt_type name, va_list args) { struct timeval *tvp; switch (name) { case TNT_OPT_HOSTNAME: if (opt->hostname) tnt_mem_free(opt->hostname); opt->hostname = tnt_mem_dup(va_arg(args, char*)); if (opt->hostname == NULL) return TNT_EMEMORY; break; case TNT_OPT_PORT: opt->port = va_arg(args, int); break; case TNT_OPT_TMOUT_CONNECT: tvp = va_arg(args, struct timeval*); memcpy(&opt->tmout_connect, tvp, sizeof(struct timeval)); break; case TNT_OPT_TMOUT_RECV: tvp = va_arg(args, struct timeval*); memcpy(&opt->tmout_recv, tvp, sizeof(struct timeval)); break; case TNT_OPT_TMOUT_SEND: tvp = va_arg(args, struct timeval*); memcpy(&opt->tmout_send, tvp, sizeof(struct timeval)); break; case TNT_OPT_SEND_CB: opt->send_cb = va_arg(args, void*); break; case TNT_OPT_SEND_CBV: opt->send_cbv = va_arg(args, void*); break; case TNT_OPT_SEND_CB_ARG: opt->send_cb_arg = va_arg(args, void*); break; case TNT_OPT_SEND_BUF: opt->send_buf = va_arg(args, int); break; case TNT_OPT_RECV_CB: opt->recv_cb = va_arg(args, void*); break; case TNT_OPT_RECV_CB_ARG: opt->recv_cb_arg = va_arg(args, void*); break; case TNT_OPT_RECV_BUF: opt->recv_buf = va_arg(args, int); break; default: return TNT_EFAIL; } return TNT_EOK; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/libtarantoolnet.a0000664000000000000000000017251012213333044023054 0ustar rootroot! / 1378727460 0 0 0 388 ` TTTTTTTTTw0w0w04444444444tnt_iob_inittnt_iob_freetnt_io_connecttnt_io_closetnt_io_flushtnt_io_send_rawtnt_io_sendv_rawtnt_io_sendtnt_io_sendvtnt_io_recv_rawtnt_io_recvtnt_opt_inittnt_opt_freetnt_opt_settnt_nettnt_settnt_inittnt_connecttnt_closetnt_flushtnt_fdtnt_errortnt_strerrortnt_errnotnt_iob.c.o/ 1378727459 1000 1000 100664 5456 ` ELF> @@UHH0H}HuHUHMLEHEHUHP HEHUHP(HEHUHP0HEHUHPHEH@HEH@HEHH}tAHEHHHEHHEHHuHEHHUHUHHH}HEHHtHEHHD8intimy+ -w# .-#!  w -"  : w ?8$ buf%# off&-# top'-# (-# tx)# txv*#( ptr+w#0 *?iob*h*-`tx+Xtxv,Pptr,wH:?iob?h% : ; I$ > $ >   I&I : ;  : ; I8 ' I I : ; I8 .? : ; ' I@B : ; I : ; I .? : ; ' @B wwvwwwvw,n /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iob.cstddef.htypes.htypes.huio.htnt_iob.h ,uYuvY2size_tiov_len/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_iob.ctnt_iob_txv_tshort unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnettnt_iob_initssize_ttnt_ioblong unsigned intunsigned chariovecshort inttnt_iob_freeunsigned intlong long unsigned int__ssize_tsizetypelong long intchartnt_iob_tx_tGNU C 4.7.3iov_baselong intsigned charsizeGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <)AC d .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @H&(,(6(H1`xBpPO`0[0 t?o 00X 0  G    &-):tnt_iob.ctnt_iob_inittnt_mem_allocmemsettnt_iob_freetnt_mem_free~    !) . ; I P uW 0^ e l s ^z T u g =    z g; q     ##+3 ` { @tnt_io.c.o/ 1378727460 1000 1000 100664 24480 ` ELF>5@@UHH0H}HufEHEHHEfE܉HUfBHEHUHEHѺHu7HEH@HHHEHHHHEHHEHt HEHHUHH H}uHE@|ǸE}uHE艐S}t MeHE@|UǸuHE艐UHATSH0HHHHEHHTE}tEGHHE}tE"HEHH@|HΉsHE@BHH@HEHEHEHuHHHPHUH@HEHHHHADeԉ]H@|P?HHcHHR|ʃ?)ʿHHHH HHH@|xHUHIйH¾Ẽ}t H`HuHxH`HEHH)HHEHhHUHH)HHHEHEHUHH)HHEH} HEHH?H}HEHEHH?H}HHEmH}u Dž|DžxH@|HxH|IHѺt |tH|u |HBH'HHE}tE HH0[A\]UHH H}uUE}uE@EEEUEHE@|HMUAu EE EEE;E~UHH H}EHE@|HUAHѺHEPXHEH$HEPpHEH HEHP0HE@|AHѺt8HEHP HE@|AHѺt HE艐UHH0H}HuUܺHUB|HE@|yHE艐YHEHE}u1UHMHEHH]E}uHE@xHEHEUHHH}HE@|~HE@|HE@|HE@xUHH H}HEHHuNHEHHEHHEHHEH}u HHEHǀHEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|HEH}u tH}(HEǀHE艐H HEHEHEH;Et }&HEUHH0H}HuU܉MHEHEHHt5HEH}NUHMHHuHHE/HE@|UHMHΉHEH}u tH}+HEǀHE艐HHEHE}ucqHEHPHEH9v.HEHHEHHEHHEHPHEH)HEHP(HUHEH@HH)HHEHEm}}HEUHH0H}HuHUHEHHuHUHuHEH HEHH;EsHEǀHHEHHEHHEHH9wPHEHHEHH HUHEHHHEHHEHHEHHElHEHHEHHEHHEH}u H1HEHUHHEHHUHMHHHEUHH0H}HuUEEHHHHEHHPEHHHHEHHHMHHMHHHHHEHEHHHHEHH@HHEHEE;EoUHH@H}HuЉUHEHHuUHuHEعHHEEEHHHHEHH@HEEE;E|HEHH;EsHEǀHHEHHEHHEHH9wUHMHEHHsHEdHEHHEHHEعHHEH}u H)HEHǀUHMHEHH HEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|HEH}u tH}(HEǀHE艐H HEHEHEH;Et }&HEUHHPH}HuHUHEHHuHUHuHEȹHHEHEHEHEHHEHHEHH9w[HEHHEHH4HEHUH HEHHHEHHEHHEHHELHEHHEHHH)HHEHEHUHH)HHEH}t=HEHHEHH4HEHUH HEHHHEHEHEHǀHEHHEHHEȹHHEH}(HEȉHEǀHgHUHEHHEHH;Er:HEHHUHMHHUHHHEHUHHE HEH)E7 h<[| 8intiiiTmi  w# !#6i @% E%# 5 pK+p -# .-#!    M # #  p G V # 7# M# h# 1M 3T 7 !)+,./23:;< `\ g h B# Fx p0 7 9?# :?# ;?# <?#  =p# > # ?#  @#(xx 0 1# 2?# 3# 4# 5#0 6#@ 7#H 8#P 9?#X :#` ;#h ?#| ?# @# A}# B?#9}9VX:P:ML?hL}sLXsetL?TM?l^}Ws^}^}^?}ab}\nWPoHqw~opt?~lenp~fdsz5}ret}?{?D{?@~}sXopt?Tmin?Pmax?lavgTh} sXopt?l} sXԹP?L}lout  sh sXrchz sXbufP-Hall?Doff-h!r`" #sX#iovP$?L#all?H%-h!r`"7j #s7X#buf7P$7-H!rDh&M #sMX#iovMP$M?L!iN?l"XB #sXH#iovX@$X?%\-h!i]?d!rhX"q #sqX#bufqP$q-H#allq?D!offs-h!ru`'#s#buf$-!lv-X!rv-P!off-h%-`!topH% : ; I$ > $ >   I&I : ;  : ; I8  : ;  I !I/  : ; (  : ;  : ; : ;I8 ' II : ; I8 .: ; ' I@B : ; I 4: ; I : ; I  4: ; I  U  : ; .? : ; ' I@B  : ;  .? : ; ' @B !4: ;I ".? : ;' I@B #: ;I $: ;I %4: ;I &.: ;' @B '.? : ;' I@B wwvwwwjvjkwklwlowovww w vwwwvwww=v=>w>?w?BwBzvz{w{|w|wvwwwvwww< v< = w= > w> A wA v w w w ; v; < w< = w= @ w@ v w w w vwwwvw,C7  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/netinet/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_io.cstddef.htypes.htypes.htime.hselect.huio.hsocket.hsockaddr.hin.hstdint.hnetdb.htnt_opt.htnt_iob.hsocket_type.htnt_net.h :YY/wv0gvguvY2""ggg)?Y=i'V0=;vKv/pX vX=h4fw=yggY!uguu/$Y0u.uw&&utC?#Y2/vhho?$=1׮0u+uK2g>.0uK2YZ50ug0Kg0YxJofK2=׼"-h+uK10,KW$0J2/J׼"Yh+uYK2g>.0uK2="5#Ku5+uד%hZTNT_EBADVALai_flagsTNT_EOKsize_tIPPROTO_MTPIPPROTO_PIMaddrinfotnt_stream_netssize_tSOCK_NONBLOCKIPPROTO_ENCAPIPPROTO_IGMPin_addr_taddrsend_cb_argrbufsocklen_tIPPROTO_RSVPlong long intsigned charIPPROTO_UDPsizelong long unsigned intTNT_LASTtnt_io_sendrecv_cb_arglong inttnt_io_recv_rawtnt_iob_tx_ttnt_io_connect_doIPPROTO_NONEai_family__ssize_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnettmoutSOCK_STREAMuint16_tIPPROTO_DCCPsockaddr_inTNT_ESIZEcountsend_bufsend_cbsin_zeroIPPROTO_COMPTNT_EMEMORYSOCK_RDMfd_setunsigned intai_socktypeIPPROTO_ESPtmout_recvtnt_iob_txv_tTNT_EBIG__suseconds_tiovecIPPROTO_ICMPV6IPPROTO_FRAGMENTsin_addrs_addrSOCK_CLOEXECtnt_io_sendv_puttnt_io_sendv_rawIPPROTO_TPtimevalIPPROTO_IPV6iov_baseiov_lensin_familysizetypeportpassd_usectnt_io_connectin_port_ttv_secIPPROTO_TCPai_protocolIPPROTO_MAXin_addrGNU C 4.7.3SOCK_DCCPTNT_ERESOLVEai_addrlensin_porterror__socket_typesend_cbvIPPROTO_PUPIPPROTO_SCTPrecv_bufunsigned charIPPROTO_RAWcurrIPPROTO_IDPtmout_send__fd_maskai_addrshort intaddr_infosa_familytnt_optai_next__time_ttnt_io_flushtmout_connectSOCK_PACKETtmout_usecmicrotnt_io_setoptsuint32_tIPPROTO_HOPOPTSIPPROTO_UDPLITElong unsigned intchar__socklen_tIPPROTO_EGPsockaddrtnt_io_resolvehost__d0__d1tnt_errorTNT_ETMOUTIPPROTO_ICMPshort unsigned inttnt_io_send_rawIPPROTO_GREtnt_io_nonblocktnt_io_xbufmaxtotalconnectedtv_usecsa_family_ttnt_io_recvfds_bitsrecv_cbcurr_tmeoutSOCK_DGRAMtnt_iobtnt_io_closeflagsTNT_EFAILTNT_ESYSTEMstart_connectIPPROTO_AHIPPROTO_ROUTINGsa_dataIPPROTO_IPIPhostnameSOCK_RAWai_canonname/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_io.cint64_tSOCK_SEQPACKETtnt_io_sendverrno_leftresultIPPROTO_DSTOPTSsbufIPPROTO_IPGCC: (Debian 4.7.3-4) 4.7.3zPLRx  $AC  zRx AC  $AC J dAC ~ AC  AC  =AC x sAC n AC  $PAC K DMAC H dAC  GAC B AC   AC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @AX&,1(H CFT:b rb&0m]0 &0&;] 0*g0d222(]4H; ? )k;JY     j>='-{s:JOP`g= Ms< G tnt_io.ctnt_io_resolvetnt_io_nonblocktnt_io_connect_dotnt_io_xbufmaxtnt_io_setoptstnt_io_sendv_put__gcc_personality_v0memsethtonsgetaddrinfomemcpyfreeaddrinfo_Unwind_Resumefcntl__errno_locationconnectgettimeofdayselectgetsockoptsetsockopttnt_io_connectsockettnt_io_closeclosetnt_io_flushtnt_io_send_rawsendtnt_io_sendv_rawwritevtnt_io_sendtnt_io_sendvtnt_io_recv_rawrecvtnt_io_recv(<iCM D N(!:Fe o" t##5#c#{%5&_')*i ,y  v ) ? )  s +@ )0&G/'/w   x!) . ;  I P W M^ e fl s Cx   n  $  T   u  T 6 FC H T 'b 0q |      =     \  < z   8, : H ] h { \  x x  | 0   =    u    f j  W G $ j  0 $ " ) ,0 8 kC N Z y <   d Z   ^     L- ; rI IW e s        8 } +F ~ c  F 1 P    m   E  W   ) 49 EDLT ^ l z L p k ` @ Ek  T, L; J @X`i w  \   Y ^U' 86 QE ] hpx      z \" * >2 H TV Ld @x - 3 > { @  {      1 [  c |   = `    -  =  ( N k s  { <    ' <    D (P  X `    h    @ O ;^ f   (1 dk  >,{Ll=  <  tnt_opt.c.o/ 1378727460 1000 1000 100664 9416 ` ELF>@@UHHH}HExHHE@;HE@p@HE@X@HEH@HEH@UHHH}HEHHtHEHHUHH0H}uHU؃} EHHEHHtHEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHHHEHHEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHHHEHH4HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH HEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH0HEHHXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP@HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPPVHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP`HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPhYHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPp0int^^ l#!w# I#I### !b         x01#24#3#4# 5#06#@7#H8#P94#X:#`;#h<4#p .`         + opt+hb 6 opt6h =4' opt=X= T='Htvp?-h% $ > $ > : ; I  I : ;  : ; I8  : ;  ( .? : ; ' @B  : ; I .? : ; ' I@B : ; I 4: ; I ww\v\]w]^w^awavwww<v<=w,=o' /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_opt.ctypes.htime.htnt_opt.htnt_net.h +Y220h$,$Z$Z$Z$Z$"Z$"Z$"Z$Z$"Z$"0$0Zt( YTNT_ETMOUTtnt_optsend_cbtnt_opt_inittv_secshort intsend_cbvsizetypeTNT_EBIGTNT_OPT_RECV_CBtmout_connectTNT_EBADVAL/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_opt.cTNT_EMEMORYtnt_errorargsrecv_bufrecv_cbhostnameTNT_OPT_TMOUT_CONNECTsend_cb_arglong long intTNT_OPT_TMOUT_RECVlong intfp_offsetTNT_OPT_SEND_CBVunsigned chargp_offsetTNT_ESIZEnameTNT_OPT_SEND_CB_ARGTNT_EFAILTNT_OPT_TMOUT_SENDTNT_OPT_SEND_BUFsigned charlong long unsigned intTNT_EOKunsigned intTNT_OPT_RECV_BUFGNU C 4.7.3short unsigned intreg_save_areatmout_recvchartnt_opt_freetnt_opt_typeTNT_OPT_HOSTNAMEportlong unsigned inttmout_sendsend_bufTNT_LAST__time_toverflow_arg_arearecv_cb_argtimevaltnt_opt_settv_usecTNT_OPT_RECV_CB_ARGTNT_OPT_SEND_CB/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnetTNT_OPT_PORTTNT_ESYSTEM__suseconds_t__va_list_tagTNT_ERESOLVEGCC: (Debian 4.7.3-4) 4.7.3zRx ]AC X <)AC d \AC  .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @=&,6`1 C4>hO ] m 0h8$0 D s|h$ 0 0nx$H X     ]]),9EQtnt_opt.ctnt_opt_initmemsettnt_opt_freetnt_mem_freetnt_opt_settnt_mem_dupmemcpy g@ p(048@H4PX  $ ~ '!=) 0 > rE 0L S Z /a Nh Bm x  \ -  (     W  C n {  u& , ;2 8 > aD J P TV \ c o }  d Q   9 !      $ * 0 6 < KB H N T rZ b iq]y  a] ` =     4 @]`tnt_net.c.o/ 1378727460 1000 1000 100664 22744 ` ELF>/@@UHH H}HEH@HHEHEHHEHHHEHHHEHHEH@HHHEH@HUHH0H}HuHUHEH@HHEHUHMHEHHUHH0H}HuHUHEH@HHEHUHMHEHHHEH}tHE@PPHEPPHEUHH0H}HuUHEH@HHEUHMHEHHHEH}tHE@PPHEPPHEUHHH}HuHEPhHEHHpHEHH{UHH0H}HuHUHEH@HHEHUHMHEHHUHHH}HuHE@Pu&HE@PPHEPPHUHEHUHHH}HuHUHEHUHH H}H}EHEHHEH}u HHEHPHHEH@HHu}t HEHHEH@HHHEH@ HEH@(HEH@0HEH@8HEH@HEH@HEH@HEH@@HEH@HHEHE@|HEHHEUHHH(H`HhLpLxt )E)M)U)])e)m)u)}$H(H@HHHDž0Dž40HEH8HPH@$HHH0HHHHHuHUHH H}HEH@HHEHEHpPHEH@HHHEH@@HHE@XHH}HIHuHEǀHEHHhHEH@`HHE@pHHuHIȹHuHEǀFHEHHuHEǀ%HE@uHEǀUHH H}HEH@HHEHE@xt HEHHEPHEHHEHHHEHEtUHH H}HEH@HHEHEHUHH H}HEH@HHEHEHUHH}HEH@HHEHE@|]UHH}HEH@HHEHE]UHSH(H}HEH@HHEHE苀uAHE苘HE苀AHHE苀HHHH@H([]UHH}HEH@HHEHE]  okfailmemory allocation failedsystem errorbuffer is too bigbad buffer sizegethostbyname(2) failedoperation timeoutbad argument%s (errno: %d)8intiiim  w# !#(  pT T# T# # #O 0F 3T / 0j# len 1j# 2j# 5 ns 6j# 7j# : ns ;j# > ns ?j# @j# C> ns Dj# Ej# HY Ij# L ns Mj# Nj# Oj# Pj#  # $j# %# &-# '?# 4 ptr 5# 8: 9:# :j# ;?#  +i -# .-# $tz ( & h '# t (#( + h ,# t -#( 0 h 1# t 2# 5c op 6_# 7j# 8c# 9j# :j# ;# s pH > h ?# t @# ops A#( Bj#0 opv C#8 opc Dj#@@ G3 h H># Ic# Jj# K# Lj# t M#  PX h QY# l R#H Y Z [del \ ] ^3 _sx U V# W-# h Xu# r `X# vc a?#h v b#p@!t0#n op$j# %j# &j# '# (# )j#(X&# '?# (C# )c# *# +# ,#( -#0 .#8 / #@ 0#H 1j#P 2j#T ==-n# c=?I ~=~i =- ?= ?=~ ?= =x0 1# 2?# 3# 4# 5#0 6#@ 7#H 8#P 9?#X :#` ;#h ?#| ? # @ # A # B?# s   # #( s(=Xsn) h 3 s3=Xbuf3P3-Hsn4 h:w s:=Xbuf:P:-Hsn; hrc<`C sC=XiovCPC?LsnD hrcE`L sL=hrL~`Qx sQ=XbufQPQHsnR hW? sW=hrW`_? s_=hr_~`o=B so=Xp?lsn `? s=~opt?~sn ~T~? s=Xsn h?#s=Xsnˮ h_s=Xsnޮ hs=Xsn h ?s=Xsn h! ""s=X#sn h$$"s$=H#sn% X%#msg'   p!6?"s6=X#sn7 h G  p & % : ; I$ > $ >   I&I : ;  : ; I8 I !I/ : ; I8 ' II : ;  : ; I : ; I'  : ; (  : ; : ;I8 .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I .? : ; ' I@B 4: ; I .? : ; ' @B  .? : ; ' I@B !.? : ;' I@B ": ;I #4: ;I $.? : ;' I@B % &4: ;I wwovopwpqwqtwtvwwwvwwwXvXYwYZwZ]w]vwwwvwww v  w  w w7v78w89w9<w<SvSTwTUwUXwX@v@AwABwBEwEHvHIwIJwJMwMvwwwvwwwv w  w  w %v%&w&'w'*w*EvEFwFGwGJwJvwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_net.cstddef.htypes.htypes.htime.hstdarg.hstdio.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_opt.htnt_iob.htnt_net.h '!1=g1=uK1/uK11=g1uK1 .uKgK .2&"--t .IK/סI8vvvY .)uY . . .u ..ɻIgI,v trecv_cbtnt_header_deleteTNT_ETMOUTTNT_EBIGgp_offsettnt_stream_netflagsunsigned inttnt_iobtnt_tupletnt_requestlimittnt_net_requesterrortmout_recvupdatetnt_net_recv_cbtnt_closetnt_error_desctnt_request_delete_1_3writevtupleslistreqidtnt_inituint32_ttnt_iob_txv_ttnt_header_updateGNU C 4.7.3fieldcountindextnt_flushoverflow_arg_arealong long unsigned inttnt_strerrortnt_net_replytnt_request_insertdel_1_3read_replyorigin_sizetnt_net_readtimeval__gnuc_va_listsize_toffsetconnectedTNT_LASTsend_cb_argcalltmout_connecttv_usecfreetnt_streamsend_cbtnt_error_listrecv_buforigincodeproc/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnetchartmout_sendread_tupleread_requestTNT_ERESOLVEdatawrite_requestssize_tuint8_tsbufiov_basetnt_request_ttnt_headerhostnameva_listtnt_request_deletelong long intwritetnt_list_ptrtnt_errortnt_header_delete_1_3tnt_errnoproc_encsizeTNT_ESIZEtnt_replysize_enc_lentnt_listtnt_optsize_encargserrno_tnt_iob_tx_tallocshort intlong inttnt_net_writevallocatedsend_bufTNT_EMEMORYinsert__va_list_tagwrcntproc_len__ssize_tfp_offsetreadtnt_request_callproc_enc_lentv_sectnt_request_updatesizetypetnt_connecttnt_header_insertlong unsigned inttnt_net_freeTNT_EFAILops_sizereg_save_areaporttnt_nettnt_fdtnt_settypeunsigned charcardinalityTNT_EBADVAL__suseconds_t__time_ttnt_net_writerecv_cb_argtnt_request_select/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_net.crbufiov_lensend_cbvtnt_reply_ttnt_request_update_opselectsigned charshort unsigned intiovectnt_net_write_requestTNT_ESYSTEMTNT_EOKdesctnt_header_selecttnt_header_callGCC: (Debian 4.7.3-4) 4.7.3zRx pAC k <9AC t \YAC T |WAC R 0AC k 9AC t JAC E ,AC g AC  zPLRx  $AC  AC  tAC o &AC a &AC a AC X   AC [  @AC E d AC [ .symtab.strtab.shstrtab.rela.text.rela.data.bss.gcc_except_table.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @<+@ &H@1 6HUP Aa8o!0zV0 !V0$0+++V0.5p x:% pp9%Y3WBY0X9hJv ,   8/=MTaTi~AIt&& & F  tnt_net.ctnt_net_freetnt_net_readtnt_net_writetnt_net_writevtnt_net_write_requesttnt_net_recv_cbtnt_net_replytnt_net_requesttnt_error_listmsg.3723tnt_io_closetnt_iob_freetnt_opt_freetnt_mem_freetnt_io_recvtnt_io_sendtnt_io_sendvtnt_reply_fromtnt_request_fromtnt_nettnt_stream_inittnt_mem_alloctnt_stream_freememsettnt_opt_inittnt_set__gcc_personality_v0tnt_opt_set_Unwind_Resumetnt_inittnt_iob_inittnt_connecttnt_closetnt_io_connecttnt_flushtnt_io_flushtnt_fdtnt_errortnt_strerrorstrerrorsnprintftnt_errno 0BN^3  !* 2"Z$y%&' p      Y' J(+;,..t0137  8  (8!H.X@hPxhz  1  |!) . ; I ^P kW M^ _e  l *s x     m    3 k  h .* 8 YF /U R` k v > Y   G   G 0 G? K GZ s I  x b l       C, A ~M '[ %j 0   Z B =+ 9 G U t  &     w |4 a al    X  l k  6 ( 6 rD R ` Co @{  {       ;  v    I. =< %J X f Kt -  L   b    ZU     U  %    x   8  "  ) 8 H U Yd t {  p   p  `   # + O x 3  Y   C  Y   ) 1 9 ] y     @ ~   8  B 8 T ' BD QO TW A_ `   A I   I   % ,4< a Olt |  J & @ &F $ 0F8@ enm  ` S + @p`Y  8K *`Ti AI $&DFhtarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/CMakeLists.txt0000664000000000000000000000460512202131537022251 0ustar rootroot#============================================================================# # build flags #============================================================================# # default flags if (${CMAKE_BUILD_TYPE} STREQUAL "None") set (tntnet_cflags "-std=gnu99") else() set (tntnet_cflags "-std=gnu99 -Wall -Wextra") set (tntnet_cflags "${tntnet_cflags} -Wno-sign-compare -Wno-strict-aliasing") endif() # Only add -Werror if it's a debug build, done by developers. if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") set (tntnet_cflags "${tntnet_cflags} -Werror") endif() #============================================================================# # Build tnt net project #============================================================================# # # source files # set (tntnet_sources tnt_iob.c tnt_io.c tnt_opt.c tnt_net.c) #----------------------------------------------------------------------------# # Builds #----------------------------------------------------------------------------# # Here we manage to build static/dynamic libraries ourselves, # do not use the top level settings. string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG) set (tnt_cflags "${tnt_cflags} -static-libgcc") endif() # # Static library # project(tntnet) add_library(tntnet STATIC ${tntnet_sources}) set_target_properties(tntnet PROPERTIES COMPILE_FLAGS "${tntnet_cflags}") set_target_properties(tntnet PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tntnet PROPERTIES OUTPUT_NAME "tarantoolnet") # # Shared library # project(tntnet_shared) add_library(tntnet_shared SHARED ${tntnet_sources}) target_link_libraries(tntnet_shared tnt_shared) set_target_properties(tntnet_shared PROPERTIES OUTPUT_NAME tntnet) set_target_properties(tntnet_shared PROPERTIES COMPILE_FLAGS "${tntnet_cflags}") set_target_properties(tntnet_shared PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tntnet_shared PROPERTIES OUTPUT_NAME "tarantoolnet") #----------------------------------------------------------------------------# # Install #----------------------------------------------------------------------------# install (TARGETS tntnet ARCHIVE DESTINATION lib) install (TARGETS tntnet_shared LIBRARY DESTINATION lib) tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/Makefile0000664000000000000000000003405712213333034021153 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntnet/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntnet/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntnet/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntnet/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. connector/c/tntnet/CMakeFiles/tntnet.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntnet/CMakeFiles/tntnet.dir/rule .PHONY : connector/c/tntnet/CMakeFiles/tntnet.dir/rule # Convenience name for target. tntnet: connector/c/tntnet/CMakeFiles/tntnet.dir/rule .PHONY : tntnet # fast build rule for target. tntnet/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/build .PHONY : tntnet/fast # Convenience name for target. connector/c/tntnet/CMakeFiles/tntnet_shared.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntnet/CMakeFiles/tntnet_shared.dir/rule .PHONY : connector/c/tntnet/CMakeFiles/tntnet_shared.dir/rule # Convenience name for target. tntnet_shared: connector/c/tntnet/CMakeFiles/tntnet_shared.dir/rule .PHONY : tntnet_shared # fast build rule for target. tntnet_shared/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build .PHONY : tntnet_shared/fast tnt_io.o: tnt_io.c.o .PHONY : tnt_io.o # target to build an object file tnt_io.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_io.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_io.c.o .PHONY : tnt_io.c.o tnt_io.i: tnt_io.c.i .PHONY : tnt_io.i # target to preprocess a source file tnt_io.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_io.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_io.c.i .PHONY : tnt_io.c.i tnt_io.s: tnt_io.c.s .PHONY : tnt_io.s # target to generate assembly for a file tnt_io.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_io.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_io.c.s .PHONY : tnt_io.c.s tnt_iob.o: tnt_iob.c.o .PHONY : tnt_iob.o # target to build an object file tnt_iob.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_iob.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_iob.c.o .PHONY : tnt_iob.c.o tnt_iob.i: tnt_iob.c.i .PHONY : tnt_iob.i # target to preprocess a source file tnt_iob.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_iob.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_iob.c.i .PHONY : tnt_iob.c.i tnt_iob.s: tnt_iob.c.s .PHONY : tnt_iob.s # target to generate assembly for a file tnt_iob.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_iob.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_iob.c.s .PHONY : tnt_iob.c.s tnt_net.o: tnt_net.c.o .PHONY : tnt_net.o # target to build an object file tnt_net.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_net.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_net.c.o .PHONY : tnt_net.c.o tnt_net.i: tnt_net.c.i .PHONY : tnt_net.i # target to preprocess a source file tnt_net.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_net.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_net.c.i .PHONY : tnt_net.c.i tnt_net.s: tnt_net.c.s .PHONY : tnt_net.s # target to generate assembly for a file tnt_net.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_net.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_net.c.s .PHONY : tnt_net.c.s tnt_opt.o: tnt_opt.c.o .PHONY : tnt_opt.o # target to build an object file tnt_opt.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_opt.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_opt.c.o .PHONY : tnt_opt.c.o tnt_opt.i: tnt_opt.c.i .PHONY : tnt_opt.i # target to preprocess a source file tnt_opt.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_opt.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_opt.c.i .PHONY : tnt_opt.c.i tnt_opt.s: tnt_opt.c.s .PHONY : tnt_opt.s # target to generate assembly for a file tnt_opt.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/tnt_opt.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/tnt_opt.c.s .PHONY : tnt_opt.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... tntnet" @echo "... tntnet_shared" @echo "... tnt_io.o" @echo "... tnt_io.i" @echo "... tnt_io.s" @echo "... tnt_iob.o" @echo "... tnt_iob.i" @echo "... tnt_iob.s" @echo "... tnt_net.o" @echo "... tnt_net.i" @echo "... tnt_net.s" @echo "... tnt_opt.o" @echo "... tnt_opt.i" @echo "... tnt_opt.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/connector/c/tntnet/tnt_net.c0000664000000000000000000001676712202131537021344 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include static void tnt_net_free(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); tnt_io_close(sn); tnt_iob_free(&sn->sbuf); tnt_iob_free(&sn->rbuf); tnt_opt_free(&sn->opt); tnt_mem_free(s->data); s->data = NULL; } static ssize_t tnt_net_read(struct tnt_stream *s, char *buf, size_t size) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); /* read doesn't touches wrcnt */ return tnt_io_recv(sn, buf, size); } static ssize_t tnt_net_write(struct tnt_stream *s, const char *buf, size_t size) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); ssize_t rc = tnt_io_send(sn, buf, size); if (rc != -1) s->wrcnt++; return rc; } static ssize_t tnt_net_writev(struct tnt_stream *s, struct iovec *iov, int count) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); ssize_t rc = tnt_io_sendv(sn, iov, count); if (rc != -1) s->wrcnt++; return rc; } static ssize_t tnt_net_write_request(struct tnt_stream *s, struct tnt_request *r) { return tnt_net_writev(s, r->v, r->vc); } static ssize_t tnt_net_recv_cb(struct tnt_stream *s, char *buf, ssize_t size) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); return tnt_io_recv(sn, buf, size); } static int tnt_net_reply(struct tnt_stream *s, struct tnt_reply *r) { if (s->wrcnt == 0) return 1; s->wrcnt--; return tnt_reply_from(r, (tnt_reply_t)tnt_net_recv_cb, s); } static int tnt_net_request(struct tnt_stream *s, struct tnt_request *r) { /* read doesn't touches wrcnt */ return tnt_request_from(r, (tnt_request_t)tnt_net_recv_cb, s, NULL); } /* * tnt_net() * * create and initialize network stream; * * s - stream pointer, maybe NULL * * if stream pointer is NULL, then new stream will be created. * * returns stream pointer, or NULL on error. */ struct tnt_stream *tnt_net(struct tnt_stream *s) { int allocated = s == NULL; s = tnt_stream_init(s); if (s == NULL) return NULL; /* allocating stream data */ s->data = tnt_mem_alloc(sizeof(struct tnt_stream_net)); if (s->data == NULL) { if (allocated) tnt_stream_free(s); return NULL; } memset(s->data, 0, sizeof(struct tnt_stream_net)); /* initializing interfaces */ s->read = tnt_net_read; s->read_reply = tnt_net_reply; s->read_request = tnt_net_request; s->read_tuple = NULL; s->write = tnt_net_write; s->writev = tnt_net_writev; s->write_request = tnt_net_write_request; s->free = tnt_net_free; /* initializing internal data */ struct tnt_stream_net *sn = TNT_SNET_CAST(s); sn->fd = -1; tnt_opt_init(&sn->opt); return s; } /* * tnt_set() * * set options to network stream; * * s - network stream pointer * opt - option id * ... - option value * * returns 0 on success, or -1 on error. */ int tnt_set(struct tnt_stream *s, int opt, ...) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); va_list args; va_start(args, opt); sn->error = tnt_opt_set(&sn->opt, opt, args); va_end(args); return (sn->error == TNT_EOK) ? 0 : -1; } /* * tnt_init() * * initialize prepared network stream; * * s - network stream pointer * * returns 0 on success, or -1 on error. */ int tnt_init(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); if (tnt_iob_init(&sn->sbuf, sn->opt.send_buf, sn->opt.send_cb, sn->opt.send_cbv, sn->opt.send_cb_arg) == -1) { sn->error = TNT_EMEMORY; return -1; } if (tnt_iob_init(&sn->rbuf, sn->opt.recv_buf, sn->opt.recv_cb, NULL, sn->opt.recv_cb_arg) == -1) { sn->error = TNT_EMEMORY; return -1; } if (sn->opt.hostname == NULL) { sn->error = TNT_EBADVAL; return -1; } if (sn->opt.port == 0) { sn->error = TNT_EBADVAL; return -1; } return 0; } /* * tnt_connect() * * connect to server; * reconnect to server; * * s - network stream pointer * * returns 0 on success, or -1 on error. */ int tnt_connect(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); if (sn->connected) tnt_close(s); sn->error = tnt_io_connect(sn, sn->opt.hostname, sn->opt.port); if (sn->error != TNT_EOK) return -1; return 0; } /* * tnt_close() * * close connection to server; * * s - network stream pointer * * returns 0 on success, or -1 on error. */ void tnt_close(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); tnt_io_close(sn); } /* * tnt_flush() * * send bufferized data to server; * * s - network stream pointer * * returns size of data been sended on success, or -1 on error. */ ssize_t tnt_flush(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); return tnt_io_flush(sn); } /* * tnt_fd() * * get connection socket description; * * s - network stream pointer */ int tnt_fd(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); return sn->fd; } /* * tnt_error() * * get library error status; * * s - network stream pointer */ enum tnt_error tnt_error(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); return sn->error; } /* must be in sync with enum tnt_error */ struct tnt_error_desc { enum tnt_error type; char *desc; }; static struct tnt_error_desc tnt_error_list[] = { { TNT_EOK, "ok" }, { TNT_EFAIL, "fail" }, { TNT_EMEMORY, "memory allocation failed" }, { TNT_ESYSTEM, "system error" }, { TNT_EBIG, "buffer is too big" }, { TNT_ESIZE, "bad buffer size" }, { TNT_ERESOLVE, "gethostbyname(2) failed" }, { TNT_ETMOUT, "operation timeout" }, { TNT_EBADVAL, "bad argument" }, { TNT_LAST, NULL } }; /* * tnt_strerror() * * get library error status description string; * * s - network stream pointer */ char *tnt_strerror(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); if (sn->error == TNT_ESYSTEM) { static char msg[256]; snprintf(msg, sizeof(msg), "%s (errno: %d)", strerror(sn->errno_), sn->errno_); return msg; } return tnt_error_list[(int)sn->error].desc; } /* * tnt_errno() * * get saved errno; * * s - network stream pointer */ int tnt_errno(struct tnt_stream *s) { struct tnt_stream_net *sn = TNT_SNET_CAST(s); return sn->errno_; } tarantool-1.5.1.218.g1a69fd6/connector/c/CMakeLists.txt0000664000000000000000000000062112202131537020727 0ustar rootroot # # library soname version # set(LIBTNT_VERSION_MAJOR "1") set(LIBTNT_VERSION_MINOR "1") set(LIBTNT_VERSION "${LIBTNT_VERSION_MAJOR}.${LIBTNT_VERSION_MINOR}") set(LIBTNT_SOVERSION "${LIBTNT_VERSION_MAJOR}") include_directories("${PROJECT_SOURCE_DIR}/connector/c/include") add_subdirectory(tnt) add_subdirectory(tntsql) add_subdirectory(tntnet) add_subdirectory(tntrpl) add_subdirectory(include) tarantool-1.5.1.218.g1a69fd6/connector/c/Makefile0000664000000000000000000001524512213333034017635 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/connector/c/README0000664000000000000000000000036312202131537017052 0ustar rootroot .------------------------------. | Tarantool C client libraries | `------------------------------' tnt - tarantool iproto library tntsql - tarantool sql library tntnet - tarantool network io library tntrpl - tarantool replication library tarantool-1.5.1.218.g1a69fd6/connector/c/include/0000775000000000000000000000000012213333320017607 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/include/cmake_install.cmake0000664000000000000000000000302712213333034023423 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/0000775000000000000000000000000012231715257021627 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_log.h0000664000000000000000000000634512231715257023456 0ustar rootroot#ifndef TNT_LOG_H_INCLUDED #define TNT_LOG_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define TNT_LOG_MAGIC_XLOG "XLOG\n" #define TNT_LOG_MAGIC_SNAP "SNAP\n" #define TNT_LOG_VERSION "0.11\n" enum tnt_log_error { TNT_LOG_EOK, TNT_LOG_EFAIL, TNT_LOG_EMEMORY, TNT_LOG_ETYPE, TNT_LOG_EVERSION, TNT_LOG_ECORRUPT, TNT_LOG_ESYSTEM, TNT_LOG_LAST }; struct tnt_log_header_v11 { uint32_t crc32_hdr; uint64_t lsn; double tm; uint32_t len; uint32_t crc32_data; } __attribute__((packed)); struct tnt_log_row_v11 { uint16_t tag; uint64_t cookie; uint16_t op; } __attribute__((packed)); struct tnt_log_row_snap_v11 { uint16_t tag; uint64_t cookie; uint32_t space; uint32_t tuple_size; uint32_t data_size; } __attribute__((packed)); enum tnt_log_type { TNT_LOG_NONE, TNT_LOG_XLOG, TNT_LOG_SNAPSHOT }; union tnt_log_value { struct tnt_request r; struct tnt_tuple t; }; struct tnt_log_row { struct tnt_log_header_v11 hdr; struct tnt_log_row_v11 row; struct tnt_log_row_snap_v11 row_snap; union tnt_log_value *value; }; struct tnt_log { enum tnt_log_type type; FILE *fd; off_t current_offset; off_t offset; int (*read)(struct tnt_log *l, char **buf, uint32_t *size); int (*process)(struct tnt_log *l, char *buf, uint32_t size, union tnt_log_value *value); struct tnt_log_row current; union tnt_log_value current_value; enum tnt_log_error error; int errno_; }; extern const uint32_t tnt_log_marker_v11; extern const uint32_t tnt_log_marker_eof_v11; enum tnt_log_type tnt_log_guess(char *file); enum tnt_log_error tnt_log_open(struct tnt_log *l, char *file, enum tnt_log_type type); int tnt_log_seek(struct tnt_log *l, off_t offset); void tnt_log_close(struct tnt_log *l); struct tnt_log_row *tnt_log_next(struct tnt_log *l); struct tnt_log_row *tnt_log_next_to(struct tnt_log *l, union tnt_log_value *value); enum tnt_log_error tnt_log_error(struct tnt_log *l); char *tnt_log_strerror(struct tnt_log *l); int tnt_log_errno(struct tnt_log *l); #endif /* TNT_LOG_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_buf.h0000664000000000000000000000340412202131537023431 0ustar rootroot#ifndef TNT_BUF_H_INCLUDED #define TNT_BUF_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* buffer stream object */ struct tnt_stream_buf { char *data; /* buffer data */ size_t size; /* buffer size */ size_t rdoff; /* read offset */ }; /* buffer stream accessors */ #define TNT_SBUF_CAST(S) ((struct tnt_stream_buf*)(S)->data) #define TNT_SBUF_DATA(S) TNT_SBUF_CAST(S)->data #define TNT_SBUF_SIZE(S) TNT_SBUF_CAST(S)->size struct tnt_stream *tnt_buf(struct tnt_stream *s); #endif /* TNT_BUF_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_snapshot.h0000664000000000000000000000354612202131537024523 0ustar rootroot#ifndef TNT_SNAPSHOT_H_INCLUDED #define TNT_SNAPSHOT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include struct tnt_stream_snapshot { struct tnt_log log; }; #define TNT_SSNAPSHOT_CAST(S) ((struct tnt_stream_snapshot*)(S)->data) struct tnt_stream *tnt_snapshot(struct tnt_stream *s); int tnt_snapshot_open(struct tnt_stream *s, char *file); void tnt_snapshot_close(struct tnt_stream *s); enum tnt_log_error tnt_snapshot_error(struct tnt_stream *s); char *tnt_snapshot_strerror(struct tnt_stream *s); int tnt_snapshot_errno(struct tnt_stream *s); #endif /* TNT_SNAPSHOT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_insert.h0000664000000000000000000000274412202131537024167 0ustar rootroot#ifndef TNT_INSERT_H_INCLUDED #define TNT_INSERT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ssize_t tnt_insert(struct tnt_stream *s, uint32_t ns, uint32_t flags, struct tnt_tuple *kv); #endif /* TNT_INSERT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_rpl.h0000664000000000000000000000340012202131537023446 0ustar rootroot#ifndef TNT_RPL_H_INCLUDED #define TNT_RPL_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct tnt_stream_rpl { struct tnt_log_header_v11 hdr; struct tnt_log_row_v11 row; struct tnt_stream *net; }; #define TNT_RPL_CAST(S) ((struct tnt_stream_rpl*)(S)->data) struct tnt_stream *tnt_rpl(struct tnt_stream *s); void tnt_rpl_attach(struct tnt_stream *s, struct tnt_stream *net); int tnt_rpl_open(struct tnt_stream *s, uint64_t lsn); void tnt_rpl_close(struct tnt_stream *s); #endif /* TNT_XLOG_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_queue.h0000664000000000000000000004357012202131537024011 0ustar rootroot/*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 * $FreeBSD: src/sys/sys/queue.h,v 1.60.2.1 2005/08/16 22:41:39 phk Exp $ */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ #include /* * This file defines four types of data structures: singly-linked lists, * singly-linked tail queues, lists and tail queues. * * A singly-linked list is headed by a single forward pointer. The elements * are singly linked for minimum space and pointer manipulation overhead at * the expense of O(n) removal for arbitrary elements. New elements can be * added to the list after an existing element or at the head of the list. * Elements being removed from the head of the list should use the explicit * macro for this purpose for optimum efficiency. A singly-linked list may * only be traversed in the forward direction. Singly-linked lists are ideal * for applications with large datasets and few or no removals or for * implementing a LIFO queue. * * A singly-linked tail queue is headed by a pair of pointers, one to the * head of the list and the other to the tail of the list. The elements are * singly linked for minimum space and pointer manipulation overhead at the * expense of O(n) removal for arbitrary elements. New elements can be added * to the list after an existing element, at the head of the list, or at the * end of the list. Elements being removed from the head of the tail queue * should use the explicit macro for this purpose for optimum efficiency. * A singly-linked tail queue may only be traversed in the forward direction. * Singly-linked tail queues are ideal for applications with large datasets * and few or no removals or for implementing a FIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * For details on the use of these macros, see the queue(3) manual page. * * * SLIST LIST STAILQ TAILQ * _HEAD + + + + * _HEAD_INITIALIZER + + + + * _ENTRY + + + + * _INIT + + + + * _EMPTY + + + + * _FIRST + + + + * _NEXT + + + + * _PREV - - - + * _LAST - - + + * _FOREACH + + + + * _FOREACH_SAFE + + + + * _FOREACH_REVERSE - - - + * _FOREACH_REVERSE_SAFE - - - + * _INSERT_HEAD + + + + * _INSERT_BEFORE - + - + * _INSERT_AFTER + + + + * _INSERT_TAIL - - + + * _CONCAT - - + + * _REMOVE_HEAD + - + - * _REMOVE + + + + * */ #define QUEUE_MACRO_DEBUG 0 #if QUEUE_MACRO_DEBUG /* Store the last 2 places the queue element or head was altered */ struct qm_trace { char * lastfile; int lastline; char * prevfile; int prevline; }; #define TRACEBUF struct qm_trace trace; #define TRASHIT(x) do {(x) = (void *)-1;} while (0) #define QMD_TRACE_HEAD(head) do { \ (head)->trace.prevline = (head)->trace.lastline; \ (head)->trace.prevfile = (head)->trace.lastfile; \ (head)->trace.lastline = __LINE__; \ (head)->trace.lastfile = __FILE__; \ } while (0) #define QMD_TRACE_ELEM(elem) do { \ (elem)->trace.prevline = (elem)->trace.lastline; \ (elem)->trace.prevfile = (elem)->trace.lastfile; \ (elem)->trace.lastline = __LINE__; \ (elem)->trace.lastfile = __FILE__; \ } while (0) #else #define QMD_TRACE_ELEM(elem) #define QMD_TRACE_HEAD(head) #define TRACEBUF #define TRASHIT(x) #endif /* QUEUE_MACRO_DEBUG */ /* * Singly-linked List declarations. */ #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } /* * Singly-linked List functions. */ #define SLIST_EMPTY(head) ((head)->slh_first == NULL) #define SLIST_FIRST(head) ((head)->slh_first) #define SLIST_FOREACH(var, head, field) \ for ((var) = SLIST_FIRST((head)); \ (var); \ (var) = SLIST_NEXT((var), field)) #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = SLIST_FIRST((head)); \ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ (var) = (tvar)) #define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ for ((varp) = &SLIST_FIRST((head)); \ ((var) = *(varp)) != NULL; \ (varp) = &SLIST_NEXT((var), field)) #define SLIST_INIT(head) do { \ SLIST_FIRST((head)) = NULL; \ } while (0) #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \ SLIST_NEXT((slistelm), field) = (elm); \ } while (0) #define SLIST_INSERT_HEAD(head, elm, field) do { \ SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \ SLIST_FIRST((head)) = (elm); \ } while (0) #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #define SLIST_REMOVE(head, elm, type, field) do { \ if (SLIST_FIRST((head)) == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = SLIST_FIRST((head)); \ while (SLIST_NEXT(curelm, field) != (elm)) \ curelm = SLIST_NEXT(curelm, field); \ SLIST_NEXT(curelm, field) = \ SLIST_NEXT(SLIST_NEXT(curelm, field), field); \ } \ } while (0) #define SLIST_REMOVE_HEAD(head, field) do { \ SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ } while (0) /* * Singly-linked Tail queue declarations. */ #define STAILQ_HEAD(name, type) \ struct name { \ struct type *stqh_first;/* first element */ \ struct type **stqh_last;/* addr of last next element */ \ } #define STAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).stqh_first } #define STAILQ_ENTRY(type) \ struct { \ struct type *stqe_next; /* next element */ \ } /* * Singly-linked Tail queue functions. */ #define STAILQ_CONCAT(head1, head2) do { \ if (!STAILQ_EMPTY((head2))) { \ *(head1)->stqh_last = (head2)->stqh_first; \ (head1)->stqh_last = (head2)->stqh_last; \ STAILQ_INIT((head2)); \ } \ } while (0) #define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) #define STAILQ_FIRST(head) ((head)->stqh_first) #define STAILQ_FOREACH(var, head, field) \ for((var) = STAILQ_FIRST((head)); \ (var); \ (var) = STAILQ_NEXT((var), field)) #define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = STAILQ_FIRST((head)); \ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ (var) = (tvar)) #define STAILQ_INIT(head) do { \ STAILQ_FIRST((head)) = NULL; \ (head)->stqh_last = &STAILQ_FIRST((head)); \ } while (0) #define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ STAILQ_NEXT((tqelm), field) = (elm); \ } while (0) #define STAILQ_INSERT_HEAD(head, elm, field) do { \ if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ STAILQ_FIRST((head)) = (elm); \ } while (0) #define STAILQ_INSERT_TAIL(head, elm, field) do { \ STAILQ_NEXT((elm), field) = NULL; \ *(head)->stqh_last = (elm); \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ } while (0) #define STAILQ_LAST(head, type, field) \ (STAILQ_EMPTY((head)) ? \ NULL : \ ((struct type *) \ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) #define STAILQ_REMOVE(head, elm, type, field) do { \ if (STAILQ_FIRST((head)) == (elm)) { \ STAILQ_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = STAILQ_FIRST((head)); \ while (STAILQ_NEXT(curelm, field) != (elm)) \ curelm = STAILQ_NEXT(curelm, field); \ if ((STAILQ_NEXT(curelm, field) = \ STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\ (head)->stqh_last = &STAILQ_NEXT((curelm), field);\ } \ } while (0) #define STAILQ_REMOVE_HEAD(head, field) do { \ if ((STAILQ_FIRST((head)) = \ STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ (head)->stqh_last = &STAILQ_FIRST((head)); \ } while (0) #define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \ (head)->stqh_last = &STAILQ_FIRST((head)); \ } while (0) /* * List declarations. */ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #define LIST_HEAD_INITIALIZER(head) \ { NULL } #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } /* * List functions. */ #define LIST_EMPTY(head) ((head)->lh_first == NULL) #define LIST_FIRST(head) ((head)->lh_first) #define LIST_FOREACH(var, head, field) \ for ((var) = LIST_FIRST((head)); \ (var); \ (var) = LIST_NEXT((var), field)) #define LIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = LIST_FIRST((head)); \ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ (var) = (tvar)) #define LIST_INIT(head) do { \ LIST_FIRST((head)) = NULL; \ } while (0) #define LIST_INSERT_AFTER(listelm, elm, field) do { \ if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\ LIST_NEXT((listelm), field)->field.le_prev = \ &LIST_NEXT((elm), field); \ LIST_NEXT((listelm), field) = (elm); \ (elm)->field.le_prev = &LIST_NEXT((listelm), field); \ } while (0) #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.le_prev = (listelm)->field.le_prev; \ LIST_NEXT((elm), field) = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ } while (0) #define LIST_INSERT_HEAD(head, elm, field) do { \ if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \ LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\ LIST_FIRST((head)) = (elm); \ (elm)->field.le_prev = &LIST_FIRST((head)); \ } while (0) #define LIST_NEXT(elm, field) ((elm)->field.le_next) #define LIST_REMOVE(elm, field) do { \ if (LIST_NEXT((elm), field) != NULL) \ LIST_NEXT((elm), field)->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = LIST_NEXT((elm), field); \ } while (0) /* * Tail queue declarations. */ #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; /* first element */ \ struct type **tqh_last; /* addr of last next element */ \ TRACEBUF \ } #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ TRACEBUF \ } /* * Tail queue functions. */ #define TAILQ_CONCAT(head1, head2, field) do { \ if (!TAILQ_EMPTY(head2)) { \ *(head1)->tqh_last = (head2)->tqh_first; \ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ (head1)->tqh_last = (head2)->tqh_last; \ TAILQ_INIT((head2)); \ QMD_TRACE_HEAD(head1); \ QMD_TRACE_HEAD(head2); \ } \ } while (0) #define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_FOREACH(var, head, field) \ for ((var) = TAILQ_FIRST((head)); \ (var); \ (var) = TAILQ_NEXT((var), field)) #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST((head)); \ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ (var) = (tvar)) #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = TAILQ_LAST((head), headname); \ (var); \ (var) = TAILQ_PREV((var), headname, field)) #define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ for ((var) = TAILQ_LAST((head), headname); \ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ (var) = (tvar)) #define TAILQ_INIT(head) do { \ TAILQ_FIRST((head)) = NULL; \ (head)->tqh_last = &TAILQ_FIRST((head)); \ QMD_TRACE_HEAD(head); \ } while (0) #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ TAILQ_NEXT((elm), field)->field.tqe_prev = \ &TAILQ_NEXT((elm), field); \ else { \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ QMD_TRACE_HEAD(head); \ } \ TAILQ_NEXT((listelm), field) = (elm); \ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ QMD_TRACE_ELEM(&listelm->field); \ } while (0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ TAILQ_NEXT((elm), field) = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ QMD_TRACE_ELEM(&listelm->field); \ } while (0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \ TAILQ_FIRST((head))->field.tqe_prev = \ &TAILQ_NEXT((elm), field); \ else \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ TAILQ_FIRST((head)) = (elm); \ (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ QMD_TRACE_HEAD(head); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) #define TAILQ_INSERT_TAIL(head, elm, field) do { \ TAILQ_NEXT((elm), field) = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ QMD_TRACE_HEAD(head); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)->tqh_last))->tqh_last)) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_PREV(elm, headname, field) \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) #define TAILQ_REMOVE(head, elm, field) do { \ if ((TAILQ_NEXT((elm), field)) != NULL) \ TAILQ_NEXT((elm), field)->field.tqe_prev = \ (elm)->field.tqe_prev; \ else { \ (head)->tqh_last = (elm)->field.tqe_prev; \ QMD_TRACE_HEAD(head); \ } \ *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ TRASHIT((elm)->field.tqe_next); \ TRASHIT((elm)->field.tqe_prev); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) #ifdef _KERNEL /* * XXX insque() and remque() are an old way of handling certain queues. * They bogusly assumes that all queue heads look alike. */ struct quehead { struct quehead *qh_link; struct quehead *qh_rlink; }; #ifdef __CC_SUPPORTS___INLINE static __inline void insque(void *a, void *b) { struct quehead *element = (struct quehead *)a, *head = (struct quehead *)b; element->qh_link = head->qh_link; element->qh_rlink = head; head->qh_link = element; element->qh_link->qh_rlink = element; } static __inline void remque(void *a) { struct quehead *element = (struct quehead *)a; element->qh_link->qh_rlink = element->qh_rlink; element->qh_rlink->qh_link = element->qh_link; element->qh_rlink = 0; } #else /* !__CC_SUPPORTS___INLINE */ void insque(void *a, void *b); void remque(void *a); #endif /* __CC_SUPPORTS___INLINE */ #endif /* _KERNEL */ #endif /* _SYS_QUEUE_H_ */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_request.h0000664000000000000000000000573512213313337024360 0ustar rootroot#ifndef TNT_REQUEST_H_INCLUDED #define TNT_REQUEST_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include typedef ssize_t (*tnt_request_t)(void *ptr, char *dst, ssize_t size); struct tnt_request_insert { struct tnt_header_insert h; struct tnt_tuple t; }; struct tnt_request_delete_1_3 { struct tnt_header_delete_1_3 h; struct tnt_tuple t; }; struct tnt_request_delete { struct tnt_header_delete h; struct tnt_tuple t; }; struct tnt_request_update_op { uint8_t op; uint32_t field; char size_enc[5]; uint32_t size_enc_len; uint32_t size; char *data; }; struct tnt_request_update { struct tnt_header_update h; struct tnt_tuple t; char *ops; uint32_t ops_size; struct tnt_request_update_op *opv; uint32_t opc; }; struct tnt_request_call { struct tnt_header_call h; char proc_enc[5]; uint32_t proc_enc_len; char *proc; uint32_t proc_len; struct tnt_tuple t; }; struct tnt_request_select { struct tnt_header_select h; struct tnt_list l; }; struct tnt_request { char *origin; size_t origin_size; struct tnt_header h; union { struct tnt_request_insert insert; struct tnt_request_delete_1_3 del_1_3; struct tnt_request_delete del; struct tnt_request_call call; struct tnt_request_select select; struct tnt_request_update update; } r; int vc; struct iovec *v; }; void tnt_request_init(struct tnt_request *r); void tnt_request_free(struct tnt_request *r); void tnt_request_setorigin(struct tnt_request *r, char *buf, size_t size); int tnt_request(struct tnt_request *r, char *buf, size_t size, size_t *off, struct tnt_header *hdr); int tnt_request_from(struct tnt_request *r, tnt_request_t rcv, void *ptr, struct tnt_header *hdr); #endif /* TNT_REQUEST_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_utf8.h0000664000000000000000000000365612202131537023554 0ustar rootroot#ifndef TNT_UTF8_H_INCLUDED #define TNT_UTF8_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct tnt_utf8 { unsigned char *data; size_t size; size_t len; }; #define TNT_UTF8_CHAR(U, P) ((U)->data + (P)) bool tnt_utf8_init(struct tnt_utf8 *u, const unsigned char *data, size_t size); void tnt_utf8_free(struct tnt_utf8 *u); ssize_t tnt_utf8_chrlen(const unsigned char *data, size_t size); ssize_t tnt_utf8_strlen(const unsigned char *data, size_t size); ssize_t tnt_utf8_sizeof(const unsigned char *data, size_t size, size_t n); bool tnt_utf8_cmp(struct tnt_utf8 *u, struct tnt_utf8 *us); ssize_t tnt_utf8_next(struct tnt_utf8 *u, size_t off); #endif /* TNT_UTF8_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_ping.h0000664000000000000000000000264512202131537023620 0ustar rootroot#ifndef TNT_PING_H_INCLUDED #define TNT_PING_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ssize_t tnt_ping(struct tnt_stream *s); #endif /* TNT_PING_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_xlog.h0000664000000000000000000000346612202131537023636 0ustar rootroot#ifndef TNT_XLOG_H_INCLUDED #define TNT_XLOG_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include struct tnt_stream_xlog { struct tnt_log log; }; #define TNT_SXLOG_CAST(S) ((struct tnt_stream_xlog*)(S)->data) struct tnt_stream *tnt_xlog(struct tnt_stream *s); int tnt_xlog_open(struct tnt_stream *s, char *file); void tnt_xlog_close(struct tnt_stream *s); enum tnt_log_error tnt_xlog_error(struct tnt_stream *s); char *tnt_xlog_strerror(struct tnt_stream *s); int tnt_xlog_errno(struct tnt_stream *s); #endif /* TNT_XLOG_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_proto.h0000664000000000000000000000427012213313337024024 0ustar rootroot#ifndef TNT_PROTO_H_INCLUDED #define TNT_PROTO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define TNT_OP_INSERT 13 #define TNT_OP_SELECT 17 #define TNT_OP_UPDATE 19 #define TNT_OP_DELETE_1_3 20 #define TNT_OP_DELETE 21 #define TNT_OP_CALL 22 #define TNT_OP_PING 65280 #define TNT_FLAG_RETURN 0x01 #define TNT_FLAG_ADD 0x02 #define TNT_FLAG_REPLACE 0x04 #define TNT_FLAG_BOX_QUIET 0x08 #define TNT_FLAG_NOT_STORE 0x10 struct tnt_header { uint32_t type; uint32_t len; uint32_t reqid; }; struct tnt_header_insert { uint32_t ns; uint32_t flags; }; struct tnt_header_delete_1_3 { uint32_t ns; }; struct tnt_header_delete { uint32_t ns; uint32_t flags; }; struct tnt_header_update { uint32_t ns; uint32_t flags; }; struct tnt_header_call { uint32_t flags; }; struct tnt_header_select { uint32_t ns; uint32_t index; uint32_t offset; uint32_t limit; }; #endif /* TNT_PROTO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_iob.h0000664000000000000000000000343512202131537023432 0ustar rootroot#ifndef TNT_IOB_H_INCLUDED #define TNT_IOB_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ typedef ssize_t (*tnt_iob_tx_t)(void *ptr, const char *buf, size_t size); typedef ssize_t (*tnt_iob_txv_t)(void *ptr, struct iovec *iov, int count); struct tnt_iob { char *buf; size_t off; size_t top; size_t size; tnt_iob_tx_t tx; tnt_iob_txv_t txv; void *ptr; }; int tnt_iob_init(struct tnt_iob *iob, size_t size, tnt_iob_tx_t tx, tnt_iob_txv_t txv, void *ptr); void tnt_iob_free(struct tnt_iob *iob); #endif /* TNT_IOB_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_lex.h0000664000000000000000000000544412202131537023453 0ustar rootroot#ifndef TNT_LEX_H_INCLUDED #define TNT_LEX_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* token id's */ enum { TNT_TK_ERROR = -1, TNT_TK_EOF = 0, TNT_TK_NONE = 1000, TNT_TK_NUM32, TNT_TK_NUM64, TNT_TK_ID, TNT_TK_KEY, TNT_TK_TABLE, TNT_TK_PUNCT, TNT_TK_STRING, TNT_TK_PING, TNT_TK_UPDATE, TNT_TK_SET, TNT_TK_WHERE, TNT_TK_SPLICE, TNT_TK_DELETE, TNT_TK_FROM, TNT_TK_INSERT, TNT_TK_REPLACE, TNT_TK_INTO, TNT_TK_VALUES, TNT_TK_SELECT, TNT_TK_LIMIT, TNT_TK_CALL, TNT_TK_OR, TNT_TK_AND, TNT_TK_CUSTOM = 2000 }; /* keyword descriptor */ struct tnt_lex_keyword { char *name; int size; int tk; }; /* token object */ struct tnt_tk { int tk; union { int32_t i32; int64_t i64; struct tnt_utf8 s; } v; int line, col; SLIST_ENTRY(tnt_tk) next; STAILQ_ENTRY(tnt_tk) nextq; }; /* token object accessors */ #define TNT_TK_S(TK) (&(TK)->v.s) #define TNT_TK_I32(TK) ((TK)->v.i32) #define TNT_TK_I64(TK) ((TK)->v.i64) /* lexer object */ struct tnt_lex { struct tnt_utf8 buf; struct tnt_lex_keyword *keywords; size_t pos; int line, col; int count; SLIST_HEAD(,tnt_tk) stack; int countq; STAILQ_HEAD(,tnt_tk) q; bool idonly; char *error; }; bool tnt_lex_init(struct tnt_lex *l, struct tnt_lex_keyword *keywords, unsigned char *buf, size_t size); void tnt_lex_free(struct tnt_lex *l); char *tnt_lex_nameof(struct tnt_lex *l, int tk); void tnt_lex_idonly(struct tnt_lex *l, bool on); void tnt_lex_push(struct tnt_lex *l, struct tnt_tk *tk); int tnt_lex(struct tnt_lex *l, struct tnt_tk **tk); #endif /* TNT_LEX_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_sql.h0000664000000000000000000000276512202131537023465 0ustar rootroot#ifndef TNT_SQL_H_INCLUDED #define TNT_SQL_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ int tnt_query(struct tnt_stream *s, const char *q, size_t qsize, char **e); int tnt_query_is(const char *q, size_t qsize); #endif /* TNT_SQL_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_call.h0000664000000000000000000000274212202131537023574 0ustar rootroot#ifndef TNT_CALL_H_INCLUDED #define TNT_CALL_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ssize_t tnt_call(struct tnt_stream *s, uint32_t flags, const char *proc, struct tnt_tuple *args); #endif /* TNT_CALL_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_tuple.h0000664000000000000000000000472212202131537024012 0ustar rootroot#ifndef TNT_TUPLE_H_INCLUDED #define TNT_TUPLE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* tuple */ struct tnt_tuple { uint32_t cardinality; /* tuple fields count */ char *data; /* tuple fields */ size_t size; /* tuple size */ int alloc; /* allocation mark */ }; void tnt_tuple_init(struct tnt_tuple *t); void tnt_tuple_free(struct tnt_tuple *t); struct tnt_tuple *tnt_tuple(struct tnt_tuple *t, const char *fmt, ...); struct tnt_tuple *tnt_tuple_add(struct tnt_tuple *t, const void *data, uint32_t size); struct tnt_tuple *tnt_tuple_set(struct tnt_tuple *t, const void *buf, size_t size); struct tnt_tuple* tnt_tuple_set_as(struct tnt_tuple *t, const void *buf, size_t size, uint32_t num); /* tuple list */ struct tnt_list_ptr { struct tnt_tuple *ptr; /* tuple pointer */ }; struct tnt_list { struct tnt_list_ptr *list; /* tuple list */ uint32_t count; /* tuple list count */ int alloc; /* allocation mark */ }; void tnt_list_init(struct tnt_list *l); void tnt_list_free(struct tnt_list *l); struct tnt_list *tnt_list(struct tnt_list *l, ...); struct tnt_tuple *tnt_list_at(struct tnt_list *l, struct tnt_tuple *t); #endif /* TNT_TUPLE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_reply.h0000664000000000000000000000357212202131537024016 0ustar rootroot#ifndef TNT_REPLY_H_INCLUDED #define TNT_REPLY_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ typedef ssize_t (*tnt_reply_t)(void *ptr, char *dst, ssize_t size); struct tnt_reply { uint32_t op; uint32_t reqid; uint32_t code; char *error; struct tnt_list tuples; uint32_t count; }; #define TNT_REPLY_ERR(R) ((R)->code >> 8) #define TNT_REPLY_LIST(R) (&(R)->tuples) void tnt_reply_init(struct tnt_reply *r); void tnt_reply_free(struct tnt_reply *r); int tnt_reply(struct tnt_reply *r, char *buf, size_t size, size_t *off); int tnt_reply_from(struct tnt_reply *r, tnt_reply_t rcv, void *ptr); #endif /* TNT_REPLY_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_select.h0000664000000000000000000000301612202131537024133 0ustar rootroot#ifndef TNT_SELECT_H_INCLUDED #define TNT_SELECT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ssize_t tnt_select(struct tnt_stream *s, uint32_t ns, uint32_t index, uint32_t offset, uint32_t limit, struct tnt_list *keys); #endif /* TNT_SELECT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_opt.h0000664000000000000000000000403212202131537023455 0ustar rootroot#ifndef TNT_OPT_H_INCLUDED #define TNT_OPT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ enum tnt_opt_type { TNT_OPT_HOSTNAME, TNT_OPT_PORT, TNT_OPT_TMOUT_CONNECT, TNT_OPT_TMOUT_RECV, TNT_OPT_TMOUT_SEND, TNT_OPT_SEND_CB, TNT_OPT_SEND_CBV, TNT_OPT_SEND_CB_ARG, TNT_OPT_SEND_BUF, TNT_OPT_RECV_CB, TNT_OPT_RECV_CB_ARG, TNT_OPT_RECV_BUF }; struct tnt_opt { char *hostname; int port; struct timeval tmout_connect; struct timeval tmout_recv; struct timeval tmout_send; void *send_cb; void *send_cbv; void *send_cb_arg; int send_buf; void *recv_cb; void *recv_cb_arg; int recv_buf; }; void tnt_opt_init(struct tnt_opt *opt); void tnt_opt_free(struct tnt_opt *opt); int tnt_opt_set(struct tnt_opt *opt, enum tnt_opt_type name, va_list args); #endif /* TNT_OPT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_delete.h0000664000000000000000000000274412202131537024125 0ustar rootroot#ifndef TNT_DELETE_H_INCLUDED #define TNT_DELETE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ssize_t tnt_delete(struct tnt_stream *s, uint32_t ns, uint32_t flags, struct tnt_tuple *k); #endif /* TNT_DELETE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_iter.h0000664000000000000000000001074012202131537023621 0ustar rootroot#ifndef TNT_ITER_H_INCLUDED #define TNT_ITER_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* tuple iterator type */ enum tnt_iter_type { TNT_ITER_FIELD, TNT_ITER_LIST, TNT_ITER_REQUEST, TNT_ITER_REPLY, TNT_ITER_STORAGE }; /* tuple field iterator */ struct tnt_iter_field { struct tnt_tuple *tu; /* tuple pointer */ char *fld_ptr; /* current iteration offset */ char *fld_ptr_prev; /* prev iteration offset */ uint32_t fld_index; /* current field index */ uint32_t fld_size; /* current field size */ int fld_esize; /* current field encoding size */ char *fld_data; /* current field data */ }; /* tuple field iterator accessors */ #define TNT_IFIELD(I) (&(I)->data.field) #define TNT_IFIELD_TUPLE(I) TNT_IFIELD(I)->tu #define TNT_IFIELD_IDX(I) TNT_IFIELD(I)->fld_index #define TNT_IFIELD_DATA(I) TNT_IFIELD(I)->fld_data #define TNT_IFIELD_SIZE(I) TNT_IFIELD(I)->fld_size /* list iterator */ struct tnt_iter_list { struct tnt_list *l; /* list pointer */ struct tnt_tuple *tu; /* current tuple pointer */ uint32_t tu_index; /* current tuple index */ }; /* list iterator accessors */ #define TNT_ILIST(I) (&(I)->data.list) #define TNT_ILIST_TUPLE(I) TNT_ILIST(I)->tu #define TNT_ILIST_INDEX(I) TNT_ILIST(I)->tu_index /* request iterator */ struct tnt_iter_request { struct tnt_stream *s; /* stream pointer */ struct tnt_request r; /* current request */ }; /* request iterator accessors */ #define TNT_IREQUEST(I) (&(I)->data.request) #define TNT_IREQUEST_PTR(I) &TNT_IREQUEST(I)->r #define TNT_IREQUEST_STREAM(I) TNT_IREQUEST(I)->s /* storage iterator */ struct tnt_iter_storage { struct tnt_stream *s; /* stream pointer */ struct tnt_tuple t; /* current fetched tuple */ }; /* request iterator accessors */ #define TNT_ISTORAGE(I) (&(I)->data.storage) #define TNT_ISTORAGE_TUPLE(I) &TNT_ISTORAGE(I)->t #define TNT_ISTORAGE_STREAM(I) TNT_ISTORAGE(I)->s /* reply iterator */ struct tnt_iter_reply { struct tnt_stream *s; /* stream pointer */ struct tnt_reply r; /* current reply */ }; /* reply iterator accessors */ #define TNT_IREPLY(I) (&(I)->data.reply) #define TNT_IREPLY_PTR(I) &TNT_IREPLY(I)->r enum tnt_iter_status { TNT_ITER_OK, TNT_ITER_FAIL }; /* common iterator object */ struct tnt_iter { enum tnt_iter_type type; enum tnt_iter_status status; int alloc; /* interface callbacks */ int (*next)(struct tnt_iter *iter); void (*rewind)(struct tnt_iter *iter); void (*free)(struct tnt_iter *iter); /* iterator data */ union { struct tnt_iter_field field; struct tnt_iter_list list; struct tnt_iter_request request; struct tnt_iter_reply reply; struct tnt_iter_storage storage; } data; }; struct tnt_iter *tnt_iter(struct tnt_iter *i, struct tnt_tuple *t); struct tnt_iter *tnt_iter_list(struct tnt_iter *i, struct tnt_list *l); struct tnt_iter *tnt_iter_request(struct tnt_iter *i, struct tnt_stream *s); struct tnt_iter *tnt_iter_reply(struct tnt_iter *i, struct tnt_stream *s); struct tnt_iter *tnt_iter_storage(struct tnt_iter *i, struct tnt_stream *s); void tnt_iter_free(struct tnt_iter *i); int tnt_next(struct tnt_iter *i); void tnt_rewind(struct tnt_iter *i); struct tnt_iter *tnt_field(struct tnt_iter *i, struct tnt_tuple *t, uint32_t index); #endif /* TNT_ITER_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_enc.h0000664000000000000000000000277712202131537023436 0ustar rootroot#ifndef TNT_ENC_H_INCLUDED #define TNT_ENC_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ int tnt_enc_size(uint32_t value); int tnt_enc_read(const char *buf, uint32_t *value); void tnt_enc_write(char *buf, uint32_t value); #endif /* TNT_ENC_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_mem.h0000664000000000000000000000315312202131537023434 0ustar rootroot#ifndef TNT_MEM_H_INCLUDED #define TNT_MEM_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ typedef void *(tnt_allocator_t)(void *ptr, size_t size); void *tnt_mem_init(tnt_allocator_t alloc); void *tnt_mem_alloc(size_t size); void *tnt_mem_realloc(void *ptr, size_t size); char *tnt_mem_dup(char *sz); void tnt_mem_free(void *ptr); #endif /* TNT_MEM_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_stream.h0000664000000000000000000000434012202131537024150 0ustar rootroot#ifndef TNT_STREAM_H_INCLUDED #define TNT_STREAM_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include /* stream interface */ struct tnt_stream { int alloc; ssize_t (*write)(struct tnt_stream *s, const char *buf, size_t size); ssize_t (*writev)(struct tnt_stream *s, struct iovec *iov, int count); ssize_t (*write_request)(struct tnt_stream *s, struct tnt_request *r); ssize_t (*read)(struct tnt_stream *s, char *buf, size_t size); int (*read_reply)(struct tnt_stream *s, struct tnt_reply *r); int (*read_request)(struct tnt_stream *s, struct tnt_request *r); int (*read_tuple)(struct tnt_stream *s, struct tnt_tuple *t); void (*free)(struct tnt_stream *s); void *data; uint32_t wrcnt; /* count of write operations */ uint32_t reqid; }; struct tnt_stream *tnt_stream_init(struct tnt_stream *s); void tnt_stream_free(struct tnt_stream *s); uint32_t tnt_stream_reqid(struct tnt_stream *s, uint32_t reqid); #endif /* TNT_STREAM_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_dir.h0000664000000000000000000000351212202131537023433 0ustar rootroot#ifndef TNT_DIR_H_INCLUDED #define TNT_DIR_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ enum tnt_dir_type { TNT_DIR_XLOG, TNT_DIR_SNAPSHOT }; struct tnt_dir_file { uint64_t lsn; char *name; }; struct tnt_dir { enum tnt_dir_type type; char *path; struct tnt_dir_file *files; int count; }; void tnt_dir_init(struct tnt_dir *d, enum tnt_dir_type type); void tnt_dir_free(struct tnt_dir *d); int tnt_dir_scan(struct tnt_dir *d, char *path); int tnt_dir_match_gt(struct tnt_dir *d, uint64_t *out); int tnt_dir_match_inc(struct tnt_dir *d, uint64_t lsn, uint64_t *out); #endif tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_net.h0000664000000000000000000000454012202131537023445 0ustar rootroot#ifndef TNT_NET_H_INCLUDED #define TNT_NET_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include enum tnt_error { TNT_EOK, TNT_EFAIL, TNT_EMEMORY, TNT_ESYSTEM, TNT_EBIG, TNT_ESIZE, TNT_ERESOLVE, TNT_ETMOUT, TNT_EBADVAL, TNT_LAST }; struct tnt_stream_net { struct tnt_opt opt; int connected; int fd; struct tnt_iob sbuf; struct tnt_iob rbuf; enum tnt_error error; int errno_; }; #define TNT_SNET_CAST(S) ((struct tnt_stream_net*)(S)->data) struct tnt_stream *tnt_net(struct tnt_stream *s); int tnt_set(struct tnt_stream *s, int opt, ...); int tnt_init(struct tnt_stream *s); int tnt_connect(struct tnt_stream *s); void tnt_close(struct tnt_stream *s); ssize_t tnt_flush(struct tnt_stream *s); int tnt_fd(struct tnt_stream *s); enum tnt_error tnt_error(struct tnt_stream *s); char *tnt_strerror(struct tnt_stream *s); int tnt_errno(struct tnt_stream *s); #ifdef __cplusplus } #endif #endif /* TNT_NET_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_io.h0000664000000000000000000000402712202131537023266 0ustar rootroot#ifndef TNT_IO_H_INCLUDED #define TNT_IO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ enum tnt_error tnt_io_connect(struct tnt_stream_net *s, const char *host, int port); void tnt_io_close(struct tnt_stream_net *s); ssize_t tnt_io_flush(struct tnt_stream_net *s); ssize_t tnt_io_send_raw(struct tnt_stream_net *s, const char *buf, size_t size, int all); ssize_t tnt_io_sendv_raw(struct tnt_stream_net *s, struct iovec *iov, int count, int all); ssize_t tnt_io_recv_raw(struct tnt_stream_net *s, char *buf, size_t size, int all); ssize_t tnt_io_send(struct tnt_stream_net *s, const char *buf, size_t size); ssize_t tnt_io_sendv(struct tnt_stream_net *s, struct iovec *iov, int count); ssize_t tnt_io_recv(struct tnt_stream_net *s, char *buf, size_t size); #endif /* TNT_IO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt.h0000664000000000000000000000373212202131537022601 0ustar rootroot#ifndef TNT_H_INCLUDED #define TNT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __cplusplus } /* extern "C" */ #endif #endif /* TNT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/tarantool/tnt_update.h0000664000000000000000000000454512202131537024146 0ustar rootroot#ifndef TNT_UPDATE_H_INCLUDED #define TNT_UPDATE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ enum { TNT_UPDATE_ASSIGN = 0, TNT_UPDATE_ADD, TNT_UPDATE_AND, TNT_UPDATE_XOR, TNT_UPDATE_OR, TNT_UPDATE_SPLICE, TNT_UPDATE_DELETE, TNT_UPDATE_INSERT, }; ssize_t tnt_update_arith(struct tnt_stream *s, uint32_t field, uint8_t op, uint32_t value); ssize_t tnt_update_arith_i32(struct tnt_stream *s, uint32_t field, uint8_t op, uint32_t value); ssize_t tnt_update_arith_i64(struct tnt_stream *s, uint32_t field, uint8_t op, uint64_t value); ssize_t tnt_update_assign(struct tnt_stream *s, uint32_t field, char *data, uint32_t size); ssize_t tnt_update_splice(struct tnt_stream *s, uint32_t field, uint32_t offset, int32_t length, const char *data, size_t size); ssize_t tnt_update_delete(struct tnt_stream *s, uint32_t field); ssize_t tnt_update_insert(struct tnt_stream *s, uint32_t field, const char *data, uint32_t size); ssize_t tnt_update(struct tnt_stream *s, uint32_t ns, uint32_t flags, struct tnt_tuple *k, struct tnt_stream *ops); #endif /* TNT_UPDATE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/CMakeLists.txt0000664000000000000000000000015412202131537022353 0ustar rootroot # # installation of tarantool C client library headers # install(DIRECTORY tarantool DESTINATION include) tarantool-1.5.1.218.g1a69fd6/connector/c/include/tp.h0000664000000000000000000007013612212057124020416 0ustar rootroot#ifndef TP_H_INCLUDED #define TP_H_INCLUDED /* * TP - Tarantool Protocol library. * (http://tarantool.org) * * protocol description: * https://github.com/tarantool/tarantool/blob/master/doc/box-protocol.txt * ------------------- * * TP - a C library designed to create requests and process * replies to or from a Tarantool server. * * The library is designed to be used by a C/C++ application which * requires sophisticated memory control and/or performance. * * The library does not support network operations. All operations * are done in a user supplied buffer and with help of * a user-supplied allocator. * * The primary purpose of the library was to spare implementors * of Tarantool drivers in other languages, such as Perl, * Ruby, Python, etc, from the details of the binary protocol, and * also to make it possible to avoid double-buffering by writing * directly to/from language objects from/to a serialized binary * packet stream. This paradigm makes data transfer from domain * language types (such as strings, scalars, numbers, etc) to * the network format direct, and, therefore, most efficient. * * As a side effect, the library is usable in any kind of * networking environment: synchronous with buffered sockets, or * asynchronous event-based, as well as with cooperative * multitasking. * * Before using the library, please get acquainted with * Tarnatool binary protocol, documented at * https://github.com/tarantool/tarantool/blob/master/doc/box-protocol.txt * * BASIC REQUEST STRUCTURE * ----------------------- * * Any request in Tarantool consists of a 12-byte header, * containing request type, id and length, and an optional tuple * or tuples. Similarly, a response carries back the same request * type and id, and then a tuple or tuples. * * Below is a step-by-step tutorial for creating requests * and unpacking responses. * * TO ASSEMBLE A REQUEST * --------------------- * * (1) initialize an instance of struct tp with tp_init(). * Provide tp_init() with a buffer and an (optional) allocator * function. * * (2) construct requests by sequentially calling necessary * operations, such as tp_insert(), tp_delete(), tp_update(), * tp_call(). Note: these operations only append to the buffer * a request header, a body of the request, which is usually * a tuple, must be appended to the buffer with a separate call. * Each next call of tp_*() API appends request data to * the tail of the buffer. If the buffer becomes too small to * contain the binary stream, the reallocation function is * invoked to enlarge the buffer. * A buffer can contain multiple requests: Tarantool * handles them all asynchronously, sending responses * back as soon as they are ready. The request id can be then * used to associate responses with requests. * * For example: * * char buf[256]; * struct tp req; * // initialize request buffer * tp_init(&req, buf, sizeof(buf), NULL, NULL); * // append INSERT packet header to the buffer * // request flags are empty, request id is 0 * tp_insert(&req, 0, 0); * // begin appending a tuple to the request * tp_tuple(&req); * // append one tuple field * tp_sz(&req, "key"); * // one more tuple field * tp_sz(&req, "value"); * * (3) the buffer can be used right after all requests are * appended to it. tp_used() can be used to get the current * buffer size: * * write(1, buf, tp_used(&req)); // write the buffer to stdout * * (4) When no longer needed, the buffer must be freed manually. * * For additional examples, please read the documentation for * buffer operations. * * PROCESSING A REPLY * ------------------ * * (1) tp_init() must be called with a pointer to a buffer which * already stores or will eventually receive the server response. * Functions tp_reqbuf() and tp_req() can be then used to examine * if a network buffer contains a full reply or not. * * Following is an example of tp_req() usage (reading from stdin * and parsing it until a response is completely read): * * struct tp rep; * tp_init(&rep, NULL, 0, tp_realloc, NULL); * * while (1) { * ssize_t to_read = tp_req(&rep); * printf("to_read: %zu\n", to_read); * if (to_read <= 0) * break; * ssize_t new_size = tp_ensure(&rep, to_read); * printf("new_size: %zu\n", new_size); * if (new_size == -1) * return -1; * int rc = fread(rep.p, to_read, 1, stdin); * if (rc != 1) * return 1; * // discard processed data and make space available * // for new input: * tp_use(&rep, to_read); * } * * (2) tp_reply() function can be used to find out if the request * is executed successfully or not: * server_code = tp_reply(&reply); * * if (server_code != 0) { * printf("error: %-.*s\n", tp_replyerrorlen(&rep), * tp_replyerror(&rep)); * } * * Note: the library itself doesn't contain #defines for server * error codes. They are defined in * https://github.com/tarantool/tarantool/blob/master/include/errcode.h * * A server failure can be either transient or persistent. For * example, a failure to allocate memory is transient: as soon as * some data is deleted, the request can be executed again, this * time successfully. A constraint violation is a non-transient * error: it persists regardless of how many times a request * is re-executed. Server error codes can be analyzed to better * handle an error. * * (3) The server usually responds to any kind of request with a * tuple. Tuple data can be accessed via tp_next(), tp_nextfield(), * tp_gettuple(), tp_getfield(). * * See the docs for tp_reply() and tp_next()/tp_nextfield() for an * example. * * API RETURN VALUE CONVENTION * --------------------------- * * API functions return 0 on success, -1 on error. * If a function appends data to struct tp, it returns the * size appended on success, or -1 on error. * * SEE ALSO * -------- * * TP is used by Tarantool Perl driver: * https://github.com/dr-co/dr-tarantool/blob/master/Tarantool.xs */ /* * Copyright (c) 2012-2013 Tarantool AUTHORS * (https://github.com/tarantool/tarantool/blob/master/AUTHORS) * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #define tp_function_unused __attribute__((unused)) #define tp_packed __attribute__((packed)) #define tp_inline __attribute__((forceinline)) #define tp_noinline __attribute__((noinline)) #if defined(__GNUC__) #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) #define tp_hot __attribute__((hot)) #endif #endif #if !defined(tp_hot) #define tp_hot #endif #define tp_likely(expr) __builtin_expect(!! (expr), 1) #define tp_unlikely(expr) __builtin_expect(!! (expr), 0) struct tp; /* Reallocation function, can be customized for own use */ typedef char *(*tp_reserve)(struct tp *p, size_t req, size_t *size); /* request types. */ #define TP_PING 65280 #define TP_INSERT 13 #define TP_SELECT 17 #define TP_UPDATE 19 #define TP_DELETE 21 #define TP_CALL 22 /* requests flags */ #define TP_BOX_RETURN_TUPLE 1 #define TP_BOX_ADD 2 #define TP_BOX_REPLACE 4 /* update operation codes */ #define TP_OPSET 0 #define TP_OPADD 1 #define TP_OPAND 2 #define TP_OPXOR 3 #define TP_OPOR 4 #define TP_OPSPLICE 5 #define TP_OPDELETE 6 #define TP_OPINSERT 7 /* internal protocol headers */ struct tp_h { uint32_t type, len, reqid; } tp_packed; struct tp_hinsert { uint32_t space, flags; } tp_packed; struct tp_hdelete { uint32_t space, flags; } tp_packed; struct tp_hupdate { uint32_t space, flags; } tp_packed; struct tp_hcall { uint32_t flags; } tp_packed; struct tp_hselect { uint32_t space, index; uint32_t offset; uint32_t limit; uint32_t keyc; } tp_packed; /* * Main tp object - points either to a request buffer, or to * a response. * * All fields except tp->p should not be accessed directly. * Appropriate accessors should be used instead. */ struct tp { struct tp_h *h; /* current request header */ char *s, *p, *e; /* start, pos, end */ char *t, *f, *u; /* tuple, tuple field, update operation */ char *c; /* reply parsing position */ uint32_t tsz, fsz, tc; /* tuple size, field size, tuple count */ uint32_t code; /* reply server code */ uint32_t cnt; /* reply tuple count */ tp_reserve reserve; /* realloc function pointer */ void *obj; /* reallocation context pointer */ }; /* Get the size of the allocated buffer */ static inline size_t tp_size(struct tp *p) { return p->e - p->s; } /* Get the size of data in the buffer */ static inline size_t tp_used(struct tp *p) { return p->p - p->s; } /* Get the size available for write */ static inline size_t tp_unused(struct tp *p) { return p->e - p->p; } /* A common reallocation function, can be used * for 'reserve' param in tp_init(). * Resizes the buffer twice the previous size using realloc(). * * struct tp req; * tp_init(&req, NULL, tp_realloc, NULL); * tp_ping(&req); // will call the reallocator * * data must be manually freed when the buffer is no longer * needed. * (eg. free(p->s)); * if realloc will return NULL, then you must destroy previous memory. * (eg. * if (tp_realloc(p, ..) == NULL) { * free(p->s) * return NULL; * } */ tp_function_unused static char* tp_realloc(struct tp *p, size_t required, size_t *size) { size_t toalloc = tp_size(p) * 2; if (tp_unlikely(toalloc < required)) toalloc = tp_size(p) + required; *size = toalloc; return realloc(p->s, toalloc); } /* Free function for use in a pair with tp_realloc */ static inline void tp_free(struct tp *p) { free(p->s); } /* Get currently allocated buffer pointer */ static inline char* tp_buf(struct tp *p) { return p->s; } /* Main initialization function. * * reserve - reallocation function, may be NULL * obj - pointer to be passed to the reallocation function as * context * buf - current buffer, may be NULL * size - current buffer size * * Either a buffer pointer or a reserve function must be * provided. */ static inline void tp_init(struct tp *p, char *buf, size_t size, tp_reserve reserve, void *obj) { p->s = buf; p->p = p->s; p->e = p->s + size; p->t = NULL; p->f = NULL; p->u = NULL; p->c = NULL; p->h = NULL; p->tsz = 0; p->fsz = 0; p->cnt = 0; p->code = 0; p->reserve = reserve; p->obj = obj; } /* Ensure that buffer has enough space to fill size bytes, resize * buffer if needed. */ static tp_noinline ssize_t tp_ensure(struct tp *p, size_t size) { if (tp_likely(tp_unused(p) >= size)) return 0; if (tp_unlikely(p->reserve == NULL)) return -1; size_t sz; register char *np = p->reserve(p, size, &sz); if (tp_unlikely(np == NULL)) return -1; p->p = np + (p->p - p->s); if (tp_likely(p->h)) p->h = (struct tp_h*)(np + (((char*)p->h) - p->s)); if (tp_likely(p->t)) p->t = np + (p->t - p->s); if (tp_unlikely(p->f)) p->f = (np + (p->f - p->s)); if (tp_unlikely(p->u)) p->u = (np + (p->u - p->s)); p->s = np; p->e = np + sz; return sz; } /* Mark size bytes as used. * Can be used to tell the buffer that a chunk has been read * from the network into it. */ static inline ssize_t tp_use(struct tp *p, size_t size) { p->p += size; return tp_used(p); } /* Append data to the buffer. * Mostly unnecessary, but can be used to add any raw * iproto-format data to the buffer. * Normally tp_tuple(), tp_field() and tp_sz() should be used * instead. */ static inline ssize_t tp_append(struct tp *p, const void *data, size_t size) { if (tp_unlikely(tp_ensure(p, size) == -1)) return -1; memcpy(p->p, data, size); return tp_use(p, size); } /* Set the current request id. * * tp_ping(&req); * tp_reqid(&req, 777); */ static inline void tp_reqid(struct tp *p, uint32_t reqid) { assert(p->h != NULL); p->h->reqid = reqid; } /* Return the current request id */ static inline uint32_t tp_getreqid(struct tp *p) { assert(p->h != NULL); return p->h->reqid; } /* Get tuple count */ static inline uint32_t tp_tuplecount(struct tp *p) { assert(p->t != NULL); return *(uint32_t*)(p->t); } /* Write a tuple header */ static inline ssize_t tp_tuple(struct tp *p) { assert(p->h != NULL); if (tp_unlikely(tp_ensure(p, sizeof(uint32_t)) == -1)) return -1; *(uint32_t*)(p->t = p->p) = 0; p->p += sizeof(uint32_t); p->h->len += sizeof(uint32_t); if (p->h->type == TP_SELECT) { ((struct tp_hselect*) ((char*)p->h + sizeof(struct tp_h)))->keyc++; } return tp_used(p); } /* Ber128 calculation functions, internally used by the library */ static inline size_t tp_ber128sizeof(uint32_t value) { return ( tp_likely(value < (1 << 7))) ? 1 : ( tp_likely(value < (1 << 14))) ? 2 : (tp_unlikely(value < (1 << 21))) ? 3 : (tp_unlikely(value < (1 << 28))) ? 4 : 5; } static tp_noinline void tp_hot tp_ber128save_slowpath(struct tp *p, uint32_t value) { if (tp_unlikely(value >= (1 << 21))) { if (tp_unlikely(value >= (1 << 28))) *(p->p++) = (value >> 28) | 0x80; *(p->p++) = (value >> 21) | 0x80; } p->p[0] = ((value >> 14) | 0x80); p->p[1] = ((value >> 7) | 0x80); p->p[2] = value & 0x7F; p->p += 3; } static inline void tp_hot tp_ber128save(struct tp *p, uint32_t value) { if (tp_unlikely(value >= (1 << 14))) { tp_ber128save_slowpath(p, value); return; } if (tp_likely(value >= (1 << 7))) *(p->p++) = ((value >> 7) | 0x80); *(p->p++) = ((value) & 0x7F); } static tp_noinline int tp_hot tp_ber128load_slowpath(struct tp *p, uint32_t *value) { if (tp_likely(! (p->f[2] & 0x80))) { *value = (p->f[0] & 0x7f) << 14 | (p->f[1] & 0x7f) << 7 | (p->f[2] & 0x7f); p->f += 3; } else if (! (p->f[3] & 0x80)) { *value = (p->f[0] & 0x7f) << 21 | (p->f[1] & 0x7f) << 14 | (p->f[2] & 0x7f) << 7 | (p->f[3] & 0x7f); p->f += 4; } else if (! (p->f[4] & 0x80)) { *value = (p->f[0] & 0x7f) << 28 | (p->f[1] & 0x7f) << 21 | (p->f[2] & 0x7f) << 14 | (p->f[3] & 0x7f) << 7 | (p->f[4] & 0x7f); p->f += 5; } else return -1; return 0; } static inline int tp_hot tp_ber128load(struct tp *p, uint32_t *value) { if (tp_likely(! (p->f[0] & 0x80))) { *value = *(p->f++) & 0x7f; } else if (tp_likely(! (p->f[1] & 0x80))) { *value = (p->f[0] & 0x7f) << 7 | (p->f[1] & 0x7f); p->f += 2; } else return tp_ber128load_slowpath(p, value); return 0; } /* Write a tuple field * Note: the tuple must be started prior to calling * this function with tp_tuple() call. */ static inline ssize_t tp_field(struct tp *p, const char *data, size_t size) { assert(p->h != NULL); assert(p->t != NULL); register int esz = tp_ber128sizeof(size); if (tp_unlikely(tp_ensure(p, esz + size) == -1)) return -1; tp_ber128save(p, size); memcpy(p->p, data, size); p->p += size; (*(uint32_t*)p->t)++; p->h->len += esz + size; return tp_used(p); } /* Set the current request. * Note: this is an internal helper function, not part of the * tp.h API. */ static inline void tp_setreq(struct tp *p) { p->h = (struct tp_h*)p->p; p->t = NULL; p->u = NULL; } /* Set current request and append data to the buffer. * Note: this is an internal helper function, not part of the * tp.h API. tp_ping(), tp_update() and other functions * which directly create a request header should be used * instead. */ static inline ssize_t tp_appendreq(struct tp *p, void *h, size_t size) { int isallocated = p->p != NULL; tp_setreq(p); ssize_t rc = tp_append(p, h, size); if (tp_unlikely(rc == -1)) return -1; if (!isallocated) p->h = (struct tp_h*)p->s; return rc; } /* Create a ping request. * * char buf[64]; * struct tp req; * tp_init(&req, buf, sizeof(buf), NULL, NULL); * tp_ping(&req); */ static inline ssize_t tp_ping(struct tp *p) { struct tp_h h = { TP_PING, 0, 0 }; return tp_appendreq(p, &h, sizeof(h)); } /* Create an insert request. * * char buf[64]; * struct tp req; * tp_init(&req, buf, sizeof(buf), NULL, NULL); * tp_insert(&req, 0, TP_FRET); * tp_tuple(&req); * tp_sz(&req, "key"); * tp_sz(&req, "value"); */ static inline ssize_t tp_insert(struct tp *p, uint32_t space, uint32_t flags) { struct { struct tp_h h; struct tp_hinsert i; } h; h.h.type = TP_INSERT; h.h.len = sizeof(struct tp_hinsert); h.h.reqid = 0; h.i.space = space; h.i.flags = flags; return tp_appendreq(p, &h, sizeof(h)); } /* Create a delete request. * * char buf[64]; * struct tp req; * tp_init(&req, buf, sizeof(buf), NULL, NULL); * tp_delete(&req, 0, 0); * tp_tuple(&req); * tp_sz(&req, "key"); */ static inline ssize_t tp_delete(struct tp *p, uint32_t space, uint32_t flags) { struct { struct tp_h h; struct tp_hdelete d; } h; h.h.type = TP_DELETE; h.h.len = sizeof(struct tp_hdelete); h.h.reqid = 0; h.d.space = space; h.d.flags = flags; return tp_appendreq(p, &h, sizeof(h)); } /* Create a call request. * * char buf[64]; * struct tp req; * tp_init(&req, buf, sizeof(buf), NULL, NULL); * * char proc[] = "hello_proc"; * tp_call(&req, 0, proc, sizeof(proc) - 1); * tp_tuple(&req); * tp_sz(&req, "arg1"); * tp_sz(&req, "arg2"); */ static inline ssize_t tp_call(struct tp *p, uint32_t flags, const char *name, size_t name_len) { struct { struct tp_h h; struct tp_hcall c; } h; size_t sz = tp_ber128sizeof(name_len); h.h.type = TP_CALL; h.h.len = sizeof(struct tp_hcall) + sz + name_len; h.h.reqid = 0; h.c.flags = flags; if (tp_unlikely(tp_ensure(p, sizeof(h) + sz + name_len) == -1)) return -1; tp_setreq(p); memcpy(p->p, &h, sizeof(h)); p->p += sizeof(h); tp_ber128save(p, name_len); memcpy(p->p, name, name_len); p->p += name_len; return tp_used(p); } /* Append a select request. * * char buf[64]; * struct tp req; * tp_init(&req, buf, sizeof(buf), NULL, NULL); * tp_select(&req, 0, 0, 0, 100); * tp_tuple(&req); * tp_sz(&req, "key"); */ static inline ssize_t tp_select(struct tp *p, uint32_t space, uint32_t index, uint32_t offset, uint32_t limit) { struct { struct tp_h h; struct tp_hselect s; } h; h.h.type = TP_SELECT; h.h.len = sizeof(struct tp_hselect); h.h.reqid = 0; h.s.space = space; h.s.index = index; h.s.offset = offset; h.s.limit = limit; h.s.keyc = 0; return tp_appendreq(p, &h, sizeof(h)); } /* Create an update request. * * char buf[64]; * struct tp req; * tp_init(&req, buf, sizeof(buf), NULL, NULL); * tp_update(&req, 0, 0); * tp_tuple(&req); * tp_sz(&req, "key"); * tp_updatebegin(&req); * tp_op(&req, 1, TP_OPSET, "VALUE", 5); */ static inline ssize_t tp_update(struct tp *p, uint32_t space, uint32_t flags) { struct { struct tp_h h; struct tp_hupdate u; } h; h.h.type = TP_UPDATE; h.h.len = sizeof(struct tp_hupdate); h.h.reqid = 0; h.u.space = space; h.u.flags = flags; return tp_appendreq(p, &h, sizeof(h)); } /* Append the number of operations the update request * is going to contain. * Must be called right after appending the key which * identifies the tuple which must be updated. Since * the key can be multipart, tp_tuple() must be used to * append it. * * In other words, this call sequence creates a proper * UPDATE request: * tp_init(...) * tp_update() * tp_tuple() * tp_sz(), tp_sz(), ... * tp_updatebegin() * tp_op(), tp_op(), ... */ static inline ssize_t tp_updatebegin(struct tp *p) { assert(p->h != NULL); assert(p->h->type == TP_UPDATE); if (tp_unlikely(tp_ensure(p, sizeof(uint32_t)) == -1)) return -1; *(uint32_t*)(p->u = p->p) = 0; p->p += sizeof(uint32_t); p->h->len += sizeof(uint32_t); return tp_used(p); } /* Append a single UPDATE operation. * * May be called after tp_updatebegin(). * Can be used to create TP_OPSET, TP_OPADD, TP_OPAND, * TP_OPXOR, TP_OPOR operations. * * See: tp_update() for example. */ static inline ssize_t tp_op(struct tp *p, uint32_t field, uint8_t op, const char *data, size_t size) { assert(p->h != NULL); assert(p->u != NULL); assert(p->h->type == TP_UPDATE); size_t sz = 4 + 1 + tp_ber128sizeof(size) + size; if (tp_unlikely(tp_ensure(p, sz)) == -1) return -1; /* field */ *(uint32_t*)(p->p) = field; p->p += sizeof(uint32_t); /* operation */ *(uint8_t*)(p->p) = op; p->p += sizeof(uint8_t); /* data */ tp_ber128save(p, size); if (tp_likely(data)) memcpy(p->p, data, size); p->p += size; /* update offset and count */ p->h->len += sz; (*(uint32_t*)p->u)++; return tp_used(p); } /* Append a SPLICE operation. This operation is unlike any other, * since it takes three arguments instead of one. */ static inline ssize_t tp_opsplice(struct tp *p, uint32_t field, uint32_t offset, uint32_t cut, const char *paste, size_t paste_len) { uint32_t olen = tp_ber128sizeof(sizeof(offset)), clen = tp_ber128sizeof(sizeof(cut)), plen = tp_ber128sizeof(paste_len); uint32_t sz = olen + sizeof(offset) + clen + sizeof(cut) + plen + paste_len; ssize_t rc = tp_op(p, field, TP_OPSPLICE, NULL, sz); if (tp_unlikely(rc == -1)) return -1; p->p -= sz; tp_ber128save(p, sizeof(offset)); memcpy(p->p, &offset, sizeof(offset)); p->p += sizeof(offset); tp_ber128save(p, sizeof(cut)); memcpy(p->p, &cut, sizeof(cut)); p->p += sizeof(cut); tp_ber128save(p, paste_len); memcpy(p->p, paste, paste_len); p->p += paste_len; return rc; } /* Append a '\0' terminated string as a tuple field. */ static inline ssize_t tp_sz(struct tp *p, const char *sz) { return tp_field(p, sz, strlen(sz)); } /* * Returns the number of bytes which are required to fully * store a reply in the buffer. * The return value can be negative, which indicates that * there is a complete reply in the buffer which is not parsed * and discarded yet. */ static inline ssize_t tp_reqbuf(const char *buf, size_t size) { if (tp_unlikely(size < sizeof(struct tp_h))) return sizeof(struct tp_h) - size; register int sz = ((struct tp_h*)buf)->len + sizeof(struct tp_h); return (tp_likely(size < sz)) ? sz - size : -(size - sz); } /* Same as tp_reqbuf(), but works on the buffer in struct tp. */ static inline ssize_t tp_req(struct tp *p) { return tp_reqbuf(p->s, tp_size(p)); } /* Get the size of a yet unprocessed reply data. * * This is not part of the API. */ static inline size_t tp_unfetched(struct tp *p) { return p->p - p->c; } /* Advance the reply processed pointer. * * This is not part of the API, tp_use() is a higher level * function. */ static inline void* tp_fetch(struct tp *p, int inc) { assert(tp_unfetched(p) >= inc); register char *po = p->c; p->c += inc; return po; } /* Get the last server error. */ static inline char* tp_replyerror(struct tp *p) { return p->c; } /* Get the length of the last error message. */ static inline int tp_replyerrorlen(struct tp *p) { return tp_unfetched(p); } /* Get the tuple count in the response (there must be * no error). */ static inline uint32_t tp_replycount(struct tp *p) { return p->cnt; } /* Get the current response return code. */ static inline uint32_t tp_replycode(struct tp *p) { return p->code; } /* Get the current response operation code. */ static inline uint32_t tp_replyop(struct tp *p) { return p->h->type; } /* * Initialize the buffer with a fully read server response. * The response is parsed. * * struct tp rep; * tp_init(&rep, reply_buf, reply_size, NULL, NULL); * * ssize_t server_code = tp_reply(&rep); * * printf("op: %d\n", tp_replyop(&rep)); * printf("count: %d\n", tp_replycount(&rep)); * printf("code: %zu\n", server_code); * * if (server_code != 0) { * printf("error: %-.*s\n", tp_replyerrorlen(&rep), * tp_replyerror(&rep)); * } * */ tp_function_unused static ssize_t tp_reply(struct tp *p) { ssize_t used = tp_req(p); if (tp_unlikely(used > 0)) return -1; /* this is end of packet in continious buffer */ p->p = p->e + used; /* end - used */ p->c = p->s; p->h = tp_fetch(p, sizeof(struct tp_h)); p->t = p->f = p->u = NULL; p->cnt = 0; p->code = 0; if (tp_unlikely(p->h->type == TP_PING)) return 0; if (tp_unlikely(p->h->type != TP_UPDATE && p->h->type != TP_INSERT && p->h->type != TP_DELETE && p->h->type != TP_SELECT && p->h->type != TP_CALL)) return -1; p->code = *(uint32_t*)tp_fetch(p, sizeof(uint32_t)); if (p->code != 0) return p->code; /* BOX_QUIET */ if (tp_unlikely(tp_unfetched(p) == 0)) return p->code; p->cnt = *(uint32_t*)tp_fetch(p, sizeof(uint32_t)); return p->code; } /* Example: iteration over returned tuples. * * while (tp_next(&rep)) { * printf("tuple fields: %d\n", tp_tuplecount(&rep)); * printf("tuple size: %d\n", tp_tuplesize(&rep)); * printf("["); * while (tp_nextfield(&rep)) { * printf("%-.*s", tp_getfieldsize(rep), tp_getfield(&rep)); * if (tp_hasnextfield(&rep)) * printf(", "); * } * printf("]\n"); * } */ /* Rewind iteration to the first tuple. */ static inline void tp_rewind(struct tp *p) { p->t = NULL; p->f = NULL; } /* Rewind iteration to the first tuple field of the current tuple. */ static inline void tp_rewindfield(struct tp *p) { p->f = NULL; } /* Get the current tuple data, all fields. */ static inline char* tp_gettuple(struct tp *p) { return p->t; } /* Get the current tuple size. */ static inline uint32_t tp_tuplesize(struct tp *p) { return p->tsz; } /* Get the current field. */ static inline char* tp_getfield(struct tp *p) { return p->f; } /* Get the current field size. */ static inline uint32_t tp_getfieldsize(struct tp *p) { return p->fsz; } /* Get a pointer to the end of the current tuple. */ static inline char* tp_tupleend(struct tp *p) { /* tuple_size + p->t + cardinaltiy_size + * fields_size */ return p->t + 4 + p->tsz; } /* Check if the response has a tuple. * Automatically checked during tp_next() iteration. */ static inline int tp_hasdata(struct tp *p) { return tp_replyop(p) != TP_PING && tp_unfetched(p) > 0; } /* Check if there is a one more tuple. */ static inline int tp_hasnext(struct tp *p) { assert(p->t != NULL); return (p->p - tp_tupleend(p)) >= 4; } /* Check if the current tuple has a one more field. */ static inline int tp_hasnextfield(struct tp *p) { assert(p->t != NULL); register char *f = p->f + p->fsz; if (tp_unlikely(p->f == NULL)) f = p->t + 4; return (tp_tupleend(p) - f) >= 1; } /* Skip to the next tuple. * Tuple can be accessed using: * tp_tuplecount(), tp_tuplesize(), tp_gettuple(). */ static inline int tp_next(struct tp *p) { if (tp_unlikely(p->t == NULL)) { if (tp_unlikely(! tp_hasdata(p))) return 0; p->t = p->c + 4; goto fetch; } if (tp_unlikely(! tp_hasnext(p))) return 0; p->t = tp_tupleend(p) + 4; fetch: p->tsz = *(uint32_t*)(p->t - 4); if (tp_unlikely((p->t + p->tsz) > p->e)) return -1; p->f = NULL; return 1; } /* Skip to the next field. * Data can be accessed using: tp_getfieldsize(), tp_getfield(). */ static inline int tp_nextfield(struct tp *p) { assert(p->t != NULL); if (tp_unlikely(p->f == NULL)) { if (tp_unlikely(! tp_hasnextfield(p))) return 0; p->f = p->t + 4; goto fetch; } if (tp_unlikely(! tp_hasnextfield(p))) return 0; p->f += p->fsz; fetch:; register int rc = tp_ber128load(p, &p->fsz); if (tp_unlikely(rc == -1)) return -1; if (tp_unlikely((p->f + p->fsz) > p->e)) return -1; return 1; } #ifdef __cplusplus } /* extern "C" */ #endif #endif /* TP_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/connector/c/include/Makefile0000664000000000000000000001531512213333034021256 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/include/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/include/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/include/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/include/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/0000775000000000000000000000000012213333320017511 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/cmake_install.cmake0000664000000000000000000000574012213333034023331 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/libtarantoolsql.a") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolsql.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolsql.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolsql.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") FILE(RPATH_CHECK FILE "${file}" RPATH "") ENDIF() ENDFOREACH() FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/libtarantoolsql.so.1.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/libtarantoolsql.so.1" "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/libtarantoolsql.so" ) FOREACH(file "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolsql.so.1.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolsql.so.1" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libtarantoolsql.so" ) IF(EXISTS "${file}" AND NOT IS_SYMLINK "${file}") FILE(RPATH_REMOVE FILE "${file}") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "${file}") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDFOREACH() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/libtarantoolsql.so.10000777000000000000000000000000012213333051027474 2libtarantoolsql.so.1.1ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/tnt_sql.c0000664000000000000000000003322012202131537021345 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include /* sql parsing context. */ struct tnt_sql { struct tnt_stream *s; struct tnt_lex *l; char *error; }; static bool tnt_sql_error(struct tnt_sql *sql, struct tnt_tk *last, const char *fmt, ...) { char msgu[256]; va_list args; va_start(args, fmt); vsnprintf(msgu, sizeof(msgu), fmt, args); va_end(args); int line = (last) ? last->line : sql->l->line; int col = (last) ? last->col : sql->l->col; char msg[256]; snprintf(msg, sizeof(msg), "%d:%d %s", line, col, msgu); if (sql->error == NULL) sql->error = tnt_mem_dup(msg); return false; } /* token validating routines. */ static bool tnt_sql_tk(struct tnt_sql *sql, int tk, struct tnt_tk **tkp) { struct tnt_tk *tkp_ = NULL; int tk_ = tnt_lex(sql->l, &tkp_); if (tk_ == TNT_TK_ERROR) return tnt_sql_error(sql, NULL, "%s", sql->l->error); if (tk_ != tk) { if (tk < 0xff && ispunct(tk)) return tnt_sql_error(sql, tkp_, "expected '%c'", tk); return tnt_sql_error(sql, tkp_, "expected '%s'", tnt_lex_nameof(sql->l, tk)); } if (tkp) *tkp = tkp_; return true; } inline static bool tnt_sqltk(struct tnt_sql *sql,int tk) { return tnt_sql_tk(sql, tk, NULL); } inline static bool tnt_sqltkv(struct tnt_sql *sql, int tk, struct tnt_tk **tkp) { return tnt_sql_tk(sql, tk, tkp); } static bool tnt_sql_try(struct tnt_sql *sql, int tk, struct tnt_tk **tkp) { struct tnt_tk *tkp_ = NULL; int tk_ = tnt_lex(sql->l, &tkp_); if (tk_ == TNT_TK_ERROR) return tnt_sql_error(sql, NULL, "%s", sql->l->error); if (tk_ != tk) { tnt_lex_push(sql->l, tkp_); return false; } if (tkp) *tkp = tkp_; return true; } inline static int tnt_sqltry(struct tnt_sql *sql, int tk) { return tnt_sql_try(sql, tk, NULL); } inline static int tnt_sqltryv(struct tnt_sql *sql, int tk, struct tnt_tk **tkp) { return tnt_sql_try(sql, tk, tkp); } /* key-value parsing for tuple operation. */ static bool tnt_sql_keyval(struct tnt_sql *sql, struct tnt_tuple *tu, bool key, struct tnt_tk **kt) { /* key */ struct tnt_tk *k = NULL; if (key && (!tnt_sqltkv(sql, TNT_TK_KEY, &k) || !tnt_sqltk(sql, '='))) return false; if (kt) *kt = k; /* value */ struct tnt_tk *v = NULL; if (tnt_lex(sql->l, &v) == TNT_TK_ERROR) return tnt_sql_error(sql, NULL, "%s", sql->l->error); switch (v->tk) { case TNT_TK_NUM32: tnt_tuple_add(tu, (char*)&TNT_TK_I32(v), 4); break; case TNT_TK_NUM64: tnt_tuple_add(tu, (char*)&TNT_TK_I64(v), 8); break; case TNT_TK_STRING: tnt_tuple_add(tu, (char*)TNT_TK_S(v)->data, TNT_TK_S(v)->size); break; default: return tnt_sql_error(sql, k, "expected NUM32 or NUM64 or STRING"); } return true; } static bool tnt_sql_kv(struct tnt_sql *sql, struct tnt_tuple *tu, bool key) { return tnt_sql_keyval(sql, tu, key, NULL); } static bool tnt_sql_kv_select(struct tnt_sql *sql, struct tnt_tuple *tu, int32_t *index) { struct tnt_tk *key = NULL; bool rc = tnt_sql_keyval(sql, tu, true, &key); if (rc == false) return false; if (*index == -1) *index = TNT_TK_I32(key); else if (*index != TNT_TK_I32(key)) return tnt_sql_error(sql, key, "select key values must refer to the same index"); return true; } #define tnt_expect(a) \ do { if (!(a)) goto error; } while (0) /* parsing update statement. */ static bool tnt_sql_stmt_update(struct tnt_sql *sql, struct tnt_tuple *tu, struct tnt_stream *u) { /* UPDATE TABLE SET operations WHERE predicate */ bool rc = false; struct tnt_tk *tn = NULL; tnt_expect(tnt_sqltkv(sql, TNT_TK_TABLE, &tn)); tnt_expect(tnt_sqltk(sql, TNT_TK_SET)); while (1) { struct tnt_tk *k = NULL; tnt_expect(tnt_sqltkv(sql, TNT_TK_KEY, &k)); tnt_expect(tnt_sqltk(sql, '=')); struct tnt_tk *v; switch (tnt_lex(sql->l, &v)) { /* k = k op v */ case TNT_TK_KEY: if (TNT_TK_I32(k) != TNT_TK_I32(v)) { tnt_sql_error(sql, k, "can't update on different keys"); goto error; } int ut; switch (tnt_lex(sql->l, &v)) { case TNT_TK_ERROR: tnt_sql_error(sql, k, "%s", sql->l->error); goto error; case '+': ut = TNT_UPDATE_ADD; break; case '&': ut = TNT_UPDATE_AND; break; case '^': ut = TNT_UPDATE_XOR; break; case '|': ut = TNT_UPDATE_OR; break; default: tnt_sql_error(sql, k, "bad update operation"); goto error; } tnt_expect(tnt_sqltkv(sql, TNT_TK_NUM32, &v)); tnt_update_arith(u, TNT_TK_I32(k), ut, TNT_TK_I32(v)); break; /* k = string */ case TNT_TK_STRING: tnt_update_assign(u, TNT_TK_I32(k), (char*)TNT_TK_S(v)->data, TNT_TK_S(v)->size); break; /* k = num32 */ case TNT_TK_NUM32: tnt_update_assign(u, TNT_TK_I32(k), (char*)&TNT_TK_I32(v), 4); break; /* k = num64 */ case TNT_TK_NUM64: tnt_update_assign(u, TNT_TK_I64(k), (char*)&TNT_TK_I64(v), 8); break; /* k = splice(k, a, b) */ case TNT_TK_SPLICE: { struct tnt_tk *field = NULL, *off = NULL, *len = NULL, *list = NULL; tnt_expect(tnt_sqltk(sql, '(')); tnt_expect(tnt_sqltkv(sql, TNT_TK_KEY, &field)); if (TNT_TK_I32(k) != TNT_TK_I32(field)) { tnt_sql_error(sql, k, "can't update on different keys"); goto error; } tnt_expect(tnt_sqltk(sql, ',')); tnt_expect(tnt_sqltkv(sql, TNT_TK_NUM32, &off)); tnt_expect(tnt_sqltk(sql, ',')); tnt_expect(tnt_sqltkv(sql, TNT_TK_NUM32, &len)); tnt_expect(tnt_sqltk(sql, ',')); tnt_expect(tnt_sqltkv(sql, TNT_TK_STRING, &list)); tnt_expect(tnt_sqltk(sql, ')')); tnt_update_splice(u, TNT_TK_I32(k), TNT_TK_I32(off), TNT_TK_I32(len), (char*)TNT_TK_S(list)->data, TNT_TK_S(list)->size); break; } case TNT_TK_ERROR: tnt_sql_error(sql, k, "%s", sql->l->error); goto error; } if (tnt_sqltry(sql, ',')) continue; if (sql->error) goto error; break; } tnt_expect(tnt_sqltk(sql, TNT_TK_WHERE)); /* predicate */ tnt_expect(tnt_sql_kv(sql, tu, true)); tnt_expect(tnt_sqltk(sql, TNT_TK_EOF)); if (tnt_update(sql->s, TNT_TK_I32(tn), 0, tu, u) == -1) { tnt_sql_error(sql, tn, "update failed"); goto error; } rc = true; error: return rc; } /* parsing single sql statement. */ static bool tnt_sql_stmt(struct tnt_sql *sql) { struct tnt_tuple tu; struct tnt_list tuples; struct tnt_stream update; tnt_tuple_init(&tu); tnt_list_init(&tuples); tnt_buf(&update); int flags = 0; struct tnt_tk *tk = NULL, *tn = NULL; bool rc = false; switch (tnt_lex(sql->l, &tk)) { /* [INTO] TABLE VALUES ( list ) */ case TNT_TK_INSERT: case TNT_TK_REPLACE: tnt_sqltry(sql, TNT_TK_INTO); if (sql->error) goto error; tnt_expect(tnt_sqltkv(sql, TNT_TK_TABLE, &tn)); tnt_expect(tnt_sqltk(sql, TNT_TK_VALUES)); tnt_expect(tnt_sqltk(sql, '(')); while (1) { tnt_expect(tnt_sql_kv(sql, &tu, false)); if (tnt_sqltry(sql, ',')) continue; if (sql->error) goto error; break; } flags = TNT_FLAG_ADD; if (tk->tk == TNT_TK_REPLACE) flags = TNT_FLAG_REPLACE; tnt_expect(tnt_sqltk(sql, ')')); tnt_expect(tnt_sqltk(sql, TNT_TK_EOF)); if (tnt_insert(sql->s, TNT_TK_I32(tn), flags, &tu) == -1) { tnt_sql_error(sql, tk, "insert failed"); goto error; } break; /* UPDATE TABLE SET operations WHERE predicate */ case TNT_TK_UPDATE: if (!tnt_sql_stmt_update(sql, &tu, &update)) goto error; break; /* DELETE FROM TABLE WHERE predicate */ case TNT_TK_DELETE: tnt_expect(tnt_sqltk(sql, TNT_TK_FROM)); tnt_expect(tnt_sqltkv(sql, TNT_TK_TABLE, &tn)); tnt_expect(tnt_sqltk(sql, TNT_TK_WHERE)); /* predicate */ tnt_expect(tnt_sql_kv(sql, &tu, true)); tnt_expect(tnt_sqltk(sql, TNT_TK_EOF)); if (tnt_delete(sql->s, TNT_TK_I32(tn), 0, &tu) == -1) { tnt_sql_error(sql, tk, "delete failed"); goto error; } break; /* SELECT * FROM TABLE WHERE predicate OR predicate... LIMIT NUM */ case TNT_TK_SELECT: { tnt_expect(tnt_sqltk(sql, '*')); tnt_expect(tnt_sqltk(sql, TNT_TK_FROM)); tnt_expect(tnt_sqltkv(sql, TNT_TK_TABLE, &tn)); tnt_expect(tnt_sqltk(sql, TNT_TK_WHERE)); int32_t index = -1; while (1) { struct tnt_tuple *tup = tnt_list_at(&tuples, NULL); while (1) { tnt_expect(tnt_sql_kv_select(sql, tup, &index)); if (tnt_sqltry(sql, TNT_TK_AND)) continue; if (sql->error) goto error; break; } if (tnt_sqltry(sql, TNT_TK_OR)) continue; if (sql->error) goto error; break; } uint32_t limit = UINT32_MAX; if (tnt_sqltry(sql, TNT_TK_LIMIT)) { struct tnt_tk *ltk; tnt_expect(tnt_sqltkv(sql, TNT_TK_NUM32, <k)); limit = TNT_TK_I32(ltk); } else if (sql->error) goto error; tnt_expect(tnt_sqltk(sql, TNT_TK_EOF)); if (tnt_select(sql->s, TNT_TK_I32(tn), index, 0, limit, &tuples) == -1) { tnt_sql_error(sql, tk, "select failed"); goto error; } break; } /* CALL NAME[{.NAME}+](STRING [{,STRING}+]) */ case TNT_TK_CALL: { char proc[512]; int len = 0; while (1) { struct tnt_tk *name = NULL; tnt_lex_idonly(sql->l, true); tnt_expect(tnt_sqltkv(sql, TNT_TK_ID, &name)); tnt_lex_idonly(sql->l, false); len += snprintf(proc + len, sizeof(proc) - len, "%.*s", (int)TNT_TK_S(name)->size, TNT_TK_S(name)->data); if (!tnt_sqltry(sql, '.')) break; if (sql->error) goto error; len += snprintf(proc + len, sizeof(proc) - len, "%s", "."); } tnt_expect(tnt_sqltk(sql, '(')); if (tnt_sqltry(sql, ')')) goto noargs; if (sql->error) goto error; while (1) { tnt_expect(tnt_sql_kv(sql, &tu, false)); if (tnt_sqltry(sql, ',')) continue; if (sql->error) goto error; break; } tnt_expect(tnt_sqltk(sql, ')')); noargs: tnt_expect(tnt_sqltk(sql, TNT_TK_EOF)); if (tnt_call(sql->s, 0, proc, &tu) == -1) { tnt_sql_error(sql, tk, "call failed"); goto error; } break; } /* PING */ case TNT_TK_PING: tnt_expect(tnt_sqltk(sql, TNT_TK_EOF)); if (tnt_ping(sql->s) == -1) { tnt_sql_error(sql, tk, "ping failed"); goto error; } break; case TNT_TK_EOF: break; case TNT_TK_ERROR: return tnt_sql_error(sql, tk, "%s", sql->l->error); default: return tnt_sql_error(sql, tk, "insert, replace, update, delete, select, call, ping are expected"); } rc = true; error: tnt_tuple_free(&tu); tnt_list_free(&tuples); tnt_stream_free(&update); return rc; } #undef tnt_expect /* primary sql grammar parsing function. */ static bool tnt_sql(struct tnt_sql *sql) { return tnt_sql_stmt(sql); } struct tnt_lex_keyword tnt_sql_keywords[] = { { "PING", 4, TNT_TK_PING }, { "UPDATE", 6, TNT_TK_UPDATE }, { "SET", 3, TNT_TK_SET }, { "WHERE", 5, TNT_TK_WHERE }, { "SPLICE", 6, TNT_TK_SPLICE }, { "DELETE", 6, TNT_TK_DELETE }, { "FROM", 4, TNT_TK_FROM }, { "INSERT", 6, TNT_TK_INSERT }, { "REPLACE", 7, TNT_TK_REPLACE }, { "INTO", 4, TNT_TK_INTO }, { "VALUES", 6, TNT_TK_VALUES }, { "SELECT", 6, TNT_TK_SELECT }, { "OR", 2, TNT_TK_OR }, { "AND", 3, TNT_TK_AND }, { "LIMIT", 5, TNT_TK_LIMIT }, { "CALL", 4, TNT_TK_CALL }, { NULL, 0, TNT_TK_NONE } }; /* * tnt_query() * * Parses and processes supplied SQL query; * * s - stream pointer * q - sql query string * qsize - query size * e - error description string * * returns 0 on success, or -1 on error * and string description returned (must be freed after use). */ int tnt_query(struct tnt_stream *s, const char *q, size_t qsize, char **e) { struct tnt_lex l; if (!tnt_lex_init(&l, tnt_sql_keywords, (unsigned char*)q, qsize)) return -1; struct tnt_sql sql = { s, &l, NULL }; bool ret = tnt_sql(&sql); if (e) { *e = sql.error; } else { if (sql.error) tnt_mem_free(sql.error); } tnt_lex_free(&l); return (ret) ? 0 : -1; } /* * tnt_query_is() * * Tells if the supplied query should be processed as SQL. * * q - sql query string * qsize - query size * * returns 1 if yes, 0 otherwise. */ int tnt_query_is(char *q, size_t qsize) { struct tnt_lex l; if (!tnt_lex_init(&l, tnt_sql_keywords, (unsigned char*)q, qsize)) return 0; int rc = 0; struct tnt_tk *tk; switch (tnt_lex(&l, &tk)) { case TNT_TK_ERROR: case TNT_TK_EOF: break; default: if (tk->tk == TNT_TK_PING || tk->tk == TNT_TK_INSERT || tk->tk == TNT_TK_REPLACE || tk->tk == TNT_TK_UPDATE || tk->tk == TNT_TK_SELECT || tk->tk == TNT_TK_DELETE || tk->tk == TNT_TK_CALL) rc = 1; break; } tnt_lex_free(&l); return rc; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/libtarantoolsql.a0000664000000000000000000016310012213333044023071 0ustar rootroot! / 1378727460 0 0 0 288 ` ddddddd""""""mmmtnt_utf8_inittnt_utf8_strlentnt_utf8_freetnt_utf8_chrlentnt_utf8_sizeoftnt_utf8_cmptnt_utf8_nexttnt_lex_inittnt_lex_freetnt_lex_pushtnt_lex_idonlytnt_lex_nameoftnt_lextnt_sql_keywordstnt_querytnt_query_istnt_utf8.c.o/ 1378727459 1000 1000 100664 8424 ` ELF>@@UHH0H}HuHUHEHUHPHEH@HHHHEHHEHHEH@HHEHPHEHHMHHHEHPHEHHHHEH}uHEHHHUHEHPUHHH}HEHHtHEHHHEHHEH@HEH@UHH}HuHE<~w HE $ > : ; I : ;  : ; I8  : ; I8  I .? : ; ' I@B  : ; I : ; I 4: ; I &I.? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B wwvwww v  w  w wvwwwpvpqwqrwruwuvwwwmvmnwnoworwrvw,g /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_utf8.cstddef.htypes.htypes.htnt_utf8.h )=KuvY2孻2vvvzgJ?2KY/gKam=g/gKafmg=KuKu&2u)usize_tdatacountshort unsigned inttnt_utf8_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsqlssize_ttnt_utf8_strlentnt_utf8_cmptnt_utf8_chrlensizelong unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/tnt_utf8.ctnt_utf8unsigned charunsigned intlong long unsigned int__ssize_ttnt_utf8_freesizetypelong long intcharGNU C 4.7.3tnt_utf8_nextshort inttnt_utf8_sizeoflong intsigned char_BoolGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <LAC G \AC  $|tAC If $AC I pAC k kAC f .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @P&,6>1(BZPv` 0[0 tF o(  0R 06SX@ `XX     (/t?LLZ jqzpnktnt_utf8.ctnt_utf8_inittnt_mem_allocmemcpytnt_utf8_strlentnt_mem_freetnt_utf8_freetnt_utf8_chrlentnt_utf8_sizeoftnt_utf8_cmpmemcmptnt_utf8_next0m=c    3!) 0 7 E L /S Z =a f s yx a   J &  %    ? V k]e m `       q    F QqYa k y  n  n  @ t @` qntnt_lex.c.o/ 1378727459 1000 1000 100664 19224 ` ELF>@+@@UHH H}HuHUHMHEHUHMHHt HEHUHPHEH@ HE@,HE@(HE@0HE@@HEH@8HEH@HHEHPHHEHPPHEH@`HE@XUHH H}HEH@HHE1HE=uHEHHHEHHEHEH}tHEH@0HEHE=tHEHHEH@`HtHEH@`HUHH}HuHEHP8HEHP(HEHUHP8HE@0PHEP0]UHH}EHEUPX]UHH}HE@0u5HEH@8HEHEH@8HP(HEHP8HE@0PHEP0HE]UHH0H}uUMܿ8HEHE8HHEUHEUP HEU܉P$HEH@0HEH@PHUHHEHP0HEHPPHE@@PHEP@HEUHHH(H`HhLpLxt )E)M)U)])e)m)u)}H H u H(H@`HtH(H@`HDž8Dž<0HEH@HPHHH8H HPHHPHHH(HP`HUHH H}HEHP HEHHHEH}~HUHEHP HE@,PHEP,HEUHH}uE=tv=t9t:|=t;=t>l=tW=|I=tP=t*N{tmfE;HEH@UHcHHЋ@ ;EuHEH@UHcHHH&EHEH@UHcHHHHu]UHHHxHpHx@0tRHxHtHHpHHpH=uHpH@L HpH; HxHP HxH@H9u?HxH,HxP(HxH?HHpH HxHHxH@ HEHUHH% } uDHxH@ HPHxH@H9tHx@(PHxP(Hx@,HxH1HEH}_HxHǸ }#=HxHP HxH@H9u?HxH,HxP(HxHHHpHHxHHEH}uHxHǸ]yHxHHxH@ H< JHxH@ HPHxH@H9tHx@(PHxP(Hx@,HxHHEH}uHxHǸHx@(EHx@,EHxH@ HEHEHxHHxH@ HE}'mHEHxHLHEH}uHxHǸ7H}uHxHǸHxHHxH@ HE}'t(} tHxHǸHxHP HEHH)HHEHxHHEH}uHxHǸUqMȋUHxHHHpHH}~/HEHxH HUH4HpHHJHH EHUHH}_HxHHEH}uHxHǸ}-uEHxHHxH@ HEHUHH%tEAMȋUHxHHHpHHpHUPEHUHH%HEHHxHHxH@ HHH%HUHHHHHHxHHxH@ HHH0HEHxHFHEH}uHxHǸ1H}@}tH]HxHHxH@ HF\!r$P!Ar$H!cr$@!r$!r$!r$!5 numM`! r$" r$!Y r0$~#$LF~ idM;X% $ > : ; I$ > I!I/  : ;  : ; I8   I &I  : ;  (  : ; I8  : ;  : ; I : ; .? : ; ' I@B : ; I : ; I .? : ; ' @B 4: ; I .? : ; ' @B .: ; ' I@B .: ; ' I@B 4: ; I .? : ; ' I@B .? : ; ' I@B  : ; : ; 4: ;I ! " # U$4: ;I wwvwww^v^_w_`w`cwcvwwwvwwwvww w vwwwvwwwvwww v  w  w wvw,_bc /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_lex.cstdint.hstdarg.hstddef.htypes.htypes.htnt_utf8.hctype.htnt_lex.h /uɟY1t212ɭ2u=K1KY+K12'1-"1uK2NuuuxJY./!5%ggt 5#g#o. W$g˟|z th$'u/L#gK1'% w ?=/uɭ)'gK/u''!w %/uʭ"3'K1=J $gfftX=uJ%dX<('/YTNT_TK_SPLICE_IScntrlnumericTNT_TK_WHEREtnt_tkTNT_TK_ERRORcountqTNT_TK_NONE_ISpunctTNT_TK_ANDsize_t_ISgraphsizetype__gnuc_va_listTNT_TK_CUSTOMtnt_lex_pushstqh_firsttnt_lex_popTNT_TK_LIMITssize_tTNT_TK_ORshort intint64_t_ISdigitTNT_TK_INSERTminusva_listsle_nexttnt_lex_keywordTNT_TK_DELETEargsline_ISblank_ISprintTNT_TK_PING_ISspacenextqreg_save_arealong long intTNT_TK_CALL__ssize_tstqe_nextlong intTNT_TK_UPDATE_ISxdigitTNT_TK_IDgp_offsettnt_lexunsigned chartnt_lex_initidonlysigned charlong long unsigned intfp_offsetTNT_TK_INTOunsigned intstackGNU C 4.7.3tnt_lex_errorslh_firsttnt_utf8startshort unsigned inttnt_lex_freeTNT_TK_KEYchar_ISlowerint32_tTNT_TK_SELECTTNT_TK_SET_Boolidtkdatalong unsigned intTNT_TK_NUM64size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/tnt_lex.ccounttnt_lex_nexttnt_lex_tkname_ISupperTNT_TK_REPLACEkeywordstnt_lex_idonlyerrorstqh_lastTNT_TK_STRINGTNT_TK_TABLETNT_TK_VALUESTNT_TK_EOF_ISalpha_ISalnumTNT_TK_FROMTNT_TK_PUNCTTNT_TK_NUM32__va_list_tagnexttnt_lex_nameofoverflow_arg_areaGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <AC  \;AC v |AC U QAC L AC  zPLRx  $ AC   QAC L @AC    ` AC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @6&,1CgPv K :\j z0uI0 0- I0#0(((I `*@1 4* Q" 0Q    =JXes_;  tnt_lex.ctnt_lex_poptnt_lex_tktnt_lex_errortnt_lex_nexttnt_lex_inittnt_utf8_inittnt_lex_freetnt_utf8_freetnt_mem_freetnt_lex_pushtnt_lex_idonlytnt_mem_allocmemset__gcc_personality_v0vsnprintftnt_mem_dup_Unwind_Resumetnt_utf8_nexttnt_lex_nameoftnt_lex__ctype_b_locstrncasecmp+<Y :)x !"U _ i s } # * - 1 7% =/ = =q = Q Q7 =  % =B % % %w = = % % = &% \ k !) 0 7 < N [ b i p Iw |  w   3  u  g   % 2 ? F M ZT [ b fj Qr nz H  S c    3 O G      4 x & Z# * 1 8 ? 0F lM T [ =b Ai p w ~  \        ,. CJ X ou  v     C & V4 @N  \ s y     _ `& -_5= b iqy      CC hNV^ @ >     ? J RZ ` C      cj  (EBJdOl M           6  > > Z _   @`_   $Dd tnt_sql.c.o/ 1378727460 1000 1000 100664 30760 ` ELF>D@@UHHHHHhLpLxt )E)M)U)])e)m)u)}HDž(Dž,0HEH0HPH8H(HH@HHt H@ HH@@(LHt H@$HH@@,HH@HLH IAȉѺHǸHH@HuH HHHHPHUHH0H}uHUHEHEH@HUHHE}u/HEH@HP`HEHѺHǸ(E;E}BHUHcHHt!HuUHEѺHǸNHEH@UHHHuHEHѺHǸH}t HUHEHHUHHH}uMHEHUHH H}uHUHUMHEHUHH0H}uHUHEHEH@HUHHE}u,HEH@HP`HEHѺHǸ=E;EtHUHEH@HHH}t HUHEHHUHHH}uMHEH+UHH0H}HuHMЈEHE}t>HUHEHuHE=Ht H}t HUHEHHEHEH@HUHHu/HEH@HP`HEHѺHǸHE=t,=tC=u_HEHHHEHH`HEHHHEHHBHEH@HEHHHEHHHMHEHHǸHUHH H}HuЈEUHuHEH^UHH0H}HuHUHEHUHuHEHѺH$EEtOHE؋uHEPHE؉0HE؋HE@9tHMHEHHǸHUHH`H}HuHUEHEHUHEH{HEH8HEHUHEH4HE=HHEH@HUHH==s=|=@==pHEPHE@9t"HMHEHHǸ HEH@HUHH+tK+ t&tE^^tG|tKRHEH@HP`HuHEHѺHǸ_E=E4E+E"HMHEHHǸ`HUHEH@HE@EHE@HEHFHEH@HEHPHE@HEHHEHPHE@HEHHEHPHEH@HEHHEHEHEHEHE(H`HUHEH@HEPHE؋@9t"HMHEHHǸ HE,H=HUHEHDHE,HHUHEHHE,HxHUHEHXHE)H<HEL@HEHxHEȋHHEЋ@HE@HEMIH.HEH@HP`HuHEHѺHǸHE,HHEH@HHEHHMHEHHTulHEHuTHE@HEHHMHUIHѺHHuHMHEHHǸEE HUHHHHEHHEHHPHEHDžHHDž@EHH@HHHH=0=5U====-=HH+HH@HH@HH"HHH(HHMHHH3XH,HvuHH@H+EHH=uEH)H*HH UH@@HHHMHHHHHHHǸ xHPHMHHH?KHHh,H@HHiHH#HMHHHHHH@@HHHUHѺHH`HHHHHǸFH*Hc'HHDH@HHEHHDž<HEHHEHOns ?x# @x#  Cwns Dx# Ex#  H Ix#  Lns Mx# Nx# Ox# Px# # $x# %# &# 'F#  46ptr 56#  8s 9s# :x# ;F#   + -# .# ( &h '#t (# ( +h , #t -# ( 0h 1'#t 2# 5qop 6_# 7x# 8q# 9x# :x# ;#  H >h ?O#t @#ops A#( Bx#0opv C#8opc Dx#@ @ GAh Hw# Iq# Jx# K# Lx#t M# Pfh Q#l R<#H Y Z [del \ ] ^A _ x U  V# W#h X#r `f# vc aF#hv b #py 0 #qop $x# %x# &x# '# (<# )x#( X&& 'F# (F# )f# *# +# ,#( -#0 .#8 /#@ 0#H 1x#P 2x#T@@q&f@ FL@l@F@F@F@6@ !O        ! "# ##len$#j #P                           C D# EF#tkFF# M i32N;i64OMsPOS S# # 8K# tkLF#vQ # RF# colRF#$ S #( T) #0 T@ T# #eW e# #g| g# # g| ## h_' buf`O# a' #posb# cF#(colcF#, dF#0 e@ #8 fF#@qgW #H h- #X i#`P  -g s.@#l/g # 0# 4-  sql4 z4# zfmt4y6 |7G|;F~col : ; I$ >   I&II !I/  : ;  : ; I8  : ;  (  : ; I8  : ;  : ; I : ; I' II'  : ; .: ; ' I@B : ; I : ; I 4: ; I 4: ; I  : ; .: ;' I@B : ;I 4: ;I !4: ;I " #!I/$.? : ;' I@B %: ;I &4: ;I?  wwrvrswstwtwwwvwwwvwwwvwwwvwwwvwww,v,-w-.w.1w1\v\]w]^w^awavww w _ v_ ` w` a wa d wd vwwwvwwwvwwwvw,# /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_sql.cstdint.hstddef.htypes.htypes.hstdarg.hstdio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.hctype.htnt_update.htnt_utf8.htnt_lex.h 42'-"gh94/g/7u0Y0/K1/g,gvu0 .f4u/0101K2=׭u .>K "X!".0.u/u/u/u0"$\["[#[!"HK-.u10L!4$uYK(XXX.\=>&z &v>"uu/#](\&&4#]&r nz (v>">"uv&>B(vu&vsK5v>9Y Xz &v>"u ,(#44%Ud P[an-oh/@40zu0 4u090AAA u@DJ PW ss$'.*9E*Pt_-0j]|[` <     (9K]hw#0=Jtnt_sql.ctnt_sql_errortnt_sql_tktnt_sqltktnt_sqltkvtnt_sql_trytnt_sqltrytnt_sql_keyvaltnt_sql_kvtnt_sql_kv_selecttnt_sql_stmt_updatetnt_sql_stmttnt_sql__gcc_personality_v0vsnprintfsnprintftnt_mem_dup_Unwind_Resumetnt_lex__ctype_b_loctnt_lex_nameoftnt_lex_pushtnt_tuple_addtnt_update_arithtnt_update_assigntnt_update_splicetnt_updatetnt_tuple_inittnt_list_inittnt_buftnt_inserttnt_deletetnt_list_attnt_selecttnt_lex_idonlytnt_calltnt_pingtnt_tuple_freetnt_list_freetnt_stream_freetnt_sql_keywordstnt_querytnt_lex_inittnt_mem_freetnt_lex_freetnt_query_is 1Pm !  "!  E#X  !.  a$ K!h  %%% ('  P !& R!   ,&X'''' G (e   )2 Z  z * + , ! - . /0 \11 5 :  GW2t 3   0 e4q56  79k:w;  79!t; QV ]0a@gPn`upz  v B !) 0 7 %< RN [ /` m t )y B G    { [ +   ~ ^ * + 9 DH [ b [i Zp vw ~      L    ~ <   A U( A AP Qi Ax  A     }   c   ?= I -W e z <      + 9 G U cc   ;     ' rB o Jz       7 O + <9 >G U &c r ,~  9     #  o '   l < z% + 1 7 = C  I P \ j c    4    Q   / c k d h   A c  & - q4 O; B I Q ] k c    T K2 @I ` n . 8 8       0 5 Y n y  s    C # . s6 > `q  Y    r     ) 1 9 l      `  - @> I-Q]Y  ]    `  `` gL pdx  { M   - q` " K &[ k A ] H6  Ed'B6JS r=zN     2   s    7 0 (1 LsU    ,0-P]Y ;t} I`  q   tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/libtarantoolsql.so.1.10000775000000000000000000012733612213333051023604 0ustar rootrootELF>@@@8@$!aIaI hIhI hI  II I $$PtdBBB  QtdGNU9g ΀n&aZQ]$T 1)IB $%')+-.124567 Y#I81qXp|cBEj0Snc# %t +QO xP %<h=5G} a<v[ 2 RYL"F0  @v . pw x tPN & XN  LPN @M  +o   %  > [;   k ?__gmon_start___fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassestnt_utf8_inittnt_mem_allocmemcpytnt_utf8_strlentnt_mem_freetnt_utf8_freetnt_utf8_chrlentnt_utf8_sizeoftnt_utf8_cmpmemcmptnt_utf8_nexttnt_lex_inittnt_lex_freetnt_lex_pushtnt_lex_idonlymemsetvsnprintftnt_mem_dup_Unwind_Resume__gcc_personality_v0tnt_lex_nameoftnt_lex__ctype_b_locstrncasecmptnt_tuple_addtnt_update_arithtnt_update_assigntnt_update_splicetnt_updatetnt_tuple_inittnt_list_inittnt_buftnt_inserttnt_deletetnt_list_attnt_selecttnt_calltnt_pingtnt_tuple_freetnt_list_freetnt_stream_freetnt_sql_keywordstnt_querytnt_query_islibtarantool.so.1libgcc_s.so.1libc.so.6_edata__bss_start_endlibtarantoolsql.so.1/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt:GCC_3.0GCC_3.3.1GLIBC_2.3GLIBC_2.14GLIBC_2.2.50P&y Qa_& Yii cmui xhI pI  M  M @M yBPM ~B`M BpM BM BM BM BM BM BM BM BM BN BN B N B0N BK K /K K K K (M K K K -K K K K L  L  L  L + L  (L  0L 8L @L HL )PL XL 7`L hL &pL xL $L L L 6L 5L L L 3L L L 1L L L L  L !L "M 0M #HH 9 HtSH59 %9 @%9 h% 9 h%9 h%8 h%8 h%8 h%8 h%8 hp%8 h`%8 h P%8 h @%8 h 0%8 h %8 h %8 h%8 h%8 h%8 h%8 h%z8 h%r8 h%j8 h%b8 h%Z8 hp%R8 h`%J8 hP%B8 h@%:8 h0%28 h %*8 h%"8 h%8 h%8 h % 8 h!%8 h"%7 h#%7 h$%7 h%%7 h&%7 h'p%7 h(`H9 H=9 UH)HHw]H6 Ht]@H8 H=8 UH)HHHH?HHHu]H5 Ht]@=8 u'H=5 UHt H=R7 h]p8 fffff.H=3 tH5 HtUH=j3 H]WRUHH0H}HuHUHEHUHPHEH@HH,HHEHHEHHEH@HHEHPHEHHMHHoHEHPHEHHHHEH}uHEHH[HUHEHPUHHH}HEHHtHEHHHEHHEH@HEH@UHH}HuHE<~w HE}tH]HxHHxH@ HHUHEHuHE=Ht H}t HUHEHHEHEH@HUHH3u1HEH@HP`HEHHHǸvHE=t,=tC=u_HEHHHEHHbHEHHHEHHDHEH@HEHHHEHHu!HMHEHDHHǸHUHH H}HuЈEUHuHEHZUHH0H}HuHUHEHUHuHEHѺH EEtQHE؋uHEPHE؉2HE؋HE@9t!HMHEHHHǸHUHH`H}HuHUEHEHUHEHsHEH0HEHUHEH,HE=HHEH@HUHH=={==F==zHEPHE@9t$HMHEHxHHǸHEH@HUHH$+tM+ t&tG`^tI|tMTHEH@HP`HuHEHHHǸKE?E6E-E$HMHEHHHǸfHUHEHFHE@EHE@HEHfJHEH@HEHPHE@HEHHEHPHE@HEHHEHPHEH@HEH{HEHEHEHEHE(HfHUHEHFHEPHE؋@9t$HMHEHqHHǸHE,H-HUHEH4HE,HHUHEHHE,H|HUHEH\HE)Hy@HEL@HEHxHEȋHHEЋ@HE@HEMIHi0HEH@HP`HuHEHH HǸpHE,HHEH@HHEHHMHEHHHunHEHuVHE@HEHHMHUIHѺHHu!HMHEH HHǸEE HRUHHHHEHHEHHPHEHDžHHDž@EHH@HHHH=2=5i0====-=HHHH@HH@HHHHH(HHMHHH%lH,HduHH@H?EHH=uEH)HHHUH@@HHHMH=HHHHH HHǸHPHMHHHQ]HHR>H@HHSHH HMHHHHHH@@HHHUHѺHHrHHHHHHǸVH*HK7HH,H@HH-HHDž<HEH4HEHpAC k kAC f 4AC  TAC  t;AC v AC U QAC L AAC  zPLRx=  $$ AC  <~QAC L \.AC ) | AC  $lu AC p $!AC  'AC b  *AC e $<AC  TM*AC e $Wx^AC s 0AC k $%AC  $9g AC b $xP  AC K 4AC U $dAC  $WAC   c  - -[ 7 3d$0! w    3  w  C 5 x @hI pI op  K 0 p o ooL oI &6FVfv&6FVfv&6 M yB~BBBBBBBBBBBBBBBGCC: (Debian 4.7.3-4) 4.7.3, ,?, );],  wintT  !1^F.BO0mw!"##e#len$e#I )< < u)CX )IP )eH len/hO I89+` u9ChC+ CIX CeP iOWlOWh zm D mIH me@ ioeS cp] rp\ | |IH |e@ n|e i~eS c~e\ r] < uCh usC`i@ uCX offeP rh{ ],)  w&Fint_(XT  !(F#m#Bm### f{1t.X  O  0m  0 =   g        !"###len$# _  #        |  n        p F L   H  U   C8 D# EF#tk FF#  Mi32 N;i64 OMs P S Sf#8 Kftk LF#v Q# RF# col RF#$r S#( Tl#0  T Tf# el ef# g1 gf#d g# f-h _jbuf `# aj#pos b#  cF#(col cF#, dF#0X e#8 fF#@q g#H] hp#X_ i#` 5.pl.h.j`buf/X/P |@[$l@XtkBfhtknBf`$M[``lMhtkMf`UTlThonTpd<Zf lZXtk^fh-efBleXtkeFTeFPcoleFLtffh^qFlq|fmtq|msgv|qw|  $@lXr$h%=lXtkFTiFl-F%)l~tk~ch_oFcolFv$$~pn $idZ) i>F\! r$P!*!d!Ar$H!!"cr$@!p""r$!<#v#r$!$H$r$!$&5 numM`!%% r$"%+& r$!&o'Y r0$~#$LF~ idM;X4],)@ w&Fint_(XT0j  3!1ՊF.XO0m;( G ## B# # #O 0 =   g          / J 0x#len 1x#  2x#  5 ns 6x#  7x# # :'ns ;x#  >Ons ?x#  @x#  Cwns Dx#  Ex#  H  Ix#  Lns Mx#  Nx# E Ox# [ Px# 6 # & $x# %#  &#  'F#  46ptr 56# r 8s  9s#  :x#  ;F#   +  -# i .# ( &h '#t (# a( +h , #t -# ( 0h 1'#t 2# q 5qop 6_#  7x# { 8q# e 9x#  :x# ;#  H >h ?O#t @#ops A#(  Bx#0opv C#8opc Dx#@ @ GAh Hw# 9 Iq#  Jx#  K#  Lx#t M# V Pfh Q#l R<#H Y  Z [del \ ] ^A _ @x U  c V#  W#h X#r `f# vc aF#hv b #py M0 #qop $x#  %x# j &x# _ '# x (<#  )x#( XX&& 'F# (F# )f# *# +# ,#( -#0 .#8 A/#@ 0#H 1x#P 2x#T@@q&f@ FL@l@F@F@F@6@ !O   L ,  8 F  ! "# ##len$#j #P        |  n        p F L   H  U   C 8D# EF#tkFF# M i32N;i64OMsPOS S# # 8K# tkLF#vQ # RF# colRF#$ rS #( T) #0 T@ T# #eW le# #g| 1g# # dg| ## -h_' buf`O# a' #posb# cF#(colcF#, dF#0 Xe@ #8 fF#@qgW #H ]h- #X _i#`P  -g s.@#l/g # _0# W4- )i+` sql4 zi4# zfmt4y6 |q7G|;F~col sql z tu!x<!q~!Fl tk# ~ tn# ~ rc - k_>o6="+9L;A!U;~![fxd"9Y: tupW6Xx:: ltkh# ~L;=!wz lenxF`S;j<!8z# ~#- >> sql h$F>? ks@~q~%2~ek~ l  sql4 ~ ret- o$F?@@ q~%2~ l  rcFl tk# ~P  & @M % $ > $ > : ; I : ;  : ; I8  : ; I8  I .? : ; ' I@B  : ; I : ; I 4: ; I &I.? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B % $ > : ; I$ > I!I/  : ;  : ; I8   I &I  : ;  (  : ; I8  : ;  : ; I : ; .? : ; ' I@B : ; I : ; I .? : ; ' @B 4: ; I .? : ; ' @B .: ; ' I@B .: ; ' I@B 4: ; I .? : ; ' I@B .? : ; ' I@B  : ; : ; 4: ;I ! " # U$4: ;I % $ > : ; I$ >   I&II !I/  : ;  : ; I8  : ;  (  : ; I8  : ;  : ; I : ; I' II'  : ; .: ; ' I@B : ; I : ; I 4: ; I 4: ; I  : ; .: ;' I@B : ;I 4: ;I !4: ;I " #!I/$.? : ;' I@B %: ;I &4: ;I?  g /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_utf8.cstddef.htypes.htypes.htnt_utf8.h  )=KuvY2孻2vvvzgJ?2KY/gKam=g/gKafmg=KuKu&2u)u /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_lex.cstdint.hstdarg.hstddef.htypes.htypes.htnt_utf8.hctype.htnt_lex.h /uɟY1t212ɭ2u=K1KY+K12'1-"1uK2XJY./!5%ggt 5#g#o. W$g˟|z th$'u/L#gK1'% w ?=/u)'gK/u''!w %/u"3'K1=J $gfftX=uJ%dX<('/Y# /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_sql.cstdint.hstddef.htypes.htypes.hstdarg.hstdio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.hctype.htnt_update.htnt_utf8.htnt_lex.h )42'-"gh;4/g1#9u0Y0/K1/g.gvu0 .f4u10101K2=׭u .>K "X!$.00u/u/u/u0$$\["[#[!$HK-0u10L!4$uYK(XXX.\=>&z &v>"uu/%](\&&4%]&r nz (v>">"uv&>B*vu&vsK7v>=Y Xz &v>"u ,*%46'HxI (M  M I PN K % A LOZq|PN  @ > )@M : J tZl kz  .  p XN   ?+PN 7 [;DO] % eu   " x #< +Lcrtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrytnt_utf8.ctnt_lex.ctnt_lex_poptnt_lex_tktnt_lex_errortnt_lex_nexttnt_sql.ctnt_sql_errortnt_sql_tktnt_sqltktnt_sqltkvtnt_sql_trytnt_sqltrytnt_sql_keyvaltnt_sql_kvtnt_sql_kv_selecttnt_sql_stmt_updatetnt_sql_stmttnt_sql__FRAME_END____JCR_END__DW.ref.__gcc_personality_v0__dso_handle_DYNAMIC__TMC_END___GLOBAL_OFFSET_TABLE_tnt_pingtnt_update_ITM_deregisterTMCloneTabletnt_utf8_freetnt_deletevsnprintf@@GLIBC_2.2.5tnt_inserttnt_list_free_edata_finitnt_mem_freesnprintf@@GLIBC_2.2.5tnt_querytnt_buftnt_lex_idonlymemset@@GLIBC_2.2.5tnt_calltnt_mem_alloctnt_tuple_initmemcmp@@GLIBC_2.2.5tnt_sql_keywordstnt_utf8_sizeoftnt_utf8_strlentnt_update_splicetnt_utf8_next__gmon_start__tnt_lex_nameofmemcpy@@GLIBC_2.14tnt_lex_inittnt_utf8_cmp__gcc_personality_v0@@GCC_3.3.1strncasecmp@@GLIBC_2.2.5tnt_list_init_endtnt_lex_freetnt_query_is__bss_starttnt_lex_pushtnt_selecttnt_tuple_addtnt_lextnt_stream_freetnt_update_arith_Jv_RegisterClassestnt_utf8_init_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0tnt_tuple_free__cxa_finalize@@GLIBC_2.2.5_inittnt_mem_duptnt_list_at__ctype_b_loc@@GLIBC_2.3tnt_utf8_chrlentnt_update_assigntarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/CMakeLists.txt0000664000000000000000000000457612202131537022271 0ustar rootroot#============================================================================# # build flags #============================================================================# # default flags if (${CMAKE_BUILD_TYPE} STREQUAL "None") set (tntsql_cflags "-std=gnu99") else() set (tntsql_cflags "-std=gnu99 -Wall -Wextra") set (tntsql_cflags "${tntsql_cflags} -Wno-sign-compare -Wno-strict-aliasing") endif() # Only add -Werror if it's a debug build, done by developers. if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") set (tntsql_cflags "${tntsql_cflags} -Werror") endif() #============================================================================# # Build tnt sql project #============================================================================# # # source files # set (tntsql_sources tnt_utf8.c tnt_lex.c tnt_sql.c) #----------------------------------------------------------------------------# # Builds #----------------------------------------------------------------------------# # Here we manage to build static/dynamic libraries ourselves, # do not use the top level settings. string(REPLACE "-static-libgcc" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "-static" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG) set (tnt_cflags "${tnt_cflags} -static-libgcc") endif() # # Static library # project(tntsql) add_library(tntsql STATIC ${tntsql_sources}) set_target_properties(tntsql PROPERTIES COMPILE_FLAGS "${tntsql_cflags}") set_target_properties(tntsql PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tntsql PROPERTIES OUTPUT_NAME "tarantoolsql") # # Shared library # project(tntsql_shared) add_library(tntsql_shared SHARED ${tntsql_sources}) target_link_libraries(tntsql_shared tnt_shared) set_target_properties(tntsql_shared PROPERTIES OUTPUT_NAME tntsql) set_target_properties(tntsql_shared PROPERTIES COMPILE_FLAGS "${tntsql_cflags}") set_target_properties(tntsql_shared PROPERTIES VERSION ${LIBTNT_VERSION} SOVERSION ${LIBTNT_SOVERSION}) set_target_properties(tntsql_shared PROPERTIES OUTPUT_NAME "tarantoolsql") #----------------------------------------------------------------------------# # Install #----------------------------------------------------------------------------# install (TARGETS tntsql ARCHIVE DESTINATION lib) install (TARGETS tntsql_shared LIBRARY DESTINATION lib) tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/tnt_utf8.c0000664000000000000000000000771412202131537021445 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include bool tnt_utf8_init(struct tnt_utf8 *u, const unsigned char *data, size_t size) { u->size = size; u->data = (unsigned char*)tnt_mem_alloc(u->size + 1); u->data[u->size] = 0; memcpy(u->data, data, u->size); ssize_t len = tnt_utf8_strlen(u->data, u->size); if (len == -1) { tnt_mem_free(u->data); return false; } u->len = len; return true; } void tnt_utf8_free(struct tnt_utf8 *u) { if (u->data) tnt_mem_free(u->data); u->data = NULL; u->size = 0; u->len = 0; } ssize_t tnt_utf8_chrlen(const unsigned char *data, size_t size) { #define tnt_bit(I) (1 << (I)) #define tnt_bit_is(B, I) ((B) & tnt_bit(I)) /* U-00000000 – U-0000007F: ASCII representation */ if (data[0] < 0x7F) return 1; /* The first byte of a multibyte sequence that represents a non-ASCII * character is always in the range 0xC0 to 0xFD and it indicates * how many bytes follow for this character */ if (data[0] < 0xC0 || data[0] > 0xFD ) return -1; unsigned int i, count = 0; /* U-00000080 – U-000007FF */ if (tnt_bit_is(data[0], 7) && tnt_bit_is(data[0], 6)) { count = 2; /* U-00000800 – U-0000FFFF */ if (tnt_bit_is(data[0], 5)) { count = 3; /* U-00010000 – U-001FFFFF */ if (tnt_bit_is(data[0], 4)) { count = 4; /* it is possible to declare more than 4 bytes, * but practically unused */ } } } if (count == 0) return -1; if (size < count) return -1; /* no ASCII byte (0x00-0x7F) can appear as part of * any other character */ for (i = 1 ; i < count ; i++) if (data[i] < 0x7F) return -1; return count; #undef tnt_bit #undef tnt_bit_is } ssize_t tnt_utf8_strlen(const unsigned char *data, size_t size) { register size_t i = 0; register ssize_t c = 0, r = 0; while (i < size) { r =tnt_utf8_chrlen(data + i, size - i); if (r == -1) return -1; c++; i += r; } return c; } ssize_t tnt_utf8_sizeof(const unsigned char *data, size_t size, size_t n) { register size_t i = 0, c = 0; register ssize_t r = 0; while ((i < size) && (c < n)) { r = tnt_utf8_chrlen(data + i, size - i); if (r == -1) return -1; c++; i += r; } if (c != n) return -1; return i; } bool tnt_utf8_cmp(struct tnt_utf8 *u, struct tnt_utf8 *us) { if (u->size != us->size) return false; if (u->len != us->len) return false; return !memcmp(u->data, us->data, u->size); } ssize_t tnt_utf8_next(struct tnt_utf8 *u, size_t off) { if (off == u->size) return 0; ssize_t r = tnt_utf8_chrlen(u->data + off, u->size - off); if (r == -1) return -1; return off + r; } tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/Makefile0000664000000000000000000003112312213333034021153 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntsql/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntsql/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntsql/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntsql/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. connector/c/tntsql/CMakeFiles/tntsql.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntsql/CMakeFiles/tntsql.dir/rule .PHONY : connector/c/tntsql/CMakeFiles/tntsql.dir/rule # Convenience name for target. tntsql: connector/c/tntsql/CMakeFiles/tntsql.dir/rule .PHONY : tntsql # fast build rule for target. tntsql/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/build .PHONY : tntsql/fast # Convenience name for target. connector/c/tntsql/CMakeFiles/tntsql_shared.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/c/tntsql/CMakeFiles/tntsql_shared.dir/rule .PHONY : connector/c/tntsql/CMakeFiles/tntsql_shared.dir/rule # Convenience name for target. tntsql_shared: connector/c/tntsql/CMakeFiles/tntsql_shared.dir/rule .PHONY : tntsql_shared # fast build rule for target. tntsql_shared/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build .PHONY : tntsql_shared/fast tnt_lex.o: tnt_lex.c.o .PHONY : tnt_lex.o # target to build an object file tnt_lex.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_lex.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_lex.c.o .PHONY : tnt_lex.c.o tnt_lex.i: tnt_lex.c.i .PHONY : tnt_lex.i # target to preprocess a source file tnt_lex.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_lex.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_lex.c.i .PHONY : tnt_lex.c.i tnt_lex.s: tnt_lex.c.s .PHONY : tnt_lex.s # target to generate assembly for a file tnt_lex.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_lex.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_lex.c.s .PHONY : tnt_lex.c.s tnt_sql.o: tnt_sql.c.o .PHONY : tnt_sql.o # target to build an object file tnt_sql.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_sql.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_sql.c.o .PHONY : tnt_sql.c.o tnt_sql.i: tnt_sql.c.i .PHONY : tnt_sql.i # target to preprocess a source file tnt_sql.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_sql.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_sql.c.i .PHONY : tnt_sql.c.i tnt_sql.s: tnt_sql.c.s .PHONY : tnt_sql.s # target to generate assembly for a file tnt_sql.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_sql.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_sql.c.s .PHONY : tnt_sql.c.s tnt_utf8.o: tnt_utf8.c.o .PHONY : tnt_utf8.o # target to build an object file tnt_utf8.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_utf8.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_utf8.c.o .PHONY : tnt_utf8.c.o tnt_utf8.i: tnt_utf8.c.i .PHONY : tnt_utf8.i # target to preprocess a source file tnt_utf8.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_utf8.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_utf8.c.i .PHONY : tnt_utf8.c.i tnt_utf8.s: tnt_utf8.c.s .PHONY : tnt_utf8.s # target to generate assembly for a file tnt_utf8.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/tnt_utf8.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/tnt_utf8.c.s .PHONY : tnt_utf8.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... tntsql" @echo "... tntsql_shared" @echo "... tnt_lex.o" @echo "... tnt_lex.i" @echo "... tnt_lex.s" @echo "... tnt_sql.o" @echo "... tnt_sql.i" @echo "... tnt_sql.s" @echo "... tnt_utf8.o" @echo "... tnt_utf8.i" @echo "... tnt_utf8.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/tnt_lex.c0000664000000000000000000002021512202131537021336 0ustar rootroot /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include bool tnt_lex_init(struct tnt_lex *l, struct tnt_lex_keyword *keywords, unsigned char *buf, size_t size) { if (!tnt_utf8_init(&l->buf, buf, size)) return false; l->keywords = keywords; l->pos = 0; l->col = 1; l->line = 1; l->count = 0; l->countq = 0; SLIST_INIT(&l->stack); STAILQ_INIT(&l->q); l->error = NULL; l->idonly = false; return true; } void tnt_lex_free(struct tnt_lex *l) { struct tnt_tk *tk, *tkn; STAILQ_FOREACH_SAFE(tk, &l->q, nextq, tkn) { if (tk->tk == TNT_TK_STRING || tk->tk == TNT_TK_ID) tnt_utf8_free(TNT_TK_S(tk)); tnt_mem_free(tk); } tnt_utf8_free(&l->buf); if (l->error) tnt_mem_free(l->error); } void tnt_lex_push(struct tnt_lex *l, struct tnt_tk *tk) { SLIST_INSERT_HEAD(&l->stack, tk, next); l->count++; } void tnt_lex_idonly(struct tnt_lex *l, bool on) { l->idonly = on; } static struct tnt_tk* tnt_lex_pop(struct tnt_lex *l) { if (l->count == 0) return NULL; struct tnt_tk *tk = SLIST_FIRST(&l->stack); SLIST_REMOVE_HEAD(&l->stack, next); l->count--; return tk; } static struct tnt_tk* tnt_lex_tk(struct tnt_lex *l, int tk, int line, int col) { struct tnt_tk *t = tnt_mem_alloc(sizeof(struct tnt_tk)); memset(t, 0, sizeof(struct tnt_tk)); t->tk = tk; t->line = line; t->col = col; STAILQ_INSERT_TAIL(&l->q, t, nextq); l->countq++; return t; } static int tnt_lex_error(struct tnt_lex *l, const char *fmt, ...) { if (fmt == NULL) return TNT_TK_EOF; if (l->error) tnt_mem_free(l->error); char msg[256]; va_list args; va_start(args, fmt); vsnprintf(msg, sizeof(msg), fmt, args); va_end(args); l->error = tnt_mem_dup(msg); return TNT_TK_ERROR; } inline static ssize_t tnt_lex_next(struct tnt_lex *l) { ssize_t r = tnt_utf8_next(&l->buf, l->pos); if (r > 0) { l->pos = r; l->col++; } return r; } char* tnt_lex_nameof(struct tnt_lex *l, int tk) { /* system tokens */ switch (tk) { case TNT_TK_EOF: return "End-Of-Statement"; case TNT_TK_ERROR: return "ERROR"; case TNT_TK_NUM32: return "NUM32"; case TNT_TK_NUM64: return "NUM64"; case TNT_TK_STRING: return "STRING"; case TNT_TK_ID: return "ID"; case TNT_TK_KEY: return "KEY"; case TNT_TK_TABLE: return "TABLE"; case TNT_TK_PUNCT: return "PUNCT"; } /* matching keyword */ int i; for (i = 0 ; l->keywords[i].name ; i++) if (l->keywords[i].tk == tk) return l->keywords[i].name; return NULL; } #define tnt_lex_step(l) \ do { \ ssize_t r = tnt_lex_next(l); \ if (r == -1) \ return tnt_lex_error(l, "utf8 decoding error"); \ } while (0) #define tnt_lex_try(l, reason) \ do { \ ssize_t r = tnt_lex_next(l); \ if (r == -1) \ return tnt_lex_error(l, "utf8 decoding error"); \ else \ if (r == 0) \ return tnt_lex_error(l, reason); \ } while (0) #define tnt_lex_chr(l) (*TNT_UTF8_CHAR(&l->buf, l->pos)) int tnt_lex(struct tnt_lex *l, struct tnt_tk **tk) { /* trying stack first */ if (l->count) { *tk = tnt_lex_pop(l); if ((*tk)->tk == TNT_TK_PUNCT) return TNT_TK_I32(*tk); return (*tk)->tk; } /* skipping spaces and comments */ unsigned char ch; while (1) { if (l->pos == l->buf.size) { *tk = tnt_lex_tk(l, TNT_TK_EOF, l->line, l->col); return TNT_TK_EOF; } ch = tnt_lex_chr(l); if (isspace(ch)) { if (ch == '\n') { if (((l->pos + 1) != l->buf.size)) l->line++; l->col = 0; } tnt_lex_step(l); continue; } else if (ch == '#') { while (1) { if (l->pos == l->buf.size) { *tk = tnt_lex_tk(l, TNT_TK_EOF, l->line, l->col); return TNT_TK_EOF; } tnt_lex_step(l); if (tnt_lex_chr(l) == '\n') { if (((l->pos + 1) != l->buf.size)) l->line++; l->col = 0; tnt_lex_step(l); break; } } continue; } break; } /* saving lexem position */ int line = l->line; int col = l->col; ssize_t start = l->pos, size = 0; ch = tnt_lex_chr(l); /* string */ if (ch == '\'') { start++; while (1) { tnt_lex_try(l, "bad string definition"); ch = tnt_lex_chr(l); if (ch == '\'') break; if (ch == '\n') return tnt_lex_error(l, "bad string definition"); } size = l->pos - start; tnt_lex_step(l); *tk = tnt_lex_tk(l, TNT_TK_STRING, line, col); if (size > 0) tnt_utf8_init(TNT_TK_S(*tk), TNT_UTF8_CHAR(&l->buf, start), size); return TNT_TK_STRING; } bool minus = false; /* punctuation */ if (ispunct(ch) && ch != '_') { tnt_lex_step(l); if (ch == '-') { ch = tnt_lex_chr(l); if (isdigit(ch)) { minus = true; goto numeric; } } *tk = tnt_lex_tk(l, TNT_TK_PUNCT, line, col); TNT_TK_I32(*tk) = ch; return ch; } numeric: /* numeric value */ if (isdigit(ch)) { int64_t num = 0; while (1) { if (isdigit(tnt_lex_chr(l))) num = (num * 10) + tnt_lex_chr(l) - '0'; else break; ssize_t r = tnt_lex_next(l); if (r == -1) return tnt_lex_error(l, "utf8 decoding error"); if (r == 0) break; } if (minus) num *= -1; if (tnt_lex_chr(l) == 'L') { ssize_t r = tnt_lex_next(l); if (r == -1) return tnt_lex_error(l, "utf8 decoding error"); } else if (num >= INT_MIN && num < INT_MAX) { *tk = tnt_lex_tk(l, TNT_TK_NUM32, line, col); TNT_TK_I32(*tk) = (int32_t)num; return TNT_TK_NUM32; } *tk = tnt_lex_tk(l, TNT_TK_NUM64, line, col); TNT_TK_I64(*tk) = num; return TNT_TK_NUM64; } /* skipping to the end of lexem */ while (1) { ch = tnt_lex_chr(l); if (isspace(ch) || (ispunct(ch) && ch != '_')) break; ssize_t r = tnt_lex_next(l); if (r == -1) return tnt_lex_error(l, "utf8 decoding error"); else if (r == 0) break; } size = l->pos - start; /* handle to tell lexer that table's, key's and keyword's are id's */ if (l->idonly) goto id; /* matching keyword */ int i; for (i = 0 ; l->keywords[i].name ; i++) { if (l->keywords[i].size != size) continue; if (strncasecmp(l->keywords[i].name, (const char*)TNT_UTF8_CHAR(&l->buf, start), size) == 0) { *tk = tnt_lex_tk(l, l->keywords[i].tk, line, col); return l->keywords[i].tk; } } /* table or key id */ ch = *TNT_UTF8_CHAR(&l->buf, start); if ((ch == 't' || ch == 'k') && size >= 2) { int idtk = (ch == 't') ? TNT_TK_TABLE : TNT_TK_KEY; int32_t id = 0; for (i = 1 ; i < size ; i++) { ch = *TNT_UTF8_CHAR(&l->buf, start + i); if (isdigit(ch)) id *= 10, id += ch - '0'; else goto id; } *tk = tnt_lex_tk(l, idtk, line, col); TNT_TK_I32(*tk) = id; return idtk; } id: /* assuming id */ *tk = tnt_lex_tk(l, TNT_TK_ID, line, col); tnt_utf8_init(TNT_TK_S(*tk), TNT_UTF8_CHAR(&l->buf, start), size); return TNT_TK_ID; } #undef tnt_lex_step #undef tnt_lex_try #undef tnt_lex_chr tarantool-1.5.1.218.g1a69fd6/connector/c/tntsql/libtarantoolsql.so0000777000000000000000000000000012213333051027176 2libtarantoolsql.so.1ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/python/0000775000000000000000000000000012231715257017300 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/python/README.rst0000664000000000000000000000107412231715257020771 0ustar rootroot================= trantool-python ================= Python interface to the `Tarantool database `_. The latest version of this package is found at ``_ and released under the terms of `BSD license `_. Tarantool is production-ready and actively used at `Mail.Ru `_, one of the leading Russian web content providers. tarantool-1.5.1.218.g1a69fd6/connector/java/0000775000000000000000000000000012202131537016667 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/pom.xml0000664000000000000000000000153712202131537020212 0ustar rootroot 4.0.0 ru.mail tarantool-connector 1.0.0 log4j log4j 1.2.16 compile commons-logging commons-logging 1.1.1 compile tarantool-1.5.1.218.g1a69fd6/connector/java/src/0000775000000000000000000000000012202131537017456 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/0000775000000000000000000000000012202131537020402 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/0000775000000000000000000000000012202131537021323 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/0000775000000000000000000000000012202131537023326 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/sample/0000775000000000000000000000000012202131537024607 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/sample/TarantoolSample.java0000664000000000000000000000501712202131537030562 0ustar rootrootpackage tarantool.sample; import java.net.UnknownHostException; import java.util.Arrays; import tarantool.connector.TarantoolConnector; import tarantool.connector.TarantoolConnectorConfig; import tarantool.connector.TarantoolConnectorImpl; import tarantool.connector.exception.TarantoolConnectorException; import tarantool.connector.socketpool.SocketPoolType; import tarantool.connector.socketpool.exception.SocketPoolTimeOutException; import tarantool.connector.socketpool.worker.FactoryType; import static tarantool.connector.socketpool.AbstractSocketPool.DISCONNECT_BOUND; import static tarantool.connector.socketpool.AbstractSocketPool.INITIALIZE_SOCKET_POOL_TIMEOUT; import static tarantool.connector.socketpool.AbstractSocketPool.RECONNECT_SOCKET_TIMEOUT; import static tarantool.connector.socketpool.AbstractSocketPool.WAITING_SOCKET_POOL_TIMEOUT; public class TarantoolSample { public static void main(String[] args) { int nameSpace = 0; long latencyPeriod = 60000L; String host = "127.0.0.1"; int port = 33333; int socketReadTimeout = 5000; int minPoolSize = 1; int maxPoolSize = 1; byte[] buffer = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; TarantoolConnectorConfig config = new TarantoolConnectorConfig(host, port, socketReadTimeout, minPoolSize, maxPoolSize, WAITING_SOCKET_POOL_TIMEOUT, RECONNECT_SOCKET_TIMEOUT, INITIALIZE_SOCKET_POOL_TIMEOUT, DISCONNECT_BOUND, FactoryType.PLAIN_SOCKET, SocketPoolType.STATIC_POOL, latencyPeriod, nameSpace); TarantoolConnector tarantoolConnector = null; try { tarantoolConnector = new TarantoolConnectorImpl(config); tarantoolConnector.insertData(1L, buffer); byte[] incomingBuffer = tarantoolConnector.getData(1L); if (Arrays.equals(incomingBuffer, buffer)) { System.out.println("Test is successful! Byte buffers are equals"); } else { System.out.println("Attention! Byte buffers are not equals. Result: " + Arrays.toString(incomingBuffer)); } } catch (UnknownHostException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } catch (TarantoolConnectorException e) { e.printStackTrace(); } catch (SocketPoolTimeOutException e) { e.printStackTrace(); } finally { if (tarantoolConnector != null) { tarantoolConnector.close(); } } } } tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/common/0000775000000000000000000000000012202131537024616 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/common/ByteUtil.java0000664000000000000000000001521012202131537027221 0ustar rootrootpackage tarantool.common; public class ByteUtil { public static final int LENGTH_SHORT = 2; public static final int LENGTH_INTEGER = 4; public static final int LENGTH_LONG = 8; public static int writeInteger(byte[] bytes, int position, int value) { bytes[position + 3] = (byte) ((value >>> 24) & 0xFF); bytes[position + 2] = (byte) ((value >>> 16) & 0xFF); bytes[position + 1] = (byte) ((value >>> 8) & 0xFF); bytes[position ] = (byte) ((value) & 0xFF); return LENGTH_INTEGER; } public static int readInteger(byte[] bytes, int position) { return ((bytes[position + 3] & 0xFF) << 24) | ((bytes[position + 2] & 0xFF) << 16) | ((bytes[position + 1] & 0xFF) << 8) | ((bytes[position] & 0xFF)); } public static int writeUnsignedInteger(byte[] bytes, int position, long value) { bytes[position + 3] = (byte) ((value >>> 24) & 0xFF); bytes[position + 2] = (byte) ((value >>> 16) & 0xFF); bytes[position + 1] = (byte) ((value >>> 8) & 0xFF); bytes[position ] = (byte) ((value) & 0xFF); return LENGTH_INTEGER; } public static long readUnsignedInteger(byte[] bytes, int position) { return ((long)(bytes[position + 3] & 0xFF) << 24) | ((long)(bytes[position + 2] & 0xFF) << 16) | ((long)(bytes[position + 1] & 0xFF) << 8) | ((long)(bytes[position] & 0xFF)); } public static int writeLong(byte[] bytes, int position, long value) { bytes[position + 7] = (byte) ((value >>> 56) & 0xFF); bytes[position + 6] = (byte) ((value >>> 48) & 0xFF); bytes[position + 5] = (byte) ((value >>> 40) & 0xFF); bytes[position + 4] = (byte) ((value >>> 32) & 0xFF); bytes[position + 3] = (byte) ((value >>> 24) & 0xFF); bytes[position + 2] = (byte) ((value >>> 16) & 0xFF); bytes[position + 1] = (byte) ((value >>> 8) & 0xFF); bytes[position ] = (byte) ((value) & 0xFF); return LENGTH_LONG; } public static long readLong(byte[] bytes, int position) { return ((long)(bytes[position + 7] & 0xFF) << 56) | ((long)(bytes[position + 6] & 0xFF) << 48) | ((long)(bytes[position + 5] & 0xFF) << 40) | ((long)(bytes[position + 4] & 0xFF) << 32) | ((long)(bytes[position + 3] & 0xFF) << 24) | ((long)(bytes[position + 2] & 0xFF) << 16) | ((long)(bytes[position + 1] & 0xFF) << 8) | ((long)(bytes[position] & 0xFF)); } public static byte[] toBytes(long value) { byte[] bytes = new byte[LENGTH_LONG]; bytes[7] = (byte) ((value >>> 56) & 0xFF); bytes[6] = (byte) ((value >>> 48) & 0xFF); bytes[5] = (byte) ((value >>> 40) & 0xFF); bytes[4] = (byte) ((value >>> 32) & 0xFF); bytes[3] = (byte) ((value >>> 24) & 0xFF); bytes[2] = (byte) ((value >>> 16) & 0xFF); bytes[1] = (byte) ((value >>> 8) & 0xFF); bytes[0] = (byte) ((value) & 0xFF); return bytes; } public static long toLong(byte[] bytes) { return ((long)(bytes[7] & 0xFF) << 56) | ((long)(bytes[6] & 0xFF) << 48) | ((long)(bytes[5] & 0xFF) << 40) | ((long)(bytes[4] & 0xFF) << 32) | ((long)(bytes[3] & 0xFF) << 24) | ((long)(bytes[2] & 0xFF) << 16) | ((long)(bytes[1] & 0xFF) << 8) | ((long)(bytes[0] & 0xFF)); } public static int writeBytes(byte[] bytes, int position, byte[] value, int start, int length) { System.arraycopy(value, start, bytes, position, length); return length; } public static int readBytes(byte[] src, int position, byte[] dest, int destPosition, int length) { System.arraycopy(src, position, dest, destPosition, length); return length; } public static byte[] convertLongIdToByteArray(long id) { byte[] byteId = new byte[LENGTH_LONG]; ByteUtil.writeLong(byteId, 0, id); return byteId; } /** * Compute the space needed to encode the length in BER code. * * @param length Length to encode * @return the count of bytes needed to encode the value length */ public static int sizeOfInVarInt32(int length) { if (length < (1 << 7)) { return 1; } if (length < (1 << 14)) { return 2; } if (length < (1 << 21)) { return 3; } if (length < (1 << 28)) { return 4; } return 5; } public static int decodeLengthInVar32Int(byte[] in, int offset) { if ((in[offset] & 0x80) == 0) { return (in[offset] & 0x7F); } if ((in[offset + 1] & 0x80) == 0) { return (in[offset] & 0x7F) << 7 | (in[offset + 1] & 0x7F); } if ((in[offset + 2] & 0x80) == 0) { return (in[offset] & 0x7F) << 14 | (in[offset + 1] & 0x7F) << 7 | (in[offset + 2] & 0x7F); } if ((in[offset + 3] & 0x80) == 0) { return (in[offset] & 0x7F) << 21 | (in[offset + 1] & 0x7F) << 14 | (in[offset + 2] & 0x7F) << 7 | (in[offset + 3] & 0x7F); } if ((in[offset + 4] & 0x80) == 0) { return (in[offset] & 0x7F) << 28 | (in[offset + 1] & 0x7F) << 21 | (in[offset + 2] & 0x7F) << 14 | (in[offset + 3] & 0x7F) << 7 | (in[offset + 4] & 0x7F); } return 0; } /** * Encodes the length. * * @param out an byte[] to which the length is encoded. * @param offset positoin in out where start to write length * @param length the length of the object */ public static int encodeLengthInVar32Int(byte[] out, int offset, int length) { int currentOffset = offset; if (length >= (1 << 7)) { if (length >= (1 << 14)) { if (length >= (1 << 21)) { if (length >= (1 << 28)) { out[currentOffset++] = (byte) ((length >> 28) | 0x80); } out[currentOffset++] = (byte) ((length >> 21) | 0x80); } out[currentOffset++] = (byte) ((length >> 14) | 0x80); } out[currentOffset++] = (byte) ((length >> 7) | 0x80); } out[currentOffset] = (byte) ((length) & 0x7F); return currentOffset - offset + 1; } } tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/0000775000000000000000000000000012202131537025320 5ustar rootroot././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/RequestResponseFormatter.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/RequestResponseFormatt0000664000000000000000000002064412202131537031755 0ustar rootrootpackage tarantool.connector; import java.io.IOException; import tarantool.connector.exception.TarantoolConnectorException; import tarantool.connector.socketpool.worker.SocketWorker; import tarantool.common.ByteUtil; public class RequestResponseFormatter { public static final int HEADER_LENGTH = 12; private static final int INSERT_PACKET_SIZE = RequestResponseFormatter.HEADER_LENGTH + 20 + ByteUtil.sizeOfInVarInt32(4); private static final int GET_PACKET_SIZE = RequestResponseFormatter.HEADER_LENGTH + 32 + ByteUtil.sizeOfInVarInt32(4); private static final int DELETE_PACKET_SIZE = RequestResponseFormatter.HEADER_LENGTH + 16 + ByteUtil.sizeOfInVarInt32(4); private static final int KEY_SET_PACKET_SIZE = RequestResponseFormatter.HEADER_LENGTH + 4; private static final int LUA_SCRIPT_PACKET_SIZE = RequestResponseFormatter.HEADER_LENGTH + 8; // ascii string "get_all_pkeys" private static final byte[] GET_ALL_KEYS_LUA_SCRIPT = {103, 101, 116, 95, 97, 108, 108, 95, 112, 107, 101, 121, 115}; public static byte[] createInsertCommand(byte[] uid, int requestId, int nameSpaceId, byte[] data) { final byte[] packet = new byte[INSERT_PACKET_SIZE + ByteUtil.sizeOfInVarInt32(data.length) + data.length]; int offset = createHeader(packet, TarantoolCommand.INSERT.getId(), requestId); // 4 bytes - Namespace number offset += ByteUtil.writeInteger(packet, offset, nameSpaceId); // 4 bytes - offset += ByteUtil.writeInteger(packet, offset, 0); // 4 bytes - : Number of fields in the tuple offset += ByteUtil.writeInteger(packet, offset, 2); /** * * field_t: , The field with the user data of indicated length * ... * */ // N bytes - field_t: offset += ByteUtil.encodeLengthInVar32Int(packet, offset, 8); // 4 bytes - offset += ByteUtil.writeBytes(packet, offset, uid, 0, uid.length); // N bytes - field_t: offset += ByteUtil.encodeLengthInVar32Int(packet, offset, data.length); // N bytes - ByteUtil.writeBytes(packet, offset, data, 0, data.length); return packet; } public static byte[] createGetDataCommand(byte[] uid, int requestId, int nameSpaceId) { final byte[] packet = new byte[GET_PACKET_SIZE]; int offset = createHeader(packet, TarantoolCommand.SELECT.getId(), requestId); // 4 bytes - Namespace number offset += ByteUtil.writeInteger(packet, offset, nameSpaceId); // 4 bytes - Index number offset += ByteUtil.writeInteger(packet, offset, 0); // 4 bytes - Offset of the return data offset += ByteUtil.writeInteger(packet, offset, 0); /** * 4 bytes - Maximal number of results in the answer * -1 UINT32_MAX actually */ offset += ByteUtil.writeInteger(packet, offset, -1); // 4 bytes - Number of keys for the current query offset += ByteUtil.writeInteger(packet, offset, 1); /** * */ offset += ByteUtil.writeInteger(packet, offset, 1); offset += ByteUtil.encodeLengthInVar32Int(packet, offset, 8); ByteUtil.writeBytes(packet, offset, uid, 0, uid.length); return packet; } public static byte[] createDeleteCommand(byte[] uid, int requestId, int nameSpaceId) { final byte[] packet = new byte[DELETE_PACKET_SIZE]; int offset = createHeader(packet, TarantoolCommand.DELETE.getId(), requestId); // 4 bytes - Namespace number offset += ByteUtil.writeInteger(packet, offset, nameSpaceId); /** * * 8 bytes + VAR32 */ offset += ByteUtil.writeInteger(packet, offset, 1); offset += ByteUtil.encodeLengthInVar32Int(packet, offset, 8); ByteUtil.writeBytes(packet, offset, uid, 0, uid.length); return packet; } public static byte[] createDeliverKeySetCommand(int requestId, int nameSpaceId) { byte[] packet = new byte[KEY_SET_PACKET_SIZE]; int offset = createHeader(packet, TarantoolCommand.LUA_CALL.getId(), requestId); ByteUtil.writeInteger(packet, offset, nameSpaceId); return packet; } public static byte[] createScriptDeliverKeySetCommand(int requestId, int nameSpaceId, int batchSize) { byte[] batchSizeStr = convertIntToANSI(batchSize); int size = GET_ALL_KEYS_LUA_SCRIPT.length + ByteUtil.sizeOfInVarInt32(GET_ALL_KEYS_LUA_SCRIPT.length) + batchSizeStr.length + ByteUtil.sizeOfInVarInt32(batchSizeStr.length); byte[] packet = new byte[LUA_SCRIPT_PACKET_SIZE + size]; int offset = createHeader(packet, TarantoolCommand.LUA_CALL.getId(), requestId); // 4 bytes - Namespace number offset += ByteUtil.writeInteger(packet, offset, nameSpaceId); // N bytes - field_t: offset += ByteUtil.encodeLengthInVar32Int(packet, offset, GET_ALL_KEYS_LUA_SCRIPT.length); // 4 bytes - offset += ByteUtil.writeBytes(packet, offset, GET_ALL_KEYS_LUA_SCRIPT, 0, GET_ALL_KEYS_LUA_SCRIPT.length); // 4 bytes - arguments count offset += ByteUtil.writeInteger(packet, offset, 1); /** * */ offset += ByteUtil.encodeLengthInVar32Int(packet, offset, batchSizeStr.length); ByteUtil.writeBytes(packet, offset, batchSizeStr, 0, batchSizeStr.length); return packet; } public static byte[] createPingCommand(int requestId) { byte[] packet = new byte[RequestResponseFormatter.HEADER_LENGTH]; createHeader(packet, TarantoolCommand.PING.getId(), requestId); return packet; } public static TarantoolResponse responseParser(byte[] header) { int dataLength = ByteUtil.readInteger(header, 4); int requestId = ByteUtil.readInteger(header, 8); return new TarantoolResponse(dataLength, requestId); } public static int createHeader(byte[] buffer, int command, int requestId) { int offset = 0; // 4 bytes - The code of the operation which the server must execute offset += ByteUtil.writeInteger(buffer, offset, command); // 4 bytes - The length of the data packet which does not count the header size offset += ByteUtil.writeInteger(buffer, offset, buffer.length - RequestResponseFormatter.HEADER_LENGTH); // 4 bytes - A random number which identifies the query offset += ByteUtil.writeInteger(buffer, offset, requestId); return offset; } public static byte[] readResponseData(int requestId, SocketWorker worker) throws IOException, TarantoolConnectorException { byte[] header = new byte[RequestResponseFormatter.HEADER_LENGTH]; int readData = worker.readData(header, RequestResponseFormatter.HEADER_LENGTH); TarantoolResponse response = responseParser(header); if (readData != RequestResponseFormatter.HEADER_LENGTH) { throw new TarantoolConnectorException("Incorrect size of response header"); } if (requestId != response.getRequestId()) { throw new TarantoolConnectorException("Incorrect request Id"); } int dataLength = response.getDataLength(); if (dataLength <= 0) { throw new TarantoolConnectorException("Incorrect size of response result"); } byte[] result = new byte[dataLength]; readData = worker.readData(result, dataLength); if (readData != dataLength) { throw new TarantoolConnectorException("Wrong size of data or length of data that was read"); } return result; } private static byte[] convertIntToANSI(int value) { int count = 0; int index = value < 0? 1: 0; int abs = Math.abs(value); long delimiter = 1; for (;;) { count++; if (abs / (delimiter * 10) == 0) { break; } delimiter *= 10; } byte[] result = new byte[count + index]; if (index > 0) { result[index - 1] = 45; } for (; count--> 0; delimiter /= 10) { long d = abs / delimiter; result[index++] = (byte)(d + 48); abs -= d * delimiter; } return result; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolConnectorConfig.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolConnectorConf0000664000000000000000000000242312202131537031670 0ustar rootrootpackage tarantool.connector; import tarantool.connector.socketpool.SocketPoolConfig; import tarantool.connector.socketpool.SocketPoolType; import tarantool.connector.socketpool.worker.FactoryType; public class TarantoolConnectorConfig { private final SocketPoolConfig socketPoolConfig; private final int nameSpace; public TarantoolConnectorConfig(String host, int port, int socketReadTimeout, int minPoolSize, int maxPoolSize, long waitingTimeout, long reconnectTimeout, long initializeTimeout, int disconnectBound, FactoryType type, SocketPoolType socketPoolType, long latencyPeriod, int nameSpace) { this.socketPoolConfig = new SocketPoolConfig(host, port, socketReadTimeout, minPoolSize, maxPoolSize, waitingTimeout, reconnectTimeout, initializeTimeout, disconnectBound, type, socketPoolType, latencyPeriod); this.nameSpace = nameSpace; } public int getNameSpace() { return nameSpace; } public SocketPoolConfig getSocketPoolConfig() { return socketPoolConfig; } @Override public String toString() { return "TarantoolConnectorConfig{" + "socketPoolConfig=" + socketPoolConfig + ", nameSpace=" + nameSpace + '}'; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolServerErrorCode.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolServerErrorCo0000664000000000000000000001012212202131537031665 0ustar rootrootpackage tarantool.connector; import java.util.HashMap; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class TarantoolServerErrorCode { private static final Log LOG = LogFactory.getLog(TarantoolServerErrorCode.class); public final static TarantoolServerErrorCode ERR_CODE_OK; public final static TarantoolServerErrorCode ERR_CODE_NONMASTER; public final static TarantoolServerErrorCode ERR_CODE_ILLEGAL_PARAMS; public final static TarantoolServerErrorCode ERR_CODE_NODE_IS_RO; public final static TarantoolServerErrorCode ERR_CODE_NODE_IS_LOCKED; public final static TarantoolServerErrorCode ERR_CODE_MEMORY_ISSUE; public final static TarantoolServerErrorCode ERR_CODE_UNSUPPORTED_COMMAND; public final static TarantoolServerErrorCode ERR_CODE_WRONG_FIELD; public final static TarantoolServerErrorCode ERR_CODE_WRONG_NUMBER; public final static TarantoolServerErrorCode ERR_CODE_DUPLICATE; public final static TarantoolServerErrorCode ERR_CODE_NOTHING; public final static TarantoolServerErrorCode ERR_CODE_WRONG_VERSION; public final static TarantoolServerErrorCode ERR_CODE_UNKNOWN_ERROR; private int codeId; private String error; private static Map ERROR_CODE_MAPS; static { ERROR_CODE_MAPS = new HashMap(13); ERR_CODE_OK = new TarantoolServerErrorCode(0x00000000, "The query was executed without errors"); ERR_CODE_NONMASTER = new TarantoolServerErrorCode(0x00000102, "An attempt was made to change data on a read-only port"); ERR_CODE_ILLEGAL_PARAMS = new TarantoolServerErrorCode(0x00000202, "Incorrectly formatted query"); ERR_CODE_NODE_IS_RO = new TarantoolServerErrorCode(0x00000401, "The requested data is blocked from modification"); ERR_CODE_NODE_IS_LOCKED = new TarantoolServerErrorCode(0x00000601, "The requested data is not available"); ERR_CODE_MEMORY_ISSUE = new TarantoolServerErrorCode(0x00000701, "An error occurred when allocating memory"); ERR_CODE_UNSUPPORTED_COMMAND = new TarantoolServerErrorCode(0x00000a02, "The query is not recognized"); ERR_CODE_WRONG_FIELD = new TarantoolServerErrorCode(0x00001E02, "An unknown field was requested"); ERR_CODE_WRONG_NUMBER = new TarantoolServerErrorCode(0x00001F02, "An out-of-range numeric value was included in the query"); ERR_CODE_DUPLICATE = new TarantoolServerErrorCode(0x00002002, "An attempt was made to create an object with an existing key"); ERR_CODE_NOTHING = new TarantoolServerErrorCode(0x00002400, "The query does not support data modification or return"); ERR_CODE_WRONG_VERSION = new TarantoolServerErrorCode(0x00002602, "The protocol version is not supported"); ERR_CODE_UNKNOWN_ERROR = new TarantoolServerErrorCode(0x00002702, "Unknown error"); } public static TarantoolServerErrorCode getErrorBy(int errorCode) { if (errorCode == ERR_CODE_OK.codeId) { return null; } final TarantoolServerErrorCode tarantoolServerErrorCode = ERROR_CODE_MAPS.get(errorCode); if (tarantoolServerErrorCode == null) { LOG.warn("Not supported code received from server: " + errorCode); return ERR_CODE_UNKNOWN_ERROR; } return tarantoolServerErrorCode; } public TarantoolServerErrorCode(int codeId, String error) { this.codeId = codeId; this.error = error; TarantoolServerErrorCode previousError = ERROR_CODE_MAPS.put(codeId, this); if (previousError == null) { return; } throw new IllegalStateException("Duplicate error code: " + codeId + " for errors: " + error + ", " + previousError.getError()); } public String getError() { return error; } public int getCodeId() { return codeId; } @Override public String toString() { return "TarantoolServerErrorCode{" + "codeId=" + codeId + ", error='" + error + '\'' + '}'; } } tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolCommand.java0000664000000000000000000000506212202131537031430 0ustar rootrootpackage tarantool.connector; import java.util.HashMap; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class TarantoolCommand { private static final Log LOG = LogFactory.getLog(TarantoolCommand.class); private final static Map COMMANDS_MAPS; public final static TarantoolCommand PING; public final static TarantoolCommand INSERT; public final static TarantoolCommand SELECT; public final static TarantoolCommand UPDATE; public final static TarantoolCommand DELETE; public final static TarantoolCommand LUA_CALL; // valid as keyset operation in tarantool 1.3.2 static { COMMANDS_MAPS = new HashMap(6); PING = new TarantoolCommand(0xFF00, "ping"); INSERT = new TarantoolCommand(0x0D, "insert"); SELECT = new TarantoolCommand(0x11, "select"); UPDATE = new TarantoolCommand(0x13, "update"); DELETE = new TarantoolCommand(0x14, "delete"); LUA_CALL = new TarantoolCommand(0x15, "luacall"); } private int id; private String name; public static TarantoolCommand getCommandBy(int id) { final TarantoolCommand tarantoolCommand = COMMANDS_MAPS.get(id); if (tarantoolCommand == null) { LOG.warn("Not supported code received from server with id: " + id); return null; } return tarantoolCommand; } TarantoolCommand(int id, String name) { this.id = id; this.name = name; TarantoolCommand tarantoolCommand = COMMANDS_MAPS.put(id, this); if (tarantoolCommand == null) { return; } throw new IllegalStateException("Duplicate name with id: " + id + " and name: " + name + ", " + tarantoolCommand.getName()); } public int getId() { return id; } public String getName() { return name; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TarantoolCommand that = (TarantoolCommand) o; return id == that.id; } @Override public int hashCode() { int result = id; result = 31 * result + (name != null ? name.hashCode() : 0); return result; } @Override public String toString() { return "TarantoolCommand{" + "id=" + id + ", name='" + name + '\'' + '}'; } } tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolResponse.java0000664000000000000000000000063012202131537031644 0ustar rootrootpackage tarantool.connector; public class TarantoolResponse { private final int dataLength; private final int requestId; public TarantoolResponse(int dataLength, int requestId) { this.dataLength = dataLength; this.requestId = requestId; } public int getDataLength() { return dataLength; } public int getRequestId() { return requestId; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolConnectorImpl.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolConnectorImpl0000664000000000000000000003236312202131537031712 0ustar rootrootpackage tarantool.connector; import java.io.IOException; import java.net.UnknownHostException; import java.util.concurrent.atomic.AtomicInteger; import tarantool.connector.exception.TarantoolConnectorException; import tarantool.connector.exception.TarantoolUnavailableException; import tarantool.connector.socketpool.SocketPool; import tarantool.connector.socketpool.SocketPoolFactory; import tarantool.connector.socketpool.exception.SocketPoolException; import tarantool.connector.socketpool.exception.SocketPoolTimeOutException; import tarantool.connector.socketpool.worker.SocketWorker; import tarantool.common.ByteUtil; public class TarantoolConnectorImpl implements TarantoolConnector { private final int nameSpace; private final AtomicInteger requestId = new AtomicInteger(1); private final SocketPool pool; private interface InternalParser { void allocateMemory(int size); void parse(byte[] buffer, int offset, int index); T getResult(); T getEmptyResult(); } private static class LongParser implements InternalParser { long[] keys; @Override public void allocateMemory(int size) { keys = new long[size]; } @Override public void parse(byte[] buffer, int offset, int index) { keys[index] = ByteUtil.readLong(buffer, offset); } @Override public long[] getResult() { return keys; } @Override public long[] getEmptyResult() { return new long[0]; } } private static class ByteArrayParser implements InternalParser { private byte[][] keys; @Override public void allocateMemory(int size) { keys = new byte[size][ByteUtil.LENGTH_LONG]; } @Override public void parse(byte[] buffer, int offset, int index) { ByteUtil.readBytes(buffer, offset, keys[index], 0, ByteUtil.LENGTH_LONG); } @Override public byte[][] getResult() { return keys; } @Override public byte[][] getEmptyResult() { return new byte[0][0]; } } public TarantoolConnectorImpl(TarantoolConnectorConfig tarantoolConfig) throws UnknownHostException, SocketPoolTimeOutException { this.nameSpace = tarantoolConfig.getNameSpace(); this.pool = SocketPoolFactory.createSocketPool(tarantoolConfig.getSocketPoolConfig()); } private int getRequestId() { if (requestId.get() == Integer.MAX_VALUE) { requestId.compareAndSet(Integer.MAX_VALUE, 1); } return requestId.getAndIncrement(); } @Override public void insertData(long id, byte[] data) throws InterruptedException, TarantoolConnectorException { SocketWorker worker = getSocketWorker(); try { insert(id, getRequestId(), data, worker); } catch (IOException e) { throw new TarantoolConnectorException("Can't correct make socket operation", e); } finally { worker.release(); } } @Override public void insertData(byte[] id, byte[] data) throws InterruptedException, TarantoolConnectorException { SocketWorker worker = getSocketWorker(); try { insert(id, getRequestId(), data, worker); } catch (IOException e) { throw new TarantoolConnectorException("Can't correct make socket operation", e); } finally { worker.release(); } } @Override public byte[] getData(long id) throws InterruptedException, TarantoolConnectorException { SocketWorker worker = getSocketWorker(); try { return get(id, getRequestId(), worker); } catch (IOException e) { throw new TarantoolConnectorException("Can't correct make socket operation", e); } finally { worker.release(); } } @Override public byte[] getData(byte[] id) throws InterruptedException, TarantoolConnectorException { SocketWorker worker = getSocketWorker(); try { return get(id, getRequestId(), worker); } catch (IOException e) { throw new TarantoolConnectorException("Can't correct make socket operation", e); } finally { worker.release(); } } @Override public boolean deleteById(long id) throws InterruptedException, TarantoolConnectorException { return deleteById(ByteUtil.convertLongIdToByteArray(id)); } @Override public boolean deleteById(byte[] id) throws InterruptedException, TarantoolConnectorException { SocketWorker worker = getSocketWorker(); try { int requestId = getRequestId(); byte[] packet = RequestResponseFormatter.createDeleteCommand(id, requestId, nameSpace); worker.writeData(packet); byte[] result = RequestResponseFormatter.readResponseData(requestId, worker); final TarantoolServerErrorCode errorCode = TarantoolServerErrorCode.getErrorBy(ByteUtil.readInteger(result, 0)); if (errorCode == null) { int deletedElements = ByteUtil.readInteger(result, 4); return deletedElements > 0; } else { throw new TarantoolConnectorException("Can't delete data by id: " + errorCode); } } catch (IOException e) { throw new TarantoolConnectorException("Can't correct make socket operation", e); } finally { worker.release(); } } @Override public byte[][] getKeySetAsByteArray() throws TarantoolConnectorException, InterruptedException { return getKeySet(new ByteArrayParser()); } @Override public long[] getKeySetAsLongArray() throws TarantoolConnectorException, InterruptedException { return getKeySet(new LongParser()); } @SuppressWarnings("unchecked") private T getKeySet(InternalParser parser) throws InterruptedException, TarantoolConnectorException { SocketWorker worker = getSocketWorker(); try { int requestId = getRequestId(); byte[] packet = RequestResponseFormatter.createDeliverKeySetCommand(requestId, nameSpace); worker.writeData(packet); byte[] result = RequestResponseFormatter.readResponseData(requestId, worker); final TarantoolServerErrorCode errorCode = TarantoolServerErrorCode.getErrorBy(ByteUtil.readInteger(result, 0)); if (errorCode == null) { int updatedElements = ByteUtil.readInteger(result, 4); if (updatedElements > 0) { int offset = 8; parser.allocateMemory(updatedElements); for (int i = 0; i < updatedElements; i++) { offset += 8; int valueLength = ByteUtil.decodeLengthInVar32Int(result, offset); if (valueLength != 8) { throw new TarantoolConnectorException("Get key set operation return incorrect id length: " + valueLength); } offset += ByteUtil.sizeOfInVarInt32(valueLength); parser.parse(result, offset, i); offset += 8; } return (T)parser.getResult(); } else { return (T)parser.getEmptyResult(); } } else { throw new TarantoolConnectorException("Can't get key set: " + errorCode); } } catch (IOException e) { throw new TarantoolConnectorException("Can't correct make socket operation", e); } finally { worker.release(); } } @Override public long[] getScriptKeySetAsLongArray(int batchSize) throws TarantoolConnectorException, InterruptedException { return getScriptKeySet(batchSize, new LongParser()); } @Override public byte[][] getScriptKeySetAsByteArray(int batchSize) throws TarantoolConnectorException, InterruptedException { return getScriptKeySet(batchSize, new ByteArrayParser()); } @SuppressWarnings("unchecked") private T getScriptKeySet(int batchSize, InternalParser parser) throws InterruptedException, TarantoolConnectorException { SocketWorker worker = getSocketWorker(); try { int requestId = getRequestId(); byte[] packet = RequestResponseFormatter.createScriptDeliverKeySetCommand(requestId, nameSpace, batchSize); worker.writeData(packet); byte[] result = RequestResponseFormatter.readResponseData(requestId, worker); final TarantoolServerErrorCode errorCode = TarantoolServerErrorCode.getErrorBy(ByteUtil.readInteger(result, 0)); if (errorCode == null) { int updatedElements = ByteUtil.readInteger(result, 4); if (updatedElements > 0) { int offset = 8; parser.allocateMemory(updatedElements); for (int i = 0; i < updatedElements; i++) { int valueLength = ByteUtil.decodeLengthInVar32Int(result, offset); if (valueLength != 8) { throw new TarantoolConnectorException("Get key set operation return incorrect id length: " + valueLength); } offset += ByteUtil.sizeOfInVarInt32(valueLength); parser.parse(result, offset, i); offset += 8; } return (T)parser.getResult(); } else { return (T)parser.getEmptyResult(); } } else { throw new TarantoolConnectorException("Can't get key set: " + errorCode); } } catch (IOException e) { throw new TarantoolConnectorException("Can't correct make socket operation", e); } finally { worker.release(); } } @Override public void truncate() throws InterruptedException, TarantoolConnectorException { long[] keySet = getKeySetAsLongArray(); for(long key: keySet) { deleteById(key); } } @Override public void close() { pool.close(); } private SocketWorker getSocketWorker() throws InterruptedException, TarantoolConnectorException { try { return pool.borrowSocketWorker(); } catch (SocketPoolTimeOutException e) { throw new TarantoolConnectorException("There are no free sockets", e); } catch (SocketPoolException e) { throw new TarantoolUnavailableException("Socket pool unavailable", e); } } private void insert(long id, int requestId, byte[] data, SocketWorker worker) throws IOException, TarantoolConnectorException { insert(ByteUtil.convertLongIdToByteArray(id), requestId, data, worker); } private void insert(byte[] id, int requestId, byte[] data, SocketWorker worker) throws IOException, TarantoolConnectorException { byte[] packet = RequestResponseFormatter.createInsertCommand(id, requestId, nameSpace, data); worker.writeData(packet); byte[] result = RequestResponseFormatter.readResponseData(requestId, worker); final TarantoolServerErrorCode errorCode = TarantoolServerErrorCode.getErrorBy(ByteUtil.readInteger(result, 0)); if (errorCode == null) { int updatedElements = ByteUtil.readInteger(result, 4); if (updatedElements != 1) { throw new TarantoolConnectorException("Incorrect number [" + updatedElements + "] of updated elements during insert operation."); } } else { throw new TarantoolConnectorException("Can't insert data: " + errorCode); } } private byte[] get(long id, int requestId, SocketWorker worker) throws IOException, TarantoolConnectorException { return get(ByteUtil.convertLongIdToByteArray(id), requestId, worker); } private byte[] get(byte[] id, int requestId, SocketWorker worker) throws IOException, TarantoolConnectorException { byte[] packet = RequestResponseFormatter.createGetDataCommand(id, requestId, nameSpace); worker.writeData(packet); byte[] result = RequestResponseFormatter.readResponseData(requestId, worker); final TarantoolServerErrorCode errorCode = TarantoolServerErrorCode.getErrorBy(ByteUtil.readInteger(result, 0)); if (errorCode == null) { int updatedElements = ByteUtil.readInteger(result, 4); if (updatedElements == 1) { // skip lenght of the data (4 bytes), number of fields (4 bytes), uid (5 bytes) int valueLength = ByteUtil.decodeLengthInVar32Int(result, 25); int offset = ByteUtil.sizeOfInVarInt32(valueLength); final byte[] values = new byte[valueLength]; ByteUtil.readBytes(result, 25 + offset, values, 0, valueLength); return values; } else { return new byte[0]; } } else { throw new TarantoolConnectorException("Can't get data: " + errorCode); } } } tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/0000775000000000000000000000000012202131537027502 5ustar rootroot././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolConfig.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolC0000664000000000000000000000676012202131537031623 0ustar rootrootpackage tarantool.connector.socketpool; import tarantool.connector.socketpool.worker.FactoryType; public class SocketPoolConfig { private String host; private int port; private int socketReadTimeout; private int minPoolSize; private int maxPoolSize; private long waitingTimeout; private long reconnectTimeout; private long initializeTimeout; private int disconnectBound; private FactoryType type; private SocketPoolType socketPoolType; private long latencyPeriod; public SocketPoolConfig(String host, int port, int socketReadTimeout, int minPoolSize, int maxPoolSize, long waitingTimeout, long reconnectTimeout, long initializeTimeout, int disconnectBound, FactoryType type, SocketPoolType socketPoolType, long latencyPeriod) { this.host = host; this.port = port; this.socketReadTimeout = socketReadTimeout; this.minPoolSize = minPoolSize; this.maxPoolSize = maxPoolSize; this.waitingTimeout = waitingTimeout; this.reconnectTimeout = reconnectTimeout; this.initializeTimeout = initializeTimeout; this.disconnectBound = disconnectBound; this.type = type; this.socketPoolType = socketPoolType; this.latencyPeriod = latencyPeriod; } public SocketPoolConfig(String host, int port, int socketReadTimeout, int minPoolSize, long waitingTimeout, long reconnectTimeout, long initializeTimeout, int disconnectBound, FactoryType type, SocketPoolType socketPoolType) { this.host = host; this.port = port; this.socketReadTimeout = socketReadTimeout; this.minPoolSize = minPoolSize; this.waitingTimeout = waitingTimeout; this.reconnectTimeout = reconnectTimeout; this.initializeTimeout = initializeTimeout; this.disconnectBound = disconnectBound; this.type = type; this.socketPoolType = socketPoolType; } public String getHost() { return host; } public int getPort() { return port; } public int getSocketReadTimeout() { return socketReadTimeout; } public int getMinPoolSize() { return minPoolSize; } public int getMaxPoolSize() { return maxPoolSize; } public long getWaitingTimeout() { return waitingTimeout; } public long getReconnectTimeout() { return reconnectTimeout; } public long getInitializeTimeout() { return initializeTimeout; } public int getDisconnectBound() { return disconnectBound; } public FactoryType getType() { return type; } public long getLatencyPeriod() { return latencyPeriod; } public SocketPoolType getSocketPoolType() { return socketPoolType; } @Override public String toString() { return "SocketPoolConfig{" + "host='" + host + '\'' + ", port=" + port + ", socketReadTimeout=" + socketReadTimeout + ", minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", waitingTimeout=" + waitingTimeout + ", reconnectTimeout=" + reconnectTimeout + ", initializeTimeout=" + initializeTimeout + ", disconnectBound=" + disconnectBound + ", type=" + type + ", socketPoolType=" + socketPoolType + ", latencyPeriod=" + latencyPeriod + '}'; } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolType.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolT0000664000000000000000000000015312202131537031632 0ustar rootrootpackage tarantool.connector.socketpool; public enum SocketPoolType { DYNAMIC_POOL, STATIC_POOL } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolStateMachine.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolS0000664000000000000000000000356512202131537031643 0ustar rootrootpackage tarantool.connector.socketpool; class SocketPoolStateMachine { // state diagram enum PoolState { RUNNING { @Override PoolState connect() { return RUNNING; } @Override PoolState disconnect() { return RECONNECTING; } @Override PoolState close() { return CLOSED; }}, RECONNECTING { @Override PoolState connect() { return RUNNING; } @Override PoolState disconnect() { return RECONNECTING; } @Override PoolState close() { return CLOSED; }}, CLOSED { @Override PoolState connect() { throw new IllegalStateException("Can't change closed pool state"); } @Override PoolState disconnect() { throw new IllegalStateException("Can't change closed pool state"); } @Override PoolState close() { throw new IllegalStateException("Can't change closed pool state"); }}; abstract PoolState connect(); abstract PoolState disconnect(); abstract PoolState close(); } private volatile PoolState state = PoolState.RUNNING; public void connect() { state = state.connect(); } public void disconnect() { state = state.disconnect(); } public void close() { state = state.close(); } public boolean isRunning() { return state == PoolState.RUNNING; } public boolean isReconnecting() { return state == PoolState.RECONNECTING; } public boolean isClosed() { return state == PoolState.CLOSED; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPool.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPool.0000664000000000000000000000050112202131537031561 0ustar rootrootpackage tarantool.connector.socketpool; import tarantool.connector.socketpool.exception.SocketPoolException; import tarantool.connector.socketpool.worker.SocketWorker; public interface SocketPool { SocketWorker borrowSocketWorker() throws InterruptedException, SocketPoolException; void close(); } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/DynamicSocketPool.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/DynamicSock0000664000000000000000000002216612202131537031640 0ustar rootrootpackage tarantool.connector.socketpool; import java.io.IOException; import java.net.UnknownHostException; import java.util.Deque; import java.util.LinkedList; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import tarantool.connector.socketpool.exception.SocketPoolClosedException; import tarantool.connector.socketpool.exception.SocketPoolException; import tarantool.connector.socketpool.exception.SocketPoolTimeOutException; import tarantool.connector.socketpool.exception.SocketPoolUnavailableException; import tarantool.connector.socketpool.worker.SocketWorker; import tarantool.connector.socketpool.worker.SocketWorkerInternal; /** * Socket pool with low and top waterline. Socket pool uses dynamic balancer for thread count */ class DynamicSocketPool extends AbstractSocketPool { private static final Log LOG = LogFactory.getLog(DynamicSocketPool.class); private static final long MIN_LATENCY_PERIOD = 5000; //5 sec private final long latency; private final int minPoolSize; private final int maxPoolSize; private int currentUsed = 0; private final Deque queue = new LinkedList(); private final Lock lock = new ReentrantLock(); private final Condition cond = lock.newCondition(); private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(new ThreadFactory(){ @Override public Thread newThread(Runnable r) { Thread thread = new Thread(r, "DynamicSocketPoolLatencyCleaner"); thread.setDaemon(true); thread.setPriority(Thread.MIN_PRIORITY); return thread; } }); public DynamicSocketPool(SocketPoolConfig config) throws UnknownHostException, SocketPoolTimeOutException { super(config.getHost(), config.getPort(), config.getSocketReadTimeout(), config.getWaitingTimeout(), config.getReconnectTimeout(), config.getInitializeTimeout(), config.getDisconnectBound(), config.getType()); if (config.getMinPoolSize() < 0 || config.getMaxPoolSize() > config.getMaxPoolSize() || config.getMaxPoolSize() == 0) { throw new IllegalArgumentException("Incorrect value of min or max pool size"); } if (config.getLatencyPeriod() < 0) { throw new IllegalArgumentException("Incorrect value of latency time"); } this.minPoolSize = config.getMinPoolSize(); this.maxPoolSize = config.getMaxPoolSize(); this.latency = config.getLatencyPeriod(); startSocketPoolCleaner(); initializePool(); } private void initializePool() throws SocketPoolTimeOutException { long startTime = System.currentTimeMillis(); for (int i = 0; i < minPoolSize;) { if (stateMachine.isClosed()) { LOG.info("Socket pool is closed, initialization aborted"); return; // Socket pool is closed } lock.lock(); try { if (queue.size() + currentUsed > minPoolSize) { break; } try { SocketWorkerInternal socketWorker = socketWorkerFactory.create(); queue.addFirst(socketWorker); i++; } catch (IOException e) { LOG.warn("Can't establish socket connection because: Exception - " + e.getClass().getSimpleName() + " and case - " + e.getMessage()); try { Thread.sleep(reconnectTimeout); } catch (InterruptedException e1) { LOG.error("Thread in reconnect timeout state is interrupted. Reconnection is aborted"); Thread.currentThread().interrupt(); return; } } } finally { lock.unlock(); } if (System.currentTimeMillis() - startTime > initializeTimeout) { throw new SocketPoolTimeOutException("Initialize pool timeout occur"); } } } private void startSocketPoolCleaner() { Runnable cleanTask = new Runnable() { @Override public void run() { long scheduleTime = latency; if (stateMachine.isClosed()) { LOG.info("Socket pool is closed, cleaner thread stopped"); return; } lock.lock(); try { if (queue.size() + currentUsed <= minPoolSize) { return; } long remainingTime, currentTime = System.currentTimeMillis(); while(!queue.isEmpty()) { SocketWorkerInternal socketWorker = queue.peekLast(); assert socketWorker != null: "Deque must contain socket worker"; remainingTime = currentTime - socketWorker.getLastTimeStamp(); if (remainingTime > latency) { SocketWorkerInternal removed = queue.pollLast(); assert removed == socketWorker: "Incorrect operation peek and remove"; socketWorker.close(); } else { scheduleTime = latency - remainingTime; break; } } } finally { lock.unlock(); if (!stateMachine.isClosed()) { scheduler.schedule(this, MIN_LATENCY_PERIOD + scheduleTime, TimeUnit.MILLISECONDS); } } } }; if (!stateMachine.isClosed()) { scheduler.schedule(cleanTask, MIN_LATENCY_PERIOD + latency, TimeUnit.MILLISECONDS); } } public SocketWorker borrowSocketWorker() throws InterruptedException, SocketPoolException { SocketWorkerInternal socketWorker; if (stateMachine.isClosed()) { throw new SocketPoolClosedException("Socket pool is closed, borrowing of socket worker was rejected"); } if (stateMachine.isReconnecting()) { throw new SocketPoolUnavailableException("Socket pool is reconnecting, borrowing of socket worker was rejected"); } lock.lock(); try { do { socketWorker = queue.pollFirst(); if (socketWorker == null) { if (currentUsed < maxPoolSize) { try { socketWorker = socketWorkerFactory.create(); } catch (IOException e) { LOG.warn("Can't establish socket connection because: Exception - " + e.getClass().getSimpleName() + " and case - " + e.getMessage()); throw new SocketPoolUnavailableException("Can't create extra socket", e); } } else { while(queue.isEmpty()) { if (!cond.await(waitingTimeout, TimeUnit.MILLISECONDS)) { throw new SocketPoolTimeOutException("Timeout is occurred while wait for socket worker"); } } socketWorker = queue.pollFirst(); assert socketWorker != null: "Incorrect state of queue"; } } } while(socketWorker == null); currentUsed++; } finally { lock.unlock(); } return socketWorker; } public void internalReturnSocketWorker(SocketWorkerInternal socketWorker) { if (stateMachine.isClosed()) { socketWorker.close(); LOG.info("Socket pool is closed, return operation skipped"); return; } lock.lock(); try { if (currentUsed > 0) { currentUsed--; } queue.addFirst(socketWorker); cond.signal(); } finally { lock.unlock(); } } @Override void feedReconnect() { lock.lock(); try { for (SocketWorkerInternal worker: queue) { pushToReconnect(worker); } queue.clear(); } finally { lock.unlock(); } } void internalClose() { LOG.info("Socket pool internal close ..."); lock.lock(); try { scheduler.shutdownNow(); for(SocketWorkerInternal socketWorker: queue) { socketWorker.close(); } } finally { lock.unlock(); } } }././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolFactory.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/SocketPoolF0000664000000000000000000000135512202131537031621 0ustar rootrootpackage tarantool.connector.socketpool; import java.net.UnknownHostException; import tarantool.connector.socketpool.exception.SocketPoolTimeOutException; public class SocketPoolFactory { public static SocketPool createSocketPool(SocketPoolConfig socketPoolConfig) throws UnknownHostException, SocketPoolTimeOutException { switch (socketPoolConfig.getSocketPoolType()) { case DYNAMIC_POOL: return new DynamicSocketPool(socketPoolConfig); case STATIC_POOL: return new StaticSocketPool(socketPoolConfig); default: throw new IllegalArgumentException("Incorrect socket pool type: " + socketPoolConfig.getSocketPoolType()); } } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/AbstractSocketPool.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/AbstractSoc0000664000000000000000000001566712202131537031654 0ustar rootrootpackage tarantool.connector.socketpool; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import tarantool.connector.socketpool.exception.SocketPoolException; import tarantool.connector.socketpool.worker.FactoryType; import tarantool.connector.socketpool.worker.SocketFactory; import tarantool.connector.socketpool.worker.SocketWorker; import tarantool.connector.socketpool.worker.SocketWorkerInternal; public abstract class AbstractSocketPool implements SocketPool { private static final Log LOG = LogFactory.getLog(AbstractSocketPool.class); public static final long WAITING_SOCKET_POOL_TIMEOUT = 1000L; // 1 sec public static final long RECONNECT_SOCKET_TIMEOUT = 1000L; // 1 sec public static final long INITIALIZE_SOCKET_POOL_TIMEOUT = 20000L; // 20 sec public static final int DISCONNECT_BOUND = 10; private static final long DISCONNECT_BOUND_CHECK_PERIOD = TimeUnit.SECONDS.toNanos(1); final long waitingTimeout; final long reconnectTimeout; final long initializeTimeout; final SocketFactory socketWorkerFactory; private final int disconnectBound; private long[] timeQueue; private int timeQueueIndex = 0; private final ExecutorService reconnectExecutor; private final BlockingQueue reconnectQueue = new LinkedBlockingQueue(); final SocketPoolStateMachine stateMachine = new SocketPoolStateMachine(); public AbstractSocketPool(String host, int port, int socketReadTimeout, long waitingTimeout, long reconnectTimeout, long initializeTimeout, int disconnectBound, FactoryType type) throws UnknownHostException { if (host == null || "".equals(host.trim())) { throw new IllegalArgumentException("Incorrect host:" + host); } if (port < 0 || port > 0xFFFF) { throw new IllegalArgumentException("Port out of range:" + port); } if (waitingTimeout < 0L) { throw new IllegalArgumentException("Incorrect value of waiting timeout"); } if (reconnectTimeout < 0L) { throw new IllegalArgumentException("Incorrect value of reconnect timeout"); } if (disconnectBound < 0) { throw new IllegalArgumentException("Incorrect value of disconnect bound"); } if (socketReadTimeout < 0) { throw new IllegalArgumentException("Incorrect value of socket read timeout"); } if (initializeTimeout < 0L) { throw new IllegalArgumentException("Incorrect value of initialize timeout"); } this.waitingTimeout = waitingTimeout; this.reconnectTimeout = reconnectTimeout; this.initializeTimeout = initializeTimeout; this.disconnectBound = disconnectBound; this.timeQueue = new long[disconnectBound]; socketWorkerFactory = type.createFactory(InetAddress.getByName(host), port, socketReadTimeout, this); reconnectExecutor = Executors.newSingleThreadExecutor(new ThreadFactory() { @Override public Thread newThread(Runnable r) { Thread thread = new Thread(r, "ReconnectionThread"); thread.setDaemon(true); thread.setPriority(Thread.MIN_PRIORITY); return thread; } }); reconnectExecutor.execute(new Runnable() { @Override public void run() { Thread thread = Thread.currentThread(); while (!thread.isInterrupted()) { SocketWorkerInternal worker = null; try { worker = reconnectQueue.take(); worker.connect(); if (stateMachine.isReconnecting() && reconnectQueue.isEmpty()) { Thread.sleep(AbstractSocketPool.this.reconnectTimeout); if (reconnectQueue.isEmpty()) { // wait reconnectTimeout for check unstable net stateMachine.connect(); } } LOG.info("Reconnect completed successfully"); internalReturnSocketWorker(worker); } catch (InterruptedException e) { LOG.info("Reconnecting thread is stopped"); thread.interrupt(); // thread was stopped, propagate interruption } catch (IOException e) { LOG.info("Reconnect completed failed"); try { reconnectQueue.put(worker); Thread.sleep(AbstractSocketPool.this.reconnectTimeout); } catch (InterruptedException e1) { LOG.info("Reconnecting thread is stopped"); thread.interrupt(); // thread was stopped, propagate interruption } } } } }); } public void close() { stateMachine.close(); reconnectExecutor.shutdownNow(); internalClose(); } public void returnSocketWorker(SocketWorkerInternal socketWorker) { if (socketWorker.isConnected()) { internalReturnSocketWorker(socketWorker); } else { pushToReconnect(socketWorker); if (stateMachine.isRunning()) { synchronized (stateMachine) { if (!stateMachine.isRunning()) { return; } int index = timeQueueIndex++ % timeQueue.length; long lastTimePoint = timeQueue[index]; timeQueue[index] = System.nanoTime(); if (lastTimePoint > 0 && System.nanoTime() - lastTimePoint < DISCONNECT_BOUND_CHECK_PERIOD) { stateMachine.disconnect(); timeQueueIndex = 0; timeQueue = new long[disconnectBound]; feedReconnect(); } } } } } void pushToReconnect(SocketWorkerInternal socketWorker) { socketWorker.close(); boolean added = reconnectQueue.offer(socketWorker); assert added: "Queue can't add wrapper, too many socket worker for queue size"; } public abstract SocketWorker borrowSocketWorker() throws InterruptedException, SocketPoolException; abstract void internalReturnSocketWorker(SocketWorkerInternal socketWorker); abstract void feedReconnect(); abstract void internalClose(); }tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/0000775000000000000000000000000012202131537031013 5ustar rootroot././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/SocketWorkerInternal.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/Sock0000664000000000000000000000254612202131537031644 0ustar rootrootpackage tarantool.connector.socketpool.worker; import java.io.IOException; import java.net.InetAddress; import tarantool.connector.socketpool.AbstractSocketPool; public abstract class SocketWorkerInternal implements SocketWorker { private enum ConnectionState { CONNECTED, DISCONNECTED } private long lastTimeStamp; private final AbstractSocketPool pool; final InetAddress address; final int port; final int soTimeout; ConnectionState state = ConnectionState.DISCONNECTED; SocketWorkerInternal(AbstractSocketPool pool, InetAddress address, int port, int soTimeout) { this.pool = pool; this.address = address; this.port = port; this.soTimeout = soTimeout; lastTimeStamp = System.currentTimeMillis(); } final void connected() { state = ConnectionState.CONNECTED; } final void disconnected() { state = ConnectionState.DISCONNECTED; } public final boolean isConnected() { return state == ConnectionState.CONNECTED; } public long getLastTimeStamp() { return lastTimeStamp; } @Override public final void release() { lastTimeStamp = System.currentTimeMillis(); pool.returnSocketWorker(this); } public abstract void close(); public abstract void connect() throws IOException; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/SocketWorker.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/Sock0000664000000000000000000000041712202131537031637 0ustar rootrootpackage tarantool.connector.socketpool.worker; import java.io.IOException; public interface SocketWorker { public void writeData(byte[] buffer) throws IOException; public int readData(byte[] buffer, int length) throws IOException; public void release(); } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/PlainSocketWorker.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/Plai0000664000000000000000000000522112202131537031623 0ustar rootrootpackage tarantool.connector.socketpool.worker; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; import java.net.Socket; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import tarantool.connector.socketpool.AbstractSocketPool; class PlainSocketWorker extends SocketWorkerInternal { private static final Log LOG = LogFactory.getLog(PlainSocketWorker.class); private Socket socket; private OutputStream outputStream; private InputStream inputStream; PlainSocketWorker(InetAddress address, int port, int soTimeout, AbstractSocketPool pool) throws IOException { super(pool, address, port, soTimeout); connect(); } @Override public void connect() throws IOException { socket = new Socket(address, port); socket.setKeepAlive(true); socket.setTcpNoDelay(true); socket.setSoTimeout(soTimeout); outputStream = socket.getOutputStream(); inputStream = socket.getInputStream(); connected(); } @Override public void close() { try { socket.shutdownInput(); } catch (IOException e) { LOG.error("Can't shutdown input which associated with the socket"); } try { socket.shutdownOutput(); } catch (IOException e) { LOG.error("Can't shutdown output which associated with the socket"); } try { socket.close(); } catch (IOException e) { LOG.error("Can't close socket"); } disconnected(); } @Override public void writeData(byte[] buffer) throws IOException { try { outputStream.write(buffer); outputStream.flush(); } catch (IOException e) { LOG.error("Error occurred in write socket operation", e); disconnected(); throw e; } } @Override public int readData(byte[] buffer, int length) throws IOException { try { int loadedBytes = 0, currentReadBytes = 0; while((loadedBytes += currentReadBytes) != length) { currentReadBytes = inputStream.read(buffer, loadedBytes, length - loadedBytes); if (currentReadBytes == -1) { throw new EOFException("Unexpected end of stream"); } } return loadedBytes; } catch (IOException e) { LOG.error("Error occurred in read socket operation", e); disconnected(); throw e; } } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/FactoryType.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/Fact0000664000000000000000000000230212202131537031610 0ustar rootrootpackage tarantool.connector.socketpool.worker; import java.io.IOException; import java.net.InetAddress; import tarantool.connector.socketpool.AbstractSocketPool; public enum FactoryType { PLAIN_SOCKET { @Override public SocketFactory createFactory(final InetAddress address, final int port, final int soTimeout, final AbstractSocketPool pool) { return new SocketFactory() { @Override public SocketWorkerInternal create() throws IOException { return new PlainSocketWorker(address, port, soTimeout, pool); } }; } }, CHANNEL_SOCKET { @Override public SocketFactory createFactory(final InetAddress address, final int port, final int soTimeout, final AbstractSocketPool pool) { return new SocketFactory() { @Override public SocketWorkerInternal create() throws IOException { return new ChannelSocketWorker(address, port,soTimeout, pool); } }; } }; public abstract SocketFactory createFactory(InetAddress address, int port, int soTimeout, AbstractSocketPool pool); } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/SocketFactory.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/Sock0000664000000000000000000000025612202131537031640 0ustar rootrootpackage tarantool.connector.socketpool.worker; import java.io.IOException; public interface SocketFactory { public SocketWorkerInternal create() throws IOException; } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/ChannelSocketWorker.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/worker/Chan0000664000000000000000000000457112202131537031616 0ustar rootrootpackage tarantool.connector.socketpool.worker; import java.io.EOFException; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.nio.ByteBuffer; import java.nio.channels.SocketChannel; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import tarantool.connector.socketpool.AbstractSocketPool; class ChannelSocketWorker extends SocketWorkerInternal { private static final Log LOG = LogFactory.getLog(ChannelSocketWorker.class); private SocketChannel socketChannel; ChannelSocketWorker(InetAddress address, int port, int soTimeout, AbstractSocketPool pool) throws IOException { super(pool, address, port, soTimeout); connect(); } @Override public void connect() throws IOException { socketChannel = SocketChannel.open(new InetSocketAddress(address, port)); Socket socket = socketChannel.socket(); socket.setKeepAlive(true); socket.setTcpNoDelay(true); socket.setSoTimeout(soTimeout); // set but NIO not supported socket timeout connected(); } @Override public void close() { try { socketChannel.close(); } catch (IOException e) { LOG.error("Can't close socket channel which associated with the socket"); } disconnected(); } @Override public void writeData(byte[] buffer) throws IOException { try { ByteBuffer byteBuffer = ByteBuffer.wrap(buffer); while(byteBuffer.hasRemaining()) { socketChannel.write(byteBuffer); } } catch (IOException e) { LOG.error("Error occurred in write channel operation", e); disconnected(); throw e; } } @Override public int readData(byte[] buffer, int length) throws IOException { try { ByteBuffer byteBuffer = ByteBuffer.wrap(buffer); while (byteBuffer.hasRemaining()) { if (socketChannel.read(byteBuffer) == -1) { throw new EOFException("Unexpected end of stream"); } } return byteBuffer.position(); } catch (IOException e) { LOG.error("Error occurred in read channel operation", e); disconnected(); throw e; } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/StaticSocketPool.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/StaticSocke0000664000000000000000000001120112202131537031634 0ustar rootrootpackage tarantool.connector.socketpool; import java.io.IOException; import java.net.UnknownHostException; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import tarantool.connector.socketpool.exception.SocketPoolClosedException; import tarantool.connector.socketpool.exception.SocketPoolException; import tarantool.connector.socketpool.exception.SocketPoolTimeOutException; import tarantool.connector.socketpool.exception.SocketPoolUnavailableException; import tarantool.connector.socketpool.worker.SocketWorker; import tarantool.connector.socketpool.worker.SocketWorkerInternal; class StaticSocketPool extends AbstractSocketPool { private static final Log LOG = LogFactory.getLog(StaticSocketPool.class); private final int poolSize; private final BlockingQueue queue = new LinkedBlockingQueue(); private final ReadWriteLock rwLock = new ReentrantReadWriteLock(); public StaticSocketPool(SocketPoolConfig config) throws UnknownHostException, SocketPoolTimeOutException { super(config.getHost(), config.getPort(), config.getSocketReadTimeout(), config.getWaitingTimeout(), config.getReconnectTimeout(), config.getInitializeTimeout(), config.getDisconnectBound(), config.getType()); if (config.getMinPoolSize() <= 0) { throw new IllegalArgumentException("Incorrect value of pool size"); } this.poolSize = config.getMinPoolSize(); initializePool(); } private void initializePool() throws SocketPoolTimeOutException { long startTime = System.currentTimeMillis(); for (int i = 0; i < poolSize;) { try { SocketWorkerInternal socketWorker = socketWorkerFactory.create(); queue.add(socketWorker); i++; if (stateMachine.isClosed()) { socketWorker.close(); LOG.info("Socket pool is closed, initialization aborted"); break; } } catch (IOException e) { LOG.warn("Can't establish socket connection because: Exception - " + e.getClass().getSimpleName() + " and case - " + e.getMessage()); try { Thread.sleep(reconnectTimeout); } catch (InterruptedException e1) { LOG.error("Thread in reconnect timeout state is interrupted. Reconnection is aborted"); Thread.currentThread().interrupt(); return; } } if (System.currentTimeMillis() - startTime > initializeTimeout) { throw new SocketPoolTimeOutException("Initialize pool timeout occur"); } } } public SocketWorker borrowSocketWorker() throws InterruptedException, SocketPoolException { if (stateMachine.isReconnecting()) { throw new SocketPoolUnavailableException("Socket pool is reconnecting, borrowing of socket worker was rejected"); } SocketWorker worker = queue.poll(waitingTimeout, TimeUnit.MILLISECONDS); if (stateMachine.isClosed()) { throw new SocketPoolClosedException("Socket pool is closed, borrowing of socket worker was rejected"); } if (worker == null) { throw new SocketPoolTimeOutException("Timeout is occurred while wait for socket worker"); } return worker; } public void internalReturnSocketWorker(SocketWorkerInternal socketWorker) { rwLock.readLock().lock(); try { boolean added = queue.offer(socketWorker); assert added: "Queue can't add wrapper, too many socket worker for queue size"; if (stateMachine.isClosed()) { socketWorker.close(); LOG.info("Socket pool is closed, return operation skipped"); } } finally { rwLock.readLock().unlock(); } } @Override void feedReconnect() { rwLock.writeLock().lock(); try { for (SocketWorkerInternal worker: queue) { pushToReconnect(worker); } queue.clear(); } finally { rwLock.writeLock().unlock(); } } void internalClose() { for(SocketWorkerInternal socketWorker: queue) { socketWorker.close(); } } } tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/0000775000000000000000000000000012202131537031500 5ustar rootroot././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/SocketPoolTimeOutException.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/S0000664000000000000000000000051212202131537031623 0ustar rootrootpackage tarantool.connector.socketpool.exception; public class SocketPoolTimeOutException extends SocketPoolException { public SocketPoolTimeOutException(String message) { super(message); } public SocketPoolTimeOutException(String message, Throwable throwable) { super(message, throwable); } } ././@LongLink0000000000000000000000000000020700000000000011564 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/SocketPoolUnavailableException.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/S0000664000000000000000000000053212202131537031625 0ustar rootrootpackage tarantool.connector.socketpool.exception; public class SocketPoolUnavailableException extends SocketPoolException { public SocketPoolUnavailableException(String message) { super(message); } public SocketPoolUnavailableException(String message, Throwable throwable) { super(message, throwable); } } ././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/SocketPoolException.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/S0000664000000000000000000000045312202131537031627 0ustar rootrootpackage tarantool.connector.socketpool.exception; public class SocketPoolException extends Exception { public SocketPoolException(String message) { super(message); } public SocketPoolException(String message, Throwable throwable) { super(message, throwable); } } ././@LongLink0000000000000000000000000000020200000000000011557 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/SocketPoolClosedException.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/socketpool/exception/S0000664000000000000000000000050712202131537031627 0ustar rootrootpackage tarantool.connector.socketpool.exception; public class SocketPoolClosedException extends SocketPoolException { public SocketPoolClosedException(String message) { super(message); } public SocketPoolClosedException(String message, Throwable throwable) { super(message, throwable); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolConnector.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/TarantoolConnector.jav0000664000000000000000000000420412202131537031640 0ustar rootrootpackage tarantool.connector; import tarantool.connector.exception.TarantoolConnectorException; public interface TarantoolConnector { void insertData(long id, byte[] data) throws InterruptedException, TarantoolConnectorException; void insertData(byte[] id, byte[] data) throws InterruptedException, TarantoolConnectorException; byte[] getData(long id) throws InterruptedException, TarantoolConnectorException; byte[] getData(byte[] id) throws InterruptedException, TarantoolConnectorException; boolean deleteById(long id) throws InterruptedException, TarantoolConnectorException; boolean deleteById(byte[] id) throws InterruptedException, TarantoolConnectorException; /** * Attention! This method can use only with tarantool from trunk feature-get-all-keys. * This method locks all activity in tarantool. * @return array of byte array with keys * @throws TarantoolConnectorException * @throws InterruptedException */ @Deprecated byte[][] getKeySetAsByteArray() throws TarantoolConnectorException, InterruptedException; /** * Attention! This method can use only with tarantool from trunk feature-get-all-keys. * This method locks all activity in tarantool. * @return long array with keys * @throws TarantoolConnectorException * @throws InterruptedException */ @Deprecated long[] getKeySetAsLongArray() throws TarantoolConnectorException, InterruptedException; /** * Don't lock activity but need LUA script support and server side command * @return * @throws TarantoolConnectorException * @throws InterruptedException */ long[] getScriptKeySetAsLongArray(int batchSize) throws TarantoolConnectorException, InterruptedException; /** * Don't lock activity but need LUA script support and server side command * @return * @throws TarantoolConnectorException * @throws InterruptedException */ byte[][] getScriptKeySetAsByteArray(int batchSize) throws TarantoolConnectorException, InterruptedException; void truncate() throws InterruptedException, TarantoolConnectorException; void close(); } tarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/exception/0000775000000000000000000000000012202131537027316 5ustar rootroot././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/exception/TarantoolUnavailableException.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/exception/TarantoolUna0000664000000000000000000000052012202131537031645 0ustar rootrootpackage tarantool.connector.exception; public class TarantoolUnavailableException extends TarantoolConnectorException { public TarantoolUnavailableException(String message) { super(message); } public TarantoolUnavailableException(String message, Throwable throwable) { super(message, throwable); } } ././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootroottarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/exception/TarantoolConnectorException.javatarantool-1.5.1.218.g1a69fd6/connector/java/src/main/java/tarantool/connector/exception/TarantoolCon0000664000000000000000000000047412202131537031651 0ustar rootrootpackage tarantool.connector.exception; public class TarantoolConnectorException extends Exception { public TarantoolConnectorException(String message) { super(message); } public TarantoolConnectorException(String message, Throwable throwable) { super(message, throwable); } } tarantool-1.5.1.218.g1a69fd6/connector/CMakeLists.txt0000664000000000000000000000002412202131537020502 0ustar rootrootadd_subdirectory(c) tarantool-1.5.1.218.g1a69fd6/connector/Makefile0000664000000000000000000001523312213333034017410 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 connector/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/connector/ruby/0000775000000000000000000000000012202131537016727 5ustar rootroottarantool-1.5.1.218.g1a69fd6/connector/ruby/README0000664000000000000000000000012212202131537017602 0ustar rootrootTarantool Ruby driver can be found at https://github.com/tarantool/tarantool-ruby tarantool-1.5.1.218.g1a69fd6/.gitmodules0000664000000000000000000000033412242653271016141 0ustar rootroot[submodule "third_party/lua-cjson"] path = third_party/lua-cjson url = https://github.com/mpx/lua-cjson.git [submodule "third_party/luajit"] path = third_party/luajit url = https://github.com/tarantool/luajit.git tarantool-1.5.1.218.g1a69fd6/README.CentOS0000664000000000000000000000403512202131537015770 0ustar rootrootTarget OS: CentOS 5.8 (Final) 1. Install EPEL repository: ------------- http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F sudo rpm -iv ./epel-release-5-4.noarch.rpm 2. Install necessary packages: ------------- sudo yum install gcc gcc-c++ gcc-objc cmake git readline-devel ncurses-devel binutuls-devel 3. Install gcc 4.6.x and gcc infrastructure pre-requisites ------------- (x) From one of the gcc mirrors download from /gcc/infrastructure: gmp, mpfr and mpc packages; (x) Configure and build the pre-requisites using --prefix=/usr/local and --with-gmp=/usr/local (see gcc.gnu.org/install); (x) Configure gcc as: configure --prefix=/usr/local --enable-languages=c,c++,objc --program-suffix=463 --enable-shared --enable-threads=posix --with-mpc=/usr/local (x) Build gcc as per steps outlined in GCC documentation gcc.gnu.org/install; (x) Set up the environment to include the new GCC's libs: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64 4. Download & build tarantool source code: ------------- git clone git://github.com/tarantool/tarantool.git cd tarantool CC=gcc463 CXX=g++463 cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=true && make 5. Install test-required packages and modules for Python 2.6 ------------- sudo yum install python26 python26-PyYAML python26-argparse wget http://pypi.python.org/packages/source/p/pexpect-u/pexpect-u-2.5.1.tar.gz#md5=7c916a9f42d636ec6aec39f7cdd96eb5 tar -xzvf pexpect-u-2.5.1.tar.gz sudo python26 setup.py install wget http://pypi.python.org/packages/source/d/daemon/daemon-1.0.tar.gz#md5=b0bebffc51965a66ec4a4bc1006fa90b tar -xzvf daemon-1.0.tar.gz sudo python26 setup.py install 6. Set up python 2.6 to run tarantool tests ------------- mkdir ~/build/bin && ln -s /usr/bin/python26 ~/build/bin/python 7. Run tarantool test suite ------------- cd ~/build/tarantool/test PATH=~/build/bin:$PATH ./run 8. Create RPM Packages ------------- cmake . make rpm (packages are available from RPM/i386/ or RPM/x86_64/) -- EOF tarantool-1.5.1.218.g1a69fd6/TODO0000664000000000000000000000022212231715276014452 0ustar rootrootWe're using Github for task tracking and bugs. Please use http://github.com/tarantool/tarantool/issues Thank you for your interest in Tarantool! tarantool-1.5.1.218.g1a69fd6/libeio.a0000664000000000000000000040173412213333044015371 0ustar rootroot! / 1378727460 0 0 0 1116 ` Deio_grp_canceleio_canceleio_submiteio_nreqseio_nreadyeio_npendingeio_nthreadseio_set_max_poll_timeeio_set_max_poll_reqseio_set_max_idleeio_set_idle_timeouteio_set_min_paralleleio_set_max_paralleleio_polleio_wd_open_synceio_wd_close_synceio_initeio_wd_openeio_wd_closeeio_nopeio_busyeio_synceio_fsynceio_msynceio_fdatasynceio_syncfseio_sync_file_rangeeio_mtoucheio_mlockeio_mlockalleio_fallocateeio_closeeio_readaheadeio_seekeio_readeio_writeeio_fstateio_fstatvfseio_futimeeio_ftruncateeio_fchmodeio_fchowneio_dup2eio_sendfileeio_openeio_utimeeio_truncateeio_chowneio_chmodeio_mkdireio_readlinkeio_realpatheio_stateio_lstateio_statvfseio_unlinkeio_rmdireio_readdireio_mknodeio_linkeio_symlinkeio_renameeio_customeio_grpeio_grp_feedeio_grp_limiteio_grp_addeio_sendfile_sync// 20 ` tarantool_eio.c.o/ /0 1378727459 1000 1000 100664 130736 ` ELF>@@UHHpHHHHHHHHHHpHHHpHƿHHHHHEHHƿHHEUHHH}uHE@;E}4HEHHHEUPHE@HHHHEHHEHUHSH}HuHEHHEHHH)HiHEHHHEH@HH)HH []UHH}]UHHH}HEHHHEH@HUHRHPHEH@HUHRHPHEHUHEE]UHEE]UHEE]UHEE]UHH}Eint1 != 2)eio_grp_addeio_dent_radix_sortetp_start_thread@eA.A 2MP 6H8int8MM88M8iiiiii88ii:i:\:l:| :\f2# @{# A# Cb#$ Ep#( J#0 N#8 P#@ [#H \#X ]#h jz#x)  % '# (# AIh       !"#$%&'()*+,-./0123456789:;<<=>?(s 3  P#wd #  # # -# #( #0nv1#8nv2#@b#Hb#Li#Pi#Xb#` ?#d?#epriT#f#he #pg#xg#grp # # # #4 e b# F# ?# T#  #6p v b  { STUV_   qfdtb#lenvb#strw\#k3v           !"#$%&'()*+,-./ 5P|V{ g [ b!+aryn p 8#  8# )# *# +# ,#( -#0 .#8 08#@ 48#H 58#P 6#Xb1 # # F#  ?# !1#:Ac  DIR RptrT#lenUb#(###tid # !OqsO#qeO#Hb# _"b#tid}$}#arg}%bl%~%}%} &YZ'bufYZh'lenYbd(b'tv1`'tv2XE)'wrkh *'wrkh(MK+bl(M+Ml(M+Ml(M+Ml),'q,X,pri bl_(b'q,X'req P,pribl&$ 'q$,X,pri&bl-,req/ `&>b.>u .>u /S+@`/x+AP-+B@*Z,wrk\h0 : 1r*E,req h&b+Ml+Mh+E@+E2,req `-,resb\*'req h*C'req h)u.h) . Ml).Ml) .Ml)#=.#Ml**o.*Ml*6'grp6 h&Hb'grpH h*W 'reqW h&`b~'req` H,resbbl-+fb\,grpg `3|'grp| h3'req h3'req h4M4M4M4M3.h3 .Ml3<.Ml3o.Ml3.Ml3.Ml4b&b^.|X.^P-,buf`d E&b'fdbl'tv^`&b'fdb\,resbl&bR'fdbl.`.-X.Mh&*b'fd*bl.*bh.*`'len*-X&8 W 'fd8bL.8@.8-.8+:-h+;4`-,len?-X&Q !'ofdQbL'ifdQbH.Q@.Q-+S h,resT `-+4X2,cnt P&L!+ *!.!X.!P+h,adj`-& b!. bl&$b2".$h.$-`&2b"'mem2h'len2-`.2b\&Fb)#'reqF ,memHH,lenI-@+Jbd-+Oh,endPX+QP*aj#'reqa X+ebl&pb$.pZ'wdp .p|,relr|h,ress4`+t4P+t4H+xb\//$,lenbX2,len + ,beg|@-+b( T$'a $h'b $`$  )&.&p.bp.Tp. p+&~,bit&`0& /%+, ~,i-b\,j-bX-+8b-+G&p+G&+H&u,endH&P+I&y+JbL2,OX?,MY?,a[&@,b\&-,tmpi ~ ?&H? l&&H&&H*'.&.b/p',ibl,min&`-,tmp @-,i&X,j&P-+ *(.&h.bd.T`. X*)'req ~.~+4+4h+bd+b`+b\+&P+bL+bH+ @+)+)5!),fdb2+b5)+'b-,oth;&,dir<&-,tmpF ~2,lenYb2,enth)~ & c*.ZX'wd P.|H,fdbh,res `,lenbl6 *'wd X.|P+`3*'wd h&.bZ+..b\..|P..H,fd0bl,res1bh&<b+.<b\.<|P'buf<+H,fd>bl,res?bh7^&na,.nH,reqp `,tsqP+rh86b,.u h.u `*,'req h*-.'req +bl/^-,ts3 -+4 -`-,tv EP-6  .. |X'pri bT'cb e H. @,req h6  x.'wd X'pri bT'cb e H. @,req h6  .'pri b\'cb e P. H,req h6  M/. X'pri bT'cb e H. @,req h6  /'pri b\'cb e P. H,req h6  !0'fd b\'pri bX'cb e P. H,req h6  0. X. -P. bL'pri bH'cb e @. ,req h6  #1'fd b\'pri bX'cb e P. H,req h6  1'fd b\'pri bX'cb e P. H,req h6  32'fd b\. P. -H. MX'pri bD'cb e . ,req h6  2. X. -P. bL'pri bH'cb e @. ,req h6  F3. X. -P'pri bL'cb e @. ,req h6  3. b\'pri bX'cb e P. H,req h6  W4'fd b\. bX. P'len -H'pri bD'cb e . ,req h6  4'fd b\'pri bX'cb e P. H,req h6  X5'fd b\. P. -H'pri bX'cb e @. ,req h6  5'fd b\. P. bX'pri bL'cb e @. ,req h6  6'fd b\'buf P. -H. @'pri bX'cb e . ,req h6  &7'fd b\'buf P. -H. @'pri bX'cb e . ,req h6  7'fd b\'pri bX'cb e P. H,req h6!  8'fd! b\'pri! bX'cb! e P.! H,req# h6&  8'fd& b\.& P.& H'pri& bX'cb& e @.& ,req( h6+  9'fd+ b\.+ P'pri+ bX'cb+ e H.+ @,req- h60  9'fd0 b\.0 X'pri0 bT'cb0 e H.0 @,req2 h65  ':'fd5 b\'uid5 X'gid5 T'pri5 bP'cb5 e H.5 @,req7 h6:  :'fd: b\'fd2: bX'pri: bT'cb: e H.: @,req< h6?  G;.? b\.? bX.? P.? -H'pri? bD'cb? e .? ,reqA h6D  ;.D |X.D bT.D P'priD bL'cbD e @.D ,reqF h6I  j<.I |X.I P.I H'priI bD'cbI e .I ,reqK h6N  <.N |X.N P'priN bL'cbN e @.N ,reqP h6S  }=.S |X'uidS T'gidS P'priS bL'cbS e @.S ,reqU h6X  =.X |X.X T'priX bP'cbX e H.X @,reqZ h6]  >.] |X.] T'pri] bP'cb] e H.] @,req_ h&c  >.c b\.c |P'pric bX'cbc e H.c @,reqe h6h  b?.h |h'prih bd'cbh e X.h P6m  ?.m |h'prim bd'cbm e X.m P6r  (@.r |h'prir bd'cbr e X.r P6w  @.w |h'priw bd'cbw e X.w P6|  @.| |h'pri| bd'cb| e X.| P6  QA. |h'pri bd'cb e X. P6  A. |h'pri bd'cb e X. P6  5B. |X. bT'pri bP'cb e H. @,req h6  B. |X. T'dev H'pri bP'cb e @. ,req h&  VC. b\. |P. |H'pri bX'cb e @. ,req h6  C. |h. |`'pri b\'cb e P. H6  :D. |h. |`'pri b\'cb e P. H6  D. |h. |`'pri b\'cb e P. H6  E. gX'pri bT'cb e H. @,req h6  E'cb e X. P,pri l,req `3 E'grp h. g`. b\3 F'grp h. bd3 jF'grp h'req `0zF :zF jF6  F'ofd bl'ifd bh. `. -X+M +M +M +u +u +M +M +M +M +M +M +M + + + + +  +_ +_ % : ; I$ > $ >   II!I/ &I  : ;  : ; I8  : ;   : ;  : ; I : ; : ;I : ; ( '  : ; I8  : ;I8  : ;I8 ' II : ; : ; 5I'  : ; : ; : ; I < ! : ;".: ; ' I@B #: ; I $: ; I %4: ; I &.: ;' I@B ': ;I (.: ;' I@B ).: ;' @B *.: ;' @B +4: ;I ,4: ;I - .: ;I / 04I4  1.: ;' @B 2 U3.? : ;' @B 4.? : ;' I@B 5 U6.? : ;' I@B 7.: ;' @B 8 : ;wwvwww4v45w56w69w9vwwwvwwwvwwwvwwwvwwwvwww#v#$w$%w%(w(vwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwAvABwBCwCFwFvwwwrvrswstwtwwwvwww v w w w v w w w v  w  w  w  v  w  w  w $ v$ % w% & w& ) w) A vA B wB C wC F wF | v| } w} ~ w~ w  v w w w a va b wb c wc f wf v w w w v w w w " v" # w# $ w$ ' w' < v< = w= > w> A wA V vV W wW X wX [ w[ a va b wb c wc f wf l vl m wm n wn q wq w vw x wx y wy | w| v w w w v w w w v w w w v w w w v w w w v wwwvwww!v!"w"#w#&w&zvz{w{|w|wvwwwvwwwvwww$v$%w%&w&)w)vwwwvwwwvwww@v@AwABwBEwEWvWXwXYwY\w\vwwwvwwwvwww!v!"w"#w#&w&vwwwv w !w!$w$IvIJwJKwKNwNvwwwvwww5#v5#6#w6#7#w7#:#w:#$v$$w$$w$$w$f$vf$g$wg$h$wh$k$wk$$v$$w$$w$$w$$v$$w$$w$$w$Y%vY%Z%wZ%[%w[%^%w^%_%v_%`%w`%a%wa%d%wd%P'vP'Q'wQ'R'wR'U'wU'u'vu'v'wv'w'ww'z'wz''v''w''w''w'5v55w55w55w56v66w66w66w697v97:7w:7;7w;7>7w>77v77w77w77w7L8vL8M8wM8N8wN8Q8wQ88v88w88w88w8[9v[9\9w\9]9w]9`9w`9 :v : :w : :w ::w::v::w::w::w:%;v%;&;w&;';w';*;w*;;v;;w;;w;;w;<v<<w<<w<<w<-=v-=.=w.=/=w/=2=w2==v==w==w==w=w>vw>x>wx>y>wy>|>w|>?v??w??w? ?w ??v??w??w??w?b@vb@c@wc@d@wd@g@wg@AvAAwAAwA"Aw"AAvAAwAAwAAwAfBvfBgBwgBhBwhBkBwkBBvBBwBBwBBwBCvCCwCCwCCwCBDvBDCDwCDDDwDDGDwGDDvDDwDDwDDwDEvEEwEEwEEwE'Fv'F(Fw(F)Fw)F,Fw,FFvFFwFFwFFwFGvGGwGGwGGwGHvHHwHHwHHwHIvIIwIIwIIwIJvJJwJJwJJwJyKvyKzKwzK{Kw{K~Kw~KZLvZL[Lw[L\Lw\L_Lw_L/Mv/M0Mw0M1Mw1M4Mw4MgMvgMhMwhMiMwiMlMwlMMvMMwMMwMMwMMvMMwMMwMMwMNvNNwNNwNNwNGNvGNHNwHNINwINLNwLNNvNNwNNwNNwNNvNNwNNwNNwNOvOOwOOwOOwOPvPPwPPwPPwPQvQQwQQwQQwQQvQQwQQwQQwQ2Rv2R3Rw3R4Rw4R7Rw7RuRvuRvRwvRwRwwRzRwzR Sv S Sw S Sw SSwSSvSSwSSwSSwSSvSSwSSwSSwSSvSSwSSwSSwSTvTTwTTwTTwTTvTTw,T W}]pst$)-c$#'#$#-#4#l -#3# #3#4#H!"3#4# /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libeio/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sysxthread.heio.cstddef.htypes.hstdio.htypes.hsigset.hselect.htime.htime.hpthreadtypes.hstat.hutime.hunistd.hsignal.heio.hconfname.hpthread.hstatvfs.hdirent.hdirent.h @?/=.%u-.0,<2=>2M=2N=2N=2N=.8Ji2׮v32נh"v(hwf Y2...柡wY41t2&zt@#x02g2.T ZvuJZ qX[1y. 22>.JM堠JZ22v2v2v2u2/s 40>?"v.J 2?Y2  2.X>?Zgi=2v222KY2KY2KY2KY2!222221KY .xM .Y .#f!Z=3X2\6gZYz tY5Yuh 2uuuv w \+vt1vt1j D(K5Mu3KM6 .0/ ./5׃c^Y41咟-0'Y5HIA$X3=wuKuvY'/[/WLvY[x/V"\Ku#vu'h<m ɼ=2<Z\ .( ;JY")HJzfJ J fv=&NKuHZLgX< 0fXXY&d<0XiyfX 2ukjx. 3uuɃuu 1JXhukK0f.X/.~ ١tXJeX׻kXg0uHxX /\5Z0=(oz#"=.hu1 ؼYffftt XgM0~<< <<$< < '.?gtXgMK22twʼ6/gZ==2/gZ=>. J1[@د[eX 栯0JrX 4/2.yL[h[XB*XYLPWYWZ28J/J/<1-8**/JX%JX+-7J,J-%)!3!3IL.3X;P%ZJ)J)4*)*Y82+8 t!3+1[1=1gI.: u3gs.1gtW1/tK1utW1/tK1YtU1tm1YtU1YtU1tx1tm1tc1YtU1t{1YtU1tm1to1ty1ty1YtU1YtU1tm1ta1t`1tk1tc1t{1s.%1s.(1s.1s.&1s.1s.2r.1g1g1g1g1g1g1g1s.1s.'2r0=gʻw1&1&1&1gtZ3vtK ./2ػ2>=ZZ5YKgrp_try_feed_SC_LEVEL3_CACHE_SIZEst_ctimmaxtime_SC_INT_MAXsize_tf_favailnamesallocsizetype_SC_MAPPED_FILES_SC_CHILD_MAXscore_bitsoffsEIO_DT_DOOR__kindEIO_FTRUNCATEeio_chown_SC_CLK_TCKEIO_MKNODpthread_cond_tEIO_READDIR_DIRS_FIRSTst_blksizest_blocks_SC_SIGQUEUE_MAXmodtimef_blocks__ssize_teio_fsync_SC_THREAD_ROBUST_PRIO_INHERITEIO_RMDIR_SC_DEVICE_IOeio_mlockeio_fallocategrp_dec__pthread_list_teio__sendfile_SC_LEVEL4_CACHE_ASSOC_SC_JOB_CONTROLdev_t_SC_CHAR_MAXPTHREAD_MUTEX_DEFAULT__gid_tf_ffreepatheio_set_idle_timeoutst_mtim_SC_TRACE_INHERIT__next__datasigset_ttmpbufEIO_SEEK_SET__preveio_syncstk_idx_SC_PII_SOCKETin_offset_SC_SAVED_IDSeio_dent_insertion_sortetp_end_threadwhence__PRETTY_FUNCTION___SC_SCHAR_MAXnbytesDT_WHTEIO_READLINK__pthread_internal_list_SC_ARG_MAXstatreqq_pushGNU C 4.7.3_SC_CHAR_BIT_SC_AIO_LISTIO_MAX__owner_SC_MB_LEN_MAX_SC_THREAD_PRIO_PROTECTint1int2int3delay_SC_PII_INTERNETeio_gid_tfinish_SC_THREAD_PROCESS_SHAREDeio_readeio_closeeio_wdssize_t_SC_TRACE_NAME_MAXeio_submit__wakeup_seqf_bsizeres2_SC_PII_SC_AIO_PRIO_DELTA_MAXEIO_STAT__dev_tDT_REGetp_reqquid_txcond_tresult_SC_MEMORY_PROTECTIONEIO_READDIR_CUSTOM2feedetp_initbitssig_atomic_tentp_SC_OPEN_MAX_SC_THREAD_THREADS_MAXEIO_DT_NWKEIO_MLOCKALLactime_SC_READER_WRITER_LOCKS_SC_STREAMSlong int_SC_MQ_OPEN_MAXwrittenetp_nreqs_SC_FIFO_SC_DEVICE_SPECIFICeio__1pathself_SC_2_C_VERSIONEIO_WRITEetp_start_thread_SC_THREAD_ROBUST_PRIO_PROTECT_SC_BC_DIM_MAXEIO_LSTATlengthEIO_FLAG_PTR1_FREE_SC_THREAD_ATTR_STACKADDReio_grp_limitbase_stkwanted_SC_V7_ILP32_OFF32__nusersxthread_teio_sync_file_rangeeio__2path/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe_SC_V6_ILP32_OFFBIG_SC_2_PBS_LOCATEpagesecondseio__scandirsigned char__blksize_t_SC_LEVEL1_DCACHE_LINESIZEeio_reqmodefilenamest_uidetp_proc_initnameleneio_sendfileDT_LNK_SC_TRACE_EVENT_FILTEReio_nthreadsnpending_SC_NL_LANGMAX__pthread_mutex_s_SC_V6_LP64_OFF64EIO_TRUNCATEmax_poll_time__fsblkcnt64_tEIO_DT_MAXEIO_DUP2_SC_NL_MSGMAXeio_symlinkunsigned char__spins_SC_PII_OSI_CLTSst_rdev_SC_LEVEL1_ICACHE_ASSOCEIO_READDIR_CUSTOM1scoreeio__mlock_SC_DEVICE_SPECIFIC_REIO_WD_OPENeio__syncfs_SC_NZERO_SC_XOPEN_XPG2_SC_XOPEN_XPG3_SC_XOPEN_XPG4_SC_ULONG_MAXthr_argEIO_UTIME__syscall_slong_t_SC_XOPEN_ENH_I18NEIO_CUSTOMEIO_UNLINKd_typeetp_submit_SC_INT_MINcharDT_SOCK_SC_2_UPE_SC_PAGESIZE_SC_FILE_SYSTEMnameeio_ssize_tgrp_first_SC_2_VERSIONd_nametimevaleio_set_min_paralleltimesstarted_SC_RE_DUP_MAXattrf_fsideio_futime_SC_LEVEL3_CACHE_ASSOC__mode_tflags_SC_2_FORT_DEV_SC_CHAR_MINendiannessreqq_shifteio_dup2tv_nownseconds_SC_IOV_MAXeio__fallocateeio_rmdir_SC_THREAD_CPUTIMEEIO_FUTIME_SC_SYSTEM_DATABASEeio_unlink__broadcast_seq_SC_PII_INTERNET_DGRAMeio_finishEIO_FSYNCEIO_BUSYdonePTHREAD_MUTEX_ADAPTIVE_NP_SC_FILE_LOCKINGxmutex_t_SC_SCHAR_MINnew_pathres_queueeio_linklimitout_fdeio__readaheadEIO_FLAG_GROUPADD_SC_UIO_MAXIOVmaxreqsEIO_DT_REGeio_wd_openDT_FIFOeio_nreqsEIO_DT_BLKeio_truncate_SC_VERSIONtv_usec_SC_LEVEL1_DCACHE_ASSOCeio_wd_close_syncEIO_SEEK_CUReio_grp_addPTHREAD_MUTEX_ERRORCHECKetp_maybe_start_threadPTHREAD_CREATE_JOINABLE__lockeio_readlink_SC_SPIN_LOCKSEIO_MT_MODIFYeio_fdatasynceio__mlockall_SC_UINT_MAXeio_pwdst_gid_SC_RAW_SOCKETS_SC_THREADS_SC_THREAD_SAFE_FUNCTIONS_SC_WORD_BIT_SC_REGEXPeio__wd_open_syncEIO_SYMLINK_SC_ASYNCHRONOUS_IO_SC_CHARCLASS_NAME_MAXEIO_MS_SYNC_SC_XOPEN_VERSION__dirstream_SC_LEVEL3_CACHE_LINESIZE_SC_THREAD_STACK_MINin_fdEIO_PRI_DEFAULTEIO_CLOSEino_tdone_polllong unsigned intEIO_MSYNCetp_set_min_parallel_SC_XOPEN_UNIXeio_grpEIO_READDIREIO_DT_NAM_SC_SEM_NSEMS_MAXpthread_t_SC_NL_TEXTMAXetp_set_max_poll_time_SC_PII_INTERNET_STREAMEIO_OPENst_size_SC_GETGR_R_SIZE_MAXEIO_SYNC_FILE_RANGE_SC_V7_ILP32_OFFBIGeio_mlockalleio_set_max_poll_reqsEIO_DT_CHR_SC_SEMAPHORES_SC_LEVEL4_CACHE_SIZEDT_DIREIO_DT_LNKeio_api_destroy__woken_seqeio_wd_open_sync_SC_MULTI_PROCESS_SC_NPROCESSORS_ONLNEIO_WD_CLOSE__sizewrklockEIO_READDIR_FOUND_UNKNOWN_SC_USER_GROUPSPTHREAD_SCOPE_SYSTEMeio_dent_sort_SC_2_LOCALEDEFetp_npending_SC_LINE_MAXeio__futimesEIO_DT_WHT_SC_PHYS_PAGES_SC_XOPEN_REALTIMEretvaltv_start_SC_SIGNALSeio_sendfile_sync__fsfilcnt64_t__blkcnt_t_SC_MONOTONIC_CLOCK__intptr_t_SC_RTSIG_MAXeio_pollEIO_READDIR_DENTSPTHREAD_CREATE_DETACHEDetp_set_max_parallel_SC_FILE_ATTRIBUTES__ino_t_SC_USER_GROUPS_R_SC_XOPEN_XCU_VERSIONdirfdPTHREAD_MUTEX_TIMED_NPeio_fstatvfs_SC_PII_XTI_SC_XOPEN_REALTIME_THREADSlong long int_SC_LONG_BITeio_renamereslockeio_buf_SC_XBS5_ILP32_OFFBIGetp_set_idle_timeoutgrp_nextdentseio_mkdirdoubleeio_syncfsgrp_prevEIO_CHOWNetp_workerold_errnoDT_BLK_SC_UCHAR_MAXtvdiff_SC_PIPE_SC_TYPED_MEMORY_OBJECTSdirp_SC_LOGIN_NAME_MAXEIO_MS_ASYNCtmpbuf_getEIO_SEEK_END_SC_THREAD_KEYS_MAXeio_ino_t_SC_ADVISORY_INFOmax_poll_reqsquitpthread_attr_t__f_sparerellencountaddrEIO_SYNCinode_bitseio_chmodunsigned inteio_initeio_grp_feedpthread_mutex_tinodeintptr_tptr1eio__realpathEIO_PRI_MAXwrk_firsteio_fchown_SC_COLL_WEIGHTS_MAX_SC_PII_OSI_M_SC_2_C_DEVeio_npending__pad0_SC_SYSTEM_DATABASE_R__suseconds_teio_customEIO_READ_SC_TRACE_EVENT_NAME_MAX_SC_USHRT_MAXstatvfsEIO_FCHOWN_SC_IPV6_SC_HOST_NAME_MAX_SC_BC_STRING_MAXEIO_DT_UNKNOWN_SC_THREAD_PRIORITY_SCHEDULINGEIO_MCL_FUTUREeio_fstatoffseteio__lseekEIO_READAHEAD__mutexproc_SC_POLLcancelledEIO_MLOCKxthread_created_reclennreqs__count_SC_2_SW_DEVst_nlinkoff_tmode_t_SC_REALTIME_SIGNALSf_flagwant_poll_cbtype__unusederrornoPTHREAD_SCOPE_PROCESS_SC_XBS5_LPBIG_OFFBIG_SC_2_PBS_ACCOUNTINGnext_SC_THREAD_DESTRUCTOR_ITERATIONSreq_queue_SC_TRACE_LOGeio_stattmp1tmp2__ino64_t_SC_MEMLOCK_SC_PII_OSImask_SC_DELAYTIMER_MAX_SC_2_FORT_RUN_SC_V7_LP64_OFF64_SC_NPROCESSORS_CONF_SC_SHRT_MAXEIO_FSTATVFS_SC_AIO_MAX_SC_BARRIERS_SC_REGEX_VERSION_SC_LEVEL2_CACHE_LINESIZEst_deveio_cbeio_set_max_poll_timeeio_readaheadtimespecEIO_DT_DIR_SC_SHARED_MEMORY_OBJECTSeio_lstatf_bfreeEIO_REALPATHeio_set_max_paralleltodoPTHREAD_MUTEX_RECURSIVE_NPsizeeio__msync_SC_XBS5_LP64_OFF64long long unsigned intdestroyutimbuf__futex_SC_V7_LPBIG_OFFBIG__listeio_pagesize_SC_NL_ARGMAX__off_tEIO_DT_MPB_SC_SINGLE_PROCESSeio__mtouchvalueeio__utimes_SC_AVPHYS_PAGES_SC_XOPEN_SHMEIO_REQ_TYPE_NUM_SC_THREAD_SPORADIC_SERVEReio_mknodeio_set_max_idleexecute_SC_SS_REPL_MAXnamesoffseio_nopeio_cancel_SC_NL_NMAX__time_teio_ftruncateeio_realpathetp_set_max_poll_reqs__sig_atomic_teio_seek_SC_XOPEN_LEGACYDT_CHRf_namemax_SC_2_PBS_MESSAGEEIO_DT_CMP__total_seqeio_dent_radix_sort_SC_T_IOV_MAX_SC_PRIORITIZED_IOdentalloc__align__off64_t_SC_V6_ILP32_OFF32_SC_STREAM_MAX_SC_TZNAME_MAX_SC_2_PBS_CHECKPOINT_SC_SPAWNptr2_SC_MEMLOCK_RANGE_SC_BC_SCALE_MAXetp_nthreads_SC_TRACE_SYS_MAX_SC_SYMLOOP_MAXeio__sync_file_range_SC_2_CHAR_TERMEIO_LINK_SC_SHELLeio__statvfsat_SC_FD_MGMTf_bavailPTHREAD_MUTEX_ERRORCHECK_NPEIO_FLAG_PTR2_FREE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/tarantool_eio.c_SC_LEVEL1_ICACHE_LINESIZEeio_write_SC_C_LANG_SUPPORT_Retp_cancel_SC_TRACE_USER_EVENT_MAXeio_wd_close_SC_TIMER_MAXPTHREAD_MUTEX_NORMAL_SC_2_PBS_SC_CPUTIME_SC_SPORADIC_SERVERbaseEIO_MKDIRshort intdone_poll_cbEIO_FDATASYNCsymlinkseio_readdir_SC_CLOCK_SELECTION_SC_XBS5_ILP32_OFF32reqq_initEIO_MCL_CURRENT_SC_NETWORKINGpthread_mutexattr_t_SC_LEVEL4_CACHE_LINESIZEEIO_PRI_MINtv_nsec_SC_ATEXIT_MAXd_offeio_dirent_SC_TIMEOUTSoldsigset_SC_PII_OSI_COTS_SC_MQ_PRIO_MAX_SC_SEM_VALUE_MAX_SC_C_LANG_SUPPORTEIO_RENAME_SC_TIMERS_SC_PASS_MAXdirent_SC_FSYNCidleidle_timeout_SC_SELECTeio_busyEIO_CHMODnameofseio_statvfs__val_SC_TTY_NAME_MAXnthreadsEIO_SYNCFSnameseio__truncateateio_destroyeio_nreadyEIO_MTOUCHfullsigsetetp_set_max_idle__nwaitersmtimeEIO_READDIR_STAT_ORDERst_mode__uid_t_SC_MESSAGE_PASSINGlinklenPTHREAD_MUTEX_FAST_NPd_ino_SC_LEVEL2_CACHE_ASSOCEIO_GROUP_SC_BC_BASE_MAX_SC_LEVEL2_CACHE_SIZEeio_execute_SC_EXPR_NEST_MAXetp_worker_freeeio_dent_cmpetp_worker_clear_SC_SYNCHRONIZED_IODT_UNKNOWNeio_fchmodEIO_FSTATEIO_DT_FIFO_SC_XOPEN_STREAMS_SC_LEVEL1_DCACHE_SIZEeio_dtype_SC_SHRT_MINwant_poll_SC_2_PBS_TRACKf_fileseio_tstampf_frsize_SC_NGROUPS_MAX_SC_V6_LPBIG_OFFBIGEIO_FCHMODEIO_SENDFILEatimemax_idleshort unsigned int_SC_LEVEL1_ICACHE_SIZEEIO_SEEKEIO_STATVFSetp_nreadyeio_uid_tdentoffs_SC_EQUIV_CLASS_MAXreqwait_SC_BASEeio_msynceio_open_SC_PRIORITY_SCHEDULINGeio_grp_canceleio_utime_SC_XOPEN_CRYPTPTHREAD_MUTEX_RECURSIVEend_stk_SC_SSIZE_MAXEIO_DT_SOCK_SC_GETPW_R_SIZE_MAXst_inonready_SC_THREAD_PRIO_INHERITetp_poll__nlink_t_SC_TRACEbit_stkeio_page_alignreqlock__sigset_tgid_tdataEIO_MS_INVALIDATEeio_mtouchetp_proc_SC_NL_SETMAXprevtv_secEIO_NOP_SC_2_C_BINDEIO_FALLOCATEEIO_DT_MPCst_atim_SC_THREAD_ATTR_STACKSIZEGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <XAC S  \LAC AF  AC E QAC L AC M AC M AC M  AC M @cAC ^ `AC  AC  %AC   AC   [AC EQ AC } zPLRx  $AC  h"AC ] 3AC . 'AC b AC M AC M AC M (AC X H;AC v hAC  YAC T pAC k AC   AAC | AC U (AC U H AC F h AC F  AC F  AC F !AC \ AC R AC R (AC R HAC R hAC R  AC F YAC T !AC \ ?AC z "AC ] ((AC c HAC  hAC  *AC e wAC r AC R 8AC s _AC Z (AC  HaAC \ hAC  nAC i  *AC H OAC J KAC F  RAC M ,AC   ,WAC R p5AC p _AC Z _AC Z AC A  AC   %AC ` 4 AC U  4FAC A x AC   AC   AC |  AC   AC |  AC  8 AC  X AC  x AC   AC   AC   AC   AC   AC  8 AC  X AC  x AC   AC   AC   AC   AC   AC  8 AC  X AC  x AC   AC   AC   AC   AC   AC  8 AC  X AC  x AC   AC   8AC s  8AC s  8AC s 8AC s 88AC s X8AC s x8AC s AC  AC  $AC  CAC ~ CAC ~ 8CAC ~ XAC  xAC  >AC y +AC f AC   -AC h .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @T? .&0U ,@U 6@U81m>xXAUXHPs`~a?+oj@/0z 0 P0#0yhH Pb  5  X+5L2:?FS`n| $(@(((0@( Q", 6$c@JGU%^$o`%[B s"3 '    3% HB ;]} j Yrb p~"Y{!?"(%*w AX8#_.:aE"Sn` *tJOKR6#$_$_Z%'Fv'[L P$ 1   J\x#5<J]r A# = W b m x  !2 H Y n  "(0:CKR$Wcg$5uQ'% +4>FMTY_f5ry6:77M88\9 ::&;;<.= = x> ?) ?2 c@; AE AO gB\ Bg Cu CD D E (F F G H I J zK 0M8 hM8 M8 M8 N8 HN8# N8- N9 OC QCL QCX 3RCc vRn  Sv S> S+ S T-tarantool_eio.cxthread_createtmpbuf_gettvdiffstartedidlewantedwant_poll_cbdone_poll_cbmax_poll_timemax_poll_reqsnreqsnreadynpendingmax_idleidle_timeoutwrklockreslockreqlockreqwaitwrk_firstetp_worker_clearetp_worker_freeetp_nreqsetp_nreadyetp_npendingetp_nthreadsreq_queueres_queuereqq_initreqq_pushreqq_shiftetp_initetp_start_thread__PRETTY_FUNCTION__.6065etp_procetp_maybe_start_threadetp_end_threadetp_polleio_finishetp_canceletp_submitetp_set_max_poll_timeetp_set_max_poll_reqsetp_set_max_idleetp_set_idle_timeoutetp_set_min_paralleletp_set_max_parallelgrp_try_feedgrp_deceio_destroyeio__utimeseio__futimeseio__syncfseio__sync_file_rangeeio__fallocateeio__readaheadeio__sendfileeio_pagesizepage.6230eio_page_aligneio__mlockalleio__mlockeio__msynceio__mtoucheio__lseekeio__realpatheio_dent_cmpeio_dent_radix_sorteio_dent_insertion_sorteio_dent_sorteio__scandireio__wd_open_synceio__truncateateio__statvfsatetp_proc_initeio_executeeio_api_destroyeio__1patheio__2path__PRETTY_FUNCTION__.6905__PRETTY_FUNCTION__.6302pthread_attr_initpthread_attr_setdetachstatepthread_attr_setscopesigfillsetpthread_sigmaskpthread_createpthread_attr_destroyfreemallocabortpthread_mutexattr_initpthread_mutexattr_settypepthread_mutex_initpthread_cond_initcalloc__assert_failpthread_mutex_lockpthread_mutex_unlockpthread_cond_signal__gcc_personality_v0gettimeofday__errno_location_Unwind_Resumeeio_grp_canceleio_canceleio_submiteio_nreqseio_nreadyeio_npendingeio_nthreadseio_set_max_poll_timeeio_set_max_poll_reqseio_set_max_idleeio_set_idle_timeouteio_set_min_paralleleio_set_max_paralleleio_pollutimesyncfdatasyncpread64writesysconfmlockallmlockmsynclseek64getcwdstrlenmemcpyreadlinkmemmoveopenat64fdopendircloseopendirreaddir64closedirreallocstrchreio_wd_open_synceio_wd_close_syncftruncate64fstatvfs64pthread_cond_waittimepthread_cond_timedwaiteio_initreadpwrite64fstatat64fchownatfchmodatunlinkatmkdiratrenameatlinkatsymlinkatmknodatreadlinkatfutimensutimensatfstat64fchownfchmoddup2fsyncselecteio_wd_openstrdupeio_wd_closeeio_nopeio_busyeio_synceio_fsynceio_msynceio_fdatasynceio_syncfseio_sync_file_rangeeio_mtoucheio_mlockeio_mlockalleio_fallocateeio_closeeio_readaheadeio_seekeio_readeio_writeeio_fstateio_fstatvfseio_futimeeio_ftruncateeio_fchmodeio_fchowneio_dup2eio_sendfileeio_openeio_utimeeio_truncateeio_chowneio_chmodeio_mkdireio_readlinkeio_realpatheio_stateio_lstateio_statvfseio_unlinkeio_rmdireio_readdireio_mknodeio_linkeio_symlinkeio_renameeio_customeio_grpeio_grp_feedeio_grp_limiteio_grp_addeio_sendfile_sync+b?cSdbe}fgfhijii $kl(m4 @9nElVmb gnslm n o   H @LT  7pG %Q %V %X[q` @ery `% @TTTi @sUpq vr  t s @r @s r sv r  2$;$AL X _ dsz r s4vXwmxy  r   ! s& + r1 $: $F  V b i n su z r       t  s %    . < O ] m s  i i zbuwwwwJjSwiwkwwwwwwjw>iRFwbww 8wFswww=biKjrjwwww  9!s!! %"#w##j#S$ia$x$$i$$$%%D%Q%% %r% % %s% @%r%%% @%s%%& && & &3&9&N& S& X&k&t&& & & &s& &r&$&$&  &&'  's'i!' @&'r7' @<'sK'x'iN( %(( @(r) @ )s)j7)w)))** @*r* @*s*j*w+2+ @7+rP+ @U+s_+j|+w++,,,,-R---.). @..rG. @L.sV.js.w.. @.r. @.s.j/wg/%u/%/%/%/%$!0%$a000 @0r0 @0s1j,1wh11 @1r1 @1s1j1w12 @ 2r92 @>2sH2je2w2223:3d3333;5%,h5z5k5w5w5x5pH6 v'h66{6p7 v'07{X7p7 v'7{7p+8 v'C8{k8p8 v'8{8p<9 v'R9{9p9 v':{+:px: v':{:p; v';{O;p; v';{<pU< v'<{<p= v'$={O=p= v'={=p2> v'n>{>p> v'>{/?p|? v'?{?p)@ v'Y@{@p@ v'A{HApA v'A{ApGB v']B{BpB v'B{ CpmC v'C{CpD v'9D{gDpD v'D{EpSE v'E{EpE v'F{QFpF v'F{ Gp\G v'|GG{GpNH v'nHH{Hp=I v']II{Ip"J v'BJJ{JpK v'.KpK{KpK v'LQL{LpL v'L&M{Np-O v'MOO{OpP v'1PP{PpQ v'!QlQQ{RpR v'S{,SpyS v'S{T %T %$T %x)Tq! ""!"!)"!3"!="!G"!Q"5T((03 N3((0(8)@*HJ*Pq1X 2`3hZ/p2x2x3333 4R434n44y5~5504`,*$+.3, Z/(,0+8,@,H,P-X-`f-h-p. Y ^V ^@ ^!T) ]. ^?; ^B ^eI ^!P ^&W ^3^ ^^l ^gq ^| ^ ^  ^ ^) ^{ ^" ^5 ^ ^Z ^  ^ ^? ^V  ^( ^G ^0* ^V = ^ B ^u ^K ^ ^} ^ ^6# ^Q ^ ^Z ^! ^+# ^\ ^*) ^z#7 ^$F ^ R ^z#` ^q o ^z ^ ^Y ^ ^ ^# ^y ^N ^ ^ ^  ^- ^( ^6 ^D ^sR ^i ^Ut ^Y ^ ^I ^Y ^ ^ ^  ^ ^ ^B ^ ^, ^: ^7 K ^X ^Uc ^Yn ^ ^k ^ ^G ^ ^" ^B ^ ^| ^f  ^  ^ ^N& ^4 ^B ^#P ^4^ ^#l ^ ^ ^< ^ ^_ ^; ^t ^ ^Y! ^ ^! ^0 ^ ^ ^X ^9"  ^ ^  ^ ^ " ^( ^c. ^34 ^c: ^@ ^F ^L ^>R ^oX ^^ ^dd ^Pj ^pp ^tv ^e | ^  ^ ^ ^ ^ ^ ^1  ^  ^u ^l ^ ^" ^c  ^ ^>  ^  ^  ^# ^ ^  ^c ^5 ^ ^\  ^D ^ ^ ^?$ ^* ^0 ^ 6 ^ < ^-B ^G H ^cN ^{U ^\ ^c ^} j ^ q ^Vx ^" ^b ^' ^ ^ ^H ^  ^< ^# ^ ^" ^ ^ ^ ^7 ^ ^y ^, ^ ^ ^  ^ ^j" ^h  ^' ^. ^5 ^ < ^ C ^ J ^' Q ^bX ^_ ^ f ^3m ^ t ^y{ ^  ^ ^ ^" ^ ^  ^ ^! ^& ^Q  ^6  ^0 ^' ^ ^K ^ ^g# ^ ^ ^ ^ ^ ^r ^# ^P* ^1 ^8 ^"? ^F ^M ^T ^/[ ^ b ^mi ^p ^w ^~ ^ ^; ^ ^ ^ ^a ^% ^H ^ ^C ^ ^ ^ ^ ^) ^T ^; ^ ^  ^ ^L ^D ^ ^& ^%- ^4 ^; ^B ^-!I ^P ^[W ^?^ ^e ^l ^s ^i!z ^Z ^# ^ ^< ^ ^! ^ ^ ^ ^y ^K ^A ^ ^ ^ ^d ^. ^ ^ ^ ^Q ^m  ^t ^" ^r) ^0 ^7 ^> ^$E ^L ^S ^ Z ^Da ^i ^| ^f ^f ^ ^ ^ ^ ^h ^^ ^! ^0 ^? ^N ^] ^l ^ ^<# ^ ^ ^ ^ ^ ^  ^A ^A ^ - ^; ^I ^W ^Yf ^ ^! ^ ^ ^ ^ ^^  ^ ^ ^ ^h% ^, ^4 ^ !@ ^~F ^ L ^R ^#X ^3^ ^d ^M j ^=p ^$ v ^$| ^ ^ ^" ^ ^ ^7 ^u ^A# ^ ^'  ^E! ^ ^{  ^ ^L ^s ^B ^!  ^ ^ ^ ^!! ^ ' ^- ^3 ^ 9 ^}!? ^FE ^K ^i Q ^uW ^A] ^c ^yi ^ko ^#u ^{ ^/ ^'  ^# ^s  ^j ^ ^E ^{ ^ ^! ^  ^L  ^ ^ ^  ^c ^T ^ ^ ^ ^  ^ ^ ^l ^  ^) ^/ ^> ^D ^{J ^cw ^)} ^- ^  ^  ^ ^  ^ ^ ^  ^ ^z" ^  ^ ^ ^ ^ ^  ^ ^ ^>% ^O3 ^P!A ^'O ^b] ^k ^=!y ^ ^F ^R  ^m ^ ^ ^ ^  ^; ^ ^ # ^ J ^ P ^; V ^\ ^b ^h ^n ^t ^ z ^ ^" ^e ^  ^e ^u# ^ ^ ? ^` ^l ^w Z ^ ^ ^ ^Y ^M  ^"*52 Z`a ^4m5u} Z ^  Z  ^u  Z ^"*2 Z< ^L ^!X`h Z@r ^ ^ Z ^ ^$ Z ^ ^$ Z`3 ^L?GGO Z ^ G Z  ^$ Z ^#! ^/7=D ^M T=\ki ^M yk ^M  ^$ Z ^% ^ B Z@ ^B$, ZF ^"RZsb Zl ^ { ^+ ^  ^  \ ^s Z` ^ " * ZD ^L T \ Z f ^ v ^D~   Z ^  ^   Z ^8 ^ %  Z@ ^  ^% B $ Z. ^8> ^FB N} V Z ` ^8p ^x}   Z`  ^ b  Z  ^bb   Z  ^^   & Z N& V _ ^W ^Q" #  Z  ^ # =  Z@  ^7= W  Z  ^C %W -b 5 Z < ^nHb Pm X Z` _ ^km sx { Z  ^x   Z  ^   Z  ^  ^   Z  ^  ^  # Z@- ^8> ^F N V Z` ^q ^ y  Z ^8 ^w Z` ^8 ^" Z ^m" { Z  ^s. ^0 =9Ehj ^v{~ Z ^ Z ^  Z@% ^4 ^C ^ S ^ _g%o Z ^n ^ ^ % Z ^ ^ ^ ^' ^6 m> X ^d l t Z` ^ ^ ^   ^ \0! ^!$!,! Z6! ^C!M! ^#U!]!Ae! Z o! ^~! ^"! ^K! ^C !A!X! Z! ^ ! ^!X" " Z" ^#" ^"3" ^?"G"O" Z@w" ^ " ^[""" Z" ^ "0"" ^# ^*# ^2#:#"B# Z[# ^k# ^mw#"## Z`# ^e# ^# ^# ^$# ^ $$X0$ \`E$ ^d$l$pu$ ^$ ^ $$ $ Z$ ^$ $J$ Z $ ^% ^% ^&% ^6% ^U% ^`%%i%`q%d~% ^ %%% ^%d%@% ^d% ^O% ^"& ^ #+& ^:& \v&z~&& ^&J&& Z& ^' ^'Y&'O'W'q'y'''u' ^g' ^''' Z' ^' ^( ^( ^( ^&'(/(6#7( Z@Q( ^a( ^ q( ^L( ^O( ^( ^ ( ^( ^( ^!( ^( ^]( ^ ) \") \') ^| 7) \ @) ^P)X)g )). ) \P) \) ^ )6#)$* Z * ^e(* ^e* ^q*$y*g$* Z* ^* ^e* ^ *g$*$* Z`* ^R*$*$+ Z+ ^+ ^.+ ^"[+ ^g+$o+Z%w+ Z + ^+ ^+ ^+Z%+`%+ Z+ ^^#+`%,Q' , Z, ^D B, ^Q, ^X,'c, ^3o,Q'w,v', Z@, ^#!, ^, ^,v',', Z, ^W ,',5, Z, ^- ^+-Z/3-0O- ^0 _-5g-w5- ^/ -5-6- Z`- ^- ^<# . ^.6.:7%. ZZ. ^<#z. ^.:7.7. Z . ^<#. ^.7.M8. Z/ ^// ^<#O/ ^[/M8c/8k/ Z/ ^<#/ ^:/8/\9/ Z@0 ^<##0 ^&"/0\970 :?0 ZI0 ^X0 ^"g0 ^ 0 ^<#0 ^5 0 :0:0 Z1 ^<#%1 ^11:91&;A1 Z`v1 ^<#1 ^1&;1;1 Z1 ^1 ^1 ^ 2 ^<#52 ^S#A2;I2<Q2 Z [2 ^j2 ^"y2 ^ 2 ^<#2 ^{2<2.=2 Z2 ^2 ^"'3 ^<#H3 ^T3.=\3=d3 Zn3 ^ 3 ^<#3 ^3=3x>3 Z@ 3 ^n3 ^94 ^<#Y4 ^ e4x>m4?u4 Z 4 ^<#4 ^4?4?4 Z!4 ^ 5 ^"95 ^<#Z5 ^if5?n5c@v5 Z`!5 ^5 ^5 ^<#5 ^5c@5A6 Z!-6 ^"<6 ^i6 ^<#6 ^6A6A6 Z "6 ^"6 ^7 ^<#(7 ^47A<7gBD7 Z"y7 ^<#7 ^77gB7B7 Z"7 ^<# 8 ^Y 8B8C&8 Z@#>8 ^!M8 ^y8 ^<#8 ^)8C8CD8 Z#8 ^8 ^<#9 ^ &9CD.9D69 Z$N9 ^nz9 ^<#9 ^9D9E9 Z`$ : ^<#): ^ 5:E=:(FE: Z$: ^<#: ^:(F:F: Z %: ^ : ^]: ^: ^"); ^<#I; ^0"U;F];Ge; Z%o; ^~; ^ ; ^n; ^<#; ^`";G;H; Z%< ^< ^!< ^K< ^<#l< ^X x<H<I< Z@&< ^< ^< ^<#< ^<I=J = Z&= ^^= ^<#= ^=J=zK= Z'= ^= ^n= ^<#> ^ >zK>[L> Z`'&> ^5> ^na> ^<#> ^>[L>0M> Z'> ^> ^> ^<#? ^ ?0M?hM? Z ('? ^S? ^<#d? ^7p?hMx?M? Z(? ^? ^<#? ^?M?M? Z(? ^@ ^<#*@ ^X6@M>@NF@ Z@)P@ ^|@ ^<#@ ^@N@HN@ Z)@ ^@ ^<#@ ^, @HNAN A Z*A ^BA ^<#SA ^ _ANgANoA Z`*yA ^A ^<#A ^ANAOA Z*A ^A ^ B ^<#7B ^CBOKBPSB Z +]B ^lB ^nB ^<#B ^BPBQB Z+B ^B ^ C ^ 7C ^<#XC ^ dCQlCQtC Z+~C ^C ^ C ^<#C ^YCQC3RC Z@,C ^C ^ +D ^<#\ ?| ? c@ A A gB B< C\ CD| D E (F F G H< I\ J| zK [L 0M hM MM<N\HN|NNOPQQ<3R\vR| SSSSTtarantool-1.5.1.218.g1a69fd6/libev.a0000664000000000000000000050765612213333044015241 0ustar rootroot! / 1378727460 0 0 0 1320 ` Eev_set_syserr_cbev_set_allocatorev_rt_nowev_timeev_sleepev_feed_eventev_feed_fd_eventev_io_stopev_io_startev_unrefev_feed_signal_eventev_feed_signalev_version_majorev_version_minorev_supported_backendsev_recommended_backendsev_embeddable_backendsev_backendev_iterationev_depthev_set_io_collect_intervalev_set_timeout_collect_intervalev_set_userdataev_userdataev_set_invoke_pending_cbev_set_loop_release_cbev_invoke_pendingev_loop_destroyev_refev_signal_stopev_verifyev_default_loopev_signal_startev_loop_forkev_invokeev_pending_countev_timer_stopev_periodic_stopev_runev_breakev_now_updateev_suspendev_resumeev_clear_pendingev_timer_startev_timer_againev_timer_remainingev_periodic_startev_periodic_againev_child_startev_child_stopev_stat_statev_stat_startev_stat_stopev_idle_startev_idle_stopev_prepare_startev_prepare_stopev_check_startev_check_stopev_fork_startev_fork_stopev_cleanup_startev_cleanup_stopev_async_startev_async_stopev_async_sendev_onceTIMEOUT_INFINITY// 18 ` tarantool_ev.c.o/ /0 1378727460 1000 1000 100664 166328 ` ELF>E@@UH]UHH0EHCHEEf.EHE \f.Ezf.Eu EG^EYEEHEHEEYEEE\EaEHEHEEXEfWf.EHtvMfWEHEHEMfWEEf.EzEf.Eu H?EHEM\_Ef.s EH,#E \H,HH1HxH*HHH H*XEHEHEEUHHEH`HHEH`Ht{EeEHEyHMHΉHMHΉtPE@+EHHHHt E}muƋE`HUHcHHH@ tBHUHcHHH@ HUHcHHHH}muHHUHH}EHHHUHH}EUHH }}Hug}@HuXmEHHHEHHHH@HEHEHHEH@ HEH}uUHH HHHΉHEHHEHEHmHEHHH;EwH}HUHH0}܉u؉UԋEԉEE%tEԉEE=uEE܃HHHEgHE@,;Et HE@,uD}tHE@(t0HE@HEU؉P0HEUԉP4HEHHEH@ HEH}uUHH H}uHE HƿE}+u^HEHƿE}~?HEHUMEΉUEƿHUHH0}܉u؉Uԃ}HHUHcHH@ EHUHcHH‹EԈB E܉HMHcHHȋH H @ H H HEEԃЋEԃt ЉE}tE;Et=HMU܉HxHt0}.HMUܾ8Ht3E;EHMUܾHHUHcHH@ EP9Ht4EPHѺHƿ3HHHcHHыU܉7E܉HUHcHHЋP P HUHH@EȋHt HEHHHt HMY,ȋH5EHHHt HЋEHt EXH EHcHHHHHHEHEH@EHUHcHH@EHEtHU ЉEHUHcHHЋP HEH@H 9Ht E#EHt{HUHcHH‹EB EЋEt ЉHE}t=HMUt UE։EE;E9EHt_HH Pƿ HcHHHHHƿHEHUHcHHЋEHUHcHH@EHUHcHH@ y}tUߋE։>HUHcHHH  HcHHȋ}mDUHH}y(t &uy|ǸHMbP?HHH@HcHHHHHƿ$HUHHHHHH]UH x܋Ǹ]UHH}uHEHE}mu]UHH }uUE;E<EP9HtXEEPHѺHƿDH+EHMHcHHʉHEHUHcHHЋE}HUHcHH EU9Ht1EHѺHƿHHUHcHH‹EHUHcHHЋ;EtF}tCHUHcHH‹EȋEt fBHUHcHH;EHt`HUHcHHH HcHHHHHHMHcHHʋHcHH‹EUHH EHHHt HMY,ЋHcHHHEHHHt HЋEHtW u  uHHu 1hHHEHHcHHH;EwnHE@fHtomHE@ HtHECHE@tHUR҃ HE։ HE}6UH}HMbP?HHHHH]UHHHHH]UHSH8}̉uȉUċE;E!E̍P?HEẺЃ?)кHӉHHHE;EHEE܋EHcHHHHEHcHHHHEHcHHHHEHcHHHHJHHcHHH HcHHHHH;E|HUHcHHHMHcHHHH EHEău8HUHcHHHMHcHHHHMHH!HHUHcHHHMHcHHHH EHEău;HUHcHHHMHcHHHHMHH!HH8[]UHSHXEHHHt HEH,HEHEH*Mf(\f( YH,HEEEHcH HHHEHcH HHHHH HMIȹHEHHHt HЋEHtW u L uHHu +E EHUHcHHHHEHUHcHHHHEH}u H}E@|EHӉHHHEEHEHUH!H EHEHUH!Ht Eă}HtEE‹EĉƉ}mq}m HHX[]UH}Hư>HHHHHHH]UHHHJHH6HH"HH]UH]UH ]UHSH9u9tH[]UHEMMME]UHHEeEUHHE,=weEUH]UH]UH]UHEHEH]UHEHEH]UHH}HEH]UHH]UHH}HEH]UHH}HuHEHHEH]UHH0}܋E܉u*HEH¾Hu u*HEH¾Hu E%t E%u-u$HtHEEHEHEHEHHH \HHHE%tE% tE%u E܋uE܃tE܉uE܃tE܉_uE܃tE܉@@@H@@@H@UHHHt% HHHzttt.x x t x x uu4u}EEHHHEHEHEHEHHEHHHfEHEHEHEHH}mGHHHHHHHHHHHsHHH>HHH HHHHHHHHHjHHH5HUHu#+t:x ]UHHH}HE@xHE@u HE@tJHE@HHHE@HHHHHH;Et UHH H}uE'EHHHHEHH@;Et& }tFEPHHHHHHEHEHHHHEHf.ru' EHHHHEHEHHHHEHH@H f.zf.t( EHHHHEHH@HEE;EUHHH}u[EHHHEHHU9t3 EHHHEHHH}muUHH }A 9}C E7HUHcHHЋyE E9E|yG EEHUHcHHHHEHEHEHEH}EEt/HEH;EuR HEH@ HEHEtV HE@(;EtW HEH@ HEH}RE9E9}[ HH19}_ HHEEHEH9}e yg EHEH9}h EHEHHH}m=9}n HH59}s HH9}x HH9}} HHu9} HH5UHH}u{EtT@@@H@ UH]UHHH}uHEH@MHUHUHEEEHE}muE]UHHqHH HcЋrHcЉ4HHHHHEHEH@HEHH@HUJHUHHЋHxYUHHHteEJEHuKEHt*EH EHH H}muUHHRHH0f.1HH0H@HEHE@(fWf.zfWf.HEH HE@(XHE@ HEH f.vHHUHB HE@(fWf.w HHP0HH0H@H@ H HH HEHHEHt!HH0f.UHH@H}HE@0f.v HEH@0 H ?HEHE@(EHEH(\^EEHEHEEYEXEERHE@0XEEEf.Ez Ef.EtHt HHEHEHEf.EsHUHEHB UHH zHH0H@HEHEH@8HHEHP8HHMHEEHEHEHUHB HE@  f.sK HHP0HH0H@H@ H HHktHE@0fWf.z fWf.tKHEHHHP0HH0H@H@ H HH HEHHEHt!HH0f.ot!HH0f.[UHH EHUHcHHH@HEHEH@8Ht4HEHP8HHMHEEHEHEHUHB )HE@0fWf.z fWf.t HEHHUHcHHHMHcHHH@H@ HE;E1HHUHEERHUHcHHHHEHEH@HUHRB XE@ HEH@H@ HUHE9E|]UHH0E؋HaHHEEHEH \ f.Ht! XHHEHEHE \ E\EfWf.EvE f.Hf.EHHEHEHEHEHHHm}DEHEH f.Hu0XE X f.Ht \HHUHH@}̋=u HЋHt*9HtHt/t% HH>HЋHt% H@HHЋHHtHEHEHHEH}Ô%ITHEEqẼHtHttHtHHvM@HEt4HH0 \EEf.EvHEHEt4HH0 \EEf.EvHEHEf.EHt HHEf.EHt HHEfWf.zfWf.uH \Ef(\f(E E\Mf.v E\EEfWf.Ht!HEHEEE\EEHHEHEEt3uO EXEHHt HHHЋHtHttẼHu UH}E]UH]UH]UHHH}Ô%ITHEEUH]UHHHHE\EUHH}HuHEHHEHP HEHUH]UHH}Hu6HEHH;EHtHEHP HEHHEHH HEHEHHu]UHH}HE@t:HE@HHHE@HHHHHHE@]UHH}HEHEHE@E}HtHHE@HHUHcHHHHEHEHHE@HE@]UHH}HE@E}MEE}NEEHEUP]UHHH}uHEHHEUUHHH}HEUHH H}HE@(EHEHO}y HE@,$|t HEH5EP9HtdEEPHѺHƿPH+EHHHHMHcHHȾHHUHcHHHUHHHEH@ H;Eu HE@,%ƒE։蒿HE@,€HEP,UHHH}HEHHEHHE@(xHEP(9}u HHE@(HHHHUHHHHEHHE@(UHH H}HEH.HEH XHE@ HE@(fWf.s* PHEHHEP9Ht4EHEPHѺHƿHHHEHHHHEHBHHEHHHH HEHHHH@H@ HHEHHUHH H}HEH HEHHEEHUHcHHH@H;EtF ;EHtWHUHcHHH HcHHHH HHRHP HUHHE@  \HE@ HEH<UHHH}HEHHEHE@(fWf.z fWf.ttHEH(XHE@ HHEHHHH HEHHHH@H@ HHE HHGHEH9HE@(fWf.z fWf.tHEH@(HUHB HEHUHH}HE@ HEt HHEM\EHEHEE]UHH H}HEHHEH@8Ht4HEHP8HHMHEEHEHEHUHB gHE@0fWf.z fWf.t:HE@0fWf.s HEHHEH@(HUHB PHEHHEP9Ht4EHEPHѺHƿHHHEHHHHEHBHHEHHHH HEHHHH@H@ HHEHH谾UHH H}HEHHEHHEEHUHcHHH@H;Et ;EHtWHUHcHHH HcHHHH HHRHP HUH趾HEHCUHHH}HEHHEHUHHHXHXHHX@(~HX@(@u y&uxuع@@@H@xAHX@(ƿHXHDHX@(HHHHPHXHHHXH@ HAHDž`H`HHEHX@(H`HΉ%@tYH`HHHX@(H`HHH`HHƿ HUHHHxHxHHxHHx@(HHHHPHxHH}HxHHx@(HHHH@HxiHEHHxP(HEHHx@(ƿHEHƿ Hx@( HUHHH}HEHu9HEHHE@,HHHHEHH4UHHH}HEHHEHu4HE@,HHHHEHHHEH|UHH HHHH` "HΉHH)uGH@XfWf.z fWf.t HH@X HON8@HHBPHH@`HHHuoHH=stKHH=St@HHBP@H@XfWf.z fWf.t HH@X HON8@HHBPt HH@`HH=HHP`HHH u  EH/HHEH}tlHH9Et_HEUHHΉHHy j ZHx/HHHHHHHHH(tHH(HHH(tUHH H}HE苀E}xJHEǀEEEHHHHEHHbU։UHH }uHU}y+EHUMEΉE}~EHHHEHEHEHEH@ HEHE;Et}uaHE@%tEHHHHEHEHEHUΉHEP EЃEE;E|HUH蟥=v ]UHHE}xEUHxnc@@@H@]UHH Zx2謯EEHHHEEHHHEHEHEH@ HEHEǀxHEHoHE@XfWf.z fWf.t HEH@X HON8@HUHBPHEH(tHEH(HHEH(tH}LE}UHHH}HEHHEH@`HHyHEHǀHEHHuHEHǀUHHHXTHXH(HEHEH`HHHHHEHH`HEHH9HhHEHH9xHE9HpHEHH9|HE9uuUHE9udHUHEH H9uPHUHEH(H9upriority - (((0x7f) & 4) ? -2 : 0)) >= 0 && (((W)w)->priority - (((0x7f) & 4) ? -2 : 0)) < ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1))("libev: pending watcher not on pending queue", pendings [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][w->pending - 1].w == w)("libev: active index mismatch in heap", ((W)((heap [i]).w))->active == i)("libev: heap condition violated", i == (4 - 1) || (heap [((((i) - (4 - 1) - 1) / 4) + (4 - 1))]).at <= (heap [i]).at)("libev: heap at cache mismatch", (heap [i]).at == ((WT)((heap [i]).w))->at)("libev: active index mismatch", ((W)(ws [cnt]))->active == cnt + 1)activecnt >= -1fdchangemax >= fdchangecnt("libev: negative fd in fdchanges", fdchanges [i] >= 0)anfdmax >= 0("libev: io watcher list contains a loop", w != w2)("libev: inactive fd watcher on anfd list", ((W)(w))->active == 1)("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)timermax >= timercntperiodicmax >= periodiccntpendingmax [i] >= pendingcnt [i]idleall >= 0idlemax [i] >= idlecnt [i]forkmax >= forkcntcleanupmax >= cleanupcntasyncmax >= asynccntpreparemax >= preparecntcheckmax >= checkcnt("libev: negative ev_timer repeat value found while processing timers", w->repeat > 0.)("libev: ev_periodic reschedule callback returned time in the past", ((WT)(w))->at >= ev_rt_now)("libev: ev_loop recursion during release detected", loop_done != 0x80)("libev: pipe_w not active, but pipe not written", (0 + ((ev_watcher *)(void *)(&pipe_w))->active))("libev: ev_io_start called with negative fd", fd >= 0)("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE)))("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w)("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax)("libev: ev_timer_start called with negative timer repeat value", w->repeat >= 0.)("libev: internal timer heap corruption", (timers [active]).w == (WT)w)("libev: ev_periodic_start called with negative interval value", w->interval >= 0.)("libev: internal periodic heap corruption", (periodics [active]).w == (WT)w)("libev: ev_signal_start called with illegal signal number", w->signum > 0 && w->signum < (65))Aev_signal_startev_periodic_stopev_periodic_startev_timer_stopev_timer_startev_io_stopev_io_startev_runtimers_reifyperiodics_reifyev_verifyarray_verifyverify_heapverify_watcherpoll_pollpoll_modify?C& .>ư>eA@@.A ??`--g?gnq ( 7R2#z} n = *  /= "uO8int8MM8M8iib#biii ii88iii   #!"#  x z# {q#    mf b  #8.  %. 6i @f Ef#Dv KO RD . 0p# 5# =# ># @{# A#  Cb#$ Ep#( J#0 N/#8 P:#@ [#H \#X ]#h j#xq(  "b#-$: JL#M{#QGSb#Tb#U#Yz[#\{#]# ac#d{#eb#f#g#km-#qsi#tb#x8z-#{b#|M# pEGNV_rt^Ghznu}b>@b#Ab#Cb#~8#U b1!MGbG-  1 ##+.#.b#1# I   $&b#&b#&b#&-#cb&#b I 'I(*1,b#,b#,b#,-#cb,H#,B# BBb  1-(02b#2b#2b#2-#cb2#at2# b Z 3Z07m 9b#9b#9b#9-#cb9 #9B# fd;b#(<b#,~ ~ b  m =0A Cb#Cb#Cb#C-#cbC" #atC# E#(  b   F @J Lb#Lb#Lb#L-#cbL #atL# N#(O#0P #8  b 4      Q4 0U Wb#Wb#Wb#W-#cbW #WB# Yb#(  b   Z 8_M ab#ab#ab#a-#cbad #aB# cb#(piddb#,eb#0fb#4^ ^ b  M g nsE ub#ub#ub#u-#cbu\ #uB# w( #(x#Xy#`zv #h{v #wd}b#V V b  E ~   b#b#b#-#cb #  b n  n  Gb#b#b#-#cb^#XXb  G  b#b#b#-#cb#b p p Ib#b#b#-#cb`#ZZb  I b#b#b#-#cb#b r r(Zb#b#b#-#cbq#w# kkb  Z ?lr9 b b#|#|#|#|# |#(|#0|#8|#@|#H|#P|#X D#` J#h b#pb#t#xF#T#P#`#&#/-#0-#1-#2-#3-#5b#7f# DD#J#b#   ?` v x+[#[##E#$E#%E# &P#('P#0)#8*[#@+[#H,[#P-+#X[;3M78i  wdb#;# ;#len!;# "# ;#pad#{!W !WL ! N!WT 2 "03#6#A9#;#>#C#@##?#?# ?# ?# M# #Dw#b##i#P#at#w'#u#ACw#G#H $(f OptrQ-fdRbu32S;u64TFUf WY;#Z# 'fd)b#*[#+[#p'Oio) #to*( #0cb+`#`arg,-#h`b- O%Nb&4 'v4H(: h)*f@`+*fLX &^M*vaMl*bufb8|*icbh*pd|`+*ckM\,'cbh -'msgh&-J'ptr-h.i`,|'cbh--i |&-'ptr-h.i`/A2*tvL`+*tsFP&Sy+*tsX`0j.jX+*tso`1b/.b\'curbX'cntbT(bl&-.bl.-`'cur9X'cntbh2'wh.bd d0U'w-X.bT*w_h*pribd+(b`-'wX+(bl-.bl-5.5X.bT.bP*ibl -'fdbL.bH(`*wh+*evb\   -'fdb\.bX(h0 S'fd bl. bh-*ibl+*fd4bX(5P*w6`(8?O(9?_-QM 'fdQb\.QbX(S?o+(Ybh-` 'fd`b\*wbh&mb 'fdmbl-x *fdzbl-"!*fdbl-S!*fdbl-!'fdbl2!".!"'Nb'kb*he@*E!"X3(h(!"`*pos!"P 2".!"H'kbD*heP+*pbl-*".*!"h'N*bd'k*b`-4+#.4!"X'N4bT*i6bl-Qo#+*fdsU`-~#.~#X+(bl+(F` w-}$'iowH.bD*ibl)[$(F`+(P0$.bl-$.bl0 "%. b\*w h-%%'iow%}.%b}*si'%}*sip'%h+*res+`% -F&&.FbL'pidFbH.FbD*wH&&h(Ibd j -^&'sw^&X.^bT*pid`bl(`bh  4G%'5fdGbL5oevGbH5nevGbD6evIP7J?o8+7bh4'96ibl7bh)'6ev'`6fdb\7bX6gotbT+6fdbP7?O :b#(9bl;; <+(9+9h9+bd44N)5fd4b\5oev4bX5nev4bT6idx6bl=^) )-)7;bh+7Bbd^) N)4Y)9YX6p[)h6res\bd=)  ) )>b*9bl?4G*5fdGb5oevGb5nevGb+7lb\7mP+7qbL4+96tv6resbP7bT+7b\6bitbX+7H7@+((b1b+.bl;0@b@bAbBM,(Ml/M,(Ml/M-(bl@M@M@M,-.h,-.h,..-h@-,k..h, .. h. `- #/. ML)/*ts `+*ts P0m T/*io bl; - /'w h=/ / /- +0. !"X'N bT*i" bl=+0  N)-/ 0'ws/ 5h'cnt/ bd=0 0 00; 1*i> bl*w? `*w2? X=1 +*jJ bT )/ bT1. MlC 0 1'w -h. bdB M1*pri bl( Mh0 <2+*p <2h D- 2+*pri bl- 2=2 +*w 2h 0 ( -! U3'w! U3H(# `*at$ h+*nat) X  -: 3=3 +*wB U3h3 3-e 4*ig bl+*wl U3`2| t4.| X*i~ bl+*he !"`- 4. H3*i bl( `3( X/ b5. b=5 +( h( `( X)5*to P+*to% H5 5,| 5'how| blC C D D 0 6( h2 6. 6h. ` 2 +7. 6h. `2 [7'w hB b7'w -H*w_ h( bd+*p <2X2  8'w X*pri bl- J8'w h. bd- z8'w h0 8'w X*fd bl=8 +( bh N)0 89'w h=H9 H9 890# 9'w# 2X=9 +(0 bl /0; :'w; 2X=.: +(D bl.: :0Y d:'wY 2hBt :'wt 2h0{ :'w{ U3X=; +( bl; :0 z;'w U3X=; +( bl; z;0 ;'w U3h0 '<'w &~='< +*sa S~ 30<'w&~+*ss(9~0><'w>&&h0O<'wO&&h-r='wr=_)7=*sfsxv_+(=_+(bl(|` b =E-='w=X(bh*wdbl-{>.b\'wdbX'ev{>P+*w_h+*w=` i-?'w}.b}*buf?}*ofsbl*lenbh+*ev{>`!?E;&bt?*fdbl; -@(!bl+*w_5`+*w:=X0U4@'wU=h-^@'w_^2~.^b~*w`=h(bv ~0@'w=h0@'w=h0hA'whAH+(b\+(bX  0A'whAX+(bl0B'wX+(bl0dB'wX+(bl0B'wBX+(bl 0#C'w#BX+(,bl0`C'w`CX+(bl f0C'w`CX+(bl0 D'w DX+(bl 0bD'w DX+(bl0D'wDX+(bl |0  E'w DX+(bl0=E'wDh-0E.0EX.0bT*cb2`h*arg3-` -=E'w=X.=bT(?Eh-E=F'wE2X.EbT(GEh0MF'fdMb\.MbX.MP'cbM`H'argM-@(OEh(w (w ( ( 7* 7+ 7, 7/5 70b 71b <2G73G bG74G 75G 76b 77d 79 7: 7w 7@b 7A Hbbb7BH  HH7CH  H7E 7Fb 7H 7I 7Jw 7Kw 7N 7Q 7T- 7U- 7V- 7W- 7[b 7_) 7`b 7ab 7b9 7cb 7g' 7hb 7i9 7jb 7kb 79 7b 7b 7!" 7b 7b 7!" 7b 7b KK hA7K 7G 7G 7b 7"L  X7b 7b 7gL  7b 7b 7L  Z7b 7b 7L  7b 7b 7w 7KM  k7b 7b 7b 7 7 iM7M 7w 7b 7 79 7M 7M 7M 7- 7Ŝ 7Ɯ 7ǜ (-b N?(JN O(<O (> F& G%  HJ% : ; I$ > $ >  : ;  : ; I8 I!I/   I  : ;  &I  : ;  : ; I : ;  : ; I' I'  : ; (  : ; : ;I8  : ;I8 : ;I' I : ;5I : ;: ;  : ; I8 !I!: ;I" : ; # : ;$ : ; %.: ;' I@B &.: ;' I@B ': ;I (4: ;I ) *4: ;I + ,.? : ;' @B -.: ;' @B .: ;I /.? : ;' I@B 0.? : ;' @B 1.: ;' I@B 2.: ;' @B 3 U4.: ; ' @B 5: ; I 64: ; I 74: ; I 8 : ; 9: ; I :.: ; ' I@B ;.: ;' @B <.: ; ' @B =4I4  >.: ; ' I@B ?.: ; ' @B @.? : ;' I@B A.: ;' I@B B.? : ;' I@B C.? : ;' @B D.? : ;' @B E!I/F4: ;I?  G4: ; I?  H4: ; I? < ww v w w wvwww|v|}w}~w~wvwwwvwwwvww!w!1v12w23w36w6vwww3v34w45w58w8vwww+v+,w,-w-0w0vwwwvwwwvwwwyvyzwz{w{~w~vwwwKvKLwLMwMPwPvwww v  w  w w P vP Q wQ R wR U wU v w w w x vx y wy z wz } w} a va b wb c wc f wf v w w w v w w w ; v; < w< = w= @ w@ v w w w  v  w  w w C vC D wD E wE H wH vwwwvwwwPvPQwQRwRUwUvwwwvwwwJvJKwKLwLOwOvwwwvwwwvwww|v|}w}~w~wvwwwvwwwdvdewefwfiwivwww?v?@w@AwADwDvww w jvjkwklwlowovwwwvwwwM!vM!N!wN!O!wO!R!wR! #v ##w##w##w#v#vv#w#ww#x#wx#{#w{##v##w##w##w#%v%%w%%w%%w%d(vd(e(we(f(wf(i(wi((v((w((w((w(%)v%)&)w&)')w')*)w*)0)v0)1)w1)2)w2)5)w5);)v;)<)w<)=)w=)@)w@)w)vw)x)wx)y)wy)|)w|))v))w))w))w))v))w))w))w))v))w))w))w))v))w))w))w))v))w))w))w))v))w))w))w) *v * *w * *w **w* *v *!*w!*"*w"*%*w%*5*v5*6*w6*7*w7*:*w:*B*vB*C*wC*D*wD*G*wG*W*vW*X*wX*Y*wY*\*w\*{*v{*|*w|*}*w}**w*@-v@-A-wA-B-wB-E-wE-31v3141w4151w5181w811v11w11w11w1C2vC2D2wD2E2wE2H2wH23v33w33w33w34v44w44w44w4c8vc8d8wd8e8we8h8wh88v88w88w89w99v9 9w 9 9w 9 9w 9/9v/909w0919w1949w49f9vf9g9wg9h9wh9k9wk9&:v&:':w':(:w(:+:w+::v::w::w::w:<v<<w<<w<<w<=v= =w = =w = =w =>v>>w>>w>>w>?v??w??w??w?)@v)@*@w*@+@w+@.@w.@CBvCBDBwDBEBwEBHBwHBGvGGwG Gw G#Gw#G0Gv0G1Gw1G2Gw2G5Gw5GEGvEGFGwFGGGwGGJGwJGZGvZG[Gw[G\Gw\G_Gw_G|Gv|G}Gw}G~Gw~GGwGGvGGwGGwGGwGGvGGwGGwGGwGGvGGwGGwGGwG2Hv2H3Hw3H4Hw4H7Hw7HHvHHwHHwHHwHHvHHwHHwHHwH7Iv7I8Iw8I9Iw9I9tt@h w/vx&+/$q@.2u  Z2uLY42ty[K.1$+11 r.=  =؟K=2Y .2=P.U('24'262#$J4wg{4vK2f4wswMiJ36130"33J3*3uuJ4."/fgfg/...%uwX?(")."h"5gZ"3!fF0=3;J.u!t"w/!fZ̻>i> jZ<( 4硡?>ؠ>$  Pu22 JKq 3 x X?..tX>Zfحx t .sZ"x  o. Y=LtX-?ftX%M&N&w4'a < '2/J2J[tY X0u[L tX-ftXvu2QJ3>=*g"x>BJ 2vv*Y2K=52K/Y~./2X,1g=dJtX#1f. 2J3Jػ\UZLtYT0HuX 2uKY2K==.!#&v""""/g;282D:? xJ=0J"ֻ^S!XtgvgtX>ww._.9xu Y2K===@.KY2KY3JtZxKxKKL=2 J=2wL=2Kg3Kg2Kg2222Ku224ؓ壢夻LKKtXitXi --3 0Y̭̟˟ [[[SS6)5555555556R[\YZu.tXJ12fFtXJ?zJ20#4Jv(0uJiiz# .jjjj f .7xg2Ku4Y2Lv=2Z0Cb 52(x. 43g.˽4.KN01*1u3\32f˽`"44w3J  g4*J4iN+[ JZJKKt֤L0\e 2 /vz=0j=[\w>..tXJ.tX hؠuu2&Zv!YZ]]/..tXJ g2u2K2K2u2KY2Y#Z520Z1x 3/2)Y22廑Y2Y4ifd#qJ 2itXJ&wJ 2i.g47s 2lh=l 272.XYi4.g47m 2lh=n 2 .!tXJ ʠC\Y>j=/> Z/u/' 2!/&uZgjX.f 63( (23&(.!-RLtW?vtu'/Y/Y2iבy<(2!h-Jf^h"׽rJ2wؒ/N#2gZY2KZCrt 2YɮY[Z؟YrXJq&  ."2uu=====A̻if"e#Z[j. 24Yr 4i-ns. xls-u 4k#1z$ 24Du 4k#1z$ 24Du .k#1z$ 24Du 4k#1"wt 2j[Dt 4i\#1v$ 24Du 2.廼!2#220![+h7reheapev_set_loop_release_cbst_ctimev_checkANHEsize_tsizetypeepoll_epermcntEVBACKEND_MASKANFSinfy_delev_loop_forkst_blksizest_blocksreventsf_blocksEVFLAG_AUTO__ssize_tev_timer_remainingEVBACKEND_KQUEUErpidev_timeANPENDINGev_suspendinotify_event_IO_save_endpathrfeedmaxev_cleanup__fsid_tnow_floorarray_nextsize__gid_tf_ffreepreparemaxANSIGEPOLLMSGEV_PERIODICst_mtimEV_EMBEDepoll_eventmaxvec_maxsigset_tev_depthev_feed_fd_eventsigfd_setperiodics_reify_lockcheckswlist_deltimers_reifysi_codesi_bandsignalstypestatf_sparepoll_initchildcbGNU C 4.7.3_IO_save_baseIN_NONBLOCKEVBREAK_ALLpostforkdelayevpipe_writeev_childev_feed_signal_eventuserdataEVRUN_ONCE_chainssize_tsa_restorercount_cur_columnf_bsizeEPOLLHUPEVBACKEND_POLL_archcleanupcntfd_intern__dev_tminatintervaldiffEPOLLRDNORMsig_atomic_thave_realtimeselect_modifyev_fork_startEV_ERRORlong into_eventsev_onceev_verify_IO_markerpending_wshiftev_ioEPOLLRDBANDev_userdataev_loop_destroycurpidEVBACKEND_DEVPOLLepoll_eventsheadutsnameEPOLL_EVENTSEVBREAK_CANCELheapev_default_loopTIMEOUT_INFINITY/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebeidleallev_invoke_pendingsigfd_wsigned char__blksize_tegen_IO_FILEcheckcntst_uidelempoll_modifyev_preparehave_monotonicocur___PRETTY_FUNCTION__once_cb_io__fsblkcnt64_tev_recommended_backendssiginfo_tunsigned charsi_statusst_rdevsa_maskev_timer_stopevpipe_initpendingcntev_backendselect_pollev_syserrdomainnameEPOLLINcleanupsev_refsentidle_reify__syscall_slong_tsleeptimeev_asyncsigfdcharev_supported_backends_timerforkmaxmn_nowev_starttime_updateinvoke_pending_cb_IO_lock_tpendingcbev_signal_starttimevaltimerev_idle_stopev_set_syserr_cbdownheapattrf_fsidprev_mn_nowev_prepare_start__mode_tsi_stimeflagsfd_ebadf_IO_read_ptrarray_verifypollidxmax__fsword_tpendingssi_errnopollmaxev_stat_stopfdchangemaxev_child_start_posasynccntev_periodic_stopEVBACKEND_PORTqueue_eventschildevev_tstamppri_adjust_call_addrfs_2625sigfdcbEVBACKEND_SELECT_markersev_set_timeout_collect_intervalev_forkEVFLAG_NOSIGMASKfeed_reverse_doneminposnodename__fd_maskadjustheapemaskfd_event_nocheckev_statidlemaxtv_usecf_filesEVFLAG_NOENVunusedacquireIN_CLOEXECEV__IOFDSETsi_signoEV_NONEEV_CHECKevpipesival_ptrev_sighandlertracedst_gidEPOLLRDHUPev_watcher_timefs_fdinfy_newfdmn_prevfd_enomemev_idle_startepoll_pollselect_initlong unsigned intEPOLLERRonce_cbclear_pendingstatus_flags2waittimeacquire_cbst_size__sigchld_clock_t_IO_read_baseperiodicmaxfd_masktimermaxwlist_addactivefs_hash_unused2odiffloop_forkselect_destroypendingupheaprfeedsrfeedcntev_check_2625pipe_write_wantedev_resumeev_timer_againev_periodicloop_init_sigfault_old_offsetev_set_io_collect_intervalforkcntinfy_addpollfdrstatusncur__fsfilcnt64_t__blkcnt_tEV_FORKEV_CLEANUPEVBACKEND_ALLEV_CHILD__ino_tsysname__sigaction_handlerEV_UNDEFev_async_startfd_reifyreschedule_cblong long intEV_STATcounterev_version_minorasyncmaxasync_pendingdoubleanfdmaxev_feed_eventEV_SIGNAL_IO_write_endpollidxsold_errnomasksyserr_cbEPOLLOUTEPOLL_CLOEXECev_timer_starttimeoutev_io_startfd_validev_set_allocatorword_rfd_eventallocev_breakepoll_init_IO_buf_baseepoll_forkunsigned intev_watcher_listdec_egenfd_changeev_stat_startEPOLL_NONBLOCKrepeatprepares_sifieldsEV_IDLE__pad0__pad1ev_watcher__pad3_sigpoll__pad5once_cb_to_sbufpid_tflagcookie__suseconds_tev_runEPOLLONESHOTchainvec_rivec_ro_sigchldonce_IO_write_base_flagsepoll_epermmaxoffsetperiodics_reschedule__clock_t_modeev_sleepev_cleanup_stopEPOLLETsignalfd_siginfooldmaskanfdst_nlinkword_wEPOLLPRI__unusedev_async_stopfds_bitsnextEV_ASYNCev_async_sendperiodicsEV_PREPAREpendperiodic_recalcev_linux_versionpollssi_fdev_iterationev_is_default_loopev_version_major__pid_t_killev_clear_pendingst_devtimespec_offsetfdchangesbackend_fdf_bfreef_namelenchildsepoll_destroytimersEVFLAG_NOINOTIFYsizertmn_diffo_reifylong long unsigned intwordenable_secureev_rt_nowEV_WRITE__off_tbackend_polltimers_reschedulesi_sigvalwantcleanupmaxsi_tidsa_handlerEVBACKEND_EPOLLpollcntactivecntfdchangecntEPOLLWRBANDf_flagsget_clockev_reallocev_check_startev_signal_stop__time_tsigactionversion__sig_atomic_tEPOLLWRNORM_IO_backup_base_shortbufbackend_mintimebackendev_default_loop_ptrsa_flagsvec_wiinfy_cbvec_wo_next__off64_tsi_overrunev_idleidlecntepoll_eventdummysival_intchild_reapepoll_dataev_pending_countinvoke_cbEV_TIMEOUTtimeout_blocktime_IO_buf_endf_bavailev_invokeev_set_invoke_pending_cb_syscallev_periodic_againnamecheckmaxrelease_cbfd_killev_set_userdataf_typereifyev_timerstderrnew_maxshort intEVRUN_NOWAITloop_doneev_stopuint64_tpriorityev_check_stopssi_signoev_io_stopeventcntbackend_modifytv_nsecpendingmaxverify_heap_vtable_offsetperiodiccntEVFLAG_NOSIGFDEVFLAG_FORKCHECKtimercntev_now_update__sighandler_t_padev_statdata__valev_embeddable_backendspollidx_initev_stat_statsig_pendingev_child_stopsi_addrfd_set_sigsys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/tarantool_ev.cev_feed_signalev_prepare_stoppipe_wev_realloc_emulev_periodic_startasyncsforksst_mode__uid_tsa_sigactioninfy_fork_IO_read_endadjustinfy_wdfeed_reverseepoll_data_tmax_blockEV_IOsigvalarray_reallocuint32_tfd_rearm_allinfy_init_filenosi_pidverify_watcherpipecbreleaseev_signalsi_uidev_fork_stopf_frsizeEV_CUSTOMpoll_pollpreparecntstatfsshort unsigned intev_unrefpipe_write_skippedbasefs_wEV_TIMERslotANFD_IO_write_ptrsignumEVFLAG_SIGNALFDidlesmachineEPOLLWAKEUPio_blocktimeloop_depthEV_READst_ino__nlink_tsigval_tfd_setsizeorigflagsevents__sigset_tev_floordataepoll_epermsloop_count__pad2prevtv_sec__pad4EVBREAK_ONEstat_timer_cbev_cleanup_startpendingpripoll_destroysi_utimest_atimepoll_modifyanfdsGCC: (Debian 4.7.3-4) 4.7.3zRx  AC F <AC  \AC  |AC P LAC G ?AC z AC P aAC \ AC  <AC { zPLRx  $xAC s jAC e QAC L  AC H AC   AC  @MAC H `MAC H lAC g LAC G 0AC k AC  AC   NAC I @*AC e `bAC ] LAC G }AC x ?AC z AC  AC   AC  @:AC u   AC   ,AC   PhAC c /AC j AC R  AC   AC  PAC   AC   <eAC ` vAC q AC  OAC J ZAC U 8-AC h X\AC W xAC  iAC d .AC i  GAC E= $yAC Eo $kAC f DVAC Q d AC F  AC F <AC Er AC W AC T $AC _ $ AC G D AC G d AC G AC Q AC Q AC P  AC H  AC P $ $AC _ D AC  d AC   gAC b  AC   SAC N  }AC x  PAC K $ AC  D AC H d 'AC b  7AC r  AC   AC }  jAC e  AC  $ AC  D AC  d qAC l  AC   AC   AC M  AC P  AC P $ "AC ] D AC F d 1AC l  (AC c  RAC M  OAC J  xAC s  >AC y $ +AC f D AC X d AC z  AC   TAC O  AC   AC  JAC E $AC  DAC  d&AC a  , AC   P 5AC 0 [AC V bAC ]  >AC 9 ,lAC g LAC   AC  AC W 'AC b AC  sAC n `AC [  AC  TPAC K tkAC f  BAC E8 AC  AC  AC  AC  8AC  XAC  xAC  AC  AC  AC  AC  #AC ^ 8hAC c X<AC w x<AC w  8AC 3 .symtab.strtab.shstrtab.rela.text.rela.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @myv+m&1n 6n >zUG{yOParo260zz0 "\z002 2 2zDK j #1 @ IZdLn?~2a (08<@(p (2=M\io w$~@0ptx|$1@OYeqx (Pp!,7ELU^d0i0q@y0 4,jQ! +z8MJLMWlh Lq zy b N * b< L } ?D Q: Kh }&` 0.9AeeNvY@dOrkZ}-\ N! #iw#.#G%ye(k(V<)<,|*641g@]sJ1Y rD2S~ 3}  '::j < =' @>U?qg*@s G(GR3HOH>8I+cI    .p GP `@ yV>*ZlZ^[\7\'^\khl<@l<   }     , 3 ; E M U b xk     Q 0 J       I FG   ' /6 > H S a n |    &) 1)     x) ) )$ )  ) , ) 5 )P  *p !* 6* C* X*$    g9 A- 1G T5 4P d8! KR1 8 >  9'H 097Y Mg (Qx DB G [G" }G G1 Hx  KT ,N ,OJ vO %R& ! - 7 C N X b i /V[x Vb         x^`  `PakAbB!c.{d?2eOe^fl;gzghWi jjyk#|l80 tarantool_ev.cev_is_default_loophave_realtimehave_monotonicev_floorev_linux_versionsyserr_cbev_syserrev_realloc_emulallocev_reallocnow_floormn_nowrtmn_diffrfeedsrfeedmaxrfeedcntpendingspendingmaxpendingcntpendingpripending_wio_blocktimetimeout_blocktimebackendactivecntloop_donebackend_fdbackend_mintimebackend_modifybackend_pollanfdsanfdmaxevpipepipe_wpipe_write_wantedpipe_write_skippedcurpidpostforkvec_rivec_rovec_wivec_wovec_maxpollspollmaxpollcntpollidxspollidxmaxepoll_eventsepoll_eventmaxepoll_epermsepoll_epermcntepoll_epermmaxfdchangesfdchangemaxfdchangecnttimerstimermaxtimercntperiodicsperiodicmaxperiodiccntidlesidlemaxidlecntidleallpreparespreparemaxpreparecntcheckscheckmaxcheckcntforksforkmaxforkcntcleanupscleanupmaxcleanupcntasync_pendingasyncsasyncmaxasynccntfs_fdfs_wfs_2625fs_hashsig_pendingsigfdsigfd_wsigfd_setorigflagsloop_countloop_depthuserdatarelease_cbacquire_cbinvoke_cbev_default_loop_ptrget_clockarray_nextsizearray_reallocpendingcbfeed_reversefeed_reverse_donequeue_eventsfd_event_nocheckfd_eventfd_reifyfd_changefd_killfd_validfd_ebadffd_enomemfd_rearm_allfd_interndownheapupheapadjustheapreheapsignalsevpipe_initevpipe_writepipecbev_sighandlersigfdcbchildschildevchild_reapchildcbepoll_modifyepoll_pollepoll_initepoll_destroyepoll_forkpollidx_initpoll_modify__PRETTY_FUNCTION__.5792poll_poll__PRETTY_FUNCTION__.5798poll_initpoll_destroyselect_modifyselect_pollselect_initselect_destroyenable_secureloop_initloop_forkinfy_forkverify_watcher__PRETTY_FUNCTION__.5915verify_heap__PRETTY_FUNCTION__.5921array_verify__PRETTY_FUNCTION__.5929__PRETTY_FUNCTION__.5939idle_reifytimers_reify__PRETTY_FUNCTION__.5992periodic_recalcperiodics_reify__PRETTY_FUNCTION__.6008periodics_rescheduletimers_rescheduletime_update__PRETTY_FUNCTION__.6042wlist_addwlist_delclear_pendingpri_adjustev_startev_stop__PRETTY_FUNCTION__.6104__PRETTY_FUNCTION__.6109__PRETTY_FUNCTION__.6113__PRETTY_FUNCTION__.6119__PRETTY_FUNCTION__.6129__PRETTY_FUNCTION__.6135__PRETTY_FUNCTION__.6142infy_addinfy_delinfy_wdstat_timer_cbinfy_cbev_check_2625infy_newfdinfy_initonce_cbonce_cb_ioonce_cb_tounameev_set_syserr_cbperrorabortreallocfreeev_set_allocatorstderrfprintfev_rt_nowev_timesyscallgettimeofdayev_sleep__gcc_personality_v0nanosleep_Unwind_Resumeev_feed_eventev_feed_fd_eventev_io_stopfcntl__errno_locationeventfdpipedup2closeev_io_startev_unrefwritereadev_feed_signal_eventev_feed_signalwaitpidepoll_ctlepoll_waitepoll_create1epoll_create__assert_failpollmemcpyselectev_version_majorev_version_minorgetuidgeteuidgetgidgetegidev_supported_backendsev_recommended_backendsev_embeddable_backendsev_backendev_iterationev_depthev_set_io_collect_intervalev_set_timeout_collect_intervalev_set_userdataev_userdataev_set_invoke_pending_cbev_set_loop_release_cbgetpidgetenvatoiev_invoke_pendingev_loop_destroyev_refev_signal_stopev_verifyev_default_loopev_signal_startev_loop_forkev_invokeev_pending_countev_timer_stopev_periodic_stopev_runev_breakev_now_updateev_suspendev_resumeev_clear_pendingmemsetev_timer_startev_timer_againev_timer_remainingev_periodic_startev_periodic_againsignalfdsigemptysetsigaddsetsigprocmasksigfillsetsigactionsigdelsetsignalev_child_startev_child_stopinotify_add_watchstatfs64strlenstrcpystrrchrinotify_rm_watchinotify_init1inotify_initev_stat_statlstat64ev_stat_startev_stat_stopev_idle_startev_idle_stopev_prepare_startev_prepare_stopev_check_startev_check_stopev_fork_startev_fork_stopev_cleanup_startev_cleanup_stopev_async_startev_async_stopev_async_sendev_onceTIMEOUT_INFINITYH $ l $  ,  , Y < t <     ,Enw  D  L >f D  T &5 @V @    p p p @ @( @P @p8448, 8,,88 ,88"8<B8 g   @ ` o          ! ( < C I w      1 F R     % >  @ H "$/$7$CMS ]$e kdqdz @lll $$) (05Df p$ l  &2Pn  1 F aP 0^-;Qq%8AKR fms  \ (/5<F[p qEwgw(1CImsQW]fr e #7JTZaqx *:A U[e   5 N  X ] b o      ! ! !'!^!s!! \ !!!!!!!! "!" 2"B"H"]"  g" l" q""#)#-# 4#8# N!?#I#T#^#h#~###'$|9$|I$[$k$}$$$$|$$$$$$$|%|9%|M%|q%%%%%&D& d W&j&|q&|&&&&&&&&&&&' ' 4'D' sT'c'~'Y(y((( #(( %((x((((|(()F)M)V)])))))**0*=*R*k*v*********+ +t3+ 8+ B+ G+ O+ W+g+|++++++$++ +++++++l,h ,, 7,U,f,o,,,,,,, , , ,- - @ - @- @+-P/- K4- @K-^-e-{-- ` -- ` -- @- - --$-$-- ---.....%.5.E.h. @. p. p. . @.  . P. P. p.  ///9/D/,W/0a/4g/8n/(y////////////0 0 00+050;0B0M0`0j0p0w0000000000000 111 1*1:1N1 @Y1^1 @c1i1 s1 z11 @11w1  1 1 12 @*2  42 92 >2~2 2 2 022 2 3 3K3 U3 Z3 _33 3 3 H34(4 24 74 <4B4H4Q4 [4 `4 e4u44 4 4 4444 4 4 44<5 F5 K5 P5l5 v5 {5 855 5 5 55555 5 5 5566 6$6 .6 36 86>6E6g6 ps6 |6 6 6 666 6 6 66 P6 p6 6 6 &66 p7  $7*737 =7 B7 AG7M7T7d7j7s7 }7 7 T777777 7 7 m777777 7 8 8 88$8*838 =8 B8 G8M8T8q8{888 ` 8 ` 8 ` 8p 8 8 8 ` 8 ` 88889wL9 q99999 @99 9 9 : : :1:S: c: ps: p:  ::::@;M;m; w; |; ;;;;;;;;;,< l \<<<=E=y== = = =====>>'>.>K>]>h>x>>>>>?Z?n?????@9@Q@$j@r@z@@ t @$@@@@@@@@A$ A$/A | EA $ `ApAAAAAAAAAA $ BBB4B;BQBZB`BlB vB {B pBBBBtB BtB BtBwBxBBBCC,C3CICQCiCxCChCC%DpJDUDeDDDDDDDEE@EHEfEEEEEEE EFhFpF @&F 0F 5F :FDF @IFmFFFFFFFG GGG+G7G@GLGUGGGGGVH @qH H @H ]IpII I I II I I XI JJ.J5J  IJOJbJ|JJJ J J JBK[K eK jK  oKvKKL L !L &L,L5L;L[LnLLL LLLLLLMhM rM wM |MMMMMMMMM N|NNNNNN&O JOO P p P P ( PCPLPRPrP P PP PPPPQcQQ P Q Q QQQQQQQQR9RER#R @ R R RRR  R%RRRS   S%SS"S.S  3S&8S =S NS \S`S }fSlSrS{S S SSSS  S'S  S(SS  S% T 9TQT dT)T*TT&T'T(TJU U UU&U'U  U+UU  U%V(V,(VrV V  WW/CW,W0XXX1X2Y.Y3VYgY/YYY @YZ!$ZlZ @ZZ4Z @:[ @[[\-\+E\5X\6d\s\\\\\ \ \ \\ [\\$\$\ \ \\]]!] &],]3]>]D]N][]a]$g]$p] u]z]] @] @]3^C^!V^^8'_7<`d`7u```7` .a ^aa!ab,bb pb pb pbbb Pb Pc P&c  Ic  ]c  c  c  d pd pd p>d  idrdddddddddd eeeieeeeeef ff#f)fjGjMjajgjzjjjj jjjkk%k.k4kKkk kk'lclm l;mrm @lm  P  !m) . 4; B I bP I W ^ ,l q 8| N U =     3 ; 3   S# 0 ; F eQ  \ g r 7 b         n 3/ C: E X w  i  N   1    F  w   ' 5 5 }C Q _ m {   \  `  + X   =    + 9 P ^ l      F   u ( * A "L W }m Ax )    7       & VT \` n |    @    +    f  y   $   > H   & . 6 <? J W f u ^ W  V    ^ W" O V [ h w  ^ W     ^$ WA ^ <   ^ W ) 5  B Q ` ^o W t F    ( 7 ^F Wc r    ^ W  O/ > r k w '  ^ W   F  {& c o | ^ W  &   ^* We &q &~   ^ W & }   ^, Wg }s (   ^ W ( S   ^. WK '} S     &    C       S 6 ' M- 3 v@ L ^Z ^h mv O  O   1   \   T   (  7 3 F V f v    t        ( 6 w [       ]   3  6< G UZ b jj      u9 8F T b q f   3 <      5 <E Z 3j b /  3 p   @     T  }& - v4 : @ ~ H R \ g @   < W k  <  g s{   N  ` ?P ^'}/ p xn }    " ; 7L T\2d @ *2  7 4 3 ?4GO `YOa{ ,    F,    z 0 <DL V e     k z @ 4<E @V ^zfn  @ L   L ` <   ,< DL T l {    Q     Q $ , D T \ dy l  Z    F o y b  @ O ,  4 @ = @N V b ^  f    U  < ` < ! ! #! +! 3! ;! T! .\! d!D l! ! !D !! ! \! ! @" (" 0"8"@" @ J" \t"|"" ""Q" " \" "Q"" # \,# 4#<#D# ` N#V#p# x##K# # ##H# ### , # #K#$ $ 7$n?$L$ , \$d$m$ %$ $$$ $ $ b $$$ $ $ $$}$ @% #% ;+%}3%;% U% %%% 5%%% % -%  & p -& H5&=&eE& `]& {&  & &e&& & & f &'6 'j' @&' -'5'@=' G' b' p'x'' ''(' <' & '@( ( ( O$( ,(4(k<( B( > J(kR(Z( @`( Pg(o(w( ( ( ( ((N!( ( F)  )()) @.)6) ?) @d) Fk)N!s)#{) `) ) F)  ) >)#)w#) * O* *w# *#(* .* {5*#=*%E* {*#*%* e* *$*$* $* *%*e(* * + '$+R',+S(5+ eQ+`'Y+@(b+  p+ ~+'+-(+ + <+ +e(+(+ @+ O+ +(+&), , ,&),1)$, +, 4 7,1)?,<)G, `M, jY,<)a,x)i, p, g|,x),), , O, t,),), , O, 9,),), - O- !-))-)1- @8- {D-)L-)T- [- g-)o-)w- ~- ? -)- *- `- F- ]- *-!*- - F- -!*-6*- . W. #.6*+.C*3. :. B.C*J.X*R. \. m. u.X*}.|*. @. .  .  .|*.A-. . O.*.*/* /+%/ -/A-5/41=/ U/ ]/41e/1m/ `s/ {/1/D2/ / F/  / /D2/3/ / \0 F"0 10 k903A04I0 p0 F{0 0 040d80 0 F0 04151 a+1d8318;1 @E1 OV1 p^18f1 9n1 u1 }1 91091 1 1 K1091g91 `1 1 2g9 2':2 29%2:C2 ,K2':S2:[2 e2B:m2:2 2:2<2 2 F2 2:2;2 N2<2 =3 3 F43<<3<\3 d3 =l3>t3 @ ~3 F3 3=3[>3 {3>3?3 3>3?4 4?&4*@.4 !84 zT4?\4@u4 }4*@4DB4 `!4 4 04 4 `4 O4 4DB4G4 !5 O5 F 5 )5C15\F:5 ! I5 IX5 g5RDo5D5D5D5  5G51G5 "5 51G6FG6 "6 u6FG%6[G-6 "46 <6[GD6}GL6 @#S6 [6}Gc6Gk6 #r6 z6G6G6 $6 6 z 6G6G6 `$6 36 6 6G63H7 $ 7 37 ,7  473H<7HD7 %]7 i7Hq7Hy7 %7 7H7H7 7H78I7 % 8 88I8cI$8 @&;8 K8 MS8cI[8Ic8 &|8 8I8J8 '8 F8 8J8J8 @8 8J9K 9 `'$9 F/9 O9 W9K_9Mg9 '~9 F9 9lL9L9 @9 9M9,N9 (9 F9 9@M:M: 5:  =:,NE:,OM: (f: r:,Oz:vO: (: ':vO:(Q: @): F: p :P:P: @; ;(Q&;%R.; )E; FP; P Y;WQa;Rj; ; ;%R;KR; *; ;KR;T; `*; F; @ <ET<T.< D6<T></VF< *^<Uf< V< </V<V< +< v<V<V< +< b <V<*Z< +=@W=iX8=X@=YI= Y=Ya=xYj= y= I= g=*Z=Z= @,= = =Z=[> ,> <>ZD>[[>Zc>|[> >[>\> -> >[>\"? *?\2?7\:? `-@? L?7\T?^\\? -u? }?^\?]? .? c?]?x^? .? ?]?e^?]?Z^@ ] @x^@^@ .5@ =@^E@`M@ @/f@ @ {@ y @`@a@ /@ @a@Ab@ 0@ @AbAcA `0&Aqb.A{c7A FAbNAMcWA @pA xAcA{dA 0AcAxdA A ,A{dA2eA 1AdA eB @B B2e$Be,B 1CB]eKBeTB fB 5nBevBf~B 1B:fBkfB @B gBfB;gB @2BfB*gB C C;g Cg(C 2?CgGCgPC @hC &pCgxChC 3ChChC C ChCWiC `3ChC+iC @D DWi"D j*D 3ADiIDiRD dD lD jtDj|D 4DxjDjD @D DjDykD 4DjDhkD E &EykEk&E 4>E FEkNElVE @5`E JoE E ZElE@lE 5E E JE E@lF|lF 6F .F J?F GF|lOFmWF `6oF <~F F JF mFF 1F F FF  GG <G'G 3G L PJLSL _LnL zLL LL @LL LL Z LL LL M M #M"M N .M7M 9CMRM E ^MgM sM|M MM MM 3M0M M@M jMM \N N NN +N 4N 2@NIN iUN^N jNsN NN NN * NN \NN NN $NO  O)O 6O` ?O xMOVO qcOIlO  ~ @ `}2 @4k  i,$zDdL Q  y $b D d <   D $DQdm i  iK i*0}9 i>Tt} iJe iX@k<\|N!#w##%  ig(e(H(h&)1)<)x)))()H)h)) *!*6* C*( X*H |*h A- 41 1 D2 3 4( d8H 8h  9 09 g9 ': : <(  =H >h ? *@ DB G 1G FG( [GH }Gh G G G 3H H H( 8IH cIh I J K M ,N,O(vOH(Qh%RKR ivT i/VVV0*ZPZp[y i\7\^\]x^4^= iX`xaAbc{d2ee<f\;g|ghWi jjyk<k\l|@l|ltarantool-1.5.1.218.g1a69fd6/README.FreeBSD0000664000000000000000000000263112202131537016047 0ustar rootrootTarget OS: FreeBSD 8.3 (RELEASE) 1. Install necessary packages: ------------- pkg_add -r sudo git cmake gmake libbfd pkg_add -r python27 2. Install gcc 4.6.x and gcc infrastructure pre-requisites ------------- (x) From one of the gcc mirrors download from /gcc/infrastructure: gmp, mpfr and mpc packages; (x) Configure and build the pre-requisites using --prefix=/usr/local and --with-gmp=/usr/local (see gcc.gnu.org/install); (x) Configure gcc as: configure --prefix=/usr/local --enable-languages=c,c++,objc --program-suffix=463 --enable-shared --enable-threads=posix --with-mpc=/usr/local (x) Build gcc as per steps outlined in GCC documentation gcc.gnu.org/install; (x) Set up the environment to include the new GCC's libs: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 3. Install necessary python modules: ------------- cd /usr/ports/misc/py-pexpect sudo make install cd /usr/ports/devel/py-yaml sudo make install cd /usr/ports/devel/py-daemon sudo make install 4. Download & build tarantool source code: ------------- git clone git://github.com/tarantool/tarantool.git cd tarantool CC=gcc463 CXX=g++463 cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=true gmake 5. Set up python 2.6 to run tarantool tests ------------- mkdir ~/build/bin && ln -s /usr/bin/python26 ~/build/bin/python 6. Run tarantool test suite ------------- cd ~/build/tarantool/test PATH=~/build/bin:$PATH ./run -- EOF tarantool-1.5.1.218.g1a69fd6/cfg/0000775000000000000000000000000012242653271014523 5ustar rootroottarantool-1.5.1.218.g1a69fd6/cfg/cmake_install.cmake0000664000000000000000000000224712213333034020326 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/cfg/core_cfg.cfg_tmpl0000664000000000000000000000575212231715257020021 0ustar rootroot# username to switch to username=NULL, ro # Local hot standby (if enabled, the server will run in hot # standby mode, continuously fetching WAL records from wal_dir, # until it is able to bind to the primary port. # In local hot standby mode the server only accepts reads. local_hot_standby=false, ro # tarantool bind ip address, applies to master # and replication ports. INADDR_ANY is the default value. bind_ipaddr="INADDR_ANY", ro # save core on abort/assert # deprecated; use ulimit instead coredump=false, ro # admin port # used for admin's connections admin_port=0, ro # Replication clients should use this port (bind_ipaddr:replication_port). replication_port=0, ro # Log verbosity, possible values: ERROR=1, CRIT=2, WARN=3, INFO=4(default), DEBUG=5 log_level=4 # Size of slab arena in GB slab_alloc_arena=1.0, ro # Size of minimal allocation unit slab_alloc_minimal=64, ro # Growth factor, each subsequent unit size is factor * prev unit size slab_alloc_factor=2.0, ro # working directory (daemon will chdir(2) to it) work_dir=NULL, ro # Snapshot directory (where snapshots get saved/read) snap_dir=".", ro # WAL directory (where WALs get saved/read) wal_dir=".", ro # script directory (where init.lua is expected to be) script_dir=".", ro # name of pid file pid_file="tarantool.pid", ro # logger command will be executed via /bin/sh -c {} # example: 'exec cronolog /var/log/tarantool/%Y-%m/%Y-%m-%d/tarantool.log' # example: 'exec extra/logger.pl /var/log/tarantool/tarantool.log' # when logger is not configured all logging going to STDERR logger=NULL, ro # make logging nonblocking, this potentially can lose some logging data logger_nonblock=true, ro # delay between loop iterations io_collect_interval=0.0 # size of listen backlog backlog=1024, ro # network io readahead readahead=16320 # Do not write into snapshot faster than snap_io_rate_limit MB/sec snap_io_rate_limit=0.0 # Write no more rows in WAL rows_per_wal=500000, ro # OBSOLETE # Starting from 1.4.5, this variable has no effect. wal_writer_inbox_size=16384, ro # Defines fiber/data synchronization fsync(2) policy: # "none": does not write to WAL # "write": fibers wait for their data to be written to the log. # "fsync": fibers wait for their data, fsync(2) follows each write(2) # "fsync_delay": fibers wait for their data, fsync every N=wal_fsync_delay seconds, # N=0.0 means no fsync (equivalent to wal_mode = "write"); wal_mode="fsync_delay" # Fsync WAL delay, only issue fsync if last fsync was wal_fsync_delay # seconds ago. # WARNING: actually, several last requests may stall fsync for much longer wal_fsync_delay=0.0 # Delay, in seconds, between successive re-readings of wal_dir. # The re-scan is necessary to discover new WAL files or snapshots. wal_dir_rescan_delay=0.1, ro # Panic if there is an error reading a snapshot or WAL. # By default, panic on any snapshot reading error and ignore errors # when reading WALs. panic_on_snap_error=true, ro panic_on_wal_error=false, ro tarantool-1.5.1.218.g1a69fd6/cfg/warning.c0000664000000000000000000000073412231715257016341 0ustar rootroot#include "warning.h" #include #include struct tbuf *cfg_out = NULL; /** This is a callback function used by the generated * configuration file parser (tarantool_{box, feeder, ...}_cfg.c) * to complain when something wrong happens. */ void out_warning(ConfettyError v, const char *format, ...) { va_list ap; (void)v; /* make gcc happy */ va_start(ap, format); tbuf_printf(cfg_out, "\r\n - "); tbuf_vprintf(cfg_out, format, ap); va_end(ap); } tarantool-1.5.1.218.g1a69fd6/cfg/tarantool_box_cfg.c0000664000000000000000000027101212242653271020364 0ustar rootroot#include #include #include #include #include #include #include /* * Autogenerated file, do not edit it! */ #include "cfg/warning.h" #include "cfg/tarantool_box_cfg.h" static int cmpNameAtoms(NameAtom *a, NameAtom *b) { while(a && b) { if (strcasecmp(a->name, b->name) != 0) return 0; a = a->next; b = b->next; } return (a == NULL && b == NULL) ? 1 : 0; } void init_tarantool_cfg(tarantool_cfg *c) { c->__confetti_flags = 0; c->username = NULL; c->local_hot_standby = false; c->bind_ipaddr = NULL; c->coredump = false; c->admin_port = 0; c->replication_port = 0; c->log_level = 0; c->slab_alloc_arena = 0; c->slab_alloc_minimal = 0; c->slab_alloc_factor = 0; c->work_dir = NULL; c->snap_dir = NULL; c->wal_dir = NULL; c->script_dir = NULL; c->pid_file = NULL; c->logger = NULL; c->logger_nonblock = false; c->io_collect_interval = 0; c->backlog = 0; c->readahead = 0; c->snap_io_rate_limit = 0; c->rows_per_wal = 0; c->wal_writer_inbox_size = 0; c->wal_mode = NULL; c->wal_fsync_delay = 0; c->wal_dir_rescan_delay = 0; c->panic_on_snap_error = false; c->panic_on_wal_error = false; c->primary_port = 0; c->secondary_port = 0; c->too_long_threshold = 0; c->custom_proc_title = NULL; c->memcached_port = 0; c->memcached_space = 0; c->memcached_expire = false; c->memcached_expire_per_loop = 0; c->memcached_expire_full_sweep = 0; c->replication_source = NULL; c->space = NULL; } int fill_default_tarantool_cfg(tarantool_cfg *c) { c->__confetti_flags = 0; c->username = NULL; c->local_hot_standby = false; c->bind_ipaddr = strdup("INADDR_ANY"); if (c->bind_ipaddr == NULL) return CNF_NOMEMORY; c->coredump = false; c->admin_port = 0; c->replication_port = 0; c->log_level = 4; c->slab_alloc_arena = 1; c->slab_alloc_minimal = 64; c->slab_alloc_factor = 2; c->work_dir = NULL; c->snap_dir = strdup("."); if (c->snap_dir == NULL) return CNF_NOMEMORY; c->wal_dir = strdup("."); if (c->wal_dir == NULL) return CNF_NOMEMORY; c->script_dir = strdup("."); if (c->script_dir == NULL) return CNF_NOMEMORY; c->pid_file = strdup("tarantool.pid"); if (c->pid_file == NULL) return CNF_NOMEMORY; c->logger = NULL; c->logger_nonblock = true; c->io_collect_interval = 0; c->backlog = 1024; c->readahead = 16320; c->snap_io_rate_limit = 0; c->rows_per_wal = 500000; c->wal_writer_inbox_size = 16384; c->wal_mode = strdup("fsync_delay"); if (c->wal_mode == NULL) return CNF_NOMEMORY; c->wal_fsync_delay = 0; c->wal_dir_rescan_delay = 0.1; c->panic_on_snap_error = true; c->panic_on_wal_error = false; c->primary_port = 0; c->secondary_port = 0; c->too_long_threshold = 0.5; c->custom_proc_title = NULL; c->memcached_port = 0; c->memcached_space = 23; c->memcached_expire = false; c->memcached_expire_per_loop = 1024; c->memcached_expire_full_sweep = 3600; c->replication_source = NULL; c->space = NULL; return 0; } void swap_tarantool_cfg(struct tarantool_cfg *c1, struct tarantool_cfg *c2) { struct tarantool_cfg tmpcfg = *c1; *c1 = *c2; *c2 = tmpcfg; } static int acceptDefault_name__space(tarantool_cfg_space *c) { c->enabled = -1; c->cardinality = -1; c->estimated_rows = 0; c->index = NULL; return 0; } static int acceptDefault_name__space__index(tarantool_cfg_space_index *c) { c->type = strdup(""); if (c->type == NULL) return CNF_NOMEMORY; c->unique = -1; c->key_field = NULL; return 0; } static int acceptDefault_name__space__index__key_field(tarantool_cfg_space_index_key_field *c) { c->fieldno = -1; c->type = strdup(""); if (c->type == NULL) return CNF_NOMEMORY; return 0; } static NameAtom _name__username[] = { { "username", -1, NULL } }; static NameAtom _name__local_hot_standby[] = { { "local_hot_standby", -1, NULL } }; static NameAtom _name__bind_ipaddr[] = { { "bind_ipaddr", -1, NULL } }; static NameAtom _name__coredump[] = { { "coredump", -1, NULL } }; static NameAtom _name__admin_port[] = { { "admin_port", -1, NULL } }; static NameAtom _name__replication_port[] = { { "replication_port", -1, NULL } }; static NameAtom _name__log_level[] = { { "log_level", -1, NULL } }; static NameAtom _name__slab_alloc_arena[] = { { "slab_alloc_arena", -1, NULL } }; static NameAtom _name__slab_alloc_minimal[] = { { "slab_alloc_minimal", -1, NULL } }; static NameAtom _name__slab_alloc_factor[] = { { "slab_alloc_factor", -1, NULL } }; static NameAtom _name__work_dir[] = { { "work_dir", -1, NULL } }; static NameAtom _name__snap_dir[] = { { "snap_dir", -1, NULL } }; static NameAtom _name__wal_dir[] = { { "wal_dir", -1, NULL } }; static NameAtom _name__script_dir[] = { { "script_dir", -1, NULL } }; static NameAtom _name__pid_file[] = { { "pid_file", -1, NULL } }; static NameAtom _name__logger[] = { { "logger", -1, NULL } }; static NameAtom _name__logger_nonblock[] = { { "logger_nonblock", -1, NULL } }; static NameAtom _name__io_collect_interval[] = { { "io_collect_interval", -1, NULL } }; static NameAtom _name__backlog[] = { { "backlog", -1, NULL } }; static NameAtom _name__readahead[] = { { "readahead", -1, NULL } }; static NameAtom _name__snap_io_rate_limit[] = { { "snap_io_rate_limit", -1, NULL } }; static NameAtom _name__rows_per_wal[] = { { "rows_per_wal", -1, NULL } }; static NameAtom _name__wal_writer_inbox_size[] = { { "wal_writer_inbox_size", -1, NULL } }; static NameAtom _name__wal_mode[] = { { "wal_mode", -1, NULL } }; static NameAtom _name__wal_fsync_delay[] = { { "wal_fsync_delay", -1, NULL } }; static NameAtom _name__wal_dir_rescan_delay[] = { { "wal_dir_rescan_delay", -1, NULL } }; static NameAtom _name__panic_on_snap_error[] = { { "panic_on_snap_error", -1, NULL } }; static NameAtom _name__panic_on_wal_error[] = { { "panic_on_wal_error", -1, NULL } }; static NameAtom _name__primary_port[] = { { "primary_port", -1, NULL } }; static NameAtom _name__secondary_port[] = { { "secondary_port", -1, NULL } }; static NameAtom _name__too_long_threshold[] = { { "too_long_threshold", -1, NULL } }; static NameAtom _name__custom_proc_title[] = { { "custom_proc_title", -1, NULL } }; static NameAtom _name__memcached_port[] = { { "memcached_port", -1, NULL } }; static NameAtom _name__memcached_space[] = { { "memcached_space", -1, NULL } }; static NameAtom _name__memcached_expire[] = { { "memcached_expire", -1, NULL } }; static NameAtom _name__memcached_expire_per_loop[] = { { "memcached_expire_per_loop", -1, NULL } }; static NameAtom _name__memcached_expire_full_sweep[] = { { "memcached_expire_full_sweep", -1, NULL } }; static NameAtom _name__replication_source[] = { { "replication_source", -1, NULL } }; static NameAtom _name__space[] = { { "space", -1, NULL } }; static NameAtom _name__space__enabled[] = { { "space", -1, _name__space__enabled + 1 }, { "enabled", -1, NULL } }; static NameAtom _name__space__cardinality[] = { { "space", -1, _name__space__cardinality + 1 }, { "cardinality", -1, NULL } }; static NameAtom _name__space__estimated_rows[] = { { "space", -1, _name__space__estimated_rows + 1 }, { "estimated_rows", -1, NULL } }; static NameAtom _name__space__index[] = { { "space", -1, _name__space__index + 1 }, { "index", -1, NULL } }; static NameAtom _name__space__index__type[] = { { "space", -1, _name__space__index__type + 1 }, { "index", -1, _name__space__index__type + 2 }, { "type", -1, NULL } }; static NameAtom _name__space__index__unique[] = { { "space", -1, _name__space__index__unique + 1 }, { "index", -1, _name__space__index__unique + 2 }, { "unique", -1, NULL } }; static NameAtom _name__space__index__key_field[] = { { "space", -1, _name__space__index__key_field + 1 }, { "index", -1, _name__space__index__key_field + 2 }, { "key_field", -1, NULL } }; static NameAtom _name__space__index__key_field__fieldno[] = { { "space", -1, _name__space__index__key_field__fieldno + 1 }, { "index", -1, _name__space__index__key_field__fieldno + 2 }, { "key_field", -1, _name__space__index__key_field__fieldno + 3 }, { "fieldno", -1, NULL } }; static NameAtom _name__space__index__key_field__type[] = { { "space", -1, _name__space__index__key_field__type + 1 }, { "index", -1, _name__space__index__key_field__type + 2 }, { "key_field", -1, _name__space__index__key_field__type + 3 }, { "type", -1, NULL } }; #define ARRAYALLOC(x,n,t,_chk_ro, __flags) do { \ int l = 0, ar; \ __typeof__(x) y = (x), t; \ if ( (n) <= 0 ) return CNF_WRONGINDEX; /* wrong index */ \ while(y && *y) { \ l++; y++; \ } \ if ( (n) >= (l + 1) ) { \ if (_chk_ro) return CNF_RDONLY; \ if ( (x) == NULL ) \ t = y = malloc( ((n)+1) * sizeof( __typeof__(*(x))) ); \ else { \ t = realloc((x), ((n)+1) * sizeof( __typeof__(*(x))) ); \ y = t + l; \ } \ if (t == NULL) return CNF_NOMEMORY; \ (x) = t; \ memset(y, 0, (((n)+1) - l) * sizeof( __typeof__(*(x))) ); \ while ( y - (x) < (n) ) { \ *y = malloc( sizeof( __typeof__(**(x))) ); \ if (*y == NULL) return CNF_NOMEMORY; \ if ( (ar = acceptDefault##t(*y)) != 0 ) return ar; \ (*y)->__confetti_flags = __flags; \ y++; \ } \ } \ } while(0) int confetti_strcmp(char *s1, char *s2); static ConfettyError acceptValue(tarantool_cfg* c, OptDef* opt, int check_rdonly) { if ( cmpNameAtoms( opt->name, _name__username) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->username == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->username) != 0)) return CNF_RDONLY; if (c->username) free(c->username); c->username = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->username == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__local_hot_standby) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->local_hot_standby != bln) return CNF_RDONLY; c->local_hot_standby = bln; } else if ( cmpNameAtoms( opt->name, _name__bind_ipaddr) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->bind_ipaddr == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->bind_ipaddr) != 0)) return CNF_RDONLY; if (c->bind_ipaddr) free(c->bind_ipaddr); c->bind_ipaddr = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->bind_ipaddr == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__coredump) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->coredump != bln) return CNF_RDONLY; c->coredump = bln; } else if ( cmpNameAtoms( opt->name, _name__admin_port) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->admin_port != i32) return CNF_RDONLY; c->admin_port = i32; } else if ( cmpNameAtoms( opt->name, _name__replication_port) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->replication_port != i32) return CNF_RDONLY; c->replication_port = i32; } else if ( cmpNameAtoms( opt->name, _name__log_level) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; c->log_level = i32; } else if ( cmpNameAtoms( opt->name, _name__slab_alloc_arena) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->slab_alloc_arena != dbl) return CNF_RDONLY; c->slab_alloc_arena = dbl; } else if ( cmpNameAtoms( opt->name, _name__slab_alloc_minimal) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->slab_alloc_minimal != i32) return CNF_RDONLY; c->slab_alloc_minimal = i32; } else if ( cmpNameAtoms( opt->name, _name__slab_alloc_factor) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->slab_alloc_factor != dbl) return CNF_RDONLY; c->slab_alloc_factor = dbl; } else if ( cmpNameAtoms( opt->name, _name__work_dir) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->work_dir == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->work_dir) != 0)) return CNF_RDONLY; if (c->work_dir) free(c->work_dir); c->work_dir = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->work_dir == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__snap_dir) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->snap_dir == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->snap_dir) != 0)) return CNF_RDONLY; if (c->snap_dir) free(c->snap_dir); c->snap_dir = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->snap_dir == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__wal_dir) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->wal_dir == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->wal_dir) != 0)) return CNF_RDONLY; if (c->wal_dir) free(c->wal_dir); c->wal_dir = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->wal_dir == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__script_dir) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->script_dir == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->script_dir) != 0)) return CNF_RDONLY; if (c->script_dir) free(c->script_dir); c->script_dir = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->script_dir == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__pid_file) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->pid_file == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->pid_file) != 0)) return CNF_RDONLY; if (c->pid_file) free(c->pid_file); c->pid_file = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->pid_file == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__logger) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->logger == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->logger) != 0)) return CNF_RDONLY; if (c->logger) free(c->logger); c->logger = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->logger == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__logger_nonblock) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->logger_nonblock != bln) return CNF_RDONLY; c->logger_nonblock = bln; } else if ( cmpNameAtoms( opt->name, _name__io_collect_interval) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; c->io_collect_interval = dbl; } else if ( cmpNameAtoms( opt->name, _name__backlog) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->backlog != i32) return CNF_RDONLY; c->backlog = i32; } else if ( cmpNameAtoms( opt->name, _name__readahead) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; c->readahead = i32; } else if ( cmpNameAtoms( opt->name, _name__snap_io_rate_limit) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; c->snap_io_rate_limit = dbl; } else if ( cmpNameAtoms( opt->name, _name__rows_per_wal) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->rows_per_wal != i32) return CNF_RDONLY; c->rows_per_wal = i32; } else if ( cmpNameAtoms( opt->name, _name__wal_writer_inbox_size) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->wal_writer_inbox_size != i32) return CNF_RDONLY; c->wal_writer_inbox_size = i32; } else if ( cmpNameAtoms( opt->name, _name__wal_mode) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (c->wal_mode) free(c->wal_mode); c->wal_mode = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->wal_mode == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__wal_fsync_delay) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; c->wal_fsync_delay = dbl; } else if ( cmpNameAtoms( opt->name, _name__wal_dir_rescan_delay) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->wal_dir_rescan_delay != dbl) return CNF_RDONLY; c->wal_dir_rescan_delay = dbl; } else if ( cmpNameAtoms( opt->name, _name__panic_on_snap_error) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->panic_on_snap_error != bln) return CNF_RDONLY; c->panic_on_snap_error = bln; } else if ( cmpNameAtoms( opt->name, _name__panic_on_wal_error) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->panic_on_wal_error != bln) return CNF_RDONLY; c->panic_on_wal_error = bln; } else if ( cmpNameAtoms( opt->name, _name__primary_port) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->primary_port != i32) return CNF_RDONLY; c->primary_port = i32; } else if ( cmpNameAtoms( opt->name, _name__secondary_port) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->secondary_port != i32) return CNF_RDONLY; c->secondary_port = i32; } else if ( cmpNameAtoms( opt->name, _name__too_long_threshold) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; c->too_long_threshold = dbl; } else if ( cmpNameAtoms( opt->name, _name__custom_proc_title) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->custom_proc_title == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->custom_proc_title) != 0)) return CNF_RDONLY; if (c->custom_proc_title) free(c->custom_proc_title); c->custom_proc_title = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->custom_proc_title == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__memcached_port) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->memcached_port != i32) return CNF_RDONLY; c->memcached_port = i32; } else if ( cmpNameAtoms( opt->name, _name__memcached_space) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->memcached_space != i32) return CNF_RDONLY; c->memcached_space = i32; } else if ( cmpNameAtoms( opt->name, _name__memcached_expire) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->memcached_expire != bln) return CNF_RDONLY; c->memcached_expire = bln; } else if ( cmpNameAtoms( opt->name, _name__memcached_expire_per_loop) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; c->memcached_expire_per_loop = i32; } else if ( cmpNameAtoms( opt->name, _name__memcached_expire_full_sweep) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; double dbl = strtod(opt->paramValue.scalarval, NULL); if ( (dbl == 0 || dbl == -HUGE_VAL || dbl == HUGE_VAL) && errno == ERANGE) return CNF_WRONGRANGE; c->memcached_expire_full_sweep = dbl; } else if ( cmpNameAtoms( opt->name, _name__replication_source) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; c->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (c->replication_source) free(c->replication_source); c->replication_source = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->replication_source == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__space) ) { if (opt->paramType != arrayType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); } else if ( cmpNameAtoms( opt->name, _name__space__enabled) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->space[opt->name->index]->enabled != bln) return CNF_RDONLY; c->space[opt->name->index]->enabled = bln; } else if ( cmpNameAtoms( opt->name, _name__space__cardinality) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->space[opt->name->index]->cardinality != i32) return CNF_RDONLY; c->space[opt->name->index]->cardinality = i32; } else if ( cmpNameAtoms( opt->name, _name__space__estimated_rows) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->space[opt->name->index]->estimated_rows != i32) return CNF_RDONLY; c->space[opt->name->index]->estimated_rows = i32; } else if ( cmpNameAtoms( opt->name, _name__space__index) ) { if (opt->paramType != arrayType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index, 1, _name__space__index, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); } else if ( cmpNameAtoms( opt->name, _name__space__index__type) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index, opt->name->next->index + 1, _name__space__index, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->space[opt->name->index]->index[opt->name->next->index]->type == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->space[opt->name->index]->index[opt->name->next->index]->type) != 0)) return CNF_RDONLY; if (c->space[opt->name->index]->index[opt->name->next->index]->type) free(c->space[opt->name->index]->index[opt->name->next->index]->type); c->space[opt->name->index]->index[opt->name->next->index]->type = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->space[opt->name->index]->index[opt->name->next->index]->type == NULL) return CNF_NOMEMORY; } else if ( cmpNameAtoms( opt->name, _name__space__index__unique) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index, opt->name->next->index + 1, _name__space__index, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; bool bln; if (strcasecmp(opt->paramValue.scalarval, "true") == 0 || strcasecmp(opt->paramValue.scalarval, "yes") == 0 || strcasecmp(opt->paramValue.scalarval, "enable") == 0 || strcasecmp(opt->paramValue.scalarval, "on") == 0 || strcasecmp(opt->paramValue.scalarval, "1") == 0 ) bln = true; else if (strcasecmp(opt->paramValue.scalarval, "false") == 0 || strcasecmp(opt->paramValue.scalarval, "no") == 0 || strcasecmp(opt->paramValue.scalarval, "disable") == 0 || strcasecmp(opt->paramValue.scalarval, "off") == 0 || strcasecmp(opt->paramValue.scalarval, "0") == 0 ) bln = false; else return CNF_WRONGRANGE; if (check_rdonly && c->space[opt->name->index]->index[opt->name->next->index]->unique != bln) return CNF_RDONLY; c->space[opt->name->index]->index[opt->name->next->index]->unique = bln; } else if ( cmpNameAtoms( opt->name, _name__space__index__key_field) ) { if (opt->paramType != arrayType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index, opt->name->next->index + 1, _name__space__index, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index[opt->name->next->index]->key_field, 1, _name__space__index__key_field, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); } else if ( cmpNameAtoms( opt->name, _name__space__index__key_field__fieldno) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index, opt->name->next->index + 1, _name__space__index, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index[opt->name->next->index]->key_field, opt->name->next->next->index + 1, _name__space__index__key_field, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; long int i32 = strtol(opt->paramValue.scalarval, NULL, 10); if (i32 == 0 && errno == EINVAL) return CNF_WRONGINT; if ( (i32 == LONG_MIN || i32 == LONG_MAX) && errno == ERANGE) return CNF_WRONGRANGE; if (check_rdonly && c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->fieldno != i32) return CNF_RDONLY; c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->fieldno = i32; } else if ( cmpNameAtoms( opt->name, _name__space__index__key_field__type) ) { if (opt->paramType != scalarType ) return CNF_WRONGTYPE; ARRAYALLOC(c->space, opt->name->index + 1, _name__space, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index, opt->name->next->index + 1, _name__space__index, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->index[opt->name->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; ARRAYALLOC(c->space[opt->name->index]->index[opt->name->next->index]->key_field, opt->name->next->next->index + 1, _name__space__index__key_field, check_rdonly, CNF_FLAG_STRUCT_NEW | CNF_FLAG_STRUCT_NOTSET); if (c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->__confetti_flags & CNF_FLAG_STRUCT_NEW) check_rdonly = 0; c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NOTSET; errno = 0; if (check_rdonly && ( (opt->paramValue.scalarval == NULL && c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->type == NULL) || confetti_strcmp(opt->paramValue.scalarval, c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->type) != 0)) return CNF_RDONLY; if (c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->type) free(c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->type); c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->type = (opt->paramValue.scalarval) ? strdup(opt->paramValue.scalarval) : NULL; if (opt->paramValue.scalarval && c->space[opt->name->index]->index[opt->name->next->index]->key_field[opt->name->next->next->index]->type == NULL) return CNF_NOMEMORY; } else { return opt->optional ? CNF_OPTIONAL : CNF_MISSED; } return CNF_OK; } static void cleanFlags(tarantool_cfg* c, OptDef* opt); #define PRINTBUFLEN 8192 static char* dumpOptDef(NameAtom *atom) { static char buf[PRINTBUFLEN], *ptr; int i = 0; ptr = buf; while(atom) { if (i) ptr += snprintf(ptr, PRINTBUFLEN - 1 - (ptr - buf), "."); ptr += snprintf(ptr, PRINTBUFLEN - 1 - (ptr - buf), "%s", atom->name); if (atom->index >= 0) ptr += snprintf(ptr, PRINTBUFLEN - 1 - (ptr - buf), "[%d]", atom->index); i = 1; atom = atom->next; } return buf; } static void acceptCfgDef(tarantool_cfg *c, OptDef *opt, int check_rdonly, int *n_accepted, int *n_skipped, int *n_optional) { ConfettyError r; OptDef *orig_opt = opt; while(opt) { r = acceptValue(c, opt, check_rdonly); switch(r) { case CNF_OK: if (n_accepted) (*n_accepted)++; break; case CNF_OPTIONAL: out_warning(r, "Option '%s' is not supported", dumpOptDef(opt->name)); if (n_optional) (*n_optional)++; break; case CNF_MISSED: out_warning(r, "Could not find '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGTYPE: out_warning(r, "Wrong value type for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGINDEX: out_warning(r, "Wrong array index in '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_RDONLY: out_warning(r, "Could not accept read only '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGINT: out_warning(r, "Could not parse integer value for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_WRONGRANGE: out_warning(r, "Wrong range for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_NOMEMORY: out_warning(r, "Not enough memory to accept '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; case CNF_NOTSET: out_warning(r, "Option '%s' is not set (or has a default value)", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; default: out_warning(r, "Unknown error for '%s' option", dumpOptDef(opt->name)); if (n_skipped) (*n_skipped)++; break; } opt = opt->next; } cleanFlags(c, orig_opt); } int parse_cfg_file_tarantool_cfg(tarantool_cfg *c, FILE *fh, int check_rdonly, int *n_accepted, int *n_skipped, int *n_optional) { int error; OptDef *option = parseCfgDef(fh, &error); if (n_accepted) *n_accepted=0; if (n_skipped) *n_skipped=0; if (n_optional) *n_optional=0; if (option == NULL) return error ? -1 : 0; acceptCfgDef(c, option, check_rdonly, n_accepted, n_skipped, n_optional); freeCfgDef(option); return 0; } int parse_cfg_buffer_tarantool_cfg(tarantool_cfg *c, char *buffer, int check_rdonly, int *n_accepted, int *n_skipped, int *n_optional) { int error; OptDef *option = parseCfgDefBuffer(buffer, &error); if (n_accepted) *n_accepted=0; if (n_skipped) *n_skipped=0; if (n_optional) *n_optional=0; if (option == NULL) return error ? -1 : 0; acceptCfgDef(c, option, check_rdonly, n_accepted, n_skipped, n_optional); freeCfgDef(option); return 0; } /************** Iterator **************/ typedef enum IteratorState { _S_Initial = 0, S_name__username, S_name__local_hot_standby, S_name__bind_ipaddr, S_name__coredump, S_name__admin_port, S_name__replication_port, S_name__log_level, S_name__slab_alloc_arena, S_name__slab_alloc_minimal, S_name__slab_alloc_factor, S_name__work_dir, S_name__snap_dir, S_name__wal_dir, S_name__script_dir, S_name__pid_file, S_name__logger, S_name__logger_nonblock, S_name__io_collect_interval, S_name__backlog, S_name__readahead, S_name__snap_io_rate_limit, S_name__rows_per_wal, S_name__wal_writer_inbox_size, S_name__wal_mode, S_name__wal_fsync_delay, S_name__wal_dir_rescan_delay, S_name__panic_on_snap_error, S_name__panic_on_wal_error, S_name__primary_port, S_name__secondary_port, S_name__too_long_threshold, S_name__custom_proc_title, S_name__memcached_port, S_name__memcached_space, S_name__memcached_expire, S_name__memcached_expire_per_loop, S_name__memcached_expire_full_sweep, S_name__replication_source, S_name__space, S_name__space__enabled, S_name__space__cardinality, S_name__space__estimated_rows, S_name__space__index, S_name__space__index__type, S_name__space__index__unique, S_name__space__index__key_field, S_name__space__index__key_field__fieldno, S_name__space__index__key_field__type, _S_Finished } IteratorState; struct tarantool_cfg_iterator_t { IteratorState state; int idx_name__space; int idx_name__space__index; int idx_name__space__index__key_field; }; tarantool_cfg_iterator_t* tarantool_cfg_iterator_init() { tarantool_cfg_iterator_t *i = malloc(sizeof(*i)); if (i == NULL) return NULL; memset(i, 0, sizeof(*i)); return i; } char* tarantool_cfg_iterator_next(tarantool_cfg_iterator_t* i, tarantool_cfg *c, char **v) { static char buf[PRINTBUFLEN]; *v = NULL; goto again; /* keep compiler quiet */ again: switch(i->state) { case _S_Initial: case S_name__username: *v = (c->username) ? strdup(c->username) : NULL; if (*v == NULL && c->username) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "username"); i->state = S_name__local_hot_standby; return buf; case S_name__local_hot_standby: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->local_hot_standby ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "local_hot_standby"); i->state = S_name__bind_ipaddr; return buf; case S_name__bind_ipaddr: *v = (c->bind_ipaddr) ? strdup(c->bind_ipaddr) : NULL; if (*v == NULL && c->bind_ipaddr) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "bind_ipaddr"); i->state = S_name__coredump; return buf; case S_name__coredump: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->coredump ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "coredump"); i->state = S_name__admin_port; return buf; case S_name__admin_port: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->admin_port); snprintf(buf, PRINTBUFLEN-1, "admin_port"); i->state = S_name__replication_port; return buf; case S_name__replication_port: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->replication_port); snprintf(buf, PRINTBUFLEN-1, "replication_port"); i->state = S_name__log_level; return buf; case S_name__log_level: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->log_level); snprintf(buf, PRINTBUFLEN-1, "log_level"); i->state = S_name__slab_alloc_arena; return buf; case S_name__slab_alloc_arena: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->slab_alloc_arena); snprintf(buf, PRINTBUFLEN-1, "slab_alloc_arena"); i->state = S_name__slab_alloc_minimal; return buf; case S_name__slab_alloc_minimal: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->slab_alloc_minimal); snprintf(buf, PRINTBUFLEN-1, "slab_alloc_minimal"); i->state = S_name__slab_alloc_factor; return buf; case S_name__slab_alloc_factor: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->slab_alloc_factor); snprintf(buf, PRINTBUFLEN-1, "slab_alloc_factor"); i->state = S_name__work_dir; return buf; case S_name__work_dir: *v = (c->work_dir) ? strdup(c->work_dir) : NULL; if (*v == NULL && c->work_dir) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "work_dir"); i->state = S_name__snap_dir; return buf; case S_name__snap_dir: *v = (c->snap_dir) ? strdup(c->snap_dir) : NULL; if (*v == NULL && c->snap_dir) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "snap_dir"); i->state = S_name__wal_dir; return buf; case S_name__wal_dir: *v = (c->wal_dir) ? strdup(c->wal_dir) : NULL; if (*v == NULL && c->wal_dir) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "wal_dir"); i->state = S_name__script_dir; return buf; case S_name__script_dir: *v = (c->script_dir) ? strdup(c->script_dir) : NULL; if (*v == NULL && c->script_dir) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "script_dir"); i->state = S_name__pid_file; return buf; case S_name__pid_file: *v = (c->pid_file) ? strdup(c->pid_file) : NULL; if (*v == NULL && c->pid_file) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "pid_file"); i->state = S_name__logger; return buf; case S_name__logger: *v = (c->logger) ? strdup(c->logger) : NULL; if (*v == NULL && c->logger) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "logger"); i->state = S_name__logger_nonblock; return buf; case S_name__logger_nonblock: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->logger_nonblock ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "logger_nonblock"); i->state = S_name__io_collect_interval; return buf; case S_name__io_collect_interval: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->io_collect_interval); snprintf(buf, PRINTBUFLEN-1, "io_collect_interval"); i->state = S_name__backlog; return buf; case S_name__backlog: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->backlog); snprintf(buf, PRINTBUFLEN-1, "backlog"); i->state = S_name__readahead; return buf; case S_name__readahead: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->readahead); snprintf(buf, PRINTBUFLEN-1, "readahead"); i->state = S_name__snap_io_rate_limit; return buf; case S_name__snap_io_rate_limit: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->snap_io_rate_limit); snprintf(buf, PRINTBUFLEN-1, "snap_io_rate_limit"); i->state = S_name__rows_per_wal; return buf; case S_name__rows_per_wal: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->rows_per_wal); snprintf(buf, PRINTBUFLEN-1, "rows_per_wal"); i->state = S_name__wal_writer_inbox_size; return buf; case S_name__wal_writer_inbox_size: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->wal_writer_inbox_size); snprintf(buf, PRINTBUFLEN-1, "wal_writer_inbox_size"); i->state = S_name__wal_mode; return buf; case S_name__wal_mode: *v = (c->wal_mode) ? strdup(c->wal_mode) : NULL; if (*v == NULL && c->wal_mode) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "wal_mode"); i->state = S_name__wal_fsync_delay; return buf; case S_name__wal_fsync_delay: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->wal_fsync_delay); snprintf(buf, PRINTBUFLEN-1, "wal_fsync_delay"); i->state = S_name__wal_dir_rescan_delay; return buf; case S_name__wal_dir_rescan_delay: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->wal_dir_rescan_delay); snprintf(buf, PRINTBUFLEN-1, "wal_dir_rescan_delay"); i->state = S_name__panic_on_snap_error; return buf; case S_name__panic_on_snap_error: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->panic_on_snap_error ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "panic_on_snap_error"); i->state = S_name__panic_on_wal_error; return buf; case S_name__panic_on_wal_error: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->panic_on_wal_error ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "panic_on_wal_error"); i->state = S_name__primary_port; return buf; case S_name__primary_port: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->primary_port); snprintf(buf, PRINTBUFLEN-1, "primary_port"); i->state = S_name__secondary_port; return buf; case S_name__secondary_port: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->secondary_port); snprintf(buf, PRINTBUFLEN-1, "secondary_port"); i->state = S_name__too_long_threshold; return buf; case S_name__too_long_threshold: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->too_long_threshold); snprintf(buf, PRINTBUFLEN-1, "too_long_threshold"); i->state = S_name__custom_proc_title; return buf; case S_name__custom_proc_title: *v = (c->custom_proc_title) ? strdup(c->custom_proc_title) : NULL; if (*v == NULL && c->custom_proc_title) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "custom_proc_title"); i->state = S_name__memcached_port; return buf; case S_name__memcached_port: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->memcached_port); snprintf(buf, PRINTBUFLEN-1, "memcached_port"); i->state = S_name__memcached_space; return buf; case S_name__memcached_space: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->memcached_space); snprintf(buf, PRINTBUFLEN-1, "memcached_space"); i->state = S_name__memcached_expire; return buf; case S_name__memcached_expire: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->memcached_expire ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "memcached_expire"); i->state = S_name__memcached_expire_per_loop; return buf; case S_name__memcached_expire_per_loop: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->memcached_expire_per_loop); snprintf(buf, PRINTBUFLEN-1, "memcached_expire_per_loop"); i->state = S_name__memcached_expire_full_sweep; return buf; case S_name__memcached_expire_full_sweep: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%g", c->memcached_expire_full_sweep); snprintf(buf, PRINTBUFLEN-1, "memcached_expire_full_sweep"); i->state = S_name__replication_source; return buf; case S_name__replication_source: *v = (c->replication_source) ? strdup(c->replication_source) : NULL; if (*v == NULL && c->replication_source) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "replication_source"); i->state = S_name__space; return buf; case S_name__space: i->state = S_name__space; case S_name__space__enabled: case S_name__space__cardinality: case S_name__space__estimated_rows: case S_name__space__index: case S_name__space__index__type: case S_name__space__index__unique: case S_name__space__index__key_field: case S_name__space__index__key_field__fieldno: case S_name__space__index__key_field__type: if (c->space && c->space[i->idx_name__space]) { switch(i->state) { case S_name__space: case S_name__space__enabled: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->space[i->idx_name__space]->enabled == -1 ? "false" : c->space[i->idx_name__space]->enabled ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "space[%d].enabled", i->idx_name__space); i->state = S_name__space__cardinality; return buf; case S_name__space__cardinality: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->space[i->idx_name__space]->cardinality); snprintf(buf, PRINTBUFLEN-1, "space[%d].cardinality", i->idx_name__space); i->state = S_name__space__estimated_rows; return buf; case S_name__space__estimated_rows: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->space[i->idx_name__space]->estimated_rows); snprintf(buf, PRINTBUFLEN-1, "space[%d].estimated_rows", i->idx_name__space); i->state = S_name__space__index; return buf; case S_name__space__index: i->state = S_name__space__index; case S_name__space__index__type: case S_name__space__index__unique: case S_name__space__index__key_field: case S_name__space__index__key_field__fieldno: case S_name__space__index__key_field__type: if (c->space[i->idx_name__space]->index && c->space[i->idx_name__space]->index[i->idx_name__space__index]) { switch(i->state) { case S_name__space__index: case S_name__space__index__type: *v = (c->space[i->idx_name__space]->index[i->idx_name__space__index]->type) ? strdup(c->space[i->idx_name__space]->index[i->idx_name__space__index]->type) : NULL; if (*v == NULL && c->space[i->idx_name__space]->index[i->idx_name__space__index]->type) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "space[%d].index[%d].type", i->idx_name__space, i->idx_name__space__index); i->state = S_name__space__index__unique; return buf; case S_name__space__index__unique: *v = malloc(8); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%s", c->space[i->idx_name__space]->index[i->idx_name__space__index]->unique == -1 ? "false" : c->space[i->idx_name__space]->index[i->idx_name__space__index]->unique ? "true" : "false"); snprintf(buf, PRINTBUFLEN-1, "space[%d].index[%d].unique", i->idx_name__space, i->idx_name__space__index); i->state = S_name__space__index__key_field; return buf; case S_name__space__index__key_field: i->state = S_name__space__index__key_field; case S_name__space__index__key_field__fieldno: case S_name__space__index__key_field__type: if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field && c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]) { switch(i->state) { case S_name__space__index__key_field: case S_name__space__index__key_field__fieldno: *v = malloc(32); if (*v == NULL) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } sprintf(*v, "%"PRId32, c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->fieldno); snprintf(buf, PRINTBUFLEN-1, "space[%d].index[%d].key_field[%d].fieldno", i->idx_name__space, i->idx_name__space__index, i->idx_name__space__index__key_field); i->state = S_name__space__index__key_field__type; return buf; case S_name__space__index__key_field__type: *v = (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type) ? strdup(c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type) : NULL; if (*v == NULL && c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type) { free(i); out_warning(CNF_NOMEMORY, "No memory to output value"); return NULL; } snprintf(buf, PRINTBUFLEN-1, "space[%d].index[%d].key_field[%d].type", i->idx_name__space, i->idx_name__space__index, i->idx_name__space__index__key_field); i->state = S_name__space__index__key_field; i->idx_name__space__index__key_field++; return buf; default: break; } } else { i->state = S_name__space__index; i->idx_name__space__index++; i->idx_name__space__index__key_field = 0; goto again; } default: break; } } else { i->state = S_name__space; i->idx_name__space++; i->idx_name__space__index = 0; i->idx_name__space__index__key_field = 0; goto again; } default: break; } } case _S_Finished: free(i); break; default: out_warning(CNF_INTERNALERROR, "Unknown state for tarantool_cfg_iterator_t: %d", i->state); free(i); } return NULL; } /************** Checking of required fields **************/ int check_cfg_tarantool_cfg(tarantool_cfg *c) { tarantool_cfg_iterator_t iterator, *i = &iterator; int res = 0; if (c->primary_port == 0) { res++; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__primary_port)); } i->idx_name__space = 0; while (c->space && c->space[i->idx_name__space]) { if (c->space[i->idx_name__space]->__confetti_flags & CNF_FLAG_STRUCT_NOTSET) { (void)0; } else { if (c->space[i->idx_name__space]->enabled == -1) { res++; _name__space__enabled->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__space__enabled)); } if (c->space[i->idx_name__space]->index == NULL) { res++; _name__space__index->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__space__index)); } i->idx_name__space__index = 0; while (c->space[i->idx_name__space]->index && c->space[i->idx_name__space]->index[i->idx_name__space__index]) { if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->__confetti_flags & CNF_FLAG_STRUCT_NOTSET) { res++; _name__space__index->next->index = i->idx_name__space__index; _name__space__index->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set", dumpOptDef(_name__space__index)); } else { if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->type != NULL && strcmp(c->space[i->idx_name__space]->index[i->idx_name__space__index]->type, "") == 0) { res++; _name__space__index__type->next->index = i->idx_name__space__index; _name__space__index__type->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__space__index__type)); } if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->unique == -1) { res++; _name__space__index__unique->next->index = i->idx_name__space__index; _name__space__index__unique->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__space__index__unique)); } if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field == NULL) { res++; _name__space__index__key_field->next->index = i->idx_name__space__index; _name__space__index__key_field->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__space__index__key_field)); } i->idx_name__space__index__key_field = 0; while (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field && c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]) { if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->__confetti_flags & CNF_FLAG_STRUCT_NOTSET) { res++; _name__space__index__key_field->next->next->index = i->idx_name__space__index__key_field; _name__space__index__key_field->next->index = i->idx_name__space__index; _name__space__index__key_field->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set", dumpOptDef(_name__space__index__key_field)); } else { if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->fieldno == -1) { res++; _name__space__index__key_field__fieldno->next->next->index = i->idx_name__space__index__key_field; _name__space__index__key_field__fieldno->next->index = i->idx_name__space__index; _name__space__index__key_field__fieldno->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__space__index__key_field__fieldno)); } if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type != NULL && strcmp(c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type, "") == 0) { res++; _name__space__index__key_field__type->next->next->index = i->idx_name__space__index__key_field; _name__space__index__key_field__type->next->index = i->idx_name__space__index; _name__space__index__key_field__type->index = i->idx_name__space; out_warning(CNF_NOTSET, "Option '%s' is not set (or has a default value)", dumpOptDef(_name__space__index__key_field__type)); } } i->idx_name__space__index__key_field++; } } i->idx_name__space__index++; } } i->idx_name__space++; } return res; } static void cleanFlags(tarantool_cfg* c, OptDef* opt) { tarantool_cfg_iterator_t iterator, *i = &iterator; if (c->space != NULL) { i->idx_name__space = 0; while (c->space[i->idx_name__space] != NULL) { c->space[i->idx_name__space]->__confetti_flags &= ~CNF_FLAG_STRUCT_NEW; if (c->space[i->idx_name__space]->index != NULL) { i->idx_name__space__index = 0; while (c->space[i->idx_name__space]->index[i->idx_name__space__index] != NULL) { c->space[i->idx_name__space]->index[i->idx_name__space__index]->__confetti_flags &= ~CNF_FLAG_STRUCT_NEW; if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field != NULL) { i->idx_name__space__index__key_field = 0; while (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field] != NULL) { c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->__confetti_flags &= ~CNF_FLAG_STRUCT_NEW; i->idx_name__space__index__key_field++; } } i->idx_name__space__index++; } } i->idx_name__space++; } } } /************** Duplicate config **************/ int dup_tarantool_cfg(tarantool_cfg* dst, tarantool_cfg* src) { tarantool_cfg_iterator_t iterator, *i = &iterator; if (dst->username) free(dst->username);dst->username = src->username == NULL ? NULL : strdup(src->username); if (src->username != NULL && dst->username == NULL) return CNF_NOMEMORY; dst->local_hot_standby = src->local_hot_standby; if (dst->bind_ipaddr) free(dst->bind_ipaddr);dst->bind_ipaddr = src->bind_ipaddr == NULL ? NULL : strdup(src->bind_ipaddr); if (src->bind_ipaddr != NULL && dst->bind_ipaddr == NULL) return CNF_NOMEMORY; dst->coredump = src->coredump; dst->admin_port = src->admin_port; dst->replication_port = src->replication_port; dst->log_level = src->log_level; dst->slab_alloc_arena = src->slab_alloc_arena; dst->slab_alloc_minimal = src->slab_alloc_minimal; dst->slab_alloc_factor = src->slab_alloc_factor; if (dst->work_dir) free(dst->work_dir);dst->work_dir = src->work_dir == NULL ? NULL : strdup(src->work_dir); if (src->work_dir != NULL && dst->work_dir == NULL) return CNF_NOMEMORY; if (dst->snap_dir) free(dst->snap_dir);dst->snap_dir = src->snap_dir == NULL ? NULL : strdup(src->snap_dir); if (src->snap_dir != NULL && dst->snap_dir == NULL) return CNF_NOMEMORY; if (dst->wal_dir) free(dst->wal_dir);dst->wal_dir = src->wal_dir == NULL ? NULL : strdup(src->wal_dir); if (src->wal_dir != NULL && dst->wal_dir == NULL) return CNF_NOMEMORY; if (dst->script_dir) free(dst->script_dir);dst->script_dir = src->script_dir == NULL ? NULL : strdup(src->script_dir); if (src->script_dir != NULL && dst->script_dir == NULL) return CNF_NOMEMORY; if (dst->pid_file) free(dst->pid_file);dst->pid_file = src->pid_file == NULL ? NULL : strdup(src->pid_file); if (src->pid_file != NULL && dst->pid_file == NULL) return CNF_NOMEMORY; if (dst->logger) free(dst->logger);dst->logger = src->logger == NULL ? NULL : strdup(src->logger); if (src->logger != NULL && dst->logger == NULL) return CNF_NOMEMORY; dst->logger_nonblock = src->logger_nonblock; dst->io_collect_interval = src->io_collect_interval; dst->backlog = src->backlog; dst->readahead = src->readahead; dst->snap_io_rate_limit = src->snap_io_rate_limit; dst->rows_per_wal = src->rows_per_wal; dst->wal_writer_inbox_size = src->wal_writer_inbox_size; if (dst->wal_mode) free(dst->wal_mode);dst->wal_mode = src->wal_mode == NULL ? NULL : strdup(src->wal_mode); if (src->wal_mode != NULL && dst->wal_mode == NULL) return CNF_NOMEMORY; dst->wal_fsync_delay = src->wal_fsync_delay; dst->wal_dir_rescan_delay = src->wal_dir_rescan_delay; dst->panic_on_snap_error = src->panic_on_snap_error; dst->panic_on_wal_error = src->panic_on_wal_error; dst->primary_port = src->primary_port; dst->secondary_port = src->secondary_port; dst->too_long_threshold = src->too_long_threshold; if (dst->custom_proc_title) free(dst->custom_proc_title);dst->custom_proc_title = src->custom_proc_title == NULL ? NULL : strdup(src->custom_proc_title); if (src->custom_proc_title != NULL && dst->custom_proc_title == NULL) return CNF_NOMEMORY; dst->memcached_port = src->memcached_port; dst->memcached_space = src->memcached_space; dst->memcached_expire = src->memcached_expire; dst->memcached_expire_per_loop = src->memcached_expire_per_loop; dst->memcached_expire_full_sweep = src->memcached_expire_full_sweep; if (dst->replication_source) free(dst->replication_source);dst->replication_source = src->replication_source == NULL ? NULL : strdup(src->replication_source); if (src->replication_source != NULL && dst->replication_source == NULL) return CNF_NOMEMORY; dst->space = NULL; if (src->space != NULL) { i->idx_name__space = 0; ARRAYALLOC(dst->space, 1, _name__space, 0, 0); while (src->space[i->idx_name__space] != NULL) { ARRAYALLOC(dst->space, i->idx_name__space + 1, _name__space, 0, 0); dst->space[i->idx_name__space]->__confetti_flags = src->space[i->idx_name__space]->__confetti_flags; dst->space[i->idx_name__space]->enabled = src->space[i->idx_name__space]->enabled; dst->space[i->idx_name__space]->cardinality = src->space[i->idx_name__space]->cardinality; dst->space[i->idx_name__space]->estimated_rows = src->space[i->idx_name__space]->estimated_rows; dst->space[i->idx_name__space]->index = NULL; if (src->space[i->idx_name__space]->index != NULL) { i->idx_name__space__index = 0; ARRAYALLOC(dst->space[i->idx_name__space]->index, 1, _name__space__index, 0, 0); while (src->space[i->idx_name__space]->index[i->idx_name__space__index] != NULL) { ARRAYALLOC(dst->space[i->idx_name__space]->index, i->idx_name__space__index + 1, _name__space__index, 0, 0); dst->space[i->idx_name__space]->index[i->idx_name__space__index]->__confetti_flags = src->space[i->idx_name__space]->index[i->idx_name__space__index]->__confetti_flags; if (dst->space[i->idx_name__space]->index[i->idx_name__space__index]->type) free(dst->space[i->idx_name__space]->index[i->idx_name__space__index]->type);dst->space[i->idx_name__space]->index[i->idx_name__space__index]->type = src->space[i->idx_name__space]->index[i->idx_name__space__index]->type == NULL ? NULL : strdup(src->space[i->idx_name__space]->index[i->idx_name__space__index]->type); if (src->space[i->idx_name__space]->index[i->idx_name__space__index]->type != NULL && dst->space[i->idx_name__space]->index[i->idx_name__space__index]->type == NULL) return CNF_NOMEMORY; dst->space[i->idx_name__space]->index[i->idx_name__space__index]->unique = src->space[i->idx_name__space]->index[i->idx_name__space__index]->unique; dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field = NULL; if (src->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field != NULL) { i->idx_name__space__index__key_field = 0; ARRAYALLOC(dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field, 1, _name__space__index__key_field, 0, 0); while (src->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field] != NULL) { ARRAYALLOC(dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field, i->idx_name__space__index__key_field + 1, _name__space__index__key_field, 0, 0); dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->__confetti_flags = src->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->__confetti_flags; dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->fieldno = src->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->fieldno; if (dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type) free(dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type);dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type = src->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type == NULL ? NULL : strdup(src->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type); if (src->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type != NULL && dst->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type == NULL) return CNF_NOMEMORY; i->idx_name__space__index__key_field++; } } i->idx_name__space__index++; } } i->idx_name__space++; } } return CNF_OK; } /************** Destroy config **************/ void destroy_tarantool_cfg(tarantool_cfg* c) { tarantool_cfg_iterator_t iterator, *i = &iterator; if (c->username != NULL) free(c->username); if (c->bind_ipaddr != NULL) free(c->bind_ipaddr); if (c->work_dir != NULL) free(c->work_dir); if (c->snap_dir != NULL) free(c->snap_dir); if (c->wal_dir != NULL) free(c->wal_dir); if (c->script_dir != NULL) free(c->script_dir); if (c->pid_file != NULL) free(c->pid_file); if (c->logger != NULL) free(c->logger); if (c->wal_mode != NULL) free(c->wal_mode); if (c->custom_proc_title != NULL) free(c->custom_proc_title); if (c->replication_source != NULL) free(c->replication_source); if (c->space != NULL) { i->idx_name__space = 0; while (c->space[i->idx_name__space] != NULL) { if (c->space[i->idx_name__space]->index != NULL) { i->idx_name__space__index = 0; while (c->space[i->idx_name__space]->index[i->idx_name__space__index] != NULL) { if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->type != NULL) free(c->space[i->idx_name__space]->index[i->idx_name__space__index]->type); if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field != NULL) { i->idx_name__space__index__key_field = 0; while (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field] != NULL) { if (c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type != NULL) free(c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]->type); free(c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field[i->idx_name__space__index__key_field]); i->idx_name__space__index__key_field++; } free(c->space[i->idx_name__space]->index[i->idx_name__space__index]->key_field); } free(c->space[i->idx_name__space]->index[i->idx_name__space__index]); i->idx_name__space__index++; } free(c->space[i->idx_name__space]->index); } free(c->space[i->idx_name__space]); i->idx_name__space++; } free(c->space); } } /************** Compare config **************/ int confetti_strcmp(char *s1, char *s2) { if (s1 == NULL || s2 == NULL) { if (s1 != s2) return s1 == NULL ? -1 : 1; else return 0; } return strcmp(s1, s2); } char * cmp_tarantool_cfg(tarantool_cfg* c1, tarantool_cfg* c2, int only_check_rdonly) { tarantool_cfg_iterator_t iterator1, iterator2, *i1 = &iterator1, *i2 = &iterator2; static char diff[PRINTBUFLEN]; if (confetti_strcmp(c1->username, c2->username) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->username"); return diff; } if (c1->local_hot_standby != c2->local_hot_standby) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->local_hot_standby"); return diff; } if (confetti_strcmp(c1->bind_ipaddr, c2->bind_ipaddr) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->bind_ipaddr"); return diff; } if (c1->coredump != c2->coredump) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->coredump"); return diff; } if (c1->admin_port != c2->admin_port) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->admin_port"); return diff; } if (c1->replication_port != c2->replication_port) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->replication_port"); return diff; } if (!only_check_rdonly) { if (c1->log_level != c2->log_level) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->log_level"); return diff; } } if (c1->slab_alloc_arena != c2->slab_alloc_arena) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->slab_alloc_arena"); return diff; } if (c1->slab_alloc_minimal != c2->slab_alloc_minimal) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->slab_alloc_minimal"); return diff; } if (c1->slab_alloc_factor != c2->slab_alloc_factor) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->slab_alloc_factor"); return diff; } if (confetti_strcmp(c1->work_dir, c2->work_dir) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->work_dir"); return diff; } if (confetti_strcmp(c1->snap_dir, c2->snap_dir) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->snap_dir"); return diff; } if (confetti_strcmp(c1->wal_dir, c2->wal_dir) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->wal_dir"); return diff; } if (confetti_strcmp(c1->script_dir, c2->script_dir) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->script_dir"); return diff; } if (confetti_strcmp(c1->pid_file, c2->pid_file) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->pid_file"); return diff; } if (confetti_strcmp(c1->logger, c2->logger) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->logger"); return diff; } if (c1->logger_nonblock != c2->logger_nonblock) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->logger_nonblock"); return diff; } if (!only_check_rdonly) { if (c1->io_collect_interval != c2->io_collect_interval) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->io_collect_interval"); return diff; } } if (c1->backlog != c2->backlog) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->backlog"); return diff; } if (!only_check_rdonly) { if (c1->readahead != c2->readahead) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->readahead"); return diff; } } if (!only_check_rdonly) { if (c1->snap_io_rate_limit != c2->snap_io_rate_limit) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->snap_io_rate_limit"); return diff; } } if (c1->rows_per_wal != c2->rows_per_wal) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->rows_per_wal"); return diff; } if (c1->wal_writer_inbox_size != c2->wal_writer_inbox_size) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->wal_writer_inbox_size"); return diff; } if (!only_check_rdonly) { if (confetti_strcmp(c1->wal_mode, c2->wal_mode) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->wal_mode"); return diff; } } if (!only_check_rdonly) { if (c1->wal_fsync_delay != c2->wal_fsync_delay) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->wal_fsync_delay"); return diff; } } if (c1->wal_dir_rescan_delay != c2->wal_dir_rescan_delay) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->wal_dir_rescan_delay"); return diff; } if (c1->panic_on_snap_error != c2->panic_on_snap_error) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->panic_on_snap_error"); return diff; } if (c1->panic_on_wal_error != c2->panic_on_wal_error) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->panic_on_wal_error"); return diff; } if (c1->primary_port != c2->primary_port) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->primary_port"); return diff; } if (c1->secondary_port != c2->secondary_port) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->secondary_port"); return diff; } if (!only_check_rdonly) { if (c1->too_long_threshold != c2->too_long_threshold) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->too_long_threshold"); return diff; } } if (confetti_strcmp(c1->custom_proc_title, c2->custom_proc_title) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->custom_proc_title"); return diff; } if (c1->memcached_port != c2->memcached_port) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->memcached_port"); return diff; } if (c1->memcached_space != c2->memcached_space) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->memcached_space"); return diff; } if (c1->memcached_expire != c2->memcached_expire) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->memcached_expire"); return diff; } if (!only_check_rdonly) { if (c1->memcached_expire_per_loop != c2->memcached_expire_per_loop) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->memcached_expire_per_loop"); return diff; } } if (!only_check_rdonly) { if (c1->memcached_expire_full_sweep != c2->memcached_expire_full_sweep) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->memcached_expire_full_sweep"); return diff; } } if (!only_check_rdonly) { if (confetti_strcmp(c1->replication_source, c2->replication_source) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->replication_source"); return diff; } } i1->idx_name__space = 0; i2->idx_name__space = 0; while (c1->space != NULL && c1->space[i1->idx_name__space] != NULL && c2->space != NULL && c2->space[i2->idx_name__space] != NULL) { if (c1->space[i1->idx_name__space]->enabled != c2->space[i2->idx_name__space]->enabled) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->enabled"); return diff; } if (c1->space[i1->idx_name__space]->cardinality != c2->space[i2->idx_name__space]->cardinality) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->cardinality"); return diff; } if (c1->space[i1->idx_name__space]->estimated_rows != c2->space[i2->idx_name__space]->estimated_rows) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->estimated_rows"); return diff; } i1->idx_name__space__index = 0; i2->idx_name__space__index = 0; while (c1->space[i1->idx_name__space]->index != NULL && c1->space[i1->idx_name__space]->index[i1->idx_name__space__index] != NULL && c2->space[i2->idx_name__space]->index != NULL && c2->space[i2->idx_name__space]->index[i2->idx_name__space__index] != NULL) { if (confetti_strcmp(c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->type, c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->type) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->index[]->type"); return diff; } if (c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->unique != c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->unique) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->index[]->unique"); return diff; } i1->idx_name__space__index__key_field = 0; i2->idx_name__space__index__key_field = 0; while (c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field != NULL && c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field[i1->idx_name__space__index__key_field] != NULL && c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->key_field != NULL && c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->key_field[i2->idx_name__space__index__key_field] != NULL) { if (c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field[i1->idx_name__space__index__key_field]->fieldno != c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->key_field[i2->idx_name__space__index__key_field]->fieldno) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->index[]->key_field[]->fieldno"); return diff; } if (confetti_strcmp(c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field[i1->idx_name__space__index__key_field]->type, c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->key_field[i2->idx_name__space__index__key_field]->type) != 0) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->index[]->key_field[]->type"); return diff; } i1->idx_name__space__index__key_field++; i2->idx_name__space__index__key_field++; } if (!(c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field == c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->key_field && c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field == NULL) && (c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field == NULL || c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->key_field == NULL || c1->space[i1->idx_name__space]->index[i1->idx_name__space__index]->key_field[i1->idx_name__space__index__key_field] != NULL || c2->space[i2->idx_name__space]->index[i2->idx_name__space__index]->key_field[i2->idx_name__space__index__key_field] != NULL)) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->index[]->key_field[]"); return diff; } i1->idx_name__space__index++; i2->idx_name__space__index++; } if (!(c1->space[i1->idx_name__space]->index == c2->space[i2->idx_name__space]->index && c1->space[i1->idx_name__space]->index == NULL) && (c1->space[i1->idx_name__space]->index == NULL || c2->space[i2->idx_name__space]->index == NULL || c1->space[i1->idx_name__space]->index[i1->idx_name__space__index] != NULL || c2->space[i2->idx_name__space]->index[i2->idx_name__space__index] != NULL)) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]->index[]"); return diff; } i1->idx_name__space++; i2->idx_name__space++; } if (!(c1->space == c2->space && c1->space == NULL) && (c1->space == NULL || c2->space == NULL || c1->space[i1->idx_name__space] != NULL || c2->space[i2->idx_name__space] != NULL)) { snprintf(diff, PRINTBUFLEN - 1, "%s", "c->space[]"); return diff; } return 0; } tarantool-1.5.1.218.g1a69fd6/cfg/prscfg.c0000664000000000000000000037454612232453114016167 0ustar rootroot #include "cfg/warning.h" #include typedef struct prscfg_yy_extra_type { char *strbuf; int length; int total; int lineno; int commentCounter; int ostate; } prscfg_yy_extra_type; typedef void *prscfg_yyscan_t; static prscfg_yyscan_t prscfgScannerInit(FILE *fh, prscfg_yy_extra_type *yyext); static prscfg_yyscan_t prscfgScannerInitBuffer(char *buffer, prscfg_yy_extra_type *yyext); static void prscfgScannerFinish(prscfg_yyscan_t scanner); static void prscfgScannerStartValue(prscfg_yyscan_t scanner); static void prscfgScannerEndValue(prscfg_yyscan_t scanner); static int prscfgGetLineNo(prscfg_yyscan_t yyscanner); /* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { OPT_P = 258, KEY_P = 259, INDEX_P = 260, NULL_P = 261, STRING_P = 262 }; #endif /* Tokens. */ #define OPT_P 258 #define KEY_P 259 #define INDEX_P 260 #define NULL_P 261 #define STRING_P 262 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 2068 of yacc.c */ #line 100 "prscfg.y" char *str; OptDef *node; NameAtom *atom; int flag; /* Line 2068 of yacc.c */ #line 73 "y.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse prscfg_yyparse #define yylex prscfg_yylex #define yyerror prscfg_yyerror #define yylval prscfg_yylval #define yychar prscfg_yychar #define yydebug prscfg_yydebug #define yynerrs prscfg_yynerrs /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 1 "prscfg.y" #undef yylval #undef yylloc #include #include #include #include #include #include static int prscfg_yyerror(prscfg_yyscan_t yyscanner, const char *msg); extern int prscfg_yylex (YYSTYPE * yylval_param, prscfg_yyscan_t yyscanner); static NameAtom* prependName(NameAtom *prep, NameAtom *name); static void freeName(NameAtom *atom); static OptDef *output; #define MakeAtom(r, n) do { \ (r) = malloc(sizeof(NameAtom)); \ if (!(r)) { \ prscfg_yyerror(yyscanner, "No memory"); \ YYERROR; \ } \ (r)->name = (n); \ (r)->index = -1; \ (r)->next = NULL; \ } while(0) #define MakeScalarParam(r, t, n, v, p) do { \ (r) = malloc(sizeof(OptDef)); \ if (!(r)) { \ prscfg_yyerror(yyscanner, "No memory"); \ YYERROR; \ } \ (r)->paramType = t##Type; \ (r)->optional = p; \ (r)->paramValue.t##val = (v); \ (r)->name = (n); \ (r)->parent = NULL; \ (r)->next = NULL; \ } while(0) #define MakeList(r, f, l) \ if (f) { \ (f)->next = (l); \ (r) = (f); \ } else { \ (r) = (l); \ } #define ConcatList(r, f, l) \ if (f) { \ (r) = (f); \ while ((f)->next) \ (f) = (f)->next; \ (f)->next = (l); \ } else { \ (r) = (l); \ } #define SetParent(p, l) do { \ OptDef *i = (l); \ while(i) { \ i->parent = (p); \ i = i->next; \ } \ } while(0) #define SetIndex(l, in) do { \ OptDef *i = (l); \ while(i) { \ i->name->index = (in); \ i = i->next; \ } \ } while(0) #define SetSection(out, in, sec) do { \ OptDef *opt; \ opt = (out) = (in); \ \ while(opt) { \ opt->name = prependName((sec), opt->name); \ \ opt = opt->next; \ } \ freeName(sec); \ } while(0) /* Line 268 of yacc.c */ #line 171 "y.tab.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 1 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { OPT_P = 258, KEY_P = 259, INDEX_P = 260, NULL_P = 261, STRING_P = 262 }; #endif /* Tokens. */ #define OPT_P 258 #define KEY_P 259 #define INDEX_P 260 #define NULL_P 261 #define STRING_P 262 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 293 of yacc.c */ #line 100 "prscfg.y" char *str; OptDef *node; NameAtom *atom; int flag; /* Line 293 of yacc.c */ #line 230 "y.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 343 of yacc.c */ #line 242 "y.tab.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 8 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 50 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 15 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 18 /* YYNRULES -- Number of rules. */ #define YYNRULES 32 /* YYNRULES -- Number of states. */ #define YYNSTATES 56 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 262 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 2, 9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 2, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 7, 10, 11, 13, 18, 23, 25, 29, 30, 36, 41, 43, 45, 48, 53, 55, 60, 65, 72, 75, 78, 79, 83, 87, 92, 94, 95, 97, 99 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 16, 0, -1, 17, -1, 18, -1, 17, 19, -1, -1, 20, -1, 8, 26, 9, 18, -1, 8, 27, 9, 18, -1, 21, -1, 20, 32, 21, -1, -1, 31, 26, 10, 22, 23, -1, 31, 27, 10, 24, -1, 6, -1, 7, -1, 8, 9, -1, 8, 25, 32, 9, -1, 24, -1, 11, 20, 32, 12, -1, 11, 20, 32, 12, -1, 25, 32, 11, 20, 32, 12, -1, 28, 30, -1, 28, 29, -1, -1, 28, 30, 13, -1, 28, 29, 13, -1, 30, 8, 5, 9, -1, 4, -1, -1, 3, -1, 14, -1, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 117, 117, 121, 122, 126, 127, 131, 132, 136, 137, 141, 141, 144, 148, 149, 150, 151, 152, 156, 160, 171, 186, 190, 194, 195, 196, 200, 209, 213, 214, 218, 219 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "OPT_P", "KEY_P", "INDEX_P", "NULL_P", "STRING_P", "'['", "']'", "'='", "'{'", "'}'", "'.'", "','", "$accept", "cfg", "section_list", "section", "named_section", "param_list", "param", "$@1", "value", "evalue", "struct_list", "qname", "qelem", "qualifier", "elem", "name", "opt", "comma_opt", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 91, 93, 61, 123, 125, 46, 44 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 22, 21, 21, 23, 23, 23, 23, 23, 24, 25, 25, 26, 27, 28, 28, 28, 29, 30, 31, 31, 32, 32 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 2, 0, 1, 4, 4, 1, 3, 0, 5, 4, 1, 1, 2, 4, 1, 4, 4, 6, 2, 2, 0, 3, 3, 4, 1, 0, 1, 1, 0 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 5, 30, 0, 2, 3, 6, 9, 24, 1, 24, 4, 31, 29, 0, 0, 0, 0, 0, 10, 11, 0, 28, 23, 22, 5, 5, 0, 29, 13, 26, 0, 25, 7, 8, 14, 15, 0, 12, 18, 32, 0, 16, 29, 32, 29, 27, 32, 0, 19, 29, 17, 29, 20, 32, 29, 21 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 2, 3, 4, 10, 5, 6, 26, 37, 28, 43, 13, 14, 15, 22, 23, 7, 12 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -37 static const yytype_int8 yypact[] = { 30, -37, 14, -2, -37, 1, -37, -37, -37, -37, -37, -37, 27, 25, 26, 34, 31, 32, -37, -37, 28, -37, 33, 0, 30, 30, 16, 27, -37, -37, 38, -37, -37, -37, -37, -37, 17, -37, -37, 35, 36, -37, 27, 35, -1, -37, 35, 20, -37, 6, -37, 27, -37, 35, 9, -37 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -37, -37, -37, -5, -37, -26, -12, -37, -37, 18, -37, 39, 41, -37, -37, -37, -37, -36 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -33 static const yytype_int8 yytable[] = { 18, 39, 1, 44, -32, -32, 9, 47, 30, 1, 49, 48, 1, 31, 8, 11, 46, 54, 52, 32, 33, 55, 34, 35, 36, 53, 41, 27, 42, 50, 1, 51, 18, 1, -29, 19, 20, 18, 21, 27, 24, 25, 18, 40, 38, 45, 29, 0, 16, 11, 17 }; #define yypact_value_is_default(yystate) \ ((yystate) == (-37)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = { 12, 27, 3, 39, 3, 4, 8, 43, 8, 3, 46, 12, 3, 13, 0, 14, 42, 53, 12, 24, 25, 12, 6, 7, 8, 51, 9, 11, 11, 9, 3, 11, 44, 3, 4, 10, 10, 49, 4, 11, 9, 9, 54, 5, 26, 9, 13, -1, 9, 14, 9 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 16, 17, 18, 20, 21, 31, 0, 8, 19, 14, 32, 26, 27, 28, 26, 27, 21, 10, 10, 4, 29, 30, 9, 9, 22, 11, 24, 13, 8, 13, 18, 18, 6, 7, 8, 23, 24, 20, 5, 9, 11, 25, 32, 9, 20, 32, 12, 32, 9, 11, 12, 20, 32, 12 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (yyscanner, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval, yyscanner) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, yyscanner); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, prscfg_yyscan_t yyscanner) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; prscfg_yyscan_t yyscanner; #endif { if (!yyvaluep) return; YYUSE (yyscanner); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, prscfg_yyscan_t yyscanner) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep, yyscanner) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; prscfg_yyscan_t yyscanner; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule, prscfg_yyscan_t yyscanner) #else static void yy_reduce_print (yyvsp, yyrule, yyscanner) YYSTYPE *yyvsp; int yyrule; prscfg_yyscan_t yyscanner; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , yyscanner); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule, yyscanner); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, prscfg_yyscan_t yyscanner) #else static void yydestruct (yymsg, yytype, yyvaluep, yyscanner) const char *yymsg; int yytype; YYSTYPE *yyvaluep; prscfg_yyscan_t yyscanner; #endif { YYUSE (yyvaluep); YYUSE (yyscanner); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (prscfg_yyscan_t yyscanner); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (prscfg_yyscan_t yyscanner) #else int yyparse (yyscanner) prscfg_yyscan_t yyscanner; #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1806 of yacc.c */ #line 117 "prscfg.y" { output = (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 3: /* Line 1806 of yacc.c */ #line 121 "prscfg.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 4: /* Line 1806 of yacc.c */ #line 122 "prscfg.y" { MakeList((yyval.node), (yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].node)); } break; case 5: /* Line 1806 of yacc.c */ #line 126 "prscfg.y" { (yyval.node) = NULL; } break; case 6: /* Line 1806 of yacc.c */ #line 127 "prscfg.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 7: /* Line 1806 of yacc.c */ #line 131 "prscfg.y" { SetSection((yyval.node), (yyvsp[(4) - (4)].node), (yyvsp[(2) - (4)].atom)); } break; case 8: /* Line 1806 of yacc.c */ #line 132 "prscfg.y" { SetSection((yyval.node), (yyvsp[(4) - (4)].node), (yyvsp[(2) - (4)].atom)); } break; case 9: /* Line 1806 of yacc.c */ #line 136 "prscfg.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 10: /* Line 1806 of yacc.c */ #line 137 "prscfg.y" { MakeList((yyval.node), (yyvsp[(3) - (3)].node), (yyvsp[(1) - (3)].node)); /* plainOptDef will revert the list */ } break; case 11: /* Line 1806 of yacc.c */ #line 141 "prscfg.y" { prscfgScannerStartValue(yyscanner); } break; case 12: /* Line 1806 of yacc.c */ #line 142 "prscfg.y" { prscfgScannerEndValue(yyscanner); (yyvsp[(5) - (5)].node)->name = (yyvsp[(2) - (5)].atom); (yyvsp[(5) - (5)].node)->optional = (yyvsp[(1) - (5)].flag); (yyval.node) = (yyvsp[(5) - (5)].node); } break; case 13: /* Line 1806 of yacc.c */ #line 144 "prscfg.y" { (yyvsp[(4) - (4)].node)->name = (yyvsp[(2) - (4)].atom); (yyvsp[(4) - (4)].node)->optional = (yyvsp[(1) - (4)].flag); (yyval.node) = (yyvsp[(4) - (4)].node); } break; case 14: /* Line 1806 of yacc.c */ #line 148 "prscfg.y" { MakeScalarParam((yyval.node), scalar, NULL, NULL, 0); free((yyvsp[(1) - (1)].str)); } break; case 15: /* Line 1806 of yacc.c */ #line 149 "prscfg.y" { MakeScalarParam((yyval.node), scalar, NULL, (yyvsp[(1) - (1)].str), 0); } break; case 16: /* Line 1806 of yacc.c */ #line 150 "prscfg.y" { MakeScalarParam((yyval.node), array, NULL, NULL, 0); } break; case 17: /* Line 1806 of yacc.c */ #line 151 "prscfg.y" { (yyval.node) = (yyvsp[(2) - (4)].node); } break; case 18: /* Line 1806 of yacc.c */ #line 152 "prscfg.y" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 19: /* Line 1806 of yacc.c */ #line 156 "prscfg.y" { MakeScalarParam((yyval.node), struct, NULL, (yyvsp[(2) - (4)].node), 0); SetParent( (yyval.node), (yyvsp[(2) - (4)].node) ); } break; case 20: /* Line 1806 of yacc.c */ #line 160 "prscfg.y" { OptDef *str; NameAtom *idx; MakeAtom(idx, NULL); MakeScalarParam(str, struct, idx, (yyvsp[(2) - (4)].node), 0); SetParent( str, (yyvsp[(2) - (4)].node) ); SetIndex( str, 0 ); MakeScalarParam((yyval.node), array, NULL, str, 0); SetParent( (yyval.node), str ); } break; case 21: /* Line 1806 of yacc.c */ #line 171 "prscfg.y" { OptDef *str; NameAtom *idx; MakeAtom(idx, NULL); MakeScalarParam(str, struct, idx, (yyvsp[(4) - (6)].node), 0); SetParent(str, (yyvsp[(4) - (6)].node)); SetIndex(str, (yyvsp[(1) - (6)].node)->paramValue.arrayval->name->index + 1); MakeList((yyvsp[(1) - (6)].node)->paramValue.arrayval, str, (yyvsp[(1) - (6)].node)->paramValue.arrayval); SetParent((yyvsp[(1) - (6)].node), str); (yyval.node) = (yyvsp[(1) - (6)].node); } break; case 22: /* Line 1806 of yacc.c */ #line 186 "prscfg.y" { ConcatList((yyval.atom), (yyvsp[(1) - (2)].atom), (yyvsp[(2) - (2)].atom)); } break; case 23: /* Line 1806 of yacc.c */ #line 190 "prscfg.y" { ConcatList((yyval.atom), (yyvsp[(1) - (2)].atom), (yyvsp[(2) - (2)].atom)); } break; case 24: /* Line 1806 of yacc.c */ #line 194 "prscfg.y" { (yyval.atom) = NULL; } break; case 25: /* Line 1806 of yacc.c */ #line 195 "prscfg.y" { ConcatList((yyval.atom), (yyvsp[(1) - (3)].atom), (yyvsp[(2) - (3)].atom)); } break; case 26: /* Line 1806 of yacc.c */ #line 196 "prscfg.y" { ConcatList((yyval.atom), (yyvsp[(1) - (3)].atom), (yyvsp[(2) - (3)].atom)); } break; case 27: /* Line 1806 of yacc.c */ #line 200 "prscfg.y" { (yyval.atom) = (yyvsp[(1) - (4)].atom); (yyval.atom)->index = atoi((yyvsp[(3) - (4)].str)); /* XXX check !*/ free((yyvsp[(3) - (4)].str)); } break; case 28: /* Line 1806 of yacc.c */ #line 209 "prscfg.y" { MakeAtom((yyval.atom), (yyvsp[(1) - (1)].str)); } break; case 29: /* Line 1806 of yacc.c */ #line 213 "prscfg.y" { (yyval.flag) = 0; } break; case 30: /* Line 1806 of yacc.c */ #line 214 "prscfg.y" { (yyval.flag) = 1; free((yyvsp[(1) - (1)].str)); } break; case 31: /* Line 1806 of yacc.c */ #line 218 "prscfg.y" { (yyval.str)=NULL; } break; case 32: /* Line 1806 of yacc.c */ #line 219 "prscfg.y" { (yyval.str)=NULL; } break; /* Line 1806 of yacc.c */ #line 1753 "y.tab.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (yyscanner, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yyscanner, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, yyscanner); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp, yyscanner); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (yyscanner, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, yyscanner); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, yyscanner); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2067 of yacc.c */ #line 222 "prscfg.y" static int prscfg_yyerror(prscfg_yyscan_t yyscanner, const char *msg) { out_warning(CNF_SYNTAXERROR, "gram_yyerror: %s at line %d", msg, prscfgGetLineNo(yyscanner)); return 0; } static NameAtom* cloneName(NameAtom *list, NameAtom **end) { NameAtom *newList = NULL, *ptr, *endptr = NULL; while(list) { ptr = *end = malloc(sizeof(*ptr)); if (!ptr) { out_warning(CNF_NOMEMORY, "No memory"); return NULL; } *ptr = *list; if (ptr->name) { ptr->name = strdup(ptr->name); if (!ptr->name) { out_warning(CNF_NOMEMORY, "No memory"); free(ptr); return NULL; } } if (newList) { endptr->next = ptr; endptr = ptr; } else { newList = endptr = ptr; } list = list->next; } return newList; } static NameAtom* prependName(NameAtom *prep, NameAtom *name) { NameAtom *b, *e; b = cloneName(prep, &e); if (!b) { out_warning(CNF_NOMEMORY, "No memory"); return NULL; } e->next = name; return b; } static void freeName(NameAtom *atom) { NameAtom *p; while(atom) { free(atom->name); p = atom->next; free(atom); atom = p; } } static int compileName(OptDef *def) { NameAtom *beginPtr = NULL, *endPtr, *list; OptDef *c = def; int index = -1; list = NULL; while(c) { if (c->name->name) { beginPtr = cloneName(c->name, &endPtr); if (!beginPtr) return 1; if (index >= 0) { endPtr->index = index; index = -1; } endPtr->next = list; list = beginPtr; } else { index = c->name->index; } c = c->parent; } def->name = list; return 0; } static OptDef* plainOptDef(OptDef *def, OptDef *list) { OptDef *ptr; while(def) { switch(def->paramType) { case scalarType: ptr = malloc(sizeof(*ptr)); if (!ptr) { out_warning(CNF_NOMEMORY, "No memory"); freeCfgDef(def); freeCfgDef(list); return NULL; } *ptr = *def; if (compileName(ptr)) { freeName(ptr->name); free(ptr); freeCfgDef(def); freeCfgDef(list); return NULL; } ptr->parent = NULL; ptr->next = list; list = ptr; break; case structType: list = plainOptDef(def->paramValue.structval, list); break; case arrayType: if (def->paramValue.arrayval == NULL) { ptr = malloc(sizeof(*ptr)); if (!ptr) { out_warning(CNF_NOMEMORY, "No memory"); freeCfgDef(def); freeCfgDef(list); return NULL; } *ptr = *def; if (compileName(ptr)) { freeName(ptr->name); free(ptr); freeCfgDef(def); freeCfgDef(list); return NULL; } ptr->parent = NULL; ptr->next = list; list = ptr; } else { list = plainOptDef(def->paramValue.arrayval, list); } break; default: out_warning(CNF_INTERNALERROR, "Unkown paramType: %d", def->paramType); } ptr = def->next; freeName(def->name); free(def); def = ptr; } return list; } void freeCfgDef(OptDef *def) { OptDef *ptr; while(def) { switch(def->paramType) { case scalarType: free(def->paramValue.scalarval); break; case structType: freeCfgDef(def->paramValue.structval); break; case arrayType: freeCfgDef(def->paramValue.arrayval); break; default: break; } ptr = def->next; freeName(def->name); free(def); def = ptr; } } OptDef* parseCfgDef(FILE *fh, int *error) { prscfg_yyscan_t yyscanner; prscfg_yy_extra_type yyextra; int yyresult; yyscanner = prscfgScannerInit(fh, &yyextra); output = NULL; yyresult = prscfg_yyparse(yyscanner); prscfgScannerFinish(yyscanner); if (error) *error = yyresult; if (yyresult != 0) return NULL; return plainOptDef(output, NULL); } OptDef* parseCfgDefBuffer(char *buffer, int *error) { prscfg_yyscan_t yyscanner; prscfg_yy_extra_type yyextra; int yyresult; yyscanner = prscfgScannerInitBuffer(buffer, &yyextra); output = NULL; yyresult = prscfg_yyparse(yyscanner); prscfgScannerFinish(yyscanner); if (error) *error = yyresult; if (yyresult != 0) return NULL; return plainOptDef(output, NULL); } #line 2 "prscfg_scan.c" #line 4 "prscfg_scan.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE prscfg_yyrestart(yyin ,yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via prscfg_yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] void prscfg_yyrestart (FILE *input_file ,yyscan_t yyscanner ); void prscfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE prscfg_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void prscfg_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void prscfg_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void prscfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void prscfg_yypop_buffer_state (yyscan_t yyscanner ); static void prscfg_yyensure_buffer_stack (yyscan_t yyscanner ); static void prscfg_yy_load_buffer_state (yyscan_t yyscanner ); static void prscfg_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); #define YY_FLUSH_BUFFER prscfg_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) YY_BUFFER_STATE prscfg_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE prscfg_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE prscfg_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *prscfg_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *prscfg_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); void prscfg_yyfree (void * ,yyscan_t yyscanner ); #define yy_new_buffer prscfg_yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ prscfg_yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ prscfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ prscfg_yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ prscfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define prscfg_yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ yyg->yytext_ptr -= yyg->yy_more_len; \ yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 30 #define YY_END_OF_BUFFER 31 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[60] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 9, 2, 1, 3, 8, 9, 7, 6, 6, 13, 2, 11, 3, 12, 13, 13, 24, 25, 22, 23, 19, 16, 15, 14, 17, 19, 29, 28, 29, 29, 2, 3, 4, 7, 6, 6, 0, 24, 20, 21, 18, 29, 27, 26, 5, 0, 10, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, 1, 6, 1, 7, 1, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, 7, 1, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 13, 14, 15, 11, 11, 11, 16, 17, 11, 11, 11, 11, 11, 7, 18, 7, 1, 11, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 13, 14, 15, 11, 11, 11, 16, 17, 11, 11, 11, 11, 11, 7, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[19] = { 0, 1, 1, 2, 3, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 3 } ; static yyconst flex_int16_t yy_base[69] = { 0, 0, 0, 17, 29, 40, 56, 73, 81, 88, 95, 52, 137, 49, 137, 0, 137, 44, 39, 0, 33, 137, 45, 137, 0, 137, 40, 28, 0, 137, 137, 38, 137, 137, 137, 137, 137, 34, 0, 137, 30, 31, 33, 0, 137, 19, 0, 12, 15, 0, 137, 137, 137, 0, 0, 0, 0, 13, 137, 137, 104, 108, 112, 116, 120, 19, 124, 128, 132 } ; static yyconst flex_int16_t yy_def[69] = { 0, 59, 1, 60, 60, 61, 61, 62, 62, 63, 63, 59, 59, 59, 59, 64, 59, 59, 59, 65, 65, 59, 59, 59, 64, 59, 59, 59, 66, 59, 59, 67, 59, 59, 59, 59, 59, 59, 68, 59, 68, 68, 59, 64, 59, 59, 65, 65, 59, 66, 59, 59, 59, 68, 68, 68, 65, 59, 59, 0, 59, 59, 59, 59, 59, 59, 59, 59, 59 } ; static yyconst flex_int16_t yy_nxt[156] = { 0, 12, 13, 14, 12, 15, 12, 16, 16, 17, 18, 19, 19, 19, 20, 19, 19, 19, 12, 22, 14, 23, 24, 46, 25, 58, 26, 57, 56, 45, 27, 22, 14, 23, 24, 42, 25, 55, 26, 54, 52, 51, 27, 29, 30, 48, 44, 42, 47, 45, 44, 42, 59, 59, 59, 59, 59, 59, 31, 29, 30, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 31, 33, 34, 59, 35, 59, 36, 59, 37, 33, 34, 59, 35, 59, 36, 59, 37, 39, 59, 59, 40, 59, 59, 41, 39, 59, 59, 40, 59, 59, 41, 21, 21, 21, 21, 28, 28, 28, 28, 32, 32, 32, 32, 38, 38, 38, 38, 43, 59, 43, 43, 49, 59, 59, 49, 50, 50, 50, 50, 53, 59, 53, 53, 11, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 } ; static yyconst flex_int16_t yy_chk[156] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 65, 3, 57, 3, 48, 47, 45, 3, 4, 4, 4, 4, 42, 4, 41, 4, 40, 37, 31, 4, 5, 5, 27, 26, 22, 20, 18, 17, 13, 11, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 0, 7, 0, 7, 8, 8, 0, 8, 0, 8, 0, 8, 9, 0, 0, 9, 0, 0, 9, 10, 0, 0, 10, 0, 0, 10, 60, 60, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, 64, 0, 64, 64, 66, 0, 0, 66, 67, 67, 67, 67, 68, 0, 68, 68, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() (yyg->yy_more_flag = 1) #define YY_MORE_ADJ yyg->yy_more_len #define YY_RESTORE_YY_MORE_OFFSET #line 1 "prscfg.l" #line 2 "prscfg.l" #undef yylval #undef yylloc #include #include #define YY_EXTRA_TYPE prscfg_yy_extra_type * static int scan_yyerror(char *s, int lineno); static int addstring(prscfg_yyscan_t yyscanner, char *s, int l); static int addchar(prscfg_yyscan_t yyscanner, char s); static char * strdupn(char *src, size_t size); static YY_BUFFER_STATE buf = NULL; #define YY_NO_INPUT 1 /* Default separators */ /* Value separators */ #line 516 "prscfg_scan.c" #define INITIAL 0 #define VALUE 1 #define QUOTED 2 #define UNQUOTED 3 #define CCOMMENT 4 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { /* User-defined. Not touched by flex. */ YY_EXTRA_TYPE yyextra_r; /* The rest are the same as the globals declared in the non-reentrant scanner. */ FILE *yyin_r, *yyout_r; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; int yy_n_chars; int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; int yylineno_r; int yy_flex_debug_r; char *yytext_r; int yy_more_flag; int yy_more_len; YYSTYPE * yylval_r; }; /* end struct yyguts_t */ static int yy_init_globals (yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ # define yylval yyg->yylval_r int prscfg_yylex_init (yyscan_t* scanner); int prscfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int prscfg_yylex_destroy (yyscan_t yyscanner ); int prscfg_yyget_debug (yyscan_t yyscanner ); void prscfg_yyset_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE prscfg_yyget_extra (yyscan_t yyscanner ); void prscfg_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *prscfg_yyget_in (yyscan_t yyscanner ); void prscfg_yyset_in (FILE * in_str ,yyscan_t yyscanner ); FILE *prscfg_yyget_out (yyscan_t yyscanner ); void prscfg_yyset_out (FILE * out_str ,yyscan_t yyscanner ); int prscfg_yyget_leng (yyscan_t yyscanner ); char *prscfg_yyget_text (yyscan_t yyscanner ); int prscfg_yyget_lineno (yyscan_t yyscanner ); void prscfg_yyset_lineno (int line_number ,yyscan_t yyscanner ); YYSTYPE * prscfg_yyget_lval (yyscan_t yyscanner ); void prscfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int prscfg_yywrap (yyscan_t yyscanner ); #else extern int prscfg_yywrap (yyscan_t yyscanner ); #endif #endif static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner ); #else static int input (yyscan_t yyscanner ); #endif #endif static void yy_push_state (int new_state ,yyscan_t yyscanner); static void yy_pop_state (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int prscfg_yylex \ (YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int prscfg_yylex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; #line 49 "prscfg.l" #line 765 "prscfg_scan.c" yylval = yylval_param; if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { prscfg_yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = prscfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } prscfg_yy_load_buffer_state(yyscanner ); } while ( 1 ) /* loops until end-of-file is reached */ { yyg->yy_more_len = 0; if ( yyg->yy_more_flag ) { yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr; yyg->yy_more_flag = 0; } yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ *yy_cp = yyg->yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yyg->yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 60 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 59 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 51 "prscfg.l" { yyextra->lineno++; } YY_BREAK case 2: YY_RULE_SETUP #line 53 "prscfg.l" { /* ignore whitespace */ } YY_BREAK case 3: YY_RULE_SETUP #line 55 "prscfg.l" { /* ignore single-line comment */ } YY_BREAK case 4: YY_RULE_SETUP #line 57 "prscfg.l" { /* scan a C-style comment */ yyextra->commentCounter = 1; yyextra->ostate = YYSTATE; BEGIN CCOMMENT; } YY_BREAK case 5: YY_RULE_SETUP #line 64 "prscfg.l" { yylval->str = strdup("OPT"); if (!yylval->str) scan_yyerror("No memory", yyextra->lineno); return OPT_P; } YY_BREAK case 6: YY_RULE_SETUP #line 71 "prscfg.l" { yylval->str = strdupn(yytext, yyleng); if (!yylval->str) scan_yyerror("No memory", yyextra->lineno); return KEY_P; } YY_BREAK case 7: YY_RULE_SETUP #line 78 "prscfg.l" { yylval->str = strdupn(yytext, yyleng); if (!yylval->str) scan_yyerror("No memory", yyextra->lineno); return INDEX_P; } YY_BREAK case 8: YY_RULE_SETUP #line 85 "prscfg.l" { return *yytext; } YY_BREAK case 9: YY_RULE_SETUP #line 87 "prscfg.l" { return scan_yyerror("syntax error: Unknown character", yyextra->lineno); } YY_BREAK case YY_STATE_EOF(INITIAL): #line 89 "prscfg.l" { yyterminate(); } YY_BREAK case 10: YY_RULE_SETUP #line 91 "prscfg.l" { yylval->str = strdup("NULL"); if (!yylval->str) scan_yyerror("No memory", yyextra->lineno); BEGIN INITIAL; return NULL_P; } YY_BREAK case 11: YY_RULE_SETUP #line 99 "prscfg.l" { /* Accept a quoted string. */ yyextra->total = 256; yyextra->strbuf = malloc(yyextra->total); if (!yyextra->strbuf) scan_yyerror("No memory", yyextra->lineno); yyextra->length = 0; BEGIN QUOTED; } YY_BREAK case 12: YY_RULE_SETUP #line 109 "prscfg.l" { BEGIN INITIAL; return *yytext; } YY_BREAK case 13: YY_RULE_SETUP #line 114 "prscfg.l" { /* Accept an unquoted string. */ yymore(); BEGIN UNQUOTED; } YY_BREAK case YY_STATE_EOF(VALUE): #line 120 "prscfg.l" { return scan_yyerror("Unexpected end of string (expecting value)", yyextra->lineno); } YY_BREAK case 14: #line 125 "prscfg.l" case 15: /* rule 15 can match eol */ #line 126 "prscfg.l" case 16: /* rule 16 can match eol */ #line 127 "prscfg.l" case 17: /* rule 17 can match eol */ YY_RULE_SETUP #line 127 "prscfg.l" { int next = yytext[yyleng - 1]; yylval->str = strdupn(yytext, yyleng - 1); if (!yylval->str) scan_yyerror("No memory", yyextra->lineno); unput(next); BEGIN INITIAL; return STRING_P; } YY_BREAK case 18: YY_RULE_SETUP #line 137 "prscfg.l" { yylval->str = strdupn(yytext, yyleng - 2); if (!yylval->str) scan_yyerror("No memory", yyextra->lineno); unput('*'); unput('/'); BEGIN INITIAL; return STRING_P; } YY_BREAK case 19: YY_RULE_SETUP #line 147 "prscfg.l" { yymore(); } YY_BREAK case YY_STATE_EOF(UNQUOTED): #line 149 "prscfg.l" { yylval->str = strdupn(yytext, yyleng - 1); if (!yylval->str) scan_yyerror("No memory", yyextra->lineno); BEGIN INITIAL; return STRING_P; } YY_BREAK case 20: YY_RULE_SETUP #line 157 "prscfg.l" { if (addchar(yyscanner, yytext[1])) scan_yyerror("No memory", yyextra->lineno); } YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP #line 162 "prscfg.l" { yyextra->lineno++; } YY_BREAK case 22: YY_RULE_SETUP #line 166 "prscfg.l" { yyextra->strbuf[yyextra->length] = '\0'; yylval->str = yyextra->strbuf; BEGIN INITIAL; yyextra->strbuf = NULL; return STRING_P; } YY_BREAK case 23: YY_RULE_SETUP #line 174 "prscfg.l" { /* This is only needed for \ just before EOF */ } YY_BREAK case 24: YY_RULE_SETUP #line 178 "prscfg.l" { if (addstring(yyscanner, yytext, yyleng)) scan_yyerror("No memory", yyextra->lineno); } YY_BREAK case 25: /* rule 25 can match eol */ YY_RULE_SETUP #line 183 "prscfg.l" { if (addchar(yyscanner, yytext[0])) scan_yyerror("No memory", yyextra->lineno); yyextra->lineno++; } YY_BREAK case YY_STATE_EOF(QUOTED): #line 189 "prscfg.l" { return scan_yyerror("Unexpected end of string (expecting closing quote)", yyextra->lineno); } YY_BREAK case 26: YY_RULE_SETUP #line 193 "prscfg.l" { yyextra->commentCounter++; } YY_BREAK case 27: YY_RULE_SETUP #line 197 "prscfg.l" { yyextra->commentCounter--; if (yyextra->commentCounter == 0) BEGIN yyextra->ostate; } YY_BREAK case 28: /* rule 28 can match eol */ YY_RULE_SETUP #line 203 "prscfg.l" { yyextra->lineno++; } YY_BREAK case 29: YY_RULE_SETUP #line 205 "prscfg.l" { /* ignore */ } YY_BREAK case YY_STATE_EOF(CCOMMENT): #line 207 "prscfg.l" { return scan_yyerror("Unexpected end of string (inside comment)", yyextra->lineno); } YY_BREAK case 30: YY_RULE_SETUP #line 211 "prscfg.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1115 "prscfg_scan.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yyg->yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * prscfg_yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yyg->yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_END_OF_FILE: { yyg->yy_did_buffer_switch_on_eof = 0; if ( prscfg_yywrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of prscfg_yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = yyg->yytext_ptr; register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ prscfg_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } if ( yyg->yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; prscfg_yyrestart(yyin ,yyscanner); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) prscfg_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { register yy_state_type yy_current_state; register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 60 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 60 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 59); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) { register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_cp = yyg->yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yyg->yy_hold_char; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yyg->yy_n_chars + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yyg->yytext_ptr = yy_bp; yyg->yy_hold_char = *yy_cp; yyg->yy_c_buf_p = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) #else static int input (yyscan_t yyscanner) #endif { int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; else { /* need more input */ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ prscfg_yyrestart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( prscfg_yywrap(yyscanner ) ) return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(yyscanner); #else return input(yyscanner); #endif } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; } } } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ void prscfg_yyrestart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ prscfg_yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = prscfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } prscfg_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); prscfg_yy_load_buffer_state(yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ void prscfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * prscfg_yypop_buffer_state(); * prscfg_yypush_buffer_state(new_buffer); */ prscfg_yyensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } YY_CURRENT_BUFFER_LVALUE = new_buffer; prscfg_yy_load_buffer_state(yyscanner ); /* We don't actually know whether we did this switch during * EOF (prscfg_yywrap()) processing, but the only time this flag * is looked at is after prscfg_yywrap() is called, so it's safe * to go ahead and always set it. */ yyg->yy_did_buffer_switch_on_eof = 1; } static void prscfg_yy_load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * @param yyscanner The scanner object. * @return the allocated buffer state. */ YY_BUFFER_STATE prscfg_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) prscfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in prscfg_yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) prscfg_yyalloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in prscfg_yy_create_buffer()" ); b->yy_is_our_buffer = 1; prscfg_yy_init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. * @param b a buffer created with prscfg_yy_create_buffer() * @param yyscanner The scanner object. */ void prscfg_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) prscfg_yyfree((void *) b->yy_ch_buf ,yyscanner ); prscfg_yyfree((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a prscfg_yyrestart() or at EOF. */ static void prscfg_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; prscfg_yy_flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then prscfg_yy_init_buffer was _probably_ * called from prscfg_yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ void prscfg_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) prscfg_yy_load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */ void prscfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; prscfg_yyensure_buffer_stack(yyscanner); /* This block is copied from prscfg_yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from prscfg_yy_switch_to_buffer. */ prscfg_yy_load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ void prscfg_yypop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; prscfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { prscfg_yy_load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void prscfg_yyensure_buffer_stack (yyscan_t yyscanner) { int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)prscfg_yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in prscfg_yyensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)prscfg_yyrealloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in prscfg_yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE prscfg_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) prscfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in prscfg_yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; prscfg_yy_switch_to_buffer(b ,yyscanner ); return b; } /** Setup the input buffer state to scan a string. The next call to prscfg_yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * prscfg_yy_scan_bytes() instead. */ YY_BUFFER_STATE prscfg_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) { return prscfg_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to prscfg_yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE prscfg_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) prscfg_yyalloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in prscfg_yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = prscfg_yy_scan_buffer(buf,n ,yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in prscfg_yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } static void yy_push_state (int new_state , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth ) { yy_size_t new_size; yyg->yy_start_stack_depth += YY_START_STACK_INCR; new_size = yyg->yy_start_stack_depth * sizeof( int ); if ( ! yyg->yy_start_stack ) yyg->yy_start_stack = (int *) prscfg_yyalloc(new_size ,yyscanner ); else yyg->yy_start_stack = (int *) prscfg_yyrealloc((void *) yyg->yy_start_stack,new_size ,yyscanner ); if ( ! yyg->yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } static void yy_pop_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( --yyg->yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]); } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ yyg->yy_hold_char = *yyg->yy_c_buf_p; \ *yyg->yy_c_buf_p = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ YY_EXTRA_TYPE prscfg_yyget_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ int prscfg_yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ int prscfg_yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ FILE *prscfg_yyget_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ FILE *prscfg_yyget_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ int prscfg_yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ char *prscfg_yyget_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ void prscfg_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. * @param line_number * @param yyscanner The scanner object. */ void prscfg_yyset_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) yy_fatal_error( "prscfg_yyset_lineno called with no buffer" , yyscanner); yylineno = line_number; } /** Set the current column. * @param line_number * @param yyscanner The scanner object. */ void prscfg_yyset_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) yy_fatal_error( "prscfg_yyset_column called with no buffer" , yyscanner); yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * @param yyscanner The scanner object. * @see prscfg_yy_switch_to_buffer */ void prscfg_yyset_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = in_str ; } void prscfg_yyset_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = out_str ; } int prscfg_yyget_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } void prscfg_yyset_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ YYSTYPE * prscfg_yyget_lval (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylval; } void prscfg_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; } /* User-visible API */ /* prscfg_yylex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ int prscfg_yylex_init(yyscan_t* ptr_yy_globals) { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) prscfg_yyalloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); return yy_init_globals ( *ptr_yy_globals ); } /* prscfg_yylex_init_extra has the same functionality as prscfg_yylex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). * The user defined value in the first argument will be available to prscfg_yyalloc in * the yyextra field. */ int prscfg_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; prscfg_yyset_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) prscfg_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); prscfg_yyset_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. * This function is called from prscfg_yylex_destroy(), so don't allocate here. */ yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * prscfg_yylex_init() */ return 0; } /* prscfg_yylex_destroy is for both reentrant and non-reentrant scanners. */ int prscfg_yylex_destroy (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ prscfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; prscfg_yypop_buffer_state(yyscanner); } /* Destroy the stack itself. */ prscfg_yyfree(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ prscfg_yyfree(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * prscfg_yylex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ prscfg_yyfree ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *prscfg_yyalloc (yy_size_t size , yyscan_t yyscanner) { return (void *) malloc( size ); } void *prscfg_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void prscfg_yyfree (void * ptr , yyscan_t yyscanner) { free( (char *) ptr ); /* see prscfg_yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 211 "prscfg.l" static int scan_yyerror(char *msg, int lineno) { out_warning(CNF_SYNTAXERROR, "scan_yyerror: %s at line %d", msg, lineno); return 0; } prscfg_yyscan_t prscfgScannerInit(FILE *fh, prscfg_yy_extra_type *yyext) { yyscan_t scanner; memset(yyext, 0, sizeof(*yyext)); yyext->lineno = 1; prscfg_yylex_init_extra(yyext,&scanner); buf = prscfg_yy_create_buffer(fh,YY_BUF_SIZE,scanner ); prscfg_yy_switch_to_buffer(buf,scanner ); return scanner; } prscfg_yyscan_t prscfgScannerInitBuffer(char *buffer, prscfg_yy_extra_type *yyext) { yyscan_t scanner; memset(yyext, 0, sizeof(*yyext)); yyext->lineno = 1; prscfg_yylex_init_extra(yyext,&scanner); buf = prscfg_yy_scan_string(buffer,scanner ); prscfg_yy_switch_to_buffer(buf,scanner ); return scanner; } void prscfgScannerFinish(prscfg_yyscan_t scanner) { if (buf) prscfg_yy_delete_buffer(buf,scanner ); prscfg_yylex_destroy(scanner); buf = NULL; } void prscfgScannerStartValue(prscfg_yyscan_t scanner) { yy_push_state(VALUE, scanner); } static void prscfgScannerEndValue(prscfg_yyscan_t scanner) { yy_pop_state(scanner); } /* * Arrange access to yyextra for subroutines of the main prscfg_yylex() function. * We expect each subroutine to have a yyscanner parameter. Rather than * use the yyget_xxx functions, which might or might not get inlined by the * compiler, we cheat just a bit and cast yyscanner to the right type. */ #undef yyextra #define yyextra (((struct yyguts_t *) yyscanner)->yyextra_r) int prscfgGetLineNo(prscfg_yyscan_t yyscanner) { return yyextra->lineno; } static int addstring(prscfg_yyscan_t yyscanner, char *s, int l) { while( yyextra->length + l + 1 >= yyextra->total ) { yyextra->total *= 2; yyextra->strbuf=realloc(yyextra->strbuf, yyextra->total); } if (!yyextra->strbuf) return 1; memcpy( yyextra->strbuf+yyextra->length, s, l); yyextra->length+=l; return 0; } static int addchar(prscfg_yyscan_t yyscanner, char s) { if( yyextra->length + 2 >= yyextra->total ) { yyextra->total*=2; yyextra->strbuf=realloc(yyextra->strbuf, yyextra->total); } if (!yyextra->strbuf) return 1; yyextra->strbuf[ yyextra->length++ ] = s; return 0; } static char * strdupn(char *src, size_t size) { char *dst = malloc(size + 1); if (!dst) return NULL; memcpy(dst, src, size); dst[size] = '\0'; return dst; } tarantool-1.5.1.218.g1a69fd6/cfg/tarantool_box_cfg.h0000664000000000000000000001461312232453114020364 0ustar rootroot#ifndef tarantool_cfg_CFG_H #define tarantool_cfg_CFG_H #include #include #include #ifndef confetti_bool_t #define confetti_bool_t char #endif /* * Autogenerated file, do not edit it! */ typedef struct tarantool_cfg_space_index_key_field { unsigned char __confetti_flags; int32_t fieldno; char* type; } tarantool_cfg_space_index_key_field; typedef struct tarantool_cfg_space_index { unsigned char __confetti_flags; char* type; confetti_bool_t unique; tarantool_cfg_space_index_key_field** key_field; } tarantool_cfg_space_index; typedef struct tarantool_cfg_space { unsigned char __confetti_flags; confetti_bool_t enabled; int32_t cardinality; int32_t estimated_rows; tarantool_cfg_space_index** index; } tarantool_cfg_space; typedef struct tarantool_cfg { unsigned char __confetti_flags; /* username to switch to */ char* username; /* * Local hot standby (if enabled, the server will run in hot * standby mode, continuously fetching WAL records from wal_dir, * until it is able to bind to the primary port. * In local hot standby mode the server only accepts reads. */ confetti_bool_t local_hot_standby; /* * tarantool bind ip address, applies to master * and replication ports. INADDR_ANY is the default value. */ char* bind_ipaddr; /* * save core on abort/assert * deprecated; use ulimit instead */ confetti_bool_t coredump; /* * admin port * used for admin's connections */ int32_t admin_port; /* Replication clients should use this port (bind_ipaddr:replication_port). */ int32_t replication_port; /* Log verbosity, possible values: ERROR=1, CRIT=2, WARN=3, INFO=4(default), DEBUG=5 */ int32_t log_level; /* Size of slab arena in GB */ double slab_alloc_arena; /* Size of minimal allocation unit */ int32_t slab_alloc_minimal; /* Growth factor, each subsequent unit size is factor * prev unit size */ double slab_alloc_factor; /* working directory (daemon will chdir(2) to it) */ char* work_dir; /* Snapshot directory (where snapshots get saved/read) */ char* snap_dir; /* WAL directory (where WALs get saved/read) */ char* wal_dir; /* script directory (where init.lua is expected to be) */ char* script_dir; /* name of pid file */ char* pid_file; /* * logger command will be executed via /bin/sh -c {} * example: 'exec cronolog /var/log/tarantool/%Y-%m/%Y-%m-%d/tarantool.log' * example: 'exec extra/logger.pl /var/log/tarantool/tarantool.log' * when logger is not configured all logging going to STDERR */ char* logger; /* make logging nonblocking, this potentially can lose some logging data */ confetti_bool_t logger_nonblock; /* delay between loop iterations */ double io_collect_interval; /* size of listen backlog */ int32_t backlog; /* network io readahead */ int32_t readahead; /* Do not write into snapshot faster than snap_io_rate_limit MB/sec */ double snap_io_rate_limit; /* Write no more rows in WAL */ int32_t rows_per_wal; /* * OBSOLETE * Starting from 1.4.5, this variable has no effect. */ int32_t wal_writer_inbox_size; /* * Defines fiber/data synchronization fsync(2) policy: * "none": does not write to WAL * "write": fibers wait for their data to be written to the log. * "fsync": fibers wait for their data, fsync(2) follows each write(2) * "fsync_delay": fibers wait for their data, fsync every N=wal_fsync_delay seconds, * N=0.0 means no fsync (equivalent to wal_mode = "write"); */ char* wal_mode; /* * Fsync WAL delay, only issue fsync if last fsync was wal_fsync_delay * seconds ago. * WARNING: actually, several last requests may stall fsync for much longer */ double wal_fsync_delay; /* * Delay, in seconds, between successive re-readings of wal_dir. * The re-scan is necessary to discover new WAL files or snapshots. */ double wal_dir_rescan_delay; /* * Panic if there is an error reading a snapshot or WAL. * By default, panic on any snapshot reading error and ignore errors * when reading WALs. */ confetti_bool_t panic_on_snap_error; confetti_bool_t panic_on_wal_error; /* * # BOX * Primary port (where updates are accepted) */ int32_t primary_port; /* Secondary port (where only selects are accepted) */ int32_t secondary_port; /* Warn about requests which take longer to process, in seconds. */ double too_long_threshold; /* * A custom process list (ps) title string, appended after the standard * program title. */ char* custom_proc_title; /* Memcached protocol support is enabled if memcached_port is set */ int32_t memcached_port; /* space used for memcached emulation */ int32_t memcached_space; /* Memcached expiration is on if memcached_expire is set. */ confetti_bool_t memcached_expire; /* maximum rows to consider per expire loop iteration */ int32_t memcached_expire_per_loop; /* tarantool will try to iterate over all rows within this time */ double memcached_expire_full_sweep; /* * Replication mode (if enabled, the server, once * bound to the primary port, will connect to * replication_source (ipaddr:port) and run continously * fetching records from it.. In replication mode the server * only accepts reads. */ char* replication_source; tarantool_cfg_space** space; } tarantool_cfg; #ifndef CNF_FLAG_STRUCT_NEW #define CNF_FLAG_STRUCT_NEW 0x01 #endif #ifndef CNF_FLAG_STRUCT_NOTSET #define CNF_FLAG_STRUCT_NOTSET 0x02 #endif #ifndef CNF_STRUCT_DEFINED #define CNF_STRUCT_DEFINED(s) ((s) != NULL && ((s)->__confetti_flags & CNF_FLAG_STRUCT_NOTSET) == 0) #endif void init_tarantool_cfg(tarantool_cfg *c); int fill_default_tarantool_cfg(tarantool_cfg *c); void swap_tarantool_cfg(struct tarantool_cfg *c1, struct tarantool_cfg *c2); int parse_cfg_file_tarantool_cfg(tarantool_cfg *c, FILE *fh, int check_rdonly, int *n_accepted, int *n_skipped, int *n_optional); int parse_cfg_buffer_tarantool_cfg(tarantool_cfg *c, char *buffer, int check_rdonly, int *n_accepted, int *n_skipped, int *n_optional); int check_cfg_tarantool_cfg(tarantool_cfg *c); int dup_tarantool_cfg(tarantool_cfg *dst, tarantool_cfg *src); void destroy_tarantool_cfg(tarantool_cfg *c); char *cmp_tarantool_cfg(tarantool_cfg* c1, tarantool_cfg* c2, int only_check_rdonly); typedef struct tarantool_cfg_iterator_t tarantool_cfg_iterator_t; tarantool_cfg_iterator_t* tarantool_cfg_iterator_init(); char* tarantool_cfg_iterator_next(tarantool_cfg_iterator_t* i, tarantool_cfg *c, char **v); #endif tarantool-1.5.1.218.g1a69fd6/cfg/libcfg.a0000664000000000000000000027234212213333043016113 0ustar rootroot! / 1378727459 0 0 0 886 ` '\\prscfg_yyparseprscfg_yylexfreeCfgDefparseCfgDefparseCfgDefBufferprscfg_yy_create_bufferprscfg_yyreallocprscfg_yyrestartprscfg_yy_switch_to_bufferprscfg_yyallocprscfg_yy_delete_bufferprscfg_yyfreeprscfg_yy_flush_bufferprscfg_yypush_buffer_stateprscfg_yypop_buffer_stateprscfg_yy_scan_bufferprscfg_yy_scan_stringprscfg_yy_scan_bytesprscfg_yyget_extraprscfg_yyget_linenoprscfg_yyget_columnprscfg_yyget_inprscfg_yyget_outprscfg_yyget_lengprscfg_yyget_textprscfg_yyset_extraprscfg_yyset_linenoprscfg_yyset_columnprscfg_yyset_inprscfg_yyset_outprscfg_yyget_debugprscfg_yyset_debugprscfg_yyget_lvalprscfg_yyset_lvalprscfg_yylex_initprscfg_yylex_init_extraprscfg_yylex_destroycfg_outout_warningprscfg.c.o/ 1378727459 1000 1000 100664 88312 ` ELF>@@UHH H}HuHE<"HEHEHEHEHE'td'"t?,tS\uHEHE<\uAH}tHEHUHHEHEH}tHEHUHHE<H}uHEH#HUHEHHHHEHH)HUHHH}HuHxttHHHƿHEHEHEHEEt"HxHE̋tHHEHHTŐE}}yEEȸ3+ẺEĸ}NEĉEEȉEE̋UH;Eu|}tv}uEHEHEoEHHEHHTŐEEHHHƿHHEHHEHEH;Ev [HEHEEE;E[}wGEHHE0HE&HEHEHEHEHEHHUHHEHEH;Ev HEHEHEHH;Es1HEHHEHHEHH;Es HEHHEHHEETHE<%u?HEHH H @H HHPH H@H H@H H@ HHx$H HxHPHxH@ HxHxuKHHuHH mHHH@HH@(HHuHH8 HH@HEHHHHPHHHPHH@HH@ HEHHHp$HpHHPHpH@ HpHpuHHh9HhH@HUH(HHRHRRPHhH@ HhHhuHt2HEH(HHPHHP HEH(HHHPHEH(HHUH(HHRHPHH`(HEH(HH`HPH`H@ H`H`uHEH(HH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHPHEHH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHP"HEHH HDž HEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH wHEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH HEHHH H HEHHHCHEHHHH H HuHHH HUHHH @H H@BDž 6Dž HEHHHDž HDž EHHHHEEHHHHEEHEHEH HEHEEHHEЉE}x9}23EHfHEf9uEHEpEHEV}t"E=wEHE}EHDžXMHUHHHxTTuHHXTHHH9tHHHHHHHu%HHHDžDžT1MHUHHHTHHXHXHHHoTN}uj} }u^(HHEƿ!E3EHHHHEEHHHHEEHEEEEHE}t8E}x.}2(EH<uEHE}JHEH;EtlEHHHUƿ]HmHmHEEfHEHEHHEEE/E"HHE}t@E=wEHEHHEƿEHHHHEEHHHHE5HEHHHUƿYHmHmHEH;EuHpH9Et HEHHHH9tHHEHHx []UHHH}HuHEH3HEH¾UHH0H}HuHEHEHHEHHEHHEH}uHEHUH HHJHHHRHPHEHHtLHEHHHHEHHEHHu'HEHHH}tHEHUHPHEHEHEHEHEHEHEH@HEH}HEUHH H}HuHUHEHHHEH}uHEHUHPHEHUHH H}/HEHHHEH@HEHEHHEHEH}uUHH@H}HEHEHEEHEHEH@HHtVHEH@HUHHHEH}uc}xHE؋UPEHEHUHPHEHEHEH@@EHEH@HEH}uHEHUHPHUHH H}HuHEr#(HEH}u6HEHHEH3HEHUH HHJHHHJHHHJHHHR HP HEHlt>HEH@HHEHHEHHEHHEH@HEHUHP HEHESHEH@HUHHHE3HEH@H(HEH}u6HEHHEHHEHUH HHJHHHJHHHJHHHR HP HEHOt>HEH@HHEHHEHHEHHEH@HEHUHP HEHE9HEH@HUHHHEHE¾ HEH@ HEHEH@HPHEHHEHEH}dHEUHH H}~HEtrt&6HEH@H%HEH@HHEH@HHEH@ HEHEH@HHEHHEHEH}wUHH@H}HuHUHEHH+HEHHEHEHEH,H}t HEU}tHH2HUHH@H}HuHUHEHH+HEHHEHEHEH,H}t HEU}tHHHUHAVAUATSH0H}HuHEHEHEHUHHE؋@HHE@HHE؋@Lu HE@LHEH@HuHHEHPHEH@HuHHEHPHEH@(HtHEHP(HEH@HHHHu@HEHHEHP(HEH@HHHEH@HU@HHHEHHEǀHE؋t9HEH@@HHEHHH)HȉHE؉HEǀHEHX@HE@0IHED`LAIcft9HED`hHEHXp'IcDA;~AƉAIcAHD9uIcAЉDHA;PHEHXpHED`hIcDHELHEHHE؋HHHHEHHHEHHH)HȉHE؉P8HE؈P0HEHX@A$_ DHHE@0HEHXpHED`hSHEHPP> HEH@HEHHE؋@LBHE@L  HEHHHEHHHuHEH@ƿ 'HEHHE؋@8HcHEHHHW*HHEHHHuHEH@ƿ&\HEHHE؋@8HcHEHHH)HHEHHHuHEH@ƿ^&HEHHEH@ƿ(&HEHHHEHHHuHEH@ƿ%HE@LjHEH@ HEHHEH@ HHHHEHHHuHEH@ƿr%HEH@HE@LHE@LHEHHEǀHE@LHEH@ƿ$HEHHE؋@8HHHEHEHHE؋@8HcHEHHH(HHEHHHuHEH@ƿ|$HEHHUEHΉHE@LHEHHE؋@8HcHEHHH'HHEHHHuHEH@ƿ#HEHHUHƿ*YHEHHUHƿ/=HE@LKHEǀ3HEHHE؋@8HcHEHHH&HHEHHHuHEH@ƿ7#HE@LHEHHHEH%HEH@ƿ"wHEHPPiHEHHHEH@HHHEHHUHHHHE@LHEHHHE؋P8HEHHEHH#$HEH@ƿ1"HEHHEH$tHEH@ƿ!HEHPPHEH@ƿ!jHEHPPPHEHPPHEH@-HEH@PHE؉PLHEHPPHEH@ƿF!HEHƿ[HHEHHH)HȃEHE@0HEHP(HEH@HHH@>??;;;;@;;;AA;;;@;;;B;;C;;;;;;D;DD;@;;AA;B;;;DDDA;;;;;;;;;;;    .:98-*76430,*/-,*;;;;;;;;;;;;;;;;;;;!";#;$;%!";#;$;%';;(;;)';;(;;) &&&&+;++1;;122225;55 ;;;;;;;;;;;;;;;;;;A90/-*)(%  <<<<====>>>>????@@@BBCCCCDDD;;;;;;;;;;;;;;;;;;;OPTsyntax error: Unknown characterNULLUnexpected end of string (expecting value)Unexpected end of string (expecting closing quote)Unexpected end of string (inside comment)flex scanner jammedfatal flex scanner internal error--no action foundfatal flex scanner internal error--end of buffer missedfatal error - scanner input buffer overflowinput in flex scanner failedout of dynamic memory in yy_get_next_buffer()flex scanner push-back overflowout of dynamic memory in prscfg_yy_create_buffer()out of dynamic memory in prscfg_yyensure_buffer_stack()out of dynamic memory in prscfg_yy_scan_buffer()out of dynamic memory in prscfg_yy_scan_bytes()bad buffer in prscfg_yy_scan_bytes()out of memory expanding start-condition stackstart-condition stack underflow%s prscfg_yyset_lineno called with no bufferprscfg_yyset_column called with no bufferscan_yyerror: %s at line %d "))$[^ R ` ` `}?7|?5z}k(8intii0nb##### #( #0 #8 #@ #H #P #X  #`  #h  b#p b#t p#x F# T# # # &{# /# 0# 1# 2# 3-# 5b# 7# ##b#u  n      # b# #  L v   (  1# b# L# # # # v& v &C     # b# b#  b# b# b# C  Nstrefghb Ib?T[a/4[5b}@HS#׏#؏#H#b# b#$b#(b#,b#0b#4b#8b#<-T?Vb # S# S#  -# !-# "#( ##0 $b#4 %b#8 &#@ 'b#H (b#L )b#P *b#T +b#X ,#` -e#h .#p 0b#x 1b#| 3# 4b# 5b# 7#8XP yyn8hyyp`b  ~ ~ ~b~ 8@!8h"8%`' *b\ yynIbPbRbSbyyxTbXyypPyyibL8/   m hbdXP!blb\}bXbTbPz H @n8yyn b b bn mm8mb;6J^"& A8~#c ~d~ h8~i8~K $optp $opt $i,$str~$idx~ $i~ $i~$i~$str}$idx~$i~$i~$i~#~b~ /    ;%bd&h'msg`%&H'end@(h$ptrX(`5XPb he `)tXph$b*def$%P%H%hc&`'b\EH*defEXEPptrFh+*defXptrh!*fhSh@bd!sh@bd!bwe\S]b\yygH-CHU0Y^y(bD_b@~eqbwyyg\]bSib^bLbHbb"bc@bDn@-[H,lelw@neSo\yygpPvY],eeLw@bSyygX\YS)*cb^wSyygHb\]\+SHw@yygX+-b-X-wPyyg/h MMwXyygOh!\\SX\bT\wHb^h+xT*bxXxwPyygzh)*bXSPwHblyyg`+*bXwPyygh+`XwPyygh+wXyygh)wXbdyyghb`!,u,X,HP,wHb.h!QQhQw`!^G^H^bD^wb`PbufaXnbH`icbl)||b\|wPyyg~hH`)wXyygh):*msghw`-wXyygh-bwXyygh-b wXyygh-SRwXyygh-SwXyygh-bwXyygh-$wXyygh.uXwPyyg h+b\wPyygh+  b\ wPyyg"h.1h1SX1wPyyg3h.77SX7wPyyg9h-=b=wXyyg?h.CP Cb\CwPyygEh-K KwXyygMh.Q QXQwPyygSh!^b!^!hw!{b|!{~{!~~q~,b!wXyygh!b"wXyygh!M"Hhw`!"*ptrhH`wX+"*ptrhw`%b&#'msg׏h&bd%u#'fhSX&P(wh%#&X&P(wh/#&h)'$h)Y$h,b$hb$X*sP*lbL)b"%)X*s)T5v%*src5X5-Pdst6h(  %0%  % % !%%  % % :&  %C#&  % 8& 7NN&  (& #c& Yy&  S& #& 7b&  ~&m&  S& #& 2w&  &'  & '  (& a5' ;sK'  %' l`' }v'  P' l' '  {' a' D'  ''  ' a' (  '-(  '$buf 111% : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I : ; (  : ;  : ; I : ;  : ;  : ; I: ;I : ; : ;I : ;.: ;' I@B : ;I  : ; 4: ;I 4: ;I   .: ;' @B !.? : ;' I@B " U# U$4: ; I %.: ; ' I@B &: ; I ': ; I (4: ; I ).: ;' @B *: ;I +.? : ;' @B ,.: ;' I@B -.? : ;' I@B ..? : ;' @B /.: ; ' @B 0!I/14: ; I? < wwvwwwvwwwvwwwvwwwvwww(v()w)*w*-w-vwwwvwwwvwwwbvbcwcdwdgwgvwwwvwww v  w  w  w a,va,b,wb,c,wc,f,wf,R3vR3S3wS3T3wT3W3wW3[4v[4\4w\4]4w]4`4w`415v1525w2535w3565w657v77w77w77w77v77w77w77w79v99w99w99w99v99w99w99w9n:vn:o:wo:p:wp:s:ws:;v;;w;;w;";w";;v;;w;;w;;w;<v<<w<<w<<w<=v==w==w==w=>v>>w>>w>>w>3@v3@4@w4@5@w5@8@w8@IAvIAJAwJAKAwKANAwNA{Av{A|Aw|A}Aw}AAwAfBvfBgBwgBhBwhBkBwkBoCvoCpCwpCqCwqCtCwtCCvCCwCCwCCwCDvDDwDDwD(Dv(D)Dw)D*Dw*D-Dw-DDvDDwDDwDDwDDvDDwDDwDDwDEvEEwEEwE Ew E Ev E!Ew!E"Ew"E%Ew%E9Ev9E:Ew:E;Ew;E>Ew>EVEvVEWEwWEXEwXE[Ew[EwEvwExEwxEyEwyE|Ew|EEvEEwEEwEEwEcFvcFdFwdFeFweFhFwhFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFGwG!Gv!G"Gw"G#Gw#G&Gw&GGvGGwGGwGGwGHvHHwHHwHHwH'Iv'I(Iw(I)Iw)I,Iw,IHJvHJIJwIJJJwJJMJwMJfJvfJgJwgJhJwhJkJwkJJvJJwJJwJJwJJvJJwJJwJJwJJvJJwJJwJJwJiKviKjKwjKkKwkKnKwnKKvKKwKKwKKwK4Lv4L5Lw5L6Lw6L9Lw9LSLvSLTLwTLULwULXLwXLmLvmLnLwnLoLwoLrLwrLLvLLwLLwLLwLbMvbMcMwcMdMwdMgMwgMNvNNwNNwNNwNvNvvNwNw,wN7E\ 0 /usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgy.tab.cprscfg.yprscfg_scan.cprscfg.lstddef.htypes.hstdio.hlibio.hprscfg.hprscfg.cy.tab.h 情*u=Y'*uqf@ u#.tɣftX>hhu0(qJ4gʭu/hxYwX tY.2u",.,.׳vuuuuz6[KIZ_ !ihXBgf!j=3gPvg0NX9 !(  #uf[X$W![X[5t/X5t/[X$W![X8X8[<XfX<XZX<XWX!X[<Xu_<X+<Xa,uu<XZ4\<X+<Xa892("[<<YW[<<YW[X<<W!X<<W!\!0[<X.1.1. . w4"f"$VL}X f?Q#//Y׭# kig\z.vl. x!hKfZ!lrX 4g{X u{.< u{. << =yjX=1ɽ/r+Y1Yu=ɻ=xuiK1hu=w1/廻~z1vYuvgwo1Y"u=.󻻻ZZu=.󻻻,0H;K1/h000#n1h=ugv1h=ugv.j沭׻u@+؅>!0g $"LhjyX_Zu/Y./Y./YZu/YY׮Z]׮Z$1/Y1/YZ1/Y+ZZZuצ)ZZ#YZZ!ZY\X $% ; "iK]\# "g X-\*Z2vX<<< Y /ɰ;4"J["4\XM?g@&v`.%w%5ff 5 f <  X Vw$uu#v3P#-1)=˄v.X=u0Y #rJ/|؃Y"0g %#JXY[+DžM/#==.?'׻u@X/{X!&$n 1$9%! .1Ku&hK5XgʭhxJ 6=0Xg5󃯲Xgo  .󃯽!&$=˻l 5#X>׻w 4vՅ"׻[v"'1 .?uLMKu0K . .5guJ%uK1\&81&5u4v4v444u5555 .11u131 .uwx .y1Y2/X#gg/Y.1D/1o.Y1Y0Z1Y0Z1Y22 .1=/Y,v.Yw!Y,u&Yw>uvgKyyextrayylineno_ryyvaluepdo_not_strip_quotessize_tyyscannersizetypenumber_to_moveyy_get_previous_state/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/prscfg.cyy_baseyysizeyytokenCNF_WRONGINT_IO_save_endyy_is_interactiveCNF_NOMEMORYyy_cyymsgprscfg_yy_load_buffer_stateprscfg_yyfreeyyreduceCNF_INTERNALERROR_IO_write_baseyytype_uint8prscfg_yyget_linenoyy_more_lenparamType_lockyytranslateyy_more_flagyynewbytesGNU C 4.7.3_IO_save_baseyyin_rprscfg_yyrestartprscfg_yy_scan_stringnum_to_readyydestructyyexhaustedlab_chainendptrprscfg_yypop_buffer_state_cur_columnyy_chkCNF_MISSEDparseCfgDefyy_ch_bufprscfg_yyget_columnatomyylval_paramyydefactprscfg_yyget_textyypactprependNamelong intprscfg_yyget_extrayy_last_accepting_cposyy_n_charsYY_BUFFER_STATEnew_buffer_IO_markererrorprscfg_yyget_debugyychecklimcompileNamebdebugsigned charprscfgScannerInitBuffer_IO_FILEConfettyErroryy_defcolumn_nounsigned charyyformatyytnamerryyss1yy_flex_debug_ryysyntax_error_statusyyscan_tyy_push_stateyyssaprscfgScannerFinishprscfg_yyset_incharparamValueyysspoutputstructvalyytype_int8yyvalyy_hold_char_IO_lock_tyy_try_NUL_transyylvalret_valyybackupyy_buffer_stateuser_definedsourceyystr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg_IO_read_ptrprscfg_yyset_outCNF_OPTIONALprscfg_yy_flush_bufferyyout_r_posstrdupnyyacceptlabprscfg_yy_scan_bytesprscfg_yylexCNF_NOTSETnodeyysize0yysize1prscfg_yy_delete_buffer_markersfileprscfg_yyallocyytnamecommentCounteryyxendNameAtomyyunputbufferstructTypearrayTypeyystateyyabortlabyy_state_typeCNF_SYNTAXERRORstrbufyy_get_next_buffer_offsetyymsgpprscfg_yyget_outindexyy_c_buf_pyyguts_tyylenyy_bs_linenoprscfg_yycharCNF_WRONGINDEXprscfg_yy_switch_to_bufferlong unsigned intyy_meta_flags2prscfg_yynerrs_IO_read_baseflex_int16_t_unused2scalarTypeyyextra_ryyerrlab1addstringstdinprscfg_yyset_lvalyyvs_allocyytype_int16yy_bs_column_old_offsetyy_matchyy_c_buf_p_offsetinput_fileyy_buf_sizelinenoYY_CHARyy_buffer_statusprscfg_yyget_lenglong long intprscfg_yyget_lvalyyerrstatusscalarvalCNF_WRONGRANGECNF_RDONLYostateyy_start_stack_IO_write_endyy_at_bolplainOptDefparentprscfg_yylex_init_extrafreeNameprscfgScannerStartValueyy_is_our_bufferyybytes_IO_buf_baseyy_actunsigned intyy_fatal_erroryy_start_stack_depth__pad1__pad2__pad3__pad4__pad5_sbufyy_fill_bufferflagprscfg_yyget_inyynewstateyysetstateprscfg_yypush_buffer_statetotalyy_init_globals_flagsyyarglistprscfg_yy_extra_typeyyres_modeyyextyytypeyyss_allocoptionalprscfgScannerInitout_stryylval_rflex_int32_tyyreturnprscfg_yyset_columnyy_start_stack_ptryyallocfreeCfgDefyystacksizeyyr1yyr2FILEendPtrnew_sizeCNF_WRONGTYPEnum_to_allocprscfg_yyscan_tyymsg_allocyy_bpptr_yy_globalssizelong long unsigned intyy_pop_statelengthyyptr__off_tOptDefyy_cpyycheckyysyntax_erroryyssyy_is_jamnew_stateyy_buffer_stack_topyy_next_stateyy_buffer_stackprscfg_yy_init_buffer_IO_backup_base_shortbufyyxbegindestCNF_OK_next__off64_tyymsgbufyy_ecscan_yyerroryy_last_accepting_stateyytableprscfg_yy_create_bufferprscfgGetLineNoyy_find_action_IO_buf_endyydefaultnameprscfg_yyparseprscfg_yyset_extrayy_startprscfg_yyensure_buffer_stackdummy_yygutsstderrshort intyy_acceptyyvsgrow_sizeline_numberyyleng_ryypgotoscannerprscfg_yyset_debugyy_input_filearrayval_vtable_offsetyycountdo_actionyy_user_definedYYSTYPEparseCfgDefBufferyy_initprscfg_yylex_destroyaddcharyy_buffer_stack_maxyyvsayy_nxtyyvspyydefgotoyystos_IO_read_endprscfg_yy_scan_buffer_filenooerrnoyy_current_stateprscfg_yylex_inityytext_rprscfg_yyset_linenoshort unsigned intstdoutbaseyyerrlab_IO_write_ptryyresultbeginPtrcloneNameyy_did_buffer_switch_on_eofprscfg_yyreallocyy_buf_posprscfg_yyerroryy_size_tnextnewListin_strprepyyerrorlab_yybytes_lenyy_amount_of_matched_textprscfgScannerEndValueGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <AC  \%AC ` zPLRx $$AC H BAC } )AC $  eAC ` (FAC A  AC  lAC  AC   4AC   XAC  $R AC KB $AC K $D AC E  lAC C $AC K  AC E AC  AC  AC  <AC  \AC  |AC  1AC ,  AC  vAC q AC  2AC m <AC  \ AC  |iAC d 7AC AC T bAC ] bAC ] AC U 8AC U XAC T xAC X !AC \ vAC q vAC q "AC ] "AC ] 8AC T XAC Z xAC X %AC ` AC   `AC  AC  !AC  <AC Y \)AC d |AC Y 6AC q  DAC   hAC  GAC B $AC Z DAC U dAC O  AC E  AC E ]AC X .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @wNh&N,N6N 18 >VdlUdo(PH HEa1o! -0zQ0 ] Q00Q  C  % !*`!/88B8I@Q`3Y3a8hr%)eF5LTLBnL)J"KG6jKN xX^ Lf n u@8|8>v9J6N]25cMLC7S3 \4%b,8;NgB \pCiiH   y R c !(9@gJ)QZar{77IJo:J;<1= .54@KJA2a|Av}D)DbDbDE!E:E WE!xEv1EvEdF"UF"fFyFFF%"GG(I!prscfg.coutputyytranslateyytnameyyr1yyr2yydefactyydefgotoyypactyypgotoyytableyycheckyystosyytnamerryysyntax_erroryydestructprependNamefreeNameprscfgScannerStartValueprscfgScannerEndValueprscfg_yyerrorprscfgGetLineNocloneNamecompileNameplainOptDefprscfgScannerInitprscfgScannerFinishprscfgScannerInitBufferyy_acceptyy_ecyy_metayy_baseyy_defyy_nxtyy_chkbufprscfg_yyensure_buffer_stackprscfg_yy_load_buffer_statescan_yyerrorstrdupnyyunputaddcharaddstringyy_fatal_erroryy_get_previous_stateyy_try_NUL_transyy_get_next_bufferprscfg_yy_init_bufferyy_push_stateyy_pop_stateyy_init_globalsstrlenstpcpyprscfg_yyparse__gcc_personality_v0mallocmemcpyfreeprscfg_yylexatoi_Unwind_Resumeout_warningstrdupfreeCfgDefparseCfgDefparseCfgDefBufferstdinstdoutprscfg_yy_create_bufferprscfg_yyrealloc_IO_getcferror__errno_locationclearerrfreadprscfg_yyrestartprscfg_yy_switch_to_bufferprscfg_yyallocprscfg_yy_delete_bufferprscfg_yyfreeprscfg_yy_flush_bufferprscfg_yypush_buffer_stateprscfg_yypop_buffer_statememsetprscfg_yy_scan_bufferprscfg_yy_scan_stringprscfg_yy_scan_bytesstderrfprintfexitprscfg_yyget_extraprscfg_yyget_linenoprscfg_yyget_columnprscfg_yyget_inprscfg_yyget_outprscfg_yyget_lengprscfg_yyget_textprscfg_yyset_extraprscfg_yyset_linenoprscfg_yyset_columnprscfg_yyset_inprscfg_yyset_outprscfg_yyget_debugprscfg_yyset_debugprscfg_yyget_lvalprscfg_yyset_lvalprscfg_yylex_initprscfg_yylex_init_extraprscfg_yylex_destroyreallocCD Z p   ! y    % H x  C PG-HHIJ yJ   `3 P `  G6 Y I G YM Gl Y G( Y G Y4 GQ Y+GJ YG Y]Gz Y|KIG Y"I   @  `  L IG c   `6 K u   : O IIL M+GL Y[MN YMIX YgMLIILG YMO OIOOG Y%M1O=OIOO MFIIOOI&6EiLE L~ R S !T! !  !  !  !  " "  *" @W"  " Y# ^#N# Y# YG$ Y}$ $ $N$ Y%G3% Y% )& Y& Yn' Y' Yt( Y( Y( _) Pu) z8, , .U/ (0Vh0Wx0 T0X0X0 T0X0Y1Z?1W1[n2U2 x3 3  3  3  4  4 $4  74 @4  4  4  4  4 4  5 @6 7T9]9 :]>: ;_;_3;XS;`;X3>^?]&? M?c?U?  @c@]@ 8@A\bACvAfA]A p6BdMB B]BUC C CgC Dh DiE  9F P6GXRG]mGXGcGqGX H]*HXSHcoHqHLwI^IbI_ J_6J_aJGJ}JIJ zJMKc$K{9KT@KKKVK\dKLKcK{KeKKK\KLK LL^$L|+LL}:MHM}6NG_NH  #()0188@AHEPIXM`QhUpYx]eiv~ (08@HBB$7 ( t ( 0 8 @ HG P X ` h px44DT (5""F,F,#M###Z$p$$ $(Z%0{%8%@%H%P%Xc&` 'h'p'x'F,>((()=)F,m))$%('R) : ? ?o ?!wN) >. ?0; ?2B ?I ?P ?T W ?^ ?C l ?q ? | ?O ?A ?Z ? ? ? ?= ?] ?c ?W ?  ? ?@ ' ? 6 ?E ? T ?c ?r ?5 ? ?L ? ?] ?  ?*  ? ? ?  ?  ? . ? > ? N ?F ^ ?~o ?v ?> ?I  ?  ? ?5 ?  ? ?r' ?5: ?@ ?MF ?XU ?` ?wk ? w ?  ? ?d  ?_ ?  ? ?r ?  ? ?B  ?p ?  ? ? ? ?% ?+ ?1 ?7 ?[= ?ED ?+ P ?^ ? l ? z ?+ ? ? ?+  ?&  ?  ? ? ?  ?  ?] ?\  ?f$ ?0 ?< ? I ?Y U ?b ?qm ? x ? ?# ? ?  ? ?N ? ? ?'  ? ? ? ?, ? : ?:I ?hZ ?2f ?ur ? ? ? ? ?  ?% ?  ? ? ?r  ? ?$ ? 3 ?!B ? Q ?p ` ?o ?u ~ ? ? ? ? ? ? ?  ?  ;$ ?@ 3 ?B ?IRZ ?  ;` ?6  ?  ?j ? ? ? ? ?& ? 6 ? E JM lj r l{ ?4 ?b ?. *  ?  ' ;1 ? @ ?R O ?^ ?7o ? {   ;  ?7 ? ? ?T ?b ?} ?0 ?  ?j ?9/ ?W ? ?FO ? o ? ? ? ?Y ?  ?6 ? ? a ? \ ?&  ?j  ?& / ?6 B? ? F +O ?V _ ?<f Ho ?v  ?  ?  = ? =@ ? ?   d ? d  ?' 7/ L T  q  y       % -5/`h.. =p ? ?# ?Y.6> ;H ?7e ?px) ; ?&  ?w ?< ?) ;@ ?  ? 6 ? >FN ;X ?u ?m ; ? ?  ?&  ? ? c ;`* ?& J ? RcZb ; ?{ ;  ?I ?7 ? ? ?   ;& ?F6 ?IF ?7U ?d ?u ? b, ; ? ?7 ? ?  ?B  ?M  ? ! ? P"" ? )"2!:6"G ?V%^c&k ?rz)0, ?p*+ ?  ?b,S3 ;@ ?7  ?=  ?& ?J@ ?O-Wo1d ?s(.{l/ ?.. ? /0 22 ?  ?Y&S3.\46 ;@ ?7O ?] ? z3>4 ? ?\425 ; ? ?7 ?  ?  ? ?>!25)71 ;`I ?B W ?7g ? 56 ?J ?=  ? ?77 ; ? ?7 ?7#9+ ; 5 ?3D ?7c ?k9s9{ ; ?7 ? 9o: ; ? ?W  ?7 ?o:; ;@6 ?7U ? ];e;m ; ? ?7 ? ?h;< ;  ?7 ? <!=) ;` 3 ?3B ?7b ?Cj=r>z ;  ?7 ? >4@ ;  ?7 ? ?2@ ?\  ?j!4@)JA1 ; ; ?J ?W Y ?7w ?JA|A ;  ? ?7 ?|AgB ;@  ?8  ? ?7H ?"PgBXpC` ; j ? y ?7B'C ?  ?s pCC ;  ?7 ?a C D ;` + ?7< ?HDP)DX ; b ?7 ?s)DD ;  ?7 ?DD ;l  ?7 ? D"E* ; 4 ?7T ?`Eh!Ep ;,z ?7 ?K!E:E ; ?7 ?:EWE ; ?7& ? .WE6xE> ;LH ?W ?7w ?xEE ; ?f  ?7 ? EdF ;  ? ?7 ?J!dF)F1 ;l; ?J ?7j ?JrFzF ; ?  ?7 ?OFF ;, ?7 ? F F ;# ?y2 ?7R ?k^ Ff Fn ;x ?7 ? F "G ;L ? ?7 ? "G G! ;! ?H &! ?2!G:!HB! ; L! ? \! ?H l! ?/ }! ? !H!(I! ;l! ?7! ?!(I!IJ! ;! ?7 " ?"IJ"gJ%" ;,/" ?W >" ?7O" ?=["gJc"Jk" ;" ?W " ?7" ?."J"J" ;" ?7" ?h "J"J# ;L# ?+'# ?m 2#J:#jKB# ;Y# ?L g# ? v# ?#jK#K# ; # ?F# ?L # ? # ?6#K#5L# ;l# ? # ? #5L$TL$ ;$ ? ($ ?0$TL8$nL@$ ;,J$ ? Z$ ? f$nLn$Lv$ ;$ ?7$ ?$L$cM$ ;$ ?7$ ?$cM$N$ ;L% ?7#% ?/%N7%wN?% ;X% ?W w% ?p%% ?%% ?%% ? & & ? &`9& ?F&d& ?Lq&& ?&& ?{ &@& ? &`& ? & ' ?V'6' ?M C' a' ?b n'' ?D' ' ?' ' ?' ' ?? (@( ?i%(?(H( ?U( ?b( ?<  9= @` F ) ,LU pc * 8 b,HS3p\425779 9@o:`;;<=>4@ JA@|A`gBpCCD)DDD<E\!E|:EWExEEdFF<F\F|FF"GG FH (I@IJ`gJJJJ TjK `K(5LHTLhnLLcMNwarning.c.o/ 1378727459 1000 1000 100664 6072 ` ELF> @@UHH,H`HhLpLxt )E)M)U)])e)m)u)}H Dž8Dž<0HEH@HPHHHHǸHH8H HHH -  %intt(e  B# B# l# l# tO{ &F         33B ) +Q# -Q# /n# 0#vF~~ap~ \% $ > $ >   I: ; II!I/  : ;  : ; I8 &I  : ;  ( < .? : ; ' @B : ; I : ; I 4: ; I 4: ; I?  wwvw,F  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includewarning.cstdarg.hstdio.hprscfg.hstdint.htbuf.h 1'- /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/warning.cCNF_MISSEDCNF_NOMEMORYpoolfp_offsetCNF_SYNTAXERRORCNF_NOTSETdata__gnuc_va_listout_warningCNF_WRONGTYPEsizelong unsigned intshort unsigned intva_listcapacityCNF_OKtbufCNF_WRONGRANGECNF_INTERNALERRORgp_offsetformatunsigned charunsigned intreg_save_areacfg_outcharoverflow_arg_areaCNF_WRONGINDEXpalloc_poolsizetypeCNF_RDONLYGNU C 4.7.3__va_list_tag/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgConfettyErrorshort intCNF_OPTIONALuint32_tlong intsigned charCNF_WRONGINTGCC: (Debian 4.7.3-4) 4.7.3zPLRx $$AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @& ,19P%K`\=j9`z0u(0 JX 0R0eHpH` p\     4@Mwarning.ccfg_outout_warning__gcc_personality_v0tbuf_printftbuf_vprintf_Unwind_Resume     !) 0 7 2> E @L 9S a 0h w c|  ! f h M   I   z  E" ( T. p4 : @ G R '] i w   a    + [  - (1 tarantool-1.5.1.218.g1a69fd6/cfg/prscfg.h0000664000000000000000000000145412232453114016155 0ustar rootroot#ifndef PRSCFG_H #define PRSCFG_H #include typedef struct NameAtom { char *name; int index; struct NameAtom *next; } NameAtom; typedef struct OptDef { enum { scalarType = 0, structType = 1, arrayType = 2 } paramType; int optional; union { char *scalarval; struct OptDef *structval; struct OptDef *arrayval; } paramValue; NameAtom *name; struct OptDef *parent; struct OptDef *next; } OptDef; OptDef* parseCfgDef(FILE *fh, int *error); OptDef* parseCfgDefBuffer(char *buffer, int *error); void freeCfgDef(OptDef *def); typedef enum ConfettyError { CNF_OK = 0, CNF_MISSED, CNF_WRONGTYPE, CNF_WRONGINDEX, CNF_RDONLY, CNF_WRONGINT, CNF_WRONGRANGE, CNF_NOMEMORY, CNF_SYNTAXERROR, CNF_NOTSET, CNF_OPTIONAL, CNF_INTERNALERROR } ConfettyError; #endif tarantool-1.5.1.218.g1a69fd6/cfg/CMakeLists.txt0000664000000000000000000000546312202131537017263 0ustar rootroot # Do not clean the generated configuration files in "make clean" # set_property(DIRECTORY PROPERTY CLEAN_NO_CUSTOM 1) execute_process(COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${CMAKE_SOURCE_DIR}/cfg/prscfg.h ${CMAKE_SOURCE_DIR}/cfg/prscfg.c) add_custom_command( OUTPUT ${CMAKE_SOURCE_DIR}/cfg/prscfg.h ${CMAKE_SOURCE_DIR}/cfg/prscfg.c COMMAND ${ECHO} '%{' > tmp.cfg COMMAND ${ECHO} '\#include \"cfg/warning.h\"' >> tmp.cfg COMMAND ${ECHO} '%}' >> tmp.cfg COMMAND ${CAT} ${CMAKE_SOURCE_DIR}/cfg/core_cfg.cfg_tmpl >> tmp.cfg COMMAND ${CONFETTI} -i tmp.cfg -n tarantool_cfg -H ${CMAKE_SOURCE_DIR}/cfg/prscfg.h -p ${CMAKE_SOURCE_DIR}/cfg/prscfg.c COMMAND ${CMAKE_COMMAND} -E remove tmp.cfg DEPENDS ${CMAKE_SOURCE_DIR}/cfg/warning.h) # # Optionally rebuild the configuration file parsing code from # templates. # macro(generate_mod_config mod) # Gracefully handle out-of-source builds with missing # 'confetti'. Make sure that generated files are older than # their sources when configuring the project. execute_process(COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.h ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.c) add_custom_command( OUTPUT ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.h ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.c COMMAND ${ECHO} '%{' > ${mod}_tmp.cfg COMMAND ${ECHO} '\#include \"cfg/warning.h\"' >> ${mod}_tmp.cfg COMMAND ${ECHO} '\#include \"cfg/tarantool_${mod}_cfg.h\"' >> ${mod}_tmp.cfg COMMAND ${ECHO} '%}' >> ${mod}_tmp.cfg COMMAND ${CAT} ${CMAKE_SOURCE_DIR}/cfg/core_cfg.cfg_tmpl >> ${mod}_tmp.cfg COMMAND ${CAT} ${CMAKE_SOURCE_DIR}/src/${mod}/${mod}_cfg.cfg_tmpl >> ${mod}_tmp.cfg COMMAND ${CONFETTI} -i ${mod}_tmp.cfg -n tarantool_cfg -c ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.c -h ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.h COMMAND ${CMAKE_COMMAND} -E remove ${mod}_tmp.cfg DEPENDS ${CMAKE_SOURCE_DIR}/cfg/core_cfg.cfg_tmpl ${CMAKE_SOURCE_DIR}/cfg/warning.h ${CMAKE_SOURCE_DIR}/src/${mod}/${mod}_cfg.cfg_tmpl ) endmacro() foreach (mod ${TARANTOOL_MODULES}) generate_mod_config(${mod}) set (generated_headers ${generated_headers} ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.h) endforeach() set_source_files_properties(${CMAKE_SOURCE_DIR}/cfg/prscfg.c PROPERTIES COMPILE_FLAGS "-Wno-unused") add_library(cfg prscfg.c warning.c) # # Make sure all generated headers are built before they are used. # This is also necessary to avoid races in parallel make, # when tmp.cfg is corrupted by two paralled targets. # See http://www.cmake.org/Bug/view.php?id=10082 for details. # add_custom_target(config DEPENDS ${CMAKE_SOURCE_DIR}/cfg/prscfg.h ${generated_headers}) tarantool-1.5.1.218.g1a69fd6/cfg/Makefile0000664000000000000000000002247512213333034016163 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 cfg/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 cfg/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 cfg/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 cfg/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. cfg/CMakeFiles/cfg.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 cfg/CMakeFiles/cfg.dir/rule .PHONY : cfg/CMakeFiles/cfg.dir/rule # Convenience name for target. cfg: cfg/CMakeFiles/cfg.dir/rule .PHONY : cfg # fast build rule for target. cfg/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/build .PHONY : cfg/fast # Convenience name for target. cfg/CMakeFiles/config.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 cfg/CMakeFiles/config.dir/rule .PHONY : cfg/CMakeFiles/config.dir/rule # Convenience name for target. config: cfg/CMakeFiles/config.dir/rule .PHONY : config # fast build rule for target. config/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/config.dir/build.make cfg/CMakeFiles/config.dir/build .PHONY : config/fast prscfg.o: prscfg.c.o .PHONY : prscfg.o # target to build an object file prscfg.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/prscfg.c.o .PHONY : prscfg.c.o prscfg.i: prscfg.c.i .PHONY : prscfg.i # target to preprocess a source file prscfg.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/prscfg.c.i .PHONY : prscfg.c.i prscfg.s: prscfg.c.s .PHONY : prscfg.s # target to generate assembly for a file prscfg.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/prscfg.c.s .PHONY : prscfg.c.s warning.o: warning.c.o .PHONY : warning.o # target to build an object file warning.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/warning.c.o .PHONY : warning.c.o warning.i: warning.c.i .PHONY : warning.i # target to preprocess a source file warning.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/warning.c.i .PHONY : warning.c.i warning.s: warning.c.s .PHONY : warning.s # target to generate assembly for a file warning.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/warning.c.s .PHONY : warning.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... cfg" @echo "... config" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... prscfg.o" @echo "... prscfg.i" @echo "... prscfg.s" @echo "... warning.o" @echo "... warning.i" @echo "... warning.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/cfg/warning.h0000664000000000000000000000026012202131537016327 0ustar rootroot#ifndef TARANTOOL_WARNING_H #define TARANTOOL_WARNING_H #include "prscfg.h" extern struct tbuf *cfg_out; void out_warning(ConfettyError r, const char *format, ...); #endif tarantool-1.5.1.218.g1a69fd6/src/0000775000000000000000000000000012242653271014553 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/cmake_install.cmake0000664000000000000000000000312312213333034020350 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/src/coio_buf.cc0000664000000000000000000000247012202131537016642 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "coio_buf.h" tarantool-1.5.1.218.g1a69fd6/src/recovery.cc0000664000000000000000000010406212231715276016725 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "recovery.h" #include #include "log_io.h" #include "fiber.h" #include "tt_pthread.h" #include "fio.h" #include "errinj.h" /* * Recovery subsystem * ------------------ * * A facade of the recovery subsystem is struct recovery_state, * which is a singleton. * * Depending on the configuration, start-up parameters, the * actual task being performed, the recovery can be * in a different state. * * The main factors influencing recovery state are: * - temporal: whether or not the instance is just booting * from a snapshot, is in 'local hot standby mode', or * is already accepting requests * - topological: whether or not it is a master instance * or a replica * - task based: whether it's a master process, * snapshot saving process or a replication relay. * * Depending on the above factors, recovery can be in two main * operation modes: "read mode", recovering in-memory state * from existing data, and "write mode", i.e. recording on * disk changes of the in-memory state. * * Let's enumerate all possible distinct states of recovery: * * Read mode * --------- * IR - initial recovery, initiated right after server start: * reading data from the snapshot and existing WALs * and restoring the in-memory state * IRR - initial replication relay mode, reading data from * existing WALs (xlogs) and sending it to the client. * * HS - standby mode, entered once all existing WALs are read: * following the WAL directory for all changes done by the master * and updating the in-memory state * RR - replication relay, following the WAL directory for all * changes done by the master and sending them to the * replica * * Write mode * ---------- * M - master mode, recording in-memory state changes in the WAL * R - replica mode, receiving changes from the master and * recording them in the WAL * S - snapshot mode, writing entire in-memory state to a compact * snapshot file. * * The following state transitions are possible/supported: * * recovery_init() -> IR | IRR # recover() * IR -> HS # recovery_follow_local() * IRR -> RR # recovery_follow_local() * HS -> M # recovery_finalize() * M -> R # recovery_follow_remote() * R -> M # recovery_stop_remote() * M -> S # snapshot() * R -> S # snapshot() */ struct recovery_state *recovery_state; static const uint64_t snapshot_cookie = 0; const char *wal_mode_STRS[] = { "none", "write", "fsync", "fsync_delay", NULL }; /* {{{ LSN API */ void wait_lsn_set(struct wait_lsn *wait_lsn, int64_t lsn) { assert(wait_lsn->waiter == NULL); wait_lsn->waiter = fiber; wait_lsn->lsn = lsn; } /* Alert the waiter, if any. */ static inline void wakeup_lsn_waiter(struct recovery_state *r) { if (r->wait_lsn.waiter && r->confirmed_lsn >= r->wait_lsn.lsn) { fiber_wakeup(r->wait_lsn.waiter); } } void confirm_lsn(struct recovery_state *r, int64_t lsn, bool is_commit) { assert(r->confirmed_lsn <= r->lsn); if (r->confirmed_lsn < lsn) { if (is_commit) { if (r->confirmed_lsn + 1 != lsn) say_warn("non consecutive LSN, confirmed: %jd, " " new: %jd, diff: %jd", (intmax_t) r->confirmed_lsn, (intmax_t) lsn, (intmax_t) (lsn - r->confirmed_lsn)); r->confirmed_lsn = lsn; } } else { /* * There can be holes in * confirmed_lsn, in case of disk write failure, but * wal_writer never confirms LSNs out order. */ assert(false); say_error("LSN is used twice or COMMIT order is broken: " "confirmed: %jd, new: %jd", (intmax_t) r->confirmed_lsn, (intmax_t) lsn); } wakeup_lsn_waiter(r); } void set_lsn(struct recovery_state *r, int64_t lsn) { r->lsn = lsn; r->confirmed_lsn = lsn; say_debug("set_lsn(%p, %" PRIi64, r, r->lsn); wakeup_lsn_waiter(r); } /** Wait until the given LSN makes its way to disk. */ void recovery_wait_lsn(struct recovery_state *r, int64_t lsn) { while (lsn < r->confirmed_lsn) { wait_lsn_set(&r->wait_lsn, lsn); try { fiber_yield(); wait_lsn_clear(&r->wait_lsn); } catch (const Exception& e) { wait_lsn_clear(&r->wait_lsn); throw; } } } int64_t next_lsn(struct recovery_state *r) { r->lsn++; say_debug("next_lsn(%p, %" PRIi64, r, r->lsn); return r->lsn; } /* }}} */ /* {{{ Initial recovery */ static int wal_writer_start(struct recovery_state *state); void wal_writer_stop(struct recovery_state *r); static void recovery_stop_local(struct recovery_state *r); void recovery_init(const char *snap_dirname, const char *wal_dirname, row_handler row_handler, void *row_handler_param, int rows_per_wal, int flags) { assert(recovery_state == NULL); recovery_state = (struct recovery_state *) p0alloc(eter_pool, sizeof(struct recovery_state)); struct recovery_state *r = recovery_state; recovery_update_mode(r, "none", 0); if (rows_per_wal <= 1) panic("unacceptable value of 'rows_per_wal'"); r->row_handler = row_handler; r->row_handler_param = row_handler_param; r->snap_dir = &snap_dir; r->snap_dir->dirname = strdup(snap_dirname); r->wal_dir = &wal_dir; r->wal_dir->dirname = strdup(wal_dirname); r->wal_dir->open_wflags = r->wal_mode == WAL_FSYNC ? WAL_SYNC_FLAG : 0; r->rows_per_wal = rows_per_wal; wait_lsn_clear(&r->wait_lsn); r->flags = flags; } void recovery_update_mode(struct recovery_state *r, const char *mode, double fsync_delay) { r->wal_mode = (enum wal_mode) strindex(wal_mode_STRS, mode, WAL_MODE_MAX); assert(r->wal_mode != WAL_MODE_MAX); /* No mutex lock: let's not bother with whether * or not a WAL writer thread is present, and * if it's present, the delay will be propagated * to it whenever there is a next lock/unlock of * wal_writer->mutex. */ r->wal_fsync_delay = fsync_delay; } void recovery_update_io_rate_limit(struct recovery_state *r, double new_limit) { r->snap_io_rate_limit = new_limit * 1024 * 1024; if (r->snap_io_rate_limit == 0) r->snap_io_rate_limit = UINT64_MAX; } void recovery_free() { struct recovery_state *r = recovery_state; if (r == NULL) return; if (r->watcher) recovery_stop_local(r); if (r->writer) wal_writer_stop(r); free(r->snap_dir->dirname); free(r->wal_dir->dirname); if (r->current_wal) { /* * Possible if shutting down a replication * relay or if error during startup. */ log_io_close(&r->current_wal); } recovery_state = NULL; } void recovery_setup_panic(struct recovery_state *r, bool on_snap_error, bool on_wal_error) { r->wal_dir->panic_if_error = on_wal_error; r->snap_dir->panic_if_error = on_snap_error; } /** * Read a snapshot and call row_handler for every snapshot row. * Panic in case of error. */ void recover_snap(struct recovery_state *r) { /* current_wal isn't open during initial recover. */ assert(r->current_wal == NULL); say_info("recovery start"); struct log_io *snap; int64_t lsn; lsn = greatest_lsn(r->snap_dir); if (lsn <= 0) { say_error("can't find snapshot"); goto error; } snap = log_io_open_for_read(r->snap_dir, lsn, NONE); if (snap == NULL) { say_error("can't find/open snapshot"); goto error; } say_info("recover from `%s'", snap->filename); struct log_io_cursor i; log_io_cursor_open(&i, snap); const char *row; uint32_t rowlen; while ((row = log_io_cursor_next(&i, &rowlen))) { if (r->row_handler(r->row_handler_param, row, rowlen) < 0) { say_error("can't apply row"); if (snap->dir->panic_if_error) break; } } log_io_cursor_close(&i); log_io_close(&snap); if (row == NULL) { r->lsn = r->confirmed_lsn = lsn; say_info("snapshot recovered, confirmed lsn: %" PRIi64, r->confirmed_lsn); return; } error: if (greatest_lsn(r->snap_dir) <= 0) { say_crit("didn't you forget to initialize storage with --init-storage switch?"); _exit(1); } panic("snapshot recovery failed"); } #define LOG_EOF 0 /** * @retval -1 error * @retval 0 EOF * @retval 1 ok, maybe read something */ static int recover_wal(struct recovery_state *r, struct log_io *l) { int res = -1; struct log_io_cursor i; log_io_cursor_open(&i, l); const char *row; uint32_t rowlen; while ((row = log_io_cursor_next(&i, &rowlen))) { int64_t lsn = header_v11(row)->lsn; if (lsn <= r->confirmed_lsn) { say_debug("skipping too young row"); continue; } /* * After handler(row) returned, row may be * modified, do not use it. */ if (r->row_handler(r->row_handler_param, row, rowlen) < 0) { say_error("can't apply row"); if (l->dir->panic_if_error) goto end; } set_lsn(r, lsn); } res = i.eof_read ? LOG_EOF : 1; end: log_io_cursor_close(&i); /* Sic: we don't close the log here. */ return res; } /** Find out if there are new .xlog files since the current * LSN, and read them all up. * * This function will not close r->current_wal if * recovery was successful. */ static int recover_remaining_wals(struct recovery_state *r) { int result = 0; struct log_io *next_wal; int64_t current_lsn, wal_greatest_lsn; size_t rows_before; FILE *f; char *filename; enum log_suffix suffix; current_lsn = r->confirmed_lsn + 1; wal_greatest_lsn = greatest_lsn(r->wal_dir); /* if the caller already opened WAL for us, recover from it first */ if (r->current_wal != NULL) goto recover_current_wal; while (r->confirmed_lsn < wal_greatest_lsn) { /* * If a newer WAL appeared in the directory before * current_wal was fully read, try re-reading * one last time. */ if (r->current_wal != NULL) { if (r->current_wal->retry++ < 3) { say_warn("`%s' has no EOF marker, yet a newer WAL file exists:" " trying to re-read (attempt #%d)", r->current_wal->filename, r->current_wal->retry); goto recover_current_wal; } else { say_warn("WAL `%s' wasn't correctly closed", r->current_wal->filename); log_io_close(&r->current_wal); } } /* TODO: find a better way of finding the next xlog */ current_lsn = r->confirmed_lsn + 1; /* * For the last WAL, first try to open .inprogress * file: if it doesn't exist, we can safely try an * .xlog, with no risk of a concurrent * inprogress_log_rename(). */ f = NULL; suffix = INPROGRESS; if (current_lsn == wal_greatest_lsn) { /* Last WAL present at the time of rescan. */ filename = format_filename(r->wal_dir, current_lsn, suffix); f = fopen(filename, "r"); } if (f == NULL) { suffix = NONE; filename = format_filename(r->wal_dir, current_lsn, suffix); f = fopen(filename, "r"); } next_wal = log_io_open(r->wal_dir, LOG_READ, filename, suffix, f); /* * When doing final recovery, and dealing with the * last file, try opening ..inprogress. */ if (next_wal == NULL) { if (r->finalize && suffix == INPROGRESS) { /* * There is an .inprogress file, but * we failed to open it. Try to * delete it. */ say_warn("unlink broken %s WAL", filename); if (inprogress_log_unlink(filename) != 0) panic("can't unlink 'inprogres' WAL"); } result = 0; break; } assert(r->current_wal == NULL); r->current_wal = next_wal; say_info("recover from `%s'", r->current_wal->filename); recover_current_wal: rows_before = r->current_wal->rows; result = recover_wal(r, r->current_wal); if (result < 0) { say_error("failure reading from %s", r->current_wal->filename); break; } if (r->current_wal->rows > 0 && r->current_wal->rows != rows_before) { r->current_wal->retry = 0; } /* rows == 0 could indicate an empty WAL */ if (r->current_wal->rows == 0) { say_error("read zero records from %s", r->current_wal->filename); break; } if (result == LOG_EOF) { say_info("done `%s' confirmed_lsn: %" PRIi64, r->current_wal->filename, r->confirmed_lsn); log_io_close(&r->current_wal); } } /* * It's not a fatal error when last WAL is empty, but if * we lose some logs it is a fatal error. */ if (wal_greatest_lsn > r->confirmed_lsn + 1) { say_error("not all WALs have been successfully read"); result = -1; } prelease(fiber->gc_pool); return result; } /** * Recover all WALs created after the last snapshot. Panic if * error. */ void recover_existing_wals(struct recovery_state *r) { int64_t next_lsn = r->confirmed_lsn + 1; int64_t wal_lsn = find_including_file(r->wal_dir, next_lsn); if (wal_lsn <= 0) { /* No WALs to recover from. */ goto out; } r->current_wal = log_io_open_for_read(r->wal_dir, wal_lsn, NONE); if (r->current_wal == NULL) goto out; if (recover_remaining_wals(r) < 0) panic("recover failed"); say_info("WALs recovered, confirmed lsn: %" PRIi64, r->confirmed_lsn); out: prelease(fiber->gc_pool); } void recovery_finalize(struct recovery_state *r) { int result; if (r->watcher) recovery_stop_local(r); r->finalize = true; result = recover_remaining_wals(r); if (result < 0) panic("unable to successfully finalize recovery"); if (r->current_wal != NULL && result != LOG_EOF) { say_warn("WAL `%s' wasn't correctly closed", r->current_wal->filename); if (!r->current_wal->is_inprogress) { if (r->current_wal->rows == 0) /* Regular WAL (not inprogress) must contain at least one row */ panic("zero rows was successfully read from last WAL `%s'", r->current_wal->filename); } else if (r->current_wal->rows == 0) { /* Unlink empty inprogress WAL */ say_warn("unlink broken %s WAL", r->current_wal->filename); if (inprogress_log_unlink(r->current_wal->filename) != 0) panic("can't unlink 'inprogress' WAL"); } else if (r->current_wal->rows == 1) { /* Rename inprogress wal with one row */ say_warn("rename unfinished %s WAL", r->current_wal->filename); if (inprogress_log_rename(r->current_wal) != 0) panic("can't rename 'inprogress' WAL"); } else panic("too many rows in inprogress WAL `%s'", r->current_wal->filename); log_io_close(&r->current_wal); } if ((r->flags & RECOVER_READONLY) == 0) wal_writer_start(r); } /* }}} */ /* {{{ Local recovery: support of hot standby and replication relay */ /** * This is used in local hot standby or replication * relay mode: look for changes in the wal_dir and apply them * locally or send to the replica. */ struct wal_watcher { /** * Rescan the WAL directory in search for new WAL files * every wal_dir_rescan_delay seconds. */ ev_timer dir_timer; /** * When the latest WAL does not contain a EOF marker, * re-read its tail on every change in file metadata. */ ev_stat stat; /** Path to the file being watched with 'stat'. */ char filename[PATH_MAX+1]; }; static struct wal_watcher wal_watcher; static void recovery_rescan_file(ev_stat *w, int revents __attribute__((unused))); static void recovery_watch_file(struct wal_watcher *watcher, struct log_io *wal) { strncpy(watcher->filename, wal->filename, PATH_MAX); ev_stat_init(&watcher->stat, recovery_rescan_file, watcher->filename, 0.); ev_stat_start(&watcher->stat); } static void recovery_stop_file(struct wal_watcher *watcher) { ev_stat_stop(&watcher->stat); } static void recovery_rescan_dir(ev_timer *w, int revents __attribute__((unused))) { struct recovery_state *r = (struct recovery_state *) w->data; struct wal_watcher *watcher = r->watcher; struct log_io *save_current_wal = r->current_wal; int result = recover_remaining_wals(r); if (result < 0) panic("recover failed: %i", result); if (save_current_wal != r->current_wal) { if (save_current_wal != NULL) recovery_stop_file(watcher); if (r->current_wal != NULL) recovery_watch_file(watcher, r->current_wal); } } static void recovery_rescan_file(ev_stat *w, int revents __attribute__((unused))) { struct recovery_state *r = (struct recovery_state *) w->data; struct wal_watcher *watcher = r->watcher; int result = recover_wal(r, r->current_wal); if (result < 0) panic("recover failed"); if (result == LOG_EOF) { say_info("done `%s' confirmed_lsn: %" PRIi64, r->current_wal->filename, r->confirmed_lsn); log_io_close(&r->current_wal); recovery_stop_file(watcher); /* Don't wait for wal_dir_rescan_delay. */ recovery_rescan_dir(&watcher->dir_timer, 0); } } void recovery_follow_local(struct recovery_state *r, ev_tstamp wal_dir_rescan_delay) { assert(r->watcher == NULL); assert(r->writer == NULL); struct wal_watcher *watcher = r->watcher= &wal_watcher; ev_timer_init(&watcher->dir_timer, recovery_rescan_dir, wal_dir_rescan_delay, wal_dir_rescan_delay); watcher->dir_timer.data = watcher->stat.data = r; ev_timer_start(&watcher->dir_timer); /* * recover() leaves the current wal open if it has no * EOF marker. */ if (r->current_wal != NULL) recovery_watch_file(watcher, r->current_wal); } static void recovery_stop_local(struct recovery_state *r) { struct wal_watcher *watcher = r->watcher; assert(ev_is_active(&watcher->dir_timer)); ev_timer_stop(&watcher->dir_timer); if (ev_is_active(&watcher->stat)) ev_stat_stop(&watcher->stat); r->watcher = NULL; } /* }}} */ /* {{{ WAL writer - maintain a Write Ahead Log for every change * in the data state. */ struct wal_write_request { STAILQ_ENTRY(wal_write_request) wal_fifo_entry; /* Auxiliary. */ int res; struct fiber *fiber; struct row_v11 row; }; /* Context of the WAL writer thread. */ STAILQ_HEAD(wal_fifo, wal_write_request); struct wal_writer { struct wal_fifo input; struct wal_fifo commit; pthread_t thread; pthread_mutex_t mutex; pthread_cond_t cond; ev_async write_event; struct fio_batch *batch; bool is_shutdown; bool is_rollback; }; static pthread_once_t wal_writer_once = PTHREAD_ONCE_INIT; static struct wal_writer wal_writer; /** * A pthread_atfork() callback for a child process. Today we only * fork the master process to save a snapshot, and in the child * the WAL writer thread is not necessary and not present. */ static void wal_writer_child() { log_io_atfork(&recovery_state->current_wal); if (wal_writer.batch) { free(wal_writer.batch); wal_writer.batch = NULL; } /* * Make sure that atexit() handlers in the child do * not try to stop the non-existent thread. * The writer is not used in the child. */ recovery_state->writer = NULL; } /** * Today a WAL writer is started once at start of the * server. Nevertheless, use pthread_once() to make * sure we can start/stop the writer many times. */ static void wal_writer_init_once() { (void) tt_pthread_atfork(NULL, NULL, wal_writer_child); } /** * A commit watcher callback is invoked whenever there * are requests in wal_writer->commit. This callback is * associated with an internal WAL writer watcher and is * invoked in the front-end main event loop. * * A rollback watcher callback is invoked only when there is * a rollback request and commit is empty. * We roll back the entire input queue. * * ev_async, under the hood, is a simple pipe. The WAL * writer thread writes to that pipe whenever it's done * handling a pack of requests (look for ev_async_send() * call in the writer thread loop). */ static void wal_schedule_queue(struct wal_fifo *queue) { /* * Can't use STAILQ_FOREACH since fiber_call() * destroys the list entry. */ struct wal_write_request *req, *tmp; STAILQ_FOREACH_SAFE(req, queue, wal_fifo_entry, tmp) fiber_call(req->fiber); } static void wal_schedule(ev_async *watcher, int event __attribute__((unused))) { struct wal_writer *writer = (struct wal_writer *) watcher->data; struct wal_fifo commit = STAILQ_HEAD_INITIALIZER(commit); struct wal_fifo rollback = STAILQ_HEAD_INITIALIZER(rollback); (void) tt_pthread_mutex_lock(&writer->mutex); STAILQ_CONCAT(&commit, &writer->commit); if (writer->is_rollback) { STAILQ_CONCAT(&rollback, &writer->input); writer->is_rollback = false; } (void) tt_pthread_mutex_unlock(&writer->mutex); wal_schedule_queue(&commit); /* * Perform a cascading abort of all transactions which * depend on the transaction which failed to get written * to the write ahead log. Abort transactions * in reverse order, performing a playback of the * in-memory database state. */ STAILQ_REVERSE(&rollback, wal_write_request, wal_fifo_entry); wal_schedule_queue(&rollback); } /** * Initialize WAL writer context. Even though it's a singleton, * encapsulate the details just in case we may use * more writers in the future. */ static void wal_writer_init(struct wal_writer *writer) { /* I. Initialize the state. */ pthread_mutexattr_t errorcheck; (void) tt_pthread_mutexattr_init(&errorcheck); #ifndef NDEBUG (void) tt_pthread_mutexattr_settype(&errorcheck, PTHREAD_MUTEX_ERRORCHECK); #endif /* Initialize queue lock mutex. */ (void) tt_pthread_mutex_init(&writer->mutex, &errorcheck); (void) tt_pthread_mutexattr_destroy(&errorcheck); (void) tt_pthread_cond_init(&writer->cond, NULL); STAILQ_INIT(&writer->input); STAILQ_INIT(&writer->commit); ev_async_init(&writer->write_event, wal_schedule); writer->write_event.data = writer; (void) tt_pthread_once(&wal_writer_once, wal_writer_init_once); writer->batch = fio_batch_alloc(sysconf(_SC_IOV_MAX)); if (writer->batch == NULL) panic_syserror("fio_batch_alloc"); } /** Destroy a WAL writer structure. */ static void wal_writer_destroy(struct wal_writer *writer) { (void) tt_pthread_mutex_destroy(&writer->mutex); (void) tt_pthread_cond_destroy(&writer->cond); free(writer->batch); } /** WAL writer thread routine. */ static void *wal_writer_thread(void *worker_args); /** * Initialize WAL writer, start the thread. * * @pre The server has completed recovery from a snapshot * and/or existing WALs. All WALs opened in read-only * mode are closed. * * @param state WAL writer meta-data. * * @return 0 success, -1 on error. On success, recovery->writer * points to a newly created WAL writer. */ static int wal_writer_start(struct recovery_state *r) { assert(r->writer == NULL); assert(r->watcher == NULL); assert(r->current_wal == NULL); assert(! wal_writer.is_shutdown); assert(STAILQ_EMPTY(&wal_writer.input)); assert(STAILQ_EMPTY(&wal_writer.commit)); /* I. Initialize the state. */ wal_writer_init(&wal_writer); r->writer = &wal_writer; ev_async_start(&wal_writer.write_event); /* II. Start the thread. */ if (tt_pthread_create(&wal_writer.thread, NULL, wal_writer_thread, r)) { wal_writer_destroy(&wal_writer); r->writer = NULL; return -1; } return 0; } /** Stop and destroy the writer thread (at shutdown). */ void wal_writer_stop(struct recovery_state *r) { struct wal_writer *writer = r->writer; /* Stop the worker thread. */ (void) tt_pthread_mutex_lock(&writer->mutex); writer->is_shutdown= true; (void) tt_pthread_cond_signal(&writer->cond); (void) tt_pthread_mutex_unlock(&writer->mutex); if (tt_pthread_join(writer->thread, NULL) != 0) { /* We can't recover from this in any reasonable way. */ panic_syserror("WAL writer: thread join failed"); } ev_async_stop(&writer->write_event); wal_writer_destroy(writer); r->writer = NULL; } /** * Pop a bulk of requests to write to disk to process. * Block on the condition only if we have no other work to * do. Loop in case of a spurious wakeup. */ void wal_writer_pop(struct wal_writer *writer, struct wal_fifo *input) { while (! writer->is_shutdown) { if (! writer->is_rollback && ! STAILQ_EMPTY(&writer->input)) { STAILQ_CONCAT(input, &writer->input); break; } (void) tt_pthread_cond_wait(&writer->cond, &writer->mutex); } } /** * If there is no current WAL, try to open it, and close the * previous WAL. We close the previous WAL only after opening * a new one to smoothly move local hot standby and replication * over to the next WAL. * If the current WAL has only 1 record, it means we need to * rename it from '.inprogress' to '.xlog'. We maintain * '.inprogress' WALs to ensure that, at any point in time, * an .xlog file contains at least 1 valid record. * In case of error, we try to close any open WALs. * * @post r->current_wal is in a good shape for writes or is NULL. * @return 0 in case of success, -1 on error. */ static int wal_opt_rotate(struct log_io **wal, int rows_per_wal, struct log_dir *dir, int64_t lsn) { struct log_io *l = *wal, *wal_to_close = NULL; ERROR_INJECT_RETURN(ERRINJ_WAL_ROTATE); if (l != NULL && (l->rows >= rows_per_wal || lsn % rows_per_wal == 0)) { /* * if l->rows == 1, log_io_close() does * inprogress_log_rename() for us. */ wal_to_close = l; l = NULL; } if (l == NULL) { /* Open WAL with '.inprogress' suffix. */ l = log_io_open_for_write(dir, lsn, INPROGRESS); /* * Close the file *after* we create the new WAL, since * this is when replication relays get an inotify alarm * (when we close the file), and try to reopen the next * WAL. In other words, make sure that replication relays * try to open the next WAL only when it exists. */ if (wal_to_close) { /* * We can not handle log_io_close() * failure in any reasonable way. * A warning is written to the server * log file. */ log_io_close(&wal_to_close); } } else if (l->rows == 1) { /* * Rename WAL after the first successful write * to a name without .inprogress suffix. */ if (inprogress_log_rename(l)) log_io_close(&l); /* error. */ } assert(wal_to_close == NULL); *wal = l; return l ? 0 : -1; } static void wal_opt_sync(struct log_io *wal, double sync_delay) { static ev_tstamp last_sync = 0; if (sync_delay > 0 && ev_now() - last_sync >= sync_delay) { /* * XXX: in case of error, we don't really know how * many records were not written to disk: probably * way more than the last one. */ (void) log_io_sync(wal); last_sync = ev_now(); } } static struct wal_write_request * wal_fill_batch(struct log_io *wal, struct fio_batch *batch, int rows_per_wal, struct wal_write_request *req) { int max_rows = wal->is_inprogress ? 1 : rows_per_wal - wal->rows; /* Post-condition of successful wal_opt_rotate(). */ assert(max_rows > 0); fio_batch_start(batch, max_rows); while (req != NULL && ! fio_batch_is_full(batch)) { struct row_v11 *row = &req->row; header_v11_sign(&row->header); fio_batch_add(batch, row, row_v11_size(row)); req = STAILQ_NEXT(req, wal_fifo_entry); } return req; } static struct wal_write_request * wal_write_batch(struct log_io *wal, struct fio_batch *batch, struct wal_write_request *req, struct wal_write_request *end) { int rows_written = fio_batch_write(batch, fileno(wal->f)); wal->rows += rows_written; while (req != end && rows_written-- != 0) { req->res = 0; req = STAILQ_NEXT(req, wal_fifo_entry); } return req; } static void wal_write_to_disk(struct recovery_state *r, struct wal_writer *writer, struct wal_fifo *input, struct wal_fifo *commit, struct wal_fifo *rollback) { struct log_io **wal = &r->current_wal; struct fio_batch *batch = writer->batch; struct wal_write_request *req = STAILQ_FIRST(input); struct wal_write_request *write_end = req; while (req) { if (wal_opt_rotate(wal, r->rows_per_wal, r->wal_dir, req->row.header.lsn) != 0) break; struct wal_write_request *batch_end; batch_end = wal_fill_batch(*wal, batch, r->rows_per_wal, req); write_end = wal_write_batch(*wal, batch, req, batch_end); if (batch_end != write_end) break; wal_opt_sync(*wal, r->wal_fsync_delay); req = write_end; } STAILQ_SPLICE(input, write_end, wal_fifo_entry, rollback); STAILQ_CONCAT(commit, input); } /** WAL writer thread main loop. */ static void * wal_writer_thread(void *worker_args) { struct recovery_state *r = (struct recovery_state *) worker_args; struct wal_writer *writer = r->writer; struct wal_fifo input = STAILQ_HEAD_INITIALIZER(input); struct wal_fifo commit = STAILQ_HEAD_INITIALIZER(commit); struct wal_fifo rollback = STAILQ_HEAD_INITIALIZER(rollback); (void) tt_pthread_mutex_lock(&writer->mutex); while (! writer->is_shutdown) { wal_writer_pop(writer, &input); (void) tt_pthread_mutex_unlock(&writer->mutex); wal_write_to_disk(r, writer, &input, &commit, &rollback); (void) tt_pthread_mutex_lock(&writer->mutex); STAILQ_CONCAT(&writer->commit, &commit); if (! STAILQ_EMPTY(&rollback)) { /* * Begin rollback: create a rollback queue * from all requests which were not * written to disk and all requests in the * input queue. */ writer->is_rollback = true; STAILQ_CONCAT(&rollback, &writer->input); STAILQ_CONCAT(&writer->input, &rollback); } ev_async_send(&writer->write_event); } (void) tt_pthread_mutex_unlock(&writer->mutex); if (r->current_wal != NULL) log_io_close(&r->current_wal); return NULL; } /** * WAL writer main entry point: queue a single request * to be written to disk and wait until this task is completed. */ int wal_write(struct recovery_state *r, int64_t lsn, uint64_t cookie, uint16_t op, const char *row, uint32_t row_len) { say_debug("wal_write lsn=%" PRIi64, lsn); ERROR_INJECT_RETURN(ERRINJ_WAL_IO); if (r->wal_mode == WAL_NONE) return 0; struct wal_writer *writer = r->writer; struct wal_write_request *req = (struct wal_write_request *) palloc(fiber->gc_pool, sizeof(struct wal_write_request) + sizeof(op) + row_len); req->fiber = fiber; req->res = -1; row_v11_fill(&req->row, lsn, XLOG, cookie, (const char *) &op, sizeof(op), row, row_len); (void) tt_pthread_mutex_lock(&writer->mutex); bool input_was_empty = STAILQ_EMPTY(&writer->input); STAILQ_INSERT_TAIL(&writer->input, req, wal_fifo_entry); if (input_was_empty) (void) tt_pthread_cond_signal(&writer->cond); (void) tt_pthread_mutex_unlock(&writer->mutex); fiber_yield(); /* Request was inserted. */ return req->res; } /* }}} */ /* {{{ SAVE SNAPSHOT and tarantool_box --cat */ static void snap_write_batch(struct fio_batch *batch, int fd) { int rows_written = fio_batch_write(batch, fd); if (rows_written != batch->rows) { say_error("partial write: %d out of %d rows", rows_written, batch->rows); panic_syserror("fio_batch_write"); } } void snapshot_write_row(struct log_io *l, struct fio_batch *batch, const char *metadata, size_t metadata_len, const char *data, size_t data_len) { static int rows; static uint64_t bytes; ev_tstamp elapsed; static ev_tstamp last = 0; struct row_v11 *row = (struct row_v11 *) palloc(fiber->gc_pool, sizeof(struct row_v11) + data_len + metadata_len); row_v11_fill(row, 0, SNAP, snapshot_cookie, metadata, metadata_len, data, data_len); header_v11_sign(&row->header); fio_batch_add(batch, row, row_v11_size(row)); bytes += row_v11_size(row); if (++rows % 100000 == 0) say_crit("%.1fM rows written", rows / 1000000.); if (fio_batch_is_full(batch) || bytes > recovery_state->snap_io_rate_limit) { snap_write_batch(batch, fileno(l->f)); fio_batch_start(batch, INT_MAX); prelease_after(fiber->gc_pool, 128 * 1024); if (recovery_state->snap_io_rate_limit != UINT64_MAX) { if (last == 0) { /* * Remember the time of first * write to disk. */ ev_now_update(); last = ev_now(); } /** * If io rate limit is set, flush the * filesystem cache, otherwise the limit is * not really enforced. */ fdatasync(fileno(l->f)); } while (bytes >= recovery_state->snap_io_rate_limit) { ev_now_update(); /* * How much time have passed since * last write? */ elapsed = ev_now() - last; /* * If last write was in less than * a second, sleep until the * second is reached. */ if (elapsed < 1) usleep(((1 - elapsed) * 1000000)); ev_now_update(); last = ev_now(); bytes -= recovery_state->snap_io_rate_limit; } } } void snapshot_save(struct recovery_state *r, void (*f) (struct log_io *, struct fio_batch *)) { struct log_io *snap; snap = log_io_open_for_write(r->snap_dir, r->confirmed_lsn, INPROGRESS); if (snap == NULL) panic_status(errno, "Failed to save snapshot: failed to open file in write mode."); struct fio_batch *batch = fio_batch_alloc(sysconf(_SC_IOV_MAX)); if (batch == NULL) panic_syserror("fio_batch_alloc"); fio_batch_start(batch, INT_MAX); /* * While saving a snapshot, snapshot name is set to * .snap.inprogress. When done, the snapshot is * renamed to .snap. */ say_info("saving snapshot `%s'", format_filename(r->snap_dir, r->confirmed_lsn, NONE)); f(snap, batch); if (batch->rows) snap_write_batch(batch, fileno(snap->f)); free(batch); log_io_close(&snap); say_info("done"); } /** * Read WAL/SNAPSHOT and invoke a callback on every record (used * for --cat command line option). * @retval 0 success * @retval -1 error */ int read_log(const char *filename, row_handler *xlog_handler, row_handler *snap_handler, void *param) { struct log_dir *dir; row_handler *h; if (strstr(filename, wal_dir.filename_ext)) { dir = &wal_dir; h = xlog_handler; } else if (strstr(filename, snap_dir.filename_ext)) { dir = &snap_dir; h = snap_handler; } else { say_error("don't know how to read `%s'", filename); return -1; } FILE *f = fopen(filename, "r"); struct log_io *l = log_io_open(dir, LOG_READ, filename, NONE, f); if (l == NULL) return -1; struct log_io_cursor i; log_io_cursor_open(&i, l); const char *row; uint32_t rowlen; while ((row = log_io_cursor_next(&i, &rowlen))) h(param, row, rowlen); log_io_cursor_close(&i); log_io_close(&l); return 0; } /* }}} */ tarantool-1.5.1.218.g1a69fd6/src/exception.cc0000664000000000000000000000603412231715276017065 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "exception.h" #include "say.h" #include #include #include Exception::Exception(const char *file, unsigned line) : m_file(file), m_line(line) { m_errmsg[0] = 0; } Exception::Exception(const Exception& e) : Object(), m_file(e.m_file), m_line(e.m_line) { memcpy(m_errmsg, e.m_errmsg, sizeof(m_errmsg)); } SystemError::SystemError(const char *file, unsigned line) : Exception(file, line), m_errnum(errno) { /* nothing */ } void SystemError::init(const char *format, ...) { va_list ap; va_start(ap, format); init(format, ap); va_end(ap); } void SystemError::init(const char *format, va_list ap) { vsnprintf(m_errmsg, sizeof(m_errmsg), format, ap); } void SystemError::log() const { _say(S_ERROR, m_file, m_line, strerror(m_errnum), "SystemError %s", m_errmsg); } ClientError::ClientError(const char *file, unsigned line, uint32_t errcode, ...) : Exception(file, line) { m_errcode = errcode; va_list ap; va_start(ap, errcode); vsnprintf(m_errmsg, sizeof(m_errmsg) - 1, tnt_errcode_desc(m_errcode), ap); m_errmsg[sizeof(m_errmsg) - 1] = 0; va_end(ap); } ClientError::ClientError(const char *file, unsigned line, const char *msg, uint32_t errcode) : Exception(file, line) { m_errcode = errcode; strncpy(m_errmsg, msg, sizeof(m_errmsg) - 1); m_errmsg[sizeof(m_errmsg) - 1] = 0; } void ClientError::log() const { _say(S_ERROR, m_file, m_line, NULL, "%s: %s", tnt_errcode_str(m_errcode), m_errmsg); } IllegalParams::IllegalParams(const char *file, unsigned line, const char *msg) : LoggedError(file, line, ER_ILLEGAL_PARAMS, msg) { /* nothing */ } ErrorInjection::ErrorInjection(const char *file, unsigned line, const char *msg) : LoggedError(file, line, ER_INJECTION, msg) { /* nothing */ } tarantool-1.5.1.218.g1a69fd6/src/iobuf.cc0000664000000000000000000002222112202131537016155 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "iobuf.h" #include "coio_buf.h" #include "palloc.h" /* {{{ struct ibuf */ /** Initialize an input buffer. */ static void ibuf_create(struct ibuf *ibuf, struct palloc_pool *pool) { ibuf->pool = pool; ibuf->capacity = 0; ibuf->buf = ibuf->pos = ibuf->end = NULL; /* Don't allocate the buffer yet. */ } /** Forget all cached input. */ static void ibuf_reset(struct ibuf *ibuf) { ibuf->pos = ibuf->end = ibuf->buf; } /** * Ensure the buffer has sufficient capacity * to store size bytes. */ void ibuf_reserve(struct ibuf *ibuf, size_t size) { if (size <= ibuf_unused(ibuf)) return; size_t current_size = ibuf_size(ibuf); /* * Check if we have enough space in the * current buffer. In this case de-fragment it * by moving existing data to the beginning. * Otherwise, get a bigger buffer. */ if (size + current_size <= ibuf->capacity) { memmove(ibuf->buf, ibuf->pos, current_size); } else { /* Use cfg_readahead as allocation factor. */ size_t new_capacity = MAX(ibuf->capacity * 2, cfg_readahead); while (new_capacity < current_size + size) new_capacity *= 2; ibuf->buf = (char *) palloc(ibuf->pool, new_capacity); memcpy(ibuf->buf, ibuf->pos, current_size); ibuf->capacity = new_capacity; } ibuf->pos = ibuf->buf; ibuf->end = ibuf->pos + current_size; } /* }}} */ /* {{{ struct obuf */ /** * Initialize the next slot in iovec array. The buffer * always has at least one empty slot. */ static inline void obuf_init_pos(struct obuf *buf, size_t pos) { if (pos >= IOBUF_IOV_MAX) { tnt_raise(LoggedError, ER_MEMORY_ISSUE, buf->pos, "obuf_init_pos", "iovec"); } buf->iov[pos].iov_base = NULL; buf->iov[pos].iov_len = 0; buf->capacity[pos] = 0; } /** Allocate memory for a single iovec buffer. */ static inline void obuf_alloc_pos(struct obuf *buf, size_t pos, size_t size) { size_t capacity = pos > 0 ? buf->capacity[pos-1] * 2 : cfg_readahead; while (capacity < size) { capacity *=2; } buf->iov[pos].iov_base = palloc(buf->pool, capacity); buf->capacity[buf->pos] = capacity; assert(buf->iov[pos].iov_len == 0); } /** Initialize an output buffer instance. Don't allocate memory * yet -- it may never be needed. */ void obuf_create(struct obuf *buf, struct palloc_pool *pool) { buf->pool = pool; buf->pos = 0; buf->size = 0; obuf_init_pos(buf, buf->pos); } /** Mark an output buffer as empty. */ static void obuf_reset(struct obuf *buf) { buf->pos = 0; buf->size = 0; for (struct iovec *iov = buf->iov; iov->iov_len != 0; iov++) { assert(iov < buf->iov + IOBUF_IOV_MAX); iov->iov_len = 0; } } /** Add data to the output buffer. Copies the data. */ void obuf_dup(struct obuf *buf, const void *data, size_t size) { struct iovec *iov = &buf->iov[buf->pos]; size_t capacity = buf->capacity[buf->pos]; /** * @pre buf->pos points at an array of allocated buffers. * The array ends with a zero-initialized buffer. */ while (iov->iov_len + size > capacity) { /* * The data doesn't fit into this buffer. * It could be because the buffer is not * allocated, is partially or completely full. * Copy as much as possible into already * allocated buffers. */ if (iov->iov_len < capacity) { /* * This buffer is allocated, but can't * fit all the data. Copy as much data as * possible. */ size_t fill = capacity - iov->iov_len; assert(fill < size); memcpy((char *) iov->iov_base + iov->iov_len, data, fill); iov->iov_len += fill; buf->size += fill; data = (char *) data + fill; size -= fill; /* * Check if the remainder can fit * without allocations. */ } else if (capacity == 0) { /** * Still some data to copy. We have to get * a new buffer. Before we allocate * a buffer for this position, ensure * there is an unallocated buffer in the * next one, since it works as an end * marker for the loop above. */ obuf_init_pos(buf, buf->pos + 1); obuf_alloc_pos(buf, buf->pos, size); break; } assert(capacity == iov->iov_len); buf->pos++; iov = &buf->iov[buf->pos]; capacity = buf->capacity[buf->pos]; } memcpy((char *) iov->iov_base + iov->iov_len, data, size); iov->iov_len += size; buf->size += size; assert(iov->iov_len <= buf->capacity[buf->pos]); } /** Book a few bytes in the output buffer. */ struct obuf_svp obuf_book(struct obuf *buf, size_t size) { struct iovec *iov = &buf->iov[buf->pos]; size_t capacity = buf->capacity[buf->pos]; if (iov->iov_len + size > capacity) { if (iov->iov_len > 0) { /* Move to the next buffer. */ buf->pos++; iov = &buf->iov[buf->pos]; capacity = buf->capacity[buf->pos]; } /* Make sure the next buffer can store size. */ if (capacity == 0) { obuf_init_pos(buf, buf->pos + 1); obuf_alloc_pos(buf, buf->pos, size); } else if (size > capacity) { /* Simply realloc. */ obuf_alloc_pos(buf, buf->pos, size); } } struct obuf_svp svp; svp.pos = buf->pos; svp.iov_len = iov->iov_len; svp.size = buf->size; iov->iov_len += size; buf->size += size; assert(iov->iov_len <= buf->capacity[buf->pos]); return svp; } /** Forget about data in the output buffer beyond the savepoint. */ void obuf_rollback_to_svp(struct obuf *buf, struct obuf_svp *svp) { bool is_last_pos = buf->pos == svp->pos; buf->pos = svp->pos; buf->iov[buf->pos].iov_len = svp->iov_len; buf->size = svp->size; /** * We need this check to ensure the following * loop doesn't run away. */ if (is_last_pos) return; for (struct iovec *iov = buf->iov + buf->pos + 1; iov->iov_len != 0; iov++) { assert(iov < buf->iov + IOBUF_IOV_MAX); iov->iov_len = 0; } } /* struct obuf }}} */ /* {{{ struct iobuf */ /** * How big is a buffer which needs to be shrunk before it is put * back into buffer cache. */ static int iobuf_max_pool_size() { return 18 * cfg_readahead; } SLIST_HEAD(iobuf_cache, iobuf) iobuf_cache; /** Create an instance of input/output buffer or take one from cache. */ struct iobuf * iobuf_new(const char *name) { struct iobuf *iobuf; if (SLIST_EMPTY(&iobuf_cache)) { iobuf = (struct iobuf *) palloc(eter_pool, sizeof(struct iobuf)); struct palloc_pool *pool = palloc_create_pool(""); /* Note: do not allocate memory upfront. */ ibuf_create(&iobuf->in, pool); obuf_create(&iobuf->out, pool); } else { iobuf = SLIST_FIRST(&iobuf_cache); SLIST_REMOVE_HEAD(&iobuf_cache, next); } /* When releasing the buffer, we trim it to iobuf_max_pool_size. */ assert(palloc_allocated(iobuf->in.pool) <= iobuf_max_pool_size()); palloc_set_name(iobuf->in.pool, name); return iobuf; } /** Put an instance back to the iobuf_cache. */ void iobuf_delete(struct iobuf *iobuf) { struct palloc_pool *pool = iobuf->in.pool; if (palloc_allocated(pool) < iobuf_max_pool_size()) { ibuf_reset(&iobuf->in); obuf_reset(&iobuf->out); } else { prelease(pool); ibuf_create(&iobuf->in, pool); obuf_create(&iobuf->out, pool); } palloc_set_name(pool, "iobuf_cache"); SLIST_INSERT_HEAD(&iobuf_cache, iobuf, next); } /** Send all data in the output buffer and garbage collect. */ ssize_t iobuf_flush(struct iobuf *iobuf, struct ev_io *coio) { ssize_t total = coio_writev(coio, iobuf->out.iov, obuf_iovcnt(&iobuf->out), obuf_size(&iobuf->out)); iobuf_gc(iobuf); /* * If there is some residue in the input buffer, move it * but only in case if we don't have cfg_readahead * bytes available for the next round: it's more efficient * to move any residue now, when it's likely to be small, * rather than when we have read a bunch more data, and only * then discovered we don't have enough space to read a * full request. */ ibuf_reserve(&iobuf->in, cfg_readahead); return total; } void iobuf_gc(struct iobuf *iobuf) { /* * If we happen to have fully processed the input, * move the pos to the start of the input buffer. */ if (ibuf_size(&iobuf->in) == 0) ibuf_reset(&iobuf->in); /* Cheap to do even if already done. */ obuf_reset(&iobuf->out); } int cfg_readahead; /* struct iobuf }}} */ tarantool-1.5.1.218.g1a69fd6/src/fio.c0000664000000000000000000001344312202131537015471 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "fio.h" #include #include #include #include #include #include #include #include static const char * fio_filename(int fd) { #ifdef TARGET_OS_LINUX char proc_path[32]; static __thread char filename_path[PATH_MAX]; sprintf(proc_path, "/proc/self/fd/%d", fd); ssize_t sz = readlink(proc_path, filename_path, sizeof(filename_path)); if (sz >= 0) { filename_path[sz] = '\0'; return filename_path; } #else /* TARGET_OS_LINUX */ (void) fd; #endif return ""; /* Not implemented. */ } ssize_t fio_read(int fd, void *buf, size_t count) { ssize_t to_read = (ssize_t) count; while (to_read > 0) { ssize_t nrd = read(fd, buf, to_read); if (nrd < 0) { if (errno == EINTR) { errno = 0; continue; } if (errno == EAGAIN || errno == EWOULDBLOCK) return count != to_read ? count - to_read : -1; say_syserror("read, [%s]", fio_filename(fd)); return -1; /* XXX: file position is unspecified */ } if (nrd == 0) break; buf += nrd; to_read -= nrd; } return count - to_read; } ssize_t fio_write(int fd, const void *buf, size_t count) { ssize_t to_write = (ssize_t) count; while (to_write > 0) { ssize_t nwr = write(fd, buf, to_write); if (nwr < 0) { if (errno == EINTR) { errno = 0; continue; } if (errno == EAGAIN || errno == EWOULDBLOCK) return count != to_write ? count - to_write : -1; say_syserror("write, [%s]", fio_filename(fd)); return -1; /* XXX: file position is unspecified */ } if (nwr == 0) break; buf += nwr; to_write -= nwr; } return count - to_write; } ssize_t fio_writev(int fd, struct iovec *iov, int iovcnt) { assert(iov && iovcnt >= 0); ssize_t nwr; restart: nwr = writev(fd, iov, iovcnt); if (nwr < 0) { if (errno == EINTR) { errno = 0; goto restart; } if (errno != EAGAIN && errno != EWOULDBLOCK) say_syserror("writev, [%s]", fio_filename(fd)); } return nwr; } off_t fio_lseek(int fd, off_t offset, int whence) { off_t effective_offset = lseek(fd, offset, whence); if (effective_offset == -1) { say_syserror("lseek, [%s]: offset=%jd, whence=%d", fio_filename(fd), (intmax_t) offset, whence); } else if (whence == SEEK_SET && effective_offset != offset) { say_error("lseek, [%s]: offset set to unexpected value: " "requested %jd effective %jd", fio_filename(fd), (intmax_t)offset, (intmax_t)effective_offset); } return effective_offset; } int fio_truncate(int fd, off_t offset) { int rc = ftruncate(fd, offset); if (rc) say_syserror("fio_truncate, [%s]: offset=%jd", fio_filename(fd), (intmax_t) offset); return rc; } struct fio_batch * fio_batch_alloc(long max_iov) { struct fio_batch *batch = (struct fio_batch *) malloc(sizeof(struct fio_batch) + sizeof(struct iovec) * max_iov); if (batch == NULL) return NULL; batch->bytes = batch->rows = batch->max_rows = 0; batch->max_iov = max_iov; return batch; } void fio_batch_start(struct fio_batch *batch, long max_rows) { batch->bytes = batch->rows = 0; batch->max_rows = max_rows; } void fio_batch_add(struct fio_batch *batch, void *row, ssize_t row_len) { assert(batch->max_rows > 0); assert(! fio_batch_is_full(batch)); batch->iov[batch->rows].iov_base = row; batch->iov[batch->rows].iov_len = row_len; batch->rows++; batch->bytes += row_len; } int fio_batch_write(struct fio_batch *batch, int fd) { ssize_t bytes_written = fio_writev(fd, batch->iov, batch->rows); if (bytes_written <= 0) return 0; if (bytes_written == batch->bytes) return batch->rows; say_warn("fio_batch_write, [%s]: partial write," " wrote %jd out of %jd bytes", fio_filename(fd), (intmax_t) bytes_written, (intmax_t) batch->bytes); ssize_t good_bytes = 0; struct iovec *iov = batch->iov; while (iov < batch->iov + batch->rows) { if (good_bytes + iov->iov_len > bytes_written) break; good_bytes += iov->iov_len; iov++; } /* * Unwind file position back to ensure we do not leave * partially written rows. */ off_t good_offset = fio_lseek(fd, good_bytes - bytes_written, SEEK_CUR); /* * The caller may choose to close the file right after * a partial write. Don't take chances and make sure that * there is no garbage at the end of file if it happens. */ if (good_offset != -1) (void) fio_truncate(fd, good_offset); /* * writev() doesn't set errno in case of a partial write. * If nothing else from the above failed, set errno to * EAGAIN. */ if (! errno) errno = EAGAIN; return iov - batch->iov; } tarantool-1.5.1.218.g1a69fd6/src/memcached-grammar.rl0000664000000000000000000002161212231715257020447 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ %%{ machine memcached; write data; }%% static int __attribute__((noinline)) memcached_dispatch(struct ev_io *coio, struct iobuf *iobuf) { int cs; char *p, *pe; char *fstart; struct tbuf *keys = tbuf_new(fiber->gc_pool); const char *key; bool append, show_cas; int incr_sign; uint64_t cas, incr; uint32_t flags, exptime, bytes; bool noreply = false; char *data = NULL; bool done = false; uintptr_t flush_delay = 0; size_t keys_count = 0; struct ibuf *in = &iobuf->in; struct obuf *out = &iobuf->out; /* Savepoint for 'noreply' */ struct obuf_svp obuf_svp = obuf_create_svp(out); p = in->pos; pe = in->end; say_debug("memcached_dispatch '%.*s'", MIN((int)(pe - p), 40) , p); %%{ action set { key = tbuf_read_field(keys); STORE; } action add { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple != NULL && !memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } action replace { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } action cas { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_FOUND\r\n", 11); else if (memcached_meta(tuple)->cas != cas) obuf_dup(out, "EXISTS\r\n", 8); else STORE; } action append_prepend { struct tbuf *b; const char *field; uint32_t field_len; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL) { obuf_dup(out, "NOT_STORED\r\n", 12); } else { field = tuple_field(tuple, 3, &field_len); b = tbuf_new(fiber->gc_pool); if (append) { tbuf_append(b, field, field_len); tbuf_append(b, data, bytes); } else { tbuf_append(b, data, bytes); tbuf_append(b, field, field_len); } bytes += field_len; data = b->data; STORE; } } action incr_decr { struct meta *m; struct tbuf *b; const char *field; uint32_t field_len; uint64_t value; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { m = memcached_meta(tuple); field = tuple_field(tuple, 3, &field_len); if (memcached_is_numeric(field, field_len)) { value = memcached_natoq(field, field + field_len); if (incr_sign > 0) { value += incr; } else { if (incr > value) value = 0; else value -= incr; } exptime = m->exptime; flags = m->flags; b = tbuf_new(fiber->gc_pool); tbuf_printf(b, "%" PRIu64, value); data = b->data; bytes = b->size; stats.cmd_set++; try { memcached_store(key, exptime, flags, bytes, data); stats.total_items++; obuf_dup(out, b->data, b->size); obuf_dup(out, "\r\n", 2); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } else { obuf_dup(out, "CLIENT_ERROR cannot increment or decrement non-numeric value\r\n", 62); } } } action delete { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { try { memcached_delete(key); obuf_dup(out, "DELETED\r\n", 9); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } } action get { try { memcached_get(out, keys_count, keys, show_cas); } catch (const ClientError& e) { obuf_rollback_to_svp(out, &obuf_svp); obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } action flush_all { struct fiber *f = fiber_new("flush_all", memcached_flush_all); fiber_call(f, flush_delay); obuf_dup(out, "OK\r\n", 4); } action stats { memcached_print_stats(out); } action quit { return -1; } action fstart { fstart = p; } action key_start { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } printable = [^ \t\r\n]; key = printable >key_start ; action exptime { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } exptime = digit+ >fstart %exptime; flags = digit+ >fstart %{flags = memcached_natoq(fstart, p);}; bytes = digit+ >fstart %{bytes = memcached_natoq(fstart, p);}; cas_value = digit+ >fstart %{cas = memcached_natoq(fstart, p);}; incr_value = digit+ >fstart %{incr = memcached_natoq(fstart, p);}; flush_delay = digit+ >fstart %{flush_delay = memcached_natoq(fstart, p);}; action read_data { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } action done { done = true; stats.bytes_read += p - in->pos; in->pos = p; } eol = ("\r\n" | "\n") @{ p++; }; spc = " "+; noreply = (spc "noreply"i %{ noreply = true; })?; store_command_body = spc key spc flags spc exptime spc bytes noreply eol; set = ("set"i store_command_body) @read_data @done @set; add = ("add"i store_command_body) @read_data @done @add; replace = ("replace"i store_command_body) @read_data @done @replace; append = ("append"i %{append = true; } store_command_body) @read_data @done @append_prepend; prepend = ("prepend"i %{append = false;} store_command_body) @read_data @done @append_prepend; cas = ("cas"i spc key spc flags spc exptime spc bytes spc cas_value noreply spc?) eol @read_data @done @cas; get = "get"i %{show_cas = false;} spc key (spc key)* spc? eol @done @get; gets = "gets"i %{show_cas = true;} spc key (spc key)* spc? eol @done @get; delete = "delete"i spc key (spc exptime)? noreply spc? eol @done @delete; incr = "incr"i %{incr_sign = 1; } spc key spc incr_value noreply spc? eol @done @incr_decr; decr = "decr"i %{incr_sign = -1;} spc key spc incr_value noreply spc? eol @done @incr_decr; stats = "stats"i eol @done @stats; flush_all = "flush_all"i (spc flush_delay)? noreply spc? eol @done @flush_all; quit = "quit"i eol @done @quit; main := set | cas | add | replace | append | prepend | get | gets | delete | incr | decr | stats | flush_all | quit; #main := set; write init; write exec; }%% if (!done) { say_debug("parse failed after: `%.*s'", (int)(pe - p), p); if (pe - p > (1 << 20)) { exit: say_warn("memcached proto error"); obuf_dup(out, "ERROR\r\n", 7); stats.bytes_written += 7; return -1; } char *r; if ((r = (char *) memmem(p, pe - p, "\r\n", 2)) != NULL) { in->pos = r + 2; obuf_dup(out, "CLIENT_ERROR bad command line format\r\n", 38); return 1; } return 0; } if (noreply) { obuf_rollback_to_svp(out, &obuf_svp); } return 1; } /* * Local Variables: * mode: c * End: * vim: syntax=objc */ tarantool-1.5.1.218.g1a69fd6/src/opts.c0000664000000000000000000000502112202131537015672 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool.h" #include #include const void *opt_def = gopt_start(gopt_option('g', GOPT_ARG, gopt_shorts(0), gopt_longs("cfg-get", "cfg_get"), "=KEY", "return a value from configuration file described by KEY"), gopt_option('k', 0, gopt_shorts(0), gopt_longs("check-config"), NULL, "Check configuration file for errors"), gopt_option('c', GOPT_ARG, gopt_shorts('c'), gopt_longs("config"), "=FILE", "path to configuration file (default: " DEFAULT_CFG_FILENAME ")"), gopt_option('I', 0, gopt_shorts(0), gopt_longs("init-storage", "init_storage"), NULL, "initialize storage (an empty snapshot file) and exit"), gopt_option('v', 0, gopt_shorts('v'), gopt_longs("verbose"), NULL, "increase verbosity level in log messages"), gopt_option('B', 0, gopt_shorts('B'), gopt_longs("background"), NULL, "redirect input/output streams to a log file and run as daemon"), gopt_option('h', 0, gopt_shorts('h', '?'), gopt_longs("help"), NULL, "display this help and exit"), gopt_option('V', 0, gopt_shorts('V'), gopt_longs("version"), NULL, "print program version and exit") ); tarantool-1.5.1.218.g1a69fd6/src/cpu_feature.c0000664000000000000000000000525412231715276017231 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/config.h" #include #include #include #include #include "cpu_feature.h" #if defined (__x86_64__) || defined (__i386__) #ifdef HAVE_CPUID_H #include #else #include #endif #define SCALE_F sizeof(unsigned long) #if defined (__x86_64__) #define REX_PRE "0x48, " #elif defined (__i386__) #define REX_PRE #endif static uint32_t crc32c_hw_byte(uint32_t crc, unsigned char const *data, unsigned int length) { while (length--) { __asm__ __volatile__( ".byte 0xf2, 0xf, 0x38, 0xf0, 0xf1" :"=S"(crc) :"0"(crc), "c"(*data) ); data++; } return crc; } uint32_t crc32c_hw(uint32_t crc, const unsigned char *buf, unsigned int len) { unsigned int iquotient = len / SCALE_F; unsigned int iremainder = len % SCALE_F; unsigned long *ptmp = (unsigned long *)buf; while (iquotient--) { __asm__ __volatile__( ".byte 0xf2, " REX_PRE "0xf, 0x38, 0xf1, 0xf1;" :"=S"(crc) :"0"(crc), "c"(*ptmp) ); ptmp++; } if (iremainder) { crc = crc32c_hw_byte(crc, (unsigned char const*)ptmp, iremainder); } return crc; } bool sse42_enabled_cpu() { unsigned int ax, bx, cx, dx; if (__get_cpuid(1, &ax, &bx, &cx, &dx) == 0) return 0; return (cx & (1 << 20)) != 0; } #else /* !(defined (__x86_64__) || defined (__i386__)) */ bool sse42_enabled_cpu() { return false; } #endif tarantool-1.5.1.218.g1a69fd6/src/trace.c0000664000000000000000000000430512202131537016007 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include "tarantool.h" static int level = 0; static FILE *trace_fd = NULL; void __attribute__ ((no_instrument_function, constructor)) trace_init(void) { char *trace = getenv("TARANTOOL_TRACE"); if (trace == NULL) return; if (strncmp(trace, "stderr", 6) == 0) trace_fd = stderr; else trace_fd = fopen(trace, "w+"); } void __attribute__ ((no_instrument_function)) __cyg_profile_func_enter(void *f, void *callsite __attribute__ ((unused))) { if (unlikely(trace_fd != NULL)) fprintf(trace_fd, "%i %*c%p\n", getpid(), level++, 'E', f); } void __attribute__ ((no_instrument_function)) __cyg_profile_func_exit(void *f, void *callsite __attribute__ ((unused))) { if (unlikely(trace_fd != NULL)) fprintf(trace_fd, "%i %*c%p\n", getpid(), --level, 'X', f); } tarantool-1.5.1.218.g1a69fd6/src/tbuf.c0000664000000000000000000001112012202131537015642 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tbuf.h" #include #include #include #include #include #include #ifdef POISON # define TBUF_POISON #endif #ifdef TBUF_POISON # define poison(ptr, len) memset((ptr), 'A', (len)) #else # define poison(ptr, len) #endif /** Try to make all palloc allocations a multiple of this number. */ enum { TBUF_ALLOC_FACTOR = 128 }; static void tbuf_assert(const struct tbuf *b) { (void)b; /* arg used :-) */ assert(b->size <= b->capacity); } struct tbuf * tbuf_new(struct palloc_pool *pool) { struct tbuf *e = (struct tbuf *) palloc(pool, TBUF_ALLOC_FACTOR); e->size = 0; e->capacity = TBUF_ALLOC_FACTOR - sizeof(struct tbuf); e->data = (char *)e + sizeof(struct tbuf); e->pool = pool; poison(e->data, e->capacity); tbuf_assert(e); return e; } void tbuf_ensure_resize(struct tbuf *e, size_t required) { tbuf_assert(e); /* Make new capacity a multiple of alloc factor. */ size_t new_capacity = MAX(e->capacity, (uint32_t)TBUF_ALLOC_FACTOR) * 2; while (new_capacity < e->size + required) new_capacity *= 2; char *p = (char *) palloc(e->pool, new_capacity); poison(p, new_capacity); memcpy(p, e->data, e->size); poison(e->data, e->size); e->data = p; e->capacity = new_capacity; tbuf_assert(e); } struct tbuf * tbuf_clone(struct palloc_pool *pool, const struct tbuf *orig) { struct tbuf *clone = tbuf_new(pool); tbuf_assert(orig); tbuf_append(clone, orig->data, orig->size); return clone; } struct tbuf * tbuf_split(struct tbuf *orig, size_t at) { struct tbuf *head = (struct tbuf *) palloc(orig->pool, sizeof(*orig)); assert(at <= orig->size); tbuf_assert(orig); head->pool = orig->pool; head->data = orig->data; head->size = head->capacity = at; orig->data += at; orig->capacity -= at; orig->size -= at; return head; } void * tbuf_peek(struct tbuf *b, size_t count) { void *p = b->data; tbuf_assert(b); if (count <= b->size) { b->data += count; b->size -= count; b->capacity -= count; return p; } return NULL; } /** Remove first count bytes from the beginning. */ void tbuf_ltrim(struct tbuf *b, size_t count) { tbuf_assert(b); assert(count <= b->size); memmove(b->data, b->data + count, b->size - count); b->size -= count; } void tbuf_reset(struct tbuf *b) { tbuf_assert(b); poison(b->data, b->size); b->size = 0; } void tbuf_vprintf(struct tbuf *b, const char *format, va_list ap) { int printed_len; size_t free_len = b->capacity - b->size; va_list ap_copy; va_copy(ap_copy, ap); tbuf_assert(b); printed_len = vsnprintf(b->data + b->size, free_len, format, ap); /* * if buffer too short, resize buffer and * print it again */ if (free_len <= printed_len) { tbuf_ensure(b, printed_len + 1); free_len = b->capacity - b->size - 1; printed_len = vsnprintf(b->data + b->size, free_len, format, ap_copy); } b->size += printed_len; va_end(ap_copy); } void tbuf_printf(struct tbuf *b, const char *format, ...) { va_list args; va_start(args, format); tbuf_vprintf(b, format, args); va_end(args); } /* for debug printing */ char * tbuf_to_hex(const struct tbuf *x) { const char *data = x->data; size_t size = x->size; char *out = (char *) palloc(x->pool, size * 3 + 1); out[size * 3] = 0; for (int i = 0; i < size; i++) { int c = *(data + i); sprintf(out + i * 3, "%02x ", c); } return out; } tarantool-1.5.1.218.g1a69fd6/src/libcore.a0000664000000000000000000516774012213333061016346 0ustar rootroot! / 1378727473 0 0 0 14070 ` 47777777777o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$o$[x[x[x[x[x[x[x[x[x[x[x4444444444444444444444444444444444444444444400000000000000000000000000000000JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ Fh Fh Fh Fh Fh Fh Fh Fh Fh                     78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 פ פ   +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +l +lj,.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8L*t*t*t*t*t*t*t*t*thhxxxxxxxxx:~\Ӡ%%%%%%%%%%%%%%%%%%$$$tbuf_ensure_resizetbuf_newtbuf_clonetbuf_splittbuf_peektbuf_ltrimtbuf_resettbuf_vprintftbuf_printftbuf_to_hex_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Evclassespoolseter_poolpalloc_initpalloc_create_poolpalloc_freepalloc_destroy_poolpalloc_free_unused_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedErrorpallocp0allocpallocaptruncatepreleasepalloc_resetprelease_afterpalloc_set_namepalloc_statpalloc_namepalloc_allocated_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZTV11LoggedError_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev_ZTS11LoggedError_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Objectstrindexclose_all_xcptcoredumpfdprintfbacktraceaddr2symbolprint_backtraceassert_fail_Z14compare_symbolPKvS0_symbols_loadsymbols_free_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11SystemErrorD2Ev_ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev_ZN11SocketErrorC2EPKcjiS1_z_ZTV11SocketError_Z14sio_socketnamei_ZN11SocketErrorC1EPKcjiS1_z_Z12sio_strfaddrP11sockaddr_in_Z12sio_shutdownii_ZN11SocketErrorD1Ev_ZTI11SocketError_Z18sio_listen_backlogv_Z10sio_socketiii_Z9sio_getfli_Z9sio_setfliii_Z14sio_setsockoptiiiPKvj_Z14sio_getsockoptiiiPvPj_Z11sio_connectiP11sockaddr_inj_Z8sio_bindiP11sockaddr_inj_Z10sio_listeni_Z10sio_acceptiP11sockaddr_inPj_Z8sio_readiPvm_Z9sio_writeiPKvm_Z10sio_writeviPK5ioveci_Z10sio_sendtoiPKvmiPK11sockaddr_inj_Z12sio_recvfromiPvmiP11sockaddr_inPj_Z15sio_getpeernameiP11sockaddr_in_ZN11SocketErrorD0Ev_ZN11SocketErrorD2Ev_ZTS11SocketError_ZTI11SystemError_ZTS11SystemError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_Z9evio_ptonPKcS0_P16sockaddr_storagePj_Z10evio_closeP5ev_io_Z11evio_socketP5ev_ioiii_Z19evio_setsockopt_tcpi_Z25evio_setsockopt_tcpserveri_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11SystemErrorD2Ev_ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev_Z18evio_bind_addrinfoP5ev_ioP8addrinfo_ZN11SocketErrorD1Ev_ZTI11SocketError_ZTI9Exception_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPv_Z18evio_service_startP12evio_service_Z17evio_service_stopP12evio_service_ZTV11SocketError_ZN11SocketErrorD0Ev_ZN11SocketErrorD2Ev_ZTS9Exception_ZTI6Object_ZTS11SocketError_ZTI11SystemError_ZTS6Object_ZTS11SystemError_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_Z23coio_read_ahead_timeoutP5ev_ioPvmmd_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_Z9coio_initP5ev_io_Z12coio_connectP5ev_ioP11sockaddr_in_Z20coio_connect_timeoutP5ev_ioP11sockaddr_injd_ZN11SystemErrorD2Ev_ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev_ZN11SocketErrorD1Ev_ZTI11SocketError_Z21coio_connect_addrinfoP5ev_ioP8addrinfod_Z11coio_acceptP5ev_ioP11sockaddr_injd_Z16coio_readn_aheadP5ev_ioPvmm_Z24coio_readn_ahead_timeoutP5ev_ioPvmmd_Z18coio_write_timeoutP5ev_ioPKvmd_ZTI9Exception_Z11coio_writevP5ev_ioP5iovecim_Z19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injd_Z21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injd_Z22coio_service_on_acceptP12evio_serviceiP11sockaddr_in_Z17coio_service_initP12coio_servicePKcS2_iPFvP13__va_list_tagEPv_ZTV11SocketError_ZN11SocketErrorD0Ev_ZN11SocketErrorD2Ev_ZTS9Exception_ZTI6Object_ZTS11SocketError_ZTI11SystemError_ZTS6Object_ZTS11SystemErrorcoeio_manager_Z10coeio_initv_Z12coeio_customPFlP13__va_list_tagEdz_Z13coeio_resolveiPKcS0_d_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_Z12ibuf_reserveP4ibufmcfg_readahead_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedError_Z11obuf_createP4obufP11palloc_pool_Z8obuf_dupP4obufPKvm_Z9obuf_bookP4obufm_Z20obuf_rollback_to_svpP4obufP8obuf_svpiobuf_cache_Z9iobuf_newPKc_Z12iobuf_deleteP5iobuf_Z11iobuf_flushP5iobufP5ev_io_Z8iobuf_gcP5iobuf_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZTV11LoggedError_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev_ZTS11LoggedError_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Evred_zoneMAX_SLAB_ITEM_COUNT_Z11salloc_initmmd_Z11salloc_freev_Z13slab_validatev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_Z6sallocmPKc_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedError_Z5sfreePv_Z19salloc_ptr_to_indexPv_Z21salloc_ptr_from_indexm_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2__ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZTV11LoggedError_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev_ZTS11LoggedError_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_Z21tarantool_coro_createP14tarantool_coroPFvPvES1__ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedError_Z22tarantool_coro_destroyP14tarantool_coro_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZTV11LoggedError_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev_ZTS11LoggedError_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Objectstatsstat_max_name_len_Z13stat_registerPPKcm_Z12stat_collectiil_Z12stat_foreachPFiPKcilPvES1__Z8stat_ageP8ev_timeri_Z9stat_initv_Z9stat_freev_Z12stat_cleanupimdefault_version_Z15header_v11_signP10header_v11_Z12row_v11_fillP7row_v11ltmPKcmS2_msnap_dirwal_dir_Z12greatest_lsnP7log_dir_Z19find_including_fileP7log_dirl_Z15format_filenameP7log_dirl10log_suffix_Z14row_reader_v11P8_IO_FILEPj_Z18log_io_cursor_openP13log_io_cursorP6log_io_Z19log_io_cursor_closeP13log_io_cursor_Z18log_io_cursor_nextP13log_io_cursorPj_Z21inprogress_log_renameP6log_io_Z21inprogress_log_unlinkPc_Z12log_io_closePP6log_io_Z11log_io_syncP6log_io_Z13log_io_atforkPP6log_io_Z11log_io_openP7log_dir8log_modePKc10log_suffixP8_IO_FILE_Z20log_io_open_for_readP7log_dirl10log_suffix_Z21log_io_open_for_writeP7log_dirl10log_suffixrecovery_statewal_mode_STRSwait_lsn_setconfirm_lsnset_lsnrecovery_wait_lsn_ZTI9Exceptionnext_lsnrecovery_initrecovery_update_moderecovery_update_io_rate_limitrecovery_free_Z15wal_writer_stopP14recovery_staterecovery_setup_panicrecover_snaprecover_existing_walsrecovery_finalizerecovery_follow_local_Z14wal_writer_popP10wal_writerP8wal_fifowal_writesnapshot_write_rowsnapshot_saveread_log_ZTS9Exception_ZTI6Object_ZTS6Object_Z9show_statP4tbuf_Z10admin_initPKcicrc32c_hwsse42_enabled_cpu_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Ev_Z15remote_read_rowP5ev_ioP5iobufPj_ZN13IllegalParamsD1Ev_ZTI13IllegalParams_ZTI9Exception_ZTI20FiberCancelExceptionrecovery_follow_remoterecovery_stop_remote_ZTV13IllegalParams_ZN13IllegalParamsD0Ev_ZN13IllegalParamsD2Ev_ZTS9Exception_ZTI6Object_ZTS20FiberCancelException_ZTS13IllegalParams_ZTI11LoggedError_ZTS6Object_ZTS11LoggedError_ZTI11ClientError_ZTS11ClientError_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZNK9Exception6errmsgEv_ZNK11ClientError7errcodeEv_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Ev_ZN13IllegalParamsD1Ev_ZTI13IllegalParams_ZTI9Exception_ZTI11ClientError_Z11iproto_initPKcii_ZTV13IllegalParams_ZN13IllegalParamsD0Ev_ZN13IllegalParamsD2Ev_ZTS11ClientError_ZTS9Exception_ZTI6Object_ZTS13IllegalParams_ZTI11LoggedError_ZTS6Object_ZTS11LoggedErroriproto_port_vtab_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Evsid_maxsession_on_connectsession_on_disconnect_Z14session_createi_ZTI11ClientError_ZTI9Exception_Z15session_destroyj_Z10session_fdj_Z12session_initv_Z12session_freev_ZTS9Exception_ZTI6Object_ZTS11ClientError_ZTS6Object_ZN6ObjectC2Ev_ZTV6Object_ZN6ObjectC1Ev_ZN6ObjectD2Ev_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionC2EPKcj_ZTV9Exception_ZN9ExceptionC1EPKcj_ZN9ExceptionC2ERKS__ZN9ExceptionC1ERKS__ZN9ExceptionD2Ev_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11SystemErrorC2EPKcj_ZTV11SystemError_ZN11SystemErrorC1EPKcj_ZN11SystemError4initEPKcz_ZN11SystemError4initEPKcP13__va_list_tag_ZNK11SystemError3logEv_ZN11ClientErrorC2EPKcjjz_ZTV11ClientError_ZN11ClientErrorC1EPKcjjz_ZN11ClientErrorC2EPKcjS1_j_ZN11ClientErrorC1EPKcjS1_j_ZNK11ClientError3logEv_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Ev_ZN13IllegalParamsC2EPKcjS1__ZN11LoggedErrorC2IIPKcEEES2_jjDpT__ZTV13IllegalParams_ZN13IllegalParamsC1EPKcjS1__ZN14ErrorInjectionC2EPKcjS1__ZTV14ErrorInjection_ZN14ErrorInjectionC1EPKcjS1__ZN11LoggedErrorC2IJPKcEEES2_jjDpT__ZN11LoggedErrorC1IIPKcEEES2_jjDpT__ZN11LoggedErrorC1IJPKcEEES2_jjDpT__ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev_ZN11SystemErrorD2Ev_ZN14ErrorInjectionD1Ev_ZN14ErrorInjectionD0Ev_ZN14ErrorInjectionD2Ev_ZN13IllegalParamsD1Ev_ZN13IllegalParamsD0Ev_ZN13IllegalParamsD2Evtnt_error_codeserrinjs_Z10errinj_geti_Z10errinj_setib_Z17errinj_set_bynamePcb_Z11errinj_infoP4tbuffio_readfio_writefio_writevfio_lseekfio_truncatefio_batch_allocfio_batch_startfio_batch_addfio_batch_writecrc32_calccrc32_initrope_clearrope_insertrope_extract_noderope_eraserope_iter_startrope_iter_nextrope_traverserope_checkrope_pretty_print_Z20ipc_channel_is_emptyP11ipc_channel_Z19ipc_channel_is_fullP11ipc_channel_Z15ipc_channel_newj_Z18ipc_channel_deleteP11ipc_channel_Z23ipc_channel_get_timeoutP11ipc_channeld_Z15ipc_channel_getP11ipc_channel_Z23ipc_channel_put_timeoutP11ipc_channelPvd_Z15ipc_channel_putP11ipc_channelPv_Z23ipc_channel_has_readersP11ipc_channel_Z23ipc_channel_has_writersP11ipc_channel_Z21ipc_channel_broadcastP11ipc_channelPv_Z23tarantool_lua_info_initP9lua_State_Z23tarantool_lua_stat_initP9lua_State_Z23tarantool_lua_slab_initP9lua_State_Z22tarantool_lua_ipc_initP9lua_State_ZTI11SocketError_ZTI9Exception_Z25tarantool_lua_socket_initP9lua_State_ZTS9Exception_ZTI6Object_ZTS11SocketError_ZTI11SystemError_ZTS6Object_ZTS11SystemError_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD1Ev_ZTI11ClientError_ZTI9Exception_Z26tarantool_lua_session_initP9lua_State_ZTS11ClientError_ZTS9Exception_ZTI6Object_ZN11ClientErrorD2Ev_ZN11ClientErrorD0Ev_ZTS6Object_Z24tarantool_lua_cjson_initP9lua_Stateuuid_luatrace_init__cyg_profile_func_enter__cyg_profile_func_exit// 18 ` iproto_port.cc.o/ tbuf.c.o/ 1378727465 1000 1000 100664 14176 ` ELF>@@UHHH}HuHEHE@9v9HEHEHHE@H9HtHUHEHHUHH H}HuHUHEHPHEHH`HEHPHEH HUHEHHHEHEHEHEHPHEHUHHH}HEHE@9v8UHH H}HE辀HHEHEHE@hHEHPHEHPHEHUHPHEHjHEUHH H}HuHEHHHE@=BHEHeHEHEHH;EwHEH@HUHHHEHEHEHHHEHHHEHUHPHEHEPHEHUHH H}HuHEHHEHEHHEHEHHHEHHHEUHH H}HuHEH@HHEHEH;EsjHEHHEHPHEHPHEHPHEHPHEHEPHEPHEHEHPHEHHEHPHEPHE)HEPHEHE)HEHEUHH H}HuHEH@HEHEH^HEH;ErCHEHPHEHHEHPHEHE)HEHEPHE)HEPHEUHHH}HuHEHHEH;EsHEHH+UHEHHHEHHEH@HHHEHE)HEUHHH}HEHfHEUHHPH}HuHUHEȋPHEȋ)ȉHEHEHUH HHJHHHRHPHEHHEHPHEȋH<HMHUHEHEEHH;Er_EHcHEHHHEȋPHEȋ)ȃHEHEHPHEȋH<HMHUHEHEHEȋEHEȉHUHHH(H`HhLpLxt )E)M)U)])e)m)u)}H Dž8Dž<0HEH@HPHHH8H H(HHHUHH@H}HEH@HEHEȋHEHUHHHHPHEH@HHHEHUHHHHEHEEEHcHEHE܋UHcHEH E܉¾HϸEEHH;ErHE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacity/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tbuf.cb->size <= b->capacityat <= orig->sizecount <= b->size%02x tbuf_ensuretbuf_ltrimtbuf_splittbuf_assert RS (8OHH####f-պ int   3)Z+ #- #/#0`#  Z 2v7e7h7`  H >+b>h>+`len>X 15tb5th  z  <<`Xe>hIeIXIPNhpS`^m^`X^tP`hggXatgPih H v3bvXvPpxhbh`  bh/bap/l`H Ob~~~xt`XoutPilcL% : ; II!I/ $ >  : ;  : ; I8  $ >   I &I <  : ; ( .: ; ' @B : ; I : ; I 4I4  &.? : ; ' I@B 4: ; I .? : ; ' @B 4: ; I .? : ; ' I@B  wwtvtuwuvwvywyvwww(v()w)*w*-w-vwww@v@AwABwBEwEvwwwjvjkwklwlowovwwwrvrswstwtwwwvwwwvwwwQvQRwRSwSVwVvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includetbuf.htbuf.cstdarg.hstddef.hstdint.h 7&/1=g'!Yr.2KK2/IMػɻ2K2g=!K2g!=hY41!22>ʻ+u+22'-濻(hY+JKprinted_lentbuf_printftbuf_ensureshort intsize_tsizetypelong long inttbuf_vprintfva_list__va_list_tagheadtbuf_to_hexargstbuf_asserttbuf_peekTBUF_ALLOC_FACTORrequiredsigned chartbuf_appendfree_lenformatlong intpalloc_pool__FUNCTION__gp_offsetunsigned chartbuf_ltrimlong doubletbuf_resettbuf_newcapacitytbufuint32_tunsigned intGNU C 4.7.3tbuf_splitshort unsigned intreg_save_areachar/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srccloneorigfp_offsettbuf_ensure_resizedatalong unsigned intoverflow_arg_areasizecountnew_capacity/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tbuf.ctbuf_clone__gnuc_va_listap_copypoolGCC: (Debian 4.7.3-4) 4.7.3zRx uAC p <|AC w \8AC s |dAC _ AC  QAC L AC  AC { AC  <$AC _ zPLRx  $ AC   HAC  AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @'&T,T1X9sPK* \aj z0u50 5 005h" @&Cu &u|28> P b     t)dAQks$  #/R;tbuf.ctbuf_ensure__FUNCTION__.2636tbuf_appendtbuf_assert__FUNCTION__.3175__FUNCTION__.3199__FUNCTION__.3209assert_failtbuf_ensure_resizememcpytbuf_newpalloctbuf_clonetbuf_splittbuf_peektbuf_ltrimmemmovetbuf_resettbuf_vprintf__gcc_personality_v0vsnprintf_Unwind_Resumetbuf_printftbuf_to_hexsprintf" , 1 J6o  h #BY  h    h% *[ $|$%B"L% (  g L !) . K 5P a\ j x "  Z Y  .  > # ~     $  Q L" 40 C>  L [ o w ~u    u `  3 :B)J ` k :)    A   ? )A19 C Q _ o szk @  o  k  95 <DsL b 9p { /s ` L    ! 7  >FRN  e u  tR    4  @u`)Ak @sk #  Rpalloc.cc.o/ 1378727465 1000 1000 100664 60440 ` ELF>Pc@@RO "$')+-/134679:<=UHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUH?]UHH H}(HEH}uuHUHE@HEHEPHEH@HEH@HHEHP HHUHHEHHHEUHHHHHE!HEH#HtvHeH}uHHtEHHEH}t"HEH@HUHH HHEHEHHEHEH}tHEH@HEuHHEHEHHEHEH}tHEH@HEuUHH}]UHH0H}HuHEHHEH}tHEH@ HE HHEHE@u!HEH@ H@HHE HEH@HEH}tHE@HUH8H9suH}uHEH@HEH}tHEH@HP0HEHPH;Et-HEH8HEHEHHEH}uSHE@HEHEAA"HƿHEH}u HE@PHEPHEHEHUHPHEHPHEHPHEHP8HEHPHEHUHP H}t HE=tHEHHEHP(HEHUHHEHHEUHH}Hu]UHATSH0H}HuHUHEHHHEH}LD$H$AAAҿHHEH$AIHHHEH@H;EsHEH@HEHEHPHEHHEHPHEH@HH+UHEHPHEIHLHH0[A\]UHHĀH}HuHEHEHEHHEHEHPHEHHEHPH}tHEH@H;ErHtmagic == chunk_magicLoggedError%s at %s:%ipallocnext chunkchunk->free >= sizepoisoned((char *) ptr + PALLOC_REDZONE, size) == NULLnew_size <= pool->allocatedcut_size == 0mallocpalloc poolpalloc statistic: pools: - name: %s alloc: %lu busy chunks: - { size: %u, used: %i } classes: - { size: %u, free_chunks: %- 6i, busy_chunks: %- 6i } total: - { occupied: %lu, used: %lu } %sPptruncatepallocpalloc_slow_pathnext_chunk_forUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH!SiY w E\cxUHSHHH}HuU܉MLELMHELMLEЋM؋UHuH}H<$HǸHEHHEHHHEHHHHH[]UHHH}HEHHEHt HEHUHHH}HEHHEH11LoggedError11ClientError9Exception6ObjectCint0x37CzCf1 (  J # # # # f   " " " " $ & & & & & & & & & & ( ( ( ( * * * , .\ O               f,  ) +# -# /# 0q# 8DqF8 F# E}# F!# G8# H#  # $# %# &m# )  x-                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 :)^      8-4 4#5 5# .#brk/# 08# 18# 3w# 4j#( 5#0^ (:w?2 ?# ?#i;f# <# =f# >}# ? # 8 8#^ B Bw# B#w  K  Kq#h#4@ UbfkCCf    ! #"" #&3@ f"*Q]  $+ w  $t #%4#%6#%9t #&' 'log,   (/! 2  (1D P   f  f ) P *f + , ]-Sfd .S}+/0UC~0VJ~/0_t }0_y ~Ut 1d 1U-qf .q}+/0sC~0tJ~/0} }0}y ~1d 2, A 3A 3 4 l u 5, h4  5, h6^87ew 8e8X/9gwh:wf} /9yw`/98h; /9qh9q`9wX9wP< 8h7 8qH88@=/9h9w`98X>    ? @bh88`AU $1313 4 \e5h4 5hAU3345h4"5h78qH88@/9X> BptrP C.q.8/0`0XDptrh> /0T/00y H8 1d C+.qX.8P/DptrhC#.#qX.#8P.#8H/Dptr%hE-.-XF>.>q.>8/> 0Bh0C`/0G8X/0MT/0M0My H 1d F[G.[qX/0]h0]`Gi.iqP/0k`Fu.uqh.u8`C|q2.|H/0~qXF.qX/0qhF/0wh0`0XFHbuf/0wX0P0qH000IDifD/0f@fJF).qh.`K_.qhK8.qh2bC3LkLkLkMkC4?}?C5X5P5L5HMk5@55A@h334}5h4}5hNQq w!OP yQNff+P>[.NB NK 9Mf 9N 9O % UR$ > : ; I$ > &I I I !I/  : ;  : ; I8  : ;@ ( : ;I : ; @ : ;  : ;  : ;  : ; I8  : ; I8 2 .? 4 < dI4 I.? L 4 < d.? : ; < d/I< .? L 4 < d I  : ; ! I8 4 ".? : ; < d#.? : ; L < d$.? : ; @I< d% : ; I8 2 &.? : ; @I< d'.? : ; @L M < d(.? : ; 2 < d)!I/*I+, I-.: ;I@B .: ;I / 04: ;I 15I2.G d3I4 4.1@@dB 51 6.: ; I@B 7.: ; I@B 8: ; I 94: ; I :.? : ; I@B ;.? : ; @B <.: ; @B = : ; >4I4  ?.: ; I@B @: ; I A.G: ; dB4: ; I C.? : ;I@B D4: ;I E.: ;@B F.? : ;@B G.? : ;@B H: ;I I J!I/ K.? : ;I@B L: ; IM: ; N4: ; I?  O!P4: ; I? < Qwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw1&=&=&=& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/valgrind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bitsvalgrind.hobject.hpalloc.ccexception.hstddef.hstdint.htypes.hunistd.hstdarg.hmemcheck.htbuf.herrcode.hsay.h "2'-u .2'-u].KY3uvKɻ8K2`YrJgvvY2t.XM[t.XL22uخ0/tXtXMtu=[u+utK3Y30gx$ggx .httXght_K2gKK2?3g=$ؼ|[gc0!qt22v0=@׻2/w$/y6<.=2st.XL22SYYJ,Z?/sYuIx/ Z.j#22 % % ## # #  6Tj # VG_USERREQ__MALLOCLIKE_BLOCK_vptr.Object_ZN9ExceptionD2Evp0allocchunk_ZNK9Exception3logEvsize_tchunkserrflagssizetypefree_link_ZN11LoggedErrorD0Evvargspalloc_greatest_sizeVG_USERREQ__MAKE_MEM_UNDEFINED__ssize_tER_FIBER_STACKpoisoned__vtbl_ptr_typeER_NONMASTERcurelmER_NO_SUCH_FIELDER_OKfoundnew_sizepalloc_usedpalloc_pool_zzq_argsssize_tVG_USERREQ__CLIENT_CALL0VG_USERREQ__CLIENT_CALL1VG_USERREQ__CLIENT_CALL2VG_USERREQ__CLIENT_CALL3next_chunkVG_USERREQ__MEMPOOL_TRIMclass_initVG_USERREQ__RUNNING_ON_VALGRINDlong intVG_USERREQ__STACK_CHANGEpalloc_statpalloc_initS_DEBUGerrstr_ZNK9Exception6errmsgEvformatpalloc_nameVG_USERREQ__MAKE_MEM_NOACCESSpalloc_set_namesigned charLoggedErroruint8_t24Vg_MemCheckClientRequestoperator=chunk_list_head~LoggedError_ZN6ObjectD2Evunsigned charpalloc_create_poolpalloc_destroy_poolS_WARN/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/palloc.cc__FUNCTION____gnuc_va_listpoolsER_UNSUPPORTEDcharS_CRITVG_USERREQ__LOAD_PDB_DEBUGINFOm_linelinepreleasecapacityER_PROC_RETfree_chunksthis16Vg_ClientRequestArgsfp_offsetER_ILLEGAL_PARAMStqe_nextsay_levelpalloc_freeclass_counttqe_prevExceptionclass_next_ZN9ExceptionD0EvVALGRIND_PRINTFfileVG_USERREQ__CHECK_MEM_IS_DEFINEDm_filenext_chunk_fortnt_error_codespalloc_totalVG_USERREQ__COUNT_LEAK_BLOCKSVG_USERREQ__DISCARD_TRANSLATIONSER_TUPLE_IS_ROpoison_chunkVG_USERREQ__COUNT_ERRORS_zzq_result~ClientError_zzq_rlval~Objectchunk_sizeS_INFOER_ARG_TYPEtnt_error_codes_enum_MAXclazzER_KEY_PART_COUNT_qzz_reslong unsigned inttnt_error_codes_enumObject_ZN11LoggedErrorD2EvVG_USERREQ__MEMPOOL_EXISTSER_FIELD_TYPEsle_nextchunk_classER_RESERVED11ER_RESERVED12ER_RESERVED13ER_RESERVED14ER_RESERVED15ER_RESERVED16ER_RESERVED17linkER_RESERVED19_VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERRORallocatedpool_nextER_UNUSED36ER_SPACE_EXISTSuintptr_tVG_USERREQ__STACK_REGISTER_sayER_RESERVED20ER_RESERVED21ER_RESERVED22ER_RESERVED23VG_USERREQ__DISCARDVG_USERREQ__SET_VBITSpalloc_allocatedER_TUPLE_NOT_FOUNDER_NO_SUCH_SPACElong long intER_KEY_FIELD_TYPEva_listtqh_lastER_RESERVED18ER_SPACE_DISABLEDchunk_magicER_INJECTIONalignclass_tailq_headgp_offsetpallocaER_UNUSED24ER_UNUSED25ER_UNUSED27ER_UNUSED28ER_UNUSED29slh_firstVG_USERREQ__STACK_DEREGISTERpalloc_resetchunks_counterrcode_recordunsigned intallocated_sizeGNU C++ 4.7.3ER_UNUSED30ER_UNUSED31ER_UNUSED32ER_UNUSED33ER_UNUSED34ER_UNUSED35Vg_MemCheckClientRequestER_UNUSED37_ZN11ClientErrorD0EvVG_USERREQ__CREATE_BLOCKVG_USERREQ__COUNT_LEAKSoverflow_arg_areaER_PROC_LUAER_UNUSED8ER_UNUSED46S_ERRORerrdescER_UNKNOWN_UPDATE_OPtbufprelease_afterVG_USERREQ__FREELIKE_BLOCKVG_USERREQ__CREATE_MEMPOOL_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_VG_USERREQ__PRINTF_VALIST_BY_REFerrcodeER_UNUSEDVG_USERREQ__MOVE_MEMPOOLlong doubleTNT_ERRMSG_MAXVG_USERREQ__MEMPOOL_ALLOCER_SPLICEER_TUPLE_IS_TOO_LONG~ExceptionER_TUPLE_FOUNDpoison_charpalloc_pool_headsizeVG_USERREQ__DESTROY_MEMPOOLcut_sizelong long unsigned intreg_save_areapoolER_NO_SUCH_INDEXrz_sizechunk_usedClientErrorpalloc_slow_pathVg_ClientRequestclasseseter_poolVG_USERREQ__PRINTF_BACKTRACEbusy_linkptruncateER_EXACT_MATCHtqh_firstnameS_FATALafterpalloc_free_unusedshort intVG_USERREQ__GET_VBITS_ZN6ObjectD0Evuint64_tER_NO_SUCH_PROCm_errmsgVG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLEER_SECONDARYVG_USERREQ__CHECK_MEM_IS_ADDRESSABLEVG_USERREQ__MEMPOOL_CHANGEVG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REFER_WAL_IOER_MEMORY_ISSUEuint32_tVG_USERREQ__MEMPOOL_FREEerrmsgfree/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcshort unsigned intmagicLoggedErrorpallocVG_USERREQ__DO_LEAK_CHECK_ZN6ObjectaSERKS_chunk_freeVALGRIND_PRINTF_BACKTRACE__in_chrgVG_USERREQ__MAKE_MEM_DEFINEDER_INDEX_TYPEdata_ZN11ClientErrorD2EvVG_USERREQ__MAP_IP_TO_SRCLOCVG_USERREQ__PRINTFtypedef __va_list_tag __va_list_tagGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <AC  \1AC l |&AC a  AC F AC  AC  AC   AC E <AC  \AC N |=AC x &AC a =AC x &AC a zPLRx $$EAC G9 DLAC G dBAC } MAC H  AC E AC  ^AC Y  rAC Al ,,AC g $TAC G tAC  AC  $AC E 5AC p AC M AC M $DAC Ez d=AC x &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rodata.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.gcc_except_table.rela.text._ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_.rela.rodata._ZTV11LoggedError.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS11LoggedError.rela.rodata._ZTI11LoggedError.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group,@P4,HPR,PP5,XPb,`P6,hPf,pP7,xP,P8,P,P`,PO,P,Pl,P,P,P,P,P,P 0( P&,$611X0PP&K0Per=mHP&0P =0HP""&x0P$HFxP'1 ( , HP)PH=KhHP+p&k0P-( HP/ (0P1 0XHP4H`HP72x NIHP:e~y00P=`/P?2[7 PBDPDDPFEPH0wK0Y[ v["x[pPM`3w QN  $G X2 s=: DqW "$jE)`&^Ox E ')+-/134@D679:<=?ABDFHJLM, K     A"1P!1 \c"1r"&  D "=!/(+"==" &O""=dv""="$&"'"+=!4".CRLYBah= Mp z ^ r~ ,]5"'#=!)(Og"'"'"-&"+=!3/!7A!6S!:b!9 q!=}!<palloc.cc_ZL15VALGRIND_PRINTFPKcz_ZL25VALGRIND_PRINTF_BACKTRACEPKcz_ZL11class_count_ZL20palloc_greatest_sizev_ZL10class_initm_ZL12poison_chunkP5chunk_ZL14next_chunk_forP11palloc_poolm_ZZL14next_chunk_forP11palloc_poolmE12__FUNCTION___ZL8poisonedPKcm_ZL16palloc_slow_pathP11palloc_poolm_ZZL16palloc_slow_pathP11palloc_poolmE12__FUNCTION___ZZ6pallocE12__FUNCTION___ZL10chunk_freeP5chunk_ZZ9ptruncateE12__FUNCTION___ZL11chunk_magic_ZL11poison_char_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorC5IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Evclassespoolseter_poolmallocpalloc_initpalloc_create_poolpalloc_freepalloc_destroy_poolpalloc_free_unusedfreeassert_failmmap64_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev__gxx_personality_v0_say__cxa_allocate_exception_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedError__cxa_throw__cxa_free_exception_Unwind_Resumepallocp0allocmemsetpallocaptruncatepreleasepalloc_resetprelease_aftercallocpalloc_set_namemunmappalloc_stattbuf_printfsnprintfpalloc_namepalloc_allocated_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZN11ClientErrorC2EPKcjjz_ZTV11LoggedError_ZNK11ClientError3logEv_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev__cxa_pure_virtual_ZTS11LoggedError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEOVgvSSSSS S XUTZ[S \wS q  Y]IV^ q " h']h    i   j k l%m8 `B G L]no~ O  ] p3 rg p \6 E@ E J ] E  * ] u x h    i' ?- 8B J jO kT l\ mo y T T n o T T T T2u>\OS{z; KH|Q ^^|eT h| |;Su | |S/ <|kT %|6 C|So} <} O+PQ P `N7Pa P d_7Pe PFQ ]ncyok  c7Pk Pab QR , 1  1p 1V /- 04 1!9 1_F 1@M 1RT 1f [ 1b 1 n 1{ 14 1 1( 1q 1H 1 1v 1 1 1f 1 1 1  1h. 1N < 12 K 1rX 1 a 1Pj 1q 1fx 1n 1 1 1 1 1 1  1  1  1  11 1 1M  1  1 1 1  1  1  1 1+  1* 1 1! 1 0 19 1C 1M 1IW 1a 1 k 1u 1 16  1#  1 1  1j  1H 16 1  1  1  1* 1t 1@  1P* 19 1fG 1#U 1ac 1 x 1b  1c 1  1m 1r  1R 1/ 1  1r 1  1 1f 1 1 1l  1 1  1 1 1 1% 1+ 11 17 1= 1(C 1I 1O 1U 1[ 1a 1g 1m 1s 1 y 1  1  1  1  1  1  1  1u 1  1` 1 1 1 1  1  1  1  1w  1% 13 1. 1Q  1`  1  1E  1 1  1C ! 1A' 1. 1: 1 @ 1 F 1L 1iR 1X 1[_ 1Ds 1 1 1 1Q 1  1 1  1 1 1$ 1? 1~ M 1U [ 1fi 1#~ 1 1!  1 1  1z 1  1!  1& 1B 1d 1p 1c 1i  1 1g 1 1g 1B 1gd 1j 1 1 1 1 1a  1J 1j 1J 14 1W 1 1 1   - 1 Y  17! 11 9 B 1\R 1 1%  2 -` 1 r 0 17 1  ) 1\ 1- 1K7 1?K 1%O W 1_ -z 19 ~  & -  1 2 = - 1 =  - 1 I  1 1O# + 3 -@= E N 1\ d >m 1  1  : -  8 1@ 1k 1 1 1 : D - 1D 1# D+ W3 -`= 1@ K 1 Y 15_ h Tp Uy 1D 1 1 1  q 1 W j - 1  1K' 1?; 1*?G=O - j 1nv&~ - 1K 1? 1y= - 1 &  -@# 1u -j5= -G 1@ U 1 c}kt 1D 1 ` 1 - 1@  1   1V ! 1D? 1J OS[d 1s{ 1\ 1 1<=  -` 1@  1  ; - 18= @ H -R 1@ a 1 p 1Q   1   -  1D 1    - 1@  1;'  % 10 E9 1 H 1DWn _e h 1^ w 1  1 1  1\ 1 1!   - 1@   ( 1D7 1I 1H P X~ ` -@j 1@ y {  1D 1 ~   - 1@  1  1B   -  1   " 1@ 4 1U; CDK -` U 1@ d l*u 1 1 D - L 1 1D 1 1C] - "W+ 1: 1DI 1@ X 1fi 1;y 1Dr@ 1? 1] -  1@  1 + 16>F - P 1@ a 1lt| -@  1@  1c 1K 1 1 1;  1  - ' 1c 1K 1? 1n= -  1& -`  1 U" 1+O 1b 1 oSx 1T 1  1 @ 1  D(0<D`ht|112001 (4<HP%\%d&23366<<==>>AA$@HT\hp|99::;;>(>0C<CDD`DhEtE|HHVVWWXX[[iij (4<HP<\<d=%%&<<$=@HT\hp%|%&jkknn(0<D`ht|< < = = > > A A     ( 4 < H P \ d                $ @ H T \ h p} |} ~ ~               (  0  <  D  `  h  t  |   C C D D E E H H    ( 4 < H P \\ \d ] ] ^ ^ a a          $ @ H T \ h p |              ( 0 << <D =` h t |   % % & + 0@P`p1 (&08=@H&PX=`h&px=&/Nd @`2= :@D`W  g j) Hh=     0~ P Y x D '] @I 6hutil.cc.o/ 1378727466 1000 1000 100664 151680 ` ELF>xO@@UHHH}HEH@(HtHEH@(HUHH0H}HuUE3EHHHEHHHUHHuE;EE;Et#EHHHEHHHtuEUHSHHHHPHXL`Lht#)p)M)U)])e)m)u)}HHËHHH(HHHPHHHDžHHkH)HHHHH DžDž 0HEHH@HDž<_0s#HHЋHHHHH HEHHEHEH;EwHEH;Es_ HEHh[]UHH HHEHdHHtF+>JF+?VF+@bF+AnF+BzF+CF+DF+EF+FF+GF+HF+IF+JF+KF+LF+MF+N G+OG+P"G+Q.G+R:G+SFG+TRG+U^G+VjG,anyW-id}m# T# M# # M# M#( M#0 Z #8 #@-ifdM#H  #L E#P e #T Z #X Z #` `#h #  # m# # # m# @# m# N# "# #M# $M# %M# &M# *M# .M# Y# \# a#.em#.jm#.mm#.qm#.tm#.xm#.{m#.~m#.m#{M8888mf̦ { 8  /P m# m# M#  m#   #  m#  #  #  %#( '  #0 1 # #8 5 # #@ =  #H0orl1,posO + #-u# M#~%/M* 0,sym + #  m#-u#/0*=x,p>,i?# E# T# D # 4e # 9# AZ#(M223 p*%+b,sh T#-idM# M# h# h# e # .Rm#$.Um#$.Ym#$.\m#$._m#$.gm#$.jm#$.rm#$.wm#$.xm#$.ym#$.zm#$.{m#$.|m#$-vma# #(-lma# #0 9 #8 9 #@ 9 #H #P M#X # #` h#h m#p #x # m# O # O # O # # # # m# m# h# O # M# # .# # :# # @# # #$:2?p/(C ED # F_# GT# Hf# I_# J{# KT# 2L/WZ ZZ# \T# _8#/(d g# p# s# um# wm# ym# .{m#$4T`5/J # 9 #-iJ# 25\/ # #  M#n/  @# 9 # # # #f/([ . ] # ^ # 542$W      !"#$%&'()*+,-./0123456789:;<=>?/Ho qM# rM# sM# tR# u8# vT# wT# xm#( | #,W ~8#0 R#8 2#@422224 R2T>$2X 2$4 F$x |E      !"#$%&'()*+,-./0123456789:;<=>?                                                                                                                                                                                                                                                                                                                                                                                                                                                         22CM$rE5E5E5E5E5E5E5F5F5 F5,F58F5DF5PF5\F5hF5tF5F5F5F5F5F5F5F5F5F5F5F5G5G5G5(G54G5@G5LG5XG5dG3PM %#  N# N# N# e # e # _# _# f# f# N# N#(  O#0 O#8 3O#@ IO#H O#P 3O#X IO#` N#h N#p  O#x O# 3O# IO# O# 3O# IO#pG OO# zO# zO# O# O# O# O#  P#  %P# %P# TP# xP# P# !%P# #P# &P# /P# 0Q# 1%P# 2Q# BO# CO# E0Q# FKQ# HzQ# IQ# J%P# KQ# MQ# NR# OO# bR# dR# fS# h&S# kGS# maS# n{S# oS# rS# uS# wT# |:T# dT# T# T# T# T# U# U# HU# bU# U# U# U# U#  V# "V# IV#  V# cV#  V# yV#  V# V# cV# V# V# R# R#  W# R# )W#  nO#  ~#MpG5MMNW$}N     $N54sN~N4hN~N6 OsN4# O~O4. 3O~$O6IO# 9O tO_O ?4nOnO(I_O OO ?4 OO4 OO4 OO 9 O4 PPO 9 PO4 %PP4 NPNPN+P4 xPZP4 PPPE~P4 Pe P4 PP4%PP4MQP4 $Q$Q*Q9 TQ6KQT%6Q4 tQmtQmMQQ4QQ4QQ4Q Q4MQQQ.R 0# 5# =# ># @# A# CM#$ E#( J#0 N#8 P#@ [N#H \N#X ]N#h j/W#xQ4RR4R@R4SR6&S S6ASAS,S4 aSTMS4 {SPgS4SS4 S@# *Q*QSmS4 S@*QSS4 T*Q*QSS4P:T8!T4^T ^TS@T4PT ~PjT4TT4TT@T4T|ET4UTT4 UR8U4 HU~O 9 %U4MbUNPNU4UUNPbU @p hU4 UNPU U54UUUU6UUU4 VNPU6"V NPV6=V=V=VCV5(V4 cVOV6yVNP:iV4 VVVV4 V NPV4 VNP=VV4 W@@@V4)WT@W ?W ?JW7rmWxW/W-sp^T##W ctx$mW# %# &-##X $T# %T# &6#8)X)CX-lX .lX# /lX#CXM&Y O# cswQM# RW# T,Y#( fidVA#0 sid`A#4 bCX#8 cCX#H fiCY#X j#` kA#x lIY#5&Y6=Y=Y2YrXxY rbpxY# ret#OY9yTY:fyYhrX;AA%Z<A*QX<ATP<AAL=>CMl?J[:fdcJM}@=>L[~AapM}>N}BZAjQM~=AiYM~=>Zv~=Aj[M~ M,[C?~?g[<gM\=>iC AnowjChD{M:\:val{ML:buf{%@=Ap}%h>md>%XAlenMT=Atmp_S;+\:fdM}<T}@Eout=>+~Abuf\~>}F>T~Alen+~Ares+~ _] ?;% ^<<<-Gout=> ^X>@>Ap%PAend%>MLFAs^=>-OYWH z^=IXIhI-`H!^J!ThJ!T`J!m\J!TPK0ML_L_a0~XL_b0~P=Ma2L_hMb3L_`R_WH<0aJ<T~Gout=I>I?0aXI@MhA@IB~MjCMTBx`Mi]MP=I^Mvma_8I_8IevBaMiuML=IvMvmaw8Iw8~I}v~=IM~=MjMHPHxa=Ms^hN^bJ=MkeyWMlow^hI^`FI^XIMTOOPD?W WFbQOy;b6sbMTMTT@O>bSbOoY _bR??>Փb I,^ I-+ % : ; I$ > $ >  I&I  : ;  : ; I8 : ; I8 I !I/ : ;I8 : ; & : ; ( 9: ; 9: ;  : ;  : ; I8 2 .? : ; 2 < c dI4 I.? : ; @2 < d.? : ; @I2 < d.? : ; < d.? : ; @I< d.? : ; @< d.? : ; @I< d: ;  < ! I";# : ;$ : ;%.? : ;@I< d&.? : ;@I< d': ;(: ; I) : ;* : ;+ : ;I, : ;I- : ;I8 . : ;I 8 / : ;0 : ; 1 : ; 2: ;I3 : ;4I5< 67 : ;8 : ; 9.: ; I@B :: ; I ;.? : ; I@B <: ; I = >4: ; I ?.? : ; @B @A4: ; I B C!I/ D.: ; I@B E : ; F UG : ;H.? : ;@B I4: ;I J: ;I K.? : ;@I@B L: ;I M4: ;I N.? : ;I@B O4: ; I? < P4: ;I? < Q!R!I/ww1v12w23w36w6vwwwvwwwavabwbcwcfwfGvGHwHIwILwLvww"w"3 v3 4 w4 5 w5 8 w8  v  w  w  w x vx y wy | w| v w w w {v{|w|}w}wvwwwvw,  t ! OaF /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tarantool/usr/include/c++/4.7/bits/usr/include/x86_64-linux-gnu/c++/4.7/./bits/usr/include/c++/4.7/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/corofiber.hutil.ccstddef.htypes.hunistd.hstdint.hutil.hstdarg.hlibio.htime.hresource.hexception_ptr.hc++config.hcxxabi.h bfd.hstat.hev.h coro.h coro.herrcode.hsay.hrlist.hstdio.h  YF./*VJtXM=23/_-#*uu+t4wt .jwwX 2g?g.r>= .1'-Y/tXLZ@Z#ןY1#10#%`!#.K儃uYD=uD33tftX f'es J+eY&EC-lJJ<#bJ??A@@!V["  $%V  '(+ 8'] "m' $' &)) F ,V ,n , + ) - , , & 1 #4 /N 8[ 0` *o t " 3 4 5D 6 7 @ @ @ @ 7 ? ? ?;8F?l?9??B:I@S?X 1e;u???@ @,<2 YA pa=m?=?@?=? ?+?2@1     9!) . ; B I Xb  i `p w ;~  Ҋ G d qF W9  u ~h  o \ W   , 7 \B M X ϓd ]6r    # ] Hn    Q / yF" 70 fZ> ̏L I[ m:j E=y W 8 1 x    vG t  &(  {^0 BT@ =P G` Np U \ c $ 0 F C n ^ b? /D O ([ i IJz 6   * ?  43 XH BI \L  QJ ؅ i   2 [  W Ð 3% Y i (* RA9 ξF V Va Ym _} Y S Ş 4-  ?  Y Y1 YN Yk Rq  R i 4 t Jq   PI = H bf Oy  |  k    g Y y * u "   }8#  H* 3@ :i )t   ! * =e  P} [ ; R  % ,1 {= I 7U a m y  6d ,h y = $ k ۊ 'X   ĵ Y # ! N- Z9 +kE l :{ * x  P rD ٮ  N 6  -/ ߹> BM ] m }  - & J 7 $ t ڬ 0 k[ /~ - != HM  E] m q o KK Ԧ 5 g l Ř  =$ ^z/ : E p#P [ TSf q Cz|  [p e       Z Jh E  eI Q% 4 C R  a !lp   rR <   / ݢ$ M1 HN y D   n   Lg D [   /&  C MR Aa p  OL +  M A e O D  ! 3 E W i   ( B p  r  c J  b0 #R@ _P PF` 2p )1 w JY  ݆  ; x( wE % @3 o4  .0 ϓ@ OP ` Zcq ]~ # # d| + \ n Jh      (v g  d- A< NK pa mn r }    Rr ݆   7  a. Q +d] o f| ]6  .#   y\   7a jV J5 A5 G _9S ` of Sl r }x [~  & /  T&  $ " 8  $ f a  G * b  Ƹ {C   H X qk p e e  n{& p, #2 8 M> D üJ RP V \  b ָh 1n Mt nz  _ E Rg    Ow  L r X  S T g 7E I ` ' " L ;h $  3 ?  O& - y4 ; 2B DI P H X ųe t Fl  W  0 Q HG e  u } AY Vf Il r mx K~  D{   > ] ~ 9  b %   R- 73 ;9 ~? }E \}K {Q {W 9] c m.i Go {Du Ȉ{  S  U % 7    ( ׋ S  4  I   1V  * l C  zq   V ` ]# ) / K5 ;; A G n>M ]S [Y _ ~e zk Keq w }  J D 6 X  _ GW  Y Mx 5] 0` \F  I 0 .    G  Ed XQ$ }+  2 )9 R@ UVG B[N 0U 2\ kc x[j B/q !x  qW zY H H +< յ  bj  i_ H 0G Bj V Lz  * .  ;   ʯ C  V ' "t. 5 /< ``C  AJ .Q mX B%_ ]f <|m 9kt a{ ;. L Tt T N &! 6  '   J % + 9 : l L ( BU ( r  I м [># w* 01 r8 \? KsF UM +TT ْ[ =b i |-p ?w P~ 2 9S  8g p B  H: @" h  a ] 9 MZ   l  u! c  = _ {: & W- j4 s; oHB MI |P W+W ^ Ӫe 3l s z  { ~  Q *5 z P 2v g @1 ] J : k + r ^  7   7 f " T) &A0 7 b> \E 7L S Z Ma <h go ݝv } ' (  6 ,^ g N c ~     N v A< i5 [A : Ff u! ] ! wg! ! W! %! Z,! VR3! :! WlA! pH!  O! -V! ,]! Ld! k! C^r! y! c'! T)! ! ! R! ! ! ! ! +B! ! n! 7! =! =c! wj! ]! 8! J! 8H"  "  " " |!" (" ?/" y#6" *=" D" "K" <)R" (QY" ew`" ~g" n" u" A|" |" " B" z" " " j" 4" Q" _o" S" " )" T" " ۈ" " +" '# X# 5# # ># $# +# *2# J9# h@# G# UN#  U# w\# Yc# y'j# m2q# ax# m# # # \# O# ,# # K# v#  j# ,# # K(# pd# # &# # ,=# l# m$ ?B $ lX$ 6$  $ '$ .$ 5$ hh<$ MNC$ mQJ$ 5Q$ %jX$ n_$ f$ ym$ x t$ Y{$ )$ $ $ b$ $ $ 8$ $ $ $ ;x$ ;$ a!$ v$ a^$ Y$ 1$ $ s% % fz% % 0% #% O*% M1% 8%  ?% ѩF% PM% gpT% Z[%  b% Qi% Qp% bw% ~% % (U% ך% % % Q5% g% }% ڽ% y% c% m% % D% % % !J% `%  & }z & & & & && 7-& O4& T;& IB& `I& ťP& RW& c^& ۜe& vl& b6s& cYz& _& 4& & b& }& a& & & N,& '& f& -& & !& & 5& D& ^& X& X' Ж ' WK'  B' "' m)' E0' B7' >' E'  L' S' }Z'  a' yh' /$o' nv' x}' & ' U ' ' ' d' 'f' tf' f' 2s' /' ƃ' =a' $' ܃' Ƥ' Ǭ' Y' Oh' u( * ( )(  ( ;( ހ%( ,( 3( >:( WA( ~H( @O( !wV( Ƣ]( ΄d( 9k( r( y( ( ( j( *( &e( (  ( d( ( .( (  ( ( 2( o( y( ( L( ( )  ) ) ) !) @() /) %6) ==) VOD) nOK) OR) Y) `) ɭg) hn) u) |) U-) V) F) m) F) I) o ) u) =) v) ) {) )) ) ;D) Ǒ) y) px) n* * o* ]E* F* Wi$* +* 2* 9* Ý@*  G* N* xU* mI\* c* rj* G]q* ]x* (* %* )x* "* * m* l* V* kL* L* 5K* 7N* Z* c/* M* 1?* ja* ?A* ՘* G+ R + %+ 5r+  + p'+ x.+  5+ G<+ C+ 'J+ .;Q+ ؾX+  _+ f+ &m+  t+ {+ + R=+ U+ @+ + + G+ <+ + ti+ $+ x?+ 5(+ b(+ r@+ @+ + (9+ , }, |, ˀ, J$, #, *, /1, $8, ?, ;F, M, T, h[, ͔b, xi,  pp, w, @~, 9}, ", , , t, x, 6, , @, , , P, , , B7, , e, E, p-  -  - - t- a&- #-- ^4- ';- IB- XI- C@P- 0W- :u^- e- tZl- B`s- Sz- p- 4- ÿ- pU- 2- - - - 2- - - - - ҂- n~- --  i- ^ - - .  . . 9Z. ". *). 0. M7. >. jE. 3L. QYS. FZ. ea. 6h. <o. v. J}.  . . J. . $. ^$. @. \. j. s. #. b. q. h. {`. . 2. . !/ &_ / T/ / \/ 5%/ {,/ `3/ :/ A/ 5H/ O/ V/ ]/ d/ k/ \fr/ y/ V / ?~/ / / A/ M/  / rl/ |/ +/ ~/ f/ ,/ ӻ/ _/ " / }/ 92/ / Ԑ0 C 0 p0 ύ0 >!0 o(0 q/0 z60 Q=0 +D0 ؛K0 R0 Y0 `0 g0 Ln0 <u0 ]W|0 0 d0 H0 lJ0 C0 C0 e0 _0 W0 %0 0 ^0 0 s0 y0 dN0 aM0 IM0 1  g1 1 `1 a1 0b$1 b+1 21 r91 @1 TG1  N1 U1  \1 {c1 Wmj1 C!q1 2x1 kT1 d1 /1 x1 71 Rn1 1 V1 ߲1 Y1 1 1 P1 1 C1 91 I1 R31  1 {2 8C 2 ,2 2 _ 2 '2 ..2 k52 p*<2 C2 J2 {Q2 jX2 _2 ^f2 m2 t2 {{{2 2 2 B92 2 +2  e2 2 i2 i2 i2 U2 B2 @#2 Ʊ2 ߱2 ~2 ޯ2 2 \3  3 //3 ;3 c3 c#3 ?*3 ;13 &83 o?3 މF3 OM3 MT3 ?O[3 Fb3 i3 ?p3 Xw3 ~3 3 3 3 i3 m3 v3 3 3 :3 |3 jn3 R3 3 *3 EV3 3  3 W3 Y4 Z 4 v4 H>4 4 ^;&4 (-4 ^44 4;4 B4 ?I4 tP4 tW4 p^4 e4 \l4 Ƚs4 Az4 <4 e4 @4 !4 >4 >4 L4 4 14 ,4 4 34 D4 @4 -4 E4 >4 w4 z4 5 w 5 5 05 1l"5  w)5 05 75 >5 7E5 OL5 h9S5 ]<Z5 wAa5 h5 |Po5 v5 Y#}5 (5  5 g5 '5 W5 5 O 5 %5 -o5 C?5 $D5 |5 N5 5 [5 , 5 5 R5 ׌6 ] 6 6 6 6 %6 ,6 436 -8:6 uKA6 3H6 •O6 V6 ]6 d6 mk6 r6 x1y6 f6 V6 Ȳ6 U6 6 z6 `g6 h-6 D6 p36 6 6 346 6 *6 6 ަ6 A6 ֓6 &7 f 7 7 RX7 !7 C(7 \/7 w67 }=7 LD7 K7  R7  Y7 c`7 {g7 un7 .Wu7 |7 7 ie7  7 7 t7 6,7 N7 7 I'7 T{7 x7 _7 37 /7 7 Z7 Qv7 .M7 J8 o8 8 8 `8 $8 t<+8  28 z98  @8 eG8 EEN8 U8 `1\8 ۏc8  j8 q8 jx8 |N8 -8 K8 8 ,08 8 Wk8 Y8 )8 8 8 ߮8 .8 8 D 8 `8 8 (8 8 nt9  9 9 /9 & 9 ͙'9 !.9 59 D<9 kC9 J9 4Q9 eCX9 8_9 f9  m9 xt9  {9 =9 "9 9 $9 um9 59 9 9 zo9 "9 )"9 9 g89 %9 ]9  9 .9 9 ?-:  : H: N: : #: Ep*: ؕ1: 8: ?: %F: NM: T: .[:  ?b: XBi: Fp: Kw: K~: : : *m: k: :  : 1: 1: 2: \x: :  : J: : p: v: pv: v: S; t ; ~; H; a; g&; $-; &4; ;; B; :I; ,P;  W; d^; e; 3Yl; Zs; [z; [; ; O; ; Va; \d; ; =; Q\; k; d; ; lu; k; u; 2; u; ); v; < Ru <  < Z< a"< )< 80< BQ7< E>< }E< DL< fS< "Z< ha< h< W"o<  v< D}< |< :< d< < < [< d%< E< P< M< n< < S< < < < ,< < ?= G = R= d= Y= ۤ%= n,= 3= H:= A= `H= O= X7V= ԡ]= W.d= nk= 9r= 5y= s= = 8w= = =i= ?&= G= ~= r= K= 3= ]= ^= գ=  = = = = = h,> F > !6> #> !> '2(> /> +{6> AR=> yD> K> +R> $Y> `> [g> 8n> ju> |> > i>  > m> <> > 6> C> E> y|> S> p> g> P> > ;> 9> v> L? U? I? ? ɟ? "i$? Ơ+? 2? 9? 6@? TG? sN? U? Ѱ\?  c? \j? q? v6x? HT? r? ? R? h? h? ? ? 5? p7? s? ? \? _? ? e? )? V? QC? '@ 'c @ h@ WD@  @ '@ A.@ 5@ <@ C@ ҇J@ zQ@ X@ $>_@ +f@ m@ t@ {@ *@ r@ @ @ @ -@ x@ "@ d@ t@ @ +y@ @ i}@ I@ K@ W@ f@ A JA DA f0A cA 0#A }*A B1A 8A $?A ]FA 0MA ;TA U[A .bA !OiA pA NwA ~A UA -A fA fA uA JA yA aA 8+A &A /\A ! A UA  A UA -*A '7A J*A v/B Q B QB ^SB ySB  &B <-B 864B r;B  /BB lIB ǷPB lWB ^B ?eB n;lB xsB 4zB qB J4B qB SB WGB uB  B `B  aB "aB sB B j)B -B )zB wVB ҧB B KB @PC  C 'C v$C ٗ"C )C 5X0C 7C 4>C ^EC [LC uSC ,ZC FaC 'hC }oC EvC }C cC C C ׫C .C +C 0C C %nC 6C C 1C C8C  C C wC C C BD   D 9D D ٨D 'F%D j,D q3D z:D ebAD D0HD OD NVD ]D 5dD KkD rD FyD D D iD ED ~D <D #:D D  pD #D nD @D !D ZD D xD b&D ID D )E o= E E gsE '!E  q(E C/E 6E ^]=E DE JyKE PRE gYE { `E 1LgE Z?nE _ uE }E ~E uE :E E E {E WE  E V E 8E ZE E  F `JF q!F W-F 59F EF ZQF ]F fiF uF fF NoF &F F \F !F F F CmF WF  F G 1@G XrG )G K;5G W~AG (MG  -YG 2eG ccqG G  G XG ,G G yMG G u4G "G wcH !H b$H V_3H >JBH QH /[`H oH ~H XH H H H <'H tH AH "H  I I m.I g\>I NI n^I cnI !~I /RI GI tI z+I 8tI xI I  I 8J J `P.J Jb>J jNJ S^J _nJ G~J -J J A_J | J J LJ J ? J K K o.K b>K 6NK ~^K unK ~K CK dK YK K K |K K ZK $L L R.L (>L QNL ^L W[nL y~L L mrL L @L L L L 3 L .M M ڥ.M #>M FNM ^M BnM ~G~M M l"M mBM tyM ?M TM A N 0N hN %N  +N 1N w7N <=N ӁCN IN ON UN t[N .aN жgN ?mN sN yN TN (PN _N $N X@N ƆN ;N %)N N AN [2N N ӳQ CQ &Q b R g*R (R 66R ^wDR !RR |a`R nR .Z|R oR FR eR aeR 1U =DV  m@W Z|MW "1[W ^:aW gW !NnW n yW n W FW qW nW )W %0W tW  X y%X eHX Zj%X &+X :_1X y7X Kr=X ODX ^%PX ^X AsX ]/X ͉X wX X X X Ќ Y Y )'Y  PY -Y K YY2Y Y "{Y2YY `Y  Y dTY *ZE ZZ M'Z )H-Z5Z=Z WZ_ZhZ yZ RZZ&ZNZZZZZ  ZaZ.[ ^4[<[bD[  N[ \[ d[`m[ 21y[@[ [b[H[ [m[F[ \^[ V\ !\*<\ EoF\HN\V\ n\ N\\\\ i\ \ \ V] ]#]4 +] @5] PD] qS] ni]! r]3z]- ] -] -N] f] @>] 0]]D] M^ M!^4 )^ 1^ ;^< C^ L^ -[^ -Nj^ n|^ u^ ^x ^ ^ ^ A^ ^ "<^ @^ WU^x ^ ^ L _ (_ Y_ C`_ h_|p_ z_  __ _q_ r_ K_ t_ !` ` &` .` 7` W` g` (y` `:` `"` ` ` (` `"` Ɍaia8a ?a|GaOa  Yaaaza n+aaa la ]6aaa a `a Db $b !b m.b )Gb tb b ]/b .|bb :b@b mb@ S @2k  bH  04 P lx   |sio.cc.o/ 1378727466 1000 1000 100664 57024 ` ELF>U@@QN "')+-/124578:;UHSHHHLht#)p)M)U)])e)m)u)}LHHHHHH<Dž(Dž0HEH H@H(HHHHH0HH0HHǸ<HHHHHH[]UHH@}̋EdH%H@E}EHUHMEHΉE}uLHEHUHcҹ@HH)֋UHcdH %HH< HEEHUHMEHΉE}uLHEHUHcҹ@HH)֋UHcdH %HH< HEdH%HUH}} w0EH! ]UHATSH0}܉u؋U؋E܉։E}LD$jH$AAjAҿHËEAjH߸HEIHLHH0[A\]UHHHEH}t4HUHEHǸEHEH}uEHUHATSH0}܉u؉UԋUԋM؋E܉ΉE}LD$H$AAAҿHËEAH߸HEIHLHH0[A\]UHATSH0}܋EܺǸE}LD$H$AAAҿHËEAH߸HEIHLHH0[A\]UHATSH0}܉u؉UԋE܉E}t E؋U E#EM܉¾ϸE}LD$H$AAAҿHËEAH߸HEIHLHH0[A\]UHATSH@}܉u؉UHMDEЋ}HMȋUԋu؋EAE}LD$H$AAAҿHËEԉ[l15@P5AL6rcB[hG ?7Uz 8U[l3f[ 4fdf[L4howf[H16rch[\3t[U 15wU h15y[`6rcz[d3[ 8[L8[H8[D16fd[\3[% 4fd[L15[\3[ 4fd[L8[H4on[D15[\9"4fd[L8[H8[D88@16rc[\94fd[L8[H8[D8816rc[\3[&4fd[L8&@8H16rc[\3[4fd[L8&@8H16rc[\3[4fd[L16rc[\3[h4fd[L8&@8ܮ15[\34fd[L4buf@816nX:Q;fd[L;buf@<1=nX:;fd[L;iov@<[H1=cnt[\=nP :;fd[L;buf@;len<[H<<1=nX :)8;fd)[L;buf)@;len)<)[H<*&<*1=n,X:6[;fd6[L<6&@1>8\:G<G&X1>I +-)( (t)OX*h)~*hy?@yA[[@>% UR$ > $ > : ; I  II!I/  : ;  : ; I8 &I  : ;  ( & : ;  : ;I8 : ;  : ; I8 2 .? 4 < dI4 I.? : ; < d.? L 4 < d<  I : ;  I8 4 .? : ; L < d.? : ; @I< d : ; I8 2 !.? : ; @I< d".? : ; @L M < d#.? : ; 2 < d$!I/%I& I'.G d(I4 ).1@@dB *1 +.G: ; d,: ; I-: ; I. /4: ; I04: ; I1 241 3.? : ; @I@B 4: ; I 54: ; I 64: ; I 7.: ; I@B 8: ; I 9.? : ; @@B :.? : ;@I@B ;: ;I <: ;I =4: ;I >4: ;I ?!@4: ; I? < AwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwW1&=&=&=& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/netinetobject.hexception.hsio.ccsio.htypes.htypes.hstddef.huio.hsocket.hsockaddr.hstdint.hin.hstdarg.herrcode.hstdio.hlibio.hsay.h % % ## # ;# ; '1*--"='t  ,uuhLuuhL5v/uuuuv[3!n!0 /vg[3=Kn!0n!0=fn!0~J1ɟ~J1Lgn"1Kgn!0Yn!0Zun!0Y 䭃Zut  2YWWu!0K/uWt"1'WWu!0'WWu!0u4w4vyM ,# ,__off_tS_INFO_IO_read_ptr_chain_ZNK9Exception3logEv_Z8sio_bindiP11sockaddr_injsio_shutdownsize_t_shortbufgp_offsetssize_tva_list~Exceptionoptvaltype~SocketError__in_chrg_IO_buf_base~SystemError_ZN9ExceptionD0Evsio_strfaddrin_addr_taddrerrdescsio_listensocklen_t_Z8sio_readiPvmsocketnamelong long intsigned charm_errmsgsio_listen_backlog_Z9sio_writeiPKvmlong long unsigned int_Z14sio_socketnameim_line_filenoS_ERROR_IO_read_endlong int~Object_Z9sio_setfliiiObject_Z10sio_acceptiP11sockaddr_inPj__ssize_t_ZN11SystemErrorD0Ev_IO_buf_end_cur_columnaddrlenS_DEBUG_saySocketErroruint16_t_old_offset_offsetthis_ZN11SocketErrorD2Evsockaddr_incountlinesio_writev_Z10sio_listeni__pad4sin_zero_IO_marker__vtbl_ptr_typeunsigned intsay_levelsio_socketnameprocsio_readS_CRIToverflow_arg_arealong unsigned intS_FATALoption_IO_write_ptrnameS_WARNioveclevelsio_setsockopt_Z10sio_writeviPK5iovecishort unsigned intsin_addr_Z11sio_connectiP11sockaddr_inj_pos_Z12sio_recvfromiPvmiP11sockaddr_inPj_ZN6ObjectD2Evs_addrGNU C++ 4.7.3_IO_save_basesio_getfltypedef __va_list_tag __va_list_tag_Z10sio_sendtoiPKvmiPK11sockaddr_injsio_getpeernamesio_connect_lock_flags2_modeiovcnt_ZN11SocketErrorC2EPKcjiS1_ziov_basesio_bind_Z15sio_getpeernameiP11sockaddr_inSystemErrorsin_familySERVICE_NAME_MAXLENerrcode_recordsizetype__gnuc_va_list_IO_write_endnewfd_IO_lock_t_IO_FILEm_file_Z14sio_getsockoptiiiPvPj/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src_IO_save_endsin_portsa_family_markers_ZN11SocketErrorD0Evsio_sendtoiov_lenprotocol_Z12sio_shutdowniisio_getsockopt_Z12sio_strfaddrP11sockaddr_inoperator=Exception_Z18sio_listen_backlogvshort intfilesio_option_nameflagbacklog_vtable_offsetFILEreg_save_areaformatuint32_toptnamesio_recvfromsave_errnochar_ZN6ObjectD0Ev_Z10sio_socketiii__socklen_tsockaddrTNT_ERRMSG_MAX_Z14sio_setsockoptiiiPKvjtnt_error_codes_nextsrc_addr__off64_toptlen_IO_read_base_vptr.Object_ZN6ObjectaSERKS_unsigned char__pad1__pad2__pad3/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/sio.cc__pad5_Z9sio_getfli_ZN11SystemErrorD2Evsa_family_tsio_write_unused2dest_addrsio_accepterrflagserrstrsio_socket_flagsuint8_t_IO_backup_basefp_offsetflagsdomainsa_data_ZNK9Exception6errmsgEverrmsg_IO_write_basesio_setflin_port_t_sbufin_addr_ZN9ExceptionD2EvGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \=AC x |&AC a =AC x &AC a zPLRx $$UAC HH $4AC / DDAC  $AC G  gAC b $AC G $AC G $(AC G $PAC G $xAC G $AC G $AC G $AC G $AC G $@6AC G* $hAC G  $&AC G $/AC G# $/AC G# $AC E  pAC Ef ,=AC x L&AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11SystemErrorD2Ev.rela.text._ZN11SystemErrorD0Ev.rela.rodata.gcc_except_table.rela.rodata._ZTV11SocketError.rela.text._ZN11SocketErrorD2Ev.rela.text._ZN11SocketErrorD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS11SocketError.rela.rodata._ZTI11SocketError.rodata._ZTS11SystemError.rela.rodata._ZTI11SystemError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS6Object.rela.rodata._ZTI6Object.tbss.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@O'HOCPO(XOG`O)hOKpOOxO*OOEO@OO`OOOOOO W}O&0,06011h0OPb&K0Oj=eȚHO&0O=@HO *&0O"P?PO$V( HO'"(=PHO)Bf&=0O+b( ]ȝHO-~ y0O/@HO2(@HO5X  pОHO87PK0O;d`ojH!O>{s/ 3 OA=OC>OE;?hOG0RD 0MNNh@OLpR i P? wZ "$&= @#D9= ')+-/124578:;=>@ACEGIKL_nJ     "1!/ "1"&"=!-( "="&/" =DV" =k""&U!'(U4 &5URhq}p")=!2 *gBJQXjq #(o 8?Q _fM 6v{ &//1:@J"+&_w")=!1!5!4!8 !7 !;(!:4sio.cc_ZZ14sio_socketnameiE4name_ZL15sio_option_namei_ZZ12sio_strfaddrP11sockaddr_inE4name_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11SystemErrorD5Ev_ZN11SocketErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11SystemErrorD2Ev_ZTV11SystemError_ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev_ZN11SocketErrorC2EPKcjiS1_z__gxx_personality_v0_ZN11SystemErrorC2EPKcj_ZTV11SocketError__errno_locationvsnprintf_Z14sio_socketnamei_ZN11SystemError4initEPKcz_Unwind_Resume_ZN11SocketErrorC1EPKcjiS1_z_GLOBAL_OFFSET_TABLE_snprintfgetsockname_Z12sio_strfaddrP11sockaddr_ingetpeername_Z12sio_shutdowniishutdown_say__cxa_allocate_exception_ZN11SocketErrorD1Ev_ZTI11SocketError__cxa_throw__cxa_free_exception_Z18sio_listen_backlogvfopen64fscanffclose_Z10sio_socketiiisocket_Z9sio_getflifcntl_Z9sio_setfliii_Z14sio_setsockoptiiiPKvjsetsockopt_Z14sio_getsockoptiiiPvPjgetsockopt_Z11sio_connectiP11sockaddr_injconnect_Z8sio_bindiP11sockaddr_injbind_Z10sio_listenilisten_Z10sio_acceptiP11sockaddr_inPjaccept_Z8sio_readiPvmread_Z9sio_writeiPKvmwrite_Z10sio_writeviPK5ioveciwritev_Z10sio_sendtoiPKvmiPK11sockaddr_injsendto_Z12sio_recvfromiPvmiP11sockaddr_inPjrecvfrom_Z15sio_getpeernameiP11sockaddr_instrerrorntohsinet_ntoa_ZN11SocketErrorD0Ev_ZNK11SystemError3logEv_ZN11SocketErrorD2Ev__cxa_pure_virtual_ZTS11SocketError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI11SystemError_ZTS11SystemError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEvN OPQR S P<HGTo v WXY  WZ4Y[ g qW  p - : D M Z f\]    ( ?^K >W dUi _n `vabT G Id fefT'h;]K Q W f }^ i U _ `abTj]# ) / > U^a pm zU _ `abTij]# ) / > U^a m zU _ `abTm]    % <^X d qUv _{ `abTo]    0^L X eUj _o `wabTqP]   & ^2 > K UP _U `] am bx T s P ]  ^ ( 5 U: _? `G aW bb T~ c u P ] ^   U _! `) a9 bD Tx w P P ] ^   U _ `% a5 b@ Tt y P P P P ]   ^. : G UL _Q `Y ak bv T { P P P ]    2^E Q ^Uc _h `pabT}PPP]' - 3 B Y^k w U _ `abTP#P3PE]U [ a p ^  U _ `abT.BPRPbPt]    ^  U _ `abTEZS]XPag t ]P ! T#. 9=WL @+AB A E?7AF A ID7AJ Apx_  OH7A_ AFG BC  $> $9 $ "- #4 $; $B $I $RP $HW $e $j $u $ $p $ $U ${ $| $a $ $: $ $ $Y  $ $ $+ $&9 $. X $c $qn $,y $n  $ $~  $7 $ $B $ $ $  $y% $d1 $r? $ M $@[ $j $z $a $ $ $ $ $ $d $ $9 $ $ $X $M $ $ $- $; $I $W $U e $st $ $ $8 $L $  $ $0 $ $ $  $z $D) $9 $hI $Y $i $$y $+ $2 $ $ $ $ $ $ $ $x  $V $eq $e $e $ $6 $ $" $0 $H $k $ $ $ $ $ $ $T $N  $6  $#: $] $ $ $ $  $ $(#+13 N $ZRZ&b ` $ $ $ =  $&  $! $5 $9  A  =I d $#h  p  &x  $ $ $ $% $J $/ $  U @Z b 1 $ $ U   `  $   x $ $PH $R Z b l $l| $T $j   `   $] $      $+' / 8 $] $c $ik s {  $' $ $a   $Z $      $! ' $d - $5 = E \ $w   $! $ $   @ $ $5 $ $ $ $}* $.6> U $c $5q $ $ $ $   $ $P| . $ 4 $8< Do L `c $q $P f  $  $o Q  } H  $ $Q M  + $9 $PHg PD Y $j $0p $xM    $c z  $ $p  " $2 :S $Z $bjr @ $ $N $ 9 $! H $X $Php $= $  $!  $  $P!: $A $IQY ` q $- $P $ $W  $P $ $ $. $2:=B ] $9ai&q  $ $`(00<0D1`ht|%%&<<= (4<HP%\%d&      < < =      % %$ &@HT\hpT|TUUVVYY(0<D`ht| (4< H P\d$@HT\hp|(0 < D ` h t |  n n o o p p s s P P Q Q (R 4R <U HU PL \L dM M N N Q Q         $@HT\hp|    ( 0 < D ` h t | ! !         V V W ( 4 < H P <\ <d =      % % &  0@P` p W1 (&08=@H&P X =` h &px=&2Qg   @`  M  (UHhq  & 6 I  \,5 pT] |   o  Q  M % D M lu   4 H 0Pevio.cc.o/ 1378727466 1000 1000 100664 48968 ` ELF>J@@PM!#%')+-/124578:;UHH}HE@(]UHH@H}HuHUHMHEHEHEHPHEHƿE}t8HEfHEHHUfBHEgHEHEHEHPHEHƿ E}t8HEf HEHHUfBHE UHHH}HEHHE@(HE@(UHH H}uUMHE@(tUUMEΉHEP(}uHE@(HE@(UHH }EUEHUEAHѺ HUEAHѺHUHH }EUEHUEAHѺHUEAHѺ EEHUEAHѺ HUHATSH@H}HuHEHtEHEH@HEHEP HEHHE@ΉEEHEPHMEHΉtHEȋUP(8btEHEH@(HEH}NLD$H$AAAҿHHEȋ@(AH߸HHHHHtHHHEHEH@(HuEIHLHH@[A\]UHHH}HE@"UHH}HE]UHSHXH}uHEH@HEEEHEHUHMHΉE}xEHEH@@HUuHMH[HtHHHHHHE؃}x EHEHHHHUHHX[]UHATSH0H}غEEHEHH EHΉuEtt9btEL%HEHAHEHV$IAAHEH@0HtHEH@0HUHR8HHE؋U쉐HEǀHEHHfd == -1! evio_is_active(evio)errno == EADDRINUSESocketError%s at %s:%ievio_bind_addrinfo()bound to %s port %i! ev_is_active(&service->ev)%sINADDR_ANYinvalid address for bind: %s%s port %i is already in use, will retry binding after %lf seconds.evio_service_startevio_service_timer_cbevio_service_bind_and_listenevio_bind_addrinfoevio_socketGhk v1)7mg`  A0s {}+ UHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH9Exception11SocketError6Object11SystemErrorUintxFx[x i F i Ӎ                  $&[#&[#&[#&p#cb&#[ ' (*t,[#,[#,[#,p#cb,#,# [ t (02[#2[#2[#2p#cb2 #at2# [ 3 079[#9[#9[#9p#cb9#9# fd;[#(<[#,[  = 0AEC[#C[#C[#Cp#cbC[#atC# E#(UU[E Fr          ?  # #x i  J # 1# J#xZ io  y {[# |[# 08 1? 3F  l         ! ) + , . / 2 3 : ; <     `   w#      Ω#8 i? i G # l# # G#8W i  # l# # # # 0 70 9[# :[# ;[# <[#  =# >0# ?r#  @6#(#y$#%#&# ) )      + =F @#C# IQ #0Jp#8Rx #@Sp#HV#PevX#Q pF l l [r W -:  # ) / / ) F[~  ) [ )   [~ !5 ~ " : # #"h o  $&:   [*   : %+    $: : #&4#&6F#&9 #''6 =  (log, Z a  )/s  F)1       [x *i   ! +[  , : ! !: -o ) > .> . / i r 0) h/  0) h1|  2ev| h3.[| 4.H4.@2sa.| 4. 56v4/r h6rc0[d6v67 XW7D 4D h7SF4S h4S[d4S[`4S[\58V xV i F7b2fdb[\56ond[l7w 2fdw[\56ony[l9Z`: $2.2. / ]f0h/ 0h : <../0h/#0h74 2ai<58 6fd[\;9r P56eHx i/ <[4h1Q4h=44[59P6fd[\>99ĸ56e H! <[4H56fd[\8 56ePx i?'@'X@[T5Ah8= ax= i-B@X@P@H@[D@@p[r B0<@0X58< BCw@Ch: -..) /w0h/w0hCDBDEy E[[E>R%% UR$ > $ >   I: ; I&II !I/ : ;I  : ;  (  : ; : ;I8  : ;I8 I : ; : ;  : ;  : ; I8  : ;  : ; I : ; I8  : ; I8 2 .? 4 < dI4 .? : ; < d.? L 4 < d < ! I" : ; # I8 4 $.? : ; L < d%.? : ; @I< d& : ; I8 2 '.? : ; @I< d(.? : ; @L M < d).? : ; 2 < d*!I/+I, I-.G d.I4 /.1@@dB 01 1.: ; I@B 2: ; I 3.? : ; @I@B 4: ; I 5 64: ; I 7.? : ; @@B 84I4  94: ; I :.G: ; d; U<.: ; I@B =.: ; @B > U?.: ;@B @: ;I A4: ;I B.? : ;@@B C4: ;I? < D!E4: ; I? < wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw 1&=&=&=& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/usr/include/netinetobject.hevio.hevio.ccexception.hsio.htypes.hunistd.hev.hsockaddr.hsocket.hstdint.hin.hnetdb.herrcode.hsocket_type.hsay.h % % .ugɟvgɟvY3ح6Kgv4v%v#/uYZnrwJ*ɟU /K2K .xuiyt $gcwX  tiɝJtXLIQy*^ K6"Y"KK$u#=7u' . _(" ## # ;# ; ,# ,S_INFO_ZN6ObjectaSERKS_thisevio_ptonEV_CLEANUP_ZNK9Exception3logEvai_flagsev_watcher_list__in_chrg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcIPPROTO_MTPevio_service_portIPPROTO_PIMS_FATALsockaddr_storageaddrinfoIPPROTO_DCCPEV_ASYNCevioon_accept~ExceptionGNU C++ 4.7.3type~SocketErrorEV_READon_bindIPPROTO_IDP~SystemErrorev_tstampIPPROTO_ENCAPIPPROTO_IGMPin_addr_taddrdatawatchererrdescservicesocklen_t_ZNK9Exception6errmsgEv__ss_paddingIPPROTO_RSVPEV_TIMEOUTevio_is_activenextSOCK_PACKETObjectlong long intsigned charEV_CHILDm_errmsgIPPROTO_UDPlong long unsigned intevio_service_stopm_lineS_ERRORactive__u6_addr16long int~Object_Z19evio_setsockopt_tcpiEV_EMBEDIPPROTO_NONE__vtbl_ptr_typeIPPROTO_TCPS_DEBUGSOCK_STREAM_saySocketErrorsin6_portdoublehostreventsai_addr_ZN11SocketErrorD2Evsockaddr_inshort unsigned intEV_STATIPPROTO_ICMPV6sin_zeroIPPROTO_COMPIPPROTO_IPevio_socketlingerSOCK_RDMIPPROTO_IPIPon_bind_paramev_watcher_timeunsigned intsay_levelevio_bind_addrinfouint16_tsalenS_CRITai_socktypeIPPROTO_ESPsin6_flowinfo_ZN9ExceptionD0Ev__FUNCTION__nameEV_CUSTOM_Z18evio_bind_addrinfoP5ev_ioP8addrinfoS_WARNl_onoffIPPROTO_FRAGMENTpendingsin_addr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/evio.ccaddrlen_ZN6ObjectD2Evs_addrev_rt_nowsockaddr_in6EV_NONESOCK_NONBLOCKpriorityevio_closeboolIPPROTO_TPev_watcherIPPROTO_IPV6EV_ERRORevio_setsockopt_tcpprotocolSystemErrorsin_familySERVICE_NAME_MAXLENsizetypeportsin6_family_Z17evio_service_stopP12evio_serviceEV__IOFDSETEV_SIGNALIPPROTO_MAX_Z9evio_ptonPKcS0_P16sockaddr_storagePjevio_setsockopt_tcpserver_Z10evio_closeP5ev_iom_fileevio_service_initcoio__in6_uSOCK_DCCPai_addrlenevio_servicesin_portsa_familyon_accept_paramEVBREAK_ONE__socket_type_ZN11SocketErrorD0EvIPPROTO_PUPEV_PREPAREsin6_scope_idIPPROTO_SCTPunsigned charIPPROTO_RAWoperator=Exceptionevio_service_accept_cb_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPvshort intEV_WRITEai_protocolEV_TIMERai_nextEV_IDLEEV_CHECK_Z25evio_setsockopt_tcpserveriin6_addreventsuint32_tIPPROTO_HOPOPTScharlong unsigned intrepeatss_family_ZN6ObjectD0Ev__socklen_tIPPROTO_EGPsockaddrTNT_ERRMSG_MAX__u6_addr8EV_UNDEFai_familyev_iotnt_error_codesev_timererrmsgIPPROTO_ICMP_vptr.Objectevio_service_timer_cbEV_FORK_Z11evio_socketP5ev_ioiii_ZN11SystemErrorD2Evsa_family_tevio_service_nameSOCK_CLOEXECerrflags__ss_alignerrstrSOCK_DGRAM_Z18evio_service_startP12evio_serviceEVBREAK_ALLuint8_tevio_service_starttimer_ZN11SystemErrorD0EvdomainIPPROTO_GREEV_IOIPPROTO_AHIPPROTO_ROUTINGsa_dataevio_service_bind_and_listenSOCK_RAWai_canonname__u6_addr32IPPROTO_UDPLITEsin6_addrEV_PERIODICl_lingerSOCK_SEQPACKETEVBREAK_CANCELerrcode_recordin_port_tIPPROTO_DSTOPTSin_addr_ZN9ExceptionD2EvGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \AC Q |AC  3AC n AC  zPLRx  $rAC m  HAC  D=AC x d&AC a =AC x &AC a $AC G #AC ^  AC I $TAC E $|AC G{ |eAC ` $AC G   AC G OAC J =AC x  (&AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rodata.rela.gcc_except_table.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11SystemErrorD2Ev.rela.text._ZN11SystemErrorD0Ev.rela.rodata._ZTV11SocketError.rela.text._ZN11SocketErrorD2Ev.rela.text._ZN11SocketErrorD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS11SocketError.rela.rodata._ZTI11SocketError.rodata._ZTS6Object.rela.rodata._ZTI6Object.rodata._ZTS11SystemError.rela.rodata._ZTI11SystemError.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@N.HNJPN/XN^`N0hNbpN~xN1NN\NGNNrNNjNNNN  @s N& , 6 110NP &K@0Ne0 rmpHN=HN&0N!=0HN#T&x0N%( HN'"=HN)B&=80N+b ( ]hHN-~` y0N/ HN2(HN5p0N8+JEHN;iYd$N=uq&j*@N@ 3@NB30pND4NF08 0RDoDpDHxNKG^ OF kv $ !#%N#'hBe`')+-/124578:;=?@BDFHJK 0I     E"1T!/ `g"1v"&3,!r:J_y#"=!-("="!&"#="#=("%&=e")=!5"0EKk!2z  /> Oc!'(u"+&")=!1 !8!4 !;2!7>d!:evio.cc_ZL14evio_is_activeP5ev_io_ZZ11evio_socketP5ev_ioiiiE12__FUNCTION___ZZ18evio_bind_addrinfoP5ev_ioP8addrinfoE12__FUNCTION___ZL17evio_service_portP12evio_service_ZL17evio_service_nameP12evio_service_ZL22evio_service_accept_cbP5ev_ioi_ZL28evio_service_bind_and_listenP12evio_service_ZZL28evio_service_bind_and_listenP12evio_serviceE12__FUNCTION___ZL21evio_service_timer_cbP8ev_timeri_ZZL21evio_service_timer_cbP8ev_timeriE12__FUNCTION___ZZ18evio_service_startP12evio_serviceE12__FUNCTION___ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11SystemErrorD5Ev_ZN11SocketErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_Z9evio_ptonPKcS0_P16sockaddr_storagePjinet_ptonatoihtons_Z10evio_closeP5ev_ioev_io_stopclose_Z11evio_socketP5ev_ioiiiassert_fail_Z10sio_socketiii_Z19evio_setsockopt_tcpi_Z9sio_setfliii__gxx_personality_v0_Z14sio_setsockoptiiiPKvj_Unwind_Resume_Z25evio_setsockopt_tcpserveri_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11SystemErrorD2Ev_ZTV11SystemError_ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev_Z18evio_bind_addrinfoP5ev_ioP8addrinfo_Z8sio_bindiP11sockaddr_inj__errno_location_say__cxa_allocate_exception_ZN11SocketErrorC1EPKcjiS1_z_ZN11SocketErrorD1Ev_ZTI11SocketError__cxa_throw__cxa_end_catch__cxa_begin_catch__cxa_rethrow__cxa_free_exceptionntohs_Z10sio_acceptiP11sockaddr_inPj_ZTI9Exception_Z10sio_listeniev_io_startev_timer_stop_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPvmemsetsnprintfstrcmpinet_aton_Z18evio_service_startP12evio_serviceev_timer_start_Z17evio_service_stopP12evio_service_ZTV11SocketError_ZN11SocketErrorD0Ev_ZNK11SystemError3logEv_ZN11SocketErrorD2Ev__cxa_pure_virtual_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS11SocketError_ZTI11SystemError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoE_ZTS11SystemErrorKLiMsNLMN PQN X ] GbStTUVVXXYCVdXXXY   VS2T?ZWdte   mSQf    g  ,h1 i6 j>kFlQY_YgmQnloYp'q:UdloYwYmQlTZds(e4 > C mHSRQcf  tl YY"m0Q5nl v { Suw xN% -yXzlf|    g  h i jkA x B o Y `   S fM \  | u P Q G+HI HL jh r r \F7H] H `[7Ha Hi  ~_7Hi H]^ IJr & +& + +k )`- *4 +; +B +yI + P +<W +%e +l +{ + + +f +. + +o +< + +t +F +/  +V +  +D +& + - +b4 +H; +B +UJ +vR +]Z +b + j +(r +z + + + + + + + + +Q +* +9 +H +e + + + + + + + +3 , +; +J +Y +v + + +3  +I  + + +  +6 +b +I w +2 } +; +7  +G + +  +  + +#  + + +  +| +  + +! +  +  +. + < +[ +h +w +  +C  +5 + + + +Y  + + + + +j +Z +V + + + +  +  + +  +W + " +( +. +Z 4 +; +yB +I +P +W + ^ +e +lm +P x + +j  +V + +  + +  + +m + ++ +9 +X +gd +%r +2 +c +  + + +H +)  +K +8 + +P + ! +MC +A O + ] +k +  +  + + + +D + + +  + +  + + +N + + ++* +^  +& +& +& +9 + +b; +'K +f Y +'q + +' + + + + + +Q +R % +E +3c + + + +* +4 +aH +GL T 1\ 'w +{  & '` +   ' + + +x   '  + + 4 +>C .K  + +  , ' +  + + ,  ' + +y  +4 + A(1 +<] +c +go#w '@ + +f# '. + +( +a< +r @ H =P 'k +qo w & '` + +a +   = ' +d &  ' % +"+ +/7? 'I + fnw + ) +E + '  + + )19 '@C +R +X`h 'r + +H + )0 + +?c + 'B/ '9 +GO9e +py9 +s B '` + +HQ + +D +K +OW _ 'i +x + +C +  + ++ +K  +    '  +  ' +2`C +}J +1N V ^ 'h + + +a +X= ' +U& '@ +] +9 F +!(00<0D1`ht|%%& (4<HP\d++,,--00$@HT\hp"|"##$$''    ( 0 << <D =` h t |   % % &      < < = (4<HP%\%d&$@HT\hp|(0A<ADB`BhCtC|FF    ( 4 < H P \ d         <<$=@HT\hp%|%& % 0@ P ` p E08c@H`h px1&  =  &  =&=&z    @`, W  $#- H h   09 PXa lB   ,coio.cc.o/ 1378727467 1000 1000 100664 83640 ` ELF>@@PM "')+-/124578:;UHHHEE]UHH}HuHUHEHHEHHEHEHEHUHEH@HH)HHEHEH}~HUHEH@H9ruHUHEHHUHEHH)HH]UHH}HuHEHPHEHHEHPHEHHUHHHEH]UHH}HE@(]UHH H}HuEEHEHUHHUHEHUHH(EH}\EEHEEf.rHEf(\MMHEHUHUHH0H}HuHUHMHHMHUHuH}HEEUHHH}uUHEHUHH}HdHHEHPHE@HEPHEHE@HEH@HE@(]UHHH}HdHHEHPUHH0H}EHdHHEHPHEHEEEEUHH H}HuHHuHMHEEHUHATSHPH}HuЉUEHE؋@(UHMHΉt dstaHE؋P(HE؉P(HE@,HEHHEHUHEEHEHEH}tnEsEHE؋@(HMHUIHѺEULD$uH$AAuAҿHHE؋@(AuH߸HIHLHHP[A\]UHATSH`H}HuEHEHMHUHEEHHHEHtE{HEH@HEHEH HEPHEpHEHHEHURHuHMHEEHE}t HEHE%HEH@(HEH}uLD$H$AAAҿHHE@(AH߸HHHpHthHHE؀}t HEHHEH@(HuHEHUHHEEIHLHH`[A\]UHATSH`H}HuUEHEHMHUHEEHH HEȋ@(HUHMHΉE}xEEHEȋu%HEȋP(HEȉP(HE@,HEHHEHUHEEHE}nLD$H$AAAҿHHEȋ@(AH߸HHEHUHHEE IHLHH`[A\]ÐUHHH}HEHHUHSHxH}HuHUHMEHEH;EvHEHMHUHEEHH1HEHEHUHEHHI HE@(HUHMHΉHEH}~:HEH)EH}HEHUHH)HHHEHEHEH)E+H}u$HEHUHH)HHHEu%HEP(HEP(HE@,HEHHEHUHEEHE}t!nHEHUHH)HHHEHUHHEE4HEHI HHHEH5 HHHx[]UHATSH@H}HuHUHMHMHUHuHEH#HEHEH;E LD$H$AAAҿHHE؋@(AH߸HHEIHLHH@[A\]UHATSHPH}HuHUHMEHEHMHUHuH}HEEHEHEH;E LD$,H$AA,AҿHHE؋@(A,H߸HHEIHLHHP[A\]ÐUHHH}HEHHUHSHxH}HuHUEHEHEHEHMHUHEEHHRHUHEHHHE@(HUHMHΉHEH}~#HEH;Er H]HEH)EHEHEHEu%HEP(HEP(HE@,HEHHEHUHEEHE}t!nHEHUHH)HHHEHUHHEEHEHHHHEHHHHx[]UHSH8}HuHUȉMHEHHHEHHUHMЋEHΉHEHUHEHH|HEEHHHHtHHHEHUHEHH6H8[]UHHH}HEHHUHSHXH}HuUHMHEHEEHHHHEHHEHUHEHHHUHEHH)HHHEHHE@(HuHEH}xjHEHEH}tHEH;EHUHMHEHHHHHEHEH;Eu"HEHtqHEu%HEP(HEP(HE@,HEHHEHuHEH;EHEHHEHHEHHHHX[]ÐUHHH}HEHHUHSHxH}HuHUMLEDMEHEHMHUHEEHHsHUHEHHHE@(DEH}MHUHuEIHEH}~ H]HEu%HEP(HEP(HE@,HEHHEHUHEEHOE}tnHEHUHHEE?HEHHHHEHHHHx[]UHHH}HEHHUHSHxH}HuHUMLEDMEHEHMHUHEEHH HUHEHHHE@(LEH}MHUHuMIHEH}x H]HEu%HEP(HEP(HE@,HEHHEHUHEEHE}tnHEHUHHEEq?HEHHHHEHHHHx[]UHSHHXTHHHXH@HHEHEHTEHHHHHXH`IHѺ HǸHHHHHEIй HǸHEHEHHEHEHH`HHHEHEHEHEHHMHEHuH4$HuHt$HuHt$HuHt$HuHt$ HuHt$(HHǸvHHaHtYHHEL A,AHEHH}t HEHHH[]UHH0H}HuHUMLELMHEH}MHUHuIAHHEHUHHEHUHUHHH}HuHUHEHHHEÐUHHH}HE@uHEHUHHH}HuHUHEHHYHEÐUHHH}HE@uHEHuUHHH}HuHUHEHH'HEÐUHHH}HE@uHEHSUHHH}HuHUHEHHHEÐUHHH}HE@uHEHUHHH}HuHUHEHHHEÐUHHH}HE@uHEHUHH}HuHEHUHHHE@]UHH}HuHEHUHHHE@]UHH}HuHEHUHHHE@]UHH}HuHEHUHHHE@]UHH}HuHEHUHHHE@]UHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coio.ccerrno == EINPROGRESSSocketError%s at %s:%iconnect! evio_is_active(coio)connect_addrinfo()acceptsz <= bufsizunexpected EOF when reading from socketiov_len == 0%s/%siobufcan't create a handler fiber, dropping client connectioncoio_writevcoio_read_ahead_timeoutcoio_connect_addrinfocoio_connect_timeout.9.\>}O<w.a!=p!Pi ?toaMSziSzi)NB&'}UHHH}HEHHEHt HEHUHHH}HEHHEH9Exception11SocketError6Object11SystemError* <int m Qf m} t  Ӟ                  $&f#&f#&f#&{#cb& #f ' (*,f#,f#,f#,{#cb,#,# f 07%9f#9f#9f#9{#cb9;#9A# fd;f#(<f#,55f% = 0ACf#Cf#Cf#C{#cbC#atC# E#(fSr   +) -{# .1#J])#]#m t 0C1J3Q`~# )### #C t 079f#:f#;f#<f# =#>#?# @#(4( tQ#Q#{#{#f#T$#%#&s# )d j)      + =(@#C# I3#0J{#8RZ#@S{#HVS#PevX#3{(NNfT9%'#)#+{# sp#{#ctx$#%{#&1#-D.D#/D#MO{#cswQf#R#T #(fidV#0sid`#4b#8c#Hfi#Xj#`k#xl #J(5c 7 #buf8#pos:#end<#>1# `r k m #o1#posq1#s #iovz #< t tH5  5 # #in #outr #0 $ ='#>' #&v .  + . 4 1 . f : . : ; !;@  . : "''#'#jj; #; # #; $ =#>' #& ,  + , 2 1 , f : , 8 F !;>  , 8 "##KKF #F # #F $ =g#>' #& *  + * 0 1 * f : * 6 D !;<   * 6 "gg#g#D #D # #D $=-!#>' #&} (+ (.1 (f : (4B !;: (4"-!-!#-!#r!r!B #B # #B $=##>' #&{&+&,1&f :&2@!;8&2"#####I#I#@#@##@$$..%.#4#6Q#9#&''log,>(/Q(1 >)> f* .+#,"\c-&.yf,*..+$-.L%L#/u{,/-uQf0)>uf1u)LgAf#2t>># 3f04.##.5G6c 778JS9 h8y9 h:ef;iovemX;nwreP<eH=>hmh1?v4;iovvmh<v`:|' f;ev| h@<h<`<X@<X<P=>hANp<N h;bufN{`;szN1X<N1PB$778p9h8p9h@(5<(5h<(fdGC/o</ h@8<8 hAB' <B X<BP=>E' oDPA<P h<PT`LBV<Wl7l7A8G9Wh8G9WhE\' <\ H<\T@;len]<]=F >h' _>ofXGszpT tE' p< ;ai<=>@>F Gres' _H>TP=GeH tp{Ef?< <T<<=>P>HHGfdf\>' [ E< ;buf{;sz1<1<~=F >@>>ܰX=>;  #IHT  I_p  'I{ JKh! =F?h=GnrdP>' O tLM HNbuf{@Nsz1M1=OnrdXL%=M% HNbuf%{@Nsz%1M%1M&=Onrd(XL<M< Nbuf<dNsz<1M==P?1XP@@P@=PDF QDE #I)5  I@Q  I\c JKh& =F?h=OnwrMPP`' ORrNfdrfLNiovrm@MrMrfH=OnwrtX=OeyP#L/ M NiovmMfM1=PXP1@OendmPF?  HPD Q  #I  I  gI JKh$ =F?hHOnwrH? t / L"M NbufdNsz1MfM"MM=PHP@=PB Q! #IP!\!Ig!x!-!I!!J!K!h"=F?h=OnwrXP' W"L#M Nbuf{Nsz1MfMTMM=PHP@=P@Q# #I'#3#I>#O##IZ#a#J#K#h =F?h=OnrdXP' WS$M$~Nfdf~MT~HP$PPP~P~P%$XOf&$H=Oe+$@` JS?[%M?$hM?`M@XM@fTMAHMA{@AC; %"'<C'`6 %%7%7. T%%%9%hACF &&"<C`6 4&I&7I&7, T&&p&y&94&hACD &"g<Cg`6 &&7&7* T&&'9&hACB D'"-!<C-!`6 R'g'7g'7(TD'''9R'hAC@'"#<C#`6''7'7&T'(&(9'h6e 4(O(7%Ufun&I( V&(q((94(h9>(`6p ((7I&Ufun&( V(((9(h9(`6n ()7&Ufun&) V()):)9(h9(`6l H)c)7g'Ufun&])V:)))9H)h9R)`6j))7'Ufun&)V)))9)h9)`B--**7*7u8)B*K*9*h8)q*z*9*hWDX<**YXy**ff0X>**Xo$Xf% UR: ; I$ > $ >   I&II !I/ : ;I  : ;  (  : ; : ;I8  : ;I8 I : ; : ;  : ; I8 & : ;  : ; I8 <  : ;  : ;  : ;  : ; I8 2 .: ; < c dI4 .: ; < d .: ; 2 < c d!.: ; I2 < d"/I# I$ : ; %I8 2 &.? : ; @I< d'.? : ; @L M < d(.? : ; 2 < d).? L 4 < d* : ; + I8 4 ,.? : ; < d-.? : ; L < d..? : ; @I< d/.? 4 < d01< 2!I/3I4 I5.: ;I@B 6.G d7I4 8.1@@dB 91 :.: ; I@B ;: ; I <: ; I = >4: ; I ?.: ; @B @.: ; @B A.: ; I@B B.G: ; dC.? : ; @@B D.? : ; @@B E.? : ; @I@B F4I4  G4: ; I H UI.4 < dJ.4 @dB KI4  L.? : ;@I@B M: ;I N: ;I O4: ;I P4: ;I Q : ;R.: ;I@B S.? : ;@@B T.1@dB U: ; IV.1@dB W4: ;I? < X4: ; I? < Y!wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw1&=&=&=&PJ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hobject.hsio.hevio.hcoio.hexception.hcoio.ccscoped_guard.hstddef.htypes.htypes.hunistd.huio.hsockaddr.hsocket.hstdint.hin.hnetdb.hstdarg.herrcode.hcoro.h coro.hrlist.hfiber.hiobuf.htarantool_ev.h say.h Ku|!/VttXNK6gu12KK2.tuB.u%X.3//2/\2/NK5% .Yguv&?3"MvK/'g m?3uJgYYz K gY?3"iNu.6uuuYgZ^#X/ t׭r#2 &r#2x.5v_ZgZ`!X-|iu3*/[ tx.uk1[4utgX JA y.%6+uYgvgX-ty.%6+uYgvfX-y绖=& XoX)u Ȥ${./kt# ./kt# ./kt# ./kt# ./kt#o.Z+Z+Z+Z+Z % % ## # ;# ; ,# ,SERVICE_NAME_MAXLEN_Z24coio_readn_ahead_timeoutP5ev_ioPvmmdEVBREAK_ONEf_data__closurem_funcoio_writev__coioEV_CHECKScopedGuardmake_scoped_guard >gp_offsetcapacityiovcnt__FUNCTION__sa_datapendingcoio_read_ahead_timeouttarantool_coroflagsEV_SIGNALsockaddrS_WARNfiber_schedule_coioEV_IOm_fileunsigned intnextlast_stack_framem_errmsguint32_terrmsgEV_IDLEcoro_contextwaitercoio_connectevio_serviceservice_ZN11SystemErrorD0Evon_bindlinkEV_FORKS_CRITerrorcoio_fiber_yieldEV_EMBEDprev__vtbl_ptr_typessize_t_Z11coio_acceptP5ev_ioP11sockaddr_injdis_timedoutoffset_Z18coio_write_timeoutP5ev_ioPKvmdoperator()ScopedGuard >EV_CHILD~Objectin_addr_tS_DEBUGwatchereventaddrinfoGNU C++ 4.7.3on_bind_paramcoio_connect_timeoutoverflow_arg_arealong long unsigned intcoio_acceptTNT_ERRMSG_MAXobufhostevio_is_active_ZN6ObjectD0Evcoio_readn_ahead_ZN6ObjectD2Eveventssin_familycoio_read_aheadev_rt_now_Z11coio_writevP5ev_ioP5iovecimev_watcherin_port_tev_ioiobufcoroEV_CLEANUPsin_zeroEV_ERROR__gnuc_va_lists_addrev_now_Z17coio_service_initP12coio_servicePKcS2_iPFvP13__va_list_tagEPvsize_tsa_family_tai_addr_ZNK9Exception6errmsgEvS_ERROREVBREAK_ALLon_accept_paramelapsedcoio_connect_addrinfosize_hintS_INFOS_FATAL_ZNK9Exception3logEv_Z21coio_connect_addrinfoP5ev_ioP8addrinfodev_watcher_listcharEV_CUSTOMuint8_tpalloc_pooltnt_error_codesscoped_guardrepeatdatasio_move_iov_vptr.Objectmake_scoped_guard >towrite_Z12coio_connectP5ev_ioP11sockaddr_insay_levelEV_UNDEFiov_baseEV_NONEcfg_readahead_say~SystemErrorerrdescva_listbufsiz__in_chrgEV_STATlong long intcoio_recvfrom_timeoutsin_port_ZN9ExceptionD2EvEV_WRITEiov_lenev_timerai_nextFunctorto_readoperator=sizelong double_Z19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injd/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coio.ccsin_addr_Z16coio_readn_aheadP5ev_ioPvmmfiber_nameai_canonnamefiberpoolcoio_initguardcoio_fiber_yield_timeoutev_tstampactivem_activecoio_readn_ahead_timeoutuint16_tException_Z20coio_connect_timeoutP5ev_ioP11sockaddr_injdthisai_familyaddrlen_ZN6ObjectaSERKS_on_accept~ScopedGuardsizetypem_lineshort intcoio_sendto_timeoutmake_scoped_guard >EV_PERIODIClong intdelay~Exceptioncoio_service_initprioritymake_scoped_guard >coioEV_ASYNC_ZN9ExceptionD0Evhandlerrlist_ZN11SocketErrorD2Evbool__ssize_tsockaddr_incoio_servicefp_offsetnamestartstackhandler_param_Z9coio_initP5ev_io_Z21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdlong unsigned intEV_TIMEOUTIOBUF_IOV_MAXibuf_Z22coio_service_on_acceptP12evio_serviceiP11sockaddr_inreg_save_areaport_Z23coio_read_ahead_timeoutP5ev_ioPvmmdin_addrgc_poolai_protocolai_socktypeunsigned charScopedGuard >__socklen_ttimeoutevio_timeout_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcScopedGuard >evio_timeout_updateerrflagsaddrerrcode_record~SocketErrorstateSystemErrorstack_sizeai_flagscoio_service_on_acceptSocketError_ZN11SystemErrorD2Evsigned charsa_familycoio_flushshort unsigned intbeginiovectotalsle_nextsrc_addrdoubleEV_PREPARE_ZN11SocketErrorD0Evcoio_write_timeoutEV__IOFDSETEV_READdest_addrEVBREAK_CANCELai_addrlentimerObjectsocklen_tScopedGuard >ScopedGuard >errstrsio_add_to_iovtypedef __va_list_tag __va_list_tagiobuf_nameTIMEOUT_INFINITYmake_scoped_guard >EV_TIMERGCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <1AC l \&AC a |AC  =AC x AC Q 7AC r ]AC X ?AC z <=AC x \&AC a |"AC ] WAC R &AC a ?AC z 7AC r =AC x <&AC a zPLRx $$AC G $LAC G $tAC G AC X $AC E $AC G $ AC G  AC X $TjAC E` $|AC E AC X $AC E DAC X $ MAC EC AC X $TMAC EC $|AC H cAC ^ )AC d <,AC g \)AC d |,AC g )AC d ,AC g )AC d ,AC g )AC d <,AC g \$AC _ |$AC _ $AC _ $AC _ $AC _ =AC x &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11SystemErrorD2Ev.rela.text._ZN11SystemErrorD0Ev.rodata.rela.gcc_except_table.rela.rodata._ZTV11SocketError.rela.text._ZN11SocketErrorD2Ev.rela.text._ZN11SocketErrorD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS11SocketError.rela.rodata._ZTI11SocketError.rodata._ZTS6Object.rela.rodata._ZTI6Object.rodata._ZTS11SystemError.rela.rodata._ZTI11SystemError.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@NPHNmPNQXNs`NRhNpNxNSNNqNjNNNNNNNN pN&l,l6l110NP&K0Nj=eHN&(0N(=XHN f&0N"8HHN%( HN'"=`HN)B&=0N+b ( ]HN-~` y 0N/ PHN2HN50N8+JEHN;i+dX?N=uIZrNp'N@Rb0;NBc <NDdT?NF0k0|||8@0NKOh  ,=Hc74]?"I&o? "$$%_$pN$P0)`Z,L )&,d ~)$A +,f(2) \,]),T$Z,$ ,^&$,J$,\,|n$, $g $ &$ J$< n$')+-/124578:;=?@BDFHJK    I       "1 !/  "1 "&% 6 k^ "=p !-( "= "&  W     7D t " =  " = ""&     # . D ^ c |  ")= !5    6L\n|; 4 Ci jfx!2EMMOu !9c{!'("+&")=&!1 5^!8j!4|!;!7!:coio.ccev_now_ZL12sio_move_iovP5ioveclPm_ZL14sio_add_to_iovP5iovecl_ZL14evio_is_activeP5ev_io_ZL17evio_timeout_initPdS_d_ZL19evio_timeout_updatedPd_ZL15coio_read_aheadP5ev_ioPvmm_ZL19fiber_schedule_coioP5ev_ioi_ZL16coio_fiber_yieldP5ev_io_ZL24coio_fiber_yield_timeoutP5ev_iod_ZZ20coio_connect_timeoutP5ev_ioP11sockaddr_injdE12__FUNCTION___ZZ21coio_connect_addrinfoP5ev_ioP8addrinfodE12__FUNCTION___ZZ23coio_read_ahead_timeoutP5ev_ioPvmmdENKUlvE_clEv_ZZ23coio_read_ahead_timeoutP5ev_ioPvmmdE12__FUNCTION___Z17make_scoped_guardIZ23coio_read_ahead_timeoutP5ev_ioPvmmdEUlvE_E11ScopedGuardIT_ES5__ZN11ScopedGuardIZ23coio_read_ahead_timeoutP5ev_ioPvmmdEUlvE_ED1Ev_ZZ18coio_write_timeoutP5ev_ioPKvmdENKUlvE_clEv_Z17make_scoped_guardIZ18coio_write_timeoutP5ev_ioPKvmdEUlvE_E11ScopedGuardIT_ES6__ZN11ScopedGuardIZ18coio_write_timeoutP5ev_ioPKvmdEUlvE_ED1Ev_ZL10coio_flushiP5iovecli_ZZ11coio_writevP5ev_ioP5iovecimENKUlvE_clEv_Z17make_scoped_guardIZ11coio_writevP5ev_ioP5iovecimEUlvE_E11ScopedGuardIT_ES6__ZZ11coio_writevP5ev_ioP5iovecimE12__FUNCTION___ZN11ScopedGuardIZ11coio_writevP5ev_ioP5iovecimEUlvE_ED1Ev_ZZ19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injdENKUlvE_clEv_Z17make_scoped_guardIZ19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injdEUlvE_E11ScopedGuardIT_ES9__ZN11ScopedGuardIZ19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injdEUlvE_ED1Ev_ZZ21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdENKUlvE_clEv_Z17make_scoped_guardIZ21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdEUlvE_E11ScopedGuardIT_ES7__ZN11ScopedGuardIZ21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdEUlvE_ED1Ev_ZN11ScopedGuardIZ23coio_read_ahead_timeoutP5ev_ioPvmmdEUlvE_EC1ERKS3__ZN11ScopedGuardIZ23coio_read_ahead_timeoutP5ev_ioPvmmdEUlvE_ED2Ev_ZN11ScopedGuardIZ18coio_write_timeoutP5ev_ioPKvmdEUlvE_EC1ERKS4__ZN11ScopedGuardIZ18coio_write_timeoutP5ev_ioPKvmdEUlvE_ED2Ev_ZN11ScopedGuardIZ11coio_writevP5ev_ioP5iovecimEUlvE_EC1ERKS4__ZN11ScopedGuardIZ11coio_writevP5ev_ioP5iovecimEUlvE_ED2Ev_ZN11ScopedGuardIZ19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injdEUlvE_EC1ERKS7__ZN11ScopedGuardIZ19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injdEUlvE_ED2Ev_ZN11ScopedGuardIZ21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdEUlvE_EC1ERKS5__ZN11ScopedGuardIZ21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdEUlvE_ED2Ev_ZN11ScopedGuardIZ23coio_read_ahead_timeoutP5ev_ioPvmmdEUlvE_EC2ERKS3__ZN11ScopedGuardIZ18coio_write_timeoutP5ev_ioPKvmdEUlvE_EC2ERKS4__ZN11ScopedGuardIZ11coio_writevP5ev_ioP5iovecimEUlvE_EC2ERKS4__ZN11ScopedGuardIZ19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injdEUlvE_EC2ERKS7__ZN11ScopedGuardIZ21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdEUlvE_EC2ERKS5__ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11SystemErrorD5Ev_ZN11SocketErrorD5Evev_rt_now_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0EvTIMEOUT_INFINITY_Z23coio_read_ahead_timeoutP5ev_ioPvmmd_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_Z14fiber_scheduleP10ev_watcheri_Z9coio_initP5ev_io_GLOBAL_OFFSET_TABLE_fiber_Z11fiber_yieldv_Z19fiber_yield_timeoutd_Z12coio_connectP5ev_ioP11sockaddr_in_Z20coio_connect_timeoutP5ev_ioP11sockaddr_injd_ZN11SystemErrorD2Ev_ZTV11SystemError_ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev__gxx_personality_v0_Z11sio_connectiP11sockaddr_inj__errno_locationassert_failev_io_startev_io_stop_Z16fiber_testcancelv_Z14sio_getsockoptiiiPvPj_say__cxa_allocate_exception_ZN11SocketErrorC1EPKcjiS1_z_ZN11SocketErrorD1Ev_ZTI11SocketError__cxa_throw__cxa_free_exception_Unwind_Resume_Z21coio_connect_addrinfoP5ev_ioP8addrinfod_Z11evio_socketP5ev_ioiii_Z10evio_closeP5ev_io__cxa_end_catch__cxa_begin_catch__cxa_rethrowev_now_update_Z11coio_acceptP5ev_ioP11sockaddr_injd_Z10sio_acceptiP11sockaddr_inPj_Z19evio_setsockopt_tcpi_Z8sio_readiPvm_Z16coio_readn_aheadP5ev_ioPvmm_Z24coio_readn_ahead_timeoutP5ev_ioPvmmd_Z18coio_write_timeoutP5ev_ioPKvmd_Z9sio_writeiPKvm_Z10sio_writeviPK5ioveci_ZTI9Exception_Z11coio_writevP5ev_ioP5iovecim_Z19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injd_Z10sio_sendtoiPKvmiPK11sockaddr_inj_Z21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injd_Z12sio_recvfromiPvmiP11sockaddr_inPj_Z22coio_service_on_acceptP12evio_serviceiP11sockaddr_in_Z12sio_strfaddrP11sockaddr_insnprintf_Z9iobuf_newPKc_Z9fiber_newPKcPFvP13__va_list_tagE_Z10fiber_callP5fiberz_Z12iobuf_deleteP5iobuf_Z17coio_service_initP12coio_servicePKcS2_iPFvP13__va_list_tagEPv_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPv_ZTV11SocketError_ZN11SocketErrorD0Ev_ZNK11SystemError3logEv_ZN11SocketErrorD2Ev__cxa_pure_virtual_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS11SocketError_ZTI11SystemError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoE_ZTS11SystemErrorhnotw8 Xwixwyn{,8 B G GLq   \% h4 K[ tg ty ~  p   |Bf{{  \ h     $,AWinPq  \ h     3@e P  M    0     \ h        ' r o     \ h       " 3 > c  0 5 V a  8CQYu A  ?$/*m3uKg y  GQfqw    j+kl k qi7kr k }p7k~ kT D   |7k krs lm H MV M" M  K- L2 M? M F MP M MLT M[ M+b M p M w M ~ M M M Mi M Ma M M M M  M M M M# M|) M0 M 7 M > MNE ML MYS M[ Mc Msk MKs M%{ M M  M M M_ M M MC  M' M_ M, M; MJ MC Y M'v M Mt M M MC  M' M MH MtT Ma Mp M MC  M' M  M M= M< Me  M M* M5 MXA M7O Mt M M  M Mj M- M(  M M  M M Mi M MM( M 7 MY F MD U M8 d Ms M M M M M M M  M M  M@ M * M8 M8F M ] Ml Mx M~ M4 M- Ma M M7 M M M  M  M Md M}  MH  Ma M m M{ M  M-  M M M M9 M'  M  M ( MT6 MK MW Ms M M0  M  M  MI MH M M M  MU Ml M s M M M M Mz Mq M< M3 H MZW Mf M| M| M M| M M* M G M S MZb Mq M| M| M M| M ME MQ MZ` Mo M| M| M M| M MC MaO MZ^ Mm M| M| M M| M MA M^ M MZ\ Mk M| M| M  M| M M? M Y Mh M w M M M M M  M  M& / M? M9M Me M% M M Mk  M  M  M / M M M X M+ MY M I  MT  MO) M-51= I`X M\d&l I M, I  M& M_ M I& M5 M?GO Ig M mu4} I@ M!  M  M  M 4 I M!  M E MX M%'/ I9 M b MH MT  MO M= I` M & I Mh I  M?' MG= MC M; GOIW Ia M p M:vI~o I M  Mo I@ M  M  M M M  I% M 3 M X MT b MOv Mz= I M& I` Mr M$  I M  M $ M 3;D MOX Mf M4 M` M I  M  M  M!  M  M&p= KB M P+X M MqM I M  M  Mc  M D M!  M  K0/ MF M!L M Tk\; d In M  MH M 4  MP M!  M  M4  M0 Ml MNk I@ MPZi M   M M$ Mr,; 44 < IF M s MHV +  M M4 K  I  M  MH  M T $B ? MF MNi V ^ I` h M  M    M M!  M    M Mld MiL qi y I  MPX g  M    M MA  I , M< MK Syk7sy M` M?' I  M  M Mv   Mk! M? MJAS K`X Mq Ml M I  MP M  KF M M MU E] e I@ o M MH M Mc M j  M! M !!! M7! Ml! M!(!E! I ! MP!4!C! M !!Y! M" Mo$" MO ,"4"<" I F" M u" MH" Mz" Mc " M """ M! " M """ M# Mlb# Mg#o#w# I` # MP### M ### M# M # M ##$ I $ M-$ M =$ KB$ MQ$ M a$ Mq$ M$ Mz$P$$ M1 $ M$$0$ I % M% M % M.% M =% M L% M- \% Mf%0n%Yv% I % M% M% MT % MO%Z%% I % ML %%& I@& M& M5& MT ?& MOS&[&c& Iz& M &&& I& M& M& MT & MO&&2& I` ' MF'2'[#' I-' M6' MS' MT ]' MOq'\y'' I ' M1''' I' M' M' MT ' MO((( I5( MT T(\(d( I@( MT ((&( I( MT )&)J) II) MT h)Jp)nx) I`) MT )n)) I* MT * MO!* M %*;-*;=5* I P* MT*<\*<&d* I{* M5* M * M* M&* M* M(0<D`ht|001%%& (4<HP\d$@HT\hp3|3445588(0<D`ht|<<=%%& (4<HP\dHHIIJJMMnn$o@oHpTp\shsp|(0<<<D=`ht|%%& (4<HP\dLLMklloo: : $; @NHOTO\RhRpj|jk; < < ? ? 3 3 4 4  5  5  8 ( 8 0 J < J D K ` i h j t j | m m    L M M P P h h  i  (  4  <  H  P \ d       & & '       $ @ EH FT F\ Ih Ip |   ( ) ) , , D D E    ( 0 < D ` h t |              ( 4 < H P /\ /d 0 0 1 1 4 4 X X Y Z [ [ ^^$@HT\hp|(0<D`ht|  11223366ZZ[ \(]4]<`H`P\d$@HT\hp|%%&&''*(*0I<IDJ`JhKtK|NNmmnnoorr ;(;4;<;H;P;<\;<d;=<<<<<<%<%<& G 0@P`p;<+08'@/HD`hpx KP1& (=08&@H=PX&`;h;=p<x<&W$;C< @`4 @`Io @k    XNk! s@; I h4 q L i     ) H(hEq    0@Z`2\ @`&Jn; <coeio.cc.o/ 1378727467 1000 1000 100664 18184 ` ELF>8#@@UHHH}ut HEHUHHH}ut UH]UH@@@H@@@H]UHH H}HEH@hHEHEH@HUHHHHEHPUHH H}HE@duDHEH@hHEHEHPHEHP(HEP`HEP4HE@0HEHHUHHHHXH`HhLpLxt)M)U)])e)m)u)}HdHHHHHDž8Dž@Dž Dž$@HEH(HPH0HHHHHHu mHHt@ut'nHDž8HHH DH8HUHH@H}HEȋ0s$HEHPHEȋHHUȋJHUȉ HEHPHHJHUHJHHEHEȋ0s$HEHPHEȋHHUȋJHUȉ HEHPHHJHUHJHHEHEȋ0s$HEHPHEȋHHUȋJHUȉ HEHPHHJHUHJHHEHEȋ0s$HEHPHEȋHHUȋJHUȉ HEHPHHJHUHJHHEHMHUHuHEHE}t}u,HEƒHEHMHUHuHEHE}tHUHHp}HuHUEHEHE0HEEEE!EH}HMHUHuHEIHEEHtHEH   8intZ__mܖ0f3m(  ? J m# m# # #fM y (U $ &M# &M# &M# &#cb &#M ' c M# M# M# #cb y#ssM c   (  M# M# M# #cb # # M  r; 3M  &#Mwd # # # -# #( #0nv1 #8nv2 #@ M#H M#L #P #X M#` f#d f#epri t#f #h #p =#x =#grp 7# 7# 7# 7# 6MB U _ yg77M, N  jsp j#  #ctx $C# %# &-# - .# /#F   #  # _ ? 079M#:M#;M#<M# =#>#?# @#( # $T# %T# &#) M O#cswQM# Rp# T#(fidV#0sid`#4 b#8 c#Hfi#X jJ#` k#x l# H? @# A# 8p_ r_# tt#apzJ# |#( }M#0 ~M#4teEwEhEMd NwNhOMdXc reqX h M reqX h!Z t}n}"~#reqZ ~M ٲ apT`TXݬP#res H#rcMl! MTTnh$ Dn  %&y  MTMTT"&>  &o_'B % : ; I$ > $ >  I&I : ;I I !I/  : ;  : ; I8  : ; : ;I8  : ;I8 I5I : ;(  : ; I8 I<  : ; .: ; @B : ; I : ; I .: ; @B .? : ; @@B  4: ; I .: ; I@B !.? : ; @I@B "#4: ; I $4: ;I? < %!&4: ; I? < '4: ; I?  ww+v+,w,-w-0w0UvUVwVWwWZwZevefwfgwgjwjvwwwvwww{v{|w|}w}wvwwwvwwwVvVWw,W /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libeio/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includecoeio.ccstddef.htypes.hunistd.hstdint.hstdarg.hsigset.hev.hsignal.heio.hcoro.hcoro.hrlist.hsockaddr.hsocket.hnetdb.herrcode.hfiber.hsay.h 32K .K--.6»׭Y.9$!׭-%tXL6$fu$fu$fu$fv fkgY3vYuguv/u_Z10coeio_initvai_flagssize_tsa_family_taddrinfogp_offsetprevssize_tva_listtypeev_watcherev_tstamplong long unsigned intoverflow_arg_areaEVBREAK_ALLerrdescsocklen_tnextlong long intsigned charwaitersentactivestate/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coeio.cclong intcoeio_async_cb__ssize_tgc_pool_saydoublecoeio_on_complete/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcptr1ptr2off_teio_ssize_teio_pwdhostunsigned intcoeio_custom_cbai_socktypelong unsigned inttypedef __va_list_tag __va_list_tagcoeio_initcoeio_resolvedatasizeint1int2int3GNU C++ 4.7.3priorityfinishsocktypeoffsfeedsizetypeporteio_tstampeio_cb__gnuc_va_listpendingerrornoeio_wdai_protocolcoeio_idlesig_atomic_tai_addrleneio_reqcoeio_want_poll_cbEVBREAK_ONEev_rt_nowfiberunsigned charEVBREAK_CANCELcoeio_asynctarantool_coroai_addrshort intgetaddrinfo_cbsa_familycancelledai_nextshort unsigned intstackreg_save_arealast_stack_frame_Z13coeio_resolveiPKcS0_dcoroeventsgrp_firstev_asynclong doublecharfunc__socklen_tsockaddrTNT_ERRMSG_MAXev_idleai_familycoeio_managertnt_error_codescoeio_task__off64_ttaskf_datalinkdestroygrp_prevhintscoeio_idle_cberrflagserrstrpalloc_poolrlistuint8_tfp_offset_Z12coeio_customPFlP13__va_list_tagEdzflagsstack_sizegrp_nextsa_dataai_canonnamecoeio_customtimeoutcoro_contextcompleteerrcode_record__sig_atomic_tresultuint32_tGCC: (Debian 4.7.3-4) 4.7.3zRx ,AC g <*AC e \AC K |yAC t :AC u cAC ^ zPLRx  ${AC v  AC   hAC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @W.&,H 1H C2 T b`r,0mE0 \E 00  !!`E p"( , ,',*FV_:}c   Hfy)A|{h}coeio.cc_ZL13coeio_idle_cbP7ev_idlei_ZL14coeio_async_cbP8ev_asynci_ZL18coeio_want_poll_cbv_ZL15coeio_custom_cbP7eio_req_ZL17coeio_on_completeP7eio_req_ZL14getaddrinfo_cbP13__va_list_tagcoeio_managereio_pollev_idle_stopev_idle_startev_async_send_Z10coeio_initveio_initev_async_start_Z12fiber_wakeupP5fiber_Z12coeio_customPFlP13__va_list_tagEdz__gxx_personality_v0_GLOBAL_OFFSET_TABLE_fibereio_custom__errno_location_Z19fiber_yield_timeoutdeio_cancel_Unwind_Resumegetaddrinfo_Z13coeio_resolveiPKcS0_dmemset&<K P[  `p Vuz        0 ,  q!F P U"k#$#%#&K''#)#( 2Q& v  }!W) . ; B I b Ei Sp w ~  5  M O D        5  . < K LV c nj o d| d  Y    ] Y  s ( 7 F ] s 0    ]  0) a/ 75 > 9C N Z z   b   T g l  q ) 8 IV ]e t    Z &     D O q |  O   ?    [  c ,( 7 {F U d s  k      d M " 0 WZ h   I     p   M J5 C Q { ,   >,V `  $ V f  D $ f, 4  : @ H P h p y  k  |  1 u  x " |  @ J * 2 ; a k s {       O   W  ) 8 G V ^ Ug u  C  _ M    @,`Vf |  $DM iobuf.cc.o/ 1378727467 1000 1000 100664 49208 ` ELF>pM@@RO!#')+-/134679:<=UHH}HEH@HHEH@HH)H]UHH}HEHPHEH@ HHHEH@HH)H]UHH}HEH@]UHH}HEHPHEHHHHHHt HEH@HEH@]UHH}HuHEHUHHEH@ HEH@HEHPHEHPHEHPHEHP]UHH}HEHPHEHPHEHPHEHP]UHH H}HuHEHH;EHEHHEHEHUHHEH@ H9w$HEHHHEH@HUHHHHUHR HH9HBHEHeHEHUHH;EuHEHHUHHHHEHPHEHHHEH@HUHHHEHUHP HEHPHEHPHEHPHEHHEHPUHATSH H}HuH}LD$aH$AAaAҿHHEH@H$AIaHHHEHUHHHHHHEHUHHHHHHEHUHHDIHLHH [A\]UHH0H}HuHUH}tHEHPHEHHDHHHEHeHEH;EuHEHHUHHHUHMHHHHHHEHPHEHJHUHTHEHUHHHHHHtsUHHH}HuHEHUHHEH@HEH@HEHPHEHHUHH H}HEH@HEH@HEHHE:HEHH;EwHEH@HEHEH@HuUHH@H}HuHUHEH@HHHHEHHHEHEHPHEHHDHElHEH@H;EHEH@HUHH)HHEHEH;ErHEHHEH@H HUHEHHHEHPHEHHEHPHEHPHEHHEHPHEHEHEH)EBH}u;HEH@HPHEHHHEHHHUHEHHHEH@H;EtHEH@HPHEHPHEH@HHHHEHHHEHEHPHEHHDHEHEHPHEHH;EvHEHHEH@H HUHEHHHEHPHEHHEHPHEHPHEHHEHPHEHPHEHHHEHHDH9vUHH0H}HuHUHEH@HHHHEHHHEHEHPHEHHDHEHEHPHEHH;EHEH@HtOHEH@HPHEHPHEH@HHHHEHHHEHEHPHEHHDHEH}u8HEH@HPHEHHHEHHHUHEHH%HEH;EvHEHHHUHEHHHEHPHEHHEHPHEHPHEHPHEHPHEHPHEHHEHPHEHPHEHHEHPHEHPHEHHHEHHDH9vHEUHH H}HuHEHPHEHH9EHEHHEHPHEHHHEH@HUHHHHHHEHPHEHP}uvHEH@HHHHHEHHHE:HEHH;EwHEH@HEHEH@HuUH]UHSH(H}HHuVHHHHEHEHEHPHEHH HEHP0HEHHHHEHHHHEH@HHHHH9vHEH@HUHHHEH([]UHSH(H}HEH@HEHEHHHH9t"HEHHHEH0H :HEHHEHPHEHHHEHP0HEHHHEHHHEHHEHH([]UHSH(H}HuHEH0H@HHEH0H?HEHHHEHHHEHEHHHUHHHHEH([]UHHH}HEHHhHtHEHHJHEH0HUHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHLoggedError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iobuf.ccobuf_init_posiovecbuf->iov[pos].iov_len == 0iov < buf->iov + IOBUF_IOV_MAXfill < sizecapacity == iov->iov_leniov->iov_len <= buf->capacity[buf->pos]palloc_allocated(iobuf->in.pool) <= iobuf_max_pool_size()iobuf_cacheiobuf_newobuf_rollback_to_svpobuf_bookobuf_alloc_posobuf_dupobuf_resetZn E\cxUHSHHH}HuU܉MLELMHELMLEЋM؋UHuH}H<$HǸHEHHEHHHEHHHHH[]UHHH}HEHHEHt HEHUHHH}HEHHEH11LoggedError11ClientError9Exception6ObjectintbmrF+-p#.# [  01 3?(5P7V# buf8}# pos:}# end<}#># P `k kmV#o# posq#s# iovz#Fii pos###He;e#$# in# outk#0 v( * ,[# ,[# ,[# ,p#cb ,# ,# [}0 7 9[# 9[# 9[# 9p#cb 9# 9# fd ;[#( <[#,[} r   # $# %# &#  )  x~                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : )       +   #h#%:G[km m!F!!?F"# [$ % i&#'"(&%['*6B )+\$Y#*4#*6?#*9Y#+'j,log,ij-/u?-1)5u{ i#iKu[j.ip ii$5/[01$B$2G3Gh2N 3Nh2M 3M hk2[ 4bufM h5 6 6 7  8 h7   8 h9%I 3%h3%V`9/x 3/h:9 39X39P;<=`;<Hh=:$  6 6 u7 J S 8 h7 y  8 h=U 6 6 7  8 h7   8 h>]M 4buf]M X4pos]P>j 4bufjM X4posjP3jH;<lh?   i :z# 4bufzM h3zV`> 4bufM X;?  ;@iovh i :`4bufM H3~@3;@iovh<`?p ;<Xpi `A 4bufM P3̕H;@iovh<ϕ`@svpX? i :4bufM X4svpP;<g? ;@iovhi B[CDH;EX? ;EVP F&D&H;E(VXC7PD7HD7P@;E9XFKDKh5G !F!!6GkGk?GkHkF 76t 6!F!!8X8P8L8HHk8@88=%h667t8h7t8hIW[ J DkK<) k9LK y.f[[0K >sFK,VI  % UR$ > $ >  : ; I I : ;  : ; I8 &I : ; I8 <  : ;  (  : ; I!I/  : ;  : ; : ;I8  : ;I8 I : ; : ; & : ; I8 2 .? 4 < dI4 .? L 4 < d.? : ; < d !/I"< #.? L 4 < d$ I% : ; & I8 4 '.? : ; < d(.? : ; L < d).? : ; @I< d* : ; I8 2 +.? : ; @I< d,.? : ; @L M < d-.? : ; 2 < d.!I//I01 I2.: ; I@B 3: ; I 4: ; I 5.G d6I4 7.1@@dB 81 9.: ; @B :.? : ; @@B ; <4: ; I =.G: ; d>.: ; @B ?4I4  @4: ; I A.? : ; @I@B B.: ;I@B C.? : ;@I@B D: ;I E4: ;I F.? : ;@@B G: ; IH: ; I4: ;I?  J4: ;I? < K4: ; I? < L!wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw 1&=&=&=&S /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyiobuf.hobject.hiobuf.ccexception.htypes.htypes.hstddef.huio.hstdint.hev.herrcode.hsay.hsio.htarantool_ev.hpalloc.h 3'/.3#.,36u$/I[׼k  ./|#4=tK/I05󭻻g3X$3="`&&gg tZ="V,&gg"3="="ugg"!kv&h(X;% .K5ʻuggKyɻ"ghyC Kx % % ## # #  6Tj # S_INFOcapacityobuf_rollback_to_svp_ZNK9Exception3logEvev_watcher_list__in_chrgsize_tER_ARG_TYPEER_NO_SUCH_INDEXER_RESERVED15signed charER_INJECTIONssize_t_Z12ibuf_reserveP4ibufmev_tstamplong long unsigned intobuf_createEVBREAK_ALLdataiobuferrdescER_EXACT_MATCHnextiobuf_max_pool_sizeibuf_reserveobuflong long int_Z11iobuf_flushP5iobufP5ev_ioER_OKm_errmsgER_FIELD_TYPEm_lineS_ERRORactive_ZN6ObjectaSERKS_long int~ObjectObject__ssize_tobuf_sizeiobuf_newS_DEBUG_sayiobuf_deletedouble/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iobuf.ccER_RESERVED12thisER_RESERVED14tnt_error_codes_enumcurrent_sizeshort unsigned intER_RESERVED17ER_MEMORY_ISSUElineER_WAL_IOibuf_unusedobuf_dupibuf_size__vtbl_ptr_type_Z8obuf_dupP4obufPKvmsay_levelS_CRITER_UNKNOWN_UPDATE_OPlong unsigned intER_RESERVED11ER_KEY_PART_COUNTER_RESERVED13_ZN9ExceptionD0Evsle_nextER_RESERVED16__FUNCTION__ER_RESERVED18ER_RESERVED19m_file~LoggedErroriovecnameiobuf_gcsizeER_ILLEGAL_PARAMSS_WARN~ExceptionER_NO_SUCH_FIELDGNU C++ 4.7.3_Z8iobuf_gcP5iobufpriorityER_INDEX_TYPE_Z11obuf_createP4obufP11palloc_poolboolER_FIBER_STACKER_TUPLE_FOUND_ZN11ClientErrorD0EvER_UNUSED8iov_baseiov_len_Z9obuf_bookP4obufm_ZN6ObjectD0EvER_RESERVED20ArgsER_RESERVED22SERVICE_NAME_MAXLENER_UNUSED33ER_UNUSED34ER_UNUSED35ER_UNUSED36ER_UNUSED37sizetypeER_RESERVED21ER_RESERVED23ER_UNUSEDLoggedErrorER_SPLICEiobuf_flushcoio_ZN11LoggedErrorD2Evobuf_iovcntER_SPACE_DISABLEDLoggedErrorobuf_alloc_posobuf_bookcfg_readaheadER_KEY_FIELD_TYPE_Z9iobuf_newPKcIOBUF_IOV_MAXER_NO_SUCH_SPACEEVBREAK_ONEev_rt_nowER_UNUSED46ER_TUPLE_IS_ROunsigned chareventsoperator=Exceptioniobuf_cacheS_FATALshort inteter_poolTIMEOUT_INFINITYfilefill_Z20obuf_rollback_to_svpP4obufP8obuf_svp_ZN11ClientErrorD2EvER_PROC_RETerrcode~ClientErrorER_SECONDARYobuf_svpER_UNUSED24uint32_tER_UNUSED25ER_SPACE_EXISTSER_UNUSED27ER_UNUSED28ER_UNUSED29long doublecharER_TUPLE_NOT_FOUNDunsigned intobuf_init_posTNT_ERRMSG_MAXibufev_iotnt_error_codes_enum_MAXtnt_error_codes/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcpending_vptr.Object_ZN6ObjectD2Evis_last_posER_UNSUPPORTEDtotalibuf_resetER_PROC_LUA_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_errflagsClientErrorerrstrobuf_resetpooluint8_tER_NO_SUCH_PROC_ZN11LoggedErrorD0Evslh_firstibuf_create_Z12iobuf_deleteP5iobuf_ZNK9Exception6errmsgEverrmsgnew_capacityEVBREAK_CANCELerrcode_recordER_UNUSED30ER_UNUSED31ER_TUPLE_IS_TOO_LONGER_UNUSED32ER_NONMASTERpalloc_pool_ZN9ExceptionD2EvGCC: (Debian 4.7.3-4) 4.7.3zRx &AC a <1AC l \AC M |BAC } 1AC l &AC a QAC L *AC e )AC $ <=AC x \&AC a |=AC x &AC a zPLRx $$AC G AC  $LAC G DAC } doAC j AC  AC  AC P  AC E  AC E  ,AC E| PHAC C $AC Ez =AC x  &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rodata.gcc_except_table.rela.text._ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_.rela.rodata._ZTV11LoggedError.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS11LoggedError.rela.rodata._ZTI11LoggedError.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group,@P4,HPR,PP5,XP[,`P6,hP_,pP7,xP{,P8,P,PY,PO,P,Pe,P,P,P,P,P,P  (vPP& , 6 11x}0PP &K}0Pj=e}HP>& ~0Pd=P~HP!&~0P#r#~xP'1 ( ,@HP)PH=KHP+p&k0P-( HP/ H0P1 0xHP4H`HP72x NIHP:e~yP0P="P?^&h* xPBF5xPD6PF6`PH0; 0AF ^F"`FPPM8J3a QN n0 &&15WIiB`Q*!#%O&m%% 9% _%u %`6 %N ')+-/134679:<=?ABDFHJLM,T K     i"1x!1 "1"&&)"=!/("="&*"!=?Q"!=f"#&{"'"+=!4 -9FL]osJ K  0 "+ Ii| H|"'!)("'"'8"-&M"+=bu!3!7!6!:!9 !=!< iobuf.cc_ZL9ibuf_sizeP4ibuf_ZL11ibuf_unusedP4ibuf_ZL9obuf_sizeP4obuf_ZL11obuf_iovcntP4obuf_ZL11ibuf_createP4ibufP11palloc_pool_ZL10ibuf_resetP4ibuf_ZL13obuf_init_posP4obufm_ZL14obuf_alloc_posP4obufmm_ZZL14obuf_alloc_posP4obufmmE12__FUNCTION___ZL10obuf_resetP4obuf_ZZL10obuf_resetP4obufE12__FUNCTION___ZZ8obuf_dupP4obufPKvmE12__FUNCTION___ZZ9obuf_bookP4obufmE12__FUNCTION___ZZ20obuf_rollback_to_svpP4obufP8obuf_svpE12__FUNCTION___ZL19iobuf_max_pool_sizev_ZZ9iobuf_newPKcE12__FUNCTION___ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorC5IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_Z12ibuf_reserveP4ibufmmemmovecfg_readaheadpallocmemcpy_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev__gxx_personality_v0_say__cxa_allocate_exception_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedError__cxa_throw__cxa_free_exception_Unwind_Resumeassert_fail_Z11obuf_createP4obufP11palloc_pool_Z8obuf_dupP4obufPKvm_Z9obuf_bookP4obufm_Z20obuf_rollback_to_svpP4obufP8obuf_svpiobuf_cache_Z9iobuf_newPKceter_poolpalloc_create_poolpalloc_allocatedpalloc_set_name_Z12iobuf_deleteP5iobufprelease_Z11iobuf_flushP5iobufP5ev_io_Z11coio_writevP5ev_ioP5iovecim_Z8iobuf_gcP5iobuf_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZN11ClientErrorC2EPKcjjz_ZTV11LoggedError_ZNK11ClientError3logEv_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev__cxa_pure_virtual_ZTS11LoggedError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoETUVWpa     b n ` c d efUg`hUV, 6 ; t@i   i   iWm w | iWi s x }i+ u5 : ? i `   i< U[ ng pt V}  q j n n n r N   i! sQ r u j B s n nB wR xX Um S O+PQ P YN7PZ P ]X7P^ PFzQ {]|n\yhd | {\7Pd PZ[ QR , 17 1  1 /- 04 1; 1B 10I 1CP 1W 1e 1l 1{s 1 1 1 1T 1 1E 1 1 1 1} 1 1Z  1x B 1Q 1h e 1l 1@y 1x  1 1 1 1  1 1- 1< 1l 1y 1~ 1: 1 1 1X 1 1 1_ 1 1, 1X; 1X 1u 1 1  1 1 1  1f  1 1Q  1K 1v 1q" 1[ ( 1. 14 1: 1a@ 1F 1L 1R 1X 1^ 1Ud 1Uj 1up 1hv 1x| 1 1 1 1 1  1 1 1 1 1 1 1 1 1 1"  1.  1O  1? 1K 1W 1c 1o 1d 1  1 1[ 1 1: $ 1.* 1 0 16 1c< 1B 1H 1 N 1 T 1Z 1g` 1&f 1l 1r 1x 1e 1 1  1 1' 1 1 1 1+ 1  1 1  1  1' 1I 1U 1 1Z  1 1 1 1 1' 1I 1O 1j 1 1 1 1w 1  1  1% 1 1< 1 1 1& - 1Z 1&W -` 1Z 1% W- i5 -? 1@T 1^ if n -  1c 1J 1   1 - 1   & - 1   # -@- 1Z; 1x J 1 P X &` -j 1Zz 13 1 & O - 1Z 1 6 M 1  # 1 1c 1J) 1t -  5  == -`X 1\ d &l - 1c 1J 1k  = -  1  & - 1= O m' -N 1=T m\ Fd -@ 1  D 1 1  1 1o F  - 1x $ 1m * 2 : -R Z c 1n w   1 1   -` 1 1 ( 1+ 16?zGP 1=w 1L} 1J  - 1D  1 1u# 1) 1B-J 56 = - cZ k4 t 1 1` 3  1 16 K  - 1 1v K 0  -% 14X <) E 1T 1_Nhd p y 1x  1 1 0   -@ 1=   1x  1 1S |  - 1  1/ 7u @ 1 X 1_ 1Ec| k s - } 1 1 1c 18 1 1 1)  -`  1 1c 1J 1= -  1   & -  1VU 1 1': 1~g 1z 1 1n(0%<%D&`&h't'|**VVWWXX[[hhi i(j4j<mHmP\d      0 0 1      % %$ &@HT\hp|%%&&''*(*0N<NDO` h t |   < < =%%& (4<HP<\<d=%%&OPPSSll$m@mHnTn\qhqpE|EFFGGJJ(0<D`ht|I I J J (K 4K <N HN P5 \5 d6 6 7 7 : : J J K K L L O O / / $0 @0 H1 T1 \4 h4 p |       { { | |  }  }   (  0  <  D  ` h t |           < < =  (  4  <  H  P  %\  %d  & +  0 @ P`p    1  ( &0 8 =@H&PX=`h&px=  &` 2 H g} @&`Wi   &@ ` `O m(FHhJ 6 K 0 0 T| t}  coio_buf.cc.o/ 1378727468 1000 1000 100664 3432 ` ELF>@@ inti\0$#$c#%c#&# D| <| y G% $ > $ >  I&I: ; I : ;  : ; I8 4: ;I? < 4: ; I? < I !;5 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hstdint.herrcode.htarantool_ev.hiobuf.hlong long intunsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrflagsGNU C++ 4.7.3TIMEOUT_INFINITYcfg_readaheadlong unsigned intev_rt_nowlong long unsigned interrstrerrcode_recordev_tstampuint8_tunsigned charcharlong inttnt_error_codesdoubleshort unsigned intsigned charerrdesc/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coio_buf.ccshort intsizetypeGCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rela.debug_info.debug_abbrev.rela.debug_aranges.debug_line.debug_str.comment.note.GNU-stack@!@'@1@, =VP KP _?k0Fv0        coio_buf.cc  c E   ' . 5 < 1C Q X _ q x }  = Z q    salloc.cc.o/ 1378727468 1000 1000 100664 58720 ` ELF>a@@RO "$')+-/134679:<=UHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHH H}HEH%HEHE=QtjHEUHH}EHEEHEHEUHHHHHHEHUHHHHHH@UHHHHHHHHUHHHHHHHHEHHHHEHxH*HHH H*XYEf.sH, \H,HH1HH9HCHEE}wH}wEHHUȸ?HuH]UHSHH}HuHEH@ HEHHHEHPHEH%H@HEHPHEH@AA"HƿHUHHEHHu;HAHӸ;HEHH%H@HHEHPHEH@(HEH@0H[]UHH}HE@HEHPHEH@ HH)HH=?w2HEHPHEH@ HHEHEH@ H@HEHP HE]UHH H}HuEH}wKHEHƿUt,H}HHCUHEHEEHUHHHtHHHH8]UHHH}HuHEHH=vHEQHEH@HEHUHP HEH@HEH@HEH`HHHHEHP(HEHPHEHPPHEH@PHtHEH@HUHPHPXHEHPPHEHPHEHUHPHEHPHEHPXHEHPHEHP@HEH@@HtHEH@HUH@HPHHEHP@HEHP HEHUHPHEHPHEHPHUHH}HEHP(HEH@ HHHEH@H9]UHHHEOHEH`HEHEH@ HHEHEH@ HHEHHEH@H9uHEH@0HEH}u]UHH}E=UHHHHHHH;ErUHHHHHE9Eu]UHH H}HEH@Ht;HEH@HEHE=QtHEHHt\HHEHE=QtHH@8HHUHEHHHERHEH}t3HUHEHHHHEHP0HEHHEUHH}HuHEH`H;EwHEH`@H;Ev]UHATSHHHHH(HEH}tHEHvHEH}uLD$H$AAAҿHHHH$AIйHHHEH@Hu_HEHP(HEHHuHEH@(HEHEHP(HEHHHEHP(CHEHPHEHHTu$HEH@HEHDž CMHEH(HDž0HDž8HDž@HDžHH Dž HH H=H3HHHEHEEHEHHEHPHDžPCMHEHXHDž`HDžhHDžpHDžxHPDž HH H=H3HHHEHEEHEH tHEH@HutFHEH@@HtHEH@@HUHRHHPHHEHPHHEHP HEH@HHUHR@HHEHPHEHHHEHPHEH@HPHEHPHEHEHEHEHHEHEHEHEHEDž HH H=H3HHHEHEEHEIHLHH[A\]UHHpH}H}aHEHHEHEH@ HEHEHEHEHtHEH@Hut;HEH@@HEHP HEHPHHEH@ HUHHEHP@HEHP HUHEHHAuBHEH@Ht7HEHPHEHHtCHEHPHEHHEHUHPHEHPHEHH)HEHPHEH@HPHEHPHEH@HHEH@@HtHEH@@HUHRHHPHHEHPHHEHP HEH@HHUHR@HHEH@PHtHEH@PHUHRXHPXHEHPXHEHPHEH@XHUHRPHHHEHP8HEHHEHEHEHEHEHEHEHEEUHH H=H3HHHEHE؉EUHHPH}HEH HEHEHEHEH@ HEHUHEHH9u\HEH`HHHEHUHEHH)HHUHHUHuHEH}y`HUHHH)HHHEH}ycHUHHHEHHEHEHH;EtgHEUHH@H}HHUHEȺHuHEH HEȺHHUHHUHHHHEHEH@ HEHEH`HHHEHEHHHUHEHHEHUHEHHuxHEUHH`H}HuHUH}tHHEHPHHEHH}FE$HE(HEHcHHHHHH@HEHEHHEHEHHEH@HHEHEH@HEHEHHEH@HH)HHEHEH`HEHEH`HEHEHHEH@HHEHEH@PHEH}jEHcHHHHHHHEHEHt"HMHUHEHHЉE}tE EU9HUHHH}HEHt HEHUHHH}HEHHEH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/salloc.ccslab->magic == SLAB_MAGICmmapcache->item_size <= MAX_SLAB_ITEMLoggedError%s at %s:%islab allocatorvalid_item(slab, slab->brk)valid_item(slab, slab->free)valid_item(slab, item)slab->free == NULL || valid_item(slab, slab->free)item_no >= 0slab_no >= 0salloc_ptr_from_index(index) == ptrQ@salloc_ptr_from_indexsalloc_ptr_to_indexsfreesallocslab_ofslab_validateformat_slabslab_headerCUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH=c  E\cxUHSHHH}HuU܉MLELMHELMLEЋM؋UHuH}H<$HǸHEHHEHHHEHHHHH[]UHHH}HEHHEHt HEHUHHH}HEHHEH11LoggedError11ClientError9Exception6Objectg<Nvint(<03zN(,2 -# .# /# 0# 1# 5[ 6C# 7C#:fl v  (  c  # # # #  c O  """"$&&&&&&&&&&((((***,.  Ov f  c ) # $}# %}# &# )  xx      !"#$%&'()*+,-./0123456789:? @#x`CJ J#K K#L L# L#M M# M# D# EC# FC# G# H# brkI#( J#0 K#8 L#@ M#Px(S TC# U# U#P P#QC Q# QC#8X Y# ZC# \# ]C# ^C# _#( _#0h\\# vk66N}} } N } }\w&v ! 2 "U ##"e $&e v#* e  k %+q % e  k $" #&4}#&6#&9" #''} 3 (log,2  3 )/ >  } )1 >  D 2 2  > v 3 *c9 2 2  vU +[ ,J   -Sv .S}}+/0UN~0V~/0_" }0_' ~ " c1 1-qv .q}}+/0sN~0t~/0} }0}' ~1 2 3 3qe 4  # 5 h4 I R 5 h6g 7ptrgX/8ih9   c  :oE ;oCH;oE @/ T;Ch;C`;E X?@;h;`/9  =Β ;hA/8h9 / 45h4&5h\BfU<Q3Q3q&4,|5<h4,5<hCT.C~.}~/0H0X0P9d D0'D/0'i~0'' D0)@/0)n~0)' /02/02s~02'  d cT1 1 1 E7TFptr7/0;h0<`0=X9d /0PT/0Pi0P' H d cT1 CUC9FptrU/0Wh0X`0YX99 0^P0_1H0b1@0eCCm.mC/0oCh0pC`0rX0tP0vH0w@9    cCvFcb[../0hGst/Givd/Gresv`22DN}}3DHk}HkHkIk N } }4N}}5X5P5L5%HIk53@585=Bh3D3q45h4@I5hJi v } v } }+K >vI LK y| McN4 87 88L 89L N=C 8b  @ c8c0 8dI % UR: ; I$ > &I$ >  I  : ;  : ; I8 I I I !I/  : ;@( : ;I : ; @ : ;  : ;  : ;  : ; I8  : ; I8 2 .? 4 < dI4 .? L 4 < d.? : ; < d/I< .? L 4 < d  I! : ; " I8 4 #.? : ; < d$.? : ; L < d%.? : ; @I< d& : ; I8 2 '.? : ; @I< d(.? : ; @L M < d).? : ; 2 < d*!I/+, I-.: ;I@B .: ;I / 04: ;I 15I2.G d3I4 4.1@@dB 51 6.: ; I@B 7: ; I 84: ; I 94I4  :.: ; @B ;: ; I <4: ; I =.: ; I@B >.? : ; @I@B ?.? : ; @@B @.: ; @B A.? : ; @@B B.G: ; dC.? : ;@I@B D E.? : ;@@B F: ;I G4: ;I H: ; II: ; JK4: ; I? < L!M!I/N4: ; I?  wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw1&=&=&=& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/valgrind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includevalgrind.hobject.hsalloc.ccexception.hstddef.hstdint.hsalloc.hstdarg.hstdio.hmemcheck.herrcode.hsay.h "2'-u .2'-u].K2˄=Yw JtX2Y24wɻYxvghK2Kvuv'Y2K=2"X"X2&2MK2JY2ɻ!/i/iY3ftY3ftX~$zztXKX0>hg.tXK;f>X/X/ja 3f=)tt K2iɼ=fK .=uٰY'YxX ggUq JX % % ## # #  6Tj # VG_USERREQ__MALLOCLIKE_BLOCK_vptr.Object_ZN9ExceptionD2Evslab_cache_stats_ZNK9Exception3logEvsize_terrflagssizetypefree_link_ZN11LoggedErrorD0Evvargsusedcache_forVG_USERREQ__MAKE_MEM_UNDEFINEDER_FIBER_STACK__vtbl_ptr_typeER_NONMASTERslab_caches_initfree_slabsER_NO_SUCH_FIELDER_OK_zzq_argsslab_cachesallocVG_USERREQ__CLIENT_CALL0VG_USERREQ__CLIENT_CALL1VG_USERREQ__CLIENT_CALL2VG_USERREQ__CLIENT_CALL3VG_USERREQ__MEMPOOL_TRIMslab_slist_headVG_USERREQ__RUNNING_ON_VALGRINDarenalong intVG_USERREQ__STACK_CHANGEbytes_usedS_DEBUGerrstr_ZNK9Exception6errmsgEvcache_linkslab_cachesVG_USERREQ__MAKE_MEM_NOACCESSsigned charLoggedErroruint8_t24Vg_MemCheckClientRequestoperator=slab~LoggedError_ZN6ObjectD2Evunsigned char_Z21salloc_ptr_from_indexmS_WARN__FUNCTION__red_zoneastat__gnuc_va_listER_UNSUPPORTEDcharS_CRITVG_USERREQ__LOAD_PDB_DEBUGINFOformat_slabslab_validatem_linelinelink_Z19salloc_ptr_to_indexPv_Z11salloc_freevER_PROC_RETthis16Vg_ClientRequest_Z6sallocmPKcArgscache_free_linkfp_offsetER_ILLEGAL_PARAMStqe_nextsay_levelptrdiff_ttqe_prevException_ZN9ExceptionD0EvVALGRIND_PRINTFfileVG_USERREQ__CHECK_MEM_IS_DEFINEDm_fileVG_USERREQ__COUNT_LEAK_BLOCKSarena_allocVG_USERREQ__DISCARD_TRANSLATIONSER_TUPLE_IS_RObytes_freeMAX_SLAB_ITEMcb_ctxVG_USERREQ__COUNT_ERRORS_zzq_result~ClientError_zzq_rlval~ObjectindexS_INFOER_ARG_TYPEtnt_error_codes_enum_MAXslab_arena_statsclazzER_KEY_PART_COUNT_qzz_resarena_initlong unsigned inttnt_error_codes_enumObject_ZN11LoggedErrorD2EvVG_USERREQ__MEMPOOL_EXISTSER_FIELD_TYPEsalloc_statsalloc_initsle_next_Z13slab_validatevsfreeER_RESERVED11ER_RESERVED12ER_RESERVED13ER_RESERVED14ER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19_VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERRORslabsER_UNUSED36ER_SPACE_EXISTSuintptr_tVG_USERREQ__STACK_REGISTER_sayER_RESERVED20ER_RESERVED21ER_RESERVED22ER_RESERVED23VG_USERREQ__DISCARDVG_USERREQ__SET_VBITSER_TUPLE_NOT_FOUNDslab_headerER_NO_SUCH_SPACElong long intER_KEY_FIELD_TYPEva_listtqh_lastER_SPACE_DISABLEDdoubleER_INJECTIONgp_offsetER_UNUSED24ER_UNUSED25ER_UNUSED27ER_UNUSED28ER_UNUSED29slh_firstVG_USERREQ__STACK_DEREGISTERslab_noerrcode_recordmmap_baseunsigned intitem_notnt_error_codesGNU C++ 4.7.3ER_UNUSED30ER_UNUSED31ER_UNUSED32ER_UNUSED33ER_UNUSED34ER_UNUSED35Vg_MemCheckClientRequestER_UNUSED37_ZN11ClientErrorD0Evsalloc_freeVG_USERREQ__CREATE_BLOCKVG_USERREQ__COUNT_LEAKSoverflow_arg_areaER_PROC_LUAER_UNUSED8ER_UNUSED46ptr_sizeS_ERRORerrdescER_UNKNOWN_UPDATE_OPVG_USERREQ__FREELIKE_BLOCKVG_USERREQ__CREATE_MEMPOOL_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_fully_formattedVG_USERREQ__PRINTF_VALIST_BY_REFboolerrcodeslab_tailq_headER_UNUSEDcacheVG_USERREQ__MOVE_MEMPOOLlong doubleTNT_ERRMSG_MAXVG_USERREQ__MEMPOOL_ALLOCER_SPLICEER_TUPLE_IS_TOO_LONG~ExceptionER_TUPLE_FOUND_Z5sfreePvslab_ofsizeVG_USERREQ__DESTROY_MEMPOOLlong long unsigned intwhatreg_save_areaER_NO_SUCH_INDEXClientErrorVg_ClientRequestMAX_SLAB_ITEM_COUNTVG_USERREQ__PRINTF_BACKTRACEbrk_startER_EXACT_MATCHtqh_firstformatS_FATALshort intVG_USERREQ__GET_VBITS_ZN6ObjectD0EvER_NO_SUCH_PROCm_errmsgVG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLESLAB_SIZEER_SECONDARYVG_USERREQ__CHECK_MEM_IS_ADDRESSABLEitemVG_USERREQ__MEMPOOL_CHANGE_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2_salloc_stat_cbfactorVG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REFitemsER_WAL_IOER_MEMORY_ISSUESLAB_MAGICuint32_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/salloc.ccitem_sizeVG_USERREQ__MEMPOOL_FREEslab_itemerrmsgfree/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcshort unsigned intmagicsalloc_ptr_to_indexslab_active_cachesLoggedErrorbaseVG_USERREQ__DO_LEAK_CHECK_Z11salloc_initmmd_ZN6ObjectaSERKS_VALGRIND_PRINTF_BACKTRACEint64_t__in_chrgVG_USERREQ__MAKE_MEM_DEFINEDER_INDEX_TYPEsalloc_ptr_from_indexnext_ZN11ClientErrorD2EvVG_USERREQ__MAP_IP_TO_SRCLOCVG_USERREQ__PRINTFmmap_sizetypedef __va_list_tag __va_list_tagvalid_itemminimalGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <AC  \1AC l |&AC a FAC A nAC i  AC E lAC g  sAC n @?AC z `WAC R 0AC k nAC i eAC ` AC   8AC s  =AC x @&AC a `=AC x &AC a zPLRx $$AC J {AC v DAC ? (AC   AC  $AC Ez =AC x &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rodata.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.gcc_except_table.rela.text._ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_.rela.rodata._ZTV11LoggedError.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS11LoggedError.rela.rodata._ZTI11LoggedError.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group,@P=,HP[,PP>,XPk,`P?,hPo,pP@,xP,PA,P,Pi,PX,P,Pu,P,P,P,P,P,P  P&,X( 611ȕ0PP&K0Per=m(HPF&p0P l=HP"&0P$3xP'1( ,HP)P=KؗHP+p&k 0P-@( PHP/ 0P1ȘHP4HP72 NIXHP:e(~0y0P=@kЙ/P?3D8 PBBPDCPF4DpPH0Jz0Z Z"Z`PMp^3(vh QW  $G_ (p (8z2F xnl W Pc0kezfv 8 "$& 7')+-/134b|r679:<=?ABDFHJLM K     )"18!1 DK"1Z"&irZs?n"=!/("=0" &B""=Wi""=~"$& "'"+= !4*?N {YDs> "'!)(":"'b"'"-&"+=!3!7!6&!:5!9 D!=P!<\salloc.cc_ZL15VALGRIND_PRINTFPKcz_ZL25VALGRIND_PRINTF_BACKTRACEPKcz_ZL18slab_active_caches_ZL11slab_caches_ZL5arena_ZL11slab_headerPv_ZZL11slab_headerPvE12__FUNCTION___ZL16slab_caches_initmd_ZL10arena_initP5arenam_ZL11arena_allocP5arena_ZL11format_slabP10slab_cacheP4slab_ZZL11format_slabP10slab_cacheP4slabE12__FUNCTION___ZL15fully_formattedP4slab_ZL9cache_form_ZL7slab_ofP10slab_cache_ZZL7slab_ofP10slab_cacheE12__FUNCTION___ZL10valid_itemP4slabPv_ZZ6sallocmPKcE12__FUNCTION___ZZ5sfreePvE12__FUNCTION___ZZ19salloc_ptr_to_indexPvE12__FUNCTION___ZZ21salloc_ptr_from_indexmE12__FUNCTION___ZL10SLAB_MAGIC_ZL9SLAB_SIZE_ZL13MAX_SLAB_ITEM_ZZ13slab_validatevE12__FUNCTION___ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorC5IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Evred_zoneMAX_SLAB_ITEM_COUNTassert_failmmap64_say__errno_locationstrerror_Z11salloc_initmmd_Z11salloc_freevmunmapmemset_Z13slab_validatev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_Z6sallocmPKc__gxx_personality_v0__cxa_allocate_exception_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedError__cxa_throw__cxa_free_exception_Unwind_Resume_Z5sfreePv_Z19salloc_ptr_to_indexPv_Z21salloc_ptr_from_indexm_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2__ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZN11ClientErrorC2EPKcjjz_ZTV11LoggedError_ZNK11ClientError3logEv_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev__cxa_pure_virtual_ZTS11LoggedError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEZ d i In^   0   0V g  ]Y_t`yab c   (($((e  (f, 6 ; h@^D(%  E  Q    I^L(L(   I^L( L(#  (R D(e D( `" ( . = T ro s t u v  ^' 1 6 ; ^d wo x: D I N^~   ^L(L(B L Q V^   ;^,(   H^]{  * / X4^M]i],(   ^)<(84(lf  C   x X+YZ Y iW7Yj Y mh7Yn YF~Q ]nlyxt  l7Yt Yjk Z[ 5 :  : : 8- 92 :L? :D :bQ :X :_ :" f :rm : :U : : : : : : : :W :< :M :5 :  :$ :3 :? : M :\ :  :7 :C :j : :  :  :3  :  : :" :) :I0 :b7 :{> :E :2L :S :M Z :h a : h := o :Wv :} :  :4  :) :& :0  :  :  :a : : :a :  :  : :g : : : :  :& :C0 : : : D :N : X : b :l : w :s  :B :w  :(  :Z : :} :) : :1 :0  :i :.  : :' :" :'( : . :4 :: :G@ : F : L :]R :FX :^ :d :j :p :v :| : : : : : : : :t : : : : : :+  :7  :C  :O  :[  :g  :; :  :! :  :D  : :W  :a  :8 $ :W * : 0 :6 :< :B : H : N :DT : Z :` : f : l :r :y :p : : :j :j :9 :V :9 :V :, :: : H :V : r : :{ :  :P :7 :M :5 :  : : : ' :f 5 :;J :V :d :9r :> :  : :5 :  : : : : :] : h :W :  : :  :o :  : :p3 :_M :\ :k : { :z :8 :M :_ :_ :v ] :x :{   6 :p Y  : :   :- :K- :8 @ 2H 6`R :p c rk 0t : :  ) :- :K : : :  1 6( : , 4 &< 6 S :] 2e xm 6 > v : :   : x  6 :r :  ( : 6 : H :VR :\ d l 6@v : : : :  Z 6 :  X :  :^ :]Z  6* : 8 :rF : V : \ :`h p 6`v :| c 6 :  :a :  : c 6  : : :s$, 66>G :U :` iq :f 6 :  _ : fv  6@ : !r)t 2 :@ :K [ :gfv n v 6 : :/  : : :*= 6 :i& 6`= :G :[ :_g=o 6 : & 6  :B :   6 :  :  s  :  :. :/ = :H QK Y f :duK }  :- :K N  :d N  :- :K W  :  (W 1 :-A :Kz : :   6  : :  :/  :   :!)2 :-B :Kp :w :> 6@< : :/  : :  :M  :  :( :w@ :G :O>W _ 6i :wyJ  : :  : : :M  :/  :  :R :O  '/ 6 H :1X :+hNpy :NZz : : : :& : N : R"Z"b 6` p : : : :$$= 6  :#%+%&3 6 j :| :  :(\ :  | :   :  : ] :(A :[M V :b ((0<D`ht|112001 (4<HP%\%d&23366wwxxyy||$@HT\hp|YYZZ[[^(^0<D`ht|      bbc c(d4d<gHgP\dee$f@fHgTg\jhjpu |u v v w w z z    (0<<<D=`ht|%%&<<= (4<HP%\%d&     ~ ~       $@HT\hp=|=>>??BB          ( 0 < D ` "h "t "| " " " " " $ $ $ $ $ $< $< $= %( %4 %< %H %P %%\ %%d %& 4 0@P`p"$%1 (&08=@H&PX=`h&p"x"$$=%%&3Ii"$% @`2x$ZDd cfv $Dd q   ,>L U p"y #$%pickle.cc.o/ 1378727468 1000 1000 100664 3096 ` ELF>@@ int0Dmr#$g#%g#&9# y y + g + g g >% $ > $ > : ; I I&I : ;  : ; I8 I ! 4: ; I? <  I /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/includeerrcode.hsay.hstdint.hlong long intunsigned interrflagsGNU C++ 4.7.3long unsigned intlong long unsigned interrstrerrcode_record/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcuint8_tunsigned charchar/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/pickle.cclong inttnt_error_codesshort unsigned intsigned charerrdescshort int_saysizetypeGCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rela.debug_info.debug_abbrev.rela.debug_aranges.debug_line.debug_str.comment.note.GNU-stack@!@'@1@ , (=JP K _k0lv0        pickle.cc  $  q  @' T5 : G N -U \ 2c cu z b [ L  D  ^ coro.cc.o/ 1378727468 1000 1000 100664 44344 ` ELF>`H@@RO!#')+-/134679:<=UHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHATSHpH}HuHUEHEHEHcHEHPHEH@AA"HƿHUHBHEH@HLD$7H$AA7AҿHH$AA7HHHEHEH@HEHEHPHEH@HHEHEHEHEHEEUHH H=H3HHHEHEEHEH@HHEHHHEHUHuIHIHLHHp[A\]UHHH}HEH@Ht)HEH@HtHEHPHEH@HHUHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHLoggedError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coro.ccmmapcoro stack E\cxUHSHHH}HuU܉MLELMHELMLEЋM؋UHuH}H<$HǸHEHHEHHHEHHHHH[]UHHH}HEHHEHt HEHUHHH}HEHHEH11LoggedError11ClientError9Exception6ObjectaC^iiv sp#i # ctx$k# %i# &8#(   6 6# 6# i# i#fint 0h 36V IA      !"#$%&'()*+,-./0123456789:;<<=>?  #x $# %# &]# ) x      !"#$%&'()*+,-./0123456789: )/    """"$&&&&&&&&&&((((***,./ h  #) 5    J W  Vk} } C 6vC   !V   ! y " ##"   $& ( 5  V#*F R    %+ l   $ i  #&4#&66#&9i #'' z (log,y   z )/ '  6)19 E   y y [  V z * y y E +V , -  R  .  / / 0  1 h0 ; D 1 h2SV 3S},45UC~5V=~45_ }5_ ~  6 62qV3q},45sC~5t=~45}}5} ~6 7J $// 01h0!1h 7 U7L/L/!0'w17h0'17h8(o9(o:f)X9)i4;+\4;:6X4;:u;: P6 8@9@oh.W C/<k<k6<kv=kC 0XXC1X1P1L1H=k1@11 75 h//01h01h A$>? yQVV,? >^1% UR$ > : ; I II  : ; : ;I8  : ;  : ; I8 : ; I8 I!I/ $ > &I : ; (  : ;  : ;@: ;I : ; I8 2 .? 4 < dI4 .? L 4 < d.? : ; < d/I< .? L 4 < d  I! : ; " I8 4 #.? : ; < d$.? : ; L < d%.? : ; @I< d& : ; I8 2 '.? : ; @I< d(.? : ; @L M < d).? : ; 2 < d*!I/+I,- I..G d/I4 0.1@@dB 11 2.: ;I@B 3: ;I 4 54: ;I 65I7.G: ; d8.? : ; @@B 9: ; I :: ; I ;4: ; I <: ; I=: ; >!?4: ; I? < wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwL1&=&=&=&) /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/valgrind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/usr/include/x86_64-linux-gnu/bitsobject.hvalgrind.hexception.hcoro.ccstddef.hcoro.hcoro.hstdarg.hstdint.herrcode.hconfname.hsay.h % % "2'-u .2'-u].g[3!w%ry/6 ## # #  6Tj # ER_INDEX_TYPE_ZN9ExceptionD0Ev_Z22tarantool_coro_destroyP14tarantool_coroVG_USERREQ__MEMPOOL_CHANGE_SC_THREAD_PRIO_PROTECTtarantool_coro_createER_NO_SUCH_PROCER_SPACE_EXISTS_SC_VERSIONgp_offset_SC_NL_NMAXVG_USERREQ__MEMPOOL_FREEformatS_FATALER_SPACE_DISABLED_SC_SYNCHRONIZED_IO_SC_THREAD_PRIORITY_SCHEDULING_SC_NPROCESSORS_ONLN_ZN6ObjectD2Evtarantool_coro_SC_TIMEOUTSER_WAL_IOVG_USERREQ__MEMPOOL_EXISTSVG_USERREQ__DESTROY_MEMPOOL_SC_BASE_SC_PII_OSI_COTS_SC_MONOTONIC_CLOCK_SC_THREAD_SAFE_FUNCTIONSm_fileunsigned int_SC_IOV_MAX_SC_STREAM_MAXm_errmsg_qzz_res_SC_PRIORITIZED_IOVG_USERREQ__MEMPOOL_TRIMcoro_contextER_UNUSED24_SC_V6_ILP32_OFF32_SC_THREAD_SPORADIC_SERVER_ZN11LoggedErrorD0Evline_SC_SHRT_MIN_SC_USHRT_MAX_SC_NL_TEXTMAX_SC_STREAMSClientError_SC_THREAD_DESTRUCTOR_ITERATIONS_SC_PIPE_SC_BC_DIM_MAX_SC_MAPPED_FILES_SC_2_C_BIND_SC_MQ_OPEN_MAX_SC_XOPEN_SHM_SC_INT_MAX_SC_2_FORT_DEVVG_USERREQ__PRINTF_SC_XOPEN_XPG2_SC_XOPEN_XPG3_SC_XOPEN_XPG4~ClientError__vtbl_ptr_type_SC_PII_INTERNET_SC_V7_LP64_OFF64_SC_DELAYTIMER_MAXER_OK_SC_MB_LEN_MAXER_NO_SUCH_SPACELoggedErrorVG_USERREQ__MALLOCLIKE_BLOCK_SC_ATEXIT_MAXER_SECONDARY_SC_REALTIME_SIGNALSER_TUPLE_FOUND_SC_DEVICE_SPECIFIC_Ruint32_t_ZN11ClientErrorD0Ev_SC_BC_SCALE_MAX_SC_THREAD_PROCESS_SHARED_SC_SAVED_IDS_SC_C_LANG_SUPPORT_R_SC_2_C_DEVS_DEBUG_SC_XBS5_LPBIG_OFFBIG_SC_2_C_VERSION_SC_SCHAR_MAXER_FIBER_STACK_SC_SSIZE_MAX_SC_2_UPE_SC_IPV6overflow_arg_area_SC_BC_BASE_MAXlong long unsigned int_SC_POLLfile_SC_XOPEN_REALTIMETNT_ERRMSG_MAXER_KEY_PART_COUNTER_SPLICE_SC_SYSTEM_DATABASE_RVG_USERREQ__MEMPOOL_ALLOC_ZN6ObjectD0Ev_SC_CHAR_MAXER_ARG_TYPE_zzq_resultm_line_SC_T_IOV_MAX_SC_LEVEL1_ICACHE_ASSOC_SC_READER_WRITER_LOCKSER_MEMORY_ISSUE_SC_SYMLOOP_MAX_SC_TRACE_LOGER_TUPLE_NOT_FOUNDVG_USERREQ__COUNT_ERRORStnt_error_codes_enum_SC_THREAD_CPUTIMEVG_USERREQ__STACK_REGISTER_SC_XBS5_ILP32_OFFBIG__gnuc_va_list_SC_PII_INTERNET_DGRAMER_NO_SUCH_FIELDsize_t_SC_2_PBS_TRACKGNU C++ 4.7.3S_ERROR_SC_FILE_ATTRIBUTES_SC_ASYNCHRONOUS_IO_SC_FSYNCER_RESERVED13ER_RESERVED14_SC_LEVEL1_DCACHE_ASSOCER_RESERVED16_SC_DEVICE_SPECIFICER_RESERVED18_SC_MEMLOCK_SC_LONG_BITtarantool_coro_destroy_SC_SEM_NSEMS_MAX_SC_EQUIV_CLASS_MAX_SC_XOPEN_STREAMS_SC_LEVEL1_ICACHE_LINESIZE_SC_REGEX_VERSION_ZNK9Exception3logEv_SC_2_PBS_ACCOUNTING_SC_AIO_MAX_SC_LEVEL2_CACHE_LINESIZE_SC_XOPEN_VERSIONER_INJECTIONVG_USERREQ__STACK_CHANGE_SC_FILE_LOCKINGER_RESERVED20_SC_SHELLER_RESERVED21_SC_TZNAME_MAXER_UNUSEDchar_SC_SPORADIC_SERVER_SC_MEMLOCK_RANGE_SC_AVPHYS_PAGES_SC_2_LOCALEDEF_SC_V7_ILP32_OFFBIG_SC_PII_XTI/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coro.cc~LoggedError_SC_V7_LPBIG_OFFBIGdata_vptr.Objectsay_levelS_INFO_SC_LEVEL3_CACHE_ASSOCuint8_t_SC_FILE_SYSTEM_ZN6ObjectaSERKS__SC_PAGESIZE_SC_LEVEL4_CACHE_ASSOC_SC_V6_ILP32_OFFBIGER_RESERVED11ER_RESERVED12_SC_SIGQUEUE_MAX_SC_SPAWNER_RESERVED15ER_UNUSED8ER_RESERVED17_SC_DEVICE_IOER_RESERVED19_SC_V6_LPBIG_OFFBIG_SC_2_VERSION_SC_LEVEL4_CACHE_SIZEerrdescva_list__in_chrglong long intER_PROC_RET_SC_USER_GROUPS_R_Z21tarantool_coro_createP14tarantool_coroPFvPvES1__ZN9ExceptionD2Ev_SC_LINE_MAXpage_SC_CPUTIMEerrmsgER_KEY_FIELD_TYPE_SC_UIO_MAXIOV_SC_HOST_NAME_MAX_SC_C_LANG_SUPPORTER_RESERVED22ER_RESERVED23VALGRIND_PRINTF_BACKTRACES_WARN_SC_THREAD_KEYS_MAX_SC_THREAD_STACK_MINArgs_SC_SEMAPHORES_SC_UINT_MAXLoggedError_SC_CHILD_MAXoperator=_SC_NGROUPS_MAX_SC_SINGLE_PROCESS_SC_XOPEN_CRYPTVG_USERREQ__LOAD_PDB_DEBUGINFO_SC_LEVEL3_CACHE_LINESIZE_SC_TTY_NAME_MAXVG_USERREQ__CREATE_MEMPOOL_SC_MEMORY_PROTECTIONER_UNKNOWN_UPDATE_OPER_NONMASTERtnt_error_codes_enum_MAX_SC_CHAR_BIT_SC_LEVEL1_DCACHE_SIZEER_UNUSED36_SC_CLOCK_SELECTIONVG_USERREQ__MAP_IP_TO_SRCLOC_SC_CLK_TCK16Vg_ClientRequest_SC_TIMERS_SC_BARRIERSVG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REFlong double_SC_ULONG_MAX_SC_MQ_PRIO_MAXExceptionER_TUPLE_IS_TOO_LONG_SC_TRACEthis_SC_LEVEL3_CACHE_SIZE_SC_SPIN_LOCKS_SC_LEVEL1_DCACHE_LINESIZE_SC_BC_STRING_MAX_SC_NPROCESSORS_CONF_SC_INT_MINER_UNUSED25ER_UNUSED27ER_UNUSED28ER_UNUSED29_SC_V7_ILP32_OFF32ER_EXACT_MATCH_SC_TRACE_SYS_MAX_SC_FD_MGMT~Object_SC_REGEXPVG_USERREQ__PRINTF_BACKTRACEshort int_SC_LEVEL1_ICACHE_SIZE_SC_RE_DUP_MAX_SC_ADVISORY_INFOlong intER_TUPLE_IS_RO_SC_SHRT_MAX_SC_XBS5_LP64_OFF64S_CRIT~Exception_SC_SYSTEM_DATABASE_SC_XOPEN_REALTIME_THREADS_SC_THREAD_ROBUST_PRIO_PROTECT_SC_2_CHAR_TERM_ZN11LoggedErrorD2Ev_SC_PASS_MAX_SC_FIFO_SC_ARG_MAXtypedef __va_list_tag __va_list_tagER_UNUSED30ER_UNUSED31ER_UNUSED32ER_UNUSED33ER_UNUSED34ER_UNUSED35_SC_LEVEL2_CACHE_SIZEER_UNUSED37_SC_2_PBS_CHECKPOINTVALGRIND_PRINTFER_UNUSED46_SC_2_FORT_RUN_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__SC_TRACE_EVENT_FILTER_SC_SEM_VALUE_MAX_SC_THREAD_ATTR_STACKSIZE_SC_AIO_LISTIO_MAX_SC_THREAD_ROBUST_PRIO_INHERIT_SC_THREADSfp_offset_SC_PII_SC_TRACE_INHERITstack_SC_WORD_BIT_ZNK9Exception6errmsgEvvargsVG_USERREQ__RUNNING_ON_VALGRIND_SC_XBS5_ILP32_OFF32_SC_PII_OSI_M_SC_2_SW_DEV_SC_CHAR_MINsizetype_SC_XOPEN_UNIXlong unsigned int_SC_PII_OSI_SC_UCHAR_MAXreg_save_area_SC_SCHAR_MIN_SC_PRIORITY_SCHEDULING_SC_SELECT_SC_NETWORKING_SC_TIMER_MAX_SC_TRACE_EVENT_NAME_MAXVg_ClientRequest_SC_V6_LP64_OFF64_SC_GETGR_R_SIZE_MAXunsigned charER_NO_SUCH_INDEX_SC_LOGIN_NAME_MAX_SC_EXPR_NEST_MAXObject_SC_PII_INTERNET_STREAMVG_USERREQ__FREELIKE_BLOCK/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src_SC_SS_REPL_MAX_SC_RAW_SOCKETSVG_USERREQ__CLIENT_CALL0VG_USERREQ__CLIENT_CALL1VG_USERREQ__CLIENT_CALL2_SC_LEVEL4_CACHE_LINESIZE_SC_SIGNALSerrflags_SC_MESSAGE_PASSINGerrcode_record_SC_NL_MSGMAXcoro_SC_SHARED_MEMORY_OBJECTS_SC_CHARCLASS_NAME_MAX_SC_PII_OSI_CLTS_SC_TYPED_MEMORY_OBJECTSER_UNSUPPORTED_SC_2_PBS_SC_PHYS_PAGESerrcodeVG_USERREQ__STACK_DEREGISTERVG_USERREQ__CLIENT_CALL3_SC_PII_SOCKET_SC_MULTI_PROCESS_SC_LEVEL2_CACHE_ASSOCsigned charER_PROC_LUA_SC_OPEN_MAXshort unsigned intER_ILLEGAL_PARAMS_SC_THREAD_THREADS_MAX_SC_NZEROVG_USERREQ__PRINTF_VALIST_BY_REF_SC_GETPW_R_SIZE_MAXVG_USERREQ__MOVE_MEMPOOL_SC_2_PBS_MESSAGE_SC_RTSIG_MAX_say_SC_THREAD_ATTR_STACKADDRstack_sizetnt_error_codes_SC_TRACE_NAME_MAX_SC_COLL_WEIGHTS_MAX_SC_XOPEN_ENH_I18N_SC_XOPEN_LEGACY_SC_JOB_CONTROL_SC_NL_LANGMAXER_FIELD_TYPE_SC_USER_GROUPS_zzq_args_SC_2_PBS_LOCATE_SC_NL_SETMAX_SC_NL_ARGMAXerrstr_SC_THREAD_PRIO_INHERITVG_USERREQ__DISCARD_TRANSLATIONS_SC_TRACE_USER_EVENT_MAX_ZN11ClientErrorD2Ev_SC_AIO_PRIO_DELTA_MAX_SC_XOPEN_XCU_VERSIONGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \AC  |AC  =AC x &AC a =AC x &AC a zPLRx $$AC G dDAC  $lAC Ez =AC x &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rodata.gcc_except_table.rela.text._ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_.rela.rodata._ZTV11LoggedError.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS11LoggedError.rela.rodata._ZTI11LoggedError.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group,@P&,HPD,PP',XPH,`P(,hPL,pP),xP_,P*,Pc,PF,PA,Pf,PV,Pi,Ph,Pk,Pj,Pm,Pl LkP&,,,6,11m0PP^&Km0Pj=enHP&Pn0P=nHP!&&n0P#Po%nxP'1( ,poHP)P=KoHP+p&kp0P- ( 0pHP/` xp0P1pHP4pHP72 NI8qHP:e ~ yq0P= eqp,P?q PB#PD$PFF%ȪPH0(J0C :C"@CPM(E3\h Q@ Hg} "!#%&')+-/134679:<=?ABDFHJLMETf{ K     "1!1 "1"&"= !/("=+"&="!=Rd"!=y"#&2 "'3"+=H!4ZfrD"' !)(5"']"'"-&"+=!3!7!6!!:0!9 ?!=K!<Wcoro.cc_ZL15VALGRIND_PRINTFPKcz_ZL25VALGRIND_PRINTF_BACKTRACEPKcz_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorC5IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_Z21tarantool_coro_createP14tarantool_coroPFvPvES1___gxx_personality_v0sysconfmemsetmmap64_say__cxa_allocate_exception_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT__ZN11LoggedErrorD1Ev_ZTI11LoggedError__cxa_throwcoro_create__cxa_free_exception_Unwind_Resume_Z22tarantool_coro_destroyP14tarantool_coromunmap_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZN11ClientErrorC2EPKcjjz_ZTV11LoggedError_ZNK11ClientError3logEv_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT__ZN11LoggedErrorD0Ev_ZN11LoggedErrorD2Ev__cxa_pure_virtual_ZTS11LoggedError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI11ClientError_ZTS11ClientError_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEOOhPQR    S d _- 5T: U? VGWXYZF\ A+BC B F@7BG B JE7BK BF^Q _]`nIyZUc ` _I7BU BGH eCDgfhgijgklnm  # #}  # !- "4 #[9 #F #|M #M T #l #zw #z #h # # # #d #; #  # #( #9 #> #; K #R #^ # k #Ur #w # #  #/ #  #L # # #- #  #; #. # # #k #" #N # #6 #V #  #*  # # # % #+ #t1 #c 7 #= #-C #tI #O #U #I [ #a #g #Hm # s #y # #G # #F # # # #  #: # #  #g #Q # # #J #M  # #q  # #  # # #  #  #! # #! #' #. #<5 #< #C #J #@Q #gX #t_ #nf #m #g t #{ { #% # #Z #% # #g # #X #D #V #<  # # #  #4 #m #% # # # #{ # # ## #* #1 #8 #W? #F #mM #T #[ #Fb #<i #p #w #~ #s # # #  # # # #K # # # # #' # # #e #* # # #I  #v # #  #<& #- # 4 #f; # B #I #P #W #&^ #>e #l # s #' z # # # # # # # #'  #  # #  #  # # #N #w #$ #h #g  #L #N  # # #" #) #0 #7 #> #m E #.L # S # Z #a #1h #o #v ##} # #  # #\ #+ # # #o  # #  #T #  #V  #} # #" # #]  # #  # # # #% #, #3 #: #B #N #\ #3 j # ## #Q #@ # # # #d # # # #  #  #= #  #  #@ #N #  #t #  # #  #  #  #*  #8 % #+ #y1 #7 #= #C #I #_O #kU #w[ #a #g #m #s #y #  # #Z # #D # # # # #2 #[  #% # # # #c # # #  #U # # # # # # #` # # ) #]4 #X= #D #K #2R #KY #d` #g #8n #ru #| # # #d # #a #| #L # # # #F # #y #m # #5 #/ # #f #f7 # Y # e # # # # # # #7 #Y # _ #7 z # #  # #< # # #9  #) #L # # # #C #Y  1  #~ & &. `E #P X ` j #{ Y  #E #   #x # #F  2   #0r80A #EQ #ai)r #x # # #C  #   =  #  &  8 #B #C V #Z b =j @ #  &  # #y 2  # # I # K'0 #E>KFO #x^ #| # # L ` # #  # #  # #e # "*2 @ #  # #C  #=   #& % #R #(00<0D1`ht|%%& (4<HP1\1d2      < < =      % %$ &@ H T \ h p <| < =      % % &2336(60<D`h t |  KKL (4<HP<\<d=%%&  0@ P ` p L1 (&0 8 =@ H &P X =` h &px=&6Rh   % <[{ @`    + N@2I h stat.cc.o/ 1378727468 1000 1000 100664 14440 ` ELF>@@UHSHEHEHH HH)HHHHtvHcHEHH HH)HHHHH9w/HEHH HH)HHHHE;EHH[]UHSH(H}HuЋEE9RHHHH)HHHHHHuHHHH HH)HHHEHHHEHHt[E9HHHH HH)HH‹EHHDE}uEHEEHH;EEH([]UHS}uHUHEMHHH HH)HHH EuHHH4HH)HHHHHEHHBHEMHHH HH)HHH EuHHH4HH)HHHH0HEHHB0[]UHSH(H}HuE HEHH HH)HHHHEE:HEHH HH)HH‹EHHD‹EЉEE}uMgfff)ȉEHEHH HH)HHHP0H EHH4HH)HHH8HMЋuHEЉE}tEE;EH([]UHSH(H}؉uHH EHEHHH HH)HHHHEeHEHHH HH)HH ExHEHHH4HH)HH‹EHHTHcHTmEuHEHHH HH)HHH@E9EHEHH([]UH@@@HH?H]UHHHtHH]UHS}Hu؋EENE6HEHHH HH)HH‹EHHDE}uEEHH;Eu[] 5a 0`   0 ` Y0`Ointx}(=0)k r k ; $O &k# &k# &k# &;# cb&e# _ _ kO' 0A Ck# Ck# Ck# C;# cbC# atC# E#(   kwFw#K$r#%r#&#8){*r#+{#=-3i64\>kl>lH>D@@kTiBk\iOkXrZZkdZk`ZXakqcbaHa;@ic4\gkXresmkPjhkTwwHwkDi|k\jkXkTDHikdjk`0k D  k r k r r >! y 44-LI $' ,y R-k .k /k % $ >  : ; I$ >  I&II I  : ; : ;I8 : ;I8 : ;I : ;  : ; I8 I!I/ .: ; @B  4: ; I .? : ; @I@B : ; I 4: ; I .? : ; @@B : ; I .? : ; @@B .? : ; @@B 4: ; I?  4: ;I? <  4: ; I? < !!wwvwww9v9:w:;w;>w> v wwwTvTUwUVwVYwYvwwwvwwwvwwwuvuvw,v}o /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libevstat.ccstddef.hstdint.hstat.hev.herrcode.hsay.hmhash.h 3*-W/fcJAx0[15Ju t<9* J Xh0c`70 |w7 0\007(h ` #M  0P#T1X:Y|   nt\:GU3 N+'5:ustat.cc_ZL5timer_ZL10stats_size_ZL9stats_max_ZL4base_ZL24stat_recalc_max_name_lenv_ZL15__ac_prime_liststatsstat_max_name_lenstrlen_Z13stat_registerPPKcmreallocabort_Z12stat_collectiil_Z12stat_foreachPFiPKcilPvES1__Z8stat_ageP8ev_timeriev_timer_again_Z9stat_initv_Z9stat_freevev_timer_stopfree_Z12stat_cleanupim "KU{PTL TL!L'L?JQXbioTTTP TTLu.l7Ph.`Pz      0 D    !"! N c !v) 0 57 @ AE .R Y ` }g     $        \ # 2 al x t \   a K  t %! / = @N  S E_ om  f   : ` o 43! /7+LTt z ,~:  I o   U   >I$+,15 Q`Ys fy }U   %ur+     J "*2 @9 ? CKvS ] Ik 4y s_ T  <  5 QA O [ d Eq P RT IX | Dh:Ulog_io.cc.o/ 1378727469 1000 1000 100664 47088 ` ELF>Z@@UHHHEE]UHH H}HuHUHEHUHPEHEHUHB HEHEPUHHH}HHURHMHHοЉHEPHHUHJHοЉHEUHH0H}HuHMLELMfEHE HEUfP HEHUHP"HEHH*HUHEHHHEHP HEHHH HEHHuHHEHUHHP HEHHHEHHUHH}HuHEHEHEHEHEHHEHH9uHEHHEHH9~]UHATSHpH}HuHEHEHEHEH@HHEHEHHdHH@(HHHEHEH@HHEH}H}4HEH.HHEHEH HEH.HHEH}u!HEHPHEHHECHUHEHHHEHHuHEHuEEσzHEHHEHHEHHHE HHHHUHEHHHEHHt9LHEHIAAHEHHEHHHH9t%HEHHEHHHH9u6LHEHIAApHEHEH;EuaHEHHHdHH@(HHHEH}t~HEHHMHEHHHEHEHeHEHHEH}HuHEйHHEHUHHEHEt?HHEL`MAHH}t HEHHEHHp[A\]UHH H}HUHEHHIHEH}HEHEHUHHHHHUHH H}HuHUHEHHHEH}5HEEHEHH;EHEHHH;EHEHHEHmH}uHEHHUHH@H}HuU܃}uHEHEHpHEH@HMdH%HHUH$IIHdH%HUHH@H}HuHUHEHѺHHt qHHUHJHοЉEE;Et3L AAѸEHPHdHH@(HHHEHEHUHHUHPHUHPUPEHUHzHUHѺHHt HUHMHHοЉEE;Et0L AAѸ@LHEIAAҋEPHEHEHUHHH}HuHEHUHHE@HEH@HHHEHPHE@UHH H}HEHHEHEHPHE@HHHEHPHEHHHEH@HHHdHH@(HUHSHXH}HuHEHHEHEHE@t*LH$A A-AHdHH@(HH}~ HEHHHEH@HHHEHPHEHѺHHt_OHEH@HE܃}u.L A@AẺE ЉE̋E= uHEH@HHHEHEH@H;EtMLHEH@HUHRHMHH)HH$IAJALHEIAKAHEH@HUHHHEH}H}uoHEHt3L ASAѿL ATAHEH@HHHEHPHE@PHEPHEH )Éi)‰Ѕu@L HE@* ^A\AHEHEH@HHHEH@HH9HEHHHEH@HHHEHPHEHѺHHt+L AiAjE=u%HEH@HHHEHPHE@;E= t1LẺIAoAҸHHX[]UHSHHH}HEH$HEHE.HHEHE%uH}uHEHtHUHEHH)HHHPHHHEHuHkH)HD$HHHHEHUHEHH)HHHMHEHHHUHEHH)HHHEHHUHEHHtJHHMHUH$IAHӸHEƀ%H]UHSH(H}HEؾ.HHEH}uHEHtHEHtUuGHHUIAHӸH([]UHSH(H}HEHHEHE@HEH@HHEH@%u HEHHE%tHEHtt3L AAѿHEH@HE}y4HAHHEHHEHEH([]UHH H}HEHHEH}t>HEH@HHEH@HHEHHEHUHH0H}HEH@Ht:LHEH@$AAAHEH@hEEUHATSH H}HEH@HEH@HE}uDHAAHӸEHH‹EHѺdHEH@HtFHHEL`$MAHӸH [A\]UHH H}HEHHPHEH@HǸE}yUHH`HHHHHEHH@HEHUH HHtHUH HHutHHHEH@HHHtHHHHƿtHHkHUHHHtHH8HHtHHuHUHHPH}؉uHUȉMLEHEHEH}uHE(HEH}uHEHEHUHPHEHH$HEȺHHHEUԉPHEHUH}HE%}u0HUHEHHt\HENHEH@HHEH#tHEHEELHEHD$HEH$AAZAH}t HEHH}t HEHUHUHH0H}HuUH}ufUHMHEHHHEHEHHEHuMHUHEIHUHSHXH}HuUH}uw}uFHMHEȺHHHEHEHtUHMHEHHHEHEȋ@HE躴HǸE}xdLHEIAAҋEHEHu؋MHUHEIHHHHUH$AAHӸHX[] SNAP .snapXLOG .xlogcan't parse `%s', skipping/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/log_io.ccerror reading directory `%s'%s/%020lld%s%sheader crc32c mismatchdata crc32c mismatchread row v11 success lsn:%lldi->eof_read == falselog_io_cursor_next: marker:0x%016X/%zueof while looking for magicskipped %jd bytes after 0x%08jx offsetmagic found at 0x%08jxfailed to read row%.1fM rows processedcan't read eof markereof marker is corrupt: %lul->is_inprogresssuffixstrcmp(suffix, inprogress_suffix) == 0can't rename %s to %scan't unlink %scan't rename 'inprogress' WALcan't close%s: fsync failed, errno: %d%s: dup() failed%s: fsync failed%s%s failed to read log file headerunknown filetypeunknown version %s: failed to open %s: %slsn != 0rcreating `%s'w%s: failed to open `%s' .inprogress0.11 log_io_open_for_writelog_io_open_for_writelog_io_open_for_readlog_io_openlog_io_syncsync_cbinprogress_log_unlinkinprogress_log_renamelog_io_cursor_next.A`HK{~ ( D I V8int8iiii0b##### #( #0 #8 #@ #H #P #X  9#`  ?#h  b#p b#t {#x F# T# E# U# &# /# 0# 1# 2# 3-# 5b# 7[#(    M# M# # # --#3#b# U  k q O\f  (i 0? 1F 3M 78 i 8 M   ) 4rW)p. 01#6#9b#:k#;k#<#(I`dirJ`#fKf#MW#N-#Ob# Pl#$R#  } cloge#fb#g#h#su%v#lsnw#tmx4# leny#z#*x##tag# #"x#* ?  p# # F# ?# !#  DIR2sp2##octx$ #%#&-##$k#%k#&#))-.#/#MO#cswQb#R8#T#(fidV#0sid`#4b#8c#Hfi#Xjv#`k#xl#&  $ $ M* ?3:   #: wd # ##-# #(#0nv1 #8nv2 #@ b#H b#L i#P i#X b#`  ?#d ?#epriT#f #h  #p * #x * #grp$ # $ # $ # $ #6  b  / U_  4T $ $ :  G)! " h#lsn`"-X$. ". h$8l #row8l h#lsn8`#tag8\"8P"9kH"9-@":k":-%%Xb #_aXX#_bXP&'aZ h'bZ ` (a #dira`~"a ~)out&*cX'id-P*d-H*e'lsnf@'dhg*m&'extp*tk*z&'n+#dir`X&'lsn`*h+ #dir`X"P)out&'lsn`*h+#dir`X#lsnѣP"pL&*l *kh+k##ff"#&'m@*l*\'row`,j-ijh-l`}, -i jX&.lh/#k-i#j0##1eof_26&.l%P.row&k@3'3(X4 &.c>bL   /bM-l&3X3H3P4]  ]  M/b0H&3X4  M/b<0<H&.lX.rbT,0<X&.lh5b-req X&4 .fdbl /b-lH&4 &.fdb\  5b-lX&.retbl5b-l}0}2.&3}3}.buf}.dir`h3f`k/3-dir3`H03WD04k04p@04f2X&.l6h37bd38kX4  /d-dird`X-lsndP0dpL&4. 3hkh.fif` .  /r-dirr`-lsnr0rp2&3tX.fufH.fdvbT4 4  M M6D)7'0  7E 7N  ol89yabkbkk:9>y9o9,*(  *) **   % 'v11+:  *T  E% : ; I$ > $ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I: ;I : ;(  : ;  : ;  : ; I8 !I/!I/: ; I<  : ; : ;I8  : ; &II5I .: ;I@B !.: ; @B ": ; I #: ; I $.? : ; @@B %.: ; I@B & '4: ; I (.: ; I@B ) : ; *4: ; I +.? : ; @I@B ,.? : ;@@B -: ;I .4: ;I /.? : ;@I@B 0: ;I 1 : ;2 : ;34: ;I 44I4  5.: ;I@B 64: ;I? < 74: ; I?  8!94: ; I? < :wwvwwwZvZ[w[\w\_w_vwwwdvdewefwfiwivwwwSvSTwTUwUXwXvwww*v*+w+,w,/w/vwwwlvlmwmnwnqwqvwww# v# $ w$ % w% ( w( v w w w AvABwBCwCFwF'v'(w()w),w,_v_`w`awadwdvwww,v,-w-.w.1w1EvEFwFGwGJwJvwwwvwwwvwwwSvSTwTUwUXwXvw,  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libeioev.hlog_io.hlog_io.ccstddef.htypes.hstdio.hlibio.hstdarg.hunistd.hstdint.htypes.hdirent.hcoro.hcoro.herrcode.hsay.hrlist.hfiber.hcrc32.heio.h dirent.h Ku|=Y.)&4"&&./u.tY2/=*>ZuJJtX=34[%%41Y)v׃[f<l -?uהhuh2huizX 20ftXLI .()'׃)w022g .7u,[/g)[y. uM0u))[.@q -,+1zɼLtJR'CvYjKtJLv;wYzɯ/tXK3/g4={zg2:Y2/g:?vY-ftY .sXtXLZ[u0!"0tu"v3u!Z/u!Zg!1K!1h@uu2/tK6@tk['h0/%BYsize_terrflagssizetypef_data__ssize_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/log_io.cc_IO_save_endlptr__func__log_io_verify_meta_IO_write_basestatelog_io_atforkext_len_locktypeLOG_READoffsrow_count_IO_save_basepalloc_poolfilename_extdirnameEVBREAK_ALLint3finisheio_wd_chainssize_tdata_len_cur_column_Z11log_io_syncP6log_iolog_io_cursor_next_Z15format_filenameP7log_dirl10log_suffixresultLOG_WRITEcoro_contextlong intheader_crc32cmetadataS_DEBUG_IO_markererrstr_Z18log_io_cursor_nextP13log_io_cursorPjfiletypeerrorint1int2crc32_calcEVBREAK_CANCELpanic_if_errorlog_modesigned charuint8_teio_req_IO_FILEfilenamelog_io_cursor_openunsigned charsync_is_asynccoroS_WARN_Z11log_io_openP7log_dir8log_modePKc10log_suffixP8_IO_FILE__FUNCTION__default_versionlog_io_cursor_Z21inprogress_log_renameP6log_ioheader__gnuc_va_listd_typecharS_CRITscan_dirmarkereio_ssize_tgrp_first_IO_lock_td_namegc_poolgreatest_lsnrowsfeedflags_IO_read_ptr_Z12row_v11_fillP7row_v11ltmPKcmS2_mfp_offsetsay_level_posev_tstampstreameof_marker_v11_markersfilerow_v11cmp_i64row_v11_fillROW_EOFrestart_offsetlog_io_open_for_writeeio_pwdS_INFOinprogress_suffix__dirstreaminprogress_log_renamelong unsigned int_flags2retryheader_crc_IO_read_base_Z14row_reader_v11P8_IO_FILEPjheader_v11last_stack_framelink_unused2eio_cb_Z19find_including_fileP7log_dirl_old_offset_say_Z21log_io_open_for_writeP7log_dirl10log_suffix__intptr_tformat_filenameheader_v11_filllong long int_Z18log_io_cursor_openP13log_io_cursorP6log_iova_listgrp_next_Z13log_io_atforkPP6log_ioheader_v11_signlog_suffixdoublestackgrp_prev_IO_write_enduintmax_tgp_offsetcounttarget_lsnrowlen_IO_buf_baseerrcode_recordunsigned inttnt_error_codesGNU C++ 4.7.3intptr_tlog_io_write_header__pad1__pad2__pad3__pad4__pad5metadata_lensuffix_sbufcookiestack_sizedentoverflow_arg_area_flagsdirentS_ERROR_modeerrdesccancelledgood_offsetlog_io_cursor_closeoff_twal_dirboolerrornois_inprogresslog_iointmax_tlong double__ino64_tTNT_ERRMSG_MAXFILEwaitersizelong long unsigned intdestroyreg_save_areauint16_t__off_tdata_crclog_io_openINPROGRESSversionrow_reader_v11_IO_backup_base_Z21inprogress_log_unlinkPc_shortbufdata_crc32csuffix_stropen_wflags_next__off64_trow_marker_v11log_dirrlistptr1ptr2ev_nowlog_io_close_IO_buf_end_Z20log_io_open_for_readP7log_dirl10log_suffixcrc32_func_Z15header_v11_signP10header_v11ext_is_oknew_filenamesave_errnoS_FATALmarker_offsetshort intu_int32_tuint64_tmodefind_including_fileinprogress_log_unlink_Z12greatest_lsnP7log_dird_offsnap_dir_vtable_offsetlog_io_syncd_reclenlog_io_open_for_readret_lsnlog_magic_t_Z19log_io_cursor_closeP13log_io_cursor_IO_read_endd_inoeof_read_Z12log_io_closePP6log_iouint32_t_filenoeio_tstamperrmsg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcfibershort unsigned intmagicev_rt_now_IO_write_ptrint64_ttarantool_corosync_cbNONEnextdataprevEVBREAK_ONEtypedef __va_list_tag __va_list_tagGCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <EAC @ \]AC X |AC  WAC R zPLRx $$AC G  LRAC M  pAC  LAC ~  AC  KAC F lAC g $gAC E]  AC E  AC E  @8AC E. d^AC Y oAC j  AC G  MAC H  0hAC c  TAC  0AC ~  PzAC Ep .symtab.strtab.shstrtab.rela.text.rela.data.bss.rodata.gcc_except_table.tbss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @`r+ @ & `1`6``>jP*[*ZV() g74u: C00 Cش0IF 0>V[V`VpY` ' kU E6eWHad xv@ $P`doy FMph  O \    '7[]Xc  %+4=LTRf+mKl@IR$ g{ B(8 -8?D`^_eisyTz@GNlog_io.ccev_now_ZL15header_v11_fillP10header_v11lm_ZL7cmp_i64PKvS0__ZL8scan_dirP7log_dirPPl_ZL17inprogress_suffix_ZZ15format_filenameP7log_dirl10log_suffixE8filename_ZL7ROW_EOF_ZZ18log_io_cursor_nextP13log_io_cursorPjE12__FUNCTION___ZZ21inprogress_log_renameP6log_ioE12__FUNCTION___ZZ21inprogress_log_unlinkPcE12__FUNCTION___ZL14eof_marker_v11_ZL7sync_cbP7eio_req_ZZL7sync_cbP7eio_reqE8__func___ZZ11log_io_syncP6log_ioE8__func___ZL19log_io_write_headerP6log_io_ZL3v11_ZL18log_io_verify_metaP6log_ioPPKc_ZZ11log_io_openP7log_dir8log_modePKc10log_suffixP8_IO_FILEE8__func___ZZ20log_io_open_for_readP7log_dirl10log_suffixE12__FUNCTION___ZZ21log_io_open_for_writeP7log_dirl10log_suffixE12__FUNCTION___ZZ21log_io_open_for_writeP7log_dirl10log_suffixE8__func___ZL14row_marker_v11ev_rt_nowdefault_version_Z15header_v11_signP10header_v11crc32_calc_Z12row_v11_fillP7row_v11ltmPKcmS2_mmemcpysnap_dirwal_dir__gxx_personality_v0strlen_GLOBAL_OFFSET_TABLE_fiberpallocopendir__errno_locationstrchrstrcmpstrncmpstrtoll_sayreaddir64qsortstrerrorclosedir_Unwind_Resume_Z12greatest_lsnP7log_dir_Z19find_including_fileP7log_dirl_Z15format_filenameP7log_dirl10log_suffixsnprintf_Z14row_reader_v11P8_IO_FILEPjfread_Z18log_io_cursor_openP13log_io_cursorP6log_ioftello64_Z19log_io_cursor_closeP13log_io_cursorfseeko64prelease_Z18log_io_cursor_nextP13log_io_cursorPjassert_failprelease_afterfgetcexit_Z21inprogress_log_renameP6log_iostrrchrrename_Z21inprogress_log_unlinkPcunlink_Z12log_io_closePP6log_iofilenofio_write_Z11log_io_syncP6log_iofclosefree_Z13log_io_atforkPP6log_ioclosedupeio_fsyncfsyncfprintffgets_Z11log_io_openP7log_dir8log_modePKc10log_suffixP8_IO_FILEcallocstrncpysetvbuf_Z20log_io_open_for_readP7log_dirl10log_suffixfopen64_Z21log_io_open_for_writeP7log_dirl10log_suffixaccessopen64fdopen'j**,9,0 2314P5p6678 d7D9b8m:~  8:  8@2S3},; e<5:5=   89>G??%?E dL t  C E v*:" 1 8X2k3E v*:   8$:1 @ 8g?G I 2 JU @_ 8d i Lp :  8 2 M I E$ N4 :: 7I 8 G : X 8 :  87 DC ve :k z 8 O :  8 G :3 T= L 8s G I E :  8! GG :U d 8 ? Q   8  L   8  L d7  ! 8& +L,R:5= / 8\Ql v 8{ L d7  8 LT5:5= E 8\Vf `mWXP: U 8OY:5=" s/ 8GZV\YZ:   8"\[Vb]r:w5=   8 ^V_:5 = ! 8f pk x`aa <7N b pg7y a  7  7?-56=Nc^5g=d5=e-56=G5S:j p   8YZ5?  8 'LB# 0+gNbp z 8 'LBi5Bj:+ 2: 8O @Vkyb:5=  B 8 (0  #$ #* #m !) ". #; #B #I # P #W #^ #* l #q #H| # #F # # # # #a # # # # #+  # # * #9 #H # W #f #u #s #d #= #S  # # #U #  #  # # #O/ #V? #]O #d_ #ko # #y #z #"  # #+ # # # # #@  # #?w #T # #D #2 #  # # #J  #>  #3 # #4  #r #* #D7 #E #[K # Q #X #yd #j #q #} #  # #_  #j # #4  #7 #  # # #, #G ' #5 #C #Q #~ #C # # #'  #  #X # # & #r2 #@ #s\ #j #  # #!  #  #  # # # #<  # #9 # S #a #p #| # # # #R #5 #  # # # # # #g  #  #  # * #cF #T #~ #t # # # #f # # 0 #; #G # g #u # #m #m #r # #F #K #* # #% #C # R #/a #p # # #\ # # # #6 # #[ 1 #w < D L R #X ` [h `r #s #L # # [  #s # #  e & #4 #B #rP # ^ #Ls #z} e   q  #  T  # / 8 @ KI #c #mq # # _  # # 2 $ #* #v 2T:B @Z`by # #L  #+  #) #  # #+#+ Q #_>gp #|  #)  # #9m ` #k #  #+ #2 #%6m>F r #y # }$  "  #y #$    #g  ## ,5 4 Y # i # x #&@ r  # #Q B  <  # # ) #8 #&C d #` k #sB{( @ #O! # #& #~  #0 (`  #5YD #K #eO`W_ i #xl # - `+ # #  #a-F& =<E=N #YbOj #;F R #   #f 0 #@7@HQ #7a # #N # #  #G  # # #m #@%F.6L # [ #f j #u #  # T @ #R #& #5 #< #DTLT ~ # #@h # #& #  #  #3((6 # C-L # Y.m # # #  #P #P \ #U` #d2p@ #Lv  @`[e / T ,5 !P+py -m$  < BD(h`-F K Z4TTrecovery.cc.o/ 1378727469 1000 1000 100664 106544 ` ELF>8@@$! UHHHEE]UHH}HEHHEH@]UHH}HE]UHH}HE@H ]UHH}HE@HcHEH@H9}HEPHE@ 9|]UHHH}HuHEHHtpHdHHEHHEHUHPUHHH}HEH@hHt%HEHPHEH@pH9|HEH@hHUHH0H}HuЈEHEHPHEHH9~HEH@H;E}}}HEH@HH;EtSLHEH@HUHH)HEHPHL$HEH$IAAHEHUHPHEHUHH H}HuHEHUHHEHUHPLHEHHUH$IAAHEH^UHSH(H}Hu,HEHPhHEHHHEHhHCHEH@H;EuBHHHHtHHHEHEHhHH([]UHH H}HEHHPHEHLHEHHUH$IAAHEHUHSHHH}HuHUHMDEDMHHtHHHHHEHEfWH}3L AAѿHEHUHP@HEHUHPHHEH@HEHXHEHHCHEH@ HEHX HEHHCHEHP HE@xuBHEUPTHEHhH,HEUPXHH[]UHH H}HuEHEHƿHEPxHE@xuHUHEHB`UHH}EMY Y,HEPP]UHHHHEH}HEH@0Ht HEHHEH@(Ht HEHHEH@H@HHEH@ H@HHEH@HtHEHHHUHH}ЈMEHEH@ UHEH@U]UHHPH}HEH@Ht#L A$AHEH@HHEH}.L A+AHEH@HMHHHEHEHu.L A0A<LHEH$IA3AHUHEHHZHEH@@UHMHIHHuHt7L A<AHEHu%HUHEHHHEH}uHEHHEHH}uTHEHUHPHEHPHEHLHEH@IAGAHEH@HHt3L ALAѿL AOAѿHUHHPH}HuEHUHEHHHEHH@HEHEH@H;E|+L AfAmHEH@@UHMHIHHuHt7L AnAHEHuSHUHEHHHUHEHHHEH}E؄tEHEHEHUHH`H}EHEH@HHEHEH@ HHEHEH@HHEH@HHEH@P P tKLHEH@@ HUHRH$$IAALHEH@H$IAAHEHHHEH@HHEHEEHEH;Eu3HEH@ UHMHHHEHEHHEH}u:EHEH@ UHMHHHEHEHHEHEH@ HuMHUIHHEH}HE@|t~}uxLHEIAAHEHt3L AAѿEHEH@HtHEHUHPLHEH@H$IAAHEH@H@HEHEHPHEHHE}y=LHEH@H$IAAHEH@H@Ht!HEH@H@H;EtHEH@@ HEH@H@Hu:LHEH@H$IAAq}uTLHEH@HUHRH$H$IAAHEHHHEH@H;EHEH@HH;E}0L AAEHdHH@(HEUHH H}HEH@HHEHEH@ HUHHHEH}HEH@ HMHHHHEHPHEH@HtHEHt3L A AѿLHEH@IA AHdHH@(HUHH H}HEH@0Ht HEHGHE@|HEH$E}y3L AAѿHEH@H<}2LHEH@H$IA AHEH@%tWHEH@H@HLHEH@H$IA&AҿHEH@H@HLHEH@H$IA)AHEH@H$HL A+AѿHEH@H@HLHEH@H$IA.AHEH@HtuL A0AѿLHEH@H$IA2AҿHEHHHE@Xu HEHt UHHH}HuHEHH$HEHHHHEHP0HEH0@@HEH0@HEH@HHEHHEHHUHHEǀHEH0HUHHH}HEH0HUHH0H}؉uHEH@HEHEH@0HEHEH@HEHEHsE}y9LEAAoAҿHEH@H;Et7H}t HEH@HEH@HtHEHPHEHHmUHH@H}؉uHEH@HEHEH@0HEHEHPHEHHgE}y3L AAѿ}uqLHEH@HUHRH$H$IAAHEHHHEH:HEHGUHH H}EHEH@0HtHEH@(HtHEH@0HEH@0HEHUHE@@HE@HEH@HUHEHB HUHEHB(HEHUHP@HEHP@HEHPHEHHEH@HtHEHPHEHHtUHH H}HEH@0HEHEuHEHHEH0tHEH0HHEH@0UHHHHHHtHHHHH@(]UHH E}t5LE$AAA҃}tUHH H}HEHHEHEH@HǸHEHEH}tHEHHEuUHH`H}uHEH@HEHEHEHEHEHEHEHEHEHEH(HELH$AAA҃}t5LE$AAA҃}tHEH@Ht7HEHUHRHHEH@HEHEH@HEHPHEHPHEtHHEHHt1HEHUHHHEH@HEHEHHUHEHPHEƀHEH(HELH$AAA҃}t5LE$AAA҃}tHEHlHEHEHEHEHE?HEHHEHUHEHHEHHtHEHEHEHEHEHEH}uHEHHUHSHHH}HEHE}t5LE$AA.A҃}t.HEоHE}t5LE$AA1A҃}t1HEHP(HEHHE}t5LE$AA4A҃}t4HEHE}t5LE$AA5A҃}t5HEHPHE܃}t5LE܉$AA7A҃}t7HEHHUHEHPHEH@HEHPHEHPHEHHEH@@HEH@HEHǀHEHUHE؃}t5LE؉$AA?A҃}t?<HHHEHHEHHuFHAHDӿHHH[]UHH0H}HEH(HE}t5LE$AAKA҃}tKHEHPHE}t5LE$AALA҃}tLHEHHUHH0HHH@(HtbHH@0HtcHH@HtdteHHtfHHtgdHH@(HHHpHHƿHHEHpHƿ}t5LE$AAqA҃}tqEt HH@(HUHSHHH}HEH@(HEHEH(HELH$AAA҃}t5LE$AAA҃}tHEƀHEHPHE}t5LE$AAA҃}tHEH(HELH$AAA҃}t5LE܉$AAA҃}tHEH@ HE؃}t5LE؉$AAA҃}tE؅t>HAHӿHEHHHEH;HEH@(HH[]UHH0H}HuHEtZHEHHtNHEHHHEH@HUHHHEHPHEHPHEHHUHEHPHEHP(HEHPHHE}t5LE$AAA҃}tHEUHH0H}uHUHMHEHHEHEt HEHt>HEHPEHH9sEHcHEHH?HHHuHEHEHEHEHu3HMHEغHHHEHEHt=HEH/HEH@Hu!HEHt HEHHEHtHUHEHHEHtHUHH H}EEfWf.vA \f.Ert!HEH EHEHUHH0H}HuUHMHE%tUHEH@)ȉE}EHcHEHHIHEHHEHEHHHEHHHMHEHHHEHHEH}tHEHtuHEUHH0H}HuHUHMHEH@HHEHEHEHPEHHHEHPHE@HEHHEHEH;Et}mtuHEUHH`H}HuHUHMLEHEHHEHEHHEHEHHEHEHEHEHH HEHP HEȋpTHEHWHEȋPTHEHHMHuHHEHEHHMHUHuHHEHEH;Eu=HEH@`HUHHEEH!HEHEH}MH}thHEH@HUHHEHPHEHPHUHEHPHEH@HHHEHPHEH@HH;EuHEH@HHEHHt9HEH@HUHHHEHPHEHPHEHHUHEHPUHHpH}HEHEHEH@(HEHEHEHEHEHEHEHEHEHEHEHEHEHEH(HELH$AA4A҃}t5LE$AA4A҃}^4HUHEHHHEH(HELH$AA7A҃}t5LE$AA7A҃}t7H}HMHUHuHEIH\HEH(HELH$AA;A҃}t5LE$AA;A҃}t;HEHt+HEH@HUHHUHEHPHEHEHEHEHt|HEƀHEHHt1HEHUHHHEH@HEHEHHUHEHPHEHt+HEH@HUHHUHEHPHEHEHEHEHHHEHEH(HELH$AAJA҃}t5LE$AAJA҃}tJHEH@HtHEHHHUHH`H}HuHUȉLEDMfELHEIAXAҿt HE؋@xu HEH@(HEEHPJHdHH@(HHHEHdHHEHPHE@MHEHxHuHUHEHL$HMH $AIHѺHHEH(HELH$AAiA҃}t5LE$AAiA҃}tiHEHHEHEHHEH@HUHHUHEHP}tmHEHPHE}t5LE$AAoA҃}toHEH(HELH$AAqA҃}t5LE$AAqA҃}tqHE@UHSH8H}؉uԋUHE؉HEHE؋@;EtwLHE؋@U$AAAHAHӿH8[]UHSHhH}HuHUHMLELMHEHUHHP*HdHH@(HHHEHuHMHEHUHT$HUH$IIȹHHEHHHEH^HHMHEHH  )Éi)‰Ѕt?L * ^AAHEHtMHEH@HHEЉHHEоHHdHH@(HH@PfWf.z$fWf.uEHEHHEHHcHЉ \Ef.Ev%\E YH,bEHEHH@P)ȉHPP9^Hh[]UHSH(H}HuHEHHHEH@HHHEHEHu7L AA<HHEH}u>HAHӿHEHHHEHHHEH@HHIAHUHMHEHHHE@t HEH@HHEHwaiter == NULLr->confirmed_lsn <= r->lsnnon consecutive LSN, confirmed: %jd, new: %jd, diff: %jdfalseset_lsn(%p, %linext_lsn(%p, %lirecovery_state == NULLunacceptable value of 'rows_per_wal'r->wal_mode != WAL_MODE_MAXr->current_wal == NULLrecovery startcan't find snapshotcan't find/open snapshotrecover from `%s'can't apply rowsnapshot recovered, confirmed lsn: %lididn't you forget to initialize storage with --init-storage switch?snapshot recovery failedskipping too young row`%s' has no EOF marker, yet a newer WAL file exists: trying to re-read (attempt #%d)WAL `%s' wasn't correctly closedrunlink broken %s WALcan't unlink 'inprogres' WALfailure reading from %sread zero records from %sdone `%s' confirmed_lsn: %linot all WALs have been successfully readrecover failedWALs recovered, confirmed lsn: %liunable to successfully finalize recoveryzero rows was successfully read from last WAL `%s'can't unlink 'inprogress' WALrename unfinished %s WALcan't rename 'inprogress' WALtoo many rows in inprogress WAL `%s'recover failed: %ir->watcher == NULLr->writer == NULLev_is_active(&watcher->dir_timer)%s error %de == 0%s: locking %s&writer->mutex%s: unlocking %sfio_batch_alloc! wal_writer.is_shutdownSTAILQ_EMPTY(&wal_writer.input)STAILQ_EMPTY(&wal_writer.commit)WAL writer: thread join failedwal_to_close == NULLmax_rows > 0wal_write lsn=%lipartial write: %d out of %d rowsfio_batch_write%.1fM rows writtenFailed to save snapshot: failed to open file in write mode.saving snapshot `%s'donedon't know how to read `%s'wal_writewal_writewal_writer_threadwal_writer_threadwal_fill_batchwal_opt_rotatewal_writer_popwal_writer_popwal_writer_stopwal_writer_stopwal_writer_startwal_writer_startwal_writer_destroywal_writer_destroywal_writer_initwal_writer_initwal_schedulewal_schedulewal_writer_init_oncewal_writer_init_oncerecovery_stop_localrecovery_follow_localrecover_remaining_walsrecover_snaprecovery_update_moderecovery_initconfirm_lsnwait_lsn_set@.A?%*gbT - %  T6"* /  , 9Exception6Object7int(M0_1q37MMMMMMMMEXm) Օ ;  #   x %  x z# {4# <  K M# N# O ( [ ( \ ^;# _# `;# b#  f;# h;# i# s3 t uM E ' v'  y z {; E  | 0 0  ;# # # # # #  #( #, )   E /  ; +!-#.b#q E< `fx mG# !#<#R## _ EIv       !"#$%&'()*+,-./0123456789:;<<=>? .U 0#5#=#>#@#A# C;#$E#(J#0N#8P#@[#H\#X]#hjU #x Me p (m $ &;#&;#&;#&#cb& #  ;  ' (*i ,;#,;#,;#,#cb, #,y # y y ; i (0 2;#2;#2;#2#cb2 #at2e #   ;  3  0A C;#C;#C;#C#cbC #atCe # Ee #(  ;  F nv su;#u;#u;#u#cbu#u # w #(xe #Xy#`z #h{ #wd};#; ~ (;#;#;##cb*#0# $$;w r].h;x 45^#lsn6B# M^O#cswQ;#R #T#(fidVx#0sid`x#4b#8c#Hfi#Xjs#`kx#xl# 0GHm#I^#J#Ke # Ke #(N SlsnTB#TB#VL#W#X# YR#(Z#0[#8c#@d#He;#Pf;#Tg;#Xhp #`i#hj#xl#|(ILdirJ#fK#M#Nb#O;# P#$R#  01#6#9;#:#;#Bm8rh9 6H6@6̡66;6;:;  =rX,9 8rh6`6p X:;   E  ? 8rh6p `9!:=rh@m!ArhBdB`C "Ar DJ:;" E&LXFlsn'BhFi4Frow8`E9xTGZ;"ArZAlZLHendu:Fres\;lFi]Frowa`EbxTIFlsndBXG;#ArD:E;lELEBHEB@EbFf`E?XET;#  E# #C>$ArXHout :EBhEB`C$ArX:E;lJY$BYhAwalYL`Ja%BahJg%Awg%HBg;D:FrihEj`EkLXEm;T Jy &Awy &HBy;D:Fr{hE|`E};\C&ArXBe P:;& Eh E& &J&ArX:Eh;& cKJ':;' ;' :Fe;l  J(B(X:Freq}hFtmp}`QJ ,)B ,)B ;:E R`E Q@E Q;2) ;7) L(Fe;\L(Fe;X:E}hE}P5J)*B)R:E,@;* ;* L)Fe.;\L)Fe1;XL*Fe4;TLA*Fe5;PLd*Fe7;L:Fe?;H E* **JIL+BIRX:;\+ ;a+ L++FeK;l:FeL;h E\+ L+L+G`;,Ar`}:;#, ;(, :Fsetq}Eq~Feq;l E#, ,,M{3-Ar{:E}RX;3- ;8- L,Fe;TL,Fe;PL-Fe;L:Fe;H**M-BRXB(P:;- ;- :Fe;l E- --G;.Awal.XB;TAdirHAlsnB@:FlLhEL`;. L-J /AwalLhBp `:Ee G}/AwalLXBPB;LAreq}@:E;l;/ :Frow0`-G}L0AwalLXBPAreq}HAend}@:E;lJ1ArBRB(B(B(:Fwal.XEPFreq}hE}`IE}HG,b2B,:Fr.hE/R`E0Q@E1QE2Q;r2 ;w2 L1Fe4;\L2Fe7;XLA2Fe;;T:FeJ;P Er2 b2b2NU;3ArUHAlsnUB@BUAopVfArowVBVx:E^RhFreq`}`;3 ;3 Ek[L3Fei;\L3Feo;T:Feq;P E3 33J}D4B}HAfd};D:E;\C55AlLHB@BBbBBb:E; E; Ee PEe Frow0XC5ArHAf5@:ELPEX5L5N;6BBBB:FdirhFh`FfXFlLHFiFrowPExDODe  6 Pi6 Pe Q?RQ@R D7RQy6/7;;2Q><77Q",Qo^Sgq7 ETX E E % $ > $ > : ; I  I : ; @ : ; I8 I !I/  : ;   : ; @ : ; I : ; &I : ; (  : ; : ;I8  : ;I8 I: ;I : ;5I : ;I : ; I8  : ;  : ; !I/ : ; !!I/"< # : ;$ : ; %I8 2 & : ; I8 2 '.? : ; @I< d(I4 ).? : ; @L M < d*.? : ; 2 < d+.? L 4 < d, : ; - I8 4 ..? : ; < d/.? : ; L < d0.? : ; @I< d1 I23 I4.: ;I@B 5.: ; @B 6: ; I 7.: ; I@B 8: ; I 9.? : ; @B : ;4I4  <.: ; @B =4: ; I >.? : ; I@B ?.? : ; @B @.? : ;@B A: ;I B: ;I C.? : ;@B D : ;E4: ;I F4: ;I G.: ;I@B H : ;I UJ.: ;@B K.: ;@B L M.? : ;@@B N.? : ;I@B O4: ;I? < P4: ; I?  Q4: ; I? < R!S4: ; I wwvwww6v67w78w8;w;DvDEwEFwFIwI[v[\w\]w]`w`vwwwvwww/v/0w01w14w4#v#$w$%w%(w(vwww0v01w12w25w5vwwwvwwwavabwbcwcfwfvwww=v=>w>?w?BwBmvmnwnoworwr. v. / w/ 0 w0 3 w3 s vs t wt u wu x wx vw w  w vwwwvwwwvwwwvwwwvwww|v|}w}~w~wvwwwvwwwCvCDwDEwEHwHvwwwvwwwvwwwkvklwlmwmpwpfvfgwghwhkwk!v!!w!!w!!w!C$vC$D$wD$E$wE$H$wH$W%vW%X%wX%Y%wY%\%w\%&v&&w&&w&&w&'v''w''w' 'w ''v''w''w''w'(v((w((w((w(L*vL*M*wM*N*wN*Q*wQ*.v..w..w..w.1v11w11w11w1B2vB2C2wC2D2wD2G2wG24v44w44w44w46v66w66w66w68v88w,8^  X Y ())) N /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coroev.hrecovery.hlog_io.hfio.hrecovery.ccstdint.htypes.htypes.hstddef.hsigset.hselect.htime.hpthreadtypes.huio.hsockaddr.hin.hstat.hsignal.hconfname.hfiber.hstdio.hlibio.hstdarg.hcoro.h coro.herrcode.hsay.hrlist.hpthread.herrinj.hexception.hobject.hpalloc.h Ku{=.K..f tY.!4K2K<ן!S2;3/hY .S*[y!;u.Lg3uu<tX=yK2(2ɼɼ==n 2! .)=u)Z)Z42/#)%#u4[))! .w2Y=)4#)q.'tXT& .|?_FZ8uLuvL'l0K3uZ8g8["80gDf!)wg=6'/3y6@%g2ɼg38YLBL83Z83B׻!."k22廻g9uh2廻g3gD2vCg2+.K/ .5f.It XL2uvJf5f71Jf5f' J5f5f5fJ5f5fg=t5f4!5f5f/.!j5fv3ɾP5f5fP5f5f> tZ 9Z$5fzx$.g0 Kt2ttXPL3gt>fK/"t.tXPK3u#u/tXNK4歄Z#"נv#A$t-XX93uuvJf5/Jf5fJf5f+1+m  XJf5f ."0%/=P5f&g5fP5fZu6=9>z-:"A?!YLZYY%YKw y$)Yu4K>滼) x0KKx1/;#_SC_THREAD_SPORADIC_SERVER__align_SC_2_SW_DEVevent_unused2data_len_SC_TIMERS_fileno__pthread_mutex_s__func___SC_SHELL_SC_MEMORY_PROTECTION_SC_SCHAR_MAXerrinj_enum__total_seq_SC_UCHAR_MAXfio_batch_SC_C_LANG_SUPPORTPTHREAD_MUTEX_NORMALwal_fiforow_handler_paramS_INFO_SC_TTY_NAME_MAXxlog_handlerrecovery_stateS_DEBUG_IO_buf_end_SC_SELECT_shortbuflog_suffixsockaddr_insa_family_tsay_level_SC_BC_STRING_MAX_SC_TRACE_INHERITrecovery_update_mode_SC_SEMAPHORES_SC_EQUIV_CLASS_MAXreaderrecovery_stop_fileuint16_tm_errmsgoverflow_arg_areasin_zerowal_writer_popsnap_dir_SC_DEVICE_SPECIFICin_port_tpanic_if_error_SC_THREAD_THREADS_MAXnext_SC_LEVEL3_CACHE_SIZEreg_save_area~Exceptionrecover_walERRINJ_INDEX_ALLOC__off_tS_ERRORwakeup_lsn_waiterst_size_SC_THREAD_PROCESS_SHARED_SC_JOB_CONTROL__wakeup_seqmetadata_lockrow_v11_sizeERRINJ_TESTING_SC_NL_NMAXPTHREAD_MUTEX_TIMED_NPgc_poolwal_schedule_queuerecovery_stop_local_SC_POLLpthread_t_SC_V6_ILP32_OFF32st_blksize_SC_BASEWAL_FSYNC_DELAYdata_crc32c_SC_LONG_BITlog_io_cursorintmax_twal_writer__woken_seq_SC_CLOCK_SELECTION_SC_V7_LPBIG_OFFBIG_SC_AIO_LISTIO_MAXpriorityst_gidrecovery_free__mutex__syscall_slong_t_SC_FILE_SYSTEM_SC_TRACE_SYS_MAX_IO_write_end_SC_SCHAR_MIN_SC_LINE_MAXst_nlink__owners_addr_SC_TZNAME_MAX_SC_NZEROmax_rowsremotest_ctimS_FATAL_SC_2_VERSION_SC_2_PBS_CHECKPOINT__sigset_tsnap_write_batchrlist__lockworker_args_SC_LEVEL4_CACHE_ASSOCPTHREAD_MUTEX_DEFAULTwal_fifo_entry__pthread_list_t_SC_NL_LANGMAXreventspendingwal_fsync_delaysin_familyrecover_existing_wals_SC_LEVEL1_ICACHE_ASSOC_SC_NPROCESSORS_ONLNwal_writer_stop_ZNK9Exception3logEvattrst_atimsnapshot_write_rowthread_SC_2_C_BIND__nwaiters_SC_PRIORITY_SCHEDULING_SC_SS_REPL_MAX_SC_ASYNCHRONOUS_IObatchwal_fill_batch__uid_t_SC_VERSIONoperator=_SC_FSYNCsin_portrollbackObjectev_now_SC_FILE_ATTRIBUTESmode__datasnap_io_rate_limit__gnuc_va_list_SC_2_C_DEV_chainrowswal_watcher_ZNK9Exception6errmsgEv_SC_SYMLOOP_MAXunsigned char_SC_MQ_OPEN_MAXpthread_mutex_t__blkcnt_t_IO_lock_trecovery_lag_SC_SEM_NSEMS_MAX_SC_USHRT_MAXeof_readnew_limit_SC_STREAM_MAXGNU C++ 4.7.3_SC_READER_WRITER_LOCKS_SC_CPUTIMEWAL_FSYNC_SC_2_PBS_LOCATE_SC_DEVICE_IO_SC_RE_DUP_MAX_SC_SIGNALS_SC_V7_ILP32_OFFBIGoff_t_SC_PASS_MAX__kindwal_opt_rotateuint64_trecover_remaining_wals__mode_t_SC_V7_LP64_OFF64_SC_NPROCESSORS_CONFnext_wal_SC_XOPEN_XCU_VERSIONwal_writer_init_onceconfirmed_lsnstack_SC_MEMLOCK_SC_SEM_VALUE_MAX_SC_XOPEN_XPG2_SC_XOPEN_XPG3_SC_XOPEN_XPG4good_offset_IO_write_ptr_SC_REALTIME_SIGNALSm_lineerrinj_enum_MAXLOG_WRITEEVBREAK_ONEwal_writer_childva_list_SC_THREAD_PRIO_PROTECTfsync_delayrow_lenrepeatlog_dirlinkstqh_lastwal_to_closerecovery_finalize__sizemutexwait_lsnFILEwal_writer_destroy_SC_THREAD_SAFE_FUNCTIONS_SC_PII_INTERNET_DGRAM_SC_SINGLE_PROCESSPTHREAD_MUTEX_ERRORCHECK_NP_SC_RAW_SOCKETSst_mtimsize_tis_inprogress__countuint8_trecover_current_wal_SC_BC_BASE_MAXXLOG_SC_RTSIG_MAX_SC_NETWORKING_SC_GETGR_R_SIZE_MAXstqe_next_SC_THREAD_ATTR_STACKADDR_SC_LEVEL2_CACHE_ASSOC_SC_IOV_MAX_SC_TRACE_EVENT_NAME_MAX_SC_PII_INTERNETtarantool_coro_IO_save_base__unusedaddriovecev_watcher_time/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/recovery.cc_SC_2_UPEm_file_SC_DELAYTIMER_MAX_SC_XBS5_ILP32_OFFBIGrecovery_last_update_tstamp_SC_SYSTEM_DATABASE__pad0__pad2__pad3__pad5__vtbl_ptr_type__nlink_tst_inost_mode_SC_T_IOV_MAXsnapLOG_READ__pthread_internal_list__prev_SC_XOPEN_STREAMSrow_v11~Object_nextrecovery_initTNT_ERRMSG_MAXrecovery_watch_filewatcherwal_writer_startsnapshot_save__ssize_twal_write_batchev_watcher__broadcast_seqtimespecmax_iov_SC_2_FORT_RUNerrstron_wal_errorWAL_NONE__val_SC_ADVISORY_INFOPTHREAD_MUTEX_FAST_NPEVBREAK_CANCELpthread_cond_t_SC_TIMER_MAX_SC_THREADS_SC_SYSTEM_DATABASE_R_SC_USER_GROUPS_Rconfirm_lsnwal_writer_oncestqh_first_SC_UINT_MAXst_uidoldseterrflagsPTHREAD_MUTEX_RECURSIVE_NPrecovery_rescan_file_SC_TRACE_NAME_MAXsync_delayev_timer_vptr.Objectinput_was_emptyresulttimer_sbuf_SC_CHILD_MAX_IO_save_end__next_SC_V6_LP64_OFF64_SC_NGROUPS_MAXfp_offsetpthread_mutexattr_t__time_t_SC_THREAD_ROBUST_PRIO_INHERITgp_offsetnext_lsnwal_dir_rescan_delay_SC_THREAD_DESTRUCTOR_ITERATIONSpthread_once_t_SC_SSIZE_MAX_SC_PII_OSI_CLTSsizetypesig_atomic_ttypedef __va_list_tag __va_list_tagshort unsigned intsigned char__blksize_t_SC_STREAMSrecovery_rescan_diris_shutdown_SC_PAGESIZEfilename_SC_THREAD_PRIORITY_SCHEDULING_SC_CHARCLASS_NAME_MAXrows_written19pthread_mutexattr_t__off64_twait_lsn_clearWAL_MODE_MAXsync_is_asynccurrent_walcond_IO_read_base_offsetstatesigset_trowlenwaitersentS_CRITrecover_snappathinputERRINJ_WAL_IO_SC_DEVICE_SPECIFIC_Rev_rt_now_mode_SC_PIPE_IO_write_base_SC_PHYS_PAGES_SC_ATEXIT_MAX_SC_SHRT_MAX_SC_FIFO_SC_USER_GROUPSlong intsnap_handlerfiber_SC_TRACE_SC_XBS5_ILP32_OFF32snapshot_cookie_IO_markerrow_handlerlast_syncev_watcher_list_SC_2_PBS_MESSAGEstack_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcwal_lsnwait_lsn_set_SC_XOPEN_REALTIME_THREADSwal_greatest_lsn_SC_SPIN_LOCKScorowal_schedule_SC_SPORADIC_SERVERwal_dirnamerecovery_update_io_rate_limitlast_SC_LEVEL1_DCACHE_LINESIZEwrite_end_SC_PRIORITIZED_IOin_addruint32_t_SC_GETPW_R_SIZE_MAXinterval_SC_XOPEN_VERSION_SC_BC_SCALE_MAX_SC_2_C_VERSIONlong doubleiov_len_SC_LEVEL4_CACHE_LINESIZEPTHREAD_MUTEX_RECURSIVEset_lsnrows_before_SC_NL_TEXTMAXWAL_WRITErecovery_setup_paniclong unsigned intev_tstamp_SC_LOGIN_NAME_MAXbool_SC_XBS5_LP64_OFF64_SC_SPAWN_SC_PII_OSI_Mbatch_endev_async__sig_atomic_t_SC_2_PBScoro_context_SC_XBS5_LPBIG_OFFBIG_SC_WORD_BITchareter_pool_SC_2_PBS_ACCOUNTINGwal_writer_initis_rollback_SC_BARRIERSsin_addr_SC_2_CHAR_TERM__spins_SC_LEVEL1_ICACHE_LINESIZEwal_dir_SC_AIO_MAX_IO_buf_base__nusers_SC_XOPEN_SHM__dev_t_SC_XOPEN_ENH_I18Ndir_timer_SC_THREAD_KEYS_MAXrecovery_follow_localev_statdata_IO_read_end_SC_ULONG_MAX_SC_TYPED_MEMORY_OBJECTSelapsed_SC_TIMEOUTS_SC_XOPEN_UNIX_IO_FILEin_addr_tcookie_SC_LEVEL2_CACHE_LINESIZEheader_crc32clast_stack_frameis_commit_SC_THREAD_STACK_MINS_WARNsuffixev_statfinalize_SC_NL_MSGMAX_SC_SHRT_MIN_SC_THREAD_ROBUST_PRIO_PROTECTSNAP_SC_LEVEL2_CACHE_SIZE_SC_XOPEN_CRYPT__pad1_SC_BC_DIM_MAX__pad4_SC_LEVEL1_DCACHE_SIZE_SC_LEVEL1_DCACHE_ASSOCerrorcheckwal_write_request_SC_AIO_PRIO_DELTA_MAX_SC_XOPEN_REALTIME_markers_posint64_t_ZN6ObjectaSERKS_param_SC_SAVED_IDSelemwal_opt_sync_SC_INT_MAX_flags_SC_TRACE_LOGdoublest_rdev_SC_OPEN_MAXst_devssize_tlog_format_SC_UIO_MAXIOVtnt_error_codesdatapalloc_poolmetadata_lencurrent_lsnfilename_ext_Z15wal_writer_stopP14recovery_state14pthread_cond_t10__sigset_t_SC_CHAR_MAXread_logwal_mode_STRSlog_magic_tExceptionNONE_SC_PII_XTIfiletype_saybytes_SC_PII_OSI_COTSheader_v11_SC_PII_SOCKET__gid_t_SC_V6_LPBIG_OFFBIG_SC_MQ_PRIO_MAXsave_current_wal_SC_TRACE_EVENT_FILTERqueue_SC_THREAD_CPUTIMEretrytv_secwrite_event_SC_C_LANG_SUPPORT_Rlong long unsigned int_SC_NL_ARGMAX_cur_column_SC_PII_SC_MAPPED_FILESERRINJ_WAL_ROTATE_SC_LEVEL4_CACHE_SIZE__listdirname_SC_2_FORT_DEVst_blockserrcode_recordon_snap_error_SC_2_LOCALEDEFerror_SC_LEVEL1_ICACHE_SIZErow_count_SC_TRACE_USER_EVENT_MAXerrmsg_IO_backup_base_IO_read_ptrINPROGRESS_SC_CHAR_BITPTHREAD_MUTEX_ERRORCHECKlog_iomarker_Z14wal_writer_popP10wal_writerP8wal_fifolog_mode_SC_INT_MIN_SC_PII_INTERNET_STREAMheader_SC_THREAD_ATTR_STACKSIZE_old_offset_SC_SIGQUEUE_MAXfio_batch_is_full_SC_FD_MGMT_SC_SYNCHRONIZED_IO_SC_V7_ILP32_OFF32writer_SC_EXPR_NEST_MAX_SC_LEVEL3_CACHE_LINESIZElong long interrdesc_flags2_SC_MESSAGE_PASSINGsnap_dirname_SC_REGEX_VERSIONopen_wflagstv_nsec_SC_FILE_LOCKING_SC_AVPHYS_PAGES_SC_MB_LEN_MAX_SC_PII_OSI_SC_ARG_MAX__ino_t_SC_MEMLOCK_RANGE_SC_SHARED_MEMORY_OBJECTS_SC_MULTI_PROCESS_SC_CHAR_MINEVBREAK_ALLiov_basewal_write_to_disk_SC_XOPEN_LEGACY_SC_2_PBS_TRACKrecovery_wait_lsn_SC_THREAD_PRIO_INHERITcommit_SC_LEVEL3_CACHE_ASSOC__futexwal_mode__FUNCTION___SC_HOST_NAME_MAX_SC_COLL_WEIGHTS_MAX_SC_MONOTONIC_CLOCKPTHREAD_MUTEX_ADAPTIVE_NP_SC_CLK_TCK_SC_NL_SETMAXunsigned intwal_writer_thread_SC_V6_ILP32_OFFBIGactiveshort intprev_vtable_offset_SC_IPV6rows_per_walwal_write_SC_REGEXP15pthread_mutex_tstatflagsf_dataGCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <!AC \ \AC I |AC R ?AC z UAC P @AC { AC  pAC k zPLRx $$AC E bAC ]  hAC E^ gAC b 7AC r AC  (0AC k  AC   4EAC @ AC  AC   AC  AC  AC Y 0AC  PAC  pAC  sAC n NAC I {AC v ZAC U  AC  $AC E \AC   DAC   AC E AC   BAC = kAC f (AC  HAC  hAC   P>AC 9  AC   AC E  AC E $AC E $kAC f .symtab.strtab.shstrtab.rela.text.rela.data.bss.rodata.rela.gcc_except_table.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.groupE@"EH"jEP"EX" `8@"+8( &4`"18 68X CB> 5" UB qBl85H"BB50"C75d"zA0x0"q`ё "0!0h&;`6p"L8H#X ^ !#76EQ\? c / @ #     sA  b/ Et  g .]  / D TNkD{ P pZ 0 > = k  l A v M*>  p( ] P _X%B A,&kG n' 2'5(z      1  <  Z   y      ( U     0  $p - B S c r   ! 1b h   g      b7# 1 !V [ u >0 n    8 ` f       0 B d l z  }      #:Tg '6JWeD$ *8?O]. gnC246k!  !,!8recovery.ccev_nowwait_lsn_clear_ZL10header_v11PKc_ZL12row_v11_sizeP7row_v11fio_batch_is_full_ZZ12wait_lsn_setE12__FUNCTION___ZL17wakeup_lsn_waiterP14recovery_state_ZZ11confirm_lsnE12__FUNCTION___ZZ13recovery_initE12__FUNCTION___ZZ20recovery_update_modeE12__FUNCTION___ZL19recovery_stop_localP14recovery_state_ZZ12recover_snapE12__FUNCTION___ZL11recover_walP14recovery_stateP6log_io_ZL22recover_remaining_walsP14recovery_state_ZZL22recover_remaining_walsP14recovery_stateE12__FUNCTION___ZL16wal_writer_startP14recovery_state_ZL11wal_watcher_ZL19recovery_watch_fileP11wal_watcherP6log_io_ZL20recovery_rescan_fileP7ev_stati_ZL18recovery_stop_fileP11wal_watcher_ZL19recovery_rescan_dirP8ev_timeri_ZZ21recovery_follow_localE12__FUNCTION___ZZL19recovery_stop_localP14recovery_stateE12__FUNCTION___ZL15wal_writer_once_ZL10wal_writer_ZL16wal_writer_childv_ZL20wal_writer_init_oncev_ZZL20wal_writer_init_oncevE8__func___ZZL20wal_writer_init_oncevE12__FUNCTION___ZL18wal_schedule_queueP8wal_fifo_ZL12wal_scheduleP8ev_asynci_ZZL12wal_scheduleP8ev_asynciE8__func___ZZL12wal_scheduleP8ev_asynciE12__FUNCTION___ZL15wal_writer_initP10wal_writer_ZZL15wal_writer_initP10wal_writerE8__func___ZZL15wal_writer_initP10wal_writerE12__FUNCTION___ZL18wal_writer_destroyP10wal_writer_ZZL18wal_writer_destroyP10wal_writerE8__func___ZZL18wal_writer_destroyP10wal_writerE12__FUNCTION___ZZL16wal_writer_startP14recovery_stateE12__FUNCTION___ZL17wal_writer_threadPv_ZZL16wal_writer_startP14recovery_stateE8__func___ZZ15wal_writer_stopP14recovery_stateE8__func___ZZ15wal_writer_stopP14recovery_stateE12__FUNCTION___ZZ14wal_writer_popP10wal_writerP8wal_fifoE8__func___ZZ14wal_writer_popP10wal_writerP8wal_fifoE12__FUNCTION___ZL14wal_opt_rotatePP6log_ioiP7log_dirl_ZZL14wal_opt_rotatePP6log_ioiP7log_dirlE12__FUNCTION___ZL12wal_opt_syncP6log_iod_ZZL12wal_opt_syncP6log_iodE9last_sync_ZL14wal_fill_batchP6log_ioP9fio_batchiP17wal_write_request_ZZL14wal_fill_batchP6log_ioP9fio_batchiP17wal_write_requestE12__FUNCTION___ZL15wal_write_batchP6log_ioP9fio_batchP17wal_write_requestS4__ZL17wal_write_to_diskP14recovery_stateP10wal_writerP8wal_fifoS4_S4__ZZL17wal_writer_threadPvE8__func___ZZL17wal_writer_threadPvE12__FUNCTION___ZZ9wal_writeE8__func___ZZ9wal_writeE12__FUNCTION___ZL16snap_write_batchP9fio_batchi_ZZ18snapshot_write_rowE4rows_ZZ18snapshot_write_rowE4last_ZZ18snapshot_write_rowE5bytes_ZL15snapshot_cookieev_rt_nowrecovery_statewal_mode_STRSwait_lsn_setassert_fail_GLOBAL_OFFSET_TABLE_fiber_Z12fiber_wakeupP5fiberconfirm_lsn_sayset_lsnrecovery_wait_lsn__gxx_personality_v0_Z11fiber_yieldv__cxa_end_catch_Unwind_Resume__cxa_begin_catch__cxa_rethrow_ZTI9Exceptionnext_lsnrecovery_initeter_poolp0allocrecovery_update_modeexitsnap_dirstrdupwal_dirstrindexrecovery_update_io_rate_limitrecovery_free_Z15wal_writer_stopP14recovery_statefree_Z12log_io_closePP6log_iorecovery_setup_panicrecover_snap_Z12greatest_lsnP7log_dir_Z20log_io_open_for_readP7log_dirl10log_suffix_Z18log_io_cursor_openP13log_io_cursorP6log_io_Z18log_io_cursor_nextP13log_io_cursorPj_Z19log_io_cursor_closeP13log_io_cursor_exit_Z15format_filenameP7log_dirl10log_suffixfopen64_Z11log_io_openP7log_dir8log_modePKc10log_suffixP8_IO_FILE_Z21inprogress_log_unlinkPcpreleaserecover_existing_wals_Z19find_including_fileP7log_dirlrecovery_finalize_Z21inprogress_log_renameP6log_iostrncpyev_stat_startev_stat_stoprecovery_follow_localev_timer_startev_timer_stop_Z13log_io_atforkPP6log_iopthread_atfork_Z10fiber_callP5fiberzpthread_mutex_lockpthread_mutex_unlockpthread_mutexattr_initpthread_mutexattr_settypepthread_mutex_initpthread_mutexattr_destroypthread_cond_initpthread_oncesysconffio_batch_alloc__errno_locationstrerrorpthread_mutex_destroypthread_cond_destroyev_async_startsigfillsetpthread_sigmaskpthread_createpthread_cond_signalpthread_joinev_async_stop_Z14wal_writer_popP10wal_writerP8wal_fifopthread_cond_wait_Z10errinj_geti_Z21log_io_open_for_writeP7log_dirl10log_suffix_Z11log_io_syncP6log_iofio_batch_start_Z15header_v11_signP10header_v11fio_batch_addfilenofio_batch_writeev_async_sendwal_writepalloc_Z12row_v11_fillP7row_v11ltmPKcmS2_msnapshot_write_rowprelease_afterev_now_updateusleepsnapshot_saveread_logstrstr_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEX / k\^*_Z # d i n\a   #   \Naf u [efgg h&iRaj y Y    \mnYY oa# 2 Ipm qr sr Z"t< F K =P\x <  < Ywx x*y1Y   Y\a p |a  *}>aD S la}  ~a  :Fyoa  |a  a < ! p) gU ~ a U a   b' a n g | a p" ; aP _ | y      < d aq   a  p   Y \ a/ > a  a 5& Bac Or ya p ^7b}a  pa  ^\ab q pa  a" 1 Hpday  a 3 pa Q* GWa] jl pa  py#Z  a ( ?pa  p a. O= Zy   \   \   Y   \Y $x+6YM \lax P~   p  \pza , 0  a 0   =  \a , 0 ; a 0  / =9 > C\ga   . 8 = B\Scao u     \a      $\0@aL R a y   \a      \o  D a      \!a&/5 LB Xp`ga      \a   " : D I N\ax   \   \   Y\   \ \ % / 4 x9 \@  J T Y ^ \c w |     M*     a ! ! +! 5! :! ?!\P! z!g!!a! ,! p! ! !a! p!  " %" /" 4" 9"\T"d"ap" pv" " " " " "\""a" ," p" ;" #a# p# )# A# K# P# U#\j#z#a# p# # # # # #\#a### # $p!$$$a$ P$  % %% _/% 4% 9%\%%&y3&H&yV& A`& e& j&\&g&&&M' 2W' \' a'\v'''()(**a* ,* * * +a+ + )+ E+ O+ T+ Y+\l+|++a+ ,+ + ;+ +a+ + + + , , ,\?,I,aQ, ,W, ], l, ,a, , , , , , ,\---a- ,- - ;- .a. . -. E. O. T. Y.\v.y.g.a. . . /^3/>/^///a/ ,/ / / /a/ /  0 "0 ,0 10 60\00a0 0 0 0 0 0 0\00a1 ,1  1 ;1 61aB1 H1 W1 o1 y1 ~1 1\1e11a1 1 2a222 9"2 82pv2^2222233A3aG3S3 D ]3 Il3 333^33Y3 4404<4F4S4d4 L s4 L 4 D 44444Y44Y45/5a55 `D5 V5_5pi5q55a555 L5 5p55a55  6 E6a6xm6yt6az6 6 6g6s 66 s6q 77 q 7a-7 <7 \7 d777~778y8g     j K P P  PJ!8) O0 P7 P;!C PP PU P b Pg Pt Py Pn P! Pd PP PB P PH P P P P P P P P P PL* P5 PH P M P; X Pc P n P| P: P$ P P P PD P@ P P P+ P P+ P!4 P[@ PN P \ P)j Px PN  Pr P P P%  P P< Po P%  P P! P)2 P@ Pt N P\ PGj PVx P P P P P%  P Pl P Pa PW P  P P" P= PpH PS Pf_ P1n Pz PE Pp PY P; P P P  P P P P8 P7 P7  Pa  P PH P$ PS* P0 Pf6 P< P B PH PN PT PZ P` Pf Pl Pr PY x P,~ P PP P P  Po P  PZ Pp P  P} P P P  P P P P  PK Pq P P P P P# P# P P  P& P , Py2 P8 P_> PD P J PP Pm V P\ Ptc Pj P q P~x PS  P6  Pw Pl P P6 P P P PU  P4 P, P>  P  P P  P~ Pm PY P| PA  P P  Pq  Pf' P. P5 Pb< PC PH J P Q P) X P8 _ Pf PGm Pt PW{ P  P' P Pj PG Pf P P P P P P P5 P P P P P P  P" P Pl  P P# P * P1 P8 P*? PLF PM PT PW[ Pbb Pi P+p Pw P\~ P/ P} P PU P PH P P  P P  P'  P P Py! P" Pv P  P P P P  P Pd PC& P- P4 P; PB PI P-P P W P^ Pe Pl Ps P !z P P P P P P Pj P9 Pf Pz P P P. PP Po P P P] P P P P PY! P " P) P' 0 P 7 Pv> PE P L P-S PZ PZa P2h Po P,w P! P P P  P P P P P P P P P+ P 9 PaG P f Pbs Pxx P P P4! P- P P P P P4! P-. P= PZ P P P4! P- P P P  PK' P4!6 P-E PT P P PK P P P4! P- P P P* Px9 PH PW PE!f P P P P4! P- P P P6 PK PRQ P W P^ P P2  P P P P P  P  P3 P!A P!O Pe PZq P  P P Pb P  P|  P P1 P P  P P< P  P PS' P5 PC PQ PZ_ Pm P{ P Pb! P! P5 P2  P|  P P P P! P>/ P#= P S P _ Pzm P{ P4 P P P PK P PV  P P,  P PK" P32 P B P@Y Pg Pv P! P# P P;  P Pc P P( P P^# PS 2 PA PP PS_ P n Pz} P P  P PS P PN P PJ! Pj P] P' Pv7 P G P W Pg P w PO P6 P P P P P) P PW P  PT P~' Pt P  P P  PK P P  P  Pt P P P4 PP  PG  P* Pk5 PA Px P PD P P- P P P P P P ( P 6 P?E PQ P_ Pm P Ph P Pi P P P P PK P PE! P P P# P) P / P 5 P; PA PG PM P<T P` Pn P| PQ P P Pp P! P P P}  P PK  P- PR P_ Pn P  Pw PR  Pv  P  Ps P P Pw? Pwb P P PT P PL P P\ PV P q P| L P7 L` P2  P7E L PcE\ L 7 PkA\IQ L[ P3k Pqy L P2  P  /  P0 L@ P0%$- LQ P_Eg"p P { #  P$ L P, 1 L`*= PG1OW Lo PZu} L  P P P P Pb! P! P    P& . b6 LL PZ P h p `y P  P  b  L P P  > L@! !<!! P;(!>0!n8! LO! P^! Po! P v!n~!/ ! L! P3!!z!- ! P ! ! P" P$" P/"/ 7"t ?" L`l"Y u"? }"r " P" N" Pm "t "" L # P #O # ##,# Pq;# P K# PZ# Pi# P# P## P# P # # PP### L $$$$ P.$ P@$ P G$O$W$ Ln$#v$$ Pq$ Pw$$$ L$ P$ P$$$ L@$ P% P%%% L/% P%>%F%\% Pk% Pz% Pq% P%%}% L % P%%%{% P% Pq& P&}"&*& L` A& P!P&X&a& P l& u& P& P&&& L &&& P& P & ' P ''D' L !' P ('D0'8' L B'LJ'S' Pm^' Pg' P r' p{'L'' P''' L ' P%'' ( P(($( L@ .( P>( P0N((V(_( Pn( PV }( Py( Pm( 0( P ( =(d(((G(S) ) PE) P=) P0D)L)lT) L ^) Pn)v)d) P) Pm) ) P ) ))F)F))*(*('*B*J*e*m** P@ *l*g* L * P*x*e* Pm* * P +  +x+,+4+Rg+ Pr+gz+!+ L` +y+~!+ P + + Pm+ + +F!+ P/, P6, P:,!B,D$J, L b,!j,=$s, P, Pm, p, P , ,!,=",H",",",Y#-Y#-#?- PDF- PJ-D$R-X%Z- L d- Ps- P-T$-V%- Pm- P- P - _-$-=%- PU .X% .&. L *. Pb!W.o%_.&u. P . P . A. PJ.&.'. L . P@.&.'. P/ / P9/' /'(/ L@A/ P3P/ Pb!n/'v/'/ PQ/ P / 2/|'/'/ P/'/(/ L/ P3+0 (30(<0 PbM0 PT0(\0M*d0 L|0 P0 P0 PV 0 Py0(0K*0 P30 PI 1 N01 P 1 P!+1M*31.;1 L`E1 PU1Y*]1.s1 P1 P1 PV 1 Py1 Pm1 1 P 1 1*1]+1p+2,23,'2,B2-J2].~2 Po!2.212 L2 P2 P 2.313 P-3 Pm83 A3 P L3 U3 Pad3/l3:03v03030313 P313C23 L 4 P3#41+4<244 PbF4 PM4C2U44]4 Lt4 P34 PT4 P4 P4 P?4d2444 P44 P45 P\5 P)575 P>54F56N5 Lr54z565 P5 P35 PT56585 L@5 P#5 P/5 P6 P166'686 P6 PE6 P]6Z6 P<6Y6 PS6 P7 P07 PC7 PP7 P]7 Pi7 w7 P7 7 P77 PK7 J[ @`7E\0 $K d`i 1b ,>LnU p/ y +t 4Tt}D :8A J`lg Y!D$X% m &,'L'l(M* |.1C24! @6I admin.cc.o/ 1378727470 1000 1000 100664 80368 ` ELF>@@UHHH}HuHEHE@9v9HEHEHHE@H9HtHUHEHHUHH H}HuHUHEHPHEHH`HEHPHEH HUHEHHHEHEHEHEHPHEHUHH0H}HuHUHMHHMHUHuH}HEEUHH H}HuHUHHUHuHMHEEHUHH}HEHPHEH@ HHHEH@HH)H]UHH0H}HuHUHUHEHHHEHHHEHpHUHEHHEHEHPHEHHEHPHEUHH0H}HuHEHEHEHp HEL@HEHxHEH@HEHHEH@H4$MIHǸHEHHEH@HHEHUHH0H}HEHEHEHEؾHǸHUHEHƿHEH*HEHxH*HHH H*Xf(^f( YHEؾHǸHEHxH*HHH H*XHEHxH*HHH H*X^ YHEؾHǸHUHHH}HEHǸUHHH}HEHǸUHHH}HEHHEHǸHEH~UHHH}HuHEHHEHHHEHEHǸHEH0UHH H}HEHǸHHEHǸEHEHEE,HEHǸHEHǸHEHǸHEHǸHHPHEHǸHH@8HtHH@8H@ HUHEEH׸HH@8HtHH@8H@(HUHEEH׸HEHHHEH}u HHEHUHEHǸUHH@H}uHUHMHEHEHEHE+M}HUHEHuH4$AAHǸUHHH}HEHǸHEHƿUHHpH}HuHUHEHHEHdHH@(HHEHdHH@(HHE,HMHEHHMHt 0HEH@HHEH@HH)HHHEH@ HHEH}uHEHEH@HEEHEH;E/}č(EHHEcwHXUROLIFC@=:741.+(%" E#/HEHEH;E(HEHEHHEH HEHHEHHEHHEHHEHHEHYHEHHEHbHEHu,HEHHEHHEHHHEHEH;EdHE< EHEHEH;EDHE 9bt HEHEH;EHE n QHEHEH;EHE ctHEHEH;EHE _ktHEHEH;EHE< q)HEHEH;EsHE Axt yHEHEH;E>HE it e7HEHEH;E HE tt )HEHEH;EHE  HEHEH;EHE ^et HEHEH;E{HE "lt @HEHEH;EIHE pt IHEHEH;EHE  HEHEH;EHEE?E@EAEBECEDEEvEFiEG\EHOEIBEJ5EK(ELEMENEOEPEQERESETEUEVEWEXEYrEZeE[XE\KE]>E^1E_$E`Ea EbEcEdEeEfEgEhEiEjEkEl{EmnEnaEoTEpGEq:Er-Es EtEuEvEwExEyEzE{E|E}E~EEĀzEāpEĂfEă\EĄREąHEĆ>Eć4EĈ*Eĉ EĊEċ EČHEHUHPHEH;Et@HEH$HHHH HEHHHEHHE؋HEHHHEHH-UHHH}HEHHHHEH@HHEH@HHHdH@4UHSHHhHhHPHHJ0HhHJHHUHPHUHPHUHPHUHP HUH@(HEHh0s0HhHPHhHHhJHh HhHPHHJHhHJHHEHHHEHHEHEHEHEHEHEHEHpHUH$HUHT$HUHT$HEHMHUHEHH$uHEHHpHHHpH{HHHĸ[]UHHH}uUHEAAH¾UHHH}HEHuH2HEUHHH}HE@uHEHqUHH}HuHEHUH HHJHHHRHPHE@]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacityavailable commands: - help - exit - show info - show fiber - show configuration - show slab - show palloc - show stat - show plugins - save coredump - save snapshot - lua command - reload configuration - show injections (debug mode only) - set injection (debug mode only) unknown command. try typing help. - { item_size: %- 5i, slabs: %- 3i, items: %- 11li, bytes_used: %- 12li, bytes_free: %- 12li } slab statistics: classes: items_used: %.2f%% arena_used: %.2f%% ... --- ok fail:%.*s info: version: "%s" uptime: %i pid: %i logger_pid: %i snapshot_pid: %i lsn: %li recovery_lag: %.3f recovery_last_update: %.3f config: "%s" %s:%*s{ rps: %- 6i, total: %- 12li } statistics: can't save snapshot, errno %d (%s)can't find error injection '%s'admintbuf_ensureY@ -a4=*8int b i ({  M# M# # #  O f b piW{] 0?1F3M78(*,b#,b#,b#,#cb,#,# b079b#9b#9b#9#cb9#9# fd;b#(<b#,b0A:Cb#Cb#Cb#C#cbCP#atC# E#(JJb:rrsp# #ctx$# %# &-# #% $# %# &^#)5 -^ .^# /^#5 M O#cswQb# R# T#(fidVt#0sid`t#4 b5#8 c5#Hfi5#X j#` kt#x l;#//$d (, -5# .5# /5# 05# 15# 5 6-# 7-# A )  +t# -t# /# 0# +6 -# .-#F`it r L#  6# A# W# #?{.bt 4 5#lsn65#d 0Gm Hr# I# J# K# K#(N SlsnT5# T5# V# W# X# Y#( Z#0 [#8 c#@ d#H eb#P fb#T gb#X h#` i#h jm#x l#|+ =b @G# Cr# Iy#0 J#8 R #@ S#H V#PevX#w w b} rb % '# )5# +# (5 7#buf8#pos:#end<# >-# `$  ky m# o-#posq-# sy #iovz #8 {  {H ǽ  # Ǧ #in #out$ #0 2  T- U5#outV- # $ =&#>#&n z 1 % + 1 7 1 1 b!: 1 = 3 ";C  1 = #&$b$$  &$&$&&3 $3 $ $3 %7 &e7- h'7-`()   { %> &b>- h'>W`&len>-X*Nd 'Nd h&bufN`&szN-X'N-P%q 'qd h&bufqW`&szq-X+N- 'N h *)Y')d X&buf) P&sz)-H(,n,h*Zb'ZX'ZP(,ctx\h %m&outm- H(-o `-pP.endL&out- h%{&out- h.ok&out- h%&out- h&err- `%5&out- X(-h*b'X&rpsbT'5H&ctx@(,buf- h-bd/&buf- h*b&'d ' &L 00]0 0\000[00Z00Y000X00W00V000U000T00S0100R0100Q00v00P00O000-0N00z0M0L0j0b0K0e0J0X00I0N00X0H0D00G0:0F000E0&0D00C0}0p0B0 00A00o0@00?00n00>00=00<00m0;0000:0a0090!0q0008070060050040300u020w0j010m000000c00/0Y0.0O00|0-0E000,0;0000+01000*0'000)00000(00f0'0 000&00000%000$00#0"0l0l0!0)00 0)000k0000000000~0d0?000q060000{000z00>0h0y00{0x00q0w000g0v0$0 0000V0\00M0t00s001st9;0r0000<20=2090:2000 0H0B222070D1st7>00<20=2090:2000 0B222070D0>1st8100%0i0z0 1st60 1st50p0 0D0g1st4 0 1st30f0 03st00000R0000H0]3st20c00b00O000700a000*0`0_00^0(,in P,out- H,err- @,csb,p̏h,pȅ-͏`-͏X-4%5retb65retb7W~'8apW/~(9Y9Z 5L[ X9\b9^3 ~:^_ #` #a #;&&  ;&& % &;' ' <('=5'h + () h) h#) h#>u'?uh?ubd(9w *C3 '(#&'C&@ 5(J(AJ(A 1 B'(q(z(C5(h@] ((AJ(Dfun&( % Ez(((C(hC(`FDG<( )HGy(G3";)bbIG>H))GoG %bG!)bG!+G!,G"+) Go)Gb-; -M -S -T -U -W % : ; I$ > $ >   II!I/  : ;  : ; I8 &I : ;I & : ; : ;I8  : ;I8 I : ;(  : ; I8  : ; < I : ;  : ;  : ;  : ;  : ; I8 2 .: ; < c dI4 .: ; < d!.: ; 2 < c d".: ; I2 < d#/I$ I%.: ; @B &: ; I ': ; I ( )4I4  *.: ; I@B +.: ; I@B ,4: ; I -4: ; I ..: ; @B /.? : ; @@B 0 : ;1 : ;2 : ; 3 : ; 4 U54: ;I 6 U7.: ;@B 8: ;I 94: ;I : : ;;.4 < d<.4 @dB =I4  >.? : ;@@B ?: ;I @.G dAI4 B.1@dB C1 D: ; IE.1@dB F4: ;I? < G4: ; I? < H!Iwwtvtuwuvwvywyvwww/v/0w01w14w4ivijwjkwknwnvwww v  w  w wvwwwvwwwvwwwvwww3v34w45w58w8vwww7v78w89w9<w<vwwwvwww 8v 8 8wm8n8wn8q8wq8 :v ::w 8 8w 88w8l8vl8m8w::w::w:O:vO:P:wP:Q:wQ:T:wT:q:vq:r:wr:s:ws:v:wv::v::w::w::w::v::w,:  B yJ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includesrc/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/luatbuf.hcoio.hiobuf.hcoio_buf.hadmin.rladmin.ccscoped_guard.hstddef.htypes.hstdarg.hstdio.hunistd.htypes.hstdint.hev.hcoro.hcoro.herrcode.hrlist.hfiber.hsalloc.huio.hsockaddr.hin.h recovery.hsio.hevio.hlua.h tarantool_ev.h say.hstat.htarantool.hinit.h 7&/1=g'!Y .u%!.=$[.'Y.=/+gK,. OY2ZM\pY2Y2Y2$2Y1XXu2g<Y2Y2=/"DYy~< <<<,<<<;(<<<<$<<<<<< >tr146tr147_test_eof25st30st31st32st33st34st35st36st37st38st39snap_io_rate_limit__gnuc_va_listwal_watchertr154total_usedst40st41st42st43st44unsigned charst46st47st48SERVICE_NAME_MAXLENtr164tr165tr168tr169recovery_lagunknown_commandst50st51st52st53st54st55st56st57st58st59GNU C++ 4.7.3tr172tr173WAL_FSYNCst60st61st62sle_nextst64st65st66st67st68st69itemsuint64_t_test_eof40st70st71st72st73st74st75st76st77st78st79confirmed_lsnstackst80st81st82st83st84st85st86st87st88st89ibuf_unusedibufEVBREAK_ONEva_listst90repeatst92st93st94st95st96st97st98st99log_dirlinkcb_ctxtr98sizewait_lsnev_iosize_t_test_eof62uint8_ton_binditem_sizetarantool_coroaddriovec_test_eof2_test_eof3_test_eof4_test_eof5_test_eof6_test_eof7_test_eof8_test_eof9_test_eof79recovery_last_update_tstampslab_cache_statsadmin_first_final_test_eof10_test_eof11_test_eof12_test_eof13_test_eof14_test_eof15_test_eof16_test_eof17_test_eof18_test_eof19on_bind_paramlua_State_test_eof20_test_eof21_test_eof22_test_eof23_test_eof24slabs_test_eof26_test_eof27_test_eof28_test_eof29coio_service_test_eof30_test_eof31_test_eof32_test_eof33_test_eof34_test_eof35_test_eof36_test_eof37_test_eof38_test_eof39TNT_ERRMSG_MAXadmin_en_mainwatcherthis__ssize_t_test_eof98_test_eof41_test_eof42_test_eof43_test_eof44_test_eof45_test_eof46_test_eof47_test_eof48_test_eof49errstrtarantool_LWAL_NONEEVBREAK_CANCEL_test_eof50_test_eof51_test_eof52_test_eof53_test_eof54_test_eof55_test_eof56_test_eof57_test_eof58_test_eof59Functortr13tr14salloc_stat_admin_cb_ctxcoio_test_eof60_test_eof61errflags_test_eof63_test_eof64_test_eof65_test_eof66_test_eof67_test_eof68_test_eof69st100st28st29ev_timer_test_eoftr20tr21tr25tr26timername_test_eof70_test_eof71_test_eof72_test_eof73_test_eof74_test_eof75_test_eof76_test_eof77_test_eof78evio_service__iobuftr33tr34tr36tr37fp_offsetgp_offset_test_eof80_test_eof81_test_eof82_test_eof83_test_eof84_test_eof85_test_eof86_test_eof87_test_eof88_test_eof89tr102bytes_usedsizetypetr43tr44_test_eof90_test_eof91_test_eof92_test_eof93_test_eof94_test_eof95_test_eof96_test_eof97typedef __va_list_tag __va_list_tag_test_eof99short unsigned intsigned charstartastat__coro_refst45st49TIMEOUT_INFINITYWAL_MODE_MAXtr67tr68current_wal_Z9show_statP4tbufstateoperator()waiterfailshow_stat_itempathtr76tr77scoped_guardadmin_dispatchst134admin_portlong inttr91tr92fiberm_activetr99row_handlerst63ev_watcher_liststack_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcm_funhelpcoroin_addruint32_t__pid_tshow_statlong doubleiov_lenWAL_WRITElong unsigned intev_tstampboolcoro_contextcharsin_addrtr153wal_dirlogger_pidiobufin_addr_tcfg_readaheadcookiecfg_filename_fullpathst91finalizeev_rt_nowrequiredint64_t_outadmin_startadmindoublessize_thandler_paramtnt_error_codesdatacoio_read_aheadpalloc_poolstat_max_name_lenhandlerst101st102st103st104st105st106st107st108st109_sayst110st111st112st113st114st115st116st117st118st119guardst120st121st122st123st124st125st126st127st128st129long long unsigned intpid_tst130st131st132st133errcode_recordst135st136st137st138st139poolcoio_bread_test_eof100_test_eof101_test_eof102_test_eof103_test_eof104_test_eof105_test_eof106_test_eof107_test_eof108_test_eof109st140st141show_slablog_ioadmin_handler_test_eof110_test_eof111_test_eof112_test_eof113_test_eof114_test_eof115_test_eof116_test_eof117_test_eof119__in_chrg_test_eof120_test_eof121_test_eof122_test_eof123_test_eof124_test_eof125_test_eof126_test_eof127_test_eof128_test_eof129writerlong long interrdesc_test_eof130_test_eof131_test_eof132_test_eof133_test_eof134_test_eof135_test_eof136_test_eof137_test_eof138_test_eof139__coioused_test_eof140_test_eof141EVBREAK_ALLiov_basewal_mode__FUNCTION__on_acceptScopedGuardcoro_refevents_Z10admin_initPKciunsigned inttbuf_ensureScopedGuard >tarantool_infoactiveshort intadmin_initprevrows_per_walslab_arena_statsflagscfg_filenamef_dataGCC: (Debian 4.7.3-4) 4.7.3zRx uAC p <|AC w \?AC z |:AC u 1AC l oAC j AC  zPLRx  $AC  @$AC _ `$AC _ <AC w NAC I AC  qAC l 5AC p  ,1AC '1 @cAC ^ $hAC H BAC } "AC ] ,AC g  4AC o .symtab.strtab.shstrtab.rela.text.rela.data.bss.rela.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @:(+;&801@; ;@;6hCD*ZBDA*UP] fnt{r@z0P70 z`K{N7007X` / p u 6u|B?b0:}j1o $"$2<?4NQk8q,1 8cm8P:"Yr:,:4r:,2:4t    BZf{ $:GN`5s 6?Tjv*7:BJadmin.cctbuf_ensure_ZZ11tbuf_ensureE12__FUNCTION__tbuf_append_ZL15coio_read_aheadP5ev_ioPvmm_ZL10coio_writeP5ev_ioPKvm_ZL11ibuf_unusedP4ibuf_ZL10coio_breadP5ev_ioP4ibufm_ZL4help_ZL15unknown_command_ZL20salloc_stat_admin_cbPK16slab_cache_statsPv_ZL9show_slabP4tbuf_ZL3endP4tbuf_ZL5startP4tbuf_ZL2okP4tbuf_ZL4failP4tbufS0__ZL14tarantool_infoP4tbuf_ZL14show_stat_itemPKcilPv_ZL14admin_dispatchP5ev_ioP5iobufP9lua_State_ZZL13admin_handlerP13__va_list_tagENKUlvE_clEv_ZL13admin_handlerP13__va_list_tag_Z17make_scoped_guardIZL13admin_handlerP13__va_list_tagEUlvE_E11ScopedGuardIT_ES4__ZN11ScopedGuardIZL13admin_handlerP13__va_list_tagEUlvE_ED1Ev_ZZ10admin_initPKciE5admin_ZN11ScopedGuardIZL13admin_handlerP13__va_list_tagEUlvE_EC1ERKS2__ZN11ScopedGuardIZL13admin_handlerP13__va_list_tagEUlvE_ED2Ev_ZN11ScopedGuardIZL13admin_handlerP13__va_list_tagEUlvE_EC2ERKS2__ZL11admin_start_ZL17admin_first_final_ZL11admin_error_ZL13admin_en_mainassert_failtbuf_ensure_resizememcpyTIMEOUT_INFINITY_Z23coio_read_ahead_timeoutP5ev_ioPvmmd_Z18coio_write_timeoutP5ev_ioPKvmd_Z12ibuf_reserveP4ibufmtbuf_printf__gxx_personality_v0_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2__Unwind_Resumetarantool_versiontarantool_uptimegetpidlogger_pidsnapshot_pidrecovery_statebox_infocfg_filename_fullpathcfg_filenamestrlenstat_max_name_len_Z9show_statP4tbuf_Z12stat_foreachPFiPKcilPvES1__GLOBAL_OFFSET_TABLE_fibertbuf_newmemchr_Z13slab_validatev_Z13tarantool_luaP9lua_StateP4tbufPKcreload_cfgcoredumpsnapshotstrerror_Z17errinj_set_bynamePcbshow_cfg_Z10fiber_infoP4tbuf_Z11errinj_infoP4tbufpalloc_stat_Z17show_plugins_statP4tbuftarantool_LluaL_unref_Z10evio_closeP5ev_io_Z12iobuf_deleteP5iobuf_Z15session_destroyjlua_newthreadluaL_ref_Z14session_createi_Z8iobuf_gcP5iobuf_Z8fiber_gcv_Z10admin_initPKci_Z17coio_service_initP12coio_servicePKcS2_iPFvP13__va_list_tagEPv_Z18evio_service_startP12evio_service" , 1 J6/o01 2*3G2d45` m6 %6  8# B06 X69 n6 s6 x"6c |p6 6: 6; 6<  6= (6.>7 D6K?X e6l?|? 6?? 6@AB% 26_ChD . 06 X6 8FHIH,IJ   p K  C 4 Ls M N O P h+ 6{ Q  6 Q  6 R S TE Uo V E KDLCVLMQNzOP h6 Q  -6Q 6RDSTUVXE77C7"8W/8X?8YR8ZY8Hg8[19W99\D9WQ9]9^9_9`:9,: m86: ;: @:bE: J:ch0 B '] (A08@H8PwX`hpRxDlGC?~- c(08@AH|PX`"hapxX=|4 j   !*!u!!"B"t" "("0'#8]#@#H#P#X5$`k$h$p$x%^%%%&C&&&'?'~''';(u((()Z))) *(S*0*8*@*H5+Po+X+`+h ,p:,xp,,,--l----.F.n.../\///0N00 k(08@HPX`hpx+ & +2 + +c !:) *. +; + B +I +! P +-W +4 ^ +l + q + ~ +~ +@ +! +U + + + + + +< +# +1 + 6 +C +_ +j +su +  + + + +H  + + +> + +  +- +< +K +>Z +w + + +  + + +> ++ +I` +f +0l +u +  + + + + +X  + +  + + . +6 +B +P +e +# q +- +  + + +  + +  +  +B +lN +\ +[j +x +s  +N + + + +n + +^ + +F + +( + 7 +RB +M +NX + d +Rs +F + + +& + +7  + +  +u' +5 +gC +fQ +_ +Pn +z + +  +L + +r  +$ + +  + +5 + +3 +u +7 # +1 +B? +M +[ +i +w + + + +x +" +d + + +  +G + + +* +8 +F +A + + +# + ++ +F +^ +|% +2 +F@ +\ +^ +H +e + + + +w  +v4 +F@ + O +) ^ +{ + +Y + + +e J +:P X u` 'v +  s +  +| u  '` + +  0# '- + V +?k +Gq 0y j '  + + j  ' ++ +K   ' + ;CZ +d lt '@~ + + + ' + +F $,4 'M +@ S[c '`4 ' + 4 '  +~8 '6& + 6 + @8HP 'Z +G v + O +f +  +  '@ +  8 ' + ( +HD +K..T +1 [4d +k$t +% {4 +# +7 + 4 +# + 4 +{# + 4 +E# + . + 4$ ++ 74 +D;4D +K6T + [4d +k"t +{6 + t4 +" +\" + g4 +*" + Z4 +! + ! +| M4 +!$ + +!4 +p ;@4D +K#T +[-d +k]!t +d {34 +! +X &4 +  +6 +W+ +L 4 +$ +  +  4 + 3$ ++R 4 +;,D + K3T + [D5d + k3t +x{ +6 + 3 +s +6 +X, + 3 +nd +6 + 3 +C %$ ++34 +`;D + K3T +[[d + k3t +V{h +Y 3 +^|6 +5 +M }3 +( +o7 +A p3 +# +} 5 +5 c3$ ++4 +) ;V3D +KIT +p[5d +|ke7t + {I3 +  + <3 + + /3 +  +c5 +"3 +-@ ++ ' +d$ ++34 +}; D +K)T +[3d +k$t +{  +\  + ' +2 +2 + +2 +K +2 +W  +z2$ +n+24 +;D +K6T +b[2d +kft +J{5 +V2 +' +n'' +7 +l0 +2 + +y7 +  2 +=$ ++y24 +8;jD +[K)T +Q[o6d +kl2t +3{+ +bQ7 +(D/ +_2 +. +C( +UG7 + / +R2 +)  +H=7$ +.+~/4 +;E2D +$KnT +=[(d +;k37t +{82 +/ +.)7 +V. +!7 ++2 + +_j& +2 +  +1#($ ++-4 +;2D +KT +[-d +kt +~{* +2 + T +T- +y1 +6 +m1 +a1 +V5 + , +1$ ++}4 +;6D +OK1T +[:d + k1t + {t + 5 +- +sf' +C1 + + +k6 +71 +{  ++1$ ++64 + ;75D +K+T +[1d +qk_t +{5 ++ +1 +I  +:/ +Db6 +u1 +D +7U6 + h1 +n%$ + +k54 +*;H6D +K[1T +:[hd +k;6t +{N1 +5) +.6 +l;* +A1 +0 +!6 ++ +ru* + 41 +f)$ ++'14 +&;{D +ZK+&T +[1d +!kEt +{6 + 1 +5 +OB) +91 +5 +I) +.0 +# 0 +F D$ +* 3 +: C +pI R +Y b +ki `r +_x 0 +  +m [ +2  + + + y + K +  + ~ +< !5! +2 !!%!i.! +5!0>! +@E! N! +T! ]! +d![ m! +/s!1 |! +! ! +e! ! +Y! ! +!n ! +o! ! +!K ! + ! ! + ! ! + "k " + " " +7 " (" +- /" 8" +?" O"X" +r _" h" +m o"o x" + "x5" +i"&" +"0"* " + "0" " +d"&" +"0" +"# + #^5#(# +/#0?#H# + O#Q5X# +_#0h# +o#7~#_# +## +o#[7# + #,# +U#%# +## +v## +?## +P#%$ ++$$l&$ + -$*56$ +# =$7F$ + M$5V$ + ]$.f$ +m$",v$ +U}$|)$ +7$]($ +D$F%$ +4$/$ +a $5$ +@$60$ +x$*$ +$$$ +U $5% +I %4% +%.&% += -%46% + =%S$F%N%8% +% +% + % )% )0& + &m8&:& '5&8=&:F& + V& +Hs& + & + & +L & +& + ' + ' 8'm8' '`)' +;'8C'k8L' + Z' + j' +H' +' +':'P:' '' +3' + ':'N:' +'' +'P:'r:( ' ( +e ( +6( +;@( +xT(r:\(:d( '( +;(:(:( '( +( +a ) +) +=<) +aO) +# \) +i) +v) +) +m) +) +$) +X) + )) +)) +)* +}** +#*,* +%8* % @u`0j   7 ) Dd48$D 8dm8m :P:r::cpu_feature.c.o/1378727469 1000 1000 100664 6496 ` ELF>@ @@UHAVAUATS}HuEADAAADe܉]DuDmH}t HEU؉E[A\A]A^]UHSH8}HuHUHMLEE%EEy;Es$EH}؉HEЉ0HEȉHEH8[]UH}HuUHEEƉ8EHE}muԋE]UHH0}HuЉU؋EEE؃EHEHEHEHE܉HH8EHE}mu҃}tUHMEHΉIE܋EUHHHuHMHUHEIHƿu E%int7z7z7z|7L|7H|7D|7@7 S7TH@7d7o crc7ol7`77h ) Go\ crcGoL bufG@ lenG7HI7lJ7\K\`> _axa7lbxa7hcxa7ddxa7`% $ > $ > : ; I.: ; ' I@B : ; I 4: ; I  I .: ; ' I@B  : ; I &I .? : ; ' I@B  .? : ; I@B 4: ; I wwPvPQwQRwRUwUvwwwvwww|v|}w}~w~wvw,R /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/compat/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/syscpuid.hcpu_feature.ctypes.h ( #u= =vY~t2qzX =3!2q3zX gj=2$viquotientiremainderdatalong long unsigned int__sigunsigned charlong unsigned int__eaxshort unsigned int__level__ecxsse42_enabled_cpu__extcrc32c_hwcrc32c_hw_byteunsigned int__get_cpuidu_int32_t__get_cpuid_maxsizetypelong long int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/cpu_feature.cGNU C 4.7.3short intptmplong intchar__ebxsigned char__edx_BoollengthGCC: (Debian 4.7.3-4) 4.7.3zRx $QAC GE  DmAC Ec hAAC | ~AC y  BAC } .symtab.strtab.shstrtab.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame@!'1,`@=K[0V0oVj {0 0   x @ VQQm+A   :~D}Bcpu_feature.c__get_cpuid_max__get_cpuidcrc32c_hw_bytecrc32c_hwsse42_enabled_cpu F % , 73 ]: A EH uO R] ad k jp }  Q 1 W o x   Q& `0 p> WL oZ xi x      } 2 @ N \d ~n}v~    HQl}replica.cc.o/ 1378727470 1000 1000 100664 56416 ` ELF>8W@@c`!#%(*,.2468:<>?ABDEGHJKMNUHHHEE]UHH}HE]UHHH}HEH@(HtHEH@(HUHH}HE@(]UHH H}HuHUHMHUHuHEHUHH H}HuHUHHUHuHMHEEHUHH}HEH@HHEH@HH)H]UHH}HEHPHEH@ HHHEH@HH)H]UHH0H}HuHUHUHEHHHEHHHEHpHUHEHHEHEHPHEHHEHPHEUHSHHH}HuHUHEHHEHEH HH)HHEH}~/HcHEHHHUHMHEHHHEH@H@HHEH]HEHHH)HHEH}~HUHMHEHHHEH@HEHE؉HEHEHPHEHHEHPHEHH[]UHATSH@H}HuHUHMHEعHHEHHUHEHHHEHHMHEغHHHEHHMHEغHH1HEHU9tuLD$TH$AATAҿHùTHHL AVALHEIAWAIHLHH@[A\]UHSHHhHh0s0HhHPHhHHhJHh HhHPHHJHhHJHHEHEEEHpHHEHpHZtZH}uHdHHHHEHEH@HxHEH@8HHUHpHHHHEHEHUHMHpHHHEȿHEHEHX8^`HEH`@ `\f(C HEHX8#XHXHC(UHMHEHH?HEHHt-HtS HHHHHHEHEHHpHHHEHEHHHHUHEtlHEHt0LHEIAALAAAEHpHHUHH0H}HuUHEHH@HEHEHftHEH@@HUHJHUHuHt3L AAѿHUHEHHUHSHHxHpHxH@8HtLHpIAAHpHEHѺHǸHEHHEHMHUHpHǸE}tHUHEHHt@HHUIAH0fEEfHHHEHHxH@8HxHEHHǸ#HtHHEHHĈ[]UHHH}L AAHEH@8H@HHEH@8UHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH(none)can't connect to mastercan't write versioncan't read versionIllegalParams%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replica.ccremote version mismatchsuccessfully connected to masterstarting replication from lsn: %lican't read row%swill retry every %i second*(uint16_t*)(row + sizeof(struct header_v11)) == XLOGreplication failure: can't apply rowr->remote == NULLinitializing the replica, WAL master %sreplica/%s%31[^:]:%irc == 2inet_aton: %sshutting down the replicarecovery_follow_remoteremote_apply_row?UHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH1^1}}!>8}UHHH}HEHHEHt HEHUHHH}HEHHEH9Exception20FiberCancelException13IllegalParams6Object11LoggedError11ClientErrorint (Q 0c 1u 3 7 Q Q Q mՙ  +4 -# .# z       u  J         ! ) + , . / 2 3 : ; <    `j| { U#  z# J# `# #c?(*Y,?#,?#,?#,#cb,o#,i# ii?Y079?#9?#9?#9#cb9#9# fd;?#(<?#,  ?ur7  .B?[| 4 58#lsn6F# M8 O#cswQ?# RJ # T5 #(fidV|#0sid`|#4 b #8 c #HfiL #X jl #` k|#x lR # 0G H{# I8# J# K# K#( N     SlsnTF# TF# V&# W# X# Y#( Z#0 [#8 c#@ d#H e?#P f?#T g?#X h#` i[#h j#x l#|(I&dirJ#fK # M # N# O?# P #$ R#  0 1# 6# 9?# :# ;# <#,>70  ?# # # # # #(#0#8#@#H#P#X : #` @ #h ?#p?#t#xu#1#F #V #&#/#0#1#2#3#5?#7\ #(    # # # # . . # 4 # ?#  V  l O '   )   u v|#lsnwF#tmx# leny|# z|#( D spD # # ctx$ # %# &# # $# %# &X# )   )      -) .) # /) # / F F  ;  +g { (5 75 #buf8#pos:#end<# ># ` k$ m5 # o#posq# s$ #iovz4 #4  D HĒ h ǒ # Q #inm #out #0D @#B !logG  "    ?$##4##6##9#$'w~ !log, %/ %1 "  ?  & '#"FM (&cp  ?* )+ s00#* u ""  ?h#*Zf "0w  ?+,"  ?0+0+?- .++/G0}ww1t}h 2M334}5h4}5h6$(3(34S\5h45h7y1fy8h6U3345h4AJ5h6fhZo3o34J5Zh4J5Zh0|1ev|hu7cX8ch1bufc`1szcX9q8qh1bufq `1szqX0G8Ghm 0N8Nh7 Cz8 CX1buf CP1sz CH:;n Fh< ,8 ,8 ,8 , :;in .X= /P= 6H;row =@D |9 D8 DH8 Dg @8 EF1err E>= O|\9 [1ap [F ~:;r ]H= ^u~= _X= `W= aD>;err f?g= q|;row r@~;e }>;e ++9 -1r X1row P8 |L:;lsn FhA= =-B *1r ~8 ~:= *= ~= ?;rc ?T;f 8X= `AJ = > :COH:J:B 1r Ɣh6s3345h4 5hDDE<%E%7| GFEy<t??-E>TEo8E?% UR$ > $ > : ; I  II!I/  : ;  : ; I8  : ;  (  : ; &I : ; : ;I8  : ;I8 I : ;I : ; I8  : ; < : ; !I/& : ;  : ; I8 2 .? : ; < d I4 !.? : ; @L M < d".? L 4 < d# : ; I8 2 $.? : ; @I< d%.? : ; 2 < d& : ; ' I8 4 (.? : ; L < d).? : ; @I< d*.? 4 < d+ I,< -. I/.: ;I@B 0.: ; I@B 1: ; I 2.G d3I4 4.1@@dB 51 6.G: ; d7.: ; I@B 8: ; I 9.: ; @B : ;4: ; I <.? : ; @I@B =4: ; I > U? @ UA4I4  B.? : ; @B C4I D4: ;I? < E4: ; I? < F!wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwvwwwvwwwvwwwvwwwvwQ 1&=&=&=&=&g /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hlog_io.hobject.hexception.hfiber.hevio.hcoio.hiobuf.hcoio_buf.hreplica.ccstdint.htypes.htypes.hstddef.huio.hsockaddr.hin.hrecovery.hsocket_type.hstdio.hlibio.hstdarg.hcoro.h coro.herrcode.hsay.hrlist.hsio.htarantool_ev.h Ku|Kz. Y/e.=u .=$T.3' s.=/+gK d.KuuiuhgKy0wu?$")0TN/0vKv焟YuL0Lɟ;ZiXXYg0/LwdX,/>#3/23%O$f@==׭k%)= % % ## # #  #  # _vptr.Object_ZN9ExceptionD2EvIPPROTO_EGP_ZNK9Exception3logEvsize_tiobuferrflagssizetype_ZN11LoggedErrorD0Evf_data__ssize_twarning_saidwritersin_familysin_addr_IO_save_endIPPROTO_MTPcfg_readahead__vtbl_ptr_typeSOCK_RAW_Z15remote_read_rowP5ev_ioP5iobufPj_IO_write_baseIPPROTO_ENCAPIPPROTO_ROUTINGstate_lockwatcher__in_chrgLOG_READ_IO_save_basepalloc_poolfilename_extdirnameEVBREAK_ALL_chainssize_tremote_read_row_cur_columnrecovery_lagLOG_WRITEcoro_contextIPPROTO_UDPremoteSOCK_DCCPlong intSOCK_RDMS_DEBUG_IO_markererrstr_ZNK9Exception6errmsgEvev_iofiletypeEVBREAK_CANCELpanic_if_errorlog_modein_addrsigned charuint8_tIPPROTO_IGMP_IO_FILEfilenameoperator=SOCK_SEQPACKET~LoggedError_ZN6ObjectD2Evunsigned charsync_is_asynccoroS_WARN__FUNCTION__default_version__gnuc_va_list__socket_typeIPPROTO_IPcharSOCK_STREAMcapacity_IO_lock_tIPPROTO_PIMsockaddr_insin_portrowsIPPROTO_IPV6flags_IO_read_ptrwal_fsync_delaysay_levelIllegalParams_posip_addrev_tstampsin_zeroException_markersm_file_ZN11ClientErrorD0Evsnap_io_rate_limitin_addr_theader_crc32cIPPROTO_NONEreader_offset~ClientErrorserver~ObjectS_INFOrecovery_last_update_tstampSERVICE_NAME_MAXLENIPPROTO_DSTOPTSIPPROTO_ICMPIPPROTO_ESPIPPROTO_UDPLITElong unsigned intfinalizeObject_ZN11LoggedErrorD2Ev_flags2retrysle_nextIPPROTO_MAX_IO_read_baseIPPROTO_HOPOPTScoio_breadnheader_v11IPPROTO_RAWlast_stack_frameremote_addrm_linelinkthisactive_unused2pendingiov_lenXLOGfp_offset_old_offset_sayIPPROTO_RSVPm_errmsgWAL_FSYNC_DELAYlong long intva_list_ZN13IllegalParamsD0Evreconnect_delayrecovery_stop_remoteIPPROTO_ICMPV6iovecdoublestack_IO_write_endgp_offsetWAL_NONEIPPROTO_DCCPaddrrowlen_IO_buf_baseerrcode_recordunsigned intev_watcher_listtnt_error_codesIPPROTO_FRAGMENTGNU C++ 4.7.3LoggedError__pad1__pad2__pad3__pad4__pad5WAL_WRITE_sbufcookie~IllegalParamsstack_sizeSOCK_NONBLOCKoverflow_arg_arearemote_apply_row_flags_ZN9ExceptionD0EvS_ERROR_modewal_watcherdata_crc32cerrdescrecovery_follow_remoteIOBUF_IOV_MAXwait_lsnIPPROTO_TPrecovery_statewal_dirboolis_inprogresslog_ioevio_is_activelong doubleTNT_ERRMSG_MAXibuf_sizeremote_connectFILE~ExceptionwaiterSOCK_DGRAMconfirmed_lsnIPPROTO_SCTPrequest_lenIPPROTO_PUPwal_writersizelong long unsigned intsa_family_treg_save_areauint16_t__off_tpoolto_readIPPROTO_IDProw_handler_paramClientErroribufversioninitial_lsnWAL_FSYNC_IO_backup_base_shortbufTIMEOUT_INFINITYgc_poolopen_wflags_next__off64_tIPPROTO_GRElog_dirobufrlist_ZNK20FiberCancelException3logEv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replica.ccev_nowrows_per_walIPPROTO_COMP_IO_buf_endSOCK_CLOEXECnameportwal_modeS_FATALSOCK_PACKETshort int_ZN6ObjectD0Evuint64_tmoderow_handlerpriorityFiberCancelExceptionsnap_dircurrent_walibuf_unused_vtable_offset_ZN13IllegalParamsD2EvSNAP_IO_read_endIPPROTO_IPIP~FiberCancelExceptions_addrIPPROTO_TCPuint32_t_filenoerrmsgcoio_write/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcfiberS_CRITshort unsigned intiov_basecoioev_rt_now_IO_write_ptrWAL_MODE_MAX_ZN6ObjectaSERKS_fiber_nameint64_ttarantool_corolog_formateventsnextdata_ZN11ClientErrorD2EvprevEVBREAK_ONEtypedef __va_list_tag __va_list_tagin_port_tpull_from_remotecoio_readnIPPROTO_AHGCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <AC I \1AC l |&AC a =AC x &AC a 2AC m =AC x &AC a <=AC x \&AC a |AC Q .AC i :AC u &AC a 1AC l oAC j  <AC E zPLRx $$AC G LAC HAC  $AC H WAC R 0=AC x  P&AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rodata.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rela.gcc_except_table.rela.rodata._ZTV13IllegalParams.rela.text._ZN13IllegalParamsD2Ev.rela.text._ZN13IllegalParamsD0Ev.rela.rodata._ZTV11LoggedError.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS20FiberCancelException.rela.rodata._ZTI20FiberCancelException.rodata._ZTS13IllegalParams.rela.rodata._ZTI13IllegalParams.rodata._ZTS6Object.rela.rodata._ZTI6Object.rodata._ZTS11LoggedError.rela.rodata._ZTI11LoggedError.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@a9Ha^Pa:Xab`a;hagpa<xakaa=aaia`a[aaaaaazaaaaaa Q x a&d , 0 6 110aP &K@0a!j =epHa# &0a%@ `=Ha(&00a*=`Ha, B&0a.,ht'ؔHa0C( > Ha2d=_hHa4F&0a6( Ha8( (Ha: p0a<  0Ha?*PRpMHaBu0HaEx0aHHaK72HaNV(Q8()aPb,u0L p`aS9 aU:aWE<aY06B} 0OOOpa^@So bY ^ !#%'&$2(*,.=VXl.r:&1+o0D+EV'@' 02468:<>?ABDEGHJKMNPRSUWY[]^+ \     BL"1[!< gn"1}"!&"#=!:("#="%&"(="(="*&.",=C!8(U",=j".&2Lr"4=!E ,F\br!?!B+7<D[d W!2("6&/G"4=^q!> !H!A!D!K!G(!J:!NL!Mreplica.ccev_now_ZL10header_v11PKc_ZL10fiber_nameP5fiber_ZL14evio_is_activeP5ev_io_ZL10coio_readnP5ev_ioPvm_ZL10coio_writeP5ev_ioPKvm_ZL9ibuf_sizeP4ibuf_ZL11ibuf_unusedP4ibuf_ZL11coio_breadnP5ev_ioP4ibufm_ZL14remote_connectP5ev_ioP11sockaddr_inlPPKc_ZL16pull_from_remoteP13__va_list_tag_ZL16remote_apply_rowP14recovery_statePKcj_ZZL16remote_apply_rowP14recovery_statePKcjE12__FUNCTION___ZZ22recovery_follow_remoteE12__FUNCTION___ZZ22recovery_follow_remoteE6remote_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorD5Ev_ZN13IllegalParamsD5Evev_rt_now_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Evpalloc_name_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Ev_Z16coio_readn_aheadP5ev_ioPvmmTIMEOUT_INFINITY_Z18coio_write_timeoutP5ev_ioPKvmd_Z12ibuf_reserveP4ibufm_Z15remote_read_rowP5ev_ioP5iobufPjcfg_readahead__gxx_personality_v0_Z11evio_socketP5ev_ioiii_Z12coio_connectP5ev_ioP11sockaddr_indefault_version_say__cxa_allocate_exception_ZN13IllegalParamsC1EPKcjS1__ZN13IllegalParamsD1Ev_ZTI13IllegalParams__cxa_throw__cxa_free_exception_Unwind_Resume_Z9coio_initP5ev_io_Z20fiber_setcancellableb_GLOBAL_OFFSET_TABLE_fiber_Z9iobuf_newPKc_Z8iobuf_gcP5iobuf_Z8fiber_gcv__cxa_end_catch__cxa_begin_catch_Z12iobuf_deleteP5iobuf_Z10evio_closeP5ev_io__cxa_rethrow_Z11fiber_sleepd_ZTI9Exception_ZTI20FiberCancelExceptionassert_failexitset_lsnrecovery_follow_remotesnprintf_Z9fiber_newPKcPFvP13__va_list_tagEsscanfinet_aton__errno_locationstrerrormemsethtons_Z10fiber_callP5fiberzrecovery_stop_remote_Z12fiber_cancelP5fiber_ZTV13IllegalParams_ZN13IllegalParamsD0Ev_ZNK11ClientError3logEv_ZN13IllegalParamsD2Ev__cxa_pure_virtual_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS20FiberCancelException_ZTS13IllegalParams_ZTI11LoggedError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoE_ZTS11LoggedError_ZTI11ClientError_ZTS11ClientErrorYIcP lmnNoulqos t  3KuVvf `l Fr T `w  `x y z{v  `v  `*|7}~ !a {p.>Scrwv " `v % ` ( T-2A}~ @ ` @v x `, 6 `; @GvW f `  D   `   v  , 9 `Y ^ e p }          } v  `?  [+\] \ `Z7\a \ e_7\f \ id7\j \H L p y  h7\y \jk ab ]^ 1 6O 6r  6  4- 54 6; 6 G 6 T 6 Y 6f 6k 6x x 6l } 6 6 66 6 6 6( 6V 6{ 6c 6 6@ 6G 6G  6 6 & 65 6JA 6hG 6M 6S 6Y 6_ 6e 6 k 6 s 6{ 6^  6X 6 6 6 6  6  6 6+  6 6  6c 6 6 6. 6> 6! 62  6 6r  6 6p  6 6 6   6' 6 . 6 5 6< 6C 6fK 6L V 6Xa 6m 6 | 6 6 6 6 6  6 6 6 6 6 6P - 6 J 6 v 6P 6 6 6P  6  6  6 % 6_+ 6 1 68 6D \ 6Zh 6 6_  6 6 6  6 6>  6t 6) 6? 6K 6Y 6}g 6u 6 6 6  6 6 6  67 6  6n 6  6w  6n  6} 6 6J+ 69 6D G 6 U 6Ec 6 q 6 6 6Z 6  6* 6 6?  6 6W  6 6- 6> 9 6nG 6U 6 c 6Vq 6 6 67  6 6 6 6 6 6 6  6r 6 6 + 6: 6I 6 X 6eg 6 v 6 6  6 6  6O 6 6 6  6 6D 6 6i0 6p@ 6wP 6~` 6p 6 6 6; 6( 6 6 6 6j 6} 6& 6"  6 6m 6Ux 6 6 6 6} 6\ 6 6 6b 6! 6 6) 6K 6 e 6s 6 6 61 6- 6M 6 6 6 6 6e 6 6 6 6K 6  6 0 6sa 6n 6 z 6 6t 6L 6F 6 6B  6tE 6GZ 6]i 6 6Y 6Y 6Q 6  62 6)A 6P 6.` 6 f 68 6+ 6 6 6 63) 67 63O 6r 63 6 6  6 6 6 61 6]L 6]h 6 6  6  6& 6 19A 2G 6QY$a 2` 6 6R 61 2 6' & 2  6 6R2 6 6 > =F 2a 6e m &u 2 6 $V 2@ 6 6R 6   = 2  60$,&4 2[ 6e 6Ry 6:}= 2` 6_& 2 6Vl 2   6g l% 2/ 6 Y 6 _go 2y 6  6 2@ 6  6 + 2 6  6+!) 23 6 \?d| 6 6 2` 6  6G 6 6  6 ' 6-5D= 2G 6 U 6c 6  4 6  6V DE 2 WE 6  6G 6 6t  404<I 6h 4` 4 6E 2l 6X 6# @D 65JR Z 2q 6  6  6 6  6 6  6  V 6\ dQ l 2, 6 6R 6 = 2 6]  & 2  6  6 + 6+H 6.u 6 6_  6(0<D`ht|##$001 (4<HP%\%d&      < < =      % %$ &@$H%T%\(h(pU|UV      < < =(0%<%D&`ht|<<=%%& V(W4W<ZHZPk\kdllmmpp$@HT\hp|**++,,/(/0<D`ht|CCD D(E4E<HHHPElEtFFII   , 4 @ H T \P hP pQ <<=          %(  %0  & 0 0@ P ` p !&;08@-H6`-h=pOx{=O{6Q 1&  =  &  = (&08=@H&PX=` h &t ; Q q @`  $ @`Vl +@o r D E P 4T iproto.cc.o/ 1378727470 1000 1000 100664 90600 ` ELF>@@b_!#$%')+-/468:<>@ACDFGIJLMUH}EUHHHHH ]UHH}HEH@HHEH@HH)H]UHH}HEHPHEH@ HHHEH@HH)H]UHH}HEH@]UHH}HEHPHEHHHHHHt HEH@HEH@]UHH}HuHEHPHEHHEHPHEHHHHHHEHPHEHPHEHPHE]UHHH}HEHHHuHEH0H#HuUHH}HE]UHH}HuHUHEHHEHUHPHEHUH HHRPHE@ HE@]UHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HEH@HEHEHPHEHPHEH@HUHHEHUHHEHHEHPHE]UHH}HEHPHEHH9uHEH@H;Eu]UHH}uHEUP4]UHH}HuHUHEHHEHHEHEHEHUHEH@HH)HHEHEH}~HUHEH@H9ruHUHEHHUHEHH)HH]UHH}HuHEHPHEHHEHPHEHHUHHHEH]UHH}HuHUHEHUHP0HEHUHP8]UHH}HE@(]UHH}HEPHHE@L9]UHH@H}HuHUHMLEHEPLHE@P9uHEH HHEPLHE@P9|HEHiEHEHHE@LHcHHHUPHEPLHEHUHHEHUHPHEHUHPHEHUHP}tUHH}HuHEPHHE@L9u|HEHHE@HHcHHHUPHEPHHEPHHE@L9uHE@LHEPLHEPHHEHUH HHJHHHJHHHRHP]UHHH}HdHHPHHEHHH'UHH0H}؉uHEH@HElHEHHt"HEHH!HEHEHHHEHEH@HƿHEHUHEHHǸHEHuUHH H}uHUHEUPPHE@LHEPLHEPHEHHHHHHHHEHHEHP HEH @@HEH @HEH@8HEHUHP0HEHUHPHEHHUHH@H}HEȋ0s$HEHPHEȋHHUȋJHUȉ HEHPHHJHUHJHHE20HEHHdHHHEHUHHUHEHH&uHUHHH}HEH@Ht9HEH@HH Hu HEH@HHHuUHH}HE]UHSHXH}؉uHUHHuend < i_queue->sizeiprotosession->input.fd == -1session->output.fd == -1iproto_session_is_idle(session)!evio_is_active(&session->output)IllegalParams%s at %s:%ireceived package is too bigfd >= 0iovcntevio_is_active(&session->input)session->sid == 0iobuf%s/%sprimarysecondaryiproto_enqueue_requestiproto_session_destroyiproto_process_connectiproto_flushiproto_session_on_inputiproto_session_create #`@L!qG;BE rD4z~{A,3l,5}} tUHHH}HEHHEHt HEHUHHH}HEHHEH11ClientError9Exception13IllegalParams6Object11LoggedError* <Vintch 0 1J 3(C  # # # # f}hf ?GM g g ] m ? A6# 8 :#eof<0#  g   t w# y# {# }# #  0 g%%gNUM # $]# %]# &#)VhC) (oid)# 0# 2# 9o# E# Tu#<VChC + -# .1# (5 7%#buf8+#pos:+#end<+# >1# `: k m%# o1#posq1# s#iovz#<CC pos1# 1# 1#H4  4# #in#out:#0%M / 0#len1# 2# 5hdr6M# 7# 8# @S U6#bufW# Y#svp[#(:(   $"&V#&V#&V#&#cb&8# 2 2 V"'(*,V#,V#,V#,#cb,#,#   VJ07Q9V#9V#9V#9#cb9g#9m# fd;V#(<V#, a a VQJ0ACV#CV#CV#C#cbC#atC# E#(   Vs(k V#V#V##cb # # { { V k r    sp # #$ ctx$ # %# &1# -M .M # /M #$ M O#cswQV# R # T%#(fidV#0sid`#4 b$ #8 c$ #Hfi #X j#` k#x l #    S J` f @ #  $ # 5 # K #  # C+  =G @# Cf # I #0 J#8 Rh #@ S#H Vs#Pev X# \ \ V b  f G X @ F" # K # P$ # U # WV#Hend WV#L YV#P i" k # l # n # o8 #  \8  bC I T "  w # ` # # 1# #  #8 #@ #psid #T MT  C< 6  # $ =>$# >g# &q}! " +! "" 1!!V# :! (6$ ;.! (%>$>$&>$&$$6&6&&6'$$$($#4]#6#9#)']! *log,4! +/! ] +1! 4,4!!V- $./#/"RY!?0&$o|!?!V/*!? E$1+K!? E's$<(<#2! /u! ] ],.!!V'h$(#2fr! ,<!!V&3)ZV!?,!!V<&<h 4C44&5V/657$$&&$8Y_t9t9Q?:Q;_h:Q;_h< =l>{,:?:h E>lz?zh?@$99Q:;h:;h@U2929Q: ]f;h: ;h@rh99Q:;h:;h<G1P=GPh<N1=NPh<1=h<VAbufh<CAbuf`BCsvphDgv= h<< Apos<]hEa=ahAbufa`Areqb XE8)=8)h$ EBl=B)h=B)`<b)=b)XBFd)h<V=)hE-Af-hAsiddS <eVAiove/ XAnwre1P=eHBFh/ h1EvAiovv/ h=v1`E e0= e0h= f `= gX < |ghAev |hh< g= hn G Q= X= P= H= @= 8 BHa F goF " `haCQ< g= XAout " PBF " hG = hG = H= VDBF `BCf -hBF X $ G = ɡh= Vd=  XG YAap  I BF hF @J $gK $ hL ,K , hJ B KK B]HMfd BVDK BBN D XH[ h[CKO [K [ hBH QO fK f hO ,K  XMfd VTJ  K  HBN  hN 1`N  XO #K  XMin PPMfd VLBN VlPN  `O  K hK VBN  XQfd VTH  RN  HQin P@Qnrd VBQe  h C % &J  ` K  hJ +V"!K + Mfd +VMsvp +"!BQiov ./ XN /VTH8! Qnwr 11HBS=!@h8!C (!% O I!K IhK JVBN L XQfd MVTQsvp N"!HT!N Q @BQe \!% O ha"Mout hXMreq h PBN jM`O q"Mout qMreq q Me r"BN tMPN uV\N vL"&EO #K HK <@Mout K  BN +XBQe #P"   O *%K " ~BN  XN  PN  HN ~N 6~U   #  #  #V{$$! V$$! >$V$$!W$?$hBH#hH#h#H#h#O %K " BN  XN  PQfd VLH% T%Qe %@BQe &PQe &Q"% % O >&K " hO &K 0Mfd VK b BN @N  `N hX v'K ]hK VdK V`RM'N  BN  D C6'%>$= C>$8''9'9QY''(;'h8`(.(9'Zfun &(([(P(a(;(h;(`@sq((9(9Q:a(((;q(h:a(((;q(h\A<\C<n)]\y) ;) V ] V ] ]6\>H))\W[)a)\V\^^D\,%\o-F -M F .) F ~n N  % UR: ; I$ > &I$ >  II!I/  : ;  : ; I8   I : ; I8  : ; ( (  : ; !I/<  : ;  : ;  : ; : ;I8  : ;I8 : ;I5I : ; : ; : ;  : ; I8 2 .: ; < c d!I4 ".: ; < d#.: ; 2 < c d$.: ; I2 < d%/I& I' : ; (I8 2 ).? : ; @I< d*.? : ; @L M < d+.? : ; 2 < d,.? L 4 < d- : ; . I8 4 /.? : ; < d0.? : ; L < d1.? : ; @I< d2.? 4 < d3< 4!I/5I67 I8.G d9I4 :.1@@dB ;1 <.: ; I@B =: ; I >.G@dB ?I4  @.G: ; dA: ; I B C4: ; I D.: ; I@B E.: ; @B F4: ; I G.: ; @B H4I4  I : ; J.: ;I@B K: ;I L.: ;I@B M: ;I N4: ;I O.: ;@B P UQ4: ;I R S4I T UU : ;V.4 < dW.4 @dB X.? : ;@@B Y.1@dB Z: ; I[.1@dB \4: ; I? < ]!^4: ;I? < wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw1&=&=&=&=& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/netinetobject.herrcode.hexception.hiobuf.hiproto_port.hrlist.hfiber.hsio.hevio.hiproto.ccscoped_guard.hstddef.hstdint.hstdarg.htypes.hstdio.hbox.hport.htuple.hsigset.hkey_def.hsay.huio.hev.hsignal.hcoro.h coro.hsockaddr.hin.h palloc.h % % u&.3'/.3#%.&!3fJJtY~.K$.KP.5.K+.<tX=..!/VttXNK6gu n.. 1/6!K &g3!u&!&Y3Y"Y41=xt .3/(76$fw.0#k;0I=XtY2.>u$LUgg7Ky<2 &$2"%cJ0Xɓ"gk"&K30v$"#p,D'3fu['gZg[uv]*g\yɥ;XtXLY3>"fv*2vg.r* Xyɾ/ZzJz_*gyX  tuuKYuu'wiy`*gcxX  *=v./A')') ɭX<ne .w$y tgXx" .02JM$ "j'=j'= z.kf#o.& &  ## # #  #  # SERVICE_NAME_MAXLENlong intoldbufrequestEVBREAK_ONEvtab__closurem_fun_ZN13IllegalParamsD2EvEV_CHECKfiber_set_sid__iobufoutputsessioncapacitytarantool_coroiovcntfield_type_MAXiproto_session_idiproto_process_connectpendingflagsUNKNOWNEV_SIGNALret_codeiproto_queue_is_emptyprocessiproto_enqueue_requestEV_IOadd_tupleunsigned intnextlast_stack_framem_errmsgSTRINGerrmsgEV_IDLEcoro_contextwaiterrefs_ZN11LoggedErrorD0Evevio_serviceprimary_portservicerequest_queueev_timeron_bindEV_FORKrlist_shiftS_CRITrlist_createGNU C++ 4.7.3newbufEV_EMBEDprev~ClientError__vtbl_ptr_typessize_tLoggedErrorfoundScopedGuardScopedGuard >errmsg_lenoperator()listsigned charEV_CHILD~Object_ZN11ClientErrorD0Evin_addr_tsentiproto_session_output_iobufmsg_codegp_offsetS_DEBUGwatchershift_ZN13IllegalParamsD0Eviproto_init_Z11iproto_initPKciiiobuf_is_idleiproto_session_on_inputoverflow_arg_arealong long unsigned intoffsetTNT_ERRMSG_MAXiproto_portobufevio_is_active_ZN6ObjectD0Evheadev_async_ZN6ObjectD2Eveventssin_familyprocess_funev_rt_nowm_line__headerev_watcherparse_sizein_port_tev_ioobuf_create_svpcoroEV_CLEANUPS_WARNsin_zeroEV_ERROR__gnuc_va_lists_addrsize_tsa_family_t_ZNK9Exception6errmsgEvS_ERROR__sessionsig_atomic_ton_accept_param_ZNK11ClientError7errcodeEviproto_queue_handlerscope_guardtuple_formatiproto_on_acceptS_INFOS_FATALiproto_replyiproto_process_disconnect_ZNK9Exception3logEviproto_queue_initiproto_process_requesttypesdummy_headerev_watcher_listcharEV_CUSTOMiproto_session_input_iobufmake_scoped_guard >tnt_errcode_valpalloc_pooleter_pool~LoggedErrorrepeatdatasio_move_iov_vptr.Objectiproto_enqueue_batchsay_levelmax_fieldnouint8_tsynciov_baseEV_NONEbind_ipaddriproto_queue_scheduleiproto_reply_pingcfg_readaheadIPROTO_REQUEST_QUEUE_SIZE_saytnt_error_codeserrdescva_listsecondary__in_chrgEV_STATlong long intobuf_sizefield_typesin_port_ZN9ExceptionD2EvEV_WRITEiov_lenbooltuplebox_process_roi_queueiobufiprotoFunctorClientErrorfiber_cacheto_readevio_service_on_bindoperator=sizeon_bind_paramparamsin_addriproto_session_on_outputheaderfield_map_sizerlist_emptyfiberpoolguard/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iproto.cc~IllegalParamsrestartev_tstampslh_firstactivem_filelong doubleuint16_tiproto_session_cacheExceptionthisrlist_add_ZN6ObjectaSERKS_on_accept~ScopedGuardsizetypereventsshort intiproto_cache_fiberEV_PERIODICf_datasecondary_portiproto_port_init~ExceptionpriorityEV_ASYNCiproto_session_destroy_ZN9ExceptionD0Evhandlernext_in_cachebox_processrlistport_vtab__ssize_tsockaddr_infp_offsetreventnamestackfield_countwrite_posIllegalParamsibuf_sizeiproto_session_shutdownlong unsigned int__sig_atomic_tEV_TIMEOUTIOBUF_IOV_MAXibufiproto_headerqueuereg_save_areaportibuf_unusedinputreplybodybatch_sizein_addrgc_poolbox_process_funcunsigned charm_activeIPROTO_BODY_LEN_MAXlinkiproto_reply_header/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srctuple_formatsuint32_tiproto_flusherrflagsiproto_reply_erroraddrerrcode_recordstatecallbackstack_sizewas_emptyitem_ZN11LoggedErrorD2EverrcodebsizeEVBREAK_ALLiproto_validate_headeriproto_session_is_idle__mptrobuf_svpshort unsigned intbeginiproto_port_vtabiovecEV_UNDEFsle_nextdoubleEV_PREPARENUM64format_idEV__IOFDSETEV_READiproto_requestEVBREAK_CANCELtimeriproto_dequeue_requestObjectiproto_request_f__FUNCTION__errstrsio_add_to_iovtypedef __va_list_tag __va_list_tagiproto_sessionmsg_pingprimaryiproto_session_create_ZN11ClientErrorD2Eviproto_queueobuf_iovcntEV_TIMERGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \/AC j |AC M AC O =AC x &AC a =AC x &AC a <=AC x \&AC a |&AC a 1AC l AC M BAC } XAC S DAC  <AC I \TAC O |!AC \ GAC B SAC N ;AC v AC R AC  <=AC x \*AC e |AC Q AC X AC  AC  :AC u AC  <AC  zPLRx $AC cAC ^ AC O  AC E AC   AC  $AC G hAC  AC  $PAC E AC  $AC E $$AC E  LAC G $ AC E $4AC E \AC W $|\AC HO $AC E $?AC z  AC  hAC  "AC ] ,AC g 4AC o =AC x  &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.text._ZNK9Exception6errmsgEv.text._ZNK11ClientError7errcodeEv.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rodata.rela.gcc_except_table.rela.rodata._ZTV13IllegalParams.rela.text._ZN13IllegalParamsD2Ev.rela.text._ZN13IllegalParamsD0Ev.rela.rodata._ZTV11LoggedError.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS13IllegalParams.rela.rodata._ZTI13IllegalParams.rodata._ZTS6Object.rela.rodata._ZTI6Object.rodata._ZTS11LoggedError.rela.rodata._ZTI11LoggedError.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@`hH`P`X```ih`p`jx``k```l`````````````` `&, 6110`P&K0`!e*>=H`%|&(0`'=XH`)&0`+$=H`-DD&?0`/_p&l .gH`2!( ~H`4"= H`6F"&h0`8"( H`:"( H`<## (0`>7 #V0#QXH`ApH# `#H`D##H`G##00`J #,#'`H`MK#*F`B`OWM_jKSe'-`RzjuTP`TkU`VlY8`X0ou0([`]Ќ8a ?! /#$%')+-/!/&5U1L`BwX2DvT!G @S;#>Zy=v*  X1z1.:U{w6Q2xcJey1$a 01m ? } )[v\11 GLta(\0"4, 1? s  @ `4 4,G `4468:<>@ACDFG 1xIJLMOQRTVXZ\]    [      "1 !>  $ "13 "!&B R "#j "$ "%= !<( "%= "'& ")=  ")= "+& "-=1 !:(C "-=X "/&m ~          ! ( = L \ q       "6= !G !9@P\l~!D !A3R[hp|!4(&"8&=U"6=l!@!C !J!F!M!I-!Liproto.cc_ZL15tnt_errcode_valj_ZL9ibuf_sizeP4ibuf_ZL11ibuf_unusedP4ibuf_ZL9obuf_sizeP4obuf_ZL11obuf_iovcntP4obuf_ZL15obuf_create_svpP4obuf_ZL13iobuf_is_idleP5iobuf_ZL6iprotoPKc_ZL16iproto_port_initP11iproto_portP4obufP13iproto_headerrlist_createrlist_addrlist_shiftrlist_empty_ZL13fiber_set_sidP5fiberj_ZL12sio_move_iovP5ioveclPm_ZL14sio_add_to_iovP5iovecl_ZL20evio_service_on_bindP12evio_servicePFvPvES1__ZL14evio_is_activeP5ev_io_ZL12dummy_header_ZL13request_queue_ZL21iproto_queue_is_emptyP12iproto_queue_ZL22iproto_enqueue_requestP12iproto_queueP14iproto_sessionP5iobufP13iproto_headerPFvP14iproto_requestE_ZZL22iproto_enqueue_requestP12iproto_queueP14iproto_sessionP5iobufP13iproto_headerPFvP14iproto_requestEE12__FUNCTION___ZL22iproto_dequeue_requestP12iproto_queueP14iproto_request_ZL18iproto_cache_fiberP12iproto_queue_ZL21iproto_queue_scheduleP8ev_asynci_ZL17iproto_queue_initP12iproto_queueiPFvP13__va_list_tagE_ZL20iproto_queue_handlerP13__va_list_tag_ZL17iproto_session_idP14iproto_sessioniproto_session_cache_ZL22iproto_session_is_idleP14iproto_session_ZL21iproto_session_createPKciPPFvP4portjS0_jE_ZZL21iproto_session_createPKciPPFvP4portjS0_jEE12__FUNCTION___ZL23iproto_session_on_inputP5ev_ioi_ZL24iproto_session_on_outputP5ev_ioi_ZL22iproto_session_destroyP14iproto_session_ZZL22iproto_session_destroyP14iproto_sessionE12__FUNCTION___ZL23iproto_session_shutdownP14iproto_session_ZL25iproto_process_disconnectP14iproto_request_ZL22iproto_validate_headerP13iproto_headeri_ZL26iproto_session_input_iobufP14iproto_session_ZL20iproto_enqueue_batchP14iproto_sessionP4ibufi_ZL22iproto_process_requestP14iproto_request_ZZL23iproto_session_on_inputP5ev_ioiE12__FUNCTION___ZL27iproto_session_output_iobufP14iproto_session_ZL12iproto_flushP5iobufiP8obuf_svp_ZZL12iproto_flushP5iobufiP8obuf_svpE12__FUNCTION___ZL17iproto_reply_pingP4obufP13iproto_header_ZL18iproto_reply_errorP4obufP13iproto_headerRK11ClientError_ZL12iproto_replyP11iproto_portPFvP4portjPKcjEP4obufP13iproto_header_ZZL22iproto_process_requestP14iproto_requestENKUlvE_clEv_Z17make_scoped_guardIZL22iproto_process_requestP14iproto_requestEUlvE_E11ScopedGuardIT_ES4__ZN11ScopedGuardIZL22iproto_process_requestP14iproto_requestEUlvE_ED1Ev_ZL22iproto_process_connectP14iproto_request_ZZL22iproto_process_connectP14iproto_requestE12__FUNCTION___ZL16iproto_on_acceptP12evio_serviceiP11sockaddr_in_ZZ11iproto_initPKciiE7primary_ZZ11iproto_initPKciiE9secondary_ZN11ScopedGuardIZL22iproto_process_requestP14iproto_requestEUlvE_EC1ERKS2__ZN11ScopedGuardIZL22iproto_process_requestP14iproto_requestEUlvE_ED2Ev_ZN11ScopedGuardIZL22iproto_process_requestP14iproto_requestEUlvE_EC2ERKS2__ZL8msg_ping_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorD5Ev_ZN13IllegalParamsD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Evtnt_error_codes_ZNK9Exception6errmsgEv_ZNK11ClientError7errcodeEv_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Eviproto_port_vtabev_invokeassert_failev_feed_event_Z8fiber_gcv_GLOBAL_OFFSET_TABLE_fiber_Z11fiber_yieldv_Z9fiber_newPKcPFvP13__va_list_tagE_Z10fiber_callP5fiberzeter_poolpalloc__gxx_personality_v0_Unwind_Resume_Z9iobuf_newPKc_Z15session_destroyj_Z12iobuf_deleteP5iobufev_io_stopclose_say__cxa_allocate_exception_ZN13IllegalParamsC1EPKcjS1__ZN13IllegalParamsD1Ev_ZTI13IllegalParams__cxa_throw__cxa_free_exception_Z12ibuf_reserveP4ibufmmemcpy_Z8sio_readiPvmev_io_start__cxa_end_catch__cxa_begin_catch_ZTI9Exception_Z10sio_writeviPK5ioveci_Z8iobuf_gcP5iobuf__cxa_rethrow_Z8obuf_dupP4obufPKvmstrlen_Z20obuf_rollback_to_svpP4obufP8obuf_svp_ZTI11ClientError_Z14session_createi_Z12sio_strfaddrP11sockaddr_insnprintf_Z11iproto_initPKciibox_process_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPvbox_leave_local_standby_mode_Z18evio_service_startP12evio_servicebox_process_ro_ZTV13IllegalParams_ZN13IllegalParamsD0Ev_ZNK11ClientError3logEv_ZN13IllegalParamsD2Ev__cxa_pure_virtual_ZTS11ClientError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTS9Exception_ZTI6Object_ZTS13IllegalParams_ZTI11LoggedError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoE_ZTS11LoggedError!  Ri $s $x $I} @= $fB^   |tttt $ $ $m $ $! $& i    ~ $ $ $  $ $ $     t t' 7 E      $ $ $ $- 5 $? $G L Q Y d o <    v   $& $+ $0W*4?MUq ${ $ $ Px Q[ + $5 $: $(?Tav'1_ $i $n $Hs $Z $`F K S  b   $f       $n @ @ 6   +  7  7  7 @ d     7    ` e0 e?  eq  c- d2 e? e~ F e- M e k e[r ey e> e eQ e- e e eW e e eY e e e  e! e 2 ep= e n e z e8 e  eM e` e e  eJ  e8  e= e$I eU e [ ea ej e[o e { er e e  e e  e  e e; e e: e e e  ec e) eE7 e8 E e8S e a e e  e^ eS e  e4  e  e4 e ; e"H e4 V er e e  eS e e} e  edC eD N e Z ePv eY e]  e  e e e8 e  e  e  eL, e 6 eg< e B eJH e O eGU e\ e c e[ j eq ex e e e  ed eE e e e  e` e e e  e e  e? eK eKX e g ev e  e ed e e  e e  e% edB ebt e e  e e  e e eJ e ! e0 e ? e\ e/ e! e, eP e e e e e2  e % e 1 eN? edT e. ` ei| e e eX e eg e e% e6 eA e%L e X eg e s ei e/ e e e e e- e e e e  eY+ e0o e{ e e e ek e e e e e} e  e(1 e9 eTU ei e x e e} e eD e e e' e 7 eC eGR e; a e~ e e  e e e5 e O e ^ em ez} e e" e e  e  e % eM5 eC eM[ e~ eM e e  eN  eN  eN  e = exX ext e e eB  ei eS7 e`` e j e~ eS1 a e6& a` e/ a eB  a - e O W _ am e  e  e e8  = a e   & a@ e ( e< e@ H =P ak eo w & a e  e e- = a` e& a e\ (/0U8 a B e W e aUiq a{ e  e a e" e a@ e2  a"*,D eN2Vv^ ah e}w ev a` e}  a e  e#  a  e0 e 6>@F aP eE^ e( m ew@ a eEH es e"  a@ e(  em  a4 e >FyN a t eSw e  eyy a`  e e a  e e" e7 e'AIQ a o ey a  eu e0 a  eu e e} e  e(/  ee+$4 e B e$g e6qy a@  eu e$ eH  a  eu e{w  a  ek% eb3;uD euRZbow1 e  ew6 a`  eu e e  e6 a  e "+B3< euJ e$Z es emQu a  e eQe al  e eea  a  e-  eyZ ' e6 eeA$a e ha p x a, em   ee$ ef    a e e\  }  a e - ej8} @H aLR ea ir e e e> e& a e( e  c e $ e+3; a E ekU e6 emv e ee$43 e}3, e47 ? G alQ ea e l t | a e} '  e ee $!!C! eJ!R!Z! a,d! ekt! e& !!! e! c0! e}!! " e""a" a@"%H"UQ" e b" e i"aq"(y" a"v"" e " e" e " e#( ## aL# e ,# e K# e [#Ac#l# e {### e!#v## a# e$### e$ e $ e}$ e /$ eD$ e{S$ eb$ eB$ e$$v$ a $ e=$&$t$ e}% e % e+% e2%:%B% alL% e$\%d%m% e|% e}% ee%$% c`%`%% c& e&&%& a/& e$?& eF&N&hV& a,`& e& e &&\& e- & e& et& e& e&h&& a& eo' e' en "'*'7' eD'N'V'_' el'@w' e''4' a' e' e9 ' e ' e'4'`' aL( e 3(`;(C( ar( e |( e( eM(O(O=( a ( ey(P(P&( al( e ( ef) e<) eO) e h) eu) e ) e) e) e. ) e>)) e)$x) e) ) e )x(00<0D1`ht|%%&../ (4<HP\d              < <$ =@ H T \ h p %| % &      < < =    ( 0 %< %D &`ht|<<=%%& /(040<3H3PT\TdUUVVYY$@HT\hp|1122336(60u<uDv`vhwtw|zz (4<HP\d??@@AADD$@HT\hp|    ( 0 x< xD y` yh zt z| } }            ( 4 < H P \ d                $ @ H T \ h p |              ( 0 v< vD w` wh xt x| { { 5 5 6 6 7 7 : :    ( 4 < PH PP Ql Qt R R U U d d e e f f i i ` ` a ,a 4b @b He Te \ h p              | (| 0} L} T~ `~ h t |  (4<HPlt,4@HT\hp``aabbee'('0(L(T)`)h,t,|vwwzz  (4<uHuPvlt,4@HT\ghgphhiill3(304L4T5`5h8t8|__``aadd OO O(O4O<O<HO<PO=lPtPPPPP%P%P& _ 0@P ` p   OP/0&8@ H``hpx--1&    =  ( &0 8 =@ H &PX=`h&pOxO=PP&   ( H _OP @`     @`/U 2@v`@ @y` @wk 6 -Qea $ D M -l}  -$ -D% -hDM -haq -( -v -  -(HQ - lh4`O P/0 1378727470 1000 1000 100664 9888 ` ELF>@@UHH}HEH@]UHH}HuHEHHEHHHHHHEH@H]UHH}HE]UHSH(H}HEHHEHE@ u-HE@HEHHHEH@HH]HEH@HEHEH@8)ȍPHEPHEHXHEHP(HEH@HHHHH([]UHSHXH}HuЉUHEHHEHE@ PHEP HE@ t8HEHHH]HEHHHEHC(HEHC0HEHC8ẼtHEHPHEHHHX[]'8intZ_0f1F3m? A{#8 :d# eofWMB % : ; I$ > $ >  I&I  : ;  : ; I8 : ; I8  I  : ; ( ( I!I/<  : ;  : ; !I/ .: ; I@B : ; I : ; I .: ; @B  4: ; I !4: ; I? < 4: ; I?  wwvwwwGvGHwHIwILwLUvUVwVWwWZwZvwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/include/x86_64-linux-gnu/bitsiobuf.hiproto_port.ccstddef.hstdint.hport.htuple.herrcode.huio.hiproto_port.hsay.hkey_def.h 7.(~.K2"3x="8giproto_port_vtabmsg_codebsizetypesreplycfg_readaheadret_codefield_countshort intfield_map_sizeSTRINGiov_lenNUM64iproto_port_eoflong long intuint8_terrstrbooliproto_portmax_fieldnoiproto_headererrdesciovecerrcode_record_saylong intoffsettuple_formatsfield_type_MAXflagsunsigned charobuf_svp_to_ptrUNKNOWNsigned charcapacitylong long unsigned intuint32_tformat_idunsigned intuint16_ttuple_formatport_vtabshort unsigned intvtabchar/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iproto_port.ccsize_tpalloc_pooldatarefsobufsyncportlong unsigned intiov_basefield_typesizefoundtupletnt_error_codesadd_tuplesizetypeiproto_reply_headerIOBUF_IOV_MAXpoolerrflagsiproto_port_add_tupleobuf_svpobuf_sizeGNU C++ 4.7.3GCC: (Debian 4.7.3-4) 4.7.3zRx AC M <6AC q \AC I  |AC E  AC E .symtab.strtab.shstrtab.rela.text.rela.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @x`+&01;+6 G;zU e 0`%0 y t& 0 S088(&x0@ p$6IH`V{   iproto_port.cc_ZL9obuf_sizeP4obuf_ZL15obuf_svp_to_ptrP4obufP8obuf_svp_ZL11iproto_portP4port_ZL15iproto_port_eofP4port_ZL21iproto_port_add_tupleP4portP5tuplej_Z8obuf_dupP4obufPKvmmemcpy_Z9obuf_bookP4obufm_Z13tuple_to_obufP5tupleP4obufiproto_port_vtabqV E  !) . f; B I b i *p w P~ O    |      ~, : H CV y  H w h        e    C.  < YJ    o m     \F 2` on }     :    &6 ;@HP Z i 8s{H ` HV   }V c( 8 >FN f t $#     , "  @`HVsession.cc.o/ 1378727471 1000 1000 100664 38224 ` ELF>=@@B?"$&')*,-UHH}uHEUP4]UHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uETHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!Ѕ=EEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uEAHEH@UHHЋE!ЅUEH([]UHSH8H}HuHUHMHE؋@EHE؋PHE؋@9#HE؋@(HtHUHEHHJHE؋PHE؋@9Ht/HE؋@pHUHEHѺHHE؋@(t HEH@0HUHuHѺH)HUHMHEHH?EHEH@UHHЋE!ЉE}HEH@UHHHEH@MHHȋ0E HE؋@PHE؉PHEH@UHHЋE!ЅuHE؋@PHE؉PHEHUHH HEкHHH}tiHEH\H}t)HEHUHH HEHHHHEHUHH HEкHHEH8[]UHSH(H}uHUHE@;EHEH@UHHЋE!ЅHEH@UHHHEH@MHHȋ0E!HE@PHEPHEH@UHHЋE!ЅuHE@PHEPHE@(HtHU؋MHEHH([]UHH0H}HuHUHUHMHEHHoEHE@;EtHU؋MHEHUHATSHP}uEEEEHHEHHuHEH@;ELD$:H$AA:AҿHAA:H߸HHdHUHHHtHHEHHUHЋEqIHLYHHLHtDHHEHdHH\HHMHH HHP[A\]UHSH8}̃}HHtHHEHHUHHEHEẺEHHMкHHTHH?Hu*HHEHEHHHHUHHHH8[]UHH(}HEHEE܉EHHMHHEH@;EtHUHH@UHHHHu3L AqAѿ]UHHHtHH]UHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHClientError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/session.ccnew sessionsession hashout of memory 5a 0`   0 ` Y0`-"\Z });}ip}9Exception11ClientError6Objectint0X3qwFY [ ]# ^#x ?  ,  H sp H#  #ctx $!# %# &# (   q# q# # # f #' $# %# &M#x      !"#$%&'()*+,-./0123456789:) - .# /# M O#cswQ?# RN# T#(fidVf#0sid`f#4 b#8 c#Hfi#X j#` kf#x l# )key*f#val+#Gf 8[p\#b]# ^# _# `# a# b# d#$ e#( f#, g#0$#4#6q#9x#'#*log,GN/`qq1 ? O#"& ?*(  +B!xOj ?" #$?%&#(#'(( )$*h)JS*h+$cx(x( )S*ch)S*ch, -f h-sidfdO+YU2 G (G (  )" r { *2 h)"  *2 h. -h h-xd.< /l-inch/d0 -h P/ H-argɦ@12k`2id2inc\ 0` -h P/ H-arg@12k`2id2inc\3X4 5h H6 @5ret 5arg7I18x\3?X9NQ 5hN X5xNT5argOH9_ 5h_ X6_ P5arg`H18kbl:+fb -fd+?12sid1f\;22k6X<;BP12eEb H g #=P -sidPf1;_@<;VX12eY P g :d?]-siddfL1;fP2kgl>m>u?' ?( @ DABy??%B>Bo qA;LV  1?#f ;% % UR$ > $ > : ; I II  : ;  : ; I8 &I  : ; : ;I8  : ; I8 I!I/  : ; ( <  : ; I8 2  : ; I8 2 .? : ; @I< dI4 .? : ; @L M < d.? : ; 2 < d.? L 4 < d : ;  I8 4 .? : ; < d.? : ; L < d .? : ; @I< d!< "!I/# I$I%& I'.G d(I4 ).1@@dB *1 +.G: ; d,.: ; @B -: ; I ..: ; I@B /: ; I 0.: ; I@B 1 24: ; I 34: ;I 4.: ;I@B 5: ;I 6: ;I 7 : ;84: ;I 9.: ;@B :.? : ; @I@B ;4: ; I < U=.? : ; @@B >.? : ; @@B ?4: ; I?  @4: ;I? < A!B4: ; I? < wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw 1&=&=&(+ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coroobject.hexception.hfiber.hmhash.hsession.ccstdint.hsession.hstddef.hev.hcoro.hcoro.hstdarg.herrcode.hsay.hrlist.hassoc.h % % ## # s.3g=.M=2Z5y XtM=YJv;g/2T>=t]=K/ 1G5&uu)\(C! =y=6I5Mz=K}.˒g/?5'um u͔Ys^evxf xYɟXY2K32K # ER_UNUSED34S_INFO_ZN6ObjectaSERKS_ER_UNUSED37_ZNK9Exception3logEv__in_chrgsize_tER_ARG_TYPEsession_on_connectER_NO_SUCH_INDEXS_FATALER_INJECTIONgp_offsetprevva_listsession_destroyshadowev_tstamplong long unsigned intexistn_bucketserrdescER_EXACT_MATCH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/session.ccnextsession_triggerER_MEMORY_ISSUEsession_createsigned charER_INDEX_TYPEER_OKm_errmsgER_FIELD_TYPEm_linestackS_ERRORsession_registrystatelong int~ObjectObjectgc_poolER_WAL_IO__ac_prime_listS_DEBUG_saysession_initdoubleER_RESERVED12thisER_RESERVED14tnt_error_codes_enumlinklong long int_Z12session_initv__vtbl_ptr_typeunsigned intsay_level_Z15session_destroyjS_CRIToverflow_arg_areaER_UNKNOWN_UPDATE_OPlong unsigned intER_RESERVED11ER_KEY_PART_COUNTER_RESERVED13_ZN9ExceptionD0EvER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19ER_UNUSED29n_dirtysizeER_ILLEGAL_PARAMSS_WARNmh_i32ptr_nodesession_on_disconnect~ExceptionER_NO_SUCH_FIELDGNU C++ 4.7.3mh_i32ptr_next_slottypedef __va_list_tag __va_list_tagsave_iupper_boundslotintptr_tER_FIBER_STACKER_TUPLE_FOUND_ZN11ClientErrorD0Evsession_trigger_fsession_freeER_UNUSED30_ZN6ObjectD0EvER_RESERVED20ER_RESERVED21ER_RESERVED22ER_RESERVED23ER_UNUSED33errcode_recordER_UNUSED35ER_UNUSED36mh_i32ptr_removesizetypeER_TUPLE_NOT_FOUNDER_UNUSED__gnuc_va_listparamfiber_set_sidER_SPACE_DISABLED_Z14session_createim_fileER_KEY_FIELD_TYPEsid_maxfloatsession_fdbatchev_rt_nowER_UNUSED46ER_TUPLE_IS_ROunsigned charoperator=Exceptionnodetarantool_coromh_int_tshort int_ZN11ClientErrorD2Evreg_save_arealast_stack_frameER_PROC_RETfiber~ClientErrorER_SECONDARYmh_i32ptr_delER_UNUSED24waiterER_UNUSED25_Z12session_freevER_SPACE_EXISTSER_UNUSED27ER_UNUSED28long doublemh_i32ptr_put_slotcharER_SPLICEresize_cntmh_i32ptr_getput_donemh_i32ptr_node_ttnt_error_codes_enum_MAXtnt_error_codesresize_position/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrmsgf_data_vptr.Objectshort unsigned int_ZN6ObjectD2EvER_UNSUPPORTEDprimeuint32_tER_PROC_LUAER_NO_SUCH_SPACEerrflagsClientErrorerrstr_Z10session_fdjrlistuint8_tER_NO_SUCH_PROCfp_offsetflagsstack_sizecoromh_i32ptr_tER_UNUSED8_ZNK9Exception6errmsgEvcoro_contexttriggermh_i32ptr_putER_UNUSED31ER_TUPLE_IS_TOO_LONGER_UNUSED32ER_NONMASTERpalloc_pool_ZN9ExceptionD2EvGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \=AC x |&AC a AC R =AC x &AC a AC Y .AC i  <AC E  `AC E  jAC E`  $AC E QAC L zPLRx $$AC G $LAC E \oAC j |QAC L !AC \ .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rodata.rela.gcc_except_table.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.groupf@@(fH@>fP@)fX@Bf`@*fh@Ffp@@fx@;f@ef@\f@hf@Sf@if@g  ]@&4 ,@ 86@ 11Xc0@Pr &Kc0@j =ecH@ &d0@ =0dH@: &xd0@`  | \d0@  ( dH@"   e0@$3@ OPJPeH@'fheH@*e0@-fx@/7" @@24)ȏ@4)@6'*,"@830. >08G8\8W@@=X;mHN A: PX{ 'J5.fch;j$9Qs0 "$&')*|,-/12468:<=;     "1!$ "1"&"=&!"(5"=G"&Y"=n"="&-5H ^r!*0>M!'\q o Qa !!& +!-7!)I!,Usession.cc_ZL13fiber_set_sidP5fiberj_ZL14mh_i32ptr_nodeP11mh_i32ptr_tj_ZL19mh_i32ptr_next_slotjjj_ZL13mh_i32ptr_getP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL18mh_i32ptr_put_slotP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL13mh_i32ptr_putP11mh_i32ptr_tPK16mh_i32ptr_node_tPPS1_Pv_ZL13mh_i32ptr_delP11mh_i32ptr_tjPv_ZL16mh_i32ptr_removeP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL16session_registry_ZL15__ac_prime_list_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_Z16mh_i32ptr_resizeP11mh_i32ptr_tPv_Z22mh_i32ptr_start_resizeP11mh_i32ptr_tjjPvmemcpy_Z20mh_i32ptr_del_resizeP11mh_i32ptr_tjPvsid_maxsession_on_connectsession_on_disconnect_Z14session_createi__gxx_personality_v0_say__cxa_allocate_exception_ZN11ClientErrorC1EPKcjjz_ZTI11ClientError__cxa_throw_GLOBAL_OFFSET_TABLE_fiber__cxa_free_exception__cxa_end_catch__cxa_begin_catch__cxa_rethrow_Unwind_Resume_ZTI9Exception_Z15session_destroyj_Z10session_fdj_Z12session_initv_Z13mh_i32ptr_newvexit_Z12session_freev_Z16mh_i32ptr_deleteP11mh_i32ptr_t__cxa_pure_virtual_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS11ClientError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEGH'IkIIJ*K3K9KHKa,,P     Q b n R E  STV2L>LILbWoXYV,Z[MM M+ ,I X\ Y| X Y X [ , , , ` ,# ,/ P5 {D [ ah ,t ,| c ;+<= < @:7<A < D?7<E <, \X \AB d=>fegfh\ji % % % #`- $4 %; %yI %N %[ %:b %>g %ut %{ % %| % %a %A % %n %i %P % %  % %G %J" %4 - %4 O %ai %w % % %@ % % % % % %6 %  % %( %o4 %: % @ %F %L %+R %X %"^ %qd % j %p %`v %%| %N %E %a %e %s % % % % % % % % % % %2 %> % % %W  %x  %* % %E  %Q %% % %$ %* %W0 %n6 %c < %B %H %N %3T %Z %w` %f %~l %r %vx % ~ % % % % % % % % % %  %- % % %\ % % % - % W %e % %* % % %  % % %p % 3 %A %O %] %kk %oy %x % % % %R % % %  %# % 2 %1P %Rs %R % % %1 % %  %/ %H5 %P %[ % % %\ %F %Q1 !) %-5&= !`d %\n %F % = ! %S& !  % !3 %\= %FQ %U  ]  =e ! %   & !@ %  5 ! %, 5 c ! %w. %= %G cO hW !`m %\ x a %V h ; ! %\ }! 4P %da %I l ;t | !  %\ %  T  % %   !R %]Y a i ! %\   % %   !@ (  %\/ #4 %B nJ o %u %y   !   %\ #0 % H  % %    !1 9 B %\_ %:e %i qa y !` % %a   ! %cL %M % % %5% %B %N\ %iKr %~0(00<0D1`ht|%%&<<= (4<HP%\%d&      < <$ =@ H T \ h p %| % &4455669(90b<bDc`chdtd|gggghhiill::; ;(<4<<?H?P\d$@HT\hp|       ( 0 < D ` h t |  ` ` a a b b e e      0@P` p ;Vn08 @H H `h px1&=&  =  &8Tj  @`   5@cdh; O 8A 0`  a object.cc.o/ 1378727471 1000 1000 100664 1896 ` ELF>@@ int% $ >  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/object.ccGNU C++ 4.7.3GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rela.debug_info.debug_abbrev.rela.debug_aranges.debug_line.debug_str.comment.note.GNU-stack@!@'@1@!,`=aPz KP_k0Wv0++        object.cc  I   exception.cc.o/ 1378727471 1000 1000 100664 42712 ` ELF>=@@_\ "$')+-/2468:<>@BDFHJUH}UHHHHHH]UHH H}HuUHEHHEHHEHUHPHEUPHE@UHHH}HuHEHHEHHEHPHEHPHEPHEPHEHHHEHHHÐUHH H}HuUHEUHMHHHEHHEÐUHHH(H`HhLpLxt )E)M)U)])e)m)u)}H Dž8Dž<0HEH@HPHHH8H H(HHUHH H}HuHUHEHxHUHEHH¾UHATSH H}HHEL`HE苀L$$AAHJH [A\]ÐUHHH(H LpLxt )E)M)U)])e)m)u)}H(H HHH(HH(Dž8 Dž<0HEH@HPHHH(H(HzH8HH¾H(ƀUHH H}HuUHMDEHEUHMHHHEHUHEHEHHHEHHHEƀUHH0H}LHEHHHEPHEH@HL$T$H$AAfAÐUHH H}HuUHMHEHMUHuIȹHHEHÐUHH H}HuUHMHEHMUHuIȹ HHEHUHH}HEH]UHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHSystemError%s in %s/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/exception.ccClientError%s at %s:%d, %sUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHSH(H}HuU܉MLEHEH}ЋM؋UHuIHǸHEHHEHHHEHHHH([]OVkUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH$(<SLL####f1 int03  #A$#%#&# )     U}}#e#mslogc~Z ~M2mYC^mom$m#4#6#9#'log,}$+**=I*0 }}_* y  y  A#"Q&Q*QW +]QW<6}#R#Zf6<@GlogG G0686A6M (6  B  B Sx#}_ep_S_h_# '!kC"C# Sk Ss#ip p p   $L % } }I%A G&6 'q|(| Q)c*qh'(|(+*h+(1*h,d-l'r(.$.$ *+d*rh*|`*\'+(/e* 0+$ 5 *h*`0N$E Z ((+5  *E h+5  *E h' ( .0.0 6+  + * h* `* \1M  2 ~-8~34ap:~1  2 h-A`5apAMX1  2 X G'  S (S .M.M.M67apQ m+ ~  * ~*$ ~*/ ~*: ~38G ~'2  (S .Y.Y/msgY.Z+ * S * h* `* \* P* X1u  2 h ~0^U (S (+  * h+   * h0h 0 (0 ( + [ d * h+  * h' ( .i.i/msgi + * h* `* \* P''S(S.p.p/msgp _+~*'h*1`*<\*GP''"#(0 .k.k.k9k+&S"&#*X*P*L*H9k*@0<cx( (+S*ch+S*ch0x(S(+!**h+PY*h0si~( (+Y*ih+Y*ih :;y<;>! % UR: ; II!I/ $ >  : ;  : ; I8  $ >  &I  I  : ;  (  : ; I8 2  : ; I8 2 .? 4 < dI4 I.? : ; @L M < d.? : ; @I< d.? : ; < d.? L 4 < d.? : ; 2 < d I : ;  I8 4 .? : ; L < d.? : ; @I< d.? : ; @2 < d .? L 4 < d!.? : ; < d"#/I$!I/%I& I'.G d(I4 ).1@@dB *1 +.1@@dB ,.: ; I@B -: ; I .: ; I/: ; I0.G: ; d1.G@dB 2I4  3 44: ; I 5: ; I 6 74: ; I841 9: ; :!;4: ; I? < <wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw,1&=&=&=&w=&=&=&X3 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includeobject.herrcode.hexception.ccexception.hstdarg.hstdint.hsay.h ! % % u./-05>02@2'-2=2I1&-0-602S>g*?g* ## # #  #  -Tj ;# ; #  # _ZNK9Exception6errmsgEv_ZN11SystemErrorC2EPKcjerrnumshort intsizetypeException_ZN11ClientErrorD2Evlong long int_ZN11SystemErrorD0Ev_ZNK11SystemError6errnumEv~LoggedError~ErrorInjection_ZN6ObjectC2Evfilethisva_listLoggedErroruint8_terrcode_record_ZN9ExceptionC2EPKcj_ZNK9Exception3logEverrstrline_ZN11SystemError4initEPKcP13__va_list_tagArgsS_WARN_ZNK11ClientError3logEv_ZN11ClientErrorD0EvObjectunsigned interrdescformat_ZN11LoggedErrorD2EvGNU C++ 4.7.3_saysay_levellong int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/exception.cc_ZN11LoggedErrorC2IIPKcEEES2_jjDpT_fp_offsetm_file_ZN9ExceptionD2Evgp_offset_vptr.Object_ZN6ObjectD2Ev_ZN9ExceptionC2ERKS__ZN11ClientErrorC2EPKcjjzS_DEBUGunsigned char~ClientErrorm_errmsgsigned char~IllegalParamslong long unsigned intuint32_t_ZN14ErrorInjectionD2EvClientErrorlong unsigned int_ZN11LoggedErrorD0Evm_errcodeshort unsigned intreg_save_areachar_ZN9ExceptionD0Everrmsg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src_ZN6ObjectD0Ev__in_chrg~Objecttnt_errcode_descS_FATAL__vtbl_ptr_type_ZN13IllegalParamsD2EvS_CRITS_ERRORoverflow_arg_area_ZN14ErrorInjectionD0Evtypedef __va_list_tag __va_list_tagLoggedError_ZNK11ClientError7errcodeEvtnt_error_codes~Exception~SystemErrorErrorInjection__gnuc_va_list_ZN11SystemError4initEPKcz_ZNK11SystemError3logEv_ZN14ErrorInjectionC2EPKcjS1_SystemErrorerrcodeIllegalParams_ZN11SystemErrorD2Ev_ZN13IllegalParamsC2EPKcjS1_errflagsm_errnumoperator=S_INFO_ZN11ClientErrorC2EPKcjS1_j_ZN6ObjectaSERKS__ZN13IllegalParamsD0Evinitm_lineGCC: (Debian 4.7.3-4) 4.7.3zRx AC P <1AC l \&AC a |"AC ] JAC E gAC b =AC x &AC a GAC B <AC  \6AC q  |aAC GU  AC  rAC m aAC \ =AC x  &AC a @=AC x `&AC a CAC ~ CAC ~ zPLRx $$wAC Em =AC x (&AC a H=AC x h&AC a =AC x  &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectC2Ev.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rodata.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rela.text._ZN11LoggedErrorC2IIPKcEEES2_jjDpT_.gcc_except_table.rela.rodata._ZTV11ClientError.rela.rodata._ZTV11SystemError.rela.text._ZN11SystemErrorD2Ev.rela.text._ZN11SystemErrorD0Ev.rela.rodata._ZTV14ErrorInjection.rela.text._ZN14ErrorInjectionD2Ev.rela.text._ZN14ErrorInjectionD0Ev.rela.rodata._ZTV13IllegalParams.rela.text._ZN13IllegalParamsD2Ev.rela.text._ZN13IllegalParamsD0Ev.rela.rodata._ZTV11LoggedError.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@](H])P]OX]*`]Yh]+p]mx],]q]-]e][].]]w]/]]t]0]]o]R]J h]&,61Pk]P1Khk0]j&ek0] *=kH]"h&l0]$=@lH]'N&l0])t=lH]+&&!m0]-FwA0mx]/pO `( mH]2( mH]4=8nH]6 &n0]8@ ( nH]:'h ="nH]<J &E@o0]>m ( hpoH]@ =oH]BF &p0]D ( 0pH]F ( xpH]H  p0]J& (!p]L2HGE @]OU*0P]Qi?+ d@0]S|_,\wp]U0/s0.6K6P6]Z:U ^I `b ""$&')+-/12468:<>@BDFHJLNOQSUWYZ%4CUj X     "!J ""1 '"16" &EU"Jj!H(y"Jlglg""=""="$&G !4(0GHc6a\ !2(\ fr'frCa["'=p"'=")&"+=!F("+="-&:C"/w,!@(@:C]~C{!:(~C"/w"/w"/w>"6=S"8&h"6=}"<=">&"<="B="D&"B= exception.cc_ZL16tnt_errcode_descj_ZN6ObjectC5Ev_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorD5Ev_ZN11LoggedErrorC5IIPKcEEES2_jjDpT__ZN11SystemErrorD5Ev_ZN14ErrorInjectionD5Ev_ZN13IllegalParamsD5Ev_ZN6ObjectC2Ev_ZTV6Object_ZN6ObjectC1Ev_ZN6ObjectD2Ev_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Evtnt_error_codes_ZN9ExceptionC2EPKcj_ZTV9Exception_ZN9ExceptionC1EPKcj_ZN9ExceptionC2ERKS_memcpy_ZN9ExceptionC1ERKS__ZN9ExceptionD2Ev_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11SystemErrorC2EPKcj_ZTV11SystemError__errno_location_ZN11SystemErrorC1EPKcj_ZN11SystemError4initEPKcz_ZN11SystemError4initEPKcP13__va_list_tagvsnprintf_ZNK11SystemError3logEv_saystrerror_ZN11ClientErrorC2EPKcjjz_ZTV11ClientError_ZN11ClientErrorC1EPKcjjz_ZN11ClientErrorC2EPKcjS1_jstrncpy_ZN11ClientErrorC1EPKcjS1_j_ZNK11ClientError3logEv_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Ev_ZN13IllegalParamsC2EPKcjS1__ZN11LoggedErrorC2IIPKcEEES2_jjDpT__ZTV13IllegalParams_ZN13IllegalParamsC1EPKcjS1__ZN14ErrorInjectionC2EPKcjS1__ZTV14ErrorInjection_ZN14ErrorInjectionC1EPKcjS1___gxx_personality_v0_Unwind_Resume_ZN11LoggedErrorC2IJPKcEEES2_jjDpT__ZN11LoggedErrorC1IIPKcEEES2_jjDpT__ZN11LoggedErrorC1IJPKcEEES2_jjDpT__ZN11SystemErrorD1Ev_ZN11SystemErrorD0Ev_ZN11SystemErrorD2Ev_ZN14ErrorInjectionD1Ev_ZN14ErrorInjectionD0Ev_ZN14ErrorInjectionD2Ev_ZN13IllegalParamsD1Ev_ZN13IllegalParamsD0Ev_ZN13IllegalParamsD2Ev__cxa_pure_virtual P=IH RI RUQ [ \_` b%c/ 5 B Q eR`Q ehb d p& lsw ts w J J+MN M RL7MX M eW7Ml M ok7Mp M9dD oPjaklzlm j~ a [W7M~ M j wn7M M j tn7M Mpq jXY NO % % % #- $2 %KO %AT %` %n %o| % % % % % %7 % % % % %E %r %  % %2% %3 %D %iK %.P %\ %Sb %h %n %mt %z % %f % %f %t % %  %f4 %f` %~ %J %y %l %  % % %  %J- %JP %$ % % % %: % % %>! %; %L %h %0n % %u % %g %Z %g %> %/T %<o %< %< % % % %) %5 %hq % % % %I %[r % % ! % %0 %1 !` %! & !2 %B<D"L ! V %s %} % %9 %"l ! % % l  !F %P %0_ %c  k  =s !@ %   & ! % % %9 %   !0 8 @ !`N %\ %l ut    ! % %  [ !  % %% %0 %9; %] %a \i fq !  d % % %9 % %" f  !X ` 9h !@v % % %0 %T   = ! %   & ! %& %0: %> F =N !`i %m u &} ! % % %9 % : } ! ( %2 %= %9] %a~iq ! %h % % %9 % %Kw  ! %hd %n %0} %= !@ %w& ! % %0 %N = ! / %3;&C !` j %t %0 %k= !  %P& !  % %(0<D`ht|001%%& (4<HP!\!d""##&&kkllmmpp$@ H T \ h p <| < =      % % &(0<D`ht|   (4<HPZ\Zd[\]]``eeffggjj$@HT\hp8|89      < < =    ( 0 %< %D &`ht|<<=%%& :(;4;<>H>P|\|d}~vv$w@HT\hp<|<=%%&    ( 0 << <D =` h t |   % % &      < < = ( 4 < H P %\ %d &  0@P ` p   (108&@ H =P X &` h =p x &=&w=&=&=&@Uq  1 Q h*J @`"l  @`\f $ Dd:~ y  ,Llerrcode.c.o/ 1378727471 1000 1000 100664 12168 ` ELF> @@ER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not exist>int0@in#$c#%c#&5# x                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : u+ \9   % $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?   /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.cER_WAL_IOER_NO_SUCH_SPACEtnt_error_codes_enumER_ARG_TYPEER_SECONDARYshort intsizetypeER_SPACE_EXISTSER_SPACE_DISABLEDER_PROC_RETER_TUPLE_NOT_FOUNDER_FIBER_STACKER_UNUSED30ER_UNUSEDER_UNUSED32ER_UNUSED33ER_MEMORY_ISSUEER_RESERVED20ER_RESERVED21ER_RESERVED22uint8_terrstrER_TUPLE_FOUNDER_NO_SUCH_INDEXER_TUPLE_IS_ROerrdescER_UNUSED31ER_FIELD_TYPEerrcode_recordER_UNUSED34ER_UNUSED35long intER_UNUSED36ER_UNUSED37ER_RESERVED14ER_NO_SUCH_PROCunsigned charER_UNUSED46ER_KEY_PART_COUNTsigned charunsigned intGNU C 4.7.3ER_NO_SUCH_FIELDshort unsigned intER_TUPLE_IS_TOO_LONGtnt_error_codes_enum_MAXcharER_UNSUPPORTEDER_UNUSED27ER_SPLICEER_INJECTIONlong unsigned intER_KEY_FIELD_TYPE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errcode.cER_ILLEGAL_PARAMSER_UNUSED8tnt_error_codesER_UNUSED28ER_UNUSED29ER_UNKNOWN_UPDATE_OPER_OKER_RESERVED23errflagsER_INDEX_TYPEER_EXACT_MATCHER_UNUSED24ER_UNUSED25ER_RESERVED11ER_RESERVED12ER_RESERVED13ER_NONMASTERER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19ER_PROC_LUAGCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.rela.data.bss.rodata.rela.debug_info.debug_abbrev.rela.debug_aranges.debug_line.debug_str.comment.note.GNU-stack@&@p ! ,1><B9'J~] Xp/ l8x0 V0`}}P      perrcode.ctnt_error_codes 0S8eH|P`hx-EX (8@P'X5h@pNYgr(0@!H-X6`BpKx`  0'83H<PH`Qh]xfr{CP (8 @ P_Xkhtp8Hht(00@XHbXc`t     # I1 6 C J <Q X _ Sq }v t  R   {  ! < C  \ 3          % .+ <1 7 = C I O U [ a Ng Zm s Zy         f 0  O f    ~   J l 2 + #    d, >9  errinj.cc.o/ 1378727471 1000 1000 100664 9512 ` ELF>@@UHH H}E:EHHHHHUHHuEHHHE}uUHH}}x}~CEHHH@UHH}E}x}~QEHHHEBUHH H}EHEHHEH}uHEUPUHH H}HEHǸEeEHHHHEHEHHEHǸHE@tHMH¾HϸE}uERRINJ_TESTINGERRINJ_WAL_IOERRINJ_WAL_ROTATEERRINJ_INDEX_ALLOC/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errinj.ccid >= 0 && id < errinj_enum_MAXerror injections: - name: %s onoff state: %s errinj_seterrinj_getintrr043B)+#-#/l#0# #7$y#%y#&# )G "p#y#$p# 0     //lXi1WlGApVidAWlf rfe VOidOWlOph V^W<^lX^pTei`hmoutmXipWlinjr`yGe* % $ > $ >  I&I: ; I : ;  : ; I8 <  : ;  (  : ;  .: ; I@B : ; I  4: ; I .? : ; @I@B : ; I 4I4  I!I/ .? : ; @@B !4: ; I? < 4: ; I?  ww`v`awabwbewevwwwvwww4v45w56w69w9vw,b /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includeerrinj.ccstdint.htbuf.herrcode.herrinj.h /%JY .ff/ .ffg .uuY .Z/tX~Jerrinj_getcapacityerrinj_enum_MAXstateerrcode_recordpool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errinj.ccboolerrinj_seterrinj_enum_Z10errinj_getierrinj_set_bynameerrinj_lookupdata_Z10errinj_setiberrinjsizeerrflagslong unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcERRINJ_WAL_IOunsigned chartbuferrinj_info__FUNCTION___Z11errinj_infoP4tbufERRINJ_INDEX_ALLOCunsigned interrinjsERRINJ_WAL_ROTATElong long unsigned intuint8_terrdescGNU C++ 4.7.3tnt_error_codesERRINJ_TESTINGTNT_ERRMSG_MAXpalloc_poolsizetypelong long intcharshort intuint32_tlong intlong doublesigned charshort unsigned int_Z17errinj_set_bynamePcbnameerrstrGCC: (Debian 4.7.3-4) 4.7.3zRx aAC \ <EAC @ \NAC I |AAC | AC  .symtab.strtab.shstrtab.rela.text.rela.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @+ @ &`1`6`Ce>XOX_]m 0hh$0  f|$ 0- 0 $xXp  a  @     a@ipaENA5errinj.cc_ZL13errinj_lookupPc_ZZ10errinj_getiE12__FUNCTION___ZZ10errinj_setibE12__FUNCTION__errinjsstrcmp_Z10errinj_getiassert_fail_Z10errinj_setib_Z17errinj_set_bynamePcb_Z11errinj_infoP4tbuftbuf_printf 2E y  H    H  F Sk      0/  > !) 0 7 ]> E L S da wh Hu _ Q   n  k    9 < *   ) @ -H T b $s x   O    a   _   a `0l8A |Lm s w  $ |  5   $%3> pD H5PX pAx`    @a`5fio.c.o/ 1378727471 1000 1000 100664 15824 ` ELF>X@@UHH}HE@HcHEH@H9}HEPHE@ 9|]UHH@}̋UHEоHǸdH%HHEкHHHEH}x+dH%HHEHdH%HUHATSH0}HuHUHEHEHUHMЋEHΉHEH}u t u)HEH;EtHEHUHH)HHHE܉IMAHMH6H}tHEHEHEH)EH}HEHUHH)HH0[A\]UHATSH0}HuHUHEHEHUHMЋEHΉHEH}u t u)HEH;EtHEHUHH)HHHE܉IMAHfH6H}tHEHEHEH)EH}HEHUHH)HH0[A\]UHATSH }HuЉUH}t}yvUHMЋEHΉHEH}yuu tP tDHE܉IMAHHEH [A\]UHATSH0}HuЉU؋UHMЋEHΉHEH}uUHE܉IU؉T$HUH$MAHY}uSHEH;EtIHE܉HHEHD$HEH$IAHEH0[A\]UHATSH0}HuHUЋEH։E}tLHE܉IHUH$MAHӋEH0[A\]UHH H}HEHHHHEH}u:HE@ HEP HEPHE@HcHEHHEHUHPHEUHH}HuHE@HEHHEHEP ]UHH H}HuHUHE@ HEHuHEPHEHcHHHHPHEHHEHHEHUHcHHHHHHE@PHEPHEHHEHHEHUHATSH@H}ȉuHEȋPHEHHEHΉHEH} >HEHH;Eu HEȋ@%HHEL EĉHLd$HEH$IAHEHEHHE0HEHPHEHHEH9w?HEHPHEHHEHEHEȋ@HHHHHEHHH;EwHEHUHH)EĺHΉHEH}tHUЋEH։u HUHEHHH)HHH@[A\]/proc/self/fd/%dread, [%s]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fio.cwrite, [%s]iov && iovcnt >= 0writev, [%s]lseek, [%s]: offset=%jd, whence=%dlseek, [%s]: offset set to unexpected value: requested %jd effective %jdfio_truncate, [%s]: offset=%jdbatch->max_rows > 0! fio_batch_is_full(batch)fio_batch_write, [%s]: partial write, wrote %jd out of %jd bytesfio_batch_addfio_writev.int^^XemyBp+ -w# .#F # W# W# ^# iovF#U p [ f^)h +UIfd+W.@/I sz3hZpAfdAWLbufAw@ACXnrdEPZ@fdZWLbufZ`@Z\Xnwr^PtfdtWLiovt@tWH nwrwXx p :fdWL@WHXWfdWL@rcW\^Xh h^`lhroww`X| |p lWfdWÖHϖXiovPۋ@WUWUU !>+ % $ > $ > : ; I I!I/  : ;  : ; I8 : ; I8 !I  I &I& : ; ( .: ; ' I@B : ; I .: ; ' I@B : ; I 4: ; I 4: ; I !I/.? : ; ' I@B  U4I4   : ; .? : ; ' @B .? : ; ' @B ' I !4: ; I? < wwAvABwBCwCFwFvwwwvwww&v&'w'(w(+w+vwwwvwwwuvuvwvwwwzwzvwwwvwwwvwwwrvrsw,s  c /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includefio.hfio.ctypes.htypes.hstddef.huio.hstdint.hsay.h gJtX>~.(uY2YYZ.tYDwp %YYZ.tYDwp %Ktfuu0DKKvuUfIK!=gL=Iuu*K2Y2=.$$K2!uɼL/v/T'($u /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fio.cfio_writevshort introwsto_writefio_filenamesizetypeiov_lenmax_iovto_readmax_rowsssize_teffective_offsetrestartgood_offsetcountfio_batch_is_fullS_WARNfilename_pathfio_lseeklong long int__ssize_t_saysay_levellong intfio_batch_startoffsetfio_read__FUNCTION__off_tfio_writeintmax_tS_DEBUGunsigned chariovecsigned charlong long unsigned intunsigned intgood_bytesshort unsigned intchar/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src__off64_tsize_t_Boolbytes_writtenS_CRITS_FATALwhencelong unsigned intbytesiov_baseS_ERRORfio_batch_writeGNU C 4.7.3fio_batch_allocproc_pathfio_batchrow_lenfio_truncatefio_batch_addS_INFObatchiovcntGCC: (Debian 4.7.3-4) 4.7.3zRx BAC } <AC   \0AC G$  0AC G$  AC G  AC G  AC Gx nAC i 01AC l PAC   pAC G~ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.tbss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @s*&,19r Dr 2?1 P^e n0i<0 }`<00<X%  x)OBB&9 K    ]e{00' vn!11?fio.cfio_batch_is_fullfio_filenamefilename_path.3774__FUNCTION__.3801__FUNCTION__.3828sprintf_GLOBAL_OFFSET_TABLE_readlinkfio_readread__errno_location_saystrerrorfio_writewritefio_writevassert_failwritevfio_lseeklseek64fio_truncateftruncate64fio_batch_allocmallocfio_batch_startfio_batch_addfio_batch_writeU br +7n   +?K[g e  J T  Y q^!r"   ($:LUm z     &!3<M Z  (5 ?  D /I!a k  p Cu! Hr `  #7%<G   !s) 0 7 > E bL S Pa *f 's uz   `  1    z ~  t Z * h ps   S  L   y B   8 hB ` & 2\ Jgow     f'    _, 0B EM'U]   S b   C [, < GOvW @n C v    3     $ `. J X Sc s   >    p @B`'v4Ttcrc32.c.o/ 1378727471 1000 1000 100664 4096 ` ELF>@@UHtH]int7&oo7) ' $ % $ > $ > : ; I I' II&I .? : ; @B 4: ; I?  ww&v&'w,' /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includecrc32.ctypes.hcrc32.h 'LtXxlong long intshort unsigned intcrc32_initunsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/crc32.ccrc32_calcGNU C 4.7.3long unsigned intlong long unsigned intunsigned charcharlong intu_int32_tsigned charcrc32_funcshort intsizetypeGCC: (Debian 4.7.3-4) 4.7.3zRx 'AC b .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @' `&h,h6h1H XBZ~P``80[0 th o 0t08   B    '1;crc32.ccrc32_calccrc32_initsse42_enabled_cpucrc32c_hwcrc32c   !   9'% , 3 : ,A H O ] d k p } !'    rope.c.o/ 1378727472 1000 1000 100664 27936 ` ELF>>@@UHH}H}t HE@]UHHH}HEHHUHH}HuHEHUH]UHH}H}tHE]UHSHH}HEH@HpHEH@ H^HE@HEPHEH@HHEH@ H~9~HEH@HjHEH@ HUHUH[]UHH0H}HuUHEH@ HUHR(HHEH}uNHEHEU܉PHEPHEPHEHUHPHEH@ HEHP HEHPHEUHH H}HEHHEgHEH@Hu*HEH@ HEHEH@(HUHRHMHH(HEH@HEHEHP HEHPHEHUHP HEHEH}uHEHUHH0H}HuUHE@EHEU܉PHEH@M܋UHuHvH}HHEE܋U)HMHEHHwUHH H}u}HEHcHHDHE}HEUHcHHTHEHcHHTHEUHcHJHUHTHEH[HEHOHEUHSHH}u}؃}Ѓ}HEHcHHDH)HHEHcHHTUHEHH[]UHSHXH}HuUYHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEH?EHEH0EЋE9EMEЍPHEE;EEЋUԉ)ȃHEUHcHHDHEȃ}HEHcHHDHEHEHEHEHEE;E|$HEH}HEHH"HEH}HEH0HE;Et m}tHEH;EHX[]UHSHPH}HuBHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEHEHEHEЋE9EMEЍPHEEЋUԉ)ȃEЋUԉ)ȃHE؋UHcHHDHEȃ}HEHcHHDHEHEH%EHEHEE;EHEHUHEH9HHEHUHEHHHEH;EHP[]UHH8H}HuHUHEЋEHEHHHEHEPHEHEPHEH@HEE;EsHEHEHPHEH0E)EHE@;Ew3HE@)EHEHEHP HEHHEHHHjHEЋUHEUHH}uUHEHHHEHEEHHHHEHHPHEHPHEHHHEHEPEHEPHE}HHHHEHHPHEHHEHHHuHE]UHHHhdHX`HhH‹d9sHhHd`uV`HXHhHHkHEH}u HhHp`HdHpHHHEHEHHHdtqdHEHHHhHH HEH}u HEHUHPHEPHEHEPHE@HEPHEHEHE@‹dHEHHEHEHHUHHEHMHpHHHUHHHxtHxH‹t9wHxHHtHHHEHEtuHEHHtHEHHHxHHHEH}uLHE@HEHHEHEHHUHHEHMHHHHEHUHSHH84H8H‹49wH8H@H4H@HHH!HEHEHHHEHE@4uTH8H@HURHMHqH8HyHHEHPHE@PHEPHE@EH8H@4HURHuHvH8HHE4HEPE̍P49u ?H8H@4M̉)ӉډH8HyHuHE4Ủ)ȍPHMH8HHSHEH}u HE@HEHxHEHEHHUHHEHMH@HHz4tHEH@HHEH@ HHEHEHEH@ HEH@9E܋MHEHHHEHEHHHEHEHPHEHPHEPHEЉPHEЋUHcHHDHE5HEЋPHE@)HEЉP}HEHcHHDHEHEH;EuHEH@HEHEHHUMHcHHTHH8H@(HMH8HHHUH@HHHH[]UHH}2HEH@HPHEH@HH@HHEH@HPHEHPHEH@HH@Hu]UHHH}HEHPHEHPHEH@HUHHHHEH@HHt HEHaHEH@HUHHH}HEH@HH@ Ht@HEH@HPHEH@HH@ HHEH@HPHEHPHEHbHEH@HUHH9uHEH@HBHEH@HPHEHPHEH@HHHEH@HH@ H9tHEH@HUHHHhH`HhHpHHHpHHE3HE@HEHPH`HHHpHHEH}uHUHATSHHXHXH`HHTH`HHEHE@uWHEXHEH@HAHEH@ HAHE@9tZHEHEH@HAHEH@ HA9~HEH@HHEH@ H9t]HE@HEXHEH@HAHEH@ HAHE@9uZHEHEH@H AHEH@ HA9~HEH@HHEH@ H9tH`HHEH}NHĠ[A\]UHSHXH}HuHUMHEHEHEHEHEHHEH؃EEHHEH}tpHEH@Hu HEH@ HtV}HHLEHUHEIHѺHǸHEH@HUHuH EHHLEHUHEIHѺHǸEHHTHEHƿH}uHEHE@HƿHE@HEHPHEHHпH}t7HEH@Hu HEH@ HtHEH@ HUHuH2HEHHHX[]UHHH}HuHEHZHƿHUHEHHHEHHuH /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.csizeoffset < rope_size(rope)offset == 0node->leaf_size != 0node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_sizenode->height == (((rope_node_height(node->link[0])) > (rope_node_height(node->link[1])) ? (rope_node_height(node->link[0])) : (rope_node_height(node->link[1]))) + 1)┌──└──│ %s%snil{ len = %zu, height = %d, data = ''}size = %zu string = ''rope_checkrope_eraserope_extract_noderope_insert    e  ?int&f'F(444  - . (/> 1F# 3[# 5[# 7# 9>#UNN 0< >U# @# Bx# D# F# H#(K M#topO# Q#[UUN--=J=f,U[UUhg[ghith`6F@6Uh@p@U`JUJXJPJ[LLUh\\Xit^Uh_U`sUsXsUPs[Lu[lx`}U}UX}FTUhUU`F\FU`UXFTUHFDF@UUFFU`UXFTUHFDF@UUFFyHy@O  [l  U` [\[!00X"dir0FT0mP 2Uh#QFQ|Q[|Q|Q[|$  XUh ]| `` lUX=N N-#U\ |[|$l   | h U`=l N\ #Fq |[|$   | X UP FL%O [  U U@= N q & "ith# U "it h#U# "ith'< <|< | >| AUh  4 'L L| N| QUX$  q (i iUj kD"dirkF m @ o  q[\ r7PD N)h `% $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/  : ;  : ; I8 &I.: ; ' I@B : ; I .: ; ' I@B .: ; ' @B : ; I .: ; ' @B 4: ; I .? : ; ' @B 4: ; I  U .: ;' I@B : ;I 4: ;I !.: ;' I@B ": ;I #.? : ;' I@B $4I4  % &.: ;' @B '.? : ;' @B (.: ;' @B ).? : ;' @B wwvw w #w#;v;<w<=w=@w@TvTUwUVwVYwYrvrswstwtwwwvwwwvwww2v23w34w47w7vwww)v)*w*+w+.w.vwww)v)*w*+w+.w.vwwwcvcdwdewehwhvwww v w w w v w w  w vwwwvwww]v]^w^_w_bwb,v,-w-.w.1w1vwwwvwwwvwwwvw,#\"#@?TU% /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope.cstddef.htypes.hstdio.h tY..~.tY6!>s-w"IW;hx0uvuK2/ʻ˻u t2/$2-iK21z=Y/K4 Kg $ "J%<# tY/L4MKgc  t=Y>0[h h<J K .(///K.%L#u# .&ugs"3u"&uu.$s'/s6XLu g/gi!.>Y /:@2L2==Ov=#3N,zLx;.J.JLs,N)WW:MqX,u"t/2uI/s>tYx/tree_sizep_endrope_node_printnew_noderightsigned charleaf_sizerope_node_heightsize_tROPE_HEIGHT_MAXsizetype__PRETTY_FUNCTION__l_left_heightdirectionlong doubleleft_heightold_sizeropessize_tshort intl_right_heightrope_iter_nextparentrope_relinkleaffreeconninsert_heightlinkavl_route_to_offsetrope_split_funcchild_prefix_lenlong long intr_left__ssize_tr_left_heightr_right_heightoffsetl_leftprefixnodeavl_rebalance_after_deleterope_clearadjust_sizerope_iterl_rightavl_route_to_nextrope_eraseunsigned charvisit_leafrope_traverserssize_tlong long unsigned intprintheightunsigned intavl_rotate_doublersize_tGNU C 4.7.3allocrope_node_newright_heightsplit_nodesplit_ctxrope_pretty_printcharrope_iter_startlong intsaveleft/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcshort unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.cleft_sizeprint_leafr_rightdatapaddingrope_iter_down_to_leaflong unsigned intchild_prefixp_offsetsizemirrorpathrope_insertrope_sizerope_node_splititeralloc_ctxavl_rebalance_after_insertrope_checksplitrope_noderope_node_sizeavl_rotate_singlerootnextrope_iter_createrope_extract_nodeGCC: (Debian 4.7.3-4) 4.7.3zRx AC Z <AC X \AC T |AC Y  AC E AC  AC  hAC c  AC   @sAC Ei  dAC E  pAC Ef AC  AC  zPLRx  $AC   H!AC  $lAC H |RAC M ZAC U AC   AC   AC J $<AC E LvAC q .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @PL&`,`1`>9MP KhR\$jq' zq00uj0 0a1 8j0k50F:c:h:hPj=D@$ I^!<2UCsO]3hm*s*pd2    8RO h    x ! Z^- #*3:?DvVrope.crope_node_sizerope_sizerope_iter_createrope_node_heightrope_relinkrope_node_newrope_node_splitavl_rotate_singleavl_rotate_doubleavl_rebalance_after_insertavl_rebalance_after_deleteavl_route_to_offsetavl_route_to_next__PRETTY_FUNCTION__.3131__PRETTY_FUNCTION__.3140__PRETTY_FUNCTION__.3148rope_iter_down_to_leaf__PRETTY_FUNCTION__.3190rope_node_printrope_clearrope_insert__gcc_personality_v0__assert_fail_Unwind_Resumerope_extract_noderope_eraserope_iter_startrope_iter_nextrope_traverserope_checkabortstrlenmallocsnprintfprintfputsfreerope_pretty_printputcharn 2x } F' (    K% ' (3  = B KG '/  9 > dC '(j+,(+    p '` j o t'   '/,    0 01p }2 2 3 4 #3E J45( 3- 4 7   b !) 0 5 VB P bW \ i mn @y A ]  f  ;" 0 (Q m\ h v M }        O! /( - w@ P ] Ib mu}   .< `  <U   EU s(  2 A HsPX b q |      3 @   8&3.6 @ N \ j x  *     z* `   W (*0 : I X g l z   )   0     *!  + : I `N \ j x )   p    -d  ' 6 F U Z i  d     "  @   * : J vU2^ m }  y        v%  . > M s      v       $  / ? P i X 2a     `   ^  ^ -  % 2- -5 = G W 'g Hw  r    H  v    " @, < `L l {  Q       2 @`<Us3$D*h*d & 4 = X a ^- /(1 =Pipc.cc.o/ 1378727472 1000 1000 100664 21608 ` ELF>h,@@UHHHEE]UHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEHUHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HE@8]UHH}HEP8HE@09]UHH }}uEEH HHHEH}uHEUP0HEH,HEUHHH}HEHaHEHUHHH}HE@8HEP8HEP4HEH HHEHHEHHUHH(H}0HEHH~HEHEHHHEHEHHHHEHHru,HEH7HEHEHHHEHEHHHHEH/uUHH`H}EEEHEHE5}t$HdHHPHHEHH+EHdHHPHHEHHEHEHEEHdHHHHHEH HjtYHEH H-HEHEHHHEHEHHHHEHEHEH@@E\EMf(\f(EfWf.Er HE@8HEP4HEHHDHEHE@4PHEP4HEP4HE@09tHEP4HE@0)HEP4HE@8PHEP8HEHH5tNhN`ZmZhoohhbh2==ch2Dh8=ch8Dh>D>M\resBDhL chLDhS:chSDh\ch\DHf_``hfdPeXkwchkDkfmHn=oo`resw@z=_Pw$chDhb chDw=o`iMh=_fHPW chDhw`= chDh= chDhb chDwMlf`cntM\h P H !=@"D# <   $# y  bb%# >)  # o% : ; I$ > $ >   I&I : ; : ;I8  : ;  : ; I8 : ; I8 I!I/ < I!I/.: ;I@B .: ; @B : ; I .: ; @B .: ; I@B .? : ; @I@B : ; I .? : ; @I@B  4: ; I .? : ; @@B  4: ; I U!4: ;I "4: ;I? < #4: ; I? < $!%wwvwww6v67w78w8;w;}v}~w~wwvwwwvwwwvwww&v&'w'(w(+w+avabwbcwcfwfwvwxwxywy|w|vwwwvwwwvwwwfvfgwghwhkwkvwww<v<=w=>w>AwAfvfgwghwhkwk*v*+w+,w,/w/_v_`w`awadwd~v~wwwvwww2 v2 3 w,3 r - . B /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hrlist.hipc.ccstddef.hstdint.hcoro.hcoro.hstdarg.herrcode.hfiber.htarantool_ev.hsay.h Ku{555/!...<tX=.2/2gvguuK22200O2K"[gh!iYYd<(gK23KK"[g"h"!hY孭l=LY2#22K2K/vI\uY"YgYt #=bcastev_nowrlist_first/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcipc_channel_is_fullrlist_createstatetarantool_coroipc_channel_has_readerssize_tsizetype_Z23ipc_channel_has_writersP11ipc_channelrlist_dellong long unsigned intlong doubledataipc_channel_has_writersrlist_addva_listshort intTIMEOUT_INFINITY/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/ipc.ccheaduint8_trlist_emptyev_tstamperrstrcoro_contextuint32_tboolipc_channel_broadcastbcast_msgreadersrlist_add_tailerrdesclong long intwaitererrcode_recordcoro_saylong intwriterspalloc_poolipc_channel_getgp_offset_Z21ipc_channel_broadcastP11ipc_channelPvf_data_Z18ipc_channel_deleteP11ipc_channelunsigned charlast_stack_frameipc_channel_get_timeoutsigned charflagsfp_offset_Z23ipc_channel_put_timeoutP11ipc_channelPvdunsigned intipc_channel_put_timeoutstackipc_channel_newstarted_Z23ipc_channel_get_timeoutP11ipc_channeld_Z15ipc_channel_getP11ipc_channelreg_save_areaipc_channel_putnextrlistchar_Z15ipc_channel_putP11ipc_channelPvlistshort unsigned int__mptrrlist_nextipc_channel_create_Z23ipc_channel_has_readersP11ipc_channelev_rt_nowfirst_trylong unsigned intdoublegc_pool_Z19ipc_channel_is_fullP11ipc_channeloverflow_arg_areaipc_channel_destroysizelinkcount_Z20ipc_channel_is_emptyP11ipc_channeltnt_error_codesstack_sizeitemfiber__gnuc_va_listipc_channel_Z15ipc_channel_newjtypedef __va_list_tag __va_list_tagpreverrflagsipc_channel_is_emptytimeoutcancellableipc_channel_deleteGNU C++ 4.7.3GCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <!AC \ \GAC B |FAC A ?AC z AC M AC M ;AC v AC Q <AC X \YAC T |&AC a SAC N AC  :AC 5 *AC e AC  <5AC p \AC Z |#AC ^ AC  .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @3 9H&t ,t 6t = 1<`B P`0[(R0 o0}XR 0"/0(((pR+1 h6!7G&~F5??KV';bSg   bxY"&GL:w=*'gTe+5`#ipc.ccev_nowrlist_createrlist_addrlist_add_tailrlist_delrlist_firstrlist_nextrlist_empty_ZL18ipc_channel_createP11ipc_channel_ZL19ipc_channel_destroyP11ipc_channelev_rt_now_Z20ipc_channel_is_emptyP11ipc_channel_Z19ipc_channel_is_fullP11ipc_channel_Z15ipc_channel_newjmalloc_Z18ipc_channel_deleteP11ipc_channelfree_Z23ipc_channel_get_timeoutP11ipc_channeld_GLOBAL_OFFSET_TABLE_fiber_Z20fiber_setcancellableb_Z19fiber_yield_timeoutd_Z12fiber_wakeupP5fiber_Z16fiber_testcancelv_Z15ipc_channel_getP11ipc_channelTIMEOUT_INFINITY_Z23ipc_channel_put_timeoutP11ipc_channelPvd__errno_location_Z15ipc_channel_putP11ipc_channelPv_Z23ipc_channel_has_readersP11ipc_channel_Z23ipc_channel_has_writersP11ipc_channel_Z21ipc_channel_broadcastP11ipc_channelPv_Z11fiber_yieldv8"\"}#$"%&# &+#3%L(a ""#$ "&)#Y* %>(Z)+"%#/"&#  ! W !3 ) . ; B I CP \W ^ <l Os |   !          m- H T |b %p ~  4 6        }  & E4 ^ +l y   / `   X  &- 0; I xo z  l7 ` > *7~   x  ~  " 0 x? EMU _ xn  x   ]' @ x 'b  x  6bx& @ L XR Zxbj `    &      hg# ; AgIQ hupu V V   = @1 @H;] k /d  V V l =g  & i, /4g<+D \  k z|)  m $ V  " +* `2 `I  Y _ {g `o w           3     1  E M *Z Vi 0q P~ V   r  V  F ] J0 } O @`7~' b@x`g= g@+``info.cc.o/ 1378727472 1000 1000 100664 17304 ` ELF>@@UHHH}HH@8Ht&HH@8H@ HUHEEHHEfWHUHHH}HH@8Ht&HH@8H@(HUHEEHHEfWHUHHH}HH@HHEHHUHHH}HHEHHUHHH}EHEHEEH,HxH*HHH H*XHEHUHHH}*HEHUHHH}HEHHEHHEHt,HEHHEHUHHH}HEHHHEHHHEHHEH*HEHHEHHEH*HEHHEHHEHHHEHHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHUHH H}HEHHEHEREHHHHHEHHEHHHH@HUHHEHEEHHHHHuUHHH}HEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHJHEHHEHversionpidlogger_pidconfigbuildtargetLinux-x86_64-Debugoptionscmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_STATIC=OFF -DENABLE_TRACE=ON -DENABLE_BACKTRACE=ON -DENABLE_CLIENT=OFFcompiler/usr/bin/gcc /usr/bin/c++flags -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -msse2 -std=c11 -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing -Werror -pthreadboxinfo__index__callrecovery_lagrecovery_last_updatelsnstatusuptimesnapshot_pidint(-1{37424W  W 2 # #b{`p  Z#  D# O# e# # i  r .W   4I 5O#lsn 6^#I 0 G H# IO# J# K# K#( N Slsn T^# T^# V# W# X# Y#( Z#0 [#8 c#@ d#H eW#P fW#T gW#X h#` i #h j#x l #|U.WBL.Bh8WyL8BhCWLCBhJWLJBhQW LQBhXW=LXBhlWnLlBh}L}BhWLBXiWlLBh 32 D oD )W , t_  d% $ > $ > : ; I <  II I &I  : ;  : ; I8 I!I/  : ;(  : ; I8  : ; .: ; I@B : ; I .: ; @B  4: ; I .? : ; @@B 4: ; I? < 4: ;I? < 4: ; I wwXvXYwYZwZ]w]vwwwvwww v  w  w wlvlmwmnwnqwqvwwwvwwwvww w vwwwvw,& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includeinfo.ccstdint.hlua.htypes.hlauxlib.htypes.hsockaddr.hin.hev.hrecovery.hsay.htarantool.h .&Y2&Y2Y2gY2NY2YY.wYY3gKYY[6YJY3ZZZYYYYlog_dirWAL_FSYNClbox_info_indexsnap_dirlbox_info_calluint64_tshort intcfg_filename_fullpathrecovery_lagsizetypewatcherpid_tWAL_WRITElbox_info_snapshot_pidwriterwal_watcherlbox_info_uptimeint64_tEVBREAK_CANCELremoteEVBREAK_ONEcurrent_wallbox_info_init_static_valuesev_tstampluaL_Regsin_familyfinalizeboolrow_handlerrows_per_wallong long intwaiterlong intaddrWAL_MODE_MAXconfirmed_lsnwait_lsnsin_addrnamelbox_info_recovery_last_update_tstamplong doubleuint32_t_Z23tarantool_lua_info_initP9lua_Statesa_family_tunsigned charfuncsigned charflagslong long unsigned intsnapshot_pidwal_writerreaderunsigned inttarantool_lua_info_initEVBREAK_ALLs_addrrow_handler_paramshort unsigned intlbox_info_statuslua_CFunctioncharlog_io/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srclbox_info_dynamic_metain_addr_tsnap_io_rate_limituint16_tlbox_info_recovery_lag/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/info.cclogger_pidlong unsigned intin_addrdoublesin_zerolbox_info_lsnsin_portWAL_NONEwal_dirrecovery_statein_port_tfiberev_rt_nowrecovery_last_update_tstampcookiewal_modeWAL_FSYNC_DELAY__pid_twal_fsync_delaysockaddr_inlua_StateGNU C++ 4.7.3GCC: (Debian 4.7.3-4) 4.7.3zRx YAC T <YAC T \0AC k |*AC e aAC \ )AC d ~AC y AC  AC  <<AC 7 .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @+&0,06@p 14 C>5 O?l]mk0h`B0 |B 00vXBp$ ) Y0YYf0* am)~ :Yp    u%7DKVl|<info.cc_ZL22lbox_info_recovery_lagP9lua_State_ZL37lbox_info_recovery_last_update_tstampP9lua_State_ZL13lbox_info_lsnP9lua_State_ZL16lbox_info_statusP9lua_State_ZL16lbox_info_uptimeP9lua_State_ZL22lbox_info_snapshot_pidP9lua_State_ZL15lbox_info_indexP9lua_State_ZL28lbox_info_init_static_valuesP9lua_State_ZL14lbox_info_callP9lua_State_ZL22lbox_info_dynamic_metarecovery_statelua_pushnumber_Z17luaL_pushnumber64P9lua_Statembox_statuslua_pushstringtarantool_uptimesnapshot_pidlua_pushvaluelua_gettablelua_typelua_calllua_removetarantool_versionlua_settablegetpidlogger_pidcfg_filename_fullpathlua_createtable_Z23tarantool_lua_info_initP9lua_Statelua_getfieldluaL_registerlua_pushcclosurelua_setmetatablelua_settop<Nhxb{ !"# $% -2%DU&^ fk'{& (& )&  #*, $4= +EV&_ >gp Hx&  &  &&$*H Zi &  , * * 4*= J-X `.q&z  .&/&0  Y  (0 8@ H P Xm     !) 0 y7 > dE L :S C_ l 'q }~    : p         ) $ 53 @ LE P T[ `f r   2 +       K! - rJ ^V b p {~  c n  4     E    " =& 4 yB P K^ l jz W F    =   p   F $Y, I SY[c `z        m   m' > HPX @o u}  + 4   ` * d8 EK cX Mu I  3 @Y` m @stat.cc.o/ 1378727472 1000 1000 100664 9104 ` ELF>@@UHH H}uHUHEH*EHEHHEHHEHH*EHEHHEHUHH0H}uHUHMHEHEHUHEHHHEHHU؋MHEH'HEHUHH0H}uHUHMHEHEHEHHHEHHt0HEHHU؋MHEHUHHH}HEHHEHƿUHHH}HEHHEHƿUHHH}HEHHEHHEHHEHHEHHEHHEHHEHrpstotalboxstat__index__callintOT(d24 B   I# # *IL*Ihrps*Bd*X6B6IXrps6BT6H6b@L8IhIBEIIXrpsIBTIHIb@LKIhVBvLVIh]BL]IhlLlIh4d % $ > $ >  I&I : ; I< I I  : ;  : ; I8 .: ; @B : ; I : ; I .: ; I@B  4: ; I .? : ; @@B I!I/ 4: ; I ww{v{|w|}w}wvwwwyvyzwz{w{~w~vwwwvwwwvw,D /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/srcstat.ccstdint.hlua.hlauxlib.h */!2g/ZLY6g1vYLY2Y2YY .ZZYYint64_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/stat.ccset_stat_itemfill_stat_item_Z23tarantool_lua_stat_initP9lua_Stateunsigned charluaL_Reglong unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcshort unsigned intseek_stat_itemlbox_stat_indexlbox_stat_metadoublefuncunsigned intcharlua_Statesizetypelong long intnamelbox_stat_callshort inttotallong intlong doubleGNU C++ 4.7.3signed charlua_CFunctioncb_ctxtarantool_lua_stat_initGCC: (Debian 4.7.3-4) 4.7.3zRx |AC w <uAC p \AC  |5AC p :AC u AC  .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @p&,6p 1X`CP>OT%]y@m 0h"0  H|" 01 00 M P #(0  |*|uD_z5:@0    3Zgustat.cc_ZL14fill_stat_itemP9lua_Stateil_ZL13set_stat_itemPKcilPv_ZL14seek_stat_itemPKcilPv_ZL15lbox_stat_indexP9lua_State_ZL14lbox_stat_callP9lua_State_ZL14lbox_stat_metalua_pushstringlua_pushnumberlua_settablelua_createtablelua_tolstringstrcmpluaL_checklstring_Z12stat_foreachPFiPKcilPvES1__Z23tarantool_lua_stat_initP9lua_Statelua_getfieldluaL_registerlua_setmetatablelua_settop  1BK Sev"4Z  |   .DM @Zk |!@HzPX   !) 0 7 h> W Y^ Lg n qu |     ^ ^  @   G a| ; P SZ|bj `t    z     '/xF !PzX`  w    p  1@  @|`zslab.cc.o/ 1378727472 1000 1000 100664 12552 ` ELF>H@@UHH H}HuHEHEHEHH*HEHHEHHEHHEH@HHEHHHEHHEHHEH@HHEHHHEHHEHHEH@HHEHHHEHHEHHEH@ HHEHHHEHHEHHEHHHEHHHEHHEHUHHH}HEHHEH¾UHH H}HEHƿHUHEHHHUHH H}HEHƿHUHEHHHUHH H}HEHHEHHEHHUHEHƿHEHHEHHUHEHHHEHHEHHUHEHHHEHHUHHH}HEHHEHHEHt,HEHHEHUHHH}HEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHslabsitemsbytes_usedbytes_freeitem_sizearena_usedarena_sizeboxslab__call__index<?<? O2o4 intd   # u#(= (,^ -# .# /# 0# 1# 5 6D# 7D#  **X*;PL,ho O(LOh WyLWXY^` `L`Xb^` iLiXk^` LLh~Lh-~  ~% $ >  : ; I<  III $ >  &I  : ;  : ; I8 .: ; I@B : ; I  4: ; I : ; I 4: ; I .? : ; @@B I!I/ wwvwwwvwww v wwwSvSTwTUwUXwX=v=>w>?w?BwBvwwwvw,g /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includeslab.ccstddef.hlua.hlauxlib.hstdint.hsalloc.h *uZY2YYY2Y/2Y/2YYK// .wYY3ZZYYYYYlbox_slab_dynamic_metaint64_tsize_tlbox_slab_slabsusednameslab_cache_statsslab_arena_statsastatsizeluaL_Reglong unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcshort unsigned intlbox_slab_arena_sizesalloc_stat_lua_cbunsigned charbytes_freedouble_Z23tarantool_lua_slab_initP9lua_Stateitem_sizelbox_slab_arena_useditemsunsigned intcharlua_Statefunclbox_slab_callsizetypelong long intlbox_slab_indextarantool_lua_slab_initcstat/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/slab.ccshort intlong intlong doubleGNU C++ 4.7.3signed charlua_CFunctioncb_ctxbytes_usedslabsGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <?AC z zPLRx  $FAC A  HFAC A  lAC  ~AC y  0AC + .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @ &,,,6@ 1'>'UP8(a o _ 0z/0  /00%BH(0pH 8d 7?WF|FT>~`@    *LY0):HYslab.cc_ZL18salloc_stat_lua_cbPK16slab_cache_statsPv_ZL15lbox_slab_slabsP9lua_State_ZL20lbox_slab_arena_usedP9lua_State_ZL20lbox_slab_arena_sizeP9lua_State_ZL14lbox_slab_callP9lua_State_ZL15lbox_slab_indexP9lua_State_ZL22lbox_slab_dynamic_metalua_pushnumberlua_createtablelua_pushstring_Z17luaL_pushnumber64P9lua_Statemlua_settable_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2___gxx_personality_v0_Unwind_Resumelua_pushvaluelua_gettablelua_typelua_calllua_remove_Z23tarantool_lua_slab_initP9lua_Statelua_getfieldlua_pushcclosureluaL_registerlua_setmetatablelua_settop,BK Sm~    !2; "C\m~ ,?Nr{   , 7)8Wh y!"# B% F  K(6 T>&OX R`v `' >&()`hp,x7  M  !) 0 7 n@ 8E R vY ` Ae p v g {    [ . m ;    @ I& 4 hB |P _ Qk hy 6    u &  `) S3;C Ya j bz T  R b T> `<  b &>.6 N T "X`h @ ` t @k   T > lua_ipc.cc.o/ 1378727472 1000 1000 100664 19456 ` ELF>!@@UHH0H}HEHEHt~HEHuHEؾHutHEؾHǸHEؾHHEH}yHEؾHǸHEHEH}uHEؾHǸHEؾHHEHEغHHEؾHHEHHEؾHHEؾHHEHUHUHHH}uMHEHHUHH H}HEHuHEHut&HEH|HEHEHUHH H}HEHuHEHutHEHǸHEHHEHEHHEHUHH H}HEHuHEHutHEHǸHEHkHEHEHHEHUHH0H}ظHEHEHEEt tHHEHEؾHtHEؾHǸHEؾHEHEHEfWf.EvHEؾHǸHEؾHǸEHE؉H_HEEHE؉HHEؾHHEؾHHEؾHHEH}HEHEHEؾHH*EHEHHEؾHH*EHEHHEؾHHEؾHHMHEHUHEEHHt E6EH*EHEHHEHHEؾHUHE؉HUHE؉HUHH0H}HEHE}}~EHE؉HutHEؾHǸ}uqHEؾHtHEؾHǸHEؾHEHEHEfWf.Ev#HEؾHǸ HHEHEؾHHEHEHUHEEHHEH}uHEHHEؾHHEؾHHEؾHHEؾHtcHEؾHH*EHEHHEؾHH*EHEHHEHHEؾHHEؾHUHH H}HEHtHEHǸHEHHEHEHtHEHOHEHHEHHEHHEHHEHHEHHEHHEHEHEHHEH*EHEHUHH H}HEHtHEHǸHEHHEHEHHEHUHH H}HEHtHEHǸHEHHEHEHHEHUHHH}HEHHEHHEHHEHHEHHEHHEHfiber.channel(size): bad argumentsbox.channel(size): negative sizebox.channel: Not enough memoryridusage: channel:is_full()usage: channel:is_empty()timeout must be a numberwrong timeoutusage: channel:put(var [, timeout])usage: channel:get([timeout])broadcast_messageusage: channel:broadcast(variable)usage: channel:has_readers()usage: channel:has_writers()boxipcbox.ipc.channel__gcis_fullis_emptyputgetbroadcasthas_readershas_writerschannel?intn^24 W g  |# # r9/WL/H1hch;`ptr?XlLLLhLWdRWLLRXchVh\WL\Xch`hfWLfXchjhpWtLpHrhtopsWXchtPrid`W\WLHtopWdhchXridPWLLۥXchݱhWdWLXchhWLXch hbLhr ! rebewD<ne* % $ > $ >   I&I: ; I< I I  : ;  : ; I8  : ;( .: ; I@B : ; I  4: ; I 4: ; I : ; I 4: ;I .: ;I@B : ;I .? : ;@@B 4: ;I I!I/ 4: ;I? < 4: ; I? < wwVvVWwWXwX[w[vwwwvwwwvwwwvwwwYvYZwZ[w[^w^XvXYwYZwZ]w]vwwwv w  w  w p vp q wq r wr u wu v w, 8 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partylua_ipc.ccstddef.hlua.hlauxlib.hev.htarantool_ev.h /KJtXKZKuZuZKZ=Y22JtXKuKY2JtXKYKY2JtXKYKY2"ZYɭYLZLKv!!)u!Y2fftXKZgYɭvLu!!Y2YZL/>Y2YYKY2YYKY2 `ZYYlbox_ipc_channel_get_Z22tarantool_lua_ipc_initP9lua_Statecountev_rt_nowshort unsigned intlbox_ipc_channellua_Integerlbox_ipc_channel_is_fullEVBREAK_ONElong long unsigned intunsigned charretvalluaL_Regev_tstamplong unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srclbox_check_channelnargdoublefuncEVBREAK_ALLptrdiff_tlbox_ipc_channel_gclbox_ipc_channel_putunsigned intcharlua_Statetarantool_lua_ipc_initlbox_ipc_channel_broadcastipc_channellbox_ipc_channel_has_writerssizetypelong long intchannel_metatimeoutipc_metalbox_ipc_channel_has_readers/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/lua_ipc.ccchannel_libshort intlong intTIMEOUT_INFINITYlong doubleGNU C++ 4.7.3signed charEVBREAK_CANCELsizelbox_ipc_channel_is_emptynamelua_CFunctionGCC: (Debian 4.7.3-4) 4.7.3zRx WAC R <*AC e \qAC l |AC  AC  FAC A AC  6AC 1 qAC l <qAC l \AC  .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @ P20 &L ,L 6`  1>C >0@ O]k m0hJ0 <|J 0A08UXxJ P' 8- W->W*bqFZ#Y6Nq{ q     '2@Uer(O`m~Fpq  lua_ipc.cc_ZL16lbox_ipc_channelP9lua_State_ZL11channel_lib_ZL18lbox_check_channelP9lua_Statei_ZL19lbox_ipc_channel_gcP9lua_State_ZL24lbox_ipc_channel_is_fullP9lua_State_ZL25lbox_ipc_channel_is_emptyP9lua_State_ZL20lbox_ipc_channel_putP9lua_State_ZL20lbox_ipc_channel_getP9lua_State_ZL26lbox_ipc_channel_broadcastP9lua_State_ZL28lbox_ipc_channel_has_readersP9lua_State_ZL28lbox_ipc_channel_has_writersP9lua_State_ZZ22tarantool_lua_ipc_initP9lua_StateE12channel_meta_ZZ22tarantool_lua_ipc_initP9lua_StateE8ipc_metalua_gettoplua_isnumberluaL_errorlua_tointeger_Z15ipc_channel_newjlua_newuserdatalua_getfieldlua_pushstringlua_pushnumberlua_settablelua_setmetatableluaL_checkudatalua_isuserdata_Z18ipc_channel_deleteP11ipc_channel_Z19ipc_channel_is_fullP11ipc_channellua_pushboolean_Z20ipc_channel_is_emptyP11ipc_channelTIMEOUT_INFINITYlua_tonumberlua_getmetatablelua_gettablelua_pushvalue_Z23ipc_channel_put_timeoutP11ipc_channelPvdlua_pushnillua_settop_Z23ipc_channel_get_timeoutP11ipc_channeldlua_typelua_remove_Z23ipc_channel_has_readersP11ipc_channel_Z21ipc_channel_broadcastP11ipc_channelPv_Z23ipc_channel_has_writersP11ipc_channel_Z22tarantool_lua_ipc_initP9lua_State_Z27tarantool_lua_register_typeP9lua_StatePKcPK8luaL_Reglua_createtableluaL_register1Gd q ( P! " o #$0%A&n x'()(9 sFg*x+( , +1M-gy .   / o#/0@f on#$%$1%2$3-%>4O+n(  .$ 1:-l53/ #064$0 $,3=%N7m (8/ # # 0 #,1=%N9b%s4$ K8+ ' h4 U :f +   <  "  # =  > % 4 (Z08Y@HPX p   \ ! ) 0 7 > KE L S a h  q x   `    3 H o  . O ' - 3 T: ^DLWT j rU{   0W ` C j -5M {W_g  }   ~Z  %X. .e u ZY @fW . Y  e'= ;M ?W_ g }  q  ` o   q   $} , 5 !BK 6X A    @W`ZY @ `q lua_socket.cc.o/1378727473 1000 1000 100664 67008 ` ELF>@@/,UHHHEE]UHH}HE@(]UHH H}HuEEHEHUHHUHEHUHH(EH}\EEHEEf.rHEf(\MMHEHUHUHH}HEHUHPHEHUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH\UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HHEH@HH)H]UHH}HEHPHEH@ HHHEH@HH)H]UHH@H}HuHUEHUHEHHHEHHHEHpHEHUH}HEEHEHEHPHEHHEHPHEUHHH}HEH UHHH},HEHHEHEHHHEHEHHHKHEHuUHH@H}EHdHHPHHEHHHEHEHEH+HEHEHHHEHdHH9EHEHEE\EMf(\f(EfWf.Er)HdHHHHsn EfWf.QUHH0H}HEHfHEHEHHHEHdHH9EtHEHHHHEH"t(HEHHEHEHHHEHEHUHH H}uHE辐HHEHEHHEHHEHHEH0HHEU䉐HEHǀHEǀHEH`H^HEHpHNUHHH}uHEH;EtHEHǸMHEHUHH H}uUHEHHEHEH0HNtHEHǸHEUHH}HEǀ]UHH@H}HEHHtHEȋuHEHEȋHXHUHEAHѺHǸHEHHHEHHUHHH}uEHHHEHHUHHH}HuHEHcHEHHHEx%HEHHEHH HEuHEHUHH H}HuUHEU쉐}nuHUHHUHEHH'UHH H}HuUHEHUHMHEHHsUHH H}HuHUMHUHEHHUHMHEHH.UHH H}HuUHEHUHMHEHHUHH H}HuHEHHHEHEH HHEHHHEHHHEHHUHRHHEHPHEHUHH H}HEH-HEHE@XHHEHHUHHH}HEH-UHHH}HEHUHH H}HEHHEHEH0Hht HEHHt"HEHHHEHǀHEHHEH0HHEPXHEP(HE@(tHEH`HRHEHpHBHEHUHH H}HEHHEHEHEHEH7HE@XU։tHMHEHHHEHUHH H}HEH HEHUHEHHUHSHhH}HEHHEHEHHEHEHHEHHEHEHtHEHEHEHEHEH0H7tHMHErHHHEHHEHMHUHEEHHHEHUHUHuHEEHEH}u!HMHEHH@HEHUHHEEHEHUHJ0HUHEEHHEHEH}tHMHEnHH0HEPXHEP(HEHHEHXHHCHt;HHEHEHHMHEHHMHHh[]UHSHxH}HEHHEHEHUHEHHEHHEHEHtHEHEHEHEHEHHu!HuHEkHHEHHEHMHUHEEHHHEHUHpHEEHsE׀}t!HuHEnHPHEHUHHEEHEHUHMHy0HMHEEHHEHUHEH9s1HUHuHEnHEHEHpH]+HEHpHHEHHEHHHHHHvHtHtIhHHEHEHpHEHuHEѺH2Eċ]HHEHEHpHHHx[]UHSHxH}HEHxHEHEHEHHEHEHtHEHEHEHEHEHHuHMHEkHHHEH=HEHHHEȋEHcHEHHH)HHEH} HEHMHUHEEHH!HEHUH`HEEHE}tHMHEnHHHEHUHHEEEHcHEH8HH)HHEHEHUHMHuHEEHaHEHEH`H+HEH;E}DnuHMHEnHHMEHUHEHHtE]:EHcHEHHHEHHHEHPEHHHEHPHHHHrHtHtEdHHEHEH`HXHMHEHHE]HHEHEH`HHHx[]UHSH8H}HuЉUEHEHEHcHHHHHHEHEHcHHHHHHEHEHcHHHHHHEHHPHEؾHHCEHcHHHHHHEHH@HuHEؾHǸHEؾHEUHE؉HH8[]UHH}uЈEE_EHcHHHHHHEHHHEHcHHHHHHEHЋHH:EHEHcHHHHHHEHHHEHcHHHHHHEHЋHH9HtEEHcHHHHHHEHЋ}EHcHHHHHHEHEHcHHHHHHEHHHEHcHHHHHHEHЋHH:EHEE;E]UHHH}HEHHEHHEHHEHUHH0H}HuHUEHEHt7 tF/HEHH7HEHt1HEHHEHEHEHEHHEHǸHEHHEHHEHEHt9HEHEHEHUHHEH@E(HEHtHEHǸEHEHtHEHǸHEHEHEHUHEHEHHEHEHtHEHǸEHEHEHEHUHHEHǸEUHSHHhHhHHEHEHHu"HMHhkHHVqHEHEHHEHUHMHhHHEԋUHhHEЃ}uHhHǸHEHxHUH``HHHxHUH`H``HJEπ}t"HMHhnHHkHEHxHH``mHEHEHHHEEHcHHHHHHEHHHHEUHMHhHHEH;EuqHEHHHUHhHHHEHHUHHJHUHHPHhHHEH`H HEHH;EHxHUHHrHMH``HHEH}u]nu HMHhnHHEHUHhHHEHEH`He]HEHPHEHЋMHEHOEHE}y'HEHxHH``pHEH`HHEHHHUHhHHHEHPHEHHEHPHhHEPMHhHHHHHuHtHtHgHHEHEH`H@HMHhHHsE]HHEHEH`HHHĘ[]UHSHHH}HEHHEHEHHEHEHHEHHEHEHtHEHEHEHEHEH0HltHMHErHHHEHHEHEHUHuHEEHEH}uHMHEHH=9HEHP0HEHHHEHHEH\HHHHtHHHEHEHHMHEHHHH[]UHH H}HEHHEHEHHE@X։tHMHEHH2HEHUHSHHHH$HEHHEHHt'HHHHEHEH HHHHHEHEHx0HEH@HHHE؉PXHE؋PXHE؉P(H HH@$A IȹHEԃ}tHMHHHRHEH[HHHHHHH HHHOHH:Ht2HHEHMHHH1HH[]UHSHHHHHEHEHUHHHEHHHEHHHEHHEHHt'HHHHEHEHHEHMHUHHHHEHHEHMHHuHEHHEHMHUHHHyHEHU؋HUHuHHEH}u(HuHѺH.HEHUHH2HEH@HEHE@EHEH0Ht(HE؋HEHMHy0HEDEHUHMHy0HMHuHEIȹHEH}t HEHH}uFnttHuHnHHUHHHfHHQHtIHHEH}t HEHHuHѺHZHH[]UHSHHHHHEHHEHHEHHt'HHHHEHEHHEHHu HEHHEHHHEЋEHcHEHHEHcHEHpHEHx0HEH0HAIȹHEH}uMnu$HMHHH0HUHHHRHHH0$A IȹHEă}tHMHHHdHEHHHUHHHHHHHHHHHHHOHH:Ht2HHEHMHHHHH[]UHHH}HEHHEHHEHHEfWHHEHHEHHEHHEHHEHH@HUHEEHHEHHEH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/mutex.hf == fiberbox.socket: incorrect method callbox.socket: socket is not initialized/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/lua_socket.ccs->iob == __nulltcpudpbox.io.%s(%d)Host name resolution faileds->io_r.fd == -1box.io.readline: bad separator box.io.readline: bad argumentbox.io.readline: bad separator table(*__errno_location ()) == 110SHUT_RDSHUT_WRSHUT_RDWRbox.socket__gc__tostringerrorcloseshutdownconnectsendrecvreadlinebindlistenacceptsendtorecvfromtimeouteoflimitint lbox_socket_sendto(lua_State*)void mutex_unlock(mutex*)int lbox_socket_close(lua_State*)void bio_initbuf(bio_socket*)? -#5}9)W# }}E3& }}=*"E" }}) -#"z}-#"@}1$"H}9Exception11SocketError6Object11SystemError! (8OHH#### f- պ 2  4    int    Ɣ fB ##H+-#.#!S#  -W##W#gH ####Ho60&1-3`#`####`#&pH079#:#;#<# =#>#?M# @#( . p p#?$ #% #&#)O+^ (*,#,#,#,#cb,#,#    i 07p9#9#9#9#cb9#9# fd;#(<#,    p ir  O sp# #)ctx$#%#&#-R.R#/R# )(57#buf8M#pos:M#end#  ` km#o#posq#s#iovz+#+H;HHĉ_lj#H#inX#out#0 ;MCO#cswQ#R#T#(fidV#0sid`#4b)#8c)#Hfi#Xj#`k#xlC# %d+)#AHI#J#0KI#`LI#piobM#O#P# ;< pos#sep ##$, , , #4 #6#9 #'   log,<    /    1    < !<   " , # #$"Z a  %&, w  $*    , &+      'H  < < (  )  * , ( (, +G^,|p p -ev|w h . / h/ `/^X ^.+ /^X/ P01^h28Z /8Z h )2N /NZ h/NZ `.Z /ZZ h,oZ  /oZ h,2 /Z h,Ge /Ge h X,N /Ne h37^/7w X-buf7e P-sz7H/8^@04n;^h.4E-m4Eh I.:-m:EX04f=`01=h  )3Mp X-mMEH/M^@01P^h54fRX01R`.-mEH04f`6  71h01X H3Tm-LTmX/TT04sVsh  3js-Ljmh/jd3ss-LsmX/sT04sush2B-ssh.-ss06 1@1 hH3+-Lmh-sdd01+  ;H3x-Lmh-ss`3-Lmh-ss`/\3-Lmh-ss`/\3f-Lmh-ss`-szX/T3-Lmh-ss`/\3 -LmX-ssP04ine h3\-LmX04ssh3-Lmh3-Lmh3!-LmX04ssh61 1H!!89LmX0:ssh:howd8"9L"mX0:s$sh829L2m0:s4sP;5 H;6 @;7X;?^;?^:aiA7:rH0:eO<(8i9Lim~0:sksP;l:bufm H;nX;v^;v^;xp G:rc}7:nwr^=:e5:e ( 8"9Lm~0:ssH:szD;X:ine ;^5:rcT;^;^;p :nrd^= :e"5:e' >9LmH9rs@9idx0:i\  ?9rsX@T9chrPA0:i l>N9Lmh8&9L&mX@&P@'H0;)l  8s<9Lsm~0:susH;z;{~;|D;~@;^~;^~;p ;X;:ine :rcT7:rs0:nrd^=&:e<5:eA 89Lm0:ssP; H; @;X:ai0:e8L9LmX0:ssh89Lmv0:ssP;X;gv;sH;&w;'v:rc(D0:e",,'H8@9L@m}0:sBsH;C:bufD @;E ;F ;GX;M^;M^~:ssPg}6 :aR;SP;T~:nwra7t:aY0:ekH"8 9Lmu0:ssP;L;X;gv:ine @:nrd;w;v:rc0:e B!9Lmh0;%! ;:! i%!H!i:!H*!J!CDy?!w!     )D>! W!ED^D  : ;  : ; I8  <  I I I $ > &I : ; (  : ;  : ; : ;I8  : ;I8  : ; : ; I8  : ;  : ;  : ; I8 2  : ; I8 2 .? : ; @I< dI4 .? : ; @L M < d .? : ; 2 < d!.? L 4 < d" : ; # I8 4 $.? : ; < d%.? : ; L < d&.? : ; @I< d'!I/( I)* I+.: ;I@B ,.: ; I@B -: ; I ..: ; @B /: ; I 0 14: ; I 2.: ; @B 3.: ; I@B 44: ; I 5 U64I4  7 8.: ;I@B 9: ;I :4: ;I ;4: ;I << = U>.: ;@B ?.: ;I@B @: ;I A : ;B.? : ;@@B C!D4: ; I? < E4: ;I? < wwvwww+v+,w,-w-0w0bvbcwcdwdgwgvwwwvwww&v&'w'(w(+w+evefwfgwgjwjwvwxwxywy|w|vwwwvwww v  w  w wvwwwvwwwvwwwvwwwvwww@v@AwABwBEwEvwwwvwwwvwwwvwwwvwww`v`awabwbewevwwwvwww7v78w89w9<w<vvvwwwxwx{w{vwww> v> ? w? @ w@ C wC ] v] ^ w^ _ w_ b wb | v| } w} ~ w~ w r vr s ws t wt w ww  v  w  w  w 9 v9 : w: ; w; > w> v w w w vwwwvwwwvwwwvwwwvwwwvwwwvww w vwwwHvHIwIJwJMwMJ!vJ!K!wK!L!wL!O!wO!$v$$w$$w$$w$K'vK'L'wL'M'wM'P'wP'?(v?(@(w,@(/_oo OO\t\tdtt /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/netinet/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hevio.hrlist.hiobuf.hcoio_buf.hmutex.hlua_socket.ccstdarg.hstddef.hlua.htypes.hstdio.hlauxlib.huio.hsocket.hsockaddr.hstdint.hin.hnetdb.herrcode.hsocket.h sio.hcoro.h coro.hfiber.hsocket_type.hexception.hobject.hsay.htarantool_ev.h Ku|2KK2.tu..5/!.".<tX=.3'h.05gKv.2/O .ɃYM!gut Y!.KK.KYY2YYY2KgYK .2tXL,$2Y2%Y3/ftXY2/3g/3/2/&Y2KY . . .Kg/Y .K=Y .K/ .KXKY=׾*u*gܼxɻ tKJKYg)[ Yto8ytK=Y /ذg% Y[uko8y t=uY#T&YzJt\y S$0#uZJY2Y=3=u7\wVY]uYYuYYu[Yu0Ya.! =./u"u<=g))g""6,%=:u)Yi`"X% grp9x  KY=׼*ugx* t tKY./u'=w/ :gػo /utK'&)&0u(׻g(?u uYsu# /u<='1MGu$:hgYY=EVBREAK_ONEf_datachargp_offsetcapacityiobufmutex_lock_timeoutstatus_strssa_datatarantool_corobio_pushsocketsockaddractivem_filebuf_sizenextlast_stack_framem_errmsgerrmsgnarglbox_socket_closecoro_contextrlist_emptywaiterBIO_LIMIT__socket_typeBIO_ERRORlinkev_watcher_listlbox_socket_readlineiov_basebio_socketlimitlbox_socket_recvsocktypeprevlbox_socket_recvfromrlist_add_tail__vtbl_ptr_typelbox_socket_connecttarantool_lua_socket_initsep_sizelistsigned charlbox_socket_bindSHUT_RDWRuint32_tin_addr_tlbox_socket_tcperrcode_recordiov_lenreadline_state_initbio_initbufhbufmutexluaL_Regaddrinfoevio_timeout_initoverflow_arg_arealong long unsigned intTNT_ERRMSG_MAXobufhostheadeventssin_familyev_rt_nowin_port_tev_ioSHUT_RDcorosin_zero__gnuc_va_listseplists_addrev_nowsize_tsa_family_tai_addrGNU C++ 4.7.3EVBREAK_ALLfunclbox_socket_metaelapsedbio_pushrecverrorflagspending_ZNK9Exception3logEvBIO_EOFbio_pusherrorcodeerrorsockaddr_storagelbox_socket_sendbio_status__ss_alignlua_CFunctionpalloc_poolbottomdata_vptr.ObjectSOCK_DCCPssize_tss_familyuint8_tsbufmutex_destroySOCK_PACKETcfg_readahead_saytnt_error_codeserrdescva_listSOCK_DGRAMreadline_stateevio_is_activelong long intsin_portio_rcoio_bread_timeoutio_wboollbox_socket_readline_crmatchai_nexttimed_outto_readoperator=sizelbox_socket_tostringsin_addrbio_pushsockerrorai_canonnamelua_Statefiberbio_checkactivesocketio_w_mutexpoollbox_socket_readline_optsmutex_unlockev_tstampreadline_state_nextlong doubleuint16_tTIMEOUT_INFINITYExceptionSHUT_WRai_familyaddrlen_ZN6ObjectaSERKS_SOCK_STREAMrlist_firstlbox_socket_udp~Objectm_lineerrornoshort intrs_sizelong intdelay~Exceptionbio_pusheofprioritycoiotypedef __va_list_tag __va_list_tagrlist__ssize_tsockaddr_in/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/lua_socket.ccfp_offsetrlist_createnamestartunsigned intSOCK_CLOEXECstackclientmutex_createbio_pushstatusibuf_sizesizetypelong unsigned intIOBUF_IOV_MAXibuflbox_socket_errorqueuereg_save_areaportSOCK_RAWfirst_matchedin_addr__ss_paddinggc_poolai_protocolai_socktypetypebio_checksocketunsigned char__socklen_ttimeoutSOCK_SEQPACKETlbox_socket_acceptevio_timeout_updateerrflagsaddrbio_pusherror/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcstatebio_pushsenderrorio_r_mutexitemai_flagsSocketErroribuf_unusedrlist_delBIO_TIMEOUTsocketlib__mptrsa_familyshort unsigned intlbox_socket_listeniovec__PRETTY_FUNCTION__SOCK_NONBLOCKbio_clearerrsle_nextdoublestack_size_Z25tarantool_lua_socket_initP9lua_Statelbox_socket_shutdown_ZNK9Exception6errmsgEvEVBREAK_CANCELai_addrlenObjectsocklen_tsocketlib_nameerrstrSERVICE_NAME_MAXLENSOCK_RDMlbox_socket_sendtoGCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <AC Q \7AC r |]AC X !AC \ FAC A ?AC z AC M ;AC v <&AC a \1AC l |~AC y AC U QAC L AC  AC  AC  <SAC N \WAC R |AC S zPLRx  $AC  2AC m AC   XAC S @:AC u `EAC @ ?AC z AC { HAC C AC Z AC Z  AC  @AC  `6AC q $JAC E@ $zAC Ep $8AC E  AC E AC  <ZAC U \AC  $yAC Hl $ AC E AC | $TAC H $|iAC H\ $AC H dAC  .symtab.strtab.shstrtab.rela.text.rela.data.bss.rela.rodata.rela.gcc_except_table.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS11SocketError.rela.rodata._ZTI11SocketError.rodata._ZTS6Object.rela.rodata._ZTI6Object.rodata._ZTS11SystemError.rela.rodata._ZTI11SystemError.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@-H-P-X-`-h-p-x- @(0- +( &H`- 1(;(x 6-HX-C-Z/ v0/qH-H/`/H-x//@0-// pH-1/!,P4-=QKU[g0V0-"jg}Jix8-%0r5 0G}d}h}Pp-*pH.X t      1 ,7M c]i !v F '? f x; & 1 ~  Q, L e   AS W 0 NP 2   aXC :s E 8? w H" ? B ^ b }  " s   6 : J( zI j   Z " yG h  I K!i#  $0`m`0 !"$%')*(!2@Xhu  % 1 A U m x         . ; K ] !o   !          > V ] l      K  L't    !  ! ! !0 !< b !lua_socket.ccev_now_ZL14evio_is_activeP5ev_io_ZL17evio_timeout_initPdS_d_ZL19evio_timeout_updatedPdrlist_createrlist_add_tailrlist_delrlist_firstrlist_empty_ZL9ibuf_sizeP4ibuf_ZL11ibuf_unusedP4ibuf_ZL18coio_bread_timeoutP5ev_ioP4ibufmd_ZL12mutex_createP5mutex_ZL13mutex_destroyP5mutex_ZL18mutex_lock_timeoutP5mutexd_ZL12mutex_unlockP5mutex_ZZL12mutex_unlockP5mutexE19__PRETTY_FUNCTION___ZL14bio_pushsocketP9lua_Statei_ZL14socketlib_name_ZL15bio_checksocketP9lua_Statei_ZL21bio_checkactivesocketP9lua_Statei_ZL12bio_clearerrP10bio_socket_ZL11bio_initbufP10bio_socket_ZZL11bio_initbufP10bio_socketE19__PRETTY_FUNCTION___ZL14bio_pushstatusP9lua_State10bio_status_ZZL14bio_pushstatusP9lua_State10bio_statusE11status_strs_ZL17bio_pusherrorcodeP9lua_StateP10bio_socket_ZL13bio_pusherrorP9lua_StateP10bio_socketi_ZL17bio_pushsockerrorP9lua_StateP10bio_socketi_ZL17bio_pushsenderrorP9lua_StateP10bio_socketmi_ZL17bio_pushrecverrorP9lua_StateP10bio_socketi_ZL11bio_pusheofP9lua_StateP10bio_socket_ZL20lbox_socket_tostringP9lua_State_ZL15lbox_socket_tcpP9lua_State_ZL15lbox_socket_udpP9lua_State_ZL17lbox_socket_closeP9lua_State_ZZL17lbox_socket_closeP9lua_StateE19__PRETTY_FUNCTION___ZL20lbox_socket_shutdownP9lua_State_ZL17lbox_socket_errorP9lua_State_ZL19lbox_socket_connectP9lua_State_ZL16lbox_socket_sendP9lua_State_ZL16lbox_socket_recvP9lua_State_ZL19readline_state_initP9lua_StateP14readline_statei_ZL19readline_state_nextP14readline_stateic_ZL23lbox_socket_readline_crP9lua_State_ZL25lbox_socket_readline_optsP9lua_StatePjPd_ZL20lbox_socket_readlineP9lua_State_ZL16lbox_socket_bindP9lua_State_ZL18lbox_socket_listenP9lua_State_ZL18lbox_socket_acceptP9lua_State_ZL18lbox_socket_sendtoP9lua_State_ZZL18lbox_socket_sendtoP9lua_StateE19__PRETTY_FUNCTION___ZL20lbox_socket_recvfromP9lua_State_ZZ25tarantool_lua_socket_initP9lua_StateE16lbox_socket_meta_ZZ25tarantool_lua_socket_initP9lua_StateE9socketlibev_rt_now_Z12ibuf_reserveP4ibufm_Z23coio_read_ahead_timeoutP5ev_ioPvmmd_GLOBAL_OFFSET_TABLE_fiber_Z19fiber_yield_timeoutd__errno_location__assert_fail_Z12fiber_wakeupP5fiberlua_newuserdatalua_getfieldlua_setmetatable_Z9coio_initP5ev_iolua_gettopluaL_errorluaL_checkudata__gxx_personality_v0snprintf_Z9iobuf_newPKc_Unwind_Resumelua_pushstringlua_pushintegerstrerrorlua_pushnillua_pushlstring_Z14sio_socketnamei_Z12iobuf_deleteP5iobufev_io_stop_Z10evio_closeP5ev_ioluaL_checkintegershutdownlua_settopluaL_checklstringTIMEOUT_INFINITYluaL_checknumber_Z13coeio_resolveiPKcS0_d_Z21coio_connect_addrinfoP5ev_ioP8addrinfodfreeaddrinfo__cxa_end_catch__cxa_begin_catch_ZTI11SocketError_Z18coio_write_timeoutP5ev_ioPKvmd__cxa_rethrow_ZTI9Exceptionlua_nextlua_createtablelua_pushnumberlua_rawsetlua_isnumberlua_typelua_objlenpalloclua_rawgeti_Z18evio_bind_addrinfoP5ev_ioP8addrinfo_Z18sio_listen_backlogvlistenlua_touserdata_Z11coio_acceptP5ev_ioP11sockaddr_injdgetnameinfo_Z9evio_ptonPKcS0_P16sockaddr_storagePj_Z11evio_socketP5ev_ioiii_Z19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injd_Z21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injd_Z25tarantool_lua_socket_initP9lua_State_Z27tarantool_lua_register_typeP9lua_StatePKcPK8luaL_RegluaL_registerlua_settable_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS11SocketError_ZTI11SystemError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoE_ZTS11SystemErrorX2YcZ\N\n]\^\" , 1 K6_`a bcddXek Xxf g f  P* / 4_H  O m ijk lm"n4lN  VlomP <Xlp" q4 l r s t(  2 7 =< _ u v ^ wn x x y e zP {` ^ | } w) ~> N }S ^o ~y k x y e zLm`~p~^~k-u7yGebz^$pP~]~x^~k ox Pfwl ole]wu qfu3zl qf qfzu 3 q@fXzs qfy4I Vf5{p/^p7oQe~u~^~k9xSx^ynez{ ^;G}Xwi~tkk}^~^>wwyez" p  o l l ~ !!^3!~=!k!x!x!x!y!e"z{""{"^###}#^# # # $_7$mH$~]$t$}y$^$~$k$u$y %e*%z%Y%%^%^_&&p&o&l&l&~ ''^4'~>'k]' `b' j's' `x' '' 'l''' 'l'l''' 'l()(:(w`h} px } s : % */8=DI K(K!0R8$` h? px^ < t x  , \    G La LQ L? !@() K. L!K LP L\ Lj Lx L LW L L L LF L L L0 L L L& L" L\ ) L0 L 7 L> LC L;T L_ Lcj Ltv L L{ L L  L? LA L  L L L Lj L  L LY L L L8 $ LM/ Lv; L I LPh Lt Lk L L L  L` L Lu L< L L L L  L8 LE( L6 LD LR Lq L}~ L  Lh L L L  LY L LO  L2 L # L1 L# H LX L _ Lj Lw L L L LG L L L  L L' LGD La L L  L Lo L L LX  L Lc * L56 LsD LY L:e L L" L4 L, L L Ls L"< L+Q LS ` L L L L L L L~  L & L4 LJ LnV LQe Lq L w L } L L LH L L' L  L Lj L L- L= LVW Lf Lu L L L L LV LV L- L = LLK L c L L Li Lz L L?) 1 9 H? LI Q ,Y H`s L,~ L , c H L L L L c  H  L L t  L, L2 : B HL La Lg o 'w H L L L ' f H@ L L f x H L L x  H$ L 3 L= E M H`W L:l L v ~   H L: L    H  L  L # L'/ HL LRZb Hx L  L1 H@ L L% J6/>KG L Y L_go H L$  L _{ L  Lg#A+ HA LjOW?z LA H` L L H L LF $, H C L]IQY Hpx L$ P L L L H  LD!< LFNaV H@y L1 a H L L H  L L !8) H` X Lg Lq8yw H  L Lw H  Lx ? ( H > F= ] L"g? o^ w H  L^ }  H@  L} s  H  q  L$  7 L Bs J R H i q  L? :  H`  8  L:   H G %} ; LJ LeY Lh Lx L  ( }  L  L  H & .D Lc Lr L L LW: J0 J` LY'/ H G Os L La J L L LW J  J- LI4<D H y L H@ Ls Lsy  L1'/7 HO LZbj H LS L L0 L* H` LS. L> L0M L\ Ll L| LW L@ LI J ' JPG LRZb Hz L Le Lh L I H -5GM LXI`K!h H\A! L L,  L Li L} A!2 L" =K!E$M He^!m$ L L Le L L L L$ " L, 1 LrQ"YG#uG$}$ Lx$L' H@$B' L L L, N Li^ L}} & B' L Ln L' @( H X' >( L ` L !`K! Lx! L! L! LE! L! L! L ! F @`,c'f x@`  @A` h $aDd8w? ^ $} Ds d :    @ | @`  I 0K!! `@$I hL'session.cc.o/ 1378727472 1000 1000 100664 35528 ` ELF>05@@DA "$%'(*,./UHH}EUHHH}HdH@4HxH*HHH H*XHEHUHH H}HEHtHEHǸHEHEE>*HEHUHH0H}HEHtHEؾHǸHEHuHEؾHHdH@4EEEHUEH։HEHHHEHHHUHATSH@H}HEHEHHHEHHEHEPHHHHMHHHEHHUܾHHHHIHLHHHHu(HHEHUܾHHHUܾHLD$|H$AA|AҿHHEHI3|H߸HH@[A\]UHHH}HuHEHu+HEHtHEHttHEHǸHE@t2HEPHEHHEPHEH HEHHEHt*HE@HEHHHEHH@HHEHHEHHEPHEHHHEHHUHPUHHH}HEHUHHH}HEHuUHHH}H HEHHHEHUHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHbox.sessionsession.exists(sid): bad argumentssession.peer(sid): bad argumentsClientError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/session.ccsession.on_connect(chunk): bad argumentsidexistspeeron_connecton_disconnect =,!V D$}11ClientError9ExceptionUHHH}HEHHEHt HEHUHHH}HEHHEH6Objectj Cint0x13( ## # # f 2"  43 9 fH H  TY  N# (#f ` r    sp #   #8ctx $# % # &8##o$N#%N#&m#)x      !"#$%&'()*+,-./0123456789:)-H.H#/H# MO #cswQf#R#T#(fidV#0sid`#4b#8c#Hfi#Xj #`k#xl%#      NY[_]+#^ #`u#_#j###x]_#ref`f# 6$#4N#6#9#'Nlog,/ N 1 f  #!"=D"&Zgf!*x #+ Y$  % f& ' %%(D#)#)*NW+h*}+h,$))*+h*  +h-PA A .sidPl-5fy .L5y h "-?f .L?y X/0sidDl-Mf< .LMy H/0sidRl0fdUfh1VP2i 3i 41k X0LnHP1ofL40ew @  %-f .Ly h3 `-f- .Ly h-f^ .Ly h5 .Ly h6    f  , U ) ) *   + h* > G + h7+y 8 D8m 97yb  f N f N N&7>  z 7o  N7b67d61*N 1c 1e g) 1>  gS 1h C % UR$ > : ; I$ > I!I/  : ;  : ; I8  <  I I I&I : ;(  : ; : ;I8  : ; I8  : ;  : ;  : ; I8 2  : ; I8 2 .? : ; @I< dI4 .? : ; @L M < d.? : ; 2 < d.? L 4 < d : ;  I8 4 !.? : ; < d".? : ; L < d#.? : ; @I< d$!I/% I&' I(.G d)I4 *.1@@dB +1 ,.G: ; d-.: ; I@B .: ; I / 04: ; I 14: ; I 2.: ; @B 3: ; I 4 U5.? : ; @@B 6< 74: ; I? < 84: ;I? < 9!wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw%1&=&=&  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/x86_64-linux-gnu/bits/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/luaobject.hexception.hsession.hsession.ccstddef.hstdint.hstdarg.hlua.hlauxlib.hev.hcoro.hcoro.herrcode.hsay.hrlist.hfiber.hsockaddr.hin.h init.h % % ## # c.=Y5YZ=Y5YZX.>./gYny3UgYg?B"ZJtXM\uY22. # S_INFOon_disconnect_ZNK9Exception3logEv__in_chrgsize_tER_ARG_TYPEsession_on_connectER_NO_SUCH_INDEXS_FATALin_port_tER_INJECTIONgp_offsetprevva_listGNU C++ 4.7.3sessionlibev_tstamplong long unsigned intin_addr_tEVBREAK_ALLaddron_connectER_EXACT_MATCHnextsession_triggerER_MEMORY_ISSUElong long intsigned charER_OKm_errmsgER_FIELD_TYPEm_linestackS_ERROR_ZN6ObjectaSERKS_statelong int~ObjectObjectgc_poolER_WAL_IOS_DEBUG_sayuint16_tlbox_session_existslua_CFunctionER_RESERVED12thisER_RESERVED14tnt_error_codes_enumsockaddr_inER_RESERVED16linksin_zero_ZN11ClientErrorD2Ev__vtbl_ptr_typeunsigned intsay_levellbox_session_triggertarantool_LS_CRIToverflow_arg_areaER_UNKNOWN_UPDATE_OPlong unsigned intER_RESERVED11ER_KEY_PART_COUNTER_RESERVED13_ZN9ExceptionD0EvER_RESERVED15lbox_session_set_triggerER_RESERVED17ER_RESERVED18ER_RESERVED19ER_UNUSED29S_WARNER_ILLEGAL_PARAMSsin_addrnamesession_on_disconnect~ExceptionER_NO_SUCH_FIELDev_rt_nowtypedef __va_list_tag __va_list_tagER_INDEX_TYPEsessionlib_nameboolER_FIBER_STACKlbox_session_on_disconnectER_TUPLE_FOUND_ZN11ClientErrorD0Evsession_trigger_f_ZN6ObjectD0EvER_RESERVED20sin_familyER_RESERVED22ER_RESERVED23ER_UNUSED33ER_UNUSED34ER_UNUSED35ER_UNUSED36ER_UNUSED37sizetypeER_RESERVED21tarantool_lua_session_initER_UNUSED__gnuc_va_listluaL_RegparamER_SPLICEfiberER_SPACE_DISABLEDm_filelua_Statelbox_session_peerER_KEY_FIELD_TYPEsin_portEVBREAK_ONEER_UNUSED46ER_TUPLE_IS_ROunsigned charoperator=EVBREAK_CANCELExceptiontarantool_corocoro_refshort intshort unsigned intlbox_session_idreg_save_arealast_stack_frameER_PROC_RET/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/session.cc~ClientErrorER_SECONDARYcoroER_UNUSED24waiterER_UNUSED25ER_SPACE_EXISTSER_UNUSED27ER_UNUSED28long doublecharfuncER_TUPLE_NOT_FOUNDlbox_session_run_triggerTNT_ERRMSG_MAXsession_existstnt_error_codes_enum_MAXtnt_error_codes/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrmsgf_data_vptr.Object_Z26tarantool_lua_session_initP9lua_State_ZN6ObjectD2EverrdescER_UNSUPPORTEDlbox_session_metasa_family_tuint32_tER_PROC_LUAs_addrER_NO_SUCH_SPACEerrflagslbox_session_on_connectClientErrorerrstrpalloc_poolrlistuint8_tER_NO_SUCH_PROCfp_offsetflagsstack_sizeER_UNUSED8_ZNK9Exception6errmsgEvcoro_contexttriggererrcode_recordER_UNUSED30doubleER_UNUSED31ER_TUPLE_IS_TOO_LONGER_UNUSED32ER_NONMASTERin_addr_ZN9ExceptionD2EvGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \=AC x |&AC a AC W PAC K pAC k zPLRx  $AC  $HAC G hOAC J AC Z AC Z :AC u =AC x  &AC a .symtab.strtab.shstrtab.rela.text.rela.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.rodata.rela.gcc_except_table.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.groupp@B+pHBApPB,pXBEp`BCphB>ppBnpxBdpBppBfpB-pBtpBupBq %WB+0&]HB1;16^0BUB&P@^0Boh=jp^HB&^0B ^ BP`B (  `HB @ h`0B"` p `HB%6 R M`HB(n =i(aHB* &pa0B, 0 a0B/@ n aB1!`z@ B4 o B6 `B81!,pB:=0z& H0r0Q0f0(aB?2w0F( C= XQ !6PVlpz ^OGr`` "$%'(*, ./13468:<>? =     "1!" "1"&"=!! (0"=B"&Tdz,?Uaox-"*=B!%T`!(ox:!$ !' /!/;"*=Pb",&w!.session.cc_ZL14session_existsj_ZL15sessionlib_name_ZL15lbox_session_idP9lua_State_ZL19lbox_session_existsP9lua_State_ZL17lbox_session_peerP9lua_State_ZL10on_connect_ZL13on_disconnect_ZL24lbox_session_run_triggerPv_ZL24lbox_session_set_triggerP9lua_StateP20lbox_session_trigger_ZL23lbox_session_on_connectP9lua_State_ZL26lbox_session_on_disconnectP9lua_State_ZL10sessionlib_ZL17lbox_session_meta_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_Z10session_fdj_GLOBAL_OFFSET_TABLE_fiberlua_pushnumberlua_gettopluaL_errorluaL_checkinteger__gxx_personality_v0_Z15sio_getpeernameiP11sockaddr_in_Z12sio_strfaddrP11sockaddr_inlua_pushstring_Unwind_Resumesession_on_connectsession_on_disconnecttarantool_Llua_newthreadluaL_reflua_rawgetilua_xmovelua_callluaL_unref__cxa_end_catch__cxa_free_exception__cxa_begin_catch__cxa_rethrow_say__cxa_allocate_exceptionlua_tolstring_ZN11ClientErrorC1EPKcjjz_ZN11ClientErrorD1Ev_ZTI11ClientError__cxa_throw_ZTI9Exceptionlua_typelua_pushnillua_insert_Z26tarantool_lua_session_initP9lua_StateluaL_registerlua_settop__cxa_pure_virtual_ZTS11ClientError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTS9Exception_ZTI6Object_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD0Ev_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEF+HaIJ KLIJ 8KJ2L;HOFcNoOPQTUTVTWT XY&T6ZC[NQY\f[qQ]TZ^]TZ_ x Y e x` a2 x?bD cI dQevJgg KWZh'gki|V     `kl R S >+?@ ? C=7?D ? ` hp xl ' , 7L fDE m@Aonfopq sB7?c ?vu # ( ( ( &`- '4 (9 (4F (M (5T (S[ (Cb (Gn ( { ( ( (Q ( (~ (Y ( ( ( (/ ( (t  ( (# () (\ (_c ( h (ht ( (d ( ( ( ( ( (m  (m  (/ (s* (? 9 ( E (S (oa (x ( ( (O (  ( ( ( ( (+ (% (J  (} (w ( ( ( ( (6 (= (] (k (y (  (& ( ( ( " (( (=. (;4 (G: (@ ( F ( L ( R (X (^ (d (j (p (v (| (^ (; (w (  ( ( ( ( ( (i (  ( ( (Z ( (g (O ( ( ( (k (y (  ( ( (  ( , (: (O ([ (w ( ( (K ( (" (9  ( ( , (7 (C (z Q (q` (k (sv ( (  ( (1 ( ( ( (P ( (z  (%: (I (lX (Uh (n (U  ( (% (% ( (  (). (F (i ( (  ( (n (  (*- (`191A $\ (`h&p $` (  (* ( = $ ($& $  ( ! ) $D (8I (dS [ lc $ ( l  $@ x  (   $  - (= (|C K ^S $] (ql &q (z (> &0 (D ^  $` (z (   $. (L8 @ H $ ` (4f (6j r %z $ ( ( (  (* (Y  = $ (v! ) &1 $@H (U (n ( ( ( (G ( ((  (  (  * (6  T (`  `(00<0D1`ht|%%&<<= (4<HP%\%d&  kk$l@lHmTm\phpp|(0]<]D^`^h_t_|bb (4<HP\d$$%<<$=@HT\hp%|%& " 0@P`p:BU0B8U@{H`h%px1&=&=&-I_~i @`l  M ) DM l^ cjson.cc.o/ 1378727472 1000 1000 100664 4312 ` ELF>@@UHHH}HEHHEHHEHHEHHEHboxcjsonint(]L(hW% $ > < $ > .? : ; @I@B : ; I  Iwwgvghw,hb /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/luacjson.cc (YYlong long inttarantool_lua_cjson_initGNU C++ 4.7.3_Z24tarantool_lua_cjson_initP9lua_Statelong unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcunsigned charcharlua_Statelong intdouble/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/cjson.ccshort unsigned intsigned charlong doubleshort intunsigned intsizetypeGCC: (Debian 4.7.3-4) 4.7.3zRx hAC c .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @hx &,1 >9 XJ}hX`hE0cx0 |uw 0r0q8   t    h2?N\icjson.cc_Z24tarantool_lua_cjson_initP9lua_Statelua_getfieldlua_pushstringluaopen_cjsonlua_settablelua_settop ' /;L]  '  o!h) 0 i7 \> E ]L S FX g n u | ' : R  5h  o uuid.lua.c.o/ 1378727473 1000 1000 100664 3320 ` ELF>x@@(function(box) local ffi = require("ffi") ffi.cdef[[ /* from */ typedef unsigned char uuid_t[16]; void uuid_generate(uuid_t out); /* from libc */ int snprintf(char *str, size_t size, const char *format, ...); ]] local libuuid = nil local builtin = ffi.C function check_libs() if libuuid then return end libuuid = ffi.load('uuid.so.1') end box.uuid = function() check_libs() local uuid = ffi.new('uuid_t') libuuid.uuid_generate(uuid) return ffi.string(uuid, 16) end box.uuid_hex = function() check_libs() local uuid = ffi.new('uuid_t') libuuid.uuid_generate(uuid) local uuid_hex = ffi.new('char[33]') for i = 0,ffi.sizeof('uuid_t'),1 do builtin.snprintf(uuid_hex + i * 2, 3, "%02x", ffi.cast('unsigned int',uuid[i])) end return ffi.string(uuid_hex, 32) end end)(box) P1**N % I!I/$ > 4: ; I?  &Ijd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/luauuid.lua.c/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/uuid.lua.csizetypeGNU C 4.7.3uuid_luacharGCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rodata.rela.debug_info.debug_abbrev.rela.debug_aranges.debug_line.debug_str.comment.note.GNU-stack@!@'@,@ 9'T4 E{CX S gns0Lq~0 P       uuid.lua.cuuid_lua  W  - N4 l9 cF  trace.c.o/ 1378727473 1000 1000 100664 8320 ` ELF>P @@UHHHEH}tDHEHuHHHEHHUHSHH}HuHHHt@ÃHHMIAEپHǸH[]UHSHH}HuHHHtDHHMIAXپHǸH[]TARANTOOL_TRACEstderrw+%i %*c%p 8intii0nb##### #( #0 #8 #@ #H #P #X  #`  #h  b#p b#t p#x F# T# # # &{# /# 0# 1# 2# 3-# 5b# 7# ##b#u  n   (*h 5Zf5X6P =f=X>P%b & % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ .? : ; ' @B 4: ; I : ; I : ; I 4: ; I? < wwcvcdwdewehwhvwwwAvABw,B /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includetrace.cstddef.htypes.hstdio.hlibio.h (w&3K@yKDlong long int_IO_read_basesigned char_IO_read_endsize_t_IO_FILEstderr_IO_write_base_IO_buf_end_IO_write_ptr__off_t_IO_read_ptrlong intcallsite/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/trace.c_offset_mode__off64_t_fileno_IO_save_baseunsigned char_IO_markerlong unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcshort unsigned int_IO_save_end_IO_lock_ttrace_fd_markers_chainFILE_flags2_sbuf__cyg_profile_func_exit_old_offset_lockunsigned int_cur_columnlong long unsigned int__cyg_profile_func_enter_IO_buf_base_next_vtable_offsettrace_initsizetype_unused2levelcharGNU C 4.7.3_IO_write_endshort int_IO_backup_base_flags__pad1__pad2__pad3__pad4__pad5_postrace_shortbufGCC: (Debian 4.7.3-4) 4.7.3zRx dAC _  <mAC Ec  `qAC Eg .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.init_array.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @B`@&,1$>9OJ8[iv y0t0  00   8 H P     d#*29AdmZaiqtrace.cleveltrace_fdtrace_initgetenvstrncmpstderrfopen64__cyg_profile_func_entergetpidfprintf__cyg_profile_func_exit ' /:AL T[x  * 7   <!B) . 5; *B I {P W ^ l q u|  r   <  } (  L g   E' [6 E T c r       X      . > N ^ {o v  R     gd   ,&d.6 `L \ ckBs     E  @ddtarantool-1.5.1.218.g1a69fd6/src/palloc.cc0000664000000000000000000002662212202131537016334 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "palloc.h" #include "tarantool/config.h" #include "third_party/valgrind/memcheck.h" #include #include #include #include #include #include #include #include #include #include #include "exception.h" struct chunk { uint32_t magic; void *brk; size_t free; size_t size; struct chunk_class *clazz; SLIST_ENTRY(chunk) busy_link; SLIST_ENTRY(chunk) free_link; }; SLIST_HEAD(chunk_list_head, chunk); struct chunk_class { int i; uint32_t allocated_size; int chunks_count; struct chunk_list_head chunks; TAILQ_ENTRY(chunk_class) link; }; TAILQ_HEAD(class_tailq_head, chunk_class) classes; struct palloc_pool { struct chunk_list_head chunks; SLIST_ENTRY(palloc_pool) link; size_t allocated; char name[PALLOC_POOL_NAME_MAXLEN]; }; SLIST_HEAD(palloc_pool_head, palloc_pool) pools; static int class_count; const uint32_t chunk_magic = 0xbb84fcf6; static const char poison_char = 'P'; struct palloc_pool *eter_pool; #ifdef REDZONE #define PALLOC_REDZONE 4 #endif #ifndef PALLOC_REDZONE #define PALLOC_REDZONE 0 #endif #ifdef POISON #define PALLOC_POISON #endif static size_t palloc_greatest_size(void) { return (1 << 22) - sizeof(struct chunk); } static struct chunk_class * class_init(size_t size) { struct chunk_class *clazz; clazz = (struct chunk_class *) malloc(sizeof(struct chunk_class)); if (clazz == NULL) return NULL; clazz->i = class_count++; clazz->chunks_count = 0; clazz->allocated_size = size; SLIST_INIT(&clazz->chunks); TAILQ_INSERT_TAIL(&classes, clazz, link); return clazz; } int palloc_init(void) { struct chunk_class *clazz; class_count = 0; TAILQ_INIT(&classes); /* * since chunks are allocated via mmap * size must by multiply of 4096 minus sizeof(struct chunk) * TODO: should we use sysconf(_SC_PAGESIZE)? */ for (size_t size = 4096 * 8; size <= 1 << 16; size *= 2) { if (class_init(size) == NULL) return 0; } if (class_init(palloc_greatest_size()) == NULL) return 0; if ((clazz = class_init(-1)) == NULL) return 0; TAILQ_NEXT(clazz, link) = NULL; eter_pool = palloc_create_pool("eter_pool"); return 1; } void palloc_free(void) { struct palloc_pool *pool, *pool_next; SLIST_FOREACH_SAFE(pool, &pools, link, pool_next) palloc_destroy_pool(pool); palloc_free_unused(); struct chunk_class *clazz, *class_next; TAILQ_FOREACH_SAFE(clazz, &classes, link, class_next) free(clazz); } static void poison_chunk(struct chunk *chunk) { (void)chunk; /* arg used */ #ifdef PALLOC_POISON memset((void *)chunk + sizeof(struct chunk), poison_char, chunk->size); VALGRIND_MAKE_MEM_NOACCESS(chunk->data, chunk->size); #endif } static struct chunk * next_chunk_for(struct palloc_pool *restrict pool, size_t size) { struct chunk *restrict chunk = SLIST_FIRST(&pool->chunks); struct chunk_class *restrict clazz; size_t chunk_size; if (chunk != NULL) clazz = chunk->clazz; else clazz = TAILQ_FIRST(&classes); if (clazz->allocated_size == -1) clazz = TAILQ_PREV(clazz, class_tailq_head, link); while (clazz != NULL && clazz->allocated_size < size + sizeof(struct chunk)) clazz = TAILQ_NEXT(clazz, link); assert(clazz != NULL); chunk = SLIST_FIRST(&clazz->chunks); if (chunk != NULL) { SLIST_REMOVE_HEAD(&clazz->chunks, free_link); goto found; } if (size > palloc_greatest_size()) { chunk_size = size + sizeof(struct chunk); chunk = (struct chunk *) malloc(chunk_size); if (chunk == NULL) return NULL; } else { chunk_size = clazz->allocated_size; chunk = (struct chunk *) mmap(NULL, chunk_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (chunk == MAP_FAILED) return NULL; } clazz->chunks_count++; chunk->magic = chunk_magic; chunk->size = chunk_size; chunk->free = chunk_size - sizeof(struct chunk); chunk->brk = (char *)chunk + sizeof(struct chunk); chunk->clazz = clazz; found: assert(chunk != NULL && chunk->magic == chunk_magic); SLIST_INSERT_HEAD(&pool->chunks, chunk, busy_link); poison_chunk(chunk); return chunk; } #ifndef NDEBUG static const char * poisoned(const char *b, size_t size) { (void)b; (void)size; /* arg used */ #ifdef PALLOC_POISON for (int i = 0; i < size; i++) if (unlikely(b[i] != poison_char)) return b + i; #endif return NULL; } #endif static void * __attribute__((noinline)) palloc_slow_path(struct palloc_pool *restrict pool, size_t size) { struct chunk *chunk; chunk = next_chunk_for(pool, size); if (chunk == NULL) { tnt_raise(LoggedError, ER_MEMORY_ISSUE, size, "palloc", "next chunk"); } assert(chunk->free >= size); void *ptr = chunk->brk; chunk->brk = (char *) chunk->brk + size; chunk->free -= size; return ptr; } void *__attribute((regparm(2))) palloc(struct palloc_pool *restrict pool, size_t size) { const size_t rz_size = size + PALLOC_REDZONE * 2; struct chunk *restrict chunk = SLIST_FIRST(&pool->chunks); void *ptr; pool->allocated += rz_size; if (likely(chunk != NULL && chunk->free >= rz_size)) { ptr = chunk->brk; chunk->brk = (char *) chunk->brk + rz_size; chunk->free -= rz_size; } else ptr = palloc_slow_path(pool, rz_size); assert(poisoned((char *) ptr + PALLOC_REDZONE, size) == NULL); (void) VALGRIND_MAKE_MEM_DEFINED((char *) ptr + PALLOC_REDZONE, size); return (char *) ptr + PALLOC_REDZONE; } void *__attribute__((regparm(2))) p0alloc(struct palloc_pool *pool, size_t size) { void *ptr; ptr = palloc(pool, size); memset(ptr, 0, size); return ptr; } void * palloca(struct palloc_pool *pool, size_t size, size_t align) { void *ptr; ptr = palloc(pool, size + align); return (void *)TYPEALIGN(align, (uintptr_t)ptr); } static inline void chunk_free(struct chunk *chunk) { if (chunk->size <= palloc_greatest_size()) { chunk->free = chunk->size - sizeof(struct chunk); chunk->brk = (char *)chunk + sizeof(struct chunk); SLIST_INSERT_HEAD(&chunk->clazz->chunks, chunk, free_link); poison_chunk(chunk); } else { free(chunk); } } /** * Release all memory down to new_size; new_size has to be previously * obtained by calling palloc_allocated(). */ void ptruncate(struct palloc_pool *pool, size_t new_size) { assert(new_size <= pool->allocated); ssize_t cut_size = pool->allocated - new_size; struct chunk *chunk = SLIST_FIRST(&pool->chunks); for (; chunk; chunk = SLIST_FIRST(&pool->chunks)) { size_t chunk_used = (chunk->size - chunk->free - sizeof(struct chunk)); if (chunk_used > cut_size) { /* This is the last chunk to trim. */ chunk->brk = (char *) chunk->brk - cut_size; chunk->free += cut_size; (void) VALGRIND_MAKE_MEM_NOACCESS(chunk->brk, cut_size); cut_size = 0; break; } cut_size -= chunk_used; /* Remove the entire chunk. */ SLIST_REMOVE_HEAD(&pool->chunks, busy_link); chunk_free(chunk); } assert(cut_size == 0); pool->allocated = new_size; } void prelease(struct palloc_pool *pool) { struct chunk *chunk, *next_chunk; for (chunk = SLIST_FIRST(&pool->chunks); chunk; chunk = next_chunk) { next_chunk = SLIST_NEXT(chunk, busy_link); chunk_free(chunk); } SLIST_INIT(&pool->chunks); pool->allocated = 0; } void palloc_reset(struct palloc_pool *pool) { struct chunk *chunk = SLIST_FIRST(&pool->chunks); if (chunk) { pool->allocated -= chunk->size - sizeof(struct chunk) - chunk->free; chunk->free = chunk->size - sizeof(struct chunk); chunk->brk = (char *)chunk + sizeof(struct chunk); } } void prelease_after(struct palloc_pool *pool, size_t after) { if (pool->allocated > after) prelease(pool); } struct palloc_pool * palloc_create_pool(const char *name) { struct palloc_pool *pool = (struct palloc_pool *) calloc(sizeof(struct palloc_pool), 1); if (pool == NULL) { tnt_raise(LoggedError, ER_MEMORY_ISSUE, sizeof(struct palloc_pool), "malloc", "palloc pool"); } palloc_set_name(pool, name); SLIST_INIT(&pool->chunks); SLIST_INSERT_HEAD(&pools, pool, link); return pool; } void palloc_destroy_pool(struct palloc_pool *pool) { SLIST_REMOVE(&pools, pool, palloc_pool, link); prelease(pool); free(pool); } void palloc_free_unused(void) { struct chunk_class *clazz; struct chunk *chunk, *next_chunk; TAILQ_FOREACH(clazz, &classes, link) { SLIST_FOREACH_SAFE(chunk, &clazz->chunks, free_link, next_chunk) munmap(chunk, clazz->allocated_size); SLIST_INIT(&clazz->chunks); } } void palloc_stat(struct tbuf *buf) { struct chunk_class *clazz; struct chunk *chunk; struct palloc_pool *pool; int chunks[class_count]; tbuf_printf(buf, "palloc statistic:" CRLF); tbuf_printf(buf, " pools:" CRLF); SLIST_FOREACH(pool, &pools, link) { for (int i = 0; i < class_count; i++) chunks[i] = 0; tbuf_printf(buf, " - name: %s\n alloc: %" PRI_SZ "" CRLF, pool->name, pool->allocated); if (pool->allocated > 0) { tbuf_printf(buf, " busy chunks:" CRLF); SLIST_FOREACH(chunk, &pool->chunks, busy_link) chunks[chunk->clazz->i]++; TAILQ_FOREACH(clazz, &classes, link) { if (chunks[clazz->i] == 0) continue; tbuf_printf(buf, " - { size: %" PRIu32 ", used: %i }" CRLF, clazz->allocated_size, chunks[clazz->i]); } } } tbuf_printf(buf, " classes:" CRLF); TAILQ_FOREACH(clazz, &classes, link) { int free_chunks = 0; SLIST_FOREACH(chunk, &clazz->chunks, free_link) free_chunks++; tbuf_printf(buf, " - { size: %" PRIu32 ", free_chunks: %- 6i, busy_chunks: %- 6i }" CRLF, clazz->allocated_size, free_chunks, clazz->chunks_count - free_chunks); } uint64_t palloc_total = 0; uint64_t palloc_used = 0; SLIST_FOREACH(pool, &pools, link) { SLIST_FOREACH(chunk, &pool->chunks, busy_link) { palloc_total += chunk->size; palloc_used += chunk->size - chunk->free; } SLIST_FOREACH(chunk, &pool->chunks, free_link) palloc_total += chunk->size; } tbuf_printf(buf, " total:" CRLF); tbuf_printf(buf, " - { occupied: %" PRIu64 ", used: %" PRIu64 " }" CRLF, palloc_total, palloc_used); } void palloc_set_name(struct palloc_pool *pool, const char *name) { snprintf(pool->name, sizeof(pool->name), "%s", name); } const char * palloc_name(struct palloc_pool *pool) { return pool->name; } size_t palloc_allocated(struct palloc_pool *pool) { return pool->allocated; } tarantool-1.5.1.218.g1a69fd6/src/errinj.cc0000664000000000000000000000600512231715257016355 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include "tarantool/config.h" #include "tarantool/util.h" #include "say.h" #include "tbuf.h" #include "errinj.h" #define ERRINJ_MEMBER(n, s) { /* .name = */ #n, /* .state = */ s }, struct errinj errinjs[errinj_enum_MAX] = { ERRINJ_LIST(ERRINJ_MEMBER) }; static struct errinj * errinj_lookup(char *name) { int i; for (i = 0 ; i < errinj_enum_MAX ; i++) { if (strcmp(errinjs[i].name, name) == 0) return &errinjs[i]; } return NULL; } /** * Get state of the error injection handle by id. * * @param id error injection id. * * @return error injection handle state. */ bool errinj_get(int id) { assert(id >= 0 && id < errinj_enum_MAX); return errinjs[id].state; } /** * Set state of the error injection handle by id. * * @param id error injection id. * @param state error injection handle state. * */ void errinj_set(int id, bool state) { assert(id >= 0 && id < errinj_enum_MAX); errinjs[id].state = state; } /** * Set state of the error injection handle by name. * * @param name error injection name. * @param state error injection handle state. * * @return 0 on success, -1 if injection was not found. */ int errinj_set_byname(char *name, bool state) { struct errinj *ei = errinj_lookup(name); if (ei == NULL) return -1; ei->state = state; return 0; } /** * Dump error injection states to the buffer. * * @param out output buffer */ void errinj_info(struct tbuf *out) { tbuf_printf(out, "error injections:" CRLF); int i; for (i = 0 ; i < errinj_enum_MAX ; i++) { struct errinj *inj = &errinjs[i]; tbuf_printf(out, " - name: %s" CRLF, inj->name); tbuf_printf(out, " state: %s" CRLF, (inj->state) ? "on" : "off"); } } tarantool-1.5.1.218.g1a69fd6/src/replication.cc0000664000000000000000000004434512231715257017406 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include extern "C" { #include #include } /* extern "C" */ #include #include #include #include #include #include #include #include #include #include #include #include "fiber.h" #include "recovery.h" #include "log_io.h" #include "evio.h" /** Replication topology * ---------------------- * * Tarantool replication consists of 3 interacting processes: * master, spawner and replication relay. * * The spawner is created at server start, and master communicates * with the spawner using a socketpair(2). Replication relays are * created by the spawner and handle one client connection each. * * The master process binds to replication_port and accepts * incoming connections. This is done in the master to be able to * correctly handle RELOAD CONFIGURATION, which happens in the * master, and, in future, perform authentication of replication * clients. * * Once a client socket is accepted, it is sent to the spawner * process, through the master's end of the socket pair. * * The spawner listens on the receiving end of the socket pair and * for every received socket creates a replication relay, which is * then responsible for sending write ahead logs to the replica. * * Upon shutdown, the master closes its end of the socket pair. * The spawner then reads EOF from its end, terminates all * children and exits. */ static int master_to_spawner_socket; /** Accept a new connection on the replication port: push the accepted socket * to the spawner. */ static void replication_on_accept(struct evio_service *service __attribute__((unused)), int fd, struct sockaddr_in *addr __attribute__((unused))); /** Send a file descriptor to replication relay spawner. * * Invoked when spawner's end of the socketpair becomes ready. */ static void replication_send_socket(ev_io *watcher, int events __attribute__((unused))); /** Replication spawner process */ static struct spawner { /** reading end of the socket pair with the master */ int sock; /** non-zero if got a terminating signal */ sig_atomic_t killed; /** child process count */ sig_atomic_t child_count; } spawner; /** Initialize spawner process. * * @param sock the socket between the main process and the spawner. */ static void spawner_init(int sock); /** Spawner main loop. */ static void spawner_main_loop(); /** Shutdown spawner and all its children. */ static void spawner_shutdown(); /** Handle SIGINT, SIGTERM, SIGHUP. */ static void spawner_signal_handler(int signal); /** Handle SIGCHLD: collect status of a terminated child. */ static void spawner_sigchld_handler(int signal __attribute__((unused))); /** Create a replication relay. * * @return 0 on success, -1 on error */ static int spawner_create_replication_relay(int client_sock); /** Shut down all relays when shutting down the spawner. */ static void spawner_shutdown_children(); /** Initialize replication relay process. */ static void replication_relay_loop(int client_sock); /* * ------------------------------------------------------------------------ * replication module * ------------------------------------------------------------------------ */ /** Check replication module configuration. */ int replication_check_config(struct tarantool_cfg *config) { if (config->replication_port < 0 || config->replication_port >= USHRT_MAX) { say_error("invalid replication port value: %" PRId32, config->replication_port); return -1; } return 0; } /** Pre-fork replication spawner process. */ void replication_prefork() { if (cfg.replication_port == 0) { /* replication is not needed, do nothing */ return; } int sockpair[2]; /* * Create UNIX sockets to communicate between the main and * spawner processes. */ if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sockpair) != 0) panic_syserror("socketpair"); /* create spawner */ pid_t pid = fork(); if (pid == -1) panic_syserror("fork"); if (pid != 0) { /* parent process: tarantool */ close(sockpair[1]); master_to_spawner_socket = sockpair[0]; sio_setfl(master_to_spawner_socket, O_NONBLOCK, 1); } else { ev_default_fork(); ev_loop(EVLOOP_NONBLOCK); /* child process: spawner */ close(sockpair[0]); /* * Move to an own process group, to not receive * signals from the controlling tty. */ setpgid(0, 0); spawner_init(sockpair[1]); } } /** * Create a fiber which accepts client connections and pushes them * to replication spawner. */ void replication_init(const char *bind_ipaddr, int replication_port) { if (replication_port == 0) return; /* replication is not in use */ static struct evio_service replication; evio_service_init(&replication, "replication", bind_ipaddr, replication_port, replication_on_accept, NULL); evio_service_start(&replication); } /*-----------------------------------------------------------------------------*/ /* replication accept/sender fibers */ /*-----------------------------------------------------------------------------*/ /** Replication acceptor fiber handler. */ static void replication_on_accept(struct evio_service *service __attribute__((unused)), int fd, struct sockaddr_in *addr __attribute__((unused))) { /* * Drop the O_NONBLOCK flag, which was possibly * inherited from the acceptor fd (happens on * Darwin). */ sio_setfl(fd, O_NONBLOCK, 0); struct ev_io *io = (struct ev_io *) malloc(sizeof(struct ev_io)); if (io == NULL) { close(fd); return; } io->data = (void *) (intptr_t) fd; ev_io_init(io, replication_send_socket, master_to_spawner_socket, EV_WRITE); ev_io_start(io); } /** Send a file descriptor to the spawner. */ static void replication_send_socket(ev_io *watcher, int events __attribute__((unused))) { int client_sock = (intptr_t) watcher->data; struct msghdr msg; struct iovec iov[1]; char control_buf[CMSG_SPACE(sizeof(int))]; struct cmsghdr *control_message = NULL; int cmd_code = 0; iov[0].iov_base = &cmd_code; iov[0].iov_len = sizeof(cmd_code); memset(&msg, 0, sizeof(msg)); msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = control_buf; msg.msg_controllen = sizeof(control_buf); control_message = CMSG_FIRSTHDR(&msg); control_message->cmsg_len = CMSG_LEN(sizeof(int)); control_message->cmsg_level = SOL_SOCKET; control_message->cmsg_type = SCM_RIGHTS; *((int *) CMSG_DATA(control_message)) = client_sock; /* Send the client socket to the spawner. */ if (sendmsg(master_to_spawner_socket, &msg, 0) < 0) say_syserror("sendmsg"); ev_io_stop(watcher); free(watcher); /* Close client socket in the main process. */ close(client_sock); } /*--------------------------------------------------------------------------* * spawner process * * -------------------------------------------------------------------------*/ /** Initialize the spawner. */ static void spawner_init(int sock) { char name[FIBER_NAME_MAXLEN]; struct sigaction sa; snprintf(name, sizeof(name), "spawner%s", custom_proc_title); fiber_set_name(fiber, name); set_proc_title(name); /* init replicator process context */ spawner.sock = sock; /* init signals */ memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); /* * The spawner normally does not receive any signals, * except when sent by a system administrator. * When the master process terminates, it closes its end * of the socket pair and this signals to the spawner that * it's time to die as well. But before exiting, the * spawner must kill and collect all active replication * relays. This is why we need to change the default * signal action here. */ sa.sa_handler = spawner_signal_handler; if (sigaction(SIGHUP, &sa, NULL) == -1 || sigaction(SIGINT, &sa, NULL) == -1 || sigaction(SIGTERM, &sa, NULL) == -1) say_syserror("sigaction"); sa.sa_handler = spawner_sigchld_handler; if (sigaction(SIGCHLD, &sa, NULL) == -1) say_syserror("sigaction"); sa.sa_handler = SIG_IGN; /* * Ignore SIGUSR1, SIGUSR1 is used to make snapshots, * and if someone wrote a faulty regexp for `ps' and * fed it to `kill' the replication shouldn't die. * Ignore SIGUSR2 as well, since one can be pretty * inventive in ways of shooting oneself in the foot. * Ignore SIGPIPE, otherwise we may receive SIGPIPE * when trying to write to the log. */ if (sigaction(SIGUSR1, &sa, NULL) == -1 || sigaction(SIGUSR2, &sa, NULL) == -1 || sigaction(SIGPIPE, &sa, NULL) == -1) { say_syserror("sigaction"); } say_crit("initialized"); spawner_main_loop(); } static int spawner_unpack_cmsg(struct msghdr *msg) { struct cmsghdr *control_message; for (control_message = CMSG_FIRSTHDR(msg); control_message != NULL; control_message = CMSG_NXTHDR(msg, control_message)) if ((control_message->cmsg_level == SOL_SOCKET) && (control_message->cmsg_type == SCM_RIGHTS)) return *((int *) CMSG_DATA(control_message)); assert(false); return -1; } /** Replication spawner process main loop. */ static void spawner_main_loop() { struct msghdr msg; struct iovec iov[1]; char control_buf[CMSG_SPACE(sizeof(int))]; int cmd_code = 0; int client_sock; iov[0].iov_base = &cmd_code; iov[0].iov_len = sizeof(cmd_code); msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = control_buf; msg.msg_controllen = sizeof(control_buf); while (!spawner.killed) { int msglen = recvmsg(spawner.sock, &msg, 0); if (msglen > 0) { client_sock = spawner_unpack_cmsg(&msg); spawner_create_replication_relay(client_sock); } else if (msglen == 0) { /* orderly master shutdown */ say_info("Exiting: master shutdown"); break; } else { /* msglen == -1 */ if (errno != EINTR) say_syserror("recvmsg"); /* continue, the error may be temporary */ } } spawner_shutdown(); } /** Replication spawner shutdown. */ static void spawner_shutdown() { /* * There is no need to ever use signals with the spawner * process. If someone did send spawner a signal by * mistake, at least make a squeak in the error log before * dying. */ if (spawner.killed) say_info("Terminated by signal %d", (int) spawner.killed); /* close socket */ close(spawner.sock); /* kill all children */ spawner_shutdown_children(); exit(EXIT_SUCCESS); } /** Replication spawner signal handler for terminating signals. */ static void spawner_signal_handler(int signal) { spawner.killed = signal; } /** Wait for a terminated child. */ static void spawner_sigchld_handler(int signo __attribute__((unused))) { static const char waitpid_failed[] = "spawner: waitpid() failed\n"; do { int exit_status; pid_t pid = waitpid(-1, &exit_status, WNOHANG); switch (pid) { case -1: if (errno != ECHILD) { int r = write(sayfd, waitpid_failed, sizeof(waitpid_failed) - 1); (void) r; /* -Wunused-result warning suppression */ } return; case 0: /* no more changes in children status */ return; default: spawner.child_count--; } } while (spawner.child_count > 0); } /** Create replication client handler process. */ static int spawner_create_replication_relay(int client_sock) { pid_t pid = fork(); if (pid < 0) { say_syserror("fork"); return -1; } if (pid == 0) { ev_default_fork(); ev_loop(EVLOOP_NONBLOCK); close(spawner.sock); replication_relay_loop(client_sock); } else { spawner.child_count++; close(client_sock); say_info("created a replication relay: pid = %d", (int) pid); } return 0; } /** Replicator spawner shutdown: kill and wait for children. */ static void spawner_shutdown_children() { int kill_signo = SIGTERM, signo; sigset_t mask, orig_mask, alarm_mask; retry: sigemptyset(&mask); sigaddset(&mask, SIGCHLD); sigaddset(&mask, SIGALRM); /* * We're going to kill the entire process group, which * we're part of. Handle the signal sent to ourselves. */ sigaddset(&mask, kill_signo); if (spawner.child_count == 0) return; /* Block SIGCHLD and SIGALRM to avoid races. */ if (sigprocmask(SIG_BLOCK, &mask, &orig_mask)) { say_syserror("sigprocmask"); return; } /* We'll wait for children no longer than 5 sec. */ alarm(5); say_info("sending signal %d to %d children", kill_signo, (int) spawner.child_count); kill(0, kill_signo); say_info("waiting for children for up to 5 seconds"); while (spawner.child_count > 0) { sigwait(&mask, &signo); if (signo == SIGALRM) { /* timed out */ break; } else if (signo != kill_signo) { assert(signo == SIGCHLD); spawner_sigchld_handler(signo); } } /* Reset the alarm. */ alarm(0); /* Clear possibly pending SIGALRM. */ sigpending(&alarm_mask); if (sigismember(&alarm_mask, SIGALRM)) { sigemptyset(&alarm_mask); sigaddset(&alarm_mask, SIGALRM); sigwait(&alarm_mask, &signo); } /* Restore the old mask. */ if (sigprocmask(SIG_SETMASK, &orig_mask, NULL)) { say_syserror("sigprocmask"); return; } if (kill_signo == SIGTERM) { kill_signo = SIGKILL; goto retry; } } /** A libev callback invoked when a relay client socket is ready * for read. This currently only happens when the client closes * its socket, and we get an EOF. */ static void replication_relay_recv(struct ev_io *w, int __attribute__((unused)) revents) { int client_sock = (int) (intptr_t) w->data; uint8_t data; int rc = recv(client_sock, &data, sizeof(data), 0); if (rc == 0 || (rc < 0 && errno == ECONNRESET)) { say_info("the client has closed its replication socket, exiting"); exit(EXIT_SUCCESS); } if (rc < 0) say_syserror("recv"); exit(EXIT_FAILURE); } /** Send a single row to the client. */ static int replication_relay_send_row(void *param, const char *row, uint32_t rowlen) { int client_sock = (int) (intptr_t) param; ssize_t bytes, len = rowlen; while (len > 0) { bytes = write(client_sock, row, len); if (bytes < 0) { if (errno == EPIPE) { /* socket closed on opposite site */ goto shutdown_handler; } panic_syserror("write"); } len -= bytes; row += bytes; } return 0; shutdown_handler: say_info("the client has closed its replication socket, exiting"); exit(EXIT_SUCCESS); } /** The main loop of replication client service process. */ static void replication_relay_loop(int client_sock) { char name[FIBER_NAME_MAXLEN]; struct sigaction sa; int64_t lsn; ssize_t r; /* Set process title and fiber name. * Even though we use only the main fiber, the logger * uses the current fiber name. */ struct sockaddr_in peer; socklen_t addrlen = sizeof(peer); getpeername(client_sock, ((struct sockaddr*)&peer), &addrlen); snprintf(name, sizeof(name), "relay/%s", sio_strfaddr(&peer)); fiber_set_name(fiber, name); set_proc_title("%s%s", name, custom_proc_title); /* init signals */ memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); /* Reset all signals to their defaults. */ sa.sa_handler = SIG_DFL; if (sigaction(SIGCHLD, &sa, NULL) == -1 || sigaction(SIGHUP, &sa, NULL) == -1 || sigaction(SIGINT, &sa, NULL) == -1 || sigaction(SIGTERM, &sa, NULL) == -1) say_syserror("sigaction"); /* * Ignore SIGPIPE, we already handle EPIPE. * Ignore SIGUSR1, SIGUSR1 is used to make snapshots, * and if someone wrote a faulty regexp for `ps' and * fed it to `kill' the replication shouldn't die. * Ignore SIGUSR2 as well, since one can be pretty * inventive in ways of shooting oneself in the foot. */ sa.sa_handler = SIG_IGN; if (sigaction(SIGPIPE, &sa, NULL) == -1 || sigaction(SIGUSR1, &sa, NULL) == -1 || sigaction(SIGUSR2, &sa, NULL) == -1) { say_syserror("sigaction"); } r = read(client_sock, &lsn, sizeof(lsn)); if (r != sizeof(lsn)) { if (r < 0) { panic_syserror("read"); } panic("invalid LSN request size: %zu", r); } say_info("starting replication from lsn: %" PRIi64, lsn); replication_relay_send_row((void *)(intptr_t) client_sock, (const char *) &default_version, sizeof(default_version)); /* init libev events handlers */ ev_default_loop(0); /* * Init a read event: when replica closes its end * of the socket, we can read EOF and shutdown the * relay. */ struct ev_io sock_read_ev; sock_read_ev.data = (void *)(intptr_t) client_sock; ev_io_init(&sock_read_ev, replication_relay_recv, client_sock, EV_READ); ev_io_start(&sock_read_ev); /* Initialize the recovery process */ recovery_init(cfg.snap_dir, cfg.wal_dir, replication_relay_send_row, (void *)(intptr_t) client_sock, INT32_MAX, RECOVER_READONLY); /* * Note that recovery starts with lsn _NEXT_ to * the confirmed one. */ recovery_state->lsn = recovery_state->confirmed_lsn = lsn - 1; recover_existing_wals(recovery_state); /* Found nothing. */ if (recovery_state->lsn == lsn - 1) say_error("can't find WAL containing record with lsn: %" PRIi64, lsn); recovery_follow_local(recovery_state, 0.1); ev_loop(0); say_crit("exiting the relay loop"); exit(EXIT_SUCCESS); } tarantool-1.5.1.218.g1a69fd6/src/lib/0000775000000000000000000000000012213333320015305 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/lib/cmake_install.cmake0000664000000000000000000000314512213333034021122 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/src/lib/small/0000775000000000000000000000000012213333320016415 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/lib/small/cmake_install.cmake0000664000000000000000000000226112213333034022230 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/src/lib/small/mempool.c0000664000000000000000000001644112202131537020243 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lib/small/mempool.h" #include #include #include "lib/small/slab_cache.h" static inline int mslab_cmp(struct mslab *lhs, struct mslab *rhs) { /* pointer arithmetics may overflow int * range. */ return lhs > rhs ? 1 : (lhs < rhs ? -1 : 0); } rb_proto(, mslab_tree_, mslab_tree_t, struct mslab) rb_gen(, mslab_tree_, mslab_tree_t, struct mslab, node, mslab_cmp) static inline void mslab_create(struct mslab *slab, struct mempool *pool) { slab->ffi = 0; slab->nfree = pool->objcount; slab->pool = pool; /* A bit is set if a slot is free. */ memset(slab->map, 0xFF, sizeof(slab->map[0]) * pool->mapsize); } /** Beginning of object data in the slab. */ void * mslab_offset(struct mslab *slab) { return (char *) slab + mslab_sizeof() + MEMPOOL_MAP_SIZEOF * slab->pool->mapsize; } /** Pointer to an object from object index. */ static inline void * mslab_obj(struct mslab *slab, uint32_t idx) { return mslab_offset(slab) + idx * slab->pool->objsize; } /** Object index from pointer to object */ static inline uint32_t mslab_idx(struct mslab *slab, void *ptr) { /* * @todo: consider optimizing this division with * multiply-shift method described in Hacker's Delight, * p. 187. */ return ((uint32_t)(ptr - mslab_offset(slab)))/slab->pool->objsize; } void * mslab_alloc(struct mslab *slab) { assert(slab->nfree); uint32_t idx = __builtin_ffsl(slab->map[slab->ffi]); while (idx == 0) { if (slab->ffi == slab->pool->mapsize - 1) { /* * mslab_alloc() shouldn't be called * on a full slab. */ assert(false); return NULL; } slab->ffi++; idx = __builtin_ffsl(slab->map[slab->ffi]); } /* * find-first-set returns bit index starting from 1, * or 0 if no bit is set. Rebase the index to offset 0. */ idx--; /* Mark the position as occupied. */ slab->map[slab->ffi] ^= ((mbitmap_t) 1) << idx; /* If the slab is full, remove it from the rb tree. */ if (--slab->nfree == 0) mslab_tree_remove(&slab->pool->free_slabs, slab); /* Return the pointer at the free slot */ return mslab_obj(slab, idx + slab->ffi * MEMPOOL_MAP_BIT); } void mslab_free(struct mempool *pool, struct mslab *slab, void *ptr) { uint32_t idx = mslab_idx(slab, ptr); uint32_t bit_no = idx & (MEMPOOL_MAP_BIT-1); idx /= MEMPOOL_MAP_BIT; slab->map[idx] |= ((mbitmap_t) 1) << bit_no; slab->nfree++; if (idx < slab->ffi) slab->ffi = idx; if (slab->nfree == 1) { /** * Add this slab to the rbtree which contains partially * populated slabs. */ mslab_tree_insert(&pool->free_slabs, slab); } else if (slab->nfree == pool->objcount) { /** Free the slab. */ mslab_tree_remove(&pool->free_slabs, slab); if (pool->spare > slab) { slab_list_del(&pool->slabs, &pool->spare->slab, next_in_list); slab_put(pool->cache, &pool->spare->slab); pool->spare = slab; } else if (pool->spare) { slab_list_del(&pool->slabs, &slab->slab, next_in_list); slab_put(pool->cache, &slab->slab); } else { pool->spare = slab; } } } void mempool_create_with_order(struct mempool *pool, struct slab_cache *cache, uint32_t objsize, uint8_t order) { assert(order <= SLAB_ORDER_LAST); pool->cache = cache; slab_list_create(&pool->slabs); mslab_tree_new(&pool->free_slabs); pool->spare = NULL; pool->objsize = objsize; pool->slab_order = order; /* Account for slab meta. */ size_t slab_size = slab_order_size(pool->slab_order) - mslab_sizeof(); /* Calculate how many objects will actually fit in a slab. */ /* * We have 'slab_size' bytes for X objects and * X / 8 bits in free/used array. * * Therefore the formula for objcount is: * * X * objsize + X/8 = slab_size * X = (8 * slab_size)/(8 * objsize + 1) */ size_t objcount = (CHAR_BIT * slab_size)/(CHAR_BIT * objsize + 1); /* How many elements of slab->map can map objcount. */ assert(objcount); size_t mapsize = (objcount + MEMPOOL_MAP_BIT - 1)/MEMPOOL_MAP_BIT; /* Adjust the result of integer division, which may be too large. */ while (objcount * objsize + mapsize * MEMPOOL_MAP_SIZEOF > slab_size) { objcount--; mapsize = (objcount + MEMPOOL_MAP_BIT - 1)/MEMPOOL_MAP_BIT; } assert(mapsize * MEMPOOL_MAP_BIT >= objcount); /* The wasted memory should be under objsize */ assert(slab_size - objcount * objsize - mapsize * MEMPOOL_MAP_SIZEOF < objsize || mapsize * MEMPOOL_MAP_BIT == objcount); pool->objcount = objcount; pool->mapsize = mapsize; } void mempool_destroy(struct mempool *pool) { struct slab *slab, *tmp; rlist_foreach_entry_safe(slab, &pool->slabs.slabs, next_in_list, tmp) slab_put(pool->cache, slab); } void * mempool_alloc_nothrow(struct mempool *pool) { struct mslab *slab = mslab_tree_first(&pool->free_slabs); if (slab == NULL) { if (pool->spare == NULL) { slab = (struct mslab *) slab_get_with_order(pool->cache, pool->slab_order); if (slab == NULL) return NULL; mslab_create(slab, pool); slab_list_add(&pool->slabs, &slab->slab, next_in_list); } else { slab = pool->spare; pool->spare = NULL; } mslab_tree_insert(&pool->free_slabs, slab); } assert(slab->pool == pool); pool->slabs.stats.used += pool->objsize; return mslab_alloc(slab); } void mempool_free(struct mempool *pool, void *obj) { struct mslab *slab = (struct mslab *) slab_from_ptr(obj, pool->slab_order); pool->slabs.stats.used -= pool->objsize; mslab_free(pool, slab, obj); } void mempool_stats(struct mempool *pool, struct mempool_stats *stats) { /* Object size. */ stats->objsize = pool->objsize; /* Number of objects. */ stats->objcount = pool->slabs.stats.used/pool->objsize; /* Size of the slab. */ stats->slabsize = slab_order_size(pool->slab_order); /* The number of slabs. */ stats->slabcount = pool->slabs.stats.total/stats->slabsize; /* How much memory is used for slabs. */ stats->totals.used = pool->slabs.stats.used; /* * How much memory is available. Subtract the slab size, * which is allocation overhead and is not available * memory. */ stats->totals.total = pool->slabs.stats.total - mslab_sizeof() * stats->slabcount; } tarantool-1.5.1.218.g1a69fd6/src/lib/small/region.c0000664000000000000000000000565612202131537020064 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lib/small/region.h" #include /* ssize_t */ void * region_alloc_slow(struct region *region, size_t size) { /* The new slab must have at least this many bytes available. */ size_t slab_min_size = size + rslab_sizeof() - slab_sizeof(); struct rslab *slab; slab = (struct rslab *) slab_get(region->cache, slab_min_size); if (slab == NULL) return NULL; slab->used = size; /* * Sic: add the new slab to the beginning of the * region, even if it is full, otherwise, * region_truncate() won't work. */ slab_list_add(®ion->slabs, &slab->slab, next_in_list); region->slabs.stats.used += size; return rslab_data(slab); } void region_free(struct region *region) { struct slab *slab, *tmp; rlist_foreach_entry_safe(slab, ®ion->slabs.slabs, next_in_list, tmp) slab_put(region->cache, slab); slab_list_create(®ion->slabs); } /** * Release all memory down to new_size; new_size has to be previously * obtained by calling region_used(). */ void region_truncate(struct region *region, size_t new_size) { assert(new_size <= region_used(region)); ssize_t cut_size = region_used(region) - new_size; while (! rlist_empty(®ion->slabs.slabs)) { struct rslab *slab = rlist_first_entry(®ion->slabs.slabs, struct rslab, slab.next_in_list); if (slab->used > cut_size) { /* This is the last slab to trim. */ slab->used -= cut_size; cut_size = 0; break; } cut_size -= slab->used; /* Remove the entire slab. */ slab_list_del(®ion->slabs, &slab->slab, next_in_list); slab_put(region->cache, &slab->slab); } assert(cut_size == 0); region->slabs.stats.used = new_size; } tarantool-1.5.1.218.g1a69fd6/src/lib/small/slab_cache.c0000664000000000000000000003020612202131537020632 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lib/small/slab_cache.h" #include #include #include #include #include #include static const uint32_t slab_magic = 0xeec0ffee; #if !defined(MAP_ANONYMOUS) /* * MAP_ANON is deprecated, MAP_ANONYMOUS should be used instead. * Unfortunately, it's not universally present (e.g. not present * on FreeBSD. */ #define MAP_ANONYMOUS MAP_ANON #endif /* !defined(MAP_ANONYMOUS) */ /** * Given a pointer allocated in a slab, get the handle * of the slab itself. */ struct slab * slab_from_ptr(void *ptr, uint8_t order) { assert(order <= SLAB_ORDER_LAST); intptr_t addr = (intptr_t) ptr; /** All memory mapped slabs are slab->size aligned. */ struct slab *slab = (struct slab *) (addr & ~(slab_order_size(order) - 1)); assert(slab->magic == slab_magic && slab->order == order); return slab; } static inline void slab_assert(struct slab *slab) { (void) slab; assert(slab->magic == slab_magic); assert(slab->order <= SLAB_HUGE); assert(slab->order == SLAB_HUGE || (((intptr_t) slab & ~(slab_order_size(slab->order) - 1)) == (intptr_t) slab && slab->size == slab_order_size(slab->order))); } /** Mark a slab as free. */ static inline void slab_set_free(struct slab_cache *cache, struct slab *slab) { assert(slab->in_use == slab->order + 1); /* Sanity. */ cache->allocated.stats.used -= slab->size; cache->orders[slab->order].stats.used -= slab->size; slab->in_use = 0; } static inline void slab_set_used(struct slab_cache *cache, struct slab *slab) { cache->allocated.stats.used += slab->size; cache->orders[slab->order].stats.used += slab->size; /* Not a boolean to have an extra assert. */ slab->in_use = 1 + slab->order; } static inline bool slab_is_free(struct slab *slab) { return slab->in_use == 0; } static inline void slab_poison(struct slab *slab) { static const char poison_char = 'P'; memset((char *) slab + slab_sizeof(), poison_char, slab->size - slab_sizeof()); } static inline void slab_create(struct slab *slab, uint8_t order, size_t size) { assert(order <= SLAB_HUGE); slab->magic = slab_magic; slab->order = order; slab->in_use = 0; slab->size = size; } static inline void munmap_checked(void *addr, size_t length) { if (munmap(addr, length)) { char buf[64]; strerror_r(errno, buf, sizeof(buf)); fprintf(stderr, "Error in munmap(): %s\n", buf); assert(false); } } static inline struct slab * slab_mmap(uint8_t order) { assert(order <= SLAB_ORDER_LAST); size_t size = slab_order_size(order); /* * mmap twice the requested amount to be able to align * the mapped address. * @todo all mappings except the first are likely to * be aligned already. Find out if trying to map * optimistically exactly the requested amount and fall * back to doulbe-size mapping is a viable strategy. */ void *map = mmap(NULL, 2 * size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (map == MAP_FAILED) return NULL; /* Align the mapped address around slab size. */ size_t offset = (intptr_t) map & (size - 1); if (offset != 0) { /* Unmap unaligned prefix and postfix. */ munmap_checked(map, size - offset); map += size - offset; munmap_checked(map + size, offset); } else { /* The address is returned aligned. */ munmap_checked(map + size, size); } struct slab *slab = map; slab_create(slab, order, size); return slab; } static inline struct slab * slab_buddy(struct slab *slab) { assert(slab->order <= SLAB_ORDER_LAST); if (slab->order == SLAB_ORDER_LAST) return NULL; /* The buddy address has its respective bit negated. */ return (void *) ((intptr_t) slab ^ slab_order_size(slab->order)); } static inline struct slab * slab_split(struct slab_cache *cache, struct slab *slab) { assert(slab->order > 0); uint8_t new_order = slab->order - 1; size_t new_size = slab_order_size(new_order); slab_create(slab, new_order, new_size); struct slab *buddy = slab_buddy(slab); slab_create(buddy, new_order, new_size); slab_list_add(&cache->orders[buddy->order], buddy, next_in_list); return slab; } static inline struct slab * slab_merge(struct slab_cache *cache, struct slab *slab, struct slab *buddy) { assert(slab_buddy(slab) == buddy); struct slab *merged = slab > buddy ? buddy : slab; /** Remove the buddy from the free list. */ slab_list_del(&cache->orders[buddy->order], buddy, next_in_list); merged->order++; merged->size = slab_order_size(merged->order); return merged; } void slab_cache_create(struct slab_cache *cache) { for (uint8_t i = 0; i <= SLAB_ORDER_LAST; i++) slab_list_create(&cache->orders[i]); slab_list_create(&cache->allocated); } void slab_cache_destroy(struct slab_cache *cache) { struct rlist *slabs = &cache->allocated.slabs; /* * cache->allocated contains huge allocations and * slabs of the largest order. All smaller slabs are * obtained from larger slabs by splitting. */ struct slab *slab, *tmp; rlist_foreach_entry_safe(slab, slabs, next_in_cache, tmp) { if (slab->order == SLAB_HUGE) free(slab); else { /* * Don't trust slab->size or slab->order, * it is wrong if the slab header was * reformatted for a smaller order. */ munmap_checked(slab, slab_order_size(SLAB_ORDER_LAST)); } } } struct slab * slab_get_with_order(struct slab_cache *cache, uint8_t order) { assert(order <= SLAB_ORDER_LAST); struct slab *slab; /* Search for the first available slab. If a slab * of a bigger size is found, it can be split. * If SLAB_ORDER_LAST is reached and there are no * free slabs, allocate a new one. */ struct slab_list *list= &cache->orders[order]; for ( ; rlist_empty(&list->slabs); list++) { if (list == cache->orders + SLAB_ORDER_LAST) { slab = slab_mmap(SLAB_ORDER_LAST); if (slab == NULL) return NULL; slab_poison(slab); slab_list_add(&cache->allocated, slab, next_in_cache); slab_list_add(list, slab, next_in_list); break; } } slab = rlist_shift_entry(&list->slabs, struct slab, next_in_list); if (slab->order != order) { /* * Do not "bill" the size of this slab to this * order, to prevent double accounting of the * same memory. */ list->stats.total -= slab->size; /* Get a slab of the right order. */ do { slab = slab_split(cache, slab); } while (slab->order != order); /* * Count the slab in this order. The buddy is * already taken care of by slab_split. */ cache->orders[slab->order].stats.total += slab->size; } slab_set_used(cache, slab); slab_assert(slab); return slab; } /** * Try to find a region of the requested order * in the cache. On failure, mmap() a new region, * optionally split it into a series of half. * Returns a next-power-of-two(size) aligned address * for all sizes below SLAB_SIZE_MAX. */ struct slab * slab_get(struct slab_cache *cache, size_t size) { size += slab_sizeof(); uint8_t order = slab_order(size); if (order == SLAB_HUGE) { struct slab *slab = (struct slab *) malloc(size); if (slab == NULL) return NULL; slab_create(slab, order, size); slab_list_add(&cache->allocated, slab, next_in_cache); cache->allocated.stats.used += size; return slab; } return slab_get_with_order(cache, order); } /** Return a slab back to the slab cache. */ void slab_put(struct slab_cache *cache, struct slab *slab) { slab_assert(slab); if (slab->order == SLAB_HUGE) { /* * Free a huge slab right away, we have no * further business to do with it. */ slab_list_del(&cache->allocated, slab, next_in_cache); cache->allocated.stats.used -= slab->size; free(slab); return; } /* An "ordered" slab is returned to the cache. */ slab_set_free(cache, slab); struct slab *buddy = slab_buddy(slab); /* * The buddy slab could also have been split into a pair * of smaller slabs, the first of which happens to be * free. To not merge with a slab which is in fact * partially occupied, first check that slab orders match. * * A slab is not accounted in "used" or "total" counters * if it was split into slabs of a lower order. * cache->orders statistics only contains sizes of either * slabs returned by slab_get, or present in the free * list. This ensures that sums of cache->orders[i].stats * match the totals in cache->allocated.stats. */ if (buddy && buddy->order == slab->order && slab_is_free(buddy)) { cache->orders[slab->order].stats.total -= slab->size; do { slab = slab_merge(cache, slab, buddy); buddy = slab_buddy(slab); } while (buddy && buddy->order == slab->order && slab_is_free(buddy)); cache->orders[slab->order].stats.total += slab->size; } slab_poison(slab); rlist_add_entry(&cache->orders[slab->order].slabs, slab, next_in_list); } void slab_cache_check(struct slab_cache *cache) { size_t total = 0; size_t used = 0; size_t ordered = 0; size_t huge = 0; bool dont_panic = true; struct rlist *slabs = &cache->allocated.slabs; struct slab *slab; rlist_foreach_entry(slab, slabs, next_in_cache) { if (slab->magic != slab_magic) { fprintf(stderr, "%s: incorrect slab magic," " expected %d, got %d", __func__, slab_magic, slab->magic); dont_panic = false; } if (slab->order == SLAB_HUGE) { huge += slab->size; used += slab->size; total += slab->size; } else { if (slab->size != slab_order_size(slab->order)) { fprintf(stderr, "%s: incorrect slab size," " expected %zu, got %zu", __func__, slab_order_size(slab->order), slab->size); dont_panic = false; } /* * The slab may have been reformatted * and split into smaller slabs, don't * trust slab->size. */ total += slab_order_size(SLAB_ORDER_LAST); } } if (total != cache->allocated.stats.total) { fprintf(stderr, "%s: incorrect slab statistics, total %zu," " factual %zu\n", __func__, cache->allocated.stats.total, total); dont_panic = false; } for (struct slab_list *list = cache->orders; list <= cache->orders + SLAB_ORDER_LAST; list++) { uint8_t order = slab_order_size(list - cache->orders); ordered += list->stats.total; used += list->stats.used; if (list->stats.total % slab_order_size(order)) { fprintf(stderr, "%s: incorrect order statistics, the" " total %zu is not multiple of slab size %zu\n", __func__, list->stats.total, slab_order_size(order)); dont_panic = false; } if (list->stats.used % slab_order_size(order)) { fprintf(stderr, "%s: incorrect order statistics, the" " used %zu is not multiple of slab size %zu\n", __func__, list->stats.used, slab_order_size(order)); dont_panic = false; } } if (ordered + huge != total) { fprintf(stderr, "%s: incorrect totals, ordered %zu, " " huge %zu, total %zu\n", __func__, ordered, huge, total); dont_panic = false; } if (used != cache->allocated.stats.used) { fprintf(stderr, "%s: incorrect used total, " "total %zu, sum %zu\n", __func__, cache->allocated.stats.used, used); dont_panic = false; } if (dont_panic) return; abort(); } tarantool-1.5.1.218.g1a69fd6/src/lib/small/small.c0000664000000000000000000002061512202131537017701 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lib/small/small.h" #include #include #include enum { /** Step size for stepped pools, in bytes */ STEP_SIZE = 8, /** * LB stands for logarithm with binary base, this constant * is used for bit shifts, when we need to divide by * STEP_SIZE. */ STEP_SIZE_LB = 3, }; rb_proto(, factor_tree_, factor_tree_t, struct factor_pool) /** Used for search in the tree. */ static inline int factor_pool_cmp(struct factor_pool *a, struct factor_pool *b) { return a->pool.objsize > b->pool.objsize ? 1 : a->pool.objsize < b->pool.objsize ? -1 : 0; } rb_gen(, factor_tree_, factor_tree_t, struct factor_pool, node, factor_pool_cmp) static inline struct factor_pool * factor_pool_create(struct small_alloc *alloc, struct factor_pool *upper_bound, size_t size) { assert(size > alloc->step_pool_objsize_max); if (alloc->factor_pool_next == NULL) { /** * Too many factored pools already, fall back * to an imperfect one. */ return upper_bound; } size_t objsize = alloc->step_pool_objsize_max; size_t prevsize; do { prevsize = objsize; /* * Align objsize after each multiplication to * ensure that the distance between objsizes of * factored pools is a multiple of STEP_SIZE. */ objsize = slab_size_align(objsize * alloc->factor, sizeof(intptr_t)); assert(objsize > alloc->step_pool_objsize_max); } while (objsize < size); struct factor_pool *pool = alloc->factor_pool_next; alloc->factor_pool_next= pool->next; mempool_create_with_order(&pool->pool, alloc->cache, objsize, alloc->slab_order); pool->objsize_min = prevsize + 1; factor_tree_insert(&alloc->factor_pools, pool); return pool; } /** Initialize the small allocator. */ void small_alloc_create(struct small_alloc *alloc, struct slab_cache *cache, uint32_t objsize_min, uint32_t objsize_max, float alloc_factor) { alloc->cache = cache; /* Align sizes. */ objsize_min = slab_size_align(objsize_min, sizeof(intptr_t)); objsize_max = slab_size_align(objsize_max, sizeof(intptr_t)); assert(objsize_max > objsize_min + STEP_POOL_MAX * STEP_SIZE); /* * Make sure at least 4 largest objects can fit in a slab. * This asserts if objsize_max is too large to fit in an * ordered slab nicely. */ alloc->slab_order = slab_order(objsize_max * 4 + mslab_sizeof()); struct mempool *step_pool; for (step_pool = alloc->step_pools; step_pool < alloc->step_pools + STEP_POOL_MAX; step_pool++) { mempool_create_with_order(step_pool, alloc->cache, objsize_min, alloc->slab_order); objsize_min += STEP_SIZE; } alloc->step_pool_objsize_max = (step_pool - 1)->objsize; if (alloc_factor > 2.0) alloc_factor = 2.0; /* * Correct the user-supplied alloc_factor to ensure that * it actually produces growing object sizes. */ if (alloc->step_pool_objsize_max * alloc_factor < alloc->step_pool_objsize_max + STEP_SIZE) { alloc_factor = (alloc->step_pool_objsize_max + STEP_SIZE + 0.5)/ alloc->step_pool_objsize_max; } alloc->factor = alloc_factor; /* Initialize the factored pool cache. */ struct factor_pool *factor_pool = alloc->factor_pool_cache; do { factor_pool->next = factor_pool + 1; factor_pool++; } while (factor_pool != alloc->factor_pool_cache + FACTOR_POOL_MAX - 1); factor_pool->next = NULL; alloc->factor_pool_next = alloc->factor_pool_cache; factor_tree_new(&alloc->factor_pools); (void) factor_pool_create(alloc, NULL, objsize_max); } /** * Allocate a small object. * * Find or create a mempool instance of the right size, * and allocate the object on the pool. * * If object is small enough to fit a stepped pool, * finding the right pool for it is just a matter of bit * shifts. Otherwise, look up a pool in the red-black * factored pool tree. * * @retval ptr success * @retval NULL out of memory */ void * smalloc_nothrow(struct small_alloc *alloc, size_t size) { struct mempool *pool; if (size <= alloc->step_pool_objsize_max) { /* Allocate in a stepped pool. */ int idx = (size + STEP_SIZE - 1) >> STEP_SIZE_LB; const int objsize_min_lb = alloc->step_pools[0].objsize >> STEP_SIZE_LB; idx = idx > objsize_min_lb ? idx - objsize_min_lb : 0; pool = &alloc->step_pools[idx]; assert(size <= pool->objsize && (size + STEP_SIZE > pool->objsize || idx == 0)); } else { struct factor_pool pattern; pattern.pool.objsize = size; struct factor_pool *upper_bound = factor_tree_nsearch(&alloc->factor_pools, &pattern); if (upper_bound == NULL) { assert(false); return NULL; /* The requested size is too large. */ } if (size < upper_bound->objsize_min) upper_bound = factor_pool_create(alloc, upper_bound, size); pool = &upper_bound->pool; } assert(size <= pool->objsize); return mempool_alloc_nothrow(pool); } /** * Free a small objects. * * This boils down to finding the object's mempool and delegating * to mempool_free(). * * If the pool becomes completely empty, and it's a factored pool, * and the factored pool's cache is empty, put back the empty * factored pool into the factored pool cache. */ void smfree(struct small_alloc *alloc, void *ptr) { struct mslab *slab = (struct mslab *) slab_from_ptr(ptr, alloc->slab_order); struct mempool *pool = slab->pool; mempool_free(pool, ptr); /* * Don't keep around empty factored pools * if the allocator is out of them. */ if (mempool_used(pool) == 0 && pool->objsize > alloc->step_pool_objsize_max && alloc->factor_pool_next == NULL) { struct factor_pool *factor_pool = (struct factor_pool *) ((char *) pool - (intptr_t) &((struct factor_pool *) NULL)->pool); factor_tree_remove(&alloc->factor_pools, factor_pool); alloc->factor_pool_next = factor_pool; } } /** Simplify iteration over small allocator mempools. */ struct mempool_iterator { struct small_alloc *alloc; struct mempool *step_pool; struct factor_pool *factor_pool; }; void mempool_iterator_create(struct mempool_iterator *it, struct small_alloc *alloc) { it->alloc = alloc; it->step_pool = alloc->step_pools; it->factor_pool = factor_tree_first(&alloc->factor_pools); } struct mempool * mempool_iterator_next(struct mempool_iterator *it) { if (it->step_pool < it->alloc->step_pools + STEP_POOL_MAX) return it->step_pool++; if (it->factor_pool) { struct mempool *pool = &it->factor_pool->pool; it->factor_pool = factor_tree_next(&it->alloc->factor_pools, it->factor_pool); return pool; } return NULL; } /** Destroy all pools. */ void small_alloc_destroy(struct small_alloc *alloc) { struct mempool_iterator it; mempool_iterator_create(&it, alloc); struct mempool *pool; while ((pool = mempool_iterator_next(&it))) mempool_destroy(pool); } /** Calculate allocation statistics. */ void small_stats(struct small_alloc *alloc, struct small_stats *totals, mempool_stats_cb cb, void *cb_ctx) { memset(totals, 0, sizeof(*totals)); struct mempool_iterator it; mempool_iterator_create(&it, alloc); struct mempool *pool; while ((pool = mempool_iterator_next(&it))) { struct mempool_stats stats; mempool_stats(pool, &stats); totals->used += stats.totals.used; totals->total += stats.totals.total; cb(cb_ctx, &stats); } } tarantool-1.5.1.218.g1a69fd6/src/lib/small/CMakeLists.txt0000664000000000000000000000021212202131537021154 0ustar rootrootset(lib_sources slab_cache.c region.c mempool.c small.c) set_source_files_compile_flags(${lib_sources}) add_library(small ${lib_sources}) tarantool-1.5.1.218.g1a69fd6/src/lib/small/Makefile0000664000000000000000000002556712213333034020076 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/small/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/small/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/small/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/small/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. src/lib/small/CMakeFiles/small.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/small/CMakeFiles/small.dir/rule .PHONY : src/lib/small/CMakeFiles/small.dir/rule # Convenience name for target. small: src/lib/small/CMakeFiles/small.dir/rule .PHONY : small # fast build rule for target. small/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/build .PHONY : small/fast mempool.o: mempool.c.o .PHONY : mempool.o # target to build an object file mempool.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/mempool.c.o .PHONY : mempool.c.o mempool.i: mempool.c.i .PHONY : mempool.i # target to preprocess a source file mempool.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/mempool.c.i .PHONY : mempool.c.i mempool.s: mempool.c.s .PHONY : mempool.s # target to generate assembly for a file mempool.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/mempool.c.s .PHONY : mempool.c.s region.o: region.c.o .PHONY : region.o # target to build an object file region.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/region.c.o .PHONY : region.c.o region.i: region.c.i .PHONY : region.i # target to preprocess a source file region.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/region.c.i .PHONY : region.c.i region.s: region.c.s .PHONY : region.s # target to generate assembly for a file region.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/region.c.s .PHONY : region.c.s slab_cache.o: slab_cache.c.o .PHONY : slab_cache.o # target to build an object file slab_cache.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/slab_cache.c.o .PHONY : slab_cache.c.o slab_cache.i: slab_cache.c.i .PHONY : slab_cache.i # target to preprocess a source file slab_cache.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/slab_cache.c.i .PHONY : slab_cache.c.i slab_cache.s: slab_cache.c.s .PHONY : slab_cache.s # target to generate assembly for a file slab_cache.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/slab_cache.c.s .PHONY : slab_cache.c.s small.o: small.c.o .PHONY : small.o # target to build an object file small.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/small.c.o .PHONY : small.c.o small.i: small.c.i .PHONY : small.i # target to preprocess a source file small.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/small.c.i .PHONY : small.c.i small.s: small.c.s .PHONY : small.s # target to generate assembly for a file small.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/small.c.s .PHONY : small.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... small" @echo "... mempool.o" @echo "... mempool.i" @echo "... mempool.s" @echo "... region.o" @echo "... region.i" @echo "... region.s" @echo "... slab_cache.o" @echo "... slab_cache.i" @echo "... slab_cache.s" @echo "... small.o" @echo "... small.i" @echo "... small.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/lib/small/libsmall.a0000664000000000000000000041417412213333046020376 0ustar rootroot! / 1378727462 0 0 0 1288 ` 9LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLnnnnnnnnnnnnnnnnnnnnnnnslab_from_ptrslab_cache_createslab_cache_destroyslab_get_with_orderslab_getslab_putslab_cache_checkregion_alloc_slowregion_freeregion_truncatemslab_tree_newmslab_tree_firstmslab_tree_lastmslab_tree_nextmslab_tree_prevmslab_tree_searchmslab_tree_nsearchmslab_tree_psearchmslab_tree_insertmslab_tree_removemslab_tree_iter_recursemslab_tree_iter_startmslab_tree_itermslab_tree_reverse_iter_recursemslab_tree_reverse_iter_startmslab_tree_reverse_itermslab_offsetmslab_allocmslab_freemempool_create_with_ordermempool_destroymempool_alloc_nothrowmempool_freemempool_statsfactor_tree_newfactor_tree_firstfactor_tree_lastfactor_tree_nextfactor_tree_prevfactor_tree_searchfactor_tree_nsearchfactor_tree_psearchfactor_tree_insertfactor_tree_removefactor_tree_iter_recursefactor_tree_iter_startfactor_tree_iterfactor_tree_reverse_iter_recursefactor_tree_reverse_iter_startfactor_tree_reverse_itersmall_alloc_createsmalloc_nothrowsmfreemempool_iterator_createmempool_iterator_nextsmall_alloc_destroysmall_statsslab_cache.c.o/ 1378727461 1000 1000 100664 33592 ` ELF>F@@UHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@HEHEHPHEHPHEH@HUHHEHUHHEHHEHPHE]UHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HEHPHEH]UHHH}HEHmHEHHUHH}HuHEHUHHPHEHH!]UH0]UHHH}H9EvH}w)H}@v HE)UHSHE} vE ӉHH[]UHH H}E} v7HEHEEsHH#EHEHEP(9u HE@,:Et<HEUHSHH}HEP(9tDHE@,< vEHE@,< t`HE@,HHHEH!HEH9uHEHX HE@,H9tIH[]UHHH}HuHE@-HE@,9tPHEHpHEH@ H)HEHpHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHE@-UHH}HuHEHpHEH@ HHEHpHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHE@,PHEP-]UHH}HE@-]UHATSHH}HEHX [II)ظAHHEHLHH[A\]UHH H}HUE} vpHEP(HEUP,HE@-HEHUHP UHHPH}HuHUHEHHtXHM@HΉHHUHǸ~HUHH0E܀} vE܉HEHEHAA"HƿHEH}u HEHPHEH!HEH}tKHEHUH)HEHHHEHUHH)HHEHEHUHHEHHHEHUHHEHHHEHEMHUHEHHEUHHH}HE@,< vHE@,< uHE@,KHHEH1UHH0H}HuHE@,uHE@,EEHEMHUHEЉH5HEH*HEMHUHEHHEHPHE@,HHHHEHHHWHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEUHH0H}HuHUHEHqH;EtHEH9EHFEHEHEHHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHE@,PHEP,HE@,cHHEHP HEUHHH}E EHHHHEHHRE} vHEH`H6UHH@H}HEH`HEHEHHEHEHE>HE@,< uHEH HHEHH\HEHEHEH;EtHEH=HEHEHEH}uUHH0H}؉EԀ} vEHHHHEHHEHEH@H;E @HEH}u nHEHHEHUH`HHHEHxHEH@ HHEHxHEHPHEHH_HEHPHEH@ HHEHPHE HEH.9HEHHEHEHHEHE@,:EHEHPHEH@ H)HEHPHUHEHHHEHE@,:EuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHUHEHHHEHTHEUHH H}HuHEHEHE} HEHHEH}u MHUHEHiHEHUH`HHHEHxHEH@ HHEHxHEHpHEHHEHpHEUHEHUHH H}HuHEHRHE@,< u_HEHHEHxHEH@ H)HEHxHEHpHEH@ H)HEHpHEHHUHEHHHEHRHEH}HEP,HE@,8HEHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHUHMHEHH$HEHEHHEH}t$HEP,HE@,8uHEHuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEHHEHPHE@,HHHHEHHHfUHSHxH}HEHEHEHEEHEH`HEHEHHEHEHEHEP(9t4HEH(HAȉѺHǸEHE@,< u&HEH@ HEHEH@ HEHEH@ HErHEHX HE@,H9tEHEHX HE@,HHIHѺHǸE OHEHEHHEHEHEHEH;EHEHxH;Et7HEHxHHMIHѺHǸEHEHE HUHEHH)HHEHEH@HEHEH@HEHEHXEHHغHHHt>EbHHEHPHIHѺHǸEHEHXEHHغHHHt>EHHEHPHIHѺHǸEHE HEH@H;EHEHUHH;Et7HHuHMHUIIHѺHǸEHEHpH;Et7HEHpHHMIHѺHǸE}uHx[]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.hsize <= (4294967295U)order <= SLAB_ORDER_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab->magic == slab_magic && slab->order == orderslab->magic == slab_magicslab->order <= SLAB_HUGEslab->order == SLAB_HUGE || (((intptr_t) slab & ~(slab_order_size(slab->order) - 1)) == (intptr_t) slab && slab->size == slab_order_size(slab->order))slab->in_use == slab->order + 1order <= SLAB_HUGEError in munmap(): %s 0slab->order <= SLAB_ORDER_LASTslab->order > 0slab_buddy(slab) == buddy%s: incorrect slab magic, expected %d, got %d%s: incorrect slab size, expected %zu, got %zu%s: incorrect slab statistics, total %zu, factual %zu %s: incorrect order statistics, the total %zu is not multiple of slab size %zu %s: incorrect order statistics, the used %zu is not multiple of slab size %zu %s: incorrect totals, ordered %zu, huge %zu, total %zu %s: incorrect used total, total %zu, sum %zu slab_cache_checkslab_order_sizeslab_assertslab_set_freeslab_mergeslab_buddyPslab_orderslab_createslab_get_with_orderslab_mmapmunmap_checkedslab_splitslab_from_ptrYwzint0T3mwBt-.#/#) 0AZI#K#R# Tb#(VI#,\I#-`a#b# qr#tZ# ##   BB   ;##### #(#0#8#@#H#P#X $#` *#h ;#p;#t#x[#-#0#@#&#/#0#1#2#3#5;#7F#$$#*#;# @  V 88hBBhB`ZZhb6bXdhojohh;hffhZ88hh`I͆h    {EI\U  U E5ptr5X5IT 8{h:`   A,AX<  <  ,NNhN` WWhW``  `hf\ fXh n nhnIdnX  ,x6 xxF  buf{K  F 6 [ ? IL  `maphXP    8 h8   H@  Io`X4 ÓXPH4  h ϓXiIo( ד`htmpH ( X( P.  HID  h8`( XF %B!%X!%P(Io+`"8!8X!8PGh"d!d~fXgPhHi@j lm lo( o( 8I  % b#*% $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  &I : ;I8 : ; .: ; ' @B : ; I .: ; ' @B .: ; ' I@B 4: ; I .: ; I@B .: ; ' I@B 4I4  .? : ; ' I@B : ; I  4: ; I .? : ; ' @B  4: ;I .? : ;' I@B !: ;I ".? : ;' @B #4: ; I? < ww v !w!"w"%w%gvghwhiwilwlvwwwvwww v  w  w wvww"w"UvUVwVWwWZwZzvz{w{|w|wvwwwvwwwvwwwLvLMwMNwNQwQvwww!v!"w"#w#&w&vwwwvwww8v89w9:w:=w=OvOPwPQwQTwTvwww v  w wwvwwwvwww v www v  w  w  w v w w w F vF G wG H wH K wK v w w w v w w w v w w w vwww@v@Aw,AI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hslab_cache.cstdint.hstddef.htypes.hlibio.hstdio.h 85./!2K5..<tYQ..+.3K.uwǯ3fY~tfLK2(yK2K!221Kfɭ2h@f .u0vKYK2v2YYyK2= [!K2gJh!2w 2fvY=u;2w.X <gK/K .uY;h!3-[/,Ks=LK.2ɃLH,LGL1QhtH/M")H(L)H(nJW3LH/LhW"_shortbuf_IO_lock_tSLAB_MAX_SIZEmunmap_checkedstderr_IO_buf_endslab_putslab_list_create_IO_write_endunsigned intnextslabs_flagsheadslab_markersrlist_shiftrlist_createslab_get_with_orderprevslab_mmapnext_in_listlistslab_listrlist_nextuint32_t_IO_save_endGNU C 4.7.3slab_mergeshiftslab_cache_checkslab_splitslab_cache_destroylong long unsigned intpoison_charslab_cache_create_IO_backup_base_offsetslab_is_freeorders_fileno__pad1usedsize_toffset_IO_read_base_Boolslab_order_next__mptr_posSLAB_MIN_SIZE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cchar_mode_IO_marker_IO_read_ptrorderslab_getuint8_tdont_panicSLAB_MIN_SIZE_LB_IO_write_baseslab_from_ptrlong long intslab_assert_IO_save_baseslab_cachesmall_statsslab_buddysizeSLAB_HUGEslab_createin_use__pad2__pad3__pad4__pad5rlist_emptynew_ordercache_vtable_offsetlong doubleintptr_tslab_poisonrlist_addbuddysmall_stats_resetmergedrlist_firstSLAB_ORDER_LAST_IO_read_endslab_magicshort intlong intslab_size_alignallocatedlengthorderednext_in_cacherlistslab_set_freemagic/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/smallnew_sizeslab_sizeof_lockslab_set_usedsizetypelong unsigned int_old_offset_IO_FILEunsigned charhuge_sbuf_IO_write_ptraddrstatsitemslab_order_size__off_trlist_delsigned charshort unsigned int__PRETTY_FUNCTION____func__totalalignment_chain_flags2_cur_column__off64_t_unused2_IO_buf_baseGCC: (Debian 4.7.3-4) 4.7.3zRx !AC \ <GAC B \?AC z |SAC N AC M AC M 8AC s %AC ` *AC e <'AC b \AC P |lAC g  JAC E@ AC   AC E AC  $AC  DAC R  d[AC GO bAC ] zPLRx  $AC } AC   bAC ] , AC  LAC  lLAC G AC  AC  AC   AC  $ AC Ez .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @AhV &,19 PK`P\(/j* zu60u0 6M 0:0@AA0 HEK7 R!!G%h?/S;G R8^V%p{*'l MJP"` 3AlZh9uP[b   b  & 1 J Uz n0     L'G :? S \c l}slab_cache.crlist_createrlist_addrlist_delrlist_shiftrlist_firstrlist_nextrlist_emptysmall_stats_resetslab_list_createslab_size_alignslab_sizeofslab_order__PRETTY_FUNCTION__.1752slab_order_size__PRETTY_FUNCTION__.1756slab_magic__PRETTY_FUNCTION__.3149slab_assert__PRETTY_FUNCTION__.3155slab_set_free__PRETTY_FUNCTION__.3160slab_set_usedslab_is_freeslab_poisonpoison_char.3171slab_create__PRETTY_FUNCTION__.3177munmap_checked__PRETTY_FUNCTION__.3183slab_mmap__PRETTY_FUNCTION__.3187slab_buddy__PRETTY_FUNCTION__.3195slab_split__PRETTY_FUNCTION__.3200slab_merge__PRETTY_FUNCTION__.3209__PRETTY_FUNCTION__.3235__func__.3272__assert_failslab_from_ptrmemset__gcc_personality_v0munmap__errno_locationstrerror_rstderrfprintf_Unwind_Resumemmap64slab_cache_createslab_cache_destroyfreeslab_get_with_orderslab_getmallocslab_putslab_cache_checkabort   Z 7b Pl q pv7   p7   78A `K P U7f `p u 4z7 `  P7 l) . 37z9   7,;5<J=Q>Z g?l v { 27@   p7A   87+ 5 : W?7B zL Q gV 7 D   p 7 G E2D"3:>D 0I V?> 0 ?G>V 0[ h?> 0   ?`>k 0p p}?> 0 ?> 0 &?5J / 3 3& 3!A) 20 37 3 E 3*J 3W 3&^ 3c 3p 3mw 3| 3 3 3 3 3j 3 3z 3 3> 3 3 3 3 3\ 3" 390 3~> 3L 3T[ 3"g 3u 3 3 3 3R 3 3 3C 3 3m 3 3| 3d  3, 3: 3H 3V 3d 3r 3? 3_ 3 39 3  3 3  3 3 3 3 3& 36 3F 3V 3f 3v 3 3[ 3b 3i 3p 3 3 3  3 3 39 3W 3^f!n 0x 3 3!h 0` 3 3X 3uh 0 3X 3 0  3( 3/7 3BJ R 0\ 3k 3v ~ 0 3X 3wV 0@ 3X 3V{ 0 3R  3N{  0* 3? 33JRZ 0`d 39r 3 3 0 3M 0  39 3 3] M 0# 31 3<P\ 3go"w 0 3 3 3M 3 3" 0@  3 3#`B 3pIQY 0c 3q 3 3l 39 0 3 3 39P 0` 3 3 3 P' / 09 3G 3{S ] 3Hd l  t 0 ~ 3 3 39 3  3#    0 3M 3M 3  4 \ 3g o w 0 3 3  39 3 3 3.   0@ 3$ 3/ > 3FI Q  Y 0c 3q 3 3  3 3 3 3$   0 3 3 3 3 z& 3; 3B  J G R 0` \ 3j  r 3 3Q G  0 3 3 3 a u 3      3 5 3@  H  P 0 Z 3h 3v 3  3 3   3  3   0 3 39 3! ) 2 3D 3EL T\ 0 f 3u 3 3 35A 0@  3 3 3 3T 34 3 3# 33 3>0GO\ 3 mu 3 p 3} 3 3 32 . @!`h V {@`M"(H9hP :  #0P p G    region.c.o/ 1378727461 1000 1000 100664 14160 ` ELF>@@UHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HEHPHEH]UHHH}HEHHEHHUHH}HuHEHUHHPHEHH!]UH0]UH8]UHHH}HHEHUHH}HEH@]UHSH(H}HuиHHEHrHH)HHEHEHHUHHHEH}ufHEЉHEP0HEHPHEHHHHEHP HEH@ HHEHP HEHPHEHHEHPHEHH([]UHH0H}HEHHHEHEHHEHEHHUHHHEHEHEHPHEHH9t'HEHHHEHEHHEH}uHEHHUHH0H}HuHEHfH;EsGHEH;H+EHEHEHHHEHEHHEHE@0H;E~HEP0HE)HEP0HEfHE@0H)EHEHHgHEHP HEH@ H)HEHP HUHEHHHHEHHMH}tYHEHUHP/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/region.cnew_size <= region_used(region)cut_size == 0region_truncate?int0t3-f-.#/#0AJI#K#R4# T#(Vi#,\i#-`sa4#b4# qr#tJ# #s# s HPR#Ss#T#( $ 8kMq#r#0 8 8h B Bh B`Z Zho& ohZ hF h f fhJ hs4< 4h 4`4v4| |h$4 h!O !H !4@$4X&P6 6H8htmp8P9`9XE EH E4@ IhKXK`  % $ > : ; I$ >   : ;  : ; I8  I  : ;  I !I/ .: ; ' @B  : ; I .: ; ' @B .: ; ' I@B .: ; I@B .: ; ' I@B .? : ; ' I@B 4: ; I .? : ; ' @B 4: ; I   &I4I4  ww v !w!"w"%w%gvghwhiwilwlvwwwvwwwvwwwvwww'v'(w()w),w,QvQRwRSwSVwVxvxywyzwz}w}vwwwvwwwvwwwvwwwvwwwBvBCwCDwDGwGwvwxw,x /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hregion.hregion.cstddef.hstdint.htypes.hstdio.h 85./!...<tYQ..+.3K.K2=;.~.,uu6gx"VJ'6 =Y=0+sXttrslab_datasize_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/smallalignmentprevssize_tnext_in_cachelong long unsigned intorderrlist_delnextlong long intsigned char__PRETTY_FUNCTION__slab_list_createrslablong int__ssize_tstatsslab_sizeofunsigned intslab_min_sizelong unsigned intnamesizeshort unsigned intcut_sizetotalnext_in_listsizetyperlist_addlong doublerlist_firstnew_sizeitemslabregion_alloc_slowGNU C 4.7.3slab_listslabsusedrlist_createrslab_sizeofsmall_statsunsigned charshort intmagic__mptrheadin_useuint32_tregion_freeslab_cachecharordersallocatedregionrlist_nextsmall_stats_reset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/region.crlistuint8_tregion_usedrlist_emptyregion_truncateslab_size_alignlistcacheGCC: (Debian 4.7.3-4) 4.7.3zRx !AC \ <GAC B \?AC z |AC M AC M 8AC s %AC ` *AC e 'AC b <AC P \AC P |"AC ] AC M  AC E AC   5AC 0 .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @xp&&,1>`9x'J X h0c50 |w5 0LA0 5"H X% !!G!h?+7B8N%`(*qR'y"   C5 region.crlist_createrlist_addrlist_delrlist_firstrlist_nextrlist_emptysmall_stats_resetslab_list_createslab_size_alignslab_sizeofrslab_sizeofrslab_dataregion_used__PRETTY_FUNCTION__.2511region_alloc_slowslab_getregion_freeslab_putregion_truncate__assert_fail& f p u Xz". R \ a xf"    !x) 0 5  B 1P W ^ e !j w ~ M D  |  d j  e   r o H  +. < =K W e it    Y i p z ;  C% 1 ? P U \d!l v 6 !h ` 8  h      8' 2:B L [  fnv   ( @  (R  6 &Ry   H. [=  GyOW `] gow }       z    z% H3 #A Q MX`Ch @r z  1 & 1 Cx   z" 0 ;D `RZ2c qy 1  @!`h( R@y`Cmempool.c.o/ 1378727461 1000 1000 100664 44608 ` ELF>g@@UHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@]UHH}HEH@]UHH}HEH@HEHPHEH]UHHH}HEHHEHHUHH}HuHEHUHHPHEHH!]UHSHE} vE ӉHH[]UHP|]UHH}HuHEH;EwHEH;Es]UHH}HEHPHEHHEHPHEHP@HEHHHEH@HH HHEHPHHEH@HHHHEHPHHEH@HHHHEHPH]UHH}HEHHEHEHH;Et# HEH@8HEHEH@8HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@@HHEHEH@@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@@HHUHH9tJHEH@@HHEHEHH;E HEH@8HEHEH@8HUHH9uHEHHEHEHH;Eu,HEHHEHUHEHHE}yHEHEHEH@8HE}~7HEH@@HHEHEHH;Eu,HEHH;EuHEHEUHH0H}HuHEH@8HUHH9tNHEH@8HEHEHH;EHEH@@HHEHEH@@HHUHH9uHEHHEHEHH;Eu,HEHHEHUHEHHE}yHEH@8HE}~?HEHEHEH@@HHEHEHH;Eu,HEHH;EuHEHEUHH H}HuHEHHE$}yHEH@8HEHEH@@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHGE}yHEHEHEH@8HE"}~HEH@@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@8HE*}~HEHEHEH@@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHP8HHHHH@@H HHHP@HH@@HHHHP@HHHHHEHEHHHHHEPHE@E}u,}yHEHPHEHH@8HHEHPHEHH@@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHP8HEH@@HHEH@8HEHEH@@HHEH@@HHHEHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHE=HEHHHEHEH@@HƒHEH HHEHP@HEH@@HOHEH@8HEHEH@@HtJHEH@@HHHEHP@HEH@@HHHEHP@HEH@@HHHEHP@HEH@@HEHEH@@HHEHEH@8HHEH@@H HHEHP@HEHUHP8HEH@@HHEH HHEHP@HEH@@HHHEHP@HEHEHEHUHHmHUHH9HHHHHHHHR@HHP@UHHHXHPHEHXHH`H`HEHEHHPHH!HEPHE@E܃}yHEHPHEHH@8HyHEHPHEHH@@HH}uYHE@HEHEHE&HE@HEHPHEHH@8HHEHEHHXHH9u HEHEHHXHH9HEHH;Pt,HmHEHH;PUHEHH@@HEHEHHUHHR@HHHPHR@HH HP@HEHHPHR8HP8HEHHPHR@HHHUHHR@H HP@HPH@@HHEH HHPHP@HEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHP8aHEHHHUHHHUHHHR@H HP@.HPH@8HEHXHH;EHPH@@Ht,HEH@@Hu,HEH@@HHHEHP@H`H9EuHXHUH HEH@yHEHHHUHP8 HEHHHUHHHR@HуHUH HP@ H`H9EuHXHPHXHt HEHH@@HtGHEH@x,HEHHHXHHP8 HXHPHEHHm HE@u,HE@HEHHUHHHP8HEHHH@@Ht,HEHH@@HHEHH@@HHEHEH@8HEHEH@@HHEHHUHHR@HHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHHUHHR@HуHUH HP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8IHEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8HUH`H9w,HEH@yHEHHHUHP8HEHHHUHHHR@HуHUH HP@HEHH@@HHEHEH@8HEHEH@@H=HEH@@HHHEHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHHUHHR@HуHUH HP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8H`H9EuHXHUHHEH@yHEHHHUHP8gHEHHHUHHHR@HуHUH HP@7HEHHUHHR@HHP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8HEHUHkHEHHUHHHHUHHR@H HP@HEHH@8HEHEH@@HVHEH@@HHEHEH@8HEHEH@@HHEH@@HHHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEH@@HƒHEH HHEHP@HEH@@HHEHEH@8HHEH@@H HHEHP@HEHUHP8HXHH;Eu,HEH@@HHHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEH@@HHHEHP@H`H9EuHXHUHxHEH@yHEHHHUHP8QHEHHHUHHHR@HуHUH HP@!HEHH@@HHEH@8HxHxH@@H)HEHHUHHR@HHP@HEH@@HHHEHP@HxH@@HHHxHP@HEHH@8HpHEHHpHR@HHP8HEHHHpH@@H HHpHP@HUH`H9w,HEH@yHEHHHpHP8HEHHHUHHHR@HуHpH HP@HEH@@HHHEHP@HEHHUHHR@HHP@HEH@8HhHhH@@HHhH@@HHHhHP@HEHH@8H`HEHH`HR@HHP8HEHHH`H@@H HH`HP@H`H9EuHXH`HHEH@yHEHHH`HP8HEHHHUHHHR@HуH`H HP@pHEH@@HHHEHP@HmHUH`H9BH`HXHHXHH@@Ht,UHH0H}HuHUHMHEHH;Eu HEHHEHp8HMHUHEHHEHEHH;EtHENHEH@@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHHPH}HuHUHMLEHUHEHH6E}HEHP8H}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@@HHHMHUHEH}~,HEH@@HHH}HMHuHEIHNHEH@@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@@HHHMHUHEHHEHEHH;EtHEJHEH@8HEHUHuHMHEHHEH}tHEHMHUHuHEHUHHPH}HuHUHMLEHUHEHHE}HEH@@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHp8HMHUHEHu}y%HEHP8H}HMHuHEIHJHEH@8HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHHH}HuHE@0HEHEP4HEHUHPHHEHHEHPHUHHH}HHEH@HHHEHUHHH}uHEHHHEH@HEHUHSHH}HuH]HEHHH)HHUHRHUuH[]UHSH(H}HE؋@4uVHE؋P0HE؉H HHHHDHEqHE؋P0HEH@H9u^HE؋@0PHE؉P0HE؋P0HE؉H HHHHDHE}tmHE؋P0HE؋H0HE؉H H4ȋEHHHHH1HE؉H H HE؋@4PHE؉P4HE؋@4uHEH@HHP(HEHHHE؋@0EHE؉H H([]UHSH8H}HuHUHUHEHHEE?EEEHEЋUH HЋEHHHHH HEЋUH H HEЋ@4PHEЉP4HEЋ@0;Ev HEЋUP0HEЋ@4uHEHP(HEHH HEЋP4HE؋9HEHP(HEHHHEHH;EvjHEHHHEHEHP HEHH@ H)HEHP HEHHHEHHHHEHUHbHEHHtCHEHHHEHP HEH@ H)HEHP HUHEHHHHEHUHH8[]UHSHHH}HuUȈE} vHEHUHHEHHHEH(HHEHǀHEȋUHEUHEHøHH)HHEHEHUHUHuHEH}uHEH?HHEHmHEH?HHEEHEHUHHH;EwHEHH;EsEHEHUH)HEHH)‹EH9r'HEHH;EtHEHEȉHEHEȉHH[]UHH0H}HEHHHEHEHHEHEHHUHHHEHEHEHPHEHH9t'HEHHHEHEHHEH}uUHH H}HEH(HHEH}HEHHuHEHEHHHEH}u HUHEHHHEHPHEHHHDHEHP HEH@ HHEHP HEHHEHEHǀHEHP(HEHHHEH@HH;EtHEHPHE苀HHEHPHEHUHH H}HuHEHEHHEHEHPHE苀H)HEHPHUHMHEHHUHSH(H}HuHE苐HEHEH@HU苒HUغHu؉HEPHEHEPHEH@ HURHUغHu؉HEP HEHPHEHPHEHX HHE@ HHH)HEHPH([]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.horder <= SLAB_ORDER_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/mempool.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0slab->nfree0objcountmapsize * MEMPOOL_MAP_BIT >= objcountslab_size - objcount * objsize - mapsize * MEMPOOL_MAP_SIZEOF < objsize || mapsize * MEMPOOL_MAP_BIT == objcountslab->pool == poolslab_order_sizemempool_alloc_nothrowmempool_create_with_ordermslab_allocmslab_tree_removemslab_tree_insertmslab_tree_prevmslab_tree_nextq;int0p3w)z;-.#/#) 0AaI#K#R0# T~#(Ve#,\e#-`a0#b0# qr#ta# ##   H;J   dBd#d#P]^#ffi`~#0b~#4d#8f+#Hmapp1#PB|+p##e#(#~#e#~#~# @ Xyey#yB#y@ ~#~#~#~# a#)m88hB]BhB`ZZhoohhf%f%ha[[h00h0`e\   t0#Bblhs#hrhs#`,,he,,Xret,h,,Xret,h,,H,@ret,h ,`cmp,B\,n,H,@ret,hn ,`cmp,B\,,Xkey,Pret,hcmp,Bd,Q ,Hkey,@ret,h,`cmp,B\, ,Hkey,@ret,h,`cmp,B\ , ,o,o ,5 ,#cmp,B#, o, h  ! cmp,B\,`! ,P,H,@,,,,       ,,n,n , ,#cmp,B#,h,`,n !{ cmp,BL! , K! ,@! ,,,X! ,,!] ,,,!,P,,~,~!H,~,~,~,~   ,3,X,Pcb,MHarg,@ret,h,`"M###3,",H,@,cb,Marg,cmp,Bd!ret,hret,P,X,,X,Pcb,MHarg,@ret,h,,X,Pcb,MHarg,@ret,h,`,,H,@,cb,Marg,cmp,Bd!ret,hret,P,X,U,X,Pcb,MHarg,@ret,h//h/+`::hB BhidxB~dI~LI`ptrIXTTH idxW~\    s"s+Hs@ptrsidxu~\v~X +p~e 0H0X0P   e+HehtmpeP!Dk`kXq+Xʣh    /+XobjPh n+XnPv% $ > : ; I$ >  : ;  : ; I8  I : ;  (  : ;  I !I/  : ;  : ; I8 !I .: ; ' @B : ; I .: ; ' @B .: ; ' I@B .: ; ' I@B 4I4  &I.: ; I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B  4: ; I .? : ; ' @B ! "' I#Iww v !w!"w"%w%gvghwhiwilwlvwwwvwwwvwwwvwwwvwww@v@AwABwBEwEvwwwvwwwvwwwOvOPwPQwQTwTvwwwvwwwVvVWwWXwX[w[vwwwvww!w!vwwwjvjkwklwlowo# v# $ w$ % w% ( w( vwww:v:;w;<w<?w?~v~wwwvwwwvwwwvwwwrvrswstwtwwwvwww v wwwDvDEwEFwFIwIvwww!v!!w! !w ! !w !"v""w""w""w"$v$$w$$w$$w$?%v?%@%w@%A%wA%D%wD%&v&&w&&w&&w&&v&&w&&w&&w&'v''w,'y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sysrlist.hslab_cache.hmempool.hmempool.cstddef.hstdint.htypes.htypes.h 85./!..c..+.(.fYtK.3sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt(j)33&32x+/v+fLCxKY7g9+vyfu $t/Y"x"VJ'2=u/8h׻2"g2*'mslab_tree_lastmslab_cmpslabsizetotalsrbt_rootsize_tuintptr_tMEMPOOL_OBJ_MINmslab_tree_psearchalignmentmslab_idxprevssize_tmslab_tree_searchmempool_alloc_nothrownext_in_cacheleftleftlong long unsigned intpathpordermslab_sizeofrlist_delmslab_tree_tleftrightnextobjcounttnodeSLAB_MIN_SIZElong long intsigned charfree_slabs__PRETTY_FUNCTION__bit_noslab_list_createmslab_tree_reverse_iter_startrightleftlong intmslab_tree_next__ssize_tmempool_destroystatsnfreemslab_tree_reverse_iterunsigned intlong unsigned intmempool_create_with_orderMEMPOOL_MAP_BITsparemslab_freemslab_objsizeshort unsigned intmslab_tree_itermslab_tree_newintptr_tmslab_tree_iter_starttotalrbn_right_redpathmempool_statsunodemslab_allocnext_in_listrlist_addsizetypemslab_tree_reverse_iter_recurseSLAB_ORDER_LASTlong doublerbt_nil__mptrleftrightleftitemslabmempool_freeGNU C 4.7.3rbtreeslab_listslabsusedrlist_createobjsizeslab_order_sizesmall_statsunsigned charmbitmap_tmempoolnodeSLAB_MIN_SIZE_LBmslab_tree_prevshort intmagicmslab_tree_removemslab_tree_iter_recursemslab_tree_firstMEMPOOL_MAP_SIZEOFmslab_tree_nsearchheadin_usemslabuint32_tslab_cacheslab_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/mempool.crightchartrednodepmslab_offsetrlist_firstordersallocatedSLAB_MAX_SIZEcnode_Boolslab_orderrlist_nextsmall_stats_resetrlistpooluint8_tmapsizeslabcountstartslab_size_alignlistSLAB_HUGErbn_leftleftmslab_tree_insertcachemslab_createGCC: (Debian 4.7.3-4) 4.7.3zRx !AC \ <GAC B \?AC z |AC M AC M %AC ` *AC e 'AC b  JAC E@ @AC P `5AC p {AC v `AC [ hAC c ?AC : ?AC :  AC  @AC  `AC  AC  `AC [ AC  DAC ? AC }  AC  @6AC 1 `AC } cAC ^ 8AC s 7AC r  JAC E@  yAC Eo  (AC E  LAC E pAC  CAC > hAC c  AC E .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @'v &(,(1(@>P,u9'JBXD@hS0ch0 |NS}w 0[0abbf8m0% hs !!G"h?,8C%U*f'vAJ50 sc'71EJ; Tm   {P`h?W? k.$ `@X;Dn~68y!""$2@%CH\&hiw&mempool.crlist_createrlist_addrlist_delrlist_firstrlist_nextsmall_stats_resetslab_list_createslab_size_alignslab_order_size__PRETTY_FUNCTION__.1756mslab_sizeofmslab_cmp__PRETTY_FUNCTION__.2761__PRETTY_FUNCTION__.2774__PRETTY_FUNCTION__.2817__PRETTY_FUNCTION__.2849mslab_createmslab_objmslab_idx__PRETTY_FUNCTION__.2959__PRETTY_FUNCTION__.2977__PRETTY_FUNCTION__.3000__assert_failmslab_tree_newmslab_tree_firstmslab_tree_lastmslab_tree_nextmslab_tree_prevmslab_tree_searchmslab_tree_nsearchmslab_tree_psearchmslab_tree_insertmslab_tree_removemslab_tree_iter_recursemslab_tree_iter_startmslab_tree_itermslab_tree_reverse_iter_recursemslab_tree_reverse_iter_startmslab_tree_reverse_itermemsetmslab_offsetmslab_allocmslab_freeslab_putmempool_create_with_ordermempool_destroymempool_alloc_nothrowslab_get_with_ordermempool_freeslab_from_ptrmempool_statsV ` e Zj% 0 x %# 0- x2 7%  x %b l xq v%8 B xG L%Z d xi n % " x' ,%A K xP PU%1 ; x@ E%  x %  x %l v x{ %[ e xj 3o%R \ xa f%j t xy X~%05010)1y010S334t343.4O36%7b7  x %  x  % /!.!/a":":"  # x# Z#%>#&# # x# #%.$ 8$ x=$ B$%w$ $ x$ $%$:X%'%>+&.>& H& xM& aR&%}&8&@&9  ! !'% , !1 !3> !L !:S !MZ !Ha !,f !s !z !s ! !  ! !: ! !{ ! != ! !  !, !` !{  ! !) !n7 !6E !S !b !n !| ! ! ! ! ! !O !V ! !  !w !C !D& !4 !C !O !{k !y ! ! ! !  ! !T !S ! !z  ! !I !*W !Yf !w ! ! ! ! ! !# ! !& ! ! !!  !  ! '!/h7 `A !O !v^ !ehmu  !v !C   ! !  !v !   !, !z3;C @M !b !muA}  !n !g !A  ! !_  !  `! !,4< d !ksP{   ! !fP  ! !  !! !,4W< @F !T !p !_{ 0; !&; !W  ! ! !_% .6z? !&M Uzu !  ! ! ` !# !&1 F9 S !T^ f kn x ! !&  A ! k $   ! ! !6 !E !S !_^  g o    !n   !   ! )  !&     ! .  6  ? !N 9 V  _ !&n !+ !t !< $   ! ! ! !' !05 !D !_O  X f ` ) |   !+   !   !  ! !&   ! * !9 A KN !&^ Kf o !&  ) !   a !& ! !h ; I !x  !'/8 !&IQ)Z !i#qz !& !N;  ! ! 9$ ! U !`;hp @z ! ! !w/} ! $ !/7? I !W ! !   ! !4  ! !'/7 ` A !O !] !z ! !s   ! !V !]sem  w !{ ! !6   !{ !dE   !{  !qE& @ 0 !{N !Ya!i  s !{ !_  !Y!"   ! !{ !s$ !)+"3$; ` E !T ! c !r ! !_  ! ! ! !$@%   ! !{!$)$6 !aE%M3%V !ax !@%&   ! !{ !_  !&&   !! !{1 !8&@'H  R !` !  @!`h ADdPW$Ddk$ ;$DdsE,!P"t$@%&&small.c.o/ 1378727462 1000 1000 100664 43384 ` ELF>Hc@@UHH}HuHEHUHHPHEHH!]UHHH}H9EvH}w)H}@v HE)UHPZ]UHH}HEH@]UHH}HuHEHE9w&HEHE9s]UHH}HEHPHEHHEHPHEHPHEHHHEH@H HHEHPHEH@HHHEHPHEH@HHHEHP]UHH}HEHHEHEHH;Et! HEHHEHEHHUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@HHEHEH@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@HHUHH9tHHEH@HHEHEHH;E HEHHEHEHHUHH9uHEHHEHEHH;Eu8HEHHEHUHEHHE}yHEHEHEHHE}~7HEH@HHEHEHH;Eu8HEHH;EuHEHEUHH0H}HuHEHHUHH9tMHEHHEHEHH;EHEH@HHEHEH@HHUHH9uHEHHEHEHH;Eu8HEHHEHUHEHHmE}y HEHHE}~?HEHEHEH@HHEHEHH;Eu8HEHH;EuHEHEUHH H}HuHEHHE#}y HEHHEHEH@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHESHUHEHH4E}yHEHEHEHHE"}~HEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHESHUHEHHE}y HEHHE*}~HEHEHEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHHHHHH@H HHHPHH@HHHHPHHHHHEHEHHHHrHEPHE@E}u8}yHEHPHEHHHHEHPHEHH@HHHEHEHHHH9^HEHHHmHEHHEHE@HEHHHEHEHUHHEH@HHEHHEHEH@HHEH@HHHEHPHEHHEHEH@HHHEHHEH@HƒHEH HHEHPHEHE:HEHHHEHEH@HƒHEH HHEHPHEH@HLHEHHEHEH@HtJHEH@HHHEHPHEH@HHHEHPHEH@HHHEHPHEH@HEHEH@HHEHEHHHEH@H HHEHPHEHUHHEH@HHEH HHEHPHEH@HHHEHPHEHEHEHUHHmHUHH9HHHHHHHHRHHPUHHHXHPHEHXHH`H`HEHEHHPHHHEPHE@E܃}yHEHPHEHHHxHEHPHEHH@HH}uXHE@HEHEHE%HE@HEHPHEHHHHEHEHHXHH9u HEHEHHXHH9HEHH;Pt8HmHEHH;PRHEHH@HEHEHHUHHRHHHPHRHH HPHEHHPHHHEHHPHRHHHUHHRH HPHPH@HHEH HHPHPHEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHH_HEHHHUHHHUHHHRH HP,HPHHEHXHH;EHPH@Ht8HEH@Hu8HEH@HHHEHPH`H9EuHXHUH HEH@yHEHHHUH HEHHHUHHHRHуHUH HPv H`H9EuHXHPHXHO HEHH@HtFHEH@x8HEHHHXHH HXHPHEHHm HE@u8HE@HEHHUHHHHEHHH@Ht8HEHH@HHEHH@HHEHEHHEHEH@HHEHHUHHRHHPHEHHEHEH@HHHEHHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHHHUHHRH HPHEHHEHGHEHH@HHEHEHHUHHHUHHRH HPHEHHEHHUH`H9w8HEH@yHEHHHUHHEHHHUHHHRHуHUH HPHEHH@HHEHEHHEHEH@H8HEH@HHHEHPHEHHEHEH@HHHEHHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHHHUHHRH HPHEHHEHH`H9EuHXHUHxHEH@yHEHHHUHRHEHHHUHHHRHуHUH HP"HEHHUHHRHHPHEHH@HHEHEHHUHHHUHHRH HPHEHHEHHEHUHXHEHHUHHHHUHHRH HPHEHHHEHEH@HLHEH@HHEHEHHEHEH@HHEH@HHHEHPHEHHHEHEHHUHRHHHEHHHEH@H HHEHPHEHHHEHEHHUHRHHHEHHHEH@H HHEHPHEH@HƒHEH HHEHPHEH@HHEHEHHHEH@H HHEHPHEHUHHXHH;Eu8HEH@HHHEHPHEHHHEHEHHUHRHHHEHHHEH@H HHEHPHEH@HHHEHPH`H9EuHXHUHoHEH@yHEHHHUHIHEHHHUHHHRHуHUH HPHEHH@HHEHHxHxH@H&HEHHUHHRHHPHEH@HHHEHPHxH@HHHxHPHEHHHpHEHHpHRHHHEHHHpH@H HHpHPHUH`H9w8HEH@yHEHHHpHHEHHHUHHHRHуHpH HPHEH@HHHEHPHEHHUHHRHHPHEHHhHhH@HHhH@HHHhHPHEHHH`HEHH`HRHHHEHHH`H@H HH`HPH`H9EuHXH`HHEH@yHEHHH`HHEHHHUHHHRHуH`H HPpHEH@HHHEHPHmHUH`H9fH`HXHHXHH@Ht8UHH0H}HuHUHMHEHH;Eu HEHHEH0HMHUHEHHEHEHH;EtHENHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHHPH}HuHUHMLEHUHEHH[E}HEHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@HHHMHUHEH}~,HEH@HHH}HMHuHEIHNHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@HHHMHUHEHHEHEHH;EtHEIHEHHEHUHuHMHEHHEH}tHEHMHUHuHEHUHHPH}HuHUHMLEHUHEHHE}HEH@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH0HMHUHEHs}y$HEHH}HMHuHEIHIHEHHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHH@H}HuHUHE؋H;Er?HEHHu HEBHE؋HEHEHEHEHxH*HHH H*XHEY.sH, \H,HH1оHHEHE؋H;ErSHEH;EOHEHHEHEHHEHHEHEHEHHuH~HHEHPHEHHEHHEHHHEUHSH8H}HuЉỦMEHEHUHE̾HE̋EȾHEȋE;ErhEøHHHE؈HEHHE4HEHEHUHEHEHEHEHH;EwHEH-HE؉E.v EHE؋HxH*HHH H*X(YMHE؋HxH*HHH H*X.vzHE؋HxH*HHH H*X XHE؋HxH*HHH H*Xf(^f(ffZEHU؋EĉHEHHEHEHHEHHEHEHPH;EuHEHǀHEHHEHHEHHUHEؾHH8[]UHHH(H H(H; H HHEH(EE;E~EU)EEHcHHHHHHH(HHHEHEH; r*H HPHEH9}H EH(HH0HHHEH}uHEHH; v!H HMH(HH[HEHEHHEHEH; sHEHHUHH0H}HuHEHEЉHHEHEH@HHEHUHEHHHEHHuYHEHE؋9vEHEHHu5HEHHEHEHHEHHHEHUHUHHH}HuHEHUHHEHPHEHPHEHHHHEHPUHH H}HEHPHEHHH9sHEHPHHHUHJTHEH@HtBHEH@HHEHEH@HUHHHHHHEHPHEUHH0H}HUHEHH HEHHEHHEH}uHUHH`H}HuHUHMHEHHUHEHHSHUHEHHHEHHEHHEHHEHPHEHHEHPHMHUHEHHHEHHEH}uH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.hsize <= (4294967295U)/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/small.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0size > alloc->step_pool_objsize_maxobjsize > alloc->step_pool_objsize_maxobjsize_max > objsize_min + STEP_POOL_MAX * STEP_SIZEsize <= pool->objsize && (size + STEP_SIZE > pool->objsize || idx == 0)0size <= pool->objsizesmalloc_nothrowfactor_pool_createsmall_alloc_createslab_orderfactor_tree_removefactor_tree_insertfactor_tree_prevfactor_tree_next_@? (FI QEint0P3iw>zpp-.#/#) 0AaI#K#R# T^#(VE#,\E#-`a#b# qr#ta# ##   Hp d%d#d#P]^#ffi`^#0b^#4d#8f#Hmapp#P%|S##H#(#^#E#^#^# # XyHy#y%#y# ^#^#^#^# a#T  gg.#g.#d.g#i#o#q.# tYt.#t#t4 wx^###&.#Y#S#З #ؗE#ܗ     %668Y>7 m>"|  ##.#dh`EC͍hS  IS  Cth17a1.hb1.`87hY8.d7Xret7.h8.7Xret7.h8.L7H7.@ret7.h\ 7.`cmp77\ I\ L8. 7H7.@ret7.h  7.`cmp77\L8.j 7Xkey7.Pret7.hcmp77d8. 7Hkey7.@ret7.h7.`cmp77\8.h 7Hkey7.@ret7.h7.`cmp77\ 8 7o7.o 7 7.#cmp77#7 o7) h?  !" cmp77\7.`! 7.P7.H7.@7.7.7.7D  )  I? /  8$7n7.n 7 7.#cmp77#7$h7$`7*n: ! cmp77L!7 7D K![ 7.@! 7.7.7.X!7.7.! 7.7.7.!7.P7.7.~7.~!7.~7.~7.~7.~ : / 8.7X7.Pcb7Harg76@ret7.h7.`"..68.7H7.@7.cb7arg76cmp77d!ret7.hret7.P7.X8.&7X7.Pcb7Harg76@ret7.h8.7X7.Pcb7Harg76@ret7.h7.`8.7H7.@7.cb7arg76cmp77d!Rret7.hret7.P7.X8.7X7.Pcb7Harg76@ret7.h;.|;H<.@=| HhI`U.X/ ``H`S@a^a^b  pX.P/ 6~~h !idx7\PX~.` I  zϳHptr6@цh`.X ith`|itXh#b$H%it|P& h#$$'cb$6%it|P&h&Ya% $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  : ;  : ; I8 !I' I &I.: ; ' I@B : ; I .: ; ' I@B 4I4  .: ; I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B  4: ; I .? : ; ' @B ! "' I#.? : ;' @B $: ;I %4: ;I &4: ;I ': ;I ww&v&'w'(w(+w+vwwwvwwwvwww v  w  w wvwwwvwwwKvKLwLMwMPwPvwwwvwwwIvIJwJKwKNwNvwwwvwwwE vE F wF G wG J wJ yvyzwz{w{~w~/v/0w01w14w4rvrswstwtwwwvwwwvwwwvwwwbvbcwcdwdgwgvwww!v!!w!!w!!w!]#v]#^#w^#_#w_#b#wb#$v$$w$$w$$w$b$vb$c$wc$d$wd$g$wg$$v$$w$$w$$w$J%vJ%K%wK%L%wL%O%wO%&v&&w,&~ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sysslab_cache.hmempool.hsmall.cstdint.hstddef.hrlist.hsmall.htypes.htypes.h .uwǯ.K.~.uttsZ0s<ff".<X   J f  f<.X    f t fffJf  ff f2ffX t  . eCJ <1. )2f%f.X   X3#.$.f0 ."#!T%&'),*+f-2./G0123f,04267.89f50(q:L</=>?@uAB.CDf;0EfG%IJKLH3F6M%O}PXQRN0Sf$XU<V'.t-f0ft.4(f,0 ft.tt(ft5f+ft.<f$+ ft.tt(m=tZ$/K5//)۫FnYו1(8e/YY!=tv">X=,JIu=JY."3LZ .2I(hY31/hu[10/Kg7m factor_poolsslabsizetotalsrbt_rootfactor_pool_cachesize_tuintptr_tfactor_tree_insertcb_ctxobjsize_min_lbalignmentprevssize_tpathfactor_tree_firstnext_in_cacheleftleftlong long unsigned intpathpordermslab_sizeof/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/small.cmslab_tree_tleftrightnextobjcounttnodeSLAB_MIN_SIZElong long intsigned charfree_slabs__PRETTY_FUNCTION__smfreesmalloc_nothrowfactor_pool_cmplong int__ssize_tstatsnfreestep_poolsfactor_tree_newfactor_tree_lastfactor_tree_reverse_iter_startfactor_tree_iterfactor_tree_searchunsigned intfactor_tree_psearchsmall_alloc_createobjsize_maxlong unsigned intfactor_pool_createmempool_iterator_nextsparefactor_poolsizeshort unsigned intalloc_factorupper_boundfactor_tree_reverse_iter_recurseintptr_ttotalrbn_right_redmempool_statsunodenext_in_listsizetypeSLAB_ORDER_LASTlong doublerbt_nilsmall_allocleftrightleftslabGNU C 4.7.3patternrbtreeslab_listslabsSTEP_SIZEusedfactor_tree_tobjsizefactor_tree_iter_recursesmall_statsunsigned charmbitmap_tmempoolnodeSLAB_MIN_SIZE_LBobjsize_minshort intmagicstep_poolprevsizein_usemslabuint32_tfactor_tree_iter_startslab_cache_BoolrightcharSTEP_POOL_MAXnodepallocordersmempool_usedallocatedSLAB_MAX_SIZEFACTOR_POOL_MAXcnodeslab_ordertredsmall_alloc_destroymempool_stats_cbfactor_tree_reverse_iterrlistpoolfactoruint8_tfactor_pool_nextSTEP_SIZE_LBfactor_tree_nsearchfloatfactor_tree_removefactor_tree_prevmapsizeslabcountmempool_iteratorstartslab_size_alignmempool_iterator_createSLAB_HUGErbn_leftleftrightleftcachefactor_tree_nextstep_pool_objsize_maxGCC: (Debian 4.7.3-4) 4.7.3zRx 'AC b <lAC g \AC P |AC M QAC L {AC v ^AC Y hAC c <AC 7 <<AC 7 \AC  |AC  AC  AC  4AC / AC  CAC > <AC } \AC  |3AC . AC } AC   AC E zPLRx  $AC  DAC  dJAC E AC   PAC K  AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @&r0 &D&,D&1P&h9*)P* K~`'\AHj4D zO0u0 DOH 0W0q^^^`xbi n ''l$ =JWQg@ c    )7 {G^YhjL<{<JF 4z0Cs.O3n!^# $J8c$N$PbrK%~small.cslab_size_alignslab_order__PRETTY_FUNCTION__.1752mslab_sizeofmempool_usedfactor_pool_cmp__PRETTY_FUNCTION__.2816__PRETTY_FUNCTION__.2829__PRETTY_FUNCTION__.2872__PRETTY_FUNCTION__.2904factor_pool_create__PRETTY_FUNCTION__.3001__PRETTY_FUNCTION__.3014__PRETTY_FUNCTION__.3029__assert_failfactor_tree_newfactor_tree_firstfactor_tree_lastfactor_tree_nextfactor_tree_prevfactor_tree_searchfactor_tree_nsearchfactor_tree_psearchfactor_tree_insertfactor_tree_removefactor_tree_iter_recursefactor_tree_iter_startfactor_tree_iterfactor_tree_reverse_iter_recursefactor_tree_reverse_iter_startfactor_tree_reverse_itermempool_create_with_ordersmall_alloc_createsmalloc_nothrow__gcc_personality_v0mempool_alloc_nothrow_Unwind_Resumesmfreeslab_from_ptrmempool_freemempool_iterator_createmempool_iterator_nextsmall_alloc_destroymempool_destroysmall_statsmemsetmempool_stats? I N ZS @ p T @^ pc h   p" '   p b l pq vz  p  4 > pC H ] g pl @q L V p[ `  p   p  ~  p \ f pk #pM W p\ a` j po Ht)*)*)*m)*)G,,-f,-,-?,  p PPN X p] b/'Z d pi n/ T T \r!q" {" p" (""%" " p" p".# 8# p=# rB#N#3X#4#6#7$(R$ $"%8$%;0%9E%4u%=%8%>%9%4   &% , 3 A F S =Z _ l _s x > ? 8 q   | O  \ b c #    o) 7 E S b 1n | G       | K  f M& 2 N \ ]j  U ~     G T  , : I 8Z [f t T      1 f M  ]  s O= K Z e r   &   ~  G  k? L V c p v }     4'   r G' `! / :Y cks y             # .6> @H f  qyL   L   ] @ l ]+3lc nv~ `  ]   ]: L  J( 2 l w J     ] s  l    : ]H P lj Iq y F   ] ]     / # +  4 AB J W oe 1m v  P  ]      o ]  ] RG M T F \ zd @n } ] ]       I     ) R8  @ )M o\ -d q  t ]    t  V ] V  ] ) o8@_M ][ Ej yBJ iv  ]   ]A LzT0\ f t ].  0s    .. ]hlp#q  ;s `  .( 3;C M [ ]( o     . ]/7lS[r o |c   . c   ! / > IR ` n  ! @  ~ s     $ /!7^#? I X g u !" c"#   ^#$  " > L Z#b$k | D$c$ `   c$$  $$  W$$K%,  6 S d 1lK%t&|     \ %%   @'`  L@`JF z 0@s`c 2$!- H^#h$c$$ K% tarantool-1.5.1.218.g1a69fd6/src/lib/small/README0000664000000000000000000000011512202131537017276 0ustar rootrootsmall - a collection of Specialized Memory ALLocators for small allocations. tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/0000775000000000000000000000000012213333320016577 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/lib/bitset/cmake_install.cmake0000664000000000000000000000226212213333034022413 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/page.c0000664000000000000000000000524312202131537017667 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "page.h" extern inline size_t bitset_page_alloc_size(void *(*realloc_arg)(void *ptr, size_t size)); extern inline void * bitset_page_data(struct bitset_page *page); extern inline void bitset_page_create(struct bitset_page *page); extern inline void bitset_page_destroy(struct bitset_page *page); extern inline size_t bitset_page_first_pos(size_t pos); extern inline void bitset_page_set_zeros(struct bitset_page *page); extern inline void bitset_page_set_ones(struct bitset_page *page); extern inline void bitset_page_and(struct bitset_page *dst, struct bitset_page *src); extern inline void bitset_page_nand(struct bitset_page *dst, struct bitset_page *src); extern inline void bitset_page_or(struct bitset_page *dst, struct bitset_page *src); #if defined(DEBUG) void bitset_page_dump(struct bitset_page *page, FILE *stream) { fprintf(stream, "Page %zu:\n", page->first_pos); char *d = bitset_page_data(page); for (int i = 0; i < BITSET_PAGE_DATA_SIZE; i++) { fprintf(stream, "%x ", *d); d++; } fprintf(stream, "\n--\n"); } #endif /* defined(DEBUG) */ static inline int page_cmp(const struct bitset_page *a, const struct bitset_page *b) { if (a->first_pos < b->first_pos) { return -1; } else if (a->first_pos > b->first_pos) { return 1; } else { return 0; } } rb_gen(, bitset_pages_, bitset_pages_t, struct bitset_page, node, page_cmp) tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/iterator.c0000664000000000000000000002431612202131537020606 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include "page.h" #include const size_t ITERATOR_DEFAULT_CAPACITY = 2; const size_t ITERATOR_CONJ_DEFAULT_CAPACITY = 32; struct bitset_iterator_conj { size_t page_first_pos; size_t size; size_t capacity; struct bitset **bitsets; bool *pre_nots; struct bitset_page **pages; }; /** * @brief Construct iterator * @param it iterator * @param realloc memory allocator to use */ void bitset_iterator_create(struct bitset_iterator *it, void *(*realloc)(void *ptr, size_t size)) { memset(it, 0, sizeof(*it)); it->realloc = realloc; } /** * @brief Destroys the @a it object * @param it object * @see bitset_iterator_new */ void bitset_iterator_destroy(struct bitset_iterator *it) { for (size_t c = 0; c < it->size; c++) { if (it->conjs[c].capacity == 0) continue; it->realloc(it->conjs[c].bitsets, 0); it->realloc(it->conjs[c].pre_nots, 0); it->realloc(it->conjs[c].pages, 0); } if (it->capacity > 0) { it->realloc(it->conjs, 0); } if (it->page != NULL) { bitset_page_destroy(it->page); it->realloc(it->page, 0); } if (it->page != NULL) { bitset_page_destroy(it->page_tmp); it->realloc(it->page_tmp, 0); } memset(it, 0, sizeof(*it)); } static int bitset_iterator_reserve(struct bitset_iterator *it, size_t size) { if (size <= it->capacity) return 0; size_t capacity = (it->capacity > 0) ? it->capacity : ITERATOR_DEFAULT_CAPACITY; while (capacity <= size) { capacity *= 2; } struct bitset_iterator_conj *conjs = it->realloc(it->conjs, capacity * sizeof(*it->conjs)); if (conjs == NULL) return -1; memset(conjs + it->capacity, 0, (capacity - it->capacity) * sizeof(*it->conjs)); it->conjs = conjs; it->capacity = capacity; return 0; } static int bitset_iterator_conj_reserve(struct bitset_iterator *it, struct bitset_iterator_conj *conj, size_t size) { if (size <= conj->capacity) return 0; size_t capacity = (conj->capacity > 0) ? conj->capacity : ITERATOR_CONJ_DEFAULT_CAPACITY; while (capacity <= size) { capacity *= 2; } struct bitset **bitsets = it->realloc(conj->bitsets, capacity * sizeof(*conj->bitsets)); if (bitsets == NULL) goto error_1; bool *pre_nots = it->realloc(conj->pre_nots, capacity * sizeof(*conj->pre_nots)); if (pre_nots == NULL) goto error_2; struct bitset_page **pages = it->realloc(conj->pages, capacity * sizeof(*conj->pages)); if (pre_nots == NULL) goto error_3; memset(bitsets + conj->capacity, 0, (capacity - conj->capacity) * sizeof(*conj->bitsets)); memset(pre_nots + conj->capacity, 0, (capacity - conj->capacity) * sizeof(*conj->pre_nots)); memset(pages + conj->capacity, 0, (capacity - conj->capacity) * sizeof(*conj->pages)); conj->bitsets = bitsets; conj->pre_nots = pre_nots; conj->pages = pages; conj->capacity = capacity; return 0; error_3: it->realloc(pre_nots, 0); error_2: it->realloc(bitsets, 0); error_1: return -1; } int bitset_iterator_init(struct bitset_iterator *it, struct bitset_expr *expr, struct bitset **p_bitsets, size_t bitsets_size) { assert(it != NULL); assert(expr != NULL); if (bitsets_size > 0) { assert(p_bitsets != NULL); } size_t page_alloc_size = bitset_page_alloc_size(it->realloc); if (it->page != NULL) { bitset_page_destroy(it->page); } else { it->page = it->realloc(NULL, page_alloc_size); } bitset_page_create(it->page); if (it->page_tmp != NULL) { bitset_page_destroy(it->page_tmp); } else { it->page_tmp = it->realloc(NULL, page_alloc_size); if (it->page_tmp == NULL) return -1; } bitset_page_create(it->page_tmp); if (bitset_iterator_reserve(it, expr->size) != 0) return -1; for (size_t c = 0; c < expr->size; c++) { struct bitset_expr_conj *exconj = &expr->conjs[c]; struct bitset_iterator_conj *itconj = &it->conjs[c]; if (bitset_iterator_conj_reserve(it, itconj, exconj->size) != 0) return -1; for (size_t b = 0; b < exconj->size; b++) { assert(exconj->bitset_ids[b] < bitsets_size); itconj->page_first_pos = 0; assert(p_bitsets[exconj->bitset_ids[b]] != NULL); itconj->bitsets[b] = p_bitsets[exconj->bitset_ids[b]]; itconj->pre_nots[b] = exconj->pre_nots[b]; itconj->pages[b] = NULL; } itconj->size = exconj->size; } it->size = expr->size; bitset_iterator_rewind(it); return 0; } static void bitset_iterator_conj_rewind(struct bitset_iterator_conj *conj, size_t pos) { assert(conj != NULL); assert(pos % (BITSET_PAGE_DATA_SIZE * CHAR_BIT) == 0); assert(conj->page_first_pos <= pos); if (conj->size == 0) { conj->page_first_pos = SIZE_MAX; return; } struct bitset_page key; key.first_pos = pos; restart: for (size_t b = 0; b < conj->size; b++) { conj->pages[b] = bitset_pages_nsearch(&conj->bitsets[b]->pages, &key); #if 0 if (conj->pages[b] != NULL) { fprintf(stderr, "rewind [%zu] => %zu (%p)\n", b, conj->pages[b]->first_pos, conj->pages[b]); } else { fprintf(stderr, "rewind [%zu] => NULL\n", b); } #endif if (conj->pre_nots[b]) continue; /* bitset b does not have more pages */ if (conj->pages[b] == NULL) { conj->page_first_pos = SIZE_MAX; return; } assert(conj->pages[b]->first_pos >= key.first_pos); /* bitset b have a next page, but it is beyond pos scope */ if (conj->pages[b]->first_pos > key.first_pos) { key.first_pos = conj->pages[b]->first_pos; goto restart; } } conj->page_first_pos = key.first_pos; } static int bitset_iterator_conj_cmp(const void *p1, const void *p2) { assert(p1 != NULL && p2 != NULL); struct bitset_iterator_conj *conj1 = (struct bitset_iterator_conj *) p1; struct bitset_iterator_conj *conj2 = (struct bitset_iterator_conj *) p2; if (conj1->page_first_pos < conj2->page_first_pos) { return -1; } else if (conj1->page_first_pos > conj2->page_first_pos) { return 1; } else { return 0; } } static void bitset_iterator_conj_prepare_page(struct bitset_iterator_conj *conj, struct bitset_page *dst) { assert(conj != NULL); assert(dst != NULL); assert(conj->size > 0); assert(conj->page_first_pos != SIZE_MAX); bitset_page_set_ones(dst); for (size_t b = 0; b < conj->size; b++) { if (!conj->pre_nots[b]) { /* conj->pages[b] is rewinded to conj->page_first_pos */ assert(conj->pages[b]->first_pos == conj->page_first_pos); bitset_page_and(dst, conj->pages[b]); } else { /* * If page is NULL or its position is not equal * to conj->page_first_pos then conj->bitset[b] * does not have page with the required position and * all bits in this page are considered to be zeros. * Since NAND(a, zeros) => a, we can simple skip this * bitset here. */ if (conj->pages[b] == NULL || conj->pages[b]->first_pos != conj->page_first_pos) continue; bitset_page_nand(dst, conj->pages[b]); } } } static void bitset_iterator_prepare_page(struct bitset_iterator *it) { qsort(it->conjs, it->size, sizeof(*it->conjs), bitset_iterator_conj_cmp); bitset_page_set_zeros(it->page); if (it->size > 0) { it->page->first_pos = it->conjs[0].page_first_pos; } else { it->page->first_pos = SIZE_MAX; } /* There is no more conjunctions that can be ORed */ if (it->page->first_pos == SIZE_MAX) return; /* For each conj where conj->page_first_pos == pos */ for (size_t c = 0; c < it->size; c++) { if (it->conjs[c].page_first_pos > it->page->first_pos) break; /* Get result from conj */ bitset_iterator_conj_prepare_page(&it->conjs[c], it->page_tmp); /* OR page from conjunction with it->page */ bitset_page_or(it->page, it->page_tmp); } /* Init the bit iterator on it->page */ bit_iterator_init(&it->page_it, bitset_page_data(it->page), BITSET_PAGE_DATA_SIZE, true); } static void bitset_iterator_first_page(struct bitset_iterator *it) { assert(it != NULL); /* Rewind all conjunctions to first positions */ for (size_t c = 0; c < it->size; c++) { bitset_iterator_conj_rewind(&it->conjs[c], 0); } /* Prepare the result page */ bitset_iterator_prepare_page(it); } static void bitset_iterator_next_page(struct bitset_iterator *it) { assert(it != NULL); size_t PAGE_BIT = BITSET_PAGE_DATA_SIZE * CHAR_BIT; size_t pos = it->page->first_pos; /* Rewind all conjunctions that at the current position to the * next position */ for (size_t c = 0; c < it->size; c++) { if (it->conjs[c].page_first_pos > pos) break; bitset_iterator_conj_rewind(&it->conjs[c], pos + PAGE_BIT); assert(pos + PAGE_BIT <= it->conjs[c].page_first_pos); } /* Prepare the result page */ bitset_iterator_prepare_page(it); } void bitset_iterator_rewind(struct bitset_iterator *it) { assert(it != NULL); /* Prepare first page */ bitset_iterator_first_page(it); } size_t bitset_iterator_next(struct bitset_iterator *it) { assert(it != NULL); while (true) { if (it->page->first_pos == SIZE_MAX) return SIZE_MAX; size_t pos = bit_iterator_next(&it->page_it); if (pos != SIZE_MAX) { return it->page->first_pos + pos; } bitset_iterator_next_page(it); } } tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/index.c0000664000000000000000000002261212202131537020061 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include const size_t INDEX_DEFAULT_CAPACITY = 32; static int bitset_index_reserve(struct bitset_index *index, size_t size); int bitset_index_create(struct bitset_index *index, void *(*realloc)(void *ptr, size_t size)) { assert(index != NULL); memset(index, 0, sizeof(*index)); index->realloc = realloc; if (bitset_index_reserve(index, 1) != 0) return -1; return 0; } void bitset_index_destroy(struct bitset_index *index) { assert(index != NULL); assert(index->capacity > 0); for (size_t b = 0; b < index->capacity; b++) { if (index->bitsets[b] == NULL) break; bitset_destroy(index->bitsets[b]); index->realloc(index->bitsets[b], 0); index->bitsets[b] = NULL; } if (index->capacity > 0) { index->realloc(index->bitsets, 0); index->realloc(index->rollback_buf, 0); } memset(index, 0, sizeof(*index)); } static int bitset_index_reserve(struct bitset_index *index, size_t size) { if (size <= index->capacity) return 0; size_t capacity = (index->capacity > 0) ? index->capacity : INDEX_DEFAULT_CAPACITY; while (capacity <= size) { capacity *= 2; } struct bitset **bitsets = index->realloc(index->bitsets, capacity * sizeof(*index->bitsets)); if (bitsets == NULL) goto error_1; memset(bitsets + index->capacity, 0, (capacity - index->capacity) * sizeof(*index->bitsets)); /* Save bitset ** but do not update index->capacity */ index->bitsets = bitsets; /* Resize rollback buffer */ char *rollback_buf = (char *) index->realloc(index->rollback_buf, capacity); if (rollback_buf == NULL) goto error_1; index->rollback_buf = rollback_buf; /* Initialize bitsets */ for (size_t b = index->capacity; b < capacity; b++) { index->bitsets[b] = index->realloc(NULL, sizeof(*index->bitsets[b])); if (index->bitsets[b] == NULL) goto error_2; bitset_create(index->bitsets[b], index->realloc); } index->capacity = capacity; return 0; error_2: for (size_t b = index->capacity; b < capacity; b++) { if (index->bitsets[b] == NULL) break; bitset_destroy(index->bitsets[b]); index->realloc(index->bitsets[b], 0); index->bitsets[b] = NULL; } error_1: return -1; } int bitset_index_insert(struct bitset_index *index, const void *key, size_t key_size, size_t value) { assert(index != NULL); assert(key != NULL); assert(index->capacity > 0); /* * Step 0: allocate enough number of bitsets * * bitset_index_reserve could fail on realloc and return -1. * Do not change anything and return the error to the caller. */ const size_t size = 1 + key_size * CHAR_BIT; if (bitset_index_reserve(index, size) != 0) return -1; /* * Step 1: set the 'flag' bitset * * bitset_set for 'falg' bitset could fail on realloc. * Do not change anything. Do not shrink buffers allocated on step 1. */ int rc = bitset_set(index->bitsets[0], value); if (rc < 0) return -1; /* if 1 then the value is new in the index */ index->rollback_buf[0] = (char) rc; /* * Step 2: iterate over 'set' bits in the key and update related bitsets. * * A bitset_set somewhere in the middle also could fail on realloc. * If this happens, we stop processing and jump to the rollback code. * Rollback uses index->rollback_buf buffer to restore previous values * of all bitsets on given position. Remember, that bitset_set * returns 1 if a previous value was 'true' and 0 if it was 'false'. * The buffer is indexed by bytes (char *) instead of bits (bit_set) * because it is a little bit faster here. */ struct bit_iterator bit_it; bit_iterator_init(&bit_it, key, key_size, true); size_t pos = 0; while ((pos = bit_iterator_next(&bit_it)) != SIZE_MAX) { size_t b = pos + 1; rc = bitset_set(index->bitsets[b], value); if (rc < 0) goto rollback; index->rollback_buf[b] = (char) rc; } /* Finish here if the value is new in the index */ if (index->rollback_buf[0] == 0) return 0; /* * Step 3: Iterate over 'unset' bits and cleanup other bitsets * This step is needed if the value was already existed in the index. * Nothing can fail here because current implementation of * bitset_clear never fails. */ bit_iterator_init(&bit_it, key, key_size, false); while ((pos = bit_iterator_next(&bit_it)) != SIZE_MAX) { size_t b = pos + 1; rc = bitset_clear(index->bitsets[b], value); assert(rc >= 0); /* bitset_clear never fails */ } return 0; rollback: /* * Rollback changes done by Step 2. */ bit_iterator_init(&bit_it, key, size, true); size_t rpos; while ((rpos = bit_iterator_next(&bit_it)) != SIZE_MAX && rpos < pos) { size_t b = rpos + 1; if (index->rollback_buf[b] == 1) { bitset_set(index->bitsets[b], value); } else { bitset_clear(index->bitsets[b], value); } } /* * Rollback changes done by Step 1. */ if (index->rollback_buf[0] == 1) { bitset_set(index->bitsets[0], value); } else { bitset_clear(index->bitsets[0], value); } return -1; } void bitset_index_remove_value(struct bitset_index *index, size_t value) { assert(index != NULL); if (index->capacity == 0) return; for (size_t b = 1; b < index->capacity; b++) { if (index->bitsets[b] == NULL) continue; /* Ignore all errors here */ bitset_clear(index->bitsets[b], value); } bitset_clear(index->bitsets[0], value); } bool bitset_index_contains_value(struct bitset_index *index, size_t value) { assert(index != NULL); return bitset_test(index->bitsets[0], value); } int bitset_index_expr_all(struct bitset_expr *expr) { (void) index; bitset_expr_clear(expr); if (bitset_expr_add_conj(expr) != 0) return -1; if (bitset_expr_add_param(expr, 0, false) != 0) return -1; return 0; } int bitset_index_expr_equals(struct bitset_expr *expr, const void *key, size_t key_size) { bitset_expr_clear(expr); if (bitset_expr_add_conj(expr) != 0) return -1; for (size_t pos = 0; pos < key_size * CHAR_BIT; pos++) { size_t b = pos + 1; bool bit_exist = bit_test(key, pos); if (bitset_expr_add_param(expr, b, !bit_exist) != 0) return -1; } if (bitset_expr_add_param(expr, 0, false) != 0) { return -1; } return 0; } int bitset_index_expr_all_set(struct bitset_expr *expr, const void *key, size_t key_size) { bitset_expr_clear(expr); if (bitset_expr_add_conj(expr) != 0) return -1; struct bit_iterator bit_it; bit_iterator_init(&bit_it, key, key_size, true); size_t pos; while ( (pos = bit_iterator_next(&bit_it)) != SIZE_MAX ) { size_t b = pos + 1; if (bitset_expr_add_param(expr, b, false) != 0) return -1; } return 0; } int bitset_index_expr_any_set(struct bitset_expr *expr, const void *key, size_t key_size) { bitset_expr_clear(expr); struct bit_iterator bit_it; bit_iterator_init(&bit_it, key, key_size, true); size_t pos; while ( (pos = bit_iterator_next(&bit_it)) != SIZE_MAX) { size_t b = pos + 1; if (bitset_expr_add_conj(expr) != 0) return -1; if (bitset_expr_add_param(expr, b, false) != 0) return -1; } return 0; } int bitset_index_expr_all_not_set(struct bitset_expr *expr, const void *key, size_t key_size) { bitset_expr_clear(expr); if (bitset_expr_add_conj(expr) != 0) return -1; if (bitset_expr_add_param(expr, 0, false) != 0) return -1; struct bit_iterator bit_it; bit_iterator_init(&bit_it, key, key_size, true); size_t pos; while ( (pos = bit_iterator_next(&bit_it)) != SIZE_MAX) { size_t b = pos + 1; if (bitset_expr_add_param(expr, b, true) != 0) return -1; } return 0; } int bitset_index_init_iterator(struct bitset_index *index, struct bitset_iterator *it, struct bitset_expr *expr) { assert(index != NULL); assert(it != NULL); /* Check that we have all required bitsets */ size_t max = 0; for (size_t c = 0; c < expr->size; c++) { for (size_t b = 0; b < expr->conjs[c].size; b++) { if (expr->conjs[c].bitset_ids[b] > max) { max = expr->conjs[c].bitset_ids[b]; } } } /* Resize the index with empty bitsets */ if (bitset_index_reserve(index, max + 1) != 0) return -1; return bitset_iterator_init(it, expr, index->bitsets, index->capacity); } extern inline size_t bitset_index_size(const struct bitset_index *index); tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/bitset.c0000664000000000000000000001604712202131537020251 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "page.h" #include #include #include void bitset_create(struct bitset *bitset, void *(*realloc)(void *ptr, size_t size)) { memset(bitset, 0, sizeof(*bitset)); bitset->realloc = realloc; /* Initialize pages tree */ bitset_pages_new(&bitset->pages); } static struct bitset_page * bitset_destroy_iter_cb(bitset_pages_t *t, struct bitset_page *page, void *arg) { (void) t; struct bitset *bitset = (struct bitset *) arg; bitset_page_destroy(page); bitset->realloc(page, 0); return NULL; } void bitset_destroy(struct bitset *bitset) { bitset_pages_iter(&bitset->pages, NULL, bitset_destroy_iter_cb, bitset); memset(&bitset->pages, 0, sizeof(bitset->pages)); } bool bitset_test(struct bitset *bitset, size_t pos) { struct bitset_page key; key.first_pos = bitset_page_first_pos(pos); /* Find a page in pages tree */ struct bitset_page *page = bitset_pages_search(&bitset->pages, &key); if (page == NULL) return false; assert(page->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * CHAR_BIT); return bit_test(bitset_page_data(page), pos - page->first_pos); } int bitset_set(struct bitset *bitset, size_t pos) { struct bitset_page key; key.first_pos = bitset_page_first_pos(pos); /* Find a page in pages tree */ struct bitset_page *page = bitset_pages_search(&bitset->pages, &key); if (page == NULL) { /* Allocate a new page */ size_t size = bitset_page_alloc_size(bitset->realloc); page = bitset->realloc(NULL, size); if (page == NULL) return -1; bitset_page_create(page); page->first_pos = key.first_pos; /* Insert the page into pages tree */ bitset_pages_insert(&bitset->pages, page); } assert(page->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * CHAR_BIT); bool prev = bit_set(bitset_page_data(page), pos - page->first_pos); if (prev) { /* Value has not changed */ return 1; } bitset->cardinality++; page->cardinality++; return 0; } int bitset_clear(struct bitset *bitset, size_t pos) { struct bitset_page key; key.first_pos = bitset_page_first_pos(pos); /* Find a page in the pages tree */ struct bitset_page *page = bitset_pages_search(&bitset->pages, &key); if (page == NULL) return 0; assert(page->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * CHAR_BIT); bool prev = bit_clear(bitset_page_data(page), pos - page->first_pos); if (!prev) { return 0; } assert(bitset->cardinality > 0); assert(page->cardinality > 0); bitset->cardinality--; page->cardinality--; if (page->cardinality == 0) { /* Remove the page from the pages tree */ bitset_pages_remove(&bitset->pages, page); /* Free the page */ bitset_page_destroy(page); bitset->realloc(page, 0); } return 1; } extern inline size_t bitset_cardinality(const struct bitset *bitset); void bitset_info(struct bitset *bitset, struct bitset_info *info) { memset(info, 0, sizeof(*info)); info->page_data_size = BITSET_PAGE_DATA_SIZE; info->page_total_size = bitset_page_alloc_size(bitset->realloc); info->page_data_alignment = BITSET_PAGE_DATA_ALIGNMENT; size_t cardinality_check = 0; struct bitset_page *page = bitset_pages_first(&bitset->pages); while (page != NULL) { info->pages++; cardinality_check += page->cardinality; page = bitset_pages_next(&bitset->pages, page); } assert(bitset_cardinality(bitset) == cardinality_check); } #if defined(DEBUG) void bitset_dump(struct bitset *bitset, int verbose, FILE *stream) { struct bitset_info info; bitset_info(bitset, &info); size_t PAGE_BIT = (info.page_data_size * CHAR_BIT); fprintf(stream, "Bitset %p\n", bitset); fprintf(stream, "{\n"); fprintf(stream, " " "page_size = %zu/%zu /* (data / total) */\n", info.page_data_size, info.page_total_size); fprintf(stream, " " "page_bit = %zu\n", PAGE_BIT); fprintf(stream, " " "pages = %zu\n", info.pages); size_t cardinality = bitset_cardinality(bitset); size_t capacity = PAGE_BIT * info.pages; fprintf(stream, " " "cardinality = %zu\n", cardinality); fprintf(stream, " " "capacity = %zu\n", capacity); if (capacity > 0) { fprintf(stream, " " "utilization = %-8.4f%% (%zu / %zu)\n", (float) cardinality * 100.0 / (capacity), cardinality, capacity ); } else { fprintf(stream, " " "utilization = undefined\n"); } size_t mem_data = info.page_data_size * info.pages; size_t mem_total = info.page_total_size * info.pages; fprintf(stream, " " "mem_data = %zu bytes\n", mem_data); fprintf(stream, " " "mem_total = %zu bytes " "/* data + padding + tree */\n", mem_total); if (cardinality > 0) { fprintf(stream, " " "density = %-8.4f bytes per value\n", (float) mem_total / cardinality); } else { fprintf(stream, " " "density = undefined\n"); } if (verbose < 1) { goto exit; } fprintf(stream, " " "pages = {\n"); for (struct bitset_page *page = bitset_pages_first(&bitset->pages); page != NULL; page = bitset_pages_next(&bitset->pages, page)) { size_t page_last_pos = page->first_pos + BITSET_PAGE_DATA_SIZE * CHAR_BIT; fprintf(stream, " " "[%zu, %zu) ", page->first_pos, page_last_pos); fprintf(stream, "utilization = %8.4f%% (%zu/%zu)", (float) page->cardinality * 1e2 / PAGE_BIT, page->cardinality, PAGE_BIT); if (verbose < 2) { fprintf(stream, "\n"); continue; } fprintf(stream, " "); fprintf(stream, "vals = {"); size_t pos = 0; struct bit_iterator it; bit_iterator_init(&it, bitset_page_data(page), BITSET_PAGE_DATA_SIZE, true); while ( (pos = bit_iterator_next(&it)) != SIZE_MAX) { fprintf(stream, "%zu, ", page->first_pos + pos); } fprintf(stream, "}\n"); } fprintf(stream, " " "}\n"); exit: fprintf(stream, "}\n"); } #endif /* defined(DEBUG) */ tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/page.h0000664000000000000000000001311012202131537017664 0ustar rootroot#ifndef TARANTOOL_LIB_BITSET_PAGE_H_INCLUDED #define TARANTOOL_LIB_BITSET_PAGE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * @file * @brief Bitset page * * Private header file, please don't use directly. * @internal */ #include #include #if defined(DEBUG) #include /* for dumping bitset_page to file */ #endif /* defined(DEBUG) */ #include #include #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ enum { /** How many bytes to store in one page */ BITSET_PAGE_DATA_SIZE = 160 }; #if defined(ENABLE_AVX) typedef __m256i bitset_word_t; #define BITSET_PAGE_DATA_ALIGNMENT 32 #elif defined(ENABLE_SSE2) typedef __m128i bitset_word_t; #define BITSET_PAGE_DATA_ALIGNMENT 16 #elif defined(__x86_64__) typedef uint64_t bitset_word_t; #define BITSET_PAGE_DATA_ALIGNMENT 1 #else #define BITSET_PAGE_DATA_ALIGNMENT 1 typedef uint32_t bitset_word_t; #endif #if (defined(__GLIBC__) && (__WORDSIZE == 64) && \ ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8))) || \ (defined(__FreeBSD__) && !defined(__arm__) && !defined(__mips__)) || \ (defined(__APPLE__)) /** * @brief Defined if malloc is 16-byte aligned * @see http://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html * @see http://svn.freebsd.org/viewvc/base/stable/6/lib/libc/stdlib/malloc.c * @see http://svn.freebsd.org/viewvc/base/stable/7/lib/libc/stdlib/malloc.c * @see man malloc(2) on OS X */ #define MALLOC_ALIGNMENT 16 #else #define MALLOC_ALIGNMENT 8 #endif /* aligned malloc */ inline size_t bitset_page_alloc_size(void *(*realloc_arg)(void *ptr, size_t size)) { if (BITSET_PAGE_DATA_ALIGNMENT <= 1 || ( (MALLOC_ALIGNMENT % BITSET_PAGE_DATA_ALIGNMENT == 0) && (sizeof(struct bitset_page) % BITSET_PAGE_DATA_ALIGNMENT == 0) && (realloc_arg == realloc))) { /* Alignment is not needed */ return sizeof(struct bitset_page) + BITSET_PAGE_DATA_SIZE; } return sizeof(struct bitset_page) + BITSET_PAGE_DATA_SIZE + BITSET_PAGE_DATA_ALIGNMENT; } #undef MALLOC_ALIGNMENT inline void * bitset_page_data(struct bitset_page *page) { uintptr_t r = (uintptr_t) (page->data + BITSET_PAGE_DATA_ALIGNMENT - 1); return (void *) (r & ~((uintptr_t) BITSET_PAGE_DATA_ALIGNMENT - 1)); } inline void bitset_page_create(struct bitset_page *page) { size_t size = ((char *) bitset_page_data(page) - (char *) page) + BITSET_PAGE_DATA_SIZE; memset(page, 0, size); } inline void bitset_page_destroy(struct bitset_page *page) { (void) page; /* nothing */ } inline size_t bitset_page_first_pos(size_t pos) { return pos - (pos % (BITSET_PAGE_DATA_SIZE * CHAR_BIT)); } inline void bitset_page_set_zeros(struct bitset_page *page) { void *data = bitset_page_data(page); memset(data, 0, BITSET_PAGE_DATA_SIZE); } inline void bitset_page_set_ones(struct bitset_page *page) { void *data = bitset_page_data(page); memset(data, -1, BITSET_PAGE_DATA_SIZE); } inline void bitset_page_and(struct bitset_page *dst, struct bitset_page *src) { bitset_word_t *d = (bitset_word_t *) bitset_page_data(dst); bitset_word_t *s = (bitset_word_t *) bitset_page_data(src); assert(BITSET_PAGE_DATA_SIZE % sizeof(bitset_word_t) == 0); int cnt = BITSET_PAGE_DATA_SIZE / sizeof(bitset_word_t); for (int i = 0; i < cnt; i++) { *d++ &= *s++; } } inline void bitset_page_nand(struct bitset_page *dst, struct bitset_page *src) { bitset_word_t *d = (bitset_word_t *) bitset_page_data(dst); bitset_word_t *s = (bitset_word_t *) bitset_page_data(src); assert(BITSET_PAGE_DATA_SIZE % sizeof(bitset_word_t) == 0); int cnt = BITSET_PAGE_DATA_SIZE / sizeof(bitset_word_t); for (int i = 0; i < cnt; i++) { *d++ &= ~*s++; } } inline void bitset_page_or(struct bitset_page *dst, struct bitset_page *src) { bitset_word_t *d = (bitset_word_t *) bitset_page_data(dst); bitset_word_t *s = (bitset_word_t *) bitset_page_data(src); assert(BITSET_PAGE_DATA_SIZE % sizeof(bitset_word_t) == 0); int cnt = BITSET_PAGE_DATA_SIZE / sizeof(bitset_word_t); for (int i = 0; i < cnt; i++) { *d++ |= *s++; } } #if defined(DEBUG) void bitset_page_dump(struct bitset_page *page, FILE *stream); #endif /* defined(DEBUG) */ rb_proto(, bitset_pages_, bitset_pages_t, struct bitset_page) #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_LIB_BITSET_PAGE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/expr.c0000664000000000000000000001042312202131537017725 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include const size_t EXPR_DEFAULT_CAPACITY = 2; const size_t EXPR_CONJ_DEFAULT_CAPACITY = 32; void bitset_expr_create(struct bitset_expr *expr, void *(*realloc)(void *ptr, size_t size)) { memset(expr, 0, sizeof(*expr)); expr->realloc = realloc; } void bitset_expr_destroy(struct bitset_expr *expr) { for (size_t c = 0; c < expr->size; c++) { if (expr->conjs[c].capacity == 0) continue; expr->realloc(expr->conjs[c].bitset_ids, 0); expr->realloc(expr->conjs[c].pre_nots, 0); } if (expr->capacity > 0) { expr->realloc(expr->conjs, 0); } memset(expr, 0, sizeof(*expr)); } void bitset_expr_clear(struct bitset_expr *expr) { for (size_t c = 0; c < expr->size; c++) { memset(expr->conjs[c].bitset_ids, 0, expr->conjs[c].size * sizeof(*expr->conjs[c].bitset_ids)); memset(expr->conjs[c].pre_nots, 0, expr->conjs[c].size * sizeof(*expr->conjs[c].pre_nots)); expr->conjs[c].size = 0; } expr->size = 0; } static int bitset_expr_reserve(struct bitset_expr *expr, size_t size) { if (size <= expr->capacity) return 0; size_t capacity = (expr->capacity > 0) ? expr->capacity : EXPR_DEFAULT_CAPACITY; while (capacity <= expr->size) { capacity *= 2; } struct bitset_expr_conj *conjs = expr->realloc(expr->conjs, capacity * sizeof(*expr->conjs)); if (conjs == NULL) return -1; memset(conjs + expr->capacity, 0, (capacity - expr->capacity) * sizeof(*expr->conjs)); expr->conjs = conjs; expr->capacity = capacity; return 0; } int bitset_expr_add_conj(struct bitset_expr *expr) { if (bitset_expr_reserve(expr, expr->size + 1) != 0) return -1; expr->size++; return 0; } static int bitset_expr_conj_reserve(struct bitset_expr *expr, struct bitset_expr_conj *conj, size_t size) { if (size <= conj->capacity) return 0; size_t capacity = (conj->capacity > 0) ? conj->capacity : EXPR_CONJ_DEFAULT_CAPACITY; while (capacity <= conj->size) { capacity *= 2; } size_t *bitset_ids = expr->realloc(conj->bitset_ids, capacity * sizeof(*conj->bitset_ids)); if (bitset_ids == NULL) goto error_1; bool *pre_nots = expr->realloc(conj->pre_nots, capacity * sizeof(*conj->pre_nots)); if (pre_nots == NULL) goto error_2; memset(bitset_ids + conj->capacity, 0, (capacity - conj->capacity) * sizeof(*conj->bitset_ids)); memset(pre_nots + conj->capacity, 0, (capacity - conj->capacity) * sizeof(*conj->pre_nots)); conj->bitset_ids = bitset_ids; conj->pre_nots = pre_nots; conj->capacity = capacity; return 0; error_2: expr->realloc(bitset_ids, 0); error_1: return -1; } int bitset_expr_add_param(struct bitset_expr *expr, size_t bitset_id, bool pre_not) { assert(expr->size > 0); struct bitset_expr_conj *conj = &expr->conjs[expr->size - 1]; if (bitset_expr_conj_reserve(expr, conj, conj->size + 1) != 0) return -1; conj->bitset_ids[conj->size] = bitset_id; conj->pre_nots[conj->size] = pre_not; conj->size++; return 0; } tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/libbitset.a0000664000000000000000000031770212213333052020736 0ustar rootroot! / 1378727466 0 0 0 1514 ` <.......::::::::::::::::::::::::::JJJJJJJGGGGGGGGGGGGGbitset_cardinalitybitset_createbitset_destroybitset_testbitset_setbitset_clearbitset_infobitset_page_alloc_sizebitset_page_databitset_page_createbitset_page_destroybitset_page_first_posbitset_page_set_zerosbitset_page_set_onesbitset_page_andbitset_page_nandbitset_page_orbitset_pages_newbitset_pages_firstbitset_pages_lastbitset_pages_nextbitset_pages_prevbitset_pages_searchbitset_pages_nsearchbitset_pages_psearchbitset_pages_insertbitset_pages_removebitset_pages_iter_recursebitset_pages_iter_startbitset_pages_iterbitset_pages_reverse_iter_recursebitset_pages_reverse_iter_startbitset_pages_reverse_iterEXPR_DEFAULT_CAPACITYEXPR_CONJ_DEFAULT_CAPACITYbitset_expr_createbitset_expr_destroybitset_expr_clearbitset_expr_add_conjbitset_expr_add_paramITERATOR_DEFAULT_CAPACITYITERATOR_CONJ_DEFAULT_CAPACITYbitset_iterator_createbitset_iterator_destroybitset_iterator_initbitset_iterator_rewindbitset_iterator_nextbitset_index_sizeINDEX_DEFAULT_CAPACITYbitset_index_createbitset_index_destroybitset_index_insertbitset_index_remove_valuebitset_index_contains_valuebitset_index_expr_allbitset_index_expr_equalsbitset_index_expr_all_setbitset_index_expr_any_setbitset_index_expr_all_not_setbitset_index_init_iteratorbitset.c.o/ 1378727465 1000 1000 100664 13424 ` ELF>@@UHH}HEH@(]UHHH}HuHE8HHEHUHP0HEHUHH0H}HuHUHEHEHEHHEH@0HUHиUHHH}HEHUHѺHHE(HUHSHHH}HuHEHHEHEHUHHHEH}uaHEHH;EwHEHHH;EwLHEHHUHH)HEHHHHHH[]UHSHXH}HuHEHHEHEHUHHHEH}uiHEH@0HHEHEH@0HUHֿHEH}u HEHHUHEHHEHUHHHEHH;EwHEHHH;EwgHEHHUHH)HEHHHE߀}t-HEH@(HPHEHP(HEH@HPHEHPHHX[]UHSHHH}HuHEHHEHEHUHHHEH}u 4HEHH;EwHEHHH;EwHEHHUHH)HEHHHEEt HEH@(HuHEH@HuHEH@(HPHEHP(HEH@HPHEHPHEH@Hu5HEHUHHHEHHEH@0HUHиHHH[]UHH H}HuHE HHEH@HEH@0HHHEHPHEH@HEHEHHE5HEHHPHEHHEH@HEHEHUHHHEH}uHEHH;Et/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/bitset.cpage->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * 8bitset->cardinality > 0page->cardinality > 0bitset_cardinality(bitset) == cardinality_checkbitset_infobitset_clearbitset_setbitset_test   e;int0pEE#E# CD0#E#F0#G#  e  (J7J#J#J8PyR7#S0#(T#0   0 y 0#0#0#0#60''h-B&q&qh&`B0t0X0Parg0H3qh7: :qhAAqposA0keyCGX    QB@QqposQ0keySWXP hOZ0P P  @uBuqposu0keyw{X W   ]qX]P0h`c % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I &I.? : ; ' @B .: ; ' I@B : ; I 4: ; I .? : ; ' I@B 4: ; I 4I4  !I/  wwvwwwQvQRwRSwSVwVvwwwvwwwvwwwvwwwtvtuwuvwvywyPvPQw,Q/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebitset.hbitset.cstddef.hstdint.hpage.h .Y2>YY2Y2.Kuv.2x.Kv=XKu1.(=hw=>x.Ku.(==>0[{Y/!cz pagerbt_nilsize_tbitset_destroypage_total_sizebitset_setunsigned intrbn_leftpage_data_alignmentBITSET_PAGE_DATA_SIZE__PRETTY_FUNCTION__datasizebitset_cardinalitybitset_clearlong unsigned intcardinality_checkshort unsigned intbitsetunsigned charbitset_destroy_iter_cbinfo/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/bitset.creallocbitset_inforbn_right_redpage_data_sizerbt_rootfirst_poslong long unsigned intuint8_tbitset_testbitset_createbitset_pages_tsizetypepageslong long intcardinalityGNU C 4.7.3short intnodelong intcharlong doublesigned charbitset_page_BoolprevGCC: (Debian 4.7.3-4) 4.7.3zRx AC M <@AC { \EAC @ |AAC | zPLRx $$AC E $LWAC EM $tAC E 4AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @QP$(&,189-PiKx) \f vj z0u30  383 0?0PP3 0h ("" RE!, :! S l     @A*>L]fuWubitset.cbitset_destroy_iter_cb__PRETTY_FUNCTION__.2766__PRETTY_FUNCTION__.2774__PRETTY_FUNCTION__.2782__PRETTY_FUNCTION__.2796bitset_cardinalitybitset_creatememsetbitset_pages_newbitset_page_destroybitset_destroybitset_pages_iterbitset_test__gcc_personality_v0bitset_page_first_posbitset_pages_search__assert_failbitset_page_databit_test_Unwind_Resumebitset_setbitset_page_alloc_sizebitset_page_createbitset_pages_insertbit_setbitset_clearbit_clearbitset_pages_removebitset_infobitset_pages_firstbitset_pages_next4Lv R? ,I N XS p!{"#%&4'Y !c h Xm !(#Q [ ` Xe !*        9+Ej#%-.,7 A F K  , $Q% , G1  > L S UZ aa 8f s z  > P K  m  B     ) 8 C O  ]  k w     # T  h   4 ;CRK `U c wx R         ' 1 ^ l ~w, y 3    ~ !  (81 W bjur @|   ~  uQ   - ; I ~T ) @`R    8upage.c.o/ 1378727465 1000 1000 100664 34264 ` ELF>HP@@UHH}]UHH}HEH HEHE]UHH H}HEHHHEHH)HHHEHUHEHUHH}]UHH}HMHHHH HHHHHH)HEH)]UHH H}HEHHEHEHUHH H}HEHHEHEHUHH0H}HuHEHHEHEHHEEE"HEHHUHH!HHEHEEE;E|UHH0H}HuHEHHEHEHHEEE%HEHHUHHH!HHEHEEE;E|UHH0H}HuHEHHEHEHHEEE"HEHHUHH HHEHEEE;E|UHH}HuHEHHEHH9sHEHHEHH9v]UHH}HEHPHEHHEHPHEHPHEHHHEH@H HHEHPHEH@HHHEHPHEH@HHHEHP]UHH}HEHHEHEHH;Et# HEH@HEHEH@HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@HHEHEH@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@HHUHH9tJHEH@HHEHEHH;E HEH@HEHEH@HUHH9uHEHHEHEHH;EuYHEHHEHUHEHHE}yHEHEHEH@HE}~7HEH@HHEHEHH;EuYHEHH;EuHEHEUHH0H}HuHEH@HUHH9tNHEH@HEHEHH;EHEH@HHEHEH@HHUHH9uHEHHEHEHH;EuYHEHHEHUHEHHpE}yHEH@HE}~?HEHEHEH@HHEHEHH;EuYHEHH;EuHEHEUHH H}HuHEHHE$}yHEH@HEHEH@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHH5E}yHEHEHEH@HE"}~HEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@HE*}~HEHEHEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHPHHHHH@H HHHPHH@HHHHPHHHHHEHEHHHHpHEPHE@E}uY}yHEHPHEHH@HHEHPHEHH@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHPHEH@HHEH@HEHEH@HHEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHE=HEHHHEHEH@HƒHEH HHEHPHEH@HOHEH@HEHEH@HtJHEH@HHHEHPHEH@HHHEHPHEH@HHHEHPHEH@HEHEH@HHEHEH@HHEH@H HHEHPHEHUHPHEH@HHEH HHEHPHEH@HHHEHPHEHEHEHUHHmHUHH9HHHHHHHHRHHPUHHHXHPHEHXHH`H`HEHEHHPHHHEPHE@E܃}yHEHPHEHH@HyHEHPHEHH@HH}uYHE@HEHEHE&HE@HEHPHEHH@HHEHEHHXHH9u HEHEHHXHH9HEHH;PtYHmHEHH;PUHEHH@HEHEHHUHHRHHHPHRHH HPHEHHPHRHPHEHHPHRHHHUHHRH HPHPH@HHEH HHPHPHEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHPaHEHHHUHHHUHHHRH HP.HPH@HEHXHH;EHPH@HtYHEH@HuYHEH@HHHEHPH`H9EuHXHUH HEH@yHEHHHUHP HEHHHUHHHRHуHUH HP H`H9EuHXHPHXHt HEHH@HtGHEH@xYHEHHHXHHP HXHPHEHHm HE@uYHE@HEHHUHHHPHEHHH@HtYHEHH@HHEHH@HHEHEH@HEHEH@HHEHHUHHRHHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPIHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHUH`H9wYHEH@yHEHHHUHPHEHHHUHHHRHуHUH HPHEHH@HHEHEH@HEHEH@H=HEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPH`H9EuHXHUHHEH@yHEHHHUHPgHEHHHUHHHRHуHUH HP7HEHHUHHRHHPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHEHUHkHEHHUHHHHUHHRH HPHEHH@HEHEH@HVHEH@HHEHEH@HEHEH@HHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HƒHEH HHEHPHEH@HHEHEH@HHEH@H HHEHPHEHUHPHXHH;EuYHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HHHEHPH`H9EuHXHUHxHEH@yHEHHHUHPQHEHHHUHHHRHуHUH HP!HEHH@HHEH@HxHxH@H)HEHHUHHRHHPHEH@HHHEHPHxH@HHHxHPHEHH@HpHEHHpHRHHPHEHHHpH@H HHpHPHUH`H9wYHEH@yHEHHHpHPHEHHHUHHHRHуHpH HPHEH@HHHEHPHEHHUHHRHHPHEH@HhHhH@HHhH@HHHhHPHEHH@H`HEHH`HRHHPHEHHH`H@H HH`HPH`H9EuHXH`HHEH@yHEHHH`HPHEHHHUHHHRHуH`H HPpHEH@HHHEHPHmHUH`H9BH`HXHHXHH@HtYUHH0H}HuHUHMHEHH;Eu HEHHEHpHMHUHEHHEHEHH;EtHENHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHHPH}HuHUHMLEHUHEHH$E}HEHPH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@HHHMHUHEH}~,HEH@HHH}HMHuHEIHNHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@HHHMHUHEHHEHEHH;EtHEJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHUHHPH}HuHUHMLEHUHEHHE}HEH@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHpHMHUHEHu}y%HEHPH}HMHuHEIHJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/page.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0bitset_pages_removebitset_pages_insertbitset_pages_prevbitset_pages_nextbitset_page_orbitset_page_nandbitset_page_and;int0p7;w)z;EE#E# CD0#E#F0#G#  e, ,(JXJ#J#J3 xx x 0 c)m6BZ0Zzhlx.lXrnhsmsXu0h{{h0pos0hXxhQXxhdstHsrc@dhs` cntBXiB\ ,dstHsrc@dhs` cntBXiB\ ,FdstHsrc@dhs`V cntBXiB\ V,FNBaNhbN`YYhXYYXretYhYaYXretYhYYHY@retYh Y`cmpYB\ ,YYHY@retYh Y`cmpYB\Y$YXkeyYPretYhcmpYBdYYHkeyY@retYhY`cmpYB\Y" YHkeyY@retYhY`cmpYB\Y YoYoY Y#cmpYB#Y oY h   cmpYB\Y`_ YPYHY@YYYY  b ,b , Y YnYnYj Y#cmpYB#Y hY `Y n   cmpYBL Y K Y@W YYYX YY YYYT YPYY~Y~ Y~Y~Y~Y~E E , YYXYPcbYHargYx@retYhY`    xYtYHY@YcbYargYxcmpYBdEretYhretYPYXYYXYPcbYHargYx@retYhYlYXYPcbYHargYx@retYhY`Y;YHY@YcbYargYxcmpYBd retYhretYPYXYYXYPcbYHargYx@retYh% $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I 4: ; I .? : ; ' @B 4: ; I .? : ; ' @B : ; I 4I4   !I/ &I.: ; ' I@B .? : ; ' I@B  : ; I8  .? : ; ' I@B wwvwww(v()w)*w*-w-qvqrwrswsvwv{v{|w|}w}wvwwwvwww v !w!"w"%w%vwwwvwwwgvghwhiwilwlvwww)v)*w*+w+.w.vwwwvwww0v01w12w25w5ovopwpqwqtwtvwwwvwwwDvDEwEFwFIwI v w w  w ]v]^w^_w_bwbvwwwXvXYwYZwZ]w]vwwwvwwwvwwwLvLMw,M-u /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/syspage.hpage.cstddef.hstdint.hbitset.htypes.htypes.h ]4K2eLK2132Y2Y2uJ2uJ2uJ./u/vZ0sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt(bitset_page_andrbt_rootfirst_possize_tuintptr_tuint64_tssize_tbitset_pages_searchpathlong long unsigned intpathpleftrightrightlong long intsigned char__PRETTY_FUNCTION__bitset_pages_firstlong int__ssize_tbitset_page_set_zerosbitset_pages_lastbitset_pages_nsearchunsigned intbitset_pages_iterbitset_pages_reverse_iterlong unsigned intpagebitset_pages_reverse_iter_startdatasizeshort unsigned intbitset_page_set_onesbitset_pageintptr_trbn_right_redunodebitset_page_destroycardinalitysizetypebitset_word_tlong doublerbt_nilbitset_page_createleftrightleftbitset_pages_newGNU C 4.7.3rbtreerealloc_argbitset_page_or_Boolunsigned charleftleftnodebitset_pages_removeshort intbitset_page_alloc_sizebitset_pages_psearchBITSET_PAGE_DATA_SIZEbitset_page_databitset_pages_iter_start/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/page.ccharpage_cmptrednodepbitset_page_nandtnodecnodebitset_page_first_posbitset_pages_tbitset_pages_reverse_iter_recurseuint8_tbitset_pages_prevbitset_pages_nextstartbitset_pages_insertrbn_leftleftrightleftbitset_pages_iter_recurseGCC: (Debian 4.7.3-4) 4.7.3zRx AC J <AC U \IAC D | AC E =AC x 4AC o 4AC o lAC g oAC j <lAC g \GAC B |{AC v `AC [ hAC c ?AC : ?AC : AC  <AC  \AC  |AC  `AC [ AC  DAC ? AC } AC  <6AC 1 \AC } .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @M]@&,1>"9e@J$4X5 h@0c0 |8@1w8 0iG0K LLxPOU ZhG*pCP\0u   )Ir |=,4B4W!lgoxl{*`h?1?p-EA `U^oDY6page.cpage_cmp__PRETTY_FUNCTION__.2813__PRETTY_FUNCTION__.2826__PRETTY_FUNCTION__.2869__PRETTY_FUNCTION__.2901__PRETTY_FUNCTION__.2696__PRETTY_FUNCTION__.2684__PRETTY_FUNCTION__.2672bitset_page_alloc_sizebitset_page_databitset_page_creatememsetbitset_page_destroybitset_page_first_posbitset_page_set_zerosbitset_page_set_onesbitset_page_andbitset_page_nandbitset_page_orbitset_pages_newbitset_pages_firstbitset_pages_lastbitset_pages_next__assert_failbitset_pages_prevbitset_pages_searchbitset_pages_nsearchbitset_pages_psearchbitset_pages_insertbitset_pages_removebitset_pages_iter_recursebitset_pages_iter_startbitset_pages_iterbitset_pages_reverse_iter_recursebitset_pages_reverse_iter_startbitset_pages_reverse_iter=l9I$   Q&    Q& p  Q&< pF K QP& P ! k& &4 0> C tH & 0  & 0% * /&  0  &j 0t y %~& 0  8&F 0P U Z&5 0? D I&, 06 ; @&D 0N S X&--p.-.S-.--001N0y101)0  d =M% , 1 #> UL S Z a f  s z   4  *  Q       / < J *Y   = ^     w )  ` g0 27)?rG Q g_ o vr~|   g |    g  #!+ @5 gC S Z!bj  X   Z e| h ` (30f\ ghow  S*   p *  p  +3; E pc %nv1~ @ p  e  (10p8 B pP l wpT T Ep  p& 19A `K pu  t E  p   $ =+ E3  ;  E pT k  Y u  P  b      j  Z  ' j 0 >  F j O ` j h  q    Z         ^ ( p7 N k uy  Y  0 @  e     Z  + : _I X ` m | _  %  %     Z  ;  {$ E3 ; #D U R] j y x         i^   p. W_v  %Y @ p 7 "Q*F NWe v )Y  p 7    p >F] Zn ly `  p 7 T , Z= ;HPMX  ^ pl 7  @`)r|! @`h*1 p@`E ^Y @`expr.c.o/ 1378727465 1000 1000 100664 10272 ` ELF>p@@UHHH}HuHE HHEHUHPUHH H}HEvHEH@HUHHH@HtTHEH@HUHRHMHHHRHHEH@HUHRHMHHHRHHEHEHH;EyHEH@HtHEH@HUHRHHE HUHH H}HEHEH@HUHHHHHEH@HMHHH@HHEH@HUHHHHEH@HMHHH@HHEH@HUHHHHEHEHH;ETHEHUHH H}HuHEH@H;Er HEH@Ht HEH@HHEHeHEHH;EsHEH@HUHHHUHRHHHEH}u\HEH@HUHH)HHHHEH@HHHEHȾHHEHUHPHEHUHPUHHH}HEHHPHEHHtHEHHPHEHUHH@H}HuHUHEH@H;Er IHEH@Ht HEH@HHEHeHEHH;EsHEH@HUH HUHRHHHEH}HEH@HUHRHMHHHEH}HEH@HUHH)HHHEH@H HEHȾHHEH@HUH)HEHHHEHȾHHEHUHPHEHUHPHEHUHPHEH@HUHUHH0H}HuЈEHEHHuHEHPHEHHHHHEHEHHPHMHEHHtLHEHPHEHHHHEHHEHPHEHHE܈HEHHPHEH /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/expr.cexpr->size > 0bitset_expr_add_param;int0 F G0# H0# I# J#0 QB T0# V0# XB# Z# ( (h )` 0 0X c20h B2 BX cD0hPB PX P0PU0h]B`lB lhwB^ wH xB@ x0}0h`XB X 0P L Bhz$ 0% % $ > : ; I$ > ' II  I  : ;  : ; I8 .? : ; ' @B  : ; I 4: ; I .: ; ' I@B 4: ; I .? : ; ' I@B  : ; 4I4  I!I/ &I4: ; I?  ww3v34w45w58w8vwwwvwwwvwwwvww w vwwwavabw,b /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/includeexpr.cexpr.hstddef.h )Y2)+XY2B:X2נWKfrN/Iuv?Y2v"Y3=נWKfrN/I(I,ut nt Y3K"vu"Ybitset_expr_add_conjsize_tcapacitybitset_expr_clear_Boolbitset_idsbitset_expr_reserve__PRETTY_FUNCTION__/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/expr.csizelong unsigned intshort unsigned intpre_notsbitset_expr_conjbitset_exprpre_notexprerror_1error_2bitset_expr_createbitset_expr_destroyunsigned intlong long unsigned intbitset_expr_add_paramreallocunsigned charsizetypeconjslong long intcharGNU C 4.7.3short intconjbitset_idlong intlong doublesigned charbitset_expr_conj_reserveEXPR_DEFAULT_CAPACITYEXPR_CONJ_DEFAULT_CAPACITYGCC: (Debian 4.7.3-4) 4.7.3zRx 4AC o <AC  \AC  |AC  JAC E wAC r AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @bp8&,1>69JN ?X h-0c0'0 |]w`' 0=W0x' xw5p   Nd44Jexpr.cbitset_expr_reservebitset_expr_conj_reserve__PRETTY_FUNCTION__.2716EXPR_DEFAULT_CAPACITYEXPR_CONJ_DEFAULT_CAPACITYbitset_expr_creatememsetbitset_expr_destroybitset_expr_clearbitset_expr_add_conjbitset_expr_add_param__assert_fail" g$bC p  a  pb% , 1 > L S Z a h o v U}      =  7    & 4 K bQ .X`4h r   A4 ` @ %  3 H>FN X f t            $ =2 8A O &Us` yksb{ @    \p  & <  @4`iterator.c.o/ 1378727465 1000 1000 100664 24128 ` ELF>1@@UHHH}HuHE`HHEHUHP(UHH H}HEHEHHHUHHHHHH@HHEHH(HEHpHUHHHHHH@HHEHH(HEHpHUHHHHHH@ HHEHH(HEHpHUHHHHHH@(HHEHEHH;E(HEH@HtHEH@(HUHRHHEH@Ht*HEH@HHEH@(HUHRHHEH@Ht*HEH@ HHEH@(HUHR HHE`HUHH H}HuHEH@H;Er HEH@Ht HEH@HHEHeHEH;EvHEHH(HUHHHHHHEH@HHHEH}ukHEH@HUH)HHHHHHEHPHHHHHHEHHʾHHEHUHPHEHUHPUHH@H}HuHUHEH@H;Er HEH@Ht HEH@HHEHeHEH;EvHEH@(HUH HUHRHHHEH}tHEH@(HUHR HMHHHEH}0HEH@(HUH HUHR(HHHEH}HEH@HUHH)HHHEH@H HEHȾHHEH@HUH)HEHHHEHȾHHEH@HUHH)HHHEH@H HEHȾHHEHUHPHEHUHP HEHUHP(HEHUHP8HEH@(HUHHEH@(HUHUHHPH}HuHUHMH}uH}uH}t H}uHEH@(HHEHEH@HtHEH@H!HEH@(HUHֿHHEHPHEH@HHEH@ HtHEH@ H8HEH@(HUHֿHHEHP HEH@ Hu HEH@ HHEHHEHHt HEHEH@HUHHHEHEHHHUHHHHHHEHEHHMHEHH't hHEHEH@HUHHHH;ErHEHHEH@HUHHHHHEHHHuHEH@HUHHHEH@HMHHHH HEHHHHEHP HEHHEHHHEHHEH@(HUHHHHEHEHH;EHEHHEHPHEHEHH;EXHEHHEHHEHUHSHHH}HuH}uHMHHHH HHHHHH)HtHEHH;EvHEH@HuHEHBHEHEHEHEH@(HUHHHEH@HUHHHHUHHHHEHP HEHHEH@(HUHHHHuHEHHEH@(HUHHHHHEH9s HEH@(HUHHHHHEH9v#HEH@(HUHHHHHEHEHEH@H;EHUHEHHHH[]UHH H}HuH}tH}uHEHEHEHEHEHHEHH9sHEHHEHH9vUHH H}HuH}u-H}u.HEH@Hu/HEHHu0HEHHEHEHP HEHteHEH@(HUHHHHHEHH9t6HEH@(HUHHHHEHHhHEH@(HUHHHHtLHEH@(HUHHHHHEHH9u'HEH@(HUHHHHEHHHEHEH@H;EUHH H}HEH0HEH@0HHEH@HHEHHtHEH@HUHRHHHEH@HHEH@HHHE~HEHHHUHHHHHHHEH@HH9wbHEHH HEHpHUHHHHHHH_HEHP HEH@HHHEHEHH;EqHEH@HHUHz0HUHH H}H}unHE.HEHHHUHHHHHȾHHEHEHH;EwHEH3UHH0H}H}u|HEHEH@HHEHEHEHHHUHHHHHHH;EHEHUH HEHpHUHHHHHHHHHEHUH4HEHHHUHHHHHHH9vHEHEHH;EEHEHUHHH}H}uHEH-UHH H}H}uHEH@HHu H=HEH0HHEH}tHEH@HHEHHEH) /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/iterator.cit != ((void *)0)expr != ((void *)0)p_bitsets != ((void *)0)exconj->bitset_ids[b] < bitsets_sizep_bitsets[exconj->bitset_ids[b]] != ((void *)0)conj != ((void *)0)pos % (BITSET_PAGE_DATA_SIZE * 8) == 0conj->page_first_pos <= posconj->pages[b]->first_pos >= key.first_posp1 != ((void *)0) && p2 != ((void *)0)dst != ((void *)0)conj->size > 0conj->page_first_pos != (18446744073709551615UL)conj->pages[b]->first_pos == conj->page_first_pospos + PAGE_BIT <= it->conjs[c].page_first_posbitset_iterator_nextbitset_iterator_rewindbitset_iterator_next_pagebitset_iterator_first_pagebitset_page_orbitset_iterator_conj_prepare_pagebitset_page_andbitset_page_nandbitset_iterator_conj_cmpbitset_iterator_conj_rewindbitset_iterator_init { ;int0p7;0##0### end#(  E/ Et# Et# Ct D0# E # F0# Gz# / e (J Jt# J/#J 8P R# S0#( T#0   0 FY G0# H0# IY# J_#0e Q T0# V0# X# Z# `?& A0# B0# C# Dt# Et# F#( G#0 0' (0# )0# *0# +# ,_# -#(&6t6it6h7`COitCXcE0haBitaXa0Pf0hn`}Bait}H~@~00h`_XPBOitO0e 0Xc0hϱPЇHb0`l e U pos0  key/b0X   !B"p1X"p2P #h#`  $* %*X"dst+tP &b30h ! $Kr"itKX&c\0h$l"itlX &cq0h  $zm "itzH}  #~0`&pos0X&c0h }  m ' "ith     (0H "itXH  &pos0h U)$c   0)%c  % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I  : ;  : ; I8  : ;  I!I' II & : ; ( .? : ; ' @B : ; I : ; I  4: ; I .: ; ' I@B 4: ; I  : ; .? : ; ' I@B 4I4  !I/ .: ; ' @B !.: ;' I@B ": ;I #4: ;I $.: ;' @B %: ;I &4: ;I '.? : ;' @B (.? : ;' I@B )4: ; I?  ww3v34w45w58w8vwwwvwwwvwww'v'(w()w),w,. v. / w/ 0 w0 3 w3 v w w w d vd e we f wf i wi v w w w 3v34w45w58w8OvOPwPQwQTwTvwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitsetiterator.cstddef.hstdint.hbit.hbitset.hexpr.hiterator.hpage.h 7Y .)224X Y3נWKfrN/I$uw?Y3=נWKfrN/I((I,I,rt kt et Y3uttut=""ɡgɠ->#zX pXؼY2t1 <""sXt X Kxtt/u/vZ3tt% '\'p X 2vN//yX0 r, 2t)Xͻ2t)30}X0'3t2t=u?/capacityrbt_rootfirst_possize_tuint64_tpageslong long unsigned intnextbitset_iterator_next_pagelong long intsigned char__PRETTY_FUNCTION__/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/iterator.cconjlong intexconjbitset_expr_conjPAGE_BITunsigned intbitsetsbitset_iteratorlong unsigned intpageITERATOR_CONJ_DEFAULT_CAPACITYbitsetdataword_basesizeshort unsigned intbitset_idsbitset_pagebitsets_sizebitset_iterator_initrbn_right_redbitset_iterator_nextcardinalityitconjsizetypelong doublerbt_nilbitset_iterator_conj_prepare_pageword_xorp_bitsetsbitset_iterator_conj_reserveGNU C 4.7.3page_first_posconj1conj2expr_Boolunsigned charbitset_iterator_conj_cmpnodebitset_iterator_rewindshort intbitset_exprBITSET_PAGE_DATA_SIZEpage_tmpbitset_iterator_createbitset_iterator_conj_rewindconjscharrestartworderror_1error_2error_3bit_iteratorbitset_iterator_destroybitset_pages_tbitset_iterator_conjuint8_tpage_alloc_sizebitset_iterator_reservepre_notsbitset_iterator_prepare_pagebitset_iterator_first_pageITERATOR_DEFAULT_CAPACITYreallocstartpage_itrbn_leftGCC: (Debian 4.7.3-4) 4.7.3zRx 4AC o <AC  \AC  | AC  DAC ? zPLRx $$AC E AC } $AC  DPAC K dAC z AC  :AC u AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @@ &P,P1` 95PD KJ\fj)!z &0u\0 9& \ 0Y*0...\h0h7# < $ AZ(v/   "e P 4M4gP`    64MT4lDP:2BSYo~iterator.cbitset_iterator_reservebitset_iterator_conj_reserve__PRETTY_FUNCTION__.2851bitset_iterator_conj_rewind__PRETTY_FUNCTION__.2867bitset_iterator_conj_cmp__PRETTY_FUNCTION__.2879bitset_iterator_conj_prepare_page__PRETTY_FUNCTION__.2886bitset_iterator_prepare_pagebitset_iterator_first_page__PRETTY_FUNCTION__.2902bitset_iterator_next_page__PRETTY_FUNCTION__.2910__PRETTY_FUNCTION__.2920__PRETTY_FUNCTION__.2924__PRETTY_FUNCTION__.2750__PRETTY_FUNCTION__.2726__PRETTY_FUNCTION__.2738ITERATOR_DEFAULT_CAPACITYITERATOR_CONJ_DEFAULT_CAPACITYbitset_iterator_creatememsetbitset_iterator_destroybitset_page_destroybitset_iterator_init__assert_failbitset_page_alloc_sizebitset_page_createbitset_iterator_rewind__gcc_personality_v0bitset_pages_nsearch_Unwind_Resumebitset_page_set_onesbitset_page_andbitset_page_nandqsortbitset_page_set_zerosbitset_page_orbitset_page_databit_iterator_initbitset_iterator_nextbit_iterator_next"&e((&#&$&.&o&   e*$ . 3 w8*K U Z _*o+(,(*,   *9 C H M*-A K P U*   *   ?*0 /   ` *$ 0N X ] b *     *     *    # *5  ? D I *U 1     * 2E 3 / 4 5i 6 7 8   e *H R W e\*    P%*d n s ex*   e*:   % , 1 > ?L hS Z va f s z   #  q Q  j I d x! 0 < J X f |    '  u ,  b ! / = K h m y   ^ b /   ^ Q "  b p' 3 A O ] 'k y , 2   +4  b  4 `1@9%P [ck    ^ d       ' v' 5 ~;D ,R Xc nv(~   Z   R_  !  /7k Br(z/     i  / $ , @R ]f u  / e     Y c # +e 3 ; S [ s -{ 4 `  & N4P  ' 0 N wV B  P           ' /  N H[ #i Vv $  @4` .( / ( He h 4Pindex.c.o/ 1378727465 1000 1000 100664 22464 ` ELF>H,@@UHHH}HEHHHUHHH}HuH}u.HE HHEHUHPHEHWtUHH H}H}u:HEH@Hu;HE|HEHHUHHHHtvHEHHUHHHHHEH@HUHHMHHHHHEHHUHHHHEHEH@H;ErHEH@Ht3HEH@HUHHHEH@HUHRHHE HUHSHHH}HuHEH@H;Er -HEH@Ht HEH@HHEHeHEH;EvHEH@HUH HUHHHHEH}HEH@HUHH)HHHEH@H HEHȾHHEHUHHEH@HUHRHMHHHEH}IHEHUHPHEH@HEqHEHHUHHHEH@8HHEHHUHHHHtMHEHPHEHHMHHHHHHEHEH;ErHEHUHPHEH@HE|HEHHUHHHHtxHEHHUHHHHHEH@HUHHMHHHHHEHHUHHHHEHEH;EvHH[]UHHH}HuHxHpH}uH}uHEH@HuHxHHHEHUHEHHt {HEHHHpHHE}y LHEH@UHxHuHEHHETHEHHEHEHHUHHHHpHHE}HEHPHEH‹EHEHHEH}uHEH@u HxHuHEHUHEHHEHEHHUHHHHpHHE}yHEHHEH}uHUHuHEHrHEHHEHEHPHEH<u)HEHHUHHHHpHH'HEHHUHHHHpHHHEHHEH}tHEH;EiHEH@<uHEHHHpHHHEHHHpHHHUHH H}HuH}uHEH@HtyHEFHEHHUHHHHt&HEHHUHHHHUHHHEHEH@H;EwHEHHHUHHUHHH}HuH}uHEHHHUHHUHHH}HEHHEHt&HEHtUHH@H}HuHUHEHHEHt HEZHEHHEHUHEHHEEHMHEHHt9HEHEHH;EwHEغHtUHH`H}HuHUHEHHEHtfHUHuHEH/HEHHEHMHEHHtHEHHEH}uHUHH`H}HuHUHEHHUHuHEHFHEHHEHEHt?HMHEHHtHEHHEH}uHUHH`H}HuHUHEHHEHt HEHtfHUHuHEH/HEHHEHMHEHHtHEHHEH}uHUHH@H}HuHUH}urH}usHEHEHEYHEH@HUHHH@HUHHHH;Ev)HEH@HUHHH@HUHHHHEHEHEH@HUHHHH;EwHEHEHH;EkHEHPHEHHtHEHHHEHHuHEH /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/index.cindex != ((void *)0)index->capacity > 0key != ((void *)0)rc >= 0it != ((void *)0)bitset_index_init_iteratorbitset_index_contains_valuebitset_index_remove_valuebitset_index_insertbitset_index_destroybitset_index_create  r r  ;int0p7;0##0### end#(  E/ Et# Et# Ct D0# E # F0# Gz# / e (J Jt# J/#J 8P R# S0#( T#0   0 FY G0# H0# IY# J_#0e Q T0# V0# X# Z# `?& A0# B0# C,# Dt# Et# F#( G#0& |w w# 0# # #}(0(h 2+B"+"h,`8 2 8 (88"X b=0h  NBjN"N0S0X[w@g|Wbo0P b}0HB"~!key~0~0~ hrcBdpos0X0HKb0P"nb0b0@# ( 0"X0P b0h  e~"h0`   ~ B hlBuH$key@0%pos 0h%b!0`&"e_/B /$key/00&7%pos90h%b;0`DB D$keyDE0&I%posK0h%bM0`XB7 X$keyXY0&b%posd0h%bf0`oB o"H$itp @p  %maxv0h%cw0`%bx0X   '% % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I  : ;  : ; I8  : ;  I!I' II < .? : ;' I@B : ;I .? : ; ' I@B : ; I 4I4  !I/ .? : ; ' @B  4: ; I .: ; ' I@B 4: ; I  : ;  U U!: ; I " #&$: ;I %4: ;I &4: ;I '4: ; I?  wwv w !w!$w$vwwwvwww6v67w78w8;w;xvxywyzwz}w}1v12w23w36w6|v|}w}~w~wvwww v w w w P vP Q wQ R wR U wU v w w w v w w w  v  w, s$*+Tlm /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitindex.hindex.cstddef.hstdint.hbit.hbitset.hexpr.hiterator.h !~.tYKvY2t'zX>&Y2נWKfrN/I'I,毽*z(X y 'zXa <<'Yytt/gg/*z< f/*flj /Y)z'f 2t˟&Xw 2t2vvY3=󠟻Y,pXwY3=w/ql3=/uon2=w/ql3=ttɟ+)XX vwordcardinalitybit_itbit_existbitset_index_expr_all_not_set/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/index.cshort intsize_tbitset_index_expr_equalssizetype__PRETTY_FUNCTION__error_1error_2INDEX_DEFAULT_CAPACITYbitset_expr_conjrposbitset_index_createvaluerbt_nilpre_notsuint8_tbitset_index_sizebitset_iteratorpage_tmprollback_bufword_baseexprlong long intrbt_rootpagelong intbitset_indexbitset_index_reservenodebitset_index_insertlong doublestartunsigned charbitset_exprsigned charuint64_tunsigned intbitset_pageGNU C 4.7.3rbn_leftbit_iteratorshort unsigned intbitset_index_expr_any_setbitset_index_destroycharbitsetcapacitybitsets_Boolreallocdataconjsrollbackbitset_index_expr_allbitset_idslong unsigned intrbn_right_redbitset_index_expr_all_setsizebitset_index_contains_valuebitset_iterator_conjkey_sizefirst_posbitset_index_init_iteratorpage_itword_xorindexpagesbitset_index_remove_valuenextbitset_pages_tGCC: (Debian 4.7.3-4) 4.7.3zRx  AC [ <uAC p \EAC @  |]AC ES zPLRx  $BAC = AC  KAC F $WAC R DAC   AC   AC   AC   AAC < .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @ P: &H ,H 1P d9;P KhC`\jz 0uU0 .!!U0_%0V)s)x)Vh+H2 X7 P"]70Pi      uE.=K7B_ty2K}W)>Tmv Q   Aindex.c__PRETTY_FUNCTION__.2099bitset_index_reserve__PRETTY_FUNCTION__.2103__PRETTY_FUNCTION__.2134__PRETTY_FUNCTION__.2157__PRETTY_FUNCTION__.2167__PRETTY_FUNCTION__.2220bitset_index_sizebitset_cardinalityINDEX_DEFAULT_CAPACITYbitset_index_create__assert_failmemsetbitset_index_destroybitset_destroybitset_createbitset_index_insert__gcc_personality_v0bitset_setbit_iterator_initbit_iterator_nextbitset_clear_Unwind_Resumebitset_index_remove_valuebitset_index_contains_valuebitset_testbitset_index_expr_allbitset_expr_clearbitset_expr_add_conjbitset_expr_add_parambitset_index_expr_equalsbit_testbitset_index_expr_all_setbitset_index_expr_any_setbitset_index_expr_all_not_setbitset_index_init_iteratorbitset_iterator_init8 PB G ZLb 0  Z 0  o$` ` j o Zt      o #F$#%$%&3 = B GS%$#&%F#d&s'   Z&)&J T Y Z^w*,-.,-3 0^ . . , - $ .1 %K 'm , $ - . % ' ," -F .j $ . % '   Z      5  J @ % , 1 > L S Z a f As z l 1 ( _       V!  0 >< J X f    0      ! H/ = K 8h m y H    [ H    k   ' i3 ? M [ i t I      `   P? FNV ` n y0 7    H   +$ t3 9B X 0l w7y   ~ *  H  m( 6 `LTKow y2   * & M22:}B @L [ *j u }       ~& . F Nm d w . Q  `  ~  )  Q !  ) 3 S ~c    "      ~  p  9 E  M  U _ |    #  0     @ ` "7 y2(}Hh q Q    , tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/CMakeLists.txt0000664000000000000000000000031412202131537021341 0ustar rootrootset(lib_sources bitset.c page.c expr.c iterator.c index.c ) set_source_files_compile_flags(${lib_sources}) add_library(bitset STATIC ${lib_sources}) target_link_libraries(bitset bit) tarantool-1.5.1.218.g1a69fd6/src/lib/bitset/Makefile0000664000000000000000000002727512213333034020256 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bitset/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bitset/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bitset/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bitset/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. src/lib/bitset/CMakeFiles/bitset.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bitset/CMakeFiles/bitset.dir/rule .PHONY : src/lib/bitset/CMakeFiles/bitset.dir/rule # Convenience name for target. bitset: src/lib/bitset/CMakeFiles/bitset.dir/rule .PHONY : bitset # fast build rule for target. bitset/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/build .PHONY : bitset/fast bitset.o: bitset.c.o .PHONY : bitset.o # target to build an object file bitset.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/bitset.c.o .PHONY : bitset.c.o bitset.i: bitset.c.i .PHONY : bitset.i # target to preprocess a source file bitset.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/bitset.c.i .PHONY : bitset.c.i bitset.s: bitset.c.s .PHONY : bitset.s # target to generate assembly for a file bitset.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/bitset.c.s .PHONY : bitset.c.s expr.o: expr.c.o .PHONY : expr.o # target to build an object file expr.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/expr.c.o .PHONY : expr.c.o expr.i: expr.c.i .PHONY : expr.i # target to preprocess a source file expr.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/expr.c.i .PHONY : expr.c.i expr.s: expr.c.s .PHONY : expr.s # target to generate assembly for a file expr.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/expr.c.s .PHONY : expr.c.s index.o: index.c.o .PHONY : index.o # target to build an object file index.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/index.c.o .PHONY : index.c.o index.i: index.c.i .PHONY : index.i # target to preprocess a source file index.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/index.c.i .PHONY : index.c.i index.s: index.c.s .PHONY : index.s # target to generate assembly for a file index.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/index.c.s .PHONY : index.c.s iterator.o: iterator.c.o .PHONY : iterator.o # target to build an object file iterator.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/iterator.c.o .PHONY : iterator.c.o iterator.i: iterator.c.i .PHONY : iterator.i # target to preprocess a source file iterator.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/iterator.c.i .PHONY : iterator.c.i iterator.s: iterator.c.s .PHONY : iterator.s # target to generate assembly for a file iterator.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/iterator.c.s .PHONY : iterator.c.s page.o: page.c.o .PHONY : page.o # target to build an object file page.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/page.c.o .PHONY : page.c.o page.i: page.c.i .PHONY : page.i # target to preprocess a source file page.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/page.c.i .PHONY : page.c.i page.s: page.c.s .PHONY : page.s # target to generate assembly for a file page.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/page.c.s .PHONY : page.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... bitset" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... bitset.o" @echo "... bitset.i" @echo "... bitset.s" @echo "... expr.o" @echo "... expr.i" @echo "... expr.s" @echo "... index.o" @echo "... index.i" @echo "... index.s" @echo "... iterator.o" @echo "... iterator.i" @echo "... iterator.s" @echo "... page.o" @echo "... page.i" @echo "... page.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/lib/bit/0000775000000000000000000000000012213333320016063 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/lib/bit/cmake_install.cmake0000664000000000000000000000225712213333034021703 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/src/lib/bit/bit.c0000664000000000000000000000753112202131537017017 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include extern inline bool bit_test(const void *data, size_t pos); extern inline bool bit_set(void *data, size_t pos); extern inline bool bit_clear(void *data, size_t pos); extern inline int bit_ctz_u32(uint32_t x); extern inline int bit_ctz_u64(uint64_t x); extern inline int bit_clz_u32(uint32_t x); extern inline int bit_clz_u64(uint64_t x); extern inline int bit_count_u32(uint32_t x); extern inline int bit_count_u64(uint64_t x); extern inline uint32_t bit_rotl_u32(uint32_t x, int r); extern inline uint64_t bit_rotl_u64(uint64_t x, int r); extern inline uint32_t bit_rotr_u32(uint32_t x, int r); extern inline uint64_t bit_rotr_u64(uint64_t x, int r); extern inline uint32_t bswap_u32(uint32_t x); extern inline uint64_t bswap_u64(uint64_t x); #define BITINDEX_NAIVE(type, x, bitsize) { \ /* naive generic implementation, worst case */ \ type bit = 1; \ int i = 0; \ for (int k = 0; k < bitsize; k++) { \ if (x & bit) { \ indexes[i++] = offset + k + 1; \ } \ bit <<= 1; \ } \ \ indexes[i] = 0; \ return indexes + i; \ } int * bit_index_u32(uint32_t x, int *indexes, int offset) { #if defined(HAVE_BUILTIN_CTZ) int prev_pos = 0; int i = 0; #if defined(HAVE_BUILTIN_POPCOUNT) /* fast implementation using built-in popcount function */ const int count = bit_count_u32(x); while (i < count) { #else /* sligtly slower implementation without using built-in popcount */ while(x) { #endif /* use ctz */ const int a = bit_ctz_u32(x); prev_pos += a + 1; x >>= a; x >>= 1; indexes[i++] = offset + prev_pos; } indexes[i] = 0; return indexes + i; #else /* !defined(HAVE_BUILTIN_CTZ) */ BITINDEX_NAIVE(uint32_t, x, sizeof(uint32_t) * CHAR_BIT); #endif } int * bit_index_u64(uint64_t x, int *indexes, int offset) { #if defined(HAVE_CTZLL) int prev_pos = 0; int i = 0; #if defined(HAVE_POPCOUNTLL) /* fast implementation using built-in popcount function */ const int count = bit_count_u64(x); while (i < count) { #else /* sligtly slower implementation without using built-in popcount */ while(x) { #endif /* use ctz */ const int a = bit_ctz_u64(x); prev_pos += a + 1; x >>= a; x >>= 1; indexes[i++] = offset + prev_pos; } indexes[i] = 0; return indexes + i; #else /* !defined(HAVE_CTZ) */ BITINDEX_NAIVE(uint64_t, x, sizeof(uint64_t) * CHAR_BIT); #endif } #undef BITINDEX_NAIVE extern inline void bit_iterator_init(struct bit_iterator *it, const void *data, size_t size, bool set); extern inline size_t bit_iterator_next(struct bit_iterator *it); tarantool-1.5.1.218.g1a69fd6/src/lib/bit/CMakeLists.txt0000664000000000000000000000076512202131537020637 0ustar rootrootif ((HAVE_BUILTIN_CTZ OR HAVE_FFSL) AND (HAVE_BUILTIN_CTZLL OR HAVE_FFSLL) AND HAVE_BUILTIN_CLZ AND HAVE_BUILTIN_CLZLL AND HAVE_BUILTIN_POPCOUNT AND HAVE_BUILTIN_POPCOUNTLL AND HAVE_BUILTIN_BSWAP32 AND HAVE_BUILTIN_BSWAP64) message(STATUS "Using compiler version of bit operations") else() message(WARNING "Using slow implementation of bit operations") endif() set(lib_sources bit.c ) set_source_files_compile_flags(${lib_sources}) add_library(bit STATIC ${lib_sources}) tarantool-1.5.1.218.g1a69fd6/src/lib/bit/libbit.a0000664000000000000000000003404012213333045017477 0ustar rootroot! / 1378727461 0 0 0 320 ` bit_testbit_setbit_clearbit_ctz_u32bit_ctz_u64bit_clz_u32bit_clz_u64bit_count_u32bit_count_u64bit_rotl_u32bit_rotl_u64bit_rotr_u32bit_rotr_u64bswap_u32bswap_u64bit_iterator_initbit_iterator_nextbit_index_u32bit_index_u64bit.c.o/ 1378727460 1000 1000 100664 13920 ` ELF>0@@UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE E[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE!E[]UH}E]UHH}HE]UH}E]UHH}HEH?]UHH}EHUHHH}H}UHS}uEUӉÉ[]UHSH}uEHUHӉHH[]UHS}uEUӉˉ[]UHSH}uEHUHӉHH[]UH}E]UHH}HEH]UHH}HuHU؉ȈEHEHUHPHEHPHEHP HEHP HEHHEHP(}tHHUHBHEH@HEH@ HU؃HHEHEH@ H;EHtAHEH@ HHEHHEHHEH@H1HEHHEH@ HPHEHP jHEHPHEHHEHE*HEH@ HEHEH@ HPHEHP HEHEH@ H;ErHEHHEH@H1HEH]UHHH}HEHP HEH@(H9Ht HHEH@ HHEHHEHHEH@H1HEHHEH@ HHEH@HH)HHHHEHPHEH@ HPHEHP HEHHHSHEHHEHEHHEHHH!HEHHEHPEHHUHH }HuUEEEECEEEEEmmEHHHEHЋUMʉEE;E|EHHHEHEHHHEHUHH}HuUHEEE=HEHUH!Ht%EHHHEHЋUMʃEHeEE?vEHHHEHEHHHEH]1;int3~7;0##0### end#(  @xx @@ pos@0 B0` C0X EP e Rx  R @ posR0 T0` U0X WP XxOe fx f @ posf0 h0` i0X kP lxO B xsl B xh B* xsl B] xЅhB xslB xhsxsdrB`Gx`rB\0sx0sdr0B`:x:`r:B\IsxIslY5xYhitXP0HsetxDe`wh0itXbitBl] x]s\ ]P ]BX `BliaBh edal`B B| x|X |P |BLbithiBdkB`% $ > : ; I$ >  : ; : ;I8  : ;I8  I &I .? : ; ' I@B  : ; I : ; I 4: ; I & .? : ; ' I@B .? : ;' I@B : ;I .? : ;' @B : ;I 4: ;I .? : ;' I@B 4: ; I  .? : ; ' I@B wwSvSTwTUwUXwXvwwwgvghwhiwilwltvtuwuvwvywyvwwwvwwwvwwwvwwwvwwwvwwwvwww.v./w/0w03w3OvOPwPQwQTwT]v]^w^_w_bwbnvnowopwpswsvwwwvwww`v`awabwbewevw," /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebit.hbit.cstddef.hstdint.h ɻ% <ɻ(.K <ɻ(0K L S &Z 2a h o t   v X  U    T' 1 N {\ j { C sT `  {   I "*h2 < Y {g u  I hu   u  9  , 7?G @_ jrz     ` # I U]/e   i/P  P^  E^o @7 '?oGO g v > a   a `2 @ N h Ov~) [a   p  DThhu ,Ll/P^ o,Llatarantool-1.5.1.218.g1a69fd6/src/lib/bit/Makefile0000664000000000000000000002001312213333034017521 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bit/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bit/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bit/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bit/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. src/lib/bit/CMakeFiles/bit.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/bit/CMakeFiles/bit.dir/rule .PHONY : src/lib/bit/CMakeFiles/bit.dir/rule # Convenience name for target. bit: src/lib/bit/CMakeFiles/bit.dir/rule .PHONY : bit # fast build rule for target. bit/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bit/CMakeFiles/bit.dir/build.make src/lib/bit/CMakeFiles/bit.dir/build .PHONY : bit/fast bit.o: bit.c.o .PHONY : bit.o # target to build an object file bit.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bit/CMakeFiles/bit.dir/build.make src/lib/bit/CMakeFiles/bit.dir/bit.c.o .PHONY : bit.c.o bit.i: bit.c.i .PHONY : bit.i # target to preprocess a source file bit.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bit/CMakeFiles/bit.dir/build.make src/lib/bit/CMakeFiles/bit.dir/bit.c.i .PHONY : bit.c.i bit.s: bit.c.s .PHONY : bit.s # target to generate assembly for a file bit.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/lib/bit/CMakeFiles/bit.dir/build.make src/lib/bit/CMakeFiles/bit.dir/bit.c.s .PHONY : bit.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... bit" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... bit.o" @echo "... bit.i" @echo "... bit.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/lib/CMakeLists.txt0000664000000000000000000000010712202131537020047 0ustar rootrootadd_subdirectory(bit) add_subdirectory(bitset) add_subdirectory(small) tarantool-1.5.1.218.g1a69fd6/src/lib/Makefile0000664000000000000000000001522112213333034016750 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/lib/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/assoc.cc0000664000000000000000000000004712202131537016163 0ustar rootroot#define MH_SOURCE 1 #include tarantool-1.5.1.218.g1a69fd6/src/log_io.cc0000664000000000000000000003653512242653271016346 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "log_io.h" #include #include #include "palloc.h" #include "fiber.h" #include "crc32.h" #include "fio.h" #include "tarantool_eio.h" const uint32_t default_version = 11; const log_magic_t row_marker_v11 = 0xba0babed; const log_magic_t eof_marker_v11 = 0x10adab1e; const char inprogress_suffix[] = ".inprogress"; const char v11[] = "0.11\n"; void header_v11_sign(struct header_v11 *header) { header->data_crc32c = crc32_calc(0, (const unsigned char *) header + sizeof(struct header_v11), header->len); header->header_crc32c = crc32_calc(0, (const unsigned char *) &header->lsn, sizeof(struct header_v11) - sizeof(header->header_crc32c)); } void row_v11_fill(struct row_v11 *row, int64_t lsn, uint16_t tag, uint64_t cookie, const char *metadata, size_t metadata_len, const char *data, size_t data_len) { row->marker = row_marker_v11; row->tag = tag; row->cookie = cookie; memcpy(row->data, metadata, metadata_len); memcpy(row->data + metadata_len, data, data_len); header_v11_fill(&row->header, lsn, metadata_len + data_len + sizeof(row->tag) + sizeof(row->cookie)); } struct log_dir snap_dir = { /* .panic_if_error = */ false, /* .sync_is_async = */ false, /* .open_wflags = */ 0, /* .filetype = */ "SNAP\n", /* .filename_ext = */ ".snap", /* .dirname = */ NULL }; struct log_dir wal_dir = { /* .panic_if_error = */ false, /* .sync_is_async = */ true, /* .open_wflags = */ 0, /* .filetype = */ "XLOG\n", /* .filename_ext = */ ".xlog", /* .dirname = */ NULL }; static int cmp_i64(const void *_a, const void *_b) { const int64_t *a = (const int64_t *) _a, *b = (const int64_t *) _b; if (*a == *b) return 0; return (*a > *b) ? 1 : -1; } static ssize_t scan_dir(struct log_dir *dir, int64_t **ret_lsn) { ssize_t result = -1; size_t i = 0, size = 1024; ssize_t ext_len = strlen(dir->filename_ext); int64_t *lsn = (int64_t *) palloc(fiber->gc_pool, sizeof(int64_t) * size); DIR *dh = opendir(dir->dirname); if (lsn == NULL || dh == NULL) goto out; errno = 0; struct dirent *dent; while ((dent = readdir(dh)) != NULL) { char *ext = strchr(dent->d_name, '.'); if (ext == NULL) continue; const char *suffix = strchr(ext + 1, '.'); /* * A valid ending is either .xlog or * .xlog.inprogress, given dir->filename_ext == * 'xlog'. */ bool ext_is_ok; if (suffix == NULL) ext_is_ok = strcmp(ext, dir->filename_ext) == 0; else ext_is_ok = (strncmp(ext, dir->filename_ext, ext_len) == 0 && strcmp(suffix, inprogress_suffix) == 0); if (!ext_is_ok) continue; lsn[i] = strtoll(dent->d_name, &ext, 10); if (strncmp(ext, dir->filename_ext, ext_len) != 0) { /* d_name doesn't parse entirely, ignore it */ say_warn("can't parse `%s', skipping", dent->d_name); continue; } if (lsn[i] == LLONG_MAX || lsn[i] == LLONG_MIN) { say_warn("can't parse `%s', skipping", dent->d_name); continue; } i++; if (i == size) { int64_t *n = (int64_t *) palloc(fiber->gc_pool, sizeof(int64_t) * size * 2); if (n == NULL) goto out; memcpy(n, lsn, sizeof(int64_t) * size); lsn = n; size = size * 2; } } qsort(lsn, i, sizeof(int64_t), cmp_i64); *ret_lsn = lsn; result = i; out: if (errno != 0) say_syserror("error reading directory `%s'", dir->dirname); if (dh != NULL) closedir(dh); return result; } int64_t greatest_lsn(struct log_dir *dir) { int64_t *lsn; ssize_t count = scan_dir(dir, &lsn); if (count <= 0) return count; return lsn[count - 1]; } int64_t find_including_file(struct log_dir *dir, int64_t target_lsn) { int64_t *lsn; ssize_t count = scan_dir(dir, &lsn); if (count <= 0) return count; while (count > 1) { if (*lsn <= target_lsn && target_lsn < *(lsn + 1)) { goto out; return *lsn; } lsn++; count--; } /* * we can't check here for sure will or will not last file * contain record with desired lsn since number of rows in file * is not known beforehand. so, we simply return the last one. */ out: return *lsn; } char * format_filename(struct log_dir *dir, int64_t lsn, enum log_suffix suffix) { static __thread char filename[PATH_MAX + 1]; const char *suffix_str = suffix == INPROGRESS ? inprogress_suffix : ""; snprintf(filename, PATH_MAX, "%s/%020lld%s%s", dir->dirname, (long long)lsn, dir->filename_ext, suffix_str); return filename; } /* }}} */ /* {{{ struct log_io_cursor */ static const char ROW_EOF[] = ""; const char * row_reader_v11(FILE *f, uint32_t *rowlen) { struct header_v11 m; uint32_t header_crc, data_crc; if (fread(&m, sizeof(m), 1, f) != 1) return ROW_EOF; /* header crc32c calculated on */ header_crc = crc32_calc(0, (unsigned char *) &m + offsetof(struct header_v11, lsn), sizeof(m) - offsetof(struct header_v11, lsn)); if (m.header_crc32c != header_crc) { say_error("header crc32c mismatch"); return NULL; } char *row = (char *) palloc(fiber->gc_pool, sizeof(m) + m.len); memcpy(row, &m, sizeof(m)); if (fread(row + sizeof(m), m.len, 1, f) != 1) return ROW_EOF; data_crc = crc32_calc(0, (unsigned char *) row + sizeof(m), m.len); if (m.data_crc32c != data_crc) { say_error("data crc32c mismatch"); return NULL; } say_debug("read row v11 success lsn:%lld", (long long) m.lsn); *rowlen = m.len + sizeof(m); return row; } void log_io_cursor_open(struct log_io_cursor *i, struct log_io *l) { i->log = l; i->row_count = 0; i->good_offset = ftello(l->f); i->eof_read = false; } void log_io_cursor_close(struct log_io_cursor *i) { struct log_io *l = i->log; l->rows += i->row_count; /* * Since we don't close log_io * we must rewind log_io to last known * good position if there was an error. * Seek back to last known good offset. */ fseeko(l->f, i->good_offset, SEEK_SET); prelease(fiber->gc_pool); } /** * Read logfile contents using designated format, panic if * the log is corrupted/unreadable. * * @param i iterator object, encapsulating log specifics. * */ const char * log_io_cursor_next(struct log_io_cursor *i, uint32_t *rowlen) { struct log_io *l = i->log; const char *row; log_magic_t magic; off_t marker_offset = 0; assert(i->eof_read == false); say_debug("log_io_cursor_next: marker:0x%016X/%zu", row_marker_v11, sizeof(row_marker_v11)); /* * Don't let gc pool grow too much. Yet to * it before reading the next row, to make * sure it's not freed along here. */ prelease_after(fiber->gc_pool, 128 * 1024); restart: if (marker_offset > 0) fseeko(l->f, marker_offset + 1, SEEK_SET); if (fread(&magic, sizeof(magic), 1, l->f) != 1) goto eof; while (magic != row_marker_v11) { int c = fgetc(l->f); if (c == EOF) { say_debug("eof while looking for magic"); goto eof; } magic = magic >> 8 | ((log_magic_t) c & 0xff) << (sizeof(magic)*8 - 8); } marker_offset = ftello(l->f) - sizeof(row_marker_v11); if (i->good_offset != marker_offset) say_warn("skipped %jd bytes after 0x%08jx offset", (intmax_t)(marker_offset - i->good_offset), (uintmax_t)i->good_offset); say_debug("magic found at 0x%08jx", (uintmax_t)marker_offset); row = row_reader_v11(l->f, rowlen); if (row == ROW_EOF) goto eof; if (row == NULL) { if (l->dir->panic_if_error) panic("failed to read row"); say_warn("failed to read row"); goto restart; } i->good_offset = ftello(l->f); i->row_count++; if (i->row_count % 100000 == 0) say_info("%.1fM rows processed", i->row_count / 1000000.); return row; eof: /* * The only two cases of fully read file: * 1. sizeof(eof_marker) > 0 and it is the last record in file * 2. sizeof(eof_marker) == 0 and there is no unread data in file */ if (ftello(l->f) == i->good_offset + sizeof(eof_marker_v11)) { fseeko(l->f, i->good_offset, SEEK_SET); if (fread(&magic, sizeof(magic), 1, l->f) != 1) { say_error("can't read eof marker"); } else if (magic == eof_marker_v11) { i->good_offset = ftello(l->f); i->eof_read = true; } else if (magic != row_marker_v11) { say_error("eof marker is corrupt: %lu", (unsigned long) magic); } else { /* * Row marker at the end of a file: a sign * of a corrupt log file in case of * recovery, but OK in case we're in local * hot standby or replication relay mode * (i.e. data is being written to the * file. Don't pollute the log, the * condition is taken care of up the * stack. */ } } /* No more rows. */ return NULL; } /* }}} */ int inprogress_log_rename(struct log_io *l) { char *filename = l->filename; char new_filename[PATH_MAX]; char *suffix = strrchr(filename, '.'); assert(l->is_inprogress); assert(suffix); assert(strcmp(suffix, inprogress_suffix) == 0); /* Create a new filename without '.inprogress' suffix. */ memcpy(new_filename, filename, suffix - filename); new_filename[suffix - filename] = '\0'; if (rename(filename, new_filename) != 0) { say_syserror("can't rename %s to %s", filename, new_filename); return -1; } l->is_inprogress = false; return 0; } int inprogress_log_unlink(char *filename) { #ifndef NDEBUG char *suffix = strrchr(filename, '.'); assert(suffix); assert(strcmp(suffix, inprogress_suffix) == 0); #endif if (unlink(filename) != 0) { /* Don't panic if there is no such file. */ if (errno == ENOENT) return 0; say_syserror("can't unlink %s", filename); return -1; } return 0; } /* {{{ struct log_io */ int log_io_close(struct log_io **lptr) { struct log_io *l = *lptr; int r; if (l->mode == LOG_WRITE) { fio_write(fileno(l->f), &eof_marker_v11, sizeof(log_magic_t)); /* * Sync the file before closing, since * otherwise we can end up with a partially * written file in case of a crash. * Do not sync if the file is opened with O_SYNC. */ if (! (l->dir->open_wflags & WAL_SYNC_FLAG)) log_io_sync(l); if (l->is_inprogress && inprogress_log_rename(l) != 0) panic("can't rename 'inprogress' WAL"); } r = fclose(l->f); if (r < 0) say_syserror("can't close"); free(l); *lptr = NULL; return r; } /** Free log_io memory and destroy it cleanly, without side * effects (for use in the atfork handler). */ void log_io_atfork(struct log_io **lptr) { struct log_io *l = *lptr; if (l) { /* * Close the file descriptor STDIO buffer does not * make its way into the respective file in * fclose(). */ close(fileno(l->f)); fclose(l->f); free(l); *lptr = NULL; } } static int sync_cb(eio_req *req) { if (req->result) say_error("%s: fsync failed, errno: %d", __func__, (int) req->result); int fd = (intptr_t) req->data; close(fd); return 0; } int log_io_sync(struct log_io *l) { if (l->dir->sync_is_async) { int fd = dup(fileno(l->f)); if (fd == -1) { say_syserror("%s: dup() failed", __func__); return -1; } eio_fsync(fd, 0, sync_cb, (void *) (intptr_t) fd); } else if (fsync(fileno(l->f)) < 0) { say_syserror("%s: fsync failed", l->filename); return -1; } return 0; } static int log_io_write_header(struct log_io *l) { int ret = fprintf(l->f, "%s%s\n", l->dir->filetype, v11); return ret < 0 ? -1 : 0; } /** * Verify that file is of the given format. * * @param l log_io object, denoting the file to check. * @param[out] errmsg set if error * * @return 0 if success, -1 on error. */ static int log_io_verify_meta(struct log_io *l, const char **errmsg) { char filetype[32], version[32], buf[256]; struct log_dir *dir = l->dir; FILE *stream = l->f; if (fgets(filetype, sizeof(filetype), stream) == NULL || fgets(version, sizeof(version), stream) == NULL) { *errmsg = "failed to read log file header"; goto error; } if (strcmp(dir->filetype, filetype) != 0) { *errmsg = "unknown filetype"; goto error; } if (strcmp(v11, version) != 0) { *errmsg = "unknown version"; goto error; } for (;;) { if (fgets(buf, sizeof(buf), stream) == NULL) { *errmsg = "failed to read log file header"; goto error; } if (strcmp(buf, "\n") == 0 || strcmp(buf, "\r\n") == 0) break; } return 0; error: return -1; } struct log_io * log_io_open(struct log_dir *dir, enum log_mode mode, const char *filename, enum log_suffix suffix, FILE *file) { struct log_io *l = NULL; int save_errno; const char *errmsg = NULL; /* * Check fopen() result the caller first thing, to * preserve the errno. */ if (file == NULL) { errmsg = strerror(errno); goto error; } l = (struct log_io *) calloc(1, sizeof(*l)); if (l == NULL) { errmsg = strerror(errno); goto error; } l->f = file; strncpy(l->filename, filename, PATH_MAX); l->mode = mode; l->dir = dir; l->is_inprogress = suffix == INPROGRESS; if (mode == LOG_READ) { if (log_io_verify_meta(l, &errmsg) != 0) { errmsg = strerror(errno); goto error; } } else { /* LOG_WRITE */ setvbuf(l->f, NULL, _IONBF, 0); if (log_io_write_header(l) != 0) { errmsg = strerror(errno); goto error; } } return l; error: save_errno = errno; say_error("%s: failed to open %s: %s", __func__, filename, errmsg); if (file) fclose(file); if (l) free(l); errno = save_errno; return NULL; } struct log_io * log_io_open_for_read(struct log_dir *dir, int64_t lsn, enum log_suffix suffix) { assert(lsn != 0); const char *filename = format_filename(dir, lsn, suffix); FILE *f = fopen(filename, "r"); return log_io_open(dir, LOG_READ, filename, suffix, f); } /** * In case of error, writes a message to the server log * and sets errno. */ struct log_io * log_io_open_for_write(struct log_dir *dir, int64_t lsn, enum log_suffix suffix) { char *filename; FILE *f; int fd; assert(lsn != 0); if (suffix == INPROGRESS) { /* * Check whether a file with this name already exists. * We don't overwrite existing files. */ filename = format_filename(dir, lsn, NONE); if (access(filename, F_OK) == 0) { errno = EEXIST; goto error; } } filename = format_filename(dir, lsn, suffix); /* * Open the ..inprogress file. If it exists, * open will fail. */ fd = open(filename, O_WRONLY | O_CREAT | O_EXCL | dir->open_wflags, 0664); if (fd < 0) goto error; say_info("creating `%s'", filename); f = fdopen(fd, "w"); return log_io_open(dir, LOG_WRITE, filename, suffix, f); error: say_syserror("%s: failed to open `%s'", __func__, filename); return NULL; } /* }}} */ tarantool-1.5.1.218.g1a69fd6/src/say.cc0000664000000000000000000001303412231715276015661 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "say.h" #include #include #include #include #include #include #ifndef PIPE_BUF #include #endif #include extern "C" { #include #include } /* extern "C" */ #include "tarantool.h" #include "sio.h" int sayfd = STDERR_FILENO; pid_t logger_pid; bool booting = true; static void sayf(int level, const char *filename, int line, const char *error, const char *format, ...); sayfunc_t _say = sayf; static char level_to_char(int level) { switch (level) { case S_FATAL: return 'F'; case S_ERROR: return 'E'; case S_CRIT: return 'C'; case S_WARN: return 'W'; case S_INFO: return 'I'; case S_DEBUG: return 'D'; default: return '_'; } } void say_logger_init(int nonblock) { int pipefd[2]; pid_t pid; char cmd[] = { "/bin/sh" }; char args[] = { "-c" }; char *argv[] = { cmd, args, cfg.logger, NULL }; char *envp[] = { NULL }; setvbuf(stderr, NULL, _IONBF, 0); if (cfg.logger != NULL) { sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGCHLD); if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1) say_syserror("sigprocmask"); if (pipe(pipefd) == -1) { say_syserror("pipe"); goto error; } pid = fork(); if (pid == -1) { say_syserror("pipe"); goto error; } if (pid == 0) { sigprocmask(SIG_UNBLOCK, &mask, NULL); close(pipefd[1]); dup2(pipefd[0], STDIN_FILENO); /* * Move to an own process group, to not * receive signals from the controlling * tty. This keeps the log open as long as * the parent is around. When the parent * dies, we get SIGPIPE and terminate. */ setpgid(0, 0); execve(argv[0], argv, envp); goto error; } #ifndef TARGET_OS_DARWIN /* * A courtesy to a DBA who might have * misconfigured the logger option: check whether * or not the logger process has started, and if * it didn't, abort. Notice, that if the logger * makes a slow start this is futile. */ struct timespec timeout; timeout.tv_sec = 0; timeout.tv_nsec = 1; /* Mostly to trigger preemption. */ if (sigtimedwait(&mask, NULL, &timeout) == SIGCHLD) goto error; #endif /* OK, let's hope for the best. */ sigprocmask(SIG_UNBLOCK, &mask, NULL); close(pipefd[0]); dup2(pipefd[1], STDERR_FILENO); dup2(pipefd[1], STDOUT_FILENO); sayfd = pipefd[1]; logger_pid = pid; } else { sayfd = STDERR_FILENO; } booting = false; if (nonblock) sio_setfl(sayfd, O_NONBLOCK, 1); return; error: say_syserror("Can't start logger: %s", cfg.logger); _exit(EXIT_FAILURE); } void vsay(int level, const char *filename, int line, const char *error, const char *format, va_list ap) { size_t p = 0, len = PIPE_BUF; const char *f; static __thread char buf[PIPE_BUF]; if (booting) { fprintf(stderr, "%s: ", binary_filename); vfprintf(stderr, format, ap); if (error) fprintf(stderr, ": %s", error); fprintf(stderr, "\n"); return; } ev_now_update(); for (f = filename; *f; f++) if (*f == '/' && *(f + 1) != '\0') filename = f + 1; time_t now = (time_t) ev_now(); struct tm tm; localtime_r(&now, &tm); /* Print time in format 2012-08-07 18:30:00.634 */ p += strftime(buf + p, len - p, "%F %H:%M", &tm); p += snprintf(buf + p, len - p, ":%06.3f", ev_now() - now + tm.tm_sec); p += snprintf(buf + p, len - p, " [%i] %i/%s", getpid(), fiber->fid, fiber_name(fiber)); if (level == S_WARN || level == S_ERROR) p += snprintf(buf + p, len - p, " %s:%i", filename, line); p += snprintf(buf + p, len - p, " %c> ", level_to_char(level)); /* until here it is guaranteed that p < len */ p += vsnprintf(buf + p, len - p, format, ap); if (error && p < len - 1) p += snprintf(buf + p, len - p, ": %s", error); if (p >= len - 1) p = len - 1; *(buf + p) = '\n'; int r = write(sayfd, buf, p + 1); (void)r; if (S_FATAL && sayfd != STDERR_FILENO) { r = write(STDERR_FILENO, buf, p + 1); (void)r; } } static void sayf(int level, const char *filename, int line, const char *error, const char *format, ...) { int errsv = errno; /* Preserve the errno. */ if (cfg.log_level < level) return; va_list ap; va_start(ap, format); vsay(level, filename, line, error, format, ap); va_end(ap); errno = errsv; /* Preserve the errno. */ } tarantool-1.5.1.218.g1a69fd6/src/coio.cc0000664000000000000000000003327712231715276016031 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "coio.h" #include #include #include "fiber.h" #include "iobuf.h" #include "sio.h" #include "scoped_guard.h" static inline void fiber_schedule_coio(ev_io *watcher, int event) { return fiber_schedule((ev_watcher *) watcher, event); } /** Note: this function does not throw */ void coio_init(struct ev_io *coio) { /* Prepare for ev events. */ coio->data = fiber; ev_init(coio, fiber_schedule_coio); coio->fd = -1; } static inline void coio_fiber_yield(struct ev_io *coio) { coio->data = fiber; fiber_yield(); #ifdef DEBUG coio->data = NULL; #endif } static inline bool coio_fiber_yield_timeout(struct ev_io *coio, ev_tstamp delay) { coio->data = fiber; bool is_timedout = fiber_yield_timeout(delay); #ifdef DEBUG coio->data = NULL; #endif return is_timedout; } /** * Connect to a host. */ void coio_connect(struct ev_io *coio, struct sockaddr_in *addr) { coio_connect_timeout(coio, addr, sizeof(*addr), TIMEOUT_INFINITY); } /** * Connect to a host with a specified timeout. * @retval true timeout * @retval false connected */ bool coio_connect_timeout(struct ev_io *coio, struct sockaddr_in *addr, socklen_t len, ev_tstamp timeout) { if (sio_connect(coio->fd, addr, len) == 0) return false; assert(errno == EINPROGRESS); /* * Wait until socket is ready for writing or * timed out. */ ev_io_set(coio, coio->fd, EV_WRITE); ev_io_start(coio); bool is_timedout = coio_fiber_yield_timeout(coio, timeout); ev_io_stop(coio); fiber_testcancel(); if (is_timedout) { errno = ETIMEDOUT; return true; } int error = EINPROGRESS; socklen_t sz = sizeof(error); sio_getsockopt(coio->fd, SOL_SOCKET, SO_ERROR, &error, &sz); if (error != 0) { errno = error; tnt_raise(SocketError, coio->fd, "connect"); } return false; } /** * Connect to a first address in addrinfo list and initialize coio * with connected socket. * * If coio is already initialized, socket family, * type and protocol must match the remote address. * * @retval true timeout * @retval false sucess */ bool coio_connect_addrinfo(struct ev_io *coio, struct addrinfo *ai, ev_tstamp timeout) { ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); assert(! evio_is_active(coio)); bool res = true; while (ai) { struct sockaddr_in *addr = (struct sockaddr_in *)ai->ai_addr; try { evio_socket(coio, ai->ai_family, ai->ai_socktype, ai->ai_protocol); res = coio_connect_timeout(coio, addr, ai->ai_addrlen, delay); if (res) evio_close(coio); return res; } catch (const SocketError& e) { if (res) evio_close(coio); if (ai->ai_next == NULL) throw; ev_now_update(); evio_timeout_update(start, &delay); } ai = ai->ai_next; } /* unreachable. */ tnt_raise(SocketError, coio->fd, "connect_addrinfo()"); } /** * Wait a client connection on a server socket until * timedout. */ int coio_accept(struct ev_io *coio, struct sockaddr_in *addr, socklen_t addrlen, ev_tstamp timeout) { ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); while (true) { /* Assume that there are waiting clients * available */ int fd = sio_accept(coio->fd, addr, &addrlen); if (fd >= 0) { evio_setsockopt_tcp(fd); return fd; } /* The socket is not ready, yield */ if (! ev_is_active(coio)) { ev_io_set(coio, coio->fd, EV_READ); ev_io_start(coio); } /* * Yield control to other fibers until the * timeout is reached. */ bool is_timedout = coio_fiber_yield_timeout(coio, delay); fiber_testcancel(); if (is_timedout) { errno = ETIMEDOUT; tnt_raise(SocketError, coio->fd, "accept"); } evio_timeout_update(start, &delay); } } /** * Read at least sz bytes from socket with readahead. * * In case of EOF returns the amount read until eof (possibly 0), * and sets errno to 0. * Can read up to bufsiz bytes. * * @retval the number of bytes read, sets the errno to ETIMEDOUT or 0. */ ssize_t coio_read_ahead_timeout(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz, ev_tstamp timeout) { assert(sz <= bufsiz); ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); ssize_t to_read = (ssize_t) sz; { auto scoped_guard = make_scoped_guard([=] { ev_io_stop(coio); }); while (true) { /* * Sic: assume the socket is ready: since * the user called read(), some data must * be expected. */ ssize_t nrd = sio_read(coio->fd, buf, bufsiz); if (nrd > 0) { to_read -= nrd; if (to_read <= 0) return sz - to_read; buf = (char *) buf + nrd; bufsiz -= nrd; } else if (nrd == 0) { errno = 0; return sz - to_read; } /* The socket is not ready, yield */ if (! ev_is_active(coio)) { ev_io_set(coio, coio->fd, EV_READ); ev_io_start(coio); } /* * Yield control to other fibers until the * timeout is being reached. */ bool is_timedout = coio_fiber_yield_timeout(coio, delay); fiber_testcancel(); if (is_timedout) { errno = ETIMEDOUT; return sz - to_read; } evio_timeout_update(start, &delay); } } } /** * Read at least sz bytes, with readahead. * * Treats EOF as an error, and throws an exception. * * @retval the number of bytes read, > 0. */ ssize_t coio_readn_ahead(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz) { ssize_t nrd = coio_read_ahead(coio, buf, sz, bufsiz); if (nrd < sz) { errno = EPIPE; tnt_raise(SocketError, coio->fd, "unexpected EOF when reading " "from socket"); } return nrd; } /** * Read at least sz bytes, with readahead and timeout. * * Treats EOF as an error, and throws an exception. * * @retval the number of bytes read, > 0. */ ssize_t coio_readn_ahead_timeout(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz, ev_tstamp timeout) { ssize_t nrd = coio_read_ahead_timeout(coio, buf, sz, bufsiz, timeout); if (nrd < sz && errno == 0) { /* EOF. */ errno = EPIPE; tnt_raise(SocketError, coio->fd, "unexpected EOF when reading " "from socket"); } return nrd; } /** Write sz bytes to socket. * * Throws SocketError in case of write error. If * the socket is not ready, yields the current * fiber until the socket becomes ready, until * all data is written. * * @retval the number of bytes written. Can be less than * requested only in case of timeout. */ ssize_t coio_write_timeout(struct ev_io *coio, const void *buf, size_t sz, ev_tstamp timeout) { size_t towrite = sz; ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); { auto scoped_guard = make_scoped_guard([=] { ev_io_stop(coio); }); while (true) { /* * Sic: write as much data as possible, * assuming the socket is ready. */ ssize_t nwr = sio_write(coio->fd, buf, towrite); if (nwr > 0) { /* Go past the data just written. */ if (nwr >= towrite) return sz; towrite -= nwr; buf = (char *) buf + nwr; } if (! ev_is_active(coio)) { ev_io_set(coio, coio->fd, EV_WRITE); ev_io_start(coio); } /* Yield control to other fibers. */ fiber_testcancel(); /* * Yield control to other fibers until the * timeout is reached or the socket is * ready. */ bool is_timedout = coio_fiber_yield_timeout(coio, delay); fiber_testcancel(); if (is_timedout) { errno = ETIMEDOUT; return sz - towrite; } evio_timeout_update(start, &delay); } } } /* * Write iov using sio API. * Put in an own function to workaround gcc bug with @finally */ static inline ssize_t coio_flush(int fd, struct iovec *iov, ssize_t offset, int iovcnt) { ssize_t nwr; try { sio_add_to_iov(iov, -offset); nwr = sio_writev(fd, iov, iovcnt); sio_add_to_iov(iov, offset); } catch (const Exception& e) { sio_add_to_iov(iov, offset); throw; } return nwr; } ssize_t coio_writev(struct ev_io *coio, struct iovec *iov, int iovcnt, size_t size_hint) { ssize_t total = 0; size_t iov_len = 0; struct iovec *end = iov + iovcnt; { auto scoped_guard = make_scoped_guard([=] { ev_io_stop(coio); }); /* Avoid a syscall in case of 0 iovcnt. */ while (iov < end) { /* Write as much data as possible. */ ssize_t nwr = coio_flush(coio->fd, iov, iov_len, end - iov); if (nwr >= 0) { total += nwr; /* * If there was a hint for the total size * of the vector, use it. */ if (size_hint > 0 && size_hint == total) break; iov += sio_move_iov(iov, nwr, &iov_len); if (iov == end) { assert(iov_len == 0); break; } } if (! ev_is_active(coio)) { ev_io_set(coio, coio->fd, EV_WRITE); ev_io_start(coio); } /* Yield control to other fibers. */ coio_fiber_yield(coio); fiber_testcancel(); } } return total; } /** * Send up to sz bytes to a UDP socket. * Return the number of bytes sent. * * @retval 0, errno = ETIMEDOUT timeout * @retval n the number of bytes written */ ssize_t coio_sendto_timeout(struct ev_io *coio, const void *buf, size_t sz, int flags, const struct sockaddr_in *dest_addr, socklen_t addrlen, ev_tstamp timeout) { ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); { auto scoped_guard = make_scoped_guard([=] { ev_io_stop(coio); }); while (true) { /* * Sic: write as much data as possible, * assuming the socket is ready. */ ssize_t nwr = sio_sendto(coio->fd, buf, sz, flags, dest_addr, addrlen); if (nwr > 0) return nwr; if (! ev_is_active(coio)) { ev_io_set(coio, coio->fd, EV_WRITE); ev_io_start(coio); } /* * Yield control to other fibers until * timeout is reached or the socket is * ready. */ bool is_timedout = coio_fiber_yield_timeout(coio, delay); fiber_testcancel(); if (is_timedout) { errno = ETIMEDOUT; return 0; } evio_timeout_update(start, &delay); } } } /** * Read a datagram up to sz bytes from a socket, with a timeout. * * @retval 0, errno = 0 eof * @retval 0, errno = ETIMEDOUT timeout * @retvl n number of bytes read */ ssize_t coio_recvfrom_timeout(struct ev_io *coio, void *buf, size_t sz, int flags, struct sockaddr_in *src_addr, socklen_t addrlen, ev_tstamp timeout) { ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); { auto scoped_guard = make_scoped_guard([=] { ev_io_stop(coio); }); while (true) { /* * Read as much data as possible, * assuming the socket is ready. */ ssize_t nrd = sio_recvfrom(coio->fd, buf, sz, flags, src_addr, &addrlen); if (nrd >= 0) return nrd; if (! ev_is_active(coio)) { ev_io_set(coio, coio->fd, EV_READ); ev_io_start(coio); } /* * Yield control to other fibers until * timeout is reached or the socket is * ready. */ bool is_timedout = coio_fiber_yield_timeout(coio, delay); fiber_testcancel(); if (is_timedout) { errno = ETIMEDOUT; return 0; } evio_timeout_update(start, &delay); } } } void coio_service_on_accept(struct evio_service *evio_service, int fd, struct sockaddr_in *addr) { struct coio_service *service = (struct coio_service *) evio_service->on_accept_param; struct ev_io coio; coio_init(&coio); coio.fd = fd; /* Set connection name. */ char fiber_name[SERVICE_NAME_MAXLEN]; char iobuf_name[SERVICE_NAME_MAXLEN]; snprintf(fiber_name, sizeof(fiber_name), "%s/%s", evio_service->name, sio_strfaddr(addr)); snprintf(iobuf_name, sizeof(iobuf_name), "%s/%s", "iobuf", sio_strfaddr(addr)); /* Create the worker fiber. */ struct iobuf *iobuf = NULL; struct fiber *f; try { iobuf = iobuf_new(iobuf_name); f = fiber_new(fiber_name, service->handler); } catch (const Exception& e) { say_error("can't create a handler fiber, dropping client connection"); evio_close(&coio); if (iobuf) iobuf_delete(iobuf); throw; } /* * The coio is passed into the created fiber, reset the * libev callback param to point at it. */ coio.data = f; /* * Start the created fiber. It becomes the coio object owner * and will have to close it and free before termination. */ fiber_call(f, coio, addr, iobuf, service->handler_param); } void coio_service_init(struct coio_service *service, const char *name, const char *host, int port, void (*handler)(va_list ap), void *handler_param) { evio_service_init(&service->evio_service, name, host, port, coio_service_on_accept, service); service->handler = handler; service->handler_param = handler_param; } tarantool-1.5.1.218.g1a69fd6/src/session.cc0000664000000000000000000000627512231715276016561 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "session.h" #include "fiber.h" #include "assoc.h" #include "exception.h" #include uint32_t sid_max; static struct mh_i32ptr_t *session_registry; struct session_trigger session_on_connect; struct session_trigger session_on_disconnect; uint32_t session_create(int fd, uint64_t cookie) { /* Return the next sid rolling over the reserved value of 0. */ while (++sid_max == 0) ; uint32_t sid = sid_max; struct mh_i32ptr_node_t node; node.key = sid; node.val = (void *) (intptr_t) fd; mh_int_t k = mh_i32ptr_put(session_registry, &node, NULL, NULL); if (k == mh_end(session_registry)) { tnt_raise(ClientError, ER_MEMORY_ISSUE, "session hash", "new session"); } /* * Run the trigger *after* setting the current * fiber sid. */ fiber_set_sid(fiber, sid, cookie); if (session_on_connect.trigger) { void *param = session_on_connect.param; try { session_on_connect.trigger(param); } catch (const Exception& e) { fiber_set_sid(fiber, 0, 0); mh_i32ptr_remove(session_registry, &node, NULL); throw; } } return sid; } void session_destroy(uint32_t sid) { if (sid == 0) /* no-op for a dead session. */ return; if (session_on_disconnect.trigger) { void *param = session_on_disconnect.param; try { session_on_disconnect.trigger(param); } catch (const Exception& e) { e.log(); } catch (...) { /* catch all. */ } } struct mh_i32ptr_node_t node = { sid, NULL }; mh_i32ptr_remove(session_registry, &node, NULL); } int session_fd(uint32_t sid) { struct mh_i32ptr_node_t node = { sid, NULL }; mh_int_t k = mh_i32ptr_get(session_registry, &node, NULL); return k == mh_end(session_registry) ? -1 : (intptr_t) mh_i32ptr_node(session_registry, k)->val; } void session_init() { session_registry = mh_i32ptr_new(); if (session_registry == NULL) panic("out of memory"); } void session_free() { if (session_registry) mh_i32ptr_delete(session_registry); } tarantool-1.5.1.218.g1a69fd6/src/evio.cc0000664000000000000000000002144512212057124016022 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "evio.h" #include #include #include #include #if EV_MULTIPLICITY #error libev with enabled EV_MULTIPLICITY is not supported yet #endif #define BIND_RETRY_DELAY 0.1 /** * Try to convert IPv4 or IPv6 addresses from text to binary form. * sa buf must be sizeo of sizeof(sockaddr_in6). */ int evio_pton(const char *addr, const char *port, struct sockaddr_storage *sa, socklen_t *salen) { struct sockaddr_in *v4 = (struct sockaddr_in*)sa; int rc = inet_pton(AF_INET, addr, &v4->sin_addr); if (rc) { v4->sin_family = AF_INET; v4->sin_port = htons(atoi(port)); *salen = sizeof(struct sockaddr_in); return AF_INET; } struct sockaddr_in6 *v6 = (struct sockaddr_in6*)sa; rc = inet_pton(AF_INET6, addr, &v6->sin6_addr); if (rc) { v6->sin6_family = AF_INET6; v6->sin6_port = htons(atoi(port)); *salen = sizeof(struct sockaddr_in6); return AF_INET6; } return -1; } /** Note: this function does not throw. */ void evio_close(struct ev_io *evio) { /* Stop I/O events. Safe to do even if not started. */ ev_io_stop(evio); /* Close the socket. */ close(evio->fd); /* Make sure evio_is_active() returns a proper value. */ evio->fd = -1; } /** * Create an endpoint for communication. * Set socket as non-block and apply protocol specific options. */ void evio_socket(struct ev_io *coio, int domain, int type, int protocol) { assert(coio->fd == -1); /* Don't leak fd if setsockopt fails. */ coio->fd = sio_socket(domain, type, protocol); if (type == SOCK_STREAM) { evio_setsockopt_tcp(coio->fd); } else { sio_setfl(coio->fd, O_NONBLOCK, 1); } } /** Set common tcp socket client options. */ void evio_setsockopt_tcp(int fd) { int on = 1; /* In case this throws, the socket is not leaked. */ sio_setfl(fd, O_NONBLOCK, on); /* SO_KEEPALIVE to ensure connections don't hang * around for too long when a link goes away. */ sio_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)); /* * Lower latency is more important than higher * bandwidth, and we usually write entire * request/response in a single syscall. */ sio_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); } /** Set tcp options for server sockets. */ void evio_setsockopt_tcpserver(int fd) { int on = 1; /* In case this throws, the socket is not leaked. */ sio_setfl(fd, O_NONBLOCK, on); /* Allow reuse local adresses. */ sio_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); sio_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)); /* Send all buffered messages on socket before take * control out from close(2) or shutdown(2). */ struct linger linger = { 0, 0 }; sio_setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); } /** * Bind to a first address in addrinfo list and initialize coio * with bound socket. */ void evio_bind_addrinfo(struct ev_io *evio, struct addrinfo *ai) { assert(! evio_is_active(evio)); int fd = -1; while (ai) { struct sockaddr_in *addr = (struct sockaddr_in *)ai->ai_addr; try { fd = sio_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); evio_setsockopt_tcpserver(fd); if (sio_bind(fd, addr, ai->ai_addrlen) == 0) { evio->fd = fd; return; /* success. */ } assert(errno == EADDRINUSE); } catch (const SocketError& e) { if (ai->ai_next == NULL) { close(fd); throw; } } close(fd); ai = ai->ai_next; } tnt_raise(SocketError, evio->fd, "evio_bind_addrinfo()"); } static inline int evio_service_port(struct evio_service *service) { return ntohs(service->addr.sin_port); } static inline const char * evio_service_name(struct evio_service *service) { return service->name; } /** * A callback invoked by libev when acceptor socket is ready. * Accept the socket, initialize it and pass to the on_accept * callback. */ static void evio_service_accept_cb(ev_io *watcher, int revents __attribute__((unused))) { struct evio_service *service = (struct evio_service *) watcher->data; int fd = -1; try { struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); fd = sio_accept(service->ev.fd, &addr, &addrlen); if (fd < 0) /* EAGAIN, EWOULDLOCK, EINTR */ return; /* set common tcp options */ evio_setsockopt_tcp(fd); /* * Invoke the callback and pass it the accepted * socket. */ service->on_accept(service, fd, &addr); } catch (const Exception& e) { if (fd >= 0) close(fd); e.log(); } } /** Try to bind and listen on the configured port. * * Throws an exception if error. * Returns -1 if the address is already in use, and one * needs to retry binding. */ static int evio_service_bind_and_listen(struct evio_service *service) { /* Create a socket. */ int fd = sio_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); try { evio_setsockopt_tcpserver(fd); if (sio_bind(fd, &service->addr, sizeof(service->addr)) || sio_listen(fd)) { assert(errno == EADDRINUSE); close(fd); return -1; } say_info("bound to %s port %i", evio_service_name(service), evio_service_port(service)); /* Invoke on_bind callback if it is set. */ if (service->on_bind) service->on_bind(service->on_bind_param); } catch (const Exception& e) { close(fd); throw; } /* Register the socket in the event loop. */ ev_io_set(&service->ev, fd, EV_READ); ev_io_start(&service->ev); return 0; } /** A callback invoked by libev when sleep timer expires. * * Retry binding. On success, stop the timer. If the port * is still in use, pause again. */ static void evio_service_timer_cb(ev_timer *watcher, int revents __attribute__((unused))) { struct evio_service *service = (struct evio_service *) watcher->data; assert(! ev_is_active(&service->ev)); if (evio_service_bind_and_listen(service) == 0) ev_timer_stop(watcher); } void evio_service_init(struct evio_service *service, const char *name, const char *host, int port, void (*on_accept)(struct evio_service *, int, struct sockaddr_in *), void *on_accept_param) { memset(service, 0, sizeof(struct evio_service)); snprintf(service->name, sizeof(service->name), "%s", name); service->addr.sin_family = AF_INET; service->addr.sin_port = htons(port); if (strcmp(host, "INADDR_ANY") == 0) { service->addr.sin_addr.s_addr = INADDR_ANY; } else if (inet_aton(host, &service->addr.sin_addr) == 0) { tnt_raise(SocketError, -1, "invalid address for bind: %s", host); } service->on_accept = on_accept; service->on_accept_param = on_accept_param; /* * Initialize libev objects to be able to detect if they * are active or not in evio_service_stop(). */ ev_init(&service->ev, evio_service_accept_cb); ev_init(&service->timer, evio_service_timer_cb); service->timer.data = service->ev.data = service; } /** * Try to bind and listen. If the port is in use, * say a warning, and start the timer which will retry * binding periodically. */ void evio_service_start(struct evio_service *service) { assert(! ev_is_active(&service->ev)); if (evio_service_bind_and_listen(service)) { /* Try again after a delay. */ say_warn("%s port %i is already in use, will " "retry binding after %lf seconds.", evio_service_name(service), evio_service_port(service), BIND_RETRY_DELAY); ev_timer_set(&service->timer, BIND_RETRY_DELAY, BIND_RETRY_DELAY); ev_timer_start(&service->timer); } } /** It's safe to stop a service which is not started yet. */ void evio_service_stop(struct evio_service *service) { if (! ev_is_active(&service->ev)) { ev_timer_stop(&service->timer); } else { ev_io_stop(&service->ev); close(service->ev.fd); } } tarantool-1.5.1.218.g1a69fd6/src/rope.c0000664000000000000000000004430012202131537015655 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Copyright (c) 1993-1994 by Xerox Corporation. All rights reserved. * * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. * * Permission is hereby granted to use or copy this program * for any purpose, provided the above notices are retained on all copies. * Permission to modify the code and to distribute modified code is granted, * provided the above notices are retained, and a notice that the code was * modified is included with the above copyright notice. * * Author: Hans-J. Boehm (boehm@parc.xerox.com) */ /* * This is a rope implementation which uses AVL tree * balancing algorithm for rope tree balance. */ #include "rope.h" #include #include #include #include static inline int rope_node_height(struct rope_node *node) { return node ? node->height : 0; } #if !defined(MAX) #define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif /* MAX */ static inline void rope_relink(struct rope_node *node) { node->tree_size = (rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_size); node->height = MAX(rope_node_height(node->link[0]), rope_node_height(node->link[1])) + 1; } static inline struct rope_node * rope_node_new(struct rope *rope, void *data, rsize_t size) { struct rope_node *node = (struct rope_node *) rope->alloc(rope->alloc_ctx, sizeof(struct rope_node)); if (node == NULL) return NULL; node->height = 1; node->tree_size = node->leaf_size = size; node->data = data; node->link[0] = node->link[1] = NULL; return node; } void rope_clear(struct rope *rope) { struct rope_node *it = rope->root; struct rope_node *save; /* Destruction by rotation */ while (it != NULL) { if (it->link[0] == NULL) { /* Remove node */ save = it->link[1]; rope->free(rope->alloc_ctx, it); } else { /* Rotate right */ save = it->link[0]; it->link[0] = save->link[1]; save->link[1] = it; } it = save; } rope->root = NULL; } static struct rope_node * rope_node_split(struct rope *rope, struct rope_node *node, rsize_t offset) { rsize_t old_size = node->leaf_size; node->leaf_size = offset; void *data = rope->split(rope->split_ctx, node->data, old_size, offset); return rope_node_new(rope, data, old_size - offset); } static inline struct rope_node * avl_rotate_single(struct rope_node *parent, int direction) { struct rope_node *save = parent->link[!direction]; parent->link[!direction] = save->link[direction]; save->link[direction] = parent; /* First relink the parent, since it's now a child. */ rope_relink(parent); rope_relink(save); return save; } static inline struct rope_node * avl_rotate_double(struct rope_node *parent, int direction) { parent->link[!direction] = avl_rotate_single(parent->link[!direction], !direction); return avl_rotate_single(parent, direction); } /** Rebalance the tree. */ static inline void avl_rebalance_after_insert(struct rope_node ***path, struct rope_node ***p_end, int insert_height) { while (p_end > path) { struct rope_node *left = **p_end--; struct rope_node *parent = **p_end; /* * To use the same rotation functions, set mirror * to 1 if left is right and right is left. */ int mirror = left != parent->link[0]; struct rope_node *right = parent->link[!mirror]; int left_height = rope_node_height(left); int right_height = rope_node_height(right); parent->height = MAX(left_height, right_height) + 1; /* * Rotations flattened the tree, so there is no * further changes in height up the insertion * path. */ if (left_height == right_height) break; /* * We've been adding a new child (children) to the * 'left' subtree, so it couldn't get shorter. * The old difference between subtrees was in the * range -1..1. So the new difference can only be * in the range -1..1 + height(new_node). */ if (left_height - right_height >= 2) { struct rope_node *l_left = left->link[mirror]; struct rope_node *l_right = left->link[!mirror]; int l_left_height = rope_node_height(l_left); int l_right_height = rope_node_height(l_right); /* * Rotate in the direction, opposite to * the skew. E.g. if we have two left-left * nodes hanging off the tree, rotate the * parent clockwise. If we have a left * node with a right child, rotate the * child counterclockwise, and then the whole * thing clockwise. */ if (l_left_height >= l_right_height) **p_end = avl_rotate_single(parent, !mirror); else **p_end = avl_rotate_double(parent, !mirror); /* * If we inserted only one node, no more * than 1 rotation is required (see * D. Knuth, Introduction to Algorithms, * vol. 3.). For 2 nodes, its max * 2 rotations. */ if (l_left_height != l_right_height && --insert_height == 0) break; } } } /* This is a copy-cat of the previous loop, * with the exception that the heuristic to break * the loop is different. */ static inline void avl_rebalance_after_delete(struct rope_node ***path, struct rope_node ***p_end) { while (p_end > path) { struct rope_node *left = **p_end--; struct rope_node *parent = **p_end; int mirror = left != parent->link[0]; struct rope_node *right = parent->link[!mirror]; int left_height = rope_node_height(left); int right_height = rope_node_height(right); parent->height = MAX(left_height, right_height) + 1; /* * Right was taller, and we deleted from the left. * We can break the loop since there can be no * changes in height up in the route. */ if (left_height - right_height == -1) break; if (left_height - right_height <= -2) { struct rope_node *r_left = right->link[mirror]; struct rope_node *r_right = right->link[!mirror]; int r_left_height = rope_node_height(r_left); int r_right_height = rope_node_height(r_right); if (r_left_height <= r_right_height) **p_end = avl_rotate_single(parent, mirror); else **p_end = avl_rotate_double(parent, mirror); } } } /** * Find a rope node which contains the substring at offset, * adjusting tree size with adjust_size and saving the path * in path. * * @return the end of the route. */ static inline struct rope_node *** avl_route_to_offset(struct rope_node ***path, rsize_t *p_offset, ssize_t adjust_size) { rsize_t offset = *p_offset; while (**path) { struct rope_node *node = **path; node->tree_size += adjust_size; rsize_t left_size = rope_node_size(node->link[0]); if (offset < left_size) { /* The offset lays in the left subtree. */ *++path = &node->link[0]; } else { /* Make the new offset relative to the parent. */ offset -= left_size; if (offset < node->leaf_size) { /* Found. */ break; } else { /* * Make the offset relative to the * leftmost node in the right subtree. */ offset -= node->leaf_size; } *++path = &node->link[1]; } } *p_offset = offset; return path; } /** * Route to successor or predecessor node of the node * in **path. It's either the rightmost leaf of the left child * (previous node) or leftmost leaf of the right child. */ static inline struct rope_node *** avl_route_to_next(struct rope_node ***path, int dir, rssize_t adjust_size) { struct rope_node *node = **path; *++path = &node->link[dir]; while (**path) { node = **path; node->tree_size += adjust_size; *++path = &node->link[!dir]; } return path; } /** * A new node is always inserted at a leaf position. * If insertion unbalances the tree, the rebalancing * procedure may put the node into an intermediate position. * * While traversing the tree, we simultaneously update * tree sizes of all intermediate nodes, taking into account * the size of the new node. * * When insertion offset falls at the middle of an existing node, * we truncate this node and attach its tail to the left leaf * of the new node. This trim operation doesn't decrease the old * subtree height, and, while it does change subtree size * temporarily, as long as we attach the new node to the right * subtree of the truncated node, truncation has no effect on the * tree size either. * * Rebalancing, when it occurs, will correctly update subtree * heights and sizes of all modified nodes. */ int rope_insert(struct rope *rope, rsize_t offset, void *data, rsize_t size) { if (offset > rope_size(rope)) offset = rope_size(rope); assert(size); struct rope_node *new_node = rope_node_new(rope, data, size); if (new_node == NULL) return -1; struct rope_node **path[ROPE_HEIGHT_MAX]; path[0] = &rope->root; struct rope_node ***p_end = avl_route_to_offset(path, &offset, size); if (**p_end != NULL) { /* * The offset is inside an existing * substring in the rope. If offset is 0, * then insert the new node at the rightmost leaf * of the left child. Otherwise, cut the tail of * the substring, make it a prefix of the inserted * string, and insert the result at the leftmost * leaf of the right child. */ if (offset != 0) { struct rope_node *split_node; split_node = rope_node_split(rope, **p_end, offset); if (split_node == NULL) return -1; split_node->link[0] = new_node; split_node->height++; split_node->tree_size += new_node->tree_size; new_node = split_node; } p_end = avl_route_to_next(p_end, offset != 0, new_node->tree_size); } **p_end = new_node; avl_rebalance_after_insert(path, p_end, new_node->height); return 0; } /** Make sure there is a rope node at the given offset. */ struct rope_node * rope_extract_node(struct rope *rope, rsize_t offset) { assert(offset < rope_size(rope)); struct rope_node **path[ROPE_HEIGHT_MAX]; path[0] = &rope->root; struct rope_node ***p_end = avl_route_to_offset(path, &offset, 0); if (offset == 0) return **p_end; struct rope_node *new_node = rope_node_split(rope, **p_end, offset); if (new_node == NULL) return NULL; p_end = avl_route_to_next(p_end, 1, new_node->tree_size); **p_end = new_node; avl_rebalance_after_insert(path, p_end, new_node->height); return new_node; } /** * Erase a single element from the rope. * This is a straightforward implementation for a single-element * deletion from a rope. A generic cut from a rope involves * 2 tree splits and one merge. * * When deleting a single element, 3 cases are possible: * - offset falls at a node with a single element. In this * case we perform a normal AVL tree delete. * - offset falls at the end or the beginning of an existing node * with leaf_size > 1. In that case we trim the existing node * and return. * - offset falls inside an existing node. In that case * we split the existing node at offset, and insert the tail. * * The implementation is a copycat of rope_insert(). If you're * trying to understand the code, it's recommended to start * from rope_insert(). */ int rope_erase(struct rope *rope, rsize_t offset) { assert(offset < rope_size(rope)); struct rope_node **path[ROPE_HEIGHT_MAX]; path[0] = &rope->root; struct rope_node ***p_end = avl_route_to_offset(path, &offset, -1); struct rope_node *node = **p_end; if (node->leaf_size > 1) { /* Check if we can simply trim the node. */ if (offset == 0) { /* Cut the head. */ node->data = rope->split(rope->split_ctx, node->data, node->leaf_size, 1); node->leaf_size -= 1; return 0; } rsize_t size = node->leaf_size; /* Cut the tail */ void *next = rope->split(rope->split_ctx, node->data, node->leaf_size, offset); node->leaf_size = offset; if (offset == size - 1) return 0; /* Trimmed the tail, nothing else to do */ /* * Offset falls inside a substring. Erase the * first field and insert the tail. */ next = rope->split(rope->split_ctx, next, size - offset, 1); struct rope_node *new_node = rope_node_new(rope, next, size - offset - 1); if (new_node == NULL) return -1; /* Trim the old node. */ p_end = avl_route_to_next(p_end, 1, new_node->tree_size); **p_end = new_node; avl_rebalance_after_insert(path, p_end, new_node->height); return 0; } /* We need to delete the node. */ assert(offset == 0); int direction; if (node->link[0] != NULL && node->link[1] != NULL) { /* * The node has two non-NULL leaves. We can't * simply delete the node since in that case we * won't know what to do with one of the leaves. * Instead of deleting the node, store in it data * from the rightmost node in the left subtree, or * the leftmost node in the right subtree, * (depending on which subtree is taller), and * delete this leftmost/rightmost node instead. */ struct rope_node *save = node; direction = node->link[1]->height > node->link[0]->height; p_end = avl_route_to_next(p_end, direction, 0) - 1; node = **p_end; /* Move the data pointers. */ save->data = node->data; save->leaf_size = node->leaf_size; /* * Now follow the path again and update tree_size * in the parents of the moved child. */ save = save->link[direction]; while (save != node) { save->tree_size -= node->leaf_size; save = save->link[!direction]; } } else { /* * Left or right subtree are NULL, so we * can simply put the non-NULL leaf in place * of the parent. */ direction = node->link[0] == NULL; } **p_end = node->link[direction]; rope->free(rope, node); avl_rebalance_after_delete(path, p_end); return 0; } /** * Traverse left until the left subtree is NULL, * save the path in iter->path. * @pre iter->path[iter->top] is not NULL * @post iter->path[iter->top] is not NULL and points to the last * not-NULL node. */ static inline void rope_iter_down_to_leaf(struct rope_iter *it) { while (it->top[0]->link[0] != NULL) { it->top[1] = it->top[0]->link[0]; it->top++; } } struct rope_node * rope_iter_start(struct rope_iter *it) { it->top = it->path; it->top[0] = it->rope->root; if (it->top[0] != NULL) rope_iter_down_to_leaf(it); return it->top[0]; } struct rope_node * rope_iter_next(struct rope_iter *it) { if (it->top[0]->link[1] != NULL) { it->top[1] = it->top[0]->link[1]; it->top++; rope_iter_down_to_leaf(it); } else { /* * Right subtree is NULL. Left subtree is fully * traversed (guaranteed by the order in which we * iterate). Pop up the path until the current * node points to a link we haven't visited * yet: this is the case when we return to the * parent from its left child. */ do { /* * Returned to the root from the right * subtree: the tree is fully traversed. */ if (it->top == it->path) { /* * Crash, rather than infinite loop * if next() is called beyond last. */ it->top[0] = NULL; return NULL; } it->top--; } while (it->top[1] == it->top[0]->link[1]); } return *it->top; } /** Apply visit_leaf function to every rope leaf. */ void rope_traverse(struct rope *rope, void (*visit_leaf)(void *, size_t)) { struct rope_iter iter; rope_iter_create(&iter, rope); struct rope_node *leaf; for (leaf = rope_iter_start(&iter); leaf != NULL; leaf = rope_iter_next(&iter)) { visit_leaf(leaf->data, leaf->leaf_size); } } void rope_check(struct rope *rope) { struct rope_iter iter; rope_iter_create(&iter, rope); struct rope_node *node; for (node = rope_iter_start(&iter); node != NULL; node = rope_iter_next(&iter)) { assert(node->leaf_size != 0); assert(node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_size); assert(node->height == (MAX(rope_node_height(node->link[0]), rope_node_height(node->link[1])) + 1)); if (node->leaf_size == 0 || node->tree_size != (rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_size) || node->height != MAX(rope_node_height(node->link[0]), rope_node_height(node->link[1])) + 1) abort(); } } static void rope_node_print(struct rope_node *node, void (*print)(void *, size_t), const char *prefix, int dir) { const char *conn[] = { "┌──", "└──" }; const char *padding[] = { "│ ", " " }; rsize_t child_prefix_len = strlen(prefix) + strlen(padding[0]) + 1; char *child_prefix = malloc(child_prefix_len); if (node && (node->link[0] || node->link[1])) { snprintf(child_prefix, child_prefix_len - 1, "%s%s", prefix, padding[!dir]); rope_node_print(node->link[0], print, child_prefix, 0); } snprintf(child_prefix, child_prefix_len - 1, "%s%s", prefix, padding[dir]); printf("%s%s", prefix, conn[dir]); if (node == NULL) { printf("nil\n"); } else { printf("{ len = %zu, height = %d, data = '", (size_t) node->leaf_size, node->height); print(node->data, node->leaf_size); printf("'}\n"); if (node && (node->link[0] || node->link[1])) rope_node_print(node->link[1], print, child_prefix, 1); } free(child_prefix); } void rope_pretty_print(struct rope *rope, void (*print_leaf)(void *, size_t)) { printf("size = %zu\nstring = '", (size_t) rope_size(rope)); rope_traverse(rope, print_leaf); printf("'\n"); rope_node_print(rope->root, print_leaf, "", true); printf("\n"); } tarantool-1.5.1.218.g1a69fd6/src/memcached-grammar.cc0000664000000000000000000021747512232453114020425 0ustar rootroot #line 1 "src/memcached-grammar.rl" /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #line 34 "src/memcached-grammar.cc" static const int memcached_start = 1; static const int memcached_first_final = 197; static const int memcached_error = 0; static const int memcached_en_main = 1; #line 33 "src/memcached-grammar.rl" static int __attribute__((noinline)) memcached_dispatch(struct ev_io *coio, struct iobuf *iobuf) { int cs; char *p, *pe; char *fstart; struct tbuf *keys = tbuf_new(fiber->gc_pool); const char *key; bool append, show_cas; int incr_sign; uint64_t cas, incr; uint32_t flags, exptime, bytes; bool noreply = false; char *data = NULL; bool done = false; uintptr_t flush_delay = 0; size_t keys_count = 0; struct ibuf *in = &iobuf->in; struct obuf *out = &iobuf->out; /* Savepoint for 'noreply' */ struct obuf_svp obuf_svp = obuf_create_svp(out); p = in->pos; pe = in->end; say_debug("memcached_dispatch '%.*s'", MIN((int)(pe - p), 40) , p); #line 73 "src/memcached-grammar.cc" { cs = memcached_start; } #line 78 "src/memcached-grammar.cc" { if ( p == pe ) goto _test_eof; switch ( cs ) { case 1: switch( (*p) ) { case 65: goto st2; case 67: goto st44; case 68: goto st67; case 70: goto st103; case 71: goto st124; case 73: goto st132; case 80: goto st136; case 81: goto st143; case 82: goto st148; case 83: goto st172; case 97: goto st2; case 99: goto st44; case 100: goto st67; case 102: goto st103; case 103: goto st124; case 105: goto st132; case 112: goto st136; case 113: goto st143; case 114: goto st148; case 115: goto st172; } goto st0; st0: cs = 0; goto _out; st2: if ( ++p == pe ) goto _test_eof2; case 2: switch( (*p) ) { case 68: goto st3; case 80: goto st22; case 100: goto st3; case 112: goto st22; } goto st0; st3: if ( ++p == pe ) goto _test_eof3; case 3: switch( (*p) ) { case 68: goto st4; case 100: goto st4; } goto st0; st4: if ( ++p == pe ) goto _test_eof4; case 4: if ( (*p) == 32 ) goto st5; goto st0; st5: if ( ++p == pe ) goto _test_eof5; case 5: switch( (*p) ) { case 13: goto st0; case 32: goto st5; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr15; tr15: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st6; st6: if ( ++p == pe ) goto _test_eof6; case 6: #line 166 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st7; goto st0; st7: if ( ++p == pe ) goto _test_eof7; case 7: if ( (*p) == 32 ) goto st7; if ( 48 <= (*p) && (*p) <= 57 ) goto tr17; goto st0; tr17: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st8; st8: if ( ++p == pe ) goto _test_eof8; case 8: #line 187 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr18; if ( 48 <= (*p) && (*p) <= 57 ) goto st8; goto st0; tr18: #line 244 "src/memcached-grammar.rl" {flags = memcached_natoq(fstart, p);} goto st9; st9: if ( ++p == pe ) goto _test_eof9; case 9: #line 201 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st9; if ( 48 <= (*p) && (*p) <= 57 ) goto tr21; goto st0; tr21: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st10; st10: if ( ++p == pe ) goto _test_eof10; case 10: #line 215 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr22; if ( 48 <= (*p) && (*p) <= 57 ) goto st10; goto st0; tr22: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } goto st11; st11: if ( ++p == pe ) goto _test_eof11; case 11: #line 233 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st11; if ( 48 <= (*p) && (*p) <= 57 ) goto tr25; goto st0; tr25: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st12; st12: if ( ++p == pe ) goto _test_eof12; case 12: #line 247 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr26; case 13: goto tr27; case 32: goto tr28; } if ( 48 <= (*p) && (*p) <= 57 ) goto st12; goto st0; tr26: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 68 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple != NULL && !memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } goto st197; tr30: #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 68 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple != NULL && !memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } goto st197; tr39: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 68 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple != NULL && !memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } goto st197; tr58: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 97 "src/memcached-grammar.rl" { struct tbuf *b; const char *field; uint32_t field_len; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL) { obuf_dup(out, "NOT_STORED\r\n", 12); } else { field = tuple_field(tuple, 3, &field_len); b = tbuf_new(fiber->gc_pool); if (append) { tbuf_append(b, field, field_len); tbuf_append(b, data, bytes); } else { tbuf_append(b, data, bytes); tbuf_append(b, field, field_len); } bytes += field_len; data = b->data; STORE; } } goto st197; tr62: #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 97 "src/memcached-grammar.rl" { struct tbuf *b; const char *field; uint32_t field_len; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL) { obuf_dup(out, "NOT_STORED\r\n", 12); } else { field = tuple_field(tuple, 3, &field_len); b = tbuf_new(fiber->gc_pool); if (append) { tbuf_append(b, field, field_len); tbuf_append(b, data, bytes); } else { tbuf_append(b, data, bytes); tbuf_append(b, field, field_len); } bytes += field_len; data = b->data; STORE; } } goto st197; tr71: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 97 "src/memcached-grammar.rl" { struct tbuf *b; const char *field; uint32_t field_len; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL) { obuf_dup(out, "NOT_STORED\r\n", 12); } else { field = tuple_field(tuple, 3, &field_len); b = tbuf_new(fiber->gc_pool); if (append) { tbuf_append(b, field, field_len); tbuf_append(b, data, bytes); } else { tbuf_append(b, data, bytes); tbuf_append(b, field, field_len); } bytes += field_len; data = b->data; STORE; } } goto st197; tr91: #line 246 "src/memcached-grammar.rl" {cas = memcached_natoq(fstart, p);} #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 86 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_FOUND\r\n", 11); else if (memcached_meta(tuple)->cas != cas) obuf_dup(out, "EXISTS\r\n", 8); else STORE; } goto st197; tr95: #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 86 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_FOUND\r\n", 11); else if (memcached_meta(tuple)->cas != cas) obuf_dup(out, "EXISTS\r\n", 8); else STORE; } goto st197; tr105: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 86 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_FOUND\r\n", 11); else if (memcached_meta(tuple)->cas != cas) obuf_dup(out, "EXISTS\r\n", 8); else STORE; } goto st197; tr118: #line 247 "src/memcached-grammar.rl" {incr = memcached_natoq(fstart, p);} #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 123 "src/memcached-grammar.rl" { struct meta *m; struct tbuf *b; const char *field; uint32_t field_len; uint64_t value; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { m = memcached_meta(tuple); field = tuple_field(tuple, 3, &field_len); if (memcached_is_numeric(field, field_len)) { value = memcached_natoq(field, field + field_len); if (incr_sign > 0) { value += incr; } else { if (incr > value) value = 0; else value -= incr; } exptime = m->exptime; flags = m->flags; b = tbuf_new(fiber->gc_pool); tbuf_printf(b, "%" PRIu64, value); data = b->data; bytes = b->size; stats.cmd_set++; try { memcached_store(key, exptime, flags, bytes, data); stats.total_items++; obuf_dup(out, b->data, b->size); obuf_dup(out, "\r\n", 2); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } else { obuf_dup(out, "CLIENT_ERROR cannot increment or decrement non-numeric value\r\n", 62); } } } goto st197; tr122: #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 123 "src/memcached-grammar.rl" { struct meta *m; struct tbuf *b; const char *field; uint32_t field_len; uint64_t value; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { m = memcached_meta(tuple); field = tuple_field(tuple, 3, &field_len); if (memcached_is_numeric(field, field_len)) { value = memcached_natoq(field, field + field_len); if (incr_sign > 0) { value += incr; } else { if (incr > value) value = 0; else value -= incr; } exptime = m->exptime; flags = m->flags; b = tbuf_new(fiber->gc_pool); tbuf_printf(b, "%" PRIu64, value); data = b->data; bytes = b->size; stats.cmd_set++; try { memcached_store(key, exptime, flags, bytes, data); stats.total_items++; obuf_dup(out, b->data, b->size); obuf_dup(out, "\r\n", 2); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } else { obuf_dup(out, "CLIENT_ERROR cannot increment or decrement non-numeric value\r\n", 62); } } } goto st197; tr132: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 123 "src/memcached-grammar.rl" { struct meta *m; struct tbuf *b; const char *field; uint32_t field_len; uint64_t value; key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { m = memcached_meta(tuple); field = tuple_field(tuple, 3, &field_len); if (memcached_is_numeric(field, field_len)) { value = memcached_natoq(field, field + field_len); if (incr_sign > 0) { value += incr; } else { if (incr > value) value = 0; else value -= incr; } exptime = m->exptime; flags = m->flags; b = tbuf_new(fiber->gc_pool); tbuf_printf(b, "%" PRIu64, value); data = b->data; bytes = b->size; stats.cmd_set++; try { memcached_store(key, exptime, flags, bytes, data); stats.total_items++; obuf_dup(out, b->data, b->size); obuf_dup(out, "\r\n", 2); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } else { obuf_dup(out, "CLIENT_ERROR cannot increment or decrement non-numeric value\r\n", 62); } } } goto st197; tr141: #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 177 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { try { memcached_delete(key); obuf_dup(out, "DELETED\r\n", 9); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } } goto st197; tr146: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 177 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { try { memcached_delete(key); obuf_dup(out, "DELETED\r\n", 9); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } } goto st197; tr157: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 177 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) { obuf_dup(out, "NOT_FOUND\r\n", 11); } else { try { memcached_delete(key); obuf_dup(out, "DELETED\r\n", 9); } catch (const ClientError& e) { obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } } goto st197; tr169: #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 206 "src/memcached-grammar.rl" { struct fiber *f = fiber_new("flush_all", memcached_flush_all); fiber_call(f, flush_delay); obuf_dup(out, "OK\r\n", 4); } goto st197; tr174: #line 248 "src/memcached-grammar.rl" {flush_delay = memcached_natoq(fstart, p);} #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 206 "src/memcached-grammar.rl" { struct fiber *f = fiber_new("flush_all", memcached_flush_all); fiber_call(f, flush_delay); obuf_dup(out, "OK\r\n", 4); } goto st197; tr185: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 206 "src/memcached-grammar.rl" { struct fiber *f = fiber_new("flush_all", memcached_flush_all); fiber_call(f, flush_delay); obuf_dup(out, "OK\r\n", 4); } goto st197; tr195: #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 195 "src/memcached-grammar.rl" { try { memcached_get(out, keys_count, keys, show_cas); } catch (const ClientError& e) { obuf_rollback_to_svp(out, &obuf_svp); obuf_dup(out, "SERVER_ERROR ", 13); obuf_dup(out, e.errmsg(), strlen(e.errmsg())); obuf_dup(out, "\r\n", 2); } } goto st197; tr213: #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 217 "src/memcached-grammar.rl" { return -1; } goto st197; tr233: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 77 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } goto st197; tr237: #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 77 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } goto st197; tr246: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 77 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); struct tuple *tuple = memcached_find(key); if (tuple == NULL || memcached_is_expired(tuple)) obuf_dup(out, "NOT_STORED\r\n", 12); else STORE; } goto st197; tr263: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 63 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); STORE; } goto st197; tr267: #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 63 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); STORE; } goto st197; tr276: #line 281 "src/memcached-grammar.rl" { noreply = true; } #line 279 "src/memcached-grammar.rl" { p++; } #line 250 "src/memcached-grammar.rl" { size_t parsed = p - in->pos; while (ibuf_size(in) - parsed < bytes + 2) { size_t to_read = bytes + 2 - (pe - p); if (coio_bread(coio, in, to_read) < to_read) return -1; /* premature EOF */ } /* * Buffered read may have reallocated the * buffer. */ p = in->pos + parsed; pe = in->end; data = p; if (strncmp((char *)(p + bytes), "\r\n", 2) == 0) { p += bytes + 2; } else { goto exit; } } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 63 "src/memcached-grammar.rl" { key = tbuf_read_field(keys); STORE; } goto st197; tr281: #line 279 "src/memcached-grammar.rl" { p++; } #line 273 "src/memcached-grammar.rl" { done = true; stats.bytes_read += p - in->pos; in->pos = p; } #line 213 "src/memcached-grammar.rl" { memcached_print_stats(out); } goto st197; st197: if ( ++p == pe ) goto _test_eof197; case 197: #line 1347 "src/memcached-grammar.cc" goto st0; tr27: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st13; tr40: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st13; st13: if ( ++p == pe ) goto _test_eof13; case 13: #line 1361 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr30; goto st0; tr28: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st14; st14: if ( ++p == pe ) goto _test_eof14; case 14: #line 1373 "src/memcached-grammar.cc" switch( (*p) ) { case 32: goto st14; case 78: goto st15; case 110: goto st15; } goto st0; st15: if ( ++p == pe ) goto _test_eof15; case 15: switch( (*p) ) { case 79: goto st16; case 111: goto st16; } goto st0; st16: if ( ++p == pe ) goto _test_eof16; case 16: switch( (*p) ) { case 82: goto st17; case 114: goto st17; } goto st0; st17: if ( ++p == pe ) goto _test_eof17; case 17: switch( (*p) ) { case 69: goto st18; case 101: goto st18; } goto st0; st18: if ( ++p == pe ) goto _test_eof18; case 18: switch( (*p) ) { case 80: goto st19; case 112: goto st19; } goto st0; st19: if ( ++p == pe ) goto _test_eof19; case 19: switch( (*p) ) { case 76: goto st20; case 108: goto st20; } goto st0; st20: if ( ++p == pe ) goto _test_eof20; case 20: switch( (*p) ) { case 89: goto st21; case 121: goto st21; } goto st0; st21: if ( ++p == pe ) goto _test_eof21; case 21: switch( (*p) ) { case 10: goto tr39; case 13: goto tr40; } goto st0; st22: if ( ++p == pe ) goto _test_eof22; case 22: switch( (*p) ) { case 80: goto st23; case 112: goto st23; } goto st0; st23: if ( ++p == pe ) goto _test_eof23; case 23: switch( (*p) ) { case 69: goto st24; case 101: goto st24; } goto st0; st24: if ( ++p == pe ) goto _test_eof24; case 24: switch( (*p) ) { case 78: goto st25; case 110: goto st25; } goto st0; st25: if ( ++p == pe ) goto _test_eof25; case 25: switch( (*p) ) { case 68: goto st26; case 100: goto st26; } goto st0; st26: if ( ++p == pe ) goto _test_eof26; case 26: if ( (*p) == 32 ) goto tr45; goto st0; tr45: #line 287 "src/memcached-grammar.rl" {append = true; } goto st27; tr209: #line 288 "src/memcached-grammar.rl" {append = false;} goto st27; st27: if ( ++p == pe ) goto _test_eof27; case 27: #line 1498 "src/memcached-grammar.cc" switch( (*p) ) { case 13: goto st0; case 32: goto st27; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr46; tr46: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st28; st28: if ( ++p == pe ) goto _test_eof28; case 28: #line 1523 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st29; goto st0; st29: if ( ++p == pe ) goto _test_eof29; case 29: if ( (*p) == 32 ) goto st29; if ( 48 <= (*p) && (*p) <= 57 ) goto tr49; goto st0; tr49: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st30; st30: if ( ++p == pe ) goto _test_eof30; case 30: #line 1544 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr50; if ( 48 <= (*p) && (*p) <= 57 ) goto st30; goto st0; tr50: #line 244 "src/memcached-grammar.rl" {flags = memcached_natoq(fstart, p);} goto st31; st31: if ( ++p == pe ) goto _test_eof31; case 31: #line 1558 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st31; if ( 48 <= (*p) && (*p) <= 57 ) goto tr53; goto st0; tr53: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st32; st32: if ( ++p == pe ) goto _test_eof32; case 32: #line 1572 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr54; if ( 48 <= (*p) && (*p) <= 57 ) goto st32; goto st0; tr54: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } goto st33; st33: if ( ++p == pe ) goto _test_eof33; case 33: #line 1590 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st33; if ( 48 <= (*p) && (*p) <= 57 ) goto tr57; goto st0; tr57: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st34; st34: if ( ++p == pe ) goto _test_eof34; case 34: #line 1604 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr58; case 13: goto tr59; case 32: goto tr60; } if ( 48 <= (*p) && (*p) <= 57 ) goto st34; goto st0; tr59: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st35; tr72: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st35; st35: if ( ++p == pe ) goto _test_eof35; case 35: #line 1625 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr62; goto st0; tr60: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st36; st36: if ( ++p == pe ) goto _test_eof36; case 36: #line 1637 "src/memcached-grammar.cc" switch( (*p) ) { case 32: goto st36; case 78: goto st37; case 110: goto st37; } goto st0; st37: if ( ++p == pe ) goto _test_eof37; case 37: switch( (*p) ) { case 79: goto st38; case 111: goto st38; } goto st0; st38: if ( ++p == pe ) goto _test_eof38; case 38: switch( (*p) ) { case 82: goto st39; case 114: goto st39; } goto st0; st39: if ( ++p == pe ) goto _test_eof39; case 39: switch( (*p) ) { case 69: goto st40; case 101: goto st40; } goto st0; st40: if ( ++p == pe ) goto _test_eof40; case 40: switch( (*p) ) { case 80: goto st41; case 112: goto st41; } goto st0; st41: if ( ++p == pe ) goto _test_eof41; case 41: switch( (*p) ) { case 76: goto st42; case 108: goto st42; } goto st0; st42: if ( ++p == pe ) goto _test_eof42; case 42: switch( (*p) ) { case 89: goto st43; case 121: goto st43; } goto st0; st43: if ( ++p == pe ) goto _test_eof43; case 43: switch( (*p) ) { case 10: goto tr71; case 13: goto tr72; } goto st0; st44: if ( ++p == pe ) goto _test_eof44; case 44: switch( (*p) ) { case 65: goto st45; case 97: goto st45; } goto st0; st45: if ( ++p == pe ) goto _test_eof45; case 45: switch( (*p) ) { case 83: goto st46; case 115: goto st46; } goto st0; st46: if ( ++p == pe ) goto _test_eof46; case 46: if ( (*p) == 32 ) goto st47; goto st0; st47: if ( ++p == pe ) goto _test_eof47; case 47: switch( (*p) ) { case 13: goto st0; case 32: goto st47; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr76; tr76: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st48; st48: if ( ++p == pe ) goto _test_eof48; case 48: #line 1760 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st49; goto st0; st49: if ( ++p == pe ) goto _test_eof49; case 49: if ( (*p) == 32 ) goto st49; if ( 48 <= (*p) && (*p) <= 57 ) goto tr78; goto st0; tr78: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st50; st50: if ( ++p == pe ) goto _test_eof50; case 50: #line 1781 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr79; if ( 48 <= (*p) && (*p) <= 57 ) goto st50; goto st0; tr79: #line 244 "src/memcached-grammar.rl" {flags = memcached_natoq(fstart, p);} goto st51; st51: if ( ++p == pe ) goto _test_eof51; case 51: #line 1795 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st51; if ( 48 <= (*p) && (*p) <= 57 ) goto tr82; goto st0; tr82: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st52; st52: if ( ++p == pe ) goto _test_eof52; case 52: #line 1809 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr83; if ( 48 <= (*p) && (*p) <= 57 ) goto st52; goto st0; tr83: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } goto st53; st53: if ( ++p == pe ) goto _test_eof53; case 53: #line 1827 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st53; if ( 48 <= (*p) && (*p) <= 57 ) goto tr86; goto st0; tr86: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st54; st54: if ( ++p == pe ) goto _test_eof54; case 54: #line 1841 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr87; if ( 48 <= (*p) && (*p) <= 57 ) goto st54; goto st0; tr87: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st55; st55: if ( ++p == pe ) goto _test_eof55; case 55: #line 1855 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st55; if ( 48 <= (*p) && (*p) <= 57 ) goto tr90; goto st0; tr90: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st56; st56: if ( ++p == pe ) goto _test_eof56; case 56: #line 1869 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr91; case 13: goto tr92; case 32: goto tr93; } if ( 48 <= (*p) && (*p) <= 57 ) goto st56; goto st0; tr106: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st57; tr92: #line 246 "src/memcached-grammar.rl" {cas = memcached_natoq(fstart, p);} goto st57; st57: if ( ++p == pe ) goto _test_eof57; case 57: #line 1890 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr95; goto st0; tr93: #line 246 "src/memcached-grammar.rl" {cas = memcached_natoq(fstart, p);} goto st58; st58: if ( ++p == pe ) goto _test_eof58; case 58: #line 1902 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr95; case 13: goto st57; case 32: goto st58; case 78: goto st59; case 110: goto st59; } goto st0; st59: if ( ++p == pe ) goto _test_eof59; case 59: switch( (*p) ) { case 79: goto st60; case 111: goto st60; } goto st0; st60: if ( ++p == pe ) goto _test_eof60; case 60: switch( (*p) ) { case 82: goto st61; case 114: goto st61; } goto st0; st61: if ( ++p == pe ) goto _test_eof61; case 61: switch( (*p) ) { case 69: goto st62; case 101: goto st62; } goto st0; st62: if ( ++p == pe ) goto _test_eof62; case 62: switch( (*p) ) { case 80: goto st63; case 112: goto st63; } goto st0; st63: if ( ++p == pe ) goto _test_eof63; case 63: switch( (*p) ) { case 76: goto st64; case 108: goto st64; } goto st0; st64: if ( ++p == pe ) goto _test_eof64; case 64: switch( (*p) ) { case 89: goto st65; case 121: goto st65; } goto st0; st65: if ( ++p == pe ) goto _test_eof65; case 65: switch( (*p) ) { case 10: goto tr105; case 13: goto tr106; case 32: goto tr107; } goto st0; tr107: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st66; st66: if ( ++p == pe ) goto _test_eof66; case 66: #line 1983 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr95; case 13: goto st57; case 32: goto st66; } goto st0; st67: if ( ++p == pe ) goto _test_eof67; case 67: switch( (*p) ) { case 69: goto st68; case 101: goto st68; } goto st0; st68: if ( ++p == pe ) goto _test_eof68; case 68: switch( (*p) ) { case 67: goto st69; case 76: goto st85; case 99: goto st69; case 108: goto st85; } goto st0; st69: if ( ++p == pe ) goto _test_eof69; case 69: switch( (*p) ) { case 82: goto st70; case 114: goto st70; } goto st0; st70: if ( ++p == pe ) goto _test_eof70; case 70: if ( (*p) == 32 ) goto tr113; goto st0; tr113: #line 296 "src/memcached-grammar.rl" {incr_sign = -1;} goto st71; tr202: #line 295 "src/memcached-grammar.rl" {incr_sign = 1; } goto st71; st71: if ( ++p == pe ) goto _test_eof71; case 71: #line 2038 "src/memcached-grammar.cc" switch( (*p) ) { case 13: goto st0; case 32: goto st71; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr114; tr114: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st72; st72: if ( ++p == pe ) goto _test_eof72; case 72: #line 2063 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st73; goto st0; st73: if ( ++p == pe ) goto _test_eof73; case 73: if ( (*p) == 32 ) goto st73; if ( 48 <= (*p) && (*p) <= 57 ) goto tr117; goto st0; tr117: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st74; st74: if ( ++p == pe ) goto _test_eof74; case 74: #line 2084 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr118; case 13: goto tr119; case 32: goto tr120; } if ( 48 <= (*p) && (*p) <= 57 ) goto st74; goto st0; tr133: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st75; tr119: #line 247 "src/memcached-grammar.rl" {incr = memcached_natoq(fstart, p);} goto st75; st75: if ( ++p == pe ) goto _test_eof75; case 75: #line 2105 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr122; goto st0; tr120: #line 247 "src/memcached-grammar.rl" {incr = memcached_natoq(fstart, p);} goto st76; st76: if ( ++p == pe ) goto _test_eof76; case 76: #line 2117 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr122; case 13: goto st75; case 32: goto st76; case 78: goto st77; case 110: goto st77; } goto st0; st77: if ( ++p == pe ) goto _test_eof77; case 77: switch( (*p) ) { case 79: goto st78; case 111: goto st78; } goto st0; st78: if ( ++p == pe ) goto _test_eof78; case 78: switch( (*p) ) { case 82: goto st79; case 114: goto st79; } goto st0; st79: if ( ++p == pe ) goto _test_eof79; case 79: switch( (*p) ) { case 69: goto st80; case 101: goto st80; } goto st0; st80: if ( ++p == pe ) goto _test_eof80; case 80: switch( (*p) ) { case 80: goto st81; case 112: goto st81; } goto st0; st81: if ( ++p == pe ) goto _test_eof81; case 81: switch( (*p) ) { case 76: goto st82; case 108: goto st82; } goto st0; st82: if ( ++p == pe ) goto _test_eof82; case 82: switch( (*p) ) { case 89: goto st83; case 121: goto st83; } goto st0; st83: if ( ++p == pe ) goto _test_eof83; case 83: switch( (*p) ) { case 10: goto tr132; case 13: goto tr133; case 32: goto tr134; } goto st0; tr134: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st84; st84: if ( ++p == pe ) goto _test_eof84; case 84: #line 2198 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr122; case 13: goto st75; case 32: goto st84; } goto st0; st85: if ( ++p == pe ) goto _test_eof85; case 85: switch( (*p) ) { case 69: goto st86; case 101: goto st86; } goto st0; st86: if ( ++p == pe ) goto _test_eof86; case 86: switch( (*p) ) { case 84: goto st87; case 116: goto st87; } goto st0; st87: if ( ++p == pe ) goto _test_eof87; case 87: switch( (*p) ) { case 69: goto st88; case 101: goto st88; } goto st0; st88: if ( ++p == pe ) goto _test_eof88; case 88: if ( (*p) == 32 ) goto st89; goto st0; st89: if ( ++p == pe ) goto _test_eof89; case 89: switch( (*p) ) { case 13: goto st0; case 32: goto st89; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr140; tr140: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st90; st90: if ( ++p == pe ) goto _test_eof90; case 90: #line 2267 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr141; case 13: goto st91; case 32: goto st92; } goto st0; tr147: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } goto st91; tr158: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st91; st91: if ( ++p == pe ) goto _test_eof91; case 91: #line 2290 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr141; goto st0; st92: if ( ++p == pe ) goto _test_eof92; case 92: switch( (*p) ) { case 10: goto tr141; case 13: goto st91; case 32: goto st92; case 78: goto st95; case 110: goto st95; } if ( 48 <= (*p) && (*p) <= 57 ) goto tr144; goto st0; tr144: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st93; st93: if ( ++p == pe ) goto _test_eof93; case 93: #line 2316 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr146; case 13: goto tr147; case 32: goto tr148; } if ( 48 <= (*p) && (*p) <= 57 ) goto st93; goto st0; tr148: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } goto st94; st94: if ( ++p == pe ) goto _test_eof94; case 94: #line 2337 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr141; case 13: goto st91; case 32: goto st94; case 78: goto st95; case 110: goto st95; } goto st0; st95: if ( ++p == pe ) goto _test_eof95; case 95: switch( (*p) ) { case 79: goto st96; case 111: goto st96; } goto st0; st96: if ( ++p == pe ) goto _test_eof96; case 96: switch( (*p) ) { case 82: goto st97; case 114: goto st97; } goto st0; st97: if ( ++p == pe ) goto _test_eof97; case 97: switch( (*p) ) { case 69: goto st98; case 101: goto st98; } goto st0; st98: if ( ++p == pe ) goto _test_eof98; case 98: switch( (*p) ) { case 80: goto st99; case 112: goto st99; } goto st0; st99: if ( ++p == pe ) goto _test_eof99; case 99: switch( (*p) ) { case 76: goto st100; case 108: goto st100; } goto st0; st100: if ( ++p == pe ) goto _test_eof100; case 100: switch( (*p) ) { case 89: goto st101; case 121: goto st101; } goto st0; st101: if ( ++p == pe ) goto _test_eof101; case 101: switch( (*p) ) { case 10: goto tr157; case 13: goto tr158; case 32: goto tr159; } goto st0; tr159: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st102; st102: if ( ++p == pe ) goto _test_eof102; case 102: #line 2418 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr141; case 13: goto st91; case 32: goto st102; } goto st0; st103: if ( ++p == pe ) goto _test_eof103; case 103: switch( (*p) ) { case 76: goto st104; case 108: goto st104; } goto st0; st104: if ( ++p == pe ) goto _test_eof104; case 104: switch( (*p) ) { case 85: goto st105; case 117: goto st105; } goto st0; st105: if ( ++p == pe ) goto _test_eof105; case 105: switch( (*p) ) { case 83: goto st106; case 115: goto st106; } goto st0; st106: if ( ++p == pe ) goto _test_eof106; case 106: switch( (*p) ) { case 72: goto st107; case 104: goto st107; } goto st0; st107: if ( ++p == pe ) goto _test_eof107; case 107: if ( (*p) == 95 ) goto st108; goto st0; st108: if ( ++p == pe ) goto _test_eof108; case 108: switch( (*p) ) { case 65: goto st109; case 97: goto st109; } goto st0; st109: if ( ++p == pe ) goto _test_eof109; case 109: switch( (*p) ) { case 76: goto st110; case 108: goto st110; } goto st0; st110: if ( ++p == pe ) goto _test_eof110; case 110: switch( (*p) ) { case 76: goto st111; case 108: goto st111; } goto st0; st111: if ( ++p == pe ) goto _test_eof111; case 111: switch( (*p) ) { case 10: goto tr169; case 13: goto st112; case 32: goto st113; } goto st0; tr186: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st112; tr175: #line 248 "src/memcached-grammar.rl" {flush_delay = memcached_natoq(fstart, p);} goto st112; st112: if ( ++p == pe ) goto _test_eof112; case 112: #line 2517 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr169; goto st0; st113: if ( ++p == pe ) goto _test_eof113; case 113: switch( (*p) ) { case 10: goto tr169; case 13: goto st112; case 32: goto st113; case 78: goto st116; case 110: goto st116; } if ( 48 <= (*p) && (*p) <= 57 ) goto tr172; goto st0; tr172: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st114; st114: if ( ++p == pe ) goto _test_eof114; case 114: #line 2543 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr174; case 13: goto tr175; case 32: goto tr176; } if ( 48 <= (*p) && (*p) <= 57 ) goto st114; goto st0; tr176: #line 248 "src/memcached-grammar.rl" {flush_delay = memcached_natoq(fstart, p);} goto st115; st115: if ( ++p == pe ) goto _test_eof115; case 115: #line 2560 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr169; case 13: goto st112; case 32: goto st115; case 78: goto st116; case 110: goto st116; } goto st0; st116: if ( ++p == pe ) goto _test_eof116; case 116: switch( (*p) ) { case 79: goto st117; case 111: goto st117; } goto st0; st117: if ( ++p == pe ) goto _test_eof117; case 117: switch( (*p) ) { case 82: goto st118; case 114: goto st118; } goto st0; st118: if ( ++p == pe ) goto _test_eof118; case 118: switch( (*p) ) { case 69: goto st119; case 101: goto st119; } goto st0; st119: if ( ++p == pe ) goto _test_eof119; case 119: switch( (*p) ) { case 80: goto st120; case 112: goto st120; } goto st0; st120: if ( ++p == pe ) goto _test_eof120; case 120: switch( (*p) ) { case 76: goto st121; case 108: goto st121; } goto st0; st121: if ( ++p == pe ) goto _test_eof121; case 121: switch( (*p) ) { case 89: goto st122; case 121: goto st122; } goto st0; st122: if ( ++p == pe ) goto _test_eof122; case 122: switch( (*p) ) { case 10: goto tr185; case 13: goto tr186; case 32: goto tr187; } goto st0; tr187: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st123; st123: if ( ++p == pe ) goto _test_eof123; case 123: #line 2641 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr169; case 13: goto st112; case 32: goto st123; } goto st0; st124: if ( ++p == pe ) goto _test_eof124; case 124: switch( (*p) ) { case 69: goto st125; case 101: goto st125; } goto st0; st125: if ( ++p == pe ) goto _test_eof125; case 125: switch( (*p) ) { case 84: goto st126; case 116: goto st126; } goto st0; st126: if ( ++p == pe ) goto _test_eof126; case 126: switch( (*p) ) { case 32: goto tr191; case 83: goto st131; case 115: goto st131; } goto st0; tr191: #line 292 "src/memcached-grammar.rl" {show_cas = false;} goto st127; tr198: #line 293 "src/memcached-grammar.rl" {show_cas = true;} goto st127; st127: if ( ++p == pe ) goto _test_eof127; case 127: #line 2688 "src/memcached-grammar.cc" switch( (*p) ) { case 13: goto st0; case 32: goto st127; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr193; tr193: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st128; st128: if ( ++p == pe ) goto _test_eof128; case 128: #line 2713 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr195; case 13: goto st129; case 32: goto st130; } goto st0; st129: if ( ++p == pe ) goto _test_eof129; case 129: if ( (*p) == 10 ) goto tr195; goto st0; st130: if ( ++p == pe ) goto _test_eof130; case 130: switch( (*p) ) { case 9: goto st0; case 10: goto tr195; case 13: goto st129; case 32: goto st130; } goto tr193; st131: if ( ++p == pe ) goto _test_eof131; case 131: if ( (*p) == 32 ) goto tr198; goto st0; st132: if ( ++p == pe ) goto _test_eof132; case 132: switch( (*p) ) { case 78: goto st133; case 110: goto st133; } goto st0; st133: if ( ++p == pe ) goto _test_eof133; case 133: switch( (*p) ) { case 67: goto st134; case 99: goto st134; } goto st0; st134: if ( ++p == pe ) goto _test_eof134; case 134: switch( (*p) ) { case 82: goto st135; case 114: goto st135; } goto st0; st135: if ( ++p == pe ) goto _test_eof135; case 135: if ( (*p) == 32 ) goto tr202; goto st0; st136: if ( ++p == pe ) goto _test_eof136; case 136: switch( (*p) ) { case 82: goto st137; case 114: goto st137; } goto st0; st137: if ( ++p == pe ) goto _test_eof137; case 137: switch( (*p) ) { case 69: goto st138; case 101: goto st138; } goto st0; st138: if ( ++p == pe ) goto _test_eof138; case 138: switch( (*p) ) { case 80: goto st139; case 112: goto st139; } goto st0; st139: if ( ++p == pe ) goto _test_eof139; case 139: switch( (*p) ) { case 69: goto st140; case 101: goto st140; } goto st0; st140: if ( ++p == pe ) goto _test_eof140; case 140: switch( (*p) ) { case 78: goto st141; case 110: goto st141; } goto st0; st141: if ( ++p == pe ) goto _test_eof141; case 141: switch( (*p) ) { case 68: goto st142; case 100: goto st142; } goto st0; st142: if ( ++p == pe ) goto _test_eof142; case 142: if ( (*p) == 32 ) goto tr209; goto st0; st143: if ( ++p == pe ) goto _test_eof143; case 143: switch( (*p) ) { case 85: goto st144; case 117: goto st144; } goto st0; st144: if ( ++p == pe ) goto _test_eof144; case 144: switch( (*p) ) { case 73: goto st145; case 105: goto st145; } goto st0; st145: if ( ++p == pe ) goto _test_eof145; case 145: switch( (*p) ) { case 84: goto st146; case 116: goto st146; } goto st0; st146: if ( ++p == pe ) goto _test_eof146; case 146: switch( (*p) ) { case 10: goto tr213; case 13: goto st147; } goto st0; st147: if ( ++p == pe ) goto _test_eof147; case 147: if ( (*p) == 10 ) goto tr213; goto st0; st148: if ( ++p == pe ) goto _test_eof148; case 148: switch( (*p) ) { case 69: goto st149; case 101: goto st149; } goto st0; st149: if ( ++p == pe ) goto _test_eof149; case 149: switch( (*p) ) { case 80: goto st150; case 112: goto st150; } goto st0; st150: if ( ++p == pe ) goto _test_eof150; case 150: switch( (*p) ) { case 76: goto st151; case 108: goto st151; } goto st0; st151: if ( ++p == pe ) goto _test_eof151; case 151: switch( (*p) ) { case 65: goto st152; case 97: goto st152; } goto st0; st152: if ( ++p == pe ) goto _test_eof152; case 152: switch( (*p) ) { case 67: goto st153; case 99: goto st153; } goto st0; st153: if ( ++p == pe ) goto _test_eof153; case 153: switch( (*p) ) { case 69: goto st154; case 101: goto st154; } goto st0; st154: if ( ++p == pe ) goto _test_eof154; case 154: if ( (*p) == 32 ) goto st155; goto st0; st155: if ( ++p == pe ) goto _test_eof155; case 155: switch( (*p) ) { case 13: goto st0; case 32: goto st155; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr222; tr222: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st156; st156: if ( ++p == pe ) goto _test_eof156; case 156: #line 2972 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st157; goto st0; st157: if ( ++p == pe ) goto _test_eof157; case 157: if ( (*p) == 32 ) goto st157; if ( 48 <= (*p) && (*p) <= 57 ) goto tr224; goto st0; tr224: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st158; st158: if ( ++p == pe ) goto _test_eof158; case 158: #line 2993 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr225; if ( 48 <= (*p) && (*p) <= 57 ) goto st158; goto st0; tr225: #line 244 "src/memcached-grammar.rl" {flags = memcached_natoq(fstart, p);} goto st159; st159: if ( ++p == pe ) goto _test_eof159; case 159: #line 3007 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st159; if ( 48 <= (*p) && (*p) <= 57 ) goto tr228; goto st0; tr228: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st160; st160: if ( ++p == pe ) goto _test_eof160; case 160: #line 3021 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr229; if ( 48 <= (*p) && (*p) <= 57 ) goto st160; goto st0; tr229: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } goto st161; st161: if ( ++p == pe ) goto _test_eof161; case 161: #line 3039 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st161; if ( 48 <= (*p) && (*p) <= 57 ) goto tr232; goto st0; tr232: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st162; st162: if ( ++p == pe ) goto _test_eof162; case 162: #line 3053 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr233; case 13: goto tr234; case 32: goto tr235; } if ( 48 <= (*p) && (*p) <= 57 ) goto st162; goto st0; tr234: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st163; tr247: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st163; st163: if ( ++p == pe ) goto _test_eof163; case 163: #line 3074 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr237; goto st0; tr235: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st164; st164: if ( ++p == pe ) goto _test_eof164; case 164: #line 3086 "src/memcached-grammar.cc" switch( (*p) ) { case 32: goto st164; case 78: goto st165; case 110: goto st165; } goto st0; st165: if ( ++p == pe ) goto _test_eof165; case 165: switch( (*p) ) { case 79: goto st166; case 111: goto st166; } goto st0; st166: if ( ++p == pe ) goto _test_eof166; case 166: switch( (*p) ) { case 82: goto st167; case 114: goto st167; } goto st0; st167: if ( ++p == pe ) goto _test_eof167; case 167: switch( (*p) ) { case 69: goto st168; case 101: goto st168; } goto st0; st168: if ( ++p == pe ) goto _test_eof168; case 168: switch( (*p) ) { case 80: goto st169; case 112: goto st169; } goto st0; st169: if ( ++p == pe ) goto _test_eof169; case 169: switch( (*p) ) { case 76: goto st170; case 108: goto st170; } goto st0; st170: if ( ++p == pe ) goto _test_eof170; case 170: switch( (*p) ) { case 89: goto st171; case 121: goto st171; } goto st0; st171: if ( ++p == pe ) goto _test_eof171; case 171: switch( (*p) ) { case 10: goto tr246; case 13: goto tr247; } goto st0; st172: if ( ++p == pe ) goto _test_eof172; case 172: switch( (*p) ) { case 69: goto st173; case 84: goto st192; case 101: goto st173; case 116: goto st192; } goto st0; st173: if ( ++p == pe ) goto _test_eof173; case 173: switch( (*p) ) { case 84: goto st174; case 116: goto st174; } goto st0; st174: if ( ++p == pe ) goto _test_eof174; case 174: if ( (*p) == 32 ) goto st175; goto st0; st175: if ( ++p == pe ) goto _test_eof175; case 175: switch( (*p) ) { case 13: goto st0; case 32: goto st175; } if ( 9 <= (*p) && (*p) <= 10 ) goto st0; goto tr252; tr252: #line 222 "src/memcached-grammar.rl" { fstart = p; for (; p < pe && *p != ' ' && *p != '\r' && *p != '\n'; p++); if ( *p == ' ' || *p == '\r' || *p == '\n') { tbuf_store_field(keys, fstart, p - fstart); keys_count++; p--; } else p = fstart; } goto st176; st176: if ( ++p == pe ) goto _test_eof176; case 176: #line 3211 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st177; goto st0; st177: if ( ++p == pe ) goto _test_eof177; case 177: if ( (*p) == 32 ) goto st177; if ( 48 <= (*p) && (*p) <= 57 ) goto tr254; goto st0; tr254: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st178; st178: if ( ++p == pe ) goto _test_eof178; case 178: #line 3232 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr255; if ( 48 <= (*p) && (*p) <= 57 ) goto st178; goto st0; tr255: #line 244 "src/memcached-grammar.rl" {flags = memcached_natoq(fstart, p);} goto st179; st179: if ( ++p == pe ) goto _test_eof179; case 179: #line 3246 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st179; if ( 48 <= (*p) && (*p) <= 57 ) goto tr258; goto st0; tr258: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st180; st180: if ( ++p == pe ) goto _test_eof180; case 180: #line 3260 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto tr259; if ( 48 <= (*p) && (*p) <= 57 ) goto st180; goto st0; tr259: #line 237 "src/memcached-grammar.rl" { exptime = memcached_natoq(fstart, p); if (exptime > 0 && exptime <= 60*60*24*30) exptime = exptime + ev_now(); } goto st181; st181: if ( ++p == pe ) goto _test_eof181; case 181: #line 3278 "src/memcached-grammar.cc" if ( (*p) == 32 ) goto st181; if ( 48 <= (*p) && (*p) <= 57 ) goto tr262; goto st0; tr262: #line 221 "src/memcached-grammar.rl" { fstart = p; } goto st182; st182: if ( ++p == pe ) goto _test_eof182; case 182: #line 3292 "src/memcached-grammar.cc" switch( (*p) ) { case 10: goto tr263; case 13: goto tr264; case 32: goto tr265; } if ( 48 <= (*p) && (*p) <= 57 ) goto st182; goto st0; tr264: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st183; tr277: #line 281 "src/memcached-grammar.rl" { noreply = true; } goto st183; st183: if ( ++p == pe ) goto _test_eof183; case 183: #line 3313 "src/memcached-grammar.cc" if ( (*p) == 10 ) goto tr267; goto st0; tr265: #line 245 "src/memcached-grammar.rl" {bytes = memcached_natoq(fstart, p);} goto st184; st184: if ( ++p == pe ) goto _test_eof184; case 184: #line 3325 "src/memcached-grammar.cc" switch( (*p) ) { case 32: goto st184; case 78: goto st185; case 110: goto st185; } goto st0; st185: if ( ++p == pe ) goto _test_eof185; case 185: switch( (*p) ) { case 79: goto st186; case 111: goto st186; } goto st0; st186: if ( ++p == pe ) goto _test_eof186; case 186: switch( (*p) ) { case 82: goto st187; case 114: goto st187; } goto st0; st187: if ( ++p == pe ) goto _test_eof187; case 187: switch( (*p) ) { case 69: goto st188; case 101: goto st188; } goto st0; st188: if ( ++p == pe ) goto _test_eof188; case 188: switch( (*p) ) { case 80: goto st189; case 112: goto st189; } goto st0; st189: if ( ++p == pe ) goto _test_eof189; case 189: switch( (*p) ) { case 76: goto st190; case 108: goto st190; } goto st0; st190: if ( ++p == pe ) goto _test_eof190; case 190: switch( (*p) ) { case 89: goto st191; case 121: goto st191; } goto st0; st191: if ( ++p == pe ) goto _test_eof191; case 191: switch( (*p) ) { case 10: goto tr276; case 13: goto tr277; } goto st0; st192: if ( ++p == pe ) goto _test_eof192; case 192: switch( (*p) ) { case 65: goto st193; case 97: goto st193; } goto st0; st193: if ( ++p == pe ) goto _test_eof193; case 193: switch( (*p) ) { case 84: goto st194; case 116: goto st194; } goto st0; st194: if ( ++p == pe ) goto _test_eof194; case 194: switch( (*p) ) { case 83: goto st195; case 115: goto st195; } goto st0; st195: if ( ++p == pe ) goto _test_eof195; case 195: switch( (*p) ) { case 10: goto tr281; case 13: goto st196; } goto st0; st196: if ( ++p == pe ) goto _test_eof196; case 196: if ( (*p) == 10 ) goto tr281; goto st0; } _test_eof2: cs = 2; goto _test_eof; _test_eof3: cs = 3; goto _test_eof; _test_eof4: cs = 4; goto _test_eof; _test_eof5: cs = 5; goto _test_eof; _test_eof6: cs = 6; goto _test_eof; _test_eof7: cs = 7; goto _test_eof; _test_eof8: cs = 8; goto _test_eof; _test_eof9: cs = 9; goto _test_eof; _test_eof10: cs = 10; goto _test_eof; _test_eof11: cs = 11; goto _test_eof; _test_eof12: cs = 12; goto _test_eof; _test_eof197: cs = 197; goto _test_eof; _test_eof13: cs = 13; goto _test_eof; _test_eof14: cs = 14; goto _test_eof; _test_eof15: cs = 15; goto _test_eof; _test_eof16: cs = 16; goto _test_eof; _test_eof17: cs = 17; goto _test_eof; _test_eof18: cs = 18; goto _test_eof; _test_eof19: cs = 19; goto _test_eof; _test_eof20: cs = 20; goto _test_eof; _test_eof21: cs = 21; goto _test_eof; _test_eof22: cs = 22; goto _test_eof; _test_eof23: cs = 23; goto _test_eof; _test_eof24: cs = 24; goto _test_eof; _test_eof25: cs = 25; goto _test_eof; _test_eof26: cs = 26; goto _test_eof; _test_eof27: cs = 27; goto _test_eof; _test_eof28: cs = 28; goto _test_eof; _test_eof29: cs = 29; goto _test_eof; _test_eof30: cs = 30; goto _test_eof; _test_eof31: cs = 31; goto _test_eof; _test_eof32: cs = 32; goto _test_eof; _test_eof33: cs = 33; goto _test_eof; _test_eof34: cs = 34; goto _test_eof; _test_eof35: cs = 35; goto _test_eof; _test_eof36: cs = 36; goto _test_eof; _test_eof37: cs = 37; goto _test_eof; _test_eof38: cs = 38; goto _test_eof; _test_eof39: cs = 39; goto _test_eof; _test_eof40: cs = 40; goto _test_eof; _test_eof41: cs = 41; goto _test_eof; _test_eof42: cs = 42; goto _test_eof; _test_eof43: cs = 43; goto _test_eof; _test_eof44: cs = 44; goto _test_eof; _test_eof45: cs = 45; goto _test_eof; _test_eof46: cs = 46; goto _test_eof; _test_eof47: cs = 47; goto _test_eof; _test_eof48: cs = 48; goto _test_eof; _test_eof49: cs = 49; goto _test_eof; _test_eof50: cs = 50; goto _test_eof; _test_eof51: cs = 51; goto _test_eof; _test_eof52: cs = 52; goto _test_eof; _test_eof53: cs = 53; goto _test_eof; _test_eof54: cs = 54; goto _test_eof; _test_eof55: cs = 55; goto _test_eof; _test_eof56: cs = 56; goto _test_eof; _test_eof57: cs = 57; goto _test_eof; _test_eof58: cs = 58; goto _test_eof; _test_eof59: cs = 59; goto _test_eof; _test_eof60: cs = 60; goto _test_eof; _test_eof61: cs = 61; goto _test_eof; _test_eof62: cs = 62; goto _test_eof; _test_eof63: cs = 63; goto _test_eof; _test_eof64: cs = 64; goto _test_eof; _test_eof65: cs = 65; goto _test_eof; _test_eof66: cs = 66; goto _test_eof; _test_eof67: cs = 67; goto _test_eof; _test_eof68: cs = 68; goto _test_eof; _test_eof69: cs = 69; goto _test_eof; _test_eof70: cs = 70; goto _test_eof; _test_eof71: cs = 71; goto _test_eof; _test_eof72: cs = 72; goto _test_eof; _test_eof73: cs = 73; goto _test_eof; _test_eof74: cs = 74; goto _test_eof; _test_eof75: cs = 75; goto _test_eof; _test_eof76: cs = 76; goto _test_eof; _test_eof77: cs = 77; goto _test_eof; _test_eof78: cs = 78; goto _test_eof; _test_eof79: cs = 79; goto _test_eof; _test_eof80: cs = 80; goto _test_eof; _test_eof81: cs = 81; goto _test_eof; _test_eof82: cs = 82; goto _test_eof; _test_eof83: cs = 83; goto _test_eof; _test_eof84: cs = 84; goto _test_eof; _test_eof85: cs = 85; goto _test_eof; _test_eof86: cs = 86; goto _test_eof; _test_eof87: cs = 87; goto _test_eof; _test_eof88: cs = 88; goto _test_eof; _test_eof89: cs = 89; goto _test_eof; _test_eof90: cs = 90; goto _test_eof; _test_eof91: cs = 91; goto _test_eof; _test_eof92: cs = 92; goto _test_eof; _test_eof93: cs = 93; goto _test_eof; _test_eof94: cs = 94; goto _test_eof; _test_eof95: cs = 95; goto _test_eof; _test_eof96: cs = 96; goto _test_eof; _test_eof97: cs = 97; goto _test_eof; _test_eof98: cs = 98; goto _test_eof; _test_eof99: cs = 99; goto _test_eof; _test_eof100: cs = 100; goto _test_eof; _test_eof101: cs = 101; goto _test_eof; _test_eof102: cs = 102; goto _test_eof; _test_eof103: cs = 103; goto _test_eof; _test_eof104: cs = 104; goto _test_eof; _test_eof105: cs = 105; goto _test_eof; _test_eof106: cs = 106; goto _test_eof; _test_eof107: cs = 107; goto _test_eof; _test_eof108: cs = 108; goto _test_eof; _test_eof109: cs = 109; goto _test_eof; _test_eof110: cs = 110; goto _test_eof; _test_eof111: cs = 111; goto _test_eof; _test_eof112: cs = 112; goto _test_eof; _test_eof113: cs = 113; goto _test_eof; _test_eof114: cs = 114; goto _test_eof; _test_eof115: cs = 115; goto _test_eof; _test_eof116: cs = 116; goto _test_eof; _test_eof117: cs = 117; goto _test_eof; _test_eof118: cs = 118; goto _test_eof; _test_eof119: cs = 119; goto _test_eof; _test_eof120: cs = 120; goto _test_eof; _test_eof121: cs = 121; goto _test_eof; _test_eof122: cs = 122; goto _test_eof; _test_eof123: cs = 123; goto _test_eof; _test_eof124: cs = 124; goto _test_eof; _test_eof125: cs = 125; goto _test_eof; _test_eof126: cs = 126; goto _test_eof; _test_eof127: cs = 127; goto _test_eof; _test_eof128: cs = 128; goto _test_eof; _test_eof129: cs = 129; goto _test_eof; _test_eof130: cs = 130; goto _test_eof; _test_eof131: cs = 131; goto _test_eof; _test_eof132: cs = 132; goto _test_eof; _test_eof133: cs = 133; goto _test_eof; _test_eof134: cs = 134; goto _test_eof; _test_eof135: cs = 135; goto _test_eof; _test_eof136: cs = 136; goto _test_eof; _test_eof137: cs = 137; goto _test_eof; _test_eof138: cs = 138; goto _test_eof; _test_eof139: cs = 139; goto _test_eof; _test_eof140: cs = 140; goto _test_eof; _test_eof141: cs = 141; goto _test_eof; _test_eof142: cs = 142; goto _test_eof; _test_eof143: cs = 143; goto _test_eof; _test_eof144: cs = 144; goto _test_eof; _test_eof145: cs = 145; goto _test_eof; _test_eof146: cs = 146; goto _test_eof; _test_eof147: cs = 147; goto _test_eof; _test_eof148: cs = 148; goto _test_eof; _test_eof149: cs = 149; goto _test_eof; _test_eof150: cs = 150; goto _test_eof; _test_eof151: cs = 151; goto _test_eof; _test_eof152: cs = 152; goto _test_eof; _test_eof153: cs = 153; goto _test_eof; _test_eof154: cs = 154; goto _test_eof; _test_eof155: cs = 155; goto _test_eof; _test_eof156: cs = 156; goto _test_eof; _test_eof157: cs = 157; goto _test_eof; _test_eof158: cs = 158; goto _test_eof; _test_eof159: cs = 159; goto _test_eof; _test_eof160: cs = 160; goto _test_eof; _test_eof161: cs = 161; goto _test_eof; _test_eof162: cs = 162; goto _test_eof; _test_eof163: cs = 163; goto _test_eof; _test_eof164: cs = 164; goto _test_eof; _test_eof165: cs = 165; goto _test_eof; _test_eof166: cs = 166; goto _test_eof; _test_eof167: cs = 167; goto _test_eof; _test_eof168: cs = 168; goto _test_eof; _test_eof169: cs = 169; goto _test_eof; _test_eof170: cs = 170; goto _test_eof; _test_eof171: cs = 171; goto _test_eof; _test_eof172: cs = 172; goto _test_eof; _test_eof173: cs = 173; goto _test_eof; _test_eof174: cs = 174; goto _test_eof; _test_eof175: cs = 175; goto _test_eof; _test_eof176: cs = 176; goto _test_eof; _test_eof177: cs = 177; goto _test_eof; _test_eof178: cs = 178; goto _test_eof; _test_eof179: cs = 179; goto _test_eof; _test_eof180: cs = 180; goto _test_eof; _test_eof181: cs = 181; goto _test_eof; _test_eof182: cs = 182; goto _test_eof; _test_eof183: cs = 183; goto _test_eof; _test_eof184: cs = 184; goto _test_eof; _test_eof185: cs = 185; goto _test_eof; _test_eof186: cs = 186; goto _test_eof; _test_eof187: cs = 187; goto _test_eof; _test_eof188: cs = 188; goto _test_eof; _test_eof189: cs = 189; goto _test_eof; _test_eof190: cs = 190; goto _test_eof; _test_eof191: cs = 191; goto _test_eof; _test_eof192: cs = 192; goto _test_eof; _test_eof193: cs = 193; goto _test_eof; _test_eof194: cs = 194; goto _test_eof; _test_eof195: cs = 195; goto _test_eof; _test_eof196: cs = 196; goto _test_eof; _test_eof: {} _out: {} } #line 306 "src/memcached-grammar.rl" if (!done) { say_debug("parse failed after: `%.*s'", (int)(pe - p), p); if (pe - p > (1 << 20)) { exit: say_warn("memcached proto error"); obuf_dup(out, "ERROR\r\n", 7); stats.bytes_written += 7; return -1; } char *r; if ((r = (char *) memmem(p, pe - p, "\r\n", 2)) != NULL) { in->pos = r + 2; obuf_dup(out, "CLIENT_ERROR bad command line format\r\n", 38); return 1; } return 0; } if (noreply) { obuf_rollback_to_svp(out, &obuf_svp); } return 1; } /* * Local Variables: * mode: c * End: * vim: syntax=objc */ tarantool-1.5.1.218.g1a69fd6/src/plugin/0000775000000000000000000000000012213333320016035 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/plugin/cmake_install.cmake0000664000000000000000000000300212213333034021642 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/pg/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/mysql/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/src/plugin/mysql/0000775000000000000000000000000012242653271017216 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/plugin/mysql/cmake_install.cmake0000664000000000000000000000521512213333034023017 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/mysql # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(EXISTS "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libmysql.so" AND NOT IS_SYMLINK "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libmysql.so") FILE(RPATH_CHECK FILE "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libmysql.so" RPATH "") ENDIF() list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES "/usr/local/lib/tarantool/plugins/libmysql.so") IF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") ENDIF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) IF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") ENDIF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) FILE(INSTALL DESTINATION "/usr/local/lib/tarantool/plugins" TYPE SHARED_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/mysql/libmysql.so") IF(EXISTS "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libmysql.so" AND NOT IS_SYMLINK "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libmysql.so") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libmysql.so") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/src/plugin/mysql/libmysql.so0000775000000000000000000011424512213333045021417 0ustar rootrootELF>@@x@8@%"55 66 6  P6P6 P6 $$Ptd222QtdGNU:Gk&#}qѮnCЬ @ CGL̥Ä|BE컔zAqX$aՆ3)ӄB 8wx [ s G%2 TL">uGH6noXh3f&e +4; : : 0 &U: ) %"Q  -'8 8 1 ,__gmon_start___fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClasseslua_typelua_pushstringlua_rawgetlua_isuserdataluaL_errorlua_touserdatalua_settopstrcmpatoimysql_real_connectlua_tolstringmysql_real_querymysql_next_resultmysql_store_result_Z21lua_push_mysql_resultP9lua_StateP8st_mysqlP12st_mysql_resilua_gettoplua_createtablelua_pushnumbermysql_field_countlua_tonumbermysql_affected_rowsmysql_errormysql_fetch_fieldslua_objlenmysql_fetch_lengthslua_pushlstringlua_pushnilatoll_Z17luaL_pushnumber64P9lua_Statemlua_settablemysql_num_fieldsmysql_fetch_rowmysql_free_result_Z17lua_mysql_executeP9lua_StateluaL_buffinitluaL_prepbufferfreelua_tobooleanluaL_addstringlua_isnumberreallocmysql_real_escape_stringluaL_addlstringluaL_pushresultTIMEOUT_INFINITY_Z12coeio_customPFlP13__va_list_tagEdz__errno_locationstrerrormysql_more_results_Unwind_Resume__gxx_personality_v0_Z12lua_mysql_gcP9lua_Statemysql_close_Z15lua_mysql_quoteP9lua_Statemalloc_Z22lbox_net_mysql_connectP9lua_Statemysql_initlua_errorlua_newuserdataluaL_registerlua_pushcclosurelua_setmetatablelua_rawsetlua_pushvaluelua_getfieldplugin_metalibmysqlclient.so.18libstdc++.so.6libm.so.6libgcc_s.so.1libc.so.6_edata__bss_start_endlibmysql.soGCC_3.0CXXABI_1.3GLIBC_2.2.5libmysqlclient_18 P&y $ ӯk, ui 78SsC6 6  6 206 2: : : 2: 20(6 G86 M`8 Ch8 p8  x8 8 8 8 %8 J: 38 8 8 8 8 8 8 8  8  9  9  9 9  9 (9 09 89 @9 H9 P9 X9 `9 h9 p9 x9 9 9 9  9 !9 "9 #9 $9 &9 I9 '9 (9 )9 *9 +9 ,9 -: .: /: 0: 1 : 2(: 40: 58: 6@: 7H: 8P: 9X: :`: ;h: <p: =x: >: ?: @: A: BHH%! HtH5B! %D! @%B! h%:! h%2! h%*! h%"! h%! h%! h% ! hp%! h`% h P% h @% h 0% h % h % h% h% h% h% h% h% h% h% h% hp% h`%z hP%r h@%j h0%b h %Z h%R h%J h%B h %: h!%2 h"%* h#%" h$% h%% h&% h'p% h(`% h)P% h*@% h+0% h, % h-% h.% h/% h0% h1% h2% h3% h4% h5% h6% h7p% h8`%z h9P%r h:@%j h;0%b h< H H= UH)HHw]H Ht]@H H=z UH)HHHH?HHHu]H Ht]@=A u'H= UHt H= h] fffff.H= tHo HtUH= H]WRUHH H}uEUHEHIt<}ymHEH5:H2UHEHEEUHEH2tHEH5HǸUHEHHHE}tEHEHHEUHH`H}HE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEEHEHEH5HuHEHEHEHEHE}uE DMLEHMHUHuHEHD$H}H<$HyUHH0H}HuUHUHEHH}ymUHEHHEH+HEHEHFHEUHH0H}HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHUHMHEHH&E}uHUHH0H}HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJE}tHEHt HHEHHHEHUHSHxH}HuHUM}~HEHqE5HEHHEHGEHEfWHH}HEHHEH?EHEHEHEHfHxH*HHH H*XMXEHEHHEHUHEEH2HEHHHEH5}HǸHEHPHENUHEH&*HEHHEH]HEHHEEEHHHHEHHHEHHEHHHHEHЋ@p 4HHӉHHH>Hu#HH@HEHHHEHHEHH HEHHHEHHHEH\EHEHEHEHNHEHUHEEHEHEHEHHHEHHHHEH}H*EHEHSHUHEHH+>EHHHEHHEHH HEHHHEHHHEHE]HEH9UHEHyHEH HEH}HEHEHEHEHEH/HxH*HHH H*XMXEHEHHEHUHEEHHx[]UHHH}HEHHHLUHSH HHHHHcHEHUHHHHEHPHHHHEHEHEHEHUH   S     P22 8 16 6 oX  U 8  oPoooP6 v&6FVfv&6FVfv&6FVfv&6: 220GCC: (Debian 4.7.3-4) 4.7.3, nf  1 ?8  m# # # #=P2P4 int    [ [ - fa## e |p}'#lvl~#L# #Tea 3- 3  rD 2  ~  -D .D# /D#' 4 BVio r  vio !# "#\ "#9 "#. "# fd #[#( )?#0 )?#8 )?#@ )?#HR *?#PL *?#X +#` +#d ,#hI ,#l ,#p -#t .#x /#  0#q 1P#y 2P# 3P# 4P# =#< ># ?# @P# AP# C# E# F#fTTNET QxJ V|n  j   -   O  J%  }  ?b## # C ^ _'# `'#A a'#= b'#db c'# H d'#(def e'#0 f?#8 g?#@ h#H i#L j#P k#T l#X m#\P n#` o#de p#h q#l r#p s#xY t vJ T T# !#k "# @ #c 8&(# )#|*#k ,4#e -4# .#(23#,o 5#0ZZ6ep  * *# # ?# 0  `  ;# #V #B #H #P #XAD G \ %* gc >  g   &  n  G @ #I # # # s # ?# '# ? '#(} '#0 '#8db '#@ #HY '#P '#XO '#`[ '#h '#p '#x '## '#X '# '#X ?# P# P#s P#q P#y P# P# P# ǹ#w '# P#\ P# # # # # ӧ# #    '  ~  )   0 net # # '#? '#) '# '# '#4 '# '#db '# # #P #9 # # # ?#Y ?# # ?#6 ?# # #e # # #P \ #  # G P# m P#  # q P# y #  #  #  # e # 1 # thd #  #  '#  # T(  P] ) z  # !# "# #;# $|# ~ %#(1 &#0row '#8  (#@P )#H *# *#eof +P# -P# .#6 /h)_k +#w-# /'#0e#_I (v|  ) V0+ ,# -#.#/k#0#e1# $S=# ># &KW!  "+gs!  "1! !#:!   $;!  %&&& &&&'U> (L>X)>T*/+pop@l,SN`'cY-^`D(apYD*\,S[P,\h, ]H,?^@,}_+db`, cd,dX['{y^(LyX)yP)yL*q+resh'- 3(apDH* ,Sh+sql`+len4X+resT'v - %"(apDH* #",Sh,9 `,\-  %"v&(L)S)9 )*="o&,G \+row@,H.v/"=#u+vP*y#%+len|*#%+iX/V$$+v*$G%+vF0 &+@41L *&+2S.len4.sql.b.idx\.q'P.resK2SD/')`.i4H*').l74~.s8.nq9'/' (>.v&*y((.s2329 U~2q[~4[7 \#5! 5!  5!6"v&&7 h *&&89 h0j>+,1LjX*+,2Slh0u, -`1LuH*+, -2Swh.len}4P.s~`2 'X0k -201L*-002Sh2`2 X2?P2H.db@.ptr2   6 *...b8T 9201 G1Lh'~C1=1%)wC`:s; ;  <>1j1=h::; >fun& ?j11@!2=h=`@? DA : ; I : ;  : ; I8  <  I I I $ >  &I  : ;  : ; I8 I!I/ : ;( : ;I : ; : ;I8  : ;I8 !I/  : ; : ; : ;I : ; : ;  : ; I8 2 .: ; < c d!I4 ".: ; < d#.: ; 2 < c d$.: ; I2 < d%/I& I'.: ; I@B (: ; I ): ; I * +4: ; I ,4: ; I -.? : ; @I@B .4: ;I / 0.? : ;@I@B 1: ;I 24: ;I 3 U4 : ;5.4 < d6.4 @dB 7I4  84I4  9.: ;@B :.G d;I4 <.1@dB =1 >: ; I?.1@dB @4: ;I? < A4: ; I? < B4: ;I?  " /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/mysql/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/usr/include/mysql/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partymysql.ccscoped_guard.hstddef.hlua.htypes.hstdio.hlauxlib.hstdint.hev.hrlist.hmysql.hmysql_com.hmy_list.hmy_alloc.htbuf.hplugin.h tarantool_ev.h  >ugK/uwvugKK6$fu$fu$fu$fu$fu$fwuggx1Y6//gKK6$fu$fu$fvgvu5$fu$fu$fYgKYY6wh>Y;'Y$Z%b=\_##-/5=#UJ/K9;Yt!./vtMv! 'ft![KY[Y\u K WJX+.6==g,g*v8g,tȶͦKY5Kguwg5!uF,vYuZ>Y?=?=3v////|./kt#o.Zrow_countEVBREAK_ONE__closurelua_push_mysql_resultserver_capabilitiesenum_field_typescharset_nametbufgp_offsetcapacityMYSQL_TYPE_NEWDECIMALlocal_infile_userdataflagslocal_infile_initMYSQL_SET_CHARSET_DIRMYSQL_TYPE_NULLnextMYSQL_OPT_SSL_VERIFY_SERVER_CERTMYSQL_TYPE_VAR_STRINGMYSQL_OPT_USE_EMBEDDED_CONNECTIONcatalogdef_lengthshort intserver_statusprotocolpre_allocfunclocal_infile_readprev~ScopedGuardlua_mysql_gcMYSQL_STATUS_STATEMENT_GET_RESULTMYSQL_TYPE_VARCHARinsert_idMYSQL_READ_DEFAULT_GROUPremain_in_bufoperator()uint32_tMYSQL_RESconnect_timeoutfield_allocreport_data_truncationnamed_pipest_mysql_options_extentionMYSQL_SHARED_MEMORY_BASE_NAMEluaL_Regmysql_statusindexlua_mysql_quoteMYSQL_TYPE_DECIMALunbuffered_fetch_owneroverflow_arg_areaMYSQL_TYPE_LONGLONGlong long unsigned intMYSQL_TYPE_SETpacket_lengthMYSQL_OPT_READ_TIMEOUTmake_scoped_guard >use_sslhostshared_memory_base_namebuf_lengthlbox_net_mysql_connectMYSQL_OPT_PROTOCOLMYSQL_TYPE_DATETIMEMYSQL_OPT_NAMED_PIPEev_rt_nowread_timeouttarantool_pluginMYSQL_READ_DEFAULT_FILEwrite_timeoutst_used_memstatst_violocal_infile_endreading_or_writingpassthread_idreturn_statusresnoGNU C++ 4.7.3ScopedGuard >EVBREAK_ALL_Z12lua_mysql_gcP9lua_StateMEM_ROOTconnect_mysqlscope_guardpasswordfreeMYSQL_TYPE_YEARbuffMYSQL_OPT_USE_REMOTE_CONNECTIONMYSQL_ENABLE_CLEARTEXT_PLUGINmy_cnf_grouplast_errorunbuffered_fetch_cancelledMYSQL_STATUS_USE_RESULTpasswdst_mysqlaffected_rowsfree_meMYSQL_TYPE_NEWDATEst_listMYSQL_TYPE_FLOATself_fieldssl_certsecure_authlua_CFunctionMYSQL_OPT_GUESS_CONNECTIONextensioncatalog_lengthpalloc_poolmethods_to_usefieldsmy_socketcurrent_row_Z15lua_mysql_quoteP9lua_Statehost_infoMYSQL_OPT_LOCAL_INFILElua_check_mysqlstmts_Z22lbox_net_mysql_connectP9lua_StateMYSQL_TYPE_INT24mysql_optionMYSQL_STATUS_GET_RESULTwhere_blong long intconnector_fddb_lengthserver_versionblock_num/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/mysqlmy_cnf_fileluaL_Bufferunused1unused2unused3unused4unused5FunctorMYSQL_TYPE_LONG_BLOBMYSQL_OPT_WRITE_TIMEOUTMYSQL_TYPE_TINY_BLOBoperator=unix_socketinit_commandsst_dynamic_array/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/mysql/mysql.ccreconnectclient_ipscrambleorg_nameiportplugin_stat_cbssl_keymy_boolMYSQL_DEFAULT_AUTHev_tstampssl_cam_activelong doublesoutcurrent_fieldprotocol_versionthissqlstatessl_capathread_pos__resultUSED_MEMplugin_init_cbssl_cipherst_mem_rooterror_handlerMYSQL_TYPE_STRINGmax_lengthMYSQL_TYPE_LONGMYSQL_TYPE_SHORTMYSQL_PLUGIN_DIRplugin_metaclient_flagembedded_infocompress_pkt_nrlocal_infile_errorMYSQL_TYPE_ENUMMYSQL_TYPE_MEDIUM_BLOBlast_errnotidxmax_packet_sizebuff_endblock_sizest_mysql_rowsrlistserver_languageMYSQL_SET_CLIENT_IP__ssize_tfp_offsetembedded_query_resultMYSQL_ROWSorg_name_length__in_chrgfield_countMYSQL_TYPE_BLOBMYSQL_OPT_USE_RESULTst_mysql_methodswrite_posst_mysql_fieldmax_packetMYSQLMYSQL_SET_CHARSET_NAMEst_mysql_ressizetypecompressMYSQL_TYPE_BITunusedMYSQL_REPORT_DATA_TRUNCATIONreg_save_areaapi_versioncharsetnrcharsetunsigned charMYSQL_INIT_COMMANDMYSQL_TYPE_GEOMETRYMYSQL_TYPE_TIMEorg_tablest_mysql_optionsmax_allowed_packetmin_mallocfetch_resultMYSQL_ROWfcntlinfo_bufferst_netleftst_mysql_dataMYSQL_STATUS_READYMYSQL_TYPE_DOUBLEMYSQL_TYPE_DATELIST_Z21lua_push_mysql_resultP9lua_StateP8st_mysqlP12st_mysql_resifirst_block_usageMYSQL_DATAcharset_dirshort unsigned intMYSQL_TYPE_TINYhandleMYSQL_OPT_COMPRESSlengthsextra_infolua_mysql_executeexec_mysqlretry_countMYSQL_TYPE_TIMESTAMP_Z17lua_mysql_executeP9lua_Statesave_charorg_table_lengthMYSQL_OPT_CONNECT_TIMEOUTuserEVBREAK_CANCELm_funMYSQL_FIELDdecimalsMYSQL_OPT_RECONNECTdata_cursormy_ulonglongMYSQL_SECURE_AUTHcharset_info_sttypedef __va_list_tag __va_list_tagusocketTIMEOUT_INFINITYwarning_countwwvwww=v=>w>?w?BwBvwwwvwwwvww w U vU V wv w ww z wz vwV W wW Z wZ u vu v wwwvwwwvwwwvwwwvwwwvww"w"IvIJwJKwKNwNmvmnw~.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.data.rel.ro.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges$.oP8 P@X X UHoUoPPdn x88s``~@@P11 1122@3@3d55X6 66 66 6 6 60 P6 P6`8 `8@8 8: :X : :0:;0 D;j,V:FZF0`Qp\rv0vjP8 $A  X P 8 ` @ 1 12@356 6 6  6 P6 `8 8 : :  ! 6  @. pA W: f6  6   f ^r$ #D 2f v&  1) >1,! 6 0N 20b j1$ >1, j1$5,6 8: T8 j: v: P6  +47 F Z 1` &U -<^p "* ,I_q|%: 1 %"Qpy; ,7L -'r: y 8 : 0D k       8  crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrymysql.cc_ZL15lua_check_mysqlP9lua_Statei_ZL13connect_mysqlP13__va_list_tag_ZL10self_fieldP9lua_StatePKci_ZL10exec_mysqlP13__va_list_tag_ZL12fetch_resultP13__va_list_tag_ZZ17lua_mysql_executeP9lua_StateENKUlvE_clEv_Z17make_scoped_guardIZ17lua_mysql_executeP9lua_StateEUlvE_E11ScopedGuardIT_ES4__ZN11ScopedGuardIZ17lua_mysql_executeP9lua_StateEUlvE_ED1Ev_ZZ22lbox_net_mysql_connectP9lua_StateE4meta_ZL4initP9lua_State_ZN11ScopedGuardIZ17lua_mysql_executeP9lua_StateEUlvE_EC1ERKS2__ZN11ScopedGuardIZ17lua_mysql_executeP9lua_StateEUlvE_ED2Ev_ZN11ScopedGuardIZ17lua_mysql_executeP9lua_StateEUlvE_EC2ERKS2___FRAME_END____JCR_END__DW.ref.__gxx_personality_v0_GLOBAL_OFFSET_TABLE___TMC_END____dso_handle_DYNAMICluaL_prepbufferlua_getfieldlua_setmetatablelua_pushstringmysql_more_results@@libmysqlclient_18mysql_real_escape_string@@libmysqlclient_18_Z12lua_mysql_gcP9lua_State__gmon_start___Jv_RegisterClasses_fini_Z17lua_mysql_executeP9lua_Statemalloc@@GLIBC_2.2.5mysql_store_result@@libmysqlclient_18lua_tonumberlua_createtablelua_pushnumberlua_isnumber_ITM_deregisterTMCloneTablelua_settableluaL_addlstringlua_touserdata_Z17luaL_pushnumber64P9lua_Statemfree@@GLIBC_2.2.5_ITM_registerTMCloneTablemysql_num_fields@@libmysqlclient_18__cxa_finalize@@GLIBC_2.2.5lua_objlenmysql_fetch_fields@@libmysqlclient_18lua_errormysql_free_result@@libmysqlclient_18_Z15lua_mysql_quoteP9lua_Statestrerror@@GLIBC_2.2.5atoi@@GLIBC_2.2.5lua_settoplua_toboolean_Z12coeio_customPFlP13__va_list_tagEdzmysql_affected_rows@@libmysqlclient_18lua_pushvaluelua_newuserdataTIMEOUT_INFINITY__errno_location@@GLIBC_2.2.5__bss_start_Z21lua_push_mysql_resultP9lua_StateP8st_mysqlP12st_mysql_resilua_typestrcmp@@GLIBC_2.2.5luaL_registerlua_gettoplua_isuserdatalua_tolstringmysql_init@@libmysqlclient_18mysql_real_query@@libmysqlclient_18atoll@@GLIBC_2.2.5_endluaL_addstringlua_rawsetrealloc@@GLIBC_2.2.5_Z22lbox_net_mysql_connectP9lua_State_edata__gxx_personality_v0@@CXXABI_1.3lua_pushcclosuremysql_field_count@@libmysqlclient_18lua_pushlstringluaL_errorluaL_pushresult_Unwind_Resume@@GCC_3.0mysql_next_result@@libmysqlclient_18plugin_metamysql_fetch_lengths@@libmysqlclient_18mysql_real_connect@@libmysqlclient_18mysql_fetch_row@@libmysqlclient_18lua_pushnilmysql_error@@libmysqlclient_18luaL_buffinit_initmysql_close@@libmysqlclient_18lua_rawgettarantool-1.5.1.218.g1a69fd6/src/plugin/mysql/mysql.cc0000664000000000000000000002371612242653271020703 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define PLUGIN_NAME "mysql" #define PLUGIN_VERSION 1 #include extern "C" { #include #include #include } #include #include #include #include #include #include #include #include #include #include #include /** * gets MYSQL connector from lua stack (or object) */ static MYSQL * lua_check_mysql(struct lua_State *L, int index) { int pop = 0; if (lua_istable(L, index)) { if (index < 0) index--; lua_pushstring(L, "raw"); lua_rawget(L, index); pop = 1; index = -1; } if (!lua_isuserdata(L, index)) luaL_error(L, "Can't extract userdata from lua-stack"); MYSQL *mysql = *(MYSQL **)lua_touserdata(L, index); if (pop) lua_pop(L, pop); return mysql; } /** * connect to MySQL server */ static ssize_t connect_mysql(va_list ap) { MYSQL *mysql = va_arg(ap, typeof(mysql)); const char *host = va_arg(ap, typeof(host)); const char *port = va_arg(ap, typeof(port)); const char *user = va_arg(ap, typeof(user)); const char *password = va_arg(ap, typeof(password)); const char *db = va_arg(ap, typeof(db)); int iport = 0; const char *usocket = 0; if (strcmp(host, "unix/") == 0) { usocket = port; host = NULL; } else { iport = atoi(port); if (iport == 0) iport = 3306; } mysql_real_connect(mysql, host, user, password, db, iport, usocket, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS); return 0; } /** * returns self.field as C-string */ static const char * self_field(struct lua_State *L, const char *name, int index) { lua_pushstring(L, name); if (index < 0) index--; lua_rawget(L, index); const char *res; if (lua_isnil(L, -1)) res = NULL; else res = lua_tostring(L, -1); lua_pop(L, 1); return res; } /** * execute request */ static ssize_t exec_mysql(va_list ap) { MYSQL *mysql = va_arg(ap, typeof(mysql)); const char *sql = va_arg(ap, typeof(sql)); size_t len = va_arg(ap, typeof(len)); int res = mysql_real_query(mysql, sql, len); if (res == 0) { return 0; } return -2; } /** * fetch one result from socket */ static ssize_t fetch_result(va_list ap) { MYSQL *mysql = va_arg(ap, typeof(mysql)); MYSQL_RES **result = va_arg(ap, typeof(result)); int resno = va_arg(ap, typeof(resno)); if (resno) { if (mysql_next_result(mysql) > 0) return -2; } *result = mysql_store_result(mysql); return 0; } /** * push results to lua stack */ int lua_push_mysql_result(struct lua_State *L, MYSQL *mysql, MYSQL_RES *result, int resno) { int tidx; if (resno > 0) { /* previous push is in already on stack */ tidx = lua_gettop(L) - 1; } else { lua_newtable(L); tidx = lua_gettop(L); lua_pushnumber(L, 0); } if (!result) { if (mysql_field_count(mysql) == 0) { double v = lua_tonumber(L, -1); v += mysql_affected_rows(mysql); lua_pop(L, 1); lua_pushnumber(L, v); return 2; } luaL_error(L, "%s", mysql_error(mysql)); } MYSQL_ROW row; MYSQL_FIELD * fields = mysql_fetch_fields(result); while((row = mysql_fetch_row(result))) { lua_pushnumber(L, luaL_getn(L, tidx) + 1); lua_newtable(L); unsigned long *len = mysql_fetch_lengths(result); for (int i = 0; i < mysql_num_fields(result); i++) { lua_pushstring(L, fields[i].name); switch(fields[i].type) { case MYSQL_TYPE_TINY: case MYSQL_TYPE_SHORT: case MYSQL_TYPE_LONG: case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_INT24: case MYSQL_TYPE_DOUBLE: { lua_pushlstring(L, row[i], len[i]); double v = lua_tonumber(L, -1); lua_pop(L, 1); lua_pushnumber(L, v); break; } case MYSQL_TYPE_NULL: lua_pushnil(L); break; case MYSQL_TYPE_LONGLONG: case MYSQL_TYPE_TIMESTAMP: { /* hack: lua num64 doesn't work propery with cjson */ long long v = atoll(row[i]); if (v < (1LL << 31)) lua_pushnumber(L, v); else luaL_pushnumber64(L, v); break; } /* AS string */ case MYSQL_TYPE_NEWDECIMAL: case MYSQL_TYPE_DECIMAL: default: lua_pushlstring(L, row[i], len[i]); break; } lua_settable(L, -3); } lua_settable(L, tidx); } /* sum(affected_rows) */ double v = lua_tonumber(L, -1); v += mysql_affected_rows(mysql); lua_pop(L, 1); lua_pushnumber(L, v); return 2; } /** * mysql:execute() method */ int lua_mysql_execute(struct lua_State *L) { MYSQL *mysql = lua_check_mysql(L, 1); size_t len; const char *sql = lua_tolstring(L, 2, &len); luaL_Buffer b; luaL_buffinit(L, &b); int idx = 3; char *q = NULL; /* process placeholders */ for (size_t i = 0; i < len; i++) { if (sql[i] != '?') { luaL_addchar(&b, sql[i]); continue; } if (lua_gettop(L) < idx) { free(q); luaL_error(L, "Can't find value for %d placeholder", idx); } if (lua_isboolean(L, idx)) { int v = lua_toboolean(L, idx++); luaL_addstring(&b, v ? "TRUE" : "FALSE"); continue; } if (lua_isnil(L, idx)) { idx++; luaL_addstring(&b, "NULL"); continue; } if (lua_isnumber(L, idx)) { const char *s = lua_tostring(L, idx++); luaL_addstring(&b, s); continue; } size_t l; const char *s = lua_tolstring(L, idx++, &l); char *nq = (char *)realloc(q, l * 2 + 1); if (!nq) { free(q); luaL_error(L, "Can't allocate memory for variable"); } q = nq; l = mysql_real_escape_string(mysql, q, s, l); luaL_addchar(&b, '\''); luaL_addlstring(&b, q, l); luaL_addchar(&b, '\''); } free(q); luaL_pushresult(&b); sql = lua_tolstring(L, -1, &len); int res = coeio_custom(exec_mysql, TIMEOUT_INFINITY, mysql, sql, len); lua_pop(L, 1); if (res == -1) luaL_error(L, "%s", strerror(errno)); if (res != 0) luaL_error(L, "%s", mysql_error(mysql)); int resno = 0; do { MYSQL_RES *result = NULL; res = coeio_custom(fetch_result, TIMEOUT_INFINITY, mysql, &result, resno); if (res == -1) luaL_error(L, "%s", strerror(errno)); auto scope_guard = make_scoped_guard([&]{ mysql_free_result(result); }); lua_push_mysql_result(L, mysql, result, resno++); } while(mysql_more_results(mysql)); return 2; } /** * collect MYSQL object */ int lua_mysql_gc(struct lua_State *L) { MYSQL *mysql = lua_check_mysql(L, 1); mysql_close(mysql); return 0; } /** * quote variable */ int lua_mysql_quote(struct lua_State *L) { MYSQL *mysql = lua_check_mysql(L, 1); if (lua_gettop(L) < 2) { lua_pushnil(L); return 1; } size_t len; const char *s = lua_tolstring(L, -1, &len); char *sout = (typeof(sout))malloc(len * 2 + 1); if (!sout) { luaL_error(L, "Can't allocate memory for variable"); } len = mysql_real_escape_string(mysql, sout, s, len); lua_pushlstring(L, sout, len); free(sout); return 1; } /** * connect to MYSQL server (lua binding) */ int lbox_net_mysql_connect(struct lua_State *L) { MYSQL *mysql = mysql_init(NULL); if (!mysql) luaL_error(L, "Can not allocate memory for connector"); const char *host = self_field(L, "host", 1); const char *port = self_field(L, "port", 1); const char *user = self_field(L, "user", 1); const char *pass = self_field(L, "password", 1); const char *db = self_field(L, "db", 1); if (!host || (!port) || (!user) || (!pass) || (!db)) { luaL_error(L, "Usage: box.net.sql.connect" "('mysql', host, port, user, password, db, ...)" ); } if (coeio_custom(connect_mysql, TIMEOUT_INFINITY, mysql, host, port, user, pass, db) == -1) { mysql_close(mysql); luaL_error(L, "%s", strerror(errno)); } if (*mysql_error(mysql)) { luaL_Buffer b; luaL_buffinit(L, &b); luaL_addstring(&b, mysql_error(mysql)); luaL_pushresult(&b); mysql_close(mysql); lua_error(L); } lua_pushstring(L, "raw"); MYSQL **ptr = (MYSQL **)lua_newuserdata(L, sizeof(mysql)); *ptr = mysql; lua_newtable(L); lua_pushstring(L, "__index"); lua_newtable(L); static const struct luaL_reg meta [] = { {"execute", lua_mysql_execute}, {"quote", lua_mysql_quote}, {NULL, NULL} }; luaL_register(L, NULL, meta); lua_settable(L, -3); lua_pushstring(L, "__gc"); lua_pushcfunction(L, lua_mysql_gc); lua_settable(L, -3); lua_setmetatable(L, -2); lua_rawset(L, 1); /* return self */ lua_pushvalue(L, 1); return 1; } static void init(struct lua_State *L) { lua_getfield(L, LUA_GLOBALSINDEX, "box"); /* stack: box */ lua_pushstring(L, "net"); lua_rawget(L, -2); /* stack: box.net */ lua_pushstring(L, "sql"); lua_rawget(L, -2); /* stack: box.net.sql */ lua_pushstring(L, "connectors"); lua_rawget(L, -2); /* stack: box.net.sql.connectors */ /* stack: box, box.net.sql.connectors */ lua_pushstring(L, "mysql"); lua_pushcfunction(L, lbox_net_mysql_connect); lua_rawset(L, -3); /* cleanup stack */ lua_pop(L, 4); } DECLARE_PLUGIN(PLUGIN_NAME, PLUGIN_VERSION, init, NULL); tarantool-1.5.1.218.g1a69fd6/src/plugin/mysql/CMakeLists.txt0000664000000000000000000000071212242653271021756 0ustar rootrootfind_optional_package(MySQL) if (MYSQL_FOUND) message(STATUS "box.net.sql(mysql) INC=${MYSQL_INCLUDE_DIRS}") message(STATUS "box.net.sql(mysql) LIBS=${MYSQL_LIBRARIES}") include_directories(${MYSQL_INCLUDE_DIRS}) add_library(mysql SHARED mysql.cc) target_link_libraries(mysql ${MYSQL_LIBRARIES} -rdynamic) install(TARGETS mysql LIBRARY DESTINATION ${PLUGIN_DIR}) else() message(STATUS "MySQL client not found, box.net.sql(mysql) disabled") endif() tarantool-1.5.1.218.g1a69fd6/src/plugin/mysql/Makefile0000664000000000000000000002027012213333034020645 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/mysql/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/mysql/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/mysql/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/mysql/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/mysql/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. src/plugin/mysql/CMakeFiles/mysql.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/mysql/CMakeFiles/mysql.dir/rule .PHONY : src/plugin/mysql/CMakeFiles/mysql.dir/rule # Convenience name for target. mysql: src/plugin/mysql/CMakeFiles/mysql.dir/rule .PHONY : mysql # fast build rule for target. mysql/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/mysql/CMakeFiles/mysql.dir/build.make src/plugin/mysql/CMakeFiles/mysql.dir/build .PHONY : mysql/fast mysql.o: mysql.cc.o .PHONY : mysql.o # target to build an object file mysql.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/mysql/CMakeFiles/mysql.dir/build.make src/plugin/mysql/CMakeFiles/mysql.dir/mysql.cc.o .PHONY : mysql.cc.o mysql.i: mysql.cc.i .PHONY : mysql.i # target to preprocess a source file mysql.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/mysql/CMakeFiles/mysql.dir/build.make src/plugin/mysql/CMakeFiles/mysql.dir/mysql.cc.i .PHONY : mysql.cc.i mysql.s: mysql.cc.s .PHONY : mysql.s # target to generate assembly for a file mysql.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/mysql/CMakeFiles/mysql.dir/build.make src/plugin/mysql/CMakeFiles/mysql.dir/mysql.cc.s .PHONY : mysql.cc.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... mysql" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... mysql.o" @echo "... mysql.i" @echo "... mysql.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/plugin/pg/0000775000000000000000000000000012242653271016457 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/plugin/pg/cmake_install.cmake0000664000000000000000000000515712213333034022265 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/pg # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(EXISTS "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libpg.so" AND NOT IS_SYMLINK "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libpg.so") FILE(RPATH_CHECK FILE "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libpg.so" RPATH "") ENDIF() list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES "/usr/local/lib/tarantool/plugins/libpg.so") IF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") ENDIF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) IF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") ENDIF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) FILE(INSTALL DESTINATION "/usr/local/lib/tarantool/plugins" TYPE SHARED_LIBRARY FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/pg/libpg.so") IF(EXISTS "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libpg.so" AND NOT IS_SYMLINK "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libpg.so") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/local/lib/tarantool/plugins/libpg.so") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/src/plugin/pg/libpg.so0000775000000000000000000010116012213333045020111 0ustar rootrootELF>@c@8@$!<7<7 @7@7 @7  77 7 $$Ptd333QtdGNUS#PKO>kXB$@ BEG|BE컔qX  a~ a A U8 R"t(H}27oau,BKriP'@< 8< < 08<   1__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClasseslua_typelua_pushstringlua_rawgetlua_isuserdataluaL_errorlua_touserdatalua_settopPQexecParamsPQresultStatuslua_createtablePQcmdTupleslua_pushnumberlua_tonumberPQcmdStatusPQresultErrorMessagePQntuplesPQnfieldsPQgetisnullPQfnamePQgetvaluePQgetlengthPQftypelua_pushlstringlua_pushbooleanlua_settablePQclearlua_tolstringlua_gettoplua_tobooleanlua_isnumberluaL_buffinitluaL_prepbuffersnprintfluaL_addstringluaL_pushresultTIMEOUT_INFINITY_Z12coeio_customPFlP13__va_list_tagEdz__errno_locationstrerror_Unwind_Resume__gxx_personality_v0PQfinish_sayPQconnectdbPQsetNoticeProcessorlua_pushnilPQescapeLiteralfreePQescapeIdentifierPQstatusPQerrorMessagelua_errorlua_newuserdataluaL_registerlua_pushcclosurelua_setmetatablelua_rawsetlua_pushvaluelua_getfieldplugin_metalibpq.so.5libstdc++.so.6libm.so.6libgcc_s.so.1libc.so.6_edata__bss_start_endlibpg.soGCC_3.0CXXABI_1.3GLIBC_2.2.5 P&y  ӯk ui @7 H7 @`7 3h7 !p7 3x7 :*7 37  +; ; < 3< 09  9  9 9 9 9 %9 *0< 7: : : :  : (: 0: 8:  @:  H:  P:  X: `: h: p: x: : : : : : : : : : : : :  : !: ": #: $; &; '; (; ) ; +(; ,0; -8; .@; /H; 0P; 1X; 2`; 3h; 4p; 5x; 6; 8; 9; :; ;; <; =; >; ?; @; AHH$ HtH5$ %$ @%$ h%$ h%$ h%$ h%$ h%$ h%$ h%$ hp%$ h`%$ h P%z$ h @%r$ h 0%j$ h %b$ h %Z$ h%R$ h%J$ h%B$ h%:$ h%2$ h%*$ h%"$ h%$ h%$ hp% $ h`%$ hP%# h@%# h0%# h %# h%# h%# h%# h %# h!%# h"%# h#%# h$%# h%%# h&%# h'p%# h(`%# h)P%z# h*@%r# h+0%j# h, %b# h-%Z# h.%R# h/%J# h0%B# h1%:# h2%2# h3%*# h4%"# h5%# h6%# h7p% # h8`%# h9PHh# H=Z# UH)HHw]H Ht]@H1# H=*# UH)HHHH?HHHu]H Ht]@=" u'H= UHt H=" h]" fffff.H= tH' HtUH= H]WRUHH H}uEUHEHt<}ymHEH5HUHEHEEUHEHtHEH5~HǸUHEHHHE}tEHEHNHEUHH`H}HE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHELMLEHMUHuHED$H}H<$HWHHEHUHH`H}HuH}uHEH5HǸHEHk0HHHcHHHEH9HEHtHEfWH!fHEHHHEHHHEHEHEHEHEHHEHUHEEHHEHHHEHH5HEH5HǸHEHHHEH5~HǸHEH5oHǸHEHHEH%EHEHEEE*HEHHEHEyUMHEHSUHEHHHEHHUMHEHHEUMHEHE܋UHEH{wstxt =EHcHMHEHH>HEHEHEHEHEHHEHUHEEHVHEAC  lrAC m $ZAC  $AC  $;AC 6 AC  $)AC d D,AC g d$AC _ *"5   R     .P@3!3:*3 +  1@7 H7 o  9 p  oh oo o 7 6FVfv&6FVfv&6FVfv&6FVfv; 30GCC: (Debian 4.7.3-4) 4.7.3,*/1Oid8J}35Xintpt< P8# 8# u# # f mx38=$BH   *       c   AN  N  N  K =  ' $  ] z x  m 2  4.4mCC r  #  ## |p }#lvl ~m#L C# ) #{ r - Z .# /# )D  +# -#  /# " 0J# Dy([all)}0+ B,m# F-m# .# _/P# 0r# 1# n0r   y)M H  n  6 "$b=#>"#1&?31+?E01?m1:?K MN;Q?K!MMM _>!L>lX"#>mT#$pop@ml%N` W:`!apW#8%Yh$sqlZ`%[m\%\P%]H%A^@%_$res`-! jm:!!Ljl!rj!#J!%m\%mX&G&$vv0`& $iml#5 $jmh#A $sP$lenmL#L $v0@#!!$v0 m!b( S !Ll#!\(%$sqlX%m%ύP%A H% @%҇'res!( M~) I *!#+'-+'3 +',!! -d" h 9#!!.resh#M"h''b'numS ~&}#&" $im$idxm##%$len?~$s#=$$$vm%s 3%Zx 3#&<''i m'j mc /{ s /{ c c 0*mb(( 1L*lX#n(((,h2 5((@ 1arg5h35`0?()u 1ap?X#()(Ah(Bu `0M):* 1LMlX3MP3#MmL#)8*'resSh0]m:* +`] 1L]lH#F*+(ch'lend?X'se`0um ++ 1LulH#++({h'len|?X's}`0m+0  1Ll~#+0(X'b~(h'ptru `(| `7 #m..'bI /{ 2_001 1Llh CM01Y1"C`4*5*5d ?6Z11@QZ7h4wh5*8fun&} 39Z117hh7r`:+7;)D:h< mm<:*>=u < % : ; I$ > : ; I$ >   I : ;  : ; I8 &I <  : ; @ ( II : ;  : ; I8 I!I/ : ; : ;  : ;  : ; I8 2 .: ; < c dI4 .: ; < d.: ; 2 < c d.: ; I2 < d/I I .: ; I@B !: ; I ": ; I # $4: ; I %4: ; I & '4: ;I (4: ;I ) : ;* : ;I8 +.4 < d,.4 @dB -I4  .4I4  /!I/ 0.: ;I@B 1: ;I 2.: ;@B 3: ;I 4.G d5I4 6.1@dB 71 8: ; I9.1@dB :4: ; I? < ;4: ;I? < <=4: ;I?  ? /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/pg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/postgresql/utils/usr/include/postgresql/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partypg.ccscoped_guard.hstddef.htypes.hstdio.hstdint.hpalloc.hlibpq-fe.hlua.hlauxlib.hrlist.htbuf.hplugin.h ev.h tarantool_ev.h say.hpostgres_ext.h >ugK/uwvugKK4$fu$fu$fY$fu$fu$fu$fu$fw9Y4uv8Yu"ɤy'u YYZ#uh51-1%a.J$XJ+u"Y.!./uLKLLLL/"it=<])/= $Z L)xJ W,YHmKY565$fu$fuYY5//gKK6YLJLuu/6YLJLuu/6!Y0Y0Y0Y0Y0 K5,>LYuZ>Y?=?=3v////u/u|./kt#o.Zcapacitypg_noticeScopedGuard >S_FATALgp_offsetprevinit__in_chrgev_tstamplong long unsigned intoperator()nextstatCONNECTION_SSL_STARTUPmake_scoped_guard >paramTypesCONNECTION_BADpg_exec__ssize_tS_DEBUG_say/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/pgPGresultscope_guardlua_CFunctionpg_connthiscount14ExecStatusTypePGRES_COPY_BOTHparamValuesCONNECTION_AUTH_OKlong long intsay_levellua_pg_execute/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/pg/pg.cc__closureS_CRIToverflow_arg_area14ConnStatusTypetypedef __va_list_tag __va_list_tagCONNECTION_STARTEDnameS_WARNdatasizeshort unsigned intm_activeCurrentMemoryContextGNU C++ 4.7.3PGRES_FATAL_ERRORS_INFOboolapi_versionPGRES_COMMAND_OKlua_check_pgconnsizetypeEVBREAK_ALLluaL_RegCONNECTION_AWAITING_RESPONSEparamFormatsmessagelua_pg_quotelua_StateCONNECTION_NEEDEDMemoryContextDatafloatFunctorCONNECTION_OK__resEVBREAK_ONEev_rt_nowunsigned charparamLengthsoperator=short intm_funTIMEOUT_INFINITYplugin_init_cbpg_resultreg_save_areaCONNECTION_MADEPGRES_BAD_RESPONSEpg_trueuint32_tPGconnlua_pg_quote_identlong doubleS_ERRORfuncluaL_BufferPGRES_TUPLES_OKindexbuffer~ScopedGuardPGRES_COPY_INPGRES_COPY_OUTpg_falseCONNECTION_SETENVplugin_metalua_pg_gctbufconstrrlistplugin_stat_cblbox_net_pg_connectself_fieldfp_offsetlua_push_pgresPGRES_EMPTY_QUERYcolstarantool_pluginEVBREAK_CANCELpalloc_poolPGRES_NONFATAL_ERRORwwvwwwvwwwvwwwvwwwvwwwvwww-v-.w./w/2w2vwwwvwwwYvYZwZ[w[^w^)v)*w*+w+.w.dvdewefwfiwivwwwvwwwvwwwvw.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.data.rel.ro.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc$.o<8 @ Ho Uoh h `d np xs  ~11 1133P4P466h@7 @7H7 H7P7 P7`7 `7@ 7 79 989 9; ;X 8< 8<08<T<0 <.,KG:NF0U<Q1\1b\lP #H y h      1 13P46@7 H7 P7 `7 7 9 9 ; 8<   P7  . A @W8< fH7  @7    :l& ! R !q 3 3 01) Z1,M b(4f (Hy ( )r :* + +;`7 @G 0[ 1$ Z1, 1$6P7 +0< G9 ]8< i; v7    1/8ETds}  "*6@Vaq8<  %:GP^ix@< 8< -E< 0Q]kw }crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrypg.cc_ZL16lua_check_pgconnP9lua_Statei_ZL7pg_execP13__va_list_tag_ZL14lua_push_pgresP9lua_StateP9pg_result_ZZL14lua_pg_executeP9lua_StateENKUlvE_clEv_ZL14lua_pg_executeP9lua_State_ZZL14lua_pg_executeP9lua_StateE7pg_true_ZZL14lua_pg_executeP9lua_StateE8pg_false_Z17make_scoped_guardIZL14lua_pg_executeP9lua_StateEUlvE_E11ScopedGuardIT_ES4__ZN11ScopedGuardIZL14lua_pg_executeP9lua_StateEUlvE_ED1Ev_ZL9lua_pg_gcP9lua_State_ZL9pg_noticePvPKc_ZL10pg_connectP13__va_list_tag_ZL10self_fieldP9lua_StatePKci_ZL12lua_pg_quoteP9lua_State_ZL18lua_pg_quote_identP9lua_State_ZL19lbox_net_pg_connectP9lua_State_ZZL19lbox_net_pg_connectP9lua_StateE4meta_ZL4initP9lua_State_ZN11ScopedGuardIZL14lua_pg_executeP9lua_StateEUlvE_EC1ERKS2__ZN11ScopedGuardIZL14lua_pg_executeP9lua_StateEUlvE_ED2Ev_ZN11ScopedGuardIZL14lua_pg_executeP9lua_StateEUlvE_EC2ERKS2___FRAME_END____JCR_END__DW.ref.__gxx_personality_v0_GLOBAL_OFFSET_TABLE___TMC_END____dso_handle_DYNAMICluaL_prepbufferPQcmdStatusPQescapeIdentifierlua_getfieldlua_setmetatablelua_pushstringsnprintf@@GLIBC_2.2.5__gmon_start___Jv_RegisterClasses_finiPQsetNoticeProcessorPQstatuslua_tonumberPQresultStatuslua_createtablelua_pushnumberPQntupleslua_isnumber_ITM_deregisterTMCloneTablelua_settablePQftypePQgetisnulllua_touserdatafree@@GLIBC_2.2.5_ITM_registerTMCloneTable__cxa_finalize@@GLIBC_2.2.5PQconnectdbPQgetlengthlua_errorstrerror@@GLIBC_2.2.5lua_settopPQescapeLiterallua_toboolean_Z12coeio_customPFlP13__va_list_tagEdzlua_pushvaluelua_newuserdataTIMEOUT_INFINITY__errno_location@@GLIBC_2.2.5PQfname__bss_startlua_pushbooleanlua_type_sayPQresultErrorMessagePQexecParamsPQfinishluaL_registerlua_gettoplua_isuserdatalua_tolstringPQerrorMessage_endPQnfieldsluaL_addstringlua_rawsetPQgetvalue_edata__gxx_personality_v0@@CXXABI_1.3lua_pushcclosurelua_pushlstringluaL_errorluaL_pushresult_Unwind_Resume@@GCC_3.0plugin_metalua_pushnilluaL_buffinitPQcmdTuples_initPQclearlua_rawgettarantool-1.5.1.218.g1a69fd6/src/plugin/pg/CMakeLists.txt0000664000000000000000000000113612242653271021220 0ustar rootroot# A special hack for buggy FindPostgreSQL.cmake in Debian/Ubuntu set(PostgreSQL_ROOT /usr/include/postgresql;/usr/include/postgres) find_optional_package(PostgreSQL) if (PostgreSQL_FOUND) message(STATUS "box.net.sql(pg): INC=${PostgreSQL_INCLUDE_DIRS}") message(STATUS "box.net.sql(pg): LIBS=${PostgreSQL_LIBRARIES}") include_directories(${PostgreSQL_INCLUDE_DIRS}) add_library(pg SHARED pg.cc) target_link_libraries(pg ${PostgreSQL_LIBRARIES} -rdynamic) install(TARGETS pg LIBRARY DESTINATION ${PLUGIN_DIR}) else() message(STATUS "PostgreSQL client not found, box.net.sql(pg) disabled") endif() tarantool-1.5.1.218.g1a69fd6/src/plugin/pg/Makefile0000664000000000000000000002002312213333034020102 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/pg/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/pg/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/pg/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/pg/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/pg/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. src/plugin/pg/CMakeFiles/pg.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/pg/CMakeFiles/pg.dir/rule .PHONY : src/plugin/pg/CMakeFiles/pg.dir/rule # Convenience name for target. pg: src/plugin/pg/CMakeFiles/pg.dir/rule .PHONY : pg # fast build rule for target. pg/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/pg/CMakeFiles/pg.dir/build.make src/plugin/pg/CMakeFiles/pg.dir/build .PHONY : pg/fast pg.o: pg.cc.o .PHONY : pg.o # target to build an object file pg.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/pg/CMakeFiles/pg.dir/build.make src/plugin/pg/CMakeFiles/pg.dir/pg.cc.o .PHONY : pg.cc.o pg.i: pg.cc.i .PHONY : pg.i # target to preprocess a source file pg.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/pg/CMakeFiles/pg.dir/build.make src/plugin/pg/CMakeFiles/pg.dir/pg.cc.i .PHONY : pg.cc.i pg.s: pg.cc.s .PHONY : pg.s # target to generate assembly for a file pg.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/plugin/pg/CMakeFiles/pg.dir/build.make src/plugin/pg/CMakeFiles/pg.dir/pg.cc.s .PHONY : pg.cc.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... pg" @echo "... rebuild_cache" @echo "... pg.o" @echo "... pg.i" @echo "... pg.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/plugin/pg/pg.cc0000664000000000000000000002614012242653271017377 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ extern "C" { #include #include #include #undef PACKAGE_VERSION } #define PLUGIN_VERSION 1 #define PLUGIN_NAME "postgresql" #include extern "C" { #include #include #include } #include #include #include #include #include #include #include #include #include #include static PGconn * lua_check_pgconn(struct lua_State *L, int index) { int pop = 0; if (lua_istable(L, index)) { if (index < 0) index--; lua_pushstring(L, "raw"); lua_rawget(L, index); pop = 1; index = -1; } if (!lua_isuserdata(L, index)) luaL_error(L, "Can't extract userdata from lua-stack"); PGconn *conn = *(PGconn **)lua_touserdata(L, index); if (pop) lua_pop(L, pop); return conn; } /** do execute request (is run in the other thread) */ static ssize_t pg_exec(va_list ap) { PGconn *conn = va_arg(ap, typeof(conn)); const char *sql = va_arg(ap, typeof(sql)); int count = va_arg(ap, typeof(count)); Oid *paramTypes = va_arg(ap, typeof(paramTypes)); const char **paramValues = va_arg(ap, typeof(paramValues)); const int *paramLengths = va_arg(ap, typeof(paramLengths)); const int *paramFormats = va_arg(ap, typeof(paramFormats)); PGresult **res = va_arg(ap, typeof(res)); *res = PQexecParams(conn, sql, count, paramTypes, paramValues, paramLengths, paramFormats, 0); return 0; } /** push query result into lua stack */ static int lua_push_pgres(struct lua_State *L, PGresult *r) { if (!r) luaL_error(L, "PG internal error: zero rults"); switch(PQresultStatus(r)) { case PGRES_COMMAND_OK: lua_newtable(L); if (*PQcmdTuples(r) == 0) { lua_pushnumber(L, 0); } else { lua_pushstring(L, PQcmdTuples(r)); double v = lua_tonumber(L, -1); lua_pop(L, 1); lua_pushnumber(L, v); } lua_pushstring(L, PQcmdStatus(r)); return 3; case PGRES_TUPLES_OK: break; case PGRES_BAD_RESPONSE: luaL_error(L, "Broken postgresql response"); case PGRES_FATAL_ERROR: case PGRES_NONFATAL_ERROR: case PGRES_EMPTY_QUERY: luaL_error(L, "%s", PQresultErrorMessage(r)); default: luaL_error(L, "box.net.sql.pg: internal error"); } lua_newtable(L); int count = PQntuples(r); int cols = PQnfields(r); for (int i = 0; i < count; i++) { lua_pushnumber(L, i + 1); lua_newtable(L); for (int j = 0; j < cols; j++) { if (PQgetisnull(r, i, j)) continue; lua_pushstring(L, PQfname(r, j)); const char *s = PQgetvalue(r, i, j); int len = PQgetlength(r, i, j); switch (PQftype(r, j)) { case INT2OID: case INT4OID: case INT8OID: case NUMERICOID: { lua_pushlstring(L, s, len); double v = lua_tonumber(L, -1); lua_pop(L, 1); lua_pushnumber(L, v); break; } case BOOLOID: if (*s == 't' || *s == 'T') lua_pushboolean(L, 1); else lua_pushboolean(L, 0); break; default: lua_pushlstring(L, s, len); break; } lua_settable(L, -3); } lua_settable(L, -3); } if (*PQcmdTuples(r) == 0) { lua_pushnumber(L, 0); } else { lua_pushstring(L, PQcmdTuples(r)); double v = lua_tonumber(L, -1); lua_pop(L, 1); lua_pushnumber(L, v); } lua_pushstring(L, PQcmdStatus(r)); return 3; } /** execute method */ static int lua_pg_execute(struct lua_State *L) { PGconn *conn = lua_check_pgconn(L, 1); const char *sql = lua_tostring(L, 2); int count = lua_gettop(L) - 2; const char **paramValues = NULL; int *paramLengths = NULL; int *paramFormats = NULL; Oid *paramTypes = NULL; if (count > 0) { /* Allocate memory for params using lua_newuserdata */ char *buf = (char *) lua_newuserdata(L, count * (sizeof(*paramValues) + sizeof(*paramLengths) + sizeof(*paramFormats) + sizeof(*paramTypes))); paramValues = (const char **) buf; buf += count * sizeof(*paramValues); paramLengths = (int *) buf; buf += count * sizeof(*paramLengths); paramFormats = (int *) buf; buf += count * sizeof(*paramFormats); paramTypes = (Oid *) buf; buf += count * sizeof(*paramTypes); for(int i = 0, idx = 3; i < count; i++, idx++) { if (lua_isnil(L, idx)) { paramValues[i] = NULL; paramLengths[i] = 0; paramFormats[i] = 0; paramTypes[i] = 0; continue; } if (lua_isboolean(L, idx)) { int v = lua_toboolean(L, idx); static const char pg_true[] = "t"; static const char pg_false[] = "f"; paramValues[i] = v ? pg_true : pg_false; paramLengths[i] = 1; paramFormats[i] = 0; paramTypes[i] = BOOLOID; continue; } size_t len; const char *s = lua_tolstring(L, idx, &len); if (lua_isnumber(L, idx)) { paramTypes[i] = NUMERICOID; paramValues[i] = s; paramLengths[i] = len; paramFormats[i] = 0; continue; } paramValues[i] = s; paramLengths[i] = len; paramFormats[i] = 0; paramTypes[i] = TEXTOID; } /* transform sql placeholders */ luaL_Buffer b; luaL_buffinit(L, &b); char num[10]; for (int i = 0, j = 1; sql[i]; i++) { if (sql[i] != '?') { luaL_addchar(&b, sql[i]); continue; } luaL_addchar(&b, '$'); snprintf(num, 10, "%d", j++); luaL_addstring(&b, num); } luaL_pushresult(&b); sql = lua_tostring(L, -1); } PGresult *res = NULL; if (coeio_custom(pg_exec, TIMEOUT_INFINITY, conn, sql, count, paramTypes, paramValues, paramLengths, paramFormats, &res) == -1) { luaL_error(L, "Can't execute sql: %s", strerror(errno)); } auto scope_guard = make_scoped_guard([&]{ PQclear(res); }); lua_settop(L, 0); return lua_push_pgres(L, res); } /** * collect connection */ static int lua_pg_gc(struct lua_State *L) { PGconn *conn = lua_check_pgconn(L, 1); PQfinish(conn); return 0; } /** * prints warnings from Postgresql into tarantool log */ static void pg_notice(void *arg, const char *message) { say_info("Postgresql: %s", message); (void)arg; } /** * do connect to postgresql (is run in the other thread) */ static ssize_t pg_connect(va_list ap) { const char *constr = va_arg(ap, typeof(constr)); PGconn **conn = va_arg(ap, typeof(conn)); *conn = PQconnectdb(constr); if (*conn) PQsetNoticeProcessor(*conn, pg_notice, NULL); return 0; } /** * returns self.field as C-string */ static const char * self_field(struct lua_State *L, const char *name, int index) { lua_pushstring(L, name); if (index < 0) index--; lua_rawget(L, index); const char *res; if (lua_isnil(L, -1)) res = NULL; else res = lua_tostring(L, -1); lua_pop(L, 1); return res; } /** * quote variable */ static int lua_pg_quote(struct lua_State *L) { if (lua_gettop(L) < 2) { lua_pushnil(L); return 1; } PGconn *conn = lua_check_pgconn(L, 1); size_t len; const char *s = lua_tolstring(L, -1, &len); s = PQescapeLiteral(conn, s, len); if (!s) luaL_error(L, "Can't allocate memory"); lua_pushstring(L, s); free((void *)s); return 1; } /** * quote identifier */ static int lua_pg_quote_ident(struct lua_State *L) { if (lua_gettop(L) < 2) { lua_pushnil(L); return 1; } PGconn *conn = lua_check_pgconn(L, 1); size_t len; const char *s = lua_tolstring(L, -1, &len); s = PQescapeIdentifier(conn, s, len); if (!s) luaL_error(L, "Can't allocate memory"); lua_pushstring(L, s); free((void *)s); return 1; } /** * connect to postgresql */ static int lbox_net_pg_connect(struct lua_State *L) { const char *host = self_field(L, "host", 1); const char *port = self_field(L, "port", 1); const char *user = self_field(L, "user", 1); const char *pass = self_field(L, "password", 1); const char *db = self_field(L, "db", 1); if (!host || (!port) || (!user) || (!pass) || (!db)) { luaL_error(L, "Usage: box.net.sql.connect" "('pg', host, port, user, password, db, ...)" ); } PGconn *conn = NULL; luaL_Buffer b; luaL_buffinit(L, &b); luaL_addstring(&b, "host='"); luaL_addstring(&b, host); luaL_addstring(&b, "' port='"); luaL_addstring(&b, port); luaL_addstring(&b, "' user='"); luaL_addstring(&b, user); luaL_addstring(&b, "' password='"); luaL_addstring(&b, pass); luaL_addstring(&b, "' dbname='"); luaL_addstring(&b, db); luaL_addchar(&b, '\''); luaL_pushresult(&b); const char *constr = lua_tostring(L, -1); if (coeio_custom(pg_connect, TIMEOUT_INFINITY, constr, &conn) == -1) { luaL_error(L, "Can't connect to postgresql: %s", strerror(errno)); } /* cleanup stack */ lua_pop(L, 1); if (PQstatus(conn) != CONNECTION_OK) { luaL_Buffer b; luaL_buffinit(L, &b); luaL_addstring(&b, PQerrorMessage(conn)); luaL_pushresult(&b); PQfinish(conn); lua_error(L); } lua_pushstring(L, "raw"); PGconn **ptr = (PGconn **)lua_newuserdata(L, sizeof(conn)); *ptr = conn; lua_newtable(L); lua_pushstring(L, "__index"); lua_newtable(L); static const struct luaL_reg meta [] = { {"execute", lua_pg_execute}, {"quote", lua_pg_quote}, {"quote_ident", lua_pg_quote_ident}, {NULL, NULL} }; luaL_register(L, NULL, meta); lua_settable(L, -3); lua_pushstring(L, "__gc"); lua_pushcfunction(L, lua_pg_gc); lua_settable(L, -3); lua_setmetatable(L, -2); lua_rawset(L, 1); /* return self */ lua_pushvalue(L, 1); return 1; } static void init(struct lua_State *L) { lua_getfield(L, LUA_GLOBALSINDEX, "box"); /* stack: box */ lua_pushstring(L, "net"); lua_rawget(L, -2); /* stack: box.net */ lua_pushstring(L, "sql"); lua_rawget(L, -2); /* stack: box.net.sql */ lua_pushstring(L, "connectors"); lua_rawget(L, -2); /* stack: box.net.sql.connectors */ /* stack: box, box.net.sql.connectors */ lua_pushstring(L, "pg"); lua_pushcfunction(L, lbox_net_pg_connect); lua_rawset(L, -3); /* alias for driver */ lua_pushstring(L, "postgresql"); lua_pushcfunction(L, lbox_net_pg_connect); lua_rawset(L, -3); /* cleanup stack */ lua_pop(L, 4); } DECLARE_PLUGIN(PLUGIN_NAME, PLUGIN_VERSION, init, NULL); tarantool-1.5.1.218.g1a69fd6/src/plugin/CMakeLists.txt0000664000000000000000000000005612202131537020602 0ustar rootrootadd_subdirectory(pg) add_subdirectory(mysql) tarantool-1.5.1.218.g1a69fd6/src/plugin/Makefile0000664000000000000000000001524012213333034017501 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/plugin/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/plugin/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/tarantool.cc0000664000000000000000000005314212232452532017066 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool.h" #include "tarantool/config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(TARGET_OS_LINUX) && defined(HAVE_PRCTL_H) # include #endif #include #include #include #include #include #include "mutex.h" #include #include #include #include #include #include #include #include "tarantool/util.h" extern "C" { #include #include #include } /* extern "C" */ #include "tt_pthread.h" #include "lua/init.h" #include "memcached.h" #include "session.h" #include "box/box.h" #include "scoped_guard.h" static pid_t master_pid; const char *cfg_filename = NULL; char *cfg_filename_fullpath = NULL; char *binary_filename; char *custom_proc_title; char **main_argv; int main_argc; static void *main_opt = NULL; struct tarantool_cfg cfg; /** Signals handled after start as part of the event loop. */ static ev_signal ev_sigs[4]; static const int ev_sig_count = sizeof(ev_sigs)/sizeof(*ev_sigs); int snapshot_pid = 0; /* snapshot processes pid */ uint32_t snapshot_version = 0; extern const void *opt_def; static int core_check_config(struct tarantool_cfg *conf) { if (strindex(wal_mode_STRS, conf->wal_mode, WAL_MODE_MAX) == WAL_MODE_MAX) { out_warning(CNF_OK, "wal_mode %s is not recognized", conf->wal_mode); return -1; } return 0; } void title(const char *fmt, ...) { va_list ap; char buf[128], *bufptr = buf, *bufend = buf + sizeof(buf); va_start(ap, fmt); bufptr += vsnprintf(bufptr, bufend - bufptr, fmt, ap); va_end(ap); int ports[] = { cfg.primary_port, cfg.secondary_port, cfg.memcached_port, cfg.admin_port, cfg.replication_port }; int *pptr = ports; const char *names[] = { "pri", "sec", "memc", "adm", "rpl", NULL }; const char **nptr = names; for (; *nptr; nptr++, pptr++) if (*pptr) bufptr += snprintf(bufptr, bufend - bufptr, " %s: %i", *nptr, *pptr); set_proc_title(buf); } static int load_cfg(struct tarantool_cfg *conf, int32_t check_rdonly) { FILE *f; int32_t n_accepted, n_skipped, n_ignored; tbuf_reset(cfg_out); if (cfg_filename_fullpath != NULL) f = fopen(cfg_filename_fullpath, "r"); else f = fopen(cfg_filename, "r"); if (f == NULL) { out_warning(CNF_OK, "can't open config `%s'", cfg_filename); return -1; } int syntax = parse_cfg_file_tarantool_cfg(conf, f, check_rdonly, &n_accepted, &n_skipped, &n_ignored); fclose(f); if (syntax != 0) return -1; if (check_cfg_tarantool_cfg(conf) != 0) return -1; if (n_skipped != 0) return -1; if (n_accepted == 0) { out_warning(CNF_OK, "empty configuration file '%s'", cfg_filename); return -1; } if (core_check_config(conf) != 0) return -1; if (replication_check_config(conf) != 0) return -1; return box_check_config(conf); } static int core_reload_config(const struct tarantool_cfg *old_conf, const struct tarantool_cfg *new_conf) { if (strcasecmp(old_conf->wal_mode, new_conf->wal_mode) != 0 || old_conf->wal_fsync_delay != new_conf->wal_fsync_delay) { double new_delay = new_conf->wal_fsync_delay; /* Mode has changed: */ if (strcasecmp(old_conf->wal_mode, new_conf->wal_mode)) { if (strcasecmp(old_conf->wal_mode, "fsync") == 0 || strcasecmp(new_conf->wal_mode, "fsync") == 0) { out_warning(CNF_OK, "wal_mode cannot switch to/from fsync"); return -1; } } /* * Unless wal_mode=fsync_delay, wal_fsync_delay is * irrelevant and must be 0. */ if (strcasecmp(new_conf->wal_mode, "fsync_delay") != 0) new_delay = 0.0; recovery_update_mode(recovery_state, new_conf->wal_mode, new_delay); } if (old_conf->snap_io_rate_limit != new_conf->snap_io_rate_limit) recovery_update_io_rate_limit(recovery_state, new_conf->snap_io_rate_limit); if (old_conf->io_collect_interval != new_conf->io_collect_interval) ev_set_io_collect_interval(new_conf->io_collect_interval); return 0; } int reload_cfg(struct tbuf *out) { static struct mutex *mutex = NULL; struct tarantool_cfg new_cfg, aux_cfg; if (mutex == NULL) { mutex = (struct mutex *) palloc(eter_pool, sizeof(*mutex)); mutex_create(mutex); } if (mutex_trylock(mutex) == true) { out_warning(CNF_OK, "Could not reload configuration: it is being reloaded right now"); tbuf_append(out, cfg_out->data, cfg_out->size); return -1; } auto scoped_guard = make_scoped_guard([&] { destroy_tarantool_cfg(&aux_cfg); destroy_tarantool_cfg(&new_cfg); if (cfg_out->size != 0) tbuf_append(out, cfg_out->data, cfg_out->size); mutex_unlock(mutex); }); init_tarantool_cfg(&new_cfg); init_tarantool_cfg(&aux_cfg); /* Prepare a copy of the original config file for confetti, so that it can compare the new file with the old one when loading the new file. Load the new file and return an error if it contains a different value for some read-only parameter. */ if (dup_tarantool_cfg(&aux_cfg, &cfg) != 0 || load_cfg(&aux_cfg, 1) != 0) return -1; /* Load the new configuration file, but skip the check for read only parameters. new_cfg contains only defaults and new settings. */ if (fill_default_tarantool_cfg(&new_cfg) != 0 || load_cfg(&new_cfg, 0) != 0) return -1; /* Check that no default value has been changed. */ char *diff = cmp_tarantool_cfg(&aux_cfg, &new_cfg, 1); if (diff != NULL) { out_warning(CNF_OK, "Could not accept read only '%s' option", diff); return -1; } /* Process wal-writer-related changes. */ if (core_reload_config(&cfg, &new_cfg) != 0) return -1; /* Now pass the config to the module, to take action. */ if (box_reload_config(&cfg, &new_cfg) != 0) return -1; /* All OK, activate the config. */ swap_tarantool_cfg(&cfg, &new_cfg); tarantool_lua_load_cfg(tarantool_L, &cfg); return 0; } /** Print the configuration file in YAML format. */ void show_cfg(struct tbuf *out) { tarantool_cfg_iterator_t *i; char *key, *value; tbuf_printf(out, "configuration:" CRLF); i = tarantool_cfg_iterator_init(); while ((key = tarantool_cfg_iterator_next(i, &cfg, &value)) != NULL) { if (value) { tbuf_printf(out, " %s: \"%s\"" CRLF, key, value); free(value); } else { tbuf_printf(out, " %s: (null)" CRLF, key); } } } const char * tarantool_version(void) { return PACKAGE_VERSION; } static double start_time; double tarantool_uptime(void) { return ev_now() - start_time; } int snapshot(void) { if (snapshot_pid) return EINPROGRESS; pid_t p = fork(); if (p < 0) { say_syserror("fork"); return -1; } if (p > 0) { snapshot_pid = p; /* increment snapshot version */ snapshot_version++; int status = wait_for_child(p); snapshot_pid = 0; return (WIFSIGNALED(status) ? EINTR : WEXITSTATUS(status)); } salloc_protect(); fiber_set_name(fiber, "dumper"); set_proc_title("dumper (%" PRIu32 ")", getppid()); /* * Safety: make sure we don't double-write * parent stdio buffers at exit(). */ close_all_xcpt(1, sayfd); /* * We must avoid double destruction of tuples on exit. * Since there is no way to remove existing handlers * registered in the master process, and snapshot_save() * may call exit(), push a top-level handler which will do * _exit() for us. */ snapshot_save(recovery_state, box_snapshot); exit(EXIT_SUCCESS); return 0; } /** * Create snapshot from signal handler (SIGUSR1) */ static void sig_snapshot(struct ev_signal *w, int revents) { (void) w; (void) revents; if (snapshot_pid) { say_warn("Snapshot process is already running," " the signal is ignored"); return; } fiber_call(fiber_new("snapshot", (fiber_func)snapshot)); } static void signal_cb(struct ev_signal *w, int revents) { (void) w; (void) revents; /* Terminate the main event loop */ ev_unloop(EV_A_ EVUNLOOP_ALL); } /** Try to log as much as possible before dumping a core. * * Core files are not aways allowed and it takes an effort to * extract useful information from them. * * *Recursive invocation* * * Unless SIGSEGV is sent by kill(), Linux * resets the signal a default value before invoking * the handler. * * Despite that, as an extra precaution to avoid infinite * recursion, we count invocations of the handler, and * quietly _exit() when called for a second time. */ static void sig_fatal_cb(int signo) { static volatile sig_atomic_t in_cb = 0; int fd = STDERR_FILENO; struct sigaction sa; /* Got a signal while running the handler. */ if (in_cb) { fdprintf(fd, "Fatal %d while backtracing", signo); goto end; } in_cb = 1; if (signo == SIGSEGV) fdprintf(fd, "Segmentation fault\n"); else fdprintf(fd, "Got a fatal signal %d\n", signo); fdprintf(fd, "Current time: %u\n", (unsigned) time(0)); fdprintf(fd, "Please file a bug at http://github.com/tarantool/tarantool/issues\n" "Attempting backtrace... Note: since the server has " "already crashed, \nthis may fail as well\n"); #ifdef ENABLE_BACKTRACE print_backtrace(); #endif end: /* Try to dump core. */ memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sa.sa_handler = SIG_DFL; sigaction(SIGABRT, &sa, NULL); abort(); } /** * This SIGTERM handler is only used before the main event loop started to * cleanup server pid file. The handler is replaced by ev_signal after the boot. * @sa signal_start */ static void sig_term_cb(int signo) { psignal(signo, ""); /* unlink pidfile. */ if (cfg.pid_file != NULL) unlink(cfg.pid_file); _exit(EXIT_SUCCESS); } static void signal_free(void) { int i; for (i = 0; i < ev_sig_count; i++) ev_signal_stop(&ev_sigs[i]); } static void signal_start(void) { for (int i = 0; i < ev_sig_count; i++) ev_signal_start(&ev_sigs[i]); } /** Make sure the child has a default signal disposition. */ static void signal_reset() { struct sigaction sa; /* Reset all signals to their defaults. */ memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sa.sa_handler = SIG_DFL; if (sigaction(SIGUSR1, &sa, NULL) == -1 || sigaction(SIGINT, &sa, NULL) == -1 || sigaction(SIGTERM, &sa, NULL) == -1 || sigaction(SIGHUP, &sa, NULL) == -1 || sigaction(SIGSEGV, &sa, NULL) == -1 || sigaction(SIGFPE, &sa, NULL) == -1) say_syserror("sigaction"); /* Unblock any signals blocked by libev. */ sigset_t sigset; sigfillset(&sigset); if (sigprocmask(SIG_UNBLOCK, &sigset, NULL) == -1) say_syserror("sigprocmask"); } /** * Adjust the process signal mask and add handlers for signals. */ static void signal_init(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; sigemptyset(&sa.sa_mask); if (sigaction(SIGPIPE, &sa, 0) == -1) panic_syserror("sigaction"); sa.sa_handler = sig_fatal_cb; if (sigaction(SIGSEGV, &sa, 0) == -1 || sigaction(SIGFPE, &sa, 0) == -1) { panic_syserror("sigaction"); } sa.sa_handler = sig_term_cb; if (sigaction(SIGUSR1, &sa, 0) == -1 || sigaction(SIGINT, &sa, 0) == -1 || sigaction(SIGTERM, &sa, 0) == -1 || sigaction(SIGHUP, &sa, 0) == -1) { panic_syserror("sigaction"); } ev_signal_init(&ev_sigs[0], sig_snapshot, SIGUSR1); ev_signal_init(&ev_sigs[1], signal_cb, SIGINT); ev_signal_init(&ev_sigs[2], signal_cb, SIGTERM); ev_signal_init(&ev_sigs[3], signal_cb, SIGHUP); (void) tt_pthread_atfork(NULL, NULL, signal_reset); } static void create_pid(void) { FILE *f; char buf[16] = { 0 }; pid_t pid; if (cfg.pid_file == NULL) return; f = fopen(cfg.pid_file, "a+"); if (f == NULL) panic_syserror("can't open pid file"); /* * fopen() is not guaranteed to set the seek position to * the beginning of file according to ANSI C (and, e.g., * on FreeBSD. */ if (fseeko(f, 0, SEEK_SET) != 0) panic_syserror("can't fseek to the beginning of pid file"); if (fgets(buf, sizeof(buf), f) != NULL && strlen(buf) > 0) { pid = strtol(buf, NULL, 10); if (pid > 0 && kill(pid, 0) == 0) panic("the daemon is already running"); else say_info("updating a stale pid file"); if (fseeko(f, 0, SEEK_SET) != 0) panic_syserror("can't fseek to the beginning of pid file"); if (ftruncate(fileno(f), 0) == -1) panic_syserror("ftruncate(`%s')", cfg.pid_file); } master_pid = getpid(); fprintf(f, "%i\n", master_pid); fclose(f); } /** Run in the background. */ static void background() { switch (fork()) { case -1: goto error; case 0: /* child */ break; default: /* parent */ exit(EXIT_SUCCESS); } if (setsid() == -1) goto error; /* * Prints to stdout on failure, so got to be done before * we close it. */ create_pid(); close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); return; error: exit(EXIT_FAILURE); } void tarantool_lua_free() { /* * Got to be done prior to anything else, since GC * handlers can refer to other subsystems (e.g. fibers). */ if (tarantool_L) tarantool_lua_close(tarantool_L); tarantool_L = NULL; } void tarantool_free(void) { /* Do nothing in a fork. */ if (getpid() != master_pid) return; signal_free(); memcached_free(); tarantool_lua_free(); box_free(); recovery_free(); stat_free(); if (cfg_filename_fullpath) free(cfg_filename_fullpath); if (main_opt) gopt_free(main_opt); free_proc_title(main_argc, main_argv); /* unlink pidfile. */ if (cfg.pid_file != NULL) unlink(cfg.pid_file); destroy_tarantool_cfg(&cfg); session_free(); fiber_free(); palloc_free(); ev_default_destroy(); #ifdef ENABLE_GCOV __gcov_flush(); #endif #ifdef HAVE_BFD symbols_free(); #endif } static void initialize_minimal() { if (!salloc_init(64 * 1000 * 1000, 4, 2)) panic_syserror("can't initialize slab allocator"); fiber_init(); coeio_init(); } /** Callback of snapshot_save() when doing --init-storage */ void init_storage(struct log_io * /* l */, struct fio_batch * /* batch */) { /* Nothing. */ } int main(int argc, char **argv) { const char *cfg_paramname = NULL; #ifndef HAVE_LIBC_STACK_END /* * GNU libc provides a way to get at the top of the stack. This * is, of course, not-standard and doesn't work on non-GNU * systems, such as FreeBSD. But as far as we're concerned, argv * is at the top of the main thread's stack, so save the address * of it. */ __libc_stack_end = (void*) &argv; #endif crc32_init(); stat_init(); palloc_init(); #ifdef HAVE_BFD symbols_load(argv[0]); #endif argv = init_set_proc_title(argc, argv); main_argc = argc; main_argv = argv; void *opt = gopt_sort(&argc, (const char **)argv, opt_def); main_opt = opt; binary_filename = argv[0]; if (gopt(opt, 'V')) { printf("Tarantool %s\n", tarantool_version()); printf("Target: %s\n", BUILD_INFO); printf("Build options: %s\n", BUILD_OPTIONS); printf("Compiler: %s\n", COMPILER_INFO); printf("C_FLAGS:%s\n", TARANTOOL_C_FLAGS); printf("CXX_FLAGS:%s\n", TARANTOOL_CXX_FLAGS); return 0; } if (gopt(opt, 'h')) { puts("Tarantool -- an efficient in-memory data store."); printf("Usage: %s [OPTIONS]\n", basename(argv[0])); puts(""); gopt_help(opt_def); puts(""); puts("Please visit project home page at http://tarantool.org"); puts("to see online documentation, submit bugs or contribute a patch."); return 0; } gopt_arg(opt, 'c', &cfg_filename); /* * if config is not specified trying ./tarantool.cfg then * /etc/tarantool.cfg */ if (cfg_filename == NULL) { if (access(DEFAULT_CFG_FILENAME, F_OK) == 0) cfg_filename = DEFAULT_CFG_FILENAME; else if (access(DEFAULT_CFG, F_OK) == 0) cfg_filename = DEFAULT_CFG; else panic("can't load config " "%s or %s", DEFAULT_CFG_FILENAME, DEFAULT_CFG); } cfg.log_level += gopt(opt, 'v'); if (argc != 1) { fprintf(stderr, "Can't parse command line: try --help or -h for help.\n"); exit(EX_USAGE); } if (cfg_filename[0] != '/') { cfg_filename_fullpath = (char *) malloc(PATH_MAX); if (getcwd(cfg_filename_fullpath, PATH_MAX - strlen(cfg_filename) - 1) == NULL) { say_syserror("getcwd"); exit(EX_OSERR); } strcat(cfg_filename_fullpath, "/"); strcat(cfg_filename_fullpath, cfg_filename); } cfg_out = tbuf_new(eter_pool); assert(cfg_out); if (gopt(opt, 'k')) { if (fill_default_tarantool_cfg(&cfg) != 0 || load_cfg(&cfg, 0) != 0) { say_error("check_config FAILED" "%.*s", cfg_out->size, (char *)cfg_out->data); return 1; } return 0; } if (fill_default_tarantool_cfg(&cfg) != 0 || load_cfg(&cfg, 0) != 0) panic("can't load config:" "%.*s", cfg_out->size, (char *)cfg_out->data); if (gopt_arg(opt, 'g', &cfg_paramname)) { tarantool_cfg_iterator_t *i; char *key, *value; i = tarantool_cfg_iterator_init(); while ((key = tarantool_cfg_iterator_next(i, &cfg, &value)) != NULL) { if (strcmp(key, cfg_paramname) == 0 && value != NULL) { printf("%s\n", value); free(value); return 0; } free(value); } return 1; } if (cfg.work_dir != NULL && chdir(cfg.work_dir) == -1) say_syserror("can't chdir to `%s'", cfg.work_dir); if (cfg.username != NULL) { if (getuid() == 0 || geteuid() == 0) { struct passwd *pw; errno = 0; if ((pw = getpwnam(cfg.username)) == 0) { if (errno) { say_syserror("getpwnam: %s", cfg.username); } else { say_error("User not found: %s", cfg.username); } exit(EX_NOUSER); } if (setgid(pw->pw_gid) < 0 || setuid(pw->pw_uid) < 0 || seteuid(pw->pw_uid)) { say_syserror("setgit/setuid"); exit(EX_OSERR); } } else { say_error("can't switch to %s: i'm not root", cfg.username); } } if (cfg.coredump) { struct rlimit c = { 0, 0 }; if (getrlimit(RLIMIT_CORE, &c) < 0) { say_syserror("getrlimit"); exit(EX_OSERR); } c.rlim_cur = c.rlim_max; if (setrlimit(RLIMIT_CORE, &c) < 0) { say_syserror("setrlimit"); exit(EX_OSERR); } #if defined(TARGET_OS_LINUX) && defined(HAVE_PRCTL_H) if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) { say_syserror("prctl"); exit(EX_OSERR); } #endif } if (gopt(opt, 'I')) { initialize_minimal(); box_init(true); set_lsn(recovery_state, 1); snapshot_save(recovery_state, init_storage); exit(EXIT_SUCCESS); } if (gopt(opt, 'B')) { if (cfg.logger == NULL) { say_crit("--background requires 'logger' configuration option to be set"); exit(EXIT_FAILURE); } background(); } else { create_pid(); } /* init process title - used for logging */ if (cfg.custom_proc_title == NULL) { custom_proc_title = (char *) palloc(eter_pool, 1); custom_proc_title[0] = '\0'; } else { custom_proc_title = (char *) palloc(eter_pool, strlen(cfg.custom_proc_title) + 2); strcpy(custom_proc_title, "@"); strcat(custom_proc_title, cfg.custom_proc_title); } say_logger_init(cfg.logger_nonblock); /* main core cleanup routine */ atexit(tarantool_free); ev_default_loop(EVFLAG_AUTO); fiber_init(); replication_prefork(); coeio_init(); salloc_init(cfg.slab_alloc_arena * (1 << 30) /* GB */, cfg.slab_alloc_minimal, cfg.slab_alloc_factor); signal_init(); try { say_crit("version %s", tarantool_version()); tarantool_L = tarantool_lua_init(); box_init(false); memcached_init(cfg.bind_ipaddr, cfg.memcached_port); tarantool_lua_load_cfg(tarantool_L, &cfg); /* * init iproto before admin and after memcached: * recovery is finished on bind to the primary port, * and it has to happen before requests on the * administrative port start to arrive. * And when recovery is finalized, memcached * expire loop is started, so binding can happen * only after memcached is initialized. */ iproto_init(cfg.bind_ipaddr, cfg.primary_port, cfg.secondary_port); admin_init(cfg.bind_ipaddr, cfg.admin_port); replication_init(cfg.bind_ipaddr, cfg.replication_port); session_init(); /* * Load user init script. The script should have access * to Tarantool Lua API (box.cfg, box.fiber, etc...) that * is why script must run only after the server was fully * initialized. */ tarantool_lua_load_init_script(tarantool_L); prelease(fiber->gc_pool); say_crit("log level %i", cfg.log_level); say_crit("entering event loop"); if (cfg.io_collect_interval > 0) ev_set_io_collect_interval(cfg.io_collect_interval); ev_now_update(); start_time = ev_now(); signal_start(); ev_loop(0); } catch (const Exception& e) { e.log(); panic("%s", "Fatal error, exiting loop"); } say_crit("exiting loop"); /* freeing resources */ return 0; } tarantool-1.5.1.218.g1a69fd6/src/object.cc0000664000000000000000000000246612202131537016330 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "object.h" tarantool-1.5.1.218.g1a69fd6/src/crc32.c0000664000000000000000000000321312202131537015622 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "crc32.h" #include #include /* * Pointer to an architecture-specific implementation of * CRC32 calculation method. */ crc32_func crc32_calc = NULL; void crc32_init() { #if defined (__x86_64__) || defined (__i386__) crc32_calc = sse42_enabled_cpu() ? &crc32c_hw : &crc32c; #else crc32_calc = &crc32c; #endif } tarantool-1.5.1.218.g1a69fd6/src/iproto.cc0000664000000000000000000005456012231715276016412 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "iproto.h" #include #include #include #include #include "iproto_port.h" #include "tarantool.h" #include "exception.h" #include "errcode.h" #include "fiber.h" #include "say.h" #include "evio.h" #include "session.h" #include "scoped_guard.h" static struct iproto_header dummy_header = { 0, 0, 0 }; const uint32_t msg_ping = 0xff00; /* {{{ iproto_queue */ struct iproto_request; /** * Implementation of an input queue of the box request processor. * * Socket event handlers read data, determine request boundaries * and enqueue requests. Once all input/output events are * processed, an own event handler is invoked to deal with the * requests in the queue: it's important that each request is * processed in a fiber environment. * * @sa iproto_queue_schedule, iproto_handler, iproto_handshake */ struct iproto_queue { /** * Ring buffer of fixed size, preallocated * during initialization. */ struct iproto_request *queue; /** * Main function of the fiber invoked to handle * all outstanding tasks in this queue. */ void (*handler)(va_list); /** * Cache of fibers which work on requests * in this queue. */ struct rlist fiber_cache; /** * Used to trigger request processing when * the queue becomes non-empty. */ struct ev_async watcher; /* Ring buffer position. */ int begin, end; /* Ring buffer size. */ int size; }; enum { IPROTO_REQUEST_QUEUE_SIZE = 2048, }; struct iproto_session; typedef void (*iproto_request_f)(struct iproto_request *); /** * A single request from the client. All requests * from all clients are queued into a single queue * and processed in FIFO order. */ struct iproto_request { struct iproto_session *session; struct iobuf *iobuf; /* Position of the request in the input buffer. */ struct iproto_header *header; iproto_request_f process; }; /** * A single global queue for all requests in all connections. All * requests are processed concurrently. * Is also used as a queue for just established connections and to * execute disconnect triggers. A few notes about these triggers: * - they need to be run in a fiber * - unlike an ordinary request failure, on_connect trigger * failure must lead to connection shutdown. * - as long as on_connect trigger can be used for client * authentication, it must be processed before any other request * on this connection. */ static struct iproto_queue request_queue; static inline bool iproto_queue_is_empty(struct iproto_queue *i_queue) { return i_queue->begin == i_queue->end; } static inline void iproto_enqueue_request(struct iproto_queue *i_queue, struct iproto_session *session, struct iobuf *iobuf, struct iproto_header *header, iproto_request_f process) { /* If the queue is full, invoke the handler to work it off. */ if (i_queue->end == i_queue->size) ev_invoke(&i_queue->watcher, EV_CUSTOM); assert(i_queue->end < i_queue->size); bool was_empty = iproto_queue_is_empty(i_queue); struct iproto_request *request = i_queue->queue + i_queue->end++; request->session = session; request->iobuf = iobuf; request->header = header; request->process = process; /* * There were some queued requests, ensure they are * handled. */ if (was_empty) ev_feed_event(&request_queue.watcher, EV_CUSTOM); } static inline bool iproto_dequeue_request(struct iproto_queue *i_queue, struct iproto_request *out) { if (i_queue->begin == i_queue->end) return false; struct iproto_request *request = i_queue->queue + i_queue->begin++; if (i_queue->begin == i_queue->end) i_queue->begin = i_queue->end = 0; *out = *request; return true; } /** Put the current fiber into a queue fiber cache. */ static inline void iproto_cache_fiber(struct iproto_queue *i_queue) { fiber_gc(); rlist_add_entry(&i_queue->fiber_cache, fiber, state); fiber_yield(); } /** Create fibers to handle all outstanding tasks. */ static void iproto_queue_schedule(struct ev_async *watcher, int events __attribute__((unused))) { struct iproto_queue *i_queue = (struct iproto_queue *) watcher->data; while (! iproto_queue_is_empty(i_queue)) { struct fiber *f; if (! rlist_empty(&i_queue->fiber_cache)) f = rlist_shift_entry(&i_queue->fiber_cache, struct fiber, state); else f = fiber_new("iproto", i_queue->handler); fiber_call(f, i_queue); } } static inline void iproto_queue_init(struct iproto_queue *i_queue, int size, void (*handler)(va_list)) { i_queue->size = size; i_queue->begin = i_queue->end = 0; i_queue->queue = (struct iproto_request *) palloc(eter_pool, size * sizeof (struct iproto_request)); /** * Initialize an ev_async event which would start * workers for all outstanding tasks. */ ev_async_init(&i_queue->watcher, iproto_queue_schedule); i_queue->watcher.data = i_queue; i_queue->handler = handler; rlist_create(&i_queue->fiber_cache); } static inline uint32_t iproto_session_id(struct iproto_session *session); static inline uint64_t iproto_session_cookie(struct iproto_session *session); /** A handler to process all queued requests. */ static void iproto_queue_handler(va_list ap) { struct iproto_queue *i_queue = va_arg(ap, struct iproto_queue *); struct iproto_request request; restart: while (iproto_dequeue_request(i_queue, &request)) { fiber_set_sid(fiber, iproto_session_id(request.session), iproto_session_cookie(request.session)); request.process(&request); } iproto_cache_fiber(&request_queue); goto restart; } /* }}} */ /* {{{ iproto_session */ /** Context of a single client connection. */ struct iproto_session { /* Cache of iproto_session objects. */ SLIST_ENTRY(iproto_session) next_in_cache; /** * Two rotating buffers for I/O. Input is always read into * iobuf[0]. As soon as iobuf[0] input buffer becomes full, * iobuf[0] is moved to iobuf[1], for flushing. As soon as * all output in iobuf[1].out is sent to the client, iobuf[1] * and iobuf[0] are moved around again. */ struct iobuf *iobuf[2]; /* * Size of readahead which is not parsed yet, i.e. * size of a piece of request which is not fully read. * Is always relative to iobuf[0]->in.end. In other words, * iobuf[0]->in.end - parse_size gives the start of the * unparsed request. A size rather than a pointer is used * to be safe in case in->buf is reallocated. Being * relative to in->end, rather than to in->pos is helpful to * make sure ibuf_reserve() or iobuf rotation don't make * the value meaningless. */ ssize_t parse_size; /** Current write position in the output buffer */ struct obuf_svp write_pos; /** * Function of the request processor to handle * a single request. */ box_process_func *handler; struct ev_io input; struct ev_io output; /** Session id. */ uint32_t sid; uint64_t cookie; }; SLIST_HEAD(, iproto_session) iproto_session_cache = SLIST_HEAD_INITIALIZER(iproto_session_cache); /** * A session is idle when the client is gone * and there are no outstanding requests in the request queue. * An idle session can be safely garbage collected. * Note: a session only becomes idle after iproto_session_shutdown(), * which closes the fd. This is why here the check is for * evio_is_active() (false if fd is closed), not ev_is_active() * (false if event is not started). */ static inline bool iproto_session_is_idle(struct iproto_session *session) { return !evio_is_active(&session->input) && ibuf_size(&session->iobuf[0]->in) == 0 && ibuf_size(&session->iobuf[1]->in) == 0; } static inline uint32_t iproto_session_id(struct iproto_session *session) { return session->sid; } static inline uint64_t iproto_session_cookie(struct iproto_session *session) { return session->cookie; } static void iproto_session_on_input(struct ev_io *watcher, int revents __attribute__((unused))); static void iproto_session_on_output(struct ev_io *watcher, int revents __attribute__((unused))); static void iproto_process_request(struct iproto_request *request); static void iproto_process_connect(struct iproto_request *request); static void iproto_process_disconnect(struct iproto_request *request); static struct iproto_session * iproto_session_create(const char *name, int fd, struct sockaddr_in *addr, box_process_func *param) { struct iproto_session *session; if (SLIST_EMPTY(&iproto_session_cache)) { session = (struct iproto_session *) palloc(eter_pool, sizeof(*session)); session->input.data = session->output.data = session; } else { session = SLIST_FIRST(&iproto_session_cache); SLIST_REMOVE_HEAD(&iproto_session_cache, next_in_cache); assert(session->input.fd == -1); assert(session->output.fd == -1); } session->handler = param; ev_io_init(&session->input, iproto_session_on_input, fd, EV_READ); ev_io_init(&session->output, iproto_session_on_output, fd, EV_WRITE); session->iobuf[0] = iobuf_new(name); session->iobuf[1] = iobuf_new(name); session->parse_size = 0; session->write_pos = obuf_create_svp(&session->iobuf[0]->out); session->sid = 0; session->cookie = *(uint64_t *) addr; return session; } /** Recycle a session. Never throws. */ static inline void iproto_session_destroy(struct iproto_session *session) { assert(iproto_session_is_idle(session)); assert(!evio_is_active(&session->output)); session_destroy(session->sid); /* Never throws. No-op if sid is 0. */ iobuf_delete(session->iobuf[0]); iobuf_delete(session->iobuf[1]); SLIST_INSERT_HEAD(&iproto_session_cache, session, next_in_cache); } static inline void iproto_session_shutdown(struct iproto_session *session) { ev_io_stop(&session->input); ev_io_stop(&session->output); close(session->input.fd); session->input.fd = session->output.fd = -1; /* * Discard unparsed data, to recycle the session * as soon as all parsed data is processed. */ session->iobuf[0]->in.end -= session->parse_size; /* * If the session is not idle, it is destroyed * after the last request is handled. Otherwise, * queue a separate request to run on_disconnect() * trigger and destroy the session. * Sic: the check is mandatory to not destroy a session * twice. */ if (iproto_session_is_idle(session)) { iproto_enqueue_request(&request_queue, session, session->iobuf[0], &dummy_header, iproto_process_disconnect); } } static inline void iproto_validate_header(struct iproto_header *header, int fd) { (void) fd; if (header->len > IPROTO_BODY_LEN_MAX) { /* * The package is too big, just close connection for now to * avoid DoS. */ tnt_raise(IllegalParams, "received package is too big"); } } /** * If there is no space for reading input, we can do one of the * following: * - try to get a new iobuf, so that it can fit the request. * Always getting a new input buffer when there is no space * makes the server susceptible to input-flood attacks. * Therefore, at most 2 iobufs are used in a single session, * one is "open", receiving input, and the other is closed, * flushing output. * - stop input and wait until the client reads piled up output, * so the input buffer can be reused. This complements * the previous strategy. It is only safe to stop input if it * is known that there is output. In this case input event * flow will be resumed when all replies to previous requests * are sent, in iproto_session_gc_iobuf(). Since there are two * buffers, the input is only stopped when both of them * are fully used up. * * To make this strategy work, each iobuf in use must fit at * least one request. Otherwise, iobuf[1] may end * up having no data to flush, while iobuf[0] is too small to * fit a big incoming request. */ static struct iobuf * iproto_session_input_iobuf(struct iproto_session *session) { struct iobuf *oldbuf = session->iobuf[0]; ssize_t to_read = sizeof(struct iproto_header) + (session->parse_size >= sizeof(struct iproto_header) ? iproto(oldbuf->in.end - session->parse_size)->len : 0) - session->parse_size; if (ibuf_unused(&oldbuf->in) >= to_read) return oldbuf; /** All requests are processed, reuse the buffer. */ if (ibuf_size(&oldbuf->in) == session->parse_size) { ibuf_reserve(&oldbuf->in, to_read); return oldbuf; } if (! iobuf_is_idle(session->iobuf[1])) { /* * Wait until the second buffer is flushed * and becomes available for reuse. */ return NULL; } struct iobuf *newbuf = session->iobuf[1]; ibuf_reserve(&newbuf->in, to_read + session->parse_size); /* * Discard unparsed data in the old buffer, otherwise it * won't be recycled when all parsed requests are processed. */ oldbuf->in.end -= session->parse_size; /* Move the cached request prefix to the new buffer. */ memcpy(newbuf->in.pos, oldbuf->in.end, session->parse_size); newbuf->in.end += session->parse_size; /* * Rotate buffers. Not strictly necessary, but * helps preserve response order. */ session->iobuf[1] = oldbuf; session->iobuf[0] = newbuf; return newbuf; } /** Enqueue all requests which were read up. */ static inline void iproto_enqueue_batch(struct iproto_session *session, struct ibuf *in, int fd) { int batch_size; for (batch_size = 0; ; batch_size++) { if (session->parse_size < sizeof(struct iproto_header)) break; struct iproto_header * header = iproto(in->end - session->parse_size); iproto_validate_header(header, fd); if (session->parse_size < (sizeof(struct iproto_header) + header->len)) break; iproto_enqueue_request(&request_queue, session, session->iobuf[0], header, iproto_process_request); session->parse_size -= sizeof(*header) + header->len; } } static void iproto_session_on_input(struct ev_io *watcher, int revents __attribute__((unused))) { struct iproto_session *session = (struct iproto_session *) watcher->data; int fd = session->input.fd; assert(fd >= 0); try { /* Ensure we have sufficient space for the next round. */ struct iobuf *iobuf = iproto_session_input_iobuf(session); if (iobuf == NULL) { ev_io_stop(&session->input); return; } struct ibuf *in = &iobuf->in; /* Read input. */ int nrd = sio_read(fd, in->end, ibuf_unused(in)); if (nrd < 0) { /* Socket is not ready. */ ev_io_start(&session->input); return; } if (nrd == 0) { /* EOF */ iproto_session_shutdown(session); return; } /* Update the read position and session state. */ in->end += nrd; session->parse_size += nrd; /* Enqueue all requests which are fully read up. */ iproto_enqueue_batch(session, in, fd); /* * Keep reading input, as long as the socket * supplies data. */ if (!ev_is_active(&session->input)) ev_feed_event(&session->input, EV_READ); } catch (const Exception& e) { e.log(); iproto_session_shutdown(session); } } /** Get the iobuf which is currently being flushed. */ static inline struct iobuf * iproto_session_output_iobuf(struct iproto_session *session) { if (obuf_size(&session->iobuf[1]->out)) return session->iobuf[1]; /* * Don't try to write from a newer buffer if an older one * exists: in case of a partial write of a newer buffer, * the client may end up getting a salad of different * pieces of replies from both buffers. */ if (ibuf_size(&session->iobuf[1]->in) == 0 && obuf_size(&session->iobuf[0]->out)) return session->iobuf[0]; return NULL; } /** writev() to the socket and handle the output. */ static int iproto_flush(struct iobuf *iobuf, int fd, struct obuf_svp *svp) { /* Begin writing from the saved position. */ struct iovec *iov = iobuf->out.iov + svp->pos; int iovcnt = obuf_iovcnt(&iobuf->out) - svp->pos; assert(iovcnt); ssize_t nwr; try { sio_add_to_iov(iov, -svp->iov_len); nwr = sio_writev(fd, iov, iovcnt); sio_add_to_iov(iov, svp->iov_len); } catch (const Exception&) { sio_add_to_iov(iov, svp->iov_len); throw; } if (nwr > 0) { if (svp->size + nwr == obuf_size(&iobuf->out)) { iobuf_gc(iobuf); *svp = obuf_create_svp(&iobuf->out); return 0; } svp->size += nwr; svp->pos += sio_move_iov(iov, nwr, &svp->iov_len); } return -1; } static void iproto_session_on_output(struct ev_io *watcher, int revent __attribute__((unused))) { struct iproto_session *session = (struct iproto_session *) watcher->data; int fd = session->output.fd; struct obuf_svp *svp = &session->write_pos; try { struct iobuf *iobuf; while ((iobuf = iproto_session_output_iobuf(session))) { if (iproto_flush(iobuf, fd, svp) < 0) { ev_io_start(&session->output); return; } if (! ev_is_active(&session->input)) ev_feed_event(&session->input, EV_READ); } if (ev_is_active(&session->output)) ev_io_stop(&session->output); } catch (const Exception& e) { e.log(); iproto_session_shutdown(session); } } /* }}} */ /* {{{ iproto_process_* functions */ /** Stack reply to 'ping' packet. */ static inline void iproto_reply_ping(struct obuf *out, struct iproto_header *req) { struct iproto_header reply = *req; reply.len = 0; obuf_dup(out, &reply, sizeof(reply)); } /** Send an error packet back. */ static inline void iproto_reply_error(struct obuf *out, struct iproto_header *req, const ClientError& e) { struct iproto_header reply = *req; int errmsg_len = strlen(e.errmsg()) + 1; uint32_t ret_code = tnt_errcode_val(e.errcode()); reply.len = sizeof(ret_code) + errmsg_len;; obuf_dup(out, &reply, sizeof(reply)); obuf_dup(out, &ret_code, sizeof(ret_code)); obuf_dup(out, e.errmsg(), errmsg_len); } /** Stack a reply to a single request to the fiber's io vector. */ static inline void iproto_reply(struct iproto_port *port, box_process_func callback, struct obuf *out, struct iproto_header *header) { if (header->msg_code == msg_ping) return iproto_reply_ping(out, header); /* Make request body point to iproto data */ char *body = (char *) &header[1]; iproto_port_init(port, out, header); try { callback((struct port *) port, header->msg_code, body, header->len); } catch (const ClientError& e) { if (port->reply.found) obuf_rollback_to_svp(out, &port->svp); iproto_reply_error(out, header, e); } } static void iproto_process_request(struct iproto_request *request) { struct iproto_session *session = request->session; struct iproto_header *header = request->header; struct iobuf *iobuf = request->iobuf; struct iproto_port port; auto scope_guard = make_scoped_guard([=]{ iobuf->in.pos += sizeof(*header) + header->len; if (iproto_session_is_idle(session)) iproto_session_destroy(session); }); if (unlikely(! evio_is_active(&session->output))) return; iproto_reply(&port, *session->handler, &iobuf->out, header); if (unlikely(! evio_is_active(&session->output))) return; if (! ev_is_active(&session->output)) ev_feed_event(&session->output, EV_WRITE); } /** * Handshake a connection: invoke the on-connect trigger * and possibly authenticate. Try to send the client an error * upon a failure. */ static void iproto_process_connect(struct iproto_request *request) { struct iproto_session *session = request->session; struct iobuf *iobuf = request->iobuf; int fd = session->input.fd; try { /* connect. */ session->sid = session_create(fd, session->cookie); } catch (const ClientError& e) { iproto_reply_error(&iobuf->out, request->header, e); try { iproto_flush(iobuf, fd, &session->write_pos); } catch (const Exception& e) { e.log(); } iproto_session_shutdown(session); return; } catch (const Exception& e) { e.log(); assert(session->sid == 0); iproto_session_shutdown(session); return; } /* * Connect is synchronous, so no one could have been * messing up with the session while it was in * progress. */ assert(evio_is_active(&session->input)); /* Handshake OK, start reading input. */ ev_feed_event(&session->input, EV_READ); } static void iproto_process_disconnect(struct iproto_request *request) { fiber_set_sid(fiber, request->session->sid, request->session->cookie); /* Runs the trigger, which may yield. */ iproto_session_destroy(request->session); } /** }}} */ /** * Create a session context and start input. */ static void iproto_on_accept(struct evio_service *service, int fd, struct sockaddr_in *addr) { char name[SERVICE_NAME_MAXLEN]; snprintf(name, sizeof(name), "%s/%s", "iobuf", sio_strfaddr(addr)); struct iproto_session *session; box_process_func *process_fun = (box_process_func*) service->on_accept_param; session = iproto_session_create(name, fd, addr, process_fun); iproto_enqueue_request(&request_queue, session, session->iobuf[0], &dummy_header, iproto_process_connect); } /** * Initialize read-write and read-only ports * with binary protocol handlers. */ void iproto_init(const char *bind_ipaddr, int primary_port, int secondary_port) { /* Run a primary server. */ if (primary_port != 0) { static struct evio_service primary; evio_service_init(&primary, "primary", bind_ipaddr, primary_port, iproto_on_accept, &box_process); evio_service_on_bind(&primary, box_leave_local_standby_mode, NULL); evio_service_start(&primary); } /* Run a secondary server. */ if (secondary_port != 0) { static struct evio_service secondary; evio_service_init(&secondary, "secondary", bind_ipaddr, secondary_port, iproto_on_accept, &box_process_ro); evio_service_start(&secondary); } iproto_queue_init(&request_queue, IPROTO_REQUEST_QUEUE_SIZE, iproto_queue_handler); } tarantool-1.5.1.218.g1a69fd6/src/stat.cc0000664000000000000000000000671312202131537016034 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "stat.h" #include "tarantool/util.h" #include #include #include #include #define SECS 5 static ev_timer timer; struct stats { const char *name; int64_t value[SECS + 1]; } *stats = NULL; static int stats_size = 0; static int stats_max = 0; static int base = 0; int stat_max_name_len = 0; static void stat_recalc_max_name_len() { stat_max_name_len = 0; for (unsigned i = 0; i <= stats_max; i++) { if (stats[i].name != NULL) stat_max_name_len = MAX(stat_max_name_len, strlen(stats[i].name)); } } int stat_register(const char **name, size_t max_idx) { int initial_base = base; for (int i = 0; i < max_idx; i++, name++, base++) { if (stats_size <= base) { stats_size += 1024; stats = (struct stats *) realloc(stats, sizeof(*stats) * stats_size); if (stats == NULL) abort(); } stats[base].name = *name; if (*name == NULL) continue; for (int i = 0; i < SECS + 1; i++) stats[base].value[i] = 0; stats_max = base; } stat_recalc_max_name_len(); return initial_base; } void stat_collect(int base, int name, int64_t value) { stats[base + name].value[0] += value; stats[base + name].value[SECS] += value; } int stat_foreach(stat_cb cb, void *cb_ctx) { for (unsigned i = 0; i <= stats_max; i++) { if (stats[i].name == NULL) continue; int diff = 0; for (int j = 0; j < SECS; j++) diff += stats[i].value[j]; diff /= SECS; int res = cb(stats[i].name, diff, stats[i].value[SECS], cb_ctx); if (res != 0) return res; } return 0; } void stat_age(ev_timer *timer, int events __attribute__((unused))) { if (stats == NULL) return; for (int i = 0; i <= stats_max; i++) { if (stats[i].name == NULL) continue; for (int j = SECS - 2; j >= 0; j--) stats[i].value[j + 1] = stats[i].value[j]; stats[i].value[0] = 0; } ev_timer_again(timer); } void stat_init(void) { ev_init(&timer, stat_age); timer.repeat = 1.; ev_timer_again(&timer); } void stat_free(void) { ev_timer_stop(&timer); if (stats) free(stats); } void stat_cleanup(int base, size_t max_idx) { for (int i = base; i < max_idx; i++) for (int j = 0; j < SECS + 1; j++) stats[i].value[j] = 0; } tarantool-1.5.1.218.g1a69fd6/src/pickle.cc0000664000000000000000000000246612202131537016331 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "pickle.h" tarantool-1.5.1.218.g1a69fd6/src/errcode.c0000664000000000000000000000035512202131537016335 0ustar rootroot#include #define ERRCODE_RECORD_MEMBER(s, f, d) { \ .errstr = #s, \ .errflags = f, \ .errdesc = d \ }, struct errcode_record tnt_error_codes[tnt_error_codes_enum_MAX] = { ERROR_CODES(ERRCODE_RECORD_MEMBER) }; tarantool-1.5.1.218.g1a69fd6/src/lua/0000775000000000000000000000000012242653271015334 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/lua/slab.cc0000664000000000000000000001032412231715257016565 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua/slab.h" extern "C" { #include #include #include } /* extern "C" */ #include "lua/init.h" #include /** A callback passed into salloc_stat() and invoked for every slab class. */ static int salloc_stat_lua_cb(const struct slab_cache_stats *cstat, void *cb_ctx) { struct lua_State *L = (struct lua_State *) cb_ctx; /* * Create a Lua table for every slab class. A class is * defined by its item size. */ lua_pushnumber(L, cstat->item_size); lua_newtable(L); lua_pushstring(L, "slabs"); luaL_pushnumber64(L, cstat->slabs); lua_settable(L, -3); lua_pushstring(L, "items"); luaL_pushnumber64(L, cstat->items); lua_settable(L, -3); lua_pushstring(L, "bytes_used"); luaL_pushnumber64(L, cstat->bytes_used); lua_settable(L, -3); lua_pushstring(L, "bytes_free"); luaL_pushnumber64(L, cstat->bytes_free); lua_settable(L, -3); lua_pushstring(L, "item_size"); luaL_pushnumber64(L, cstat->item_size); lua_settable(L, -3); lua_settable(L, -3); return 0; } static int lbox_slab_slabs(struct lua_State *L) { lua_newtable(L); salloc_stat(salloc_stat_lua_cb, NULL, L); return 1; } static int lbox_slab_arena_used(struct lua_State *L) { struct slab_arena_stats astat; salloc_stat(NULL, &astat, NULL); luaL_pushnumber64(L, astat.used); return 1; } static int lbox_slab_arena_size(struct lua_State *L) { struct slab_arena_stats astat; salloc_stat(NULL, &astat, NULL); luaL_pushnumber64(L, astat.size); return 1; } static int lbox_slab_call(struct lua_State *L) { struct slab_arena_stats astat; lua_newtable(L); lua_pushstring(L, "slabs"); lua_newtable(L); salloc_stat(salloc_stat_lua_cb, &astat, L); lua_settable(L, -3); lua_pushstring(L, "arena_used"); luaL_pushnumber64(L, astat.used); lua_settable(L, -3); lua_pushstring(L, "arena_size"); luaL_pushnumber64(L, astat.size); lua_settable(L, -3); return 1; } static const struct luaL_reg lbox_slab_dynamic_meta [] = { {"slabs", lbox_slab_slabs}, {"arena_used", lbox_slab_arena_used}, {"arena_size", lbox_slab_arena_size}, {NULL, NULL} }; static int lbox_slab_index(struct lua_State *L) { lua_pushvalue(L, -1); /* dup key */ lua_gettable(L, lua_upvalueindex(1)); /* table[key] */ if (!lua_isfunction(L, -1)) { /* If key is not found, leave nil on the stack. */ return 1; } lua_call(L, 0, 1); lua_remove(L, -2); return 1; } /** Initialize box.slab package. */ void tarantool_lua_slab_init(struct lua_State *L) { lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "slab"); lua_newtable(L); /* box.slab */ lua_newtable(L); lua_pushstring(L, "__call"); lua_pushcfunction(L, lbox_slab_call); lua_settable(L, -3); lua_pushstring(L, "__index"); lua_newtable(L); luaL_register(L, NULL, lbox_slab_dynamic_meta); lua_pushcclosure(L, lbox_slab_index, 1); lua_settable(L, -3); lua_setmetatable(L, -2); lua_settable(L, -3); /* box.slab = created table */ lua_pop(L, 1); /* cleanup stack */ } tarantool-1.5.1.218.g1a69fd6/src/lua/uuid.lua.c0000664000000000000000000000222312213310041017204 0ustar rootrootconst char uuid_lua[] = "(function(box)\n" " local ffi = require(\"ffi\")\n" " ffi.cdef[[\n" " /* from */\n" " typedef unsigned char uuid_t[16];\n" " void uuid_generate(uuid_t out);\n" "\n" " /* from libc */\n" " int snprintf(char *str, size_t size, const char *format, ...);\n" " ]]\n" "\n" " local libuuid = nil\n" " local builtin = ffi.C\n" " function check_libs()\n" " if libuuid then return end\n" " libuuid = ffi.load('uuid.so.1')\n" " end\n" " box.uuid = function()\n" " check_libs()\n" " local uuid = ffi.new('uuid_t')\n" " libuuid.uuid_generate(uuid)\n" " return ffi.string(uuid, 16)\n" " end\n" " box.uuid_hex = function()\n" " check_libs()\n" " local uuid = ffi.new('uuid_t')\n" " libuuid.uuid_generate(uuid)\n" " local uuid_hex = ffi.new('char[33]')\n" " for i = 0,ffi.sizeof('uuid_t'),1 do\n" " builtin.snprintf(uuid_hex + i * 2, 3, \"%02x\",\n" " ffi.cast('unsigned int',uuid[i]))\n" " end\n" " return ffi.string(uuid_hex, 32)\n" " end\n" "end)(box)\n" "" ; tarantool-1.5.1.218.g1a69fd6/src/lua/init.cc0000664000000000000000000011767112231715276016625 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua/init.h" #include "tarantool.h" #include "box/box.h" #include "tbuf.h" extern "C" { #include #include #include #include #include #include #include #include } /* extern "C" */ #include #include #include "fiber.h" #include "lua_ipc.h" #include "lua_socket.h" #include "lua/info.h" #include "lua/slab.h" #include "lua/stat.h" #include "lua/session.h" #include "lua/cjson.h" #include #include #include #include #include #include #include "tarantool/plugin.h" static RLIST_HEAD(loaded_plugins); extern "C" { #include } /* extern "C" */ /** * tarantool start-up file */ #define TARANTOOL_LUA_INIT_SCRIPT "init.lua" struct lua_State *tarantool_L; /* contents of src/lua/ files */ extern char uuid_lua[]; static const char *lua_sources[] = { uuid_lua, NULL }; /** * Remember the output of the administrative console in the * registry, to use with 'print'. */ static void tarantool_lua_set_out(struct lua_State *L, const struct tbuf *out) { lua_pushthread(L); if (out) lua_pushlightuserdata(L, (void *) out); else lua_pushnil(L); lua_settable(L, LUA_REGISTRYINDEX); } /** * dup out from parent to child L. Used in fiber_create */ static void tarantool_lua_dup_out(struct lua_State *L, struct lua_State *child_L) { lua_pushthread(L); lua_gettable(L, LUA_REGISTRYINDEX); struct tbuf *out = (struct tbuf *) lua_topointer(L, -1); /* pop 'out' */ lua_pop(L, 1); if (out) tarantool_lua_set_out(child_L, out); } /* * {{{ box Lua library: common functions */ const char *boxlib_name = "box"; uint64_t tarantool_lua_tointeger64(struct lua_State *L, int idx) { uint64_t result = 0; switch (lua_type(L, idx)) { case LUA_TNUMBER: result = lua_tonumber(L, idx); break; case LUA_TSTRING: { const char *arg = luaL_checkstring(L, idx); char *arge; errno = 0; result = strtoull(arg, &arge, 10); if (errno != 0 || arge == arg) luaL_error(L, "lua_tointeger64: bad argument"); break; } case LUA_TCDATA: { /* Calculate absolute value in the stack. */ if (idx < 0) idx = lua_gettop(L) + idx + 1; GCcdata *cd = cdataV(L->base + idx - 1); if (cd->ctypeid != CTID_INT64 && cd->ctypeid != CTID_UINT64) { luaL_error(L, "lua_tointeger64: unsupported cdata type"); } result = *(uint64_t*)cdataptr(cd); break; } default: luaL_error(L, "lua_tointeger64: unsupported type: %s", lua_typename(L, lua_type(L, idx))); } return result; } static GCcdata* luaL_pushcdata(struct lua_State *L, CTypeID id, int bits) { CTState *cts = ctype_cts(L); CType *ct = ctype_raw(cts, id); CTSize sz; lj_ctype_info(cts, id, &sz); GCcdata *cd = lj_cdata_new(cts, id, bits); TValue *o = L->top; setcdataV(L, o, cd); lj_cconv_ct_init(cts, ct, sz, (uint8_t *) cdataptr(cd), o, 0); incr_top(L); return cd; } int luaL_pushnumber64(struct lua_State *L, uint64_t val) { GCcdata *cd = luaL_pushcdata(L, CTID_UINT64, 8); *(uint64_t*)cdataptr(cd) = val; return 1; } /** Report libev time (cheap). */ static int lbox_time(struct lua_State *L) { lua_pushnumber(L, ev_now()); return 1; } /** Report libev time as 64-bit integer */ static int lbox_time64(struct lua_State *L) { luaL_pushnumber64(L, (uint64_t) ( ev_now() * 1000000 + 0.5 ) ); return 1; } /** * descriptor for box methods */ static const struct luaL_reg boxlib[] = { {"time", lbox_time}, {"time64", lbox_time64}, {NULL, NULL} }; /* * }}} */ /* {{{ box.fiber Lua library: access to Tarantool fibers * * Each fiber can be running, suspended or dead. * A fiber is created (box.fiber.create()) suspended. * It can be started with box.fiber.resume(), yield * the control back with box.fiber.yield() end * with return or just by reaching the end of the * function. * * A fiber can also be attached or detached. * An attached fiber is a child of the creator, * and is running only if the creator has called * box.fiber.resume(). A detached fiber is a child of * Tarntool/Box internal 'sched' fiber, and is gets * scheduled only if there is a libev event associated * with it. * To detach, a running fiber must invoke box.fiber.detach(). * A detached fiber loses connection with its parent * forever. * * All fibers are part of the fiber registry, box.fiber. * This registry can be searched either by * fiber id (fid), which is numeric, or by fiber name, * which is a string. If there is more than one * fiber with the given name, the first fiber that * matches is returned. * * Once fiber chunk is done or calls "return", * the fiber is considered dead. Its carcass is put into * fiber pool, and can be reused when another fiber is * created. * * A runaway fiber can be stopped with fiber.cancel(). * fiber.cancel(), however, is advisory -- it works * only if the runaway fiber is calling fiber.testcancel() * once in a while. Most box.* hooks, such as box.delete() * or box.update(), are calling fiber.testcancel(). * * Thus a runaway fiber can really only become cuckoo * if it does a lot of computations and doesn't check * whether it's been cancelled (just don't do that). * * The other potential problem comes from detached * fibers which never get scheduled, because are subscribed * or get no events. Such morphing fibers can be killed * with box.fiber.cancel(), since box.fiber.cancel() * sends an asynchronous wakeup event to the fiber. */ static const char *fiberlib_name = "box.fiber"; enum fiber_state { DONE, YIELD, DETACH }; /** * @pre: stack top contains a table * @post: sets table field specified by name of the table on top * of the stack to a weak kv table and pops that weak table. */ static void lbox_create_weak_table(struct lua_State *L, const char *name) { lua_newtable(L); /* and a metatable */ lua_newtable(L); /* weak keys and values */ lua_pushstring(L, "kv"); /* pops 'kv' */ lua_setfield(L, -2, "__mode"); /* pops the metatable */ lua_setmetatable(L, -2); /* assigns and pops table */ lua_setfield(L, -2, name); /* gets memoize back. */ lua_getfield(L, -1, name); assert(! lua_isnil(L, -1)); } /** * Push a userdata for the given fiber onto Lua stack. */ static void lbox_pushfiber(struct lua_State *L, struct fiber *f) { /* * Use 'memoize' pattern and keep a single userdata for * the given fiber. */ luaL_getmetatable(L, fiberlib_name); int top = lua_gettop(L); lua_getfield(L, -1, "memoize"); if (lua_isnil(L, -1)) { /* first access - instantiate memoize */ /* pop the nil */ lua_pop(L, 1); /* create memoize table */ lbox_create_weak_table(L, "memoize"); } /* Find out whether the fiber is already in the memoize table. */ lua_pushlightuserdata(L, f); lua_gettable(L, -2); if (lua_isnil(L, -1)) { /* no userdata for fiber created so far */ /* pop the nil */ lua_pop(L, 1); /* push the key back */ lua_pushlightuserdata(L, f); /* create a new userdata */ void **ptr = (void **) lua_newuserdata(L, sizeof(void *)); *ptr = f; luaL_getmetatable(L, fiberlib_name); lua_setmetatable(L, -2); /* memoize it */ lua_settable(L, -3); lua_pushlightuserdata(L, f); /* get it back */ lua_gettable(L, -2); } /* * Here we have a userdata on top of the stack and * possibly some garbage just under the top. Move the * result to the beginning of the stack and clear the rest. */ /* moves the current top to the old top */ lua_replace(L, top); /* clears everything after the old top */ lua_settop(L, top); } static struct fiber * lbox_checkfiber(struct lua_State *L, int index) { return *(struct fiber **) luaL_checkudata(L, index, fiberlib_name); } static struct fiber * lua_isfiber(struct lua_State *L, int narg) { if (lua_getmetatable(L, narg) == 0) return NULL; luaL_getmetatable(L, fiberlib_name); struct fiber *f = NULL; if (lua_equal(L, -1, -2)) f = * (struct fiber **) lua_touserdata(L, narg); lua_pop(L, 2); return f; } static int lbox_fiber_id(struct lua_State *L) { struct fiber *f = lua_gettop(L) ? lbox_checkfiber(L, 1) : fiber; lua_pushinteger(L, f->fid); return 1; } static struct lua_State * box_lua_fiber_get_coro(struct lua_State *L, struct fiber *f) { lua_pushlightuserdata(L, f); lua_gettable(L, LUA_REGISTRYINDEX); struct lua_State *child_L = lua_tothread(L, -1); lua_pop(L, 1); return child_L; } static void box_lua_fiber_clear_coro(struct lua_State *L, struct fiber *f) { lua_pushlightuserdata(L, f); lua_pushnil(L); lua_settable(L, LUA_REGISTRYINDEX); } /** * To yield control to the calling fiber * we need to be able to find the caller of an * attached fiber. Instead of passing the caller * around on the child fiber stack, we create a * weak table associated with child fiber * lua_State, and save the caller in it. * * When the child fiber lua thread is garbage collected, * the table is automatically cleared. */ static void box_lua_fiber_push_caller(struct lua_State *child_L) { luaL_getmetatable(child_L, fiberlib_name); lua_getfield(child_L, -1, "callers"); if (lua_isnil(child_L, -1)) { lua_pop(child_L, 1); lbox_create_weak_table(child_L, "callers"); } lua_pushthread(child_L); lua_pushlightuserdata(child_L, fiber); lua_settable(child_L, -3); /* Pop the fiberlib metatable and callers table. */ lua_pop(child_L, 2); } static struct fiber * box_lua_fiber_get_caller(struct lua_State *L) { luaL_getmetatable(L, fiberlib_name); lua_getfield(L, -1, "callers"); lua_pushthread(L); lua_gettable(L, -2); struct fiber *caller = (struct fiber *) lua_touserdata(L, -1); /* Pop the caller, the callers table, the fiberlib metatable. */ lua_pop(L, 3); return caller; } static int lbox_fiber_gc(struct lua_State *L) { struct fiber *f = lbox_checkfiber(L, 1); struct lua_State *child_L = box_lua_fiber_get_coro(L, f); /* * A non-NULL coro is an indicator of a 1) alive, * 2) suspended and 3) attached fiber. The coro is * an outlet to pass arguments in and out the Lua * routine being executed by the fiber (see fiber.resume() * and fiber.yield()), and as soon as the Lua routine * completes, the "plug" is shut down (see * box_lua_fiber_run()). When its routine completes, * the fiber recycles itself. * Likewise, when a fiber becomes detached, this plug is * removed, since we no longer need to pass arguments * to and from it, and 'sched' garbage collects all detached * fibers (see lbox_fiber_detach()). * We also know that the fiber is suspended, not running, * because any running and attached fiber is referenced, * if only by the fiber which called lbox_lua_resume() * on it. lbox_lua_resume() is the only entry point * to resume an attached fiber. */ if (child_L) { assert(f != fiber && child_L != L); /* * Garbage collect the associated coro. * Do it first, since the cancelled fiber * can get recycled quickly. */ box_lua_fiber_clear_coro(L, f); /* * Cancel and recycle the fiber. This * returns only after the fiber has died. */ fiber_cancel(f); } return 0; } /** * Detach the current fiber. */ static int lbox_fiber_detach(struct lua_State *L) { if (box_lua_fiber_get_coro(L, fiber) == NULL) luaL_error(L, "fiber.detach(): not attached"); struct fiber *caller = box_lua_fiber_get_caller(L); /* Clear the caller, to avoid a reference leak. */ /* Request a detach. */ lua_pushinteger(L, DETACH); /* A detached fiber has no associated session. */ fiber_set_sid(fiber, 0, 0); fiber_yield_to(caller); return 0; } static void box_lua_fiber_run(va_list ap __attribute__((unused))) { fiber_testcancel(); fiber_setcancellable(false); struct lua_State *L = box_lua_fiber_get_coro(tarantool_L, fiber); /* * Reference the coroutine to make sure it's not garbage * collected when detached. */ lua_pushthread(L); int coro_ref = luaL_ref(L, LUA_REGISTRYINDEX); /* * Lua coroutine.resume() returns true/false for * completion status plus whatever the coroutine main * function returns. Follow this style here. */ auto cleanup = [=] { /* * If the coroutine has detached itself, collect * its resources here. */ luaL_unref(L, LUA_REGISTRYINDEX, coro_ref); }; try { lua_call(L, lua_gettop(L) - 1, LUA_MULTRET); /* push completion status */ lua_pushboolean(L, true); /* move 'true' to stack start */ lua_insert(L, 1); cleanup(); } catch (const FiberCancelException& e) { box_lua_fiber_clear_coro(tarantool_L, fiber); /* * Note: FiberCancelException leaves garbage on * coroutine stack. This is OK since it is only * possible to cancel a fiber which is not * scheduled, and cancel() is synchronous. */ cleanup(); throw; } catch (const Exception& e) { /* pop any possible garbage */ lua_settop(L, 0); /* completion status */ lua_pushboolean(L, false); /* error message */ lua_pushstring(L, e.errmsg()); if (box_lua_fiber_get_coro(tarantool_L, fiber) == NULL) { /* The fiber is detached, log the error. */ e.log(); } cleanup(); } catch (...) { lua_settop(L, 1); /* * The error message is already there. * Add completion status. */ lua_pushboolean(L, false); lua_insert(L, -2); if (box_lua_fiber_get_coro(tarantool_L, fiber) == NULL && lua_tostring(L, -1) != NULL) { /* The fiber is detached, log the error. */ say_error("%s", lua_tostring(L, -1)); } cleanup(); } /* * L stack contains nothing but call results. * If we're still attached, synchronously pass * them to the caller, and then terminate. */ if (box_lua_fiber_get_coro(L, fiber)) { struct fiber *caller = box_lua_fiber_get_caller(L); lua_pushinteger(L, DONE); fiber_yield_to(caller); } } /** @retval true if check failed, false otherwise */ static bool lbox_fiber_checkstack(struct lua_State *L) { fiber_checkstack(); struct fiber *f = fiber; const int MAX_STACK_DEPTH = 16; int depth = 1; while ((L = box_lua_fiber_get_coro(L, f)) != NULL) { if (depth++ == MAX_STACK_DEPTH) return true; f = box_lua_fiber_get_caller(L); } return false; } static int lbox_fiber_create(struct lua_State *L) { if (lua_gettop(L) != 1 || !lua_isfunction(L, 1)) luaL_error(L, "fiber.create(function): bad arguments"); if (lbox_fiber_checkstack(L)) luaL_error(L, "fiber.create(function): recursion limit" " reached"); struct fiber *f = fiber_new("lua", box_lua_fiber_run); /* Preserve the session in a child fiber. */ fiber_set_sid(f, fiber->sid, fiber->cookie); /* Initially the fiber is cancellable */ f->flags |= FIBER_USER_MODE | FIBER_CANCELLABLE; /* associate coro with fiber */ lua_pushlightuserdata(L, f); struct lua_State *child_L = lua_newthread(L); lua_settable(L, LUA_REGISTRYINDEX); /* Move the argument (function of the coro) to the new coro */ lua_xmove(L, child_L, 1); lbox_pushfiber(L, f); return 1; } static int lbox_fiber_resume(struct lua_State *L) { struct fiber *f = lbox_checkfiber(L, 1); if (f->fid == 0) luaL_error(L, "fiber.resume(): the fiber is dead"); struct lua_State *child_L = box_lua_fiber_get_coro(L, f); if (child_L == NULL) luaL_error(L, "fiber.resume(): can't resume a " "detached fiber"); int nargs = lua_gettop(L) - 1; if (nargs > 0) lua_xmove(L, child_L, nargs); /* dup 'out' for admin fibers */ tarantool_lua_dup_out(L, child_L); int fid = f->fid; /* Silent compiler warnings in a release build. */ (void) fid; box_lua_fiber_push_caller(child_L); /* * We don't use fiber_call() since this breaks any sort * of yield in the called fiber: for a yield to work, * the callee got to be scheduled by 'sched'. */ fiber_yield_to(f); /* * The called fiber could have done only 3 things: * - yielded to us (then we should grab its return) * - completed (grab return values, wake up the fiber, * so that it can die) * - detached (grab return values, wakeup the fiber so it * can continue). */ assert(f->fid == fid); tarantool_lua_set_out(child_L, NULL); /* Find out the state of the child fiber. */ enum fiber_state child_state = (enum fiber_state) lua_tointeger(child_L, -1); lua_pop(child_L, 1); /* Get the results */ nargs = lua_gettop(child_L); lua_xmove(child_L, L, nargs); if (child_state != YIELD) { /* * The fiber is dead or requested a detach. * Garbage collect the associated coro. */ box_lua_fiber_clear_coro(L, f); if (child_state == DETACH) { /* * Schedule the runaway child at least * once. */ fiber_wakeup(f); } else { /* Synchronously reap a dead child. */ fiber_call(f); } } return nargs; } static void box_lua_fiber_run_detached(va_list ap) { int coro_ref = va_arg(ap, int); struct lua_State *L = va_arg(ap, struct lua_State *); auto cleanup = [=] { luaL_unref(L, LUA_REGISTRYINDEX, coro_ref); }; try { lua_call(L, lua_gettop(L) - 1, LUA_MULTRET); cleanup(); } catch (const FiberCancelException &e) { cleanup(); throw; } catch (const Exception &e) { e.log(); cleanup(); } catch (...) { lua_settop(L, 1); if (lua_tostring(L, -1) != NULL) say_error("%s", lua_tostring(L, -1)); cleanup(); } } /** * Create, resume and detach a fiber * given the function and its arguments. */ static int lbox_fiber_wrap(struct lua_State *L) { if (lua_gettop(L) < 1 || !lua_isfunction(L, 1)) luaL_error(L, "fiber.wrap(function, ...): bad arguments"); fiber_checkstack(); struct fiber *f = fiber_new("lua", box_lua_fiber_run_detached); /* Not a system fiber. */ f->flags |= FIBER_USER_MODE; struct lua_State *child_L = lua_newthread(L); int coro_ref = luaL_ref(L, LUA_REGISTRYINDEX); /* Move the arguments to the new coro */ lua_xmove(L, child_L, lua_gettop(L)); fiber_call(f, coro_ref, child_L); if (f->fid) lbox_pushfiber(L, f); else lua_pushnil(L); return 1; } /** * Yield the current fiber. * * Yield control to the calling fiber -- if the fiber * is attached, or to sched otherwise. * If the fiber is attached, whatever arguments are passed * to this call, are passed on to the calling fiber. * If the fiber is detached, simply returns everything back. */ static int lbox_fiber_yield(struct lua_State *L) { /* * Yield to the caller. The caller will take care of * whatever arguments are taken. */ fiber_setcancellable(true); if (box_lua_fiber_get_coro(L, fiber) == NULL) { fiber_wakeup(fiber); fiber_yield(); fiber_testcancel(); } else { struct fiber *caller = box_lua_fiber_get_caller(L); lua_pushinteger(L, YIELD); fiber_yield_to(caller); } fiber_setcancellable(false); /* * Got resumed. Return whatever the caller has passed * to us with box.fiber.resume(). * As a side effect, the detached fiber which yields * to sched always gets back whatever it yields. */ return lua_gettop(L); } static bool fiber_is_caller(struct lua_State *L, struct fiber *f) { struct fiber *child = fiber; while ((L = box_lua_fiber_get_coro(L, child)) != NULL) { struct fiber *caller = box_lua_fiber_get_caller(L); if (caller == f) return true; child = caller; } return false; } /** * Get fiber status. * This follows the rules of Lua coroutine.status() function: * Returns the status of fibier, as a string: * - "running", if the fiber is running (that is, it called status); * - "suspended", if the fiber is suspended in a call to yield(), * or if it has not started running yet; * - "normal" if the fiber is active but not running (that is, * it has resumed another fiber); * - "dead" if the fiber has finished its body function, or if it * has stopped with an error. */ static int lbox_fiber_status(struct lua_State *L) { struct fiber *f = lua_gettop(L) ? lbox_checkfiber(L, 1) : fiber; const char *status; if (f->fid == 0) { /* This fiber is dead. */ status = "dead"; } else if (f == fiber) { /* The fiber is the current running fiber. */ status = "running"; } else if (fiber_is_caller(L, f)) { /* The fiber is current fiber's caller. */ status = "normal"; } else { /* None of the above: must be suspended. */ status = "suspended"; } lua_pushstring(L, status); return 1; } /** Get or set fiber name. * With no arguments, gets or sets the current fiber * name. It's also possible to get/set the name of * another fiber. */ static int lbox_fiber_name(struct lua_State *L) { struct fiber *f = fiber; int name_index = 1; if (lua_gettop(L) >= 1 && lua_isfiber(L, 1)) { f = lbox_checkfiber(L, 1); name_index = 2; } if (lua_gettop(L) == name_index) { /* Set name. */ const char *name = luaL_checkstring(L, name_index); fiber_set_name(f, name); return 0; } else { lua_pushstring(L, fiber_name(f)); return 1; } } /** * Yield to the sched fiber and sleep. * @param[in] amount of time to sleep (double) * * Only the current fiber can be made to sleep. */ static int lbox_fiber_sleep(struct lua_State *L) { if (! lua_isnumber(L, 1) || lua_gettop(L) != 1) luaL_error(L, "fiber.sleep(delay): bad arguments"); double delay = lua_tonumber(L, 1); fiber_setcancellable(true); fiber_sleep(delay); fiber_setcancellable(false); return 0; } static int lbox_fiber_self(struct lua_State *L) { lbox_pushfiber(L, fiber); return 1; } static int lbox_fiber_find(struct lua_State *L) { if (lua_gettop(L) != 1) luaL_error(L, "fiber.find(): bad arguments"); int fid = lua_tointeger(L, -1); struct fiber *f = fiber_find(fid); if (f) lbox_pushfiber(L, f); else lua_pushnil(L); return 1; } /** * Running and suspended fibers can be cancelled. * Zombie fibers can't. */ static int lbox_fiber_cancel(struct lua_State *L) { struct fiber *f = lbox_checkfiber(L, 1); if (! (f->flags & FIBER_USER_MODE)) luaL_error(L, "fiber.cancel(): subject fiber does " "not permit cancel"); fiber_cancel(f); return 0; } /** * Check if this current fiber has been cancelled and * throw an exception if this is the case. */ static int lbox_fiber_testcancel(struct lua_State *L) { if (lua_gettop(L) != 0) luaL_error(L, "fiber.testcancel(): bad arguments"); fiber_testcancel(); return 0; } static const struct luaL_reg lbox_fiber_meta [] = { {"id", lbox_fiber_id}, {"name", lbox_fiber_name}, {"__gc", lbox_fiber_gc}, {NULL, NULL} }; static const struct luaL_reg fiberlib[] = { {"sleep", lbox_fiber_sleep}, {"self", lbox_fiber_self}, {"id", lbox_fiber_id}, {"find", lbox_fiber_find}, {"cancel", lbox_fiber_cancel}, {"testcancel", lbox_fiber_testcancel}, {"create", lbox_fiber_create}, {"resume", lbox_fiber_resume}, {"wrap", lbox_fiber_wrap}, {"yield", lbox_fiber_yield}, {"status", lbox_fiber_status}, {"name", lbox_fiber_name}, {"detach", lbox_fiber_detach}, {NULL, NULL} }; /* * }}} */ const char * tarantool_lua_tostring(struct lua_State *L, int index) { /* we need an absolute index */ if (index < 0) index = lua_gettop(L) + index + 1; lua_getglobal(L, "tostring"); lua_pushvalue(L, index); /* pops both "tostring" and its argument */ lua_call(L, 1, 1); lua_replace(L, index); return lua_tostring(L, index); } /** * Convert Lua stack to YAML and append to the given tbuf. */ static void tarantool_lua_printstack_yaml(struct lua_State *L, struct tbuf *out) { int top = lua_gettop(L); for (int i = 1; i <= top; i++) { if (lua_type(L, i) == LUA_TCDATA) { GCcdata *cd = cdataV(L->base + i - 1); const char *sz = tarantool_lua_tostring(L, i); int len = strlen(sz); int chop; switch (cd->ctypeid){ case CTID_UINT64: chop = 3; break; case CTID_INT64: chop = 2; break; default: chop = 0; } tbuf_printf(out, " - %-.*s" CRLF, len - chop, sz); } else tbuf_printf(out, " - %s" CRLF, tarantool_lua_tostring(L, i)); } } /** * A helper to serialize arguments of 'print' Lua built-in * to tbuf. */ static void tarantool_lua_printstack(struct lua_State *L, struct tbuf *out) { int top = lua_gettop(L); for (int i = 1; i <= top; i++) { if (lua_type(L, i) == LUA_TCDATA) { GCcdata *cd = cdataV(L->base + i - 1); const char *sz = tarantool_lua_tostring(L, i); int len = strlen(sz); int chop = (cd->ctypeid == CTID_UINT64 ? 3 : 2); tbuf_printf(out, "%-.*s", len - chop, sz); } else tbuf_printf(out, "%s", tarantool_lua_tostring(L, i)); } } /** * Redefine lua 'print' built-in to print either to the log file * (when Lua is used inside a module) or back to the user (for the * administrative console). * * When printing to the log file, we use 'say_info'. To print to * the administrative console, we simply append everything to the * 'out' buffer, which is flushed to network at the end of every * administrative command. * * Note: administrative console output must be YAML-compatible. * If this is done automatically, the result is ugly, so we * don't do it. Creators of Lua procedures have to do it * themselves. Best we can do here is to add a trailing * CRLF if it's forgotten. */ static int lbox_print(struct lua_State *L) { lua_pushthread(L); lua_gettable(L, LUA_REGISTRYINDEX); struct tbuf *out = (struct tbuf *) lua_topointer(L, -1); /* pop 'out' */ lua_pop(L, 1); if (out) { /* Administrative console */ tarantool_lua_printstack(L, out); /* Courtesy: append YAML's end of line if it's not already there */ if (out->size < 2 || tbuf_str(out)[out->size-1] != '\n') tbuf_printf(out, CRLF); } else { /* Add a message to the server log */ out = tbuf_new(fiber->gc_pool); tarantool_lua_printstack(L, out); say_info("%s", tbuf_str(out)); } return 0; } /** * Redefine lua 'pcall' built-in to correctly handle exceptions, * produced by 'box' C functions. * * See Lua documentation on 'pcall' for additional information. */ static int lbox_pcall(struct lua_State *L) { /* * Lua pcall() returns true/false for completion status * plus whatever the called function returns. */ try { lua_call(L, lua_gettop(L) - 1, LUA_MULTRET); /* push completion status */ lua_pushboolean(L, true); /* move 'true' to stack start */ lua_insert(L, 1); } catch (const ClientError& e) { /* * Note: FiberCancelException passes through this * catch and thus leaves garbage on coroutine * stack. */ /* pop any possible garbage */ lua_settop(L, 0); /* completion status */ lua_pushboolean(L, false); /* error message */ lua_pushstring(L, e.errmsg()); } catch (const Exception& e) { throw; } catch (...) { lua_settop(L, 1); /* completion status */ lua_pushboolean(L, false); /* put the completion status below the error message. */ lua_insert(L, -2); } return lua_gettop(L); } /** * Convert lua number or string to lua cdata 64bit number. */ static int lbox_tonumber64(struct lua_State *L) { if (lua_gettop(L) != 1) luaL_error(L, "tonumber64: wrong number of arguments"); uint64_t result = tarantool_lua_tointeger64(L, 1); return luaL_pushnumber64(L, result); } /** * A helper to register a single type metatable. */ void tarantool_lua_register_type(struct lua_State *L, const char *type_name, const struct luaL_Reg *methods) { luaL_newmetatable(L, type_name); /* * Conventionally, make the metatable point to itself * in __index. If 'methods' contain a field for __index, * this is a no-op. */ lua_pushvalue(L, -1); lua_setfield(L, -2, "__index"); lua_pushstring(L, type_name); lua_setfield(L, -2, "__metatable"); luaL_register(L, NULL, methods); lua_pop(L, 1); } static const struct luaL_reg errorlib [] = { {NULL, NULL} }; static void tarantool_lua_error_init(struct lua_State *L) { luaL_register(L, "box.error", errorlib); for (int i = 0; i < tnt_error_codes_enum_MAX; i++) { const char *name = tnt_error_codes[i].errstr; if (strstr(name, "UNUSED") || strstr(name, "RESERVED")) continue; lua_pushnumber(L, tnt_errcode_val(i)); lua_setfield(L, -2, name); } lua_pop(L, 1); } static void tarantool_lua_setpath(struct lua_State *L, const char *type, ...) __attribute__((sentinel)); /** * Prepend the variable list of arguments to the Lua * package search path (or cpath, as defined in 'type'). */ static void tarantool_lua_setpath(struct lua_State *L, const char *type, ...) { char path[PATH_MAX]; va_list args; va_start(args, type); int off = 0; const char *p; while ((p = va_arg(args, const char*))) { /* * If LUA_SYSPATH or LUA_SYSCPATH is an empty * string, skip it. */ if (*p == '\0') continue; off += snprintf(path + off, sizeof(path) - off, "%s;", p); } va_end(args); lua_getglobal(L, "package"); lua_getfield(L, -1, type); snprintf(path + off, sizeof(path) - off, "%s", lua_tostring(L, -1)); lua_pop(L, 1); lua_pushstring(L, path); lua_setfield(L, -2, type); lua_pop(L, 1); } /** * show statistics for all loaded plugins */ void show_plugins_stat(struct tbuf *out) { tbuf_printf(out, "plugins:\n"); struct tarantool_plugin *p; rlist_foreach_entry(p, &loaded_plugins, list) { tbuf_printf(out, " - { name: \"%s\", version: %d", p->name, p->version ); if (p->stat) { tbuf_printf(out, ", stat: "); p->stat(out); } tbuf_printf(out, " }\n"); } } static void tarantool_load_plugin(struct lua_State *L, const char *plugin) { if (strstr(plugin, ".so") == NULL) return; say_info("Loading plugin: %s", plugin); void *dl = dlopen(plugin, RTLD_NOW); if (!dl) { say_error("Can't load plugin %s: %s", plugin, dlerror()); return; } struct tarantool_plugin *p = (typeof(p))dlsym(dl, "plugin_meta"); if (!p) { say_error("Can't find plugin metadata in plugin %s", plugin); dlclose(dl); return; } if (p->api_version != PLUGIN_API_VERSION) { say_error("Plugin %s has api_version: %d but tarantool has: %d", plugin, p->api_version, PLUGIN_API_VERSION); return; } rlist_add_entry(&loaded_plugins, p, list); if (p->init) p->init(L); say_info("Plugin '%s' was loaded, version: %d", p->name, p->version); } static void tarantool_plugins_dir(struct lua_State *L, const char *dir) { if (!dir) return; if (!*dir) return; DIR *dh = opendir(dir); if (!dh) return; struct dirent * dent; while ((dent = readdir(dh)) != NULL) { if (dent->d_type != DT_REG) continue; char *path; asprintf(&path, "%s/%s", dir, dent->d_name); if (!path) { say_error("Can't allocate memory for %s plugin dir", dir); continue; } tarantool_load_plugin(L, path); free(path); } closedir(dh); } static void tarantool_plugins_init(struct lua_State *L) { int top = lua_gettop(L); char *plugins = getenv("TARANTOOL_PLUGIN_DIR"); if (plugins) { plugins = strdup(plugins); char *ptr = plugins; for (;;) { char *divider = strchr(ptr, ':'); if (divider == NULL) { tarantool_plugins_dir(L, ptr); break; } *divider = 0; tarantool_plugins_dir(L, ptr); ptr = divider + 1; } free(plugins); } tarantool_plugins_dir(L, PLUGIN_DIR); lua_settop(L, top); } struct lua_State * tarantool_lua_init() { lua_State *L = luaL_newstate(); if (L == NULL) return L; luaL_openlibs(L); /* * Search for Lua modules, apart from the standard * locations, in the server script_dir and in the * system-wide Tarantool paths. This way 3 types * of packages become available for use: standard Lua * packages, Tarantool-specific Lua libs and * instance-specific Lua scripts. */ char path[PATH_MAX]; snprintf(path, sizeof(path), "%s/?.lua", cfg.script_dir); tarantool_lua_setpath(L, "path", path, LUA_LIBPATH, LUA_SYSPATH, NULL); snprintf(path, sizeof(path), "%s/?.so", cfg.script_dir); tarantool_lua_setpath(L, "cpath", path, LUA_LIBCPATH, LUA_SYSCPATH, NULL); /* Loadi 'ffi' extension and make it inaccessible */ lua_getglobal(L, "require"); lua_pushstring(L, "ffi"); if (lua_pcall(L, 1, 0, 0) != 0) panic("%s", lua_tostring(L, -1)); lua_getglobal(L, "ffi"); /** * Remember the LuaJIT FFI extension reference index * to protect it from being garbage collected. */ (void) luaL_ref(L, LUA_REGISTRYINDEX); lua_pushnil(L); lua_setglobal(L, "ffi"); luaL_register(L, boxlib_name, boxlib); lua_pop(L, 1); luaL_register(L, fiberlib_name, fiberlib); lua_pop(L, 1); tarantool_lua_register_type(L, fiberlib_name, lbox_fiber_meta); lua_register(L, "print", lbox_print); lua_register(L, "pcall", lbox_pcall); lua_register(L, "tonumber64", lbox_tonumber64); tarantool_lua_cjson_init(L); tarantool_lua_info_init(L); tarantool_lua_slab_init(L); tarantool_lua_stat_init(L); tarantool_lua_ipc_init(L); tarantool_lua_socket_init(L); tarantool_lua_session_init(L); tarantool_lua_error_init(L); /* Load Lua extension */ for (const char **s = lua_sources; *s; s++) { if (luaL_dostring(L, *s)) panic("Error loading Lua source %.160s...: %s", *s, lua_tostring(L, -1)); } mod_lua_init(L); /* init after internal luas are processed */ tarantool_plugins_init(L); /* clear possible left-overs of init */ lua_settop(L, 0); return L; } void tarantool_lua_close(struct lua_State *L) { /* collects garbage, invoking userdata gc */ lua_close(L); } /** * Attempt to append 'return ' before the chunk: if the chunk is * an expression, this pushes results of the expression onto the * stack. If the chunk is a statement, it won't compile. In that * case try to run the original string. */ static int tarantool_lua_dostring(struct lua_State *L, const char *str) { struct tbuf *buf = tbuf_new(fiber->gc_pool); tbuf_printf(buf, "%s%s", "return ", str); int r = luaL_loadstring(L, tbuf_str(buf)); if (r) { /* pop the error message */ lua_pop(L, 1); r = luaL_loadstring(L, str); if (r) return r; } try { lua_call(L, 0, LUA_MULTRET); } catch (const FiberCancelException& e) { throw; } catch (const Exception& e) { lua_pushstring(L, e.errmsg()); return 1; } catch (...) { return 1; } return 0; } static int tarantool_lua_dofile(struct lua_State *L, const char *filename) { lua_getglobal(L, "dofile"); lua_pushstring(L, filename); lbox_pcall(L); bool result = lua_toboolean(L, 1); return result ? 0 : 1; } void tarantool_lua(struct lua_State *L, struct tbuf *out, const char *str) { tarantool_lua_set_out(L, out); int r = tarantool_lua_dostring(L, str); tarantool_lua_set_out(L, NULL); if (r) { const char *msg = lua_tostring(L, -1); msg = msg ? msg : ""; /* Make sure the output is YAMLish */ tbuf_printf(out, "error: '%s'" CRLF, luaL_gsub(L, msg, "'", "''")); } else { tarantool_lua_printstack_yaml(L, out); } /* clear the stack from return values. */ lua_settop(L, 0); } /** * Check if the given literal is a number/boolean or string * literal. A string literal needs quotes. */ static bool is_string(const char *str) { if (strcmp(str, "true") == 0 || strcmp(str, "false") == 0) return false; if (! isdigit(*str)) return true; char *endptr; double r = strtod(str, &endptr); /* -Wunused-result warning suppression */ (void) r; return *endptr != '\0'; } /** * Make a new configuration available in Lua. * We could perhaps make Lua bindings to access the C * structure in question, but for now it's easier and just * as functional to convert the given configuration to a Lua * table and export the table into Lua. */ void tarantool_lua_load_cfg(struct lua_State *L, struct tarantool_cfg *cfg) { luaL_Buffer b; char *key, *value; luaL_buffinit(L, &b); tarantool_cfg_iterator_t *i = tarantool_cfg_iterator_init(); luaL_addstring(&b, "box.cfg = {}\n" "setmetatable(box.cfg, {})\n" "getmetatable(box.cfg).__index = " "function(table, index)\n" " table[index] = {}\n" " setmetatable(table[index], getmetatable(table))\n" " return rawget(table, index)\n" "end\n"); while ((key = tarantool_cfg_iterator_next(i, cfg, &value)) != NULL) { if (value == NULL) continue; const char *quote = is_string(value) ? "'" : ""; if (strchr(key, '.') == NULL) { lua_pushfstring(L, "box.cfg.%s = %s%s%s\n", key, quote, value, quote); luaL_addvalue(&b); } free(value); } luaL_addstring(&b, "getmetatable(box.cfg).__newindex = " "function(table, index)\n" " error('Attempt to modify a read-only table')\n" "end\n" "getmetatable(box.cfg).__index = nil\n"); luaL_pushresult(&b); if (luaL_loadstring(L, lua_tostring(L, -1)) != 0 || lua_pcall(L, 0, 0, 0) != 0) { panic("%s", lua_tostring(L, -1)); } lua_pop(L, 1); /* cleanup stack */ box_lua_load_cfg(L); /* * Invoke a user-defined on_reload_configuration hook, * if it exists. Do it after everything else is done. */ lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "on_reload_configuration"); lua_gettable(L, -2); if (lua_isfunction(L, -1) && lua_pcall(L, 0, 0, 0) != 0) { say_error("on_reload_configuration() hook failed: %s", lua_tostring(L, -1)); } lua_pop(L, 1); /* cleanup stack */ } /** * Load start-up file routine. */ static void load_init_script(va_list ap) { struct lua_State *L = va_arg(ap, struct lua_State *); /* * Return control to tarantool_lua_load_init_script. * tarantool_lua_load_init_script when will start an auxiliary event * loop and re-schedule this fiber. */ fiber_sleep(0.0); char path[PATH_MAX + 1]; snprintf(path, PATH_MAX, "%s/%s", cfg.script_dir, TARANTOOL_LUA_INIT_SCRIPT); if (access(path, F_OK) == 0) { say_info("loading %s", path); /* Execute the init file. */ if (tarantool_lua_dofile(L, path)) panic("%s", lua_tostring(L, -1)); /* clear the stack from return values. */ lua_settop(L, 0); } /* * The file doesn't exist. It's OK, tarantool may * have no init file. */ /* * Lua script finished. Stop the auxiliary event loop and * return control back to tarantool_lua_load_init_script. */ ev_break(EVBREAK_ALL); } /** * Unset functions in the Lua state which can be used to * execute external programs or otherwise introduce a breach * in security. * * @param L is a Lua State. */ static void tarantool_lua_sandbox(struct lua_State *L) { /* * Unset some functions for security reasons: * 1. Some os.* functions (like os.execute, os.exit, etc..) * 2. require(), since it can be used to provide access to ffi * or anything else we unset in 1. * 3. package, because it can be used to invoke require or to get * any builtin module using package.loaded */ int result = tarantool_lua_dostring(L, "os.execute = nil\n" "os.exit = nil\n" "os.rename = nil\n" "os.tmpname = nil\n" "os.remove = nil\n" "io = nil\n" "require = nil\n" "package = nil\n"); if (result) panic("%s", lua_tostring(L, -1)); } void tarantool_lua_load_init_script(struct lua_State *L) { /* * init script can call box.fiber.yield (including implicitly via * box.insert, box.update, etc...), but box.fiber.yield() today, * which, when called from 'sched' fiber crashes the server. * To work this problem around we must run init script in * a separate fiber. */ struct fiber *loader = fiber_new(TARANTOOL_LUA_INIT_SCRIPT, load_init_script); fiber_call(loader, L); /* * Run an auxiliary event loop to re-schedule load_init_script fiber. * When this fiber finishes, it will call ev_break to stop the loop. */ ev_run(0); /* Outside the startup file require() or ffi are not * allowed. */ tarantool_lua_sandbox(tarantool_L); } void * lua_region_alloc(void *ctx, size_t size) { struct lua_State *L = (struct lua_State *) ctx; return lua_newuserdata(L, size); } tarantool-1.5.1.218.g1a69fd6/src/lua/session.cc0000664000000000000000000001214512231715257017332 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua/session.h" #include "lua/init.h" extern "C" { #include #include #include } #include "fiber.h" #include "session.h" #include "sio.h" static const char *sessionlib_name = "box.session"; /** * Return a unique monotonic session * identifier. The identifier can be used * to check whether or not a session is alive. * 0 means there is no session (e.g. * a procedure is running in a detached * fiber). */ static int lbox_session_id(struct lua_State *L) { lua_pushnumber(L, fiber->sid); return 1; } /** * Check whether or not a session exists. */ static int lbox_session_exists(struct lua_State *L) { if (lua_gettop(L) != 1) luaL_error(L, "session.exists(sid): bad arguments"); uint32_t sid = luaL_checkint(L, -1); lua_pushnumber(L, session_exists(sid)); return 1; } /** * Pretty print peer name. */ static int lbox_session_peer(struct lua_State *L) { if (lua_gettop(L) > 1) luaL_error(L, "session.peer(sid): bad arguments"); uint32_t sid = lua_gettop(L) == 1 ? luaL_checkint(L, -1) : fiber->sid; int fd = session_fd(sid); struct sockaddr_in addr; sio_getpeername(fd, &addr); lua_pushstring(L, sio_strfaddr(&addr)); return 1; } struct lbox_session_trigger { struct session_trigger *trigger; int ref; }; static struct lbox_session_trigger on_connect = { &session_on_connect, LUA_NOREF}; static struct lbox_session_trigger on_disconnect = { &session_on_disconnect, LUA_NOREF}; static void lbox_session_run_trigger(void *param) { struct lbox_session_trigger *trigger = (struct lbox_session_trigger *) param; /* Copy the referenced callable object object stack. */ lua_State *L = lua_newthread(tarantool_L); int coro_ref = luaL_ref(tarantool_L, LUA_REGISTRYINDEX); lua_rawgeti(tarantool_L, LUA_REGISTRYINDEX, trigger->ref); /** Move the function to be called to the new coro. */ lua_xmove(tarantool_L, L, 1); try { lua_call(L, 0, 0); luaL_unref(tarantool_L, LUA_REGISTRYINDEX, coro_ref); } catch (const Exception& e) { luaL_unref(tarantool_L, LUA_REGISTRYINDEX, coro_ref); throw; } catch (...) { luaL_unref(tarantool_L, LUA_REGISTRYINDEX, coro_ref); tnt_raise(ClientError, ER_PROC_LUA, lua_tostring(L, -1)); } } static int lbox_session_set_trigger(struct lua_State *L, struct lbox_session_trigger *trigger) { if (lua_gettop(L) != 1 || (lua_type(L, -1) != LUA_TFUNCTION && lua_type(L, -1) != LUA_TNIL)) { luaL_error(L, "session.on_connect(chunk): bad arguments"); } /* Pop the old trigger */ if (trigger->ref != LUA_NOREF) { lua_rawgeti(L, LUA_REGISTRYINDEX, trigger->ref); luaL_unref(L, LUA_REGISTRYINDEX, trigger->ref); } else { lua_pushnil(L); } /* * Set or clear the trigger. Return the old value of the * trigger. */ if (lua_type(L, -2) == LUA_TNIL) { trigger->ref = LUA_NOREF; trigger->trigger->trigger = NULL; trigger->trigger->param = NULL; } else { /* Move the trigger to the top of the stack. */ lua_insert(L, -2); /* Reference the new trigger. Pops it. */ trigger->ref = luaL_ref(L, LUA_REGISTRYINDEX); trigger->trigger->trigger = lbox_session_run_trigger; trigger->trigger->param = trigger; } /* Return the old trigger. */ return 1; } static int lbox_session_on_connect(struct lua_State *L) { return lbox_session_set_trigger(L, &on_connect); } static int lbox_session_on_disconnect(struct lua_State *L) { return lbox_session_set_trigger(L, &on_disconnect); } static const struct luaL_reg lbox_session_meta [] = { {"id", lbox_session_id}, {NULL, NULL} }; static const struct luaL_reg sessionlib[] = { {"id", lbox_session_id}, {"exists", lbox_session_exists}, {"peer", lbox_session_peer}, {"on_connect", lbox_session_on_connect}, {"on_disconnect", lbox_session_on_disconnect}, {NULL, NULL} }; void tarantool_lua_session_init(struct lua_State *L) { luaL_register(L, sessionlib_name, sessionlib); lua_pop(L, 1); } tarantool-1.5.1.218.g1a69fd6/src/lua/uuid.lua0000664000000000000000000000174612231715257017016 0ustar rootroot(function(box) local ffi = require("ffi") ffi.cdef[[ /* from */ typedef unsigned char uuid_t[16]; void uuid_generate(uuid_t out); /* from libc */ int snprintf(char *str, size_t size, const char *format, ...); ]] local libuuid = nil local builtin = ffi.C function check_libs() if libuuid then return end libuuid = ffi.load('uuid.so.1') end box.uuid = function() check_libs() local uuid = ffi.new('uuid_t') libuuid.uuid_generate(uuid) return ffi.string(uuid, 16) end box.uuid_hex = function() check_libs() local uuid = ffi.new('uuid_t') libuuid.uuid_generate(uuid) local uuid_hex = ffi.new('char[33]') for i = 0,ffi.sizeof('uuid_t'),1 do builtin.snprintf(uuid_hex + i * 2, 3, "%02x", ffi.cast('unsigned int',uuid[i])) end return ffi.string(uuid_hex, 32) end end)(box) tarantool-1.5.1.218.g1a69fd6/src/lua/info.cc0000664000000000000000000001231712231715257016603 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua/info.h" #include "lua/init.h" extern "C" { #include #include #include } /* extern "C" */ #include #include #include #include "tarantool.h" #include "box/box.h" static int lbox_info_recovery_lag(struct lua_State *L) { if (recovery_state->remote) lua_pushnumber(L, recovery_state->remote->recovery_lag); else lua_pushnumber(L, 0); return 1; } static int lbox_info_recovery_last_update_tstamp(struct lua_State *L) { if (recovery_state->remote) lua_pushnumber(L, recovery_state->remote->recovery_last_update_tstamp); else lua_pushnumber(L, 0); return 1; } static int lbox_info_lsn(struct lua_State *L) { luaL_pushnumber64(L, recovery_state->confirmed_lsn); return 1; } static int lbox_info_status(struct lua_State *L) { lua_pushstring(L, box_status()); return 1; } static int lbox_info_uptime(struct lua_State *L) { lua_pushnumber(L, (unsigned)tarantool_uptime() + 1); return 1; } static int lbox_info_snapshot_pid(struct lua_State *L) { lua_pushnumber(L, snapshot_pid); return 1; } static const struct luaL_reg lbox_info_dynamic_meta [] = { {"recovery_lag", lbox_info_recovery_lag}, {"recovery_last_update", lbox_info_recovery_last_update_tstamp}, {"lsn", lbox_info_lsn}, {"status", lbox_info_status}, {"uptime", lbox_info_uptime}, {"snapshot_pid", lbox_info_snapshot_pid}, {NULL, NULL} }; /** Evaluate box.info.* function value and push it on the stack. */ static int lbox_info_index(struct lua_State *L) { lua_pushvalue(L, -1); /* dup key */ lua_gettable(L, lua_upvalueindex(1)); /* table[key] */ if (!lua_isfunction(L, -1)) { /* No such key. Leave nil is on the stack. */ return 1; } lua_call(L, 0, 1); lua_remove(L, -2); return 1; } /** Push a bunch of compile-time or start-time constants into a Lua table. */ static void lbox_info_init_static_values(struct lua_State *L) { /* tarantool version */ lua_pushstring(L, "version"); lua_pushstring(L, tarantool_version()); lua_settable(L, -3); /* pid */ lua_pushstring(L, "pid"); lua_pushnumber(L, getpid()); lua_settable(L, -3); /* logger_pid */ lua_pushstring(L, "logger_pid"); lua_pushnumber(L, logger_pid); lua_settable(L, -3); /* config */ lua_pushstring(L, "config"); lua_pushstring(L, cfg_filename_fullpath); lua_settable(L, -3); /* build */ lua_pushstring(L, "build"); lua_newtable(L); /* box.info.build.target */ lua_pushstring(L, "target"); lua_pushstring(L, BUILD_INFO); lua_settable(L, -3); /* box.info.build.options */ lua_pushstring(L, "options"); lua_pushstring(L, BUILD_OPTIONS); lua_settable(L, -3); /* box.info.build.compiler */ lua_pushstring(L, "compiler"); lua_pushstring(L, COMPILER_INFO); lua_settable(L, -3); /* box.info.build.flags */ lua_pushstring(L, "flags"); lua_pushstring(L, TARANTOOL_C_FLAGS); lua_settable(L, -3); lua_settable(L, -3); /* box.info.build */ } /** * When user invokes box.info(), return a table of key/value * pairs containing the current info. */ static int lbox_info_call(struct lua_State *L) { lua_newtable(L); lbox_info_init_static_values(L); for (int i = 0; lbox_info_dynamic_meta[i].name; i++) { lua_pushstring(L, lbox_info_dynamic_meta[i].name); lbox_info_dynamic_meta[i].func(L); lua_settable(L, -3); } return 1; } /** Initialize box.info package. */ void tarantool_lua_info_init(struct lua_State *L) { lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "info"); lua_newtable(L); /* box.info table */ lua_newtable(L); /* metatable for box.info */ lua_pushstring(L, "__index"); lua_newtable(L); luaL_register(L, NULL, lbox_info_dynamic_meta); /* table for __index */ lua_pushcclosure(L, lbox_info_index, 1); lua_settable(L, -3); lua_pushstring(L, "__call"); lua_pushcfunction(L, lbox_info_call); lua_settable(L, -3); lua_setmetatable(L, -2); lbox_info_init_static_values(L); lua_settable(L, -3); /* box.info = created table */ lua_pop(L, 1); /* cleanup stack */ } tarantool-1.5.1.218.g1a69fd6/src/lua/lua_socket.cc0000664000000000000000000006103712242653271020003 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua_socket.h" extern "C" { #include #include #include } /* extern "C" */ #include "sio.h" #include "evio.h" #include "coio.h" #include "coeio.h" #include "iobuf.h" #include "coio_buf.h" #include #include #include #include #include "fiber.h" #include "tbuf.h" #include #include #include static const char socketlib_name[] = "box.socket"; /** * gethostbyname(), getaddrinfo() and friends do not use * errno or errno.h errors for their error returns. * Here we map all failures of name resolution to a single * socket error number. */ /** last operation status */ enum bio_status { BIO_ERROR, BIO_TIMEOUT, BIO_EOF, BIO_LIMIT }; struct bio_socket { struct ev_io io_r; struct ev_io io_w; struct mutex io_r_mutex; struct mutex io_w_mutex; struct iobuf *iob; /** SOCK_DGRAM or SOCK_STREAM */ int socktype; int error; }; static int bio_pushsocket(struct lua_State *L, int socktype) { struct bio_socket *s = (struct bio_socket *) lua_newuserdata(L, sizeof(struct bio_socket)); luaL_getmetatable(L, socketlib_name); lua_setmetatable(L, -2); coio_init(&s->io_r); coio_init(&s->io_w); s->socktype = socktype; s->iob = NULL; s->error = 0; mutex_create(&s->io_r_mutex); mutex_create(&s->io_w_mutex); /* * Do not create a file descriptor yet. Thanks to ipv6, * socket family is not known until host name is resolved. * Socket type is saved in s->socktype. */ return 1; } static inline struct bio_socket * bio_checksocket(struct lua_State *L, int narg) { /* avoiding unnecessary luajit assert */ if (lua_gettop(L) < narg) luaL_error(L, "box.socket: incorrect method call"); return (struct bio_socket *) luaL_checkudata(L, narg, socketlib_name); } static inline struct bio_socket * bio_checkactivesocket(struct lua_State *L, int narg) { struct bio_socket *s = bio_checksocket(L, narg); if (! evio_is_active(&s->io_w)) luaL_error(L, "box.socket: socket is not initialized"); return s; } /** * The last error is saved in socket. It can be pretty harmless, * for example a timeout. Clear the last error before the next * call. For now clear any error, even a persistent one: it's not * clear how being any smarter can benefit the library user. */ static inline void bio_clearerr(struct bio_socket *s) { s->error = false; } static void bio_initbuf(struct bio_socket *s) { assert(s->iob == NULL); char name[PALLOC_POOL_NAME_MAXLEN]; const char *type = s->socktype == SOCK_STREAM ? "tcp" : "udp"; snprintf(name, sizeof(name), "box.io.%s(%d)", type, s->io_w.fd); s->iob = iobuf_new(name); } static inline int bio_pushstatus(struct lua_State *L, enum bio_status s) { static const char *status_strs[] = {"error", "timeout", "eof", "limit"}; lua_pushstring(L, status_strs[s]); return 1; } static int bio_pusherrorcode(struct lua_State *L, struct bio_socket *s) { lua_pushinteger(L, s->error); if (s->error >= 0) lua_pushstring(L, strerror(s->error)); else if (s->error == ERESOLVE) lua_pushstring(L, "Host name resolution failed"); return 2; } /** Error from accept, connect, bind, etc. */ static int bio_pusherror(struct lua_State *L, struct bio_socket *s, int errorno) { s->error = errorno; bio_pushstatus(L, errorno == ETIMEDOUT ? BIO_TIMEOUT : BIO_ERROR); return 1 + bio_pusherrorcode(L, s); } static int bio_pushsockerror(struct lua_State *L, struct bio_socket *s, int errorno) { lua_pushnil(L); /* no socket. */ return 1 + bio_pusherror(L, s, errorno); } /** Error from send */ static int bio_pushsenderror(struct lua_State *L, struct bio_socket *s, size_t sz, int errorno) { lua_pushinteger(L, sz); /* sent zero bytes. */ return 1 + bio_pusherror(L, s, errorno); } /** Error from recv */ static int bio_pushrecverror(struct lua_State *L, struct bio_socket *s, int errorno) { lua_pushstring(L, ""); /* received no data. */ return 1 + bio_pusherror(L, s, errorno); } static inline int bio_pusheof(struct lua_State *L, struct bio_socket *s) { struct ibuf *in = &s->iob->in; lua_pushlstring(L, in->pos, ibuf_size(in)); in->pos += ibuf_size(in); bio_pushstatus(L, BIO_EOF); return 2; } static int lbox_socket_tostring(struct lua_State *L) { struct bio_socket *s = bio_checksocket(L, -1); lua_pushstring(L, sio_socketname(s->io_w.fd)); return 1; } /** * box.io.tcp() * * Create SOCK_STREAM socket object. */ static int lbox_socket_tcp(struct lua_State *L) { return bio_pushsocket(L, SOCK_STREAM); } /** * box.io.udp() * * Create SOCK_DGRAM socket object. */ static int lbox_socket_udp(struct lua_State *L) { return bio_pushsocket(L, SOCK_DGRAM); } /** * socket:close() * * Close the socket. A closed socket should not be used * any more. */ static int lbox_socket_close(struct lua_State *L) { struct bio_socket *s = bio_checksocket(L, -1); if (! evio_is_active(&s->io_w)) return 0; if (s->iob) { iobuf_delete(s->iob); s->iob = NULL; } ev_io_stop(&s->io_r); evio_close(&s->io_w); s->io_r.fd = s->io_w.fd; assert(s->io_r.fd == -1); mutex_destroy(&s->io_r_mutex); mutex_destroy(&s->io_w_mutex); bio_clearerr(s); return 0; } /** * socket:shutdown(how) * * Shut down part of a full-duplex connection. * * @retval self success * @retval nil, status = "error", eno, estr error */ static int lbox_socket_shutdown(struct lua_State *L) { struct bio_socket *s = bio_checkactivesocket(L, 1); int how = luaL_checkint(L, 2); bio_clearerr(s); if (shutdown(s->io_w.fd, how)) return bio_pushsockerror(L, s, errno); /* case #1: Success */ lua_settop(L, 1); return 1; } /** * socket:error() * * @return error code and error description of the last error. */ static int lbox_socket_error(struct lua_State *L) { struct bio_socket *s = bio_checksocket(L, -1); return bio_pusherrorcode(L, s); } /** * socket:connect(host, port [, timeout]) * * Connect socket to a host. * * @retval self success * @retval nil, status = "error", eno, estr error * @retval nil, status = "timeout", eno, estr timeout */ static int lbox_socket_connect(struct lua_State *L) { struct bio_socket *s = bio_checksocket(L, 1); const char *host = luaL_checkstring(L, 2); const char *port = luaL_checkstring(L, 3); double timeout = TIMEOUT_INFINITY; if (lua_gettop(L) == 4) timeout = luaL_checknumber(L, 4); if (evio_is_active(&s->io_w)) return bio_pushsockerror(L, s, EALREADY); bio_clearerr(s); /* try to resolve a hostname */ ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); struct addrinfo *ai = coeio_resolve(s->socktype, host, port, delay); if (ai == NULL) return bio_pushsockerror(L, s, errno); evio_timeout_update(start, &delay); try { /* connect to a first available host */ int r = coio_connect_addrinfo(&s->io_w, ai, delay); freeaddrinfo(ai); if (r) return bio_pushsockerror(L, s, ETIMEDOUT); /* set coio reader socket */ s->io_r.fd = s->io_w.fd; } catch (const SocketError& e) { freeaddrinfo(ai); return bio_pushsockerror(L, s, errno); } bio_initbuf(s); /* Success */ lua_settop(L, 1); return 1; } /** * socket:send(data [, timeout]) * * Send data to a socket. * * In case of socket an error or timeout send() returns * the number of bytes written before the error occurred. * * * @retval size success * @retval size, status = "timeout", eno, estr timeout * @retval size, status = "error", eno, estr error * */ static int lbox_socket_send(struct lua_State *L) { struct bio_socket *s = bio_checkactivesocket(L, 1); size_t buf_size = 0; const char *buf = luaL_checklstring(L, 2, &buf_size); double timeout = TIMEOUT_INFINITY; if (lua_gettop(L) == 3) timeout = luaL_checknumber(L, 3); if (s->iob == NULL) return bio_pushsenderror(L, s, 0, ENOTCONN); bio_clearerr(s); /* acquire write lock */ ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); bool timed_out = mutex_lock_timeout(&s->io_w_mutex, delay); if (timed_out) return bio_pushsenderror(L, s, 0, ETIMEDOUT); evio_timeout_update(start, &delay); int rc; try { ssize_t nwr = coio_write_timeout(&s->io_w, buf, buf_size, delay); if (nwr < buf_size) { rc = bio_pushsenderror(L, s, nwr, ETIMEDOUT); mutex_unlock(&s->io_w_mutex); return rc; } mutex_unlock(&s->io_w_mutex); } catch (const SocketError& e) { mutex_unlock(&s->io_w_mutex); rc = bio_pushsenderror(L, s, 0, errno); return rc; } catch (const Exception& e) { mutex_unlock(&s->io_w_mutex); throw; } /* case #1: Success */ lua_pushinteger(L, buf_size); return 1; } /** * socket:recv(size [, timeout]) * * Try to read size bytes from a socket. * * In case of timeout all read data will be available on next * read. In case of read error the data is thrown away. * * @retval data success * @retval data = "", status = "error", eno, estr socket error * @retval data = "", status = "timeout", eno, estr read timeout * @retval data = chunk, status = "eof" eof */ static int lbox_socket_recv(struct lua_State *L) { struct bio_socket *s = bio_checkactivesocket(L, 1); int sz = luaL_checkint(L, 2); double timeout = TIMEOUT_INFINITY; if (lua_gettop(L) >= 3) timeout = luaL_checknumber(L, 3); if (s->iob == NULL) return bio_pushrecverror(L, s, ENOTCONN); /* Clear possible old timeout status. */ bio_clearerr(s); /* * Readahead buffer can contain sufficient amount of * data from the previous call to cover the required read * size. * * If not, try to read as much as possible to readahead * until it's more or equal to the required size. */ struct ibuf *in = &s->iob->in; ssize_t to_read = sz - ibuf_size(in); if (to_read > 0) { int rc; /* acquire read lock */ ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); bool timed_out = mutex_lock_timeout(&s->io_r_mutex, delay); if (timed_out) return bio_pushrecverror(L, s, ETIMEDOUT); evio_timeout_update(start, &delay); to_read = sz - ibuf_size(in); ssize_t nrd; try { nrd = coio_bread_timeout(&s->io_r, in, to_read, delay); mutex_unlock(&s->io_r_mutex); } catch (const SocketError& e) { mutex_unlock(&s->io_r_mutex); rc = bio_pushrecverror(L, s, errno); return rc; } catch (const Exception& e) { mutex_unlock(&s->io_r_mutex); throw; } if (nrd < to_read) { /* timeout or EOF. */ if (errno == ETIMEDOUT) rc = bio_pushrecverror(L, s, ETIMEDOUT); else rc = bio_pusheof(L, s); return rc; } } lua_pushlstring(L, in->pos, sz); in->pos += sz; return 1; } struct readline_state { int pos; const char *sep; size_t sep_size; }; static void readline_state_init(struct lua_State *L, struct readline_state *rs, int idx) { int i = 0; lua_pushnil(L); while (lua_next(L, idx) != 0) { rs[i].pos = 0; rs[i].sep = luaL_checklstring(L, -1, &rs[i].sep_size); if (rs[i].sep_size == 0) luaL_error(L, "box.io.readline: bad separator"); lua_pop(L, 1); i++; } } static inline int readline_state_try(struct readline_state *rs, int i, char chr) { if (unlikely(rs[i].sep[ rs[i].pos ] == chr)) { if (unlikely(rs[i].sep_size == rs[i].pos + 1)) return i; rs[i].pos++; } else { rs[i].pos = 0; } return -1; } static int readline_state_next(struct readline_state *rs, int size, char chr) { int i; for (i = 0; i < size; i++) { /* we have to repeat state check to ensure that we * don't miss new separator state after previous * reset. */ if (unlikely(rs[i].sep[ rs[i].pos ] == chr)) { first_matched: if (unlikely(rs[i].sep_size == rs[i].pos + 1)) return i; rs[i].pos++; continue; } rs[i].pos = 0; if (unlikely(rs[i].sep[ rs[i].pos ] == chr)) goto first_matched; } return -1; } static void lbox_socket_readline_cr(struct lua_State *L) { /* emulate user passed {'\n'} as the separate table */ lua_newtable(L); lua_pushnumber(L, 1); lua_pushstring(L, "\n"); lua_rawset(L, -3); } static int lbox_socket_readline_opts(struct lua_State *L, unsigned int *limit, double *timeout) { int seplist = 2; switch (lua_gettop(L)) { case 1: /* readline() */ lbox_socket_readline_cr(L); break; case 2: /* readline(limit) readline({seplist}) */ if (lua_isnumber(L, 2)) { *limit = luaL_checkint(L, 2); lbox_socket_readline_cr(L); seplist = 3; } else if (! lua_istable(L, 2)) luaL_error(L, "box.io.readline: bad argument"); break; case 3: /* readline(limit, timeout) * readline(limit, {seplist}) * readline({seplist}, timeout) */ if (lua_isnumber(L, 2)) { *limit = luaL_checkint(L, 2); if (lua_isnumber(L, 3)) { *timeout = luaL_checknumber(L, 3); lbox_socket_readline_cr(L); seplist = 4; break; } else if (! lua_istable(L, 3)) luaL_error(L, "box.io.readline: bad argument"); seplist = 3; break; } else if (! lua_istable(L, 2)) luaL_error(L, "box.io.readline: bad argument"); *timeout = luaL_checknumber(L, 3); seplist = 2; break; case 4: /* readline(limit, {seplist}, timeout) */ *limit = luaL_checkint(L, 2); if (! lua_istable(L, 3)) luaL_error(L, "box.io.readline: bad argument"); seplist = 3; *timeout = luaL_checknumber(L, 4); break; default: luaL_error(L, "box.io.readline: bad argument"); break; } return seplist; } /** * socket:readline(limit, seplist, timeout) * * Possible usage: * * readline() == readline(limit == inf, seplist == {'\n'}, timeout == inf) * readline(limit) * readline(limit, timeout) * readline({seplist}) * readline(limit, {seplist}) * readline({seplist}, timeout) * readline(limit, {seplist}, timeout) * * In case of socket error and timeout all read data will be * available on next read. * * @retval data, nil, sep = str success * @retval data = "", status = "timeout", eno, estr timeout * @retval data = "", status = "error", eno, estr error * @retval data = chunk, status = "limit" limit * @retval data = chunk, status = "eof" eof */ static int lbox_socket_readline(struct lua_State *L) { struct bio_socket *s = bio_checkactivesocket(L, 1); if (s->iob == NULL) return bio_pushrecverror(L, s, ENOTCONN); bio_clearerr(s); unsigned int limit = UINT_MAX; double timeout = TIMEOUT_INFINITY; int seplist = lbox_socket_readline_opts(L, &limit, &timeout); int rs_size = lua_objlen(L, seplist); if (rs_size == 0) luaL_error(L, "box.io.readline: bad separator table"); /* acquire read lock */ ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); bool timed_out = mutex_lock_timeout(&s->io_r_mutex, delay); if (timed_out) return bio_pushrecverror(L, s, ETIMEDOUT); evio_timeout_update(start, &delay); size_t bottom = 0; int match; struct ibuf *in = &s->iob->in; int rc; try { /* readline implementation uses a simple state machine * to determine current position of a possible * separator. */ struct readline_state *rs = (struct readline_state *) palloc(in->pool, sizeof(struct readline_state) * rs_size); readline_state_init(L, rs, seplist); while (1) { /* case #4: user limit reached */ if (bottom == limit) { lua_pushlstring(L, in->pos, bottom); s->iob->in.pos += bottom; bio_pushstatus(L, BIO_LIMIT); mutex_unlock(&s->io_r_mutex); return 2; } /* if current read position (bottom) equals to * the readahead size, then read new data. */ if (bottom == ibuf_size(in)) { ssize_t nrd = coio_bread_timeout(&s->io_r, &s->iob->in, 1, delay); /* case #5: eof (step 1)*/ if (nrd == 0) { if (errno == ETIMEDOUT) rc = bio_pushrecverror(L, s, ETIMEDOUT); else rc = bio_pusheof(L, s); mutex_unlock(&s->io_r_mutex); return rc; } evio_timeout_update(start, &delay); } match = readline_state_next(rs, rs_size, in->pos[bottom]); bottom++; if (match >= 0) break; } mutex_unlock(&s->io_r_mutex); } catch (const SocketError& e) { mutex_unlock(&s->io_r_mutex); rc = bio_pushrecverror(L, s, errno); return rc; } catch (const Exception& e) { mutex_unlock(&s->io_r_mutex); throw; } /* case #1: success, separator matched */ lua_pushlstring(L, in->pos, bottom); in->pos += bottom; lua_pushnil(L); lua_rawgeti(L, seplist, match + 1); return 3; } /** * socket:bind(host, port [, timeout]) * * Bind a socket to the given host. * * @retval socket success * @retval nil, status = "error", eno, estr error * @retval nil, status = "timeout", eno, estr timeout */ static int lbox_socket_bind(struct lua_State *L) { struct bio_socket *s = bio_checksocket(L, 1); const char *host = luaL_checkstring(L, 2); const char *port = luaL_checkstring(L, 3); double timeout = TIMEOUT_INFINITY; if (lua_gettop(L) == 4) timeout = luaL_checknumber(L, 4); if (evio_is_active(&s->io_w)) return bio_pusherror(L, s, EALREADY); bio_clearerr(s); /* try to resolve a hostname */ struct addrinfo *ai = coeio_resolve(s->socktype, host, port, timeout); if (ai == NULL) return bio_pusherror(L, s, errno); try { evio_bind_addrinfo(&s->io_w, ai); freeaddrinfo(ai); } catch (const SocketError& e) { /* case #2: error */ freeaddrinfo(ai); return bio_pusherror(L, s, errno); } /* case #1: Success */ lua_settop(L, 1); return 1; } /** * socket:listen() * * Marks the socket that it will be used to accept incoming * connection requests using socket:accept(). * * @retval socket (self) on success * @retval nil, status = "error", errno, error string */ static int lbox_socket_listen(struct lua_State *L) { struct bio_socket *s = bio_checkactivesocket(L, 1); bio_clearerr(s); if (listen(s->io_w.fd, sio_listen_backlog())) return bio_pusherror(L, s, errno); lua_settop(L, 1); return 1; } /** * socket:accept([timeout]) * * Wait for a new client connection and create connected * socket. * * @retval socket (client), nil, address, port success * @retval nil, status = "error", eno, estr error * @retval nil, status = "timeout", eno, estr timeout */ static int lbox_socket_accept(struct lua_State *L) { struct bio_socket *s = bio_checkactivesocket(L, 1); double timeout = TIMEOUT_INFINITY; if (lua_gettop(L) == 2) timeout = luaL_checknumber(L, 2); bio_clearerr(s); struct sockaddr_storage addr; /* push client socket */ bio_pushsocket(L, SOCK_STREAM); struct bio_socket *client = (struct bio_socket *) lua_touserdata(L, -1); try { client->io_w.fd = coio_accept(&s->io_w, (struct sockaddr_in*)&addr, sizeof(addr), timeout); client->io_r.fd = client->io_w.fd; } catch (const SocketError& e) { return bio_pusherror(L, s, errno); } /* get user host and port */ char hbuf[NI_MAXHOST]; char sbuf[NI_MAXSERV]; int rc = getnameinfo((struct sockaddr*)&addr, sizeof(addr), hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST|NI_NUMERICSERV); if (rc != 0) return bio_pusherror(L, s, ERESOLVE); bio_initbuf(client); lua_pushnil(L); /* status */ /* push host and port */ lua_pushstring(L, hbuf); lua_pushstring(L, sbuf); return 4; } /** * socket:sendto(buf, host, port [, timeout]) * * Send a message on a UDP socket to a specified host. * * @retval size success * @retval 0, status = "error", eno, estr error * @retval 0, status = "timeout", eno, estr timeout */ static int lbox_socket_sendto(struct lua_State *L) { struct bio_socket *s = bio_checksocket(L, 1); size_t buf_size = 0; const char *buf = luaL_checklstring(L, 2, &buf_size); const char *host = luaL_checkstring(L, 3); const char *port = luaL_checkstring(L, 4); double timeout = TIMEOUT_INFINITY; if (lua_gettop(L) == 5) timeout = luaL_checknumber(L, 5); bio_clearerr(s); /* try to resolve a hostname */ ev_tstamp start, delay; evio_timeout_init(&start, &delay, timeout); struct sockaddr_storage ss; assert(sizeof(ss) > sizeof(struct sockaddr_in6)); struct addrinfo *a = NULL; struct sockaddr *addr = (struct sockaddr*)&ss; socklen_t addrlen; if (evio_pton(host, port, &ss, &addrlen) == -1) { evio_timeout_init(&start, &delay, timeout); /* try to resolve a hostname */ struct addrinfo *a = coeio_resolve(s->socktype, host, port, delay); if (a == NULL) return bio_pushsenderror(L, s, 0, errno); evio_timeout_update(start, &delay); addr = (struct sockaddr *) a->ai_addr; addrlen = a->ai_addrlen; } size_t nwr; try { /* maybe init the socket */ if (! evio_is_active(&s->io_w)) evio_socket(&s->io_w, addr->sa_family, s->socktype, 0); nwr = coio_sendto_timeout(&s->io_w, buf, buf_size, 0, (struct sockaddr_in*)addr, addrlen, delay); if (a) { freeaddrinfo(a); } } catch (const SocketError& e) { /* case #2-3: error or timeout */ if (a) { freeaddrinfo(a); } return bio_pushsenderror(L, s, 0, errno); } if (nwr == 0) { assert(errno == ETIMEDOUT); return bio_pushsenderror(L, s, 0, ETIMEDOUT); } lua_pushinteger(L, nwr); return 1; } /** * socket:recvfrom(limit [, timeout]) * * Receive a message on a UDP socket. * * @retval data, nil, client_addr, client_port success * @retval data = "", status = "error", eno, estr error * @retval data = "", status = "timeout", eno, estr timeout * @retval data, status = "eof" eof */ static int lbox_socket_recvfrom(struct lua_State *L) { struct bio_socket *s = bio_checkactivesocket(L, 1); int buf_size = luaL_checkint(L, 2); double timeout = TIMEOUT_INFINITY; if (lua_gettop(L) == 3) timeout = luaL_checknumber(L, 3); bio_clearerr(s); /* Maybe initialize the buffer, can throw ER_MEMORY_ISSUE. */ if (s->iob == NULL) bio_initbuf(s); struct sockaddr_storage addr; struct ibuf *in = &s->iob->in; size_t nrd; try { ibuf_reserve(in, buf_size); nrd = coio_recvfrom_timeout(&s->io_w, in->pos, buf_size, 0, (struct sockaddr_in*)&addr, sizeof(addr), timeout); } catch (const SocketError& e) { return bio_pushrecverror(L, s, errno); } if (nrd == 0) { if (errno == ETIMEDOUT) return bio_pushrecverror(L, s, errno); return bio_pusheof(L, s); } /* push host and port */ char hbuf[NI_MAXHOST]; char sbuf[NI_MAXSERV]; int rc = getnameinfo((struct sockaddr*)&addr, sizeof(addr), hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST|NI_NUMERICSERV); if (rc != 0) { /* case #2: error */ return bio_pushrecverror(L, s, ERESOLVE); } /* case #1: push received data */ lua_pushlstring(L, in->pos, nrd); lua_pushnil(L); lua_pushstring(L, hbuf); lua_pushstring(L, sbuf); return 4; } void tarantool_lua_socket_init(struct lua_State *L) { static const struct luaL_reg lbox_socket_meta[] = { {"__gc", lbox_socket_close}, {"__tostring", lbox_socket_tostring}, {"error", lbox_socket_error}, {"close", lbox_socket_close}, {"shutdown", lbox_socket_shutdown}, {"connect", lbox_socket_connect}, {"send", lbox_socket_send}, {"recv", lbox_socket_recv}, {"readline", lbox_socket_readline}, {"bind", lbox_socket_bind}, {"listen", lbox_socket_listen}, {"accept", lbox_socket_accept}, {"sendto", lbox_socket_sendto}, {"recvfrom", lbox_socket_recvfrom}, {NULL, NULL} }; static const struct luaL_reg socketlib[] = { {"tcp", lbox_socket_tcp}, {"udp", lbox_socket_udp}, {NULL, NULL} }; tarantool_lua_register_type(L, socketlib_name, lbox_socket_meta); luaL_register(L, socketlib_name, socketlib); lua_pushstring(L, "SHUT_RD"); lua_pushnumber(L, SHUT_RD); lua_settable(L, -3); lua_pushstring(L, "SHUT_WR"); lua_pushnumber(L, SHUT_WR); lua_settable(L, -3); lua_pushstring(L, "SHUT_RDWR"); lua_pushnumber(L, SHUT_RDWR); lua_settable(L, -3); lua_pop(L, 1); } tarantool-1.5.1.218.g1a69fd6/src/lua/stat.cc0000664000000000000000000000572612202131537016620 0ustar rootroot/* * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua/stat.h" #include #include extern "C" { #include #include #include } /* extern "C" */ static void fill_stat_item(struct lua_State *L, int rps, int64_t total) { lua_pushstring(L, "rps"); lua_pushnumber(L, rps); lua_settable(L, -3); lua_pushstring(L, "total"); lua_pushnumber(L, total); lua_settable(L, -3); } static int set_stat_item(const char *name, int rps, int64_t total, void *cb_ctx) { struct lua_State *L = (struct lua_State *) cb_ctx; lua_pushstring(L, name); lua_newtable(L); fill_stat_item(L, rps, total); lua_settable(L, -3); return 0; } /** * A stat_foreach() callback used to handle access to e.g. * box.stats.DELETE. */ static int seek_stat_item(const char *name, int rps, int64_t total, void *cb_ctx) { struct lua_State *L = (struct lua_State *) cb_ctx; if (strcmp(name, lua_tostring(L, -1)) != 0) return 0; lua_newtable(L); fill_stat_item(L, rps, total); return 1; } static int lbox_stat_index(struct lua_State *L) { luaL_checkstring(L, -1); return stat_foreach(seek_stat_item, L); } static int lbox_stat_call(struct lua_State *L) { lua_newtable(L); stat_foreach(set_stat_item, L); return 1; } static const struct luaL_reg lbox_stat_meta [] = { {"__index", lbox_stat_index}, {"__call", lbox_stat_call}, {NULL, NULL} }; /** Initialize bos.stat package. */ void tarantool_lua_stat_init(struct lua_State *L) { lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "stat"); lua_newtable(L); lua_newtable(L); luaL_register(L, NULL, lbox_stat_meta); lua_setmetatable(L, -2); lua_settable(L, -3); /* box.stat = created table */ lua_pop(L, 1); /* cleanup stack */ } tarantool-1.5.1.218.g1a69fd6/src/lua/cjson.cc0000664000000000000000000000314712202131537016754 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua/cjson.h" extern "C" { #include "lua.h" #include "lauxlib.h" #include "lualib.h" int luaopen_cjson(lua_State *l); } int tarantool_lua_cjson_init(struct lua_State *L) { lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "cjson"); luaopen_cjson(L); lua_settable(L, -3); lua_pop(L, 1); return 0; } tarantool-1.5.1.218.g1a69fd6/src/lua/lua_ipc.h0000664000000000000000000000273312231715257017127 0ustar rootroot#ifndef TARANTOOL_LUA_IPC_H_INCLUDED #define TARANTOOL_LUA_IPC_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; void tarantool_lua_ipc_init(struct lua_State *L); #endif /* TARANTOOL_LUA_IPC_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/lua/lua_socket.h0000664000000000000000000000274712231715257017651 0ustar rootroot#ifndef TARANTOOL_LUA_SOCKET_H_INCLUDED #define TARANTOOL_LUA_SOCKET_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; void tarantool_lua_socket_init(struct lua_State *L); #endif /* TARANTOOL_LUA_SOCKET_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/lua/lua_ipc.cc0000664000000000000000000001613412231715257017265 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "lua_ipc.h" #include extern "C" { #include #include #include } /* extern "C" */ #include "ipc.h" #include "lua/init.h" static const char channel_lib[] = "box.ipc.channel"; /******************** channel ***************************/ static int lbox_ipc_channel(struct lua_State *L) { lua_Integer size = 1; if (lua_gettop(L) > 0) { if (lua_gettop(L) != 1 || !lua_isnumber(L, 1)) luaL_error(L, "fiber.channel(size): bad arguments"); size = lua_tointeger(L, -1); if (size < 0) luaL_error(L, "box.channel(size): negative size"); } struct ipc_channel *ch = ipc_channel_new(size); if (!ch) luaL_error(L, "box.channel: Not enough memory"); void **ptr = (void **) lua_newuserdata(L, sizeof(void *)); luaL_getmetatable(L, channel_lib); lua_pushstring(L, "rid"); /* first object id */ lua_pushnumber(L, 1); lua_settable(L, -3); lua_setmetatable(L, -2); *ptr = ch; return 1; } static inline struct ipc_channel * lbox_check_channel(struct lua_State *L, int narg) { return *(struct ipc_channel **) luaL_checkudata(L, narg, channel_lib); } static int lbox_ipc_channel_gc(struct lua_State *L) { if (lua_gettop(L) != 1 || !lua_isuserdata(L, 1)) return 0; struct ipc_channel *ch = lbox_check_channel(L, -1); ipc_channel_delete(ch); return 0; } static int lbox_ipc_channel_is_full(struct lua_State *L) { if (lua_gettop(L) != 1 || !lua_isuserdata(L, 1)) luaL_error(L, "usage: channel:is_full()"); struct ipc_channel *ch = lbox_check_channel(L, -1); lua_pushboolean(L, ipc_channel_is_full(ch)); return 1; } static int lbox_ipc_channel_is_empty(struct lua_State *L) { if (lua_gettop(L) != 1 || !lua_isuserdata(L, 1)) luaL_error(L, "usage: channel:is_empty()"); struct ipc_channel *ch = lbox_check_channel(L, -1); lua_pushboolean(L, ipc_channel_is_empty(ch)); return 1; } static int lbox_ipc_channel_put(struct lua_State *L) { ev_tstamp timeout = 0; int top = lua_gettop(L); struct ipc_channel *ch; switch (top) { case 2: timeout = TIMEOUT_INFINITY; break; case 3: if (!lua_isnumber(L, -1)) luaL_error(L, "timeout must be a number"); timeout = lua_tonumber(L, -1); if (timeout < 0) luaL_error(L, "wrong timeout"); break; default: luaL_error(L, "usage: channel:put(var [, timeout])"); } ch = lbox_check_channel(L, -top); lua_getmetatable(L, -top); lua_pushstring(L, "rid"); lua_gettable(L, -2); lua_Integer rid = lua_tointeger(L, -1); if (rid < 0x7FFFFFFF) rid++; else rid = 1; lua_pushstring(L, "rid"); /* update object id */ lua_pushnumber(L, rid); lua_settable(L, -4); lua_pushnumber(L, rid); lua_pushvalue(L, 2); lua_settable(L, -4); int retval; if (ipc_channel_put_timeout(ch, (void *)rid, timeout) == 0) { retval = 1; } else { /* put timeout */ retval = 0; lua_pushnumber(L, rid); lua_pushnil(L); lua_settable(L, -4); } lua_settop(L, top); lua_pushboolean(L, retval); return 1; } static int lbox_ipc_channel_get(struct lua_State *L) { int top = lua_gettop(L); ev_tstamp timeout; if (top > 2 || top < 1 || !lua_isuserdata(L, -top)) luaL_error(L, "usage: channel:get([timeout])"); if (top == 2) { if (!lua_isnumber(L, 2)) luaL_error(L, "timeout must be a number"); timeout = lua_tonumber(L, 2); if (timeout < 0) luaL_error(L, "wrong timeout"); } else { timeout = TIMEOUT_INFINITY; } struct ipc_channel *ch = lbox_check_channel(L, 1); lua_Integer rid = (lua_Integer)ipc_channel_get_timeout(ch, timeout); if (!rid) { lua_pushnil(L); return 1; } lua_getmetatable(L, 1); lua_pushstring(L, "broadcast_message"); lua_gettable(L, -2); if (lua_isnil(L, -1)) { /* common messages */ lua_pop(L, 1); /* nil */ lua_pushnumber(L, rid); /* extract and delete value */ lua_gettable(L, -2); lua_pushnumber(L, rid); lua_pushnil(L); lua_settable(L, -4); } lua_remove(L, -2); /* cleanup stack (metatable) */ return 1; } static int lbox_ipc_channel_broadcast(struct lua_State *L) { struct ipc_channel *ch; if (lua_gettop(L) != 2) luaL_error(L, "usage: channel:broadcast(variable)"); ch = lbox_check_channel(L, -2); if (!ipc_channel_has_readers(ch)) return lbox_ipc_channel_put(L); lua_getmetatable(L, -2); /* 3 */ lua_pushstring(L, "broadcast_message"); /* 4 */ /* save old value */ lua_pushstring(L, "broadcast_message"); lua_gettable(L, 3); /* 5 */ lua_pushstring(L, "broadcast_message"); /* save object */ lua_pushvalue(L, 2); lua_settable(L, 3); int count = ipc_channel_broadcast(ch, (void *)1); lua_settable(L, 3); lua_pop(L, 1); /* stack cleanup */ lua_pushnumber(L, count); return 1; } static int lbox_ipc_channel_has_readers(struct lua_State *L) { if (lua_gettop(L) != 1) luaL_error(L, "usage: channel:has_readers()"); struct ipc_channel *ch = lbox_check_channel(L, -1); lua_pushboolean(L, ipc_channel_has_readers(ch)); return 1; } static int lbox_ipc_channel_has_writers(struct lua_State *L) { if (lua_gettop(L) != 1) luaL_error(L, "usage: channel:has_writers()"); struct ipc_channel *ch = lbox_check_channel(L, -1); lua_pushboolean(L, ipc_channel_has_writers(ch)); return 1; } void tarantool_lua_ipc_init(struct lua_State *L) { static const struct luaL_reg channel_meta[] = { {"__gc", lbox_ipc_channel_gc}, {"is_full", lbox_ipc_channel_is_full}, {"is_empty", lbox_ipc_channel_is_empty}, {"put", lbox_ipc_channel_put}, {"get", lbox_ipc_channel_get}, {"broadcast", lbox_ipc_channel_broadcast}, {"has_readers", lbox_ipc_channel_has_readers}, {"has_writers", lbox_ipc_channel_has_writers}, {NULL, NULL} }; tarantool_lua_register_type(L, channel_lib, channel_meta); static const struct luaL_reg ipc_meta[] = { {"channel", lbox_ipc_channel}, {NULL, NULL} }; lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "ipc"); lua_newtable(L); /* box.ipc table */ luaL_register(L, NULL, ipc_meta); lua_settable(L, -3); lua_pop(L, 1); } tarantool-1.5.1.218.g1a69fd6/src/iproto_port.h0000664000000000000000000000645212202131537017303 0ustar rootroot#ifndef TARANTOOL_IPROTO_PORT_H_INCLUDED #define TARANTOOL_IPROTO_PORT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "box/box.h" #include "box/request.h" #include "box/port.h" #include "box/tuple.h" #include "iobuf.h" enum { /** Maximal iproto package body length (2GiB) */ IPROTO_BODY_LEN_MAX = 2147483648UL }; /* * struct iproto_header and struct iproto_reply_header * share common prefix {msg_code, len, sync} */ struct iproto_header { uint32_t msg_code; uint32_t len; uint32_t sync; } __attribute__((packed)); struct iproto_reply_header { struct iproto_header hdr; uint32_t ret_code; uint32_t found; } __attribute__((packed)); static inline struct iproto_header * iproto(const char *pos) { return (struct iproto_header *) pos; } /** * struct iproto_port users need to be careful to: * - not unwind output of other fibers when * rolling back to a savepoint (provided that * multiple fibers work on the same session), * - not increment write position before there is a complete * response, i.e. a response which will not be rolled back * and which has a complete header. * - never increment write position without having * a complete response. Otherwise a situation can occur * when many requests started processing, but completed * in a different order, and thus incomplete output is * sent to the client. * * To ensure this, iproto_port must be used only in * atomic manner, i.e. once first port_add_tuple() is done, * there can be no yields until port_eof(). */ struct iproto_port { struct port_vtab *vtab; /** Output buffer. */ struct obuf *buf; /** Reply header. */ struct iproto_reply_header reply; /** A pointer in the reply buffer where the reply starts. */ struct obuf_svp svp; }; extern struct port_vtab iproto_port_vtab; static inline void iproto_port_init(struct iproto_port *port, struct obuf *buf, struct iproto_header *req) { port->vtab = &iproto_port_vtab; port->buf = buf; port->reply.hdr = *req; port->reply.found = 0; port->reply.ret_code = 0; } #endif /* TARANTOOL_IPROTO_PORT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/CMakeLists.txt0000664000000000000000000001505612242653271017322 0ustar rootroot# # Set compile flags for entire src/ directory # enable_tnt_compile_flags() if (NOT TARGET_OS_DARWIN) add_subdirectory(plugin) endif() include_directories(${LIBEV_INCLUDE_DIR}) include_directories(${LIBEIO_INCLUDE_DIR}) include_directories(${LIBCORO_INCLUDE_DIR}) include_directories(${LIBGOPT_INCLUDE_DIR}) # Require pthread globally if compiling with GCC if (CMAKE_COMPILER_IS_GNUCC) add_compile_flags("C;CXX" "-pthread") endif() # # Build admin.cc from admin.rl, but only if admin.rl was changed. # The same applies to memcached.cc/memcached.rl. # We track admin.cc and memcached.cc in revision control, and thus do not # require engineers who do not modify .rl files to have Ragel # installed. # add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/src/admin.cc WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${RAGEL} -G2 src/admin.rl -o src/admin.cc DEPENDS ${CMAKE_SOURCE_DIR}/src/admin.rl) add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/src/memcached-grammar.cc WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${RAGEL} -G2 src/memcached-grammar.rl -o src/memcached-grammar.cc DEPENDS ${CMAKE_SOURCE_DIR}/src/memcached-grammar.rl) add_custom_target(generate_admin_cc DEPENDS ${CMAKE_SOURCE_DIR}/src/admin.cc) add_custom_target(generate_memcached_grammar_cc DEPENDS ${CMAKE_SOURCE_DIR}/src/memcached-grammar.cc) # do not randomly try to re-generate admin.cc or memcached-grammar.cc # after a fresh checkout/branch switch. execute_process(COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${CMAKE_SOURCE_DIR}/src/admin.cc ${CMAKE_SOURCE_DIR}/src/memcached-grammar.cc) set_source_files_properties(${CMAKE_SOURCE_DIR}/src/memcached-grammar.cc PROPERTIES HEADER_FILE_ONLY true) set_source_files_properties(memcached.cc PROPERTIES COMPILE_FLAGS "-Wno-uninitialized") # # # Do not clean admin.cc, memcached.cc or other # generated files in 'make clean' -- they are under # revision control. # set_property(DIRECTORY PROPERTY CLEAN_NO_CUSTOM true) # Compile src/lua/*.lua files into src/lua/*.lua.c sources file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/src/lua) set(lua_sources) lua_source(lua_sources lua/uuid.lua) add_custom_target(generate_lua_sources WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src/box DEPENDS ${lua_sources}) set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources}) # # Used by modules. # set (recompiled_sources ${CMAKE_SOURCE_DIR}/src/tarantool.cc ${CMAKE_SOURCE_DIR}/src/opts.c ${CMAKE_SOURCE_DIR}/src/lua/init.cc ${CMAKE_SOURCE_DIR}/src/say.cc ${CMAKE_SOURCE_DIR}/src/assoc.cc ${CMAKE_SOURCE_DIR}/src/replication.cc ${CMAKE_SOURCE_DIR}/src/memcached.cc ${CMAKE_SOURCE_DIR}/src/fiber.cc) set (common_sources tbuf.c palloc.cc util.cc sio.cc evio.cc coio.cc coeio.cc iobuf.cc coio_buf.cc salloc.cc pickle.cc coro.cc stat.cc log_io.cc recovery.cc admin.cc cpu_feature.c replica.cc iproto.cc iproto_port.cc session.cc object.cc exception.cc errcode.c errinj.cc fio.c crc32.c rope.c ipc.cc lua/info.cc lua/stat.cc lua/slab.cc lua/lua_ipc.cc lua/lua_socket.cc lua/session.cc lua/cjson.cc ${lua_sources} ) if (ENABLE_TRACE) set (common_sources ${common_sources} trace.c) endif() set_source_files_compile_flags(${common_sources}) add_library(core STATIC ${common_sources}) add_dependencies(core generate_headers) set (common_libraries cfg core) list(APPEND common_libraries ${LIBEV_LIBRARIES} ${LIBEIO_LIBRARIES} ${LIBCORO_LIBRARIES} ${LIBGOPT_LIBRARIES} ${LIBCJSON_LIBRARIES} ${LUAJIT_LIB} misc ) set (THREAD_LIB pthread) if (ENABLE_STATIC) set (THREAD_LIB -Wl,--whole-archive pthread -Wl,--no-whole-archive) endif() set (common_libraries ${common_libraries} ${THREAD_LIB}) if (TARGET_OS_LINUX OR TARGET_OS_DEBIAN_FREEBSD) set (common_libraries ${common_libraries} dl) endif() if (TARGET_OS_FREEBSD AND NOT TARGET_OS_DEBIAN_FREEBSD) find_library (INTL intl) if (NOT INTL) message(FATAL_ERROR "intl library not found") else() set (common_libraries ${common_libraries} ${INTL}) endif() endif() if (ENABLE_BACKTRACE AND HAVE_BFD) set (common_libraries ${common_libraries} bfd) if (NOT TARGET_OS_DARWIN) set (common_libraries ${common_libraries} iberty) endif() if (ENABLE_STATIC OR TARGET_OS_FREEBSD) include (FindZLIB) set (common_libraries ${common_libraries} ${ZLIB_LIBRARIES}) endif() if (TARGET_OS_FREEBSD) if (NOT TARGET_OS_DEBIAN_FREEBSD) set (common_libraries ${common_libraries} iconv) endif() endif() endif() set (common_libraries ${common_libraries} PARENT_SCOPE) add_subdirectory(lib) # Save CMAKE_XXX_FLAGS from this directory for config.h (used in --version) set(TARANTOOL_C_FLAGS ${CMAKE_C_FLAGS} PARENT_SCOPE) set(TARANTOOL_CXX_FLAGS ${CMAKE_CXX_FLAGS} PARENT_SCOPE) function(tarantool_module mod) set (module_sources ${ARGN}) set(cfg_c_flags "-Wno-unused -Wno-unused-parameter") if (CMAKE_COMPILER_IS_CLANG) set(cfg_c_flags "${cfg_c_flags} -Wno-semicolon-before-method-body") endif() set_source_files_properties( ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.c PROPERTIES COMPILE_FLAGS ${cfg_c_flags} GENERATED True) unset(cfg_c_flags) add_executable(tarantool_${mod} ${module_sources} ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.c) set_source_files_properties(${recompiled_sources} PROPERTIES OBJECT_DEPENDS ${CMAKE_SOURCE_DIR}/cfg/tarantool_${mod}_cfg.h) set_source_files_compile_flags( ${recompiled_sources} ${module_sources}) add_library(lt${mod} STATIC ${recompiled_sources}) set_target_properties(lt${mod} PROPERTIES COMPILE_FLAGS "-DTARANTOOL_CONFIG=''") add_dependencies(lt${mod} generate_headers generate_admin_cc generate_memcached_grammar_cc build_bundled_libs) target_link_libraries(tarantool_${mod} lt${mod} ${common_libraries} -rdynamic) if (ENABLE_STATIC) set_target_properties(tarantool_${mod} PROPERTIES LINK_SEARCH_END_STATIC ON) set (module_link_flags "${module_link_flags} -static") endif() if (module_link_flags) set_target_properties(tarantool_${mod} PROPERTIES LINK_FLAGS ${module_link_flags}) endif() install (TARGETS tarantool_${mod} DESTINATION bin) endfunction() foreach (module ${TARANTOOL_MODULES}) add_subdirectory(${module}) endforeach() tarantool-1.5.1.218.g1a69fd6/src/box/0000775000000000000000000000000012242653271015343 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/box/cmake_install.cmake0000664000000000000000000000413312213333034021142 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantool_box" AND NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantool_box") FILE(RPATH_CHECK FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantool_box" RPATH "") ENDIF() FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tarantool_box") IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantool_box" AND NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantool_box") IF(CMAKE_INSTALL_DO_STRIP) EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tarantool_box") ENDIF(CMAKE_INSTALL_DO_STRIP) ENDIF() ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") tarantool-1.5.1.218.g1a69fd6/src/box/tuple.cc0000664000000000000000000003403012242653271017003 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tuple.h" #include #include "tbuf.h" #include "key_def.h" #include "tuple_update.h" #include #include #include #include "scoped_guard.h" #include /** Global table of tuple formats */ struct tuple_format **tuple_formats; struct tuple_format *tuple_format_ber; static uint32_t formats_size, formats_capacity; extern int snapshot_pid; /** Extract all available type info from keys. */ void field_type_create(enum field_type *types, uint32_t field_count, struct key_def *key_def, uint32_t key_count) { /* There may be fields between indexed fields (gaps). */ memset(types, 0, sizeof(*types) * field_count); struct key_def *end = key_def + key_count; /* extract field type info */ for (; key_def < end; key_def++) { struct key_part *part = key_def->parts; struct key_part *pend = part + key_def->part_count; for (; part < pend; part++) { assert(part->fieldno < field_count); types[part->fieldno] = part->type; } } } static struct tuple_format * tuple_format_alloc_and_register(struct key_def *key_def, uint32_t key_count) { uint32_t total; struct tuple_format *format; struct key_def *end = key_def + key_count; uint32_t max_fieldno = 0; uint32_t field_count; /* find max max field no */ for (; key_def < end; key_def++) max_fieldno= MAX(max_fieldno, key_def->max_fieldno); if (formats_size == formats_capacity) { uint32_t new_capacity = formats_capacity ? formats_capacity * 2 : 16; struct tuple_format **formats; if (new_capacity >= UINT16_MAX) goto error; formats = (struct tuple_format **) realloc(tuple_formats, new_capacity * sizeof(tuple_formats[0])); if (formats == NULL) goto error; formats_capacity = new_capacity; tuple_formats = formats; } field_count = key_count > 0 ? max_fieldno + 1 : 0; total = sizeof(struct tuple_format) + field_count * sizeof(int32_t) + field_count * sizeof(enum field_type); format = (struct tuple_format *) malloc(total); if (format == NULL) goto error; format->id = formats_size++; format->max_fieldno = max_fieldno; format->field_count = field_count; format->types = (enum field_type *) ((char *) format + sizeof(*format) + field_count * sizeof(int32_t)); tuple_formats[format->id] = format; return format; error: tnt_raise(LoggedError, ER_MEMORY_ISSUE, sizeof(struct tuple_format), "tuple format", "malloc"); return NULL; } struct tuple_format * tuple_format_new(struct key_def *key_def, uint32_t key_count) { struct tuple_format *format = tuple_format_alloc_and_register(key_def, key_count); field_type_create(format->types, format->field_count, key_def, key_count); int32_t i = 0; uint32_t prev_offset = 0; /* * In the format, store all offsets available, * they may be useful. */ for (; i < format->max_fieldno; i++) { uint32_t maxlen = field_type_maxlen(format->types[i]); if (maxlen == UINT32_MAX) break; format->offset[i] = (varint32_sizeof(maxlen) + maxlen + prev_offset); assert(format->offset[i] > 0); prev_offset = format->offset[i]; } int j = 0; for (; i < format->max_fieldno; i++) { /* * In the tuple, store only offsets necessary to * quickly access indexed fields. Start from * field 1, not field 0, field 0 offset is 0. */ if (format->types[i + 1] == UNKNOWN) format->offset[i] = INT32_MIN; else format->offset[i] = --j; } if (format->field_count > 0) { /* * The last offset is always there and is unused, * to simplify the loop in tuple_init_field_map() */ format->offset[format->field_count - 1] = INT32_MIN; } format->field_map_size = -j * sizeof(uint32_t); return format; } /* * Validate a new tuple format and initialize tuple-local * format data. */ static inline void tuple_init_field_map(struct tuple *tuple, struct tuple_format *format) { /* Check to see if the tuple has a sufficient number of fields. */ if (tuple->field_count < format->field_count) tnt_raise(IllegalParams, "tuple must have all indexed fields"); int32_t *offset = format->offset; enum field_type *type = format->types; enum field_type *end = format->types + format->field_count; const char *pos = tuple->data; uint32_t *field_map = (uint32_t *) tuple; for (; type < end; offset++, type++) { if (pos >= tuple->data + tuple->bsize) tnt_raise(IllegalParams, "incorrect tuple format"); uint32_t len = load_varint32(&pos); uint32_t type_maxlen = field_type_maxlen(*type); /* * For fixed offsets, validate fields have * correct lengths. */ if (type_maxlen != UINT32_MAX && len != type_maxlen) { tnt_raise(ClientError, ER_KEY_FIELD_TYPE, field_type_strs[*type]); } pos += len; if (*offset < 0 && *offset != INT32_MIN) field_map[*offset] = pos - tuple->data; } } /** * Incremented on every snapshot and is used to distinguish tuples * which were created after start of a snapshot (these tuples can * be freed right away, since they are not used for snapshot) or * before start of a snapshot (these tuples can be freed only * after the snapshot has finished, otherwise it'll write bad data * to the snapshot file). */ extern uint32_t snapshot_version; /** Allocate a tuple */ struct tuple * tuple_alloc(struct tuple_format *format, size_t size) { size_t total = sizeof(struct tuple) + size + format->field_map_size; char *ptr = (char *) salloc(total, "tuple"); struct tuple *tuple = (struct tuple *)(ptr + format->field_map_size); tuple->refs = 0; tuple->version = snapshot_version; tuple->bsize = size; tuple->format_id = tuple_format_id(format); say_debug("tuple_alloc(%zu) = %p", size, tuple); return tuple; } /** * Free the tuple. * @pre tuple->refs == 0 */ void tuple_free(struct tuple *tuple) { say_debug("tuple_free(%p)", tuple); assert(tuple->refs == 0); char *ptr = (char *) tuple - tuple_format(tuple)->field_map_size; if (snapshot_pid == 0 || tuple->version == snapshot_version) sfree(ptr); else sfree_delayed(ptr); } /** * Add count to tuple's reference counter. * When the counter goes down to 0, the tuple is destroyed. * * @pre tuple->refs + count >= 0 */ void tuple_ref(struct tuple *tuple, int count) { assert(tuple->refs + count >= 0); tuple->refs += count; if (tuple->refs == 0) tuple_free(tuple); } const char * tuple_seek(struct tuple_iterator *it, uint32_t i, uint32_t *len) { it->pos = tuple_field_old(tuple_format(it->tuple), it->tuple, i); return tuple_next(it, len); } const char * tuple_next(struct tuple_iterator *it, uint32_t *len) { const char *tuple_end = it->tuple->data + it->tuple->bsize; if (it->pos < tuple_end) { *len = load_varint32(&it->pos); const char *field = it->pos; it->pos += *len; assert(it->pos <= tuple_end); return field; } return NULL; } /** print field to tbuf */ static void print_field(struct tbuf *buf, const char *field, uint32_t len) { switch (len) { case 2: tbuf_printf(buf, "%hu", *(uint16_t *)field); break; case 4: tbuf_printf(buf, "%u", *(uint32_t *)field); break; case 8: tbuf_printf(buf, "%" PRIu64, *(uint64_t *)field); break; default: tbuf_printf(buf, "'"); const char *field_end = field + len; while (field < field_end) { if (0x20 <= *(uint8_t *)field && *(uint8_t *)field < 0x7f) { tbuf_printf(buf, "%c", *(uint8_t *) field); } else { tbuf_printf(buf, "\\x%02X", *(uint8_t *)field); } field++; } tbuf_printf(buf, "'"); break; } } /** * Print a tuple in yaml-compatible mode to tbuf: * key: { value, value, value } */ void tuple_print(struct tbuf *buf, const struct tuple *tuple) { if (tuple->field_count == 0) { tbuf_printf(buf, "'': {}"); return; } struct tuple_iterator it; const char *field; uint32_t len = 0; tuple_rewind(&it, tuple); field = tuple_next(&it, &len); print_field(buf, field, len); tbuf_printf(buf, ": {"); uint32_t field_no = 1; while ((field = tuple_next(&it, &len))) { print_field(buf, field, len); if (likely(++field_no < tuple->field_count)) tbuf_printf(buf, ", "); } assert(field_no == tuple->field_count); tbuf_printf(buf, "}"); } struct tuple * tuple_update(struct tuple_format *format, void *(*region_alloc)(void *, size_t), void *alloc_ctx, const struct tuple *old_tuple, const char *expr, const char *expr_end) { uint32_t new_size = 0; uint32_t new_field_count = 0; struct tuple_update *update = tuple_update_prepare(region_alloc, alloc_ctx, expr, expr_end, old_tuple->data, old_tuple->data + old_tuple->bsize, old_tuple->field_count, &new_size, &new_field_count); /* Allocate a new tuple. */ struct tuple *new_tuple = tuple_alloc(format, new_size); new_tuple->field_count = new_field_count; try { tuple_update_execute(update, new_tuple->data); tuple_init_field_map(new_tuple, format); } catch (const Exception&) { tuple_free(new_tuple); throw; } return new_tuple; } struct tuple * tuple_new(struct tuple_format *format, uint32_t field_count, const char **data, const char *end) { size_t tuple_len = end - *data; if (tuple_len != tuple_range_size(data, end, field_count)) tnt_raise(IllegalParams, "tuple_new(): incorrect tuple format"); struct tuple *new_tuple = tuple_alloc(format, tuple_len); new_tuple->field_count = field_count; memcpy(new_tuple->data, end - tuple_len, tuple_len); try { tuple_init_field_map(new_tuple, format); } catch (...) { tuple_free(new_tuple); throw; } return new_tuple; } /* * Compare two tuple fields. * Separate version exists since compare is a very * often used operation, so any performance speed up * in it can have dramatic impact on the overall * server performance. */ static inline int tuple_compare_field(const char *field_a, const char *field_b, enum field_type type) { switch (type) { case NUM: { assert(field_a[0] == field_b[0]); uint32_t a = *(uint32_t *) (field_a + 1); uint32_t b = *(uint32_t *) (field_b + 1); /* * Little-endian unsigned int is memcmp * compatible. */ return a < b ? -1 : a > b; } case NUM64: { assert(field_a[0] == field_b[0]); uint64_t a = *(uint64_t *) (field_a + 1); uint64_t b = *(uint64_t *) (field_b + 1); return a < b ? -1 : a > b; } default: { uint32_t size_a = load_varint32(&field_a); uint32_t size_b = load_varint32(&field_b); int r = memcmp(field_a, field_b, MIN(size_a, size_b)); if (r == 0) r = size_a < size_b ? -1 : size_a > size_b; return r; } /* end case */ } /* end switch */ } int tuple_compare(const struct tuple *tuple_a, const struct tuple *tuple_b, const struct key_def *key_def) { if (key_def->part_count == 1 && key_def->parts[0].fieldno == 0) return tuple_compare_field(tuple_a->data, tuple_b->data, key_def->parts[0].type); struct key_part *part = key_def->parts; struct key_part *end = part + key_def->part_count; struct tuple_format *format_a = tuple_format(tuple_a); struct tuple_format *format_b = tuple_format(tuple_b); const char *field_a; const char *field_b; int r = 0; for (; part < end; part++) { field_a = tuple_field_old(format_a, tuple_a, part->fieldno); field_b = tuple_field_old(format_b, tuple_b, part->fieldno); if ((r = tuple_compare_field(field_a, field_b, part->type))) break; } return r; } int tuple_compare_dup(const struct tuple *tuple_a, const struct tuple *tuple_b, const struct key_def *key_def) { int r = tuple_compare(tuple_a, tuple_b, key_def); if (r == 0) r = tuple_a < tuple_b ? -1 : tuple_a > tuple_b; return r; } int tuple_compare_with_key(const struct tuple *tuple, const char *key, uint32_t part_count, const struct key_def *key_def) { struct key_part *part = key_def->parts; struct key_part *end = part + MIN(part_count, key_def->part_count); struct tuple_format *format = tuple_format(tuple); const char *field; uint32_t field_size; uint32_t key_size; int r = 0; /* Part count can be 0 in wildcard searches. */ for (; part < end; part++, key += key_size) { field = tuple_field_old(format, tuple, part->fieldno); field_size = load_varint32(&field); key_size = load_varint32(&key); switch (part->type) { case NUM: { uint32_t a = *(uint32_t *) field; uint32_t b = *(uint32_t *) key; r = a < b ? - 1 : a > b; break; } case NUM64: { uint64_t a = *(uint64_t *) field; uint64_t b; if (key_size == sizeof(uint32_t)) { /* * Allow search in NUM64 indexes * using NUM keys. */ b = *(uint32_t *) key; } else { b = *(uint64_t *) key; } r = a < b ? -1 : a > b; break; } default: r = memcmp(field, key, MIN(field_size, key_size)); if (r == 0) r = field_size < key_size ? -1 : field_size > key_size; break; } if (r != 0) break; } return r; } void tuple_format_init() { tuple_format_ber = tuple_format_new(NULL, 0); } void tuple_format_free() { for (struct tuple_format **format = tuple_formats; format < tuple_formats + formats_size; format++) free(*format); free(tuple_formats); } tarantool-1.5.1.218.g1a69fd6/src/box/request.h0000664000000000000000000000524312231715257017211 0ustar rootroot#ifndef TARANTOOL_BOX_REQUEST_H_INCLUDED #define TARANTOOL_BOX_REQUEST_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/util.h" #include struct txn; struct port; #define BOX_RETURN_TUPLE 0x01 #define BOX_ADD 0x02 #define BOX_REPLACE 0x04 #define BOX_ALLOWED_REQUEST_FLAGS (BOX_RETURN_TUPLE | \ BOX_ADD | \ BOX_REPLACE) /** deprecated request ids: _(INSERT, 1) _(DELETE, 2) _(SET_FIELD, 3) _(ARITH, 5) _(SET_FIELD, 6) _(ARITH, 7) _(SELECT, 4) _(DELETE, 8) _(UPDATE_FIELDS, 9) _(INSERT,10) _(JUBOX_ALIVE, 11) _(SELECT_LIMIT, 12) _(SELECT_OLD, 14) _(SELECT_LIMIT, 15) _(UPDATE_FIELDS_OLD, 16) DO NOT use these ids! */ #define REQUESTS(_) \ _(REPLACE, 13) \ _(SELECT, 17) \ _(UPDATE, 19) \ _(DELETE_1_3, 20) \ _(DELETE, 21) \ _(CALL, 22) ENUM(requests, REQUESTS); extern const char *requests_strs[]; static inline bool request_is_select(uint32_t type) { return type == SELECT || type == CALL; } const char *request_name(uint32_t type); struct request { uint32_t type; uint32_t flags; const char *data; uint32_t len; }; struct request *request_create(uint32_t type, const char *data, uint32_t len); void request_execute(struct request *request, struct txn *txn, struct port *port); #endif /* TARANTOOL_BOX_REQUEST_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/request.cc0000664000000000000000000001661212231715257017351 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "request.h" #include "txn.h" #include "tuple.h" #include "index.h" #include "space.h" #include "port.h" #include "box_lua.h" #include #include #include #include STRS(requests, REQUESTS); static const char * read_key(const char **reqpos, const char *reqend, uint32_t *key_part_count) { *key_part_count = pick_u32(reqpos, reqend); const char *key = *key_part_count ? *reqpos : NULL; /* Advance remaining fields of a key */ for (uint32_t i = 0; i < *key_part_count; i++) pick_field(reqpos, reqend); return key; } static struct space * read_space(const char **reqpos, const char *reqend) { uint32_t space_no = pick_u32(reqpos, reqend); return space_find(space_no); } enum dup_replace_mode dup_replace_mode(uint32_t flags) { return flags & BOX_ADD ? DUP_INSERT : flags & BOX_REPLACE ? DUP_REPLACE : DUP_REPLACE_OR_INSERT; } static void execute_replace(struct request *request, struct txn *txn) { txn_add_redo(txn, request->type, request->data, request->len); const char **reqpos = &request->data; const char *reqend = request->data + request->len; struct space *space = read_space(reqpos, reqend); request->flags |= (pick_u32(reqpos, reqend) & BOX_ALLOWED_REQUEST_FLAGS); uint32_t field_count = pick_u32(reqpos, reqend); struct tuple *new_tuple = tuple_new(space->format, field_count, reqpos, reqend); try { space_validate_tuple(space, new_tuple); enum dup_replace_mode mode = dup_replace_mode(request->flags); txn_replace(txn, space, NULL, new_tuple, mode); } catch (const Exception& e) { tuple_free(new_tuple); throw; } } static void execute_update(struct request *request, struct txn *txn) { txn_add_redo(txn, request->type, request->data, request->len); const char **reqpos = &request->data; const char *reqend = request->data + request->len; struct space *space = read_space(reqpos, reqend); request->flags |= (pick_u32(reqpos, reqend) & BOX_ALLOWED_REQUEST_FLAGS); /* Parse UPDATE request. */ /** Search key and key part count. */ uint32_t key_part_count; const char *key = read_key(reqpos, reqend, &key_part_count); Index *pk = space_index(space, 0); /* Try to find the tuple by primary key. */ primary_key_validate(pk->key_def, key, key_part_count); struct tuple *old_tuple = pk->findByKey(key, key_part_count); if (old_tuple == NULL) return; /* Update the tuple. */ struct tuple *new_tuple = tuple_update(space->format, palloc_region_alloc, fiber->gc_pool, old_tuple, *reqpos, reqend); try { space_validate_tuple(space, new_tuple); txn_replace(txn, space, old_tuple, new_tuple, DUP_INSERT); } catch (const Exception& e) { tuple_free(new_tuple); throw; } } /** }}} */ static void execute_select(struct request *request, struct port *port) { const char **reqpos = &request->data; const char *reqend = request->data + request->len; struct space *space = read_space(reqpos, reqend); uint32_t index_no = pick_u32(reqpos, reqend); Index *index = index_find(space, index_no); uint32_t offset = pick_u32(reqpos, reqend); uint32_t limit = pick_u32(reqpos, reqend); uint32_t count = pick_u32(reqpos, reqend); if (count == 0) tnt_raise(IllegalParams, "tuple count must be positive"); ERROR_INJECT_EXCEPTION(ERRINJ_TESTING); uint32_t found = 0; for (uint32_t i = 0; i < count; i++) { /* End the loop if reached the limit. */ if (limit == found) return; /* read key */ uint32_t key_part_count; const char *key = read_key(reqpos, reqend, &key_part_count); struct iterator *it = index->position(); key_validate(index->key_def, ITER_EQ, key, key_part_count); index->initIterator(it, ITER_EQ, key, key_part_count); struct tuple *tuple; while ((tuple = it->next(it)) != NULL) { if (offset > 0) { offset--; continue; } port_add_tuple(port, tuple, BOX_RETURN_TUPLE); if (limit == ++found) break; } } if (*reqpos != reqend) tnt_raise(IllegalParams, "can't unpack request"); } static void execute_delete(struct request *request, struct txn *txn) { uint32_t type = request->type; txn_add_redo(txn, type, request->data, request->len); const char **reqpos = &request->data; const char *reqend = request->data + request->len; struct space *space = read_space(reqpos, reqend); if (type == DELETE) { request->flags |= pick_u32(reqpos, reqend) & BOX_ALLOWED_REQUEST_FLAGS; } /* read key */ uint32_t key_part_count; const char *key = read_key(reqpos, reqend, &key_part_count); /* Try to find tuple by primary key */ Index *pk = space_index(space, 0); primary_key_validate(pk->key_def, key, key_part_count); struct tuple *old_tuple = pk->findByKey(key, key_part_count); if (old_tuple == NULL) return; txn_replace(txn, space, old_tuple, NULL, DUP_REPLACE_OR_INSERT); } /** To collects stats, we need a valid request type. * We must collect stats before execute. * Check request type here for now. */ static bool request_check_type(uint32_t type) { return (type != REPLACE && type != SELECT && type != UPDATE && type != DELETE_1_3 && type != DELETE && type != CALL); } const char * request_name(uint32_t type) { if (request_check_type(type)) return "unsupported"; return requests_strs[type]; } struct request * request_create(uint32_t type, const char *data, uint32_t len) { if (request_check_type(type)) { say_error("Unsupported request = %" PRIi32 "", type); tnt_raise(IllegalParams, "unsupported command code, " "check the error log"); } request_check_type(type); struct request *request = (struct request *) palloc(fiber->gc_pool, sizeof(struct request)); request->type = type; request->data = data; request->len = len; request->flags = 0; return request; } void request_execute(struct request *request, struct txn *txn, struct port *port) { switch (request->type) { case REPLACE: execute_replace(request, txn); break; case SELECT: execute_select(request, port); break; case UPDATE: execute_update(request, txn); break; case DELETE_1_3: case DELETE: execute_delete(request, txn); break; case CALL: box_lua_execute(request, port); break; default: assert(false); request_check_type(request->type); break; } } tarantool-1.5.1.218.g1a69fd6/src/box/port.h0000664000000000000000000000556212202131537016500 0ustar rootroot#ifndef INCLUDES_TARANTOOL_BOX_PORT_H #define INCLUDES_TARANTOOL_BOX_PORT_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/util.h" struct tuple; struct port; /** * A single port represents a destination of box_process output. * One such destination can be a Lua stack, or the binary * protocol. * An instance of a port is usually short lived, as it is created * for every server request. State of the instance is represented * by the tuples added to it. E.g.: * * struct port_iproto *port = port_iproto_new(...) * for (tuple in tuples) * port_add_tuple(tuple); * port_eof(port); // end of request * * Beginning with Tarantool 1.5, tuple can have different internal * structure and port_add_tuple() requires a double * dispatch: first, by the type of the port the tuple is being * added to, second, by the type of the tuple format, since the * format defines the internal structure of the tuple. */ struct port_vtab { void (*add_tuple)(struct port *port, struct tuple *tuple, uint32_t flags); /** Must be called in the end of execution of a single request. */ void (*eof)(struct port *port); }; struct port { struct port_vtab *vtab; }; static inline void port_eof(struct port *port) { return (port->vtab->eof)(port); } static inline void port_add_tuple(struct port *port, struct tuple *tuple, uint32_t flags) { (port->vtab->add_tuple)(port, tuple, flags); } /** Reused in port_lua */ void null_port_eof(struct port *port __attribute__((unused))); /** * This one does not have state currently, thus a single * instance is sufficient. */ extern struct port null_port; #endif /* INCLUDES_TARANTOOL_BOX_PORT_H */ tarantool-1.5.1.218.g1a69fd6/src/box/box_lua_space.h0000664000000000000000000000304612231715257020324 0ustar rootroot#ifndef INCLUDES_TARANTOOL_LUA_SPACE_H #define INCLUDES_TARANTOOL_LUA_SPACE_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; struct space; int lbox_pushspace(struct lua_State *L, struct space *space); void lbox_space_init(struct lua_State *L); #endif /* INCLUDES_TARANTOOL_LUA_SPACE_H */ tarantool-1.5.1.218.g1a69fd6/src/box/tree_index.cc0000664000000000000000000002621612231715257020010 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tree_index.h" #include "tuple.h" #include "space.h" #include "exception.h" /* {{{ Utilities. *************************************************/ struct sptree_index_node { struct tuple *tuple; }; struct sptree_index_key_data { const char *key; uint32_t part_count; }; static inline struct tuple * sptree_index_unfold(const void *node) { if (node == NULL) return NULL; struct sptree_index_node *node_x = (struct sptree_index_node *) node; assert (node_x->tuple != NULL); return node_x->tuple; } static inline void sptree_index_fold(void *node, struct tuple *tuple) { assert (node != NULL); assert (tuple != NULL); struct sptree_index_node *node_x = (struct sptree_index_node *) node; node_x->tuple = tuple; } static int sptree_index_node_compare(const void *node_a, const void *node_b, void *arg) { TreeIndex *self = (TreeIndex *) arg; struct tuple *tuple_a = sptree_index_unfold(node_a); struct tuple *tuple_b = sptree_index_unfold(node_b); return tuple_compare(tuple_a, tuple_b, self->key_def); } static int sptree_index_node_compare_dup(const void *node_a, const void *node_b, void *arg) { TreeIndex *self = (TreeIndex *) arg; struct tuple *tuple_a = sptree_index_unfold(node_a); struct tuple *tuple_b = sptree_index_unfold(node_b); return tuple_compare_dup(tuple_a, tuple_b, self->key_def); } static int sptree_index_node_compare_with_key(const void *key, const void *node, void *arg) { TreeIndex *self = (TreeIndex *) arg; struct sptree_index_key_data *key_data = (struct sptree_index_key_data *) key; struct tuple *tuple = sptree_index_unfold(node); /* the result is inverted because arguments are swapped */ return -tuple_compare_with_key(tuple, key_data->key, key_data->part_count, self->key_def); } /* {{{ TreeIndex Iterators ****************************************/ struct tree_iterator { struct iterator base; const TreeIndex *index; struct sptree_index_iterator *iter; struct sptree_index_key_data key_data; }; static void tree_iterator_free(struct iterator *iterator); static inline struct tree_iterator * tree_iterator(struct iterator *it) { assert(it->free == tree_iterator_free); return (struct tree_iterator *) it; } static void tree_iterator_free(struct iterator *iterator) { struct tree_iterator *it = tree_iterator(iterator); if (it->iter) sptree_index_iterator_free(it->iter); free(it); } static struct tuple * tree_iterator_ge(struct iterator *iterator) { struct tree_iterator *it = tree_iterator(iterator); void *node = sptree_index_iterator_next(it->iter); return sptree_index_unfold(node); } static struct tuple * tree_iterator_le(struct iterator *iterator) { struct tree_iterator *it = tree_iterator(iterator); void *node = sptree_index_iterator_reverse_next(it->iter); return sptree_index_unfold(node); } static struct tuple * tree_iterator_eq(struct iterator *iterator) { struct tree_iterator *it = tree_iterator(iterator); void *node = sptree_index_iterator_next(it->iter); if (node && it->index->tree.compare(&it->key_data, node, (void *) it->index) == 0) return sptree_index_unfold(node); return NULL; } static struct tuple * tree_iterator_req(struct iterator *iterator) { struct tree_iterator *it = tree_iterator(iterator); void *node = sptree_index_iterator_reverse_next(it->iter); if (node != NULL && it->index->tree.compare(&it->key_data, node, (void *) it->index) == 0) { return sptree_index_unfold(node); } return NULL; } static struct tuple * tree_iterator_lt(struct iterator *iterator) { struct tree_iterator *it = tree_iterator(iterator); void *node ; while ((node = sptree_index_iterator_reverse_next(it->iter)) != NULL) { if (it->index->tree.compare(&it->key_data, node, (void *) it->index) != 0) { it->base.next = tree_iterator_le; return sptree_index_unfold(node); } } return NULL; } static struct tuple * tree_iterator_gt(struct iterator *iterator) { struct tree_iterator *it = tree_iterator(iterator); void *node; while ((node = sptree_index_iterator_next(it->iter)) != NULL) { if (it->index->tree.compare(&it->key_data, node, (void *) it->index) != 0) { it->base.next = tree_iterator_ge; return sptree_index_unfold(node); } } return NULL; } /* }}} */ /* {{{ TreeIndex **********************************************************/ TreeIndex::TreeIndex(struct key_def *key_def, struct space *space) : Index(key_def, space) { memset(&tree, 0, sizeof tree); } TreeIndex::~TreeIndex() { sptree_index_destroy(&tree); } size_t TreeIndex::size() const { return tree.size; } struct tuple * TreeIndex::min() const { void *node = sptree_index_first(&tree); return sptree_index_unfold(node); } struct tuple * TreeIndex::max() const { void *node = sptree_index_last(&tree); return sptree_index_unfold(node); } struct tuple * TreeIndex::random(uint32_t rnd) const { void *node = sptree_index_random(&tree, rnd); return sptree_index_unfold(node); } struct tuple * TreeIndex::findByKey(const char *key, uint32_t part_count) const { assert(key_def->is_unique && part_count == key_def->part_count); struct sptree_index_key_data key_data; key_data.key = key; key_data.part_count = part_count; void *node = sptree_index_find(&tree, &key_data); return sptree_index_unfold(node); } struct tuple * TreeIndex::replace(struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode) { struct sptree_index_node new_node; struct sptree_index_node old_node; uint32_t errcode; if (new_tuple) { struct sptree_index_node *p_dup_node = &old_node; sptree_index_fold(&new_node, new_tuple); /* Try to optimistically replace the new_tuple. */ sptree_index_replace(&tree, &new_node, (void **) &p_dup_node); struct tuple *dup_tuple = sptree_index_unfold(p_dup_node); errcode = replace_check_dup(old_tuple, dup_tuple, mode); if (errcode) { sptree_index_delete(&tree, &new_node); if (p_dup_node != NULL) sptree_index_replace(&tree, p_dup_node, NULL); tnt_raise(ClientError, errcode, index_n(this)); } if (dup_tuple) return dup_tuple; } if (old_tuple) { sptree_index_fold(&old_node, old_tuple); sptree_index_delete(&tree, &old_node); } return old_tuple; } struct iterator * TreeIndex::allocIterator() const { struct tree_iterator *it = (struct tree_iterator *) calloc(1, sizeof(*it)); if (it == NULL) { tnt_raise(ClientError, ER_MEMORY_ISSUE, sizeof(struct tree_iterator), "TreeIndex", "iterator"); } it->index = this; it->base.free = tree_iterator_free; return (struct iterator *) it; } void TreeIndex::initIterator(struct iterator *iterator, enum iterator_type type, const char *key, uint32_t part_count) const { assert (key != NULL || part_count == 0); struct tree_iterator *it = tree_iterator(iterator); if (part_count == 0) { /* * If no key is specified, downgrade equality * iterators to a full range. */ type = iterator_type_is_reverse(type) ? ITER_LE : ITER_GE; key = NULL; } it->key_data.key = key; it->key_data.part_count = part_count; if (iterator_type_is_reverse(type)) sptree_index_iterator_reverse_init_set(&tree, &it->iter, &it->key_data); else sptree_index_iterator_init_set(&tree, &it->iter, &it->key_data); switch (type) { case ITER_EQ: it->base.next = tree_iterator_eq; break; case ITER_REQ: it->base.next = tree_iterator_req; break; case ITER_ALL: case ITER_GE: it->base.next = tree_iterator_ge; break; case ITER_GT: it->base.next = tree_iterator_gt; break; case ITER_LE: it->base.next = tree_iterator_le; break; case ITER_LT: it->base.next = tree_iterator_lt; break; default: tnt_raise(ClientError, ER_UNSUPPORTED, "Tree index", "requested iterator type"); } } void TreeIndex::beginBuild() { assert(index_is_primary(this)); tree.size = 0; tree.max_size = 64; size_t sz = tree.max_size * sizeof(struct sptree_index_node); tree.members = malloc(sz); if (tree.members == NULL) { panic("malloc(): failed to allocate %" PRI_SZ " bytes", sz); } } void TreeIndex::buildNext(struct tuple *tuple) { if (tree.size == tree.max_size) { tree.max_size = MAX(tree.max_size * 2, 64); size_t sz = tree.max_size * sizeof(struct sptree_index_node); tree.members = realloc(tree.members, sz); if (tree.members == NULL) { panic("malloc(): failed to allocate %" PRI_SZ " bytes", sz); } } struct sptree_index_node *node = (struct sptree_index_node *) tree.members + tree.size; sptree_index_fold(node, tuple); tree.size++; } void TreeIndex::endBuild() { assert(index_is_primary(this)); uint32_t n_tuples = tree.size; uint32_t estimated_tuples = tree.max_size; void *nodes = tree.members; sptree_index_init(&tree, sizeof(struct sptree_index_node), nodes, n_tuples, estimated_tuples, sptree_index_node_compare_with_key, sptree_index_node_compare, this); } void TreeIndex::build(Index *pk) { uint32_t n_tuples = pk->size(); uint32_t estimated_tuples = n_tuples * 1.2; void *nodes = NULL; if (n_tuples) { /* * Allocate a little extra to avoid * unnecessary realloc() when more data is * inserted. */ size_t sz = estimated_tuples * sizeof(struct sptree_index_node); nodes = malloc(sz); if (nodes == NULL) { panic("malloc(): failed to allocate %" PRI_SZ " bytes", sz); } } struct iterator *it = pk->position(); pk->initIterator(it, ITER_ALL, NULL, 0); struct tuple *tuple; for (uint32_t i = 0; (tuple = it->next(it)) != NULL; ++i) { struct sptree_index_node *node = (struct sptree_index_node *) nodes + i; sptree_index_fold(node, tuple); } if (n_tuples) { say_info("Sorting %" PRIu32 " keys in index %" PRIu32 "...", n_tuples, index_n(this)); } /* If n_tuples == 0 then estimated_tuples = 0, elem == NULL, tree is empty */ sptree_index_init(&tree, sizeof(struct sptree_index_node), nodes, n_tuples, estimated_tuples, sptree_index_node_compare_with_key, key_def->is_unique ? sptree_index_node_compare : sptree_index_node_compare_dup, this); } tarantool-1.5.1.218.g1a69fd6/src/box/port.cc0000664000000000000000000000327312202131537016633 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "port.h" void null_port_eof(struct port *port __attribute__((unused))) { } static void null_port_add_tuple(struct port *port __attribute__((unused)), struct tuple *tuple __attribute__((unused)), uint32_t flags __attribute__((unused))) { } static struct port_vtab null_port_vtab = { null_port_add_tuple, null_port_eof, }; struct port null_port = { /* .vtab = */ &null_port_vtab, }; tarantool-1.5.1.218.g1a69fd6/src/box/txn.h0000664000000000000000000000374212231715257016334 0ustar rootroot#ifndef TARANTOOL_BOX_TXN_H_INCLUDED #define TARANTOOL_BOX_TXN_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "index.h" struct tuple; struct space; struct txn { /* Undo info. */ struct space *space; struct tuple *old_tuple; struct tuple *new_tuple; /* Redo info: binary packet */ const char *data; uint32_t len; uint16_t op; }; struct txn *txn_begin(); void txn_commit(struct txn *txn); void txn_finish(struct txn *txn); void txn_rollback(struct txn *txn); void txn_add_redo(struct txn *txn, uint16_t op, const char *data, uint32_t len); void txn_replace(struct txn *txn, struct space *space, struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode); #endif /* TARANTOOL_BOX_TXN_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/bitset_index.h0000664000000000000000000000475412231715257020210 0ustar rootroot#ifndef TARANTOOL_BOX_INDEX_BITSET_H_INCLUDED #define TARANTOOL_BOX_INDEX_BITSET_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * @brief Objective C wrapper for bitset_index * @see bitset/index.h */ #include "index.h" #include struct bitset_index; struct bitset_expr; class BitsetIndex: public Index { public: BitsetIndex(struct key_def *key_def, struct space *space); virtual ~BitsetIndex(); virtual void beginBuild(); virtual void buildNext(struct tuple *tuple); virtual void endBuild(); virtual void build(Index *pk); virtual size_t size() const; virtual struct tuple *min() const; virtual struct tuple *max() const; virtual struct tuple *random(uint32_t rnd) const; virtual struct tuple *findByKey(const char *key, uint32_t part_count) const; virtual struct tuple *findByTuple(struct tuple *tuple) const; virtual struct tuple *replace(struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode); virtual struct iterator *allocIterator() const; virtual void initIterator(struct iterator *iterator, enum iterator_type type, const char *key, uint32_t part_count) const; private: struct bitset_index index; }; #endif /* TARANTOOL_BOX_INDEX_BITSET_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/box_lua.cc0000664000000000000000000013137312242653271017313 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "box_lua.h" #include "lua/init.h" #include #include "box/box.h" #include "request.h" #include "txn.h" #include "tuple_update.h" extern "C" { #include #include #include #include #include #include #include #include #include } /* extern "C" */ #include "pickle.h" #include "tuple.h" #include "space.h" #include "port.h" #include "tbuf.h" #include "scoped_guard.h" /* contents of box.lua, misc.lua, box.net.lua respectively */ extern char box_lua[], box_net_lua[], misc_lua[], sql_lua[]; static const char *lua_sources[] = { box_lua, box_net_lua, misc_lua, sql_lua, NULL }; /** * All box connections share the same Lua state. We use * Lua coroutines (lua_newthread()) to have multiple * procedures running at the same time. */ static lua_State *root_L; /* * Functions, exported in box_lua.h should have prefix * "box_lua_"; functions, available in Lua "box" * should start with "lbox_". */ /** {{{ box.tuple Lua library * * To avoid extra copying between Lua memory and garbage-collected * tuple memory, provide a Lua userdata object 'box.tuple'. This * object refers to a tuple instance in the slab allocator, and * allows accessing it using Lua primitives (array subscription, * iteration, etc.). When Lua object is garbage-collected, * tuple reference counter in the slab allocator is decreased, * allowing the tuple to be eventually garbage collected in * the slab allocator. */ static const char *tuplelib_name = "box.tuple"; static const char *tuple_iteratorlib_name = "box.tuple.iterator"; static void lbox_pushtuple(struct lua_State *L, struct tuple *tuple); static struct tuple * lua_totuple(struct lua_State *L, int index); static inline struct tuple * lua_checktuple(struct lua_State *L, int narg) { struct tuple *t = *(struct tuple **) luaL_checkudata(L, narg, tuplelib_name); assert(t->refs); return t; } struct tuple * lua_istuple(struct lua_State *L, int narg) { if (lua_getmetatable(L, narg) == 0) return NULL; luaL_getmetatable(L, tuplelib_name); struct tuple *tuple = 0; if (lua_equal(L, -1, -2)) tuple = *(struct tuple **) lua_touserdata(L, narg); lua_pop(L, 2); return tuple; } static int lbox_tuple_new(lua_State *L) { int argc = lua_gettop(L); if (argc < 1) luaL_error(L, "tuple.new(): bad arguments"); struct tuple *tuple = lua_totuple(L, 1); lbox_pushtuple(L, tuple); return 1; } static int lbox_tuple_gc(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); tuple_ref(tuple, -1); return 0; } static int lbox_tuple_len(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); lua_pushnumber(L, tuple->field_count); return 1; } static int lbox_tuple_slice(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); int argc = lua_gettop(L) - 1; uint32_t start, end; int offset; /* * Prepare the range. The second argument is optional. * If the end is beyond tuple size, adjust it. * If no arguments, or start > end, return an error. */ if (argc == 0 || argc > 2) luaL_error(L, "tuple.slice(): bad arguments"); offset = lua_tointeger(L, 2); if (offset >= 0 && offset < tuple->field_count) { start = offset; } else if (offset < 0 && -offset <= tuple->field_count) { start = offset + tuple->field_count; } else { return luaL_error(L, "tuple.slice(): start >= field count"); } if (argc == 2) { offset = lua_tointeger(L, 3); if (offset > 0 && offset <= tuple->field_count) { end = offset; } else if (offset < 0 && -offset < tuple->field_count) { end = offset + tuple->field_count; } else { return luaL_error(L, "tuple.slice(): end > field count"); } } else { end = tuple->field_count; } if (end <= start) return luaL_error(L, "tuple.slice(): start must be less than end"); struct tuple_iterator it; tuple_rewind(&it, tuple); const char *field; uint32_t len; assert(start < tuple->field_count); uint32_t field_no = start; field = tuple_seek(&it, start, &len); while (field && field_no < end) { lua_pushlstring(L, field, len); ++field_no; field = tuple_next(&it, &len); } assert(field_no == end); return end - start; } /** A single value on the Lua stack. */ struct lua_field { const char *data; uint32_t len; union { uint32_t u32; uint64_t u64; }; enum field_type type; }; /** * Convert a value on the lua stack to a Tarantool data type. */ static void lua_tofield(lua_State *L, int i, struct lua_field *field) { double num; size_t size; switch (lua_type(L, i)) { case LUA_TNUMBER: num = lua_tonumber(L, i); if (num <= UINT32_MAX && num >= INT32_MIN) { field->u32 = (uint32_t) num; field->data = (const char *) &field->u32; field->len = sizeof(uint32_t); field->type = NUM; return; } else { field->u64 = (uint64_t) num; field->data = (const char *) &field->u64; field->len = sizeof(uint64_t); field->type = NUM64; return; } case LUA_TCDATA: field->u64 = tarantool_lua_tointeger64(L, i); field->data = (const char *) &field->u64; field->len = sizeof(uint64_t); field->type = NUM64; return; case LUA_TBOOLEAN: if (lua_toboolean(L, i)) { field->data = "true"; field->len = 4; } else { field->data = "false"; field->len = 5; } field->type = STRING; return; case LUA_TNIL: field->data = "nil"; field->len = 3; field->type = STRING; return; case LUA_TSTRING: field->data = lua_tolstring(L, i, &size); field->len = (uint32_t) size; field->type = STRING; return; default: field->data = NULL; field->len = 0; field->type = UNKNOWN; return; } } /** * Pack our BER integer into luaL_Buffer */ static void luaL_addvarint32(luaL_Buffer *b, uint32_t value) { char buf[sizeof(uint32_t)+1]; char *bufend = pack_varint32(buf, value); luaL_addlstring(b, buf, bufend - buf); } /** * Tuple transforming function. * * Remove the fields designated by 'offset' and 'len' from an tuple, * and replace them with the elements of supplied data fields, * if any. * * Function returns newly allocated tuple. * It does not change any parent tuple data. */ static int lbox_tuple_transform(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); int argc = lua_gettop(L); if (argc < 3) luaL_error(L, "tuple.transform(): bad arguments"); lua_Integer offset = lua_tointeger(L, 2); /* Can be negative and can be > INT_MAX */ lua_Integer field_count = lua_tointeger(L, 3); /* validate offset and len */ if (offset < 0) { if (-offset > tuple->field_count) luaL_error(L, "tuple.transform(): offset is out of bound"); offset += tuple->field_count; } else if (offset > tuple->field_count) { offset = tuple->field_count; } if (field_count < 0) luaL_error(L, "tuple.transform(): len is negative"); if (field_count > tuple->field_count - offset) field_count = tuple->field_count - offset; assert(offset + field_count <= tuple->field_count); /* * Calculate the number of operations and length of UPDATE expression */ uint32_t op_cnt = 0; if (offset < tuple->field_count && field_count > 0) op_cnt++; if (argc > 3) op_cnt += argc - 3; if (op_cnt == 0) { /* tuple_update() does not accept an empty operation list. */ lbox_pushtuple(L, tuple); return 1; } /* * Prepare UPDATE expression */ luaL_Buffer b; luaL_buffinit(L, &b); luaL_addlstring(&b, (char *) &op_cnt, sizeof(op_cnt)); uint32_t offset_u32 = (uint32_t) offset; uint32_t field_count_u32 = (uint32_t) field_count; if (field_count > 0) { luaL_addlstring(&b, (char *) &offset_u32, sizeof(offset_u32)); luaL_addchar(&b, UPDATE_OP_DELETE); /* multi-delete */ luaL_addvarint32(&b, sizeof(field_count_u32)); luaL_addlstring(&b, (char *) &field_count_u32, sizeof(field_count_u32)); } for (int i = argc ; i > 3; i--) { luaL_addlstring(&b, (char *) &offset_u32, sizeof(offset_u32)); luaL_addchar(&b, UPDATE_OP_INSERT); struct lua_field field; lua_tofield(L, i, &field); if (field.type == UNKNOWN) { return luaL_error(L, "tuple.transform(): " "unsupported field type '%s'", lua_typename(L, lua_type(L, i))); } luaL_addvarint32(&b, field.len); luaL_addlstring(&b, field.data, field.len); } luaL_pushresult(&b); size_t expr_len; const char *expr = lua_tolstring(L, -1, &expr_len); /* Execute tuple_update */ struct tuple *new_tuple = tuple_update(tuple_format_ber, lua_region_alloc, L, tuple, expr, expr + expr_len); /* Cleanup memory allocated by lua_region_alloc */ lua_settop(L, 0); lbox_pushtuple(L, new_tuple); return 1; } /* * Tuple find function. * * Find each or one tuple field according to the specified key. * * Function returns indexes of the tuple fields that match * key criteria. * */ static int tuple_find(struct lua_State *L, struct tuple *tuple, size_t offset, const char *key, size_t key_size, bool all) { int top = lua_gettop(L); int idx = offset; struct tuple_iterator it; tuple_rewind(&it, tuple); uint32_t len; const char *field = tuple_seek(&it, idx, &len); for (; field; field = tuple_next(&it, &len)) { if (len == key_size && (memcmp(field, key, len) == 0)) { lua_pushinteger(L, idx); if (!all) break; } idx++; } return lua_gettop(L) - top; } static int lbox_tuple_find_do(struct lua_State *L, bool all) { struct tuple *tuple = lua_checktuple(L, 1); int argc = lua_gettop(L); size_t offset = 0; switch (argc - 1) { case 1: break; case 2: offset = lua_tointeger(L, 2); break; default: luaL_error(L, "tuple.find(): bad arguments"); } struct lua_field field; lua_tofield(L, argc, &field); if (field.type == UNKNOWN) return luaL_error(L, "tuple.find(): unsupported field " "type: %s", lua_typename(L, lua_type(L, argc))); return tuple_find(L, tuple, offset, field.data, field.len, all); } static int lbox_tuple_find(struct lua_State *L) { return lbox_tuple_find_do(L, false); } static int lbox_tuple_findall(struct lua_State *L) { return lbox_tuple_find_do(L, true); } static int lbox_tuple_unpack(struct lua_State *L) { int argc = lua_gettop(L); struct tuple *tuple = lua_checktuple(L, 1); struct tuple_iterator it; tuple_rewind(&it, tuple); const char *field; uint32_t len; while ((field = tuple_next(&it, &len))) lua_pushlstring(L, field, len); assert(lua_gettop(L) == argc + tuple->field_count); return tuple->field_count; } static int lbox_tuple_totable(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); lua_newtable(L); int index = 1; struct tuple_iterator it; tuple_rewind(&it, tuple); const char *field; uint32_t len; while ((field = tuple_next(&it, &len))) { lua_pushnumber(L, index++); lua_pushlstring(L, field, len); lua_rawset(L, -3); } return 1; } /** * Implementation of tuple __index metamethod. * * Provides operator [] access to individual fields for integer * indexes, as well as searches and invokes metatable methods * for strings. */ static int lbox_tuple_index(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); /* For integer indexes, implement [] operator */ if (lua_isnumber(L, 2)) { int i = luaL_checkint(L, 2); if (i >= tuple->field_count) luaL_error(L, "%s: index %d is out of bounds (0..%d)", tuplelib_name, i, tuple->field_count-1); uint32_t len = 0; const char *field = tuple_field(tuple, i, &len); lua_pushlstring(L, field, len); return 1; } /* If we got a string, try to find a method for it. */ const char *sz = luaL_checkstring(L, 2); lua_getmetatable(L, 1); lua_getfield(L, -1, sz); return 1; } static int lbox_tuple_tostring(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); /* @todo: print the tuple */ struct tbuf *tbuf = tbuf_new(fiber->gc_pool); tuple_print(tbuf, tuple); lua_pushlstring(L, tbuf->data, tbuf->size); return 1; } static void lbox_pushtuple(struct lua_State *L, struct tuple *tuple) { if (tuple) { struct tuple **ptr = (struct tuple **) lua_newuserdata(L, sizeof(*ptr)); luaL_getmetatable(L, tuplelib_name); lua_setmetatable(L, -2); *ptr = tuple; tuple_ref(tuple, 1); } else { lua_pushnil(L); } } /** * Sequential access to tuple fields. Since tuple is a list-like * structure, iterating over tuple fields is faster * than accessing fields using an index. */ static int lbox_tuple_next(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); int argc = lua_gettop(L) - 1; struct tuple_iterator *it = NULL; if (argc == 0 || (argc == 1 && lua_type(L, 2) == LUA_TNIL)) { it = (struct tuple_iterator *) lua_newuserdata(L, sizeof(*it)); assert (it != NULL); luaL_getmetatable(L, tuple_iteratorlib_name); lua_setmetatable(L, -2); tuple_rewind(it, tuple); } else if (argc == 1 && lua_type(L, 2) == LUA_TUSERDATA) { it = (struct tuple_iterator *) luaL_checkudata(L, 2, tuple_iteratorlib_name); assert (it != NULL); lua_pushvalue(L, 2); } else { return luaL_error(L, "tuple.next(): bad arguments"); } uint32_t len; const char *field = tuple_next(it, &len); if (field == NULL) { lua_pop(L, 1); lua_pushnil(L); return 1; } lua_pushlstring(L, field, len); return 2; } /** Iterator over tuple fields. Adapt lbox_tuple_next * to Lua iteration conventions. */ static int lbox_tuple_pairs(struct lua_State *L) { lua_pushcfunction(L, lbox_tuple_next); lua_pushvalue(L, -2); /* tuple */ lua_pushnil(L); return 3; } /** tuple:bsize() * */ static int lbox_tuple_bsize(struct lua_State *L) { struct tuple *tuple = lua_checktuple(L, 1); lua_pushnumber(L, tuple->bsize); return 1; } static const struct luaL_reg lbox_tuple_meta[] = { {"__gc", lbox_tuple_gc}, {"__len", lbox_tuple_len}, {"__index", lbox_tuple_index}, {"__tostring", lbox_tuple_tostring}, {"next", lbox_tuple_next}, {"pairs", lbox_tuple_pairs}, {"slice", lbox_tuple_slice}, {"transform", lbox_tuple_transform}, {"find", lbox_tuple_find}, {"findall", lbox_tuple_findall}, {"unpack", lbox_tuple_unpack}, {"totable", lbox_tuple_totable}, {"bsize", lbox_tuple_bsize}, {NULL, NULL} }; static const struct luaL_reg lbox_tuplelib[] = { {"new", lbox_tuple_new}, {NULL, NULL} }; static const struct luaL_reg lbox_tuple_iterator_meta[] = { {NULL, NULL} }; /* }}} */ /** {{{ box.index Lua library: access to spaces and indexes */ static const char *indexlib_name = "box.index"; static const char *iteratorlib_name = "box.index.iterator"; static struct iterator * lbox_checkiterator(struct lua_State *L, int i) { struct iterator **it = (struct iterator **) luaL_checkudata(L, i, iteratorlib_name); assert(it != NULL); return *it; } static void lbox_pushiterator(struct lua_State *L, Index *index, struct iterator *it, enum iterator_type type, const char *key, size_t size, int part_count) { struct lbox_iterator_udata { struct iterator *it; char key[]; }; struct lbox_iterator_udata *udata = (struct lbox_iterator_udata *) lua_newuserdata(L, sizeof(*udata) + size); luaL_getmetatable(L, iteratorlib_name); lua_setmetatable(L, -2); udata->it = it; if (key) { memcpy(udata->key, key, size); key = udata->key; } key_validate(index->key_def, type, key, part_count); index->initIterator(it, type, key, part_count); } static int lbox_iterator_gc(struct lua_State *L) { struct iterator *it = lbox_checkiterator(L, -1); it->free(it); return 0; } static Index * lua_checkindex(struct lua_State *L, int i) { Index **index = (Index **) luaL_checkudata(L, i, indexlib_name); assert(index != NULL); return *index; } static int lbox_index_new(struct lua_State *L) { int n = luaL_checkint(L, 1); /* get space id */ int idx = luaL_checkint(L, 2); /* get index id in */ /* locate the appropriate index */ struct space *sp = space_find(n); Index *index = index_find(sp, idx); /* create a userdata object */ void **ptr = (void **) lua_newuserdata(L, sizeof(void *)); *ptr = index; /* set userdata object metatable to indexlib */ luaL_getmetatable(L, indexlib_name); lua_setmetatable(L, -2); return 1; } static int lbox_index_tostring(struct lua_State *L) { Index *index = lua_checkindex(L, 1); lua_pushfstring(L, "index %d in space %d", index_n(index), space_n(index->space)); return 1; } static int lbox_index_len(struct lua_State *L) { Index *index = lua_checkindex(L, 1); lua_pushinteger(L, index->size()); return 1; } static int lbox_index_part_count(struct lua_State *L) { Index *index = lua_checkindex(L, 1); lua_pushinteger(L, index->key_def->part_count); return 1; } static int lbox_index_min(struct lua_State *L) { Index *index = lua_checkindex(L, 1); lbox_pushtuple(L, index->min()); return 1; } static int lbox_index_max(struct lua_State *L) { Index *index = lua_checkindex(L, 1); lbox_pushtuple(L, index->max()); return 1; } static int lbox_index_random(struct lua_State *L) { if (lua_gettop(L) != 2 || lua_isnil(L, 2)) luaL_error(L, "Usage: index:random((uint32) rnd)"); Index *index = lua_checkindex(L, 1); uint32_t rnd = lua_tointeger(L, 2); lbox_pushtuple(L, index->random(rnd)); return 1; } /* * Lua iterator over a Taratnool/Box index. * * (iteration_state, tuple) = index.next(index, [params]) * * When [params] are absent or nil * returns a pointer to a new ALL iterator and * to the first tuple (or nil, if the index is * empty). * * When [params] is a userdata, * i.e. we're inside an iteration loop, retrieves * the next tuple from the iterator. * * Otherwise, [params] can be used to seed * a new iterator with iterator type and * type-specific arguments. For exaple, * for GE iterator, a list of Lua scalars * cann follow the box.index.GE: this will * start iteration from the offset specified by * the given (multipart) key. * * @return Returns an iterator object, either created * or taken from Lua stack. */ static inline struct iterator * lbox_create_iterator(struct lua_State *L) { Index *index = lua_checkindex(L, 1); int argc = lua_gettop(L); /* Create a new iterator. */ enum iterator_type type = ITER_ALL; uint32_t key_part_count = 0; const char *key = NULL; size_t key_size = 0; if (argc == 1 || (argc == 2 && lua_type(L, 2) == LUA_TNIL)) { /* * Nothing or nil on top of the stack, * iteration over entire range from the * beginning (ITER_ALL). */ } else { type = (enum iterator_type) luaL_checkint(L, 2); if (type < ITER_ALL || type >= iterator_type_MAX) luaL_error(L, "unknown iterator type: %d", type); /* What else do we have on the stack? */ luaL_Buffer b; luaL_buffinit(L, &b); if (argc == 2 || (argc == 3 && lua_type(L, 3) == LUA_TNIL)) { /* Nothing */ } else if (argc == 3 && lua_type(L, 3) == LUA_TUSERDATA) { /* Tuple. */ struct tuple *tuple = lua_checktuple(L, 2); key_part_count = tuple->field_count; tuple_to_luabuf(tuple, &b); } else { /* Single or multi- part key. */ key_part_count = argc - 2; struct lua_field field; for (uint32_t i = 0; i < key_part_count; i++) { lua_tofield(L, i + 3, &field); luaL_addvarint32(&b, field.len); luaL_addlstring(&b, field.data, field.len); } } /* * We allow partially specified keys for TREE * indexes. HASH indexes can only use single-part * keys. */ if (key_part_count > index->key_def->part_count) luaL_error(L, "Key part count %d" " is greater than index part count %d", key_part_count, index->key_def->part_count); luaL_pushresult(&b); key = lua_tolstring(L, -1, &key_size); if (key_size == 0) key = NULL; } struct iterator *it = index->allocIterator(); lbox_pushiterator(L, index, it, type, key, key_size, key_part_count); return it; } /** * Lua-style next() function, for use in pairs(). * @example: * for k, v in box.space[0].index[0].idx.next, box.space[0].index[0].idx, nil do * print(v) * end */ static int lbox_index_next(struct lua_State *L) { int argc = lua_gettop(L); struct iterator *it = NULL; if (argc == 2 && lua_type(L, 2) == LUA_TUSERDATA) { /* * Apart from the index itself, we have only one * other argument, and it's a userdata: must be * iteration state created before. */ it = lbox_checkiterator(L, 2); } else { it = lbox_create_iterator(L); } struct tuple *tuple = it->next(it); /* If tuple is NULL, pushes nil as end indicator. */ lbox_pushtuple(L, tuple); return tuple ? 2 : 1; } /** iterator() closure function. */ static int lbox_index_iterator_closure(struct lua_State *L) { /* Extract closure arguments. */ struct iterator *it = lbox_checkiterator(L, lua_upvalueindex(1)); struct tuple *tuple = it->next(it); /* If tuple is NULL, push nil as end indicator. */ lbox_pushtuple(L, tuple); return 1; } /** * @brief Create iterator closure over a Taratnool/Box index. * @example lua it = box.space[0].index[0]:iterator(box.index.GE, 1); * print(it(), it()). * @param L lua stack * @see http://www.lua.org/pil/7.1.html * @return number of return values put on the stack */ static int lbox_index_iterator(struct lua_State *L) { /* Create iterator and push it onto the stack. */ (void) lbox_create_iterator(L); lua_pushcclosure(L, &lbox_index_iterator_closure, 1); return 1; } /** * Lua index subtree count function. * Iterate over an index, count the number of tuples which equal the * provided search criteria. The argument can either point to a * tuple, a key, or one or more key parts. Returns the number of matched * tuples. */ static int lbox_index_count(struct lua_State *L) { Index *index = lua_checkindex(L, 1); int argc = lua_gettop(L) - 1; if (argc == 0) luaL_error(L, "index.count(): one or more arguments expected"); /* preparing single or multi-part key */ luaL_Buffer b; luaL_buffinit(L, &b); uint32_t key_part_count; if (argc == 1 && lua_type(L, 2) == LUA_TUSERDATA) { /* Searching by tuple. */ struct tuple *tuple = lua_checktuple(L, 2); tuple_to_luabuf(tuple, &b); key_part_count = tuple->field_count; } else { /* Single or multi- part key. */ key_part_count = argc; struct lua_field field; for (uint32_t i = 0; i < argc; ++i) { lua_tofield(L, i + 2, &field); luaL_addvarint32(&b, field.len); luaL_addlstring(&b, field.data, field.len); } } luaL_pushresult(&b); const char *key = lua_tostring(L, -1); uint32_t count = 0; key_validate(index->key_def, ITER_EQ, key, key_part_count); /* Prepare index iterator */ struct iterator *it = index->position(); index->initIterator(it, ITER_EQ, key, key_part_count); /* Iterate over the index and count tuples. */ struct tuple *tuple; while ((tuple = it->next(it)) != NULL) count++; /* Return subtree size */ lua_pushnumber(L, count); return 1; } static const struct luaL_reg lbox_index_meta[] = { {"__tostring", lbox_index_tostring}, {"__len", lbox_index_len}, {"part_count", lbox_index_part_count}, {"min", lbox_index_min}, {"max", lbox_index_max}, {"random", lbox_index_random}, {"next", lbox_index_next}, {"iterator", lbox_index_iterator}, {"count", lbox_index_count}, {NULL, NULL} }; static const struct luaL_reg indexlib [] = { {"new", lbox_index_new}, {NULL, NULL} }; static const struct luaL_reg lbox_iterator_meta[] = { {"__gc", lbox_iterator_gc}, {NULL, NULL} }; /* }}} */ /** {{{ Lua I/O: facilities to intercept box output * and push into Lua stack. */ struct port_lua { struct port_vtab *vtab; struct lua_State *L; }; static inline struct port_lua * port_lua(struct port *port) { return (struct port_lua *) port; } /* * For addU32/dupU32 do nothing -- the only uint32_t Box can give * us is tuple count, and we don't need it, since we intercept * everything into Lua stack first. * @sa port_add_lua_multret */ static void port_lua_add_tuple(struct port *port, struct tuple *tuple, uint32_t flags __attribute__((unused))) { lua_State *L = port_lua(port)->L; try { lbox_pushtuple(L, tuple); } catch (...) { tnt_raise(ClientError, ER_PROC_LUA, lua_tostring(L, -1)); } } struct port_vtab port_lua_vtab = { port_lua_add_tuple, null_port_eof, }; static struct port * port_lua_create(struct lua_State *L) { struct port_lua *port = (struct port_lua *) palloc(fiber->gc_pool, sizeof(struct port_lua)); port->vtab = &port_lua_vtab; port->L = L; return (struct port *) port; } /** * Convert a Lua table to a tuple with as little * overhead as possible. */ static struct tuple * lua_table_to_tuple(struct lua_State *L, int index) { uint32_t field_count = 0; uint32_t tuple_len = 0; struct lua_field field; /** First go: calculate tuple length. */ lua_pushnil(L); /* first key */ while (lua_next(L, index) != 0) { ++field_count; lua_tofield(L, -1, &field); if (field.type == UNKNOWN) { tnt_raise(ClientError, ER_PROC_RET, lua_typename(L, lua_type(L, -1))); } tuple_len += field.len + varint32_sizeof(field.len); lua_pop(L, 1); } struct tuple *tuple = tuple_alloc(tuple_format_ber, tuple_len); /* * Important: from here and on if there is an exception, * the tuple is leaked. */ tuple->field_count = field_count; char *pos = tuple->data; /* Second go: store data in the tuple. */ lua_pushnil(L); /* first key */ while (lua_next(L, index) != 0) { lua_tofield(L, -1, &field); pos = pack_lstr(pos, field.data, field.len); lua_pop(L, 1); } return tuple; } static struct tuple* lua_totuple(struct lua_State *L, int index) { int type = lua_type(L, index); struct tuple *tuple; struct lua_field field; lua_tofield(L, index, &field); if (field.type != UNKNOWN) { tuple = tuple_alloc(tuple_format_ber, field.len + varint32_sizeof(field.len)); tuple->field_count = 1; pack_lstr(tuple->data, field.data, field.len); return tuple; } switch (type) { case LUA_TTABLE: { return lua_table_to_tuple(L, index); } case LUA_TUSERDATA: { tuple = lua_istuple(L, index); if (tuple) return tuple; } default: /* * LUA_TNONE, LUA_TTABLE, LUA_THREAD, LUA_TFUNCTION */ tnt_raise(ClientError, ER_PROC_RET, lua_typename(L, type)); break; } } static void port_add_lua_ret(struct port *port, struct lua_State *L, int index) { struct tuple *tuple = lua_totuple(L, index); auto scoped_guard = make_scoped_guard([=] { if (tuple->refs == 0) tuple_free(tuple); }); port_add_tuple(port, tuple, BOX_RETURN_TUPLE); } /** * Add all elements from Lua stack to fiber iov. * * To allow clients to understand a complex return from * a procedure, we are compatible with SELECT protocol, * and return the number of return values first, and * then each return value as a tuple. * * If a Lua stack contains at least one scalar, each * value on the stack is converted to a tuple. A Lua * is converted to a tuple with multiple fields. * * If the stack is a Lua table, each member of which is * not scalar, each member of the table is converted to * a tuple. This way very large lists of return values can * be used, since Lua stack size is limited by 8000 elements, * while Lua table size is pretty much unlimited. */ static void port_add_lua_multret(struct port *port, struct lua_State *L) { int nargs = lua_gettop(L); /** Check if we deal with a table of tables. */ if (nargs == 1 && lua_istable(L, 1)) { /* * The table is not empty and consists of tables * or tuples. Treat each table element as a tuple, * and push it. */ lua_pushnil(L); int has_keys = lua_next(L, 1); if (has_keys && (lua_istable(L, -1) || lua_isuserdata(L, -1))) { do { port_add_lua_ret(port, L, lua_gettop(L)); lua_pop(L, 1); } while (lua_next(L, 1)); return; } else if (has_keys) { lua_pop(L, 1); } } for (int i = 1; i <= nargs; ++i) { port_add_lua_ret(port, L, i); } } /* }}} */ /** * The main extension provided to Lua by Tarantool/Box -- * ability to call INSERT/UPDATE/SELECT/DELETE from within * a Lua procedure. * * This is a low-level API, and it expects * all arguments to be packed in accordance * with the binary protocol format (iproto * header excluded). * * Signature: * box.process(op_code, request) */ static int lbox_process(lua_State *L) { uint32_t op = lua_tointeger(L, 1); /* Get the first arg. */ size_t sz; const char *req = luaL_checklstring(L, 2, &sz); /* Second arg. */ if (op == CALL) { /* * We should not be doing a CALL from within a CALL. * To invoke one stored procedure from another, one must * do it in Lua directly. This deals with * infinite recursion, stack overflow and such. */ return luaL_error(L, "box.process(CALL, ...) is not allowed"); } int top = lua_gettop(L); /* to know how much is added by rw_callback */ size_t allocated_size = palloc_allocated(fiber->gc_pool); struct port *port_lua = port_lua_create(L); try { box_process(port_lua, op, req, sz); /* * This only works as long as port_lua doesn't * use fiber->cleanup and fiber->gc_pool. */ ptruncate(fiber->gc_pool, allocated_size); } catch (const Exception& e) { ptruncate(fiber->gc_pool, allocated_size); throw; } return lua_gettop(L) - top; } static int lbox_raise(lua_State *L) { if (lua_gettop(L) != 2) luaL_error(L, "box.raise(): bad arguments"); uint32_t code = lua_tointeger(L, 1); if (!code) luaL_error(L, "box.raise(): unknown error code"); const char *str = lua_tostring(L, 2); tnt_raise(ClientError, str, code); return 0; } /** * A helper to find a Lua function by name and put it * on top of the stack. */ static void box_lua_find(lua_State *L, const char *name, const char *name_end) { int index = LUA_GLOBALSINDEX; const char *start = name, *end; while ((end = (const char *) memchr(start, '.', name_end - start))) { lua_checkstack(L, 3); lua_pushlstring(L, start, end - start); lua_gettable(L, index); if (! lua_istable(L, -1)) tnt_raise(ClientError, ER_NO_SUCH_PROC, name_end - name, name); start = end + 1; /* next piece of a.b.c */ index = lua_gettop(L); /* top of the stack */ } lua_pushlstring(L, start, name_end - start); lua_gettable(L, index); if (! lua_isfunction(L, -1)) { /* lua_call or lua_gettable would raise a type error * for us, but our own message is more verbose. */ tnt_raise(ClientError, ER_NO_SUCH_PROC, name_end - name, name); } /* setting stack that it would contain only * the function pointer. */ if (index != LUA_GLOBALSINDEX) { lua_replace(L, 1); lua_settop(L, 1); } } /** * A helper to find lua stored procedures for box.call. * box.call iteslf is pure Lua, to avoid issues * with infinite call recursion smashing C * thread stack. */ static int lbox_call_loadproc(struct lua_State *L) { const char *name; size_t name_len; name = lua_tolstring(L, 1, &name_len); box_lua_find(L, name, name + name_len); return 1; } /** * Invoke a Lua stored procedure from the binary protocol * (implementation of 'CALL' command code). */ void box_lua_execute(struct request *request, struct port *port) { const char **reqpos = &request->data; const char *reqend = request->data + request->len; lua_State *L = lua_newthread(root_L); int coro_ref = luaL_ref(root_L, LUA_REGISTRYINDEX); /* Request flags: not used. */ (void) (pick_u32(reqpos, reqend)); try { auto scoped_guard = make_scoped_guard([=] { /* * Allow the used coro to be garbage collected. * @todo: cache and reuse it instead. */ luaL_unref(root_L, LUA_REGISTRYINDEX, coro_ref); }); uint32_t field_len; /* proc name */ const char *field = pick_field_str(reqpos, reqend, &field_len); box_lua_find(L, field, field + field_len); /* Push the rest of args (a tuple). */ uint32_t nargs = pick_u32(reqpos, reqend); luaL_checkstack(L, nargs, "call: out of stack"); for (int i = 0; i < nargs; i++) { field = pick_field_str(reqpos, reqend, &field_len); lua_pushlstring(L, field, field_len); } lua_call(L, nargs, LUA_MULTRET); /* Send results of the called procedure to the client. */ port_add_lua_multret(port, L); } catch (const Exception& e) { throw; } catch (...) { tnt_raise(ClientError, ER_PROC_LUA, lua_tostring(L, -1)); } } static void box_index_init_iterator_types(struct lua_State *L, int idx) { for (int i = 0; i < iterator_type_MAX; i++) { assert(strncmp(iterator_type_strs[i], "ITER_", 5) == 0); lua_pushnumber(L, i); /* cut ITER_ prefix from enum name */ lua_setfield(L, idx, iterator_type_strs[i] + 5); } } /** * Convert box.pack() format specifier to Tarantool * binary protocol UPDATE opcode */ static char format_to_opcode(char format) { switch (format) { case '=': return 0; case '+': return 1; case '&': return 2; case '^': return 3; case '|': return 4; case ':': return 5; case '#': return 6; case '!': return 7; case '-': return 8; default: return format; } } /** * Counterpart to @a format_to_opcode */ static char opcode_to_format(char opcode) { switch (opcode) { case 0: return '='; case 1: return '+'; case 2: return '&'; case 3: return '^'; case 4: return '|'; case 5: return ':'; case 6: return '#'; case 7: return '!'; case 8: return '-'; default: return opcode; } } static int luaL_packsize(struct lua_State *L, int index) { switch (lua_type(L, index)) { case LUA_TNUMBER: case LUA_TCDATA: case LUA_TSTRING: return 1; case LUA_TUSERDATA: { struct tuple *t = lua_istuple(L, index); if (t == NULL) luaL_error(L, "box.pack: unsupported type"); return t->field_count; } case LUA_TTABLE: { int size = 0; lua_pushnil(L); while (lua_next(L, index) != 0) { /* Sic: use absolute index. */ size += luaL_packsize(L, lua_gettop(L)); lua_pop(L, 1); } return size; } default: luaL_error(L, "box.pack: unsupported type"); } return 0; } static void luaL_packvalue(struct lua_State *L, luaL_Buffer *b, int index) { struct lua_field field; lua_tofield(L, index, &field); if (field.type != UNKNOWN) { luaL_addvarint32(b, field.len); luaL_addlstring(b, field.data, field.len); return; } switch (lua_type(L, index)) { case LUA_TUSERDATA: { struct tuple *tuple = lua_istuple(L, index); if (tuple == NULL) luaL_error(L, "box.pack: unsupported type"); tuple_to_luabuf(tuple, b); return; } case LUA_TTABLE: { lua_pushnil(L); while (lua_next(L, index) != 0) { /* Sic: use absolute index. */ luaL_packvalue(L, b, lua_gettop(L)); lua_pop(L, 1); } return; } default: luaL_error(L, "box.pack: unsupported type"); return; } } static void luaL_packstack(struct lua_State *L, luaL_Buffer *b, int first, int last) { int size = 0; /* sic: if arg_count is 0, first > last */ for (int i = first; i <= last; ++i) size += luaL_packsize(L, i); luaL_addlstring(b, (char *) &size, sizeof(size)); for (int i = first; i <= last; ++i) luaL_packvalue(L, b, i); } /** * To use Tarantool/Box binary protocol primitives from Lua, we * need a way to pack Lua variables into a binary representation. * We do it by exporting a helper function * * box.pack(format, args...) * * which takes the format, which is very similar to Perl 'pack' * format, and a list of arguments, and returns a binary string * which has the arguments packed according to the format. * * For example, a typical SELECT packet packs in Lua like this: * * pkt = box.pack("iiiiiip", -- pack format * 0, -- space id * 0, -- index id * 0, -- offset * 2^32, -- limit * 1, -- number of SELECT arguments * 1, -- tuple cardinality * key); -- the key to use for SELECT * * @sa doc/box-protocol.txt, binary protocol description * @todo: implement box.unpack(format, str), for testing purposes */ static int lbox_pack(struct lua_State *L) { luaL_Buffer b; const char *format = luaL_checkstring(L, 1); /* first arg comes second */ int i = 2; int nargs = lua_gettop(L); size_t size; const char *str; luaL_buffinit(L, &b); struct lua_field field; double dbl; float flt; uint16_t u16; uint32_t u32; uint64_t u64; while (*format) { if (i > nargs) luaL_error(L, "box.pack: argument count does not match " "the format"); lua_tofield(L, i, &field); switch (*format) { case 'B': case 'b': /* signed and unsigned 8-bit integers */ if (field.type != NUM || field.u32 > UINT8_MAX) luaL_error(L, "box.pack: expected 8-bit int"); luaL_addchar(&b, field.u32); break; case 'S': case 's': /* signed and unsigned 16-bit integers */ if (field.type != NUM || field.u32 > UINT16_MAX) luaL_error(L, "box.pack: expected 16-bit int"); luaL_addlstring(&b, field.data, sizeof(uint16_t)); break; case 'n': /* signed and unsigned 16-bit big endian integers */ if (field.type != NUM || field.u32 > UINT16_MAX) luaL_error(L, "box.pack: expected 16-bit int"); u16 = htons( (uint16_t) field.u32 ); luaL_addlstring(&b, (char *)&u16, sizeof(u16)); break; case 'I': case 'i': /* signed and unsigned 32-bit integers */ if (field.type != NUM) luaL_error(L, "box.pack: expected 32-bit int"); luaL_addlstring(&b, field.data, sizeof(uint32_t)); break; case 'N': /* signed and unsigned 32-bit big endian integers */ if (field.type != NUM) luaL_error(L, "box.pack: expected 32-bit int"); u32 = htonl( field.u32 ); luaL_addlstring(&b, (char *)&u32, sizeof(uint32_t)); break; case 'L': case 'l': /* signed and unsigned 64-bit integers */ if (field.type == NUM64) { luaL_addlstring(&b, field.data, field.len); } else if (field.type == NUM) { /* extend 32-bit value to 64-bit */ u64 = field.u32; luaL_addlstring(&b, (char *)&u64, sizeof(u64)); } else { luaL_error(L, "box.pack: expected 64-bit int"); } break; case 'Q': case 'q': /* signed and unsigned 64-bit integers */ if (field.type == NUM64) { u64 = *(uint64_t*) field.data; } else if (field.type == NUM) { /* extend 32-bit value to 64-bit */ u64 = field.u32; } else { luaL_error(L, "box.pack: expected 64-bit int"); } u64 = bswap_u64(u64); luaL_addlstring(&b, (char *)&u64, sizeof(u64)); break; case 'd': dbl = (double) lua_tonumber(L, i); luaL_addlstring(&b, (char *) &dbl, sizeof(dbl)); break; case 'f': flt = (float) lua_tonumber(L, i); luaL_addlstring(&b, (char *) &flt, sizeof(flt)); break; case 'w': /* Perl 'pack' BER-encoded integer */ if (field.type != NUM) luaL_error(L, "box.pack: expected 32-bit int"); luaL_addvarint32(&b, field.u32); break; case 'A': case 'a': /* A sequence of bytes */ str = luaL_checklstring(L, i, &size); luaL_addlstring(&b, str, size); break; case 'P': case 'p': luaL_packvalue(L, &b, i); break; case 'V': { int arg_count = luaL_checkint(L, i); if (i + arg_count > nargs) luaL_error(L, "box.pack: argument count does not match " "the format"); luaL_packstack(L, &b, i + 1, i + arg_count); i += arg_count; break; } case '=': /* update tuple set foo = bar */ case '+': /* set field += val */ case '-': /* set field -= val */ case '&': /* set field & =val */ case '|': /* set field |= val */ case '^': /* set field ^= val */ case ':': /* splice */ case '#': /* delete field */ case '!': { /* insert field */ /* field no */ uint32_t u32buf = (uint32_t) lua_tointeger(L, i); luaL_addlstring(&b, (char *) &u32buf, sizeof(uint32_t)); luaL_addchar(&b, format_to_opcode(*format)); break; } default: luaL_error(L, "box.pack: unsupported pack " "format specifier '%c'", *format); } i++; format++; } luaL_pushresult(&b); return 1; } const char * box_unpack_response(struct lua_State *L, const char *s, const char *end) { uint32_t tuple_count = pick_u32(&s, end); /* Unpack and push tuples. */ while (tuple_count--) { uint32_t bsize = pick_u32(&s, end); uint32_t field_count = pick_u32(&s, end); const char *tend = s + bsize; if (tend > end) tnt_raise(IllegalParams, "incorrect packet length"); struct tuple *tuple = tuple_new(tuple_format_ber, field_count, &s, tend); lbox_pushtuple(L, tuple); } return s; } static int lbox_unpack(struct lua_State *L) { size_t format_size = 0; const char *format = luaL_checklstring(L, 1, &format_size); const char *f = format; size_t str_size = 0; const char *str = luaL_checklstring(L, 2, &str_size); const char *end = str + str_size; const char *s = str; int save_stacksize = lua_gettop(L); char charbuf; uint8_t u8buf; uint16_t u16buf; uint32_t u32buf; double dbl; float flt; #define CHECK_SIZE(cur) if (unlikely((cur) >= end)) { \ luaL_error(L, "box.unpack('%c'): got %d bytes (expected: %d+)", \ *f, (int) (end - str), (int) 1 + ((cur) - str)); \ } while (*f) { switch (*f) { case 'b': CHECK_SIZE(s); u8buf = *(uint8_t *) s; lua_pushnumber(L, u8buf); s++; break; case 's': CHECK_SIZE(s + 1); u16buf = *(uint16_t *) s; lua_pushnumber(L, u16buf); s += 2; break; case 'n': CHECK_SIZE(s + 1); u16buf = ntohs(*(uint16_t *) s); lua_pushnumber(L, u16buf); s += 2; break; case 'i': CHECK_SIZE(s + 3); u32buf = *(uint32_t *) s; lua_pushnumber(L, u32buf); s += 4; break; case 'N': CHECK_SIZE(s + 3); u32buf = ntohl(*(uint32_t *) s); lua_pushnumber(L, u32buf); s += 4; break; case 'l': CHECK_SIZE(s + 7); luaL_pushnumber64(L, *(uint64_t*) s); s += 8; break; case 'q': CHECK_SIZE(s + 7); luaL_pushnumber64(L, bswap_u64(*(uint64_t*) s)); s += 8; break; case 'd': CHECK_SIZE(s + 7); dbl = *(double *) s; lua_pushnumber(L, dbl); s += 8; break; case 'f': CHECK_SIZE(s + 3); flt = *(float *) s; lua_pushnumber(L, flt); s += 4; break; case 'w': /* pick_varint32 throws exception on error. */ u32buf = pick_varint32(&s, end); lua_pushnumber(L, u32buf); break; case 'a': case 'A': /* The rest of the data is a Lua string. */ lua_pushlstring(L, s, end - s); s = end; break; case 'P': case 'p': /* pick_varint32 throws exception on error. */ u32buf = pick_varint32(&s, end); CHECK_SIZE(s + u32buf - 1); lua_pushlstring(L, s, u32buf); s += u32buf; break; case '=': /* update tuple set foo = bar */ case '+': /* set field += val */ case '-': /* set field -= val */ case '&': /* set field & =val */ case '|': /* set field |= val */ case '^': /* set field ^= val */ case ':': /* splice */ case '#': /* delete field */ case '!': /* insert field */ CHECK_SIZE(s + 4); /* field no */ u32buf = *(uint32_t *) s; /* opcode */ charbuf = *(s + 4); charbuf = opcode_to_format(charbuf); if (charbuf != *f) { luaL_error(L, "box.unpack('%s'): " "unexpected opcode: " "offset %d, expected '%c'," "found '%c'", format, s - str, *f, charbuf); } lua_pushnumber(L, u32buf); s += 5; break; case 'R': /* Unpack server response, IPROTO format. */ { s = box_unpack_response(L, s, end); break; } default: luaL_error(L, "box.unpack: unsupported " "format specifier '%c'", *f); } f++; } assert(s <= end); if (s != end) { luaL_error(L, "box.unpack('%s'): too many bytes: " "unpacked %d, total %d", format, s - str, str_size); } return lua_gettop(L) - save_stacksize; #undef CHECK_SIZE } static const struct luaL_reg boxlib[] = { {"process", lbox_process}, {"call_loadproc", lbox_call_loadproc}, {"raise", lbox_raise}, {"pack", lbox_pack}, {"unpack", lbox_unpack}, {NULL, NULL} }; void mod_lua_init(struct lua_State *L) { /* box, box.tuple */ tarantool_lua_register_type(L, tuplelib_name, lbox_tuple_meta); luaL_register(L, tuplelib_name, lbox_tuplelib); lua_pop(L, 1); tarantool_lua_register_type(L, tuple_iteratorlib_name, lbox_tuple_iterator_meta); luaL_register(L, "box", boxlib); lua_pop(L, 1); /* box.index */ tarantool_lua_register_type(L, indexlib_name, lbox_index_meta); luaL_register(L, "box.index", indexlib); box_index_init_iterator_types(L, -2); lua_pop(L, 1); tarantool_lua_register_type(L, iteratorlib_name, lbox_iterator_meta); /* Load Lua extension */ for (const char **s = lua_sources; *s; s++) { if (luaL_dostring(L, *s)) panic("Error loading Lua source %.160s...: %s", *s, lua_tostring(L, -1)); } assert(lua_gettop(L) == 0); root_L = L; } tarantool-1.5.1.218.g1a69fd6/src/box/txn.cc0000664000000000000000000000615612231715276016475 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "txn.h" #include "tuple.h" #include "space.h" #include #include #include #include #include "request.h" /* for request_name */ void txn_add_redo(struct txn *txn, uint16_t op, const char *data, uint32_t len) { txn->op = op; txn->data = data; txn->len = len; } void txn_replace(struct txn *txn, struct space *space, struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode) { /* txn_add_undo() must be done after txn_add_redo() */ assert(txn->op != 0); assert(old_tuple || new_tuple); /* * Remember the old tuple only if we replaced it * successfully, to not remove a tuple inserted by * another transaction in rollback(). */ txn->old_tuple = space_replace(space, old_tuple, new_tuple, mode); if (new_tuple) { txn->new_tuple = new_tuple; tuple_ref(txn->new_tuple, 1); } txn->space = space; } struct txn * txn_begin() { struct txn *txn = (struct txn *) p0alloc(fiber->gc_pool, sizeof(*txn)); return txn; } void txn_commit(struct txn *txn) { if (txn->old_tuple || txn->new_tuple) { int64_t lsn = next_lsn(recovery_state); ev_tstamp start = ev_now(), stop; int res = wal_write(recovery_state, lsn, fiber->cookie, txn->op, txn->data, txn->len); stop = ev_now(); if (stop - start > cfg.too_long_threshold) { say_warn("too long %s: %.3f sec", request_name(txn->op), stop - start); } confirm_lsn(recovery_state, lsn, res == 0); if (res) tnt_raise(LoggedError, ER_WAL_IO); } } void txn_finish(struct txn *txn) { if (txn->old_tuple) tuple_ref(txn->old_tuple, -1); TRASH(txn); } void txn_rollback(struct txn *txn) { if (txn->old_tuple || txn->new_tuple) { space_replace(txn->space, txn->new_tuple, txn->old_tuple, DUP_INSERT); if (txn->new_tuple) tuple_ref(txn->new_tuple, -1); } TRASH(txn); } tarantool-1.5.1.218.g1a69fd6/src/box/tuple_convert.cc0000664000000000000000000000321612202131537020535 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tuple.h" #include "iobuf.h" extern "C" { #include #include #include } /* extern "C" */ void tuple_to_obuf(struct tuple *tuple, struct obuf *buf) { obuf_dup(buf, &tuple->bsize, tuple_len(tuple)); } void tuple_to_luabuf(struct tuple *tuple, struct luaL_Buffer *b) { luaL_addlstring(b, (char*)tuple->data, tuple->bsize); } tarantool-1.5.1.218.g1a69fd6/src/box/box_lua_space.cc0000664000000000000000000001025412231715257020461 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "box_lua_space.h" extern "C" { #include #include #include } /* extern "C" */ #include "space.h" #include /** * Make a single space available in Lua, * via box.space[] array. * * @return A new table representing a space on top of the Lua * stack. */ int lbox_pushspace(struct lua_State *L, struct space *space) { lua_newtable(L); /* space.cardinality */ lua_pushstring(L, "cardinality"); lua_pushnumber(L, space->arity); lua_settable(L, -3); /* space.n */ lua_pushstring(L, "n"); lua_pushnumber(L, space->no); lua_settable(L, -3); /* all exists spaces are enabled */ lua_pushstring(L, "enabled"); lua_pushboolean(L, 1); lua_settable(L, -3); /* legacy field */ lua_pushstring(L, "estimated_rows"); lua_pushnumber(L, 0); lua_settable(L, -3); /* space.index */ lua_pushstring(L, "index"); lua_newtable(L); /* * Fill space.index table with * all defined indexes. */ for (int i = 0; i < space->key_count; i++) { lua_pushnumber(L, i); lua_newtable(L); /* space.index[i] */ lua_pushstring(L, "unique"); lua_pushboolean(L, space->key_defs[i].is_unique); lua_settable(L, -3); lua_pushstring(L, "type"); lua_pushstring(L, index_type_strs[space->key_defs[i].type]); lua_settable(L, -3); lua_pushstring(L, "key_field"); lua_newtable(L); for (uint32_t j = 0; j < space->key_defs[i].part_count; j++) { lua_pushnumber(L, j); lua_newtable(L); lua_pushstring(L, "type"); switch (space->key_defs[i].parts[j].type) { case NUM: lua_pushstring(L, "NUM"); break; case NUM64: lua_pushstring(L, "NUM64"); break; case STRING: lua_pushstring(L, "STR"); break; default: lua_pushstring(L, "UNKNOWN"); break; } lua_settable(L, -3); lua_pushstring(L, "fieldno"); lua_pushnumber(L, space->key_defs[i].parts[j].fieldno); lua_settable(L, -3); lua_settable(L, -3); } lua_settable(L, -3); /* space[i].key_field */ lua_settable(L, -3); /* space[i] */ } lua_settable(L, -3); /* push space.index */ lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "bless_space"); lua_gettable(L, -2); lua_pushvalue(L, -3); /* box, bless, space */ lua_call(L, 1, 0); lua_pop(L, 1); /* cleanup stack */ return 1; } /** * A callback adapter for space_foreach(). */ static void lbox_add_space(struct space *space, struct lua_State *L) { lua_pushnumber(L, space->no); lbox_pushspace(L, space); lua_settable(L, -3); } static void lbox_add_space_wrapper(struct space *space, void *param) { lbox_add_space(space, (struct lua_State *) param); } /** * Make all spaces available in Lua via box.space * array. */ void box_lua_load_cfg(struct lua_State *L) { lua_getfield(L, LUA_GLOBALSINDEX, "box"); lua_pushstring(L, "space"); lua_newtable(L); space_foreach(lbox_add_space_wrapper, L); /* fill box.space */ lua_settable(L, -3); lua_pop(L, 1); assert(lua_gettop(L) == 0); } tarantool-1.5.1.218.g1a69fd6/src/box/libltbox.a0000664000000000000000000240472612213333070017331 0ustar rootroot! / 1378727480 0 0 0 4668 ` \sFsFsFsFsFsFsFsFsFsFsFsFsFsFsFsFsFsFsFsFsFsFqqqqqqΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞd2d2d2###############################################JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJcfg_filenamecfg_filename_fullpathbinary_filenamecustom_proc_titlemain_argvmain_argccfgsnapshot_pidtitlereload_cfgshow_cfgtarantool_versiontarantool_uptimesnapshot_Z18tarantool_lua_freevtarantool_free_Z12init_storageP6log_ioP9fio_batchmain_ZTI9Exception_ZTS9Exception_ZTI6Object_ZTS6Objectopt_def_ZNK9Exception6errmsgEvtarantool_Lboxlib_name_Z25tarantool_lua_tointeger64P9lua_Statei_Z17luaL_pushnumber64P9lua_Statem_ZTI9Exception_ZTI20FiberCancelException_Z22tarantool_lua_tostringP9lua_Statei_ZTI11ClientError_Z27tarantool_lua_register_typeP9lua_StatePKcPK8luaL_Reg_Z17show_plugins_statP4tbuf_Z18tarantool_lua_initv_Z19tarantool_lua_closeP9lua_State_Z13tarantool_luaP9lua_StateP4tbufPKc_Z22tarantool_lua_load_cfgP9lua_StateP13tarantool_cfg_Z30tarantool_lua_load_init_scriptP9lua_State_Z16lua_region_allocPvm_ZTS11ClientError_ZTS9Exception_ZTI6Object_ZTS20FiberCancelException_ZTS6Objectsayfdlogger_pidbooting_saysay_logger_initvsay_Z20mh_i32ptr_del_resizeP11mh_i32ptr_tjPv_Z16mh_i32ptr_resizeP11mh_i32ptr_tPv_Z13mh_i32ptr_newv_Z15mh_i32ptr_clearP11mh_i32ptr_t_Z16mh_i32ptr_deleteP11mh_i32ptr_t_Z22mh_i32ptr_start_resizeP11mh_i32ptr_tjjPv_Z17mh_i32ptr_reserveP11mh_i32ptr_tjPv_Z20mh_i64ptr_del_resizeP11mh_i64ptr_tjPv_Z16mh_i64ptr_resizeP11mh_i64ptr_tPv_Z13mh_i64ptr_newv_Z15mh_i64ptr_clearP11mh_i64ptr_t_Z16mh_i64ptr_deleteP11mh_i64ptr_t_Z22mh_i64ptr_start_resizeP11mh_i64ptr_tjjPv_Z17mh_i64ptr_reserveP11mh_i64ptr_tjPv_Z21mh_lstrptr_del_resizeP12mh_lstrptr_tjPv_Z17mh_lstrptr_resizeP12mh_lstrptr_tPv_Z14mh_lstrptr_newv_Z16mh_lstrptr_clearP12mh_lstrptr_t_Z17mh_lstrptr_deleteP12mh_lstrptr_t_Z23mh_lstrptr_start_resizeP12mh_lstrptr_tjjPv_Z18mh_lstrptr_reserveP12mh_lstrptr_tjPv_Z24replication_check_configP13tarantool_cfg_Z19replication_preforkv_Z16replication_initPKci_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZNK9Exception6errmsgEv_ZNK11ClientError7errcodeEv_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Ev_ZN13IllegalParamsD1Ev_ZTI13IllegalParamsmemcached_stat_strs__packed___Z17tbuf_append_fieldP4tbufPKc_Z16tbuf_store_fieldP4tbufPKcj_Z15tbuf_read_fieldP4tbuf_Z13memcached_getP4obufmP4tbufb_ZTI11ClientError_Z14memcached_loopP5ev_ioP5iobuf_ZTI9Exception_ZTI20FiberCancelException_Z22memcached_check_configP13tarantool_cfg_Z14memcached_initPKci_Z20memcached_space_initv_Z29memcached_delete_expired_keysP4tbuf_Z21memcached_expire_loopP13__va_list_tag_Z22memcached_start_expirev_Z21memcached_stop_expirev_ZTV13IllegalParams_ZN13IllegalParamsD0Ev_ZN13IllegalParamsD2Ev_ZTS9Exception_ZTI6Object_ZTS20FiberCancelException_ZTS13IllegalParams_ZTI11LoggedError_ZTS11LoggedError_ZTS11ClientError_ZTS6Object_ZN6ObjectD2Ev_ZTV6Object_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN20FiberCancelExceptionC2EPKcj_ZTV20FiberCancelException_ZN20FiberCancelExceptionC1EPKcj_ZNK20FiberCancelException3logEv_ZN11ClientErrorD2Ev_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Evfiber_Z10fiber_callP5fiberz_Z16fiber_checkstackv_ZTI11ClientError_Z12fiber_wakeupP5fiber_Z12fiber_cancelP5fiber_Z16fiber_testcancelv_Z11fiber_yieldv_Z18fiber_is_cancelledv_ZN20FiberCancelExceptionD1Ev_ZTI20FiberCancelException_Z20fiber_setcancellableb_Z19fiber_yield_timeoutd_Z14fiber_yield_toP5fiber_Z11fiber_sleepd_Z20fiber_schedule_childP8ev_childi_Z14fiber_scheduleP10ev_watcheri_Z14wait_for_childi_Z10fiber_findj_Z8fiber_gcv_Z14fiber_set_nameP5fiberPKc_ZTI9Exception_Z9fiber_newPKcPFvP13__va_list_tagE_Z13fiber_destroyP5fiber_Z17fiber_destroy_allv_Z10fiber_infoP4tbuf_Z10fiber_initv_Z10fiber_freev_ZN20FiberCancelExceptionD0Ev_ZN20FiberCancelExceptionD2Ev_ZTS9Exception_ZTI6Object_ZTS20FiberCancelException_ZTS11ClientError_ZTS6Object// 18 ` replication.cc.o/ tarantool.cc.o/ 1378727479 1000 1000 100664 84344 ` ELF>@@#   UHHHEE]UHH}EUHH}EUH]UHH}HEHUHPHEHUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH\UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHHH}HEHUHH@H}EHdHHPHHEHHHEHEHEHQHEHEHHHEHdHH9EHEHEE \EMf(\f(EfWf.Er)HdHHHHn EfWf.QUHHH}HHUHEEHUHHH}HEHttHEHUHH0H}HEH'HEHEHHHEHdHH9EtHEHHHHEHt(HEHHEHEHHHEHEHUHHH}HuHEHE@9v9HEHEHHE@H9HtHUHEHHUHH H}HuHUHEHPHEHH`HEHPHEH HUHEHHHEHEHEHEHPHEHUHHH}HEHHƿt)HEHH¾UHSHHHHPHXL`Lht#)p)M)U)])e)m)u)}H8HpH8HpHH DžDž 0HEHH@HH H8HH)HHHH8H8HHH8HH0HDž@HDžHHDžPHDžXHDž`HDžhH@H(rH0tUH0H(HH H8HH)HHH8AHѺHǸHH8H(H0H(HHvHpHǸHH[]UHH0H}؉uHHHHtHHHEHHHEH}u(HH¾LEH}HMUHuHEMIHEHEH}t HEHt~EtpEu%HH¾DHEH4t(HEHt HEHHUHH@H}HuHEHHEHHHu.HEHEf.zf.u HEHHEHEHHEHHHHEHHtHEHHuHLHEHHEHHT$H$AAAHEHHt HEHEf.Ezf.EtPLHEHHUHUMHEEAAAHEHHHEHEEHHHEHHHEEHHEHHEEÐUHHH}HEHHHEH@HHt,HHHHHEH@HHHHHUHSHxHHHu*HHHHHHHtFHHHHHHH+HHEHHEHHEHHUH$HUHT$HUHT$HHHHHHHuHHtt HHuHH_tt HHHHHEH}t"HEH¾uHHƿWtQHHƿt-HHƿHHHHMHHH7HHHx[]UHH0H}HEؾHǸHEOHEHt,HMHUHEؾHǸHEHHUHEؾHǸHUHEHHEH}uHUH]UHH \EHEHEEUHSHt sE}y>HAHGӸ}~FEEEE E%cHdHHƿƿHHHH[]UHHH}ut+L AkAHǸUHHH}uUHH\Et\EǸ|\ uEǸ\EǸ‹EǸEǸH`HH`HHHDž`H`HƿHUHHHHt?E)H EHcHHHHHHE}uUHSH(HPHHPHHHDžPHPHƿ HPHƿtxHPHƿtZHPHƿtHAHHH([]UHSHHPHHDžPHPHHHPHƿ t>HAHӿGHDžPHPHƿ tHPHƿut>HAHӿGHHHHHHH@@H@HH@H@( HHHHP0HH0@@HH0@HH0H@HH0@(HH0HHHP`HH`@@HH`@HH`H@HH`@(HH`HHHHH@@HH@HHH@HH@(HHHE}t5LE$AAA҃}t!HHĸ[]UHATSH HEHEHHHHHEH}u>HAH ӿHEHt>HAHӿHUHEоHHtHEteHEк HE}~Eut3L AAѿL AAHEHt>HAHӿHEHtHHL%MAHӿHEHǸHEHHH [A\]UHtDt u)]UHHHtHHH]UHHHtHHHHtHHHH։HHt9utHHE]UHSHH@HEEt>HAHqӿH[]UHH}Hu]UHATSHĀ}HuHEHEHHEHUH։HEEHEHHHMHEHHHEHEHHEHHHEVHHHƿB HEhHHtlHEHHHƿHH HEcHHHt Hft HALH$AAAҿHEvHHcHЉEt(HH5@HHAHӿGH5HHEH¸HMHHHHHf/HHHHHHHHHuHEkHHu.ttNLHH@HH$AAAҸuttNLHH@HH$AAAҿHUHEgHHHENHUHEHHu+HEHt"HEHHEHHEHHUHEHHEH}uHHtHHut>HL%MAHHHt u:HHHEH}t@HL%MAH3LHIAAҿCHEЋ@x$HEЋ@xHEЋ@ttqHAH ӿGLHIA A-HEHEHEHƿt>HAHӿGHEHEHEHƿt>HAHӿGAt>HAHӿGHEIHHtANHHHHHEBHHtFHHu3L A.AѿkHHu'HHHHQHHHPHHHHHf@HHHHHHc Yf.sH, \H,HH1HUEHHHHHHH HHHHHHHHHdHH@(HLAAlAL AmAfWf.vHHEE5EHEH1L AxAѸ}sqHHdHt\HHEHEHHHHUHLAAuAҿHH[A\]UHHH}HEHuH3HEÐUHHH}HE@uHEHUHH}HuHEHUH HHJHHHRHPHE@]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/mutex.hf == fiber/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacitywal_mode %s is not recognizedprisecmemcadmrpl %s: %ircan't open config `%s'empty configuration file '%s'fsyncwal_mode cannot switch to/from fsync%s: wal_mode [%s] -> [%s]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tarantool.ccfsync_delay%s: wal_fsync_delay [%f] -> [%f]Could not reload configuration: it is being reloaded right nowCould not accept read only '%s' optionconfiguration: %s: "%s" %s: (null) 1.5.1-83-gf2974d6forkdumperdumper (%u)Snapshot process is already running, the signal is ignoredsnapshotFatal %d while backtracingSegmentation fault Got a fatal signal %d Current time: %u Please file a bug at http://bugs.launchpad.net/tarantool Attempting backtrace... Note: since the server has already crashed, this may fail as well sigactionsigprocmask%s error %de == 0a+can't open pid filecan't fseek to the beginning of pid filethe daemon is already runningupdating a stale pid fileftruncate(`%s')%i can't initialize slab allocatorTarantool %s Linux-x86_64-DebugTarget: %s cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_STATIC=OFF -DENABLE_TRACE=ON -DENABLE_BACKTRACE=ON -DENABLE_CLIENT=OFFBuild options: %s /usr/bin/gcc /usr/bin/c++Compiler: %s -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -msse2 -std=c11 -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing -Werror -pthreadC_FLAGS:%s -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -msse2 -std=c++11 -fno-rtti -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing -Wno-invalid-offsetof -Werror -pthreadCXX_FLAGS:%s Tarantool -- an efficient in-memory data store.Usage: %s [OPTIONS] Please visit project home page at http://tarantool.orgto see online documentation, submit bugs or contribute a patch.tarantool.cfgetc/tarantool.cfgcan't load config %s or %sCan't parse command line: try --help or -h for help. getcwdcfg_outcheck_config FAILED%.*scan't load config:%.*scan't chdir to `%s'getpwnam: %sUser not found: %ssetgit/setuidcan't switch to %s: i'm not rootgetrlimitsetrlimitprctl--background requires 'logger' configuration option to be setlog level %ientering event loopexiting loopFatal error, exiting loop%sint main(int, char**)signal_initvoid signal_init()void tbuf_ensure(tbuf*, size_t)void mutex_unlock(mutex*)core_reload_configAC  . t]}Z < h  :E9  n 1}9Exception6Object^'8Rint_drrR8d  &R ( 0k 1F 3r 78 0<  R# # # # # #( #0 #8 #@ #H #P #X #` #h R#p R#t #x F# y# # # &# /# 0# 1# 2# 3-# 5R# 7# (  ? c r# r# # #   # # R#j<j< d ?c d ? OR # 8' ?%' dT ?Z( "R#$f:?pFUK L# M#R  SR# TR# U#Z> [# \# ]# b c# d# eR# f# g#l m#r s# tR#y z# {R# |r# GNV_rt^ h>nu} @R# AR# CR# ~# R ?UR +!F ## +'# .R# 1M#@R@+L       # # 02u 4# 5# 6# 7# 8# 9# :#(R $ &R# &R# &R# &#cb&#R'(*t ,R# ,R# ,R# ,#cb, # , #   R t  0U WR# WR# WR# W#cbW" # W # YR#(  R  Z [| r   sp # # ctx$ # %# &-# #: $Y# %Y# &# )J ){  - . # / #{ M^ O#cswQR# R # Td #(fidV#0sid`#4 b{ #8 c{ #Hfi{ #X j#` k#x l #!^ u u j  s{ F`   #   #  #  #  # k# ? R9 ? %T +{ #._ "Rx Y 4 5 #lsn6# 0G H # I # J&# K{# K{#(N% S lsnT# T# V&# W2# X2# Y>#( ZJ#0 [P#8 cV#@ d#H eR#P fR#T gR#X h#` ix #h j #x l\#|! !,!8!D T  ) +# -# /# 0d #&   4 k# # #  k# # d# #4?   k# "d# ## $# %#&#(Y )k# -# 5d# ;# Ad# G#$ J#( M#, P#0 S#8 V#@ Y#H \#P _#X b#` e#h m#p pd#x s# v# y# |# # # # # # d# d# # # # # # # d# # ņ# # Y#_p!$ $D%=u#%>\#&&'nb(+'nt(1'n'R):'nzv*;.:'nz+u,,Pcu,u,v,v,,v- $vv.v#% 4Y#% 6r#% 9#/ 'Y'#0log , '#1 /#4'.Yr1 1FR'.42h'.'R3! v4E#5!"'U6!&v'U'R5!*'U[v7!+a'U[ d#8?),R"RE9K::v,,v;G{<:=:Rl<;>how;Rl?<@86A86h{ @NyAN6hAN6`BZAZ6hCo6Ao6hCRA6hB4;Dm4;h9 EM\DmM;HAM{@FGP{hHIfR XFGR`{ Bg Dmg;hEr\;Dmr;hBDm;HFIf `J KGhFGX d ?B7TDe7PhA7-`FJT DB>Db>PhA>T`Dlen>-XEZRAZhLeDfmteY|9FIapg}Ibufh|Gh~Gh~Gn) }Gqu~Gr|Gs~ d ? Y ?YE~RSA~HA~DFIfShG`G\GXGRd1ERAXAPFGhJ  d ?MRpDoutP{FG; G{G}Gv{_ D# D# J#N'V\N'VbuN'VO PhhFJDhJDh#QoutJh#R XS >out PHFTi"hTkey#`R#XeU2YV:W@RFTpE\FRLRX<d>wdh=dRd <r >wrh=rRd< =R~XendFR4 TfdRlTsa~< FTiRl<-!FTsa~R2}<!FTsa~J! J! FTeR\ d! ? !<0"FTfSXTbuf0"@TpidT d@" ?<'r"Y?ZD[Q?n\x#]&h] #`!#W~RH$=~R=~# FRYToptXJX$ K#TiPTkeyHRK$Tpw]$@K&$TcFTesc$ dX$ ?H$h$,)ECv$+uACu^$$_$_Mn`$$$a$h^ %&%_$bfun& %bc$H%Y%a %ha%`dVR ecfgS dLY dM dN dO f gD{f"<&{  &hfy &f2RO&RYRYY9f>\&/&f#,d fo  Y&hfQ|&fo&%f$P!f%+&&GK dP#  dQR GR GT8' ( fWTR7 % : ; I$ > &I$ >  I : ;I  : ;  : ; I8 : ;I8 I !I/ : ;  : ; @& : ;  : ; I : ;  : ;  : ; II : ; (  : ; : ;I8 5I : ; : ; I8  : ; !< "I# : ; $ : ; % : ; I8 2 &.: ; < c d'I4 (.: ; < d).: ; 2 < c d*.: ; I2 < d+/I, I- : ; .I8 2 /.? : ; @I< d0.? : ; @L M < d1.? : ; 2 < d2.? L 4 < d3 : ; 4 I8 4 5.? : ; < d6.? : ; L < d7.? : ; @I< d8!I/9: I;.: ;I@B <.: ;@B =: ;I >: ;I ?.: ;@B @.: ; @B A: ; I B.: ; @B C.: ; I@B D: ; I E.: ; I@B F G4: ; I H UI4: ; I J4I4  K L.? : ; @B M.? : ; I@B N.4 < dO.4 @dB PI4  Q4I4  R4: ;I S.? : ;@B T4: ;I U.? : ;I@B V.? : ;I@B W.? : ;I@B X : ;Y : ;Z.? : ;@@B [.? : ;@B \.? : ;@@B ]I ^.G d_I4 `.1@dB a1 b: ; Ic.1@dB d4: ; I?  e4: ; I?  f4: ; I? < g4: ;I? < h!wwvwww,v,-w-.w.1w1CvCDwDEwEHwHNvNOwOPwPSwSovopwpqwqtwtvwwwvwwwvww w AvABwBCwCFwF[v[\w\]w]`w`PvPQwQRwRUwUzvz{w{|w|wvwwwVvVWwWXwX[w[vwwwGvGHwHIwILwLvwwwvwwwWvWXwXYwY\w\ v w w w v w w w  v w w w JvJKwKLwLOwOUvUVwVWwWZwZvwwwvwww v www(v()w)*w*-w-EvEFwFIwIvwwwTvTUwUVwVYwYvwwwvwwwv w !w!$w$KvKLwLMwMPwPvww w vwwwvwww(v((w((w((w((v((w((w((w((v((w((w((w()v))w,)/IJ X /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/luaev.hrlist.hmutex.htbuf.htarantool.ccscoped_guard.hstddef.htypes.hunistd.hstdint.hstdio.hlibio.hstdarg.hsigset.hselect.hsignal.hsiginfo.hsigaction.hresource.hpwd.hcoro.hcoro.herrcode.hsay.hfiber.hsockaddr.hin.h recovery.hprscfg.h tarantool_box_cfg.h exception.hobject.htarantool_ev.h palloc.hwarning.h init.h KuJyt.5/!.".<tX=..ɃYM!gut Y6 .KvY6K.&/1=g'!Y."vY23*-@<B/Uy=@vuɤ(gKvuvuwKvKvY3%$)sL=NP*#Y<,g.2/=( J u;JtXL/;JtXL"uxwv=>7Y/%KY4g4gɟ wu^g>>|)02.x1Z>\/΃%J%3/"Z[\~]}XtXP4#4R0#4XtXL4EY/Y/dL5fuu44tXf.tXK))4">eKܜ%ZmYYy2! YY[KKg=====域]uu7#ɡ!345Y.tXKD.tXKD#/fx %<tXK>tX#@3   tXK43u4u4+4Y==)w\,YYZg\g <gg_g2)!KYK)yg/&ykt#o.&long intsa_sigactionrows_per_walEVBREAK_ONEf_databufptr__closurememcached_expireWAL_WRITE_shortbuf_IO_lock_tconf_syscalltbufgp_offset_Z12init_storageP6log_ioP9fio_batchwal_mode_STRSstderrpw_uidtarantool_coro_IO_buf_end10__sigset_tmutex_lock_timeoutn_acceptedpendingfieldnoflagsScopedGuard >wal_writer_inbox_sizeEVFLAG_NOSIGMASKtarantool_cfg_space_indexev_unloopS_WARNsnap_io_rate_limitio_collect_interval_IO_write_endunsigned intnextlast_stack_framem_errmsgsiginfo_tuint32_terrmsgrecovery_statetarantool_versionpw_namecoro_context_flagsrlist_emptyEVFLAG_NOINOTIFYtarantool_cfg_spaceprimary_port_timerrlim_tsnapshot_pidrecovery_lagtarantool_freereadahead_markerswal_writern_skippedcheck_rdonlyS_CRITrlist_createerrdescsignal_reseterrornew_confsigval_t_ZNK9Exception6errmsgEvprevrlim_max_IO_backup_basewait_lsn__vtbl_ptr_typememcached_expire_full_sweepsig_fatal_cbestimated_rowswriterpw_shellScopedGuardCNF_WRONGINTsnapshotnptrEVBREAK_CANCELoperator()cfg_outlistpw_passwd__RLIMIT_LOCKSsigned charsa_masktitlelogger~Object__sigset_tCNF_OK__RLIM_NLIMITSpanic_on_snap_errorslab_alloc_factorS_DEBUGcookiemutexfio_batcheter_poolsigvalindexGNU C++ 4.7.3_call_addrRLIMIT_COREoverflow_arg_arealong long unsigned intCNF_NOTSETTNT_ERRMSG_MAXconfirmed_lsntbuf_appendslab_alloc_arena__RLIMIT_NPROC_padsi_utimesin_family__sigaction_handler__sighandler_tcharbackgroundev_rt_nowm_line_offsetev_watcherlog_iotbuf_ensurein_port_tCNF_NOMEMORYpw_gidvalue_fileno__pad1requiredcoro__pad4sin_zerosigsetpalloc_poolcfg_filenamepw_dir__gnuc_va_lists_addr_sigsys__gid_tsize_tsa_family_tcurrent_wal_vtable_offsetint64_tsigsS_ERRORCNF_WRONGINDEXpid_tpptrEVBREAK_ALLsi_tidtarantool_uptime_IO_read_basesig_atomic_t_Z18tarantool_lua_freev__RLIMIT_NICE_IO_save_end_next_IO_write_ptrbacklog_posS_INFOS_FATAL9siginfo_tmake_scoped_guard >new_cfgsi_addrwal_dir_ZNK9Exception3logEvRLIMIT_CPU__RLIMIT_OFILEcore_reload_configwatcherargv__rlim64_treplication_portev_signalev_default_destroyev_watcher_listsi_band~ScopedGuard__rlimit_resource_kill_modeaux_cfg__RLIMIT_NLIMITSsignal_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box_IO_markerlog_dirlog_leveltarantool_cfg_iterator_t_IO_read_ptrscoped_guardsa_handlermemcached_spacedatawal_watcher_vptr.Objectsay_levelfp_offsetuint8_tmutex_trylockstatus_ZN6ObjectaSERKS_row_handler_parambind_ipaddrcreate_pid__outrecovery_last_update_tstamptnt_error_codescoredumprlim_curva_list_IO_write_basetarantool_L__pid_t__in_chrglong long intEVFLAG_SIGNALFD_sifields_IO_save_baseinitialize_minimalsin_portsayfdCNF_MISSEDwal_dir_rescan_delaypanic_on_wal_error__PRETTY_FUNCTION__mutex_lockEVFLAG_FORKCHECKWAL_FSYNC_DELAYcore_check_configFunctor__RLIMIT_RSSCNF_RDONLY__confetti_flagsnamesCNF_INTERNALERRORwal_modeoperator=slab_alloc_minimalsizeitemstart_timesin_addrRLIMIT_AS__pad2__pad3_sigpoll__pad5__clock_tlua_StatefiberRLIMIT_FSIZEmemcached_portmain_optmemcached_expire_per_loopsi_coderow_handlerCNF_WRONGTYPEargcguardcfg_filename_fullpathn_ignoredmutex_unlockev_tstampmain_argcactive_archm_filelong doubleEVFLAG_NOENVuint16_twal_fsync_delayExceptionuniquemain_argvthisev_nowkey_fieldcapacityreadercfg_paramnamesnap_dirspacescript_dirlinkrlimit_IO_read_endsigset_treventsrlist_firstlocal_hot_standbyshort intEVFLAG_NOSIGFD__RLIMIT_RTPRIOWAL_MODE_MAXsecondary_portusername~Exceptionpw_gecosopt_defreload_cfgdiffWAL_NONEpriority__new_cfgtypedef __va_list_tag __va_list_tag__aux_cfglogger_nonblockCNF_OPTIONALuint64_t__RLIMIT_SIGPENDINGrlistsi_uidConfettyErrorsig_snapshottarantool_lua_freeshow_cfgboolsockaddr_in__uid_tsi_pidrlist_add_tailstartCNF_SYNTAXERRORsigactionheadstackpoolCNF_WRONGRANGEmutex_createRLIMIT_NOFILEin_cb_locksizetypeadmin_port_sigchldlong unsigned int__sig_atomic_t_old_offset_IO_FILEwaiter__RLIMIT_MSGQUEUEreg_save_areaint32_ttarantool_cfg_space_index_key_fieldsival_intsigno/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tarantool.ccsi_fdqueuein_addrgc_poolsignumtypeunsigned charpid_fileenabled_sbuf__RLIMIT_RTTIMEm_activetimeoutsignal_initsi_statusreplication_sourcepasswdnew_delayold_confsi_sigvalwork_dirfinalizeerrflagssi_errnoaddrerrcode_recordstatecustom_proc_titleEVFLAG_AUTObinary_filename__RLIMIT_MEMLOCKev_looptoo_long_thresholdportssi_signo__off_trlist_delsyntaxcardinalityremotebufend__mptrshort unsigned intsa_flagsmain__valmaster_pid__func___saydoublestack_sizein_addr_ttarantool_cfgsignal_cb_chaininit_storageRLIMIT_STACKm_fun__sigchld_clock_tFILEsi_stimefiber_func_flags2Objectsival_ptr_sigfaultWAL_FSYNC_cur_columnerrstr__off64_t_unused2_IO_buf_baseTIMEOUT_INFINITYload_cfgsi_overrunsa_restorerRLIMIT_DATAGCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <AC R \AC R | AC F !AC \ FAC A ?AC z AC M ;AC v <AC U \AC  |*AC e ;AC v AC  uAC p |AC w cAC ^ zPLRx $$8AC H+  LuAC p ;AC 6 uAC p $AC H  AC  4 AC F T-AC h $<)AC E bAC ] AC V AC VAC Q $AC H $ AC H $4AC G bAC ] ,AC g AC   AC Ew AC I $ AC G `"AC ] ,AC g  4AC o .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.gcc_except_table.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@@!@H!@P!@X! `)0<!&),)p 1) >490! P4 l5gHH! 5 50!05b'xB!\&bdr08D0!r0r hD! 0|0!61D!`Gh"G .-'D :O!GpFV?`l;xB\Q*{;  @ +Wu7 ^|jDzHPHc uX; ` 8 uThk("(,Xb)/`JEV\oU  b !(4O(,y(4  (6Nahu (@@8#2AIT\y (CY dnu. 7C_dK V-)  # ( L c l q                  % - 4 :  ,R u L            / S  X c q }                   $ * 1 9 B I P X d p v          0 B p y    !  !  ! !tarantool.ccev_nowev_loopev_unloopev_default_destroyrlist_createrlist_add_tailrlist_delrlist_firstrlist_empty_ZL12mutex_createP5mutex_ZL18mutex_lock_timeoutP5mutexd_ZL10mutex_lockP5mutex_ZL13mutex_trylockP5mutex_ZL12mutex_unlockP5mutex_ZZL12mutex_unlockP5mutexE19__PRETTY_FUNCTION__tbuf_ensure_ZZ11tbuf_ensureE19__PRETTY_FUNCTION__tbuf_append_ZL10master_pid_ZL8main_opt_ZL4sigs_ZL17core_check_configP13tarantool_cfg_ZL8load_cfgP13tarantool_cfgi_ZL18core_reload_configPK13tarantool_cfgS1__ZZL18core_reload_configPK13tarantool_cfgS1_E8__func___ZZ10reload_cfgENKUlvE_clEv_ZZ10reload_cfgE5mutex_Z17make_scoped_guardIZ10reload_cfgEUlvE_E11ScopedGuardIT_ES2__ZN11ScopedGuardIZ10reload_cfgEUlvE_ED1Ev_ZL10start_time_ZL12sig_snapshotP9ev_signali_ZL9signal_cbP9ev_signali_ZL12sig_fatal_cbi_ZZL12sig_fatal_cbiE5in_cb_ZL11signal_freev_ZL12signal_resetv_ZL11signal_initv_ZZL11signal_initvE8__func___ZZL11signal_initvE19__PRETTY_FUNCTION___ZL10create_pidv_ZL10backgroundv_ZL18initialize_minimalv_ZZ4mainE19__PRETTY_FUNCTION___ZN11ScopedGuardIZ10reload_cfgEUlvE_EC1ERKS0__ZN11ScopedGuardIZ10reload_cfgEUlvE_ED2Ev_ZN11ScopedGuardIZ10reload_cfgEUlvE_EC2ERKS0_ev_rt_nowev_runev_breakev_loop_destroy_GLOBAL_OFFSET_TABLE_fiber_Z19fiber_yield_timeoutd__errno_locationTIMEOUT_INFINITY__assert_fail_Z12fiber_wakeupP5fibertbuf_ensure_resizememcpycfg_filenamecfg_filename_fullpathbinary_filenamecustom_proc_titlemain_argvmain_argccfgsnapshot_pidwal_mode_STRSstrindexout_warningtitle__gxx_personality_v0vsnprintfsnprintfset_proc_title_Unwind_Resumecfg_outtbuf_resetfopen64parse_cfg_file_tarantool_cfgfclosecheck_cfg_tarantool_cfg_Z24replication_check_configP13tarantool_cfgbox_check_configstrcasecmp_sayrecovery_staterecovery_update_moderecovery_update_io_rate_limitev_set_io_collect_intervaldestroy_tarantool_cfgreload_cfgeter_poolpallocinit_tarantool_cfgdup_tarantool_cfgfill_default_tarantool_cfgcmp_tarantool_cfgbox_reload_configswap_tarantool_cfgtarantool_L_Z22tarantool_lua_load_cfgP9lua_StateP13tarantool_cfgshow_cfgtbuf_printftarantool_cfg_iterator_initfreetarantool_cfg_iterator_nexttarantool_versiontarantool_uptimesnapshotforkstrerror_Z14wait_for_childi_Z14fiber_set_nameP5fiberPKcgetppidsayfdclose_all_xcptbox_snapshotsnapshot_saveexit_Z9fiber_newPKcPFvP13__va_list_tagE_Z10fiber_callP5fiberzfdprintftimeprint_backtracememsetsigemptysetsigactionabortev_signal_stopsigfillsetsigprocmaskev_signal_startatexitpthread_atforkfseeko64fgetsstrtolkillfilenoftruncate64getpidfprintfsetsidclose_Z18tarantool_lua_freev_Z19tarantool_lua_closeP9lua_Statetarantool_freerecovery_free_Z9stat_freevgopt_freefree_proc_titleunlink_Z12session_freev_Z10fiber_freevpalloc_freesymbols_free_Z11salloc_initmmd_Z10fiber_initv_Z10coeio_initv_Z12init_storageP6log_ioP9fio_batchmaincrc32_init_Z9stat_initvpalloc_initsymbols_loadinit_set_proc_titleopt_defgopt_sortgoptprintfputs__xpg_basenamegopt_helpgopt_argaccessstderrfwritemallocstrlengetcwdstrcattbuf_newstrcmpchdirgetuidgeteuidgetpwnamsetgidsetuidseteuidgetrlimit64setrlimit64prctlbox_initset_lsnsay_logger_initev_default_loop_Z19replication_preforkv_Z18tarantool_lua_initv_Z14memcached_initPKci_Z11iproto_initPKcii_Z10admin_initPKci_Z16replication_initPKci_Z12session_initv_Z30tarantool_lua_load_init_scriptP9lua_Statepreleaseev_now_update__cxa_end_catch__cxa_begin_catch_ZTI9Exception_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEG'H>IIJpLLM LN`OL @   KPQQy   X PRSh \m] ^aZZZZ Z$     y bcdefUU g*T/ 7gITQ `^hijT  ^,kHlRdmm + m +# m, 8; ^L nq ` w ] x  m n `   x4 oL p^ oo q r s s e e e d d+ u8 v? dF dU df u ^| e e w w Z# xh y z 8 ^ Z Z! {@ ZE |L }Q ZY ~ d _   o    {# Z+EdP gT[nN  x[ [;LD LQX bchyo d[n  x  C\Z fnX  + B X49AdPLeL3QonN  xnN# 0 xFdvnN  x )7SnXNag t xuvLLLLLL L LL$L;LMLY `LrL~LLLL LLLLL,L: ALULch Emr n    x   x PdZd"Zd' /gAnFNOU b xxnN 0 x$<Wn] Yl xn w xnN 0 x !2n9Zd>NGP ] xsx~@@ id '}3};B}QV]UiUqxDDXYZd@Zd Zs-;n@NIO \ xrw|YX D)V:MU _d i sx } r    Q ` # 8  h }$,1 }6; @E J] TjqT T  T n    xZ((Z(7I 8NX_Tt{UTUnN n xU(T/U:AuIPeWea  k xp uuP Zy Znee } x" Z' y5 ZU n\ eg ev  x     !!%! Z-!N!ZDZ!ZDb!~!n!ZD!N!! ! x!Z!!!N!Z""N+"n2"Z7"N@"I" V" xk"nr"Z{" " x"""""n"N"# # x%#,#n3#Z<# K# x_#Z##n#N##  # x###n#N$$  $ x+$O$]$nb$Nk$q$ % ~$ x$$$$o$$o$ $$%%Zl%n$% 0 3% xJ%]%Zi%uv%v}%W%W%Z%%u%v%W%W%Z%W%%Zt%% %%& &&&Z<&Z4&&Z,.&t :&| K&| u&&&}&& &&Z&Z&&}& Z&~&Z&Z&Z&&Z &Z&&Z$'Z'''}$'+'L;'B'nH'Z(Q' n `' xt'nz' { ' x'Z|'Z|'r''T'n'  ' x(2(T(nZ(  `(  o( x((d  : ? ? ?!)) >. ?; ?B ?I ?rg ?n ?u ?| ?O ? ? ?P ? ?8 ?x ? ?? ?[ ?  ?N ? ?  ?3  ?' ?2 ?= ?I ?_W ?u e ? s ?9 ?  ? ? ? ? ?  ?w ?z ? ? ?>% ?84 ?C ?eS ?c ?bs ? ? ?F ?!  ?(  ?[ ?8  ? ? ? ?+ ?9 ? G ?U ?@d ?lk ?? w ? ? ? ?x  ?  ? ?  ?( ?x3 ? @ ?,\ ?Gg ?s ?z~ ?G ?H ?  ? ?X ? ?! ? ? ?X" ?0 ?G ?XU ?c ?Pq ? ?$ ? ? ? ? ?| ?  ? ? ?) ?4 ?Q? ?/ J ?V ?/d ?r ?  ?  ? ? ? ?  ?  ? ?[  ? ?T ?` ?!f ?Y l ?r ?x ?~ ?  ? ?, ?  ? ? ?@ ? ?. ?l ? ?# ? ? ? ?  ?o  ?n ?m ?J! ?6/ ?= ?1K ?VY ?g ?| ?  ? ? ?  ? ? ?  ? ? ? * ?9 ?H ? e ? ?w ? ? ? ? ? ?) ?wC ?I ?& R ?W [ ?rd ?j ? s ?r ? ?# ? ? ?R ?R ? ? ? ? ?q ?$, ?C ?NK ? W ?] ?c ?i ?o ?u ?| ? ?i ? ?S ? ?V ? ?  ?3 ?/A ?*O ?'_ ?r ?- ? ? ? ? ? ?D ? ? ?  ?b: ?F ?U ? y ? ?' ?] ? ? ? ? ?: ?  ?w  ?X ?[ ?h  ?&& ?)@ ?]N ?\ ? j ?x ? ?N ?] ?  ?  ? ? ?* ?<  ? ?  ?! ?- ?J 9 ?E ? _ ??d ?p ? ~ ?}  ?  ? ? ? ?  ?  ? ?  ? ? ?$ ?t ?C ? ?  ?V  ?  ?"& ?5 ?V@ ?L ? Z ?h ?V v ?s  ? ? ?  ? ?Q ? ? ? ? ? ! ?B/ ? = ? K ?f Y ?g ?fu ?R  ?w ?  ? ? ?  ? ?  ?  ?i ? ? ?- ?< ?K ?Z ?\i ? x ?<  ?  ? ?%  ? ?3 ? ? ?f  ?  ?G ?~ , ?; ?ZJ ? f ?\ q ?\ w ?0 ? ?3 ? ? ? ? ? ; ?  ?L  ?  ? ? ?" ?Q ?  ?L 6 ?L Y ?Kw ?@ ?  ?@ ?p ?@ ?  ? M ?h ?l s{ ; ?- ;` ?* ?-D ; ?DO ;  ?Op ;( ?1= ?_CpKS ;] ?k ? z ?@ ;@ ?  ?  ; ? ?fB ; ?  ?B\% ;`B ?L\TQ\ ;r ?<mO ?n = ?k ?L Q{ ;   ? {% ;< ? BJWR ;hpU ?8 @  ?k-I ?k ?W  ;@  ?M.g6? ?8 J Z ?k`hHp ; ?  ?x H ; ?w ?c ;` ; ?6J ?dY ?)h ?w ?  ?  ?X ; ?w ?V ?( ?6 ? D ?JZ ?;dXl t ; ~ ?~ ??h  ?t ?`  ?g   ;# + 4 ?@hI ?X ?g ? ~ ? ? ?4  ?   ;  ?= & / ?= ?` ?rr ?6y K ;@ ? ?8 ?8KV ;  ?(V$ ; + ?6>F ;` PXnv8 ?  ? ;  ?  ?) ;  ?  ? )" E* ; 4 ?K T :\ Ee ?r ` ? E  ; M  ?,  U ;, !@! ?k.! ?D5!U=!E! ; O!aW!o! ?z! ! ?8 ! !q!! ?) !!! ; !!A" ?H"P" X" ;L b" ?9i"t" ?#{" ?T" "L" ; " ?"L"" ; " ? """ ;l " ?" ?""" ; # ?# ?#'#(/# ;,9# ? I# ?VY#a#(j# ? # ?8 # # #K!# ?8#!#)#$k# $$'$(/$(o$ ?y$($($ ;$ ? $ ? $ ?g $ ? $($($ ; % ?g +%(3%);% ;LZ% ?g%[}%Z% ?~%T% ? %U% ?%V% ?%W% ?% ?% ?& ?V #& ? P& ?c& ?p& ?S & ?& ?)& ?)& ?I & ? & ?&D& ?] &X& ? 'Y' ?u 'H$' ?0'P?' ?_L' ? Y'X 9e @`-DOp @B`\Q{W HK ``i  X     :8KXVx H) ZE ) iHUQ xpy  L<E d(((opts.c.o/ 1378727479 1000 1000 100664 5768 ` ELF>`@@cvBh?VgkcIvBhVcfg-getcfg_getcheck-configconfiginit-storageinit_storageverbosebackgroundhelpversion=KEYreturn a value from configuration file described by KEYCheck configuration file for errors=FILEpath to configuration file (default: tarantool.cfg)initialize storage (an empty snapshot file) and exitincrease verbosity level in log messagesredirect input/output streams to a log file and run as daemondisplay this help and exitprint program version and exitint;@(k.#f.#s5#l#a5#h5# 5$  % $ > $ >  I&I : ;  : ; I8 4: ; I?  & /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcgopt.hopts.clong long intunsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/opts.cGNU C 4.7.3goptargsunsigned charcharlong intlong unsigned intopt_defshort unsigned intsigned charlong doubleshort intsizetypeGCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.rela.data.bss.rodata.rela.debug_info.debug_abbrev.rela.debug_aranges.debug_line.debug_str.comment.note.GNU-stack@&@P !Hx,1>9Juh] Xp lx00  |2G \0q@Php2H^h    tHopts.c__compound_literal.0__compound_literal.1__compound_literal.2__compound_literal.3__compound_literal.4__compound_literal.5__compound_literal.6__compound_literal.7__compound_literal.8__compound_literal.9__compound_literal.10__compound_literal.11__compound_literal.12__compound_literal.13__compound_literal.14__compound_literal.15__compound_literal.16opt_def @P$X1p>FQV^h (80@@HP`hPxhp@pH  a   # * C J vQ X _ f m t y m  init.cc.o/ 1378727479 1000 1000 100664 130432 ` ELF>@@30UHH}HEH@]UHHHEE]UH}EUHHHHH ]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HEH@]UHH}HEH@]UHHH}HEH@(HtHEH@(HUHH}uHEUP4]UHHH}HuHEHH}tHUHEHH HEHHEHUHH H}HuHEHHEHHEHHEHEHH}tHUHEHHHu"HEHHttAHHEHIA+HEHHHX[]UHH H}HdHHEEE&}Et8HEHHEHUHEHH>HEH}uUHH H}HEHuHEHttHEHǸHEHtHEHǸHEHdHP4HEHHE@xƒ HEPxHUHEHHHEHHEHEHHMHEHHHUHEHHOUHH0H}HEؾHHEHE@0uHEؾHǸHUHEHHHEH}uHEؾHǸHEHE}~UHMHEHHHUHEHHHE@0EHEHHEHHEP0E9tHEHHEHEHEHHEHEUHMHEHH}t8HUHEHH}uHEHHEHǸEÐUHHH}HEPHEHHUHSHHH}HE0s$HEHPHEHHUJHU HEHPHHJHUHJEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHEHEEEHEHHHEHHEH)HHHHHHHtHtVHHEHEHHHEHEHHHHUHHEHgHHEHHEHHtAHHEHIAHEHHHH[]UHH0H}HEH~HEؾHttHEؾHǸHEHE@xƒHEPxHEHHEHEؾHEHEHHMHEHHHUMHEHǸHE@0tHUHEHHj HEHUHH H}HdHHEHHHtHdHH-HEH HEHEHHEHHEHUHH H}HuHdHHE)HEHHEHEH;Eu0HEHEHUHEHHHEH}uUHH H}HEHtHEH HdHHEHE@0u HEDHdHH9Eu HE)HUHEHH t HEHEHUHEHHUHH0H}HdHHEEHEH~HEؾH HttHEؾHHEEHEH;Et4MHEغHHEHUHEHH#HEHgHHEHHUHH H}HEHtHEHttHEHǸHEHEHEHEHEHEEUHHH}HdHHEHHUHH H}HEHEEHEH}tHUHEHH HEHUHH H}HEHHEHE@xuHEHǸHEHUHHH}HEHtHEHǸUHHH}u}yHEH‹EЃEHEHUHEHHEHUHEHMHEHUHH@H}HuHEHEEUHEȉH HEH@UHcHHHЋHEUHEȉHHEHEHEHE@ t uEEEEU܉)HUHEHщHǸ*UHEȉHHHEHǸEE;EUHH0H}HuHEHEEUHE؉H HEH@UHcHHHЋHEUHE؉HHEHEHEHE@f uEEU)HUHEHщHǸ*UHE؉HHHEоHǸEE;EUHSH(H}HEHHEؾHHEؾHHEHEؾHH}tgHUHEHH~HEv!HEHnHUH< tt}HEHǸeHdHH@(HHEHUHEHHHHEHIAӸH([]UHSH(H}HEHHHEغHHEؾHHEؾHHEHHHHHHHHHHHtHtXgHHEHEؾHHEؾHHEHHHEHHRHHEHHEؾHHEؾHHEؾHH([]UHH H}HEHtHEHǸHEHHEHUHEHHUHH H}HuHUHUHEHHHEHHEHHUHEHHHEHHUHEHHEHUHH H}HEHEEHcHHHHHHHEHEHHufHEHHuPEHxH*HHH H*XHEHHUHEHE}9PHEHUHHHH`HhLpLxt )E)M)U)])e)m)u)}HDž(Dž,0HEH0HPH8DžLVH@tGLHHH)ƋLHH H<H@HL(0s#H8(HЋ((H0HHH0HH@H@JHHHHHHHLHcҹHH)֋LHcH H<HHHH HHHHHHHHHUHH0H}HEؾHǸHEHEH HEHEHHEHPHEؾHǸHEH@Ht'HEؾHǸHEH@HUHHEؾHǸHEH H+HEHEH HEHEH H=XUHSH8H}HuHEоHHLHEIAAHEоHHEH}u=HHUH$IAHEHHEH}uALHEIAAHEHHEtCLHEHUD$$IAAtHEH Hƿ3HEH@HtHEH@HUHLHE@HUHR$IAAH8[]UHH0H}HuH}HEHEHHEH}HE@<u~HEHHHUHEHǸHEHu2LHEIAA"HUHEHH`HEHHEHHEH}UHEH HUHH0H}HEHEHEH}t~HEHHEHEHEHE:HHEH}u"HUHEHHxHEH(HEHUHEHHOHEHHEHEؾH0UHE؉HUHSH(HEH}u HEHEHHHEAAHǸHEAHǸHEHHEHHEHtKHHEHIAӿHEHHEHHEHHEHH HEHHHEHH HEHHHEHH HEHHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHHEHxHEHEHHEHHuHEHttVHHEHHUHH$IA9ӿHEHEHHGHEHHEHHEHHEH([]UHHH}HEHUHSH8H}HuHdHH@(HHEHUHEHѺHǸHEHmHHEHHE}t2HEȾHHUHEHHE}t]HEȺHHHHHHHHtHtJHHEHHEHEHHHEHH{HdH8[]UHH H}HuHEHHUHEHHHEH]HEHE}tUHH0H}HuHUHUHEHHHUHEHHEHEH}teHEHHEH}tHEHEHuHEHHHEHǸHUHEHHHEHUHH H}HEHtHEHuEHE0 v,HUHEHHEHEHEHEUHSHX HHHHHHHEHHHEHHEHtHEHE.HHu>HuH}HMHUHIIHǸHHHEHHUHHEHHHEH}BHHHHHHHHHHu"HHttNHHHIAӿHHHHHHHHHHHHu)HHttDHHHIAHHHHX []UHSH(HH0s0HHPHHHJH HHPHHJHHJHHEHHAHѺHǸHHLHIAAHHEHHtKHHEHIAӿHEHHH([]UHSH(H}HEؾHE}tKHHEغHIAӿH([]UHH H}HEHUHEHHǸHHAUHH H}HuHEHEHUHEHHUHH}HEH](none)boxlua_tointeger64: bad argumentlua_tointeger64: unsupported cdata typelua_tointeger64: unsupported type: %sbox.fiberkv__mode/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/init.cc! lua_isnil(L, -1)memoizecallersf != fiber && child_L != Lfiber.detach(): not attached%sfiber.create(function): bad argumentsfiber.create(function): recursion limit reachedluafiber.resume(): the fiber is deadfiber.resume(): can't resume a detached fiberf->fid == fidfiber.wrap(function, ...): bad argumentsdeadrunningnormalsuspendedfiber.sleep(delay): bad argumentsfiber.cancel(): subject fiber does not permit cancelfiber.testcancel(): bad argumentstostring - %-.*s - %s %-.*s tonumber64: wrong number of arguments__index__metatablebox.errorUNUSEDRESERVED%s;packageplugins: - { name: "%s", version: %d, stat: } .soLoading plugin: %sCan't load plugin %s: %splugin_metaCan't find plugin metadata in plugin %sPlugin %s has api_version: %d but tarantool has: %dPlugin '%s' was loaded, version: %d%s/%sCan't allocate memory for %s plugin dirTARANTOOL_PLUGIN_DIR/usr/local/lib/tarantool/pluginspathcpathrequireffiprintpcalltonumber64Error loading Lua source %.160s...: %sreturn %s%sdofile'''error: '%s' truefalsebox.cfg = {} setmetatable(box.cfg, {}) getmetatable(box.cfg).__index = function(table, index) table[index] = {} setmetatable(table[index], getmetatable(table)) return rawget(table, index) end box.cfg.%s = %s%s%s getmetatable(box.cfg).__newindex = function(table, index) error('Attempt to modify a read-only table') end getmetatable(box.cfg).__index = nil on_reload_configurationon_reload_configuration() hook failed: %sinit.lualoading %sos.execute = nil os.exit = nil os.rename = nil os.tmpname = nil os.remove = nil io = nil require = nil timetime64idname__gcsleepselffindcanceltestcancelcreateresumewrapyieldstatusdetachlbox_fiber_resumelbox_fiber_gclbox_create_weak_tableC.A?#-_ E. MrI@~}}9#' r}}A,=Xp4bu'}} 1/5 #v}} . ~11ClientError9Exception20FiberCancelException6ObjectC C $c &|int 0 1 3 7C w1 zC| C 1(!11 v # # # #f ) +# -# /# 0# 2 @ 6 7# 7#gct 7# 8# 9# :# ;#  <#top =# >#  ?#$ @#(env A#, B#0 C#84|B!88c,F? x_`|#a#b#c#d# e|#(f|#,g|#0h|#4i#8k|#tJ3* ; S # # |p}#lvl~|#L# #S    #   " ## $ r uq  {Ybuf |#n }#sz ~#  %  qpcr  d O  gcr i q#it #  #tp # lo #hi #u64 n !fr u32     # #gct # # # #len #  Z  _ # #gct # # #env #len # # #    # #gct # # j @ !  "# "#gct "# ## $# %# &# k '#uv (# )# *# +#  ,#$ -#% .#& 0#( 1#, 2#0 3#4 4#8 5#< 6  Z  ^a  `P  a# b#!tv _O(  [# [#gct [# \# ]# #v e# f# g ( t~  u# u#gct u# u# u#env u# u# pc u#f v# w~ #   x  z.  {# {#gct {# {# {#env {# {# pc {# |. #>  } "( l !c  !l >  J   val O#key O# # # x   # #gct # # X# # #  # # # #  # 1 $$$$$$$$$$ $ $ $ $ $$$$$$$$$$$%MMS  # u $$$$#$$$%$& = 8  # # # #  #  #  #  # # # # #  #$ #( #, #0 #4  &  # # #  # #gc #  Y#X  #h # # # # # # O# O# O#  # q# q# # # # # # # # # # #'q % O  S3 T# T#gct T# U# V#env W# X#  Y# Z"@ j!gch k3!str l!uv m !th n!pt o !fn pl !cd q!tab r !ud s_ t?(($$$$$$$$$$$$ $ $ $ $   (# 3#sibI# I# # Td,f  kfprk#gpr{#@ # # # # # #{ 1 I*tab*#top># # L#g0# 6# 6#(cb#0 <# L )-$$$$$$$$$$ $ $ $ $ $$$$$$$$$)^N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ # # #  # !# (c$$$$$$$ $ $*DIR ,)r)$$$4 PspP# #ctx$)# %# &8# # $# %# &#()$+xC$$$$$$$$$$ $ $ $ $ $$$$$$$$$$$$$$$$$$$ $!$"$#$$$%$&$'$($)$*$+$,$-$.$/$0$1$2$3$4$5$6$7$8$9$:+)t$$$$$$ - .# /#t MW O#cswQ|# RV# T#(fidV#0sid`#4 bt#8 ct#Hfih#X jv#` k#x ln#bb1W() 0+ ,|# -|# .# /t# 0# 1t# P # q# #  # # # #P[    # "# #q# $q# % #&(u )# -# 5# ;# A# Gq#$ Jq#( Mq#, P,#0 Sq#8 V,#@ Y#H \#P _#X b#` e#h m#p p#x s,# vq# yq# |,# q# q# # ,# ,# # # q# q# ,# # q# q# # q# ,# # u#{ ,$$$-@2 1.1#/B0! 1logG 0' 2#0! 0|-$2 ! .2 #34#36#39 #4'0 1log,10 5/0 510  121 0 0|- 6 2 7!#/"` g 0!8&2 } 0!0|/* 0!!2 9+! 0!!  11:|!;!< 2 : :2 = [!>L >o >v [!? @>!>cts!>id>L@*!>cts!>id>@*!>cts!>ct*@{! ">L{ABcts}!@*B">cts!>id>ABct*C &~"~"Dcts &!Did &>Dsz &3AEcd (~"= ">L >o >v ~"FG"GGhHGF7#GlIxY#g#Jg#h KB#GB#hGB#`tFo##Go#hF#$G#hLyF$MfyF$hK$MfF$hMsiddNW$MLWhMoutW$`$Ne(%MLeXGePOPoutihQx%MLxHMidxx|DORzhS%Parg`RPOPcd~"XL~"(ML}Mid>}G|}OPcts!hPct*`Psz3}Pcd~"XPoPT!&U!HOV!@T "'U)"U"WV5"X!Q'U!U!Ya!U~!Ur!Y!U!~U!Y!U!~U!~Ya!U~!~Ur!~TB"P(Ug"~U]"~UR"~OVr"~Za! /U~!~Ur!~Z"U"~U"~U"~Y#! UN!}UD!~U:!~U0!~Q|%)MLXMvalPOPcd~"hL|V)MLhL|)MLh[)\Lh]`O^) ) )[$~*\L$X\f$F$PO_top+|lO_ptr>P``TF$*\LTh]T|d`ZF$!+\LZX]Z|TO_f_F$h`g|s+\LgXO_fiF$h`o+\LoX\foF$POash[y,\Lyh\fyF$`[A,]h`F$,\LXOaF$h`| -\LXO_fF$ha`^- -  -`|s-\LXOaF$h[/\apbW_LXa|Ta- .__L#|#b .#.0.-.:-b..E.0.9.:?.-bP.W.0.c|.?.J.hv.OdLs-h^h#S.a6F$e._e/HW_e/@/:-  /: `>//\L>XO_fAF$haB`aC|d`N|/\LNXO_fVF$ha^``g|0\LgHO_fiF$hal`ap|\_fidu|X^0 aT0 0['2\apbWa|\_LPa1 1__L#|#bH1`10N11Y1:1bk110N1v1:|11b110N1c1|1J1h1OdLs-h^h#e2_e'2HW_e,2@/ /`|2\LHO_fF$ha`a|\`|2\LXOaF$h`/w3\LX\fF$POaF$hOaF$``|3\LXO_fF$`ah`.|Z4\L.HO_f0F$ha1|dOa8X`H|4\LHXOaL,h`T|4\LTh`[|B5\L[XO_fid]|l_f^F$``k|5\LkXO_fmF$h`{|5\L{hf6\Lh]|d[6\L\outO_top|dO_i|lO_cd~"X_szP_len|La|h[7\LH\out@O_top|hO_i|lO_cd~"`_szX_len|Ta|P`|7\LHO_outX`|U8\LHeA8_e[8XW_e&k8Pg`8:f8U8 /`6|8\L6XOa:hhD9\LDh]D`]E9X9*[Z9\LZXO_i\|lOa]`[o!:\Lo^]o^;Oaq!:^arv~_offt|~_pu~2:h:\outHO_p:hS:a:`Oa:X:t[I;\LH]@O_dlX_p:P[;\LH\dir@O_dh;ha;`OaXN[x<\LHO_top|daXO_ptrhWaPf<O_LPO_s6<XhG=\LGh`T|=\LT\strTO_bufVX_rX|Te=_eb=HW_ed=@/ /`n|$>\LnX]nPOas/ohx>\LxX\outyP\stryHO_r||lO_msg``/?\strXOa`_r,hh?\L\cfg?O_b_keyPa@_i?XOaH![9@\apb_O_LXa9@_J@[@\LHOa|\h@\LXOaF$hf(WA\ctx(X](8PO_L*hiL jcfg*!kDAlmyAA||;m>AAmoF$RAt BlmOAB RP B iu *XB RmB HBa *B aB B*B aB B*B aUC B% UR$ > : ; I$ > &I I I !I/  : ;  : ; I8 <  : ; : ;I8  : ;I8 II: ;I : ;  : ; I8 !I/ : ; @ : ; I : ; I : ;  : ;  : ;  I8  I : ;  : ;! : ;I" : ;# : ;@$( %: ;I& : ;'5I( : ; ) : ;*: ; I+ : ; , : ;- : ; .I8 2 /.? : ; < d0I4 1.? : ; @L M < d2.? L 4 < d3 : ; I8 2 4.? : ; @I< d5.? : ; 2 < d6 : ; 7 I8 4 8.? : ; L < d9.? : ; @I< d: I;< I=.: ; >: ;I?: ;I@.: ;I A B4: ;IC.: ; I D: ; IE4: ; IF.: ; I@B G: ; I H.: ;I@B I.G@dB JI4  K.: ; @B L.: ; I@B M: ; I N.: ; @B O P4: ; I Q.? : ; @I@B R4: ; I S T1X Y U1 V41 W UX1X YY1X YZ1X Y [.: ;@B \: ;I ]: ;I ^4I4  _4: ;I `.: ;I@B a4: ;I b.4 < dc.4 @dB d4I4  e Uf.? : ;@I@B g< h.? : ;@@B i4: ; I?  j4: ; I? < k4: ;I? < l!m4: ; I? < wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw<6  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgtbuf.hev.herrcode.hexception.hrlist.hfiber.hinit.cclj_ctype.hlj_cdata.hlj_obj.hstddef.hstdint.htypes.hstdarg.hlua.hlauxlib.hdirent.hdirent.hcoro.hcoro.hsay.hplugin.h tarantool_box_cfg.h object.htarantool.h Ku|u&.(..v. Y0..uL5Lu/ .(c[gZ2:2)K~J#zJBzXufzlg}JL #%% }ftK g{"+62Y3#Y3[Y.ZZZLKJ5uY/0Ku022uuuK2.KuY2/KK2/.uY3uYLK2Kfu3Y5$YuY<j.Y <Z0(L gȻ»Y'is"WXtXNAq Yuu/u#Y3XtXKYZ01/u/Y2KYgvY!gZ/ =Yk/k=C)$fY$fw" tzYg XzXA^XtXKYZ0/>LY .$/Yv1/u~#Y..Lh/Y .uXtXKKvZ/vZ .JtXKYɟ!Y2Y2=uLY6KYY .KYYY .gYYY5KLu0u0v+m*J6KtX=+x*J .ɻLv0tXKw/7Y t"k< .0ru Y{YYK/ .=4Y/YK5YXZ9dJ .2'-3Gz #J S==Z%YvX 20Ku8[Lu0[A1La@ x\"010ugX> 2uKu/&u/x .2u .&Y$K]Y,,,tXKVXPKx ."hYg[ Xx0ƻYVWxY/ftY3=/YgtfXM516JKu!v . =YtXKZ/y.=.KJtXLD>=="tXKD=C/0x.3A J=gKx /x2/ &panic_on_snap_errornupvaluesMRefctype_ctsGCROOT_BASEMT_NUMeventCTID_A_CCHARreserveduuid_luaCTID_BOOLthresholdcustom_proc_titleClientErrorMM_gcdispatchmodetarantool_lua_error_initlbox_fiber_selfCTOK_UNIONlastlinedefinedmemcached_expire__mptrER_PROC_RETGCRefCTID_COMPLEX_FLOATlbox_fiber_createS_INFOmemcached_portCTOK_IDENTER_UNUSED8S_DEBUGBCLinebind_ipaddrsay_levelCTOK_VOIDtarantool_lua_sandboxCTOK_ANDANDcapacitytbufffidtarantool_lua_initCTOK_ORORuint16_tfiber_statem_errmsgoverflow_arg_areasnap_dirkey_fieldnextmemcached_spacereg_save_areatarantool_lua_setpathS_ERRORCT_HASSIZECTOK_CHARdentvmstatescript_dirlbox_timeMM_ipairsprimary_portvarinfoMM_legc_poolMM_ltrlist_firstCTID_UINT8_ZNK9Exception3logEvGCfuncpanicint32_tluaL_Bufferlast_stack_frameCTOK_INTEGERCT_EXTERNCTOK_SHORTDT_WHTCTID_MAXtype_nameMM__MAXsourceGCROOT_MAXerrcodectype_rawctype_getmcodereplication_portalign1CT_ARRAYS_FATALtotalindexrlistboxlibsweeplbox_fiber_sleepDT_BLKDT_LNKstrnumendptr__confetti_flagstnt_error_codeswal_fsync_delaymiscmapbackloguvheadsetcdataVCTOK_LONGLONGMSize__closureusernameER_RESERVED12DT_CHRGCROOT_BASEMT/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/boxhookmasktype_Z19tarantool_lua_closeP9lua_StateDT_UNKNOWNCTOK_RESTRICTallocdallocfoperator=MM_FASTrlist_addmetatableObjectslab_alloc_factorlbox_checkfiberCT_ENUMcbidboolapi_versionsnap_io_rate_limitctype_child_Z16lua_region_allocPvm__gnuc_va_listinfo_ZNK9Exception6errmsgEvfirstlineunsigned charCTOK_VOLATILEgcrootCTOK_ASMGCtabnumlinetarantool_lua_set_outcurrentwhitefloatshow_plugins_statstepmulrootitypeCTInfoGNU C++ 4.7.3CT_TYPEDEFER_UNSUPPORTEDCT_FUNCjit_basehookcountnamewhatNodestrhashlbox_fiber_findMM____tarantool_luaCTID_CTYPEIDMM_tostringER_RESERVED11uint64_tER_RESERVED13ER_RESERVED14ER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19initGCROOT_IO_OUTPUT_ZNK20FiberCancelException3logEvunused1unused2_Z17show_plugins_statP4tbufestimated_rowserrorlibCT_FIELDstackER_INDEX_TYPEtoo_long_thresholdER_RESERVED20ER_RESERVED21ER_RESERVED22ER_RESERVED23CT_CONSTVALhmaskd_nametarantool_pluginCTOK_LONGm_lineGCROOT_MMNAMEMM_metatablefiberlibMM_pairsDT_DIRER_SPACE_DISABLEDchild_stateEVBREAK_ONEis_stringtarantool_lua_dup_outva_listCT_VOIDER_WAL_IOlbox_tonumber64linktarantool_lua_printstackGCudatamethodsCTOK_PTRSZsizeDONEdummy_ffidnextgcER_NO_SUCH_SPACEsize_tuint8_td_reclenER_FIELD_TYPEunusedtarantool_cfg_iterator_tCTID_INT8tarantool_lua_printstack_yamllbox_pushfiberER_ARG_TYPEtarantool_coroCTOK_ALIGNOFER_TUPLE_NOT_FOUND_Z22tarantool_lua_load_cfgP9lua_StateP13tarantool_cfgpanic_on_wal_errorm_filectype_stateCTOK_UNSIGNEDCTOK_OFSshort_srctnt_errcode_valCTID_UINT16grayagainslab_alloc_minimalsizebcstremptyzsecondary_portloaderMM_concat__vtbl_ptr_typeCTID_P_VOIDlistER_SPLICECTID_DOUBLECTOK_CONSTtarantool_lua_tointeger64lua_Statelocal_hot_standbyCTID_COMPLEX_DOUBLECTID_UINT32CTOK_SIZEOFER_KEY_FIELD_TYPEtarantool_lua_load_init_scriptDT_SOCKvaluefiber_is_callerCTOK_ATTRIBUTECTOK_COMPLEXd_offER_NO_SUCH_FIELDcframeTNT_ERRMSG_MAXCTOK_INLINEtarantool_plugins_initthislbox_pcallresultslotER_EXACT_MATCHTValueER_FIBER_STACK~FiberCancelExceptionsetgcVreadaheaderrstrtarantool_LGCstrEVBREAK_CANCELweakER_SECONDARYpid_fileCTID_UINT64GCROOT_MMNAME_LASTclosedCTStatehookferrflagsnupsCT_NUMlbox_printCTOK_EQCTOK_EXTENSIONslab_alloc_arena_vptr.Objectbox_lua_fiber_run_detachedload_init_scriptspacetarantool_lua_dostringjit_Llbox_fiber_wrapnameCTOK_BOOLint8_tCT_BITFIELDCTOK_FPER_TUPLE_IS_ROER_SPACE_EXISTSudtypeGCupvalsizeidlogger_nonblocksizekgcfiber_namefp_offsetCTOK_TYPEDEFd_typegp_offsetlua_sourceswal_dir_rescan_delayCTOK_GEER_OKsizetypeglobal_Statelbox_fiber_checkstackER_UNUSEDoperator()colotypedef __va_list_tag __va_list_tagshort unsigned intsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/init.cclbox_fiber_statusCTOK_FIRSTSCLtarantool_cfg_space_index_key_field__coro_refsizeknfilenamestatusMM_addCTID_VOIDlbox_fiber_cancel__off64_tregistrytvname_indexER_ILLEGAL_PARAMSCTOK_EOFCTypeIDstateMM_subfinalizerwaiteropenupvalgrayS_CRITbc_cfunc_exttmptv2pathER_NO_SUCH_INDEXGChead3MMSnargftszloggerER_KEY_PART_COUNTmemcached_expire_per_loopdepth__dirstreamfunctarantool_cfgER_MEMORY_ISSUElua_DebugDT_REGadmin_portCTOK_LEER_TUPLE_FOUNDbitsCTOK_STATICCT_ATTRIBpluginsCTID_P_CVOIDtarantool_cfg_space_indexhookcstartSBuflong intfiberCTOK_STRUCTfiber_set_siduvinfouvptr~Objectlinedefinedstack_sizetnt_error_codes_enumDT_FIFOsizeptlua_isfiberdhashcoroCTOK_NEMM_lenintptr_tCTOK_LASTDECLFiberCancelExceptionCTID_P_CCHAR_Z30tarantool_lua_load_init_scriptP9lua_Stateuint32_ttraceuniqueCTID_FLOATuintptr_tgcptr32long doublebox_lua_fiber_push_callerMM_unmCTID_CVOIDMM_powlong unsigned intev_tstampcoredumplua_CFunctionnumparamsimmutableCT_PTRcoro_contextluaL_pushcdatacharCTOK_AUTOenabledstrmaskwal_dirCTID_CCHARGCcdatatarantool_lua_closecurrentlineluaL_pushnumber64MM_indexER_TUPLE_IS_TOO_LONGmaxstackctype_checkstacksizeER_PROC_LUActypeidER_UNKNOWN_UPDATE_OPhashquotelbox_create_weak_tablenodelbox_fiber_namelua_HookMM_calllbox_fiber_yield~ExceptionsizeuvER_NONMASTER8GCRootIDmainthrefbuffertnt_error_codes_enum_MAXS_WARNlbox_fiber_metaev_rt_nowi_citarantool_lua_tostringreplication_sourceCTOK_EXTERNmemcached_expire_full_sweepBCInsestimateCTOK_DECLSPECnilnodetarantool_load_plugintopidwork_dirsweepstrMM_mode_ZN6ObjectaSERKS_box_lua_fiber_get_callerCTOK_REGISTERwhatCT_STRUCTptr32CTypeID1CTID_INT16doubledirentbox_lua_fiber_clear_coro_Z25tarantool_lua_tointeger64P9lua_StateicardinalityargsCTID_NONEGCobjCTOK_LASTDECLFLAGlbox_fiber_gcCTOK_CCDECLlbox_time64GCROOT_IO_INPUTdatalua_region_allocsizetabbox_lua_fiber_get_coropalloc_poolwrapfheadCTID_INT32itemCT_KWGCfuncCbc_cfunc_intrlist_nextGCfuncLvmevmaskCTOK_DEREFCTOK_SHLExceptionCTOK_SHRbaseplugin_stat_cbmmudatacleanup_sayER_UNUSED27FrameLinklbox_fiber_idCTOK_STRINGlineinfolbox_fiber_resumeMM_newtmpbufER_INJECTIONlong long unsigned intchunknamenargstarantool_lua_register_typepluginlua_NumberCTID_INT64ER_UNUSED35dividererrcode_recordpool_Z13tarantool_luaP9lua_StateP4tbufPKcnommupvaluegclist__ino64_terrmsgfiberlib_nametarantool_lua_load_cfgGCRootIDER_UNUSED24ER_UNUSED25arrayER_UNUSED28ER_UNUSED29GCprotomarkedFPRCBArgluaL_RegYIELDER_UNUSED30ER_UNUSED31ER_UNUSED32ER_UNUSED33ER_UNUSED34asizeER_UNUSED36ER_UNUSED37debtio_collect_interval_Z18tarantool_lua_initvMM_modlbox_fiber_testcancellbox_fiber_detachlua_Alloclong long intER_UNUSED46errdescCTOK_FIRSTDECLframesizechop_Z22tarantool_lua_tostringP9lua_Stateicallerloaded_pluginsfreetopglrefDETACH9FrameLinkchild_Ltarantool_cfg_spaceGCStateboxlib_nameCTypeCTSizeMM_divtbuf_strEVBREAK_ALLbox_lua_fiber_runstremptyER_NO_SUCH_PROCCTOK_INTlog_levelwal_mode__FUNCTION__CTOK_ENUMpauseMM_newindexlj_cdata_newdelayversioncoro_reftarantool_lua_dofileplugin_init_cbwal_writer_inbox_sizetmptvunsigned intCTOK_SIGNED_Z17luaL_pushnumber64P9lua_StatemMAX_STACK_DEPTHshort intchildfieldnoargetarantool_plugins_dirprevrows_per_wald_inoMM_eq_Z27tarantool_lua_register_typeP9lua_StatePKcPK8luaL_Regev_nowCCallbackstatMM_mulflagsCT_MAYCONVERTf_dataGCC: (Debian 4.7.3-4) 4.7.3zRx AC M <AC Q \/AC j |AC M GAC B AC M AC M 2AC m AC R <WAC R \oAC j zPLRx  $AC   HAC  @AC { 6AC q $nAC i DAC  dAC  ,AC g AC  ]AC X `AC [ BAC } $AC  DAC ~ dAC  AC  )AC d $LAC E AC {  'AC " ,AC  L)AC d $AC E  AC  AC  tAC o AC  AC  4AC  T-AC h t]AC X XAC S CAC ~ AC  )AC $ AC   4/AC E% $\AC ER bAC ] AC  AC   h7AC 2 AC   $AC E  AC   lAC   AC E AC U $XeAC E[ rAC m AC  8AC  $AC H $AC Hz  yAC Eo HAC C -AC h .symtab.strtab.shstrtab.rela.text.rela.data.bss.text._ZNK9Exception6errmsgEv.rela.rodata.rela.gcc_except_table.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS20FiberCancelException.rela.rodata._ZTI20FiberCancelException.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@1gH1P1X1`1h1p1x11 671 +70&Kx1 1767Y7 TPL`1fAfaO1xC CpPH18C PCPH1pC CQH1/CHCCHQ01aC C\xQk1 mʆ,{`31#v@`H1%@1'F 01)00 h1.2e _      (// WG9 E P 2g    W bo  67 nS (f U  # , . ~ ]L `z ; B }  =   I Y k )  4 ' 0p b z)    lt7 Y y t - D] X C" )V  / @ \ !b "`  #7; &d ( )0@ 9.e  /r3 0D v4j 5y "#%')+-., "  ! . < G  S  }            " 3 G  q@i x            $ : @ P ] u           ' 5 : !I !d z        ! . ? O  <v     !  !    %7>FLT\ejt} m*9`, .OYg 0 s1$2N^ov v6H 6-!! !!-!9init.cctbuf_strev_now_ZL15tnt_errcode_valjrlist_addrlist_firstrlist_next_ZL10fiber_nameP5fiber_ZL13fiber_set_sidP5fiberj_ZL14loaded_plugins_ZL11lua_sources_ZL21tarantool_lua_set_outP9lua_StatePK4tbuf_ZL21tarantool_lua_dup_outP9lua_StateS0__ZL14luaL_pushcdataP9lua_Stateji_ZL9lbox_timeP9lua_State_ZL11lbox_time64P9lua_State_ZL13fiberlib_name_ZL22lbox_create_weak_tableP9lua_StatePKc_ZZL22lbox_create_weak_tableP9lua_StatePKcE12__FUNCTION___ZL14lbox_pushfiberP9lua_StateP5fiber_ZL15lbox_checkfiberP9lua_Statei_ZL11lua_isfiberP9lua_Statei_ZL13lbox_fiber_idP9lua_State_ZL22box_lua_fiber_get_coroP9lua_StateP5fiber_ZL24box_lua_fiber_clear_coroP9lua_StateP5fiber_ZL25box_lua_fiber_push_callerP9lua_State_ZL24box_lua_fiber_get_callerP9lua_State_ZL13lbox_fiber_gcP9lua_State_ZZL13lbox_fiber_gcP9lua_StateE12__FUNCTION___ZL17lbox_fiber_detachP9lua_State_ZZL17box_lua_fiber_runP13__va_list_tagENKUlvE_clEv_ZL17box_lua_fiber_runP13__va_list_tag_ZL21lbox_fiber_checkstackP9lua_State_ZL17lbox_fiber_createP9lua_State_ZL17lbox_fiber_resumeP9lua_State_ZZL17lbox_fiber_resumeP9lua_StateE12__FUNCTION___ZZL26box_lua_fiber_run_detachedP13__va_list_tagENKUlvE_clEv_ZL26box_lua_fiber_run_detachedP13__va_list_tag_ZL15lbox_fiber_wrapP9lua_State_ZL16lbox_fiber_yieldP9lua_State_ZL15fiber_is_callerP9lua_StateP5fiber_ZL17lbox_fiber_statusP9lua_State_ZL15lbox_fiber_nameP9lua_State_ZL16lbox_fiber_sleepP9lua_State_ZL15lbox_fiber_selfP9lua_State_ZL15lbox_fiber_findP9lua_State_ZL17lbox_fiber_cancelP9lua_State_ZL21lbox_fiber_testcancelP9lua_State_ZL29tarantool_lua_printstack_yamlP9lua_StateP4tbuf_ZL24tarantool_lua_printstackP9lua_StateP4tbuf_ZL10lbox_printP9lua_State_ZL10lbox_pcallP9lua_State_ZL15lbox_tonumber64P9lua_State_ZL24tarantool_lua_error_initP9lua_State_ZL8errorlib_ZL21tarantool_lua_setpathP9lua_StatePKcz_ZL21tarantool_load_pluginP9lua_StatePKc_ZL21tarantool_plugins_dirP9lua_StatePKc_ZL22tarantool_plugins_initP9lua_State_ZL6boxlib_ZL8fiberlib_ZL15lbox_fiber_meta_ZL22tarantool_lua_dostringP9lua_StatePKc_ZL20tarantool_lua_dofileP9lua_StatePKc_ZL9is_stringPKc_ZL16load_init_scriptP13__va_list_tag_ZL21tarantool_lua_sandboxP9lua_Stateev_rt_nowtnt_error_codes_ZNK9Exception6errmsgEvpalloc_nametarantool_Luuid_lualua_pushthreadlua_pushlightuserdatalua_pushnillua_settablelua_gettablelua_topointerlua_settopboxlib_name_Z25tarantool_lua_tointeger64P9lua_Statei__gxx_personality_v0lua_typelua_tonumberluaL_checklstring__errno_locationstrtoullluaL_errorlua_gettoplua_typename_Unwind_Resumelj_ctype_infolj_mem_newgcolj_cconv_ct_initlj_state_growstack1_Z17luaL_pushnumber64P9lua_Statemlua_pushnumberlua_createtablelua_pushstringlua_setfieldlua_setmetatablelua_getfieldassert_faillua_newuserdatalua_replaceluaL_checkudatalua_getmetatablelua_equallua_touserdata_GLOBAL_OFFSET_TABLE_fiberlua_pushintegerlua_tothread_Z12fiber_cancelP5fiber_Z14fiber_yield_toP5fiberluaL_unref_Z16fiber_testcancelv_Z20fiber_setcancellablebluaL_reflua_calllua_pushbooleanlua_insert__cxa_end_catch__cxa_begin_catch__cxa_rethrowlua_tolstring_say_ZTI9Exception_ZTI20FiberCancelException_Z16fiber_checkstackv_Z9fiber_newPKcPFvP13__va_list_tagElua_newthreadlua_xmovelua_tointeger_Z12fiber_wakeupP5fiber_Z10fiber_callP5fiberz_Z11fiber_yieldv_Z14fiber_set_nameP5fiberPKclua_isnumber_Z11fiber_sleepd_Z10fiber_findj_Z22tarantool_lua_tostringP9lua_Stateilua_pushvaluestrlentbuf_printftbuf_new_ZTI11ClientError_Z27tarantool_lua_register_typeP9lua_StatePKcPK8luaL_RegluaL_newmetatableluaL_registerstrstrsnprintf_Z17show_plugins_statP4tbufdlopendlerrordlsymdlcloseopendirasprintffreereaddir64closedirgetenvstrdupstrchr_Z18tarantool_lua_initvluaL_newstateluaL_openlibscfglua_pcallexitlua_pushcclosure_Z24tarantool_lua_cjson_initP9lua_State_Z23tarantool_lua_info_initP9lua_State_Z23tarantool_lua_slab_initP9lua_State_Z23tarantool_lua_stat_initP9lua_State_Z22tarantool_lua_ipc_initP9lua_State_Z25tarantool_lua_socket_initP9lua_State_Z26tarantool_lua_session_initP9lua_StateluaL_loadstring_Z12mod_lua_initP9lua_State_Z19tarantool_lua_closeP9lua_Statelua_closelua_toboolean_Z13tarantool_luaP9lua_StateP4tbufPKcluaL_gsubstrcmpstrtod_Z22tarantool_lua_load_cfgP9lua_StateP13tarantool_cfgluaL_buffinittarantool_cfg_iterator_initluaL_addstringlua_pushfstringluaL_addvaluetarantool_cfg_iterator_nextluaL_pushresultbox_lua_load_cfgaccess_Z30tarantool_lua_load_init_scriptP9lua_State_Z16lua_region_allocPvm_ZTS11ClientError_ZTVN10__cxxabiv120__si_class_type_infoE_ZTS9Exception_ZTI6Object_ZTS20FiberCancelException_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEeI fh #k=lKm\nzkopquv7 L wxyx z{N 0[zzu| Xz}~]k}   % Jw  u    6$GS{_ l}uq louq l 5 $F W h n{ l o  q $   $$ B \ t q {   l o 1 qZ lf mw n $   u q k  l& n7 qL $] f s  k o  q  % * / N h  ! z   #-4?iZkk{!.>Noziqgi<IZqk|i > (}AH{u H z" p/z4 9 >Iln  z@ MzY{{ p    q{2]p^{t!2qHYox > }{u  z  !DYh{}m !DPZf{{- 96H >i Fs M{ {-wDi{ Xzv &]jm z { ,z1Y{o |{uHX  {1uq  >&k7oHp]q   >$ U {k |   {  }  }  } !q!!g1!6!C!L!T!e!qv!!!!{! !z!s!!"2";" &H"["d" .q"""q" ` " :"" f" D"# K#L#a##q_$ Ti$$ X$%%O% >Y%m%q%%%q%}% `%% & j'&=& J&d& q&& & &&& & '*'/'@' O' i' q''' ' ''' ' ( E(`( 8o( (( \()) h*) X)g)))}){) )))*N* g*qw***\* * * * * * * + + +-+=+S+\+ >k+ ++ +++m+ ++r+ ++q+$, ,",q),$2, =,K, S,\, i,w, @ ,, ,, !,, ,,,,,, --)- D-c-~--- - --.q3.M.].q. v. '...q..//}/$/}:/C/K/[/gm/w//// ,///v00 0 30 600 800q1 E11 J1T1111 P11 61 2)2 62E2Q2n22 0222223)323 >A3 W3k3qz33 33 33o3u3 4&4/4 >4 ^4qh4}4\4 5 \5)5=5M5 \5 555 >5 55q5}6 '6=6F6 >U6 k66 v46 666i6j  ( ~   ~     t & ~  +D 0 7 B I  P   U   [( 0  8 @  bH Y d h @ D  S X X X V`- W4 Xq9 X F XM X+T XY Xf Xm X@r X X X3 X X Xw X Xg X X Xh XS X X X2 X> X/L XZ Xh XAw Xn  X X  X X X X X  X  X  XH X ' X6 XE XT Xzr X XV X& X  X X X!" XS/ X4 X@ XM X?\ Xk Xz X Xy X X  X X X)  X X\+ XX7 XE XT X X X X  X X X X X X X XI Xp& XlZ Xlh Xq Xw X X'  XP X' [ Xw g X u XH XR X$  X% Xw  X  X  XH  X XC XuQ X` X k Xx X  XH X X X@ X  XH X  X\ Xl ( XR Xa Xp X X X X X  X) Xe X X X X@ X2 XsA X,b X q XH X X& X X X" X XH X' XE Xo X X" XB X XH X X X X? XBK Xm Xy X X, X X X_ X XH X X' X"6 XE XuT XGc Xr X X_ Xm X X X X X X  X X X Xe X X X X X X X X XM X X  X Xq% X++ XcB XK XQ X W X] X-c Xi Xo Xv X X X Xn X X X  X X X X X0% XO 4 X C XR Xa Xp XO X X Xq X Xj X XR XK X Xf  X30 Xs @ XP X` XJp X X X XI Xc X Xa X  X X  X  X*0 X<@ XyP X` X p XO Xq Xf X  XH X  X X$ Xu4 Xf@ Xr Xr X  X X0 X X Xv  X Xm X X X(  XM X X XB" X) X4 X? XJ XU Xa X o X  X, X X XO X X XV  X/ X> XM X\ X  X X  X X XS X%M X a Xhg Xm Xs Xdy Xz XD  X X XC  X  X)  X^ X  X X  X X  X  X: X< XE X@ X^ X  XR X  X5 X X! X( X / X6 X= XZD X^K XqR XSY X` Xg Xxn XLu X| X Xt XL X  X X  X  XA X= X  X X! X XX X X XV X  XX X X  X X Xu$ X5 + X 2 XM9 XN@ XxG XO X \ Xj X x X  X( X X2 X X X  X X X  Xr  XW X X X}  XB # X* X75 X7W X q XV X X} Xd  XE X  X  X Xb X X X  X X\ X  X X] X X# XY) X/ Xp5 X~; XA XG XM XS XY X}_ Xe Xk Xq X w X} X.  X X( X4 Xg Xs X X X Xi X X XA  X~  X  X{  X  X X X  X9 X X X  X< X X$  XU% X + X1 X7 X = XD XP XV Xe\ X5b Xh X<n Xhu X Xs X, Xz X$ X X X  X, X: XH Xu X X X X X X X X  X  X\& X"4 XPB X Q X\\ XGh X"v X  X X" XG X X" Xb XW X5 X X" X/ X"= XK X Y Xwg Xu X X XU X XY  X X X Xr X X  X| X+ X: X[I XZ X Xg Xxv X X_ XC XE X X  X X}  Xj Xx  XC X1* X9 XH X-W Xf X\ X+  X+  X X  Xa X X' X' X X= 2 XgL X [ Xj Xz X X X Xg Xg X~3 XC X#Q Xi X X XY X ! X $! XS O! Xb! X! X! X! X# " XC" X" Xj" X """ T" X" X""(" T`# X3 #(#W# T)# X<#D#L# T Z# X m# Xks#W{## T# X# X# X### T# X# X7### T@$ X$ X $($0$ TM$ XS$[$ c$ T$ Xm$ $b$ T`$ XX $b$$ T$ X%r%*% X 0% X-8%@%H% T l%t%}% X %x%% XX%%m% XD%%q% T& X,&4&o&&(&&&(&& V&('I*'=2'@V'_^''v'''''d ((d)(J1(PU(](((( X( X(q(( T))&) X0)8)@) T@W) Xa)i)Uq) T) X0)U)#) T) X)e)!) Xh) * Xl *#* * T`<*3D* \*d* * X* * * T* X* X* *~ * T * Xr+ +| "+ X-+~ 5+ =+ TT+ \+ t+ X+ +; + T+ +9 + X+ X+; +} + T@, X,} ,= (, T2, XB, XM,= U, ], T t,I |, , X, X, ,Y , T` , ,W , X, Xh- - X+-Y 3- ;- T R-e Z- c- Xy- X!--4- T - V@- X- X- XX. X]. e.m. T }. X. .. X..%. X. Vp. V'/ X~2/4:/B/ T Y/@a/w/ X0/ X/ X/ X*/// T@ /// X/ X 00y0 T 1090wO0 X^0 X*|0 Xh0 p 0 X6 0 X0000 T 0 V0 X1 X/1 X1 X1z11 T` 1 X111 X1 V2 V@22 X=2E2M2 T d2l22 X2 X2 Xm22l2 T 2'2T2 X2 X 3l 33 T 53|=3F3 XJU3]3f3 Xx3 X<333 T 333 X3 XL33t3 T@ 44r)4 X84@4OI4 X[4 Xf4tn4v4 T444 X4 X44D4 T4 X4D44 T`5P5C5 XN5V5^5 Tu5}55 X55<5 T 5 X5 Xk5<55 T5 X6 XN 66&6 TN6V6n6v6666 Xf6 X 666 T@7  787@7V7C^77 Xf7 X 77@ 7 T779 7 X 8@ 8!8 T+8 VpB8 VV8 Xq8 X |8!8!8 T`8!8!8 X 8 X08 X8!8"8 T8 Xg9 X "9 X)9"19#99 T P9"X9{#n9"v9h#9 X9 XO9#9%9 T9 X 9#9%9 XP9 Xc4: X;: X?:%G:&O: Th:%p:&:%:&: X:u&:&: X: Xn:&:(: T@ ; XL;&$;(J; X]Q;(Y;)a; T;(;); X;(;_); XP; X ;);m*; T<)<k*2< X2A<)I<I*a< Vf< Xuz< X< X<m*<.< T`<v*<.<%-<-< X< X<.<9.= T= Xb'=9./=/7= T _=J.g=/= V= V0= X=/=0= T= X>/ >0> X &> X2-> X1>09>0A> Tv>$0~>0>d0>0> XN >0>s1> T@>0>q1> X? X"? X &?s1.?v46? T`?1h?b4? Xz ?1?X2? X*? XK?v4?5? T @4@5(@ XPK@ XR@5Z@v6b@ T`y@ 6@o6@ X @ XS @ XI@v6@6@ T@6@6@ X @ X@ XA6A6A T )A X 8A6@A6XA Xk eAi{A XA X3A XA XzA XAB X[B X9*B3B X@BrYB XeB sB XB(B XB B X B B XDB ` (0<D`ht|''(()),,VVW (4<HP\dWXX[[$@HT\hp|(0 < D ` h t |aabbccff (4<HP\dppqqrruu$@HT\hp|TTUUVVY(Y0"<"D#`#h$t$|''            ( 4 < H P} \} d~ ~             : : $; @; H< T< \? h? p| || } } ~ ~   < < = =  >  >  A ( A 0  <  D  `  h  t  |   X X Y Y Z Z ] ]     ( 4 < H P 3\ 3d 4         4 5 5 8 8  $ @ H T \ h p |        x x y    ( 0 < D ` zh {t {| ~ ~            ( 4 < H P k\ kd l l m m p p       $@HT\hps|sttuuxx(0C<CDD`DhEtE|HH (4<HP;\;d<<==@@$@HT\hp|? ? @ @ A A D (D 0!<!D!`!h!t!|!!!!!!!!""""" "("4"<"H"P#\#d######%%%%%%%%&&$&@&H&T&\&h&p(|((((((()))))))()0l*<l*Dm*`m*hn*tn*|q*q*.... . .#.#.8.8.9. 9.(:.4:.<=.H=.P/\/d//////0000000000$0@0H0T0\0h0pr1|r1s1s1t1t1w1w1u4u4v4v4w4w4z4(z405<5D5`5h5t5|66u6u6v6v6w6w6z6z6666 6(646<6H6P6\6d6 R (I_ (@"H%P-X,p-x=k=ME (@HPXp x  ?!  ?!P!)*!*G*//6/G/0/86/@G/H/`h6px  @`(W @ `b t  q(HUh#  ~  ; (} H= h Y   $40Pzpy ll8tXxD<8\@ e !!"# %(&L(U p)m*.9. /0<0\s1e Hv4 W5v66say.cc.o/ 1378727479 1000 1000 100664 23904 ` ELF>`,@@UHHHEE]UHHH}HEH@(HtHEH@(HUH}}w7EHF(E!CWI D_]UHATSHH/bin/shHEfE-cEHDžHDžHDžHDžHEHHEHHHHEHHHHH HH HH Hƿt4HAHaHEHt9HAHdnE}u9HAHj'}ucH HƿEEHHUHHHHEHEHUH HH HƿEEEEE tkRHL%MAHӿHH[A\]UHATSH}HuUHxLpLhHEHEHHHǸHHhHpHHHxt HHxHǸHHƿ HEHE+HE O g 8intiibbii bKb  #8+ %+ xj z# {# (   M# M# # # f 0? 3M )3  b# # # # #  #( #0 #8 #@ #H #P #X D#` J#h b#p b#t p#x F# T# P# `# &{# /# 0# 1# 2# 3-# 5b# 7f#  8 8# ># b#33`vtm8 b# b# b# b# b# b# b# b# b# i#( #0'rJ\xspx# #ctx$Q# %# &-# # $# %# &#) -% .%# /%# M O#cswQb# R~# T#(fidV#0sid`#4 b#8 c#Hfi#X j#` k#x l#+ ? ?# # #  ?# # # #?J   ?# "# ## $# %#&(d )?# -# 5# ;# A# G#$ J#( M#, P'#0 S#8 V'#@ Y#H \#P _#X b#` e#h m#p p#x s'# v# y# |'# # # # '# '# # # # # '# # # # # # '# # d #j Gy fy h+< *D1+)y&)o ,cfg*(3n ).% : ; I$ > $ > I!I/   I &I  : ; @ : ; I8  : ;   : ; (  : ;I8 : ;  : ;  : ; : ; : ;I8  : ; I8  : ; < I : ; .: ;I@B .: ; I@B : ; I .: ; I@B : ; I .? : ; @B ! : ; " #4: ; I $4: ; I %!I/&.: ; @B '(4: ; I?  )4: ; I? < *4: ;I? < +!,4: ; I? < wwvwwwGvGHwHIwILwLvwwwvwwwvwwwvw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgev.hfiber.hsay.ccstddef.htypes.htypes.htime.hsigset.hselect.hstdarg.hstdint.hlibio.hcoro.hcoro.herrcode.hrlist.htarantool_box_cfg.h stdio.htarantool.hsay.h Ku| YA.u0vvvvvvZ2?ןP>#4Y9g9g "&咮ug0>9$-=[ZX1;elfgHJEE׻^+)0'-5òS_INFOshort int_IO_read_ptr_chaintm_hourtm_ydaywal_dir_rescan_delaysize_tsnap_dir_shortbuflogger_nonblockgp_offsetprevva_listtarantool_cfgtype_IO_buf_basetarantool_cfg_space_indexev_tstamptm_zonelog_levelpanic_on_snap_errormemcached_expire_per_loopEVBREAK_ALLsayfderrdescfieldnonextreg_save_areabinary_filenameerrsvslab_alloc_arenamemcached_expire_full_sweepsigned char__sigset_tio_collect_intervallong long unsigned int_filenomemcached_expireS_ERROR_IO_read_endstatelong inttarantool_cfg_space_index_key_field_flagsgc_poolenvp_cur_columnS_DEBUGfp_offset_saydoublescript_dirbind_ipaddr_old_offset_offsetrows_per_walsay_logger_initlinewal_writer_inbox_sizemasktm_monuniquememcached_spacestderrlong long intpanic_on_wal_error_IO_markerpid_filetm_yearunsigned intsay_level_IO_write_base__valS_CRIToverflow_arg_areatimespecpipefdS_FATALcoredumptypedef __va_list_tag __va_list_tagtimeout_IO_write_ptrusername_sbufprimary_portlevelshort unsigned intS_WARNspacetm_isdstGNU C++ 4.7.3_IO_save_basecustom_proc_titlebool_lock_flags2_modewal_fsync_delaywal_mode/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/boxcardinalityTNT_ERRMSG_MAXtv_nsecsizetypelong double_IO_write_endfilenamesigset_t__syscall_slong_t__gnuc_va_listreplication_sourcenonblock__off64_t_IO_lock_t_IO_FILEtarantool_cfg_space__off_ttime_tlocal_hot_standby_poserrortv_secEVBREAK_ONE_markerslevel_to_charev_rt_nowfiberint32_tunsigned charEVBREAK_CANCEL_IO_buf_endtarantool_coro__pid_tslab_alloc_minimalev_nowbacklog_vtable_offset__time_tstacksayfformatlast_stack_frametm_gmtoffadmin_port/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/say.cccorowaiterenabled10__sigset_tlong unsigned intcharwal_dirsecondary_portindexwork_dirtoo_long_thresholdtm_mintm_wdaytnt_error_codes_nextreadahead_IO_read_basef_data_IO_save_endlinktm_mday__pad1__pad2__pad3__pad4__pad5argslogger_unused2tm_secbootingerrflagserrstrpalloc_poolrlistuint8_t_IO_backup_basereplication_portflagsstack_sizeslab_alloc_factor__confetti_flagspid_tsnap_io_rate_limitcoro_contextargverrcode_recordmemcached_portuint32_testimated_rowskey_fieldlogger_pidfiber_namevsayGCC: (Debian 4.7.3-4) 4.7.3zRx AC Q <2AC m \KAC F zPLRx $$HAC J9 $LAC J $tAC  .symtab.strtab.shstrtab.rela.text.rela.data.bss.rela.rodata.gcc_except_table.tbss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @:H + &C1 ; 6CC 4U* `* [D lYz@F0(\0vX\0I! 0Q*n*p*p\+2 82&;HKO     ]gsyH ")6FL[`pxsay.ccev_now_ZL10fiber_nameP5fiber_ZL4sayfiPKciS0_S0_z_ZL13level_to_chari_ZZ4vsayE3bufev_rt_nowpalloc_namesayfdlogger_pidbooting_saysay_logger_init__gxx_personality_v0cfgstderrsetvbufsigemptysetsigaddsetsigprocmask__errno_locationstrerrorpipeforkclosedup2setpgidexecvesigtimedwait_Z9sio_setfliii_exit_Unwind_Resumevsaybinary_filenamefprintfvfprintffputcev_now_updatelocaltime_r_GLOBAL_OFFSET_TABLE_strftimesnprintffibergetpidvsnprintfwrite;B \ l1 8lP!d"}#$% 8 H&$%  H'$$-%3 @ Hp#z()*+, #(")1):CKUev-l$%  H./*116 C2Jc3t 2456/ C H8  9::;  9G a k9  9 <6 M W9  =/.$<(0$/bip w(~0    }!) . J; B I P 2W ^ l q | U -  f          X, 7 B wN \ m  *  t R e 6  %  ?   ^! ' - J4 j@ *N \ j x I     + -      V+ : >J WZ Zj Pz       ^  _  } *   ^ %   * e -    * a8 > D M R ]   o T    !     ~ 1, 8 T b 1    N     q# )1 @ K W qe s    s q    < s  q, : H sV d r =  Z 5 _ B Q % h !  d ) O8 G V e t t d 5    - K 9   ( 7 kF 9U q H|      H `  H         L, 2 |; C L v   9 E I      & 5 D S b z     u   ( 7 F U d zt -|  T     \    2 m? Y fq Kv D  @`H    %assoc.cc.o/ 1378727479 1000 1000 100664 38232 ` ELF> Y@@UHH H}H}t HEHHu6HEHHEHEx$HEHHPHEHHEHEHx{m L % $ > $ > : ; I  I&I : ;  : ; I8 : ; I8 .: ; I@B  : ; I 4I4  4: ; I I!I/ .: ; I@B : ; I 4: ;I .: ;@B : ;I .? : ;@@B 4: ;I .? : ;@I@B : ;I !4: ; I? < I 4: ; I ww6v67w78w8;w;dvdewefwfiwiivijwjkwknwn<v<=w=>w>AwA`v`awabwbewevwwwvwww\v\]w]^w^awavwwwX vX Y wY Z wZ ] w] > v> ? w? @ w@ C wC v w w w v w w w v w w w vwwwvwwwvwwwjvjkwklwlowo v wwwVvVWwWXwX[w[ v  w  w wvwwwWvWXwXYwY\w\vwwwvwww+v+,w,-w-0w0ZvZ[w[\w\_w_lvlmwmnwnqwqvwwwvwwwvwwwvwwwvwww v w w w n"vn"o"wo"p"wp"s"ws""v""w," /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/includepickle.hmhash.hassoc.hstdint.herrcode.hsay.h 4t!"!*!@!u9!uL.g=.M=2Z5y XtM=YJv;g/2T>=t=6I5Mt/KYK/2/g'DK2gD23[6(0G*x JJuyYL0$f<uܯugD׻u'v0Y3/S}.g=.M%=2Z5y XtM%=YJv;g/2T>=t=6I5Mt/KYK/2/g'DK2gD23[6(0G*x JJuyYL0$f<uܯugD׻u'v0Y3/S|.Y ..g=.MY=2*tXKZ5y XtMY=Y/Jv;gY2*tXKT>=t=6I5Mt/KYK/2/g'DK2gD23[6(0G*x JJuyYL0$f<uܯugD׻u'v0Y3/Smh_i64ptr_resize_Z22mh_i64ptr_start_resizeP11mh_i64ptr_tjjPvmh_i64ptr_node_tmh_lstrptr_start_resizemh_i32ptr_newload_varint32_Z16mh_i64ptr_resizeP11mh_i64ptr_tPvshort intmh_lstrptr_newmh_lstrptr_next_slotsizetypelstrcmpmh_i32ptr_node_tmh_i64ptr_getmh_i32ptr_del_Z22mh_i32ptr_start_resizeP11mh_i32ptr_tjjPvmh_i32ptr_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/assoc.cc_Z16mh_i32ptr_resizeP11mh_i32ptr_tPvprimemh_lstrptr_delsave_i_Z17mh_lstrptr_deleteP12mh_lstrptr_tmh_i32ptr_reserveuint8_tshadowmh_i32ptr_start_resizeerrstrn_bucketsmh_i64ptr_tfloat_Z20mh_i64ptr_del_resizeP11mh_i64ptr_tjPvunsigned interrdesclong long intresize_positionerrcode_recordmh_i64ptr_new_Z15mh_i64ptr_clearP11mh_i64ptr_tlong intmh_i32ptr_put_slotbuckets_Z17mh_i32ptr_reserveP11mh_i32ptr_tjPvmh_lstrptr_del_resize_Z16mh_i32ptr_deleteP11mh_i32ptr_t__FUNCTION___Z23mh_lstrptr_start_resizeP12mh_lstrptr_tjjPvnode_Z21mh_lstrptr_del_resizeP12mh_lstrptr_tjPv_Z15mh_i32ptr_clearP11mh_i32ptr_tmh_i64ptr_delmh_i32ptr_clearunsigned charsigned charuint64_tlong long unsigned intuint32_t_Z13mh_i64ptr_newvmh_lstrptr_resize_Z13mh_i32ptr_newvslotn_dirtymh_strptr_hashmh_lstrptr_put_slotshort unsigned int_Z18mh_lstrptr_reserveP12mh_lstrptr_tjPvupper_boundmh_i64ptr_next_slotcharmh_int_tmh_lstrptr_tmh_i32ptr_next_slot_Z16mh_lstrptr_clearP12mh_lstrptr_t__ac_prime_list_Z17mh_lstrptr_resizeP12mh_lstrptr_tPvmh_lstrptr_deletemh_i64ptr_start_resizedataresize_cntmh_i64ptr_deletelong unsigned int_Z20mh_i32ptr_del_resizeP11mh_i32ptr_tjPvdoublemh_lstrptr_clearmh_i64ptr_put_slotsizemh_lstrptr_node_tmh_i32ptr_deletemh_i64ptr_reservetnt_error_codesmh_i32ptr_get_say_Z17mh_i64ptr_reserveP11mh_i64ptr_tjPv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/boxmh_lstrptr_getmh_i32ptr_resize_Z16mh_i64ptr_deleteP11mh_i64ptr_t_Z14mh_lstrptr_newvmh_i64ptr_del_resizemh_lstrptr_reserveerrflagsmh_i32ptr_del_resizebatchmh_i64ptr_clearGNU C++ 4.7.3GCC: (Debian 4.7.3-4) 4.7.3zRx 7AC 2 <.AC i  \AC E  AC E  $AC E qAC l AC  AC  (IAC D  HAC E lAC  hAC c .AC i  $AC E  AC E  $AC E 8qAC l XAC  xAC  IAC D  AC E AC  hAC c \AC W zPLRx  $JAC E .AC i  /AC E%  AC E  $AC E  qAC l ,AC  LAC  lIAC D  AC E AC   hAC c .symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @"j0 &#,#1 # 98$ PD$Ktp\7j8 z_F0u0 F 0UK0BS_S`SȑPX^! d 7!H7.dej=$| ., $c $X\J.,/W[m$    aq*1SX]I{Y ? hqW,?kaI hq:auI o"hassoc.cc_ZL13load_varint32PPKc_ZZL13load_varint32PPKcE12__FUNCTION___ZL19mh_i32ptr_next_slotjjj_ZL13mh_i32ptr_getP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL18mh_i32ptr_put_slotP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL13mh_i32ptr_delP11mh_i32ptr_tjPv_ZL15__ac_prime_list_ZL19mh_i64ptr_next_slotjjj_ZL13mh_i64ptr_getP11mh_i64ptr_tPK16mh_i64ptr_node_tPv_ZL18mh_i64ptr_put_slotP11mh_i64ptr_tPK16mh_i64ptr_node_tPv_ZL13mh_i64ptr_delP11mh_i64ptr_tjPv_ZL7lstrcmpPKcS0__ZL14mh_strptr_hashPK17mh_lstrptr_node_tPv_ZL20mh_lstrptr_next_slotjjj_ZL14mh_lstrptr_getP12mh_lstrptr_tPK17mh_lstrptr_node_tPv_ZL19mh_lstrptr_put_slotP12mh_lstrptr_tPK17mh_lstrptr_node_tPv_ZL14mh_lstrptr_delP12mh_lstrptr_tjPvassert_fail_Z20mh_i32ptr_del_resizeP11mh_i32ptr_tjPv_Z16mh_i32ptr_resizeP11mh_i32ptr_tPv_Z13mh_i32ptr_newvcalloc_Z15mh_i32ptr_clearP11mh_i32ptr_tfree_Z16mh_i32ptr_deleteP11mh_i32ptr_tmemcpy_Z22mh_i32ptr_start_resizeP11mh_i32ptr_tjjPvmalloc_Z17mh_i32ptr_reserveP11mh_i32ptr_tjPv_Z20mh_i64ptr_del_resizeP11mh_i64ptr_tjPv_Z16mh_i64ptr_resizeP11mh_i64ptr_tPv_Z13mh_i64ptr_newv_Z15mh_i64ptr_clearP11mh_i64ptr_t_Z16mh_i64ptr_deleteP11mh_i64ptr_t_Z22mh_i64ptr_start_resizeP11mh_i64ptr_tjjPv_Z17mh_i64ptr_reserveP11mh_i64ptr_tjPvmemcmp__gxx_personality_v0PMurHash32_Unwind_Resume_Z21mh_lstrptr_del_resizeP12mh_lstrptr_tjPv_Z17mh_lstrptr_resizeP12mh_lstrptr_tPv_Z14mh_lstrptr_newv_Z16mh_lstrptr_clearP12mh_lstrptr_t_Z17mh_lstrptr_deleteP12mh_lstrptr_t_Z23mh_lstrptr_start_resizeP12mh_lstrptr_tjjPv_Z18mh_lstrptr_reserveP12mh_lstrptr_tjPv * / L4! ' , j1!V"#%% ;%a% '  %E u'''' ' '= ) ) )D }   + % '4 #   *-}.%% %%O ' % &'6'E'Q''')W ) . `+%'.2 R246789%(%N k%% ' 9%u ''''7 'G 'm ) Y!)t! ! !+"%?"'d"9" "=   M !") 0 17 E J  W #^ c ]p u =   *  3    F  P : /) AM :[ i ew        > D+ :9 G eU  c q     j 8  : % e3  A O ] k y  u7   5 v E)71e9 `C _ en xej  zc j=  4 PX6  =a   a 2t:` gg ow @  ]  | S]  ; %Y - `U]R s     Y ?    &o .= G N R? Z b  y e      e     3  ;  } R   @       ( ] d Vh p x  %   f  k `  i# * . k6 > W ^ Lb j Wr     W    h   ~  ! < C K  S [ r         X @ e  X# + M hU z        , `  4 eC ,M,U[]  s AT [m   p$fS d kms{   =   , 3 o;CK @ U ]v A} Y       y   ` !) ? NV, l t  O  o"     m"  o"&".  E eo   }  @7`ej=a ,]LpY ?    <\|kW  XK 5`i ,[m0Pp o"/0 1378727479 1000 1000 100664 48952 ` ELF>p[@@UHH}EUH]UHHH}HE@(xHE@(=~:LHE@(AAAҸUHSHHEHt>HAHӿE}u>HAHӿ}t,EE<rEEyHH[]UHHH}u}t3UHEAAH¾UHH0H}uHU؋E0HEH}u EcEHHHEHPHE@HEPHEHE@HEH@HEP(HE@,HEHUHSHHhdHhH@EHEEHEHEHEHp8HHDžpDžxHEHEHEHEHEHEHEHvHEHEHEHHE@HE@ HEHPEHpHΉH?t4HAHHhHHhHEHHĘ[]UHSH,HHEHѺHǸHdHHUHHHEHǸ,H0HH0HHHDž0H0HƿtHAHӿLHEIAAҿLHEIAAҋHHHHHH@@H@HDžDžHHHHH5HAAHѺHHHHMHHHH@HHHHHHUHH9u0LHEIAAHH?HHL AAѿHinvalid replication port value: %d/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replication.ccsocketpairforkreplicationsendmsgspawner%ssigactioninitializedfalseExiting: master shutdownrecvmsgTerminated by signal %dcreated a replication relay: pid = %dsigprocmasksending signal %d to %d childrenwaiting for children for up to 5 secondssigno == SIGCHLDthe client has closed its replication socket, exitingrecvwriterelay/%s%s%sreadinvalid LSN request size: %zustarting replication from lsn: %lican't find WAL containing record with lsn: %liexiting the relay loopspawner_shutdown_childrenspawner: waitpid() failed spawner_unpack_cmsg m i L t9z}  . 8 8intZ_mMM? _Âm    &M(0f1F3m78M  #8?|%_? (?  4 m# m# # # f)p{ (q  "M # $ : ?p F| K L# M# R2 SM# TM# U# Ze [# \# ]# b c# d# eM# f# g# l m# r s# tM# y# z# {M# |m#  G N V_rt ^2 he n u } @M# AM# CM# ~#M?  UM R   !m ## +# .M# 1t#gMgRs!   $y&M#&M#&M#&#cb&#M!y '!(*,M#,M#,M#,#cb,#,# M079M#9M#9M#9#cb9#9# fd;M#(<M#,M$ =$0AKCM#CM#CM#C#cbCa#atCp# Ep#([[MKl}rsp# # ctx$# %# &-# #L $T# %T# &>#)\  - . # / #\ M? O#cswQM# R# TE #(fidVT#0sid`T#4 b\ #8 c\ #Hfi\ #X j4#` kT#x lb #? V V K  0s : M# # # # # #(#0#8#@#H#P#X  #`  #h M#pM#t#xF#t# # #&#/#0#1#2#3-#5M#7 # x x # ~ # M#A s A s _ ?: _ ?  f# (# # = f# # _# = #C     f# "_# #(# $(# % # I &T ( )f# -# 5_# ;# A_# G(#$ J(#( M(#, P{#0 S(#8 V{#@ Y#H \#P _#X b#` e#h m#p p_#x s{# v(# y(# |{# (# (# # {# {# _# _# (# (# {# # (# (# _# (# {# # # +G -# .-#  F  # #_? 8@ # # @# -# # -#( M#0 } -# M# M# *`IT  #   # # #  #f?.$!M=TT 4f 5f#lsn63# 0G H# If# J_# Kp# Kp#(N SlsnT3# T3# VT# W# X# Y#( Z#0 [#8 c#@ d#H eM#P fM#T gM#X h{#` i=#h j#x l#| (ITdirJ#fK# M# N-# OM# P #$ R#  0 1# 6# 9M# :T# ;T# <#Zl)h _"?++ = @# C# I#0 J#8 R#@ S#H V#PevX$#M+ b dM# f# h##:7$:Ml%=&M'h ()*P+pid\(O'Th'Md)*+ ,'X-fdMT'H)+ioh+$,r'r~'M~).M\/msg~/iovx@..P.M?_?F#,$,M~)..@/sa/~_?0jMz1msgjzX).lh2  #y()/msg{~/iov|x@.}.~M.MX).M\%3v$Ml#$M\).. ).Md/pidl)/rMh_.?0M$ML)/pid\#/4).M\.MX.|.}.~2? _??/#41w4H$4MD).6M\.7>W/rc9MX0HMe$H1rowHT$HT4Z).JMT.KH/lenKX#b$bM}).d/sae}/lsnf3/rgX.m.n.$}5cfg * 6 /62M\MTMTT76>i<8Dp 96y}6of6o6%T*QM *i % : ; I$ > $ >  I&II!I/  : ;I  : ; @ : ; I8  : ;  : ; (  : ;  : ; I : ;  : ;  : ; II : ;  : ; : ;I8  : ;I8  : ; : ; I8 < : ;  : ; !I"!I/#.: ;@B $: ;I %.: ;@B &.? : ; @I@B ': ; I (.? : ; @@B ) *4: ; I +4: ; I ,.: ; @B -: ; I .4: ;I /4: ;I 0.: ;I@B 1: ;I 24I4  3.: ;@B 4 : ;54: ; I? < 64: ; I? < 784: ;I? < 9!wwvwww!v!"w"#w#&w&vwwwvwww v wwwvwww)v)*w*+w+.w.vwwwGvGHwHIwILwLvwwwvwwvwwwv vv w ww x wx { w{ M vM N wN O wO R wR v w w w v w w vwwwFv,Fy /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/netinetev.hreplication.ccstddef.htypes.hunistd.hstdint.hsigset.hselect.hstdarg.hsignal.hsiginfo.hsigaction.hcoro.hcoro.herrcode.hrlist.hfiber.hstdio.hlibio.htarantool_box_cfg.h uio.hsay.hsocket_type.hsockaddr.hsocket.hin.h recovery.hlog_io.hsio.hevio.htarantool.h Jzt3wY3 $4g4hmf.Yb  tl'y( .4>u0G4ڃvfXK$4 <$% .ZXtXM4#4 ZXtXN4)YBXif3wYg!g)0v4.YAQ2Zu3J0r3g4wgYɼ/Yyx=A>$98)/Yy =\"6guʦff)g4'=uu/u>v xt )z  uu-1Z[XtXN 4ZXtXN4uu400I5g0()SERVICE_NAME_MAXLENlong intsa_sigactionwaitpid_failedEVBREAK_ONEf_datamaster_to_spawner_socketmemcached_expireWAL_WRITE_shortbufEV_CHECKrowlen_IO_lock_t_syscallgp_offsetS_FATALfilename_ext_IO_buf_end10__sigset_treplicationerrstrsa_datasignaltarantool_corosa_handlerspawner_signal_handlerEV_SIGNALsockaddrtarantool_cfg_space_indexS_WARNsnap_io_rate_limitorig_maskEV_IO_IO_write_endunsigned intnextlast_stack_framesiginfo_trecovery_stateEV_IDLEsi_statuscookie_flagscoro_contextwaiterspawner_shutdowntarantool_cfg_spaceeventsprimary_portservice_timerrecovery_lagreadaheadEV_FORK_markerswal_writershort intspawner_sigchld_handlerS_CRITmsg_namelensigval_tmodeEV_EMBEDprevwait_lsnpanic_on_wal_errormemcached_expire_full_sweepssize_tmsg_flags__intptr_testimated_rowspanic_if_errorwriterboolrowsLOG_WRITEsa_maskpalloc_poolEV_CHILDloggeruint32_t__sigset_treplication_relay_recvpanic_on_snap_error_IO_save_endlog_ioS_DEBUGchild_countis_inprogresswatcher_cur_columnWAL_MODE_MAXindex_call_addroverflow_arg_arealong long unsigned intEV_NONETNT_ERRMSG_MAXio_collect_intervalconfirmed_lsnEVRUN_NOWAITslab_alloc_arenacontrol_buf_padsi_utimesin_family__sigaction_handler__sighandler_t_IO_backup_baseev_rt_now_offsetev_watcherdirnamein_port_tev_io/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replication.cc_fileno__pad1coro__pad3EV_CLEANUP__pad4sin_zeroEV_ERRORcmsg_lenevio_service__gnuc_va_lists_addrreplication_on_acceptsize_tsa_family_tshutdown_handlerGNU C++ 4.7.3S_ERRORmsg_controllenEVBREAK_ALLdoublesi_tidsi_errno_IO_read_basesig_atomic_ton_accept_paramlog_modepeerconfig_nextbytesbacklogreplication_init_posS_INFOreplication_prefork9siginfo_t_IO_markersi_addrwal_dir_flags2replication_portev_watcher_list__socket_typesi_bandon_bindcharEV_CUSTOMkill_signorows_per_wal_kill_modemsglenfilenameSCM_RIGHTS/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/boxdefault_versionlog_dirlog_level_IO_read_ptrsockrepeatmemcached_spacedatawal_watcherSOCK_DCCPsay_levelfp_offsetuint8_tiov_baserow_handler_parambind_ipaddrSOCK_PACKETWAL_FSYNCcmd_coderecovery_last_update_tstamptnt_error_codescoredumperrdescva_list_IO_write_baseSOCK_DGRAM_Z24replication_check_configP13tarantool_cfg__pid_tEV_STATlong long intcurrent_walkilled_sifields_IO_save_baseclient_socksin_portsayfdEV_WRITEspawner_create_replication_relayiov_lenwal_dir_rescan_delaysignospawner_main_loopev_timerWAL_FSYNC_DELAY_Z16replication_initPKci__confetti_flagswal_modeslab_alloc_minimalflagson_bind_parampid_tparam_sigsyssin_addrmask__pad2_sigpoll__pad5__clock_tmsg_namememcached_portmemcached_expire_per_looprow_handlerfiletype_vtable_offsetwal_writer_inbox_sizesigvalint64_tev_tstampactive_archlong doubleintptr_tuint16_twal_fsync_delayuniqueaddrlenreaderon_acceptsnap_dirspacekey_fieldlink_Z19replication_preforkvspawneropen_wflags_IO_read_endsigset_treventsenabledlocal_hot_standbyfieldnoEV_PERIODICspawner_initsecondary_portusernamefiberWAL_NONEpriorityreplication_check_configreplication_relay_send_rowEV_ASYNClogger_nonblockspawner_shutdown_childrenspawner_unpack_cmsguint64_trlistsi_uidreplication_relay_looppending__ssize_tsockaddr_in__uid_tsi_pidcmsg_typenamesigactionSOCK_CLOEXECstackcontrol_messagemsghdr_locksizetypeadmin_port_sigchldlong unsigned int__sig_atomic_tEV_TIMEOUT_old_offset_IO_FILEreg_save_areaint32_ttarantool_cfg_space_index_key_fieldsival_intSOCK_RAWretrysi_fdev_default_forkin_addrEVRUN_ONCEgc_poolmsg_iovcmsg_leveltypeunsigned charpid_file_sbuf__socklen_treplication_send_socket_IO_write_ptrSOCK_SEQPACKETreplication_sourcesockpairsi_sigvalwork_dirSOCK_STREAMfinalizeerrflagsaddrerrcode_recordstatecustom_proc_titlescript_dirsi_codestack_sizeev_loopmsg_controltoo_long_thresholdalarm_masksi_signo__off_tcardinalityremote__FUNCTION__signed charsa_familyshort unsigned intsa_flagsiovec__valSOCK_NONBLOCKEV_UNDEF_sayexit_statussync_is_asyncEV_PREPARESCM_CREDENTIALSEV__IOFDSETin_addr_tEV_READtarantool_cfg_chainslab_alloc_factorEVBREAK_CANCEL__sigchld_clock_tFILEsi_stimetimersocklen_tsival_ptr_sigfaultcmsghdrsock_read_evLOG_READEV_TIMERtypedef __va_list_tag __va_list_tagmsg_iovlen__off64_t_unused2_IO_buf_baseSOCK_RDMsi_overrunsa_restorerGCC: (Debian 4.7.3-4) 4.7.3zRx AC R < AC F \fAC a zPLRx $$;AC E1 KAC F AC  $oAC Hb $AC H TAC  $=AC H0 \AC AC M  `AC   AC E $AC H AC E hAC E AC H.symtab.strtab.shstrtab.rela.text.data.bss.rodata.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @Fo&, 19vPK3\5j8z?0uh0 ?} 0/F0WWWZ0a% i (F R*e o&H=>_w \N ;k      "f;)-8IRW\brzK &.9>PYou !-2>]brreplication.ccev_loopev_default_fork_ZL24master_to_spawner_socket_ZL7spawner_ZL12spawner_initi_ZL21replication_on_acceptP12evio_serviceiP11sockaddr_in_ZZ16replication_initPKciE11replication_ZL23replication_send_socketP5ev_ioi_ZL22spawner_signal_handleri_ZL23spawner_sigchld_handleri_ZL17spawner_main_loopv_ZL19spawner_unpack_cmsgP6msghdr_ZZL19spawner_unpack_cmsgP6msghdrE12__FUNCTION___ZL32spawner_create_replication_relayi_ZL16spawner_shutdownv_ZL25spawner_shutdown_childrenv_ZZL23spawner_sigchld_handleriE14waitpid_failed_ZL22replication_relay_loopi_ZZL25spawner_shutdown_childrenvE12__FUNCTION___ZL22replication_relay_recvP5ev_ioi_ZL26replication_relay_send_rowPvPKcjev_runev_loop_fork_Z24replication_check_configP13tarantool_cfg_say_Z19replication_preforkv__gxx_personality_v0cfgsocketpair__errno_locationstrerrorexitforkclose_Z9sio_setfliiisetpgid_Unwind_Resume_Z16replication_initPKci_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPv_Z18evio_service_startP12evio_servicemallocev_io_startmemsetsendmsgev_io_stopfreecustom_proc_titlesnprintf_GLOBAL_OFFSET_TABLE_fiber_Z14fiber_set_nameP5fiberPKcset_proc_titlesigemptysetsigaction__cmsg_nxthdrassert_failrecvmsgwaitpidsayfdwritesigaddsetsigprocmaskalarmkillsigwaitsigpendingsigismemberrecvgetpeername_Z12sio_strfaddrP11sockaddr_inreaddefault_versionev_default_looprecovery_initrecovery_staterecover_existing_walsrecovery_follow_local%&J(Z i (+$,(-. v (/0(- .& 3 (I/Y1bhy2134    6  712;8P1 9:;(-.  (<=14?>K ]?dAwBC:D EE E<(A-J.P ] (t E(-.  (E E+EG(L-U.[ h ({(  (4F. 8 (= BGH(  (-((--6.< I ([w4(  (1/ I& -3 J= D KO X ^ q 4 0 ( - . (  1   1 (" 1 (l D L L L  M ( - . & ( N$ (* 9 8H (d Ok (q ` ( P  (  G  N Q R7 DK La Pz M ( - . & ( 4 S$ -2 (8 G (^ /k (p -y .  ( / 4 K -(-. " (8/g(m | (/TU ?AB>% /CH:[DEEEE(-.   (FEdEE(-.  (V(- .  (4/;(H W (n/u(  ( WX  )9;+TB+LV  ^YeZlZZ[Z( @ (Z\( o# (:/B4  !3 !@ !!F) . !; ! B ! I !b !mi !p !w !~ ! ! !E ! !l !R ! !/ !$ ! ! !  !i  !) ! 4 !> ? !xJ !r U !` ! m !b r !  ! !' ! !  !E ! != !  !n !3& ! 5 ! @ !dL !R !AX !^ !fd !j !q !F ~ !d ! !7  !5 ! ! ! ! !M  !  !k !$ !; !M I ! W !n !M | !  ! ! ! ! !] !N !( ! !W $ !/ !: !OP ! [ ! f ! q ! } ! !r !y !  ! ! !c  !  ! !& !h4 !C ! !; !\ ! !  !~ ! !4 !  !6  !9 !| !Z  ! !c ! ! !m ! !  !r !" !/ !P > !' M !v \ !I ! !? !P  !'  !v  !I !% !:2 !P A !' P !v _ !I| ! !3 !: !  !P  !'  !v  !I< !2q !w !l ! !9 !X !]  ! ! ! !z  ! !G" !0 !> !9U !d] ! i !w ! !g ! ! !w ! !V !E" !t 0 !@ !pi !t ! ! !  ! !{ ! ! ! ! ! !  ! !/ !u> !M !\ !&k ! z !  ! ! ! ! ! ! ! ! !  !* !v; !B ! N !\ !j ! ! !G !. ! ! !L !G  !! ! / ! J !LU !a !G o ! } ! !/ !" ! ! !G !^ ! ! ! !  !.. !< !J !a X !f !t !  ! !n ! ! !  !s ! !c !m ! !! " !X 1 !{ @ ! O !^ !m !:| !O  ! !\ !  !9 !e !  ! ! !  !!+ !9 ! H !OT !$Z ! ` !?f !l !r !Zx !~ !m  !- ! !C ! ! !  !  ! ! !a !$ !I2 !G !S !a !o !T  ! !n !0 ! !d ! !9  ! !  !  ! ! > !J !m !y !B !  ! !V ! !X  !m  !v ! !  ! ! ! !p ! ! / != !MK !Y !g ! u ! !m ! !t  !{  ! !X  !0 !  ! !Y) !H7 !E ![ !g !>u !U !  !  ! !( !~ !N !T ! !+ !^% !, !8 !^ F !BT !eb !z p ! ~ ! ! !  !- !|  ! ! ( !t 8 !T?G"O `V ! \ !% d"lt ~ ! ! !    ! ! !.    ! !.(0 9 !E P !V^f p !G !B! !* @ ! !3  ! B !R ! a ! !B *  !-< !^  ! $H, EMFV ! e !p  ! H `Tq ! ! ! Y !) !08@ F !"MU]  g !w !~w  l ! u  !* \  !I1 M 4 ! ?w GN O Y ! h pG  ! N   , !Ha Z   !| !  !  !  ! !% E !L T \ s !    !  !I !    !  ! !"d& .7 ! F !f ! muF} 8 ! F !^  ! !  !# !\0 ! ] !Dp !  ! !g  ! ! !L !   @`" *  0*9 XxH - <w $N - HL U Xl  gmemcached.cc.o/ 1378727480 1000 1000 100664 232040 ` ELF>@@jg!#%&')+-1379;=?ACDFGIJLMOPRSUHH}u} w HEUH]UHH H}H}t HEHHu6HEHHEHEx$HEHHPHEHHEHEHxbEHEEHHMHpH@HH)HHHHpHUHPHEHHHHHH}HHtHHttHh Ha HHPH@H;EtHhH% HHH}vHh)HHxMUuHHIHHHHHhHHEHUHpH@HH)HH[EHMHUHH)HHHHHpHHHH(H;t NaHpHRHH+EH9vHpHPHHHEHpH@HEHEHxUHEHкH_EHEEHHMHpH@HH)HHHHpHUHPHEHHHHHHHHtHHYttHh HHHH@H;EtHhHHHH}vHh)H^HxMUuHHIHHHHHhH EHEHUHpH@HH)HH[EHMHUHH)HHHHHpHHHHH;t ^HpHHH+EH9vHpHPHHHEHpH@HEHEHxUHEHкH']EHEEHHMHpH@HH)HHHHpHUHPHEHHHHHH`HHtHHttHh HDHH3H@H;EtHhHHHH}vHh)HHxMUuHHIHHHHHhH}HUHEHH8HEHEEHHMHpH@HH)HHHHpHUHPHEHHHHHHHHtHH6ttHh HHHHH`HHH`HH,R`HHHHHHE}~ HEHEHEH;Ev HEHEH)EHEH@EHdHH@(HHHUHHǸHH@HxHEHHHHxMUuHHIHHHHHHHHHhHHHhHHh>HHEEHHMHpH@HH)HHHHpHUHPHEHHHHHHLHpHptHpHttHh H0HpHHhH\HpH_H`\H`HR\H`HH`HHHE}~ HEHEHEH;Ev HEHEH)EHhEHh@EHdHH@(HHXHUHXHǸHXH@HxHXEHHHHxMUuHHIH/HHHHXHXHHHhHHHhHHh>HiEHEEHHMHpH@HH)HHHHpHUHPHEHHHHHHHHtHH5ttHh HHHHHXHHHXHH+RXHHHHHHE}~ HEHEHEH;Ev HEHEH)EHEH@EHdHH@(HHHUHHǸHH@HxHEHHHHxMUuHHIHHHHHHHHHhHHHhHHh>HHEEHHMHpH@HH)HHHHpHUHPHEHHHHHHEHHtHHttHh H)HHH)Hh HHUHEHHE}tV}'wMEHxH*(!HHH H*f(X(X(H,EHEEHHMHpH@HH)HHHHpHUHPHEHHHHHHH(H(tH(HZttHh HHHHHh HEHEEHHMHpH@HH)HHHHpHUHPHEHHHHHH HHtHHsttHh HHHHHh HHEEHHMHpH@HH)HHHHpHUHPHHUHHHǸHhH&HUHEHHHEHEEHHMHpH@HH)HHHHpHUHPHHUHHHǸHhH~EHEEHHMHpH@HH)HHHHpHUHPHHUHHHǸHhH HEEHHMHpH@HH)HHHHpHUHPMHUHuHhH HEEHHMHpH@HH)HHHHpHUHPqOHUHEHHEHEHUHpH@HH)HH[EHMHUHH)HHHHHpHHHHH;t NHpHHH+EH9vHpHPHHHEHpH@HEHEHxUHEHкHDMEHEEHHMHpH@HH)HHHHpHUHPHEHHHHHHzHHtHHttHh H^ HHH}vHh)H% HxMUuHHIHSHHHHhH HEHUHpH@HH)HHx[EHMHUHH)HHHpHpHpHHHHeH;pt LHpHHH+xEH9vHpHPHxHHEHpH@HEHEHxUHEHкHJEHEEHHMHpH@HH)HHHHpHUHPHEHHHHHH,HhHhtHhHttHh H HHH}vHh)HHxMUuHHIHHHHHhHEHEHUHpH@HH)HHX[EHMHUHH)HHHPHPHpHHHHH;Pt 8JHpHHEHEH;E'"HE t؃   tNSnMHE HEHEH;EHE< mHEHEH;EHE P  . t tHEHEH;EHE< HEHEH;ErHENt nt HEHEH;EMHECt ctեHEHEH;E(HERt rt頥HEHEH;EHE< )HEHEH;EHERt rt>HEHEH;EHEEt et HEHEH;EHEPt ptԤHEHEH;EwHEEt et韤HEHEH;ERHENt ntjHEHEH;E-HEDt dt5HEHEH;EHE< HEHEH;EHEUt utӣHEHEH;EHEIt it鞣HEHEH;EHETt ttiHEHEH;E|HE ^ t0HEHEH;EVHE< ¢(HEHEH;E9HEEt etѢHEHEH;EHEPt pt霢HEHEH;EHELt ltgHEHEH;EHEAt at2HEHEH;EHECt ctHEHEH;EHEEt etȡHEHEH;E[HE< ZHEHEH;E@HE . tHE<~HE< HEHEHEHEH;Es(HE< tHE< tHE< tuHE< tHE< t HE< u2HUHEHH)H؉HMHEHHHEHm HEHEHEHEH;E_HE< GHEHEH;EDHE< tHECDžd?3Džd@#DždADždBDždCDždDDždEDždFDždGDždHDždIDždJDždKsDždLcDždMSDždNCDždO3DždP#DždQDždRDždSDždTDždUDždVDždWDždXDždYDždZDžd[sDžd\cDžd]SDžd^CDžd_3Džd`#DždaDždbDždcDžddDždeDždfDždgDždhDždiDždjDždksDždlcDždmSDždnCDždo3Dždp#DždqDždrDždsDždtDžduDždvDždwDždxDždyDždzDžd{sDžd|cDžd}SDžd~CDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždsDždcDždSDždCDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždsDždcDždSDždCDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždsDždcDždSDždCDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždvDždiDžd\DždODždBDžd5Džd(DždDždDždElLHUHEHH)HȉHEH$AA5AHUHEHH)HH=+(%" L A8AHhHHHHHUHEHH)HHHEHHHt6HHPHpHPHh&H+$}tHpHhHHHHHtvHH0Hh HH0HHHH0HHHhHHHHhHHH Ht HHHh HHHHHHHHHhHHHHhHtHH3 Ht( HHHh HHHHHHHHHhHHHHhHͻHHHtHHHh HHHHHHHHHhHHHHhH& HHHtHHHh HHHHHHHHHhHHHHhHzD HHHtHH(Hh HH(HHHH(HHHhHHHHhHι HH Ht} HHHh HHHHHHHHHhHHHHhH"HH Ht HHHh HHHHHHHHHhHHHHhH{HH: Ht/ HHHh HHHHHHHHHhHHHHhHԷHHHtHHHh HHHHHHHHHhHHHHhH-HHHtHHPHh HHPHHHHPHHHhHHHHhH遶KHHHtHHxHh HHxHHHHxHHHhHHHHhHյHHHtHHHh HHHHHHHHHhHHHHhH)HHHtHH Hh HH HHHH HHHhHHHHhH邴HHAHt6HHHh HHHHHHHHHhHHHHhH۳HHHtHHHpHhHHHh HHHHHHHHHhHHHHhHHHHtHHHh HHHHHHHHHhHHHHhHtHH3Ht(HH`Hh HH`HHHH`HHHhHHHHhHͱHHHtHH@Hh HH@HHHH@HHHhHHHHhH&HHHtHHHh HHHHHHHHHhHHHHhHHH>Ht3HHHh HHHHHHHHHhHHHHhHدHHHtHHHh HHHHHHHHHhHHHHhH1HH[]UHH0H}HuHEHHEEHMHEغHHeHHUHEHHDuE}y/L AAѐ}u }}u/EHEHdHt }oHUHEHHEHEHHH}uHEHIdHtEUHHH}H{Gz?HEEHEHHHEH@HHUHATSHĀHxHxHPHHJ0HxHJHHUHPHUHPHUHPHUHP HUH@(HEHx0s0HxHPHxHHxJHx HxHPHHJHxHJHHEȋHEHEHEHEHEHMHUHHHUHEHHHEHUHHHEHIHHEHLHHt$Ht/HHJHH=;HHEHHEHEHHHHUHHH[A\]UHHH}HEu HE~HE=~'HE¾HE'HE¾JHEfWf.r/HEHHEEUHHHtHH@HH]UHH H}u}t{HEHEHSHUHEAAH¾UHH HEHE@HE@HE@HHEHHHEHPHEHHEH@HE@HEH@HuUHSHHH}EHEHH+eEHEȋuًEHcЋ* f(YUHHH0HHHHHxH*HHH H*XM^f(EE f.vH?HEHEHEEaHHHHtHHHEHEHuHH[]UHSHHH}HEL A-AHHHhHHHHH}u1HHHpHH5H=AHdHH@(HHEEHHHHHEH}HEH/dufLHEIA@AEHUHEHZHEЋUHMHEHHE;EJHEHHHHHtHHHEHH@HHHUHSHHHtTHHHǸ^HHHHtHHHEL AYAH[]UHtLtAHHucHHH]UHH H}HHHMHEHUHEHH3HEÐUHHH}HE@uHEHUHH}HuHEHUH HHRHPHE@]UHH}u}u}ud[UH]*UHHH}HEHt HEHUHHH}HEHHEHUHH}HEH]UHH}HE]UHHH}HEHHEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalseIllegalParams%s at %s:%ivarint is too short (expected 1+ bytes)varint is too short (expected 2+ bytes)BER int is too short (expected 3+ bytes)BER int is too short (expected 4+ bytes)BER int is too short (expected 5+ bytes)incorrect BER integer format/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.htuple_formats[format->id] == formattuple_format_id(format) == tuple->format_id/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacityMEMC_GETMEMC_GET_MISSMEMC_GET_HITMEMC_EXPIRED_KEYS/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/memcached.ccpacket too short (expected a field) %u %u memcached/store key:(%i)'%.*s' exptime:%u flags:%u cas:%lusizeof(struct meta) <= lenSTAT pid %u STAT uptime %u STAT time %u STAT version 1.2.5 (tarantool/box) STAT pointer_size %lu STAT curr_items %lu STAT total_items %lu STAT bytes %lu STAT curr_connections %u STAT total_connections %u STAT connection_structures %u STAT cmd_get %lu STAT cmd_set %lu STAT get_hits %lu STAT get_misses %lu STAT evictions %lu STAT bytes_read %lu STAT bytes_written %lu STAT limit_maxbytes %lu STAT threads 1 END ensuring space for %lu keystuple_next(&it, &len) == NULLVALUE %.*s %u %u %lu VALUE memcached_dispatch '%.*s'src/memcached-grammar.rlNOT_STORED SERVER_ERROR object too large for cache STORED NOT_FOUND EXISTS %luCLIENT_ERROR cannot increment or decrement non-numeric value DELETED flush_allOK parse failed after: `%.*s'memcached proto errorERROR CLIENT_ERROR bad command line format SERVER_ERROR negative dispatch, closing connectioninvalid memcached port value: %iinvalid expire per loop value: %iinvalid expire full sweep value: %imemcachede.errcode() != ER_NONMASTERmemcached expire fiber startedexpire tuple %pmemcached_expire == NULLmemcached_expirecan't start the expire fibermemcached_expire != NULLmemcached_stop_expirememcached_start_expiretuple_formattuple_format_idload_varint32memcached_delete_expired_keystbuf_ensurememcached_getmemcached_metapick_varint32AC?UHHH}HEHHEHt HEHUHHH}HEHHEHL:w        DsvJgj̄BXC̄CGXHHLXMMhȔNPhȔQRhȔSTȔWYȔ\0^Ȕa0bȔf0gȔj0kȔn0oȔq0rȔ________׀___ф___Ј_܋x_ތÎ___Ӑ_ߓ_˔}5#}} P-";  }FUp(wUHHH}HEHHEHt HEHUHHH}HEHHEH9Exception20FiberCancelException13IllegalParams11LoggedError11ClientError6Objectc](<SLL####f1շ int   &(0137z?s y   G G ?AA#d H %9NUM6^:;G#<# @B#L#NG#SG#T#U9# ^ GIJ  RsS#T# tw<#y<#{G#}G#d#   s J    #/$#%#&1#)?x      !"#$%&'()*+,-./0123456789:L )p'd(d#.G#P6G#T;#Xno>G#`A#hztL  t  (id)<#0G#2G#9G#EG#TM# 8:*#eof<;# *   G  ;  0  dL{L#pos#  s(*(,#,#,#,#cb,>#,8# 8 8  (079#9#9#9#cb9#9# fd;#(<#,   D  0A_ C#C#C#C#cbCu #atC# E#( o o  _ r     sp # # ctx$ #%#&#-< .< #/< #  M O#cswQ#R #T #(fidVG#0sid`G#4b #8c #Hfi #Xj#`kG#xl #  S  B  &t    ! !#!#! #!t  ! !#! #!#! #   ! !e ! #!"#!##!$#!%e # k  !& !(!)#!- #!5#!; #!A# !G#$!J#(!M#,!P#0!S#8!V#@!Y #H!\ #P!_ #X!b #`!e #h!m #p!p#x!s#!v#!y#!|#!#!#! #!#!#!#!#!#!#!#! #!#!#!#!#!ź#! #!#  q )!+G#-G#/ #0 #(",t"-&#".&#"/&#"0&#"1&# z !#+#-##.#$L %`<%G%%#%9%#%#%#%9#IL&+X '='@#'C# 'I #0'J#8'R#@'S#H'V#Pev'XD#    X  %5'X#) #+#( 5 7 #buf 8 #pos : #end < # >#  `  k m # o#pos q# s#iov z#L L Cpos # # #H đ g Ǒ# P#in 5#out ˗#0 C 9 : :  ! : " :   EH FG# GG#cas HR#H  R# G# G#  R# R# R#  R#( R#0 R#8 R#@  &# &##$$=U#$>#%&EQ  &+am  &1}  ':   (;  )U*D* C U*U*XU XU  * ** +@,#-BEV  .logGsz /  +$,#$4#$6#$9r#0' .log,$ 1/6G  11Ye   /{     2 63#-" 4&  -*   5+)  +s,#6`l  -u}  /6  +h,#6 a g/ a  6* 67a0Z;B /S   *m 8L   *e9 : **;<< =>h=DM>h?o}@}h   ?"@h AzBsphCGd Dj$-<-< =Xa>h=>h DBU<< =>h=>hE4GC4 XFG Hb7h   1Dh<< a=>h=>hETGCT HBendT@FG HbWXIXP A Bbuf XCGTFIh 1E`GaC`hFGq qL aECXFIhG L ECCBiGFIHIXJIhHidxdFHlenGT  E:CݤXBiGTBlenHFIhKyLityhM` {NGO7 Be7 hC7`FG    L  O>e Bb> hC>`Blen>XEN CN hBbufN`BszNXCNP DA G C G h 5A N3!C N hA !Bbuf !`FHsvp h E )!C ) XBbuf ) PBsz )HFHn ,h;""<"P :  Q!D"U">"h>"`A LR"C LXBend LPFHnum NRhFI P1gR WB#Bb W XBf WPFI YhI ZGdR _#Bb _ XC _PBlen _GLFHbuf a#`I b h#LS l4$Bbuf l HFI nXI oGTO z%Bkey zC zGC zGC zG~C {~FI }G`I ~G\Hcas R Hm @Hreq  hHb %I d(%L*O %Bkey XFI GdI G`Hreq  hE %Bkey hE ;&;&C XFHlen GdI hGQ&  Q&L A&E &C XFHm ;&hA 'C XC GTFHi lA g'C tXC PFHctx g'h O 'Bout !HFHbuf  hI PT  )Lout !M M  ~M ~FG ) FU hVm %)XU HU PU GdU GU GVkey Vlen #GVit ${FVb > @  +) W P)Lap P HFU R]hU TXVit U)` JE $SC $ xC $xX X i X X ` X X X X H X X T X > X X 5 X X , X X # X X X  X X  X X Y X X X Y X X  X X X X X Y X X X X X X X X X X X X X X X X X X J X X X i X X _ X X V X X M X X D X X ; X X 2 X X Y X  Y X Y X  X ) X X Y X X X X Y X X X X X X "X X X X X X !X X X X X X X X zX X qX X X hX X _X X VX X MY X Y X Y X ,X <X X Y X X X X Y X X X *X )X X X X X X X X X X X X X X X X X X X X X X X X X X vX Y X Y X UX eX X ,X Y X DX Y X 6X Y X (X Y X X Y X X Y X X ' X Y X X X X Y X X X X X X X X 'X X X X X X  X X X X Y X X }X $X X tX X kX X Y X Y X X \Y X LX Y X ;Y X Y X )X Y X X Y X X Y X X X X Y X Y X X !X "X X X X X X X X X X X X X X X g X X X X X  X ~X ~ X uX } X lX | X cX X { Y X z Y X X y Y DY DX Y DX 8 Y VX %Y VX / Y VY Y Y Y Y Y Y Y Y Y X Y Y aY aY aX 1X f Y {X 0X ] X /Y {X .X K X -Y {X &X 9 X +Y MX X *Y MX )X  Y MY X (X  X 7X X TX DY X x Y Y X w Y Y X X v Y Y X u Zst9 Y X X t Zst8 Y X X s Zst7 Y X r Zst6 Y Y X X q Zst5 X X p X Zst4 X X o X y X Zst3 yX n X n X 4Zst0 kX X B X ^ X S X B X  X X X X W X A X x X X Zst2 nX X 3X X & X X  X X  X Y X 0 X Y X X  X X Y X X Y X X Y X X Y X X Y X X X X Y X X X  X X x X X o X X f X X ] X X T X X K X X X ; X X 2 X X ) X X X X X  X #X X  X X X X X X X X X X X X X X X X X X X X X X Y X X X &X 'X X s FHcs &~Hp ' XHpe ' PI ( HI ) ~Hkey *~I +GI +FI ,@Hcas -RI -RI .GI .GI .GI /I 0 ~I 1I 2]I 3Hin 4 ~Hout 5!~I 7 x[JI |FI |[:JI F|FHe JS|[tJI {FI {[JI F{FHe JS{[JI {FI {[KI F{FHe JS{[XKI zFI z[KHb b zI czI dGxI gzFHe wSz[KI yFI y[XLHb b yI cyI dGxI gyFHe wSy[LI ~FI ~[LHb b ~I c~I dGxI g~FHe wS~[/MI ~FI ~[gMI X~FHe ^S}[MI }FI }[MI X}FHe ^S}[NI }FI }[KNI X}FHe ^S}[NHm |;&}Hb } }I ~}I GxI RI }FHe S}[IOHm |;&|Hb } |I ~|I GxI RI |FHe S|[OHm |;&}Hb } |I ~|I GxI R~I }FHe S|[PI {FHe S{[8PI |FHe S|[pPI |FHe S|JPHf S{JPHf S{JPHf S{JPHe S{[6QI {FI {[nQI OzFHe SSz[QI zFI z[QI OzFHe SSz[RI zFI z[RRI OzFHe SSz[RI yFI yJRHe ASy[RI yFI yJ SHe ASy[FSI yFI yJiSHe ASy\Vr = y S* S S S S S S S S S S S S S S B S S S S S S ST sTM s HM s@X FVrc u\U vXU wlVin x `W VLap  ~\U D~U [UU  ]  # #^6UBU  ^MU^U   U^iUpU _U@Uh FGhGh#[UVe VX\Ve  VP V* V*` PVM PVh | a T VM XM TFVsp hU  T 6WFU hT WM  FU \GW U PFVe WHWL W ST )XLap ) X 0FU +XJXU 4 HFVj 6TFVlen AGU B@FVe HX VT OWYFGgY FVe XlYXgYL WY VT _YFGY YL YEC Z)UCCUX;mZ2Z<2Z< QZYZbZ>Zh;4pZZ<2Zbfun&Z cbZZZ>pZh>zZ`DsZZ<Z< =Z[[>Zh=Z=[F[>Zhd[M flM fhefcfg)*| gAh[hgy[ [ 9g>[ [gXgW\ iDg(  : ;  : ; I8  &I $ >   I  I : ; (  : ; ( I& : ; I8 < !I/ : ; : ;I8  : ;I8  : ;<  : ;  : ; 9.: ; < d I4 !4: ; I< ":: ; # : ; $ : ; I8 2 %.: ; < c d&.: ; < d'.: ; 2 < c d(.: ; I2 < d)/I* I+ : ; ,I8 2 -.? : ; < d..? : ; @L M < d/.? L 4 < d0.? : ; @I< d1.? : ; 2 < d2 : ; 3 I8 4 4.? : ; L < d5.? : ; @I< d6.? 4 < d7< 8!I/9: I;.G d<I4 =.1@@dB >1 ?.G@dB @I4  A.: ; I@B B: ; I C: ; I D.G: ; dE.: ; I@B F G4I4  H4: ; I I4: ; I J K.: ;@B L: ;I M: ;I N.: ;I@B O.: ; @B P: ; IQ.1@dB R.? : ; @@B S.? : ; @I@B T.? : ;@@B U4: ;I V4: ;I W.: ;@B X : ;Y : ; Z : ; [ U\ U] : ;^.4 < d_.4 @dB `.? : ;@I@B a.: ;@B b: ; Ic.1@dB d.4 @B e.4 @B f4: ; I? < g4: ; I? < h!i4: ;I? < j4: ; I?  k4G wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwy1&=&=&=&=&9- /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcsrc/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyobject.hexception.hspace.hpickle.htuple.hev.htbuf.hcoio.hiobuf.hcoio_buf.hmemcached.ccmemcached-grammar.rlmemcached-grammar.ccscoped_guard.hstdarg.hstddef.htypes.hunistd.hstdint.hbox.h port.hrequest.hkey_def.hindex.herrcode.hsay.hcoro.h coro.hrlist.hfiber.hprscfg.h tarantool_box_cfg.h salloc.huio.hsockaddr.hin.h sio.hevio.htarantool_ev.h tarantool.h % % &  gY.t!"!*!@!u9!uL2/tvc"!#c"!*c"!@c"!u9c"!uLcW``` X`/gYZZZ0K..K ./gK/Y!>/ggE ./K=h!..Ku{&/1=g'!Y .u% w.3'.&! ~f=/+gK  <T/$K2*20K'Y)#c!Y#%3uxYuv0ggYwZXuuYuu0&22CtY2<=rJY.Y2Z4"Y\YY׾g!0 XKugl01gi.L1LtXK!gZ!h:YYvuYG;JY2$fuJ./ }.KK!" P vffljf fffffffffjf ffffffffljf fffffffffffjf f<<%w@U=$wDwx  .XtXK&Yv" tCw - " [t, 8 Y U< -  Rt  " wt,  YfM x<   ut q " t) "XdX/#. /$K)~/utXKVV"+XdX/#. /$K)~/utXKVV"+  X v HdX/#. /$K)~/utXKVV"+  X u "XdX/#. /$K)~/uqX"fug!U"+XdX/#. /$K)~/uqX"fug!U"+  X t HdX/#. /$K)~/uqX"fug!U"+  X s !fdX/#. /$K)~/u.tXKSVV"+ X< r dX/#. /$K)~/u.tXKSVV"+ X r HdX/#. /$K)~/u.tXKSVV"+ X q  fSK)~/u.tXK+WXYv(g!""!( S X< q SK)~/u.tXK+WXYv(g!""!( S X q HSK)~/u.tXK+WXYv(g!""!( S X<(<< o SK)/u.tXK vX  X o Yf'MSK)/u.tXK vX  X o HSK)/u.tXK vX  X<$<< m SK)Y X n fSK)Y X m HSK)Y X< l SK) X k SK)F  j "XdX/#. /$K)~/u.tXKVV"+XdX/#. /$K)~/u.tXKVV"+ X i HdX/#. /$K)~/u.tXKVV"+ X h "XdX/#. /$K)~/V"+XdX/#. /$K)~/V"+ X g HdX/#. /$K)~/V"+ . g SK)B"u X Y  . v K" twX Y < w  tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wuX> w@U=$w@U=$w@U=$w@U=$w v K.K  < v   tx u .XtXK&Yv"  tCw u "  t, u Y  < u   t u "  t, u YfM  < u   t u "  t* u Y  . t K"  tmX u Y  < u   tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wsX w@U=$w@U=$wDwx t .XtXK&Yv"  tCw s "  t, s Y  < s   t s "  t, s YfM  < s   t s "  t, s Y  < s   t s "  t. r K  . s g  << r   tmX s g  < s   t&yXU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV r K  < r   tqX w@U=$wzXS>%w@U=$w r u,u  < r   tx q .XtXK&Yv" tCw q " t. q K . q g << p  tmX q g < q  t&yXU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV q K < q  t~X> w@U=$w@U=$w@U=$wDwx p .XtXK&Yv" t%.X o YfM . o K . p< <(<< o  tkX<z w6 o " t+ o YfM < o  t&yXUX='<=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV o K < o  tmX w@U=$w@U=$w@U=$w@U=$w#w@U=$w@U=$w@U=$wX m K . n g .<$<< m  toX<z w6 m " t+ n g < m  t&yXYX=#<=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV m K < m  tlX w@U=$w@U=$wT m K.K < m  tx l .XtXK&Yv" tU<s wxX<y wzXX= wkX w@U=$w@U=$w@U=$wkX w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wjX w@U=$w@U=$w@U=$wxV$wjX w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wDwx j .XtXK&Yv" tCw j " t, j Y < j  t j " t, j YfM < j  t i " t* j Y . i K" tmX j Y < i  tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$whX wzXS>%w@U=$wDwx h .XtXK&Yv" tCw h " t, h Y < h  t h " t, h YfM < h  t h " t* h Y . g K" tmX h Y < g  tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$w~X> w@U=$w@U=$w@U=$wxV$wfX f f f  f  f  f   g   f   f   f   g   f  o o o p p p p p p p p p  g   f  p  f   f   f   f   f   g   f  q q q q q r r r r r r  f  r  f   f   f   f   f   f   f   f   f  s s s s s s t  f  t t t t  f   f  t  f   f   f  u u u u u u u  f  u u u u u  f   f  v  f   f  v v v v w w w  f  w w w w w w w w w  f  w  f   f  x x x x x x x  f  x x y  f   e  y y y y y y y y y y z z z z z z z z z z z z z z z z z  e  {  e   e   e   e   e   f   e  | | | | | | | | | | |  e  |  e   e   e   e   e   e   e  } } } } ~ ~ ~ ~ ~ ~ ~ ~ d  GW<<<<<<<<<<<<<<+ )!@Yvwg~@AZ@AZ@AZ+@A[@A[@A[d@AZ@AZ@AZ'A Xu'A Xu'A X 'A_y'A_y'A_'A~_@AZ@AZ@AZl@AZ@AZ@AZ *!u(s Yg)ifgLftXYYZftXuqXs [  .u/t.!L0u'/.z%ʸYe[2סyw[(wY2Kg3iLz'r 2׭=Lحo 4v0=G xs/ן!q*xɄ)$u110usXJ >IllegalParamsaritytr246tr247ER_SPACE_DISABLEDibufEVBREAK_ONEva_listER_WAL_IOst90repeatst92st93st94st95namesst97st98st99linktr252tr254tr255tr258tr259tr93~LoggedError_test_eof192cb_ctx_test_eof194sizeMEMC_GET_HITev_io/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/memcached.ccDELETE_1_3add_tupletr262tr263tr264tr265tr267ER_NO_SUCH_SPACEsize_t_test_eof62_test_eof63uint8_ton_bindER_FIELD_TYPEtr276tr277space_ZN11LoggedErrorD0Evitem_sizeER_ARG_TYPEtarantool_coroER_TUPLE_NOT_FOUNDaddriovectr281panic_on_wal_errorbytes_writtenm_file_test_eof2_test_eof3_test_eof4_test_eof5tbuf_read_fieldpick_varint32_test_eof7_test_eof8_test_eof9_test_eof79slab_alloc_minimalmemcached_indexITER_BITS_ALL_SETis_uniquetotal_connectionsslab_cache_statssecondary_portcode_Z14memcached_loopP5ev_ioP5iobuf_Z14memcached_initPKci__vtbl_ptr_type_ZN11ClientErrorD0Ev_test_eof12_test_eof13_test_eof14_test_eof15_test_eof16_test_eof17_test_eof18_test_eof19on_bind_paramER_SPLICEmemcached_init_test_eof81SELECT_test_eof20_test_eof21_test_eof22_test_eof23_test_eof24slabslocal_hot_standby_test_eof27_test_eof28_test_eof29~Objectcoio_serviceload_varint32ER_KEY_FIELD_TYPEvaluetuple_endER_NO_SUCH_FIELDvtab_test_eof30_test_eof31_test_eof32_test_eof33_test_eof34_test_eof35_test_eof36_test_eof37_test_eof38_test_eof39TNT_ERRMSG_MAX_ZNK11ClientError7errcodeEvthisREPLACEITER_EQ__ssize_t_test_eof93_test_eof96_test_eof98_test_eof41_test_eof42_test_eof43_test_eof44ER_FIBER_STACK_test_eof46_test_eof47_test_eof48_test_eof49st194_Z13memcached_getP4obufmP4tbufbreadaheaderrstrtotal_itemstbuf_store_fieldEVBREAK_CANCELER_SECONDARY_test_eof50_test_eof51_test_eof52_test_eof53_test_eof54_test_eof55_test_eof56_test_eof57_test_eof58_test_eof59pid_filest163_Z22memcached_start_expirevbox_flagsITER_GEtr15tr17tr18ITER_GTmemcached_stop_expirecoio_test_eof60_test_eof61errflagsmemcached_print_stats_test_eof64_test_eof65_test_eof66_test_eof67_test_eof68_test_eof69st100st28st29ev_timertarantool_cfg_spaceslab_alloc_arena_vptr.Object_test_eoftr21tr22tr25tr26timertr28name_test_eof70_test_eof71_test_eof72_test_eof73_test_eof74_test_eof75_test_eof76_test_eof77_test_eof78evio_servicetypes__iobufCNF_OPTIONALtuple_formatsER_TUPLE_IS_ROER_SPACE_EXISTS__packed__logger_nonblockfp_offsetgp_offsetmeta_test_eof80wal_dir_rescan_delay_test_eof82_test_eof83_test_eof84_test_eof85_test_eof86_test_eof87_test_eof88_test_eof89ER_OKBOX_INDEX_MAXbytes_usedsizetypetr40tr45tr46tr49ER_UNUSED_test_eof90_test_eof91_test_eof92value_len_test_eof94_test_eof95tuple_format_test_eof97typedef __va_list_tag __va_list_tag_test_eof99short unsigned intsigned charsuffix_lenkey_partstarttarantool_cfg_space_index_key_fieldtr50fieldnotr53tr54tr57tr58tr59statskeys_countER_EXACT_MATCHst49ITER_LE_ZN11LoggedErrorD2Evappendtr62memcached_findnoreplyITER_LTER_ILLEGAL_PARAMSconfstateindex_noLoggedErroroperator()STRINGwaiter_Z16tbuf_store_fieldP4tbufPKcjS_CRITtr71tr72tr76tr78ER_NO_SUCH_INDEXtuple_field_old_ZN6ObjectD0Evscoped_guardloggerER_KEY_PART_COUNTmemcached_expire_per_loopst134CNF_MISSEDst137iterator_type_MAXtarantool_cfgER_MEMORY_ISSUEtr82tr83tr86tr87BOX_SPACE_MAX_ZN11ClientErrorD2Evget_hitsadmin_portER_TUPLE_FOUNDkey_counttarantool_cfg_space_indexlong inttr90tr91tr92fibertr95m_activeformatst63tr132memcached_gettr134ev_watcher_listst68CNF_WRONGINTstack_sizetnt_error_codes_enumpack_varint32m_funincr_signNUM64coroER_UNUSED8max_fieldnoFiberCancelExceptionkeysin_addruint32_t_Z20memcached_space_initvHASHmake_scoped_guard >uintptr_tto_readmemcached_metalong doubleiov_lenUNKNOWNst158st159_Z22memcached_check_configP13tarantool_cfgbytes_readCNF_NOMEMORYlong unsigned intev_tstampcoredumpfield_countflush_delaytbuf_append_fieldcoro_contextmemstatscharpartsenabledsin_addr__static_initialization_and_destruction_0tuplewal_dirmemcached_statmemcached_en_mainBOX_FIELD_MAXst89keys_to_deleteER_TUPLE_IS_TOO_LONGER_PROC_LUAobuf_create_svpER_UNKNOWN_UPDATE_OPiobufin_addr_tcfg_readahead~ExceptionCNF_WRONGINDEXER_NONMASTERm_errmsgmemcached_check_configst91st96st175tnt_error_codes_enum_MAXDELETES_WARNsuffixibuf_sizeindex_type_MAXITER_ALLev_rt_nowreplication_sourcerequired_Z17tbuf_append_fieldP4tbufPKcrequestsCNF_SYNTAXERRORbox_process_funcwork_dir_ZN9ExceptionD0Evint64_t_ZN6ObjectaSERKS__out_ZN13IllegalParamsD2EvITER_BITS_ALL_NOT_SETbufendgc_pooldoubletbuf_ensure~ClientErrorbox_process_ZN6ObjectD2Evssize_thandler_paramcardinalitytr224tr225st190tr228tr229MEMC_EXPIRED_KEYStr185tr186st196__confetti_flagsdatacoio_read_aheadsalloc_stat_memcached_cbpalloc_poolmemcached_itMEMC_GET_MISSmemcached_start_expirememcached_stat_strs_test_eof6handlerst101st102st103st104st105st106st107st108st109Exception_saytr233tr234tr235tr191bytesst110st111st112st113st114st115st116st117st118st119__priorityguarduniquein_port_tst120st121st122st123st124st125st126st127st128st129ER_INJECTIONlong long unsigned intoffsetTREEcmd_get_Z21memcached_stop_expirevobuf_svpst130st131st132st133errcode_recordst135st136memcached_stat_MAXst138st139key_lenpoolnull_portcoio_breaderrmsg_test_eof100_test_eof101_test_eof102_test_eof103_test_eof104_test_eof105_test_eof106_test_eof107_test_eof108_test_eof109st140st141st142st143st144st145st146st147st148st149ER_UNUSED24ER_UNUSED25ER_UNUSED27ER_UNUSED28ER_UNUSED29ITER_BITS_ANY_SETmemcached_space_init_test_eof110_test_eof111_test_eof112_test_eof113_test_eof114_test_eof115_test_eof116format_id_test_eof119st150st151st152st153st154st155st156st157ER_UNUSED30ER_UNUSED31ER_UNUSED32ER_UNUSED33ER_UNUSED34ER_UNUSED35ER_UNUSED36ER_UNUSED37io_collect_intervalmemcached_delete_expired_keys__in_chrgmemcached_is_expired_test_eof120_test_eof121_test_eof122_test_eof123_test_eof124_test_eof125_test_eof126_test_eof127_test_eof128_test_eof129st160st161st162st164st165st166st167st168st169long long intER_UNUSED46errdescport_test_eof130_test_eof131_test_eof132_test_eof133_test_eof134_test_eof135_test_eof136_test_eof137_test_eof138_test_eof139st170st171st172st173st174st51st176st177st178st179port_vtab__coiomemcached_natoq_test_eof140_test_eof141_test_eof142_test_eof143_test_eof144_test_eof145_test_eof146EVBREAK_ALL_test_eof148_test_eof149iov_basest180st181st182st183st184st185st186st187st188st189tuple_format_idER_NO_SUCH_PROCmemcached_expire_loopCNF_NOTSETlog_levelCNF_INTERNALERRORkey_defs_test_eof150_test_eof151_test_eof152_test_eof153_test_eof154_test_eof155_test_eof157_test_eof158wal_modetr117__FUNCTION__st191st192st193on_acceptst195ScopedGuardst197fstartdelay_test_eof160wal_writer_inbox_size_test_eof162events_test_eof164_test_eof165_test_eof166_test_eof167_test_eof168_test_eof169unsigned intiteratorsalloc_stat_memcached_cb_ctxactiveBITSETshort int_GLOBAL__sub_I_memcached_stat_strsbegin_test_eof170_test_eof171_test_eof172_test_eof173_test_eof174_test_eof175_test_eof176_test_eof177_test_eof178_test_eof179prevmemcached_deleterows_per_waliterator_typeev_now_test_eof180flags_test_eof182_test_eof183_test_eof184_test_eof185_test_eof186_test_eof187_test_eof188_test_eof189f_dataGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \AC M |AC O %AC ` =AC x &AC a =AC x &AC a <7AC 2 \=AC x |&AC a zPLRx $$AC G AC  RAC M $hAC c  %AC    }AC x )AC d AC Q uAC p |AC w  ?AC z ,&AC a L1AC l lXAC S oAC j dAC _ ^AC Y SAC N  tqAC l $_AC GS  AC   AC  4AC o  (VAC Q wAC r [AC V $OAC J  AC   AC  9AC 4 $ZAC HM PAC K WAC R $|AC G <AC  \)AC d |AC  AC  $$yAC Eo LAC E$lAC E ,]AC X L3AC n l,AC g ,AC g =AC x &AC a .AC i  AC P .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.text._ZNK9Exception6errmsgEv.text._ZNK11ClientError7errcodeEv.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rela.rodata.rela.text._ZN11LoggedErrorD2Ev.rela.text._ZN11LoggedErrorD0Ev.rela.gcc_except_table.rela.rodata._ZTV13IllegalParams.rela.text._ZN13IllegalParamsD2Ev.rela.text._ZN13IllegalParamsD0Ev.rela.rodata._ZTV11LoggedError.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS20FiberCancelException.rela.rodata._ZTI20FiberCancelException.rodata._ZTS13IllegalParams.rela.rodata._ZTI13IllegalParams.rodata._ZTS11LoggedError.rela.rodata._ZTI11LoggedError.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.init_array.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.groupA@hkAHhAPhAXhA`hlAhhAphmAxhAhnAhAhAhoAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAh  yah&, 611Z0h!P&KZ0h#e*>= [Hh'|&h[0h)=[Hh+&[0h-$@\Xh/1P=,hsHh1Q&Ls0h3qlsh5( ptHh7=tHh9&u0h; ( 0uHh= `( xuHh?( #u0hA< XSuHhDo8vHhG0@vHhJXpvHhM0OJwHhPi}Xw0hSwhUg]whW?*:y0;-hZEG8iPh\5H@ jph^uR=-8h`0Y)0 "(7((208hePH@i X !#%&%')+-/'%7>/13e\/57R/. h1/ [ % }8 )a w u/  |h ?/ &C 1Z XuV o d d @' D5 HK P` Xr*^j%4YV/Ewf&[ `HO/9<ZbW3ޱ,V)k ///` ,cޱ, ,79;=?ACDFGIJLMOP6./H0/LK/P`/TRSwdUWYZ\^`bde  c     "!1 !A   "!1- "#&< "%T "&p "'= !?( "'= ")& "+=  "+= "-&  "1=' !=(9 "1=N "3&c x }   "9= !J     & 9 @ Q y   (   0 S q L_ % + 4 8 @ G S ]        - > F j      !P <P$1G_m!D|!GëU{Vy!q=M]Xp!7(";&"9=!C !S!!F<!IP!Mb!Lt!O!Rmemcached.cc_ZL11space_indexP5spacej_ZL13load_varint32PPKc_ZZL13load_varint32PPKcE12__FUNCTION___ZL13pick_varint32PPKcS0__ZZL13pick_varint32PPKcS0_E12__FUNCTION___ZL13pack_varint32Pcj_ZL15tuple_format_idP12tuple_format_ZZL15tuple_format_idP12tuple_formatE12__FUNCTION___ZL12tuple_formatPK5tuple_ZZL12tuple_formatPK5tupleE12__FUNCTION___ZL15tuple_field_oldPK12tuple_formatPK5tuplej_ZL11tuple_fieldPK5tuplejPj_ZL12tuple_rewindP14tuple_iteratorPK5tupleev_nowtbuf_ensure_ZZ11tbuf_ensureE12__FUNCTION__tbuf_append_ZL15coio_read_aheadP5ev_ioPvmm_ZL9ibuf_sizeP4ibuf_ZL11ibuf_unusedP4ibuf_ZL15obuf_create_svpP4obuf_ZL10coio_breadP5ev_ioP4ibufm_ZN12_GLOBAL__N_124memcached_stat_strs_initC2EPPKc_ZN12_GLOBAL__N_124memcached_stat_strs_initC1EPPKc_ZN12_GLOBAL__N_1L24memcached_stat_strs_initE_ZL9stat_base_ZL16memcached_expire_ZL15memcached_index_ZL12memcached_it_ZL15memcached_natoqPKcS0__ZL15memcached_storePKcjjjS0__ZZL15memcached_storePKcjjjS0_E3cas_ZL16memcached_deletePKc_ZL14memcached_findPKc_ZL14memcached_metaP5tuple_ZZL14memcached_metaP5tupleE12__FUNCTION___ZL20memcached_is_expiredP5tuple_ZL20memcached_is_numericPKcj_ZL5stats_ZL24salloc_stat_memcached_cbPK16slab_cache_statsPv_ZL21memcached_print_statsP4obuf_ZZ13memcached_getP4obufmP4tbufbE12__FUNCTION___ZL19memcached_flush_allP13__va_list_tag_ZL18memcached_dispatchP5ev_ioP5iobuf_ZZL17memcached_handlerP13__va_list_tagENKUlvE_clEv_ZL17memcached_handlerP13__va_list_tag_Z17make_scoped_guardIZL17memcached_handlerP13__va_list_tagEUlvE_E11ScopedGuardIT_ES4__ZN11ScopedGuardIZL17memcached_handlerP13__va_list_tagEUlvE_ED1Ev_ZL14memcached_freev_ZZ14memcached_initPKciE9memcached_ZZ29memcached_delete_expired_keysP4tbufE12__FUNCTION___ZZ22memcached_start_expirevE12__FUNCTION___ZZ21memcached_stop_expirevE12__FUNCTION___ZN11ScopedGuardIZL17memcached_handlerP13__va_list_tagEUlvE_EC1ERKS2__ZN11ScopedGuardIZL17memcached_handlerP13__va_list_tagEUlvE_ED2Ev_ZN11ScopedGuardIZL17memcached_handlerP13__va_list_tagEUlvE_EC2ERKS2__Z41__static_initialization_and_destruction_0ii_ZL15memcached_start_ZL21memcached_first_final_ZL15memcached_error_ZL17memcached_en_main_GLOBAL__sub_I_memcached_stat_strs_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN11ClientErrorD5Ev_ZN11LoggedErrorD5Ev_ZN13IllegalParamsD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZNK9Exception6errmsgEv_ZNK11ClientError7errcodeEv_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Evassert_fail_ZN11LoggedErrorD2Ev_ZTV11LoggedError_ZN11LoggedErrorD1Ev_ZN11LoggedErrorD0Ev__gxx_personality_v0_say__cxa_allocate_exception_ZN13IllegalParamsC1EPKcjS1__ZN13IllegalParamsD1Ev_ZTI13IllegalParams__cxa_throw__cxa_free_exception_Unwind_Resumetuple_formatsev_rt_nowtbuf_ensure_resizememcpyTIMEOUT_INFINITY_Z23coio_read_ahead_timeoutP5ev_ioPvmmd_Z12ibuf_reserveP4ibufmmemcached_stat_strsmemset__packed___Z17tbuf_append_fieldP4tbufPKc_Z16tbuf_store_fieldP4tbufPKcj_Z15tbuf_read_fieldP4tbuf_GLOBAL_OFFSET_TABLE_fibertbuf_newcfgsprintfstrlenbox_processnull_port_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2_getpidtbuf_printftarantool_uptime_Z8obuf_dupP4obufPKvm_Z13memcached_getP4obufmP4tbufb_Z12stat_collectiil_Z10tuple_nextP14tuple_iteratorPj_Z11fiber_sleepdstrncmp_Z9fiber_newPKcPFvP13__va_list_tagE_Z10fiber_callP5fiberzmemmem_Z20obuf_rollback_to_svpP4obufP8obuf_svp__cxa_end_catch__cxa_begin_catch_ZTI11ClientError_Z14memcached_loopP5ev_ioP5iobuf_Z11iobuf_flushP5iobufP5ev_io_Z8fiber_gcv_Z10evio_closeP5ev_io_Z12iobuf_deleteP5iobuf__cxa_rethrow_ZTI9Exception_ZTI20FiberCancelException_Z22memcached_check_configP13tarantool_cfgout_warning_Z14memcached_initPKciatexit_Z13stat_registerPPKcm_Z10space_by_nj_Z17coio_service_initP12coio_servicePKcS2_iPFvP13__va_list_tagEPv_Z18evio_service_startP12evio_service_Z20memcached_space_initvmalloc_Z9space_newjP7key_defjj_Z29memcached_delete_expired_keysP4tbuf_Z20fiber_setcancellableb_Z21memcached_expire_loopP13__va_list_tag_Z22memcached_start_expirev_Z21memcached_stop_expirev_Z12fiber_cancelP5fiber_ZTV13IllegalParams_ZN13IllegalParamsD0Ev_ZNK11ClientError3logEv_ZN13IllegalParamsD2Ev__cxa_pure_virtual_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS20FiberCancelException_ZTS13IllegalParams_ZTI11LoggedError_ZTS11LoggedError_ZTS11ClientError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoEE O T LYB L Q jV   L  p ~  % -2 7 ?  p ~     Ue k pq ~     ;K Q pW ~f }    7G M pS ~b y @   3C I pO ~^ u} i    *    = x     2 h   0 z  :   y     $ F  p ~      $ EXg < H, @X d  4LEL    ) 6;] j     \ # :d K*0h9 fFLdU bilr t |       #-5,=$I,Z,| < V g@l%l,9 mH f@   /F]g q v {@ |!|'@8IY  -; CJ\ gHOL`LpLL   (5 X F!$ $ %/%J%% %%t%t% %&\"&\3& 2;&7' ?'^'''' ( (t(t2( :(h(\s(\( 2() ))))O* W*c*tn*t* **\*\* 2*+ +,>,Y,, ,,,-t-t- --\-\- 2.. /$/F/a// ///0t0t0 00\0\1 2 1 2 212S2n22 2223t3t3 33\3\4 24*5 25Q5s555 ;5%6 G-696tD6t^6 f66\6\6 267 7788w8 ;88 G88t8t8 8"9\-9\>9 2F9G: O:n:::; ;;B; GJ;V;ta;t{; ;;\;\; 2;<$<?<< ;<r=== P==t=t=\ >\2>C> K>a> Xi>>>>? ;"??@@ P&@K@tV@t@\@\@@ @@ X@A%A@AA ;AsBBB PBBtBtC\ C\3CDC LCbC XjCCCC!D ;)DND VDDEEvE ;~EE EEEF]F ;eFF FFFF F FG$G ,GYG{GG G GGG GGH$H )H .HPHaH iHHHHHI-J 5JTJvJJJ JKt Kt%K -K[K\fK\wK 2K{L LLLL:M BMNMtYMtsM {MM\M\M 2MN NNO2OO OOtOtO OO\P\P 2 P3Q ;QZQ|QQQtQtQ QR\ R\R 2$R S (SGSiSSStStS SS\S\ T 2TU U9U[UvUUtUtU UU\U\U 2VV8VuZ`h/msx~%+ :   ˗ ӗڗ V ^И ؘ* 27D_w љ ٙޙ &5=Ogx Ś ͚ܚ ',>Yq y˛ ӛ؛ %4<Nfw ɜ ќ# +0=Xp xʝ ҝם .6H`q y~ ƞ՞ݞ  %7Rj rğ ̟џ -5G_p x}  ʠ٠  $)6Qi qá ˡСݡ '/AYj rwТ آ* 27D_w ѣ ٣ޣ &5=Ogx Ť ͤܤ ',9Tl tƥ Υӥ *2D\m uz ¦Ѧ٦ !.  *29Hddʨݨhhdd KXgpx 4 @Cy hTTT٫ ޫ @L/ 9 > CH M`r 3Z@flxLL4 *5CK[e o t y~  ϮLLTL TL+;RT\T   !,:BMTXTdPm|D    ° ǰΰDհD  - ?S^iDs `}  .D@T Y @ +  7  7 (Ԋ08@& H[ P Xw!`!h!pK"x"P##VV0WeWWWX9XnXXXYJYYYZZ[ z[([0\8\@>]H]P]X]`)^h^^p^x^^7_l___``3aaabb?ccdMd d d  e Be we( e0 e8 (f@ gfH fP fX "g` ^gh Ohp zhx h @i i i j Hj }j j j k ck k k l Dl ol `m +n [n n o o( 2p0 gp8 p@ pH qP ;qX q` qh qp +rx `r r r r 's \s s s gt t 8u mu u u  v Av vv v v 1w fw w( x0 x8 y@ cyH yP yX y` /zh \zp zx z z 0{ e{ { { { 1| f| | | | 3} h} } } ~ 2~ # N  ( B0 8 G@ H P <X q` h ۂp x E z   : e V  ̅ * u / z  5 o  و  C x ( 0 8 T@ H P ;X ` Ah _p Nfx A q v A wy A A A A A A Cz { |  A AAAAA A(A0A8A@AHAPAX`Ah_pNfxAqvAwyAAAAAACz{| 7  H L h     7   d c h h^  h f` - g2 hO hT h9` hn h| h- hx h' h h h hi hd h h| h' h h2 h& h>' h2 h = hH h S hS ^ hsi hd hP$ hu h h h hK h" h h  h  h hg h h h' h- h3 h: hXF h,L hV R h'X h_ hk hy h h hi hw h h ho h h h( h h* hn hQ  h& h, h2 h]8 h!> hD heK h'W h[e h=t h h h~" h h$ h h  h hH$! h>8 h@ hL hR hyX hY^ h2d hj hS p hv h| h h+  h hE  h h\  hj  hx  h  h  h  h  hz  h  h  h  h! h! h h! h! h! h" h"  h" h" h" h#$ h #* h#0 hB6 h < h B h\ H h{N hT h,Z h` h<$f h"l hr hw x h &~ h h  h hd h h h  h h.$ h8  h h& h h h h* hb h7  hL ht - h; hV&V h?u h h  h h$ h h  hO  h% h | h. h h h he h' h h h h[E hX R h'a hp h h h[ hT' h h' h h% hP h h# h h% h hN hN hh hM  h hR h(. h[C h+O hVk hy h h hp hR) h( h h h, h2 hT8 h> hjD hJ hzP h7V h\ hTb h/&h hn hD&u h h h h h h h h h hQ h h h- ho; h<I h> W hLr h} hw h hG h h h h h# h:& h h: h$ hu2 hH@ hN h\ hj hx h h%# h h h h( h1' h& h h  h h + h: hI ha X hg hHv hh h h4 hq h h7  h hF  h h h " h. hR < hJ h# X hf h h  h% h h h hG h h h h hS hw+ h?R hY he hs h  h  hm h& hF h h'  h h&& h.6 h B h z h h hN h  hF  h  h~ ' h5 hF D hAY hh h[ h h h hK  hf h  h h h h h`, h(I hU hc hMq hy h[  hE h hW h6 h h  h' h h#  h*  h& h65 h'R h'n h h' hD hx h6 h^ h | h hd h  h#  h h  hq h& hdI hdl h_ h h h h h hD h7 hf R hf n hf  h h h h  h$ h* hD h h h hW# h1 d# h'/&7 d`RZb dp h d  h h% d hv h# hW#7 h; C =K df h~j r &z d@ h hW# h  = d h  & d h4)%1\9 d`C hQ1YZb h&m h hW# h= d h= & d  h &\.76 d@ h\od.m h&x hF  h7 d hTB h  h%. # d@- h?;C, L h&Ww h .   d h:   h? h& h   d h?& hB J S ha hZo wY  hBo   h 8  d` h "6 + h; h\B8 Ja R dj h h(a w  d  hw   d h#   h& h#  + h 3 dI hf hp h x  d@ h! h h   d h ! ho ! ! ! d %! h 4! h>! F!V N! d` f! n!P ! h !V ! ! d ! h!!j ! " h" h '" /"*7" d V" h#%`"*h"p" d z" h"6""@"s" h" h<" h,""" d ##%# h(3# hF D# hJ# hN#V#L^# d@ t# h##@# h# h # h#L## d $[$$ h%$ hl5$ hu;$C$jK$ d d$ h`s$ h($ h$ h$$^$ h$ h$$ % h )% h(/%j7%%?% d` W%v_%h% h v% h% h:%%%Y% d % h%Y%% d % h%e&& h&& h&1&W& ha#a&i&&q& d {& h&&$& h&&&& d & h& h&1&z' h''!' d@+' h9' h2 G'O'n' hGt'|'' d''' h[' hQ' h''' d( h( h!( h 1(9(B( h&M(V(^^(`g( h( hT( h( h ( h( h(F)1) h8)@)H) d``)h)q) h') h) h))<) d) h!) hA) h#)) h )Nw* h#** h *w'* h#.*7* h#>*sG* h N*vW* h ^*vg* h#n*cw* h~*<* h*^v* h#*S* h*)v* hv#*C* h*u* h"*3* h*u* h^(*+ h+#+ h+u'+ h.+7+ h>+UuG+ hq"N+W+ hd"^+g+ hm+tv+ h}+t+ h%+և+ hW"++ h+Ot+ h+Ft+ h+ u+ hJ"+ӑ+ h="+Ñ+ h+s, h~ ,s, h,s%, h+,s4, h0";,D, hK,DsT, h#"[,d, hk,st, hw!{,, h^,r, hj!,, hX,r, h]!,s, hR,}r, hP!,c, hL,Hr, hC!,S- hF -r- h6!-C$- h@+-q4- h)!;-3D- h$K-bT- h![-#d- h4k-jqt- hQ{-bq- h!-- h.-#q- h!-- h-p- h]-- h -p- hT-- h -p. h- .Ӑ. h .Op$. hH+.Ð4. h;.pD. hK.T. h[.d. h j.os. hz.o. h1 .ч. h<.. h .n. h.n. h .o. h.. h.s. hK.n/ h/m/ h /Cn / h'/n0/ h7/c@/ h F/HmO/ hiV/l_/ hf/So/ hv/Wl/ h|/C/ h /,l/ h // hp/3/ h /k/ hd/#/ h /k/ hX// h(00 hL00 h &0Kk/0 h_60Ck?0 h@F0O0 h(V0_0 h f0ko0 h4v00 h 0j0 h0ӏ0 h 0j0 h(00 h0Ï0 h 0ej0 h.00 h9 00j0 h~11 h4 1i1 hr&1/1 h/ 61i?1 h$E1>N1 hfU1^1 h* d1pim1 hZt1s}1 h% 1(i1 h1i1 h1Ui1 h1 i1 hN1c1 h 1h1 h&1h1 hB1S1 h 2bh 2 h62C2 h !27h*2 hi12g:2 h*A23J2 hQ2;gZ2 h a2Fgj2 hcq22gz2 h2#2 h 2 g2 h22 h 2k2 h 2f2 h22 hu2f2 h22 hu3 3 h 3f3 h!3f*3 hi13ӎ:3 hA3eJ3 h]Q3ÎZ3 ha3ej3 h q3z3 hF3_e3 h 33 h3*e3 h233 h3d3 h&33 h3d3 h3s3 hi4d 4 h4c4 hd 45d)4 h04S94 h_?4cH4 hO4cX4 h _4dh4 h&o4cx4 hk44 h4C4 hZ4rc4 h4ic4 h{434 hU4'c4 h4 c4 ho4#4 hP4b5 h 5b5 hc5%5 hK+5~b45 h;5bD5 hWK5T5 hFZ5ac5 hj5as5 hKz55 h$5ya5 h5_a5 h%5+5 h?55 h25a5 h5a5 h5Ӎ5 h 5`6 h6Í6 h6` 6 h'6_06 h76@6 hG6_P6 hW6`6 hg6_p6 h w66 h 6T_6 h)6c6 h66 hx6s6 h6^6 hl6c6 h6^6 h%6W7 h`7S7 h7{^ 7 h '7C07 h77F^@7 h%F7O7 hV73_7 hf7^o7 h(v737 h7#7 h7]7 h77 h7]7 h 77 h77 h7m]7 h77 h8!] 8 h8&]8 h@$8S]-8 h%38b<8 hC8]L8 hS8\8 hb8\k8 hr8\{8 h%88 h8ӌ8 h8g\8 h8[8 h8Ì8 h8[8 h8[8 h88 h8b[9 h9H[9 hz9'9 h-9[69 h=9ZF9 hM9V9 h]9Zf9 hm9v9 h|9Z9 h9Y9 h%99 h9s9 h9Y9 h?9Y9 h9Y9 h9c9 h%9i: h: :gY: h:S$: h5+:2Y4: h;:CD: h0K:XT: h[:3d: h+k:Xt: h{:#: hQ(:: h:: h!:VX: h$:": h:: h:!X: ha:: h}:W; hU ;; hx;W$; hI+;Ӌ4; hs;;WD; h=K;ËT; hn[;MWd; h1k;t; hi{;W; h*(;s; h%;; hd;V; h;; h;V; h_;V; h;; h ; V< h+ <T< h'<S < h &<-R/< h($6<?< h E<*PN< h)U<C^< hz d<Mm< h"$t<Â}< h <K< hs<$I< h<H< h <vH< hx<G< h<6G< h,<F< hE<E< h<`D= ho =}C= hK=@"= h7()=2= h8=v>A= h{G=;P= hV=P9_= h1e=6n= hu=~= h== h!= 4= h=ۖ= h&=q= h9 =Ζ= h=1= h== h&== h% > > h5> .> h)">S+> h&2>;> h^B>K> hQ>*Z> h a>Tj> hE)q>z> h>(> h8)>> h%>> h>D&> h'>[V> h+)>s> h%>> h>> h%>? h?V? h?yV'? h -?#6? h =?tF? hZL?#U? h[?z#d? h1k?dt? hUz?8#? h?"? h ?? h%?T? hP?~"? h?u"? h#?D?3"? h?"? h @Y@ h@4$@!-@ h3@!<@ h C@L@ h S@$b@!k@ h%q@]z@ h@@_!@ h@ @ h %@@ h @@ h @@n @ h @@ h @A hx( AӕAC %A hk(,AÕ5A h T hETNTLVTmT h |T hT hvTTT dT fT h!T hAT fT hU h%U hqU hvU~UU dU h=UUU h!U hAU f U f0 V hV h'V/V7V d@AV hkWV h ^VfVënV duV h|V hVëVVV dV hV hHVҫVTV hVV h"V hVVW W d`W^W&W h8W h9#?W hCWKWSW d]W hmW"uW~W hW h&WW h'W)WW h&W hWWqX d  X h'X0X8XqAX hPXXX eX htXC|XXOXX hX XqX hX hXqYMY dlYzYF#Y h&.Y7Y?YEsY h zY hc ~YMYY dYQYY h&Y`Y h1YYݱY d,Y hxZ hZ h(Z hW#(C((C()ps0)8[*@`*H*P*X*`h+,svQ,,,--.0./vy0Y/8/@/H0P0X 1`=hܛ1*2y|f222334<4J5|0585@5H16P66Xj6`o6h6px4678888888J9<۝ Y9(g:08P:X;`;hN;pS;x;;;7<<<O>T>m>)>&?+?@ @(@068՟P8AXA`AhPCpUCxnCC-D2DZD-EEEE5ԡ E(iF0nF8F@ܡH{`?IhMJpxJJJ1K6KKCKLLFM KM(M0M8M@H`MhNpx*OOOOO$P0EPSQ2R@S (@$TH2UPXpxjp%%J J W c t0 W8 c@ tH ` h yp x 1  &       =   &   =   &  =  & J J= K( K&&h, , , , ,, -J+-K @`    @%` \ 7(. H Q Pl u _8 a w  h 0 P p V  * k4L= w\e j %Y &(HQ lu  <! @`ëV P lq 0MPpޱ JK6dfiber.cc.o/ 1378727479 1000 1000 100664 88912 ` ELF>x@@YV "%')02468:;=>@ACDUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEHUHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHHH}HuHEHFHUHEHHUHHH}HuHEHHUHEHHUHHH}HEH@(HtHEH@(HUHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uETHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!Ѕ=EEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uEAHEH@UHHЋE!ЅUEH([]UHSH8H}HuHUHMHE؋@EHE؋PHE؋@9#HE؋@(HtHUHEHHJHE؋PHE؋@9Ht/HE؋@pHUHEHѺHHE؋@(t HEH@0HUHuHѺH)HUHMHEHH?EHEH@UHHЋE!ЉE}HEH@UHHHEH@MHHȋ0E HE؋@PHE؉PHEH@UHHЋE!ЅuHE؋@PHE؉PHEHUHH HEкHHH}tiHEH\H}t)HEHUHH HEHHHHEHUHH HEкHHEH8[]UHSH(H}uHUHE@;EHEH@UHHЋE!ЅHEH@UHHHEH@MHHȋ0E!HE@PHEPHEH@UHHЋE!ЅuHE@PHEPHE@(HtHU؋MHEHH([]UHH0H}HuHUHUHMHEHHoEHE@;EtHU؋MHEHUH}E]UHH}HHHEH]UHHHXH`HhLpLxt )E)M)U)])e)m)u)}H8dH%HHdH%HdH%HH)H~IHHuJH8dH%dH%HHHHdH%HHHH8@PH8PdH%dH%RxPxdH%H`@0HUHPHPHPH8HPHHHHHUHATSHdH%HdH%HH)HLD$^H$AA^AҿHù^H߸HIHLHH[A\]UHHH}HE@xunHE@xƒHEPxdH%HHftdH%HHHEHPHdH%HHHUHHH}HE@0uHE@xtHE@xƒHEPxdH%H9EuqHE@xtHEHǸHE@0tBHEHHtdH%HEHUHdH%@x]UHATSHLD$H$AAAҿHúHHIHLHH[A\]UHEdH%@xE}tdH%dH%RxPxdH%dH%RxPxE]UHHdH%HdH%dH%HHEdH%HEHEdH%HEHHE@PHEPHEHPHEHHHUHH H}udH%H=tHEH@HEHE@HEHHǸUHHPEHUHE@@HE@HEHUHEHB HEHEHEdH%HEHEHEHEHHEHEHUHHH}HEHUHHEHEHEEUHHH}uUHEHUHHP}HUHE@@HE@HEEEEdH%HEHEHHEHEEEHUHHH}udH%H=t/HEH@HǸUHH H}uHdH%HHHEHEHHHEHEHHHHEHǸdH%HHuUHH(}HEHEE܉EdH%HMHHEdH%@;EudH%UH,H@UHH H}HE@0EHEHEdH%HuH HUHH H}HEHEHE@0EdH%HMHHLHUHdH%H@(HH=tdH%H@(HdH%H@(H]UHdH%HHtdH%HHdH%HHHdH%HǀdH%HdH%H@XdH%HdH%@0dH%@xdH%H@(HdH%HP8dH%HHH]UHSH(H}dH%Ht"dH%H@XHtdH%@0u}dH%H@XdH%H`HHHHHHHHHHHtHHHEHdH%H%IAHdH%HIAHHEHEHHHHUHHHdH%HnIAHdH%H2IAӿUHHH}HuH}uHEH@(HUHHUHH H}HuHEdH%HHtNdH%HHHEHEH8HEHEHP8dH%HHHHHHEHEHHEHHHHEHP(HEHP8dH%HHH)HEHHHHEHUHPXd%d%d%ct d%dd%HEP0HE@4HE@xHEHǀHUHEHHHEH"HEUHHH}dH%H9EtTHEHHu5HEHHHHEH@(HHEHHUHH0dH%HHHEHEH8HE,HEHHEH8HHEHEH8HEHEHP8dH%HH9udH%HHEHEHEH8HE,HEHHEH8H)HEHEH8HEHEHP8dH%HH9uUHH H}HuHEHPHEH@ HHEHEP0HEHǸHEPHEHǸHEH8HHEHǸHUHEHǸHEHP HEHHHEHHHHHEHǸUHH@H}HEȾHǸdH%HHHEHEH8HE3HUHEHHHEH8HHEHEH8HEHEHP8dH%HH9udH%HHQHEHEH8HE3HUHEHHHHEH8H.HEHEH8HEHEHP8dH%HH9uUHdH%HHdH%HHdH%HHdH%HdH%HdH%dH%d%d dH%HdH%H@@dH%H@dH%dH%HH]UHdH%HHdH%HtdH%H]UHHH}HEHt HEHUHHH}HEHHEHUHHH}HEHHEHt HEHUHHH}HEHHEHUHH H}HuUHEUHMHHHEHFiberCancelException/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/fiber.h(none)/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fiber.ccsp + 1 - call_stack < FIBER_CALL_STACKcallerClientError%s at %s:%if->fid != 0!(f->flags & FIBER_CANCEL)f->waiter == NULLfiber == &schedzombiefiber != NULL && fiber->f != NULL && fiber->fid != 0fiber `%s' has been cancelledfiber `%s': exitingfiber `%s': unknown exceptionname != NULLsched - fid: %4i csw: %i name: %s stack: %p backtrace: %sfibers:  5a 0`   0 ` Y0`fiber_set_namefiber_loopfiber_schedulefiber_schedule_timeoutfiber_cancelfiber_callUHHH}L AHAUHHH}HEHHEHt HEHUHHH}HEHHEHqTq zXy|8?B>EHE.Qsu ee}}UHHH}HEHHEHt HEHUHHH}HEHHEH9Exception20FiberCancelException11ClientError6Object$&Jint0c3| J Ճ J J ( $` &J# &J# &J# &# cb &v# p p J` ' ( * ,J# ,J# ,J# ,# cb ,# ,#   J ( 0q 2J# 2J# 2J# 2# cb 2# at 2#   J q 3  0 A CJ# CJ# CJ# C# cb C*# at C# E#( $ $ J F 8 _ aJ# aJ# aJ# a# cb a# a# cJ#( pid dJ#, eJ#0 fJ#4   J< g< ( n J# J# J# # cb # # ~ ~ Jn   sp##ctx$#%#&#(!!f|#|###f#$#%#&X#x      !"#$%&'()*+,-./0123456789:)H-q.q#/q#HM+O#cswQJ#R#T1#(fidVq#0sid`q#4bH#8cH#HfiH#Xjf#`kq#xlN#+ B B!7wc#?##T c####E  c#"##?#$?#%E #K &( )c#-#5#;#A# G?#$J?#(M?#,P#0S?#8V#@Y#H\#P_#Xb#`e#hm#pp#xs#v?#y?#|#?#?######?#?###?#?##?##Ξ#ϰ # Q ) +q#-q#/#01#)* key*q#val+#Gq8[ p\ #b] #^1 #_1 #`1 #a1 #b1 # d1 #$e1 #(f1 #,g #0 1 < `  / 6 f6 #< #w@  #m y  B  |logGC  C  J$# 4# 6|# 9#!'>Elog, bi"/{ |"1   JC #C $ %#"&&0=J*NZ '+t (J)  #*J+,#Z#- "."./MV0 h/|0 h1828hH1B2Bh2B`1N42Nh2N`3Zc2Zh4o2oh42h4J2h385toh2`3t5toh2`6$../t0h/t0h-y  +.+7B7B|/Vo0 h0`0\8 9h:y5fy6 h6U../+40h/Zc0h4 5hh5x1 d< 41 21 l5inc1 h21 d:1 z5hȠP2zH5argɜ@;1 ?hH@z@?ret?argAI;Bx1 \=JX CN ?hNX?xN1 T?argOHC_v?h_X@_zP?arg`H;Bkb1 l12Jl1;2;6 hDE?2E6 ~+;EG6 ~FO O ?G[Dg5fg6 hD5f6 h;F  H< GI< 2< \;E< oD;E6 hE6 `3w2wX2JT;F Eh0} J< 2;EE `K4?f6 hK j@ hK@h@JdLJ ?pid;Bcw ='JlK-@-h@-Jd;F |C4&@4&X@4JT;Bf:6 `;=;,h2HLB6 ?fidBqL;=D PBkE1 lCM@M6 X;=O `CTC@T6 X;=V `M[NjCz@zH;F OBeXPBe P?#K@6 h@`;F L6  @X?fHP;=6 h;=,`KE ?f6 hK!;Bf6 hQ =,`Q =,XQ =,P;=,HC|!?out|!X@6 P;=h Kj"?out|!;=6 hQ!=,`Q""=,XQG"=,P;=,HM M#6 @"".+./""#0"h/"(#1#0"hR DqJ#STy?# w# J J +T>#W#T,1U26  Vcfg*\ |#EL# #TJE1w 6 $E3$  : ; I$ >   I: ;I&I  : ; : ;I8 : ;I8  I5I : ;  : ; I8  : ; I8 I!I/  : ; ( <  : ;  : ;  : ; I8 2 .? 4 < dI4 .? : ; < d.? : ; @L M < d.? L 4 < d : ; I8 2 !.? : ; @I< d".? : ; 2 < d# I$ : ; % I8 4 &.? : ; L < d'.? : ; @I< d(< )!I/*I+, I-.G d.I4 /.1@@dB 01 1.: ; @B 2: ; I 3.: ; @B 4.: ; I@B 5: ; I 6.G: ; d7: ; I8.G@dB 9I4  :.: ; I@B ; <4: ; I =4: ;I >.: ;I@B ?: ;I @: ;I A : ;B4: ;I C.: ;@B D.? : ; @@B E4: ; I F4I4  G.? : ; @@B H.? : ; @I@B I.? : ; @I@B J.? : ; @I@B K.? : ;@@B L.? : ;@I@B M.? : ;@@B N.: ;@B O UP UQ R4: ;I? < S!T4: ; I? < U4: ; I?  V4: ; I? < wwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwvw1&=&67=&=& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/usr/include/x86_64-linux-gnu/bits/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgobject.hrlist.hexception.hfiber.hmhash.hiobuf.hfiber.ccstdint.htypes.hstddef.hunistd.hsigset.hev.hsignal.hcoro.hcoro.hstdarg.herrcode.hsay.htarantool_box_cfg.htbuf.hassoc.hpalloc.htarantool.h % % 8555/!...<tX= ./ ./L. Y%.3g=.M=2Z5y XtM=YJv;g/2T>=t]=K/ 1G5&uu)\(C! =y=6I5Mz=K.u~.22'&h-2*hJ/ /g$%.0Y4=`Y2K=6^J/ ggK .&ɼ .=6<Y2YY6!Y62'ɻYgY2K20'2Yu2!׾K"K1K6KKuK=YK'2 YlX\20z%<<e<<tg.''vYL"%孭/K ."z >%2))3h%;2Z)-)-2Kggg=uɼNg2KhY ## # / ) #  ?# ?_vptr.Object_ZN9ExceptionD2Evmemcached_spacesize_terrflagssizetypef_datatarantool_cfg_space_indexreventsrepeatrpidint32_tER_FIBER_STACKmh_i32ptr_putcall_stack__confetti_flagscfg_readahead_Z10fiber_infoP4tbuf__vtbl_ptr_typecardinalityER_NONMASTERbatchmh_i32ptr_next_slot_ZN9ExceptionD0Evfiber_ready_asyncER_NO_SUCH_FIELDstateER_OKfiber_freeresize_cntwatcher__in_chrgtypepalloc_poolmh_i32ptr_dellog_leveldelayn_dirtyev_childfiber_scheduleready_fibersm_errmsgloggermh_i32ptr_removeput_donefiber_yield_tolocal_hot_standbycoro_contextunregister_fidsig_atomic_tprimary_portlong intfiber_newfiber_yieldwal_writer_inbox_sizekey_fieldS_DEBUGerrstr_ZNK9Exception6errmsgEvregister_fidfiber_cancelhead_Z14wait_for_childi/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fiber.ccrlist_createbacklogsigned charuint8_toperator=wal_dir_rescan_delay_ZN6ObjectD2Evsave_iunsigned chartarantool_cfgcoromemcached_expire_full_sweepS_WARN__FUNCTION__secondary_portmemcached_expire_per_loop__gnuc_va_listlogger_nonblockrlist_move_tailev_asyncwal_fsync_delayER_UNSUPPORTEDcharS_CRITm_linelinetarantool_cfg_space_index_key_fieldcapacitylinkwork_dirER_PROC_RETreplication_sourcethistimer/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/boxflagsreplication_portcalleefp_offsetER_ILLEGAL_PARAMSsay_levelcallerev_tstampnode_Z14fiber_scheduleP10ev_watcheriExceptionrlist_addrlist_nextuniquefilem_file_ZN20FiberCancelExceptionD2Evsnap_io_rate_limitfiber_callstack_topER_TUPLE_IS_ROrlist_add_tailfiber_wakeupmh_i32ptr_put_slot~ClientError_Z14fiber_yield_toP5fiber~ObjectindexS_INFOER_ARG_TYPEev_watcher_timemh_int_t_Z12fiber_wakeupP5fiberscript_direnabledschedER_KEY_PART_COUNT_Z19fiber_yield_timeoutdFIBER_CALL_STACKlong unsigned inttnt_error_codes_enumObjectstatusER_RESERVED11ER_RESERVED12ER_RESERVED13ER_RESERVED14ER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19activependingER_SPACE_EXISTSER_FIELD_TYPEfibersslab_alloc_arena_sayER_RESERVED20ER_RESERVED21ER_RESERVED22ER_RESERVED23update_last_stack_framerstatusfiber_schedule_timeoutER_TUPLE_NOT_FOUNDfiber_info_printlast_used_fidER_NO_SUCH_SPACEspacesentlong long intER_KEY_FIELD_TYPEva_listtarantool_cfg_spacereadaheadfiber_gcenableER_SPACE_DISABLEDslab_alloc_minimaldoublestackslab_alloc_factorER_INJECTIONexistio_collect_intervalgp_offsetER_UNUSED24ER_UNUSED25ER_UNUSED27ER_UNUSED28ER_UNUSED29floateventfiber_schedule_childerrcode_recordunsigned intev_watcher_listtnt_error_codesGNU C++ 4.7.3fiber_is_cancelledER_UNUSED30ER_UNUSED31ER_UNUSED32ER_UNUSED33ER_UNUSED34ER_UNUSED35ER_UNUSED36ER_UNUSED37_ZN11ClientErrorD0Evev_watcherpid_tstack_sizefiber_registryoverflow_arg_areaER_PROC_LUAfiber_destroyER_UNUSED8ER_UNUSED46listS_ERROR_Z16fiber_checkstackverrdescER_UNKNOWN_UPDATE_OPtbufmh_i32ptr_tIOBUF_IOV_MAX_Z13fiber_destroyP5fiber_Z14fiber_set_nameP5fiberPKcwal_dirboolER_UNUSED_Z10fiber_freevmh_i32ptr_node__mptrlong doubleER_SPLICEtnt_error_codes_enum_MAX__pid_tfiber_watcher_dataER_TUPLE_IS_TOO_LONG~ExceptionER_TUPLE_FOUND_ZN20FiberCancelExceptionC2EPKcjwaiter_Z10fiber_callP5fiberz_Z11fiber_yieldvsizelong long unsigned intreg_save_areatimed_outev_rt_nowpoolready_asyncmh_i32ptr_getER_NO_SUCH_INDEXupper_boundfiber_zombificate__ac_prime_listClientErrortoo_long_thresholdlast_stack_frame__sig_atomic_tprimegc_pooleter_poolrlist_firstn_bucketsrlist_moverlist_Z10fiber_initv_ZNK20FiberCancelException3logEvbind_ipaddrrows_per_walresize_positionpid_filefiber_sleepER_EXACT_MATCHnamepanic_on_wal_errormh_i32ptr_node_twal_mode_Z18fiber_is_cancelledvS_FATALadmin_portev_timershort int_ZN6ObjectD0Evfiber_infopriorityFiberCancelException_Z20fiber_schedule_childP8ev_childiER_NO_SUCH_PROCsnap_dirfiber_loopER_SECONDARYitemfieldno_Z11fiber_sleepdfiber_yield_timeout_Z20fiber_setcancellableb_Z9fiber_newPKcPFvP13__va_list_tagEwait_for_childshadowfiber_setcancellablecustom_proc_title_Z10fiber_findjfiber_set_namepanic_on_snap_errormemcached_expireiobuf_init_readahead~FiberCancelExceptionER_WAL_IOER_MEMORY_ISSUEuint32_t_Z17fiber_destroy_allvzombie_fiberserrmsgfiber_initfiberfiber_checkstackfiber_findcoredumpshort unsigned intusernamefiber_testcancelslot_Z16fiber_testcancelv_ZNK9Exception3logEvmemcached_portfiber_destroy_all_ZN6ObjectaSERKS_fiber_name_ZN20FiberCancelExceptionD0Evtarantool_cororlist_emptyER_INDEX_TYPE_Z8fiber_gcvrlist_delnextdata_ZN11ClientErrorD2Evprevtypedef __va_list_tag __va_list_tag_Z12fiber_cancelP5fiberestimated_rowsGCC: (Debian 4.7.3-4) 4.7.3zRx 1AC l <&AC a \!AC \ |GAC B FAC A ?AC z AC M AC M ;AC v <1AC l \1AC l |=AC x &AC a 6AC q 7AC r 2AC m =AC x <&AC a \AC Y |.AC i  AC E  AC E  jAC E`  $AC E ,QAC L LAC M lAC R AC  zPLRx $$AC G AC  AC  4AC U $AC G |dAC _ AC } cAC ^  4AC  $AC _  &AC a @"AC ]  AC ~ PAC K {AC v uAC p  <IAC D  `OAC J ,TAC O LAC  AC EIAC D AC  uAC p AC   AC  ,AC  L:AC 5 lAAC | =AC x &AC a .symtab.strtab.shstrtab.rela.text.data.bss.rela.text._ZN6ObjectD2Ev.rela.text._ZN6ObjectD0Ev.rela.text._ZN9ExceptionD2Ev.rela.text._ZN9ExceptionD0Ev.rela.text._ZN20FiberCancelExceptionC2EPKcj.rodata.rela.text._ZNK20FiberCancelException3logEv.rela.text._ZN11ClientErrorD2Ev.rela.text._ZN11ClientErrorD0Ev.rela.tdata.tbss.rela.gcc_except_table.rela.rodata._ZTV20FiberCancelException.rela.text._ZN20FiberCancelExceptionD2Ev.rela.text._ZN20FiberCancelExceptionD0Ev.rela.rodata._ZTV9Exception.rela.rodata._ZTV6Object.rodata._ZTS9Exception.rela.rodata._ZTI9Exception.rodata._ZTS20FiberCancelException.rela.rodata._ZTI20FiberCancelException.rodata._ZTS11ClientError.rela.rodata._ZTI11ClientError.rodata._ZTS6Object.rela.rodata._ZTI6Object.rela.debug_info.debug_abbrev.rela.debug_loc.rela.debug_aranges.rela.debug_ranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame.group@WQHWpPWRXWt`WShWypWTxWWwWUWWrWmWWWWWWWW W&h, 6110WP&K0Wj=e8HW&0W <60W" !7HW%!=(HW'$"&p0W)D@"?W+KH"VH"Q0W.m#( hHW0(#=0HW2f#&x0W4#( HW6# 0W8$ 3$. HW;J0$rP$mhHW>h$$HWA$$0WD$$(BWF }I@N $,WI/d*P WKCe >0QWMVfQTWOb0]nm0vUHWT؈hXl   !!G!hF0?:FQ;]L1h}1 "$%x2').,1Aj}n$Q+----*->-I-\-n-($ .$ c$P${IO$ #$P 02468:;=>@As$@|CDFHIKMOQST R     "1 !8 "1."&="=O!6(^"=p" &""6!0(""6"%7&"'=;M"'=b")&w+ %;GU k!Ag  3 I Z r"2=!> d$ && "J zPk    Eu RT    I   $ !;3 C g q x    u   & = I S h :x    >A   "4& "2= . !: = f !Dr != !@ !C fiber.ccrlist_createrlist_addrlist_add_tailrlist_delrlist_firstrlist_nextrlist_emptyrlist_moverlist_move_tail_ZL10fiber_nameP5fiber_ZL14mh_i32ptr_nodeP11mh_i32ptr_tj_ZL19mh_i32ptr_next_slotjjj_ZL13mh_i32ptr_getP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL18mh_i32ptr_put_slotP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL13mh_i32ptr_putP11mh_i32ptr_tPK16mh_i32ptr_node_tPPS1_Pv_ZL13mh_i32ptr_delP11mh_i32ptr_tjPv_ZL16mh_i32ptr_removeP11mh_i32ptr_tPK16mh_i32ptr_node_tPv_ZL20iobuf_init_readaheadi_ZL5sched_ZL10call_stack_ZL2sp_ZL13last_used_fid_ZL14fiber_registry_ZL6fibers_ZL13zombie_fibers_ZL12ready_fibers_ZL11ready_async_ZL23update_last_stack_frameP5fiber_ZZ10fiber_callP5fiberzE12__FUNCTION___ZZ12fiber_cancelP5fiberE12__FUNCTION___ZL22fiber_schedule_timeoutP8ev_timeri_ZZL22fiber_schedule_timeoutP8ev_timeriE12__FUNCTION___ZZ14fiber_scheduleP10ev_watcheriE12__FUNCTION___ZL17fiber_ready_asyncP8ev_asynci_ZL12register_fidP5fiber_ZL14unregister_fidP5fiber_ZL17fiber_zombificatev_ZL10fiber_loopPv_ZZL10fiber_loopPvE12__FUNCTION___ZZ14fiber_set_nameP5fiberPKcE12__FUNCTION___ZL16fiber_info_printP4tbufP5fiber_ZL15__ac_prime_list_ZN6ObjectD5Ev_ZN9ExceptionD5Ev_ZN20FiberCancelExceptionC5EPKcj_ZN11ClientErrorD5Ev_ZN20FiberCancelExceptionD5Ev_ZN6ObjectD2Ev_ZTV6Object_ZdlPv_ZN6ObjectD1Ev_ZN6ObjectD0Ev_ZN9ExceptionD2Ev_ZTV9Exception_ZN9ExceptionD1Ev_ZN9ExceptionD0Ev_ZN20FiberCancelExceptionC2EPKcj_ZN9ExceptionC2EPKcj_ZTV20FiberCancelException_ZN20FiberCancelExceptionC1EPKcj_ZNK20FiberCancelException3logEv_saypalloc_name_ZN11ClientErrorD2Ev_ZTV11ClientError_ZN11ClientErrorD1Ev_ZN11ClientErrorD0Ev_Z16mh_i32ptr_resizeP11mh_i32ptr_tPv_Z22mh_i32ptr_start_resizeP11mh_i32ptr_tjjPvmemcpy_Z20mh_i32ptr_del_resizeP11mh_i32ptr_tjPvcfg_readaheadfiber_Z10fiber_callP5fiberz_GLOBAL_OFFSET_TABLE_assert_failcoro_transfer_Z16fiber_checkstackv__gxx_personality_v0__cxa_allocate_exception_ZN11ClientErrorC1EPKcjjz_ZTI11ClientError__cxa_throw__cxa_free_exception_Unwind_Resume_Z12fiber_wakeupP5fiberev_async_send_Z12fiber_cancelP5fiber_Z16fiber_testcancelv_Z11fiber_yieldv_Z18fiber_is_cancelledv_ZN20FiberCancelExceptionD1Ev_ZTI20FiberCancelException_Z20fiber_setcancellableb_Z19fiber_yield_timeoutdev_timer_startev_timer_stop_Z14fiber_yield_toP5fiber_Z11fiber_sleepd_Z20fiber_schedule_childP8ev_childi_Z14fiber_scheduleP10ev_watcheri_Z14wait_for_childiev_child_startev_child_stop_Z10fiber_findj_Z8fiber_gcvpalloc_allocatedpalloc_resetprelease_Z14fiber_set_nameP5fiberPKc__cxa_end_catch__cxa_begin_catchexit_ZTI9Exceptionpalloc_set_name_Z9fiber_newPKcPFvP13__va_list_tagEeter_poolpallocmemset_Z21tarantool_coro_createP14tarantool_coroPFvPvES1_palloc_create_pool_Z13fiber_destroyP5fiberstrcmppalloc_destroy_pool_Z22tarantool_coro_destroyP14tarantool_coro_Z17fiber_destroy_allvtbuf_printfbacktrace_Z10fiber_infoP4tbuf_Z10fiber_initv_Z13mh_i32ptr_newvcfgev_async_start_Z10fiber_freevev_async_stop_Z16mh_i32ptr_deleteP11mh_i32ptr_t_ZN20FiberCancelExceptionD0Ev_ZN20FiberCancelExceptionD2Ev__cxa_pure_virtual_ZTS9Exception_ZTVN10__cxxabiv120__si_class_type_infoE_ZTI6Object_ZTS20FiberCancelException_ZTS11ClientError_ZTS6Object_ZTVN10__cxxabiv117__class_type_infoE{ c`4Zj z $ #  p    p    $ $2 ; M   $ # z p   p $ p1 6 ~; C N Y  ) *  )  p  1 ; p@  E a l    p %       z* p0 6 E p\ i pq xv {        $%$.$>O   p 7  Nfkw% ;KP\gt   p 7).)k&&&&.&L[g}  G,=M]ir(  p P&.9ALitz}  pz  p$+z4E T pgzp  p  p (6(e'|  '%#%+%=%I% &'L'((< IY f~   ! 3'w'(('*)A(NW&f kq(z $  #$ %** **! 0*8M*U^&hq&y m+no n rl7ns n%v0 wz $  }q7n~ n  y wq7n nst op I NW  N N L`- M4 N`; N@ N}T NjY Nlf Nm N,r N N* N9 N\ N? Nz N/ N N N N N Nn NP  N  N% N4 NC N*} N  N7  N N N N* N%  N N( N7 NF N* N N N N N N* Nq1 N= NJ NY Nh Nw N* N% N: Nx N N NR N$ N3 NB N*_ N NR N-  N4 N4 N Nu  N  N#" NI. N < NXJ N X N g N r N ~ N N~  N6 NK N_ N Nb N~ N- N N N ND  N  Nk Nn N| N  N N N N! N' N- N63 ND9 NR? N`E N K N Q NW N ] N c N i Nx o N u N { N  N  N  N  N  N  N N  N N9  Nw  N  N NO  N N N NZ N*  NI  NS  NH N  N  N NC  Nt$ N* N` 0 N6 N< NB NI N U NDc N%x N N  N N  N NY NH N: N , NU Na No N} N N NO N N N N NO N  N N N) N7 NR N ] Nj Nx N? N" NA N# N N@ N N  N[ N{  N Nj N . N< NjJ NX N2f N u NX N/ N NM N N N[ N~ NW N N] N) N 8 N&G NV Ne Nkt N  N N N N N N N* N4  N- N 2 N= N a N o N} N Nd N Np NZ N  N  N N( Nd ( N ? N D N!_ N!{ N! N  N N N N N' N- NM Ntk N N N  N` N N` N? N`a Ntg N N  Nk N N N, N081@ J[ N_g&o J` NK! J N[  N!h J  N N N<h J N& N5 N;CK JU Nd N nv~ J@ N N J N NL J N N L } J`* N9 NB?}GO Jf N N N N = J  N$& J  N N  N5 N 9A6I Jt|7 J@ N N J N N  N/= J9 N =E&M J`d N nv~ J N, J  NY N  NE ,1 J& NBAJ* NX1 J NF  N N%-n5 J@L N{ N dg N  Nn J  N" J 9 NW_w N|} J`  N/  Nn  J  N N N    J  NQ e   N~* N5V N\ Nh ` hg p J w NK} Ng   J  N Nm   J@    N Ne  N$ , 4 J ; NHA N^E M U J \ Nb Nj r z J`  NB    ND N} N   J  NQ N~ N  J ' N{5 NiCKT N_h NY N N J  N N NY N  Nx  J 6 Ns= NAIQ J@[ Nl N s N6w J N{ N  N Nz Jx Ng" N) N-z5= J`G N{V N emv N N6E J N{ Ni#  N& 9 N@ N8HEPX J qPy N N J N N NAR  J N"*F3 NE N9 L NPRX` J@f Np mu} J Ns J N* N L L0 NH! N %-5 JL? NN N]en Ny Ns N J N N+R N&  N6  N  & . J G NN NR Z  b Jll t   B N& P p N&   N& ! ! N& ! N#! +!3! JL! N[!c!l! N#! N ! N!!! J,!!! N!!/! N& !D"d" N& #"+"8" N& H"P"Y" N& l" Ns" Nw"">" J" Ne" N ">"" J" N" N" N";";=" JL# N #<#<&# J2# N* K# NG x# N1# N # N## N #@# N# N#$ N$$#9$$I$ NU$%_$ N k$&u$ N$'$ N$($ N$)$ N9 $*(00<0D1`ht|%%&  ! !("4"<%H%Pg\gdhhiill$@HT\hp|(0K<KDL`LhMtM|PP||}}~~ (4<HP<\<d=%%&55$6@HT\hp6|67(0<<<D=`ht|%%& (4<HP+\+d,,--0000112255$@HT\hpm|mnnoorr    ( 0 < D ` h t |                (  4  <  H  P  \  d       f f g g h h k  k     $  @  H  T  \  h  p  |                  (  0  <  D  `  h  t  |                    ( 4 < H P \ d             $@HT\hp|(0y<yDz`zh{t{|~~DDE E(F4F<IHIP\dQQ$R@RHSTS\VhVp|(0LT`ht|  (4<HPlt      ,4@HT\hp==>>??BB~(~0L;T;`;h;t;|;<;<;=<<<<<<%<%<& H 0@P`p;<-e0-8@@H `hpx1&=&67=&;;=<<&3 #=]t;< @`!h @L`} @`,1 n0Pp    -g  8 X a -   -%$Ddm -3zE -?  -K0RPpy -X 0Pp>;<tarantool-1.5.1.218.g1a69fd6/src/box/hash_index.cc0000664000000000000000000002111312231715257017763 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "hash_index.h" #include "say.h" #include "tuple.h" #include "pickle.h" #include "exception.h" #include "space.h" #include "errinj.h" #include "third_party/PMurHash.h" enum { HASH_SEED = 13U }; static inline bool mh_index_eq(struct tuple *const *tuple_a, struct tuple *const *tuple_b, const struct key_def *key_def) { return tuple_compare(*tuple_a, *tuple_b, key_def) == 0; } static inline bool mh_index_eq_key(const char *key, struct tuple *const *tuple, const struct key_def *key_def) { return tuple_compare_with_key(*tuple, key, key_def->part_count, key_def) == 0; } static inline uint32_t mh_index_hash(struct tuple *const *tuple, const struct key_def *key_def) { struct key_part *part = key_def->parts; uint32_t size = 0; /* * Speed up the simplest case when we have a * single-part hash over an integer field. */ if (key_def->part_count == 1 && part->type == NUM) return *(uint32_t *) tuple_field(*tuple, part->fieldno, &size); uint32_t h = HASH_SEED; uint32_t carry = 0; uint32_t total_size = 0; for ( ; part < key_def->parts + key_def->part_count; part++) { const char *field = tuple_field(*tuple, part->fieldno, &size); assert(size < INT32_MAX); PMurHash32_Process(&h, &carry, field, size); total_size += size; } return PMurHash32_Result(h, carry, total_size); } static inline uint32_t mh_index_hash_key(const char *key, const struct key_def *key_def) { struct key_part *part = key_def->parts; if (key_def->part_count == 1 && part->type == NUM) { (void) load_varint32(&key); return *(uint32_t *) key; } uint32_t h = HASH_SEED; uint32_t carry = 0; uint32_t total_size = 0; for ( ; part < key_def->parts + key_def->part_count; part++) { uint32_t size = load_varint32(&key); if (part->type == NUM64 && size == sizeof(uint32_t)) { /* Allow search in NUM64 indexes using NUM keys. */ uint64_t u64 = *(uint32_t *) key; PMurHash32_Process(&h, &carry, &u64, sizeof(uint64_t)); total_size += sizeof(uint64_t); } else { assert(size < INT32_MAX); PMurHash32_Process(&h, &carry, key, size); total_size += size; } key += size; } return PMurHash32_Result(h, carry, total_size); } #define mh_int_t uint32_t #define mh_arg_t const struct key_def * #define mh_hash(a, arg) mh_index_hash(a, arg) #define mh_hash_key(a, arg) mh_index_hash_key(a, arg) #define mh_eq(a, b, arg) mh_index_eq(a, b, arg) #define mh_eq_key(a, b, arg) mh_index_eq_key(a, b, arg) #define mh_key_t const char * typedef struct tuple * mh_node_t; #define mh_name _index #define MH_SOURCE 1 #include /* {{{ HashIndex Iterators ****************************************/ struct hash_iterator { struct iterator base; /* Must be the first member. */ struct mh_index_t *hash; uint32_t h_pos; }; void hash_iterator_free(struct iterator *iterator) { assert(iterator->free == hash_iterator_free); free(iterator); } struct tuple * hash_iterator_ge(struct iterator *ptr) { assert(ptr->free == hash_iterator_free); struct hash_iterator *it = (struct hash_iterator *) ptr; while (it->h_pos < mh_end(it->hash)) { if (mh_exist(it->hash, it->h_pos)) return *mh_index_node(it->hash, it->h_pos++); it->h_pos++; } return NULL; } static struct tuple * hash_iterator_eq_next(struct iterator *it __attribute__((unused))) { return NULL; } static struct tuple * hash_iterator_eq(struct iterator *it) { it->next = hash_iterator_eq_next; return hash_iterator_ge(it); } /* }}} */ /* {{{ HashIndex -- base class for all hashes. ********************/ HashIndex::HashIndex(struct key_def *key_def, struct space *space) : Index(key_def, space) { hash = mh_index_new(); if (hash == NULL) { tnt_raise(ClientError, ER_MEMORY_ISSUE, sizeof(hash), "HashIndex", "hash"); } } HashIndex::~HashIndex() { mh_index_delete(hash); } void HashIndex::beginBuild() { } void HashIndex::buildNext(struct tuple *tuple) { replace(NULL, tuple, DUP_INSERT); } void HashIndex::endBuild() { } void HashIndex::build(Index *pk) { uint32_t n_tuples = pk->size(); if (n_tuples == 0) return; reserve(n_tuples); say_info("Adding %" PRIu32 " keys to HASH index %" PRIu32 "...", n_tuples, index_n(this)); struct iterator *it = pk->position(); struct tuple *tuple; pk->initIterator(it, ITER_ALL, NULL, 0); while ((tuple = it->next(it))) replace(NULL, tuple, DUP_INSERT); } void HashIndex::reserve(uint32_t n_tuples) { mh_index_reserve(hash, n_tuples, key_def); } size_t HashIndex::size() const { return mh_size(hash); } struct tuple * HashIndex::min() const { tnt_raise(ClientError, ER_UNSUPPORTED, "Hash index", "min()"); return NULL; } struct tuple * HashIndex::max() const { tnt_raise(ClientError, ER_UNSUPPORTED, "Hash index", "max()"); return NULL; } struct tuple * HashIndex::random(uint32_t rnd) const { uint32_t k = mh_index_random(hash, rnd); if (k != mh_end(hash)) return *mh_index_node(hash, k); return NULL; } struct tuple * HashIndex::findByKey(const char *key, uint32_t part_count) const { assert(key_def->is_unique && part_count == key_def->part_count); (void) part_count; struct tuple *ret = NULL; uint32_t k = mh_index_find(hash, key, key_def); if (k != mh_end(hash)) ret = *mh_index_node(hash, k); return ret; } struct tuple * HashIndex::replace(struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode) { uint32_t errcode; if (new_tuple) { struct tuple *dup_tuple = NULL; struct tuple **dup_node = &dup_tuple; uint32_t pos = mh_index_put(hash, &new_tuple, &dup_node, key_def); ERROR_INJECT(ERRINJ_INDEX_ALLOC, { mh_index_del(hash, pos, key_def); pos = mh_end(hash); }); if (pos == mh_end(hash)) { tnt_raise(LoggedError, ER_MEMORY_ISSUE, (ssize_t) pos, "hash", "key"); } errcode = replace_check_dup(old_tuple, dup_tuple, mode); if (errcode) { mh_index_remove(hash, &new_tuple, key_def); if (dup_tuple) { pos = mh_index_put(hash, &dup_tuple, NULL, key_def); if (pos == mh_end(hash)) { panic("Failed to allocate memory in " "recover of int hash"); } } tnt_raise(ClientError, errcode, index_n(this)); } if (dup_tuple) return dup_tuple; } if (old_tuple) { mh_index_remove(hash, &old_tuple, key_def); } return old_tuple; } struct iterator * HashIndex::allocIterator() const { struct hash_iterator *it = (struct hash_iterator *) calloc(1, sizeof(*it)); if (it == NULL) { tnt_raise(ClientError, ER_MEMORY_ISSUE, sizeof(struct hash_iterator), "HashIndex", "iterator"); } it->base.next = hash_iterator_ge; it->base.free = hash_iterator_free; return (struct iterator *) it; } void HashIndex::initIterator(struct iterator *ptr, enum iterator_type type, const char *key, uint32_t part_count) const { assert (key != NULL || part_count == 0); (void) part_count; assert(ptr->free == hash_iterator_free); struct hash_iterator *it = (struct hash_iterator *) ptr; switch (type) { case ITER_GE: if (key != NULL) { it->h_pos = mh_index_find(hash, key, key_def); it->base.next = hash_iterator_ge; break; } /* Fall through. */ case ITER_ALL: it->h_pos = mh_begin(hash); it->base.next = hash_iterator_ge; break; case ITER_EQ: it->h_pos = mh_index_find(hash, key, key_def); it->base.next = hash_iterator_eq; break; default: tnt_raise(ClientError, ER_UNSUPPORTED, "Hash index", "requested iterator type"); } it->hash = hash; } /* }}} */ tarantool-1.5.1.218.g1a69fd6/src/box/key_def.cc0000664000000000000000000000615412231715257017267 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "key_def.h" extern "C" { #include } /* extern "C" */ #include "exception.h" #include const char *field_type_strs[] = {"UNKNOWN", "NUM", "NUM64", "STR", "\0"}; STRS(index_type, INDEX_TYPE); void key_def_create(struct key_def *def, struct tarantool_cfg_space_index *cfg_index) { def->max_fieldno = 0; def->part_count = 0; def->type = STR2ENUM(index_type, cfg_index->type); if (def->type == index_type_MAX) tnt_raise(LoggedError, ER_INDEX_TYPE, cfg_index->type); /* Calculate key part count and maximal field number. */ for (uint32_t k = 0; cfg_index->key_field[k] != NULL; ++k) { auto cfg_key = cfg_index->key_field[k]; if (cfg_key->fieldno == -1) { /* last filled key reached */ break; } def->max_fieldno = MAX(def->max_fieldno, cfg_key->fieldno); def->part_count++; } /* init def array */ def->parts = (struct key_part *) malloc(sizeof(struct key_part) * def->part_count); uint32_t cmp_order_size = (def->max_fieldno + 1) * sizeof(uint32_t); /* init compare order array */ def->cmp_order = (uint32_t *) malloc(cmp_order_size); for (uint32_t fieldno = 0; fieldno <= def->max_fieldno; fieldno++) def->cmp_order[fieldno] = UINT32_MAX; /* fill fields and compare order */ for (uint32_t k = 0; cfg_index->key_field[k] != NULL; ++k) { auto cfg_key = cfg_index->key_field[k]; if (cfg_key->fieldno == -1) { /* last filled key reached */ break; } /* fill keys */ def->parts[k].fieldno = cfg_key->fieldno; def->parts[k].type = STR2ENUM(field_type, cfg_key->type); /* fill compare order */ if (def->cmp_order[cfg_key->fieldno] == UINT32_MAX) def->cmp_order[cfg_key->fieldno] = k; } def->is_unique = cfg_index->unique; } /** Free a key definition. */ void key_def_destroy(struct key_def *key_def) { free(key_def->parts); free(key_def->cmp_order); } tarantool-1.5.1.218.g1a69fd6/src/box/index.cc0000664000000000000000000001122712231715257016765 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "index.h" #include "hash_index.h" #include "tree_index.h" #include "bitset_index.h" #include "tuple.h" #include "say.h" #include "exception.h" #include "space.h" STRS(iterator_type, ITERATOR_TYPE); /* {{{ Utilities. **********************************************/ static inline void key_validate_parts(struct key_def *key_def, const char *key, uint32_t part_count) { for (uint32_t part = 0; part < part_count; part++) { uint32_t part_size = load_varint32(&key); enum field_type part_type = key_def->parts[part].type; if (part_type == NUM && part_size != sizeof(uint32_t)) tnt_raise(ClientError, ER_KEY_FIELD_TYPE, "u32"); if (part_type == NUM64 && part_size != sizeof(uint64_t) && part_size != sizeof(uint32_t)) tnt_raise(ClientError, ER_KEY_FIELD_TYPE, "u64"); key += part_size; } } void key_validate(struct key_def *key_def, enum iterator_type type, const char *key, uint32_t part_count) { if (part_count == 0) { assert(key == NULL); /* * Zero key parts are allowed: * - for TREE index, all iterator types, * - ITERA_ALL iterator type, all index types * - ITER_GE iterator in HASH index (legacy) */ if (key_def->type == TREE || type == ITER_ALL || (key_def->type == HASH && type == ITER_GE)) return; /* Fall through. */ } if (part_count > key_def->part_count) tnt_raise(ClientError, ER_KEY_PART_COUNT, key_def->part_count, part_count); /* Partial keys are allowed only for TREE index type. */ if (key_def->type != TREE && part_count < key_def->part_count) { tnt_raise(ClientError, ER_EXACT_MATCH, key_def->part_count, part_count); } key_validate_parts(key_def, key, part_count); } void primary_key_validate(struct key_def *key_def, const char *key, uint32_t part_count) { if (key_def->part_count != part_count) { tnt_raise(ClientError, ER_EXACT_MATCH, key_def->part_count, part_count); } key_validate_parts(key_def, key, part_count); } /** * Check if replacement of an old tuple with a new one is * allowed. */ uint32_t Index::replace_check_dup(struct tuple *old_tuple, struct tuple *dup_tuple, enum dup_replace_mode mode) { if (dup_tuple == NULL) { if (mode == DUP_REPLACE) { /* * dup_replace_mode is DUP_REPLACE, and * a tuple with the same key is not found. */ return ER_TUPLE_NOT_FOUND; } } else { /* dup_tuple != NULL */ if (dup_tuple != old_tuple && (old_tuple != NULL || mode == DUP_INSERT)) { /* * There is a duplicate of new_tuple, * and it's not old_tuple: we can't * possibly delete more than one tuple * at once. */ return ER_TUPLE_FOUND; } } return 0; } /* }}} */ /* {{{ Index -- base class for all indexes. ********************/ Index * Index::factory(enum index_type type, struct key_def *key_def, struct space *space) { switch (type) { case HASH: return new HashIndex(key_def, space); case TREE: return new TreeIndex(key_def, space); case BITSET: return new BitsetIndex(key_def, space); default: assert(false); } return NULL; } Index::Index(struct key_def *key_def, struct space *space) { this->key_def = key_def; this->space = space; m_position = NULL; } Index::~Index() { if (m_position != NULL) m_position->free(m_position); } struct tuple * Index::findByTuple(struct tuple *tuple) const { (void) tuple; tnt_raise(ClientError, ER_UNSUPPORTED, "Index", "findByTuple()"); return NULL; } /* }}} */ tarantool-1.5.1.218.g1a69fd6/src/box/bitset_index.cc0000664000000000000000000001607112231715257020341 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "bitset_index.h" #include #include "salloc.h" #include "tuple.h" #include "space.h" #include "exception.h" #include "pickle.h" #include static inline size_t tuple_to_value(struct tuple *tuple) { size_t value = salloc_ptr_to_index(tuple); assert(salloc_ptr_from_index(value) == tuple); return value; } static inline struct tuple * value_to_tuple(size_t value) { return (struct tuple *) salloc_ptr_from_index(value); } struct bitset_index_iterator { struct iterator base; /* Must be the first member. */ struct bitset_iterator bitset_it; }; static struct bitset_index_iterator * bitset_index_iterator(struct iterator *it) { return (struct bitset_index_iterator *) it; } void bitset_index_iterator_free(struct iterator *iterator) { assert(iterator->free == bitset_index_iterator_free); struct bitset_index_iterator *it = bitset_index_iterator(iterator); bitset_iterator_destroy(&it->bitset_it); free(it); } struct tuple * bitset_index_iterator_next(struct iterator *iterator) { assert(iterator->free == bitset_index_iterator_free); struct bitset_index_iterator *it = bitset_index_iterator(iterator); size_t value = bitset_iterator_next(&it->bitset_it); if (value == SIZE_MAX) return NULL; return value_to_tuple(value); } BitsetIndex::BitsetIndex(struct key_def *key_def, struct space *space) : Index(key_def, space) { assert(!key_def->is_unique); if (bitset_index_create(&index, realloc) != 0) panic_syserror("bitset_index_create"); } BitsetIndex::~BitsetIndex() { bitset_index_destroy(&index); } void BitsetIndex::beginBuild() { tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "beginBuild()"); } void BitsetIndex::buildNext(struct tuple *tuple) { (void) tuple; tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "buildNext()"); } void BitsetIndex::endBuild() { tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "endBuild()"); } void BitsetIndex::build(Index *pk) { assert(!key_def->is_unique); struct iterator *it = pk->position(); struct tuple *tuple; pk->initIterator(it, ITER_ALL, NULL, 0); while ((tuple = it->next(it))) replace(NULL, tuple, DUP_INSERT); } size_t BitsetIndex::size() const { return bitset_index_size(&index); } struct tuple * BitsetIndex::min() const { tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "min()"); return NULL; } struct tuple * BitsetIndex::max() const { tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "max()"); return NULL; } struct tuple * BitsetIndex::random(uint32_t rnd) const { (void) rnd; tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "random()"); return NULL; } struct iterator * BitsetIndex::allocIterator() const { struct bitset_index_iterator *it = (struct bitset_index_iterator *) malloc(sizeof(*it)); if (!it) return NULL; memset(it, 0, sizeof(*it)); it->base.next = bitset_index_iterator_next; it->base.free = bitset_index_iterator_free; bitset_iterator_create(&it->bitset_it, realloc); return (struct iterator *) it; } struct tuple * BitsetIndex::findByKey(const char *key, uint32_t part_count) const { (void) key; (void) part_count; tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "findByKey()"); return NULL; } struct tuple * BitsetIndex::findByTuple(struct tuple *tuple) const { (void) tuple; tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "findByTuple()"); return NULL; } struct tuple * BitsetIndex::replace(struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode) { assert(!key_def->is_unique); assert(old_tuple != NULL || new_tuple != NULL); (void) mode; struct tuple *ret = NULL; if (old_tuple != NULL) { size_t value = tuple_to_value(old_tuple); if (bitset_index_contains_value(&index, value)) { ret = old_tuple; assert(old_tuple != new_tuple); bitset_index_remove_value(&index, value); } } if (new_tuple != NULL) { uint32_t len = 0; const char *field; field = tuple_field(new_tuple, key_def->parts[0].fieldno, &len); size_t value = tuple_to_value(new_tuple); if (bitset_index_insert(&index, field, len, value) < 0) { tnt_raise(ClientError, ER_MEMORY_ISSUE, 0, "BitsetIndex", "insert"); } } return ret; } void BitsetIndex::initIterator(struct iterator *iterator, enum iterator_type type, const char *key, uint32_t part_count) const { assert(iterator->free == bitset_index_iterator_free); assert (part_count != 0 || key == NULL); (void) part_count; struct bitset_index_iterator *it = bitset_index_iterator(iterator); const void *bitset_key = NULL; size_t bitset_key_size = 0; if (type != ITER_ALL) { const char *key2 = key; bitset_key_size = (size_t) load_varint32(&key2); bitset_key = key2; } struct bitset_expr expr; bitset_expr_create(&expr, realloc); try { int rc = 0; switch (type) { case ITER_ALL: rc = bitset_index_expr_all(&expr); break; case ITER_EQ: rc = bitset_index_expr_equals(&expr, bitset_key, bitset_key_size); break; case ITER_BITS_ALL_SET: rc = bitset_index_expr_all_set(&expr, bitset_key, bitset_key_size); break; case ITER_BITS_ALL_NOT_SET: rc = bitset_index_expr_all_not_set(&expr, bitset_key, bitset_key_size); break; case ITER_BITS_ANY_SET: rc = bitset_index_expr_any_set(&expr, bitset_key, bitset_key_size); break; default: tnt_raise(ClientError, ER_UNSUPPORTED, "BitsetIndex", "requested iterator type"); } if (rc != 0) { tnt_raise(ClientError, ER_MEMORY_ISSUE, 0, "BitsetIndex", "iterator expression"); } if (bitset_index_init_iterator((bitset_index *) &index, &it->bitset_it, &expr) != 0) { tnt_raise(ClientError, ER_MEMORY_ISSUE, 0, "BitsetIndex", "iterator state"); } bitset_expr_destroy(&expr); } catch (const Exception& e) { bitset_expr_destroy(&expr); throw; } } tarantool-1.5.1.218.g1a69fd6/src/box/lua/0000775000000000000000000000000012231715257016125 5ustar rootroottarantool-1.5.1.218.g1a69fd6/src/box/lua/box_net.lua0000664000000000000000000003121512231715257020270 0ustar rootroot-- box_net.lua (internal file) box.net = { -- -- The idea of box.net.box implementation is that -- most calls are simply wrappers around 'process' -- function. The embedded 'process' function sends -- requests to the local server, the remote 'process' -- routes requests to a remote. -- box = { delete = function(self, space, ...) local key_part_count = select('#', ...) return self:process(21, box.pack('iiV', space, box.flags.BOX_RETURN_TUPLE, -- flags key_part_count, ...)) end, replace = function(self, space, ...) local field_count = select('#', ...) return self:process(13, box.pack('iiV', space, box.flags.BOX_RETURN_TUPLE, -- flags field_count, ...)) end, -- insert a tuple (produces an error if the tuple already exists) insert = function(self, space, ...) local field_count = select('#', ...) return self:process(13, box.pack('iiV', space, bit.bor(box.flags.BOX_RETURN_TUPLE, box.flags.BOX_ADD), -- flags field_count, ...)) end, -- update a tuple update = function(self, space, key, format, ...) local op_count = select('#', ...)/2 return self:process(19, box.pack('iiVi'..format, space, box.flags.BOX_RETURN_TUPLE, 1, key, op_count, ...)) end, select_limit = function(self, space, index, offset, limit, ...) local key_part_count = select('#', ...) return self:process(17, box.pack('iiiiiV', space, index, offset, limit, 1, -- key count key_part_count, ...)) end, select = function(self, space, index, ...) local key_part_count = select('#', ...) return self:process(17, box.pack('iiiiiV', space, index, 0, -- offset 4294967295, -- limit 1, -- key count key_part_count, ...)) end, ping = function(self) return self:process(65280, '') end, call = function(self, proc_name, ...) local count = select('#', ...) return self:process(22, box.pack('iwaV', 0, -- flags string.len(proc_name), proc_name, count, ...)) end, select_range = function(self, sno, ino, limit, ...) return self:call( 'box.select_range', tostring(sno), tostring(ino), tostring(limit), ... ) end, select_reverse_range = function(self, sno, ino, limit, ...) return self:call( 'box.select_reverse_range', tostring(sno), tostring(ino), tostring(limit), ... ) end, -- To make use of timeouts safe across multiple -- concurrent fibers do not store timeouts as -- part of conection state, but put it inside -- a helper object. timeout = function(self, timeout) local wrapper = {} setmetatable(wrapper, { __index = function(wrp, name, ...) local func = self[name] if func ~= nil then return function(wr, ...) self.request_timeout = timeout return func(self, ...) end end error(string.format('Can not find "box.net.box.%s" function', name)) end }); return wrapper end, }, -- local tarantool self = { process = function(self, ...) return box.process(...) end, select_range = function(self, sno, ino, limit, ...) return box.space[tonumber(sno)].index[tonumber(ino)] :select_range(tonumber(limit), ...) end, select_reverse_range = function(self, sno, ino, limit, ...) return box.space[tonumber(sno)].index[tonumber(ino)] :select_reverse_range(tonumber(limit), ...) end, -- for compatibility with the networked version, -- implement call call = function(self, proc_name, ...) local proc = box.call_loadproc(proc_name) return proc(...) end, ping = function(self) return true end, -- local tarantool doesn't provide timeouts timeout = function(self, timeout) return self end, close = function(self) return true end } } -- -- Make sure box.net.box.select(conn, ...) works -- just as well as conn:select(...) -- setmetatable(box.net.self, { __index = box.net.box }) box.net.box.new = function(host, port, reconnect_timeout) if reconnect_timeout == nil then reconnect_timeout = 0 else reconnect_timeout = tonumber(reconnect_timeout) end local remote = { host = host, port = port, reconnect_timeout = reconnect_timeout, closed = false, processing = { last_sync = 0, next_sync = function(self) while true do self.last_sync = self.last_sync + 1 if self[ self.last_sync ] == nil then return self.last_sync end if self.last_sync > 0x7FFFFFFF then self.last_sync = 0 end end end, -- write channel wch = box.ipc.channel(1), -- ready socket channel rch = box.ipc.channel(1), }, process = function(self, op, request) local started = box.time() local timeout = self.request_timeout self.request_timeout = nil -- get an auto-incremented request id local sync = self.processing:next_sync() self.processing[sync] = box.ipc.channel(1) request = box.pack('iiia', op, string.len(request), sync, request) if timeout ~= nil then timeout = tonumber(timeout) if not self.processing.wch:put(request, timeout) then self.processing[sync] = nil return nil end timeout = timeout - (box.time() - started) else self.processing.wch:put(request) end local res if timeout ~= nil then res = self.processing[sync]:get(timeout) else res = self.processing[sync]:get() end self.processing[sync] = nil -- timeout if res == nil then if op == 65280 then return false else return nil end end -- results { status, response } received if res[1] then if op == 65280 then return true else local rop, blen, sync, code, body = box.unpack('iiiia', res[2]) if code ~= 0 then box.raise(code, body) end -- boc.unpack('R') unpacks response body for us (tuple) return box.unpack('R', body) end else error(res[2]) end end, try_connect = function(self) if self.s ~= nil then return true end local sc = box.socket.tcp() if sc == nil then self:fatal("Can't create socket") return false end local s = { sc:connect( self.host, self.port ) } if s[1] == nil then self:fatal("Can't connect to %s:%s: %s", self.host, self.port, s[4]) return false end self.s = sc return true end, read_response = function(self) if self.s == nil then return end local res = { self.s:recv(12) } if res[4] ~= nil then self:fatal("Can't read socket: %s", res[3]) return end local header = res[1] if string.len(header) ~= 12 then self:fatal("Unexpected eof while reading header") return end local op, blen, sync = box.unpack('iii', header) local body = '' if blen > 0 then res = { self.s:recv(blen) } if res[4] ~= nil then self:fatal("Error while reading socket: %s", res[4]) return end body = res[1] if string.len(body) ~= blen then self:fatal("Unexpected eof while reading body") return end end return sync, header .. body end, rfiber = function(self) while not self.closed do while not self.closed do if self:try_connect(self.host, self.port) then break end -- timeout between reconnect attempts box.fiber.sleep(self.reconnect_timeout) end -- wakeup write fiber self.processing.rch:put(true, 0) while not self.closed do local sync, resp = self:read_response() if sync == nil then break end if self.processing[sync] ~= nil then self.processing[sync]:put({true, resp}, 0) else print("Unexpected response ", sync) end end end self.irfiber = nil end, wfiber = function(self) local request while not self.closed do while self.s == nil do self.processing.rch:get(1) end if request == nil then request = self.processing.wch:get(1) end if self.s ~= nil and request ~= nil then local res = { self.s:send(request) } if res[1] ~= string.len(request) then self:fatal("Error while write socket: %s", res[4]) end request = nil end end self.iwfiber = nil end, fatal = function(self, message, ...) message = string.format(message, ...) self.s = nil for sync, ch in pairs(self.processing) do if type(sync) == 'number' then ch:put({ false, message }, 0) end end end, close = function(self) if self.closed then error("box.net.box: already closed") end self.closed = true local message = 'box.net.box: connection was closed' self.process = function() error(message) end self:fatal(message) -- wake up write fiber self.processing.rch:put(true, 0) self.processing.wch:put(true, 0) return true end } setmetatable( remote, { __index = box.net.box } ) remote.irfiber = box.fiber.wrap(remote.rfiber, remote) remote.iwfiber = box.fiber.wrap(remote.wfiber, remote) return remote end -- vim: set et ts=4 sts tarantool-1.5.1.218.g1a69fd6/src/box/lua/box_net.lua.c0000664000000000000000000003456512213310075020511 0ustar rootrootconst char box_net_lua[] = "-- box_net.lua (internal file)\n" "\n" "box.net = {\n" "--\n" "-- The idea of box.net.box implementation is that\n" "-- most calls are simply wrappers around 'process'\n" "-- function. The embedded 'process' function sends\n" "-- requests to the local server, the remote 'process'\n" "-- routes requests to a remote.\n" "--\n" " box = {\n" " delete = function(self, space, ...)\n" " local key_part_count = select('#', ...)\n" " return self:process(21,\n" " box.pack('iiV',\n" " space,\n" " box.flags.BOX_RETURN_TUPLE, -- flags\n" " key_part_count, ...))\n" " end,\n" "\n" " replace = function(self, space, ...)\n" " local field_count = select('#', ...)\n" " return self:process(13,\n" " box.pack('iiV',\n" " space,\n" " box.flags.BOX_RETURN_TUPLE, -- flags\n" " field_count, ...))\n" " end,\n" "\n" " -- insert a tuple (produces an error if the tuple already exists)\n" " insert = function(self, space, ...)\n" " local field_count = select('#', ...)\n" " return self:process(13,\n" " box.pack('iiV',\n" " space,\n" " bit.bor(box.flags.BOX_RETURN_TUPLE,\n" " box.flags.BOX_ADD), -- flags\n" " field_count, ...))\n" " end,\n" "\n" " -- update a tuple\n" " update = function(self, space, key, format, ...)\n" " local op_count = select('#', ...)/2\n" " return self:process(19,\n" " box.pack('iiVi'..format,\n" " space,\n" " box.flags.BOX_RETURN_TUPLE,\n" " 1, key,\n" " op_count,\n" " ...))\n" " end,\n" "\n" " select_limit = function(self, space, index, offset, limit, ...)\n" " local key_part_count = select('#', ...)\n" " return self:process(17,\n" " box.pack('iiiiiV',\n" " space,\n" " index,\n" " offset,\n" " limit,\n" " 1, -- key count\n" " key_part_count, ...))\n" " end,\n" "\n" " select = function(self, space, index, ...)\n" " local key_part_count = select('#', ...)\n" " return self:process(17,\n" " box.pack('iiiiiV',\n" " space,\n" " index,\n" " 0, -- offset\n" " 4294967295, -- limit\n" " 1, -- key count\n" " key_part_count, ...))\n" " end,\n" "\n" "\n" " ping = function(self)\n" " return self:process(65280, '')\n" " end,\n" "\n" " call = function(self, proc_name, ...)\n" " local count = select('#', ...)\n" " return self:process(22,\n" " box.pack('iwaV',\n" " 0, -- flags\n" " string.len(proc_name),\n" " proc_name,\n" " count,\n" " ...))\n" " end,\n" "\n" " select_range = function(self, sno, ino, limit, ...)\n" " return self:call(\n" " 'box.select_range',\n" " tostring(sno),\n" " tostring(ino),\n" " tostring(limit),\n" " ...\n" " )\n" " end,\n" "\n" " select_reverse_range = function(self, sno, ino, limit, ...)\n" " return self:call(\n" " 'box.select_reverse_range',\n" " tostring(sno),\n" " tostring(ino),\n" " tostring(limit),\n" " ...\n" " )\n" " end,\n" "\n" " -- To make use of timeouts safe across multiple\n" " -- concurrent fibers do not store timeouts as\n" " -- part of conection state, but put it inside\n" " -- a helper object.\n" "\n" " timeout = function(self, timeout)\n" "\n" " local wrapper = {}\n" "\n" " setmetatable(wrapper, {\n" " __index = function(wrp, name, ...)\n" " local func = self[name]\n" " if func ~= nil then\n" " return\n" " function(wr, ...)\n" " self.request_timeout = timeout\n" " return func(self, ...)\n" " end\n" " end\n" "\n" " error(string.format('Can not find \"box.net.box.%s\" function',\n" " name))\n" " end\n" " });\n" "\n" " return wrapper\n" " end,\n" " },\n" "\n" "\n" " -- local tarantool\n" " self = {\n" " process = function(self, ...)\n" " return box.process(...)\n" " end,\n" "\n" " select_range = function(self, sno, ino, limit, ...)\n" " return box.space[tonumber(sno)].index[tonumber(ino)]\n" " :select_range(tonumber(limit), ...)\n" " end,\n" "\n" " select_reverse_range = function(self, sno, ino, limit, ...)\n" " return box.space[tonumber(sno)].index[tonumber(ino)]\n" " :select_reverse_range(tonumber(limit), ...)\n" " end,\n" "\n" " -- for compatibility with the networked version,\n" " -- implement call\n" " call = function(self, proc_name, ...)\n" " local proc = box.call_loadproc(proc_name)\n" " return proc(...)\n" " end,\n" "\n" " ping = function(self)\n" " return true\n" " end,\n" "\n" " -- local tarantool doesn't provide timeouts\n" " timeout = function(self, timeout)\n" " return self\n" " end,\n" "\n" " close = function(self)\n" " return true\n" " end\n" " }\n" "}\n" "\n" "--\n" "-- Make sure box.net.box.select(conn, ...) works\n" "-- just as well as conn:select(...)\n" "--\n" "setmetatable(box.net.self, { __index = box.net.box })\n" "\n" "box.net.box.new = function(host, port, reconnect_timeout)\n" " if reconnect_timeout == nil then\n" " reconnect_timeout = 0\n" " else\n" " reconnect_timeout = tonumber(reconnect_timeout)\n" " end\n" "\n" " local remote = {\n" " host = host,\n" " port = port,\n" " reconnect_timeout = reconnect_timeout,\n" " closed = false,\n" "\n" " processing = {\n" " last_sync = 0,\n" " next_sync = function(self)\n" " while true do\n" " self.last_sync = self.last_sync + 1\n" " if self[ self.last_sync ] == nil then\n" " return self.last_sync\n" " end\n" "\n" " if self.last_sync > 0x7FFFFFFF then\n" " self.last_sync = 0\n" " end\n" " end\n" " end,\n" "\n" " -- write channel\n" " wch = box.ipc.channel(1),\n" "\n" " -- ready socket channel\n" " rch = box.ipc.channel(1),\n" " },\n" "\n" "\n" "\n" " process = function(self, op, request)\n" " local started = box.time()\n" " local timeout = self.request_timeout\n" " self.request_timeout = nil\n" "\n" " -- get an auto-incremented request id\n" " local sync = self.processing:next_sync()\n" " self.processing[sync] = box.ipc.channel(1)\n" " request = box.pack('iiia', op, string.len(request), sync, request)\n" "\n" "\n" " if timeout ~= nil then\n" " timeout = tonumber(timeout)\n" " if not self.processing.wch:put(request, timeout) then\n" " self.processing[sync] = nil\n" " return nil\n" " end\n" "\n" " timeout = timeout - (box.time() - started)\n" " else\n" " self.processing.wch:put(request)\n" " end\n" "\n" " local res\n" " if timeout ~= nil then\n" " res = self.processing[sync]:get(timeout)\n" " else\n" " res = self.processing[sync]:get()\n" " end\n" " self.processing[sync] = nil\n" "\n" "\n" " -- timeout\n" " if res == nil then\n" " if op == 65280 then\n" " return false\n" " else\n" " return nil\n" " end\n" " end\n" "\n" " -- results { status, response } received\n" " if res[1] then\n" " if op == 65280 then\n" " return true\n" " else\n" " local rop, blen, sync, code, body =\n" " box.unpack('iiiia', res[2])\n" " if code ~= 0 then\n" " box.raise(code, body)\n" " end\n" "\n" " -- boc.unpack('R') unpacks response body for us (tuple)\n" " return box.unpack('R', body)\n" " end\n" " else\n" " error(res[2])\n" " end\n" " end,\n" "\n" "\n" " try_connect = function(self)\n" " if self.s ~= nil then\n" " return true\n" " end\n" "\n" " local sc = box.socket.tcp()\n" " if sc == nil then\n" " self:fatal(\"Can't create socket\")\n" " return false\n" " end\n" "\n" " local s = { sc:connect( self.host, self.port ) }\n" " if s[1] == nil then\n" " self:fatal(\"Can't connect to %s:%s: %s\",\n" " self.host, self.port, s[4])\n" " return false\n" " end\n" "\n" " self.s = sc\n" "\n" " return true\n" " end,\n" "\n" " read_response = function(self)\n" " if self.s == nil then\n" " return\n" " end\n" " local res = { self.s:recv(12) }\n" " if res[4] ~= nil then\n" " self:fatal(\"Can't read socket: %s\", res[3])\n" " return\n" " end\n" " local header = res[1]\n" " if string.len(header) ~= 12 then\n" " self:fatal(\"Unexpected eof while reading header\")\n" " return\n" " end\n" "\n" " local op, blen, sync = box.unpack('iii', header)\n" "\n" " local body = ''\n" " if blen > 0 then\n" " res = { self.s:recv(blen) }\n" " if res[4] ~= nil then\n" " self:fatal(\"Error while reading socket: %s\", res[4])\n" " return\n" " end\n" " body = res[1]\n" " if string.len(body) ~= blen then\n" " self:fatal(\"Unexpected eof while reading body\")\n" " return\n" " end\n" " end\n" " return sync, header .. body\n" " end,\n" "\n" " rfiber = function(self)\n" " while not self.closed do\n" " while not self.closed do\n" " if self:try_connect(self.host, self.port) then\n" " break\n" " end\n" " -- timeout between reconnect attempts\n" " box.fiber.sleep(self.reconnect_timeout)\n" " end\n" "\n" " -- wakeup write fiber\n" " self.processing.rch:put(true, 0)\n" "\n" " while not self.closed do\n" " local sync, resp = self:read_response()\n" " if sync == nil then\n" " break\n" " end\n" "\n" " if self.processing[sync] ~= nil then\n" " self.processing[sync]:put({true, resp}, 0)\n" " else\n" " print(\"Unexpected response \", sync)\n" " end\n" " end\n" "\n" " end\n" " self.irfiber = nil\n" " end,\n" "\n" "\n" " wfiber = function(self)\n" " local request\n" " while not self.closed do\n" " while self.s == nil do\n" " self.processing.rch:get(1)\n" " end\n" " if request == nil then\n" " request = self.processing.wch:get(1)\n" " end\n" " if self.s ~= nil and request ~= nil then\n" " local res = { self.s:send(request) }\n" " if res[1] ~= string.len(request) then\n" " self:fatal(\"Error while write socket: %s\", res[4])\n" " end\n" " request = nil\n" " end\n" " end\n" " self.iwfiber = nil\n" " end,\n" "\n" " fatal = function(self, message, ...)\n" " message = string.format(message, ...)\n" " self.s = nil\n" " for sync, ch in pairs(self.processing) do\n" " if type(sync) == 'number' then\n" " ch:put({ false, message }, 0)\n" " end\n" " end\n" " end,\n" "\n" " close = function(self)\n" " if self.closed then\n" " error(\"box.net.box: already closed\")\n" " end\n" " self.closed = true\n" " local message = 'box.net.box: connection was closed'\n" " self.process = function()\n" " error(message)\n" " end\n" " self:fatal(message)\n" "\n" " -- wake up write fiber\n" " self.processing.rch:put(true, 0)\n" " self.processing.wch:put(true, 0)\n" " return true\n" " end\n" " }\n" "\n" "\n" " setmetatable( remote, { __index = box.net.box } )\n" "\n" " remote.irfiber = box.fiber.wrap(remote.rfiber, remote)\n" " remote.iwfiber = box.fiber.wrap(remote.wfiber, remote)\n" "\n" " return remote\n" "end\n" "\n" "-- vim: set et ts=4 sts\n" "" ; tarantool-1.5.1.218.g1a69fd6/src/box/lua/misc.lua0000664000000000000000000000355512231715257017573 0ustar rootroot-- misc.lua (internal file) -- -- Simple counter. -- box.counter = {} -- -- Increment counter identified by primary key. -- Create counter if not exists. -- Returns updated value of the counter. -- function box.counter.inc(space, ...) local key = {...} local cnt_index = #key local tuple while true do tuple = box.update(space, key, '+p', cnt_index, 1) if tuple ~= nil then break end local data = {...} table.insert(data, 1) tuple = box.insert(space, unpack(data)) if tuple ~= nil then break end end return box.unpack('i', tuple[cnt_index]) end -- -- Decrement counter identified by primary key. -- Delete counter if it decreased to zero. -- Returns updated value of the counter. -- function box.counter.dec(space, ...) local key = {...} local cnt_index = #key local tuple = box.select(space, 0, ...) if tuple == nil then return 0 end if box.unpack('i', tuple[cnt_index]) == 1 then box.delete(space, ...) return 0 else tuple = box.update(space, key, '-p', cnt_index, 1) return box.unpack('i', tuple[cnt_index]) end end -- vim: set et ts=4 sts -- Assumes that spaceno has a TREE int32 (NUM) or int64 (NUM64) primary key -- inserts a tuple after getting the next value of the -- primary key and returns it back to the user function box.auto_increment(spaceno, ...) spaceno = tonumber(spaceno) local max_tuple = box.space[spaceno].index[0].idx:max() local max = 0 if max_tuple ~= nil then max = max_tuple[0] local fmt = 'i' if #max == 8 then fmt = 'l' end max = box.unpack(fmt, max) else -- first time if box.space[spaceno].index[0].key_field[0].type == "NUM64" then max = tonumber64(max) end end return box.insert(spaceno, max + 1, ...) end -- vim: set et ts=4 sts tarantool-1.5.1.218.g1a69fd6/src/box/lua/misc.lua.c0000664000000000000000000000426412213310075017777 0ustar rootrootconst char misc_lua[] = "-- misc.lua (internal file)\n" "\n" "--\n" "-- Simple counter.\n" "--\n" "box.counter = {}\n" "\n" "--\n" "-- Increment counter identified by primary key.\n" "-- Create counter if not exists.\n" "-- Returns updated value of the counter.\n" "--\n" "function box.counter.inc(space, ...)\n" " local key = {...}\n" " local cnt_index = #key\n" "\n" " local tuple\n" " while true do\n" " tuple = box.update(space, key, '+p', cnt_index, 1)\n" " if tuple ~= nil then break end\n" " local data = {...}\n" " table.insert(data, 1)\n" " tuple = box.insert(space, unpack(data))\n" " if tuple ~= nil then break end\n" " end\n" "\n" " return box.unpack('i', tuple[cnt_index])\n" "end\n" "\n" "--\n" "-- Decrement counter identified by primary key.\n" "-- Delete counter if it decreased to zero.\n" "-- Returns updated value of the counter.\n" "--\n" "function box.counter.dec(space, ...)\n" " local key = {...}\n" " local cnt_index = #key\n" "\n" " local tuple = box.select(space, 0, ...)\n" " if tuple == nil then return 0 end\n" " if box.unpack('i', tuple[cnt_index]) == 1 then\n" " box.delete(space, ...)\n" " return 0\n" " else\n" " tuple = box.update(space, key, '-p', cnt_index, 1)\n" " return box.unpack('i', tuple[cnt_index])\n" " end\n" "end\n" "\n" "\n" "-- vim: set et ts=4 sts\n" "-- Assumes that spaceno has a TREE int32 (NUM) or int64 (NUM64) primary key\n" "-- inserts a tuple after getting the next value of the\n" "-- primary key and returns it back to the user\n" "function box.auto_increment(spaceno, ...)\n" " spaceno = tonumber(spaceno)\n" " local max_tuple = box.space[spaceno].index[0].idx:max()\n" " local max = 0\n" " if max_tuple ~= nil then\n" " max = max_tuple[0]\n" " local fmt = 'i'\n" " if #max == 8 then fmt = 'l' end\n" " max = box.unpack(fmt, max)\n" " else\n" " -- first time\n" " if box.space[spaceno].index[0].key_field[0].type == \"NUM64\" then\n" " max = tonumber64(max)\n" " end\n" " end\n" " return box.insert(spaceno, max + 1, ...)\n" "end\n" "\n" "\n" "-- vim: set et ts=4 sts\n" "" ; tarantool-1.5.1.218.g1a69fd6/src/box/lua/box.lua.c0000664000000000000000000001660612213310075017637 0ustar rootrootconst char box_lua[] = "-- box.lua (internal file)\n" "\n" "box.flags = { BOX_RETURN_TUPLE = 0x01, BOX_ADD = 0x02, BOX_REPLACE = 0x04 }\n" "\n" "\n" "\n" "--\n" "--\n" "--\n" "function box.select_limit(space, index, offset, limit, ...)\n" " local key_part_count = select('#', ...)\n" " return box.process(17,\n" " box.pack('iiiiiV',\n" " tonumber(space),\n" " tonumber(index),\n" " tonumber(offset),\n" " tonumber(limit),\n" " 1, -- key count\n" " key_part_count, ...))\n" "end\n" "\n" "--\n" "--\n" "--\n" "function box.select(space, index, ...)\n" " return box.select_limit(space, index, 0, 4294967295, ...)\n" "end\n" "\n" "--\n" "-- Select a range of tuples in a given namespace via a given\n" "-- index. If key is NULL, starts from the beginning, otherwise\n" "-- starts from the key.\n" "--\n" "function box.select_range(sno, ino, limit, ...)\n" " return box.net.self:select_range(sno, ino, limit, ...)\n" "end\n" "\n" "--\n" "-- Select a range of tuples in a given namespace via a given\n" "-- index in reverse order. If key is NULL, starts from the end, otherwise\n" "-- starts from the key.\n" "--\n" "function box.select_reverse_range(sno, ino, limit, ...)\n" " return box.net.self:select_reverse_range(sno, ino, limit, ...)\n" "end\n" "\n" "--\n" "-- delete can be done only by the primary key, whose\n" "-- index is always 0. It doesn't accept compound keys\n" "--\n" "function box.delete(space, ...)\n" " local key_part_count = select('#', ...)\n" " return box.process(21,\n" " box.pack('iiV',\n" " tonumber(space),\n" " box.flags.BOX_RETURN_TUPLE, -- flags\n" " key_part_count, ...))\n" "end\n" "\n" "-- insert or replace a tuple\n" "function box.replace(space, ...)\n" " local field_count = select('#', ...)\n" " return box.process(13,\n" " box.pack('iiV',\n" " tonumber(space),\n" " box.flags.BOX_RETURN_TUPLE, -- flags\n" " field_count, ...))\n" "end\n" "\n" "-- insert a tuple (produces an error if the tuple already exists)\n" "function box.insert(space, ...)\n" " local field_count = select('#', ...)\n" " return box.process(13,\n" " box.pack('iiV',\n" " tonumber(space),\n" " bit.bor(box.flags.BOX_RETURN_TUPLE,\n" " box.flags.BOX_ADD), -- flags\n" " field_count, ...))\n" "end\n" "\n" "--\n" "function box.update(space, key, format, ...)\n" " local op_count = select('#', ...)/2\n" " return box.process(19,\n" " box.pack('iiVi'..format,\n" " tonumber(space),\n" " box.flags.BOX_RETURN_TUPLE,\n" " 1, key,\n" " op_count,\n" " ...))\n" "end\n" "\n" "function box.dostring(s, ...)\n" " local chunk, message = loadstring(s)\n" " if chunk == nil then\n" " error(message, 2)\n" " end\n" " return chunk(...)\n" "end\n" "\n" "function box.bless_space(space)\n" " local index_mt = {}\n" " -- __len and __index\n" " index_mt.len = function(index) return #index.idx end\n" " index_mt.__newindex = function(table, index)\n" " return error('Attempt to modify a read-only table') end\n" " index_mt.__index = index_mt\n" " -- min and max\n" " index_mt.min = function(index) return index.idx:min() end\n" " index_mt.max = function(index) return index.idx:max() end\n" " index_mt.random = function(index, rnd) return index.idx:random(rnd) end\n" " -- iteration\n" " index_mt.iterator = function(index, ...)\n" " return index.idx:iterator(...)\n" " end\n" " --\n" " -- pairs/next/prev methods are provided for backward compatibility purposes only\n" " index_mt.pairs = function(index)\n" " return index.idx.next, index.idx, nil\n" " end\n" " --\n" " local next_compat = function(idx, iterator_type, ...)\n" " local arg = {...}\n" " if #arg == 1 and type(arg[1]) == \"userdata\" then\n" " return idx:next(...)\n" " else\n" " return idx:next(iterator_type, ...)\n" " end\n" " end\n" " index_mt.next = function(index, ...)\n" " return next_compat(index.idx, box.index.GE, ...);\n" " end\n" " index_mt.prev = function(index, ...)\n" " return next_compat(index.idx, box.index.LE, ...);\n" " end\n" " index_mt.next_equal = function(index, ...)\n" " return next_compat(index.idx, box.index.EQ, ...);\n" " end\n" " index_mt.prev_equal = function(index, ...)\n" " return next_compat(index.idx, box.index.REQ, ...);\n" " end\n" " -- index subtree size\n" " index_mt.count = function(index, ...)\n" " return index.idx:count(...)\n" " end\n" " --\n" " index_mt.select_range = function(index, limit, ...)\n" " local range = {}\n" " for v in index:iterator(box.index.GE, ...) do\n" " if #range >= limit then\n" " break\n" " end\n" " table.insert(range, v)\n" " end\n" " return unpack(range)\n" " end\n" " index_mt.select_reverse_range = function(index, limit, ...)\n" " local range = {}\n" " for v in index:iterator(box.index.LE, ...) do\n" " if #range >= limit then\n" " break\n" " end\n" " table.insert(range, v)\n" " end\n" " return unpack(range)\n" " end\n" " --\n" " local space_mt = {}\n" " space_mt.len = function(space) return space.index[0]:len() end\n" " space_mt.__newindex = index_mt.__newindex\n" " space_mt.select = function(space, ...) return box.select(space.n, ...) end\n" " space_mt.select_range = function(space, ino, limit, ...)\n" " return space.index[ino]:select_range(limit, ...)\n" " end\n" " space_mt.select_reverse_range = function(space, ino, limit, ...)\n" " return space.index[ino]:select_reverse_range(limit, ...)\n" " end\n" " space_mt.select_limit = function(space, ino, offset, limit, ...)\n" " return box.select_limit(space.n, ino, offset, limit, ...)\n" " end\n" " space_mt.insert = function(space, ...) return box.insert(space.n, ...) end\n" " space_mt.update = function(space, ...) return box.update(space.n, ...) end\n" " space_mt.replace = function(space, ...) return box.replace(space.n, ...) end\n" " space_mt.delete = function(space, ...) return box.delete(space.n, ...) end\n" " space_mt.truncate = function(space)\n" " local pk = space.index[0]\n" " while #pk.idx > 0 do\n" " for t in pk:iterator() do\n" " local key = {};\n" " -- ipairs does not work because pk.key_field is zero-indexed\n" " for _k2, key_field in pairs(pk.key_field) do\n" " table.insert(key, t[key_field.fieldno])\n" " end\n" " space:delete(unpack(key))\n" " end\n" " end\n" " end\n" " space_mt.pairs = function(space) return space.index[0]:pairs() end\n" " space_mt.__index = space_mt\n" "\n" " setmetatable(space, space_mt)\n" " if type(space.index) == 'table' and space.enabled then\n" " for j, index in pairs(space.index) do\n" " rawset(index, 'idx', box.index.new(space.n, j))\n" " setmetatable(index, index_mt)\n" " end\n" " end\n" "end\n" "\n" "-- User can redefine the hook\n" "function box.on_reload_configuration()\n" "end\n" "\n" "require(\"bit\")\n" "\n" "-- vim: set et ts=4 sts\n" "" ; tarantool-1.5.1.218.g1a69fd6/src/box/lua/box.lua0000664000000000000000000001500612231715257017422 0ustar rootroot-- box.lua (internal file) box.flags = { BOX_RETURN_TUPLE = 0x01, BOX_ADD = 0x02, BOX_REPLACE = 0x04 } -- -- -- function box.select_limit(space, index, offset, limit, ...) local key_part_count = select('#', ...) return box.process(17, box.pack('iiiiiV', tonumber(space), tonumber(index), tonumber(offset), tonumber(limit), 1, -- key count key_part_count, ...)) end -- -- -- function box.select(space, index, ...) return box.select_limit(space, index, 0, 4294967295, ...) end -- -- Select a range of tuples in a given namespace via a given -- index. If key is NULL, starts from the beginning, otherwise -- starts from the key. -- function box.select_range(sno, ino, limit, ...) return box.net.self:select_range(sno, ino, limit, ...) end -- -- Select a range of tuples in a given namespace via a given -- index in reverse order. If key is NULL, starts from the end, otherwise -- starts from the key. -- function box.select_reverse_range(sno, ino, limit, ...) return box.net.self:select_reverse_range(sno, ino, limit, ...) end -- -- delete can be done only by the primary key, whose -- index is always 0. It doesn't accept compound keys -- function box.delete(space, ...) local key_part_count = select('#', ...) return box.process(21, box.pack('iiV', tonumber(space), box.flags.BOX_RETURN_TUPLE, -- flags key_part_count, ...)) end -- insert or replace a tuple function box.replace(space, ...) local field_count = select('#', ...) return box.process(13, box.pack('iiV', tonumber(space), box.flags.BOX_RETURN_TUPLE, -- flags field_count, ...)) end -- insert a tuple (produces an error if the tuple already exists) function box.insert(space, ...) local field_count = select('#', ...) return box.process(13, box.pack('iiV', tonumber(space), bit.bor(box.flags.BOX_RETURN_TUPLE, box.flags.BOX_ADD), -- flags field_count, ...)) end -- function box.update(space, key, format, ...) local op_count = select('#', ...)/2 return box.process(19, box.pack('iiVi'..format, tonumber(space), box.flags.BOX_RETURN_TUPLE, 1, key, op_count, ...)) end function box.dostring(s, ...) local chunk, message = loadstring(s) if chunk == nil then error(message, 2) end return chunk(...) end function box.bless_space(space) local index_mt = {} -- __len and __index index_mt.len = function(index) return #index.idx end index_mt.__newindex = function(table, index) return error('Attempt to modify a read-only table') end index_mt.__index = index_mt -- min and max index_mt.min = function(index) return index.idx:min() end index_mt.max = function(index) return index.idx:max() end index_mt.random = function(index, rnd) return index.idx:random(rnd) end -- iteration index_mt.iterator = function(index, ...) return index.idx:iterator(...) end -- -- pairs/next/prev methods are provided for backward compatibility purposes only index_mt.pairs = function(index) return index.idx.next, index.idx, nil end -- local next_compat = function(idx, iterator_type, ...) local arg = {...} if #arg == 1 and type(arg[1]) == "userdata" then return idx:next(...) else return idx:next(iterator_type, ...) end end index_mt.next = function(index, ...) return next_compat(index.idx, box.index.GE, ...); end index_mt.prev = function(index, ...) return next_compat(index.idx, box.index.LE, ...); end index_mt.next_equal = function(index, ...) return next_compat(index.idx, box.index.EQ, ...); end index_mt.prev_equal = function(index, ...) return next_compat(index.idx, box.index.REQ, ...); end -- index subtree size index_mt.count = function(index, ...) return index.idx:count(...) end -- index_mt.select_range = function(index, limit, ...) local range = {} for v in index:iterator(box.index.GE, ...) do if #range >= limit then break end table.insert(range, v) end return unpack(range) end index_mt.select_reverse_range = function(index, limit, ...) local range = {} for v in index:iterator(box.index.LE, ...) do if #range >= limit then break end table.insert(range, v) end return unpack(range) end -- local space_mt = {} space_mt.len = function(space) return space.index[0]:len() end space_mt.__newindex = index_mt.__newindex space_mt.select = function(space, ...) return box.select(space.n, ...) end space_mt.select_range = function(space, ino, limit, ...) return space.index[ino]:select_range(limit, ...) end space_mt.select_reverse_range = function(space, ino, limit, ...) return space.index[ino]:select_reverse_range(limit, ...) end space_mt.select_limit = function(space, ino, offset, limit, ...) return box.select_limit(space.n, ino, offset, limit, ...) end space_mt.insert = function(space, ...) return box.insert(space.n, ...) end space_mt.update = function(space, ...) return box.update(space.n, ...) end space_mt.replace = function(space, ...) return box.replace(space.n, ...) end space_mt.delete = function(space, ...) return box.delete(space.n, ...) end space_mt.truncate = function(space) local pk = space.index[0] while #pk.idx > 0 do for t in pk:iterator() do local key = {}; -- ipairs does not work because pk.key_field is zero-indexed for _k2, key_field in pairs(pk.key_field) do table.insert(key, t[key_field.fieldno]) end space:delete(unpack(key)) end end end space_mt.pairs = function(space) return space.index[0]:pairs() end space_mt.__index = space_mt setmetatable(space, space_mt) if type(space.index) == 'table' and space.enabled then for j, index in pairs(space.index) do rawset(index, 'idx', box.index.new(space.n, j)) setmetatable(index, index_mt) end end end -- User can redefine the hook function box.on_reload_configuration() end require("bit") -- vim: set et ts=4 sts tarantool-1.5.1.218.g1a69fd6/src/box/lua/sql.lua0000664000000000000000000001433712202131537017426 0ustar rootroot-- sql.lua (internal file) box.net.sql = { -- constructor -- box.net.sql.connect( -- 'pg', -- @driver ('pg' or 'mysql') -- 'my.host', -- @host -- 5432, -- @port -- 'user', -- @username -- 'SECRET', -- @password -- 'DB', -- @database name -- { raise = false }, -- @config options -- { sql1, var, ... var }, -- @startup SQL statements -- ... -- ) -- -- @return connector to database or throw error -- if option raise set in 'false' and an error will be happened -- the function will return 'nil' as the first variable and -- text of error as the second connect = function(driver, host, port, user, password, db, cfg, ...) if type(driver) == 'table' then driver = driver.driver end if type(box.net.sql.connectors[driver]) ~= 'function' then error(string.format("Unknown driver '%s'", driver)) end local self = { -- connection variables driver = driver, host = host, port = port, user = user, password = password, db = db, -- private variables queue = {}, processing = false, -- throw exception if error raise = true } -- config parameters if type(cfg) == 'table' then if type(cfg.raise) == 'boolean' then self.raise = cfg.raise end end local init = { ... } setmetatable(self, box.net.sql) -- it add 'raw' field in the table local s, c = pcall(box.net.sql.connectors[driver], self) if not s then if self.raise then error(c) end return nil, c end -- perform init statements for i, s in pairs(init) do c:execute(unpack(s)) end return c end, connectors = { }, __index = { -- base method -- example: -- local tuples, arows, txtst = db:execute(sql, args) -- tuples - a table of tuples (tables) -- arows - count of affected rows -- txtst - text status (Postgresql specific) -- the method throws exception by default. -- user can change the behaviour by set 'connection.raise' -- attribute to 'false' -- in the case it will return negative arows if error and -- txtst will contain text of error execute = function(self, sql, ...) -- waits until connection will be free while self.processing do self.queue[ box.fiber.fid ] = box.ipc.channel() self.queue[ box.fiber.fid ]:get() self.queue[ box.fiber.fid ] = nil end self.processing = true local res = { pcall(self.raw.execute, self, sql, ...) } self.processing = false if not res[1] then if self.raise then error(res[2]) end return {}, -1, res[2] end -- wakeup one waiter for fid, ch in pairs(self.queue) do ch:put(true, 0) self.queue[ fid ] = nil break end table.remove(res, 1) return unpack(res) end, -- pings database -- returns true if success. doesn't throw any errors ping = function(self) local pf = function() local res = self:execute('SELECT 1 AS code') if type(res) ~= 'table' then return false end if type(res[1]) ~= 'table' then return false end return res[1].code == 1 end local res, code = pcall(pf) if res == true then return code else return false end end, -- select rows -- returns table of rows select = function(self, sql, ...) local res = self:execute(sql, ...) return res end, -- select one row single = function(self, sql, ...) local res = self:execute(sql, ...) if #res > 1 then error("SQL request returned multiply rows") end return res[1] end, -- perform request. returns count of affected rows perform = function(self, sql, ...) local res, affected, status = self:execute(sql, ...) return affected end, -- quote variable quote = function(self, variable) return self.raw:quote(variable) end, -- quote identifier quote_ident = function(self, variable) return self.raw:quote_ident(variable) end, -- begin transaction begin_work = function(self) return self:perform('BEGIN') end, -- commit transaction commit = function(self) return self:perform('COMMIT') end, -- rollback transaction rollback = function(self) return self:perform('ROLLBACK') end, -- transaction txn = function(self, proc) local raise = self.raise self.raise = true self:begin_work() local res = { pcall(proc, self) } -- commit transaction if res[1] then res = { pcall(function() self:commit() end) } self.raise = raise if res[1] then return true end return res[1], res[2] end local res_txn = { pcall(function() self:rollback() end) } if not res_txn[1] then res[2] = res[2] .. "\n" .. res_txn[2] end self.raise = raise return res[1], res[2] end } } tarantool-1.5.1.218.g1a69fd6/src/box/lua/sql.lua.c0000664000000000000000000001616612213310075017647 0ustar rootrootconst char sql_lua[] = "-- sql.lua (internal file)\n" "\n" "box.net.sql = {\n" " -- constructor \n" " -- box.net.sql.connect(\n" " -- 'pg', -- @driver ('pg' or 'mysql')\n" " -- 'my.host', -- @host\n" " -- 5432, -- @port\n" " -- 'user', -- @username\n" " -- 'SECRET', -- @password\n" " -- 'DB', -- @database name\n" " -- { raise = false }, -- @config options\n" " -- { sql1, var, ... var }, -- @startup SQL statements\n" " -- ...\n" " -- )\n" " --\n" " -- @return connector to database or throw error\n" " -- if option raise set in 'false' and an error will be happened\n" " -- the function will return 'nil' as the first variable and\n" " -- text of error as the second\n" "\n" " connect = function(driver, host, port, user, password, db, cfg, ...)\n" "\n" " if type(driver) == 'table' then\n" " driver = driver.driver\n" " end\n" "\n" " if type(box.net.sql.connectors[driver]) ~= 'function' then\n" " error(string.format(\"Unknown driver '%s'\", driver))\n" " end\n" "\n" " local self = {\n" " -- connection variables\n" " driver = driver,\n" " host = host,\n" " port = port,\n" " user = user,\n" " password = password,\n" " db = db,\n" "\n" " -- private variables\n" " queue = {},\n" " processing = false,\n" "\n" " -- throw exception if error\n" " raise = true\n" " }\n" "\n" " -- config parameters\n" " if type(cfg) == 'table' then\n" " if type(cfg.raise) == 'boolean' then\n" " self.raise = cfg.raise\n" " end\n" " end\n" "\n" " local init = { ... }\n" "\n" " setmetatable(self, box.net.sql)\n" "\n" " -- it add 'raw' field in the table\n" " local s, c = pcall(box.net.sql.connectors[driver], self)\n" " if not s then\n" " if self.raise then\n" " error(c)\n" " end\n" " return nil, c\n" " end\n" "\n" " -- perform init statements\n" " for i, s in pairs(init) do\n" " c:execute(unpack(s))\n" " end\n" " return c\n" " end,\n" "\n" " connectors = { },\n" "\n" " __index = {\n" " -- base method\n" " -- example:\n" " -- local tuples, arows, txtst = db:execute(sql, args)\n" " -- tuples - a table of tuples (tables)\n" " -- arows - count of affected rows\n" " -- txtst - text status (Postgresql specific)\n" "\n" " -- the method throws exception by default.\n" " -- user can change the behaviour by set 'connection.raise'\n" " -- attribute to 'false'\n" " -- in the case it will return negative arows if error and\n" " -- txtst will contain text of error\n" "\n" " execute = function(self, sql, ...)\n" " -- waits until connection will be free\n" " while self.processing do\n" " self.queue[ box.fiber.fid ] = box.ipc.channel()\n" " self.queue[ box.fiber.fid ]:get()\n" " self.queue[ box.fiber.fid ] = nil\n" " end\n" " self.processing = true\n" "\n" " local res = { pcall(self.raw.execute, self, sql, ...) }\n" " self.processing = false\n" " if not res[1] then\n" " if self.raise then\n" " error(res[2])\n" " end\n" " return {}, -1, res[2]\n" " end\n" "\n" " -- wakeup one waiter\n" " for fid, ch in pairs(self.queue) do\n" " ch:put(true, 0)\n" " self.queue[ fid ] = nil\n" " break\n" " end\n" " table.remove(res, 1)\n" " return unpack(res)\n" " end,\n" "\n" "\n" " -- pings database\n" " -- returns true if success. doesn't throw any errors\n" " ping = function(self)\n" " local pf = function()\n" " local res = self:execute('SELECT 1 AS code')\n" " if type(res) ~= 'table' then\n" " return false\n" " end\n" " if type(res[1]) ~= 'table' then\n" " return false\n" " end\n" "\n" " return res[1].code == 1\n" " end\n" "\n" " local res, code = pcall(pf)\n" " if res == true then\n" " return code\n" " else\n" " return false\n" " end\n" " end,\n" "\n" "\n" " -- select rows\n" " -- returns table of rows\n" " select = function(self, sql, ...)\n" " local res = self:execute(sql, ...)\n" " return res\n" " end,\n" "\n" " -- select one row\n" " single = function(self, sql, ...)\n" " local res = self:execute(sql, ...)\n" " if #res > 1 then\n" " error(\"SQL request returned multiply rows\")\n" " end\n" " return res[1]\n" " end,\n" "\n" " -- perform request. returns count of affected rows\n" " perform = function(self, sql, ...)\n" " local res, affected, status = self:execute(sql, ...)\n" " return affected\n" " end,\n" "\n" "\n" " -- quote variable\n" " quote = function(self, variable)\n" " return self.raw:quote(variable)\n" " end,\n" " \n" " -- quote identifier\n" " quote_ident = function(self, variable)\n" " return self.raw:quote_ident(variable)\n" " end,\n" "\n" "\n" " -- begin transaction\n" " begin_work = function(self)\n" " return self:perform('BEGIN')\n" " end,\n" "\n" " -- commit transaction\n" " commit = function(self)\n" " return self:perform('COMMIT')\n" " end,\n" "\n" " -- rollback transaction\n" " rollback = function(self)\n" " return self:perform('ROLLBACK')\n" " end,\n" "\n" " -- transaction\n" " txn = function(self, proc)\n" " local raise = self.raise\n" " self.raise = true\n" " self:begin_work()\n" " local res = { pcall(proc, self) }\n" "\n" " -- commit transaction\n" " if res[1] then\n" " res = { pcall(function() self:commit() end) }\n" " self.raise = raise\n" " if res[1] then\n" " return true\n" " end\n" " return res[1], res[2]\n" " end\n" "\n" "\n" " local res_txn = { pcall(function() self:rollback() end) }\n" "\n" " if not res_txn[1] then\n" " res[2] = res[2] .. \"\\n\" .. res_txn[2]\n" " end\n" " self.raise = raise\n" " return res[1], res[2]\n" " end\n" " }\n" "}\n" "" ; tarantool-1.5.1.218.g1a69fd6/src/box/space.h0000664000000000000000000001726012231715257016616 0ustar rootroot#ifndef TARANTOOL_BOX_SPACE_H_INCLUDED #define TARANTOOL_BOX_SPACE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "index.h" #include "key_def.h" #include #include struct tarantool_cfg; struct space { Index *index[BOX_INDEX_MAX]; /** If not set (is 0), any tuple in the * space can have any number of fields. * If set, each tuple * must have exactly this many fields. */ uint32_t arity; /** * The number of indexes in the space. * * It is equal to the number of non-nil members of the index * array and defines the key_defs array size as well. */ uint32_t key_count; /** * The descriptors for all indexes that belong to the space. */ struct key_def *key_defs; /** Space number. */ uint32_t no; /** Default tuple format used by this space */ struct tuple_format *format; }; /** Get space ordinal number. */ static inline uint32_t space_n(struct space *sp) { return sp->no; } /** * @brief A single method to handle REPLACE, DELETE and UPDATE. * * @param sp space * @param old_tuple the tuple that should be removed (can be NULL) * @param new_tuple the tuple that should be inserted (can be NULL) * @param mode dup_replace_mode, used only if new_tuple is not * NULL and old_tuple is NULL, and only for the * primary key. * * For DELETE, new_tuple must be NULL. old_tuple must be * previously found in the primary key. * * For REPLACE, old_tuple must be NULL. The additional * argument dup_replace_mode further defines how REPLACE * should proceed. * * For UPDATE, both old_tuple and new_tuple must be given, * where old_tuple must be previously found in the primary key. * * Let's consider these three cases in detail: * * 1. DELETE, old_tuple is not NULL, new_tuple is NULL * The effect is that old_tuple is removed from all * indexes. dup_replace_mode is ignored. * * 2. REPLACE, old_tuple is NULL, new_tuple is not NULL, * has one simple sub-case and two with further * ramifications: * * A. dup_replace_mode is DUP_INSERT. Attempts to insert the * new tuple into all indexes. If *any* of the unique indexes * has a duplicate key, deletion is aborted, all of its * effects are removed, and an error is thrown. * * B. dup_replace_mode is DUP_REPLACE. It means an existing * tuple has to be replaced with the new one. To do it, tries * to find a tuple with a duplicate key in the primary index. * If the tuple is not found, throws an error. Otherwise, * replaces the old tuple with a new one in the primary key. * Continues on to secondary keys, but if there is any * secondary key, which has a duplicate tuple, but one which * is different from the duplicate found in the primary key, * aborts, puts everything back, throws an exception. * * For example, if there is a space with 3 unique keys and * two tuples { 1, 2, 3 } and { 3, 1, 2 }: * * This REPLACE/DUP_REPLACE is OK: { 1, 5, 5 } * This REPLACE/DUP_REPLACE is not OK: { 2, 2, 2 } (there * is no tuple with key '2' in the primary key) * This REPLACE/DUP_REPLACE is not OK: { 1, 1, 1 } (there * is a conflicting tuple in the secondary unique key). * * C. dup_replace_mode is DUP_REPLACE_OR_INSERT. If * there is a duplicate tuple in the primary key, behaves the * same way as DUP_REPLACE, otherwise behaves the same way as * DUP_INSERT. * * 3. UPDATE has to delete the old tuple and insert a new one. * dup_replace_mode is ignored. * Note that old_tuple primary key doesn't have to match * new_tuple primary key, thus a duplicate can be found. * For this reason, and since there can be duplicates in * other indexes, UPDATE is the same as DELETE + * REPLACE/DUP_INSERT. * * @return old_tuple. DELETE, UPDATE and REPLACE/DUP_REPLACE * always produce an old tuple. REPLACE/DUP_INSERT always returns * NULL. REPLACE/DUP_REPLACE_OR_INSERT may or may not find * a duplicate. * * The method is all-or-nothing in all cases. Changes are either * applied to all indexes, or nothing applied at all. * * Note, that even in case of REPLACE, dup_replace_mode only * affects the primary key, for secondary keys it's always * DUP_INSERT. * * @return tuple that was removed from the space. * The call never removes more than one tuple: if * old_tuple is given, dup_replace_mode is ignored. * Otherwise, it's taken into account only for the * primary key. */ struct tuple * space_replace(struct space *space, struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode); /** * Check that the tuple has correct arity and correct field * types (a pre-requisite for an INSERT). */ void space_validate_tuple(struct space *sp, struct tuple *new_tuple); /** * Get index by index number. * @return NULL if index not found. */ static inline Index * space_index(struct space *sp, uint32_t index_no) { if (index_no < BOX_INDEX_MAX) return sp->index[index_no]; return NULL; } /** * Call a visitor function on every enabled space. */ void space_foreach(void (*func)(struct space *sp, void *udata), void *udata); /** * Try to look up a space by space number. * * @return NULL if space not found, otherwise space object. */ struct space *space_by_n(uint32_t space_no); static inline struct space * space_find(uint32_t space_no) { struct space *s = space_by_n(space_no); if (s) return s; tnt_raise(ClientError, ER_NO_SUCH_SPACE, space_no); } /** Get key_def ordinal number. */ static inline uint32_t key_def_n(struct space *sp, struct key_def *kp) { assert(kp >= sp->key_defs && kp < (sp->key_defs + sp->key_count)); return kp - sp->key_defs; } struct space * space_new(uint32_t space_no, struct key_def *key_defs, uint32_t key_count, uint32_t arity); /** Get index ordinal number in space. */ static inline uint32_t index_n(Index *index) { return key_def_n(index->space, index->key_def); } /** Check whether or not an index is primary in space. */ static inline bool index_is_primary(Index *index) { return index_n(index) == 0; } void space_init(void); void space_free(void); int check_spaces(struct tarantool_cfg *conf); /* Build secondary keys. */ void begin_build_primary_indexes(void); void end_build_primary_indexes(void); void build_secondary_indexes(void); static inline Index * index_find(struct space *sp, uint32_t index_no) { Index *idx = space_index(sp, index_no); if (idx == NULL) tnt_raise(LoggedError, ER_NO_SUCH_INDEX, index_no, space_n(sp)); return idx; } #endif /* TARANTOOL_BOX_SPACE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/tree_index.h0000664000000000000000000000455712231715257017656 0ustar rootroot#ifndef TARANTOOL_BOX_TREE_INDEX_H_INCLUDED #define TARANTOOL_BOX_TREE_INDEX_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "index.h" #include /** * Instantiate sptree definitions */ SPTREE_DEF(index, realloc); class TreeIndex: public Index { public: TreeIndex(struct key_def *key_def, struct space *space); virtual ~TreeIndex(); virtual void beginBuild(); virtual void buildNext(struct tuple *tuple); virtual void endBuild(); virtual void build(Index *pk); virtual size_t size() const; virtual struct tuple *min() const; virtual struct tuple *max() const; virtual struct tuple *random(uint32_t rnd) const; virtual struct tuple *findByKey(const char *key, uint32_t part_count) const; virtual struct tuple *replace(struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode); virtual struct iterator *allocIterator() const; virtual void initIterator(struct iterator *iterator, enum iterator_type type, const char *key, uint32_t part_count) const; // protected: sptree_index tree; }; #endif /* TARANTOOL_BOX_TREE_INDEX_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/key_def.h0000664000000000000000000000641012231715257017124 0ustar rootroot#ifndef TARANTOOL_BOX_KEY_DEF_H_INCLUDED #define TARANTOOL_BOX_KEY_DEF_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/util.h" /* * Possible field data types. Can't use STRS/ENUM macros for them, * since there is a mismatch between enum name (STRING) and type * name literal ("STR"). STR is already used as Objective C type. */ enum field_type { UNKNOWN = 0, NUM, NUM64, STRING, field_type_MAX }; extern const char *field_type_strs[]; static inline uint32_t field_type_maxlen(enum field_type type) { static const uint32_t maxlen[] = { UINT32_MAX, 4, 8, UINT32_MAX, UINT32_MAX }; return maxlen[type]; } #define INDEX_TYPE(_) \ _(HASH, 0) /* HASH Index */ \ _(TREE, 1) /* TREE Index */ \ _(BITSET, 2) /* BITSET Index */ \ ENUM(index_type, INDEX_TYPE); extern const char *index_type_strs[]; /** Descriptor of a single part in a multipart key. */ struct key_part { uint32_t fieldno; enum field_type type; }; /* Descriptor of a multipart key. */ struct key_def { /* Description of parts of a multipart index. */ struct key_part *parts; /* * An array holding field positions in 'parts' array. * Imagine there is index[1] = { key_field[0].fieldno=5, * key_field[1].fieldno=3 }. * 'parts' array for such index contains data from * key_field[0] and key_field[1] respectively. * max_fieldno is 5, and cmp_order array holds offsets of * field 3 and 5 in 'parts' array: -1, -1, -1, 0, -1, 1. */ uint32_t *cmp_order; /* The size of the 'parts' array. */ uint32_t part_count; /* * Max fieldno in 'parts' array. Defines the size of * cmp_order array (which is max_fieldno + 1). */ uint32_t max_fieldno; bool is_unique; enum index_type type; }; struct tarantool_cfg_space_index; void key_def_create(struct key_def *def, struct tarantool_cfg_space_index *cfg_index); void key_def_destroy(struct key_def *def); #endif /* TARANTOOL_BOX_KEY_DEF_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/tuple_update.cc0000664000000000000000000005114512242653271020353 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tuple_update.h" #include "third_party/queue.h" #include #include #include /** UPDATE request implementation. * UPDATE request is represented by a sequence of operations, each * working with a single field. There also are operations which * add or remove fields. More than one operation on the same field * is allowed. * * Supported field change operations are: SET, ADD, bitwise AND, * XOR and OR, SPLICE. * * Supported tuple change operations are: SET (when SET field_no * == last_field_no + 1), DELETE, INSERT, PUSH and POP. * If the number of fields in a tuple is altered by an operation, * field index of all following operation is evaluated against the * new tuple. * * Despite the allowed complexity, a typical use case for UPDATE * is when the operation count is much less than field count in * a tuple. * * With the common case in mind, UPDATE tries to minimize * the amount of unnecessary temporary tuple copies. * * First, operations are parsed and initialized. Then, the * resulting tuple length is calculated. A new tuple is allocated. * Finally, operations are applied sequentially, each copying data * from the old tuple to the new tuple. * * With this approach, cost of UPDATE is proportional to O(tuple * length) + O(C * log C), where C is the number of operations in * the request, and data is copied from the old tuple to the new * one only once. * * There are two special cases in this general scheme, which * are handled as follows: * * 1) As long as INSERT, DELETE, PUSH and POP change the relative * field order, an auxiliary data structure is necessary to look * up fields in the "old" tuple by field number. Such field * index is built on demand, using "rope" data structure. * * A rope is a binary tree designed to store long strings built * from pieces. Each tree node points to a substring of a large * string. In our case, each rope node points at a range of * fields, initially in the old tuple, and then, as fields are * added and deleted by UPDATE, in the "current" tuple. * Note, that the tuple itself is not materialized: when * operations which affect field count are initialized, the rope * is updated to reflect the new field order. * In particular, if a field is deleted by an operation, * it disappears from the rope and all subsequent operations * on this field number instead affect the field following the * one. * * 2) Multiple operations can occur on the same field, and not all * operations, by design, can work correctly "in place". * For example, SET(4, "aaaaaa") followed by SPLICE(4, 0, 5, 0, * ""), * results in zero increase of total tuple length, but requires * space to store SET results. To make sure we never go beyond * allocated memory, the main loop may allocate a temporary buffer * to store intermediate operation results. */ STRS(update_op_codes, UPDATE_OP_CODES); /** Update internal state */ struct tuple_update { region_alloc_func alloc; void *alloc_ctx; struct rope *rope; struct update_op *ops; uint32_t op_count; uint32_t new_tuple_size; uint32_t new_tuple_fcount; }; /** Argument of SET operation. */ struct op_set_arg { uint32_t length; const char *value; }; /** Argument of ADD, AND, XOR, OR operations. */ struct op_arith_arg { uint32_t val_size; union { int32_t i32_val; int64_t i64_val; }; }; /** Argument of SPLICE. */ struct op_splice_arg { int32_t offset; /** splice position */ int32_t cut_length; /** cut this many bytes. */ const char *paste; /** paste what? */ int32_t paste_length; /** paste this many bytes. */ /** Offset of the tail in the old field */ int32_t tail_offset; /** Size of the tail. */ int32_t tail_length; }; union update_op_arg { struct op_set_arg set; struct op_arith_arg arith; struct op_splice_arg splice; }; struct update_field; struct update_op; typedef void (*init_op_func)(struct tuple_update *update, struct update_op *op); typedef void (*do_op_func)(union update_op_arg *arg, const char *in, char *out); /** A set of functions and properties to initialize and do an op. */ struct update_op_meta { init_op_func init_op; do_op_func do_op; bool works_in_place; }; /** A single UPDATE operation. */ struct update_op { STAILQ_ENTRY(update_op) next; struct update_op_meta *meta; union update_op_arg arg; uint32_t field_no; uint32_t new_field_len; uint8_t opcode; }; STAILQ_HEAD(op_list, update_op); /** * We can have more than one operation on the same field. * A descriptor of one changed field. */ struct update_field { /** UPDATE operations against the first field in the range. */ struct op_list ops; /** Points at start of field *data* in the old tuple. */ const char *old; /** End of the old field. */ const char *tail; /** * Length of the "tail" in the old tuple from end * of old data to the beginning of the field in the * next update_field structure. */ uint32_t tail_len; }; static void update_field_init(struct update_field *field, const char *old, uint32_t old_len, uint32_t tail_len) { STAILQ_INIT(&field->ops); field->old = old; field->tail = old + old_len; field->tail_len = tail_len; } static inline uint32_t update_field_len(struct update_field *f) { struct update_op *last = STAILQ_LAST(&f->ops, update_op, next); return last ? last->new_field_len : f->tail - f->old; } static inline void op_check_field_no(uint32_t field_no, uint32_t field_max) { if (field_no > field_max) tnt_raise(ClientError, ER_NO_SUCH_FIELD, field_no); } static inline void op_adjust_field_no(struct update_op *op, uint32_t field_max) { if (op->field_no == UINT32_MAX) op->field_no = field_max; else op_check_field_no(op->field_no, field_max); } static void do_update_op_set(struct op_set_arg *arg, const char *in __attribute__((unused)), char *out) { memcpy(out, arg->value, arg->length); } static void do_update_op_add(struct op_arith_arg *arg, const char *in, char *out) { if (arg->val_size == sizeof(int32_t)) *(int32_t *)out = *(int32_t *)in + arg->i32_val; else *(int64_t *)out = *(int64_t *)in + arg->i64_val; } static void do_update_op_subtract(struct op_arith_arg *arg, const char *in, char *out) { if (arg->val_size == sizeof(int32_t)) *(int32_t *)out = *(int32_t *)in - arg->i32_val; else *(int64_t *)out = *(int64_t *)in - arg->i64_val; } static void do_update_op_and(struct op_arith_arg *arg, const char *in, char *out) { if (arg->val_size == sizeof(int32_t)) *(int32_t *)out = *(int32_t *)in & arg->i32_val; else *(int64_t *)out = *(int64_t *)in & arg->i64_val; } static void do_update_op_xor(struct op_arith_arg *arg, const char *in, char *out) { if (arg->val_size == sizeof(int32_t)) *(int32_t *)out = *(int32_t *)in ^ arg->i32_val; else *(int64_t *)out = *(int64_t *)in ^ arg->i64_val; } static void do_update_op_or(struct op_arith_arg *arg, const char *in, char *out) { if (arg->val_size == sizeof(int32_t)) *(int32_t *)out = *(int32_t *)in | arg->i32_val; else *(int64_t *)out = *(int64_t *)in | arg->i64_val; } static void do_update_op_splice(struct op_splice_arg *arg, const char *in, char *out) { memcpy(out, in, arg->offset); /* copy field head. */ out = out + arg->offset; memcpy(out, arg->paste, arg->paste_length); /* copy the paste */ out = out + arg->paste_length; memcpy(out, in + arg->tail_offset, arg->tail_length); /* copy tail */ } static void do_update_op_insert(struct op_set_arg *arg, const char *in __attribute__((unused)), char *out) { memcpy(out, arg->value, arg->length); } static void init_update_op_insert(struct tuple_update *update, struct update_op *op) { op_adjust_field_no(op, rope_size(update->rope)); struct update_field *field = (struct update_field *) update->alloc(update->alloc_ctx, sizeof(*field)); update_field_init(field, op->arg.set.value, op->arg.set.length, 0); rope_insert(update->rope, op->field_no, field, 1); } static void init_update_op_set(struct tuple_update *update, struct update_op *op) { if (op->field_no < rope_size(update->rope)) { struct update_field *field = (struct update_field *) rope_extract(update->rope, op->field_no); /* Skip all previous ops. */ STAILQ_INIT(&field->ops); STAILQ_INSERT_TAIL(&field->ops, op, next); op->new_field_len = op->arg.set.length; } else { init_update_op_insert(update, op); } } static void init_update_op_delete_1_4(struct tuple_update *update, struct update_op *op) { op_adjust_field_no(op, rope_size(update->rope) - 1); rope_erase(update->rope, op->field_no); } static void init_update_op_delete(struct tuple_update *update, struct update_op *op) { op_adjust_field_no(op, rope_size(update->rope) - 1); uint32_t delete_count = 1; if (op->arg.set.length > 0) { /* Check the operand type, if present. */ if (op->arg.set.length != sizeof(int32_t)) tnt_raise(ClientError, ER_ARG_TYPE, op->field_no, "NUM"); delete_count = *(int32_t *)op->arg.set.value; if (delete_count == UINT32_MAX) delete_count = rope_size(update->rope) - op->field_no; else if (op->field_no + delete_count > rope_size(update->rope)) delete_count = rope_size(update->rope) - op->field_no; if (delete_count == 0) tnt_raise(ClientError, ER_UPDATE_FIELD, op->field_no, "cannot delete 0 fields"); } for (uint32_t u = 0; u < delete_count; u++) rope_erase(update->rope, op->field_no); } static void init_update_op_arith(struct tuple_update *update, struct update_op *op) { op_check_field_no(op->field_no, rope_size(update->rope) - 1); struct update_field *field = (struct update_field *) rope_extract(update->rope, op->field_no); struct op_arith_arg *arg = &op->arg.arith; uint32_t field_len = update_field_len(field); switch (field_len) { case sizeof(int32_t): /* 32-bit operation */ /* Check the operand type. */ if (op->arg.set.length != sizeof(int32_t)) tnt_raise(ClientError, ER_ARG_TYPE, op->field_no, "NUM"); arg->i32_val = *(int32_t *)op->arg.set.value; break; case sizeof(int64_t): /* 64-bit operation */ switch (op->arg.set.length) { case sizeof(int32_t): /* 32-bit operand */ /* cast 32-bit operand to 64-bit */ arg->i64_val = *(int32_t *)op->arg.set.value; break; case sizeof(int64_t): /* 64-bit operand */ arg->i64_val = *(int64_t *)op->arg.set.value; break; default: tnt_raise(ClientError, ER_ARG_TYPE, op->field_no, "NUM or NUM64"); } break; default: tnt_raise(ClientError, ER_FIELD_TYPE, "32-bit or 64-bit int"); } STAILQ_INSERT_TAIL(&field->ops, op, next); arg->val_size = op->new_field_len = field_len; } static void init_update_op_splice(struct tuple_update *update, struct update_op *op) { op_check_field_no(op->field_no, rope_size(update->rope) - 1); struct update_field *field = (struct update_field *) rope_extract(update->rope, op->field_no); uint32_t field_len = update_field_len(field); struct op_splice_arg *arg = &op->arg.splice; const char *value = op->arg.set.value; const char *end = value + op->arg.set.length; /* Read the offset. */ arg->offset = pick_field_u32(&value, end); if (arg->offset < 0) { if (-arg->offset > field_len) tnt_raise(ClientError, ER_SPLICE, "offset is out of bound"); arg->offset += field_len; } else if (arg->offset > field_len) { arg->offset = field_len; } assert(arg->offset >= 0 && arg->offset <= field_len); /* Read the cut length. */ arg->cut_length = pick_field_u32(&value, end); if (arg->cut_length < 0) { if (-arg->cut_length > (field_len - arg->offset)) arg->cut_length = 0; else arg->cut_length += field_len - arg->offset; } else if (arg->cut_length > field_len - arg->offset) { arg->cut_length = field_len - arg->offset; } /* Read the paste. */ arg->paste = pick_field_str(&value, end, (uint32_t *) &arg->paste_length); /* Fill tail part */ arg->tail_offset = arg->offset + arg->cut_length; arg->tail_length = field_len - arg->tail_offset; /* Check that the operands are fully read. */ if (value != end) tnt_raise(IllegalParams, "field splice format error"); /* Record the new field length. */ op->new_field_len = arg->offset + arg->paste_length + arg->tail_length; STAILQ_INSERT_TAIL(&field->ops, op, next); } static struct update_op_meta update_op_meta[update_op_codes_MAX] = { { init_update_op_set, (do_op_func) do_update_op_set, true }, { init_update_op_arith, (do_op_func) do_update_op_add, true }, { init_update_op_arith, (do_op_func) do_update_op_and, true }, { init_update_op_arith, (do_op_func) do_update_op_xor, true }, { init_update_op_arith, (do_op_func) do_update_op_or, true }, { init_update_op_splice, (do_op_func) do_update_op_splice, false }, { init_update_op_delete_1_4, (do_op_func) NULL, true }, { init_update_op_insert, (do_op_func) do_update_op_insert, true }, { init_update_op_arith, (do_op_func) do_update_op_subtract, true }, { init_update_op_delete, (do_op_func) NULL, true }, }; static inline size_t tuple_range_size(const char **begin, const char *end, size_t count) { const char *start = *begin; while (*begin < end && count-- > 0) { size_t len = load_varint32(begin); *begin += len; } return *begin - start; } /** Split a range of fields in two, allocating update_field * context for the new range. */ static void * update_field_split(void *split_ctx, void *data, size_t size __attribute__((unused)), size_t offset) { struct tuple_update *update = (struct tuple_update *) split_ctx; struct update_field *prev = (struct update_field *) data; struct update_field *next = (struct update_field *) update->alloc(update->alloc_ctx, sizeof(*next)); assert(offset > 0 && prev->tail_len > 0); const char *field = prev->tail; const char *end = field + prev->tail_len; prev->tail_len = tuple_range_size(&field, end, offset - 1); uint32_t field_len = load_varint32(&field); update_field_init(next, field, field_len, end - field - field_len); return next; } /** Free rope node - do nothing, since we use a pool allocator. */ static void region_alloc_free_stub(void *ctx, void *mem) { (void) ctx; (void) mem; } /** * We found a tuple to do the update on. Prepare and optimize * the operations. */ void update_create_rope(struct tuple_update *update, const char *tuple_data, const char *tuple_data_end, uint32_t field_count) { update->rope = rope_new(update_field_split, update, update->alloc, region_alloc_free_stub, update->alloc_ctx); /* Initialize the rope with the old tuple. */ struct update_field *first = (struct update_field *) update->alloc(update->alloc_ctx, sizeof(*first)); const char *field = tuple_data; const char *end = tuple_data_end; uint32_t field_len = load_varint32(&field); update_field_init(first, field, field_len, end - field - field_len); rope_append(update->rope, first, field_count); for (uint32_t i = 0; i < update->op_count; i++) { update->ops[i].meta->init_op(update, &update->ops[i]); } } static void update_calc_new_tuple_length(struct tuple_update *update) { struct rope_iter it; struct rope_node *node; rope_iter_create(&it, update->rope); update->new_tuple_size = 0; for (node = rope_iter_start(&it); node; node = rope_iter_next(&it)) { struct update_field *field = (struct update_field *) rope_leaf_data(node); uint32_t field_len = update_field_len(field); update->new_tuple_size += (varint32_sizeof(field_len) + field_len + field->tail_len); } update->new_tuple_fcount = rope_size(update->rope); if (update->new_tuple_size > UINT32_MAX) tnt_raise(ClientError, ER_TUPLE_IS_TOO_LONG, update->new_tuple_size); } static void do_update_ops(struct tuple_update *update, char *new_data) { char *new_data_end = new_data + update->new_tuple_size; uint32_t total_field_count = 0; struct rope_iter it; struct rope_node *node; rope_iter_create(&it, update->rope); for (node = rope_iter_start(&it); node; node = rope_iter_next(&it)) { struct update_field *field = (struct update_field *) rope_leaf_data(node); uint32_t field_count = rope_leaf_size(node); uint32_t field_len = update_field_len(field); new_data = pack_varint32(new_data, field_len); const char *old_field = field->old; char *new_field = (STAILQ_EMPTY(&field->ops) ? (char *) old_field : new_data); struct update_op *op; STAILQ_FOREACH(op, &field->ops, next) { /* * Pre-allocate a temporary buffer when the * subject operation requires it, i.e.: * - op overwrites data while reading it thus * can't work with in == out (SPLICE) * - op result doesn't fit into the new tuple * (can happen when a big SET is then * shrunk by a SPLICE). */ if ((old_field == new_field && !op->meta->works_in_place) || /* * Sic: this predicate must function even if * new_field != new_data. */ new_data + op->new_field_len > new_data_end) { /* * Since we don't know which of the two * conditions above got us here, simply * palloc a *new* buffer of sufficient * size. */ new_field = (char *) update->alloc( update->alloc_ctx, op->new_field_len); } assert(op->meta != NULL); op->meta->do_op(&op->arg, old_field, new_field); /* Next op uses previous op output as its input. */ old_field = new_field; } /* * Make sure op results end up in the tuple, copy * tail_len from the old tuple. */ if (new_field != new_data) memcpy(new_data, new_field, field_len); new_data += field_len; assert(field->tail_len == 0 || field_count > 1); if (field_count > 1) { memcpy(new_data, field->tail, field->tail_len); new_data += field->tail_len; } total_field_count += field_count; } assert(update->new_tuple_fcount == total_field_count); } static void update_read_ops(struct tuple_update *update, const char *expr, const char *expr_end) { /* number of operations */ update->op_count = pick_u32(&expr, expr_end); if (update->op_count > BOX_UPDATE_OP_CNT_MAX) tnt_raise(IllegalParams, "too many operations for update"); if (update->op_count == 0) tnt_raise(IllegalParams, "no operations for update"); /* Read update operations. */ update->ops = (struct update_op *) update->alloc(update->alloc_ctx, update->op_count * sizeof(struct update_op)); struct update_op *op = update->ops; struct update_op *ops_end = op + update->op_count; for (; op < ops_end; op++) { /* Read operation */ op->field_no = pick_u32(&expr, expr_end); op->opcode = pick_u8(&expr, expr_end); if (op->opcode >= update_op_codes_MAX) tnt_raise(ClientError, ER_UNKNOWN_UPDATE_OP); op->meta = &update_op_meta[op->opcode]; op->arg.set.value = pick_field(&expr, expr_end); op->arg.set.length = load_varint32(&op->arg.set.value); } /* Check the remainder length, the request must be fully read. */ if (expr != expr_end) tnt_raise(IllegalParams, "can't unpack update operations"); } struct tuple_update * tuple_update_prepare(region_alloc_func alloc, void *alloc_ctx, const char *expr,const char *expr_end, const char *old_data, const char *old_data_end, uint32_t old_fcount, uint32_t *p_new_size, uint32_t *p_new_fcount) { struct tuple_update *update = (struct tuple_update *) alloc(alloc_ctx, sizeof(*update)); assert(update != NULL); memset(update, 0, sizeof(*update)); update->alloc = alloc; update->alloc_ctx = alloc_ctx; update_read_ops(update, expr, expr_end); update_create_rope(update, old_data, old_data_end, old_fcount); update_calc_new_tuple_length(update); *p_new_size = update->new_tuple_size; *p_new_fcount = update->new_tuple_fcount; return update; } void tuple_update_execute(struct tuple_update *update, char *new_data) { do_update_ops(update, new_data); } tarantool-1.5.1.218.g1a69fd6/src/box/CMakeLists.txt0000664000000000000000000000151612231715257020107 0ustar rootrootif (TARGET_OS_DARWIN) set(module_link_flags "-pagezero_size 10000 -image_base 100000000") endif() file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/src/box/lua) set(lua_sources) lua_source(lua_sources lua/box.lua) lua_source(lua_sources lua/box_net.lua) lua_source(lua_sources lua/misc.lua) lua_source(lua_sources lua/sql.lua) add_custom_target(box_generate_lua_sources WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src/box DEPENDS ${lua_sources}) set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources}) tarantool_module("box" tuple.cc tuple_convert.cc tuple_update.cc key_def.cc index.cc hash_index.cc tree_index.cc bitset_index.cc space.cc port.cc request.cc txn.cc box.cc ${lua_sources} box_lua.cc box_lua_space.cc) target_link_libraries(tarantool_box bitset) tarantool-1.5.1.218.g1a69fd6/src/box/tuple_update.h0000664000000000000000000000451012242653271020207 0ustar rootroot#ifndef TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED #define TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "tarantool/util.h" enum { /** A limit on how many operations a single UPDATE can have. */ BOX_UPDATE_OP_CNT_MAX = 4000, }; /** UPDATE operation codes. */ #define UPDATE_OP_CODES(_) \ _(UPDATE_OP_SET, 0) \ _(UPDATE_OP_ADD, 1) \ _(UPDATE_OP_AND, 2) \ _(UPDATE_OP_XOR, 3) \ _(UPDATE_OP_OR, 4) \ _(UPDATE_OP_SPLICE, 5) \ _(UPDATE_OP_DELETE_1_4, 6) \ _(UPDATE_OP_INSERT, 7) \ _(UPDATE_OP_SUBTRACT, 8) \ _(UPDATE_OP_DELETE, 9) ENUM(update_op_codes, UPDATE_OP_CODES); typedef void *(*region_alloc_func)(void *, size_t); struct tuple_update * tuple_update_prepare(region_alloc_func alloc, void *alloc_ctx, const char *expr,const char *expr_end, const char *old_data, const char *old_data_end, uint32_t old_fcount, uint32_t *p_new_size, uint32_t *p_new_fcount); void tuple_update_execute(struct tuple_update *update, char *new_data); #endif /* TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/Makefile0000664000000000000000000010712012213333034016772 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/box/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/box/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/box/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/box/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. src/box/CMakeFiles/box_generate_lua_sources.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/box/CMakeFiles/box_generate_lua_sources.dir/rule .PHONY : src/box/CMakeFiles/box_generate_lua_sources.dir/rule # Convenience name for target. box_generate_lua_sources: src/box/CMakeFiles/box_generate_lua_sources.dir/rule .PHONY : box_generate_lua_sources # fast build rule for target. box_generate_lua_sources/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/box_generate_lua_sources.dir/build.make src/box/CMakeFiles/box_generate_lua_sources.dir/build .PHONY : box_generate_lua_sources/fast # Convenience name for target. src/box/CMakeFiles/ltbox.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/box/CMakeFiles/ltbox.dir/rule .PHONY : src/box/CMakeFiles/ltbox.dir/rule # Convenience name for target. ltbox: src/box/CMakeFiles/ltbox.dir/rule .PHONY : ltbox # fast build rule for target. ltbox/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/build .PHONY : ltbox/fast # Convenience name for target. src/box/CMakeFiles/tarantool_box.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/box/CMakeFiles/tarantool_box.dir/rule .PHONY : src/box/CMakeFiles/tarantool_box.dir/rule # Convenience name for target. tarantool_box: src/box/CMakeFiles/tarantool_box.dir/rule .PHONY : tarantool_box # fast build rule for target. tarantool_box/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/build .PHONY : tarantool_box/fast __/__/cfg/tarantool_box_cfg.o: __/__/cfg/tarantool_box_cfg.c.o .PHONY : __/__/cfg/tarantool_box_cfg.o # target to build an object file __/__/cfg/tarantool_box_cfg.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/__/__/cfg/tarantool_box_cfg.c.o .PHONY : __/__/cfg/tarantool_box_cfg.c.o __/__/cfg/tarantool_box_cfg.i: __/__/cfg/tarantool_box_cfg.c.i .PHONY : __/__/cfg/tarantool_box_cfg.i # target to preprocess a source file __/__/cfg/tarantool_box_cfg.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/__/__/cfg/tarantool_box_cfg.c.i .PHONY : __/__/cfg/tarantool_box_cfg.c.i __/__/cfg/tarantool_box_cfg.s: __/__/cfg/tarantool_box_cfg.c.s .PHONY : __/__/cfg/tarantool_box_cfg.s # target to generate assembly for a file __/__/cfg/tarantool_box_cfg.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/__/__/cfg/tarantool_box_cfg.c.s .PHONY : __/__/cfg/tarantool_box_cfg.c.s __/assoc.o: __/assoc.cc.o .PHONY : __/assoc.o # target to build an object file __/assoc.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/assoc.cc.o .PHONY : __/assoc.cc.o __/assoc.i: __/assoc.cc.i .PHONY : __/assoc.i # target to preprocess a source file __/assoc.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/assoc.cc.i .PHONY : __/assoc.cc.i __/assoc.s: __/assoc.cc.s .PHONY : __/assoc.s # target to generate assembly for a file __/assoc.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/assoc.cc.s .PHONY : __/assoc.cc.s __/fiber.o: __/fiber.cc.o .PHONY : __/fiber.o # target to build an object file __/fiber.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/fiber.cc.o .PHONY : __/fiber.cc.o __/fiber.i: __/fiber.cc.i .PHONY : __/fiber.i # target to preprocess a source file __/fiber.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/fiber.cc.i .PHONY : __/fiber.cc.i __/fiber.s: __/fiber.cc.s .PHONY : __/fiber.s # target to generate assembly for a file __/fiber.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/fiber.cc.s .PHONY : __/fiber.cc.s __/lua/init.o: __/lua/init.cc.o .PHONY : __/lua/init.o # target to build an object file __/lua/init.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/lua/init.cc.o .PHONY : __/lua/init.cc.o __/lua/init.i: __/lua/init.cc.i .PHONY : __/lua/init.i # target to preprocess a source file __/lua/init.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/lua/init.cc.i .PHONY : __/lua/init.cc.i __/lua/init.s: __/lua/init.cc.s .PHONY : __/lua/init.s # target to generate assembly for a file __/lua/init.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/lua/init.cc.s .PHONY : __/lua/init.cc.s __/memcached.o: __/memcached.cc.o .PHONY : __/memcached.o # target to build an object file __/memcached.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/memcached.cc.o .PHONY : __/memcached.cc.o __/memcached.i: __/memcached.cc.i .PHONY : __/memcached.i # target to preprocess a source file __/memcached.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/memcached.cc.i .PHONY : __/memcached.cc.i __/memcached.s: __/memcached.cc.s .PHONY : __/memcached.s # target to generate assembly for a file __/memcached.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/memcached.cc.s .PHONY : __/memcached.cc.s __/opts.o: __/opts.c.o .PHONY : __/opts.o # target to build an object file __/opts.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/opts.c.o .PHONY : __/opts.c.o __/opts.i: __/opts.c.i .PHONY : __/opts.i # target to preprocess a source file __/opts.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/opts.c.i .PHONY : __/opts.c.i __/opts.s: __/opts.c.s .PHONY : __/opts.s # target to generate assembly for a file __/opts.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/opts.c.s .PHONY : __/opts.c.s __/replication.o: __/replication.cc.o .PHONY : __/replication.o # target to build an object file __/replication.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/replication.cc.o .PHONY : __/replication.cc.o __/replication.i: __/replication.cc.i .PHONY : __/replication.i # target to preprocess a source file __/replication.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/replication.cc.i .PHONY : __/replication.cc.i __/replication.s: __/replication.cc.s .PHONY : __/replication.s # target to generate assembly for a file __/replication.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/replication.cc.s .PHONY : __/replication.cc.s __/say.o: __/say.cc.o .PHONY : __/say.o # target to build an object file __/say.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/say.cc.o .PHONY : __/say.cc.o __/say.i: __/say.cc.i .PHONY : __/say.i # target to preprocess a source file __/say.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/say.cc.i .PHONY : __/say.cc.i __/say.s: __/say.cc.s .PHONY : __/say.s # target to generate assembly for a file __/say.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/say.cc.s .PHONY : __/say.cc.s __/tarantool.o: __/tarantool.cc.o .PHONY : __/tarantool.o # target to build an object file __/tarantool.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/tarantool.cc.o .PHONY : __/tarantool.cc.o __/tarantool.i: __/tarantool.cc.i .PHONY : __/tarantool.i # target to preprocess a source file __/tarantool.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/tarantool.cc.i .PHONY : __/tarantool.cc.i __/tarantool.s: __/tarantool.cc.s .PHONY : __/tarantool.s # target to generate assembly for a file __/tarantool.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/__/tarantool.cc.s .PHONY : __/tarantool.cc.s bitset_index.o: bitset_index.cc.o .PHONY : bitset_index.o # target to build an object file bitset_index.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/bitset_index.cc.o .PHONY : bitset_index.cc.o bitset_index.i: bitset_index.cc.i .PHONY : bitset_index.i # target to preprocess a source file bitset_index.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/bitset_index.cc.i .PHONY : bitset_index.cc.i bitset_index.s: bitset_index.cc.s .PHONY : bitset_index.s # target to generate assembly for a file bitset_index.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/bitset_index.cc.s .PHONY : bitset_index.cc.s box.o: box.cc.o .PHONY : box.o # target to build an object file box.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box.cc.o .PHONY : box.cc.o box.i: box.cc.i .PHONY : box.i # target to preprocess a source file box.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box.cc.i .PHONY : box.cc.i box.s: box.cc.s .PHONY : box.s # target to generate assembly for a file box.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box.cc.s .PHONY : box.cc.s box_lua.o: box_lua.cc.o .PHONY : box_lua.o # target to build an object file box_lua.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box_lua.cc.o .PHONY : box_lua.cc.o box_lua.i: box_lua.cc.i .PHONY : box_lua.i # target to preprocess a source file box_lua.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box_lua.cc.i .PHONY : box_lua.cc.i box_lua.s: box_lua.cc.s .PHONY : box_lua.s # target to generate assembly for a file box_lua.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box_lua.cc.s .PHONY : box_lua.cc.s box_lua_space.o: box_lua_space.cc.o .PHONY : box_lua_space.o # target to build an object file box_lua_space.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box_lua_space.cc.o .PHONY : box_lua_space.cc.o box_lua_space.i: box_lua_space.cc.i .PHONY : box_lua_space.i # target to preprocess a source file box_lua_space.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box_lua_space.cc.i .PHONY : box_lua_space.cc.i box_lua_space.s: box_lua_space.cc.s .PHONY : box_lua_space.s # target to generate assembly for a file box_lua_space.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/box_lua_space.cc.s .PHONY : box_lua_space.cc.s hash_index.o: hash_index.cc.o .PHONY : hash_index.o # target to build an object file hash_index.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/hash_index.cc.o .PHONY : hash_index.cc.o hash_index.i: hash_index.cc.i .PHONY : hash_index.i # target to preprocess a source file hash_index.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/hash_index.cc.i .PHONY : hash_index.cc.i hash_index.s: hash_index.cc.s .PHONY : hash_index.s # target to generate assembly for a file hash_index.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/hash_index.cc.s .PHONY : hash_index.cc.s index.o: index.cc.o .PHONY : index.o # target to build an object file index.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/index.cc.o .PHONY : index.cc.o index.i: index.cc.i .PHONY : index.i # target to preprocess a source file index.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/index.cc.i .PHONY : index.cc.i index.s: index.cc.s .PHONY : index.s # target to generate assembly for a file index.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/index.cc.s .PHONY : index.cc.s key_def.o: key_def.cc.o .PHONY : key_def.o # target to build an object file key_def.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/key_def.cc.o .PHONY : key_def.cc.o key_def.i: key_def.cc.i .PHONY : key_def.i # target to preprocess a source file key_def.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/key_def.cc.i .PHONY : key_def.cc.i key_def.s: key_def.cc.s .PHONY : key_def.s # target to generate assembly for a file key_def.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/key_def.cc.s .PHONY : key_def.cc.s lua/box.lua.o: lua/box.lua.c.o .PHONY : lua/box.lua.o # target to build an object file lua/box.lua.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/box.lua.c.o .PHONY : lua/box.lua.c.o lua/box.lua.i: lua/box.lua.c.i .PHONY : lua/box.lua.i # target to preprocess a source file lua/box.lua.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/box.lua.c.i .PHONY : lua/box.lua.c.i lua/box.lua.s: lua/box.lua.c.s .PHONY : lua/box.lua.s # target to generate assembly for a file lua/box.lua.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/box.lua.c.s .PHONY : lua/box.lua.c.s lua/box_net.lua.o: lua/box_net.lua.c.o .PHONY : lua/box_net.lua.o # target to build an object file lua/box_net.lua.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/box_net.lua.c.o .PHONY : lua/box_net.lua.c.o lua/box_net.lua.i: lua/box_net.lua.c.i .PHONY : lua/box_net.lua.i # target to preprocess a source file lua/box_net.lua.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/box_net.lua.c.i .PHONY : lua/box_net.lua.c.i lua/box_net.lua.s: lua/box_net.lua.c.s .PHONY : lua/box_net.lua.s # target to generate assembly for a file lua/box_net.lua.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/box_net.lua.c.s .PHONY : lua/box_net.lua.c.s lua/misc.lua.o: lua/misc.lua.c.o .PHONY : lua/misc.lua.o # target to build an object file lua/misc.lua.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/misc.lua.c.o .PHONY : lua/misc.lua.c.o lua/misc.lua.i: lua/misc.lua.c.i .PHONY : lua/misc.lua.i # target to preprocess a source file lua/misc.lua.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/misc.lua.c.i .PHONY : lua/misc.lua.c.i lua/misc.lua.s: lua/misc.lua.c.s .PHONY : lua/misc.lua.s # target to generate assembly for a file lua/misc.lua.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/misc.lua.c.s .PHONY : lua/misc.lua.c.s lua/sql.lua.o: lua/sql.lua.c.o .PHONY : lua/sql.lua.o # target to build an object file lua/sql.lua.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/sql.lua.c.o .PHONY : lua/sql.lua.c.o lua/sql.lua.i: lua/sql.lua.c.i .PHONY : lua/sql.lua.i # target to preprocess a source file lua/sql.lua.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/sql.lua.c.i .PHONY : lua/sql.lua.c.i lua/sql.lua.s: lua/sql.lua.c.s .PHONY : lua/sql.lua.s # target to generate assembly for a file lua/sql.lua.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/lua/sql.lua.c.s .PHONY : lua/sql.lua.c.s port.o: port.cc.o .PHONY : port.o # target to build an object file port.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/port.cc.o .PHONY : port.cc.o port.i: port.cc.i .PHONY : port.i # target to preprocess a source file port.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/port.cc.i .PHONY : port.cc.i port.s: port.cc.s .PHONY : port.s # target to generate assembly for a file port.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/port.cc.s .PHONY : port.cc.s request.o: request.cc.o .PHONY : request.o # target to build an object file request.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/request.cc.o .PHONY : request.cc.o request.i: request.cc.i .PHONY : request.i # target to preprocess a source file request.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/request.cc.i .PHONY : request.cc.i request.s: request.cc.s .PHONY : request.s # target to generate assembly for a file request.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/request.cc.s .PHONY : request.cc.s space.o: space.cc.o .PHONY : space.o # target to build an object file space.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/space.cc.o .PHONY : space.cc.o space.i: space.cc.i .PHONY : space.i # target to preprocess a source file space.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/space.cc.i .PHONY : space.cc.i space.s: space.cc.s .PHONY : space.s # target to generate assembly for a file space.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/space.cc.s .PHONY : space.cc.s tree_index.o: tree_index.cc.o .PHONY : tree_index.o # target to build an object file tree_index.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tree_index.cc.o .PHONY : tree_index.cc.o tree_index.i: tree_index.cc.i .PHONY : tree_index.i # target to preprocess a source file tree_index.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tree_index.cc.i .PHONY : tree_index.cc.i tree_index.s: tree_index.cc.s .PHONY : tree_index.s # target to generate assembly for a file tree_index.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tree_index.cc.s .PHONY : tree_index.cc.s tuple.o: tuple.cc.o .PHONY : tuple.o # target to build an object file tuple.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple.cc.o .PHONY : tuple.cc.o tuple.i: tuple.cc.i .PHONY : tuple.i # target to preprocess a source file tuple.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple.cc.i .PHONY : tuple.cc.i tuple.s: tuple.cc.s .PHONY : tuple.s # target to generate assembly for a file tuple.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple.cc.s .PHONY : tuple.cc.s tuple_convert.o: tuple_convert.cc.o .PHONY : tuple_convert.o # target to build an object file tuple_convert.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple_convert.cc.o .PHONY : tuple_convert.cc.o tuple_convert.i: tuple_convert.cc.i .PHONY : tuple_convert.i # target to preprocess a source file tuple_convert.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple_convert.cc.i .PHONY : tuple_convert.cc.i tuple_convert.s: tuple_convert.cc.s .PHONY : tuple_convert.s # target to generate assembly for a file tuple_convert.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple_convert.cc.s .PHONY : tuple_convert.cc.s tuple_update.o: tuple_update.cc.o .PHONY : tuple_update.o # target to build an object file tuple_update.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple_update.cc.o .PHONY : tuple_update.cc.o tuple_update.i: tuple_update.cc.i .PHONY : tuple_update.i # target to preprocess a source file tuple_update.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple_update.cc.i .PHONY : tuple_update.cc.i tuple_update.s: tuple_update.cc.s .PHONY : tuple_update.s # target to generate assembly for a file tuple_update.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/tuple_update.cc.s .PHONY : tuple_update.cc.s txn.o: txn.cc.o .PHONY : txn.o # target to build an object file txn.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/txn.cc.o .PHONY : txn.cc.o txn.i: txn.cc.i .PHONY : txn.i # target to preprocess a source file txn.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/txn.cc.i .PHONY : txn.cc.i txn.s: txn.cc.s .PHONY : txn.s # target to generate assembly for a file txn.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/txn.cc.s .PHONY : txn.cc.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... box_generate_lua_sources" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... ltbox" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... tarantool_box" @echo "... __/__/cfg/tarantool_box_cfg.o" @echo "... __/__/cfg/tarantool_box_cfg.i" @echo "... __/__/cfg/tarantool_box_cfg.s" @echo "... __/assoc.o" @echo "... __/assoc.i" @echo "... __/assoc.s" @echo "... __/fiber.o" @echo "... __/fiber.i" @echo "... __/fiber.s" @echo "... __/lua/init.o" @echo "... __/lua/init.i" @echo "... __/lua/init.s" @echo "... __/memcached.o" @echo "... __/memcached.i" @echo "... __/memcached.s" @echo "... __/opts.o" @echo "... __/opts.i" @echo "... __/opts.s" @echo "... __/replication.o" @echo "... __/replication.i" @echo "... __/replication.s" @echo "... __/say.o" @echo "... __/say.i" @echo "... __/say.s" @echo "... __/tarantool.o" @echo "... __/tarantool.i" @echo "... __/tarantool.s" @echo "... bitset_index.o" @echo "... bitset_index.i" @echo "... bitset_index.s" @echo "... box.o" @echo "... box.i" @echo "... box.s" @echo "... box_lua.o" @echo "... box_lua.i" @echo "... box_lua.s" @echo "... box_lua_space.o" @echo "... box_lua_space.i" @echo "... box_lua_space.s" @echo "... hash_index.o" @echo "... hash_index.i" @echo "... hash_index.s" @echo "... index.o" @echo "... index.i" @echo "... index.s" @echo "... key_def.o" @echo "... key_def.i" @echo "... key_def.s" @echo "... lua/box.lua.o" @echo "... lua/box.lua.i" @echo "... lua/box.lua.s" @echo "... lua/box_net.lua.o" @echo "... lua/box_net.lua.i" @echo "... lua/box_net.lua.s" @echo "... lua/misc.lua.o" @echo "... lua/misc.lua.i" @echo "... lua/misc.lua.s" @echo "... lua/sql.lua.o" @echo "... lua/sql.lua.i" @echo "... lua/sql.lua.s" @echo "... port.o" @echo "... port.i" @echo "... port.s" @echo "... request.o" @echo "... request.i" @echo "... request.s" @echo "... space.o" @echo "... space.i" @echo "... space.s" @echo "... tree_index.o" @echo "... tree_index.i" @echo "... tree_index.s" @echo "... tuple.o" @echo "... tuple.i" @echo "... tuple.s" @echo "... tuple_convert.o" @echo "... tuple_convert.i" @echo "... tuple_convert.s" @echo "... tuple_update.o" @echo "... tuple_update.i" @echo "... tuple_update.s" @echo "... txn.o" @echo "... txn.i" @echo "... txn.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/box/hash_index.h0000664000000000000000000000450112231715257017627 0ustar rootroot#ifndef TARANTOOL_BOX_HASH_INDEX_H_INCLUDED #define TARANTOOL_BOX_HASH_INDEX_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "index.h" struct mh_index_t; class HashIndex: public Index { public: HashIndex(struct key_def *key_def, struct space *space); ~HashIndex(); virtual void beginBuild(); virtual void buildNext(struct tuple *tuple); virtual void endBuild(); virtual void build(Index *pk); virtual size_t size() const; virtual struct tuple *min() const; virtual struct tuple *max() const; virtual struct tuple *random(uint32_t rnd) const; virtual struct tuple *findByKey(const char *key, uint32_t part_count) const; virtual struct tuple *replace(struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode); virtual struct iterator *allocIterator() const; virtual void initIterator(struct iterator *iterator, enum iterator_type type, const char *key, uint32_t part_count) const; virtual void reserve(uint32_t n_tuples); protected: struct mh_index_t *hash; }; #endif /* TARANTOOL_BOX_HASH_INDEX_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/index.h0000664000000000000000000001512612231715257016631 0ustar rootroot#ifndef TARANTOOL_BOX_INDEX_H_INCLUDED #define TARANTOOL_BOX_INDEX_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "tarantool/util.h" #include "object.h" #include "key_def.h" struct tuple; struct space; /** * @abstract Iterator type * Controls how to iterate over tuples in an index. * Different index types support different iterator types. * For example, one can start iteration from a particular value * (request key) and then retrieve all tuples where keys are * greater or equal (= GE) to this key. * * If iterator type is not supported by the selected index type, * iterator constructor must fail with ER_UNSUPPORTED. To be * selectable for primary key, an index must support at least * ITER_EQ and ITER_GE types. * * NULL value of request key corresponds to the first or last * key in the index, depending on iteration direction. * (first key for GE and GT types, and last key for LE and LT). * Therefore, to iterate over all tuples in an index, one can * use ITER_GE or ITER_LE iteration types with start key equal * to NULL. * For ITER_EQ, the key must not be NULL. */ #define ITERATOR_TYPE(_) \ _(ITER_ALL, 0) /* all tuples */ \ _(ITER_EQ, 1) /* key == x ASC order */ \ _(ITER_REQ, 2) /* key == x DESC order */ \ _(ITER_LT, 3) /* key < x */ \ _(ITER_LE, 4) /* key <= x */ \ _(ITER_GE, 5) /* key >= x */ \ _(ITER_GT, 6) /* key > x */ \ _(ITER_BITS_ALL_SET, 7) /* all bits from x are set in key */ \ _(ITER_BITS_ANY_SET, 8) /* at least one x's bit is set */ \ _(ITER_BITS_ALL_NOT_SET, 9) /* all bits are not set */ \ ENUM(iterator_type, ITERATOR_TYPE); extern const char *iterator_type_strs[]; static inline bool iterator_type_is_reverse(enum iterator_type type) { return type == ITER_REQ || type == ITER_LT || type == ITER_LE; } struct iterator { struct tuple *(*next)(struct iterator *); void (*free)(struct iterator *); }; /** * Check that the key has correct part count and correct part size * for use in an index iterator. * * @param key_def key definition * @param type iterator type (see enum iterator_type) * @param key BER-encoded key * @param part_count number of parts in \a key */ void key_validate(struct key_def *key_def, enum iterator_type type, const char *key, uint32_t part_count); /** * Check that the supplied key is valid for a search in a unique * index (i.e. the key must be fully specified). */ void primary_key_validate(struct key_def *key_def, const char *key, uint32_t part_count); /** * The manner in which replace in a unique index must treat * duplicates (tuples with the same value of indexed key), * possibly present in the index. */ enum dup_replace_mode { /** * If a duplicate is found, delete it and insert * a new tuple instead. Otherwise, insert a new tuple. */ DUP_REPLACE_OR_INSERT, /** * If a duplicate is found, produce an error. * I.e. require that no old key exists with the same * value. */ DUP_INSERT, /** * Unless a duplicate exists, throw an error. */ DUP_REPLACE }; class Index: public Object { public: /* Index owner space */ struct space *space; /* Description of a possibly multipart key. */ struct key_def *key_def; /** * Allocate index instance. * * @param type index type * @param key_def key part description * @param space space the index belongs to */ static Index *factory(enum index_type type, struct key_def *key_def, struct space *space); /** * Initialize index instance. * * @param key_def key part description * @param space space the index belongs to */ protected: Index(struct key_def *key_def, struct space *space); public: virtual ~Index(); /** * Two-phase index creation: begin building, add tuples, finish. */ virtual void beginBuild() = 0; virtual void buildNext(struct tuple *tuple) = 0; virtual void endBuild() = 0; /** Build this index based on the contents of another index. */ virtual void build(Index *pk) = 0; virtual size_t size() const = 0; virtual struct tuple *min() const = 0; virtual struct tuple *max() const = 0; virtual struct tuple *random(uint32_t rnd) const = 0; virtual struct tuple *findByKey(const char *key, uint32_t part_count) const = 0; virtual struct tuple *findByTuple(struct tuple *tuple) const; virtual struct tuple *replace(struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode) = 0; /** * Create a structure to represent an iterator. Must be * initialized separately. */ virtual struct iterator *allocIterator() const = 0; virtual void initIterator(struct iterator *iterator, enum iterator_type type, const char *key, uint32_t part_count) const = 0; inline struct iterator *position() { if (m_position == NULL) m_position = allocIterator(); return m_position; } protected: static uint32_t replace_check_dup(struct tuple *old_tuple, struct tuple *dup_tuple, enum dup_replace_mode mode); private: /* * Pre-allocated iterator to speed up the main case of * box_process(). Should not be used elsewhere. */ struct iterator *m_position; }; #endif /* TARANTOOL_BOX_INDEX_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/box_lua.h0000664000000000000000000000340312231715257017146 0ustar rootroot#ifndef INCLUDES_TARANTOOL_MOD_BOX_LUA_H #define INCLUDES_TARANTOOL_MOD_BOX_LUA_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "request.h" struct lua_State; /** * Invoke a Lua stored procedure from the binary protocol * (implementation of 'CALL' command code). */ void box_lua_execute(struct request *request, struct port *port); /** * Create an instance of Lua interpreter in box. */ void box_lua_init(); struct tuple *lua_istuple(struct lua_State *L, int narg); #endif /* INCLUDES_TARANTOOL_MOD_BOX_LUA_H */ tarantool-1.5.1.218.g1a69fd6/src/box/tarantool_box0000775000000000000000001132346512213333072020153 0ustar rootrootELF>y> @@s@sPD P@P@sP@s@@TT@T@DD@@s@s1PtdppQpQ^^Qtd/lib64/ld-linux-x86-64.so.2GNU GNU$3ya  :@T"@dDmT Dؠ2 B"P( % @D)镠18\1@D. ـMH 4*)2T  HDH@I0Q  `dVBX" ,*NY@+ t ` 4@M̒Gkq!h "Z%@ AQ$0#*"`20HhALAA (DH$@h `@&0@ "  @)@D h!CшHP 4C""`$ &(`@@%CRh )D C(D,H@ !D@ u" !0PP0% d PD0#!-EhΈA   rvU!B 2ҥ 0"(Ę@a@@ `GT0 $Bpq EH@Ht b X  l (J $ B@@ %- D0DH@`  0!@ 8 "0"A  $@ B@$D á%U v0E@ `pB #@ 9B@@!14 4zPB& P"D.B, 8D  (4 H  A &C( 4U@+D D8"D@q R@@$D$    hD*00 @X !"#%(+-.12467;<?@ACDGJLNOPQSTUVY\^_abdfhijkmnopstvwz|}~     !"#$%&(),-.0134789;<=?ABCDEGHIKMNOQRTUWXZ[\]^`bfiklmnopqrtuvxz|~ #%')*,-./1245678;<=?ABCDEFGHIJKMNOPRSUVWYZ[]`cdefhijlmnoqrtvwxyz|}~   "#$%&')*+,./023578:<=ABCEFGHIJLNOQRSTUXZ[]^_`abcdghjlmprsuvwyz{|}~    !"#$&()*+,-.n?Œn*ˬv!v F#lxؼP/85q؉Ź@c\YM5Bk|Ҽ4v۽՟K-* HW׵U8gҩyO59HV+Տž*=xCW{QŶhAAwQwEjVnnZV8sF 8-2@ 舞8X9~m ]{}1)mn_BCNU`LҀx-wS}rs'miPN ?N b: -[EuzfurMfn`Q?Pp"U2?y tf~`o]L6jZ `0 ? ktuㆻUŶ-esx~qG@!(?A(~G(k8K1ZhRfm3*$Ei?r!N& ~eqy>k׆NUCEiI[|; P7ڛh ew2\'љ͊?JY-X Y\1݋M뺽PCC^!!@l.ҐHCCc},KZw/v0  ] .9Q/ kYŶM?l,o{ ^[l*W"B3NhyIkuupWFڥ,@AO~?q ] K{^_pBJ~!'9ĢNUrŮOV|Ǥq : ,FT Pp%،P2JQ[B mK+J(N-aOnm7i*IOB ylZG#+ _ˬ\L|p+*6I1_q Ll}I_fx~ex?0,fa 9\c"˚եQ Eށ蓛uݷ %Po^£2dA1=B`[)r V3?CJ |l75O 8 V1fUa~n)ĥ*NcDLɀ|mUtI |c/ vR5D@/m;v@bi7J8pFF_ W$>K;XӂÁ ZriW f5GGir9'݌ Y6ɈW8.tI12MrsLYR9\埥 {VuZˋs`cV}; Lf˼u_im8ḿez9'/ZbA*׍MW߳qϢ)$J%B^7 vrjX&:#.IcҔn8'P0Z1.H E'X381rYFe+M 9qXFGs V-e ٟFpTsA{T=RYoUfxbWE~;XRBA@Lf+5dm<703eͬ @6`b˗4Ff:{vhqϒ=ℹG?OmU s2|YC߅EF~!YAJfQ#dv4Z 运xDl\]]c-gN,qb(s2uz4oqZ 4lٌ_Y%vDopF|䥙482([&@KVa*Kg#nN &Jar+:vy._c*c(LyQ{d ;ds |Yܴ[Ą2 l H3N]󬺕 x s Mb[SL~\%3N3hK҅cmh}=62b&||p¢p\>XM?ǚs:a o(C__+L8eLJӥQlibKD-< $#>‰rԻ=2%$/vd"-g㴍{}SeK @@e sվWhCߑyҼT].Nяҍ'.pj+Yf_"  6@?]] ||Ql˿ jbL{ їٍH\#{ĆՋ) S:qvIAUeMʼnjׂJuGs5 qQLӎ3X1 :r@|5\\rJ,v8|z,]< 9/S3IspzrYy4ikNfƒi9 4b;Ɂ .Z٦ݣk/u_y(Z6{z{R m,u G( uċE%y'j"ې/ Y qTvھGcV_$Ό]YLܬ 4{|PQ}He/ıfj\E1N=ϔ׵ZEXߟÇ]Xu=iqqB>:CUd?f:B:b5 ^ѱV"82N<ɉGs)SfYvwP~O md[Nk7<⋂`Uw_wc׃mDmgNeJ,WCP* l?`PTuP&?cz"\sa|_ͧVteekaZ9/,?! )&1eP/tϦzJYݺS\,:eoou 2/K"2% $wz2W_fUtV;T{4C/oxåH|ۏ,JHt:EmG 옃 tHM6*@6|V捨>ф^@r%6soձU77K|Թz`*(5;`T!é'j #moOY:f9T7=nP]Ar9X3l3}(o9YӒ+ ^R6'2-9L:hբü[{%Ռq|1o\h57[iϣűzd8ikoO; 13GWSK2|o()<3 |Gjw=DY2 /$Clvs.h8) Xy 3 voM96?Gc ) - d b I'7  K1NEbJ  kE6> iv Q \   6 j b ! A 8 \ d[, ~ 2;y  s t  J|Fk \P(cA  " <UYI_ J JB)45 X  l  CkZ h  E:F .* #>? -N O !m 2 .3jC0XX# Ck m1 IL yq VT"T[ZF O='80 Q DD 7lI p1A5 1G/- NE4 #G N, B0, AF F:R EGC  JEs $N5V G8 W Ah:AC m6Nj D6 `CR YEQ |N4 LE 9 wsG[L rXN,(]NU H"_7 NDH fEL- @Eo" XA=9 NA ݰE4,AXWs, Ks6 FF X |BF ĩAb& EH-&K L) xA& iGGV ?AIo  G:Q ЬHW 1HC eD]BOaC FU/Xs6 sGb 9LHf?s+ BE *jIO+ C7 JA] AF5T8 DIX CJ  AH FDS  E0B ܪA*F RAR rA" FW[ 0H LAcX* AO B= H)# D< QVG'4G YNJ87 bB8sN XN!0 D^ kLH?"$Xs7" AEM FIE2 e G  Ht lE]!NP!aO(xs[= EAcB GY WE_ EU" ZA&! B^+ fHI4N 3HdM ODr H( 2EW' 9E3L2 DH JGdsN GA6 UH6 s7`wtiG $Df  aRND* Eg6 wHH E ZA.  XN!z- M9 hlI," g$Dh: AR FO" Aw& HF01" >YAXhs' WD&S A% B1 G H9P_ H B ?G[ Ea!bN a: HI  A G dG" khE# FZ SGGW dAXM! bN(" CB F'uV C8O lEQ G)T "D(=" )B /GC S" YA=- MK C*\" >YA' G-1 !G\@ GD &AQ2 E6!aOz E:6 fG8 s^ 1F  0HEJN 4C,@W *xEZMs E8" XA&: lG] +J'(sn? *AwN AM# NE"l5 Fh: @Xs   sXQ HkR" Bv< A0 *GdF (ER " 7DhA Hg! mE6 s< G:A SG A C>NX PGQ H= MF!EO(JS OD$sP; Bx( {GR =N? WlIJ G Jh, 6Fau +BLO _Gy^" YA=Z cM}& EK = TMA, xVG70 $FTE G>  sF! NAP6" Fw9Ls(! 7N , E]E" vXA=jS A>X H^ JW \E* C]X =EP GGeD Fg}Z SG~%Hs; JCN`4[ OEP En G4 ^WA[,V dGX HU0wtF CHt  CF0M wH >F p@B)1 REIQ +[Eq! C9 @AT LEb ` vFC@@s/ Dq,> PE{*, Fr  cG5>  ڃG& EHg54 !GxU HX H G-J" WA&- s9/ HWG ODd: G8|H GK RE.M -DyYR!xNW HzD ܪAR[(Msf$ ÁG" XAE _GL wE%6 Ap 'TN{  YFo A) D4 FG$ ?ZA8,  XEpL Ee< 7H@, H !aOYQ" WA1# ΘG @ EREI E Y HC" B\50s !s> ,A..L @B J!0cN *C@! O(5 9E36 DVY AH%[!`pN_V F93 :H`$1ApT <#GO TH[ ȧFQI" YA& EuM MHc ,A0 'lI4% 0F1  'FgoK H^/ H9Nl_ 2Ch\ F60_ {E pE  ?E!R FEu6 }DE1W 1GG Y! sX 8F\ :Ey !sY $N 8 6G 'E" .BlS G'3 F!6 G;A^ Gk] Ec E\S CXNF[ ~GG C G Fv$ _&EM C- aE uH'2 FG= G!aEpQZ A&F, cDx." Aw7 G=D GhtQ" XA= GCv; $QE!J DTt4 7N= 3D$ QGO GSK G$E m8Nl9L" AW!xcN5 JA( J& D% H R"M" LdnC X%D;J wtU< \N[! tN*/!bNTC `jEr " Fw  SCP RuFBhQ Ms\" E&I XN]Z xJ+P G *  I(8+ DT GE  AH& .N< H A6$! OF^ CH=sY ED H4 0QAvb DA&4 jE^ZA :G EV DqZ tEa ND? HQ FrC aFa[ G\ H+_ e'B-R jE,h_ S[N Bot< AMW MD" XA=w$ HCF C7 H(! B4 H )9 D) [E J-" A9 N< L7N 1AA -N' G&.$ {EW;" xE=Qs8 sm/ 0HB EN F] TDP^# [XN ޗGA AMM YLH jI >AR k B6`  G iG  PAZ LHsV  \QGPY% =HY NNJVN2 9N{2 G9 dG B@ NEXT" *B& CH~7 hAr: AMC 4FQ E( E?W AC:`Xs ' ҤFI!`O(  {E=# HXs(| *BAX AM XN. F 3:AeW ~F H ? CEe% ]FbG XNC XN> xAp- oE{"L w!Hu !kNK $mEk= 4NoH cG% jH;N HT DO %NE s(%:" .Blp" >YA+ EdY dG1Y 0$N:*" xE= . E" VGVM PA# DH EL AT$`to Au/ $A vGD pE>p8tH H0 ٭FE/YALXsp2!ЃN HG%  G% BrG5a FE/ H.H ;HoAZ |G8L /BK H& \ FC3K >qEX HkVH EG$ $G/S XFn) pnGE VN{U E&jH(Xs }M- GWwE ԉE Q8 G+D H H"; E/88 >+CN#M rGY _C w A2Go[ ƭA.( GA(!cNS " Bv F H] TAT H= }4" XA)N H AZ 2BaH 3A@ +A-) EMn% j$NOX H>] FA  C 0]NFG NJ qBx\U SN" ܖE=Y lEN9 FGF XG EjU DX 1NC< GB "G:QK %Nu " Bvy8 UA[1; E LAh88tv D wt!h8t2 DVG $? bH ;Hr\ gdG  HD!aO(Q LA s tA4,KsI :B* -H: PH2? G^_ oH]" )B( PFpn( A$ tlGJn0 GG$K Fz!aN(_ D RAR3 >;N?3 pC2^ EH%>U A0@atuA $Ab3 3I' J Du 4 E8. tkG4 LE: C  HeO!aOV G" BM G" -A:P" ^E7  E$ "DP1 GG zCfKF "=B  @:A* C@5 vFClibpthread.so.0_ITM_deregisterTMCloneTable_Jv_RegisterClasses_ITM_registerTMCloneTablepthread_cond_initpthread_mutex_destroypthread_attr_setscoperecvfromsystempthread_sigmaskpthread_mutex_initpthread_cond_waitpthread_cond_destroypthread_mutexattr_settyperecv__errno_locationpthread_oncepthread_mutex_lockpthread_mutexattr_initpread64pthread_cond_signalpthread_cond_timedwaitacceptlseek64fcntlpthread_createpwrite64pthread_joinsigactionpthread_attr_initpthread_mutexattr_destroypthread_attr_destroysendtopthread_mutex_unlocknanosleeppthread_attr_setdetachstatesigwaitsendmsgrecvmsgwaitpidlibdl.so.2__gmon_start__dlclosedlsymdlopendlerrorlibbfd-2.22-system.sobfd_check_formatbfd_check_format_matchesbfd_closebfd_openrbfd_initlibstdc++.so.6__cxa_free_exception__cxa_pure_virtual__cxa_throw__cxa_rethrow_ZTVN10__cxxabiv117__class_type_infoE__cxa_begin_catch__gxx_personality_v0_Znwm__cxa_demangle__cxa_allocate_exception__cxa_end_catch_ZTVN10__cxxabiv120__si_class_type_infoE_ZdlPvlibm.so.6floorcoshldexpsinhtanhceillibgcc_s.so.1_Unwind_Resume_Unwind_SetIP_Unwind_DeleteException_Unwind_GetCFA__popcountdi2_Unwind_RaiseException__gcc_personality_v0_Unwind_SetGRlibc.so.6epoll_createsetuidsocket__xpg_basenamefflushstrcpyinotify_init1gmtime_r__register_atforkhtonlhtons_IO_putcsetlocalestrncmpinet_atonstrrchrpipereadlinkat__isnanftruncate64mmap64unlinkatclosedirinet_ntoa__isinfepoll_waitstrncpysigprocmasksigfillsetinotify_rm_watchputcharlistenselectclockabortstdinstrtoll_exitsocketpairmemchrstrpbrkpopengetpidkillstrdupinet_ptonstrftime__assert_faillocaltime_rstrtolfeoffgetcfgetsgetpwnamgetppidcallocrenameatfutimensstrlenungetcprctlsignalfdsigemptysetgetaddrinfomemsetstrstrstrcspnutimensatbindchdirmemcmpgetnameinfoeventfdgetsockoptfchmodatclearerrshutdownvsnprintfsigaddsetstdoutfputcfseeko64__isoc99_fscanffputsmemcpyfclosesymlinkatmprotectstrtoulsetsockoptmallocstrcatstrcasecmpftello64fdopendirsetpgidgetpeernamegetgidasprintfgetenvsscanfstderrsigdelsetfchownatalarminotify_initsetrlimit64munmapseteuidmkdiratgetuidmremapexecvegetegidstrncasecmpstrtoullfilenopclosefstatvfs64usleep__cmsg_nxthdrgetcwdfwritefreadgettimeofdayepoll_ctlmkstemp64geteuidsigismemberatoidifftimestrchrgetsocknameepoll_create1mktimefdopenreaddir64qsortinotify_add_watchstatfs64tmpfile64syscallsigpendingfreeaddrinfosetvbufsetsidgetrlimit64memmoveunamesigtimedwaitfopen64access_IO_getcmemmemsetgidopenat64strerror__libc_start_mainferrorstpcpyvfprintfntohlntohssysconf__environ__cxa_atexit__fxstat64__lxstat64__fxstatat64__xmknodatld-linux-x86-64.so.2__libc_stack_endcrc32_edata__bss_starteio_set_min_parallelbitset_pages_iter_startindex_type_strsev_backend_ZN11LoggedErrorC1IJjEEEPKcjjDpT_stats_Z10session_fdj_ZN11BitsetIndex8endBuildEvfio_write_ZTS11SocketError_Z19tarantool_lua_closeP9lua_Statelua_getmetatablefio_readbitset_index_contains_valueluaL_typerrorluaL_prepbuffersnap_dir_Z11salloc_initmmdev_verifyeio_set_max_parallel_ZTV5Index_Z15format_filenameP7log_dirl10log_suffixlogger_pidrecovery_update_mode_ZN9HashIndex8endBuildEvfio_writevmemcached_stat_strs_ZN11LoggedErrorC2IIjEEEPKcjjDpT__ZN20FiberCancelExceptionC2EPKcj_ZN5Index17replace_check_dupEP5tupleS1_16dup_replace_modeupdate_op_codes_strsstrbuf_append_stringluaopen_tablebitset_page_set_zerossql_luaITERATOR_CONJ_DEFAULT_CAPACITYlua_getfieldstrbuf_append_fmtbitset_index_expr_all_not_set_Z20obuf_rollback_to_svpP4obufP8obuf_svpbitset_page_set_ones_Z26bitset_index_iterator_nextP8iteratorswap_tarantool_cfg_Z11lua_istupleP9lua_Statei_Z12fiber_cancelP5fibergopt_freesession_on_disconnecttarantool_cfg_iterator_init_Z17mh_i64ptr_reserveP11mh_i64ptr_tjPv_Z12session_freevprscfg_yyget_lvaltarantool_uptimeev_feed_signal_eventlua_isstringlua_setmetatablelua_pushstring_ZN11BitsetIndexD2Eveio_npending_ZN11LoggedErrorC2IIEEEPKcjjDpT__Z9sio_writeiPKvmuuid_luaeio_grp_cancelev_set_userdatarope_iter_nextbit_iterator_next_ZN9ExceptionC1EPKcjbitset_index_init_iterator_ZNK9TreeIndex3maxEvgopt_sort_ZNK11BitsetIndex3maxEv_ZNK11BitsetIndex3minEv__libc_csu_finilua_gethookmask_Z9tuple_refP5tuplei_Z21inprogress_log_renameP6log_io_ZNK11ClientError7errcodeEv_ZN11LoggedErrorD0Ev_ZNK11BitsetIndex11findByTupleEP5tupleparse_cfg_buffer_tarantool_cfg_Z12stat_cleanupimev_set_timeout_collect_intervalbitset_pages_lastparseCfgDefBuffer_ZN11BitsetIndexD0Ev_ZNK9TreeIndex12initIteratorEP8iterator13iterator_typePKcjpalloc_stat_Z19evio_setsockopt_tcpi_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT__ZTV9Exception_ZN9ExceptionD2Ev_ZN11LoggedErrorC1IIlPKcS2_EEES2_jjDpT_luaopen_iolua_insert_ZN11ClientErrorC1EPKcjS1_jbox_leave_local_standby_modeeio_mlockallbitset_pages_prevfill_default_tarantool_cfg_Z14wait_for_childieio_readdir_ZN11ClientErrorD2Evlua_atpanicport_lua_vtabbitset_page_createfio_truncate_Z14fiber_yield_toP5fiberrope_pretty_print_Z10space_initv_ZN9TreeIndexC1EP7key_defP5spaceprscfg_yypush_buffer_statelua_pushfstring_Z23tarantool_lua_stat_initP9lua_Stateeio_renamerecovery_wait_lsnluaL_addvalueprscfg_yy_scan_buffer_Z13stat_registerPPKcmlua_setupvaluewal_mode_STRS_Z18sio_listen_backlogvpalloc_free_Z13space_foreachPFvP5spacePvES1__Z12ibuf_reserveP4ibufm_Z17field_type_createP10field_typejP7key_defj_ZN9HashIndex9buildNextEP5tupleEXPR_CONJ_DEFAULT_CAPACITYeio_nthreads_ZN11SocketErrorD2Eveio_fsyncptruncateev_set_allocator_Z17show_plugins_statP4tbuf_Z14request_createjPKcjtbuf_new_Z21mh_index_start_resizeP10mh_index_tjjPK7key_def_Z15ipc_channel_getP11ipc_channel_ZN9TreeIndex5buildEP5Indexlua_resumebitset_iterator_initbit_clz_u32_Z19find_including_fileP7log_dirlprscfg_yyget_textpalloc_allocated_Z17errinj_set_bynamePcbfio_batch_add_Z22tuple_compare_with_keyPK5tuplePKcjPK7key_defluaopen_jit_ZN11LoggedErrorD2Evbox_infobitset_pages_first_ZTV14ErrorInjectionev_cleanup_stopev_async_stop_Z21coio_connect_addrinfoP5ev_ioP8addrinfodev_clear_pending_Z20mh_i64ptr_del_resizeP11mh_i64ptr_tjPveio_link_ZN9HashIndexD0Evcfg_out_Z25end_build_primary_indexesv_ZTV13IllegalParamsev_async_startsnapshot_save_ZNK9TreeIndex13allocIteratorEv_Z18coio_write_timeoutP5ev_ioPKvmd_Z10fiber_infoP4tbufev_timer_remainingev_prepare_stop_Z20log_io_open_for_readP7log_dirl10log_suffix_Z14memcached_initPKci_ZTS20FiberCancelException_Z18fiber_is_cancelledvbitset_pages_new_Z11obuf_createP4obufP11palloc_pool_Z26bitset_index_iterator_freeP8iteratoreio_mkdir_Z9coio_initP5ev_ioev_invoke_Z16hash_iterator_geP8iteratoreio_mtouch_Z19fiber_yield_timeoutdmisc_lua_Z10space_by_nj_Z13tuple_to_obufP5tupleP4obufeio_symlink_ZN9TreeIndex9buildNextEP5tuple_Z11evio_socketP5ev_ioiii_ZNK9Exception6errmsgEvbitset_expr_createbitset_pages_reverse_iter_startlua_cpcall_ZTS14ErrorInjectionlua_getallocfout_warningsay_logger_initsnapshot_write_row_ZTV11ClientError_ZN13IllegalParamsD0Eveio_grp_addluaopen_stringbox_reload_configev_default_loopprscfg_yypop_buffer_state_ZN20FiberCancelExceptionD1Ev_ZTI13IllegalParams_ZTS9Exceptionbitset_pages_reverse_iter_recurselua_tocfunctioneio_close_ZNK9HashIndex13allocIteratorEv_Z9space_newjP7key_defjjprscfg_yyget_linenobitset_testlua_pushthreadbit_clz_u64symbols_loadprscfg_yyset_debug_Z15mh_i32ptr_clearP11mh_i32ptr_t_Z15tuple_to_luabufP5tupleP11luaL_Buffer_ZTI6Objectbitset_index_remove_value_ZNK9TreeIndex6randomEj_ZNK11ClientError3logEv_Z24coio_readn_ahead_timeoutP5ev_ioPvmmdprscfg_yyrestartluaL_checkstackprscfg_yylex_init_extrabswap_u64lua_getstackrope_check_Z15session_destroyj_Z10fiber_initvlua_concatcustom_proc_title_Z13mh_i64ptr_newverrinjs_Z20coio_connect_timeoutP5ev_ioP11sockaddr_injd_Z15tbuf_read_fieldP4tbuf_Z16mh_i64ptr_deleteP11mh_i64ptr_ttbuf_peekeio_set_max_idlebitset_index_expr_any_settuple_format_ber_Z11txn_replaceP3txnP5spaceP5tupleS4_16dup_replace_modeprscfg_yyget_extralua_tonumberbit_ctz_u32_Z23tarantool_lua_info_initP9lua_Staterope_cleareio_wd_close_syncsid_maxeio_dup2luaL_newstate_ZN9TreeIndex7replaceEP5tupleS1_16dup_replace_mode_Z26tarantool_lua_session_initP9lua_Statebit_rotl_u64strbuf_append_fmt_retry_ZNK11BitsetIndex9findByKeyEPKcj_ZN11LoggedErrorC1IJPKcEEES2_jjDpT__Z27begin_build_primary_indexesvfio_lseek_Z12sio_strfaddrP11sockaddr_inbitset_iterator_createev_stat_stop_Z22tarantool_lua_load_cfgP9lua_StateP13tarantool_cfgbitset_page_destroy_Z11tuple_printP4tbufPK5tuple_Z8sio_readiPvmiobuf_cacheev_set_io_collect_interval_Z17mh_i32ptr_reserveP11mh_i32ptr_tjPv_ZN11BitsetIndex10beginBuildEv_Z14key_def_createP7key_defP25tarantool_cfg_space_indexev_time_Z18mh_lstrptr_reserveP12mh_lstrptr_tjPvluaopen_mathbootingev_invoke_pendingrecovery_stop_remote_Z12mod_lua_initP9lua_Stateprscfg_yyget_leng_Z14mh_lstrptr_newvlua_createtableprscfg_yyset_outbit_count_u64luaopen_ffiluaL_openlibseio_set_idle_timeoutprscfg_yyget_out_Z20ipc_channel_is_emptyP11ipc_channelrope_erase_Z13mh_i32ptr_newvrope_iter_start_Z12key_validateP7key_def13iterator_typePKcj_Z14compare_symbolPKvS0_eio_sendfilestat_max_name_lenev_prepare_startlua_pushnumber_Z12sio_recvfromiPvmiP11sockaddr_inPj_Z14fiber_scheduleP10ev_watcheriiterator_type_strsfreeCfgDefev_stat_startbit_rotr_u64main_argc_Z15remote_read_rowP5ev_ioP5iobufPjfio_batch_start_ZN9ExceptionC2EPKcjlua_getinfonext_lsnbitset_iterator_nextlua_isnumber_Z14sio_socketnamei_Z12check_spacesP13tarantool_cfg_ZN11SocketErrorD1Evev_signal_stop_Z10tuple_initvluaL_checkudatabitset_page_nand_Z21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injdluaopen_cjson_safelua_pushintegereio_syncfs_Z18log_io_cursor_openP13log_io_cursorP6log_ioINDEX_DEFAULT_CAPACITYbitset_index_expr_all_setlua_settable_Z23tarantool_lua_slab_initP9lua_State_Z14session_createibox_lua_load_cfglua_getupvaluebox_initluaL_loadfilex_Z25tarantool_lua_socket_initP9lua_State_Z18ipc_channel_deleteP11ipc_channel_Z11fiber_sleepdev_idle_stopeio_sendfile_synceio_init_Z8stat_ageP8ev_timericfg_filename_fullpathlua_xmove_Z11salloc_freev_IO_stdin_usedpools_ZTI11ClientErrorluaL_getmetafieldred_zone_ZNK9HashIndex3maxEvset_lsnlua_rawgetilua_newstate_Z19log_io_cursor_closeP13log_io_cursor_Z23ipc_channel_put_timeoutP11ipc_channelPvdeio_set_max_poll_reqstbuf_vprintfprscfg_yyset_lineno_Z18log_io_cursor_nextP13log_io_cursorPj_ZN9ExceptionC2ERKS_ev_periodic_stop_ZN5IndexD2Ev_Z21memcached_expire_loopP13__va_list_tagluaL_addlstring_Z19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injdtuple_formatsluaL_checklstring_ZN11SystemErrorD2Ev_Z13tuple_comparePK5tupleS1_PK7key_def_Z15mh_index_resizeP10mh_index_tPK7key_defpalloca_Z17fiber_destroy_allv_ZN11LoggedErrorC2IJlPKcS2_EEES2_jjDpT_lua_touserdata_Z17luaL_pushnumber64P9lua_Statem_Z18tarantool_lua_initv_Z12row_v11_fillP7row_v11ltmPKcmS2_m_Z10fiber_callP5fiberz_Z12init_storageP6log_ioP9fio_batchlua_dump_ZN9HashIndexD2Evlua_pushlightuserdata_Z14lbox_pushspaceP9lua_StateP5space_ZN11LoggedErrorC1IJlPKcS2_EEES2_jjDpT_luaL_newmetatableev_feed_fd_event_Z16dup_replace_modej_ZN11ClientErrorC2EPKcjS1_j_Z15mh_i64ptr_clearP11mh_i64ptr_t_ZNK11SystemError3logEv_Z15header_v11_signP10header_v11ev_pending_count_ZN11LoggedErrorC2IIPKcS2_EEES2_jjDpT_lua_setallocf_Z12mh_index_newv__data_startfdprintfrequests_strs_Z15ipc_channel_newj_ZN5IndexD1Eveio_lstat_ZN6ObjectC2Evbitset_iterator_destroylua_callqsort_arg_Z8obuf_dupP4obufPKvm_Z17mh_lstrptr_resizeP12mh_lstrptr_tPvlua_pcall_Z5sfreePvfree_proc_titleeio_wd_open_syncbitset_index_insert_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2__Z18update_create_ropeP12tuple_updatePKcS2_j_ZN11LoggedErrorC2IJPcEEEPKcjjDpT__ZNK11BitsetIndex12initIteratorEP8iterator13iterator_typePKcjev_timer_again_ZN11ClientErrorC1EPKcjjzeio_wd_closeprscfg_yy_switch_to_buffer_ZTI9Exceptionstrbuf_freefpconv_g_fmtlua_getfenvbitset_page_orluaL_callmeta_ZN6ObjectD1Ev_ZN11BitsetIndexC1EP7key_defP5spaceboxlib_name_Z16fiber_checkstackvluaL_execresult_Z16tbuf_store_fieldP4tbufPKcj_ZN11LoggedErrorC1IIjEEEPKcjjDpT__Z22memcached_check_configP13tarantool_cfgeio_fstat_ZN14ErrorInjectionD1Evev_set_loop_release_cbev_once_Z15wal_writer_stopP14recovery_state_Z10errinj_getiluaL_loadfile_ZN11SocketErrorC1EPKcjiS1_zev_signal_start_Z22mh_i32ptr_start_resizeP11mh_i32ptr_tjjPv_Z14row_reader_v11P8_IO_FILEPj_Z12coio_connectP5ev_ioP11sockaddr_in_ZN5IndexC2EP7key_defP5spaceluaopen_packageeio_write_ZN11LoggedErrorC1IImPKcS2_EEES2_jjDpT_gopt_arg_igopt_argev_fork_start_Z14fiber_set_nameP5fiberPKcpalloc_initeio_fdatasync_ZN11SystemErrorC2EPKcjeio_realpath_Z16mh_i32ptr_resizeP11mh_i32ptr_tPvlua_tothreadlua_objlen_Z10sio_listeni_ZTI14ErrorInjection_Z13tarantool_luaP9lua_StateP4tbufPKcev_loop_forkbit_index_u64_Z22tarantool_coro_destroyP14tarantool_coroeio_wd_openrope_extract_nodelua_checkstack_ZN11ClientErrorC2EPKcjjzluaL_findtableev_cleanup_startbitset_pages_next_Z22tarantool_lua_tostringP9lua_Statei_ZNK11BitsetIndex6randomEjluaL_optlstringprscfg_yyrealloc_ZN11BitsetIndexD1Ev_Z12log_io_closePP6log_ioluaL_optnumberev_sleep_ZN11LoggedErrorC2IIlPKcS2_EEES2_jjDpT_base64_decodebitset_page_first_posev_embeddable_backendsev_check_startprscfg_yyget_inprelease_Z10tuple_freev_ZTS11ClientError_Z9tuple_newP12tuple_formatjPPKcS2__Z19box_unpack_responseP9lua_StatePKcS2__Z20fiber_schedule_childP8ev_childibinary_filenamerecovery_initprscfg_yy_create_buffer_Z10evio_closeP5ev_iolua_lessthanev_feed_signal_ZN11BitsetIndex7replaceEP5tupleS1_16dup_replace_mode_ZN13IllegalParamsC1EPKcjS1_ev_child_stop_ZN9TreeIndex10beginBuildEvstrbuf_set_incrementev_version_minorluaJIT_version_2_0_2tbuf_reseteio_ftruncatetarantool_freelua_errorsayfdev_io_start_Z11fiber_yieldvev_version_major_ZTS11SystemError_ZN11LoggedErrorC2IIPKcEEES2_jjDpT__Z11tuple_allocP12tuple_formatm_Z20space_validate_tupleP5spaceP5tuplePMurHash32_Processconfirm_lsn_ZN9HashIndex7replaceEP5tupleS1_16dup_replace_modeeio_fallocate_ZN5Index8positionEvev_rt_now_ZN11LoggedErrorC1IJPcEEEPKcjjDpT_base64_encodeeio_grp_limitcoeio_managerrecover_snaptarantool_cfg_iterator_next_Z17mh_lstrptr_deleteP12mh_lstrptr_t_Z17tuple_compare_dupPK5tupleS1_PK7key_defcfg_filenameMAX_SLAB_ITEM_COUNT_ZN11ClientErrorD0Eveio_nop_ZN11LoggedErrorC2IJmPKcS2_EEES2_jjDpT_ev_child_startfield_type_strs_Z16mh_lstrptr_clearP12mh_lstrptr_tluaL_unrefluaL_fileresult_Z9fiber_newPKcPFvP13__va_list_tagEPMurHash32_Resultev_suspendluaL_loadstring_ZN11BitsetIndex9buildNextEP5tuple_ZN11SystemErrorC1EPKcjPMurHash32_testeio_statvfs_ZNK9HashIndex3minEv_ZN11LoggedErrorC2IJEEEPKcjjDpT_luaL_openlib_Z6sallocmPKclua_pushvfstring_ZN9HashIndexD1Ev_Z25tarantool_lua_tointeger64P9lua_Statei_ZN11LoggedErrorC1IJEEEPKcjjDpT_ITERATOR_DEFAULT_CAPACITYwal_direv_async_sendev_periodic_startaddr2symbolbitset_pages_remove_Z21tarantool_coro_createP14tarantool_coroPFvPvES1_bitset_page_dataprscfg_yylex_destroygopt_argsev_supported_backends_ZN11SystemErrorD1Ev_Z13space_replaceP5spaceP5tupleS2_16dup_replace_mode_Z10sio_socketiii_ZN9TreeIndex8endBuildEv_ZN11LoggedErrorC2IIjjEEEPKcjjDpT_sse42_enabled_cpu__libc_csu_initluaJIT_setmode_ZN9TreeIndexD1Ev_Z23ipc_channel_has_writersP11ipc_channelbitset_page_alloc_sizelua_settopbit_clear_Z23ipc_channel_get_timeoutP11ipc_channeldinit_set_proc_titlelua_rawequal_ZN11LoggedErrorC1IIjjEEEPKcjjDpT_palloc_set_name_Z10fiber_freevbitset_clear_ZN9HashIndex10beginBuildEveio_set_max_poll_timeeter_poolluaopen_debuglua_toboolean_Z9evio_ptonPKcS0_P16sockaddr_storagePjinit_tarantool_cfgtbuf_ensure_resizeev_check_stop_Z12coeio_customPFlP13__va_list_tagEdzeio_sync_file_range_ZN11LoggedErrorC1IJPKcS2_EEES2_jjDpT__ZNK11BitsetIndex13allocIteratorEv_Z22coio_service_on_acceptP12evio_serviceiP11sockaddr_incfg_readahead_ZNK9TreeIndex3minEvprscfg_yy_flush_bufferlua_pushvalueeio_utime_Z23ipc_channel_has_readersP11ipc_channelclasses_ZN5Index7factoryE10index_typeP7key_defP5space_Z10txn_commitP3txn_ZN20FiberCancelExceptionD2Evstrbuf_new_Z10tuple_freeP5tupleluaL_loadbufferstrbuf_initprscfg_yyalloctbuf_to_hex_Z21salloc_ptr_from_indexmprscfg_yyget_debug_ZN11LoggedErrorC1IIEEEPKcjjDpT__Z19mh_index_del_resizeP10mh_index_tjPK7key_defeio_truncate_Z15key_def_destroyP7key_def_Z20mh_i32ptr_del_resizeP11mh_i32ptr_tjPvmain_argv_Z11coio_writevP5ev_ioP5iovecim_ZN14ErrorInjectionD2Ev_ZN14ErrorInjectionC2EPKcjS1_ev_fork_stopev_timer_stop_ZN11BitsetIndexC2EP7key_defP5spacebitset_pages_nsearcheio_nreqslua_rawsetibitset_index_expr_equalslua_newuserdata_Z14mh_index_clearP10mh_index_teio_fchmodlua_upvaluejoinp0alloc_ZN9HashIndexC1EP7key_defP5spacebitset_expr_cleareio_busy_Z17evio_service_stopP12evio_servicebitset_destroy_ZTS11LoggedErrorcrc32_init_ZN11LoggedErrorC2IJjjEEEPKcjjDpT_TIMEOUT_INFINITYev_ref_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPvbitset_createeio_mknodpalloc_resetwait_lsn_set_Z19replication_preforkvbitset_info_Z21memcached_stop_expirevrecover_existing_wals_Z21ipc_channel_broadcastP11ipc_channelPv_ZTS13IllegalParams_Z11log_io_syncP6log_ioluaL_loadbufferx_ZN9ExceptionD1Ev_Z24tarantool_lua_cjson_initP9lua_State_ZN9ExceptionC1ERKS__ZN9HashIndexC2EP7key_defP5space_ZN5IndexC1EP7key_defP5spacelua_gethookcountpalloc_name_Z11iproto_initPKcii_ZTV11SocketErrorprscfg_yyset_extraprscfg_yy_scan_bytesbitset_page_and_Z10sio_acceptiP11sockaddr_inPjeio_grp_feedEXPR_DEFAULT_CAPACITY_Z14sio_setsockoptiiiPKvjlua_loadgoptbit_set_Z20tuple_update_executeP12tuple_updatePceio_readeio_unlink_Z12iobuf_deleteP5iobuf_ZN11ClientErrorD1Evfpconv_strtodlua_yield_ZN9TreeIndexC2EP7key_defP5spacebox_freelua_pushbooleanprscfg_yylex_Z13log_io_atforkPP6log_ioconfetti_strcmp_Z22tarantool_lua_ipc_initP9lua_Statecmp_tarantool_cfgeio_msync_Z16replication_initPKcibox_lua_ZTV20FiberCancelExceptionbitset_pages_iter_recursebit_iterator_initPMurHash32ev_recommended_backends_Z24replication_check_configP13tarantool_cfgev_now_updatelua_typecrc32_calc_Z20fiber_setcancellablebdestroy_tarantool_cfgbit_rotr_u32_Z12fiber_wakeupP5fiber__packed___Z12txn_rollbackP3txnlua_tointeger_Z12greatest_lsnP7log_dir_Z12stat_collectiil_sayeio_fstatvfseio_seekev_io_stop_Z9obuf_bookP4obufm_Z11sio_connectiP11sockaddr_injpallocev_loop_destroy_Z17tbuf_append_fieldP4tbufPKclua_setfieldbswap_u32_ZTV11SystemError_Z11iobuf_flushP5iobufP5ev_iovsayprscfg_yy_delete_bufferlua_replace_ZNK9HashIndex12initIteratorEP8iterator13iterator_typePKcjfio_batch_write_Z10errinj_setibeio_readlink_Z23coio_read_ahead_timeoutP5ev_ioPvmmdbox_check_config_Z10fiber_findjev_set_syserr_cb_ZN6ObjectD0Ev_Z20tuple_update_preparePFPvS_mES_PKcS3_S3_S3_jPjS4_lua_getlocalrope_insertsession_on_connect_Z10sio_sendtoiPKvmiPK11sockaddr_inj_ZTI11LoggedErrorluaL_register_ZTI20FiberCancelException_Z8fiber_gcv_Z21inprogress_log_unlinkPcluaopen_basestrindexev_idle_startbit_testeio_openpalloc_create_poollua_gettop_ZN9ExceptionD0Ev_Z21log_io_open_for_writeP7log_dirl10log_suffixlua_nextlua_isuserdatashow_cfgprscfg_yyfreebitset_index_createeio_syncbitset_pages_reverse_iterfpconv_initbox_status_ZN6ObjectC1Ev_Z15request_executeP7requestP3txnP4portprscfg_yyparse_Z9iobuf_newPKc_Z10space_freevtnt_error_codes_Z13coeio_resolveiPKcS0_dbit_rotl_u32luaL_checkany_ZN11BitsetIndex5buildEP5IndexluaL_argerroreio_custom_ZTV11LoggedError_Z29memcached_delete_expired_keysP4tbuf_Z12tuple_updateP12tuple_formatPFPvS1_mES1_PK5tuplePKcS8__Z16lua_region_allocPvmlua_closeeio_futimeprscfg_yy_scan_string_Z16mh_i32ptr_deleteP11mh_i32ptr_t_Z16mh_i64ptr_resizeP11mh_i64ptr_tPvlua_tolstringlua_removestrbuf_free_to_string_Z18tarantool_lua_freevbitset_pages_psearch_ZNK9TreeIndex4sizeEv_Z11errinj_infoP4tbuf_ZN11LoggedErrorC2IJPKcS2_EEES2_jjDpT__Z12sio_shutdowniicoro_transfereio_chmodbit_ctz_u64_ZN11LoggedErrorC2IIPcEEEPKcjjDpT__Z10txn_finishP3txnpalloc_destroy_poolev_run_ZNK9HashIndex9findByKeyEPKcj_Z18evio_service_startP12evio_serviceeio_chown_ZTI11SystemErrorbitset_index_destroy_Z12txn_add_redoP3txntPKcj_ZN20FiberCancelExceptionC1EPKcj_ZN11LoggedErrorC1IIPKcEEES2_jjDpT_recovery_finalize_ZNK20FiberCancelException3logEv_Z10tuple_seekP14tuple_iteratorjPjprscfg_yyset_in_Z10admin_initPKci_ZTI11SocketErrorsnapshot_pid_Z13slab_validateveio_pollbox_snapshotluaL_addstringev_set_invoke_pending_cb_Z18evio_bind_addrinfoP5ev_ioP8addrinfobitset_pages_insertlua_sethook_ZN6ObjectD2Evbox_process_ZN11LoggedErrorD1Evrecovery_update_io_rate_limittbuf_ltrimlua_gethooklua_gceio_grp_Z10tuple_nextP14tuple_iteratorPjlua_setlocaltarantool_Ltbuf_clonerope_traverse_Z13fiber_destroyP5fiber_Z12stat_foreachPFiPKcilPvES1__ZTV11BitsetIndex_ZN11LoggedErrorC2IJjEEEPKcjjDpT__Z13null_port_eofP4portbitset_pages_searchprscfg_yyset_lvallua_rawsetprelease_after_Z23build_secondary_indexesvbitset_set_ZN13IllegalParamsD1Evtbuf_split_ZN11SystemError4initEPKcz_Z13memcached_getP4obufmP4tbufb_Z20primary_key_validateP7key_defPKcj_ZN20FiberCancelExceptionD0Ev_Z19ipc_channel_is_fullP11ipc_channelbit_count_u32palloc_free_unused_ZNK9HashIndex4sizeEv_Z8iobuf_gcP5iobufeio_fchown_Z23mh_lstrptr_start_resizeP12mh_lstrptr_tjjPv_ZN14ErrorInjectionD0Evev_feed_eventev_stat_stat_Z15ipc_channel_putP11ipc_channelPvlua_loadxluaopen_cjson_Z22mh_i64ptr_start_resizeP11mh_i64ptr_tjjPveio_submitprscfg_yyget_columnlua_setfenv_Z25evio_setsockopt_tcpserveri_ZNK9TreeIndex9findByKeyEPKcjbitset_pages_iterlua_gettable_Z10sio_writeviPK5ioveciluaL_tracebackiproto_port_vtabeio_mlock_Z16fiber_testcancelvrecovery_free_ZN11LoggedErrorC1IIPKcS2_EEES2_jjDpT__ZN11LoggedErrorC1IIPcEEEPKcjjDpT_ev_unrefeio_stat_Z15mh_index_deleteP10mh_index_trecovery_follow_localreload_cfgbox_net_luabitset_index_expr_all_Z14sio_getsockoptiiiPvPj_Z21mh_lstrptr_del_resizeP12mh_lstrptr_tjPveio_cancelev_timer_startlua_status_Z16mh_index_reserveP10mh_index_tjPK7key_defprint_backtrace_Z9txn_beginvsymbols_freerecovery_follow_remote_Z9sio_setfliii_ZNK9HashIndex6randomEj_Z18hash_iterator_freeP8iteratorcrc32clua_typenameluaL_checkoption_ZTS6Objectev_depthtbuf_printf_Z15box_lua_executeP7requestP4portfio_batch_allocluaL_checknumberlua_upvalueid_Z15sio_getpeernameiP11sockaddr_inopt_defcoro_createdup_tarantool_cfg_ZTV6Objectcrc32_tablelua_topointerluaL_gsub_ZN9TreeIndexD2Evlua_pushcclosurebitset_cardinalityluaL_checktype_Z11log_io_openP7log_dir8log_modePKc10log_suffixP8_IO_FILEstrbuf_resizeev_resumerecovery_setup_panicluaopen_osbitset_index_size_Z19salloc_ptr_to_indexPv_Z9stat_initvlua_pushlstringbitset_expr_add_conjtarantool_versionbitset_iterator_rewindluaL_error_ZNK5Index11findByTupleEP5tupleeio_rmdirluaL_checkintegerluaL_pushresultdefault_versioncrc32c_hwnull_portread_logcoredump_Z15port_send_tupleP4portP3txnjluaopen_bit_ZN9TreeIndexD0Ev_ZN11SocketErrorD0Evev_periodic_again_ZTV9TreeIndex_Z9sio_getfli_ZTV9HashIndexprscfg_yylex_initev_userdatabox_process_roeio_readahead_ZN9HashIndex7reserveEj_Z12session_initvparse_cfg_file_tarantool_cfg_ZN9HashIndex5buildEP5IndexluaL_optinteger_Z9stat_freev_Z8sio_bindiP11sockaddr_inj_ZN14ErrorInjectionC1EPKcjS1__ZN11LoggedErrorC1IJmPKcS2_EEES2_jjDpT_bitset_expr_add_param_ZN11SystemError4initEPKcP13__va_list_tagbitset_expr_destroy_Z10coeio_initv_ZN11SystemErrorD0Evev_break_Z20memcached_space_initvlua_pushnilcheck_cfg_tarantool_cfg_Z14memcached_loopP5ev_ioP5iobufeio_nready_Z16tuple_format_newP7key_defj_Z11coio_acceptP5ev_ioP11sockaddr_injdluaL_buffinit_ZNK11BitsetIndex4sizeEv_ZN11LoggedErrorC1IJjjEEEPKcjjDpT__Z9show_statP4tbuf_Z17coio_service_initP12coio_servicePKcS2_iPFvP13__va_list_tagEPvclose_all_xcptlua_iscfunctionev_iteration_Z14wal_writer_popP10wal_writerP8wal_fifo_ZN13IllegalParamsD2Evprscfg_yyset_columnluaL_refluaL_where_ZN5IndexD0Evwal_writeparseCfgDefgopt_help_Z30tarantool_lua_load_init_scriptP9lua_State_Z22memcached_start_expirev_Z16coio_readn_aheadP5ev_ioPvmmlua_newthreadlua_equalbit_index_u32lua_rawget_Z27tarantool_lua_register_typeP9lua_StatePKcPK8luaL_Reg_Z12request_namej_ZN11LoggedErrorC2IJPKcEEES2_jjDpT__ZN11SocketErrorC2EPKcjiS1_z_ZN13IllegalParamsC2EPKcjS1_GLIBC_2.2.5GLIBCXX_3.4CXXABI_1.3GCC_3.3GCC_3.4GCC_3.0GCC_3.3.1GLIBC_2.3.2GLIBC_2.14GLIBC_2.6GLIBC_2.9GLIBC_2.4GLIBC_2.7                                           t ui *`  ui *`0t) 6`ӯkB`>PS&y M`T&y U`P&y ]`a_& e` ui *`0ui *`ri o`{`ii `ii `ii `ri o`ii `ui *`BsBsss% sqxssؐs9sBsBsBsBsBsBsBsBsCsCscCs Cs Cs(Cs 0Cs 8Cs @CsHCsPCsXCs`CshCspCsxCsCsCs&CsCsCsCsCsCsCsCsCs Cs!Cs"Cs#Cs$Cs%Ds&Ds'Ds(Ds) Ds*(Ds+0Ds,8Ds-@Ds.HDs/PDs0XDs1`Ds2hDs3pDs4xDs5Ds6Ds7Ds8Ds9Ds:Ds;Ds<Ds=Ds>Ds?Ds@DsADsBDsCDsDDsEEsFEsGEsHEsI EsJ(EsK0EsL8EsM@EsNHEsPPEsQXEsR`EsShEsTpEsUxEsVEsWEsEsXEsYEsZEs[EsEs]Es^Es_Es`EsaEsbEscEs[EsdFseFsfFsgFsh Fsi(Fsj0Fsk8Fsl@FsmHFsnPFsoXFsp`FsqhFsrpFssxFstFsuFsvFswFsxFsyFszFs{Fs|Fs}Fs~FsFsFsFsFsFsGsGsGsGs Gs(Gs0Gs8Gs@GsHGsPGsXGs`GshGspGsxGsGsGsGsGsGsGsGsGsGsGsGsGsGsGsGsGsHsHsHsHs Hs(Hs0Hs8Hs@HsHHsPHsXHs`HshHspHsxHsHsHsHsHsHsHsHsHsHsHsHsHsHsHsHsHsIsIsIsIs Is(Is0Is8Is@IsHIsPIsXIs`IshIspIsxIsIsIsIsIsIsIsIsIsIsIsIsIsIsIsIsIsJsJsJsJs- Js(Js0Js8Js@Js HJsPJsXJs`JshJspJsxJsJsJsJsJsJsJsJsJsJsJsJsJsJsJsJs|JsKsKsKsKs Ks(Ks0Ks8Ks@KsHKs:PKs XKs1`Ks hKs HH%2HtH5*2%,2@%*2h%"2h%2h%2h% 2h%2h%2h%2hp%2h`%2h P%2h @%2h 0%2h %2h %2h%2h%2h%2h%2h%2h%2h%2h%z2h%r2hp%j2h`%b2hP%Z2h@%R2h0%J2h %B2h%:2h%22h%*2h %"2h!%2h"%2h#% 2h$%2h%%2h&%2h'p%2h(`%2h)P%2h*@%2h+0%2h, %2h-%2h.%2h/%2h0%2h1%2h2%2h3%2h4%2h5%z2h6%r2h7p%j2h8`%b2h9P%Z2h:@%R2h;0%J2h< %B2h=%:2h>%22h?%*2h@%"2hA%2hB%2hC% 2hD%2hE%2hF%2hGp%2hH`%2hIP%2hJ@%2hK0%2hL %2hM%2hN%2hO%2hP%2hQ%2hR%2hS%2hT%2hU%z2hV%r2hWp%j2hX`%b2hYP%Z2hZ@%R2h[0%J2h\ %B2h]%:2h^%22h_%*2h`%"2ha%2hb%2hc% 2hd%2he%2hf%2hgp%2hh`%2hiP%2hj@%2hk0%2hl %2hm%2hn%2ho%2hp%2hq%2hr%2hs%2ht%2hu%z2hv%r2hwp%j2hx`%b2hyP%Z2hz@%R2h{0%J2h| %B2h}%:2h~%22h%*2h%"2h%2h%2h% 2h%2h%2h%2hp%2h`%2hP%2h@%2h0%2h %2h%2h%2h%2h%2h%2h%2h%2h%2h%z2h%r2hp%j2h`%b2hP%Z2h@%R2h0%J2h %B2h%:2h%22h%*2h%"2h%2h%2h% 2h%2h%2h%2hp%2h`%2hP%2h@%2h0%2h %2h%2h%2h%2h%2h%2h%2h%2h%2h%z2h%r2hp%j2h`%b2hP%Z2h@%R2h0%J2h %B2h%:2h%22h%*2h%"2h%2h%2h% 2h%2h%2h%2hp%2h`%2hP%2h@%2h0%2h %2h%2h%2h%2h%2h%2h%2h%2h%2h%z2h%r2hp%j2h`%b2hP%Z2h@%R2h0%J2h %B2h%:2h%22h%*2h%"2h%2h%2h% 2h%2h%2h%2hp%2h`%2hP%2h@%2h0%2h %2h%2h%2h%2h%2h%2h%2h%2h%2h%z2h%r2hp%j2h`%b2hP%Z2h@%R2h0%J2h %B2h%:2h%22h%*2h%"2h%2h%2h% 2h%2h%2h%2hp%2h`%2h P%2h @%2h 0%2h  %2h %2h%2h%2h%2h%2h%2h%2h%2h1I^HHPTI0]NH\NHǩCsUH-sHHw]øHt]ssUH-sHHHH?HHHu]úHt]s=QS2uUH~]>S2@H=2tHtUH@sH]{vUH}EHPaN]UHH H}H}t HEHHu aN6]N<^N<HEHHEHEx$HEHHPHEHHEHEHx_NT_N7HEHHEHHE@HEHEH;EuHE HEH;EgUHATSHPH}uEHHHEHHEE HE@;Er HE@EEHE HEH;EuыL2L29uiL2t L2E܁}EHHXL2HHHEH}E܉IL2HEH*L2}tEE̋EHEȋEH,HEH}txK2HUf K2HEUPHEỦPEHHHEHHEHPHK2HEHHHEHHEL2D$uH$_NAp_NA|_Nu_NAҿ_HH$_NA_NA u_NHOXA0cNHOIHdLH)HP[A\]UHH0H}؉uԋUHE؉HHEHEpHEH@MHUHEEHEH@UHcHHЋIE}E~‹E‹EЉHEMHcHT HEUHcHD aN_N_N-4HEUHcHD EEUHE@9LETHEH@UHcHHHЋuHEUHcHD mHEUHcHJUT EUHE@9uHE@tHE@PHEHD EHHEPHEUHATSHPH}HuHEPHE@9suL2D$H$_NA_NA|_N_NAҿHù_N_NHdYA`cNHHEHHEHEH@HEHEHPHE@HHHEHEH HEHEHEHE@HEHHP HEH9wuL?2D$H$_NA_NA|_N_NAҿHù_N_NH1cYA`cNHHEHEHEiEȃ}E;EL2D$H$_NA_NA|_N_NAҿKHHEHHLsI&_NH߸`vXAcNH7HUEHHEHEy>HE=t1HEHHHEHHEHHEH HH)H؉HEHEHEH;E98IHL IHLIHLHzHP[A\]UHH@H}HuHE؋@HEHH HEHE`NH薊HEHE؋@HEHHEHEfHEЉHEPHEH1HEfPL 2HUHEH$IA `N_NAHEUHH H}L 2HEIA"`N_NAHEftaN_N1`N;/HEH@HHHEHHEHEHVUHHH}uHEЋEЅy{aN_NB`N.HEEHEfHEfu HEH UHSH(H}uHUHEHHEHHUHHrHHEHPHUHEHHH([]UHH H}HuHEHHEH@HH HEHEH@H;EslHEHHHEHEH@HEHEHPHEHHEHPHEH@H;EvpaN _N[`N-HEUHH0H}HuU܋E܃t/tKuhHEHEp`NHǸ HEHEt`NHǸHEHHEw`NHǸHE{`NHǸUHEHHE]HE<v-HE<~w"HEHE}`NHǸh HEHE辀`NHǸFHEHEH;EuHE{`NHǸUHH@H}HuHE@uHEȾ`NHǸ EHUHEHH;HUHEHHHEUHMHEHHKHEȾ`NHǸ EJUHMHEHHEHE@9EHtHEȾ`NHǸ3 HUHEHH HEH}uHE@;EtdaNH_N`N1+HEȾ`NHǸ H+UHSHxH}HuHUHMLELMEEHExHE@HEHLH HELP HMHUHuHELELD$LELD$<$MH/HEEԉHEHHHEUHEPHEHP HEHH0HUHEHHHE:H9H%HtHHEHEHnHHx[]UHATSH@H}؉uHUHMHUHEHHH)HHEUHMHEHHH;EtuL2D$qH$_NA_NA|_Nq_NAҿTHù`Nq_NHZYA`cNHXHUHEHHHEHEUԉPHEHHHEH4HEHH HEHHHUHEHHHEBIH LHHHHHHEHH@[A\]UHHPH}HuUEt tdHEHE8t0aN_N`N0(HEȋ@EHE@EE;ErE;EHEHE8t0aN_N`N'HEH@HEHEH@HEHEH;ErHEH;EkHEHWEHEHHE؋E;EsEEHuHMHH1E}uE;ErE;EEEUHH`H}HuHUHE@u6HEHu)HEH@HUHr HUHJ HZHEHHEHE@HHEHHEHEHAHEHEH1HEEgHEHMHEHHsHEHEHMHEHHVHEHEPHMHEHHE}uHEHEH;EuEUHH0H}HuHUHUHMHEHHE}u"HEH;ErHEH;EEEUHHpH}HuUHMHEHHEHE@;EwHE@HEHHUHHEHEHHEE8HEHMHEHH/HEHEHEHEHEHE@t t:HEEHEEȋE;ErE;EEHEHHE}uHEHE HEHHEHEH;ErHEH;EEKE;EsEEHuHMHH$E}uE;ErE;EE}u(HEHUEHHEHEH;EEHUHH92]UHHH92HEHEHHHEHb92l92HHH;EuHA92HÐUHHH}HEHbNt HEHÐUHHH}HEHHEHUHHH}HEHpbNHEHt HEHÐUHHH}HEHHEHlUHHH}HEH0OHEHyt HEH/ÐUHHH}HEHHEHUHHH}HEH0bNHEHyt HEHÐUHHH}HEHHEHUHSHHH}HuU܉MLELMHELMLEЋM؋UHuH}H<$HǸQHEH0bNHEHuRHHEHHHHH[]UHHH}HEHaNHEHt HEHÐUHHH}HEHHEHÐUHH}HE@H]UHHH}HuHEHHHEHHHEHHiUHHH}HuHE@HEHH HEHHWÐUHH}H}t HE@]UHH}HE@]UHH}HEH@]UHHH}HEHHUHH}HuHUHMLELMHEHHEHUHPHEHUHPHEHUHP HEHUHP(HEHUHP]UHH@H}HuHUHMLEHUHEؾ0HHEH}u*LEH}HMHUHuHEMIH5HEUHSH(H}HuHUHE؉HEHHUHEHcH([]UHHH}uUHEHeHUHH}HuHEHUH]UHH H}H}t HEHHuchN6cNcNHEHHEHEx$HEHHPHEHHEHEHx@苫HHUHEHHiWHjNPjNiNMBIHLHOIHLH9IHΝLH#H [A\]UHH H}HuHUHEHHEHkNHEHUHPHEHUHPHEH@ÐUHSHH}HEHkNHEH@HtHEH@H@HUHRHHEHt(HEHHHEHHHJH[]ÐUHHH}HEHbHEH辜UHATSH H}HuL1D$H$PjNA4jNA@jNPjNAҿ蠥HAjNAjN PjNH߸vXAcNH蓦IH訥LHmUHH}u}u}ussmUH]UHH}HEHbN]ÐUHH H}H}t HEHHuoN6kNkNHEHHEHEx$HEHHPHEHHEHEHxHEP@HEH8HEHHEP8HEP@HEPD E4H HHtH]UHH0H}HuHE؋@8EEEdHEH@ HUHR(HMH1HMHy0MHHHMHЉE}~*EEHEH@UHHЋ@EE}y)EEHEH@UHHЋEEHEH@UHHЋuqHEH@UHHЋ@uW}uHE@8H}yHEH@UHH%HEH@UHH@HEH@UHHЋulHEH@UHHЋ@E}uHE؋UP8}yHEH@UHH‹EHEH@UHH‹EBHEH@UHHЋ@ukHEH@UHHЋE}uHE؋UP8<}yHEH@UHH‹EHEH@UHH‹EBHEH@UHHЋEEHEH@UHHЋ@t EEHEH@UHHЋ@EHEH@0HUH HUHr0UHH4HUH HUHz0UHHHHr}t+HEH@UHHHEH@MHHȋB(HEH@UHHHEH@MHHȋEEHEH@UHHHE؋@<HEH@UHH‹EBHE؋UP<}}HE؋@@PHE؉P@HE؋@@HE؋@@HxH*HHH H*XHE؋@DHxH*HHH H*Xd Yf.v3HE؋P@HE؋H8HE؉H9HE؉P8HE؋P@HE؉PDUHH0H}HuHUEHEHHtHEPHHEH@ 9v1HE@HHHHEHHHWoHUHHEHHUHHEH@HE@8uHEH@ )HEHHURHP HEHHUR8PHE@8EHEH@HUHR(HMH1HMHy0MHHHMHЉEHEHPPHEHHUHRHcHJU}~*HEHPPHEH@UHHЋ@EC}yHEH@UHHЋE$HEH@EHEH@UHHЋE}}x HEHUPUHH0H}HuHUEHEHHtHEPHHEH@ 9v1HE@HHHHEHHHmHUHHEHHUHHEH@HE@8uHEH@ *HEHHURHP HEHHUR8PHE@8EHEH@HUHR(HMH1HMHy0MHHHMHЉEHEHPPHEHHUHRHcHJU}y)HEHPPHEH@UHHЋEE}~HEH@UHHЋ@E%HEH@EHEH@UHHЋ@E}}x HEHUPUHHH}H}t HEHbUHHH}BHE@HUHcHUPHEPHEHUHztEHE@uUHH(H}H}u HEHHEHEHeE}u HEH@UHHЋ@ETHE؋@PHE؉PHE؋PHEHcHJUHEHPHE؋HHEHcHHHЋE}uHEHHEHH0EHHUHH(H}H}u HEHHEHEHE}u HEH@UHHЋEUHE؋@PHE؉PHE؋PHEHcHJUHEHPHE؋HHEHcHHHЋ@E}uHEHHEHH0EHHUHHH}HuHEH@XH;EwHEHPXHE@THHH;EwsNpN@qNHUHEH@XHH)HHUHHH}HEHPHEH@HHiUHHH}HEHUHH H}H}u4HEHEHEHHusN5qNqNoHEHUHH H}HuH}upsN<qNqN6H}upsN=qNqNHEHEHEHUHUHH@H}HuHUHEHEHEH#HEHEHHEHEHPHMHEHHUHH@H}HuHUHEHEHEHHEHEHHEHEHPHMHEHHJUHH@H}HuHUHEHEHEHEHEHiHEHEHHHEPHEH0HEHMUHHH}HEH@H=lAtsNsqNrNHEUHH H}HEHHEHEH@HtHEH@HHEH]UHH H}HEHfHEHEH@H#HEHEHUHH H}HEH(HEHEH@HHEHEHCUHH H}HEHHEHEH@HHEH}t0HEH@H@8HUHRHMHy HMHЅutHEHUHH H}HEHeHEHEH@HHEH}t0HEH@H@8HUHRHMHy HMHЅutHEH@UHH H}HEHHEGHEH@H@8HUHRHMHy HMHЅtHEHAHEH%HEH@H/HEH}uUHH H}HEHTHEGHEH@H@8HUHRHMHy HMHЅtHEHAHEHH%HEH@HHEH}uÐUHH H}HuHUHEHUHMHH詹HEH0tNHEH PHUUHHH}HEH0tNHEH HZHEH衹t HEHVÐUHHH}HEHHEHVUHH}HE@`]ÐUHH H}HEH HHEHEHUHH H}HEH H:HEHEHUHH H}uHEHP EHpHEHEHUHH@H}HuЉUHEH@@uHEH@@;EtsNqN(rNHEHEẺEHEHP HEHHOHEHEH.HbUHATSHpH}HuHUMH}=HEHEHUHEHH2HEHH HUHEHHHEHHEUHMHEHHE}HEHP HEHH{HEHtHEHUHJ HHL 1D$H$qNA`rNAlrNqNAҿ]HHEH‹EAЉqNH߸vXAcNH^H}tHE5H}t*HUHEHHHEHP HEHHHEIH~]LH?aHp[A\]UHATSH0H}ؾ0]HEH}L}1D$.H$qNA`rNAlrN.qNAҿ\HH$rNAxrNA0.qNH߸vXAcNH]HEHUHPHEH@lAHEIH\LHG`H0[A\]UHATSH@H}HuЉUHMDEH}u}tsN:qNrNHEHHE}u%ẺvtEHEHEHUHP HEUȉP(Ẻ;t%HEHP HEHHHEH HH#HEHP HEHHHEH HHẼwmHrNHEH/AHEHAHEHAHEHAHEHAHEH9AL{1D$eH$qNA`rNAlrNeqNAҿuZHArNArN eqNH߸vXAcNHh[IH}ZLHB^H@[A\]ÐUHH H}HEH1usNlqNsNHE@`HE@d@HE@dHHEHEHQHHEHP HEH@ Hu:Lz1HEIA(sNtqNAҿnPUHH H}HuHEP`HE@d9HE@d@@CHEPdHE@dHHEHEH@ HUHHc\HUHB HEH@ Hu:Ly1HEIA(sNqNAҿOHEHP HE@`HHHEHUHEHHHE@`PHEP`UHH0H}HEH{usNqNsN3HE@`EHE@dEHEH@ HEHEHx uUHEHMHL$H$%AAAAH¾UHSHhH}HuHEHH0HHUHЉEEHxH*HHH H*X Y YH,EHE}t\EHHEHEHHOHEH}u:L>x1HEIA(sNqNAҿNHEHHEHEHHpHHuH}AE-EHHEHHEHUHEHH9EHEHHUHHEH}u}t=Hpw1HEHdU$AAPsNqNHEH@@t%A~AHUHz DE܋MHUHuHt$H$AAHh[]ÐUHH H}H}t HEHHuxN6tNtN誙HEHHEHEx$HEHHPHEHHEHEHxHEHAHEH@LAHEH:AH& HEUHATSH0H}HuUL#j1D$H$uNAvNAvNuNAҿHHAvNAvN uNH߸&vXAcNHIIHHLHLUHATSH H}HuLti1D$H$uNAvNAvNuNAҿ*HHAwNAvN uNH߸wvXAcNHIIH2HLHKUHATSH`H}HuHUMHEH@@t+xNuNuvN虋H}u H}u+xNuNwNrHEH}tmHEHHEHEHP HEHH8= tBHEHEHEH;Eu+xNuN?wN HEHP HEHH9< H}EHEH@HHUHEHHEHEHfHEЋẺHEHx HMHEH8 Lg1D$H$uNAvNAvNuNAҿ:FHH$VwNAvNAuNH߸vXAcNH%GHEIH4FLHIH`[A\]UHAUATSHH}Hu|HpDxHEH@H=LAtxNuNHvNxu#HptxNuN`wNSHEH_HEHEHE|t%HpHEHEH1HEHEHEHE:AHJ E| HwNHEH ; EHUHMHEHHE; EHUHMHEHH; EHUHMHEHH-= EHUHMHEHHe< EL=e1D$H$uNAvNAvNuNAҿCHAwNAvN uNH߸@vXAcNHD}Ld1D$H$uNAvNAvNuNAҿcCHH$wNAvNAuNH߸訶vXAcNHNDHEHpHEHH HEHH< Lc1D$"H$uNAvNAvN"uNAҿBHH$wNAvNA"uNH߸vXAcNHCHEH ~tIIHBLL9IIHBLL#IIHjBLL HDH%HtHDHEHEHu p9HEHĈ[A\A]]UHH}HEH@(]UHHH}HEHHHr< UHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uETHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!Ѕ=EEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uEAHEH@UHHЋE!ЅUEH([]UHSH8H}HuHUHMHE؋@EHE؋PHE؋@9#HE؋@(HtHUHEHHJHE؋PHE؋@9Ht/HE؋@pHUHEHѺHHE؋@(t HEH@0HUHuHѺH)HUHMHEHH?EHEH@UHHЋE!ЉE}HEH@UHHHEH@MHHȋ0E HE؋@PHE؉PHEH@UHHЋE!ЅuHE؋@PHE؉PHEHUHH HEкHHTAH}tiHEH\H}t)HEHUHH HEHHHAHEHUHH HEкHH@EH8[]UHSH(H}uHUHE@;EHEH@UHHЋE!ЅHEH@UHHHEH@MHHȋ0E!HE@PHEPHEH@UHHЋE!ЅuHE@PHEPHE@(HtHU؋MHEH& H([]UHATSHPH}ȉuHUMDEHEȺpH/HEȋUĉP`HEȋUPPHEHUHPXHEȋUPTUHEHxIHHEHPhEHEH@XUHHHEHE@HUHMHΉ1D$H$NA NANNAҿ#Hù NNH_YA`cNH'HEHEHEHHPHEHEIHLH H0[A\]UHATSH@H}HuЉUHEHHEUHEHH;EvuL=1D$H$NA NANNAҿ;HùHNNHwYA`cNH?HEHEHHEHHEIH:LHH@[A\]UHH H}HuHEHHEHUHEHH4EUHMHEHHHEUHH}HE@`]UHH}u} w HEUH]UHATSH0}܋E܉2HEH}t HEL(<1D$H$xNAlNANxNAҿHËEA9xNH߸1vXAcNHIHLHH0[A\]UHATSH0H}؉uԋUHE؉HHEH}LW;1D$H$xNAÁNANxNAҿ HHEHuUAAй5xNH XA0cNHHEIH LHH0[A\]UHH H}HuUHEHHUHuHMHUHHH}HuHUHEHH8HÐUHHH}HuHEH\HEHhHρNHEHHׁNHEHHށNHEHHNHEHHNHEHHNUHH0H}HuHUHUHEHHHE؉HE؋t HEHHEEHUHEHHEHE؋;EuHEUHH H}HuHUHEHHEEUH}EuEt]UHSHXH}HuHEHHEHPHEHEHX HEHHEHEHPHE@HHEHUHEHH2HEHUHEHHƒHE@ HEPHUHEHHEHEH@hHMHUuH*1HEHUHEHHEHE@EċMHUHuHEAHѺH >HHHHtHHHEHEH* HX[]UHSHhH}HuHEHHEHPHEHEH HEHHEHEHPHE@HHEHUHEHHHEHUHEHHmƒHE@ HEPHUHMHEHHHEHEؾHMHEȋUHEH@HMHHlHEHHPHUHuHMHHEH}HEH0H 1dHHP(HEH@hH}HMIIBH8.HEHUHEHHlHMHUHuHEAH:HH%HtHHEHEHG)h HHh[]UHATSHĀH}HuHEHHEHEHPHE@HHEHUHEHH9HEHUHEHHEċUHEȉHHEHUHEHHEHUHEHHEHUHEHHwE}uuL51D$H$NA NANNAҿHùNNNHYA`cNHAtuL41D$H$NAkNANNAҿ;HùzNNH軈N*BЃNH?EEE;EHUHMHEHHHEHEH軑HEMHEH@HUHgHEHHpHMHUHuH}AHѺ5}tm)HMHEHHEE;Eu"HEHHUHHEH}uEE;EHEHH;EL31D$H$NA NANNAҿHùNNHYA`cNHIHLHIHLH~HvIHLH`H[A\]UHHPH}HuHEEHEHHEHPEHEHHEHHEHEHPHE@HHEHUHEHHHE}u(HUHEHHƒHE@ HEPHUHMHEHHHEHEHHEЋUHEH@HMHH#gHEHHPHUHuHMHHEH}t)HUHuHEAHHUH}} t%}t}t}t}t }t]UHH}EtN EH sUHATSH0}HuЉU؋E܉{Lh01EAANNAL901D$H$NA NANNAҿHùȂNNH+YA`cNHE܉H21dHH@(H=HEHEU܉HEHUHPHEU؉PHE@HEIHLHsH0[A\]UHH H}HuHUHE wvHNHUHEHH&nHUHEHH,YHUHEHHVDHUHEHH/HUHEHHRPN NNQUHH}u}u}u sؒsUH]UHSH(H}HuU܉MDEDMHEDEЋ}ԋM؋UHuEAHǸ腀HEH0bNHEHHHEH;.HHH([]ÐUHHH}HEHNHEHi.t HEHWÐUHHH}HEHHEH0ÐUHHL2HEE]UHH}HUMfEHEUfP$HEHUHPHEUP ]UHH0H}HuHUHMDEHE@$fuN4N2NOH}u H}uN5N?NOMHUHuHEHgHHEHPH}t!HEHUHPHEH@He HEHUHUHHH1dHH@((Hh;HEHEUHATSHPH}HEH@HuHEH@HH52H0HE~EHEHEHEȋx HEHHHE@$H42HuAIȉѺH:E/EHEHEE\E 1f.vUHw+1Ef(\MMHE@$EIAVNWNӃ}H042HMHH=}L*1D$]H$NAlNAxN]NAҿ Hù']NHXA0cNH IH LH HP[A\]UHHH}HEH@HtHEH@H/HE(#HNUHHH}HEH@Hu HEH@HtFHEHPHEHpHEHHHEH@HtHEH@HHE(#HUHSH(H}HuU܉MHEM؋UHuHǸ{HEH0bNHEHC}HHEH)HHS H([]UHATSH0H}HuHUHEHHH)HHuL)1D$H$NANANNAҿHùNNH|YA`cNHHEHfEHEHHPHEHEIHLHn H0[A\]UHATSH0H}HuHUHEHHH)HHuL(1D$H$NANANNAҿHù(NNH |YA`cNHHEHHHEHEHHPHEHHEIHLH H0[A\]UH}}t}u]UHH}HE@`]UHH}u} w HEUH]UHATSH0}܋E܉HEH}t HEL&1D$H$XNALNANXNAҿHËEA9XNH߸xvXAcNHIHLHe H0[A\]UHHH}HEHH@HUHUHH H}HuUHEHHUHuHMHUH}E VUUU)ȃEEHG98)ȉEEU]UHH0H}HuUHEH@HEH}uHEH@HEH}ttUHMHEHHUHSHHH}ȉuHUMHEUHMEHΉsHEMċ_1ΉHUHMHEHHHEHHEPHMHEHHHEHaHEH/>HHHHtHHVHEHEH:HH[]UHATSH0H}uHU؉MEL$1D$jH$NALNANjNAҿHH1IjNH߸"vvXAcNHMHU؋uHEHMIHLHH0[A\]UHATSH0H}uHU؉MEtuL8#1D$sH$NANANsNAҿHùsNHNv`"=B X}t1H5<1H=-1AAй 7B'HQ1H#2HEEH[1K1Hd#2H sͦT1} H/#2H H#2HT1覫L 1AFN_NAaNC_1L 1AhNcNAHU1H~"2HEEHH^1HN@@MszH;1HƿN^UHH0H}HuUHMЋE܉EHEЋ@EHEЋ@EHEЋ@HEHx HUHuHEII HHUHH0H}HuHEHEHEؾHJHEHEHXvHEHEHHpHHuH}A)HEHHEHpHEHHMHHEHHUHHEH}uUHH H}HuHEHEHEHEHEHƿ?BRHUHHH}HE@MsNHǸIUH@Ms]UHH H}H}t HEHHu O6N NJ:HEHHEHEx$HEHHPHEHHEHEHxN[NAҿHùPN[NHhYA`cNHHEx$HEHHPHEHHE3H}HtuL 1D$cH$NA0NA>NcNAҿHùxNcNHhYA`cNHHEHxNkNAҿHùNkNHBgYA`cNH HEHxRHEHHPHEHHEHEH HEH }H}HtuLj1D$sH$NA0NA>NsNAҿ HùNsNH\fYA`cNH$HEHxhHEHHPHEHHEHEH HEH HEH H}HtuLn1D$|H$NA0NA>N|NAҿ$HùN|NH`eYA`cNH(HEHxxHEHHPHEHHEHEH HEH HEH HEH uLr1D$H$NA0NA>NNAҿ(Hù)NNHddYA`cNH,IH1D$H$NA0NA>NNAҿHùHNNH0cYA`cNHHEHEHEHHPHEHEIHLHH0[A\]UHATSH@H}HuЉUHEHHEUHEHH;EvuLV1D$H$NA0NA>NNAҿ HùpNNHHbYA`cNHHEHEHHEHHEIH LHH@[A\]UHH H}HuHUHUHEHH;HEHEHMHEHHUH}}w5}?w%}w}w]UHH}uHEHE}vs}?vT}v5}vEƒʀHEHEEƒʀHEHEEƒʀHEHEEƒʀHEHEEƒHEHEHE]UHSH(H}HuU܋]܋UHEH3HMHHHUHH([]UHHH}HD1HEHHHH;Et ObNN.HEUHH H}HD1HE@HHHHEHEHvHE@9tp ONNx.HEUHHPH}HuUHEH HE؃}u HEmHEȋ@;EHEȋUHD ~HUHEȋMHD HHHEȋUHD =t;HEHEHEȋUHD EHU؋EHH HEHȋHVHUHE@HHE-HEH EHU؋EHHE؃}uHEmHEH;EuHEHiUHH0H}uHUHEHTUHMHHHEHE@HEHHP HEH9vHEHmHE؉HEHUHH}HuHEHUHHEHP HEHP]UHH}HE@`]UHH}u} w HEUH]UHATSH0}܋E܉JHEH}t HEL@ 1D$H$HNANHNAҿHËEA9HNH߸I[vXAcNHIHLHH0[A\]UHHH}HuHEH@XH;EwHEHPXHE@THHH;Ew OHNNQ+HUHEH@XHH)HHUHHH}HEHPHEH@HHiUHATSH0H}؉uԋUHE؉HTHEH}L1D$H$HNANA>NHNAҿHHEHUAAй5HNH XA0cNH{HEIHLHOH0[A\]UHH H}HuUHEHHUHuHMHUHH H}uHi0MHEH4HHEHEfu ObNNN)HEUHH H}uUHEHהtlH0HEHґHEHEHztUHEH+HHEHEHrHEUHH H}HEHrE}HEVNHǸSHEH HEHUHEHH"UHH H}HEHHEHEHcUHH H}HEHMHEHE@HxH*HHH H*XHEHUHH`H}HEHHEHEHqE܃}t}~HEqNHǸ8HEH}E؃}xUHE@9sE؉ED}y#E؉HE@9wHEPEЉEHENHǸ}utHEH>}E؃}~UHE@9wE؉EN}y#E؉HE@9sHEPEЉE%HENHǸOHE@EE;EwHENHǸ"HUHEHHHE@;Ew ON Na&EEHUMHEHHE3EHMHEHHtEHUHEHHHEH}tE;EsuE;Et ON&N%EU)HUHH0H}uHU؋UHEHQt H@NUHEHyEHEHE( f.ErLEf. r=EH,HE؉PHEHPHEHHE@HE@Ef.ص s EH,#E \H,HH1HUHBHEHPHEHHE@HE@%UHEHamHHEHPHEHPHEHHE@HE@UHEH{tHEH6NHE@HEH*NHE@HE@HEH;NHE@HE@dHUMHEHu{HHEHHEHE؉PHE@+HEHHE@HE@HUHH H}uUHEH4HEHUHEHH)HHHMHEHHH1UHH HxHxHHEHxHlE܃}HxNHǸ>HxHxHEHxHxHEH}y@HEHHHE@H9~HxNHǸHE@HEHE@H;E} HE@HEH}yHxNHǸHE@H+EH;E}HE@H+EHEHEHUHHE@H9~ O8NN!HE@H;E~HEEă}~U܋EЃEċEąu HUHxHH|HHxHHEHMHHHHEEEtHMHHHҥHHH H9rHH聥HHHHHH9EHE;EzE܉EHMHHHAHHH H9rHHHHHHHMHxHXuHUHxHnHxHoHHxHNHǸDHH8HHHH[m}HH賤HUHxHwHEHUHEH<H51HuHMHxIICHHEHxHhHUHxHH] HUHHpH}HuHUHMLEDȈEHEHhhEHEEHUHEHHMHUHEЉHHEbẺH;Eu*EEHEHQxẺHMHEHHxHEH讐HUHEHHHEH}uH4UHH@H}HEȾHHEHEȾH*kHEȾHLqEUHE@9r-HE@pH(0MHEANHǸEMHUHEH!HEE܉HMHEHHwEHEȺHrHEHEȾHsHUHEȾH聂HUHH H}HEHHEHL0dHH@(HHEHUHEHHLHEHEHHHEHHvUHH H}HuH}t\HEH~HEH0HEH跁HEHZHEHUHHEH HEHuUHH@H}HEȾHHEHEHbEHE}t}uHEȾHlgutvHEȾH}HEH}u` ONNcH0HEȾHHEȾHdHUHEHHW}uHEȾHfutOHy0HEȾH<HEH}u` O#NNHEȾHeHEȾ!NHǸ_HUHEHH6HEH}u$HEȾH9aHEHtE܉HMHEHHtH@UHHH}HE"bBHvHEH-eHEHsUHH H}HEHHEHE@HxH*HHH H*XHEHcsUHH H}uH0MHEH跇HEH}u@ OtNN5HEHUHH@H}HuHU؉MLELMHEHPHEHHS{HEH0HEHP~HEHHEHUHH}t'HEHHHUHEHHfHEHHEȋMHEH@HUȋuHJ&HEHHpHDEHMȋUHuH}UHH H}HEHHEHEH@HUHиUHH H}uH0MHEHOHEH}u' ONZNHEHUHH0H}HEؾH+kEHEؾHkEEHEUHEHdHEHEؾHyHEHEHUHH0HEؾH|HEؾHNUHSH(H}HEؾHHEHEH@HDHEHHE؉پhNHǸrH([]UHH H}HEHHEHEHH0HHUHHHEHHpUHH H}HEH1HEHEH@@HEHHHpUHH H}HEHHEHEHH8HHUHHHEHHSUHH H}HEHHEHEHH@HHUHHHEHHUHH H}HEH/\uHEHautHE辀NHǸHEHHEHEHhEHEHHHHMHUHHHEHHLUHH HxHxHHEHxHX[EEEHEHE}t}uHxH`uHxHgEExE ~UHxNHǸzHHxHH}t}uHxH}_u}u HxHK_ut:HxHeHEHEЋ@EHHEHH{E܃EE\EHHxHUHHHHHH誔EE;EuHEH@@;Es'HEH@HUHxNHǸHH͔HUHxHgHEHEHuHEHEHHhHHUHHEȋ}LMLEMHUHuHx<$HHE HUHH0H}HEHXEHE}uHEؾH}]utHEؾHHEHEHHEHEHHUHHEHUHEHHH}tUHH H}HEHHEHEHHUHHEHUHEHHxUHHH}HEHHElBHlmUHH HxHxHHEHxHOWE}uHxNHǸHHxHHO}u HxH[ut:HxH HEHHEHH>HE؋@ExEEE\EHHxHHH/HHHHREE;EuHH謑HxHcHEEHEH@MHUоHHEHFHEHEHHpHMHUHuH}AHѺEHEHHUHHEH}u܋EHxH*HHH H*XHxHch HUHH}HE]UHATSH@H}HuЉUHEHH@HEHUHEHHIHcLHHHHL0D$H$NANNAҿHHEHObI3NH߸9vXAcNHH@[A\]UHH H}H0dHH@(HHEHEHMsHEHUHPHEUHATSH`H}uEEHEHfEHUHEHEȅL0D$ H$NAN NAҿpHHEH"XHEH]YI0 NH߸8vXAcNHKEËEHEHЉEHEHRUHEH[wUH1HHjHEHE؋UPHEH HEHEHLe@HUHEHUHMHEHHHEHEH2RUHEHvuHEIHxLH;H`[A\]UHATSHPH}uUHEHVEHUMHEH(E؅tWEȉËEȉdHH1HHZHEHE@UHEHMH HHHEEtt;UHEHKUHEHHEH}t HEL00D$@H$NAN@NAҿHËUHEHVI0@NH߸+6vXAcNHIHLHHP[A\]UHHH}HEHfuHEHHUHSHHH}HuUUHEHHEHUHEHH HMHEȺHHHEH HHEH HHHH[]UHH H}HuHEH~OE}uHEH]TuHEH)bHEHsE}t2HEH TtHEHUttNHEHNHMHEHHHEHNHEHXsuG}tHEHNEUHMHEHHGEE;EuUHSHXH}HEHZEHUHEH\HE}uHE(NHǸHEHMEH0dHH@(HHEHEHHEH0HUHUuH}HP0dHH@(HUHHHEHzM+ELHH7Ht/H{HEH0dHH@(HUHHH|HX[]UHATSH0H}HEHMtHEؾNNHǸHEؾH$YE}uHEؾpNHǸtHEغHZHEL0D$H$NANNAҿ臾HËUHEAHNH2vXAcNH胿IH蘾LH]UHATSHPH}HuHUEHEHEHEȾHJHUHEHH)HHHMHEHH,_UHEȉHViHEȾH~PL0D$H$NANNAҿaHHUHEH)HEIIй2NH߸0vXAcNHKHEHHEHEHJEHUHEHH)HHHE.HHEH}HUHEHH)HHHMHEHH]UHEȉHhHEȾHDOLq0D$H$NANNAҿ'HHUHEH)HEIIй2NH߸k/vXAcNH}tPHEȾHLLHEȾHI-IHLH辿IHLH訿HP[A\]UHH H}HUHEHWHEHUHEHHMHEHHHLUHHH}HEH1H͆UHATSHĀH}HuHEHHEHEHPHE@HHEH1HcHEHq1H薅EHUHEHH$UHEHHUHMHEHHHEEHEHHMHEHHHUHEHHEMHEкNHFE7HUHMHEHHPHEEHMHEHH-[EE;EuMHEкHzHUHEHHHEHIHHEHLHHHHHt8JHmHHrIH藹LHJHHOHHHE諰HHL0D$H$NANNAҿǸHHEкHlTI3NH߸,vXAcNH譹H[A\]UHH H}uEsEHHŠsNH-t O$NN&*EHEHXEHHŠsHPMHEHyoE} uUHEE-tw-#t_#!t\h&t2+t&\=t=:t1K^t|t?<5.'  E]UHEEwKHN=<+5&.^'| :#! -E]UHH H}uUHEHIHHNUHEHHEH}uHE(NHǸHE@EHEH W0HEHDHEHREHEHDUHEHhuEHE(NHǸvUHHPH}HuUHUЋMHEȉHEt.UHEH?E؉HMHEHHk~UHEȉH=HtPUHEȉHHEH}uHEȾ(NHǸHUHEHH{|HEHU2HEHBHMHEHHHEȾHBUHEȉHOgu HEȾ(NHǸ:HƸUHH0H}HuU܉MEE܉EUHEHUЉEEE;EuHMHEHH}E܉EUHMHEHH:EE;EuH$UHSH HXHXHtPHEEHXHAEHHXHH}E;E~HXNHǸH`MHXHHE![HpOxu p=vHXNHǸHHH H9rHH{HHpHHxu p=vHXNHǸH`HHHP{Zxu p=vHXNHǸpfEHMHHHzxtHXNHǸnH`HHHzxtHXNHǸ'pдEHMHHHPzZxu&hH`HHHz)xu,pHEHMHHHyHXOHǸvxuH`HHE2xupHEHXOHǸ$HEHh HEHMHHHMyWUHXHHPHPHEHMHHHyUHXHCHPHPHPPffZEHMHHHxxtHXNHǸ*pHH#qHUȋMHXH LHEHUHMHHH,x6UHHXHHHUHXHIEԋEԋU;E~HXNHǸuEԋU EPHHXH"EEUHXHHEHMHHHgwHHH H9rHHwHHHEiHCH#HEHX8OHǸEHEHE[HH?w HHĨ []UHATSHPH}HuHUHUHEHH8EHUHEHHEHUHEHHEHUEHHEHEH;EvuLW0D$dH$NA0NA>NdNAҿ HùPOdNHI"YA`cNHH1HMHUuHHEHUHEHH1}mHEIHܬLH衰HP[A\]UHHpH}HEHUHEHHHEHEHEHEHUHEHHHEHUHEHHEHEHEHEH9EGHE![ HXOHEH;EHtNHEHHEHH)HHpHUHEHH)HȉHEHEIhOHǸHEEE*HEH8LHEHHEHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸfHEfEE*HEHKHEHHEHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸͿHEҥfEE*HEHJHEHHETHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸ*HEEԋEHxH*HHH H*XHEHIJHEHHEHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸwHE谤EԋEHxH*HHH H*XHEHIHEHHEHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸ载HEHHEHH9HEHHEWHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸ-HEHHn HHEHH9HEHHEHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸ蒼HEHHEHEHUHEEHGHEHHEHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸHEEEZHEH/GHEHHEHUHEHHEԋEHxH*HHH H*XHEHF<HUHEHH)HHHMHEHHGHEHEHUHEHHeEHEUHHH;EHtXHEUHHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸ輺UHMHEHHnFHUEHHETHEHH;EHtRHEHHHEHH)HHpHUHEHH)HȉHEHEIhOHǸ*HEEHEHEEÉ8EHE:Et?}HEHEHHEHH)HUHEAAOHǸ躹EHxH*HHH H*XHEHDHEHHE=HMHUHEHHHE HEHEOHǸ?HEHEHEH;Ev ONOHEH;Et2HuHEHHEHH)HUHEI OHǸǸHEH0+EHDUHSH8H}H 0HEغOHH PH {0HEغOHHkHEؾH0H W0HEغ OHHOHEغ` O8OHCkHEؾHk0H 0HEغ@ OHHOHEغ O=NHkHEؾHHEؾH0H Ҹ0HEغ OHH0OHEMsHEHHEHHCuHEعHJcttVH0HEغHi=HUHH$IA@O.Nӿ肘HEHEHHGHEH/t O1NgO5HEH0H8[]UHHH}HuHUHEHHHEUHHH}HE@uHEHOUHHH}uHUHEHHVHEUHHH}HE@uHEHOUHH}HuHEHUHHHE@]UHH}HuHEHUHE@]UHH}HEH]ÐUHH H}HuHEHEHE OHAHE@PHxH*HHH H*XHEH@HEHUHE OHAHE@`HxH*HHH H*XHEH9@HEHkUHE OH-AHEH9DHEH8UHE& OH@HEfWH?HEHUHE5 OH@HEHIDE*EHEH?HEHDHE; OHn@HEH@XUHcHH@HEHaCHEH`THEB OH"@HEH@XUHcHHЋ@HHŀsHEHH?HEH THEG OH?HEHPCEqEHxH*HHH H*XHEHg>HEHBHEB OHV?HEH@XUHcHHHUHHЋ@tt+u9HEQ OH?8HEU OH>%HE[ OH>HE_ OH>HEHRHEg OH>HEH@XUHcHHHUHHЋHxH*HHH H*XHEHL=HEH~RHEHmREHEH@XUHcHHЋ@;EiHEH2RHEH!REUHE@T93HEHQHEo OH6HHEs OH=HEH%GHEH-HEHk\HEH?)UHHH}HuHE@`HxH*HHH H*XHEH;HUHEHHHEHQUHHH}HuHUHEHHqUHHH}HEo OH"GHE OH<HEH@HEHƿ3BdHEHPHEH+(HEH (t O O O)ÐUHHH}HuutHH@OH"uuE :kt H@xE9t kUHPxjHH@PsHJHt jHƒHn|HH@HPHHfWf.zfWf.t$Z f.wf.Z v{"u  jHHHjHH@ PsHRHt iHƒHv{HH@ HyHHu={u hiHH9tHH9u{"u ,it"HHH;t iHHhHH@@PsH2Ht hHƒHVzHH@ HxHHuzu HhHH9tHH9uy"u  hHHgHH@`PsH=Ht gHƒHayHH@HCHHfWf.zfWf.t$W f.wf.W vx"u gHHHfHH@PsHEHt fHƒHixHH@ HvHHu0xu [fHH9tHH9uw"u ft"HHH;t eHHeHH@PsH%Ht eHƒHIwHH@ HuHHuwu ;eHH9tHH9uv"u dt"HHH;t dHHdHH@PsHHt dHƒH)vHHHtHHHpHH@HtHH@HuHHHH@HcHHHccHH@PsHHt cHƒH9uHH@H{HHfWf.zfWf.t$S f.wf.wS vt"u bHHHbHH@QsHHt bHƒHAtHH@H#zHHfWf.zfWf.t$R f.wf.R vs"u at-Hf.z f.t aHHHaHH@ QsHHt laHƒHsHH@OHktpHH@OHjtTHH@OHjt8HH@OHjtHH@OHju EHH@OHpjtpHH@OHTjtTHH@OH8jt8HH@OHjtHH@OHjuE `t#HE9t _UH_HH@@QsH"Ht _HƒHFqHH@OH8itpHH@OHitTHH@OHit8HH@OHhtHH@OHhu EHH@OHhtpHH@OHhtTHH@OHkht8HH@OHOhtHH@OH3huE K^t#HE9t ^UH^HH@`QsHUHt ]HƒHyoHH@ HmHHu@ou k]HH9tHH9uo"u /]t"HHH;t ]HH\HH@QsH5Ht \HƒHYnHH@ HlHHu nu K\HH9tHH9um"u \t"HHH;t [HH[HH@QsHHt [HƒH9mHH@HsHHfWf.zfWf.t$K f.wf.wK vl"u ZHHHZHH@QsH.Ht ZHƒHAltUHH@HuHHHt(HHHH@HHlt ZHHHtHHHfHH@HtHH@HkHHHH@HYHHHYYHH@QsHHt LYHƒHjHH@ H@iHHuju XHH9tHH9u~j"u Xt"HHH;t ~XHH^XHH@RsHHt ,XHƒHiHH@ H hHHuiu WHH9tHH9u^i"u Wt"HHH;t ^WHH>WHH@ RsHHt  WHƒHhHH@OH`tpHH@OH`tTHH@OHm`t8HH@OHQ`tHH@OH5`u EHH@OH`tpHH@OH_tTHH@OH_t8HH@OH_tHH@OH_uE Ut#HE9t UUHqUHH@@RsHHt ?UHƒHfHH@ H3eHHufu THH9tHH9uqf"u THH|THH@`RsHHt JTHƒHeHH@HkHHxfWf.xzfWf.xt$AD f.xwxf./D vxe"u SHHxHSHH@RsHHt RSHƒHdHHHtHHH_HH@HtHH@HdHHHH@HRHHHRRHH@RsHHt aREHHHE EHEH}t HEHHuERt RHHHuo\HEHEHE7HHHgHEЋEHHHEHHEH}u QHHUH+EHHHEؾHYb[HHEHHEHHu 4QHEHHrttt t QHEHHEHUHHHH)HHyPHH@RsHHt PEHHHEHH@@cPEHEH}t HEHHuHH@@PẼ9t PHHHu-HH@@HHHgZHEHEHEPHH@@HHHHHHeHEEHHHEHHEH}u tOHHUHHH@@+EHHHEHVbYHHEHHEHHu OHEHHEppt pNHEHHEHUHHHH)HHHHH@@HH9`HHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHHHHH@@HHHHHHHHRRHcHHH__HH@OHQWtpHH@OH5WtTHH@OHWt8HH@OHVtHH@OHVu EHH@OHVtpHH@OHVtTHH@OHVt8HH@OHhVtHH@OHLVuE dLtAHHHH@@HHHH@E9t LHHHH@@HHHHUPKHH@SsH2Ht KEHHHEHH@@wKEHEH}t HEHHuHH@@PE9t )KHHHu-HH@@HHH{UHEHEHEPHH@@HHHHHH`HEEHHHEHHEH}u JHHUHHH@@+EHHHEHQbTHHEHHEHHu JHEHHYllt lIHEHHEHUHHHH)HHHHH@@HH9`HHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHHHHH@@HHHHHHHHRRHcHHHsZHH@ HXH`H`u:Zu eHHH9`tHH9`uY"u )Ht@HHHH@@HHHH@HH;`t GHHHH@@HHHHH`PGHH@@SsHHt rGEHHHEHH@@:GEHEH}t HEHHuHH@@PE9t FHHHu-HH@@HHH>QHEHEHEPHH@@HHHHHHl\HEEHHHEHHEH}u KFHHUHHH@@+EHHHEHMbPHHEHHEHHu EHEHH\\t \EHEHHEHUHHHH)HHHHH@@HH9`HHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHHHHH@@HHHHHHHHRRHcHHH6VHH@ HTHPHPuUu (DHH9PtHH9PuU"u Ct@HHHH@@HHHH@HH;Pt CHHHH@@HHHHHPPgCHH@SsH踻`Ht 4CEHHHxHH@@BEHxHxtHxHHuHH@@PE9t BHHHu6HH@@HHHLHxHxHpYHH@@HHHHHHXHpEHHHpHHxHpu AHHpHHH@@+EHHHxHYIqLHHxHHxHHu sAHxHH访LLt LGAHxHHxHxHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžlHHHH@@HHHHH@H`lH`H`tH`HHu؋l?t ?HHHH@@HHHHH@Hu!JH`H`HXaHHHH@@HHHHH@H6UHXlHHHXHH`HXu ?HHHH@@HHHHHXHP+lHHH`H^Fq "IHH`HH`HHu x>H`HHHHt HL>H`HH`H`HHHH@@HHHHH@HH)HHI=HH@SsH8! Ht =DžTHHHHHH@@w=THHHHtHHHHuHH@@PT9t =HHHu6HH@@HHHlGHHHHH@\HH@@HHHHHHRH@THHH@HHHH@u a<HH@HHH@@+THHHHHCqFHHHHHHHHu ;HHHH DDt D;HHHHHHHHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDž<HHHH@@HHHHH@H0HH@H@@k:<H0H0tH0HHuHH@H@@P<9Rt  :HHHH@@HHHHH@Hu:HH@H@@HHH:DH0H0H(~HH@H@@HHHHHH@@HHHHH@HH=OH(HHHHHHHu W(HHHHH@@+HHHH/q2HHHHHHu 'HHH44t 4'HHHHHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžHHHH@@HHHHH@HHH@H@@a&HHtHHHuHH@H@@P9Rt &HHHH@@HHHHH@Hu:HH@H@@HHH00HHH~HH@H@@HHHHHH@@HHHHH@HH3;HHHHHHHu %HHHH@@HHHHHHPHH@H@@+HHHHK,q /HHHHHHu e$HHH٢00t 09$HHHHHHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDžHHHH@@HHHHHPHH@H@@HHHHH@HHHtHHHu؋""t "HHHH@@HHHHHPHH@H@@HHHHH@Hu$;,HHHHHHH@@HHHHHPHH@H@@HHHHH@H67HHHHHHHu !HHHH@@HHHHHPHH@H@@HHHHHHP+HHHH<(q+HHHHHHu V HHH,,t ,* HHHHHHHH@@HHHHHHHH@H@@HHHHH@HH)HH'HH@TsHHt qDžHHHHH@@3HHtHHHuHH@@P9t HHHu6HH@@HHH()HHH\HH@@HHHHHHM4HHHHHHHu HHHHH@@+HHHH%qK(HHHHHHu HHHܛ((t (uHHHHHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžHHHH@@HHHHH@HHH@H@@'HHtHHHuHH@H@@P9Rt HHHH@@HHHHH@Hu:HH@H@@HHH%HHH~HH@H@@HHHHHH@@HHHHH@HH0HHHHHHHu HHHH@@HHHHHHPHH@H@@+HHHH"q $HHHHHHu +HHH蟘$$t $HHHHHHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDž|HHHH@@HHHHHPHH@H@@HHHHH@HpHH@H@H@@|HpHptHpHHuHH@H@H@@P|9t HHHH@@HHHHHPHH@H@@HHHHH@HuAHH@H@H@@HHH!HpHpHhHH@H@H@@HHHHHH@@HHHHHHHH@H@@HHHHH@HH,Hh|HHHhHHpHhu QHHHH@@HHHHHPHH@H@@HHHHHhHPHH@H@H@@+|HHHpHsq7 HHpHHpHHu HpHHQ t aHpHHpHpHHHH@@HHHHHHHH@H@@HHHHH@HH)HHHHH@H@H@@HH9HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHHHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHH%$HH@ Hr"HHu#u HH9tHH9u#"u HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHH@HH;t FHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHPHH@@UsHHt DždHHHXHH@@RdHXHXtHXHHuHH@@Pd9t HHHu6HH@@HHHGHXHXHP\HH@@HHHHHHl%HPdHHHPHHXHPu <HHPHHH@@+dHHHXHqjHHXHHXHHu HXHHt HXHHXHXHHHH)HHHHH@@HH9NHHHH@@HHHHt DžHHHH@@HHHHHHHHRRHcHHHDžLHHHH@@HHHHH@H@HH@H@@F LH@H@tH@HHuHH@H@@PL9Rt  HHHH@@HHHHH@Hu:HH@H@@HHHH@H@H8~HH@H@@HHHHHH@@HHHHH@HH"H8LHHH8HH@H8u  HHHH@@HHHHH8HPHH@H@@+LHHH@H0q HH@HH@HHu J H@HH辉t  H@HH@H@HHHH@@HHHHH@HH)HHHHH@H@@HH9,HHHH@@HHHHHPHH@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHDž4HHHH@@HHHHHPHH@H@@HHHHH@H(HH@H@H@@! 4H(H(tH(HHuHH@H@H@@P49t HHHH@@HHHHHPHH@H@@HHHHH@HuAHH@H@H@@HHHH(H(H HH@H@H@@HHHHHH@@HHHHHHHH@H@@HHHHH@HHH 4HHH HH(H u pHHHH@@HHHHHPHH@H@@HHHHH HPHH@H@H@@+4HHH(HqVHH(HH(HHu H(HHp t H(HH(H(HHHH@@HHHHHHHH@H@@HHHHH@HH)HHHHH@H@H@@HH9HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHt DžHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHHHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHHHHRRHcHHHHJHHRHRRHcHHHHJHHRHRHRRHcHHHD%HH@Hu}HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHPHH@HHt HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@Ht|HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@H HHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHHH@HtHH@HHCHH@HHHHH@@HHHHHPHH@H@@HHHHHPHH@H@H@@HHHHH@Hu#!H@t H[]UHSH(H}EH;0 s}tNH)0 sHH0HH)HHH0 OHHǸ^HHH0Hۭ0HEH sHH0HH)HHH0HѺOHǸ HHH0HE؋@xTH{0HE؋P sHHa0HH)HHHN0ѺOHǸHHH.0EHEH@HEH} sH([]UHH@H}HuUHMLELMHEHE(UHMHEHH{}E} EHhOH}HEЋPHEЉHEH@HH‹EOǸ/H}HEPHEkHEH@HH‹E OǸ/H}<HEȋPHEȉ(HEH@HH‹E(OǸJ/H}HEȋPHEȉHEH@HMH‹EPOǸ/H}HEȋPHEȉHEH@HH‹ExOǸ.H}sHEȋPHEȉ_HEH@HH‹EOǸx.H}0HEȋPHEȉHEH@H{H‹EOǸ2.H}HEȋPHEȉHEH@H5H‹EOǸ-H}HEȋPHEȉHEH@HH‹EOǸ-H}tkHEȋPHEȉZHEH@HH‹EHOǸg-H}t/HEȋPHEȉ HEH@ HEH}HUHEHH,UHH@H}HuUHMLELMHUHEHHVHEH}t HEH}t HEH}t HEH}uEt6LEH}HMЋUHuHEMIHHEH9H UHH@H}HuUHMLELMHUHEHHHEH}t HEH}t HEH}t HEH}uEt6LEH}HMЋUHuHEMIHHEHrHDUHHHEH}uHEHHEUHH H}HuHUHEHHE1"HOHEH@HtHEH@H HUHHEHHu7HEH@Ht*HEHwO*"HusernameH0 0HEsw"HHEHHEHHu*HEHO!*-"HE@tOOHUHHH Hlocal_hoHh0Ht_standbH_0f^0yHEs!HEH@HtHEH@H HUHHEHHu7HEH@Ht*HEH*OJ)V!Hbind_ipaH00ddrHEs'!HHEHHEHHu*HEHO( HE@ tOOHUHHH HcoredumpH00HEs HHEHHEHHu*HEHO1(= HEP$HEHOHǸCHadmin_poH0f0rt|0HEs tHHEHHEHHu*HEHrO'HEP(HEHOHǸHreplicatH0Hion_portHڃ0ۃ0HEsA HHEHHEHHu*HEHO&HEP,HEHOHǸHlog_leveH<0f;0lHEs 5HHEHHEHHu*HEH3OS&_HEH@0HUHHEEOH׸[Hslab_allH0Hoc_arenaH00HE s HHEHHEHHu*HEHO%HEP8HEHOHǸHslab_allH0Hoc_minimH0f0al0HE sH HHEHHEHHu*HEHO$HEH@@HUHHEEOH׸Hslab_allH90Hoc_factoH00f/0rHE sHEH@HHtHEH@HHnHUHHEHHu7HEH@HHt*HEHO$'Hwork_dirH00HE sHEH@PHtHEH@PHHUHHEHHu7HEH@PHt*HEHaO#Hsnap_dirH00HE saHEH@XHtHEH@XH:HUHHEHHu7HEH@XHt*HEHO"Hwal_dirHX0HEsHEH@`HtHEH@`HHUHHEHHu7HEH@`Ht*HEH4OT"`Hscript_dH~0f~0ir~0HEs+HEH@hHtHEH@hHHUHHEHHu7HEH@hHt*HEHO!Hpid_fileH"~0#~0HEsHEH@pHtHEH@pHjHUHHEHHu7HEH@pHt*HEHO!#}0loggf}0er}0HEsHHEHHEHHu*HEHO HE@xtOOHUHHHwHlogger_nH|0HonblockH|0HEsK HHEHHEHHu*HEHOHEHHUHHEEOH׸Hio_colleH9|0Hct_interH0|0.|0valHEs HHEHHEHHu*HEHO>JHEHEHOHǸMHbacklogH{0HEs HHEHHEHHu*HEHOHEHEHOHǸHreadaheaHz0fz0dHEsg HHEHHEHHu*HEHOHEHHUHHEEOH׸Hsnap_io_HUz0Hrate_limHLz0fKz0itFz0HEs 6HHEHHEHHu*HEH4OT`HEHEHOHǸcHrows_perHy0y0_waly0HEs HHEHHEHHu*HEHOHEHEHOHǸHwal_writHx0Her_inboxHx0x0_sizfx0eHEsQHEHHtHEHH$HUHHEHHu:HEHHt*HEHOHwal_modeH?x0@x0HEs :HHEHHEHHu*HEH8OXdHEHHUHHEEOH׸]Hwal_fsynHw0Hc_delayHw0HEs HHEHHEHHu*HEHOHEHHUHHEEOH׸Hwal_dir_Hv0Hrescan_dHv0v0elayv0HEsCHHEHHEHHu*HEHOHEtOOHUHHHHpanic_onH1v0H_snap_erH(v0&v0rorHEsHHEHHEHHu*HEHO6BHEtOOHUHHH Hpanic_onHzu0H_wal_errHqu0fpu0orku0HEs [HHEHHEHHu*HEHYOyHEHEHOHǸHprimary_Ht0t0portt0HEs, HHEHHEHHu*HEHOHEHEHOHǸHsecondarH$t0"t0y_poft0rtt0HEs HHEHHEHHu*HEH O*6HEHHUHHEEOH׸/Htoo_longHns0H_threshoHes0fds0ld_s0HE sHEHHtHEHHHUHHEHHu:HEHHt*HEH O@LHcustom_pHr0Hroc_titlHr0fr0eHE!s  HHEHHEHHu*HEHO HEHEHOHǸHmemcacheHr0r0d_pofq0rtq0HE"sa HHEHHEHHu*HEHO  HEHEHOHǸHmemcacheHYq0Hd_spaceHPq0HE#s JHHEHHEHHu*HEHHOht HEtOOHUHHH=HmemcacheHp0Hd_expireHp0p0HE$s HHEHHEHHu*HEHO HEHEHOHǸHmemcacheHp0Hd_expireHo0H_per_looHo0fo0pHE%sM HHEHHEHHu*HEHO HEHHUHHEEOH׸HmemcacheH;o0Hd_expireH2o0H_full_swH)o0'o0eepHE&s HEHHtHEHHXHUHHEHHu:HEHHt*HEHO HreplicatHsn0Hion_sourHjn0fin0cedn0HE's HE'HEHHo HEHHE@HHHHHH HE' 5 HpOHHEHHEHHu*HEHO HEHHE@HHHH@HEHHE@HHHHHPHE@HHHHHHE@PHEPHEHHt'HEHHE@HHHHHEH-UHH}HuHEHEHEHHHE@HEHHE@HHHHHUHHURHcHHHHEHHE@HHHHH@H.HE@HEHHE@HHHHHPHE@HHHHHUHHURHcHHHHJHURHcHHHHEHHE@HHHHHPHE@HHHHH@HHE@ HEHHE@HHHHHPHE@HHHHHPHE@ HHHHHUHHURHcHHHHJHURHcHHHHJHUR HcHHHHE@ PHEP HEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHE@PHEPHEHHE@HHHHHPHE@HHHHHHE@PHEPHEHHE@HHHHH*]UHSHH(H H0HXH(H@HtH(H@HH H@HtH H@HH(HBH H@HtH(H@Hu B H PH(PH(H@HtH(H@H9H H@HtH H@HVH(HBH H@HtH(H@Hu H P H(P H P$H(P$H P(H(P(H P,H(P,H H@0H(HB0H P8H(P8H H@@H(HB@H(H@HHtH(H@HH&H H@HHtH H@HHCH(HBHH H@HHtH(H@HHu H(H@PHtH(H@PHH H@PHtH H@PHH(HBPH H@PHtH(H@PHu H(H@XHtH(H@XH"H H@XHtH H@XH?H(HBXH H@XHtH(H@XHu H(H@`HtH(H@`HH H@`HtH H@`HH(HB`H H@`HtH(H@`Hu H(H@hHtH(H@hHH H@hHtH H@hH;H(HBhH H@hHtH(H@hHu H(H@pHtH(H@pHH H@pHtH H@pHH(HBpH H@pHtH(H@pHu H PxH(PxH HH(HH H(H H(H HH(HH H(H H(H(HHtH(HH_H HHtH HHvH(HH HHtH(HHu H HH(HH HH(HH H(H H(H H(H H(H HH(HH(HHtH(HH H HHtH HH!H(HH HHtH(HHu mH H(H H(H H(H H(H HH(HH(HHtH(HHH HHtH HHH(HH HHtH(HHu QH(HǀH HH#HX@EH(HHE EHEH}t HEHHuEH(HHuHEHEHE7H(HH HE؋EHHHEHHEH}u aH(HUH+EHHHEHkb/HHEHHEHHu HEHH?TTt THEHHEHUH(HHH)HHykEH(HHEHX@jEHEH}t HEHHuHX@PEԃ9tH(HHu)HX@HHHHEHEHELHX@HHH(HHHFHEEHHHEHHEH}u H(HUHHX@+EHHHEȾHb`HHEHHEHHu 1HEHH=PPt PHEHHEHUH(HHH)HHHHX@HH9dH(HHX@HHHHH HHXRHcHHHH(HHX@HHHHH HHXRHcHHHRPH(HHX@HHHHH HHXRHcHHHRPH(HHX@HHHHH HHXRHcHHHRPH(HHX@HHHHH@H HHX@HHHHH@HHX@EH(HHX@HHHHH@HE EHEH}t HEHHuE$H(HHX@HHHHH@HuHEHEHEQH(HHX@HHHHH@HHEEHHHEHHEH}u H(HHX@HHHHHUHP+EHHHEHb HHEHHEHHu HEHH:LLt LmHEHHEHUH(HHX@HHHHH@HH)HH_EH(HHX@HHHHH@HEHX@EHEH}t HEHHuHX@PE9H(HHX@HHHHH@Hu)HX@HHH\HEHEHEfHX@HHH(HHX@HHHHH@HHtHEEHHHEHHEH}u H(HHX@HHHHHUHPHX@+EHHHEHb tHHEHHEHHu EHEHHG8HHt HHEHHEHUH(HHX@HHHHH@HH)HHHHX@HH9JH(HHX@HHHHHPHX@HHHHH HHXRHcHHHHJHXRHcHHHH(HHX@HHHHHPHX@HHHHH@HtJH(HHX@HHHHHPHX@HHHHH@HH(HHX@HHHHHPHX@HHHHH HHX@HHHHHPHX@HHHHH@HtLH HHX@HHHHHPHX@HHHHH@HEHCH HHX@HHHHHPHX@HHHHH@HtQH(HHX@HHHHHPHX@HHHHH@Hu 3 H(HHX@HHHHHPHX@HHHHH HHXRHcHHHHJHXRHcHHHRPH(HHX@HHHHHPHX@HHHHH@H HHX@HHHHHPHX@HHHHH@Hp HX@ EH(HHX@HHHHHPHX@HHHHH@HE EHEH}t HEHHuE H(HHX@HHHHHPHX@HHHHH@HuSHEHEHxqH(HHX@HHHHHPHX@HHHHH@HcHxEHHHxHHEHxu  H(HHX@HHHHHPHX@HHHHHxHP+EHHHEH聻bEHHEHHEHHu  HEHHh2DDt DHEHHEHUH(HHX@HHHHHHHX@HHHHH@HH)HHEqDžtH(HHX@HHHHHPHX@HHHHH@HhHX@ tHhHhtHhHHuHX@ Pt9zH(HHX@HHHHHPHX@HHHHH@Hu5HX@ HHHyHhHhH`HX@ HHH(HHX@HHHHHHHX@HHHHH@HHkH`tHHH`HHhH`u H(HHX@HHHHHPHX@HHHHH`HPHX@ +tHHHhHuq9HHhHHhHHu HhHHS/@@t @HhHHhHhH(HHX@HHHHHHHX@HHHHH@HH)HHHHX@ HH9H(HHX@HHHHHPHX@HHHHHPHX@ HHHHH HHXRHcHHHHJHXRHcHHHHJHXR HcHHHH(HHX@HHHHHPHX@HHHHHPHX@ HHHHH HHXRHcHHHHJHXRHcHHHHJHXR HcHHHRPH(HHX@HHHHHPHX@HHHHHPHX@ HHHHH@HtdH(HHX@HHHHHPHX@HHHHHPHX@ HHHHH@HKH(HHX@HHHHHPHX@HHHHHPHX@ HHHHH HHX@HHHHHPHX@HHHHHPHX@ HHHHH@HtfH HHX@HHHHHPHX@HHHHHPHX@ HHHHH@HnHCH HHX@HHHHHPHX@HHHHHPHX@ HHHHH@HtkH(HHX@HHHHHPHX@HHHHHPHX@ HHHHH@Hu (HX@ PHXP H HHX@HHHHHPHX@HHHHHPHX@ HHHHH-HX@PHXPH HHX@HHHHHPHX@HHHHH2HX@PHXPH HHX@HHHHHgH[]UHH0H}HEHEHEH@HtHEH@HHEH@HtHEH@H׶HEH@HHtHEH@HH躶HEH@PHtHEH@PH蝶HEH@XHtHEH@XH耶HEH@`HtHEH@`HcHEH@hHtHEH@hHFHEH@pHtHEH@pH)HEHHtHEHHHEHHtHEHHHEHHtHEHHHEHHHE@HEHHE@HHHHH@H?HE@HEHHE@HHHHHPHE@HHHHH@HtAHEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHH@HHE@ HEHHE@HHHHHPHE@HHHHHPHE@ HHHHH@HtXHEHHE@HHHHHPHE@HHHHHPHE@ HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHH菳HE@ PHEP HEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHH諲HE@PHEPHEHHE@HHHHHPHE@HHHHHHEHHE@HHHHH@H2HEHHE@HHHHH HE@PHEPHEHHE@HHHHH8HEHHUHHH}HuH}tH}u&HEH;EtH}uHUHEHH8UHHPH}HuUHEHEHEHEHEHPHEH@HHit%Hc->usernH00amesHEPHE@8t=Hc->localH0H_hot_staH00ndby0s}HEHPHEH@HHt5Hc->bind_H>0<0ipadf70dr20s)HEP HE@ 8t%Hc->coredH00umpsHEȋP$HE@$9t.Hc->adminH00_porf0tsHEȋP(HE@(9t6Hc->repliH~0Hcation_pHu0s0ortsh}u>HEȋP,HE@,9t,Hc->log_lH00.0evel+0s$HE@0HEH0f.zf.t6Hc->slab_H0Halloc_arH00enasHEȋP8HE@89t?Hc->slab_H0Halloc_miH00nimaf0lsHE@@HEH@f.zf.t=Hc->slab_HA0Halloc_faH8060ctor30s$HEHPHHEH@HHH{t%Hc->work_H00dirsHEHPPHEH@PHH7t%Hc->snap_H00dirsHEHPXHEH@XHHt+Hc->wal_dH]0f\0irW0sRHEHP`HEH@`HHt.Hc->scripH00t_dif 0rsHEHPhHEH@hHH\t%Hc->pid_fH00ilesHEHPpHEH@pHHt$Hc->loggeH0f0rs~HEPxHE@x8tloggeHJ0Hr_nonbloHA0f@0ck;0s.}ujHEHEf.zf.tFHc->io_coH 0Hllect_inH 0 0tervf 0al 0sHEȋHE9t+Hc->backlH 0f 0og 0s{}uDHEȋHE9t,Hc->readaH= 0; 0head8 0s1}ucHEHEf.zf.t?Hc->snap_H 0Hio_rate_H 0 0limif 0tsHEȋHE9t,Hc->rows_H 0Hper_walH 0sHEȋHE9tDHc->wal_wHL 0Hriter_inHC 0Hbox_sizeH: 0; 0s(}uJHEHHEHHHst%Hc->wal_mH 0 0odes}u`HEHEf.zf.twal_fH 0Hsync_delH 0f 0ay 0srHEHEf.zf.t=Hc->wal_dH. 0Hir_rescaH% 0Hn_delayH 0sHEHE8tFHc->panicH 0H_on_snapH 0 0_errf 0or 0sHEHE8t?Hc->panicHw 0H_on_wal_Hn 0l 0errofg 0rsXHEȋHE9t,Hc->primaH 0Hry_portH 0sHEȋHE9t5Hc->seconH 0Hdary_porH 0f 0ts}ucHEHEf.zf.t?Hc->too_lH} 0Hong_threHt 0r 0sholfm 0ds^HEHHEHHHt=Hc->custoH 0Hm_proc_tH 0 0itle 0sHEȋHE9t5Hc->memcaH0Hched_porH0f0tsHEȋHE9tmemcaHw0Hched_spaHn0fm0ceh0s[HEHE8t6Hc->memcaH!0Hched_expH00ires }ufHEȋHE9tNHc->memcaH0Hched_expH0Hire_per_H00loop0s }u{HEHEf.zf.tWHc->memcaHU0Hched_expHL0Hire_fullHC0A0_swef<0ep70s }udHEHHEHHHit?Hc->repliH0Hcation_sH00ourcf0es HE@HE@m HEHHE@HHHHPHEHHE@HHHH@8t6Hc->spaceH10H[]->enabH(0&0leds HEHHE@HHHHPHEHHE@HHHH@9t=Hc->spaceH0H[]->cardH0HinalityH0s HEHHE@HHHHPHEHHE@HHHH@9tMHc->spaceH20H[]->estiH)0Hmated_roH 0f0ws0s HE@HE@bHEHHE@HHHHHPHE@HHHHHPHEHHE@HHHHHHHE@HHHHH@HHtFHc->spaceHI0H[]->indeH@0Hx[]->typH70f60es# HEHHE@HHHHHPHE@HHHHPHEHHE@HHHHHHHE@HHHH@8tGHc->spaceH0H[]->indeH0Hx[]->uniH{0y0quesf HE@ HE@ CHEHHE@HHHHHPHE@HHHHHPHE@ HHHHPHEHHE@HHHHHHHE@HHHHHHHE@ HHHH@9thHc->spaceH0H[]->indeH0Hx[]->keyHw0H_field[]Hn0H->fieldnHe0fd0osAHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHPHEHHE@HHHHHHHE@HHHHHHHE@ HHHHH@HHthHc->spaceHr0H[]->indeHi0Hx[]->keyH`0H_field[]HW0U0->tyfP0peK0s*HE@ PHEP HE@ PHEP HEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHEHHE@HHHHHPHE@HHHHH@HtUHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHHEHHE@HHHHHPHE@HHHHHPHEHHE@HHHHHHHE@HHHHH@H9uBHEHHE@HHHHHPHE@HHHHH@H{HEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHuQHEHHE@HHHHHPHE@HHHHHPHE@ HHHHHtUHc->spaceH/H[]->indeH/Hx[]->keyH/H_field[]H//sHE@PHEPHE@PHEPHEHHE@HHHHH@HHEHHE@HHHHHPHE@HHHHHteHEHHE@HHHHH@Ht>HEHHE@HHHHHPHE@HHHHHHEHHE@HHHHHPHEHHE@HHHHH@H9u+HEHHE@HHHHH@HHEHHE@HHHHH@HHEHHE@HHHHH@HttHEHHE@HHHHHPHE@HHHHHu:HEHHE@HHHHHPHE@HHHHHt6Hc->spaceHd/H[]->indeH[/Y/x[]sNHE@PHEPHE@PHEPHEHHtZHEHHE@HHHHHt7HEHHt'HEHHE@HHHHH)HEHHEHH9uHEHHHEHHtVHEHHtFHEHHE@HHHHHu#HEHHE@HHHHHt(Hc->spaceH /f /[]/sÐUHHA0HEE]UHH}EMUHH}EUH(]UHH}HEHUHPHEHUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH\UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHHH}HEHUHH@H}EH/dHHPHHEHHHEHEHEHQHEHEHHHEHѧ/dHH9EHEHEE^ \EMf(\f(EfWf.Er)H/dHHHH*n EfWf.QUHHH}H HUHEEHUHHH}HEHttHEHUHH0H}HEH'HEHEHHHEH/dHH9Et`O OkO4HEHHHHEHt(HEHHEHEHHHEHEHYUHHH}HuHEHE@9v@O9xOO諑HEHEHHE@H9HtHUHEHHUHH H}HuHUHEHPHEHH`HEHPHEH HUHEHH辞HEHEHEHEHPHEHUHHH}HEHHƿXst)HEHH¾OøUHSHHHHPHXL`Lht#)p)M)U)])e)m)u)}H8HpH8HpHH DžDž 0HEHH@HH H8HH)HHHH8H8HPHH8mU0eU0qU0T0T0HH0HDž@OHDžHOHDžPOHDžXOHDž`OHDžhH@H(rH0tUH0H(HH H8HH)HHH8AHѺ OHǸҌHH8H(H0H(HHvHpHǸqY HSH[]UHH0H}؉uHW0H螻H S0HtHS0OH諙HEHR0OH葙HEH}u(HR0H¾OLEH}HMUHuHEMIHɈEHEH躗}t HEH躭t~EtpEu%H"R0H¾-O_DHEH4t(HEH讃t HEH輘H֙UHH@H}HuHEHHEHHHӌu.HEHEf.zf.u HEHHEHEHHEHHHqHEHKOHQtHEHKOH5uXO!HLĵ/HEHHEHHT$H$AOA}OOAHEHOH譋t HEHEf.Ezf.EtPL7/HEHHUHUMHEEAOAOOAHEHH0HEHEEHHdHEHHʽ0HEEHeHEHHEE蝣ÐUHHH}HEHHXHEH@HHHS0t,HS0HS0HHHEH@HHHHuP0HUHSHxHHQP0Hu*HS0HH1P0H*P0HHP0HtFOH$S0HS0HHHHH+HHEHHEHHEHHUH$HUHT$HUHT$HHH`HHQH`sHuHHtt HHuHH_tt HHHHHEH}t"HEH¾XOzuHHƿ`sWtQHHƿ`st-HHƿ`sH4N0`sH6MHHMHHH7HH蘔Hx[]UHH0H}HEؾOHǸ %HEOHEHt,HMHUHEؾOHǸڵHEH.HUHEؾOHǸ貵HUHE`sHHEH}uHUH帩O]UHH L0\EHEHEEUHSHL0t sבE}y>H_/蒎)AOHGOӸ}~FEQL0ERE:L0E E%cHM/dHOHWGƿOP /ƿ5H03@BHu聅H臒H[]UHHH}uK0t+L H/AOkOACOWHǸJUHHH}uUHH\E%K0t\EOǸ|J0\ uE7OǸ\EKOǸҋEbOǸqExOǸ]DH`H;H`HHxHDž`H`HƿςHUHHHJ0Ht?E)H I0EHcHHHHHHE}uUHSH(HPH|HPHH蹎HDžPHPHƿ UHPHƿ3txHPHƿtZHPHƿtH/4ˇAOHOHH([]UHSHHPHHDžPHPHHHPHƿ 蛇t>HR/腉A OHOӿG#HDžP=CHPHƿ /tHPHƿut>H/臆A OHOӿG莀H/J0HMHF0HF0Hz~HF0HF0@@HyF0@HkF0H@CH\F0@( HNF0HiH?F0HP0H4F0H0@@HF0H0@H F0H0H@"CHE0H0@(HE0H0HHE0HP`HE0H`@@HE0H`@HE0H`H@"CHE0H`@(HzE0H`HHgE0HHYE0H@@H@E0H@H,E0HH@"CHE0H@(HE0HHYC軭 C_ E}t5L/E$AOA#OOA҃}t!OO/OZ~HBHĸ[]UHATSH HEHEHC0HHC06OH虉HEH}u>Hϧ/虃A9OH Oӿ}HEH{t>Hr/襅HtHEteHEк H蔃E}~E茂ut3L /AyOOAѿ|L /AOOAHEHVzt>H>/qAPOHOӿ|HEHy观tHHޥ/L%wA0 衁MAOHOӿ{}A0A0HEOHǸ>HEH貅HxH [A\]UH赆tDt B{yu)yyyz]UHHYA0HtHMA0H=H:A0]UH\UL6H?0HtH?0H}H@0HtH@0H7H?0?0H։D H@0HtT|@09utH?0H{`sREp]UHSHH@HEEt>Hգ/AOHqOӿyQH[]UHH}Hu]UHATSHĀ}HuHE4^HEHHEHUH։? HEEI>0HEH6>0Hע/HMHEHH$,HEHEH5?0HEHH=0HEVH4HHƿOvO OuvOOavOOMvOqO9vOCO%vB HEhH3HtlXOwHEHH{HƿOuOkwH/Hd5ORwOHwO>w HE scH3H<0HO߂t Hk<0Of&O躂t HF<0&OALE/H$&OAOA8OOAҿwHEvH2X<0HcHЉL<0Et(H/H5XOڂ@vH;0H[/~%|AOHOӿG,vH5;0HHEH¸HMHHHHHf/H:0H:0HHN|H?0HHP?0HI?0HuOOOuHEkH>1H`su`s.ttNLD/H>0H@H>0H$AAOOAҸ`sCu`sttNL/HD>0H@H9>0H$AAOOAҿ|tHUHEgHX0H"qHENHUHEHH}u+HEHt"HEHsHEH&wHEHwHUHE`sHpHEH}uHB90HtH690H6qut>H/L% 90{UyMAOHOH80H|t uu:X{HS80HHEH}*{t@H/L%80{xMAOHO3L/H70IAOOAҿCwrHEЋ@Ix$HEЋ@txHEЋ@ottqH"/UzwAOH OӿGqL/H70IAO OA 70-HEHEHEHƿyt>Hz/yDwA1OHOӿGKqHEHEHEHƿBut>H/OyvA;OHOӿGpAqt>H/x}vAEOHOӿGpHEIH,HtANWHc0HfGHO0CHz(pHEBH+HtFH50Hu3L /APO.OAѿokH50Hu'HW90HuH40H40QH50HrHPH90HH=Hk40Hd40f@HP50HQ40HHu40:`C3 蕖F7fHs40e40Hc R40R` Yf.N` sH, =` \H,HH1HUEHH -H40}4C莝 40H30H$H40`sH3=40 340H30H30Hq30HAq30HZ30HkfHd40Hn8H]/dHH@(H诩LΗ/,30AAOlOAL /AOmOA*30fWf.vH30HEEhɣ5EHEH301L (/AOxOAѸ}sqHwHdHt\HxHEHEHHHHUHL/AOAOuOAҿlHyH[A\]UHHH}HEHuH3HEÐUHHH}HE@uHEHUHH}HuHEHUH HHJHHHRHPHE@]ÐUHH}HEH@]UHH0HEE]UH}EUHHHHHXs ]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HEH@]UHH}HEH@]UHHH}HEH@(HtHEH@(Hǭ!OUHH}uHEUP4]UHHH}HuHEHH}tHUHEHH HEHTHEH)UHH H}HuHEHHEHHEHHEHEHH}tHUHEHHHu"HEHHttAH /HEHIA"O+8"OHEHeHgHX[]UHH H}!H o/dHHEEE&}Et8HEHHEHUHEHH>HEH}uUHH H}HEHuHEHttHE"OHǸixHEHtHE#OHǸCxIC@#O%,HEHn/dHP4HEHHE@xƒ HEPxHUHEHHHEH, HEHEHhHMHEHHHUHEHHOUHH0H}HEؾHHEHE@0uHEؾH#OHǸYwHUHEHHHEH}uHEؾp#OHǸ%wHEH\E}~UHMHEHH HUHEHHHE@0EHEHHEHK$HEP0E9t+O8"O#OHEHHEH EHEHHEHEUHMHEHHi}t8HUHEHH}uHEHzHEHǸ EÐUHHH}HEPHEHH,UHSHHH}HE0s$HEHPHEHHUJHU HEHPHHJHUHJEHE0s$HEHPHEHHUJHU HEHPHHJHUHJHHEHEHEEEHEHWHHEHn HEH)HkaHH[aHHKaHHtHtVH bHEHEHVHaHEHEHHHHUHHEHg`HaHEHHEH^HtAH/HEH7IA"O8"OHEHT`HZbHH[]UHH0H}HEH~HEؾHttHEؾ#OHǸesC@#OB'HEHE@xƒHEPxHEHxHEHEؾH(EHEHMHMHEHHHUMHEHǸHE@0tHUHEHHj HEHUHH H}7Hh/dHHEHHHtH]h/dHH_N-HEH HEHEHHEHHEHOUHH H}HuHg/dHHE)HEHHEHEH;Eu0HEHEHUHEHHHEH}uUHH H}HEHtHEH HVg/dHHEHE@0u HE#ODH2g/dHH9Eu HE#O)HUHEHH t HE#OHE#OHUHEHHZUHH0H}Hf/dHHEEHEH~HEؾH HttHEؾHHEEHEH;Et4MHEغHYHEHUHEHH##HEHgHHEHHwUHH H}HEHtHEHttHE#OHǸoHEHCEHEHE'HEHEE UHHH}HBe/dHHEHHUHH H}HEHEEKHEH}tHUHEHH HEH UHH H}HEHHEHE@xuHE $OHǸnHEHtUHHH}HEHtHEX$OHǸFn>UHHH}u}yHEH\‹EЃEHEz$OHUHEHHEH?UHEHMHEHUHH@H}HuHEHEEUHEȉH HEH@UHcHHHЋHEUHEȉHHEHEHQEHE@ t uEEEEU܉)HUHEHщ$OHǸ|*UHEȉHsHHE$OHǸ|EE;EUHH0H}HuHEHEEUHE؉H} HEH@UHcHHHЋHEUHE؉HHEHEHPEHE@f uEEU)HUHEHщ$OHǸ{*UHE؉H[HHEо"OHǸ{EE;EUHSH(H}HEHHEؾH>HEؾHHEHEؾHjH}tgHUHEHH~HEv!HEHnHUH< tt}HE辛$OHǸzeH`/dHH@(HOvHEHUHEHHHu/HEHIA"O8"OӸH([]UHSH(H}HEH`HHEغHwHEؾHHEؾHHEHHRVHHWXH?VHHDXH,VHH1XHtHtXgHVHEHEؾHHEؾHHEHHHEHHURHVHE,KHVHEؾHbHEؾHHEؾHlUH([]UHH H}HEHtHE辠$OHǸhHEHHEHUHEHHuUHH H}HuHUHUHEHH"HEHHE$OH, HUHEHHHE$OH HUHEHHEH0UHH H}HE+O$OHEEHcHHHHHXsHHEHE$OHOHufHE$OHNHuPEHxH*HHH H*XHEH~HUHEH E}9PHEH?UHHHH`HhLpLxt )E)M)U)])e)m)u)}HDž(Dž,0HEH0HPH8DžLVH@tGLHHH)ƋLHH H<H@H$OEL(0s#H8(HЋ((H0HHH0HH@H@JH$OHyHHH^HHLHcҹHH)֋LHcH H<H"ODHHZH HHHZHHHHHHISUHH0H}HEؾ%OHǸtWsHEHEH HEHEHHEHPHEؾ %OHǸtHEH@Ht'HEؾ(%OHǸ^tHEH@HUHHEؾ1%OHǸ7tHEH H+HEHEH HEHEH H=WsXUHSH8H}HuHEо5%OH:KHLo/HEIA9%O8"OAHEоH0OHEH}u=Hn/9IHUH$IAL%O8"OHEe%OHwOHEH}uALmn/HEIAx%O8"OAHEHIHEtCL!n/HEHUD$$IA%O8"OAtHEH HƿWs3HEH@HtHEH@HUHLm/HE@HUHR$IA%O8"OAH8[]UHH0H}HuH}HEHEHFHEH}HE@<u~HEHHHUHE%OHǸKHEHu2Ll/HEIA&O8"OA"HUHEHH`HEHEHEHPHEH}UHEHM HwOUHH0H}HEHE0&OHEHEHHGHEHӣHEHHEHHEH([]UHHH}HEH UHSH8H}HuHR/dHH@(HgHEHUHEHѺ&O&OHǸ%lHEHmHHEHH{E}t2HEȾH HUHEHHb{E}t]HEȺHHGHHIHGHHIHtHtJHHHE5=HHHEHEHHHEHHsG{HTHjGdH8[]UHH H}HuHE&OHHUHEHH HEH]HEHE}tUHH0H}HuHUHUHEHHHUHEHHEHEH}teHEH0HEH}tHEi&OHEHuHE&O&OHaHHE&OHǸiHUHEHHHEHUHH H}HE&OHCtHE&OHCuEHE0 v,HUHEHHHEHEHEHEUHSHX HHHHHHQ 7HEH&OHX HEHHEHt&Oi&OHEHE.HvAHu>HuH}HMHUHII'OHǸHH& HEH<HUHHEHH6HEH}BH'OH HH HHHHHH]wu"HHattNHb/HH}IA"O8"Oӿ8HH\HH覦H!OHHb(OH9HHHHu)HHdttDHa/HHIA(O8"OHHiHDHX []UHSH(HH0s0HHPHHHJH HHPHHJHHJHHEH/HA(OHѺ%OHǸ#5HHBL`/HIA(O8"OAHHEHHtKHa`/HEHIA"O8"Oӿ%6HEHHCH([]UHSH(H}HEؾ(OHE}tKH_/HEغHiIA"O8"Oӿ5H([]UHH H}辪C(OHEHUHEHHǸH/HAUHH H}HuHEHEHUHEHHfÐUHH}HEH]ÐUHH!~0HEE]UHHH}HEH@(HtHEH@(Hsw+OUH}}w7EHŠ+OF(E!CWI D_]UHATSHH/bin/shHEfE-cEHDžHDžHDžHDžHEHHEHH/HHEH/H74H`/HH H?H HE}u9H\/;8A&,OHj+O'}ucH Hƿ8E>1E0@4HHUHHHC9HEHEHUH H:H Hƿ8E0Ev/Eg/E[/E%/ [/[/tk[/&RHq[/L%/947MA+,OH+Oӿ2H>>H[A\]UHATSH}HuUHxLpLhHEHEZ/H/Ho/B,OHǸu=HV/HhHpHH%3Hxt H,/HxG,OHǸ+=H /Hƿ G3 fHEHE+HEH2/XA.OH-Oӿ_E}u>HB2/u A!.OH-Oӿ}t,EE//b<rE EyHH[]UHHH}u}t3UHEAA&DH¾&.Osxs&zUHH0H}uHU؋Ea0HEH}u EcEHHHEHPHE@HEPHEHE@HEH@'DU/HEP(HE@,HEH??UHSHHhdHhH@EHEEHEHEHEHp8HfHDžpDžxHEHEHEHEHEHEHEHvHEHEHEHHE@HE@ HEHPET/HpHΉ H?t4H// a A2.OH-OHhHz?HhHdE HPHĘ[]UHSH,H%/HEHѺ:.OHǸ?Hh/dHHUHHHEHǸ ,\/H0HH0HH HDž0-DH0Hƿ t)/EAA.O-OAҸH([]UHSHEH`H` H`HLH`H8UH`H$J/HH`Hƿt9Hs(/=A.OH-OOL0(//U$AA.O-OAҋEƿL '/A/O -OAQHUH`HHg EtDE;Et+Et00O-O)/O|JE/upH`HH`Ht9H`HH`HHUH`HH HHƿt6H&/A.OH%-O}uE H HĨ[]UHSH(H}؉uHEH@EHuE\E}t}y?hhu3L "&/A@/O<-OAѿ}y4H%/Av/OH@-OӿHUHSHHH}HuUHEȉEEHEzHUHMEHΉiHEH}yJ teHS%/A{/OHS-Oӿ$HEH)EHEHEH}v4L $/A@/O[-OAѿHH[]UHSH8EHUHMHΉHEH\bHHEHѺ/OHǸH/dHHUHHlHK/HEHƿ/OQ HH4HHHqHDžHHƿ tZHHƿtHW"/!A/OH-Oӿ(L"/HEIA/O-OAҿL!/HEIA/O-OAҋH`jOHHHHH@@H@HDž1DDžHH/HHH5/H/AAHѺ~2DHH*0H*0HMHHHH@HH)0HH)0HHUHH9u0L /HEIA/O-OAH)0H?HHL F /A0O-OAѿ"H*UHH}u} w HEUH]UHH H}H}t HEHHuPAO60O0OBHEHHEHEx$HEHHPHEHHEHEHxHEEHDžxEHEHEH@HHpH@H0HhHpHhHHHpH@HEHpH@HELt/HUHEHH)HȺ((NHEH$AAX6O<r6OADždHEH;ExdldHŸ7OHEA2wH=Orlf`ZTNHB<60*$ |yvspmjgda^[XUROLIFC@=:741.+(%" Džd3wHEHEH;EjHEP8PDt빃dtp8멐HEHEH;EjHEDt dttHEHEH;EjHE< HEHEH;E}jHE  tHE<~HE< HEHEHEHEH;Es(HE< tHE< tHE< tuHE< tHE< t HE< u2HUHEHH)H؉HMHEHHHEHm HEHEHEHEH;EiHE< HEHEH;EiHE< tHEbEHEEHˈ/HMHpH@HH)HHH/HpHUHPHEHHHHHH}HHtHHttHh 6OH3Va HHPH@H;EtHh6OHU% HÇ/HH/}vHh)6OHUHxMUuHHIHHP/HHE/Hh6OHlUHEHUHpH@HH)HH[EHMHUHH)HHHHHpHHHH(H;t NaHpHRHH+EH9vHpHPHHHEHpH@HEHEHxUHEHкU6OH4_EHEEH=/HMHpH@HH)HHH/HpHUHPHEH,HHHHHHHtHHYttHh 6OHSHHH@H;EtHh6OHiSH5/HH*/}vHh)6OH0S^HxMUuHHIHH„/HH/Hh6OHR EHEHUHpH@HH)HH[EHMHUHH)HHHHHpHHHHH;t ^HpHHH+EH9vHpHPHHHEHpH@HEHEHxUHEHкU6OH襼']EHEEH/HMHpH@HH)HHH/HpHUHPHEHHHHHH`HHtHHttHh 6OHQDHH3H@H;EtHh6OHPH/HH/}vHh)6OHPHxMUuHHIHH3/HH(/Hh6OHOP}HUHEHH8HEHEEH/HMHpH@HH)HHH/HpHUHPHEH HHHHHHHtHH6ttHh 6OHOHHHH`HHH`HH,R`HHHHHHE}~ HEHEHEH;Ev HEHEH)EHEH@EH.dHH@(HHHUH6OHǸHH@HxHEH1/HH&/HxMUuHHIHH/HH/HHHHHhHHMHhU6OHMHh>6OHMHEEH/HMHpH@HH)HHHx/HpHUHPHEHHHHHHLHpHptHpHttHh 6OHM0HpHHhH\HpH_H`\H`HR\H`HH`HHHE}~ HEHEHEH;Ev HEHEH)EHhEHh@EH.dHH@(HKHXHUHX6OHǸHXH@HxHXEH}/HH}/HxMUuHHIH/He}/HHZ}/HXHXHHHhHHrKHhU6OHYKHh>6OH;KiEHEEH}/HMHpH@HH)HHH|/HpHUHPHEHHHHHHHHtHH5ttHh 6OHJHHHHXHHHXHH+RXHHHHHHE}~ HEHEHEH;Ev HEHEH)EHEH@EH.dHH@(HHHUH6OHǸHH@HxHEH0{/HH%{/HxMUuHHIHHz/HHz/HHHHHhHHHHhU6OHHHh>6OHHHEEHz/HMHpH@HH)HHHqz/HpHUHPHEHHHHHHEHHtHHttHh 6OHG)HHH)Hh '7OHGHUHEHHE}tV}'wMEHxH*(!HHH H*f(X(X(H,EHEEH>y/HMHpH@HH)HHHy/HpHUHPHEH-HHHHHH(H(tH(HZttHh 6OHFHHHHh '7OHyFEHEEHWx/HMHpH@HH)HHH5x/HpHUHPHEHFHHHHH HHtHHsttHh 6OHEHHHHh '7OHEHEEHkw/HMHpH@HH)HHHIw/HpHUHPSD17O莁HHUHHHǸtHh;7OHD&HUHEHHHEHEEHv/HMHpH@HH)HHHv/HpHUHPSD17OHHUHHHǸsHh;7OHPD~EHEEH.v/HMHpH@HH)HHH v/HpHUHPSD17OQHHUHHHǸHsHh;7OHC HEEHu/HMHpH@HH)HHHxu/HpHUHPMHUHuHhH HEEH8u/HMHpH@HH)HHHu/HpHUHPqOHUHEHHEHEHUHpH@HH)HH[EHMHUHH)HHHHHpHHHHH;t NHpHHH+EH9vHpHPHHHEHpH@HEHEHxUHEHкU6OH迬DMEHEEHs/HMHpH@HH)HHHs/HpHUHPHEHHHHHHzHHtHHttHh 6OH0A^ Hr/HHr/}vHh)6OH@% HxMUuHHIHSHr/HH~r/Hh6OH@ HEHUHpH@HH)HHx[EHMHUHH)HHHpHpHpHHHHeH;pt LHpHHH+xEH9vHpHPHxHHEHpH@HEHEHxUHEHкU6OHqJEHEEHzq/HMHpH@HH)HHHXq/HpHUHPHEHiHHHHH,HhHhtHhHttHh 6OH> Hp/HHp/}vHh)6OH>HxMUuHHIHH;p/HH0p/Hh6OHW>EHEHUHpH@HH)HHX[EHMHUHH)HHHPHPHpHHHHH;Pt 8JHpHHEHEH;E'"HE t؃   tNSnMHE HEHEH;EHE< mHEHEH;EHE P  . t tHEHEH;EHE< HEHEH;ErHENt nt HEHEH;EMHECt ctեHEHEH;E(HERt rt頥HEHEH;EHE< )HEHEH;EHERt rt>HEHEH;EHEEt et HEHEH;EHEPt ptԤHEHEH;EwHEEt et韤HEHEH;ERHENt ntjHEHEH;E-HEDt dt5HEHEH;EHE< HEHEH;EHEUt utӣHEHEH;EHEIt it鞣HEHEH;EHETt ttiHEHEH;E|HE ^ t0HEHEH;EVHE< ¢(HEHEH;E9HEEt etѢHEHEH;EHEPt pt霢HEHEH;EHELt ltgHEHEH;EHEAt at2HEHEH;EHECt ctHEHEH;EHEEt etȡHEHEH;E[HE< ZHEHEH;E@HE . tHE<~HE< HEHEHEHEH;Es(HE< tHE< tHE< tuHE< tHE< t HE< u2HUHEHH)H؉HMHEHHHEHm HEHEHEHEH;E_HE< GHEHEH;EDHE< tHECDžd?3Džd@#DždADždBDždCDždDDždEDždFDždGDždHDždIDždJDždKsDždLcDždMSDždNCDždO3DždP#DždQDždRDždSDždTDždUDždVDždWDždXDždYDždZDžd[sDžd\cDžd]SDžd^CDžd_3Džd`#DždaDždbDždcDžddDždeDždfDždgDždhDždiDždjDždksDždlcDždmSDždnCDždo3Dždp#DždqDždrDždsDždtDžduDždvDždwDždxDždyDždzDžd{sDžd|cDžd}SDžd~CDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždsDždcDždSDždCDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždsDždcDždSDždCDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždsDždcDždSDždCDžd3Džd#DždDždDždDždDždDždDždDždDždDždDždvDždiDžd\DždODždBDžd5Džd(DždDždDždElL.HUHEHH)HȉHEH$AA@7O5r6OAHUHEHH)HH=+(%" L t.A[7O8r6OAHhq7OHQHJ&/HH?&/HUHEHH)HHHEU6OHgHHt6HHPHpHPHh&7OH+$}tHpHhHHHwhHHtvHHt3H[HHh 7OH HHH"SHHHHHhHHHHhU6OHZدHZHHtHR[HHh 7OHbHH3H{RHHHHHhHHH!HhU6OHY1H[H[]UHH0H}HuHEHHEEHMHEغHHeHHUHEHHDuE}y/L bx.A?OX3OAѐ}u }}u/EHEHdHt }oHUHEHHEH/EHHH/}uHEHIdHtEUHHH}H{Gz?HEE:/1/HEHHSHEH@HHcUHATSHĀHxHxHPHHJ0HxHJHHUHPHUHPHUHPHUHP HUH@(HEHx0s0HxHPHxHHxJHx HxHPHHJHxHJHHEȋK/B/8///HEHEHEHEHEHMHUHHHUHEHHAHEHUHHHEHIHHEHLHHt$Ht/HVHJHVH=;HWHE$LH|WHEHEHHHHUH|VHXH[A\]UHHH}HEu HE~HE=~'HE¾?OJsHE'HE¾?OsJHEfWf.r/HEHHEE?OrUHH;/HtH//H@H$/H]UHH H}u}t{DFy s/'/HEHEHSH/UHEAADH¾@O`s`s薼UHH/ JHEHE@HE@HE@fJHHEHRJHHEHPHEHHEH@HE@HEH@)/HuUHSHHH}EHEHbH+eEHEȋuًEHcЋn//* /f(YUHH/HH0HH7/HHHxH*HHH H*XM^f(EE [ f.vH?HE/HEHEE%aHRHHTHtHTHSHEHEHu`AOX3O&@O葔RHH[]UHSHHH}HEL fq.AH@O-X3OAH/HHhHH/HH/H}u1H/HHpHH5/H=/AHY[.dHH@(HqHEEH/HH/HHEH}HEH/dufLp.HEIAg@O@X3OAEHUHEHZHEЋUHMHEHH^E5 /;EJHEHHPHHRHtHRHQHEH /H@H /HHt /'FUHSH / /H2 /HtAOTX3Ow@ORD@OH /H /HǸ ^H(PHH-RHtHRHPHEL n.A@OYX3OAOH[]UH /tL /tAHc /Hu@OcX3O@O胑H> /H H+ /]UHH H}HHHMHEHUHEHH3HEÐUHHH}HE@uHEHUHH}HuHEHUH HHRHPHE@]UHH}u}u}ussd[UH]ÐUHH}HE]ÐUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEHUHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHHH}HuHEHFHUHEHHUHHH}HuHEHHUHEHHUHHH}HEH@(HtHEH@(HgCBOUHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uETHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!Ѕ=EEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uEAHEH@UHHЋE!ЅUEH([]UHSH8H}HuHUHMHE؋@EHE؋PHE؋@9#HE؋@(HtHUHEHHJHE؋PHE؋@9Ht/HE؋@pHUHEHѺHHE؋@(t HEH@0HUHuHѺH)HUHMHEHH?EHEH@UHHЋE!ЉE}HEH@UHHHEH@MHHȋ0E HE؋@PHE؉PHEH@UHHЋE!ЅuHE؋@PHE؉PHEHUHH HEкHHTJH}tiHEH\H}t)HEHUHH HEHHHJHEHUHH HEкHHIEH8[]UHSH(H}uHUHE@;EHEH@UHHЋE!ЅHEH@UHHHEH@MHHȋ0E!HE@PHEPHEH@UHHЋE!ЅuHE@PHEPHE@(HtHU؋MHEH&H([]UHH0H}HuHUHUHMHEHHoEHE@;EtHU؋MHEHUH}ED/]UHH}HHHEH]UHHHXH`HhLpLxt )E)M)U)])e)m)u)}H8dH%pHHdH%HdH%H€H)H~DOIPBOBOʆHHuDOJPBOBO视H8dH%pdH%HHHHdH%HHHH8@PH8PdH%pdH%pRxPxdH%pH`@0HUHPHPHPH8HPHHHHHUHATSHdH%HdH%H€H)HLb.D$^H$PBOABOABO^PBOAҿbAHù^PBOH߸軴vXAcNHaBIHvALH;EH[A\]UHHH}HE@xunHE@xƒHEPxdH%H8HftdH%HHHNHEHPHdH%H8HHUHHH}HE@0uDOPBOBO\HE@xtDOPBOBO5HE@xƒHEPxdH%pH9EuqHE@xtHEHǸ{HE@0tBHEHHtDOPBOCO蹃dH%pHEH-UHdH%p@x]UHATSHLb`.D$H$PBOAAOABOPBOAҿ?HúPBOH E+OH!@IH6?LHBH[A\]UHEdH%p@xE}tdH%pdH%pRxPxdH%pdH%pRxPxE]UHHdH%HdH%dH%HHEdH%pHEHEdH%pHEHHE@PHEPHEHPHEHHHUHH H}udH%pH= stDOPBOCO踁HEH@HEHE@HEHHǸUHHPEHUHE@@HE@HE5DHUHEHB HEHEHEdH%pHEHEHEHEHnHEH6pEHAUHHH}HEHcRUHHEHEHEE",UHHH}uUHEHUHHP}HUHE@@HE@HE}DEEEdH%pHEHEHxHEHxEEEH @UHHH}udH%pH= stDO/PBOCOHEH@HǸDUHH H}uHdH%H8HHEHEHHHEHEHHHHEHǸdH%H8HuUHH(}HEHEE܉EdH%HMHHEdH%@;EudH%UH,H@UHH H}HE@0EHEHEdH%HuH H>UHH H}HEHEHE@0EdH%HMHHLHH>UHdH%pH@(HsH=tdH%pH@(H+mdH%pH@(Hl]UHdH%pHHtdH%pHHdH%pHHHdH%pHǀdH%p'COHdH%pH@XdH%pHdH%p@0dH%p@xdH%pH@(HkdH%pHP8dH%H(HH]UHSH(H}dH%pHt"dH%pH@XHtdH%p@0uDO}PBO0CO|dH%pH@XdH%pH`HHi:HHnDHaCOiHHEHP(HEHP8dH%HHH)HEHHHHEHUHPXd%d%d%ct d%dd%HEP0HE@4HE@xHEHǀHUHEHHHEH"HEUHHH}dH%pH9EtTHEHCOH4u5HEHHHHEH@(HniHEHHUHH0dH%HHHEHEH8HE,HEHNHEH8HHEHEH8HEHEHP8dH%HH9udH%H(HEHEHEH8HE,HEHHEH8H)HEHEH8HEHEHP8dH%H(H9uUHH H}HuHEHPHEH@ HHEHEP0HECOHǸXHEPHECOHǸXHEH8HHECOHǸXHUHECOHǸXHEHP HEHHHEHHHsHHEDOHǸTXUHH@H}HEȾDOHǸ0XdH%HHHEHEH8HE3HUHEHHHEH8HHEHEH8HEHEHP8dH%HH9udH%H(HQHEHEH8HE3HUHEHHHHEH8H.HEHEH8HEHEHP8dH%H(H9uUHdH%HHdH%H8HdH%H(HdH% s9&/.COdH.CO sdH%HdH%dH%p sd%dt. dH%HHdH%HH@@dH%HH@dH%`rDdH%HHHm]UHdH%HHHdH%HtdH%H0]ÐUHH H}HuUHEUHMHH HEHEOUHHH}L P.AAOHAOAÐUHHH}HEHEOHEHYPt HEH&ÐUHHH}HEHHEH%ÐUHH H}HuHE<"HEHEHEHEHE'td'"t?,tS\uHEHE<\uAH}tHEHUHHEHEH}tHEHUHHE<H}uHEH(#HUHEHH$HHEHH)HUHHH}HuHxttHH@GOHƿHEHEHEHEEt"HxH@IOE̋tHH@GOEHHTŐE}}yEEȸ3+ẺEĸ}NEĉEEȉEE̋UHIO;Eu|}tv}uEHEHEoEHH@GOEHHTŐEEHH@GOHƿHHEHHEHEH;Ev [HEHEEE;E[}wGEH`KOHEXJO0HEeJO&HEJOHEJOHEJOHE KOHEH&HUHHEHEH;Ev HEHEHEHH;Es1HEHHEHHEHH;Es HEHHEHHEETHE<%u?HEHH H @H HHPH H@H H@H H@ HHx$H HxHPHxH@ HxHxuK"HHuHKOH mHHH@HH@(HHuHKOH8 HH@HEHHHHPHHHPHH@HH@ HEHHHp$HpHHPHpH@ HpHpuHHh9HhH@HUH(HHRHRRPHhH@ HhHhuHt2HEH(HHPHHP HEH(HHHPHEH(HHUH(HHRHPHH`(HEH(HH`HPH`H@ H`H`uHEH(HH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHPHEHH HEHHHt]HEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHP"HEHH HDž HEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH wHEHHHtaHEHHH HEHPHEHHH@HHEHHH@HuHEHHHUHHHPHEHHH HEHHH H HEHHHCHEHHHH H HuHKOHH HUHHH @H H@BDž 6Dž HEHHHDž HDž EHHHHEEHHHHEEHEHEH HEH`HOEEHIOHEЉE}x9}23EHIOfHEf9uEHIOEpEH IOEV}t"E=wEH@EOE}EHDžXXJOMHUHHHxTTuHHXTHHH9tHHHHWHHHu%HHHDžDžT1MHUHHHTHHXHXHHHoTN}uj} }u^(HHEƿKO!E3EHHHHEEHHHHEEHEEEEH@IOE}t8E}x.}2(EHIO<uEHIOE}JHEH;EtlEH JOHHUƿKO]HmHmHEEfHEHEHHEEE/E"HKOHE}t@E=wEH@EOEHHEƿKOEHHHHEEHHHHE5HEH JOHHUƿKOYHmHmHEH;EuHpH9Et HEHHHH9tHHEHHx []UHHH}HuHEH3HEH¾MO5UHH0H}HuHEHE HHEHHEHHEH}uKO5HEHUH HHJHHHRHPHEHHtLHEHHHHEHHEHHu'KO4HEHlHH}tHEHUHPHEHEHEHEHEHEHEH@HEH}HEUHH H}HuHUHEHHHEH}uKO 4HEHUHPHEHUHH H}/HEHHHEH@HEHEHHEHEH}uUHH@H}HEHEHEEHEHEH@HHtVHEH@HUHHHEH}uc}xHE؋UPEHEHUHPHEHEHEH@@EHEH@HEH}uHEHUHPHUHH H}HuHEr#(7 HEH}u6KOl2HEHKHEH?3HEHUH HHJHHHJHHHJHHHR HP HEHlt>HEH@HHEH HEHHEHHEH@HEHUHP HEHESHEH@HUHHHE3HEH@H( HEH}u6KOO1HEH.HEH"HEHUH HHJHHHJHHHJHHHR HP HEHOt>HEH@HHEH HEHHEHHEH@HEHUHP HEHE9HEH@HUHHHEHE¾,MO V0HEH@ HEHEH@HPHEH HEHEH}dHEUHH H}~HEtrt&6HEH@H %HEH@HHEH@HHEH@ HEHEH@HHEH] HEHEH}wUHH@H}HuHUHEHH+HEH~.HEHEHEH,H}t HEU}tH?.H2HUHH@H}HuHUHEHH+HEH.HEHEHEH,H}t HEU}tH.HH6UHAVAUATSH0H}HuHEHEHEHUHHE؋@HHE@HHE؋@Lu HE@LHEH@HuHg.HEHPHEH@HuHFh.HEHPHEH@(HtHEHP(HEH@HHHHu@HEHHEHP(HEH@HHHEH@HU@HHHEHHEǀHE؋t9HEH@@HHEHHH)HȉHE؉HEǀHEHX@HE@0IHED`LMOAIc`MOft9HED`hHEHXp'IcRODA;~AƉQOAIc@ROAHTOD9uIc@ROAЉSODHA;PHEHXpHED`hIc`MODHELHEHHE؋HHHHEHHHEHHH)HȉHE؉P8HE؈P0HEHX@A$_ DHWOHE@0HEHXpHED`hSHEHPP> HEH@HEHHE؋@LBHE@L  HEHUO" HHEHHHuHEH@ƿKO 'HEHHE؋@8HcHEHHHW*HHEHHHuHEH@ƿKO&\HEHHE؋@8HcHEHHH)HHEHHHuHEH@ƿKO^&HEHHEH@ƿVO(&HEH VO HHEHHHuHEH@ƿKO%HE@LjHEH@ HEHHEH@ HHHHEHHHuHEH@ƿKOr%HEH@HE@LHE@LHEHHEǀHE@LHEH@ƿ(VO$HEHHE؋@8HHHEHEHHE؋@8HcHEHHH(HHEHHHuHEH@ƿKO|$HEHHUEHΉHE@LHEHHE؋@8HcHEHHH'HHEHHHuHEH@ƿKO#HEHHUHƿ*YHEHHUHƿ/=HE@LKHEǀ3HEHHE؋@8HcHEHHH&HHEHHHuHEH@ƿKO7#HE@LHEHHHEH%HEH@ƿKO"wHEHPPiHEHHHEH@HHHEHHUHHHHE@LHEHHHE؋P8HEHHEHH#$HEH@ƿKO1"HEHHEH$tHEH@ƿKO!HEHPPHEH@ƿXVO!jHEHPPPHEHPPHEH@-HEH@PHE؉PLHEHPPHEH@ƿVOF!HEHƿVO[HHEHHH)HȃEHE@0HEHP(HEH@HHH@HEHHEHEH;EwHEH;Es_ HEsHh[]UHH HHEHJ-dHHtUHATSH@H}HuHEHtcObOfbOEHEH@HEHEP HEHHE@ΉEEHEPHMEHΉ tHEȋUP(8訛btcObO}bONEHEH@(HEH}NL#-D$H$bOAbOAbObOAҿٛHHEȋ@(AbObOH߸ܖEaOHΜH覝HH諟HtH蝟HeHEHEH@(HuE*`IH萛LHUH@[A\]UHHH}HE@"讖UHH}HE]UHSHXH}uHEH@HEEEHEHUHMHΉE}xEsHEH@@HUuHMH[HtH舜HH荞H腞HMHE؃}x EHEHHHHUH=HX[]UHATSH0H}غEE8HEHH EHΉ`uEuHHEH@H$fOAfOIaeOH)XA0cNH)vHEHUHHHHHHEHUHHHHHHEHUHHDIHtLHxH [A\]UHH0H}HuHUH}tHEHPHEHHDHu.HHEHeHEH;EuHEHHUHHHUHMHHHHHHEHPHEHJHUHTHEHUHHHHHHtgOseOfO趷UHHH}HuHEHUHHEH@HEH@HEHPHEHHUHH H}HEH@HEH@HEHHE:HEHH;Ew7gOeO0fO HEH@HEHEH@HuUHH@H}HuHUHEH@HHHHEHHHEHEHPHEHHDHElHEH@H;EHEH@HUHH)HHEHEH;Er.gOeOOfODHEHHEH@H HUHEHHvHEHPHEHHEHPHEHPHEHHEHPHEHEHEH)EBH}u;HEH@HPHEHHHEHHHUHEHHHEH@H;Et.gOeO[fOuHEH@HPHEHPHEH@HHHHEHHHEHEHPHEHHDHEHEHPHEHH;EvHEHHEH@H HUHEHHuHEHPHEHHEHPHEHPHEHHEHPHEHPHEHHHEHHDH9v.gOeOxfOyUHH0H}HuHUHEH@HHHHEHHHEHEHPHEHHDHEHEHPHEHH;EHEH@HtOHEH@HPHEHPHEH@HHHHEHHHEHEHPHEHHDHEH}u8HEH@HPHEHHHEHHHUHEHH%HEH;EvHEHHHUHEHHHEHPHEHHEHPHEHPHEHPHEHPHEHPHEHHEHPHEHPHEHHEHPHEHPHEHHHEHHDH9vgOeOxfO跲HEUHH H}HuHEHPHEHH9EHEHHEHPHEHHHEH@HUHHHHHHEHPHEHP}uvHEH@HHHHHEHHHE:HEHH;EwgOeO0fOHEH@HEHEH@HuUHo.]UHSH(H}Hn.HuVHA..HH_HE迠fOLHEHEHPHEHH HEHP0HEHHH{n.HEHpn.HHfn.HEH@HHHHH9vfOeOfOHEH@HUHH`HEH([]UHSH(H}HEH@HEHEHwHHH9t"HEHHHEH0H :HEH?HEHPHEHHHEHP0HEHHHEfOH该H_m.HEHHEHMm.H([]UHSH(H}HuHEH0H@HHEH0H?HEHHHEHHkHEHEH&l.HHUHHHHEH([]UHHH}HEHHhHtHEHHJHEH0HUHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHH H}HEH%HEHE=QtCiOjPgOgOĬHEUHH}EHEEHEHEUHHHHH8tHEHUHHHHH8tH@UHHHHHH8tHHUHHHHH8tHHHEHHHHEHxH*HHH H*XYEf. sH, \H,HH1HH9HCHEE}wH}wEh.Hh.HUȸ?HuHh.]UHSHH}HuHEH@ HEHHHEHPHEH%H@HEHPHEH@AA"Hƿs\HUHHEHHu;H-ecAgOHPgOӸ;HEHH%H@HHEHPHEH@(HEH@0H[]UHH}HE@HEHPHEH@ HH)HH=?w2HEHPHEH@ HHEHEH@ H@HEHP HE]UHH H}HuEH}wKHEHƿ`tUt,H}HHCUHEHEEHUHH؎.HtHԎ.HŎ.HH:f8`tVZ]UHHH}HuHEHH=v7iOPgOgOHEQHEH@HEHUHP HEH@HEH@HEH`HHHHEHP(HEHPHEHPPHEH@PHtHEH@HUHPHPXHEHPPHEHPHEHUHPHEHPHEHPXHEHPHEHP@HEH@@HtHEH@HUH@HPHHEHP@HEHP HEHUHPHEHPHEHPHUHH}HEHP(HEH@ HHHEH@H9]UHH:.HEOHEH`HEHEH@ HHEHEH@ HHEHHEH@H9uHEH@0HEH}u]UHH}E=UHHHHH8tHH;ErUHHHHH8tEKd.9Eu]UHH H}HEH@Ht;HEH@HEHE=Qt!iOPgOgO腦HEH.Ht\H.HEHE=Qt!iOPgOgO?H.H@8H׋.HUHEHHHER`tHEH}t3HUHEHHH.HEHP0HEHo.HEUHH}HuHEH`H;EwHEH`@H;Ev]UHATSHHHHH(HEH}tHEHvHEH}uL"-D$H$PgOAgOAgOPgOAҿ`HHHH$AgOIйPgOHXA0cNHaHEH@Hu_HEHP(HEHHuiOPgOhOVHEH@(HEHEHP(HEHHHEHP(CHEHPHEHHTuiO$PgOhOHEH@HEHDž CMHEH(HDž0HDž8HDž@HDžHH Dž HH H=H3HHHEHEEHEHHEHPHDžPCMHEHXHDž`HDžhHDžpHDžxHPDž HH H=H3HHHEHEEHEH tHEH@HutFHEH@@HtHEH@@HUHRHHPHHEHPHHEHP HEH@HHUHR@HHEHPHEHHHEHPHEH@HPHEHPHEHEHEHEHHEHEHEHEHEDž HH H=H3HHHEHEEHEIH^LHaH[A\]UHHpH}H}aHEHHEHEH@ HEHEHEHEHtHEH@Hut;HEH@@HEHP HEHPHHEH@ HUHHEHP@HEHP HUHEHHAuiOBPgO:hOHEH@Ht7HEHPHEHHtiOCPgOXhO蠠HEHPHEHHEHUHPHEHPHEHH)HEHPHEH@HPHEHPHEH@HHEH@@HtHEH@@HUHRHHPHHEHPHHEHP HEH@HHUHR@HHEH@PHtHEH@PHUHRXHPXHEHPXHEHPHEH@XHUHRPHH].HEHP8HEHJ.HEHEHEHEHEHEHEHEEUHH H=H3HHHEHE؉EUHHPH}HEH HEHEHEHEH@ HEHUHEHH9uiO\PgO:hOܞHEH`HHHEHUHEHH)HHUHHUHuHEH}yiO`PgOhOHUH.HH)HHHEH}yiOcPgOhOCHUH[.HHEHHEHEH%H;EtiOgPgOhOHEUHH@H}HG[.HUHEȺHuHEH +[.HEȺHHUH<.HUHHHHEHEH@ HEHEH`HHHEHEHHHUHEHHEHUHEHHuhOxPgO:hO1HEUHH`H}HuHUH}tH.HEHPH.HEHH}FE$HE(HMEHcHHHHH8tH@HEHEHHEHEHHEH@HHEHEH@HEHEHHEH@HH)HHEHEH`HEHEH`HEHEHHEH@HHEHEH@PHEH}jEHcHHHHH8tHHEHEHt"HMHUHEHHЉE}tE EUY.9H[ÐUHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHHHXH`HhLpLxt )E)M)U)])e)m)u)}HDž0Dž40HEH8HPH@HDžHHH0HHDžHDžHDžHDžHH H=H3HHH(H(HHHHUHATSHpH}HuHUNEHEHLJEHcHEHPHEH@AA"HƿJHUHBHEH@HLu-D$7H$piOAXiOAdiO7piOAҿ}THH$iOAiOA7piOHmvXA0cNHmUHEHEH@HEHEHPHEH@HHEHEHEHEHEEUHH H=H3HHHEHEEHEH@HHEHHHEHUHuIHIHSLHWHp[A\]UHHH}HEH@Ht)HEH@HtHEHPHEH@HH>TUHSH|.EH|.EHH HH)HHHHtv|.HcH|.EHH HH)HHHH MH9w/Hq|.EHH HH)HHHHLK|.E|.E|.;EHH[]UHSH(H}HuЋ_|.EEB|.D|.9R2|.'|.!|.HHHH)H{.HH^UH{.H{.HuGH{.{.HHH HH)HHHEHHHEHHt[E9HI{.{.HHH HH)HH‹EHHDE}u^{.T{.EHEF{.={.EHH;EEH([]UHS}uHUHz.EMHHH HH)HHH z.EuHHH4HH)HHHHHEHHBHKz.EMHHH HH)HHH "z.EuHHH4HH)HHHH0HEHHB0[]UHSH(H}HuE Hy.EHH HH)HHHHEE:Hy.EHH HH)HH‹EHHD‹EЉEE}uMgfff)ȉEH+y.EHH HH)HHHP0H y.EHH4HH)HHH8HMЋuHEЉE}tEEy.;EH([]UHSH(H}؉uHx.H EHtx.EHHH HH)HHHHEeH;x.EHHH HH)HH ExHx.EHHH4HH)HH‹EHHTHcHTmEuHw.EHHH HH)HHH@Ew.9EHEHH([]UHatat@@at@H{w.9EH?Hzw.at輁]UHat葀Hw.HtHw.H]G]UHS}Hu؋EENE6Hv.EHHH HH)HH‹EHHDE}uEEHH;Eu[]ÐUHH.HEE]UHH H}HuHUHEHUHPEHEHUHB HEHEPUHHH}H~.HURHMHHοЉHEPHU.HUHJHοЉHEUHH0H}HuHMLELMfEHE HEUfP HEHUHP"HEHH*HUHEHH}PHEHP HEHHH HEHHuHWPHEHUHHP HEHHHEHHUHH}HuHEHEHEHEHEHHEHH9uHEHHEHH9~]UHATSHpH}HuHEHEHEHEH@HEHEHEHH6V-dHH@(HHyHEHEH@H/EHEH}H}I4HEH.HHHEHEH HEH.HHHEH}u!HEHPHEHHIECHUHEHHHEHHAuHEmOHIuEEσzHEHHEHHEHHHE HHLLHHUHEHHHEHHNAt9L[j-HEHIA|jOjOAHEHHEHHHH9t%HEHHEHHHH9u6Li-HEHIA|jOjOApHEHEH;EuaHEHHHT-dHH@(HHPwHEH}t~HEHHMHEHHMHEHEHeHEHuMHEH}HuHEйEHGGHEHUHHEHEGt?Hh-HEL`GDMAjOHjOH}t HEHIHEHKHp[A\]UHH H}HUHEHHIHEH}HEHEHUHHHHH@KUHH H}HuHUHEHHHEH}5HEEHEHH;EHEHHH;EHEHHEHmH}uHEHHJUHH@H}HuU܃}umOjOHEHEHpHEH@HMdH%HHUH$IIHjOw;dH%HUHH@H}HuHUHEHѺHDHt mOqH.HUHJHοЉEE;Et3L f-AkOjOAѸEHPHP-dHH@(HH8tHEHEHUHHUHPHUHPUPEHUHzHUHѺHCHt mOH.UHMHHοЉEE;Et0L e-A%kOjOAѸ@Le-HEIA:kOjOAҋEPHEHEHyHUHHH}HuHEHUHHE@HEH@HQHHHEHPHE@UHH H}HEHHEHEHPHE@HHHEHPHEHHHEH@HH8H2O-dHH@(HvUHSHXH}HuHEHHEHEHE@tnO*jOXkO]LXd-H$A ApkO-jOAHN-dHH@(HvH}~ HEHHHEH@HH7HEHPHEHѺHAHt_OHEH@HL>E܃}u.L c-AkO@jOAẺE ЉE̋E= uHEH@HcFHHEHEH@H;EtMLc-HEH@HUHRHMHH)HH$IAkOJjOALb-HEIAkOKjOAHEH@HUHHsHEH}mOH}uoHEHt3L cb-AkOSjOAѿ?8L 0b-AkOTjOAHEH@H!EHHEHPHE@PHEPHEH )Éi)‰Ѕu@L a-HE@* %x ^A lO\jOAHEHEH@H}DHHEH@HH9HEHHHEH@HH 5HEHPHEHѺH>Ht+L `-AlOijOAjE=u%HEH@HCHHEHPHE@;E= t1L`-ẺIA4lOojOAҸH`CHX[]UHSHHH}HEH$HEHE.H:HEHE%unOjOOlOH}unOjO`lOɂHEmOH>tnOjOhlO蛂HUHEHH)HHHPHHHEHuHkH)HD$HHHHEHUHEHH)HHHMHEHHBHUHEHH)HHHEHHUHEHHCtJH^-=:HMHUH$IAlOHjOӸHEƀ%H]UHSH(H}HEؾ.HD9HEH}u`nOjO`lOFHEmOH=t`nOjOhlOHEHf5tU8<uGH]-<9HUIAlOHjOӸH([]UHSH(H}HEHHEHE@HEH@H1mOvHEH@%u HEHHE%tHEHtt3L ]-AlOjOAѿ2HEH@H=E}y4H\-:8AlOHjOHEH5HEHEH([]UHH H}HEHHEH}t>HEH@H/0HEH@Ho-dHHEHHEHUHPUHHH}HEH@hHt%HEHPHEH@pH9|HEH@hHUHH0H}HuЈEHEHPHEHH9~wOnODoOvHEH@H;E}}}HEH@HH;EtSLYS-HEH@HUHH)HEHPHL$HEH$IA`oOnOAHEHUHPwOnOoOuHEHUHH H}HuHEHUHHEHUHPLR-HEHHUH$IAoOnOAHEH^UHSH(H}Hu,HEHPhHEHHHEHhHCHEH@H;EuBH3HH5HtH 5H3HEHEHhHZ(H([]UHH H}HEHHPHEHLQ-HEHHUH$IAoOnOAHEHUHSHHH}HuHUHMDEDMHYZ.HtwOnOoO!tH-H6`H Z.HZ.HEHEfWnOH}3L P-AoOnOAѿ&HEHUHP@HEHUHPHHEH@@XsHEHXHEH.HCHEH@ `XsHEHX HEH.HCHEHP HE@xuBHEUPTHEHhH,HEUPXHH[]UHH H}HuEHEHƿXshHEPxHE@xuwOnOoOrHUHEHB`UHH}EMXo Y Lo Y,HEPP]UHHHlX.HEH}HEH@0Ht HEHHEH@(Ht HEHHEH@H@H(HEH@ H@H(HEH@HtHEHH*HW.UHH}ЈMEHEH@ UHEH@U]UHHPH}HEH@HtwO#nOpOZqL UN-A0pO$nOAHEH@HHEH}.L N-A?pO+nOAHEH@HMHHHEHEHu.L M-ASpO0nOA<LM-HEH$IAlpO3nOAHUHEHHZHEH@@UHMHIHHuHt7L M-A~pO<nOAHEHu%HUHEHH5HEH}uHEHHEHH}uTHEHUHPHEHPHEHLL-HEH@IApOGnOAHEH@HHt3L 6L-ApOLnOAѿr#L L-ApOOnOAѿ!H.UHHPH}HuEHUHEHHDHEHH@HEHEH@H;E|+L uK-AqOfnOAmHEH@@UHMHIHHuHt7L 'K-A~pOnnOAHEHuSHUHEHH HUHEHH)HEH}E؄tEHEHEH-UHH`H}EHEH@HHEHEH@ HHEHEH@HHEH@HHEH@P P tKLJ-HEH@@ HUHRH$$IA0qOnOALI-HEH@H$IAqOnOAHEHHHEH@HHEHEEHEH;Eu3HEH@ UHMHHHEHE辩qOH*HEH}u:EHEH@ UHMHHWHEHE辩qOH*HEHEH@ HuMHUIHHEH}HE@|t~}uxLH-HEIAqOnOAHEHt3L OH-AqOnOAѿ+EHEH@HtwOnOpOjHEHUHPLG-HEH@H$IAlpOnOAHEH@H@HEHEHPHEHHE}y=LvG-HEH@H$IAqOnOAHEH@H@Ht!HEH@H@H;EtHEH@@ HEH@H@Hu:LF-HEH@H$IAqOnOAq}uTLF-HEH@HUHRH$H$IArOnOAHEHHHEH@H;EHEH@HH;E}0L 9F-A0rOnOAEH0-dHH@(HWEUHH H}HEH@HHEHEH@ HUHHHEH}HEH@ HMHHHHEHPHEH@HtHEHt3L dE-AYrO nOAѿ@L1E-HEH@IAhrO nOAHo/-dHH@(HVUHH H}HEH@0Ht HEHGHE@|HEH$E}y3L D-ArOnOAѿxHEH@H<}2LND-HEH@H$IAqO nOAHEH@%tWHEH@H@HLC-HEH@H$IArO&nOAҿHEH@H@HLC-HEH@H$IAqO)nOAHEH@H$HL ;C-ArO+nOAѿHEH@H@HLB-HEH@H$IAsO.nOAHEH@HptuL B-A*sO0nOAѿ}LnB-HEH@H$IAHsO2nOAҿ;HEHHHE@Xu HEHt UHHH}HuHEHH$HEHHH]"HEHP0HEH0@@HEH0@HEH@HFHEHHEHHUHHEǀHEH0HgUHHH}HEH0H2hUHH0H}؉uHEH@HEHEH@0HEHEH@HEHEHsE}y9L@-EAAmsOonOAҿHEH@H;Et7H}t HEH@HEH@HtHEHPHEHHmUHH@H}؉uHEH@HEHEH@0HEHEHPHEHHgE}y3L $@-AYrOnOAѿ}uqL?-HEH@HUHRH$H$IArOnOAHEHHHEH:HEHGUHH H}EHEH@0HtpwOnOsOFbHEH@(HtpwOnOsO bHEH@0`atHEH@0HEHUHE@@HE@HEH@FHUHEHB HUHEHB(HEHUHP@HEHP@HEHPHEH|OHEH@HtHEHPHEHHtUHH H}HEH@0HEHEuPwOnOsOH1-Q AtOHnOӿHEHH`HEH;HEH@(HH[]UHH0H}HuHEtZHEHHtNHEHHHEH@HUHHHEHPHEHPHEHHUHEHPHEHP(HEHPHHE}t5L 0-E$AvOAsOnOA҃}tvOnOsORHEUHH0H}uHUHMHEHHEHE!t HEHt>HEHPEHH9sEHcHEHH?HHHuHEHEHEHEHu3HMHEغHHHEHEHt=HEH=/HEH@Hu!HEHt HEH HEHtvOnOtOQHUHEHHEHtH|UHH H}EEfWf.vA J.\f.Ert!HEHo EHEHI.UHH0H}HuUHMHE%tUHEH@)ȉE}uOnOtOPEHcHEHH芊IHEHHEHEHHHEHHHMHEHH{HEHHEH}tHEHtuHEUHH0H}HuHUHMHEH@HwHEH܊EHEHPEHHHEHPHE@HEHHEHEH;Et}mtuHEUHH`H}HuHUHMLEHEHHEHEHHEHEHHEHEHEHEHH HEHP HEȋpTHEHWHEȋPTHEHHMHuHHEHEHHMHUHuHHEHEH;Eu=HEH@`HUHHEEH!HEHEH}MH}thHEH@HUHHEHPHEHPHUHEHPHEH@HHHEHPHEH@HH;EuHEH@HHEHHt9HEH@HUHHHEHPHEHPHEHHUHEHPUHHpH}HEHEHEH@(HEHEHEHEHEHEHEHEHEHEHEHEHEHEH(H EL-*-H$sOAuOAsO4nOA҃}t5L)-E$AuOAsO4nOA҃}^uO4nOsOLHUHEHHHEH(H$ ELr)-H$sOAuOAsO7nOA҃}t5L5)-E$AuOAsO7nOA҃}tuO7nOsOKH}HMHUHuHEIH\HEH(H EL(-H$sOAuOAsO;nOA҃}t5Lr(-E$AuOAsO;nOA҃}tuO;nOsO#KHEHt+HEH@HUHHUHEHPHEHEHEHEHt|HEƀHEHHt1HEHUHHHEH@HEHEHHUHEHPHEHt+HEH@HUHHUHEHPHEHEHEHEHHWHEHEH(H EL)'-H$sOAuOAsOJnOA҃}t5L&-E$AuOAsOJnOA҃}tuOJnOsOIHEH@HtHEHHH UHH`H}HuHUȉLEDMfELH&-HEIAtOXnOAҿ{t HE؋@xu HEH@(HEEHPJHP-dHH@(HH3HEH2-dHHEHPHE@MHEHxHuHUHEHL$HMH $AIHѺHRHEH(HELL%-H$sOAuOAsOinOA҃}t5L%-E$AuOAsOinOA҃}tuOinOsOGHEHHEHEHHEH@HUHHUHEHP}tmHEHPHE}t5Lf$-E$AuOAsOonOA҃}tuOonOsOGHEH(HEL#-H$sOAuOAsOqnOA҃}t5L#-E$AuOAsOqnOA҃}tuOqnOsOsFHE@UHSH8H}؉uԋUHE؉HSEHE؋@;EtwL0#-HE؋@U$AAtOnOAH"-*AtOHnOӿH8[]UHSHhH}HuHUHMLELMHEHUHHP*H -dHH@(HHJ0HEHuHMHEHUHT$HUH$IIȹHHEHH谴HEH^HHMHEHH8=.=. =. )Éi)‰Ѕt?L !-=.* A ^A uOnOAHEHtMHEH@HHEЉHHEоHF~H -dHH@(H3H3*.@P<.fWf.z$fWf.uj-EHEH<.HEH<.HcHЉ<.-- }<.\E|@ f.Ev%m@ \E X@ YH,0,bEHEH&<.(<.HY).@P)ȉ<.HC).PP<.9^Hh[]UHSH(H}HuHEHHHEH@HHeHEHEHu7L -A uOnOA<gH!|HEH}u>Hu-?A tOHnOӿFHEH5|H&-HEHHHEH@HHeIA\uOnOHUHMHEHHHE@t HEH@HKHEHHEHaHEH HEHHEH HEHHEHHEH賚HEHYHEHHEHbHEHu,HEHHEHMHEHHHEHEH;EdHE< EHEHEH;EDHE 9bt HEHEH;EHE n QHEHEH;EHE ctHEHEH;EHE _ktHEHEH;EHE< q)HEHEH;EsHE Axt yHEHEH;E>HE it e7HEHEH;E HE tt )HEHEH;EHE  HEHEH;EHE ^et HEHEH;E{HE "lt @HEHEH;EIHE pt IHEHEH;EHE  HEHEH;EHEE?E@EAEBECEDEEvEFiEG\EHOEIBEJ5EK(ELEMENEOEPEQERESETEUEVEWEXEYrEZeE[XE\KE]>E^1E_$E`Ea EbEcEdEeEfEgEhEiEjEkEl{EmnEnaEoTEpGEq:Er-Es EtEuEvEwExEyEzE{E|E}E~EEĀzEāpEĂfEă\EĄREąHEĆ>Eć4EĈ*Eĉ EĊEċ EČHEHUHPHEH;Et@HEH$H,HmHH ,HEHHHEHHE؋HEHHHEHH-UHHH}HEHH.-HrHEH@H$HEH@HHVH,dH@42UHSHHhHhHPHHJ0HhHJHHUHPHUHPHUHPHUHP HUH@(HEHh0s0HhHPHhHHhJHh HhHPHHJHhHJHHEH-HskHEH -HyEHEHEHEHEHEHEHpHUH$HUHT$HUHT$HE/HMHUHEHH$uHEHVHpHHHpH{HHHĸ[]UHHH}uUHEAAsFH¾O ttA ttm+UHHH}HEHuH2HEUHHH}HE@uHEHqUHH}HuHEHUH HHJHHHRHPHE@]ÐUHH=.HEE]UHH}HE]UHHH}HEH@(HtHEH@(HOUHH}HE@(]UHH H}HuHUHMHUHuHEH5UHH H}HuHUH3: HUHuHMHEEH7UHH}HEH@HHEH@HH)H]UHH}HEHPHEH@ HHHEH@HH)H]UHH0H}HuHUHUHEHHHHEHHHEHpHUHEH4HEHEHPHEHHEHPHEUHSHHH}HuHUHEHHEHEH HH)HHEH}~/r-HcHEHHBHHUHMHEHHHEH@H@HHEH]HEHHH)HHEH}~HUHMHEHHHEH@HEHE؉HEHEHPHEHHEHPHEHH[]UHATSH@H}HuHUHMHEعH}HEHOHUHEHH+HEHOHMHEغHHHEH#OHMHEغHH1HEHU9tuL,D$TH$POA6OADOTPOAҿlHùOTPOH2YA`cNHpL A,AOVPOAL,HEIAOWPOAIH*LHH@[A\]UHSHHhHh0s0HhHPHhHHhJHh HhHPHHJHhHJHHEHEEEHpH?)HEJ}HpHZtZH}uHw,dHHH:NHEHEH@HxHEH@8HHUHpHHHHEHEOHUHMHpHHHEȿ|HEHEHX8^`HEH`@ `\f(C HEHX8#XHXHC(UHMHEHH?HEH~OˀHt-HtS HHHּHH衽HEHEHMHpHHuHEHEHHHHUHEtlHEHt0LW,HEIAOPOAL',AAOPOAEHpH }HUHH0H}HuUHEHH@HEHEHft0OPO0OxHEH@@HUHJHUHuHt3L P,AhOPOAѿ,HUHEHH9UHSHHxHpHxH@8HtOPOOL,HpIAOPOAHpHEHѺȂOHǸ輭HE\zFHցHEHMHUHpӂOHǸFE}tOPOނOHUHEHH1t@H,.ŴHUIAOHPO0tt֬f]-EX-EWfB-H9-HJ-HEH7-HxH@8ttHxHEHHǸs#HtHHE2H8HĈ[]UHHH}L ,AOPOAHEH@8H@H?vHEH@8ÐUH}EUHHHHHXs ]UHH}HEH@HHEH@HH)H]UHH}HEHPHEH@ HHHEH@HH)H]UHH}HEH@]UHH}HEHPHEHHHHHHt HEH@HEH@]UHH}HuHEHPHEHHEHPHEHHHHHHEHPHEHPHEHPHE]UHHH}HEHHHuHEH0H#HuUHH}HE]UHH}HuHUHEHXsHEHUHPHEHUH HHRPHE@ HE@]UHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HEH@HEHEHPHEHPHEH@HUHHEHUHHEHHEHPHE]UHH}HEHPHEHH9uHEH@H;Eu]UHH}uHEUP4]UHH}HuHUHEHHEHHEHEHEHUHEH@HH)HHEHEH}~HUHEH@H9ruHUHEHHUHEHH)HH]UHH}HuHEHPHEHHEHPHEHHUHHHEH]UHH}HuHUHEHUHP0HEHUHP8]UHH}HE@(]UHH}HEPHHE@L9]UHH@H}HuHUHMLEHEPLHE@P9uHEH HHEPLHE@P9|ЄOPOO9HEHiEHEHHE@LHcHHHUPHEPLHEHUHHEHUHPHEHUHPHEHUHP}t`ut֝UHH}HuHEPHHE@L9u|HEHHE@HHcHHHUPHEPHHEPHHE@L9uHE@LHEPLHEPHHEHUH HHJHHHJHHHRHP]UHHH}vH},dHHPHHEHHH'prUHH0H}؉uHEH@HElHEHHt"HEHH!HEHEHHHEHEH@HƿOyHEHUHEHHǸlHEHuUHH H}uHUHEUPPHE@LHEPLHEPHEHHHHp-HHHHEHHEHP HEH @@HEH @HEH@8EFHEHUHP0HEHUHPHEHHUHH@H}HEȋ0s$HEHPHEȋHHUȋJHUȉ HEHPHHJHUHJHHE20HEHH,dHHHEHUHHUHEHH&u@utHUHHH}HEH@Ht9HEH@HH Hu HEH@HHHuUHH}HE]UHSHXH}؉uHUH-HuH1-HEHHEH-UHHH}HEH@HHEHpHHE@h;HEǀHEHEPhHEH@HUHRHJ HUHRHHHP HEHTt$HEHPHEAF utHƿ@utQUHATSH H}uHE@=L,D$H$POA2OA@OPOAҿ胪HùLOPOHYA`cNH臫IH蜪LHaH [A\]UHH0H}HEH@HEHEH@H v)HEHP HEH@HHH@H  HUHRH)HEHEHHeHUH9t HE HEHHHUHRH9t HEHUHHH2HEHEH@Ht HEH@HEHEHPHEHHUHHHN2HEHP HEH@HHHEHP HEH@HHEHH HEH@HH設HEHP HEH@HHEHP HEHUHPHEHUHPHEUHH0H}HuUEHEH@H HEHPHEH@HHHHEUHEHPHEH@HHE@H H9r[HEHPHMHEAFHƿ@ut_HEH@HHE@HH)HH HHEHPEFUHSHHH}uHEH@HEHE@hE}y@OPOhOHEH=HEH}uHEH@H%HEHHEHEHHHEHHEHΉqẼ}yHEH@H}uHEHOHEHPEHHHEHPHEHPEHHHEHPUHMHEHH HEH@ulHEH@H袒UH茨HH葪HtH胪HKHEHEHHHHUHHEH?HH[]UHHH}HEH@H0HHt HEH@QHEH@HH[Hu HEH@H0HHtt HEH@UHSHhH}ȉuHUHEHHHHHEHHHEHEH0H@HEH)ȉE}u'O0POpO1HEH@HHHEHHUHMEHΉHEHEH@HHEHHH}HEHPHEHHEH0HH9tEHEH#9HEHP0H]HEHHHEHHEHCHEHCJHEHPHEHHEHPHEHPHMHEHHaHUHHHHEHLHHH#HtHHݦHEHEH@HHEHHZHh[]UHSHHH}uHEH@HEHE苀EHEH HETHU؋MHEЉHtHEHpHHEH@uHEH@HTHEHHEH}uHEHptgHEHpH%UHHH HtHHåHEHEHHHHUHHEH跤HH[]UHH H}HuHEHHU@EEHMHE HH/HuUHSHHH}HuHUHEHHU@EHEH!dHiEHEHyULE܋EEHMHEȺ HH.HMHEȺHH.EHcHEHcHHEHHH.H賥HH[]UHSH8H}HuHUHMHE=uHUHEHHHEH HEHUHMHEHHHEHHE0HUH}HEkHHHHtH HգHEHE؋@ tHEHP(HEHH2HUHMHEHHU賢H8[]ÐUHHH}HEHHUHHJHUHRRH HHPHEH@HtHEH@HUHSHHXHXHHEHXH@HEHXH@HEHEHEHEHEHEHEH`HUH$HUHT$HUHT$HHEHpHHtxHEHx0HEH@8H0HUHEHHHHEHpHHt(HEHpuHEHpH@H`HHH`HyHH H[]UHSHHH}HEHHEHEH@HEHE@hE܋E܉\ HE艐HEH@HuOPOxOwHEH@Hx+H_8HtH-H*HEHEHHHHUH*~H HH%H HHHtHt_HHƠHEHEH@HUHJ0HUHH`HEHP MHEHHEH號[HoHEHEHHHHUHHE苀tOPOOCHEHF utHƿ@utHnUHHH}uU}tEUHEA MsA:FH¾Out9Butut}t1UHEA(MsA:FH¾O`vt`vtF@utgUHHH}HEHuH2HEUHHH}HE@uHEHUHH}HuHEHUH HHJHHHRHPHE@]UHH}HEH@]UHH}HuHEHHEHHHHHHEH@H]UHH}HE]UHSH(H}HEHHEHE@ u-HE@HEHHHEH@HH']HEH@HEHEH@8)ȍPHEPHEHXHEHP(HEH@HHHHH([]UHSHXH}HuЉUHEHHEHE@ PHEP HE@ t8HEHHH]HEHH:)HEHC(HEHC0HEHC8ẼtHEHPHEHH葼HX[]ÐUHH}uHEUP4]UHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uETHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!Ѕ=EEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uEAHEH@UHHЋE!ЅUEH([]UHSH8H}HuHUHMHE؋@EHE؋PHE؋@9#HE؋@(HtHUHEHHKiJHE؋PHE؋@9Ht/HE؋@pHUHEHѺHjHE؋@(t HEH@0HUHuHѺH)HUHMHEHH?EHEH@UHHЋE!ЉE}HEH@UHHHEH@MHHȋ0E HE؋@PHE؉PHEH@UHHЋE!ЅuHE؋@PHE؉PHEHUHH HEкHH H}tiHEH\H}t)HEHUHH HEHHHɘHEHUHH HEкHH裘EH8[]UHSH(H}uHUHE@;EHEH@UHHЋE!ЅHEH@UHHHEH@MHHȋ0E!HE@PHEPHEH@UHHЋE!ЅuHE@PHEPHE@(HtHU؋MHEHcH([]UHH0H}HuHUHUHMHEHHoEHE@;EtHU؋MHEHUHATSHP}*-!--u -EEEEHHEH#-HuHEH-@;ELز,D$:H$OAOAO:OAҿ莑HAOAO:OH߸vXAcNH聒Hʜ,dHUHH2-HtH.-HEH-HUHЋEqIHRLYHHLHtDHГHEHU,dHH\H-HMHH 4H輔HP[A\]UHSH8}̃}H-HtH-HEHo-HUHHEHEẺEHY-HMкHHTH+H?Hu*HHEHEHHHHUHHΒHH8[]UHH(}HEHEE܉EH-HMHHEH-@;EtH-UHH@UH`Hh-Ha-Hu3L =,AOqOAѿ]UHH-HtH-Hb]ÐUH}UHHHHHXsH]UHH H}HuUHEHHEHpbNHEHUHPHEUPHE@UHHH}HuHEHRHEHpbNHEHPHEHPHEPHEPHEHHHEHHHÐUHH H}HuUHEUHMHH%HEHpOHEÐUHHH(H`HhLpLxt )E)M)U)])e)m)u)}H Dž8Dž<0HEH@HPHHH8H H(HHUHH H}HuHUHEHxHUHEHH¾輋UHATSH H}Hܭ,HEL`HE苀蛉L$$AOAOHJOH [A\]ÐUHHH(H LpLxt )E)M)U)])e)m)u)}H(H HHPH(H0OH(Dž8 Dž<0HEH@HPHHH(H(HzH8HH¾^H(ƀUHH H}HuUHMDEHEUHMHHHEH0OUHEHEHHHEHH詌HEƀUHH0H}L,HEHHHEPHEH@HL$T$H$AOAOfOAÐUHH H}HuUHMHEHMUHuIȹHRHEHaNÐUHH H}HuUHMHEHMUHuIȹ HHEHNÐUHSH(H}HuU܉MLEHEH}ЋM؋UHuIHǸ]HEH0bNHEHHHEHHHҍH([]ÐUHH H}E:EHHH`^sHHUHHbuEHHH`^sE}uUHH}}x}~OC`OOEHHH`^s@UHH}E}x}~OQ`OOEHHH`^sEBUHH H}EHEHHEH}uHEUPUHH H}HEАOHǸEeEHHH`^sHEHEHHEOHǸحHE@tOOHMH¾OHϸ觭E}uÐUHH}HE@HcHEH@H9}HEPHE@ 9|]UHH@}̋UHEо OHǸdH%HHEкHHHEH}x+dH%HHEHdH%H1OUHATSH0}HuHUHEHEHUHMЋEHΉ~HEH}u t م u)HEH;EtHEHUHH)HHHj,E܉I萅'MA2OHM@OH6H}tHEHEHEH)EH}HEHUHH)HH0[A\]UHATSH0}HuHUHEHEHUHMЋEHΉ襉HEH}фuń资 t 詄 u)HEH;EtHEHUHH)HHH:,E܉I`MAOHf@OH6H}tHEHEHEH)EH}HEHUHH)HH0[A\]UHATSH }HuЉUH}t}yϒOv@OOxUHMЋEHΉ螅HEH}yu莃u 肃u tPi tDH#,E܉IIMAOH@OHEH [A\]UHATSH0}HuЉU؋UHMЋEHΉ舅HEH}uUH,E܉IĂ[U؉T$HUH$MAOH@OY}uSHEH;EtIH9,E܉HHEHD$HEH$IAO@OHEH0[A\]UHATSH0}HuHUЋEH։E}tLH,E܉I݁tHUH$MA0OH@OӋEH0[A\]UHH H}HEHHH>zHEH}u:HE@ HEP HEPHE@HcHEHHEHUHPHEUHH}HuHE@HEHHEHEP ]UHH H}HuHUHE@ O@OOOHEHuO@OcOaHEPHEHcHHHHPHEHHEHHEHUHcHHHHHHE@PHEPHEHHEHHEHUHATSH@H}ȉuHEȋPHEHHEHΉHEH} >HEHH;Eu HEȋ@%H,HEL EĉHLd$HEH$IAO@OHEHEHHE0HEHPHEHHEH9w?HEHPHEHHEHEHEȋ@HHHHHEHHH;EwHEHUHH)EĺHΉHEH}tHUЋEH։~u ~ HUHEHHH)HHH@[A\]ÐUH\tSGMHc-]ÐUHH}H}t HE@]UHHH}HEHHUHH}HuHEHUH]UHH}H}tHE]UHSHH}HEH@HpHEH@ H^HE@HEPHEH@HHEH@ H~9~HEH@HjHEH@ HUHUH[]UHH0H}HuUHEH@ HUHR(HHEH}uNHEHEU܉PHEPHEPHEHUHPHEH@ HEHP HEHPHEUHH H}HEHHEgHEH@Hu*HEH@ HEHEH@(HUHRHMHH(HEH@HEHEHP HEHPHEHUHP HEHEH}uHEHUHH0H}HuUHE@EHEU܉PHEH@M܋UHuHvH}HHEE܋U)HMHEHHwUHH H}u}HEHcHHDHE}HEUHcHHTHEHcHHTHEUHcHJHUHTHEH[HEHOHEUHSHH}u}؃}Ѓ}HEHcHHDH)HHEHcHHTUHEHH[]UHSHXH}HuUYHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEH?EHEH0EЋE9EMEЍPHEE;EEЋUԉ)ȃHEUHcHHDHEȃ}HEHcHHDHEHEHEHEHEE;E|$HEH}HEHH"HEH}HEH0HE;Et m}tHEH;EHX[]UHSHPH}HuBHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEHEHEHEЋE9EMEЍPHEEЋUԉ)ȃEЋUԉ)ȃHE؋UHcHHDHEȃ}HEHcHHDHEHEH%EHEHEE;EHEHUHEH9HHEHUHEHHHEH;EHP[]UHH8H}HuHUHEЋEHEHHHEHEPHEHEPHEH@HEE;EsHEHEHPHEH0E)EHE@;Ew3HE@)EHEHEHP HEHHEHHHjHEЋUHEUHH}uUHEHHHEHEEHHHHEHHPHEHPHEHHHEHEPEHEPHE}HHHHEHHPHEHHEHHHuHE]UHHHhdHX`HhH‹d9sHhHd`uOVO&Om`HXHhHHkHEH}u HhHp`HdHpHHHEHEHHHdtqdHEHHHhHH HEH}u HEHUHPHEPHEHEPHE@HEPHEHEHE@‹dHEHHEHEHHUHHEHMHpHHH}yUHHHxtHxH‹t9wOO+O?lHxHHtHHHEHEtuHEHHtHEHHHxHHHEH}uLHE@HEHHEHEHHUHHEHMHHHHEH\xUHSHH84H8H‹49wOO+OkH8H@H4H@HHH!HEHEHHHEHE@4uTH8H@HURHMHqH8HyHHEHPHE@PHEPHE@EH8H@4HURHuHvH8HHE4HEPE̍P49u ?H8H@4M̉)ӉډH8HyHuHE4Ủ)ȍPHMH8HHSHEH}u HE@HEHxHEHEHHUHHEHMH@HHz4tOODO!iHEH@HHEH@ HHEHEHEH@ HEH@9E܋MHEHHHEHEHHHEHEHPHEHPHEPHEЉPHEЋUHcHHDHE5HEЋPHE@)HEЉP}HEHcHHDHEHEH;EuHEH@HEHEHHUMHcHHTHH8H@(HMH8HHHUH@HHHtH[]UHH}2HEH@HPHEH@HH@HHEH@HPHEHPHEH@HH@Hu]UHHH}HEHPHEHPHEH@HUHHHHEH@HHt HEHaHEH@HUHHH}HEH@HH@ Ht@HEH@HPHEH@HH@ HHEH@HPHEHPHEHbHEH@HUHH9uHEH@HBHEH@HPHEHPHEH@HHHEH@HH@ H9tHEH@HUHHHhH`HhHpHHHpHHE3HE@HEHPH`HHHpHHEH}uHrUHATSHHXHXH`HHTH`H HEHE@uߔOWOPODeHEXHEH@HAHEH@ HAHE@9tߔOZOhOdHEHEH@HAHEH@ HA9~HEH@HHEH@ H9tߔO]OГO}dHE@HEXHEH@HAHEH@ HAHE@9uZHEHEH@H AHEH@ HA9~HEH@HHEH@ H9tbH`HHEH}NHĠ[A\]UHSHXH}HuHUMHEvOHE؀OHEOHEȑOHEHfHEHxf؃EEHdHEH}tpHEH@Hu HEH@ HtV}HHLEHUHEIHѺOHǸaHEH@HUHuH EHHLEHUHEIHѺOHǸ`EHHTHEHƿO(`H}uOaHEHE@HƿO_HE@HEHPHEHHпÔOjaH}t7HEH@Hu HEH@ HtHEH@ HUHuH2HEHdHnHX[]UHHH}HuHEHZHƿƔO?_HUHEHHAܔO`HEHHuޔOH aÐUHHH}H%-H@8Ht&H-H@8H@ HUHEEH HEfWH UHHH}H̓-H@8Ht&H-H@8H@(HUHEEHa HEfWHO UHHH}Hs-H@HHEHHUHHH}rHHEHH UHHH}EEHEHEEH,HxH*HHH H*XHEH UHHH}%-*HEHk UHHH}HEHHEHHEH t,HEH)HEHUHHH}HE OH !HHEHH HEHHE(OH `*HEH{HEHHE,OHo $-*HEHCHEHuHE7OH7 H@#-HEHH! HEH=HE>OHHEH HEDOHHEKOHHEHHE^OHHEhOHHEHHEOHrHEOHaHEH}HEOH?HEOH.HEHJHEH9UHH H}HEH HEHEREHHH OHHEHHEHHH OH@HUHHEHEEHHH OHHuUHHH}HEOHHEOH+HEH HEH HEOHHEHo HE OHp-HEFH^HEHHE–OHHEFH&HEHHEH HEHJHEHbHEH ÐUHH H}uHUHEOH*EHEHHEHHEOHH*EHEHHEHUHH0H}uHUHMHEHEHUHEHHrHEHHU؋MHEH'HEHcUHH0H}uHUHMHEHEHEHHHEHHbt0HEHYHU؋MHEHUHHH}HEH*HEHƿFMUHHH}HEHHEHƿtFUHHH}HEOHHEOHHEHHEHoHEOHp*HEHHEHHEHvÐUHH H}HuHEHEHEHH*HEHFHEHHE OH5HEH@HHEHHHEH7HE&OHHEH@HHEHHlHEHHE,OHHEH@HHEHH0HEHHE7OHHEH@ HHEHHHEHHEBOHEHEHHHEHHHEHHHEH7UHHH}HEHxHEH¾FUHH H}HEHƿHUHEHHHcUHH H}HEHƿ?HUHEHHHbcUHH H}HEHHE OHHEHHUHEHƿFHEHHELOHHUHEHH2HEHHEWOHHUHEHHHEHHxbUHHH}HEH{HEH HEHt,HEHHEHUHHH}HEbOH2 HEfOHHEHHEHHEkOH`HEFHHEHfHErOH(HEHHEOH%HEFHHEHHEHHEHHEHUHH0H}HEHEHUt~HEH@uHEؾHutHEؾOHǸqHEؾH=HEH}yHEؾOHǸqHE:HEH}uHEؾOHǸ_qHEؾH'HEHEغPOH&HEؾ/OHHEͿHgHEؾHHEؾHHEHUHUHHH}uMHEPOHHUHH H}HEHuHEHut&HEH|HEHEH9UHH H}HEHkuHEH/utHE3OHǸoHEHHEHEH8HEHAUHH H}HEHuHEHutHELOHǸWoHEHkHEHEH8HEHUHH0H}ظHEHEH@EEt tH7HEHEؾHtHEؾfOHǸnHEؾHAEHEHEfWf.EvHEؾOHǸinHEؾOHǸOnEHE؉H_HEEHE؉HHEؾ/OH~HEؾHHEؾHHEH}HEHEHEؾ/OH.H*EHEHHEؾH8H*EHEHHEؾH2HEؾHHMHEHUHEEHH:t E6EH*EHEHvHEH?HEؾH UHE؉HEUHE؉HjUHH0H}HEHE}}~EHE؉HutHEؾOHǸrl}uqHEؾHtHEؾfOHǸtHEOHǸOEHEHEHEHUHHEOHǸOEUHSHHhHhHHEHEHHu"HMHhkHHVqHEHEHyHEHUHMHhHHEԋUHhHEЃ}uHhOHǸNHEHxHUH``HHHxHUH`H``HJEπ}t"HMHhnHHkHEHxHH``mHEHEHHHEEHcHHHHHHEHHHFgHEUHMHhHHEH;EuqHEHHHUHhHHoHEHHUHHJHUHHPHhHHEH`H HEHH;EHxHUHHrHMH``HHEH}u]6nu HMHhnHHEHUHhHHEHEH`He]HEHPHEHЋMHEHOEHE}y'HEHxHH``pHEH`HHEHHHUHhHHHEHPHEHHEHPHhHEPMHhHHC8HH38HuHtHtHgH8HEHEH`H@/5HMHhHHsE]7H8HEHEH`H9-H9HĘ[]UHSHHH}HEHHEHEHHEHEHHEHHEHEHtHEHEHEHEHEH0HltHMHErHHHEHHEHEHUHuHEEHEH}u3HMHEHH=9HEHP0HEHHAHEHa.HEH\H?6HHD8HtH68H6HEHEH.93HMHEHH5HH[]UHH H}HEHHEHEH@HE@X։.t2HMHEHH2HEH9UHSHHHH$HEHHEHHt'HHHHEHEH HHHHHEHEHx0HEH@HHLHE؉PXHE؋PXHE؉P(H HH@$A IȹH1Eԃ}tHMHHHRHEH[HHHHHHH HHHOH3H:Ht2H}4HE0HMHHH1u3H{5H[]UHSHHHHHEHEHUHHHEHHHEHHjHEHHEHH{t'HHJHHEHEHHEHMHUHHHHEHHEHMHHuHEHSHEHMHUHHHyHEHU؋HUHuHHEH}u(.HuHѺH.HEHUHH2HEH@HEHE@EHEH0Ht(HE؋HEHMHy0bHEDEHUHMHy0HMHuHEIȹ@HEH}t HEH(H}uF-nt@Ot(O5O%HuHnHHUHHHfH`0HQHtIH+1HEH}t HEH4(_-HuHѺHZ 0H2H[]UHSHHHHHEHH3EHHEHHYt'HH(HHEHEHHEHHu HEHHEHHHEЋEHcHEHH=EHcHEHpHEHx0HEH0HAIȹ藩HEH}uM+nu$+HMHHH0HUHHHRHHH0$A IȹH ,Eă}tHMHHHdHEHHHUHHHEHHHHHHHHHHOH-H:Ht2H|.HE*HMHHHt-Hz/H[]UHHH}HEOmOH@HEOmOHHESOHHEfWHHEH HE[OHHEHHEHHEcOHH@HUHEEHbHEHHEH=UHH}E耚UHHH}H5,dH@4HxH*HHH H*XHEHUHH H}HEH襷tHEOHǸB?HEH1EE>*HEHiUHH0H}HEH5tHEؾ8OHǸ>HEH uHEؾHH4,dH@4EEBEHUEH։HEHЇHHEHHH,UHATSH@H}HEHEH ,HtHEH ,HzEHEPH,HH,HMHHHEH3H,UܾHH%*HH*,IHO(LH*HH,Hu(H*HEHF,UܾHIH*H",UܾHcLH,D$|H$xOAYOAeO|xOAҿQ'HHEHI3|xOH߸葚vXAcNH7(H@[A\]UHHH}HuHEH说u+HEH蒹tHEH|ttHEȠOHǸ<HE@t2HEPHEHHEPHEH HEHHEHt*HE@HEHHHEHH@HHEHfHEHHEPHEHHZGHEHHUHPUHHH}HE^sHUHHH}HE^sHuUHHH}H L,HE`OHHHEHÐUHHH}HEOHHEġOHHEHHEH HEH貲UHAVAUATS}HuEADAAADe܉]DuDmH}t HEU؉E[A\A]A^]UHSH8}HuHUHMLEE%EEy;Es$EH}؉HEЉ0HEȉHEH8[]UH}HuUHEEƉ8EHE}muԋE]UHH0}HuЉU؋EEE؃EHEHEHEHE܉HH8EHE}mu҃}tUHMEHΉIE܋EUHHHuHMHUHEIHƿu E%ÐUHHAc-HEE]UHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEHUHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HE@8]UHH}HEP8HE@09]UHH }}uEEH HHLHEH}uHEUP0HEH,HEUHHH}HEHaHEHUHHH}HE@8HEP8HEP4HEH HHEHHEHHUHH(H}0HEHH~HEHEHHHEHEHHHHEHHru,HEH7HEHEHHHEHEHHHHEH/uUHH`H}EEEHEHE5}t$HP+,dHHPHHEHH+EH,+,dHHPHHEHHEHEHEEH*,dHHHHHEH HjtYHEH H-HEHEHHHEHEHHHHEHE)HEH@@oE \EMf(\f(EfWf.Er HE@8HEP4HEHHDHEHE@4PHEP4HEP4HE@09tHEP4HE@0)HEP4HE@8PHEP8HEHH5t,]UHHH}HuH_>,HMHUHHHEH}u)H}t"Hp,HUOHǸ K HEUHH0V-Ht?HEH¾HEH*HEH*YX3HEHJ HEH*HEH*YXEHEHEEUHH U-HtLHEH¾^HEH*HEH*LYf(XUHEEHEHEEUHH EEfWf.wXEH,HEHEH*Mf(\f( ޏYH,HEHEH8HUH}uUEEeE;EEE=v6EEEEU%EE EE}EE]UHH }HuHUMHEUEΉkHEHEEHcHEHHMUHH}u]UHH H}uHEHEHE@EHE@HtPEHHŠwtHE@HHHH‹EHH ŠwtHE@HHHHȋ@ EBEHwtPEHwtEHwtHEPHEPEHwt9HtUEHwtEHEPEHHHwtEHHŠwtHHƿH‹EHHŠwtEHHŠwtHE@HHHHHEHEHHŠwtHE@HHHH‹EBDS-UHH H}R-PR-9Ht4R-ER-PHR-ѺwtHƿHrR-HkR-qR-HcHHHUHWR-UHH}H7R-=R-4R-.R-HcHHHUHR-uUHH H}uUE(EHHHEHHUHiEE;E|UHH0}܉uHR-UHcHHHEHEHHE0HE@,#E؉E}tUHEHHEH@ HEH}uUHH }uHR-UHcHHHEHE@ HtUE։JUHH}u}xQ-9E}UE։UHH0EHdR-UHcHHЋEH{Q-UHcHHHEHE@EHE@ EHE@ HE@HEHHE$HEPHE@, HEPHEH@ HEH}uHE@:EtEEyHP-HURuߋMЃEQ-9E(Q-UHH }uHP-UHcHH@ EHP-UHcHHHsP-MHcHH@ E ȈB }HtyQ-Q-Q-Q-9Ht1P-EP-HP-ѺPytHƿ]HP-HP-P-HcHHH‹EUHH }HEH?HEHhHO-UHcHHHHEH}uUHH}EǸUHHEDH>O-UHcHH@t$Eu u E7EO-9E|UHHN-E(HN-UHcHH@t E}muUHHE_HN-UHcHH@t?HtN-UHcHH@H\N-UHcHH@ EE:N-9E|UHH}EǸEǸvUHH}ȉuĉUEHHHHEHHHUH@HE؋EHHHHHEHHEEHHHHHEHHEHEH0H;EHHEHEHEHHEHEHEf.vHEHHEHEHHEHEH Ef.vHEH HEHEHHEHEH0Ef.HEH0HEHEHHEHEH;E&HEHEHEHHEHEHH;Es.HEHEf.vHEHHEHEHHEHEH H;Es.HEH Ef.vHEH HEHEHHEHEH0H;Es.HEH0Ef.vHEH0HEHEHHEMEf.sREHHHHEHHEHH H@HBHEH@UHUHEHH)HHEEHHHHEHHUHHUHPHE؋U]UHH}؉uԋEHHHHEHHHUH@HEEԃPHEE;Et~EHHHHEHEf.s\EHHHHEHЋUHcHHHUHH HHRHPEHHHHEHH@UԉEEcEHHHHEHHUHHUHPHEUԉ]UHHH}uU}~YEHHHHEHEPHHHHHHEHf.rUHEHUMHEHUHH H}uEEPHEHVEE;E|UHHxtEEEyQuEEy& OHEHuEEEI-I-y E I-I-E։AEWH-yH-H-I- I-xt64Hf UHH H}HEHHEH-H-tlH--EFH-y#HE8H-HMHΉ H-xt U H UHH0H}؉uԋEԃt>G-yG-HMHΉ1G-HMHΉG-#J-tPJ-E@+EHHH@|tHt E}muƋH-H-H-E`HH-UHcHHH@ tBHH-UHcHHH@ HvH-UHcHHHHe}muHP HH UHH}EHHH@|t {tUHH}EUHH }}Hug}@HuXmEHHH@|tEHHH@|tH@HEHEHHEH@ HEH}uUHH H>H-HHΉHEHHEHE'HmHEHHH;EwH}HUHH0}܉u؉UԋEԉEE%tEԉEE=uEE܃HH@tHEgHE@,;Et HE@,uD}tHE@(t0HE@HEU؉P0HEUԉP4HEH?HEH@ HEH}uUHH H}uHE HƿE}+u^HEHƿnE}~?HEHUMEΉUEƿHUHH0}܉u؉Uԃ}HHC-UHcHH@ EHC-UHcHH‹EԈB E܉HoC-MHcHHȋH H @ H H HEEԃЋEԃt ЉE}tE;Et=B-HMU܉HxHt0}.B-HMUܾP8~Ht3E;EWB-HMUܾ6HH3B-UHcHH@ EB-PB-9Ht4B-EB-PHB-ѺDytHƿ3HB-HB-B-HcHHыU܉iB-7E܉HA-UHcHHЋP P H0UHH@EȋB-Ht HEHD-HHt HD-MzY,ȋA-H5A-@-EHD-HHt HyD-ЋEHtAO EXH ?A-EHcHHHHHHEHEH@EHc@-UHcHH@EHEtHU ЉEH@-UHcHHЋP HEH@H 9Ht J@-E#EHt{H?-UHcHH‹EB EЋEt ЉHE}t=P?-HMUt ?-UE։EE;E?-9EHt_H?-H ?-P?-ƿ ?-?-HcHHHHHƿHo?-?-EHj?-UHcHHЋEH>-UHcHH@EHs>-UHcHH@ y}tUߋE։>H>-UHcHHH>- >- >- >-HcHHȋ}mDUHH}=-=-y(t &u=-=-y|p=-ǸHMbP?HM=-HJ=-4GHG=-7G=-@=-HcHHHHHƿ$H=-UHH=-HH=-H=-=-=-H=-]UH<-, TO |<-v<-x܋l<-Ǹ]UHH}uHEHE}mu]UHH }uUE;E<EP<-9HtX<-EEPH<-Ѻ ytHƿDHw<-y<-+EHg<-MHcHHʉHEHI<-UHcHHЋE}H&<-UHcHH <-EU;-;-;-9Ht1;-E;-H;-ѺytHƿH;-H;-UHcHH‹EH;-UHcHHЋ;EtOFpOǦO}tCHM;-UHcHH‹EȋEt fBH;-UHcHH:-:-:-;EHt`H:-UHcHHH:- :-HcHHHHH:-H:-MHcHHʋHcHH‹EUHH EHn=-HHt HY=-MbsY,Ћ8:-HcH":-HHEH%=-HHt H=-ЋEHtW; u % uH'8-Hu 1ܦOhH9-HEHz9-9-HcHHH;EwOnpOOHE@fHtomHE@ HtHECHE@tHUR҃ HE։ HE}6UH}HMbP?H7-H7-:GH8-8-Hd8-b8-\8-]UHHN8-HH*8-H]UHSH8}̉uȉUċE;E!E̍P?HEẺЃ?)кHӉHHHE7-;EHEE܋EHcHm7-HHH[7-EHcHS7-HHHA7-EHcH97-HHH'7-EHcH7-HHH 7-JH6-7-HcHHH6- 6-HcHHHHH6-6-6-;E|H6-UHcHHH6-MHcHHHH EHEău8H[6-UHcHHHG6-MHcHHHHMHH!HH36-UHcHHH6-MHcHHHH EHEău;H5-UHcHHH5-MHcHHHHMHH!HH8[]UHSHXEH8-HHt H8-EH,HEHEH*Mf(\f( nYH,HE]5-EEHcH *5-H+5-HH(EHcH 5-H5-HH H 5-H4- 5-HMIȹHEH8-HHt H7-ЋEHtW u L uH3-Hu +COE `4-EH94-UHcHHHHEH.4-UHcHHHHEH}u H}E@|EHӉHHHEEHEHUH!H EHEHUH!Ht Eă}HtEE‹EĉƉ}mq}m HHX[]UH}Hư>H2-H2-@GH2-4CG3-H2-H2-H2-H2-]UHH2-HJH2-H6H2-H"H2-H]UH]UH ]UHSH.9u9tH[]UHEMMME]UHHEeEUHHE,=weEUH-1-]UH4-]UH4-]UHEHEH0-]UHEHEH0-]UHH}HEH4-]UHH4-]UHH}HEH4-]UHH}HuHEHa4-HEH^4-]UHH0}܋{0-E܉4-|/-u*HEH¾Hu N/-L/-u*HEH¾Hu /-E%t s0-E%u-u$ROHtROHuE8EHEH.-EHEH.-H.-H.-.- .-\.-H+3-VGH7/-H3/-1/-3/-1-0-/-/-)/-#/-E%t0-E% t1-E%u* E܋.-uE܃tE܉w.-q.-uE܃tE܉_S.-M.-uE܃tE܉/.- xt xt@@ xt@H--/#Gxtxt@@xt@H=.-0Gxt@UHH/-Ht% z/-Hg/-HHa1-zttttV'xtt.--x }--t--x j--@{tt /-.-x .---x ,-,-u,-u4,-u}EEHHŠwtHEHwtEHwtEHwtEHHŠwtEHHŀytHfEHytEHytEHytEHHŀyt}mGH,-HH+-+-H+-H*-*-*-H*-H,-Ht,-n,-l,-HU,-H^,-HsO,-I,-G,-H0,-H9,-H>*,-$,-",-H ,-H,-H ,-,-,-Hv,-H,-Hp,-j,-h,-HQ,-H,-H ,-,-,-H+-H+-Hj+-+-+-H+-H+-H5+-+-+-H+-)---UH)-u#+xtt:xt)-x )-*xtb)-]UHHH}HE@xHE@uӱO `OOHE@tJHE@HHŠwtHE@HHHHHH;EtӱO `OOUHH H}uE'EHHHHEHH@;EtDZO& `OOr}tFEPHHHHHHEHEHHHHEHf.ruDZO' `OPOEHHHHEHEHHHHEHH@H f.zf.tDZO( `OȩOEHHHHEHH@HEE;EUHHH}u[EHHHEHHU9tO3 `OO$EHHHEHHH}muUHH &-}OA `O]O'-'-9}OC `OmOE7H'-UHcHHЋyOE `OOcE]'-9E|~&-yOG `OO1EEH?&-UHcHHHHEHEHEHEH}EEt/HEH;EuOR `OЪOHEH@ HEHEtOV `OOHE@(;EtOW `OPO_HEH@ HEH}REn%-9E?&-=&-9}O[ `OO &-H&-H1&- &-9}O_ `OO%-H%-HEEHwtEHwt9}Oe `OȫOt&-yOg `OOQEHytEHyt9}Oh `OOEHytEHHŀytH}m=%-%-9}On `OO{%-Hh%-H5p%-n%-9}Os `O$O}K%-H8%-HH%-F%-9}Ox `O=O=#%-H%-H$-$-9}O} `ORO$-H$-Hu$-$-9}O `OkOk$-HX$-H5UHH}s&-u{e&-E?tTtt@@t@H*-4G*-t@th^ %-%-UH"-]UHHH}uHEH@MHUHUHEEEHwtE}muE]UHHC!-8!-/!-q'!-HH Šwt!-HcЋwtrHcЉ4wtHwtHHHHEHEH@HEHH@HUJHUHHЋ -Hwtx -YUHHg"-HteEJEHwtuKEHytt*EH ytEHHŀyt H}muUHHe!-RHJ!-H0b-f.1H)!-H0H@HEHE@(fWf.zfWf.HEH HE@(XHE@ HEH -f.vH-HUHB HE@(fWf.wO `OOH -HP0Hy -H0H@H@ H p -H] -H HEHAHEH: -t!H# -H0;-f.UHH@H}HE@0f.Xv HEH@0 H ?HEHE@(E-HEH(\^EEHEHEEYEXEERHE@0XEEEf.Ez Ef.EtHt H:-HEHEHE$-f.EsHUHEHB UHH zH-H0H@HEHEH@8HHEHP8H-HMHEEHEHEHUHB HE@  -f.sOK `OجOlH}-HP0Hr-H0H@H@ H i-HV-HktHE@0fWf.z fWf.tKHEHH-HP0H -H0H@H@ H -H-H HEHHEH-t!H-H0-f.o-t!H-H0g-f.[UHH EHH-UHcHHH@HEHEH@8Ht4HEHP8H-HMHEEHEHEHUHB )HE@0fWf.z fWf.t HEHH-UHcHHH-MHcHHH@H@ HE-;E1-Hs-HUHEERH>-UHcHHHHEHEH@HUHRB XE@ HEH@H@ HUHE-9E|]UHH0E؋-HaH-HEEHEH-- -\ vTf.Ht! --Xc-Hw-Hh-EHEH;-E'- ?-\;- 3-E\EfWf.EvE Sf.HgSf.EHH/EHEH-EHEH-H-H-m}DEHEHT-l- D-f.Hu0M-XE RX -f.Ht- -\H-H-UHH@}̋k-b--=uO `O@O-HK-Ћ-Ht*)-9Ht---Ht/-t% -H-H>H-Ћ-Ht% |-Hi-@HH-Ћ-H'-HtHEHEH-HEH}Ô%ITHEEq-ẼHt-Htt -Htc-HHvM@HE-t4H-H0 -\EEf.EvHEHE-t4H-H0 q-\EEf.EvHEHE4-f.EHt H-HE)-f.EHt H-HE-fWf.zfWf.uH --\Ef(\f(E -E\Mf.v -E\EEfWf.Ht!HEHEEE\EE--*-H;-HEHEE -x-v-t3xtuOO `OOxt觿EXEHK-Ht 8-H%-HH?-Ћc-HtT-HttẼH-u ----UH}E-]UH--]UH--]UHHH}Ô%ITHEEUH]UHHH-HE-\EUHH}HuHEHHEHP HEHUH]UHH}Hu6HEHH;EHtHEHP HEHHEHH HEHEHHu]UHH}HE@t:HE@HHŠwtHE@HHHHH xtHE@]UHH}HEHEHE@E}HtHHE@HHŠwtUHcHHHHEHEH xtHE@HE@]UHH}HE@E}MEE}NEEHEUP]UHHH}uHEHHEUUHHH}HEUHH H}HE@(EHEHO}yzO `OOHE@,%ƒE։蒿HE@,€HEP,UHHH}HEHHEHHE@(xHEP(-9}uoO `OOH-HE@(HHHHUHHHHEHHE@(UHH H}HEH.HEH G-XHE@ HE@(fWf.s`O* `OXO---PHEHHEP-9Ht4-EHEPH-Ѻ`ytHƿHp-Hi-HEHHHHEHBHK-HEHHHH 5-HEHHHH@H@ HHEH-HUHH H}HEH HEHHEEH-UHcHHH@H;EtROF `OO---;EHtWHc-UHcHHHO- U-HcHHHH HHRHP 3-H -UHHE@  * -\HE@ HEH<UHHH}HEHHEHE@(fWf.z fWf.ttHEH( -XHE@ H| -HEHHHH f -HEHHHH@H@ HHE L -H9 -HGHEH"9HE@(fWf.z fWf.tHEH@(HUHB HEHUHH}HE@ HEt H -HEM\EHEHEE]UHH H}HEHHEH@8Ht4HEHP8Hc -HMHEEHEHEHUHB gHE@0fWf.z fWf.t:HE@0fWf.s@O `OOHEHHEH@(HUHB  - - -PHEHHEP -9Ht4 -EHEPH -ѺpytHƿHi -Hb -HEHHHHEHBHD -HEHHHH . -HEHHHH@H@ HHEH -H谾UHH H}HEHHEHHEEH -UHcHHH@H;Et O `OPOq - - -;EHtWH\ -UHcHHHH - N -HcHHHH HHRHP , -H -UH趾HEHCUHHH}HEHHEH-UHHHXHXHHX@(~HX@(@uO `OOK -{t舼 - -y&#u{tX - -xu -ع{t!@{t@{t@@@{t@H -2Gr - - -@{t@@{tA -xAHX@(ƿ{t{t? -{t舻HXHDHX@(HHH@|tHPHXHHHXH@ H -AHDž`*2GH`HH蠽EHX@(H`HΉ# -%@tYH`HHHX@(H`HHH`HHƿ HUHHHxHxHHxHHx@(HHH@|tHPHxHH}HxHHx@(HHH@|tH@H=-xiHEHHxP(HEHHx@(ƿ{t[-{ttHEHƿ Hx@(& HUHHH}HEHu9HEHHE@,HHH@tHEHH4UHHH}HEHHEHu4HE@,HHH@tHEHHHEH|UHH HHHH`- "HΉjHH)-uGH@XfWf.z fWf.t HH@X HON8@HHBPHH@`HHH)uoHH=stKHH=St@HHBP@H@XfWf.z fWf.t HH@X HON8@HHBPht\ HH@`HNH=HHP`HHH5 u  EH/H膼HEH}tlHH9Et_HEU-HHΉHHy 芿jz ZHx/HHHHztHHHHH(t2HH(HHH(tUHH H}HE苀E}xJHEǀEEEHHHztHEHHbs-U։gUHH }uHU}y+EHUMEΉE}~EHHŠztHEHEHEHEH@ HEHE;Et}uaHE@%tEHHHHEHEHEHUΉHEP EЃEE;E|HUH蟥=v -]UHH߻E}xEUH-}-m-g-xn]-c`zt`zt@@`zt@Ha-xG#-e-_-`zt@`ztF]UHH ,Z`zt,q,,x2,謯,,,`ztEEHHŠztHEEHHŠztHEHEHEH@ HEHEǀ,xHEHoHE@XfWf.z fWf.t HEH@X HON8@HUHBPHEH(tHEH(HHEH(tH}LE}UHHH}HEHHEH@`HHyHEHǀHEHHuHEHǀUHHHXTHXH(HEHEH`HHHHHEHMH`HEHH9HhHEHH9xHE9HpHEHH9|HE9uuUHE9udHUHEH H9uPHUHEH(H9u,D,HcHHHHEHUHHH}HEHHEHu{HEEH,UHcHHHH, , , ,HcHHHHH,UHcHHHHUHEH-UHH H}HEHh,_,Y,HEHE,;,9Ht1(,E#,H,ѺztHƿҝH,H,,HcHHHHEHUHHH}HEH)HEHu{HEEH,UHcHHHH{, , x, r,HcHHHHHO,UHcHHHHUHEHUHH H}HEH,, ,HEHW,,9Ht1,E,H,Ѻ ztHƿrH,H,,HcHHHHEHUHHH}HEHHEHHEEH5,UHcHHHH, #, , ,HcHHHHH,UHcHHHHUHEH_UHH H}HEHHE@ O,,,HEH,,9Ht1r,Em,HZ,Ѻ8ztHƿH?,H8,>,HcHHHHEHUHHH}HEHKHEHu{HEEH,UHcHHHH, , , ,HcHHHHH,UHcHHHHUHEHUHHH}HE@ (ztUHH H}uHEH@`HEHEH@hHEHEH0HEH0H2HEHBHMUHEHΉUHH H}uHEHEHEH0HW UHEH^UHH H}uHEH0HEHEH UHEH"UHH0}uEHUHMоp茖HEH}HtHUHEHֿHEHUHP`HEHUHPhHUHE@@HE@HEH@LG}x%HEUP(E€ʀHEP,HEHAHEHP0HEH0@@HEH0@HEH@HGEfWf.r-HEHP0HEHB HUHBXHEH0H UHHpHHHHH蕭HH衱HH]HpHHHpHƿCHHHHHEHHƿHH蜤EUHHH}uHE@;E}4HEHH=HEUPHE@HHHHEHHEHUHSH}HuHEHHEHHH)HiHEHHHEH@HH)HH []UHH}]UHHH}HEHH螤HEH@HUHRHPHEH@HUHRHPHEHjUH>,EE]UH0,EE]UH",EE]UH,EE]UHH}EcHEH}u HE@H&E܉HEPfHEHUHPpHEHUHPhHEH@xrGHE@eƒHEPeHEH>aHHEHP(HEH@(HuHEH &UHEHPPUHEHPXHEHHEUHH0H}uUHMLEоRbHEH}u HE@H%EHEPfHEHUHPpHEHUHPhHEH@xrGHE@eƒHEPeHEHR`HHEHP(HEH@(HuHEH UHEHPPHEHHEUHH0H}uUHMLEоqaHEH}u HE@H)EHEPfHEHUHPpHEHUHPhHEH@xrGHE@eƒHEPeHEHq_HHEHP(HEH@(HuHEH?UHEHPPHEHHEUHH0}HuUHMLEо`HEH}u HEUPHEHEPfHEHUHPpHEHUHPhHEH@xrGHE@eƒHEPeHEH^HHEHP(HEH@(HuHEH_HEHHEUHH H}uHUHMHuHMUHEIHƿ.UHH H}uHUHMHuHMUHEIHƿUHH H}uHUHMHuHMUHEIHƿ UHH H}uHUHMHuHMUHEIHƿ!MUHH H}uHUHMHuHMUHEIHƿ"UHH H}uHUHMHuHMUHEIHƿ'UHH H}uHUHMHuHMUHEIHƿ(UHH0H}uUHMLEо3^HEH}u HE@HEHEPfHEHUHPpHEHUHPhHEH@xrGHE@eƒHEPeHEH3\HHEHP(HEH@(HuHEHHEUPLHEH諽HEUHH@H}uHU؉MLELMȾO]HEH}u HE@H+EHEPfHEHUHPpHEHUHPhHEH@xrGHE@eƒHEPeHEHO[HHEHP(HEH@(HuHEH'UHEHPPHUHEHPHEH躼HEUHH@}HuHU؉MLELMȾ^\HEH}u HEUPHEHEPfHEHUHPpHEHUHPhHEH@xrGHE@eƒHEPeHEH_ZHHEHP(HEH@(HuHEH-[HE@eƒHEPeHEHZHHEHP0HEH@0HuHEHHEH薻HEUHH0H}HuUHMLEH}HuMHUHEIIHƿ,UHH0H}HuUHMLEH}HuMHUHEIIHƿ-XUHH0H}HuUHMLEH}HuMHUHEIIHƿ*UHH0H}uHUHMоxZHEH}uZHE@HEHEPfHEHUHPpHEHUHPhHEH@xrGHEHUHHEH9HEUHH H}HuEYHEH}uKHE@HEHEPfHEHUHPpHEHUHPhHEH@xrGHEH费HEUHH H}HuUEHcHEHPPHEHUHHEH貶UHHH}uEHcHEHPPHEH臶UHHH}HuHE@Lu)O `OشO'OHE@eƒHEPeHEH@ HPHEHP HEHUHHEHǀHEHHEHHEHHtHEHHUHHEHUHUHH }uHUHMHMHUuEߺÐUHHHţ,HEH£,HEHǣ,H,HHHEHUHLUSATAUAVAWH'H&A_A^A]A\[]UHH@H}HuHUHMLEH}HEH>,HEH;,HEH8,HEH5,HUHEHHEHHEHHPHEHHEHH -AHEHHPHEHHEHHGHEHHPHEHHEH0H0KH,H,HHHYÐUHSHHhH`HXH`HHEHEHEH<-HEHHHEHH<-uHEHHHErHXHE[HEHHHEH@HSHt.HE؋@uHEHHH>OHEHE(HE؋uHEHEHH"HEHHLHxH`HHEHEHEHxHEHxH`HHXgKHEH<-HEHHwHEHH<-BHEHHHXHEHEH@HEHE!HEHHHEHEHHE HEHEHEtHEHE8tHE<=tHEHEt|HEtdHEHHpHUHEHHHH)HȉH`HH+I𾘵OHǸVHxH1MJHEHEHEHEHEHEHHuHE(HEt HEH@HEHEHHHEudHEHHXHEHHŵOHTH`HH$+IؾǵOHǸ'VHxHhLNIHXHEHE(HEHE9uHE@HxHEyHEHE9udHEHHXHEHHŵOH TH`HHo+IؾOHǸrUHxHKHHEHEH;EyHE@HEHH=HOHPHEHPHEH@HHEHEHHt HEH<-u]HEHHtKHEHHHHH`HH+0OHǸTHxHJGHEHHEHPHEHH=HOHtdHEHHXHEHHŵOHRH`HH+Iؾ`OHǸTHxHGJ-GHEH@HEbHEHEHHEHHEHEHEHHuJHEHHHEHXHEHEHEH@H'NHlHE@urHxHE[HEHE9uFHEH`HH+OHǸSHxHGI-FHEHEH;EuHEHEHE@HEHtHEHPHEHPHEHEHHt HEH<-uXHEHHtFHEH`HH8+OHǸ>RHxHHeEHEHHEHPHEHEH@HEHEYHE(HE\HEH`HH+ OHǸQHxHGDHEHEHHEHHEHEHEHH6HEHEHHUH`HH)HHHhHxHĨ[]UHH}uHEHEHEHE;EHEHEHEuHE]UHH}uHUHEHEHE+HE;EuH}uHEHPHEHHEHEHEuHE]UHH}uHUHEHE&HE;EuH}u HEH@HmHEHEuи]UHH@H}؉uHUHMHEHHEHHEHEHEHEHEKHE;Eu;HEH;EuUHEHHHEHMHEHPHEHHEHEHEuHEH;Et HEHHUHEHH)HHUHHH}HEHEUHSHxH}HEHEEE6H HEH HMH HEfE HEH@HEE&O?HEt&EHEHEƿ)O?&O?HEH@HEHEHH}t-Op?&O_?HEH@Ht:HEHXHEHHDU)HEHHHƿ0O?HEHẺƿ9O>HEH@ HHEH@ HEEHcHEHHEHmHEH;Ev HE< uHEH;EuEHcHEHHEHUHEHH)HHU؉ƿ@Om>HEHEHEtHEHƿFOD>HEHCUHcH9NHEH? IO?HE(HEH4MHx[]ÐUHH}HE@ ]UHH}HEPHE@ )ȃ]UHHH}uHEH;E}HEP EHEH*UHH}HEHHE@ HH]UHH}uHEP EHEP ]UHHH}EHEHeHEHHE@ HcHUPHEP UHH}EHEHHE@ HcHUPHEP ]UHH H}HuUUHEHEHcHEHHE@ HHHEHHfLHEP EHEP UHH H}HuUEHcHEHHE@ HHHEHHLHEP EHEP UHH}HEHHE@ HH]UHH}HuH}t HEP HEHEH]UHH H}HEHHEH}uHEOHǸ4\HEUHHH}uHEHV;E~EHHEOH[tHEHHEH;E|HEHQUHHpH}uHUMDEUHEHtjUHEHEMUHEAȉѺO@HǸ;E;EE;E~HUHEHZHEUHEHcHEHHHIUHH H}uHUHMDEH}uHEgsEUHEHt^}t5UHEHuUHEHUHE#HUuHEHѺHpHE}t+HEt HE;EuHEHEH)HEHHHEHHHEHHoUHH H}HEHHEHEH HEAHHEH$HEAHHEH(HEAHUHH H}HEHHEHEH,HEAHTUHH H}HEHHEHEH@HEAH UHH H}HEH~HEHEH4HEAHUHH H}HEH4HEHE8EHEH8HEAH+HE8;Et9HE8tHEHH!HEHH#UHH H}HEHHEHEH0HEAgsHUHH H}HEHAHEHEH<HEAHEUHH H}HEHHEH}tHEHH5"HEUHH H}HEHHHEHEHHEmGHHE+OHHEH&HEǀ HEǀ$HEǀ( HEǀ,HEǀ@HEǀ0HEǀ<HEǀ8HEǀ4HEHHEHEUHc E}~HEǀHEǀHEǀlHEǀtHEǀ HEǀHE HEǀ HE@$ HE@( HE@4 HEǀ HEǀ HEǀ$ HEǀ HEǀ8 HEǀ HEǀ HEǀ HEǀ EEP0HEHc E} ~EHUEHƄE}~HEƀ""HEƀ\\HEƀ//HEƀbHEƀt HEƀn HEƀf HEƀr HEƀuuUHH0H}HuHUMLEHE8u HEHUHEHHEH7HHMHE0OHǸSUHH@H}HuЉUHUMHE؉HHEHE‰HEЉHHEо"HEbEHcHEHHHŠ_sHEH}tHUHEHH: !EHcHEHHEЉH-EEHcHEH9rHEо"H H4AUHH0H}HuHUEEHEHHEHHEHEHEHEfWf.Ez fWf.EtfHEHEE@f.EzMf.EuFE tf.r3*EMf.v E,EEHEH HEHHEH}HE$~VHE$E;E}CHE(;E}4HE uHUHuHEAHOHEUHH H}HuUHMHE,;E|HEHqu5HE8u HEHUHEhOHǸPUHH0H}HuUHMDEHEо[HEE`}tHEо,HkEUHEH6HMЋUHuHEHHEHbEE;E~HEо]H UHSHHH}HuHUȉMċUHE؉HoEHEHEHEЋ0uRHEHEE^7uHEHEE85MHUHuHEAOHWHEЋ0u1HEHEE4t_HEȺOHHEHEE6uHEHEE4tHEȺOHjUHEȾ HcHEЋ4HEHHHEHEEH"EUHEȉHxHH[]UHH0H}HuUHMHEо{HiHEHqE}tHEо,H:EHEHCE}uBHEо"HHUHuHEHHEкOHRP}u+HMHEHH HEо:HHUHuHEAOHfHMЋUHuHEH=HEHHEH'HEо}H3UHH0H}HuUHMHEH,KHOHMHEHH2AHUHuHEH#HEHtHEкݹOH HEкOHEHMЋUHuHEH"HUHMHEHHE}~}HMЋUHuHEAHX~HMЋUHuHEHleHEкOH`MHEH<HuHEкOH2HUHuHEAOHwUHH`H}HEHHEHEHtHE0OHJHE8uHEHEHEHHEHHEHEH]HUHuHEHѺHHUHEHH)HEEHcHMHEHHoHE8u HEHH9UHE}/~}9 E0M }`~}f EW]UHH(H}E=EHcHEH‹EHTEHDy'E}~E E‹E‹EUHH}u}EHE}.EƒHEHEHPE?Ȁ}AE ƒHEHEHPE?ȀHEHPE?Ȁe}WEƒHEHEHPE ?ȀHEHPE?ȀHEHPE?Ȁ]UHH0H}EHEH@HHTE}y 3E%=E%t HEHPEHH<\uHEH@UHcHH/HEH_HUHuHEHѺһOHLUHHpH}HEH讴tHE0OH;HEHHEHUHEH=HEEHEHEHEHv0HEtHEHuHEOHǸ;HE+HEHUHEHHHUHMHEHH:HUHEHHE tHUHuHEHѺFOH3HEHH)UHH0H}HuU܋MHENOHhEE܉HEH辷EE;E|HEHHUHEHHHEH+MHEHHEHEHHuE܉HEHUHH H}HEHIJtHE0OH:HEH HEH1HEH E}u@}u$HEH2HEHHE`OHǸ9UHHHHHP`OHHHlHHHHHHHPHHHH HHHHHOH.HHOHHHOHHHOHHHOHHO'UHH0H}HEർOHE讼OHEHEHHEغHHHEغKOH]EPEHHTHEؾH)HEغHHAEHHTHEؾHEEHHDHuHz&UHHH}HEHUHHH}HEHÐUHH}HEPHE@ )ȃ]UHHH}uHEH;E}HEP EHEHUHH}HEHHE@ HH]UHHHXH`HhLpLxt )E)M)U)])e)m)u)}H(Dž8Dž<0HEH@HPHHHz+H8H(HHHz+Hƿ H$UHH H}u} E EEHEHHEUPHE@ HE@HE@HE@HE@EHHOHHEHHEHHu8OHEHcUHH } HEH}u8ORUHEH HE@HEUHHH}u}t}uFOHEUPUHHH}HE@t8HExHEp HEHHUHy+AAhOHǸ#UHHH}HEHHEHHtHEHH1HEHHE@t HEHUHH H}HuHEHEHHaHEH}u+Hr+H fOX3HEHEEHcHMHEHHEHcHEHHE.HHEH}t H+HEHUHEHHEHEHEHEHHEHH)HHHEHHEH}~ HEHHEHHEEUHH H}u}~}~OxOؿOeMgfff)ȉEMgfff)‰)‰ЉEHE%HEH.E}tEHcHEH‹E0EEHcHEH‹E0EEHcHEHgEEHcHEHUHH`H}EuUHEHG+<.u)HEHUHMHEE Hϸr uHEHUHMHEE HϸI EHEHEHEF+8t HE.HUHEHEHEuEUH]ÐUHt;rOO@O H9uOOOg PtPW8P G8]UHWJv5u `#Huu tȃ]UHAWAVAUATSHIIAD(A{uHs(LCƒDtCAU(!Ɖу@t uOO O  ЈCIVAU(uA@tOOOD AAE0H9uAE0CHL OAAHt E-LH[A\A]A^A_]UHATSHNV@ tI(@tO9OO S us tO<OO sSHtFtLt{ tO?OOJ sFL@uktOAO2O SBHv32V9tOBOPO FtL{tKKE t@t; t)t$ɃvOGOXO AD$8C A\$8[A\]UHAUATSHIHL3HtFtLNHL9uH[A\A]]UHAUATSHIf~PI^w,ID$HЀxu0FtLuAD$Rft LAD$Vft LAD$Xft LAt$0FtLH[A\A]]UHAWAVAUATSH(H}Do8AUAEtO.OO:AEAE HMA8 lA} tOf2OIOA]HC HH}HE HMHxHE"kuMvuM KEDEHuӋU~AE EAEHMA@AE Di@jEEugAEt_L$AUHڋBHv42V9tOOOFt H}HL9uEuEE}UUȉH@M$A|$AD$ uOOaOu}u?Pv7At$V9tOOO?Ft H};}uCAD$Pv6A4$V9tOOOFt H}A9-}~AeAUAEH@HDH>A}tOf8O}OLAuFt H}A}tAA}uuAEHpHA8MvOOO1@t H}-A}ADtFt H}ACA9rUDD$Pv9Dt V9tOOOFt H}ACA9rA}uAEHAEH A}tOf=OODMAE(`A]HHylHH)HAD$HH9sOOOAL$4Ft'H9sOOOH}HuAE&ft H}AE mA}tOfAOOzHUBOOOG)t<u>OOO~~ u>OOO_<w H[ AD N]G)<w1UHFwPOOO 6VG( ЈF]UH勏FHHFH Pv?VDBD9uRɋA@(tOOhOHFFFG0w0FuaW)w!FF vDVBt;`4W( ЈFG)t<u`OOO]G)<w UH<]UHH]LeLmLuH IAԋ_H8unO"O@OA͉DH{SHEt tL 8unO&OhOhH9tnO'OOHE)Dk H]LeLmLuUHAWAVAUATSHIDwA~)AF)$ŠOAF8AF<AF@AFtLAp,FtLAPv8AV9tsO^OOFtLLAF)A~8t LsAF)dAQAHML9P RH9u&PR H9t4B @HH9u PR H9t OhO`OCuASBHv32V9t OjOPOFtLS L9{LAF@AF8AF@A@tOAO8O2AD$t LL*ILLLMAFHHwHw:UHSHHHGHHx@u@HHH)XAAAuFxt8HcHH)x\@w$HzH{HKxHC0HxHʹH HHUHAUATSHHAIHEذOHwHHUEA$''wHSH+SHEdHt3xhu-Au'H5+HLHUH߸NH(H5+HMHMDH߸$HHUHSHHHPHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8HcH5-+H(H HHUHHcH5+UHATSHHAHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8HcH5y+H(H HDHUHHcHN+UHATSHAy HcHGH HcHGHDH XH;Cs+@ =vЃEȉH ͠OH5+HH߸/ HDHPUHHcH O^UHWHH]UHUHUH,UHSHHHU>UtHcH H¾ PHDH[]UHSHHHPHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8H(HOHHUHWF9u&9|w`=w`vOJO-O=vOJO-Oxf.zt ]ÐUHH]LeLmH HAԋF V9vD,DH6HDk CH D$CH]LeLmUHAVAUATSIIẢFV 9v9v9wI6IA^ AFIDAFEtAt@4HA9w[A\A]A^]UHG DV A9AEFEt\DGNA9uADDLA9t1AȉD)ʃ| AA9tA9 A9wD)]UHAVAUATSDoA})DvB IDHHA}tVIEHt@zt$ Hʀyt OPOOW #BI02HuȃuAUHIuA)U I}AUA]Me[A\A]A^]UHAWAVAUATSH(H}Hv 8IAHEDpv-6ALAD11Љ)AL<3t#6AD1ЉA 1ȉ) I1Ɖ )1)1)ȉẺA#NIAKD<%H=vH:{H"{t!{tO~OOHD9k uxH{Eu$O2OOы4A34 tD)|> u1A9wS!AN(@ SHUm{tOOO=H]D9k u=HsLLu*S!AN(H@SHuAMH}HAF(CCDk ẺCCH{LLIBD;EA#FIIAV ANBAF H9vt H}yHH([A\A]A^A_]UHHo V H)W HP]ËFwUHOqHG tnGaGnÅxiGnGf-GiGnGf]UH1)H AHA)0хuHyH@-H]UHSH(HH}.HHuHMH([]UHSHHH}uHUH H)HHH[]UH]UHH]LeHIӋV 9s F؉H6I$A\$ I$H]LeUHAWAVAUATSHHIII׋GHEIIXHHHHQLLmHE@`HEH HE%LHHWHL)LLLYC1)1ЋO)#GH@H]UHwB,Ёw2*f.z#u!~ BH]UHH]LeLmLuH IAA֍FwA4 H@ @D`H@ CCDcCAEHhC| H@ @@@@@@AEHhCEt7Av LB LCDcEtQAv LDAƍ @LwDHRHЉPCADsHH]LeLmLuUHHptDH9wpt.xH IH AA A9s]UH2DND9uvAMI(@tOOhOHH9u`MUvGAFUAVBD9uEAv LD [LHRHЉPAFA^uOMEOqOFHRHBB B9sAEHhAFAFU9UE~AVLuDuM$A|$t\HuLI$HH Jv;H9uPAE@(tOOhO}A9wLuA~MULLZAF}D}LuDuH@M$A|$t_IT$HuLI$HH Jv;H9uPAE@(tOOhOA9sAEUHRH)P HxLP$AFUAVUuEXH([A\A]A^A_]UHFtȃ]]UHAVAUATSIIHӋRw,ȉ;Ns *f.ztg9t^HLtII~HtAD$I)IAiƫAD$&EvMú{u LAL$9HAt$|2tt H|2te*AD$HHCH P4SJ9uRAE@(OOhO 9r)AL$9At$HRHփzHRHփzHBHH Hv; q9uIAE@(tOOhOxHHCH PvcSJ9uRAE@(tGOOhO)9D! [A\A]A^]UHAWAVAUATSI_v;wC|u.J|ED)ƒwDpAAEfA}uQC$E=v;AAD9v IcAEH DLHtxuEt$rAD9v IcAEH DLHtBxu:G<4AD9v IcAEH DLrHtxEDEEEDD)wD[A\A]A^A_]ÐUHATSHIF$4)@@@HS@PD`S%  )ʈS%[A\]UHW BH9u H΋v H9tOYO`O2JP @P ]UHHV )W HP]UHH]LeHHI~uH|k H{LSH]LeUHAVAUATSIIDohCu{u HSH9uOWYOhO|AD$(SAE(t HLPHHLUA\$(Ht+{tOUYOOCL9c[A\A]A^]UHH]LeLmH HAIՍ4 m@@D`SHPDhH]LeLmUHAWAVAUATSHIIIAD$$EtPL|L@@@ HPPAT$D1PAD]HL9uEAELH[A\A]A^A_]UHAWAVAUATSHHIHuHUGP$9P rVHEPHuL$HEHUR$UIWHUHDHEAL}HUȋBF4(fEAHUHHEDxII(P(HzBH9zu"HJH9tH9u\H0zu HJH9uO+YOO H9u*HJ!Aw(@JIԋHt+ztO*YO`O贽BH9tH}AW(P@@XA$A$IPAP ҉BAP RH9u PR H9tO@YO`O!EDPAHUD3rDp EHUBDHUBDjIL;m;EHUBHHH[A\A]A^A_]UHH~u V V )P HxP]ÐUHH]LeLmH IIՍN]AL$Q(P@ @X @DhH]LeLmUHHV H)W HP]ÐUHHGLOEQAzu AB@IH/JH0HHPH rv>pDND9uvWR(@tOOhOrHHPH Jv;Hq9uIWR(tOOhO$IHPH Jv;Hq9uIWR(tOOhOֺH]ËG=v*u UHSHH?LHE HHH[]UHAVAUATSIDwA@OH^F<_ttH<_tuHH)LrDND9uvOI(@tOOhOǸD@xHHHH)HP HOHO]UHAWAVAUATSHIHHUAd{uRD#HULLmIƃxA|$HGAGHu(iHLOxuHLxu#LEHH¾dLJLIGAHALlLLH[A\A]A^A_]UHH]LeLmLuL}HPIIIEdA|$A$H]LHLdIŃxtzCCHAV!J(@tOTNOO J)tuOUNOOCBJ9uRHMA@(tOOhO蟱KJH-/JHCHCAFE=IvH}?AFAFxuPHuF@(OOO} !8H}AŃ9]}|HcHMI)AD$ =wULH}A$AD$xuPHMA@(OOOqHEpHXDHJIǃ]xvHcEHLH)ƒzu'2Dn D]A5HcHLH)ytO)OO1Dn DDLH脽EyADLH}HcUHLH)։FxuPHMA@(t)OOOvEEu)uHcHI)ƃ}HUBH$9H rO}u9HBPztO3OORRHHuHFH}]VHEpHXDHIErADh E+A$@ D)9H([A\A]A^A_]UHATSHIxuLHDCAxltODOO1IhLH¾dLJH*[A\]UHH]LeLmLuL}H0IHA΋~HGIAD$IHhA}CH9]Ht/Gu)AD$bHHt LvuIcSIT$Bxu @@HID$EtMJH/J MJH/JHIHPH Jv=Hq9uIAT$R(tOOhOجK҉XPrs9u{At$v(@tlOOO腬AMAT$R(tOOOTH7Ic2IT$BxDhPAU9tDhPH]LeLmLuL}UHH]LeLmLuL}H@HAAMJAMJLE%HOL$uL@ЋxtOkOOEExuPG@(OOOתu:AIAxtOnOO親@@IL6 tOpO*Oz҉ULL}LL}HxtMLHLHKDH]LeLmLuL}UHAWAVAUATSH(H}II։ˋFtRuVڃMJAMJLE҃LIEH}xMLHLH}9fu,A6A}t҉؃1H؃MJMJHEHUAAAEADLH}jHEDLH}WHUȃztHHuEt;LMIMLHUHuH}#w \LLH}YH([A\A]A^A_]UHAUATSHIHIպ xu LL9r dHLHQHH rv=1~9uvAT$R(@tOOhOHH9rHHH Pv<J9uRAD$@(tOOhO辧H[A\A]]UHH]LeHIHF=vu >8u L藿C =v"uHs{8u LkC=v"uHs{8u L?H]LeÐUHF<t<t2O9!OO~ Hu"HG0HH@H9BuJLG0HGIHH9s8HσuIH H)uM@ IHcH)H9rI@ HHHLEAHFAEv2O_!OOAH)H*#VHH)H;Bw]UHH Hv(ȃ2AA!AD H@xH]UHAWAVAUATSHGHt@ʉMPf  u֍BADL5t+AT$HIEO H[A\A]]UHATSIHV=uHv<AD$;@tHvxvH.V HvH;vHt.G.G.IL腦t|vHH0uH[string I$fAD$"I |t'H--HGHLbL...H LLf"]C[A\]UHH]LeLmLuH`IIHtG{u?HHkAƅx-CpH}MDHUOLeL꾢PLNH]LeLmLuUHH]LeLmLuH II^(Ds LS@uVHSDt4L \t/tAFA\tA/uHu߉OLVA(vL꾵OL7=uHSOLrHSOLXH]LeLmLuUHSHHHEHHU~H}HSHHH Hv:J9uRC@(tPOOhOКHCHHCS H9r5H +HGxu!@xuxH@HEHEH[]UHSHHHEHUH}tQHSHRHH Jv:H9uPC@(tPOOhOHkHEH[]UHAWAVAUATSHXH}HIԉM>>ujHGxtpO!OO诙DhHHUHBHHEHEEEFBt%upO!OO@HuN$H HMȅHHUF H9w HtH9vpO!OOHED(A}UpO!OOǘIT$8HUIL$HMA HPH8HHE9}Qs HPLAyOL>HPL]ă HHP$OLID$xtO<!O)O術XHID$Sv#H`8uҾFOL0?HHVOL?x~\OL>H`8tHX`OL>ZHhMHHOLx>IuI+uH+0D~L|EDsHPLyEIuI+uH+0LEEHĨ[A\A]A^A_]ÐUHSHHHh$C$C8-HhH8K HHHKHK@{u@"sKI(@uH9r)@OOO译@HH9uH[]UHAWAVAUATSHIAw$_8EnAG L)HS9t4O<OOJB ;AD$$HL)EJ AL$ D9sDA9uEl$8IT$IT$AD$(Ht2xt"xt4OIOOŐPHuAD$I9uH[A\A]A^A_]UHAUATSHI_w$H5Dk0M9tGOO(OQ{ tGOOO2HH]SHH3)S H{SSdHsX)S H{SAU8HAu$)S H{S{ htGOOhO豏HCH=Iu H{[HsH{hH[A\A]]UHSHHEHH[]UHATSHDgHHC,H׻Sǂx uPC@(t@OOOҎHӯH/HtHH AD$ AD$$L[A\]Á8v"G$HWH)HUH]ËG8=w(9v!ZvWH9tUH]UHSHHG8=v Ɓv(9s =FHB{8v hHH[]UH]UHH]LeLmLuH IIhLAHHzAH9oIH߾ht H{@g@t fH@t HɸH@t H@t fH@tCCaCHC@CCh!ƃƃLsPLkXHCHǃǃǃHHǃǃCi[pHCpCtC`hǃǃHCHHtHlA CALH]LeLmLuUHAVAUATSDgA$I݋s$HL]A$ ADŽ$TL(A A$CHC0C$HHCHC՞HL1uAtLA|$DuH[A\A]A^]UHATSI@藙H@@@@8@$H@0@(AD$CAD$,C,LH~CuSOOO蟊H[A\]UHATSHI􋇔H9u`OOOfv$LA|$(t`OOO:AT$8HAt$$)S H{Sk @H{@LS[A\]UHH]LeLmHI_LMuT`UHGHW$H)HEԋG H+GH= hH`LAu`OenO|OTH]LeLmUHtf%H;uN%]UHAWAVAUATSHIF%^HHIAH(HAUHH9s8OnOO趈AUD$A|$u=DLL[A|$t8OnOOwDLLSHuH[A\A]A^A_]UH/J@NPHH HHH=uհNPHHHH=uHPHHHhH`HHxHHHHLJ,[LJ0[P]pHH>u]UH勗Tf0 HH=u]HD ATЃA  уA Ⱦ@ ރA <ЃA E8UHAUATSDD<uH5]H/J UH/JMH/JHL/JD?I/J2HHHL/JD I/JHHHDD1AAH LHL渨t  H H@tfHH@tHHHt tD$fD$HtAHǂ aJHǂ aJHǂ aJHǂ aJDaJaJHEȸH HH=uAHH H8At.Hǂ aJHǂ aJHǂ aJHǂ aJ8HH HH HH HH AtNAu)NPH/JHXHH=u%HDŽXLbJHH=0uAuLXLpAtAuH[A\A]]UHH]LeLmLuH Aԋ_DꃣT@t ZAD$ŰOt@u    Hu8HGPuRHHH?HcH)HP-~HcHGHT)HcHGH yDqI@zD2AtDLHADLHHt_~HcHGHT HcHGHJu]HH#Hǃ\8ǃ[' yzH]LeLmLuUH]UHtHu H ˆT%]UHGH]UHG]UHG]UHH]LeLmLuL}H`HI7IƋEHC@xtPOnO,ODxIWHUHC0HPUDcDhHAE<0u AЃ?t?w HxH*Et  >GfWutHLH)ADEtAtO OOy~#EHHHDHI]WEtF$AzAFAADi{DkdE)FD9t!EuEBAA9EDρ멅t^AAAzAFEtE9uDGAFDEBA ADD)%9EAEBljB?kduE9u E`AAAE9uE?E9uAABE&DAADAA?kdu \ADAD$%HkdAFL%Ʌ~D9u D9u Hkdy%HAS tH %D9uD H[A\A]A^A_]UHAWAVAUATSH(IAKPOtHKPu<-t A<+uDH@ iW HnW fEHHHDHWO iueO nu^O iuWO tuPO HyHE?Hnu0W au$W nuHH HHHKPtHKPuqI$fAEAt ?0*<0wm <0u.G H([A\A]A^A_]UHHvOOOmn]ÐUHHG@xu@G,]UH~AHcHGHDH;GGxltP%(OOnHh|DtHGHcHH+WHH9~P'(O0OmHcH=uUOHW,ǁz uJWR(POOSmuGHHGPzuzuP1(OXOmuQOHRǁz uJWR(t^POOl)B9)HHD &GxltP8(OOwlHh]UH~:HcHGHDH;GrgGxltPA(OO5lHh?tHGHcHH+WHH9~PC(O0OkHcH]UHH]LeLmH HIIlH¾H踫LhHKAxuPC@(tPOOwkLH/Ht fHHCHI L`HC0@HCHPHSHH]LeLmUHG]ø@QHWHH+OHHcHH@.~#O H)щHH9UH]UHH]LeHHIuLwHaH]LeUHAUATSHIIH9HcHGH+GHH9~Pi(OO2jWFH9tPj(OOjV H+VHH9 LIUHcID$H4It$HaHHH HII)H yvAB<DGD9uAL$I(@tPOhOwiyIUH[A\A]]UHHGH+GH]UHATSHO HGHcH)HH9~P|(O OiLcIJ H{H9v9H9rH)H)HHC@HHCHSLH9rFHS@HGHcHH+WHH9~P(OhOhHcHDHG[A\]UHSHHSzltP(OOChHhH9ugP(OO!hHHPH Jv;Hq9uISR(tPOhOgHHSH9rHHSH[]UHSHH5SzltP(OOgHhH9uP(OObgHSH9sWHJH H qv;2~9uvKI(@tPOhO gHH9rHSHHH Jv:H9uPC@(tPOhOfH[]UHATSHHGHWHH)HP(O1OtfAu*xtP(OKOJf@G,Guor~t 'E~xtP(OKOf@FHGPPBFi~SzltP(OOeHhH9uP(O(PeHSHRHH Jv:H9uPC@(tPOhO.eA}-HCPvPBtHCpFt{iHk[A\]UHSHHHSHHH Hv:J9uRC@(tPOhOdHCHHCS H9rHH[]UHSHHPv{teKylt P(OOdHhH9tAH!ZHHu*t% P(OxPcH[]UHH]LeLmH HAA9D9tDDHbH]LeLmUHH]LeHHGxltP(OOMcASHhH9u'DH]H]LeUHHcH O]UHH¸zu x]UHHHvu8Hu҉UH]P ]UH;@t]UHH]LeLmH HAIDHSzlt#P(OObHhI9tHƸH9tLH]LeLmUHH]LeLmH HA}IDHoHAL$wl@=wbv0PJO-OyaA$=v0PJO-OSaf.z;Jv=Cxlt;P(OOaHhI9H9uHI9$A4$9ttwvw;P(OP`҉HvHvCHPHSHH|HCHPHSx H]LeLmUHH]LeLmH HAIDHSzltEP((OO_HhI9H9AT$wcHwXv0PJO-O_A$v0PJO-Oo_f.UHLH,HvHULH HtaHSHJHKHRHH JH9uPC@(POhOH>HCHPHSHPHPH Jv;@H9uPC@(tPOhO=HsHHHZHkH[A\A]]UHH]LeLmLuH HA`xtP(O P=DH6D(LcLH+CHP(OON=Mt$LLHnIL$HH Qv:P9uPC@(tPOhOODAD9uIAA@(tPOhO2yIy_HHwAHbJH-/JHFAF ~HFHH+WVHGHGWD>JIA0AA]UHSHHH0u(w"HcHHGH)HƹM|HCHC/HfDHSBxuPC@(tPOO1HSHHSK H9r HH[]UHH]LeHI_$pPC$uQC STS S$gc=[C SC %I C )9¸FC$ L=uC$9C sCTST CHSHH]LeUHGHtHPHH@]UHGHPHp]ÐUHSHHHwPHHUSHHHt HEHtC,HS0HHS0 H[]UHATSI_HH)S H{SA$HIt$x)S H{SAT$DIt$8)S H{S[A\]Á~HcHPUHHcKPuH:PYH=PjY]UHATSHHHXL`Lht#)p)M)U)])e)m)u)}AԺtCw-S@B;CDvHg HK8C@HS8 HHDž(Dž,0HEH0H@H8KXHs`H{L(EFUHH]LeLmH HWD?vAD$Hw8HDL4HC8DcDS@D,S@H]LeLmUHAUATSHHDo A]tA[tPFPOP-S@B;CDv DH? HK8D,C@C,PS,tHC00HHC0 H Ɖs =u^AS@B;CDv H HK8@4C@S,BC,tHC00HHC0 HƉs A=tADA9DEDH[A\A]]UHATSHDg A tA tPNFPP,C,PS,tHS0HHS0H+C t u.D9t)C,PS,tHS0HHS0HC CXCX=~s$H߸[A\]UHATSIHH{HF,HF0HFxdždžHdždžF(!FXF\VDHv8 1HC8CD C,PS,tHS0HHS0HC =uVS,HK09yHAHC0BC,tAHHK0HC { #uUC,PS,tHS0HHS0HC  t uH{ { u~tz L1=IT$HJIL$BxuPAD$@(tPOO~*LZ< [A\]UHAUATSHHIAՋw W@B;GDv HO8@4G@C,PS,tHS0HHS0HkC t uHs    ]!I҃ !H߸ HmD9us S@B;CDv H HK8@4C@C,PS,tHS0HHS0HC M)S@B;CDv H HK8 C@HMC@MtPK@Q;SDv H> HC8@4S@C,PS,tHS0HHS0H C C,PS,tHS0HHS0HC ACD-S@)DHs8H-5HKA$AD$xuPA@(tPOO(H[A\A]]UHAWAVAUATSHHD IcKPuP]FP@P'IAeA0W@B;GDv 0 HO80G@C,PS,tHS0HHS0HC xeApDEQS@B;CDv DH HK8D$C@C,PS,tHS0HHS0HiC EDc IcĀKPxA.tA+tA-u A E9tS@B;CDvH HK8C@H{8LAăLk@vAtPsFPpPQ&AEuAE$M}I)L"AE$IM}AuNL4@ f@H@A~vP|FPdP%A@-AAEA LG4@ fD`IHPHLH]H߸ H[A\A]A^A_]UHH]LeLmLuH HIG@Dc IcKPtLH-AW s S@B;CDv Hr HK8@4C@C,PS,tHS0HHS0H?C HKPxS@Hs8H1HSAEAExuHRR(tPOOn$@A D AD$C $PHC,PS,tHS0HHS0HsC C,PS,tHS0HHS0HEC - C,PS,tHS0HHS0HC [t C E uDLH[A\A]]UHG(G,Hw0]UHG(9u09fDw'PkPqPAй]UHH?FDB HOHDDR]UHH]LeLmH L'DnDID$HHF u(PPP0tTt(PPPF C;Tu&DLt DL0fCH]LeLmw4GZ9vvUHH @wZUHH]LeHHADc4H]LeUHODuHIЉ HIA UHH]LeLmLuL}H0HADg(Low0ED9C0D;cProIL{HI)IAvPHEIH{A IAD)CPIJHCHDHSHD4AM\HSHLAD$C(DH]LeLmLuL}UHSHG(;G,v}HOHLAȃ)t*u_<uS9u uDhC9u<މ*T AF9wH9wL9s0TfAP%u)*D \H[]UHATSHHDg0G(EHWHG0;G,|H€80uf@s4THEDHuHEH[A\]UHATSHIHdG8x}HWHzxHcTS\HH9ujHcDDS\IFL9Py;HCHt!P 9+HHt P 9rDs\AD$<H{ LTDC[At/9H 1H9t|9uA;vO<HAT$v'PGP@ P‰fKA|$tA$7H AD$A$AD$ AD$[A\]Ë=vUHUHAUATSHIHGx^HHAIIL9A$9C C A:D$ IUDB\HIExHw(PPh Ph KHRHTAUXHu(PfP P9 HJL@ LLHLHI9=H[A\A]]UHSHHHuUBv8F9uVG@(tp&POO HUH3m=xuS@HC@PS@H[]UHFtt 'PP PH H6G]UHH]LeLmLuH IHFuD.AA+uAAA4 ujDvEyD.AA7AAE >AvD.AA8AAE DD+AAE A63L! uFF "uF DL4C H]LeLmLuUHSHHH~t|'PPP HH3;xuS0Hu (PzPp!PDHHSxD,HSxD|HSxAN8L HSxMψL AD$DH]LeLmLuL}UHAWAVAUATSH(HHwHuHGHEHHG~ HUHP89s'HuHNxP8p(TP\HtP89rًC8C4HuV 9t'PPPHuv u0HHuF t8t{t'PP!PfxuHH1PiHXcAu!H$uHH1=AHLtAHL3D LQC AE$^^J--*+%p/sI=ti===t@=Ek=tL=|U=* A^AVANAFA>A6A .A &A A A AAD&P9EHUHHUHK HMHEH HELMuA u2HLHuLAMe{ 1AHLKv? u6wHLL%HLHuLEsLCHuL#AMe{Au>HL7HuLAMeHuLF}  AT$Uw"{w K9K HL{u C9C HL{S9S }M9MD}vd'PJO-OSM{vd'PJO-O,n"f.1HfօxHxH97HuLEHLE#AL$MHuL}u HuLoE=w ADeHuLhECt'P"PP"P[HL{u&}t HL=w mEU HL{ u AW89rAo4} uAO89MrAo4U uLC 'PwPPHuLnSHuLkHEHHEHCHEHC'P|PPcHuLS HuLHEHHEHCHEHCuUID$H<$uC9t'PP"PHLMUID$H LE=HuLHuL HL3E ƃ$LC }v'PP"PrHL}AE{v H]Le IHUHUHuL ELLZAD$tFr _v'PAPPu ƋU UE ‰ULL: uUE ‰ULLP u{E EELLH uZA DeH]LeEtuLLuIHMHMLLEHuLU uHEx u AW89rAo4A|$ uAO8A9 $rAo4LLQC At'ED&P;EwA EL HL>MeCs sC Ls LHLCAAD&PHuLAM}A\DALdHLMeCA9C L1HLbMeAADHh[A\A]A^A_]UH+]UHSH(HHu}uEHuH;EH([]UHH]LeHHILHLH;.]HH]LeUHAWAVAUATSHHHxL'OXTEl$4EAD2Lw\Hx@ D(@ @LADt{HlC$}u\HH`DžhADžlDžpAA3DX[u`HuH}vHUHxL,}u H}.u h Džp=HAv= t=u5H=u(HuH=HhA3EEEA*EADžpAHuHEPt}U9UMumhthth҃pAEI|$[ IǺHLIT$H XH` HuH}I|$HUL/AWtnIL$I!q(@t&PTNOOq)@t@u&PUNOOAWQAE4D) LC C CDcAU(IEHDtAEe4H]LeLmLuL}UHAWAVAUATSH8HIL/G$(u6DwXĿLHD()H@LH;5= t=uH2LHH; C$.u LH[u(LLHuHHULL뾃:HߐHuHLLJELLEu4AvE L}t'PPPHuLA=w/LsD7E AD LQLDAFE%AD LD6E ƋE LnAm4E4$AD$ LHW= t (t{uLLYLH+kH8[A\A]A^A_]UHH]LeLmLuH`HIFv % Aվ,LeHuHw}ubL3UAv4MtSLx u;u0;PupH@Huمt  փL^LD=vPH;AUHuH=HLHuHAA9uA} u*HMHPH u+I\$I $ HIEHHDHH]LeLmUHAUATSHHIHG0@HYAI|$pHtxbHuckHHSHJHKBxuPC@(t(POO7HEt LbLS,HHUHSHJHKBxuPC@(t(POOH[A\A]]UHATSHHHuHUHɸOHDHMLEHEE{hIHPBAHPHSB$9B rH8DHĠ[A\]UHAk]UHH]LeLmLuH0 HIIHg(PLkHHu/8sHLj(PH߸poAbL}(PH߸PoIMHHhIHAH?Hv%*HIй(PHhIAH_unHCHPHSHPHPH Jv;@H9uPC@(t(POhOHoHk8LH(P(PH߸GnA1)1)ȃHhLGfN fTG]UHDI>D1AD)AA1AADD)ȃGtZLDWD9r D9r8P2P2PAIMEH L9uEADsLA@ uHH]UHAWAVAUATSHIIIHMMAI}t EED9r8P2P2PSEIIAD$ I9uAD$HMȉEA$t t u 8P2P3P%tA9w8P2P2PĞHHHuyu ^t t u 8P2P3Pr%tA9w8P2P2PMHHHtMHMLLuHtMtA AT$HMIEd$fEnALH[A\A]A^A_]UHLt9r8P2P2P謝HLYt t u 8P2P3Pyt9w8P2P2PTHHLtÉ΁ t]UHLt9r8P2P2PHLuM%t9w*%t9@w8P2P2P赜HHLtwA]UHAFDFtaLDOD9s D9r8P2P2P9HLЋAAA D@utD9r8P2P2PHL֋uN%tD9r*%tD9r8P2P2P襛HHL֋t%=0t 8P)2P84Pft t u 8P2P3P7H7%t;Gr8P2P2PHHƋtv 8P+2P4PޚҋFHJHF]UHLt DGD9r8P2P2P蓚HLϸt{u.΁u GauYuUw Hu AAD ȃv08PB2P4PtO 7tD9r8P2P2PؙHHLB]UHATSHLt9r8P2P2P蔙AԉHL0Ɓt9r8P2P2P_HLtĉ tuI%t9r8P2P2PHAuHsHH{( H{(mHt5xu*8HCEBHtxHD[A\]UHAWAVAUATSHXIAH֋WHHHHHDžDžHtV HHHHEtD;hr8P2P2PEIIDžDžHHHA$E|$L$ 5Pt3PH\t]Au3PH3Au3PH 3PHAu>u!3PH 3PHfAwTAu&3PH?*3PH'tq03PH Y93PHB4HV&3PHtuH H<3PH HX2P2PHEȋLHzAuA3PHG3PLH:e%D DEDt&H A HAuL3PH*HDžDžDž%=0vDžt,(Hn)HDž[HAHA$t t u 8P2P3P-H%t;Ar8P2P2PHLt DHHH H;v Dž`H)ǃ0@9ׅuHH HHH9rHt?H]Ht7Au3PHT3PH\3PHtDH`3PHO|Džt,(H|)HDž(H)H>8P2PPQHL t;Xr8P2P2P!HIFuOLHHH)LճHX[A\A]A^A_]UHH ELELtEUAHMAHMHyHAIHHIHHHH)ƃ0@1HHuHEtH@-HUH)H;UHATSHpIuEFEZEFZEHuH}轵HÃ}y Ef.{ D+HH|Hu蒵HÀ|aIiLˆDHSHuL藲Hp[A\]UHAWAVAUATSHH}tIǹH}YHLAt AI@t fH@t HɸHt Ht fHtIAG AG_IGHE@IGA`8PAAh5PAES fCt uFLHHHMHHLH}JH C LuDHL=P9P;P誂LÁt DWD9r=P9P:P>H ÁtD9rPl|C : u@uCPg=Ph>P8|uEuCPg=P>P|u#ttCPg=P>P{Du%AtAtCPg=P@?P{u'˿9tCPg=P?P{A AͿD9 CPg=PP@PE{CP$r=P}=P,{DDu7M9u2D9tCPhg=P=P4rHuH}LH}H+7HHbHXEt+AtHH O H}L+7LHHHPutHMHyIHѺ HEHxHپ HI|$(D;os IcՋGHDȊxtEP`DPDP[I|$(D;os McGJD芊"HUAAHUAAD{SHCHHuH+NK HFHFMuI|$|wzuH}HG0RHPHUȋB H+BH= H>HEHHA^^I<$ED$D9s#AAE'I<$ED$A9wEP2P2PZHH tEP`DPxEPYHދt t uEP2P3PY%tD9rEP2P2PwYHHHtV%=uEЃw#UMD0E$Aw EODpADH}LALiLL[HEHHH([A\A]A^A_]UHAWAVAUATSHIH_LkHCHCH9w@xu@HS0HHDBHC@M$t A|$9rEP2P2PbXAIMAuJ%t9w& %t9wEP2P2PXIIMAtÃto%IT$pM|$0=LEAHLLLAu6AVw-tuAAAuAAAHC0H@ HC0HkLkADŽ$H[A\A]A^A_]Ë UHAWAVAUATSHHIՃ~6t t uEP2P3PVL tK9rEP2P2PVHL΋tILσ6t t uEP2P3PVt9wEP2P2P\VHHDAAtAGEPAvAtE ~ 9v A9wEP2P2PUHH tFPe`DPxEPUHt t uEP2P3PzU%t9wEP2P2PVUHHttt+x(AA!FMM)ILDA9s)DfAI9w H9~H@Hu'H}I}LdUMHUȉ OMtM)eHSL)Hs HH IM*Hs(H9sHC(L9Cu HCHCH{HHHWHHHHHw(IpIPH9u!HVHrMH0IPI9tIHHQHJ?Ip(IP(HuIp IP Hu#HHHJ(Hz(uHJ Hz uHMtgIH8L;HuHHHu&AH8!S;M;A uIQ IQ(Ht&LJ0IH HtHJ HQ0IH(HtHJ(HQ0HHHWHH9{u HCHIHHHHWHHHHw;HD HDu щ HHPHxHzHWHGmHHt!@wҍJHH҉HHw8HG(HG SAAAu%D ‰SHHH|HDHG0HHHHHt H9)HHHHHrHH9t-II?HIpH4HuIJE>HtOHHt HHڃI)IMHHHHHHPJD( JD(HML@II9fGIƋEAAbL=IŋUAH_lI$HI$PI9ZHH@HtHHHI9u@KD=I9$Hu2BHxHH9sLHxLIT$It$ LeHRH(H9uH؃LHq@t HHHH4HH)H)HHXI;T$ uI|$I|$It$ HH~I;T$u#I|$I|$It$HHHVH<>HJIILHHw,LJLBM9uAAE!$MAMHLZ0HJH9tLBIHLA?LJ(HJ(HuLJ HJ Hu#IMLA(Hy(uLA Hy uIMtjLB8K;Hu!KHHu)J8AAE!D$;I;S uIK IK(Ht&LY0LB MtLA IH0LB(MtLA(IH0LLHbHHHVH<>HHHwCHT ITA<$AADAu A $HHJHrHqHNHVHHAt"AwҍJIIA҉ILF8HF(HF AT$ADAAu'D AT$IHKtKTHV0HvHvKHIt I9D)IILLLBIL9t-II?HMANMuIJ4HV0HvHvHJHqHrHNHVHF0HKH؃HUHDHEHEH H9EHMHCMHMII IWLLHuHF#I$HHFI$PHFI$XHF M$HM$PHHI$XIF IFMvH9EwLEL9ELH+EHHUHHbHHHuHNHHHHwCHD IDA$u A $HHPLEL@LBIPI@ HHt!@wҍJHH҉HHUHr8HB(HB AT$AAAu+D AT$HHLEMDIDI@0M@M@IHHt H9)HHHJHH9t1HH?HHNH HuHHEHHP0H@H@ HBHMHHHJHAHQHA0ID$H9v2HH)IL$ID$ HIT$ HHJHHXHI$@AHI$HAHLHH@{HIt$ HH9H L*LzIEIt$ HuLHHPHUHH7HָH([A\A]A^A_]UHH]LeLmLuL}HPIHIHLvHFII Iv IT$HHKHHBI9rLH)LH=#HHMH6HHUI)Luj?IƋEHUIt HUH}9UAHtK .I9O u?LIOH9s3H)I4HH HSHHHFIw IOLHtLw_LL8IHtLCuHCHHHHI)M9LIFHLCHLALH]LeLmLuL}UHATS=HD AAb4ID#HH@t HHƃLH^Hߺht FH{g@t fH@t HɸHt Ht fHtHFkLXHdž`HF@HT HTHRHRHH uHFHHtI)IH H[A\]UHAUATSHHHHt%E,$HuH[A\A]]UHHuHuH@H ]ÐUHSHHH v)-XFP?H۸OHDH5O)H/:H5@))~6H5/) m6H=)AH[]UHH]LeHHLgHL)tHLwL#CH]LeUHAVAUATSI~[LwLIĻLAU)ك I9v Iă9ՉLAE)؃AE[A\A]A^]UHH]LeLmH HtHG@HHGI:D(HC@HHCMt"D8HL⾔(PH߸D7H¾PH߸HCHPHSA*CTH]LeLmUHH]LeLmH HAAAAE<~$HG@HHGDFPOELDDEuHG@HHGHG@HHGQH{EHCHPHSA*dH]LeLmUHAWAVAUATSHHIA.LQ8IHuLHHMd MM)LLHHoH8uRH@A<$.AE׾HLLHHmHC!HtH#HMl$A<$.ALH[A\A]A^A_]UHAWAVAUATSHIIIAHH:tHлHH8uKFPLzLLLtVLLL9HtLLKLALL{LDLNEA޸D)EI?utHS)ȉBSH[]UHSHH>HsHVH9Sv ~ ɋVrHH H[]UHHcHGHDH;Gsxt G]UHAVAUATSHIžHIƋCHXL` AUH0tH9r:JP2P2P>)HuHt9w)t9fw:JP2P2P(Htƃv 0t HEA|$HSLHzYIHH Jv:H9uPC@(t_JPOhOS(AD$tiS!J(@tJPTNOO(J)tuJPUNOO'AD$BAAH7 w:JP2P2Pb!HƐHU EUHH]LeLmH HIľHUAHKHAH9Cvyt @H.DLH]LeLmUHAWAVAUATSHIGDI|$LAI4$t AL$9r:JP2P2Ps AIJ>uJ%t9w' %t9w:JP2P2P* HHHtľLHEHIEt L=HEȃxHUȋ@A9pwsI $A|$A9r:JP2P2PIAuJ%t9w& %t9w:JP2P2PAIIIAtøwAG9tJP+9P8:PI|$-I@ E;t$r:JP2P2PfDpHPAHMHLfHED8@A uAEAOP(t GPOOfP$9P r)LY+HEȃx}sI $H[A\A]A^A_]UHH]LeLmH HIĺHIHSz uHBH9Cw B@  HLLJ+H]LeLmUHH]LeLmLuL}H@HGDI|$nILpL;ssSHLcI4$A|$w:JP2P2PH ALHUL輴ZI4$A|$w:JP2P2PH0AHHULyH}ȸHHLyLsLHuH>AEAExuSHB(t GPOORB$9B rHE)H]LeLmLuL}UHH]LeLmH H$ID(HCH9CvH,A$HCHPHSA*H]LeLmUHH]LeLmLuH0HGDI|$LAƾHIDL}HƋ~AHMLL{Ht^HS*EB0 tK uFHSHJHK*HCHHHK* H]LeLmLuUHATSHHGDI|$LEHULHS*BH[A\]UHH]LeLmH HGDI|$LfHSzu zyBWL!|Iŋ%=uHLL=} _w AEu HC@ HS*BH]LeLmUHH]LeLmLuH HGDI|$LAžHSx*BDfuDrDL?{IDL1{HI9A}DD9uKJA9MuBuLL謚D1u}t t uFJP2P3PYI$%tA;D$r:JP2P2P.HH‹tI9HS)ȉBSH]LeLmLuUHAWAVAUATSH(IGDI}LAIutAM9r:JP2P2PHHEHHuM%t9w*%@t9w:JP2P2P1HHHtHUDLJ|AID$A4HHELHLEz‰Ẽ L3HHEDIEEEE9r:JP2P2PsH}HNjuMtD9r( tA9w:JP2P2P+HHHNjt¸wG9tJP+9P8:PrI}o$I@ E;ur:JP2P2PfDpADDLtIHEDx@A uAWAD$@(t GPOOQML$L+MIOILEUHL?DI}(DH(x8HG AD$ZHHMm A}HUHLLEHHH Jv<H9uPAD$@(t_JPOhOYAUtiAD$!H(@tJPTNOOH)tuJPUNOOAUP70)DHGlL`HsN mLH]LeLmLuUHH]LeLmH0HGDI|$EHGLhL;osxt H="HP0LEHML9zDEAt+At 2H HLH4LHUHLxH]LeLmUHATSHHGDI|$EHGHPH;Wsxt H!0LEHMLyEtHLHAHSHHMHL¸tCP$9P rHRH[A\]UHAVAUATSHrIźH/HIE(HCHHHK@z uRC@(t GPOOHn/IHCHPHSD @A|$ uAL$C@(t GPOO_Ed$GPH@$IƺGPH+$HLHh8D0@A~uAVC@(t GPOOAD$Me GP@GPHSHCxtpHPDFPKO@HPHPH辩HPHPH觩HCxtpHPHFPKODD`IUHIu(Ho7D @A|$ uAT$C@(t GPOOHCHPHSxtpHPJFPKOpH*e GPHĪGPH貪IPIPH蹨KFPH_"StJP5FPPBH0HxD LkGPH"HLH=6IUHH Jv:H9uPC@(t_JPOhOAD$tiS!J(@tJPTNOOtJ)tuJPUNOONAD$BU1]Hl$l$\$UDEUE)Hl$UA uSu8 t4A+Au6Au( t$Attl$Uމ KUKkCAML$jmEǍ‹l$UEAIH\$ #뫉\$\$Dl$UEމLD$UHE)HKAUATASARAQAPWVUHl$XUSRQPEeL}LuDuA8Adž8Au@u5f9u f;E]UH<t'@uf9u]UH<@@f9u#ffmf9uffEDfD9uff"fD9uff]UHHW@uLH4ʀ~u?B`҃?#9uf]UHf;tf;u]UH@u.f9u f;E]UHf;tf;u]UHf;tf;u]UHtfbЃ]UHf9sff]UHf9u <t]UHf9u)t61Ѓ!f9sff]f;uUH]UHf;bЃ]UHt ]UHt ]UHt@u]UHtbT9vIHwH9u0Bfx'ȸDD9}&fBB9rW]UHfHWH4¸~(FfxfD¸DudTDA9C9s6Hf;ufD;@t+@9r! ]UHtkDfAAD"9s>LGE҉I29u!rffA9u@"r@D9} B9r]UHAVAUATSIDtMDG@9B9s6It$H9u H9uDrADyR9rEt$E;$rLAFAD$DID$HEIŠClfPfG4lA$PA$A$PD[A\A]A^]UHSHHf9bv%Huu ftHH[]UHSHHB`҃?!u su%#uƇ(fI9tHf/'u!ƃ&ى!HfH[]UHSHH<tt@ukf9u&f\f2f;u$f/fH[]UHSHH<tD@u;f9u+ffH[]UHSHHu Ƈ(~fH[]UHSHHtf9Vv5H+uPZPZP(H[]UHtXt PZP[Px t PZP0[P͋@]UHtWt@PZP[P膋xt@PZP\Pa@ ]UHWDAG@tӅPlZP[PztӅPlZP]PފDLAyu uӅPmZP]P詊HwH fH ΀ytӅPqZPH^Pm ytӅPqZPx^PLDBBLytӅPrZPx_P#I9u0ABHH):HH1HH!)HH !HH1P]ZPP]<u Hc-<vUH幠PZP8cPÈHHHw<u Hc-<vUHPZP8cPjHHu<u Hc-<vUHPgZPcPHHuøHuƇfLJ<u Hc-<vUHPZZPcP詇HHuøHu<u Hc-<vUH PMZPcPGHHuøHuUHSHHu@PfZPxO~&ruƇ fH[]ÀtUH幠PZPcP蓆H:u<u .<tUHPZPcPAH8¸tƇ.f@Du¾3¾(u'fxHOHc4¾< 9ukE t > @ D tUHPZPdPDt(HOHcHֺHøøøøw2<tUH PZPPdPτÀtUHP'ZPdP蠄fWf.z uøUHu`PZPdPZt`PZPdP8H,]ÀtUH幀PZPdPu%,y *f.zu,øÀtUH幠PZPcP膃HUHHtPJZPdPGAXEE<vUHPZPcPH8UH<vPZP8cP躂H<vPZPcP节Hwf$XpPH9ЃeH9[H9QH9ЃEH9Ѓ9H9/H9%H9ЃPZPP]UH勇 wj$͘pP9h9[9N9A9Ѓ69-9$9ЃPBZPP[]UHH*EHu)UHHH*EHuUHSHH@ubft`PaZPdPр NfWEHufH[]UHSHH@ubftP2ZPdPN MfWEHufH[]UHHtP|ZPcPHHx H*EHHH H*XEHuUHHtPvZPcP}H*EHuRNwDUH$pPH2&+22222 H2, @]UH<vP$ZP_P~Hi]UHtvtPZP[P~x tPZPdPu~B`s Hpn@]UHf9u1B`s #LJ]UHSHHHW@HʀzB`?#2#9}6J݀wuLJ6r*!ƀ%DfH'fH[]UHSHHHGH иyut<v`PZPcP|H6H8hHƸ@u"fHfH[]øf9u?<t*B`sUHcLJø]UHSHHtPZPcP|H0Hu Ƈ(HfH[]UHu PZPdP{t PZPdP{f.ysH,\dH,HH1[]UHu@PZPdP{t@PZPdPzH,0]UHtHc ]UH<v@PZP8cPzH0H]UH<v`PZP8cPXzH0?#<wG$8qPHOHHHAHHHH -HHHH `PZPPy]UHSHH<vPkZPcPyH0<vPkZP8cPgyH8HHdH[]UHH]LeHIsLu LfÉH]LeUHSHHtoqtfHCHЀxt`PZPePxx t`PZPfPx@ H[]UHSHHtotfHCHЀxtPZPePxx tPZP@gPw@ H[]UHSHHt0Ct H[]UHSHHt&tH[]UHATSHHHH`HutPZP`PvHCHЀxtPZPePv0~ tPZPhhPvH{`HU謦IHI9uEH>t4tPZP`P\vLHH[A\]UHSHHt8tPZP`PvHHsH[]UHF<v P0ZP_Put P2ZPcPuH@]UH倿t@PZPiPVut@PZPcP.uL< z t@P ZPOtBȋdLtv9rSP2P2PtHAuE%t9w& %t9wSP2P2PztHAtȃt*t&t!t4t %=8uLʾ Lʾ]UH倿tPZP[PsxtPZPiPs;P vPZPjPsHcHT]UHSHH5**趬,*f.zu H[]UHSHHtPZPdPs*CEHuHH[]UHSHHt@PZPdPrt@PZPdPr(踫EHuHJH[]UH $`qP7) {u!o i1c[SKى ;ى +9N"9MFPZPPq]UHH]LeH HHGH QE(t0PFZPdP7qEnMf.zu @ffEHuHfbuXD!DTA9u 0@u"fH`fH]LeUHH]LeHHHGL$иA|$uWA<$A;$u 0@u"fHfH]LeUHSHHHGH иyu)1A¸;uH[]UHSHHH[]UHSHHu 'VuƇ#fH[]UH倿t`PZPcPnH0HuHwj]ËuLJø~ UH<]@uBfbu>UH倿Uu$fuPdZPjP8n ø]UHSHHtPCZPdPmf.zu f.z2u0ƃ.HHHsf<*f.ƃ(f}fEHUHHu`HH4qwHƃ*)H4HH!H Hf <+tH[]UHSHHtPZP[PltPZPkPlHut/}vPfZPZPNlHuH0‰H[]UHSHHH`ΑHHH[]øuUHHd]UHSHHtPZPdPkH`)HHH[]UHSHHffHOHxt`P ZPeP5k8t`P ZPkPkHрxt`P ZPmPj0~t`P ZPPmPj[ H[]UHSHHHc<vPZP_PnjH`WHHH[]UH<v PZP8cPjH0H"]UHSHH<vPtZP8cPiH8<vPtZPcPiH0<u-<+u 耶HE<,u ڶH7aH-<+u 3H<,u 芶HfHHDH[]UH勇ȉ]UHHtPZPdPh tPZPdPh]UHSHHt PZPdPph"EHuH7H[]UHAVAUATSIuYP`u B t.AYP`@uEtLf%=t#AYP`<`u L~AQAAAF9rIvHr HIA9wIFHDhAHI D,فD )A) iғ)։rPƁ9trP9uL`P%u$u L} ÁlvIVTTuAL05u L臧tЄPZPZPf[A\A]A^]UHH]LeLmLuL}H0HtPZPxnPeDA|$tPZPnPeEl$ <tPZPoPpe@tAqDDHWAƀ|?tP"ZPoP!eAu0DfǃffH"fȸD9,1E#AtAADD DffDfH(AIT$HCH4HAAu0H$fǃ fDfHAfDfDAAϓfDWPIBfǃDfDfǃHvAIT$HCH4H;AH]LeLmLuL}UHH]LeHHHW@uaH ʀyuT9AfHfDHffǃ H]LeUHH]LeLmLuL}H@HDDDD@ucfLJUf@EfǃUfDfDHAAE fDUffH]LeLmLuL}UHSHHt@PZPdPaf.zSuQƇUffLJufH?H茿fƃ1H[]UHAVAUATSHDDEEuH?6AFA<A$=#Ey5H?fǃ+ffDHAAAu/Afǃ*ffH~AAAtAAfǃ*ffHFAAtYAt$fǃ*fDfDHAAfǃ*ffHAAAufǃ*fDfDHAAD[A\A]A^]UHH]LeHH@fxu }HCHD"z?tPZPZP_B@u@Bfǃ(fHffDfǃ?H]LeUHG@DD9v'LGI9 u I9 tR9r ]ÐUHLϰI@fA9puD@A9r A1AtHHuθ]UHD8 DLǰAAD8 fApfAP AH ]UHH]LeLmLuH HAAH?HGL,AEPˀv<7C%=usA)HtD`YAAcOHCH9CsEAuDHpAuDH`HCAU AD HHCHCD HHCH]LeLmLuUH,*ȸf.zt] t1UH~v#PlxP-O]]fUHAWAVAUATSHIAL/IuL4EFAUAFfG%=wRA6THGAHHGA|$ }ID$HID$_AAD$u;H,H*f.IT$BHIT$, 9*f.ID$pHID$A@AE@9sgH9uR@Vt2HA3L$u;AD"HEAA9|ID$HID$QP9rA(AAT$%= u EOÉẺLGHtIT$@HIT$A|$ u:n"uL Ht%IT$@BHIT$AAcaMl$M;l$sUA6DL~EAvDLkEA;D$$IT$ANA L$ ˉHIT$AMl$ID$HID$  A>fH[A\A]A^A_]UHH]LeLmLuL}HPIUȉMDLwDMfAfEvfALNA$ILfuYL;xsPPpxPPVAD$fALJUfAfALJ LZAD$LKfuYL9wPPtxPPgVuHcsHLdsHL(A$IL;sPPzxPPVIT$H u:L9uAT$fxIO с@y  fDžAL$AT$ffAfAfAL3AD$LLfEtALLH9HI9tPPxPPUHh[A\A]A^A_]UHvpPxPPTu fLJUffLJn"RfHOHrDFAwMDBfExBEF A@x1@փ fffD]UHSHH%=u fLJXffLJƉ%=u#fǃUffǃnH/v Hs7HH[]UHATSI%=u"fLJXfA$fLJ É%=u9H8CLfADŽ$VfA$fA$L1v L?s6L[A\]UHvPxPPR%=u fLJUffLJ5 7z]UHH]LeLmLuL}H@HAAHMMEΉ%=uRfLJXffLJAHEȃxtP xPʌPQHEȋ8H8D%=uPfǃXfDfǃHbAAtPxPPQA?LAF؃DDA~AvĎPJO-OQAHEȁxvĎPJO-OPHE+xt2AF % ffDfDHhD%=t%fǃUfDfǃH2AD%=t%fǃUfDfǃHAAAfDfDfDHH]LeLmLuL}UHH]LeLmH HAIՉ%=uMfLJXffLJtAA}tЎP xPPOA}LDA}vPBO-OOOA,E=t/H fǃ6ffDH]fǃUfDfǃHAHHH衫fǃ.fDfHtH]LeLmUHH]LeLmLuH HAAĨyu9Hu H蹏 DwtDwcI$HtZH Afǃ fDfHfǃ,fDfDHDHADHADfǃ+fDfDHJfǃ4ffǃH)fǃ*ffDH fǃ)fDfHH]LeLmLuUHH]LeLmLuH0HAAI̓yu9HHu H*A}vPExPPLMmLmE<lfEx]AHCHЀxtPHxPhPfLxx2LmED,AA5AAADvYD%=u%fǃXfDfǃHAfǃUfDfǃn2H}AEtcfEy]H菦fǃ(fDfHBAžH_fǃfDfHfǃ-fDfDHA5fEx@AHCHЀxtP[xPhPJH?H9DHAfxcHCHЀxtP^xPPJ~f.z)u'fǃ4fDfǃH2Ayfǃ4fDfǃH fǃ*ffDHfǃ4ffǃHAAHCHDH]LeLmLuUHH]LeLmLuH H~wDn Aw DvAvPuxPȍPII?HsL&HsL AvĎPJO-O&ICAvĎPJO-OHf(XKf.֩rԩf. f. ˩<҃H]LeLmLuÐUHHxHW@HHH^uWHGHH t߈HHHpHJpLcEYPD!_-HcHpf1@@ f@ff@,fv HwL @f=v HOL PUHtfGtYLAHG LHW(Lpt%Av HOL H9wIM9u]ÐUHAWAVAUATSHI֋B!@v1@J?v L̓fMPR11˃w!փu:!փw+fAdžUfAfAdžL%Eu0w+fAdžUfAfAdžn2L~% LH(fBD9IVH*=tlzUuf9t (u!HPNHC]UHH]LeHIHGHC@u@3fv¸u#sfvLH]LeøvTHOH@@uxUufxuD@t fFø;sUH6]UHAVAUATSH%=u }uDSHC HDHS(H<pt$v HKL H9wSHCL$AD$ $XPLHHt.@ u(LH)HH=AOffAD$fAD$A$HCD u fAD$Ad$fAD$sAD$ uAD$fAD$CZSAD$fAD$AAT$HCH@ u@N<w fAD$fAD$Ad$fAD$IM9[A\A]A^]UHHHI@]UHAWAVAUATSH(IHh HEHc(H HHbJfHELuI)H}LDA IHH+UHUHMHHMIFL9AA"HL54HuMLvHHH9wntjHMHH?vHMH)H?wJIh I ADžd HIp HPIx HUHIh HXI htHHLAimNA90AAAxAEIH?wALuALvH([A\A]A^A_]UH1]UHH]LeHHA9d tH Hh DDd H]LeUH]UHATSIHh HLJh HLJ HtHHVLHHu[A\]UHH]LeHHIHh uu kAE=tWI҉DIAtLLuADHUD;AD$N<vP|PHPmE $E;NrLEMLLH}EL$E;NrLEMLLH}EA|$Q"Ml$L9m H]H]A}uqAEu EEEJ49u&DvH4L+DL{A LAAT$8Ew@A$HuHFHP@fA|fAfALYAT$fAfAfEL3ADKLEMHUHuLuvSHuHFHЀxUufxtP!|PPDLEMHUHuLfALJUfAfALJL蚱SfAfEfALv6{Tu0HEȀxPu&fALJTfALJfALJL>HI9DuLmAD9uAIIHMQ)AL}fALJfALJfALJLLrc%DD AAEAIIHuV)ALHh[A\A]A^A_]UHAWAVAUATSHIHuT EP t;<rP|P.P9H0D4IV EHHhHHPXˉMIF(HPH HMHHAvHH9uAV HPWHHXuL@HEHEHH8H@IW`HxHJ0HHH@HPHxHFHPWH ЋV H9rzPztP(|PO)RRHHxHQHPw@xtP)|PO@@)Hx譈HxHBHHHM@E}!HEHuHHpH}HEUHML$DIVDL,A}bH}D9uxHD9uvHUHI$H PmA$J9u RHxA@(?POhOHpHHEVAEH€xtP|PP0~ tP|PPI`6?HEIG`UA$AD$HMy uq@@(t,POO]IF HhT8IFL$I]I9{-CunfxtP|PPDKHEH$LEMHULL }tP|PϔP_EHUBR@HzuHI`HuqI`HUHu@DKH$LEMHULLHI9TL$$LEMHULLzt2E}tHXHHXAD$ID$HxHFHE}9}H8H9XtPL|PPdH@< w/H t HPBHMHHxHFCHxHGPztPT|PORRHHxHBH@H[A\A]A^A_]ÐUHG]UH9vHGh]UHH]LeHHAEfffgMcHBH]LeUHAȃ AAu#tuAAEAADY]UHH]LeLmH HLcHG`H@BD=v]tZAAfA EfffLJfAwDD)HB9f EfffǃHyfH]LeLmHxt@UH僿tP}PP :]HHЋuUH̲P}PP t1DBBHGhHT HHGhÃHGhUHSHHfu-HG @;Gu fLJ fLJfLJ]eHZH[]UHHGxp@%t 8M@=v M9vH9w鉷]UHATSILJ@wfWRGP9u*u@GTftfGRA$A$thAwIIT$HʀzEuBu1fADŽ$UfA$fADŽ$L蠢AuL AƄ$AƄ$[A\]UH僿P H9H u1u!u KWPf~tRH9tǰH9u*ǶffǴvy HH@uktt W)ƒwy 'KG4t0GyJJ]UH僿P u JtCLJHH H9Ghu uWP ]UHH]LeLmLuL}H0HA􋇈%=DHwDHƀx(u#xfx+DDH DAADAA< 9/@"D @uxEtP!}PP`H{`0H)HGHDxvPBO-O%Mc,HLH9Eu @ ,@ fǃ(ffDH藟%AEfǃ fDfHhE t> ftHSHcIyCfǃ fDfDH" fǃ fDfHH]LeLmLuL}L_xMS@LFM9yUHATSHADDMPfu94If%9fLEaٸA/M9s+APJO-OH0c-IM9ø H[A\]UHH]LeLmLuH HAԉHu#AEDuDDDHH]LeLmLuUHH]LeLmLuL}H@HAUAEEfECu _ bÃ}fAD@΀ fffHJEgA]fEEHCB}t<9)H1_fǃfDfH)H^fǃfDfH訛fǃ5fDfDH肛fǃffǃHaEt}uxfɐyrEHGB}uA ffDfH>)9^%A)^%AH]LeLmLuL}UHH]LeLmLuL}HPHIIՉMȋAĉHW`HRHHUHHUHD4EtDEE}t Hu裸EAT$A0MLHEAT$A0MLHEH}H|AIvP}PPUAUAE UfAUUfAUDMDEċM‹uHDLHfAEEu>  UDHoAƃ}u:L}LÈ(ffDEfH*AAAT$HD4fEuADH]LeLmLuL}UHAUATSHHHG`H@HytP}PXPQDjEEHH/JJN`H BA9vHA9wAD$H[A\A]]UHNAtLWHG HD@HcHG(LƉ4Ƈ;s*]UHAWAVAUATSHHHIUAH`HWL$HL4}t}Af9< uMD ʉM@ MB Ҁ(fffHPAAF HUHoEȉEUĉULWA%E=uLHXELuHEHMHM9uuDH$HUv)t)P}PPu'fǃXffǃH]HM}u?HUvffǃUffǃn2HHM=HUt'fǃUffǃHەHMHEHEH}AAF AFEI|$*AEFM‹uHA|$ v>PJO-OAD$EA|$v>PJO-O|A $MA|$v>PJO-OMAD$E}tMXMI|$ct;Ef.EEXXEEf.EAEAMf.MEXXEMf.AEAHAMUʀ ffEfH(EuDAEIHChcADILkhNEEAGIEHChA_DAEIHCh>ƃDHH[A\A]A^A_]UHSHHHG`HPHBRDBDHWxR%DɃ~@PuRHH) HcH)ЋRI9׃uHChH;H uL;$HHChDEuSPHfbSPHSO9 }Gt6HC=HShHimNA90?fS H;H[]UHSHHHH[]UHH]LeLmLuL}H@IALHEAEEDf ẼGẺEDPF9Etou3}u-fALJUfAfALJL肑ú:uh}ubfALJUfEfALJLJAċUUAf ʀ fAfAfELADH]LeLmLuL}UHNAv#v\ѸEFw *W:Qw-t щ )62W]UHAWAVAUATSHHAAHGpDdkAA|$yAT$BBZRBЋdH9tq9rP2P2PHHuK%t9w( %ft9wP2P2PHHHtƒyP fP,}PPlfEyUHCxx%_w`HspHUEfǃfDfHHÚPD}At$HyAAD$I>1)1)A A|$AT$HC`p$H9rxp H9sp҉H+PH4HxV)Eu"HcHHHcHD,;fǃfA$fADŽ$LLwþLj:fADŽ$JfA$fA$Lw1H([A\A]A^A_]UHH]LeLmLuL}HHIA֋N0%= uK~tбP)}PPDhfLJ CffLJvEA= ~tбP,}P@PDzDjExAu1=AT$0fǃffH vUfLJCffLJ u|DH 9fǃ|ffHuEBhL HPtt HHs`HIL$Jv=AL$y9uIVR(tPOhOhPt!w бPA}PP? 0H;AD$@Ml$ AD$<VfLJ CffLJ tEhN#vtэQDhMuAD$<=  LH ;EAD$AD$< H+;UfǃffHyrH]LeLmLuL}UHAWAVAUATSHhI|IAHG`H@JHpILMHx0IB< u|LLHII9}AEIM`HpHHEH Pv;Ur9uRA@(tPOhO HuL`tE%=t LIM~LATAHuEAHEHpAHpztPo}P^P1Hp0~FL`x_vzfADžCfAfADžLp|IT$@LW8fADž|fAfALjpLL7A2L 7AfADžfAfAL#pAE&EHh[A\A]A^A_]UHATSHAHC`H@@ƒu9y HQ)HH)AHHEJ4H;~ H[A\]UHH]LeHHAAD$HHADH]LeUHATSHIMJMJHEHH Hs`HvHAt$@1At$8qAt$4qH{`IL$H H qv=2DFD9uvOI(@tPOhOH{`IL$HJH qv>rDFD9uvOI(@tPOhOLH{`IL$HJH qv;Rr9uJWR(tPOhOHQ[A\]UHH]LeLmLuH IHAAC8 u]C0IL$`HCHH Pr9uRA@(POhOKC4 tpP}PءPC0IL$`HCHH Pv:r9uRA@(tPOhODHLvDHLcH]LeLmLuUHAWAVAUATSHIHA׾dLJJẺI$L4IT$`HRL,‹C0AFC4AFIL$`HIEH PvAu8fAdžUfEfAdžL\AL諸D au.Au(fAdžUfAfAdžL~\AULND AuA(DD D}v>PJO-OVM}v>PJO-O/E)AAuq}v>PJO-OM}v>PJO-ODE(*AA}t0P}P%Pou}t0P}PCPM}D(DDDDLAǾLúEEIN`HUHUH Bv;Ep9uPA@(tPOhOHEHHD AAEADHuL0u(IV`HMH0H A0p9uHB@(tPOhOE[MIH9MEfAdž CfAfAdžLYUfAdžfAfAL\YucMIH9MEfAdž CfAfAdž LYUfAdžfAfALXMMHMHMHv;Mq9uIB@(tPOhODHuLt:LH0U(L:u HuLMEEEUUEIF`HUHUH JvAuAA~A9u~pv(@tPOhO"H}H}H wv>uDFD9u~pv(@tPOhOпHuHuv;Mq9uQ@@(tPOhO舿 ʀD fAfEfALW D1IvhL跾0EAA t%= uDHuLfD xA t A L臲HMHLEDLGtA t1A t((1IvhLxoEEIN`HUHUH Bv;Ep9uPA@(tPOhOHuLDmIV`HMH0H Af0p9uHB@(tPOhO蠽E-MIH9MEfAdž CfAfAdžLUUfAdžfAfALTucMIH9MEfAdž CfAfAdž LTUfAdžfAfALTMMHMHMHv;Mq9uIB@(tPOhOxHuL![LEH0UDL:DHuL&(8¸EHFA;Aہ%=u+fAdžCfAfAdžLOS= uھL?d`IN`HUH0H Bv>0p9uPA@(tPOhO H0LdLJL貹IH Iv`HvH֋p1MF`HHH:H wv>2DND9u~Apv(@tPOhOgYMF`H}HzH wv?rDND9u~Apv(@tPOhO ABLXL4v%=uHULi]IN`HUHUH Bv;Ep9uPA@(tPOhOUHuL9]DmIF`HUHUH JvAuAA~A9u~pv(@tPOhOݸH}H}H wv>uDFD9u~pv(@tPOhO苸HuHuv;Mq9uQ@@(tPOhOCADA݉ f DvD%=uAv%=u#DHLEHMDLheHuLDA݉DvD%=u6v%=uHMDLhMHuL5DvD%=u@v%=u"DLHMډLiHuL,E;AWIL}DIAD9sA;`CAQHIVxJHH9s0Pv}PP(R4 L LQDL=IFp@IN`EEx uPA@(tPOO蝵L|fAdž CfAfAdžL/MEEdHuLgP*EL,EEdHuL7 % =DfAdžNfAfALLHIVxJHH9s0P}PP跴R4~ t0P}PXP蒴 LfAdžOfAfAdžLLVIEN,AwuLLAEIAWL,AwuL$AEIAWL,AwuLAEIV`HBJHpH0H Nv:y9uIRR(tPOhO芳Iv`HHHHH Qv;Pz9uJVR(tPOhO7IN`HPHPH rv;@p9uPA@(tPOhOHDL; IF`HXH+XHD)HDL IF`HXH+XHD)HDLuDFD9uvQR(@tPOhOoH@HEH Pv;Ur9uRA@(tPOhO Hu#UHSHXHEЋSU%= EEHxt4P(PPP貘HO`UEz urQR(@tPOOmH@HEH Pv;Ur9uRA@(tPOhOHu!HX[]UHHGpHW` LJ xuHB@(tPOO辗>UHH]LeLmLuL}HHIHD HFD%= {H@D|IExtP(PPPD0L#AǾH%|EAV@@(tPOO跖A*EEHHt&ELHuH苨A$IEEHuHloMfǃ ffH-De|EHC`DuEA~ ->fǃffH-H]LeLmLuL}UHH]LeLmHpHIHU@EHFс Hx9AI$ztP(PPPCD"Hfǃ(fDfH,EHC`DeEA|$ uAT$@@(tPOOɔL*EEHuH讦H]LeLmUHHGpHW` LJ xuHB@(tPOO= UHHGpHW` LJ xuHB@(tPOOcUHH]LeLmHpHHE%= >IHH v vNPBO-Oj,H*Ext`Pf(PPP:Hw`EEx uHF@(tPOOEEr>ELHUfǃ(ffHd*EAELHuH蘤AEH@%HHЃID$H]LeLmUHH]LeLmLuH HLEeD%= ucHGpx$tAPt(PxPIp tAEHD`LHAD$IFH]LeLmLuUHSHHP v҃EHHWp|$tqP(PPSt H[]UHH]LeHHF=v Iu >q"u LS{vPF(P-Oې,H]LeUHAWAVAUATSH(HIH0M%AfǃCffǃH=(EHZEM,$AEu EmLmr=v HH{`L輵HEHC`UAUAEHUzuRU@@(tPOOA|$txI4$HHAHpH;EHpuHEAHT;EI4$HH1AH@tcI4$HH AHpH;EHpEEĉEtDH:EI4$HHA$HEĉEAAEUȉUfǃfEfHW&HwEfǃ(UfEfH &fǃ(fUfH%EHEDp AhHED;p w)fǃUfEfH%5fǃUfEfH%HEDp EEEypUĉUEfEfǃffHQ%fǃ(EfUfH*%E%HUDj 4Eu/fǃEfUfH$ẺEZHfǃ(UffH$EfǃfEfH$AA|$E9Defǃ)UffDHC$DfǃfDEfH$fǃ?fDfDH#fǃLffDLH#A$fǃUfEfH#LHuHH{`HH:A$E)EMcMEfEfǃ)UffH0#EDHOfǃUffH"LH=~ HMt$ADHfǃ(UffH"fǃ?fDfH"fǃDffǃHN,H\"AEIM9ufǃEfUfH"ID$\fǃfEfH!ẺEA_fǃfUfH!7H([A\A]A^A_]UHAVAUATSHIH0C6AEt$HptMAAAH6fDfDfH?!AAHD4uD([A\A]A^]UHH]LeLmH HIH05AHpH5AUffDfLH A$H]LeLmUHH]LeLmH HIH0.5LAUVt%fffǃH@ A$H]LeLmUHH]LeLmLuH HHGpx$tжP8(PȳP2D` LIT$H¾ H߸AH?HAfǃ)fDfH~AH07HAHpHAfǃ)ffDHfǃ(ffDHfǃ*fDfHfǃ4ffǃHfǃ(ffDHAefǃ*fDfDHwfǃ4ffǃHVfǃ(ffDH6AHD H]LeLmLuUHH]LeHHH0bAHpHMfǃ1fDfLHA$H]LeUHH]LeHHH0AHpHfǃ0fDfLHOA$H]LeUHATSHH0HSpz$vP(PPEAHr H$fǃ*fDfLHA$[A\]UHH]LeLmH HH0 AHpHAfǃ4fDfǃH]Afǃ4fDfǃH8AH?HSfǃ+ffDHfǃ*fDfH"fǃ4fDfǃHHH]LeLmUHH]LeLmH HILA4$wAD$`Dfǃ4fDfǃH7Hfǃ)fDfLHAD$IEH]LeLmUHH]LeHHIH04AT$fǃYffLHA$H]LeUHH]LeLmLuH HIH0AH?H}AEvA0tsAfǃ*ffHfǃ)fDfHfǃ4ffǃHAA.tEAfǃ0fDfDLHA$H]LeLmLuUHH]LeHHDfH0fǃ4ffDLHBA$H]LeUHH]LeHHHv5Dfhfǃ4ffDHHH]LeUHAWAVAUATSHHIH0AE}HpAAHADwBDvlfǃUfDfǃH-Aĸ@Dw*fǃUfDfǃHAŸD ffDfDHAAHD4$D H[A\A]A^A_]UHH]LeLmH HIH0LAT$vсt HIMHHI2A$H]LeLmUHATSHH0bAHHHfǃ/fDfLHA$[A\]UHH]LeLmLuL}H@HIHHHPHHO`UDhAUvAuEA~A9u~qv(@tPOhOL~puDp EFDEAD׉DFD9u AD"NDAE@(AE_POhO}vA@(@tPOhO}I$HK`ủpDh EADEAAGA9uAWA@(POhOR}AwQR(@tPOhO"}I$HK`uȉrDr }v=ArA9urQR(@tPOhO|t H{`觎ID$DEDDpDEDDpF9H{`DKHھVI$M̉ Dj:H{`DKHھ.I$HK`ủ2DjAW9UH]LeLmLuL}UHH׋Z]Ët'UHSHH0HCH[]UHH]LeLmLuL}HĀHHD(D%=IDmHO`HHHEH Pv;Ur9uRA@(tPOhO {HuHɛ/HPHUI$HK`D8DhEuADDz9uAD"By(APOhOzRA@(tPOhO^zI$Hs`HEHH Hv:J9uRF@(tPOhO zH{`KHھۖI$HK`D:DjAv@EAAWA9uAwQR(@tPOhOyt H{`xID$fǃWfDfǃLHA$wFLHSp|$t PW(P(Pyt HA$FHHHPH8HxB9QaDPt=H]LeLmLuL}UHH]LeLmLuL}HHHD DhD%= MEAA tE1E(DeHK`HHHEH Pv;Ur9uRA@(tPOhOwHuH萘Af~fǃ>ffǃHhAEu@ Hfǃ JfDfH3HD ƃJfǃ JffDHfǃ R~ffǃHH]LeLmLuL}UHSHXHHEHO`HHHEH Pv;Ur9uRA@(tPOhOvHuH6tHU HU܉HX[]UHH׺]UHH]LeLmH0IIHpt !fxIT$< tLv%=uy%=IExtP(PpPu8HuuLlfADŽ$XfA$fADŽ$L = uLL)7I$H]LeLmUHSHHH8Pt-t)HLAHrzH%H[]UHH]LeHHA%=ztP(P6Pt2~#~ u4fǃfDfH fǃ?fDfH fǃDffǃH Aľ#HfǃfDfH} HHsu HH]LeUHH]LeLmH HHD EIHDHHuLH&A$_fExQHyHH9HOH)I}H~6H~1HH44HHH9uHH]LeLmUHSH(HHGpPw PЉUHEHS`HRHUЋHHuHPHUHx ,u ǃ,H}H([]UH勗~ ]UHLDFD9v'FID@A9t#uDA9t@9t9rԸ ]HH)HcH9tUHPtP"PxqPƀ@p@HHUHft-HHрz]uHрz]tHNH ʀy]uWIHdH9t;QrBP2P2PpHҁ V ]HvUH9PQPP~pUHBЃ@vPP:PCPSpt HBvi6HH4~]t/6HH4~]tPP:PMPoAAVDfDAEBuf=E‰H|]uPP:PPo]UHAUATSHHIIHAutbAAt*HT wE~AA ~AH9wAD9}DAD$@H[A\A]]UHP ^PPnHH)HH9tUHPWPkPxnPp@pHHUHw4HHxt HHcH9u ]HDVL EAExUHP^PPmDVAYPtcfy^AH yyKD2FAtA9v$9v AA@t#ED9v A@tA@<UHHHJxztP|:PP'm B]FutFB`sP.t LJPP~UHHFUH勗HH0HuPP0PPlH|HHH;(uOLJHAH)HcH9tPtP"PlQH8t HDH;]UHHH+HH8UHAWAVAUATSHIwD~AEuDH̬MI0@MII9wLWAjAFIFV zH@jPH@8uAF~jA~AƆAƆDAƆ$AƆIH AAƆIbJH)HcH9tPtP"PjAIHx IIIM0D9H[A\A]A^A_]UHHLJLJLJLJH@HǾ@tƂ@HA@?@t fH@t HɸH@t H@t fH@tHH=u]UHHAAAAGDD@pLLAAAAL @@t3 @u HfufHPHHH]ÅuUH3b8HPHP@HP@@tHP@pH]ÉH9u UHqHcH9u8HB@BB@@rHHHHPHPH@pH H]UHH]LeHHIHHH)HcH9t&`LH*H@HHH]LeUHȃw+NB`فʉ$]UHHuUEuAAAu,A EE9uDHH@A@D@H@AAAAu!@$H@D@@%HAAAGAAED@pLLAAAAL @@t3 @u HfufHPHHH]UHAAD9u*HHFHDFD%HDFHDAAȉD]UHAHHHi]UHAȃw+NB`%¹26F<u%f]UHAȃw+NB`%¹ F<D]UHN]UHL9uI@AHI@AHAAEDD@AAD ƉHT @HH@t HH PH]Åt/UHtAЉщ3]UHHA oDAʁu8HtHAo@%H@A#DEuAE!AAu) EE9uDHH@A@DHH@AAD"DG AAEDHAAGDD@DDƉpEHMcLAAAAAGL @DɃ@t3 Au HfufHPHHHAAu@$H@AAGAAED@pLLAAAEL @HA@t2D @u HfufHHPH]UH9u(HLFLN#HNHс ]UHH]LeLmLuH IAAHHCC%DCADcPHcHD@@t6AD u LAAfufHCSHIH]LeLmLuUHHH:uW?$f]UHSHHLAHلxAxtzPD:PP@` A@AHuAM u$A@HHھgut;A4$AT$HD@ƃA $fHȀxtaP^PHPSxtaP^PpPSAT$|HƃƃDA<vtaP^PhPDSHǃƃ[A\]UHH]LeLmLuH HIjAAUHHPvP^PPRD0EnAD)H‰HHDHABDH1HLADHH]LeLmLuUHH]LeLmLuL}H0I~HF<u=vWAA4$HI DH<uMvAźA4$HD HgTLDnfE,AAǺA4$HAǀu DHiEKPvUAT$ v>P^PPPHBH HHAD$uPRPRPbPvPRPRPDPЉBH H"6 H]LeLmLuL}UHAUATSHHE~IFPvvvHUOu;C@ҁsLA A{Ju I$H4L 3L_AŀSB<w8$ŰPAwpKP"^PPNB`sA?ҍB v/v'KP(^PPNf  DLCЍJw3I$HPI$U܈P L=uB`r)<t%<t! vKP7^PPNI$U܉PI$KB`ځ LH[A\A]]UHH]LeLmLuL}H0HAAՉHL$AL$xFEt!AD$RƃLH@ƃ )AD$<uff!EuPB^PPLHA<$Aƃƃ ;hDAEECAEH]LeLmLuL}UHH]LeLmH HINDx >Aw##sD HAEl$A|$tDLHDH]LeLmUHH]LeLmLuH HIAAAD,A9t<DrP:PP0GD DLH|H]LeLmLuUHH]LeLmH HIAźLHHH#HH9t DHA9tDHH]LeLmUHH]LeLmH HIAźLH DH%H]LeLmUHH]LeLmH HIAźLHuDH>A9u!uDH DHH]LeLmUHH]LeLmH IHF@ҁ Aŀ{CuHL3L3CHwB$0P~A$%f^WB`sA?P v/v')P^PPyD  DLXH]LeLmUHH]LeLmLuL}H0HIHFHL4@D,@A~y A~tLHAA4$HDAIcHHHHHRHH9tP]^PPCAǀuXEt;E9uuDDH0EDDHE9tDDHHAF<DƁHOAljEED;HAFЍJvtPn^P(PB<u(A~tPp^PPBAHquPfRPRPaBvPRPRPCBII A~tPr^P0PBA>nL DHquPt^PPAHHBHAFuPRPRPAvPRPRPAЈBEE DH+H]LeLmLuL}UHH]LeLmLuL}H0HIAA $fxqHH ȀytP^PHP@xtP^PP@AT$LHDH-HAA4$HAA|$=uYADDH%HHHPH@ADHADDHAD$DDDHH]LeLmLuL}UHH]LeLmH HAՀ~y~uAHbAEDƁHAžHHHPH@DHHHPH@/DHDDHAUDH]LeLmUHAUATSHHIFЃv&t! vPU^PP><uMLHAŨA4$HD H6A|$yA|$th<DLHAA4$HnAv%f DHA4$H#AD$<@@t6HAD$< vSvPl^PPN=H@H H#sHHBHAD$uPRPRP<vPRPRP<ЈB HH[A\A]]UHH]LeLmLuH HIAԾfAźLH-Aƾ HHDDf.HDD*HuDDWHDD,H~H]LeLmLuUHH]LeLmLuL}H@HVffЃD|Dvt4P^PEPx;IDExt4P^PPO;AE!Au u4P^PP";tvyrAulL[AʼnHLUL[EA$%fEMDLqAcAuLHLèLځELj{y {AHLEȺLEAŃ  4P^P P9AAGt-*DEM̋ULlgA$%fEM̋UL;6EM̋UȾL#nLECOAALA v]EAAv4P^PP8I$@I$EGM̺LI$HPI$EAuPRPRP8AvPRPRPf8ADpEGM̺LYHLEȺLEC:bLr CqH]LeLmLuL}UHH]LeLmLuH H6$AľƁHALA D¾H0HH\DHHH\DHHHPH@ADHLHLHHPH@ADHH]LeLmLuUHH]LeLmLuH HAD4D4AEIHLVA8uPn:PpP;6DrrPo:PP6ADD AA D!D!DH9HB|(u\HfǀfDfHHHRHHDdHDH]LeLmLuUHH]LeLmH !t+IA!eD!DLcH]LeLmUHH]LeLmLuH HAA։HL$AD$ȄAwsAD$<u&A$H:t uSDH<uA$H<vP:PPY4A$mvD;r D AD$AҁDHg!A9t;AD$@t%DS@D9u DHDLH#H]LeLmLuUHH]LeLmLuL}H@HIUFDHL4A.AAL$B`ƒ?A#2u ځUDH HHJHBAL$B`ځUDH]AŃu$HAʼnH"EvEyDHAEAt HAL$B`ځUDHD!AtDHA$DHH]LeLmLuL}UHH]LeLmLuH HIAֺAAL$B`߁B7HA$DHfH]LeLmLuUHH]LeLmLuL}H@HIUD>FЉUHDtED!fAED;}̉AE9LHt DD}̉E̺DfuHDDuHDDHSAD;}uH]LeLmLuL}UHH]LeLmLuL}H@HIU̺AE4$At$wDAƺDHrAAL$B`ځDu@HYAL$B`ځDD;H+DDHH]LeLmLuL}UHH]LeLmLuL}HPHIAUFȉMEH0H;u HLJ0:HHHT HHLD!LHAƋE9EEDfHŰuHPuSLHt EUUEAL$B`DuHhAEA|$y HAttAŀu9AL$B`ځDAADHAL$B`ځDAMHAŀu3AL$B`ځDDHAL$B`uHsU9uHHqHQkHQHiAL$B`ځDH4UDH$LHAƋE9EuH]LeLmLuL}UHH]LeLmLuL}H0HI`AA4$H|yHAHAźDfAt$H{ADDf~HDDXH A$DHH]LeLmLuL}UHAWAVAUATSHIDEAEAEADAF@IHC tb{t\IAfǂffI襄IHRIHDlIDcDDAAE!UH[A\A]A^A_]UHH]LeLmLuL}HPIFfEȉÃCAƃ A AƉECAEfEENʃ9uiP^PPw*I O0EEt@uLAăZZDDUL'D9esEEȃfuuLiAMuLAǃuYIIHC舅HUľXLHھ LDDLEu }t UAD$<**DDL@AMĉʾWL賿vEyButiP^P P(uSLL.'Aǃu!AD$f%fEAA,AD$f%fEAA,AD$<UI|yuLALAIHED EDDL蟾u+IHƒHDXLX$I蜃HDXL2HUȾ LDUľL'DUDLUDLmuLAD$<DDLͽAD$B`r<tD DLXCAAD$viP^PhP&uA#uADغuLDLeB`sUÃ}uAD$uUL'uL_ځcL\Ã}t#uL$ھL'ULB`H]LeLmLuL}UHAWAVAUATSHHA DAfAA!AED4HDDAAE!HHB@H9vdqHH0D@@-$DPH=a'o1.P:PP$H;sHƸHECDAE!AED4H DDAAE!HHB@H9vdqHH0D@@-$DPH='0.P:PP#H;sHHECH[A\A]A^A_]UHH]LeLmLuH IHIՋB%fKx !LKy {CЃ wyDsAAE tWx2ѸA $A $fnL芹Et[EL蕻?HL6-<wP;^PP"HLH]LeLmLuUHAVAUATSHHDAAAED4HHHB@H9vdqHH0D@@-$DPH=h'v..P:PP!H;sH͵HDDAAE!:DAAAED4HHHB@H9vdqHH0D@@-$DPH='-.P:PP H;sHHDDAAE!:H[A\A]A^]UHAWAVAUATSH8HIIDnH6HthHEAD$ tHHPHUHPH@EYMAOlLmEALjAA4$HL,AEЃ w}Uă}uUDAEĉUăw8w0A}uAUHHAUH衶‹rP^PPYAMx(!AMLH萷Hi< u!wP^P@PHUAUDEHsA,HEHEAHHB@H9vdqHH0D@@-$DPH='*.P:PP H;sHHIL;eEH}t EăHUH8[A\A]A^A_]UHATSHHIHHA$EEHU UPHEd$AHEHH[A\]UHH]LeH HAIIUPUVUL6HULH9H]LeUHH]LeLmH0I~HEEEpUPHUоpUPHH AA|$HL$AD$<uofxIAE  fA|$@yfA|DyHHD1AD)AA1A)EuAMDHYAMDH;t.HHPH@DDkHߝHHPH@DH话HDu @H@@t@@pTP@DDL@DHH@tHHD PH}t1DDH轡AMDH1Au7AMD#H AMDHAMD#H֞DD+H虜HHPH@ DHnDD3H[HHPH@DH0DD+HHHPH@DHDD3HߛAulDDHƛHHPH@ DH蛛DDH舛UDf~HoFMDHZAI>MDHkHEHH[A\A]A^A_]UHAWAVAUATSH(ItIDŽ$(IDŽ$0ADŽ$A$t ADŽ$E$EEEAI$AT@DtED9A$A4D t' EE^D ELL$I$HB@I9$vgA$qI$H0D@@-$DPH=e'.P:PPI;$sLI$EDL#I$HB@I9$vgA$qI$H0D@@-$DPH=e'.P:PPWI;$sLfI$A!,}UA$UȋuLUȋuLI$HB@I9$vgA$qI$H0D@@-$DPH=d'".P:PPiI;$sLxI$0A$fA$A $!ADDA4L譡DDAAD!I$HB@I9$vgA$qI$H0D@@-$DPH='c'5 .P:PP|I;$sL苔I$H9s9Cu;u H H9w$ HH9uP ^PPf=uAHcCHH9u5HCLH)HHcH9tPtP"PCHHH9wI}@AuHHP CUPHHPʹHUPHPļ C<uWHHPk HHPMR THHP貫9 C<u]HHP莫 HHPo C<u_HHPQ HHP2 A <4DsEAuFHHP.A3HP茎DQHP1x\ AHHPѓA3HP/HHVHA DvD: HPwHP:t H@HHPH@fKx DցHP͵HHP踓cJEtADdJdJHDHPsHP7AHLDFF-$DPH=4'.P:PP3H;s HP?fHL~-HPH@ @ HPHPzHPRHXHH@HHAAAD sƀH9u AEAQx(s#AAHPg%HHHPoAD$ADžDžDHHCHD;<rP ^PPEH0BH@@cJH)HcH9tPtP"PAAHhHH9wHQHH9uHhHhH+HGIFDt =vt DẢHՠOHDݠHHoDD1u"McJLMcJT堾 LHMHU }tf }t} /. LƾLyrkLxIEIEZLe<%IFxIFxLeHh[A\A]A^A_]ÐUHH]LeLmH HIIH¾HHH@La ADiHSHrHs By uISR(tPOO踡H]LeLmUHSHHHHUHSHHHP8tPH8uX(H裨HtMH8 tHt)tHHt<)uHHH)HH H[]UHH]LeLmLuL}HPIIIHvHÃxAD$DMg@LHuL>EuIUXLHHEȋ ItA;WrwP2P2P0HHыuyvPN PP;PtPyH**@@ftiItA;WrwP2P2P蟟HHȋu&@ HpxtP= P8P_IuI>#IHEȋ ttPZ P:P$MuLmI?Aw9urwP2P2PUHHuJ%t9r' %t9wwP2P2P語HHHtăwztP+9P8:PnI@ UA;WrwP2P2P:UfPLhCx uPAD$@(tPOOHH]LeLmLuL}UHH]LeLmLuL}H@HIALzEAA/LHu[.LڤHuLPHXIHkA?luAiuAbtLPH߸'IHkDLQIH*`H8/:HSHHH+HHɾHxPSIHH¾H蓞HH#P8t6HHIHLHIHuQHHHpLHL0LLH]LeLmLuL}UHSHHH?HtȠHH[]UH1H]ÐUHHW  t u 9tHHW GX]UHWv&uHGt $]UHGGPHHfD G4G,G8G0HGHG ]HG  t tHHHO H t u 9tHHG GXHW HHW \u UH]UH ~:P-PPK~HcH`P8HcKPuH8:PH8=P]UHAVAUATSHHHHLPLXt&)`)p)U)])e)m)u)}AՅ=t uV{0u#{4u$HpHC($C0S0B;C4vHH HK(C0Ls( HILc8DžDž0HEH H0H(McH5o&LHLMt!H5Q&HƑLHLKX~H¾PL}HLLc8DžDž0HEH H0H(McH5&LHLiUHSHHsHy H߸UHUHH]LeLmH HW4?v AD$Hw(H8D趝HC(Dc4S0D,S0H]LeLmËcvUHHjHHH1QfAA WHHHr fq fB PUHSHHCH[]UHH]LeLmLuH HHWHR@H t;rrP2P2PϖAIIEeEuD$ՠPpcS,HGc,D%=uD!G,AH3DfDHnADfDHCHHfD?DDAUHHfTs,D DHc,H]LeLmLuUHAUATSHHG0D#IcKPs3S0B;C4v H{ HK(@4C0HS HHS \uHtHKPxS0B;C4vH+ HK(C0H{(Hulu C +u C Cd uH߸EЉCA7 3S0B;C4v H HK(@4C0HS HHS \uHHKPxS0Hs(H{8MHCK`HsH{@HC HC% ADDA|$D$PHHS HHS \BH 5HS HHS \Hu1 fH߸\'HC 03HHC \u Hƃnn4bbtVa@effKtDt_t rEvtTx1 H߸ p f \ R H>AHcKPt0 AAHS HHS \uHHKPuAS0B;C4v HGHK(@4C0HcKPDnHS HHS \uH$HKPtUFlHS HHS \uHHKPt%FlHS HHS \uHAS0B;C4v HTHK(@4C0ES0B;C4v H^ HK(@4C0HS HHS \uHW3A9kHS HHS \uH.A"uS0Hs(H{8ܲHCfA[{0t 'HHC(CC A,HS HHS \uH*HS HHS \uH*uOHS HHS \uHs/u'HS HHS \HLt;*t t uH;qL;/gHS HHS \uH  ;u HS HHS \uH|HS HHS \HAHS HHS \uHj&HS HHS \ZH?AHS HHS \uH=^HS HHS \HA1HS HHS \uH= HS HHS \HAHS HHS \uHn=u-HS HHS \zHGA;<HS HHS \LHA WHS HHS \uH=u-HS HHS \HA ;>HS HHS \HA HS HHS \uHb>HS HHS \H7A }HS HHS \uHHSHHcȀKPx$u% H߸Ht H{8H;Wr HHBHCHBu#HSC HC@HHCA=w9=vPBO-O;,CC AtH+WHHPLBfuBC vC nHS HHS \uXHNAFA>A6A.A&AA A A A DcDH[A\A]]ø9wuUH]UH9wt]UHAWAVAUATSH(IIEEAHHLD'WU_ DEt)P@PPŠIW@H EAtD;jrP2P2P萊DHHȋM@E)PEP8PQ:Eu)ېHHLIG@H0HA9rP2P2PDHuG%t9w) %t9wP2P2P誉HtɃt%=0? LnHHLuX uf}I@HuEDeHUD"HUȋMJHUMfJAE*uND%=uU U=uUE ‰UCt%I@UAEt)PfPP蕈AAV,Ut4At tu!AGуA ԉE}3E9E&I@UDXAŸME}FEDA9CE8 EIG@H0HA9rP2P2P蝇DHuG%t9w)%t9wP2P2PUHt%= u L"D%= AHHLt HHLX ufufE%= u LE%=t}u Ln}t"UEHH=v LIEE%D9v AA ċE%A t)PPPEDeI@UD+AŋUUDH([A\A]A^A_]UHSHHHG@H+0HHxHH H߸UHAVAUATSH HG\G\~ YIuHGH+tLHj-HtLHAF~HtLH[A"!Hgt%LH7A>AAF (H1tUHEt,H\$Aľ)H$LHEfLHj)H*Ht@LHAvH{@At HH9AAF5&Hzt,LHJAv H{@AF*H=tLH)+HtLH)suUHS uBAHCAF* uC AHCAFuQC AC AFHSLu2HCD` HCD` H/=tAE&AF H߸[HEtcHuHAvH{@Iċt$H{@uIċt LH]HA C= t .AvH{@PIŁ{ u)0t LH:H{@IH4{t HAEu3A}t,HSH{@AHMLIHt  u?HC@LH+0HHxHSHHLB H߸` uAT$AHA$AFsk\H [A\A]A^]UHAUATSH(HIAxEEA D$P?HjtNHuH :HhHuHA<$tEEA$E9ECEAD$덾H t9HuHBA<$u }A$AD$ CHt9HuHA<$t }A$AD$ |HwtHuHEA $^HItHuHEA1$&HtHuHREA!$Ht0HuH$EA9$A$AD$ .Ht0HuHEA9$A$AD$ <HktQHuHA|$ u} uEA9$A$EA9$A$AD$ >H tQHuH@A|$ u} uEA9$A$EA9$A$AD$ )HtQHuHA|$ u} uEA9$A$EA9$A$AD$ HEtQHuH|A|$ u} uEA9$A$EA9$A$AD$ e Ht HuHMA$$7 Ht1 HuHA|$ u MA<$MA,$+Hst0 HuHEA$EA;D$AD$-H2t HuHiEA)$뽾*HtHuHA$EA$뒾/HtnHuHEA;D$vAD$MtA|$ u0A<$uu HA$A$A$A$%H]tnHuH,EA;D$vAD$MtA|$ u0A<$uu HuA$A$tA$A$`H([A\A]]UHATSHIAD$HS@H2tJ9rP2P2P{HuH%t9w*@ %t9wP2P2PzHtɩt H[A\]UHSHHHu0Ey H^H[]UHH]LeLmH HDo`G`8(HADk`)HDH]LeLmUHSHH(u ЅE‹K, ЉC,H[]UHAUATSHHIC-$(PAL$,AL$,H(H(H=LkHAE=GBth=GBw= X= )tO= M=1ct+=1cw = dd=,\t+=VPLHAL$,t(H_{HSHBz_u HJz_HD8Vu(H0Pr@ vH ҍLJHDwo$ՠP! @IAAPD"AB UtUUIMJH[A\A]A^A_]UHAWAVAUATSHIH84{LqA}4AHPL^҃ \Et }LAADžHPLHPLsAEtaHHLIW@H t9ZwP2P2PjqHfDHhHHJ Q I@HHIW@LEtzA9rP2P2PqDHLuKt9w' t9wP2P2PpHHLtËuyDDHh'Hhu ut LAHHD"HH u |Vu+u HhuI wE9s:LA<HH |HHJHhHtHHJ Q IW@H t9ZwP2P2PToHfDþ,LtHP EM1;LA}4}LIG@Ht9XwP2P2PnHfDH8LH8v,$0I@H4t O94rP2P2PXn4HHH(D0@9vDž8%I@H9GwP2P2PmIIIEl$A$ tEHHHA ցw s4uu At L^DžHD$E AuAtD9v DAwoAt7h9G900B0A<$t AAA t!AD$}tAuEuAA!AA9v AAD!9uu-pA$AD$3%  ƍB!A$!AD$At;8F88AD$Dž80DH(AE80!B 4Hĸ[A\A]A^A_]UHAWAVAUATSH8HIUI|$GdF HFHF F,F0FfFJAAALHqswnHC@t E,AǍD ȉʃ A!EA Ł~Mu& H߸EHyEEAŠ't8'$V(t&)0LHALHAPLHuAƾ{HEE DuE PEEHSHU{t H{ tHMHw H߸H=Ht8HuH*} u}x E E } PIMMH{@HuEHC@H}tM;HrP2P2P iEHMfLHEHUJ P UāPHEȉEHUȉBE=uE H{@UHu*,H1t {}}H1HC@HEtD;prP2P2PThDHM HS@H D;rrP2P2P!hDHCu6DHBDs H1DD DDDAtAAEAtDLEAt,At$,@LFAd$,D%%AtIAyt H߸:D ҺDEDDAtA tVAuKAŀA@A t @ABEu=A8 H߸EuPP8PfAt$,A4DL.Ad$,AD$AD$AD$,AD$4AD$0AD$8D%7AAAAA;LH8[A\A]A^A_]UHAWAVAUATSHHH0)3Dž<AA.H5t%.H?.H2A`HPHDž\HPHHPHAH{@Ltw9rP2P2P eHL‹uM%t9w*%@t9wP2P2PdHHL‹tHH0u AuAA$ AH{@HHAƃ<t:HC@HEtD;xrP2P2PdDHfDt/jUHSHHHH0uGf<wujHGH9Gu`tHiHC@H_HSBxuPC@(t1POOMHsH+sHH[]UHHG@x$tPlPPLp ]UHHGH9Gvxt6i0]UHSHHHGH;GsxtH3jHSztPKPP9LHHHqHpAzuRC@(tPOOKH[]UHSHHBWLH9HCxtPPEPPK@@#SHPHCxt`PPPeK@SHlPH[]UHSHH]tHC@HHCH[]UHHGH9Gvxt6&hH9t;Pt9Pu5HPH$HPH9w H;PPPHD PPg]UHAWAVAUATSH8HHGLgI)I@x$tPPPSJMp ,&zHtfxt`HSHJHKHH H qr9uJSR(POhOIHC@x$tPPPI@ HSHJHKBxuPC@(tPOOhIHHCHAxuxAEMjAHCJ4Et7FuLh@ HE=wH}mHELmHSHHBH Hv;RJ9uRC@(tPOhOHHCHPHH Jv:H9uPC@(tPOhOCHHCHHUHIHu HdHkMtH5& VH t&HULSIM9H5O& UH8[A\A]A^A_]UHATSH<HHHu;HHLHHX _H:t/HHlAľHEuHdHH [A\]UHATSHXPAĺHAuHCSR H*Y /DHAuHS)J HS*HC[A\]UHSHHHSBHSHHSHpHHDH覃tHcH{HCH+CHH[]UHubHcHGHTzu[HGxtPjPPYEpVBt%FtPIHG@]UHH]LeLmLuH HIľHIHCH;Cs`@=vuQHIƾH`MEMLDID$INMHEAV IvHhOHEHMEMLDIL$M PHDȺLLHƺHH]LeLmLuUH]UHATSHIԺP2HSHCHHHKHHH Jv:H9uPC@(tPOhOCHD HKHAHCAuI$z=vuaHSHIHJ Hv;R J9uRC@(tPOhOBLHz HZ_[A\]UHH]LeLmH H~IľHnIžHFIUMHDIt$MHDH^~HH]LeLmUHSHHOHH[]UHATSH AľHHFt*E~%DH_HHH_[A\]UHH]LeLmH IAHDHLSulxtkHI\$IT$HHBH HRJ9uRAD$@(POhO AtL^ID$@x$tP]PP@@ CCxuPAD$@(tPOO@AuC HC H]LeLmUH]UH{]UHATSH*IH@HCLH@PtVHKHHABzAH9uPC@([POhO?AD$=wLHoev7HSRHcȃ|$tP@PPU?HD u$A$PvҾ+PH߸RHFAT$ v҃EHOH@PH߸HCxtPGPGP>@HSBBxuPC@(t'POOg> [A\]UHAUATSHH BAă yH&Iċ@=vukA<$L\t[HSI$HBH HRJ9uRC@(POhO=A|$CDI]A|$tP PcP_=A$pLxu4IMtA;UrP2P2P=HHȋt%=4HSHIuA}wP2P2PsH,\0>H,HH1HpH^,\HP`d=H`HL;`   Ƅp<@<.tHpH.t@~Hps@HHpH+HpH+\HP;HË@ HL{L9r HkH"HHHXHHDHHA؃\t "t u/L9r H H\HHKPL9r HH\HHcwAWKPt&L9r HHc vIi X)L9r HLHX0HH0L9r HHHHIL;HL9r HH"HH:\HP\H¾FPHPOHXHc\LPP>AE LpA]0LHL@ LHH9wgDžDžLHHHt(D)H9AU0HHH HH9sH [A\A]A^]UHSHHHHCHPHSH@MHHCxtPEPP'@@XSHPH[]UHAWAVAUATSHXIHUȾJHHUL2ILeȺL苷HITHHHHIHx HEH9HGLڷuPLHHEL}LIHI)L9HHI)AEIL-I]HHHt;I)M@ILLIHuMu @ML+It$LyLHuLjAA}^uIAHLHHHEHHDžDžLHHIHt]t@H+HsLֻLH+LĻH7HHH#HCH;s E\L HX[A\A]A^A_]UHV]UHF]UHH]LeLmH@ HIHCHPAH;Ss x AEHSHHA|$u$At$H@EHMHgt NH5-HH]LeLmUHSHH贾P sHXH`6H[]UHAVAUATSIHWH+WHAՋwHX+6IE~9L調%9tL?-HcALA9}IcLL1IT$BBxuPAD$@(toPOO[A\A]A^]UHAWAVAUATSH(I譽IǾLAľL#IAG EAUHUEYIEHUHꀉP@HEȀuAE@(oPOO]Mt@HcAF HH=~ 8LB+IcHHUH~28L!+IcHcEHHUH~ 8L*H}/HuHXULP4IMtmAV H)UA~_}~!AL H9UHDA^ ޅ~AL H9SHDHUHzXA_ AA~DCIH4@1HH9ALEHEHpXHUL/IUBBxuPAE@(toPOO[ H([A\A]A^A_]UHSHHbH詼H$HS*BH[]UHAVAUATSHID` HڼAʼn¾Hȼ…BD HECD%DHEDND9DNE9zAE)A@v lH(S H+SDHH9 DH'~McKt.E~+HLC*AHHA9AD$[A\A]A^]UHAUATSHHPPPPHPHHb8IċCDhHSzt`PPKOt DjLHAD(@A} uAUC@(toPOO AD$H[A\A]]ÐUH]UHH]LeLmH HAAվZtWHťAt$H踥AuH謥HRHAľHDDH'ADH]LeLmUHH]LeHHAԉDHH]LeUHAWAVAUATSHAU9IADL.UľLDLtUDLZ LADuE)A&EDЉھLDLDLVtDLKDLҟUľLnDLtUĉL L蒟A~ھL%LϣEăE¾LULQ]D}&U9U| L$DLẺEȋUȃU̾L访DLXuD9 L$DLϞAھLaDL u;]}ML菞UL+U̾LŰuLkUD)E+E9|ڋuLLDUDzuȃEċUȉUĉEȋULZD;}xH[A\A]A^A_]UHATSH7HCDAľHϝHCx t H޷DH[A\]UHAWAVAUATSH8 IͷIƾL腵IHtDh AL誶ID$HPI9T$vxtLA LyCAHL/A9DHILA߉ھLzID$@=vAt< tЃEȉH͠OD{L!HD9t$EtHHHJcHH8 [A\A]A^A_]UHSHH]HPHx&|t|t*HHufWfWpPHRH HAHHHAōXIGA+Gt ULLE9A;\$sHcAD$L4LL7IE9l$vAD$HcHD DLw0HtNHIH PvDAJ9uRAG@(t!POhOAFA9]O]]A;\$sHcAD$H LL7IWHRHH JA9uAGp(Q@tPOhOthAT$t]у@tPTNOOH)tuPUNOOAT$PP@@auH>@@GtPqP8PHG@HHGMPI$H[A\]UHH]LeLmLuH HHGD`A|$$tPPPeEl$ Et$AI}u HGEt6W H)DHH9DeMcIH{It$(LLsIuHAI})t2HCxtPPhPpHH8HCxuAE tIuHIADH]LeLmLuUHHGH;GsxuxtPH]UHSHHH8u HH[]UHATSHIHOHGH9s`ItXuHCHHCHKHCPw5PP0P@BPSBHHHK@z uRC@(tPOOU[A\]UH床P%]UH庑P$]UHSHHHSH+SH9MHqH[]UHSHHH0HtH[]UHSHHHGH9Gs ^H GHHAH[]UH]UHSHHH8tPt HHH[]UHSHH%Hu@@HGH[]UHSHHH8>@@HH[]UHAVAUATSIHcHGHH;_ICu.;Dw tmEHLLlI9@@I=w&t>OL@@HI+t$HL HI9\$rL<[A\A]A^]UHSHH%THHH[]UHSHHrH0HH[]UHH]LeHH/IHI$Hu H蠼H]LeUHH]LeLmLuH HiL`HLpHPLDHILLHIEHuLHH]LeLmLuUHH]LeLmLuH HڜLhH_LpHPLDH"I@LLHI$HuLHyH]LeLmLuUHSHHHHtPH߸ș PHH[]UHH]LeLmH H}L PHAź H誝HcDL@@H觺H]LeLmUHATSHL PH蘞HKHqH9sv*QwH,q#tH LtH LHSH*B[A\]UHATSHPPӔHCHPHH Jv:H9uPC@(t(POhOBHCPH臬P@PJPHTDc(PH5,N&HA$DcPH5tN&HA$PH5PN&Hy[A\]ÐUHATSHgL`HLDPPHڜLHH,[A\]UHSHHfWlEH踌H,uH,HȔH[]UHH]LeLmH HIAH,HtH譍AEyL-H߸}HEDH]LeLmUHATSH@HH胆H{PHEPH E PHEPHEPHEPH-lEĺPHH,AtDHAľH DeH}THu Hݒ H*HH@[A\]UHH]LeHHIHcLHgH]LeUHAVAUATSH@!I:PHþL^ L5H,HE؀;!uHHuH} IHuH}IMuID$@;*{t{ L葖A{PLAVPLAVPLAV PLAVPLAVlPLAVPLwAVPLcAv LmPLҧƅ%ƅHL/LI %uCu1L9r H蟸HHHI;LcLHHHHHpI\$AT$tH˸H@![A\A]A^]UHH]LeHHLgH*YA$ILcH]LeUHATSHHGH;Gs@Pw AEHAHSHBH9Cvz wHZDUHSHH6HHH}H[]UHSHHH/tmp/luaHEH_XXXXXXHEH}Hu HHuHH[]UHATSH蜊IĺH臊HL@@LH2[A\]UHH]LeHH@IH@@LHH]LeUHSHH̊HHSHJHK*H[]UH PPJP舌]ÐUHH]LeLmH HI襈IźH萈MLH¾PH߸AH]LeLmUHAVAUATSH*IžH[zKFPHLH֘Ht3HIH=PPL꾰PH߸5PH耘H~tPH߸j PH AADDH?Hm~u(DHQHL=PH߸LHhHXH~t4HtHI DHyAVPPHQLH臢LHHثH}tLHILH)H譊H=PPu*H蠏H|LH[A\A]A^]UHAVAUATSHĀH݆IHxADpKFPH藖LDH艖H|tWHwLHHtLH߸H{LDH0VPHHK|tHSwHAwH{\PHϠLH0VPH負.LHPHIDL)LHR_PHzH#{H`HJt)H` OHJtH|tPH߸HzH$HFvA~=AADHzDHzH'AE9}ϸH[A\A]A^]UHH]LeLmH IHIվ-HxHPHHEڹhP"OHLHLL誊HþL_vHH]LeLmUHAWAVAUATSH8 IHHIMHlA}tzLLHLhH\LHOHL6HþLuPHHH5IA<;u H<;ttB;H@IHutHLDHLl LH)HLևM?HǯJHھjPLDJLuH迯LaHH)HLuHH8 [A\A]A^A_]UHH]LeLmLuH HIIվZH芁IHuLyPH߸9AP"OLLHH]LeLmLuUH{]UHH]LeLmLuL}H0HIIAHP4H运HwtH!IrHrHXIHPHUHLPH߸謇HvHšI<$uCA}*DLIHHHXM<$MA}*uHTLEuPHHI<$HuxHHEu~PLHHI<$UIľHqMtHLHLHЃ' HH1 I$$H]LeLmLuL}UHH]LeLmH HIľ.HHHL)LH^H~PHHIſHtILHHQt-t LHLLPH߸莅H]LeLmUHH]LeLmH H~IźPHHBIHt"LHHt LHH]LeLmUHATSH~IĺPH\Htt0PH߸FLH(HetuPPLHyHƿHtLHHHtLXPH߸@[A\]UHATSH}PHHIHtHH t LH[A\]UHSHHfyIT$H4LHu/Cfy!IT$HC<(t9u~9tF9r]UHH]LeLmLuH HHLL9uA2BAI~(uEFfx4HDN,πxuHHcHtAM9u xIMAAx(uKEHfEx7EN EN$AyuA9LMcMtAL9uMAM9RYPIYPL9u;AH9ȃ Ѓ 0<EAHAI9LH9AEBQ1t&Awg҃1ЃuTLHILHI9t0Ht AMu#IDMELHHAADH]LeLmLuUHHGH AN9uDQ:QQA< u A@< tDQ;QQ身AN<A@N<@w u$@u u HLILH]Nf;Ju(6f9tfwUH]DFBH9UHH]LeLmH HOEN EAyuE EEN DNDAzuADLFXȀw 646ZDcAw E9u9*b Aw A<88t;QeQQ=EĻAy(u/AAfxE!E9ut EĻEAAz(u/ABfxE*D E9uEt pEAD9tGE9u=V9<w9v;QxQ Q臩AJA2Iu9tJ øH]LeLmUHAWAVAUATSH8IAH_HHEEHDG@D9s=DLEH€x(HHfɋ ʉMI9tF<#uNH…t}AO(HAątdHcEMHHLt"HHD(HAąt/DE9sHCEFtE9rDHCL<H1AHLEH([A\A]A^A_]UHAWAVAUATSH(IDLwAIHEEHHUDED9DCA9DBE9HHEDIHHUHuLt@C;ES;UA$bA9vrAD$IH9s%xx[xDuSxxMxDftEHH9rCHUfC CfCffCHCHEDkE9-LH([A\A]A^A_]UH9B9v@HGLALH Ȁyu  LIt AP9w8]UHATSDACHG@9LGIDA9u$IDA9u@AO@uHELAJf@tEA\C2\uEAwoA9tjwi@9zMcB_@9sNHwH9uH9u @%@9r۸ [A\]ÐUHLGI4teDNfExZ~@5t@@(t:@6uDEKȀxu H HcH@6uH) H EKȀxu]UHH]LeLmH %= uf~t Q?MQQHDffLJCffLJ-ADHfǃfDfHX-DH]LeLmUHH]LeLmH H%= t zt Q4MQcP;D"fLJCffLJ ,AAt$HfǃfDfH,LH]LeLmUHu4H%t;Gr Q2P2P蠔HHH֋u;tVtkD@ \N wNDJBu~* 4uVt D@ ]UHAWAVAUATSH(HfAHGD$EqAMDdAt QMQ( QxAt t u Q2P3P?I7%tA;Gr Q2P2PHHItL YPVD QMQZQE`EIAwA9sA%IAwD9w Q2P2PnEIIEeAE A} LHt t u Q2P3Pt9r Q2P2PHHHtHL ADHHHAM BAV4u5wWHHHHw BA t/AE&AAAAADžDž6Dž DžDžA"Aw0DHLLljGAʍ A9sA9wAEHHADžDžH7HAfǃ (DfDfH'HQDfffǃHh'HF DnDAE9v E9EIHIAEfǃ (DfDfH&AU AMKfffH&AE9wDADž DžHDE9tmfǃTfǃfǃHW&HDDH߸BfǃTfǃfǃH &H([A\A]A^A_]UHAWAVAUATSHHHIUALEDdPwIHHE :ʁuHUHHHM w(@@AHE u$AHE HExt QgMQpQ6HUxAfLJCfDfLJ $AǾHfǃfDfH$fǃ CfDfǃ Hl$AHE fǃ (fDfH-$AHE sHMyt QfqMQQHEHEAHMHLVIǺHuHkfǃfDfH#M A  I%tA;Fr Q2P2P膋H|t QwMQx Q`u̅HUH4AAI%z%=0u p&fǃ (fDfH"AHE* HUG@IHMt ANM9r Q2P2P蚊IIL}AEEuWE%t;Er*E%t9Ew Q2P2PBIIL}AUUtHMyt QMQQHEHEHHELL E}%CffDfǃ Hm!AA%=  HUHRHUAt t u Q2P3P]I%tAN9r Q2P2P2IIIAtu0%t9w Q2P2PIIILLEEw/ECffDfǃH] A Ewj}u5E%t9Ew Q2P2P^IIL}ECffDfǃHAH+fǃ (fDfHAAu[} tUEDffDfǃHyA)A9Fw Q2P2P藇AIIAEu5I%tA;Fr Q2P2PVIIIDdLL`ELLREAMMAGEAME7?HA?;9sA9wEMfEy zfǃUfDfǃpHAŋFuefEx%fǃUfDfǃHAHHfǃ*fDfHADHfǃ*fDfHbAA7Hfǃ (fDfH/AWKfffDH IM9uADDEH߸fǃTfǃfǃH'LAIOd'AA=H]LeLmLuL}UHH]LeLmHHA%=ztQ QIMQQuzD*LfǃfDfHHC`HEdHED`ILmLmHEEHp8!u HED;`s HC| WHPfu DHH]LeLmUHAWAVAUATSHXHHuUDdHŰuLI7}t AO9Mr Q2P2P[yADeIIA$uO%t9w*@ %t9w Q2P2P yIIIA$t‹ẼwAuDv HuHAD;AẼƒHuLILH 4H tH! H=fǃQfDfLHA$fǃPfDfǃHEHUHxt'xu!HuH6HHLLhA$A$t t u Q2P3PQwM/%tA;Gr Q2P2P(wHIMAEtAEEHEAEu }uCH1AHUHUEAMML}DHHfǃ (uffHAADHtHuHH HMAE(At"AEEuHELEMDLHDuD9uWL}^Ed$EFM/AOA9sEEE%M/AOA9r Q2P2PuEIMEeAE AfWEA} ?Lt t u Q2P3PEuM7%t9r Q2P2PuHIALttH@UH MtHuHHHEE.tHEHEHEHUHUEAuHHfǃ (MffH LEMLH t H莵E`H3fǃ (uffH AHHtHuLIDLH)HEHLEDLHhuLHt[H‹uHKHH'HHUHEdyHX[A\A]A^A_]UHH]LeLmLuL}H@HIUAϋdHEHAEuDA EDDffDfǃHa AAtA u0fǃUfDAfDH* AAA_AH'fǃ fDfǃ,AFtu7AADfDfDfǃH AD0tu+HC`HUHBuā"H}EAA4uEuAuHRfǃPffǃH AADeADAfDfDfǃHEELHfǃ (fDfHfDffǃHvEHEfǃ (fDfHBDeAKfDfEfHIvHafǃ (fDfHfDfUfHE;HMuHfǃQffDHADH]LeLmLuL}UHAWAVAUATSHHIHuHEHEHuHEEd@IMtAu9r Q2P2P>oHHˋuK%t9w( %t9fw Q2P2PnHHHˋtƒ{@@<%= uit t u Q2P3Pn%t9w Q2P2PbnHHHˋtCfAMfAfAdž LHEHUȉLUEIDxDDLANj{t2LfAdž fEfALMAD#DLSEHUDLANjuLqfAdž*fEfALAfAdž (fAEfALED%= HUHx t QMQ Ql@@IMtAu9r Q2P2PlDIIA$uL%t9w' %t9w Q2P2PQlIIIA$tLLTEEAD$u1ECfAfEfAdžLAu.ECfAfEfAdžLaA[LfAdž (fEfAL-UDfAfAfAdžLAA|$qA$bfAdžUfEfAdž LA6=HMHx t QMQ QjD`HEfxUHL{IMtAu9r Q2P2PjHHHˋuL%t9w)%t9w Q2P2P5jHHHˋt<AHMLHLNHEHLLZfAdžfEfALtHED D HEpycIUAtE;er Q2P2PiiDHt&IH*EHuL'GIL1 u L` t Q1MQ QhAEHEA}%=4uzA|$ urAD$HWv8HEAAMIFEMgIuAw Q2P2PEH DH萷AVLgIuAw Q2P2PEH0DOAĉ¾CH߸EEfǃMfDEfLHA$H]LeLmLuL}UHH]LeLmLuL}H@HDdHD`DxEIAIEuD%=&DHEMEgI6xw Q2P2PDHHKEMEIgI6HEȃxw Q2P2PVDH DHAEtIMHDHuHO\H@fǃCffǃHAƾH͞fǃ(fDfHIEADuH蚯H]LeLmLuL}UHAWAVAUATSH(HDdHUDh@EEIEHEx&@gItA~9r Q2P2PCHH΋uM%t9w*%t9@w Q2P2PBHHH΋tug6t t u Q2P3PiBt9w Q2P2PDBHH΋tH)HHUL^UM$gI7A~w Q2P2PAHMH萳AI $HDLHAŃ}tI $HULHHoID$DEDDH1H([A\A]A^A_]UHATSHH uQHhH AľHfǃQffDLHA$VHGpHO` LJ xuPA@(t\ QOO@[A\]UHH]LeHHIHH0Hp u)I$HHuǃ,HH]LeUHSHHH%=upHxtc Q>MQpP?0BHfǃffHUǃ,H ʀH[]UHATSHIHH0AT$u,d^%= HlH@%=t H=I$x tq QQMQ Q>pH6HRfǃffHHID$ǃ,H@@[A\]UHH]LeHHIHH0觨I$HH0H脿H]LeUHH]LeLmH IIdHxt QcMQX Q=pHu2Ht;Sr Q2P2P=HHЋt4Hu@@w8uu+H3{ w Q2P2P!=HƐ)H3{w Q2P2PEHHHEHEHHHHHH>HEE;|HHHEHHHEHHHHHѺ QHǸp4HHQ5HH5ϋ&H&HѺ QHǸ;4H&H,9H&H&H&H9v/H&H&H)H j&H{&HȾH3HH8[]UHH }HuE#HC%UHcHHHHk8EH %UHcHHHHuH%H<8H&H%E#EHHHEHHH8EE;E|HEH7UHHHXH`HhLpLxt )E)M)U)])e)m)u)}H(H,&HDž0Dž40HEH8HPH@H&H&HH)Hۉ&H&H<H0H(HH;H&H87LLHcH&H9s1H&LHH)H t&LHHȾH1LHH]&ÐUHH}HuHUM}XHEHHEHEHEHEHEHEHHEHEHHEHHEHEHUHHEHmH}uOHEHEHEHEHEHEHEEHEHE؈HEHEULjHEHmH}u]UHH0H}HuHUHMLEHUHuHMHEHЅyDHUHuHMHEHЅx%HUHuHMHEHЅyHEHEHEBHUHuHMHEHЅ%HUHuHMHEHЅyHEHEHEUHSHHhH`HXHPLHHhHu!HXHuHXHHEH`'HXHhHHEHEHEH}uFHEHHEHXHHHEHHHEHHXHHHEHHEH.HEHXHHHEH4HXHEHiHXHHEHEH;hv4HXHHHEH<HHHMHPHЅ6HXHEH`HHXHhHH;EHEHXHhHHEEHXHHHEH<HHHMHPHЅ~ HE-HXHEH`HHXHhHH;EwH}H`HHHXHhHHEH`RHhHEH`HHHXHhHHEH`(H`HHXHEHEHHHEH<HUHEH4HHHPHEIHHHOHEHUHEH4HEHHHEH<HHHPHEIHHH HEHEHHHEH4HEHHHHEH<HHHPHEIHHHEHHHPHUHuHEIHHEH}u,HhHHEHEHHhHHEHUH HEHXHuHhH}HXHhHHEHEHEH`HHHXHhHHEHEHEgH}uUH}u&HEHHEHEHHEHHEHUHHEHXHuHEHHXHEHXHEHEH;EHHHhHMHPHHHEH}\sH}u^H}u,HEHHxHEHHEHHEHxHHEHXHuHEH5HXHHEHXHHEHEH;Ew/HHHhHMHPHHHEH}THEH;EwoH}u,HEHHpHEHHEHHEHpHHEHXHuHEHHXHEHXHHEؐH`HHXHhHHEHUHEH)HMHhHH)HH9HNHEH}~*HEHUHEHHHEHHhHHUHEHH)HHH+XHMHEHH)HH9HFHEH}~'HEHUHEHHHEHHEHHUHEHH)HHEHEH;Xv:HEHXHHHHPHXHhIHHUHEHH)HHEHEH;Xv5HEHHHEHHhHEHXH`Hĸ[]ÐUHH}HuHUMHEȋEHEEHEHEEEE؃E}E;EEElEHE ЉEHEEm}u?EiQ-̉EEEi5EE1EE U-EE}muEPHHcHEHHEHEHUH HEH HEH ЉEԋEiQ-̉EEEi5EԋE1EE U-EHEHEH;EoEЃ)ЉEEElEHE ЉEHEEm}u?EiQ-̉EEEi5EE1EE U-EE}muHEȋUE²E HE]UHS}uU܋EE}t;+EUӉ؉EEiQ-̉EEEi5EE1EE1EE1EEik녉EE 1EEi5‰EE1EE[]UHH }HuUEEEMHUHuHEHUMEΉ!UHH8H}؉uԉUHMȋEЉEEHEHEEHcHEHHEHUHEHH)HȉHUHuHEHxUԋMEΉEUHEȉUHH}HEHE@HE@]UHEEE}@v= E Q]UHHPH}ȉuHUMLEEHcHEHHEHEHEHEHEEHcHEHHEHE@EHEr HEH;Et HEH;Er+HEUPHEHUHEHH)HHEEHEE%EEHEHEE׃EHEH;Et HEH;Er+HEUPHEHUHEHH)HLHEEHEE%EEsHEHEE׃EHEH;EtHEHH;Er+HEUPHEHUHEHH)HHEEHEE%EEHEHEE׃?EEHEHEHE@PHEPHE@H‹EUHEEEm+}xc;E} EH Q]UHH}HEHE@]UHHPH}ȉuHUMLEHEHEEHcHEHHEHEHEEHcHEHHEHEPHEHEr HEH;Et HEH;Er.HEHEHEPHUHEHH)HHEHEE߀}xEHEHEH;EtHEHH;Er.HEHEHEPHUHEHH)HaHEHEUE߀}xHEU߃0 ʈHEEHEHEH;EtHEHH;Er.HEHEHEPHUHEHH)HHEHEE߀}xHEU߃< ʈHEEHEHEH;Et HEH;Er+HEHEHEPHUHEHH)HLHEHE@E߀}xHEM߃? ʈHEHUHEHH)HUHH(H}uHU؉MHEH$H}MHU؋uHEIH#ÐH!<%Ht H <%H1UHHH}HuHE HHEHUHPUHH H}HEvHEH@HUHHH@HtTHEH@HUHRHMHHHRHHEH@HUHRHMHHHRHHEHEHH;EyHEH@HtHEH@HUHRHHE HUHH H}HEHEH@HUHHHHHEH@HMHHH@HiHEH@HUHHHHEH@HMHHH@H/HEH@HUHHHHEHEHH;ETHEHUHH H}HuHEH@H;Er HEH@Ht HEH@HHEHeHEHH;EsHEH@HUHHHUHRHHHEH}u\HEH@HUHH)HHHHEH@HHHEHȾH!HEHUHPHEHUHPUHHH}HEHHPHEHHtHEHHPHEHUHH@H}HuHUHEH@H;Er IHEH@Ht HEH@HHEHeHEHH;EsHEH@HUH HUHRHHHEH}HEH@HUHRHMHHHEH}HEH@HUHH)HHHEH@H HEHȾHHEH@HUH)HEHHHEHȾHHEHUHPHEHUHPHEHUHPHEH@HUHUHH0H}HuЈEHEHHuQQQHEHPHEHHHHHEHEHHPHMHEHHtLHEHPHEHHHHEHHEHPHEHHE܈HEHHPHEHÐUHHH}HuHE`HJHEHUHP(UHH H}HEHEHHHUHHHHHH@HHEHH(HEHpHUHHHHHH@HHEHH(HEHpHUHHHHHH@ HHEHH(HEHpHUHHHHHH@(HHEHEHH;E(HEH@HtHEH@(HUHRHHEH@Ht*HEH@Hu!HEH@(HUHRHHEH@Ht*HEH@ H>!HEH@(HUHR HHE`HUHH H}HuHEH@H;Er HEH@Ht HEH@HHEHeHEH;EvHEHH(HUHHHHHHEH@HHHEH}ukHEH@HUH)HHHHHHEHPHHHHHHEHHʾHHEHUHPHEHUHPUHH@H}HuHUHEH@H;Er HEH@Ht HEH@HHEHeHEH;EvHEH@(HUH HUHRHHHEH}tHEH@(HUHR HMHHHEH}0HEH@(HUH HUHR(HHHEH}HEH@HUHH)HHHEH@H HEHȾHiHEH@HUH)HEHHHEHȾH>HEH@HUHH)HHHEH@H HEHȾHHEHUHPHEHUHP HEHUHP(HEHUHP8HEH@(HUHHEH@(HUHUHHPH}HuHUHMH}uQQeQTH}uQQwQ4H}t H}uQQQ HEH@(HHEHEH@HtHEH@HJ!HEH@(HUHֿHHEHPHEH@HHEH@ HtHEH@ H8HEH@(HUHֿHHEHP HEH@ Hu HEH@ HgHEHHEHHt HEHEH@HUHHHEHEHHHUHHHHHHEHEHHMHEHH't hHEHEH@HUHHHH;ErQQQpHEHHEH@HUHHHHHEHHHuQQQHEH@HUHHHEH@HMHHHH HEHHHHEHP HEHHEHHHEHHEH@(HUHHHHEHEHH;EHEHHEHPHEHEHH;EXHEHHEHHEH/UHSHHH}HuH}uQQQHMHHHH HHHHHH)HtQQQHEHH;EvQQ?QHEH@HuHEHBHEHEHEHEH@(HUHHHEH@HUHHHHUHH/ HHEHP HEHHEH@(HUHHHHuHEHHEH@(HUHHHHHEH9sQ Q`QHEH@(HUHHHHHEH9v#HEH@(HUHHHHHEHEHEH@H;EHUHEHH8HH[]UHH H}HuH}tH}uQQQ HEHEHEHEHEHHEHH9sHEHHEHH9vUHH H}HuH}u Q-QQH}u Q.QQoHEH@Hu Q/QQIHEHHu Q0QQ#HEHHEHEHP HEHteHEH@(HUHHHHHEHH9t Q6QQ HEH@(HUHHHHEHHhHEH@(HUHHHHtLHEH@(HUHHHHHEHH9u'HEH@(HUHHHHEHHHEHEH@H;EUHH H}HEH0HEH@N0HHEH@HHEHHtHEH@HUHRHHHEH@HHEH@HHHE~HEHHHUHHHHHHHEH@HH9wbHEHH HEHpHUHHHHHHH_HEHP HEH@HHHEHEHH;EqHEH@HHUHz0H{6UHH H}H}uQnQeQ HE.HEHHHUHHHHHȾHHEHEHH;EwHEH3UHH0H}H}uQ|QeQ HEHEH@HHEHEHEHHHUHHHHHHH;EHEHUH HEHpHUHHHHHHHHHEHUH4HEHHHUHHHHHHH9vQQPQG HEHEHH;EEHEHUHHH}H}uQQeQ HEH-UHH H}H}uQQeQ HEH@HHu H=HEH0H5HEH}tHEH@HHEHHEH)ÐUHHH}HEHHH UHHH}HuH}u0Q.Q:Q HE HHEHUHPHEHWtUHH H}H}uQ:Q:QHEH@HuQ;QOQyHE|HEHHUHHHHtvHEHHUHHHHw HEH@HUHHMHHHHHEHHUHHHHEHEH@H;ErHEH@Ht3HEH@HUHHHEH@HUHRHHE HUHSHHH}HuHEH@H;Er -HEH@Ht HEH@HHEHeHEH;EvHEH@HUH HUHHHHEH}HEH@HUHH)HHHEH@H HEHȾHHEHUHHEH@HUHRHMHHHEH}IHEHUHPHEH@HEqHEHHUHHHEH@8HHEHHUHHHHtMHEHPHEHHMHHHHH HEHEH;ErHEHUHPHEH@HE|HEHHUHHHHtxHEHHUHHHH HEH@HUHHMHHHHHEHHUHHHHEHEH;EvHH[]UHHH}HuHxHpH}uQQ:QH}uQQcQHEH@HuQQOQHxHHHEHUHEHHt {HEHHHpHH E}y LHEH@UHxHuHEH.HETHEHHEHEHHUHHHHpHH E}HEHPHEH‹EHEH/HEH}uHEH@u HxHuHEH'.UHEHHEHEHHUHHHHpHH E}yQQvQHEH/HEH}uHUHuHEH-rHEHHEHEHPHEH<u)HEHHUHHHHpHH'HEHHUHHHHpHHHEH_.HEH}tHEH;EiHEH@<uHEHHHpHHNHEHHHpHHHUHH H}HuH}uQQ:QHEH@HtyHEFHEHHUHHHHt&HEHHUHHHHUHHHEHEH@H;EwHEHHHUHHUHHH}HuH}uQQ:QHEHHHUHHeUHHH}HEHHEHt&HEH]tUHH@H}HuHUHEHHEH^t HEZHEHHEHUHEHHu(EEHMHEHHt9HEHEHH;EwHEغHtUHH`H}HuHUHEHHEHtfHUHuHEH#*/HEHHEHMHEHHtHEH0+HEH}uH UHH`H}HuHUHEH+HUHuHEH)FHEHHEHEHt?HMHEHHXtHEH*HEH}uHX UHH`H}HuHUHEHHEH8t HEHtfHUHuHEH(/HEHHEHMHEHHtHEH)HEH}uH UHH@H}HuHUH}uQrQ:QeH}uQsQ~QEHEHEHEYHEH@HUHHH@HUHHHH;Ev)HEH@HUHHH@HUHHHHEHEHEH@HUHHHH;EwHEHEHH;EkHEHPHEHHtHEHHHEHHuHEHUHH}HEH@(]UHHH}HuHE8H HEHUHP0HEHUHH0H}HuHUHEHEHEHLHEH@0HUHиUHHH}HEHUHѺJ2NH HE(HUHSHHH}HuHEHHEHEHUHH HEH}uaHEHH;EwHEHHH;EwtQLHQQHEHHUHH)HEHHH%#HHH[]UHSHXH}HuHEH#HEHEHUHH HEH}uiHEH@0HuHEHEH@0HUHֿHEH}u HEHcHUHEHHEHUHHa HEHH;EwHEHHH;EwiQgHQQHEHHUHH)HEHHH_"E߀}t-HEH@(HPHEHP(HEH@HPHEHPHhHX[]UHSHHH}HuHEHHEHEHUHHHEH}u 4HEHH;EwHEHHH;Ew\QHQQHEHHUHH)HEHHH!EEt HEH@(Hu\QHQQHEH@Hu\QHQQcHEH@(HPHEHP(HEH@HPHEHPHEH@Hu5HEHUHH HEH}HEH@0HUHиHHH[]UHH H}HuHE HHEH@HEH@0HHHEHPHEH@HEHEHHE5HEHHPHEHHEH@HEHEHUHH-HEH}uHEHH;EtPQHQ Q ÐUHH}]UHH}HEH HEHE]UHH H}HEHHHEHH)HHHEHUHEHUHH}]UHH}HMHHHH HHHHHH)HEH)]UHH H}HEH>HEHEHUHH H}HEH HEHEHUHH0H}HuHEHHEHEHHEEE"HEHHUHH!HHEHEEE;E|UHH0H}HuHEHfHEHEHVHEEE%HEHHUHHH!HHEHEEE;E|UHH0H}HuHEHHEHEHHEEE"HEHHUHH HHEHEEE;E|UHH}HuHEHHEHH9sHEHHEHH9v]UHH}HEHPHEHHEHPHEHPHEHHHEH@H HHEHPHEH@HHHEHPHEH@HHHEHP]UHH}HEHHEHEHH;Et# HEH@HEHEH@HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@HHEHEH@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@HHUHH9tJHEH@HHEHEHH;E HEH@HEHEH@HUHH9uHEHHEHEHH;EuQYQQmHEHHEHUHEHHE}yHEHEHEH@HE}~7HEH@HHEHEHH;EuQYQQHEHH;EuHEHEUHH0H}HuHEH@HUHH9tNHEH@HEHEHH;EHEH@HHEHEH@HHUHH9uHEHHEHEHH;EuQYQQ.HEHHEHUHEHHpE}yHEH@HE}~?HEHEHEH@HHEHEHH;EuQYQQHEHH;EuHEHEUHH H}HuHEHHE$}yHEH@HEHEH@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHH5E}yHEHEHEH@HE"}~HEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@HE*}~HEHEHEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHPHHHHH@H HHHPHH@HHHHPHHHHHEHEHHHHpHEPHE@E}uQYQQ}yHEHPHEHH@HHEHPHEHH@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHPHEH@HHEH@HEHEH@HHEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHE=HEHHHEHEH@HƒHEH HHEHPHEH@HOHEH@HEHEH@HtJHEH@HHHEHPHEH@HHHEHPHEH@HHHEHPHEH@HEHEH@HHEHEH@HHEH@H HHEHPHEHUHPHEH@HHEH HHEHPHEH@HHHEHPHEHEHEHUHHmHUHH9HHHHHHHHRHHPUHHHXHPHEHXHH`H`HEHEHHPHHHEPHE@E܃}yHEHPHEHH@HyHEHPHEHH@HH}uYHE@HEHEHE&HE@HEHPHEHH@HHEHEHHXHH9u HEHEHHXHH9HEHH;PtQYQQHmHEHH;PUHEHH@HEHEHHUHHRHHHPHRHH HPHEHHPHRHPHEHHPHRHHHUHHRH HPHPH@HHEH HHPHPHEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHPaHEHHHUHHHUHHHRH HP.HPH@HEHXHH;EHPH@HtQYQQHEH@HuQYQPQHEH@HHHEHPH`H9EuHXHUH HEH@yHEHHHUHP HEHHHUHHHRHуHUH HP H`H9EuHXHPHXHt HEHH@HtGHEH@xQYQQHEHHHXHHP HXHPHEHHm HE@uQYQQHE@HEHHUHHHPHEHHH@HtQYQQ-HEHH@HHEHH@HHEHEH@HEHEH@HHEHHUHHRHHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPIHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHUH`H9wQYQQHEH@yHEHHHUHPHEHHHUHHHRHуHUH HPHEHH@HHEHEH@HEHEH@H=HEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPH`H9EuHXHUHHEH@yHEHHHUHPgHEHHHUHHHRHуHUH HP7HEHHUHHRHHPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHEHUHkHEHHUHHHHUHHRH HPHEHH@HEHEH@HVHEH@HHEHEH@HEHEH@HHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HƒHEH HHEHPHEH@HHEHEH@HHEH@H HHEHPHEHUHPHXHH;EuQYQ3QHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HHHEHPH`H9EuHXHUHxHEH@yHEHHHUHPQHEHHHUHHHRHуHUH HP!HEHH@HHEH@HxHxH@H)HEHHUHHRHHPHEH@HHHEHPHxH@HHHxHPHEHH@HpHEHHpHRHHPHEHHHpH@H HHpHPHUH`H9wQYQQHEH@yHEHHHpHPHEHHHUHHHRHуHpH HPHEH@HHHEHPHEHHUHHRHHPHEH@HhHhH@HHhH@HHHhHPHEHH@H`HEHH`HRHHPHEHHH`H@H HH`HPH`H9EuHXH`HHEH@yHEHHH`HPHEHHHUHHHRHуH`H HPpHEH@HHHEHPHmHUH`H9BH`HXHHXHH@HtQYQXQUHH0H}HuHUHMHEHH;Eu HEHHEHpHMHUHEHHEHEHH;EtHENHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHKUHHPH}HuHUHMLEHUHEHH$E}HEHPH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@HHHMHUHEH}~,HEH@HHH}HMHuHEIHNHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIH{HEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@HHHMHUHEHHEHEHH;EtHEJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHHUHHPH}HuHUHMLEHUHEHHE}HEH@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHpHMHUHEHu}y%HEHPH}HMHuHEIHJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEÐUHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE E[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE!E[]UH}E]UHH}HE]UH}E]UHH}HEH?]UHH}EHUHHH}H}UHS}uEUӉÉ[]UHSH}uEHUHӉHH[]UHS}uEUӉˉ[]UHSH}uEHUHӉHH[]UH}E]UHH}HEH]UHH}HuHU؉ȈEHEHUHPHEHPHEHP HEHP HEHHEHP(}tHHUHBHEH@HEH@ HU؃HHEHEH@ H;EHtAHEH@ HHEHHEHHEH@H1HEHHEH@ HPHEHP jHEHPHEHHEHE*HEH@ HEHEH@ HPHEHP HEHEH@ H;ErHEHHEH@H1HEH]UHHH}HEHP HEH@(H9Ht HHEH@ HHEHHEHHEH@H1HEHHEH@ HHEH@HH)HHHHEHPHEH@ HPHEHP HEHHHSHEHHEHEHHEHHH!HEHHEHPEHHUHH }HuUEEEECExEEEEmmEHHHEHЋUMʉEE;E|EHHHEHEHHHEHUHH}HuUHEEE=HEHUH!Ht%EHHHEHЋUMʃEHeEE?vEHHHEHEHHHEH]ÐHl$Ld$H-$L%X$H\$Ll$Lt$L|$H8L)AIHI1yHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHQ$Ht H1z1H!HH@AHHHLD$HL$H1HÐHH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalse/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.htuple_formats[format->id] == formattuple_format_id(format) == tuple->format_id/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.ccpart->fieldno < field_countLoggedError%s at %s:%ituple formatmallocformat->offset[i] > 0IllegalParamstuple must have all indexed fieldsincorrect tuple formatClientErrortupletuple_alloc(%zu) = %ptuple_free(%p)tuple->refs == 0tuple->refs + count >= 0it->pos <= tuple_end%hu%u%lu'%c\x%02X'': {}: {, field_no == tuple->field_count}tuple_new(): incorrect tuple formatfield_a[0] == field_b[0]tuple_formattuple_format_idload_varint32tuple_compare_fieldtuple_printtuple_nexttuple_reftuple_freetuple_format_newfield_type_createYAZAFXAYAFXAPXA`5AWAWA9ExceptionsbNcN11ClientErrorsbNbN11LoggedErrorscNcN13IllegalParamssPcN0cN6Object0sxcN/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalseIllegalParams%s at %s:%ivarint is too short (expected 1+ bytes)varint is too short (expected 2+ bytes)BER int is too short (expected 3+ bytes)BER int is too short (expected 4+ bytes)BER int is too short (expected 5+ bytes)incorrect BER integer formatpacket too short (expected 8 bits)packet too short (expected 32 bits)packet too short (expected a field)incorrect packet format (expected a 32-bit int)UPDATE_OP_SETUPDATE_OP_ADDUPDATE_OP_ANDUPDATE_OP_XORUPDATE_OP_ORUPDATE_OP_SPLICEUPDATE_OP_DELETEUPDATE_OP_INSERTUPDATE_OP_SUBTRACTUPDATE_OP_MAXClientError/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple_update.cc32-bit int32-bit or 64-bit intoffset is out of boundarg->offset >= 0 && arg->offset <= field_lenfield splice format erroroffset > 0 && prev->tail_len > 0op->meta != NULLfield->tail_len == 0 || field_count > 1update->new_tuple_fcount == total_field_counttoo many operations for updateno operations for updatecan't unpack update operationsupdate != NULLtuple_update_preparepick_varint32load_varint32do_update_opsupdate_field_splitinit_update_op_spliceUNKNOWNNUMNUM64STRHASHTREEBITSETLoggedError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/key_def.cc/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalseITER_ALLITER_EQITER_REQITER_LTITER_LEITER_GEITER_GTITER_BITS_ALL_SETITER_BITS_ANY_SETITER_BITS_ALL_NOT_SETClientError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/index.ccu32u64key == NULLfindByTuple()Indexfactoryload_varint32key_validatexAA`5A`5A`5A`5A`5A`5A`5A`5A`5A$A`5A`5A`5A/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalse/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.htuple_formats[format->id] == formattuple_format_id(format) == tuple->format_id/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/space.hkp >= sp->key_defs && kp < (sp->key_defs + sp->key_count)/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/hash_index.ccsize < INT32_MAXiterator->free == hash_iterator_freeptr->free == hash_iterator_freeClientError%s at %s:%iHashIndexhashAdding %u keys to HASH index %u...min()Hash indexmax()key_def->is_unique && part_count == key_def->part_countLoggedErrorkeyFailed to allocate memory in recover of int hashiteratorkey != NULL || part_count == 0requested iterator type 5a 0`   0 ` Y0`initIteratormh_index_hash_keyload_varint32mh_index_hashtuple_formattuple_format_idkey_def_nfindByKeyhash_iterator_gehash_iterator_freeffffff?ADAjAtAAAA AAdAA$AhAFA>AƭA/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/space.hkp >= sp->key_defs && kp < (sp->key_defs + sp->key_count)/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tree_index.ccnode_x->tuple != NULLnode != NULLtuple != NULLit->free == tree_iterator_freekey_def->is_unique && part_count == key_def->part_countClientError%s at %s:%iTreeIndexiteratorkey != NULL || part_count == 0requested iterator typeTree index!AAAQAAA!A1Aindex_is_primary(this)malloc(): failed to allocate %lu bytesSorting %u keys in index %u...sptree_index_foldkey_def_nendBuildbeginBuildinitIteratortree_iteratorsptree_index_unfoldfindByKey?@4bi??333333?AAAAAPAA,AZAAA$ANA AA/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalse/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.htuple_formats[format->id] == formattuple_format_id(format) == tuple->format_id/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/bitset_index.ccsalloc_ptr_from_index(value) == tupleiterator->free == bitset_index_iterator_free!key_def->is_uniquebitset_index_createClientError%s at %s:%ibeginBuild()BitsetIndexbuildNext()endBuild()min()max()random()findByKey()findByTuple()old_tuple != NULL || new_tuple != NULLold_tuple != new_tupleinsertpart_count != 0 || key == NULLrequested iterator typeiterator expressioniterator stateTAhAAAAAAAAAinitIteratorload_varint32replacetuple_formattuple_format_idtuple_to_valuebuildBitsetIndexbitset_index_iterator_nextbitset_index_iterator_freeAnAA@AAATArAAAAAJAxARALoggedError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/space.ccmallocclass Indexk != mh_end(spaces)pk->key_def->is_uniqueold_tuple || new_tupleIllegalParamstuple field count must match space cardinalitycfg.memcached_port == 0 || i != cfg.memcached_spacespace %i successfully configuredprimary_indexes_enabled == falseprimary_indexes_enabled == truesecondary_indexes_enabled == falseBuilding secondary keys in space %d...Space %d: done(space = %zu) invalid id, (maximum=%u)Space %zu is already used as memcached_space.(space = %zu) at least one index must be defined(space = %zu index = %zu) too many indexed (%u maximum)(space = %zu index = %zu) at least one field must be defined(space = %zu index = %zu) unique property is undefined(space = %zu index = %zu) invalid field number (%u maximum)(space = %zu index = %zu) unknown field data type: `%s'(space = %zu index = %zu) unknown index type '%s'(space = %zu) space first index must be unique(space = %zu index = %zu) hash index must be unique(space = %zu index = %zu) bitset index must has a single-field key(space = %zu index = %zu) bitset index must be non-uniquefalset != field_type_MAX(space = %zu fieldno = %zu) index field type mismatch 5a 0`   0 ` Y0`check_spacesbuild_secondary_indexesbegin_build_primary_indexesspace_configspace_replacespace_delete/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLIllegalParams%s at %s:%ivarint is too short (expected 1+ bytes)varint is too short (expected 2+ bytes)BER int is too short (expected 3+ bytes)BER int is too short (expected 4+ bytes)BER int is too short (expected 5+ bytes)incorrect BER integer formatpacket too short (expected 32 bits)packet too short (expected a field)ClientError/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/space.hLoggedErrorREPLACESELECTUPDATEDELETE_1_3DELETECALL/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/request.cctuple count must be positiveErrorInjectionERRINJ_TESTINGcan't unpack requestunsupportedUnsupported request = %iunsupported command code, check the error logfalse)Bn)Bn)Bn)B)Bn)B.)BC)BC)BX)Brequest_executepick_varint32N*B*BF14ErrorInjectionsN0cN/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/txn.cctxn->op != 0old_tuple || new_tupletoo long %s: %.3f secLoggedError%s at %s:%itxn_replaceIllegalParams%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hpacket too short (expected 16 bits)packet too short (expected 64 bits)ClientError/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/space.h/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/box.ccLoggedError ******************************************** * Found a corrupted tuple in the snapshot! * * This can be either due to a memory * * corruption or a bug in the server. * * The tuple can not be loaded. * ******************************************** Tuple data, BAS64 encoded: incorrect row header: expected %zd, got %zd bytesunknown row tag: %ireplica/%s%sprimary%sI am primaryreplication and local hot standby modes can't be enabled simultaneously%31[^:]:%ireplication source IP address is not recognizedinvalid replication source port value: %iinvalid primary port value: %iinvalid secondary port value: %iat least one space or memcached port must be definedslave to mastermaster to slaveCould not propagate %s before local recovery finishedloadingbuilding secondary indexesorphanstarting local hot standbyhot_standby%s status: %s -- box.lua (internal file) box.flags = { BOX_RETURN_TUPLE = 0x01, BOX_ADD = 0x02, BOX_REPLACE = 0x04 } -- -- -- function box.select_limit(space, index, offset, limit, ...) local key_part_count = select('#', ...) return box.process(17, box.pack('iiiiiV', tonumber(space), tonumber(index), tonumber(offset), tonumber(limit), 1, -- key count key_part_count, ...)) end -- -- -- function box.select(space, index, ...) return box.select_limit(space, index, 0, 4294967295, ...) end -- -- Select a range of tuples in a given namespace via a given -- index. If key is NULL, starts from the beginning, otherwise -- starts from the key. -- function box.select_range(sno, ino, limit, ...) return box.net.self:select_range(sno, ino, limit, ...) end -- -- Select a range of tuples in a given namespace via a given -- index in reverse order. If key is NULL, starts from the end, otherwise -- starts from the key. -- function box.select_reverse_range(sno, ino, limit, ...) return box.net.self:select_reverse_range(sno, ino, limit, ...) end -- -- delete can be done only by the primary key, whose -- index is always 0. It doesn't accept compound keys -- function box.delete(space, ...) local key_part_count = select('#', ...) return box.process(21, box.pack('iiV', tonumber(space), box.flags.BOX_RETURN_TUPLE, -- flags key_part_count, ...)) end -- insert or replace a tuple function box.replace(space, ...) local field_count = select('#', ...) return box.process(13, box.pack('iiV', tonumber(space), box.flags.BOX_RETURN_TUPLE, -- flags field_count, ...)) end -- insert a tuple (produces an error if the tuple already exists) function box.insert(space, ...) local field_count = select('#', ...) return box.process(13, box.pack('iiV', tonumber(space), bit.bor(box.flags.BOX_RETURN_TUPLE, box.flags.BOX_ADD), -- flags field_count, ...)) end -- function box.update(space, key, format, ...) local op_count = select('#', ...)/2 return box.process(19, box.pack('iiVi'..format, tonumber(space), box.flags.BOX_RETURN_TUPLE, 1, key, op_count, ...)) end function box.dostring(s, ...) local chunk, message = loadstring(s) if chunk == nil then error(message, 2) end return chunk(...) end function box.bless_space(space) local index_mt = {} -- __len and __index index_mt.len = function(index) return #index.idx end index_mt.__newindex = function(table, index) return error('Attempt to modify a read-only table') end index_mt.__index = index_mt -- min and max index_mt.min = function(index) return index.idx:min() end index_mt.max = function(index) return index.idx:max() end index_mt.random = function(index, rnd) return index.idx:random(rnd) end -- iteration index_mt.iterator = function(index, ...) return index.idx:iterator(...) end -- -- pairs/next/prev methods are provided for backward compatibility purposes only index_mt.pairs = function(index) return index.idx.next, index.idx, nil end -- local next_compat = function(idx, iterator_type, ...) local arg = {...} if #arg == 1 and type(arg[1]) == "userdata" then return idx:next(...) else return idx:next(iterator_type, ...) end end index_mt.next = function(index, ...) return next_compat(index.idx, box.index.GE, ...); end index_mt.prev = function(index, ...) return next_compat(index.idx, box.index.LE, ...); end index_mt.next_equal = function(index, ...) return next_compat(index.idx, box.index.EQ, ...); end index_mt.prev_equal = function(index, ...) return next_compat(index.idx, box.index.REQ, ...); end -- index subtree size index_mt.count = function(index, ...) return index.idx:count(...) end -- index_mt.select_range = function(index, limit, ...) local range = {} for v in index:iterator(box.index.GE, ...) do if #range >= limit then break end table.insert(range, v) end return unpack(range) end index_mt.select_reverse_range = function(index, limit, ...) local range = {} for v in index:iterator(box.index.LE, ...) do if #range >= limit then break end table.insert(range, v) end return unpack(range) end -- local space_mt = {} space_mt.len = function(space) return space.index[0]:len() end space_mt.__newindex = index_mt.__newindex space_mt.select = function(space, ...) return box.select(space.n, ...) end space_mt.select_range = function(space, ino, limit, ...) return space.index[ino]:select_range(limit, ...) end space_mt.select_reverse_range = function(space, ino, limit, ...) return space.index[ino]:select_reverse_range(limit, ...) end space_mt.select_limit = function(space, ino, offset, limit, ...) return box.select_limit(space.n, ino, offset, limit, ...) end space_mt.insert = function(space, ...) return box.insert(space.n, ...) end space_mt.update = function(space, ...) return box.update(space.n, ...) end space_mt.replace = function(space, ...) return box.replace(space.n, ...) end space_mt.delete = function(space, ...) return box.delete(space.n, ...) end space_mt.truncate = function(space) local pk = space.index[0] while #pk.idx > 0 do for t in pk:iterator() do local key = {}; -- ipairs does not work because pk.key_field is zero-indexed for _k2, key_field in pairs(pk.key_field) do table.insert(key, t[key_field.fieldno]) end space:delete(unpack(key)) end end end space_mt.pairs = function(space) return space.index[0]:pairs() end space_mt.__index = space_mt setmetatable(space, space_mt) if type(space.index) == 'table' and space.enabled then for j, index in pairs(space.index) do rawset(index, 'idx', box.index.new(space.n, j)) setmetatable(index, index_mt) end end end -- User can redefine the hook function box.on_reload_configuration() end require("bit") -- vim: set et ts=4 sts -- box_net.lua (internal file) box.net = { -- -- The idea of box.net.box implementation is that -- most calls are simply wrappers around 'process' -- function. The embedded 'process' function sends -- requests to the local server, the remote 'process' -- routes requests to a remote. -- box = { delete = function(self, space, ...) local key_part_count = select('#', ...) return self:process(21, box.pack('iiV', space, box.flags.BOX_RETURN_TUPLE, -- flags key_part_count, ...)) end, replace = function(self, space, ...) local field_count = select('#', ...) return self:process(13, box.pack('iiV', space, box.flags.BOX_RETURN_TUPLE, -- flags field_count, ...)) end, -- insert a tuple (produces an error if the tuple already exists) insert = function(self, space, ...) local field_count = select('#', ...) return self:process(13, box.pack('iiV', space, bit.bor(box.flags.BOX_RETURN_TUPLE, box.flags.BOX_ADD), -- flags field_count, ...)) end, -- update a tuple update = function(self, space, key, format, ...) local op_count = select('#', ...)/2 return self:process(19, box.pack('iiVi'..format, space, box.flags.BOX_RETURN_TUPLE, 1, key, op_count, ...)) end, select_limit = function(self, space, index, offset, limit, ...) local key_part_count = select('#', ...) return self:process(17, box.pack('iiiiiV', space, index, offset, limit, 1, -- key count key_part_count, ...)) end, select = function(self, space, index, ...) local key_part_count = select('#', ...) return self:process(17, box.pack('iiiiiV', space, index, 0, -- offset 4294967295, -- limit 1, -- key count key_part_count, ...)) end, ping = function(self) return self:process(65280, '') end, call = function(self, proc_name, ...) local count = select('#', ...) return self:process(22, box.pack('iwaV', 0, -- flags string.len(proc_name), proc_name, count, ...)) end, select_range = function(self, sno, ino, limit, ...) return self:call( 'box.select_range', tostring(sno), tostring(ino), tostring(limit), ... ) end, select_reverse_range = function(self, sno, ino, limit, ...) return self:call( 'box.select_reverse_range', tostring(sno), tostring(ino), tostring(limit), ... ) end, -- To make use of timeouts safe across multiple -- concurrent fibers do not store timeouts as -- part of conection state, but put it inside -- a helper object. timeout = function(self, timeout) local wrapper = {} setmetatable(wrapper, { __index = function(wrp, name, ...) local func = self[name] if func ~= nil then return function(wr, ...) self.request_timeout = timeout return func(self, ...) end end error(string.format('Can not find "box.net.box.%s" function', name)) end }); return wrapper end, }, -- local tarantool self = { process = function(self, ...) return box.process(...) end, select_range = function(self, sno, ino, limit, ...) return box.space[tonumber(sno)].index[tonumber(ino)] :select_range(tonumber(limit), ...) end, select_reverse_range = function(self, sno, ino, limit, ...) return box.space[tonumber(sno)].index[tonumber(ino)] :select_reverse_range(tonumber(limit), ...) end, -- for compatibility with the networked version, -- implement call call = function(self, proc_name, ...) local proc = box.call_loadproc(proc_name) return proc(...) end, ping = function(self) return true end, -- local tarantool doesn't provide timeouts timeout = function(self, timeout) return self end, close = function(self) return true end } } -- -- Make sure box.net.box.select(conn, ...) works -- just as well as conn:select(...) -- setmetatable(box.net.self, { __index = box.net.box }) box.net.box.new = function(host, port, reconnect_timeout) if reconnect_timeout == nil then reconnect_timeout = 0 else reconnect_timeout = tonumber(reconnect_timeout) end local remote = { host = host, port = port, reconnect_timeout = reconnect_timeout, closed = false, processing = { last_sync = 0, next_sync = function(self) while true do self.last_sync = self.last_sync + 1 if self[ self.last_sync ] == nil then return self.last_sync end if self.last_sync > 0x7FFFFFFF then self.last_sync = 0 end end end, -- write channel wch = box.ipc.channel(1), -- ready socket channel rch = box.ipc.channel(1), }, process = function(self, op, request) local started = box.time() local timeout = self.request_timeout self.request_timeout = nil -- get an auto-incremented request id local sync = self.processing:next_sync() self.processing[sync] = box.ipc.channel(1) request = box.pack('iiia', op, string.len(request), sync, request) if timeout ~= nil then timeout = tonumber(timeout) if not self.processing.wch:put(request, timeout) then self.processing[sync] = nil return nil end timeout = timeout - (box.time() - started) else self.processing.wch:put(request) end local res if timeout ~= nil then res = self.processing[sync]:get(timeout) else res = self.processing[sync]:get() end self.processing[sync] = nil -- timeout if res == nil then if op == 65280 then return false else return nil end end -- results { status, response } received if res[1] then if op == 65280 then return true else local rop, blen, sync, code, body = box.unpack('iiiia', res[2]) if code ~= 0 then box.raise(code, body) end -- boc.unpack('R') unpacks response body for us (tuple) return box.unpack('R', body) end else error(res[2]) end end, try_connect = function(self) if self.s ~= nil then return true end local sc = box.socket.tcp() if sc == nil then self:fatal("Can't create socket") return false end local s = { sc:connect( self.host, self.port ) } if s[1] == nil then self:fatal("Can't connect to %s:%s: %s", self.host, self.port, s[4]) return false end self.s = sc return true end, read_response = function(self) if self.s == nil then return end local res = { self.s:recv(12) } if res[4] ~= nil then self:fatal("Can't read socket: %s", res[3]) return end local header = res[1] if string.len(header) ~= 12 then self:fatal("Unexpected eof while reading header") return end local op, blen, sync = box.unpack('iii', header) local body = '' if blen > 0 then res = { self.s:recv(blen) } if res[4] ~= nil then self:fatal("Error while reading socket: %s", res[4]) return end body = res[1] if string.len(body) ~= blen then self:fatal("Unexpected eof while reading body") return end end return sync, header .. body end, rfiber = function(self) while not self.closed do while not self.closed do if self:try_connect(self.host, self.port) then break end -- timeout between reconnect attempts box.fiber.sleep(self.reconnect_timeout) end -- wakeup write fiber self.processing.rch:put(true, 0) while not self.closed do local sync, resp = self:read_response() if sync == nil then break end if self.processing[sync] ~= nil then self.processing[sync]:put({true, resp}, 0) else print("Unexpected response ", sync) end end end self.irfiber = nil end, wfiber = function(self) local request while not self.closed do while self.s == nil do self.processing.rch:get(1) end if request == nil then request = self.processing.wch:get(1) end if self.s ~= nil and request ~= nil then local res = { self.s:send(request) } if res[1] ~= string.len(request) then self:fatal("Error while write socket: %s", res[4]) end request = nil end end self.iwfiber = nil end, fatal = function(self, message, ...) message = string.format(message, ...) self.s = nil for sync, ch in pairs(self.processing) do if type(sync) == 'number' then ch:put({ false, message }, 0) end end end, close = function(self) if self.closed then error("box.net.box: already closed") end self.closed = true local message = 'box.net.box: connection was closed' self.process = function() error(message) end self:fatal(message) -- wake up write fiber self.processing.rch:put(true, 0) self.processing.wch:put(true, 0) return true end } setmetatable( remote, { __index = box.net.box } ) remote.irfiber = box.fiber.wrap(remote.rfiber, remote) remote.iwfiber = box.fiber.wrap(remote.wfiber, remote) return remote end -- vim: set et ts=4 sts -- misc.lua (internal file) -- -- Simple counter. -- box.counter = {} -- -- Increment counter identified by primary key. -- Create counter if not exists. -- Returns updated value of the counter. -- function box.counter.inc(space, ...) local key = {...} local cnt_index = #key local tuple while true do tuple = box.update(space, key, '+p', cnt_index, 1) if tuple ~= nil then break end local data = {...} table.insert(data, 1) tuple = box.insert(space, unpack(data)) if tuple ~= nil then break end end return box.unpack('i', tuple[cnt_index]) end -- -- Decrement counter identified by primary key. -- Delete counter if it decreased to zero. -- Returns updated value of the counter. -- function box.counter.dec(space, ...) local key = {...} local cnt_index = #key local tuple = box.select(space, 0, ...) if tuple == nil then return 0 end if box.unpack('i', tuple[cnt_index]) == 1 then box.delete(space, ...) return 0 else tuple = box.update(space, key, '-p', cnt_index, 1) return box.unpack('i', tuple[cnt_index]) end end -- vim: set et ts=4 sts -- Assumes that spaceno has a TREE int32 (NUM) or int64 (NUM64) primary key -- inserts a tuple after getting the next value of the -- primary key and returns it back to the user function box.auto_increment(spaceno, ...) spaceno = tonumber(spaceno) local max_tuple = box.space[spaceno].index[0].idx:max() local max = 0 if max_tuple ~= nil then max = max_tuple[0] local fmt = 'i' if #max == 8 then fmt = 'l' end max = box.unpack(fmt, max) else -- first time if box.space[spaceno].index[0].key_field[0].type == "NUM64" then max = tonumber64(max) end end return box.insert(spaceno, max + 1, ...) end -- vim: set et ts=4 sts -- sql.lua (internal file) box.net.sql = { -- constructor -- box.net.sql.connect( -- 'pg', -- @driver ('pg' or 'mysql') -- 'my.host', -- @host -- 5432, -- @port -- 'user', -- @username -- 'SECRET', -- @password -- 'DB', -- @database name -- { raise = false }, -- @config options -- { sql1, var, ... var }, -- @startup SQL statements -- ... -- ) -- -- @return connector to database or throw error -- if option raise set in 'false' and an error will be happened -- the function will return 'nil' as the first variable and -- text of error as the second connect = function(driver, host, port, user, password, db, cfg, ...) if type(driver) == 'table' then driver = driver.driver end if type(box.net.sql.connectors[driver]) ~= 'function' then error(string.format("Unknown driver '%s'", driver)) end local self = { -- connection variables driver = driver, host = host, port = port, user = user, password = password, db = db, -- private variables queue = {}, processing = false, -- throw exception if error raise = true } -- config parameters if type(cfg) == 'table' then if type(cfg.raise) == 'boolean' then self.raise = cfg.raise end end local init = { ... } setmetatable(self, box.net.sql) -- it add 'raw' field in the table local s, c = pcall(box.net.sql.connectors[driver], self) if not s then if self.raise then error(c) end return nil, c end -- perform init statements for i, s in pairs(init) do c:execute(unpack(s)) end return c end, connectors = { }, __index = { -- base method -- example: -- local tuples, arows, txtst = db:execute(sql, args) -- tuples - a table of tuples (tables) -- arows - count of affected rows -- txtst - text status (Postgresql specific) -- the method throws exception by default. -- user can change the behaviour by set 'connection.raise' -- attribute to 'false' -- in the case it will return negative arows if error and -- txtst will contain text of error execute = function(self, sql, ...) -- waits until connection will be free while self.processing do self.queue[ box.fiber.fid ] = box.ipc.channel() self.queue[ box.fiber.fid ]:get() self.queue[ box.fiber.fid ] = nil end self.processing = true local res = { pcall(self.raw.execute, self, sql, ...) } self.processing = false if not res[1] then if self.raise then error(res[2]) end return {}, -1, res[2] end -- wakeup one waiter for fid, ch in pairs(self.queue) do ch:put(true, 0) self.queue[ fid ] = nil break end table.remove(res, 1) return unpack(res) end, -- pings database -- returns true if success. doesn't throw any errors ping = function(self) local pf = function() local res = self:execute('SELECT 1 AS code') if type(res) ~= 'table' then return false end if type(res[1]) ~= 'table' then return false end return res[1].code == 1 end local res, code = pcall(pf) if res == true then return code else return false end end, -- select rows -- returns table of rows select = function(self, sql, ...) local res = self:execute(sql, ...) return res end, -- select one row single = function(self, sql, ...) local res = self:execute(sql, ...) if #res > 1 then error("SQL request returned multiply rows") end return res[1] end, -- perform request. returns count of affected rows perform = function(self, sql, ...) local res, affected, status = self:execute(sql, ...) return affected end, -- quote variable quote = function(self, variable) return self.raw:quote(variable) end, -- quote identifier quote_ident = function(self, variable) return self.raw:quote_ident(variable) end, -- begin transaction begin_work = function(self) return self:perform('BEGIN') end, -- commit transaction commit = function(self) return self:perform('COMMIT') end, -- rollback transaction rollback = function(self) return self:perform('ROLLBACK') end, -- transaction txn = function(self, proc) local raise = self.raise self.raise = true self:begin_work() local res = { pcall(proc, self) } -- commit transaction if res[1] then res = { pcall(function() self:commit() end) } self.raise = raise if res[1] then return true end return res[1], res[2] end local res_txn = { pcall(function() self:rollback() end) } if not res_txn[1] then res[2] = res[2] .. "\n" .. res_txn[2] end self.raise = raise return res[1], res[2] end } } /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalseIllegalParams%s at %s:%ivarint is too short (expected 1+ bytes)varint is too short (expected 2+ bytes)BER int is too short (expected 3+ bytes)BER int is too short (expected 4+ bytes)BER int is too short (expected 5+ bytes)incorrect BER integer formatpacket too short (expected 32 bits)packet too short (expected a field)/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.htuple_formats[format->id] == formattuple_format_id(format) == tuple->format_idClientError/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/space.hkp >= sp->key_defs && kp < (sp->key_defs + sp->key_count)LoggedErrorbox.tuplebox.tuple.iterator/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/box_lua.cct->refstuple.new(): bad argumentstuple.slice(): bad argumentstuple.slice(): start >= field counttuple.slice(): end > field counttuple.slice(): start must be less than endstart < tuple->field_countfield_no == endtruenil1WBVBWBUBTWBWBWBWBWBWBVBtuple.transform(): bad argumentstuple.transform(): offset is out of boundtuple.transform(): len is negativeoffset + field_count <= tuple->field_counttuple.transform(): unsupported field type '%s'tuple.find(): bad argumentstuple.find(): unsupported field type: %slua_gettop(L) == tuple->field_count + 1%s: index %d is out of bounds (0..%d)it != NULLtuple.next(): bad argumentsbox.indexbox.index.iteratorindex != NULLindex %d in space %dUsage: index:random((uint32) rnd)unknown iterator type: %dKey part count %d is greater than index part count %dindex.count(): one or more arguments expectedbox.process(CALL, ...) is not allowedbox.raise(): bad argumentsbox.raise(): unknown error codecall: out of stackITER_strncmp(iterator_type_strs[i], "ITER_", 5) == 0BBB BBB"B)B0Bbox.pack: unsupported typeuBuBBBBBBuBbox.pack: argument count does not match the formatbox.pack: expected 8-bit intbox.pack: expected 16-bit intbox.pack: expected 32-bit intbox.pack: expected 64-bit intbox.pack: unsupported pack format specifier '%c'eBBeBBBeBBBBBeBBeBBBBBBBBBBBBBeBBBeBBBBBBBBBBBBBBBBB_BBׇB9BB_BBBBBBBBBBBeBBBBBBBBBBBBBBBBBBׇB9BB_BBBB\BBBBBeBincorrect packet lengthbox.unpack('%c'): got %d bytes (expected: %d+)box.unpack('%s'): unexpected opcode: offset %d, expected '%c',found '%c'box.unpack: unsupported format specifier '%c's <= endbox.unpack('%s'): too many bytes: unpacked %d, total %dBKBBKBKBBKBKBKBKBBKBBKBKBKBKBKBKBKBKBKBKBKBKBBKBKBBKBKBKB/BKBKBKBKBKBKBKBKBKBKBKBKBʍBKBcBKB.BKBKBKBKBKBKBKBKBKBKBKBBKBKB/BKBKBBKBMBKBKBBKBKBBKBtBKBcBBKBۋBKBKBKBBKBKBKBKBBboxError loading Lua source %.160s...: %slua_gettop(L) == 0__gc__len__index__tostringnextpairsslicetransformfindfindallunpacktotablebsizezORBORBO`BO,aBO"bBOdBOSBOXBOR^BOq^BO^BOI_BOHdBnewO RBpart_countminmaxrandomiteratorcountO gBOogB OgB OhB OUhB# OhBO/lB* O0mB3 OemBObfBzOeBprocesscall_loadprocraisepack OvB( O{B6 OwB< OBOBmod_lua_initlbox_unpackpick_varint32box_index_init_iterator_typeslua_checktuplekey_def_nlua_checkindexlbox_checkiteratorlbox_tuple_nexttuple_formattuple_format_idload_varint32lbox_tuple_unpacklbox_tuple_transformlbox_tuple_sliceACcardinalitynenabledestimated_rowsindexuniquetypekey_fieldNUMNUM64STRUNKNOWNfieldnoboxbless_spacespace/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/box_lua_space.cclua_gettop(L) == 0box_lua_load_cfgINADDR_ANY.tarantool.pidfsync_delayusernamelocal_hot_standbybind_ipaddrcoredumpadmin_portreplication_portlog_levelslab_alloc_arenaslab_alloc_minimalslab_alloc_factorwork_dirsnap_dirwal_dirscript_dirpid_fileloggerlogger_nonblockio_collect_intervalbacklogreadaheadsnap_io_rate_limitrows_per_walwal_writer_inbox_sizewal_modewal_fsync_delaywal_dir_rescan_delaypanic_on_snap_errorpanic_on_wal_errorprimary_portsecondary_porttoo_long_thresholdcustom_proc_titlememcached_portmemcached_spacememcached_expirememcached_expire_per_loopmemcached_expire_full_sweepreplication_sourcespaceenabledcardinalityestimated_rowsindextypeuniquekey_fieldfieldnotrueyesenableon1falsenodisableoff0%s[%d]Option '%s' is not supportedCould not find '%s' optionWrong value type for '%s' optionWrong array index in '%s' optionCould not accept read only '%s' optionCould not parse integer value for '%s' optionWrong range for '%s' optionNot enough memory to accept '%s' optionOption '%s' is not set (or has a default value)Unknown error for '%s' optionX&C&C'CI'C'C'C(Ca(C(C(Cw&CNo memory to output value%d%gspace[%d].enabledspace[%d].cardinalityspace[%d].estimated_rowsspace[%d].index[%d].typespace[%d].index[%d].uniquespace[%d].index[%d].key_field[%d].fieldnospace[%d].index[%d].key_field[%d].typeUnknown state for tarantool_cfg_iterator_t: %dy+Cy+C,C,Cc-C.C.CI/C/C0CB1C1C2C)3C3C_4C4C5C?6C6C7C#8C8C9C9:C:C;CGC ?C?C}@C)ACACBC=CCDCDCDCDCDCDCDCDCDCDCDCONC%EC%ECFCFCGCGCGCGCGCGCHCHC\ICJCJCJCOption '%s' is not set/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/mutex.hf == fiber/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacitywal_mode %s is not recognizedprisecmemcadmrpl %s: %ircan't open config `%s'empty configuration file '%s'fsyncwal_mode cannot switch to/from fsync%s: wal_mode [%s] -> [%s]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tarantool.ccfsync_delay%s: wal_fsync_delay [%f] -> [%f]Could not reload configuration: it is being reloaded right nowCould not accept read only '%s' optionconfiguration: %s: "%s" %s: (null) 1.5.1-83-gf2974d6forkdumperdumper (%u)Snapshot process is already running, the signal is ignoredsnapshotFatal %d while backtracingSegmentation fault Got a fatal signal %d Current time: %u Please file a bug at http://bugs.launchpad.net/tarantool Attempting backtrace... Note: since the server has already crashed, this may fail as well sigactionsigprocmask%s error %de == 0a+can't open pid filecan't fseek to the beginning of pid filethe daemon is already runningupdating a stale pid fileftruncate(`%s')%i can't initialize slab allocatorTarantool %s Linux-x86_64-DebugTarget: %s cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_STATIC=OFF -DENABLE_TRACE=ON -DENABLE_BACKTRACE=ON -DENABLE_CLIENT=OFFBuild options: %s /usr/bin/gcc /usr/bin/c++Compiler: %s -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -msse2 -std=c11 -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing -Werror -pthreadC_FLAGS:%s -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -msse2 -std=c++11 -fno-rtti -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing -Wno-invalid-offsetof -Werror -pthreadCXX_FLAGS:%s Tarantool -- an efficient in-memory data store.Usage: %s [OPTIONS] Please visit project home page at http://tarantool.orgto see online documentation, submit bugs or contribute a patch.tarantool.cfgetc/tarantool.cfgcan't load config %s or %sCan't parse command line: try --help or -h for help. getcwdcfg_outcheck_config FAILED%.*scan't load config:%.*scan't chdir to `%s'getpwnam: %sUser not found: %ssetgit/setuidcan't switch to %s: i'm not rootgetrlimitsetrlimitprctl--background requires 'logger' configuration option to be setlog level %ientering event loopexiting loopFatal error, exiting loop%sint main(int, char**)signal_initvoid signal_init()void tbuf_ensure(tbuf*, size_t)void mutex_unlock(mutex*)core_reload_configACcfg-getcfg_getcheck-configconfiginit-storageinit_storageverbosebackgroundhelpversion=KEYreturn a value from configuration file described by KEYCheck configuration file for errors=FILEpath to configuration file (default: tarantool.cfg)initialize storage (an empty snapshot file) and exitincrease verbosity level in log messagesredirect input/output streams to a log file and run as daemondisplay this help and exitprint program version and exit(none)boxlua_tointeger64: bad argumentlua_tointeger64: unsupported cdata typelua_tointeger64: unsupported type: %sbox.fiberkv__mode/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/init.cc! lua_isnil(L, -1)memoizecallersf != fiber && child_L != Lfiber.detach(): not attached%sfiber.create(function): bad argumentsfiber.create(function): recursion limit reachedluafiber.resume(): the fiber is deadfiber.resume(): can't resume a detached fiberf->fid == fidfiber.wrap(function, ...): bad argumentsdeadrunningnormalsuspendedfiber.sleep(delay): bad argumentsfiber.cancel(): subject fiber does not permit cancelfiber.testcancel(): bad argumentstostring - %-.*s - %s %-.*s tonumber64: wrong number of arguments__index__metatablebox.errorUNUSEDRESERVED%s;packageplugins: - { name: "%s", version: %d, stat: } .soLoading plugin: %sCan't load plugin %s: %splugin_metaCan't find plugin metadata in plugin %sPlugin %s has api_version: %d but tarantool has: %dPlugin '%s' was loaded, version: %d%s/%sCan't allocate memory for %s plugin dirTARANTOOL_PLUGIN_DIR/usr/local/lib/tarantool/pluginspathcpathrequireffiprintpcalltonumber64Error loading Lua source %.160s...: %sreturn %s%sdofile'''error: '%s' truefalsebox.cfg = {} setmetatable(box.cfg, {}) getmetatable(box.cfg).__index = function(table, index) table[index] = {} setmetatable(table[index], getmetatable(table)) return rawget(table, index) end box.cfg.%s = %s%s%s getmetatable(box.cfg).__newindex = function(table, index) error('Attempt to modify a read-only table') end getmetatable(box.cfg).__index = nil on_reload_configurationon_reload_configuration() hook failed: %sinit.lualoading %sos.execute = nil os.exit = nil os.rename = nil os.tmpname = nil os.remove = nil io = nil require = nil timetime64()OC-)OCidname__gcp)OCs)OCx)OCsleepselffindcanceltestcancelcreateresumewrapyieldstatusdetach)OC)OKCp)OC)OxC)OC)O-C)OC)OC)OC)OC)OCs)OC*OClbox_fiber_resumelbox_fiber_gclbox_create_weak_tableC.A?20FiberCancelExceptions`+ObN(none)CCCCCCsigprocmask/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/say.ccpipeCan't start logger: %s%s: : %s%F %H:%M:%06.3f [%i] %i/%s %s:%i %c> /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalse 5a 0`   0 ` Y0`load_varint32ffffff?invalid replication port value: %d/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replication.ccsocketpairforkreplicationsendmsgspawner%ssigactioninitializedfalseExiting: master shutdownrecvmsgTerminated by signal %dcreated a replication relay: pid = %dsigprocmasksending signal %d to %d childrenwaiting for children for up to 5 secondssigno == SIGCHLDthe client has closed its replication socket, exitingrecvwriterelay/%s%s%sreadinvalid LSN request size: %zustarting replication from lsn: %lican't find WAL containing record with lsn: %liexiting the relay loopspawner_shutdown_childrenspawner: waitpid() failed spawner_unpack_cmsg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/pickle.hdata != NULL && *data != NULLfalseIllegalParams%s at %s:%ivarint is too short (expected 1+ bytes)varint is too short (expected 2+ bytes)BER int is too short (expected 3+ bytes)BER int is too short (expected 4+ bytes)BER int is too short (expected 5+ bytes)incorrect BER integer format/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.htuple_formats[format->id] == formattuple_format_id(format) == tuple->format_id/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacityMEMC_GETMEMC_GET_MISSMEMC_GET_HITMEMC_EXPIRED_KEYS/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/memcached.ccpacket too short (expected a field) %u %u memcached/store key:(%i)'%.*s' exptime:%u flags:%u cas:%lusizeof(struct meta) <= lenSTAT pid %u STAT uptime %u STAT time %u STAT version 1.2.5 (tarantool/box) STAT pointer_size %lu STAT curr_items %lu STAT total_items %lu STAT bytes %lu STAT curr_connections %u STAT total_connections %u STAT connection_structures %u STAT cmd_get %lu STAT cmd_set %lu STAT get_hits %lu STAT get_misses %lu STAT evictions %lu STAT bytes_read %lu STAT bytes_written %lu STAT limit_maxbytes %lu STAT threads 1 END ensuring space for %lu keystuple_next(&it, &len) == NULLVALUE %.*s %u %u %lu VALUE memcached_dispatch '%.*s'src/memcached-grammar.rlNOT_STORED SERVER_ERROR object too large for cache STORED NOT_FOUND EXISTS %luCLIENT_ERROR cannot increment or decrement non-numeric value DELETED flush_allOK parse failed after: `%.*s'memcached proto errorERROR CLIENT_ERROR bad command line format SERVER_ERROR D5VDWD>XDsXDXDYDYDZDcZDZDh[D[DǎDDHD}DDDDQDDÐDD-DbDD͑DDD4DDݓDDDVDDוD DADvDDDDODDDD՘DDKDDDDDWDDDeDDD%DZDDĝDD@DDDD:DvDgDDݠDXDDD+D`DDʢDD4D{DDD'D\DDxDCDsDDDDJDDDDDSDD٩DDCDxDDժD D?DtD٫D DDDPDDDD$DYDDծDDID~D˯DDD*D{DDݱDDGDtDD޲DDHD}DD߳DDID~DDDDKDDDDDJD;DfDDDZDD_DӹDDTDDDD(D]DD̻DDRD}DnDDDBDDGDDDMDDDD&D[DDDD7DlDDDSVDWDYVD6DfDYVDDDYVDDYVDYVDYVDYVDYVDYVD[DƳDȴDDYVDYVDYVDYVDYVDYVDYVDYVDYVDYVDYVDYVDYVDWDYVD6DfDYVDDDYVDDYVDYVDYVDYVDYVDYVD[DƳDȴDDnegative dispatch, closing connectioninvalid memcached port value: %iinvalid expire per loop value: %iinvalid expire full sweep value: %imemcachede.errcode() != ER_NONMASTERmemcached expire fiber startedexpire tuple %pmemcached_expire == NULLmemcached_expirecan't start the expire fibermemcached_expire != NULLmemcached_stop_expirememcached_start_expiretuple_formattuple_format_idload_varint32memcached_delete_expired_keystbuf_ensurememcached_getmemcached_metapick_varint32AC?FiberCancelException/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/fiber.h(none)/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fiber.ccsp + 1 - call_stack < FIBER_CALL_STACKcallerClientError%s at %s:%if->fid != 0!(f->flags & FIBER_CANCEL)f->waiter == NULLfiber == &schedzombiefiber != NULL && fiber->f != NULL && fiber->fid != 0fiber `%s' has been cancelledfiber `%s': exitingfiber `%s': unknown exceptionname != NULLsched - fid: %4i csw: %i name: %s stack: %p backtrace: %sfibers:  5a 0`   0 ` Y0`fiber_set_namefiber_loopfiber_schedulefiber_schedule_timeoutfiber_cancelfiber_callEE^E     $enderror$undefinedOPT_PKEY_PINDEX_PNULL_PSTRING_P'['']''=''{''}''.'','$acceptcfgsection_listsectionnamed_sectionparam_listparam$@1valueevaluestruct_listqnameqelemqualifierelemnameoptcomma_optGFOLFORFO]FOcFOiFOqFOxFOFOFOFOFOFOFOFOFOFOFOFOFOFOFOFOFOFOFOFOGOGOGOGOGOGO          %+  " !&#$### ')', /10 .64 !7"#$5)*23(&-  '+.  *5  3  , 1 6            syntax errorsyntax error, unexpected %ssyntax error, unexpected %s, expecting %ssyntax error, unexpected %s, expecting %s or %ssyntax error, unexpected %s, expecting %s or %s or %ssyntax error, unexpected %s, expecting %s or %s or %s or %s{ E E E E E EDeletingNo memoryError: discardingError: poppingmemory exhaustedCleanup: discarding lookaheadCleanup: popping>E>EEEEE E3EEE$EpEEE EECEEEEEE0EE0E@EEPEEE E$E1Egram_yyerror: %s at line %dUnkown paramType: %d              (8IQX_41,'!-(&"!  hlptx|;<<==>>??;;;;@;;;AA;;;@;;;B;;C;;;;;;D;DD;@;;AA;B;;;DDDA;;;;;;;;;;;    .:98-*76430,*/-,*;;;;;;;;;;;;;;;;;;;!";#;$;%!";#;$;%';;(;;)';;(;;) &&&&+;++1;;122225;55 ;;;;;;;;;;;;;;;;;;A90/-*)(%  <<<<====>>>>????@@@BBCCCCDDD;;;;;;;;;;;;;;;;;;;OPTsyntax error: Unknown characterNULLUnexpected end of string (expecting value)Unexpected end of string (expecting closing quote)Unexpected end of string (inside comment)flex scanner jammedfatal flex scanner internal error--no action found*E*EB4EB4E+EI+E+E+EV,El,E,E,EV-Ew-E-E-E-E-E_.E/E/E/E/EB4E:0E~0E0E0E91EB4Ei1E1E,E-E0E/EN1Efatal flex scanner internal error--end of buffer missedfatal error - scanner input buffer overflowinput in flex scanner failedout of dynamic memory in yy_get_next_buffer()flex scanner push-back overflowout of dynamic memory in prscfg_yy_create_buffer()out of dynamic memory in prscfg_yyensure_buffer_stack()out of dynamic memory in prscfg_yy_scan_buffer()out of dynamic memory in prscfg_yy_scan_bytes()bad buffer in prscfg_yy_scan_bytes()out of memory expanding start-condition stackstart-condition stack underflow%s prscfg_yyset_lineno called with no bufferprscfg_yyset_column called with no bufferscan_yyerror: %s at line %d - /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacity/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tbuf.cb->size <= b->capacityat <= orig->sizecount <= b->size%02x tbuf_ensuretbuf_ltrimtbuf_splittbuf_asserteter_pool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/palloc.ccclazz != NULLchunk != NULL && chunk->magic == chunk_magicLoggedError%s at %s:%ipallocnext chunkchunk->free >= sizepoisoned((char *) ptr + PALLOC_REDZONE, size) == NULLnew_size <= pool->allocatedcut_size == 0mallocpalloc poolpalloc statistic: pools: - name: %s alloc: %lu busy chunks: - { size: %u, used: %i } classes: - { size: %u, free_chunks: %- 6i, busy_chunks: %- 6i } total: - { occupied: %lu, used: %lu } %sPptruncatepallocpalloc_slow_pathnext_chunk_for(none)(null)#%-2d %p in %s+%lu? mainsched%s%s:%i: %s: assertion %s failed. no symbols were loaded/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/util.cc%s, called on %sfd %d, aka %s, peer of %sSO_KEEPALIVESO_LINGERSO_ERRORSO_REUSEADDRTCP_NODELAYundefinedE߅E؅EEхEEEEEÅEEEEʅESocketError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/sio.ccshutdownr/proc/sys/net/core/somaxconn%dsocketfcntl(..., F_GETFL, ...)fcntl(..., F_SETFL, ...)setsockopt(%s)getsockopt(%s)connectbindlistenacceptread(%zd)write(%zd)writev(%d)sendto(%zd)recvfrom(%zd)getpeernamegetpeername: empty peer%s:%dܖEE6F11SocketErrorsaOaO11SystemErrorsaObN/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/evio.cccoio->fd == -1! evio_is_active(evio)errno == EADDRINUSESocketError%s at %s:%ievio_bind_addrinfo()bound to %s port %i! ev_is_active(&service->ev)%sINADDR_ANYinvalid address for bind: %s%s port %i is already in use, will retry binding after %lf seconds.evio_service_startevio_service_timer_cbevio_service_bind_and_listenevio_bind_addrinfoevio_socket/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coio.ccerrno == EINPROGRESSSocketError%s at %s:%iconnect! evio_is_active(coio)connect_addrinfo()acceptsz <= bufsizunexpected EOF when reading from socketiov_len == 0%s/%siobufcan't create a handler fiber, dropping client connectioncoio_writevcoio_read_ahead_timeoutcoio_connect_addrinfocoio_connect_timeoutLoggedError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iobuf.ccobuf_init_posiovecbuf->iov[pos].iov_len == 0iov < buf->iov + IOBUF_IOV_MAXfill < sizecapacity == iov->iov_leniov->iov_len <= buf->capacity[buf->pos]palloc_allocated(iobuf->in.pool) <= iobuf_max_pool_size()iobuf_cacheiobuf_newobuf_rollback_to_svpobuf_bookobuf_alloc_posobuf_dupobuf_reset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/salloc.ccslab->magic == SLAB_MAGICmmapcache->item_size <= MAX_SLAB_ITEMLoggedError%s at %s:%islab allocatorvalid_item(slab, slab->brk)valid_item(slab, slab->free)valid_item(slab, item)slab->free == NULL || valid_item(slab, slab->free)item_no >= 0slab_no >= 0salloc_ptr_from_index(index) == ptrQ@salloc_ptr_from_indexsalloc_ptr_to_indexsfreesallocslab_ofslab_validateformat_slabslab_headerCLoggedError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coro.ccmmapcoro stack 5a 0`   0 ` Y0` SNAP .snapXLOG .xlogcan't parse `%s', skipping/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/log_io.ccerror reading directory `%s'%s/%020lld%s%sheader crc32c mismatchdata crc32c mismatchread row v11 success lsn:%lldi->eof_read == falselog_io_cursor_next: marker:0x%016X/%zueof while looking for magicskipped %jd bytes after 0x%08jx offsetmagic found at 0x%08jxfailed to read row%.1fM rows processedcan't read eof markereof marker is corrupt: %lul->is_inprogresssuffixstrcmp(suffix, inprogress_suffix) == 0can't rename %s to %scan't unlink %scan't rename 'inprogress' WALcan't close%s: fsync failed, errno: %d%s: dup() failed%s: fsync failed%s%s failed to read log file headerunknown filetypeunknown version %s: failed to open %s: %slsn != 0rcreating `%s'w%s: failed to open `%s' .inprogress0.11 log_io_open_for_writelog_io_open_for_writelog_io_open_for_readlog_io_openlog_io_syncsync_cbinprogress_log_unlinkinprogress_log_renamelog_io_cursor_next.Anonewritefsyncfsync_delay/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/recovery.ccwait_lsn->waiter == NULLr->confirmed_lsn <= r->lsnnon consecutive LSN, confirmed: %jd, new: %jd, diff: %jdfalseset_lsn(%p, %linext_lsn(%p, %lirecovery_state == NULLunacceptable value of 'rows_per_wal'r->wal_mode != WAL_MODE_MAXr->current_wal == NULLrecovery startcan't find snapshotcan't find/open snapshotrecover from `%s'can't apply rowsnapshot recovered, confirmed lsn: %lididn't you forget to initialize storage with --init-storage switch?snapshot recovery failedskipping too young row`%s' has no EOF marker, yet a newer WAL file exists: trying to re-read (attempt #%d)WAL `%s' wasn't correctly closedrunlink broken %s WALcan't unlink 'inprogres' WALfailure reading from %sread zero records from %sdone `%s' confirmed_lsn: %linot all WALs have been successfully readrecover failedWALs recovered, confirmed lsn: %liunable to successfully finalize recoveryzero rows was successfully read from last WAL `%s'can't unlink 'inprogress' WALrename unfinished %s WALcan't rename 'inprogress' WALtoo many rows in inprogress WAL `%s'recover failed: %ir->watcher == NULLr->writer == NULLev_is_active(&watcher->dir_timer)%s error %de == 0%s: locking %s&writer->mutex%s: unlocking %sfio_batch_alloc! wal_writer.is_shutdownSTAILQ_EMPTY(&wal_writer.input)STAILQ_EMPTY(&wal_writer.commit)WAL writer: thread join failedwal_to_close == NULLmax_rows > 0wal_write lsn=%lipartial write: %d out of %d rowsfio_batch_write%.1fM rows writtenFailed to save snapshot: failed to open file in write mode.saving snapshot `%s'donedon't know how to read `%s'wal_writewal_writewal_writer_threadwal_writer_threadwal_fill_batchwal_opt_rotatewal_writer_popwal_writer_popwal_writer_stopwal_writer_stopwal_writer_startwal_writer_startwal_writer_destroywal_writer_destroywal_writer_initwal_writer_initwal_schedulewal_schedulewal_writer_init_oncewal_writer_init_oncerecovery_stop_localrecovery_follow_localrecover_remaining_walsrecover_snaprecovery_update_moderecovery_initconfirm_lsnwait_lsn_set@.A?/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tbuf.he->size <= e->capacityavailable commands: - help - exit - show info - show fiber - show configuration - show slab - show palloc - show stat - show plugins - save coredump - save snapshot - lua command - reload configuration - show injections (debug mode only) - set injection (debug mode only) unknown command. try typing help. - { item_size: %- 5i, slabs: %- 3i, items: %- 11li, bytes_used: %- 12li, bytes_free: %- 12li } slab statistics: classes: items_used: %.2f%% arena_used: %.2f%% ... --- ok fail:%.*s info: version: "%s" uptime: %i pid: %i logger_pid: %i snapshot_pid: %i lsn: %li recovery_lag: %.3f recovery_last_update: %.3f config: "%s" %s:%*s{ rps: %- 6i, total: %- 12li } statistics: can't save snapshot, errno %d (%s)can't find error injection '%s'kF*CFCFCF,DF^DFDFMFMF1NFkNFNFNFOFFOFOFOFOF=PF|PFPFPFQFSQFQFQFRFERFRFRFRF$SFLSFSFSF TFHTFTFTFUFDUFUFUFVF;VFqVFVFVF WFIWFWFWFWF'XFfXFXFXF#YFbYFYFYFZFBZFZFZFZF>[Fx[F[F[F\FF\Fn\F\F]FT]F]F]F]F1^Fk^F^F^F _FC_Fy_F_F_F `FE`F`F`F aFHaFaFaFbFDbFbFbFcF@cFcFcFcF dF_dFdFdFeFXeFeFeFfF5fFyfFfFfFgFQgF~gFgFgF2hFqhFhFhFiF:iFbiFiFiFiF"jFajFjFjFkFXkFkFkFHCFCFKCFNFKCFKCFOFKCFKCFKCFPFKCFKCFKCFKCF,RFoRFVFadmintbuf_ensureY@(none)can't connect to mastercan't write versioncan't read versionIllegalParams%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replica.ccremote version mismatchsuccessfully connected to masterstarting replication from lsn: %lican't read row%swill retry every %i second*(uint16_t*)(row + sizeof(struct header_v11)) == XLOGreplication failure: can't apply rowr->remote == NULLinitializing the replica, WAL master %sreplica/%s%31[^:]:%irc == 2inet_aton: %sshutting down the replicarecovery_follow_remoteremote_apply_row?/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iproto.cci_queue->end < i_queue->sizeiprotosession->input.fd == -1session->output.fd == -1iproto_session_is_idle(session)!evio_is_active(&session->output)IllegalParams%s at %s:%ireceived package is too bigfd >= 0iovcntevio_is_active(&session->input)session->sid == 0iobuf%s/%sprimarysecondaryiproto_enqueue_requestiproto_session_destroyiproto_process_connectiproto_flushiproto_session_on_inputiproto_session_createClientError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/session.ccnew sessionsession hashout of memory 5a 0`   0 ` Y0`SystemError%s in %s/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/exception.ccClientError%s at %s:%d, %svXAXAFxEE6FER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not existERRINJ_TESTINGERRINJ_WAL_IOERRINJ_WAL_ROTATEERRINJ_INDEX_ALLOC/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errinj.ccid >= 0 && id < errinj_enum_MAXerror injections: - name: %s onoff state: %s errinj_seterrinj_get/proc/self/fd/%dread, [%s]/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fio.cwrite, [%s]iov && iovcnt >= 0writev, [%s]lseek, [%s]: offset=%jd, whence=%dlseek, [%s]: offset set to unexpected value: requested %jd effective %jdfio_truncate, [%s]: offset=%jdbatch->max_rows > 0! fio_batch_is_full(batch)fio_batch_write, [%s]: partial write, wrote %jd out of %jd bytesfio_batch_addfio_writev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.csizeoffset < rope_size(rope)offset == 0node->leaf_size != 0node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_sizenode->height == (((rope_node_height(node->link[0])) > (rope_node_height(node->link[1])) ? (rope_node_height(node->link[0])) : (rope_node_height(node->link[1]))) + 1)┌──└──│ %s%snil{ len = %zu, height = %d, data = ''}size = %zu string = ''rope_checkrope_eraserope_extract_noderope_insertversionpidlogger_pidconfigbuildtargetLinux-x86_64-Debugoptionscmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_STATIC=OFF -DENABLE_TRACE=ON -DENABLE_BACKTRACE=ON -DENABLE_CLIENT=OFFcompiler/usr/bin/gcc /usr/bin/c++flags -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -msse2 -std=c11 -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing -Werror -pthreadboxinfo__index__callrecovery_lagrecovery_last_updatelsnstatusuptimesnapshot_pidɖOF֖OaFOFOFOFOuFrpstotalboxstat__index__callOrFOFslabsitemsbytes_usedbytes_freeitem_sizearena_usedarena_sizeboxslab__call__index OFLOTFWOFfiber.channel(size): bad argumentsbox.channel(size): negative sizebox.channel: Not enough memoryridusage: channel:is_full()usage: channel:is_empty()timeout must be a numberwrong timeoutusage: channel:put(var [, timeout])usage: channel:get([timeout])broadcast_messageusage: channel:broadcast(variable)usage: channel:has_readers()usage: channel:has_writers()boxipcbox.ipc.channel__gcis_fullis_emptyputgetbroadcasthas_readershas_writers`OFeOjFmOFvOFzOF~OFOFOxFchannel0OxF?/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/mutex.hf == fiberbox.socket: incorrect method callbox.socket: socket is not initialized/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/lua_socket.ccs->iob == __nulltcpudpbox.io.%s(%d)Host name resolution faileds->io_r.fd == -1box.io.readline: bad separator box.io.readline: bad argumentbox.io.readline: bad separator table(*__errno_location ()) == 110SHUT_RDSHUT_WRSHUT_RDWRbox.socket__gc__tostringerrorcloseshutdownconnectsendrecvreadlinebindlistenacceptsendtorecvfromxOF}O{FOFOFOFOFOFOFOFOGOLGĝOG˝OGҝO8 GOFOFtimeouteoflimitint lbox_socket_sendto(lua_State*)void mutex_unlock(mutex*)int lbox_socket_close(lua_State*)void bio_initbuf(bio_socket*)?box.sessionsession.exists(sid): bad argumentssession.peer(sid): bad argumentsClientError%s at %s:%i/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/session.ccsession.on_connect(chunk): bad argumentsidO Gexistspeeron_connecton_disconnectO G O0 G'O G,OqG7OGboxcjson(function(box) local ffi = require("ffi") ffi.cdef[[ /* from */ typedef unsigned char uuid_t[16]; void uuid_generate(uuid_t out); /* from libc */ int snprintf(char *str, size_t size, const char *format, ...); ]] local libuuid = nil local builtin = ffi.C function check_libs() if libuuid then return end libuuid = ffi.load('uuid.so.1') end box.uuid = function() check_libs() local uuid = ffi.new('uuid_t') libuuid.uuid_generate(uuid) return ffi.string(uuid, 16) end box.uuid_hex = function() check_libs() local uuid = ffi.new('uuid_t') libuuid.uuid_generate(uuid) local uuid_hex = ffi.new('char[33]') for i = 0,ffi.sizeof('uuid_t'),1 do builtin.snprintf(uuid_hex + i * 2, 3, "%02x", ffi.cast('unsigned int',uuid[i])) end return ffi.string(uuid_hex, 32) end end)(box) (libev) system error(libev) cannot allocate %ld bytes, aborting.(libev) error creating signal/async pipe(libev) epoll_wait(libev) epoll_create/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/ev_poll.cpolls [idx].fd == fd(libev) poll("libev: poll() returned illegal result, broken BSD kernel?", p < polls + pollcnt)(libev) selectLIBEV_FLAGS/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/ev.c("libev: watcher has invalid priority", (((W)w)->priority - (((0x7f) & 4) ? -2 : 0)) >= 0 && (((W)w)->priority - (((0x7f) & 4) ? -2 : 0)) < ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1))("libev: pending watcher not on pending queue", pendings [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][w->pending - 1].w == w)("libev: active index mismatch in heap", ((W)((heap [i]).w))->active == i)("libev: heap condition violated", i == (4 - 1) || (heap [((((i) - (4 - 1) - 1) / 4) + (4 - 1))]).at <= (heap [i]).at)("libev: heap at cache mismatch", (heap [i]).at == ((WT)((heap [i]).w))->at)("libev: active index mismatch", ((W)(ws [cnt]))->active == cnt + 1)activecnt >= -1fdchangemax >= fdchangecnt("libev: negative fd in fdchanges", fdchanges [i] >= 0)anfdmax >= 0("libev: io watcher list contains a loop", w != w2)("libev: inactive fd watcher on anfd list", ((W)(w))->active == 1)("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)timermax >= timercntperiodicmax >= periodiccntpendingmax [i] >= pendingcnt [i]idleall >= 0idlemax [i] >= idlecnt [i]forkmax >= forkcntcleanupmax >= cleanupcntasyncmax >= asynccntpreparemax >= preparecntcheckmax >= checkcnt("libev: negative ev_timer repeat value found while processing timers", w->repeat > 0.)("libev: ev_periodic reschedule callback returned time in the past", ((WT)(w))->at >= ev_rt_now)("libev: ev_loop recursion during release detected", loop_done != 0x80)("libev: pipe_w not active, but pipe not written", (0 + ((ev_watcher *)(void *)(&pipe_w))->active))("libev: ev_io_start called with negative fd", fd >= 0)("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE)))("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w)("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax)("libev: ev_timer_start called with negative timer repeat value", w->repeat >= 0.)("libev: internal timer heap corruption", (timers [active]).w == (WT)w)("libev: ev_periodic_start called with negative interval value", w->interval >= 0.)("libev: internal periodic heap corruption", (periodics [active]).w == (WT)w)("libev: ev_signal_start called with illegal signal number", w->signum > 0 && w->signum < (65))Aev_signal_startev_periodic_stopev_periodic_startev_timer_stopev_timer_startev_io_stopev_io_startev_runtimers_reifyperiodics_reifyev_verifyarray_verifyverify_heapverify_watcherpoll_pollpoll_modify?C& .>ư>eA@@.A ??`--g?/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libeio/eio.c("unable to allocate worker thread data", wrk)GGGGGG%GG/GG9GGCGGMGGPGG,GJGijGճGGGFGmG GGVGٽGGtGGGƾGGNGGGjGGuGzGGGG\G~G GG/GVGG¶GGGGGGbGGG("cannot add requests to IO::AIO::GRP after the group finished", grp->int1 != 2)eio_grp_addeio_dent_radix_sortetp_start_thread@eA.A%s: --%.*s: abbreviated option is ambiguous =%s: --%.*s: unknown option %s: --%.*s: option may not be repeated (in any long or short form) %s: --%s: option requires an option argument %s: --%.*s: option may not take an option argument %s: -%c: option may not be repeated (in any long or short form) %s: -%c: option requires an option argument %s: -%c: unknown option -%c, --%s%-*s--%-*s%.*s %sT_OBJ_BEGINT_OBJ_ENDT_ARR_BEGINT_ARR_ENDT_STRINGT_NUMBERT_BOOLEANT_NULLT_COLONT_COMMAT_ENDT_WHITESPACET_ERRORT_UNKNOWN\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f\"\/\\\u007fBUG: Unable to fetch CJSON configurationfound too many argumentsexpected integer between %d and %d__gcCannot serialise %s: %sexcessively sparse arrayCannot serialise, excessive nesting (%d)must not be NaN or Infnannull":table key must be a number or stringtruefalsetype not supportedH HHGGUHexpected 1 argument/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/lua_cjson.c*json->ptr == '"'unexpected end of stringinvalid unicode escape codeinvalid escape codeinfinvalid numberinvalid tokenExpected %s but found %s at character %dFound too many nested data structures (%d) at character %dobject key stringcoloncomma or object endcomma or array endvalueH HH HpHHHHJSON parser does not support UTF-16 or UTF-32the endtoo many upvaluesMemory allocation error in CJSON protected callcjson_NAME2.1devel_VERSIONencodedecodeencode_sparse_arrayencode_max_depthdecode_max_depthencode_number_precisionencode_keep_bufferencode_invalid_numbersdecode_invalid_numbersnewO/HO'HOGмOMGOGOG O+GOG4OGKOHjson_next_string_tokenoffon?Out of memoryBUG: Invalid string incrementstrbuf(%lx) reallocs: %d, length: %d, size: %d BUG: Invalid strbuf length requestedstrbuf(%lx) resize: %d => %d BUG: Unable to convert numberBUG: length of formatted string changed%gError: wide characters found or printf() bug.Out of memory/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/fpconv.c1 <= precision && precision <= 14set_number_formatlj_gc.c(o)->gch.gct == ~(~12u)(o)->gch.gct == ~(~5u)(o)->gch.gct == ~(~11u)!(((&n->key)->it) == (~0u))(o)->gch.gct == ~(~8u)(o)->gch.gct == ~(~7u)(o)->gch.gct == ~(~6u)(o)->gch.gct == ~(~9u)lj_obj.h(o)->gch.gct == ~(~10u)o->gch.gct != ~(~11u)(t->marked & (0x08 | 0x10))old >= g->gc.total(traceno)>0 && (MSize)(traceno)<(&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->sizetracetraceno != (&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->cur.traceno!((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) || (o->gch.marked & 0x20)((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) || ow == 0x40((o)->gch.marked & (0x01 | 0x02)) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))!(((((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~(((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->it) == (((GCobj *)(uintptr_t)(((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->gcr).gcptr32))->gch.gct)gct == ~(~8u) || gct == ~(~11u) || gct == ~(~6u) || gct == ~(~7u)(!((o)->gch.marked & (0x04|(0x01 | 0x02))))!(((((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~(((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->it) == (((GCobj *)(uintptr_t)(((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->gcr).gcptr32))->gch.gct)!((((&n->key)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&n->key)->it) == (((GCobj *)(uintptr_t)((&n->key)->gcr).gcptr32))->gch.gct)!((((&n->val)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&n->val)->it) == (((GCobj *)(uintptr_t)((&n->val)->gcr).gcptr32))->gch.gct)fn->l.nupvalues <= (((((fn)->c.ffid == 0)) ? (void) (0) : __assert_fail ("((fn)->c.ffid == 0)", "lj_gc.c", 207, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)((fn)->l.pc).ptr32)-sizeof(GCproto))))->sizeuv!((((&fn->c.upvalue[i])->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&fn->c.upvalue[i])->it) == (((GCobj *)(uintptr_t)((&fn->c.upvalue[i])->gcr).gcptr32))->gch.gct)(uintptr_t)(intptr_t)(i) >= (uintptr_t)-(intptr_t)(pt)->sizekgc!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct)!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((GCobj *)(uintptr_t)(g->jit_L).gcptr32) == ((void *)0)((o)->gch.marked & 0x04) && ((v)->gch.marked & (0x01 | 0x02)) && !((v)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause((((tv)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(osz == 0) == (p == ((void *)0))(nsz == 0) == (p == ((void *)0))((uintptr_t)(p) == (uint32_t)(uintptr_t)(p))!((((&g->registrytv)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&g->registrytv)->it) == (((GCobj *)(uintptr_t)((&g->registrytv)->gcr).gcptr32))->gch.gct)(&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->next).gcptr32)->uv))->prev).gcptr32)->uv) == uv && (&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->prev).gcptr32)->uv))->next).gcptr32)->uv) == uv!((((GCobj *)((&((GCobj *)(uintptr_t)(g->mainthref).gcptr32)->th))))->gch.marked & (0x01 | 0x02))g->gc.state == GCSfinalize || g->gc.state == GCSpause(((GCobj *)(uintptr_t)(g->jit_L).gcptr32))->gch.gct == ~(~6u)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)((uintptr_t)(o) == (uint32_t)(uintptr_t)(o))P5H5H6H 9Hp9H:Hlj_gc_separateudatagc_finalizesetgcVcopyTVgc_sweepRHImHH,mHqHpI I8]H?rHgc_onestepgc_mark_startgc_markpropagatemarkgc_traverse_tabgc_traverse_funcgc_traverse_protogc_marktracegc_traverse_threadatomicgc_mark_uvgc_clearweaklj_gc_step_jitlj_gc_fullgclj_gc_barrierflj_gc_barrieruvlj_gc_closeuvlj_mem_realloclj_mem_newgcolj_err.ccf != ((void *)0)%s:%d: %s?>H>Hy?H?H>H?H?H?HCHCHCHCHCHDH%DH%DHnot enough memoryerror in error handlingC++ exceptionstring length overflowuserdata length overflowstack overflowstack overflow (%s)table overflowtable index is NaNtable index is nilinvalid key to 'next'attempt to call a %s valueattempt to %s %s '%s' (a %s value)attempt to %s a %s valueattempt to compare %s with %sattempt to compare two %s valuesloop in gettableloop in settablecallindexperform arithmetic onconcatenateget length ofcalling '%s' on bad self (%s)bad argument #%d to '%s' (%s)%s expected, got %sinvalid valuevalue expectedcoroutine expectednil or table expectedLua function expectedfunction or level expectedstring/function/table expectedboolean or proxy expected'for' initial value must be a number'for' limit must be a number'for' step must be a numberno calling environmentattempt to yield across C-call boundarybad light userdata pointerbad action while in __gc metamethodassertion failed!cannot change a protected metatabletoo many results to unpackreader function must return a string'tostring' must return a string to 'print'index out of rangebase out of rangelevel out of rangeinvalid levelinvalid optioninvalid option '%s'invalid format'setfenv' cannot change environment of given objectcannot resume running coroutinecannot resume dead coroutinecannot resume non-suspended coroutinewrong number of arguments to 'insert'invalid value (%s) at index %d in table for 'concat'invalid order function for sortingattempt to use a closed filestandard file is closedunable to generate a unique filenamefield '%s' missing in date tableunable to dump given functionstring slice too longmissing '[' after '%f' in patterninvalid pattern capturemalformed pattern (ends with '%')malformed pattern (missing ']')unbalanced patternpattern too complexinvalid capture indextoo many capturesunfinished captureinvalid option '%%%c' to 'format'invalid format (repeated flags)invalid format (width or precision too long)invalid replacement value (a %s)name conflict for module '%s'JIT compiler disabled, CPU does not support SSE2unknown or malformed optimization flag '%s'attempt to load chunk with wrong mode%s near '%s'lexical element too longchunk has too many lineschunk has too many syntax levelsmalformed numberunfinished long stringunfinished long commentunfinished stringinvalid escape sequenceinvalid long string delimiter'%s' expectedcontrol structure too longfunction or expression too complexchunk has more than %d local variablesmain function has more than %d %sfunction at line %d has more than %d %s'%s' expected (to close '%s' at line %d)function too long for return fixup or '...' expectedambiguous syntax (function call x new statement)function arguments expectedunexpected symbolcannot use '...' outside a vararg functionsyntax error'=' or 'in' expectedno loop to breakundefined label '%s'duplicate label '%s' jumps into the scope of local '%s'cannot load incompatible bytecodecannot load malformed bytecodeinvalid C typesize of C type is unknown or too largebad storage classdeclaration specifier expectedundeclared or implicit tag '%s'attempt to redefine '%s'wrong number of type parameterstoo many initializers for '%s'cannot convert '%s' to '%s'attempt to get length of '%s'attempt to concatenate '%s' and '%s'attempt to perform arithmetic on '%s' and '%s'attempt to compare '%s' with '%s''%s' is not callablewrong number of arguments for function call'%s' has no member named '%s''%s' cannot be indexed'%s' cannot be indexed with '%s''%s' has no '%s' metamethodattempt to write to constant locationmissing declaration for symbol '%s'bad callbacktoo many callbacksNYI: packed bit fieldsNYI: cannot call this C function (yet)setgcVcopyTVfinderrfunc(((o)->it) < 0xfffeffffu)nilbooleanuserdataupvalthreadprotofunctiontracecdatatablenumberno valueGOKOKOSOP\ObOiOoOxO~OOSOOOGOKOSOOPOoOSObOiO~OnumberVnumlj_str.c(p)->gch.gct == ~(~4u)(o)->gch.gct == ~(~4u)len > 0%.14g(null)NULL(((L->top - 1)->it) == (~4u))0123456789abcdeflj_str_resizelj_str_newstr_fastcmpsetgcVlj_str_pushvflj_tab.clj_gc.h(((&n->val)->it) == (~0u))t->hmask != 0kt->asize == t->asize && kt->hmask == t->hmask(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))freenode >= nodebase && freenode <= nodebase+t->hmask+1freenode != &(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))clearhpartlj_tab_dupcopyTVlj_tab_getlj_tab_newkeylj_gc_barrierbacksetgcVlj_func.c!((o)->gch.marked & 0x04) && !uv->closed && (((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)) != &uv->tv(((GCobj *)(uintptr_t)(L->openupval).gcptr32))->gch.gct == ~(~5u)!p->closed && (((TValue *)(void *)(uintptr_t)((p)->v).ptr32)) != &p->tv(((GCobj *)(uintptr_t)(*pp).gcptr32))->gch.gct == ~(~5u)lj_func_closeuvunlinkuvfunc_finduvlj_meta.cmm <= MM_FAST(((c)->it) < 0xfffeffffu)(((b)->it) < 0xfffeffffu)(((top-i)->it) == (~4u))op == BC_ISEQP__index__newindex__gc__mode__eq__len__lt__le__concat__call__add__sub__mul__div__mod__pow__unm__metatable__tostring__new__pairs__ipairs(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail (\"(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)\", \"lj_meta.c\", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc", "lj_meta.c", 363, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)(((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->k).ptr32)[(~(ptrdiff_t)((BCReg)((ins)>>16)))]).gcptr32))))->gch.gct == ~(~4u)lj_meta_cachelj_meta_lookupcopyTVlj_meta_tsetlj_gc_barrierbacklj_meta_arithsetgcVlj_meta_catlj_meta_lenlj_meta_equal_cdlj_debug.c((fn)->c.ffid == 0)(*vararg)(*temporary)pc <= pt->sizebcidx < pt->sizeuvlocalglobalfieldupvaluemetamethodpc < pt->sizebc%s:%d%p:%d"%s":%dLuamain(((func)->it) == (~8u))offset != 0fn->c.gct == ~(~8u)=[C]%s stack traceback: ...Snlf(((L1->top-1)->it) == (~8u)) [builtin#%d]: %s:%d: in function '%s' in main chunk at %p in function <%s:%d>fn->c.gct == ~(~8u) || fn->c.gct == ~(~6u)bc_isret(((BCOp)((ins[-1])&0xff)))(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc", "lj_debug.c", 270, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((pt)->k).ptr32)[(~(ptrdiff_t)((BCReg)((ins)>>16)))]).gcptr32))))->gch.gct == ~(~4u)(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc", "lj_debug.c", 273, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((pt)->k).ptr32)[(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff)))]).gcptr32))))->gch.gct == ~(~4u)frame <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)) && (!nextframe || nextframe <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)))(for index)(for limit)(for step)(for generator)(for state)(for control)lj_debug_uvnamelj_debug_slotnamelj_debug_funcnamedebug_framepcdebug_framelinecopyTVdebug_localnamelj_debug_getinfosetgcVluaL_tracebacklj_state.c(up)->gch.gct == ~(~5u)g->strnum == 0(MSize)((((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32))-oldst)==L->stacksize-5-1((GCobj *)(uintptr_t)(g->gc.root).gcptr32) == ((GCobj *)(L))g->gc.total == sizeof(GG_State)((((GCobj *)(L1)))->gch.marked & (0x01 | 0x02))L != (&((GCobj *)(uintptr_t)(g->mainthref).gcptr32)->th)((GCobj *)(uintptr_t)(L->openupval).gcptr32) == ((void *)0)resizestacksetgcVclose_statelj_state_newlj_state_freelj_dispatch.c((g)->hookmask & 0x10)L->top - L->base == deltaH>HܪHܪHܪHH>H>H>H>H>H>H>H>H>H>HɫHsetptmode_alllj_dispatch_inscallhooklj_dispatch_calllj_strscan.c(int64_t)x >= 0lo > 0 && (ex10 & 1) == 0fmt == STRSCAN_ERROR || fmt == STRSCAN_NUMstrscan_doublestrscan_declj_strscan_numlj_api.c(1) <= (L->top - L->base)(((L->top-1)->it) == (~11u))(((&tmp)->it) < 0xfffeffffu)(n) <= (L->top - L->base)(((t)->it) == (~11u))(uint32_t)n < fn->l.nupvalues(2) <= (L->top - L->base)(((o)->it) == (~11u))(((o)->it) == (~12u))(((f)->it) == (~8u))idx != 0 && -idx <= L->top - L->basefn->c.gct == ~(~8u) && !((fn)->c.ffid == 0)(n) <= (from->top - from->base)(((global_State *)(void *)(uintptr_t)(from->glref).ptr32)) == (((global_State *)(void *)(uintptr_t)(to->glref).ptr32))idx <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)) - L->base-(idx+1) <= (L->top - L->base)(p) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 141, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(p) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 149, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 170, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))tt != 0 || (((o)->it) == (~0u))((((o2)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))((((GCobj *)(fn)))->gch.marked & (0x01 | 0x02))((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->registrytv))->it) == (~11u))(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 733, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 748, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 814, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(((index2adr(L, idx))->it) == (~8u))(((index2adr(L, idx1))->it) == (~8u))(((index2adr(L, idx2))->it) == (~8u))((fn1)->c.ffid == 0) && (uint32_t)n1 < fn1->l.nupvalues((fn2)->c.ffid == 0) && (uint32_t)n2 < fn2->l.nupvalues(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 892, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 912, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(((index2adr(L, idx))->it) == (~11u))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 957, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 995, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))L->status == 0 || L->status == 5(nargs+1) <= (L->top - L->base)(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 1049, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))HH!H-H5H?HsH{Hlua_xmovecopyTVlua_settoplua_removestkindex2adrlua_insertlua_replaceindex2adrsetgcVlua_typeluaL_checkanylua_rawequalnumberVnumlua_equallua_lessthanlua_tonumberluaL_checknumberluaL_optnumberlua_tointegerluaL_checkintegerluaL_optintegerlua_pushcclosureluaL_newmetatablelj_gc_barrierbacklua_concatlua_gettablelua_getfieldlua_rawgetlua_rawgetiluaL_getmetafieldlua_getfenvlua_nextlua_upvalueidlua_upvaluejoinluaL_checkudatalua_settablelua_setfieldlua_rawsetlua_rawsetilua_setmetatablelua_setfenvlua_setupvaluelua_calllua_pcalllua_cpcall%cchar(%d)lj_lex.cs == '[' || s == ']'(((tv)->it) < 0xfffeffffu)ls->lookahead == TK_eofandbreakdoelseelseiffalseforgotonotrepeatthentrueuntilwhile==>=<=~=::(ls->current == '\n' || ls->current == '\r')((lj_char_bits+1)[((ls->current))] & 0x08)fmt == STRSCAN_I64 || fmt == STRSCAN_U64 || fmt == STRSCAN_IMAGITITITITITITITITITI' I I' I' I ITITITITITITITITITITITITITITITITITITI' ITI ITITITITI ITITITITITIU IxITITITITITITITITITITITI) ITI I I] ITITITITITITITITITITITITITITITITITITITITITITITITITITITITIH ITITITITITITITITITITITITITITITITITITITITITITITITITITITITITITITITITITI IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII'IIIII'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII'IIIII"I~IIIIIIIIIIIIIIIIIIIIIIIIhIsetgcVinclinenumberskip_seplex_numberlj_lex_lookaheadPPPPPPPPoOPPOyOGOPPP PPPPP!O OPPPPPPPPPlj_parse.cfs->freereg == fs->nactvarreg == fs->freereg(((e))->k == VKNUM)dest != (~(BCPos)0)target < fs->pc((vg)->info & 0x02)bytecode instructions((e)->k == VKNUM)e->k == VVOID || e->k == VJMPvar->k == VINDEXEDlocal variablesbl->nactvar == fs->nactvarfs->bl == ((void *)0)constantsdelta >= 0 && delta < 256delta >= 0 && delta < 65536delta >= 0selffs->nactvar == nparamse->k == VNONRELOCe1->t == (~(BCPos)0)e1->f == (~(BCPos)0)(e2)->k <= VKTRUE((key)->k == VKSTR)variable namespairsnextfs.prev == ((void *)0)ls->fs == ((void *)0)pt->sizeuv == 0(((((((((e))->k == VKNUM)) ? (void) (0) : __assert_fail ("(((e))->k == VKNUM)", "lj_parse.c", 1720, __PRETTY_FUNCTION__)), (&(e)->u.nval)))->it) <= 0xfffeffffu)((BCOp)((*ip)&0xff)) == BC_JMP || ((BCOp)((*ip)&0xff)) == BC_UCLOe->k == VLOCAL || e->k == VUPVAL(uintptr_t)name >= VARNAME__MAX(&((GCobj *)(uintptr_t)((vg->name)).gcptr32)->str) != ((GCstr *)(uintptr_t)1)((e)->k == VKSTR) || e->k == VGLOBAL(((&e->u.nval)->it) == (~10u))(uintptr_t)name < VARNAME__MAX || lj_tab_getstr(fs->kt, name) != ((void *)0)name == ((GCstr *)(uintptr_t)1) || lj_tab_getstr(fs->kt, name) != ((void *)0)(((&ls->tokenval)->it) == (~4u))((((&n->key)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))ls->fs != ((void *)0) || ls->token == TK_eof((e1)->k == VKNUM) || e1->k == VNONRELOCe1->u.s.info == ((BCReg)((*(&(fs)->bcbase[(e2)->u.s.info].ins))>>24))-1op == OPR_NE || op == OPR_EQ || op == OPR_LT || op == OPR_GE || op == OPR_LE || op == OPR_GT((BCReg)(((ilp->ins)>>8)&0xff)) == freg && ((BCOp)((ilp->ins)&0xff)) == (narr > 256 ? BC_TSETV : BC_TSETB)((((((&n->val)->it) == (~11u))) ? (void) (0) : __assert_fail ("(((&n->val)->it) == (~11u))", "lj_parse.c", 1824, __PRETTY_FUNCTION__)), (&(((GCobj *)(uintptr_t)((&n->val)->gcr).gcptr32))->tab)) == t(((GCobj *)(uintptr_t)(((ls)->vstack[(fs)->varmap[(((BCReg)((ins)>>16)))]]).name).gcptr32))->gch.gct == ~(~4u)(((GCobj *)(uintptr_t)(ls->vstack[fs->uvmap[((BCReg)((ins)>>16))]].name).gcptr32))->gch.gct == ~(~4u)ls->fs->framesize >= ls->fs->freereg && ls->fs->freereg >= ls->fs->nactvarbIYI9cI9cI9cI9cI ZI_IbIFXI9cIE`I9cI9cI9cI^I{aI9cI9cI9cI!YI9cI9cI9cI9cI9cI9cIbIsetgcVlj_parsefscope_beginjmp_patchinsparse_chunk copyTVexpr_simplelj_gc_barrierbackexpr_tableconst_strbcreg_freeexpr_numiszerolex_strexpr_kvalueexpr_toreg_nobranchnumberVnumbcemit_storeconst_numparse_paramsvar_newvar_lookup_uvbcemit_methodparse_argsbcemit_unopbcemit_binopbcemit_arithbcemit_compjmp_patchfscope_endgola_newgola_resolvegola_closepredict_nextfs_finishfs_fixup_retfs_fixup_kfs_fixup_linerbcannot open %s: %s@%s=stdincannot read %s: %slj_load.cL->top > L->basesetgcVcopyTVlua_dumplj_trace.cop == BC_ITERLop == BC_FUNCFflushstartstopabortJ->pt != ((void *)0)J->state == LJ_TRACE_IDLET->root == 0 && pt != ((void *)0)(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace((((((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace) ? (void) (0) : __assert_fail ("(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace", "lj_trace.c", 190, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(((BCReg)((*pc)>>16)))]).gcptr32))) == T((BCOp)((*pc)&0xff)) == BC_JFORIop == BC_ITERL || op == BC_LOOP || bc_isret(op)((((((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace) ? (void) (0) : __assert_fail ("(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace", "lj_trace.c", 205, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(((BCReg)((*pc)>>16)))]).gcptr32))) == T(pt->trace)>0 && (MSize)(pt->trace)sizetrace(T2->nextroot)>0 && (MSize)(T2->nextroot)sizetrace(pt->trace)>0 && (MSize)(pt->trace)<(&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->sizetrace(i)>0 && (MSize)(i)sizetrace((BCOp)((*J->pc)&0xff)) == BC_FORL || ((BCOp)((*J->pc)&0xff)) == BC_ITERL || ((BCOp)((*J->pc)&0xff)) == BC_LOOP || ((BCOp)((*J->pc)&0xff)) == BC_FUNCF(J->freetrace)>0 && (MSize)(J->freetrace)sizetrace((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g)->hookmask & 0x40) == 0J->parent != 0 && J->cur.root != 0(J->parent)>0 && (MSize)(J->parent)sizetrace(J->cur.root)>0 && (MSize)(J->cur.root)sizetracebc_isret(((BCOp)((*J->pc)&0xff)))i == (ptrdiff_t)J->cur.traceno || ((((i)>0 && (MSize)(i)sizetrace) ? (void) (0) : __assert_fail ("(i)>0 && (MSize)(i)sizetrace", "lj_trace.c", 309, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(i)]).gcptr32))) == ((void *)0)T != ((void *)0) && J->exitno < T->nsnapPmInInImInInImInInInInIxIxIyIzI~I{I{I{I,|I,|IzI,|I,|IzI,|I,|IzI,|I,|I/{IzItrace_flushroottrace_unpatchlj_trace_flushprotolj_trace_flushallsetgcVlj_trace_freestatetrace_starttrace_findfreetrace_stopnumberVinttrace_abortcopyTVtrace_downreclj_trace_exittrace_hotside0@volatileconstlj_ctype.ccts->Llj_ctype.hid > 0 && id < cts->topunionstructboolfloatlong doubleunsigned charintshortunsigned_tvoidctypeenum__ptr32complex)))__attribute__((vector_size((((GCobj *)(uintptr_t)(ct->name).gcptr32))->gch.gct == ~(~4u)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))(((ct->info) & (0xf0000000u|0x00100000u)) == (((CTInfo)(CT_ARRAY) << 28) + (0x00100000u)))((((ct->info)) >> 28) <= CT_HASSIZE)((((info)) >> 28) <= CT_HASSIZE) || ((((info)) >> 28) == CT_FUNC)IjIII;IIIIؘIva_list__builtin_va_list__gnuc_va_listptrdiff_tsize_twchar_tint8_tint16_tint32_tint64_tuint8_tuint16_tuint32_tuint64_tintptr_tuintptr_tvoid_Boolboolcharint__int8__int16__int32__int64floatdoublelongshort_Complexcomplex__complex__complex__signed__signed__signed__unsignedconst__const__const__volatile__volatile__volatile__restrict__restrict__restrict__inline__inline__inline__typedefexternstaticautoregister__extension____attribute__attribute__asm__asm__asm____declspec__cdecl__thiscall__fastcall__stdcall__ptr32__ptr64structunionenumsizeof__alignof__alignof__lj_ctype_newlj_ctype_internctype_checkctype_childlj_ctype_vlsizelj_ctype_infoctype_reprctype_preptype@B C   4@4      2 Pppp p p ppp p ppp p p p p  !! !##"""$%%% % &&!'()*++lj_cdata.hlj_cdata.c(char *)cd - p < 65536ct->size == 8s->size == 8d->size == 8(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz((((ct->info)) >> 28) <= CT_HASSIZE) || ((((ct->info)) >> 28) == CT_FUNC) || ((((ct->info)) >> 28) == CT_EXTERN)!(((ct->info) & (0xf0000000u|0x00800000u)) == (((CTInfo)(CT_PTR) << 28) + (0x00800000u)))(((ctt->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) && ctt->size <= 4((((s->info) >> 28) >> 1) == (CT_PTR >> 1)) || ((((s->info)) >> 28) == CT_FIELD)((((d->info) >> 28) >> 1) == (CT_PTR >> 1)) || ((((d->info)) >> 28) == CT_FIELD)((((d->info)) >> 28) <= CT_HASSIZE) && !((((d->info)) >> 28) == CT_VOID)ctype_checkctype_childlj_cdata_newlj_cdata_newvlj_cdata_freesetgcVlj_gc_barrierbacklj_cdata_indexcdata_getptrlj_cdata_getcdata_getconstlj_cdata_setlj_cconv.clj_cconv.hidx < 8dsize == ssizesz != 0xffffffffubsz == 1(((info) >> 8) & 127) == 1d->size == 4!((((dinfo)) >> 28) == CT_ENUM) && !((((sinfo)) >> 28) == CT_ENUM)!((((dinfo)) >> 28) == CT_ATTRIB) && !((((sinfo)) >> 28) == CT_ATTRIB)!((((dinfo)) >> 28) == CT_NUM) || dsize > 0!((((sinfo)) >> 28) == CT_NUM) || ssize > 0!(((dinfo) & (0xf0000000u|0x08000000u)) == (((CTInfo)(CT_NUM) << 28) + (0x08000000u))) || dsize == 1 || dsize == 4!(((sinfo) & (0xf0000000u|0x08000000u)) == (((CTInfo)(CT_NUM) << 28) + (0x08000000u))) || ssize == 1 || ssize == 4!(((dinfo) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) || (1u<<((uint32_t)(__builtin_clz(dsize)^31))) == dsize!(((sinfo) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) || (1u<<((uint32_t)(__builtin_clz(ssize)^31))) == ssize((((info)) >> 28) == CT_BITFIELD)pos < 8*(((info) >> 16) & 127)bsz > 0 && bsz <= 8*(((info) >> 16) & 127)(((GCobj *)(uintptr_t)(df->name).gcptr32))->gch.gct == ~(~4u)IxII0I0I0I0I0IGIGIII0II I0I5I5IIxI0I0I0I0I0II]I׸I0I0I0I0I0IIIII0I0I0I0III0I0IֺI^I^I0I0I0I0I0I0II0I0I0I0I0I0I0I0IIctype_childctype_checklj_cconv_ct_ctcconv_idxcdata_getptrcdata_setptrlj_cconv_tv_ctsetgcVlj_cdata_newlj_cconv_tv_bflj_cconv_ct_tvcconv_substruct_tablj_cconv_bf_tvClj_ccallback.cL != ((void *)0)p - page <= (4096 * 1)((((((MSize)(((int32_t)slot)) < (MSize)((cts->miscmap))->asize) ? (&(((TValue *)(void *)(uintptr_t)(((cts->miscmap))->array).ptr32))[(((int32_t)slot))]) : lj_tab_getinth((cts->miscmap), ((int32_t)slot))))->it) == (~8u))((((ctf->info)) >> 28) == CT_FIELD)lj_ccallback_entersetgcVctype_checkcallback_conv_argsctype_childlj_gc_barrierbackcallback_checkfunccallback_mcode_initsignal_LOADEDPANIC: unprotected error in call to Lua API (Must use luaL_newstate() for 64 bit target C typelib_ffi.c(((tv)->it) == (~10u))ctype<%s>cdata<%s>: %pcdata<%s>: %dK__modeLinuxx64ffisetgcV>__index __newindex__eq__len__lt__le__concat__call__add__sub__mul__div__mod__pow__unm __tostring__pairs__ipairsffi__metatableU*J)J &J&J%J%J%J&J%J%J%J%J%J%J%J!J!J!Jluaopen_ffi>__index __newindex__gcJJ%J>freeset__indexJJ>cdefnewcasttypeofistypesizeofalignofoffsetoferrnostringcopyfillabimetatypegcloadCosarchGJsJ J JJJJJ)JJ/J JJJJ-Jlj_cf_ffi_clib___newindexctype_checkctype_childcdata_getptrcopyTVlj_cf_ffi_clib___indexlj_gc_barrierbacklj_cdata_newffi_register_module_PRELOADpackageioosmathdebugbitjit PLJPXMOW0MJPAMJPIMPR"MJPLJPiMJPcMJP}MGP+J1199!!%%$$$$)T\dltT\dltQYaiqy!B    2K2KKK2K2K2H 9xAv9b|"X5k 1t=n & J h G  T  0 B R bGQC,CG+^r/CoW  Z!!!?"_ ] y""%"$6%%%%(&I&k&&&&&'?'g''>((&'''k)5) ())-/.U///H00-.z.*6*e**+,u,,[-_VMEVENTSlj_vmevent.c(((tv)->it) == (~8u))VM handler failed: lj_vmevent_preparesetgcVlj_vmmath.cb != 0lj_vm_modilj_bcread.cls->n >= (len)ls->n > 0tp <= BCDUMP_KTAB_TRUE(binary)len != 0ls->current == 0x1b!(((&key)->it) == (~0u))(((L->top)->it) == (~7u))ls->p + ls->n == ls->sb.buf + ls->sb.nlj_bcreadsetgcVbcread_bytebcread_uleb128bcread_fillbcread_membcread_kgcbcread_ktabbcread_ktabkbcread_uleb128_33lj_bcwrite.c(((o)->it) >= (~2u))(pt->flags & 0x01)id == CTID_COMPLEX_DOUBLEo->gch.gct == ~(~11u)ctx->sb.n == 5(rd)>0 && (MSize)(rd)sizetracebcwrite_protobcwrite_bytecodebcwrite_kgcbcwrite_ktabkbcwrite_knumlj_ir.cszins != 0J->cur.nk == J->irbotlim(&cir[ref])->o == IR_KGCir->o != IR_KSLOTlj_ir.h!1 || t != IRT_LIGHTUDt <= IRT_NUM(ir)->o == IR_KINT64(&cir[ref])->o == IR_KNUM || (&cir[ref])->o == IR_KINT64((uintptr_t)(tv) == (uint32_t)(uintptr_t)(tv))!((o)->gch.marked & ((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g)->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))(void *)(intptr_t)((int32_t)(intptr_t)(void *)(ptr)) == ptr(((((IRRef1)((key)))) < REF_BIAS)) && slot == (IRRef)(IRRef1)slotnJJȐJ\J\J\JsJJJJJJJJ˓J֓JXJoJNH$YHPH[H YTH!YSH!Ym[H! [[H! [`H[ckH Zit) < 0xfffeffffu)ref == DROPFOLDir->o == IR_STRREFJ->slot[(&J->fold.ins)->op1] != 0(((&J->fold.left)))->o == IR_KGC(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 2015, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~10u)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 1996, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 1900, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~8u)(((GCobj *)(uintptr_t)(fn->l.uvptr[((&J->fold.ins)->op2 >> 8)]).gcptr32))->gch.gct == ~(~5u)(((&J->cur.ir[(ir->op1)])))->o == IR_KGC(((((((&J->cur.ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(ir->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1905, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)(((GCobj *)(uintptr_t)(fn2->l.uvptr[(ir->op2 >> 8)]).gcptr32))->gch.gct == ~(~5u)((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))(((((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR) ? (void) (0) : __assert_fail ("((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR", "lj_opt_fold.c", 1875, __PRETTY_FUNCTION__)), (((void *)(void *)(uintptr_t)(((&J->fold.left))->ptr).ptr32))) == ((((((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))", "lj_opt_fold.c", 1875, __PRETTY_FUNCTION__)), (&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val))((&J->fold.left))->o == IR_KNUM || ((&J->fold.left))->o == IR_KINT64((&J->fold.right))->o == IR_KNUM || ((&J->fold.right))->o == IR_KINT64((&J->fold.right))->o == IR_KINT64((&J->fold.left))->o == IR_KINT64(((IRType)((J->scev.t).irt & IRT_TYPE)) == IRT_INT)(((IRType)(((&J->fold.left)->t).irt & IRT_TYPE)) == IRT_NUM)((&J->fold.right))->o == IR_KNUM((&J->fold.ins)->op2 & 0x0400)((&J->fold.left))->o == IR_KNUM(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 2026, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~10u)(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1976, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1968, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1936, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)((&J->fold.left))->o == IR_KGC(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 494, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(MSize)(&J->fold.right)->i <= str->len(&J->fold.ins)->o != IR_CONV || ((&J->fold.ins)->op2&0xf000) != (0<<12)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 711, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 523, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~4u)(((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC(((((((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC", "lj_opt_fold.c", 524, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op2)])))->gcr).gcptr32))))->gch.gct == ~(~4u)(((&J->fold.right)))->o == IR_KGC(((((((&J->fold.right)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.right)))->o == IR_KGC", "lj_opt_fold.c", 1810, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.right)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE)) == IRT_STR)(&J->cur.ir[(strref)])->o == IR_STRREF"J*J2J:J:J:J:J:J JJJJJJJJJ(J2JJJJJJJȬJѬJܬJܬJѬJJJJ$J)J.J.J2J2J"J)J0J7JKJ.lpEVnn"B^NaX lZATA(RSX \PlCkX CX>\|U=XBQ[HYS1pX d_lZpT yq^-rpP oEu{\~k*ZkDAV5mNR2T^pD \(_xsp@ ekrZfb[7Ti?0mT>D]dPtSFlOWUhluAKWdoQhZX*l qGW{X lnl`P\.CUX l DEl X Ak.S3X P/X<fb@_Cp*dc \~.V6Ap Ja^,\*puV<8wppJJJJBJ׾JJJ)JYJĔJJFJͳJJJkJ0JJKJ7JbJJԸJmJ֔JߪJJJJgJJ@JJ0JЩJ JJqJJ|JJVJJJJϕJJ&JJJTJ-J:JJJ2JJJ"JvJܗJ?JJAJeJJԿJ+JFJJקJJJJUJ3JJȱJJ&JJJHJѦJoJJҟJ"JJUJJJJ'JJJ]JJJ!JRJܜJHJqJJڛJ=JJKJoMwJ1MMMJ\MJJɶJvJߵJHJ JJJ/JJJwJJ#MСJHJ:MJ\JvMTMMMJlj_opt_foldfold_xload_kptrfold_fwd_sloadfold_fload_cdata_int64_kgcfold_fload_cdata_typeid_kgcfold_fload_str_len_kgcfold_fload_tab_tdup_hmaskfold_fload_tab_tdup_asizefold_fwd_href_tdupfold_fwd_href_tnewfold_cse_ureffold_kfold_hload_kkptrfold_merge_eqne_snew_kgcfold_reassoc_minmax_kkfold_intopfold_reassoc_intarith_k64kfold_int64arithfold_simplify_shift2_kifold_simplify_shift1_kifold_simplify_bxor_kfold_simplify_bor_kfold_simplify_band_kfold_simplify_intmod_kfold_simplify_intmul_k64fold_simplify_intsub_k64fold_simplify_intadd_k64fold_simplify_intsub_kleftfold_narrow_convertfold_simplify_conv_sextfold_simplify_tobit_convfold_simplify_numpow_kxfold_simplify_nummuldiv_negkfold_simplify_nummuldiv_kfold_simplify_numsub_negkfold_simplify_numsub_kfold_kfold_strtofold_kfold_tostr_knumfold_kfold_conv_knum_u64_numfold_kfold_conv_knum_i64_numfold_kfold_conv_knum_u32_numfold_kfold_conv_knum_int_numfold_kfold_conv_kint64_int_i64fold_kfold_conv_kint64_num_u64fold_kfold_conv_kint64_num_i64fold_kfold_tobitfold_kfold_add_kptrfold_kfold_add_kgcctype_checkfold_kfold_strcmpfold_kfold_strref_snewfold_kfold_strreffold_kfold_snew_kptrfold_kfold_int64comp0fold_kfold_int64compfold_kfold_bswap64fold_kfold_bnot64fold_kfold_int64shiftfold_kfold_int64arith2fold_kfold_int64arithfold_kfold_intcompfold_kfold_numcompfold_kfold_numpowfold_kfold_fpmathfold_kfold_numarith8C?@lj_opt_narrow.csp >= nc->stack+1next < lastsp >= nc->stack+2sp == nc->stack+1(((vb)->it) == (~4u))(((vc)->it) == (~4u))(((vc)->it) < 0xfffeffffu)((((((tr))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM)))((&J->cur.ir[(((IRRef1)(rb)))]))->o == IR_KNUM((&J->cur.ir[(((IRRef1)(rc)))]))->o == IR_KNUM(((&tv[FORL_IDX])->it) <= 0xfffeffffu) && (((&tv[FORL_STOP])->it) <= 0xfffeffffu) && (((&tv[FORL_STEP])->it) <= 0xfffeffffu)narrow_conv_emitlj_opt_narrow_indexlj_opt_narrow_cindexlj_opt_narrow_arithnumberVnumlj_opt_narrow_unmnumberVintlj_opt_narrow_powlj_opt_narrow_forlnarrow_forl?Alj_opt_loop.c*psentinel == J->cur.snapmap[J->cur.snap[0].nent]J->cur.nsnapmap <= J->sizesnapmapnumberVintloop_unroll JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJcJJJJJJJJ@JJJJJJJJJJwJwJqJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ?J?J?J?Jlj_mcode.cmc != ((void *)0)lj_mcode_patchlj_snap.cop == BC_CATn < snap->nentsz == 4 || sz == 8irk->op2 == IRFL_TAB_META(((&tmp)->it) == (~11u))map + nent == flinkssz == 8 && ir->o == IR_CONV && ir->op2 == ((IRT_NUM<<5)|IRT_INT)sz == 1 || sz == 2 || sz == 4 || sz == 8!((uint32_t)((IRType)((t).irt & IRT_TYPE)) <= IRT_TRUE)ir->o == IR_CONV && ir->op2 == ((IRT_NUM<<5)|IRT_INT)pc >= ((BCIns *)((char *)(J->pt) + sizeof(GCproto))) && pc < ((BCIns *)((char *)(J->pt) + sizeof(GCproto))) + J->pt->sizebc(((&(((GCobj *)(uintptr_t)((frame)->fr.func).gcptr32))->fn))->c.ffid == 0)!((((frame)->fr.tp.ftsz) & 3) == FRAME_C)f == (MSize)(1 + J->framedepth)(((rs) & ~((0x7f) + ((0) << 8))) != ((0x80) + ((0) << 8)))ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW || ir->o == IR_CNEWIirc->o == IR_CONV && irc->op2 == ((IRT_NUM<<5)|IRT_INT)irs->o == IR_XSTORE && T->ir[irs->op1].o == IR_ADDiro->o == IR_KINT || iro->o == IR_KINT64p >= (uint8_t *)((void *)((cd)+1)) && p + szs <= (uint8_t *)((void *)((cd)+1)) + sz((&T->ir[ir->op1]))->o == IR_KGC((((((&T->ir[ir->op1]))->o == IR_KGC) ? (void) (0) : __assert_fail ("((&T->ir[ir->op1]))->o == IR_KGC", "lj_snap.c", 757, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((&T->ir[ir->op1]))->gcr).gcptr32))))->gch.gct == ~(~11u)irs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTOREKKKKKKKKKKMKKMKMKMKMKMKKHKsnapshot_framelinkssnap_usedeflj_snap_regspmaplj_snap_replaysnap_replay_constlj_snap_restorecopyTVsnap_unsinkctype_checklj_cdata_newsetgcVsnap_restoredatasnap_restorevalirt_toitype_lj_record.cJ->baseslot == 1J->base[ra] != 0val == 0J->baseslot > 1J->baseslot > cbase+1J->baseslot >= 1ix->idxchain != 0(((&ix->mobjv)->it) == (~8u))(((&ix->tabv)->it) == (~11u))!hasmm(((&ix->tabv)->it) == (~12u))(((functv)->it) == (~8u))nslots < 250((ir))->o == IR_KGC(J->slot[s+1] & 0x00010000)lj_obj_equal(tv, &tvk)J->framedepth == depthop1 == 0op1 >= nki < REF_BIASop2 == 0op2 >= nkir->prev >= nk((((&ix.keyv))->it) == (~4u))((((&ix.valv))->it) == (~4u))J->base[dst+i] != 0(pt->flags & 0x02)(((IRType)((J->scev.t).irt & IRT_TYPE)) == IRT_INT) && ir->o == IR_SLOAD(uintptr_t)(((BCReg)((ins)>>16))) < (J->pt)->sizekn((BCOp)((*fori)&0xff)) == BC_FORI || ((BCOp)((*fori)&0xff)) == BC_JFORI(((&((GCobj *)(uintptr_t)((J->L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)((((((((tr[i])))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM))) || ((((((tr[i]))) & (IRT_TYPE<<24)) == ((IRT_STR)<<24))))(((&(((GCobj *)(uintptr_t)((frame - (cbase+1))->fr.func).gcptr32))->fn))->c.ffid == 0)((&J->cur.ir[(ptref)]))->o == IR_KGCcont == lj_cont_condf || cont == lj_cont_condt((&J->cur.ir[(((IRRef1)(xref)))]))->o == IR_KPTR || ((&J->cur.ir[(((IRRef1)(xref)))]))->o == IR_KKPTR(((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC(((((((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC", "lj_record.c", 1147, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(((IRRef1)(key)))])))->gcr).gcptr32))))->gch.gct == ~(~4u)((((mo)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(((((ix->key)) & (IRT_TYPE<<24)) == ((IRT_CDATA)<<24)))J->baseslot >= 1 && J->baseslot < 250J->baseslot == 1 || (J->slot[J->baseslot-1] & 0x00010000)ref >= J->cur.nk && ref < J->cur.nins((IRType)(ir->t).irt) == ((IRType)((tr)>>24))(((((tr)) & (IRT_TYPE<<24)) == ((IRT_FUNC)<<24)))((((GCobj *)(uintptr_t)((tv)->fr.func).gcptr32)))->gch.gct == ~(~8u)((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)fn == ((((((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)) ? (void) (0) : __assert_fail ("((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail (\"((ir))->o == IR_KGC\", \"lj_record.c\", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)", "lj_record.c", 102, __PRETTY_FUNCTION__)), (&((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->fn)))s > delta ? (J->slot[s-delta] & 0x00010000) : (s == delta)(ir)->o == IR_KPTR || (ir)->o == IR_KKPTR((((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR) ? (void) (0) : __assert_fail ("(ir)->o == IR_KPTR || (ir)->o == IR_KKPTR", "lj_record.c", 106, __PRETTY_FUNCTION__)), (((void *)(void *)(uintptr_t)((ir)->ptr).ptr32))) == ((void *)(void *)(uintptr_t)(tv->gcr).gcptr32)itype2irt(tv) == ((IRType)(((tr)>>24) & IRT_TYPE))(((tv)->it) < 0xfffeffffu) && ((tv)->n != (tv)->n)nk <= REF_BIAS && nins >= REF_BIAS && nins < 65536i >= REF_BIAS ? op1 < i : op1 > ii >= REF_BIAS ? op2 < i : op2 > ii >= REF_BIAS ? ir->prev < i : ir->prev > iir->o == IR_NOP || (&J->cur.ir[(ir->prev)])->o == ir->o(uintptr_t)(rc) < (J->pt)->sizekn(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc", "lj_record.c", 1738, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((J->pt)->k).ptr32)[(~(ptrdiff_t)rc)]).gcptr32))))->gch.gct == ~(~4u)(((((uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc", "lj_record.c", 1946, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((J->pt)->k).ptr32)[(~(ptrdiff_t)rc)]).gcptr32))))->gch.gct == ~(~11u)((((J->L->base-1)->fr.tp.ftsz) & (3|4)) == FRAME_VARG)((BCOp)((pc[(ptrdiff_t)rc-0x8000])&0xff)) == BC_JFORL(rc)>0 && (MSize)(rc)sizetrace(lnk)>0 && (MSize)(lnk)sizetrace((BCOp)((pc[-1])&0xff)) == BC_ITERC((BCOp)((pc[-1])&0xff)) == BC_JMP]K[K\K\KX\K\K]K_hK_hK_hK_hKoKoKoKoKoKoKoKoK&rK&rKKrKKrKwKorKrtKrKvKvKvKvKvKuKuKuKuKuKvKvKvKvKvKwK1KLKwKwKLKLKQhKBxKXxKXxKXxKXxK1K1K,yKlyKjxKjxKyKyKxKyKyKxK1K{K{K{K{KyK1K{K1K+KAKAKAKWKKK3KfKK3KɅKEK3KK@KYK3KfK(K3KKKKKKKKK KKK7KKKKKKKKcopyTVrec_call_setuplj_record_retcheck_downrec_unrolllj_record_mm_lookupsetgcVlj_record_idxrec_mm_preprec_idx_keynumberVintrec_idx_abcnommstrlj_record_insnumberVnumrec_check_slotsrec_check_irrec_mm_comp_cdatarec_upvaluectype_checkgetcurrfrec_vargrec_forrec_for_loopfind_kinitrec_iterlrec_func_jitrec_func_vararglj_record_setuprec_setup_rootP@lj_ffrecord.c(((tv)->it) == (~4u))(((&rd->argv[0])->it) == (~11u))(((&J->fn->c.upvalue[0])->it) == (~8u))(((&J->fn->c.upvalue[t])->it) == (~4u))(((&J->fn->c.upvalue[0])->it) == (~12u))(((&J->fn->c.upvalue[0])->it) < 0xfffeffffu)(((&J->fn->c.upvalue[((IRType)(((tr)>>24) & IRT_TYPE))])->it) == (~4u))(((&rd->argv[0])->it) == (~4u))lj_ffrecord_select_modeargv2intKÙKKKwKKNKK;KߓK9KKKKeKcKKڬKKK"KfKJKͨKbK{KKEKKqKKeKKKKwKKK2KMfMtMMwMMMMMM#MMAMMrecff_table_removesetgcVrecff_table_insertrecff_math_randomrecff_math_degradcopyTVrecff_tostringrecff_tonumberrecff_rawsetrecff_rawgetrecff_ipairsnumberVintrecff_ipairs_auxrecff_type    ./023V#$%&' !" !!"#$%&%%%&''((((() ( ( ( ((((**++,-.../01234lj_emit_x86.hdelta == (int32_t)deltalj_asm.cn <= 32*2ir->o == IR_CARGlj_asm_x86.hdelta == (int8_t)delta((irr->r) & 0x80)lj_target.h(!((r) & 0x80))allow != ((RegSet)0)((ir->r) & 0x80)ir->o == IR_AREFirb->op2 == IRFL_TAB_ARRAYofs % sizeof(Node) == 0(irkey)->o == IR_KNUM(irkey)->o == IR_KGC!(ir->op2 & 0x01)(ir)->o == IR_KNUM(ir)->o == IR_KGC((intptr_t)target & 15) == 0target - p >= -128p < pe(uintptr_t)p < (uintptr_t)0x80000000(&as->ir[(ir->op1)])->o != IR_CARG(!((r) & 0x80)) && !((ir->s) != 0)group[exitno / 32] != ((void *)0)(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NIL)ir->o == IR_KINT || ir->o == IR_KGC || ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL0 || (ref >= as->T->nk && ref < as->T->nins)ir->o == IR_FLOAD || ir->o == IR_FREF(((&as->ir[(ir->op1)])))->o == IR_KGC(((((((&as->ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&as->ir[(ir->op1)])))->o == IR_KGC", "lj_asm_x86.h", 186, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&as->ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)ir->o == IR_HREF || ir->o == IR_NEWREF || ir->o == IR_UREFO || ir->o == IR_KKPTR((&as->ir[(ir->op2)]))->o == IR_KPTR || ((&as->ir[(ir->op2)]))->o == IR_KKPTR(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))))(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))((((1u<> ((IRType)((ir->t).irt & IRT_TYPE))) & 1) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))((int)((as->freeset) >> (r)) & 1)(((IRType)((irkey->t).irt & IRT_TYPE)) == IRT_NUM) || (((uint32_t)(((irkey->t)).irt & IRT_TYPE) - (uint32_t)(IRT_STR) <= (uint32_t)(IRT_UDATA-IRT_STR)))!(((IRType)((irkey->t).irt & IRT_TYPE)) == IRT_NIL)(((((((&as->ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&as->ir[(ir->op1)])))->o == IR_KGC", "lj_asm_x86.h", 1212, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&as->ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NUM) || ((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT))(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NUM)((t).irt & IRT_GUARD) || !(ir->op2 & 0x04)0 || !(((IRType)((t).irt & IRT_TYPE)) == IRT_INT) || (ir->op2 & (0x08|0x02))(((IRType)((t).irt & IRT_TYPE)) == IRT_NUM) || (((IRType)((t).irt & IRT_TYPE)) == IRT_INT) || (((uint32_t)(((t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))(((uint32_t)(((t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))) || (((IRType)((t).irt & IRT_TYPE)) == IRT_NUM)(down < RID_MAX_GPR) == (up < RID_MAX_GPR)!((int)((as->freeset) >> (down)) & 1) && ((int)((as->freeset) >> (up)) & 1)((IRType)((ir->t).irt & IRT_TYPE)) != st(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) && st == IRT_NUM(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32)RED ZONE OVERFLOW: %p IR %04d %02d %04d %04d !((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE)!((((IRType)((ir->t).irt & IRT_TYPE)) == IRT_FLOAT) && ((ref) < REF_BIAS))ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEWirs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTORE || irs->o == IR_XSTORE(((&((&((GG_State *)((char *)(as->J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))(((uint32_t)(((kt)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))!(((IRType)((kt).irt & IRT_TYPE)) == IRT_NIL)((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_asm.c", 997, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~4u)!(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NIL)(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_STR) <= (uint32_t)(IRT_UDATA-IRT_STR)))(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))J->sizetrace((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))))!((!(((ir)->r) & 0x80)) || (((ir)->s) != 0))((((1u<> ((IRType)((ir->t).irt & IRT_TYPE))) & 1) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U8)ir->o == IR_EQ || ir->o == IR_NE(&as->ir[(ir->op1)])->o == IR_UREFC((&as->ir[(ir->op2)]))->o == IR_KGC(ir->o == IR_SLOAD && (ir->op2 & 0x01)) || ((!1) && ir->o == IR_HIOP) || ir->o == IR_PVAL(lnk)>0 && (MSize)(lnk)J->sizetraceMKfKfKfKfKfKfKfKfKfKFKK8K8KKKKlKKK[KeKtop-1)->it) == (~10u))!((((ctr->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_ARRAY) << 28) + (0))) || ((((ctr->info)) >> 28) == CT_STRUCT))ctype_checkctype_childcdata_getptrlj_cdata_newsetgcVccall_set_argsccall_classify_ctccall_struct_regccall_get_resultslj_carith.c(((o2)->it) == (~10u))mm == MM_le߃LLLLBLnLLcopyTVcarith_checkargctype_checkctype_childcdata_getptrlj_cdata_newsetgcVcarith_int64carith_ptrGROUPINPUTlj_clib.c%s.solib%s/* GNU ld script(((GCobj *)(uintptr_t)(ctf->name).gcptr32))->gch.gct == ~(~4u)ctype_checklj_clib_indexlj_cdata_newsetgcVclib_extsymlj_cparse.ctok < CTOK_FIRSTDECL%s at line %dtype parameterid == 0((((info)) >> 28) == CT_VOID)%s%s(((cp->L->top)->it) == (~4u))sz != 0cp->p != ((void *)0)cp->depth == 0||&&!=<<>>->jLLjLLjLLILjLLLgLgLgLgLgLgLgLgLULMLULULMLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLULL|LgLXLgLL|LgLgLgLgLgLLgLLgLgLgLgLgLgLgLgLgLgLgLgLLPL~LgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLgLLpLϭLLcLLLLoLLgLӱLL̴LLLLLLLLLFLڴLLL{LLvLvLvL4LvLvLvLvLvLvL-LvLLvLL&Lcpcparsercp_initcp_tok2strdPPqPP{P~PPPPPPPPnumberVintctype_childctype_checkcp_decl_multicp_decl_speccp_decl_asmcp_struct_namecp_decl_intern((((cinfo)) >> 28) == CT_STRUCT) || ((((cinfo)) >> 28) == CT_ENUM)((GCobj *)(uintptr_t)(ct->name).gcptr32) == ((void *)0)lj_lib.c(((L->top)->it) == (~11u))RLLLLLPLlj_gc_barrierbacksetgcVlj_lib_registercopyTVlib_create_tablelj_lib_checknumlj_lib_checkintlj_lib_checkbitlib_base.c(((L->base)->it) == (~8u))lj_lib.h(((L->top-1)->it) == (~8u))runningsuspendeddeadnormal=(load)too many nested functionsfunction: builtin#%d%s: %p(((L->top-1)->it) == (~4u))(((o)->it) == (~10u))_GLua 5.1kvcoroutine((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~6u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~4u))stoprestartcollectcountstepsetpause setstepmul((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~8u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(-(int32_t)((o)->it))-1]))->it) == (~4u))copyTVsetgcVFassertnilbooleanuserdatastringupvalthreadprotofunctiontracecdatatable numbertypeDnextEpairs@FipairsgetmetatableLsetmetatablegetfenvsetfenvFrawgetrawsetrawequalunpackselectHtonumbernilfalsetrueHtostringerrorEpcallxpcallloadfileload loadstringdofilegcinfocollectgarbagenewproxytostringprint_VERSIONBLLLYLLL[LJL*LLLL_LL!L)LLxL1LALbase-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~12u))%CabsfloorceilDsqrtlog10expsincostanasinacosatansinhcoshtanhfrexpmodfClogcܥL@deg9RFߑ?radEatan2powfmodEldexpCminmax-DT! @pihugerandom randomseedlLWLL(LLLLuLlj_cf_math_randomseedlj_cf_math_random-DT! @iW @0123456789ABCDEFA* EtobitbnotbswapFlshiftrshiftarshiftrolrorDbandborbxortohexNMML@L-+ #0lib_string.co < L->top(((L->top)->it) == (~4u))too many captures^$*+?.([%-gmatchgfind((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(2)-1]))->it) == (~4u))WM M M MWM MWM M M M M M M M M M M M M M M M MM M M M M M M M MWM MM MWMWMWM M M M M M M MM M4M MP M MM M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMM5MtMM5ClenDbyteDcharCsubCrepGreverselowerupperdumpfindmatchgmatchgsubformatMW!MM !MMMMMMM<MMluaopen_stringsetgcVnum2intfrmnum2uintfrmmeta_tostringcopyTV`l@ hlj_lib_pushcclj_cf_string_gmatch_aux\=foreachiforeachDgetnmaxninsertremoveconcatsort)M.MP#M(M,MP+Ma'M'McopyTVlj_gc_barrierbacknumberVnumsetgcVclosed filelib_io.c(((L->top-1)->it) == (~12u))(((L->top)->it) == (~12u))too many arguments%lf(iof->type & 3) == 2cannot close standard file(((L->top-2)->it) == (~4u))FILE*wfile (%p)file (closed)fulllinenosetcurendstdoutstderr((((L->top-3)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(((&fn->c.upvalue[0])->it) == (~12u))((((L->top-1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))d> closereadwriteflushseeksetvbuflines__gc __tostring__indexMI=M@Mm@M/ openpopentmpfileclosereadwriteflushinputoutputlinestype>M?M>MM =M executeremoverenametmpnamegetenvexitclockdatetimedifftime setlocaleIM\IM IMHMmHMHMGMOEMCMBMBMư>error loading module '%s' from file '%s': %sloop or previous error loading module '%s''package.loaders' must be a table'module' not called from a Lua function'package.preload' must be a table no field package.preload['%s']./?.lua;/usr/local/share/luajit-2.0.2/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.soloadersmodule '%s' not found:%s_NAME_M_PACKAGE_ no file '%s''package.%s' must be a string/LOADLIB: %s_LOADLIBluaopen_%sluaJIT_BC_%scpath no module '%s' in file '%s'preload__indexopeninit;;;;__gcLUA_NOENVLUA_PATHLUA_CPATH/ ; ? ! -configloadedloadlibsearchpathseeallmodulerequirelj_lib_pushccGPvWMOPVMZP4VMUMUMTMSMaPLMhPwJMlib_debug.c(((L->base)->it) == (~6u))lua_debug> cont =(debug command)external hookflnSu>%ssourceshort_srclastlinedefinedcurrentlinenupsisvarargnamenamewhatactivelinesfunccallcounttail return(((L->base+arg)->it) == (~8u))%hM3hM3hM3hM3hM3hM3hMFgM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM3hM-hM3hM3hM3hM3hM3hMgM3hMgM3hM3hM3hM3hM3hM3hMgM> getregistry getmetatable setmetatablegetfenvsetfenvgetinfogetlocalsetlocal getupvalue setupvalue upvalueid upvaluejoinsethookgethookdebug traceback$[MDiMhMhMhMyeMcMbMbMsbM-`M`M^M]Mn\M[MgetthreadhP PPPPcopyTVlj_cf_debug_getinfosetgcVfoldcsedcefwddsenarrowloopabcsinkfusemaxtrace maxrecord maxirconstmaxsidemaxsnaphotloophotexittryside instunroll loopunroll callunroll recunroll sizemcodemaxmcodeCMOVSSE2SSE3SSE4.1P4AMDK8ATOM(uintptr_t)(idx) < (pt)->sizekn(uintptr_t)(intptr_t)(idx) >= (uintptr_t)-(intptr_t)(pt)->sizekgclib_jit.cninslinknexitlinktypeop < BC__MAXstackslotsbytecodesgcconstsnconstschildrenlocffidaddr(((L->top-2)->it) == (~11u))LuaJIT 2.0.2jit.utiljit.optnonerootlooptail-recursionup-recursiondown-recursioninterpreter> onoffflushstatusattachosarchversion_numversion}M|M|MoMzM> funcinfofuncbcfunck funcuvname traceinfotraceirtracek tracesnaptracemc traceexitstub ircalladdrwMWwMuMtMUsMymMqMBpMwnMlMrlM>startiMexitstub_addr_lj_cf_jit_attachsetgcVlj_cf_jit_util_tracesnaplj_cf_jit_util_traceinfo:Q?QDQIQXQeQtQ Plj_cf_jit_util_funckcopyTVlj_cf_jit_util_funcbclj_cf_jit_util_funcinfojitopt_paramd8 @plj_opt_mem.cta != tbrefb->o == IR_AREF(((IRType)((taba->t).irt & IRT_TYPE)) == IRT_TAB) && (((IRType)((tabb->t).irt & IRT_TYPE)) == IRT_TAB)(refa->o==IR_HREF || refa->o==IR_HREFK || refa->o==IR_NEWREF) && (refb->o==IR_HREF || refb->o==IR_HREFK || refb->o==IR_NEWREF)ir->o != IR_TNEW || (((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE)) == IRT_NIL)(((((((&J->cur.ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(ir->op1)])))->o == IR_KGC", "lj_opt_mem.c", 192, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)itype2irt(tv) == ((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE))fwd_ahloadaa_ahrefaa_tablelj_crecord.c(len & (step-1)) == 0(((sval)->it) == (~12u))(((sval)->it) == (~4u))(((sval)->it) == (~10u))(((o)->it) == (~4u))(((((tr)) & (IRT_TYPE<<24)) == ((IRT_CDATA)<<24))) && cd->ctypeid == CTID_CTYPEID((((ct->info)) >> 28) == CT_ARRAY) || ((((ct->info)) >> 28) == CT_STRUCT)ctype_child(cts, cct)->size == 4(((&rd->argv[1])->it) == (~10u))(((&rd->argv[1])->it) == (~4u))((((fct->info)) >> 28) == CT_FIELD)(((&rd->argv[i])->it) == (~4u))(((&rd->argv[0])->it) == (~12u))(((&rd->argv[0])->it) == (~10u)) M٧M٧MMMMMMMMMMM^MMMMM>M>MMMMMMMMMMMMMMMMMMMMMMMMM(MMM M M MMMMMMMcMMMMMMMMMcMctype_checkctype_childrecff_cdata_indexargv2cdatacrec_constructorcrec_index_metacrec_ct_tvcconv_idxcrec_copycrec_call_argsrecff_cdata_arithrecff_clib_indexargv2ctypesetgcVrecff_ffi_abirecff_ffi_xoflj_crecord_tonumber%s%s: P>?456789:;<=  !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/expr.cexpr->size > 0bitset_expr_add_param /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/iterator.cit != ((void *)0)expr != ((void *)0)p_bitsets != ((void *)0)exconj->bitset_ids[b] < bitsets_sizep_bitsets[exconj->bitset_ids[b]] != ((void *)0)conj != ((void *)0)pos % (BITSET_PAGE_DATA_SIZE * 8) == 0conj->page_first_pos <= posconj->pages[b]->first_pos >= key.first_posp1 != ((void *)0) && p2 != ((void *)0)dst != ((void *)0)conj->size > 0conj->page_first_pos != (18446744073709551615UL)conj->pages[b]->first_pos == conj->page_first_pospos + PAGE_BIT <= it->conjs[c].page_first_posbitset_iterator_nextbitset_iterator_rewindbitset_iterator_next_pagebitset_iterator_first_pagebitset_page_orbitset_iterator_conj_prepare_pagebitset_page_andbitset_page_nandbitset_iterator_conj_cmpbitset_iterator_conj_rewindbitset_iterator_init /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/index.cindex != ((void *)0)index->capacity > 0key != ((void *)0)rc >= 0it != ((void *)0)bitset_index_init_iteratorbitset_index_contains_valuebitset_index_remove_valuebitset_index_insertbitset_index_destroybitset_index_create/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/bitset.cpage->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * 8bitset->cardinality > 0page->cardinality > 0bitset_cardinality(bitset) == cardinality_checkbitset_infobitset_clearbitset_setbitset_test/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/page.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0bitset_pages_removebitset_pages_insertbitset_pages_prevbitset_pages_nextbitset_page_orbitset_page_nandbitset_page_and;^ $^l%^%X_'8`(X`U(x`(`)` *a* a~+@a-han/a_2a3a3a4bp48b5XbW6xb7b8b6:b;c<0c =Pc>xc>cJ?_|?8_?x_?_@_D@_j@_@`@cRAcAdA dA@dB`dg}ؤ08UX8xeإ8Xx`ȦaR(PtpN_1(bPp7:ب:(Hؠh Wȩ@`ЪZB8X.x/](vPx ج x@`<ȭ@`r^ ` (w H h #nЯ@`ASȰA@`ȱ"'0(P(p>)c** ++ +@,`O,u,,,n-- 0.@.`.S02ش23 W3H3h)4x47еQ;<@4`WBȶk(6PpRط 8"8XYx%ظ7I8Xع6di@-J./ 0@1`12e3334 y4@4`4445z55 6@46`M6l666478(8H9h9:::p::z;8;X;x;<<=>(>PE?p??]@AbA;B0BPCCpgCpD"EEF H@!H`HIJ(J;LNL MHNh!OnOOQQbR8RXS(TTAXvXX(XHXhVY[[\_a@b`ckciijHlp9m}mNnno(dpPdqxWrKs5tuv@vh3xIyoz{|0}X~F~(l~~~~ @h Hwh~Љz8͊Xxa‹?~8X; @h9Pm @bh̜*V8Xx֟,X8ҠXx>dʡ8CX}x[(H%hg )0NPЫp?@8hfn0ڸPMp0.Pxz(A Z@0htR(PJpuGQ8X@Y8Xw.L82`@8XxWP8`OU*(P0x`~F89X?x{ ( H# h< V @K` GQg!@"hI##$>$o$$(e%H&p&&'V' )})0)PZpA[\$]F]r]]8]X]x]^B^|^^^8B_XI`adegg0+hPQhphhh.irii0iPip(?>H>h?@ACDE(GHKh LL3LUL`LL(LH MhZMMN;NXNO(PHQhSTNTVV#W(YP[xb[[_n_a` `@ a` 6a a Pc c ^e!f(!gH![hp!Si! j!j!jk!l"l0"smP"/np"n"o"Qp"tp"p#q0#TqP#rp#is#s# t#t#ht$zt8$tX$tx$t$u$u$v$w%sx8%x`%Py%z%!{%T|%{|&|(&|H&|h&|& }&}&}&^~'n('H'h'''''(0((GH(^h(u(((()(()gH)h))V),)V)̈́*(*H*{h*M**>**֍+%0+pP+•p+++(++,8,ݙ`,,,b,5,Ʃ-G(-٪H-Zh---$--k.(.H.Hh...@../e(/H/h/1/϶/k//0p(0^H0Sh060%0001(1,H1dh111 1D1$2(29H2|h22222Y3(3LH3|h333l33 4]84X48x444453 5S@5`55/5556 6y@6;h6@66'6q67_(7H7h7F74777"808LP8x8"8889s 9@9`9<999f9:(:H::h::::; ;e@;h;X;w;;;<0<P<p<<<l<<'=0=P=.p=I==7=>(>GP>7p> > > > > ?j H? p?f ?-?d?@@@p@@@@A0APApAA"A"A#BK$@Br$`B$B0%B%B'CF( Cy(@CA*pC*C--C.C.C.D/8D/XDe0xD1D1D]2Dp2D3E'38E3XE3xE3E3E3E3E:4F48F5XF5Fs6F6F7F: G:@G;pGg;G;G;G;G<H?HH`@hH@HMAHBHBHgCID8IlE`IEIEIFIGI#L JL@JL`J~PJPJRJ,TKyT0KTPKTpKUKUK0VKVL"YHL\YhLYLYL[LR[M[0M \XM\MH]M<^MaNGb0N^g`NgNiNkN@mO-n@OnhOpOWpO3qOrPEs(PsHPtpPbtPtPvPxQy@QyhQzQd{Q{Q̀R݀0R@XRRHRJReS(S[PSpSS#S3STNJ(TIPTxTTʌTTUU~0UǑ`UU U`UpUV(VXV@VVPVCW0WPWopWWWʪW*Xc0X}XXxXjX)X5XYv@YhY^YYղYY5ZW8Z}XZZZZjZ [˸@[:`[[Y[n[N[$ \GH\x\\\\]g ]@]տ`]]]\]]Z ^H^h^?^ ^^_(_P_=x_,__;_ `@`h`.``K`a8a`agRggh0hPh<phhhhZi(i2Pi]piiiiqj8j`jjjn j j k @k hk k=kk"lA0lXll5lJlOmR8mhmm$mymmn8n`nnn"n.#o%8o{2ho2o2o 3os9p9(p;Xp=pm?p?pLqM(qdMPqMpqOqOq Pq4QrQ0rQPrSxrSrSrSr$TrTsW8s6WXsjWxsWsWsHXsxXsX t[Pt_xtkt]ktltluxm@u`qpuququ#ruMrurvds@vthvcuvuv9vv xwx(wRyHw {hw|w>}wwxJ(xXxxxxxċ yRPyJxyyyƗyz8zhzzzz {)@{h{{ {){|8| |G|||0}`}}K}}~[(~P~x~~~~V(fHh3Hyp*P؀ (7H-pW!8XI؂0+XUЃI}0PpA؄7V (f Hv h $ / Ѕ: E P 0[ Pf pq |  І   0X"Ї@P``QRSЈSSS0.TP@TpwTUV5VqV0VP%X`bbЊbbAd@kpl0mn0oo@phmqqrss0tPbtpbu-vvwy8 zXzxz{{0|;| T|@f|`||}+}8}_} z}@}`}~P~~~ l@`!A؀ @`H؂/ j@̓`$Al @$`bД `@h+ȕ>(HhaÎ'Жgяϐ0P`p4oЗ0PpʔMЕ9~ ؖ@`șX Hh]Ț؜8o`YЛ d@ǡ`JМC@hgН5d@ h۩ОU8 H֫hҬBПۯ ^Px³cР  @b`}ȡ(IXWТ|H8p8((X`5ȤXi01`<ȥ38CXpK P?ȧ5@pȨ X( X.xL ( H pB , P ت (dh^8hGl2l!0'`6@;=H>>@?hDAKCyqw@w8PwXwxxCyȯ{o{ |@}h,~S H0p@ph]ڐ0XjгՔ (Pxԙȴ(8 ޞPxɠN8`У9<eP H8hȧ~ȷҨR(&HxuO֭C@` 8 @`\Ⱥ^18X4Wл H^xȼ' Pp5Ƚ\R@hqm8 h?  /8`28nh&S(0X]B((PKp,'0y`#]0` PQBS!T8bhb%cHccc2d8sh6tRtt x/z8VzXpzxzz{p{{}@}`}V~~~*w8XxVÔR@`ۛ!A* vP=3 0mX-A 0Pxe@` A .8 XQxH?88`E@h*@hi-Hp(PPx x@hYiv0Pp Xm8X*xv0-P@Mu0PpG{F8 `    (Pl>Ea8`x PHshf  7!e"8"X"x####$ Y$@d$`$$%%&;&(&P'x''(/),*@*h*[+,,R/0/X/x700081101P2xP4678 ,9H79hO;,<<o==8G>`??'@b@B C@iC`CEEkFG87H`IJ-J=J/K8L@pLhL MP_PP0PPQp@QTHTT U0VXV]WWYZ(ZP@\x\k]^s_Zb8c`1ddddpff8fXaggiqjjlHoxppqjr sP@ttvwx@'|p}}0W0XցxM P)x08hE|R@pWs8,`'l.(H(h`;8X/xX:8Xx @(0PppBGT8!Xx%      8 XZxT((HpzG @``o8NXXxi  D!8!X"xf"" $L%%z&8!'X*x:995;;q<=8,>X> ?????0?P?p@@?@[@|@@0@PApBC0DDDD(E@EX0EpzRx *zRx lAC P <*1AC l \<&AC a |!7AC 2 "=AC x @&AC a F=AC x d&AC a j=AC x <&AC a \xKAC F |RAC M hAC c zPLRx:A $$%SAC   )AC d $AC  DoAC  $62 SAC G& @AC  $SAC G AC  BAC  hAC c $4]AC ES \0AC  |8AC 3 $PRSAC K $ dSAC E $4vSAC Gj >UAC P 4s$AC  Tw[AC V $SAC  RAC W N[AC V $$SAC Ez j=AC x $&AC a DAC R d8AC s 2AC m AC Z AC L AC M AC X $eAC ` DlAC g d$BAC Ex F*AC e PAC T I7AC 2 $,`SAC G $T&SAC G $|9SAC G $LSAC G CMAC H pJAC E $ _SAC G OKAC F  zAC  ,AC  LSAC N lUAC P $rSAC G <AC w 5AC p MAC H  MAC H 4 "MAC H T OMAC H t |MAC H  AC   5AC p  4AC  $ AC E  0LAC G $\SAC G $2SAC G  AC  $SAC   AC I $< *SAC % $d SAC  $  SAC  $ ! SAC G  AC   f%AC `  k.AC i  yAC P  pQAC L $| J SAC G \ {-AC h $ w^ SAC Em  `.AC i  nAC P  AC P  !AC  $ 7AC 2 D AC  $ nn SAC G $  SAC G $  SAC G  HAC C $D  SAC G $ QAC L $  SAC E{ l> &AC a $ D  SAC G .AC i  AC P /EAC @  7AC 2 4 RAC M T hAC c $ U%!SAC   $ R}!SAC x pAC k )AC d 8AC s $9AC t $1!SAC  $&H,!SAC C FAC Y D.AC i $R.AC E$ $X.AC E$ $$^AC A} $L AC E $tjAC E` $$AC E QAC L  qAC l \AC  $$AC  DIAC D $dAC E SAC  hAC c aCAC ~ $AC E @ AC J 4/ %AC ` $4 F!SAC G  |&!MAC H T!&AC a Z! AC E D!4AC o X! AC E $B!AC E  D.".AC i d<"AC R $4"e!SAC G$"w!SAC G<#XAC S t#AC  $\$!SAC G $&!SAC G $'!SAC G $x)!SAC Ez )'AC b )!AC  *AC  ,4AC o 4,(AC c T,AC  t}-kAC f -lAC g .AC z $s.pAC Ef .AC  /AC  <0MAC H \C1AC  $1!SAC E v7eAC ` ;AC  n=AC  "?!AC \ $#?gAC b Dj?AC  d%@AC  @pAC k 0A)AC d 9AAC Z 8APAC K hAeAC ` $AYAC T DAYAC T dBZAC U YB;AC v tBGAC B B>AC y B>AC y BAC  $%SAC = & 9AC t &%-AC h $T%2DM%SAC G8 4'NAC  $%$`%SAC Ew |'~=AC x '&AC a 'y.AC i 'AC P 'dAC Q (Z9AC t <(sAC  \(.AC i $&!p%SAC G (ƍFAC A (AC  $,'Pl%SAC Eb $T'%SAC G $|'S%SAC G \)!AC \ |)AC L )%AC ` $( %SAC G )"AC ] */AC j $*UAC P D*aAC \ $(3%SAC E $(%SAC G $(&SAC G $$)et&SAC Ej $L)<&SAC E ,+2AC - L+,PAC K $)\`&SAC  +<AC  + AC F +AC  $<*̛mt&SAC h ,AC  $*=&SAC x d,)AC d , AC F ,AC L ,7AC 2 $,+&SAC G $T+V&SAC G $|+&SAC G \-ɥJAC E |-KAC F -AC  -GAC E} -ʦRAC M -hAC c $d,D%'SAC   $,A}!'SAC x l.)AC d .AC L .%AC ` $--'SAC G .8pAC k /)AC d $|-@'SAC G \/J/AC j |/YYAC T /AC  /fAC a /V9AC t /o^AC Y $d.TS'SAC O $.٭Ib'SAC D $.Wq'SAC R $.)F}'SAC A $/G'SAC  $,/ 'SAC   1AC Z ,1AC Z $/'SAC  $/'SAC  $/'SAC  1uAC p 1iAC | $L0ʸ'SAC  ,2FAC A L2^AC Y l2TAC O 2AC  2ջ9AC t 2TAC O 2"AC  $ 3fAC E\ 43QAC L T3DAC  t3cAC ^ $t<?8)SAC H+ $<Ou *SAC p |>;AC 6 >uAC p $= *SAC H $,=z6*SAC   ? AC F ,?-AC h $=)D*SAC E t?bAC ] ?:AC V =5V*SAC ?1VAC Q $<>ge*SAC H $d>t*SAC H $>p*SAC G l@bAC ] @T,AC g @`AC  $@AC Ew @SAC I $\?A *SAC G g,SAC  dK@?7AC 2 KWA.AC i $KeAAC E $KBBAC E $KC$AC E LDqAC l 7AC r $uUh4SAC G $u4SAC G $vֹ4SAC G wFAC X $\vC4SAC E $v4SAC G $v5SAC G  xAC X $vj5SAC E` $w05SAC E xpAC X $dwmH5SAC E DyAC X $wM]5SAC EC yAC X $wMp5SAC EC $x5SAC H ycAC ^ z)AC d 07SAC 9 ̌- AC  $0AC E $1AC E $3@7SAC E $5kO7SAC f d6uAC p 6|AC w ̍7?AC z 47:AC u  N71AC l ,_7oAC j L7AC  $8_7SAC   9$AC _ 9$AC _ Ԏ9<AC w 09NAC I ^9AC  4:qAC l TE;5AC p tZ;,1AC '1 flcAC ^ $ln7SAC H ܏"nBAC } Dn"AC ] Fn,AC g <Rn4AC o \hnAC Q |^nAC I Ln2AC m ^nAC Q ܐTn.AC i bn:AC u |n&AC a <n1AC l \noAC j $|nAC E $o7SAC G QAC L oAC  ԨDAC  AC  ]SAC N 4WAC R TAC S $ :SAC  =2AC m OAC  ܩXAC S :AC u EAC @ <,?AC z \KAC { |HAC C AC Z AC Z ܪAC  AC  6AC q $.J:SAC E@ $PzL:SAC Ep $ԩ:SAC E $cAC E ܫTAC  ZAC U AC  $y:SAC Hl $;SAC E lAC | $<;SAC H $il;SAC H\ $D;SAC H $XAC  D,AC W d(PAC K XpAC k $;SAC  $:;SAC G OAC J  AC Z 4AC Z T:AC u t$hAC c $lQAC GE $mAC Ec AAC | ~AC y $YBAC } D|AC Q dr!AC \ sGAC B FAC A į?AC z AC M AC M $;AC v DAC Q dAC X YAC T  &AC a İSAC N CAC  :AC 5 $*AC e DAC  d5AC p AC Z #AC ^ ıAC   AC F AC  $AC  D-AC P d"LAC G N?AC z mAC P IJbaAC \ AC  $AC { $xx AC y @0+AC f  K0AC X ,H0AC z L1AC  lE2TAC O y3AC  t4AC  ̿T5JAC E ~5AC   7AC  ,7&AC a $ą7AC 9 "?lAC g n?AC  $A@V;AC v YVAC  VYAC T  VpAC k ,NWAC   L>XAAC | l_XAC U YXAC U SX AC F >X AC F )X AC F  X AC F ,W!AC \ LXAC R lWAC R WAC R WAC R WAC R W AC F  WYAC T ,W!AC \ LW?AC z lX"AC ] X(AC c !XAC  XAC  \Z*AC e  fZwAC r ,ZAC R LZ8AC s lZ_AC Z  [AC  [aAC \ [AC  n_nAC i $ _*AC H 4bOAC J TcKAC F tdRAC M JjAC  $,kWAC y ,I+AC f LTAC  l-AC h  IAC s$$P=SAC  $ AC H EAC @ \AC W <PAC K \AC  |AC U $k'=SAC Ea AC P !AC \ <AC w $AC X D AC [ d HAC C 33AC n FaAC \ PAC K  AC [ )AC d $DAC  DmAC h $ܜ16=SAC  ˢAC  AC  -JAC E WJAC E  JAC E ,AC  L/OAC J l^OAC J IAC D AC  uAC p $d٨E=SAC  AC  4 sAC n T]AC  $tvAC El B`AC [ AC  $TS=SAC  ְ>AC y $wAC r DKAC   d9oAC j LAC G AC  `AC  $\b=SAC   vAC  ,AC } LSAC V lNAC  $ʹn=SAC  $,*}=SAC   AC  $t׼4=SAC / $AC  DyAC  $ܡ=SAC  $=SAC  AC Z AC Z !AC \ <AC w 4 AC [ ̢=SAC tAC  QAC L M6AC q cQAC L WAC R dAC _ 4AC  TAC  t-AC  $ =SAC  $4e=SAC ` $\=SAC   GYAC T ,CAC ~ $Ĥt=SAC o tAC  AC  oAC K hsAC n KAC F , AC M $DAC Cw $lGAC Iy $9AC I ,AC M $]7AC Co $l>AC T% $<AC I ,dNAC M -AC Ec $#AC K $VAC IH AC  ,$RLC m T A TAC  txLC F $oAC T ,hAC MV $IAC I $AC G $<wAC I d'AC b $ AC Pl $c=AC Cu $xAC C| $AC C  $}AC ED3AC n ,d1OC X AC E)lAC CuAC H)AC $AC M<AC I\JrAC |iAC AC EbAC IAC H}AC pAC J<AC \AC C|RAC IAC R @ AC ) AC  AC ?AC Eu <AC H\AC  $|@_AC PJ $wtAC Gh {AC v $AC G ,AC M D_#AC ^ ,dbrOC W G A KAC F +AC Ea 2AC Eh  AC F $HAC Lw ,<AC M lAC  AC  gVAC Q $QAC T8 _AC Z jAC e $4OaAC IS $\AC C UAC P 9-AC h $FAC I $AC T ,AC Pz DyhC L dT]AC X ,AC Ms  AC [ $UAC GI ,6AC I( $, MAC CE TA CAC ~ td AC X $a FAC Lu $ AC G $ TAC P , @ AC M ,< YAC MG l 8AC s $ sAC P^ 7 AC Z 8 AC  48BPC EW I HA $,BjAC G^ $TdAC LS $|AC E 0AC  ,AC M ,dAC X ,$CAC X& ,TAC M $mAC Ce ,;AC X ,AC X , AC Mn $< AC I $dAC L `DAC ?  CAC ~ , AC M ,S!AC Xd ,"AC  L#bAC ] $lW#oAC Ee #LLC Y ,#ajC S ^ A ,# AC M $%7AC I) $<&AC C $d'AC Tx $'(AC T $(AC E $)AC E} ,*AC M 4.AC K $T.cAC PN ,|.XAC PC $1AC E ,1AC M $b2AC I  ,U3%AC E[ $LZ3AC C t4-]C K 44eC J $$4gAC E] c4AC K $S4AC T $$5AC G $L6AC Cz $t6AC C $`7AC S 7'AC b ,8AC M 8AC  4=9)AC d ,TF9IkC EBBA $_<@AC T' w>AC A ]>SAC N >AC K  >AC N ,s>AC J ,Lb>XAC X; ,|@RAC M@ $BAC E ,2CfAC PQ ,hHAC M 4+P:AC u THPAC V tCPAC  QAC ~ $ZRAC P S AC E ,R`HC L F A $,S9AC Lh $T+SAC I  |TAC M $TAC C $TAC E $YU AC E $=VAC C $<WAC Ez $d.XAC E $XCAC Pn $XcAC LR YAC O X%AC ` X;AC v <Y"AC ] \Y&AC a $|YAC Pm $wYAC P $Z8AC P#  \AC  $r\AC L $<\AC P d]oAC j $]AC Lu $0^AC P ^AC P $^AC P $N_AC P $D_#AC T  ,l`AC M $aaAC L a2AC m a:AC u bAC V $ bUAC P D?b+`C F dJbCxC F mb-bC F $zbAC P $bAC C $cIAC Pt $cAC J $D2dkAC I] lue1fC F eIAC D $eAC P $SfAC I $%hAC Eu $$|hAC C $LhAC C $tsirAC Cj $jAC E $ktAC If $lAC E $CmAC C $<mAC E $dnAC C $SokAC Ea $prAC Cj $pAC G $cqAC P ,,q1AC X $\rAC T $msgAC E] $tAC I $`vaAC TH $wgAC IY $$xAC Tg $L0{"AC E $t*|(AC I *}tAC o ,~}@AC X# $~bAC CZ $~AC P <_AC   $\PAC E $AC L AC T AC L $VAC EL $mAC Ce <X[C y \+AC J$|rAC P] $8 AC I $AC C $AC C $aAC IS ,DAC Mw $t AC T AAC Ew ӕCAC Ey $_AC IQ 8%AC ` <$=bFC CF F FBA d_AC  $ߖ6AC Cn AC N ;AC v OAC J  *.AC i ,84AC o LL.AC i lZKC K UHjC Y }1SC Y GC H 0GC Y  nAC i $, AC C T AC t PAC K , ĘwAC Me $  LAC I~  /AC R  &DAC  , J,AC g $L VAC P t ڙ+TC N $ )AC LX  @AC , AC X $ ǚAC E $4 YpAC Gd $\ AC C  U0WC T $ eAC I $ <AC Ex  9AC t $ AC T $< ZAC EP $d AC T , D;AC X $ ONAC L} $ uAC Pt $ ֢\AC LK 4  AC U $T  AC P $| AC P $ !AC C , AC X , jAC X ,,?AC X ,\oAC M] Q:AC Ep k)AC E$tUAC EK 6AC El $VAC PA <AC P $\ڪAC G $AC Tn $=AC Cu ,AC M $ݳiAC PT ,,AC Pq ,\t AC M  AC K 8AC En $HAC Lw ,3hAC PS $$kYAC IK ,LAC X ,|$1AC M $%AC T (AC E^ ,I AC P4 $$AAC Lp $LEAC Lt t _AC Z $KAC J $AC _ $gAC PR $#)AC I $,$AC Jw TAC L $tsAC W 7AC K ' AC [ 'AC L ,AC g $ZAC U <`AC ~ \3AC Ei |4AC *AC _AC Z 3UAC P h0eC F $xAC Iq ,DAC M $tLGAC G; ,k4 AC M" o>AC y $$AC C $bAC EX $<AC T| ,d0AC M SAC N &AC a !JAC E K*AC e $UPAC L $<}AC T $dAC P ,EAC M3 5AC p AC  ,YAC M ,AC  LAC  lAC  AC  $#AC C ,AC P - AC  $$ AC G ,L AC M $||AC Ct $AC I  , AC X KAC F $AC E ,DAC M| $tAC E $BAC E8 AC  5AC E$*AC T ,, AC M ,\r*AC M ,-]AC X $i.AC I ,<0AC M ,2AC Xh ,49 AC M $d:tAC Ej ,-;AC X =\AC W L=MC K ,I=AC M ,,@{AC Mi L\CBOC M F UBBBBA G'AC b GGAC B ,G$AC M 4JJC MBBBBA ,TPAC M ,b`<AC X $nbEAC C= $cIAC I{ c-AC h $$cAC E $L+dFAC Lu $tIdxAC Gl $dAC P $=eAC P ,e'AC M , flAC MZ L &hAC K l h(AC E^ $ hQAC GE  Gh)AC d  Ph+AC Ea $ [hAC G| !hAC S , $|(0AC T $(AC P $(5AC G $(ΊAC G $)AC I zPRxG $8>9P)V $)eAC TL $)AC T ) AC F * AC F 4* AC F T*]EC Y t* AC H *7LC Y $*AC E $*OAC P $+3AC Lb $,+%<AC Ct T+9TAC E,t+m`AC MN ,+8 AC M& +-AC h +3AC n $,;AC Cs $<,FAC T- ,d,SAC MA $,AC I  $, vAC El ,,heAC MS $-AC C $<-AC Cx $d-hAC K  $-[AC I $-FAC C~ $-AC I ,.#AC M 4.(AC E^ T.(AC E^ t.DAC  $.AC G $.AC G $.eAC I $ /AC I $4/ AC P \/wSSC { |/{SC c /QSC y /6C Y $/fAC E\ 03AC n $0( AC F D0AC T d0 AC M 0=AC x 0CAC ~ 0>)AC d 0GAC W 1C AC H $10'AC b D17AC V d12<AC w 1N.AC i 1\.AC i 1j>AC y 12AC m 20AC k $2TAC O D2fAC a d2$+AC f 2/$AC _ 23AC V 2.KAC F 2Y AC [ 3YWAC R $3@AC { D3AC  d3jkAC f 3+AC f 3BAC } 3'AC b 3'AC b 4)AC d $4.AC i D4;AC v d4"cAC ^ 4eUC F 4dAC V 4_AC X 4\AC X 5Y+AC f $5dvAC q D5AC  d5]AC z $5AC G 5FAC E| $5AC E $5DAC E $6jAC E` D6@AC Ev $d6_AC EU 6OlAC g 6kAC f 6qAC l 67AC z  7_AC Z ,7Y\C Y L7T\C Y l7Bm\C Y 7b\C Y 7b\C Y $7dAC EZ 7O@JC Y 8oj\C Y 48C Y T8KfC Y t8FJC Y 8`AC [ 8(tJC Y 8|;JC Y 8QAC L 9;OC Y 49AC  T9AC  t9/ AC [ 9/#AC ^ $92AC Ey $9AC Ey :iAC d $:1EAC @ D:VZUC @ d:?AC z :AC  :LAC G $:EAC E $:AC E ,;`VnC L V A $D;gAC E] l;AC  ;-ZAC U ;g(AC c ;o>AC y ;AC  $ <AC E $4<?AC Ln $\<AC E $<AC E $<vSAC EI <IAC E $<AC G $=YAC EO D=gAC b d=cAC ^ =_AC ~ $=TAC EJ $=bAC EX $=(AC E >AC  $<>#>AC L- $d>9AC L $>VAC EL >6AC El >HAC E~ > PAC K ?= /dC F ,4?L YTC t L A $d?u OAC EE $? AC E ? 2AC Eh ?# &OC R $?) TAC EJ $@U AC E $D@ `AC EV l@H >AC y $@f AC E @! AC T @ pAC k $@j \AC ER $A =AC G1 ,DAAC Xf $tAAC L ,AuAC X $AAC E $AAC G $BAC L DB]AC X dBBAC } B5AC p $BAC T B AC [ ,BDJC m F A ,CAC M ,LCUAC X8 ,|CAC P C_AC  $CAC E $CAC C D lAC g ,ibAC ] ,\MiUAC MC $Mm2AC E( Mn%AC E[ ,MnEAC X( NoAC | ,$N*p:AC M( ,TN4tAC Mn ,NzAC M ,NAC [ ,Nx[AC MI $OAC C $AC Et $\AC E{ $]AC P $D]AC T ,l]rAC XU $]bAC CZ $]AC T ,]/AC X $^=AC I/ ,D^ AC X t^ 1AC l $^ AC E ,^u KC G I A ^e'AC E] , _lVAC X9 $<_AC P $d_ AC Tn $_iAC P $_ZAC PE $_ AC P $`+AC P ,,`AC X ,\`JAC Xc $`AC P $`'AC I $`AC T ,a!AC X $4a$AC T  $\aXAC T? $a SAC P~ $aJ XAC T? ,az!AC X $b #~AC Te ,,bv#AC X ,\b@$AC X ,b$AC X ,b'AC X ,b+(AC M ,c(tAC XW ,Lc#.AC M $|c/-AC T $c0AC K ,c2AC M $cH5AC G $$d5OAC L~ $Ld5AC P td7IAC E $d7xAC Gl d#8BAC Ex $dE8AC G $e8jAC SR $,e9AC J ,Te9RAC M@ $e<AC K $e=oAC Ee $e=AC P  $e@hAC G\ ,$fBE AC M3 ,Tf%L AC M ,fWAC M ,fX1AC Pr1 $fXAC G , gYAC MG AC y i4\QC F jpzAC u $AC y yXAC P HAC Pp $܃HLAC G@ $I8AC Lg $,IsAC N` $TLFAC Lu |8LeAC C}L:AC Ep $LbAC EX $LSAC CK $ LLAC L{ 4 MHAC E~ THMAC Z $tHMgAC PR $MIAC G= $ąONAC K> $Q~AC Pi ,$RAC Pv $DSAC Tl lS AC F ,SAC X $UAC P $dVvAC Pa $ VAC C $4WWUAC CM $\WAC Ey $WAC T $vXAC C $ԇXAC T GY;AC Eq $bYPAC IB D[jAC e d[KaC Y $\AC P ,n\AC P  $܈]]AC G $]AC L| ,,[^RAC X5 $\}_zAC Cr $_AC G $`AC P ԉKa*AC E` UaAC K $EaAC G $<b AC L $db8AC Lg $c8AC Lg $caAC LP ,܊Ic AC P $ #fLAC EB 4Gf/AC Ee TVfFAC E| t|f>AC Et fAC Z ,fAC M :iFAC E| $`iwAC Em $,iJAC E@ $TiAC C $|jAC C $?kAC G $̌kuAC Cm ,kAC X $$wmAC P $LPneAC PP $tn[AC IM oJAC E $oAC T $p|AC Ct $ qAC C $4[rAC G $\u'AC G $vAC C $vPAC EF ԎvAC K vAC K $vAC E <PxIAC D \yx>AC y $|xjAC Cb xKAC F $ďyAC T zAC   {9hC L <,{SC P F R ,lE}jAC MX $AC E Đ+AC Ea ,$AC M ,AC M ,DBAC M ,t:AC M( ,AC X ,ԑ,AC X ,˅AC X ,4v<AC M* ,d]AC MK ,gAC MU ĒiAC d $/.AC C&  @AC | $,AC P $TAC P |AC  ,VAC P ,̓lAC MZ />AC y $M]AC TD ,DsAC [S $tŧ AC S ,AC M ,̔ vAC XY ,P AC M ,, AC P ,\AC M , wAC XZ $g>AC Lm }7AC Em ,7AC X ,4AC X ,d 6AC M$ $AC C $zAC Li $ AC E $ AC C $4qJAC Ly $\YAC PD `AC [ ZAC U ė>AC  FAC A ?DAC  $$dAC H LAC  lAAC < AC  ZAC  $̘AC H DAC ? $AC A <JAC E \EAC ~ |'AC b )AC d AC  ܙ!YAC T ZrAC m >AC y <AC W \AC  |DAAC | pt4AC o ԚAC  DAC  AC  4JAC E TwAC r tGAC  4AC o  AC  ԛAC  o AC  \DAC ? $a >SAC E \_ AC } | AC  U PAC K AC z ܜAC  :AC u AC  <` AC [ \`uAC p |EAC @ $]AC ES $SAC = )AC   KAC F ,WAC R L$AC  $c!>SAC  $ dY/>SAC  $4d=>SAC  AAC < AC M $@AC { DEAC @ dAAC | $dL>SAC E $$eW[>SAC EM $Lej>SAC E AC  AC J <AC U \IAC D | AC E =AC x 4AC o ܠ 4AC o  lAC g i oAC j < lAC g \!GAC B |+!{AC v !`AC [ !hAC c ܡ"?AC : -#?AC : L$AC  <$AC  \:%AC  |%AC  Z)`AC [ 7AC  ܢ18DAC ? U9AC } 9AC  <Q:6AC 1 \g;AC } $|;TAC AN $;AC A $̣Y<AC A < AC H <AC J 4<AC K T<AC N t{<AC S s<AC R j<AC AV ԤfAC  ԥ>AC  $X?Jf@X?4?L?d?|??!D \ /ay ,!} }bN-%CO  VM E\cxL:w       h@i>m5!M5Y(1I$1 ? : Gp a2%[O]>] 8OVk)rbV:dIb3!,BQgvI<dyO Dsv P:6m)K~K~$R&3i8?- E\cx   J:;&i9? Dsv'WW #N/cK~OK~K~K~NRO>QGP1Np }bNiAi^ g*NbNt CZav 7NUjL:w       i>m5Xn!!08 bN!0# }bN2ERO 5SBu BY`u7 -DK`iAiAX/u bNj3f3!n;m}cN!MbN79\cf,36 -DK`L:w       i>m5 DsvXn!  FMP! )   K{> #!Y=,.!=!8e`R$BR'm4$ vOb[vy)x  }bN7^'JMI9A3$}}bN # 1T' L 1 %e $ BY`u - - I   . t]}Z < h  :E9  n 1}bN#-_ E. MrI@~}}bN+O9#' r}}bN+OA,=Xp4bu'}}bNcN 1/5 #v}}bN+O . ~O g "@C m i L t9z}  . 8 L:w        DsvJgj̄BXC̄CGXHHLXMMhȔNPhȔQRhȔSTȔWYȔ\0^Ȕa0bȔf0gȔj0kȔn0oȔq0rȔ________׀___ф___Ј_܋x_ތÎ___Ӑ_ߓ_˔}cN5#}}bN+O PcN-";  }bNFUp(wbNqTq zXy|8?B>EHE.Qsu ee}}bN+O "))$[^ R ` ` `}?7|?5z} % RS !SiY w E\cx     u3i  7]`o "Q  $a  o &q &"&!7!?!?! eHGhk v1)7mg`  aOA0s {}bN+ bN.9.\>}aOO<w.a!=p!Pi ?toabNMSziSzi)NB&'}bN  Zn E\cx=c  E\cx E\cx`HK{~ ( D I %*gbTbN - %  T6"* /  ,  -a41^1}}bN+O!>8}bN #`@LbN!qbNGbN;BE rD4z~cN{A,3l,5}}bNcN t-"\Z }bN);}ip}bNOVk    e <?<?  -#5}aO9)W# }}bNaOE3& }}bNaO=*"E" }}bNaO) aO-#"z}aO-#"@}aO1$"H}aO =,!V D$}bNgnq ( 7R2#z} n = *  /= " 2MP 6  r & # ,{~ # #  1 +  j ( g}    r r     s=AAAA)B|D=At> `+A ]N@s0@@so@أ@X'@ ` BsPAxA oAooAKsP@s+A+A+A+A+A+A+A,A,A&,A6,AF,AV,Af,Av,A,A,A,A,A,A,A,A,A-A-A&-A6-AF-AV-Af-Av-A-A-A-A-A-A-A-A-A.A.A&.A6.AF.AV.Af.Av.A.A.A.A.A.A.A.A.A/A/A&/A6/AF/AV/Af/Av/A/A/A/A/A/A/A/A/A0A0A&0A60AF0AV0Af0Av0A0A0A0A0A0A0A0A0A1A1A&1A61AF1AV1Af1Av1A1A1A1A1A1A1A1A1A2A2A&2A62AF2AV2Af2Av2A2A2A2A2A2A2A2A2A3A3A&3A63AF3AV3Af3Av3A3A3A3A3A3A3A3A3A4A4A&4A64AF4AV4Af4Av4A4A4A4A4A4A4A4A4A5A5A&5A65AF5AV5Af5Av5A5A5A5A5A5A5A5A5A6A6A&6A66AF6AV6Af6Av6A6A6A6A6A6A6A6A6A7A7A&7A67AF7AV7Af7Av7A7A7A7A7A7A7A7A7A8A8A&8A68AF8AV8Af8Av8A8A8A8A8A8A8A8A8A9A9A&9A69AF9AV9Af9Av9A9A9A9A9A9A9A9A9A:A:A&:A6:AF:AV:Af:Av:A:A:A:A:A:A:A:A:A;A;A&;A6;AF;AV;Af;Av;A;A;A;A;A;A;A;A;AOMOdOrO}OOOOOOȉO։OOOOOO!O,O:OEOSO^OlOwOOOOOOOʊOӊOOO(O1O=OFORO[OgOpO|OOOOOOOċOЋOًOOOOOOWOaOyOOˌO،OO&O=OROgO|OOOOOOOBOPOOOOЎOOO OO1OHOlOOOOOOOOO'O5OGOOOOOO wt0wt& G `OlOvOOOOOOOOOŷOҷOڷOOOOOOOOOOO"O%O,O/O2O9O@OGONOUO\OcOjOqOxOOOOOOOOOOOO'O+OO'O+O.8O0w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V0GCC: (Debian 4.7.3-4) 4.7.3DynASM 1.3.0=AWA1WA&XA=PXA&vXA=XA&XA=YA&>YAYA=ZA&,(ZA!ZA*'WA1WA&XA=PXA&vXA=XA&XA=YA&YA=ZA&C؁AWA1WA&XA=PXA&vXA=XA&AwXA=YA&\PA AWA1WA&XA=PXA&vXA=XA&d,A#WA1WA&AEXA=PXA&vXA=XA&XA=YA&XAEܶAe*WA1WA&AEXA=PXA&vXA=XA&+DAWA1WA&AEVAhA XA=PXA&vXA=XA&AWA1WA&XA=PXA&vXA=XA&XA=YA&BBvYA=ZA&,B B WA1WA&AEXA=PXA&vXA=XA&XA=YA&)BN*B=*B&YA=ZA& *BWA1WA&XA=PXA&vXA=XA&XA=YA&.Bl".BWA1WA&XA=PXA&vXA=XA&XA=YA&AE.BlYA=ZA&FVFFFRG@BNVWA1WA&XA=PXA&AEBvXA=XA&XA=YA&)BYA=ZA&,B,OB,C)L<B4C6 C,L$4C,2D",E$DFd8DyWA1WA& CDXA=PXA&vXA=XA&XA=YA&YA=ZA&DWA1WA&XA=PXA&(E6^E7vXA=XA&E=E&,EwN,=tVE,U@WEpT^EWA1WA&XA=PXA&vXA=XA&>YAXA=YA&,B0 qE( EWWA1WA&XA=PXA&xE=E&ܖE=E&@E WA1WA&XA=PXA&xE=E&ܖE=E&T@EWA1WA&XA=PXA&xE=E&ܖE=E&,TԹEWV,E WA1WA&XA=PXA&vXA=XA&>YAXA=YA&EWA1WA&XA=PXA&vXA=XA&>YAXA=YA&_!ELWA1WA&XA=PXA&vXA=XA&>YAXA=YA&,3Ev,:\E,S,F8,D;F:׵vFQ WA1WA&XA=PXA&vXA=XA&XA=YA&YA=ZA&ylFWA1WA& CDXA=PXA&vXA=XA&XA=YA&YA=ZA&,}FF WA1WA&XA=PXA&vXA=XA&,/ :J N;# :O<#  @ 5B#  L# gGN# dS# ZT# :OU#!;  # : $]#  %]# E &#  ) H xt           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :E  ) K     2 k (id)# d0# 2# >9# E# T#V6C  t v w# y# <{# }# # hC s #pos]#6 r )  Z +# -#  /# 3 0&#t 2F1 Q rt d $  hC^$ttt#=4]#6v# 9{# 'A]log,0^/!2]v^1DP fV t# "!&tV *t"+ st##:F06 uWm0]v]~0Vht0A##jp$jV% k & '<']']j]v<]](<)jA\ V(vh*C(PV+,t((t-U*=A=A* .:O*l/=A=A0`,: PaNv: C* 1M b 2b 2 Q3? WAWA`  4M h3? ] WAXA  4M h54=A(@A * .4* X/=A&@A61@   aN7b7E h]h@ C 0 K 8U$` u 2u 2 Q3P XAOXA  4` h3P +PXAvXA  4` hA8KU  2 2 Q 3  vXAXA@. 7 4 h3 XAXA] f 4 h8hv 2 2 Qj3f ]XAYA  4v h3f WYA>YA`  4v h-T1(@As@A! .Pl5`s@A@A z .<`z h/@A@A61  aNh C 5kz @A-AA .X/@A+AA0<z h61  `Nh C  5]-AARBA .< .9i/@AAPBA0@]H0' ]X:AAAA 0+ ñh7idxĚd/BA3BA7len˻T ; RBA{BA@+x41{BACA=q64* X2H.2D.3. 3@/CACA7end8`61 aN/SCACA0;h03<XJhC5Ez CA FA`q.E. FBrsxEA/DAFA0AH0<Iz 7endJP0dK\0LC0 SL0xUq@z D z{ z FAGA+.zH. zD//FAGA0<|z X7il0 h61; aN7jVdC00`Th;C+E GAJA ..<z C`0X0:OP7endH7pos]0+ @C7len0[6D JAKAx.<z H.Z1@/JAKA0A1h7ptrӔ`0XAKALA.X/KALA61 aN7ptrhhC ALALA@].h.XVd/*LALA61m {aNhmC ]D: x ]LALA9it+X9iT9lenHF]C]LAMA aVRASA U=r]=z]=:O/RASA61U 0aN:RA*SA@ah@bd:*SASA@aX@bP/SASA?5 L? H@rVltFVSAUA@ /===//TAUA?h@endX? z P??z H?r]@?z]@rVd5JFVUAzUA =X=P=/H/3UAxUA@rVlFVzUABWA =YAYA B&'<']']4X4P4L4HLk4@448msRg2g2 Q03B YAYA 4Rh3B>ZA&ZA 4Rh]MN&MN yOV]V]]+Ng >'Pr+q sP,z  sQ  DF0 . s0. siO (ZAZA~O8J Nl intZ_O S _0f\ 1F 3m %  NUM  F ; # :$T# %T# E&#E k ( id)# d0# 2# >9# E# T#M?  t v w# y# <{# }# # _? {+9 F -# > .-#t9 k 3m?# Zo-# posq-# s# iovz#8??g[2g[  |! p }# lvl ~M# L #  !#_2?iH--(ZA?ZA@g-gh & ?ZAwZA&ghbuf&`E , wZAZA,ghb,`y3MTMTTg >@rWSY)0 M!/u OCJ Nl kintx}O S @ 1}B ܢ &kD (1 0 3 #   5I      o  H \  u 7TZ n 8z &c(  8 8)T0*  - .(/61k#3n#5n#7#gv96#FFX0<)>#B@#t By#D#bFT# wWH#(KM#topO#`Q#LX- #>: $r# %r#E &# )N  H x           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :E  ) K     21LdLd8 >Ld+dr0gbiI#Bj#k#opsl+#=m# _n#$o#(@+##T#arg# #0#4F#8NsZt#Pur#Ay{|}z#f# #$#&r#### +set1a Z6< L L +D5 ]c x x r +#YR##;~8+##+(<ops#oldr#Wr## s  #!fr   "u  r r#< kh #!  # k<$ <%  & #""L S ' '& i v ' k"* '  -  (+ 3  '  - ) #  kk$ ^$  #*=4r#*6#* 9 #+ 'ArT [  ,log,0 x   -^/   r -^1     #    k} .X   $ k / 0  $ $ 1UnZAZA`l 2#Uh1[nZAZA 2#[h1aZAZA  2#ah3VgnZA [A 2gh4n [Ap[Az 2nh2hny`2nX2oP25oH2Bp@3Mp[A[A@ 2hyX2P2H25@2B5[A[A6h3,k[A\AU 2X2P2Z8H3à\AH\A 2h2nd4wH\Aa\A` 7it h2`8S  9 9 f' : WAWA&/; h: ] WAXA U^; h34a\A^A24>X5m\A^A<1 chN=b7h}X > $99 f :XAOXA3<;h:+PXAvXA@bk;h > U99 fk:q vXAXA;h:qXAXA;h>h 99 f :]XAYA`IR; h:WYA>YAx; h3T^AsdA 2T>H7endTr@5^AjdA<1 UhN=bWX6ZXP3sdAXeAf2q6>H7endr@5dAOeA=r_3)XeAH7endr@5keA3fA=r\3rH7endr@2Z5RfAgA=strrX3rgAhgA2>X7endrP5+gAfgA6@rh6md3rhgAgA2>h7endr`2ZX3>gAhA`Z2>H7endr@5gAhA6Z\1T8hAhA2Pl1έhAiA 7bufέX2PT5hA}iA65h89?Ed>8@iA:jA?P;h; `4:jAjA2@h7oldr`2&\2X1fjAjA@7f˩X5jAjA6+hA jAkA=2 \2 XA ٟkAkAy7op+h2 dA$ kAlA`7argh7inr`7outX14lA]lA7argh7inr`7outXZ42]lAlA c7argh7inr`7outX4 lAlA7argh7inr`7outXB-lADmACarghCinr`CoutXBDmAmA@ICarghCinr`CoutXDmA'nACarghCinr`CoutXD!'nA\nACarg!hCin"r`Cout#XD)\nAnA`KE)LXCop)+P5lnAnAF@,hD.3nAoAE3LHCop3+@5oAoAF@6XDBoAoA EBLhCopB+`DR IoArAjEILCopI+5oArAF@MXGargOPFmPLDswrAvAEwLCopw+5rA{vAF@zXFm}TGargHFPrGendr@<1- hN}-XHx8vAwA@ Eq6>XCendrPEX8H5vAwAF rh5vAvAGlen8`Hg wAxA EEEZ8E85+wA xAFLhFב`FX<1 hNF@r@GendrPFmL}XBVxAxA!CctxhCmem`ImxAGyA`!ELE%rErE54xA;yAF`F@rHGendrXFmT5xA;yAGilD?GyA7zA!hEL|5YyA5zAGit|F#h5yAyAF@`Fm \D7zA|A "zEL|EC|5PzA|AF @FlGit|F#`<1z qhN5zA|AF@!F#Fm$F(rXFY)PGop++HD_|AA"E_LHE'+_r@E1 `r5|AAGopm+XFJ n+PJ LAnA"EbIXEBPE'+rHE1 r@ErErEEKE5AlAFLh<1 @hN}XI` nAA@#A ELhEC`>sQ f 9f 9 f :A YAYA#  ;Q h:A >ZA&ZA$  ;Q hKAA`$!EklEkhL!AցA$-!MN y"! Z! k r k r r/Ng >g!:!r}!X O0dm!  s~!X F! KsP xs  J Nl KintX]O S ]&K0d 3k% NUM F6M> :' N;# :O<#  @ 5B#  L# gGN# dS# ZT# :OU#;E   d# N# :O# * 0 d# :O# O]# P0#6 #z :$R# %R# E&# )Hx     ^ p    lzx$0< H!T"`#l$x%& '0()*+!,< -. /01 23L4e 56 789:)*K 2 m %[%Ntz%g6%16RhJ#9?9Kk9Rk9+KE J #"x &JK*J!+ %^$JJ#"=4R#"6k#" 9## 'ARFM$log,0jq%^/Rk%^1 K&]'8(K )*JJ+9N,N, F-+WAWA %y.9h-+] WAXA%.9h+B,/E%zt0؁A)A% .h.`1$2,2, F- XAOXA@&]f.h- +PXAvXA&.h1U,, F- vXAXA'.h-XAXA`' # .h2D( )A+A' 3def( 4c( 5YA@)  .# h;XAA) 4bKl4bKh<AA*&R =8>$  Ls&R# =8>S%  s&CD ?@y9 Aq KRKRR)@g>~ Q B[ sW O<J Nl VintchO S 0o\ 1J 3v%  NUM  F 6   M > :. N;# :O<#  @ 5B#  L# gGN# dS# ZT# :OU#; I . ; P   }  u k    R  S# wW T#  tm v w#  y# < {#  }#  # ||m  r  j  vE hC V  - * 0O > 1# w 2#* 3& oP' '# '# "'# '# W"'# V'# arg'#( '1#0 )'#8 '#< Z'#@ '#D '#HOo'Z  #l : $]#  %]# E &#H x           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :)  K     2 k (lid )# d 0#  2# > 9l#  E# Tr#VChCd g '  tIp'# SE(## .#P 6#T M;| #Xno>#` <A #hv 3C }& v  # tI s #  | # y #}&v  v | s }&v | s `3v V 53"v  3?Kv | A3hov  C3v  Z Y13  min Y|3  max ?|3   " | 31 =   '| 3^ o  ]7| 3  |/ | 3 v || y  3   3 3  y ]! y L S v "lu||3. # W& $W&   %W&  &&  ] s ' #("  & " /  V(*@ L    )+ f   * 33 + ,  nV-^$  #=4]#6v# 9 #! 'A] &  .log,0 C J  ^/\ m  ]v^1    ,    Vh /C   * V 0 1  *L * 2   3  4 A+A`*H Q 5 h2 _ t 3 3 Q6Q WAWA*  5_ h6Q ] WAXA +  5_ h7'A5A+[8t'[X9Y'T9 'P8end'L:)A3A;'h $ 3 3 Q 6XAOXA@,6?5h6+PXAvXA,en5h > U33 Qn6t vXAXA-5h6tXAXA`-5h2   3 ?E&  @lA&A-GX5 h5`A(+&AA .9+| H8key,]@9gG,B`;.\B;V/X;|1TC?AA.^9?| X9:O?T8key?]H9gG@P:AA=1n jNhnC ^C]WAA.9]| X8key]]P9gG^LDS A*A@/ 9'l|h9}m|`9!Fn\E*A&A/{9:O\9| P9tIs H:@AA=1{ jN23?| ?tIs v 6&AwA05h5`5X233 Q6xAA`0<E5X6A$A0kt5hFo $AӑA 1GX9|P HӑAAl19Vl9VhIAA1]C J& s5?KL y4lV]V]]0Lg>yLLr W M sC$O <J Nl VintchO S @ B ܒ &V 0o\ 1J 3v+  7< %  NUM F 6/M>  :X N ;# :O <#  @ 5 B#  L# gG N# d S# Z T# :O U #/;I.;P}uk  RD S# wWT#  t v w# y# <{# }# J#  D  rjE )'K 2 #^ :$]# %]# E&#Hx     ^ p    lzx$0< H!T"`#l$x%& '0()*+!,< -. /01 23L4e 56 789: k (-id)# d0# 2# >9-# E# T3#VJChaCgDdg'  tIp' SE(# .#P 6#T M;,#Xno>#` <A2#h&C }&&V &X0c;I2 'r (} n!8[.p\.#b]# ^# E_# Z`# (a# b# d#$ e#( 'f#, z g4#0r Y q 7# 4jq# #\($\ 3 #4j>q# \3  9 \3  , D [w3 V!w$3 +wAM3  ˜wjq3 bw3  J Z51wP minqwP max\w  P  " w4 @ P    wb s P  ] /Z w 3     EV  w P !Ufw P  V  ] "sw& 3  w#? w?  \ $ #"  &\   V*    \ +      %h\  #" .   & C P  V'kv (v ))])]  ] v ] ] *  V #  %^$\ \ #=4]#6v# 9 #+ 'A]6 =  ,log,0 Z a  -^/s   ] v-^1    *    Vh .C   # V / 0 \ # #\ 1 ) > 2> 2 Q 3 WAWA,2i r 4) h3 ] WAXA2  4) h5 AWA2  6 h&74,AcAL3;84;X98AaA:1Q oN;b7Vh]hQC A\< $q22 Q 3aXAOXA34qh3a+PXAvXA 44qh < U22 Q3 vXAXAl4?H4h3XAXA4nw4h<. h22 Q 3w]XAYA,54h3wWYA>YA54h7`cAA5X8<`2h9oAA:1h oNhhCX7k2AAL68aX9AA=<2h:1 oNhC 7]ABA68<8a>i90A@A=@]H=' ]X?AA=+ ÿh;idxĨd9A#A;lenT7y!]BAA 718aX>iT>lenݿH9UAA=@]h7RA/Al7>spD h>kp,`9ϖA-A:1 pNhC 7!/AXA78SE&h7-!,XAA,8-8,-h8,-`8-8X3>X73AɗA8>key3]h83-`848X7K<ɗAA8_8<-8<89ٗAA=>h=Z?T;hGP=HL=Id:1_ oN9keyV]H8V8@9A,A=Xh;h^\=_X=`d:1Q oN9JAA=Zc`9kAA;u64fPhQCA@_ ..ALA9>hqh>xd@: LAzA :8.l>inch8Zd7J!zAAl:h>hqH>key]@>arg89AA;kX;i\;incT7A֜A:>hqH8#@>arg89AϜA;kX;i\;incTr@ !֜AYA,;V>hqP>rndL9AOA;id7YAdA;>hqH8#@>arg89nA]A;kX;i\;incTAKPBMdAΡA;ChqHD#@CretCarg8EIġA9}AǡAFx\AVX.Gm NΡAAL<ChNqXCxNTCargO8HG_ACA<HCh_qXD#_PCarg`8H9AAAFkblH!j CAA =ChjqXCxjTCargk8H9VAAFsmqhFyndI uqAAl=9AAFhwqhH zA?A=BChqhHX!?AA,>vChqhHA3A>'ChqCarg89A,AFsqPA'\9A֦AFiX9AAFnLI V3AA>ChqXDTD'PCarg8H9IAAFsqhH~AAL?ChqhDZdCarg8XJgAĩA?W8V h9A©A:1g @pNhgCWKĩAA @>ptrV H9ѩAA:1  pN;itXhC:@AAl@$>itV h79!AܪA@V>itV h1d2L,LtID 3 3VܪAA,A4dX4nP4yH122 Q3!ACAA4h3DAjAAAJ4hMjAtALBlz6h5$tAAB6h8Ŧ`MMAA C6h5qAƭAlC b6>pkJ 9ìAA=\;itV P=ݦH5 ƭAAC6h8dMA A,D6hP 5 AAD 6X5AcAD' 5 6X5 dAA$EW  6XCrndT9sAAFkl5@ AgAE #!6XCkey ]PDgG L9ϯAeA:1#!  pNFrethFkd5s hAFAEJ!!6D'D D!F9A=AA%XNPA}PA#!HFpos\5 FA=ADF"3"6H9UA4AFitGX5 >AAFU""6HCptrUV @D:OUCkeyV]DgGV9\A A:1" oNFit\X1P #A#(#))])]2LJk]L)kvL%kOk ] ]3"XAܶAG##(#))])]4#X4 #P4#L4"#HOk40#@45#4:## V ] V ] ]/Pg>##'#QPy#PrW$2v,$C=!LA$  oN$&% O<J Nl VintchO S 0o\ 1J 3v %  NUM  F  6   M >  :. N ;# :O <#  @ 5 B#  L# gG N# d S# Z T# :O U#;I . ; P   }  u k   R S# wWT#  tm v w#  y# < {#  }#  # ||m r  j  vE  V - * 0? > 1# w 2#* 3 oP'  '# ' # "' # ' # W"'# V'# arg'#( '1#0 )' #8 ' #< Z' #@ ' #D ' #H?o'J s''at'a# 1'V# 'V# Ĉ'l#gvCs''  # : $]#  %]# E &#H x4           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :)e K     2 k (id )# d 0#  2# > 9#  E# T#VChCd g '  tIp'| SE(|# .#P 6#T M;#Xno>#` <A#hC }& .e U&$ %|# A#( key*]# gG+# &0fN 7g# SEh # i # N#j# %p) # !'A# %  %  ~%N Vj%N y!N %  |&NC J  g&Nh t   Zk$1N   min>%|N   max$|N  "&| N   #| N: K  ]!/ $| Nm  ||!'%  N  "7#N   ] NN#   $ #"? F  & \ i  V*z    +      %  HV&^$  #'=4]#'6v#' 9 #( 'A]6 =  )log,0 Z a  *^/s  ]v*^1    %    Vh +C   # V , -  # # .F ) > /> / Q 0 WAWAdGi r 1) h0 ] WAXAG  1) h2Z'MܶAA$H 3:OMl4AWAH 5h6' A$AH7t'X3Y' T3 ' P7end' L8A"A9' h:tmp' l;#'$A%ADI#7t'h3'1`7m'X7nm' T7nt' P3W"'H3V'7arg';"'%AYAIP7t'h2!'YAAJ7t'ah3#' d6&'AEAdJ 7t'aX7k'P8ACA9#' l8A/A:r'Vh2X$'EAAJi7t'aX8MAA9#' l9' h2#'AA$K7t'aX8AA9#' l9' h6"'AAK%7t'aX7rnd' T8+AA:i' l6 %' A AKd7t'X3#' T6g%'  A!ADL7t'X8AA9#' l6'' !AAL"7t'X3)' T3 D' P83AA9#' l6'' AAM7t'X3#' T3Z' P8AA:tmp' d9)' l9' h6$' AAdM$7t'X3#' T3Z' P8AA9&' l:z' h;e"'AnAMK7t'7v'3"'K8AhA9#' \9Y' X9`'QC@;"'nAA$N^7t'H7k'@8~AA9#' l9$' h:lr'Vd8AA:r'V\A9' X&&Hr W&(*O <J Nl VintchO S h &V 0o\ 1J 3v+  7< %  NUM  F  6!   M >  :J N ;# :O <#  @ 5 B#  L# gG N# d S# Z T# :O U#!;I  . ; P   }  u k   R6 S# wWT#  t v w# y# <{# }# <# 6  r  j v)0 P& #`* #) 1#  ]# ]# end ]#( s( CE +E# C(E# D1# #E\# JF1# G# PoC(J+ )J# Z+JP#P+J +8PH m(R# JS1#( kT\#0 \1H Q( F Z G1# H1# b( I# * J#1 + Q Z T1# V1# ' X# k Z\#b '*`?m ZA1# B1# 'Cs# D# 'E# kF\#( R+G#0*m 5) | # 1# k\# *# # :$]# %]# E&#Hxp           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :E hC) K     2 k (id)# d0# 2# >9# E# T%#V<ChSCY6d g '  tIp' SE(# .#P 6#T M; #Xno>#` <A$ #h C }& 1   J (p7S 78 # (9#(@,7  #!SEDy# "(   #(Y    $(bS   V%h*S   %nb+S  )  %u,S F M  %{B)S j v  % &Z+1S  + 'min*S  + 'max)S  + &",+ S   + &* S < M + ]&+ S n z + &/( S   &*1  S  + ()S  + 1 ]S ) S    7 *##"e l /$&7  /V#* /57 + ; /5 +  V,^$7 7 #!=4]#!6v#! 9 #- 'A]\ c  .log,0   /^/ ]v/^1  +   Vh 0C  ) V1%27 ) )7 3l Od4d4 Q/5AWAWA]6Oh5A] WAXAD^6Oh7AWA^8h 9)1VAhA_0:+0h6;1((1hAAd_qPAyA?1 xN@b7h]hC A $,4,4 Q5XAOXA$`W`6h5+PXAvXA`6h A U44 Q5 vXAXA`6h5XAXADa6h=`{AAav:<`$ h>AA?1 @xNhCv=k$ A5Ab:SX>A3AB<$ h?1 3xNhC =]5AZAdb:<:SCi>HAXAB@]HB' ]XDAAB+ ñh@idxĚd>A;A@len˻T=y!]ZAAbO:SXCiݻTClenݱH>mAAB@]h= (*1A$A$c:*X>A"ABP,1h?1 PxNhC='2$A>Ac:P21hE(=0>ALAc0Cit=1 h* F+C7*LAADd:C1 X>XAA?1 xN@itF0hhCG(Mi*A$Ad+:M1 X>A"A?1+ xN@itP0hBPR1`3 >u4uHY HtIY I?1 exN hC z50'$AAe6>X6HP6SH>9AAJ_(3  4u4 Q5,AmAde2;6X5a)nAAeaj6h7 A?A$f8uX7 @AApf8uX:nP7) AAf8uX7M ASAg*8uXCpk{% P>AQA?1 _xN@it1 hB`hC7v TArAhg8h+ 7 rAAg8X7 AAh"08X7 AxA`hRn8XCrndT7 xAAh8X>AA@it0h7 AA i 8XCkey]P:gGL7M AIAXi+G8X:P7z JARAii.8u:'Ƙ: Ƙ:!Fǻ>dAIA?1. +xN@ret͘XDA0ABP1PK0@lenڻB@]HBP1@w7 RAVAjUP8~:1 ~::O~Ckey]~:gG~K`?1P xN@it0BG+HB)1@B'+DA!AB0)]L.@rcV>AHAMe&UZ)kNOy`V]V]]1Og>xOrW$  ,00O<J Nl VintchO S h&V0o\ 1J 3v%  NUM  F 6   M > :? N;# :O<#  @ 5B#  L# gGN# dS# ZT# :OU#;  t v w# y# <{# }#  #   r+  j   #b : $]#  %]# E &#  )r H x           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :E  )  K     2  dC g '  tIp ' SE (#  .#P 6#T M ;#Xno >#` < A%#hC }&? k (%id)# d0# 2# >9# E# T#Q-& / , . . w. 2, h. n, - - - {,  o# N# :O# *  o# :O# Oh# P# * -.q  o# P"h# J## M$# SE%q#w-.&]( )o# K-# P5h# XO;# GOAh# KG#$ LJ#( OM#, KP#0 NS#8 YLV#@ JY#H Q\#P M_#X Mb#` nQe#h Nm#p Qph#x Qs# Lv# .Jy# |J|# O# N# *P# O# WK# Kh# 1Kh# P# ?Q# P# K# M# `M# Qh# Jš# Q# KJΔ# tI#}V Ch# C /)S key*#val+#.G Ki8[ p\ #b] # ^Z # E_Z # Z`Z # (aZ # bZ # dZ #$ eZ #( 'fZ #, z g #0* Z e s|  #D P k q ua w k ]v]  k Vh| k  # A G   A V-k 3  ]]A ]v]][/kO O vA ]vv w   |  !u #"  "&|   V*   | #+    $A  3 V M  ^$| B | #%=4]#%6v#% 9B #& 'A] S 'log,0R  S (^/ ^ ]v(^1  ^ d R  R 4 ^ VhS )CY R R  *Vu +{ ,j |  | -  . . Q / WAWAdj  0 h/ ] WAXAj0 h1# $-B.B. Q^ /XAOXA$kmv0-h/+PXAvXAk0-h 1" U.. Q/ vXAXAk0h/XAXADl*30h1 hCX.X. QA /3]XAYAl0Ch/3WYA>YAm0Ch2. AAdm3hh3xZ de 20Z AAmM4.Z l3incZ h4ZZ d5M/Z AA$n3hP4#H3argɒ@6AA7kZ `7iZ d7incZ \* 5.Z AAnq3hP4#H3arg@6AA7kZ `7iZ d7incZ \8KZ X9`,Z AAn:hH;#@:ret:arg<I A6AA=xZ \8VX >-NA:ADob:hNX:xNZ T:argOH? 0<:AAo4tI<4,<4M=4 =4>@p7jG\@AHPASEIHC?i-SAFApu4tISX6A4A7jUl6AAASEV`B_-^/FAnAdp 4,^4M^4 _4_6^AeAAtIaXA#i@?/pnABpx4tIpH6zABA#rP7ksZ lC1 NhC xB,|$-BB$q3n|L6"BBA#~PAtIZ l2?VBBq#3sphD4--BBq4Z4A6BB7iZ \EB#B7iZ XE(BXBAtIH6XBB7nZ TFB/i0BbBDr%3sp4'4 4!F 6B[B7i\C15 yNE BB7pkP7nL6BBASE@6B[B7e:6BGBASEh5C %?Y D/A.bB/Br3spX4 PD-0Y0/BBs6=BB7iZ XAtIP6=BB7iZ \?.BBds6BBC1 lN6BB7il6BBA7.XATA hAMH6B?B7jd6BBAc@xGS /BBsH-?,B*B$t6B#BC1 PN=iZ \EBUB=iZ XEZBB8tIH8SE@6B B=nZ ThCH/".*Bk Bt63Bd B=i$Z \E3BB\=i%Z XEBB8tI&H8SE(@6BE B=n%Z THu//.k B Bt6t B BC1 0N=i4Z \E B B,=i5Z XE B B8tI6H=pk>@6 B B=j?P6 B B8SE@6 B{ B=n5Z ThCIw-L80V BBDu;*:L~6 BBC1 N6 BB=iS1h6 B`B8tIT8,tdE BB=jw1X6 BsB8SEx8B-yT8z6 BB=k1H@=key6B\B8>6B\B=j1@6 B1B8SE6%B1B=k1@=key=f~=t~x- H]].XJJk]J)kvJ%kKk]]//BBu]]0X0P0#L0.HKk0<@0A-3  v.XJJk]J)kvJ%kKkv/0BBv?l?v0X0P0L0HKk0D1w s|.. Qk /l YAYAdv0|h/l>ZA&ZAv0|h]LM&MS7+$ LM y FQ V]V]]+Mg >^ 1 Ncfg*MrW~ %v CA!L ~N A}-- sA3/4 sA.8 s<%0BB99J Nl intO S  3ST18C:#eof<# o @1?~=A#     z 0 -1BB$w6 @1 h0%BBw @1%h &` X'o\E10 MsO1+z LsV&1 9O <J Nl VintchO S @ B ܔ 0o\ 1J 3v2 H  Ƅ 2 3   ^1  SG :O U# X V#  W]# len X#%r  NUM  F 6   M > : N;# :O#` <A#h1(!11C 44v 2v# 2v# 2# L3#1f # :$]# %]# E&#) Hx7           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :E )v K     2 k ( id)# d0# 2# >9# E# T#GVCh C @1?+ ~=A#dN g ' ^C }&f}^v T18 C:# eof<#  0  ; I 2 (rK d $  q1]q1yspy# x# ctx$R# Ĉ%# 2&1# 3- ב.# /# M O# cswQV# R# 3T #( fidV#0 sid`#4 gvb#8 \c#H fi #X jv#` Xk#x >l #t   1  2) 2)   2)  )  ]!^$  " ##=4]##6v## 9 #$ 'A]q x  %log,0   &^/  ]v&^1    '    V(  ) #*"/ 6  +& L Y  V**j v    +    !%4x  " #,%4   *%4z  ]v]'$4   V!h "Q #,C O z  - d q z V.y3k / 0v0vz ]vvv 1  !s @ " #, @ F *u ! @ ]v]' 2 @ V 1L  z 'Q l )V 1  h 2C   1 V 3 4  1v 1 56  66 Q 7 WAWAw.78 h7 ] WAXADx]f8 h9hAWAx:h; $66 Q 7XAOXAy8h7+PXAvXAdy )8hQ ;[ U?T6T6 Q)7/ vXAXAy8?h7/XAXA$z8?h;O h66 Qz 7]XAYAz8h7WYA>YAz6?8h<TBBD{=T H>endT]@?B~B@1 `NAbWXBZXPhC <)BkB{?=q6 H>end]@?BbBAr\<]kBJB|= H>end]@=Z?BABAstr]X<]JBBd|= X>end]P?ZBBB@]hBmdC2FBB|P>spFhC8BB$}>sph=2dspH=2D?BpBAidxXD0KyBBD~=@1K h=K`=XK\<3ABB~>ctxAh=ZA1`5 6EE)  FBZB)8h8`<2,]ZBBd=1, X=4,]P=B-,'H?nBBAkey/]`?BBAi1l<37B B=17 X=47]P?B BB,9lG >11 B=B$O=X>lDZ3F=B B=F>txnF%H B1I XB4J]PBtIKHBNDB PI BP BB!FT1?U B BAeW+P01 D2_ BX"B=_>txn_%? BQ"BB1b XB4c]PBtIdHBB-iAkeyj]@ApklB'oB u?"BP"BAe|0D3X"B%BDE=~=@1 ~?k"B%BB1 HB4]@BtIB2BSEB\BBXBk1XH@ AiTHp BB-Akey]AitfBD2%B,'B=>txn%?%B*'BB:OlB1 `B4]XBtIPBB-Akey]HApkŅ@B'C2-,'Be'B:=:OlJ~1@2]e'B'Bdr=:OlJj343'B(BĂ=:OL=]@>lenH?'B(BBXK1 3(B)B$\=h>txn%`=@1 X?(B)B@1l PNhlC\5q /0v0v6EJk]E)kvE%kLkvv7qR2)BM*B</0v0v8X8P8L8HLk8D8@; xLa6a6 Q 7<(2N*B*B8Lh7<4*B*BD8Lh;! s66 Q@ 7 YAYA8h7>ZA&ZACL8hM)B)BdNVlNVhO3)B)Bą]CP3)  sQRyV]V]]3Rg>RrW#S DRoDT ؒs*d5 bAO<J Nl VintchO S h&VD(0o\ 1J 3v+ 7<%  NUM  F 6,   M > :U N;# :O<#  @ 5B#  L# gGN# dS# ZT# :OU#,;  t v w# y# <{# }# #   rA  j  txn( $ tI &# ' '# (#  +]#len ,# op -#$ tIp ' SE (#  .#P 6#T M ;*#Xno >#` < A0#h1 (""C 44 g 2 v# 2 v# 2 # L3 #1 f # :$]# %]# E&#Hx           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :E )W K     2 k (id)# d0# 2# >9# E# T#VChCd g ' $C }&UW m o# N# :O#6 *  o# :O# Oh# P#m*x -.'  o# P"h# J## M$# SE%'#--.&]( )o# K-# P5h# XO;# GOAh# KG#$ LJ#( OM#, KP #0 NS#8 YLV #@ JY#H Q\#P M_#X Mb#` nQe#h Nm#p Qph#x Qs # Lv# .Jy# |J| # O# N# *P# O # WK # Kh# 1Kh# P# ?Q# P # K# M# `M# Qh# Jš# QŒ # KJΔ# tIϙ # 35J6`4 d4 f6 # n& X4 # l4 # c4 # 4& #o6 C r] d $  Z6.h V ] 4 >5^ #lsn6# M^ O#cswQV# RM # 3T #(fidV#0sid`#4 gvb #8 \c #Hfi #X jg#` Xk#x >l # x0G 9iH # 4I^ # WJ# K6 # kK6 #(*PN 4 N5 6 5 w6 ̔S lsnT# 5T# V # QW # MX # 5Y #( \5Z #0 x[ #8 Z6c #@ 5d#H |JeV#P OfV#T XgV#X Oh #` i #h *Pj #x l#|   5 X5 d ] q1+ q1G spG # x# ctx$ # Ĉ%# 2&1# 3- ב. # / # t   "  ^$#=4]#6v# 9## 'A]<C 4!log,0 `g 4"^/y ?]v"^1 ?E #   ? V$ h%V#&" f'&$ f V&*5A fl(+ r[ flh#) *h  V+4k, ]v-#  Vh.hh4/C:  .VV0\1K.A.233 Qf4xWAWA$5h4x] WAXA5h6$#3#3 Q?4XAOXANW5h4+PXAvXAD}5h6U33 Q4 vXAXA5h4XAXA 5h6h$9393 Q4]XAYAddm5$h4WYA>YAĈ5$h76G6 *B*B$84'(5*B+B9txn'h9op'd:']X9len'`A;u4/"6+B+B9txn/h:tI/`:'0X: 0P:!F1"L<+B+B=1 NhC >m6D4+B+BD<+B+B?txnFh;C5K5+B-B9txnK<,B-B?lsnNX@ P6 P@P6 @?resQVL;5c5-B.B9txnch;5k4.B.Bd9txnkh2 :,39AJk]A)kvA%kBk44.B.Bċe,5 X5P5 L5+HBkrCDyV]V]]0Dg>DrW0Ecfg*>F D6 D̔o Do^ #.8 :FO <J Nl VintchO S D: : h &VD ( 0o\ 1J 3v+  7<9 ?  ] # @1?> ~=A#  da g ' E hC5J6`4 d4 f6# n X4# l4# c4# 4#oC0 ؊ XV# s8# o9# 7# 8# :#(6#08#86#@a9#H7#P7#X.7 ,#` 2#h7 V#p&7V#t9#x:J#&9}#68#H#&#8/#80#91#62#931# F5V#:7N#6 h8   # 9&# tV#hHCh^CQ-& / , . . w. 2, h. n, - - - {,  o# N# :O# * : o# :O# Oh# P:#@* -.  o# P"h# J## M$# SE%#F-.&Q]( )o# K-# P5h# XO;# GOAh# KG#$ LJ#( OM#, KP#0 NS#8 YLV#@ JY#H Q\#P M_#X Mb#` nQe#h Nm#p Qph#x Qs# Lv# .Jy# |J|# O# N# *P# O# WK# Kh# 1Kh# P# ?Q# P# K# M# `M# Qh# J°# Q# KJΪ# tI# #Y :$]# %]# E&# )i Hx           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :r d $  Z6. V* ] 4S >5Y #lsn6#S x0G 9iH# 4IY # WJ# K # kK #(*PN 4 N5 6 5 w6 ̔S lsnT# 5T# VG # QW # MX # 5Y #( \5Z #0 x[ #8 Z6c #@ 5d#H |JeV#P OfV#T XgV#X Oh#` i* #h *Pj #x l #|(IG dirJ #fK # !FM # MN1# OV# TP #$ 9R #   0 @71 # i:6 # w79V# 9:]# 8;]# <#M 5 X5 _  ;9' 9 97) : m7h, C2 )d K     2 r) Z+# -# /# 30 #t % NUM  F 6   M > :. N;# :O< #  @ 5B#  L# gGN# dS# ZT # :OU # k (id)# d0# 2# >9# E# T# VC  tk v w# y# <{# }# k# hC2H  Ƅ 2 3   ^1 S :OU# XV# W]#lenX#IM . ; P   }  u k   Rv S# wWT# Mv  tIp' SE(# .#P 6#T M;E#Xno>#` <AK#h?C }&?7?. T18z C:#eof<#   z Qtxn($  tI& # ''# (# +]#len,# op-#$ 7 CW tI D# c E#  F#  Gk# /: y!l zG #' {#!R"s # #$ %u ] v ]&V"h#7#$3?` f' Ta`V(4ks)` ] v *+ 7,#%"-&V%* + * `&7RV *l "^$a##.=4]#.6v#. 9a#/ 'A]r0log,0qr1^/} ] v1^11=} q& qS}VhrCxqq*=V23**455 Q6WAWA$ 7h6] WAXA3<7h8B$La5a5 Q}6<XAOXA7Lh6<+PXAvXAD7Lh78AU55 Q6 vXAXA#7h6XAXAIR7h8?hbw5w5 Q`6R]XAYAd7bh6RWYA>YAĎ7bh9:.B/B$9:q69H;end]@</B/B=r^]9O7/B0B:q69H;end]@59L 0B0B::OLlM?"AWAD@h?>2F0B0B>;spF h>8?0B1B~;sp h:2d9u2 1B1Bd:,L<'1B1B=s XA0E1B2Bđ:@1EhA0K2B52B$I:@1Kh:K`:XK\>9+V52B2B:8+V\<<2B2BB9-VlB6.VhC7 K62B2B:@1 KX;txn KP:X KL<2B2BB MhA9 S2B3BD:@1 S;op S:Y9 S]:6 SDP =txn UXE 3B3BB XP<3B3B=e _H*xA8 f3B4B;:@1 fX;op fT:Y9 f]H:6 fPA8 p4B5B:@1 pX;op pT:Y9 p]H:6 pPA9 x5B 7Bd: x, <5B7B=row zXBtI | PBSE }?HB @E5B 6B0B% ]ZA&ZA""7c"hSA <  MsS8 = (Ms"#TUy#V D U̔o:# `# V ] V ] ]2Ug>m#@#Wcfg*UK/UrW#K]#TU3I#UE1X#h#C?B= ?# @MsB: AV ܒsP3;:}M1**N:N NP4;#;M1**2Nx;N NP`4;;cN1**mN;N `NP4;;N1**N0<N NK4@ FOO <J Nl VintchO S @ hB ܔ$}&V0o\ 1J 3v+ 7<2H)  Ƅ 2 3   ^1 Sn :OU# XV# W]# lenX#C E  r d $  q1q1sp# x#  ctx$# Ĉ%# 2&1#1(+;;C 44 2v# 2v# 2# L3#1f  # :$]# %]# E&#) HxA           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :G)y K     2 3- ב.# /#y M\ O# cswQV# R# 3Tb#( fidV#0 sid`#4 gvby#8 \cy#H fiy#X j#` Xk#x >l#t\ss;h9?] @1? ~=A(#d g ' % NUM  F 6D   M > :m N;# :O<#  @ 5B#  L# gGN# dS# ZT# :OU#D;I0 . ; P   }  u k   RY S# wWT#  t v w# y# <{# }# ?# Y0 tIp'> SE(# .#P 6#T M;#X no>#` <A#h5      o  H \  g[2g[@6 *A7 #G7#gct7#A8#=9#H:v #MG; # 7<I#top=I#YE>v # Ĉ?v #$C@ #(envA #,BB#0k=CP #8<4  V  =GcP=gn e ]# Z #  |4 p}# lvl~V# L # 4 #hE C  > B<v D#B<[ <" D##<$ <uH Dpcrv H lB ' ! gcr i" # it# K Z # tp # n lo# hi#u64n # fr' u32K lB A3 *A # G# gct# BC# :# env # lenP # @ # Z># A TG@! *A" #G"#gct"#E##G$#A%P #MG& # k'v #uv(v #hC)P #F*P #D+P # yE,#$X-#%[.#&-G0 #(?1 #,?2 #0G3v #4D4v #8=5v #<$TG6> Fz$*A{ #G{#gct{#%A{#8<{#env{ #MG{ # pc{v #D|$# 4C$F} &val #key #v #Gv #$&@? I*A #G#gct#HG#C#/v #MG # @ ##v #9#@#$?%D PE sH < F I D = = A qE C C I H G D D @ p@ G @ = > i@ J?&MMSU%E= @ B > G<# F$ |@% ">&$E DS*AT #GT#gctT#@U#:V#envW #MGX # @Y #$DZOJ B 4F E a> *I A \? E= @ ? D @ .C @ = F  ^ |A < F = C '= = B D lD C F F F < $C \= 0H :C @ > = A H nA A ? ? B pC E D 4E &F C ? A 9H zF A D < ZH A :A < C hF AhC k (" id)# d0# 2# >9"# E# T(#V?'ChV'C s # pos]#YC (}&)M*m T18 C:# eof<"#" r )s Z +# -#  /# 3 0b# @ ! ˞u32 u64  ]# len #"# :O #GA ~= (#L #+)D $,H =+:#,D >#-.> &<H*..> +Xd*.-> 1t**V/.> :*0 ;*1B+:+:2+:2l:l:222+G $,H =;>#,D >#-.> &:F*..> +Vb*.-> 1r**V/.> :*0 ;*1B;>;>2;>2>>2223^$4#,=4]#,6v#, 9#5 'A]]d*6log,0*7^/*]v7^1* 8 **V9 :#;""*-<&8E*-*V;*Vb*-3)+ 9|*-33s4#=*;u*]v]8**V3h4#=/;*>P]**V?y3k~@~AvAv*]vvv2(8*7*V2hC2VB#C2b2D"MbEbE Q-F?WAWAdGMhF?] WAXAĚGMhH$EE QFXAOXA$GhF+PXAvXADMGh0IAWAuJhKEYBBDLxYhM4@BBB!N4!XO@BBBP1'  OQb7,h]2HUMbEbE Q7F= vXAXAGMhF=XAXAdGMhH;hEE QF]XAYAĝGhFWYA>YA$DMGhMTBBHBNT!HRendT]@OBBHBP1  OQbW,XSZXPM)HBIB2Nq6!HRend]@OHBIBQr\M]IByJBDN!HRend]@NZOIBpJBQstr]XM]yJBJBN!hRend]`NZXTT1JBKB$NPlTΟKBKBdRbufΟXNPTOKBKBS5ЅhM FKBKBĠRbufXRstrAPRlenLM`KBLLB$3 N<`hOLBJLBP1C   OhC C3 MkLLBLB NXOXLBLBS<hP1  p Oh C  M]LBMB!N<!NRiOLBMBS@]HS' ]XUhT8NBNBd"Rsp>hN2dMu2>NBOBģ#N,LONBwOBQs>XMROBOB$y#Rsp>hRkp`OOBOBP1#  Oh#C y#M!OBPB#NSEhM&PBPB!$Rsp>HN2DO+PBPBQidxXX0KPB)QBDl$N@1KhNK`NXK\MH _)QBQB$RL _XN= _VTO8QBQBQt ahP1$  Oh$C$Y]@ gGQB RBV%RL gXN= gVTOQBRBS lhMF tV RBRBd%RL t XO,RBRBS vVlS y`M B VRBRBĦ&RL XORBRBS hMdH VRBSB$W&RL XORBSBS hMD VSBqUB.'RL O)SBoUBS PS VLS  lQend hS VHQit VS@ ]`Qlen P1>'  OS \h>'C.'XII qUBWB'RL ֭ XRi VTN@ ָ'HOUBWBQnum ؙhSZ 1`sZrG WBXBD,(Lb ,(XWP TOWBXB[buf 2(`\>F hE hB(C]B "VXBW\B)LL "O#XBU\B\ $P\ %VL\ ( h\ ) `P1)  O\> =[b JE \A M\@ b1\'+ c]@\ fUZBZBX)[i N\OZB[B[i TVXOZB[B\@ Wsh)C)]H yVW\BI]B*LL yW yW y1Lkey z]W) z1Lall {Oy\BG]B[top }V\[idx ~Vl[it V@[len \@ ]`]sB VI]BR^Bd%+LL Lall OZ]BP^B\ `\ V\\ 1h\@ s]H VR^Bq^BĩX+LL h]I Vq^B^B$+LL h]? V^BI_B ,LL O^BG_B\ h[it VP\@ ]`[len LP10,  Oh0,C ,]@ VI_B`B,LL OU_B `B\ `\SE Vl[it V@\@ ]X[len ]H V`B,aBDf-LL O`B*aB\ h[sz ]POM`B`B[i Vd[len L\@ ]X]EF V,aBaB-LL XO8aBaB\ h\r -`.Zp< aB"bB..LL XW POaBbB[ptr ..h]XC V"bBdBd.LL O.bBdB\ `\ V\[it K"hP1. ` O[len )L\@ *]P3 ]tD 9VdBHdBĬ/LL 9h]< FVHdBdB$d/LL FXOTdBdB\ Hh]A pMdBdB/LL pXLi pVTOdBdB[it r/hP1/ @ OMh/C/ZD ydBeB0LL yXWSE yPLit zMHW:O zDLkey {]WZ {1WgG {VUeBeB0\A 0h0^G }it ~M#key ?#]8I VeBfBD"1LL XOeB fB[it Mh]G fBbfB1LL XLi VTOfB`fB\SE 1hP11 ' O$]bE VbfB gB/2LL HOnfBgB[n Vl[idx Vh[sp >`\SE X[ptr P]:> V gBogBd2LL HOgBhgB\SE X]IC VogBgBį2LL XO{gBgB\SE h]\G VgBhB$+3LL XOgBhB\SE h]%E VhBUhB3LL XOhBShB\SE h]C VUhBhB3LL XOahBhB\SE h]>E VhB\iBD64LL XOhBZiB\SE h[rnd d]H M\iB/lBo5LL OniB-lB\SE P\ VL\:O l\B- h[key ]`\) 1[it :MOiBkB[b E UjBjB*5\ @OjBekB\@ %sOjBekB[i &\]E HV/lBlB5LL HHO;lBlB\ JVd[it KMh\ VX]B ^VlB0mBdB6LL ^XOlB.mB[it aMh\ c`]? sV0mBemBIJu6LL sh]? VemBoB$7LL OwmBoB\SE X\ VT[b E \B- l[key ]@\X d[it M\ U nBEnBX7\ HOEnBnB\@ sOKnBnB[i h_GA 7oBoB7W@1 hZC oBpB:8W@1 HW @WX `` [L  X]> pBqBD8LL XOpBqB\@1 7h]GH qBsB09LL WSE VO$qBsB\ \\iH X\@ s\ H[pos P]i? $sBtB9LL $WSE $VO sBtB\:O &V\\ 'P\@ (sZ]A FtBSuBd:W@1 FLL FWSE FV` \ HX\F I@a I = J#bJ:V:*ba:r:*+:b}::*cCtBtBĵ:J>:hOtBtBP9hZE cSuBvB$|;W@1 cXLL cPOcuBvB\7G eVhUuBhvB[;\H nVdOhvBvB[i {Vl]A VvBwB<<LL  OvBwB[op \[sz 1[req ]P[top VL\B 1@\GA O{wBwB[e <<A<2]H VwBxB<LL  HOwBxB\n \[str ]PZj> xB{B09=LL  W ]WD ]OxB{B\SE V\\  ]P[end ]H]? V{B{B=LL XO{B{B\ ]h\ 1`dB >|B~BQ?W Q?~W@1 ~` \1 !P\4 ]H[L  @\C Ve ;?\F f >C V#b^>j>*bu>>*;>b>>*cC{B|BP>J>>hO|B|BPCQh\m \@ ]\7G O }BV}B[i V\` [e W?)A<Z= !~BDB?LL !XLidx !VTO~BBBP1?  OO~BBB[i #Vlh?C?_F /hDBB)@W< /hl_< BhB=Bp^@WF Bhl]u? SV=B;Bй@LL SXWSE SVTUBB@[t \`OBB\Z cVlZ> s;B|B0tALL sLb s,(WSE sVONBzB\@ us@OBB\ hZYF |BB1BLL XLb ,(PW VLW VHOBB\Z VdUB˂BB[i VlOBB[i Vh]R? VBTByCLL ȾO1BJB[b E \< ]X[i VT\7G VP\Z 1[str ]H\@ sо[dbl [flt J[u16 [u32 [u64 UBeBUC\< -VDOeBB\F Ig1= Z=]TBBP3DLL ZLs Z]Lend Z]OkBB\< \\`P \< `X\ aT\d? b]H\ f@]N> oVBBaELL oOBB\> q1\< r]`[f s]h\1A u1[str v]X[end w]P[s x]\f= zVL\B |h\PA }K\ = ~H\F D[dbl [flt JP1qE  OhqEC aEdC ?BBELL HO BBP1E  OOBȕB[s +!X D]FPF@FAvAvEhJk]h)kvh%kikvvFER2)BM*BpFF@FAvAvGFXG FPG+FLG6FHikGDFDGIF@M#B CB,BмF1B+:NF C+:`Dd GGEGE QjF,BXB0EGNGG GhME CXBBG1B;>NF C;>`DbGGEGE QjGBBGGGGhD+GHEGkfun &HlGBЖBP(H9HGGhGG`D)GHbHEGkfun &\Hl9HЖBBHHGGHhGQH`HsHHEHE QFH YAYAHHGHhFH>ZA&ZApIIGHhm D6Inoy+IcIV]V]]Bog>pICIooIoAA]InoJIorWIo\hIno: 9Iox; 9Io; 9Io0< 9I]JCS}C : J MsSVA A sS~> U] MsSY< V] Ms JC \H MJ OqJ JC\E ^J OJ JC\H cJ  OJ\"H l] Ms\_< m] Ms .KC \= DK @ OK\F _K  OJ\7? zK  OJpu=  Ms KC\w> K ` OK7b;IBB`NO J g[intlql S 0 34 %  NUM  F  6   M > :* N;# :O<#  @ 5B#  L# gGN# dS# ZT# :OU#; # :$f# %f# E&#E tIp'< SE(<# .#P 6#T M;X#Xno>#` <Ad#hRL- }&L*k^I0UI_BǛBпL0XtI0PfB?BiO_l_BBj_hYIǛB3B01tIhL`I3BXBntIh;`zIXBBLhdBB1  Oq-fS7y'_f_ffg>4!<;;NBCbintS &-l O J OiD:M:MN-E 0؊X-#s8~#o9~#7~#8~# :~#( 6~#0 8~#8 6~#@ a9~#H 7~#P 7~#X .7 #`  #h 7 -#p &7-#t 9#x :[# &94# 6# # &# 8/# 80# 91# 62# 93# F5-# :7# 6h8#9#t-#    3PB~#SE-# B# 3P  nKPKO~KM8( MS#FK-#On##$## H8 Q-&e/,..w.2,h.n,-- - {, Q-3T#NB#:O~#p* T#:O~#O#P#*-.a T#P"#J#B#M$B#SE%a#g-.&]()T#K-~#P5#XO;~#GOA# KGB#$LJB#(OMB#,KPw#0NSB#8YLVw#@JY~#HQ\~#PM_~#XMb~#`nQe~#hNm~#pQp#xQsw#LvB#.JyB#|J|w#OB#NB#*P~#Ow#WKw# K#1K#PB#?QB#Pw#K~#MB#`MB#Q#JB#Qw#KJ~#tI#m]xpMpM8 \r # N-# &L-# N-# kPr PKPPO?OKKO~KN QL J P M MfQNQQL&JtJON"POOKK)KyP7QPK M!XM"Q#J$wQ%CJ&dO' P(J)L*N+J,O-O.M/O0N1kP8rO-BxBP ahb`SQxBB c hQI-BqB$ cI hM}qBBpr c1}r }c2}r }M~x}xqL-B"B chL-"BrB0 cghL-rBB chP[eB$Cc[ yopt[yqK[-y5BܦB blnn _8BߩB bln ^BB i32M|BB i32M|3BB i32M{%B-BD dblw{MBGBj i32M{gBoB dblw{BB blnB ]BB dbl[w{BB i32eM{ֻBB' i32sM{˼BBM dblw{ýBþBs i32M{BB i32M{BB dblw{BB dblw{BB  bln \BB/ bln [BBU i32M{BB{ i32M{BB dblw{9B9B i32)M{YBYB i327MzyB&B blnE ZFBB8 i32^Mz;BB^ dbljwz;BB l|-T ar|-z y|H!eO|@BB bln "B B l- ar-z y!eOBB i32Mz"BB l- ar-z y!eOB0B i32Mz"*B4B l- ar-z y!eO~hBBV l-~ ar-z y~!eO~CBB l-~ ar-z ya~!Na~B9B l-~ ar-z y~!eO~BBI l-~ ar-z ya~!Na~BB  bln }(BzB l-~ ar-z y~!eO~"BB l-} ar-z ya}!Na}BCB^ l-} ar-z y}!eO}BC l-} ar-z ya}!Na}CC l-} ar-z y}!O}CC i32Mz+C}Cv l -} ar -z y }!eO }C C l-} ar-z ya|!Na|" CC l-| ar-z y|!O| C^Cf l'-| ar'-z y'|!eO'|CC l+-| ar+-z y+a|!N+a|"CC l/-| ar/-y y/|!O/|kL8JF~$C%CPNQFH bufG  s ptrG~ s iH-\ #$OW%Cp)C+cW XoptWPqKW-LJW@KWDKW rXed!KYh%+C ih%+CNC0ihc `vX buf s'l^+C~%P"-NCVCc" H!#P i#` res$-l(L}VC%YCc} Hopt}@!~P i~h%J-%YCzCP$dst ~src ~!~ i~aCncC l-\ ar-~ yP!eOHscCReC l-D ar-~ y!eOfChC4 l- ar-~ ya!NahCXkC l- ar-~ ya!NaoCqC l-~ ar-~ y~!O~"qCtC l-~ ar-~ y~!O~)^JzCCqc H!P ih%'Qd-CCs1d~hs2d~`%YPp~CCp[c1p c2p lKp-!=LqP!GLq@ i1qh i2q`!ҿr s Hk K[ MsP[ NsQO[  Ns@O[ @NsK[ `NsK[ NsO[ NsK[ NsN[ NsRL[ OsJ[  OsP[ @OsM[ `OsM[ OsgQ[ OsN[ OsQ[ OsQ[ PsL[  Ps'J[ @PsuJ[ `PsO[ PsN[ Ps#P[ PsO[ PsPK[ QsK[  Qs*K[ @QszP[ `Qs8Q[ QsP[ QsK[ QsM[ Qs!YM[ Rs!Q[  Rs!J[ @Rs!xQ [ `Rs!DJ [ Rs!eO[ Rs H ! P Rs!J Ss!M @Ss!N Ss H! !J" ! Ss!O' !  Ts!O, ! Ts Hn! !M1^! Ts!O7^! @Us^'k?WC2C7O8J Nl Rint_dO S Wr5TrD::URMVT8dU  &RD ( 0k\ 1F 3r+  78 0< ؊  X R# s8 # o9 # 7 # 8 # : #( 6 #0 8 #8 6 #@ a9 #H 7 #P 7 #X .7 #` #h 7 R#p &7 R#t 9 #x : F# &9 y# 6 #  # &# 8 /# 8 0# 9 1# 6 2# 9 3-# F 5R# : 7#1 (  ? 44c 2r# 2r# 2# L3#6 h8   # 9 # t R#j<j< d ?c d ?1 OWRGR X# 8' ?IRKR%'E dT ?ZW(~X W"RAY#S$fY:?TpFUK WL# UWM#R  GTSR# fYTR# {XU#Z> W[# UW\# {X]# b Wc# UWd# gXeR# Sf# -Yg#l Tm#r /Us# >XtR#y Sz# Q{R# V|r# SG}N@V_rt^ Wh>KYnDVu-T} @R# XAR# mVCR# U~# R ?TSUR Q+fUQ!F S## cS+'# X.R# qY1M#@R@+L7UTWV}YYS"VWT:V SXTS AW W wT WKXIUkSR V U# S# MS02u R4# JS5# @R6# T7# W8# &T9# 4S:#(RS $ D&R# h&R# &R# &#cb&#RS'U(*t D,R# h,R# ,R# ,#cb, # , #   R t  U0U DWR# hWR# WR# W#cbW" # W # DXYR#(  R  UZ [| XVURVURr d$ q1 q1 sp # x# ctx$ # Ĉ%# 2&-# #: :$Y# %Y# E&# )J ){ K 2 3- ב. # / #{ M^ O#cswQR# R # 3Td #(fidV#0sid`#4 gvb{ #8 \c{ #Hfi{ #X j#` Xk#x >l #!t^ u u j  6Ys{ 5F6`4 d4 f6 # n X4 # l4 # c4 # 4 # k# ? R9 ? Ï%T +{ #Z6._ "Rx Y 4 >5 #lsn6# x0G 9iH # 4I # WJ&# K{# kK{#(*PN%4N565w6 ̔S lsnT# 5T# V&# QW2# MX2# 5Y>#( \5ZJ#0 x[P#8 Z6cV#@ 5d#H |JeR#P OfR#T XgR#X Oh#` ix #h *Pj #x l\#|! ! ,!58!X5D T ; r) Z+# -# /# 30d #Q-&/,..w.2,h.n,-- - {, 4 k# N# :O# *  k# :O# Od# P#4*? -.  k# P"d# J## M$# SE%#-.&#](Y )k# K-# P5d# XO;# GOAd# KG#$ LJ#( OM#, KP#0 NS#8 YLV#@ JY#H Q\#P M_#X Mb#` nQe#h Nm#p Qpd#x Qs# Lv# .Jy# |J|# O# N# *P# O# WK# Kd# 1Kd# P# ?Q# P# K# M# `M# Qd# J# Qņ# KJ# tIY#_pMp!pM$gR $D%H=u#%D>\#&.>&'nb(.>+'nt(->1'n'R).>:'nzv*;.:'nz+Bu,,Pcu,u,v,v,,v-^ $vv.v#%= 4Y#% 6r#% 9#/ 'AY'#0log ,0 '#1^ /#4'.Yr1^ 1FR'.42 h'.'R3! v4E#5!"'U6!&v'U'R5!*'U[v7!+ a'U[ d#8?),R"RE9K::v,,v;6G{C*Chow;Rl? U<XCcC@R8cCCP6A86h{ @WNCʙCyA DN6hAxN6`BXZʙC CAxZ6hCVo6 CCpA Do6hCRRCVCAx6hBW4VCpC0;Dm4;h9 ETRM\pCeCDmM;HAiM{@FCcCG P{hHpIfR XFCȚCGXR`{ BUgeCC Dmg;hEqUr\CʛCP;Dmr;hBVʛCkCDm;HF֛CiCIf `JU `OK֛CCGXhFAC]CGXX d ?BS7kCCTDe7PhAT7-`F{CޜCJUT @ODBS>C\CpDb>PhA>T`Dlen>-XEVZR\CCA*:ZhLeCC0DfmteY|9FCCIapg}Ibufh|GQh~G>Fh~GXn) }GBTqu~GEr|G=Ss~ d ? Y ?YEc~RClCSA*:~HAqK~DFCjCIfShGJ`GK\GVXGXRd1ETRlCCA&:XA77PF|CCGqXhJX O d ?M"WRCCPpDoutP{F0CCGÏ; sG/W{G9W}GFv{_ 7WD# -WD# UJ#N'V\N'VbuN'VOCCC P>hhFCCJ9WDhJ/WDh#QoutJh#Rҿ XS|W C_C>out PHFCSCTi"hTkey#`RP#XeUR2Y_CjCpVNT:jCCW`W@RCC0FCCTpE\FCLCR=LRX<\WdC"C>wdh=VdRd <Yr"C=C >wrh=VrRd<'S=CYCP =R~XendCFNCYCR 4 sTfdRlTsa~\&/&fzS#,d fo  Y&hf+RQ|&f̔o&%fBS$P!g[fU%+&&GXK dsdVP#  @sdVQR HsGdVR hsG=TT8' ps( fWWTR/V7 xsE;YJ Nl int;@O S Y(k.#f.#s5#l#a5#h5# 5W$ Ws CEq_ېO CJ  $cS  &|int 0\ 1l  3O +  7CJm w1` zCN|c C: 11(!11 44v 2# 2# 2# L3#1f r) Z+# -# /# 30# tg[2 g[@ 6*A 7#G 7#gct 7#A 8#= 9#H :#MG ;# 7 <#top =#YE ># Ĉ ?#$C @#(env A#,B B#0k= C#8<4|HdB!88=Gc,7`F? 7`x_`|#a#2\b#6\c#WJd# ;ae|#(Pf|#,EZg|#0AZh|#4]i#8ak|#taJ3* ; eS # Z#  |p}#lvl~|#L# # SE >  B<  D #B<  < " D ##< $a r< uq Y` {Ybuf |#n }#sz ~# Y` % HD qpcr H dlB O  gcr i q#it #  Z #tp # lo #hi #u64 n !fr u32 lB  ^  *A # G #gct # Y # # 4j #len # ^ Z A _ *A # G #gct # BC # : #env #len # @ # Z> # A  a *A #G #gct #ea #a j TG@ ! *A "#G "#gct "#E ##G $#A %#MG &# k '#uv (#hC )#F *#D +# yE ,#$X -#%[ .#&-G 0#(? 1#,? 2#0G 3#4D 4#8= 5#<TG 6 ?_ Z  ^a  `P ב a# b#!tv _O( *A [#G [#gct [#^ \#` ]# #v e#x` f#?_ g c( t~ *A u#G u#gct u#%A u#8< u#env u#MG u# pc u#f v#c w~ #  c x F z. *A {#G {#gct {#%A {#8< {#env {#MG {# pc {#D |. #> F } "Z( l !c  !l > Z J &  val O#key O# #G #& x ?  *A #G #gct #HG #C X#/ #MG # @ ## #9 #@ #?  # D1 $PE$sH$<$F$ I$D$=$=$A$qE $C $C $I $H $G$D$D$@$p@$ G$@$=$>$i@$J?%MMS  # Eu $@$B$>$G<#$F$$|@%$">&E = d8 A #P #[ #\ # @ # : # b # ) #Q #` #] #^ # 9c #$ \ #(d #,a #0d #4d  &N_ ;\ # a #[ # x[ #q[ #gc # ac Y#Xa  #hd #] #E[ # Z #!c #a #_ O#e O#$` O#4[  #(\ q#N` q#^ #b # #Z # c #` #)_ #\ #] #[ #'q %N_ O D S3*A T#G T#gct T#@ U#: V#env W#MG X# @ Y#D Z"b@ j!gch k3!str l!uv m !th n!pt o !fn pl !cd q!tab r !ud s_b t?(($B$4F$E$a>$*I$A$\?$E=$@$?$D$@ $.C $@ $= $F \d`?b d (# Z3#sibI# I# # dTcd,f  ekfprk#gpr{#@ Ĉ# [# [# G_# b# .#{ 1 Ie^*tab*#top># b# L#g0# `6# ,[6#(cb#0 4j<# L ^)-$b$_$`$Z$a$@]$Z$Hb$]$b $@^ $c $^ $` $^$QZ$,^$]$A`$~`$Y$a\$Z)^N$|A$<$F$=$C$'=$=$B$D$lD$C$F$F$F$<$$C$\=$0H$:C$@$>$=$A$H$nA$A$?$ ?$B$pC$E$D$4E$&F$C$?$A$9H$zF$A$D$<$ZH$A$:A$<$C$hF$A ke# {^# 7]#  # \!# (c$$$P$z$$$[ $ $*DIR +`,)r)$d$$ $q14 q1PspP# x#ctx$)# Ĉ%# 2&8# # :$# %# E&#()$+HxC$$$ $ $$ $ $ $$^ $p $ $ $ $$$$$$$l$z$$$x$$$$$$$$0$< $H!$T"$`#$l$$x%$&$ '$0($)$*$+$!,$< -$.$ /$0$1$ 2$3$L4$e 5$6$ 7$8$9$:+)t$K $$$$$2 3- ב.# /#t MW O#cswQ|# RV# 3T#(fidV#0sid`#4 gvbt#8 \ct#Hfih#X jv#` Xk#x >ln#bb1W e(*c) \0+ [,|# [-|# .# ,/t# 0# 1t# P # Nq# :O# *  # :O# O# P#P*[ -.   # P"# J#q# M$q# SE% #-.&](u )# K-# P5# XO;# GOA# KGq#$ LJq#( OMq#, KP,#0 NSq#8 YLV,#@ JY#H Q\#P M_#X Mb#` nQe#h Nm#p Qp#x Qs,# Lvq# .Jyq# |J|,# Oq# Nq# *P# O,# WK,# K# 1K# Pq# ?Qq# P,# K# Mq# `Mq# Q# Jq# Q,# KJ# tIu#{pM pM,Z$2]$c$d-^@2 1.1#/^B0! 1logGn\ 0' 2^#0! 0|-^$2 ! .2 #3=4#36#3 9 #4 'A0 1log,010 5^/0 5^10  12 1 0 0|- 6 2 7!#/"` g 0!8&2 } 0!0|/* 0!!2 9+ ! 0!!  11:|!;!< 2 : :2 =^ [!>L >o >v [!?\ @Ya>!>cts!>id>L@Z*!>cts!>id>@[*!>cts!>ct*@Y{! ">L{ABcts}!@Z*B">cts!>id>ABct*Cd &~"~"Dcts &!Did &>Dsz &3AEcd (~"=;[ ">L >o >v ~"FdG4CFC|"GrGhH6GFC\CF]\CC<7#G%lIx C2CY#g#Jg#h K[BCC#G DB#hGxB#`tFVo#CC\#G Do#hFc#CC$Gx#hLayC(CF$MfyF$hK^`(C?C|$MfF$hMsiddN[W?CC$MLWhMoutW$`$N\eCC<(%MLeXGdePOCCPoutihQ^xlbCC%MLxHMidxx|DOCCRzhSC!C%Parg`RPePO!CCPcd~"XL`~"CC(ML}Mid>}G?|}OCCPcts!hPct*`Psz3}Pcd~"XPoPT!C\C&U!HOC9CV!@T "\CC'U)"U"WV5"X!\C}CQ'U!U!Ya!qCtCU~!Ur!Y!CCU!~U!Y!CCU!~U!~Ya!CCU~!~Ur!~TB"4CCP(Ug"~U]"~UR"~O4CCVr"~Za!~CC /U~!~Ur!~Z"C%CU"~U"~U"~Y#!C%C UN!}UD!~U:!~U0!~QGae|CC\%)MLXMvalPOCCPcd~"hLZ|CCV)MLhLb|CC)MLh[saCWC|)\Lh]`OCUC^1) 0+O) )[h]$WCC~*\L$X\f$F$POgCC_top+|lO"CC_ptr>P``[TF$CC<*\LTh]SET|d`l`ZF$CC!+\LZX]=Z|TO#CC_f_F$h`Acg|CCs+\LgXOC C_fiF$h`boCoC\+\LoX\foF$POCmCadsh[SbyoCC,\Lyh\fyF$`[`CqCA,]dh`&bF$qCC|,\LXO}CCa`F$h`b|CC -\LXOCC_fF$had`^1- "+O-  -`6d|CC<s-\LXOCCa`F$h[dIChC/\apbW_LXaC|Ta"- .__L#C|#b .#.0.-.:-b..E.0.9.:?.-bP.W.0.cC CIC|.?.J>.hv.O,CGCdLs-h^Ch#S,CYC.a`6F$e._e/HW@_e/@/:-  /: `[_>/hCC\/\L>XOtCC_fAF$ha@eB`aYC|d;`dZN|CC/\LNXOC C_fVF$had^``Ocg|CC0\LgHOCC_fiF$hadl`a7Gp|\_fidu|X^10 +Oa\T0 0[^CC|'2\apbWpaC|\_LPa"1 1__L#C|#bH1`10N11Y1:1bk110N1v1:|11b110N1cCCC1|1J>1h1OCCdLs-h^Ch#e2_e'2HW_e,2@/ /`/_|CC<2\LHOCC_fF$had`aC|\`a|CC2\LXO[CCa`F$h`k^/CCw3\LX\fF$POCCaF$hOCCa`F$``_|CC\3\LXO CC_fF$`a=h`a.|CCZ4\L.HOCC_f0F$ha_1|dOOCCa8X` [H|CKC4\LHXOCICaOL,h`1ZT|KCxC|4\LTh`C\[|xCCB5\L[XOCC_fid]|l_f^F$``_k|C-C<5\LkXOC+C_fmF$h` d{|-CpC5\L{hfaWdpCC6\Lh]SE|d[J]C-C\6\L\outOC+C_top|dO#C+C_i|lONCC_cd~"X_szP_len|LaRd|h[]-CEC7\LH\out@O=CCC_top|hOLCCC_i|lOwCC_cd~"`_szX_len|TaRd|P`^|ECtC7\LHORCmC_outX`^|tCC|U8\LHeA8_e[8XW@_e&k8Pg`8:f8U8 /`]6|C2C8\L6XOC0Ca:hhhcDqe2CC<9\LDh]jD`]*]E9X9*[ZZCC9\LZXOCC_i\|lOCCa]`[ZoCC!:\Lo^]:Oo^;OCCa`q!:^aÛrv~_offt|~_pu~2:h[\CC\:\outHOCC_p:hSC5C:aX:`OCCaX:X:t[bCCI;\LH]b@OCC_dlX_p:P[UeCC;\LH\dir@OCC_dh;haZ;`OCCa`XN[^CC|x<\LHOCC_top|dadXOC}C_ptrhWpacPfZdCSC<OCLC_LPOYCC_s6<Xh'aGN[SCmC<=\LGh`_T|mCC=\LT\strTO~CC_bufVX_rX|Te=_eb=HW_ed=@/ /`dn|CDC$>\LnX]TnPOCBCas/ohS\xcDC#C\>\LxX\outyP\stryHOXC!C_r||lOCC_msg``\/#CC?\strXO/CCa%[`_r,hhcw]CC?\L\cfg?OCC_b_keyPaP@_i?XOCCamaH![Z^C1C|9@\apb_OCC_LXa`9@_J@[vZ1CC@\LHO>CCa|\hL^`CC<@\LXOCCa]F$hfb([CCWA\ctx(X]Z(8POCC_L*hiUL sjcfg*!k DAlmyAA||;mg>AAmoF$R~dAt WsBlmYOAB R}CP B Xsidu Xs*XB Rw>mB @)OHBac Xs*B aaB )OB*B a\B  *OB*B a\UC +OB%LVf4CD}O8J l O S intD:i:iUbbN>fifi Ub@fKb GR X#8+IRKR %+ exj )fz# f{#E 1 ( 44  2 M# 2 M# 2 # L3 #1 f 0? 3M )3K 2 ؊  X b# s8 # o9 # 7 # 8 # : #(6 #08 #86 #@a9 #H7 #P7 #X.7 D#` J#h7 b#p&7 b#t9 p#x: F#&9 T#6 P# `# &{#8 /#8 0#9 1#6 2#9 3-# F 5b#: 7f#6 h8 8  8# 9 ># t b#33`vtm8 fb# fb# eb# fb# eb# eb# fb# eb# fb# Lfi#( e#0'rJd$ q1\q1xspx# x#ctx$Q# Ĉ%# 2&-# # :$# %# E&#) 3-% ב.%# /%# M O#cswQb# R~# 3T#(fidV#0sid`#4 gvb#8 \c#Hfi#X j#` Xk#x >l#t+ ? ?# N# :O# *  ?# :O# O# P#?*J -.  ?# P"# J## M$# SE%#-.&](d )?# K-# P5# XO;# GOA# KG#$ LJ#( OM#, KP'#0 NS#8 YLV'#@ JY#H Q\#P M_#X Mb#` nQe#h Nm#p Qp#x Qs'# Lv# .Jy# |J|'# O# N# *P# O'# WK'# K# 1K# P# ?Q# P'# K# M# `M# Q# J# Q'# KJ# tId #j 6G4CJCayJC|C\ fy h+0f<|CC 1* D1+)y&)o ,cfg*(f3n $Xs;)X.~NgD$DPS int0Tl  3mO + 7J N# :$# %# E&I#E /) key*b# val+#.GbKi8[ p\# b]# ^# E_# Z`# (a# b# d#$ e#( 'f#, z g#0(g9 key:t# val;#k8[ p\# b]# ^b# E_b# Z`b# (ab# bb# db#$ eb#( 'fb#, z g#0b]kU keyV# valW#gh8[ p\# b]# ^b# E_b# Z`b# (ab# bb# db#$ eb#( 'fb#, z g#0 4bD/D< 4X D-D1 |-Ob7h I0/D]Dm .linch Zd M/]DbDhP #Hargɍ@ rD[Dk`idinc\( .bD5D\hP #Harg@ wD.Dk`idinc\KX-N5DYDhNXxNTargOH8ljkYDD^hjXxjTargkH lDDsmhynbd9gujD D| D Dhwhii DU Dhhok4iU D D<hhkh DQ Dharg DJ DsP'\ D DiX D DnLhg;Q D7DEhXT'PargH g D5Dshthh7DD\hhZdargXvjbDD .blincbh Zbd gbDDk hk P #q Hargɍ@ DDkb`ibdincb\w  JkbDD| hk P #q Harg@ DDkb`ibdincb\KbXiND D[ hNk XxNbTargOHljh D{D< hjk XxjbTargkH DyDsmk hynbdhuik {DcD! DaDhwk hMlhcDDU hk hjkDOD\ hk hfGgODD: hk arg `DDsk P'b\ vDDibX DDnbLjf;DD hk XbT'bPargH DDsk hkkDPD| hk hZbdargX gH;PDDy aHXbHP `DDalJmlblJmh *j^bDD< a^ Xarg^P DD_k``la l b{gbD$DB .blincbh Zbd kb$DSDhH # @argɍ 9DLDkbXib\incbT 9jbSDeD\chH # @arg hD^DkbXib\incbTKbP@hNeDDhNXxNbTargOHijiDD*hjXxjbTargkH DDsmhynbdlgukDD|t DDhwh9kjD DhhjOh D D<hhjj D"Dharg Dz"DsP'b\ D$"DibX !D "DnbL!gWi;"Dg$DhXbT'bPargH "De$Dsh%lMjg$D$D\chhZbdargXnyc;;g>{m !L -O@Pm$D8DO8J Nl intZ_O S WmD::UMM?MV @ _HmÂpmB  U Jm  p&MD(0f\ 1F 3m+ 78WM GR X#8?IR|KR%E _?1 (? 44 4 2 m# 2 m# 2 # L3 #1 f)pK 2{W (q~X W "MAY #S $Y : ?Tp F| K W L# UW M# R2 GT SM# fY TM# {X U# Ze W [# UW \# {X ]# b W c# UW d# gX eM# S f# -Y g# l T m# r /U s# >X tM# y# S z# Q {M# V |m# S G} N@ V_rt ^2W heKY nDV u-T }  @M# X AM# mV CM# U ~#M?T S UM Q R fU Q !m S ## cS +# X .M# qY 1t#gMgRs!Eqmq4ouqlqpolSmo lZql5m mmp nmS $yD&M#h&M#&M#&#cb&#M!y S'!U(*D,M#h,M#,M#,#cb,#,# M g07D9M#h9M#9M#9#cb9#9# fd;M#(<M#,M$ g=$po0AKDCM#hCM#CM#C#cbCa#atCp# nEp#([[MKl}mprd$ q1q1sp# x# ctx$# Ĉ%# 2&-# #L :$T# %T# E&>#)\  3- ב. # / #\ M? O#cswQM# R# 3TE #(fidVT#0sid`T#4 gvb\ #8 \c\ #Hfi\ #X j4#` XkT#x >lb #t? V V K  0s ؊: XM# s8# o9# 7# 8# :#(6#08#86#@a9#H7#P7#X.7  #`  #h7 M#p&7M#t9#x:F#&9t#6 # #&#8/#80#91#62#93-# F5M#:7 #6 h8x x # 9~ # tM#A s A s _ ?: _ ?  f# N(# :O# * = f# :O# O_# P= #C  * -.  f# P"_# J#(# M$(# SE% # I -.&T ]( )f# K-# P5_# XO;# GOA_# KG(#$ LJ(#( OM(#, KP{#0 NS(#8 YLV{#@ JY#H Q\#P M_#X Mb#` nQe#h Nm#p Qp_#x Qs{# Lv(# .Jy(# |J|{# O(# N(# *P# O{# WK{# K_# 1K_# P(# ?Q(# P{# K# M(# `M(# Q_# J(# Q{# KJ# tI# {+G F -# > .-#vn qnpqpnn op 7q5F l -q# l#_? q8@ o# )m# p@# q-# q# 2n-#( >mM#0 q} n-# pM# epM# *neq6`I4T d4 f6# n  X4# l4# c4# 4 #f?Z6.$!M=TT 4f >5f#lsn63# x0G 9iH# 4If# WJ_# Kp# kKp#(*PN4N565w6 ̔SlsnT3# 5T3# VT# QW# MX# 5Y#( \5Z#0 x[#8 Z6c#@ 5d#H |JeM#P OfM#T XgM#X Oh{#` i=#h *Pj#x l#| (ITdirJ#fK# !FM# MN-# OM# TP #$ 9R#   0 @71# i:6# w79M# 9:T# 8;T# <#Z5X5l;7):m7h _"?++]l f= @# 9iC# {I#0 oJ#8 pR#@ AnS#H AV#PevX$#M+ o b /odM# !of# smh##X:$D$D7$X:Ml%p=$D$D&onM$DX%D|'Th (bnoX%D&D)a%D&D*qP+pid\(Qnyo&D&D<O'XOTh'LMd)&D&D*l+ s, n&D'D' zX-fdMT'9iH)&D'D+ioh+$,p'D(Dr'\5r~'M~)'D(D.(oM\/msg~/iovx@.m.|pP.nM?_?F#o,(D+D\$/o,M~) )Dv+D..@/sa/~_?0:pjM+D,Dz1msgjzX)+D,D.|plh21 p0O #^oy,DU-D()$,DA-D/msg{~/iov|x@.m}.n~M.(oMX)u,D)-D.nM\%lU-D-D|3l-D-Dv$Ml#m-DG.D($M\)-DE.D.ql. P0O)-D,.D.NqMd/pidl).D.D/rMh_.?0=oMG.D/D$(oML)S.D/D/pid\# p/D1D/41/D)*/D1D.nM\.MX.fS|.l}."q~21? 00O_??/#\m41D~2DH1w4H$V4MD)1D~2D.(o6M\.7>W/rc9MX0oHM~2Dn3De$H1rowHT$6HT4!nZ43D)2Dg3D.(oJMT.KH/lenKX#Npbn3D8D$(obM})3D8D.d/sae}/lsnf3/rgX.cm.0gn.q$}5cfg * 6K /6U2M\MTMTT76g>i<8 Dp 96y}6of6̔o6n%T*lQM s*oi sc]RSw1(<SLLN442#2#2#L3#O 1f1OշJ l int  S @  B &D(0\ 1 3+ 7`z9?s y   G G @1?~=AA#dg' 2H Ƅ23^1%9NUM F6^M>:N;G#:O<# @5B# L#gGNG#dSG#ZT#:OU9# ^ G;IJ.;P}uk  RsS#wWT# tv w<#y<#<{G#}G#d#   s J    #/:$#%#E&1#)?Hx     ^ p    lzx$0< H!T"`#l$x%& '0()*+!,< -. /01 23L4e 56 789:E L )K 2tIp'dSE(d#.G#P 6G#TM;#Xno>G#`<A#hztL }& t k (id)<#d0G#2G#>9G#EG#TM# T18C:*#eof<;# *   G  ;  0  dL{Ls#pos#  sU(*(D,#h,#,#,#cb,>#,8# 8 8  ( g07D9#h9#9#9#cb9#9# fd;#(<#,   D  po0A_ DC#hC#C#C#cbCu #atC# nE#( o o  _ r d$   q1 q1 sp # x# ctx$ #Ĉ%#2&#3-< ב.< #/< #  M O#cswQ#R #3T #(fidVG#0sid`G#4gvb #8\c #Hfi #Xj#`XkG#x>l #t  S  B Q- &t /,..w.2,h.n,-- - {, ! !#N!#:O! #!t * ! !#:O! #O!#P! #   *! -.!e ! #P!"#J!##M!$#SE!%e # k  -.!& ]!(!)#K!- #P!5#XO!; #GO!A# K!G#$L!J#(O!M#,K!P#0N!S#8YL!V#@J!Y #HQ!\ #PM!_ #XM!b #`nQ!e #hN!m #pQ!p#xQ!s#L!v#.J!y#|J!|#O!#N!#*P! #O!#WK!# K!#1K!#P!#?Q!#P!#K! #M!#`M!#Q!#J!#Q!ź#KJ! #tI!#  q r)!Z+G#-G#/ #30 #x(",t9x"-&#c".&#W{"/&#}"0&#t"1&# z !{#+F #-#> #.#5$L 6%`<4%Gd4%f6%#n%9X4%#l4%#c4%#4%9#IL&+X]l f'='@#9i'C# {'I #0o'J#8p'R#@An'S#HA'V#Pev'XD#    X  z%5f'X#iU) #6+#4w( 53 7 #buf 8 #pos : #end < # >#  `yr   k3 m #Z o#pos q# s#iov z#L L*u Cpos #> #Z #tH đ gu Ǒ# P#in 5#out ˗#0 C 9sw€Y[s :[s :  ![s : " :  T EHr FG#X GG#cas HR#vH Q{ R#q G#x G#  R#q R#~ R# #%.>&EQ  &.>+am  &->1}  '.>:   (;  )BU*D* C U*U*XU XU  * ** +^@,#-^BEV  .logGn\sz /^  +^$,#$=4#$6#$ 9r#0 'A .log,0$ 1^/6G  1^1Ye   / {     2 63#-" 4&  -*   5+ )  +s,#6`l  -u}  /6  +h,#6 a g/ a  6* 67a0%Zz;B /S   *m 8L   *e9 : **;<<  =WAWA@>h=] WAXADM>h? C2C o}@}h   ?"DD` @h A8z8D=8D BsphC2Gd Dj$-<-<  =XAOXA Xa>h=+PXAvXA >h DBU<<  = vXAXA >h=XAXA@ >hE4G=8Dt:D C4 XFI8Dr:DG1 PAOHb7h   1Dh<<  a=]XAYA >h=WYA>YA` >hETGt:DO@D CT HBendT@F:DF@DG1 AOHbWXIZXP A O@D@D Bbuf XCPGTFZ@D@DI5h 1E`G@DFAD aC<`hFADDADG1q @AOqL aEkFADAD CXFRADADI<hG1 'AOL EADBD@C<CBiGFADBDI@HI' XJ6BDqBDI+ hHidxdFBDBDHlenGT  Ey!BDPCD:CݤXBiGTBlenHFBDNCDI@hK PCDyCDyLityhM` {N6GyCDCD`OS7CDDD Be7 hCT7`FCDDDG1  ~AO  L  OS>DDDD e Bb> hC>`Blen>XENDDDD CN hBbufN`BszNXCNrNP DA{ GDDDD C4w G h 5ACs NDDED@3!C4w N hAD EDnED!Bbuf !`F"EDhEDHsvp h E )nEDED!C ) XBbuf ) PBsz )HFEDEDHn ,h;""<"PE :  Q!EDBFD`D"U">"h>"`A LRBFDFD"C  LXBend LPFNFDFDHnum NRhFXFDFDIn P1gR WFDFD B#Bb W XBf WPFFDFDIq6 YhIZ ZGdR]{ _~FDdGD#Bb _ XC@ _PBlen _GLFGDXGDHbuf a#`I>F b h#LSx lqdGDHD4$Bbuf l HFsGDHDI@ nXIm oGTOct zHDJD@%Bkey zCr zGCX zGC zG~C {~FHDvJDI| }G`I ~G\Hcas R 0XsHm @Hreq  hHb %Ix d(%L*O9 JD=KD%Bkey XFJD1KDIx GdI| G`Hreq  hE~ =KDqKD%Bkey hE ;&qKDKD`;&C XF}KDKDHlen GdI@ hG1Q& AO Q&L A&E KD>LD&C XFKDLDLD 'C@ XC~ GTFILDLDHi lA LDLDg'Cts tXC PFLDLDHctx g'h OO| LDOD'Bout !HFLDODHbuf  hI PT 1{ODSD@ )Lout !Mq~ M  ~Mv ~FPDSDG1 ) AOFvPDxSDU hVm %)XUP HU PUx GdU~ GUH~ GVkey Vlen #GVit ${F^RDRDVb > @  +) Wr PSDTD)Lap P HFSDTDUO R]hU TXVit U)` JEs $TDTDSC $ xCt $xXw DX i fDXj DX ` 1DX] DXP DX DX,v H DXC {DX+{ T TDX > vDX6 kDX܁ 5 ADX) [DXց , DX KDXЁ # ׭DX DXr ;DXʁ  DXr +DXā  mDX DX DY ܬDXu DX< DX DY gDXu ^DX  8DX DXx DXu DXڀ DX DY DXk DX \DX^ DX 'DX DX| DX DXv DX DXp DXق {DXj `DX̂ kDXd +DX [DX^ DX KDXi J zDX ;DXR DXt i zDX +DXL _ ;DX DX| V DX<~ DX\w M ѨDXz DXWw D DX0~ DXRw ; gDXz DXp 2 2DX$~ DX~ DYHw DXt  +DY3x DXz DYCw ѦDXr  ȦDXMw ) DX~ DX} DYt DXyt DX>w [DXk +DX} {DY9w `DXWt DX} kDX0 oDX} [DXv DDXv "+DX} KDXv DX} ;DXv ڣDX} +DXJ !DX} DXv cDX& [DXw} DX,  DXv DXk} DXv zDXy DXv qDX DX_} DXv h}DXx DXv _HDX@} DXv VDX4} DX|v MޡDY VDX(} DYwv DX} DYrv @DXt ,DXs <mDXUs "DX} {DYmv ŠDX DX} kDXhv zDX| [DYcv ODX=s DX| KDX7u *SDX^v )^DX7s JDX| ;DXYv "DX| +DXv DXu DX| DX, DX| DX}| DXu (DX1s  DXq| DXu DXe| DXu DX!x DX  wDXx DXu BDXC| DXu  DX7| DXu ؜DX{ DXu vDX{ {DYu MDX{ kDYu DX+s UDXw e2DX DXq ,DX{ [DYu ߊDX~ DDX{ KDYu ?DX~ 6%DX{ ;DYu DX~ (ؚDX{ +DY}u DX~  DX{ DYxu ܙDX~ әDXz{ DY DXu wDX` ' CDXn{ DYsu 3DX~ *DX{ DX|~ DX{ DY2u 齘DX~ DX{ DX-u ̗DXz DX(u DXMv DXs lDX '{DXz DXz DXu DXz {DXu ȖDXH  oDXz kDXu DX2v [DXu ^DYB 5DXz KDXt })DXd $KDXsz ;DXt tDXgz +DXt kDXx пDX[z DYt DXOz DY~ 9DXt >DXt \kDY6 zDXl~ L DXCz DYt ʔDXb~ ;DY0 /DX7z DYt DX]~ ) DX+z DYt œDXX~ DXz DYt zDXS~ `DXz DYt DX} DXy DX| ђDXy DY| 馒DX} DY ̽DXy DX=u !DXRt "DX} DXt {DX DXMt DXt kDXHt JDXy [DXCt DXy KDX>t DXy ;DX DXy +DX4t nDX{ g :DXy DX/t 9DXy DXs DXsy  DXs ~ϏDXgy ~ DXs uDX[y } DXs leDXOy | DXs c0DXć DXCy { DYs DX7y z DY} DXs DX/r y DYCx D"DY-x D3DXj kDYx DEDXۄ 8 DYw VBDXq %[DY(w VDXՄ / ۺDYv VDY DXt DY DX DX DY BDX 9DX"t DY DX ݷDX׆ DY ߙDX DXʆ DX NDXt DY #DX&v }DX DX  2DX {DXރ x DX kDX؃ o ҵDX [DX҃ f DX KDX̃ ] hDX| ;DXƃ T 3DX +DXC K DX DXzs  DX7 ; DX DX1 2 fDX DX+ ) 1DX DX% DX܅ DXυ DX  DXW #;DX… DX  eDX DX 0DXV DXr DXI {DXl ƲDX< kDX~ DX/ [DX" KDXM /DX ;DX~ DX +DXG űDX DX DX DX DX5 DX DX DY 餰DXv DX DXv &DX 'DX; cDX s DFUDJDHcs &~Hp ' XHpe ' PI ( HI ) ~Hkey *~I1 +GIv +FI1 ,@Hcas -RIs -RIX .GIr .GI .GI~ /I 0 ~I 1I 2]Iq~ 3Hin 4 ~Hout 5!~I*u 7 x[0JIGr |F1\D\DIR |[`:JI F|FDSDHe JS|[tJIGr {F^D^DIR {[JI F{F[DDHe JS{[0JIGr {F`D3aDIR {[`KI F{FDDHe JS{[XKIGr zF@cDcDIR z[KHb b zI@ czIm dGxI gzFDHDHe wSz[0KIGr yFHfDfDIR y[`XLHb b yI@ cyIm dGxI gyFUDDHe wSy[LIGr ~FUiDiDIR ~[LHb b ~I@ c~Im dGxI g~FDDHe wS~[0/MIGr ~FulDlDIR ~[`gMI X~FDLDHe ^S}[MIGr }FoD^oDIR }[MI X}FTDDHe ^S}[PNIGr }FqDqDIR }[KNI X}FDDHe ^S}[NHm |;&}Hb } }I@ ~}Im GxIP RI }FDADHe S}[0IOHm |;&|Hb } |I@ ~|Im GxIP RI |FNDDHe S|[OHm |;&}Hb } |I@ ~|Im GxIP R~I }FDDHe S|[PI {FDEDHe S{[8PI |FMDDHe S|[PpPI |FDDHe S|J~DHDPHf S{JDDPHf S{J;DDPHf S{JDSDPHe S{[6QIGr {FxDӁDIR {[nQI OzF[DDHe SSz[QIGr zFƃD!DIR z[@QI OzFDDHe SSz[RIGr zFDtDIR z[RRI OzFDHDHe SSz[RIGr yF~DوDIR yJPDDRHe ASy[@RIGr yFkDƊDIR yJDD SHe ASy[pFSIGr yF]DDIR yJD=DiSHe ASy\Vr = y S* S S S S S S S S S S S S S S B S S S S S S STjr sxTDD`TM s HMt s@Xs DFdDDVrc u\UIx vXUu wlVin x `Wr DDVLap  ~\U D~Ut [UUF  ]  #L} #^6UBU  ^MU^U   U^iUpU _CDD U@>Uh FDDGhGth#[0UVe VX\`Ve  VP V* V*`T DDPVM*: PVh | a>v DDTy yDnD@VMXO XMM TFDlDVsp hUs  `sTI ;nD-D6WFvD+DU hT r-DDWM5  F:DDU \G1W `AOUO PFADDVe WHWL W STf )CuDD`XLap ) X0 0DFDDU +XJD8DXU5 4 HF[DDVj 6TFgDDVlen AGU@ B@F8DDVe HX VT* O{DeDWYFD^DG1gY AOFD]DVe XlYXgYL WY VT!| _eDD YFiDDG1Y @OYL YEUC DDlZ)BUCFCUX;mZ2Z<2Z<  QZD"DYZbZ>Zh;4pZZ<2Zbfun&Z cbZ"DND,ZZ>pZh>zZ`DsZZ<Z<  =Z YAYA[[>Zh=Z>ZA&ZA=[F[>ZhdND|DL[M flM fhe|DDfcfg)*| gAAh[hgy[ [ 9gg>[ [gE1XgrW\ i DgUY(lN#t+ B B!7wc#N?#:O#T* c#:O#O#P#*-.E  c#P"#J#?#M$?#SE%E #K -.&]( )c#K-#P5#XO;#GOA# KG?#$LJ?#(OM?#,KP#0NS?#8YLV#@JY#HQ\#PM_#XMb#`nQe#hNm#pQp#xQs#Lv?#.Jy?#|J|#O?#N?#*P#O#WK# K#1K#P?#?Q?#P#K#M?#`M?#Q#J?#Q#KJΞ#tIϰ # Q r) Z+q#-q#/#301#/)* key*q#val+#.GqKi8[ p\ #b] #^1 #E_1 #Z`1 #(a1 #b1 # d1 #$e1 #('f1 #,z g #0 1 < ` yr / 6 f6 #< #w;^@  #^m y  ^B  |logGn\C  ^C  J^$# =4# 6|# 9#! 'A>Elog,0 bi"^/{ |"^1    JC #C $ %#"&&0=J*NZ '+ t (J)  #*J+,#Z#- ".". /WAWA MV0 h/] WAXAl|0 h1R8DD28hH1[BDD, 2 DBh2xB`1WNDVD 42 DNh2xN`3XZVDD c2xZh4VoDDL!2 Doh4cDD!2xh4RJDD "2xh3D%Dl"85toh2x`3%DVD"t5toh2x`6$.. /tXAOXA,#0h/t+PXAvXA#0h-y  +.+7JB7)B|/(E^E#Vo0 h0`0\8 ^EEL$9h:ayVDD$5fy6 h6U.. / vXAXA %+40h/XAXAl%Zc0h4. DD%5hh5x1 d< 401 DD,&2.1 l5inc1 h2Z1 d:M/1 DD&z5hȠP2#zH5argɜ@;DD`,1 DDL'?hH@#z@?ret?argAI D;DDBx1 \=JX C-ND:D' ?hNX?xN1 T?argOHC!_:DD (v?h_X@#_zP?arg`H;NDDBkb1 l1DDl(2.JJl1;DD(2;6 hDE΋D@D,)?2ωE6 ~+; D>DE`G6 ~F1O DOO ?G`_[>@DD)D gWDD)5fg6 hD_DDL*5f6 h;DDF1 DO H-< DD*G%dVDOD +I݌< ODDl+2< \;XDDEב< oD,jD5D+;D3DEω6 hE`6 `35DD,,w2\5wX2VJT;DDDF1 DOE\h0} J5mu< D3D,2O;D1DEAE\ `K2-3DWD,4?f6 hK[ WD}DL-j@O hKP}DD-@\5h@JdLΌZJD"D . ?pid;D DBcw =='JlK-։"DrDl.@\5-h@-Jd;1DpDF1 DO|C߈4rDD.&@\54&X@V4JT;DDBf:6 `;DD=X;,h2HLH\B6 DbD,/?fidBqL;D`D=#D PBkE1 lCCMbDD/@M6 X;nDD=#O `CATDD/C@T6 X;DD=#V `Mb[DNDL0NjND>D0Ctz>DRE 1@zH;KDREF1 DOOpBeXPBe P?#KmREEX1@6 h@`;bEEF1 DOLP6 EFE1 @X?fHP;EDE=6 h;EE=X,`K0TFEE2E ?f6 hKl&EEx2!;EEBf6 hQEE =X,`QEE =X,XQ9E`E =X,P;nEE=X,HCΊEE2|!?out|!X@6 P;EE=nh KEʈEE83j"?out|!;EE=6 hQEE!=X,`QE E""=X,XQ-ETEG"=X,P;iEE=X,HMK EE3M#E'E36 @"".+. /"EEX4"#0"h/"~EE4(#1#0"hR  DqJ#STy?# w# J J +Tg>#W#TzS,1U26  Vcfg*\ |#E!L#  DO#T0 JEo1w  s6 $E3$ E-'EEƎDEjJER^EE"& pA8~#c ~(d~ E` E h8~` E Ei8~3EEK $optE Ep $optEE $iEE,$str~$idx~EE $i~E!E $i~EE$i~E+E$str}$idx~E*E$i~*E}E$i~EE$i~#~͐b~ /    ;%=b E E6d&h'msg`% E%"E6&H'end@(Vh$ptrX(%[`%"E"EX75eXPb he `)W"E"E7tNQXphh$b"E#E8*def$%P֕%H%hc&`SE'b\3E#E_&Ex8H*defEXEPptrFh+_&E&E8*defXptrh!&E'E89*fhSrh@bd! 'E (E9srh@bd!b (E^4E9we\.S]b\yygH-)ECL*EH*E)E2*EU0Y^-E_.Ey(bD1E,4E_b@l2E3Ex~eqb^4EO;EX:wyyg\WJ]bSib^XbL5Ek9ENbH$6Eh7Ebb6E6E"b7E8Ec@bDn@-:E:E[H, leO;EXEb\]WJ\+'?E?E;ؗSHw@yygX+ -?E AE8<b?-X-wPyyg/h M AEAE<MwXyygOh!\AEkBE<J\SXZ\bT\wHb^h+4xkBECEX=T*bxXxwPyygzh)CECE=*bXJSPwHblyyg`+ϑCE}DE>*bXwPyygh+}DEEEx>`?XwPyygh+tEEFE>wXyygh)bFE0HE8?wXݕbdyyghGE.HEb`!|,0HEFIE?u7,XZ,HP,wHb.h!8QFIExIE?yQhQw`!^xIEcJEX@G^Hu^bD^wb`PbufaXnbH`icbl)|cJElKE@Z|b\|wPyyg~hJE#KEH`)lKEKEAwXyygh)KE LExA:*msghw`- LE%LEAwXyygh-܎b%LELE$BwXyygh-bLELEB wXyygh-˔SLEMEBRwXyygh-ÒSMEMEDCwXyygh-bME6MECwXyygh-Տ6MESMED$wXyygh.FSMEtMEdDuXwPyyg h+ŘtMEMEDb\wPyygh+ ME`NE$E b\ wPyyg"h. 1`NENEEh^1SX1wPyyg3h.7NENEEg7SX7wPyyg9h-J=bNENEDF=wXyyg?h.—CNENEFP tCb\CwPyygEh-KNENEG KwXyygMh.lQNEOEdG QXQwPyygSh!^bOEOEG! ^!hw!?{bOEPE$H|!{~ {!~~q~, bPE$QEH!wXyygh!'b$QEEREH"wXyygh!LEREcREDIM"ZHhw`!!cREREI"*ptrhZH`wX+REREJ"*ptrhw`%ɖbREREdJ&#'msg׏h&bd%UREfSEJu#'fhSX&=P(wh%{fSESE$K#&X&=P(wh/SE1TEK#&h)`1TEPTEK'$h)PTEjTEDLY$h,bjTE~TEL$h\b~TE_UEM$X*sP*lbL<)b_UEVEdM"%)X*s)T5VEsVEMv%*src5XZ5-Pdst6h( s %0% @EO % % ![%% @GO % % ̕:& `HO %ѕC#& HO % 8& 7̏NN& HO (& #c& kYy&  IO S& #& 7b& @IO ~&m& IO S& #& 2w& IO &4' IO &u '  JO (& a5' ;sK' `MO %' l`' Ö}v' MO P' l' $' QO {' a' Dh' @RO '' RO ' a' ^( SO '-( TO '$buf s1f1٘19Ra;tVE>WEZJ l O S intNt1(e J4 2B# 2B# 2l# L3l# t1O{ Q-&F / , . . w. 2, h. n, - - - {, Q-3 3B r) Z+Q# -Q# /n# 30#ttVE>WE$NvF~<~ap~BS s\b;@WET^E1(8OHHNJ42#2#2#L3#O 1f-OպJ intl  S  3r)ZZ+ #- #/#30`# t Z 2vNS7@WEWENe7hT7`1 [O H S>WE1XEN+b>h>+`len>X 1851XEiXEDOtb5th1 [O z  <iXEXEO3<`Xe>hךIXEYEPeIXTIP NhpS`0^YEYEdPm3^`XҚ^tP5`hgYEZEPҚgXatgP Dih1 [OH DvZE+[E$Q3bvXXvPpxhi+[E[EQbhX`1 [O t[E[EQbh[E\EDR/b<ap/l``;H O\E]ERb~<~Û~,]ET^ESxt`ZXoutP]EN^Eil]E?^EcLd80OCJ S int0xl  3O + 7C`zCNf@ 1B 1 ( 44 J 2 # 2 # 2 # L3 #1 fE   [ e ț" " " " $ C& 5& P& ܠ& & & 7& & ء& ݞ& ( -( k( ( 9* * {* , .\ O   } T   >  q h   G  f, r ) Z +# -#  /# 3 0q# t8DqF8 uF# E}# gvF!# G8# H#  # : $#  %# E &m# ) H x-           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 :)^ K     2 8-4 u4#5 u5# .#brk/# wW08# Z18# Ξ3w# J4j#( bv5#0^ (:w?2 ?# ?#i;f# B<# =f# >}# gv? # 8 8#^ B 9Bw# B#w  ˠK  Kq#h#4@ Ubf kCCf    ! #"" #&3@ f"*Q]  $+ w  ^$t #%=4#%6#% 9t #& 'A 'log,0   (^/! 2  (^1D P    f  f ) P *f + , ]-SfT^Em_EdSd .<S}+/^Ek_E0ԞUC~0hVJ~/^Ed_E0_t }0_y ~Ut 1d 1U-cqfm_E`ES .<q}+/_E`E0ԞsC~0htJ~/_E}`E0} }0}y ~1d 2, A 3A 3  4 WAWA$Tl u 5, h4 ] WAXAT  5, h6n^8`E`ET7Pew`E0aEDU 8Ze8X/`E.aE9Ξgwh:wf0aEaEU} /8aEaE9Ξyw`/XaEaE9Z8h;ΝaEbEV /aEbE93qh9/q`9ΞwX9wP<bEbEdV 8h7+bEdEV 83qH8Z8@=k1RdE/bEdE9h9Ξw`9Þ8X>1  q^O  ?dEdE$W @bh8Z8`AU $1313  4 XAOXAW\e5h4 +PXAvXAW5hAU33 4 vXAXADX5h4XAXAX"5h7dEfEY83qH8Z8@/dEeE9X>1 `^OBptrP C7fEOgEdY.3q.Z8/fEMgE0`0XDptrh>1 O^O/fEIgE0T/fEIgE00y H8 1d C`OgEgEY+.3qX.Z8P/_gEgEDptrhC#gEgE$Z.3#qX.Z#8P.#8H/gEgEDptr%hEX-gEkhEZ.-XFT>khEjEZ.3>q.>8/{hEjE>1 E^O0Bh0C`/hEiE0 G8X/"iEiE0MT/"iEiE0M0My H 1d F[jE`jED[G.3[qX/jE^jE0]h0,]`G۟i`jEjE[.3iqP/ijEjE0k`F&ujEjE\.3uqh./u8`C|qjElEd\2.|H/ kElE03~qXF$lElE\.3qX/>lE~lE0qhF^lE$mE$]/lE"mE0Ξwh0`0,XF$mEpE]Hbuf/7mEpE0ΞwX0P03qH00:0ImEmEDifD/4oEoE0f@fJF֜pEpE]).3qh.`KpEpED^_.3qhK~8pE qE^.3qh2bC3LJkL)kL%kMkC4t>YAYA_?}?C5X5P5L5HMk5@55A@h33 4}]XAYAd_5h4}WYA>YA_5hNzSQq sw!OP yQNff+Pg>[.N%B sNK s9ڝMf s9N @^O9O D^Obh> qEEO8J Nl intZ_O S J8Wm5Tm8[mC8D::T8>f_@ f_B 0f 3m`z8 9i# T# end#1(  ?44  2 m# 2 m# 2 # L3 #1f؊  X M# s8 %# o9 %# 7 %# 8 %# : %#( 6 %#0 8 %#8 6 %#@ a9 %#H 7 %#P 7 %#X .7  #` #h 7 M#p &7 M#t 9 #x : F# &9 t# 6 #  &# &# 8 /# 8 0# 9 1# 6 2# 9 3-# F 5M# : 7,#6 h8   # 9 # t M# _& ? _< ?@f Ke xw )f z# f {#E 7U TWV}YYS"VWT:V SXTS AW W wT WKXIUkSR V 8 U # S #Cstd S 65 K/A M# OS Q:SN R6S TOY Z S \*S_` _@LS< c]iSj p8pS_ tk2pSj U {SMf ~Sp2 v Y O}'Y` :`De G`/!*"!`!`;M& P#7_?$- e4+ sbP# c#%QoIvV%sv!V&w87V ?EJ'abi@[' \8(bfdp)bfd(z *2] +t#3E+:4E+5E+6E+7E+8F+f9F+:F+G;&F+3Q<2F+K=>F+0>JF+e?VF+M@bF+-AnF+>BzF+-CF+2DF+#EF+.FF+GF+3HF+IF+SJF+B KF+~'LF+MF++N G+ܫOG+ QP"G+Q.G+lR:G+SFG+~TRG+U^G+2VjG,anyW-id}m# TT# <"M# # {M# ^1M#( ;M#0 9JZ #8 պ#@-ifdM#H < #L 0E#P Xe #T TZ #X TZ #` `#h # % # zGm# ,# # m# @# m# ON# +"# KH#M# Z$M# %M# r&M# )*M# 3.M# ]Y# \# Ua#.N$em#.Rjm#.mm#.ZBqm#. tm#.!=xm#.{m#.4~m#.Am#{M8uGI88BA8mf<̦  %+A 4<{ a68~#  /+7P :Om# m# ZM#  m#   # # m# '@ # 1 #  %#( '  #0 '(1 # #8 75 # #@ s=  #H0orl1,posO + #-u# M#~%/>M* 0,sym + #  m#-u#/ N0*=x,p>,i?# @E# T# PD # X4e # 8 9# AAZ#(M22D34  p*%+U>b,sh T#-idM# SEM# h# בh# Xe # .Rm#$.Um#$.Ym#$.u\m#$.g_m#$.gm#$.jm#$.rm#$.-'wm#$.6'xm#$.?'ym#$.H'zm#$.Q'{m#$.Z'|m#$-vma# #(-lma# #0 Z9 #8 Z9 #@ B9 #H #P 4M#X # #` Zh#h m#p #x # $m# O # O # O # # # # Am# #m# h# O # @M# # .# ˏ# :# # @# # ]#$+:<2#?p/U(C PED # :OF_# GT# Hf# WJI_# 2J{# KT# 2VL/WZ ZZ# \T# 4j_8#/G (d kg# &p# Us# Zum# Xwm# #ym# .{m#$4T`5/p\J # Z9 #-iJ# 2q\5Q>\/a4 9i# # Z M#n/  @@# 9 # # # I#f/Q([ . ] # ^ # 542$d]WX [Y,3m_8u G* _ -  eP&]<^[7SD0/T> ^| 8!R"&#$C%W&L'N(iW)*R*S+,-ר.M/:01.2345xF67,8u09V:; <=>R?<]) |xG>ñ/OHo .qM# rM# wsM# VtR# $u8# vT# wT# xm#( E>| #,W 8~8#0 R#8 2#@422224 R2T>$==!)*s2.X 2$ܼG$.4 F$?4x |E24Y!SL 7 D %  q]8ٳ&?.(z(fZ+5>PN !z "# $OZ%L&'(3)*ĥ+#,b-.\/C01"H2F34-567j$89P:];S4<P=KS>?NoPsXz;[Q[\eQR=Y7;<^P UIH#.Q1b[b"K>7NF#NR</B(E)WI@E-F.]DR2&@ ]Uz}#BeE C|A\wJF;J- DNGHY I$!?K[o[RE_B>!V*6&o99?Wt[]),D4(,S(DFȧWyW uƮKR\/E{xJg,Xu5X<_X< f@%qU06TFCQ^u]c)SlC@QW|US |i%%5jgiHL Da#0QGU/(R-9?=ohG/, $826|Aи3Vn %Ӫ~|;%.`MF13/2:P;% L̿Y7KEHE l"V [d3;?-6{Vd9!<_XGX ӣf<z */->Qj6[& ZSA?808 633bn,-&T#I@)W~L2cd/O<(*#9$ 29d?? V O T@8H,\54 MIJu>!/*#;$[sP?B#)bOչX  ZTTU@EFFWoHI.I/%G%_%o7#bX$-I! ` &O4}9dK6x%Q#}e w@p|!4,&,bOV41C:YZ&>2^H2$,"l7foTdm* "A"5]fL$02= E| lKKqmY$ݢZWM(?C 3%9!b?}ZW_v[J\7\|B!fV6G66KJưW7_t)4P^9Wg0k;FsfU}kNzQM9VLx8b{70(>V^J&٭ yO9@Vq&,-mU*i G`=5'7WY6E%4<@\%S(@ jLm|w% Bl?!f!VU( Ra: @^-Ng1. 5~+/UOFդhCGq 15\ ?NOO6]M]³J21Oe{MM-M$6KMKC9BXE &J?@X" DѦ ذöt=[#&c @ ʢ(,B*6jVgB(GD:GXEH&)8SK\z,1s7\0E tL(c(g+[/`PNP}" 'uRW 1UIML]]) 0ۺ`699c1R_p pWxN}<r1\&/`>dB/  ;# FMl.8JWbW_:L8KhP]V};0n>'(Xa/= <5SwLdL9?A,)3p V',)# #?J|K3T r^V?^=5\,-ز.TbJ3] }  < $  #  Q  %   8    * P  : CN Y WN  r/ 1 0   1 < 1 < P3 P<   , k   J yD   y1 `F ɯ p    c8 9 : ;<  }   X    = L N 7  %+ - b U.     g  -    C h T \           N  wM Y Y    /Y (^  C      i d :    1    H ] u     ZU VH  7F ~H  H  H  H  A i@ A = V = 7V =  = j P       I8    ] m4  H Z  ? *! ;Z ӱ  $    u  L  / x B    4 y L h  q   H V  ( xT ( U   c *: !Z  6D  > [ @ }   ;  < g[ G     @/ L ֬    / : .    R ڴ !5  . c'   4      * +  ; S  ), G 0 $ , t   D J R S V ! 3 A   ^ J B 2  4A   \  O I > : U ܥ o  Y _ X B  +  $ " )*  N     aS    X n  p    M  j    K f /   x    R @   ~ z $ B   "   k *   4 P C)   v ^ NC  < A 2 &  3 O  ط  Z   T  n  * F * G * 0G + NG +   Q=   A U    4  a& {_ t- û W / PD  VT _  w 3 /  ]: *  " 4# B _Y / c  ؾ U M    d   ' = ~@ I   G X e @Q  `   =+  yC   Щ  s H  H 22 CM$rE<05>5E5E5E5E5FE5]E5F5FF5k F5<,F5j78F5FUDF5oPF5\F5rhF5utF5 F5F5|\F5 F5"F5F5:F5 F5'F5£F5RF5G5G5;PG5W(G54G5W@G5:LG5|XG5fdG35PM %# ~ N# PN# PN# e # Եe # _# Q_# zf# f# (N# ~N#(  O#0 #O#8 3O#@ qUIO#H O#P 3O#X 9RIO#` RN#h bN#p  O#x MO# 73O# IO# JO# Ŵ3O# IO#pG OO# zO# zO# O# ~O# 0O# O# " P#  %P# %P# HTP# YxP# P# 6!%P# A#P# a&P# \/P# B0Q# 1%P# Ȩ2Q# MBO# =CO# TE0Q# iFKQ# ЫHzQ# ݶIQ# J%P# 6KQ# }MQ# NR# UOO# ! bR# dR# ?fS# +h&S# MkGS# #"maS# n{S# "oS# \rS# )uS# 1wT# |:T# ^\dT# ^T# eT# T# )T# b-U# U# !HU# bU# <U# `XU# U# zU#  V# nI"V# .CIV#  V# |cV#  V# ȵyV# hA V# V# cV# ļV# V# R# [R#  W# AR# )W#  nO#  ~#MpG5wMMNW$}NI'*.Q?5 N Y Q  m>)+:#jL$N5!O4sN~N4hN~N6 OsN4# O~O4. 3O~$O6IO# 9O tO_O ?4nOnO(I_O OO ?4 OO4 OO4 OO 9 O4 PPO 9 PO4 %PP4 NPNPN+P4 xPZP4 PPPE~P4 Pe P4 PP4%PP4MQP4 $Q$Q*Q9 TQ6KQT%6Q4 tQmtQmMQQ4QQ4QQ4Q Q4MQQQ.R DR0# /5# =# P># V@# A# VCM#$ E#( {J#0 N#8 { P#@ /[N#H (\N#X C]N#h j/W#xQ4RR4R@R4SR6&S S6ASAS,S4 aSTMS4 {SPgS4SS4 S@# *Q*QSmS4 S@*QSS4 T*Q*QSS4P:T8!T4^T ^TS@T4PT ~PjT4TT4TT@T4T|ET4UTT4 UR8U4 HU~O 9 %U4MbUNPNU4UUNPbU @p hU4 UNPU U5Z4UUUU6UUU4 VNPU6"V NPV6=V=V=VCV5 (V4 cVOV6yVNP:iV4 VVVV4 V NPV4 VNP=VV4 W@@@V4)WT@W ?W ?JW7rmWd$ q1xW/q1W-sp^T#x#W ctx$mW# Ĉ%# 2&-##X :$T# %T# E&6#8)X)CXK 23-lX ב.lX# /lX#CXM&Y O# cswQM# RW# 3T,Y#( fidVA#0 sid`A#4 gvbCX#8 \cCX#H fiCY#X j#` XkA#x >lIY#5t&Y6=Y=Y2YrXxY rbpxY# ret#OY9ayT qE>qE$`Y:fyYhrX;oAA>qEqE`%Z<<A*QXSECMl?JqE tE`[:fdcJM}@=(rEtE>L[~AapM}>N}BrE2sEZAjQM~=ZsEtEAiYM~=fsEsE>k1Zv~=msEsEAj[M~ M,[C?~?GOg tEntEDa[iC 8tAnowjChD1{MntETuEa:\:val{ML:buf{%@=ytERuEAp}%h>md> %XAlenMT=uE6uEAtmp_S; +TuE*xEb\:fdM}<<T}@Eout°wE=uE(xE>A+~Abuf\~>Û}F> T~Alen+~Ares+~ _] ?;W%*xE@zEdb ^ ^X>n@>Ap%PAend%>.MLFAs^=xEPyE>-OYWHQ @zE&{Ebz^=HzE${EIXInhI2-`H,!&{E{E$c^J!ThJJ!T`J)!m\J1!TPKܽ0>M{E{EpcL_L_a0~XL_b0~P={E{EMa2L_hMb3L_`R_WH<{EEc0aJ<T~Gout)E={E}EI>I?0aXI<@MhA@I@B~MjCMTB|E}Ex`Mi]MP=|E}EI8 ^Mvma_8IZ_8IevB~EFEaMiuML=%~E.EI8 vMvmaw8IZw8~I}v~=~E.EI=M~=uEEMjMHPH*EE0dxa=EށEMs^hN^EEdbJ9i=EEMkeyWMlow^hIй^`F@I^XIҿMTO5O9RP D?W WFbQOy;b6sbMTMTT@Og>bSbOoY _bR??>{Փb sI,^ 8tI: -+ 8tmlcpl O J S intD:b:bN@ bp?B mOFE  {+ F -# > .#p !5 8 l G -q # l G#W  01\ 18 3?6 `b4 m d4  f6 # n  X4 # l4 x# c4 # 4 #1 1 ($$ 44i 2?# 2?# 2# L3#1 f  [ # :$# %# E&W# ) ) K     2 + ]l 0 ؊ X[# s8# o9# 7# 8# :#(6#08#86#@a9#H7#P7#X.7 ##` )#h7 [#p&7[#t9i#x:8#&9M#6/#?#&t#8/#80#91#62#93# F5[#:7E#6 h8 # 9# t[#?Ud`-#d`d`(?[c`U[q`p` [U  U #"?F&\i[*z + ^$# =4# 6?# 9#! 'A "log,018#^/J[?#^1my  [$ y%[&'F(( t )WAWAd@I*h)] WAXAPeox*h+~$(( t )xXAOXAe*h)x+PXAvXAf *h+< + (+ ( t ) cxEEpfV _ * h) aEܖEf  * h' ( ,J(,)(?-fd([,<)./%c,[0buf.0ap0i/Wa3 ) $b EuE0g+  * y* y* y* y* y1EQE2 ~2 z2 ~2 ~3Sa;`uEEg7 4fd;[1EE5=7  6n>[l1EE59i@P50gAL6rcB[hG ?7cUEEgz 8SU[l3O`fb[EEPh 4fdf[L4howf[H1EE6rch[\3`tb[E%EhU 1ƆE#E5wU h1EE5Ly[`6rcz[d3c0c[%EEi 8c[L8:O[H8g[D19EE6fd[\3ac[EԈEpi% 4fd[L1 EˈE5X[\3d`[ԈEԉEi 4fd[L8[H4on[D1EˉE5X[\9kaBcԉENJE0j"4fd[L81[H8c[D8\`8ec@1EE6rc[\9bmbNJEEj4fd[L81[H8c[D8\`8ec1EE6rc[\3ba[EEj&4fd[L89i&@80gH1ЋEE6rc[\3Ab3`[EEPk4fd[L89i&@80gH1EE6rc[\3`Ca[EqEk4fd[L1EhE6rc[\3c`[qEmElh4fd[L89i&@80gܮ1EdE5[\3ba`mEEpl4fd[L4buf@8X1EE6nX:c`EElQ;fd[L;buf@0g8\:}`GbEwEn<9iG&X1EpE>I +-)( ( t)#aܖEEoOX*h)bE@Epo~*hy?@yA[[@g>U"qep J l O S intNxpFx[E x i pF i Ӎ Eq m q 4o uq l q p o l Sm o l Zq l 5m m m p n m S $D&[#h&[#&[#&p#cb&#[ S' U(*tD,[#h,[#,[#,p#cb,#,# [ t G(0D2[#h2[#2[#2p#cb2 #at2# [ G3 g07D9[#h9[#9[#9p#cb9#9# fd;[#(<[#,[  g= po0AEDC[#hC[#C[#Cp#cbC[#atC# nE#(UU[E poFr d $  vn q n p q p n n op 7q5 ?l -q #l #x i Md J h #h 1#d J#xZ io @i ye {[#>i |[# 08\ 1? 3F  l Oe g 4h d fe e h 8g d pd Rf ^d! ]f) h+ e, d. h/ e2 h3 3e: e; Gi< #d |d Ad Be Rg $i _g f6 `4 d4 f6 w#5i  h d i %g Ω#8 i? in GX4 #l4 l#c4 #4 G#8W i:f ~f #e l#e #4i #Dg # e0 70d 9[#*h :[#e ;[#g <[# -g =#+e >0# i ?r# g @6#(#y:$#%#E&# ) ) K     2 + ]l f=F @#9iC# {IQ #0oJp#8pRx #@AnSp#HAV#PevX#Q pF l l [r W d`-:  #d` ) / d`/ ) F[c`~  ) [ q`) p`  [~ !5 ~ " : # #"h o  $&:   [*   : %+     ^$: : #&=4#&6F#& 9 #' 'A6 =  (log,0 Z a  )^/s  F)^1        [x *i   ! +[  , : ! !: -o ) > .> .  / WAWAoi r 0) h/ ] WAXA0p  0) h1d| @EVEp 2ev| h;3d.f[VE9Ep| 49i.H4@1.@2sa.| 4e. 5nE7E6v4/r h6rc0[d6v67 XW7GfDf9ElEPq 4kdD h7ZeSWhlEEqF4S h4cS[d4:OS[`4gS[\5EE81V cOxV i F7jfbdEcEr2fdb[\5EWE6ond[l7fwgcEEpr 2fdw[\5nEE6ony[l9@iZ`: $2.2.  / XAOXAr]f0h/ +PXAvXA0s0h : <.. /cxEEs0h/aEܖEs#0h7seeEEPt4kd 2ai<5EE81 cO6fd[\;99ir P5E؛E6eHx i/ @99i90gĸ5EE6e H! R%*ul! O <J l O S intN@ mp QfB m}E  t p  Ӟ Eq m q 4o uq l q p o l Sm o l Zq l 5m m m p n m S $D&f#h&f#&f#&{#cb& #f S' U(*D,f#h,f#,f#,{#cb,#,# f g07%D9f#h9f#9f#9{#cb9;#9A# fd;f#(<f#,55f% g= po0ADCf#hCf#Cf#C{#cbC#atC# nE#(fSr d $  { +)F -{#> .1#5Jl]-q)#l]#m t 0C\ 1J 3Q6`~4d4f6#n X4)#l4#c4#4 #C t e07d9f#*h:f#e;f#g<f# -g=#+e># i?# g@#(41( t442Q#2Q#2{#L3{#1f#T:$#%#E&s# )d j) K     2 + ]l f=(@#9iC# {I3#0oJ{#8pRZ#@AnS{#HAVS#PevX#3{(NNfT9z%f'#iU)#6+{#q1 q1sp#{x#ctx$#Ĉ%{#2&1#3-Dב.D#/D#MO{#cswQf#R#3T #(fidV#0sid`#4gvb#8\c#Hfi#Xj#`Xk#x>l #tJ4w(5c 37 #buf8#pos:#end<#>1# `r yr  k 3m #Zo1#posq1#s #iovz #< t ttH5  u5 # #in #outr #0 o$ H='#D>' #.>&v .  .>+ . 4 ->1 . f .>: . : ; !;@  . : "B''#'#jj;; #; # #; -p$ H=#D>' #.>& ,  .>+ , 2 ->1 , f .>: , 8 F !;>  , 8 "B##KKF #F # #F j$ H=g#D>' #.>& *  .>+ * 0 ->1 * f .>: * 6 D !;<   * 6 "Bgg#g#D #D # #D p$H=-!#D>' #.>&} (.>+ (.->1 (f .>: (4B !;: (4"B-!-!#-!#r!r!B #B # #B o$H=##D>' #.>&{&.>+&,->1&f .>:&2@!;8&2"B#####I#I#@#@##@$^$..%.#=4#6Q# 9#& 'A'log,0>(^/Q(^1 >) > f* .+#,"\c-&.yf,*..+ $d`-.L%L#/d`u{,d`/-uQf0)c`>uf1q`u)p`LgAf#2t>># 3f04.##.56G@EVEpx6c 77 8WAWAxJS9 h8] WAXA0yy9 h:kefVEEy;iovemX;nwreP<> eH=fEE>q6hmh1?pvE'Ey4;iovvmhekhANѣEEp{p<N h;bufN{`;szN1X_jE' oDjPNlE%E~A<P h<9iPT`LBV<Wl7l7 A8GcxEEp~9Wh8GaEܖE~9WhEj\bm' %EE0<\ H<9i\T@;len]_jh' _>rofXGszpT tEmkk' EEp< ;ai @>OF1 `eOGres' _H >9iTP=kEبEGeH tp{Ej8jfEE?< <9iT<0g P>OHH@ Gfdf\>_j' [ EinE{EP< ;buf{;sz1 @>O>RܰX=EtE>F;  #IHT  I_p  'I{ JCEEK>h! =EEF?h='E@EGnrdP>_j' O tLjm{EtEM HNbuf{@Nsz1MNr1=EkEOnrdXLIm%WitEEp=M% HNbuf%{@Nsz%1MNr%1Mi&=EEOnrd(XLp<kjEEЁM< Nbuf<dNsz<1Mi==îE EPFl?1XP @@PO@=E EPFDF QDE #I)5  I@Q  I\c JCEE0K>h& =EEF?h=EگEOnwrMPP_j`' ORprEENfdrfLNiovrm@MrMtrfH=*EEOnwrtX=wEEOeyP#LikݰEgE/ M NiovmMtfMk1=E`EPAXP> 1@OendmPF1?  1eOHp PFD Q  #I  I  gI JCEݰEPK>h$ =̰E۰EF?hH OnwrH? t / LmlEҳE"M NbufdNsz1MXfMc"M0gMi=E˳EP HPO@=ʲE˳EPFB Q! #IP!\!Ig!x!-!I!!JChEE!K>!h"=tEEF?h=ݲEEOnwrXP_j' W"LtlpnE#O##IZ#a#JCҳEEЄ#K>#h =޳EEF?h=GEEOnrdXP_j' WSon(`6p ((7I&Ufun&( V(BEfE((9(h9(`6n ()7&Ufun&) V(fEEp)):)9(h9(`6l H)c)7g'Ufun&])V:)EEЊ))9H)h9R)`6j))7'Ufun&)V)EҹE0))9)h9)`B--**7*7 u8)#aܖEEB*K*9*h8)bE@Eq*z*9*hW DXUY<**YXy**ff0Xg>**Xo$X0 f uzqԹE+Et O8J Nl intZ_O S :@ _pmB ܖF:p0f 3m1(  ? 44J 2m# 2m# 2# L3#1fWME  yW (U S $D &M#h &M# &M# &#cb &#MS ' r cD M#h M# M# #cb y#ssM cr   Ɖ( D M#h M# M# #cb # # MƉ  r;d$ r 3M r   &#Mwd # # & # Z -# r #( r #0nv1 #8nv2 #@:O M#HLr M#LQr #PVr #Xmr M#` f#dX f#epri t#f #h5 #po- =#xV =#grp 7#s 7#Fs 7#r 7#fr 6MBr Uur _r[r yg77M,q1 N q1 jsp j# x #ctx $C# Ĉ %# 2 &-# 3- ב.# /#5F l  -q# l # _ ? e07d9M#*h:M#e;M#g<M# -g=#+e># i?# g@#( # :$T# %T# E&#) M O#cswQM# Rp# 3T#(fidV#0sid`#4 gvb#8 \c#Hfi#X jJ#` Xk#x >l#t rH? |r@# rA# r8p_ r_# Ztt#apzJ# |#( q}M#0 mr~M#4tesEԹEEPwEhEMd qNE*EwNhOMdrX*E:E3rcq:EEp#rEEЍ reqXEEr h qMEPE0 reqXEIEr h!OssPE˼EZ Zt}in}"EɼEr~#reqZ ~M rٲ˼EE ap׼E}E&eT`@1TX sݬP#res H#rcMl!>rrE+EP eM&eT@1TinE)Eh s$  Dn  %&y  MTMTT"&g>  &o_'rB  8t|s!5l O J S intN@ bB mrOFE {+F -p#> .# [  01 3?4w(5P37V# buf8}# pos:}# end<}#># tP `k yr  k3mV#Zo# posq#s# iovz#Fii*u pos#> #Z#tHe;ue#$# in# outk#0 vU( *D ,[#h ,[# ,[# ,p#cb ,# ,# [} g0 7D 9[#h 9[# 9[# 9p#cb 9# 9# fd ;[#( <[#,[} r d $   #: $# %#E &#  ) H x~           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 : ) K     2  + ]l t  #h#%:G[ km m!F!!?F"# [$ % i&#'"(&%['*6B )+ \^$Y#*=4#*6?#* 9Y#+ 'Aj,log,0ij-^/u?-^1)5u{ i# iKu[j.ip ii$5/[01$B$2{G,ERE34wGh2CsNREE 34wNh2sEEpM 3 M hk2t[E׿EА 4bufM h5 6 6  7 WAWA0  8 h7 ] WAXA  8 h9cu%׿E(EI 34w%h33%V`9Mu/(EREPx 34w/h:s9qsRE{E 34w9X3Z9P;bEyE<=t=`;EOE< Hh=:$  6 6  u7 XAOXAJ S 8 h7 +PXAvXApy  8 h=U 6 6  7  vXAXAГ  8 h7 XAXA0  8 h>3u]{EEM 4buf]M X4pos]P>tjErE 4bufjM X4posjP3ZjH;EpE<lh?1  gO i :sztrEEP# 4bufzM h33zV`>XuE@E 4bufM X;E>E?1  7gO;E>E@iovh i :JtSt@EE`4bufM H3~@3Z;TEE@iovh<`?1p .gO;EHE<1Xpi `At̩tEvEp 4bufM P3Z̕H;EpE@iovh<ϕ`@svpX?1 gOi :\s uvEbEЖ4bufM X4svpP;E`EYAYA6t 6!F!!8X8P8L8HHk8@88=%h66 7t]XAYAp8h7tWYA>YAЙ8hI0 W[ p8tJ  DkKUY<) k9LK y.f[[0Kg >sFKzS,VIt  h8tgwP":C<ONJ Nl vintO S D(<0 3`zNx(,2 9x-# c.# W{/# }0# t1# v5[ Z6C# ȩ7C#w:fl v  1(  c44  2 # 2 # 2 # L3 #  c1 OE [ e ț""""$C&5&P&ܠ&&&7&&ء&ݞ&(-(k((9**{*,.  Ov}T >qhG f  c )K 2 # : $}#  %}# E &# ) H xx     ^ p    lzx$0< H!T"`#l$x%& '0()*+!,< -. /01 23L4e 56 789: x? @#xv`CJ uJ#K uK#L L# L#M M# M# D# ȩEC# W{FC# wWG# uH# brkI#( gvJ#0 bvK#8 \vL#@ uM#Pxu(S 9xTC# cU# uU#uP P#wQC 9Q# QC#K8X vY# fxZC# 7\# Z]C# ȩ^C# c_#( u_#0h\\# v k66N}} } N } }\w&v ! 2 "U ##"e $&e v#* e  k %+ q % e  k ^$" #&=4}#&6#& 9" #' 'A} 3 (log,02  3 )^/ >  } )^1 >  D 2  2  > v 3 *c9 2 2  vU +[ ,J   -SvE E0 .<S}}+/IEE0ԞUN~0hV~/vEE0_" }0_' ~ " c1 1-cqv E"E .<q}}+/bE E0ԞsN~0ht~/EE0} }0}' ~1 2 3 3 qe 4 WAWA # 5 h4 ] WAXAPI R 5 h6vg"EhE 7ptrgX/.EfE8vih91  CiO c  :uohEEE ;NoCH;dLoE @/uEEv=x JEE0T;ZCh;NC`;dLE X?v=vEE@ vESE;uh;v`/ EQE91 7iO =wΒ SEEP;vhAvԺvEE/EE8vh91 )iO/EE 4XAOXA05h4+PXAvXA&5h\BfU<Q3Q3 q&4, vXAXA|5<h4,XAXAP5<hCNvEoET.ZC~.6\}~/EcE0uH0vX0xP91d iOD;EE0'D/;EE0'i~0'' DE>E0)@/E>E0)n~0)' /EGE0Ԟ2/EGE02s~02'  d cT1 1 1 Ev7.woEETFptr7/{EE0v;h0u<`0x=X91d iO/EE0ԞPT/EE0Pi0P' H d cT1 CxU#vCE.Ep9FptrU/E,E0vWh0xX`0ΞYX919 iO0Uw^P0v_1H0vb1@0SEeCCPxmu.EEТ.SEmC/:EE0voCh0vpC`0vrX0ΞtP0UwvH0xw@91  hO  cCviwvEE0Fcb[.v./>EE0vhGst/>EEGivd/JEjEGresv`22DN}}3DHJk}H)kH%kIk N } }4t>YAYAN}}5X5P5L5%HIk53@585=Bh3D3 q4]XAYA5h4WYA>YAP@I5hJi v } v } }+Kg >vI LK y| McNu4 8t8w7 hO8_w8L hO8xv9L hONAw=C 8t8*xb 8t @ c8uc0 8t8KdI `ta~# OCJ ^iiq1vq1 sp#i x# ctx$k# Ĉ%i# 2&8#1( N 44 6 2 6# 2 6# 2 i# L3 i#O 1fS int 0hl  36V IAHƀԀ{y]~D{-{   } y x*}Uz`}~2υу ~чzszxUІ} !"܄#|$Fz%X{& ' (})=*4+,-.fz/{0z12Y3~45~6C7z89|:„;M<y<O=|>Ky?KV|py*!zކyxi{ y4~{20~s z"{{zzzHI|fz3l}){{{yyTxz6|{3 |Byn{lA|L}B{d?=z}B~E\yR̈́||p}S~l~yԂ3|5yc*}s||zjyy\|{d|}U4}Td~́.b{w?~zgR}  #x : $#  %# E &]# )H x     ^ p    lzx$0< H!T"`#l$x%& '0()*+!,< -. /01 23L4e 56 789:E  )/ K 2 [ e ț""""$C&5&P&ܠ&&&7&&ء&ݞ&(-(k((9**{*,./ h  #) 5    J W  V k} } C 6vC   !V   ! y " ##"   $& ( 5  V#*F R    %+ l   ^$ i  #&=4#&66#& 9i #' 'A z (log,0y   z )^/ '  6)^19 E   y  y [  V z * y y E +V , -  R  .  / /  0 WAWA  1 h0 ] WAXA; D 1 h2SVEEp 3<S},4EE5ԞUC~5hV=~4EE5_ }5_ ~  6 62cqVEEХ3<q},4 EE5ԞsC~5ht=~47EE5}}5} ~6 7J $//  0XAOXA01h0+PXAvXA!1h 7 U7L/L/ !0' vXAXAw17h0'XAXAP17h8x(EEo9(o:f)X9)i4EE;+\4EUE;Ԟ:6X4EUE;:u;: P6 8y}@{xEE9@oh.W C/YAYApXXC1X1P1L1H=k1@11 75 h// 0]XAYAШ1h0WYA>YA01h A$>? yQVV,?g >^1EZENO OOJ l intx}S D(=0w)k r k ;E  S $O D&k# h&k# &k# &;# cb&e# _ _ kOS' po0A DCk# hCk# Ck# C;# cbC# atC# nE#(   kwpoFw#K:$r#%r#E&#v8){*r#P+{#=-3EEEEi64\>]kEEl>lH>D@EE@kTEEiBk\EEiOkXrtZ^EEP7ZkdZk`PZXLjakE9EqcbaHa;@E-Eic4\EEҿgkXresmkPDEEjhkTw'9ElEAwHwkDYEVEi|k\EEjkX8ԈlEEpEEЫ>KEZE07kTDHEWEikdECEjk`0k `t D  k r k r r g>! y 44-!LI iO$A' atv,y `tR-k 0at .k 4at7/k 8atVŊr\E*F"O8J l O S intc8D:i:iN@ iHmi0؊Xb#s8#o9#7#8# :#( 6#0 8#8 6#@ a9#H 7#P 7#X .7 9#`  ?#h 7 b#p &7b#t 9{#x :F# &9T# 6E# U# &# 8/# 80# 91# 62# 93-# F5b# :7[#1(  44 2 M#2 M#2 #L3 # 6h8--#93#tb# U  k q 1OF:\B fJm D (i 0?\ 1F 3M+  78 i 8 ME    ) 4rWd$ 7)p:m7.^  0@71#i:6#w79b#9:k#8;k#<#;(I`dirJ`#fKf#!FMW#MN-#Ob# TPl#$9R#  }w cloge#fb#ƌg#h#Qsu%Hv#lsnw#tmx4# leny#1z#7*xl8##tag# W#"x#* ? ke p#{^ #7] F# ?#\ !#  DIR+`q1q12sp2#x#octx$ #Ĉ%#2&-##:$k#%k#E&#))K 23-ב.#/#MO#cswQb#R8#3T#(fidV#0sid`#4gvb#8\c#Hfi#Xjv#`Xk#x>l#t&  $ $ M* ?r3: r  #: wd # #&#Z-# r#( r#0nv1 #8nv2 #@ :Ob#H Lrb#L Qri#P Vri#X mrb#`  ?#d X?#epriT#f #h 5 #p o-* #x V* #grp$ # s$ # Fs$ # r$ #fr6  b  / rUur_  r[r4T $ $ :  6G)\ErE!&rEE " h#lsn`"-X$.EEP ". h$G8EEl #row8l h#lsn8`#tag8\"W8P"V9kH"9-@":k":-%%?XbEE #_aXX#_bXP&EE'aZ h'bZ ` (aEEp #dira`~"Ia ~)outbL   /bEEpM-l&EE3TX3ɍH3P41] nO ]  M/bEEб0TH&E}E3X41 `nO M/WbEE0<0<H&EE.lX.rbT,ӉeEE0<X&EE.lh5qbEE-req X&&EE4X MnO.fdbl /(bEEP-lH&EE4X AnO&E0E.fdb\  5bEE-lX&EE.retbl5bEWE-l}0 }2r.FE&EUE39}3[}.buf}.dir`h3f`k/3WE-Fp-dir3`H0!F3WD0T4k04p@0J4f2rXF&qE+F.l6h3%c7bd3 8kX4X 5nO /4dd-FFд-dird`X-lsndP0dpL&@FF41.  nO3Thkh.fif` .  /\rF*F0-dirr`-lsnr0rp2rF&F#F3TtX.fufH.fdvbT41 mO4X nO M M6 D)7n'0 `jO 7QE @Xs7MN `Xs ol89yabkbkk:9g>y9o9,*H( mO *() mO*r* mO  % 'v11+: mO *TT mO E7r,FB;F)(S intD(M0_\ 1ql  3O + 7J MJW5T[CD:M:MN>fM_MM@ MfMEF:XB m)O ՕW ; GRX #  IR xKR % e x)f z#f {4# <  KՑ M# N## O ( [ݕ ( \ ^;#V _#ɏ `;#4 b#  f;#, h;# i#  s3  t  uM E 'ߕ v'  y   z  {; E   | 0 ۔0  ;# #Ž #E # # # r #(- #,  )    E E /ݔ Β ; {+!F -#> .b#5q E< 6`f4x d4mf6G# nX4!#l4<#c4R#4# _ EIv HƀԀ{y]~D{-{   } y x*}Uz`}~2υу ~чzszxUІ} !"܄#|$Fz%X{& ' (})=*4+,-.fz/{0z12Y3~45~6C7z89|:„;M<y<O=|>Ky?KV|py*!zކyxi{ y4~{20~s z"{{zzzHI|fz3l}){{{yyTxz6|{3 |Byn{lA|L}B{d?=z}B~E\yR̈́||p}S~l~yԂ3|5yc*}s||zjyy\|{d|}U4}Td~́.b{w?~zgR} .U DR0#/5#=#P>#V@#A# VC;#$E#({J#0N#8{ P#@/[#H(\#XC]#hjU #x Me p W(mS $ D&;#h&;#&;#&#cb& #  ;  S' U(*i D,;#h,;#,;#,#cb, #,y # y y ; i G(0 D2;#h2;#2;#2#cb2 #at2e #   ;  G3  po0A DC;#hC;#C;#C#cbC #atCe # nEe #(  ;  poF ]nv ssDu;#hu;#u;#u#cbu#u # Aw #(qGxe #X`y#`בz #hZ{ #wd};#; s~ Ɖ(D;#h;#;##cb*#0# $$;w Ɖr]d$ Z6.h;x 4>5^#lsn6B# M^O#cswQ;#R #3T#(fidVx#0sid`x#4gvb#8\c#Hfi#Xjs#`Xkx#x>l# x0G9iHm#4I^#WJ#Ke # kKe #(*PN4N565w6 ̔SlsnTB#5TB#VL#QW#MX# 5YR#(\5Z#0x[#8Z6c#@5d#H|Je;#POf;#TXg;#XOhp #`i#h*Pj#xl#|(ILdirJ#fK#!FM#MNb#O;# TP#$9R#   0@71#i:6#w79;#9:#8;#ŒB]FFPm8rh9ܑ˿F'F 6nH6@6Z6̡656O;6X;:F F;1  wO=rX,9'FF 8rh6!F`6Op X:<FF;1  wO E  ?FFp 8rh6p `9Fj Fк!:Fh F=rh@j F F0m!ArhBKdB7K`C4  F[ F"Ar DrJ F: FY F;1" wOE<&LXFlsn'BhFi4Frow8`E69xTG'Z;[ F F"ArZAlZLHendu F:k F FFres\;lFi]Frowa`E6bxTI#FlsndBXG; F4FP#ArD^{F: F2FE;lEʐLEBHE}B@EbFf`ET?XET;1# wO E# #C44FCF>$ArXHout *F:@FAFEŒBhEhB`CCF!F$ArX:OFFE;lJY!FFp$B\5YhAwalYL`JaFFн%B\5ahJݒgFF0%Awg%HBVg;D:FFFrihE\5j`EkLXEm;T JyFF &Awy &HBVy;D:FFFr{hE\5|`E};\CGFF&ArXBWKe P:FF;1& pwOE\5h E& &JF"FP&ArX:F FE\5h;1& PwOcK"FpFJӐpFF':xFF;X' wO;1' 0wO:xFFFe;l  JvFEFp(B(X:FCFFreq}hFtmp}`QJ EFF,)B\5 ,)B ;:TFFE5 R`EG5 Q@E5 Q;X2) vO;17) vOLF4F(Fe;\LFsF(Fe;X:FFE}hE}P5J)F!F0*B5)R: F!FE{,@;X* vO;1* vOL FrF)Fe.;\LrFF)Fe1;XLFTF*Fe4;TLTFFA*Fe5;PLF/ Fd*Fe7;L: F!FFe?;H E* **J'I!F"FL+B5IRX:!F"F;X\+ vO;1a+ vOL!F"F++FeK;l:"F~"FFeL;h E\+ L+L+G`;"F$F,Ar`}:"F$F;1#, PvO;X(, pvO:#Fr$FFsetq}Ewq~Feq;l E#, ,,MJ{$Fp'FP3-Ar{:$Fi'FE5}RX;X3- 0vO;18- @vOL$Fi%F,Fe;TLt%F%F,Fe;PL%F&F-Fe;L:&F&FFe;H**M2p'F(F-B5RXBĚ(P:'F(F;X- vO;1- vO:'Fi(FFe;l E- --G;(F)F.Awal.XBO;TAdirHAlsnB@:(F)FFlLhEL`;1. vOL-J)F1*Fp /AwalLhBOp `:)F/*FE^e ttG}}1*F!+F/AwalLXB'PBO;LAreq}@:H*F+FEя;l;1/ uO:*F*FFrow0`-G}!+F+F0L0AwalLXB'PAreq}HAend}@:9+F+FE;lJ{+Fy-F1ArB5RBĚ(BG5(B5(:+Fw-FFwal.XE'PFreq}hE6}`I#E}HG,y-F1Fb2B,:-F1FFr.hE5/R`EĚ0Q@EG51QE52Q;Xr2 uO;1w2 uOL-F.F1Fe4;\L.F@/F2Fe7;XL_/F0FA2Fe;;T:0F1FFeJ;P Er2 b2b2NӕU;1F4FP3ArUHAlsnUB@BWUAopVfArowVBVx:1F4FE5^RhFreq`}`;X3 uO;13 uOEk[L2Ff3F3Fei;\L3F4F3Feo;T:4F4FFeq;P E3 33Jڏ}4Fo5FD4B'}HAfd};D:4Fh5FE;\C_o5F8F55AlLHB'@BVBbBBb:5F8FEM; stE; ttEeke PEe ttFrow0XC8F9Fp5ArHAf5@:+8F9FE<LPE'X5L5N;9FB;F6BTBBAB:9F@;FFdirhFh`FfXFlLHFiFrowPE6xDO De  6 P+Ri6 XsP̔e @atQQ?RQM@R D7RQy6/7;;2Qg><77QzS",Qo^SNgq7 uOEX5TX `atEg (stE5 @st=*(D;FvF4O8J l O S intU bN@ i1 ({ 44 2 M# 2 M# 2 # L3 # 1 OB f b U pDiE W{] 0?\ 1F 3M+ 78U(*D,b#h,b#,b#,#cb,#,# b g07D9b#h9b#9b#9#cb9#9# fd;b#(<b#,bpo0A:DCb#hCb#Cb#C#cbCP#atC# nE#(JJb:rrd$ q1q1sp# x#ctx$# Ĉ%# 2&-# #% :$# %# E&^#)5 3-^ ב.^# /^#5 M O#cswQb# R# 3T#(fidVt#0sid`t#4 gvb5#8 \c5#Hfi5#X j#` Xkt#x >l;#t//$d x(, 9x-5# c.5# W{/5# }05# t15# v5 Z6-# ȩ7-# A r)  Z+t# -t# /# 30# {+6 F -# > .-#5F6`i4t d4r f6L# n X46# l4A# c4W# 4#?{Z6.bt 4 >5#lsn65#d x0Gm 9iHr# 4I# WJ# K# kK#(*PN4N565w6 ̔SlsnT5# 5T5# V# QW# MX# 5Y#( \5Z#0 x[#8 Z6c#@ 5d#H |Jeb#P Ofb#T Xgb#X Oh#` i#h *Pjm#x l#| 5X5;+]l f=b @G# 9iCr# {Iy#0 oJ#8 pR #@ AnS#H AV#PevX#w w b} rb z% f'# iU)5# 6+# 4w(5 37#buf8#pos:#end<# >-# `$ yr  ky 3m# Zo-#posq-# sy #iovz #8 {  {tH ǽ u # Ǧ #in #out$ #0 g[2 g[ 1T- ϖU5#outV- # $ H=&#D>#.>&n z 1 % .>+ 1 7 ->1 1 b!.>: 1 = 3 ";C  1 = #B&$b$$  &$&$&&3 $3 $ $3 %S7D;F;F0 &e7- h'T7-`(T;F;F)1  ؀O { %S>;F5- h'>W`&len>-X*N5F&outm- H(=F>F-o `-vpP.end>F?F0L&out- h% ?FnF0uNXF0{=nF0}uXF0{<snF0xuWF0mpF0z{;fnF0uYF0L(cF0WF0n{:YnF0ua`[F0sumWF0{9LnF0v!_F0uq[F0|~1WF0|bF0{8?nF0{72nF0-uVF0z6%nF0(uVF0Mv5nF0sYVF0z4 nF0z3mF0uUF0uXqF0z2mF0uwUF0zjpF0z1mF0umkUF0WwkbF0rF0 kF02v0mF0uc,UF0VrF0z/mF0tYTF0sz.mF0tOTF0|dF0|qF0gz-mF0tEoTF0"rF0MjF0[z,mF0t;0TF0ddF0rF0~IjF0Oz+mF0t1SF0rF0SjF0Cz*mF0t'SF0^cF0wrF07z)|mF0tsSF0mrF0;iF0crF0+z(omF0t4SF0MwfaF0z'bmF0t  SF0RgcF0"iF0z&UmF0#u#VF0hF0tRF0fF0y%HmF0|RF0hF0y$;mF0]rF0y#.mF0t"!mF0lpF0lhF0t!mF0Ht)QF0CrF0y mF0Ct)~QF0OuQF0TQF0<~kpF0hF0\wbF0ylF0MtRF0>t;QF0qF0ylF09tQF0ylF0r~qF0~d{pF0ʁ?gF0ylF0/tPF0̂q$qF0ā6fF0ylF0sdPF0l@kF0{qF0sylF0s%PF0zqF0gylF0k>`F0zhpF0yqF0[ylF0s{OF0xxqF0OylF0sqmOF0kwrqF0eF0CylF0sg.OF0^veqF0$afF0 eF07yxlF0@eF0+yklF0sVNF0Hw\oaF0s^lF0sMNF0tKqF0sQlF0s>qF0pdF0xDlF1st9;NF0قr1qF0jGdF0x7lF0x*lF0<MF2mu[MF0=.MF2ɖMF0yt9LF0|:LF2tLF0OsALF0cKF0 KF0ЁH9gF0BJF2xJF2n>JF2^IF0|7yIF0|DeIF1st7>MF0…lF0u<HF2HF0ږ=HF2—uHF0st9?HF0v:HF2pGF0GF0GF0 FF0~B.FF2sFF2iEF2Y3EF0|7DF0JDDF0>IF1st81MF0,BIF0'%DF00~ipF0Rwz,bF0A lF1st6nDF0xx lF1st5FDF0ppaF0mx kF0sDSNF0$~gpF1st4 DF0bx kF1st3CF0~fpF0Wx kF0UrF3st0CF02uVF0/rF0|pRF0CwR0aF0Rt-RF04tPF0sOF0>wH`F0s]NF3st2CF0}cnpF0|rF0}bapF0AiF0ցOfgF0vdF0XcF09w7`F0~kF0}aTpF0rzkF0eF00*-`F0}`GpF0}_:pF0G jF0}^-pF0v_F(6BFLsF,in P,out- H,err- @,csb,p̏h,pȅ-͏`-!͏X-\4$%5retb6@$5retb7WsFRuF0~'8apW/~(sFHuF9Y9tZ 5L[ X9C\b9F^3 ~:^C_ #` #L}a #;&&  ;&& % &;' ' 5'h + (ZsFsF)C h) h#)t h#>LuRuFuF'?XOuh?Kubd(auFuF9ԗw  tt*C3 uFuFP'(#B&'FC&@ 5(J(AJ(A  1 B'(uFuFq(z(C5(h@] ((AJ(Dfun&( % Ez(uFvF((C(hC(`F DGUY<( )HGy(Gf3";)bbIGg>H))GoG %bG&!)bGT!+GuV!,GU"+) G̔o)G0 b-; Xs-M Xs-ȗS ȀO-T ̀O-U ЀO-W ԀOٖ$0%fFS intD (Q 0c\ 1ul  3O +  7J D: Q: QN@ QB mOՙE   {+4 F -# > .# vnz q n p q p n n op 7q5u  J Oe g 4h d fe e h 8g d pd Rf ^d! ]f) h+ e, d. h/ e2 h3 3e: e; Gi< #d |d Ad Be Rg $i _g f6`j4| d4{ f6U# n X4z# l4J# c4`# 4#c?U(*YD,?#h,?#,?#,#cb,o#,i# ii?Y g07D9?#h9?#9?#9#cb9#9# fd;?#(<?#,  ?ur7 d $  Z6.B?[| 4 >58#lsn6F# M8 O#cswQ?# RJ # 3T5 #(fidV|#0sid`|#4 gvb #8 \c #HfiL #X jl #` Xk|#x >lR # x0G 9iH{# 4I8# WJ# K# kK#( *PN 4 N5 6 5 w6 ̔SlsnTF# 5TF# V&# QW# MX# 5Y#( \5Z#0 x[#8 Z6c#@ 5d#H |Je?#P Of?#T Xg?#X Oh#` i[#h *Pj#x l#|(I&dirJ#fK # !FM # MN# O?# TP #$ 9R#   0 @71# i:6# w79?# 9:# 8;# <#,5X5>7;0 ؊ X?# s8# o9# 7# 8# :#(6#08#86#@a9#H7#P7#X.7 : #` @ #h7 ?#p&7?#t9#x:u#&91#6F #V #&#8/#80#91#62#93# F5?#:7\ #1(   44 2# 2# 2# L3#6 h8. . # 94 # t?#  V  l 1O 9' 9 9 7) : m7  u Hv|#lsnwF#tmx# leny|# 1z|#q1( q1D spD # x# ctx$ # Ĉ%# 2&# # :$# %# E&X# )   ) K     2 3-) ב.) # /) # t/ F F  ;  +g ]l { 4w(5 375 #buf8#pos:#end<# ># ` yr  k$ 3m5 # Zo#posq# s$ #iovz4 #4  D tHĒ h uǒ # Q #inm #out #0D ^@#^B !logGn\  "^    ?^$##=4##6## 9#$ 'Aw~ !log,0 %^/ %^1 "   ?  & '#"FM (&cp  ?* )+  s00#* u ""  ?h#*Zf "0w  ?+,"  ?0+0+?- .++/6GvF.vFp0}w.vFYA05Zh0d|nvFvF1ev|hu7cvFvFX8ch1bufc`1szcX9qvFvFP8qh1bufq `1szqX0{GvFwF84wGhm 0CsNwFCwF84wNh7 CCwFwFpz8 CX1buf CP1sz CH:WwFwF;n Fh< ,dwFxF8 ,8t ,86 , :wFxF;in .X=R /P=  6H;row =@D |9 DxF\zF08 DH8 Dg @8 EF1err E>p$=[ O|\9n [\zF]}F1ap [F ~:ozF]}F;r ]H= ^u~=t _X=W `W= aD>$;err f?zF/|Fg=6 q|;row r@$~;e }>%;e ++9՘ ]}F~F-1r X1row P86 |L:p}F~F;lsn FhA1= 0O=-B ~FF<*1r ~89i ~:3~FF= *=: ~=@1 ?;rc ?T;f 8X=f `A1J O=x > tt:FFCOH:J:B FiF1r Ɣh6s33 4 YAYA5h4>ZA&ZA\ 5hD DEUY<%En%7| GFEy<t??-Eg>TEo8E0 ?*&WLO <J Nl VintchS  0\ 1J 3O 1(C 44 2# 2# 2# L3# 1f@ }hB f 9?GM g g ] m @1? ~=A6# T18 C:#eof<0#  g    t v w# y# <{# }# #  0 g%%gNUM F; # :$]# %]# E&#)WVE hC)K 2 k (oid)# d0# 2# >9o# E# Tu#<VChC {+ F -# > .1# 4w(5 37%#buf8+#pos:+#end<+# >1# t`:yr  k 3m%# Zo1#posq1# s#iovz#<CC *upos1# > 1# Z1#tH4  u4# #in#out:#0%M l / z0#len1# 2# 5hdr6M# 7# k18# ʚ@S ~=U6#bufW# 9Y#svp[#(:W(Eqmq4ouqlqpolSmo lZql5m mmp nmS $"D&V#h&V#&V#&#cb&8# 2 2 V"S'U(*D,V#h,V#,V#,#cb,#,#   VJ g07QD9V#h9V#9V#9#cb9g#9m# fd;V#(<V#, a a VQJpo0ADCV#hCV#CV#C#cbC#atC# nE#(   VsƉ(k DV#hV#V##cb # # { { V k r d$  q1 q1 sp # x#$ ctx$ # Ĉ%# 2&1# 3-M ב.M # /M #$ M O#cswQV# R # 3T%#(fidV#0sid`#4 gvb$ #8 \c$ #Hfi #X j#` Xk#x >l #    S 5J6`4 d4f f6@ # n X4$ # l45 # c4K # 4 # C+ ]l f =G  @# 9i Cf # { I #0 o J#8 p Rh #@ An S#H A Vs#Pev X# \ \ V b  f G X @  F" # iU K # b P$ # \5 U # q6 WV#Hend WV#L Z YV#P  i"  k # t l #  n # A o8 #  \8 /@ bC I T " Q  w u # 5 ` # t # 1#J # iU #8Ě #@ #psid #T MT  C< 6  # $H =>$#D >g# .> &q}! ".> +! ""-> 1!!V#.> :! (6$ ;.! (%B>$>$&>$&$$6&6&&6'^$$$($#=4]#6# 9#) 'A]! *log,04! +^/! ] +^1! 4, 4!!V- $./#/"RY!?0&$o|!?!V/*!? E$1+ K!? E's$<(<#2! /u! ] ],.!!V'h$(#2fr! ,<!!V&3)%ZzV!?,!!V<&<h 4C44&5V/657$$&&$8Y_t9t9 Q?:QWAWA;_h:Q] WAXA;_h<]lFF| =%l>{ C2C,:?:h E>DD<lz?zh?@$99 Q:XAOXA;h:+PXAvXA;h@U2929 Q:  vXAXA\]f;h: XAXA;h@rh99 Q:]XAYA;h:WYA>YA|;h<{G1FFP=4wGPh eHBaFFFq6h/ h1EpvF"FAiovv/ h=Zv1`En e"FLF|0= z e0h={ f `=o gX Fh*%K " ~BF4FN  XN  PNt  HN@1 ~N 6~U L}  #  #  #V{$$! V$$! >$V$$!WCFF$?>$hBFFHt#hH#h#H#h#O >FF(%K " BKFFN  XNt  PQfd VLH1% OTP&%Qe %@B̘F FQe &P&Qe &Q"% % O? F:F>&K " hO! :FԚF&K z 0Mfd VK9i b BMFȚFN @N  `N֚ hX ԚF~FHv'KXO ]hKP VdK?Q V`RF1FM'N"  utB7FhFNI  `vtD C6~FF'%B>$=F C>$8''9'9 QY'F̛F'(;'h8`(.(9'Zfun &(([(̛FFhP(a(;(h;(`@sq((9(9 Q:a( YAYA((;q(h:a(>ZA&ZA(((;q(h\AA<\8C<n)]\y) ;) V ] V ] ]6\g>H))\rW[)a)\0 V\ ^^ D\zS,%\o-F -M  utF` .) ȄOF ~n @utN  ut'FFUO8J Nl intZ_O S 0f\ 1F 3m@1? ~=A{#T18 C:d# eof9X# E# T^#Mu?_?{+ F -# > .-#t`yr  k% 3m# Zo-# posq-# s%# iovz5#85?E?*u| pos-# > -# Z-#l / z 0# len 1#  2# 5 hdr 6|#  7# k1 8#ʚ@ S/ ~= U{# buf W/# 9 Y# svp [E#(s-FFh /hFHFbuf/hsvp`Eʚ HFVFH@1 h&VFF7ptr&HcFF@1(X7FFptr7H7 @X7#FF@19Xy  M T M T Tg >rW0 M B Xs'"WS int0Xl  3qO J JmwFY [ ]# ^#NOx ?E  q1 , q1 H sp H# x #ctx $!# Ĉ %# 2 &#1 ( 44  2 q# 2 q# 2 # L3 #1 f #' :$# %# E&M#Hx     ^ p    lzx$0< H!T"`#l$x%& '0()*+!,< -. /01 23L4e 56 789:)K 2 3- ב.# /# M O#cswQ?# RN# 3T#(fidVf#0sid`f#4 gvb#8 \c#Hfi#X j#` Xkf#x >l#t /)key*f#val+#.Gf Ki8[p\#b]# ^# E_# Z`# (a# b# d#$ e#( 'f#, z g#0^$#=4#6q# 9x# 'A#*log,0GN^/`qq^1  ? O#"& ?*(  + B!xOj ?" #$?%&#(#'((  )WAWAh$*h)] WAXAJS*h+$cx(x(  )SXAOXA(*ch)S+PXAvXA*ch,^`FϝF -f h-sidfdO+YU2 G (G (   )"  vXAXAHr { *2 h)" XAXA  *2 h..ϝFF -h h-xd.0FFh< /.l-inch/Zd0M/F F -h P/# H-argɦ@10FF2k`2id2inc\ 0. FF(` -h P/# H-arg@15FF2k`2id2inc\3KX4`,F]F 5h H6# @5ret 5arg7ISF1 FVF8x\3?X9-N]FFQ 5hN X5xNT5argOH9!_FҤFH 5h_ X6#_ P5arg`H1FФF8kbl:p+fҤFFb -fd+?1FF2sid1f\;#22k6X<';BP1&FF2eEb H g #=%P}FYF -sidPf1FRF;#_@<';VX1F:F2eY P g :͟d?YFȧFh]-siddfL1dFƧF;#fP2kgl>ImkȧFF>u؟F:F(? '  wt?%( 0wt@  DABy??%Bg>Bo qA;!LV  O 1?ş#f wt;Z% @wt$np(N[1(<SLLN442#2#2#L3#O 1f1S int0l  3J  #A:$#%#E&#E ) K     2U}}##e#mslogcl~%Zz ~M2mYC^mom^$m#=4#6# 9# 'Alog,0}^$+*^*=I*0 } }_* y  y  A#"Q&Q*QW + ]QWq`<6}#šR#q`Zf6<ǡ@GlogGr Gq`06,8W6,AB6Mp` (6  B  B S%4x#%4}_e%4p_$4S_h_# '!>kC"C# Sk Ss#ip p p   $L % } }I%A G&6 'q|(| Q)cA+A*qh'(|( +WAWA*h+] WAXAH(1*h,-YAH  * h' ( .Ji.)i/msgi + vFF * h* `* \* P''S(S.Jp.)p/msgp _+FF~*'h*1`*<\*GP''"#(0 .Jk.)k.%k9k+РFuFh&S"&#*X*P*L*H9k*@0<cx( ( +ScxEE*ch+SaEܖE(*ch0x(S( +(2N*B*B!**h+4*B*BPY*h0si~( ( +Y YAYAH*ih+Y>ZA&ZA*ih :;y<;g>! >;^S int0@l O J Nin#:$c#%c#E&5# Hx           ^ p          l z   x      $ 0 < H! T" `# l$ x% & ' 0( ) * + !, < - . / 0 1 2 3 L4 e 5 6  7 8 9 : u+ \9   XsO>xFJF|_J l O S intNrrE 04 3Br)Z+#-#/l#30# t#7:$y#%y#E&# )G Ӣ"p#y#\$p#; 0  ; I 2  /xF٭F/lXF׭Fi1WlG3Ap٭FFhVidAWlFF1f Orfe VO¢FlFidOWl\Oph.FjF1 OV^WlFF(<^lX\^pT}FFei`hڢmFJFoutmXFHFipWlخF9Finjr`yGe* `^s.;LFF`l O J S int:^N@ ^F:XeB myOBE p{+ F -w# > .#!RF # MW# яW# =^# iovF#U p [ f^)K 2\LFF'hkL v+UFFHIfd+W.@/I a!sz3hZpAFCFfdAWLbufAw@XARCX)nrdEPţZCFsF@fdZWLbufZ`@XZm\X)nwr^PbtsFOFhfdtWLiovt@ttWH1 ϒOnwrwX0xF p OF>F:fdWL@ڣWHX W>F´F(fdWL@rcW\´F0F=^X'h0FaF 'hя^`aF5FHl'hroww`X1| O|p lW5FF'fdWIxÖHϣϖXiovPƌۋ@WUWUU !g>+ o;1FFcl O J S intN7E &oo7) &'FF  $ Hwt ; FFdO?J intz &fO 'Fc(444  - . (/> 1F# 3[# 5[# 7# gv9>#UNNN 0< )>U# B@# t Bx# D# bF# wWH#(K M#topO# `Q#[UUN-l S @ -=J=B f,E U[FFh #UUhVg[F$F ghw$F=F( ith`6F=F[F @#6UhԤ@[FF p#@U`ΥJUFFH JXJPZJ[L#LUh^\FF \Xit^Uh_U`sUFF sX#sUPs[Lu[lx`٦}UFFh $}UX0}FTUhUFF $U`0F\FF( `xF)>U`$UXFTwUHFDF@ *<UuUFFCFF `xP*>U`$UXFTwUHFDF@׽FjFUdUF-FFLF y`Hy@iO  [l* # U` O[\[!}0LFFH`0X"dir0FTi0mP #2Uh#QFFFQ|Q[|Q|ZQ[|$U O %XUh `]| x``FaF ܥlUX=N N-#UFF\ |[|$Ul  O `| xh %U`=l N\ #FFFhq |[|$U  O `| xX #UP 0FL%F FO Z[  %UQFF U@= N q &lFF "ith# UFFF( "it h#ŤUFFF# "ith'<FF <|< | >| ~AUh  4 'ΦLFFH L| N| #QUX$U  ߔOq (~iFF #iUj kD"dirkF m @ o  q[\ r7PD N)FFhY `{FFhJ S intD(-\ 1{l  3O + 74Ng[2g[<4W  UW e2 # Z#UbE 5{6`p4 d4 f6Z# n X4D# l4O# c4e# 4# i  rd$ Z6 .W   4I > 5O#lsn 6^#I x0 G 9i H# 4 IO# W J#  K# k K#(*P N4N565w6 ̔ Slsn T^# 5 T^#  V# Q W# M X# 5 Y#( \5 Z#0 x [#8 Z6 c#@ 5 d#H |J eW#P O fW#T X gW#X O h#`  i #h *P j#x  l #| 5X5U;.WFaFhBL.Bha8WaFFyL8BhPCWFF(LCBhƧJWFFLJBh3QWFuF LQBhXWuFFH=LXBhlWFFnLlBhD}FFL}Bh WFFhLBX .#p!Svn# qnpqpnn op 7q5-lW-q##lW#gH Md h##h#d#Ho6,0&\ 1- 36`4d4f6#n`X4##l4#c4#4`#&pHe07d9#*h:#e;#g<# -g=#+e># i?M# g@#( . p p#?:$ #% #E&#)O+^]l U(*D,#h,#,#,#cb,#,#    i  g07pD9#h9#9#9#cb9#9# fd;#(<#,    p ird$   O q1q1sp# x#)ctx$#Ĉ%#2&#3-Rב.R#/R# )4w(537#buf8M#pos:M#end# t `yr  k3m#Zo#posq#s#iovz+#+H;HtHĉ_ulj#H#inX#out#0 ;MCO#cswQ#R#3T#(fidV#0sid`#4gvb)#8\c)#Hfi#Xj#`Xk#x>lC# Ï%d+)#YA$-.CHI#J#0"KI#`LI#piobM#eO#rP# ;r< pos#sep ##^$, , , #=4 #6# 9 # 'A   log,0<    ^/    ^1    < ! <   " , # #$"Z a  %&, w  $*    , &+       'H  < < (  )  * , ( (, +6G^FF(,d|p FFp -ev|w h; .voFF /  h/O `/i^X ^.oFDFH + / ^X/O P0FBF1ek^h2R8DFeF Z /8Z h )2WNeFF! / DNZ h/xNZ `.XZFFh! /xZZ h,VoZ FF! / DoZ h,RF7F("2 /xZ h,{G7F]F"e /4wGe h X,CsN]FF" /4wNe h37^F FH#/7w X-buf7e P-sz7H/i8^@0F F4n;^h.W4 F&F#E-m4Eh I.d:&FwF$-m:EX04F`F4f=`04FPF1X=h  )3TRMp wFlFh$X-mMEH/iM^@0FjF1 P^h5*4fRX0FF1XR`.VlF F$-mEH0xF F4f`6U  pO7xFF1Xh0FF1XX H3T FF(%m-LTmX/eTT0FF4sVsh  3߮jsFF%-Ljmh/=jd3ݭssFoF%-LsmX/=sT0'FmF4sush2VoFFH&B-ssh.F-F&-ss0F+F6U ПO1@1:O hH3-F_F'+-Lmh-sdd0֬kFF-9LmH9rs@9idx0F}F:i\  ?FFh-9rsX@ZT9chrPAѮF0FF:i l>FqF-N9Lmh8&qFF(.9L&mX@&P@i'H0FF;)l  8.sFG.<9Lsm~0#FG:susH;z;i{~;|D;D~@; ^~;O^~;p ;X;:ine :rcT7F{G:rs0qFG:nrd^=+&:e<5,:eA 8GLG.9Lm0GEG:ssP;&e H;@1 @;iX:ai0GEG:e8CLGGH/L9LmX0XGG:ssh8GG/9Lmv0GG:ssP;iX;9igv;sH;&w;9'v:rc(D0yGG:e",,'H8@G8 G09L@m}0G. G:sBsH;C:bufD @;&eE ;@1F ;iGX; M^;OM^~:ssPg}6U @O:aR;9iSP;0gT~:nwra7GGt:aY0G. G:ekH"8_8 G Gh0 9Lmu0K G G:ssP;L;iX;9igv:ine @:nrd;w;9v:rc0z G G:e Bc G G0!9Lmh0 G G; %! O;9:! Oi%!H!i:!H*!J!CDy?!w!     )Dg>! W!E D^DUYl%# t     NY[_]+#^ #56`4d4f6u#nX4_#l4j#c4#4#x]_#ref`f# 6^$#=4N#6# 9# 'ANlog,0^/ N ^1  f  #!"=D"&Zgf!*x #+  Y$  % f& ' %%(D#)#) *WAWA(1NW+h*] WAXA1}+h,$)) *XAOXA1+h*+PXAvXAH2  +h-ӯPA G G2A .sidPl;-h5f G0 G3y .L5y h "-ί?f0 G Gh3 .L?y X/< G G0sidDl-VMf GZG3< .LMy H/ GXG0sidRl0fdUfh19iVP2ưiZG"G(4 3i 40,1k X0LnHP1CofL4`,0ew @  %-f"GqG4 .Ly h3 `-fqGG4- .Ly h- fGGH5^ .Ly h5;߰GG5 .Ly h6    f  , U ) )  *  vXAXA6  + h* XAXAh6> G + h7U+y 8  D8m 97yb  f N f N N&7g>  z 7o  N7 b67%d61*N ^s1(c ^s1-e ^sg) 1 > O gS 1ïh `OC tGTGNO J g[intl S 3(L]GTG6L(hWP#;'1**NYN Of;TGGl O J S intN7E zz7TGG(7Oz7#z)|7Lܲ|7H7|7D|7@7 nSGG7/7T)Hܲ@7O7d_7oGSG7 crc7ol7`77h ) UGoSGGH8\ crcGoL bufG@ lenG7HI7lJ7\ײK\`> =_GG8axa7lbxa7hcxa7ddxa7`kL9 QGGGO8J l O S intNyE 0? 3Mq1q1 sp#w x#, ctx$# Ĉ%w# 2&-#1(7 GGp 44  2 M# 2 M# 2 w# L3 w#1f,  # : $#  %# E &# 3- ב.# /# M Ow# csw Qb#  R# 3 T#( fid V#0 sid `#4 gv b#8 \ c#H f i#X  j#` X k#x > l#tG H"W q## >## ## Z$M#0 beg%M#4 X&M#8 ^'w#@ x(W#H wnp6GG*G9R8*GKGh98h[BKGG9 DBhxB`WNGG(:> DNhxN`XZGG:mxZhVoG)G: Dohc)G;GH;xhRb;GvG;xhث2=vGG<=ch2Dh;8=GGh<ch8Dh>EDGG<Z>M\GGresBDhZLG(G(= chLDhS(G{G=:chSDh \{GG=ch\DHGGf_`GGX`hGGfdPGGXeXk,wGQGH>chkDik(GOGfmHڴn=o$o`resw@CGxGz=_GGXPG/GXTWwQG{G>$chDhϳb{G?G? chDwiG=Gڴ=o$`iMhGG=_G8GfHGGXPy?GtGh?W chDhw`a۰=tGG? chDh.=GG(@ chDhhbGGG@ chDwGEGqMlf`cntM\"G>Gh XPDGdG XH -!=GGX@" D#UY <   $# y  bb%#g >)  # ouO];t;HGGO8J l O S intJ8WM5TM8[MC8D:i:iUbX#bN>MVi>fiOi _ii̸888i@ ifi  Ĺ)f #d!"# e x)f z#f {q#  U B mfW b X #8.IR KR %.0 6i @f Ef#Dv KO2 RDE  .DR 0p#/ 5# =#P >#V @{# A# V Cb#$ Ep#({ J#0 N/#8{  P:#@/ [#H( \#XC ]#h j#xqW( ~X W"bAY#-S$Y: JWL#UWM{#QGGTSb#fYTb#{XU#YzW[#UW\{#{X]# aWc#UWd{#gXeb#Sf#-Yg#kTm-#q/Usi#>Xtb#x8Sz-#Q{b#V|M# pESG}N@V_rt^GWhzKYnDVu-T}b>@b#XAb#mVCb#U~8#TSU b1fUQ!MGbG-  1 QS##cS+.#X.b#qY1# IEqmq4ouqlqpolSmo lZql5m mmp nmS $D&b#h&b#&b#&-#cb&#b I S'IU(*1D,b#h,b#,b#,-#cb,H#,B# BBb  1U-G(0D2b#h2b#2b#2-#cb2#at2# b Z G3Z g07m D9b#h9b#9b#9-#cb9 #9B# fd;b#(<b#,~ ~ b  m  g=po0A DCb#hCb#Cb#C-#cbC" #atC# nE#(  b   poF @J DLb#hLb#Lb#L-#cbL #atL# N#(qGO#02P #8  b 4      Q4 U0U DWb#hWb#Wb#W-#cbW #WB# DXYb#(  b   UZ 8_M Dab#hab#ab#a-#cbad #aB# Xcb#(piddb#,eb#0 fb#4^ ^ b  M g ]nssE Dub#hub#ub#u-#cbu\ #uB# Aw( #(qGx#X`y#`בzv #hZ{v #wd}b#V V b  E s~ r  Db#hb#b#-#cb #  b n  rn  GDb#hb#b#-#cb^#XXb  G  Db#hb#b#-#cb#b p p IDb#hb#b#-#cb`#ZZb  I3 Db#hb#b#-#cb#b r 3rƉ(ZDb#hb#b#-#cbq#w# kkb  ZƉXVURVURպC ?lmpr9d$  b ؊Xb#s8|#o9|#7|#8|# :|#(6|#08|#86|#@a9|#H7|#P7|#X.7 D#` J#h7 b#p&7b#t9#x:F#&9T#6P#`#&#8/-#80-#91-#62-#93-# F5b#:7f#6 h8DD#9J#tb#   ?` v x+[#2[#ҵ#E#$E#4%E# l&P#(`'P#0)#8*[#@+[#HV,[#P!-+#X[; 3M+ 78i|  wdb#fS;#W ;#len!;# "# ľ;#pad#{!W !WL ! N!WT 2 "03#'6#AQ9#[;#>#9C#@# D#?#,?# E?# ?# M# #Dw#b##i D#P#at#w'#u#AhCw# DG#sH ,$(fDmȷJy:d OptrQ-fdRbu32S;u64TF>Uf  WY;#Z# 'fd)b#*[#V+[#p'Oio) #to*( #0cb+`#`arg,-#h`b- O%UNbHGSG@&%4SG GHA 'v4H(: h)GG*f@`+"GG*fLX &1^M GGA*vaMl*bufb8|*icbh*pd|`+QGG*ckM\,ٹGGB'cbh -/G& GhB'msgh&-& Ge GBJ'ptr-h.Zi`,Խe Gz G(C|'cbh--i |&h-z G GC'ptr-h.Zi`/A G|!GC2*tvL`+ G5!G*tsFP&^S|!G!GHDy+!G!G*tsX`0j!Gt"GD.OjX+"Gh"G*tso`1Qbt"G"GE/.b\'curbX'cntbT(bl&U-"G/#GhE.bl.7-`'cur9X'cntbh2/#G<#GE'wh.Vbd d0x<#G$G(FU'w-X.VbT*w_h*pribd+$Gg$G(b`-1$GG%GF'wX+$G%G(bl-G%G%GF.Vbl-%G%GHG5.5X.bT.:ObP*ibl -K%GM&GG'fdbL.VbH(ݾ`*wh+&G8&G*evb\   -M&G&GH'fdb\.VbX(ݾh0 &G&GhHS'fd bl.V bh-)&G'GH*ibl+&G'G*fd4bX(ݾ5P*w6`(8?O(׿9?_-Q'G(G(IM 'fdQb\.XQbX(,S?o+W(G(G(Ybh-{`(G(GI 'fd`b\*wbh&˽mb(G")GI 'fdmbl-x")G)GHJ *fdzbl-ǻ)G)GJ"!*fdbl-c)GM*GKS!*fdbl-]M*G*GhK!'fdbl2*G-GK!".!"'Nb'kb*he@*E!"X3@-(gh( !"`*pos!"P 2W-G.G(L".!"H'kbD*heP+H-G-G*pbl-:*.G.GL".*!"h'N*bd'k*b`-m4.G.GL+#.4!"X'N4bT*i6bl-Q.G/GHMo#+.G/G*fdsU`-~/G0GM#.~#X+$0G0G(bl+B0Ge0G(@F` w-0G1GN}$'iowH.VbD*ibl)0G0G[$(@F`+0G0G(P01G*2GhN$.DXbl-*2GA2GN$.DXbl0 A2G2G(O"%.DX b\*w h-ͺ%2GI3GO%'iow%}.V%b}*si'%}*sip'%h+2GG3G*res+`% -FI3G4GO&&.FbL'pidFbH.=FbD*wH&&h(Ibd j -^4G4GHP&'sw^&X.V^bT*pid`bl(=`bh  4pG4G7GP%'5fdGbL5oevGbH5nevGbD6evIP7վJ?o8 6G+~6G6G7bh4߻7G:GQ'9i6ibl7bh)7G69G'6ev'`6fdb\7 bX6gotbT+9Gp:G6fdbP7?O :b:Gd;GhQ#(9Xbl;d;G;GQ; ;G GRN)5fd4b\5oev4bX5nev4bT6idx6bl=U^) O)pGV@GHS)9iYX6p[)h6res\bd=U) O ) )>bV@G@GS*9Xbl?@G@GT4G@G4CGhT*5fdGb5oevGb5nevGb+ AG,CG7&lb\7fSmP+ZAGBBG7qbL4#4CGEGT+9i6tv6resbP7bT+DGEG7&b\6bitbX+DGEG7H7@+DGuEG(fS(b1bEGFG(U+.Xbl;H0FGnFGU@hbnFGyFGU@HbyFGFGHVA߿bFGFGVBwMFGFGW,(XMl/۸MFGFGhW,(XMl/)MFGGGW-(Xbl@MGG%GG(X@HM%GG1GGX@M1GG=GGX,=GGSGGHY-.qGh,SGGiGGY-.qGh,iGG~GGZ..-h@Է-~GGGGhZ,GGGGGZk..Nh,t GGGG([..Q h.t `- GGJG[#/.X ML)GGHG/*ts `+$HGNHG*ts P0m JG|NG[T/*io bl;ȵ |NGNGH\-z NGOG\/'w h=U/ ӱO/ /- OGPG]+0. !"X'N bT*i" bl=U+0 DZO N)- / PG\QGh]0'ws/ 5h'cnt/ bd=U0 O0 00; \QGUG]1*i> bl*w? `*w2? X=U1 O++RGSG*jJ bT )/+ bUGDVG(^T1.X MlCŵ DVGQVG^0= QVGxVG^1'w -h.V bdB MxVGVGH_1*pri bl(X Mh0~ VGoWG_<2+VGHWG*p <2h D-\ oWGWG`2+WGWG*pri bl-޶ WG[YGh`2=U2 O+(XG$YG*w 2h 0 ( -!! [YGQZG`U3'w! U3H(qG# `*at$ h+YG4ZG*nat) X  -: QZG\G(a3=U3 O+^ZG[G*wB U3h3 3-e \G]Ga4*ig bl+\G\G*wl U3`2| ]Gr]Gat4.| X*i~ bl+]Ga]G*he !"`- r]G_GHb4.K H3p-*i bl(B `3-(ҿ X/] b_GgdGb5.X b=U5 O+`GcG( h(g `( X)aGaG5*to P+aG bG*to% H5 5,| gdGydGc5'how| blCU ydGdGhcC dGdGcD dGdG(dD dGdGd0 dGeGd6( h20 eG)eGHe6. D 6h. ` 2Զ )eG{eGe+7. D 6h. `2| {eGeGf[7'w hBy beGBfGhf7'w -H*w_ h(h bd+eG;fG*p <2X2 BfGfGf 8'w X*pri bl- fGfG(gJ8'w h.D bd- fGfGgz8'w h0 fGGhGg8'w X*fd bl=U8 zO+dgGgG( bh N)0 GhGiGHh89'w h=UH9 oOH9 890# iGYjGh9'w# 2X=U9 `O+iGiG(0 bl /0; YjGtkGi:'w; 2X=U.: RO+jGEkG(DD bl.: :0Y tkGtlGhid:'wY 2hB۵t tlGlGi:'wt 2h0{ lGpnG(j:'w{ U3X=U; @O+mGmG( bl; :0 pnGmoGjz;'w U3X=U;  O+nG\oG(D bl; z;0` moGoGj;'w U3h0 oGBrGHk'<'w &~=U'< O+qG?rG*sa S~ 30BrGwsGk<'w&~+rGRsG*ss(9~0m>wsGsGl<'w>&&h0fOsG4tGhl<'wO&&h-r4tGrwGl='wr=_)tGuG7=*sfsxv_+.vGvG(`=_+KvGvG(fSbl(3|` b =E-rwGwG(m='w=X(.bh*wdbl-)wGxGm{>..b\'wdbX'ev{>P+!xGxG*w_h+:xGxG*w=` i-xGcyGm?'w}.Vb}*buf?}*ofsbl*lenbh+yGOyG*ev{>`!?E;ncyGyGHn&byGyGnt?*fdbl;p yGMzGo-MzG{Gho@(.!bl+zG{G*w_5`+zG{G*w:=X0MU{G |Go4@'wU=h-F^ |G}G(p@'w_^2~.V^b~*w`=h(בbv ~0}GGp@'w=h0TGGp@'w=h0ѻGˀGHqhA'whAH+GÀG(Db\+'GG(bX  0̹ˀGÁGqA'whAX+GG(Dbl0ÁGzGrB'wX+"GSG(bl0zG#GhrdB'wX+GG(Dbl0s#GڃGrB'wBX+GG(bl 0#ڃGG(sC'w#BX+GrG(D,bl0G:Gs`C'w`CX+GG(bl f0:GGsC'w`CX+eG҅G(Dbl0TGGHt D'w DX+BGsG(bl 0GQGtbD'w DX+ӆG@G(Dbl0QGGuD'wDX+GG(bl |0 GGhu E'w DX+CGG(Dbl0 GGu=E'wDh-0GLG(vE.0EX.V0bT*cb2`h*arg3-` -=LGGvE'w=X.V=bT(?Eh-DEGĉGv=F'wE2X.VEbT(GEh0MĉGGHwF'fdMb\.MbX.iMP'cbM`H'argM-@(OEh(yw hwt(w lwt( pwt(b ^s7G* xwt7+ wt7Ϳ, wt7^/5 wt7*0b wt7e1b wt<2G7C3G wtbG74G wt7 5G wt7e6b xt77d  xt79 @xt7": Hxt7w Xxt7@b \xt7A `xtHbbb7BH hxt HH7CH pxt H7}E xxt7pFb xt7H xt7I xt7|Jw xt7Kw xt7N xt7Q xt7qT- xt7xU- xt7V- xt7W- xt7[b yt7B_) yt7L`b yt7,ab yt7b9 yt7-cb  yt7 g' (yt7hb 0yt7.i9 8yt7jb @yt7kb Dyt79 Hyt7ab Pyt7>b Tyt7ƿ!" Xyt7'b `yt7b dyt7!" hyt7b pyt7b tytKK hA7K yt7\G yt7G yt7vb yt7;"L yt X7hb yt7b yt7ͶgL yt 7rb zt7b zt7L zt Z7b zt7ؼb zt7LL zt 7b  zt7Rb $zt7bw (zt7KM 0zt k7Yb 8zt7|b  tF & `wtGUY%  OH9RJH;;GGO8J l O S intJ8WM5TM8c8[MC8D:i:iN>fiOi_ii̸88@ ifi:Hmi:\:l:| :F:\B f2J# V @{#  A# V Cb#$ Ep#( { J#0 N#8 {  P#@ / [#H ( \#X C ]#h jz#x)  % I '#  (#Jm AIh HƀԀ{y]~D{-{   } y x*}Uz`}~2υу ~чzszxUІ} !"܄#|$Fz%X{& ' (})=*4+,-.fz/{0z12Y3~45~6C7z89|:„;M<y<O=|>Ky?KV|py*!zކyxi{ y4~{20~s z"{{zzzHI|fz3l}){{{yyTxz6|{3 |Byn{lA|L}B{d?=z}B~E\yR̈́||p}S~l~yԂ3|5yc*}s||zjyy\|{d|}U4}Td~́.b{w?~zgR}W(s r3 r P#wd #  # &# Z-# r#( r#0nv1#8nv2#@:Ob#HLrb#LQri#PVri#Xmrb#` ?#dX?#epriT#f#h5e #po-g#xVg#grp #s #Fs #r #4 e b# F# :O?# T# [ #fr6p v b  { GSTrUVur_  r qfdtb#lenvb#strw\#k3q?vLv1  W   :[r^*'e  E    02J<<  !0"#~$%&'(q)*+,v-./ [5P|oV{ g [ b!0+_~:ΎœEEaryn p 28#  8# ҵ)# *# 4+# l,#( `-#0 .#8 08#@ 48#H x58#P 6#Xb1 ke# {^# 7]F#  ?# \!1#:AcPz[  DIR +`acRptrT#lenUb#(ac#ב##tid # !OqsO#qeO#HZb# _"bGًGw#tid}$}#arg}%bl%U~%}%Z} &YًG1GxZ'bufYZh'lenYbd(b1G}Ghx'tv1`'tv2XE)}GGx'wrkh *G،G(y'wrkh(PM،GGyK+bl(<MGGy+Ml(MGGHz+Ml(MG Gz+Ml) GG{,'q,X,pri bl_(bGCGh{'q,X'req P,pribl&$ CGG{'q$,X,pri&bl-GG,req/ `&#>bG G(|.>u .>u / G9GS+Z@`/9GgGx+ZAP-gGG+ZB@*oZ GG|,wrk\h0U `O: 1rG>G|*>GGH}E,req h&bGoG}+Ml+Mh+E@+E2-,req `-ԒGG,resb\*YoGG~'req h*GĔGh~C'req h)ĔGG~u.h)Y GG(. Ml)`GG. Ml)G!G .Ml)#!G>GH=. #Ml*H*>GyGo. *Ml*6yGG'grp6 h&0HbG^Gh'grpH h*3W^GΖGȁ 'reqW h&'`bΖGޗG(~'req` H,resbbl-"G͗G+fb\,grpg `3u|ޗGG'grp| h33G9G'req h39GSGH'req h4MSG^G4?M^GiG4MiGtGh4MtGGȄ3RGG(.h36GG .Ml3GΘG<. Ml3FΘGGHo.Ml3GG. Ml3GG. Ml4bGGh&bGwGȇ^.T|X.^P-5GdG,buf`d E&bwGG('fdbl'tv^`&jbGיG'fdb\,resbl&bיGGR'fdbl.`.-X.XMh&*bG!GH'fd*bl.!F*bh.*`'len*-X&q8 !GƚGW 'fd8bL.8@.X8-.bl,res?bh7^VG\G(&n\GMGa,.vnH,reqp `,tsqP++  G?GH9'fd+ b\.+ P'pri+ bX'cb+ e H.+ @,req- h60  ?GG9'fd0 b\.!F0 X'pri0 bT'cb0 e H.0 @,req2 h65  GG':'fd5 b\'uid5 X'gid5 T'pri5 bP'cb5 e H.5 @,req7 h6:  G$Gh:'fd: b\'fd2: bX'pri: bT'cb: e H.: @,req< h6?  $GGȜG;.j? b\.? bX.y? P.? -H'pri? bD'cb? e .? ,reqA h6lD  GG(;.`D |X.XD bT.!FD P'priD bL'cbD e @.D ,reqF h6I  GGj<.`I |X.!I P.պI H'priI bD'cbI e .I ,reqK h6N  GG<.`N |X.N P'priN bL'cbN e @.N ,reqP h6S  GGH}=.`S |X'uidS T'gidS P'priS bL'cbS e @.S ,reqU h6DX  GvG=.`X |X.!FX T'priX bP'cbX e H.X @,reqZ h6]  vGWG>.`] |X.!F] T'pri] bP'cb] e H.] @,req_ h&Zc  WG,Gh>.:Oc b\.`c |P'pric bX'cbc e H.c @,reqe h6-h  ,GdGȟb?.`h |h'prih bd'cbh e X.h P6Lm  dGG(?.`m |h'prim bd'cbm e X.m P62r  GG(@.`r |h'prir bd'cbr e X.r P6w  G G@.`w |h'priw bd'cbw e X.w P6 |  GDGH@.`| |h'pri| bd'cb| e X.| P6  DG|GQA.` |h'pri bd'cb e X. P6  |GGA.` |h'pri bd'cb e X. P6  GGh5B.` |X.X bT'pri bP'cb e H. @,req h6  GGȢB.` |X.!F T'dev H'pri bP'cb e @. ,req h&  GG(VC.:O b\.` |P.N |H'pri bX'cb e @. ,req h6a  GGC.` |h.N |`'pri b\'cb e P. H63  G/G:D.` |h.N |`'pri b\'cb e P. H6p  /GrGHD.` |h.N |`'pri b\'cb e P. H6Qs  rGGE.B gX'pri bT'cb e H. @,req h6  GGE'cb e X. P,pri l,req `3N GGhE'grp h.V g`. b\3 GGȥF'grp h. bd3 GG(jF'grp h'req `0UzF )O:zF jF6  GGF'ofd bl'ifd bh. `.X -X+$M t+rM t+M ^s+ru t+{u t+ZM t+>M t+M  t+CM $t+M (t+M ^s+NM _s+ @t+{ t+ t+Z t+{  @t+(_ t+W_  t;FGFG(4:FFq1Sq1ospo#F J N l int   O  S   E TG5G ZV` argW h)xPGFG4ctx֋X)PargFHF@ִ 2H`H 7O) t PF ȃt Q Ѓt Q ؃t;;HGGO8J l O S intD:i:iN؊cXb#s8#o9#7#8# :#( 6#0 8#8 6#@ a9#H 7#P 7#X .7 #`  #h 7 b#p &7b#t 9p#x :F# &9T# 6# # &{# 8/# 80# 91# 62# 93-# F5b# :7# 6h8#9#tb#j  c   b bE  ( jkey!b#X"b###$#%#&# ( *key+b#arg,# .u80HGG0~0~o0~1~zG&GGiG}GB3X4-PGNG>H}GGBI@HJ KGGPVWCGdG.SZ][GG}/./~GG~ j -G!GeXkeybTٴhX-`J-!G}GTeXkeybTargHhX-`}GGeXkeybTi-Hh-GGseHkeybDÛ-Xh` GGte hGGԩW~optXyGG !W)GG6H%GGp8@    9Rvx;;GHܪO8J Nl intZ__O g[2g[<4M S _ ? e T# Z#eME  "buf#t# Z$M# %M# &M# W'M# (M# W)M#*-M=7     \Hp Iq# _r# v# rxM# yM# zM# ~{M# |M# 4}M# _~M# ^M# M#  ? _ ? (B T#ptrT#tmpB#cfgH# M# TmM :O# SEM# PY# M#f7NG)G4sNBh#ZM)GJG/sZBh_JGGks_Bhlen_MdetGGTseBhjGGsjBhlenjMd@tG GstBhctZdwz G>GtMszBhczZd5>GGԬsBhcT`lenM\ GG4sBhcT`lenM\GG sBhtG8GKsBhlen` H8G|GTlXcfgHhH|GGlκhÛMdMGGWlںMminMmaxM WPMl _g ??IMGGtlhMdXP?M` gsT T ? MGMGԯ?l Xcfg HhuMMGG4lXcfgHh MGGl Xcfg"Hh+(MG+G l(Xcfg*HhV0M+GGTZ l0Xcfg2Hh L3MdPMGG lPX R gscfgSHh T ?U\MGmG l\Xcfg^HhgMmGGtI lgXcfgiHh!sGGԲ lsXcfguH`ivMl!aGG4 lhcfgH`"BX"ZMT"TH!GG lH"B@"ZM TXiMlstrT`len-PMGG lXcfgHP"BHkm`maxMl W{Mh!GGGTd lhcfgH`"M\"BP!#4GG l4Xcfg4HP"4ML"5B@"5MH 7Mli7Mh!JG2Gi lJHcfgJH@"KB"ZKMnumMmXlenNMT!h2GGt lhXcfghHP"iML"iB@ kMl RkMh!ZG/HԵPlXcfgHP"ML"B@lenMlM/H.H4lcfgH`  Bh tXlenM#qM.HlHhex_lMlHHZhexTH kZPiMl Mj ?#MHHT"th"Md1MH`H0"10H 3P 4Ml 5Mdlen6M` 7MhN$k`HH"Lkh"k0`" lTX!sHxHt"s0X"LsP _ut`chv_o%U O _ ?tMxHQHԸw"0XpTh&HHch2Md!&QHH4"0X"LP %[th!Hq H%"0X"LP I%hchMd+!kIq H HlIX"I0PexpJTH"LJ@ k1LTh$SZ H HT"Z0h!_ H Hl_h"_0`"%_M\!m H2HjlmH"m0@ LoP!2HAHtlH"0@ LPiMl!-AH'HԻlh"0`"LXM'H[H4wl N@ L .-!s[HHlXregPnupMLiMl$MHH l$Xerr&Ml~>MHHTel>~reg@e~ u ? fMHHlfH ZhPiiMl'zMHHlzh'DMHHt/lh T? ?_^/  _s Td ?T _s;;HH7O8J l O S intD:i:iN؊cXb#s8#o9#7#8# :#( 6#0 8#8 6#@ a9#H 7#P 7#X .7 #`  #h 7 b#p &7b#t 9p#x :F# &9T# 6 # # &{# 8/# 80# 91# 62# 93-# F5b# :7##1(n ~~ J42M#2M#2#L3# 6h8#9#tb#   3 9 1OcbE  "buf##Z$b#%b# &b#W'b#(b#W)b#*]#ZbH)HԾsZh_)HeH4Gs_hlen_bdeHHushdie HQHfmt 3~arg">~p,QHH@s,Xlen,bTZ.blADHUHBlenDb\sFhTUHHsThTbd!^HH`s^h-hH3Hshht3HH +stXlentIPbufvhbHAHsXlenbTbh9blAHHsXlenbT9bl HH@)sXstr3PtIblibh|HHs~lenb~fmt3~arg>~b~HHs~fmt3~arg>~b~tryb~b~9R;j; H!HPO8J l O S intD:i:iN؊cXb#s8#o9#7#8# :#( 6#0 8#8 6#@ a9#H 7#P 7#X .7 #`  #h 7 b#p &7b#t 9p#x :F# &9T# 6# # &{# 8/# 80# 91# 62# 93-# F5b# :7# 6h8#9#tb#j  c   E    4 HH`;buf6`KbHH|chK\aMo$^bHCH s^Xp`hSjTCHHT=Sj%[j[lbufmhLmdpmX7nbdPoTPH HfmtXBbTd1bhd2bdiblU O   b Hw!H@ystrnumTBbbuf@fmtylenbdbh  w!H!H7+ gs9R;wMM l O J S intNO>0) 37`z>[_MMbuf_XZ_oPpahcrcbd   z MVM`fcrcÅ\bufPZoHph +VMQMcrcL@Hlil`\Lhd  )=QMM 6\P7Xl6MM6l`7ha lsq psa! tsY xsO |s s s9 sq se0 hsD~; ;MM1(8OHHNJ42#2#2#L3#O 1f-OճJ l S int   E {MM {_ {_M?MXHiT?MM@iPM5Ms_ HMTM@@ \ Pil TMM< ~ap~)MM73~c td te t^h tk tl tn t!;MNul O J S intNpO>E JmwZ;RMZMaRjbRjnRw XRS M MM iUwh piU` pjUX MM tUZ MXM iWwP piWjH pjWj@ !MLM tWpZ aejZMM`aejhbej`cejXcmpe2PargehHS+++h1NmMNamh~nmw~esmw~cmpm2~argmh~ paojX pbpjP pcqjH pdrj@ plsj pmtj pnuj dv rw~XxDytr{FM MMd tZ MM tZ tNN tZ~ NFN tZ~ NN tZ~;fNxNNN :ph1::keyGlenNh1@lc@hptrU`endUHnN\iNP'NN_iNXNLNk1@DtNN_iNT@ O M int[ `  @NNh@T@P@Lk1 @`n Nd@NNG@\keyGPlenNXh1 @l @h(NxN@key(GHlen(ND(@@out(h1*@\*@Xptr+Uhend,U`' ;xNUN'Hxe )*)#+#,#intu Q##0xNN  \0 h H 8NNh P8\ :  Q ;;l xx@NhO BNQ N`P ^BP B C[ C \D  JFaP CGPh H[` dI[H J_ lKG V P$Q N N [X T \ H [h d[` N N M ^PX T [H P \H`resl  NZ N P\   Q V  Q ;Ɇl xOZ Nv N \h v NN@ P ؆ [ ن \ CPh JPX [` d[P lONUNPXT [H P\"`OV;@`N|N6l O J S intNE kLs3W`N|Nw4$5L6 xN/ n /  0 f(l.4Wl;|NNϽO;J intS l O N0 Q( F ZG0# H0# b(I# *J#0kL + QB ZT0# V0# 'XB# kZ#E L(|NN '+(h k)` _0NND '+0X NMNc20h BN^N2 '+BX NQNcD0hPB^NNN '+PX ZP0PU0h']B`lBNNNd '+lhwBNN^ '+wH xB@ Zx0}0hb(`<N*XDNsBNN$ '+X 0P 4LU QBhz$ pQ0% xQ{ O;N$NO;J intS 0pl O + 7;v)0&#`*#)0# ## end#(  E/ +Et# C(Et# s( Ct D0# #E # JF0# Gz# / eN (J )Jt# Z+J/#+J +8P m(R# JS0#( kT#0   0 Q( FY ZG0# H0# b(IY# *J_#0ekL + Q ZT0# V0# 'X# kZ# '*`?& ZA0# B0# 'C# Dt# 'Et# kF#( R+G#0 *0' (0# Z)0# *0# +# *,_# m(-#(&E 6>tT6NNit6hk7`CNNOitCX NNcE0haBNNDitaXZa0Pf0h'n`}BNNait}H~@Z~00h`<N*_XDNm(PNBNNOit'+O{0Ue Q50X2NNc0h?NNLϱPЇHNNb0`l e U kNNdpos0U  Qkey/0NNNb0X   !BNN"p1X"p2PU Q#h#`  $*NE!N$ %*X"dst+tPU  Q9 NC!N&b30h ! $KE!N"Nr"itKX!Nf"N&c\0h$l"N#N"itlXU Q"N#N&cq0h  $z#N0$NDm "itzHU}  Q#S~0`&pos0XW#N"$N&c0h }  m ''0$Nj$N "ithU  Q   (0j$N$NH "itXUH  Q$N$N&pos0h U)$c  Q 0)\%c  Q ;@$N1NO;J intS 0pl O + 7;v)0&#`*#)0# ## end#(  E/ +Et# C(Et# s( Ct D0# #E # JF0# Gz# / eN (J )Jt# Z+J/#+J +8P m(R# JS0#( kT#0   0 Q( FY ZG0# H0# b(IY# *J_#0ekL + Q ZT0# V0# 'X# kZ# '*`?& ZA0# B0# 'C,# Dt# 'Et# kF#( R+G#0*& 5) |w w# 0# k# *#}1((0$N%NdSE(h 2+B%N%N"SE+"hk,`U8 0Q2 8 (8%N&N$SE8"XU Q%Nr&Nb=0h  NB&N')NjSEN"ZN0S0X[w@<)N*gD|z(N/Wbo0P 0b}0HB')Ni,NSE"~!key~)0~P0~U QZhrcBdpos0X5]+N0HP0Kb0P"*N;+Nnb0x+N+Nb0@# ( 0i,N"-NDSE"XP0PU Q,N-Nb0h  ce"-Nm-N~SE"hP0`U Q  ~3 Bm-N-N'+ hlB-N.Ndu'+H$key@)0-Np.N%pos 0h.N].N%b!0`&"e_I/B.NA/N '+/$key/)00&7%pos90h.N/N%b;0`DBA/N/N$ '+D$keyD)E0&I%posK0h|/N/N%bM0`"XB/N0N7 '+X$keyX)Y0&b%posd0h`0N0N%bf0`oB0N1N SEo"H$itp @'+pU  Q%maxv0h1N1N%cw0` 1N1N%bx0X   '% Qe;(1NI7NpO;J intS 0pl O E+E#C(E#s( CD0##E#JF0#G#  e  N(J7)J#Z+J#+J+8Pym(R7#JS0#(kT#0   0 y{ m(0#0#0#0#E 6>)01N 2ND'+'h-B& 2NJ2Nq+&qhk&`B0J2N2Nt0X0Parg0H+3qh7:2N2Nd +:qhA2N3N+AqposA0keyCGXU tQkL   QB3N4N$@+QqposQ0keySWXUP iQבhO3N04NZZ0P P  @uB4Nm6N+uqposu0keyw{XU \QבW   {m6NI7N]+qX]P0h`Uc PQ;;L7NVNO;J intS 0pl O + 7;Jmw)`z;E+E#C(E#s( CD0##E#JF0#G#  e, ,N(JX)J#Z+J#+J3 xx x 0 c@ )B mE 6>B.Z0L7N[7NDZzhZlx[7Nu7N.lXrnhsu7N7NmsXZu0h{7N7Nd{h07N8Npos0h8N98N$Xxh98Nm8NQXxhm8N8NdstHsrc@dhs`U `QcntBX8N8NiB\ ,8NH9NDdstHsrc@dhs`U @QcntBX9NF9NiB\ ,H9N9NFdstHsrc@dhs`UV "QcntBX9N9NiB\ V,FNB9N9NaNhbN`Y9Nv:NdYhXYv:N:NYXretYh Y:N>;N$aYXretYhOY>;N}ND$YXkeyYPretYhcmpYBdYC>N>NYHkeyY@retYhY`l>N>NcmpYB\EY>N?N" YHkeyY@retYhY`?Ng?NcmpYB\aY?NJCNd Yo#YoY #Y#cmpYB#`Y oY hU  Q+@N@N cmpYB\@NBNY`ANAN_ >YP/ANANYHOANANY@ANBNwYANBN>Y_BNBNYY  b ,b , kLYJCNQN Yn#YnYj #Y#cmpYB#Y hY ``Y nU  QCNODN cmpYBLDNFN Y KFN4GN >Y@:HNJNW wYYYXJNKN wYY4JNqKN YqKNKNYKNOQN>Y1LNNNT YPYY~aLNoMNY~NN#PN Y~NNONY~#PNOQNY~IPN8QNY~E E , uYQNaRN$YX#YPcbYHargYx@QN_RNretYhwY`    xkYaRNSNtYH Y@#YcbYargYxcmpYBdRN#SNEretYhUSNSNretYPwYX4YSN'TNYX YPcbYHargYx@retYhY'TNTNDlYX#YPcbYHargYx@ZTNTNretYh>Y``YTNVN;YH Y@#YcbYargYxcmpYBdUNUN retYhUNVNretYP>YXFYVNVNYX YPcbYHargYx@retYh1;%VN\NO;J intS l  3~O + 7;v)0&#`*#)0# ## end#(  @xVNVNdx @@ pos@0 B0` C0X !aEPkL e RxVNyWN  R @ posR0 T0` U0X !aWP בXxOe fxyWNXN$ f @ posf0 h0` i0X !akP בlxO BXNXN xsl BXN XN xh B XN0XND* xsl B0XNCXN] xЅhBCXN[XN xslB[XNrXNd xhsrXNXNxsdrB`XNXN$Gx`rB\ 0sXNXNx0sdr0B`:XNXNx:`r:B\IsXNXNDxIslEYXN YN5xYh YNUZNitXPZ0HsetxDe`whr0UZNS[NditXbitBl]S[N[N x]s\ /]P ]BX `BliaBh Xed[N[Nal`B B|[N\N$ x|X /|P |BL \N\NbithiBd\Ni\NkB`% UR: ; I$ > &I$ >  I  : ;  ( (  : ;  : ; I8  : ;  : ; I8 I!I/< II : ;!I/  : ; I8 2  : ; I8 2 .? : ; @I< dI4 .? : ; @L M < d.? : ; 2 < d.? L 4 < d : ;  I8 4 .? : ; < d!.? : ; L < d".? : ; @I< d#.? 4 < d$.? L 4 < d%.? : ; < d&'/I( I)< *!I/+, I-.: ; I@B .: ; I / 04: ; I 1.G d2I4 3.1@@dB 41 5.: ; I@B 64I4  74: ; I 8.G: ; d9: ; I : ;.: ;@B <: ;I =: ;I >.: ;I@B ?4: ;I @4: ;I A.? : ; @@B B : ; C UD.? : ; @I@B E.: ; @B F.? : ;@I@B G.: ;@B H.? : ;@@B I4I J.? : ;@@B K: ; IL: ; M!N4: ; I? < OP4: ; I?  Q4: ;I? < % : ; I$ > $ >  I&I  : ;  ( (  : ;  : ; I8 : ; I8 I!I/<  : ; !I/ !I/.: ;I@B : ;I .? : ; @@B : ; I : ; I !4: ; I? < I% UR$ > : ; I&I$ >  I  : ;  (  : ;  I I  : ;  : ; I8 I!I/  : ;  : ; I8 9.: ; < dI4 4: ; I< :: ;  : ;  : ;  : ; I I8  : ;  : ; I : ;  I8 2 !.? 4 < d".? : ; < d#.? L 4 < d$ I% : ; & I8 4 '.? : ; L < d(.? : ; @I< d)< * : ; I8 2 +.? : ; @I< d,.? : ; @L M < d-.? : ; 2 < d.!I//0 I1.: ; I@B 2: ; I 3.: ; I@B 4.: ; @B 5 64: ; I 7: ; I 8.G d9I4 :.1@@dB ;1 <4I4  =4: ; I >.G: ; d?: ; I@.1@dB A.: ; @B B.: ;@B C: ;I D.: ;@B E: ;I F4: ;I G4: ;I H.: ;I@B I.? : ;@@B J.? : ;@I@B K.4 @B L.4 @B M!N4: ; I? < O4: ; I?  P4G % UR$ > &I$ >  I: ; I : ; ( (  : ;  : ; I8  : ;  9.: ; < dI4 I4: ; I< :: ;  : ; I8 2 .? 4 < d.? L 4 < d.? : ; < d/I< .? L 4 < d I : ;  I8 4 .? : ; < d .? : ; L < d!.? : ; @I< d" : ; I8 2 #.? : ; @I< d$.? : ; @L M < d%.? : ; 2 < d&I'!I/(I)* I+.G d,I4 -.1@@dB .1 /: ; I0.1@dB 1.G: ; d2.? : ; @@B 3: ; I 4: ; I 5 64: ; I 7 84: ; I 9 U:: ; ;.4 @B <.4 @B =!I/ >4: ; I?  ?!@4: ; I? < AB4G % UR: ; I$ > &I$ >  I  : ;  ( (  : ;  : ; I8 III!I/ & : ; I8 !I/ : ;  : ; I8 2  : ; I8 2 .? 4 < dI4 .? : ; @I< .? : ; 2 < d.? : ; L < d.? : ; @L M < d.? : ; @IL M < d .? : ; @IL M < d!.? : ; @I< d".? : ; @I2 < #9$.: ; < d%4: ; I< &:: ; ' I8 4 (.? : ; < d).? : ; @I< d* I+< ,.? L 4 < d- : ; ..? : ; @L M < d/!I/01 I2.G d3I4 4.1@@dB 51 6.1@@dB 7.: ; I@B 8: ; I 9: ; I : ;4: ; I <4: ; I =4I4  >.G: ; d?: ; I@.1@dB A.: ; @B B UC.? : ; @@B D.G@B E.G@B F.G@dB GI4  H.4 @B I.4 @B J4: ; I?  K!L4: ; I? < M4G % UR: ; I$ > &I$ >  I : ; ( (  : ;  : ; I8 I I : ; I8 I!I/ : ; !I/ < .? : ; @I< dI4  : ; I8 2  : ; I8 2 .? 4 < d.? : ; < d.? : ; L < d.? : ; @L M < d.? : ; @IL M < d.? : ; @IL M < d .? : ;@IL M < d!.? : ;@L M < d".? : ; @L M < d# I$ I8 4 % : ; &.? L 4 < d'.? : ; < d()/I*.? L 4 < d+.? : ; @I< d,.? : ; @L M < d-.? : ; 2 < d.!I//0 I1.G d2I4 3.1@@dB 41 5.G@dB 6I4  7.: ; I@B 8: ; I 9 :4I4  ;4: ; I <.G: ; d=4: ; I >: ; I ? @.: ; I@B A4: ;I B.: ;I@B C: ;I D: ;I E : ;F4: ;I G.: ;@B H.? : ;@@B I.? : ;@I@B J.? : ; @@B K.? : ; @I@B L: ; IM.G@dB N UO: ; P4: ; I? < Q!% UR: ; I$ > &I$ >  I  : ;  ( (  : ;  : ; I8 II& : ; I8 I!I/ : ; !I/ < .? : ; @I< dI4  : ; I8 2 .? 4 < d.? : ; < d.? : ; L < d.? : ;@L M < d.? : ; @IL M < d .? : ; @IL M < d!.? : ;@IL M < d".? : ;@L M < d# I$ I8 4 %.? L 4 < d& : ; ' : ; I8 2 (.? : ; @I< d).? : ; @L M < d*.? : ; 2 < d+!I/,- I..G d/I4 0.1@@dB 11 2.: ; I@B 3: ; I 4.G@dB 5I4  6.: ; I@B 7: ; I 8 94: ; I :4: ; I ;.: ; @B < = U>!I/ ?.G: ; d@4I4  A: ; IB.G@dB C4: ;I D: ;I E4: ;I F: ;I G!H4: ; I? < % UR: ; I$ > &I$ >  I  : ;  ( (  : ;  : ; I8 II : ; : ;I8  : ;I8  : ; I!I/ : ; @< !I/ & : ; I8  : ; < .? : ; @I< dI4  : ;  I8 2 ! : ; I8 2 ".? 4 < d#.? : ; < d$.? : ; L < d%.? : ; @L M < d&.? : ; @IL M < d'.? : ; @IL M < d(.? : ; @L M < d) I* I8 4 +.? L 4 < d, : ; -.? : ; @I< d..? : ; @L M < d/.? : ; 2 < d0!I/12 I3.G d4I4 5.1@@dB 61 7.G@dB 8I4  9.? : ; I@B :: ; I ;.? : ;I@B <: ;I =.: ; I@B > ?4I4  @4: ; I A.G: ; dB4: ; I C: ; I D E.: ; I@B F.? : ; @@B G.? : ; @I@B H: ; II J41K UL UM4: ;I N!O4: ; I? < % UR: ; I$ > &I$ >  I  : ;  ( (  : ;  : ; I8  : ;  : ; I8 I!I/ <  : ; !I/ : ; I8 2 .? 4 < dI4 I.? : ; < d.? L 4 < d.? L 4 < d/I.? : ; < d I  : ; ! I8 4 ".? : ; L < d#.? : ; @I< d$< % : ; I8 2 &.? : ; @I< d'.? : ; @L M < d(.? : ; 2 < d)!I/*I+, I-.G d.I4 /.1@@dB 01 1.G: ; d2.: ; I@B 3: ; I 4: ; I 5.: ; I@B 6 74: ; I 84: ;I 9.: ;I@B :: ;I ;: ;I < : ;=4: ;I >.: ;@B ?.: ; @B @ UA4: ; I B.? : ; @I@B C4I4  D.? : ; @@B E FG.? : ;@@B H.? : ;@@B I.? : ;@I@B J: ; IK: ; L!M4: ; I? < N4: ; I? < % $ > $ > : ; I : ;  : ; I8  : ; I8  I  I < .? : ; @@B  : ; I .: ; @B 4: ; I?  4: ; I % UR: ; I$ > &I$ >  I  : ;  (  : ;  : ; I8 : ; I8 ( II : ; I!I/  : ; !I/< .? : ; @I< dI4  : ; : ; : ;I8 < 9.: ; < d4: ; I< :: ; ! : ; "I8 2 # : ; I8 2 $.? : ; @I< d%.? : ; @L M < d&.? : ; 2 < d'.? L 4 < d( : ; ) I8 4 *.? : ; < d+.? : ; L < d,.? 4 < d-.? L 4 < d..? : ; < d/0/I1 I2!I/34 I5.G d6I4 7.1@@dB 81 9.G@dB :I4  ;.G: ; d<.: ; I@B =: ; I >: ; I ? @4I4  A4: ; I B4: ; I C.: ; I@B D.: ; @B E: ; IF.1@dB G.? : ; @I@B H UI J.? : ; @I@B K.? : ; @@B L: ; M.4 @B N: ;I O.4 @B P4: ; I?  Q!R4: ; I? < S4: ;I? < T4G % UR: ; I$ > &I$ >  I  : ;  ( (  : ;  : ; I8  : ;  : ; I8 I!I/ !I/ : ; <  : ;  : ;II<  : ; : ;I8  : ; I8 2  : ; I8 2 .? : ; @I< d I4 !.? : ; @L M < d".? : ; 2 < d#.? L 4 < d$ : ; % I8 4 &.? : ; < d'.? : ; L < d(.? : ; @I< d).? 4 < d*.? L 4 < d+.? : ; < d,-< . I/!I/01 I2.G d3I4 4.1@@dB 51 6.G: ; d7.: ;I@B 8.? : ; @@B 9: ; I :: ; I ;.? : ; @@B < =4I4  >.? : ; @I@B ?4: ; I @4: ; I A: ; IB: ; C!D4: ; I? < E4: ; I? < F4: ;I? < % UR: ; I$ > &I$ >  I  I  : ;  : ; I8  : ;  ( I!I/  : ;I8 : ;  : ;  : ;  : ;I : ; I8 < !I/&( !I/< .? : ; @I< dI4  : ;   : ;! : ;I8 " : ; #I8 2 $.? 4 < d%.? : ; < d&.? L 4 < d'.? L 4 < d(.? : ; < d)* I+ : ; , I8 4 -.? : ; L < d. : ; I8 2 /.? : ; @I< d0.? : ; @L M < d1.? : ; 2 < d23 I4.G d5I4 6.1@@dB 71 8.G: ; d9.: ; I@B :: ; I ;: ; I < =4: ; I >.: ; I@B ?.G@dB @I4  A.: ; @B B4: ; I C.? : ; @@B D UE F.? : ; @B G.? : ; I@B H.? : ;I@B I: ;I J4: ;I K.? : ;@B L.? : ;@B M.: ;@B N: ;I O4: ;I P.? : ;I@B Q: ; IR: ; S4: ; I?  T!U4: ; I? < V4: ;I? < W4: ; I? < % I!I/$ > 4: ; I?  &I% I!I/$ > 4: ; I?  &I% I!I/$ > 4: ; I?  &I% I!I/$ > 4: ; I?  &I% UR: ; I$ > &I$ >  I  : ;  (  : ;  : ; I8 : ; I8  : ; : ; : ;I8 I!I/  : ; &< I( I : ;I8  : ; !I/ : ; @ : ; I : ; I : ;   : ; ! : ; " I8 # I$: ;I% : ;@&: ;I'!I/(< ).? : ; @I< d*I4 + : ; , : ; I8 2 -.: ; < c d..: ; < d/.: ; 2 < c d0.: ; I2 < d1/I2 I3 : ; 4I8 2 5.? : ; @I< d6.? : ; @L M < d7.? : ; 2 < d8.? L 4 < d9 : ; : I8 4 ;.? : ; < d<.? : ; L < d=.? 4 < d>.? L 4 < d?.? : ; < d@A/IBC ID.G dEI4 F.1@@dB G1 H.G: ; dI.G@dB JI4  K.? : ;I@B L: ;I M.: ; I@B N: ; I O P4I4  Q4: ; I R: ; I S4: ; I T.: ; I@B U V.: ;@B W: ;I X.: ; @B Y.? : ; @I@B Z.: ;@B [4: ;I \4: ;I ].: ;I@B ^ : ;_.: ;I@B ` Ua : ;b.4 < dc.4 @dB d.? : ;@@B e Uf : ;g.? : ;@I@B h: ; Ii: ; j.1@dB k: ; Il.1@dB m4: ;I? < n!o4: ; I? < p4: ;I?  % $ >  < $ >  I&I: ; I  : ;  ( (  : ;  : ; I8  : ; I8 I!I/ < .? : ; @I@B : ; I : ; I  4: ; I .: ; @B .? : ; @B 4I4  !4: ; I? < I% $ > $ > : ; I I  : ;  : ; I8 : ;I8 : ; I !I/  : ; (  : ;  : ; I : ;  : ;  : ; : ;: ;I.: ; ' I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .: ; ' I@B .: ;' I@B : ;I : ;I   4: ;I !4: ;I " #!I/$.: ;' @B %.? : ;' I@B &.? : ;I@B ' : ;(.: ;' @B ).? : ;' @B % : ; I$ > &I$ >  I : ;I  : ;  : ; I8 : ;I8 I !I/ : ;  : ; @& : ;  : ; I : ;  : ;  : ; II : ; (  : ; : ;I8 5I : ; : ; I8  : ; !< "I# : ; $ : ; % : ; I8 2 &.: ; < c d'I4 (.: ; < d).: ; 2 < c d*.: ; I2 < d+/I, I- : ; .I8 2 /.? : ; @I< d0.? : ; @L M < d1.? : ; 2 < d2.? L 4 < d3 : ; 4 I8 4 5.? : ; < d6.? : ; L < d7.? : ; @I< d8!I/9: I;.: ;I@B <.: ;@B =: ;I >: ;I ?.: ;@B @.: ; @B A: ; I B.: ; @B C.: ; I@B D: ; I E.: ; I@B F G4: ; I H UI4: ; I J4I4  K L.? : ; @B M.? : ; I@B N.4 < dO.4 @dB PI4  Q4I4  R4: ;I S.? : ;@B T4: ;I U.? : ;I@B V.? : ;I@B W.? : ;I@B X : ;Y : ;Z.? : ;@@B [.? : ;@B \.? : ;@@B ]I ^.G d_I4 `.1@dB a1 b: ; Ic.1@dB d4: ; I?  e4: ; I?  f4: ; I? < g4: ;I? < h!% $ > $ >  I&I : ;  : ; I8 4: ; I?  &% UR$ > : ; I$ > &I I I !I/  : ;  : ; I8 <  : ; : ;I8  : ;I8 II: ;I : ;  : ; I8 !I/ : ; @ : ; I : ; I : ;  : ;  : ;  I8  I : ;  : ;! : ;I" : ;# : ;@$( %: ;I& : ;'5I( : ; ) : ;*: ; I+ : ; , : ;- : ; .I8 2 /.? : ; < d0I4 1.? : ; @L M < d2.? L 4 < d3 : ; I8 2 4.? : ; @I< d5.? : ; 2 < d6 : ; 7 I8 4 8.? : ; L < d9.? : ; @I< d: I;< I=.: ; >: ;I?: ;I@.: ;I A B4: ;IC.: ; I D: ; IE4: ; IF.: ; I@B G: ; I H.: ;I@B I.G@dB JI4  K.: ; @B L.: ; I@B M: ; I N.: ; @B O P4: ; I Q.? : ; @I@B R4: ; I S T1X Y U1 V41 W UX1X YY1X YZ1X Y [.: ;@B \: ;I ]: ;I ^4I4  _4: ;I `.: ;I@B a4: ;I b.4 < dc.4 @dB d4I4  e Uf.? : ;@I@B g< h.? : ;@@B i4: ; I?  j4: ; I? < k4: ;I? < l!m4: ; I? < % : ; I$ > $ > I!I/   I &I  : ; @ : ; I8  : ;   : ; (  : ;I8 : ;  : ;  : ; : ; : ;I8  : ; I8  : ; < I : ; .: ;I@B .: ; I@B : ; I .: ; I@B : ; I .? : ; @B ! : ; " #4: ; I $4: ; I %!I/&.: ; @B '(4: ; I?  )4: ; I? < *4: ;I? < +!,4: ; I? < % $ > $ > : ; I  I&I : ;  : ; I8 : ; I8 .: ; I@B  : ; I 4I4  4: ; I I!I/ .: ; I@B : ; I 4: ;I .: ;@B : ;I .? : ;@@B 4: ;I .? : ;@I@B : ;I !4: ; I? < I 4: ; I % : ; I$ > $ >  I&II!I/  : ;I  : ; @ : ; I8  : ;  : ; (  : ;  : ; I : ;  : ;  : ; II : ;  : ; : ;I8  : ;I8  : ; : ; I8 < : ;  : ; !I"!I/#.: ;@B $: ;I %.: ;@B &.? : ; @I@B ': ; I (.? : ; @@B ) *4: ; I +4: ; I ,.: ; @B -: ; I .4: ;I /4: ;I 0.: ;I@B 1: ;I 24I4  3.: ;@B 4 : ;54: ; I? < 64: ; I? < 784: ;I? < 9!% UR: ; II!I/ $ >  : ;  : ; I8  &I $ >   I  I : ; (  : ; ( I& : ; I8 < !I/ : ; : ;I8  : ;I8  : ;<  : ;  : ; 9.: ; < d I4 !4: ; I< ":: ; # : ; $ : ; I8 2 %.: ; < c d&.: ; < d'.: ; 2 < c d(.: ; I2 < d)/I* I+ : ; ,I8 2 -.? : ; < d..? : ; @L M < d/.? L 4 < d0.? : ; @I< d1.? : ; 2 < d2 : ; 3 I8 4 4.? : ; L < d5.? : ; @I< d6.? 4 < d7< 8!I/9: I;.G d<I4 =.1@@dB >1 ?.G@dB @I4  A.: ; I@B B: ; I C: ; I D.G: ; dE.: ; I@B F G4I4  H4: ; I I4: ; I J K.: ;@B L: ;I M: ;I N.: ;I@B O.: ; @B P: ; IQ.1@dB R.? : ; @@B S.? : ; @I@B T.? : ;@@B U4: ;I V4: ;I W.: ;@B X : ;Y : ; Z : ; [ U\ U] : ;^.4 < d_.4 @dB `.? : ;@I@B a.: ;@B b: ; Ic.1@dB d.4 @B e.4 @B f4: ; I? < g4: ; I? < h!i4: ;I? < j4: ; I?  k4G % UR$ > : ; I$ >   I: ;I&I  : ; : ;I8 : ;I8  I5I : ;  : ; I8  : ; I8 I!I/  : ; ( <  : ;  : ;  : ; I8 2 .? 4 < dI4 .? : ; < d.? : ; @L M < d.? L 4 < d : ; I8 2 !.? : ; @I< d".? : ; 2 < d# I$ : ; % I8 4 &.? : ; L < d'.? : ; @I< d(< )!I/*I+, I-.G d.I4 /.1@@dB 01 1.: ; @B 2: ; I 3.: ; @B 4.: ; I@B 5: ; I 6.G: ; d7: ; I8.G@dB 9I4  :.: ; I@B ; <4: ; I =4: ;I >.: ;I@B ?: ;I @: ;I A : ;B4: ;I C.: ;@B D.? : ; @@B E4: ; I F4I4  G.? : ; @@B H.? : ; @I@B I.? : ; @I@B J.? : ; @I@B K.? : ;@@B L.? : ;@I@B M.? : ;@@B N.: ;@B O UP UQ R4: ;I? < S!T4: ; I? < U4: ; I?  V4: ; I? < % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I : ; (  : ;  : ; I : ;  : ;  : ; I: ;I : ; : ;I : ;.: ;' I@B : ;I  : ; 4: ;I 4: ;I   .: ;' @B !.? : ;' I@B " U# U$4: ; I %.: ; ' I@B &: ; I ': ; I (4: ; I ).: ;' @B *: ;I +.? : ;' @B ,.: ;' I@B -.? : ;' I@B ..? : ;' @B /.: ; ' @B 0!I/14: ; I? < % $ > $ >   I: ; II!I/  : ;  : ; I8 &I  : ;  ( < .? : ; ' @B : ; I : ; I 4: ; I 4: ; I?  % : ; II!I/ $ >  : ;  : ; I8  $ >   I &I <  : ; ( .: ; ' @B : ; I : ; I 4I4  &.? : ; ' I@B 4: ; I .? : ; ' @B 4: ; I .? : ; ' I@B  % UR$ > : ; I$ > &I I I !I/  : ;  : ; I8  : ;@ ( : ;I : ; @ : ;  : ;  : ;  : ; I8  : ; I8 2 .? 4 < dI4 I.? L 4 < d.? : ; < d/I< .? L 4 < d I  : ; ! I8 4 ".? : ; < d#.? : ; L < d$.? : ; @I< d% : ; I8 2 &.? : ; @I< d'.? : ; @L M < d(.? : ; 2 < d)!I/*I+, I-.: ;I@B .: ;I / 04: ;I 15I2.G d3I4 4.1@@dB 51 6.: ; I@B 7.: ; I@B 8: ; I 94: ; I :.? : ; I@B ;.? : ; @B <.: ; @B = : ; >4I4  ?.: ; I@B @: ; I A.G: ; dB4: ; I C.? : ;I@B D4: ;I E.: ;@B F.? : ;@B G.? : ;@B H: ;I I J!I/ K.? : ;I@B L: ; IM: ; N4: ; I?  O!P4: ; I? < Q% : ; I$ > $ >  I&I  : ;  : ; I8 : ; I8 I !I/ : ;I8 : ; & : ; ( 9: ; 9: ;  : ;  : ; I8 2 .? : ; 2 < c dI4 I.? : ; @2 < d.? : ; @I2 < d.? : ; < d.? : ; @I< d.? : ; @< d.? : ; @I< d: ;  < ! I";# : ;$ : ;%.? : ;@I< d&.? : ;@I< d': ;(: ; I) : ;* : ;+ : ;I, : ;I- : ;I8 . : ;I 8 / : ;0 : ; 1 : ; 2: ;I3 : ;4I5< 67 : ;8 : ; 9.: ; I@B :: ; I ;.? : ; I@B <: ; I = >4: ; I ?.? : ; @B @A4: ; I B C!I/ D.: ; I@B E : ; F UG : ;H.? : ;@B I4: ;I J: ;I K.? : ;@I@B L: ;I M4: ;I N.? : ;I@B O4: ; I? < P4: ;I? < Q!R!I/% UR$ > $ > : ; I  II!I/  : ;  : ; I8 &I  : ;  ( & : ;  : ;I8 : ;  : ; I8 2 .? 4 < dI4 I.? : ; < d.? L 4 < d<  I : ;  I8 4 .? : ; L < d.? : ; @I< d : ; I8 2 !.? : ; @I< d".? : ; @L M < d#.? : ; 2 < d$!I/%I& I'.G d(I4 ).1@@dB *1 +.G: ; d,: ; I-: ; I. /4: ; I04: ; I1 241 3.? : ; @I@B 4: ; I 54: ; I 64: ; I 7.: ; I@B 8: ; I 9.? : ; @@B :.? : ;@I@B ;: ;I <: ;I =4: ;I >4: ;I ?!@4: ; I? < A% UR$ > $ >   I: ; I&II !I/ : ;I  : ;  (  : ; : ;I8  : ;I8 I : ; : ;  : ;  : ; I8  : ;  : ; I : ; I8  : ; I8 2 .? 4 < dI4 .? : ; < d.? L 4 < d < ! I" : ; # I8 4 $.? : ; L < d%.? : ; @I< d& : ; I8 2 '.? : ; @I< d(.? : ; @L M < d).? : ; 2 < d*!I/+I, I-.G d.I4 /.1@@dB 01 1.: ; I@B 2: ; I 3.? : ; @I@B 4: ; I 5 64: ; I 7.? : ; @@B 84I4  94: ; I :.G: ; d; U<.: ; I@B =.: ; @B > U?.: ;@B @: ;I A4: ;I B.? : ;@@B C4: ;I? < D!E4: ; I? < % UR: ; I$ > $ >   I&II !I/ : ;I  : ;  (  : ; : ;I8  : ;I8 I : ; : ;  : ; I8 & : ;  : ; I8 <  : ;  : ;  : ;  : ; I8 2 .: ; < c dI4 .: ; < d .: ; 2 < c d!.: ; I2 < d"/I# I$ : ; %I8 2 &.? : ; @I< d'.? : ; @L M < d(.? : ; 2 < d).? L 4 < d* : ; + I8 4 ,.? : ; < d-.? : ; L < d..? : ; @I< d/.? 4 < d01< 2!I/3I4 I5.: ;I@B 6.G d7I4 8.1@@dB 91 :.: ; I@B ;: ; I <: ; I = >4: ; I ?.: ; @B @.: ; @B A.: ; I@B B.G: ; dC.? : ; @@B D.? : ; @@B E.? : ; @I@B F4I4  G4: ; I H UI.4 < dJ.4 @dB KI4  L.? : ;@I@B M: ;I N: ;I O4: ;I P4: ;I Q : ;R.: ;I@B S.? : ;@@B T.1@dB U: ; IV.1@dB W4: ;I? < X4: ; I? < Y!% : ; I$ > $ >  I&I : ;I I !I/  : ;  : ; I8  : ; : ;I8  : ;I8 I5I : ;(  : ; I8 I<  : ; .: ; @B : ; I : ; I .: ; @B .? : ; @@B  4: ; I .: ; I@B !.? : ; @I@B "#4: ; I $4: ;I? < %!&4: ; I? < '4: ; I?  % UR$ > $ >  : ; I I : ;  : ; I8 &I : ; I8 <  : ;  (  : ; I!I/  : ;  : ; : ;I8  : ;I8 I : ; : ; & : ; I8 2 .? 4 < dI4 .? L 4 < d.? : ; < d !/I"< #.? L 4 < d$ I% : ; & I8 4 '.? : ; < d(.? : ; L < d).? : ; @I< d* : ; I8 2 +.? : ; @I< d,.? : ; @L M < d-.? : ; 2 < d.!I//I01 I2.: ; I@B 3: ; I 4: ; I 5.G d6I4 7.1@@dB 81 9.: ; @B :.? : ; @@B ; <4: ; I =.G: ; d>.: ; @B ?4I4  @4: ; I A.? : ; @I@B B.: ;I@B C.? : ;@I@B D: ;I E4: ;I F.? : ;@@B G: ; IH: ; I4: ;I?  J4: ;I? < K4: ; I? < L!% UR: ; I$ > &I$ >  I  : ;  : ; I8 I I I !I/  : ;@( : ;I : ; @ : ;  : ;  : ;  : ; I8  : ; I8 2 .? 4 < dI4 .? L 4 < d.? : ; < d/I< .? L 4 < d  I! : ; " I8 4 #.? : ; < d$.? : ; L < d%.? : ; @I< d& : ; I8 2 '.? : ; @I< d(.? : ; @L M < d).? : ; 2 < d*!I/+, I-.: ;I@B .: ;I / 04: ;I 15I2.G d3I4 4.1@@dB 51 6.: ; I@B 7: ; I 84: ; I 94I4  :.: ; @B ;: ; I <4: ; I =.: ; I@B >.? : ; @I@B ?.? : ; @@B @.: ; @B A.? : ; @@B B.G: ; dC.? : ;@I@B D E.? : ;@@B F: ;I G4: ;I H: ; II: ; JK4: ; I? < L!M!I/N4: ; I?  % UR$ > : ; I II  : ; : ;I8  : ;  : ; I8 : ; I8 I!I/ $ > &I : ; (  : ;  : ;@: ;I : ; I8 2 .? 4 < dI4 .? L 4 < d.? : ; < d/I< .? L 4 < d  I! : ; " I8 4 #.? : ; < d$.? : ; L < d%.? : ; @I< d& : ; I8 2 '.? : ; @I< d(.? : ; @L M < d).? : ; 2 < d*!I/+I,- I..G d/I4 0.1@@dB 11 2.: ;I@B 3: ;I 4 54: ;I 65I7.G: ; d8.? : ; @@B 9: ; I :: ; I ;4: ; I <: ; I=: ; >!?4: ; I? < % $ >  : ; I$ >  I&II I  : ; : ;I8 : ;I8 : ;I : ;  : ; I8 I!I/ .: ; @B  4: ; I .? : ; @I@B : ; I 4: ; I .? : ; @@B : ; I .? : ; @@B .? : ; @@B 4: ; I?  4: ;I? <  4: ; I? < !!% : ; I$ > $ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I: ;I : ;(  : ;  : ;  : ; I8 !I/!I/: ; I<  : ; : ;I8  : ; &II5I .: ;I@B !.: ; @B ": ; I #: ; I $.? : ; @@B %.: ; I@B & '4: ; I (.: ; I@B ) : ; *4: ; I +.? : ; @I@B ,.? : ;@@B -: ;I .4: ;I /.? : ;@I@B 0: ;I 1 : ;2 : ;34: ;I 44I4  5.: ;I@B 64: ;I? < 74: ; I?  8!94: ; I? < :% $ > $ > : ; I  I : ; @ : ; I8 I !I/  : ;   : ; @ : ; I : ; &I : ; (  : ; : ;I8  : ;I8 I: ;I : ;5I : ;I : ; I8  : ;  : ; !I/ : ; !!I/"< # : ;$ : ; %I8 2 & : ; I8 2 '.? : ; @I< d(I4 ).? : ; @L M < d*.? : ; 2 < d+.? L 4 < d, : ; - I8 4 ..? : ; < d/.? : ; L < d0.? : ; @I< d1 I23 I4.: ;I@B 5.: ; @B 6: ; I 7.: ; I@B 8: ; I 9.? : ; @B : ;4I4  <.: ; @B =4: ; I >.? : ; I@B ?.? : ; @B @.? : ;@B A: ;I B: ;I C.? : ;@B D : ;E4: ;I F4: ;I G.: ;I@B H : ;I UJ.: ;@B K.: ;@B L M.? : ;@@B N.? : ;I@B O4: ;I? < P4: ; I?  Q4: ; I? < R!S4: ; I % : ; I$ > $ >   II!I/  : ;  : ; I8 &I : ;I & : ; : ;I8  : ;I8 I : ;(  : ; I8  : ; < I : ;  : ;  : ;  : ;  : ; I8 2 .: ; < c dI4 .: ; < d!.: ; 2 < c d".: ; I2 < d#/I$ I%.: ; @B &: ; I ': ; I ( )4I4  *.: ; I@B +.: ; I@B ,4: ; I -4: ; I ..: ; @B /.? : ; @@B 0 : ;1 : ;2 : ; 3 : ; 4 U54: ;I 6 U7.: ;@B 8: ;I 94: ;I : : ;;.4 < d<.4 @dB =I4  >.? : ;@@B ?: ;I @.G dAI4 B.1@dB C1 D: ; IE.1@dB F4: ;I? < G4: ; I? < H!I% UR$ > $ > : ; I  II!I/  : ;  : ; I8  : ;  (  : ; &I : ; : ;I8  : ;I8 I : ;I : ; I8  : ; < : ; !I/& : ;  : ; I8 2 .? : ; < d I4 !.? : ; @L M < d".? L 4 < d# : ; I8 2 $.? : ; @I< d%.? : ; 2 < d& : ; ' I8 4 (.? : ; L < d).? : ; @I< d*.? 4 < d+ I,< -. I/.: ;I@B 0.: ; I@B 1: ; I 2.G d3I4 4.1@@dB 51 6.G: ; d7.: ; I@B 8: ; I 9.: ; @B : ;4: ; I <.? : ; @I@B =4: ; I > U? @ UA4I4  B.? : ; @B C4I D4: ;I? < E4: ; I? < F!% UR: ; I$ > &I$ >  II!I/  : ;  : ; I8   I : ; I8  : ; ( (  : ; !I/<  : ;  : ;  : ; : ;I8  : ;I8 : ;I5I : ; : ; : ;  : ; I8 2 .: ; < c d!I4 ".: ; < d#.: ; 2 < c d$.: ; I2 < d%/I& I' : ; (I8 2 ).? : ; @I< d*.? : ; @L M < d+.? : ; 2 < d,.? L 4 < d- : ; . I8 4 /.? : ; < d0.? : ; L < d1.? : ; @I< d2.? 4 < d3< 4!I/5I67 I8.G d9I4 :.1@@dB ;1 <.: ; I@B =: ; I >.G@dB ?I4  @.G: ; dA: ; I B C4: ; I D.: ; I@B E.: ; @B F4: ; I G.: ; @B H4I4  I : ; J.: ;I@B K: ;I L.: ;I@B M: ;I N4: ;I O.: ;@B P UQ4: ;I R S4I T UU : ;V.4 < dW.4 @dB X.? : ;@@B Y.1@dB Z: ; I[.1@dB \4: ; I? < ]!^4: ;I? < % : ; I$ > $ >  I&I  : ;  : ; I8 : ; I8  I  : ; ( ( I!I/<  : ;  : ; !I/ .: ; I@B : ; I : ; I .: ; @B  4: ; I !4: ; I? < 4: ; I?  % UR$ > $ > : ; I II  : ;  : ; I8 &I  : ; : ;I8  : ; I8 I!I/  : ; ( <  : ; I8 2  : ; I8 2 .? : ; @I< dI4 .? : ; @L M < d.? : ; 2 < d.? L 4 < d : ;  I8 4 .? : ; < d.? : ; L < d .? : ; @I< d!< "!I/# I$I%& I'.G d(I4 ).1@@dB *1 +.G: ; d,.: ; @B -: ; I ..: ; I@B /: ; I 0.: ; I@B 1 24: ; I 34: ;I 4.: ;I@B 5: ;I 6: ;I 7 : ;84: ;I 9.: ;@B :.? : ; @I@B ;4: ; I < U=.? : ; @@B >.? : ; @@B ?4: ; I?  @4: ;I? < A!B4: ; I? < % UR: ; II!I/ $ >  : ;  : ; I8  $ >  &I  I  : ;  (  : ; I8 2  : ; I8 2 .? 4 < dI4 I.? : ; @L M < d.? : ; @I< d.? : ; < d.? L 4 < d.? : ; 2 < d I : ;  I8 4 .? : ; L < d.? : ; @I< d.? : ; @2 < d .? L 4 < d!.? : ; < d"#/I$!I/%I& I'.G d(I4 ).1@@dB *1 +.1@@dB ,.: ; I@B -: ; I .: ; I/: ; I0.G: ; d1.G@dB 2I4  3 44: ; I 5: ; I 6 74: ; I841 9: ; :!;4: ; I? < <% $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?  % $ > $ >  I&I: ; I : ;  : ; I8 <  : ;  (  : ;  .: ; I@B : ; I  4: ; I .? : ; @I@B : ; I 4I4  I!I/ .? : ; @@B !4: ; I? < 4: ; I?  % $ > $ > : ; I I!I/  : ;  : ; I8 : ; I8 !I  I &I& : ; ( .: ; ' I@B : ; I .: ; ' I@B : ; I 4: ; I 4: ; I !I/.? : ; ' I@B  U4I4   : ; .? : ; ' @B .? : ; ' @B ' I !4: ; I? < % $ > $ > : ; I I' II&I .? : ; @B 4: ; I?  % $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/  : ;  : ; I8 &I.: ; ' I@B : ; I .: ; ' I@B .: ; ' @B : ; I .: ; ' @B 4: ; I .? : ; ' @B 4: ; I  U .: ;' I@B : ;I 4: ;I !.: ;' I@B ": ;I #.? : ;' I@B $4I4  % &.: ;' @B '.? : ;' @B (.: ;' @B ).? : ;' @B % $ > $ > : ; I <  II I &I  : ;  : ; I8 I!I/  : ;(  : ; I8  : ; .: ; I@B : ; I .: ; @B  4: ; I .? : ; @@B 4: ; I? < 4: ;I? < 4: ; I % $ > $ >  I&I : ; I< I I  : ;  : ; I8 .: ; @B : ; I : ; I .: ; I@B  4: ; I .? : ; @@B I!I/ 4: ; I % $ >  : ; I<  III $ >  &I  : ;  : ; I8 .: ; I@B : ; I  4: ; I : ; I 4: ; I .? : ; @@B I!I/ % $ > $ >   I&I: ; I< I I  : ;  : ; I8  : ;( .: ; I@B : ; I  4: ; I 4: ; I : ; I 4: ;I .: ;I@B : ;I .? : ;@@B 4: ;I I!I/ 4: ;I? < 4: ; I? < % : ; II!I/ $ >  : ;  : ; I8  <  I I I $ > &I : ; (  : ;  : ; : ;I8  : ;I8  : ; : ; I8  : ;  : ;  : ; I8 2  : ; I8 2 .? : ; @I< dI4 .? : ; @L M < d .? : ; 2 < d!.? L 4 < d" : ; # I8 4 $.? : ; < d%.? : ; L < d&.? : ; @I< d'!I/( I)* I+.: ;I@B ,.: ; I@B -: ; I ..: ; @B /: ; I 0 14: ; I 2.: ; @B 3.: ; I@B 44: ; I 5 U64I4  7 8.: ;I@B 9: ;I :4: ;I ;4: ;I << = U>.: ;@B ?.: ;I@B @: ;I A : ;B.? : ;@@B C!D4: ; I? < E4: ;I? < % UR$ > : ; I$ > I!I/  : ;  : ; I8  <  I I I&I : ;(  : ; : ;I8  : ; I8  : ;  : ;  : ; I8 2  : ; I8 2 .? : ; @I< dI4 .? : ; @L M < d.? : ; 2 < d.? L 4 < d : ;  I8 4 !.? : ; < d".? : ; L < d#.? : ; @I< d$!I/% I&' I(.G d)I4 *.1@@dB +1 ,.G: ; d-.: ; I@B .: ; I / 04: ; I 14: ; I 2.: ; @B 3: ; I 4 U5.? : ; @@B 6< 74: ; I? < 84: ;I? < 9!% $ > < $ > .? : ; @I@B : ; I  I% I!I/$ > 4: ; I?  &I% $ > $ > : ; I.: ; ' I@B : ; I 4: ; I  I .: ; ' I@B  : ; I &I .? : ; ' I@B  .? : ; I@B 4: ; I % : ; I$ > $ >   I&I : ; : ;I8  : ;  : ; I8 : ; I8 I!I/ < I!I/.: ;I@B .: ; @B : ; I .: ; @B .: ; I@B .? : ; @I@B : ; I .? : ; @I@B  4: ; I .? : ; @@B  4: ; I U!4: ;I "4: ;I? < #4: ; I? < $!%% : ; I$ > $ >  : ;  : ; I8 I!I/   I  : ;  &I  : ;  : ; I : ;  : ; I' I'  : ; (  : ; : ;I8  : ;I8 : ;I' I : ;5I : ;: ;  : ; I8 !I!: ;I" : ; # : ;$ : ; %.: ;' I@B &.: ;' I@B ': ;I (4: ;I ) *4: ;I + ,.? : ;' @B -.: ;' @B .: ;I /.? : ;' I@B 0.? : ;' @B 1.: ;' I@B 2.: ;' @B 3 U4.: ; ' @B 5: ; I 64: ; I 74: ; I 8 : ; 9: ; I :.: ; ' I@B ;.: ;' @B <.: ; ' @B =4I4  >.: ; ' I@B ?.: ; ' @B @.? : ;' I@B A.: ;' I@B B.? : ;' I@B C.? : ;' @B D.? : ;' @B E!I/F4: ;I?  G4: ; I?  H4: ; I? < % : ; I$ > $ >   II!I/ &I  : ;  : ; I8  : ;   : ;  : ; I : ; : ;I : ; ( '  : ; I8  : ;I8  : ;I8 ' II : ; : ; 5I'  : ; : ; : ; I < ! : ;".: ; ' I@B #: ; I $: ; I %4: ; I &.: ;' I@B ': ;I (.: ;' I@B ).: ;' @B *.: ;' @B +4: ;I ,4: ;I - .: ;I / 04I4  1.: ;' @B 2 U3.? : ;' @B 4.? : ;' I@B 5 U6.? : ;' I@B 7.: ;' @B 8 : ;% : ; I I' I  : ; : ;I8 $ >  $ >  .: ; ' @B  4: ; I 4: ; I 5I5.? : ; ' @B : ; I : ; I % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I& : ; I8 .? : ; ' I@B : ; I 4: ; I  : ;    U.? : ; ' I@B : ; I .? : ;' @B : ;I 4: ;I 4: ;I 4: ; I? < % : ; I$ > $ >  I&I< ' I I I !I/  : ;  : ; I8  : ;  : ; I8  : ; (  : ;  : ;  : ; I.: ; ' @B : ; I .: ; ' I@B .: ; ' @B .: ; ' I@B 4: ; I : ; I 4: ; I .: ;' I@B : ;I 4: ;I 4: ;I !.: ;' @B ": ;I #.: ;' I@B $.: ;' @B %4I4  & '.? : ;' I@B % : ; I$ > $ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I : ;  : ; I8 .: ; ' I@B : ; I .: ; ' @B .: ; ' @B .: ; ' @B 4: ; I .? : ; ' @B 4: ; I .? : ; ' I@B : ; I .: ; ' I@B 4: ; I? < % : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I.: ; @B 4: ; I .: ; ' I@B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B : ; I .: ; ' @B 4I4  .? : ; @B 4: ; I? < % $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?  % : ; II!I/ $ >  : ;  : ; I8  $ >   I &I .? : ; ' I@B  : ; I  4: ; I 4: ; I  !I/.? : ; ' @B .? : ;' @B : ;I 4: ;I 4: ;I 4: ;I? < % $ > $ >   I: ; I.: ; ' @B : ; I : ; I  4: ; I  .: ; ' I@B ' II&.? : ; ' @B 4: ; I  : ; % .? : ; ' @B : ; I : ; I 4: ; I    I $ >  & $ >  &I .? : ;' I@B : ;I : ;I 4: ;I .? : ;' I@B 4: ;I .? : ;' @B  %  : ; (  : ;  : ; I8 $ > $ > .: ; ' @B  : ; I  I .: ; ' I@B  4: ; I I!I/ &I.: ; ' I@B .? : ; ' I@B 4: ; I .? : ;' I@B : ;I 4: ;I % $ > $ >  '  I.? : ; ' I@ B : ; I B 1 I ! 4: ; I? < &I.? : ; ' I< I% $ > : ; I$ > ' II  I  : ;  : ; I8 .? : ; ' @B  : ; I 4: ; I .: ; ' I@B 4: ; I .? : ; ' I@B  : ; 4I4  I!I/ &I4: ; I?  % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I  : ;  : ; I8  : ;  I!I' II & : ; ( .? : ; ' @B : ; I : ; I  4: ; I .: ; ' I@B 4: ; I  : ; .? : ; ' I@B 4I4  !I/ .: ; ' @B !.: ;' I@B ": ;I #4: ;I $.: ;' @B %: ;I &4: ;I '.? : ;' @B (.? : ;' I@B )4: ; I?  % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I  : ;  : ; I8  : ;  I!I' II < .? : ;' I@B : ;I .? : ; ' I@B : ; I 4I4  !I/ .? : ; ' @B  4: ; I .: ; ' I@B 4: ; I  : ;  U U!: ; I " #&$: ;I %4: ;I &4: ;I '4: ; I?  % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I &I.? : ; ' @B .: ; ' I@B : ; I 4: ; I .? : ; ' I@B 4: ; I 4I4  !I/  % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I 4: ; I .? : ; ' @B 4: ; I .? : ; ' @B : ; I 4I4   !I/ &I.: ; ' I@B .? : ; ' I@B  : ; I8  .? : ; ' I@B % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I .? : ; ' I@B  : ; I : ; I 4: ; I & .? : ; ' I@B .? : ;' I@B : ;I .? : ;' @B : ;I 4: ;I .? : ;' I@B 4: ; I  .? : ; ' I@B z /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libevkey_def.hobject.hpickle.hexception.htuple.htuple.ccstddef.hstdint.herrcode.hsay.htbuf.hev.h =A*w4t!"!*!@!u9!uL.uguuuuY..K ./gK/Y!>/ggE4.,.//!HtXNg}.ZLY/XX63#Kx/<;XX>󯑮fX@wue@< wJ1MuyYKXyJJ&u4vwJ .KK60!?$#Y?$"?<#p1.eX  QuK>Z8K60" ..02=//xuhY3/"ZZZY/"zXY"6Y]u/gYZu/YU#mX5uzrG<Kg3ɻyvc"g)3u_u[ /# X\ X2X<YgX=?3=)v/(X"=3=gX>=3gtuY=[X=\kخX=1X<YgX="^f.#J"2KY2YW WA% WA% XA## PXA# vXA# XA XA# YA >YA6Tj YA# ZA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/srctuple.htuple_convert.ccstddef.hstdint.herrcode.huio.hiobuf.hlua.hlauxlib.hsay.hkey_def.h (ZA}.&2 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hobject.hpickle.hexception.htuple_update.ccstddef.htypes.hunistd.hstdint.htuple_update.herrcode.hsay.h ZAtY2u225.Yuu&K#.K&t.~.t!"!*!@!u9!uL2/tvc"!#c"!*c"!@c"!u9c"!uLcW``` X`/.c (.c &Yc"=2YYK2=3/Ygc"1uguuuuY3gYZZZ0K<!g!2XKt2nJ/廼/4=2h2h2h2h2h2=*4=22g&0x2/#]n#[2K[/Zn#Zn#&eX]3/#滻?.?/"g%x&Y?$#`+O=/!HtXNg6ut>$>)3 .h3K)7J$L- .'2ywftL Pz.f*c#fg#Gf.<Ahc!c$2Zh!*vX.chJZ X X/YtYggK2/.f{.J WA% WA% XA## PXA# vXA# XA XA# YA YA# ZAT /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgobject.hkey_def.ccexception.hstdint.hkey_def.htarantool_box_cfg.herrcode.hsay.h WA% WA% ؁A$A/#n# tuwJ% ZsJ/sJ% V+..fC=.J XA## PXA# vXA# XA A-Tj XA# YA? /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/boxobject.htree_index.hpickle.hexception.hindex.ccstddef.hstdint.hkey_def.hindex.htuple.htypes.hsptree.herrcode.hsay.hspace.hbox.h A! WA% WA% A&J#tXJ f  * t XJtXt!"!*!@!u9!uLU.Yhn"n"tJxX\2gtx$x#x]v. Yx#2 ukwtnwY6YZZZzZZ4<h>Ȯj~0tJ0f~.J XA## PXA# vXA# XA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/boxobject.hindex.hpickle.hexception.htuple.hspace.hhash_index.ccmhash.hstddef.htypes.hunistd.hstdint.hkey_def.hsay.herrcode.herrinj.hbox.hhash_index.h WA% WA% A" ,A4t!"!*!@!u9!uL..K ./gK/Y!>/ggE ./K=hi. .~.="3>#3y"uuv/bX&2uuvYhhghtX&/.3g= .MY=2)tXKZ5y XzMY=2)tXKZ5y Xx=2UuAMY=Y)Jv;gY2)tXKT>=t]=K/ 1G5&uu)\(C! =y=6I5Mz=K5/KYK/2/g'DK2gD23[6((G*x JJuyYL0$f<uܯugD׻u'v0Y3/S}.2/>*YxY24g"?=Jm92"22=(/u" x2AtJBtJBuY2/."KAɃ#J=?8#ג')?:#ig J/|%y6tfZu(\Z(Zt#G2  XA## PXA# vXA# XA XA# YA XA6Tj) 8 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/boxobject.hindex.htree_index.hexception.hspace.htree_index.ccstddef.hstdint.hkey_def.htuple.htypes.hsptree.herrcode.hsay.hbox.h WA% WA% ܶAuffftYW.J#tXJ f  * t XJtXMX<fJf J D  X ".*W.t.;fX..fX..fX.,X.ftLt0 k6 fXf. f. nr;t 35   \ Xt#EXJ x"K#5#;*f) f  f ffL +!(f?"%'(f3.<.J1(. 1i * f $ f.<.J1(. 1i ) f % f.t..=XX.tT.tU. .3~.uvu2tt2=2=2=$.K22=2=2=u%JtXLY2=v%JtXMY20%Y20%YB="09@=2=22/.gY31X>g?:"uhu/hw f/|%y6tfktX=%#>Z[ZZZhtJ1g:2Y:/2;28lu:(Y+Jg =tX0 A" XA## PXA# vXA# XA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/boxobject.hindex.hbitset.hindex.hpickle.hexception.htuple.hbitset_index.ccstddef.hstdint.hkey_def.hbit.hexpr.hiterator.herrcode.hsay.hspace.hbitset_index.hbox.h WA% WA% A" VA hA! DA4t!"!*!@!u9!uL..K ./gK/Y!>/ggE ./K=h~. K2 .K22=uv0K"4lȮitJA0tJAtJA(/@2tJBtJB"tJ4uvYLK2[tJ40tJCttujvvK(?=%P,􃄑!u[[[[Z?5$?=&?=$k]_3ɻ XA## PXA# vXA# XAV* /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgobject.hexception.hmhash.hspace.ccstddef.hstdint.hkey_def.htuple.hindex.herrcode.hsay.hbox.hspace.hprscfg.htarantool_box_cfg.hassoc.htarantool.h WA% WA% XA## PXA# vXA# XA XA# YA A3g=.M=2Z5y XtM=YJv;g/2T>=t]=K/ 1G5&uu)\(C! =y=6I5M}tYYo#yJ S3tgJ3uu?*"!w JY3Yuu3v45J<   9J  5 J<fyyuw#ttgJ̑*/=J]x/YcJ1Y5J<imYyv%XBu/I0J>h1J$" 2K[Y25J<    bJ  5 J<fzx5J<    bJ  5 J<fzux5J<3Jv5J  5 J<ftux"/OLwxw(""($-eJX& h"h-t" h""o9< X$D=fgrX&X~&Ap X*Y B4Tj B,Tj YA# ZA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/includeport.ccport.hstdint.h B 4 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coroobject.hindex.hexception.hpickle.hspace.hport.hpalloc.hrequest.ccstddef.htypes.hunistd.hstdint.hrequest.hkey_def.htuple.htxn.hstdarg.herrcode.hsay.hbox.herrinj.hev.hcoro.hcoro.hrlist.hfiber.h WA% WA% A" XA## PXA# vXA# XA XA# YA B/tvc"!#c"!*c"!@c"!u9c"!uLcW``` X`/.c &Yc"=2YYK.gY.unJ/(!Kx"1~/t./e<|=XL-JK2Y2wttY2$ug/K[/"T*Zy$ug/NL"=/w Xɻt z/ugYKYYYgc"c"vK*/gK1vx "h Jc^JZ h. ugg/NK"wԯ6wfffffftY2u2K!/c#呻v .=/0/0/1/0/>.f~.J )B3Tj N*B# *B YA# ZAP /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/x86_64-linux-gnu/bits/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coroobject.hexception.hev.htxn.ccstddef.hstdint.hkey_def.htuple.hindex.htxn.hspace.hstdarg.herrcode.hsay.htarantool_box_cfg.hsockaddr.hin.hbox.h recovery.hfiber.hcoro.h coro.hrlist.htarantool.h WA% WA% XA## PXA# vXA# XA XA# YA *BKu{K4tt"uL2K20"="uUcJ1KY2$LY .Bg&Tj?y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libevobject.hexception.hpickle.hrequest.hindex.hspace.hport.hbase64.hbox.ccstddef.htypes.hstdint.hbox.hsockaddr.hin.hstdio.hlibio.htarantool_box_cfg.h errcode.hprscfg.h ev.h recovery.hlog_io.hsay.htbuf.hkey_def.htuple.htxn.htarantool.h WA% WA% XA## PXA# vXA# XA XA# YA .B.c ).c )ufftYw.gY.unJ/~=2/^.u$ .0..tXKY2guggT*ZxKr#2c!0ɄN0m$ )g\x>g6׻g/uug)0{*gVzx=1&[#)2)2=B%=tx=xKxKw2=>#ftXhwgZY2KY2Z^ftX)/LYY")Y)#o 3hg0 K(/)22KY A" .Bg&Tj YA# ZAmg /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/luabox.lua.cqk /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/luabox_net.lua.cnh /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/luamisc.lua.cmg /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/luasql.lua.c /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/srcobject.hexception.hindex.hbit.hpickle.htuple.hspace.hport.hbox_lua.ccscoped_guard.hstddef.htypes.hunistd.hstdint.hrequest.hev.hcoro.hcoro.hstdarg.herrcode.hsay.hrlist.hfiber.hbox.h key_def.htuple_update.hlua.h lj_obj.h lauxlib.h lj_ctype.h tbuf.h WA% WA% XA## PXA# A" B t @B4t!"!*!@!u9!uL2/tvc"!#c"!*c"!@c"!u9c"!uLcW``` X`/.c &Yc"=2 =.uguuuuY3gYZZZ0K2=,~t.K ./gK/Y!>/ggE ./K=h!.~.gY.unJ/ ..!Kx"1~/ .K2uuuK2gYK/Y2KY2K6Y2K fZ=f׃f!g=f׃f!2g/uKcttXOY.1/Fʭ˭M5K'!u=gu<Muuu/fX=gvYu K9J& L'guJ 5L=Y."w0JK/KzJf$2K=K0o Kw2222M1/s#2KYw1/Ku# .L=-uuwK2L/Y2vKu0 .KhffJtXKKtuufXtXLt0xguwu5YY6K6Y&.tu4uu#2KY2tu2=>MKuY2L8YxK)Y2KY2K)Y2K)Y2JtXKZK=.Y.!u?uuffttXgtffttXftXLuwgJ '(! .fXtXPh>/ttY3L?/Y .YY .!uggftXLuYhgJv*/I3&. fY>2u?B" 孻K6!uxYLK?.#w /KjJ!?Kv)\Ku?=fM)=N/tWtfXtX=gYJtXN/gWJ.>JKmfK8xYY=gYkJ .guY'}"x 9'}%oX X . .q./u/h .YYrJZ.z(1Y?B"#J5HuuuuuuuuuL4KuuuuuuuuuL2)KuYu0[ZY20KuXKuYO062YvJuWJ0u@Y" \[=\[\yXV\Z'Z?[g\[[g%gXg '#K~X<g[YYYןc#w. .z5JK Y".N=ZfR=ZfRK=ZfR0ZfR0ZfRYZfRZfRZfR=[Y(\'\YXYXfR׿?022X<2 .YYtXKVXP rt/kf# ./kf#o.Z+> vXA# XA XA# YA )B3Tj YA# ZA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includebox_lua_space.ccstdint.hkey_def.herrcode.hspace.hsay.h B0[66]Z*1Z0Z4000"SgJ&RJ1fYYY56/2/6YY# /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitstarantool_box_cfg.cstdint.hstddef.htypes.hstdio.hlibio.hprscfg.htarantool_box_cfg.h B/utztttY1vɭɻ׭1vK!!KKKKuKK׭KY11Y1KuY1KuY.ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu$..Kvɟu$..Kvɟu$..vɟu. ɟhɟu$..Kvɟu. ɟhɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟu%/JX<=ɟusLsLsLsLsLsLsLsLhY0ɟu. ɟɟu$..uɟu$..ɟu. ɟɟu$..uɟu$..uɟu.YJX<gɟu. ɟɟu. ɟ#ɟusLsLsLsLsLsLsLsLhZɟusLsLsLsLsLsLsLsLhZɟu$..uɟu$..uɟu. ɟɟu#(.YJX<gɟu$..uɟu$..uɟusLsLsLsLsLsLsLsLhZɟu$..ɟu. ɟɟu.YJX<gןt  . t 7 t7%Zɟ.t  . - P tC>5YYsLsLsLsLsLsLsLsLh74ɟ.t  . - P tC>5YY$..67ɟ.t  . - P tC>5YY$..67ן1  . 6 Y I&JA5Y?   1  a ^&JFZɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcWchSVZJXK<Wɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcWsLsLsLsLsLsLsLsL\Yן4"  . 6 \ L&JA5YV&  1 : ~ n&JcWa   S $  &JhZɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcW|*  S A  &J}$..~ɟ4"  . 6 \ L&JA5YV&  1 : ~ n&JcW|*  S A  &J}y|JXK<ywtX0YvYfNUTuzYw؄YhZ'Z'Z'Z'Z'Z'Z'Z'Z't0'tX.@@@@@@@@@@#P3/1gtttuttu%1gtttuttu%.tuYK1?" Xuɻ=u==tX!+ Xuɻ===tX!u====)====*)==2==*+ Xuɻ=u Xuɻ=u Xuɻ= Xuɻ= Xuɻ=u Xuɻ===tX!"==-,==#==#==-2==#"==#5JXu=u==-"==-3==tX!,==tX!2==#"==#+==-2JXu=+==#+==#"==tX!)==#<==-=JXu=2 <'==&-!"==:"==:"+>>CXu>=,===D!,BU"==h6UZXuU=6"(z.[" y.[$0Y2vKY/&K'KYBK&B@K=K>KYYKK&TKKYWKKh>UI'<>'1=YE+YtBYUr>h'3.JXK.JXK===Y=Y.JX.JX.JX.JX.JX.JXK.X.tX./.X.tX./.X.tX./!gt  . t 7 t7%Y*t  . ) L t?:NPOO,15t  - t Q tQ?YDt  - ) f tYTGJLXKGGFKOt  G  q nYYd  G 5  |&JqadfXKaaw  ae GT 0-Y//0=Z+Y>ABYUXTz UA=l>*&`#'03tuttX0w/1/=3+=!$!,g!",!53$=2g$<ugu"g$5u"u:g%g$2$3<5u"u+g$5%3u+u2,guDg$Mg%5YH,F3FCY<v=Y^^sBUwBK\+:&eI+,@#7<fwY X /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/luaev.hrlist.hmutex.htbuf.htarantool.ccscoped_guard.hstddef.htypes.hunistd.hstdint.hstdio.hlibio.hstdarg.hsigset.hselect.hsignal.hsiginfo.hsigaction.hresource.hpwd.hcoro.hcoro.herrcode.hsay.hfiber.hsockaddr.hin.h recovery.hprscfg.h tarantool_box_cfg.h exception.hobject.htarantool_ev.h palloc.hwarning.h init.h CKuJyt.5/!.".<tX=..ɃYM!gut Y6 .KvY6K.&/1=g'!Y."vY23*-@<B/Uy=@vuɤ(gKvuvuwKvKvY3%$)sL=NP*#Y<,g.2/=( J u;JtXL/;JtXL"uxwv=>7Y/%KY4g4gɟ wu^g>>|)02.x1Z>\/΃%J%3/"Z[\~]}XtXP4#4R0#4XtXL4EY/Y/dL5fuu44tXf.tXK))4">eKܜ%ZmYYy2! YY[KKg=====域]uu7#ɡ!345Y.tXKD.tXKD#/fx %<tXK>tX#@3   tXK43u4u4+4Y==)w\,YYZg\g <gg_g2)!KYK)yg/&ykt#o.& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcgopt.hopts.c  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgtbuf.hev.herrcode.hexception.hrlist.hfiber.hinit.cclj_ctype.hlj_cdata.hlj_obj.hstddef.hstdint.htypes.hstdarg.hlua.hlauxlib.hdirent.hdirent.hcoro.hcoro.hsay.hplugin.h tarantool_box_cfg.h object.htarantool.h 4CKu|u&.(..v. Y0..uL5Lu/ .(c[gZ2:2)K~J#zJBzXufzlg}JL #%% }ftK g{"+62Y3#Y3[Y.ZZZLKJ5uY/0Ku022uuuK2.KuY2/KK2/.uY3uYLK2Kfu3Y5$YuY<j.Y <Z0(L gȻ»Y'is"WXtXNAq Yuu/u#Y3XtXKYZ01/u/Y2KYgvY!gZ/ =Yk/k=C)$fY$fw" tzYg XzXA^XtXKYZ0/>LY .$/Yv1/u~#Y..Lh/Y .uXtXKKvZ/vZ .JtXKYɟ!Y2Y2=uLY6KYY .KYYY .gYYY5KLu0u0v+m*J6KtX=+x*J .ɻLv0tXKw/7Y t"k< .0ru Y{YYK/ .=4Y/YK5YXZ9dJ .2'-3Gz #J S==Z%YvX 20Ku8[Lu0[A1La@ x\"010ugX> 2uKu/&u/x .2u .&Y$K]Y,,,tXKVXPKx ."hYg[ Xx0ƻYVWxY/ftY3=/YgtfXM516JKu!v . =YtXKZ/y.=.KJtXLD>=="tXKD=C/0x.3A J=gKx /x2/  C& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgev.hfiber.hsay.ccstddef.htypes.htypes.htime.hsigset.hselect.hstdarg.hstdint.hlibio.hcoro.hcoro.herrcode.hrlist.htarantool_box_cfg.h stdio.htarantool.hsay.h 4CKu| YA.u0vvvvvvZ2?ןP>#4Y9g9g "&咮ug0>9$-=[ZX1;elfgHJEE׻^+)0'-5ò /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/includepickle.hmhash.hassoc.hstdint.herrcode.hsay.h D4t!"!*!@!u9!uL.g=.M=2Z5y XtM=YJv;g/2T>=t=6I5Mt/KYK/2/g'DK2gD23[6(0G*x JJuyYL0$f<uܯugD׻u'v0Y3/S}.g=.M%=2Z5y XtM%=YJv;g/2T>=t=6I5Mt/KYK/2/g'DK2gD23[6(0G*x JJuyYL0$f<uܯugD׻u'v0Y3/S|.Y ..g=.MY=2*tXKZ5y XtMY=Y/Jv;gY2*tXKT>=t=6I5Mt/KYK/2/g'DK2gD23[6(0G*x JJuyYL0$f<uܯugD׻u'v0Y3/Sy /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/netinetev.hreplication.ccstddef.htypes.hunistd.hstdint.hsigset.hselect.hstdarg.hsignal.hsiginfo.hsigaction.hcoro.hcoro.herrcode.hrlist.hfiber.hstdio.hlibio.htarantool_box_cfg.h uio.hsay.hsocket_type.hsockaddr.hsocket.hin.h recovery.hlog_io.hsio.hevio.htarantool.h $DJzt3wY3 $4g4hmf.Yb  tl'y( .4>u0G4ڃvfXK$4 <$% .ZXtXM4#4 ZXtXN4)YBXif3wYg!g)0v4.YAQ2Zu3J0r3g4wgYɼ/Yyx=A>$98)/Yy =\"6guʦff)g4'=uu/u>v xt )z  uu-1Z[XtXN 4ZXtXN4uu400I5g0()9- /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcsrc/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyobject.hexception.hspace.hpickle.htuple.hev.htbuf.hcoio.hiobuf.hcoio_buf.hmemcached.ccmemcached-grammar.rlmemcached-grammar.ccscoped_guard.hstdarg.hstddef.htypes.hunistd.hstdint.hbox.h port.hrequest.hkey_def.hindex.herrcode.hsay.hcoro.h coro.hrlist.hfiber.hprscfg.h tarantool_box_cfg.h salloc.huio.hsockaddr.hin.h sio.hevio.htarantool_ev.h tarantool.h WA% WA%  C& D 8DgY.t!"!*!@!u9!uL2/tvc"!#c"!*c"!@c"!u9c"!uLcW``` X`/gYZZZ0K..K ./gK/Y!>/ggE ./K=h!..Ku{&/1=g'!Y .u% w.3'.&! ~f=/+gK  <T/$K2*20K'Y)#c!Y#%3uxYuv0ggYwZXuuYuu0&22CtY2<=rJY.Y2Z4"Y\YY׾g!0 XKugl01gi.L1LtXK!gZ!h:YYvuYG;JY2$fuJ./ }.KK!" P vffljf fffffffffjf ffffffffljf fffffffffffjf f<<%w@U=$wDwx  .XtXK&Yv" tCw - " [t, 8 Y U< -  Rt  " wt,  YfM x<   ut q " t) "XdX/#. /$K)~/utXKVV"+XdX/#. /$K)~/utXKVV"+  X v HdX/#. /$K)~/utXKVV"+  X u "XdX/#. /$K)~/uqX"fug!U"+XdX/#. /$K)~/uqX"fug!U"+  X t HdX/#. /$K)~/uqX"fug!U"+  X s !fdX/#. /$K)~/u.tXKSVV"+ X< r dX/#. /$K)~/u.tXKSVV"+ X r HdX/#. /$K)~/u.tXKSVV"+ X q  fSK)~/u.tXK+WXYv(g!""!( S X< q SK)~/u.tXK+WXYv(g!""!( S X q HSK)~/u.tXK+WXYv(g!""!( S X<(<< o SK)/u.tXK vX  X o Yf'MSK)/u.tXK vX  X o HSK)/u.tXK vX  X<$<< m SK)Y X n fSK)Y X m HSK)Y X< l SK) X k SK)F  j "XdX/#. /$K)~/u.tXKVV"+XdX/#. /$K)~/u.tXKVV"+ X i HdX/#. /$K)~/u.tXKVV"+ X h "XdX/#. /$K)~/V"+XdX/#. /$K)~/V"+ X g HdX/#. /$K)~/V"+ . g SK)B"u X Y  . v K" twX Y < w  tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wuX> w@U=$w@U=$w@U=$w@U=$w v K.K  < v   tx u .XtXK&Yv"  tCw u "  t, u Y  < u   t u "  t, u YfM  < u   t u "  t* u Y  . t K"  tmX u Y  < u   tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wsX w@U=$w@U=$wDwx t .XtXK&Yv"  tCw s "  t, s Y  < s   t s "  t, s YfM  < s   t s "  t, s Y  < s   t s "  t. r K  . s g  << r   tmX s g  < s   t&yXU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV r K  < r   tqX w@U=$wzXS>%w@U=$w r u,u  < r   tx q .XtXK&Yv" tCw q " t. q K . q g << p  tmX q g < q  t&yXU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV q K < q  t~X> w@U=$w@U=$w@U=$wDwx p .XtXK&Yv" t%.X o YfM . o K . p< <(<< o  tkX<z w6 o " t+ o YfM < o  t&yXUX='<=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV o K < o  tmX w@U=$w@U=$w@U=$w@U=$w#w@U=$w@U=$w@U=$wX m K . n g .<$<< m  toX<z w6 m " t+ n g < m  t&yXYX=#<=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wV m K < m  tlX w@U=$w@U=$wT m K.K < m  tx l .XtXK&Yv" tU<s wxX<y wzXX= wkX w@U=$w@U=$w@U=$wkX w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wjX w@U=$w@U=$w@U=$wxV$wjX w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$wDwx j .XtXK&Yv" tCw j " t, j Y < j  t j " t, j YfM < j  t i " t* j Y . i K" tmX j Y < i  tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$whX wzXS>%w@U=$wDwx h .XtXK&Yv" tCw h " t, h Y < h  t h " t, h YfM < h  t h " t* h Y . g K" tmX h Y < g  tU=$w@U=$w@U=$w@U=$w@U=$w@U=$w@U=$w~X> w@U=$w@U=$w@U=$wxV$wfX f f f  f  f  f   g   f   f   f   g   f  o o o p p p p p p p p p  g   f  p  f   f   f   f   f   g   f  q q q q q r r r r r r  f  r  f   f   f   f   f   f   f   f   f  s s s s s s t  f  t t t t  f   f  t  f   f   f  u u u u u u u  f  u u u u u  f   f  v  f   f  v v v v w w w  f  w w w w w w w w w  f  w  f   f  x x x x x x x  f  x x y  f   e  y y y y y y y y y y z z z z z z z z z z z z z z z z z  e  {  e   e   e   e   e   f   e  | | | | | | | | | | |  e  |  e   e   e   e   e   e   e  } } } } ~ ~ ~ ~ ~ ~ ~ ~ d  GW<<<<<<<<<<<<<<+ )!@Yvwg~@AZ@AZ@AZ+@A[@A[@A[d@AZ@AZ@AZ'A Xu'A Xu'A X 'A_y'A_y'A_'A~_@AZ@AZ@AZl@AZ@AZ@AZ *!u(s Yg)ifgLftXYYZftXuqXs [  .u/t.!L0u'/.z%ʸYe[2סyw[(wY2Kg3iLz'r 2׭=Lحo 4v0=G xs/ן!q*xɄ)$u110usXJerrcode.hsay.htarantool_box_cfg.htbuf.hassoc.hpalloc.htarantool.h WA% WA% D8555/!...<tX= ./ ./L. Y%.3g=.M=2Z5y XtM=YJv;g/2T>=t]=K/ 1G5&uu)\(C! =y=6I5Mz=K.u~.22'&h-2*hJ/ /g$%.0Y4=`Y2K=6^J/ ggK .&ɼ .=6<Y2YY6!Y62'ɻYgY2K20'2Yu2!׾K"K1K6KKuK=YK'2 YlX\20z%<<e<<tg.''vYL"%孭/K ."z >%2))3h%;2Z)-)-2Kggg=uɼNg2KhY XA## PXA# (E/ ^E) vXA# XA E?# E? 0 /usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgy.tab.cprscfg.yprscfg_scan.cprscfg.lstddef.htypes.hstdio.hlibio.hprscfg.hprscfg.cy.tab.h E情*u=Y'*uqf@ u#.tɣftX>hhu0(qJ4gʭu/hxYwX tY.2u",.,.׳vuuuuz6[KIZ_ !ihXBgf!j=3gPvg0NX9 !(  #uf[X$W![X[5t/X5t/[X$W![X8X8[<XfX<XZX<XWX!X[<Xu_<X+<Xa,uu<XZ4\<X+<Xa892("[<<YW[<<YW[X<<W!X<<W!\!0[<X.1.1. . w4"f"$VL}X f?Q#//Y׭# kig\z.vl. x!hKfZ!lrX 4g{X u{.< u{. << =yjX=1ɽ/r+Y1Yu=ɻ=xuiK1hu=w1/廻~z1vYuvgwo1Y"u=.󻻻ZZu=.󻻻,0H;K1/h000#n1h=ugv1h=ugv.j沭׻u@+؅>!0g $"LhjyX_Zu/Y./Y./YZu/YY׮Z]׮Z$1/Y1/YZ1/Y+ZZZuצ)ZZ#YZZ!ZY\X $% ; "iK]\# "g X-\*Z2vX<<< Y /ɰ;4"J["4\XM?g@&v`.%w%5ff 5 f <  X Vw$uu#v3P#-1)=˄v.X=u0Y #rJ/|؃Y"0g %#JXY[+DžM/#==.?'׻u@X/{X!&$n 1$9%! .1Ku&hK5XgʭhxJ 6=0Xg5󃯲Xgo  .󃯽!&$=˻l 5#X>׻w 4vՅ"׻[v"'1 .?uLMKu0K . .5guJ%uK1\&81&5u4v4v444u5555 .11u131 .uwx .y1Y2/X#gg/Y.1D/1o.Y1Y0Z1Y0Z1Y22 .1=/Y,v.Yw!Y,u&Yw>uvgKF  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includewarning.cstdarg.hstdio.hprscfg.hstdint.htbuf.h tVE1'-  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includetbuf.htbuf.cstdarg.hstddef.hstdint.h @WE7&/1=g'!Yr.2KK2/IMػɻ2K2g=!K2g!=hY41!22>ʻ+u+22'-濻(hY+JK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/valgrind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bitsvalgrind.hobject.hpalloc.ccexception.hstddef.hstdint.htypes.hunistd.hstdarg.hmemcheck.htbuf.herrcode.hsay.h T^E"2'-u .2'-u].KY3uvKɻ8K2`YrJgvvY2t.XM[t.XL22uخ0/tXtXMtu=[u+utK3Y30gx$ggx .httXght_K2gKK2?3g=$ؼ|[gc0!qt22v0=@׻2/w$/y6<.=2st.XL22SYYJ,Z?/sYuIx/ Z.j#22 WA% WA% XA## PXA# vXA# XA >YA6Tj XA# YAaF /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/tarantool/usr/include/c++/4.7/bits/usr/include/x86_64-linux-gnu/c++/4.7/./bits/usr/include/c++/4.7/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/corofiber.hutil.ccstddef.htypes.hunistd.hstdint.hutil.hstdarg.hlibio.htime.hresource.hexception_ptr.hc++config.hcxxabi.h bfd.hstat.hev.h coro.h coro.herrcode.hsay.hrlist.hstdio.h  qE YF./*VJtXM=23/_-#*uu+t4wt .jwwX 2g?g.r>= .1'-Y/tXLZ@Z#ןY1#10#%`!#.K儃uYD=uD33tftX f'es J+eY&EC-lJJ<#bJ??A@@errcode.hstdio.hlibio.hsay.h WA% WA% XA## PXA# xE;# E;  E'1*--"='t  ,uuhLuuhL5v/uuuuv[3!n!0 /vg[3=Kn!0n!0=fn!0~J1ɟ~J1Lgn"1Kgn!0Yn!0Zun!0Y 䭃Zut  2YWWu!0K/uWt"1'WWu!0'WWu!0u4w4vyM ܖE,# E, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/usr/include/netinetobject.hevio.hevio.ccexception.hsio.htypes.hunistd.hev.hsockaddr.hsocket.hstdint.hin.hnetdb.herrcode.hsocket_type.hsay.h WA% WA% @E.ugɟvgɟvY3ح6Kgv4v%v#/uYZnrwJ*ɟU /K2K .xuiyt $gcwX  tiɝJtXLIQy*^ K6"Y"KK$u#=7u' . _(" XA## PXA# xE;# E; ܖE,# E,PJ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hobject.hsio.hevio.hcoio.hexception.hcoio.ccscoped_guard.hstddef.htypes.htypes.hunistd.huio.hsockaddr.hsocket.hstdint.hin.hnetdb.hstdarg.herrcode.hcoro.h coro.hrlist.hfiber.hiobuf.htarantool_ev.h say.h @EKu|!/VttXNK6gu12KK2.tuB.u%X.3//2/\2/NK5% .Yguv&?3"MvK/'g m?3uJgYYz K gY?3"iNu.6uuuYgZ^#X/ t׭r#2 &r#2x.5v_ZgZ`!X-|iu3*/[ tx.uk1[4utgX JA y.%6+uYgvgX-ty.%6+uYgvfX-y绖=& XoX)u Ȥ${./kt# ./kt# ./kt# ./kt# ./kt#o.Z+Z+Z+Z+Z WA% WA% XA## PXA# xE;# E; ܖE,# E, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libeio/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includecoeio.ccstddef.htypes.hunistd.hstdint.hstdarg.hsigset.hev.hsignal.heio.hcoro.hcoro.hrlist.hsockaddr.hsocket.hnetdb.herrcode.hfiber.hsay.h ԹE32K .K--.6»׭Y.9$!׭-%tXL6$fu$fu$fu$fv fkgY3vYuguv/uS /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyiobuf.hobject.hiobuf.ccexception.htypes.htypes.hstddef.huio.hstdint.hev.herrcode.hsay.hsio.htarantool_ev.hpalloc.h ,E3'/.3#.,36u$/I[׼k  ./|#4=tK/I05󭻻g3X$3="`&&gg tZ="V,&gg"3="="ugg"!kv&h(X;% .K5ʻuggKyɻ"ghyC Kx WA% WA% XA## PXA# vXA# XA >YA6Tj XA# YA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/valgrind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includevalgrind.hobject.hsalloc.ccexception.hstddef.hstdint.hsalloc.hstdarg.hstdio.hmemcheck.herrcode.hsay.h E"2'-u .2'-u].K2˄=Yw JtX2Y24wɻYxvghK2Kvuv'Y2K=2"X"X2&2MK2JY2ɻ!/i/iY3ftY3ftX~$zztXKX0>hg.tXK;f>X/X/ja 3f=)tt K2iɼ=fK .=uٰY'YxX ggUq JX WA% WA% XA## PXA# vXA# XA >YA6Tj XA# YA) /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/valgrind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/usr/include/x86_64-linux-gnu/bitsobject.hvalgrind.hexception.hcoro.ccstddef.hcoro.hcoro.hstdarg.hstdint.herrcode.hconfname.hsay.h WA% WA% E"2'-u .2'-u].g[3!w%ry/6 XA## PXA# vXA# XA >YA6Tj XA# YA}o /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libevstat.ccstddef.hstdint.hstat.hev.herrcode.hsay.hmhash.h E3*-W/fcJAx0[15Ju tunistd.hstdint.htypes.hdirent.hcoro.hcoro.herrcode.hsay.hrlist.hfiber.hcrc32.heio.h dirent.h \EKu|=Y.)&4"&&./u.tY2/=*>ZuJJtX=34[%%41Y)v׃[f<l -?uהhuh2huizX 20ftXLI .()'׃)w022g .7u,[/g)[y. uM0u))[.@q -,+1zɼLtJR'CvYjKtJLv;wYzɯ/tXK3/g4={zg2:Y2/g:?vY-ftY .sXtXLZ[u0!"0tu"v3u!Z/u!Zg!1K!1h@uu2/tK6@tk['h0/%BY N /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coroev.hrecovery.hlog_io.hfio.hrecovery.ccstdint.htypes.htypes.hstddef.hsigset.hselect.htime.hpthreadtypes.huio.hsockaddr.hin.hstat.hsignal.hconfname.hfiber.hstdio.hlibio.hstdarg.hcoro.h coro.herrcode.hsay.hrlist.hpthread.herrinj.hexception.hobject.hpalloc.h ,FKu{=.K..f tY.!4K2K<ן!S2;3/hY .S*[y!;u.Lg3uu<tX=yK2(2ɼɼ==n 2! .)=u)Z)Z42/#)%#u4[))! .w2Y=)4#)q.'tXT& .|?_FZ8uLuvL'l0K3uZ8g8["80gDf!)wg=6'/3y6@%g2ɼg38YLBL83Z83B׻!."k22廻g9uh2廻g3gD2vCg2+.K/ .5f.It XL2uvJf5f71Jf5f' J5f5f5fJ5f5fg=t5f4!5f5f/.!j5fv3ɾP5f5fP5f5f> tZ 9Z$5fzx$.g0 Kt2ttXPL3gt>fK/"t.tXPK3u#u/tXNK4歄Z#"נv#A$t-XX93uuvJf5/Jf5fJf5f+1+m  XJf5f ."0%/=P5f&g5fP5fZu6=9>z-:"A?!YLZYY%YKw y$)Yu4K>滼) x0KKx1/;#J /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includesrc/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/luatbuf.hcoio.hiobuf.hcoio_buf.hadmin.rladmin.ccscoped_guard.hstddef.htypes.hstdarg.hstdio.hunistd.htypes.hstdint.hev.hcoro.hcoro.herrcode.hrlist.hfiber.hsalloc.huio.hsockaddr.hin.h recovery.hsio.hevio.hlua.h tarantool_ev.h say.hstat.htarantool.hinit.h D;F7&/1=g'!Y .u%!.=$[.'Y.=/+gK,. OY2ZM\pY2Y2Y2$2Y1XXu2g<Y2Y2=/"DYy~< <<<,<<<;(<<<<$<<<<<<coro.h coro.herrcode.hsay.hrlist.hsio.htarantool_ev.h vFKu|Kz. Y/e.=u .=$T.3' s.=/+gK d.KuuiuhgKy0wu?$")0TN/0vKv焟YuL0Lɟ;ZiXXYg0/LwdX,/>#3/23%O$f@==׭k%)= WA% WA% XA## PXA# vXA# XA XA# YA YA# ZA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/netinetobject.herrcode.hexception.hiobuf.hiproto_port.hrlist.hfiber.hsio.hevio.hiproto.ccscoped_guard.hstddef.hstdint.hstdarg.htypes.hstdio.hbox.hport.htuple.hsigset.hkey_def.hsay.huio.hev.hsignal.hcoro.h coro.hsockaddr.hin.h palloc.h WA% WA% lFu&.3'/.3#%.&!3fJJtY~.K$.KP.5.K+.<tX=..!/VttXNK6gu n.. 1/6!K &g3!u&!&Y3Y"Y41=xt .3/(76$fw.0#k;0I=XtY2.>u$LUgg7Ky<2 &$2"%cJ0Xɓ"gk"&K30v$"#p,D'3fu['gZg[uv]*g\yɥ;XtXLY3>"fv*2vg.r* Xyɾ/ZzJz_*gyX  tuuKYuu'wiy`*gcxX  *=v./A')') ɭX<ne .w$y tgXx" .02JM$ "j'=j'= z.kf#o.&  C& D XA## PXA# vXA# XA XA# YA YA# ZA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/usr/include/x86_64-linux-gnu/bitsiobuf.hiproto_port.ccstddef.hstdint.hport.htuple.herrcode.huio.hiproto_port.hsay.hkey_def.h F7.(~.K2"3x="8g(+ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coroobject.hexception.hfiber.hmhash.hsession.ccstdint.hsession.hstddef.hev.hcoro.hcoro.hstdarg.herrcode.hsay.hrlist.hassoc.h WA% WA% XA## PXA# Fs.3g=.M=2Z5y XtM=YJv;g/2T>=t]=K/ 1G5&uu)\(C! =y=6I5Mz=K}.˒g/?5'um u͔Ys^evxf xYɟXY2K32K vXA# XAX3 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includeobject.herrcode.hexception.ccexception.hstdarg.hstdint.hsay.h A! WA% WA% 02@2'-2=2I1&-0-602S>g*?g* XA## PXA# vXA# XA XA# YA F-Tj xE;# E; N*B# *B YA# ZA /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.cb /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includeerrinj.ccstdint.htbuf.herrcode.herrinj.h xF/%JY .ff/ .ffg .uuY .Z/tX~Jc /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includefio.hfio.ctypes.htypes.hstddef.huio.hstdint.hsay.h LFgJtX>~.(uY2YYZ.tYDwp %YYZ.tYDwp %Ktfuu0DKKvuUfIK!=gL=Iuu*K2Y2=.$$K2!uɼL/v/T'($u  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includecrc32.ctypes.hcrc32.h F'LtXx% /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope.cstddef.htypes.hstdio.h FtY..~.tY6!>s-w"IW;hx0uvuK2/ʻ˻u t2/$2-iK21z=Y/K4 Kg $ "J%<# tY/L4MKgc  t=Y>0[h h<J K .(///K.%L#u# .&ugs"3u"&uu.$s'/s6XLu g/gi!.>Y /:@2L2==Ov=#3N,zLx;.J.JLs,N)WW:MqX,u"t/2uI/s>tYx/& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includeinfo.ccstdint.hlua.htypes.hlauxlib.htypes.hsockaddr.hin.hev.hrecovery.hsay.htarantool.h F.&Y2&Y2Y2gY2NY2YY.wYY3gKYY[6YJY3ZZZYYYYD /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/srcstat.ccstdint.hlua.hlauxlib.h F*/!2g/ZLY6g1vYLY2Y2YY .ZZYYg /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includeslab.ccstddef.hlua.hlauxlib.hstdint.hsalloc.h F*uZY2YYY2Y/2Y/2YYK// .wYY3ZZYYYYY8 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partylua_ipc.ccstddef.hlua.hlauxlib.hev.htarantool_ev.h xF/KJtXKZKuZuZKZ=Y22JtXKuKY2JtXKYKY2JtXKYKY2"ZYɭYLZLKv!!)u!Y2fftXKZgYɭvLu!!Y2YZL/>Y2YYKY2YYKY2 `ZYY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/netinet/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hevio.hrlist.hiobuf.hcoio_buf.hmutex.hlua_socket.ccstdarg.hstddef.hlua.htypes.hstdio.hlauxlib.huio.hsocket.hsockaddr.hstdint.hin.hnetdb.herrcode.hsocket.h sio.hcoro.h coro.hfiber.hsocket_type.hexception.hobject.hsay.htarantool_ev.h FKu|2KK2.tu..5/!.".<tX=.3'h.05gKv.2/O .ɃYM!gut Y!.KK.KYY2YYY2KgYK .2tXL,$2Y2%Y3/ftXY2/3g/3/2/&Y2KY . . .Kg/Y .K=Y .K/ .KXKY=׾*u*gܼxɻ tKJKYg)[ Yto8ytK=Y /ذg% Y[uko8y t=uY#T&YzJt\y S$0#uZJY2Y=3=u7\wVY]uYYuYYu[Yu0Ya.! =./u"u<=g))g""6,%=:u)Yi`"X% grp9x  KY=׼*ugx* t tKY./u'=w/ :gػo /utK'&)&0u(׻g(?u uYsu# /u<='1MGu$:hgYY=  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/src/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/usr/include/x86_64-linux-gnu/bits/usr/include/netinet/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/luaobject.hexception.hsession.hsession.ccstddef.hstdint.hstdarg.hlua.hlauxlib.hev.hcoro.hcoro.herrcode.hsay.hrlist.hfiber.hsockaddr.hin.h init.h WA% WA% XA## PXA#  Gc.=Y5YZ=Y5YZX.>./gYny3UgYg?B"ZJtXM\uY22. vXA# XAb /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/luacjson.cc G(YYjd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/luauuid.lua.cR /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/compat/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/include/x86_64-linux-gnu/syscpuid.hcpu_feature.ctypes.h TG( #u= =vY~t2qzX =3!2q3zX gj=2$vB /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hrlist.hipc.ccstddef.hstdint.hcoro.hcoro.hstdarg.herrcode.hfiber.htarantool_ev.hsay.h GKu{555/!...<tX=.2/2gvguuK22200O2K"[gh!iYYd<(gK23KK"[g"h"!hY孭l=LY2#22K2K/vI\uY"YgYt #=Xq /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libev/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyev.hev.cev_epoll.cev_poll.cev_select.cstddef.htypes.htime.htime.htypes.hsigset.hselect.hstat.hsignal.hsiginfo.hsigaction.hlibio.hstatfs.hstdint.hinotify.hinotify.hutsname.hepoll.hepoll.hpoll.hev_vars.htarantool_ev.cstdio.h HGKY.נ3+>9tt@h w/vx&+/$q@.2u  Z2uLY42ty[K.1$+11 r.=  =؟K=2Y .2=P.U('24'262#$J4wg{4vK2f4wswMiJ36130"33J3*3uuJ4."/fgfg/...%uwX?(")."h"5gZ"3!fF0=3;J.u!t"w/!fZ̻>i> jZ<( 4硡?>ؠ>$  Pu22 JKq 3 x X?..tX>Zfحx t .sZ"x  o. Y=LtX-?ftX%M&N&w4'a < '2/J2J[tY X0u[L tX-ftXvu2QJ3>=*g"x>BJ 2vv*Y2K=52K/Y~./2X,1g=dJtX#1f. 2J3Jػ\UZLtYT0HuX 2uKY2K==.!#&v""""/g;282D:? xJ=0J"ֻ^S!XtgvgtX>ww._.9xu Y2K===@.KY2KY3JtZxKxKKL=2 J=2wL=2Kg3Kg2Kg2222Ku224ؓ壢夻LKKtXitXi --3 0Y̭̟˟ [[[SS6)5555555556R[\YZu.tXJ12fFtXJ?zJ20#4Jv(0uJiiz# .jjjj f .7xg2Ku4Y2Lv=2Z0Cb 52(x. 43g.˽4.KN01*1u3\32f˽`"44w3J  g4*J4iN+[ JZJKKt֤L0\e 2 /vz=0j=[\w>..tXJ.tX hؠuu2&Zv!YZ]]/..tXJ g2u2K2K2u2KY2Y#Z520Z1x 3/2)Y22廑Y2Y4ifd#qJ 2itXJ&wJ 2i.g47s 2lh=l 272.XYi4.g47m 2lh=n 2 .!tXJ ʠC\Y>j=/> Z/u/' 2!/&uZgjX.f 63( (23&(.!-RLtW?vtu'/Y/Y2iבy<(2!h-Jf^h"׽rJ2wؒ/N#2gZY2KZCrt 2YɮY[Z؟YrXJq&  ."2uu=====A̻if"e#Z[j. 24Yr 4i-ns. xls-u 4k#1z$ 24Du 4k#1z$ 24Du .k#1z$ 24Du 4k#1"wt 2j[Dt 4i\#1v$ 24Du 2.廼!2#220![+h7 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/libeio/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sysxthread.heio.cstddef.htypes.hstdio.htypes.hsigset.hselect.htime.htime.hpthreadtypes.hstat.hutime.hunistd.hsignal.heio.hconfname.hpthread.hstatvfs.hdirent.hdirent.h G@?/=.%u-.0,<2=>2M=2N=2N=2N=.8Ji2׮v32נh"v(hwf Y2...柡wY41t2&zt@#x02g2.T ZvuJZ qX[1y. 22>.JM堠JZ22v2v2v2u2/s 40>?"v.J 2?Y2  2.X>?Zgi=2v222KY2KY2KY2KY2!222221KY .xM .Y .#f!Z=3X2\6gZYz tY5Yuh 2uuuv w \+vt1vt1j D(K5Mu3KM6 .0/ ./5׃c^Y41咟-0'Y5HIA$X3=wuKuvY'/[/WLvY[x/V"\Ku#vu'h<m ɼ=2<Z\ .( ;JY")HJzfJ J fv=&NKuHZLgX< 0fXXY&d<0XiyfX 2ukjx. 3uuɃuu 1JXhukK0f.X/.~ ١tXJeX׻kXg0uHxX /\5Z0=(oz#"=.hu1 ؼYffftt XgM0~<< <<$< < '.?gtXgMK22twʼ6/gZ==2/gZ=>. J1[@د[eX 栯0JrX 4/2.yL[h[XB*XYLPWYWZ28J/J/<1-8**/JX%JX+-7J,J-%)!3!3IL.3X;P%ZJ)J)4*)*Y82+8 t!3+1[1=1gI.: u3gs.1gtW1/tK1utW1/tK1YtU1tm1YtU1YtU1tx1tm1tc1YtU1t{1YtU1tm1to1ty1ty1YtU1YtU1tm1ta1t`1tk1tc1t{1s.%1s.(1s.1s.&1s.1s.2r.1g1g1g1g1g1g1g1s.1s.'2r0=gʻw1&1&1&1gtZ3vtK ./2ػ2>=ZZ5YKs /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/corocoro.ccoro.h G!!~ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includegopt.cstddef.htypes.hlibio.hstdio.h HG/Y Z!Yx/(JXK+XvX' i僮! YYZY/YV$孟Kٻ[YhKX!/KX!$!Y2@K堼XXu-X\YY%׭/-X!MY-Y XY^ wX!-Z..#u/-XK0僄/uTXK0/uTXY0gg/7XK00 uu0YKK"gI6Y/W&wX ؟ZX(W /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/luajit/srcstrbuf.hlua_cjson.cstddef.hlua.hlauxlib.h G .g11/1/6$1$1/(/1/(/1Y1uu*.KuZK4/ 3K=&gv3uwKfY#fKZ)Y5L'''Y3L'3L'2L'2M'#Y.L'Y1L'Y1Ku!Y1MYYYlJן׭;JjJ4׻> .4uLJ5AuvZ4/K3pZZw=2 fM׼' .ug0v=gxJ 2uX"YY\XYY23xjuYg0w=gugu0gi3i&uZZK[WYZKgg-g0Y0YY31Xv؃1׽h׼6fgKfgY1%qJme0e0923g/Y/xYY/wY .wgg0gsLgux=gwvY2$1$BYhu\=g?vZgu\@YoXp #t>&.[ggvuxuxY1(x,[5=,&$u[= Xg/Yf uZ/Yɟ=Yɟ=Yɟ=/!Q/2M4  .w@s$11/O=sgI&1vZ1//i0ڃ/2vZ1ug>0ڃr.J3=Z0K0/0/201vJKu$]/i0 .1Y/IJXK5wgvgyY2!=2wYZYJ1 Y1Y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includestrbuf.hstrbuf.cstddef.htypes.hlibio.hstdarg.hstdio.h Hg1*.Y.2'->$gg1uK1fg1I=I=I&3宭1uʭK1g瓻Z/;22=4>I&#1gu%xJJ <31'h-?&32'-LBؑq#tS'& /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includefpconv.cstddef.htypes.hlibio.hstdio.h  H4.[= .fgufwfgvY3/WM3hh=u\Ku%gװff(uug=2B)* XL=1K /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includecrc32.cstddef.hstdint.h Mu/+Y./+=.K"eJ!KKO;ZZ:]kJ"eJ=4#gZ/=4!gZ> /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includeproctitle.cstdarg.hstddef.hunistd.h M܉f'CJu$=J,u7J:J +5[//uJJ22'-&s LK16 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includeqsort_arg.cstddef.hstdint.h M/g:0t7.LI82 / XKtF.4&Zh0)"#ح$gEEK)t,,0vt&y /0vt,y /t,i X%*t*7t'":"ugHX;  h /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyPMurHash.c N/-?YF8X2M-?!4ؑg"i=B!g!4YɃ 'Kwf /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partybase64.c xN02ugu4."W ZuZu׭Zuz$/[3/Y׻0Y׻0"//u3Z.. uKfu24+Zg؟Zg؟Zg0gg[5Zo ../sysdeps/generic../nptl/sysdeps/unix/sysv/linuxpthread_atfork.c_itoa.hfork.h `N6tX /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/includeexpr.cexpr.hstddef.h |N)Y2)+XY2B:X2נWKfrN/Iuv?Y2v"Y3=נWKfrN/I(I,ut nt Y3K"vu"Y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitsetiterator.cstddef.hstdint.hbit.hbitset.hexpr.hiterator.hpage.h N7Y .)224X Y3נWKfrN/I$uw?Y3=נWKfrN/I((I,I,rt kt et Y3uttut=""ɡgɠ->#zX pXؼY2t1 <""sXt X Kxtt/u/vZ3tt% '\'p X 2vN//yX0 r, 2t)Xͻ2t)30}X0'3t2t=u?/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitindex.hindex.cstddef.hstdint.hbit.hbitset.hexpr.hiterator.h $N!~.tYKvY2t'zX>&Y2נWKfrN/I'I,毽*z(X y 'zXa <<'Yytt/gg/*z< f/*flj /Y)z'f 2t˟&Xw 2t2vvY3=󠟻Y,pXwY3=w/ql3=/uon2=w/ql3=ttɟ+)XX v/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebitset.hbitset.cstddef.hstdint.hpage.h 1N.Y2>YY2Y2.Kuv.2x.Kv=XKu1.(=hw=>x.Ku.(==>0[{Y/!cz -u /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/syspage.hpage.cstddef.hstdint.hbitset.htypes.htypes.h L7N]4K2eLK2132Y2Y2uJ2uJ2uJ./u/vZ0sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt(" /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebit.hbit.cstddef.hstdint.h VNɻ% <ɻ(.K <ɻ(0K9P.iJ _vptr.Objectsize_btuple_ref_ZN9ExceptionD2Ev_ZNK9Exception3logEverrflagssizetype_ZN11LoggedErrorD0Evprint_fieldtuple_range_sizeER_FIBER_STACK__vtbl_ptr_typeload_varint32ER_NONMASTERER_NO_SUCH_FIELDER_OKformats_capacitytuple_field_oldindex_typeEVBREAK_ALL_Z11tuple_allocP12tuple_formatmS_DEBUGerrstr_ZNK9Exception6errmsgEvfield_sizeEVBREAK_CANCELtuple_iterator_Z10tuple_initvuint8_toperator=~LoggedError_ZN6ObjectD2Evunsigned char_Z13tuple_comparePK5tupleS1_PK7key_defS_WARNtuple_compare_with_keytuple_compare_fieldold_tuple__FUNCTION__index_type_MAXBITSETvarint32_sizeofmax_fieldnoER_UNSUPPORTEDS_CRITm_lineHASHER_PROC_RETthis/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/boxtuple_compare_dupArgsTREEsay_levelev_rt_nowev_tstamptuple_init_ZN9ExceptionD0Evm_file_Z17field_type_createP10field_typejP7key_defjfield_afield_btuple_updateER_TUPLE_IS_RO~IllegalParamsfield_type_MAX~ClientError_Z10tuple_freev~ObjectS_INFOER_ARG_TYPEtnt_error_codes_enum_MAXER_KEY_PART_COUNTtuple_format_alloc_and_registerformat_btnt_error_codes_enum_ZN11LoggedErrorD2Evtuple_formats_Z10tuple_nextP14tuple_iteratorPjER_RESERVED11ER_RESERVED12ER_RESERVED13ER_RESERVED14ER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19ER_SPACE_EXISTSER_FIELD_TYPE_ZN13IllegalParamsD0Evfield_type_maxlen_sayER_RESERVED20ER_RESERVED21ER_RESERVED22ER_RESERVED23ER_TUPLE_NOT_FOUNDtuple_freetuple_compareER_NO_SUCH_SPACE_Z10tuple_freeP5tuplelong long intER_KEY_FIELD_TYPE_Z17tuple_compare_dupPK5tupleS1_PK7key_defalloc_ctxER_SPACE_DISABLEDER_INJECTIONtuple_formatER_UNUSED24ER_UNUSED25ER_UNUSED27ER_UNUSED28ER_UNUSED29_Z9tuple_refP5tupleituple_atuple_btuple_format_bererrcode_recordtnt_error_codesnew_capacityGNU C++ 4.7.3ER_UNUSED30ER_UNUSED31ER_UNUSED32ER_UNUSED33ER_UNUSED34ER_UNUSED35ER_UNUSED36ER_UNUSED37tuple_format_id_ZN11ClientErrorD0Ev_Z22tuple_compare_with_keyPK5tuplePKcjPK7key_deffield_typeER_PROC_LUAER_UNUSED8key_partER_UNUSED46S_ERRORerrdescER_UNKNOWN_UPDATE_OP_Z9tuple_newP12tuple_formatjPPKcS2_is_uniquenew_field_count_ZN11LoggedErrorC2IImPKcS2_EEES2_jjDpT_ER_UNUSEDfield_map_sizelong doubleTNT_ERRMSG_MAXER_SPLICE_Z11tuple_printP4tbufPK5tupleER_TUPLE_IS_TOO_LONG~ExceptionER_TUPLE_FOUNDtuple_endexpr_endtuple_seeklong long unsigned intuint16_tER_NO_SUCH_INDEXrefs_Z16tuple_format_newP7key_defjNUM64field_type_createtuple_alloc/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple.ccprev_offsetcmp_ordertuple_init_field_mapsize_aER_EXACT_MATCHS_FATALshort int_ZN6ObjectD0Evtuple_print_Z10tuple_seekP14tuple_iteratorjPjER_NO_SUCH_PROCm_errmsgnew_tupleER_SECONDARY_ZN13IllegalParamsD2Evformat_aER_WAL_IOtuple_rewindER_MEMORY_ISSUEformats_sizeuint32_tfield_end_Z12tuple_updateP12tuple_formatPFPvS1_mES1_PK5tuplePKcS8_short unsigned intER_ILLEGAL_PARAMSLoggedError_ZN6ObjectaSERKS___in_chrgkey_countER_INDEX_TYPEtuple_format_new_ZN11ClientErrorD2EvEVBREAK_ONEcfg_readaheadiov_leniov_base/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple_convert.cctuple_to_luabuftuple_to_obuf_Z13tuple_to_obufP5tupleP4obuf_Z15tuple_to_luabufP5tupleP11luaL_Buffernew_data_endop_splice_argdo_update_op_setdo_op_func__ssize_tops_endinit_update_op_arithupdate_field_splitrsize_tupdate_op_codes_MAXop_check_field_no_Z20tuple_update_preparePFPvS_mES_PKcS3_S3_S3_jPjS4_field_maxop_adjust_field_no_Z20tuple_update_executeP12tuple_updatePccut_length/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tuple_update.ccold_fieldpick_field_strupdate_read_opsinit_update_op_insertinit_optail_lentree_sizeUPDATE_OP_ADDUPDATE_OP_XORupdate_op_metaupdate_op_codesrope_leaf_sizepasterope_appendstqh_firstnew_dataupdate_op_codes_strs_initupdate_field_lenrope_iter_create__static_initialization_and_destruction_0new_field_lenrope_nodeworks_in_placetuple_update_preparedo_update_op_adddo_update_op_insertrope_createdo_update_opsdo_update_op_xorpick_field_u32rope_newrope_sizetuple_update_executeregion_alloc_funcsplit_ctxtotal_field_count__priorityp_new_fcount__initialize_pUPDATE_OP_DELETEUPDATE_OP_ANDUPDATE_OP_MAXROPE_HEIGHT_MAXupdate_op_argdo_update_op_ortuple_datarope_free_funcupdate_calc_new_tuple_lengthUPDATE_OP_SUBTRACTUPDATE_OP_SPLICEtail_offsetupdate_opupdate_fieldold_data_endpick_fieldi64_valupdate_field_initpick_u8init_update_op_deletepack_varint32tail_lengthdo_update_op_andop_listold_leninit_update_op_setop_arith_argop_set_argnew_fieldrope_split_funcinit_update_op_splicepick_strstqe_nextBOX_UPDATE_OP_CNT_MAXpaste_lengthi32_valpick_varint32val_sizeinit_op_functuple_data_endUPDATE_OP_SETrope_iterrope_leaf_data_GLOBAL__sub_I_update_op_codes_strsnamesp_new_sizeregion_alloc_free_stub_Z18update_create_ropeP12tuple_updatePKcS2_jrope_node_sizeold_fcountupdate_create_ropedo_update_op_spliceold_datastqh_lastnew_tuple_fcountrope_alloc_funcrope_extractUPDATE_OP_ORpick_u32do_update_op_subtractUPDATE_OP_INSERTdo_opnew_tuple_sizecmp_order_sizecfg_key/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/key_def.cctarantool_cfg_space_index_key_fieldindex_type_strs_init_Z14key_def_createP7key_defP25tarantool_cfg_space_indexkey_def_createindex_type_strscfg_index_ZN11LoggedErrorC2IIPcEEEPKcjjDpT__GLOBAL__sub_I_field_type_strskey_def_destroy_Z15key_def_destroyP7key_defLoggedError__confetti_flags_ZNK5Index13allocIteratorEviterator_type_MAXITER_ALL_ZNK5Index11findByTupleEP5tupleiterator_type_strs_initsptree_indexpart_typeinitIteratorDUP_REPLACEDUP_REPLACE_OR_INSERTlrpointerselemsize_ZN5IndexD2EvITER_BITS_ALL_NOT_SET_ZN5Index7replaceEP5tupleS1_16dup_replace_modearitynmembersptree_node_pointers_ZNK5Index3maxEvITER_REQ_ZNK5Index3minEvDUP_INSERTITER_BITS_ALL_SETbuildbuildNextprimary_key_validateallocIterator_ZN5Index9buildNextEP5tuplehalf_ZNK5Index12initIteratorEP8iterator13iterator_typePKcjm_positionbeginBuildkey_validate_partsITER_EQ_ZN5Index5buildEPS__Z20primary_key_validateP7key_defPKcjITER_GEITER_GT_ZN5Index7factoryE10index_typeP7key_defP5spacentotalmax_sizemembersgarbage_head_GLOBAL__sub_I_iterator_type_strsiterator_typefloatITER_LEITER_LT_ZNK5Index9findByKeyEPKcj_ZN5Index8endBuildEvpart_size~IndexBOX_SPACE_MAX_ZN5Index17replace_check_dupEP5tupleS1_16dup_replace_modefindByKey_ZN5IndexD0Ev_ZN5IndexC2EP7key_defP5space_ZN6ObjectC2Evfactoryreplace_check_dup/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/index.cc_ZNK5Index4sizeEvITER_BITS_ANY_SETdup_tuplespnode_tendBuild_ZNK5Index6randomEj_Z12key_validateP7key_def13iterator_typePKcju_int32_tfindByTupleBOX_FIELD_MAX_ZN5Index8positionEvsptree_index_mktreeBOX_INDEX_MAX_ZN5Index10beginBuildEvkey_defselemcompare_ZN9HashIndex5buildEP5Index_Z16mh_index_reserveP10mh_index_tjPK7key_defmh_index_reserve_ZNK9HashIndex9findByKeyEPKcj_Z15mh_index_resizeP10mh_index_tPK7key_def_ZN9HashIndex7reserveEjresize_cntmh_node_tERRINJ_INDEX_ALLOCn_dirtymh_index_put_ZN9HashIndex7replaceEP5tupleS1_16dup_replace_modemh_index_removeput_doneHASH_SEEDhash_iterator_gemh_index_resize_ZN9HashIndexC2EP7key_defP5spaceERRINJ_TESTINGn_tuplesmh_index_clearmh_index_put_slot_ZN9HashIndex9buildNextEP5tuplesave_ikey_def_n_ZNK9HashIndex3maxEv_ZNK9HashIndex3minEvhash_iterator_eq_next_ZN9HashIndex8endBuildEvmh_index_start_resizeerrinj_enum_Z12mh_index_newv_Z16hash_iterator_geP8iteratormh_index_get_ZNK9HashIndex13allocIteratorEv_ZNK9HashIndex4sizeEvmh_index_hashhash_iteratorhash_iterator_free_Z14mh_index_clearP10mh_index_tprime_ZN9HashIndexD0Evmh_index_eq_key_Z18hash_iterator_freeP8iteratorLoggedError_ZN11LoggedErrorC2IIlPKcS2_EEES2_jjDpT_ERRINJ_WAL_IOERRINJ_WAL_ROTATE~HashIndex_ZNK9HashIndex12initIteratorEP8iterator13iterator_typePKcjmh_index_deleteh_pos_ZNK9HashIndex6randomEjn_bucketsresize_position/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/hash_index.ccmh_index_next_slotmh_index_hash_keymh_index_nodemh_index_delshadowerrinj_enum_MAXmh_index_new_Z19mh_index_del_resizeP10mh_index_tjPK7key_def_Z21mh_index_start_resizeP10mh_index_tjjPK7key_defindex_nmh_index_randommh_index_del_resizemh_index_eqhash_iterator_eqmh_index_find_Z15mh_index_deleteP10mh_index_ttuple_field__ac_prime_list_ZN9HashIndex10beginBuildEv_ZN9HashIndexD2Ev_ZN9TreeIndex9buildNextEP5tuplesptree_index_node_is_deletedsptree_index_iterator_reverse_nexttree_iterator_letree_iterator_ltsptree_index_node_comparenodessptree_index_replaceindex_is_primarysptree_index_randomsptree_index_deletesptree_index_iterator_next_nodesptree_index_destroyp_oldsptree_index_node_compare_with_key_ZNK9TreeIndex9findByKeyEPKcj_ZN9TreeIndexD2Evsptree_index_key_datasptree_index_iterator_init_set_ZN9TreeIndexC2EP7key_defP5spaceold_nodep_dup_nodesptree_index_init_ZNK9TreeIndex12initIteratorEP8iterator13iterator_typePKcjsptree_index_last_ZN9TreeIndex7replaceEP5tupleS1_16dup_replace_modesptree_index_iterator_freesptree_index_first_ZNK9TreeIndex4sizeEv_ZNK9TreeIndex3maxEvsptree_index_iterator_nexttree_iterator_reqtodelparentsptree_index_iterator_reverse_init_setsptree_index_balancesptree_index_size_of_subtreenode_anode_bnode_x_ZNK9TreeIndex3minEvsptree_index_unfoldsptree_index_get_place~TreeIndexnew_node_ZNK9TreeIndex13allocIteratorEv_ZN9TreeIndex10beginBuildEv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/tree_index.ccfaketree_iterator_freesptree_index_node_compare_dupsptree_index_node_ZN9TreeIndex5buildEP5Index_ZNK9TreeIndex6randomEj_ZN9TreeIndex8endBuildEvsptree_index_find_ZN9TreeIndexD0Evtree_iteratorreturnNodetree_iterator_eqlastLevelEqsptree_index_build_treetree_iterator_getree_iterator_gtsptree_index_folditerator_type_is_reversesptree_index_iteratorestimated_tuplessptree_index_flatten_treereturn_nodeconjspage_tmpvalue_to_tuple_ZN11BitsetIndexC2EP7key_defP5spacebitset_ittuple_to_valuebitset_index_iteratorbitset_index_sizerbn_right_redbitset_expr_conjbitset_idspagesbitset_page~BitsetIndex/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/bitset_index.ccbitset_index_iterator_next_ZN11BitsetIndex7replaceEP5tupleS1_16dup_replace_modekey2bitset_index_ZN11BitsetIndex5buildEP5Index_ZN11BitsetIndexD0Evbit_iteratorword_basebitset_key_size_ZNK11BitsetIndex3maxEvbitset_cardinalityrbt_root_ZNK11BitsetIndex12initIteratorEP8iterator13iterator_typePKcj_ZNK11BitsetIndex3minEvbitset_iterator_Z26bitset_index_iterator_freeP8iteratorword_xor_Z26bitset_index_iterator_nextP8iteratorbitset_iterator_conjrollback_bufpre_nots_ZN11BitsetIndex10beginBuildEv_ZNK11BitsetIndex9findByKeyEPKcj_ZNK11BitsetIndex13allocIteratorEvbitset_expr_ZNK11BitsetIndex6randomEjbitset_keypage_itrbt_nil_ZN11BitsetIndex9buildNextEP5tuple_ZNK11BitsetIndex4sizeEv14bitset_pages_t_ZNK11BitsetIndex11findByTupleEP5tuplerbn_leftbitsetbitset_index_iterator_free_ZN11BitsetIndexD2Ev_ZN11BitsetIndex8endBuildEvCNF_WRONGINT_Z27begin_build_primary_indexesvmh_i32ptr_putCNF_NOMEMORYCNF_INTERNALERROR/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/space.ccmax_key_fieldnospace_by_nCNF_MISSEDspace_nobegin_build_primary_indexes_Z10space_by_njspace_foreachkey_part_countConfettyErrorspace_newspace_destroycheck_spacesLoggedError_Z13space_foreachPFvP5spacePvES1_CNF_OPTIONALCNF_NOTSETmh_i32ptr_delCNF_SYNTAXERRORmh_i32ptr_put_slotmh_int_tCNF_WRONGINDEXtarantool_cfg_space_Z20space_validate_tupleP5spaceP5tupleCNF_WRONGRANGECNF_RDONLY_Z25end_build_primary_indexesvspace_config_Z23build_secondary_indexesvmh_i32ptr_nodeprimary_indexes_enabledCNF_WRONGTYPEend_build_primary_indexes_Z9space_newjP7key_defjjsecondary_indexes_enabledmh_i32ptr_getLoggedErrorbuild_secondary_indexes_Z10space_initvCNF_OKspace_validate_tuplemh_i32ptr_node_tspace_replace_ZN11LoggedErrorC2IIPKcS2_EEES2_jjDpT_space_deletespace_createmh_i32ptr_next_slotspace_free_Z12check_spacesP13tarantool_cfg_Z10space_freev_Z13space_replaceP5spaceP5tupleS2_16dup_replace_mode_ZN11LoggedErrorC2IIjEEEPKcjjDpT_null_port_add_tuplenull_port_eof/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/port.cc_Z13null_port_eofP4portnull_portnull_port_vtabrequests_MAXfoundcoro_contextrequest_namerequest_executereqpos__gnuc_va_list/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/request.cc_Z16dup_replace_modejread_keyfp_offset_ZN14ErrorInjectionD2Ev_Z12request_namej_ZN11LoggedErrorC2IIjjEEEPKcjjDpT_space_findexecute_updaterequests_strs_initindex_nogp_offsetrequestsspace_nexecute_deleterequest_check_typeUPDATEstack_sizeoverflow_arg_area_Z15request_executeP7requestP3txnP4port_Z14request_createjPKcjreg_save_areaexecute_replacerequest_createLoggedErrorpalloc_region_allocgc_poolrlistDELETE_1_3execute_selectread_space_GLOBAL__sub_I_requests_strs_ZN14ErrorInjectionD0Evreqend~ErrorInjectiontypedef __va_list_tag __va_list_tagsin_familysin_addrsin_porttxn_replaceLoggedError<>sin_zeroWAL_NONEin_addr_treadertxn_add_redo_Z12txn_rollbackP3txn_ZN11LoggedErrorC2IIEEEPKcjjDpT__Z9txn_beginvWAL_FSYNC_DELAY_Z10txn_finishP3txn_Z12txn_add_redoP3txntPKcjtxn_commitWAL_WRITEwal_watcher/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/txn.cctxn_finishconfirmed_lsn_Z10txn_commitP3txntxn_rollbackwal_writersa_family_trow_handler_paramWAL_FSYNCev_now_Z11txn_replaceP3txnP5spaceP5tupleS4_16dup_replace_moderow_handlers_addrtxn_beginWAL_MODE_MAXin_port_told_is_replica_shortbufrecover_rowrowlen__pad4_IO_lock_t_IO_buf_endreqlen_IO_write_endnewlines_Z15port_send_tupleP4portP3txnjport_send_tuple_flags2_markersnew_confpanic_if_errorpick_u64snapshot_write_tupleLOG_WRITEopen_wflagsnew_is_replicabox_freebox_snap_row_IO_backup_basebase64_buflen_fileno_IO_read_baselog_mode_IO_save_endbox_enter_master_or_replica_modebox_status/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/box.cc_IO_marker_IO_read_ptrbinsizebox_infofilename_ext_IO_write_baseprocess_replicabase64_bufsnapshot_spacebox_process_ro_IO_buf_base__pad1__pad2__pad3is_inprogress__pad5filetype_vtable_offsetrequest_is_selectbox_reload_configreqdata_IO_save_base_IO_read_endbox_initprocess_rwbase64_bufsizelog_formatbox_check_configSNAPXLOGdatasizerecover_snap_row_old_offsetbox_process_func_sbufbox_snapshotpick_u16_IO_write_ptrold_confsnapshot_space_param__off_tbox_leave_local_standby_modesync_is_asyncinit_storage_cur_columnLOG_READstat_base__off64_t_unused2ip_addrbox_lua/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/lua/box.lua.cGNU C 4.7.3/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/lua/box_net.lua.cbox_net_lua/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/lua/misc.lua.cmisc_lua/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/lua/sql.lua.csql_luanupvaluesMRefGCROOT_BASEMT_NUMtuple_iteratorlib_namelbox_pushtupleMM_gcCTOK_UNIONGCReflbox_tuple_bsizetuple_countlua_CFunctionCTOK_FIRSTDECLCTOK_IDENTarg_countBCLineCTOK_VOIDopcode_to_formatnarg__tupleCTOK_ANDANDu16bufCTOK_ORORbox_unpack_responseCT_HASSIZElua_IntegerCTOK_CHARsave_stacksizeport_lua_vtabMM_ipairsvarinfoMM_leMM_ltlbox_index_metaCTOK_INTEGER_Z19box_unpack_responseP9lua_StatePKcS2_CT_EXTERNCTOK_SHORTbox_index_init_iterator_typesMM__MAXGCROOT_MAX~ScopedGuardlbox_index_tostringlbox_unpackalign1CT_ARRAYbox_lua_findboxlibtuplelib_name_Z15box_lua_executeP7requestP4portluaL_packvalueCTOK_LONGLONGMSize__closureport_lua_createformat_sizeop_cntGCROOT_BASEMTCTOK_RESTRICT_Z12mod_lua_initP9lua_Statelbox_iterator_metaMM_FASTlbox_packCT_ENUMtendlua_totupleluaL_packsizefirstlinelbox_index_iteratorlbox_index_countCTOK_VOLATILElbox_call_loadprocCTOK_ASMGCtabnumlinelbox_tuple_unpackCT_TYPEDEFCT_FUNC/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/box_lua.cclua_istupleMM____MM_tostringGCROOT_IO_OUTPUTunused1CT_FIELDlbox_tuple_totableCT_CONSTVALhmaskCTOK_LONGGCROOT_MMNAMEMM_metatableMM_pairsexpr_lenlua_fieldCT_VOIDGCudataCTOK_PTRSZdummy_ffidnextgcstr_sizeCTOK_ALIGNOFport_luau8bufroot_Lport_add_lua_retCTOK_UNSIGNEDCTOK_OFSoffset_u32sizebclbox_processMM_concatlbox_checkiteratorCTOK_CONSTCTOK_LASTDECLCTOK_SIZEOFCTOK_ATTRIBUTECTOK_COMPLEXcframelbox_tuple_gcCTOK_INLINEmake_scoped_guard >TValuelbox_tuple_find_dobox_lua_executeFunctorGCROOT_MMNAME_LASTcharbuflbox_tuple_transformlbox_index_iterator_closureCT_NUMCTOK_EQallocated_sizeCTOK_EXTENSIONmod_lua_initCTOK_BOOLCT_BITFIELDCTOK_FPudtypelbox_index_lenlbox_tuple_nextsizekgcCTOK_TYPEDEFlua_sourcesport_lua_add_tupleCTOK_GEcoloCTOK_FIRSTSCL__coro_reflbox_index_maxptrdiff_tMM_addCTOK_EOFMM_suboperator()openupvalGChead3MMSftszlbox_tuple_sliceScopedGuard >CTOK_LElbox_tuple_pairsCTOK_STATICCT_ATTRIBm_activeCTOK_STRUCTuvinfouvptrname_endsizeptCTOK_NEMM_lengcptr32MM_unmlbox_pushiteratorMM_powlbox_index_nextnumparamsCT_PTRlbox_index_minCTOK_AUTOlbox_index_randomMM_indexmaxstacklbox_index_newMM_callsizeuv8GCRootIDlbox_tuplelibmake_scoped_guard >CTOK_EXTERNport_add_lua_multretbswap_u64indexlibpack_lstru32bufMM_modeCTOK_REGISTERCT_STRUCTbufendlbox_tuple_tostringluaL_packstackCTOK_LASTDECLFLAGCTOK_CCDECLGCROOT_IO_INPUTCT_KWscoped_guardGCfuncLCTOK_DEREFCTOK_SHLCTOK_SHRsizeknlbox_tuple_newCTOK_STRINGformat_to_opcodelineinfoMM_new_Z11lua_istupleP9lua_Stateichunknamenargslua_NumbernommgclistGCprotolbox_index_part_countluaL_addvarint32markedlbox_iterator_udatalua_checkindexScopedGuard >MM_modframesizefreetopglref9FrameLinkhas_keysMM_divindexlib_nameCTOK_INTCTOK_DECLSPEClua_table_to_tupleCTOK_ENUMlbox_tuple_lenMM_newindexlbox_tuple_iterator_metalbox_tuple_metaCTOK_SIGNEDlbox_create_iteratorlbox_raiselbox_tuple_findm_funlua_checktuplelbox_tuple_indexMM_eqMM_mullbox_tuple_findallCT_MAYCONVERTlbox_iterator_gclua_tofield_Z14lbox_pushspaceP9lua_StateP5spacebox_lua_load_cfg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/box/box_lua_space.cclbox_pushspacelbox_add_spacelbox_add_space_wrapperdup_tarantool_cfgS_name__readaheaddumpOptDefS_name__replication_sourcedestroy_tarantool_cfgS_name__snap_io_rate_limitS_name__space__cardinalityn_acceptedS_name__memcached_expire_per_loopS_name__space__index__typeS_name__work_dirS_name__panic_on_snap_errorn_skippedS_name__panic_on_wal_errorn_optionalS_name__wal_dir_rescan_delayonly_check_rdonlyS_name__slab_alloc_arenaS_name__usernamearrayTypeS_name__custom_proc_titlestructvalscalarTypeorig_optS_name__admin_portS_name__replication_portS_name__backlogidx_name__space__indexiterator1iterator2S_name__slab_alloc_factor_BoolacceptDefault_name__spacecleanFlagsacceptDefault_name__space__indextarantool_cfg_iterator_initacceptDefault_name__space__index__key_fieldS_name__space__estimated_rowsparse_cfg_buffer_tarantool_cfgtarantool_cfg_iterator_nextS_name__memcached_spacetarantool_cfg_iterator_ttmpcfgS_name__wal_dirS_name__memcached_portswap_tarantool_cfgarrayvalS_name__script_dirparamTypeS_name__space__index__key_field__fieldnoidx_name__space__index__key_field/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/tarantool_box_cfg.cS_name__wal_writer_inbox_sizeidx_name__space_S_FinishedS_name__loggerS_name__slab_alloc_minimalS_name__space__indexS_name__log_levelS_name__space__index__key_field__typeS_name__coredumpS_name__bind_ipaddrS_name__spacecmpNameAtomsS_name__space__index__uniquescalarvalS_name__rows_per_walS_name__wal_fsync_delayparamValueacceptCfgDefS_name__space__index__key_fieldS_name__space__enabledS_name__wal_modeNameAtomparse_cfg_file_tarantool_cfgcmp_tarantool_cfgIteratorStateS_name__primary_portS_name__local_hot_standbystructTypeS_name__too_long_threshold_S_InitialacceptValuecheck_cfg_tarantool_cfgS_name__snap_dirS_name__memcached_expireconfetti_strcmpS_name__secondary_portatominit_tarantool_cfgS_name__pid_fileS_name__memcached_expire_full_sweepS_name__io_collect_intervalfill_default_tarantool_cfgS_name__logger_nonblocksa_sigactionbufptr_syscall_Z12init_storageP6log_ioP9fio_batchwal_mode_STRSstderrpw_uid10__sigset_tmutex_lock_timeoutScopedGuard >EVFLAG_NOSIGMASKev_unlooptarantool_versionpw_namerlist_emptyEVFLAG_NOINOTIFYrlim_ttarantool_freerlist_createsignal_resetsigval_trlim_maxsig_fatal_cbpw_shellnptrcfg_outpw_passwd__RLIMIT_LOCKSsa_mask__RLIM_NLIMITSeter_pool_call_addrRLIMIT_COREtbuf_append__RLIMIT_NPROC_padsi_utime__sigaction_handler__sighandler_tbackgroundev_watchertbuf_ensurepw_gidrequiredcfg_filenamepw_dir_sigsys__gid_tsigspptrsi_tidtarantool_uptime_Z18tarantool_lua_freev__RLIMIT_NICE9siginfo_tmake_scoped_guard >si_addrRLIMIT_CPU__RLIMIT_OFILEcore_reload_config__rlim64_tev_signalev_default_destroyev_watcher_listsi_band__rlimit_resource__RLIMIT_NLIMITSsignal_freesa_handlermutex_trylockcreate_pid__outrlim_curtarantool_L__pid_tEVFLAG_SIGNALFD_sifieldsinitialize_minimalsayfd__PRETTY_FUNCTION__mutex_lockEVFLAG_FORKCHECKcore_check_config__RLIMIT_RSSstart_timeRLIMIT_AS_sigpoll__clock_tRLIMIT_FSIZEmain_optsi_codecfg_filename_fullpathn_ignoredmutex_unlockmain_argc_archEVFLAG_NOENVmain_argvcfg_paramnamerlimitreventsrlist_firstEVFLAG_NOSIGFD__RLIMIT_RTPRIOpw_gecosopt_defreload_cfg__new_cfg__aux_cfg__RLIMIT_SIGPENDINGsi_uidsig_snapshottarantool_lua_freeshow_cfg__uid_tsi_pidrlist_add_tailmutex_createRLIMIT_NOFILE_sigchld__sig_atomic_t__RLIMIT_MSGQUEUEsival_int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tarantool.ccsi_fdsignum__RLIMIT_RTTIMEsignal_initsi_statusnew_delaysi_sigvalsi_errnoEVFLAG_AUTObinary_filename__RLIMIT_MEMLOCKev_loopportsrlist_delsyntax__mptrsa_flags__valmaster_pid__func__signal_cbRLIMIT_STACK__sigchld_clock_tsi_stimefiber_funcsival_ptr_sigfaultTIMEOUT_INFINITYsi_overrunsa_restorerRLIMIT_DATA/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/opts.cgoptargsctype_ctsCTID_A_CCHARreserveduuid_luaCTID_BOOLdispatchmodetarantool_lua_error_initlbox_fiber_selflastlinedefinedCTID_COMPLEX_FLOATlbox_fiber_createtarantool_lua_sandboxtarantool_lua_initfiber_statetarantool_lua_setpathdentvmstatelbox_timeCTID_UINT8GCfuncCTID_MAXctype_rawctype_getmcodelbox_fiber_sleepstrnumendptrmiscmapuvheadsetcdataVhookmask_Z19tarantool_lua_closeP9lua_Stateallocdallocfrlist_addlbox_checkfibercbidapi_versionctype_child_Z16lua_region_allocPvmgcroottarantool_lua_set_outcurrentwhiteshow_plugins_statstepmulitypeCTInfojit_basehookcountnamewhatstrhashlbox_fiber_findtarantool_luaCTID_CTYPEID_ZNK20FiberCancelException3logEv_Z17show_plugins_statP4tbuferrorlibd_nametarantool_pluginfiberlibchild_stateis_stringtarantool_lua_dup_outlbox_tonumber64tarantool_lua_printstackmethodsDONEd_reclenCTID_INT8tarantool_lua_printstack_yamllbox_pushfiber_Z22tarantool_lua_load_cfgP9lua_StateP13tarantool_cfgctype_stateshort_srctnt_errcode_valCTID_UINT16grayagainstremptyzloaderCTID_P_VOIDCTID_DOUBLEtarantool_lua_tointeger64CTID_COMPLEX_DOUBLECTID_UINT32tarantool_lua_load_init_scriptfiber_is_callerd_offtarantool_plugins_initlbox_pcall~FiberCancelExceptionsetgcVGCstrweakCTID_UINT64closedCTStatehookflbox_printbox_lua_fiber_run_detachedtarantool_lua_dostringjit_Llbox_fiber_wrapGCupvalsizeidglobal_Statelbox_fiber_checkstack/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/init.cclbox_fiber_statusCTID_VOIDlbox_fiber_cancelregistrytvname_indexCTypeIDfinalizergraybc_cfunc_exttmptv2__dirstreamlua_DebugCTID_P_CVOIDhookcstartSBuffiber_set_sidlua_isfiberdhashCTID_P_CCHAR_Z30tarantool_lua_load_init_scriptP9lua_StateCTID_FLOATuintptr_tbox_lua_fiber_push_callerCTID_CVOIDimmutableluaL_pushcdatastrmaskCTID_CCHARGCcdatatarantool_lua_closecurrentlineluaL_pushnumber64ctype_checkctypeidquotelbox_create_weak_tablelbox_fiber_namelua_Hooklbox_fiber_yieldmainthreflbox_fiber_metai_citarantool_lua_tostringBCInsestimatenilnodetarantool_load_plugintopidsweepstrbox_lua_fiber_get_callerCTypeID1CTID_INT16box_lua_fiber_clear_coro_Z25tarantool_lua_tointeger64P9lua_StateiCTID_NONEGCobjlbox_fiber_gclbox_time64lua_region_allocsizetabbox_lua_fiber_get_corowrapfCTID_INT32GCfuncCbc_cfunc_intrlist_nextvmevmaskplugin_stat_cbmmudatalbox_fiber_idlbox_fiber_resumetmpbuftarantool_lua_register_typeCTID_INT64divider_Z13tarantool_luaP9lua_StateP4tbufPKcupvalue__ino64_tfiberlib_nametarantool_lua_load_cfgFPRCBArgYIELDdebt_Z18tarantool_lua_initvlbox_fiber_testcancellbox_fiber_detachlua_Allocchop_Z22tarantool_lua_tostringP9lua_Stateiloaded_pluginsDETACHchild_LGCStateboxlib_nameCTypeCTSizetbuf_strbox_lua_fiber_runstremptypauselj_cdata_newtarantool_lua_dofileplugin_init_cbtmptv_Z17luaL_pushnumber64P9lua_StatemMAX_STACK_DEPTHargetarantool_plugins_dird_ino_Z27tarantool_lua_register_typeP9lua_StatePKcPK8luaL_RegCCallbacktm_hourtm_ydaytm_zoneerrsvenvpsay_logger_inittm_montm_yeartimespecpipefdtm_isdsttv_nsec__syscall_slong_ttv_seclevel_to_char__time_tsayftm_gmtoff/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/say.cctm_mintm_wdaytm_mdaytm_secbootinglogger_pidvsaymh_i64ptr_resize_Z22mh_i64ptr_start_resizeP11mh_i64ptr_tjjPvmh_i64ptr_node_tmh_lstrptr_start_resizemh_i32ptr_new_Z16mh_i64ptr_resizeP11mh_i64ptr_tPvmh_lstrptr_newmh_lstrptr_next_slotlstrcmpmh_i64ptr_get_Z22mh_i32ptr_start_resizeP11mh_i32ptr_tjjPv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/assoc.cc_Z16mh_i32ptr_resizeP11mh_i32ptr_tPvmh_lstrptr_del_Z17mh_lstrptr_deleteP12mh_lstrptr_tmh_i32ptr_reservemh_i32ptr_start_resize_Z20mh_i64ptr_del_resizeP11mh_i64ptr_tjPvmh_i64ptr_new_Z15mh_i64ptr_clearP11mh_i64ptr_t_Z17mh_i32ptr_reserveP11mh_i32ptr_tjPvmh_lstrptr_del_resize_Z16mh_i32ptr_deleteP11mh_i32ptr_t_Z23mh_lstrptr_start_resizeP12mh_lstrptr_tjjPv_Z21mh_lstrptr_del_resizeP12mh_lstrptr_tjPv_Z15mh_i32ptr_clearP11mh_i32ptr_tmh_i64ptr_delmh_i32ptr_clear_Z13mh_i64ptr_newvmh_lstrptr_resize_Z13mh_i32ptr_newvmh_strptr_hashmh_lstrptr_put_slot_Z18mh_lstrptr_reserveP12mh_lstrptr_tjPvmh_i64ptr_next_slot_Z16mh_lstrptr_clearP12mh_lstrptr_t_Z17mh_lstrptr_resizeP12mh_lstrptr_tPvmh_lstrptr_deletemh_i64ptr_start_resizemh_i64ptr_delete_Z20mh_i32ptr_del_resizeP11mh_i32ptr_tjPvmh_lstrptr_clearmh_i64ptr_put_slotmh_lstrptr_node_tmh_i32ptr_deletemh_i64ptr_reserve_Z17mh_i64ptr_reserveP11mh_i64ptr_tjPvmh_lstrptr_getmh_i32ptr_resize_Z16mh_i64ptr_deleteP11mh_i64ptr_t_Z14mh_lstrptr_newvmh_i64ptr_del_resizemh_lstrptr_reservemh_i32ptr_del_resizemh_i64ptr_clearSERVICE_NAME_MAXLENwaitpid_failedmaster_to_spawner_socketEV_CHECKreplicationsa_dataspawner_signal_handlerEV_SIGNALsockaddrorig_maskEV_IOEV_IDLEspawner_shutdownEV_FORKspawner_sigchld_handlermsg_namelenEV_EMBEDmsg_flags__intptr_tEV_CHILDreplication_relay_recvchild_countEV_NONEEVRUN_NOWAITcontrol_buf/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replication.ccEV_CLEANUPEV_ERRORcmsg_lenreplication_on_acceptshutdown_handlermsg_controllenon_accept_paramreplication_initreplication_prefork__socket_typeEV_CUSTOMkill_signomsglenSCM_RIGHTSdefault_versionrepeatSOCK_DCCPSOCK_PACKETcmd_codeSOCK_DGRAM_Z24replication_check_configP13tarantool_cfgEV_STATkilledclient_sockEV_WRITEspawner_create_replication_relayspawner_main_loopev_timer_Z16replication_initPKcion_bind_parammsg_name_Z19replication_preforkvspawnerEV_PERIODICspawner_initreplication_check_configreplication_relay_send_rowEV_ASYNCspawner_shutdown_childrenspawner_unpack_cmsgreplication_relay_loopcmsg_typeSOCK_CLOEXECcontrol_messageEV_TIMEOUTSOCK_RAWev_default_forkEVRUN_ONCEmsg_iovcmsg_level__socklen_treplication_send_socketSOCK_SEQPACKETsockpairSOCK_STREAMmsg_controlalarm_masksa_familySOCK_NONBLOCKEV_UNDEFexit_statusEV_PREPARESCM_CREDENTIALSEV__IOFDSETEV_READcmsghdrsock_read_evEV_TIMERmsg_iovlenSOCK_RDMcmd_setcurr_connections_test_eof190_test_eof191_test_eof193_Z15tbuf_read_fieldP4tbuf_test_eof195_test_eof196_test_eof197get_missesparsedbufsizmemcached_is_numericmemcached_loopIOBUF_IOV_MAXexptime_test_eof117_test_eof118tr144memcached_flush_alltr27memcached_errormemcached_handlertr30tr39_Z29memcached_delete_expired_keysP4tbufMEMC_GETtr105tr106tr107tr113tr114ibuf_unusedtr118tr119memcached_stat_strs_initcstat_test_eof147memcachedtr120tr122incrst45_test_eof10_test_eof11st10st11st12st13st14st15st16st17st18st19memcached_dispatchbytes_freetr133_test_eof156_test_eof159st20st21st22st23st24st25st26st27tr140tr141memcached_storetr146tr147tr148exit_test_eof25_test_eof26st30st31st32st33st34st35st36st37st38st39evictionstr60tr157tr158tr159_test_eof161_test_eof163st40st41st42st43st44st46st47st48tr202tr209_Z21memcached_expire_loopP13__va_list_tagtr169st50st52st53st54st55st56st57st58st59tr213tr172tr174tr175tr176tr79batch_countst60st61st62sle_nextst64st65st66st67st69memcached_startmemcached_first_finaltr222tr187_test_eof40memcached_free_test_eof45st70st71st72st73st74st75st76st77st78st79tr232tr237tr193tr195tr198_test_eof181show_casst80st81st82st83st84st85st86st87st88ScopedGuard >tr246tr247ibufst90st92st93st94st95st97st98st99tr252tr254tr255tr258tr259tr93_test_eof192_test_eof194MEMC_GET_HIT/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/memcached.cctr262tr263tr264tr265tr267_test_eof62_test_eof63tr276tr277item_sizetr281bytes_written_test_eof2_test_eof3_test_eof4_test_eof5tbuf_read_field_test_eof7_test_eof8_test_eof9_test_eof79memcached_indextotal_connectionsslab_cache_stats_Z14memcached_loopP5ev_ioP5iobuf_Z14memcached_initPKci_test_eof12_test_eof13_test_eof14_test_eof15_test_eof16_test_eof17_test_eof18_test_eof19memcached_init_test_eof81_test_eof20_test_eof21_test_eof22_test_eof23_test_eof24_test_eof27_test_eof28_test_eof29coio_service_test_eof30_test_eof31_test_eof32_test_eof33_test_eof34_test_eof35_test_eof36_test_eof37_test_eof38_test_eof39_ZNK11ClientError7errcodeEv_test_eof93_test_eof96_test_eof98_test_eof41_test_eof42_test_eof43_test_eof44_test_eof46_test_eof47_test_eof48_test_eof49st194_Z13memcached_getP4obufmP4tbufbtotal_itemstbuf_store_field_test_eof50_test_eof51_test_eof52_test_eof53_test_eof54_test_eof55_test_eof56_test_eof57_test_eof58_test_eof59st163_Z22memcached_start_expirevbox_flagstr15tr17tr18memcached_stop_expire_test_eof60_test_eof61memcached_print_stats_test_eof64_test_eof65_test_eof66_test_eof67_test_eof68_test_eof69st100st28st29_test_eoftr21tr22tr25tr26tr28_test_eof70_test_eof71_test_eof72_test_eof73_test_eof74_test_eof75_test_eof76_test_eof77_test_eof78__iobuf__packed___test_eof80_test_eof82_test_eof83_test_eof84_test_eof85_test_eof86_test_eof87_test_eof88_test_eof89bytes_usedtr40tr45tr46tr49_test_eof90_test_eof91_test_eof92value_len_test_eof94_test_eof95_test_eof97_test_eof99suffix_lentr50tr53tr54tr57tr58tr59keys_countst49tr62memcached_findnoreply_Z16tbuf_store_fieldP4tbufPKcjtr71tr72tr76tr78st134st137tr82tr83tr86tr87get_hitstr90tr91tr92tr95st63tr132memcached_gettr134st68incr_sign_Z20memcached_space_initvmake_scoped_guard >memcached_metast158st159_Z22memcached_check_configP13tarantool_cfgbytes_readflush_delaytbuf_append_fieldmemstatsmemcached_statmemcached_en_mainst89keys_to_deleteobuf_create_svpmemcached_check_configst91st96st175ibuf_size_Z17tbuf_append_fieldP4tbufPKctr224tr225st190tr228tr229MEMC_EXPIRED_KEYStr185tr186st196coio_read_aheadsalloc_stat_memcached_cbmemcached_itMEMC_GET_MISSmemcached_start_expire_test_eof6st101st102st103st104st105st106st107st108st109tr233tr234tr235tr191st110st111st112st113st114st115st116st117st118st119st120st121st122st123st124st125st126st127st128st129cmd_get_Z21memcached_stop_expirevst130st131st132st133st135st136memcached_stat_MAXst138st139key_lencoio_bread_test_eof100_test_eof101_test_eof102_test_eof103_test_eof104_test_eof105_test_eof106_test_eof107_test_eof108_test_eof109st140st141st142st143st144st145st146st147st148st149memcached_space_init_test_eof110_test_eof111_test_eof112_test_eof113_test_eof114_test_eof115_test_eof116_test_eof119st150st151st152st153st154st155st156st157memcached_delete_expired_keysmemcached_is_expired_test_eof120_test_eof121_test_eof122_test_eof123_test_eof124_test_eof125_test_eof126_test_eof127_test_eof128_test_eof129st160st161st162st164st165st166st167st168st169_test_eof130_test_eof131_test_eof132_test_eof133_test_eof134_test_eof135_test_eof136_test_eof137_test_eof138_test_eof139st170st171st172st173st174st51st176st177st178st179__coiomemcached_natoq_test_eof140_test_eof141_test_eof142_test_eof143_test_eof144_test_eof145_test_eof146_test_eof148_test_eof149st180st181st182st183st184st185st186st187st188st189memcached_expire_loop_test_eof150_test_eof151_test_eof152_test_eof153_test_eof154_test_eof155_test_eof157_test_eof158tr117st191st192st193st195st197fstart_test_eof160_test_eof162_test_eof164_test_eof165_test_eof166_test_eof167_test_eof168_test_eof169salloc_stat_memcached_cb_ctx_GLOBAL__sub_I_memcached_stat_strs_test_eof170_test_eof171_test_eof172_test_eof173_test_eof174_test_eof175_test_eof176_test_eof177_test_eof178_test_eof179memcached_delete_test_eof180_test_eof182_test_eof183_test_eof184_test_eof185_test_eof186_test_eof187_test_eof188_test_eof189call_stack_Z10fiber_infoP4tbuffiber_ready_asyncfiber_freeev_childfiber_scheduleready_fibersmh_i32ptr_removefiber_yield_tounregister_fidfiber_new_Z14wait_for_childi/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fiber.ccrlist_move_tailev_asynccallee_Z14fiber_scheduleP10ev_watcheri_ZN20FiberCancelExceptionD2Evfiber_callfiber_wakeup_Z14fiber_yield_toP5fiberev_watcher_time_Z12fiber_wakeupP5fibersched_Z19fiber_yield_timeoutdFIBER_CALL_STACKupdate_last_stack_framefiber_schedule_timeoutfiber_info_printlast_used_fidsentenablefiber_schedule_childfiber_is_cancelledfiber_registryfiber_destroy_Z16fiber_checkstackv_Z13fiber_destroyP5fiber_Z14fiber_set_nameP5fiberPKc_Z10fiber_freevfiber_watcher_data_ZN20FiberCancelExceptionC2EPKcj_Z10fiber_callP5fiberz_Z11fiber_yieldvtimed_outfiber_zombificaterlist_move_Z10fiber_initv_Z18fiber_is_cancelledvfiber_info_Z20fiber_schedule_childP8ev_childifiber_loop_Z11fiber_sleepd_Z20fiber_setcancellableb_Z9fiber_newPKcPFvP13__va_list_tagEwait_for_childfiber_setcancellable_Z10fiber_findjfiber_set_nameiobuf_init_readahead_Z17fiber_destroy_allvzombie_fibersfiber_init_Z16fiber_testcancelvfiber_destroy_all_ZN20FiberCancelExceptionD0Ev_Z8fiber_gcv_Z12fiber_cancelP5fiberyyextrayylineno_ryyvaluepdo_not_strip_quotesyyscannernumber_to_moveyy_get_previous_state/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/prscfg.cyy_baseyysizeyytokenyy_is_interactiveyy_cyymsgprscfg_yy_load_buffer_stateprscfg_yyfreeyyreduceyytype_uint8prscfg_yyget_linenoyy_more_lenyytranslateyy_more_flagyynewbytesyyin_rprscfg_yyrestartprscfg_yy_scan_stringnum_to_readyydestructyyexhaustedlabprscfg_yypop_buffer_stateyy_chkparseCfgDefyy_ch_bufprscfg_yyget_columnyylval_paramyydefactprscfg_yyget_textyypactprependNameprscfg_yyget_extrayy_last_accepting_cposyy_n_charsYY_BUFFER_STATEnew_bufferprscfg_yyget_debugyychecklimcompileNamebdebugprscfgScannerInitBufferyy_defcolumn_noyyformatyytnamerryyss1yy_flex_debug_ryysyntax_error_statusyy_push_stateyyssaprscfgScannerFinishprscfg_yyset_inyysspyytype_int8yyvalyy_hold_charyy_try_NUL_transyylvalret_valyybackupyy_buffer_stateyystr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfgprscfg_yyset_outprscfg_yy_flush_bufferyyout_rstrdupnyyacceptlabprscfg_yy_scan_bytesprscfg_yylexyysize0yysize1prscfg_yy_delete_bufferprscfg_yyallocyytnamecommentCounteryyxendyyunputyystateyyabortlabyy_state_typestrbufyy_get_next_bufferyymsgpprscfg_yyget_outyy_c_buf_pyyguts_tyylenyy_bs_linenoprscfg_yycharprscfg_yy_switch_to_bufferyy_metaprscfg_yynerrsflex_int16_tyyextra_ryyerrlab1addstringstdinprscfg_yyset_lvalyyvs_allocyytype_int16yy_bs_columnyy_matchyy_c_buf_p_offsetyy_buf_sizeYY_CHARyy_buffer_statusprscfg_yyget_lengprscfg_yyget_lvalyyerrstatusostateyy_start_stackyy_at_bolplainOptDefprscfg_yylex_init_extrafreeNameprscfgScannerStartValueyy_is_our_bufferyybytesyy_actyy_fatal_erroryy_start_stack_depthyy_fill_bufferprscfg_yyget_inyynewstateyysetstateprscfg_yypush_buffer_stateyy_init_globalsyyargprscfg_yy_extra_typeyyresyyextyytypeyyss_allocprscfgScannerInitout_stryylval_rflex_int32_tyyreturnprscfg_yyset_columnyy_start_stack_ptrfreeCfgDefyystacksizeyyr1yyr2endPtrnum_to_allocprscfg_yyscan_tyymsg_allocyy_bpptr_yy_globalsyy_pop_stateyyptryy_cpyycheckyysyntax_erroryyssyy_is_jamnew_stateyy_buffer_stack_topyy_next_stateyy_buffer_stackprscfg_yy_init_bufferyyxbegindestyymsgbufyy_ecscan_yyerroryy_last_accepting_stateyytableprscfg_yy_create_bufferprscfgGetLineNoyy_find_actionyydefaultprscfg_yyparseprscfg_yyset_extrayy_startprscfg_yyensure_buffer_stackdummy_yygutsyy_acceptyyvsgrow_sizeline_numberyyleng_ryypgotoprscfg_yyset_debugyy_input_fileyycountdo_actionyy_user_definedYYSTYPEparseCfgDefBufferyy_initprscfg_yylex_destroyaddcharyy_buffer_stack_maxyyvsayy_nxtyyvspyydefgotoyystosprscfg_yy_scan_bufferoerrnoyy_current_stateprscfg_yylex_inityytext_rprscfg_yyset_linenostdoutyyerrlabyyresultbeginPtrcloneNameyy_did_buffer_switch_on_eofprscfg_yyreallocyy_buf_posprscfg_yyerroryy_size_tnewListin_strprepyyerrorlab_yybytes_lenyy_amount_of_matched_textprscfgScannerEndValue/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/cfg/warning.cout_warningprinted_lentbuf_printftbuf_vprintftbuf_to_hextbuf_asserttbuf_peekTBUF_ALLOC_FACTORfree_lentbuf_ltrimtbuf_resettbuf_newtbuf_split/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcorigtbuf_ensure_resize/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/tbuf.ctbuf_cloneap_copyVG_USERREQ__MALLOCLIKE_BLOCKp0allocvargspalloc_greatest_sizeVG_USERREQ__MAKE_MEM_UNDEFINEDpoisonedcurelmpalloc_used_zzq_argsVG_USERREQ__CLIENT_CALL0VG_USERREQ__CLIENT_CALL1VG_USERREQ__CLIENT_CALL2VG_USERREQ__CLIENT_CALL3next_chunkVG_USERREQ__MEMPOOL_TRIMclass_initVG_USERREQ__RUNNING_ON_VALGRINDVG_USERREQ__STACK_CHANGEpalloc_statpalloc_initpalloc_nameVG_USERREQ__MAKE_MEM_NOACCESSpalloc_set_name24Vg_MemCheckClientRequestchunk_list_headpalloc_create_poolpalloc_destroy_pool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/palloc.ccpoolsVG_USERREQ__LOAD_PDB_DEBUGINFOpreleasefree_chunks16Vg_ClientRequestpalloc_freeclass_counttqe_prevclass_nextVALGRIND_PRINTFVG_USERREQ__CHECK_MEM_IS_DEFINEDnext_chunk_forpalloc_totalVG_USERREQ__COUNT_LEAK_BLOCKSVG_USERREQ__DISCARD_TRANSLATIONSpoison_chunkVG_USERREQ__COUNT_ERRORS_zzq_result_zzq_rlvalchunk_sizeclazz_qzz_resVG_USERREQ__MEMPOOL_EXISTSchunk_class_VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERRORpool_nextVG_USERREQ__STACK_REGISTERVG_USERREQ__DISCARDVG_USERREQ__SET_VBITSpalloc_allocatedchunk_magicclass_tailq_headpallocaslh_firstVG_USERREQ__STACK_DEREGISTERpalloc_resetchunks_countVG_USERREQ__CREATE_BLOCKVG_USERREQ__COUNT_LEAKSprelease_afterVG_USERREQ__FREELIKE_BLOCKVG_USERREQ__CREATE_MEMPOOLVG_USERREQ__PRINTF_VALIST_BY_REFVG_USERREQ__MOVE_MEMPOOLVG_USERREQ__MEMPOOL_ALLOCpoison_charpalloc_pool_headVG_USERREQ__DESTROY_MEMPOOLcut_sizerz_sizechunk_usedpalloc_slow_pathclassesVG_USERREQ__PRINTF_BACKTRACEbusy_linkptruncatepalloc_free_unusedVG_USERREQ__GET_VBITSVG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLEVG_USERREQ__CHECK_MEM_IS_ADDRESSABLEVG_USERREQ__MEMPOOL_CHANGEVG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REFVG_USERREQ__MEMPOOL_FREEpallocVG_USERREQ__DO_LEAK_CHECKchunk_freeVALGRIND_PRINTF_BACKTRACEVG_USERREQ__MAKE_MEM_DEFINEDVG_USERREQ__MAP_IP_TO_SRCLOCVG_USERREQ__PRINTFBFD_RELOC_AVR_CALLBFD_RELOC_SH_GOTOFFFUNCDESCBFD_RELOC_MIPS_JMPBFD_RELOC_MICROMIPS_LITERALBFD_RELOC_SPU_IMM10BFD_RELOC_16C_IMM20_Cosf_core_structBFD_RELOC_M32R_GOTPC24BFD_RELOC_MSP430_16_BYTEBFD_RELOC_SH_TLS_TPOFF32BFD_RELOC_SCORE_CALL15lynx_core_structBFD_RELOC_PPC64_PLTGOT16_HA_oasys_dataBFD_RELOC_PPC64_PLTGOT16_HIBFD_RELOC_PPC_TLSLDarelt_dataBFD_RELOC_V850_16_GOTBFD_RELOC_PPC_JMP_SLOTBFD_RELOC_AVR_HI8_LDI_GSBFD_RELOC_NS32K_DISP_32_PCRELBFD_RELOC_ALPHA_TPREL_HI16map_headBFD_RELOC_MIPS16_GPRELBFD_RELOC_MCORE_RVABFD_ARELOC_BFIN_PUSHBFD_RELOC_IQ2000_OFFSET_16linker_has_inputBFD_RELOC_ARM_TLS_DTPOFF32BFD_RELOC_V850_32_GOT_bfd_canonicalize_dynamic_symtabBFD_RELOC_MN10300_ALIGNBFD_RELOC_SPARC_HIX22BFD_RELOC_PPC_BA16middleBFD_RELOC_68K_TLS_LDM16BFD_RELOC_TILEPRO_IMM8_Y0BFD_RELOC_TILEPRO_IMM8_Y1BFD_RELOC_ARM_TLS_TPOFF32bfd_target_ecoff_flavourBFD_RELOC_BFIN_16_LOWBFD_RELOC_PPC_LOCAL24PCBFD_RELOC_IQ2000_OFFSET_21BFD_RELOC_V850_22_PCRELBFD_RELOC_MIPS_GOT16BFD_RELOC_ARM_ALU_SB_G0BFD_RELOC_AVR_HH8_LDIkeepBFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD_bfd_set_formatBFD_RELOC_MICROBLAZE_32_LOBFD_RELOC_IA64_SEGREL64LSBBFD_RELOC_IA64_PLTOFF64IBFD_RELOC_IP2K_BANKBFD_RELOC_390_GOT64bfd_arch_pyramidBFD_RELOC_PPC_BA26plugin_dataBFD_RELOC_MICROMIPS_TLS_DTPREL_LO16BFD_RELOC_MIPS16_TLS_DTPREL_LO16BFD_RELOC_AVR_MS8_LDIBFD_RELOC_IA64_LTOFF_DTPMOD22lineno_countBFD_RELOC_MIPS16_TLS_GOTTPRELBFD_RELOC_FRV_TLSDESC_RELAXBFD_RELOC_MICROMIPS_CALL_LO16bfd_booleanBFD_RELOC_SPU_PCREL9b_core_file_pidbfd_arch_m32cBFD_RELOC_390_TLS_LDO32assertionBFD_RELOC_BFIN_GOTOFFLOBFD_RELOC_MIPS16_LO16BFD_RELOC_MEP_PCREL24A2bfd_arch_m32rBFD_RELOC_SPARC_5bfd_target_os9k_flavourBFD_RELOC_68K_TLS_LDM32BFD_RELOC_MN10300_GLOB_DATBFD_RELOC_390_GOTPLTENTBFD_RELOC_TILEGX_TLS_DTPOFF64BFD_RELOC_M32R_GOTOFFBFD_RELOC_X86_64_GOTOFF64BFD_RELOC_RX_32_OPBFD_RELOC_SH_GOT_HI16BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IEBFD_RELOC_SH_TLS_LDO_32BFD_RELOC_386_TLS_LDMBFD_RELOC_SH_GOTOFF_HI16mach_o_datasection_align_powerBFD_RELOC_NS32K_DISP_16BFD_RELOC_PPC64_PLTGOT16_LOBFD_RELOC_LO16_PLTOFFBFD_RELOC_IA64_SECREL32MSBBFD_RELOC_IA64_PCREL21BBFD_RELOC_IA64_PCREL21FBFD_RELOC_IA64_PCREL21MBFD_RELOC_390_TLS_TPOFFBFD_RELOC_IA64_DTPREL32MSBBFD_RELOC_TILEGX_TLS_TPOFF32write_armapversados_data_bfd_copy_private_symbol_dataBFD_RELOC_TILEPRO_IMM16_X0_GOT_HABFD_RELOC_TILEGX_HW0BFD_RELOC_BFIN_5_PCRELBFD_RELOC_C6000_SBR_H16_BBFD_RELOC_TILEPRO_IMM16_X0_GOT_HIBFD_RELOC_8_PLTOFFBFD_RELOC_SPARC_REGISTERBFD_RELOC_ARM_T32_IMM12BFD_RELOC_XTENSA_SLOT8_ALTBFD_RELOC_ARM_THUMB_MOVW_PCRELBFD_RELOC_C6000_SBR_H16_Wbfd_reloc_undefinedBFD_RELOC_SH_PLT_MEDHI16BFD_RELOC_D30V_15_PCREL_RBFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSETbfd_arch_lastartdataBFD_ARELOC_BFIN_ANDBFD_RELOC_NS32K_DISP_32BFD_RELOC_V850_ZDA_16_16_OFFSETBFD_RELOC_FRV_GOTOFFHIBFD_RELOC_MCORE_PCREL_IMM11BY2BFD_RELOC_TILEPRO_IMM16_X0_TLS_GDBFD_RELOC_386_TLS_DTPOFF32mach_o_fat_data_bfd_link_split_sectionBFD_RELOC_M32R_GOTPC_HI_SLOBFD_RELOC_SPU_PCREL9aBFD_RELOC_MIPS_TLS_TPREL_HI16aout_data_structBFD_RELOC_SPARC_JMP_SLOTaddendBFD_RELOC_CRX_REL16BFD_RELOC_IA64_IPLTMSBsym_ptr_ptrBFD_RELOC_IA64_REL64MSBBFD_RELOC_ARM_PCREL_CALL_bfd_get_elt_at_indexBFD_RELOC_ARM_PCREL_JUMPBFD_RELOC_TILEGX_TLS_TPOFF64BFD_RELOC_CR16_REGREL20aBFD_RELOC_CRIS_COPYBFD_RELOC_CRIS_DTPBFD_RELOC_390_TLS_GOTIE12BFD_RELOC_I370_D12openr_next_archived_file_ZNKSt15__exception_ptr13exception_ptr6_M_getEvBFD_RELOC_MIPS_HIGHERBFD_RELOC_CRX_REL24iostreamBFD_RELOC_MIPS_COPYBFD_RELOC_D30V_15BFD_RELOC_AVR_LO8_LDI_NEGBFD_RELOC_SH_DISP12BFD_RELOC_SPARC_TLS_DTPOFF32BFD_RELOC_ARM_TLS_DTPMOD32/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/util.ccBFD_RELOC_390_TLS_GOTIE20BFD_RELOC_TILEGX_IMM16_X1_HW2_PCRELbfd_arch_xtensaBFD_RELOC_XC16X_POFBFD_RELOC_SCORE_GOT_LO16BFD_RELOC_AVR_HI8_LDI_PMBFD_RELOC_CRX_REL32bout_dataBFD_RELOC_D30V_21BFD_RELOC_SPARC_JMP_IRELBFD_RELOC_CRX_REL8gc_markBFD_RELOC_IP2K_EX8DATAhas_armapBFD_RELOC_CR16_DISP16bfd_arch_msp430BFD_RELOC_ARM_GOT32BFD_RELOC_16C_NUM08_Cstab_typebfd_arch_moxie_bfd_stat_arch_eltBFD_RELOC_SH_GOT_MEDLOW16BFD_RELOC_D30V_32BFD_RELOC_SPARC_TLS_LE_LOX10BFD_RELOC_XTENSA_SLOT1_OPBFD_RELOC_SH_IMM8BFD_RELOC_SPARC_TLS_GD_HI22BFD_RELOC_FRV_GOTOFFLOBFD_RELOC_MEP_ADDR24A4BFD_RELOC_16_GOTOFFBFD_ARELOC_BFIN_LORBFD_RELOC_TILEPRO_IMM16_X0_TLS_IEBFD_RELOC_IA64_TPREL64MSB_bfd_slurp_extended_name_tableBFD_RELOC_MICROMIPS_TLS_TPREL_LO16BFD_RELOC_TILEGX_IMM16_X0_HW1_GOTBFD_RELOC_XTENSA_SLOT12_OPflagwordbfd_h_getx_signed_16BFD_RELOC_XTENSA_ASM_SIMPLIFY_bfd_final_linkbfd_arch_lm32BFD_RELOC_16C_REG14BFD_RELOC_16C_REG16BFD_RELOC_XTENSA_SLOT7_OPBFD_RELOC_CR16_DISP20BFD_RELOC_IA64_PCREL64LSBBFD_RELOC_PPC64_TPREL16_HIGHERABFD_RELOC_32_BASERELbfd_endian_bfd_lookup_section_flags__blkcnt_tBFD_ARELOC_BFIN_NEGBFD_RELOC_16C_REG20BFD_RELOC_MSP430_16_PCRELBFD_RELOC_ARM_TLS_LDM32BFD_RELOC_MIPS16_TLS_TPREL_HI16BFD_RELOC_M32C_RL_2ADDRBFD_RELOC_SH_COPY64BFD_RELOC_ARM_THUMB_IMMBFD_RELOC_MIPS16_CALL16BFD_RELOC_AVR_HI8_LDI_NEG_bfd_read_ar_hdr_fnBFD_RELOC_MEP_HI16UBFD_RELOC_68K_TLS_LDO16BFD_RELOC_390_TLS_GOTIE64bfd_h_getx_signed_32BFD_RELOC_68K_RELATIVEBFD_RELOC_PPC64_TPREL16_HIGHESTBFD_RELOC_IA64_DTPMOD64LSBBFD_RELOC_PPC_GOT_TLSGD16_HABFD_RELOC_PPC_GOT_TLSGD16_HIBFD_RELOC_TILEGX_MF_IMM14_X1BFD_RELOC_M32R_GOTOFF_LOBFD_RELOC_NS32K_DISP_16_PCRELBFD_RELOC_SH_LOOP_ENDBFD_RELOC_TILEPRO_IMM16_X0BFD_RELOC_16C_DISP04_CBFD_RELOC_MACH_O_X86_64_BRANCH8BFD_RELOC_16C_DISP24a_CfrozenBFD_RELOC_MICROMIPS_GOT_HI16BFD_RELOC_X86_64_IRELATIVEBFD_RELOC_SPARC_IRELATIVE__virtual_maskBFD_RELOC_ARM_THUMB_OFFSETBFD_RELOC_IA64_SEGREL32LSBBFD_RELOC_D30V_6BFD_RELOC_XTENSA_SLOT8_OPbfd_signed_vmaBFD_RELOC_ARM_CP_OFF_IMMBFD_RELOC_XTENSA_SLOT10_ALTbfd_reloc_notsupportedhighBFD_RELOC_ARM_ALU_PC_G0BFD_RELOC_ARM_ALU_PC_G1BFD_RELOC_ARM_ALU_PC_G2BFD_RELOC_386_TLS_DTPMOD32bfd_arch_h8500BFD_RELOC_XTENSA_SLOT2_ALTBFD_RELOC_68K_TLS_LDO32_bfd_link_hash_table_freeBFD_RELOC_X86_64_COPYBFD_RELOC_32_GOT_PCRELBFD_RELOC_CRX_ABS16mtimeBFD_RELOC_SCORE_DUMMY2bfd_arch_microblazeBFD_RELOC_VAX_JMP_SLOTBFD_RELOC_ALPHA_DTPREL_HI16BFD_RELOC_CTORBFD_RELOC_UNUSEDBFD_RELOC_CRIS_LAPCQ_OFFSETbfd_arch_mipsBFD_RELOC_860_HIGOTBFD_RELOC_BFIN_4_PCRELBFD_ARELOC_BFIN_LANDBFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCRELBFD_RELOC_D30V_9_PCRELBFD_RELOC_V850_SDA_15_16_OFFSETBFD_RELOC_ARM_ADRL_IMMEDIATEBFD_RELOC_FRV_TLSMOFFbfd_arch_mtbfd_h_getx_signed_64bits_per_byteBFD_RELOC_ARM_LDRS_PC_G1BFD_RELOC_ARM_LDRS_PC_G2bfd_arch_frv_section_already_linkedcomplain_overflowBFD_RELOC_H8_DIR32A16BFD_RELOC_TILEPRO_IMM16_X0_GOTBFD_RELOC_SPARC_TLS_DTPMOD32BFD_RELOC_PPC_GOT_TPREL16_HIBFD_RELOC_MIPS_REL16elf_obj_tdataBFD_RELOC_C6000_PCR_S7_bfd_canonicalize_relocsom_data_structBFD_RELOC_BFIN_12_PCREL_JUMPcompare_symbolBFD_RELOC_CRX_ABS32BFD_RELOC_MICROMIPS_HIGHERBFD_RELOC_MIPS_SCN_DISPoperator boolBFD_RELOC_ARM_ALU_SB_G0_NCBFD_RELOC_MIPS_GOT_LO16BFD_RELOC_M32R_HI16_ULObfd_arch_tilegxBFD_ENDIAN_UNKNOWNBFD_RELOC_8_PCRELBFD_RELOC_SH_JMP_SLOT64BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GDBFD_RELOC_PPC_GOT_TLSGD16_LOBFD_RELOC_ARM_GOTOFFBFD_RELOC_IA64_IMM14nullptr_tBFD_RELOC_32_PLTOFFBFD_RELOC_SPARC_H44BFD_RELOC_BFIN_PLTPCBFD_RELOC_860_SPLIT0BFD_RELOC_860_SPLIT1BFD_RELOC_IP2K_LO8INSNBFD_RELOC_PPC_RELATIVEBFD_RELOC_H8_DIR16R8BFD_RELOC_XTENSA_SLOT9_ALTBFD_RELOC_SPU_HI16BFD_RELOC_VTABLE_INHERITbfd_target_oasys_flavourBFD_RELOC_FRV_GPRELU12ihex_data_structBFD_RELOC_16_BASERELbfd_target_aout_flavourBFD_RELOC_IA64_IMM22BFD_RELOC_RX_GPRELBbfd_arch_pjBFD_RELOC_MEP_8BFD_RELOC_ARM_LDR_PC_G0_ZNKSt15__exception_ptr13exception_ptrcvbEvBFD_RELOC_X86_64_GOTPC32_TLSDESCBFD_RELOC_ARC_B22_PCRELBFD_RELOC_X86_64_TLSGDBFD_RELOC_TILEGX_IMM16_X1_HW1_PCRELBFD_RELOC_SPARC_TLS_DTPMOD64use_rela_pBFD_RELOC_390_TLS_IE32BFD_RELOC_MIPS_CALL_HI16BFD_RELOC_IA64_REL32MSBBFD_RELOC_SH_GOTPLT_HI16BFD_RELOC_16C_DISP04BFD_RELOC_XTENSA_GLOB_DATBFD_RELOC_IA64_PLTOFF64MSBBFD_RELOC_16C_DISP08BFD_RELOC_M68HC11_PAGEBFD_RELOC_SPARC_TLS_LE_HIX22BFD_RELOC_C6000_SBR_GOT_H16_WBFD_RELOC_PPC_TOC16BFD_RELOC_ALPHA_TPREL_LO16match_prioritytrad_core_structarchive_passmatchingBFD_RELOC_PPC_GOT_TPREL16_LOBFD_RELOC_M32R_HI16_SLO_bfd_free_cached_infoBFD_RELOC_FRV_TLSMOFFHIBFD_RELOC_16C_REG04a_CBFD_RELOC_ALPHA_TLSLDMBFD_RELOC_CRIS_32_GD_bfd_get_synthetic_symtabBFD_RELOC_SH_TLS_LD_32bfd_h_putx32bfd_arch_we32kBFD_RELOC_16C_DISP16ar_pad_charbfd_arch_rxBFD_RELOC_CRIS_32_PLT_PCRELbfd_print_symbol_more_bfd_is_group_sectionreloc_cache_entryBFD_RELOC_MMIX_CBRANCH_1BFD_RELOC_390_TLS_GD32symvalueBFD_RELOC_FRV_GOTTLSDESCHIBFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GDbfd_print_symbol_namebfd_arch_shBFD_RELOC_M32C_RL_JUMPBFD_RELOC_MT_PC16BFD_RELOC_ARM_SBREL32BFD_RELOC_16C_DISP24BFD_RELOC_ARM_PCREL_BRANCHBFD_RELOC_SH_IMMS10BFD_RELOC_D30V_32_PCRELBFD_RELOC_TILEGX_IMM8_X1BFD_RELOC_SH_IMMS16bfd_arch_i370BFD_RELOC_MSP430_16_PCREL_BYTEhppabsd_core_data_get_reloc_upper_boundbfd_arch_openriscused_by_bfdBFD_RELOC_390_TLS_IE64BFD_RELOC_SPARC_TLS_LDM_ADDBFD_RELOC_CRIS_32_IEBFD_RELOC_TIC30_LDPcomplain_overflow_signedBFD_RELOC_SH_DISP20BY8BFD_RELOC_SH_GLOB_DATBFD_RELOC_16C_IMM24_CBFD_RELOC_SPARC_TLS_TPOFF32BFD_RELOC_TILEPRO_IMM16_X0_GOT_LOBFD_RELOC_H8_DIR16A8bfd_arch_i386BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IEmmo_data_structBFD_RELOC_M68HC11_RL_GROUPBFD_RELOC_CR16_GOTC_REGREL20BFD_RELOC_IA64_DIR64LSBbfd_arch_sparcBFD_RELOC_X86_64_TPOFF32BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IEbfd_h_putx64BFD_RELOC_IA64_PCREL32LSBBFD_RELOC_FRV_LABEL16BFD_RELOC_386_TLS_DESC_CALLBFD_RELOC_BFIN_24_PCREL_CALL_XBFD_RELOC_LM32_CALLBFD_RELOC_386_GOTOFFBFD_RELOC_TILEGX_IMM8_Y0BFD_RELOC_MIPS_INSERT_ABFD_RELOC_MIPS_INSERT_BBFD_RELOC_SH_GOT10BY4BFD_RELOC_X86_64_TLSLDBFD_RELOC_SH_GOT10BY8moving_line_fileposis_funcBFD_RELOC_SPU_IMM16BFD_RELOC_SPU_IMM18BFD_RELOC_390_TLS_GD64BFD_RELOC_IA64_DTPREL64LSBBFD_RELOC_HI16_S_GOTOFFbfd_int64_tbfd_target_sym_flavourBFD_RELOC_FRV_TLSMOFFLOBFD_RELOC_FRV_LABEL24BFD_RELOC_TILEGX_HW2_LASTBFD_RELOC_SPARC_RELATIVEBFD_RELOC_Z8K_DISP7BFD_RELOC_386_GOT32BFD_RELOC_ARM_MULTIBFD_RELOC_ARM_THUMB_MOVTBFD_RELOC_IA64_DTPMOD64MSBBFD_RELOC_ARM_THUMB_MOVWBFD_RELOC_TILEPRO_MMSTART_X0BFD_RELOC_TILEPRO_MMSTART_X1st_nlinkBFD_RELOC_MEP_PCREL12A2hmax__offset_flagsBFD_RELOC_FRV_GOTTLSDESCLOoasys_obj_dataBFD_RELOC_SPARC_PLT32BFD_RELOC_HI16_PLTOFFBFD_ARELOC_BFIN_COMPBFD_RELOC_V850_16_S1BFD_RELOC_SPARC_TLS_TPOFF64BFD_RELOC_TILEPRO_IMM16_X1_GOTBFD_RELOC_MIPS16_GOT16addr2symbol_bfd_copy_private_bfd_dataBFD_RELOC_MSP430_16BFD_RELOC_386_RELATIVEBFD_RELOC_MACH_O_X86_64_GOT_LOADlinker_markBFD_RELOC_TILEGX_IMM16_X1_HW0_LASTverilog_dataBFD_RELOC_X86_64_TPOFF64BFD_RELOC_IA64_PCREL60BBFD_RELOC_PPC_GOT_TLSLD16BFD_RELOC_VAX_GLOB_DATBFD_RELOC_390_PLT32BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2BFD_RELOC_MIPS_TLS_TPREL_LO16BFD_RELOC_V850_TDA_4_5_OFFSETBFD_RELOC_X86_64_RELATIVEstart_addressbfd_pef_data_struct_M_releaseBFD_RELOC_16C_ABS20_CBFD_RELOC_ARM_V4BXBFD_RELOC_IP2K_TEXTBFD_RELOC_ALPHA_HINTBFD_RELOC_TILEPRO_IMM16_X0_LO_PCRELBFD_RELOC_MICROBLAZE_32_RWSDABFD_RELOC_TILEGX_COPYBFD_RELOC_390_GOTPCBFD_RELOC_CR16_NUM8BFD_RELOC_TILEGX_IMM16_X0_HW0_LASTBFD_RELOC_SPARC_TLS_IE_HI22BFD_RELOC_860_HIGHADJBFD_RELOC_32_PCRELsection_flag_infoBFD_RELOC_SPARC_TLS_LDM_HI22_bfd_gc_sectionsBFD_RELOC_ARM_ALU_PC_G0_NCBFD_RELOC_SPARC_PLT64BFD_RELOC_SPARC13namidxBFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HIBFD_RELOC_MMIX_JMPBFD_RELOC_SPARC_GOTDATA_OPBFD_RELOC_SH_COUNTBFD_RELOC_TILEPRO_MMEND_X1bfd_arch_spuBFD_RELOC_C6000_JUMP_SLOTBFD_RELOC_SPARC_TLS_GD_LO10BFD_RELOC_IA64_LTOFF_FPTR32MSBBFD_RELOC_TILEPRO_IMM16_X1BFD_RELOC_IA64_TPREL64IBFD_RELOC_TILEGX_IMM16_X0_HW2_GOTBFD_RELOC_TILEPRO_IMM8_X0BFD_RELOC_TILEPRO_IMM8_X1BFD_RELOC_BFIN_GOTLObfd_flavourBFD_RELOC_SPARC22BFD_RELOC_390_PLT64BFD_RELOC_SPARC_GOTDATA_HIX22BFD_RELOC_TILEGX_IMM16_X0_HW1_LASTlast_coredumpBFD_RELOC_MICROMIPS_16_PCREL_S1BFD_RELOC_IA64_LTV64MSBBFD_RELOC_IP2K_ADDR16CJPBFD_RELOC_CR16_ABS20bfd_arch_v850BFD_RELOC_CR16_ABS24BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL__unusedBFD_RELOC_CR16_IMM4BFD_RELOC_MT_LO16BFD_RELOC_V850_CALLT_16_16_OFFSETBFD_ENDIAN_LITTLEBFD_RELOC_386_TLS_DESCBFD_RELOC_M32R_26_PCRELBFD_RELOC_SPARC_GOTDATA_LOX10bfd_pef_xlib_data_structBFD_RELOC_C6000_DSBT_INDEXBFD_RELOC_ALPHA_GPREL_HI16BFD_RELOC_IA64_LTOFF_FPTR64Iconstructor_chainBFD_RELOC_MCORE_PCREL_IMM8BY4BFD_RELOC_VPE4KMATH_DATABFD_RELOC_390_GLOB_DATBFD_RELOC_XSTORMY16_REL_12BFD_RELOC_SCORE_BCMPbfd_arch_mmix_ZNK10__cxxabiv122__base_class_type_info8__offsetEvBFD_RELOC_BFIN_FUNCDESC_GOTOFFHIBFD_RELOC_VTABLE_ENTRYBFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HAsymbol_leading_charBFD_RELOC_24_PLT_PCRELBFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HIBFD_RELOC_RX_DIR3U_PCRELBFD_RELOC_16C_NUM16BFD_RELOC_TILEGX_MMSTART_X0BFD_RELOC_NS32K_IMM_8_PCRELBFD_RELOC_MIPS16_TLS_TPREL_LO16BFD_RELOC_PPC64_HIGHESTBFD_RELOC_MIPS_TLS_DTPREL32no_exportBFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOTBFD_RELOC_16C_DISP24aBFD_RELOC_386_TLS_TPOFFBFD_RELOC_M32R_COPYBFD_RELOC_860_HAPCBFD_RELOC_MIPS_DELETEBFD_RELOC_VAX_RELATIVEBFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LOBFD_RELOC_PPC_TPRELBFD_RELOC_XTENSA_SLOT11_ALTBFD_RELOC_XTENSA_DIFF8_bfd_make_empty_symbolst_uidBFD_RELOC_8_BASERELBFD_RELOC_SH_TLS_DTPOFF32BFD_RELOC_XTENSA_SLOT3_ALTBFD_RELOC_TILEPRO_MMEND_X0BFD_RELOC_SH_FUNCDESCBFD_RELOC_860_LOGOTOFF3BFD_RELOC_XTENSA_TLSDESC_ARGdynsymcount_bfd_window_internalelf_obj_dataBFD_RELOC_C6000_PCR_H16BFD_RELOC_MICROMIPS_GOT_LO16BFD_RELOC_MIPS_GOT_HI16bfd_arch_tahoeBFD_RELOC_CRIS_32_GOTBFD_RELOC_SCORE16_JMPBFD_RELOC_TILEGX_IMM16_X0_HW1_PCRELBFD_RELOC_16C_REG14_C_ZNK10__cxxabiv122__base_class_type_info13__is_public_pEv_bfd_copy_private_header_dataBFD_RELOC_16C_NUM32BFD_RELOC_MSP430_RL_PCRELBFD_RELOC_FR30_9_PCRELBFD_RELOC_SH_SHMEDIA_CODEBFD_RELOC_MEP_UIMM24__ino_tasectionBFD_RELOC_390_PLTOFF16BFD_RELOC_860_HAGOTOFFBFD_RELOC_8BFD_RELOC_ALPHA_DTPREL_LO16BFD_RELOC_SPU_IMM7BFD_RELOC_SPU_IMM8BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GDBFD_RELOC_ALPHA_TLSGDBFD_RELOC_MIPS16_JMPBFD_RELOC_MIPS_TLS_DTPREL64BFD_RELOC_CRIS_32_GOT_TPRELbfd_directionBFD_RELOC_AVR_HH8_LDI_PM__class_type_infokept_sectionBFD_RELOC_68K_TLS_LDM8BFD_RELOC_SH_GOTPLT_MEDLOW16mach_o_data_structBFD_RELOC_RX_8UBFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LOecoff_obj_dataBFD_RELOC_XTENSA_SLOT6_OPBFD_RELOC_ARM_THUMB_MOVT_PCRELBFD_RELOC_SPARC_LOX10BFD_RELOC_MMIX_JMP_1BFD_RELOC_V850_32_PLT_PCRELBFD_RELOC_SPARC_OLO10BFD_RELOC_MIPS_TLS_DTPMOD32BFD_RELOC_390_PLTOFF32BFD_RELOC_IA64_SECREL64LSBBFD_RELOC_TILEPRO_IMM16_X1_TLS_GDBFD_RELOC_RX_ABS16_REVBFD_RELOC_SH_GOTPC_HI16abfdbfd_target_elf_flavourBFD_RELOC_D30V_9_PCREL_RBFD_RELOC_16C_DISP08_CBFD_RELOC_X86_64_GOTPC32BFD_RELOC_SH_GOTOFF_MEDLOW16BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IEBFD_RELOC_CRX_IMM32BFD_RELOC_ARM_SHIFT_IMMBFD_RELOC_ALPHA_ELF_LITERALhpux_core_dataBFD_RELOC_FRV_FUNCDESC_GOT12BFD_RELOC_ARM_PLT32BFD_RELOC_MACH_O_X86_64_GOTframenoBFD_RELOC_RX_24_OPBFD_RELOC_SPU_LO16BFD_RELOC_68K_TLS_LDO8bfd_reloc_dangerousBFD_RELOC_390_PC16DBLBFD_RELOC_V850_17_PCRELBFD_RELOC_RX_ABS16ULBFD_RELOC_386_TLS_GOTIEBFD_RELOC_RX_ABS16UWBFD_RELOC_CR16_NUM16alternative_targetBFD_RELOC_SH_CODEBFD_RELOC_390_TLS_LE32BFD_RELOC_TILEGX_TLS_DTPOFF32BFD_RELOC_SH_RELATIVE64BFD_RELOC_TILEPRO_IMM16_X1_TLS_IEBFD_RELOC_MMIX_ADDR19bfd_target_som_flavour_M_getBFD_RELOC_AVR_HI8_LDIBFD_RELOC_ARM_GOTPCBFD_RELOC_DLX_HI16_Scisco_core_structBFD_RELOC_BFIN_GOTHIbfd_target_mach_o_flavourBFD_RELOC_SH_GOTPLT10BY4BFD_RELOC_SH_GOT20BFD_RELOC_SH_PT_16BFD_RELOC_SH_GOTPLT10BY8_bfd_link_add_symbolsBFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GDBFD_RELOC_SPARC_TLS_GD_CALLBFD_RELOC_MIPS_CALL_LO16BFD_RELOC_SH_LABELBFD_RELOC_MIPS_TLS_DTPMOD64BFD_RELOC_390_PLTOFF64compress_statusbfd_iovecBFD_RELOC_V850_SDA_16_16_OFFSETBFD_ENDIAN_BIGBFD_RELOC_IA64_DIR32LSBBFD_RELOC_LM32_GLOB_DATBFD_RELOC_PPC64_TPREL16_HIGHERBFD_RELOC_FRV_GOT12BFD_RELOC_X86_64_GOTPC64BFD_RELOC_CR16_NUM32_bfd_get_dynamic_reloc_upper_boundBFD_RELOC_PPC64_DTPREL16_DSBFD_RELOC_ALPHA_LDABFD_RELOC_MN10300_GOTOFF24section_htab_bfd_define_common_symbolsymbols_load_bfd_is_target_special_symbolBFD_RELOC_MCORE_PCREL_32BFD_RELOC_Z8K_IMM4LBFD_RELOC_16C_NUM16_Cbfd_arch_powerpcBFD_RELOC_XTENSA_DIFF16BFD_RELOC_V850_ALIGNBFD_RELOC_SPARC_L44BFD_RELOC_V850_32_GOTOFFBFD_RELOC_V850_CODEBFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IEBFD_RELOC_390_TLS_LE64BFD_RELOC_ARM_CP_OFF_IMM_S2BFD_RELOC_LM32_GOTOFF_HI16lru_nextBFD_RELOC_16_PCRELBFD_RELOC_PPC_GOT_DTPREL16BFD_RELOC_IP2K_FR_OFFSETalentbfd_arch_tileproBFD_RELOC_CRIS_32_DTPRELBFD_RELOC_CRIS_32_GOTRELusrdatarightshiftBFD_RELOC_CRIS_32_GOTPLTbfd_arch_cr16BFD_RELOC_IA64_LTV32MSBBFD_RELOC_ARM_OFFSET_IMM8target_indexBFD_RELOC_BFIN_16_IMMBFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GDbfd_arch_mn10300BFD_RELOC_860_COPYBFD_RELOC_XTENSA_DIFF32BFD_RELOC_PPC64_TPREL16_HIGHESTABFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCRELrel_fileposBFD_RELOC_I960_CALLJst_atimBFD_RELOC_ARM_IMMEDIATEBFD_RELOC_ARM_T32_OFFSET_U8BFD_RELOC_CR16_NUM32a_bfd_discard_groupBFD_RELOC_ARM_T32_IMMEDIATE_bfd_get_section_contentsBFD_RELOC_SPARC_WDISP16printable_nameBFD_RELOC_TILEPRO_TLS_DTPOFF32_bfd_get_dynamic_symtab_upper_boundBFD_RELOC_SH_GOT_MEDHI16_bfd_slurp_armapbfd_arch_m98kBFD_RELOC_SH_GOTPC_MEDHI16BFD_RELOC_860_SPLIT2__offsetBFD_RELOC_16C_ABS24_Cclose_all_xcptBFD_RELOC_FRV_FUNCDESC_GOTOFFLOBFD_RELOC_HI16_PCRELBFD_RELOC_SPARC_10BFD_RELOC_SPARC_11BFD_RELOC_V850_RELATIVEBFD_RELOC_CR16_SWITCH8bfd_arch_hppaBFD_RELOC_SPARC_PC_LM22BFD_RELOC_SPARC_WDISP22BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE__cxa_exception_typebitsizeBFD_RELOC_SH_IMM3UBFD_RELOC_TILEPRO_COPYBFD_RELOC_XTENSA_SLOT11_OPBFD_RELOC_ARM_T32_ADD_IMMBFD_RELOC_BFIN_24_PCREL_JUMP_Lbfd_arch_cr16cBFD_RELOC_386_TLS_LDO_32BFD_RELOC_PPC64_ADDR16_LO_DSbfd_putx64xcoff_tdataBFD_RELOC_V850_16_GOTOFFBFD_RELOC_HI16_BASERELBFD_RELOC_D30V_15_PCRELBFD_RELOC_MICROMIPS_HI16outsymbolsBFD_RELOC_TILEPRO_IMM16_X0_HA_PCRELBFD_RELOC_TILEPRO_JOFFLONG_X1BFD_RELOC_TILEPRO_GLOB_DATBFD_RELOC_SH_SWITCH16opened_onceBFD_RELOC_PPC64_TPREL16_LO_DSBFD_RELOC_SCORE16_BRANCHBFD_RELOC_CR16_REGREL0bfd_reloc_continuesymbol_tableBFD_RELOC_CR16_REGREL4BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOTBFD_RELOC_SPU_IMM10WBFD_RELOC_ARM_LDRS_PC_G0BFD_RELOC_TILEGX_TLS_DTPMOD32user_set_vmaBFD_RELOC_SH_PCRELIMM8BY2BFD_RELOC_SH_PCRELIMM8BY4bfd_arch_ia64BFD_RELOC_IA64_PLTOFF22BFD_RELOC_SPARC_TLS_IE_LO10_bfd_write_ar_hdr_fnbfd_arch_s390BFD_RELOC_PPC_EMB_NADDR16print_backtraceBFD_RELOC_IA64_SEGREL32MSBBFD_RELOC_C6000_PCR_S10BFD_RELOC_C6000_PCR_S12object_flagsBFD_RELOC_860_JUMP_SLOTbfd_arch_arcBFD_RELOC_SH_ALIGNBFD_RELOC_HI16_S_PCRELbfd_arch_armBFD_ARELOC_BFIN_HWPAGEBFD_RELOC_MIPS_JALRBFD_RELOC_SH_SWITCH32BFD_RELOC_NS32K_IMM_16BFD_RELOC_C6000_PCR_S21BFD_RELOC_IA64_LTOFF22XBFD_RELOC_TILEGX_IMM16_X0_HW3_GOTBFD_RELOC_SPARC_TLS_IE_ADDBFD_RELOC_390_TLS_LDO64BFD_RELOC_TILEPRO_IMM16_X1_HAdecltype(nullptr)BFD_RELOC_TILEPRO_IMM16_X1_HIBFD_RELOC_AVR_13_PCRELBFD_RELOC_ARM_LDR_SB_G0BFD_RELOC_ARM_LDR_SB_G1BFD_RELOC_ARM_LDR_SB_G2BFD_RELOC_X86_64_JUMP_SLOTsymbol_ptr_ptrsec_info_typeBFD_RELOC_PPC64_PLTGOT16_LO_DSBFD_RELOC_PPC_EMB_NADDR32BFD_RELOC_PPC_EMB_SDAI16bfd_target_ovax_flavourBFD_RELOC_TILEGX_JUMPOFF_X1_PLT_bfd_print_private_bfd_dataBFD_RELOC_390_TLS_GDCALLBFD_RELOC_FR30_8_IN_8BFD_RELOC_XTENSA_SLOT4_OPBFD_RELOC_SH_GOTFUNCDESC20BFD_RELOC_TILEGX_TLS_DTPMOD64BFD_RELOC_860_GLOB_DAT_bfd_set_arch_machBFD_RELOC_FRV_GOTTLSOFF12BFD_RELOC_CRIS_16_GOTBFD_RELOC_SPARC_COPYBFD_RELOC_NS32K_IMM_32BFD_RELOC_PPC_EMB_RELSEC16arch_namepc_relativeBFD_RELOC_TILEPRO_SHAMT_X0BFD_RELOC_TILEPRO_SHAMT_X1BFD_RELOC_MN10300_JMP_SLOTBFD_RELOC_AVR_HH8_LDI_PM_NEGreloc_count_new_section_hookBFD_RELOC_MT_PCINSN8BFD_RELOC_MIPS_TLS_GOTTPRELpcrel_offsetBFD_RELOC_SH_COPYBFD_RELOC_XTENSA_OP0BFD_RELOC_PPC_TPREL16nofileBFD_RELOC_FRV_GPREL12BFD_RELOC_SPARC_UA16BFD_RELOC_64_PLT_PCREL_core_file_matches_executable_pBFD_RELOC_ALPHA_GPREL_LO16ufile_ptrBFD_RELOC_TILEPRO_SHAMT_Y0BFD_RELOC_TILEPRO_SHAMT_Y1BFD_RELOC_32_SECRELBFD_RELOC_860_PLT26BFD_RELOC_BFIN_FUNCDESC_VALUEBFD_RELOC_MN10300_SYM_DIFF_M_addrefBFD_RELOC_TILEPRO_TLS_DTPMOD32bfd_arch_avrBFD_RELOC_ALPHA_GPDISPBFD_RELOC_XTENSA_SLOT12_ALTneedleBFD_RELOC_C6000_PREL31BFD_RELOC_386_PLT32BFD_RELOC_M32R_SDA16BFD_RELOC_SPARC_TLS_IE_LDXBFD_RELOC_XTENSA_SLOT4_ALTbackend_databfd_target_msdos_flavourBFD_RELOC_TILEPRO_IMM16_X1_PCRELBFD_RELOC_PPC_EMB_BIT_FLDBFD_RELOC_SPU_IMM16W_Z14compare_symbolPKvS0_BFD_RELOC_BFIN_GOTOFF17M4BFD_RELOC_16_GOT_PCRELBFD_RELOC_TILEPRO_IMM16_X1_GOT_HABFD_RELOC_MMIX_CBRANCHBFD_RELOC_TILEPRO_IMM16_X1_LOBFD_RELOC_TILEPRO_IMM16_X1_GOT_HIBFD_RELOC_C6000_FPHEADBFD_RELOC_16_PLTOFFBFD_RELOC_AVR_6BFD_RELOC_SPARC_UA32relent_chainBFD_RELOC_TILEGX_JMP_SLOTBFD_RELOC_IP2K_LO8DATABFD_RELOC_Z8K_CALLR__exception_ptrBFD_RELOC_SPARC_7BFD_RELOC_ARM_IRELATIVEBFD_RELOC_SH_IMM8BY4BFD_RELOC_RX_NEG16BFD_RELOC_IA64_FPTR64MSBBFD_RELOC_16_PCREL_S2BFD_RELOC_V850_COPYBFD_RELOC_SPARC_BASE13__blksize_tieee_data_structBFD_RELOC_HI16BFD_RELOC_ARM_RELATIVEboth_directionBFD_RELOC_TILEPRO_JMP_SLOTbfd_getx_signed_16osf_core_dataBFD_RELOC_TILEGX_MT_IMM14_X1BFD_RELOC_IA64_GPREL32MSBBFD_RELOC_X86_64_GOTPLT64bfd_arch_d10vBFD_RELOC_PPC_GOT_DTPREL16_HABFD_RELOC_386_GOTPCBFD_RELOC_PPC_GOT_DTPREL16_HIBFD_RELOC_BFIN_GOT17M4BFD_RELOC_RX_NEG24BFD_RELOC_IA64_LTOFF_TPREL22BFD_RELOC_CRX_REGREL12BFD_RELOC_D10V_18BFD_RELOC_PPC_DTPREL16BFD_RELOC_SPARC_BASE22BFD_RELOC_PPC_B16_BRNTAKENBFD_RELOC_386_TLS_GOTDESCBFD_RELOC_HI22BFD_RELOC_NS32K_DISP_8_PCREL_oasys_ar_dataBFD_RELOC_CRIS_GLOB_DATst_blksizeBFD_ARELOC_BFIN_LENBFD_RELOC_ALPHA_DTPREL16BFD_RELOC_BFIN_FUNCDESC_GOTHIBFD_RELOC_SH_USESBFD_RELOC_RX_NEG32BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GDBFD_RELOC_CRX_REGREL22pef_dataBFD_RELOC_CRX_REGREL28BFD_RELOC_68K_TLS_IE16bfd_getx_signed_32BFD_RELOC_SPARC_UA64_bfd_sizeof_headersarchive_headBFD_RELOC_SPARC_GOTDATA_OP_LOX10bfd_arch_i960BFD_RELOC_CRX_REGREL32sec_ptrBFD_RELOC_MSP430_2X_PCRELxcoff_obj_dataBFD_RELOC_CRIS_DTPMODBFD_RELOC_XTENSA_TLS_FUNCBFD_RELOC_TILEPRO_IMM16_X1_GOT_LOBFD_RELOC_CRX_SWITCH8_bfd_check_formatBFD_RELOC_X86_64_GLOB_DATsco5_core_structBFD_RELOC_DLX_LO16BFD_RELOC_SPU_ADD_PICBFD_RELOC_MMIX_PUSHJ_3BFD_RELOC_XSTORMY16_12BFD_RELOC_FRV_FUNCDESC_VALUEBFD_RELOC_GPREL16BFD_RELOC_SH_DISP12BY4BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IEBFD_RELOC_SH_DISP12BY8BFD_RELOC_68K_TLS_GD16BFD_RELOC_SPARC_TLS_LDM_CALLBFD_RELOC_MIPS_TLS_LDMBFD_RELOC_68K_TLS_IE32BFD_RELOC_TILEGX_MMEND_X0BFD_RELOC_MIPS_HIGHESTBFD_RELOC_MIPS_JUMP_SLOTuvalBFD_RELOC_PPC_B16_BRTAKENBFD_RELOC_XSTORMY16_24BFD_RELOC_PPC_GOT_DTPREL16_LOBFD_RELOC_RX_24UBFD_RELOC_BFIN_12_PCREL_JUMP_SBFD_RELOC_TIC54X_PARTMS9_M_exception_objectBFD_RELOC_M32R_LO16_bfd_truncate_arnamebfd_getx_signed_64BFD_RELOC_SPARC_PC_HM10BFD_RELOC_MN10300_32_PCRELBFD_RELOC_XTENSA_TLS_ARGBFD_RELOC_V850_SDA_16_16_SPLIT_OFFSETbfd_target_evax_flavourBFD_RELOC_PPC_DTPREL16_LOBFD_RELOC_IA64_SECREL32LSBBFD_RELOC_GPREL32BFD_RELOC_BFIN_FUNCDESC_GOTLOBFD_RELOC_SPARC_TLS_GD_ADDBFD_RELOC_M32R_10_PCRELBFD_RELOC_68K_TLS_GD32bfd_arch_crxBFD_RELOC_IA64_DTPREL32LSBBFD_RELOC_C6000_ABS_H16BFD_RELOC_TILEGX_HW1BFD_RELOC_TILEGX_HW2BFD_RELOC_TILEGX_HW3howtoBFD_RELOC_ARM_ROSEGREL32BFD_RELOC_CRX_NUM16BFD_RELOC_SH_DATAst_rdevbfd_arch_convexBFD_RELOC_ALPHA_DTPREL64BFD_RELOC_BFIN_11_PCRELBFD_RELOC_SPARC_TLS_LDO_ADDBFD_RELOC_386_IRELATIVEBFD_RELOC_C6000_SBR_U15_BBFD_RELOC_PDP11_DISP_6_PCRELBFD_RELOC_C6000_SBR_U15_H_core_file_failing_commandBFD_RELOC_TILEGX_IMM16_X1_HW1_GOTbfd_arch_h8300_bfd_canonicalize_symtabBFD_RELOC_PPC_DTPRELBFD_RELOC_C6000_SBR_U15_Worelocationcomplain_overflow_bitfield_close_and_cleanupBFD_RELOC_LM32_BRANCHBFD_RELOC_FRV_FUNCDESC_GOTHImap_tailbfd_sym_data_structar_max_namelenBFD_RELOC_ALPHA_TPREL16BFD_RELOC_MMIX_JMP_2BFD_RELOC_MMIX_JMP_3alignment_powerBFD_RELOC_PPC64_TOCBFD_RELOC_IA64_FPTR64IBFD_RELOC_CRIS_16_GOT_TPREL_get_linenosco5_core_dataBFD_RELOC_SPARC_WPLT30BFD_RELOC_CRX_NUM32BFD_RELOC_X86_64_DTPOFF32BFD_RELOC_860_LOGOT0BFD_RELOC_THUMB_PCREL_BRANCH12bfd_hash_entryBFD_RELOC_CRX_SWITCH32BFD_RELOC_C6000_COPYbfd_objectBFD_RELOC_MEP_GNU_VTENTRYBFD_RELOC_ARM_TLS_CALLBFD_RELOC_68K_TLS_LE8st_ctimBFD_RELOC_IA64_PCREL21BIBFD_RELOC_IA64_REL64LSBbfd_arch_m68hc11bfd_arch_m68hc12BFD_RELOC_Z80_DISP8BFD_RELOC_ARC_B26segment_markBFD_RELOC_V850_DATABFD_RELOC_TILEPRO_IMM16_X1_LO_PCRELBFD_RELOC_THUMB_PCREL_BRANCH20BFD_RELOC_MIPS_TLS_GDBFD_RELOC_M32R_GOT16_LOBFD_RELOC_THUMB_PCREL_BRANCH23nlm_obj_tdataBFD_RELOC_THUMB_PCREL_BRANCH25BFD_RELOC_IP2K_PAGE3stack_bottomtekhex_data_structBFD_RELOC_CRIS_32_PLT_GOTRELbfd_arch_bfinBFD_RELOC_C6000_ABS_S16BFD_RELOC_ALPHA_NOPbfd_arch_fr30BFD_RELOC_IP2K_PC_SKIPBFD_RELOC_MICROMIPS_TLS_LDMBFD_RELOC_MICROMIPS_GOT_DISPBFD_RELOC_MICROMIPS_HIGHESTBFD_RELOC_MICROMIPS_10_PCREL_S1__hwm_bitBFD_RELOC_XTENSA_OP1BFD_RELOC_XTENSA_OP2trad_core_databfd_arch_scoreBFD_RELOC_ARM_MOVW_PCRELBFD_RELOC_NS32K_IMM_8bfd_target_unknown_flavourBFD_RELOC_CRIS_32_GOT_GDBFD_RELOC_ALPHA_DTPMOD64BFD_RELOC_SH_IMM_MEDLOW16_PCRELBFD_RELOC_386_TLS_IE_32BFD_ARELOC_BFIN_RSHIFTBFD_RELOC_XTENSA_SLOT14_OPBFD_RELOC_OPENRISC_REL_26BFD_RELOC_ARM_T32_OFFSET_IMMBFD_RELOC_SH_GLOB_DAT64BFD_RELOC_MMIX_GETA_1BFD_RELOC_MMIX_GETA_2BFD_RELOC_MMIX_GETA_3BFD_RELOC_AVR_MS8_LDI_NEGBFD_RELOC_XTENSA_RTLDBFD_RELOC_X86_64_DTPOFF64BFD_RELOC_NS32K_IMM_16_PCRELBFD_RELOC_SPARC_WDISP19BFD_RELOC_SPARC_LM22BFD_RELOC_FRV_FUNCDESC_GOTLO_core_file_failing_signalBFD_RELOC_MEP_LOW16BFD_RELOC_IA64_COPYBFD_RELOC_HI16_SBFD_RELOC_MN10300_COPYBFD_RELOC_DLX_JMP26BFD_RELOC_MICROMIPS_LO16pef_xlib_dataBFD_RELOC_SPARC_TLS_LDO_LOX10BFD_RELOC_IA64_TPREL64LSBbfd_arch_d30v__offset_flags_maskssgi_core_dataBFD_RELOC_SPARC_GOTDATA_OP_HIX22BFD_RELOC_MEP_PCREL8A2BFD_RELOC_CRIS_SIGNED_6BFD_RELOC_CRX_SWITCH16BFD_RELOC_ALPHA_TPREL64partial_inplaceBFD_RELOC_390_GOTENTbits_per_addressBFD_RELOC_MIPS_TLS_TPREL32BFD_RELOC_V850_ZDA_15_16_OFFSETBFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HABFD_RELOC_SH_IMM8BY2BFD_RELOC_HI16_S_PLTOFFBFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HIbfd_link_hash_entrybfd_h_putx16BFD_RELOC_CR16_REGREL14ahppabsd_core_structBFD_RELOC_C6000_SBR_GOT_L16_WBFD_RELOC_16C_DISP24_Csymbol_countbfd_hash_tableBFD_RELOC_XTENSA_JMP_SLOTBFD_RELOC_IP2K_FR9BFD_RELOC_PPC64_PLTGOT16BFD_RELOC_X86_64_GOTPCREL64_bfd_write_contentsBFD_RELOC_TILEGX_IMM16_X0_HW2_LASTBFD_RELOC_C6000_PCR_L16BFD_RELOC_AVR_HI8_LDI_PM_NEGBFD_RELOC_ARM_PCREL_BLXBFD_RELOC_FRV_GOTLOBFD_RELOC_860_HAGOTBFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GDBFD_RELOC_NS32K_IMM_32_PCRELBFD_RELOC_MMIX_REGBFD_RELOC_390_TLS_IEENTfdprintfbout_data_structBFD_RELOC_MN10300_RELATIVEBFD_RELOC_16C_REG04_C_bfd_get_symtab_upper_boundBFD_RELOC_IA64_SEGREL64MSBbfd_arch_unknownBFD_RELOC_V850_23st_blocksBFD_RELOC_ARM_IN_POOLBFD_RELOC_SH_IMM_HI16BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GDBFD_RELOC_16C_IMM16_Cbfd_unknownBFD_RELOC_PPC_EMB_SDA2I16BFD_RELOC_CR16_IMM32aBFD_RELOC_BFIN_16_HIGHBFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4BFD_RELOC_SH_GOTPCBFD_RELOC_MIPS_TLS_TPREL64BFD_RELOC_V850_LO16_SPLIT_OFFSETBFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE_ZNSt15__exception_ptr13exception_ptr4swapERS0_BFD_RELOC_68K_GLOB_DATBFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HABFD_RELOC_V850_32_PCRELBFD_RELOC_TILEGX_IMM16_X1_HW0_GOTBFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HIBFD_RELOC_C6000_SBR_L16_BBFD_RELOC_SH_JMP_SLOTversados_data_struct_bfd_link_hash_table_createBFD_RELOC_SH_DISP12BY2output_offsetbfd_arch_ip2kBFD_RELOC_XTENSA_SLOT13_ALTBFD_RELOC_MACH_O_X86_64_PCREL32_4BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LOBFD_RELOC_860_HIGHBFD_RELOC_ARM_OFFSET_IMMBFD_RELOC_ALPHA_GPDISP_HI16BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IEBFD_RELOC_XTENSA_SLOT5_ALTBFD_RELOC_PPC_BA16_BRNTAKENBFD_RELOC_LO16BFD_RELOC_TILEGX_HW0_LASTBFD_RELOC_TIC54X_16_OF_23BFD_RELOC_RX_GPRELLBFD_RELOC_SPARC_REV32_bfd_merge_private_bfd_dataBFD_RELOC_SPARC_TLS_IE_LDBFD_RELOC_M68HC11_HI8BFD_RELOC_BFIN_10_PCRELBFD_RELOC_CR16_DISP24BFD_RELOC_RX_GPRELWnumber_of_symbolsbfd_target_srec_flavourswapBFD_RELOC_TILEPRO_TLS_TPOFF32BFD_RELOC_MICROMIPS_TLS_GDBFD_RELOC_BFIN_FUNCDESCBFD_RELOC_CRIS_UNSIGNED_4BFD_RELOC_CRIS_UNSIGNED_5BFD_RELOC_CRIS_UNSIGNED_6asymbolBFD_RELOC_CRIS_UNSIGNED_8assert_failcompatible__nlink_t_bfd_get_symbol_infoBFD_RELOC_ARM_T32_ADD_PC12BFD_RELOC_CR16_DISP4stab_nameBFD_RELOC_MICROMIPS_7_PCREL_S1BFD_RELOC_IA64_LTOFF_FPTR64LSBBFD_RELOC_CR16_DISP8BFD_RELOC_ARM_SMCBFD_RELOC_RX_16_OPBFD_RELOC_PPC_B16BFD_RELOC_AVR_LO8_LDI_GSBFD_RELOC_X86_64_DTPMOD64BFD_RELOC_CRIS_UNSIGNED_16BFD_RELOC_390_GOTOFF64BFD_RELOC_ARM_GOT_PRELBFD_RELOC_860_HIGOTOFFbfd_arch_mcorest_gidBFD_RELOC_FRV_GOTTLSOFFHIBFD_RELOC_390_PLT16DBLBFD_RELOC_390_GOTPCDBLBFD_RELOC_IA64_LTOFF22bfd_target_xcoff_flavourBFD_RELOC_386_TLS_TPOFF32BFD_RELOC_C6000_EHTYPEBFD_RELOC_SH_IMM3BFD_RELOC_SH_IMM4BFD_RELOC_PPC_B26BFD_RELOC_LO10BFD_RELOC_CR16_IMM8BFD_RELOC_ARM_ADR_IMMBFD_RELOC_SH_TLS_DTPMOD32BFD_RELOC_MICROBLAZE_32_SYM_OP_SYMBFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LOBFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD__base_typeBFD_RELOC_MICROBLAZE_64_GOTOFFBFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE_bfd_canonicalize_dynamic_relocbfd_arch_z80BFD_RELOC_MSP430_10_PCRELBFD_RELOC_TILEPRO_IMM16_X1_HA_PCRELsom_data_bfd_get_relocated_section_contentsBFD_RELOC_V850_32_ABSBFD_RELOC_TILEGX_GLOB_DATbfd_byteBFD_RELOC_SPARC_6bfd_vmaBFD_RELOC_PPC_GLOB_DATBFD_RELOC_PPC64_PLT16_LO_DSBFD_RELOC_IA64_REL32LSBBFD_RELOC_68K_TLS_LE16BFD_RELOC_IP2K_HI8INSNBFD_RELOC_MACH_O_X86_64_BRANCH32BFD_RELOC_M32R_GLOB_DATihex_datastrindexBFD_RELOC_MT_GNU_VTENTRYbfd_reloc_otherBFD_RELOC_IA64_PCREL64MSBbfd_arch_z8kBFD_RELOC_MEP_TPREL7BFD_RELOC_MEP_PCABS24A2BFD_RELOC_IA64_FPTR32MSBBFD_RELOC_14BFD_RELOC_16BFD_RELOC_C6000_SBR_GOT_U15_WBFD_RELOC_MCORE_PCREL_IMM4BY2BFD_RELOC_SH_IMMS6BY32backtrace_bufBFD_RELOC_SPARC_TLS_LDO_HIX22bfd_print_symbol_allBFD_RELOC_XTENSA_SLOT0_OP_bfd_make_debug_symbolBFD_RELOC_FRV_TLSOFF_RELAXBFD_RELOC_V850_TDA_6_8_OFFSET__cxxabiv1BFD_RELOC_CRIS_16_DTPRELBFD_RELOC_IA64_LTOFF64IBFD_RELOC_PPC_GOT_TLSGD16BFD_RELOC_SH_TLS_GD_32pe_obj_dataBFD_RELOC_24BFD_RELOC_MICROBLAZE_COPYBFD_RELOC_26scanBFD_RELOC_PPC64_DTPREL16_HIGHESTABFD_RELOC_SH_IMMS6BFD_RELOC_CRIS_16_GOTPLTBFD_RELOC_V850_CALLT_6_7_OFFSETBFD_RELOC_68K_TLS_LE32BFD_RELOC_H8_DIR24A8nested_archivesBFD_RELOC_M32R_GOTPC_LOmach_o_fat_data_structBFD_ARELOC_BFIN_MODarelentBFD_RELOC_FRV_GOTTLSOFFLOBFD_RELOC_32bfd_reloc_code_real_typeBFD_RELOC_CR16_DISP24aBFD_RELOC_MMIX_PUSHJBFD_RELOC_V850_TDA_7_7_OFFSETplugin_data_structbfd_target_pef_xlib_flavourBFD_RELOC_MN10300_16_PCRELstorage_neededBFD_RELOC_XC16X_SEGBFD_ARELOC_BFIN_CONSTBFD_RELOC_ARM_HVC__is_public_pBFD_RELOC_AVR_6_ADIWBFD_RELOC_SH_GOTPLT32BFD_RELOC_16C_REG04BFD_RELOC_MMIX_PUSHJ_STUBBABLEBFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IEBFD_RELOC_IA64_PCREL64IBFD_RELOC_TILEPRO_IMM16_X0_HI_PCRELBFD_RELOC_ARM_THUMB_ADDBFD_RELOC_CRIS_BDISP8BFD_RELOC_SH_IMMU5BFD_RELOC_SH_IMMU6BFD_RELOC_ARM_JUMP_SLOTsection_laststab_deschaystackBFD_RELOC_390_PLT32DBLBFD_ARELOC_BFIN_LSHIFTBFD_RELOC_390_JMP_SLOTBFD_RELOC_TILEGX_SHAMT_X0BFD_RELOC_TILEGX_SHAMT_X1BFD_RELOC_IQ2000_UHI16BFD_RELOC_X86_64_GOTTPOFFBFD_RELOC_BFIN_GOTbfd_target_ieee_flavourBFD_RELOC_SPARC_HM10BFD_RELOC_TILEGX_IMM16_X1_HW2_GOTBFD_RELOC_SH_IMM4BY2BFD_RELOC_FRV_FUNCDESCBFD_RELOC_XTENSA_SLOT10_OPrelaxBFD_RELOC_MICROMIPS_JALRbfd_getx16BFD_RELOC_TILEGX_BROFF_X1BFD_RELOC_X86_64_TLSDESC_CALLBFD_ARELOC_BFIN_DIVBFD_RELOC_MIPS16_TLS_LDMbfd_uint64_tbfd_sectionBFD_RELOC_TIC54X_23BFD_RELOC_TILEGX_SHAMT_Y0BFD_RELOC_TILEGX_SHAMT_Y1BFD_RELOC_PPC64_GOT16_DSBFD_RELOC_ARM_LDR_PC_G1BFD_RELOC_ARM_LDR_PC_G2BFD_RELOC_PPC_COPYBFD_RELOC_ARM_TARGET1BFD_RELOC_ARM_TARGET2BFD_RELOC_C6000_SBR_L16_HBFD_RELOC_RELCBFD_RELOC_BFIN_FUNCDESC_GOT17M4BFD_RELOC_64BFD_RELOC_C6000_SBR_L16_WBFD_RELOC_ARM_LDR_IMMBFD_RELOC_MICROMIPS_GOT_PAGE_bfd_set_section_contentsbfd_reloc_overflowBFD_RELOC_ARM_TLS_LDO32BFD_ARELOC_BFIN_XORBFD_RELOC_SH_IMMS10BY4_bfd_is_local_label_namexvecBFD_RELOC_SH_IMMS10BY8BFD_RELOC_AVR_16_PMBFD_RELOC_PPC_EMB_SDA2REL_bfd_get_section_contents_in_windowBFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOTBFD_RELOC_390_TLS_LDCALLBFD_RELOC_SH_GOTPC_MEDLOW16BFD_RELOC_IA64_GPREL64Ibfd_print_symbol_typeBFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOTBFD_RELOC_AVR_LO8_LDI_PMaout_datareloc_howto_typeBFD_RELOC_PPC_GOT_TPREL16bfd_getx32bfd_target_pef_flavourentsizeBFD_RELOC_SH_IMM4BY4sun_core_databitposBFD_RELOC_ARM_TLS_DESCSEQBFD_RELOC_MICROMIPS_HI16_SBFD_RELOC_SH_GOTOFF_MEDHI16cacheableBFD_RELOC_ARM_SWIBFD_RELOC_LO16_BASERELBFD_RELOC_SH_IMM_MEDLOW16BFD_RELOC_XC16X_SOFBFD_RELOC_MACH_O_PAIRBFD_RELOC_16C_DISP16_CBFD_RELOC_SH_GOTFUNCDESCBFD_RELOC_TILEPRO_IMM16_X0_HIBFD_RELOC_V850_22_PLT_PCRELBFD_RELOC_ARM_LDC_SB_G0BFD_RELOC_ARM_LDC_SB_G1BFD_RELOC_ARM_LDC_SB_G2BFD_RELOC_C6000_ABS_L16BFD_RELOC_12_PCRELBFD_RELOC_386_GLOB_DATBFD_RELOC_NS32K_DISP_8bfd_archiveBFD_RELOC_386_COPYBFD_RELOC_SH_DISP20BFD_RELOC_MIPS_GOT_DISPBFD_RELOC_PPC_TLSBFD_RELOC_PPC_GOT_TLSLD16_HIBFD_RELOC_V850_9_PCRELBFD_RELOC_TILEGX_IMM16_X0_HW3_PCRELbfd_arch_alphaBFD_RELOC_MMIX_BASE_PLUS_OFFSETBFD_RELOC_LO16_GOTOFFnewfuncBFD_RELOC_SH_PLT_MEDLOW16BFD_RELOC_RX_ABS32_REVsgi_core_structBFD_RELOC_390_TLS_GOTIE32sec_flg0sec_flg1sec_flg2sec_flg3sec_flg4sec_flg5BFD_RELOC_XTENSA_TLS_TPOFFlynx_core_dataBFD_RELOC_IA64_LTOFF_FPTR32LSBbfd_target_coff_flavourBFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GDBFD_RELOC_IA64_TPREL14bfd_getx64BFD_RELOC_X86_64_GOT32src_maskBFD_RELOC_M32R_GOT16_HI_SLOBFD_RELOC_390_GOTPLT12BFD_RELOC_390_GOTPLT16BFD_RELOC_8_GOTOFFBFD_RELOC_MIPS_TLS_DTPREL_HI16BFD_RELOC_PPC64_DTPREL16_HIGHERABFD_RELOC_AVR_LDIBFD_RELOC_XTENSA_RELATIVEst_mtimbfd_reloc_outofrangeBFD_RELOC_MIPS_RELGOTBFD_RELOC_IA64_TPREL22BFD_RELOC_TILEGX_HW1_LASTBFD_RELOC_390_GOTPLT20BFD_RELOC_D30V_21_PCREL_Rlink_next_bfd_find_lineBFD_RELOC_RX_ABS16UBFD_RELOC_PPC_GOT_TPREL16_HAreloc_type_lookupBFD_RELOC_ARM_THM_TLS_DESCSEQBFD_RELOC_PPC64_DTPREL16_HIGHESTBFD_RELOC_TILEPRO_IMM16_X0_HAbfd_arch_l1omBFD_RELOC_V850_16_PCRELBFD_RELOC_SH_IMMS10BY2symbols_freeBFD_RELOC_PPC64_GOT16_LO_DSBFD_RELOC_TILEGX_IMM16_X0_HW0BFD_RELOC_TILEGX_IMM16_X0_HW1BFD_RELOC_TILEGX_IMM16_X0_HW2BFD_RELOC_TILEGX_IMM16_X0_HW3BFD_RELOC_CR16_GLOB_DATBFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IEBFD_RELOC_390_GOTPLT32BFD_RELOC_FR30_9_IN_8cisco_core_databfd_target_mmo_flavourBFD_RELOC_TILEPRO_IMM16_X0_LO__offset_shiftBFD_RELOC_LM32_16_GOT_bfd_print_symbolBFD_RELOC_SH_GOTPC_LOW16BFD_RELOC_LM32_JMP_SLOTBFD_RELOC_IA64_LTV64LSBbfd_arch_m68kBFD_RELOC_FRV_HI16BFD_RELOC_390_COPYBFD_RELOC_PPC_GOT_TLSLD16_LOBFD_RELOC_M68HC12_5BBFD_RELOC_ARM_MOVTBFD_RELOC_X86_64_GOT64BFD_RELOC_SH_RELATIVEBFD_RELOC_V850_LONGCALLBFD_RELOC_V850_LONGJUMPBFD_RELOC_PPC64_SECTOFF_DSBFD_RELOC_MIPS16_TLS_GDreloc_name_lookupBFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCRELBFD_RELOC_16C_NUM08BFD_RELOC_X86_64_GOTPCRELBFD_RELOC_PPC_EMB_RELST_HABFD_RELOC_CRX_REL4BFD_RELOC_ARM_T32_CP_OFF_IMMbits_per_wordcomplain_overflow_unsignedBFD_RELOC_HI16_GOTOFFBFD_RELOC_CRX_REL8_CMPBFD_RELOC_IA64_GPREL64MSBbfd_reloc_status_typeBFD_RELOC_XTENSA_TLS_DTPOFFBFD_RELOC_FR30_20BFD_RELOC_PJ_CODE_HI16BFD_RELOC_XTENSA_SLOT14_ALTBFD_RELOC_ALPHA_LITERALBFD_RELOC_MT_GNU_VTINHERITbfd_arch_rs6000BFD_RELOC_XTENSA_SLOT6_ALTBFD_RELOC_390_GOTPLT64BFD_RELOC_16C_IMM04st_inoBFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GDBFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCRELBFD_RELOC_PJ_CODE_REL16BFD_RELOC_IA64_DIR64MSBBFD_RELOC_SCORE_GPREL15BFD_RELOC_386_TLS_LE_32BFD_RELOC_IA64_PCREL32MSBBFD_RELOC_FRV_FUNCDESC_GOTOFF12bfd_arch_iq2000BFD_RELOC_M32R_24BFD_RELOC_390_PC32DBLBFD_RELOC_MACH_O_SECTDIFFBFD_RELOC_16C_IMM16read_directionBFD_RELOC_SH_IMM_MEDHI16BFD_RELOC_MEP_PCREL17A2_bfd_find_inliner_infoBFD_RELOC_MMIX_GETABFD_RELOC_PJ_CODE_DIR16lru_prevBFD_RELOC_FR30_48BFD_RELOC_CR16_REGREL16BFD_RELOC_16C_IMM04_CBFD_RELOC_SPARC_PC_HH22itoaBFD_RELOC_SCORE_GOT15BFD_RELOC_16C_IMM20special_functionBFD_RELOC_16C_IMM24sym_dataBFD_RELOC_MICROBLAZE_64_PLTBFD_RELOC_X86_64_PLTOFF64BFD_RELOC_ALPHA_CODEADDR_ZNSt15__exception_ptr13exception_ptraSEOS0_mmo_dataBFD_RELOC_TILEGX_IMM8_X0BFD_RELOC_PJ_CODE_REL32BFD_RELOC_PPC64_TPREL16_DSBFD_RELOC_SH_PLT_HI16BFD_RELOC_IA64_DTPREL64IBFD_RELOC_PPC_DTPREL16_HABFD_RELOC_PPC_DTPREL16_HIBFD_RELOC_16C_IMM32BFD_RELOC_PPC_EMB_RELST_LObfd_arch_vaxBFD_RELOC_68K_TLS_GD8BFD_RELOC_PJ_CODE_DIR32BFD_RELOC_MICROBLAZE_32_LO_PCRELBFD_RELOC_TILEGX_IMM8_Y1BFD_RELOC_IA64_IPLTLSBbfd_type_endBFD_RELOC_XTENSA_TLS_CALL_dummy_first_bfd_reloc_code_realBFD_RELOC_RVArelax_tableBFD_RELOC_H8_DIR24R8relax_count__public_maskBFD_RELOC_TILEGX_IMM16_X0_HW2_PCRELis_thin_archiveBFD_RELOC_SH_LOOP_STARTBFD_RELOC_ARM_HWLITERALbfd_targetBFD_RELOC_FR30_6_IN_4BFD_RELOC_XTENSA_TLSDESC_FNBFD_RELOC_V850_16_SPLIT_OFFSETBFD_RELOC_ARM_MOVT_PCRELBFD_RELOC_FRV_GPREL32BFD_RELOC_386_JUMP_SLOT__libc_stack_endBFD_RELOC_M68HC11_LO16BFD_RELOC_SH_IMMU16BFD_RELOC_16_PLT_PCRELbfd_target_tekhex_flavourBFD_RELOC_D10V_10_PCREL_LBFD_RELOC_MICROMIPS_GOT_OFSTBFD_RELOC_D10V_10_PCREL_RsymindexBFD_RELOC_PPC64_TOC16_LO_DSBFD_ARELOC_BFIN_ADDRBFD_RELOC_SH_PCDISP12BY2BFD_RELOC_PPC_EMB_RELSDABFD_RELOC_SCORE_BRANCH_ZNSt15__exception_ptr13exception_ptr10_M_releaseEvBFD_RELOC_24_PCRELreloc_howto_structBFD_RELOC_SPARC_TLS_LDM_LO10bfd_arch_pdp11srec_data_structBFD_RELOC_M32R_GOT16_HI_ULOBFD_RELOC_V850_LO16_S1__base_class_type_infodst_maskBFD_ARELOC_BFIN_MULTBFD_RELOC_CR16_GOT_REGREL20BFD_RELOC_390_RELATIVEBFD_RELOC_IA64_GPREL64LSBBFD_RELOC_PPC_TPREL16_HABFD_RELOC_OPENRISC_ABS_26BFD_RELOC_CR16_IMM16BFD_RELOC_M32R_GOTOFF_HI_SLOBFD_RELOC_PPC_TPREL16_HI_ZNSt15__exception_ptr13exception_ptraSERKS0_BFD_RELOC_16C_REG04aBFD_RELOC_32_GOTOFFBFD_RELOC_X86_64_32SBFD_RELOC_M32R_JMP_SLOTBFD_RELOC_THUMB_PCREL_BLXBFD_RELOC_IA64_LTV32LSBBFD_RELOC_PPC64_HIGHER_SBFD_RELOC_ARM_THUMB_SHIFTBFD_RELOC_MIPS_SHIFT5BFD_RELOC_MIPS_SHIFT6BFD_RELOC_CR16_IMM20BFD_RELOC_SCORE_IMM30BFD_RELOC_SCORE_IMM32BFD_RELOC_CR16_IMM24bfd_arch_mn10200BFD_RELOC_XTENSA_SLOT2_OPBFD_RELOC_RX_OP_SUBTRACTBFD_RELOC_TILEGX_IMM16_X1_HW3_GOT_ZNSt15__exception_ptr13exception_ptr9_M_addrefEvhpux_core_structBFD_RELOC_CRIS_16_GOT_GDaout_ar_dataBFD_RELOC_16C_REG20_CBFD_RELOC_TILEPRO_JOFFLONG_X1_PLTBFD_RELOC_IA64_GPREL22BFD_RELOC_SPARC_GLOB_DATBFD_RELOC_PPC_BA16_BRTAKENBFD_RELOC_M32R_18_PCRELBFD_RELOC_XTENSA_SLOT13_OPBFD_RELOC_ARM_TLS_IE32BFD_RELOC_PDP11_DISP_8_PCRELBFD_RELOC_LM32_GOTOFF_LO16BFD_RELOC_MIPS16_HI16_SBFD_RELOC_TILEGX_JUMPOFF_X1BFD_RELOC_PPC64_HIGHEST_SBFD_RELOC_CR16_IMM32BFD_RELOC_16C_IMM32_CBFD_RELOC_PPC64_ADDR16_DSBFD_RELOC_XTENSA_SLOT0_ALTbfd_arch_m88kbfd_formatno_directionBFD_RELOC_PPC64_DTPREL16_HIGHERbfd_arch_crisieee_ar_data_structbfd_reloc_okbfd_reloc_statusoutput_has_begunBFD_RELOC_SH_IMM_MEDHI16_PCRELBFD_RELOC_TILEGX_IMM16_X1_HW1_LASTBFD_RELOC_AVR_HH8_LDI_NEGBFD_RELOC_860_LOPCBFD_RELOC_860_LOGOTOFF0BFD_RELOC_860_LOGOTOFF1BFD_RELOC_860_LOGOTOFF2BFD_RELOC_M68HC11_RL_JUMPBFD_RELOC_8_PLT_PCRELBFD_RELOC_IA64_LTOFF_FPTR22write_directionthe_defaultbfd_link_orderBFD_RELOC_IA64_IMM64BFD_RELOC_ARM_TLS_GD32lineno_cache_entrynlm_obj_databfd_target_versados_flavourBFD_RELOC_PPC64_SECTOFF_LO_DSBFD_RELOC_MIPS_GOT_PAGEbfd_arch_xc16xBFD_RELOC_MEP_HI16SBFD_RELOC_MICROMIPS_GOT16BFD_RELOC_PPC_EMB_RELST_HIBFD_RELOC_M68HC11_LO8BFD_RELOC_C6000_SBR_S16BFD_RELOC_XSTORMY16_FPTR16BFD_RELOC_THUMB_PCREL_BRANCH7BFD_RELOC_THUMB_PCREL_BRANCH9BFD_RELOC_AVR_7_PCRELBFD_RELOC_PPC_TPREL16_LOBFD_RELOC_AVR_LO8_LDI_PM_NEGcomplain_on_overflowBFD_RELOC_V850_GLOB_DATBFD_RELOC_ARM_PREL31BFD_RELOC_860_LOGOT1BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GDBFD_RELOC_ALPHA_BRSGPBFD_RELOC_SPU_PPU32the_bfdBFD_RELOC_XTENSA_SLOT9_OPBFD_RELOC_V850_TDA_16_16_OFFSET_bfd_set_private_flagsbfd_coreBFD_RELOC_MICROBLAZE_32_GOTOFFBFD_RELOC_PPC_DTPMOD_bfd_merge_sectionsBFD_RELOC_X86_64_TLSDESCselective_searchBFD_RELOC_MICROBLAZE_32_ROSDABFD_RELOC_TILEGX_IMM16_X1_HW2_LASTBFD_RELOC_860_SPGOT0BFD_RELOC_860_SPGOT1BFD_RELOC_RX_DIFFBFD_RELOC_ALPHA_GOTDTPREL16BFD_RELOC_ARM_THM_TLS_CALLmtime_setBFD_RELOC_IA64_DIR32MSBBFD_ARELOC_BFIN_ORBFD_RELOC_RX_NEG8BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOTcompressed_sizeBFD_RELOC_MICROMIPS_SUBBFD_RELOC_MICROBLAZE_64_GOTBFD_RELOC_CRX_NUM8bfd_arch_ns32k_bfd_copy_link_hash_symbol_typeBFD_RELOC_TILEGX_RELATIVEBFD_RELOC_MEP_16BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IEBFD_RELOC_SH_GOTPLT_LOW16BFD_RELOC_FRV_GETTLSOFF_RELAXBFD_RELOC_MICROMIPS_JMPBFD_RELOC_FRV_GETTLSOFFBFD_RELOC_386_TLS_GDBFD_RELOC_AVR_LO8_LDIBFD_RELOC_XTENSA_SLOT5_OPBFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCRELBFD_RELOC_CR16_REGREL14BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32BFD_RELOC_ALPHA_LINKAGEBFD_RELOC_MICROMIPS_TLS_DTPREL_HI16BFD_RELOC_MIPS16_TLS_DTPREL_HI16BFD_RELOC_SH_IMM_HI16_PCRELBFD_RELOC_MOXIE_10_PCRELBFD_RELOC_PPC_EMB_NADDR16_HABFD_RELOC_ALPHA_GOTTPREL16BFD_RELOC_PPC_EMB_NADDR16_HIBFD_RELOC_MMIX_REG_OR_BYTEBFD_RELOC_RX_ABS16BFD_RELOC_MICROMIPS_CALL_HI16BFD_RELOC_SPU_PPU64BFD_RELOC_ARM_ALU_SB_G1_NCBFD_RELOC_MIPS_TLS_DTPREL_LO16BFD_RELOC_860_PC16BFD_RELOC_MIPS16_HI16BFD_RELOC_CR16_REGREL20bfd_arch_mepBFD_RELOC_FRV_GOTOFF12BFD_RELOC_ARM_ALU_SB_G1BFD_RELOC_ARM_ALU_SB_G2BFD_RELOC_ALPHA_GPDISP_LO16ecoff_tdataBFD_RELOC_TILEGX_IMM16_X1_HW0BFD_RELOC_TILEGX_IMM16_X1_HW1BFD_RELOC_TILEGX_IMM16_X1_HW2BFD_RELOC_TILEGX_IMM16_X1_HW3dump_intervalsection_countcomplain_overflow_dontBFD_RELOC_MEP_32bfd_arch_xstormy16ieee_dataBFD_RELOC_RX_OP_NEGBFD_RELOC_RX_SYMBFD_RELOC_LM32_RELATIVEBFD_RELOC_CRIS_32_TPRELBFD_RELOC_68K_TLS_IE8BFD_RELOC_ARM_MOVWmy_archiveBFD_RELOC_860_PC26BFD_RELOC_386_TLS_IEBFD_RELOC_860_LOW0BFD_RELOC_860_LOW1BFD_RELOC_860_LOW2BFD_RELOC_860_LOW3BFD_RELOC_RX_ABS32_bfd_init_private_section_dataBFD_RELOC_ARM_LDRS_SB_G0BFD_RELOC_ARM_LDRS_SB_G1BFD_RELOC_ARM_LDRS_SB_G2bfd_size_typeBFD_RELOC_390_TLS_DTPMOD_bfd_link_just_syms_ZNK10__cxxabiv122__base_class_type_info14__is_virtual_pEvBFD_RELOC_MICROMIPS_GPREL16BFD_RELOC_ARM_T32_CP_OFF_IMM_S2BFD_RELOC_TILEPRO_BROFF_X1BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64whereBFD_RELOC_IA64_DTPREL14stab_otherBFD_RELOC_16C_NUM32_CBFD_RELOC_FRV_LO16BFD_RELOC_MEP_GNU_VTINHERIT__dev_tBFD_RELOC_MMIX_LOCALBFD_RELOC_MICROBLAZE_64_GOTPCbfd_h_getx16BFD_RELOC_CR16_REGREL4aBFD_RELOC_390_12srec_dataBFD_RELOC_SPARC_M44BFD_RELOC_MMIX_PUSHJ_1BFD_RELOC_MMIX_PUSHJ_2BFD_RELOC_SH_PCDISP8BY2BFD_RELOC_IA64_DTPREL22BFD_RELOC_D10V_18_PCRELBFD_RELOC_MIPS_CALL16BFD_RELOC_SH_TLS_LE_32BFD_RELOC_SH_TLS_IE_32BFD_RELOC_PPC_EMB_NADDR16_LOBFD_RELOC_MT_HI16BFD_RELOC_XTENSA_SLOT7_ALTBFD_RELOC_IA64_FPTR64LSBBFD_RELOC_64_PCRELBFD_RELOC_SH_IMM_LOW16_PCRELBFD_RELOC_M32R_GOTOFF_HI_ULObfd_arch_tic30BFD_RELOC_CR16_SWITCH16BFD_RELOC_TIC54X_MS7_OF_23BFD_RELOC_390_20BFD_RELOC_386_TLS_LEtekhex_dataBFD_RELOC_MMIX_CBRANCH_2BFD_RELOC_MMIX_CBRANCH_3BFD_RELOC_IA64_GPREL32LSBBFD_RELOC_PJ_CODE_LO16BFD_RELOC_CRIS_SIGNED_16BFD_RELOC_MMIX_CBRANCH_JBFD_RELOC_390_TLS_DTPOFFbfd_h_getx32BFD_RELOC_ARM_GLOB_DATBFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GDbfd_symbolBFD_RELOC_IP2K_HI8DATABFD_RELOC_C6000_NOCMPBFD_RELOC_16C_ABS20BFD_RELOC_16C_ABS24BFD_RELOC_M32R_GOT24BFD_RELOC_CRIS_SIGNED_8BFD_RELOC_SPARC_TLS_DTPOFF64BFD_RELOC_CR16_SWITCH32BFD_RELOC_23_PCREL_S2bfd_arch_tic4xBFD_RELOC_TILEPRO_IMM16_X0_PCRELbfd_arch_infobfd_link_infoBFD_RELOC_PPC64_DTPREL16_LO_DSBFD_RELOC_MEP_GPRELBFD_RELOC_ARM_TLS_DESCBFD_RELOC_V850_TDA_7_8_OFFSETBFD_RELOC_FR30_12_PCRELBFD_RELOC_TILEPRO_RELATIVEBFD_RELOC_MEP_TPRELBFD_RELOC_TILEGX_DEST_IMM8_X1_ZNKSt15__exception_ptr13exception_ptr20__cxa_exception_typeEvnetbsd_core_structBFD_RELOC_390_TLS_LOADbfd_arch_i860BFD_RELOC_ARM_TLS_GOTDESCBFD_RELOC_HI16_S_BASERELBFD_RELOC_16C_REG16_CBFD_RELOC_M32C_HI8BFD_RELOC_8_FFnnst_modeheader_byteorderBFD_RELOC_64_PLTOFFnetbsd_core_dataBFD_RELOC_SPARC_HH22ieee_ar_dataBFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IEBFD_RELOC_SPARC_PC10BFD_RELOC_M32R_26_PLTREL__is_virtual_pbfd_target_nlm_flavourBFD_RELOC_FRV_TLSDESC_VALUEBFD_RELOC_PPC64_TOC16_DSbfd_target_ihex_flavourBFD_RELOC_X86_64_PLT32bfd_h_getx64bfd_arch_tic6xbfd_putx16st_devBFD_RELOC_MICROMIPS_TLS_TPREL_HI16frame_BFD_RELOC_390_TLS_LDM32target_defaultedBFD_RELOC_SPARC_PC22BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HABFD_RELOC_XTENSA_ASM_EXPANDBFD_RELOC_MACH_O_X86_64_PCREL32_1BFD_RELOC_MACH_O_X86_64_PCREL32_2BFD_RELOC_RX_RELAXBFD_RELOC_32_PCREL_S2BFD_RELOC_TILEPRO_IMM16_X1_HI_PCRELBFD_RELOC_TIC54X_PARTLS7BFD_RELOC_LM32_COPYbfd_arch_pluginbfd_arch_tic80BFD_RELOC_MN10300_GOT16BFD_RELOC_FRV_TLSOFFBFD_RELOC_IA64_SECREL64MSBBFD_RELOC_PPC_GOT_TLSLD16_HABFD_RELOC_FRV_FUNCDESC_GOTOFFHIBFD_RELOC_TILEGX_IMM16_X0_HW0_GOTBFD_RELOC_XTENSA_PLTBFD_RELOC_IA64_DTPREL64MSB_bfd_construct_extended_name_tableproxy_originBFD_RELOC_ARM_LDC_PC_G0BFD_RELOC_ARM_LDC_PC_G1BFD_RELOC_ARM_LDC_PC_G2~exception_ptrBFD_RELOC_FR30_10_IN_8verilog_data_structBFD_RELOC_860_RELATIVEbfd_putx32BFD_RELOC_MN10300_GOT24memoryBFD_RELOC_TILEGX_IMM16_X0_HW0_PCRELBFD_RELOC_ALPHA_BOHBFD_RELOC_C6000_SBR_H16_H_bfd_update_armap_timestampBFD_RELOC_IA64_LDXMOVBFD_RELOC_860_SPGOTOFF0BFD_RELOC_860_SPGOTOFF1BFD_RELOC_SH_GOT_LOW16BFD_ARELOC_BFIN_PAGEBFD_RELOC_PPC64_HIGHERBFD_RELOC_M32R_RELATIVEBFD_RELOC_V850_TDA_4_4_OFFSETBFD_RELOC_MIPS_GOT_OFSTBFD_RELOC_PPC_EMB_SDA21__pad0BFD_RELOC_RX_16UBFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCRELBFD_RELOC_M32C_RL_1ADDRBFD_RELOC_MN10300_GOT32bfd_arch_tic54xBFD_RELOC_MICROMIPS_TLS_GOTTPRELbfd_arch_w65BFD_RELOC_SPU_PCREL16BFD_RELOC_V850_CALLT_15_16_OFFSETBFD_RELOC_390_TLS_LDM64BFD_RELOC_IA64_PLTOFF64LSBBFD_RELOC_MMIX_ADDR27BFD_RELOC_IA64_LTOFF_FPTR64MSBBFD_RELOC_PPC64_TOC16_HA_bfd_relax_sectionBFD_RELOC_NONEBFD_RELOC_FRV_GOTHIBFD_RELOC_RX_ABS8BFD_RELOC_PPC64_TOC16_HIBFD_RELOC_FRV_GPRELHIBFD_RELOC_ARM_ALU_PC_G1_NCBFD_RELOC_TILEPRO_MF_IMM15_X1BFD_RELOC_TILEPRO_DEST_IMM8_X1BFD_RELOC_CRIS_JUMP_SLOTBFD_RELOC_MIPS_LITERALBFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOTBFD_RELOC_SH_GOTOFF20BFD_RELOC_SH_GOTPLT_MEDHI16BFD_RELOC_V850_32_GOTPCREL_bfd_copy_private_section_databfd_target_verilog_flavourBFD_RELOC_PPC_TLSGDBFD_RELOC_XTENSA_SLOT3_OPBFD_RELOC_XC16X_PAGBFD_RELOC_68K_JMP_SLOTBFD_RELOC_32_PLT_PCRELBFD_RELOC_BFIN_FUNCDESC_GOTOFFLOoutput_sectionBFD_RELOC_SH_GOTOFFFUNCDESC20BFD_RELOC_SH_PLT_LOW16rawsizearchive_nextbfd_link_hash_tableBFD_RELOC_PPC_EMB_MRKREFBFD_RELOC_ARM_TLS_LE32BFD_RELOC_SPARC_GOT10BFD_RELOC_SPARC_GOT13BFD_RELOC_XTENSA_SLOT1_ALT__mode_tBFD_ARELOC_BFIN_ADDBFD_RELOC_MICROMIPS_CALL16BFD_RELOC_MICROMIPS_SCN_DISPBFD_RELOC_PPC64_PLTGOT16_DSbfd_arch_obscureBFD_RELOC_V850_JMP_SLOTBFD_RELOC_LO16_PCRELBFD_RELOC_VPE4KMATH_INSNBFD_ARELOC_BFIN_SUB_read_minisymbols_bfd_windowsun_core_structBFD_RELOC_CRX_IMM16BFD_RELOC_M68HC11_24BFD_RELOC_SPARC_GOT22BFD_RELOC_390_GOT12BFD_RELOC_390_GOT16_bfd_find_nearest_lineBFD_RELOC_ALPHA_BSRBFD_RELOC_CRIS_16_TPRELBFD_RELOC_MEP_TPREL7A2BFD_RELOC_MEP_TPREL7A4bfd_architectureBFD_RELOC_FRV_TLSMOFF12BFD_RELOC_ALPHA_LITUSEpe_tdataBFD_RELOC_8_GOT_PCRELBFD_RELOC_SH_IMM_LOW16BFD_RELOC_390_GOT20bfd_arch_rompBFD_RELOC_IA64_PCREL22BFD_RELOC_M68HC11_3BBFD_RELOC_CRIS_RELATIVEBFD_RELOC_C6000_ALIGNBFD_RELOC_M32R_GOTPC_HI_ULOBFD_RELOC_IA64_LTOFF_DTPREL22BFD_RELOC_SH_GOTOFF_LOW16BFD_RELOC_MICROBLAZE_64_NONEBFD_RELOC_FRV_GOTTLSDESC12_minisymbol_to_symbolbfd_arch_dlxBFD_RELOC_PPC64_TOC16_LOBFD_RELOC_TILEPRO_MT_IMM15_X1BFD_RELOC_FRV_GPRELLOBFD_RELOC_SCORE_DUMMY_HI16bfd_arch_or32BFD_RELOC_TILEGX_IMM16_X1_HW3_PCRELbfd_arch_k1omBFD_RELOC_BFIN_GOTOFFHIBFD_RELOC_D30V_21_PCRELBFD_RELOC_MIPS_SUBBFD_RELOC_IA64_FPTR32LSBBFD_RELOC_ARM_LITERALBFD_RELOC_SCORE_JMP_Z8sio_bindiP11sockaddr_injsio_shutdownoptval~SocketError~SystemErrorsio_strfaddrsio_listen_Z8sio_readiPvmsio_listen_backlog_Z9sio_writeiPKvm_Z14sio_socketnamei_Z9sio_setfliii_Z10sio_acceptiP11sockaddr_inPj_ZN11SystemErrorD0Ev_ZN11SocketErrorD2Evsio_writev_Z10sio_listenisio_socketnamesio_readsio_setsockopt_Z10sio_writeviPK5ioveci_Z11sio_connectiP11sockaddr_inj_Z12sio_recvfromiPvmiP11sockaddr_inPjsio_getfl_Z10sio_sendtoiPKvmiPK11sockaddr_injsio_getpeernamesio_connect_ZN11SocketErrorC2EPKcjiS1_zsio_bind_Z15sio_getpeernameiP11sockaddr_in_Z14sio_getsockoptiiiPvPj_ZN11SocketErrorD0Evsio_sendto_Z12sio_shutdowniisio_getsockopt_Z12sio_strfaddrP11sockaddr_in_Z18sio_listen_backlogvsio_option_nameoptnamesio_recvfromsave_errno_Z10sio_socketiii_Z14sio_setsockoptiiiPKvjsrc_addroptlen/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/sio.cc_Z9sio_getfli_ZN11SystemErrorD2Evsio_writedest_addrsio_acceptsio_socketdomainsio_setflevio_ptonai_flagsIPPROTO_MTPevio_service_portIPPROTO_PIMsockaddr_storageIPPROTO_DCCPevioIPPROTO_IDPIPPROTO_ENCAPIPPROTO_IGMP__ss_paddingIPPROTO_RSVPevio_is_activeIPPROTO_UDPevio_service_stop__u6_addr16_Z19evio_setsockopt_tcpiIPPROTO_NONEIPPROTO_TCPsin6_porthostai_addrIPPROTO_ICMPV6IPPROTO_COMPIPPROTO_IPevio_socketIPPROTO_IPIPevio_bind_addrinfosalenai_socktypeIPPROTO_ESPsin6_flowinfo_Z18evio_bind_addrinfoP5ev_ioP8addrinfol_onoffIPPROTO_FRAGMENT/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/evio.ccsockaddr_in6evio_closeIPPROTO_TPIPPROTO_IPV6evio_setsockopt_tcpsin6_family_Z17evio_service_stopP12evio_serviceIPPROTO_MAX_Z9evio_ptonPKcS0_P16sockaddr_storagePjevio_setsockopt_tcpserver_Z10evio_closeP5ev_ioevio_service_init__in6_uai_addrlenIPPROTO_PUPsin6_scope_idIPPROTO_SCTPIPPROTO_RAWevio_service_accept_cb_Z17evio_service_initP12evio_servicePKcS2_iPFvS0_iP11sockaddr_inEPvai_protocolai_next_Z25evio_setsockopt_tcpserveriIPPROTO_HOPOPTSss_familyIPPROTO_EGP__u6_addr8ai_familyIPPROTO_ICMPevio_service_timer_cb_Z11evio_socketP5ev_ioiiievio_service_name__ss_align_Z18evio_service_startP12evio_serviceevio_service_startIPPROTO_GREIPPROTO_AHIPPROTO_ROUTINGevio_service_bind_and_listenai_canonname__u6_addr32IPPROTO_UDPLITEsin6_addrl_lingerIPPROTO_DSTOPTS_Z24coio_readn_ahead_timeoutP5ev_ioPvmmdcoio_writevmake_scoped_guard >coio_read_ahead_timeoutfiber_schedule_coiocoio_connectcoio_fiber_yield_Z11coio_acceptP5ev_ioP11sockaddr_injdis_timedout_Z18coio_write_timeoutP5ev_ioPKvmdScopedGuard >coio_connect_timeoutcoio_acceptcoio_readn_ahead_Z11coio_writevP5ev_ioP5iovecim_Z17coio_service_initP12coio_servicePKcS2_iPFvP13__va_list_tagEPvelapsedcoio_connect_addrinfosize_hint_Z21coio_connect_addrinfoP5ev_ioP8addrinfodsio_move_iovmake_scoped_guard >towrite_Z12coio_connectP5ev_ioP11sockaddr_incoio_recvfrom_timeout_Z19coio_sendto_timeoutP5ev_ioPKvmiPK11sockaddr_injd/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coio.cc_Z16coio_readn_aheadP5ev_ioPvmmcoio_initcoio_fiber_yield_timeoutcoio_readn_ahead_timeout_Z20coio_connect_timeoutP5ev_ioP11sockaddr_injdcoio_sendto_timeoutmake_scoped_guard >coio_service_initmake_scoped_guard >_Z9coio_initP5ev_io_Z21coio_recvfrom_timeoutP5ev_ioPvmiP11sockaddr_injd_Z22coio_service_on_acceptP12evio_serviceiP11sockaddr_in_Z23coio_read_ahead_timeoutP5ev_ioPvmmdScopedGuard >evio_timeout_initScopedGuard >evio_timeout_updatecoio_service_on_acceptcoio_flushcoio_write_timeoutScopedGuard >ScopedGuard >sio_add_to_ioviobuf_namemake_scoped_guard >_Z10coeio_initv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coeio.cccoeio_async_cbcoeio_on_completeptr1ptr2eio_ssize_teio_pwdcoeio_custom_cbcoeio_initcoeio_resolveint1int2int3eio_tstampeio_cberrornoeio_wdcoeio_idleeio_reqcoeio_want_poll_cbcoeio_asyncgetaddrinfo_cb_Z13coeio_resolveiPKcS0_dgrp_firstev_idlecoeio_managercoeio_taskgrp_prevhintscoeio_idle_cb_Z12coeio_customPFlP13__va_list_tagEdzgrp_nextcoeio_customobuf_rollback_to_svp_Z12ibuf_reserveP4ibufmobuf_createiobuf_max_pool_sizeibuf_reserve_Z11iobuf_flushP5iobufP5ev_ioobuf_sizeiobuf_newiobuf_delete/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iobuf.cccurrent_sizeobuf_dup_Z8obuf_dupP4obufPKvmiobuf_gc_Z8iobuf_gcP5iobuf_Z11obuf_createP4obufP11palloc_pool_Z9obuf_bookP4obufmiobuf_flushobuf_iovcntobuf_alloc_posobuf_book_Z9iobuf_newPKciobuf_cache_Z20obuf_rollback_to_svpP4obufP8obuf_svpobuf_init_posis_last_posibuf_resetobuf_resetibuf_create_Z12iobuf_deleteP5iobufcache_forslab_caches_initfree_slabsslab_cacheslab_slist_headcache_linkslab_caches_Z21salloc_ptr_from_indexmred_zoneastatformat_slabslab_validate_Z19salloc_ptr_to_indexPv_Z11salloc_freev_Z6sallocmPKccache_free_linkarena_allocMAX_SLAB_ITEMslab_arena_statsarena_initsalloc_statsalloc_init_Z13slab_validatevsfreeslab_headerslab_nommap_baseitem_nosalloc_freeptr_sizefully_formattedslab_tailq_head_Z5sfreePvslab_ofMAX_SLAB_ITEM_COUNTbrk_startSLAB_SIZE_Z11salloc_statPFiPK16slab_cache_statsPvEP16slab_arena_statsS2_salloc_stat_cbSLAB_MAGIC/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/salloc.ccslab_itemsalloc_ptr_to_indexslab_active_caches_Z11salloc_initmmdsalloc_ptr_from_indexmmap_sizevalid_item_Z22tarantool_coro_destroyP14tarantool_coro_SC_THREAD_PRIO_PROTECTtarantool_coro_create_SC_VERSION_SC_NL_NMAX_SC_SYNCHRONIZED_IO_SC_THREAD_PRIORITY_SCHEDULING_SC_NPROCESSORS_ONLN_SC_TIMEOUTS_SC_BASE_SC_PII_OSI_COTS_SC_MONOTONIC_CLOCK_SC_THREAD_SAFE_FUNCTIONS_SC_IOV_MAX_SC_STREAM_MAX_SC_PRIORITIZED_IO_SC_V6_ILP32_OFF32_SC_THREAD_SPORADIC_SERVER_SC_SHRT_MIN_SC_USHRT_MAX_SC_NL_TEXTMAX_SC_STREAMS_SC_THREAD_DESTRUCTOR_ITERATIONS_SC_PIPE_SC_BC_DIM_MAX_SC_MAPPED_FILES_SC_2_C_BIND_SC_MQ_OPEN_MAX_SC_XOPEN_SHM_SC_INT_MAX_SC_2_FORT_DEV_SC_XOPEN_XPG2_SC_XOPEN_XPG3_SC_XOPEN_XPG4_SC_PII_INTERNET_SC_V7_LP64_OFF64_SC_DELAYTIMER_MAX_SC_MB_LEN_MAX_SC_ATEXIT_MAX_SC_REALTIME_SIGNALS_SC_DEVICE_SPECIFIC_R_SC_BC_SCALE_MAX_SC_THREAD_PROCESS_SHARED_SC_SAVED_IDS_SC_C_LANG_SUPPORT_R_SC_2_C_DEV_SC_XBS5_LPBIG_OFFBIG_SC_2_C_VERSION_SC_SCHAR_MAX_SC_SSIZE_MAX_SC_2_UPE_SC_IPV6_SC_BC_BASE_MAX_SC_POLL_SC_XOPEN_REALTIME_SC_SYSTEM_DATABASE_R_SC_CHAR_MAX_SC_T_IOV_MAX_SC_LEVEL1_ICACHE_ASSOC_SC_READER_WRITER_LOCKS_SC_SYMLOOP_MAX_SC_TRACE_LOG_SC_THREAD_CPUTIME_SC_XBS5_ILP32_OFFBIG_SC_PII_INTERNET_DGRAM_SC_2_PBS_TRACK_SC_FILE_ATTRIBUTES_SC_ASYNCHRONOUS_IO_SC_FSYNC_SC_LEVEL1_DCACHE_ASSOC_SC_DEVICE_SPECIFIC_SC_MEMLOCK_SC_LONG_BITtarantool_coro_destroy_SC_SEM_NSEMS_MAX_SC_EQUIV_CLASS_MAX_SC_XOPEN_STREAMS_SC_LEVEL1_ICACHE_LINESIZE_SC_REGEX_VERSION_SC_2_PBS_ACCOUNTING_SC_AIO_MAX_SC_LEVEL2_CACHE_LINESIZE_SC_XOPEN_VERSION_SC_FILE_LOCKING_SC_SHELL_SC_TZNAME_MAX_SC_SPORADIC_SERVER_SC_MEMLOCK_RANGE_SC_AVPHYS_PAGES_SC_2_LOCALEDEF_SC_V7_ILP32_OFFBIG_SC_PII_XTI/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/coro.cc_SC_V7_LPBIG_OFFBIG_SC_LEVEL3_CACHE_ASSOC_SC_FILE_SYSTEM_SC_PAGESIZE_SC_LEVEL4_CACHE_ASSOC_SC_V6_ILP32_OFFBIG_SC_SIGQUEUE_MAX_SC_SPAWN_SC_DEVICE_IO_SC_V6_LPBIG_OFFBIG_SC_2_VERSION_SC_LEVEL4_CACHE_SIZE_SC_USER_GROUPS_R_Z21tarantool_coro_createP14tarantool_coroPFvPvES1__SC_LINE_MAX_SC_CPUTIME_SC_UIO_MAXIOV_SC_HOST_NAME_MAX_SC_C_LANG_SUPPORT_SC_THREAD_KEYS_MAX_SC_THREAD_STACK_MIN_SC_SEMAPHORES_SC_UINT_MAX_SC_CHILD_MAX_SC_NGROUPS_MAX_SC_SINGLE_PROCESS_SC_XOPEN_CRYPT_SC_LEVEL3_CACHE_LINESIZE_SC_TTY_NAME_MAX_SC_MEMORY_PROTECTION_SC_CHAR_BIT_SC_LEVEL1_DCACHE_SIZE_SC_CLOCK_SELECTION_SC_CLK_TCK_SC_TIMERS_SC_BARRIERS_SC_ULONG_MAX_SC_MQ_PRIO_MAX_SC_TRACE_SC_LEVEL3_CACHE_SIZE_SC_SPIN_LOCKS_SC_LEVEL1_DCACHE_LINESIZE_SC_BC_STRING_MAX_SC_NPROCESSORS_CONF_SC_INT_MIN_SC_V7_ILP32_OFF32_SC_TRACE_SYS_MAX_SC_FD_MGMT_SC_REGEXP_SC_LEVEL1_ICACHE_SIZE_SC_RE_DUP_MAX_SC_ADVISORY_INFO_SC_SHRT_MAX_SC_XBS5_LP64_OFF64_SC_SYSTEM_DATABASE_SC_XOPEN_REALTIME_THREADS_SC_THREAD_ROBUST_PRIO_PROTECT_SC_2_CHAR_TERM_SC_PASS_MAX_SC_FIFO_SC_ARG_MAX_SC_LEVEL2_CACHE_SIZE_SC_2_PBS_CHECKPOINT_SC_2_FORT_RUN_SC_TRACE_EVENT_FILTER_SC_SEM_VALUE_MAX_SC_THREAD_ATTR_STACKSIZE_SC_AIO_LISTIO_MAX_SC_THREAD_ROBUST_PRIO_INHERIT_SC_THREADS_SC_PII_SC_TRACE_INHERIT_SC_WORD_BIT_SC_XBS5_ILP32_OFF32_SC_PII_OSI_M_SC_2_SW_DEV_SC_CHAR_MIN_SC_XOPEN_UNIX_SC_PII_OSI_SC_UCHAR_MAX_SC_SCHAR_MIN_SC_PRIORITY_SCHEDULING_SC_SELECT_SC_NETWORKING_SC_TIMER_MAX_SC_TRACE_EVENT_NAME_MAX_SC_V6_LP64_OFF64_SC_GETGR_R_SIZE_MAX_SC_LOGIN_NAME_MAX_SC_EXPR_NEST_MAX_SC_PII_INTERNET_STREAM_SC_SS_REPL_MAX_SC_RAW_SOCKETS_SC_LEVEL4_CACHE_LINESIZE_SC_SIGNALS_SC_MESSAGE_PASSING_SC_NL_MSGMAX_SC_SHARED_MEMORY_OBJECTS_SC_CHARCLASS_NAME_MAX_SC_PII_OSI_CLTS_SC_TYPED_MEMORY_OBJECTS_SC_2_PBS_SC_PHYS_PAGES_SC_PII_SOCKET_SC_MULTI_PROCESS_SC_LEVEL2_CACHE_ASSOC_SC_OPEN_MAX_SC_THREAD_THREADS_MAX_SC_NZERO_SC_GETPW_R_SIZE_MAX_SC_2_PBS_MESSAGE_SC_RTSIG_MAX_SC_THREAD_ATTR_STACKADDR_SC_TRACE_NAME_MAX_SC_COLL_WEIGHTS_MAX_SC_XOPEN_ENH_I18N_SC_XOPEN_LEGACY_SC_JOB_CONTROL_SC_NL_LANGMAX_SC_USER_GROUPS_SC_2_PBS_LOCATE_SC_NL_SETMAX_SC_NL_ARGMAX_SC_THREAD_PRIO_INHERIT_SC_TRACE_USER_EVENT_MAX_SC_AIO_PRIO_DELTA_MAX_SC_XOPEN_XCU_VERSION_Z9stat_freevstats_max/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/stat.cc_Z13stat_registerPPKcmstat_collectstat_registermax_idxstat_freestat_max_name_lenstat_agestats_sizestat_foreach_Z9stat_initvinitial_basestat_recalc_max_name_len_Z12stat_foreachPFiPKcilPvES1__Z8stat_ageP8ev_timeristat_cleanup_Z12stat_cleanupim_Z12stat_collectiil/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/log_io.cclptrlog_io_verify_metalog_io_atforkext_lenrow_count_Z11log_io_syncP6log_iolog_io_cursor_next_Z15format_filenameP7log_dirl10log_suffixheader_crc32cmetadata_Z18log_io_cursor_nextP13log_io_cursorPjcrc32_calclog_io_cursor_open_Z11log_io_openP7log_dir8log_modePKc10log_suffixP8_IO_FILE_Z21inprogress_log_renameP6log_io_Z12row_v11_fillP7row_v11ltmPKcmS2_meof_marker_v11row_v11cmp_i64row_v11_fillROW_EOFlog_io_open_for_writeinprogress_suffixinprogress_log_renameheader_crc_Z14row_reader_v11P8_IO_FILEPj_Z19find_including_fileP7log_dirl_Z21log_io_open_for_writeP7log_dirl10log_suffixformat_filenameheader_v11_fill_Z18log_io_cursor_openP13log_io_cursorP6log_io_Z13log_io_atforkPP6log_ioheader_v11_signuintmax_ttarget_lsnlog_io_write_headermetadata_lengood_offsetlog_io_cursor_closedata_crclog_io_openINPROGRESSrow_reader_v11_Z21inprogress_log_unlinkPcdata_crc32csuffix_strrow_marker_v11log_io_close_Z20log_io_open_for_readP7log_dirl10log_suffixcrc32_func_Z15header_v11_signP10header_v11ext_is_oknew_filenamemarker_offsetfind_including_fileinprogress_log_unlink_Z12greatest_lsnP7log_dirlog_io_synclog_io_open_for_readret_lsnlog_magic_t_Z19log_io_cursor_closeP13log_io_cursoreof_read_Z12log_io_closePP6log_io__align__pthread_mutex_s__total_seqPTHREAD_MUTEX_NORMALxlog_handlerrecovery_update_moderecovery_stop_filewal_writer_poprecover_walwakeup_lsn_waiter__wakeup_seqrow_v11_sizePTHREAD_MUTEX_TIMED_NPwal_schedule_queuerecovery_stop_localpthread_t__woken_seqrecovery_free__mutex__ownermax_rowssnap_write_batch__lockworker_argsPTHREAD_MUTEX_DEFAULTwal_fifo_entry__pthread_list_trecover_existing_walswal_writer_stopattrsnapshot_write_row__nwaiterswal_fill_batch__datanew_limit__kindwal_opt_rotaterecover_remaining_walsnext_walwal_writer_init_oncewal_writer_childrow_lenwal_to_closerecovery_finalize__sizewal_writer_destroyPTHREAD_MUTEX_ERRORCHECK_NP__countrecover_current_wal/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/recovery.cc__pthread_internal_list__prevrecovery_initrecovery_watch_filewal_writer_startsnapshot_savewal_write_batch__broadcast_seqmax_iovPTHREAD_MUTEX_FAST_NPconfirm_lsnwal_writer_onceoldsetPTHREAD_MUTEX_RECURSIVE_NPrecovery_rescan_fileinput_was_empty__nextnext_lsnpthread_once_trecovery_rescan_diris_shutdownrows_written19pthread_mutexattr_twait_lsn_clearcondrecover_snapsnap_handlersnapshot_cookielast_syncwal_lsnwait_lsn_setwal_greatest_lsnwal_schedulewal_dirnamerecovery_update_io_rate_limitPTHREAD_MUTEX_RECURSIVEset_lsnrows_beforerecovery_setup_panicbatch_endwal_writer_initis_rollback__spins__nusersdir_timerrecovery_follow_localev_statdatais_commitev_staterrorcheckwal_write_requestelemwal_opt_synccurrent_lsn_Z15wal_writer_stopP14recovery_state14pthread_cond_tread_logsave_current_walwrite_event__listPTHREAD_MUTEX_ERRORCHECK_Z14wal_writer_popP10wal_writerP8wal_fifofio_batch_is_fullsnap_dirnamewal_write_to_diskrecovery_wait_lsn__futexPTHREAD_MUTEX_ADAPTIVE_NPwal_writer_threadwal_write15pthread_mutex_tadmin_errorsalloc_stat_admin_cbcoio_writetr101strend/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/admin.cctr131tr137tr138strstartmake_scoped_guard >tr154total_usedtr164tr165tr168unknown_commandtr173tr98admin_first_finaladmin_en_maintr13tr14salloc_stat_admin_cb_ctxtr20tr33tr34tr36tr37tr102tr43tr44tr67tr68_Z9show_statP4tbufshow_stat_itemtr77admin_dispatchtr99show_stattr153admin_startadminshow_slabadmin_handler_Z10admin_initPKciScopedGuard >tarantool_infoadmin_initwarning_said_Z15remote_read_rowP5ev_ioP5iobufPjremote_read_rowcoio_breadnremote_addrreconnect_delayrecovery_stop_remoteremote_apply_rowrecovery_follow_remoteremote_connectrequest_leninitial_lsn/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/replica.ccpull_from_remotecoio_readnoldbufiproto_session_idiproto_process_connectret_codeiproto_queue_is_emptyiproto_enqueue_requestrequest_queuerlist_shiftnewbufScopedGuard >errmsg_leniproto_session_output_iobufmsg_codeiproto_init_Z11iproto_initPKciiiobuf_is_idleiproto_session_on_inputiproto_portprocess_fun__headerparse_size__sessioniproto_queue_handlerscope_guardiproto_on_acceptiproto_replyiproto_process_disconnectiproto_queue_initiproto_process_requestdummy_headeriproto_session_input_iobufmake_scoped_guard >iproto_enqueue_batchiproto_queue_scheduleiproto_reply_pingIPROTO_REQUEST_QUEUE_SIZEsecondaryi_queueiprotofiber_cacheevio_service_on_bindiproto_session_on_output/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iproto.cciproto_session_cacheiproto_cache_fiberiproto_port_initiproto_session_destroynext_in_cachereventwrite_posiproto_session_shutdowniproto_headerbodybatch_sizeIPROTO_BODY_LEN_MAXiproto_reply_headeriproto_flushiproto_reply_errorcallbackiproto_validate_headeriproto_session_is_idleiproto_port_vtabiproto_requestiproto_dequeue_requestiproto_request_fiproto_sessionmsg_pingiproto_session_createiproto_queueiproto_port_eofobuf_svp_to_ptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/iproto_port.cciproto_port_add_tuple/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/session.ccsession_registry_Z12session_initv_Z15session_destroyjsession_trigger_fsession_free_Z14session_createisid_maxsession_fd_Z12session_freev_Z10session_fdj_ZN11SystemErrorC2EPKcj_ZNK11SystemError6errnumEv_ZN9ExceptionC2EPKcj_ZN11SystemError4initEPKcP13__va_list_tag_ZNK11ClientError3logEv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/exception.cc_ZN11LoggedErrorC2IIPKcEEES2_jjDpT__ZN9ExceptionC2ERKS__ZN11ClientErrorC2EPKcjjzm_errcodetnt_errcode_descLoggedError_ZN11SystemError4initEPKcz_ZNK11SystemError3logEv_ZN14ErrorInjectionC2EPKcjS1__ZN13IllegalParamsC2EPKcjS1_m_errnum_ZN11ClientErrorC2EPKcjS1_j/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errcode.cerrinj_get/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errinj.ccerrinj_set_Z10errinj_getierrinj_set_bynameerrinj_lookup_Z10errinj_setiberrinjerrinj_info_Z11errinj_infoP4tbuferrinjs_Z17errinj_set_bynamePcb/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/fio.cfio_writevto_writefio_filenameeffective_offsetfilename_pathfio_lseekfio_batch_startfio_readfio_writegood_byteswhencefio_batch_writefio_batch_allocproc_pathfio_truncatefio_batch_addcrc32_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/crc32.cp_endrope_node_printrope_node_heightl_left_heightold_sizel_right_heightrope_iter_nextrope_relinkconninsert_heightavl_route_to_offsetchild_prefix_lenr_leftr_left_heightr_right_heightl_leftavl_rebalance_after_deleterope_clearadjust_sizel_rightavl_route_to_nextrope_erasevisit_leafrope_traverserssize_tavl_rotate_doublerope_node_newsplit_noderope_pretty_printrope_iter_start/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.cleft_sizeprint_leafr_rightrope_iter_down_to_leafchild_prefixmirrorrope_insertrope_node_splitavl_rebalance_after_insertrope_checkavl_rotate_singlerope_extract_nodelbox_info_indexlbox_info_calllbox_info_snapshot_pidlbox_info_uptimelbox_info_init_static_valueslbox_info_recovery_last_update_tstamp_Z23tarantool_lua_info_initP9lua_Statetarantool_lua_info_initlbox_info_statuslbox_info_dynamic_metalbox_info_recovery_lag/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/info.cclbox_info_lsn/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/stat.ccset_stat_itemfill_stat_item_Z23tarantool_lua_stat_initP9lua_Stateseek_stat_itemlbox_stat_indexlbox_stat_metalbox_stat_calltarantool_lua_stat_initlbox_slab_dynamic_metalbox_slab_slabslbox_slab_arena_sizesalloc_stat_lua_cb_Z23tarantool_lua_slab_initP9lua_Statelbox_slab_arena_usedlbox_slab_calllbox_slab_indextarantool_lua_slab_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/slab.cclbox_ipc_channel_get_Z22tarantool_lua_ipc_initP9lua_Statelbox_ipc_channellbox_ipc_channel_is_fullretvallbox_check_channellbox_ipc_channel_gclbox_ipc_channel_puttarantool_lua_ipc_initlbox_ipc_channel_broadcastlbox_ipc_channel_has_writerschannel_metaipc_metalbox_ipc_channel_has_readers/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/lua_ipc.ccchannel_liblbox_ipc_channel_is_emptystatus_strsbio_pushsocketlbox_socket_closeBIO_LIMITBIO_ERRORlbox_socket_readlinebio_socketlbox_socket_recvlbox_socket_recvfromlbox_socket_connecttarantool_lua_socket_initsep_sizelbox_socket_bindSHUT_RDWRlbox_socket_tcpreadline_state_initbio_initbufhbufSHUT_RDseplistlbox_socket_metabio_pushrecverrorBIO_EOFbio_pusherrorcodelbox_socket_sendbio_statusmutex_destroyreadline_stateio_rcoio_bread_timeoutio_wlbox_socket_readline_crlbox_socket_tostringbio_pushsockerrorbio_checkactivesocketio_w_mutexlbox_socket_readline_optsreadline_state_nextSHUT_WRlbox_socket_udprs_sizebio_pusheof/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/lua_socket.ccclientbio_pushstatuslbox_socket_errorfirst_matchedbio_checksocketlbox_socket_acceptbio_pusherrorbio_pushsenderrorio_r_mutexBIO_TIMEOUTsocketliblbox_socket_listenbio_clearerr_Z25tarantool_lua_socket_initP9lua_Statelbox_socket_shutdownsocketlib_namelbox_socket_sendtosessionliblbox_session_existslbox_session_triggerlbox_session_set_triggersessionlib_namelbox_session_on_disconnecttarantool_lua_session_initlbox_session_peerlbox_session_id/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/session.cclbox_session_run_trigger_Z26tarantool_lua_session_initP9lua_Statelbox_session_metalbox_session_on_connecttarantool_lua_cjson_init_Z24tarantool_lua_cjson_initP9lua_State/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/cjson.cc/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lua/uuid.lua.ciquotientiremainder__sig__eax__level__ecxsse42_enabled_cpu__extcrc32c_hwcrc32c_hw_byte__get_cpuid__get_cpuid_max/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/cpu_feature.cptmp__ebx__edxbcast_Z23ipc_channel_has_writersP11ipc_channel/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/ipc.ccbcast_msg_Z21ipc_channel_broadcastP11ipc_channelPv_Z18ipc_channel_deleteP11ipc_channelipc_channel_get_timeout_Z23ipc_channel_put_timeoutP11ipc_channelPvdipc_channel_put_timeoutipc_channel_newstarted_Z23ipc_channel_get_timeoutP11ipc_channeld_Z15ipc_channel_getP11ipc_channel_Z15ipc_channel_putP11ipc_channelPvipc_channel_create_Z23ipc_channel_has_readersP11ipc_channelfirst_try_Z19ipc_channel_is_fullP11ipc_channelipc_channel_destroy_Z20ipc_channel_is_emptyP11ipc_channel_Z15ipc_channel_newjipc_channel_deletereheapev_set_loop_release_cbev_checkANHEepoll_epermcntEVBACKEND_MASKANFSinfy_delev_loop_forkf_blocksev_timer_remainingEVBACKEND_KQUEUEev_timeANPENDINGev_suspendinotify_eventrfeedmaxev_cleanup__fsid_tnow_floorarray_nextsizef_ffreepreparemaxANSIGEPOLLMSGepoll_eventmaxvec_maxev_depthev_feed_fd_eventsigfd_setperiodics_reifycheckswlist_deltimers_reifysignalschildcbIN_NONBLOCKpostforkevpipe_writeev_feed_signal_eventf_bsizeEPOLLHUPEVBACKEND_POLLcleanupcntfd_internminatEPOLLRDNORMhave_realtimeselect_modifyev_fork_starto_eventsev_onceev_verifypending_wEPOLLRDBANDev_userdataev_loop_destroycurpidEVBACKEND_DEVPOLLepoll_eventsutsnameEPOLL_EVENTSev_default_loop/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebeidleallev_invoke_pendingsigfd_wcheckcntev_preparehave_monotonicocur_once_cb_io__fsblkcnt64_tev_recommended_backendsev_timer_stopevpipe_initpendingcntev_backendselect_pollev_syserrdomainnameEPOLLINcleanupsev_refidle_reifysleeptimesigfdev_supported_backendsforkmaxev_starttime_updatependingcbev_signal_starttimevalev_idle_stopev_set_syserr_cbdownheapf_fsidprev_mn_nowev_prepare_startfd_ebadfarray_verifypollidxmax__fsword_tpendingspollmaxev_stat_stopfdchangemaxev_child_startasynccntev_periodic_stopEVBACKEND_PORTqueue_eventschildevpri_adjustfs_2625sigfdcbEVBACKEND_SELECTev_set_timeout_collect_intervalev_forkfeed_reverse_doneminposnodename__fd_maskadjustheapemaskfd_event_nocheckidlemaxtv_usecf_filesacquireIN_CLOEXECevpipeev_sighandlertracedEPOLLRDHUPfs_fdinfy_newfdmn_prevfd_enomemev_idle_startepoll_pollselect_initEPOLLERRonce_cbwaittimeacquire_cbperiodicmaxtimermaxwlist_addfs_hashodiffselect_destroyupheaprfeedsrfeedcntev_check_2625pipe_write_wantedev_resumeev_timer_againev_periodicloop_initev_set_io_collect_intervalforkcntinfy_addpollfdncur__fsfilcnt64_tEVBACKEND_ALLsysnameev_async_startfd_reifyreschedule_cbcounterev_version_minorasyncmaxasync_pendinganfdmaxev_feed_eventpollidxsold_errnoEPOLLOUTEPOLL_CLOEXECev_timer_startev_io_startfd_validev_set_allocatorword_rev_breakepoll_initepoll_forkdec_egenfd_changeev_stat_startEPOLL_NONBLOCKpreparesonce_cb_to__suseconds_tev_runEPOLLONESHOTvec_rivec_roepoll_epermmaxperiodics_rescheduleev_sleepev_cleanup_stopEPOLLETsignalfd_siginfooldmaskanfdword_wEPOLLPRIev_async_stopfds_bitsev_async_sendperiodicsperiodic_recalcev_linux_versionpollsev_iterationev_is_default_loopev_version_majorev_clear_pendingfdchangesbackend_fdf_bfreef_namelenchildsepoll_destroytimersrtmn_diffo_reifyenable_securebackend_polltimers_reschedulewantcleanupmaxEVBACKEND_EPOLLpollcntactivecntfdchangecntEPOLLWRBANDf_flagsget_clockev_reallocev_check_startev_signal_stopEPOLLWRNORMbackend_mintimeev_default_loop_ptrvec_wiinfy_cbvec_woidlecntepoll_eventdummychild_reapepoll_dataev_pending_countinvoke_cbtimeout_blocktimef_bavailev_invokeev_set_invoke_pending_cbev_periodic_againcheckmaxfd_killev_set_userdataf_typenew_maxloop_doneev_stopev_check_stopssi_signoev_io_stopeventcntbackend_modifypendingmaxverify_heapperiodiccnttimercntev_now_updateev_embeddable_backendspollidx_initev_stat_statsig_pendingev_child_stop/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/tarantool_ev.cev_feed_signalev_prepare_stoppipe_wev_realloc_emulev_periodic_startasyncsforksinfy_forkinfy_wdfeed_reverseepoll_data_tmax_blockarray_reallocfd_rearm_allinfy_initverify_watcherpipecbev_fork_stopf_frsizepreparecntstatfsev_unrefpipe_write_skippedfs_wANFDidlesmachineEPOLLWAKEUPio_blocktimeloop_depthfd_setsizeorigflagsev_floorepoll_epermsloop_countstat_timer_cbev_cleanup_startpendingpriepoll_modifyanfdsgrp_try_feedmaxtimef_favailnamesallocscore_bitsEIO_DT_DOOREIO_FTRUNCATEeio_chownEIO_MKNODEIO_READDIR_DIRS_FIRSTmodtimeeio_fsyncEIO_RMDIReio_mlockeio_fallocategrp_deceio__sendfileeio_set_idle_timeoutEIO_SEEK_SETeio_syncstk_idxin_offseteio_dent_insertion_sortetp_end_threadnbytesEIO_READLINKreqq_pusheio_gid_teio_readeio_closeeio_submitres2EIO_STATetp_reqqxcond_tEIO_READDIR_CUSTOM2etp_initentpEIO_DT_NWKEIO_MLOCKALLactimeetp_nreqseio__1pathEIO_WRITEetp_start_threadEIO_LSTATEIO_FLAG_PTR1_FREEeio_grp_limitbase_stkxthread_teio_sync_file_rangeeio__2patheio__scandiretp_proc_initeio_sendfileeio_nthreadsEIO_TRUNCATEEIO_DT_MAXEIO_DUP2eio_symlinkEIO_READDIR_CUSTOM1eio__mlockEIO_WD_OPENeio__syncfsthr_argEIO_UTIMEEIO_CUSTOMEIO_UNLINKetp_submiteio_set_min_paralleleio_futimeendiannessreqq_shifteio_dup2tv_nownsecondseio__fallocateeio_rmdirEIO_FUTIMEeio_unlinkeio_finishEIO_FSYNCEIO_BUSYxmutex_tnew_pathres_queueeio_linkout_fdeio__readaheadEIO_FLAG_GROUPADDmaxreqsEIO_DT_REGeio_wd_openeio_nreqsEIO_DT_BLKeio_truncateeio_wd_close_syncEIO_SEEK_CUReio_grp_addetp_maybe_start_threadPTHREAD_CREATE_JOINABLEeio_readlinkEIO_MT_MODIFYeio_fdatasynceio__mlockalleio__wd_open_syncEIO_SYMLINKEIO_MS_SYNCin_fdEIO_PRI_DEFAULTEIO_CLOSEdone_pollEIO_MSYNCetp_set_min_paralleleio_grpEIO_READDIREIO_DT_NAMetp_set_max_poll_timeEIO_OPENEIO_SYNC_FILE_RANGEeio_mlockalleio_set_max_poll_reqsEIO_DT_CHREIO_DT_LNKeio_api_destroyeio_wd_open_syncEIO_WD_CLOSEwrklockEIO_READDIR_FOUND_UNKNOWNPTHREAD_SCOPE_SYSTEMeio_dent_sortetp_npendingeio__futimesEIO_DT_WHTtv_starteio_sendfile_synceio_pollEIO_READDIR_DENTSPTHREAD_CREATE_DETACHEDetp_set_max_paralleldirfdeio_fstatvfseio_renamereslockeio_bufetp_set_idle_timeoutdentseio_mkdireio_syncfsEIO_CHOWNetp_workertvdiffdirpEIO_MS_ASYNCtmpbuf_getEIO_SEEK_ENDeio_ino_tquitpthread_attr_t__f_sparerellenEIO_SYNCinode_bitseio_chmodeio_grp_feedinodeeio__realpathEIO_PRI_MAXwrk_firsteio_fchowneio_npendingEIO_READEIO_FCHOWNEIO_DT_UNKNOWNEIO_MCL_FUTUREeio_fstateio__lseekEIO_READAHEADEIO_MLOCKxthread_createf_flagPTHREAD_SCOPE_PROCESSreq_queueeio_stattmp1tmp2EIO_FSTATVFSeio_set_max_poll_timeeio_readaheadEIO_DT_DIReio_lstatEIO_REALPATHeio_set_max_paralleltodoeio__msyncutimbufeio_pagesizeEIO_DT_MPBeio__mtoucheio__utimesEIO_REQ_TYPE_NUMeio_mknodeio_set_max_idlenamesoffseio_nopeio_canceleio_ftruncateeio_realpathetp_set_max_poll_reqseio_seekf_namemaxEIO_DT_CMPeio_dent_radix_sortdentallocetp_nthreadseio__sync_file_rangeEIO_LINKeio__statvfsatEIO_FLAG_PTR2_FREE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/tarantool_eio.ceio_writeetp_canceleio_wd_closeEIO_MKDIRdone_poll_cbEIO_FDATASYNCsymlinkseio_readdirreqq_initEIO_MCL_CURRENTEIO_PRI_MINeio_direntoldsigsetEIO_RENAMEeio_busyEIO_CHMODnameofseio_statvfsEIO_SYNCFSeio__truncateateio_destroyeio_nreadyEIO_MTOUCHfullsigsetetp_set_max_idleEIO_READDIR_STAT_ORDERlinklenEIO_GROUPeio_executeetp_worker_freeeio_dent_cmpetp_worker_cleareio_fchmodEIO_FSTATEIO_DT_FIFOeio_dtypewant_pollEIO_FCHMODEIO_SENDFILEatimeEIO_SEEKEIO_STATVFSetp_nreadyeio_uid_tdentoffsreqwaiteio_msynceio_openeio_grp_canceleio_utimeend_stkEIO_DT_SOCKetp_pollbit_stkeio_page_alignreqlockEIO_MS_INVALIDATEeio_mtouchetp_procEIO_NOPEIO_FALLOCATEEIO_DT_MPCcoro_init_argnew_corocoro_funcnctxcoro_init_func/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/coro.cssizecreate_corocoro_initsptrlongsgoptgopt_helpgopt_arg_iargs_stopgopt_freehelp_arg/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/gopt/gopt.cgopt_argoption_cpname_cpvptr_optsopt_specslong_opt_widthargs_lenargs_ptropt_counthelp_widthfound_longopt_popt_shelp_paddinggopt_argshas_shortsopt_spec_popt_spec_sopt_spec_tnext_optioncontinue_2opt_tbreak_2short_optgopt_sortarg_pnext_operandjson_cfg_decode_invalid_numbersjson_cfg_encode_max_depthstrbuf_empty_ptrjson_token_type_tlocal_encode_bufT_ENDT_NULLjson_parse_tstrbuf_tencode_sparse_ratiojson_encodeT_WHITESPACElua_cjson_safe_newjson_next_number_tokenT_OBJ_BEGINjson_enum_optionlindexjson_encode_exceptionstrbuf_append_char_unsafestrbuf_ensure_empty_lengthjson_parse_array_contextjson_append_numbercodepoint_to_utf8reallocsjson_set_token_errorsettingstrbuf_ensure_nulljson_append_arraystrbuf_append_memjson_check_encode_depthescape2charjson_throw_parse_errorjson_cfg_decode_max_depthT_BOOLEANT_OBJ_ENDT_ARR_ENDescape_lencurrent_depthbool_optionsjson_cfg_encode_invalid_numbersT_ARR_BEGINjson_fetch_configjson_next_tokenjson_lenstrbuf_resetluaopen_cjson_safedynamicjson_token_type_namejson_is_invalid_numberjson_protect_conversionreasonT_STRINGstrbuf_extend_lengthlua_array_lengthjson_cfg_encode_sparse_arrayjson_next_string_tokenerrtypejson_arg_initstrbuf_empty_lengthT_COLONbool_truech2tokenkeytypejson_append_datadigithexdigit2intlua_cjson_newchar2escapejson_decodeluaopen_cjson/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/lua_cjson.ccodepointjson_integer_optionjson_process_valuestrbuf_append_charjson_decode_ascendjson_token_tluaL_setfuncsoptindexT_COMMAjson_append_stringjson_create_configT_NUMBERjson_append_objectencode_sparse_safejson_parse_object_contextstring_lenstrbuf_append_mem_unsafeslotsjson_cfg_encode_number_precisionold_valuejson_cfg_encode_keep_bufferencode_sparse_convertT_ERRORjson_decode_descendstrbuf_stringjson_config_tdecode_hex4surrogate_lowjson_destroy_configcommaescstrjson_append_unicode_escape/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/strbuf.cstrbuf_initstrbuf_append_fmtstrbuf_set_incrementreqsizestrbuf_resizestrbuf_free_to_stringstrbuf_append_fmt_retryfmt_lencalculate_new_sizeempty_lenstrbuf_append_stringdebug_statsstrbuf_freenewsizestrbuf_newendbuffpconv_strtodlower_ch/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/lua-cjson/fpconv.cvalid_number_characterset_number_formatlocalbuffpconv_g_fmtfpconv_update_localefpconv_initstrtod_buffer_sizelocale_decimal_pointrunning_lengthcrc32sctp_crc_tableil8_o40/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/crc32.csctp_crc_tableil8_o48sctp_crc_tableil8_o64sctp_crc_tableil8_o80sctp_crc_tableil8_o88to_even_wordcrc32c_sb8_64_bitmultitable_crc32csctp_crc_tableil8_o56crc32_tablesctp_crc_tableil8_o32init_bytesp_bufterm1term2end_bytescrc32c_tablesctp_crc_tableil8_o72singletable_crc32cps_buffer_sizeend_of_areanew_environ/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/proctitle.cps_buffer_fixed_sizebasename_bufps_bufferlast_status_lensave_argcsave_environinit_set_proc_titlenew_argvsave_argvfree_proc_title/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/qsort_arg.cswapfuncpresortedqsort_argswaptypemed3/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/PMurHash.cpcarryPMurHash32_ResultPMurHash32_ProcessPMurHash32_testseedtotal_lengthPMurHash32encodingin_base64base64_encode_blockendcodeposin_posin_endbase64_decodestateout_endfragmentbase64_decodestepbase64_decode_valuebase64_decode_blockbase64_decodedecodingbase64_decodestate_initout_binbase64_encodestepdecoding_sizeout_pos/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/base64.cin_binbase64_encodestatestep_Astep_Bstep_Cout_lenout_base64base64_encodestate_initbase64_encodebase64_encode_valuestepcountin_lenbase64_encode_blockstep_astep_bstep_cstep_d_itoa_upper_digits__register_atfork/build/eglibc-9jq3jy/eglibc-2.17/nptl__dso_handle__pthread_atfork_itoa_lower_digitspthread_atfork.cbitset_expr_add_conjbitset_expr_clearbitset_expr_reserve/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/expr.cpre_noterror_1error_2bitset_expr_createbitset_expr_destroybitset_expr_add_parambitset_idbitset_expr_conj_reserveEXPR_DEFAULT_CAPACITYEXPR_CONJ_DEFAULT_CAPACITYbitset_iterator_next_page/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/iterator.cexconjPAGE_BITITERATOR_CONJ_DEFAULT_CAPACITYbitsets_sizebitset_iterator_initbitset_iterator_nextitconjbitset_iterator_conj_prepare_pagep_bitsetsbitset_iterator_conj_reserveconj1conj2bitset_iterator_conj_cmpbitset_iterator_rewindBITSET_PAGE_DATA_SIZEbitset_iterator_createbitset_iterator_conj_rewinderror_3bitset_iterator_destroybitset_iterator_reservebitset_iterator_prepare_pagebitset_iterator_first_pageITERATOR_DEFAULT_CAPACITYbit_itbit_existbitset_index_expr_all_not_set/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/index.cbitset_index_expr_equalsINDEX_DEFAULT_CAPACITYrposbitset_index_createbitset_index_reservebitset_index_insertbitset_index_expr_any_setbitset_index_destroybitset_index_expr_allbitset_index_expr_all_setbitset_index_contains_valuebitset_index_init_iteratorbitset_index_remove_valuebitset_destroypage_total_sizebitset_setpage_data_alignmentbitset_clearcardinality_checkbitset_destroy_iter_cb/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/bitset.cbitset_infopage_data_sizebitset_testbitset_createbitset_page_andbitset_pages_searchpathpleftrightbitset_pages_firstbitset_page_set_zerosbitset_pages_lastbitset_pages_nsearchbitset_pages_iterbitset_pages_reverse_iterbitset_pages_reverse_iter_startbitset_page_set_onesunodebitset_page_destroybitset_word_tbitset_page_createleftrightleftbitset_pages_newrbtreerealloc_argbitset_page_orleftleftbitset_pages_removebitset_page_alloc_sizebitset_pages_psearchbitset_page_databitset_pages_iter_start/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/page.cpage_cmptrednodepbitset_page_nandtnodecnodebitset_page_first_posbitset_pages_reverse_iter_recursebitset_pages_prevbitset_pages_nextbitset_pages_insertbitset_pages_iter_recurseprev_posbit_rotl_u32bit_iterator_initbit_clz_u32bit_index_u64bit_rotr_u64bit_ctz_u64bit_rotl_u64bit_clearbit_testbit_rotr_u32bit_count_u32/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/bit.cbit_iterator_nextbit_setbit_index_u32bit_count_u64bswap_u32bit_ctz_u32bit_clz_u64=A=Aw=A=Aw=A=Av=A=AwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAw=A=Aw=A=Aw=A'@Av'@A(@AwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAw(@A)@Aw)@A,@Aw,@Ar@Avr@As@Aws@At@Awt@Aw@Aww@A@Av@A@Aw@A@Aw@A@Aw@A,AAv,AA-AAw-AA.AAw.AA1AAw1AAQBAvQBARBAwRBASBAwSBAVBAwVBAzBAvzBA{BAw{BA|BAw|BABAwBACAvCACAwCACAwCA CAw CACAvCACAwCACAwCACAwCAFAvFA FAw FA!FAw!FA$FAw$FAGAvGAGAwGAGAwGAGAwGAJAvJAJAwJAJAwJAJAwJAKAvKAKAwKAKAwKAKAwKALAvLALAwLALAwLALAwLALAvLALAwLALAwLALAwLALAvLALAwLALAwLALAwLAMAvMAMAwMAMAwMAMAwMANAvNANAwNANAwNANAwNAPAvPAPAwPAPAwPAPAwPA/QAv/QA0QAw0QA1QAw1QA4QAw4QARAvRARAwRARAwRARAwRASAvSASAwSASAwSASAwSAUAvUAUAwUA UAw UA#UAw#UAyUAvyUAzUAwzUA{UAw{UA~UAw~UAAWAvAWABWAwBWACWAwCWAFWAwFWA]WAv]WA^WAw^WA_WAw_WAbWAwbWAWAvWAWAw>YA?YAw?YABYAwBYAYAvYAYAwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAwwwvwwwNvNOwOPwPSwSvwZAZAwZAZAwZAZAvZAZAwZAZAwZAZAwZAZAvZAZAwZAZAwZAZAwZAZAvZAZAwZAZAwZAZAwZA [Av [A [Aw [A [Aw [A[Aw[Ao[Avo[Ap[Awp[Aq[Awq[At[Awt[A[Av[A[Aw[A[Aw[A[Aw[A\Av\A\Aw\A\Aw\A"\Aw"\AG\AvG\AH\AwH\AI\AwI\AL\AwL\A`\Av`\Aa\AwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwa\Ab\Awb\Ae\Awe\A^Av^A^AwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAw^A^Aw^A^Aw^ArdAvrdAsdAwsdAtdAwtdAwdAwwdAWeAvWeAXeAwXeAYeAwYeA\eAw\eA;fAv;fAjAw>jAjAvjAjAwjAjAwjAjAwjAjAvjAjAwjAjAwjAjAwjAkAvkAkAwkAkAwkAkAwkAkAvkAkAwkAkAwkAkAwkAlAvlAlAwlAlAwlAlAwlA\lAv\lA]lAw]lA^lAw^lAalAwalAlAvlAlAwlAlAwlAlAwlAlAvlAlAwlAlAwlAlAwlACmAvCmADmAwDmAEmAwEmAHmAwHmAmAvmAmAwmAmAwmAmAwmA&nAv&nA'nAw'nA(nAw(nA+nAw+nA[nAv[nA\nAw\nA]nAw]nA`nAw`nAnAvnAnAwnAnAwnAnAwnAoAvoAoAwoAoAwoAoAwoAoAvoAoAwoAoAwoAoAwoArAvrArAwrArAwrArAwrAvAvvAvAwvAvAwvAvAwvAwAvwAwAwwAwAwwAwAwwAxAvxAxAwxAxAwxAxAwxAxAvxAxAwxAxAwxA!xAw!xAFyAvFyAGyAwGyAHyAwHyAKyAwKyA6zAv6zA7zAw7zA8zAw8zA;zAw;zA|Av|A|Aw|A|Aw|A|Aw|AAvAAwAAwAAwAmAvmAnAwnAoAwoArAwrAAvAAwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAwAAwAAwAAvAAwAAwAŁAwŁAՁAvՁAցAwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAw؁AفAwفA܁Aw܁A(Av(A)AwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAw)A*Aw*A-Aw-A*Av*A+Aw+A,Aw,A/Aw/AWAvWAXAwAAwAAwAAvAAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwXAYAwYA\Aw\AAvAAwAAwAAwAAvAAwAAwAAwA*Av*A+AwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwAAwAAwA4Av4A5Aw5A6Aw6A9Aw9AkAvkAlAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwlAmAwmApAwpA%Av%A&Aw&A'Aw'A*Aw*AAvAAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwA)Av)A*Aw*A+Aw+A.Aw.A%Av%A&Aw&A'Aw'A*Aw*AvAvvAwAwxAyAwyA|Aw|AAvAAwAAwAAwA#Av#A$Aw$A%Aw%A(Aw(AӑAvӑAԑAwԑAבAwבAAvAAwAAwAAwAAvAAwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwAAwAAwAVAvVAWAw,A-Aw-A0Aw0AbAvbAcAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwcAdAwdAgAwgAAvAAwAAwAAwAAvAAwAAwA!Aw!AAAvAABAwBACAwCAFAwFAAvAAwAAwAÖAwÖA.Av.A/Aw/A0Aw0A3Aw3AWAvWAXAwXAYAwYA\Aw\AAvAAwAAwAAwAȗAvȗAɗAwɗAʗAwʗA͗Aw͗AAvAAwAAwAAwA-Av-A.Aw.A/Aw/A2Aw2AKAvKALAwLAMAwMAPAwPAyAvyAzAwzA{Aw{A~Aw~AAvAAwAAwAAwA՜Av՜A֜Aw֜AלAwלAڜAwڜAXAvXAYAwYAZAwZA]Aw]AcAvcAdAwdAeAweAhAwhA͡Av͡AΡAwΡAϡAwϡAҡAwҡAAvAAwAAwAAwABAvBACAwCADAwDAGAwGAAvAAwAAwAAwAAvAAwAAwAAwA>Av>A?Aw?A@Aw@ACAwCAAvAAwAAwAAwA2Av2A3Aw3A4Aw4A7Aw7AAvAAwAAwAAwAAvAAwAAwAAwAéAvéAĩAwĩAũAwũAȩAwȩAAvAAwAAwAAwAAvAAwAAwAAwA۪Av۪AܪAwܪAݪAwݪAAwAAvAAwAAwAAwABAvBACAwDAEAwEAHAwHAiAviAjAwjAkAwkAnAwnAsAvsAtAwtAuAwuAxAwxAAvAAwAAwAAwAAvAAwAAwAAwAŭAvŭAƭAwƭAǭAwǭAʭAwʭAAvAAwAAwAAwA Av A Aw A Aw AAwAAvAAwAAwAcAvdAeAweAhAwhAAvAAwAAwAAwAfAvfAgAwhAiAwiAlAwlAEAvEAFAwFAGAwGAJAwJAA?Aw?ABAwBAAvAAwXAYAwYA\Aw\A۶Av۶AܶAwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwܶAݶAwݶAAwAAvAAwAAwAAwAVAvVAWAwAAwAAwA#Av#A$Aw$A%Aw%A(Aw(A$Av$A%Aw%A&Aw&A)Aw)AXAvXAYAwYAZAwZA]Aw]AAvAAwAAwAAwADAvDAEAwEAFAwFAIAwIAAvAAwAAwAAwAAvAAwAAwA Aw AAvAAwAAwAAwA Av A Aw A Aw AAwA Av A!Aw!A"Aw"A%Aw%AAvAAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwAmAvmAnAwnAoAwoArAwrAAvAAwAAwAAwAAvAAwAAwAAwAyAvyAzAwzA{Aw{A~Aw~AAvAAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwAAvAAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwAAwAAwA'Av'A(Aw(A)Aw)A,Aw,APAvPAQAwQARAwRAUAwUAoAvoApAwpAqAwqAtAwtAAvAAwAAwAAwA$Av$A%Aw%A&Aw&A)Aw)A}Av}A~Aw~AAwAAwAAvAAwAAwAAwA0Av0A1Aw1A2Aw2A5Aw5AkAvkAlAwlAmAwmApAwpAAvAAwAAwAAwAAvAAwAAwAAwA.Av.A/Aw/A0Aw0A3Aw3AAvAAwAAwAAwA8Av8A9Aw9A:Aw:A=Aw=AAvAAwAAwAAwAPAvPAQAwRASAwSAVAwVAAvAAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwA*Av*A+Aw,A-Aw-A0Aw0AYAvYAZAwZA[Aw[A^Aw^AAvAAwAAwAAwAAvAAwAAwAAwAMAvMANAwNAOAwOARAwRA Av A Aw A Aw AAwAAvAAwAAwAAwAAvAAwA Aw A Aw AAvAAwAAwAAwAAvAAwAAwAAwAOAvOAPAwPAQAwQATAwTA@Av@AAAwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwAAwAAwAVAvVAWAwVAWAwWAZAwZAgAvgAhAwhAiAwiAlAwlAAvAAwDAEAwEAHAwHAzAvzA{AwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAw{A|Aw|AAwAAvAAwAAwAAwA4Av4A5Aw5A6Aw6A9Aw9AYAvYAZAwZA[Aw[A^Aw^AAvAAwAAwAAwA#Av#A$Aw$A%Aw%A(Aw(A=Av=A>Aw>A?Aw?ABAwBAKAvKALAwLAMAwMAPAwPAAvAAwAAwAAwA#Av#A$Aw$A%Aw%A(Aw(AAvAAwAAwAAwAlAvlAmAwnAoAwoArAwrAAvAAwAAwAAwA?Av@AAAwAADAwDAAvAAwAAwAAvAAwAAwARAvRASAwTAUAwUAXAwXAqAvqArAwrAsAwsAvAwvAAvAAwA"Aw"AAvAAwAAwAxAvxAyAwyA|Aw|AAvAAwAAwAAwAAvAAwAAwAIAvJAKAwKANAwNAQAvQARAwRASAwSAVAwVAUAvUAVAwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwAAvAAwAAwAAwA9Av9A:Aw:A;Aw;A>Aw>AAvAAwAAwAAwAEAvEAFAwFAGAwGAJAwJAmAvmAnAwnAoAwoArAwrABvBBwBBwBBwBBvBBwBBwBBwBBvBBwBBwBBwBBvBBwBBwBBwBaBvaBbBwbBcBwcBfBwfB.Bv.B/Bw/B0Bw0B3Bw3BBvBBwBBwBBwBBvBBwBBwBBwBBvBBwBBwBBwB)Bv)B*Bw*B+Bw+B.Bw.Bj Bvj Bk Bwk Bl Bwl Bo Bwo B Bv B Bw B Bw B Bw BBvBBwBBwBBwBBvBBwBBwBBwBBvBBwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAwww v w w wvwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwAAwAAwAVAvVAWAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwBBwBBwBBvBBwBBwBBwBjBvjBkBwkBlBwlBoBwoBIBvIBJBwJBKBwKBNBwNBBvBBwBBwBBwBBvBBwBBwBBwBBvBBwBBwBBwBBvBBwBBwBBwBxBvxByBwyBzBwzB}Bw}BBvBBwBBwBBwBBvBBwBBwBBwBYBvYBZBwZB[Bw[B^Bw^BBvBBwBBwBBwB Bv B Bw BBwBBwB<Bv<B=Bw=B>Bw>BABwAB Bv B Bw B Bw B Bw BW"BvW"BX"BwX"BY"BwY"B\"Bw\"B%Bv%B%Bw%B%Bw%B%Bw%B+'Bv+'B,'Bw,'B-'Bw-'B0'Bw0'Bd'Bvd'Be'Bwe'Bf'Bwf'Bi'Bwi'B'Bv'B'Bw'B'Bw'B'Bw'B(Bv(B(Bw(B(Bw(B(Bw(B)Bv)B)Bw)B)Bw)B)Bw)BL*BvL*BM*BwN*BO*BwO*BR*BwR*B*Bv*B*Bw*B*Bw*B*Bw*B*Bv*B*BwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAw)B)Bw)B)Bw)B)Bv)B)Bw)B)Bw)B)Bw)B)Bv)B)BwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAw*B*Bw*B*Bw*B*Bv*B*Bw*B*Bw*B*Bw*B+Bv+B+Bw+B+Bw+B+Bw+B+Bv+B+Bw+B+Bw+B+Bw+B+Bv+B+Bw+B+Bw+B+Bw+B-Bv-B-Bw-B-Bw-B-Bw-B.Bv.B.Bw.B.Bw.B.Bw.B.Bv.B.Bw.B.Bw.B.Bw.B.Bv.B.BwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAw.B.Bw.B.Bw.B/Bv/B/Bw/B/Bw/B/Bw/B0Bv0B0Bw0B0Bw0B0Bw0B0Bv0B0BwAAwAAwAVAvVAWAw0B0Bw0B0Bw0B0Bv0B0Bw0B0Bw0B0Bw0B1Bv1B1Bw1B1Bw1B1Bw1B1Bv1B1Bw1B1Bw1B1Bw1B2Bv2B2Bw2B2Bw2B 2Bw 2B42Bv42B52Bw52B62Bw62B92Bw92B2Bv2B2Bw2B2Bw2B2Bw2B2Bv2B2Bw2B2Bw2B2Bw2B3Bv3B3Bw3B3Bw3B3Bw3B4Bv4B4Bw4B4Bw4B4Bw4B5Bv5B5Bw5B5Bw5B5Bw5B7Bv7B 7Bw 7B 7Bw 7B 7Bw 7B8Bv8B8Bw8B8Bw8B8Bw8B9Bv9B9Bw9B9Bw9B9Bw9B:Bv:B:Bw:B:Bw:B :Bw :B#YAwBBBBwBBBBwBBHBvHBHBwHBHBwHBHBwHBIBvIBIBwIBIBwIBIBwIBxJBvxJByJBwyJBzJBwzJB}JBw}JBJBvJBJBwJBJBwJBJBwJB KBv KBKBwKBKBwKBKBwKBKBvKBKBwKBKBwKBKBwKBKBvKBKBwKBKBwKBKBwKBKLBvKLBLLBwLLBMLBwMLBPLBwPLBLBvLBLBwLBLBwLBLBwLBMBvMBMBwMBMBwMBMBwMBUNBvUNBVNBwVNBWNBwWNBZNBwZNB~NBv~NBNBwNBNBwNBNBwNBNBvNBNBwNBNBwNBNBwNBNBvNBNBwNBNBwNBNBwNBOBvOBOBwOBOBwOBOBwOBOBvOBOBwOBOBwOBOBwOBPBvPBPBwPBPBwPBPBwPBPBvPBPBwPBPBwPBPBwPB(QBv(QB)QBw)QB*QBw*QB-QBw-QBQBvQBQBwQBQBwQBQBwQBRBvRB RBw RB!RBw!RB$RBw$RBRBvRBRBwRBRBwRBRBwRBRBvRBRBwRBRBwRBRBwRBSBvSBSBwSBSBwSB!SBw!SBpUBvpUBqUBwqUBrUBwrUBuUBwuUBWBvWBWBwWBWBwWBWBwWBXBvXBXBwXBXBwXBXBwXBV\BvV\BW\BwW\BX\BwX\B[\Bw[\BH]BvH]BI]BwI]BJ]BwJ]BM]BwM]BQ^BvQ^BR^BwR^BS^BwS^BV^BwV^Bp^Bvp^Bq^Bwq^Br^Bwr^Bu^Bwu^B^Bv^B^Bw^B^Bw^B^Bw^BH_BvH_BI_BwI_BJ_BwJ_BM_BwM_B `Bv `B`Bw`B`Bw`B`Bw`B+aBv+aB,aBw,aB-aBw-aB0aBw0aBaBvaBaBwaBaBwaBaBwaB!bBv!bB"bBw"bB#bBw#bB&bBw&bBdBvdBdBwdBdBwdBdBwdBGdBvGdBHdBwHdBIdBwIdBLdBwLdBdBvdBdBwdBdBwdBdBwdBdBvdBdBwdBdBwdBdBwdBeBveBeBweBeBweBeBweB fBv fBfBwfBfBwfBfBwfBafBvafBbfBwbfBcfBwcfBffBwffBgBvgB gBw gB gBw gB gBw gBngBvngBogBwogBpgBwpgBsgBwsgBgBvgBgBwgBgBwgBgBwgBhBvhBhBwhBhBwhBhBwhBThBvThBUhBwUhBVhBwVhBYhBwYhBhBvhBhBwhBhBwhBhBwhB[iBv[iB\iBw\iB]iBw]iB`iBw`iB.lBv.lB/lBw/lB0lBw0lB3lBw3lBlBvlBlBwlBlBwlBlBwlB/mBv/mB0mBw0mB1mBw1mB4mBw4mBdmBvdmBemBwemBfmBwfmBimBwimBoBvoBoBwoBoBwoBoBwoBoBvoBoBwoBoBwoBoBwoBpBvpBpBwpBpBwpBpBwpBqBvqBqBwqBqBwqBqBwqB sBv sBsBwsBsBwsBsBwsBtBvtBtBwtBtBwtBtBwtBRuBvRuBSuBwtBtBwtBtBwtBtBvtBtBwSuBTuBwTuBWuBwWuBvBvvBvBwvBvBwvBvBwvBwBvwBwBwwBwBwwBwBwwBxBvxBxBwxBxBwxB{Bv{B{Bw{B{Bw{B{Bw{B{Bv{B{Bw|B|Bw|B"|Bw"|B~Bv~B~Bw{B{Bw{B{Bw{B|Bv|B|Bw~B~Bw~B~Bw~BCBvCBDBwDBEBwEBHBwHBBvBBwBBwBBwBBw>BABwAB:Bv:B;Bw;Bw>?w?BwBvwwwvwww$v$%w%&w&)w)vwwwvwwwvwwwvwwwvwww,v,-w-.w.1w1CvCDwDEwEHwHNvNOwOPwPSwSovopwpqwqtwtvwwwvwwwvww w AvABwBCwCFwF[v[\w\]w]`w`PvPQwQRwRUwUzvz{w{|w|wvwwwVvVWwWXwX[w[vwwwGvGHwHIwILwLvwwwvwwwWvWXwXYwY\w\ v w w w v w w w  v w w w JvJKwKLwLOwOUvUVwVWwWZwZvwwwvwww v www(v()w)*w*-w-EvEFwFIwIvwwwTvTUwUVwVYwYvwwwvwwwv w !w!$w$KvKLwLMwMPwPvww w vwwwvwww(v((w((w((w((v((w((w((w((v((w((w((w()v))w4C5Cw5C8Cw8CECvECFCwFCGCwGCJCwJC[Cv[C\Cw\C]Cw]C`Cw`CCvCCw C!Cw!C$Cw$C1Cv1C2CwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwC'Cv'C(Cw(C)Cw)C,Cw,C>Cv>C?Cw?C@Cw@CCCwCCCvCCwCCwCCwCCvCCwCCwC Cw CCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCVCvVCWCwWCXCwXC[Cw[CCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCnCvnCoCwoCpCwpCsCwsCCvCCwCCwCCwCpCvpCqCwqCrCwrCuCwuCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwICJCwJCMCwMCgCvgChCw C!Cw!C$Cw$CHCvHCICwhCiCwiClCwlCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCJCvJCKCwKCLCwLCOCwOCwCvwCxCwxCyCwyC|Cw|CCvCCwCCwCCwC,Cv,C-Cw-C.Cw.C1Cw1CoCvoCpCwpCqCwqCtCwtCCvCCwCCwCCwC,Cv,C-Cw-C.Cw.C1Cw1CDCvDCECwECFCwFCICwICsCvsCtCwtCuCwuCxCwxCCvCCwCCwCCwC1Cv1C2Cw2C3Cw3C6Cw6CCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCCvCCwCCwCCwCRCvRCSCwSCTCwTCWCwWClCvlCmCwmCnCwnCqCwqCCvCCwCCwCCwCCCvCCDCwDCECwECHCwHC"Cv"C#Cw#C$Cw$C'Cw'CCvCCwCCwCCwCCvCCwCCwCCwC0Cv0C1Cw1C2Cw2C5Cw5CCvCCwCCwCCwCCvCCwCCwCCwCCvCCwwwvwwwGvGHwHIwILwLvwwwvwwwvwwwvwww6v67w78w8;w;dvdewefwfiwiivijwjkwknwn<v<=w=>w>AwA`v`awabwbewevwwwvwww\v\]w]^w^awavwwwX vX Y wY Z wZ ] w] > v> ? w? @ w@ C wC v w w w v w w w v w w w vwwwvwwwvwwwjvjkwklwlowo v wwwVvVWwWXwX[w[ v  w  w wvwwwWvWXwXYwY\w\vwwwvwww+v+,w,-w-0w0ZvZ[w[\w\_w_lvlmwmnwnqwqvwwwvwwwvwwwvwwwvwww v w w w n"vn"o"wo"p"wp"s"ws""v""wwwvwww!v!"w"#w#&w&vwwwvwww v wwwvwww)v)*w*+w+.w.vwwwGvGHwHIwILwLvwwwvwwvwwwv vv w ww x wx { w{ M vM N wN O wO R wR v w w w v w w vwwwFvWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAw C!Cw!C$Cw$C1Cv1C2CwDDwDDwDDvDDw8D8Dw8D8Dw8D<8Dv<8D=8DwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAw=8D>8Dw>8DA8DwA8Ds:Dvs:Dt:DwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwt:Du:Dwu:Dx:Dwx:DN@DvN@DO@DwO@DP@DwP@DS@DwS@D@Dv@D@Dw@D@Dw@D@Dw@DEADvEADFADwFADGADwGADJADwJADADvADADwADADwADADwADBDvBDBDwBDBDwBDBDwBDOCDvOCDPCDwPCDQCDwQCDTCDwTCDxCDvxCDyCDwyCDzCDwzCD}CDw}CDCDvCDCDwCDCDwCDCDwCDDDvDDDDwDDDDwDDDDwDDDDvDDDDwDDDDwDDDDwDDDDvDDDDwDDDDwDDDDwDDDDvDDDDwDDDDwDDDDwDDEDvEDEDwEDEDwEDEDwEDmEDvmEDnEDwnEDoEDwoEDrEDwrEDEDvEDEDwEDEDwEDEDwEDAFDvAFDBFDwBFDCFDwCFDFFDwFFDFDvFDFDwFDFDwFDFDwFDFDvFDFDwFDFDwFDFDwFDcGDvcGDdGDwdGDeGDweGDhGDwhGDHDvHDHDwHDHDwHDHDwHDJDvJDJDwJDJDwJDJDwJDKDw>KDAKDwAKDpKDvpKDqKDwqKDrKDwrKDuKDwuKDKDvKDKDwKDKDwKDKDwKD=LDv=LD>LDw>LD?LDw?LDBLDwBLDLDvLDLDwLDLDwLDLDwLDLDvLDLDwLDLDwLDLDwLDODvODODwODODwODPDwPDSDvSDSDwSDSDwSDSDwSDTDvTDTDwTDTDwTDTDwTDSDvSDTDwTDUDwUDXDwXDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDmDvmDnDwnDoDwoDrDwrD,Dv,D-Dw-D.Dw.D1Dw1DDvDDwDDwDDwDDvDDwDDwDdDvdDeDweDfDwfDiDwiDDvDDwDDwDDwDDvDDwDDwDDwD!Dv!D"Dw"D#Dw#D&Dw&DMDvMDNDwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAwNDODwODRDwRD{Dv{D|Dw|D}Dw}DDwDDvDDwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDUDvUDVDwVDWDwWDZDwZDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwD$Dv$D%Dw%D&Dw&D)Dw)DUDvUDVDwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAw(E)Ew)E,Ew,E]Ev]E^Ew^E_Ew_EbEwbEEvEEwVDWDwWDZDwZDDvDDwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwD9Dv9D:Dw:D;Dw;D>Dw>DDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwD?Dv?D@Dw@DADwADDDwDDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDDvDDwDDwDDwDNDvNDODwODPDwPDSDwSDDvDDwDDwDDwD4Dv4D5Dw5D6Dw6D9Dw9DDvDDwDDwDDwD2Dv2D3Dw3D4Dw4D7Dw7DVDvVDWDwWDXDwXD[Dw[D|Dv|D}Dw}D~Dw~DDwDDvDDwDDwDDwD!Dv!D"Dw"D#Dw#D&Dw&DqDvqDrDwrDsDwsDvDwvDDvDDwDDwDDwDaDvaDbDwbDcDwcDfDwfDDvDDwDDwDDwDDvDDwDDwDDwDMDvMDNDwNDODwODRDwRD=Dv=D>Dw>D?Dw?DBDwBDREvRESEwSEVEwVEEvEEwEEwEEwEEEvEEFEwFEGEwGEJEwJEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwE&Ev&E'EwEEwEEwEEvEEwEEwEEwEEvEEwwwvwwwvwwwvwwwvwwwvwww(v()w)*w*-w-vwwwvwwwvwwwbvbcwcdwdgwgvwwwvwww v  w  w  w a,va,b,wb,c,wc,f,wf,R3vR3S3wS3T3wT3W3wW3[4v[4\4w\4]4w]4`4w`415v1525w2535w3565w657v77w77w77w77v77w77w77w79v99w99w99w99v99w99w99w9n:vn:o:wo:p:wp:s:ws:;v;;w;;w;";w";;v;;w;;w;;w;<v<<w<<w<<w<=v==w==w==w=>v>>w>>w>>w>3@v3@4@w4@5@w5@8@w8@IAvIAJAwJAKAwKANAwNA{Av{A|Aw|A}Aw}AAwAfBvfBgBwgBhBwhBkBwkBoCvoCpCwpCqCwqCtCwtCCvCCwCCwCCwCDvDDwDDwD(Dv(D)Dw)D*Dw*D-Dw-DDvDDwDDwDDwDDvDDwDDwDDwDEvEEwEEwE Ew E Ev E!Ew!E"Ew"E%Ew%E9Ev9E:Ew:E;Ew;E>Ew>EVEvVEWEwWEXEwXE[Ew[EwEvwExEwxEyEwyE|Ew|EEvEEwEEwEEwEcFvcFdFwdFeFweFhFwhFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFGwG!Gv!G"Gw"G#Gw#G&Gw&GGvGGwGGwGGwGHvHHwHHwHHwH'Iv'I(Iw(I)Iw)I,Iw,IHJvHJIJwIJJJwJJMJwMJfJvfJgJwgJhJwhJkJwkJJvJJwJJwJJwJJvJJwJJwJJwJJvJJwJJwJJwJiKviKjKwjKkKwkKnKwnKKvKKwKKwKKwK4Lv4L5Lw5L6Lw6L9Lw9LSLvSLTLwTLULwULXLwXLmLvmLnLwnLoLwoLrLwrLLvLLwLLwLLwLbMvbMcMwcMdMwdMgMwgMNvNNwNNwNNwNvNvvNwNwwwvwwwtvtuwuvwvywyvwww(v()w)*w*-w-vwww@v@AwABwBEwEvwwwjvjkwklwlowovwwwrvrswstwtwwwvwwwvwwwQvQRwRSwSVwVvwT^EU^EwU^EX^EwX^El_Evl_Em_Ewm_En_Ewn_Eq_Ewq_E`Ev`E`EwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAw`E`Ew`E`Ew`E`Ev`E`Ew`E`Ew`E`Ew`E/aEv/aE0aEw0aE1aEw1aE4aEw4aEaEvaEaEwaEaEwaEaEwaEbEvbEbEwbEbEwbEbEwbEbEvbEbEwbEbEwbEbEwbEdEvdEdEwdEdEwdEdEwdEdEvdEdEwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwdEdEwdEdEwdEfEvfEfEwfEfEwfEfEwfENgEvNgEOgEwOgEPgEwPgESgEwSgEgEvgEgEwgEgEwgEgEwgEgEvgEgEwgEgEwgEgEwgEjhEvjhEkhEwkhElhEwlhEohEwohEjEvjEjEwjEjEwjEjEwjE_jEv_jE`jEw`jEajEwajEdjEwdjEjEvjEjEwjEjEwjEjEwjEjEvjEjEwjEjEwjEkEwkElEvlElEwlElEwlElEwlElEvlElEwlElEwlElEwlE#mEv#mE$mEw$mE%mEw%mE(mEw(mEpEvpEpEwpEpEwpEpEwpEpEvpEpEwpEpEwpEpEwpEpEvpEpEwpEpEwpEpEwpE qEv qE qEw>YA?YAw?YABYAwBYAYAvYAYAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwww1v12w23w36w6vwwwvwwwavabwbcwcfwfGvGHwHIwILwLvww"w"3 v3 4 w4 5 w5 8 w8  v  w  w  w x vx y wy | w| v w w w {v{|w|}w}wvwwwvwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwxEyEwyE|Ew|EEvEEwEEwEEwEۖEvۖEܖEw E!Ew!E$Ew$EtEvtEuEwuEvEwvEyEwyEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwE†Ew†E$Ev$E%Ew%E&Ew&E)Ew)EEvEEwEEwEEwEӈEvӈEԈEwԈEՈEwՈE؈Ew؈EӉEvӉEԉEwԉEՉEwՉE؉Ew؉EƊEvƊENJEwNJEȊEwȊEˊEwˊEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEpEvpEqEwqErEwrEuEwuElEvlEmEwmEnEwnEqEwqEEvEEwEEwEEwEEvEEwEEwEEwEޒEvޒEߒEwߒEEwEEwE Ev EEwEEwEEwEEw>EAEwAEEvEEwEEwE Ew EvEvvEwEwܖEݖEwݖEEwEEvEEwEEwEEwE?Ev?E@EwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAw@EAEwAEDEwDEUEvUEVEwVEWEwWEZEwZE8Ev8E9Ew9E:Ew:E=Ew=EkEvkElEwlEmEwmEpEwpEEvEEwEEwEEwEbEvbEcEwcEdEwdEgEwgEEvEEwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwxEyEwyE|Ew|EEvEEwEEwEEwEۖEvۖEܖEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwE$Ev$E%Ew%E&Ew&E)Ew)EEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEEw>EAEwAEsEvsEtEwtEuEwuExEwxEУEvУEѣEwѣEңEwңEգEwգEEvEEwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwEEwEEwE1Ev1E2Ew2E3Ew3E6Ew6EEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwE$Ev$E%EwxEyEwyE|Ew|EEvEEwEEwEEwEۖEvۖEܖEw%E&Ew&E)Ew)EEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEzEvzE{EwEEwEEwEEvEEw{E|Ew|EEwEsEvsEtEwtEuEwuExEwxEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwEEwEEwEEvEEwݰEްEwްEEwEfEvfEgEwEEwEİEwİEܰEvܰEݰEwEEwEEwEѳEvѳEҳEwhEiEwiElEwlEEvEEwEEwEEwE;Ev;EYA?YAw?YABYAwBYAYAvYAYAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwEEwEEwEEvE Ew E Ew E Ew E!Ev!E"EwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAw"E#Ew#E&Ew&EgEvgEhEwhEiEwiElEwlEEvEEwEEwEEwEEvEEwEEwEEwEIEvIEJEwJEKEwKENEwNEEvEEwEEwEEwEEvEEwEEwEEwEREvRESEwSETEwTEWEwWEEvEEwEEwEEwEEvEEwEEwEEwEUEvUEVEwVEWEwWEZEwZEeEveEfEwfEgEwgEjEwjEEvEEwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwEEwEEwEnEvnEoEwoEpEwpEsEwsEEvEEwEEwEEwE-Ev-E.Ew.E/Ew/E2Ew2EEvEEwEEwEEwEEvEEw>YA?YAw?YABYAwBYAYAvYAYAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwEEwEEwEEvEEwEEwEEwEEvEEwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwEEwEEwEEvEEwEEwEEwEEvEEw>YA?YAw?YABYAwBYAYAvYAYAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwwwvwww9v9:w:;w;>w> v wwwTvTUwUVwVYwYvwwwvwwwvwwwuvuvwwwvwwwZvZ[w[\w\_w_vwwwdvdewefwfiwivwwwSvSTwTUwUXwXvwww*v*+w+,w,/w/vwwwlvlmwmnwnqwqvwww# v# $ w$ % w% ( w( v w w w AvABwBCwCFwF'v'(w()w),w,_v_`w`awadwdvwww,v,-w-.w.1w1EvEFwFGwGJwJvwwwvwwwvwwwSvSTwTUwUXwXvwwwvwww6v67w78w8;w;DvDEwEFwFIwI[v[\w\]w]`w`vwwwvwww/v/0w01w14w4#v#$w$%w%(w(vwww0v01w12w25w5vwwwvwwwavabwbcwcfwfvwww=v=>w>?w?BwBmvmnwnoworwr. v. / w/ 0 w0 3 w3 s vs t wt u wu x wx vw w  w vwwwvwwwvwwwvwwwvwww|v|}w}~w~wvwwwvwwwCvCDwDEwEHwHvwwwvwwwvwwwkvklwlmwmpwpfvfgwghwhkwk!v!!w!!w!!w!C$vC$D$wD$E$wE$H$wH$W%vW%X%wX%Y%wY%\%w\%&v&&w&&w&&w&'v''w''w' 'w ''v''w''w''w'(v((w((w((w(L*vL*M*wM*N*wN*Q*wQ*.v..w..w..w.1v11w11w11w1B2vB2C2wC2D2wD2G2wG24v44w44w44w46v66w66w66w68v88wwwtvtuwuvwvywyvwww/v/0w01w14w4ivijwjkwknwnvwww v  w  w wvwwwvwwwvwwwvwww3v34w45w58w8vwww7v78w89w9<w<vwwwvwww 8v 8 8wm8n8wn8q8wq8 :v ::w 8 8w 88w8l8vl8m8w::w::w:O:vO:P:wP:Q:wQ:T:wT:q:vq:r:wr:s:ws:v:wv::v::w::w::w::v::wvFvFwvFvFwvF-vFv-vF.vFw.vF/vFw/vF2vFw2vF;vFv;vFYAwnvFovFwovFrvFwrvFvFvvFvFwvFvFwvFvFwvFvFvvFvFwvFvFwvFvFwvFvFvvFvFwvFvFwvFvFwvFwFvwFwFwwFwFwwFwFwwFBwFvBwFCwFwCwFDwFwDwFGwFwGwFwFvwFwFwwFwFwwFwFwwFxFvxFxFwxFxFwxFxFwxF[zFv[zF\zFw\zF]zFw]zF`zFw`zF]}Fv]}F^}Fw^}Fa}Fwa}F~Fv~F~Fw~F~Fw~F~Fw~FFvFFwFFwFFwFhFvhFiFwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwlFmFwmFpFwpFFvFFw C!Cw!C$Cw$C1Cv1C2CwDDwDDwDDvDDwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwXAXAwXAXAwXAYAvYAYAwYAYAwYAYAwYA=YAv=YA>YAwFFwFFwFFvFFwF€Fw€FŀFwŀFFvFFwFFwFFwFFvFFwFFwFFwFEFvEFFFwFFGFwGFJFwJFFvFFwFFwFFwFFvFFwFFwFFwFFvFFwFFwFFwFCFvCFDFwDFEFwEFHFwHFdFvdFeFweFfFwfFiFwiFFvFFwFFwFFwFFvFFwFFwFFwF9Fv9F:Fw:F;Fw;F>Fw>FPFvPFQFwQFRFwRFUFwUFFvFFwFFwFFwF!Fv!F"Fw"F#Fw#F&Fw&FKFvKFLFwLFMFwMFPFwPFaFvaFbFwbFcFwcFfFwfF~Fv~FFwFFwFFwFgFvgFhFwhFiFwiFlFwlF Fv F Fw F Fw FFwFDFvDFEFwEFFFwFFIFwIFFvFFwFFwFFwFFvFFwFFwFFwFZFvZF[Fw[F^Fw^FFvFFwFFwFFwFЈFvЈFшFwшF҈Fw҈FՈFwՈF̊Fv̊F͊Fw͊FΊFwΊFъFwъFzFvzF{Fw{F|Fw|FFwF/Fv/F0Fw0F1Fw1F4Fw4FFvFFwFFwFFwFFvFFwFFwFFwFZFvZF[Fw[F\Fw\F_Fw_FFvFFwFFwFFwF~Fv~FFwFFwFFwF\Fv\F]Fw]F^Fw^FaFwaFFvFFwFFwFFwF̔Fv̔F͔Fw͔FΔFwΔFєFwєFFvFFwFFwFFwFFvFFwFFwFFwF=Fv=F>FwFFwFFwFFvFFw>F?Fw?FBFwBFFvFFwFFwFFwF9Fv9F:Fw:F;Fw;F>Fw>FӚFvӚFԚFwԚF՚Fw՚FؚFwؚF}Fv}F~Fw~FFwFFwFFvFFwFFwFFwF˛Fv˛F̛Fw̛F͛Fw͛FЛFwЛFFvFFwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAwwwvwwwGvGHwHIwILwLUvUVwVWwWZwZvwwwvwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAwFFwFFwFΝFvΝFϝFwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwϝFНFwНFӝFwӝFFvFFwFFwFFwFFvFFwFFwFFwFFvF Fw F!Fw!F$Fw$FFvFFwFFwFFwF\Fv\F]Fw]F^Fw^FaFwaFFvFFwFFwFFwFѤFvѤFҤFwҤFӤFwӤF֤Fw֤FFvFFwFFwFFwFXFvXFYFwYFZFwZF]Fw]FǧFvǧFȧFwȧFɧFwɧF̧Fw̧FFvFFwFFwFFwF9Fv9F:FwAAwAAwA*Av*A+AwWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwYAwvFwFwwFzFwzFFvFFwFFwFFwFFvFFwFFwFFwFtFvtFuFwxEyEwyE|Ew|EEvEEwEEwEEwEۖEvۖEܖEwN*BO*BwO*BR*BwR*B*Bv*B*Bw*B*Bw*B*Bw*B*Bv*B*BwYAYAwYAYAwYAYAvYAYAwZAZAwZAZAwZA%ZAv%ZA&ZAwww`v`awabwbewevwwwvwww4v45w56w69w9vwwwAvABwBCwCFwFvwwwvwww&v&'w'(w(+w+vwwwvwwwuvuvwvwwwzwzvwwwvwwwvwwwrvrswww&v&'wwwvw w #w#;v;<w<=w=@w@TvTUwUVwVYwYrvrswstwtwwwvwwwvwww2v23w34w47w7vwww)v)*w*+w+.w.vwww)v)*w*+w+.w.vwwwcvcdwdewehwhvwww v w w w v w w  w vwwwvwww]v]^w^_w_bwb,v,-w-.w.1w1vwwwvwwwvwwwvwwwXvXYwYZwZ]w]vwwwvwww v  w  w wlvlmwmnwnqwqvwwwvwwwvww w vwwwvwww{v{|w|}w}wvwwwyvyzwz{w{~w~vwwwvwwwvwwwvwwwvwww v wwwSvSTwTUwUXwX=v=>w>?w?BwBvwwwvwwwVvVWwWXwX[w[vwwwvwwwvwwwvwwwYvYZwZ[w[^w^XvXYwYZwZ]w]vwwwv w  w  w p vp q wq r wr u wu v wwwvwww+v+,w,-w-0w0bvbcwcdwdgwgvwwwvwww&v&'w'(w(+w+evefwfgwgjwjwvwxwxywy|w|vwwwvwww v  w  w wvwwwvwwwvwwwvwwwvwww@v@AwABwBEwEvwwwvwwwvwwwvwwwvwww`v`awabwbewevwwwvwww7v78w89w9<w<vvvwwwxwx{w{vwww> v> ? w? @ w@ C wC ] v] ^ w^ _ w_ b wb | v| } w} ~ w~ w r vr s ws t wt w ww  v  w  w  w 9 v9 : w: ; w; > w> v w w w vwwwvwwwvwwwvwwwvwwwvwwwvww w vwwwHvHIwIJwJMwMJ!vJ!K!wK!L!wL!O!wO!$v$$w$$w$$w$K'vK'L'wL'M'wM'P'wP'?(v?(@(wWAWAwWAWAwWAWAvWAWAwWAWAwWAWAwWAXAvXAXAwXAXAwXAXAwXANXAvNXAOXAwPXAQXAwQXATXAwTXAuXAvuXAvXAw G Gw G Gw G Gv G Gw G Gw G Gw G/ Gv/ G0 Gw0 G1 Gw1 G4 Gw4 G Gv G Gw G Gw G Gw GYGvYGZGwZG[Gw[G^Gw^G!Gv!G"Gw"G#Gw#G&Gw&GpGvpGqGwqGrGwrGuGwuGGvGGwGGwGGwGGvGGwGGwGGwGGvGGwvXAwXAwwXAzXAwzXAXAvXAXAwXAXAwXAXAwXAXAvXAXAwwwgvghwwwPvPQwQRwRUwUvwwwvwww|v|}w}~w~wvwwwvwww6v67w78w8;w;}v}~w~wwvwwwvwwwvwww&v&'w'(w(+w+avabwbcwcfwfwvwxwxywy|w|vwwwvwwwvwwwfvfgwghwhkwkvwww<v<=w=>w>AwAfvfgwghwhkwk*v*+w+,w,/w/_v_`w`awadwd~v~wwwvwww2 v2 3 www v w w wvwww|v|}w}~w~wvwwwvwwwvww!w!1v12w23w36w6vwww3v34w45w58w8vwww+v+,w,-w-0w0vwwwvwwwvwwwyvyzwz{w{~w~vwwwKvKLwLMwMPwPvwww v  w  w w P vP Q wQ R wR U wU v w w w x vx y wy z wz } w} a va b wb c wc f wf v w w w v w w w ; v; < w< = w= @ w@ v w w w  v  w  w w C vC D wD E wE H wH vwwwvwwwPvPQwQRwRUwUvwwwvwwwJvJKwKLwLOwOvwwwvwwwvwww|v|}w}~w~wvwwwvwwwdvdewefwfiwivwww?v?@w@AwADwDvww w jvjkwklwlowovwwwvwwwM!vM!N!wN!O!wO!R!wR! #v ##w##w##w#v#vv#w#ww#x#wx#{#w{##v##w##w##w#%v%%w%%w%%w%d(vd(e(we(f(wf(i(wi((v((w((w((w(%)v%)&)w&)')w')*)w*)0)v0)1)w1)2)w2)5)w5);)v;)<)w<)=)w=)@)w@)w)vw)x)wx)y)wy)|)w|))v))w))w))w))v))w))w))w))v))w))w))w))v))w))w))w))v))w))w))w))v))w))w))w) *v * *w * *w **w* *v *!*w!*"*w"*%*w%*5*v5*6*w6*7*w7*:*w:*B*vB*C*wC*D*wD*G*wG*W*vW*X*wX*Y*wY*\*w\*{*v{*|*w|*}*w}**w*@-v@-A-wA-B-wB-E-wE-31v3141w4151w5181w811v11w11w11w1C2vC2D2wD2E2wE2H2wH23v33w33w33w34v44w44w44w4c8vc8d8wd8e8we8h8wh88v88w88w89w99v9 9w 9 9w 9 9w 9/9v/909w0919w1949w49f9vf9g9wg9h9wh9k9wk9&:v&:':w':(:w(:+:w+::v::w::w::w:<v<<w<<w<<w<=v= =w = =w = =w =>v>>w>>w>>w>?v??w??w??w?)@v)@*@w*@+@w+@.@w.@CBvCBDBwDBEBwEBHBwHBGvGGwG Gw G#Gw#G0Gv0G1Gw1G2Gw2G5Gw5GEGvEGFGwFGGGwGGJGwJGZGvZG[Gw[G\Gw\G_Gw_G|Gv|G}Gw}G~Gw~GGwGGvGGwGGwGGwGGvGGwGGwGGwGGvGGwGGwGGwG2Hv2H3Hw3H4Hw4H7Hw7HHvHHwHHwHHwHHvHHwHHwHHwH7Iv7I8Iw8I9Iw9I w> A wA V vV W wW X wX [ w[ a va b wb c wc f wf l vl m wm n wn q wq w vw x wx y wy | w| v w w w v w w w v w w w v w w w v w w w v wwwvwww!v!"w"#w#&w&zvz{w{|w|wvwwwvwwwvwww$v$%w%&w&)w)vwwwvwwwvwww@v@AwABwBEwEWvWXwXYwY\w\vwwwvwwwvwww!v!"w"#w#&w&vwwwv w !w!$w$IvIJwJKwKNwNvwwwvwww5#v5#6#w6#7#w7#:#w:#$v$$w$$w$$w$f$vf$g$wg$h$wh$k$wk$$v$$w$$w$$w$$v$$w$$w$$w$Y%vY%Z%wZ%[%w[%^%w^%_%v_%`%w`%a%wa%d%wd%P'vP'Q'wQ'R'wR'U'wU'u'vu'v'wv'w'ww'z'wz''v''w''w''w'5v55w55w55w56v66w66w66w697v97:7w:7;7w;7>7w>77v77w77w77w7L8vL8M8wM8N8wN8Q8wQ88v88w88w88w8[9v[9\9w\9]9w]9`9w`9 :v : :w : :w ::w::v::w::w::w:%;v%;&;w&;';w';*;w*;;v;;w;;w;;w;<v<<w<<w<<w<-=v-=.=w.=/=w/=2=w2==v==w==w==w=w>vw>x>wx>y>wy>|>w|>?v??w??w? ?w ??v??w??w??w?b@vb@c@wc@d@wd@g@wg@AvAAwAAwA"Aw"AAvAAwAAwAAwAfBvfBgBwgBhBwhBkBwkBBvBBwBBwBBwBCvCCwCCwCCwCBDvBDCDwCDDDwDDGDwGDDvDDwDDwDDwDEvEEwEEwEEwE'Fv'F(Fw(F)Fw)F,Fw,FFvFFwFFwFFwFGvGGwGGwGGwGHvHHwHHwHHwHIvIIwIIwIIwIJvJJwJJwJJwJyKvyKzKwzK{Kw{K~Kw~KZLvZL[Lw[L\Lw\L_Lw_L/Mv/M0Mw0M1Mw1M4Mw4MgMvgMhMwhMiMwiMlMwlMMvMMwMMwMMwMMvMMwMMwMMwMNvNNwNNwNNwNGNvGNHNwHNINwINLNwLNNvNNwNNwNNwNNvNNwNNwNNwNOvOOwOOwOOwOPvPPwPPwPPwPQvQQwQQwQQwQQvQQwQQwQQwQ2Rv2R3Rw3R4Rw4R7Rw7RuRvuRvRwvRwRwwRzRwzR Sv S Sw S Sw SSwSSvSSwSSwSSwSSvSSwSSwSSwSSvSSwSSwSSwSTvTTwTTwTTwTTvTTwwwIvdewehwhYvYZwwwvwwwvwww4 v4 5 w5 6 w6 9 w9 v w w w E vE F wF G wG J wJ _ v_ ` w` a wa d wd v wwwvwww5v56w67w7:w:qvqrwrswsvwvvwwwvwwwvwww)v)*w*+w+.w.vwwwvwwwvwww#v#$w$%w%(w(gvghwhiwilwlvwwwvwwwvwww8v89w9:w:=w=vwwwvwwwvwwwvwww v  w  w wXvXYwYZwZ]w]vwww v w w w  v  w  w w v w w w } v} ~ w~  w w v w w w vwwwvww"w"}v}~w~wwvwwwvwwwWvWXwXYwY\w\vwwwvwwwKvKLwLMwMPwPvwwwcvcdwdewehwh<v<=w=>w>AwAvwww\v\]w]^w^awavwwwvwwwvwww v  w  w " w" ,!v,!-!w-!.!w.!1!w1!"v""w""w""w"F#vF#G#wG#H#wH#K#wK##v##w##w#$w$$v$$w$$w$$w$%v%%w%%w%%w%&v&&w&&w&&w&&v&&w&&w&&w&&v&&www v !w!"w"%w%\v\]w]^w^awa|v|}w}~w~wIvIJwJMwMvwwwLvLMwMNwNQwQvwwwvwww*v*+w+,w,/w/vwww8v89w9:w:=w=vwwwvwwwvwwwvwwwvwwwvwww"v"#w#$w$'w'vwwwvwwwVvVWwWXwX[w[fvfgwww_v_`w`awadwdvwwwvwwwvwww>v>?wwwvwwwwvwxwxywy|w|vwwwvwww~v~www6 v6 7 wwwCvCDwDEwEHwHvwww$v$%w%&w&)w)vwww&v&'w'(w(+w+OvOPwPQwQTwTvwww1v12w23w36w6vwwwvwwwvwwwvwwwvwUUUTTTQQQww3v34w45w58w8vwwwvwwwvwwwvww w vwwwavabwww3v34w45w58w8vwwwvwwwvwww'v'(w()w),w,. v. / w/ 0 w0 3 w3 v w w w d vd e we f wf i wi v w w w 3v34w45w58w8OvOPwPQwQTwTvwwwvwwwv w !w!$w$vwwwvwww6v67w78w8;w;xvxywyzwz}w}1v12w23w36w6|v|}w}~w~wvwww v w w w P vP Q wQ R wR U wU v w w w v w w w  v  wwwvwwwQvQRwRSwSVwVvwwwvwwwvwwwvwwwtvtuwuvwvywyPvPQwwwvwww(v()w)*w*-w-qvqrwrswsvwv{v{|w|}w}wvwwwvwww v !w!"w"%w%vwwwvwwwgvghwhiwilwlvwww)v)*w*+w+.w.vwwwvwww0v01w12w25w5ovopwpqwqtwtvwwwvwwwDvDEwEFwFIwI v w w  w ]v]^w^_w_bwbvwwwXvXYwYZwZ]w]vwwwvwwwvwwwLvLMwwwSvSTwTUwUXwXvwwwgvghwhiwilwltvtuwuvwvywyvwwwvwwwvwwwvwwwvwwwvwwwvwww.v./w/0w03w3OvOPwPQwQTwT]v]^w^_w_bwbnvnowopwpswsvwwwvwww`v`awabwbewevw]DADAqEAwEAuFAGA+GA,GAGAJAJAJAHAoJAJAJA=AWAWAWAWAXAXAOXAPXAvXAvXAXAXAXAXAYAYA>YA>YAYAYAYAZA&ZAZAցAWAWAWAXAXAOXAPXAvXAvXAXAXAXAXAYAYA>YAYAYAZA&ZAAmAAAĀAAA؁AAWAWAWAXAXAOXAPXAvXAvXAXAXAXAAAXAYAYA>YAYAXAܶAAAAAsAAAAܶAAAWAWAWAXAAWAXAOXAPXAvXAvXAXAXAXA;A+A4AIA~AAAHA2AAAADAVAWAWAWAXAAWAVAhAhAAXAOXAPXAvXAvXAXAXAXAAAAAAAAA BBBB2BB0B1BABWAWAWAXAXAOXAPXAvXAvXAXAXAXAXAYAYA>YABBBBYAYAZA&ZANBP BU B B$B%B%B%B$$B$B%B%BB)BWAWAWAXAAWAXAOXAPXAvXAvXAXAXAXAXAYAYA>YA)BM*BN*B*B*B*BYAYAZA&ZA*B.BWAWAWAXAXAOXAPXAvXAvXAXAXAXAXAYAYA>YA.B.B3B3B3B3B.B@BWAWAWAXAXAOXAPXAvXAvXAXAXAXAXAYAYA>YAAWA.B.BYAYAZA&ZAoBoBpBpBtB.uB3uBLuB1|B}B}B~B|B}B}B}B}B}B}B~BBpBBB@BBWAWAWAXAXAOXAPXAvXAAWABBvXAXAXAXAXAYAYA>YA)BM*BYAYAZA&ZA/IJ\C}CCCCCVCYCaC`CaCqCCCqCCCyCCCCLCQCCCCCCCCCLCCCCsCCCsCCCGCUC{C9CLCjC{CLCjC{CC4CC C2C\D]DDDZ]D]D]D^D ^DW^DDSDa^Do_DDD_D`D"`DV`D[`D`D[DD`DaDDDbDsbDxbDbDbDbDDDcD-dDDDidDdDdDeDeDfDDHD'fD5gDDDqgDgDgDhDhD%iDUDD4iDBjDDD~jDjDjDkDkD2lDDDTlDbmDDDmD nDnDInDNnDnDnDnDDLDnDoDDD,pDpDpDpDpDqDqDbqDTDDqqDrDDDrD*sD/sDfsDksDsDsDsDDDOtDtDtDgvDlvDvDDADvD>wDCwDxDxDyDNDDPyDyDyDh{Dm{D{DDD{DE|DJ|Dr|DDED+}D}D}D}DMDD~D~D~D~DDDWDeDDDDDDIDNDD[DDDDDDD^DcDDDDDDDDDDBDDDDDYAYAYAZA&ZADD DDDDDDD'EWAWAWAXAXAOXAPXAvXA(E^E^EEvXAXAXAXAEEEE7E\T^E qEWAWAWAXAXAOXAPXAvXAvXAXAXAXA>YAYAXAYAYA>YA  t ! O EwEWAWAWAXAXAOXAPXAvXAxEEEܖEܖEEE@ELEEE؛EHEEEE@E=EWAWAWAXAXAOXAPXAvXAxEEEܖEܖEEE@EYEԧEkEبE1EgEoEEE>EGE`E4EE.E2E\EEEE@EҹEWAWAWAXAXAOXAPXAvXAxEEEܖEܖEEE@E,EEWAWAWAXAXAOXAPXAvXAvXAXAXAXA>YAYAXAYAYA>YAEEWAWAWAXAXAOXAPXAvXAvXAXAXAXA>YAYAXAYAYA>YAEEWAWAWAXAXAOXAPXAvXAvXAXAXAXA>YAYAXAYAYA>YA^  X Y ()))  B yxF9zF>zFSzFzF/|FE|FN}FE|FU|Fg|F|FU|Fg|F|FN}FvFiFWAWAWAXAXAOXAPXAvXAvXAXAXAXAXAYAYA>YAYAYAZA&ZAFLFUFYFF'FyFzF̘FFBFFFBFFFlFFWAWAWAXA C2CDDXAOXAPXAvXAvXAXAXAXAXAYAYA>YAYAYAZA&ZAFF&FFFʦFFQFF:FWAWAWAXAXAOXAPXAvXAvXAXAXAXAYAFuFxEEEܖEN*B*B*B*BYAYAZA&ZA  #\"#@?TU/_oo OO\t\tdttiGGGGGG?GgG GGWAWAWAXAXAOXAPXAvXAvXAXAXAXAr - . N@AABBB@AABBB W}]pst$)-c$#'#$#-#4#l -#3# #3#4#H!"3#4#s$*+Tlm.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.tdata.tbss.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_frame.debug_str.debug_loc.debug_ranges8@8#T@T 1t@t$Do@$N X'@X'|Vأ@أ`^oA` koAzxAxPAP `+A`++A+p @hN  A.  A   ؁AQ  ؁AQ@ s  XA.j  A   A! 5A7'jN  lA  lA! sN  &As jN jN  ӑA.  A ,A7'oNd cARoN AhoN  A% BA}; ApYpN  /A) XA8 A9 ɗAoNH AHloN .A LA. zA.  A.; ֜A^ YA  dAj ΡA$ AQ+ oN|@@pNq pN A A% pN oN ^l ܶA'  A! $A %A4 YA(3 A\ EAk Al A Ap A2 !Ab AM A A nAe Ac A zA! Ag/ Ag A; ApYsN  (A) QA pAPsN  Ae,psN\ %AY ~AY AZ 1A; lAGsNJ A>j A> /A A 9A A sN 9sN sN sN  DA7'xNd {AR@xN Ah3xN  5A% ZA} AMPxN/ $AD >AixNxNexN _xN>+xNxN  A A. AQ A Aj A$sss4 :AY As nAN  B0yN B%lN HPNy0NN +~N| BLsC B]`N B kB JBM% B8 B%Q Bb Bz yB/ B% B B ؒs2  ZBH  B2_  =BZ  B  X"B  %BB  ,'B9!PN  )B.:! )BW!^! *Be!N !! .B! /B! 0B!% 0B8 0B%Q 1B! 1B"z 2B/" 52BU" 4B1"@Ms@<"ܒsJ" 2Be" 3B" 5Bt" 7B" 8B2" ?Bm # ?B=#G#U#`#j# @B7' OC BB] O HB IB yJBJN JBK KBu# KBGd KBR O LLBhp O  LB% MB}. VNB)% NB8 NB%Q NB; OBpY O  OB)b PBz PB/#Ms(#s#Ms#Ms# )QBY# O$$ RBfC$ sB`$ aB$ RB9$ RB^$ SBT$ O% qUBI=% WBWb% XBF% O% W\B% I]B & R^B(& q^BK& ^Bm& O& I_B& `B& ,aBu' "bB''` OW' dBFx' HdB^'Ms'Ms' dBT'@ O( dBa( eB9( fBT(' O( bfB( gBf) ogBQ4) gBDZ) hBQy) UhBQ) hB) \iB) /lB) lBO+* 0mB5O* emBMp* oB* oB * pBI* qB* tB,"+ tBJ+ B)+ ,B,+ SuBG, vB1-, wBH, xBk, {BT, {B(, XB(- B,O- ~B~- O- DB- Bc- =B . ;BA8. |Bg. B6. BV . O .O.O . O/` O`/@ O./ O ;/ O S/ O / B$/ ,B, 0 ЖB"K0 B,0 B$0 ЖB"1#1 ǛBlI1 3B%n1 O11 Bx1 B91 "BP1 rBG2Ms+2NsD2 NsW2@Nsg2`Nsy2Ns2Ns2Ns2Ns2Os2 Os2@Os 3`Os3Os.3Os>3OsL3Osc3Ps~3 Ps3@Ps3`Ps3Ps3Ps3Ps3Ps4Qs,4 QsG4@Qsa4`Qsu4Qs4Qs4Qs4Qs4Rs4 Rs5@Rs$5`RsG5Rsa5Rsn5Rs05Ss05@Ss05Ss05SsH5 TsH6TsH$6Ts`L6@Us`q6 B}6 $CV6 s 6s6 %Ct6 VC6s 6s 6^! C6 *C6 AC6 XC 6 cC!7 CF7 ʙC?7 C)7 C;57 VCN7 pCn7 eC*7 C;7 ʛC7`O7 kCu7@O 8 C|'8ds78hsD8psM8 \Cct8 Cu8 lC;8O8 Cu9s(9 C"g9 C,9xs9 Cb9 "C9 =C9s: YCV: C,: iC>:O [:O: C: ҲCb: C:O: C4 ; C,6; C4d;k;s;Us;s;Us;Us;Us;s;Us<Vs(<Vs=< VsS<0Vsi<@Vs<PVs<`Vs<pVs<Vsh<< 4C^! FC< \C/< CG7 C= C= C2*= (CE=Ws#XsY= ?CW= Co= C= C6= Cn>Xs> CB>0+O|> WC> C,> C> C]> C`,? oCB\? C? qC? C?"+O? C@ C)Q@ ICx@ hC@ C'@ C@+OA C)QA CA CA CA CtA C B C+B CLB KC-lB xC]B CXB -CCB C)C -C7C EC/RC tC\mC CbC CC+OC C7C CD C?D C/@)O0fD *OsD)O@D mCeD CrD #CD CE 1Cy7E^! 4C= JC2>E DSE |CKgEuE D7'|-O /D. ]DQ bD 5D$+-O|~E D.E D$E D F D$1F PD\CF DJnF D.F $D/F SDG eD$*G6 $D9G $D IGsgGs sG (DG &DGsG 'Do H -D)H -DGH ,D=_H +DHp0OH G.DH U-D\H /DIP0O?I n3D\I00OI 1DI ~2DI8 8D% =8D7'PAOC t:D]AO O@Dd @DR@AO FADh'AO  AD% BD}. PCD)^! yCD7 CDuI~AO 8 DD|J DD?#J DD&7J DD1NJ EDXiJ nEDoJ EDdJ EDdJs<"sKs1KsFKsXK BFD^sK HDK0XsK JDK =KD4K qKDVLAO+L KDwLL >LD[jLsHtL LDOL LDLAOL SD9"M TDZHM DW|M DM D3M D,DRDO RDO#S E+ DO|FSOSsVS@EObS@GOjS`HO!oSHO!tSHO8}S IOS@IO8SIOSIO3SIO3S JO8S ES ES E%S %"EeS "EFS 1TES PTET EB#T jTE3T E)=T "EIT #EUT REgT SEG{T fSET`MOxTMOTQOLT@ROTROTSO8TTO8TsT FEvT AEU RE6U VE]U .=E"U _UE*U ~TE4U KE7CU O;E YU Xb E$b E,b E$6c E,c E$c BE$d fE$Nd E$d E$dd ԹE,e E*;e *ETe E:re Ece ˼Ee#J ,E&7J RE1e Ee EBe ׿EQf (E*%f {E?f E[fgOf Ef7gO f.gO fgO ggOFg bE`gfO g-V EFV Eg8tg8t(g`t8g "EFgCiO g hEn h E#h El;h EW_h7iO h SE0h Eeh VEh!iOh fE8iiO5iiOPiiOzihOihOihOihOi)iOi-V EFV Ej jat0j0at#j4at1j8at:j E+iO|Yj^! \Ecj rEEj EWj EjmO j`jmO knOCknOuk`nOkmOk EokMnOkAnO l EM.lmO6l EhZl5nO l nOlmOmnOZmmOnm^! ,Fzm BF!m cFm qFm F?mwO m F@nwO 2nwOTnwO}n FsnwO n [ FEn FowO\o "Fo`ato !Fo Fo F p F1ppwO[pPwOp(stp@stp "FNp pF{pwOq0wO=q FZ_q EF|qvO qvO q FqvO rvORr !FwrvOrvOrPvOs y-F>,spvO^s0vOs@vOsvOsvO2t (FBZtvOt )Fktttt 1*FuuO\u !+Fu +FuuOvuO-vuO EvuO bv 4FvstvttvttvuOv7 D;FuI؀O 8 ;F|J 5F$w ?F$w F\O :F̓ut`vt  ̛F4Y F, ̛F4ȄOe F  F6. HFE VF` F*= F ϝF F. FQ F Fj ]F$tP FQ@wt+ O|  FKa!^ϒO pO F F2 $F =F [F F Fh̆ Fކ Fs F  Fp& F: LFLO eO~O  FRߔO LJ Fׇ߇ FY aFY< F0Z F*{ Fa uF)È F~ F F/ OpjK F|l tFu F rF5 F:O0 F* F?J TFFo FF F F~ӊO@ xFWPO, F*P Fqt jF FNj FF F F6< Fqi xFqǑ@O ^! FX FZ F7[ F]6 DF!7 eFF7 F?7 F)7 F;#J 7F&7J ]F1  F~57 F2 &FQN7 wF7 lF7pOL FlmO  FS FWȍ oF FПO: -F2e^s  _FΎ FX =F:* wFE[ F? F {FHُ F F F;O"t F F6 FJߐ Fz F! kFW F FZ qFّ Fy G LGB Ge Gi@O#’ 8 GO$O0Y Gn^s GP 0 GpǓ G^s^s  ZG, "GOl qG G`O`ϔO  TGQ Gm$ GA3^! G6 *G!< KGG7 GF7 G?7 G= )G)7 ;G;: (GS` {G HG hwtlwtƕ SGϕ Gpwt GL & G?^s  z Gaxwtwt&wt0wt7wt@wtIwt(Rwt]wthxts xt }@xtHxtPxtTxtXxt\xtÖ`xtӖhxtpxtxxtxtxtxt0 xtxt0xt7xt@xtGxtNxtUxt\ytdytjytrytzyt yt(yt0yt8yt@ytƗDyt՗HytߗPytTytXyt`ytdythytpyt&tyt2yt(8yt@ytHytPytYytdytoytvztztztztztzt zt$zt(zt˘0ztҘ8ztۘG?O X V@Gib @G.o @GG} 4CGy EGk FGV FG< GG |NGgƛ MzGsЛ NGߛӱO OGSDZO  PG}*O CO \ oWGg WGjtO  [YG QZGOƜ \Gۜ ]Gq r]GO eG( )eGR& {eGO4 BfG>? fG+H fGPzO ioO `ORO@O͝ OO 4tG> rwGl wG |G' xG/ cyG= yG'H yGR GhZ LG<e G<p G ًGX 1GLtt^stžtϞtݞt t$t(t^s _s@t(t('t(/t07@t(A }G R GQb ،Gl Gw G Gt t Gc G CGğ G%͟ Gޟ`O \G G[ >G& G/ ΖG: oG"E G3P ĔG'f G| G G !G >G;̠ yG٠ GY ^Gp GY wG! G? יG"' G(6 !GE ƚGS G*`tj ƜGwy =G TG8 G_ G Ga G¡ Gnϡ G* FGO GK  GR 2G( G_8 G_G VGU GFa rGq WG| G$)O @OtϢȃtݢЃt؃t GI G )G!0 JG<K G\ G q GH G3 >Ga GPɣ G ܣ G) _sx_s  8GD |Gm+ G? GPgsb G MGJ GJ GJԤ +G GOgs  GO= mGIQ Gd Guz G G Gs Gȥ G٥ Gv 2G` /H  .H> lHw$ H6 HoQ `HLf H}O xH QHĦ HԦ q H H  H H, AH? 2HX 'H4d [Hr H H H H!0 )H<ɣ eH  H HQħ Hקgs H  HY! HC4 HFO_g !HstO  "HK N"H O  OHǨ [#HϨO $HG !%H  %HO0OIObO{O ,H7 ,H>OѩO .HO O(>OAPOZ`OsnO !5HhsO O ɪOO hO 1O -"OF}O_h =HOt $>Hp1 ѩO!O  EH rIHO ٫"U NH_ oNHt OO $O 40OM7Ofo XHw gYHV YHQ O OO (OҬ ieHܬ@OѩROO  lHM" lHC+O DO]O v `rH O sHBOOܬO̭O OѩOO O 0OIT @HDb2O{ HC LjH H`OŮ Hoծ@OOO  OPO9pOѩOROkv Hѩ@O H4O  HtGO  ՞H% HǯSO `O PH`O ) H'3 :HA8OZPOspO HO ZHfͰO O H HP ѩP6 HCP \ bHcP P|P P P DZP  P P#P 0P +;P DEP ]RP v`PqPPPڲPPǯPܬP P %P >*P W7P pBP PPbP nP ԳwPPPP 8P QP jP PP - PP A%P δ/P  HVP Hr  0I P / <I=PѩPV Iag XIrP  I P I% Ibɵ Iڵ I6 I I; ;IO I. I4" I.- I5 5IHB&P [ }I1f'P  I I0"'P In9'P ֶ `Iѩp&P޶ LI \IP&P  Iw #IL' oI2 ID<'P U I,` Ik(P  I+ I) I@ 6I 'I Ipȷ QIԷ'P - I0 ] I (P " \!I+ !I95 'P N "I] #IZg|'P  w#Id'P P'P $%I; _&INǸ &Iո 6'I\ 'I 'I `(I )I )I$o'P = +IE'P^ ,Ig (P  -Io'P  10I: k0I) 0IU¹1'P۹ 0I6 1IV u1I 1I 2I 3I= C3I'A(P N(P @Y(PY7(P r ;I}'P  XII  $>I &P&P ƺ {KIhѺ SI1޺'P &P'P 'P 'P 2 JI7 JI8A 3KIHܬ&PN'P g QIYq 8P `8P-=P Z=P   ICP 4CP M I5jCP^CP wCP CP CPѩCPDP DPDDP  dI!0DPMDP: I OzEPѩEP^EP EPwEP FP0FPܬEP I' IG I$ "I  AI :I<-7 @I= IFI IxU_ Jmm -JP| }J* J:JP _JPJP J GJ J GP-JP F JW  J{d Juq  J} J /J Jp )Je J  Ji J JFJP  sJF- J4> J(U Jm %J2 WJZ JV JP JpJP J !J !J, !JFRJP _ x%Ji %J ~ %J  %J  %J  %J  %J  %J  %J  %J ( %J < &J Q &J e &JJ{ b'J0 )J U*JGP@GPpHP HPHP$HP;HPTIPbIPrJPKPKP OP4OPOP + lJ76PP O lJ^PPw mJѩPPQP  rnJ3 nJ< nJT 5oJ`PP PP PP QP QP 50QPN[ zJ-i zJ3y 0{J; k{JF RP |JSQPRP RP QP J JeZP'-ZP @7ZP YAZP rMZP YZP fZP sZPzZP ZP  J ' J7 ĔJK ֔J=a JCz VJ) J J  J' ϕJ J< &J. TJ.- J>L J2g J0 "JT vJf ܗJ+ J$ +J FJK J 5 JWX J@| HJ "Jk J+ JB J' !J'  HJ) qJ.+ J;; ڛJcJ =JX \Jo wJ J J+ ܜJv RJ J JF ҟJ J6 &JjY J@p СJ_P /Jl P Jk@P Jq ӅP$ wJ;PT J_eP~ UJYP JTP JmP oJb"P; ѦJbP Pi 3Jd@P J@P קJjP AJP0 ?JKI Pb JFyP ЩJ``P 0JtP J;P6 ߪJQGP` 0J;vP kJP YJP J  J# :J;`PT JnP @JiޟP JEP JZ HJ?P J.PG JLV ]Ji 'J`P ȱJV JgP J P JZ6@PO gJ(h J>z@P ͳJ`P JP J? HJ`P6 ߵJPPi vJS ɶJI JP JYP mJg  P" ԸJc5@PNSP g 7JyP JT JbP pJ@P J FP % J>;0PT Jl JV ׾J6 JH UJP`P J/ ԿJY P$ -JO>PW |JhP J2 KJ& qJTP J`P J`P5 J>H Pa FJxP )J BJpP J\ PrPP`Pp ЄP & KJ?PX Jr eJ 2J@P J bJP JB$ J53 JK J T JD`#P y QJ dJUPPpPPPĎP ЎPaP P3PLY Jgu JK ŏP aP  Jc 3Jr Jc J J J  JEmP,6 JIH )J?W hJSb JNs J@P J`PpP  rKКP  K KOڲP P9PRPkPPP P P ѩ,P K K KZ  KO e K 7!KMP  !K ̲P 9 "KOG R"K`V "K_ #K$o $K`| %KP aP  $'KP >P  (Kc 7)K J+KP  "-KP  -Kb 0.KU%P> 2K2P 3K%] 5K:iP P PPPѩPPP (PбP SK['P@ WKgP lXKHbpP{ YK͝0PPP`P P ֲP PPPP, K(; KH K8Y K:e 2Kt K KW ߓK\'P ѩPP ;K ׼4P  DKX KP wKLP* ÙKZ2 KZ< wKaNP M`Pf KsAP  KvqP  KmP  K eK K~ qKo K&жP? KkP bKka ͨK}sP JK fK "K^ K K[ ڬKk EK6 {K Kc cK, DK!< eK3H KW Ki P K NK K#P 9KPP KPP% K 6 @KiA KLJPc KsBP  K)9P  սKPP K KP  KIP 1 KG; 8KGP ` KTnP BK KP qK% K K K mKR K FKm K\ K Kr( |K,5 KoA KYN pKV K_ K5k RKt ZKr K KE K%zP  KP  K^P  K  K#nP 1 K>; KH(P a@Pk KzRP uK \KrpP }P KbaP 0KP ) +K/6>P OP h ZK=tKP  KP  XK1 K K  K' KV "K KP  IK KZ& ;K1 K+<)P U KP _ KhP  zK K'P  K yK4P  {K$ KXP  KS" JKX*PC KP xK~\ Kh Kt K L kL OLtiP  L.P  L-P  L LP 8 LB 4LON LYP r rLI{ Lx 3LB uL 2Lj L LRWP  L Lo LP  Lh LE P $P = )L FP_Px!P `PPPPP P `P 3PLPep hLP P  YjLYPP 8P ѩPPPPP !P :P SPlP ѩPP P P LѩP L ŒLwP PP P 0< L'G L?U FL>c L\m Lzx:P `Pp ZL ^Lh L) IL ƖLX L 9LaP  LM aP  L  L Lo")P; L@I ƨLmW *LRh gL3v L 3L L ³L0 LY KLF L 9P  LP LL L' L4 LBP [ gL<h |Law LP P L`2P(P PP"PP.0PG@PpP`PyP hL( L LP WL9$P L1 L.PG nL\PPu`P L4 ;L} LP P L L  WLO lL_ Lo L{ uLTP L׼PP@P @L L9 M/ NM)P 7 PGGT Me`P p M M> M M Mz jM0 ML vP P PPoP M0# MX1 nM< ML MZ <Mtl M P MP IM M M M M4$ M7 MSI !MN[ W!MnP`PR`P P#M e#M $M< E$M 'M] a'M{ (MP . )MPPC P+MeV ,MPi .M}`P@ P9 0Mr 0Mb)P  T1M 1M!PP 9M. 3M(CP A 3M#L 3M] 4Mj 8M-x 9MPP  :M1 ;M+ 1;M5P  M- >M( >MH >M ?M "@MK m@M1 @MFPHZPI(PpPX}@PJ BMZ BMP FCM CML EM8 OEMs GMF HMe mHM: HMb& IMS6 \IMLF IMHW PXdPQs JMg wJMIPP LMN OM~ OM QM QM  QM SM TMv% UMB UMU[ 4VMp VM vWM WM XM;PP@P( P0 $[Mj(Q' [MK1P J [M` n\Mr ]M N^MPQ( ^MR -`Mz `M aM sbM* bM% bM: cM O dM8X dM8a eMar yeM 0QDQ hML hM/ hMF DiM>`P P% iM9Q R rlMFl lMwQ /mMJ ymM wnM1Q 7oM oMu BpMv@Q qM3 rMe? UsM[X`QqQ@ tMJ tM uM|QQ WwMeQ wMQ zM'- QF {MQ |MPa |Mo }M|Q(QGQX QiQQ @Q<  ~MI  )M>  gMj%  MK4  M<  4ME DQ ^  M9f  Mo ;Q  Mj 0Q   M  !M  Q  ǘM  Q   xM$  Q =  FMG  Q о Q `  Ml Q k  Q  M>  M]  Ms  M  Q Q  M  *Mv  Q  Q  Q-  QF @ Qѩ\ Q_ c Qx q Q  Q ls  MZ ps ts xs |s" s8 sN sd sz  VM  QMF  t t t t t t t   M  ZM# . 7  xN'O  N)c  QAq  N  Q NY   N>  Q  QP  Z N  v N  ^N) NwBQ[f N~ N Q NQ NQ N= Q"V E!NPs "NQ #NQQQ Q%PQ>`QW_0Qx &N]QQQQQ  J2NE*tQ CiQ \\Q uPQ  9NGQQQQ"Q@Q4`QMSSaH@sm oM~ `I  }GJ aJD QJy 2JE _JR "I MJ UJ CJ\  K8 LnHT( J(  ImHF  J  ‘I  KH ! x[J! J*! 6L17! 6J6C! qIJV! 13J5b! kLw!s! HH! [YJ6! 9oHY! FJ! +1H! KJ ! @J! iRJ)" Jf " ^8JH" `J)" ckH64" L >" LN" :J3Y" DdJd" 1M+u" cUJB"Ks" 7H" @J" ZJ." 4J)" MhJ" fM" RH#" H# IA# J%# ^J55# K]C# 0JHN# LbJ]# MJk# MJ}# ZHR# +lJ # uH# SI# ˟H-# JJ# iHU# JHJV# RbJC#MP6$ GHr$ BJ$ _J2$ KJ.>$ ( vIEN( 7JCZ( qHsg( `Nv( dJ^( gqI( OhJ(Op( M( i K'( zL%( ) 6I*Q) 6lJ \) VKo) bJ |) OL*) H:) 8JL) @4H) .XJ) QJH) GH) I) H5J6* %6J6 * HL* hH ,* ƒL<* LJK* 0{L \* wM>j* d7JCv* @H* )2J?* A@J.* IJ* Jv* l4J *@@s* 4TH * HPH* 3J3+ HJK+ I#+ iJe6+ M H+ MzY+ cJe+ BJXr+ Mg+ oJ6+ 6J$+ Jl+ DJi+ IJ+ ]Ja+ %L*+ 8`JR, %LJ, oI*", I8, MJK, OH\, `Jn, 4J<x, J#, tyHC, MKX, IJ, YJ;, SHr, YJ;, KO, uIJ- dJv - FH- 'JS%- &UJ,4- P{LEE- BMJJS- Lc- f3J4o- ^Ja}- m[Hj- M- 80JH- j^Ja- O`- 1CHl- 5kJ- eJ- VJ+-@NP6. It. K(. TH6. h2HE. K]J'V. 0NJc. vHp. AM~. ԋI. mH. CXH. gM..@s. 8J$. Hb. 9K. XJc/ ^^H/ WJ/#/ W4H2/ R>J>/ /JN/ ]NX/ %IJ g/ +_Hr/UP/ IJ/ )4J)/ TH2/ dLJ5/ 9@H}/ J/ sHj/ /RJ:/ {LP/ ?rH 0 JNJ0 :J")0 J40 #JC0 OOJV0 /JHa0 RUJp0 I>0 DJi0 ^OH0 ҌHa0 H0 HX0 &ZJ/0 OJ\0 UJ0 OK1 iI1 eI_21 B=Jc>1 IR1 Hm^1 TJ,t1 c3H1 %RJ 1 KV1 "LH1 ,tHd1 II1 I1 M1 KJ)1 MJ 2 1^H-2 cpIU12 nHD2 <_J [2 3_J i2 Ix2 3AJD2 7JC2 I2 ̓I$2P@s2 KJJ2 5;Ii2 I2 FJ2 K 3 SH+3 qFH3 X9J*3 ~5J663 :HC3 GX3 aRNDp3 Ks{3s3 GG 3" Bv3`t3 YFo3 C)3 A3 CF03!aO4 SC24 yHC4 F0L4 "-NKh4 bLH v4 I(4@Xs 4 JEs4 \QGP4 G44!kN4 E 5s5 'Fg,5 A E5 sFP5e5s(y555" Bv5" (E655 AH/6@6 sXU6 Hj66 W0M6 8N46N66Q6 Ht6 H 7 /N(7 vEQ7 98N4f7 Au7 qBx7 QB7 D7 G70wt7 *C@8 Dh98 F!K8 NE]8 jC-n8 A2G8 H"8 PH8 H8,A8 Ao8 iG 8" .Bl9 E9O 9 ,A@9 ޗGAO9e9 iGGu99P,A9 FF9 UZN9 ^FJ9 0NA9 ZA.:: HG!: A9: rAQ: 0]Na: Hq: LAh:: E:" D:" YA&:; A*; 7*CI;`; Eus; SGG;; :Nh; 'E; nA&; A< $mE)<=<Q< Erj<" >YA<!`bN(<" XA=<" XA< AM< H < =  >F>!s4> 3D$N> Fv`> Bp> RAR> }DE1> H> F> /GC> F? J? ?3? 0HEI? E\`? -As? H(?Xs(? Eg? aE? B4? RE)? CA@ tA4<@xQW@ tG d@@@@" ܖE=@ G@ khE@ e G@ C@ 'BDA iXEdA4A 3AgA QG*A PAA HA NDA XNA EA 6MEB pEB)B lFABB aFPBjB zUAB }MB" XA=B p@B)B v:N`B!N(B GB G C E7C FC ZClC eGx}CC DqCC GCC DA&CsCD &{E^D *BA>D!aN(RD QGaD 8FoDD AD EjD EDD tlGJE zGE%E -FTE]EvEE DE!`+OE DEE 9N{ F rEL.FIF LAcrF vG|F 2EWF QVG'F ĩAF GF DF`NnF BoF ?ZA8G GC!G AAGZGrG lEG" CGsGGG |N4H TN6"H Hb-HBH]NHH!N]H HkH tVEwH CHH o5FH! O(HHH" ZA&H GI R"MI,I $I UGNI EE hI" E=I!`cNI!bN I 'TNI H2I tGI FAJ FA(J %LEb2J 2N>J uHMJ 0XNYJnJ {E{J NEJ DJ wZA2J!cNJ i,NJ A6K Fa/K tEXK ?EiKsK H9K OEK XNK MHcKK FK FKK E: LLTHsHT[T wFTT 0F1T ^FJT =HT ]FbT j$NT jH;T uE4UU B9U" ܖE=NU BrG5]UUUU BWAU HU 8NoU EMVs(V H;V EH-KV GVV rV EKVQV .NV EHgV HF0W ҤFW XB+W@WTW HcW -=BlW ;jI{W GW G&W WD&W ˀGWW G-X MG%X 9E3/X(sEX HOX E?`XtXX]NXsX!cNX IHX8tX AXX PFpY H Y J&Y ElAYXY {GY GY [E Y tMEvY EgY FgYZ pnGZ 1A2Z xA@Z DjZ IQzZ EMZsZ HZ" xE=ZZ SA$%[ AP[ gEMX[ Eo[ C8u[" XA[ -H:[ C@[[ C[ E\5\ DL\ Cp\ lIZy\\ AM\ fHI\ B\" XA]p1A] {H*] &G0;] B0Q] Frm] cD] 6Fa] E]] xVG7]" B^ H^ A ^ :^KsG^ TuEP^d^ sr^ GY^ xA^ G8^" A^ N^ Ht^ M`^^ M^_#_ @Eo9_ D`_ H@j__ oE{_ M___ GW_1A_ ` ')NB `@` E` xA*`" Aw` RAa tkGa4aIa F ca Gpaa ?Ea!bNaa HWa Ha 3Hka H9Nla 0H b" WA1b $AYAdd }GPd !G\d G e REI'e;N?g pC8gLg Agg H#wgg cRE)gg Aog E8gg |Hh !Gx h"h" XAJh NAXh 7N=nhh FG$h #Gh LEh jE^hh ^WA[h!bNh 0QAvi TBTBiUi }D"yi0si Fhi AEi 9E3ii H8iij 1G/"j JAXj vFCujj sGbj Ajj UH6j yFG j wH k [E$k G"k `C1kCk PLH Mk XsSk fG_k Dpk nFG k!aOk" Fwk JAk bBk NDl \Fl hAPl G^l" AEsl`wt}l" Awl Nrl G+l 8tHll Flm >+CN#m DICm UA[nm s{m8tm" XA&mm 6Gmmmm" >YA$n wsG[3nJnLs(Zndnxn Dn Jznn In En No dG o hlI,!o @ADo[o FGsoo No G8o Ao" .Bloo ZIlop&p E4p HIEp AMWp Cp" .BlpQp`Xs pp G#p lGp E/q JCN`q EPq [7Naqtq $QE!q Gqqq FGq" xE=qr Bx6r %EHr Aarzr" )Br GBr \Nrr 7H@r AMr G#s1s L7NHs HSs yWN]s G:s Ms Hs" )Bs pE5s EAs 4Ns jA t G!+ts5t iMCt HQtet VEt xB t XEt ڃGtt PE{t "Gu" B7u xApZu Nx SG x Hgxx -Nx H y A-y ?G8yMy SH1]yqy OgEByyyyy ܪAy Ny Gy EO z 2NAz!cN.z F'9z" )B\zpzzOzzzz ydGz E&{ 2N@4{ G>{R{ `jEr_{ FUl{ X%D;{ m6N{ eD]{{ 4F{ G{!PcN| E+| 7lI <|" XA=N| Ghv| Fg| ܪA| &AQ| H| pE| ԚF|!aO( } SME! } xIE5} m8NlE} qEe} G>r}pQ} ԉE} *jI} GE} VN} nA%} _G}~ DG8 ~)~ \EA~T~" vXA=i~ CHtw~ H~ RAR~~ "=B ~s~ 5H1~ (ER ~ E^ CY F9 C7K XGU &DKnNv!EO( QN YNJ NJ FG !sX? $Dfl dG"z HHwt̀ ODd zCf/ XN< DTs_ .Bu ;Ho ER E(Xs cGÁ Ǵ GhGׁ E E$ fEL+ JG; FDSZp H} XN!`O( "E CЂ kBE H TMA >A> 5FN FN_ ,G8l E :Bʃ Duڃ G" WA& AC HP F\ wto ߒE/!0cN„ IЄ!+O DT E L! >qE* GB8 VNTA GJe} jE H" PXA&΅ Fz Hr H&* C3 REA`sE %NuY IGb VN| w!H @B " A (B E wE /B(Xsp8 ER rXN_ Hcm AÇ YLH ч rG܇! bN( -Dy PAP C-h wH G FIE2 U DIՈ OD H H 3Hd) 4C,A >NV Al F" B EЉ 5Gމ G XN" Aw1 -BFEY lEm _Gt A E̊ G֊!aO %NE' *B9B" (E6c" Fw CF" ^E7 LA]݋ `NE" RuFB!aO$`s1 EnD\ta G j 3@B=w OJ) GG Eی ?N }HS#" WA12F MsRh" XA=} F7 +[E ЬH H G LA ԓHs YEQ F* FEuC EGb!xNt" Bv B ͎ =N NE%& Ha1J_ jE,n k B6 3NW" YA=Ï YEΏ XF OD AB^" E&| G CXN lEÐ Aِ EH G "D&" *B&>R <#G` {G`m ?G5 iI Hؐsӑ D 9G  LEb H"+@ cE_ A} SN H *xE E& HXΒXsߒ G D); FIb" B" Aw dGʓ G8ӓ ?AI F'; CFN2Rg m-NW}” NJEܔ Dq. G9 iGTH 0H S Ah@:A @zEΕ +B.ܕ Eg  ~F 7:AL ԈE\ dAXt AC MDƖ 1HӖ H!xcN 1GG   \E |B< ´FnL H] Hksr =EWs PG͗ %YC ߗ!bN :A hs- HU; CJE AMW Hkh 1N{ HC WEŘ AHӘ  dG1 j F0) IM4 $N F ED`s lEN rH NNJ _C ˙ 0$N: LH $A  |G8 H) xJ+9Q`jOa SG~kMsu 9Fk~ tEaǚ 2Ba cM  A&5" E&J^q moG&! tN Eכ!`pN OE ~GG (Ms(;A;N G\ ƭA.t ȧFQ p)C AӜ 0H E+ E  FC+" >YAS Ni F6 Nԝ :Ey" E& gdG nD H+(9M NCe TDP ^G  FA Eמ +J TA" )B! AF54 Ecv qEG EH% %GG  p'F̟" YA= MEv s6L JUg kLH?r C w A& `+A 1F  &E ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/util.h" #include "key_def.h" #include struct tbuf; /** * @brief In-memory tuple format */ struct tuple_format { uint16_t id; /** * Max field no which participates in any of the space * indexes. Each tuple of this format must have, * therefore, at least max_fieldno fields. * */ uint32_t max_fieldno; /* Length of 'types' and 'offset' arrays. */ uint32_t field_count; /** * Field types of indexed fields. This is an array of size * field_count. If there are gaps, i.e. fields that do not * participate in any index and thus we cannot infer their * type, then respective array members have value UNKNOWN. */ enum field_type *types; /** * Each tuple has an area with field offsets. This area * is located in front of the tuple. It is used to quickly * find field start inside tuple data. This area only * stores offsets of fields preceded with fields of * dynamic length. If preceding fields have a fixed * length, field offset can be calculated once for all * tuples and thus is stored directly in the format object. * The variable below stores the size of field map in the * tuple, *in bytes*. */ uint32_t field_map_size; /** * For each field participating in an index, the format * may either store the fixed offset of the field * (identical in all tuples with this format), or an * offset in the dynamic offset map (field_map), which, * in turn, stores the offset of the field (such offset is * varying between different tuples of the same format). * If an offset is fixed, it's positive, so that * tuple->data[format->offset[fieldno] gives the * start of the field. * If it is varying, it's negative, so that * tuple->data[((uint32_t *) * tuple)[format->offset[fieldno]]] * gives the start of the field. */ int32_t offset[0]; }; extern struct tuple_format **tuple_formats; /** * Default format for a tuple which does not belong * to any space and is stored in memory. */ extern struct tuple_format *tuple_format_ber; static inline uint32_t tuple_format_id(struct tuple_format *format) { assert(tuple_formats[format->id] == format); return format->id; } /** * @brief Allocate, construct and register a new in-memory tuple * format. * @param space description * * @return tuple format */ struct tuple_format * tuple_format_new(struct key_def *key_def, uint32_t key_count); /** * An atom of Tarantool/Box storage. Consists of a list of fields. * The first field is always the primary key. */ struct tuple { /** snapshot generation version */ uint32_t version; /** reference counter */ uint16_t refs; /** format identifier */ uint16_t format_id; /** length of the variable part of the tuple */ uint32_t bsize; /** number of fields in the variable part. */ uint32_t field_count; /** * Fields can have variable length, and thus are packed * into a contiguous byte array. Each field is prefixed * with BER-packed field length. */ char data[0]; } __attribute__((packed)); /** Allocate a tuple * * @param size tuple->bsize * @post tuple->refs = 1 */ struct tuple * tuple_alloc(struct tuple_format *format, size_t size); /** * Create a new tuple from a sequence of BER-len encoded fields. * tuple->refs is 0. * * @post *data is advanced to the length of tuple data * * Throws an exception if tuple format is incorrect. */ struct tuple * tuple_new(struct tuple_format *format, uint32_t field_count, const char **data, const char *end); /** * Change tuple reference counter. If it has reached zero, free the tuple. * * @pre tuple->refs + count >= 0 */ void tuple_ref(struct tuple *tuple, int count); /** * @brief Return a tuple format instance * @param tuple tuple * @return tuple format instance */ static inline struct tuple_format * tuple_format(const struct tuple *tuple) { struct tuple_format *format = tuple_formats[tuple->format_id]; assert(tuple_format_id(format) == tuple->format_id); return format; } /** * Get a field from tuple by index. * Returns a pointer to BER-length prefixed field. * * @pre field < tuple->field_count. * @returns field data if field exists or NULL */ static inline const char * tuple_field_old(const struct tuple_format *format, const struct tuple *tuple, uint32_t i) { const char *field = tuple->data; if (i == 0) return field; i--; if (i < format->max_fieldno) { if (format->offset[i] > 0) return field + format->offset[i]; if (format->offset[i] != INT32_MIN) { uint32_t *field_map = (uint32_t *) tuple; int32_t idx = format->offset[i]; return field + field_map[idx]; } } const char *tuple_end = field + tuple->bsize; while (field < tuple_end) { uint32_t len = load_varint32(&field); field += len; if (i == 0) return field; i--; } return tuple_end; } /** * @brief Return field data of the field * @param tuple tuple * @param field_no field number * @param field pointer where the start of field data will be stored, * or NULL if field is out of range * @param len pointer where the len of the field will be stored */ static inline const char * tuple_field(const struct tuple *tuple, uint32_t i, uint32_t *len) { const char *field = tuple_field_old(tuple_format(tuple), tuple, i); if (field < tuple->data + tuple->bsize) { *len = load_varint32(&field); return field; } return NULL; } /** * @brief Tuple Interator */ struct tuple_iterator { /** @cond false **/ /* State */ const struct tuple *tuple; /** Always points to the beginning of the next field. */ const char *pos; /** @endcond **/ }; /** * @brief Initialize an iterator over tuple fields * * A workflow example: * @code * struct tuple_iterator it; * tuple_rewind(&it, tuple); * const char *field; * uint32_t len; * while ((field = tuple_next(&it, &len))) * lua_pushlstring(L, field, len); * * @endcode * * @param[out] it tuple iterator * @param[in] tuple tuple */ static inline void tuple_rewind(struct tuple_iterator *it, const struct tuple *tuple) { it->tuple = tuple; it->pos = tuple->data; } /** * @brief Position the iterator at a given field no. * * @retval field if the iterator has the requested field * @retval NULL otherwise (iteration is out of range) */ const char * tuple_seek(struct tuple_iterator *it, uint32_t field_no, uint32_t *len); /** * @brief Iterate to the next field * @param it tuple iterator * @return next field or NULL if the iteration is out of range */ const char * tuple_next(struct tuple_iterator *it, uint32_t *len); /** * @brief Print a tuple in yaml-compatible mode to tbuf: * key: { value, value, value } * * @param buf tbuf * @param tuple tuple */ void tuple_print(struct tbuf *buf, const struct tuple *tuple); struct tuple * tuple_update(struct tuple_format *new_format, void *(*region_alloc)(void *, size_t), void *alloc_ctx, const struct tuple *old_tuple, const char *expr, const char *expr_end); /** Tuple length when adding to iov. */ static inline size_t tuple_len(struct tuple *tuple) { return tuple->bsize + sizeof(tuple->bsize) + sizeof(tuple->field_count); } static inline size_t tuple_range_size(const char **begin, const char *end, uint32_t count) { const char *start = *begin; while (*begin < end && count-- > 0) { size_t len = load_varint32(begin); *begin += len; } return *begin - start; } void tuple_free(struct tuple *tuple); /** * @brief Compare two tuples using field by field using key definition * @param tuple_a tuple * @param tuple_b tuple * @param key_def key definition * @retval 0 if key_fields(tuple_a) == key_fields(tuple_b) * @retval <0 if key_fields(tuple_a) < key_fields(tuple_b) * @retval >0 if key_fields(tuple_a) > key_fields(tuple_b) */ int tuple_compare(const struct tuple *tuple_a, const struct tuple *tuple_b, const struct key_def *key_def); /** * @brief Compare two tuples field by field for duplicate using key definition * @param tuple_a tuple * @param tuple_b tuple * @param key_def key definition * @retval 0 if key_fields(tuple_a) == key_fields(tuple_b) and * tuple_a == tuple_b - tuple_a is the same object as tuple_b * @retval <0 if key_fields(tuple_a) <= key_fields(tuple_b) * @retval >0 if key_fields(tuple_a > key_fields(tuple_b) */ int tuple_compare_dup(const struct tuple *tuple_a, const struct tuple *tuple_b, const struct key_def *key_def); /** * @brief Compare a tuple with a key field by field using key definition * @param tuple_a tuple * @param key BER-encoded key * @param part_count number of parts in \a key * @param key_def key definition * @retval 0 if key_fields(tuple_a) == parts(key) * @retval <0 if key_fields(tuple_a) < parts(key) * @retval >0 if key_fields(tuple_a) > parts(key) */ int tuple_compare_with_key(const struct tuple *tuple_a, const char *key, uint32_t part_count, const struct key_def *key_def); /** These functions are implemented in tuple_convert.cc. */ /* Store tuple in the output buffer in iproto format. */ void tuple_to_obuf(struct tuple *tuple, struct obuf *buf); /* Store tuple fields in the Lua buffer, BER-length-encoded. */ void tuple_to_luabuf(struct tuple *tuple, struct luaL_Buffer *b); /** Initialize tuple library */ void tuple_format_init(); /** Cleanup tuple library */ void tuple_format_free(); #endif /* TARANTOOL_BOX_TUPLE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/src/box/space.cc0000664000000000000000000003152112242653271016747 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "space.h" #include #include extern "C" { #include #include } /* extern "C" */ #include #include #include "tuple.h" #include #include #include #include static struct mh_i32ptr_t *spaces; /** * Secondary indexes are built in bulk after all data is * recovered. This flag indicates that the indexes are * already built and ready for use. */ static bool secondary_indexes_enabled = false; /** * Primary indexes are enabled only after reading the snapshot. */ static bool primary_indexes_enabled = false; static void space_create(struct space *space, uint32_t space_no, struct key_def *key_defs, uint32_t key_count, uint32_t arity) { memset(space, 0, sizeof(struct space)); space->no = space_no; space->arity = arity; space->key_defs = key_defs; space->key_count = key_count; space->format = tuple_format_new(key_defs, key_count); /* fill space indexes */ for (uint32_t j = 0; j < key_count; ++j) { struct key_def *key_def = &space->key_defs[j]; Index *index = Index::factory(key_def->type, key_def, space); if (index == NULL) { tnt_raise(LoggedError, ER_MEMORY_ISSUE, "class Index", "malloc"); } space->index[j] = index; } } static void space_destroy(struct space *space) { for (uint32_t j = 0 ; j < space->key_count; j++) { Index *index = space->index[j]; delete index; key_def_destroy(&space->key_defs[j]); } free(space->key_defs); } struct space * space_new(uint32_t space_no, struct key_def *key_defs, uint32_t key_count, uint32_t arity) { struct space *space = space_by_n(space_no); if (space) tnt_raise(LoggedError, ER_SPACE_EXISTS, space_no); space = (struct space *) malloc(sizeof(struct space)); space_create(space, space_no, key_defs, key_count, arity); const struct mh_i32ptr_node_t node = { space->no, space }; mh_i32ptr_put(spaces, &node, NULL, NULL); return space; } static void space_delete(struct space *space) { const struct mh_i32ptr_node_t node = { space->no, NULL }; mh_int_t k = mh_i32ptr_get(spaces, &node, NULL); assert(k != mh_end(spaces)); mh_i32ptr_del(spaces, k, NULL); space_destroy(space); free(space); } /* return space by its number */ struct space * space_by_n(uint32_t n) { const struct mh_i32ptr_node_t node = { n, NULL }; mh_int_t space = mh_i32ptr_get(spaces, &node, NULL); if (space == mh_end(spaces)) return NULL; return (struct space *) mh_i32ptr_node(spaces, space)->val; } /** Return the number of active indexes in a space. */ static inline int index_count(struct space *sp) { if (!secondary_indexes_enabled) { /* If secondary indexes are not enabled yet, we can use only the primary index. So return 1 if there is at least one index (which must be primary) and return 0 otherwise. */ return sp->key_count > 0; } else { /* Return the actual number of indexes. */ return sp->key_count; } } /** * Visit all enabled spaces and apply 'func'. */ void space_foreach(void (*func)(struct space *sp, void *udata), void *udata) { mh_int_t i; mh_foreach(spaces, i) { struct space *space = (struct space *) mh_i32ptr_node(spaces, i)->val; func(space, udata); } } struct tuple * space_replace(struct space *sp, struct tuple *old_tuple, struct tuple *new_tuple, enum dup_replace_mode mode) { uint32_t i = 0; try { /* Update the primary key */ Index *pk = sp->index[0]; assert(pk->key_def->is_unique); /* * If old_tuple is not NULL, the index * has to find and delete it, or raise an * error. */ old_tuple = pk->replace(old_tuple, new_tuple, mode); assert(old_tuple || new_tuple); uint32_t n = index_count(sp); /* Update secondary keys */ for (i = i + 1; i < n; i++) { Index *index = sp->index[i]; index->replace(old_tuple, new_tuple, DUP_INSERT); } return old_tuple; } catch (const Exception& e) { /* Rollback all changes */ for (; i > 0; i--) { Index *index = sp->index[i-1]; index->replace(new_tuple, old_tuple, DUP_INSERT); } throw; } assert(false); return NULL; } void space_validate_tuple(struct space *sp, struct tuple *new_tuple) { if (sp->arity > 0 && sp->arity != new_tuple->field_count) tnt_raise(IllegalParams, "tuple field count must match space cardinality"); } void space_free(void) { if (spaces == NULL) return; while (mh_size(spaces) > 0) { mh_int_t i = mh_first(spaces); struct space *space = (struct space *) mh_i32ptr_node(spaces, i)->val; space_delete(space); } tuple_format_free(); } static void space_config() { /* exit if no spaces are configured */ if (cfg.space == NULL) { return; } /* fill box spaces */ for (uint32_t i = 0; cfg.space[i] != NULL; ++i) { tarantool_cfg_space *cfg_space = cfg.space[i]; if (!CNF_STRUCT_DEFINED(cfg_space) || !cfg_space->enabled) continue; assert(cfg.memcached_port == 0 || i != cfg.memcached_space); uint32_t arity = (cfg_space->cardinality != -1 ? cfg_space->cardinality : 0); /* * Collect key/field info. We need aggregate * information on all keys before we can create * indexes. */ uint32_t key_count = 0; while (cfg_space->index[key_count] != NULL) key_count++; struct key_def *key_defs = (struct key_def *) malloc(key_count * sizeof(struct key_def)); for (uint32_t j = 0; cfg_space->index[j] != NULL; ++j) { auto cfg_index = cfg_space->index[j]; key_def_create(&key_defs[j], cfg_index); } (void) space_new(i, key_defs, key_count, arity); say_info("space %i successfully configured", i); } } void space_init(void) { spaces = mh_i32ptr_new(); tuple_format_init(); /* configure regular spaces */ space_config(); } void begin_build_primary_indexes(void) { assert(primary_indexes_enabled == false); mh_int_t i; mh_foreach(spaces, i) { struct space *space = (struct space *) mh_i32ptr_node(spaces, i)->val; Index *index = space->index[0]; index->beginBuild(); } } void end_build_primary_indexes(void) { mh_int_t i; mh_foreach(spaces, i) { struct space *space = (struct space *) mh_i32ptr_node(spaces, i)->val; Index *index = space->index[0]; index->endBuild(); } primary_indexes_enabled = true; } void build_secondary_indexes(void) { assert(primary_indexes_enabled == true); assert(secondary_indexes_enabled == false); mh_int_t i; mh_foreach(spaces, i) { struct space *space = (struct space *) mh_i32ptr_node(spaces, i)->val; if (space->key_count <= 1) continue; /* no secondary keys */ say_info("Building secondary keys in space %d...", space->no); Index *pk = space->index[0]; for (uint32_t j = 1; j < space->key_count; j++) { Index *index = space->index[j]; index->build(pk); } say_info("Space %d: done", space->no); } /* enable secondary indexes now */ secondary_indexes_enabled = true; } int check_spaces(struct tarantool_cfg *conf) { /* exit if no spaces are configured */ if (conf->space == NULL) { return 0; } for (size_t i = 0; conf->space[i] != NULL; ++i) { auto space = conf->space[i]; if (i >= BOX_SPACE_MAX) { out_warning(CNF_OK, "(space = %zu) invalid id, (maximum=%u)", i, BOX_SPACE_MAX); return -1; } if (!CNF_STRUCT_DEFINED(space)) { /* space undefined, skip it */ continue; } if (!space->enabled) { /* space disabled, skip it */ continue; } if (conf->memcached_port && i == conf->memcached_space) { out_warning(CNF_OK, "Space %zu is already used as " "memcached_space.", i); return -1; } /* at least one index in space must be defined * */ if (space->index == NULL) { out_warning(CNF_OK, "(space = %zu) " "at least one index must be defined", i); return -1; } uint32_t max_key_fieldno = 0; /* check spaces indexes */ for (size_t j = 0; space->index[j] != NULL; ++j) { auto index = space->index[j]; uint32_t key_part_count = 0; enum index_type index_type; /* check index bound */ if (j >= BOX_INDEX_MAX) { /* maximum index in space reached */ out_warning(CNF_OK, "(space = %zu index = %zu) " "too many indexed (%u maximum)", i, j, BOX_INDEX_MAX); return -1; } /* at least one key in index must be defined */ if (index->key_field == NULL) { out_warning(CNF_OK, "(space = %zu index = %zu) " "at least one field must be defined", i, j); return -1; } /* check unique property */ if (index->unique == -1) { /* unique property undefined */ out_warning(CNF_OK, "(space = %zu index = %zu) " "unique property is undefined", i, j); } for (size_t k = 0; index->key_field[k] != NULL; ++k) { auto key = index->key_field[k]; if (key->fieldno == -1) { /* last key reached */ break; } if (key->fieldno >= BOX_FIELD_MAX) { /* maximum index in space reached */ out_warning(CNF_OK, "(space = %zu index = %zu) " "invalid field number (%u maximum)", i, j, BOX_FIELD_MAX); return -1; } /* key must has valid type */ if (STR2ENUM(field_type, key->type) == field_type_MAX) { out_warning(CNF_OK, "(space = %zu index = %zu) " "unknown field data type: `%s'", i, j, key->type); return -1; } if (max_key_fieldno < key->fieldno + 1) { max_key_fieldno = key->fieldno + 1; } ++key_part_count; } /* Check key part count. */ if (key_part_count == 0) { out_warning(CNF_OK, "(space = %zu index = %zu) " "at least one field must be defined", i, j); return -1; } index_type = STR2ENUM(index_type, index->type); /* check index type */ if (index_type == index_type_MAX) { out_warning(CNF_OK, "(space = %zu index = %zu) " "unknown index type '%s'", i, j, index->type); return -1; } /* First index must be unique. */ if (j == 0 && index->unique == false) { out_warning(CNF_OK, "(space = %zu) space first index must be unique", i); return -1; } switch (index_type) { case HASH: /* check hash index */ /* hash index must be unique */ if (!index->unique) { out_warning(CNF_OK, "(space = %zu index = %zu) " "hash index must be unique", i, j); return -1; } break; case TREE: /* extra check for tree index not needed */ break; case BITSET: /* check bitset index */ /* bitset index must has single-field key */ if (key_part_count != 1) { out_warning(CNF_OK, "(space = %zu index = %zu) " "bitset index must has a single-field key", i, j); return -1; } /* bitset index must not be unique */ if (index->unique) { out_warning(CNF_OK, "(space = %zu index = %zu) " "bitset index must be non-unique", i, j); return -1; } break; default: assert(false); } } /* Check for index field type conflicts */ if (max_key_fieldno > 0) { enum field_type *types = (enum field_type *) calloc(1, sizeof(*types) * max_key_fieldno); if (types == NULL) { out_warning(CNF_OK, "cannot allocate %zd bytes", max_key_fieldno); return -1; } for (size_t j = 0; space->index[j] != NULL; ++j) { auto index = space->index[j]; for (size_t k = 0; index->key_field[k] != NULL; ++k) { auto key = index->key_field[k]; if (key->fieldno == -1) break; uint32_t f = key->fieldno; enum field_type t = STR2ENUM(field_type, key->type); assert(t != field_type_MAX); if (types[f] != t) { if (types[f] == UNKNOWN) { types[f] = t; } else { out_warning(CNF_OK, "(space = %zu fieldno = %zu) " "index field type mismatch", i, f); free(types); return -1; } } } } free(types); } } return 0; } tarantool-1.5.1.218.g1a69fd6/src/box/box.cc0000664000000000000000000002530512231715276016451 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "box/box.h" #include extern "C" { #include #include } /* extern "C" */ #include #include "palloc.h" #include #include #include #include #include #include #include "tuple.h" #include "memcached.h" #include "box_lua.h" #include "space.h" #include "port.h" #include "request.h" #include "txn.h" #include static void process_replica(struct port *port, uint32_t op, const char *reqdata, uint32_t reqlen); static void process_ro(struct port *port, uint32_t op, const char *reqdata, uint32_t reqlen); static void process_rw(struct port *port, uint32_t op, const char *reqdata, uint32_t reqlen); box_process_func box_process = process_ro; box_process_func box_process_ro = process_ro; static char status[64] = "unknown"; static int stat_base; struct box_snap_row { uint32_t space; uint32_t tuple_size; uint32_t data_size; char data[]; } __attribute__((packed)); void port_send_tuple(struct port *port, struct txn *txn, uint32_t flags) { struct tuple *tuple; if ((tuple = txn->new_tuple) || (tuple = txn->old_tuple)) port_add_tuple(port, tuple, flags); } static void process_rw(struct port *port, uint32_t op, const char *reqdata, uint32_t reqlen) { struct txn *txn = txn_begin(); try { struct request *request = request_create(op, reqdata, reqlen); stat_collect(stat_base, op, 1); request_execute(request, txn, port); txn_commit(txn); port_send_tuple(port, txn, request->flags); port_eof(port); txn_finish(txn); } catch (const Exception& e) { txn_rollback(txn); throw; } } static void process_replica(struct port *port, uint32_t op, const char *reqdata, uint32_t reqlen) { if (!request_is_select(op)) { tnt_raise(ClientError, ER_NONMASTER, cfg.replication_source); } return process_rw(port, op, reqdata, reqlen); } static void process_ro(struct port *port, uint32_t op, const char *reqdata, uint32_t reqlen) { if (!request_is_select(op)) tnt_raise(LoggedError, ER_SECONDARY); return process_rw(port, op, reqdata, reqlen); } static void recover_snap_row(const void *data) { const struct box_snap_row *row = (const struct box_snap_row *) data; struct space *space = space_find(row->space); Index *index = space_index(space, 0); struct tuple *tuple; try { const char *tuple_data = row->data; tuple = tuple_new(space->format, row->tuple_size, &tuple_data, tuple_data + row->data_size); } catch (const ClientError &e) { say_error("\n" "********************************************\n" "* Found a corrupted tuple in the snapshot! *\n" "* This can be either due to a memory *\n" "* corruption or a bug in the server. *\n" "* The tuple can not be loaded. *\n" "********************************************\n" "Tuple data, BAS64 encoded: \n"); int base64_buflen = base64_bufsize(row->data_size); char *base64_buf = (char *) malloc(base64_buflen); int len = base64_encode(row->data, row->data_size, base64_buf, base64_buflen); write(STDERR_FILENO, base64_buf, len); free(base64_buf); throw; } index->buildNext(tuple); tuple_ref(tuple, 1); } static int recover_row(void *param __attribute__((unused)), const char *row, uint32_t rowlen) { /* drop wal header */ if (rowlen < sizeof(struct header_v11)) { say_error("incorrect row header: expected %zd, got %zd bytes", sizeof(struct header_v11), (size_t) rowlen); return -1; } try { const char *end = row + rowlen; row += sizeof(struct header_v11); uint16_t tag = pick_u16(&row, end); (void) pick_u64(&row, end); /* drop cookie */ if (tag == SNAP) { recover_snap_row(row); } else if (tag == XLOG) { uint16_t op = pick_u16(&row, end); process_rw(&null_port, op, row, end - row); } else { say_error("unknown row tag: %i", (int)tag); return -1; } } catch (const Exception& e) { e.log(); return -1; } return 0; } static void box_enter_master_or_replica_mode(struct tarantool_cfg *conf) { if (conf->replication_source != NULL) { box_process = process_replica; recovery_wait_lsn(recovery_state, recovery_state->lsn); recovery_follow_remote(recovery_state, conf->replication_source); snprintf(status, sizeof(status), "replica/%s%s", conf->replication_source, custom_proc_title); title("replica/%s%s", conf->replication_source, custom_proc_title); } else { box_process = process_rw; memcached_start_expire(); snprintf(status, sizeof(status), "primary%s", custom_proc_title); title("primary%s", custom_proc_title); say_info("I am primary"); } } void box_leave_local_standby_mode(void *data __attribute__((unused))) { recovery_finalize(recovery_state); recovery_update_mode(recovery_state, cfg.wal_mode, cfg.wal_fsync_delay); box_enter_master_or_replica_mode(&cfg); } int box_check_config(struct tarantool_cfg *conf) { /* replication & hot standby modes can not work together */ if (conf->replication_source != NULL && conf->local_hot_standby > 0) { out_warning(CNF_OK, "replication and local hot standby modes " "can't be enabled simultaneously"); return -1; } /* check replication mode */ if (conf->replication_source != NULL) { /* check replication port */ char ip_addr[32]; int port; if (sscanf(conf->replication_source, "%31[^:]:%i", ip_addr, &port) != 2) { out_warning(CNF_OK, "replication source IP address is not recognized"); return -1; } if (port <= 0 || port >= USHRT_MAX) { out_warning(CNF_OK, "invalid replication source port value: %i", port); return -1; } } /* check primary port */ if (conf->primary_port != 0 && (conf->primary_port <= 0 || conf->primary_port >= USHRT_MAX)) { out_warning(CNF_OK, "invalid primary port value: %i", conf->primary_port); return -1; } /* check secondary port */ if (conf->secondary_port != 0 && (conf->secondary_port <= 0 || conf->secondary_port >= USHRT_MAX)) { out_warning(CNF_OK, "invalid secondary port value: %i", conf->primary_port); return -1; } /* check if at least one space is defined */ if (conf->space == NULL && conf->memcached_port == 0) { out_warning(CNF_OK, "at least one space or memcached port must be defined"); return -1; } /* check configured spaces */ if (check_spaces(conf) != 0) { return -1; } /* check memcached configuration */ if (memcached_check_config(conf) != 0) { return -1; } return 0; } int box_reload_config(struct tarantool_cfg *old_conf, struct tarantool_cfg *new_conf) { bool old_is_replica = old_conf->replication_source != NULL; bool new_is_replica = new_conf->replication_source != NULL; if (old_is_replica != new_is_replica || (old_is_replica && (strcmp(old_conf->replication_source, new_conf->replication_source) != 0))) { if (recovery_state->finalize != true) { out_warning(CNF_OK, "Could not propagate %s before local recovery finished", old_is_replica == true ? "slave to master" : "master to slave"); return -1; } if (!old_is_replica && new_is_replica) memcached_stop_expire(); if (recovery_state->remote) recovery_stop_remote(recovery_state); box_enter_master_or_replica_mode(new_conf); } return 0; } void box_free(void) { space_free(); } void box_init(bool init_storage) { title("loading"); /* initialization spaces */ space_init(); /* configure memcached space */ memcached_space_init(); /* recovery initialization */ recovery_init(cfg.snap_dir, cfg.wal_dir, recover_row, NULL, cfg.rows_per_wal, init_storage ? RECOVER_READONLY : 0); recovery_update_io_rate_limit(recovery_state, cfg.snap_io_rate_limit); recovery_setup_panic(recovery_state, cfg.panic_on_snap_error, cfg.panic_on_wal_error); stat_base = stat_register(requests_strs, requests_MAX); if (init_storage) return; begin_build_primary_indexes(); recover_snap(recovery_state); end_build_primary_indexes(); recover_existing_wals(recovery_state); stat_cleanup(stat_base, requests_MAX); say_info("building secondary indexes"); build_secondary_indexes(); title("orphan"); if (cfg.local_hot_standby) { say_info("starting local hot standby"); recovery_follow_local(recovery_state, cfg.wal_dir_rescan_delay); snprintf(status, sizeof(status), "hot_standby%s", custom_proc_title); title("hot_standby%s", custom_proc_title); } } static void snapshot_write_tuple(struct log_io *l, struct fio_batch *batch, uint32_t n, struct tuple *tuple) { struct box_snap_row header; header.space = n; header.tuple_size = tuple->field_count; header.data_size = tuple->bsize; snapshot_write_row(l, batch, (const char *) &header, sizeof(header), tuple->data, tuple->bsize); } struct snapshot_space_param { struct log_io *l; struct fio_batch *batch; }; static void snapshot_space(struct space *sp, void *udata) { struct tuple *tuple; struct snapshot_space_param *ud = (struct snapshot_space_param *) udata; Index *pk = space_index(sp, 0); struct iterator *it = pk->position();; pk->initIterator(it, ITER_ALL, NULL, 0); while ((tuple = it->next(it))) snapshot_write_tuple(ud->l, ud->batch, space_n(sp), tuple); } void box_snapshot(struct log_io *l, struct fio_batch *batch) { struct snapshot_space_param ud = { l, batch }; space_foreach(snapshot_space, &ud); } void box_info(struct tbuf *out) { tbuf_printf(out, " status: %s" CRLF, status); } const char * box_status(void) { return status; } tarantool-1.5.1.218.g1a69fd6/src/Makefile0000664000000000000000000012230612213333034016205 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. src/CMakeFiles/core.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/core.dir/rule .PHONY : src/CMakeFiles/core.dir/rule # Convenience name for target. core: src/CMakeFiles/core.dir/rule .PHONY : core # fast build rule for target. core/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/build .PHONY : core/fast # Convenience name for target. src/CMakeFiles/generate_admin_cc.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/generate_admin_cc.dir/rule .PHONY : src/CMakeFiles/generate_admin_cc.dir/rule # Convenience name for target. generate_admin_cc: src/CMakeFiles/generate_admin_cc.dir/rule .PHONY : generate_admin_cc # fast build rule for target. generate_admin_cc/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/generate_admin_cc.dir/build.make src/CMakeFiles/generate_admin_cc.dir/build .PHONY : generate_admin_cc/fast # Convenience name for target. src/CMakeFiles/generate_lua_sources.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/generate_lua_sources.dir/rule .PHONY : src/CMakeFiles/generate_lua_sources.dir/rule # Convenience name for target. generate_lua_sources: src/CMakeFiles/generate_lua_sources.dir/rule .PHONY : generate_lua_sources # fast build rule for target. generate_lua_sources/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/generate_lua_sources.dir/build.make src/CMakeFiles/generate_lua_sources.dir/build .PHONY : generate_lua_sources/fast # Convenience name for target. src/CMakeFiles/generate_memcached_grammar_cc.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/generate_memcached_grammar_cc.dir/rule .PHONY : src/CMakeFiles/generate_memcached_grammar_cc.dir/rule # Convenience name for target. generate_memcached_grammar_cc: src/CMakeFiles/generate_memcached_grammar_cc.dir/rule .PHONY : generate_memcached_grammar_cc # fast build rule for target. generate_memcached_grammar_cc/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/generate_memcached_grammar_cc.dir/build.make src/CMakeFiles/generate_memcached_grammar_cc.dir/build .PHONY : generate_memcached_grammar_cc/fast admin.o: admin.cc.o .PHONY : admin.o # target to build an object file admin.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/admin.cc.o .PHONY : admin.cc.o admin.i: admin.cc.i .PHONY : admin.i # target to preprocess a source file admin.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/admin.cc.i .PHONY : admin.cc.i admin.s: admin.cc.s .PHONY : admin.s # target to generate assembly for a file admin.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/admin.cc.s .PHONY : admin.cc.s coeio.o: coeio.cc.o .PHONY : coeio.o # target to build an object file coeio.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coeio.cc.o .PHONY : coeio.cc.o coeio.i: coeio.cc.i .PHONY : coeio.i # target to preprocess a source file coeio.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coeio.cc.i .PHONY : coeio.cc.i coeio.s: coeio.cc.s .PHONY : coeio.s # target to generate assembly for a file coeio.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coeio.cc.s .PHONY : coeio.cc.s coio.o: coio.cc.o .PHONY : coio.o # target to build an object file coio.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coio.cc.o .PHONY : coio.cc.o coio.i: coio.cc.i .PHONY : coio.i # target to preprocess a source file coio.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coio.cc.i .PHONY : coio.cc.i coio.s: coio.cc.s .PHONY : coio.s # target to generate assembly for a file coio.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coio.cc.s .PHONY : coio.cc.s coio_buf.o: coio_buf.cc.o .PHONY : coio_buf.o # target to build an object file coio_buf.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coio_buf.cc.o .PHONY : coio_buf.cc.o coio_buf.i: coio_buf.cc.i .PHONY : coio_buf.i # target to preprocess a source file coio_buf.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coio_buf.cc.i .PHONY : coio_buf.cc.i coio_buf.s: coio_buf.cc.s .PHONY : coio_buf.s # target to generate assembly for a file coio_buf.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coio_buf.cc.s .PHONY : coio_buf.cc.s coro.o: coro.cc.o .PHONY : coro.o # target to build an object file coro.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coro.cc.o .PHONY : coro.cc.o coro.i: coro.cc.i .PHONY : coro.i # target to preprocess a source file coro.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coro.cc.i .PHONY : coro.cc.i coro.s: coro.cc.s .PHONY : coro.s # target to generate assembly for a file coro.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/coro.cc.s .PHONY : coro.cc.s cpu_feature.o: cpu_feature.c.o .PHONY : cpu_feature.o # target to build an object file cpu_feature.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/cpu_feature.c.o .PHONY : cpu_feature.c.o cpu_feature.i: cpu_feature.c.i .PHONY : cpu_feature.i # target to preprocess a source file cpu_feature.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/cpu_feature.c.i .PHONY : cpu_feature.c.i cpu_feature.s: cpu_feature.c.s .PHONY : cpu_feature.s # target to generate assembly for a file cpu_feature.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/cpu_feature.c.s .PHONY : cpu_feature.c.s crc32.o: crc32.c.o .PHONY : crc32.o # target to build an object file crc32.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/crc32.c.o .PHONY : crc32.c.o crc32.i: crc32.c.i .PHONY : crc32.i # target to preprocess a source file crc32.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/crc32.c.i .PHONY : crc32.c.i crc32.s: crc32.c.s .PHONY : crc32.s # target to generate assembly for a file crc32.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/crc32.c.s .PHONY : crc32.c.s errcode.o: errcode.c.o .PHONY : errcode.o # target to build an object file errcode.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/errcode.c.o .PHONY : errcode.c.o errcode.i: errcode.c.i .PHONY : errcode.i # target to preprocess a source file errcode.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/errcode.c.i .PHONY : errcode.c.i errcode.s: errcode.c.s .PHONY : errcode.s # target to generate assembly for a file errcode.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/errcode.c.s .PHONY : errcode.c.s errinj.o: errinj.cc.o .PHONY : errinj.o # target to build an object file errinj.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/errinj.cc.o .PHONY : errinj.cc.o errinj.i: errinj.cc.i .PHONY : errinj.i # target to preprocess a source file errinj.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/errinj.cc.i .PHONY : errinj.cc.i errinj.s: errinj.cc.s .PHONY : errinj.s # target to generate assembly for a file errinj.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/errinj.cc.s .PHONY : errinj.cc.s evio.o: evio.cc.o .PHONY : evio.o # target to build an object file evio.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/evio.cc.o .PHONY : evio.cc.o evio.i: evio.cc.i .PHONY : evio.i # target to preprocess a source file evio.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/evio.cc.i .PHONY : evio.cc.i evio.s: evio.cc.s .PHONY : evio.s # target to generate assembly for a file evio.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/evio.cc.s .PHONY : evio.cc.s exception.o: exception.cc.o .PHONY : exception.o # target to build an object file exception.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/exception.cc.o .PHONY : exception.cc.o exception.i: exception.cc.i .PHONY : exception.i # target to preprocess a source file exception.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/exception.cc.i .PHONY : exception.cc.i exception.s: exception.cc.s .PHONY : exception.s # target to generate assembly for a file exception.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/exception.cc.s .PHONY : exception.cc.s fio.o: fio.c.o .PHONY : fio.o # target to build an object file fio.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/fio.c.o .PHONY : fio.c.o fio.i: fio.c.i .PHONY : fio.i # target to preprocess a source file fio.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/fio.c.i .PHONY : fio.c.i fio.s: fio.c.s .PHONY : fio.s # target to generate assembly for a file fio.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/fio.c.s .PHONY : fio.c.s iobuf.o: iobuf.cc.o .PHONY : iobuf.o # target to build an object file iobuf.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iobuf.cc.o .PHONY : iobuf.cc.o iobuf.i: iobuf.cc.i .PHONY : iobuf.i # target to preprocess a source file iobuf.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iobuf.cc.i .PHONY : iobuf.cc.i iobuf.s: iobuf.cc.s .PHONY : iobuf.s # target to generate assembly for a file iobuf.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iobuf.cc.s .PHONY : iobuf.cc.s ipc.o: ipc.cc.o .PHONY : ipc.o # target to build an object file ipc.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/ipc.cc.o .PHONY : ipc.cc.o ipc.i: ipc.cc.i .PHONY : ipc.i # target to preprocess a source file ipc.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/ipc.cc.i .PHONY : ipc.cc.i ipc.s: ipc.cc.s .PHONY : ipc.s # target to generate assembly for a file ipc.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/ipc.cc.s .PHONY : ipc.cc.s iproto.o: iproto.cc.o .PHONY : iproto.o # target to build an object file iproto.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iproto.cc.o .PHONY : iproto.cc.o iproto.i: iproto.cc.i .PHONY : iproto.i # target to preprocess a source file iproto.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iproto.cc.i .PHONY : iproto.cc.i iproto.s: iproto.cc.s .PHONY : iproto.s # target to generate assembly for a file iproto.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iproto.cc.s .PHONY : iproto.cc.s iproto_port.o: iproto_port.cc.o .PHONY : iproto_port.o # target to build an object file iproto_port.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iproto_port.cc.o .PHONY : iproto_port.cc.o iproto_port.i: iproto_port.cc.i .PHONY : iproto_port.i # target to preprocess a source file iproto_port.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iproto_port.cc.i .PHONY : iproto_port.cc.i iproto_port.s: iproto_port.cc.s .PHONY : iproto_port.s # target to generate assembly for a file iproto_port.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/iproto_port.cc.s .PHONY : iproto_port.cc.s log_io.o: log_io.cc.o .PHONY : log_io.o # target to build an object file log_io.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/log_io.cc.o .PHONY : log_io.cc.o log_io.i: log_io.cc.i .PHONY : log_io.i # target to preprocess a source file log_io.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/log_io.cc.i .PHONY : log_io.cc.i log_io.s: log_io.cc.s .PHONY : log_io.s # target to generate assembly for a file log_io.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/log_io.cc.s .PHONY : log_io.cc.s lua/cjson.o: lua/cjson.cc.o .PHONY : lua/cjson.o # target to build an object file lua/cjson.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/cjson.cc.o .PHONY : lua/cjson.cc.o lua/cjson.i: lua/cjson.cc.i .PHONY : lua/cjson.i # target to preprocess a source file lua/cjson.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/cjson.cc.i .PHONY : lua/cjson.cc.i lua/cjson.s: lua/cjson.cc.s .PHONY : lua/cjson.s # target to generate assembly for a file lua/cjson.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/cjson.cc.s .PHONY : lua/cjson.cc.s lua/info.o: lua/info.cc.o .PHONY : lua/info.o # target to build an object file lua/info.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/info.cc.o .PHONY : lua/info.cc.o lua/info.i: lua/info.cc.i .PHONY : lua/info.i # target to preprocess a source file lua/info.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/info.cc.i .PHONY : lua/info.cc.i lua/info.s: lua/info.cc.s .PHONY : lua/info.s # target to generate assembly for a file lua/info.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/info.cc.s .PHONY : lua/info.cc.s lua/lua_ipc.o: lua/lua_ipc.cc.o .PHONY : lua/lua_ipc.o # target to build an object file lua/lua_ipc.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/lua_ipc.cc.o .PHONY : lua/lua_ipc.cc.o lua/lua_ipc.i: lua/lua_ipc.cc.i .PHONY : lua/lua_ipc.i # target to preprocess a source file lua/lua_ipc.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/lua_ipc.cc.i .PHONY : lua/lua_ipc.cc.i lua/lua_ipc.s: lua/lua_ipc.cc.s .PHONY : lua/lua_ipc.s # target to generate assembly for a file lua/lua_ipc.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/lua_ipc.cc.s .PHONY : lua/lua_ipc.cc.s lua/lua_socket.o: lua/lua_socket.cc.o .PHONY : lua/lua_socket.o # target to build an object file lua/lua_socket.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/lua_socket.cc.o .PHONY : lua/lua_socket.cc.o lua/lua_socket.i: lua/lua_socket.cc.i .PHONY : lua/lua_socket.i # target to preprocess a source file lua/lua_socket.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/lua_socket.cc.i .PHONY : lua/lua_socket.cc.i lua/lua_socket.s: lua/lua_socket.cc.s .PHONY : lua/lua_socket.s # target to generate assembly for a file lua/lua_socket.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/lua_socket.cc.s .PHONY : lua/lua_socket.cc.s lua/session.o: lua/session.cc.o .PHONY : lua/session.o # target to build an object file lua/session.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/session.cc.o .PHONY : lua/session.cc.o lua/session.i: lua/session.cc.i .PHONY : lua/session.i # target to preprocess a source file lua/session.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/session.cc.i .PHONY : lua/session.cc.i lua/session.s: lua/session.cc.s .PHONY : lua/session.s # target to generate assembly for a file lua/session.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/session.cc.s .PHONY : lua/session.cc.s lua/slab.o: lua/slab.cc.o .PHONY : lua/slab.o # target to build an object file lua/slab.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/slab.cc.o .PHONY : lua/slab.cc.o lua/slab.i: lua/slab.cc.i .PHONY : lua/slab.i # target to preprocess a source file lua/slab.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/slab.cc.i .PHONY : lua/slab.cc.i lua/slab.s: lua/slab.cc.s .PHONY : lua/slab.s # target to generate assembly for a file lua/slab.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/slab.cc.s .PHONY : lua/slab.cc.s lua/stat.o: lua/stat.cc.o .PHONY : lua/stat.o # target to build an object file lua/stat.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/stat.cc.o .PHONY : lua/stat.cc.o lua/stat.i: lua/stat.cc.i .PHONY : lua/stat.i # target to preprocess a source file lua/stat.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/stat.cc.i .PHONY : lua/stat.cc.i lua/stat.s: lua/stat.cc.s .PHONY : lua/stat.s # target to generate assembly for a file lua/stat.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/stat.cc.s .PHONY : lua/stat.cc.s lua/uuid.lua.o: lua/uuid.lua.c.o .PHONY : lua/uuid.lua.o # target to build an object file lua/uuid.lua.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/uuid.lua.c.o .PHONY : lua/uuid.lua.c.o lua/uuid.lua.i: lua/uuid.lua.c.i .PHONY : lua/uuid.lua.i # target to preprocess a source file lua/uuid.lua.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/uuid.lua.c.i .PHONY : lua/uuid.lua.c.i lua/uuid.lua.s: lua/uuid.lua.c.s .PHONY : lua/uuid.lua.s # target to generate assembly for a file lua/uuid.lua.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/lua/uuid.lua.c.s .PHONY : lua/uuid.lua.c.s object.o: object.cc.o .PHONY : object.o # target to build an object file object.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/object.cc.o .PHONY : object.cc.o object.i: object.cc.i .PHONY : object.i # target to preprocess a source file object.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/object.cc.i .PHONY : object.cc.i object.s: object.cc.s .PHONY : object.s # target to generate assembly for a file object.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/object.cc.s .PHONY : object.cc.s palloc.o: palloc.cc.o .PHONY : palloc.o # target to build an object file palloc.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/palloc.cc.o .PHONY : palloc.cc.o palloc.i: palloc.cc.i .PHONY : palloc.i # target to preprocess a source file palloc.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/palloc.cc.i .PHONY : palloc.cc.i palloc.s: palloc.cc.s .PHONY : palloc.s # target to generate assembly for a file palloc.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/palloc.cc.s .PHONY : palloc.cc.s pickle.o: pickle.cc.o .PHONY : pickle.o # target to build an object file pickle.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/pickle.cc.o .PHONY : pickle.cc.o pickle.i: pickle.cc.i .PHONY : pickle.i # target to preprocess a source file pickle.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/pickle.cc.i .PHONY : pickle.cc.i pickle.s: pickle.cc.s .PHONY : pickle.s # target to generate assembly for a file pickle.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/pickle.cc.s .PHONY : pickle.cc.s recovery.o: recovery.cc.o .PHONY : recovery.o # target to build an object file recovery.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/recovery.cc.o .PHONY : recovery.cc.o recovery.i: recovery.cc.i .PHONY : recovery.i # target to preprocess a source file recovery.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/recovery.cc.i .PHONY : recovery.cc.i recovery.s: recovery.cc.s .PHONY : recovery.s # target to generate assembly for a file recovery.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/recovery.cc.s .PHONY : recovery.cc.s replica.o: replica.cc.o .PHONY : replica.o # target to build an object file replica.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/replica.cc.o .PHONY : replica.cc.o replica.i: replica.cc.i .PHONY : replica.i # target to preprocess a source file replica.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/replica.cc.i .PHONY : replica.cc.i replica.s: replica.cc.s .PHONY : replica.s # target to generate assembly for a file replica.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/replica.cc.s .PHONY : replica.cc.s rope.o: rope.c.o .PHONY : rope.o # target to build an object file rope.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/rope.c.o .PHONY : rope.c.o rope.i: rope.c.i .PHONY : rope.i # target to preprocess a source file rope.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/rope.c.i .PHONY : rope.c.i rope.s: rope.c.s .PHONY : rope.s # target to generate assembly for a file rope.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/rope.c.s .PHONY : rope.c.s salloc.o: salloc.cc.o .PHONY : salloc.o # target to build an object file salloc.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/salloc.cc.o .PHONY : salloc.cc.o salloc.i: salloc.cc.i .PHONY : salloc.i # target to preprocess a source file salloc.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/salloc.cc.i .PHONY : salloc.cc.i salloc.s: salloc.cc.s .PHONY : salloc.s # target to generate assembly for a file salloc.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/salloc.cc.s .PHONY : salloc.cc.s session.o: session.cc.o .PHONY : session.o # target to build an object file session.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/session.cc.o .PHONY : session.cc.o session.i: session.cc.i .PHONY : session.i # target to preprocess a source file session.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/session.cc.i .PHONY : session.cc.i session.s: session.cc.s .PHONY : session.s # target to generate assembly for a file session.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/session.cc.s .PHONY : session.cc.s sio.o: sio.cc.o .PHONY : sio.o # target to build an object file sio.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/sio.cc.o .PHONY : sio.cc.o sio.i: sio.cc.i .PHONY : sio.i # target to preprocess a source file sio.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/sio.cc.i .PHONY : sio.cc.i sio.s: sio.cc.s .PHONY : sio.s # target to generate assembly for a file sio.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/sio.cc.s .PHONY : sio.cc.s stat.o: stat.cc.o .PHONY : stat.o # target to build an object file stat.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/stat.cc.o .PHONY : stat.cc.o stat.i: stat.cc.i .PHONY : stat.i # target to preprocess a source file stat.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/stat.cc.i .PHONY : stat.cc.i stat.s: stat.cc.s .PHONY : stat.s # target to generate assembly for a file stat.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/stat.cc.s .PHONY : stat.cc.s tbuf.o: tbuf.c.o .PHONY : tbuf.o # target to build an object file tbuf.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/tbuf.c.o .PHONY : tbuf.c.o tbuf.i: tbuf.c.i .PHONY : tbuf.i # target to preprocess a source file tbuf.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/tbuf.c.i .PHONY : tbuf.c.i tbuf.s: tbuf.c.s .PHONY : tbuf.s # target to generate assembly for a file tbuf.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/tbuf.c.s .PHONY : tbuf.c.s trace.o: trace.c.o .PHONY : trace.o # target to build an object file trace.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/trace.c.o .PHONY : trace.c.o trace.i: trace.c.i .PHONY : trace.i # target to preprocess a source file trace.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/trace.c.i .PHONY : trace.c.i trace.s: trace.c.s .PHONY : trace.s # target to generate assembly for a file trace.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/trace.c.s .PHONY : trace.c.s util.o: util.cc.o .PHONY : util.o # target to build an object file util.cc.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/util.cc.o .PHONY : util.cc.o util.i: util.cc.i .PHONY : util.i # target to preprocess a source file util.cc.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/util.cc.i .PHONY : util.cc.i util.s: util.cc.s .PHONY : util.s # target to generate assembly for a file util.cc.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/util.cc.s .PHONY : util.cc.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... core" @echo "... edit_cache" @echo "... generate_admin_cc" @echo "... generate_lua_sources" @echo "... generate_memcached_grammar_cc" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... admin.o" @echo "... admin.i" @echo "... admin.s" @echo "... coeio.o" @echo "... coeio.i" @echo "... coeio.s" @echo "... coio.o" @echo "... coio.i" @echo "... coio.s" @echo "... coio_buf.o" @echo "... coio_buf.i" @echo "... coio_buf.s" @echo "... coro.o" @echo "... coro.i" @echo "... coro.s" @echo "... cpu_feature.o" @echo "... cpu_feature.i" @echo "... cpu_feature.s" @echo "... crc32.o" @echo "... crc32.i" @echo "... crc32.s" @echo "... errcode.o" @echo "... errcode.i" @echo "... errcode.s" @echo "... errinj.o" @echo "... errinj.i" @echo "... errinj.s" @echo "... evio.o" @echo "... evio.i" @echo "... evio.s" @echo "... exception.o" @echo "... exception.i" @echo "... exception.s" @echo "... fio.o" @echo "... fio.i" @echo "... fio.s" @echo "... iobuf.o" @echo "... iobuf.i" @echo "... iobuf.s" @echo "... ipc.o" @echo "... ipc.i" @echo "... ipc.s" @echo "... iproto.o" @echo "... iproto.i" @echo "... iproto.s" @echo "... iproto_port.o" @echo "... iproto_port.i" @echo "... iproto_port.s" @echo "... log_io.o" @echo "... log_io.i" @echo "... log_io.s" @echo "... lua/cjson.o" @echo "... lua/cjson.i" @echo "... lua/cjson.s" @echo "... lua/info.o" @echo "... lua/info.i" @echo "... lua/info.s" @echo "... lua/lua_ipc.o" @echo "... lua/lua_ipc.i" @echo "... lua/lua_ipc.s" @echo "... lua/lua_socket.o" @echo "... lua/lua_socket.i" @echo "... lua/lua_socket.s" @echo "... lua/session.o" @echo "... lua/session.i" @echo "... lua/session.s" @echo "... lua/slab.o" @echo "... lua/slab.i" @echo "... lua/slab.s" @echo "... lua/stat.o" @echo "... lua/stat.i" @echo "... lua/stat.s" @echo "... lua/uuid.lua.o" @echo "... lua/uuid.lua.i" @echo "... lua/uuid.lua.s" @echo "... object.o" @echo "... object.i" @echo "... object.s" @echo "... palloc.o" @echo "... palloc.i" @echo "... palloc.s" @echo "... pickle.o" @echo "... pickle.i" @echo "... pickle.s" @echo "... recovery.o" @echo "... recovery.i" @echo "... recovery.s" @echo "... replica.o" @echo "... replica.i" @echo "... replica.s" @echo "... rope.o" @echo "... rope.i" @echo "... rope.s" @echo "... salloc.o" @echo "... salloc.i" @echo "... salloc.s" @echo "... session.o" @echo "... session.i" @echo "... session.s" @echo "... sio.o" @echo "... sio.i" @echo "... sio.s" @echo "... stat.o" @echo "... stat.i" @echo "... stat.s" @echo "... tbuf.o" @echo "... tbuf.i" @echo "... tbuf.s" @echo "... trace.o" @echo "... trace.i" @echo "... trace.s" @echo "... util.o" @echo "... util.i" @echo "... util.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/src/memcached.cc0000664000000000000000000003721412231715276017001 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "memcached.h" #include "tarantool.h" #include #include "box/box.h" #include "box/request.h" #include "box/space.h" #include "box/port.h" #include "box/tuple.h" #include "fiber.h" extern "C" { #include #include } /* extern "C" */ #include "say.h" #include "stat.h" #include "salloc.h" #include "pickle.h" #include "coio_buf.h" #include "scoped_guard.h" #define STAT(_) \ _(MEMC_GET, 1) \ _(MEMC_GET_MISS, 2) \ _(MEMC_GET_HIT, 3) \ _(MEMC_EXPIRED_KEYS, 4) ENUM(memcached_stat, STAT); STRS(memcached_stat, STAT); static int stat_base; static struct fiber *memcached_expire = NULL; static Index *memcached_index; static struct iterator *memcached_it; /* memcached tuple format: */ struct meta { uint32_t exptime; uint32_t flags; uint64_t cas; } __packed__; static uint64_t memcached_natoq(const char *start, const char *end) { uint64_t num = 0; while (start < end) { uint8_t code = *start++; num = num * 10 + (code - '0'); } return num; } void tbuf_append_field(struct tbuf *b, const char *f) { const char *begin = f; uint32_t size = load_varint32(&f); tbuf_append(b, begin, f - begin + size); } void tbuf_store_field(struct tbuf *b, const char *field, uint32_t len) { char buf[sizeof(uint32_t)+1]; char *bufend = pack_varint32(buf, len); tbuf_append(b, buf, bufend - buf); tbuf_append(b, field, len); } /** * Check that we have a valid field and return it. * Advances the buffer to point after the field as a side effect. */ const char * tbuf_read_field(struct tbuf *buf) { const char *field = buf->data; uint32_t field_len = pick_varint32((const char **) &buf->data, buf->data + buf->size); if (buf->data + field_len > field + buf->size) tnt_raise(IllegalParams, "packet too short (expected a field)"); buf->data += field_len; buf->size -= buf->data - field; buf->capacity -= buf->data - field; return field; } static void memcached_store(const char *key, uint32_t exptime, uint32_t flags, uint32_t bytes, const char *data) { uint32_t box_flags = 0; uint32_t field_count = 4; static uint64_t cas = 42; struct meta m; struct tbuf *req = tbuf_new(fiber->gc_pool); tbuf_append(req, &cfg.memcached_space, sizeof(uint32_t)); tbuf_append(req, &box_flags, sizeof(box_flags)); tbuf_append(req, &field_count, sizeof(field_count)); tbuf_append_field(req, key); m.exptime = exptime; m.flags = flags; m.cas = cas++; tbuf_store_field(req, (const char *) &m, sizeof(m)); char b[43]; sprintf(b, " %" PRIu32 " %" PRIu32 "\r\n", flags, bytes); tbuf_store_field(req, b, strlen(b)); tbuf_store_field(req, data, bytes); int key_len = load_varint32(&key); say_debug("memcached/store key:(%i)'%.*s' exptime:%" PRIu32 " flags:%" PRIu32 " cas:%" PRIu64, key_len, key_len, (char*) key, exptime, flags, cas); /* * Use a box dispatch wrapper which handles correctly * read-only/read-write modes. */ box_process(&null_port, REPLACE, req->data, req->size); } static void memcached_delete(const char *key) { uint32_t key_len = 1; uint32_t box_flags = 0; struct tbuf *req = tbuf_new(fiber->gc_pool); tbuf_append(req, &cfg.memcached_space, sizeof(uint32_t)); tbuf_append(req, &box_flags, sizeof(box_flags)); tbuf_append(req, &key_len, sizeof(key_len)); tbuf_append_field(req, key); box_process(&null_port, DELETE, req->data, req->size); } static struct tuple * memcached_find(const char *key) { return memcached_index->findByKey(key, 1); } static struct meta * memcached_meta(struct tuple *tuple) { uint32_t len; const char *field = tuple_field(tuple, 1, &len); assert(sizeof(struct meta) <= len); return (struct meta *) field; } static bool memcached_is_expired(struct tuple *tuple) { struct meta *m = memcached_meta(tuple); return m->exptime == 0 ? 0 : m->exptime < ev_now(); } static bool memcached_is_numeric(const char *field, uint32_t value_len) { for (int i = 0; i < value_len; i++) if (*(field + i) < '0' || '9' < *(field + i)) return false; return true; } static struct stats { uint64_t total_items; uint32_t curr_connections; uint32_t total_connections; uint64_t cmd_get; uint64_t cmd_set; uint64_t get_hits; uint64_t get_misses; uint64_t evictions; uint64_t bytes_read; uint64_t bytes_written; } stats; struct salloc_stat_memcached_cb_ctx { int64_t bytes_used; int64_t items; }; static int salloc_stat_memcached_cb(const struct slab_cache_stats *cstat, void *cb_ctx) { struct salloc_stat_memcached_cb_ctx *ctx = (struct salloc_stat_memcached_cb_ctx *) cb_ctx; ctx->bytes_used += cstat->bytes_used; ctx->items += cstat->items; return 0; } static void memcached_print_stats(struct obuf *out) { struct tbuf *buf = tbuf_new(fiber->gc_pool); struct salloc_stat_memcached_cb_ctx memstats; memstats.bytes_used = memstats.items = 0; salloc_stat(salloc_stat_memcached_cb, NULL, &memstats); tbuf_printf(buf, "STAT pid %" PRIu32 "\r\n", (uint32_t)getpid()); tbuf_printf(buf, "STAT uptime %" PRIu32 "\r\n", (uint32_t)tarantool_uptime()); tbuf_printf(buf, "STAT time %" PRIu32 "\r\n", (uint32_t)ev_now()); tbuf_printf(buf, "STAT version 1.2.5 (tarantool/box)\r\n"); tbuf_printf(buf, "STAT pointer_size %" PRI_SZ "\r\n", sizeof(void *)*8); tbuf_printf(buf, "STAT curr_items %" PRIu64 "\r\n", memstats.items); tbuf_printf(buf, "STAT total_items %" PRIu64 "\r\n", stats.total_items); tbuf_printf(buf, "STAT bytes %" PRIu64 "\r\n", memstats.bytes_used); tbuf_printf(buf, "STAT curr_connections %" PRIu32 "\r\n", stats.curr_connections); tbuf_printf(buf, "STAT total_connections %" PRIu32 "\r\n", stats.total_connections); tbuf_printf(buf, "STAT connection_structures %" PRIu32 "\r\n", stats.curr_connections); /* lie a bit */ tbuf_printf(buf, "STAT cmd_get %" PRIu64 "\r\n", stats.cmd_get); tbuf_printf(buf, "STAT cmd_set %" PRIu64 "\r\n", stats.cmd_set); tbuf_printf(buf, "STAT get_hits %" PRIu64 "\r\n", stats.get_hits); tbuf_printf(buf, "STAT get_misses %" PRIu64 "\r\n", stats.get_misses); tbuf_printf(buf, "STAT evictions %" PRIu64 "\r\n", stats.evictions); tbuf_printf(buf, "STAT bytes_read %" PRIu64 "\r\n", stats.bytes_read); tbuf_printf(buf, "STAT bytes_written %" PRIu64 "\r\n", stats.bytes_written); tbuf_printf(buf, "STAT limit_maxbytes %" PRIu64 "\r\n", (uint64_t)(cfg.slab_alloc_arena * (1 << 30))); tbuf_printf(buf, "STAT threads 1\r\n"); tbuf_printf(buf, "END\r\n"); obuf_dup(out, buf->data, buf->size); } void memcached_get(struct obuf *out, size_t keys_count, struct tbuf *keys, bool show_cas) { stat_collect(stat_base, MEMC_GET, 1); stats.cmd_get++; say_debug("ensuring space for %" PRI_SZ " keys", keys_count); while (keys_count-- > 0) { struct tuple *tuple; const struct meta *m; const char *value; const char *suffix; uint32_t key_len; uint32_t value_len; uint32_t suffix_len; const char *key = tbuf_read_field(keys); tuple = memcached_find(key); key_len = load_varint32(&key); if (tuple == NULL) { stat_collect(stat_base, MEMC_GET_MISS, 1); stats.get_misses++; continue; } uint32_t len; struct tuple_iterator it; tuple_rewind(&it, tuple); /* skip key */ (void) tuple_next(&it, &len); /* metainfo */ m = (const struct meta *) tuple_next(&it, &len); assert(sizeof(struct meta) <= len); /* suffix */ suffix = tuple_next(&it, &suffix_len); /* value */ value = tuple_next(&it, &value_len); assert(tuple_next(&it, &len) == NULL); if (m->exptime > 0 && m->exptime < ev_now()) { stats.get_misses++; stat_collect(stat_base, MEMC_GET_MISS, 1); continue; } stats.get_hits++; stat_collect(stat_base, MEMC_GET_HIT, 1); if (show_cas) { struct tbuf *b = tbuf_new(fiber->gc_pool); tbuf_printf(b, "VALUE %.*s %" PRIu32 " %" PRIu32 " %" PRIu64 "\r\n", key_len, (char*) key, m->flags, value_len, m->cas); obuf_dup(out, b->data, b->size); stats.bytes_written += b->size; } else { obuf_dup(out, "VALUE ", 6); obuf_dup(out, key, key_len); obuf_dup(out, suffix, suffix_len); } obuf_dup(out, value, value_len); obuf_dup(out, "\r\n", 2); stats.bytes_written += value_len + 2; } obuf_dup(out, "END\r\n", 5); stats.bytes_written += 5; } static void memcached_flush_all(va_list ap) { uintptr_t delay = va_arg(ap, uintptr_t); fiber_sleep(delay - ev_now()); struct tuple *tuple; struct iterator *it = memcached_index->allocIterator(); memcached_index->initIterator(it, ITER_ALL, NULL, 0); while ((tuple = it->next(it))) { memcached_meta(tuple)->exptime = 1; } it->free(it); } #define STORE \ do { \ stats.cmd_set++; \ if (bytes > (1<<20)) { \ obuf_dup(out, "SERVER_ERROR object too large for cache\r\n", 41);\ } else { \ try { \ memcached_store(key, exptime, flags, bytes, data); \ stats.total_items++; \ obuf_dup(out, "STORED\r\n", 8); \ } \ catch (const ClientError& e) { \ obuf_dup(out, "SERVER_ERROR ", 13); \ obuf_dup(out, e.errmsg(), strlen(e.errmsg())); \ obuf_dup(out, "\r\n", 2); \ } \ } \ } while (0) #include "memcached-grammar.cc" void memcached_loop(struct ev_io *coio, struct iobuf *iobuf) { int rc; int bytes_written; int batch_count; struct ibuf *in = &iobuf->in; for (;;) { batch_count = 0; if (coio_bread(coio, in, 1) <= 0) return; dispatch: rc = memcached_dispatch(coio, iobuf); if (rc < 0) { say_debug("negative dispatch, closing connection"); return; } if (rc == 0 && batch_count == 0) /* we haven't successfully parsed any requests */ continue; if (rc == 1) { batch_count++; /* some unparsed commands remain and batch count less than 20 */ if (ibuf_size(in) > 0 && batch_count < 20) goto dispatch; } bytes_written = iobuf_flush(iobuf, coio); fiber_gc(); stats.bytes_written += bytes_written; if (rc == 1 && ibuf_size(in) > 0) { batch_count = 0; goto dispatch; } } } static void memcached_handler(va_list ap) { struct ev_io coio = va_arg(ap, struct ev_io); struct sockaddr_in *addr = va_arg(ap, struct sockaddr_in *); struct iobuf *iobuf = va_arg(ap, struct iobuf *); stats.total_connections++; stats.curr_connections++; (void) addr; try { auto scoped_guard = make_scoped_guard([&] { fiber_sleep(0.01); stats.curr_connections--; evio_close(&coio); iobuf_delete(iobuf); }); memcached_loop(&coio, iobuf); iobuf_flush(iobuf, &coio); } catch (const FiberCancelException& e) { throw; } catch (const Exception& e) { e.log(); } } int memcached_check_config(struct tarantool_cfg *conf) { if (conf->memcached_port == 0) { return 0; } if (conf->memcached_port <= 0 || conf->memcached_port >= USHRT_MAX) { /* invalid space number */ out_warning(CNF_OK, "invalid memcached port value: %i", conf->memcached_port); return -1; } /* check memcached space number: it shoud be in segment [0, max_space] */ if (conf->memcached_expire_per_loop <= 0) { /* invalid expire per loop value */ out_warning(CNF_OK, "invalid expire per loop value: %i", conf->memcached_expire_per_loop); return -1; } if (conf->memcached_expire_full_sweep <= 0) { /* invalid expire full sweep value */ out_warning(CNF_OK, "invalid expire full sweep value: %i", conf->memcached_expire_full_sweep); return -1; } return 0; } void memcached_free(void) { if (memcached_it) memcached_it->free(memcached_it); } void memcached_init(const char *bind_ipaddr, int memcached_port) { if (memcached_port == 0) return; stat_base = stat_register(memcached_stat_strs, memcached_stat_MAX); struct space *sp = space_by_n(cfg.memcached_space); memcached_index = space_index(sp, 0); /* run memcached server */ static struct coio_service memcached; coio_service_init(&memcached, "memcached", bind_ipaddr, memcached_port, memcached_handler, NULL); evio_service_start(&memcached.evio_service); } void memcached_space_init() { if (cfg.memcached_port == 0) return; /* Configure memcached index key. */ struct key_def *key_def = (struct key_def *) malloc(sizeof(struct key_def)); key_def->part_count = 1; key_def->is_unique = true; key_def->type = HASH; key_def->parts = (struct key_part *) malloc(sizeof(struct key_part)); key_def->cmp_order = (uint32_t *) malloc(sizeof(uint32_t)); key_def->parts[0].fieldno = 0; key_def->parts[0].type = STRING; key_def->max_fieldno = 1; key_def->cmp_order[0] = 0; (void) space_new(cfg.memcached_space, key_def, 1, 4); } /** Delete a bunch of expired keys. */ void memcached_delete_expired_keys(struct tbuf *keys_to_delete) { int expired_keys = 0; while (keys_to_delete->size > 0) { try { memcached_delete(tbuf_read_field(keys_to_delete)); expired_keys++; } catch (const ClientError& e) { /* expire is off when replication is on */ assert(e.errcode() != ER_NONMASTER); /* The error is already logged. */ } } stat_collect(stat_base, MEMC_EXPIRED_KEYS, expired_keys); double delay = ((double) cfg.memcached_expire_per_loop * cfg.memcached_expire_full_sweep / (memcached_index->size() + 1)); if (delay > 1) delay = 1; fiber_setcancellable(true); fiber_sleep(delay); fiber_setcancellable(false); } void memcached_expire_loop(va_list ap __attribute__((unused))) { struct tuple *tuple = NULL; say_info("memcached expire fiber started"); memcached_it = memcached_index->allocIterator(); try { restart: if (tuple == NULL) memcached_index->initIterator(memcached_it, ITER_ALL, NULL, 0); struct tbuf *keys_to_delete = tbuf_new(fiber->gc_pool); for (int j = 0; j < cfg.memcached_expire_per_loop; j++) { tuple = memcached_it->next(memcached_it); if (tuple == NULL) break; if (!memcached_is_expired(tuple)) continue; say_debug("expire tuple %p", tuple); uint32_t len = 0; const char *field = tuple_field(tuple, 0, &len); tbuf_store_field(keys_to_delete, field, len); } memcached_delete_expired_keys(keys_to_delete); fiber_gc(); goto restart; } catch (const Exception& e) { memcached_it->free(memcached_it); memcached_it = NULL; throw; } } void memcached_start_expire() { if (cfg.memcached_port == 0 || cfg.memcached_expire == 0) return; assert(memcached_expire == NULL); try { memcached_expire = fiber_new("memcached_expire", memcached_expire_loop); } catch (const Exception& e) { say_error("can't start the expire fiber"); return; } fiber_call(memcached_expire); } void memcached_stop_expire() { if (cfg.memcached_port == 0 || cfg.memcached_expire == 0) return; assert(memcached_expire != NULL); fiber_cancel(memcached_expire); memcached_expire = NULL; } tarantool-1.5.1.218.g1a69fd6/src/coro.cc0000664000000000000000000000437012202131537016020 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "coro.h" #include "tarantool/config.h" #include "exception.h" #include #include #include #include "third_party/valgrind/memcheck.h" void tarantool_coro_create(struct tarantool_coro *coro, void (*f) (void *), void *data) { const int page = sysconf(_SC_PAGESIZE); memset(coro, 0, sizeof(*coro)); /* TODO: guard pages */ coro->stack_size = page * 16; coro->stack = mmap(0, coro->stack_size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); if (coro->stack == MAP_FAILED) { tnt_raise(LoggedError, ER_MEMORY_ISSUE, sizeof(coro->stack_size), "mmap", "coro stack"); } (void) VALGRIND_STACK_REGISTER(coro->stack, (char *) coro->stack + coro->stack_size); coro_create(&coro->ctx, f, data, coro->stack, coro->stack_size); } void tarantool_coro_destroy(struct tarantool_coro *coro) { if (coro->stack != NULL && coro->stack != MAP_FAILED) munmap(coro->stack, coro->stack_size); } tarantool-1.5.1.218.g1a69fd6/src/salloc.cc0000664000000000000000000002756612242653271016357 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "salloc.h" #include "tarantool/config.h" #include #include #include #include #include #include #include "third_party/valgrind/memcheck.h" #include #include "tarantool/util.h" #include #include #include "exception.h" #define SLAB_ALIGN_PTR(ptr) (void *)((uintptr_t)(ptr) & ~(SLAB_SIZE - 1)) extern int snapshot_pid; static bool private_arena = false; #ifdef SLAB_DEBUG #undef NDEBUG uint8_t red_zone[4] = { 0xfa, 0xfa, 0xfa, 0xfa }; #else uint8_t red_zone[0] = { }; #endif static const uint32_t SLAB_MAGIC = 0x51abface; static const size_t SLAB_SIZE = 1 << 22; static const size_t MAX_SLAB_ITEM = 1 << 20; /* maximum number of items in one slab */ /* updated in slab_classes_init, depends on salloc_init params */ size_t MAX_SLAB_ITEM_COUNT; struct slab_item { SLIST_ENTRY(slab_item) next; }; SLIST_HEAD(item_slist_head, slab_item); struct slab { uint32_t magic; size_t used; size_t items; struct item_slist_head free; struct slab_cache *cache; void *brk; SLIST_ENTRY(slab) link; SLIST_ENTRY(slab) free_link; TAILQ_ENTRY(slab) cache_free_link; TAILQ_ENTRY(slab) cache_link; }; SLIST_HEAD(slab_slist_head, slab); TAILQ_HEAD(slab_tailq_head, slab); struct slab_cache { size_t item_size; struct slab_tailq_head slabs, free_slabs; }; struct arena { void *mmap_base; size_t mmap_size; /** How items tuples do we have stacked for delayed free. */ int64_t delayed_free_count; /** How many items in the delayed free list to free at once. */ size_t delayed_free_batch; void *base; size_t size; size_t used; struct slab_slist_head slabs, free_slabs; }; static uint32_t slab_active_caches; /** * Delayed garbage collection for items which are used * in a forked process. */ static struct item_slist_head free_delayed; static struct slab_cache slab_caches[256]; static struct arena arena; static struct slab * slab_header(void *ptr) { struct slab *slab = (struct slab *) SLAB_ALIGN_PTR(ptr); assert(slab->magic == SLAB_MAGIC); return slab; } static void slab_caches_init(size_t minimal, double factor) { uint32_t i; size_t size; const size_t ptr_size = sizeof(void *); for (i = 0, size = minimal; i < nelem(slab_caches) && size <= MAX_SLAB_ITEM; i++) { slab_caches[i].item_size = size - sizeof(red_zone); TAILQ_INIT(&slab_caches[i].free_slabs); size = MAX((size_t)(size * factor) & ~(ptr_size - 1), (size + ptr_size) & ~(ptr_size - 1)); } slab_active_caches = i; MAX_SLAB_ITEM_COUNT = (size_t) (SLAB_SIZE - sizeof(struct slab)) / slab_caches[0].item_size; SLIST_INIT(&free_delayed); } static bool arena_init(struct arena *arena, size_t size) { arena->delayed_free_batch = 100; arena->delayed_free_count = 0; arena->used = 0; arena->size = size - size % SLAB_SIZE; arena->mmap_size = size - size % SLAB_SIZE + SLAB_SIZE; /* spend SLAB_SIZE bytes on align :-( */ int flags = MAP_SHARED | MAP_ANONYMOUS; if (access("/proc/user_beancounters", F_OK) == 0) { say_warn("Don't use shared arena under OpenVZ"); flags = MAP_PRIVATE | MAP_ANONYMOUS; private_arena = true; } arena->mmap_base = mmap(NULL, arena->mmap_size, PROT_READ | PROT_WRITE, flags, -1, 0); if (arena->mmap_base == MAP_FAILED) { say_syserror("mmap"); return false; } arena->base = (char *)SLAB_ALIGN_PTR(arena->mmap_base) + SLAB_SIZE; SLIST_INIT(&arena->slabs); SLIST_INIT(&arena->free_slabs); return true; } /** * Protect slab arena from changes. A safeguard used in a forked * process to prevent changes to the master process arena. */ void salloc_protect(void) { mprotect(arena.mmap_base, arena.mmap_size, PROT_READ); } static void * arena_alloc(struct arena *arena) { void *ptr; const size_t size = SLAB_SIZE; if (arena->size - arena->used < size) return NULL; ptr = (char *)arena->base + arena->used; arena->used += size; return ptr; } bool salloc_init(size_t size, size_t minimal, double factor) { if (size < SLAB_SIZE * 2) return false; if (!arena_init(&arena, size)) return false; slab_caches_init(MAX(sizeof(void *), minimal), factor); return true; } void salloc_free(void) { if (arena.mmap_base != NULL) munmap(arena.mmap_base, arena.mmap_size); memset(&arena, 0, sizeof(struct arena)); } static void format_slab(struct slab_cache *cache, struct slab *slab) { assert(cache->item_size <= MAX_SLAB_ITEM); slab->magic = SLAB_MAGIC; SLIST_INIT(&slab->free); slab->cache = cache; slab->items = 0; slab->used = 0; slab->brk = (char *)CACHEALIGN((char *)slab + sizeof(struct slab)); TAILQ_INSERT_HEAD(&cache->slabs, slab, cache_link); TAILQ_INSERT_HEAD(&cache->free_slabs, slab, cache_free_link); } static bool fully_formatted(struct slab *slab) { return (char *) slab->brk + slab->cache->item_size >= (char *)slab + SLAB_SIZE; } void slab_validate(void) { struct slab *slab; SLIST_FOREACH(slab, &arena.slabs, link) { for (char *p = (char *)slab + sizeof(struct slab); p + slab->cache->item_size < (char *)slab + SLAB_SIZE; p += slab->cache->item_size + sizeof(red_zone)) { assert(memcmp(p + slab->cache->item_size, red_zone, sizeof(red_zone)) == 0); } } } static struct slab_cache * cache_for(size_t size) { for (uint32_t i = 0; i < slab_active_caches; i++) if (slab_caches[i].item_size >= size) return &slab_caches[i]; return NULL; } static struct slab * slab_of(struct slab_cache *cache) { struct slab *slab; if (!TAILQ_EMPTY(&cache->free_slabs)) { slab = TAILQ_FIRST(&cache->free_slabs); assert(slab->magic == SLAB_MAGIC); return slab; } if (!SLIST_EMPTY(&arena.free_slabs)) { slab = SLIST_FIRST(&arena.free_slabs); assert(slab->magic == SLAB_MAGIC); SLIST_REMOVE_HEAD(&arena.free_slabs, free_link); format_slab(cache, slab); return slab; } if ((slab = (struct slab *) arena_alloc(&arena)) != NULL) { format_slab(cache, slab); SLIST_INSERT_HEAD(&arena.slabs, slab, link); return slab; } return NULL; } #ifndef NDEBUG static bool valid_item(struct slab *slab, void *item) { return (char *)item >= (char *)(slab) + sizeof(struct slab) && (char *)item < (char *)(slab) + sizeof(struct slab) + SLAB_SIZE; } #endif void sfree(void *ptr) { struct slab *slab = slab_header(ptr); struct slab_cache *cache = slab->cache; struct slab_item *item = (struct slab_item *) ptr; if (fully_formatted(slab) && SLIST_EMPTY(&slab->free)) TAILQ_INSERT_TAIL(&cache->free_slabs, slab, cache_free_link); assert(valid_item(slab, item)); assert(SLIST_EMPTY(&slab->free) || valid_item(slab, SLIST_FIRST(&slab->free))); SLIST_INSERT_HEAD(&slab->free, item, next); slab->used -= cache->item_size + sizeof(red_zone); slab->items -= 1; if (slab->items == 0) { TAILQ_REMOVE(&cache->free_slabs, slab, cache_free_link); TAILQ_REMOVE(&cache->slabs, slab, cache_link); SLIST_INSERT_HEAD(&arena.free_slabs, slab, free_link); } VALGRIND_FREELIKE_BLOCK(item, sizeof(red_zone)); } static void sfree_batch(void) { if (snapshot_pid) return; ssize_t batch = arena.delayed_free_batch; while (--batch >= 0 && !SLIST_EMPTY(&free_delayed)) { assert(arena.delayed_free_count > 0); struct slab_item *item = SLIST_FIRST(&free_delayed); SLIST_REMOVE_HEAD(&free_delayed, next); arena.delayed_free_count--; sfree(item); } } void sfree_delayed(void *ptr) { if (ptr == NULL) return; if (private_arena) return sfree(ptr); struct slab_item *item = (struct slab_item *)ptr; struct slab *slab = slab_header(item); assert(valid_item(slab, item)); SLIST_INSERT_HEAD(&free_delayed, item, next); arena.delayed_free_count++; } void * salloc(size_t size, const char *what) { struct slab_cache *cache; struct slab *slab; struct slab_item *item; sfree_batch(); if ((cache = cache_for(size)) == NULL || (slab = slab_of(cache)) == NULL) { tnt_raise(LoggedError, ER_MEMORY_ISSUE, size, "slab allocator", what); } if (SLIST_EMPTY(&slab->free)) { assert(valid_item(slab, slab->brk)); item = (struct slab_item *) slab->brk; memcpy((char *)item + cache->item_size, red_zone, sizeof(red_zone)); slab->brk = (char *) slab->brk + cache->item_size + sizeof(red_zone); } else { item = SLIST_FIRST(&slab->free); assert(valid_item(slab, item)); (void) VALGRIND_MAKE_MEM_DEFINED(item, sizeof(void *)); SLIST_REMOVE_HEAD(&slab->free, next); (void) VALGRIND_MAKE_MEM_UNDEFINED(item, sizeof(void *)); } if (fully_formatted(slab) && SLIST_EMPTY(&slab->free)) TAILQ_REMOVE(&cache->free_slabs, slab, cache_free_link); slab->used += cache->item_size + sizeof(red_zone); slab->items += 1; VALGRIND_MALLOCLIKE_BLOCK(item, cache->item_size, sizeof(red_zone), 0); return (void *)item; } size_t salloc_ptr_to_index(void *ptr) { struct slab *slab = slab_header(ptr); struct slab_item *item = (struct slab_item *) ptr; struct slab_cache *clazz = slab->cache; (void) item; assert(valid_item(slab, item)); void *brk_start = (char *)CACHEALIGN((char *)slab+sizeof(struct slab)); ptrdiff_t item_no = ((const char *) ptr - (const char *) brk_start) / clazz->item_size; assert(item_no >= 0); ptrdiff_t slab_no = ((const char *) slab - (const char *) arena.base) / SLAB_SIZE; assert(slab_no >= 0); size_t index = (size_t)slab_no * MAX_SLAB_ITEM_COUNT + (size_t) item_no; assert(salloc_ptr_from_index(index) == ptr); return index; } void * salloc_ptr_from_index(size_t index) { size_t slab_no = index / MAX_SLAB_ITEM_COUNT; size_t item_no = index % MAX_SLAB_ITEM_COUNT; struct slab *slab = slab_header( (void *) ((size_t) arena.base + SLAB_SIZE * slab_no)); struct slab_cache *clazz = slab->cache; void *brk_start = (char *)CACHEALIGN((char *)slab+sizeof(struct slab)); struct slab_item *item = (struct slab_item *)((char *) brk_start + item_no * clazz->item_size); assert(valid_item(slab, item)); return (void *) item; } /** * Collect slab allocator statistics. * * @param cb - a callback to receive statistic item * @param astat - a structure to fill with of arena * @user_data - user's data that will be sent to cb * */ int salloc_stat(salloc_stat_cb cb, struct slab_arena_stats *astat, void *cb_ctx) { if (astat) { astat->used = arena.used; astat->size = arena.size; } if (cb) { struct slab *slab; struct slab_cache_stats st; for (int i = 0; i < slab_active_caches; i++) { memset(&st, 0, sizeof(st)); TAILQ_FOREACH(slab, &slab_caches[i].slabs, cache_link) { st.slabs++; st.items += slab->items; st.bytes_free += SLAB_SIZE; st.bytes_free -= slab->used; st.bytes_free -= sizeof(struct slab); st.bytes_used += sizeof(struct slab); st.bytes_used += slab->used; } st.item_size = slab_caches[i].item_size; if (st.slabs == 0) continue; int res = cb(&st, cb_ctx); if (res != 0) return res; } } return 0; } tarantool-1.5.1.218.g1a69fd6/src/sio.cc0000664000000000000000000002067212212057124015653 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "sio.h" #include #include #include #include #include /* TCP_NODELAY */ #include /* inet_ntoa */ #include "say.h" SocketError::SocketError(const char *file, unsigned line, int fd, const char *format, ...) : SystemError(file, line) { int save_errno = errno; char buf[TNT_ERRMSG_MAX]; va_list ap; va_start(ap, format); vsnprintf(buf, sizeof(buf), format, ap); const char *socketname = sio_socketname(fd); init("%s, called on %s", buf, socketname); va_end(ap); errno = save_errno; } /** Pretty print socket name and peer (for exceptions) */ const char * sio_socketname(int fd) { static __thread char name[2 * SERVICE_NAME_MAXLEN]; int n = snprintf(name, sizeof(name), "fd %d", fd); if (fd >= 0) { struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); int rc = getsockname(fd, (struct sockaddr *) &addr, &addrlen); if (rc == 0) { n += snprintf(name + n, sizeof(name) - n, ", aka %s", sio_strfaddr(&addr)); } addrlen = sizeof(addr); rc = getpeername(fd, (struct sockaddr *) &addr, &addrlen); if (rc == 0) { n += snprintf(name + n, sizeof(name) - n, ", peer of %s", sio_strfaddr(&addr)); } } return name; } /** Get a string representation of a socket option name, * for logging. */ static const char * sio_option_name(int option) { #define CASE_OPTION(opt) case opt: return #opt switch (option) { CASE_OPTION(SO_KEEPALIVE); CASE_OPTION(SO_LINGER); CASE_OPTION(SO_ERROR); CASE_OPTION(SO_REUSEADDR); CASE_OPTION(TCP_NODELAY); default: return "undefined"; } #undef CASE_OPTION } /** shut down part of a full-duplex connection */ int sio_shutdown(int fd, int how) { int rc = shutdown(fd, how); if (rc < 0) tnt_raise(SocketError, fd, "shutdown"); return rc; } /** Try to automatically configure a listen backlog. * On Linux, use the system setting, which defaults * to 128. This way a system administrator can tune * the backlog as needed. On other systems, use SOMAXCONN. */ int sio_listen_backlog() { #ifdef TARGET_OS_LINUX FILE *proc = fopen("/proc/sys/net/core/somaxconn", "r"); if (proc) { int backlog; int rc = fscanf(proc, "%d", &backlog); fclose(proc); if (rc == 1) return backlog; } #endif /* TARGET_OS_LINUX */ return SOMAXCONN; } /** Create a TCP socket. */ int sio_socket(int domain, int type, int protocol) { int fd = socket(domain, type, protocol); if (fd < 0) tnt_raise(SocketError, fd, "socket"); return fd; } /** Get socket flags, raise an exception if error. */ int sio_getfl(int fd) { int flags = fcntl(fd, F_GETFL, 0); if (flags < 0) tnt_raise(SocketError, fd, "fcntl(..., F_GETFL, ...)"); return flags; } /** Set socket flags, raise an exception if error. */ int sio_setfl(int fd, int flag, int on) { int flags = sio_getfl(fd); flags = fcntl(fd, F_SETFL, on ? flags | flag : flags & ~flag); if (flags < 0) tnt_raise(SocketError, fd, "fcntl(..., F_SETFL, ...)"); return flags; } /** Set an option on a socket. */ void sio_setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen) { int rc = setsockopt(fd, level, optname, optval, optlen); if (rc) { tnt_raise(SocketError, fd, "setsockopt(%s)", sio_option_name(optname)); } } /** Get a socket option value. */ void sio_getsockopt(int fd, int level, int optname, void *optval, socklen_t *optlen) { int rc = getsockopt(fd, level, optname, optval, optlen); if (rc) { tnt_raise(SocketError, fd, "getsockopt(%s)", sio_option_name(optname)); } } /** Connect a client socket to a server. */ int sio_connect(int fd, struct sockaddr_in *addr, socklen_t addrlen) { /* Establish the connection. */ int rc = connect(fd, (struct sockaddr *) addr, addrlen); if (rc < 0 && errno != EINPROGRESS) { tnt_raise(SocketError, fd, "connect"); } return rc; } /** Bind a socket to the given address. */ int sio_bind(int fd, struct sockaddr_in *addr, socklen_t addrlen) { int rc = bind(fd, (struct sockaddr *) addr, addrlen); if (rc < 0 && errno != EADDRINUSE) tnt_raise(SocketError, fd, "bind"); return rc; } /** Mark a socket as accepting connections. */ int sio_listen(int fd) { int rc = listen(fd, sio_listen_backlog()); if (rc < 0 && errno != EADDRINUSE) tnt_raise(SocketError, fd, "listen"); return rc; } /** Accept a client connection on a server socket. */ int sio_accept(int fd, struct sockaddr_in *addr, socklen_t *addrlen) { /* Accept a connection. */ int newfd = accept(fd, (struct sockaddr *) addr, addrlen); if (newfd < 0 && errno != EAGAIN && errno != EWOULDBLOCK) tnt_raise(SocketError, fd, "accept"); return newfd; } /** Read up to 'count' bytes from a socket. */ ssize_t sio_read(int fd, void *buf, size_t count) { ssize_t n = read(fd, buf, count); if (n < 0) { if (errno == EWOULDBLOCK) errno = EINTR; switch (errno) { case EAGAIN: case EINTR: break; /* * Happens typically when the client closes * socket on timeout without reading the previous * query's response completely. Treat the same as * EOF. */ case ECONNRESET: errno = 0; n = 0; break; default: tnt_raise(SocketError, fd, "read(%zd)", count); } } return n; } /** Write up to 'count' bytes to a socket. */ ssize_t sio_write(int fd, const void *buf, size_t count) { ssize_t n = write(fd, buf, count); if (n < 0 && errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR) tnt_raise(SocketError, fd, "write(%zd)", count); return n; } /** Write to a socket with iovec. */ ssize_t sio_writev(int fd, const struct iovec *iov, int iovcnt) { int cnt = iovcnt < IOV_MAX ? iovcnt : IOV_MAX; ssize_t n = writev(fd, iov, cnt); if (n < 0 && errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR) { tnt_raise(SocketError, fd, "writev(%d)", iovcnt); } return n; } /** Send a message on a socket. */ ssize_t sio_sendto(int fd, const void *buf, size_t len, int flags, const struct sockaddr_in *dest_addr, socklen_t addrlen) { ssize_t n = sendto(fd, buf, len, flags, (struct sockaddr*)dest_addr, addrlen); if (n < 0 && errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR) tnt_raise(SocketError, fd, "sendto(%zd)", len); return n; } /** Receive a message on a socket. */ ssize_t sio_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr_in *src_addr, socklen_t *addrlen) { ssize_t n = recvfrom(fd, buf, len, flags, (struct sockaddr*)src_addr, addrlen); if (n < 0 && errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR) tnt_raise(SocketError, fd, "recvfrom(%zd)", len); return n; } /** Get socket peer name. */ int sio_getpeername(int fd, struct sockaddr_in *addr) { socklen_t addrlen = sizeof(struct sockaddr_in); if (getpeername(fd, (struct sockaddr *) addr, &addrlen) < 0) { say_syserror("getpeername"); return -1; } /* XXX: I've no idea where this is copy-pasted from. */ if (addr->sin_addr.s_addr == 0) { say_syserror("getpeername: empty peer"); return -1; } return 0; } /** Pretty print a peer address. */ const char * sio_strfaddr(struct sockaddr_in *addr) { static __thread char name[SERVICE_NAME_MAXLEN]; snprintf(name, sizeof(name), "%s:%d", inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); return name; } tarantool-1.5.1.218.g1a69fd6/src/util.cc0000664000000000000000000002412412231715257016043 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/util.h" #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_BFD #include #endif /* HAVE_BFD */ #include "fiber.h" #include "say.h" #ifndef HAVE_LIBC_STACK_END void *__libc_stack_end; #endif /** Find a string in an array of strings. * * @param haystack Array of strings. Either NULL * pointer terminated (for arrays of * unknown size) or of size hmax. * @param needle string to look for * @param hmax the index to use if nothing is found * also limits the size of the array * @return string index or hmax if the string is not found. */ uint32_t strindex(const char **haystack, const char *needle, uint32_t hmax) { for (int index = 0; index != hmax && haystack[index]; index++) if (strcasecmp(haystack[index], needle) == 0) return index; return hmax; } void close_all_xcpt(int fdc, ...) { int keep[fdc]; va_list ap; struct rlimit nofile; va_start(ap, fdc); for (int j = 0; j < fdc; j++) { keep[j] = va_arg(ap, int); } va_end(ap); if (getrlimit(RLIMIT_NOFILE, &nofile) != 0) nofile.rlim_cur = 10000; for (int i = 3; i < nofile.rlim_cur; i++) { bool found = false; for (int j = 0; j < fdc; j++) { if (keep[j] == i) { found = true; break; } } if (!found) close(i); } } void coredump(int dump_interval) { static time_t last_coredump = 0; time_t now = time(NULL); if (now - last_coredump < dump_interval) return; last_coredump = now; if (fork() == 0) { close_all_xcpt(0); #ifdef ENABLE_GCOV __gcov_flush(); #endif abort(); } } static int itoa(int val, char *buf) { char *p = buf; if (val < 0) { *p++ = '-'; val = -val; } /* Print full range if it is an unsigned number. */ unsigned uval = val; char *start = p; do { *p++ = '0' + uval % 10; uval /= 10; } while (uval > 0); int len = (int)(p - buf); *p-- = '\0'; /* Reverse the resulting string. */ do { char tmp = *p; *p = *start; *start = tmp; } while (++start < --p); return len; } /** * Async-signal-safe implementation of printf() into an fd, to be * able to write messages into the error log inside a signal * handler. Only supports %s and %d, %u, format specifiers. */ ssize_t fdprintf(int fd, const char *format, ...) { ssize_t total = 0; char buf[22]; va_list args; va_start(args, format); while (*format) { const char *start = format; ssize_t len, res; if (*format++ != '%') { while (*format != '\0' && *format != '%') format++; len = format - start; goto out; } switch (*format++) { case '%': len = 1; break; case 's': start = va_arg(args, char *); if (start == NULL) start = "(null)"; len = strlen(start); break; case 'd': case 'u': start = buf; len = itoa(va_arg(args, int), buf); break; default: len = 2; break; } out: res = write(fd, start, len); if (res > 0) total += res; if (res != len) break; } va_end(args); return total; } #ifdef ENABLE_BACKTRACE /* * We use a global static buffer because it is too late to do any * allocation when we are printing backtrace and fiber stack is * small. */ static char backtrace_buf[4096 * 4]; /* * note, stack unwinding code assumes that binary is compiled with frame pointers */ struct frame { struct frame *rbp; void *ret; }; char * backtrace(void *frame_, void *stack, size_t stack_size) { struct frame *frame = (struct frame *) frame_; void *stack_top = (char *) stack + stack_size; void *stack_bottom = stack; char *p = backtrace_buf; char *end = p + sizeof(backtrace_buf) - 1; int frameno = 0; while (stack_bottom <= (void *)frame && (void *)frame < stack_top) { p += snprintf(p, end - p, "#%-2d %p in ", frameno++, frame->ret); if (p >= end) goto out; #ifdef HAVE_BFD struct symbol *s = addr2symbol(frame->ret); if (s != NULL) { size_t offset = (const char *) frame->ret - (const char *) s->addr; p += snprintf(p, end - p, "%s+%" PRI_SZ "", s->name, offset); } else #endif /* HAVE_BFD */ { p += snprintf(p, end - p, "?"); } if (p >= end) goto out; p += snprintf(p, end - p, CRLF); if (p >= end) goto out; #ifdef HAVE_BFD if (s != NULL && strcmp(s->name, "main") == 0) break; #endif frame = frame->rbp; } out: *p = '\0'; return backtrace_buf; } void print_backtrace() { void *frame = __builtin_frame_address(0); void *stack_top; size_t stack_size; if (fiber == NULL || fiber_name(fiber) == NULL || strcmp(fiber_name(fiber), "sched") == 0) { stack_top = frame; /* we don't know where the system stack top is */ stack_size = (const char *) __libc_stack_end - (const char *) frame; } else { stack_top = fiber->coro.stack; stack_size = fiber->coro.stack_size; } fdprintf(STDERR_FILENO, "%s", backtrace(frame, stack_top, stack_size)); } #endif /* ENABLE_BACKTRACE */ void __attribute__ ((noreturn)) assert_fail(const char *assertion, const char *file, unsigned int line, const char *function) { fprintf(stderr, "%s:%i: %s: assertion %s failed.\n", file, line, function, assertion); #ifdef ENABLE_BACKTRACE print_backtrace(); #endif /* ENABLE_BACKTRACE */ close_all_xcpt(0); abort(); } #ifdef HAVE_BFD static struct symbol *symbols; static ssize_t symbol_count; int compare_symbol(const void *_a, const void *_b) { const struct symbol *a = (const struct symbol *) _a; const struct symbol *b = (const struct symbol *) _b; if (a->addr > b->addr) return 1; if (a->addr == b->addr) return 0; return -1; } void symbols_load(const char *name) { long storage_needed; asymbol **symbol_table = NULL; long number_of_symbols; bfd *h; char **matching; int j; bfd_init(); h = bfd_openr (name, NULL); if (h == NULL) goto out; if (bfd_check_format(h, bfd_archive)) goto out; if (!bfd_check_format_matches(h, bfd_object, &matching)) goto out; storage_needed = bfd_get_symtab_upper_bound(h); if (storage_needed <= 0) goto out; symbol_table = (asymbol **) malloc(storage_needed); if (symbol_table == NULL) goto out; number_of_symbols = bfd_canonicalize_symtab (h, symbol_table); if (number_of_symbols < 0) goto out; for (int i = 0; i < number_of_symbols; i++) { struct bfd_section *section; unsigned long int vma, size; section = bfd_get_section(symbol_table[i]); vma = bfd_get_section_vma(h, section); size = bfd_get_section_size(section); /* On ELF (but not elsewhere) use BSF_FUNCTION flag. */ bool is_func = (bfd_target_elf_flavour == h->xvec->flavour) ? symbol_table[i]->flags & BSF_FUNCTION : 1; if (is_func && vma + symbol_table[i]->value > 0 && symbol_table[i]->value < size) symbol_count++; } if (symbol_count == 0) goto out; j = 0; symbols = (struct symbol *) malloc(symbol_count * sizeof(struct symbol)); if (symbols == NULL) goto out; for (int i = 0; i < number_of_symbols; i++) { struct bfd_section *section; unsigned long int vma, size; section = bfd_get_section(symbol_table[i]); vma = bfd_get_section_vma(h, section); size = bfd_get_section_size(section); /* On ELF (but not elsewhere) use BSF_FUNCTION flag. */ bool is_func = (bfd_target_elf_flavour == h->xvec->flavour) ? symbol_table[i]->flags & BSF_FUNCTION : 1; if (is_func && (vma + symbol_table[i]->value) > 0 && symbol_table[i]->value < size) { int status; symbols[j].name = abi::__cxa_demangle(symbol_table[i]->name, 0, 0, &status); if (symbols[j].name == NULL) symbols[j].name = strdup(symbol_table[i]->name); symbols[j].addr = (void *)(uintptr_t)(vma + symbol_table[i]->value); symbols[j].end = (void *)(uintptr_t)(vma + size); j++; } } bfd_close(h); qsort(symbols, symbol_count, sizeof(struct symbol), compare_symbol); for (int j = 0; j < symbol_count - 1; j++) symbols[j].end = MIN((char *) symbols[j].end, (char *) symbols[j + 1].addr - 1); out: if (symbol_count == 0) say_warn("no symbols were loaded"); if (symbol_table) free(symbol_table); } void symbols_free() { for (struct symbol *s = symbols; s < symbols + symbol_count; s++) free((void *) s->name); free(symbols); } /** * Sic: this assumes stack direction is from lowest to * highest. */ struct symbol * addr2symbol(void *addr) { if (symbols == NULL) return NULL; struct symbol key; key.addr = addr; key.name = NULL; key.end = NULL; struct symbol *low = symbols; struct symbol *high = symbols + symbol_count; while (low + 1 < high) { /* there are at least two to choose from. */ struct symbol *middle = low + ((high - low) >> 1); int diff = compare_symbol(&key, middle); if (diff < 0) { /* key < middle. */ high = middle; } else {/* key >= middle */ low = middle; if (diff == 0) break; } } if (low->addr <= key.addr && low->end >= key.addr) return low; return NULL; } #endif /* HAVE_BFD */ tarantool-1.5.1.218.g1a69fd6/src/coeio.cc0000664000000000000000000001622612202131537016157 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "coeio.h" #include "fiber.h" #include "exception.h" #include #include #include #include #include /* * Asynchronous IO Tasks (libeio wrapper). * --------------------------------------- * * libeio request processing is designed in edge-trigger * manner, when libeio is ready to process some requests it * calls coeio_poller callback. * * Due to libeio design, want_pall callback is called while * locks are being held, so it's not possible to call any libeio * function inside this callback. Thus coeio_want_poll raises an * async event which will be dealt with normally as part of the * main Tarantool event loop. * * The async event handler, in turn, performs eio_poll(), which * will run on_complete callback for all ready eio tasks. * In case if some of the requests are not complete by the time * eio_poll() has been called, coeio_idle watcher is started, which * would periodically invoke eio_poll() until all requests are * complete. * * See for details: * http://pod.tst.eu/http://cvs.schmorp.de/libeio/eio.pod */ struct coeio_manager { ev_idle coeio_idle; ev_async coeio_async; } coeio_manager; static void coeio_idle_cb(struct ev_idle *w, int events __attribute__((unused))) { if (eio_poll() != -1) { /* nothing to do */ ev_idle_stop(w); } } static void coeio_async_cb(struct ev_async *w __attribute__((unused)), int events __attribute__((unused))) { if (eio_poll() == -1) { /* not all tasks are complete. */ ev_idle_start(&coeio_manager.coeio_idle); } } static void coeio_want_poll_cb(void) { ev_async_send(&coeio_manager.coeio_async); } /** * Init coeio subsystem. * * Create idle and async watchers, init eio. */ void coeio_init(void) { eio_init(coeio_want_poll_cb, NULL); ev_idle_init(&coeio_manager.coeio_idle, coeio_idle_cb); ev_async_init(&coeio_manager.coeio_async, coeio_async_cb); ev_async_start(&coeio_manager.coeio_async); } /** * A single task context. */ struct coeio_task { /** The calling fiber. */ struct fiber *fiber; /** The callback. */ ssize_t (*func)(va_list ap); /** * If the callback sets errno, it's preserved across the * call. */ /** Callback arguments. */ va_list ap; /** Callback results. */ ssize_t result; int complete; int errorno; }; static void coeio_custom_cb(eio_req *req) { struct coeio_task *task = (struct coeio_task *) req->data; req->result = task->func(task->ap); } /** * A callback invoked by eio_poll when associated * eio_request is complete. */ static int coeio_on_complete(eio_req *req) { /* * Don't touch the task if the request is cancelled: * the task is allocated on the caller's stack and * may be already gone. Don't wakeup the caller * if the task is cancelled: in this case the caller * is already woken up, avoid double wake-up. */ if (! EIO_CANCELLED(req)) { struct coeio_task *task = (struct coeio_task *) req->data; task->result = req->result; task->errorno = req->errorno; task->complete = 1; fiber_wakeup(task->fiber); } return 0; } /** * Create new eio task with specified function and * arguments. Yield and wait until the task is complete * or a timeout occurs. * * This function doesn't throw exceptions to avoid double error * checking: in most cases it's also necessary to check the return * value of the called function and perform necessary actions. If * func sets errno, the errno is preserved across the call. * * @retval -1 and errno = ENOMEM if failed to create a task * @retval -1 and errno = ETIMEDOUT if timed out * @retval the function return (errno is preserved). * * @code * static ssize_t openfile_cb(va_list ap) * { * const char *filename = va_arg(ap); * int flags = va_arg(ap); * return open(filename, flags); * } * * if (coeio_custom(openfile_cb, 0.10, "/tmp/file", 0) == -1) * // handle errors. * ... */ ssize_t coeio_custom(ssize_t (*func)(va_list ap), ev_tstamp timeout, ...) { struct coeio_task task; task.fiber = fiber; task.func = func; task.result = -1; task.complete = 0; va_start(task.ap, timeout); struct eio_req *req = eio_custom(coeio_custom_cb, 0, coeio_on_complete, &task); if (req == NULL) { errno = ENOMEM; } else if (fiber_yield_timeout(timeout) && !task.complete) { /* timeout. */ errno = ETIMEDOUT; task.result = -1; eio_cancel(req); } else { /* the task is complete. */ errno = task.errorno; } va_end(task.ap); return task.result; } /* * Resolver function, run in separate thread by * coeio (libeio). */ static ssize_t getaddrinfo_cb(va_list ap) { const char *host = va_arg(ap, const char *); const char *port = va_arg(ap, const char *); struct addrinfo *hints = va_arg(ap, struct addrinfo *); struct addrinfo **res = va_arg(ap, struct addrinfo **); int rc = getaddrinfo(host, port, hints, res); /* getaddrinfo can return EAI_ADDRFAMILY on attempt * to resolve ::1, if machine has no public ipv6 addresses * configured. Retry without AI_ADDRCONFIG flag set. * * See for details: https://bugs.launchpad.net/tarantool/+bug/1160877 */ /* EAI_ADDRFAMILY is deprecated on FreeBSD */ if (rc == EAI_BADFLAGS #ifdef EAI_ADDRFAMILY || rc == EAI_ADDRFAMILY #endif ) { hints->ai_flags &= ~AI_ADDRCONFIG; rc = getaddrinfo(host, port, hints, res); } if (rc) { errno = ERESOLVE; return -1; } return 0; } struct addrinfo * coeio_resolve(int socktype, const char *host, const char *port, ev_tstamp timeout) { /* Fill hinting information for use by connect(2) or bind(2). */ struct addrinfo *result = NULL; struct addrinfo hints; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ hints.ai_socktype = socktype; hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV|AI_PASSIVE; hints.ai_protocol = 0; /* do resolving */ errno = 0; if (coeio_custom(getaddrinfo_cb, timeout, host, port, &hints, &result)) return NULL; return result; } tarantool-1.5.1.218.g1a69fd6/src/ipc.cc0000664000000000000000000001372212202131537015632 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "ipc.h" #include "fiber.h" #include #include struct ipc_channel { struct rlist readers, writers, bcast; unsigned size; unsigned beg; unsigned count; void *bcast_msg; void *item[0]; }; static void ipc_channel_create(struct ipc_channel *ch); static void ipc_channel_destroy(struct ipc_channel *ch); bool ipc_channel_is_empty(struct ipc_channel *ch) { return ch->count == 0; } bool ipc_channel_is_full(struct ipc_channel *ch) { return ch->count >= ch->size; } struct ipc_channel * ipc_channel_new(unsigned size) { if (!size) size = 1; struct ipc_channel *res = (struct ipc_channel *) malloc(sizeof(struct ipc_channel) + sizeof(void *) * size); if (res == NULL) return NULL; res->size = size; ipc_channel_create(res); return res; } void ipc_channel_delete(struct ipc_channel *ch) { ipc_channel_destroy(ch); free(ch); } static void ipc_channel_create(struct ipc_channel *ch) { ch->beg = ch->count = 0; rlist_create(&ch->bcast); rlist_create(&ch->readers); rlist_create(&ch->writers); } static void ipc_channel_destroy(struct ipc_channel *ch) { while (!rlist_empty(&ch->writers)) { struct fiber *f = rlist_first_entry(&ch->writers, struct fiber, state); rlist_del_entry(f, state); } while (!rlist_empty(&ch->readers)) { struct fiber *f = rlist_first_entry(&ch->readers, struct fiber, state); rlist_del_entry(f, state); } } void * ipc_channel_get_timeout(struct ipc_channel *ch, ev_tstamp timeout) { struct fiber *f; bool first_try = true; ev_tstamp started = ev_now(); /* channel is empty */ while (ch->count == 0) { /* try to be in FIFO order */ if (first_try) { rlist_add_tail_entry(&ch->readers, fiber, state); first_try = false; } else { rlist_add_entry(&ch->readers, fiber, state); } bool cancellable = fiber_setcancellable(true); fiber_yield_timeout(timeout); rlist_del_entry(fiber, state); /* broadcast messsage wakes us up */ if (!rlist_empty(&ch->bcast)) { f = rlist_first_entry(&ch->bcast, struct fiber, state); rlist_del_entry(f, state); fiber_wakeup(f); fiber_testcancel(); fiber_setcancellable(cancellable); return ch->bcast_msg; } fiber_testcancel(); fiber_setcancellable(cancellable); timeout -= ev_now() - started; if (timeout <= 0) return NULL; } void *res = ch->item[ch->beg]; if (++ch->beg >= ch->size) ch->beg -= ch->size; ch->count--; if (!rlist_empty(&ch->writers)) { f = rlist_first_entry(&ch->writers, struct fiber, state); rlist_del_entry(f, state); fiber_wakeup(f); } return res; } void * ipc_channel_get(struct ipc_channel *ch) { return ipc_channel_get_timeout(ch, TIMEOUT_INFINITY); } int ipc_channel_put_timeout(struct ipc_channel *ch, void *data, ev_tstamp timeout) { bool first_try = true; ev_tstamp started = ev_now(); /* channel is full */ while (ch->count >= ch->size) { /* try to be in FIFO order */ if (first_try) { rlist_add_tail_entry(&ch->writers, fiber, state); first_try = false; } else { rlist_add_entry(&ch->writers, fiber, state); } bool cancellable = fiber_setcancellable(true); fiber_yield_timeout(timeout); rlist_del_entry(fiber, state); fiber_testcancel(); fiber_setcancellable(cancellable); timeout -= ev_now() - started; if (timeout <= 0) { errno = ETIMEDOUT; return -1; } } unsigned i = ch->beg; i += ch->count; ch->count++; if (i >= ch->size) i -= ch->size; ch->item[i] = data; if (!rlist_empty(&ch->readers)) { struct fiber *f; f = rlist_first_entry(&ch->readers, struct fiber, state); rlist_del_entry(f, state); fiber_wakeup(f); } return 0; } void ipc_channel_put(struct ipc_channel *ch, void *data) { ipc_channel_put_timeout(ch, data, TIMEOUT_INFINITY); } bool ipc_channel_has_readers(struct ipc_channel *ch) { return !rlist_empty(&ch->readers); } bool ipc_channel_has_writers(struct ipc_channel *ch) { return !rlist_empty(&ch->writers); } int ipc_channel_broadcast(struct ipc_channel *ch, void *data) { /* broadcast in broadcast: marasmus */ if (!rlist_empty(&ch->bcast)) return 0; /* there is no reader on channel */ if (rlist_empty(&ch->readers)) { ipc_channel_put(ch, data); return 1; } unsigned readers = 0; struct fiber *f; rlist_foreach_entry(f, &ch->readers, state) { readers++; } unsigned cnt = 0; while(!rlist_empty(&ch->readers)) { f = rlist_first_entry(&ch->readers, struct fiber, state); ch->bcast_msg = data; rlist_add_tail_entry(&ch->bcast, fiber, state); fiber_wakeup(f); bool cancellable = fiber_setcancellable(true); fiber_yield(); rlist_del_entry(fiber, state); fiber_testcancel(); fiber_setcancellable(cancellable); /* if any other reader was added don't wake it up */ if (++cnt >= readers) break; } return cnt; } tarantool-1.5.1.218.g1a69fd6/src/admin.cc0000664000000000000000000011007412232453114016146 0ustar rootroot #line 1 "src/admin.rl" /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include "lua/init.h" #include #include #include "tarantool/util.h" #include #include "coio_buf.h" extern "C" { #include #include #include } #include "box/box.h" #include "lua/init.h" #include "session.h" #include "scoped_guard.h" static const char *help = "available commands:" CRLF " - help" CRLF " - exit" CRLF " - show info" CRLF " - show fiber" CRLF " - show configuration" CRLF " - show slab" CRLF " - show palloc" CRLF " - show stat" CRLF " - show plugins" CRLF " - save coredump" CRLF " - save snapshot" CRLF " - lua command" CRLF " - reload configuration" CRLF " - show injections (debug mode only)" CRLF " - set injection (debug mode only)" CRLF; static const char *unknown_command = "unknown command. try typing help." CRLF; #line 83 "src/admin.cc" static const int admin_start = 1; static const int admin_first_final = 141; static const int admin_error = 0; static const int admin_en_main = 1; #line 82 "src/admin.rl" struct salloc_stat_admin_cb_ctx { int64_t total_used; struct tbuf *out; }; static int salloc_stat_admin_cb(const struct slab_cache_stats *cstat, void *cb_ctx) { struct salloc_stat_admin_cb_ctx *ctx = (struct salloc_stat_admin_cb_ctx *) cb_ctx; tbuf_printf(ctx->out, " - { item_size: %- 5i, slabs: %- 3i, items: %- 11" PRIi64 ", bytes_used: %- 12" PRIi64 ", bytes_free: %- 12" PRIi64 " }" CRLF, (int)cstat->item_size, (int)cstat->slabs, cstat->items, cstat->bytes_used, cstat->bytes_free); ctx->total_used += cstat->bytes_used; return 0; } static void show_slab(struct tbuf *out) { struct salloc_stat_admin_cb_ctx cb_ctx; struct slab_arena_stats astat; cb_ctx.total_used = 0; cb_ctx.out = out; tbuf_printf(out, "slab statistics:\n classes:" CRLF); salloc_stat(salloc_stat_admin_cb, &astat, &cb_ctx); tbuf_printf(out, " items_used: %.2f%%" CRLF, (double)cb_ctx.total_used / astat.size * 100); tbuf_printf(out, " arena_used: %.2f%%" CRLF, (double)astat.used / astat.size * 100); } static void end(struct tbuf *out) { tbuf_printf(out, "..." CRLF); } static void start(struct tbuf *out) { tbuf_printf(out, "---" CRLF); } static void ok(struct tbuf *out) { start(out); tbuf_printf(out, "ok" CRLF); end(out); } static void fail(struct tbuf *out, struct tbuf *err) { start(out); tbuf_printf(out, "fail:%.*s" CRLF, err->size, (char *)err->data); end(out); } static void tarantool_info(struct tbuf *out) { tbuf_printf(out, "info:" CRLF); tbuf_printf(out, " version: \"%s\"" CRLF, tarantool_version()); tbuf_printf(out, " uptime: %i" CRLF, (int)tarantool_uptime()); tbuf_printf(out, " pid: %i" CRLF, getpid()); tbuf_printf(out, " logger_pid: %i" CRLF, logger_pid); tbuf_printf(out, " snapshot_pid: %i" CRLF, snapshot_pid); tbuf_printf(out, " lsn: %" PRIi64 CRLF, recovery_state->confirmed_lsn); tbuf_printf(out, " recovery_lag: %.3f" CRLF, recovery_state->remote ? recovery_state->remote->recovery_lag : 0); tbuf_printf(out, " recovery_last_update: %.3f" CRLF, recovery_state->remote ? recovery_state->remote->recovery_last_update_tstamp :0); box_info(out); const char *path = cfg_filename_fullpath; if (path == NULL) path = cfg_filename; tbuf_printf(out, " config: \"%s\"" CRLF, path); } static int show_stat_item(const char *name, int rps, int64_t total, void *ctx) { struct tbuf *buf = (struct tbuf *) ctx; int name_len = strlen(name); tbuf_printf(buf, " %s:%*s{ rps: %- 6i, total: %- 12" PRIi64 " }" CRLF, name, 1 + stat_max_name_len - name_len, " ", rps, total); return 0; } void show_stat(struct tbuf *buf) { tbuf_printf(buf, "statistics:" CRLF); stat_foreach(show_stat_item, buf); } static int admin_dispatch(struct ev_io *coio, struct iobuf *iobuf, lua_State *L) { struct ibuf *in = &iobuf->in; struct tbuf *out = tbuf_new(fiber->gc_pool); struct tbuf *err = tbuf_new(fiber->gc_pool); int cs; char *p, *pe; char *strstart, *strend; bool state; while ((pe = (char *) memchr(in->pos, '\n', in->end - in->pos)) == NULL) { if (coio_bread(coio, in, 1) <= 0) return -1; } pe++; p = in->pos; #line 227 "src/admin.cc" { cs = admin_start; } #line 232 "src/admin.cc" { if ( p == pe ) goto _test_eof; switch ( cs ) { case 1: switch( (*p) ) { case 99: goto st2; case 101: goto st13; case 104: goto st17; case 108: goto st21; case 113: goto st27; case 114: goto st28; case 115: goto st48; } goto st0; st0: cs = 0; goto _out; st2: if ( ++p == pe ) goto _test_eof2; case 2: if ( (*p) == 104 ) goto st3; goto st0; st3: if ( ++p == pe ) goto _test_eof3; case 3: switch( (*p) ) { case 32: goto st4; case 101: goto st10; } goto st0; st4: if ( ++p == pe ) goto _test_eof4; case 4: switch( (*p) ) { case 32: goto st4; case 115: goto st5; } goto st0; st5: if ( ++p == pe ) goto _test_eof5; case 5: if ( (*p) == 108 ) goto st6; goto st0; st6: if ( ++p == pe ) goto _test_eof6; case 6: switch( (*p) ) { case 10: goto tr13; case 13: goto tr14; case 97: goto st8; } goto st0; tr13: #line 322 "src/admin.rl" {slab_validate(); ok(out);} goto st141; tr20: #line 309 "src/admin.rl" {return -1;} goto st141; tr25: #line 235 "src/admin.rl" { start(out); tbuf_append(out, help, strlen(help)); end(out); } goto st141; tr36: #line 295 "src/admin.rl" {strend = p;} #line 241 "src/admin.rl" { strstart[strend-strstart]='\0'; start(out); tarantool_lua(L, out, strstart); end(out); } goto st141; tr43: #line 248 "src/admin.rl" { if (reload_cfg(err)) fail(out, err); else ok(out); } goto st141; tr67: #line 320 "src/admin.rl" {coredump(60); ok(out);} goto st141; tr76: #line 255 "src/admin.rl" { int ret = snapshot(); if (ret == 0) ok(out); else { tbuf_printf(err, " can't save snapshot, errno %d (%s)", ret, strerror(ret)); fail(out, err); } } goto st141; tr98: #line 305 "src/admin.rl" { state = false; } #line 268 "src/admin.rl" { strstart[strend-strstart] = '\0'; if (errinj_set_byname(strstart, state)) { tbuf_printf(err, "can't find error injection '%s'", strstart); fail(out, err); } else { ok(out); } } goto st141; tr101: #line 304 "src/admin.rl" { state = true; } #line 268 "src/admin.rl" { strstart[strend-strstart] = '\0'; if (errinj_set_byname(strstart, state)) { tbuf_printf(err, "can't find error injection '%s'", strstart); fail(out, err); } else { ok(out); } } goto st141; tr117: #line 223 "src/admin.rl" { start(out); show_cfg(out); end(out); } goto st141; tr131: #line 312 "src/admin.rl" {start(out); fiber_info(out); end(out);} goto st141; tr137: #line 311 "src/admin.rl" {start(out); tarantool_info(out); end(out);} goto st141; tr146: #line 229 "src/admin.rl" { start(out); errinj_info(out); end(out); } goto st141; tr153: #line 315 "src/admin.rl" {start(out); palloc_stat(out); end(out);} goto st141; tr164: #line 217 "src/admin.rl" { start(out); show_plugins_stat(out); end(out); } goto st141; tr168: #line 314 "src/admin.rl" {start(out); show_slab(out); end(out);} goto st141; tr172: #line 316 "src/admin.rl" {start(out); show_stat(out);end(out);} goto st141; st141: if ( ++p == pe ) goto _test_eof141; case 141: #line 425 "src/admin.cc" goto st0; tr14: #line 322 "src/admin.rl" {slab_validate(); ok(out);} goto st7; tr21: #line 309 "src/admin.rl" {return -1;} goto st7; tr26: #line 235 "src/admin.rl" { start(out); tbuf_append(out, help, strlen(help)); end(out); } goto st7; tr37: #line 295 "src/admin.rl" {strend = p;} #line 241 "src/admin.rl" { strstart[strend-strstart]='\0'; start(out); tarantool_lua(L, out, strstart); end(out); } goto st7; tr44: #line 248 "src/admin.rl" { if (reload_cfg(err)) fail(out, err); else ok(out); } goto st7; tr68: #line 320 "src/admin.rl" {coredump(60); ok(out);} goto st7; tr77: #line 255 "src/admin.rl" { int ret = snapshot(); if (ret == 0) ok(out); else { tbuf_printf(err, " can't save snapshot, errno %d (%s)", ret, strerror(ret)); fail(out, err); } } goto st7; tr99: #line 305 "src/admin.rl" { state = false; } #line 268 "src/admin.rl" { strstart[strend-strstart] = '\0'; if (errinj_set_byname(strstart, state)) { tbuf_printf(err, "can't find error injection '%s'", strstart); fail(out, err); } else { ok(out); } } goto st7; tr102: #line 304 "src/admin.rl" { state = true; } #line 268 "src/admin.rl" { strstart[strend-strstart] = '\0'; if (errinj_set_byname(strstart, state)) { tbuf_printf(err, "can't find error injection '%s'", strstart); fail(out, err); } else { ok(out); } } goto st7; tr118: #line 223 "src/admin.rl" { start(out); show_cfg(out); end(out); } goto st7; tr132: #line 312 "src/admin.rl" {start(out); fiber_info(out); end(out);} goto st7; tr138: #line 311 "src/admin.rl" {start(out); tarantool_info(out); end(out);} goto st7; tr147: #line 229 "src/admin.rl" { start(out); errinj_info(out); end(out); } goto st7; tr154: #line 315 "src/admin.rl" {start(out); palloc_stat(out); end(out);} goto st7; tr165: #line 217 "src/admin.rl" { start(out); show_plugins_stat(out); end(out); } goto st7; tr169: #line 314 "src/admin.rl" {start(out); show_slab(out); end(out);} goto st7; tr173: #line 316 "src/admin.rl" {start(out); show_stat(out);end(out);} goto st7; st7: if ( ++p == pe ) goto _test_eof7; case 7: #line 558 "src/admin.cc" if ( (*p) == 10 ) goto st141; goto st0; st8: if ( ++p == pe ) goto _test_eof8; case 8: switch( (*p) ) { case 10: goto tr13; case 13: goto tr14; case 98: goto st9; } goto st0; st9: if ( ++p == pe ) goto _test_eof9; case 9: switch( (*p) ) { case 10: goto tr13; case 13: goto tr14; } goto st0; st10: if ( ++p == pe ) goto _test_eof10; case 10: switch( (*p) ) { case 32: goto st4; case 99: goto st11; } goto st0; st11: if ( ++p == pe ) goto _test_eof11; case 11: switch( (*p) ) { case 32: goto st4; case 107: goto st12; } goto st0; st12: if ( ++p == pe ) goto _test_eof12; case 12: if ( (*p) == 32 ) goto st4; goto st0; st13: if ( ++p == pe ) goto _test_eof13; case 13: switch( (*p) ) { case 10: goto tr20; case 13: goto tr21; case 120: goto st14; } goto st0; st14: if ( ++p == pe ) goto _test_eof14; case 14: switch( (*p) ) { case 10: goto tr20; case 13: goto tr21; case 105: goto st15; } goto st0; st15: if ( ++p == pe ) goto _test_eof15; case 15: switch( (*p) ) { case 10: goto tr20; case 13: goto tr21; case 116: goto st16; } goto st0; st16: if ( ++p == pe ) goto _test_eof16; case 16: switch( (*p) ) { case 10: goto tr20; case 13: goto tr21; } goto st0; st17: if ( ++p == pe ) goto _test_eof17; case 17: switch( (*p) ) { case 10: goto tr25; case 13: goto tr26; case 101: goto st18; } goto st0; st18: if ( ++p == pe ) goto _test_eof18; case 18: switch( (*p) ) { case 10: goto tr25; case 13: goto tr26; case 108: goto st19; } goto st0; st19: if ( ++p == pe ) goto _test_eof19; case 19: switch( (*p) ) { case 10: goto tr25; case 13: goto tr26; case 112: goto st20; } goto st0; st20: if ( ++p == pe ) goto _test_eof20; case 20: switch( (*p) ) { case 10: goto tr25; case 13: goto tr26; } goto st0; st21: if ( ++p == pe ) goto _test_eof21; case 21: if ( (*p) == 117 ) goto st22; goto st0; st22: if ( ++p == pe ) goto _test_eof22; case 22: switch( (*p) ) { case 32: goto st23; case 97: goto st26; } goto st0; st23: if ( ++p == pe ) goto _test_eof23; case 23: switch( (*p) ) { case 10: goto st0; case 13: goto st0; case 32: goto tr34; } goto tr33; tr33: #line 295 "src/admin.rl" {strstart = p;} goto st24; st24: if ( ++p == pe ) goto _test_eof24; case 24: #line 718 "src/admin.cc" switch( (*p) ) { case 10: goto tr36; case 13: goto tr37; } goto st24; tr34: #line 295 "src/admin.rl" {strstart = p;} goto st25; st25: if ( ++p == pe ) goto _test_eof25; case 25: #line 732 "src/admin.cc" switch( (*p) ) { case 10: goto tr36; case 13: goto tr37; case 32: goto tr34; } goto tr33; st26: if ( ++p == pe ) goto _test_eof26; case 26: if ( (*p) == 32 ) goto st23; goto st0; st27: if ( ++p == pe ) goto _test_eof27; case 27: switch( (*p) ) { case 10: goto tr20; case 13: goto tr21; case 117: goto st14; } goto st0; st28: if ( ++p == pe ) goto _test_eof28; case 28: if ( (*p) == 101 ) goto st29; goto st0; st29: if ( ++p == pe ) goto _test_eof29; case 29: switch( (*p) ) { case 32: goto st30; case 108: goto st44; } goto st0; st30: if ( ++p == pe ) goto _test_eof30; case 30: switch( (*p) ) { case 32: goto st30; case 99: goto st31; } goto st0; st31: if ( ++p == pe ) goto _test_eof31; case 31: if ( (*p) == 111 ) goto st32; goto st0; st32: if ( ++p == pe ) goto _test_eof32; case 32: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 110: goto st33; } goto st0; st33: if ( ++p == pe ) goto _test_eof33; case 33: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 102: goto st34; } goto st0; st34: if ( ++p == pe ) goto _test_eof34; case 34: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 105: goto st35; } goto st0; st35: if ( ++p == pe ) goto _test_eof35; case 35: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 103: goto st36; } goto st0; st36: if ( ++p == pe ) goto _test_eof36; case 36: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 117: goto st37; } goto st0; st37: if ( ++p == pe ) goto _test_eof37; case 37: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 114: goto st38; } goto st0; st38: if ( ++p == pe ) goto _test_eof38; case 38: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 97: goto st39; } goto st0; st39: if ( ++p == pe ) goto _test_eof39; case 39: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 116: goto st40; } goto st0; st40: if ( ++p == pe ) goto _test_eof40; case 40: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 105: goto st41; } goto st0; st41: if ( ++p == pe ) goto _test_eof41; case 41: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 111: goto st42; } goto st0; st42: if ( ++p == pe ) goto _test_eof42; case 42: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; case 110: goto st43; } goto st0; st43: if ( ++p == pe ) goto _test_eof43; case 43: switch( (*p) ) { case 10: goto tr43; case 13: goto tr44; } goto st0; st44: if ( ++p == pe ) goto _test_eof44; case 44: switch( (*p) ) { case 32: goto st30; case 111: goto st45; } goto st0; st45: if ( ++p == pe ) goto _test_eof45; case 45: switch( (*p) ) { case 32: goto st30; case 97: goto st46; } goto st0; st46: if ( ++p == pe ) goto _test_eof46; case 46: switch( (*p) ) { case 32: goto st30; case 100: goto st47; } goto st0; st47: if ( ++p == pe ) goto _test_eof47; case 47: if ( (*p) == 32 ) goto st30; goto st0; st48: if ( ++p == pe ) goto _test_eof48; case 48: switch( (*p) ) { case 97: goto st49; case 101: goto st69; case 104: goto st88; } goto st0; st49: if ( ++p == pe ) goto _test_eof49; case 49: switch( (*p) ) { case 32: goto st50; case 118: goto st67; } goto st0; st50: if ( ++p == pe ) goto _test_eof50; case 50: switch( (*p) ) { case 32: goto st50; case 99: goto st51; case 115: goto st59; } goto st0; st51: if ( ++p == pe ) goto _test_eof51; case 51: if ( (*p) == 111 ) goto st52; goto st0; st52: if ( ++p == pe ) goto _test_eof52; case 52: switch( (*p) ) { case 10: goto tr67; case 13: goto tr68; case 114: goto st53; } goto st0; st53: if ( ++p == pe ) goto _test_eof53; case 53: switch( (*p) ) { case 10: goto tr67; case 13: goto tr68; case 101: goto st54; } goto st0; st54: if ( ++p == pe ) goto _test_eof54; case 54: switch( (*p) ) { case 10: goto tr67; case 13: goto tr68; case 100: goto st55; } goto st0; st55: if ( ++p == pe ) goto _test_eof55; case 55: switch( (*p) ) { case 10: goto tr67; case 13: goto tr68; case 117: goto st56; } goto st0; st56: if ( ++p == pe ) goto _test_eof56; case 56: switch( (*p) ) { case 10: goto tr67; case 13: goto tr68; case 109: goto st57; } goto st0; st57: if ( ++p == pe ) goto _test_eof57; case 57: switch( (*p) ) { case 10: goto tr67; case 13: goto tr68; case 112: goto st58; } goto st0; st58: if ( ++p == pe ) goto _test_eof58; case 58: switch( (*p) ) { case 10: goto tr67; case 13: goto tr68; } goto st0; st59: if ( ++p == pe ) goto _test_eof59; case 59: if ( (*p) == 110 ) goto st60; goto st0; st60: if ( ++p == pe ) goto _test_eof60; case 60: switch( (*p) ) { case 10: goto tr76; case 13: goto tr77; case 97: goto st61; } goto st0; st61: if ( ++p == pe ) goto _test_eof61; case 61: switch( (*p) ) { case 10: goto tr76; case 13: goto tr77; case 112: goto st62; } goto st0; st62: if ( ++p == pe ) goto _test_eof62; case 62: switch( (*p) ) { case 10: goto tr76; case 13: goto tr77; case 115: goto st63; } goto st0; st63: if ( ++p == pe ) goto _test_eof63; case 63: switch( (*p) ) { case 10: goto tr76; case 13: goto tr77; case 104: goto st64; } goto st0; st64: if ( ++p == pe ) goto _test_eof64; case 64: switch( (*p) ) { case 10: goto tr76; case 13: goto tr77; case 111: goto st65; } goto st0; st65: if ( ++p == pe ) goto _test_eof65; case 65: switch( (*p) ) { case 10: goto tr76; case 13: goto tr77; case 116: goto st66; } goto st0; st66: if ( ++p == pe ) goto _test_eof66; case 66: switch( (*p) ) { case 10: goto tr76; case 13: goto tr77; } goto st0; st67: if ( ++p == pe ) goto _test_eof67; case 67: switch( (*p) ) { case 32: goto st50; case 101: goto st68; } goto st0; st68: if ( ++p == pe ) goto _test_eof68; case 68: if ( (*p) == 32 ) goto st50; goto st0; st69: if ( ++p == pe ) goto _test_eof69; case 69: switch( (*p) ) { case 32: goto st70; case 116: goto st87; } goto st0; st70: if ( ++p == pe ) goto _test_eof70; case 70: switch( (*p) ) { case 32: goto st70; case 105: goto st71; } goto st0; st71: if ( ++p == pe ) goto _test_eof71; case 71: if ( (*p) == 110 ) goto st72; goto st0; st72: if ( ++p == pe ) goto _test_eof72; case 72: switch( (*p) ) { case 32: goto st73; case 106: goto st80; } goto st0; st73: if ( ++p == pe ) goto _test_eof73; case 73: if ( (*p) == 32 ) goto st73; if ( 33 <= (*p) && (*p) <= 126 ) goto tr91; goto st0; tr91: #line 303 "src/admin.rl" { strstart = p; } goto st74; st74: if ( ++p == pe ) goto _test_eof74; case 74: #line 1189 "src/admin.cc" if ( (*p) == 32 ) goto tr92; if ( 33 <= (*p) && (*p) <= 126 ) goto st74; goto st0; tr92: #line 303 "src/admin.rl" { strend = p; } goto st75; st75: if ( ++p == pe ) goto _test_eof75; case 75: #line 1203 "src/admin.cc" switch( (*p) ) { case 32: goto st75; case 111: goto st76; } goto st0; st76: if ( ++p == pe ) goto _test_eof76; case 76: switch( (*p) ) { case 102: goto st77; case 110: goto st79; } goto st0; st77: if ( ++p == pe ) goto _test_eof77; case 77: switch( (*p) ) { case 10: goto tr98; case 13: goto tr99; case 102: goto st78; } goto st0; st78: if ( ++p == pe ) goto _test_eof78; case 78: switch( (*p) ) { case 10: goto tr98; case 13: goto tr99; } goto st0; st79: if ( ++p == pe ) goto _test_eof79; case 79: switch( (*p) ) { case 10: goto tr101; case 13: goto tr102; } goto st0; st80: if ( ++p == pe ) goto _test_eof80; case 80: switch( (*p) ) { case 32: goto st73; case 101: goto st81; } goto st0; st81: if ( ++p == pe ) goto _test_eof81; case 81: switch( (*p) ) { case 32: goto st73; case 99: goto st82; } goto st0; st82: if ( ++p == pe ) goto _test_eof82; case 82: switch( (*p) ) { case 32: goto st73; case 116: goto st83; } goto st0; st83: if ( ++p == pe ) goto _test_eof83; case 83: switch( (*p) ) { case 32: goto st73; case 105: goto st84; } goto st0; st84: if ( ++p == pe ) goto _test_eof84; case 84: switch( (*p) ) { case 32: goto st73; case 111: goto st85; } goto st0; st85: if ( ++p == pe ) goto _test_eof85; case 85: switch( (*p) ) { case 32: goto st73; case 110: goto st86; } goto st0; st86: if ( ++p == pe ) goto _test_eof86; case 86: if ( (*p) == 32 ) goto st73; goto st0; st87: if ( ++p == pe ) goto _test_eof87; case 87: if ( (*p) == 32 ) goto st70; goto st0; st88: if ( ++p == pe ) goto _test_eof88; case 88: switch( (*p) ) { case 32: goto st89; case 111: goto st139; } goto st0; st89: if ( ++p == pe ) goto _test_eof89; case 89: switch( (*p) ) { case 32: goto st89; case 99: goto st90; case 102: goto st103; case 105: goto st108; case 112: goto st120; case 115: goto st132; } goto st0; st90: if ( ++p == pe ) goto _test_eof90; case 90: if ( (*p) == 111 ) goto st91; goto st0; st91: if ( ++p == pe ) goto _test_eof91; case 91: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 110: goto st92; } goto st0; st92: if ( ++p == pe ) goto _test_eof92; case 92: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 102: goto st93; } goto st0; st93: if ( ++p == pe ) goto _test_eof93; case 93: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 105: goto st94; } goto st0; st94: if ( ++p == pe ) goto _test_eof94; case 94: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 103: goto st95; } goto st0; st95: if ( ++p == pe ) goto _test_eof95; case 95: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 117: goto st96; } goto st0; st96: if ( ++p == pe ) goto _test_eof96; case 96: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 114: goto st97; } goto st0; st97: if ( ++p == pe ) goto _test_eof97; case 97: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 97: goto st98; } goto st0; st98: if ( ++p == pe ) goto _test_eof98; case 98: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 116: goto st99; } goto st0; st99: if ( ++p == pe ) goto _test_eof99; case 99: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 105: goto st100; } goto st0; st100: if ( ++p == pe ) goto _test_eof100; case 100: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 111: goto st101; } goto st0; st101: if ( ++p == pe ) goto _test_eof101; case 101: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; case 110: goto st102; } goto st0; st102: if ( ++p == pe ) goto _test_eof102; case 102: switch( (*p) ) { case 10: goto tr117; case 13: goto tr118; } goto st0; st103: if ( ++p == pe ) goto _test_eof103; case 103: if ( (*p) == 105 ) goto st104; goto st0; st104: if ( ++p == pe ) goto _test_eof104; case 104: switch( (*p) ) { case 10: goto tr131; case 13: goto tr132; case 98: goto st105; } goto st0; st105: if ( ++p == pe ) goto _test_eof105; case 105: switch( (*p) ) { case 10: goto tr131; case 13: goto tr132; case 101: goto st106; } goto st0; st106: if ( ++p == pe ) goto _test_eof106; case 106: switch( (*p) ) { case 10: goto tr131; case 13: goto tr132; case 114: goto st107; } goto st0; st107: if ( ++p == pe ) goto _test_eof107; case 107: switch( (*p) ) { case 10: goto tr131; case 13: goto tr132; } goto st0; st108: if ( ++p == pe ) goto _test_eof108; case 108: if ( (*p) == 110 ) goto st109; goto st0; st109: if ( ++p == pe ) goto _test_eof109; case 109: switch( (*p) ) { case 10: goto tr137; case 13: goto tr138; case 102: goto st110; case 106: goto st112; case 115: goto st115; } goto st0; st110: if ( ++p == pe ) goto _test_eof110; case 110: switch( (*p) ) { case 10: goto tr137; case 13: goto tr138; case 111: goto st111; } goto st0; st111: if ( ++p == pe ) goto _test_eof111; case 111: switch( (*p) ) { case 10: goto tr137; case 13: goto tr138; } goto st0; st112: if ( ++p == pe ) goto _test_eof112; case 112: switch( (*p) ) { case 101: goto st113; case 115: goto st115; } goto st0; st113: if ( ++p == pe ) goto _test_eof113; case 113: switch( (*p) ) { case 99: goto st114; case 115: goto st115; } goto st0; st114: if ( ++p == pe ) goto _test_eof114; case 114: switch( (*p) ) { case 115: goto st115; case 116: goto st116; } goto st0; st115: if ( ++p == pe ) goto _test_eof115; case 115: switch( (*p) ) { case 10: goto tr146; case 13: goto tr147; } goto st0; st116: if ( ++p == pe ) goto _test_eof116; case 116: switch( (*p) ) { case 105: goto st117; case 115: goto st115; } goto st0; st117: if ( ++p == pe ) goto _test_eof117; case 117: switch( (*p) ) { case 111: goto st118; case 115: goto st115; } goto st0; st118: if ( ++p == pe ) goto _test_eof118; case 118: switch( (*p) ) { case 110: goto st119; case 115: goto st115; } goto st0; st119: if ( ++p == pe ) goto _test_eof119; case 119: if ( (*p) == 115 ) goto st115; goto st0; st120: if ( ++p == pe ) goto _test_eof120; case 120: switch( (*p) ) { case 97: goto st121; case 108: goto st126; } goto st0; st121: if ( ++p == pe ) goto _test_eof121; case 121: switch( (*p) ) { case 10: goto tr153; case 13: goto tr154; case 108: goto st122; } goto st0; st122: if ( ++p == pe ) goto _test_eof122; case 122: switch( (*p) ) { case 10: goto tr153; case 13: goto tr154; case 108: goto st123; } goto st0; st123: if ( ++p == pe ) goto _test_eof123; case 123: switch( (*p) ) { case 10: goto tr153; case 13: goto tr154; case 111: goto st124; } goto st0; st124: if ( ++p == pe ) goto _test_eof124; case 124: switch( (*p) ) { case 10: goto tr153; case 13: goto tr154; case 99: goto st125; } goto st0; st125: if ( ++p == pe ) goto _test_eof125; case 125: switch( (*p) ) { case 10: goto tr153; case 13: goto tr154; } goto st0; st126: if ( ++p == pe ) goto _test_eof126; case 126: if ( (*p) == 117 ) goto st127; goto st0; st127: if ( ++p == pe ) goto _test_eof127; case 127: if ( (*p) == 103 ) goto st128; goto st0; st128: if ( ++p == pe ) goto _test_eof128; case 128: if ( (*p) == 105 ) goto st129; goto st0; st129: if ( ++p == pe ) goto _test_eof129; case 129: if ( (*p) == 110 ) goto st130; goto st0; st130: if ( ++p == pe ) goto _test_eof130; case 130: if ( (*p) == 115 ) goto st131; goto st0; st131: if ( ++p == pe ) goto _test_eof131; case 131: switch( (*p) ) { case 10: goto tr164; case 13: goto tr165; } goto st0; st132: if ( ++p == pe ) goto _test_eof132; case 132: switch( (*p) ) { case 108: goto st133; case 116: goto st136; } goto st0; st133: if ( ++p == pe ) goto _test_eof133; case 133: switch( (*p) ) { case 10: goto tr168; case 13: goto tr169; case 97: goto st134; } goto st0; st134: if ( ++p == pe ) goto _test_eof134; case 134: switch( (*p) ) { case 10: goto tr168; case 13: goto tr169; case 98: goto st135; } goto st0; st135: if ( ++p == pe ) goto _test_eof135; case 135: switch( (*p) ) { case 10: goto tr168; case 13: goto tr169; } goto st0; st136: if ( ++p == pe ) goto _test_eof136; case 136: switch( (*p) ) { case 10: goto tr172; case 13: goto tr173; case 97: goto st137; } goto st0; st137: if ( ++p == pe ) goto _test_eof137; case 137: switch( (*p) ) { case 10: goto tr172; case 13: goto tr173; case 116: goto st138; } goto st0; st138: if ( ++p == pe ) goto _test_eof138; case 138: switch( (*p) ) { case 10: goto tr172; case 13: goto tr173; } goto st0; st139: if ( ++p == pe ) goto _test_eof139; case 139: switch( (*p) ) { case 32: goto st89; case 119: goto st140; } goto st0; st140: if ( ++p == pe ) goto _test_eof140; case 140: if ( (*p) == 32 ) goto st89; goto st0; } _test_eof2: cs = 2; goto _test_eof; _test_eof3: cs = 3; goto _test_eof; _test_eof4: cs = 4; goto _test_eof; _test_eof5: cs = 5; goto _test_eof; _test_eof6: cs = 6; goto _test_eof; _test_eof141: cs = 141; goto _test_eof; _test_eof7: cs = 7; goto _test_eof; _test_eof8: cs = 8; goto _test_eof; _test_eof9: cs = 9; goto _test_eof; _test_eof10: cs = 10; goto _test_eof; _test_eof11: cs = 11; goto _test_eof; _test_eof12: cs = 12; goto _test_eof; _test_eof13: cs = 13; goto _test_eof; _test_eof14: cs = 14; goto _test_eof; _test_eof15: cs = 15; goto _test_eof; _test_eof16: cs = 16; goto _test_eof; _test_eof17: cs = 17; goto _test_eof; _test_eof18: cs = 18; goto _test_eof; _test_eof19: cs = 19; goto _test_eof; _test_eof20: cs = 20; goto _test_eof; _test_eof21: cs = 21; goto _test_eof; _test_eof22: cs = 22; goto _test_eof; _test_eof23: cs = 23; goto _test_eof; _test_eof24: cs = 24; goto _test_eof; _test_eof25: cs = 25; goto _test_eof; _test_eof26: cs = 26; goto _test_eof; _test_eof27: cs = 27; goto _test_eof; _test_eof28: cs = 28; goto _test_eof; _test_eof29: cs = 29; goto _test_eof; _test_eof30: cs = 30; goto _test_eof; _test_eof31: cs = 31; goto _test_eof; _test_eof32: cs = 32; goto _test_eof; _test_eof33: cs = 33; goto _test_eof; _test_eof34: cs = 34; goto _test_eof; _test_eof35: cs = 35; goto _test_eof; _test_eof36: cs = 36; goto _test_eof; _test_eof37: cs = 37; goto _test_eof; _test_eof38: cs = 38; goto _test_eof; _test_eof39: cs = 39; goto _test_eof; _test_eof40: cs = 40; goto _test_eof; _test_eof41: cs = 41; goto _test_eof; _test_eof42: cs = 42; goto _test_eof; _test_eof43: cs = 43; goto _test_eof; _test_eof44: cs = 44; goto _test_eof; _test_eof45: cs = 45; goto _test_eof; _test_eof46: cs = 46; goto _test_eof; _test_eof47: cs = 47; goto _test_eof; _test_eof48: cs = 48; goto _test_eof; _test_eof49: cs = 49; goto _test_eof; _test_eof50: cs = 50; goto _test_eof; _test_eof51: cs = 51; goto _test_eof; _test_eof52: cs = 52; goto _test_eof; _test_eof53: cs = 53; goto _test_eof; _test_eof54: cs = 54; goto _test_eof; _test_eof55: cs = 55; goto _test_eof; _test_eof56: cs = 56; goto _test_eof; _test_eof57: cs = 57; goto _test_eof; _test_eof58: cs = 58; goto _test_eof; _test_eof59: cs = 59; goto _test_eof; _test_eof60: cs = 60; goto _test_eof; _test_eof61: cs = 61; goto _test_eof; _test_eof62: cs = 62; goto _test_eof; _test_eof63: cs = 63; goto _test_eof; _test_eof64: cs = 64; goto _test_eof; _test_eof65: cs = 65; goto _test_eof; _test_eof66: cs = 66; goto _test_eof; _test_eof67: cs = 67; goto _test_eof; _test_eof68: cs = 68; goto _test_eof; _test_eof69: cs = 69; goto _test_eof; _test_eof70: cs = 70; goto _test_eof; _test_eof71: cs = 71; goto _test_eof; _test_eof72: cs = 72; goto _test_eof; _test_eof73: cs = 73; goto _test_eof; _test_eof74: cs = 74; goto _test_eof; _test_eof75: cs = 75; goto _test_eof; _test_eof76: cs = 76; goto _test_eof; _test_eof77: cs = 77; goto _test_eof; _test_eof78: cs = 78; goto _test_eof; _test_eof79: cs = 79; goto _test_eof; _test_eof80: cs = 80; goto _test_eof; _test_eof81: cs = 81; goto _test_eof; _test_eof82: cs = 82; goto _test_eof; _test_eof83: cs = 83; goto _test_eof; _test_eof84: cs = 84; goto _test_eof; _test_eof85: cs = 85; goto _test_eof; _test_eof86: cs = 86; goto _test_eof; _test_eof87: cs = 87; goto _test_eof; _test_eof88: cs = 88; goto _test_eof; _test_eof89: cs = 89; goto _test_eof; _test_eof90: cs = 90; goto _test_eof; _test_eof91: cs = 91; goto _test_eof; _test_eof92: cs = 92; goto _test_eof; _test_eof93: cs = 93; goto _test_eof; _test_eof94: cs = 94; goto _test_eof; _test_eof95: cs = 95; goto _test_eof; _test_eof96: cs = 96; goto _test_eof; _test_eof97: cs = 97; goto _test_eof; _test_eof98: cs = 98; goto _test_eof; _test_eof99: cs = 99; goto _test_eof; _test_eof100: cs = 100; goto _test_eof; _test_eof101: cs = 101; goto _test_eof; _test_eof102: cs = 102; goto _test_eof; _test_eof103: cs = 103; goto _test_eof; _test_eof104: cs = 104; goto _test_eof; _test_eof105: cs = 105; goto _test_eof; _test_eof106: cs = 106; goto _test_eof; _test_eof107: cs = 107; goto _test_eof; _test_eof108: cs = 108; goto _test_eof; _test_eof109: cs = 109; goto _test_eof; _test_eof110: cs = 110; goto _test_eof; _test_eof111: cs = 111; goto _test_eof; _test_eof112: cs = 112; goto _test_eof; _test_eof113: cs = 113; goto _test_eof; _test_eof114: cs = 114; goto _test_eof; _test_eof115: cs = 115; goto _test_eof; _test_eof116: cs = 116; goto _test_eof; _test_eof117: cs = 117; goto _test_eof; _test_eof118: cs = 118; goto _test_eof; _test_eof119: cs = 119; goto _test_eof; _test_eof120: cs = 120; goto _test_eof; _test_eof121: cs = 121; goto _test_eof; _test_eof122: cs = 122; goto _test_eof; _test_eof123: cs = 123; goto _test_eof; _test_eof124: cs = 124; goto _test_eof; _test_eof125: cs = 125; goto _test_eof; _test_eof126: cs = 126; goto _test_eof; _test_eof127: cs = 127; goto _test_eof; _test_eof128: cs = 128; goto _test_eof; _test_eof129: cs = 129; goto _test_eof; _test_eof130: cs = 130; goto _test_eof; _test_eof131: cs = 131; goto _test_eof; _test_eof132: cs = 132; goto _test_eof; _test_eof133: cs = 133; goto _test_eof; _test_eof134: cs = 134; goto _test_eof; _test_eof135: cs = 135; goto _test_eof; _test_eof136: cs = 136; goto _test_eof; _test_eof137: cs = 137; goto _test_eof; _test_eof138: cs = 138; goto _test_eof; _test_eof139: cs = 139; goto _test_eof; _test_eof140: cs = 140; goto _test_eof; _test_eof: {} _out: {} } #line 328 "src/admin.rl" in->pos = pe; if (p != pe) { start(out); tbuf_append(out, unknown_command, strlen(unknown_command)); end(out); } coio_write(coio, out->data, out->size); return 0; } static void admin_handler(va_list ap) { struct ev_io coio = va_arg(ap, struct ev_io); struct sockaddr_in *addr = va_arg(ap, struct sockaddr_in *); struct iobuf *iobuf = va_arg(ap, struct iobuf *); lua_State *L = lua_newthread(tarantool_L); int coro_ref = luaL_ref(tarantool_L, LUA_REGISTRYINDEX); auto scoped_guard = make_scoped_guard([&] { luaL_unref(tarantool_L, LUA_REGISTRYINDEX, coro_ref); evio_close(&coio); iobuf_delete(iobuf); session_destroy(fiber->sid); }); /* * Admin and iproto connections must have a * session object, representing the state of * a remote client: it's used in Lua * stored procedures. */ session_create(coio.fd, *(uint64_t *) addr); for (;;) { if (admin_dispatch(&coio, iobuf, L) < 0) return; iobuf_gc(iobuf); fiber_gc(); } } void admin_init(const char *bind_ipaddr, int admin_port) { static struct coio_service admin; coio_service_init(&admin, "admin", bind_ipaddr, admin_port, admin_handler, NULL); evio_service_start(&admin.evio_service); } /* * Local Variables: * mode: c * End: * vim: syntax=objc */ tarantool-1.5.1.218.g1a69fd6/src/admin.rl0000664000000000000000000002332512231715276016211 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include "lua/init.h" #include #include #include "tarantool/util.h" #include #include "coio_buf.h" extern "C" { #include #include #include } #include "box/box.h" #include "lua/init.h" #include "session.h" #include "scoped_guard.h" static const char *help = "available commands:" CRLF " - help" CRLF " - exit" CRLF " - show info" CRLF " - show fiber" CRLF " - show configuration" CRLF " - show slab" CRLF " - show palloc" CRLF " - show stat" CRLF " - show plugins" CRLF " - save coredump" CRLF " - save snapshot" CRLF " - lua command" CRLF " - reload configuration" CRLF " - show injections (debug mode only)" CRLF " - set injection (debug mode only)" CRLF; static const char *unknown_command = "unknown command. try typing help." CRLF; %%{ machine admin; write data; }%% struct salloc_stat_admin_cb_ctx { int64_t total_used; struct tbuf *out; }; static int salloc_stat_admin_cb(const struct slab_cache_stats *cstat, void *cb_ctx) { struct salloc_stat_admin_cb_ctx *ctx = (struct salloc_stat_admin_cb_ctx *) cb_ctx; tbuf_printf(ctx->out, " - { item_size: %- 5i, slabs: %- 3i, items: %- 11" PRIi64 ", bytes_used: %- 12" PRIi64 ", bytes_free: %- 12" PRIi64 " }" CRLF, (int)cstat->item_size, (int)cstat->slabs, cstat->items, cstat->bytes_used, cstat->bytes_free); ctx->total_used += cstat->bytes_used; return 0; } static void show_slab(struct tbuf *out) { struct salloc_stat_admin_cb_ctx cb_ctx; struct slab_arena_stats astat; cb_ctx.total_used = 0; cb_ctx.out = out; tbuf_printf(out, "slab statistics:\n classes:" CRLF); salloc_stat(salloc_stat_admin_cb, &astat, &cb_ctx); tbuf_printf(out, " items_used: %.2f%%" CRLF, (double)cb_ctx.total_used / astat.size * 100); tbuf_printf(out, " arena_used: %.2f%%" CRLF, (double)astat.used / astat.size * 100); } static void end(struct tbuf *out) { tbuf_printf(out, "..." CRLF); } static void start(struct tbuf *out) { tbuf_printf(out, "---" CRLF); } static void ok(struct tbuf *out) { start(out); tbuf_printf(out, "ok" CRLF); end(out); } static void fail(struct tbuf *out, struct tbuf *err) { start(out); tbuf_printf(out, "fail:%.*s" CRLF, err->size, (char *)err->data); end(out); } static void tarantool_info(struct tbuf *out) { tbuf_printf(out, "info:" CRLF); tbuf_printf(out, " version: \"%s\"" CRLF, tarantool_version()); tbuf_printf(out, " uptime: %i" CRLF, (int)tarantool_uptime()); tbuf_printf(out, " pid: %i" CRLF, getpid()); tbuf_printf(out, " logger_pid: %i" CRLF, logger_pid); tbuf_printf(out, " snapshot_pid: %i" CRLF, snapshot_pid); tbuf_printf(out, " lsn: %" PRIi64 CRLF, recovery_state->confirmed_lsn); tbuf_printf(out, " recovery_lag: %.3f" CRLF, recovery_state->remote ? recovery_state->remote->recovery_lag : 0); tbuf_printf(out, " recovery_last_update: %.3f" CRLF, recovery_state->remote ? recovery_state->remote->recovery_last_update_tstamp :0); box_info(out); const char *path = cfg_filename_fullpath; if (path == NULL) path = cfg_filename; tbuf_printf(out, " config: \"%s\"" CRLF, path); } static int show_stat_item(const char *name, int rps, int64_t total, void *ctx) { struct tbuf *buf = (struct tbuf *) ctx; int name_len = strlen(name); tbuf_printf(buf, " %s:%*s{ rps: %- 6i, total: %- 12" PRIi64 " }" CRLF, name, 1 + stat_max_name_len - name_len, " ", rps, total); return 0; } void show_stat(struct tbuf *buf) { tbuf_printf(buf, "statistics:" CRLF); stat_foreach(show_stat_item, buf); } static int admin_dispatch(struct ev_io *coio, struct iobuf *iobuf, lua_State *L) { struct ibuf *in = &iobuf->in; struct tbuf *out = tbuf_new(fiber->gc_pool); struct tbuf *err = tbuf_new(fiber->gc_pool); int cs; char *p, *pe; char *strstart, *strend; bool state; while ((pe = (char *) memchr(in->pos, '\n', in->end - in->pos)) == NULL) { if (coio_bread(coio, in, 1) <= 0) return -1; } pe++; p = in->pos; %%{ action show_plugins { start(out); show_plugins_stat(out); end(out); } action show_configuration { start(out); show_cfg(out); end(out); } action show_injections { start(out); errinj_info(out); end(out); } action help { start(out); tbuf_append(out, help, strlen(help)); end(out); } action lua { strstart[strend-strstart]='\0'; start(out); tarantool_lua(L, out, strstart); end(out); } action reload_configuration { if (reload_cfg(err)) fail(out, err); else ok(out); } action save_snapshot { int ret = snapshot(); if (ret == 0) ok(out); else { tbuf_printf(err, " can't save snapshot, errno %d (%s)", ret, strerror(ret)); fail(out, err); } } action set_injection { strstart[strend-strstart] = '\0'; if (errinj_set_byname(strstart, state)) { tbuf_printf(err, "can't find error injection '%s'", strstart); fail(out, err); } else { ok(out); } } eol = "\n" | "\r\n"; show = "sh"("o"("w")?)?; info = "in"("f"("o")?)?; check = "ch"("e"("c"("k")?)?)?; configuration = "co"("n"("f"("i"("g"("u"("r"("a"("t"("i"("o"("n")?)?)?)?)?)?)?)?)?)?)?; fiber = "fi"("b"("e"("r")?)?)?; slab = "sl"("a"("b")?)?; mod = "mo"("d")?; palloc = "pa"("l"("l"("o"("c")?)?)?)?; stat = "st"("a"("t")?)?; plugins = "plugins"; help = "h"("e"("l"("p")?)?)?; exit = "e"("x"("i"("t")?)?)? | "q"("u"("i"("t")?)?)?; save = "sa"("v"("e")?)?; coredump = "co"("r"("e"("d"("u"("m"("p")?)?)?)?)?)?; snapshot = "sn"("a"("p"("s"("h"("o"("t")?)?)?)?)?)?; string = [^\r\n]+ >{strstart = p;} %{strend = p;}; reload = "re"("l"("o"("a"("d")?)?)?)?; lua = "lu"("a")?; set = "se"("t")?; injection = "in"("j"("e"("c"("t"("i"("o"("n")?)?)?)?)?)?)?; injections = injection"s"; namech = alnum | punct; name = namech+ >{ strstart = p; } %{ strend = p; }; state_on = "on" %{ state = true; }; state_off = "of"("f")? %{ state = false; }; state = state_on | state_off; commands = (help %help | exit %{return -1;} | lua " "+ string %lua | show " "+ info %{start(out); tarantool_info(out); end(out);} | show " "+ fiber %{start(out); fiber_info(out); end(out);} | show " "+ configuration %show_configuration | show " "+ slab %{start(out); show_slab(out); end(out);} | show " "+ palloc %{start(out); palloc_stat(out); end(out);} | show " "+ stat %{start(out); show_stat(out);end(out);} | show " "+ injections %show_injections | show " "+ plugins %show_plugins | set " "+ injection " "+ name " "+ state %set_injection | save " "+ coredump %{coredump(60); ok(out);} | save " "+ snapshot %save_snapshot | check " "+ slab %{slab_validate(); ok(out);} | reload " "+ configuration %reload_configuration); main := commands eol; write init; write exec; }%% in->pos = pe; if (p != pe) { start(out); tbuf_append(out, unknown_command, strlen(unknown_command)); end(out); } coio_write(coio, out->data, out->size); return 0; } static void admin_handler(va_list ap) { struct ev_io coio = va_arg(ap, struct ev_io); struct sockaddr_in *addr = va_arg(ap, struct sockaddr_in *); struct iobuf *iobuf = va_arg(ap, struct iobuf *); lua_State *L = lua_newthread(tarantool_L); int coro_ref = luaL_ref(tarantool_L, LUA_REGISTRYINDEX); auto scoped_guard = make_scoped_guard([&] { luaL_unref(tarantool_L, LUA_REGISTRYINDEX, coro_ref); evio_close(&coio); iobuf_delete(iobuf); session_destroy(fiber->sid); }); /* * Admin and iproto connections must have a * session object, representing the state of * a remote client: it's used in Lua * stored procedures. */ session_create(coio.fd, *(uint64_t *) addr); for (;;) { if (admin_dispatch(&coio, iobuf, L) < 0) return; iobuf_gc(iobuf); fiber_gc(); } } void admin_init(const char *bind_ipaddr, int admin_port) { static struct coio_service admin; coio_service_init(&admin, "admin", bind_ipaddr, admin_port, admin_handler, NULL); evio_service_start(&admin.evio_service); } /* * Local Variables: * mode: c * End: * vim: syntax=objc */ tarantool-1.5.1.218.g1a69fd6/src/fiber.cc0000664000000000000000000003103712231715257016156 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "fiber.h" #include #include #include #include #include #include "tarantool.h" extern "C" { #include #include } /* extern "C" */ #include #include #include #include "iobuf.h" #include enum { FIBER_CALL_STACK = 16 }; static struct fiber sched; __thread struct fiber *fiber = &sched; static __thread struct fiber *call_stack[FIBER_CALL_STACK]; static __thread struct fiber **sp; static __thread uint32_t last_used_fid; static __thread struct mh_i32ptr_t *fiber_registry; static __thread struct rlist fibers, zombie_fibers, ready_fibers; static __thread ev_async ready_async; static void update_last_stack_frame(struct fiber *fiber) { #ifdef ENABLE_BACKTRACE fiber->last_stack_frame = __builtin_frame_address(0); #else (void)fiber; #endif /* ENABLE_BACKTRACE */ } void fiber_call(struct fiber *callee, ...) { struct fiber *caller = fiber; assert(sp + 1 - call_stack < FIBER_CALL_STACK); assert(caller); fiber = callee; *sp++ = caller; update_last_stack_frame(caller); callee->csw++; fiber->flags &= ~FIBER_READY; va_start(fiber->f_data, callee); coro_transfer(&caller->coro.ctx, &callee->coro.ctx); va_end(fiber->f_data); } void fiber_checkstack() { if (sp + 1 - call_stack >= FIBER_CALL_STACK) tnt_raise(ClientError, ER_FIBER_STACK); } /** Interrupt a synchronous wait of a fiber inside the event loop. * We do so by keeping an "async" event in every fiber, solely * for this purpose, and raising this event here. */ void fiber_wakeup(struct fiber *f) { if (f->flags & FIBER_READY) return; f->flags |= FIBER_READY; if (rlist_empty(&ready_fibers)) ev_async_send(&ready_async); rlist_move_tail_entry(&ready_fibers, f, state); } /** Cancel the subject fiber. * * Note: this is not guaranteed to succeed, and requires a level * of cooperation on behalf of the fiber. A fiber may opt to set * FIBER_CANCELLABLE to false, and never test that it was * cancelled. Such fiber can not ever be cancelled, and * for such fiber this call will lead to an infinite wait. * However, fiber_testcancel() is embedded to the rest of fiber_* * API (@sa fiber_yield()), which makes most of the fibers that opt in, * cancellable. * * Currently cancellation can only be synchronous: this call * returns only when the subject fiber has terminated. * * The fiber which is cancelled, has FiberCancelException raised * in it. For cancellation to work, this exception type should be * re-raised whenever (if) it is caught. */ void fiber_cancel(struct fiber *f) { assert(f->fid != 0); assert(!(f->flags & FIBER_CANCEL)); f->flags |= FIBER_CANCEL; if (f == fiber) { fiber_testcancel(); return; } /* * The subject fiber is passing through a wait * point and can be kicked out of it right away. */ if (f->flags & FIBER_CANCELLABLE) fiber_call(f); if (f->fid) { /* * The fiber is not dead. We have no other * choice but wait for it to discover that * it has been cancelled, and die. */ assert(f->waiter == NULL); f->waiter = fiber; fiber_yield(); } /* * Here we can't even check f->fid is 0 since * f could have already been reused. Knowing * at least that we can't get scheduled ourselves * unless asynchronously woken up is somewhat a relief. */ fiber_testcancel(); /* Check if we're ourselves cancelled. */ } bool fiber_is_cancelled() { return fiber->flags & FIBER_CANCEL; } /** Test if this fiber is in a cancellable state and was indeed * cancelled, and raise an exception (FiberCancelException) if * that's the case. */ void fiber_testcancel(void) { if (fiber_is_cancelled()) tnt_raise(FiberCancelException); } /** Change the current cancellation state of a fiber. This is not * a cancellation point. */ bool fiber_setcancellable(bool enable) { bool prev = fiber->flags & FIBER_CANCELLABLE; if (enable == true) fiber->flags |= FIBER_CANCELLABLE; else fiber->flags &= ~FIBER_CANCELLABLE; return prev; } /** * @note: this is not a cancellation point (@sa fiber_testcancel()) * but it is considered good practice to call testcancel() * after each yield. */ void fiber_yield(void) { struct fiber *callee = *(--sp); struct fiber *caller = fiber; fiber = callee; update_last_stack_frame(caller); callee->csw++; coro_transfer(&caller->coro.ctx, &callee->coro.ctx); } struct fiber_watcher_data { struct fiber *f; bool timed_out; }; static void fiber_schedule_timeout(ev_timer *watcher, int revents) { (void) revents; assert(fiber == &sched); struct fiber_watcher_data *state = (struct fiber_watcher_data *) watcher->data; state->timed_out = true; fiber_call(state->f); } /** * @brief yield & check timeout * @return true if timeout exceeded */ bool fiber_yield_timeout(ev_tstamp delay) { struct ev_timer timer; ev_timer_init(&timer, fiber_schedule_timeout, delay, 0); struct fiber_watcher_data state = { fiber, false }; timer.data = &state; ev_timer_start(&timer); fiber_yield(); ev_timer_stop(&timer); return state.timed_out; } void fiber_yield_to(struct fiber *f) { fiber_wakeup(f); fiber_yield(); fiber_testcancel(); } /** * @note: this is a cancellation point (@sa fiber_testcancel()) */ void fiber_sleep(ev_tstamp delay) { fiber_yield_timeout(delay); fiber_testcancel(); } /** Wait for a forked child to complete. * @note: this is a cancellation point (@sa fiber_testcancel()). * @return process return status */ void fiber_schedule_child(ev_child *watcher, int event __attribute__((unused))) { return fiber_schedule((ev_watcher *) watcher, event); } int wait_for_child(pid_t pid) { ev_child cw; ev_init(&cw, fiber_schedule_child); ev_child_set(&cw, pid, 0); cw.data = fiber; ev_child_start(&cw); fiber_yield(); ev_child_stop(&cw); int status = cw.rstatus; fiber_testcancel(); return status; } void fiber_schedule(ev_watcher *watcher, int event __attribute__((unused))) { assert(fiber == &sched); fiber_call((struct fiber *) watcher->data); } static void fiber_ready_async(ev_async *watcher, int revents) { (void) watcher; (void) revents; while(!rlist_empty(&ready_fibers)) { struct fiber *f = rlist_first_entry(&ready_fibers, struct fiber, state); rlist_del_entry(f, state); fiber_call(f); } } struct fiber * fiber_find(uint32_t fid) { struct mh_i32ptr_node_t node = { fid, NULL }; mh_int_t k = mh_i32ptr_get(fiber_registry, &node, NULL); if (k == mh_end(fiber_registry)) return NULL; return (struct fiber *) mh_i32ptr_node(fiber_registry, k)->val; } static void register_fid(struct fiber *fiber) { struct mh_i32ptr_node_t node = { fiber->fid, fiber }; mh_i32ptr_put(fiber_registry, &node, NULL, NULL); } static void unregister_fid(struct fiber *fiber) { struct mh_i32ptr_node_t node = { fiber->fid, NULL }; mh_i32ptr_remove(fiber_registry, &node, NULL); } void fiber_gc(void) { if (palloc_allocated(fiber->gc_pool) < 128 * 1024) { palloc_reset(fiber->gc_pool); return; } prelease(fiber->gc_pool); } /** Destroy the currently active fiber and prepare it for reuse. */ static void fiber_zombificate() { if (fiber->waiter) fiber_wakeup(fiber->waiter); rlist_del(&fiber->state); fiber->waiter = NULL; fiber_set_name(fiber, "zombie"); fiber->f = NULL; unregister_fid(fiber); fiber->fid = 0; fiber->flags = 0; prelease(fiber->gc_pool); rlist_move_entry(&zombie_fibers, fiber, link); } static void fiber_loop(void *data __attribute__((unused))) { for (;;) { assert(fiber != NULL && fiber->f != NULL && fiber->fid != 0); try { fiber->f(fiber->f_data); } catch (const FiberCancelException& e) { say_info("fiber `%s' has been cancelled", fiber_name(fiber)); say_info("fiber `%s': exiting", fiber_name(fiber)); } catch (const Exception& e) { e.log(); } catch (...) { /* * This can only happen in case of a bug * server bug. */ say_error("fiber `%s': unknown exception", fiber_name(fiber)); panic("fiber `%s': exiting", fiber_name(fiber)); } fiber_zombificate(); fiber_yield(); /* give control back to scheduler */ } } /** Set fiber name. * * @param[in] name the new name of the fiber. Truncated to * FIBER_NAME_MAXLEN. */ void fiber_set_name(struct fiber *fiber, const char *name) { assert(name != NULL); palloc_set_name(fiber->gc_pool, name); } /** * Create a new fiber. * * Takes a fiber from fiber cache, if it's not empty. * Can fail only if there is not enough memory for * the fiber structure or fiber stack. * * The created fiber automatically returns itself * to the fiber cache when its "main" function * completes. */ struct fiber * fiber_new(const char *name, void (*f) (va_list)) { struct fiber *fiber = NULL; if (!rlist_empty(&zombie_fibers)) { fiber = rlist_first_entry(&zombie_fibers, struct fiber, link); rlist_move_entry(&fibers, fiber, link); } else { fiber = (struct fiber *) palloc(eter_pool, sizeof(*fiber)); memset(fiber, 0, sizeof(*fiber)); tarantool_coro_create(&fiber->coro, fiber_loop, NULL); fiber->gc_pool = palloc_create_pool(""); rlist_add_entry(&fibers, fiber, link); rlist_create(&fiber->state); } fiber->f = f; /* fids from 0 to 100 are reserved */ if (++last_used_fid < 100) last_used_fid = 100; fiber->fid = last_used_fid; fiber->sid = 0; fiber->flags = 0; fiber->waiter = NULL; fiber_set_name(fiber, name); register_fid(fiber); return fiber; } /** * Free as much memory as possible taken by the fiber. * * @note we can't release memory allocated via palloc(eter_pool, ...) * so, struct fiber and some of its members are leaked forever. */ void fiber_destroy(struct fiber *f) { if (f == fiber) /* do not destroy running fiber */ return; if (strcmp(fiber_name(f), "sched") == 0) return; rlist_del(&f->state); palloc_destroy_pool(f->gc_pool); tarantool_coro_destroy(&f->coro); } void fiber_destroy_all() { struct fiber *f; rlist_foreach_entry(f, &fibers, link) fiber_destroy(f); rlist_foreach_entry(f, &zombie_fibers, link) fiber_destroy(f); } static void fiber_info_print(struct tbuf *out, struct fiber *fiber) { void *stack_top = (char *) fiber->coro.stack + fiber->coro.stack_size; tbuf_printf(out, " - fid: %4i" CRLF, fiber->fid); tbuf_printf(out, " csw: %i" CRLF, fiber->csw); tbuf_printf(out, " name: %s" CRLF, fiber_name(fiber)); tbuf_printf(out, " stack: %p" CRLF, stack_top); #ifdef ENABLE_BACKTRACE tbuf_printf(out, " backtrace:" CRLF "%s", backtrace(fiber->last_stack_frame, fiber->coro.stack, fiber->coro.stack_size)); #endif /* ENABLE_BACKTRACE */ } void fiber_info(struct tbuf *out) { struct fiber *fiber; tbuf_printf(out, "fibers:" CRLF); rlist_foreach_entry(fiber, &fibers, link) fiber_info_print(out, fiber); rlist_foreach_entry(fiber, &zombie_fibers, link) fiber_info_print(out, fiber); } void fiber_init(void) { rlist_create(&fibers); rlist_create(&ready_fibers); rlist_create(&zombie_fibers); fiber_registry = mh_i32ptr_new(); memset(&sched, 0, sizeof(sched)); sched.fid = 1; sched.gc_pool = palloc_create_pool(""); fiber_set_name(&sched, "sched"); sp = call_stack; fiber = &sched; last_used_fid = 100; iobuf_init_readahead(cfg.readahead); ev_async_init(&ready_async, fiber_ready_async); ev_async_start(&ready_async); } void fiber_free(void) { ev_async_stop(&ready_async); /* Only clean up if initialized. */ if (fiber_registry) { fiber_destroy_all(); mh_i32ptr_delete(fiber_registry); } } tarantool-1.5.1.218.g1a69fd6/src/replica.cc0000664000000000000000000001251712231715257016510 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "recovery.h" #include #include #include #include "log_io.h" #include "fiber.h" #include "pickle.h" #include "coio_buf.h" static void remote_apply_row(struct recovery_state *r, const char *row, uint32_t rowlne); const char * remote_read_row(struct ev_io *coio, struct iobuf *iobuf, uint32_t *rowlen) { struct ibuf *in = &iobuf->in; ssize_t to_read = sizeof(struct header_v11) - ibuf_size(in); if (to_read > 0) { ibuf_reserve(in, cfg_readahead); coio_breadn(coio, in, to_read); } ssize_t request_len = header_v11(in->pos)->len + sizeof(struct header_v11); to_read = request_len - ibuf_size(in); if (to_read > 0) coio_breadn(coio, in, to_read); const char *row = in->pos; *rowlen = request_len; in->pos += request_len; return row; } static void remote_connect(struct ev_io *coio, struct sockaddr_in *remote_addr, int64_t initial_lsn, const char **err) { evio_socket(coio, AF_INET, SOCK_STREAM, IPPROTO_TCP); *err = "can't connect to master"; coio_connect(coio, remote_addr); *err = "can't write version"; coio_write(coio, &initial_lsn, sizeof(initial_lsn)); uint32_t version; *err = "can't read version"; coio_readn(coio, &version, sizeof(version)); *err = NULL; if (version != default_version) tnt_raise(IllegalParams, "remote version mismatch"); say_crit("successfully connected to master"); say_crit("starting replication from lsn: %" PRIi64, initial_lsn); } static void pull_from_remote(va_list ap) { struct recovery_state *r = va_arg(ap, struct recovery_state *); struct ev_io coio; struct iobuf *iobuf = NULL; bool warning_said = false; const int reconnect_delay = 1; coio_init(&coio); for (;;) { const char *err = NULL; try { fiber_setcancellable(true); if (! evio_is_active(&coio)) { if (iobuf == NULL) iobuf = iobuf_new(fiber_name(fiber)); remote_connect(&coio, &r->remote->addr, r->confirmed_lsn + 1, &err); warning_said = false; } err = "can't read row"; uint32_t rowlen; const char *row = remote_read_row(&coio, iobuf, &rowlen); fiber_setcancellable(false); err = NULL; r->remote->recovery_lag = ev_now() - header_v11(row)->tm; r->remote->recovery_last_update_tstamp = ev_now(); remote_apply_row(r, row, rowlen); iobuf_gc(iobuf); fiber_gc(); } catch (const FiberCancelException& e) { iobuf_delete(iobuf); evio_close(&coio); throw; } catch (const Exception& e) { e.log(); if (! warning_said) { if (err != NULL) say_info("%s", err); say_info("will retry every %i second", reconnect_delay); warning_said = true; } evio_close(&coio); fiber_sleep(reconnect_delay); } } } static void remote_apply_row(struct recovery_state *r, const char *row, uint32_t rowlen) { int64_t lsn = header_v11(row)->lsn; assert(*(uint16_t*)(row + sizeof(struct header_v11)) == XLOG); if (r->row_handler(r->row_handler_param, row, rowlen) < 0) panic("replication failure: can't apply row"); set_lsn(r, lsn); } void recovery_follow_remote(struct recovery_state *r, const char *addr) { char name[FIBER_NAME_MAXLEN]; char ip_addr[32]; int port; int rc; struct fiber *f; struct in_addr server; assert(r->remote == NULL); say_crit("initializing the replica, WAL master %s", addr); snprintf(name, sizeof(name), "replica/%s", addr); try { f = fiber_new(name, pull_from_remote); } catch (const Exception& ) { return; } rc = sscanf(addr, "%31[^:]:%i", ip_addr, &port); assert(rc == 2); (void)rc; if (inet_aton(ip_addr, &server) < 0) { say_syserror("inet_aton: %s", ip_addr); return; } static struct remote remote; memset(&remote, 0, sizeof(remote)); remote.addr.sin_family = AF_INET; memcpy(&remote.addr.sin_addr.s_addr, &server, sizeof(server)); remote.addr.sin_port = htons(port); memcpy(&remote.cookie, &remote.addr, MIN(sizeof(remote.cookie), sizeof(remote.addr))); remote.reader = f; r->remote = &remote; fiber_call(f, r); } void recovery_stop_remote(struct recovery_state *r) { say_info("shutting down the replica"); fiber_cancel(r->remote->reader); r->remote = NULL; } tarantool-1.5.1.218.g1a69fd6/src/iproto_port.cc0000664000000000000000000000454112202131537017436 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "iproto_port.h" static inline struct iproto_port * iproto_port(struct port *port) { return (struct iproto_port *) port; } static inline void iproto_port_eof(struct port *ptr) { struct iproto_port *port = iproto_port(ptr); /* found == 0 means add_tuple wasn't called at all. */ if (port->reply.found == 0) { port->reply.hdr.len = sizeof(port->reply) - sizeof(port->reply.hdr); obuf_dup(port->buf, &port->reply, sizeof(port->reply)); } else { port->reply.hdr.len = obuf_size(port->buf) - port->svp.size - sizeof(port->reply.hdr); memcpy(obuf_svp_to_ptr(port->buf, &port->svp), &port->reply, sizeof(port->reply)); } } static inline void iproto_port_add_tuple(struct port *ptr, struct tuple *tuple, uint32_t flags) { struct iproto_port *port = iproto_port(ptr); if (++port->reply.found == 1) { /* Found the first tuple, add header. */ port->svp = obuf_book(port->buf, sizeof(port->reply)); } if (flags & BOX_RETURN_TUPLE) tuple_to_obuf(tuple, port->buf); } struct port_vtab iproto_port_vtab = { iproto_port_add_tuple, iproto_port_eof, }; tarantool-1.5.1.218.g1a69fd6/test/0000775000000000000000000000000012242653271014743 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/cmake_install.cmake0000664000000000000000000000446412213333035020552 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/etc" TYPE FILE RENAME "tarantool.cfg" FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/share/tarantool_tgz.cfg") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/var/lib/tarantool" TYPE FILE FILES "/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/box/00000000000000000001.snap") ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/box/cmake_install.cmake") INCLUDE("/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) tarantool-1.5.1.218.g1a69fd6/test/wal/0000775000000000000000000000000012231715276015530 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/wal/wal_mode.test0000664000000000000000000000071012231715257020215 0ustar rootroot# encoding: tarantool exec admin "lua box.cfg.wal_mode" exec sql "insert into t0 values (1)" exec sql "insert into t0 values (2)" exec sql "insert into t0 values (3)" exec sql "select * from t0 where k0 = 1" exec sql "select * from t0 where k0 = 2" exec sql "select * from t0 where k0 = 3" exec sql "select * from t0 where k0 = 4" exec admin "save snapshot" exec admin "save snapshot" exec admin "lua box.space[0]:truncate()" exec admin "save snapshot" tarantool-1.5.1.218.g1a69fd6/test/wal/wal_mode.result0000664000000000000000000000103412231715257020554 0ustar rootrootlua box.cfg.wal_mode --- - none ... insert into t0 values (1) Insert OK, 1 row affected insert into t0 values (2) Insert OK, 1 row affected insert into t0 values (3) Insert OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1] select * from t0 where k0 = 2 Found 1 tuple: [2] select * from t0 where k0 = 3 Found 1 tuple: [3] select * from t0 where k0 = 4 No match save snapshot --- ok ... save snapshot --- fail: can't save snapshot, errno 17 (File exists) ... lua box.space[0]:truncate() --- ... save snapshot --- ok ... tarantool-1.5.1.218.g1a69fd6/test/wal/suite.ini0000664000000000000000000000040212231715257017355 0ustar rootroot[default] description = tarantool/box, wal_mode = none config = tarantool.cfg # put disabled tests here #disabled = xlog.test # disabled = lua.test # put disabled in valgrind test here #valgrind_disabled = admin_coredump.test #release_disabled = errinj.test tarantool-1.5.1.218.g1a69fd6/test/wal/oom.test0000664000000000000000000000165012231715257017224 0ustar rootroot# encoding: tarantool exec admin "lua i = 1 while true do box.insert(0, box.space[0]:len(), string.rep('test', i)) i = i + 1 end" exec admin "lua box.space[0]:len()" exec admin "lua i = 1 while true do box.insert(0, box.space[0]:len(), string.rep('test', i)) i = i + 1 end" exec admin "lua box.space[0]:len()" exec admin "lua i = 1 while true do box.insert(0, box.space[0]:len(), string.rep('test', i)) i = i + 1 end" exec admin "lua box.space[0]:len()" exec admin "lua box.space[0]:select(0, 0)" exec admin "lua box.space[0]:select(0, 5)" exec admin "lua box.space[0]:select(0, 9)" exec admin "lua box.space[0]:select(0, 11)" exec admin "lua box.space[0]:select(0, 15)" # check that iterators work exec admin "lua i = 0 for k,v in box.space[0]:pairs() do print(v) i = i + 1 if i == 50 then break end end" exec admin "lua box.space[0]:truncate()" exec admin "lua box.space[0]:insert(0, 'test')" exec admin "lua box.space[0]:truncate()" tarantool-1.5.1.218.g1a69fd6/test/wal/lua.test0000664000000000000000000000136612231715257017217 0ustar rootroot# encoding: tarantool import sys print """ # A test case for Bug#1042738 # https://bugs.launchpad.net/tarantool/+bug/1042738 # Iteration over a non-unique TREE index #""" exec admin 'lua for i=1, 1000 do box.space[1]:truncate() for j=1, 30 do box.insert(1, j, os.time(), 1) end; index = box.space[1].index[1]; count = 0; for k,v in index.next, index, nil do count = count+1; end; if count ~= 30 then print("bug at iteration ", i, ", count is ", count) end end' exec admin "lua box.space[1]:truncate()" print """ # A test case for Bug#1043858 server crash on lua stack overflow on CentOS # 5.4 #""" exec admin "lua for i = 1, 100000, 1 do box.space[1]:insert(i,i) end" exec admin "lua local t1 = {box.select(1, 1)}" exec admin "lua box.space[1]:truncate()" tarantool-1.5.1.218.g1a69fd6/test/wal/lua.result0000664000000000000000000000130512231715257017547 0ustar rootroot # A test case for Bug#1042738 # https://bugs.launchpad.net/tarantool/+bug/1042738 # Iteration over a non-unique TREE index # lua for i=1, 1000 do box.space[1]:truncate() for j=1, 30 do box.insert(1, j, os.time(), 1) end; index = box.space[1].index[1]; count = 0; for k,v in index.next, index, nil do count = count+1; end; if count ~= 30 then print("bug at iteration ", i, ", count is ", count) end end --- ... lua box.space[1]:truncate() --- ... # A test case for Bug#1043858 server crash on lua stack overflow on CentOS # 5.4 # lua for i = 1, 100000, 1 do box.space[1]:insert(i,i) end --- ... lua local t1 = {box.select(1, 1)} --- error: 'Lua error: stack overflow' ... lua box.space[1]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/wal/oom.result0000664000000000000000000001530212231715276017563 0ustar rootrootlua i = 1 while true do box.insert(0, box.space[0]:len(), string.rep('test', i)) i = i + 1 end --- error: 'Failed to allocate 19436 bytes in slab allocator for tuple' ... lua box.space[0]:len() --- - 4852 ... lua i = 1 while true do box.insert(0, box.space[0]:len(), string.rep('test', i)) i = i + 1 end --- error: 'Failed to allocate 4095 bytes in slab allocator for tuple' ... lua box.space[0]:len() --- - 5869 ... lua i = 1 while true do box.insert(0, box.space[0]:len(), string.rep('test', i)) i = i + 1 end --- error: 'Failed to allocate 2051 bytes in slab allocator for tuple' ... lua box.space[0]:len() --- - 6375 ... lua box.space[0]:select(0, 0) --- - 0: {1953719668} ... lua box.space[0]:select(0, 5) --- - 5: {'testtesttesttesttesttest'} ... lua box.space[0]:select(0, 9) --- - 9: {'testtesttesttesttesttesttesttesttesttest'} ... lua box.space[0]:select(0, 11) --- - 11: {'testtesttesttesttesttesttesttesttesttesttesttest'} ... lua box.space[0]:select(0, 15) --- - 15: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} ... lua i = 0 for k,v in box.space[0]:pairs() do print(v) i = i + 1 if i == 50 then break end end --- 0: {1953719668} 1: {8391162081565697396} 2: {'testtesttest'} 3: {'testtesttesttest'} 4: {'testtesttesttesttest'} 5: {'testtesttesttesttesttest'} 6: {'testtesttesttesttesttesttest'} 7: {'testtesttesttesttesttesttesttest'} 8: {'testtesttesttesttesttesttesttesttest'} 9: {'testtesttesttesttesttesttesttesttesttest'} 10: {'testtesttesttesttesttesttesttesttesttesttest'} 11: {'testtesttesttesttesttesttesttesttesttesttesttest'} 12: {'testtesttesttesttesttesttesttesttesttesttesttesttest'} 13: {'testtesttesttesttesttesttesttesttesttesttesttesttesttest'} 14: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 15: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 16: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 17: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 18: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 19: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 20: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 21: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 22: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 23: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 24: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 25: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 26: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 27: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 28: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 29: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 30: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 31: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 32: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 33: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 34: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 35: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 36: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 37: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 38: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 39: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 40: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 41: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 42: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 43: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 44: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 45: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 46: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 47: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 48: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} 49: {'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'} ... lua box.space[0]:truncate() --- ... lua box.space[0]:insert(0, 'test') --- - 0: {1953719668} ... lua box.space[0]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/wal/tarantool.cfg0000664000000000000000000000241212231715257020212 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). # slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # pid_file = "box.pid" # # Pipe the logs into the following process. # logger="cat - >> tarantool.log" # # Read only and read-write port. primary_port = 33013 # Read-only port. secondary_port = 33014 # The port for administrative commands. admin_port = 33015 wal_mode = none # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" # # A space used in a test case for Bug#1042738 # "Tree iterator over entire range gives a spurious error" # space[1].enabled = 1 space[1].index[0].type = "HASH" space[1].index[0].unique = 1 space[1].index[0].key_field[0].fieldno = 0 space[1].index[0].key_field[0].type = "STR" space[1].index[1].type = "TREE" space[1].index[1].unique = 0 space[1].index[1].key_field[0].fieldno = 1 space[1].index[1].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/run.sh0000775000000000000000000000042612202131537016100 0ustar rootroot#!/bin/sh /usr/bin/env python <<__EOB__ import sys if sys.hexversion < 0x02060000 or sys.hexversion >= 0x03000000: sys.stderr.write("ERROR: test harness must use python >= 2.6 but not 3.x\n") sys.exit(1) else: sys.exit(0) __EOB__ [ $? -eq 0 ] && ./test-run.py $* tarantool-1.5.1.218.g1a69fd6/test/big/0000775000000000000000000000000012242653271015504 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/big/tree_pk.result0000664000000000000000000001655412231715257020411 0ustar rootrootinsert into t2 values (1, 'tuple') Insert OK, 1 row affected save snapshot --- ok ... insert into t2 values (2, 'tuple 2') Insert OK, 1 row affected save snapshot --- ok ... insert into t2 values (3, 'tuple 3') Insert OK, 1 row affected select * from t2 where k0 = 1 Found 1 tuple: [1, 'tuple'] select * from t2 where k0 = 2 Found 1 tuple: [2, 'tuple 2'] select * from t2 where k0 = 3 Found 1 tuple: [3, 'tuple 3'] delete from t2 where k0 = 1 Delete OK, 1 row affected delete from t2 where k0 = 2 Delete OK, 1 row affected delete from t2 where k0 = 3 Delete OK, 1 row affected insert into t2 VALUES('xxxxxxx') An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected NUM' insert into t2 VALUES('') An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected NUM' insert into t2 VALUES('12') An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected NUM' insert into t3 values ('identifier', 'tuple') Insert OK, 1 row affected save snapshot --- ok ... insert into t3 values ('second', 'tuple 2') Insert OK, 1 row affected save snapshot --- ok ... call box.select_range('3', '0', '100', 'second') Found 1 tuple: ['second', 'tuple 2'] call box.select_range('3', '0', '100', 'identifier') Found 2 tuples: ['identifier', 'tuple'] ['second', 'tuple 2'] insert into t3 values ('third', 'tuple 3') Insert OK, 1 row affected select * from t3 where k0 = 'identifier' Found 1 tuple: ['identifier', 'tuple'] select * from t3 where k0 = 'second' Found 1 tuple: ['second', 'tuple 2'] select * from t3 where k0 = 'third' Found 1 tuple: ['third', 'tuple 3'] delete from t3 where k0 = 'identifier' Delete OK, 1 row affected delete from t3 where k0 = 'second' Delete OK, 1 row affected delete from t3 where k0 = 'third' Delete OK, 1 row affected insert into t2 values (1, 'tuple') Insert OK, 1 row affected insert into t3 values (1, 'tuple') Insert OK, 1 row affected insert into t3 values (2, 'tuple') Insert OK, 1 row affected lua function box.crossjoin(space0, space1, limit) space0 = tonumber(space0) space1 = tonumber(space1) limit = tonumber(limit) local result = {} for k0, v0 in box.space[space0]:pairs() do for k1, v1 in box.space[space1]:pairs() do if limit <= 0 then return unpack(result) end newtuple = {v0:unpack()} for _, v in v1:pairs() do table.insert(newtuple, v) end table.insert(result, newtuple) limit = limit - 1 end end return unpack(result) end --- ... call box.crossjoin('3', '3', '0') No match call box.crossjoin('3', '3', '5') Found 4 tuples: [1, 'tuple', 1, 'tuple'] [1, 'tuple', 2, 'tuple'] [2, 'tuple', 1, 'tuple'] [2, 'tuple', 2, 'tuple'] call box.crossjoin('3', '3', '10000') Found 4 tuples: [1, 'tuple', 1, 'tuple'] [1, 'tuple', 2, 'tuple'] [2, 'tuple', 1, 'tuple'] [2, 'tuple', 2, 'tuple'] call box.crossjoin('3', '2', '10000') Found 2 tuples: [1, 'tuple', 1, 'tuple'] [2, 'tuple', 1, 'tuple'] lua box.space[3]:truncate() --- ... insert into t2 values (200, 'select me!') Insert OK, 1 row affected select * from t2 where k0 = 200 Found 1 tuple: [200, 'select me!'] select * from t2 where k0 = 199 No match select * from t2 where k0 = 201 No match insert into t15 values ('abcd') Insert OK, 1 row affected insert into t15 values ('abcda') Insert OK, 1 row affected insert into t15 values ('abcda_') Insert OK, 1 row affected insert into t15 values ('abcdb') Insert OK, 1 row affected insert into t15 values ('abcdb_') Insert OK, 1 row affected insert into t15 values ('abcdb__') Insert OK, 1 row affected insert into t15 values ('abcdb___') Insert OK, 1 row affected insert into t15 values ('abcdc') Insert OK, 1 row affected insert into t15 values ('abcdc_') Insert OK, 1 row affected lua box.space[15].index[0]:select_range(3, 'abcdb') --- - 'abcdb': {} - 'abcdb_': {} - 'abcdb__': {} ... lua box.space[15]:truncate() --- ... lua box.space[22]:truncate() --- ... insert into t22 values (0, 0, 0, 0) Insert OK, 1 row affected insert into t22 values (1, 1, 1, 1) Insert OK, 1 row affected insert into t22 values (2, 2, 2, 2) Insert OK, 1 row affected replace into t22 values (1, 1, 1, 1) Replace OK, 1 row affected replace into t22 values (1, 10, 10, 10) Replace OK, 1 row affected replace into t22 values (1, 1, 1, 1) Replace OK, 1 row affected select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match select * from t22 WHERE k0 = 1 Found 1 tuple: [1, 1, 1, 1] select * from t22 WHERE k1 = 1 Found 1 tuple: [1, 1, 1, 1] select * from t22 WHERE k2 = 1 Found 1 tuple: [1, 1, 1, 1] select * from t22 WHERE k3 = 1 Found 1 tuple: [1, 1, 1, 1] insert into t22 values (10, 10, 10, 10) Insert OK, 1 row affected delete from t22 WHERE k0 = 10 Delete OK, 1 row affected select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match insert into t22 values (1, 10, 10, 10) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 0' select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match select * from t22 WHERE k0 = 1 Found 1 tuple: [1, 1, 1, 1] replace into t22 values (10, 10, 10, 10) An error occurred: ER_TUPLE_NOT_FOUND, 'Tuple doesn't exist in index 0' select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match insert into t22 values (10, 0, 10, 10) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 1' select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match select * from t22 WHERE k1 = 0 Found 1 tuple: [0, 0, 0, 0] replace into t22 values (2, 0, 10, 10) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 1' select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match select * from t22 WHERE k1 = 0 Found 1 tuple: [0, 0, 0, 0] insert into t22 values (10, 10, 10, 0) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 3' select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match select * from t22 WHERE k3 = 0 Found 1 tuple: [0, 0, 0, 0] replace into t22 values (2, 10, 10, 0) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 3' select * from t22 WHERE k0 = 10 No match select * from t22 WHERE k1 = 10 No match select * from t22 WHERE k2 = 10 No match select * from t22 WHERE k3 = 10 No match select * from t22 WHERE k3 = 0 Found 1 tuple: [0, 0, 0, 0] insert into t22 values (4, 4, 0, 4) Insert OK, 1 row affected insert into t22 values (5, 5, 0, 5) Insert OK, 1 row affected insert into t22 values (6, 6, 0, 6) Insert OK, 1 row affected replace into t22 values (5, 5, 0, 5) Replace OK, 1 row affected select * from t22 WHERE k2 = 0 Found 4 tuples: [0, 0, 0, 0] [4, 4, 0, 4] [5, 5, 0, 5] [6, 6, 0, 6] delete from t22 WHERE k0 = 5 Delete OK, 1 row affected select * from t22 WHERE k2 = 0 Found 3 tuples: [0, 0, 0, 0] [4, 4, 0, 4] [6, 6, 0, 6] lua box.space[22]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/big/utils.lua0000664000000000000000000000333512231715257017354 0ustar rootrootfunction space_field_types(space_no) local types = {}; for _, index in pairs(box.space[space_no].index) do for _,key_def in pairs(index.key_field) do types[key_def.fieldno] = key_def.type; end end return types; end function iterate(space_no, index_no, f1, f2, ...) local sorted = (box.space[space_no].index[index_no].type == "TREE"); local pkeys = {}; local tkeys = {}; local values = {}; local types = space_field_types(space_no); function get_field(tuple, field_no) local f = tuple[field_no] if (types[field_no] == 'NUM') then return string.format('%8d', box.unpack('i', f)); elseif (types[field_no] == 'NUM64') then return string.format('%8ld', box.unpack('l', f)); else return f end end for v in box.space[space_no].index[index_no]:iterator(...) do local pk = get_field(v, 0); local tk = '$'; for f = f1, f2-1, 1 do tk = (tk..(get_field(v, f))..'$'); end; table.insert(values, tk); if pkeys[pk] ~= nil then print('Duplicate tuple (primary key): ', pk); end if box.space[space_no].index[index_no].unique and tkeys[tk] ~= nil then print('Duplicate tuple (test key): ', tk); end; tkeys[pk] = true; tkeys[tk] = true; end; if not sorted then table.sort(values); print('sorted output'); end; for i,v in ipairs(values) do print(v) end; end function arithmetic(d, count) if not d then d = 1 end local a = 0; local i = 0; return function() if count and (i >= count) then return nil; end i = i + 1; a = a + d; return a; end end function table.shuffle(t) local n = #t while n >= 2 do local k = math.random(n) t[k], t[n] = t[n], t[k] n = n - 1 end end function table.generate(iter) local t = {}; for k in iter do table.insert(t, k); end return t; end tarantool-1.5.1.218.g1a69fd6/test/big/tree_variants.result0000664000000000000000000001566212231715257021625 0ustar rootrootinsert into t6 values (0, '00000000', '00000100', 'Joe', 'Sixpack', 'Drinks', 'Amstel', 'bar', 2000 ) Insert OK, 1 row affected insert into t6 values (1, '00000001', '00000200', 'Joe', 'Sixpack', 'Drinks', 'Heineken', 'bar', 2001 ) Insert OK, 1 row affected insert into t6 values (2, '00000002', '00000200', 'Joe', 'Sixpack', 'Drinks', 'Carlsberg', 'bar', 2002 ) Insert OK, 1 row affected insert into t6 values (3, '00000003', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Corona Extra', 'bar', 2003 ) Insert OK, 1 row affected insert into t6 values (4, '00000004', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Stella Artois', 'bar', 2004 ) Insert OK, 1 row affected insert into t6 values (5, '00000005', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005 ) Insert OK, 1 row affected insert into t6 values (6, '00000006', '00000400', 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006 ) Insert OK, 1 row affected insert into t6 values (7, '00000007', '00000400', 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007 ) Insert OK, 1 row affected insert into t6 values (8, '00000008', '00000400', 'John', 'Smoker', 'Rolls', 'A Joint', 'foo', 2008 ) Insert OK, 1 row affected insert into t6 values (9, '00000009', '00000400', 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009 ) Insert OK, 1 row affected select * from t6 where k0 = 1 Found 1 tuple: [1, '00000001', '00000200', 'Joe', 'Sixpack', 'Drinks', 'Heineken', 'bar', 2001] select * from t6 where k1 = '00000002' Found 1 tuple: [2, '00000002', '00000200', 'Joe', 'Sixpack', 'Drinks', 'Carlsberg', 'bar', 2002] select * from t6 where k2 = '00000300' Found 3 tuples: [3, '00000003', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Corona Extra', 'bar', 2003] [4, '00000004', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Stella Artois', 'bar', 2004] [5, '00000005', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005] lua box.space[6]:select(3, 'Joe', 'Sixpack') --- - 0: {3472328296227680304, 3472329395739308080, 'Joe', 'Sixpack', 'Drinks', 'Amstel', 'bar', 2000} - 1: {3544385890265608240, 3472330495250935856, 'Joe', 'Sixpack', 'Drinks', 7954882400208119112, 'bar', 2001} - 2: {3616443484303536176, 3472330495250935856, 'Joe', 'Sixpack', 'Drinks', 'Carlsberg', 'bar', 2002} - 3: {3688501078341464112, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Corona Extra', 'bar', 2003} - 4: {3760558672379392048, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Stella Artois', 'bar', 2004} - 5: {3832616266417319984, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005} ... lua box.space[6]:select(3, 'John') --- - 6: {3904673860455247920, 3472332694274191408, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} - 7: {3976731454493175856, 3472332694274191408, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007} - 8: {4048789048531103792, 3472332694274191408, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008} - 9: {4120846642569031728, 3472332694274191408, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009} ... lua box.space[6]:select(4, 'A Pipe') --- - 6: {3904673860455247920, 3472332694274191408, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} ... lua box.space[6]:select(4, 'Miller Genuine Draft', 'Drinks') --- - 5: {3832616266417319984, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005} ... select * from t6 where k5 = 2007 Found 1 tuple: [7, '00000007', '00000400', 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007] lua box.space[6]:select(6, 'Miller Genuine Draft', 'Drinks') --- - 5: {3832616266417319984, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005} ... delete from t6 where k0 = 6 Delete OK, 1 row affected delete from t6 where k0 = 7 Delete OK, 1 row affected delete from t6 where k0 = 8 Delete OK, 1 row affected delete from t6 where k0 = 9 Delete OK, 1 row affected lua box.insert(6, 6, 6ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006 ) --- - 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} ... lua box.insert(6, 7, 7ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007 ) --- - 7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007} ... lua box.insert(6, 8, 8ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Joint', 'foo', 2008 ) --- - 8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008} ... lua box.insert(6, 9, 9ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009 ) --- - 9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009} ... lua box.select(6, 1, 6ULL) --- - 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} ... lua box.select(6, 1, 6) --- - 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} ... lua box.select(6, 2, 400ULL) --- - 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} - 7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007} - 8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008} - 9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009} ... lua box.select(6, 2, 400) --- - 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} - 7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007} - 8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008} - 9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009} ... lua for k,v in box.space[6]:pairs() do print(v) end --- 0: {3472328296227680304, 3472329395739308080, 'Joe', 'Sixpack', 'Drinks', 'Amstel', 'bar', 2000} 1: {3544385890265608240, 3472330495250935856, 'Joe', 'Sixpack', 'Drinks', 7954882400208119112, 'bar', 2001} 2: {3616443484303536176, 3472330495250935856, 'Joe', 'Sixpack', 'Drinks', 'Carlsberg', 'bar', 2002} 3: {3688501078341464112, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Corona Extra', 'bar', 2003} 4: {3760558672379392048, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Stella Artois', 'bar', 2004} 5: {3832616266417319984, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005} 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006} 7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007} 8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008} 9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009} ... insert into t6 VALUES('', '00000001', '00000002', '', '', '', '', '', 0) An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected NUM' insert into t6 VALUES('xxxxxxxx', '00000001', '00000002', '', '', '', '', '', 0) An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected NUM' insert into t6 VALUES(1, '', '00000002', '', '', '', '', '', 0) An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected NUM64' insert into t6 VALUES(1, 'xxxxxxxxxxx', '00000002', '', '', '', '', '', 0) An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected NUM64' tarantool-1.5.1.218.g1a69fd6/test/big/sql.result0000664000000000000000000002405412231715257017551 0ustar rootroot# # A test case for Bug#729758 # "SELECT fails with a disjunct and small LIMIT" # https://bugs.launchpad.net/tarantool/+bug/729758 # insert into t0 values ('Doe', 'Richard') Insert OK, 1 row affected insert into t0 values ('Roe', 'Richard') Insert OK, 1 row affected insert into t0 values ('Woe', 'Richard') Insert OK, 1 row affected insert into t0 values ('Major', 'Tomas') Insert OK, 1 row affected insert into t0 values ('Kytes', 'Tomas') Insert OK, 1 row affected select * from t0 where k1='Richard' or k1='Tomas' or k1='Tomas' limit 5 Found 5 tuples: ['Doe', 'Richard'] ['Kytes', 'Tomas'] ['Major', 'Tomas'] ['Roe', 'Richard'] ['Woe', 'Richard'] # # A test case for Bug#729879 # "Zero limit is treated the same as no limit" # https://bugs.launchpad.net/tarantool/+bug/729879 # select * from t0 where k1='Richard' or k1='Tomas' limit 0 No match delete from t0 where k0='Doe' Delete OK, 1 row affected delete from t0 where k0='Roe' Delete OK, 1 row affected delete from t0 where k0='Woe' Delete OK, 1 row affected delete from t0 where k0='Major' Delete OK, 1 row affected delete from t0 where k0='Kytes' Delete OK, 1 row affected # # A test case for Bug#730593 # "Bad data if incomplete tuple" # https://bugs.launchpad.net/tarantool/+bug/730593 # Verify that if there is an index on, say, field 2, # we can't insert tuples with cardinality 1 and # get away with it. # insert into t0 values ('Britney') An error occurred: ER_ILLEGAL_PARAMS, 'Illegal parameters, tuple must have all indexed fields' select * from t0 where k1='Anything' No match insert into t0 values ('Stephanie') An error occurred: ER_ILLEGAL_PARAMS, 'Illegal parameters, tuple must have all indexed fields' select * from t0 where k1='Anything' No match insert into t0 values ('Spears', 'Britney') Insert OK, 1 row affected select * from t0 where k0='Spears' Found 1 tuple: ['Spears', 'Britney'] select * from t0 where k1='Anything' No match select * from t0 where k1='Britney' Found 1 tuple: ['Spears', 'Britney'] call box.select_range('0', '0', '100', 'Spears') Found 1 tuple: ['Spears', 'Britney'] call box.select_range('0', '1', '100', 'Britney') Found 1 tuple: ['Spears', 'Britney'] delete from t0 where k0='Spears' Delete OK, 1 row affected # # Test composite keys with trees # insert into t1 values ('key1', 'part1', 'part2') Insert OK, 1 row affected replace into t1 values ('key1', 'part1', 'part2') Replace OK, 1 row affected insert into t1 values ('key2', 'part1', 'part2_a') Insert OK, 1 row affected insert into t1 values ('key3', 'part1', 'part2_b') Insert OK, 1 row affected lua for k, v in box.space[1]:pairs() do print(v) end --- 846816619: {'part1', 'part2_a'} 863593835: {'part1', 'part2_b'} 830039403: {'part1', 'part2'} ... select * from t1 where k0='key1' Found 1 tuple: [830039403, 'part1', 'part2'] select * from t1 where k0='key2' Found 1 tuple: [846816619, 'part1', 'part2_a'] select * from t1 where k0='key3' Found 1 tuple: [863593835, 'part1', 'part2_b'] select * from t1 where k1='part1' Found 3 tuples: [830039403, 'part1', 'part2'] [846816619, 'part1', 'part2_a'] [863593835, 'part1', 'part2_b'] call box.select_range('1', '1', '100', 'part1') Found 3 tuples: [830039403, 'part1', 'part2'] [846816619, 'part1', 'part2_a'] [863593835, 'part1', 'part2_b'] call box.select_range('1', '0', '100', 'key2') Found 3 tuples: [830039403, 'part1', 'part2'] [846816619, 'part1', 'part2_a'] [863593835, 'part1', 'part2_b'] call box.select_range('1', '1', '100', 'part1', 'part2_a') Found 2 tuples: [846816619, 'part1', 'part2_a'] [863593835, 'part1', 'part2_b'] insert into t5 values ('01234567', 'part1', 'part2') Insert OK, 1 row affected insert into t5 values ('11234567', 'part1', 'part2') Insert OK, 1 row affected insert into t5 values ('21234567', 'part1', 'part2_a') Insert OK, 1 row affected insert into t5 values ('31234567', 'part1_a', 'part2') Insert OK, 1 row affected insert into t5 values ('41234567', 'part1_a', 'part2_a') Insert OK, 1 row affected lua for k, v in box.space[5]:pairs() do print(v) end --- 3978425819141910832: {'part1', 'part2'} 3978425819141910833: {'part1', 'part2'} 3978425819141910834: {'part1', 'part2_a'} 3978425819141910835: {'part1_a', 'part2'} 3978425819141910836: {'part1_a', 'part2_a'} ... select * from t5 where k0='01234567' Found 1 tuple: ['01234567', 'part1', 'part2'] select * from t5 where k0='11234567' Found 1 tuple: ['11234567', 'part1', 'part2'] select * from t5 where k0='21234567' Found 1 tuple: ['21234567', 'part1', 'part2_a'] select * from t5 where k1='part1' Found 3 tuples: ['01234567', 'part1', 'part2'] ['11234567', 'part1', 'part2'] ['21234567', 'part1', 'part2_a'] select * from t5 where k1='part1_a' Found 2 tuples: ['31234567', 'part1_a', 'part2'] ['41234567', 'part1_a', 'part2_a'] select * from t5 where k1='part_none' No match call box.select('5', '1', 'part1', 'part2') Found 2 tuples: ['01234567', 'part1', 'part2'] ['11234567', 'part1', 'part2'] insert into t7 values (1, 'hello') Insert OK, 1 row affected insert into t7 values (2, 'brave') Insert OK, 1 row affected insert into t7 values (3, 'new') Insert OK, 1 row affected insert into t7 values (4, 'world') Insert OK, 1 row affected # # Bug#929654 - secondary hash index is not built with build_indexes() # select * from t7 where k1='hello' Found 1 tuple: [1, 'hello'] select * from t7 where k1='brave' Found 1 tuple: [2, 'brave'] select * from t7 where k1='new' Found 1 tuple: [3, 'new'] select * from t7 where k1='world' Found 1 tuple: [4, 'world'] lua box.space[7]:truncate() --- ... select * from t1 where k0='key1' Found 1 tuple: [830039403, 'part1', 'part2'] select * from t1 where k0='key2' Found 1 tuple: [846816619, 'part1', 'part2_a'] select * from t1 where k0='key3' Found 1 tuple: [863593835, 'part1', 'part2_b'] select * from t1 where k1='part1' Found 3 tuples: [830039403, 'part1', 'part2'] [846816619, 'part1', 'part2_a'] [863593835, 'part1', 'part2_b'] delete from t1 where k0='key1' Delete OK, 1 row affected delete from t1 where k0='key2' Delete OK, 1 row affected delete from t1 where k0='key3' Delete OK, 1 row affected select * from t5 where k1='part1' Found 3 tuples: ['01234567', 'part1', 'part2'] ['11234567', 'part1', 'part2'] ['21234567', 'part1', 'part2_a'] select * from t5 where k1='part2' No match delete from t5 where k0='01234567' Delete OK, 1 row affected delete from t5 where k0='11234567' Delete OK, 1 row affected delete from t5 where k0='21234567' Delete OK, 1 row affected delete from t5 where k0='31234567' Delete OK, 1 row affected delete from t5 where k0='41234567' Delete OK, 1 row affected lua for k, v in box.space[5]:pairs() do print(v) end --- ... # # A test case for: http://bugs.launchpad.net/bugs/735140 # Partial REPLACE corrupts index. # insert into t4 values ('Spears', 'Britney') Insert OK, 1 row affected select * from t4 where k0='Spears' Found 1 tuple: ['Spears', 'Britney'] select * from t4 where k1='Britney' Found 1 tuple: ['Spears', 'Britney'] replace into t4 values ('Spears') An error occurred: ER_ILLEGAL_PARAMS, 'Illegal parameters, tuple must have all indexed fields' select * from t4 where k0='Spears' Found 1 tuple: ['Spears', 'Britney'] delete from t4 where k0='Spears' Delete OK, 1 row affected insert into t4 values (1, 'duplicate one') Insert OK, 1 row affected insert into t4 values (2, 'duplicate one') Insert OK, 1 row affected insert into t4 values (3, 'duplicate one') Insert OK, 1 row affected insert into t4 values (4, 'duplicate one') Insert OK, 1 row affected insert into t4 values (5, 'duplicate one') Insert OK, 1 row affected insert into t4 values (6, 'duplicate two') Insert OK, 1 row affected insert into t4 values (7, 'duplicate two') Insert OK, 1 row affected insert into t4 values (8, 'duplicate two') Insert OK, 1 row affected insert into t4 values (9, 'duplicate two') Insert OK, 1 row affected insert into t4 values (10, 'duplicate two') Insert OK, 1 row affected insert into t4 values (11, 'duplicate three') Insert OK, 1 row affected insert into t4 values (12, 'duplicate three') Insert OK, 1 row affected insert into t4 values (13, 'duplicate three') Insert OK, 1 row affected insert into t4 values (14, 'duplicate three') Insert OK, 1 row affected insert into t4 values (15, 'duplicate three') Insert OK, 1 row affected select * from t4 where k1='duplicate one' Found 5 tuples: [1, 'duplicate one'] [2, 'duplicate one'] [3, 'duplicate one'] [4, 'duplicate one'] [5, 'duplicate one'] select * from t4 where k1='duplicate two' Found 5 tuples: [10, 'duplicate two'] [6, 'duplicate two'] [7, 'duplicate two'] [8, 'duplicate two'] [9, 'duplicate two'] select * from t4 where k1='duplicate three' Found 5 tuples: [11, 'duplicate three'] [12, 'duplicate three'] [13, 'duplicate three'] [14, 'duplicate three'] [15, 'duplicate three'] delete from t4 where k0=1 Delete OK, 1 row affected delete from t4 where k0=2 Delete OK, 1 row affected delete from t4 where k0=3 Delete OK, 1 row affected delete from t4 where k0=4 Delete OK, 1 row affected delete from t4 where k0=5 Delete OK, 1 row affected delete from t4 where k0=6 Delete OK, 1 row affected delete from t4 where k0=7 Delete OK, 1 row affected delete from t4 where k0=8 Delete OK, 1 row affected delete from t4 where k0=9 Delete OK, 1 row affected delete from t4 where k0=10 Delete OK, 1 row affected delete from t4 where k0=11 Delete OK, 1 row affected delete from t4 where k0=12 Delete OK, 1 row affected delete from t4 where k0=13 Delete OK, 1 row affected delete from t4 where k0=14 Delete OK, 1 row affected delete from t4 where k0=15 Delete OK, 1 row affected insert into t4 values(1, 'Aardvark ') Insert OK, 1 row affected insert into t4 values(2, 'Bilimbi') Insert OK, 1 row affected insert into t4 values(3, 'Creature ') Insert OK, 1 row affected lua for k, v in box.space[4]:pairs() do print(v) end --- 2: {'Bilimbi'} 3: {'Creature '} 1: {'Aardvark '} ... lua box.space[4].index[0].idx:min() --- error: 'Hash index does not support min()' ... lua box.space[4].index[0].idx:max() --- error: 'Hash index does not support max()' ... lua box.space[4].index[1].idx:min() --- - 1: {'Aardvark '} ... lua box.space[4].index[1].idx:max() --- - 3: {'Creature '} ... delete from t4 where k0=1 Delete OK, 1 row affected delete from t4 where k0=2 Delete OK, 1 row affected delete from t4 where k0=3 Delete OK, 1 row affected tarantool-1.5.1.218.g1a69fd6/test/big/bitset.result0000664000000000000000000004162212231715257020244 0ustar rootrootlua dofile('utils.lua') --- ... lua dofile('bitset.lua') --- ... #-----------------------------------------------------------------------------# # BitsetIndex: insert/delete #-----------------------------------------------------------------------------# lua test_insert_delete(128) --- sorted output $ 1$ ... #-----------------------------------------------------------------------------# # BitsetIndex: ALL #-----------------------------------------------------------------------------# lua clear() --- ... lua fill(1, 128) --- ... lua dump(box.index.BITS_ALL) --- sorted output $ 1$ $ 2$ $ 3$ $ 4$ $ 5$ $ 6$ $ 7$ $ 8$ $ 9$ $ 10$ $ 11$ $ 12$ $ 13$ $ 14$ $ 15$ $ 16$ $ 17$ $ 18$ $ 19$ $ 20$ $ 21$ $ 22$ $ 23$ $ 24$ $ 25$ $ 26$ $ 27$ $ 28$ $ 29$ $ 30$ $ 31$ $ 32$ $ 33$ $ 34$ $ 35$ $ 36$ $ 37$ $ 38$ $ 39$ $ 40$ $ 41$ $ 42$ $ 43$ $ 44$ $ 45$ $ 46$ $ 47$ $ 48$ $ 49$ $ 50$ $ 51$ $ 52$ $ 53$ $ 54$ $ 55$ $ 56$ $ 57$ $ 58$ $ 59$ $ 60$ $ 61$ $ 62$ $ 63$ $ 64$ $ 65$ $ 66$ $ 67$ $ 68$ $ 69$ $ 70$ $ 71$ $ 72$ $ 73$ $ 74$ $ 75$ $ 76$ $ 77$ $ 78$ $ 79$ $ 80$ $ 81$ $ 82$ $ 83$ $ 84$ $ 85$ $ 86$ $ 87$ $ 88$ $ 89$ $ 90$ $ 91$ $ 92$ $ 93$ $ 94$ $ 95$ $ 96$ $ 97$ $ 98$ $ 99$ $ 100$ $ 101$ $ 102$ $ 103$ $ 104$ $ 105$ $ 106$ $ 107$ $ 108$ $ 109$ $ 110$ $ 111$ $ 112$ $ 113$ $ 114$ $ 115$ $ 116$ $ 117$ $ 118$ $ 119$ $ 120$ $ 121$ $ 122$ $ 123$ $ 124$ $ 125$ $ 126$ $ 127$ $ 128$ ... #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_SET (single bit) #-----------------------------------------------------------------------------# lua dump(box.index.BITS_ALL_SET, 0) --- sorted output ... lua dump(box.index.BITS_ALL_SET, 1) --- sorted output $ 1$ $ 3$ $ 5$ $ 7$ $ 9$ $ 11$ $ 13$ $ 15$ $ 17$ $ 19$ $ 21$ $ 23$ $ 25$ $ 27$ $ 29$ $ 31$ $ 33$ $ 35$ $ 37$ $ 39$ $ 41$ $ 43$ $ 45$ $ 47$ $ 49$ $ 51$ $ 53$ $ 55$ $ 57$ $ 59$ $ 61$ $ 63$ $ 65$ $ 67$ $ 69$ $ 71$ $ 73$ $ 75$ $ 77$ $ 79$ $ 81$ $ 83$ $ 85$ $ 87$ $ 89$ $ 91$ $ 93$ $ 95$ $ 97$ $ 99$ $ 101$ $ 103$ $ 105$ $ 107$ $ 109$ $ 111$ $ 113$ $ 115$ $ 117$ $ 119$ $ 121$ $ 123$ $ 125$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 2) --- sorted output $ 2$ $ 3$ $ 6$ $ 7$ $ 10$ $ 11$ $ 14$ $ 15$ $ 18$ $ 19$ $ 22$ $ 23$ $ 26$ $ 27$ $ 30$ $ 31$ $ 34$ $ 35$ $ 38$ $ 39$ $ 42$ $ 43$ $ 46$ $ 47$ $ 50$ $ 51$ $ 54$ $ 55$ $ 58$ $ 59$ $ 62$ $ 63$ $ 66$ $ 67$ $ 70$ $ 71$ $ 74$ $ 75$ $ 78$ $ 79$ $ 82$ $ 83$ $ 86$ $ 87$ $ 90$ $ 91$ $ 94$ $ 95$ $ 98$ $ 99$ $ 102$ $ 103$ $ 106$ $ 107$ $ 110$ $ 111$ $ 114$ $ 115$ $ 118$ $ 119$ $ 122$ $ 123$ $ 126$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 8) --- sorted output $ 8$ $ 9$ $ 10$ $ 11$ $ 12$ $ 13$ $ 14$ $ 15$ $ 24$ $ 25$ $ 26$ $ 27$ $ 28$ $ 29$ $ 30$ $ 31$ $ 40$ $ 41$ $ 42$ $ 43$ $ 44$ $ 45$ $ 46$ $ 47$ $ 56$ $ 57$ $ 58$ $ 59$ $ 60$ $ 61$ $ 62$ $ 63$ $ 72$ $ 73$ $ 74$ $ 75$ $ 76$ $ 77$ $ 78$ $ 79$ $ 88$ $ 89$ $ 90$ $ 91$ $ 92$ $ 93$ $ 94$ $ 95$ $ 104$ $ 105$ $ 106$ $ 107$ $ 108$ $ 109$ $ 110$ $ 111$ $ 120$ $ 121$ $ 122$ $ 123$ $ 124$ $ 125$ $ 126$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 1073741824) --- sorted output ... lua dump(box.index.BITS_ALL_SET, 2147483648) --- sorted output ... lua dump(box.index.BITS_ALL_SET, 4294967296) --- error: 'Supplied key field type does not match index type: expected u32' ... #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_SET (multiple bit) #-----------------------------------------------------------------------------# lua dump(box.index.BITS_ALL_SET, 3) --- sorted output $ 3$ $ 7$ $ 11$ $ 15$ $ 19$ $ 23$ $ 27$ $ 31$ $ 35$ $ 39$ $ 43$ $ 47$ $ 51$ $ 55$ $ 59$ $ 63$ $ 67$ $ 71$ $ 75$ $ 79$ $ 83$ $ 87$ $ 91$ $ 95$ $ 99$ $ 103$ $ 107$ $ 111$ $ 115$ $ 119$ $ 123$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 7) --- sorted output $ 7$ $ 15$ $ 23$ $ 31$ $ 39$ $ 47$ $ 55$ $ 63$ $ 71$ $ 79$ $ 87$ $ 95$ $ 103$ $ 111$ $ 119$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 31) --- sorted output $ 31$ $ 63$ $ 95$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 5) --- sorted output $ 5$ $ 7$ $ 13$ $ 15$ $ 21$ $ 23$ $ 29$ $ 31$ $ 37$ $ 39$ $ 45$ $ 47$ $ 53$ $ 55$ $ 61$ $ 63$ $ 69$ $ 71$ $ 77$ $ 79$ $ 85$ $ 87$ $ 93$ $ 95$ $ 101$ $ 103$ $ 109$ $ 111$ $ 117$ $ 119$ $ 125$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 10) --- sorted output $ 10$ $ 11$ $ 14$ $ 15$ $ 26$ $ 27$ $ 30$ $ 31$ $ 42$ $ 43$ $ 46$ $ 47$ $ 58$ $ 59$ $ 62$ $ 63$ $ 74$ $ 75$ $ 78$ $ 79$ $ 90$ $ 91$ $ 94$ $ 95$ $ 106$ $ 107$ $ 110$ $ 111$ $ 122$ $ 123$ $ 126$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 27) --- sorted output $ 27$ $ 31$ $ 59$ $ 63$ $ 91$ $ 95$ $ 123$ $ 127$ ... lua dump(box.index.BITS_ALL_SET, 341) --- sorted output ... lua dump(box.index.BITS_ALL_SET, 2147483649) --- sorted output ... lua dump(box.index.BITS_ALL_SET, 4294967295) --- sorted output ... #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_NOT_SET (single bit) #-----------------------------------------------------------------------------# lua dump(box.index.BITS_ALL_NOT_SET, 0) --- sorted output $ 1$ $ 2$ $ 3$ $ 4$ $ 5$ $ 6$ $ 7$ $ 8$ $ 9$ $ 10$ $ 11$ $ 12$ $ 13$ $ 14$ $ 15$ $ 16$ $ 17$ $ 18$ $ 19$ $ 20$ $ 21$ $ 22$ $ 23$ $ 24$ $ 25$ $ 26$ $ 27$ $ 28$ $ 29$ $ 30$ $ 31$ $ 32$ $ 33$ $ 34$ $ 35$ $ 36$ $ 37$ $ 38$ $ 39$ $ 40$ $ 41$ $ 42$ $ 43$ $ 44$ $ 45$ $ 46$ $ 47$ $ 48$ $ 49$ $ 50$ $ 51$ $ 52$ $ 53$ $ 54$ $ 55$ $ 56$ $ 57$ $ 58$ $ 59$ $ 60$ $ 61$ $ 62$ $ 63$ $ 64$ $ 65$ $ 66$ $ 67$ $ 68$ $ 69$ $ 70$ $ 71$ $ 72$ $ 73$ $ 74$ $ 75$ $ 76$ $ 77$ $ 78$ $ 79$ $ 80$ $ 81$ $ 82$ $ 83$ $ 84$ $ 85$ $ 86$ $ 87$ $ 88$ $ 89$ $ 90$ $ 91$ $ 92$ $ 93$ $ 94$ $ 95$ $ 96$ $ 97$ $ 98$ $ 99$ $ 100$ $ 101$ $ 102$ $ 103$ $ 104$ $ 105$ $ 106$ $ 107$ $ 108$ $ 109$ $ 110$ $ 111$ $ 112$ $ 113$ $ 114$ $ 115$ $ 116$ $ 117$ $ 118$ $ 119$ $ 120$ $ 121$ $ 122$ $ 123$ $ 124$ $ 125$ $ 126$ $ 127$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 2) --- sorted output $ 1$ $ 4$ $ 5$ $ 8$ $ 9$ $ 12$ $ 13$ $ 16$ $ 17$ $ 20$ $ 21$ $ 24$ $ 25$ $ 28$ $ 29$ $ 32$ $ 33$ $ 36$ $ 37$ $ 40$ $ 41$ $ 44$ $ 45$ $ 48$ $ 49$ $ 52$ $ 53$ $ 56$ $ 57$ $ 60$ $ 61$ $ 64$ $ 65$ $ 68$ $ 69$ $ 72$ $ 73$ $ 76$ $ 77$ $ 80$ $ 81$ $ 84$ $ 85$ $ 88$ $ 89$ $ 92$ $ 93$ $ 96$ $ 97$ $ 100$ $ 101$ $ 104$ $ 105$ $ 108$ $ 109$ $ 112$ $ 113$ $ 116$ $ 117$ $ 120$ $ 121$ $ 124$ $ 125$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 8) --- sorted output $ 1$ $ 2$ $ 3$ $ 4$ $ 5$ $ 6$ $ 7$ $ 16$ $ 17$ $ 18$ $ 19$ $ 20$ $ 21$ $ 22$ $ 23$ $ 32$ $ 33$ $ 34$ $ 35$ $ 36$ $ 37$ $ 38$ $ 39$ $ 48$ $ 49$ $ 50$ $ 51$ $ 52$ $ 53$ $ 54$ $ 55$ $ 64$ $ 65$ $ 66$ $ 67$ $ 68$ $ 69$ $ 70$ $ 71$ $ 80$ $ 81$ $ 82$ $ 83$ $ 84$ $ 85$ $ 86$ $ 87$ $ 96$ $ 97$ $ 98$ $ 99$ $ 100$ $ 101$ $ 102$ $ 103$ $ 112$ $ 113$ $ 114$ $ 115$ $ 116$ $ 117$ $ 118$ $ 119$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 4294967296) --- error: 'Supplied key field type does not match index type: expected u32' ... #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_NOT_SET (multiple bit) #-----------------------------------------------------------------------------# lua dump(box.index.BITS_ALL_NOT_SET, 3) --- sorted output $ 4$ $ 8$ $ 12$ $ 16$ $ 20$ $ 24$ $ 28$ $ 32$ $ 36$ $ 40$ $ 44$ $ 48$ $ 52$ $ 56$ $ 60$ $ 64$ $ 68$ $ 72$ $ 76$ $ 80$ $ 84$ $ 88$ $ 92$ $ 96$ $ 100$ $ 104$ $ 108$ $ 112$ $ 116$ $ 120$ $ 124$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 7) --- sorted output $ 8$ $ 16$ $ 24$ $ 32$ $ 40$ $ 48$ $ 56$ $ 64$ $ 72$ $ 80$ $ 88$ $ 96$ $ 104$ $ 112$ $ 120$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 10) --- sorted output $ 1$ $ 4$ $ 5$ $ 16$ $ 17$ $ 20$ $ 21$ $ 32$ $ 33$ $ 36$ $ 37$ $ 48$ $ 49$ $ 52$ $ 53$ $ 64$ $ 65$ $ 68$ $ 69$ $ 80$ $ 81$ $ 84$ $ 85$ $ 96$ $ 97$ $ 100$ $ 101$ $ 112$ $ 113$ $ 116$ $ 117$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 27) --- sorted output $ 4$ $ 32$ $ 36$ $ 64$ $ 68$ $ 96$ $ 100$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 85) --- sorted output $ 2$ $ 8$ $ 10$ $ 32$ $ 34$ $ 40$ $ 42$ $ 128$ ... lua dump(box.index.BITS_ALL_NOT_SET, 4294967295) --- sorted output ... #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ANY_SET (single bit) #-----------------------------------------------------------------------------# lua dump(box.index.BITS_ANY_SET, 0) --- sorted output ... lua dump(box.index.BITS_ANY_SET, 16) --- sorted output $ 16$ $ 17$ $ 18$ $ 19$ $ 20$ $ 21$ $ 22$ $ 23$ $ 24$ $ 25$ $ 26$ $ 27$ $ 28$ $ 29$ $ 30$ $ 31$ $ 48$ $ 49$ $ 50$ $ 51$ $ 52$ $ 53$ $ 54$ $ 55$ $ 56$ $ 57$ $ 58$ $ 59$ $ 60$ $ 61$ $ 62$ $ 63$ $ 80$ $ 81$ $ 82$ $ 83$ $ 84$ $ 85$ $ 86$ $ 87$ $ 88$ $ 89$ $ 90$ $ 91$ $ 92$ $ 93$ $ 94$ $ 95$ $ 112$ $ 113$ $ 114$ $ 115$ $ 116$ $ 117$ $ 118$ $ 119$ $ 120$ $ 121$ $ 122$ $ 123$ $ 124$ $ 125$ $ 126$ $ 127$ ... lua dump(box.index.BITS_ANY_SET, 128) --- sorted output $ 128$ ... lua dump(box.index.BITS_ANY_SET, 4294967296) --- error: 'Supplied key field type does not match index type: expected u32' ... #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ANY_SET (multiple bit) #-----------------------------------------------------------------------------# lua dump(box.index.BITS_ANY_SET, 7) --- sorted output $ 1$ $ 2$ $ 3$ $ 4$ $ 5$ $ 6$ $ 7$ $ 9$ $ 10$ $ 11$ $ 12$ $ 13$ $ 14$ $ 15$ $ 17$ $ 18$ $ 19$ $ 20$ $ 21$ $ 22$ $ 23$ $ 25$ $ 26$ $ 27$ $ 28$ $ 29$ $ 30$ $ 31$ $ 33$ $ 34$ $ 35$ $ 36$ $ 37$ $ 38$ $ 39$ $ 41$ $ 42$ $ 43$ $ 44$ $ 45$ $ 46$ $ 47$ $ 49$ $ 50$ $ 51$ $ 52$ $ 53$ $ 54$ $ 55$ $ 57$ $ 58$ $ 59$ $ 60$ $ 61$ $ 62$ $ 63$ $ 65$ $ 66$ $ 67$ $ 68$ $ 69$ $ 70$ $ 71$ $ 73$ $ 74$ $ 75$ $ 76$ $ 77$ $ 78$ $ 79$ $ 81$ $ 82$ $ 83$ $ 84$ $ 85$ $ 86$ $ 87$ $ 89$ $ 90$ $ 91$ $ 92$ $ 93$ $ 94$ $ 95$ $ 97$ $ 98$ $ 99$ $ 100$ $ 101$ $ 102$ $ 103$ $ 105$ $ 106$ $ 107$ $ 108$ $ 109$ $ 110$ $ 111$ $ 113$ $ 114$ $ 115$ $ 116$ $ 117$ $ 118$ $ 119$ $ 121$ $ 122$ $ 123$ $ 124$ $ 125$ $ 126$ $ 127$ ... lua dump(box.index.BITS_ANY_SET, 84) --- sorted output $ 4$ $ 5$ $ 6$ $ 7$ $ 12$ $ 13$ $ 14$ $ 15$ $ 16$ $ 17$ $ 18$ $ 19$ $ 20$ $ 21$ $ 22$ $ 23$ $ 24$ $ 25$ $ 26$ $ 27$ $ 28$ $ 29$ $ 30$ $ 31$ $ 36$ $ 37$ $ 38$ $ 39$ $ 44$ $ 45$ $ 46$ $ 47$ $ 48$ $ 49$ $ 50$ $ 51$ $ 52$ $ 53$ $ 54$ $ 55$ $ 56$ $ 57$ $ 58$ $ 59$ $ 60$ $ 61$ $ 62$ $ 63$ $ 64$ $ 65$ $ 66$ $ 67$ $ 68$ $ 69$ $ 70$ $ 71$ $ 72$ $ 73$ $ 74$ $ 75$ $ 76$ $ 77$ $ 78$ $ 79$ $ 80$ $ 81$ $ 82$ $ 83$ $ 84$ $ 85$ $ 86$ $ 87$ $ 88$ $ 89$ $ 90$ $ 91$ $ 92$ $ 93$ $ 94$ $ 95$ $ 96$ $ 97$ $ 98$ $ 99$ $ 100$ $ 101$ $ 102$ $ 103$ $ 104$ $ 105$ $ 106$ $ 107$ $ 108$ $ 109$ $ 110$ $ 111$ $ 112$ $ 113$ $ 114$ $ 115$ $ 116$ $ 117$ $ 118$ $ 119$ $ 120$ $ 121$ $ 122$ $ 123$ $ 124$ $ 125$ $ 126$ $ 127$ ... lua dump(box.index.BITS_ANY_SET, 113) --- sorted output $ 1$ $ 3$ $ 5$ $ 7$ $ 9$ $ 11$ $ 13$ $ 15$ $ 16$ $ 17$ $ 18$ $ 19$ $ 20$ $ 21$ $ 22$ $ 23$ $ 24$ $ 25$ $ 26$ $ 27$ $ 28$ $ 29$ $ 30$ $ 31$ $ 32$ $ 33$ $ 34$ $ 35$ $ 36$ $ 37$ $ 38$ $ 39$ $ 40$ $ 41$ $ 42$ $ 43$ $ 44$ $ 45$ $ 46$ $ 47$ $ 48$ $ 49$ $ 50$ $ 51$ $ 52$ $ 53$ $ 54$ $ 55$ $ 56$ $ 57$ $ 58$ $ 59$ $ 60$ $ 61$ $ 62$ $ 63$ $ 64$ $ 65$ $ 66$ $ 67$ $ 68$ $ 69$ $ 70$ $ 71$ $ 72$ $ 73$ $ 74$ $ 75$ $ 76$ $ 77$ $ 78$ $ 79$ $ 80$ $ 81$ $ 82$ $ 83$ $ 84$ $ 85$ $ 86$ $ 87$ $ 88$ $ 89$ $ 90$ $ 91$ $ 92$ $ 93$ $ 94$ $ 95$ $ 96$ $ 97$ $ 98$ $ 99$ $ 100$ $ 101$ $ 102$ $ 103$ $ 104$ $ 105$ $ 106$ $ 107$ $ 108$ $ 109$ $ 110$ $ 111$ $ 112$ $ 113$ $ 114$ $ 115$ $ 116$ $ 117$ $ 118$ $ 119$ $ 120$ $ 121$ $ 122$ $ 123$ $ 124$ $ 125$ $ 126$ $ 127$ ... tarantool-1.5.1.218.g1a69fd6/test/big/sql.test0000664000000000000000000001622412231715257017212 0ustar rootroot# encoding: tarantool # sql.sort = True print """# # A test case for Bug#729758 # "SELECT fails with a disjunct and small LIMIT" # https://bugs.launchpad.net/tarantool/+bug/729758 #""" exec sql "insert into t0 values ('Doe', 'Richard')" exec sql "insert into t0 values ('Roe', 'Richard')" exec sql "insert into t0 values ('Woe', 'Richard')" exec sql "insert into t0 values ('Major', 'Tomas')" exec sql "insert into t0 values ('Kytes', 'Tomas')" exec sql "select * from t0 where k1='Richard' or k1='Tomas' or k1='Tomas' limit 5" print """# # A test case for Bug#729879 # "Zero limit is treated the same as no limit" # https://bugs.launchpad.net/tarantool/+bug/729879 #""" exec sql "select * from t0 where k1='Richard' or k1='Tomas' limit 0" # Cleanup exec sql "delete from t0 where k0='Doe'" exec sql "delete from t0 where k0='Roe'" exec sql "delete from t0 where k0='Woe'" exec sql "delete from t0 where k0='Major'" exec sql "delete from t0 where k0='Kytes'" print """# # A test case for Bug#730593 # "Bad data if incomplete tuple" # https://bugs.launchpad.net/tarantool/+bug/730593 # Verify that if there is an index on, say, field 2, # we can't insert tuples with cardinality 1 and # get away with it. #""" exec sql "insert into t0 values ('Britney')" exec sql "select * from t0 where k1='Anything'" exec sql "insert into t0 values ('Stephanie')" exec sql "select * from t0 where k1='Anything'" exec sql "insert into t0 values ('Spears', 'Britney')" exec sql "select * from t0 where k0='Spears'" exec sql "select * from t0 where k1='Anything'" exec sql "select * from t0 where k1='Britney'" exec sql "call box.select_range('0', '0', '100', 'Spears')" exec sql "call box.select_range('0', '1', '100', 'Britney')" exec sql "delete from t0 where k0='Spears'" print """# # Test composite keys with trees #""" exec sql "insert into t1 values ('key1', 'part1', 'part2')" # Test a duplicate insert on unique index that once resulted in a crash (bug #926080) exec sql "replace into t1 values ('key1', 'part1', 'part2')" exec sql "insert into t1 values ('key2', 'part1', 'part2_a')" exec sql "insert into t1 values ('key3', 'part1', 'part2_b')" exec admin "lua for k, v in box.space[1]:pairs() do print(v) end" exec sql "select * from t1 where k0='key1'" exec sql "select * from t1 where k0='key2'" exec sql "select * from t1 where k0='key3'" exec sql "select * from t1 where k1='part1'" exec sql "call box.select_range('1', '1', '100', 'part1')" exec sql "call box.select_range('1', '0', '100', 'key2')" exec sql "call box.select_range('1', '1', '100', 'part1', 'part2_a')" # check non-unique multipart keys exec sql "insert into t5 values ('01234567', 'part1', 'part2')" exec sql "insert into t5 values ('11234567', 'part1', 'part2')" exec sql "insert into t5 values ('21234567', 'part1', 'part2_a')" exec sql "insert into t5 values ('31234567', 'part1_a', 'part2')" exec sql "insert into t5 values ('41234567', 'part1_a', 'part2_a')" exec admin "lua for k, v in box.space[5]:pairs() do print(v) end" exec sql "select * from t5 where k0='01234567'" exec sql "select * from t5 where k0='11234567'" exec sql "select * from t5 where k0='21234567'" exec sql "select * from t5 where k1='part1'" exec sql "select * from t5 where k1='part1_a'" exec sql "select * from t5 where k1='part_none'" exec sql "call box.select('5', '1', 'part1', 'part2')" exec sql "insert into t7 values (1, 'hello')" exec sql "insert into t7 values (2, 'brave')" exec sql "insert into t7 values (3, 'new')" exec sql "insert into t7 values (4, 'world')" # Check how build_idnexes() works server.stop() server.start() print """# # Bug#929654 - secondary hash index is not built with build_indexes() #""" exec sql "select * from t7 where k1='hello'" exec sql "select * from t7 where k1='brave'" exec sql "select * from t7 where k1='new'" exec sql "select * from t7 where k1='world'" exec admin "lua box.space[7]:truncate()" exec sql "select * from t1 where k0='key1'" exec sql "select * from t1 where k0='key2'" exec sql "select * from t1 where k0='key3'" exec sql "select * from t1 where k1='part1'" exec sql "delete from t1 where k0='key1'" exec sql "delete from t1 where k0='key2'" exec sql "delete from t1 where k0='key3'" exec sql "select * from t5 where k1='part1'" exec sql "select * from t5 where k1='part2'" # cleanup exec sql "delete from t5 where k0='01234567'" exec sql "delete from t5 where k0='11234567'" exec sql "delete from t5 where k0='21234567'" exec sql "delete from t5 where k0='31234567'" exec sql "delete from t5 where k0='41234567'" exec admin "lua for k, v in box.space[5]:pairs() do print(v) end" print """ # # A test case for: http://bugs.launchpad.net/bugs/735140 # Partial REPLACE corrupts index. # """ # clean data and restart with appropriate config exec sql "insert into t4 values ('Spears', 'Britney')" exec sql "select * from t4 where k0='Spears'" exec sql "select * from t4 where k1='Britney'" # try to insert the incoplete tuple exec sql "replace into t4 values ('Spears')" # check that nothing has been updated exec sql "select * from t4 where k0='Spears'" # cleanup exec sql "delete from t4 where k0='Spears'" # # Test retrieval of duplicates via a secondary key # exec sql "insert into t4 values (1, 'duplicate one')" exec sql "insert into t4 values (2, 'duplicate one')" exec sql "insert into t4 values (3, 'duplicate one')" exec sql "insert into t4 values (4, 'duplicate one')" exec sql "insert into t4 values (5, 'duplicate one')" exec sql "insert into t4 values (6, 'duplicate two')" exec sql "insert into t4 values (7, 'duplicate two')" exec sql "insert into t4 values (8, 'duplicate two')" exec sql "insert into t4 values (9, 'duplicate two')" exec sql "insert into t4 values (10, 'duplicate two')" exec sql "insert into t4 values (11, 'duplicate three')" exec sql "insert into t4 values (12, 'duplicate three')" exec sql "insert into t4 values (13, 'duplicate three')" exec sql "insert into t4 values (14, 'duplicate three')" exec sql "insert into t4 values (15, 'duplicate three')" exec sql "select * from t4 where k1='duplicate one'" exec sql "select * from t4 where k1='duplicate two'" exec sql "select * from t4 where k1='duplicate three'" exec sql "delete from t4 where k0=1" exec sql "delete from t4 where k0=2" exec sql "delete from t4 where k0=3" exec sql "delete from t4 where k0=4" exec sql "delete from t4 where k0=5" exec sql "delete from t4 where k0=6" exec sql "delete from t4 where k0=7" exec sql "delete from t4 where k0=8" exec sql "delete from t4 where k0=9" exec sql "delete from t4 where k0=10" exec sql "delete from t4 where k0=11" exec sql "delete from t4 where k0=12" exec sql "delete from t4 where k0=13" exec sql "delete from t4 where k0=14" exec sql "delete from t4 where k0=15" # # Check min() and max() functions # exec sql "insert into t4 values(1, 'Aardvark ')" exec sql "insert into t4 values(2, 'Bilimbi')" exec sql "insert into t4 values(3, 'Creature ')" exec admin "lua for k, v in box.space[4]:pairs() do print(v) end" exec admin "lua box.space[4].index[0].idx:min()" exec admin "lua box.space[4].index[0].idx:max()" exec admin "lua box.space[4].index[1].idx:min()" exec admin "lua box.space[4].index[1].idx:max()" exec sql "delete from t4 where k0=1" exec sql "delete from t4 where k0=2" exec sql "delete from t4 where k0=3" sql.sort = False # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/big/index_random_test.lua0000664000000000000000000000204712231715257021721 0ustar rootrootfunction index_random_test(space_no, index_no) local COUNT = 128; -- enough to resize both sptree and mhash -- clear the space box.space[space_no]:truncate(); -- randomize math.randomseed(box.time()) -- insert values into the index for k=1,COUNT,1 do box.insert(space_no, k); end -- delete some values from the index for i=1,COUNT/2,1 do local k = math.random(COUNT); local tuple = box.delete(space_no, k); if tuple ~= nil then COUNT = COUNT - 1; end end local rnd_start = math.random(4294967296) -- try to get all values from the index using index.random local tuples = {} local found = 0; while found < COUNT do local rnd = math.random(4294967296) if rnd == rnd_start then print('too many iterations'); return nil; end local tuple = box.space[space_no].index[index_no]:random(rnd) if tuple == nil then print('nil returned'); return nil; end local k = box.unpack('i', tuple[0]); if tuples[k] == nil then found = found + 1; end tuples[k] = 1 end print('all values have been found'); return true end tarantool-1.5.1.218.g1a69fd6/test/big/suite.ini0000664000000000000000000000040012231715257017331 0ustar rootroot[default] description = tarantool/box, various namespace configurations and properties config = tarantool.cfg # put disabled tests here # disabled = lua.test # put disabled in valgrind test here #valgrind_disabled = ... release_disabled = hash_errinj.test tarantool-1.5.1.218.g1a69fd6/test/big/hash.result0000664000000000000000000003604212231715257017675 0ustar rootroot #=============================================================================# # 32-bit hash tests #=============================================================================# #-----------------------------------------------------------------------------# # 32-bit hash insert fields tests #-----------------------------------------------------------------------------# # Insert valid fieds lua box.space[10]:insert(0, 'value1 v1.0', 'value2 v1.0') --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[10]:insert(1, 'value1 v1.0', 'value2 v1.0') --- - 1: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[10]:insert(2, 'value1 v1.0', 'value2 v1.0') --- - 2: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[10]:insert(3, 'value1 v1.0', 'value2 v1.0') --- - 3: {'value1 v1.0', 'value2 v1.0'} ... # Insert invalid fields lua box.space[10]:insert('invalid key', 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM' ... #-----------------------------------------------------------------------------# # 32-bit hash replace fields tests #-----------------------------------------------------------------------------# # Replace valid fieds lua box.space[10]:replace(3, 'value1 v1.31', 'value2 1.12') --- - 3: {'value1 v1.31', 'value2 1.12'} ... lua box.space[10]:replace(1, 'value1 v1.32', 'value2 1.72') --- - 1: {'value1 v1.32', 'value2 1.72'} ... lua box.space[10]:replace(2, 'value1 v1.43', 'value2 1.92') --- - 2: {'value1 v1.43', 'value2 1.92'} ... # Replace invalid fields lua box.space[10]:replace('invalid key', 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM' ... #-----------------------------------------------------------------------------# # 32-bit hash select fields test #-----------------------------------------------------------------------------# # select by valid keys lua box.space[10]:select(0, 0) --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[10]:select(0, 1) --- - 1: {'value1 v1.32', 'value2 1.72'} ... lua box.space[10]:select(0, 2) --- - 2: {'value1 v1.43', 'value2 1.92'} ... lua box.space[10]:select(0, 3) --- - 3: {'value1 v1.31', 'value2 1.12'} ... lua box.space[10]:select(0, 4) --- ... lua box.space[10]:select(0, 5) --- ... # select by invalid keys lua box.space[10]:select(0, 'invalid key') --- error: 'Supplied key field type does not match index type: expected u32' ... lua box.space[10]:select(0, 1, 2) --- error: 'Invalid key part count (expected [0..1], got 2)' ... #-----------------------------------------------------------------------------# # 32-bit hash delete fields test #-----------------------------------------------------------------------------# # delete by valid keys lua box.space[10]:delete(0) --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[10]:delete(1) --- - 1: {'value1 v1.32', 'value2 1.72'} ... lua box.space[10]:delete(2) --- - 2: {'value1 v1.43', 'value2 1.92'} ... lua box.space[10]:delete(3) --- - 3: {'value1 v1.31', 'value2 1.12'} ... lua box.space[10]:delete(4) --- ... lua box.space[10]:delete(5) --- ... # delete by invalid keys lua box.space[10]:delete('invalid key') --- error: 'Supplied key field type does not match index type: expected u32' ... lua box.space[10]:delete(1, 2) --- error: 'Invalid key part count in an exact match (expected 1, got 2)' ... #=============================================================================# # 64-bit hash tests #=============================================================================# #-----------------------------------------------------------------------------# # 64-bit hash inset fields tests #-----------------------------------------------------------------------------# # Insert valid fieds lua box.space[11]:insert(0ULL, 'value1 v1.0', 'value2 v1.0') --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:insert(1ULL, 'value1 v1.0', 'value2 v1.0') --- - 1: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:insert(2ULL, 'value1 v1.0', 'value2 v1.0') --- - 2: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:insert(3ULL, 'value1 v1.0', 'value2 v1.0') --- - 3: {'value1 v1.0', 'value2 v1.0'} ... # Insert invalid fields lua box.space[11]:insert(100, 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM64' ... lua box.space[11]:insert(101, 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM64' ... lua box.space[11]:insert(102, 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM64' ... lua box.space[11]:insert(103, 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM64' ... lua box.space[11]:insert('invalid key', 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM64' ... #-----------------------------------------------------------------------------# # 64-bit hash replace fields tests #-----------------------------------------------------------------------------# # Replace valid fieds lua box.space[11]:replace(3ULL, 'value1 v1.31', 'value2 1.12') --- - 3: {'value1 v1.31', 'value2 1.12'} ... lua box.space[11]:replace(1ULL, 'value1 v1.32', 'value2 1.72') --- - 1: {'value1 v1.32', 'value2 1.72'} ... lua box.space[11]:replace(2ULL, 'value1 v1.43', 'value2 1.92') --- - 2: {'value1 v1.43', 'value2 1.92'} ... # Replace invalid fields lua box.space[11]:replace(3, 'value1 v1.31', 'value2 1.12') --- error: 'Supplied key field type does not match index type: expected NUM64' ... lua box.space[11]:replace(1, 'value1 v1.32', 'value2 1.72') --- error: 'Supplied key field type does not match index type: expected NUM64' ... lua box.space[11]:replace(2, 'value1 v1.43', 'value2 1.92') --- error: 'Supplied key field type does not match index type: expected NUM64' ... lua box.space[11]:replace('invalid key', 'value1 v1.0', 'value2 v1.0') --- error: 'Supplied key field type does not match index type: expected NUM64' ... #-----------------------------------------------------------------------------# # 64-bit hash select fields test #-----------------------------------------------------------------------------# # select by valid keys lua box.space[11]:select(0, 0ULL) --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:select(0, 1ULL) --- - 1: {'value1 v1.32', 'value2 1.72'} ... lua box.space[11]:select(0, 2ULL) --- - 2: {'value1 v1.43', 'value2 1.92'} ... lua box.space[11]:select(0, 3ULL) --- - 3: {'value1 v1.31', 'value2 1.12'} ... lua box.space[11]:select(0, 4ULL) --- ... lua box.space[11]:select(0, 5ULL) --- ... # select by valid NUM keys lua box.space[11]:select(0, 0) --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:select(0, 1) --- - 1: {'value1 v1.32', 'value2 1.72'} ... lua box.space[11]:select(0, 2) --- - 2: {'value1 v1.43', 'value2 1.92'} ... lua box.space[11]:select(0, 3) --- - 3: {'value1 v1.31', 'value2 1.12'} ... lua box.space[11]:select(0, 4) --- ... lua box.space[11]:select(0, 5) --- ... # select by invalid keys lua box.space[11]:select(0, 'invalid key') --- error: 'Supplied key field type does not match index type: expected u64' ... lua box.space[11]:select(0, '00000001', '00000002') --- error: 'Invalid key part count (expected [0..1], got 2)' ... #-----------------------------------------------------------------------------# # 64-bit hash delete fields test #-----------------------------------------------------------------------------# # delete by valid keys lua box.space[11]:delete(0ULL) --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:delete(1ULL) --- - 1: {'value1 v1.32', 'value2 1.72'} ... lua box.space[11]:delete(2ULL) --- - 2: {'value1 v1.43', 'value2 1.92'} ... lua box.space[11]:delete(3ULL) --- - 3: {'value1 v1.31', 'value2 1.12'} ... lua box.space[11]:delete(4ULL) --- ... lua box.space[11]:delete(5ULL) --- ... lua box.space[11]:insert(0ULL, 'value1 v1.0', 'value2 v1.0') --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:insert(1ULL, 'value1 v1.0', 'value2 v1.0') --- - 1: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:insert(2ULL, 'value1 v1.0', 'value2 v1.0') --- - 2: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:insert(3ULL, 'value1 v1.0', 'value2 v1.0') --- - 3: {'value1 v1.0', 'value2 v1.0'} ... # delete by valid NUM keys lua box.space[11]:delete(0) --- - 0: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:delete(1) --- - 1: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:delete(2) --- - 2: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:delete(3) --- - 3: {'value1 v1.0', 'value2 v1.0'} ... lua box.space[11]:delete(4) --- ... lua box.space[11]:delete(5) --- ... # delete by invalid keys lua box.space[11]:delete('invalid key') --- error: 'Supplied key field type does not match index type: expected u64' ... lua box.space[11]:delete('00000001', '00000002') --- error: 'Invalid key part count in an exact match (expected 1, got 2)' ... #=============================================================================# # String hash tests #=============================================================================# #-----------------------------------------------------------------------------# # String hash inset fields tests #-----------------------------------------------------------------------------# # Insert valid fieds lua box.space[12]:insert('key 0', 'value1 v1.0', 'value2 v1.0') --- - 'key 0': {'value1 v1.0', 'value2 v1.0'} ... lua box.space[12]:insert('key 1', 'value1 v1.0', 'value2 v1.0') --- - 'key 1': {'value1 v1.0', 'value2 v1.0'} ... lua box.space[12]:insert('key 2', 'value1 v1.0', 'value2 v1.0') --- - 'key 2': {'value1 v1.0', 'value2 v1.0'} ... lua box.space[12]:insert('key 3', 'value1 v1.0', 'value2 v1.0') --- - 'key 3': {'value1 v1.0', 'value2 v1.0'} ... #-----------------------------------------------------------------------------# # String hash replace fields tests #-----------------------------------------------------------------------------# # Replace valid fieds lua box.space[12]:replace('key 3', 'value1 v1.31', 'value2 1.12') --- - 'key 3': {'value1 v1.31', 'value2 1.12'} ... lua box.space[12]:replace('key 1', 'value1 v1.32', 'value2 1.72') --- - 'key 1': {'value1 v1.32', 'value2 1.72'} ... lua box.space[12]:replace('key 2', 'value1 v1.43', 'value2 1.92') --- - 'key 2': {'value1 v1.43', 'value2 1.92'} ... #-----------------------------------------------------------------------------# # String hash select fields test #-----------------------------------------------------------------------------# # select by valid keys lua box.space[12]:select(0, 'key 0') --- - 'key 0': {'value1 v1.0', 'value2 v1.0'} ... lua box.space[12]:select(0, 'key 1') --- - 'key 1': {'value1 v1.32', 'value2 1.72'} ... lua box.space[12]:select(0, 'key 2') --- - 'key 2': {'value1 v1.43', 'value2 1.92'} ... lua box.space[12]:select(0, 'key 3') --- - 'key 3': {'value1 v1.31', 'value2 1.12'} ... lua box.space[12]:select(0, 'key 4') --- ... lua box.space[12]:select(0, 'key 5') --- ... # select by invalid keys lua box.space[12]:select(0, 'key 1', 'key 2') --- error: 'Invalid key part count (expected [0..1], got 2)' ... #-----------------------------------------------------------------------------# # String hash delete fields test #-----------------------------------------------------------------------------# # delete by valid keys lua box.space[12]:delete('key 0') --- - 'key 0': {'value1 v1.0', 'value2 v1.0'} ... lua box.space[12]:delete('key 1') --- - 'key 1': {'value1 v1.32', 'value2 1.72'} ... lua box.space[12]:delete('key 2') --- - 'key 2': {'value1 v1.43', 'value2 1.92'} ... lua box.space[12]:delete('key 3') --- - 'key 3': {'value1 v1.31', 'value2 1.12'} ... lua box.space[12]:delete('key 4') --- ... lua box.space[12]:delete('key 5') --- ... # delete by invalid keys lua box.space[12]:delete('key 1', 'key 2') --- error: 'Invalid key part count in an exact match (expected 1, got 2)' ... lua box.space[10]:truncate() --- ... lua box.space[11]:truncate() --- ... lua box.space[12]:truncate() --- ... lua box.space[21]:truncate() --- ... insert into t21 values (0, 0, 0, 0) Insert OK, 1 row affected insert into t21 values (1, 1, 1, 1) Insert OK, 1 row affected insert into t21 values (2, 2, 2, 2) Insert OK, 1 row affected replace into t21 values (1, 1, 1, 1) Replace OK, 1 row affected replace into t21 values (1, 10, 10, 10) Replace OK, 1 row affected replace into t21 values (1, 1, 1, 1) Replace OK, 1 row affected select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match select * from t21 WHERE k0 = 1 Found 1 tuple: [1, 1, 1, 1] select * from t21 WHERE k1 = 1 Found 1 tuple: [1, 1, 1, 1] select * from t21 WHERE k2 = 1 Found 1 tuple: [1, 1, 1, 1] select * from t21 WHERE k3 = 1 Found 1 tuple: [1, 1, 1, 1] insert into t21 values (10, 10, 10, 10) Insert OK, 1 row affected delete from t21 WHERE k0 = 10 Delete OK, 1 row affected select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match insert into t21 values (1, 10, 10, 10) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 0' select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match select * from t21 WHERE k0 = 1 Found 1 tuple: [1, 1, 1, 1] replace into t21 values (10, 10, 10, 10) An error occurred: ER_TUPLE_NOT_FOUND, 'Tuple doesn't exist in index 0' select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match insert into t21 values (10, 0, 10, 10) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 1' select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match select * from t21 WHERE k1 = 0 Found 1 tuple: [0, 0, 0, 0] replace into t21 values (2, 0, 10, 10) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 1' select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match select * from t21 WHERE k1 = 0 Found 1 tuple: [0, 0, 0, 0] insert into t21 values (10, 10, 10, 0) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 3' select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match select * from t21 WHERE k3 = 0 Found 1 tuple: [0, 0, 0, 0] replace into t21 values (2, 10, 10, 0) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 3' select * from t21 WHERE k0 = 10 No match select * from t21 WHERE k1 = 10 No match select * from t21 WHERE k2 = 10 No match select * from t21 WHERE k3 = 10 No match select * from t21 WHERE k3 = 0 Found 1 tuple: [0, 0, 0, 0] lua box.space[21]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/big/bitset.test0000664000000000000000000000745712231715257017715 0ustar rootroot# encoding: tarantool # import os import shutil for file in ("utils.lua", "bitset.lua"): src_path = os.path.join("big/", file) dst_path = os.path.join(vardir, file) shutil.copy(src_path, dst_path) exec admin "lua dofile('%s')" % (file) os.unlink(dst_path); print """ #-----------------------------------------------------------------------------# # BitsetIndex: insert/delete #-----------------------------------------------------------------------------# """; exec admin "lua test_insert_delete(128)" print """ #-----------------------------------------------------------------------------# # BitsetIndex: ALL #-----------------------------------------------------------------------------# """; exec admin "lua clear()" exec admin "lua fill(1, 128)" exec admin "lua dump(box.index.BITS_ALL)" print """ #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_SET (single bit) #-----------------------------------------------------------------------------# """; exec admin "lua dump(box.index.BITS_ALL_SET, 0)" exec admin "lua dump(box.index.BITS_ALL_SET, 1)" exec admin "lua dump(box.index.BITS_ALL_SET, 2)" exec admin "lua dump(box.index.BITS_ALL_SET, 8)" exec admin "lua dump(box.index.BITS_ALL_SET, 1073741824)" exec admin "lua dump(box.index.BITS_ALL_SET, 2147483648)" exec admin "lua dump(box.index.BITS_ALL_SET, 4294967296)" print """ #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_SET (multiple bit) #-----------------------------------------------------------------------------# """; exec admin "lua dump(box.index.BITS_ALL_SET, 3)" exec admin "lua dump(box.index.BITS_ALL_SET, 7)" exec admin "lua dump(box.index.BITS_ALL_SET, 31)" exec admin "lua dump(box.index.BITS_ALL_SET, 5)" exec admin "lua dump(box.index.BITS_ALL_SET, 10)" exec admin "lua dump(box.index.BITS_ALL_SET, 27)" exec admin "lua dump(box.index.BITS_ALL_SET, 341)" exec admin "lua dump(box.index.BITS_ALL_SET, 2147483649)" exec admin "lua dump(box.index.BITS_ALL_SET, 4294967295)" print """ #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_NOT_SET (single bit) #-----------------------------------------------------------------------------# """; exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 0)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 2)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 8)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 4294967296)" print """ #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ALL_NOT_SET (multiple bit) #-----------------------------------------------------------------------------# """; exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 3)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 7)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 10)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 27)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 85)" exec admin "lua dump(box.index.BITS_ALL_NOT_SET, 4294967295)" print """ #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ANY_SET (single bit) #-----------------------------------------------------------------------------# """; exec admin "lua dump(box.index.BITS_ANY_SET, 0)" exec admin "lua dump(box.index.BITS_ANY_SET, 16)" exec admin "lua dump(box.index.BITS_ANY_SET, 128)" exec admin "lua dump(box.index.BITS_ANY_SET, 4294967296)" print """ #-----------------------------------------------------------------------------# # BitsetIndex: BITS_ANY_SET (multiple bit) #-----------------------------------------------------------------------------# """; exec admin "lua dump(box.index.BITS_ANY_SET, 7)" exec admin "lua dump(box.index.BITS_ANY_SET, 84)" exec admin "lua dump(box.index.BITS_ANY_SET, 113)" tarantool-1.5.1.218.g1a69fd6/test/big/iterator.test0000664000000000000000000002135412231715257020244 0ustar rootroot# encoding: tarantool # import os import shutil iterator_lua_path = os.path.join(vardir, "utils.lua") shutil.copy("big/utils.lua", iterator_lua_path) exec admin "lua dofile('utils.lua')" shutil.rmtree(iterator_lua_path, True) exec admin "lua box.insert(20, 'pid_001', 'sid_001', 'tid_998', 'a')" exec admin "lua box.insert(20, 'pid_002', 'sid_001', 'tid_997', 'a')" exec admin "lua box.insert(20, 'pid_003', 'sid_002', 'tid_997', 'b')" exec admin "lua box.insert(20, 'pid_005', 'sid_002', 'tid_996', 'b')" exec admin "lua box.insert(20, 'pid_007', 'sid_003', 'tid_996', 'a')" exec admin "lua box.insert(20, 'pid_011', 'sid_004', 'tid_996', 'c')" exec admin "lua box.insert(20, 'pid_013', 'sid_005', 'tid_996', 'b')" exec admin "lua box.insert(20, 'pid_017', 'sid_006', 'tid_996', 'a')" exec admin "lua box.insert(20, 'pid_019', 'sid_005', 'tid_995', 'a')" exec admin "lua box.insert(20, 'pid_023', 'sid_005', 'tid_994', 'a')" print """ #-----------------------------------------------------------------------------# # Iterator: tree single-part unique #-----------------------------------------------------------------------------# """ exec admin "lua iterate(20, 0, 0, 1)" exec admin "lua iterate(20, 0, 0, 1, box.index.ALL)" exec admin "lua iterate(20, 0, 0, 1, box.index.EQ)" exec admin "lua iterate(20, 0, 0, 1, box.index.REQ)" exec admin "lua iterate(20, 0, 0, 1, box.index.GE)" exec admin "lua iterate(20, 0, 0, 1, box.index.GT)" exec admin "lua iterate(20, 0, 0, 1, box.index.LE)" exec admin "lua iterate(20, 0, 0, 1, box.index.LT)" exec admin "lua iterate(20, 0, 0, 1, box.index.EQ, 'pid_003')" exec admin "lua iterate(20, 0, 0, 1, box.index.REQ, 'pid_003')" exec admin "lua iterate(20, 0, 0, 1, box.index.EQ, 'pid_666')" exec admin "lua iterate(20, 0, 0, 1, box.index.REQ, 'pid_666')" exec admin "lua iterate(20, 0, 0, 1, box.index.GE, 'pid_001')" exec admin "lua iterate(20, 0, 0, 1, box.index.GT, 'pid_001')" exec admin "lua iterate(20, 0, 0, 1, box.index.GE, 'pid_999')" exec admin "lua iterate(20, 0, 0, 1, box.index.GT, 'pid_999')" exec admin "lua iterate(20, 0, 0, 1, box.index.LE, 'pid_002')" exec admin "lua iterate(20, 0, 0, 1, box.index.LT, 'pid_002')" exec admin "lua iterate(20, 0, 0, 1, box.index.LE, 'pid_000')" exec admin "lua iterate(20, 0, 0, 1, box.index.LT, 'pid_000')" print """ #-----------------------------------------------------------------------------# # Iterator: tree single-part non-unique #-----------------------------------------------------------------------------# """ exec admin "lua iterate(20, 1, 1, 2, box.index.ALL)" exec admin "lua iterate(20, 1, 1, 2, box.index.EQ)" exec admin "lua iterate(20, 1, 1, 2, box.index.REQ)" exec admin "lua iterate(20, 1, 1, 2, box.index.GE)" exec admin "lua iterate(20, 1, 1, 2, box.index.GT)" exec admin "lua iterate(20, 1, 1, 2, box.index.LE)" exec admin "lua iterate(20, 1, 1, 2, box.index.LT)" exec admin "lua iterate(20, 1, 1, 2, box.index.EQ, 'sid_005')" exec admin "lua iterate(20, 1, 1, 2, box.index.REQ, 'sid_005')" exec admin "lua iterate(20, 1, 1, 2, box.index.GE, 'sid_005')" exec admin "lua iterate(20, 1, 1, 2, box.index.GT, 'sid_005')" exec admin "lua iterate(20, 1, 1, 2, box.index.GE, 'sid_999')" exec admin "lua iterate(20, 1, 1, 2, box.index.GT, 'sid_999')" exec admin "lua iterate(20, 1, 1, 2, box.index.LE, 'sid_005')" exec admin "lua iterate(20, 1, 1, 2, box.index.LT, 'sid_005')" exec admin "lua iterate(20, 1, 1, 2, box.index.LE, 'sid_000')" exec admin "lua iterate(20, 1, 1, 2, box.index.LT, 'sid_000')" print """ #-----------------------------------------------------------------------------# # Iterator: tree multi-part unique #-----------------------------------------------------------------------------# """ exec admin "lua iterate(20, 2, 1, 3, box.index.ALL)" exec admin "lua iterate(20, 2, 1, 3, box.index.EQ)" exec admin "lua iterate(20, 2, 1, 3, box.index.REQ)" exec admin "lua iterate(20, 2, 1, 3, box.index.GE)" exec admin "lua iterate(20, 2, 1, 3, box.index.GT)" exec admin "lua iterate(20, 2, 1, 3, box.index.LE)" exec admin "lua iterate(20, 2, 1, 3, box.index.LT)" exec admin "lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005')" exec admin "lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_995')" exec admin "lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_999')" exec admin "lua iterate(20, 2, 1, 3, box.index.REQ, 'sid_005')" exec admin "lua iterate(20, 2, 1, 3, box.index.REQ, 'sid_005', 'tid_995')" exec admin "lua iterate(20, 2, 1, 3, box.index.REQ, 'sid_005', 'tid_999')" exec admin "lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005')" exec admin "lua iterate(20, 2, 1, 3, box.index.GT, 'sid_005')" exec admin "lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_995')" exec admin "lua iterate(20, 2, 1, 3, box.index.GT, 'sid_005', 'tid_995')" exec admin "lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_999')" exec admin "lua iterate(20, 2, 1, 3, box.index.GT, 'sid_005', 'tid_999')" exec admin "lua iterate(20, 2, 1, 3, box.index.GE, 'sid_999')" exec admin "lua iterate(20, 2, 1, 3, box.index.GT, 'sid_999')" exec admin "lua iterate(20, 2, 1, 3, box.index.LE, 'sid_005')" exec admin "lua iterate(20, 2, 1, 3, box.index.LT, 'sid_005')" exec admin "lua iterate(20, 2, 1, 3, box.index.LE, 'sid_005', 'tid_997')" exec admin "lua iterate(20, 2, 1, 3, box.index.LT, 'sid_005', 'tid_997')" exec admin "lua iterate(20, 2, 1, 3, box.index.LE, 'sid_005', 'tid_000')" exec admin "lua iterate(20, 2, 1, 3, box.index.LT, 'sid_005', 'tid_000')" exec admin "lua iterate(20, 2, 1, 3, box.index.LE, 'sid_000')" exec admin "lua iterate(20, 2, 1, 3, box.index.LT, 'sid_000')" print """ #-----------------------------------------------------------------------------# # Iterator: tree multi-part non-unique #-----------------------------------------------------------------------------# """ exec admin "lua iterate(20, 3, 2, 4, box.index.ALL)" exec admin "lua iterate(20, 3, 2, 4, box.index.EQ)" exec admin "lua iterate(20, 3, 2, 4, box.index.REQ)" exec admin "lua iterate(20, 3, 2, 4, box.index.GE)" exec admin "lua iterate(20, 3, 2, 4, box.index.GT)" exec admin "lua iterate(20, 3, 2, 4, box.index.LE)" exec admin "lua iterate(20, 3, 2, 4, box.index.LT)" exec admin "lua iterate(20, 3, 2, 4, box.index.EQ, 'tid_996')" exec admin "lua iterate(20, 3, 2, 4, box.index.EQ, 'tid_996', 'a')" exec admin "lua iterate(20, 3, 2, 4, box.index.EQ, 'tid_996', 'z')" exec admin "lua iterate(20, 3, 2, 4, box.index.REQ, 'tid_996')" exec admin "lua iterate(20, 3, 2, 4, box.index.REQ, 'tid_996', 'a')" exec admin "lua iterate(20, 3, 2, 4, box.index.REQ, 'tid_996', '0')" exec admin "lua iterate(20, 3, 2, 4, box.index.GE, 'tid_997')" exec admin "lua iterate(20, 3, 2, 4, box.index.GT, 'tid_997')" exec admin "lua iterate(20, 3, 2, 4, box.index.GE, 'tid_998')" exec admin "lua iterate(20, 3, 2, 4, box.index.GT, 'tid_998')" exec admin "lua iterate(20, 3, 2, 4, box.index.LE, 'tid_997')" exec admin "lua iterate(20, 3, 2, 4, box.index.LT, 'tid_997')" exec admin "lua iterate(20, 3, 2, 4, box.index.LE, 'tid_000')" exec admin "lua iterate(20, 3, 2, 4, box.index.LT, 'tid_000')" exec admin "lua iterate(20, 3, 2, 4, box.index.LT, 'tid_996', 'to', 'many', 'keys')" print """ #-----------------------------------------------------------------------------# # Iterator: hash single-part unique #-----------------------------------------------------------------------------# """ exec admin "lua iterate(20, 4, 0, 1)" exec admin "lua iterate(20, 4, 0, 1, box.index.ALL)" exec admin "lua iterate(20, 4, 0, 1, box.index.EQ)" exec admin "lua iterate(20, 4, 0, 1, box.index.GE)" exec admin "lua iterate(20, 4, 0, 1, box.index.EQ, 'pid_003')" exec admin "lua iterate(20, 4, 0, 1, box.index.EQ, 'pid_666')" exec admin "lua iterate(20, 4, 0, 1, box.index.GE, 'pid_001')" exec admin "lua iterate(20, 4, 0, 1, box.index.GE, 'pid_999')" print """ #-----------------------------------------------------------------------------# # Iterator: hash multi-part unique #-----------------------------------------------------------------------------# """ exec admin "lua iterate(20, 5, 1, 3, box.index.ALL)" exec admin "lua iterate(20, 5, 1, 3, box.index.EQ)" exec admin "lua iterate(20, 5, 1, 3, box.index.EQ, 'sid_005')" exec admin "lua iterate(20, 5, 1, 3, box.index.GE)" exec admin "lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_995')" exec admin "lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_999')" exec admin "lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_995', 'a')" exec admin "lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_995')" exec admin "lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_999')" print """ #-----------------------------------------------------------------------------# # Iterator: various #-----------------------------------------------------------------------------# """ exec admin "lua box.space[20].index[0]:iterator(-666)" exec admin "lua box.space[20]:truncate()" tarantool-1.5.1.218.g1a69fd6/test/big/tree_pk_multipart.result0000664000000000000000000003127212231715257022504 0ustar rootrootinsert into t9 values ('Vincent', 'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?') Insert OK, 1 row affected insert into t9 values ('Jules', 'Vincent', 0, 'They don`t call it a Quarter Pounder with cheese?') Insert OK, 1 row affected insert into t9 values ('Vincent', 'Jules', 1, 'No man, they got the metric system. They wouldn`t know what the f--k a Quarter Pounder is.') Insert OK, 1 row affected insert into t9 values ('Jules', 'Vincent', 1, 'Then what do they call it?') Insert OK, 1 row affected insert into t9 values ('Vincent', 'Jules', 2, 'They call it a `Royale` with cheese.') Insert OK, 1 row affected insert into t9 values ('Jules', 'Vincent', 2, 'A `Royale` with cheese!') Insert OK, 1 row affected insert into t9 values ('Vincent', 'Jules', 3, 'That`s right.') Insert OK, 1 row affected insert into t9 values ('Jules', 'Vincent', 3, 'What do they call a Big Mac?') Insert OK, 1 row affected insert into t9 values ('Vincent', 'Jules', 4, 'A Big Mac`s a Big Mac, but they call it `Le Big Mac.`') Insert OK, 1 row affected insert into t9 values ('Jules', 'Vincent', 4, '`Le Big Mac!`') Insert OK, 1 row affected insert into t9 values ('Vincent', 'Jules', 5, 'Ha, ha, ha.') Insert OK, 1 row affected insert into t9 values ('Jules', 'Vincent', 5, 'What do they call a `Whopper`?') Insert OK, 1 row affected insert into t9 values ('Vincent', 'Jules', 6, 'I dunno, I didn`t go into Burger King.') Insert OK, 1 row affected insert into t9 values ('The Wolf!', 'Vincent', 0, 'Jimmie, lead the way. Boys, get to work.') Insert OK, 1 row affected insert into t9 values ('Vincent', 'The Wolf!', 0, 'A please would be nice.') Insert OK, 1 row affected insert into t9 values ('The Wolf!', 'Vincent', 1, 'Come again?') Insert OK, 1 row affected insert into t9 values ('Vincent', 'The Wolf!', 1, 'I said a please would be nice.') Insert OK, 1 row affected insert into t9 values ('The Wolf!', 'Vincent', 2, 'Get it straight buster - I`m not here to say please, I`m here to tell you what to do and if self-preservation is an instinct you possess you`d better fucking do it and do it quick. I`m here to help - if my help`s not appreciated then lotsa luck, gentlemen.') Insert OK, 1 row affected insert into t9 values ('The Wolf!', 'Vincent', 3, 'I don`t mean any disrespect, I just don`t like people barking orders at me.') Insert OK, 1 row affected insert into t9 values ('Vincent', 'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the fucking car.') Insert OK, 1 row affected lua box.select(9, 0, 'Vincent', 'Jules', 0) --- - 'Vincent': {'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?'} ... lua box.select(9, 0, 'Jules', 'Vincent', 0) --- - 'Jules': {'Vincent', 0, 'They don`t call it a Quarter Pounder with cheese?'} ... lua box.select(9, 0, 'Vincent', 'Jules', 1) --- - 'Vincent': {'Jules', 1, 'No man, they got the metric system. They wouldn`t know what the f--k a Quarter Pounder is.'} ... lua box.select(9, 0, 'Jules', 'Vincent', 1) --- - 'Jules': {'Vincent', 1, 'Then what do they call it?'} ... lua box.select(9, 0, 'Vincent', 'Jules', 2) --- - 'Vincent': {'Jules', 2, 'They call it a `Royale` with cheese.'} ... lua box.select(9, 0, 'Jules', 'Vincent', 2) --- - 'Jules': {'Vincent', 2, 'A `Royale` with cheese!'} ... lua box.select(9, 0, 'Vincent', 'Jules', 3) --- - 'Vincent': {'Jules', 3, 'That`s right.'} ... lua box.select(9, 0, 'Jules', 'Vincent', 3) --- - 'Jules': {'Vincent', 3, 'What do they call a Big Mac?'} ... lua box.select(9, 0, 'Vincent', 'Jules', 4) --- - 'Vincent': {'Jules', 4, 'A Big Mac`s a Big Mac, but they call it `Le Big Mac.`'} ... lua box.select(9, 0, 'Jules', 'Vincent', 4) --- - 'Jules': {'Vincent', 4, '`Le Big Mac!`'} ... lua box.select(9, 0, 'Vincent', 'Jules', 5) --- - 'Vincent': {'Jules', 5, 'Ha, ha, ha.'} ... lua box.select(9, 0, 'Jules', 'Vincent', 5) --- - 'Jules': {'Vincent', 5, 'What do they call a `Whopper`?'} ... lua box.select(9, 0, 'Vincent', 'Jules', 6) --- - 'Vincent': {'Jules', 6, 'I dunno, I didn`t go into Burger King.'} ... lua box.select(9, 0, 'The Wolf!', 'Vincent', 0) --- - 'The Wolf!': {'Vincent', 0, 'Jimmie, lead the way. Boys, get to work.'} ... lua box.select(9, 0, 'Vincent', 'The Wolf!', 0) --- - 'Vincent': {'The Wolf!', 0, 'A please would be nice.'} ... lua box.select(9, 0, 'The Wolf!', 'Vincent', 1) --- - 'The Wolf!': {'Vincent', 1, 'Come again?'} ... lua box.select(9, 0, 'Vincent', 'The Wolf!', 1) --- - 'Vincent': {'The Wolf!', 1, 'I said a please would be nice.'} ... lua box.select(9, 0, 'The Wolf!', 'Vincent', 2) --- - 'The Wolf!': {'Vincent', 2, 'Get it straight buster - I`m not here to say please, I`m here to tell you what to do and if self-preservation is an instinct you possess you`d better fucking do it and do it quick. I`m here to help - if my help`s not appreciated then lotsa luck, gentlemen.'} ... lua box.select(9, 0, 'The Wolf!', 'Vincent', 3) --- - 'The Wolf!': {'Vincent', 3, 'I don`t mean any disrespect, I just don`t like people barking orders at me.'} ... lua box.select(9, 0, 'Vincent', 'The Wolf!', 2) --- - 'Vincent': {'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the fucking car.'} ... lua box.select(9, 0, 'Vincent', 'Jules') --- - 'Vincent': {'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?'} - 'Vincent': {'Jules', 1, 'No man, they got the metric system. They wouldn`t know what the f--k a Quarter Pounder is.'} - 'Vincent': {'Jules', 2, 'They call it a `Royale` with cheese.'} - 'Vincent': {'Jules', 3, 'That`s right.'} - 'Vincent': {'Jules', 4, 'A Big Mac`s a Big Mac, but they call it `Le Big Mac.`'} - 'Vincent': {'Jules', 5, 'Ha, ha, ha.'} - 'Vincent': {'Jules', 6, 'I dunno, I didn`t go into Burger King.'} ... lua box.select(9, 0, 'Jules', 'Vincent') --- - 'Jules': {'Vincent', 0, 'They don`t call it a Quarter Pounder with cheese?'} - 'Jules': {'Vincent', 1, 'Then what do they call it?'} - 'Jules': {'Vincent', 2, 'A `Royale` with cheese!'} - 'Jules': {'Vincent', 3, 'What do they call a Big Mac?'} - 'Jules': {'Vincent', 4, '`Le Big Mac!`'} - 'Jules': {'Vincent', 5, 'What do they call a `Whopper`?'} ... lua box.select(9, 0, 'Vincent', 'The Wolf!') --- - 'Vincent': {'The Wolf!', 0, 'A please would be nice.'} - 'Vincent': {'The Wolf!', 1, 'I said a please would be nice.'} - 'Vincent': {'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the fucking car.'} ... lua box.select(9, 0, 'The Wolf!', 'Vincent') --- - 'The Wolf!': {'Vincent', 0, 'Jimmie, lead the way. Boys, get to work.'} - 'The Wolf!': {'Vincent', 1, 'Come again?'} - 'The Wolf!': {'Vincent', 2, 'Get it straight buster - I`m not here to say please, I`m here to tell you what to do and if self-preservation is an instinct you possess you`d better fucking do it and do it quick. I`m here to help - if my help`s not appreciated then lotsa luck, gentlemen.'} - 'The Wolf!': {'Vincent', 3, 'I don`t mean any disrespect, I just don`t like people barking orders at me.'} ... lua box.select(9, 0, 'Vincent') --- - 'Vincent': {'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?'} - 'Vincent': {'Jules', 1, 'No man, they got the metric system. They wouldn`t know what the f--k a Quarter Pounder is.'} - 'Vincent': {'Jules', 2, 'They call it a `Royale` with cheese.'} - 'Vincent': {'Jules', 3, 'That`s right.'} - 'Vincent': {'Jules', 4, 'A Big Mac`s a Big Mac, but they call it `Le Big Mac.`'} - 'Vincent': {'Jules', 5, 'Ha, ha, ha.'} - 'Vincent': {'Jules', 6, 'I dunno, I didn`t go into Burger King.'} - 'Vincent': {'The Wolf!', 0, 'A please would be nice.'} - 'Vincent': {'The Wolf!', 1, 'I said a please would be nice.'} - 'Vincent': {'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the fucking car.'} ... lua box.delete(9, 'The Wolf!', 'Vincent', 0) --- - 'The Wolf!': {'Vincent', 0, 'Jimmie, lead the way. Boys, get to work.'} ... lua box.delete(9, 'The Wolf!', 'Vincent', 3) --- - 'The Wolf!': {'Vincent', 3, 'I don`t mean any disrespect, I just don`t like people barking orders at me.'} ... lua box.delete(9, 'Vincent', 'The Wolf!', 0) --- - 'Vincent': {'The Wolf!', 0, 'A please would be nice.'} ... lua box.update(9, {'Vincent', 'The Wolf!', 1}, '=p=p', 0, 'Updated', 4, 'New') --- - 'Updated': {'The Wolf!', 1, 'I said a please would be nice.', 'New'} ... lua box.update(9, {'Updated', 'The Wolf!', 1}, '=p#p', 0, 'Vincent', 4, '') --- - 'Vincent': {'The Wolf!', 1, 'I said a please would be nice.'} ... lua box.select(9, 0, 'Vincent', 'The Wolf!') --- - 'Vincent': {'The Wolf!', 1, 'I said a please would be nice.'} - 'Vincent': {'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the fucking car.'} ... lua box.select(9, 0, 'The Wolf!', 'Vincent') --- - 'The Wolf!': {'Vincent', 1, 'Come again?'} - 'The Wolf!': {'Vincent', 2, 'Get it straight buster - I`m not here to say please, I`m here to tell you what to do and if self-preservation is an instinct you possess you`d better fucking do it and do it quick. I`m here to help - if my help`s not appreciated then lotsa luck, gentlemen.'} ... lua box.delete(9, 'Vincent', 'The Wolf!', 3) --- ... lua box.delete(9, 'Vincent', 'The Wolf!') --- error: 'Invalid key part count in an exact match (expected 3, got 2)' ... lua box.delete(9, 'The Wolf!', 'Vincent', 1, 'Come again?') --- error: 'Invalid key part count in an exact match (expected 3, got 4)' ... lua box.update(9, {'The Wolf!', 'Vincent', 1}, '=p', 3, '') --- - 'The Wolf!': {'Vincent', 1, ''} ... lua box.update(9, {'Vincent', 'The Wolf!', 1}, '=p', 3, '') --- - 'Vincent': {'The Wolf!', 1, ''} ... lua box.select(9, 0, 'Vincent', 'The Wolf!') --- - 'Vincent': {'The Wolf!', 1, ''} - 'Vincent': {'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the fucking car.'} ... lua box.select(9, 0, 'The Wolf!', 'Vincent') --- - 'The Wolf!': {'Vincent', 1, ''} - 'The Wolf!': {'Vincent', 2, 'Get it straight buster - I`m not here to say please, I`m here to tell you what to do and if self-preservation is an instinct you possess you`d better fucking do it and do it quick. I`m here to help - if my help`s not appreciated then lotsa luck, gentlemen.'} ... lua box.update(9, {'Vincent', 'The Wolf!', 3}, '=p', 3, '') --- ... lua box.update(9, {'Vincent', 'The Wolf!'}, '=p', 3, '') --- error: 'Invalid key part count in an exact match (expected 3, got 2)' ... lua box.update(9, {'The Wolf!', 'Vincent', 1, 'Come again?'}, '=p', 3, '') --- error: 'Invalid key part count in an exact match (expected 3, got 4)' ... lua box.space[9]:len() --- - 17 ... lua box.space[9]:truncate() --- ... lua box.space[9]:len() --- - 0 ... A test case for Bug#1051006 Tree iterators return garbage if an index is modified between calls lua box.space[16]:insert('a', 'a', 'a') --- - 'a': {'a', 'a'} ... lua box.space[16]:insert('d', 'd', 'd') --- - 'd': {'d', 'd'} ... lua box.space[16]:insert('e', 'e', 'e') --- - 'e': {'e', 'e'} ... lua box.space[16]:insert('b', 'b', 'b') --- - 'b': {'b', 'b'} ... lua box.space[16]:insert('c', 'c', 'c') --- - 'c': {'c', 'c'} ... lua k,v = box.space[16].index[1]:next(k) --- ... lua print(v) --- 'a': {'a', 'a'} ... lua k,v = box.space[16].index[1]:next(k) --- ... lua print(v) --- 'b': {'b', 'b'} ... lua box.space[16]:truncate() --- ... lua print(v) --- 'b': {'b', 'b'} ... lua collectgarbage('collect') --- - 0 ... lua print(v) --- 'b': {'b', 'b'} ... lua k,v = box.space[16].index[1]:next(k) --- ... lua print(v) --- nil ... lua collectgarbage('collect') --- - 0 ... lua print(v) --- nil ... lua k,v = box.space[16].index[1]:next(k) --- ... lua print(v) --- nil ... lua k,v = box.space[16].index[1]:next(k) --- ... lua print(v) --- nil ... lua k,v = box.space[16].index[1]:next(k) --- ... lua print(v) --- nil ... insert into t19 values(1, 1) An error occurred: ER_ILLEGAL_PARAMS, 'Illegal parameters, tuple must have all indexed fields' replace into t19 values(1, 1) An error occurred: ER_ILLEGAL_PARAMS, 'Illegal parameters, tuple must have all indexed fields' tarantool-1.5.1.218.g1a69fd6/test/big/hash_multipart.test0000664000000000000000000000330012231715257021426 0ustar rootroot# encoding: tarantool # # insert rows exec sql "insert into t27 values (0, 'foo', 0, '', 1)" exec sql "insert into t27 values (0, 'foo', 1, '', 1)" exec sql "insert into t27 values (1, 'foo', 0, '', 2)" exec sql "insert into t27 values (1, 'foo', 1, '', 2)" exec sql "insert into t27 values (0, 'bar', 0, '', 3)" exec sql "insert into t27 values (0, 'bar', 1, '', 3)" exec sql "insert into t27 values (1, 'bar', 0, '', 4)" exec sql "insert into t27 values (1, 'bar', 1, '', 4)" # try to insert a row with a duplicate key exec sql "insert into t27 values (1, 'bar', 1, '', 5)" # output all rows lua_code = """ function box.select_all(space) space = tonumber(space) local result = {} for k, v in box.space[space]:pairs() do table.insert(result, v) end return unpack(result) end """ exec admin "lua " + lua_code.replace('\n', ' ') sql.sort = True exec sql "call box.select_all('27')" sql.sort = False # primary index select exec admin "lua box.select(27, 0, 1, 'foo', 0)" exec admin "lua box.select(27, 0, 1, 'bar', 0)" # primary index slect with missing part exec admin "lua box.select(27, 0, 1, 'foo')" # primary index slect with extra part exec admin "lua box.select(27, 0, 1, 'foo', 0, 0)" # primary index select with wrong type exec admin "lua box.select(27, 0, 1, 'foo', 'baz')" # secondary index select exec admin "lua box.select(27, 1, 1, 4)" # secondary index select with no such key exec admin "lua box.select(27, 1, 1, 5)" # secondary index select with missing part exec admin "lua box.select(27, 1, 1)" # secondary index select with wrong type exec admin "lua box.select(27, 1, 1, 'baz')" # cleanup exec admin "lua box.space[27]:truncate()" exec admin "lua box.space[27]:len()" tarantool-1.5.1.218.g1a69fd6/test/big/lua.test0000664000000000000000000002442212242653271017172 0ustar rootroot# encoding: tarantool # import os import shutil for file in ("index_random_test.lua",): src_path = os.path.join("big/", file) dst_path = os.path.join(vardir, file) shutil.copy(src_path, dst_path) exec admin "lua dofile('%s')" % (file) os.unlink(dst_path); exec sql "insert into t1 values ('brave', 'new', 'world')" exec admin "lua box.space[1].index[1]:min()" exec admin "lua box.space[1].index[1]:max()" exec sql "call box.select('1', '1', 'new', 'world')" print """# # A test case for Bug #904208 # "assert failed, when key cardinality is greater than index cardinality" # https://bugs.launchpad.net/tarantool/+bug/904208 #""" exec sql "call box.select('1', '1', 'new', 'world', 'order')" exec sql "call box.delete('1', 'brave')" print """# # A test case for Bug #902091 # "Positioned iteration over a multipart index doesn't work" # https://bugs.launchpad.net/tarantool/+bug/902091 #""" exec sql "insert into t1 values ('item 1', 'alabama', 'song')" exec admin "lua box.select(1, 1, 'alabama')" exec sql "insert into t1 values ('item 2', 'california', 'dreaming ')" exec sql "insert into t1 values ('item 3', 'california', 'uber alles')" exec sql "insert into t1 values ('item 4', 'georgia', 'on my mind')" exec admin "lua iter, tuple = box.space[1].index[1]:next('california')" exec admin "lua tuple" exec admin "lua iter, tuple = box.space[1].index[1]:next(iter)" exec admin "lua tuple" exec sql "call box.delete('1', 'item 1')" exec sql "call box.delete('1', 'item 2')" exec sql "call box.delete('1', 'item 3')" exec sql "call box.delete('1', 'item 4')" # # Check range scan over multipart keys # exec sql "insert into t5 values ('01234567', 'new', 'world')" exec sql "insert into t5 values ('00000000', 'of', 'puppets')" exec sql "insert into t5 values ('00000001', 'of', 'might', 'and', 'magic')" exec sql "call box.select_range(5, 1, 2, 'of')" exec sql "call box.select_reverse_range(5, 1, 2, 'of')" exec admin "lua box.space[5]:truncate()" # # Lua 64bit numbers support # exec admin "lua box.insert('8', tonumber64('18446744073709551615'), 'magic')" exec admin "lua tu = box.select('8', '0', tonumber64('18446744073709551615'))" exec admin "lua num = box.unpack('l', tu[0])" exec admin "lua print(num)" exec admin "lua type(num) == 'cdata'" exec admin "lua num == tonumber64('18446744073709551615')" exec admin "lua num = box.unpack('l', tu[0])" exec admin "lua num == tonumber64('18446744073709551615')" exec admin "lua box.delete(8, 18446744073709551615ULL)" exec admin "lua box.insert('8', 125ULL, 'magic')" exec admin "lua tu = box.select('8', '0', 125)" exec admin "lua tu2 = box.select('8', '0', 125LL)" exec admin "lua num = box.unpack('l', tu[0])" exec admin "lua num2 = box.unpack('l', tu2[0])" exec admin "lua print(num)" exec admin "lua print(num2)" exec admin "lua type(num) == 'cdata'" exec admin "lua type(num2) == 'cdata'" exec admin "lua num == tonumber64('125')" exec admin "lua num2 == tonumber64('125')" exec admin "lua box.space[8]:truncate()" # # Lua select_reverse_range # exec admin "lua box.insert(14, 0, 0)" exec admin "lua box.insert(14, 1, 0)" exec admin "lua box.insert(14, 2, 0)" exec admin "lua box.insert(14, 3, 0)" exec admin "lua box.insert(14, 4, 0)" exec admin "lua box.insert(14, 5, 0)" exec admin "lua box.insert(14, 6, 0)" exec admin "lua box.insert(14, 7, 0)" exec admin "lua box.insert(14, 8, 0)" exec admin "lua box.insert(14, 9, 0)" exec admin "lua box.select_range(14, 1, 10)" exec admin "lua box.select_reverse_range(14, 1, 10)" exec admin "lua box.select_reverse_range(14, 1, 4)" exec admin "lua box.space[14]:truncate()" print """ # # Tests for box.index iterators # """ pid = 1 tid = 999 for sid in [1, 2]: for i in range(1, 4): exec admin "lua box.insert(16, 'pid_%d', 'sid_%d', 'tid_%d')" % (pid, sid, tid) pid += 1 tid -= 1 exec admin "lua for k, v in box.space[16].index[1].next, box.space[16].index[1], 'sid_1' do print(v) end" exec admin "lua for k, v in box.space[16].index[1].prev, box.space[16].index[1], 'sid_2' do print(v) end" exec admin "lua for k, v in box.space[16].index[1].next_equal, box.space[16].index[1], 'sid_1' do print(v) end" exec admin "lua for k, v in box.space[16].index[1].prev_equal, box.space[16].index[1], 'sid_1' do print(v) end" exec admin "lua for k, v in box.space[16].index[1].next_equal, box.space[16].index[1], 'sid_2' do print(v) end" exec admin "lua for k, v in box.space[16].index[1].prev_equal, box.space[16].index[1], 'sid_2' do print(v) end" exec admin "lua box.space[16]:truncate()" # # Tests for lua idx:count() # exec admin "lua box.insert(17, 1, 1, 1)" exec admin "lua box.insert(17, 2, 2, 0)" exec admin "lua box.insert(17, 3, 2, 1)" exec admin "lua box.insert(17, 4, 3, 0)" exec admin "lua box.insert(17, 5, 3, 1)" exec admin "lua box.insert(17, 6, 3, 2)" exec admin "lua box.space[17].index[1]:count(1)" exec admin "lua box.space[17].index[1]:count(2)" exec admin "lua box.space[17].index[1]:count(2, 1)" exec admin "lua box.space[17].index[1]:count(2, 2)" exec admin "lua box.space[17].index[1]:count(3)" exec admin "lua box.space[17].index[1]:count(3, 3)" exec admin "lua box.space[17].index[1]:count()" exec admin "lua box.space[17]:truncate()" # # Tests for lua box.auto_increment # exec admin "lua box.space[18]:truncate()" exec admin "lua box.auto_increment(18, 'a')" exec admin "lua box.insert(18, 5)" exec admin "lua box.auto_increment(18, 'b')" exec admin "lua box.auto_increment(18, 'c')" exec admin "lua box.space[18]:truncate()" # # Tests for lua box.auto_increment with NUM64 keys # exec admin "lua box.space[25]:truncate()" exec admin "lua box.auto_increment(25, 'a')" exec admin "lua box.insert(25, tonumber64(5))" exec admin "lua box.auto_increment(25, 'b')" exec admin "lua box.auto_increment(25, 'c')" exec admin "lua box.space[25]:truncate()" # # Tests for lua tuple:transform() # exec admin "lua t=box.insert(12, '1', '2', '3', '4', '5', '6', '7')" exec admin "lua t:transform(7, 0, '8', '9', '100')" exec admin "lua t:transform(0, 1)" exec admin "lua t:transform(1, 4)" exec admin "lua t:transform(-1, 1)" exec admin "lua t:transform(-3, 2)" exec admin "lua t:transform(0, 0, 'A')" exec admin "lua t:transform(-1, 0, 'A')" exec admin "lua t:transform(0, 1, 'A')" exec admin "lua t:transform(-1, 1, 'B')" exec admin "lua t:transform(0, 2, 'C')" exec admin "lua t:transform(2, 0, 'hello')" exec admin "lua t:transform(0, -1, 'C')" exec admin "lua t:transform(0, 100)" exec admin "lua t:transform(-100, 1)" exec admin "lua t:transform(0, 3, 1, 2, 3)" exec admin "lua t:transform(3, 1, tonumber64(4))" exec admin "lua t:transform(0, 1, {})" # # Tests for OPENTAR-64 - a limitation for the second argument to tuple:transform # # 50K is enough for everyone exec admin "lua n = 50000;" exec admin "lua tab = {}; for i=1,n,1 do table.insert(tab, i) end" exec admin "lua t = box.tuple.new(tab)" exec admin "lua t:transform(0, n - 1)" exec admin "lua t = nil" # # Tests for lua tuple:find() and tuple:findall() # exec admin "lua t=box.insert(12, 'A', '2', '3', '4', '3', '2', '5', '6', '3', '7')" exec admin "lua t:find('2')" exec admin "lua t:find('4')" exec admin "lua t:find('5')" exec admin "lua t:find('A')" exec admin "lua t:find('0')" exec admin "lua t:findall('A')" exec admin "lua t:findall('2')" exec admin "lua t:findall('3')" exec admin "lua t:findall('0')" exec admin "lua t:find(2, '2')" exec admin "lua t:find(89, '2')" exec admin "lua t:findall(4, '3')" exec admin "lua t=box.insert(12, 'Z', '2', 2, 3, tonumber64(2))" exec admin "lua t:find(2)" exec admin "lua t:find(tonumber64(2))" exec admin "lua t:find('2')" exec admin "lua box.space[12]:truncate()" print """# # A test case for Bug #1038784 # transform returns wrong tuple and put broken reply into socket # https://bugs.launchpad.net/tarantool/+bug/1038784 #""" push_lua_path = os.path.join(vardir, "push.lua") shutil.copy("big/push.lua", push_lua_path) exec admin "lua dofile('push.lua')" shutil.rmtree(push_lua_path, True) exec admin "lua push_collection(0, 1038784, 'hello')" exec admin "lua push_collection(0, 1038784, 'hello')" exec admin "lua push_collection(0, 1038784, 'hello')" exec admin "lua push_collection(1, 1038784, 'hi')" exec admin "lua push_collection(2, 1038784, 'hi')" exec admin "lua push_collection(2, 1038784, 'hi')" exec admin "lua push_collection(5, 1038784, 'hey')" exec admin "lua push_collection(5, 1038784, 'hey')" exec admin "lua push_collection(5, 1038784, 'hey')" exec admin "lua push_collection(5, 1038784, 'hey')" print """# A test case for Bug#1060967: truncation of 64-bit numbers""" exec admin "lua box.space[5]:insert(2^51, 'hello', 'world')" exec admin "lua box.space[5]:select(0, 2^51)" exec admin "lua box.space[5]:truncate()" print """# Test that we print index number in error ER_INDEX_VIOLATION""" exec admin "lua box.space[1]:insert(1, 'hello', 'world')" exec admin "lua box.space[1]:insert(2, 'hello', 'world')" exec admin "lua box.space[1]:truncate()" print """# # A test case for Bug #1042798 # Truncate hangs when primary key is not in linear or starts at the first field # https://bugs.launchpad.net/tarantool/+bug/1042798 #""" # Print key fields in pk exec admin "lua for k, f in pairs(box.space[23].index[0].key_field) do print(k, ' => ', f.fieldno) end" exec admin "lua box.insert(23, 1, 2, 3, 4)" exec admin "lua box.insert(23, 10, 20, 30, 40)" exec admin "lua box.insert(23, 20, 30, 40, 50)" exec admin "lua for _k, v in box.space[23]:pairs() do print(v) end" # Truncate must not hang exec admin "lua box.space[23]:truncate()" # Empty result exec admin "lua for _k, v in box.space[23]:pairs() do print(v) end" print """ #-----------------------------------------------------------------------------# # TreeIndex::random() #-----------------------------------------------------------------------------# """; exec admin "lua index_random_test(26, 0)" print """ #-----------------------------------------------------------------------------# # HashIndex::random() #-----------------------------------------------------------------------------# """; exec admin "lua index_random_test(26, 1)" print """ # # A test case for Bug#1200228 # https://bugs.launchpad.net/tarantool/+bug/1200228 # box.auto_increment counter resets # Test for correct little-endian comparison of integer fields. # (unsigned) #""" exec admin "lua for i = 1, 300 do box.insert(2, i, i) print(box.space[2].index[0]:max()) end" exec admin "lua box.space[2]:select_range(0, 300)" exec admin "lua box.space[2]:truncate()" tarantool-1.5.1.218.g1a69fd6/test/big/lua.result0000664000000000000000000004654612242653271017544 0ustar rootrootlua dofile('index_random_test.lua') --- ... insert into t1 values ('brave', 'new', 'world') Insert OK, 1 row affected lua box.space[1].index[1]:min() --- - 'brave': {'new', 'world'} ... lua box.space[1].index[1]:max() --- - 'brave': {'new', 'world'} ... call box.select('1', '1', 'new', 'world') Found 1 tuple: ['brave', 'new', 'world'] # # A test case for Bug #904208 # "assert failed, when key cardinality is greater than index cardinality" # https://bugs.launchpad.net/tarantool/+bug/904208 # call box.select('1', '1', 'new', 'world', 'order') An error occurred: ER_KEY_PART_COUNT, 'Invalid key part count (expected [0..2], got 3)' call box.delete('1', 'brave') Found 1 tuple: ['brave', 'new', 'world'] # # A test case for Bug #902091 # "Positioned iteration over a multipart index doesn't work" # https://bugs.launchpad.net/tarantool/+bug/902091 # insert into t1 values ('item 1', 'alabama', 'song') Insert OK, 1 row affected lua box.select(1, 1, 'alabama') --- - 'item 1': {'alabama', 1735290739} ... insert into t1 values ('item 2', 'california', 'dreaming ') Insert OK, 1 row affected insert into t1 values ('item 3', 'california', 'uber alles') Insert OK, 1 row affected insert into t1 values ('item 4', 'georgia', 'on my mind') Insert OK, 1 row affected lua iter, tuple = box.space[1].index[1]:next('california') --- ... lua tuple --- - 'item 2': {'california', 'dreaming '} ... lua iter, tuple = box.space[1].index[1]:next(iter) --- ... lua tuple --- - 'item 3': {'california', 'uber alles'} ... call box.delete('1', 'item 1') Found 1 tuple: ['item 1', 'alabama', 1735290739] call box.delete('1', 'item 2') Found 1 tuple: ['item 2', 'california', 'dreaming '] call box.delete('1', 'item 3') Found 1 tuple: ['item 3', 'california', 'uber alles'] call box.delete('1', 'item 4') Found 1 tuple: ['item 4', 'georgia', 'on my mind'] insert into t5 values ('01234567', 'new', 'world') Insert OK, 1 row affected insert into t5 values ('00000000', 'of', 'puppets') Insert OK, 1 row affected insert into t5 values ('00000001', 'of', 'might', 'and', 'magic') Insert OK, 1 row affected call box.select_range(5, 1, 2, 'of') Found 2 tuples: ['00000001', 'of', 'might', 'and', 'magic'] ['00000000', 'of', 'puppets'] call box.select_reverse_range(5, 1, 2, 'of') Found 2 tuples: ['00000000', 'of', 'puppets'] ['00000001', 'of', 'might', 'and', 'magic'] lua box.space[5]:truncate() --- ... lua box.insert('8', tonumber64('18446744073709551615'), 'magic') --- - 18446744073709551615: {'magic'} ... lua tu = box.select('8', '0', tonumber64('18446744073709551615')) --- ... lua num = box.unpack('l', tu[0]) --- ... lua print(num) --- 18446744073709551615 ... lua type(num) == 'cdata' --- - true ... lua num == tonumber64('18446744073709551615') --- - true ... lua num = box.unpack('l', tu[0]) --- ... lua num == tonumber64('18446744073709551615') --- - true ... lua box.delete(8, 18446744073709551615ULL) --- - 18446744073709551615: {'magic'} ... lua box.insert('8', 125ULL, 'magic') --- - 125: {'magic'} ... lua tu = box.select('8', '0', 125) --- ... lua tu2 = box.select('8', '0', 125LL) --- ... lua num = box.unpack('l', tu[0]) --- ... lua num2 = box.unpack('l', tu2[0]) --- ... lua print(num) --- 125 ... lua print(num2) --- 125 ... lua type(num) == 'cdata' --- - true ... lua type(num2) == 'cdata' --- - true ... lua num == tonumber64('125') --- - true ... lua num2 == tonumber64('125') --- - true ... lua box.space[8]:truncate() --- ... lua box.insert(14, 0, 0) --- - 0: {0} ... lua box.insert(14, 1, 0) --- - 1: {0} ... lua box.insert(14, 2, 0) --- - 2: {0} ... lua box.insert(14, 3, 0) --- - 3: {0} ... lua box.insert(14, 4, 0) --- - 4: {0} ... lua box.insert(14, 5, 0) --- - 5: {0} ... lua box.insert(14, 6, 0) --- - 6: {0} ... lua box.insert(14, 7, 0) --- - 7: {0} ... lua box.insert(14, 8, 0) --- - 8: {0} ... lua box.insert(14, 9, 0) --- - 9: {0} ... lua box.select_range(14, 1, 10) --- - 0: {0} - 1: {0} - 2: {0} - 3: {0} - 4: {0} - 5: {0} - 6: {0} - 7: {0} - 8: {0} - 9: {0} ... lua box.select_reverse_range(14, 1, 10) --- - 9: {0} - 8: {0} - 7: {0} - 6: {0} - 5: {0} - 4: {0} - 3: {0} - 2: {0} - 1: {0} - 0: {0} ... lua box.select_reverse_range(14, 1, 4) --- - 9: {0} - 8: {0} - 7: {0} - 6: {0} ... lua box.space[14]:truncate() --- ... # # Tests for box.index iterators # lua box.insert(16, 'pid_1', 'sid_1', 'tid_999') --- - 'pid_1': {'sid_1', 'tid_999'} ... lua box.insert(16, 'pid_2', 'sid_1', 'tid_998') --- - 'pid_2': {'sid_1', 'tid_998'} ... lua box.insert(16, 'pid_3', 'sid_1', 'tid_997') --- - 'pid_3': {'sid_1', 'tid_997'} ... lua box.insert(16, 'pid_4', 'sid_2', 'tid_996') --- - 'pid_4': {'sid_2', 'tid_996'} ... lua box.insert(16, 'pid_5', 'sid_2', 'tid_995') --- - 'pid_5': {'sid_2', 'tid_995'} ... lua box.insert(16, 'pid_6', 'sid_2', 'tid_994') --- - 'pid_6': {'sid_2', 'tid_994'} ... lua for k, v in box.space[16].index[1].next, box.space[16].index[1], 'sid_1' do print(v) end --- 'pid_3': {'sid_1', 'tid_997'} 'pid_2': {'sid_1', 'tid_998'} 'pid_1': {'sid_1', 'tid_999'} 'pid_6': {'sid_2', 'tid_994'} 'pid_5': {'sid_2', 'tid_995'} 'pid_4': {'sid_2', 'tid_996'} ... lua for k, v in box.space[16].index[1].prev, box.space[16].index[1], 'sid_2' do print(v) end --- 'pid_4': {'sid_2', 'tid_996'} 'pid_5': {'sid_2', 'tid_995'} 'pid_6': {'sid_2', 'tid_994'} 'pid_1': {'sid_1', 'tid_999'} 'pid_2': {'sid_1', 'tid_998'} 'pid_3': {'sid_1', 'tid_997'} ... lua for k, v in box.space[16].index[1].next_equal, box.space[16].index[1], 'sid_1' do print(v) end --- 'pid_3': {'sid_1', 'tid_997'} 'pid_2': {'sid_1', 'tid_998'} 'pid_1': {'sid_1', 'tid_999'} ... lua for k, v in box.space[16].index[1].prev_equal, box.space[16].index[1], 'sid_1' do print(v) end --- 'pid_1': {'sid_1', 'tid_999'} 'pid_2': {'sid_1', 'tid_998'} 'pid_3': {'sid_1', 'tid_997'} ... lua for k, v in box.space[16].index[1].next_equal, box.space[16].index[1], 'sid_2' do print(v) end --- 'pid_6': {'sid_2', 'tid_994'} 'pid_5': {'sid_2', 'tid_995'} 'pid_4': {'sid_2', 'tid_996'} ... lua for k, v in box.space[16].index[1].prev_equal, box.space[16].index[1], 'sid_2' do print(v) end --- 'pid_4': {'sid_2', 'tid_996'} 'pid_5': {'sid_2', 'tid_995'} 'pid_6': {'sid_2', 'tid_994'} ... lua box.space[16]:truncate() --- ... lua box.insert(17, 1, 1, 1) --- - 1: {1, 1} ... lua box.insert(17, 2, 2, 0) --- - 2: {2, 0} ... lua box.insert(17, 3, 2, 1) --- - 3: {2, 1} ... lua box.insert(17, 4, 3, 0) --- - 4: {3, 0} ... lua box.insert(17, 5, 3, 1) --- - 5: {3, 1} ... lua box.insert(17, 6, 3, 2) --- - 6: {3, 2} ... lua box.space[17].index[1]:count(1) --- - 1 ... lua box.space[17].index[1]:count(2) --- - 2 ... lua box.space[17].index[1]:count(2, 1) --- - 1 ... lua box.space[17].index[1]:count(2, 2) --- - 0 ... lua box.space[17].index[1]:count(3) --- - 3 ... lua box.space[17].index[1]:count(3, 3) --- - 0 ... lua box.space[17].index[1]:count() --- error: 'index.count(): one or more arguments expected' ... lua box.space[17]:truncate() --- ... lua box.space[18]:truncate() --- ... lua box.auto_increment(18, 'a') --- - 1: {'a'} ... lua box.insert(18, 5) --- - 5: {} ... lua box.auto_increment(18, 'b') --- - 6: {'b'} ... lua box.auto_increment(18, 'c') --- - 7: {'c'} ... lua box.space[18]:truncate() --- ... lua box.space[25]:truncate() --- ... lua box.auto_increment(25, 'a') --- - 1: {'a'} ... lua box.insert(25, tonumber64(5)) --- - 5: {} ... lua box.auto_increment(25, 'b') --- - 6: {'b'} ... lua box.auto_increment(25, 'c') --- - 7: {'c'} ... lua box.space[25]:truncate() --- ... lua t=box.insert(12, '1', '2', '3', '4', '5', '6', '7') --- ... lua t:transform(7, 0, '8', '9', '100') --- - '1': {'2', '3', '4', '5', '6', '7', '8', '9', '100'} ... lua t:transform(0, 1) --- - '2': {'3', '4', '5', '6', '7'} ... lua t:transform(1, 4) --- - '1': {'6', '7'} ... lua t:transform(-1, 1) --- - '1': {'2', '3', '4', '5', '6'} ... lua t:transform(-3, 2) --- - '1': {'2', '3', '4', '7'} ... lua t:transform(0, 0, 'A') --- - 'A': {'1', '2', '3', '4', '5', '6', '7'} ... lua t:transform(-1, 0, 'A') --- - '1': {'2', '3', '4', '5', '6', 'A', '7'} ... lua t:transform(0, 1, 'A') --- - 'A': {'2', '3', '4', '5', '6', '7'} ... lua t:transform(-1, 1, 'B') --- - '1': {'2', '3', '4', '5', '6', 'B'} ... lua t:transform(0, 2, 'C') --- - 'C': {'3', '4', '5', '6', '7'} ... lua t:transform(2, 0, 'hello') --- - '1': {'2', 'hello', '3', '4', '5', '6', '7'} ... lua t:transform(0, -1, 'C') --- error: 'tuple.transform(): len is negative' ... lua t:transform(0, 100) --- - '': {} ... lua t:transform(-100, 1) --- error: 'tuple.transform(): offset is out of bound' ... lua t:transform(0, 3, 1, 2, 3) --- - 1: {2, 3, '4', '5', '6', '7'} ... lua t:transform(3, 1, tonumber64(4)) --- - '1': {'2', '3', 4, '5', '6', '7'} ... lua t:transform(0, 1, {}) --- error: 'tuple.transform(): unsupported field type ''table''' ... lua n = 50000; --- ... lua tab = {}; for i=1,n,1 do table.insert(tab, i) end --- ... lua t = box.tuple.new(tab) --- ... lua t:transform(0, n - 1) --- - 50000: {} ... lua t = nil --- ... lua t=box.insert(12, 'A', '2', '3', '4', '3', '2', '5', '6', '3', '7') --- ... lua t:find('2') --- - 1 ... lua t:find('4') --- - 3 ... lua t:find('5') --- - 6 ... lua t:find('A') --- - 0 ... lua t:find('0') --- ... lua t:findall('A') --- - 0 ... lua t:findall('2') --- - 1 - 5 ... lua t:findall('3') --- - 2 - 4 - 8 ... lua t:findall('0') --- ... lua t:find(2, '2') --- - 5 ... lua t:find(89, '2') --- ... lua t:findall(4, '3') --- - 4 - 8 ... lua t=box.insert(12, 'Z', '2', 2, 3, tonumber64(2)) --- ... lua t:find(2) --- - 2 ... lua t:find(tonumber64(2)) --- - 4 ... lua t:find('2') --- - 1 ... lua box.space[12]:truncate() --- ... # # A test case for Bug #1038784 # transform returns wrong tuple and put broken reply into socket # https://bugs.launchpad.net/tarantool/+bug/1038784 # lua dofile('push.lua') --- ... lua push_collection(0, 1038784, 'hello') --- - 1038784: {'hello'} ... lua push_collection(0, 1038784, 'hello') --- - 1038784: {} ... lua push_collection(0, 1038784, 'hello') --- - 1038784: {} ... lua push_collection(1, 1038784, 'hi') --- - 1038784: {26984} ... lua push_collection(2, 1038784, 'hi') --- - 1038784: {26984, 26984} ... lua push_collection(2, 1038784, 'hi') --- - 1038784: {26984, 26984} ... lua push_collection(5, 1038784, 'hey') --- - 1038784: {26984, 26984, 'hey'} ... lua push_collection(5, 1038784, 'hey') --- - 1038784: {26984, 26984, 'hey', 'hey'} ... lua push_collection(5, 1038784, 'hey') --- - 1038784: {26984, 26984, 'hey', 'hey', 'hey'} ... lua push_collection(5, 1038784, 'hey') --- - 1038784: {26984, 'hey', 'hey', 'hey', 'hey'} ... # A test case for Bug#1060967: truncation of 64-bit numbers lua box.space[5]:insert(2^51, 'hello', 'world') --- - 2251799813685248: {'hello', 'world'} ... lua box.space[5]:select(0, 2^51) --- - 2251799813685248: {'hello', 'world'} ... lua box.space[5]:truncate() --- ... # Test that we print index number in error ER_INDEX_VIOLATION lua box.space[1]:insert(1, 'hello', 'world') --- - 1: {'hello', 'world'} ... lua box.space[1]:insert(2, 'hello', 'world') --- error: 'Duplicate key exists in unique index 1' ... lua box.space[1]:truncate() --- ... # # A test case for Bug #1042798 # Truncate hangs when primary key is not in linear or starts at the first field # https://bugs.launchpad.net/tarantool/+bug/1042798 # lua for k, f in pairs(box.space[23].index[0].key_field) do print(k, ' => ', f.fieldno) end --- 0 => 2 1 => 1 ... lua box.insert(23, 1, 2, 3, 4) --- - 1: {2, 3, 4} ... lua box.insert(23, 10, 20, 30, 40) --- - 10: {20, 30, 40} ... lua box.insert(23, 20, 30, 40, 50) --- - 20: {30, 40, 50} ... lua for _k, v in box.space[23]:pairs() do print(v) end --- 1: {2, 3, 4} 10: {20, 30, 40} 20: {30, 40, 50} ... lua box.space[23]:truncate() --- ... lua for _k, v in box.space[23]:pairs() do print(v) end --- ... #-----------------------------------------------------------------------------# # TreeIndex::random() #-----------------------------------------------------------------------------# lua index_random_test(26, 0) --- all values have been found - true ... #-----------------------------------------------------------------------------# # HashIndex::random() #-----------------------------------------------------------------------------# lua index_random_test(26, 1) --- all values have been found - true ... # # A test case for Bug#1200228 # https://bugs.launchpad.net/tarantool/+bug/1200228 # box.auto_increment counter resets # Test for correct little-endian comparison of integer fields. # (unsigned) # lua for i = 1, 300 do box.insert(2, i, i) print(box.space[2].index[0]:max()) end --- 1: {1} 2: {2} 3: {3} 4: {4} 5: {5} 6: {6} 7: {7} 8: {8} 9: {9} 10: {10} 11: {11} 12: {12} 13: {13} 14: {14} 15: {15} 16: {16} 17: {17} 18: {18} 19: {19} 20: {20} 21: {21} 22: {22} 23: {23} 24: {24} 25: {25} 26: {26} 27: {27} 28: {28} 29: {29} 30: {30} 31: {31} 32: {32} 33: {33} 34: {34} 35: {35} 36: {36} 37: {37} 38: {38} 39: {39} 40: {40} 41: {41} 42: {42} 43: {43} 44: {44} 45: {45} 46: {46} 47: {47} 48: {48} 49: {49} 50: {50} 51: {51} 52: {52} 53: {53} 54: {54} 55: {55} 56: {56} 57: {57} 58: {58} 59: {59} 60: {60} 61: {61} 62: {62} 63: {63} 64: {64} 65: {65} 66: {66} 67: {67} 68: {68} 69: {69} 70: {70} 71: {71} 72: {72} 73: {73} 74: {74} 75: {75} 76: {76} 77: {77} 78: {78} 79: {79} 80: {80} 81: {81} 82: {82} 83: {83} 84: {84} 85: {85} 86: {86} 87: {87} 88: {88} 89: {89} 90: {90} 91: {91} 92: {92} 93: {93} 94: {94} 95: {95} 96: {96} 97: {97} 98: {98} 99: {99} 100: {100} 101: {101} 102: {102} 103: {103} 104: {104} 105: {105} 106: {106} 107: {107} 108: {108} 109: {109} 110: {110} 111: {111} 112: {112} 113: {113} 114: {114} 115: {115} 116: {116} 117: {117} 118: {118} 119: {119} 120: {120} 121: {121} 122: {122} 123: {123} 124: {124} 125: {125} 126: {126} 127: {127} 128: {128} 129: {129} 130: {130} 131: {131} 132: {132} 133: {133} 134: {134} 135: {135} 136: {136} 137: {137} 138: {138} 139: {139} 140: {140} 141: {141} 142: {142} 143: {143} 144: {144} 145: {145} 146: {146} 147: {147} 148: {148} 149: {149} 150: {150} 151: {151} 152: {152} 153: {153} 154: {154} 155: {155} 156: {156} 157: {157} 158: {158} 159: {159} 160: {160} 161: {161} 162: {162} 163: {163} 164: {164} 165: {165} 166: {166} 167: {167} 168: {168} 169: {169} 170: {170} 171: {171} 172: {172} 173: {173} 174: {174} 175: {175} 176: {176} 177: {177} 178: {178} 179: {179} 180: {180} 181: {181} 182: {182} 183: {183} 184: {184} 185: {185} 186: {186} 187: {187} 188: {188} 189: {189} 190: {190} 191: {191} 192: {192} 193: {193} 194: {194} 195: {195} 196: {196} 197: {197} 198: {198} 199: {199} 200: {200} 201: {201} 202: {202} 203: {203} 204: {204} 205: {205} 206: {206} 207: {207} 208: {208} 209: {209} 210: {210} 211: {211} 212: {212} 213: {213} 214: {214} 215: {215} 216: {216} 217: {217} 218: {218} 219: {219} 220: {220} 221: {221} 222: {222} 223: {223} 224: {224} 225: {225} 226: {226} 227: {227} 228: {228} 229: {229} 230: {230} 231: {231} 232: {232} 233: {233} 234: {234} 235: {235} 236: {236} 237: {237} 238: {238} 239: {239} 240: {240} 241: {241} 242: {242} 243: {243} 244: {244} 245: {245} 246: {246} 247: {247} 248: {248} 249: {249} 250: {250} 251: {251} 252: {252} 253: {253} 254: {254} 255: {255} 256: {256} 257: {257} 258: {258} 259: {259} 260: {260} 261: {261} 262: {262} 263: {263} 264: {264} 265: {265} 266: {266} 267: {267} 268: {268} 269: {269} 270: {270} 271: {271} 272: {272} 273: {273} 274: {274} 275: {275} 276: {276} 277: {277} 278: {278} 279: {279} 280: {280} 281: {281} 282: {282} 283: {283} 284: {284} 285: {285} 286: {286} 287: {287} 288: {288} 289: {289} 290: {290} 291: {291} 292: {292} 293: {293} 294: {294} 295: {295} 296: {296} 297: {297} 298: {298} 299: {299} 300: {300} ... lua box.space[2]:select_range(0, 300) --- - 1: {1} - 2: {2} - 3: {3} - 4: {4} - 5: {5} - 6: {6} - 7: {7} - 8: {8} - 9: {9} - 10: {10} - 11: {11} - 12: {12} - 13: {13} - 14: {14} - 15: {15} - 16: {16} - 17: {17} - 18: {18} - 19: {19} - 20: {20} - 21: {21} - 22: {22} - 23: {23} - 24: {24} - 25: {25} - 26: {26} - 27: {27} - 28: {28} - 29: {29} - 30: {30} - 31: {31} - 32: {32} - 33: {33} - 34: {34} - 35: {35} - 36: {36} - 37: {37} - 38: {38} - 39: {39} - 40: {40} - 41: {41} - 42: {42} - 43: {43} - 44: {44} - 45: {45} - 46: {46} - 47: {47} - 48: {48} - 49: {49} - 50: {50} - 51: {51} - 52: {52} - 53: {53} - 54: {54} - 55: {55} - 56: {56} - 57: {57} - 58: {58} - 59: {59} - 60: {60} - 61: {61} - 62: {62} - 63: {63} - 64: {64} - 65: {65} - 66: {66} - 67: {67} - 68: {68} - 69: {69} - 70: {70} - 71: {71} - 72: {72} - 73: {73} - 74: {74} - 75: {75} - 76: {76} - 77: {77} - 78: {78} - 79: {79} - 80: {80} - 81: {81} - 82: {82} - 83: {83} - 84: {84} - 85: {85} - 86: {86} - 87: {87} - 88: {88} - 89: {89} - 90: {90} - 91: {91} - 92: {92} - 93: {93} - 94: {94} - 95: {95} - 96: {96} - 97: {97} - 98: {98} - 99: {99} - 100: {100} - 101: {101} - 102: {102} - 103: {103} - 104: {104} - 105: {105} - 106: {106} - 107: {107} - 108: {108} - 109: {109} - 110: {110} - 111: {111} - 112: {112} - 113: {113} - 114: {114} - 115: {115} - 116: {116} - 117: {117} - 118: {118} - 119: {119} - 120: {120} - 121: {121} - 122: {122} - 123: {123} - 124: {124} - 125: {125} - 126: {126} - 127: {127} - 128: {128} - 129: {129} - 130: {130} - 131: {131} - 132: {132} - 133: {133} - 134: {134} - 135: {135} - 136: {136} - 137: {137} - 138: {138} - 139: {139} - 140: {140} - 141: {141} - 142: {142} - 143: {143} - 144: {144} - 145: {145} - 146: {146} - 147: {147} - 148: {148} - 149: {149} - 150: {150} - 151: {151} - 152: {152} - 153: {153} - 154: {154} - 155: {155} - 156: {156} - 157: {157} - 158: {158} - 159: {159} - 160: {160} - 161: {161} - 162: {162} - 163: {163} - 164: {164} - 165: {165} - 166: {166} - 167: {167} - 168: {168} - 169: {169} - 170: {170} - 171: {171} - 172: {172} - 173: {173} - 174: {174} - 175: {175} - 176: {176} - 177: {177} - 178: {178} - 179: {179} - 180: {180} - 181: {181} - 182: {182} - 183: {183} - 184: {184} - 185: {185} - 186: {186} - 187: {187} - 188: {188} - 189: {189} - 190: {190} - 191: {191} - 192: {192} - 193: {193} - 194: {194} - 195: {195} - 196: {196} - 197: {197} - 198: {198} - 199: {199} - 200: {200} - 201: {201} - 202: {202} - 203: {203} - 204: {204} - 205: {205} - 206: {206} - 207: {207} - 208: {208} - 209: {209} - 210: {210} - 211: {211} - 212: {212} - 213: {213} - 214: {214} - 215: {215} - 216: {216} - 217: {217} - 218: {218} - 219: {219} - 220: {220} - 221: {221} - 222: {222} - 223: {223} - 224: {224} - 225: {225} - 226: {226} - 227: {227} - 228: {228} - 229: {229} - 230: {230} - 231: {231} - 232: {232} - 233: {233} - 234: {234} - 235: {235} - 236: {236} - 237: {237} - 238: {238} - 239: {239} - 240: {240} - 241: {241} - 242: {242} - 243: {243} - 244: {244} - 245: {245} - 246: {246} - 247: {247} - 248: {248} - 249: {249} - 250: {250} - 251: {251} - 252: {252} - 253: {253} - 254: {254} - 255: {255} - 256: {256} - 257: {257} - 258: {258} - 259: {259} - 260: {260} - 261: {261} - 262: {262} - 263: {263} - 264: {264} - 265: {265} - 266: {266} - 267: {267} - 268: {268} - 269: {269} - 270: {270} - 271: {271} - 272: {272} - 273: {273} - 274: {274} - 275: {275} - 276: {276} - 277: {277} - 278: {278} - 279: {279} - 280: {280} - 281: {281} - 282: {282} - 283: {283} - 284: {284} - 285: {285} - 286: {286} - 287: {287} - 288: {288} - 289: {289} - 290: {290} - 291: {291} - 292: {292} - 293: {293} - 294: {294} - 295: {295} - 296: {296} - 297: {297} - 298: {298} - 299: {299} - 300: {300} ... lua box.space[2]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/big/push.lua0000664000000000000000000000064612231715257017175 0ustar rootroot function push_collection(size, cid, ...) local append = { ... } local tuple = box.select(18, 0, cid) if tuple == nil then return box.insert(18, cid, unpack(append) ) end if #append == 0 then return tuple end tuple = tuple:transform( #tuple, 0, unpack( append ) ) if #tuple - 1 > tonumber(size) then tuple = tuple:transform( 1, #tuple - 1 - tonumber(size) ) end return box.replace(18, tuple:unpack() ) end tarantool-1.5.1.218.g1a69fd6/test/big/tree_pk.test0000664000000000000000000001404612231715257020044 0ustar rootroot# encoding: tarantool # # integer keys exec sql "insert into t2 values (1, 'tuple')" exec admin "save snapshot" exec sql "insert into t2 values (2, 'tuple 2')" exec admin "save snapshot" exec sql "insert into t2 values (3, 'tuple 3')" exec sql "select * from t2 where k0 = 1" exec sql "select * from t2 where k0 = 2" exec sql "select * from t2 where k0 = 3" # Cleanup exec sql "delete from t2 where k0 = 1" exec sql "delete from t2 where k0 = 2" exec sql "delete from t2 where k0 = 3" # Test incorrect keys - supplied key field type does not match index type # https://bugs.launchpad.net/tarantool/+bug/1072624 exec sql "insert into t2 VALUES('xxxxxxx')" exec sql "insert into t2 VALUES('')" exec sql "insert into t2 VALUES('12')" # string keys exec sql "insert into t3 values ('identifier', 'tuple')" exec admin "save snapshot" exec sql "insert into t3 values ('second', 'tuple 2')" exec admin "save snapshot" exec sql "call box.select_range('3', '0', '100', 'second')" exec sql "call box.select_range('3', '0', '100', 'identifier')" exec sql "insert into t3 values ('third', 'tuple 3')" exec sql "select * from t3 where k0 = 'identifier'" exec sql "select * from t3 where k0 = 'second'" exec sql "select * from t3 where k0 = 'third'" # Cleanup exec sql "delete from t3 where k0 = 'identifier'" exec sql "delete from t3 where k0 = 'second'" exec sql "delete from t3 where k0 = 'third'" lua = """ function box.crossjoin(space0, space1, limit) space0 = tonumber(space0) space1 = tonumber(space1) limit = tonumber(limit) local result = {} for k0, v0 in box.space[space0]:pairs() do for k1, v1 in box.space[space1]:pairs() do if limit <= 0 then return unpack(result) end newtuple = {v0:unpack()} for _, v in v1:pairs() do table.insert(newtuple, v) end table.insert(result, newtuple) limit = limit - 1 end end return unpack(result) end""" exec sql "insert into t2 values (1, 'tuple')" exec sql "insert into t3 values (1, 'tuple')" exec sql "insert into t3 values (2, 'tuple')" exec admin "lua " + lua.replace('\n', ' ') exec sql "call box.crossjoin('3', '3', '0')" exec sql "call box.crossjoin('3', '3', '5')" exec sql "call box.crossjoin('3', '3', '10000')" exec sql "call box.crossjoin('3', '2', '10000')" exec admin "lua box.space[3]:truncate()" # Bug #922520 - select missing keys exec sql "insert into t2 values (200, 'select me!')" exec sql "select * from t2 where k0 = 200" exec sql "select * from t2 where k0 = 199" exec sql "select * from t2 where k0 = 201" # Test partially specified keys in TREE indexes exec sql "insert into t15 values ('abcd')" exec sql "insert into t15 values ('abcda')" exec sql "insert into t15 values ('abcda_')" exec sql "insert into t15 values ('abcdb')" exec sql "insert into t15 values ('abcdb_')" exec sql "insert into t15 values ('abcdb__')" exec sql "insert into t15 values ('abcdb___')" exec sql "insert into t15 values ('abcdc')" exec sql "insert into t15 values ('abcdc_')" exec admin "lua box.space[15].index[0]:select_range(3, 'abcdb')" exec admin "lua box.space[15]:truncate()" # # tree::replace tests # exec admin "lua box.space[22]:truncate()" exec sql "insert into t22 values (0, 0, 0, 0)" exec sql "insert into t22 values (1, 1, 1, 1)" exec sql "insert into t22 values (2, 2, 2, 2)" # OK exec sql "replace into t22 values (1, 1, 1, 1)" exec sql "replace into t22 values (1, 10, 10, 10)" exec sql "replace into t22 values (1, 1, 1, 1)" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" exec sql "select * from t22 WHERE k0 = 1" exec sql "select * from t22 WHERE k1 = 1" exec sql "select * from t22 WHERE k2 = 1" exec sql "select * from t22 WHERE k3 = 1" # OK exec sql "insert into t22 values (10, 10, 10, 10)" exec sql "delete from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" # TupleFound (primary key) exec sql "insert into t22 values (1, 10, 10, 10)" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" exec sql "select * from t22 WHERE k0 = 1" # TupleNotFound (primary key) exec sql "replace into t22 values (10, 10, 10, 10)" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" # TupleFound (key #1) exec sql "insert into t22 values (10, 0, 10, 10)" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" exec sql "select * from t22 WHERE k1 = 0" # TupleFound (key #1) exec sql "replace into t22 values (2, 0, 10, 10)" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" exec sql "select * from t22 WHERE k1 = 0" # TupleFound (key #3) exec sql "insert into t22 values (10, 10, 10, 0)" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" exec sql "select * from t22 WHERE k3 = 0" # TupleFound (key #3) exec sql "replace into t22 values (2, 10, 10, 0)" exec sql "select * from t22 WHERE k0 = 10" exec sql "select * from t22 WHERE k1 = 10" exec sql "select * from t22 WHERE k2 = 10" exec sql "select * from t22 WHERE k3 = 10" exec sql "select * from t22 WHERE k3 = 0" sql.sort = True # Non-Uniq test (key #2) exec sql "insert into t22 values (4, 4, 0, 4)" exec sql "insert into t22 values (5, 5, 0, 5)" exec sql "insert into t22 values (6, 6, 0, 6)" exec sql "replace into t22 values (5, 5, 0, 5)" exec sql "select * from t22 WHERE k2 = 0" exec sql "delete from t22 WHERE k0 = 5" exec sql "select * from t22 WHERE k2 = 0" sql.sort = False exec admin "lua box.space[22]:truncate()" tarantool-1.5.1.218.g1a69fd6/test/big/tree_variants.test0000664000000000000000000000554412231715257021264 0ustar rootroot# encoding: tarantool # exec sql "insert into t6 values (0, '00000000', '00000100', 'Joe', 'Sixpack', 'Drinks', 'Amstel', 'bar', 2000 )" exec sql "insert into t6 values (1, '00000001', '00000200', 'Joe', 'Sixpack', 'Drinks', 'Heineken', 'bar', 2001 )" exec sql "insert into t6 values (2, '00000002', '00000200', 'Joe', 'Sixpack', 'Drinks', 'Carlsberg', 'bar', 2002 )" exec sql "insert into t6 values (3, '00000003', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Corona Extra', 'bar', 2003 )" exec sql "insert into t6 values (4, '00000004', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Stella Artois', 'bar', 2004 )" exec sql "insert into t6 values (5, '00000005', '00000300', 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005 )" exec sql "insert into t6 values (6, '00000006', '00000400', 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006 )" exec sql "insert into t6 values (7, '00000007', '00000400', 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007 )" exec sql "insert into t6 values (8, '00000008', '00000400', 'John', 'Smoker', 'Rolls', 'A Joint', 'foo', 2008 )" exec sql "insert into t6 values (9, '00000009', '00000400', 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009 )" exec sql "select * from t6 where k0 = 1" exec sql "select * from t6 where k1 = '00000002'" exec sql "select * from t6 where k2 = '00000300'" exec admin "lua box.space[6]:select(3, 'Joe', 'Sixpack')" exec admin "lua box.space[6]:select(3, 'John')" exec admin "lua box.space[6]:select(4, 'A Pipe')" exec admin "lua box.space[6]:select(4, 'Miller Genuine Draft', 'Drinks')" exec sql "select * from t6 where k5 = 2007" exec admin "lua box.space[6]:select(6, 'Miller Genuine Draft', 'Drinks')" exec sql "delete from t6 where k0 = 6" exec sql "delete from t6 where k0 = 7" exec sql "delete from t6 where k0 = 8" exec sql "delete from t6 where k0 = 9" exec admin "lua box.insert(6, 6, 6ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006 )" exec admin "lua box.insert(6, 7, 7ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007 )" exec admin "lua box.insert(6, 8, 8ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Joint', 'foo', 2008 )" exec admin "lua box.insert(6, 9, 9ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009 )" exec admin "lua box.select(6, 1, 6ULL)" exec admin "lua box.select(6, 1, 6)" exec admin "lua box.select(6, 2, 400ULL)" exec admin "lua box.select(6, 2, 400)" exec admin "lua for k,v in box.space[6]:pairs() do print(v) end" # Test incorrect keys - supplied key field type does not match index type # https://bugs.launchpad.net/tarantool/+bug/1072624 exec sql "insert into t6 VALUES('', '00000001', '00000002', '', '', '', '', '', 0)" exec sql "insert into t6 VALUES('xxxxxxxx', '00000001', '00000002', '', '', '', '', '', 0)" exec sql "insert into t6 VALUES(1, '', '00000002', '', '', '', '', '', 0)" exec sql "insert into t6 VALUES(1, 'xxxxxxxxxxx', '00000002', '', '', '', '', '', 0)" tarantool-1.5.1.218.g1a69fd6/test/big/hash_multipart.result0000664000000000000000000000365012231715257021775 0ustar rootrootinsert into t27 values (0, 'foo', 0, '', 1) Insert OK, 1 row affected insert into t27 values (0, 'foo', 1, '', 1) Insert OK, 1 row affected insert into t27 values (1, 'foo', 0, '', 2) Insert OK, 1 row affected insert into t27 values (1, 'foo', 1, '', 2) Insert OK, 1 row affected insert into t27 values (0, 'bar', 0, '', 3) Insert OK, 1 row affected insert into t27 values (0, 'bar', 1, '', 3) Insert OK, 1 row affected insert into t27 values (1, 'bar', 0, '', 4) Insert OK, 1 row affected insert into t27 values (1, 'bar', 1, '', 4) Insert OK, 1 row affected insert into t27 values (1, 'bar', 1, '', 5) An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 0' lua function box.select_all(space) space = tonumber(space) local result = {} for k, v in box.space[space]:pairs() do table.insert(result, v) end return unpack(result) end --- ... call box.select_all('27') Found 8 tuples: [0, 'bar', 0, '', 3] [0, 'bar', 1, '', 3] [0, 'foo', 0, '', 1] [0, 'foo', 1, '', 1] [1, 'bar', 0, '', 4] [1, 'bar', 1, '', 4] [1, 'foo', 0, '', 2] [1, 'foo', 1, '', 2] lua box.select(27, 0, 1, 'foo', 0) --- - 1: {'foo', 0, '', 2} ... lua box.select(27, 0, 1, 'bar', 0) --- - 1: {'bar', 0, '', 4} ... lua box.select(27, 0, 1, 'foo') --- error: 'Invalid key part count in an exact match (expected 3, got 2)' ... lua box.select(27, 0, 1, 'foo', 0, 0) --- error: 'Invalid key part count (expected [0..3], got 4)' ... lua box.select(27, 0, 1, 'foo', 'baz') --- error: 'Supplied key field type does not match index type: expected u32' ... lua box.select(27, 1, 1, 4) --- - 1: {'bar', 1, '', 4} ... lua box.select(27, 1, 1, 5) --- ... lua box.select(27, 1, 1) --- error: 'Invalid key part count in an exact match (expected 2, got 1)' ... lua box.select(27, 1, 1, 'baz') --- error: 'Supplied key field type does not match index type: expected u32' ... lua box.space[27]:truncate() --- ... lua box.space[27]:len() --- - 0 ... tarantool-1.5.1.218.g1a69fd6/test/big/bitset.lua0000664000000000000000000000137712231715257017512 0ustar rootrootlocal SPACE_NO = 24 local INDEX_NO = 1 function fill(...) local nums = table.generate(arithmetic(...)); table.shuffle(nums); for _k, v in ipairs(nums) do box.insert(SPACE_NO, v, v); end end function delete(...) local nums = table.generate(arithmetic(...)); table.shuffle(nums); for _k, v in ipairs(nums) do box.delete(SPACE_NO, v); end end function clear() box.space[SPACE_NO]:truncate() end function dump(...) iterate(SPACE_NO, INDEX_NO, 1, 2, ...); end function test_insert_delete(n) local t = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127} table.shuffle(t); clear(); fill(1, n); for _, v in ipairs(t) do delete(v, n / v) end dump(box.index.BITS_ALL) end tarantool-1.5.1.218.g1a69fd6/test/big/tree_pk_multipart.test0000664000000000000000000001555512231715257022153 0ustar rootroot# encoding: tarantool # # # Insert test # exec sql "insert into t9 values ('Vincent', 'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?')" exec sql "insert into t9 values ('Jules', 'Vincent', 0, 'They don`t call it a Quarter Pounder with cheese?')" exec sql "insert into t9 values ('Vincent', 'Jules', 1, 'No man, they got the metric system. They wouldn`t know what the f--k a Quarter Pounder is.')" exec sql "insert into t9 values ('Jules', 'Vincent', 1, 'Then what do they call it?')" exec sql "insert into t9 values ('Vincent', 'Jules', 2, 'They call it a `Royale` with cheese.')" exec sql "insert into t9 values ('Jules', 'Vincent', 2, 'A `Royale` with cheese!')" exec sql "insert into t9 values ('Vincent', 'Jules', 3, 'That`s right.')" exec sql "insert into t9 values ('Jules', 'Vincent', 3, 'What do they call a Big Mac?')" exec sql "insert into t9 values ('Vincent', 'Jules', 4, 'A Big Mac`s a Big Mac, but they call it `Le Big Mac.`')" exec sql "insert into t9 values ('Jules', 'Vincent', 4, '`Le Big Mac!`')" exec sql "insert into t9 values ('Vincent', 'Jules', 5, 'Ha, ha, ha.')" exec sql "insert into t9 values ('Jules', 'Vincent', 5, 'What do they call a `Whopper`?')" exec sql "insert into t9 values ('Vincent', 'Jules', 6, 'I dunno, I didn`t go into Burger King.')" exec sql "insert into t9 values ('The Wolf!', 'Vincent', 0, 'Jimmie, lead the way. Boys, get to work.')" exec sql "insert into t9 values ('Vincent', 'The Wolf!', 0, 'A please would be nice.')" exec sql "insert into t9 values ('The Wolf!', 'Vincent', 1, 'Come again?')" exec sql "insert into t9 values ('Vincent', 'The Wolf!', 1, 'I said a please would be nice.')" exec sql "insert into t9 values ('The Wolf!', 'Vincent', 2, 'Get it straight buster - I`m not here to say please, I`m here to tell you what to do and if self-preservation is an instinct you possess you`d better fucking do it and do it quick. I`m here to help - if my help`s not appreciated then lotsa luck, gentlemen.')" exec sql "insert into t9 values ('The Wolf!', 'Vincent', 3, 'I don`t mean any disrespect, I just don`t like people barking orders at me.')" exec sql "insert into t9 values ('Vincent', 'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the fucking car.')" # # Select test # # Select by one entry exec admin "lua box.select(9, 0, 'Vincent', 'Jules', 0)" exec admin "lua box.select(9, 0, 'Jules', 'Vincent', 0)" exec admin "lua box.select(9, 0, 'Vincent', 'Jules', 1)" exec admin "lua box.select(9, 0, 'Jules', 'Vincent', 1)" exec admin "lua box.select(9, 0, 'Vincent', 'Jules', 2)" exec admin "lua box.select(9, 0, 'Jules', 'Vincent', 2)" exec admin "lua box.select(9, 0, 'Vincent', 'Jules', 3)" exec admin "lua box.select(9, 0, 'Jules', 'Vincent', 3)" exec admin "lua box.select(9, 0, 'Vincent', 'Jules', 4)" exec admin "lua box.select(9, 0, 'Jules', 'Vincent', 4)" exec admin "lua box.select(9, 0, 'Vincent', 'Jules', 5)" exec admin "lua box.select(9, 0, 'Jules', 'Vincent', 5)" exec admin "lua box.select(9, 0, 'Vincent', 'Jules', 6)" exec admin "lua box.select(9, 0, 'The Wolf!', 'Vincent', 0)" exec admin "lua box.select(9, 0, 'Vincent', 'The Wolf!', 0)" exec admin "lua box.select(9, 0, 'The Wolf!', 'Vincent', 1)" exec admin "lua box.select(9, 0, 'Vincent', 'The Wolf!', 1)" exec admin "lua box.select(9, 0, 'The Wolf!', 'Vincent', 2)" exec admin "lua box.select(9, 0, 'The Wolf!', 'Vincent', 3)" exec admin "lua box.select(9, 0, 'Vincent', 'The Wolf!', 2)" # Select all messages from Vincent to Jules exec admin "lua box.select(9, 0, 'Vincent', 'Jules')" # Select all messages from Jules to Vincent exec admin "lua box.select(9, 0, 'Jules', 'Vincent')" # Select all messages from Vincent to The Wolf exec admin "lua box.select(9, 0, 'Vincent', 'The Wolf!')" # Select all messages from The Wolf to Vincent exec admin "lua box.select(9, 0, 'The Wolf!', 'Vincent')" # Select all Vincent messages exec admin "lua box.select(9, 0, 'Vincent')" # # Delete test # # Delete some messages from the The Wolf and Vincent dialog exec admin "lua box.delete(9, 'The Wolf!', 'Vincent', 0)" exec admin "lua box.delete(9, 'The Wolf!', 'Vincent', 3)" exec admin "lua box.delete(9, 'Vincent', 'The Wolf!', 0)" exec admin "lua box.update(9, {'Vincent', 'The Wolf!', 1}, '=p=p', 0, 'Updated', 4, 'New')" exec admin "lua box.update(9, {'Updated', 'The Wolf!', 1}, '=p#p', 0, 'Vincent', 4, '')" # Checking Vincent's last messages exec admin "lua box.select(9, 0, 'Vincent', 'The Wolf!')" # Checking The Wolf's last messages exec admin "lua box.select(9, 0, 'The Wolf!', 'Vincent')" # try to delete nonexistent message exec admin "lua box.delete(9, 'Vincent', 'The Wolf!', 3)" # try to delete patrial defined key exec admin "lua box.delete(9, 'Vincent', 'The Wolf!')" # try to delete by invalid key exec admin "lua box.delete(9, 'The Wolf!', 'Vincent', 1, 'Come again?')" # # Update test # exec admin "lua box.update(9, {'The Wolf!', 'Vincent', 1}, '=p', 3, '')" exec admin "lua box.update(9, {'Vincent', 'The Wolf!', 1}, '=p', 3, '')" # Checking Vincent's last messages exec admin "lua box.select(9, 0, 'Vincent', 'The Wolf!')" # Checking The Wolf's last messages exec admin "lua box.select(9, 0, 'The Wolf!', 'Vincent')" # try to update a nonexistent message exec admin "lua box.update(9, {'Vincent', 'The Wolf!', 3}, '=p', 3, '')" # try to update patrial defined key exec admin "lua box.update(9, {'Vincent', 'The Wolf!'}, '=p', 3, '')" # try to update by invalid key exec admin "lua box.update(9, {'The Wolf!', 'Vincent', 1, 'Come again?'}, '=p', 3, '')" exec admin "lua box.space[9]:len()" exec admin "lua box.space[9]:truncate()" exec admin "lua box.space[9]:len()" print """ A test case for Bug#1051006 Tree iterators return garbage if an index is modified between calls""" exec admin "lua box.space[16]:insert('a', 'a', 'a')" exec admin "lua box.space[16]:insert('d', 'd', 'd')" exec admin "lua box.space[16]:insert('e', 'e', 'e')" exec admin "lua box.space[16]:insert('b', 'b', 'b')" exec admin "lua box.space[16]:insert('c', 'c', 'c')" exec admin "lua k,v = box.space[16].index[1]:next(k)" exec admin "lua print(v)" exec admin "lua k,v = box.space[16].index[1]:next(k)" exec admin "lua print(v)" exec admin "lua box.space[16]:truncate()" exec admin "lua print(v)" exec admin "lua collectgarbage('collect')" exec admin "lua print(v)" exec admin "lua k,v = box.space[16].index[1]:next(k)" exec admin "lua print(v)" exec admin "lua collectgarbage('collect')" exec admin "lua print(v)" exec admin "lua k,v = box.space[16].index[1]:next(k)" exec admin "lua print(v)" exec admin "lua k,v = box.space[16].index[1]:next(k)" exec admin "lua print(v)" exec admin "lua k,v = box.space[16].index[1]:next(k)" exec admin "lua print(v)" # Bug #1082356 exec sql "insert into t19 values(1, 1)" exec sql "replace into t19 values(1, 1)" tarantool-1.5.1.218.g1a69fd6/test/big/hash.test0000664000000000000000000003003212231715257017327 0ustar rootroot# encoding: tarantool # print """ #=============================================================================# # 32-bit hash tests #=============================================================================# """ print """ #-----------------------------------------------------------------------------# # 32-bit hash insert fields tests #-----------------------------------------------------------------------------# """ print """ # Insert valid fieds """ exec admin "lua box.space[10]:insert(0, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[10]:insert(1, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[10]:insert(2, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[10]:insert(3, 'value1 v1.0', 'value2 v1.0')" print """ # Insert invalid fields """ exec admin "lua box.space[10]:insert('invalid key', 'value1 v1.0', 'value2 v1.0')" print """ #-----------------------------------------------------------------------------# # 32-bit hash replace fields tests #-----------------------------------------------------------------------------# """ print """ # Replace valid fieds """ exec admin "lua box.space[10]:replace(3, 'value1 v1.31', 'value2 1.12')" exec admin "lua box.space[10]:replace(1, 'value1 v1.32', 'value2 1.72')" exec admin "lua box.space[10]:replace(2, 'value1 v1.43', 'value2 1.92')" print """ # Replace invalid fields """ exec admin "lua box.space[10]:replace('invalid key', 'value1 v1.0', 'value2 v1.0')" print """ #-----------------------------------------------------------------------------# # 32-bit hash select fields test #-----------------------------------------------------------------------------# """ print """ # select by valid keys """ exec admin "lua box.space[10]:select(0, 0)" exec admin "lua box.space[10]:select(0, 1)" exec admin "lua box.space[10]:select(0, 2)" exec admin "lua box.space[10]:select(0, 3)" exec admin "lua box.space[10]:select(0, 4)" exec admin "lua box.space[10]:select(0, 5)" print """ # select by invalid keys """ exec admin "lua box.space[10]:select(0, 'invalid key')" exec admin "lua box.space[10]:select(0, 1, 2)" print """ #-----------------------------------------------------------------------------# # 32-bit hash delete fields test #-----------------------------------------------------------------------------# """ print """ # delete by valid keys """ exec admin "lua box.space[10]:delete(0)" exec admin "lua box.space[10]:delete(1)" exec admin "lua box.space[10]:delete(2)" exec admin "lua box.space[10]:delete(3)" exec admin "lua box.space[10]:delete(4)" exec admin "lua box.space[10]:delete(5)" print """ # delete by invalid keys """ exec admin "lua box.space[10]:delete('invalid key')" exec admin "lua box.space[10]:delete(1, 2)" print """ #=============================================================================# # 64-bit hash tests #=============================================================================# """ print """ #-----------------------------------------------------------------------------# # 64-bit hash inset fields tests #-----------------------------------------------------------------------------# """ print """ # Insert valid fieds """ exec admin "lua box.space[11]:insert(0ULL, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(1ULL, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(2ULL, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(3ULL, 'value1 v1.0', 'value2 v1.0')" print """ # Insert invalid fields """ exec admin "lua box.space[11]:insert(100, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(101, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(102, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(103, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert('invalid key', 'value1 v1.0', 'value2 v1.0')" print """ #-----------------------------------------------------------------------------# # 64-bit hash replace fields tests #-----------------------------------------------------------------------------# """ print """ # Replace valid fieds """ exec admin "lua box.space[11]:replace(3ULL, 'value1 v1.31', 'value2 1.12')" exec admin "lua box.space[11]:replace(1ULL, 'value1 v1.32', 'value2 1.72')" exec admin "lua box.space[11]:replace(2ULL, 'value1 v1.43', 'value2 1.92')" print """ # Replace invalid fields """ exec admin "lua box.space[11]:replace(3, 'value1 v1.31', 'value2 1.12')" exec admin "lua box.space[11]:replace(1, 'value1 v1.32', 'value2 1.72')" exec admin "lua box.space[11]:replace(2, 'value1 v1.43', 'value2 1.92')" exec admin "lua box.space[11]:replace('invalid key', 'value1 v1.0', 'value2 v1.0')" print """ #-----------------------------------------------------------------------------# # 64-bit hash select fields test #-----------------------------------------------------------------------------# """ print """ # select by valid keys """ exec admin "lua box.space[11]:select(0, 0ULL)" exec admin "lua box.space[11]:select(0, 1ULL)" exec admin "lua box.space[11]:select(0, 2ULL)" exec admin "lua box.space[11]:select(0, 3ULL)" exec admin "lua box.space[11]:select(0, 4ULL)" exec admin "lua box.space[11]:select(0, 5ULL)" print """ # select by valid NUM keys """ exec admin "lua box.space[11]:select(0, 0)" exec admin "lua box.space[11]:select(0, 1)" exec admin "lua box.space[11]:select(0, 2)" exec admin "lua box.space[11]:select(0, 3)" exec admin "lua box.space[11]:select(0, 4)" exec admin "lua box.space[11]:select(0, 5)" print """ # select by invalid keys """ exec admin "lua box.space[11]:select(0, 'invalid key')" exec admin "lua box.space[11]:select(0, '00000001', '00000002')" print """ #-----------------------------------------------------------------------------# # 64-bit hash delete fields test #-----------------------------------------------------------------------------# """ print """ # delete by valid keys """ exec admin "lua box.space[11]:delete(0ULL)" exec admin "lua box.space[11]:delete(1ULL)" exec admin "lua box.space[11]:delete(2ULL)" exec admin "lua box.space[11]:delete(3ULL)" exec admin "lua box.space[11]:delete(4ULL)" exec admin "lua box.space[11]:delete(5ULL)" exec admin "lua box.space[11]:insert(0ULL, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(1ULL, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(2ULL, 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[11]:insert(3ULL, 'value1 v1.0', 'value2 v1.0')" print """ # delete by valid NUM keys """ exec admin "lua box.space[11]:delete(0)" exec admin "lua box.space[11]:delete(1)" exec admin "lua box.space[11]:delete(2)" exec admin "lua box.space[11]:delete(3)" exec admin "lua box.space[11]:delete(4)" exec admin "lua box.space[11]:delete(5)" print """ # delete by invalid keys """ exec admin "lua box.space[11]:delete('invalid key')" exec admin "lua box.space[11]:delete('00000001', '00000002')" print """ #=============================================================================# # String hash tests #=============================================================================# """ print """ #-----------------------------------------------------------------------------# # String hash inset fields tests #-----------------------------------------------------------------------------# """ print """ # Insert valid fieds """ exec admin "lua box.space[12]:insert('key 0', 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[12]:insert('key 1', 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[12]:insert('key 2', 'value1 v1.0', 'value2 v1.0')" exec admin "lua box.space[12]:insert('key 3', 'value1 v1.0', 'value2 v1.0')" print """ #-----------------------------------------------------------------------------# # String hash replace fields tests #-----------------------------------------------------------------------------# """ print """ # Replace valid fieds """ exec admin "lua box.space[12]:replace('key 3', 'value1 v1.31', 'value2 1.12')" exec admin "lua box.space[12]:replace('key 1', 'value1 v1.32', 'value2 1.72')" exec admin "lua box.space[12]:replace('key 2', 'value1 v1.43', 'value2 1.92')" print """ #-----------------------------------------------------------------------------# # String hash select fields test #-----------------------------------------------------------------------------# """ print """ # select by valid keys """ exec admin "lua box.space[12]:select(0, 'key 0')" exec admin "lua box.space[12]:select(0, 'key 1')" exec admin "lua box.space[12]:select(0, 'key 2')" exec admin "lua box.space[12]:select(0, 'key 3')" exec admin "lua box.space[12]:select(0, 'key 4')" exec admin "lua box.space[12]:select(0, 'key 5')" print """ # select by invalid keys """ exec admin "lua box.space[12]:select(0, 'key 1', 'key 2')" print """ #-----------------------------------------------------------------------------# # String hash delete fields test #-----------------------------------------------------------------------------# """ print """ # delete by valid keys """ exec admin "lua box.space[12]:delete('key 0')" exec admin "lua box.space[12]:delete('key 1')" exec admin "lua box.space[12]:delete('key 2')" exec admin "lua box.space[12]:delete('key 3')" exec admin "lua box.space[12]:delete('key 4')" exec admin "lua box.space[12]:delete('key 5')" print """ # delete by invalid keys """ exec admin "lua box.space[12]:delete('key 1', 'key 2')" # clean-up exec admin "lua box.space[10]:truncate()" exec admin "lua box.space[11]:truncate()" exec admin "lua box.space[12]:truncate()" # # hash::replace tests # exec admin "lua box.space[21]:truncate()" exec sql "insert into t21 values (0, 0, 0, 0)" exec sql "insert into t21 values (1, 1, 1, 1)" exec sql "insert into t21 values (2, 2, 2, 2)" # OK exec sql "replace into t21 values (1, 1, 1, 1)" exec sql "replace into t21 values (1, 10, 10, 10)" exec sql "replace into t21 values (1, 1, 1, 1)" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" exec sql "select * from t21 WHERE k0 = 1" exec sql "select * from t21 WHERE k1 = 1" exec sql "select * from t21 WHERE k2 = 1" exec sql "select * from t21 WHERE k3 = 1" # OK exec sql "insert into t21 values (10, 10, 10, 10)" exec sql "delete from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" # TupleFound (primary key) exec sql "insert into t21 values (1, 10, 10, 10)" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" exec sql "select * from t21 WHERE k0 = 1" # TupleNotFound (primary key) exec sql "replace into t21 values (10, 10, 10, 10)" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" # TupleFound (key #1) exec sql "insert into t21 values (10, 0, 10, 10)" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" exec sql "select * from t21 WHERE k1 = 0" # TupleFound (key #1) exec sql "replace into t21 values (2, 0, 10, 10)" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" exec sql "select * from t21 WHERE k1 = 0" # TupleFound (key #3) exec sql "insert into t21 values (10, 10, 10, 0)" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" exec sql "select * from t21 WHERE k3 = 0" # TupleFound (key #3) exec sql "replace into t21 values (2, 10, 10, 0)" exec sql "select * from t21 WHERE k0 = 10" exec sql "select * from t21 WHERE k1 = 10" exec sql "select * from t21 WHERE k2 = 10" exec sql "select * from t21 WHERE k3 = 10" exec sql "select * from t21 WHERE k3 = 0" exec admin "lua box.space[21]:truncate()" tarantool-1.5.1.218.g1a69fd6/test/big/iterator.result0000664000000000000000000003622212231715257020603 0ustar rootrootlua dofile('utils.lua') --- ... lua box.insert(20, 'pid_001', 'sid_001', 'tid_998', 'a') --- - 'pid_001': {'sid_001', 'tid_998', 'a'} ... lua box.insert(20, 'pid_002', 'sid_001', 'tid_997', 'a') --- - 'pid_002': {'sid_001', 'tid_997', 'a'} ... lua box.insert(20, 'pid_003', 'sid_002', 'tid_997', 'b') --- - 'pid_003': {'sid_002', 'tid_997', 'b'} ... lua box.insert(20, 'pid_005', 'sid_002', 'tid_996', 'b') --- - 'pid_005': {'sid_002', 'tid_996', 'b'} ... lua box.insert(20, 'pid_007', 'sid_003', 'tid_996', 'a') --- - 'pid_007': {'sid_003', 'tid_996', 'a'} ... lua box.insert(20, 'pid_011', 'sid_004', 'tid_996', 'c') --- - 'pid_011': {'sid_004', 'tid_996', 'c'} ... lua box.insert(20, 'pid_013', 'sid_005', 'tid_996', 'b') --- - 'pid_013': {'sid_005', 'tid_996', 'b'} ... lua box.insert(20, 'pid_017', 'sid_006', 'tid_996', 'a') --- - 'pid_017': {'sid_006', 'tid_996', 'a'} ... lua box.insert(20, 'pid_019', 'sid_005', 'tid_995', 'a') --- - 'pid_019': {'sid_005', 'tid_995', 'a'} ... lua box.insert(20, 'pid_023', 'sid_005', 'tid_994', 'a') --- - 'pid_023': {'sid_005', 'tid_994', 'a'} ... #-----------------------------------------------------------------------------# # Iterator: tree single-part unique #-----------------------------------------------------------------------------# lua iterate(20, 0, 0, 1) --- $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 0, 0, 1, box.index.ALL) --- $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 0, 0, 1, box.index.EQ) --- $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 0, 0, 1, box.index.REQ) --- $pid_023$ $pid_019$ $pid_017$ $pid_013$ $pid_011$ $pid_007$ $pid_005$ $pid_003$ $pid_002$ $pid_001$ ... lua iterate(20, 0, 0, 1, box.index.GE) --- $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 0, 0, 1, box.index.GT) --- $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 0, 0, 1, box.index.LE) --- $pid_023$ $pid_019$ $pid_017$ $pid_013$ $pid_011$ $pid_007$ $pid_005$ $pid_003$ $pid_002$ $pid_001$ ... lua iterate(20, 0, 0, 1, box.index.LT) --- $pid_023$ $pid_019$ $pid_017$ $pid_013$ $pid_011$ $pid_007$ $pid_005$ $pid_003$ $pid_002$ $pid_001$ ... lua iterate(20, 0, 0, 1, box.index.EQ, 'pid_003') --- $pid_003$ ... lua iterate(20, 0, 0, 1, box.index.REQ, 'pid_003') --- $pid_003$ ... lua iterate(20, 0, 0, 1, box.index.EQ, 'pid_666') --- ... lua iterate(20, 0, 0, 1, box.index.REQ, 'pid_666') --- ... lua iterate(20, 0, 0, 1, box.index.GE, 'pid_001') --- $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 0, 0, 1, box.index.GT, 'pid_001') --- $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 0, 0, 1, box.index.GE, 'pid_999') --- ... lua iterate(20, 0, 0, 1, box.index.GT, 'pid_999') --- ... lua iterate(20, 0, 0, 1, box.index.LE, 'pid_002') --- $pid_002$ $pid_001$ ... lua iterate(20, 0, 0, 1, box.index.LT, 'pid_002') --- $pid_001$ ... lua iterate(20, 0, 0, 1, box.index.LE, 'pid_000') --- ... lua iterate(20, 0, 0, 1, box.index.LT, 'pid_000') --- ... #-----------------------------------------------------------------------------# # Iterator: tree single-part non-unique #-----------------------------------------------------------------------------# lua iterate(20, 1, 1, 2, box.index.ALL) --- $sid_001$ $sid_001$ $sid_002$ $sid_002$ $sid_003$ $sid_004$ $sid_005$ $sid_005$ $sid_005$ $sid_006$ ... lua iterate(20, 1, 1, 2, box.index.EQ) --- $sid_001$ $sid_001$ $sid_002$ $sid_002$ $sid_003$ $sid_004$ $sid_005$ $sid_005$ $sid_005$ $sid_006$ ... lua iterate(20, 1, 1, 2, box.index.REQ) --- $sid_006$ $sid_005$ $sid_005$ $sid_005$ $sid_004$ $sid_003$ $sid_002$ $sid_002$ $sid_001$ $sid_001$ ... lua iterate(20, 1, 1, 2, box.index.GE) --- $sid_001$ $sid_001$ $sid_002$ $sid_002$ $sid_003$ $sid_004$ $sid_005$ $sid_005$ $sid_005$ $sid_006$ ... lua iterate(20, 1, 1, 2, box.index.GT) --- $sid_001$ $sid_001$ $sid_002$ $sid_002$ $sid_003$ $sid_004$ $sid_005$ $sid_005$ $sid_005$ $sid_006$ ... lua iterate(20, 1, 1, 2, box.index.LE) --- $sid_006$ $sid_005$ $sid_005$ $sid_005$ $sid_004$ $sid_003$ $sid_002$ $sid_002$ $sid_001$ $sid_001$ ... lua iterate(20, 1, 1, 2, box.index.LT) --- $sid_006$ $sid_005$ $sid_005$ $sid_005$ $sid_004$ $sid_003$ $sid_002$ $sid_002$ $sid_001$ $sid_001$ ... lua iterate(20, 1, 1, 2, box.index.EQ, 'sid_005') --- $sid_005$ $sid_005$ $sid_005$ ... lua iterate(20, 1, 1, 2, box.index.REQ, 'sid_005') --- $sid_005$ $sid_005$ $sid_005$ ... lua iterate(20, 1, 1, 2, box.index.GE, 'sid_005') --- $sid_005$ $sid_005$ $sid_005$ $sid_006$ ... lua iterate(20, 1, 1, 2, box.index.GT, 'sid_005') --- $sid_006$ ... lua iterate(20, 1, 1, 2, box.index.GE, 'sid_999') --- ... lua iterate(20, 1, 1, 2, box.index.GT, 'sid_999') --- ... lua iterate(20, 1, 1, 2, box.index.LE, 'sid_005') --- $sid_005$ $sid_005$ $sid_005$ $sid_004$ $sid_003$ $sid_002$ $sid_002$ $sid_001$ $sid_001$ ... lua iterate(20, 1, 1, 2, box.index.LT, 'sid_005') --- $sid_004$ $sid_003$ $sid_002$ $sid_002$ $sid_001$ $sid_001$ ... lua iterate(20, 1, 1, 2, box.index.LE, 'sid_000') --- ... lua iterate(20, 1, 1, 2, box.index.LT, 'sid_000') --- ... #-----------------------------------------------------------------------------# # Iterator: tree multi-part unique #-----------------------------------------------------------------------------# lua iterate(20, 2, 1, 3, box.index.ALL) --- $sid_001$tid_997$ $sid_001$tid_998$ $sid_002$tid_996$ $sid_002$tid_997$ $sid_003$tid_996$ $sid_004$tid_996$ $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.EQ) --- $sid_001$tid_997$ $sid_001$tid_998$ $sid_002$tid_996$ $sid_002$tid_997$ $sid_003$tid_996$ $sid_004$tid_996$ $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.REQ) --- $sid_006$tid_996$ $sid_005$tid_996$ $sid_005$tid_995$ $sid_005$tid_994$ $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.GE) --- $sid_001$tid_997$ $sid_001$tid_998$ $sid_002$tid_996$ $sid_002$tid_997$ $sid_003$tid_996$ $sid_004$tid_996$ $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GT) --- $sid_001$tid_997$ $sid_001$tid_998$ $sid_002$tid_996$ $sid_002$tid_997$ $sid_003$tid_996$ $sid_004$tid_996$ $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.LE) --- $sid_006$tid_996$ $sid_005$tid_996$ $sid_005$tid_995$ $sid_005$tid_994$ $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.LT) --- $sid_006$tid_996$ $sid_005$tid_996$ $sid_005$tid_995$ $sid_005$tid_994$ $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005') --- $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_995') --- $sid_005$tid_995$ ... lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_999') --- ... lua iterate(20, 2, 1, 3, box.index.REQ, 'sid_005') --- $sid_005$tid_996$ $sid_005$tid_995$ $sid_005$tid_994$ ... lua iterate(20, 2, 1, 3, box.index.REQ, 'sid_005', 'tid_995') --- $sid_005$tid_995$ ... lua iterate(20, 2, 1, 3, box.index.REQ, 'sid_005', 'tid_999') --- ... lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005') --- $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GT, 'sid_005') --- $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_995') --- $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GT, 'sid_005', 'tid_995') --- $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_999') --- $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GT, 'sid_005', 'tid_999') --- $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GE, 'sid_999') --- ... lua iterate(20, 2, 1, 3, box.index.GT, 'sid_999') --- ... lua iterate(20, 2, 1, 3, box.index.LE, 'sid_005') --- $sid_005$tid_996$ $sid_005$tid_995$ $sid_005$tid_994$ $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.LT, 'sid_005') --- $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.LE, 'sid_005', 'tid_997') --- $sid_005$tid_996$ $sid_005$tid_995$ $sid_005$tid_994$ $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.LT, 'sid_005', 'tid_997') --- $sid_005$tid_996$ $sid_005$tid_995$ $sid_005$tid_994$ $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.LE, 'sid_005', 'tid_000') --- $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.LT, 'sid_005', 'tid_000') --- $sid_004$tid_996$ $sid_003$tid_996$ $sid_002$tid_997$ $sid_002$tid_996$ $sid_001$tid_998$ $sid_001$tid_997$ ... lua iterate(20, 2, 1, 3, box.index.LE, 'sid_000') --- ... lua iterate(20, 2, 1, 3, box.index.LT, 'sid_000') --- ... #-----------------------------------------------------------------------------# # Iterator: tree multi-part non-unique #-----------------------------------------------------------------------------# lua iterate(20, 3, 2, 4, box.index.ALL) --- $tid_994$a$ $tid_995$a$ $tid_996$a$ $tid_996$a$ $tid_996$b$ $tid_996$b$ $tid_996$c$ $tid_997$a$ $tid_997$b$ $tid_998$a$ ... lua iterate(20, 3, 2, 4, box.index.EQ) --- $tid_994$a$ $tid_995$a$ $tid_996$a$ $tid_996$a$ $tid_996$b$ $tid_996$b$ $tid_996$c$ $tid_997$a$ $tid_997$b$ $tid_998$a$ ... lua iterate(20, 3, 2, 4, box.index.REQ) --- $tid_998$a$ $tid_997$b$ $tid_997$a$ $tid_996$c$ $tid_996$b$ $tid_996$b$ $tid_996$a$ $tid_996$a$ $tid_995$a$ $tid_994$a$ ... lua iterate(20, 3, 2, 4, box.index.GE) --- $tid_994$a$ $tid_995$a$ $tid_996$a$ $tid_996$a$ $tid_996$b$ $tid_996$b$ $tid_996$c$ $tid_997$a$ $tid_997$b$ $tid_998$a$ ... lua iterate(20, 3, 2, 4, box.index.GT) --- $tid_994$a$ $tid_995$a$ $tid_996$a$ $tid_996$a$ $tid_996$b$ $tid_996$b$ $tid_996$c$ $tid_997$a$ $tid_997$b$ $tid_998$a$ ... lua iterate(20, 3, 2, 4, box.index.LE) --- $tid_998$a$ $tid_997$b$ $tid_997$a$ $tid_996$c$ $tid_996$b$ $tid_996$b$ $tid_996$a$ $tid_996$a$ $tid_995$a$ $tid_994$a$ ... lua iterate(20, 3, 2, 4, box.index.LT) --- $tid_998$a$ $tid_997$b$ $tid_997$a$ $tid_996$c$ $tid_996$b$ $tid_996$b$ $tid_996$a$ $tid_996$a$ $tid_995$a$ $tid_994$a$ ... lua iterate(20, 3, 2, 4, box.index.EQ, 'tid_996') --- $tid_996$a$ $tid_996$a$ $tid_996$b$ $tid_996$b$ $tid_996$c$ ... lua iterate(20, 3, 2, 4, box.index.EQ, 'tid_996', 'a') --- $tid_996$a$ $tid_996$a$ ... lua iterate(20, 3, 2, 4, box.index.EQ, 'tid_996', 'z') --- ... lua iterate(20, 3, 2, 4, box.index.REQ, 'tid_996') --- $tid_996$c$ $tid_996$b$ $tid_996$b$ $tid_996$a$ $tid_996$a$ ... lua iterate(20, 3, 2, 4, box.index.REQ, 'tid_996', 'a') --- $tid_996$a$ $tid_996$a$ ... lua iterate(20, 3, 2, 4, box.index.REQ, 'tid_996', '0') --- ... lua iterate(20, 3, 2, 4, box.index.GE, 'tid_997') --- $tid_997$a$ $tid_997$b$ $tid_998$a$ ... lua iterate(20, 3, 2, 4, box.index.GT, 'tid_997') --- $tid_998$a$ ... lua iterate(20, 3, 2, 4, box.index.GE, 'tid_998') --- $tid_998$a$ ... lua iterate(20, 3, 2, 4, box.index.GT, 'tid_998') --- ... lua iterate(20, 3, 2, 4, box.index.LE, 'tid_997') --- $tid_997$b$ $tid_997$a$ $tid_996$c$ $tid_996$b$ $tid_996$b$ $tid_996$a$ $tid_996$a$ $tid_995$a$ $tid_994$a$ ... lua iterate(20, 3, 2, 4, box.index.LT, 'tid_997') --- $tid_996$c$ $tid_996$b$ $tid_996$b$ $tid_996$a$ $tid_996$a$ $tid_995$a$ $tid_994$a$ ... lua iterate(20, 3, 2, 4, box.index.LE, 'tid_000') --- ... lua iterate(20, 3, 2, 4, box.index.LT, 'tid_000') --- ... lua iterate(20, 3, 2, 4, box.index.LT, 'tid_996', 'to', 'many', 'keys') --- error: 'utils.lua:27: Key part count 4 is greater than index part count 2' ... #-----------------------------------------------------------------------------# # Iterator: hash single-part unique #-----------------------------------------------------------------------------# lua iterate(20, 4, 0, 1) --- sorted output $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 4, 0, 1, box.index.ALL) --- sorted output $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 4, 0, 1, box.index.EQ) --- error: 'Invalid key part count in an exact match (expected 1, got 0)' ... lua iterate(20, 4, 0, 1, box.index.GE) --- sorted output $pid_001$ $pid_002$ $pid_003$ $pid_005$ $pid_007$ $pid_011$ $pid_013$ $pid_017$ $pid_019$ $pid_023$ ... lua iterate(20, 4, 0, 1, box.index.EQ, 'pid_003') --- sorted output $pid_003$ ... lua iterate(20, 4, 0, 1, box.index.EQ, 'pid_666') --- sorted output ... lua iterate(20, 4, 0, 1, box.index.GE, 'pid_001') --- sorted output $pid_001$ $pid_007$ $pid_011$ $pid_019$ $pid_023$ ... lua iterate(20, 4, 0, 1, box.index.GE, 'pid_999') --- sorted output ... #-----------------------------------------------------------------------------# # Iterator: hash multi-part unique #-----------------------------------------------------------------------------# lua iterate(20, 5, 1, 3, box.index.ALL) --- sorted output $sid_001$tid_997$ $sid_001$tid_998$ $sid_002$tid_996$ $sid_002$tid_997$ $sid_003$tid_996$ $sid_004$tid_996$ $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 5, 1, 3, box.index.EQ) --- error: 'Invalid key part count in an exact match (expected 2, got 0)' ... lua iterate(20, 5, 1, 3, box.index.EQ, 'sid_005') --- error: 'Invalid key part count in an exact match (expected 2, got 1)' ... lua iterate(20, 5, 1, 3, box.index.GE) --- sorted output $sid_001$tid_997$ $sid_001$tid_998$ $sid_002$tid_996$ $sid_002$tid_997$ $sid_003$tid_996$ $sid_004$tid_996$ $sid_005$tid_994$ $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_995') --- $sid_005$tid_995$ ... lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_999') --- ... lua iterate(20, 2, 1, 3, box.index.EQ, 'sid_005', 'tid_995', 'a') --- error: 'utils.lua:27: Key part count 3 is greater than index part count 2' ... lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_995') --- $sid_005$tid_995$ $sid_005$tid_996$ $sid_006$tid_996$ ... lua iterate(20, 2, 1, 3, box.index.GE, 'sid_005', 'tid_999') --- $sid_006$tid_996$ ... #-----------------------------------------------------------------------------# # Iterator: various #-----------------------------------------------------------------------------# lua box.space[20].index[0]:iterator(-666) --- error: 'unknown iterator type: -666' ... lua box.space[20]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/big/tarantool.cfg0000664000000000000000000002776512231715257020212 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "STR" space[0].index[1].type = "TREE" space[0].index[1].unique = 0 space[0].index[1].key_field[0].fieldno = 1 space[0].index[1].key_field[0].type = "STR" space[1].enabled = 1 space[1].index[0].type = "HASH" space[1].index[0].unique = 1 space[1].index[0].key_field[0].fieldno = 0 space[1].index[0].key_field[0].type = "STR" space[1].index[1].type = "TREE" space[1].index[1].unique = 1 space[1].index[1].key_field[0].fieldno = 1 space[1].index[1].key_field[0].type = "STR" space[1].index[1].key_field[1].fieldno = 2 space[1].index[1].key_field[1].type = "STR" space[2].enabled = 1 space[2].index[0].type = "TREE" space[2].index[0].unique = 1 space[2].index[0].key_field[0].fieldno = 0 space[2].index[0].key_field[0].type = "NUM" space[3].enabled = 1 space[3].index[0].type = "TREE" space[3].index[0].unique = 1 space[3].index[0].key_field[0].fieldno = 0 space[3].index[0].key_field[0].type = "STR" space[4].enabled = 1 space[4].index[0].type = "HASH" space[4].index[0].unique = 1 space[4].index[0].key_field[0].fieldno = 0 space[4].index[0].key_field[0].type = "STR" space[4].index[1].type = "TREE" space[4].index[1].unique = 0 space[4].index[1].key_field[0].fieldno = 1 space[4].index[1].key_field[0].type = "STR" space[5].enabled = 1 space[5].index[0].type = "TREE" space[5].index[0].unique = 1 space[5].index[0].key_field[0].fieldno = 0 space[5].index[0].key_field[0].type = "NUM64" space[5].index[1].type = "TREE" space[5].index[1].unique = 0 space[5].index[1].key_field[0].fieldno = 1 space[5].index[1].key_field[0].type = "STR" space[5].index[1].key_field[1].fieldno = 2 space[5].index[1].key_field[1].type = "STR" # # Tree index variants # # Tuple fields: # # 0: NUM, 1: NUM64, 2: NUM64, 3: STR, 4: STR, 5: STR, 6: STR, 7: *, 8: NUM # space[6].enabled = 1 space[6].index[0].type = "TREE" space[6].index[0].unique = 1 space[6].index[0].key_field[0].fieldno = 0 space[6].index[0].key_field[0].type = "NUM" space[6].index[1].type = "TREE" space[6].index[1].unique = 1 space[6].index[1].key_field[0].fieldno = 1 space[6].index[1].key_field[0].type = "NUM64" space[6].index[2].type = "TREE" space[6].index[2].unique = 0 space[6].index[2].key_field[0].fieldno = 2 space[6].index[2].key_field[0].type = "NUM64" space[6].index[3].type = "TREE" space[6].index[3].unique = 0 space[6].index[3].key_field[0].fieldno = 3 space[6].index[3].key_field[0].type = "STR" space[6].index[3].key_field[1].fieldno = 4 space[6].index[3].key_field[1].type = "STR" space[6].index[4].type = "TREE" space[6].index[4].unique = 0 space[6].index[4].key_field[0].fieldno = 6 space[6].index[4].key_field[0].type = "STR" space[6].index[4].key_field[1].fieldno = 5 space[6].index[4].key_field[1].type = "STR" space[6].index[5].type = "TREE" space[6].index[5].unique = 0 space[6].index[5].key_field[0].fieldno = 8 space[6].index[5].key_field[0].type = "NUM" space[6].index[6].type = "TREE" space[6].index[6].unique = 1 space[6].index[6].key_field[0].fieldno = 6 space[6].index[6].key_field[0].type = "STR" space[6].index[6].key_field[1].fieldno = 5 space[6].index[6].key_field[1].type = "STR" space[6].index[6].key_field[2].fieldno = 3 space[6].index[6].key_field[2].type = "STR" space[6].index[6].key_field[3].fieldno = 4 space[6].index[6].key_field[3].type = "STR" space[6].index[6].key_field[4].fieldno = 8 space[6].index[6].key_field[4].type = "NUM" # Space #7, https://bugs.launchpad.net/tarantool/+bug/929654 space[7].enabled = true space[7].index[0].type = "HASH" space[7].index[0].unique = true space[7].index[0].key_field[0].fieldno = 0 space[7].index[0].key_field[0].type = "NUM" space[7].index[1].type = "HASH" space[7].index[1].unique = true space[7].index[1].key_field[0].fieldno = 1 space[7].index[1].key_field[0].type = "STR" # Lua 64bit numbers space[8].enabled = true space[8].index[0].type = "TREE" space[8].index[0].unique = 1 space[8].index[0].key_field[0].fieldno = 0 space[8].index[0].key_field[0].type = "NUM64" space[9].enabled = true # Multipart primary key (sender nickname, receiver nickname, message id) space[9].index[0].type = "TREE" space[9].index[0].unique = 1 # Sender user nickname space[9].index[0].key_field[0].fieldno = 0 space[9].index[0].key_field[0].type = "STR" # Receiver user nickname space[9].index[0].key_field[1].fieldno = 1 space[9].index[0].key_field[1].type = "STR" # Message id space[9].index[0].key_field[2].fieldno = 2 space[9].index[0].key_field[2].type = "NUM" # First space for hash_i32 tests space[10].enabled = 1 space[10].index[0].type = "HASH" space[10].index[0].unique = 1 space[10].index[0].key_field[0].fieldno = 0 space[10].index[0].key_field[0].type = "NUM" # Second space for hash_i64 tests space[11].enabled = 1 space[11].index[0].type = "HASH" space[11].index[0].unique = 1 space[11].index[0].key_field[0].fieldno = 0 space[11].index[0].key_field[0].type = "NUM64" # First space for hash_str tests space[12].enabled = 1 space[12].index[0].type = "HASH" space[12].index[0].unique = 1 space[12].index[0].key_field[0].fieldno = 0 space[12].index[0].key_field[0].type = "STR" # lua select_reverse_range() testing # https://blueprints.launchpad.net/tarantool/+spec/backward-tree-index-iterator space[14].enabled = true space[14].index[0].type = "TREE" space[14].index[0].unique = 1 space[14].index[0].key_field[0].fieldno = 0 space[14].index[0].key_field[0].type = "NUM" space[14].index[1].type = "TREE" space[14].index[1].unique = 1 space[14].index[1].key_field[0].fieldno = 1 space[14].index[1].key_field[0].type = "NUM" space[14].index[1].key_field[1].fieldno = 0 space[14].index[1].key_field[1].type = "NUM" space[15].enabled = true space[15].index[0].type = "TREE" space[15].index[0].unique = true space[15].index[0].key_field[0].fieldno = 0 space[15].index[0].key_field[0].type = "STR" # Tests for box.index iterators (old) space[16].enabled = true space[16].index[0].type = "TREE" space[16].index[0].unique = 1 space[16].index[0].key_field[0].fieldno = 0 space[16].index[0].key_field[0].type = "STR" space[16].index[1].type = "TREE" space[16].index[1].unique = 1 space[16].index[1].key_field[0].fieldno = 1 space[16].index[1].key_field[0].type = "STR" space[16].index[1].key_field[1].fieldno = 2 space[16].index[1].key_field[1].type = "STR" # lua index.idx:count() testing # https://blueprints.launchpad.net/tarantool/+spec/lua-builtin-size-of-subtree space[17].enabled = true space[17].index[0].type = "HASH" space[17].index[0].unique = 1 space[17].index[0].key_field[0].fieldno = 0 space[17].index[0].key_field[0].type = "NUM" space[17].index[1].type = "TREE" space[17].index[1].unique = 0 space[17].index[1].key_field[0].fieldno = 1 space[17].index[1].key_field[0].type = "NUM" space[17].index[1].key_field[1].fieldno = 2 space[17].index[1].key_field[1].type = "NUM" # lua box.auto_increment() testing # http://bugs.launchpad.net/tarantool/+bug/1006354 space[18].enabled = 1 space[18].index[0].type = "TREE" space[18].index[0].unique = 1 space[18].index[0].key_field[0].fieldno = 0 space[18].index[0].key_field[0].type = "NUM" # Space #19, https://bugs.launchpad.net/tarantool/+bug/1082356 space[19].enabled = 1 space[19].index[0].type = "TREE" space[19].index[0].unique = 1 space[19].index[0].key_field[0].fieldno = 0 space[19].index[0].key_field[0].type = "NUM" space[19].index[0].key_field[1].fieldno = 2 space[19].index[0].key_field[1].type = "NUM" # # Tests for box.index iterators (new) # # Tree single-part unique space[20].enabled = true space[20].index[0].type = "TREE" space[20].index[0].unique = 1 space[20].index[0].key_field[0].fieldno = 0 space[20].index[0].key_field[0].type = "STR" # Tree single-part non-unique space[20].index[1].type = "TREE" space[20].index[1].unique = 0 space[20].index[1].key_field[0].fieldno = 1 space[20].index[1].key_field[0].type = "STR" # Tree multi-part unique space[20].index[2].type = "TREE" space[20].index[2].unique = 1 space[20].index[2].key_field[0].fieldno = 1 space[20].index[2].key_field[0].type = "STR" space[20].index[2].key_field[1].fieldno = 2 space[20].index[2].key_field[1].type = "STR" # Tree multi-part non-unique space[20].index[3].type = "TREE" space[20].index[3].unique = 0 space[20].index[3].key_field[0].fieldno = 2 space[20].index[3].key_field[0].type = "STR" space[20].index[3].key_field[1].fieldno = 3 space[20].index[3].key_field[1].type = "STR" # Hash single-part unique space[20].index[4].type = "HASH" space[20].index[4].unique = 1 space[20].index[4].key_field[0].fieldno = 0 space[20].index[4].key_field[0].type = "STR" # Hash multi-part unique space[20].index[5].type = "HASH" space[20].index[5].unique = 1 space[20].index[5].key_field[0].fieldno = 1 space[20].index[5].key_field[0].type = "STR" space[20].index[5].key_field[1].fieldno = 2 space[20].index[5].key_field[1].type = "STR" # hash::replace space[21].enabled = true space[21].index[0].type = "HASH" space[21].index[0].unique = true space[21].index[0].key_field[0].fieldno = 0 space[21].index[0].key_field[0].type = "NUM" space[21].index[1].type = "HASH" space[21].index[1].unique = true space[21].index[1].key_field[0].fieldno = 1 space[21].index[1].key_field[0].type = "NUM" space[21].index[2].type = "HASH" space[21].index[2].unique = true space[21].index[2].key_field[0].fieldno = 2 space[21].index[2].key_field[0].type = "NUM" space[21].index[3].type = "HASH" space[21].index[3].unique = true space[21].index[3].key_field[0].fieldno = 3 space[21].index[3].key_field[0].type = "NUM" # tree::replace test space[22].enabled = true space[22].index[0].type = "TREE" space[22].index[0].unique = true space[22].index[0].key_field[0].fieldno = 0 space[22].index[0].key_field[0].type = "NUM" space[22].index[1].type = "TREE" space[22].index[1].unique = true space[22].index[1].key_field[0].fieldno = 1 space[22].index[1].key_field[0].type = "NUM" space[22].index[2].type = "TREE" space[22].index[2].unique = false space[22].index[2].key_field[0].fieldno = 2 space[22].index[2].key_field[0].type = "NUM" space[22].index[3].type = "TREE" space[22].index[3].unique = true space[22].index[3].key_field[0].fieldno = 3 space[22].index[3].key_field[0].type = "NUM" # Space #23, https://bugs.launchpad.net/tarantool/+bug/1042798 space[23].enabled = 1 space[23].index[0].type = "TREE" space[23].index[0].unique = 1 space[23].index[0].key_field[0].fieldno = 2 space[23].index[0].key_field[0].type = "NUM" space[23].index[0].key_field[1].fieldno = 1 space[23].index[0].key_field[1].type = "NUM" # bitset::replace test space[24].enabled = true space[24].index[0].type = "HASH" space[24].index[0].unique = true space[24].index[0].key_field[0].fieldno = 0 space[24].index[0].key_field[0].type = "NUM" space[24].index[1].type = "BITSET" space[24].index[1].unique = false space[24].index[1].key_field[0].fieldno = 1 space[24].index[1].key_field[0].type = "NUM" # lua box.auto_increment() with NUM64 keys testing space[25].enabled = 1 space[25].index[0].type = "TREE" space[25].index[0].unique = 1 space[25].index[0].key_field[0].fieldno = 0 space[25].index[0].key_field[0].type = "NUM64" # index:random test space[26].enabled = true space[26].index[0].type = "TREE" space[26].index[0].unique = true space[26].index[0].key_field[0].fieldno = 0 space[26].index[0].key_field[0].type = "NUM" space[26].index[1].type = "HASH" space[26].index[1].unique = true space[26].index[1].key_field[0].fieldno = 0 space[26].index[1].key_field[0].type = "NUM" # Multi-part hash space[27].enabled = 1 space[27].index[0].type = HASH space[27].index[0].unique = 1 space[27].index[0].key_field[0].fieldno = 0 space[27].index[0].key_field[0].type = NUM space[27].index[0].key_field[1].fieldno = 1 space[27].index[0].key_field[1].type = STR space[27].index[0].key_field[2].fieldno = 2 space[27].index[0].key_field[2].type = NUM space[27].index[1].type = HASH space[27].index[1].unique = 1 space[27].index[1].key_field[0].fieldno = 2 space[27].index[1].key_field[0].type = NUM space[27].index[1].key_field[1].fieldno = 4 space[27].index[1].key_field[1].type = NUM tarantool-1.5.1.218.g1a69fd6/test/unit/0000775000000000000000000000000012231715257015723 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/unit/cmake_install.cmake0000664000000000000000000000225512213333035021525 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/test/unit/bitset_index.result0000664000000000000000000000112012202131537021625 0ustar rootroot *** test_get_size *** *** test_get_size: done *** *** test_resize *** *** test_resize: done *** *** test_insert_remove *** Generating test set... ok Inserting pairs... ok Checking keys... ok Removing random pairs... ok Checking keys... ok *** test_insert_remove: done *** *** test_empty_simple *** *** test_empty_simple: done *** *** test_all_simple *** *** test_all_simple: done *** *** test_all_set_simple *** *** test_all_set_simple: done *** *** test_any_set_simple *** *** test_any_set_simple: done *** *** test_equals_simple *** *** test_equals_simple: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/bit.c0000664000000000000000000001022712202131537016636 0ustar rootroot#include #include #include #include #include #include "unit.h" static uint64_t vals[] = { 0UL, 1UL, 2UL, 32768UL, 65535UL, 65536UL, 726075912UL, 858993459UL, 1073741824UL, 1245250552UL, 1431655765UL, 1656977767UL, 2147483648UL, 2283114629UL, 2502548245UL, 4294967295UL, 708915120906848425UL, 1960191741125985428UL, 3689348814741910323UL, 5578377670650038654UL, 9223372036854775808UL, 10755112315580060033UL, 11163782031541429823UL, 13903686156871869732UL, 14237897302422917095UL, 14302190498657618739UL, 15766411510232741269UL, 15984546468465238145UL, 18446744073709551615UL }; static void test_ctz_clz(void) { header(); for (size_t i = 0; i < sizeof(vals) / sizeof(vals[0]); i++) { if (vals[i] == 0) continue; uint64_t val64 = vals[i]; uint32_t val32 = (uint32_t) vals[i]; printf("bit_ctz_u64(%" PRIu64 ") => %d\n", val64, bit_ctz_u64(val64)); printf("bit_clz_u64(%" PRIu64 ") => %d\n", val64, bit_clz_u64(val64)); if (vals[i] > UINT32_MAX) continue; printf("bit_ctz_u32(%" PRIu32 ") => %d\n", val32, bit_ctz_u32(val32)); printf("bit_clz_u32(%" PRIu32 ") => %d\n", val32, bit_clz_u32(val32)); } footer(); } static void test_count(void) { header(); for (size_t i = 0; i < sizeof(vals) / sizeof(vals[0]); i++) { uint64_t val64 = vals[i]; uint32_t val32 = (uint32_t) vals[i]; printf("bit_count_u64(%" PRIu64 ") => %d\n", val64, bit_count_u64(val64)); if (vals[i] > UINT32_MAX) continue; printf("bit_count_u32(%" PRIu32 ") => %d\n", val32, bit_count_u32(val32)); } footer(); } static void test_rotl_rotr_one(int rot) { for (size_t i = 0; i < sizeof(vals) / sizeof(vals[0]); i++) { uint64_t val64 = vals[i]; uint32_t val32 = (uint32_t) vals[i]; printf("bit_rotl_u64(%" PRIu64 ", %d) => %" PRIu64 "\n", val64, rot, bit_rotl_u64(val64, rot)); printf("bit_rotr_u64(%" PRIu64 ", %d) => %" PRIu64 "\n", val64, rot, bit_rotr_u64(val64, rot)); if (vals[i] > UINT32_MAX || rot > 32) continue; printf("bit_rotl_u32(%" PRIu32 ", %d) => %" PRIu32 "\n", val32, rot, bit_rotl_u32(val32, rot)); printf("bit_rotr_u32(%" PRIu32 ", %d) => %" PRIu32 "\n", val32, rot, bit_rotr_u32(val32, rot)); } } static void test_rotl_rotr(void) { header(); int rots[] = { 0, 1, 15, 16, 31, 32, 63, 64 }; for (int r = 0; r < sizeof(rots) / sizeof(rots[0]); r++) { test_rotl_rotr_one(rots[r]); } footer(); } static void test_bswap(void) { header(); for (size_t i = 0; i < sizeof(vals) / sizeof(vals[0]); i++) { uint64_t val64 = vals[i]; uint32_t val32 = (uint32_t) vals[i]; printf("bswap_u64(%" PRIu64 ") => %" PRIu64 "\n", val64, bswap_u64(val64)); if (vals[i] > UINT32_MAX) continue; printf("bswap_u32(%" PRIu32 ") => %" PRIu32 "\n", val32, bswap_u32(val32)); } footer(); } static inline void test_index_print(const int *start, const int *end) { for (const int *cur = start; cur < end; cur++) { printf("%d ", *cur); } } static void test_index(void) { header(); int indexes[sizeof(int64_t) * CHAR_BIT]; for (size_t i = 0; i < sizeof(vals) / sizeof(vals[0]); i++) { uint64_t val64 = vals[i]; uint32_t val32 = (uint32_t) vals[i]; printf("bit_index_u64(%" PRIu64 ", *, -1) => ", val64); test_index_print(indexes, bit_index_u64(val64, indexes, -1)); printf("\n"); if (vals[i] > UINT32_MAX) continue; printf("bit_index_u32(%" PRIu32 ", *, -1) => ", val32); test_index_print(indexes, bit_index_u32(val32, indexes, -1)); printf("\n"); } footer(); } static void test_bit_iter(void) { header(); struct bit_iterator it; uint64_t *data = vals + 6; size_t size = 10; size_t pos = 0; printf("Set: "); bit_iterator_init(&it, data, size, true); while ( (pos = bit_iterator_next(&it)) != SIZE_MAX) { printf("%zu, ", pos); fail_unless(bit_test(data, pos)); } printf("\n"); printf("Clear: "); bit_iterator_init(&it, data, size, false); while ( (pos = bit_iterator_next(&it)) != SIZE_MAX) { printf("%zu, ", pos); fail_if(bit_test(data, pos)); } printf("\n"); footer(); } int main(void) { test_ctz_clz(); test_count(); test_rotl_rotr(); test_bswap(); test_index(); test_bit_iter(); } tarantool-1.5.1.218.g1a69fd6/test/unit/rope_stress.test0000775000000000000000000010457712213333046021205 0ustar rootrootELF> @@m@8@&#@@@@@@@@@Y4Y4 `4`4``4` x4x4`x4`@@DDPtd`-`-@`-@<<Qtd/lib64/ld-linux-x86-64.so.2GNU GNU+P9t%n{V&5]OEoeT T@D!"$')*$$Fik|qXK| j C!$/BE9 uZb3b/ Y : {{R + : N h: $@ @)@q )$@ @0k @h7`R)@x7` Z#@E 7` @w @#h7`h7` )@* #@Z @a )@K  @ (@vG  7` @!libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitsrandputstimeputcharabort__assert_failstrlenmallocstderrfprintf__libc_start_mainsnprintffree__libc_csu_finirope_iter_next_edatarope_iter_startrope_check__data_start_IO_stdin_used__libc_csu_initrope_traverse_endrope_pretty_print__bss_startrope_insertrope_eraserope_extract_noderope_clearGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui X6` h7`#x6`6`6`6`6`6`6`6` 6` 6` 6` 6` 6`6`!6`6`6`7`HH* HtH5* %* @%* h%z* h%r* h%j* h%b* h%Z* h%R* h%J* hp%B* h`%:* h P%2* h @%** h 0%"* h %* h %* h% * h%* h%) h1I^HHPTI)@H )@H@7o7`UH-h7`HHw]øHt]h7`h7`UH-h7`HHHH?HHHu]úHt]h7`=) uUH~]) @H=& tHtUp4`H]{vUHH}H}t HE@]UHHH}HEHHUHH}HuHUHMLELMHEHHEHUHPHEHUHPHEHUHP HEHUHP(HEHUHP]UHH@H}HuHUHMLEHUHEؾ0HHEH}u*LEH}HMHUHuHEMIH5HEUHHH}HEHzHEH@(HUHRHMHHUHH}HuHUHMHEHUH]UHHH}HuHEHTUHHH}HuHEHVUHSHH+@)@A~@`@?@HEEEE|̉Љ)‰H@7`HEHEHEHEHEUȍJUMHUЋuHEH ŰEȍHEH9tAH& H$+@AA)@K*@Q*@p*@HǸHEHHEH>EuȉUE;EumUHEH HEH;EtAH@& H$+@AA)@K*@*@p*@HǸ8~HEHHEE;ExHEH+@*@HH[]UHSHH*@)@~A~@`@?@HEEPEẺЉ)‰H@7`HEHEHEHEHEUȍJUMHUЋuHEH ŰEȍHEH9tAH$ H$*@A3A)@K*@Q*@p*@HǸHEHAEuȉUE;EumUHEH HEH;EtAHC$ H$*@A9A)@K*@*@p*@HǸ;MMb)Éi)‰Ѕu HEH!EE;EZHEHX*@*@{HH[]UH]UHH}H}t HE@]UHHH}HEHHUHH}HuHEHUH]UHH}H}tHE]UHSHH}HEH@HpHEH@ H^HE@HEPHEH@HHEH@ H~9~HEH@HjHEH@ HUHUH[]UHH0H}HuUHEH@ HUHR(HHEH}uNHEHEU܉PHEPHEPHEHUHPHEH@ HEHP HEHPHEUHH H}HEHHEgHEH@Hu*HEH@ HEHEH@(HUHRHMHH(HEH@HEHEHP HEHPHEHUHP HEHEH}uHEHUHH0H}HuUHE@EHEU܉PHEH@M܋UHuHvH}HHEE܋U)HMHEHHwUHH H}u}HEHcHHDHE}HEUHcHHTHEHcHHTHEUHcHJHUHTHEH[HEHOHEUHSHH}u}؃}Ѓ}HEHcHHDH)HHEHcHHTUHEHH[]UHSHXH}HuUYHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEH?EHEH0EЋE9EMEЍPHEE;EEЋUԉ)ȃHEUHcHHDHEȃ}HEHcHHDHEHEHEHEHEE;E|$HEH}HEHH"HEH}HEH0HE;Et m}tHEH;EHX[]UHSHPH}HuBHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEHEHEHEЋE9EMEЍPHEEЋUԉ)ȃEЋUԉ)ȃHE؋UHcHHDHEȃ}HEHcHHDHEHEH%EHEHEE;EHEHUHEH9HHEHUHEHHHEH;EHP[]UHH8H}HuHUHEЋEHEHHHEHEPHEHEPHEH@HEE;EsHEHEHPHEH0E)EHE@;Ew3HE@)EHEHEHP HEHHEHHHjHEЋUHEUHH}uUHEHHHEHEEHHHHEHHPHEHPHEHHHEHEPEHEPHE}HHHHEHHPHEHHEHHHuHE]UHHHhdHX`HhH‹d9sHhHd`uR-@V +@f+@`HXHhHHkHEH}u HhHp`HdHpHHHEHEHHHdtqdHEHHHhHH HEH}u HEHUHPHEPHEHEPHE@HEPHEHEHE@‹dHEHHEHEHHUHHEHMHpHHHUHHHxtHxH‹t9w@-@ +@k+@;HxHHtHHHEHEtuHEHHtHEHHHxHHHEH}uLHE@HEHHEHEHHUHHEHMHHHHEHUHSHH84H8H‹49w*-@ +@k+@H8H@H4H@HHH!HEHEHHHEHE@4uTH8H@HURHMHqH8HyHHEHPHE@PHEPHE@EH8H@4HURHuHvH8HHE4HEPE̍P49u ?H8H@4M̉)ӉډH8HyHuHE4Ủ)ȍPHMH8HHSHEH}u HE@HEHxHEHEHHUHHEHMH@HHz4t*-@ +@+@HEH@HHEH@ HHEHEHEH@ HEH@9E܋MHEHHHEHEHHHEHEHPHEHPHEPHEЉPHEЋUHcHHDHE5HEЋPHE@)HEЉP}HEHcHHDHEHEH;EuHEH@HEHEHHUMHcHHTHH8H@(HMH8HHHUH@HHHLH[]UHH}2HEH@HPHEH@HH@HHEH@HPHEHPHEH@HH@Hu]UHHH}HEHPHEHPHEH@HUHHHHEH@HHt HEHaHEH@HUHHH}HEH@HH@ Ht@HEH@HPHEH@HH@ HHEH@HPHEHPHEHbHEH@HUHH9uHEH@HBHEH@HPHEHPHEH@HHHEH@HH@ H9tHEH@HUHHHhH`HhHpHHHpHHE3HE@HEHPH`HHHpHHEH}uHleaf_size != 0node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_sizenode->height == (((rope_node_height(node->link[0])) > (rope_node_height(node->link[1])) ? (rope_node_height(node->link[0])) : (rope_node_height(node->link[1]))) + 1)┌──└──│ %s%snil{ len = %zu, height = %d, data = ''}size = %zu string = ''rope_checkrope_eraserope_extract_noderope_insert;<&X=(Hh<El8Xx;7 9Hp6y HNpVZ EHhPzRx P*zRx  AC Z < AC X \eAC ` |MlAC g 6AC q !AC \ AC Y AC Y $ AC E $D'AC E l0AC k AC Z AC X AC T AC Y $ AC E 4AC  TsAC  thAC c /AC  $sAC Ei $AC E $NpAC Ef ,AC  L@AC  zPLRx @ $$ 4@AC  $LQ!4@AC  $tJ+4@AC H RAC M $ZAC U DBAC  $;4@AC  $VAC J $L2I4@AC E vAC q $PJf@X$    e  @ @ @ )@`4`h4`o`@@@ @  `6` @ @0 o @oo4 @x4` @ @ @& @6 @F @V @f @v @ @ @ @ @ @ @ @ @ @)@)@)@)@)@GCC: (Debian 4.7.3-4) 4.7.3, @,r@nP @@[?int6Z&f(x~44)4*  - 6. a(/I 1F# 3[# 5[# 7# )9I#`YY= d0< >`# g@# *Bm# D# F# JH#(fBD,--KF - ]F# 8# v# %# # O#(#0i#8N#@k#H#P#X #` ##h F#pF#t #x#F#)#9#&#q/#x0#1#2#34#5F#/7?#  # '## F#9YOYyU[ @@fU`h3g[@8@`dghn8@@-dnhnm`nXoPoHgp@@ @ mXPH@gdhU @?@dh?@`@6ctxh`4X4P`@~@@xh4`F~@@hptr` @@]Em +@d P  LiF\@n@d@lenF[[XmY]&@@`E *@d*P + Li,F\@@d.@len/F0[1[X]bBF@@OY? @7`# pP@)@>[?int6Z&f'F(444  - 6. a(/> 1F# 3[# 5[# 7# )9>#UNN= d0< >U# g@# *Bx# D# F# JH#(K dM#topO# Q#[UUN-BD,m-=KJ=of,yU[@@ fUUh3g[@8@dghh8@Q@ithd`6FQ@o@@@f6Uh"@o@ @pf@U`0JU @@dJXJPJ[LfLUh\@/@`d\Xit^Uhk_U` sU/@@dsXfsUPs[Lu[lx`V}U@&@ }UX}FTkUhU&@@U`F\0@&@3FU`UXFTUHFDF@0UUFF&@@@`U`UXFTUHFDF@@~@fUUwFFA@`@yHy@O  [l f U` [\[!0`@ @ 0X"dir0FT0mP f2Uh#QF @@` dQ|Q[|Q|Q[|$ R-@ XUh ]| ``@u@ >lUX=N N-#yU@@ \ d|[|$l  @-@ | h U`=l N\ #F@"@ q d|[|$  *-@ | X fUP FL%@ !@O [  Ue!@."@ kU@= N q &"@#@  "ith#[ U#@Z#@  "it h# UZ#@)$@@ # "ith'<)$@$@  d<|< | >| AUh  4 'KL$@&@  dL| N| fQUX$  -@q (i&@(@`  fiUj kD"dirkF .m @ o  Uq[\ r7PD N)I(@)@ dh `% $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/ &I : ;I8 : ; .: ; ' I@B : ; I .: ; ' I@B .: ; ' @B 4: ; I .: ; ' @B : ; I .: ; @B 4I4  4: ; I  .? : ; I@B 4: ; I? < % $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/  : ;  : ; I8 &I.: ; ' I@B : ; I .: ; ' I@B .: ; ' @B : ; I .: ; ' @B 4: ; I .? : ; ' @B 4: ; I  U .: ;' I@B : ;I 4: ;I !.: ;' I@B ": ;I #.? : ;' I@B $4I4  % &.: ;' @B '.? : ;' @B (.: ;' @B ).? : ;' @B :N /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope_common.hrope_stress.cstddef.htypes.hlibio.hstdio.h  @tY.5.Zuu&K.~.> .2k.>#uu,KYAK<ArJ=x>#uu,KYAK<A*rJ=wKY% /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope.cstddef.htypes.hstdio.h @tY..~.tY6!>s-w"IW;hx0uvuK2/ʻ˻u t2/$2-iK21z=Y/K4 Kg $ "J%<# tY/L4MKgc  t=Y>0[h h<J K .(///K.%L#u# .&ugs"3u"&uu.$s'/s6XLu g/gi!.>Y /:@2L2==Ov=#3N,zLx;.J.JLs,N)WW:MqX,u"t/2uI/s>tYx/tree_size_old_offsetstr_getn_IO_save_endshort intROPE_HEIGHT_MAXmem_free_IO_write_ptr_flagsrope_IO_buf_base_IO_read_endrope_free_funcrope_createrope_split_funcrope_alloc_funcrope_newstderrlong long int_locktest_rope_stress_large_cur_columnsplit_ctx_markers_posleaf_size_sbuf_IO_FILElong doubleunsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitlong long unsigned int_IO_marker_shortbufGNU C 4.7.3/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/rope_stress.c_IO_write_base_unused2_IO_read_ptr__func___IO_buf_endrsize_tmainalloc_ctx__pad1__pad2__pad3__pad4__pad5datashort unsigned intmem_alloc_IO_write_end__off64_t_filenotest_rope_stress_small_chain__off_t_IO_backup_baseiterations_flags2_mode_IO_read_baserope_sizesizetype_vtable_offsetrope_deleterope_node_IO_save_baserope_node_sizeroot_IO_lock_tp_endrope_node_printnew_noderope_node_height__PRETTY_FUNCTION__l_left_heightdirectionold_sizel_right_heightrope_iter_nextparentrope_relinkconninsert_heightavl_route_to_offsetchild_prefix_lenr_left__ssize_tr_left_heightr_right_heightl_leftavl_rebalance_after_deleterope_clearadjust_sizerope_iterl_rightavl_route_to_nextrope_eraserssize_tvisit_leafrope_traverseavl_rotate_doublerope_node_newsplit_noderope_pretty_printrope_iter_startsave/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.cleft_sizeprint_leafr_rightpaddingrope_iter_down_to_leafchild_prefixp_offsetmirrorpathrope_insertrope_node_splitavl_rebalance_after_insertrope_checkavl_rotate_singlerope_iter_createrope_extract_nodewwvw w #w#;v;<w<=w=@w@vwww v  w wwBvBCwCDwDGwGcvcdwdewehwhvwwwvwwwvwwwvwwwvwwwvw w #w#;v;<w<=w=@w@TvTUwUVwVYwYrvrswstwtwwwvwwwvwww2v23w34w47w7vwww)v)*w*+w+.w.vwww)v)*w*+w+.w.vwwwcvcdwdewehwhvwww v w w w v w w  w vwwwvwww]v]^w^_w_bwb,v,-w-.w.1w1vwwwvwwwvwwwvw#\"#@?TU.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N  @  V@@@^o4 @4 Xko @ Pz @ 0 @   @  @ 0 @ )@) )@)`-@`-<.@.l 4@ 4M`4``4h4`h4p4`p4x4`x4X6`X6`6``6 7` 7H h7`h70h77`)7j5NMLCQHO0WZm^ ekMls@w0 %W p@@<@`@ @@@4 @ @ @  @ @ @  @)@)@`-@.@ 4@`4`h4`p4`x4`X6``6` 7`h7` !" p4` @ @. p @A @Wp7`fh4` @`4` @ @ 8@e @l @6 ?@!  `@ ~@@7`(! @ 8+@F @']*@k @ @r 8@ Q@ o@ @ /@h @ &@s @ &@p @, `@>R-@ W@-@p*-@  "@R-@  &@4@p4`h4`(7`x4` `4`h7`)`6`? )@Oav   7` Z#@h7`)@ #@Z $@ !7Rq 7` )@ @ )@ )$@(x7`-  @4 (@vFh7`R @0W @c @n  @!  @h7` @crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryrope_stress.crope_node_sizerope_sizerope_createrope_newrope_deletestr_getnmem_allocmem_freedatatest_rope_stress_small__func__.3887test_rope_stress_large__func__.3900rope.crope_iter_createrope_node_heightrope_relinkrope_node_newrope_node_splitavl_rotate_singleavl_rotate_doubleavl_rebalance_after_insertavl_rebalance_after_deleteavl_route_to_offsetavl_route_to_next__PRETTY_FUNCTION__.3131__PRETTY_FUNCTION__.3140__PRETTY_FUNCTION__.3148rope_iter_down_to_leaf__PRETTY_FUNCTION__.3190rope_node_print__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5putchar@@GLIBC_2.2.5abort@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startrope_iter_nextputs@@GLIBC_2.2.5_edata_finistrlen@@GLIBC_2.2.5rope_iter_startrope_checkprintf@@GLIBC_2.2.5snprintf@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5srand@@GLIBC_2.2.5__data_startfprintf@@GLIBC_2.2.5__gmon_start___IO_stdin_usedtime@@GLIBC_2.2.5__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5rope_traverse_end_startrope_pretty_print__bss_startmainrope_insertrope_erase_Jv_RegisterClassesrope_extract_nodeexit@@GLIBC_2.2.5_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initrand@@GLIBC_2.2.5stderr@@GLIBC_2.2.5rope_cleartarantool-1.5.1.218.g1a69fd6/test/unit/bitset_basic.result0000664000000000000000000000045512202131537021611 0ustar rootroot *** test_cardinality *** *** test_cardinality: done *** *** test_get_set *** Generating test set... ok Settings bits... ok Checking bits... ok Unsetting random bits... ok Checking set bits... ok Checking all bits... ok Unsetting all bits... ok Checking all bits... ok *** test_get_set: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/small_alloc.result0000664000000000000000000000007512202131537021436 0ustar rootroot *** small_alloc_basic *** *** small_alloc_basic: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/mhash.test0000775000000000000000000017650412213333046017734 0ustar rootrootELF>p @@X@8@%"@@@@@@@@@ `` 00`0`@@DDPtd00@0@  Qtd/lib64/ld-linux-x86-64.so.2GNU GNU:7Mg Ih,a0(P("(0 %,d!"$&(k|]qX<4K|k C/BEAu9 Xe<3bW : EW|%n]* "]< + : N h@ 2@ #@ @` @I@``w0 @`i @h+ ."@` @ p@8 "@I `@ p @ @ ` @q @q X@ $@x F!@P &@h D@libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitcallocmemcpymallocstderrfprintf__libc_start_mainfree__libc_csu_finimh_i32_newmh_i32_start_resizemh_i32_delete_edatamh_i32_collision_start_resizemh_i32_collision_deletemh_i32_collision_reservemh_i32_reservemh_i32_collision_new__data_startmh_i32_del_resize_IO_stdin_used__libc_csu_initmh_i32_collision_del_resize_end__bss_startmh_i32_resizemh_i32_collision_resizemh_i32_clearmh_i32_collision_clearGCC_3.0GCC_3.3.1GLIBC_2.14GLIBC_2.2.50P&y Ba_& JTui _``0`8`@`H`P`X```h`p` x` ` HHu HtkH5j %l @%j h%b h%Z h%R h%J h%B h%: h%2 hp%* h`%" h P% h @1I^HHPTI@H`@H2@G`UH-`HHw]øHt]``UH-`HHHH?HHHu]úHt]`= uUH~]v @H= tHtU(`H]{vUHH}uHEHUHH]UH}uUEEE;ErEU)E]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHEH@UHHЋE!Ѕt"HE؋HEHMHHȋ9uE\HEH@UHHЋE!Ѕu HE@HEPMEΉEPH([]UHSH(H}HuHUHE؋EHEHEUHE@HEЃEHE؋HEHMHHȋ9uEJHEH@UHHHEH@MHHȋ0E HEPMEΉEHEH@UHHЋE!ЅBEEmHEPMEΉEHEH@UHHЋE!Ѕt"HEHUHHЋHE؋9uEHEȋPHEPHMHEȺ8HHxHEȋ@$PHEȉP$H8[]UHH0H}uUHMHE@(t HE@;Ev2HE@  @;Es"HE@ PHEP HE@ v}u HE@EHUB,HE@,=w HE@,HEH@0HEHMHE8HHHE@(HE@  @HEPHE@HxH*HHH H*X B_YH,HEPHE@HE@HH(HHEHHEHHumHE@HHHEHPHEH@Hu!HEHHHHEHHUHEHH}UHH H}uHUHExEHxH*HHH H*X >^^H,HUHEHщHUHH@@;HEHEH!HEHEHHDž`Dž` H`HEHHHE@9tAHg H$@AA@@@ @HǸ-sHDžPDžPHPHEHgEUHEH9@HDž@Dž@H@HEHEUHEH@HDž0Dž0H0HEHEUHEH@HDž Dž H HEHHEHE@;EuAHf H$@A$A@@R@ @HǸ UHEH@tAH4f H$@A$A@@a@ @HǸlHDžDžHHEHHEHE@;EuAHe H$@A%A@@R@ @HǸ2UHEH-@tAHZe H$@A%A@@v@ @HǸHDžDžHHEHHEHE@;EuAHd H$@A&A@@R@ @HǸXUHEHS@tAHd H$@A&A@@@ @HǸHDžDžHHEHH&EEHEH;HDžDžHHEHEUHEHv@HDžDžHHEHWEUHEH)@ HDžDžHHEH EUHEH@ HDžDžHHEHEUHEH@HDžDžHHEHpEUHEHB@HDžDž HHEH#EUHEH@HDžDžHHEHH EHE@;EuAHa H$@A3A@@R@ @HǸbUHEH]@tAHa H$@A3A@@@ @HǸHDžpDžpHpHEHH0EHE@;EuAH a H$@A4A@@R@ @HǸBUHEH@ tAH` H$@A4A@@@ @HǸ.HDž`Dž`H`HEHHVEHE@;EuAH0` H$@A5A@@R@ @HǸhUHEH@ tAH_ H$@A5A@@ʂ@ @HǸTHDžPDžPHPHEHH|EHE@;EuAHV_ H$@A6A@@R@ @HǸUHEH@tAH^ H$@A6A@@߂@ @HǸ4zHDž@Dž@H@HEHHEHE@;EuAH|^ H$@A7A@@R@ @HǸUHEH@tAH"^ H$@A7A@@@ @HǸZHDž0Dž0 H0HEHHEHE@;EuAH] H$@A8A@@R@ @HǸ UHEH@tAHH] H$@A8A@@ @ @HǸHEHHDž Dž H HEHHHE@9tAH\ H$@A=A@@@ @HǸA@@2@ @HǸxHDžDžHHEHHHE@9tAH[ H$@A?A@@F@ @HǸ@HDžDžHHEHHhHE@9tAHD[ H$@A@A@@Z@ @HǸ|HDžDžHHEHHHE@9tAHZ H$@AAA@@n@ @HǸDHDžDžHHEHHlHE@9tAHHZ H$@ABA@@@ @HǸHDžDžHHEHHHE@9tAHY H$@ACA@@@ @HǸHHDžDžHHEHHpHE@9tAHLY H$@ADA@@@ @HǸHDžDž HHEHHHE@9tAHX H$@AEA@@@ @HǸLHDžDž HHEHHtHE@9tAHPX H$@AFA@@@ @HǸHDžDž HHEHHHE@9tAHW H$@AGA@@Ӄ@ @HǸ PHDžpDžpHpHEHDEUHEH@HDž`Dž`H`HEHH+EċMHEHEHDžPDžPHPHEHEUHEH@HEH wHEHDž@H@HEHQEUHEH#@HDž0Dž0H0HEHEUHEH@HDž Dž H HEHEUHEH@HDžDžHHEHjEUHEH<@HDžDžHHEHEUHEH@HDžDžHHEHEUHEH@ HDžDžHHEHEUHEHU@ HDžDžHHEH6EUHEH@HDžHHEHH'HE@9uAHT H$@AYA@@@ @HǸ;HDžHHEHHEMHEHHDžHHEHHtHE@9tAHPS H$@A[A@@@ @HǸHDžDžHHEHHHE@9uAHR H$@A\A@@@ @HǸ PHDžDžHHEHHxEMHEHHDžpDžpHpHEHH/HE@9tAH R H$@A^A@@@ @HǸCHDž`Dž`H`HEHHHE@9uAHQ H$@A_A@@$@ @HǸ HDžPDžPHPHEHH3EMHEHMHDž@Dž@H@HEHHHE@9tAHP H$@AaA@@2@ @HǸDHDž0Dž0H0HEHHlHE@9uAHHP H$@AbA@@8@ @HǸHDž Dž H HEHHEMHEHHDžDžHHEHHHE@9tAHO H$@AdA@@F@ @HǸHDžDžHHEHH'HE@9uAHO H$@AeA@@L@ @HǸ;HDžDžHHEHHEMHEHHDžDžHHEHH`HE@9tAHUHEH@tAHH H$@AuA@@@ @HǸ*HDžDž HHEHHREHE@;EuAH,H H$@AvA@@R@ @HǸdUHEH@tAHG H$@AvA@@ @ @HǸ PHDžDž HHEHHxEHE@;EuAHRG H$@AwA@@R@ @HǸUHEH@tAHF H$@AwA@@@ @HǸ0vHDžDžHHEHjEUHEH<@HDžDžHHEHEUHEH@HDžDžHHEHHEHE@;EuAHE H$@A{A@@R@ @HǸ\UHEHW@tAHE H$@A{A@@a@ @HǸHDžDžHHEHH*EMHEHDHDžDžHHEHHEMHEHHDžDžHHEHHHE@9tAHtD H$@AA@@@ @HǸEQHDžEHHEHEUHEHU҉PE}~EHDžpEpHpHEHHEHE@;EuAHC H$@AA@@R@ @HǸUHEH@U9tAH+C H$@AA@@@ @HǸc詿E}HEH:HEHDž`H`HEHEUHEHQ@HDžPDžPHPHEH2EUHEH@HDž@Dž@H@HEHEUHEH跿@HDž0Dž0H0HEHEUHEHj@HDž Dž H HEHKEUHEH@HDžDžHHEHEUHEHо@ HDžDžHHEHEUHEH胾@ HDžDžHHEHdEUHEH6@HDžHHEHHUEMHEHoHDžDžHHEHH EMHEH&HDžDžHHEHHý||HEHHDžDžHHEHHtxxHEHHDžDžHHEHH%ttHEH9HEHMHEHDžDžHHEH舿EUHEHZ@HDžDžHHEHHopHDžpDžpHpHEHH9llHEHMHDž`Dž`H`HEH趾EUHEH舻@HDžPDžPHPHEHH蝻hp;htAHr= H$@AA@@DŽ@ @HǸ誹HEH@Є@PHӹH˹HùH軹H賹H諹H裹H蛹H蓹H苹H胹H{HsHkHcH[HSHKHCH;H3H+H#HHH HHHHHH۸HӸH˸HøUHH@@~HEHEHdHEHEHA@@2@ @HǸ+HDžDžHHEHH-HE@9tAH// H$@A?A@@F@ @HǸg譫HDžDžHHEHH诹HE@9tAH. H$@A@A@@Z@ @HǸ/HDžDžHHEHH1HE@9tAH3. H$@AAA@@n@ @HǸk豪HDžDžHHEHH賸HE@9tAH- H$@ABA@@@ @HǸ3HDžDžHHEHH5HE@9tAH7- H$@ACA@@@ @HǸo赩HDžDžHHEHH跷HE@9tAH, H$@ADA@@@ @HǸ7HDžDž HHEHH9HE@9tAH;, H$@AEA@@@ @HǸs蹨HDžDž HHEHH軶HE@9tAH+ H$@AFA@@@ @HǸ;HDžDž HHEHH=HE@9tAH?+ H$@AGA@@Ӄ@ @HǸw轧HDžpDžpHpHEH臸EUHEH]@HDž`Dž`H`HEHHrEċMHEH舺HDžPDžPHPHEHEUHEHǴ@HEHO躻HEHDž@H@HEH蔷EUHEHj@HDž0Dž0H0HEHGEUHEH@HDž Dž H HEHEUHEHг@HDžDžHHEH譶EUHEH胳@HDžDžHHEH`EUHEH6@HDžDžHHEHEUHEH@ HDžDžHHEHƵEUHEH蜲@ HDžDžHHEHyEUHEHO@HDžHHEHHnHE@9uAHp' H$@AYA@@@ @HǸ訣HDžHHEHHEMHEHHDžHHEHH軱HE@9tAH& H$@A[A@@@ @HǸ;HDžDžHHEHH=HE@9uAH?& H$@A\A@@@ @HǸw轢HDžDžHHEHH述EMHEHյHDžpDžpHpHEHHvHE@9tAHx% H$@A^A@@@ @HǸ谡HDž`Dž`H`HEHHHE@9uAH$ H$@A_A@@$@ @HǸ2xHDžPDžPHPHEHHzEMHEH萴HDž@Dž@H@HEHH1HE@9tAH3$ H$@AaA@@2@ @HǸk豠HDž0Dž0H0HEHH賮HE@9uAH# H$@AbA@@8@ @HǸ3HDž Dž H HEHH5EMHEHKHDžDžHHEHHHE@9tAH" H$@AdA@@F@ @HǸ&lHDžDžHHEHHnHE@9uAHp" H$@AeA@@L@ @HǸ訞HDžDžHHEHHEMHEHHDžDžHHEHH觬HE@9tAH! H$@AgA@@Z@ @HǸ'HDžDžHHEHH)HE@9uAH+! H$@AhA@@`@ @HǸc詝HDžDžHHEHH諫EMHEHHDžDžHHEHHbHE@9tAHd H$@AjA@@n@ @HǸ蜜HDžDžHHEHHHE@9uAH H$@AkA@@t@ @HǸdHDžDžHHEHHfEMHEH|HDžDžHHEHHHE@9tAH H$@AmA@@@ @HǸW蝛HDžpDžpHpHEHH蟩HE@9uAH H$@AnA@@@ @HǸٚHDž`Dž`H`HEHH!EMHEH7HDžPDžPHPHEHHبHE@9tAH H$@ApA@@@ @HǸXHDž@Dž@H@HEH"EUHEH@HDž0Dž0 H0HEHժEUHEH諧@HDž Dž H HEH航EUHEH^@HDžDžHHEHHsEHE@;EuAHs H$@AuA@@R@ @HǸ諘UHEHƦ@tAH H$@AuA@@@ @HǸQ藘HDžDž HHEHH虦EHE@;EuAH H$@AvA@@R@ @HǸїUHEH@tAH? H$@AvA@@ @ @HǸw轗HDžDž HHEHH迥EHE@;EuAH H$@AwA@@R@ @HǸ=UHEH@tAHe H$@AwA@@@ @HǸ蝖HDžDžHHEH譧EUHEH胤@HDžDžHHEH`EUHEH6@HDžDžHHEHHKEHE@;EuAHK H$@A{A@@R@ @HǸ胕ɕUHEH螣@tAH H$@A{A@@a@ @HǸ)oHDžDžHHEHHqEMHEH臨HDžDžHHEHH(EMHEH>HDžDžHHEHHߢHE@9tAH H$@AA@@@ @HǸ_EQHDžEHHEH!EUHEHU҉PE}~EHDžpEpHpHEHHEHE@;EuAH H$@AA@@R@ @HǸ.tUHEHI@U9tAH H$@AA@@@ @HǸВE}HEH}HEHDž`H`HEH£EUHEH蘠@HDžPDžPHPHEHuEUHEHK@HDž@Dž@H@HEH(EUHEH@HDž0Dž0H0HEHۢEUHEH豟@HDž Dž H HEH莢EUHEHd@HDžDžHHEHAEUHEH@ HDžDžHHEHEUHEHʞ@ HDžDžHHEH觡EUHEH}@HDžHHEHH蜞EMHEH貣HDžDžHHEHHSEMHEHiHDžDžHHEHH ||HEHHDžDžHHEHH軝xxHEHˢHDžDžHHEHHlttHEH|HEH营HEHDžDžHHEH˟EUHEH衜@HDžDžHHEHH趜pHDžpDžpHpHEHH耜llHEH萡HDž`Dž`H`HEHEUHEHϛ@HDžPDžPHPHEHHhp;htAH H$@AA@@DŽ@ @HǸ]HEHң@Є@轌H@H8H0H(H HHHHHHHHH،HЌHȌHH踌H谌H訌H蠌H蘌H萌H舌H而HxHpHhH`HXHPHHH@H8H0UH̦U]ÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH 5a 0`   0 ` Y0` *** %s *** /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/mhash_body.cfalseget(9) == mh_end(h)Test failed: %s is %s at %s:%d, in function '%s' k != mh_end(h)val(k) == ((1) << 1)val(k) == ((2) << 1)val(k) == ((3) << 1)val(k) == ((4) << 1)val(k) == ((5) << 1)val(k) == ((6) << 1)val(k) == ((7) << 1)val(k) == ((8) << 1)val(k) == ((9) << 1)get(1) == mh_end(h)get(2) == mh_end(h)get(3) == mh_end(h)get(4) == mh_end(h)get(5) == mh_end(h)get(6) == mh_end(h)get(7) == mh_end(h)get(8) == mh_end(h)get(10) == mh_end(h)get(11) == mh_end(h)get(0) != mh_end(h)get(0) == mh_end(h)get(1) != mh_end(h)get(2) != mh_end(h)get(3) != mh_end(h)get(4) != mh_end(h)get(5) != mh_end(h)get(6) != mh_end(h)get(7) != mh_end(h)val(k) == ((10) << 1)val(k) == ((i) << 1)k1 == k2 *** %s: done *** mhash_int32_collision_testmhash_int32_id_testffffff?;  @(,XJxx}Fώ8@X(xː $@R`U @`tܡo0X0xzRx *zRx ̆AC Y <ʆ.AC i $\؆AC E $AC E $VeAC E[ $$AC E qAC l AC  <AC  \+IAC D $|TAC E ҏAC  hAC c ޑAC Y ܑ.AC i $$AC E $LŒAC E $tdeAC E[ $$AC E qAC l AC  AC  $9IAC D $DbAC E lAC  hAC c zPLRx0 @ $$̜,@AC , $L7,@AC , AC Z $<Jf@XdVWW W W W W W W "W##W$W$W%W%W&W'W'X(X)=X=X>X?CXDXEIXJcKXLXMXMXNXNXOXPXPSYTUYVVWW W W W W W W "W##W$W$W%W%W&W'W'X(X)=X=X>X?CXDXEIXJcKXLXMXMXNXNXOXPXPSYTUYV0 @ @ @ @` `o`@8@H@ k ` @X @0 o @oo @0` @ @ @ @ @ @& @6 @F @V @f @GCC: (Debian 4.7.3-4) 4.7.3,\ @rp3_ \ @Q@&Fintf3mzutMuM Vy<F## ##_# #( $#0 L#8 C#@ #H #P #X  #`  #h  F#p F#t f#x [# -# 7# # j&# /# 0# 1# 2# 3{# 5F# 7# Ko#X#F#  y  p2  key ;# val ;#_Gbk8[ p\# b]#t^.#^_.#7`.#a.#b.# Pd.#$re.#(f.#,g#0.9 key;# val;#8[ p\# b]#t^.#^_.#7`.#a.#b.# Pd.#$re.#(f.#,g#0\ @z @hhx.dy.z @ @`T.linc.h7.dA. @@hPHargɣ@k.`i.dinc.\.@v@ VhPHarg@k.`i.dinc.\.X@.v@@hH@retargx.\FX[I@~N@@7hNXxN.TargOHj@p@@hjXxj.TargkHsmhynbddup@X@hwhX@@hh@D@`4hh.D@@hargsP.\k@@i.Xz@y@n.L.F@@ ? hXv.T.PargHsh@6@ hh7.dargX6@T@ hhx.d.T@@@ .linc.h7.d .@@ hPȐ Hargɣ@k.`i.dinc.\ .@L@ hP Harg@k.`i.dinc.\.X.L@@` hH @ret argx.\FX[I@N@ @ hNXxN.TargOHj @F!@ f hjXxj.TargkHsmhynbduF!@."@ hwhY."@"@ hhB"@#@@ hh#@$@ hargsP.\A#@c$@i.XP#@O$@n.LF$@&@ hXv.T.PargHsh7&@ '@` Vhh7.dargX '@S@   @k#F\h$`iFlk1F~k2F~!_'@'@"~!'@(@" ~!*(@\(@9"!~!w(@(@^""~!(@)@k$.X(@(@"$~!)@x*@k%.T)@)@"%~!x*@R+@'k&.Px*@*@"&}!R+@+@L")}!+@+@q"+}!+@,@",}!:,@l,@"-}!,@,@".}!,@-@"/}!!-@S-@*"0}!n-@H.@mk3.Ln-@-@"3|!H.@"/@k4.HH.@x.@"4|!"/@/@k5.D"/@R/@"5|!/@0@6k6.@/@,0@"6|!0@1@zk7.0@1@"7|!1@2@k8.1@1@"8|!2@2@"=|!3@F3@">|!3@3@-"?{!4@B4@R"@{!4@4@w"A{! 5@>5@"B{!5@5@"C{!6@:6@"D{!6@6@ "E{!7@67@0"F{!7@7@U"Gz!8@28@z"Jz!M8@8@kK.M8@}8@"Kz!8@8@"Lz!8@%9@"Pz!@9@r9@-"Qz!9@9@R"Rz!9@ :@w"Sz!':@Y:@"Ty!t:@:@"Uy!:@:@"Vy!;@@;@ "Wy![;@;@0"Yy!;@<@tkZ.;@;@"Zy!<@6<@"[y!<@<@"\y!=@I=@k].=@0=@"]x!I=@{=@'"^x!=@=@L"_x!E>@>@k`.E>@u>@"`x!>@>@"ax! ?@>?@"bx!?@?@kc.?@?@"cx!?@@@C"dx!Q@@@@h"ew!@@A@kf.@@@@"fw!A@JA@"gw!A@A@"hw!B@]B@:ki.B@DB@"iw!]B@B@_"jw!B@ C@"kw!YC@C@kl.YC@C@"lw!C@C@"mv! D@RD@"nv!D@D@Vko.D@D@"ov!D@E@{"pv!eE@E@"rv!E@E@"sv!E@1F@"tv!LF@&G@.ku.LF@|F@"uv!&G@H@rkv.&G@VG@"vu!H@H@kw.H@0H@"wu!H@ I@"yu!'I@YI@"zu!tI@NJ@Dk{.tI@I@"{u!NJ@J@k}.NJ@~J@"}u!J@J@k~.~J@J@"~u!J@K@"u!gK@K@"t!K@L@Zk.~K@K@"t!L@L@"t!M@DM@"t!_M@M@"t!M@M@"t!M@+N@"t!FN@xN@8"t!N@N@]"s!N@O@"s!-O@lO@k.~-O@SO@"s!lO@O@ k.~lO@O@"s!O@P@Nk.~O@O@"s!P@SP@k.~P@4P@"s!SP@P@k.~SP@P@"s!P@P@"s! Q@9Q@ "r!?Q@Q@d k.~?Q@oQ@"r!Q@Q@ "rQ@ R@"r;S@2@ 3 3 @k>F\h?`iFlk1F~k2F~!S@$T@I!" ~!pT@T@n!" ~!T@T@!"! ~! U@"k%.T1V@aV@"% ~! W@W@"k&.P W@;W@"& }!W@X@"") }!3X@eX@""+ }!X@X@"", }!X@X@#"- }!Y@LY@:#". }!gY@Y@_#"/ }!Y@Y@#"0 }!Z@Z@#k3.LZ@1Z@"3 |!Z@[@ $k4.HZ@ [@"4 |![@\@M$k5.D[@[@"5 |!\@i]@$k6.@\@\@"6 |!i]@C^@$k7.i]@]@"7 |!C^@_@%k8.C^@s^@"8 |!)_@[_@=%"= |!_@_@b%"> |!%`@W`@%"? {!`@`@%"@ {!!a@Sa@%"A {!a@a@%"B {!b@Ob@&"C {!b@b@@&"D {!c@Kc@e&"E {!c@c@&"F {!d@Gd@&"G z!d@d@&"J z!d@)e@'kK.d@e@"K z!)e@[e@='"L z!e@e@b'"P z!e@f@'"Q z! f@Rf@'"R z!mf@f@'"S z!f@f@'"T y!g@9g@("U y!Tg@g@@("V y!g@g@e("W y!g@h@("Y y!bh@h@(kZ.bh@h@"Z y!h@h@("[ y!i@Gi@)"\ y!i@i@\)k].i@i@"] x!i@j@)"^ x!Zj@j@)"_ x!j@!k@)k`.j@k@"` x!!k@Sk@*"a x!k@k@4*"b x!l@fl@x*kc.l@Ml@"c x!fl@l@*"d x!l@m@*"e w!bm@m@+kf.bm@m@"f w!m@m@++"g w!)n@[n@P+"h w!n@n@+ki.n@n@"i w!n@"o@+"j w!no@o@+"k w!o@5p@",kl.o@p@"l w!5p@gp@G,"m v!p@p@l,"n v!1q@zq@,ko.1q@aq@"o v!zq@q@,"p v!q@*r@,"r v!Er@wr@-"s v!r@r@D-"t v!r@s@-ku.r@s@"u v!s@t@-kv.s@s@"v u!t@mu@.kw.t@t@"w u!mu@u@5."y u!u@u@Z."z u!v@v@.k{.v@7v@"{ u!v@*w@.k}.v@w@"} u!*w@sw@&/k~.~*w@Zw@"~ u!sw@w@K/" u!w@+x@p/" t!]x@:y@/k.~]x@x@" t!by@y@/" t!y@y@/" t!y@$z@#0" t!?z@qz@H0" t!z@z@m0" t!z@ {@0" t!&{@X{@0" s!s{@{@0" s!{@{@ 1k.~{@{@" s!{@H|@d1k.~{@/|@" s!H|@|@1k.~H|@x|@" s!|@|@1k.~|@|@" s!|@5}@02k.~|@}@" s!O}@}@U2" s!}@}@z2" r!}@!~@2k.~}@~@" r!!~@S~@2" rn~@~@" r 3 3#ZUF2@Q@  .L3 "OLa3  @<3$% $ > : ; I$ >   I : ;  : ; I8 : ;I8 : ; I !I/ : ; I8 .: ; ' I@B : ; I : ; I .: ; ' I@B 4: ; I &I4: ;I .: ;' I@B : ;I : ;I 4: ;I  : ;.: ;' @B .? : ;' @B .? : ;I@B  .? : ;' I@B .: ; @B  4I4  ! "4: ; I #.? : ; ' I@B $4: ; I? <  T /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitsmhash.hmhash.cmhash_body.cstdint.hstddef.htypes.hlibio.hstdio.h \ @3g=.M=2Z5YtM=YJv6g/2T9=t]=K* 1G5&uu)\(C! =y=6I5Mt/(K/2/g'DK2gD23[6((G*x JuyYL+ $f<uܯugD׻u'v0Y3/S}.3g=.Mu=2Z5YtMu=YJv6g/2T9=t]=K* 1G5&uu)\(C! =y=6I5Mt/(K/2/g'DK2gD23[6((G*x JuyYL+ $f<uܯugD׻u'v0Y3/S|.t<׼׽=AM2M?AA?AA?AANM2MMMM?AA?AA?AA?AA?AA?AA=A=A=A=A=A=A=A=A=A=A=AMI2CMMMMMMM3A?3A=AI=A=AI=A=AI=A=AI=A=AI=A=AI=A=AI=AM2M?AA?AA?AAM2?AAII=AMJi>AAJC2MMMMMM?IOOOM6OM6O2Y<׼׽=AM2M?AA?AA?AANM2MMMM?AA?AA?AA?AA?AA?AA=A=A=A=A=A=A=A=A=A=A=AMI2CMMMMMMM3A?3A=AI=A=AI=A=AI=A=AI=A=AI=A=AI=A=AI=AM2M?AA?AA?AAM2?AAII=AMJi>AAJC2MMMMMM?IOOOM6OM6O1KY__off_t_IO_read_ptrsize_tmh_i32_collision_next_slot_shortbufmh_i32_get_IO_buf_basemh_i32_collision_clearlong long unsigned intmh_i32_nodeexistmh_i32_collision_putmhash_int32_id_test__func__mh_i32_collision_tlong long intmh_i32_collision_del_fileno_IO_read_endmh_i32_collision_node_tmh_i32_resize_flags_IO_buf_end__ac_prime_listdouble_old_offsetresize_position/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit_IO_markermh_i32_collision_node_IO_write_ptrmh_i32_collision_new/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/mhash.c_sbufn_dirtyshort unsigned intmh_i32_next_slot_IO_save_basemh_i32_collision_start_resizesave_iupper_bound_lockshadow_flags2_modemh_i32_collision_put_slotmh_i32_reservesizetypemh_i32_delete_IO_write_endmh_i32_node_tmh_i32_put_IO_lock_t_IO_FILEGNU C 4.7.3mh_i32_tn_bucketsmh_i32_delfloat_pos_markersbatchmh_i32_put_slotunsigned charmh_int_tshort int_chain_vtable_offsetmhash_int32_collision_testuint32_tmh_i32_clearmh_i32_collision_del_resizemh_i32_collision_reserveresize_cntput_donemh_i32_new_next__off64_t_cur_column_IO_read_base_IO_save_endmh_i32_del_resizemh_i32_collision_resize__pad1__pad2__pad3__pad4__pad5prime_unused2stderrmh_i32_collision_get_IO_backup_basemh_i32_start_resizemh_i32_collision_deletemain_IO_write_basewwvww"w"KvKLwLMwMPwPPvPQwQRwRUwUvwww~v~wwwvwwwvwwwvwwwvwwwvwww v w w w q vq r wr s ws v wv v w w w v w w w % v% & w& ' w' * w* (v()w)*w*-w-vwwwTvTUwUVwVYwYxvxywyzwz}w}vwwwvwwwtvtuwuvwvywyvwwwcvcdwdewehwhGvGHwHIwILwLvwwwBFvBFCFwCFDFwDFGFwGFrvrrwrrwrrwrrvrrw.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N H@HV8@8k^o @ Tko @ `zX @X 0 @   @  @ p @p t@ @0 0@0 @@@@*` ` (`(0`0``p` `00)t35XDC O0nZ eh $F D@@<@`@H@8@ @ @ X @ @ @ @ p @@@0@@@@` `(`0````` ! (` @. @A  @W`f ` 0 @` @| \ @ z @. @ @ v@e @$ 6@4 T@.O @d @~ L@e @$ '@,@ S@,@@(`  ``+0`4`G`S`i @y  ` p@ @ @I` $@ "@I@" &@h;O @h^ F!@s` @q @ 0 @+ `@;O @qk`p p @w` 2@ D@ #@ X@   ."@* @0`crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrymhash.c__ac_prime_listmh_i32_nodemh_i32_next_slotmh_i32_getmh_i32_put_slotmh_i32_putmh_i32_delmh_i32_collision_nodemh_i32_collision_next_slotmh_i32_collision_getmh_i32_collision_put_slotmh_i32_collision_putmh_i32_collision_delmhash_int32_id_test__func__.4970mhash_int32_collision_test__func__.5246__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startmh_i32_newmh_i32_start_resizemh_i32_delete_edatamh_i32_collision_start_resizemh_i32_collision_delete_finimh_i32_collision_reserveprintf@@GLIBC_2.2.5mh_i32_reservemh_i32_collision_new__libc_start_main@@GLIBC_2.2.5calloc@@GLIBC_2.2.5__data_startmh_i32_del_resizefprintf@@GLIBC_2.2.5__gmon_start__memcpy@@GLIBC_2.14_IO_stdin_used__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5mh_i32_collision_del_resize_end_start__bss_startmainmh_i32_resizemh_i32_collision_resizemh_i32_clear_Jv_RegisterClassesexit@@GLIBC_2.2.5_ITM_registerTMCloneTablemh_i32_collision_clear_Unwind_Resume@@GCC_3.0_initstderr@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/test/unit/base64.c0000664000000000000000000000172112202131537017143 0ustar rootroot#include #include "unit.h" #include static void base64_test(const char *str) { header(); int len = strlen(str); int base64_buflen = base64_bufsize(len); char *base64_buf = malloc(base64_buflen); char *strbuf = malloc(len + 1); int res = base64_encode(str, len, base64_buf, base64_buflen); fail_unless(strlen(base64_buf) == res); base64_decode(base64_buf, strlen(base64_buf), strbuf, len + 1); fail_unless(strcmp(str, strbuf) == 0); free(base64_buf); free(strbuf); footer(); } int main(int argc, char *argv[]) { base64_test(""); base64_test("a"); base64_test("Something that doesn't fit into a single line, " "something that doesn't fit into a single line, " "something that doesn't fit into a single line, " "something that doesn't fit into a single line, " "something that doesn't fit into a single line. "); base64_test("\001\002\003\004\005\006\253\254\255"); } tarantool-1.5.1.218.g1a69fd6/test/unit/bitset_iterator.c0000664000000000000000000002447012202131537021270 0ustar rootroot#include #include #include #include #include #include #include "unit.h" enum { NUMS_SIZE = 1 << 16 }; static size_t NUMS[NUMS_SIZE]; static struct bitset ** bitsets_create(size_t count) { struct bitset **bitsets = malloc(count * sizeof(*bitsets)); fail_if(bitsets == NULL); for (size_t i = 0; i < count; i++) { bitsets[i] = malloc(sizeof(struct bitset)); fail_if(bitsets[i] == NULL); bitset_create(bitsets[i], realloc); } return bitsets; } static void bitsets_destroy(struct bitset **bitsets, size_t count) { for (size_t i = 0; i < count; i++) { bitset_destroy(bitsets[i]); free(bitsets[i]); } free(bitsets); } static void nums_fill(size_t *nums, size_t size) { const size_t STEP_MAX = 7; nums[0] = rand() % STEP_MAX; for (size_t i = 1; i < size; i++) { nums[i] = nums[i - 1] + 1 + rand() % STEP_MAX; } } static int nums_comparator(const void *a, const void *b) { size_t *aa = (size_t *) a; size_t *bb = (size_t *) b; if (*aa < *bb) { return -1; } else if (*aa > *bb) { return 1; } else { return 0; } } static void nums_sort(size_t *nums, size_t size) { qsort(nums, size, sizeof(*nums), nums_comparator); } static void nums_shuffle(size_t *nums, size_t size) { for (size_t i = 0; i < size - 1; i++) { size_t j = i + rand() / (RAND_MAX / (size- i) + 1); size_t tmp = nums[j]; nums[j] = nums[i]; nums[i] = tmp; } } static void test_empty_expr(void) { header(); struct bitset_expr expr; bitset_expr_create(&expr, realloc); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, NULL, 0) == 0); bitset_expr_destroy(&expr); size_t pos = bitset_iterator_next(&it); fail_unless(pos == SIZE_MAX); bitset_iterator_destroy(&it); footer(); } static void test_empty_expr_conj1(void) { header(); struct bitset_expr expr; bitset_expr_create(&expr, realloc); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_iterator_init(&it, &expr, NULL, 0) == 0); bitset_expr_destroy(&expr); size_t pos = bitset_iterator_next(&it); fail_unless(pos == SIZE_MAX); bitset_iterator_destroy(&it); footer(); } static void test_empty_expr_conj2(void) { header(); size_t big_i = (size_t) 1 << 15; struct bitset **bitsets = bitsets_create(2); bitset_set(bitsets[0], 1); bitset_set(bitsets[0], big_i); struct bitset_expr expr; bitset_expr_create(&expr, realloc); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_param(&expr, 0, false) == 0); fail_unless(bitset_expr_add_param(&expr, 1, true) == 0); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_iterator_init(&it, &expr, bitsets, 2) == 0); bitset_expr_destroy(&expr); fail_unless(bitset_iterator_next(&it) == 1); fail_unless(bitset_iterator_next(&it) == big_i); fail_unless(bitset_iterator_next(&it) == SIZE_MAX); bitset_iterator_destroy(&it); bitsets_destroy(bitsets, 2); footer(); } static void test_empty_result(void) { header(); struct bitset **bitsets = bitsets_create(2); bitset_set(bitsets[0], 1); bitset_set(bitsets[0], 2); bitset_set(bitsets[0], 3); bitset_set(bitsets[0], 193); bitset_set(bitsets[0], 1024); bitset_set(bitsets[0], 1025); bitset_set(bitsets[0], 16384); bitset_set(bitsets[0], 16385); bitset_set(bitsets[1], 17); bitset_set(bitsets[1], 194); bitset_set(bitsets[1], 1023); struct bitset_expr expr; bitset_expr_create(&expr, realloc); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_param(&expr, 0, false) == 0); fail_unless(bitset_expr_add_param(&expr, 1, false) == 0); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, bitsets, 2) == 0); bitset_expr_destroy(&expr); size_t pos = bitset_iterator_next(&it); fail_unless(pos == SIZE_MAX); bitset_iterator_destroy(&it); bitsets_destroy(bitsets, 2); footer(); } static void test_first_result(void) { header(); struct bitset **bitsets = bitsets_create(2); bitset_set(bitsets[0], 0); bitset_set(bitsets[0], 1023); bitset_set(bitsets[1], 0); bitset_set(bitsets[1], 1025); struct bitset_expr expr; bitset_expr_create(&expr, realloc); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_param(&expr, 0, false) == 0); fail_unless(bitset_expr_add_param(&expr, 1, false) == 0); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, bitsets, 2) == 0); bitset_expr_destroy(&expr); size_t pos = bitset_iterator_next(&it); fail_unless(pos == 0); fail_unless(bitset_iterator_next(&it) == SIZE_MAX); bitset_iterator_destroy(&it); bitsets_destroy(bitsets, 2); footer(); } static void test_simple() { header(); enum { BITSETS_SIZE = 32 }; struct bitset **bitsets = bitsets_create(BITSETS_SIZE); nums_shuffle(NUMS, NUMS_SIZE); size_t NOISE_SIZE = NUMS_SIZE / 3; for (size_t i = 0; i < NOISE_SIZE; i++) { bitset_set(bitsets[i % BITSETS_SIZE], NUMS[i]); } for (size_t i = NOISE_SIZE; i < NUMS_SIZE; i++) { for (size_t b = 0; b < BITSETS_SIZE; b++) { bitset_set(bitsets[b], NUMS[i]); } } struct bitset_expr expr; bitset_expr_create(&expr, realloc); fail_unless(bitset_expr_add_conj(&expr) == 0); for (size_t b = 0; b < BITSETS_SIZE; b++) { fail_unless(bitset_expr_add_param(&expr, b, false) == 0); } nums_sort(NUMS + NOISE_SIZE, NUMS_SIZE - NOISE_SIZE); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, bitsets, BITSETS_SIZE) == 0); bitset_expr_destroy(&expr); for (size_t i = NOISE_SIZE; i < NUMS_SIZE; i++) { fail_unless(bitset_iterator_next(&it) == NUMS[i]); } fail_unless(bitset_iterator_next(&it) == SIZE_MAX); bitset_iterator_destroy(&it); bitsets_destroy(bitsets, BITSETS_SIZE); footer(); } static void test_big() { header(); const size_t BITSETS_SIZE = 32; struct bitset **bitsets = bitsets_create(BITSETS_SIZE); nums_shuffle(NUMS, NUMS_SIZE); printf("Setting bits... "); for (size_t i = 0; i < NUMS_SIZE; i++) { for (size_t b = 0; b < BITSETS_SIZE; b++) { bitset_set(bitsets[b], NUMS[i]); if (b % 2 == 0 && i % 2 == 0) continue; } } printf("ok\n"); struct bitset_expr expr; bitset_expr_create(&expr, realloc); fail_unless(bitset_expr_add_conj(&expr) == 0); for(size_t b = 0; b < BITSETS_SIZE; b++) { fail_unless(bitset_expr_add_param(&expr, b, false) == 0); } struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, bitsets, BITSETS_SIZE) == 0); bitset_expr_destroy(&expr); printf("Iterating... "); size_t pos; while ((pos = bitset_iterator_next(&it)) != SIZE_MAX) { size_t b; for(b = 0; b < BITSETS_SIZE; b++) { if(bitset_test(bitsets[b], pos)) continue; } fail_if(b < BITSETS_SIZE); } printf("ok\n"); bitset_iterator_destroy(&it); bitsets_destroy(bitsets, BITSETS_SIZE); footer(); } static void test_not_last() { header(); struct bitset **bitsets = bitsets_create(2); size_t big_i = (size_t) 1 << 15; bitset_set(bitsets[0], 0); bitset_set(bitsets[0], 11); bitset_set(bitsets[0], 1024); bitset_set(bitsets[1], 0); bitset_set(bitsets[1], 10); bitset_set(bitsets[1], 11); bitset_set(bitsets[1], 14); bitset_set(bitsets[1], big_i); struct bitset_expr expr; bitset_expr_create(&expr, realloc); fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_param(&expr, 0, true) == 0); fail_unless(bitset_expr_add_param(&expr, 1, false) == 0); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, bitsets, 2) == 0); bitset_expr_destroy(&expr); size_t result[] = {10, 14, big_i}; size_t result_size = 3; size_t pos; for (size_t i = 0; i < result_size; i++) { pos = bitset_iterator_next(&it); fail_unless (result[i] == pos); } fail_unless (pos = bitset_iterator_next(&it) == SIZE_MAX); bitset_iterator_destroy(&it); bitsets_destroy(bitsets, 2); footer(); } static void test_not_empty() { header(); enum { BITSETS_SIZE = 4, CHECK_COUNT = (size_t) 1 << 14 }; struct bitset **bitsets = bitsets_create(BITSETS_SIZE); nums_shuffle(NUMS, NUMS_SIZE); for (size_t i = 0; i < NUMS_SIZE; i++) { bitset_set(bitsets[i % BITSETS_SIZE], NUMS[i]); } struct bitset_expr expr; bitset_expr_create(&expr, realloc); for(size_t b = 0; b < BITSETS_SIZE; b++) { fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_param(&expr, b, true) == 0); } struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, bitsets, BITSETS_SIZE) == 0); bitset_expr_destroy(&expr); for (size_t i = 0; i < CHECK_COUNT; i++) { size_t pos = bitset_iterator_next(&it); fail_unless (i == pos); } bitset_iterator_destroy(&it); bitsets_destroy(bitsets, BITSETS_SIZE); footer(); } static void test_disjunction() { header(); enum { BITSETS_SIZE = 32 }; struct bitset **bitsets = bitsets_create(BITSETS_SIZE); nums_shuffle(NUMS, NUMS_SIZE); for (size_t i = 0; i < NUMS_SIZE; i++) { bitset_set(bitsets[i % BITSETS_SIZE], NUMS[i]); } struct bitset_expr expr; bitset_expr_create(&expr, realloc); for (size_t b = 0; b < BITSETS_SIZE; b++) { fail_unless(bitset_expr_add_conj(&expr) == 0); fail_unless(bitset_expr_add_param(&expr, b, false) == 0); } nums_sort(NUMS, NUMS_SIZE); struct bitset_iterator it; bitset_iterator_create(&it, realloc); fail_unless(bitset_iterator_init(&it, &expr, bitsets, BITSETS_SIZE) == 0); bitset_expr_destroy(&expr); for (size_t i = 0; i < NUMS_SIZE; i++) { size_t pos = bitset_iterator_next(&it); fail_unless(pos == NUMS[i]); } size_t pos = bitset_iterator_next(&it); fail_unless(pos == SIZE_MAX); bitset_iterator_destroy(&it); bitsets_destroy(bitsets, BITSETS_SIZE); footer(); } int main(void) { setbuf(stdout, NULL); nums_fill(NUMS, NUMS_SIZE); test_empty_expr(); test_empty_expr_conj1(); test_empty_expr_conj2(); test_empty_result(); test_first_result(); test_simple(); test_big(); test_not_empty(); test_not_last(); test_disjunction(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/bitset_index.c0000664000000000000000000001410612202131537020541 0ustar rootroot#include #include #include #include #include #include #include "unit.h" enum { NUMS_SIZE = 1 << 16 }; static void test_resize(void) { header(); struct bitset_index index; fail_unless(bitset_index_create(&index, realloc) == 0); struct bitset_iterator it; bitset_iterator_create(&it, realloc); struct bitset_expr expr; bitset_expr_create(&expr, realloc); size_t key = 23411111; size_t value = 2321321; bitset_index_insert(&index, &key, sizeof(key), value); fail_unless(bitset_index_expr_equals(&expr, &key, sizeof(key)) == 0); fail_unless(bitset_index_init_iterator(&index, &it, &expr) == 0); fail_unless(bitset_iterator_next(&it) == value); fail_unless(bitset_iterator_next(&it) == SIZE_MAX); bitset_expr_destroy(&expr); bitset_iterator_destroy(&it); bitset_index_destroy(&index); footer(); } static void test_get_size(void) { header(); struct bitset_index index; fail_unless(bitset_index_create(&index, realloc) == 0); const size_t SET_SIZE = 1 << 10; size_t key = 656906; for(size_t i = 0; i < SET_SIZE; i++) { bitset_index_insert(&index, &key, sizeof(key), i); } fail_unless(bitset_index_size(&index) == SET_SIZE); bitset_index_destroy(&index); footer(); } static void check_keys(struct bitset_index *index, size_t *keys, size_t *values, size_t size) { struct bitset_iterator it; bitset_iterator_create(&it, realloc); struct bitset_expr expr; bitset_expr_create(&expr, realloc); printf("Checking keys... "); for (size_t i = 0; i < size; i++) { /* ignore removed keys */ if (keys[i] == SIZE_MAX) { continue; } fail_unless(bitset_index_expr_equals(&expr, &keys[i], sizeof(keys[i])) == 0); fail_unless(bitset_index_init_iterator(index, &it, &expr) == 0); size_t pos; bool pair_found = false; while ( (pos = bitset_iterator_next(&it)) != SIZE_MAX) { if (pos == values[i]) { pair_found = true; break; } } fail_unless(pair_found); } printf("ok\n"); bitset_iterator_destroy(&it); bitset_expr_destroy(&expr); } static void test_insert_remove(void) { header(); struct bitset_index index; fail_unless(bitset_index_create(&index, realloc) == 0); size_t NUMS_SIZE = 1 << 11; size_t *keys = malloc(NUMS_SIZE * sizeof(size_t)); size_t *values = malloc(NUMS_SIZE * sizeof(size_t)); printf("Generating test set... "); for(size_t i = 0; i < NUMS_SIZE; i++) { keys[i] = rand(); values[i] = rand(); } printf("ok\n"); printf("Inserting pairs... "); for(size_t i = 0; i < NUMS_SIZE; i++) { bitset_index_insert(&index, &keys[i], sizeof(keys[i]), values[i]); } printf("ok\n"); check_keys(&index, keys, values, NUMS_SIZE); printf("Removing random pairs... "); for(size_t i = 0; i < NUMS_SIZE; i++) { if (rand() % 5 == 0) { bitset_index_remove_value(&index, values[i]); keys[i] = SIZE_MAX; } } printf("ok\n"); check_keys(&index, keys, values, NUMS_SIZE); bitset_index_destroy(&index); free(keys); free(values); footer(); } static void test_simple(int mode, size_t search_mask) { fail_unless(mode >= 0 && mode < 3); struct bitset_index index; fail_unless(bitset_index_create(&index, realloc) == 0); struct bitset_iterator it; bitset_iterator_create(&it, realloc); struct bitset_expr expr; bitset_expr_create(&expr, realloc); size_t check_count = 0; for (size_t key = 0; key < NUMS_SIZE; key++) { bitset_index_insert(&index, &key, sizeof(key), key); if (mode == 0) { check_count++; } else if (mode == 1 && (key & search_mask) == search_mask) { check_count++; } else if (mode == 2 && (key & search_mask) != 0) { check_count++; } } if (mode == 0) { fail_unless(bitset_index_expr_all(&expr) == 0); } else if (mode == 1) { fail_unless(bitset_index_expr_all_set(&expr, &search_mask, sizeof(search_mask)) == 0); } else if (mode == 2) { fail_unless(bitset_index_expr_any_set(&expr, &search_mask, sizeof(search_mask)) == 0); } fail_unless(bitset_index_init_iterator(&index, &it, &expr) == 0); size_t found_count = 0; for (size_t key = 0; key < NUMS_SIZE; key++) { size_t r = bitset_iterator_next(&it); if (mode == 0) { fail_unless(key == r); found_count++; } else if (mode == 1 && (key & search_mask) == search_mask) { found_count++; } else if (mode == 2 && (key & search_mask) != 0){ found_count++; } } fail_unless(bitset_iterator_next(&it) == SIZE_MAX); fail_unless(found_count == check_count); bitset_expr_destroy(&expr); bitset_iterator_destroy(&it); bitset_index_destroy(&index); } static void test_empty_simple(void) { header(); test_simple(1, 0); /* empty result */ footer(); } static void test_all_simple(void) { header(); test_simple(0, 0); /* all */ footer(); } static void test_all_set_simple(void) { header(); size_t search_mask = 66; /* 0b1000010 */ test_simple(1, search_mask); /* all bits set */ footer(); } static void test_any_set_simple(void) { header(); size_t search_mask = 66; /* 0b1000010 */ test_simple(2, search_mask); /* any bits set */ footer(); } static void test_equals_simple(void) { header(); struct bitset_index index; fail_unless(bitset_index_create(&index, realloc) == 0); struct bitset_iterator it; bitset_iterator_create(&it, realloc); struct bitset_expr expr; bitset_expr_create(&expr, realloc); size_t mask = ~((size_t ) 7); for (size_t i = 0; i < NUMS_SIZE; i++) { size_t key = i & mask; size_t value = i; bitset_index_insert(&index, &key, sizeof(key), value); } size_t key1 = (rand() % NUMS_SIZE) & mask; fail_unless(bitset_index_expr_equals(&expr, &key1, sizeof(key1)) == 0); fail_unless(bitset_index_init_iterator(&index, &it, &expr) == 0); for (size_t i = key1; i <= (key1 + ~mask); i++) { fail_unless(i == bitset_iterator_next(&it)); } fail_unless(bitset_iterator_next(&it) == SIZE_MAX); bitset_expr_destroy(&expr); bitset_iterator_destroy(&it); bitset_index_destroy(&index); footer(); } int main(void) { setbuf(stdout, NULL); test_get_size(); test_resize(); test_insert_remove(); test_empty_simple(); test_all_simple(); test_all_set_simple(); test_any_set_simple(); test_equals_simple(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/rope_basic.c0000664000000000000000000000357112202131537020172 0ustar rootroot#include #include "unit.h" #include "rope_common.h" /******************************************************************/ static void test_empty_rope() { header(); struct rope *rope = test_rope_new(); fail_unless(rope_size(rope) == 0); struct rope_iter *iter = rope_iter_new(rope); fail_unless(rope_iter_start(iter) == NULL); fail_unless(rope_iter_start(iter) == NULL); rope_traverse(rope, str_print); rope_check(rope); rope_pretty_print(rope, str_print); /* rope_erase(), rope_extract() expect a non-empty rope */ rope_iter_delete(iter); rope_delete(rope); footer(); } static void test_prepend() { header(); struct rope *rope = test_rope_new(); test_rope_insert(rope, 0, " c "); test_rope_insert(rope, 0, " b "); test_rope_insert(rope, 0, " a "); rope_delete(rope); footer(); } static void test_append() { header(); struct rope *rope = test_rope_new(); test_rope_insert(rope, rope_size(rope), " a "); test_rope_insert(rope, rope_size(rope), " b "); test_rope_insert(rope, rope_size(rope), " c "); rope_delete(rope); footer(); } static void test_insert() { header(); struct rope *rope = test_rope_new(); test_rope_insert(rope, rope_size(rope), " a "); test_rope_insert(rope, rope_size(rope) - 1, "b "); test_rope_insert(rope, rope_size(rope) - 2, "c "); test_rope_insert(rope, 1, " "); test_rope_insert(rope, rope_size(rope) - 1, " "); test_rope_insert(rope, 4, "*"); test_rope_insert(rope, 8, "*"); rope_delete(rope); footer(); } static void test_erase() { header(); struct rope *rope = test_rope_new(); rope_insert(rope, rope_size(rope), "a", 1); test_rope_erase(rope, 0); rope_insert(rope, rope_size(rope), "a", 1); rope_insert(rope, rope_size(rope), "b", 1); test_rope_erase(rope, 0); rope_delete(rope); footer(); } int main() { test_empty_rope(); test_append(); test_prepend(); test_insert(); test_erase(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/mempool.test0000775000000000000000000020356712213333056020305 0ustar rootrootELF>0@@H@8@%"@@@@@@@@@mm pp`p`= pp`p`@@DDPtdP`P`@P`@Qtd/lib64/ld-linux-x86-64.so.2GNU GNUoW 4o-?H% 4@!X V(@p0B D@ `@F"#$%')*-/12479;<=?@CDFGI/g&ڝ|T5O{PNJfs-㞡.?k C9 :  V?]5>6p0CzLagF&k|[c"/v.|qX|o{`|K3b in_f$ CEPu C!YoOV}2)A3~+ + : N h S@a M@ '4@Oa K@8' R2@U@' \$@h KL@yS T@ /@? L&@r`r` r` ;H@ U@ ,'@ @aW 1@?g l/@h F@D s#@L rQ@t 2@ @y 7@`7r`w@" a wI@6r`pȭa @F@#a U@ 0@ 3@ n@; J@ar`c ?S@hu O@w /@`9 Q@CP 5)@ #@ H@B @] @( .@{libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitsrandmmap64timeabort__assert_failmemset__errno_locationmallocstderrmunmapstrerror_rfprintf__libc_start_main__libc_csu_finipoolmslab_tree_newallocatingslab_from_ptrslab_cache_check_edatamslab_allocmslab_tree_nsearchmslab_tree_removemslab_tree_iterseedmslab_freeslab_get__data_startcachemslab_tree_psearchslab_cache_createmempool_basicmempool_destroy_IO_stdin_usedslab_get_with_ordermslab_tree_reverse_iter__libc_csu_initmempool_free_endmempool_create_with_ordermslab_tree_reverse_iter_startmempool_stats__bss_startmslab_tree_iter_recursemslab_offsetmslab_tree_insertmslab_tree_reverse_iter_recurseslab_putmslab_tree_searchmempool_alloc_nothrowobjsizemslab_tree_prevmslab_tree_lastmslab_tree_firstslab_cache_destroymslab_tree_iter_startmslab_tree_nextGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui q` r`$r` r`(r`0r`8r`@r`Hr`Pr` Xr` `r` hr` pr` xr`r`3r`r`r`r`r`HH%` HtH5` %` @%` h% ` h%` h%_ h%_ h%_ h%_ h%_ hp%_ h`%_ h P%_ h @%_ h 0%_ h %_ h %_ h%_ h%_ h%_ h%_ h1I^HHPTIU@HT@H@r`UH-r`HHw]øHt]r`r`UH-r`HHHH?HHHu]úHt]r`=_ uUH~]^ @H=\ tHtUp`H]{vUHHH}H9EvV@(U@U@H}w)H}@v HE)UHH0H}HuU܋EHEHEHiEMUHuHEH:UHH}HEH@]UHH0H}HE='+!HHHHHEHЋHE9tAH] H$V@AAU@U@U@0V@HǸ#HEEEHHs`H;EtAHV] H$V@A AU@U@bV@0V@HǸHE@,< uHEH HHEHH\HEHEHEH;EtHEH=HEHEHEH}uUHH0H}؉EԀ} v[@W@W@EHHHHEHHEHEH@H;E @HEH}u nHEHHEHUH`HHHEHxHEH@ HHEHxHEHPHEHH_HEHPHEH@ HHEHPHE HEH.9HEHHEHEHHEHE@,:EHEHPHEH@ H)HEHPHUHEHHHEHE@,:EuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHUHEHHHEHTHEUHH H}HuHEHEHE} HEHQHEH}u MHUHEHiHEHUH`HHHEHxHEH@ HHEHxHEHpHEHHEHpHEUHEH2UHH H}HuHEHRHE@,< u_HEHHEHxHEH@ H)HEHxHEHpHEH@ H)HEHpHEHRHUHEHHHEHRHEH}HEP,HE@,8HEHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHUHMHEHH$HEHEHHEH}t$HEP,HE@,8uHEHuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEHHEHPHE@,HHHHEHHHfUHSHxH}HEHEHEHEEHEH`HEHEHHEHEHEHEP(-9t4HEH(-H*I AȉѺ@[@Y@HǸEHE@,< u&HEH@ HEHEH@ HEHEH@ HErHEHX HE@,H9tEHEHX HE@,HHH IHѺ@[@Y@HǸE OHEHEHHEHEHEHEH;EHEHxH;Et7HEHxHH HMIHѺ@[@Y@HǸEHEHE HUHEHH)HHEHEH@HEHEH@HEHEHXEHHغHHHt>EbHHEHPHkG IHѺ@[@0Z@HǸEHEHXEHHغHHHt>EHHEHPHG IHѺ@[@Z@HǸEHE HEH@H;EHEHUHH;Et7HF HuHMHUIIHѺ@[@Z@HǸ&EHEHpH;Et7HEHpH_F HMIHѺ@[@[@HǸE}u_Hx[]ÐUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@]UHH}HEH@]UHH}HEH@HEHPHEH]UHHH}HEHHEHHUHH}HuHEHUHHPHEHH!]UHSHE} v_@\@j\@E ӉHH[]UHP|]UHH}HuHEH;EwHEH;Es]UHH}HEHPHEHHEHPHEHP@HEHHHEH@HH HHEHPHHEH@HHHHEHPHHEH@HHHHEHPH]UHH}HEHHEHEHH;Et# HEH@8HEHEH@8HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@@HHEHEH@@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@@HHUHH9tJHEH@@HHEHEHH;E HEH@8HEHEH@8HUHH9uHEHHEHEHH;Eu@`@,\@\@HEHHEHUHEHHE}yHEHEHEH@8HE}~7HEH@@HHEHEHH;Eu@`@,\@\@IHEHH;EuHEHEUHH0H}HuHEH@8HUHH9tNHEH@8HEHEHH;EHEH@@HHEHEH@@HHUHH9uHEHHEHEHH;Eu0`@,\@\@HEHHEHUHEHHE}yHEH@8HE}~?HEHEHEH@@HHEHEHH;Eu0`@,\@\@ HEHH;EuHEHEUHH H}HuHEHHE$}yHEH@8HEHEH@@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHGE}yHEHEHEH@8HE"}~HEH@@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@8HE*}~HEHEHEH@@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHP8HHHHH@@H HHHP@HH@@HHHHP@HHHHHEHEHHHHHEPHE@E}u`@,\@\@4}yHEHPHEHH@8HHEHPHEHH@@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHP8HEH@@HHEH@8HEHEH@@HHEH@@HHHEHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHE=HEHHHEHEH@@HƒHEH HHEHP@HEH@@HOHEH@8HEHEH@@HtJHEH@@HHHEHP@HEH@@HHHEHP@HEH@@HHHEHP@HEH@@HEHEH@@HHEHEH@8HHEH@@H HHEHP@HEHUHP8HEH@@HHEH HHEHP@HEH@@HHHEHP@HEHEHEHUHHmHUHH9HHHHHHHHR@HHP@UHHHXHPHEHXHH`H`HEHEHHPHH!HEPHE@E܃}yHEHPHEHH@8HyHEHPHEHH@@HH}uYHE@HEHEHE&HE@HEHPHEHH@8HHEHEHHXHH9u HEHEHHXHH9HEHH;Pt_@,\@\@HmHEHH;PUHEHH@@HEHEHHUHHR@HHHPHR@HH HP@HEHHPHR8HP8HEHHPHR@HHHUHHR@H HP@HPH@@HHEH HHPHP@HEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHP8aHEHHHUHHHUHHHR@H HP@.HPH@8HEHXHH;EHPH@@Ht_@,\@]@THEH@@Hu_@,\@`]@+HEH@@HHHEHP@H`H9EuHXHUH HEH@yHEHHHUHP8 HEHHHUHHHR@HуHUH HP@ H`H9EuHXHPHXHt HEHH@@HtGHEH@x_@,\@]@;HEHHHXHHP8 HXHPHEHHm HE@u_@,\@]@HE@HEHHUHHHP8HEHHH@@Ht_@,\@]@HEHH@@HHEHH@@HHEHEH@8HEHEH@@HHEHHUHHR@HHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHHUHHR@HуHUH HP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8IHEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8HUH`H9w_@,\@ ^@HEH@yHEHHHUHP8HEHHHUHHHR@HуHUH HP@HEHH@@HHEHEH@8HEHEH@@H=HEH@@HHHEHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHHUHHR@HуHUH HP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8H`H9EuHXHUHHEH@yHEHHHUHP8gHEHHHUHHHR@HуHUH HP@7HEHHUHHR@HHP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8HEHUHkHEHHUHHHHUHHR@H HP@HEHH@8HEHEH@@HVHEH@@HHEHEH@8HEHEH@@HHEH@@HHHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEH@@HƒHEH HHEHP@HEH@@HHEHEH@8HHEH@@H HHEHP@HEHUHP8HXHH;Eu_@,\@C^@HEH@@HHHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEH@@HHHEHP@H`H9EuHXHUHxHEH@yHEHHHUHP8QHEHHHUHHHR@HуHUH HP@!HEHH@@HHEH@8HxHxH@@H)HEHHUHHR@HHP@HEH@@HHHEHP@HxH@@HHHxHP@HEHH@8HpHEHHpHR@HHP8HEHHHpH@@H HHpHP@HUH`H9w_@,\@ ^@HEH@yHEHHHpHP8HEHHHUHHHR@HуHpH HP@HEH@@HHHEHP@HEHHUHHR@HHP@HEH@8HhHhH@@HHhH@@HHHhHP@HEHH@8H`HEHH`HR@HHP8HEHHH`H@@H HH`HP@H`H9EuHXH`HHEH@yHEHHH`HP8HEHHHUHHHR@HуH`H HP@pHEH@@HHHEHP@HmHUH`H9BH`HXHHXHH@@Ht_@,\@h^@UHH0H}HuHUHMHEHH;Eu HEHHEHp8HMHUHEHHEHEHH;EtHENHEH@@HHEHUHuHMHEHHEH}tHEHMHUHuHEHKUHHPH}HuHUHMLEHUHEHH6E}HEHP8H}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@@HHHMHUHEH}~,HEH@@HHH}HMHuHEIHNHEH@@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIH{HEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@@HHHMHUHEHHEHEHH;EtHEJHEH@8HEHUHuHMHEHHEH}tHEHMHUHuHEHHUHHPH}HuHUHMLEHUHEHHE}HEH@@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHp8HMHUHEHu}y%HEHP8H}HMHuHEIHJHEH@8HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHHH}HuHE@0HEHEP4HEHUHPHHEHHEHPHUHHH}HHEH@HHHEHUHHH}uHEHHHEH@HEHUHSHH}HuH]HEHpHH)HHUHRHUuH[]UHSH(H}HE؋@4u_@V\@^@HE؋P0HE؉H HHHHDHEqHE؋P0HEH@H9u_@^\@^@bHE؋@0PHE؉P0HE؋P0HE؉H HHHHDHE}tmHE؋P0HE؋H0HE؉H H4ȋEHHHHH1HE؉H H HE؋@4PHE؉P4HE؋@4uHEH@HHP(HEHHBHE؋@0EHE؉H H([]UHSH8H}HuHUHUHEHHEE?EEEHEЋUH HЋEHHHHH HEЋUH H HEЋ@4PHEЉP4HEЋ@0;Ev HEЋUP0HEЋ@4uHEHP(HEHH HEЋP4HE؋9HEHP(HEHH)HEHH;EvjHEHHHEHEHP HEHH@ H)HEHP HEHHHEHHH HEHUHbHEHHtCHEHHHEHP HEH@ H)HEHP HUHEHHHHEHUHH8[]UHSHHH}HuUȈE} v_@\@j\@mHEHUHHEHHHEH(HHEHǀHEȋUHEUHEHøHH)HHEHEHUHUHuHEH}u_@\@^@HEH?HHEHmHEH?HHEEHEHUHHH;EwHEHH;Es_@\@^@>EHEHUH)HEHH)‹EH9r'HEHH;Et_@\@_@HEHEȉHEHEȉHH[]UHH0H}HEHHHEHEHHEHEHHUHHvHEHEHEHPHEHH9t'HEHHHEHEHHEH}uUHH H}HEH(HHEH}HEHHuHEHEHHHEH}u HUHEHHHEHPHEHHHDHEHP HEH@ HHEHP HEHHEHEHǀHEHP(HEHHmagic == slab_magic && slab->order == orderslab->magic == slab_magicslab->order <= SLAB_HUGEslab->order == SLAB_HUGE || (((intptr_t) slab & ~(slab_order_size(slab->order) - 1)) == (intptr_t) slab && slab->size == slab_order_size(slab->order))slab->in_use == slab->order + 1order <= SLAB_HUGEError in munmap(): %s 0slab->order <= SLAB_ORDER_LASTslab->order > 0slab_buddy(slab) == buddy%s: incorrect slab magic, expected %d, got %d%s: incorrect slab size, expected %zu, got %zu%s: incorrect slab statistics, total %zu, factual %zu %s: incorrect order statistics, the total %zu is not multiple of slab size %zu %s: incorrect order statistics, the used %zu is not multiple of slab size %zu %s: incorrect totals, ordered %zu, huge %zu, total %zu %s: incorrect used total, total %zu, sum %zu slab_cache_checkslab_order_sizeslab_assertslab_set_freeslab_mergeslab_buddyPslab_orderslab_createslab_get_with_orderslab_mmapmunmap_checkedslab_splitslab_from_ptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.horder <= SLAB_ORDER_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/mempool.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0slab->nfree0objcountmapsize * MEMPOOL_MAP_BIT >= objcountslab_size - objcount * objsize - mapsize * MEMPOOL_MAP_SIZEOF < objsize || mapsize * MEMPOOL_MAP_BIT == objcountslab->pool == poolslab_order_sizemempool_alloc_nothrowmempool_create_with_ordermslab_allocmslab_tree_removemslab_tree_insertmslab_tree_prevmslab_tree_next;P̳88VXܷ(I Ϲ@"`4F~ͺ  @u`Jսax0ӾX56C #@o` l(Hh%7\ 0 P Ap   0 0P p m '0 ]P p B z t KH "p W 0 zRx 0*zRx lAC g <8HAC C \`AC M |RAC  $AC E| TBAC } vAC  yAC t $@!AC \ DAGAC B dh?AC z SAC N AC M AC M 8AC s %AC ` $*AC e Dŵ'AC b d̵AC P lAC g $ JAC E@ /AC  $AC E AAC  4ݷAC  TIAC R $t@[AC GO sbAC ] zPLRx@ $$m@AC } AC  $bAC ] D. AC  dAC  ۻLAC G AC  AC  TAC   AC  $$AC Ez L\!AC \ l]GAC B ?AC z AC M AC M %AC `  *AC e ,'AC b $LJAC E@ tAC P 5AC p {AC v $`AC [ dhAC c ?AC : 4?AC : TAC  tQAC  AC  _AC  `AC [ 8AC  DAC ? 4AC } TUAC  t6AC 1 AC } gcAC ^ 8AC s 7AC r $ JAC E@ $< yAC Eo $d LAC E $ AC E  AC   CAC >  7hAC c $ AC E $< 0Jf@Xd Ywz@@ @ U@p`p`o`@ @@  r`@@0 o@oo@p`@@&@6@F@V@f@v@@@@@@@@@@@&@GCC: (Debian 4.7.3-4) 4.7.3,@\,0 x@A,D,@', @x@8?int 8_0t3Y-= .#0/#)   ' 0AOI#rK# R4# T#(9Vi#,N\i#-`xa4#:b4# qr#tO# #x# x  H?J  m ] q d0d#Ud#P]^#ffi`#0cb#4 d #8"f#Hmapp#P0|^#x#S#(##4i### . XyS^y#y0#y.--F]BF#|#5|#|#|# |#(|#0|#8I|#@&|#Hg|#P|#X #`W #h- F#p@F#tid#x{#N[#g#4# &o#/z#0z#1z# 2z#34#H5F#$7#/##F#d  ]   M  B u w4i@@A 4hQ V@ Q  Ac@@`"X^PɂLU4h9ig4@@"h@@ DptrXT V@posFl T  D?)z@,@pos+F\ V@ V@   <,@n@ >Fhi?FlGn@@@KiIFlK V@\F@x@  'q s`!- " @a"" a"F a"4  a"  r`"- ax@,@ 8int_0T3mwB8tY-= .#0/#)   ' 0AZI#rK# R# Tb#(9VI#,N\I#-`a#:b# qr#tZ# ##   BB   B;##5### #(#0#8I#@&#Hg#P#X $#`W *#h- ;#p@;#ti#x[#N-#g0#4@# &#/#0#1# 2#3#H5;#$7F#$/$#*#;# @  V 8x@@8haB@@`Bh2B`GZ@@2Zhb@r@ 6bXdhor@@joh9@@2h?;@@@2hkf@@fhZ@@88h@D@` hQ`D@Y@4IY@@  ͆h [@   7{@@E9I\U `[@ U E5@@ptr5X95IT [@-8{h:`   (A@i@@,AX< p[@ <  ,Ni@%@NhN` |[@W%@@ WhW`` @@`  `hUf@#@ \ fX~h [@( n#@@  nh9nId nX  [@,x@ @ 6 -xxF  [@@ @buf{K  F 6 [ ?/ @$!@  9IL  [@ `maph XP    4$!@!@@ 8 h8  [@`!@"@  H@  [@KIo`9XD"@s#@ 4 ÓXP9H4  [@}hs#@#@`  ϓX#@#@iIok#@\$@ ( ד`htmpH#@#@ ( X;$@O$@( P. \$@L&@  H9ID  [@h8`p%@%@( XF %L&@,'@ B!%X! %P9(Io&@'@+`"8,'@5)@ !8X!8P9Gh"Od5)@,@@!d~:fXgPhH(i@j lm @[@t)@)@lo( z*@*@o( *@,@8*@+@9I  % W@b#-*q- ,@~T@8;int 8_0p3w)z;Y-= .#0/#)   ' 0AaI#rK# R0# T~#(9Ve#,N\e#-`a0#:b0# qr#ta# ##   H;J m ] q dBd#Ud#P]^#ffi`~#0cb~#4 d#8"f+#Hmapp1#PB|+p##e#(#~#4e#~#~# @ Xye^y#yB#y@ ~#~#u~# ~# ~a#5)7m8,@,@8haB,@$-@]Bh2B`GZ$-@c-@`2Zhoc-@u-@oh9u-@-@ 2hkf-@-@%f%ha-@-@[[h0-@-@@ 0hQ0`7-@G.@9e\ _@  t0G.@\.@k#B\.@.@`blhs#hrhs#`,.@ /@+ ,hel , /@l/@ + ,Xret,h[,l/@/@+ ,Xret,h%,/@1@+ ,H ,@ret,h @`@G0@0@,`0@0@cmp,B\2 ,1@R2@@n+ ,H ,@ret,hn 0`@1@62@,`1@62@cmp,B\,R2@2@+ ,Xkey,Pret,hcmp,Bd} ,2@3@Q + ,Hkey,@ret,h,`3@V3@cmp,B\,3@'4@` + ,Hkey,@ret,h,`3@3@cmp,B\  ,'4@7@ + ,o ,o ,5  ,#cmp,B#, o, h  `@!4@D5@ cmp,B\|5@7@ ,`!5@L6@ ,P5@L6@,H5@L6@,@L6@7@,6@7@,6@7@, ,       B ,7@@F@ + ,n ,n ,  ,#cmp,B#,h ,`,n _@!"8@8@{ cmp,BL!G9@:@  , K!:@;@ ,@!<@>@ , ,,X!>@z@@ , ,!>@@@] ,@@z@@,z@@E@,!@@C@,P, ,~@@B@,~!4C@D@H,~ZC@D@,~D@E@,~D@E@,~   T ,@F@F@3+ ,X ,Pcb,MHarg,@sF@F@ret,h,`"M###3,F@;H@"+ ,H,@ ,cb,Marg,cmp,Bd!3G@G@ret,hG@9H@ret,P,X,;H@H@@+ ,X,Pcb,MHarg,@ret,h,H@wI@+ ,X ,Pcb,MHarg,@H@uI@ret,h,`,wI@J@+ ,H,@ ,cb,Marg,cmp,Bd!I@6J@ret,haJ@J@ret,P,XO,J@/K@`U+ ,X,Pcb,MHarg,@ret,h' //K@K@/h"/+` :K@K@ :hBK@L@ BhidxB~dI~L@KL@LI`ptrIXTKL@M@@TH _@idxW~\    sM@O@""s+Hs@ptrsidxu~\v~X gO@rQ@"+p~9e _@ 0H0X0P   ?rQ@Q@`e"+HehtmpeP!~Q@Q@Dk`Q@Q@kXqQ@?S@"+Xʣh _@    ?S@S@ /"+XobjPh S@~T@n"+XnPv% $ > : ; I$ >  : ;  : ; I8  I : ;  (  : ;  I !I/  : ;  : ; I8 !I  : ;I8 : ; .: ; ' I@B : ; I 4I4  &I.: ; ' @B 4: ; I .: ; ' I@B : ; I 4: ; I .: ; I@B .: ; @B .? : ; @B .? : ; I@B !I/!4: ; I? < "4: ; I?  % $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  &I : ;I8 : ; .: ; ' @B : ; I .: ; ' @B .: ; ' I@B 4: ; I .: ; I@B .: ; ' I@B 4I4  .? : ; ' I@B : ; I  4: ; I .? : ; ' @B  4: ;I .? : ;' I@B !: ;I ".? : ;' @B #4: ; I? < % $ > : ; I$ >  : ;  : ; I8  I : ;  (  : ;  I !I/  : ;  : ; I8 !I .: ; ' @B : ; I .: ; ' @B .: ; ' I@B .: ; ' I@B 4I4  &I.: ; I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B  4: ; I .? : ; ' @B ! "' I#I /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/x86_64-linux-gnu/bitsslab_cache.hmempool.hmempool.cstddef.hstdint.hrlist.htypes.hlibio.hstdio.h @uwǯr.0u.~.+A.AA<23!<LןA!*yJ2>hJ =1KI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hslab_cache.cstdint.hstddef.htypes.hlibio.hstdio.h x@85./!2K5..<tYQ..+.3K.uwǯ3fY~tfLK2(yK2K!221Kfɭ2h@f .u0vKYK2v2YYyK2= [!K2gJh!2w 2fvY=u;2w.X <gK/K .uY;h!3-[/,Ks=LK.2ɃLH,LGL1QhtH/M")H(L)H(nJW3LH/LhW"y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sysrlist.hslab_cache.hmempool.hmempool.cstddef.hstdint.htypes.htypes.h ,@85./!..c..+.(.fYtK.3sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt(j)33&32x+/v+fLCxKY7g9+vyfu $t/Y"x"VJ'2=u/8h׻2"g2*'__off_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/mempool.c_chainrbt_root_shortbufMEMPOOL_OBJ_MIN_IO_read_ptr_IO_read_base_IO_buf_basenext_in_cachelong long unsigned intmslab_tree_tobjcountSLAB_MIN_SIZEmempool_basiclong long intfree_slabs__PRETTY_FUNCTION___fileno_IO_read_end_flags_IO_buf_endslab_size_minnfree_old_offsetOSCILLATION_MAX__pad2free_checked/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit_IO_markerseed_IO_write_ptrspare_sbufshort unsigned intallocating_IO_save_base_locktotal_flags2_modein_userbn_right_redmempool_createnext_in_listsizetypeSLAB_ORDER_LASTallocatedrbt_nil_IO_write_end__func___IO_lock_t_IO_FILEGNU C 4.7.3slab_list_pos_markersobjsize_Boolunsigned charmbitmap_tmempoolSLAB_MIN_SIZE_LBshort intOBJECTS_MAX_vtable_offsetMEMPOOL_MAP_BITMEMPOOL_MAP_SIZEOFmslabuint32_tslab_cachelong doubleptrs__off64_t_cur_columnordersmempool_used_IO_save_endoscillation__pad1SLAB_MAX_SIZE__pad3__pad4__pad5OBJSIZE_MAX_unused2stderrslab_orderalloc_checkedOBJSIZE_MINrlistuint8_t_IO_backup_baseITERATIONS_MAXmapsizesmall_statsbasic_alloc_streakSLAB_HUGErbn_leftmain_IO_write_basemunmap_checkedslab_putslab_list_createheadrlist_shiftrlist_createslab_get_with_orderslab_mmaprlist_nextslab_mergeslab_cache_checkslab_splitslab_cache_destroypoison_charslab_cache_createslab_is_free__mptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab_getdont_panicslab_from_ptrslab_assertslab_buddyrlist_emptynew_orderslab_poisonrlist_addsmall_stats_resetmergedrlist_firstslab_magicslab_size_alignlengthorderedslab_set_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/smallnew_sizeslab_set_usedhugeaddritemslab_order_sizerlist_delalignmentmslab_tree_lastmslab_cmpslabsizetotalsuintptr_tmslab_tree_psearchmslab_idxmslab_tree_searchmempool_alloc_nothrowleftleftpathpmslab_sizeofleftrighttnodebit_nomslab_tree_reverse_iter_startmslab_tree_next__ssize_tmempool_destroymslab_tree_reverse_itermempool_create_with_ordermslab_freemslab_objmslab_tree_itermslab_tree_newmslab_tree_iter_startpathmempool_statsunodemslab_allocmslab_tree_reverse_iter_recurseleftrightleftmempool_freerbtreemslab_tree_prevmslab_tree_removemslab_tree_iter_recursemslab_tree_firstmslab_tree_nsearchslab_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/mempool.ctrednodepmslab_offsetcnodeslabcountmslab_tree_insertmslab_createwwkvklwlmwmpwpvwwwvwwwvwwwvwwwQvQRwRSwSVwVvwww[v[\www v !w!"w"%w%gvghwhiwilwlvwwwvwww v  w  w wvww"w"UvUVwVWwWZwZzvz{w{|w|wvwwwvwwwvwwwLvLMwMNwNQwQvwww!v!"w"#w#&w&vwwwvwww8v89w9:w:=w=OvOPwPQwQTwTvwww v  w wwvwwwvwww v www v  w  w  w v w w w F vF G wG H wH K wK v w w w v w w w v w w w vwww@v@Awww v !w!"w"%w%gvghwhiwilwlvwwwvwwwvwwwvwwwvwww@v@AwABwBEwEvwwwvwwwvwwwOvOPwPQwQTwTvwwwvwwwVvVWwWXwX[w[vwwwvww!w!vwwwjvjkwklwlowo# v# $ w$ % w% ( w( vwww:v:;w;<w<?w?~v~wwwvwwwvwwwvwwwrvrswstwtwwwvwww v wwwDvDEwEFwFIwIvwww!v!!w! !w ! !w !"v""w""w""w"$v$$w$$w$$w$?%v?%@%w@%A%wA%D%wD%&v&&w&&w&&w&&v&&w&&w&&w&'v''w.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @V @ ^o@ko@Pz@0@ @@@0@0AU@U  U@ U0 P`@P`b@b m@m p`pp`pp`pp`pq`qr`rr`r r`r: 0rr)ps/5)FCo_O0θ4 Ze$ ` @@<@`@@ @@@ @ @ @ @ 0@U@ U@P`@b@m@p`p`p`p`q`r`r`r` ! p` `@. @A @Wr`fp` @p` @lV@  @H @s`8 @V@ " @0V@IV@W ,@BjV@x x@! @G @? @S r@ @ @8 @% @* @' D@ Y@l[@  @J$`[@=W@H[@a @mp[@  i@|[@ %@ @ @[[@ #@b[@  @[@2  @<[@ U $!@b`[@ y !@ [@  "@[@ [@@[@ ,@! ,@G $-@? c-@ u-@ -@% -@* -@' -@J$_@ G.@ \.@5@`@0`@1`@J_@c /K@cp K@7z L@J_@ _@_@m@p`p`r`p`p`#r`/r`E U@UaZ .@{i{r`  r` @ 5)@r` KL@yU@ 2@) 7@`; ;H@K_ad M@o at L&@r`@a  3@( s#@L: n@H rQ@X U@g \$@{ J@@ T@ ?S@h"ȭa' 0@. O@H wI@6f S@tr` @y @F@ K@8 '4@  H@  ,'@   R2@  Q@C5 G a ai  1@?y  l/@h   /@`  @  #@   F@D r`  /@?crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrymempool.cslab_order__PRETTY_FUNCTION__.1752mempool_createmempool_usedptrsfree_checked__func__.3782alloc_checked__PRETTY_FUNCTION__.3787__func__.3788basic_alloc_streak__func__.3799slab_cache.crlist_createrlist_addrlist_delrlist_shiftrlist_firstrlist_nextrlist_emptysmall_stats_resetslab_list_createslab_size_alignslab_sizeofslab_order_size__PRETTY_FUNCTION__.1756slab_magic__PRETTY_FUNCTION__.3149slab_assert__PRETTY_FUNCTION__.3155slab_set_free__PRETTY_FUNCTION__.3160slab_set_usedslab_is_freeslab_poisonpoison_char.3171slab_create__PRETTY_FUNCTION__.3177munmap_checked__PRETTY_FUNCTION__.3183slab_mmap__PRETTY_FUNCTION__.3187slab_buddy__PRETTY_FUNCTION__.3195slab_split__PRETTY_FUNCTION__.3200slab_merge__PRETTY_FUNCTION__.3209__PRETTY_FUNCTION__.3235__func__.3272mslab_sizeofmslab_cmp__PRETTY_FUNCTION__.2761__PRETTY_FUNCTION__.2774__PRETTY_FUNCTION__.2817__PRETTY_FUNCTION__.2849mslab_createmslab_objmslab_idx__PRETTY_FUNCTION__.2959__PRETTY_FUNCTION__.2977__PRETTY_FUNCTION__.3000__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finipoolmslab_tree_newfree@@GLIBC_2.2.5allocatingabort@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startslab_from_ptrslab_cache_check_edatamslab_alloc_finimslab_tree_nsearchmslab_tree_removemslab_tree_iterprintf@@GLIBC_2.2.5seedmslab_freeused__assert_fail@@GLIBC_2.2.5memset@@GLIBC_2.2.5slab_get__libc_start_main@@GLIBC_2.2.5srand@@GLIBC_2.2.5__data_startcachefprintf@@GLIBC_2.2.5__gmon_start__mslab_tree_psearchslab_cache_createmempool_basicmempool_destroy_IO_stdin_usedslab_get_with_ordertime@@GLIBC_2.2.5mslab_tree_reverse_iterstrerror_r@@GLIBC_2.2.5mmap64@@GLIBC_2.2.5__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmempool_freemalloc@@GLIBC_2.2.5_end_startmempool_create_with_ordermslab_tree_reverse_iter_startmempool_stats__bss_startmunmap@@GLIBC_2.2.5mainmslab_tree_iter_recursemslab_offsetmslab_tree_insert_Jv_RegisterClassesmslab_tree_reverse_iter_recurseslab_putmslab_tree_searchmempool_alloc_nothrowexit@@GLIBC_2.2.5_ITM_registerTMCloneTableobjsizemslab_tree_prevmslab_tree_last_Unwind_Resume@@GCC_3.0mslab_tree_first_initslab_cache_destroyrand@@GLIBC_2.2.5mslab_tree_iter_startstderr@@GLIBC_2.2.5mslab_tree_nexttarantool-1.5.1.218.g1a69fd6/test/unit/rope_basic.test0000775000000000000000000011164612213333046020736 0ustar rootrootELF>@ @@v@8@&#@@@@@@@@@77 77`7` 77`7`@@DDPtd//@/@Qtd/lib64/ld-linux-x86-64.so.2GNU GNUK;2X;1oeT T@D!$&'$$Fik|qXK| j C!$/BE9 uZb3b/ Y : {{R + : N h/ &&@ j @$+@f %@ -@=` @0:`G0+@t@:`  $@: :` @w @0:`0:` +@ p$@Z {@V *@@ @ @y *@v<  :` I@!libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitputsputcharabort__assert_failstrlenmallocstderrfprintf__libc_start_mainsnprintffree__libc_csu_finirope_iter_next_edatarope_iter_startrope_check__data_start_IO_stdin_used__libc_csu_initrope_traverse_endrope_pretty_print__bss_startrope_insertrope_eraserope_extract_noderope_clearGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui 9` 0:` 9`9`9`9`9`9`9`9` 9` 9` 9` :`:` :`:`HH]. HtH5R. %T. @%R. h%J. h%B. h%:. h%2. h%*. h%". h%. hp%. h`% . h P%. h @%- h 0%- h %- h %- h1I^HHPTI +@H*@H-@g7:`UH-0:`HHw]øHt]0:`0:`UH-0:`HHHH?HHHu]úHt]0:`=Q- uUH~]>- @H=* tHtU7`H]{vUHH}H}t HE@]UHHH}HEHHUHH}HuHUHMLELMHEHHEHUHPHEHUHPHEHUHP HEHUHP(HEHUHP]UHH@H}HuHUHMLEHUHEؾ0HHEH}u*LEH}HMHUHuHEMIH5HEUHHH}HEHHEH@(HUHRHMHHUHH}HuHEHUH]UHH H}HEH@ HUHRHHEH}uHUHEHHHEUHHH}HEHH@(HUHHRHMHHUHH}HuHUHMHEHUH]UHHH}HuHEHUƿ@+@MUHHH}HuHEHUHHH}HuHEHUHAs@U@ @]UHH H}uHUEHUHƿH+@HEHHUuHEHx HE*@HHEHUHHH}uEHƿi+@ZUHEHHE*@HHEHUHH ,@}+@HEHEHtAHy) H$,@AA+@+@+@,@HǸ/HEHHEHEHcHtAH) H$,@AA+@+@2,@,@HǸHEHHtAH( H$,@AA+@+@2,@,@HǸE{HE*@HHEHdHE*@HBHEHHEHN,@P,@UHH,@}+@jHEHEd,@HuHEh,@H_HEl,@HIHEH,@P,@UHH,@}+@HEHEHHEl,@HHEHeHEh,@HHEHDHEd,@HHEH,@P,@dUHH,@}+@F-HEHEHHEp,@H-HEHHHEv,@H HEHHHEy,@HHE|,@HHEH\HHE|,@HHE~,@HHE~,@HHEH,@P,@OUHH,@}+@1HEHEHHE,@HHEHpHEHHE,@HHEHiHE,@HHEHHEH",@P,@uUH;J]ÐUHH}H}t HE@]UHHH}HEHHUHH}HuHEHUH]UHH}H}tHE]UHSHH}HEH@HpHEH@ H^HE@HEPHEH@HHEH@ H~9~HEH@HjHEH@ HUHUH[]UHH0H}HuUHEH@ HUHR(HHEH}uNHEHEU܉PHEPHEPHEHUHPHEH@ HEHP HEHPHEUHH H}HEHHEgHEH@Hu*HEH@ HEHEH@(HUHRHMHH(HEH@HEHEHP HEHPHEHUHP HEHEH}uHEHUHH0H}HuUHE@EHEU܉PHEH@M܋UHuHvH}HHEE܋U)HMHEHHwUHH H}u}HEHcHHDHE}HEUHcHHTHEHcHHTHEUHcHJHUHTHEH[HEHOHEUHSHH}u}؃}Ѓ}HEHcHHDH)HHEHcHHTUHEHH[]UHSHXH}HuUYHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEH?EHEH0EЋE9EMEЍPHEE;EEЋUԉ)ȃHEUHcHHDHEȃ}HEHcHHDHEHEHEHEHEE;E|$HEH}HEHH"HEH}HEH0HE;Et m}tHEH;EHX[]UHSHPH}HuBHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEHEHEHEЋE9EMEЍPHEEЋUԉ)ȃEЋUԉ)ȃHE؋UHcHHDHEȃ}HEHcHHDHEHEH%EHEHEE;EHEHUHEH9HHEHUHEHHHEH;EHP[]UHH8H}HuHUHEЋEHEHHHEHEPHEHEPHEH@HEE;EsHEHEHPHEH0E)EHE@;Ew3HE@)EHEHEHP HEHHEHHHjHEЋUHEUHH}uUHEHHHEHEEHHHHEHHPHEHPHEHHHEHEPEHEPHE}HHHHEHHPHEHHEHHHuHE]UHHHhdHX`HhH‹d9sHhHd`u/@V,@-@`HXHhHHkHEH}u HhHp`HdHpHHHEHEHHHdtqdHEHHHhHH HEH}u HEHUHPHEPHEHEPHE@HEPHEHEHE@‹dHEHHEHEHHUHHEHMHpHHHUHHHxtHxH‹t9w.@,@-@+HxHHtHHHEHEtuHEHHtHEHHHxHHHEH}uLHE@HEHHEHEHHUHHEHMHHHHEHUHSHH84H8H‹49w.@,@-@ H8H@H4H@HHH!HEHEHHHEHE@4uTH8H@HURHMHqH8HyHHEHPHE@PHEPHE@EH8H@4HURHuHvH8HHE4HEPE̍P49u ?H8H@4M̉)ӉډH8HyHuHE4Ủ)ȍPHMH8HHSHEH}u HE@HEHxHEHEHHUHHEHMH@HHz4t.@,@4-@ HEH@HHEH@ HHEHEHEH@ HEH@9E܋MHEHHHEHEHHHEHEHPHEHPHEPHEЉPHEЋUHcHHDHE5HEЋPHE@)HEЉP}HEHcHHDHEHEH;EuHEH@HEHEHHUMHcHHTHH8H@(HMH8HHHUH@HHHH[]UHH}2HEH@HPHEH@HH@HHEH@HPHEHPHEH@HH@Hu]UHHH}HEHPHEHPHEH@HUHHHHEH@HHt HEHaHEH@HUHHH}HEH@HH@ Ht@HEH@HPHEH@HH@ HHEH@HPHEHPHEHbHEH@HUHH9uHEH@HBHEH@HPHEHPHEH@HHHEH@HH@ H9tHEH@HUHHHhH`HhHpHHHpHHE3HE@HEHPH`HHHpHHEH}uH UHATSHHXHXH`HHTH`H HEHE@u.@W,@@-@0HEXHEH@HAHEH@ HAHE@9t.@Z,@X-@HEHEH@HAHEH@ HA9~HEH@HHEH@ H9t.@],@-@iHE@HEXHEH@HAHEH@ HAHE@9uZHEHEH@H AHEH@ HA9~HEH@HHEH@ H9tpH`HHEH}NHĠ[A\]UHSHXH}HuHUMHEf.@HEp.@HEz.@HEȁ.@HEH"HEH؃EEHHEH}tpHEH@Hu HEH@ HtV}HHLEHUHEIHѺ.@HǸHEH@HUHuH EHHLEHUHEIHѺ.@HǸtEHHTHEHƿ.@DH}u.@HEHE@Hƿ.@ HE@HEHPHEHHп.@H}t7HEH@Hu HEH@ HtHEH@ HUHuH2HEHLH"HX[]UHHH}HuHEHZHƿ.@[HUHEHHA.@HEHHu.@H ÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1IHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH%.*sinsert offset = %zu, str = '%s' erase offset = %zu *** %s *** /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/rope_basic.cfalserope_size(rope) == 0Test failed: %s is %s at %s:%d, in function '%s' rope_iter_start(iter) == NULL *** %s: done *** c b a a b c *abtest_erasetest_inserttest_appendtest_prependtest_empty_rope/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.csizeoffset < rope_size(rope)offset == 0node->leaf_size != 0node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_sizenode->height == (((rope_node_height(node->link[0])) > (rope_node_height(node->link[1])) ? (rope_node_height(node->link[0])) : (rope_node_height(node->link[1]))) + 1)┌──└──│ %s%snil{ len = %zu, height = %d, data = ''}size = %zu string = ''rope_checkrope_eraserope_extract_noderope_insert;00;X8)X_xxEc8Xxf.C8X\x{l @`8kx9Z`0PxzRx *zRx <AC Z <;AC X \8eAC ` |}lAC g 6AC q AC T QAC L  0AC k !AC \ <+AC f \%AC Y |#AC Y !%AC ` &lAC g rTAC O AC  AC  <AC  \AC  |AC  =AC x AC Z AC X AC T AC Y $<AC E dDAC  AC  'hAC c oAC  $sAC Ei $ )AC E $4pAC Ef \AC  |AC  zPLRx @ $$<7@AC  $L!L7@AC  $t[7@AC H 4RAC M THZAC U tAC  $1k7@AC  $AC J $Lry7@AC E  5vAC q $,Jf@XT    e  @ @ @ $+@7`7`o`@@ @  9`h @ @0 o8 @oo@7`V @f @v @ @ @ @ @ @ @ @ @ @ @& @6 @GCC: (Debian 4.7.3-4) 4.7.3,, @>,n l@j , @j@[?int`Z&f(x~44)4|*  (/: !1F# 3[# =5[# 7# 9:# QJ J 0< >Q# g@# tBm# D# F# HH#(GK M#topO# XQ#WQ Q  J-ln,--Du W [F# 8># o># k># ># M>#(>#0b>#8N>#@>#HH>#P>#X% W#` ]#h F#p]F#t (#x##c#s#&3#q/#x0#1#2#34#e5F##7y# W QW# Q]# .F# R Ds J D JU[, @K @UQhyg[K @h @`gh,nh @ @gnhnm`nXoPoHgp@; @9@ mXPH@gh9@o@ho@@OitOh`O@@@XitOh@ @itOh @*@#ctxh`h4X4P3*@U@`_hn4`U@s@hh4`Ds@@ hptr`6"@@(@"@K(h([dstr(>X1"@v@@1h1[dv@@E ,@ hLO` D Jz"@@2 EB  ,@&h DB J 2 0@>@` E  ,@4h D J  >>@S@ E  ,@Bh RS@-@ * E:  ,@Vh D: J * bcF-@j@] l@*@c[?int`Z&fW'F(444  - (. (/> !1F# 3[# =5[# 7# 9>#UNN 0< >U# g@# tBx# D# F# HH#(GK M#topO# XQ#[UUN-ln,-=uJ=f,U[l@@UUhyg[@@@gh@@ith`6F@@ @6Uh@@|@` p@U`JU|@ @ JXJPhJ[LLUh&\ @@ \Xit^Uh_U`jsU@@ sXsUPs[Ldu[lx`}U@@ }UXZ}FTUhyU@ @@ U`ZF\z @@ XFU`UXcFT?UHNFDoF@0U=ULFmF @@ X`U`UXcFT?UHNFDoF@[@@U&UFF@@` yXHZy@1O  [l  U` [\[!E0@{@ X0X"dir0FT10mP 2Uh#QF{@I@ Q|Q[|Q|hQ[|$8 /@ XUh X]| ``t@@ lUX=N N-#UI@j @ \ |[|$8l  .@ X| h U`=l N\ #Fj @$@ q |[|$8  .@ X| X UP ZFL%!@"@O h[ R U"@#@ U@= N q &6$@p$@@ "ith# Up$@$@ "it h#|U$@%@# "ith'k<%@&&@` <|`< | L>| HAUh  4 'L&&@*(@ L| LN| QUX$8  .@q (i*(@*@  iUj SkD"dirkF m @ .o  q[\ Mr7PD N)*@*@h `% $ > : ; I$ >  I' II '   : ;  : ; I8 I !I/  : ;  : ; I8  : ;I8 : ; .: ; ' I@B : ; I .: ; ' I@B .: ; ' @B 4: ; I .: ; ' @B : ; I 4: ; I .: ; I@B .: ; @B 4I4  &I.? : ; I@B 4: ; I? < % $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/  : ;  : ; I8 &I.: ; ' I@B : ; I .: ; ' I@B .: ; ' @B : ; I .: ; ' @B 4: ; I .? : ; ' @B 4: ; I  U .: ;' I@B : ;I 4: ;I !.: ;' I@B ": ;I #.? : ;' I@B $4I4  % &.: ;' @B '.? : ;' @B (.: ;' @B ).? : ;' @B _M /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope_common.hrope_basic.cstddef.htypes.hlibio.hstdio.h , @tY.5.Zuu&K.2.3uu/K."~.>2222K2/2KR.>AAA=2>YYY=2>=2>""Y"YZ=2>$$$=2KY% /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope.cstddef.htypes.hstdio.h l@tY..~.tY6!>s-w"IW;hx0uvuK2/ʻ˻u t2/$2-iK21z=Y/K4 Kg $ "J%<# tY/L4MKgc  t=Y>0[h h<J K .(///K.%L#u# .&ugs"3u"&uu.$s'/s6XLu g/gi!.>Y /:@2L2==Ov=#3N,zLx;.J.JLs,N)WW:MqX,u"t/2uI/s>tYx/tree_size_old_offsetstr_getn_IO_save_endshort inttest_rope_newmem_free_IO_write_ptr_flags_IO_buf_base_IO_read_endrope_free_functest_appendrope_iter_deleterootrope_split_funcrope_alloc_funcstderrlong long inttest_erase_locktest_rope_erase_cur_columnsplit_ctxtest_insert_markers_posstr_printleaf_sizerope_iter_sbuf_IO_FILElong doubleunsigned chartest_prependtest_empty_rope/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitlong long unsigned int_IO_marker_shortbufGNU C 4.7.3_IO_write_base_unused2rope_create_IO_read_ptr__func___IO_buf_endrsize_tmainalloc_ctx__pad1__pad2__pad3__pad4__pad5datashort unsigned intmem_alloc_IO_write_end__off64_trope_iter_create_fileno_chain__off_t/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/rope_basic.c_IO_backup_basepath_flags2_mode_IO_read_baserope_sizesizetype_vtable_offsetrope_deleterope_node_IO_save_baserope_iter_newrope_node_sizetest_rope_insert_IO_lock_tp_endrope_node_printnew_noderope_node_heightROPE_HEIGHT_MAX__PRETTY_FUNCTION__l_left_heightdirectionold_sizel_right_heightrope_iter_nextparentrope_relinkconninsert_heightavl_route_to_offsetchild_prefix_lenr_left__ssize_tr_left_heightr_right_heightl_leftavl_rebalance_after_deleterope_clearadjust_sizel_rightavl_route_to_nextrssize_tvisit_leafrope_traverseavl_rotate_doublerope_node_newsplit_noderope_pretty_printrope_iter_startsave/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.cleft_sizeprint_leafr_rightpaddingrope_iter_down_to_leafchild_prefixp_offsetmirrorrope_node_splitavl_rebalance_after_insertrope_checkavl_rotate_singlerope_extract_nodewwvw w #w#;v;<w<=w=@w@vwww v  w wwBvBCwCDwDGwG[v[\w\]w]`w`vwwwvwwwvwww(v()w)*w*-w-FvFGwGHwHKwKdvdewefwfiwivwwwvwwwIvIJwJKwKNwNvwwwbvbcwcdwdgwgvwww&v&'w'(w(+w+vwww=v=>wwwvw w #w#;v;<w<=w=@w@TvTUwUVwVYwYrvrswstwtwwwvwwwvwww2v23w34w47w7vwww)v)*w*+w+.w.vwww)v)*w*+w+.w.vwwwcvcdwdewehwhvwww v w w w v w w  w vwwwvwww]v]^w^_w_bwb,v,-w-.w.1w1vwwwvwwwvwwwvw#\"#@?TU.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N  @ V@^o@Rko8 @8 Pz @ 0 @ h  @ @ @@ @ @@ $+@$+ 0+@0+/@/0@0<7@<7M7`77`77`77`79`99`9 :` : 0:`0:00:L:`):f5RaCsVmO0\ZcetDus8 %c @f@@<@`@ @@@8 @ @ @ @ @ @ @ @$+@0+@/@0@<7@7`7`7`7`9`9` :`0:` !" 7` p @. @A @W8:`f7` @7` , @ K @ h @e @l 9@6 o@ @Q @0/ @!8 *@+B U@L s@U @%c @lt "@T v@,@ @,@  @,@  >@,@  S@,@  l@ @ @ @" @. |@< @hL @^ @sp @ @p @ @/@ .@.@  $@R..@ G *(@W87@e7`q7`(:`7`7`0:`9` +@ 3  :`> $@M_0:`f$+@l p$@Z &&@ :` ! 00+@? @_ *@o %@@:` @ @ *@v0:` -@= {@ j @  I@! )A @G0:`[ @crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryrope_basic.crope_node_sizerope_sizerope_createrope_newrope_deleterope_iter_createrope_iter_newrope_iter_deletestr_getnstr_printmem_allocmem_freetest_rope_newtest_rope_inserttest_rope_erasetest_empty_rope__func__.3724test_prepend__func__.3729test_append__func__.3733test_insert__func__.3737test_erase__func__.3741rope.crope_node_heightrope_relinkrope_node_newrope_node_splitavl_rotate_singleavl_rotate_doubleavl_rebalance_after_insertavl_rebalance_after_deleteavl_route_to_offsetavl_route_to_next__PRETTY_FUNCTION__.3131__PRETTY_FUNCTION__.3140__PRETTY_FUNCTION__.3148rope_iter_down_to_leaf__PRETTY_FUNCTION__.3190rope_node_print__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5putchar@@GLIBC_2.2.5abort@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startrope_iter_nextputs@@GLIBC_2.2.5_edata_finistrlen@@GLIBC_2.2.5rope_iter_startrope_checkprintf@@GLIBC_2.2.5snprintf@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_startfprintf@@GLIBC_2.2.5__gmon_start___IO_stdin_used__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5rope_traverse_end_startrope_pretty_print__bss_startmainrope_insertrope_erase_Jv_RegisterClassesrope_extract_nodeexit@@GLIBC_2.2.5_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initstderr@@GLIBC_2.2.5rope_cleartarantool-1.5.1.218.g1a69fd6/test/unit/rope_avl.result0000664000000000000000000001023712202131537020764 0ustar rootroot *** test_avl_rotations *** insert offset = 0, str = '1' size = 1 string = '1' └──{ len = 1, height = 1, data = '1'} insert offset = 1, str = '2' size = 2 string = '12' │ ┌──nil └──{ len = 1, height = 2, data = '1'} └──{ len = 1, height = 1, data = '2'} insert offset = 2, str = '<' size = 3 string = '12<' │ ┌──{ len = 1, height = 1, data = '1'} └──{ len = 1, height = 2, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 0, str = '0' size = 4 string = '012<' │ ┌──{ len = 1, height = 1, data = '0'} │ ┌──{ len = 1, height = 2, data = '1'} │ │ └──nil └──{ len = 1, height = 3, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 0, str = '>' size = 5 string = '>012<' │ ┌──{ len = 1, height = 1, data = '>'} │ ┌──{ len = 1, height = 2, data = '0'} │ │ └──{ len = 1, height = 1, data = '1'} └──{ len = 1, height = 3, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 1, str = '*' size = 6 string = '>*012<' │ ┌──nil │ ┌──{ len = 1, height = 2, data = '>'} │ │ └──{ len = 1, height = 1, data = '*'} └──{ len = 1, height = 3, data = '0'} │ ┌──{ len = 1, height = 1, data = '1'} └──{ len = 1, height = 2, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 3, str = 'p' size = 7 string = '>*0p12<' │ ┌──nil │ ┌──{ len = 1, height = 2, data = '>'} │ │ └──{ len = 1, height = 1, data = '*'} └──{ len = 1, height = 4, data = '0'} │ ┌──{ len = 1, height = 1, data = 'p'} │ ┌──{ len = 1, height = 2, data = '1'} │ │ └──nil └──{ len = 1, height = 3, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 3, str = 'p' size = 8 string = '>*0pp12<' │ ┌──nil │ ┌──{ len = 1, height = 2, data = '>'} │ │ └──{ len = 1, height = 1, data = '*'} └──{ len = 1, height = 4, data = '0'} │ ┌──{ len = 1, height = 1, data = 'p'} │ ┌──{ len = 1, height = 2, data = 'p'} │ │ └──{ len = 1, height = 1, data = '1'} └──{ len = 1, height = 3, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 3, str = 'p' size = 9 string = '>*0ppp12<' │ ┌──nil │ ┌──{ len = 1, height = 2, data = '>'} │ │ └──{ len = 1, height = 1, data = '*'} └──{ len = 1, height = 4, data = '0'} │ ┌──{ len = 1, height = 1, data = 'p'} │ ┌──{ len = 1, height = 2, data = 'p'} │ │ └──nil └──{ len = 1, height = 3, data = 'p'} │ ┌──{ len = 1, height = 1, data = '1'} └──{ len = 1, height = 2, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 3, str = 'p' size = 10 string = '>*0pppp12<' │ ┌──nil │ ┌──{ len = 1, height = 2, data = '>'} │ │ └──{ len = 1, height = 1, data = '*'} └──{ len = 1, height = 4, data = '0'} │ ┌──{ len = 1, height = 1, data = 'p'} │ ┌──{ len = 1, height = 2, data = 'p'} │ │ └──{ len = 1, height = 1, data = 'p'} └──{ len = 1, height = 3, data = 'p'} │ ┌──{ len = 1, height = 1, data = '1'} └──{ len = 1, height = 2, data = '2'} └──{ len = 1, height = 1, data = '<'} insert offset = 3, str = '*' size = 11 string = '>*0*pppp12<' │ ┌──nil │ ┌──{ len = 1, height = 2, data = '>'} │ │ └──{ len = 1, height = 1, data = '*'} │ ┌──{ len = 1, height = 3, data = '0'} │ │ │ ┌──{ len = 1, height = 1, data = '*'} │ │ └──{ len = 1, height = 2, data = 'p'} │ │ └──nil └──{ len = 1, height = 4, data = 'p'} │ ┌──{ len = 1, height = 1, data = 'p'} └──{ len = 1, height = 3, data = 'p'} │ ┌──{ len = 1, height = 1, data = '1'} └──{ len = 1, height = 2, data = '2'} └──{ len = 1, height = 1, data = '<'} *** test_avl_rotations: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/rope.result0000664000000000000000000004017712202131537020130 0ustar rootrootinsert offset = 0, str = 'who's gonna be' size = 14 string = 'who's gonna be' └──{ len = 14, height = 1, data = 'who's gonna be'} insert offset = 14, str = '' size = 20 string = 'who's gonna be' │ ┌──nil └──{ len = 14, height = 2, data = 'who's gonna be'} └──{ len = 6, height = 1, data = ''} insert offset = 20, str = ', Mr. Black' size = 41 string = 'who's gonna be, Mr. Black' │ ┌──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 2, data = ''} └──{ len = 21, height = 1, data = ', Mr. Black'} insert offset = 41, str = ', but they , Mr. Black, but they , Mr. Black, but they , Mr. Black, but they , Mr. Black, but they , Mr. Black, but they don't know each other' │ ┌──{ len = 30, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 4, data = ''} │ ┌──{ len = 21, height = 1, data = ', Mr. Black'} └──{ len = 27, height = 2, data = ', but they , Mr. Black, but they don't know each other, so nobody wants to back.' │ ┌──{ len = 30, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 4, data = ''} │ ┌──{ len = 21, height = 1, data = ', Mr. Black'} └──{ len = 27, height = 3, data = ', but they , Mr. Black, but they don't know each other, so nobody wants to back down.' │ ┌──{ len = 30, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 4, data = ''} │ ┌──{ len = 21, height = 1, data = ', Mr. Black'} │ ┌──{ len = 27, height = 2, data = ', but they , Mr. Black, but they don't know each other, so nobody wants to back down.' │ ┌──{ len = 30, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 5, data = ''} │ ┌──{ len = 21, height = 1, data = ', Mr. Black'} │ ┌──{ len = 27, height = 2, data = ', but they , Mr. Black, but they don't know each other, so nobody wants to back down.' │ ┌──{ len = 25, height = 1, data = ' got got>You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 5, data = ''} │ ┌──{ len = 21, height = 1, data = ', Mr. Black'} │ ┌──{ len = 27, height = 2, data = ', but they , Mr. Black, but they don't know each other, so nobody wants to back down.' │ ┌──{ len = 16, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 5, data = ''} │ ┌──{ len = 21, height = 1, data = ', Mr. Black'} │ ┌──{ len = 27, height = 2, data = ', but they , Mr. Black, but they don't know each other, so nobody wants to back down., Mr. Black, but they don't know each other, so nobody wants to back down.point' │ ┌──{ len = 16, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 6, height = 5, data = ''} │ ┌──{ len = 21, height = 1, data = ', Mr. Black'} │ ┌──{ len = 27, height = 2, data = ', but they Black, but they don't know each other, so nobody wants to back down.point' │ ┌──{ len = 16, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 20, height = 4, data = ' Mr. Black'} │ ┌──{ len = 27, height = 1, data = ', but they don't know each other, so nobody wants to back down.point' │ ┌──{ len = 16, height = 1, data = 'You got four of '} │ ┌──{ len = 9, height = 2, data = 'guys all '} │ │ └──nil │ ┌──{ len = 19, height = 3, data = 'five fighting over '} │ │ └──{ len = 14, height = 1, data = 'who's gonna be'} └──{ len = 5, height = 5, data = ' Mr. '} │ ┌──{ len = 5, height = 1, data = 'Black'} │ ┌──{ len = 27, height = 2, data = ', but they #include #include static inline void * str_getn(void *ctx, void *data, size_t size, size_t offset) { (void) ctx; return (char *) data + offset; } static inline void str_print(void *data, size_t n) { printf("%.*s", (int) n, (char *) data); } static inline void * mem_alloc(void *data, size_t size) { (void) data; return malloc(size); } static inline void mem_free(void *data, void *ptr) { (void) data; free(ptr); } static inline struct rope * test_rope_new() { return rope_new(str_getn, NULL, mem_alloc, mem_free, NULL); } static inline void test_rope_insert(struct rope *rope, rsize_t offset, char *str) { printf("insert offset = %zu, str = '%s'\n", (size_t) offset, str); rope_insert(rope, offset, str, strlen(str)); rope_pretty_print(rope, str_print); rope_check(rope); } static inline void test_rope_erase(struct rope *rope, rsize_t offset) { printf("erase offset = %zu\n", (size_t) offset); rope_erase(rope, offset); rope_pretty_print(rope, str_print); rope_check(rope); } #endif tarantool-1.5.1.218.g1a69fd6/test/unit/mempool.c0000664000000000000000000000351612202131537017533 0ustar rootroot#include "lib/small/mempool.h" #include "unit.h" #include #include #include enum { OBJSIZE_MIN = 2 * sizeof(int), OBJSIZE_MAX = 4096, OBJECTS_MAX = 10000, OSCILLATION_MAX = 1024, ITERATIONS_MAX = 500, }; struct slab_cache cache; struct mempool pool; int objsize; size_t used; /* Streak type - allocating or freeing */ bool allocating = true; /** Keep global to easily inspect the core. */ long seed; static int *ptrs[OBJECTS_MAX]; static inline void free_checked(int *ptr) { fail_unless(ptr[0] < OBJECTS_MAX && ptr[objsize/sizeof(int)-1] == ptr[0]); int pos = ptr[0]; fail_unless(ptrs[pos] == ptr); fail_unless(mempool_used(&pool) == used); ptrs[pos][0] = ptrs[pos][objsize/sizeof(int)-1] = INT_MAX; mempool_free(&pool, ptrs[pos]); ptrs[pos] = NULL; used -= objsize; } static inline void * alloc_checked() { int pos = rand() % OBJECTS_MAX; if (ptrs[pos]) { assert(ptrs[pos][0] == pos); free_checked(ptrs[pos]); } if (! allocating) return NULL; fail_unless(mempool_used(&pool) == used); used += objsize; ptrs[pos] = mempool_alloc_nothrow(&pool); ptrs[pos][0] = pos; ptrs[pos][objsize/sizeof(int)-1] = pos; return ptrs[pos]; } static void basic_alloc_streak() { int oscillation = rand() % OSCILLATION_MAX; int i; for (i = 0; i < oscillation; ++i) { alloc_checked(); } } void mempool_basic() { int i; header(); mempool_create(&pool, &cache, objsize); for (i = 0; i < ITERATIONS_MAX; i++) { basic_alloc_streak(); allocating = ! allocating; #if 0 printf("%zu %zu\n", mempool_used(&pool), mempool_total(&pool)); #endif } mempool_destroy(&pool); footer(); } int main() { seed = time(0); srand(seed); objsize = rand() % OBJSIZE_MAX; if (objsize < OBJSIZE_MIN) objsize = OBJSIZE_MIN; slab_cache_create(&cache); mempool_basic(); slab_cache_destroy(&cache); } tarantool-1.5.1.218.g1a69fd6/test/unit/suite.ini0000664000000000000000000000006412202131537017544 0ustar rootroot[default] core = unittest description = unit tests tarantool-1.5.1.218.g1a69fd6/test/unit/region.test0000775000000000000000000013357612213333056020122 0ustar rootrootELF> @@x@8@%"@@@@@@@@@&B&B (B(B`(B`X @B@B`@B`@@DDPtd66@6@,,Qtd/lib64/ld-linux-x86-64.so.2GNU GNUf+zZ𾌢k2>dW](f@,`Hd "%(+-.sk|3~*CqXLaK|.?k Cָ]5/BE슟9 ➮cq2 y3b : KNW}V?8 + : N hD.@ @ @3= @ +@ h @D` @LP.@F` "@D`E`w` @\D`x @D` @.@! o,@5 / @c f@N -@ @ D`1 +@K %@  #@ libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitmmap64abort__assert_failmemset__errno_locationmallocstderrmunmapstrerror_rfprintf__libc_start_mainsnprintf__libc_csu_finiregion_truncateregion_freeslab_from_ptrslab_cache_check_edataregion_test_truncateregion_basicslab_get__data_startcacheslab_cache_create_IO_stdin_usedslab_get_with_order__libc_csu_init_endregion_alloc_slow__bss_startslab_putslab_cache_destroyGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y %a_& -ui 7 D` D`$@D`HD`PD`XD``D`hD`pD`xD` D` D` D` D` D`!D`D`D`D`HH7 HtH57 %7 @%7 h%7 h%7 h%7 h%z7 h%r7 h%j7 h%b7 hp%Z7 h`%R7 h P%J7 h @%B7 h 0%:7 h %27 h %*7 h%"7 h%7 h1I^HHPTI@.@H-@HǴ@7D`UH-D`HHw]øHt]D`D`UH-D`HHHH?HHHu]úHt]D`=6 uUH~]~6 @H=3 tHtU8B`H]{vUHH}HEHUHPHEHUH]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HEHPHEH]UHHH}HEHXHEHHUHH}HuHEHUHHPHEHH!]UHHH}HuHEHUHHEHHHE@(UH8]UHHH}HHEHUHSHH}HEHX HH)HE@0HH)HH[]UHH H}HuHEHH;Es1@`.@.@HEHYHHE@0HHEHEP0HEHEP0HEUHH H}HuHEHHu^HEHHHEHEHHEHEHH;Er,HEHPHEHHEHPHUHEHH HUHEHHUHH}HEH@]UHHH}HuHEHx(HEH.@iUHH}HEH(]UHH`1@.@)HEE`HHEHnHtAH3 H$1@AA.@6/@HE@,< uHEH% HHEHH\HEHEHEH;EtHEH=HEHEHEH}uUHH0H}؉EԀ} v5@1@1@EHHHHEHHEHEH@H;E @HEH}u nHEHHEHUH`HHHEHxHEH@ HHEHxHEHPHEHH_HEHPHEH@ HHEHPHE HEH.9HEHHEHEHHEHE@,:EHEHPHEH@ H)HEHPHUHEHHHEHE@,:EuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHUHEHHHEHTHEUHH H}HuHEHEHE} HEHqHEH}u MHUHEHiHEHUH`HHHEHxHEH@ HHEHxHEHpHEHHEHpHEUHEH2UHH H}HuHEHRHE@,< u_HEHHEHxHEH@ H)HEHxHEHpHEH@ H)HEHpHEHHUHEHHHEHRHEH}HEP,HE@,8HEHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHUHMHEHH$HEHEHHEH}t$HEP,HE@,8uHEHuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEHHEHPHE@,HHHHEHHHfUHSHxH}HEHEHEHEEHEH`HEHEHHEHEHEHEP( 9t4HEH( H AȉѺP5@3@HǸEHE@,< u&HEH@ HEHEH@ HEHEH@ HErHEHX HE@,H9tEHEHX HE@,HH% IHѺP5@3@HǸHE OHEHEHHEHEHEHEH;EHEHxH;Et7HEHxH HMIHѺP5@4@HǸEHEHE HUHEHH)HHEHEH@HEHEH@HEHEHXEHHغHHHt>EbHHEHPH IHѺP5@@4@HǸEHEHXEHHغHHHt>EHHEHPH IHѺP5@4@HǸEHE HEH@H;EHEHUHH;Et7HB HuHMHUIIHѺP5@4@HǸVEHEHpH;Et7HEHpH HMIHѺP5@ 5@HǸE}uHx[]ÐUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HEHPHEH]UHHH}HEHHEHHUHH}HuHEHUHHPHEHH!]UH0]UH8]UHHH}HHEHUHH}HEH@]UHSH(H}HuиHHEHrHH)HHEHEHHUHHfHEH}ufHEЉHEP0HEHPHEHHHHEHP HEH@ HHEHP HEHPHEHHEHPHEHH([]UHH0H}HEHHHEHEHHEHEHHUHHHEHEHEHPHEHH9t'HEHHHEHEHHEH}uHEHHUHH0H}HuHEHfH;Es6@G 6@x6@FHEH;H+EHEHEHHHEHEHHEHE@0H;E~HEP0HE)HEP0HEfHE@0H)EHEHHgHEHP HEH@ H)HEHP HUHEHHH>HEHHMH}t6@Y 6@6@ZHEHUHPÐHl$Ld$H-o L%` H\$Ll$Lt$L|$H8L)AIHI1qHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/region.hsize <= rslab_unused(slab)%s *** %s *** /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/region.cfalseregion_used(®ion) == 0Test failed: %s is %s at %s:%d, in function '%s' ptrregion_used(®ion) == 10region_used(®ion) == 10000010name of a new region: %s. regionset new region name: %s. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaregion name is truncated: %s. *** %s: done *** region_used(®ion) == sizeregion_test_truncateslab_allocregion_basic/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.hsize <= (4294967295U)order <= SLAB_ORDER_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab->magic == slab_magic && slab->order == orderslab->magic == slab_magicslab->order <= SLAB_HUGEslab->order == SLAB_HUGE || (((intptr_t) slab & ~(slab_order_size(slab->order) - 1)) == (intptr_t) slab && slab->size == slab_order_size(slab->order))slab->in_use == slab->order + 1order <= SLAB_HUGEError in munmap(): %s 0slab->order <= SLAB_ORDER_LASTslab->order > 0slab_buddy(slab) == buddy%s: incorrect slab magic, expected %d, got %d%s: incorrect slab size, expected %zu, got %zu%s: incorrect slab statistics, total %zu, factual %zu %s: incorrect order statistics, the total %zu is not multiple of slab size %zu %s: incorrect order statistics, the used %zu is not multiple of slab size %zu %s: incorrect totals, ordered %zu, huge %zu, total %zu %s: incorrect used total, total %zu, sum %zu slab_cache_checkslab_order_sizeslab_assertslab_set_freeslab_mergeslab_buddyPslab_orderslab_createslab_get_with_orderslab_mmapmunmap_checkedslab_splitslab_from_ptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/region.cnew_size <= region_used(region)cut_size == 0region_truncate;,DHxGl8Xx)gr8x(I(H"h4F~( HuhJax8`56C#(oH hl 0 P %p 7 o  0 P 1p C  zRx *zRx \!AC \ <]AC M \O8AC s |g%AC ` l*AC e v'AC b }5AC p AC P "AC ] <>AC Et \tAC o |AC  rAC M d5AC p yAC M zPLRx` @ $$KA@AC  $LN B@AC I l$3AC n 8!AC \ 9GAC B `?AC z SAC N  AC M ,AC M L8AC s l%AC ` *AC e 'AC b AC P lAC g $ JAC E@ 4'AC  $TAC E |9AC  AC  AAC R $8[AC GO kbAC ] $,B@AC } LAC  lbAC ] F AC  3AC  LAC G AC   AC  ,lAC  L, AC  $lAC Ez t!AC \ uGAC B ?AC z AC M AC M 48AC s T%AC ` t*AC e 'AC b AC P AC P "AC ] AC M $4AC E \UAC  |5AC 0 $Jf@XX  Ywzp@P@ h @ D.@(B`0B`o`@@@@ C (D` @ @0 oP @oo @@B` @ @ @ @ @ @ @ @& @6 @F @V @f @v @ @ @ @GCC: (Debian 4.7.3-4) 4.7.3,@K, @A,,)@x b@@C?#int>Q0tsC3(--[F####n# #( C#0 #8 #@ #H #P 6#X  #`  #h  F#p F#t #x |{# [# X# Z# &# /# 0# 1# %2# 34# 5F# }7# n3##F#     -+M.+#/+#)\=  b  Le0A5I#K#R4# T#(=Vi#,g\i#-`a4#b4# q r#t#W:y:## J NY`HP\R# S#ST#(  d8keq\#r#08@@8+hpo+@@`:o+hF@@n+h+f@,@ fh,@V@h4V@}@4h4`\}@@@Z\Zh\\`Yv4@@+|@@e|h4@'@`e`,'@@ReX4Pjb 1@ptrh b RR@2@ ZX4P@@e`@@7h 42@D@(Zh>D@y@fZhS`Ly@@@Zh@f@N 1@ Yptrh  ~1f@@c Ns  0@5Yptr9h=4` s  c KF@@`, \ E`bC6@))@QintC0TsC3m(#wBt>-M.#/#) =  b  Le0AZ5I#K#R# Tb#(=VI#,g\I#-`a#b# q r#tZ# Wy##   [BB   ;####n# #(C#0#8#@#H#P6#X $#` *#h ;#p;#t#x|[#-#X0#Z@#&#/#0#1#%2#3#5;#}7F#n3$$#*#;# @  V 8@ @8hB @P@ BhB`ZP@@Zhb@@6bXdhpo@@@joh@@h;@>@ h+f>@c@` fhZc@@ 88h@@ h`@@ 8I@5@ ͆hj 5@   {5@@@ E=I\jU p5@ U E5@ @ ptr5X=5ITj 6@8{he:`   A @@ ,eAXj< 5@ <  ,(N@@` \NheN`j 5@W@!@ \WheW`%` !@8@  e`h2f8@@ \ efXh 5@n@@  enh=nIdnXj  5@,x@w@@6 xxjF  5@@t@buf{K  F 6 [ ?w@@ =ILj  5@`maphXeP    @@8 ehj8  5@@@` \He@j  5@Io`X@@4 \ÓXePHj4  5@h@/ @  \ϓX@ @iIo/ @ @( \ד `ehtmpHI @] @ 7( X @ @7( P.  @"@ \H=IDj  5@eh8`!@!@7( XF %"@#@@B!\%X!%P=(Io"@#@e+`"8#@%@!\8X!e8PGh"d%@))@!\d~fXgP hHi@j  lemN P5@%@%@l7o( &@&@7o( X'@(@8e'@m(@=I  % 1@b#,*b6,)@-@FC?#int>Q0tsC3([-f-M.#/#e0AJ5I#K#R4# T#(=Vi#,g\i#-`sa4#b4# q r#tJ# Wy#s# s HP\R# Ss#ST#( $ d8kMeq#r#0 8,)@M)@` 8h BM)@)@ Bh B`Z)@)@  Zhpo)@)@& oh)@)@Z hF)@/*@@ h +f/*@T*@ fhJT*@~*@ hs4~*@*@`< 4h 4`4*@*@v4*@*@ +|*@*@ e|h$4*@+@ h!+@+@@O !H !4@$4Xe&P6+@o,@ 6He8htmp8P+@+@79`6,@R,@79XKEo,@-@ EH E4@j 6@Ih,@^-@eKX,@,@7K`  % $ > : ; I$ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I : ; (  : ; .: ; ' @B : ; I .: ; ' I@B .: ; ' @B .: ; I@B .: ; ' I@B 4I4  4: ; I  4: ; I .? : ; @B .? : ; I@B 4: ; I? < 4: ; I?  % $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  &I : ;I8 : ; .: ; ' @B : ; I .: ; ' @B .: ; ' I@B 4: ; I .: ; I@B .: ; ' I@B 4I4  .? : ; ' I@B : ; I  4: ; I .? : ; ' @B  4: ;I .? : ;' I@B !: ;I ".? : ;' @B #4: ; I? < % $ > : ; I$ >   : ;  : ; I8  I  : ;  I !I/ .: ; ' @B  : ; I .: ; ' @B .: ; ' I@B .: ; I@B .: ; ' I@B .? : ; ' I@B 4: ; I .? : ; ' @B 4: ; I   &I4I4   /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hregion.hregion.cstddef.hstdint.htypes.hlibio.hstdio.h @84.".<tYQ..+...K2=3*| =K6=!gM/..#2~.@7Lt7 7Kt7<77=@Lt70 7=LI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hslab_cache.cstdint.hstddef.htypes.hlibio.hstdio.h @85./!2K5..<tYQ..+.3K.uwǯ3fY~tfLK2(yK2K!221Kfɭ2h@f .u0vKYK2v2YYyK2= [!K2gJh!2w 2fvY=u;2w.X <gK/K .uY;h!3-[/,Ks=LK.2ɃLH,LGL1QhtH/M")H(L)H(nJW3LH/LhW" /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hregion.hregion.cstddef.hstdint.htypes.hstdio.h ,)@85./!...<tYQ..+.3K.K2=;.~.,uu6gx"VJ'6 =Y=0+sXtt_IO_read_base_IO_FILEregionrlist_createrslab_data_IO_save_end_IO_write_endshort intsizetyperslab__PRETTY_FUNCTION__region_test_truncateregion_used_IO_write_ptr_flagsallocatedslab_list_create_IO_buf_base_markers_IO_read_endheaduint8_trlist_emptyslabsrslab_unusedregion_createstderr_IO_markerlong long intSLAB_MAX_SIZE_lockREGION_NAME_MAXrlist_first_cur_columnSLAB_HUGE_posalignmentsmall_stats_sbuf_old_offsetlong doubleunsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitlong long unsigned intnext_in_cacheuint32_tregion_name_shortbufGNU C 4.7.3_IO_write_base_unused2_IO_read_ptr__pad5_IO_buf_end/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/region.cslab_listmainrslab_sizeof__pad1__pad2__pad3__pad4slab_alloc__mptrregion_set_name__func__slab_cacheSLAB_MIN_SIZE_LBshort unsigned intrlistSLAB_MIN_SIZEslab_size_align__off64_t_fileno_chain__off_tnext_in_list_IO_backup_base_flags2item_moderegion_basic_vtable_offsettotal_IO_save_basesmall_stats_resetSLAB_ORDER_LASTprevregion_alloc_nothrowin_use_IO_lock_tordersmunmap_checkedslab_putrlist_shiftslab_get_with_orderslab_mmaprlist_nextslab_mergeslab_cache_checkslab_splitslab_cache_destroypoison_charslab_cache_createslab_is_free_Boolslab_order/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab_getdont_panicslab_from_ptrslab_assertslab_buddyslab_createnew_orderintptr_tslab_poisonrlist_addmergedslab_magiclengthorderedslab_set_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/smallnew_sizeslab_set_usedhugeaddrslab_order_sizerlist_del__ssize_tslab_min_sizecut_sizeregion_alloc_slowregion_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/region.cregion_truncateww v !w!"w"%w%2v23w34w47w7jvjkwklwlowovwwwvwwwvwwwvwww*v*+w+,w,/w/LvLMwMNwNQwQvwwwvwwwvwwwvwwwvwwwvwwwvwwwvwwwJvJKwww v !w!"w"%w%gvghwhiwilwlvwwwvwww v  w  w wvww"w"UvUVwVWwWZwZzvz{w{|w|wvwwwvwwwvwwwLvLMwMNwNQwQvwww!v!"w"#w#&w&vwwwvwww8v89w9:w:=w=OvOPwPQwQTwTvwww v  w wwvwwwvwww v www v  w  w  w v w w w F vF G wG H wH K wK v w w w v w w w v w w w vwww@v@Awww v !w!"w"%w%gvghwhiwilwlvwwwvwwwvwwwvwww'v'(w()w),w,QvQRwRSwSVwVxvxywyzwz}w}vwwwvwwwvwwwvwwwvwwwBvBCwCDwDGwGwvwxw.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @@@hV@C^o @ ^koP @P Pz @ 0 @  h @h  @  @ D.@D. P.@P.p6@6,8@8 A@A*(B`(B0B`0B8B`8B@B`@B D` D(D`(DD`D D`D 0DD)Ey 5eCk O0Ru[Z|` e $~ د@@<@`@@@@ @P @ @ @ h @ @ @D.@P.@6@8@A@(B`0B`8B`@B` D`(D`D`D` ! 8B` @. @A P@WD`f0B` p@(B` @! @ @8 @% ,@*  V@' }@5' @4 @"? @>L '@tW1@ p @ 2@ D@5 y@1@ 0@ @! @G P@? @S @ @ @8 >@% c@*  @' @  @l5@ 1 5@JAp5@Z1@e6@~ @5@  @5@ @ !@ 8@[5@ @b5@ ' @65@O w@Y5@ r @b}5@  @ 5@  @5@ 5@P5@ ,)@! M)@G )@? )@ )@ )@8 /*@% T*@*  ~*@' *@' *@4 *@" *@6@A@,8B`80B`ID`V@B`_(B`rD`~(D` @.@ o,@5  D` +@* @8 %@ID`PD.@V f@Nk @ "@D`E` ! 0 @LBP.@Q @e}` @ -@F` @ +@D` @3 , #@ 5G ay h @ / @D`crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryregion.crlist_createrlist_firstrlist_emptysmall_stats_resetslab_list_createslab_size_alignregion_createrslab_sizeofrslab_datarslab_unusedslab_alloc__PRETTY_FUNCTION__.2292region_alloc_nothrowregion_usedregion_set_nameregion_name__func__.3608__func__.3613slab_cache.crlist_addrlist_delrlist_shiftrlist_nextslab_sizeofslab_order__PRETTY_FUNCTION__.1752slab_order_size__PRETTY_FUNCTION__.1756slab_magic__PRETTY_FUNCTION__.3149slab_assert__PRETTY_FUNCTION__.3155slab_set_free__PRETTY_FUNCTION__.3160slab_set_usedslab_is_freeslab_poisonpoison_char.3171slab_create__PRETTY_FUNCTION__.3177munmap_checked__PRETTY_FUNCTION__.3183slab_mmap__PRETTY_FUNCTION__.3187slab_buddy__PRETTY_FUNCTION__.3195slab_split__PRETTY_FUNCTION__.3200slab_merge__PRETTY_FUNCTION__.3209__PRETTY_FUNCTION__.3235__func__.3272__PRETTY_FUNCTION__.2511__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finiregion_truncatefree@@GLIBC_2.2.5abort@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startregion_freeslab_from_ptrslab_cache_check_edata_finiregion_test_truncateprintf@@GLIBC_2.2.5region_basicsnprintf@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5memset@@GLIBC_2.2.5slab_get__libc_start_main@@GLIBC_2.2.5__data_startcachefprintf@@GLIBC_2.2.5__gmon_start__slab_cache_create_IO_stdin_usedslab_get_with_orderstrerror_r@@GLIBC_2.2.5mmap64@@GLIBC_2.2.5__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5_end_startregion_alloc_slow__bss_startmunmap@@GLIBC_2.2.5main_Jv_RegisterClassesslab_putexit@@GLIBC_2.2.5_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initslab_cache_destroystderr@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/test/unit/test.c0000664000000000000000000000154412202131537017041 0ustar rootroot#include "test.h" #include #include static int tests_done = 0; static int tests_failed = 0; static int plan_test = 0; void plan(int count) { plan_test = count; static int showed_plan = 0; if (!showed_plan) printf("%d..%d\n", 1, plan_test); showed_plan = 1; } int check_plan(void) { int res; if (tests_done != plan_test) { fprintf(stderr, "# Looks like you planned %d tests but ran %d.\n", plan_test, tests_done); res = -1; } if (tests_failed) { fprintf(stderr, "# Looks like you failed %d test of %d run.\n", tests_failed, tests_done); res = tests_failed; } return res; } int __ok(int condition, const char *fmt, ...) { va_list ap; printf("%s %d - ", condition ? "ok" : "not ok", ++tests_done); if (!condition) tests_failed++; va_start(ap, fmt); vprintf(fmt, ap); printf("\n"); return condition; } tarantool-1.5.1.218.g1a69fd6/test/unit/region.c0000664000000000000000000000267512202131537017353 0ustar rootroot#include "lib/small/region.h" #include "unit.h" #include struct slab_cache cache; void region_basic() { header(); struct region region; region_create(®ion, &cache); fail_unless(region_used(®ion) == 0); void *ptr = region_alloc_nothrow(®ion, 10); fail_unless(ptr); fail_unless(region_used(®ion) == 10); ptr = region_alloc_nothrow(®ion, 10000000); fail_unless(ptr); fail_unless(region_used(®ion) == 10000010); region_free(®ion); fail_unless(region_used(®ion) == 0); printf("name of a new region: %s.\n", region_name(®ion)); region_set_name(®ion, "region"); printf("set new region name: %s.\n", region_name(®ion)); region_set_name(®ion, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); printf("region name is truncated: %s.\n", region_name(®ion)); footer(); } void region_test_truncate() { header(); struct region region; region_create(®ion, &cache); void *ptr = region_alloc_nothrow(®ion, 10); fail_unless(ptr); size_t size = region_used(®ion); region_alloc_nothrow(®ion, 10000); region_alloc_nothrow(®ion, 10000000); region_truncate(®ion, size); fail_unless(region_used(®ion) == size); region_free(®ion); footer(); } int main() { slab_cache_create(&cache); region_basic(); region_test_truncate(); slab_cache_destroy(&cache); } tarantool-1.5.1.218.g1a69fd6/test/unit/region.result0000664000000000000000000000034412202131537020436 0ustar rootroot *** region_basic *** name of a new region: . set new region name: region. region name is truncated: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa. *** region_basic: done *** *** region_test_truncate *** *** region_test_truncate: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/bit.result0000664000000000000000000011732712202131537017743 0ustar rootroot *** test_ctz_clz *** bit_ctz_u64(1) => 0 bit_clz_u64(1) => 63 bit_ctz_u32(1) => 0 bit_clz_u32(1) => 31 bit_ctz_u64(2) => 1 bit_clz_u64(2) => 62 bit_ctz_u32(2) => 1 bit_clz_u32(2) => 30 bit_ctz_u64(32768) => 15 bit_clz_u64(32768) => 48 bit_ctz_u32(32768) => 15 bit_clz_u32(32768) => 16 bit_ctz_u64(65535) => 0 bit_clz_u64(65535) => 48 bit_ctz_u32(65535) => 0 bit_clz_u32(65535) => 16 bit_ctz_u64(65536) => 16 bit_clz_u64(65536) => 47 bit_ctz_u32(65536) => 16 bit_clz_u32(65536) => 15 bit_ctz_u64(726075912) => 3 bit_clz_u64(726075912) => 34 bit_ctz_u32(726075912) => 3 bit_clz_u32(726075912) => 2 bit_ctz_u64(858993459) => 0 bit_clz_u64(858993459) => 34 bit_ctz_u32(858993459) => 0 bit_clz_u32(858993459) => 2 bit_ctz_u64(1073741824) => 30 bit_clz_u64(1073741824) => 33 bit_ctz_u32(1073741824) => 30 bit_clz_u32(1073741824) => 1 bit_ctz_u64(1245250552) => 3 bit_clz_u64(1245250552) => 33 bit_ctz_u32(1245250552) => 3 bit_clz_u32(1245250552) => 1 bit_ctz_u64(1431655765) => 0 bit_clz_u64(1431655765) => 33 bit_ctz_u32(1431655765) => 0 bit_clz_u32(1431655765) => 1 bit_ctz_u64(1656977767) => 0 bit_clz_u64(1656977767) => 33 bit_ctz_u32(1656977767) => 0 bit_clz_u32(1656977767) => 1 bit_ctz_u64(2147483648) => 31 bit_clz_u64(2147483648) => 32 bit_ctz_u32(2147483648) => 31 bit_clz_u32(2147483648) => 0 bit_ctz_u64(2283114629) => 0 bit_clz_u64(2283114629) => 32 bit_ctz_u32(2283114629) => 0 bit_clz_u32(2283114629) => 0 bit_ctz_u64(2502548245) => 0 bit_clz_u64(2502548245) => 32 bit_ctz_u32(2502548245) => 0 bit_clz_u32(2502548245) => 0 bit_ctz_u64(4294967295) => 0 bit_clz_u64(4294967295) => 32 bit_ctz_u32(4294967295) => 0 bit_clz_u32(4294967295) => 0 bit_ctz_u64(708915120906848425) => 0 bit_clz_u64(708915120906848425) => 4 bit_ctz_u64(1960191741125985428) => 2 bit_clz_u64(1960191741125985428) => 3 bit_ctz_u64(3689348814741910323) => 0 bit_clz_u64(3689348814741910323) => 2 bit_ctz_u64(5578377670650038654) => 1 bit_clz_u64(5578377670650038654) => 1 bit_ctz_u64(9223372036854775808) => 63 bit_clz_u64(9223372036854775808) => 0 bit_ctz_u64(10755112315580060033) => 0 bit_clz_u64(10755112315580060033) => 0 bit_ctz_u64(11163782031541429823) => 0 bit_clz_u64(11163782031541429823) => 0 bit_ctz_u64(13903686156871869732) => 2 bit_clz_u64(13903686156871869732) => 0 bit_ctz_u64(14237897302422917095) => 0 bit_clz_u64(14237897302422917095) => 0 bit_ctz_u64(14302190498657618739) => 0 bit_clz_u64(14302190498657618739) => 0 bit_ctz_u64(15766411510232741269) => 0 bit_clz_u64(15766411510232741269) => 0 bit_ctz_u64(15984546468465238145) => 0 bit_clz_u64(15984546468465238145) => 0 bit_ctz_u64(18446744073709551615) => 0 bit_clz_u64(18446744073709551615) => 0 *** test_ctz_clz: done *** *** test_count *** bit_count_u64(0) => 0 bit_count_u32(0) => 0 bit_count_u64(1) => 1 bit_count_u32(1) => 1 bit_count_u64(2) => 1 bit_count_u32(2) => 1 bit_count_u64(32768) => 1 bit_count_u32(32768) => 1 bit_count_u64(65535) => 16 bit_count_u32(65535) => 16 bit_count_u64(65536) => 1 bit_count_u32(65536) => 1 bit_count_u64(726075912) => 11 bit_count_u32(726075912) => 11 bit_count_u64(858993459) => 16 bit_count_u32(858993459) => 16 bit_count_u64(1073741824) => 1 bit_count_u32(1073741824) => 1 bit_count_u64(1245250552) => 14 bit_count_u32(1245250552) => 14 bit_count_u64(1431655765) => 16 bit_count_u32(1431655765) => 16 bit_count_u64(1656977767) => 17 bit_count_u32(1656977767) => 17 bit_count_u64(2147483648) => 1 bit_count_u32(2147483648) => 1 bit_count_u64(2283114629) => 10 bit_count_u32(2283114629) => 10 bit_count_u64(2502548245) => 16 bit_count_u32(2502548245) => 16 bit_count_u64(4294967295) => 32 bit_count_u32(4294967295) => 32 bit_count_u64(708915120906848425) => 29 bit_count_u64(1960191741125985428) => 19 bit_count_u64(3689348814741910323) => 32 bit_count_u64(5578377670650038654) => 31 bit_count_u64(9223372036854775808) => 1 bit_count_u64(10755112315580060033) => 24 bit_count_u64(11163782031541429823) => 35 bit_count_u64(13903686156871869732) => 28 bit_count_u64(14237897302422917095) => 33 bit_count_u64(14302190498657618739) => 37 bit_count_u64(15766411510232741269) => 33 bit_count_u64(15984546468465238145) => 25 bit_count_u64(18446744073709551615) => 64 *** test_count: done *** *** test_rotl_rotr *** bit_rotl_u64(0, 0) => 0 bit_rotr_u64(0, 0) => 0 bit_rotl_u32(0, 0) => 0 bit_rotr_u32(0, 0) => 0 bit_rotl_u64(1, 0) => 1 bit_rotr_u64(1, 0) => 1 bit_rotl_u32(1, 0) => 1 bit_rotr_u32(1, 0) => 1 bit_rotl_u64(2, 0) => 2 bit_rotr_u64(2, 0) => 2 bit_rotl_u32(2, 0) => 2 bit_rotr_u32(2, 0) => 2 bit_rotl_u64(32768, 0) => 32768 bit_rotr_u64(32768, 0) => 32768 bit_rotl_u32(32768, 0) => 32768 bit_rotr_u32(32768, 0) => 32768 bit_rotl_u64(65535, 0) => 65535 bit_rotr_u64(65535, 0) => 65535 bit_rotl_u32(65535, 0) => 65535 bit_rotr_u32(65535, 0) => 65535 bit_rotl_u64(65536, 0) => 65536 bit_rotr_u64(65536, 0) => 65536 bit_rotl_u32(65536, 0) => 65536 bit_rotr_u32(65536, 0) => 65536 bit_rotl_u64(726075912, 0) => 726075912 bit_rotr_u64(726075912, 0) => 726075912 bit_rotl_u32(726075912, 0) => 726075912 bit_rotr_u32(726075912, 0) => 726075912 bit_rotl_u64(858993459, 0) => 858993459 bit_rotr_u64(858993459, 0) => 858993459 bit_rotl_u32(858993459, 0) => 858993459 bit_rotr_u32(858993459, 0) => 858993459 bit_rotl_u64(1073741824, 0) => 1073741824 bit_rotr_u64(1073741824, 0) => 1073741824 bit_rotl_u32(1073741824, 0) => 1073741824 bit_rotr_u32(1073741824, 0) => 1073741824 bit_rotl_u64(1245250552, 0) => 1245250552 bit_rotr_u64(1245250552, 0) => 1245250552 bit_rotl_u32(1245250552, 0) => 1245250552 bit_rotr_u32(1245250552, 0) => 1245250552 bit_rotl_u64(1431655765, 0) => 1431655765 bit_rotr_u64(1431655765, 0) => 1431655765 bit_rotl_u32(1431655765, 0) => 1431655765 bit_rotr_u32(1431655765, 0) => 1431655765 bit_rotl_u64(1656977767, 0) => 1656977767 bit_rotr_u64(1656977767, 0) => 1656977767 bit_rotl_u32(1656977767, 0) => 1656977767 bit_rotr_u32(1656977767, 0) => 1656977767 bit_rotl_u64(2147483648, 0) => 2147483648 bit_rotr_u64(2147483648, 0) => 2147483648 bit_rotl_u32(2147483648, 0) => 2147483648 bit_rotr_u32(2147483648, 0) => 2147483648 bit_rotl_u64(2283114629, 0) => 2283114629 bit_rotr_u64(2283114629, 0) => 2283114629 bit_rotl_u32(2283114629, 0) => 2283114629 bit_rotr_u32(2283114629, 0) => 2283114629 bit_rotl_u64(2502548245, 0) => 2502548245 bit_rotr_u64(2502548245, 0) => 2502548245 bit_rotl_u32(2502548245, 0) => 2502548245 bit_rotr_u32(2502548245, 0) => 2502548245 bit_rotl_u64(4294967295, 0) => 4294967295 bit_rotr_u64(4294967295, 0) => 4294967295 bit_rotl_u32(4294967295, 0) => 4294967295 bit_rotr_u32(4294967295, 0) => 4294967295 bit_rotl_u64(708915120906848425, 0) => 708915120906848425 bit_rotr_u64(708915120906848425, 0) => 708915120906848425 bit_rotl_u64(1960191741125985428, 0) => 1960191741125985428 bit_rotr_u64(1960191741125985428, 0) => 1960191741125985428 bit_rotl_u64(3689348814741910323, 0) => 3689348814741910323 bit_rotr_u64(3689348814741910323, 0) => 3689348814741910323 bit_rotl_u64(5578377670650038654, 0) => 5578377670650038654 bit_rotr_u64(5578377670650038654, 0) => 5578377670650038654 bit_rotl_u64(9223372036854775808, 0) => 9223372036854775808 bit_rotr_u64(9223372036854775808, 0) => 9223372036854775808 bit_rotl_u64(10755112315580060033, 0) => 10755112315580060033 bit_rotr_u64(10755112315580060033, 0) => 10755112315580060033 bit_rotl_u64(11163782031541429823, 0) => 11163782031541429823 bit_rotr_u64(11163782031541429823, 0) => 11163782031541429823 bit_rotl_u64(13903686156871869732, 0) => 13903686156871869732 bit_rotr_u64(13903686156871869732, 0) => 13903686156871869732 bit_rotl_u64(14237897302422917095, 0) => 14237897302422917095 bit_rotr_u64(14237897302422917095, 0) => 14237897302422917095 bit_rotl_u64(14302190498657618739, 0) => 14302190498657618739 bit_rotr_u64(14302190498657618739, 0) => 14302190498657618739 bit_rotl_u64(15766411510232741269, 0) => 15766411510232741269 bit_rotr_u64(15766411510232741269, 0) => 15766411510232741269 bit_rotl_u64(15984546468465238145, 0) => 15984546468465238145 bit_rotr_u64(15984546468465238145, 0) => 15984546468465238145 bit_rotl_u64(18446744073709551615, 0) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 0) => 18446744073709551615 bit_rotl_u64(0, 1) => 0 bit_rotr_u64(0, 1) => 0 bit_rotl_u32(0, 1) => 0 bit_rotr_u32(0, 1) => 0 bit_rotl_u64(1, 1) => 2 bit_rotr_u64(1, 1) => 9223372036854775808 bit_rotl_u32(1, 1) => 2 bit_rotr_u32(1, 1) => 2147483648 bit_rotl_u64(2, 1) => 4 bit_rotr_u64(2, 1) => 1 bit_rotl_u32(2, 1) => 4 bit_rotr_u32(2, 1) => 1 bit_rotl_u64(32768, 1) => 65536 bit_rotr_u64(32768, 1) => 16384 bit_rotl_u32(32768, 1) => 65536 bit_rotr_u32(32768, 1) => 16384 bit_rotl_u64(65535, 1) => 131070 bit_rotr_u64(65535, 1) => 9223372036854808575 bit_rotl_u32(65535, 1) => 131070 bit_rotr_u32(65535, 1) => 2147516415 bit_rotl_u64(65536, 1) => 131072 bit_rotr_u64(65536, 1) => 32768 bit_rotl_u32(65536, 1) => 131072 bit_rotr_u32(65536, 1) => 32768 bit_rotl_u64(726075912, 1) => 1452151824 bit_rotr_u64(726075912, 1) => 363037956 bit_rotl_u32(726075912, 1) => 1452151824 bit_rotr_u32(726075912, 1) => 363037956 bit_rotl_u64(858993459, 1) => 1717986918 bit_rotr_u64(858993459, 1) => 9223372037284272537 bit_rotl_u32(858993459, 1) => 1717986918 bit_rotr_u32(858993459, 1) => 2576980377 bit_rotl_u64(1073741824, 1) => 2147483648 bit_rotr_u64(1073741824, 1) => 536870912 bit_rotl_u32(1073741824, 1) => 2147483648 bit_rotr_u32(1073741824, 1) => 536870912 bit_rotl_u64(1245250552, 1) => 2490501104 bit_rotr_u64(1245250552, 1) => 622625276 bit_rotl_u32(1245250552, 1) => 2490501104 bit_rotr_u32(1245250552, 1) => 622625276 bit_rotl_u64(1431655765, 1) => 2863311530 bit_rotr_u64(1431655765, 1) => 9223372037570603690 bit_rotl_u32(1431655765, 1) => 2863311530 bit_rotr_u32(1431655765, 1) => 2863311530 bit_rotl_u64(1656977767, 1) => 3313955534 bit_rotr_u64(1656977767, 1) => 9223372037683264691 bit_rotl_u32(1656977767, 1) => 3313955534 bit_rotr_u32(1656977767, 1) => 2975972531 bit_rotl_u64(2147483648, 1) => 4294967296 bit_rotr_u64(2147483648, 1) => 1073741824 bit_rotl_u32(2147483648, 1) => 1 bit_rotr_u32(2147483648, 1) => 1073741824 bit_rotl_u64(2283114629, 1) => 4566229258 bit_rotr_u64(2283114629, 1) => 9223372037996333122 bit_rotl_u32(2283114629, 1) => 271261963 bit_rotr_u32(2283114629, 1) => 3289040962 bit_rotl_u64(2502548245, 1) => 5005096490 bit_rotr_u64(2502548245, 1) => 9223372038106049930 bit_rotl_u32(2502548245, 1) => 710129195 bit_rotr_u32(2502548245, 1) => 3398757770 bit_rotl_u64(4294967295, 1) => 8589934590 bit_rotr_u64(4294967295, 1) => 9223372039002259455 bit_rotl_u32(4294967295, 1) => 4294967295 bit_rotr_u32(4294967295, 1) => 4294967295 bit_rotl_u64(708915120906848425, 1) => 1417830241813696850 bit_rotr_u64(708915120906848425, 1) => 9577829597308200020 bit_rotl_u64(1960191741125985428, 1) => 3920383482251970856 bit_rotr_u64(1960191741125985428, 1) => 980095870562992714 bit_rotl_u64(3689348814741910323, 1) => 7378697629483820646 bit_rotr_u64(3689348814741910323, 1) => 11068046444225730969 bit_rotl_u64(5578377670650038654, 1) => 11156755341300077308 bit_rotr_u64(5578377670650038654, 1) => 2789188835325019327 bit_rotl_u64(9223372036854775808, 1) => 1 bit_rotr_u64(9223372036854775808, 1) => 4611686018427387904 bit_rotl_u64(10755112315580060033, 1) => 3063480557450568451 bit_rotr_u64(10755112315580060033, 1) => 14600928194644805824 bit_rotl_u64(11163782031541429823, 1) => 3880819989373308031 bit_rotr_u64(11163782031541429823, 1) => 14805263052625490719 bit_rotl_u64(13903686156871869732, 1) => 9360628240034187849 bit_rotr_u64(13903686156871869732, 1) => 6951843078435934866 bit_rotl_u64(14237897302422917095, 1) => 10029050531136282575 bit_rotr_u64(14237897302422917095, 1) => 16342320688066234355 bit_rotl_u64(14302190498657618739, 1) => 10157636923605685863 bit_rotr_u64(14302190498657618739, 1) => 16374467286183585177 bit_rotl_u64(15766411510232741269, 1) => 13086078946755930923 bit_rotr_u64(15766411510232741269, 1) => 17106577791971146442 bit_rotl_u64(15984546468465238145, 1) => 13522348863220924675 bit_rotr_u64(15984546468465238145, 1) => 17215645271087394880 bit_rotl_u64(18446744073709551615, 1) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 1) => 18446744073709551615 bit_rotl_u64(0, 15) => 0 bit_rotr_u64(0, 15) => 0 bit_rotl_u32(0, 15) => 0 bit_rotr_u32(0, 15) => 0 bit_rotl_u64(1, 15) => 32768 bit_rotr_u64(1, 15) => 562949953421312 bit_rotl_u32(1, 15) => 32768 bit_rotr_u32(1, 15) => 131072 bit_rotl_u64(2, 15) => 65536 bit_rotr_u64(2, 15) => 1125899906842624 bit_rotl_u32(2, 15) => 65536 bit_rotr_u32(2, 15) => 262144 bit_rotl_u64(32768, 15) => 1073741824 bit_rotr_u64(32768, 15) => 1 bit_rotl_u32(32768, 15) => 1073741824 bit_rotr_u32(32768, 15) => 1 bit_rotl_u64(65535, 15) => 2147450880 bit_rotr_u64(65535, 15) => 18446181123756130305 bit_rotl_u32(65535, 15) => 2147450880 bit_rotr_u32(65535, 15) => 4294836225 bit_rotl_u64(65536, 15) => 2147483648 bit_rotr_u64(65536, 15) => 2 bit_rotl_u32(65536, 15) => 2147483648 bit_rotr_u32(65536, 15) => 2 bit_rotl_u64(726075912, 15) => 23792055484416 bit_rotr_u64(726075912, 15) => 1445655480385951374 bit_rotl_u32(726075912, 15) => 2231637411 bit_rotr_u32(726075912, 15) => 336615054 bit_rotl_u64(858993459, 15) => 28147497664512 bit_rotr_u64(858993459, 15) => 7378585039493162598 bit_rotl_u32(858993459, 15) => 2576980377 bit_rotr_u32(858993459, 15) => 1717986918 bit_rotl_u64(1073741824, 15) => 35184372088832 bit_rotr_u64(1073741824, 15) => 32768 bit_rotl_u32(1073741824, 15) => 8192 bit_rotr_u32(1073741824, 15) => 32768 bit_rotl_u64(1245250552, 15) => 40804370087936 bit_rotr_u64(1245250552, 15) => 571957152676090994 bit_rotl_u32(1245250552, 15) => 2180785436 bit_rotr_u32(1245250552, 15) => 133207154 bit_rotl_u64(1431655765, 15) => 46912496107520 bit_rotr_u64(1431655765, 15) => 12297641732488604330 bit_rotl_u32(1431655765, 15) => 2863311530 bit_rotr_u32(1431655765, 15) => 2863311530 bit_rotl_u64(1656977767, 15) => 54295847469056 bit_rotr_u64(1656977767, 15) => 17495921602381006214 bit_rotl_u32(1656977767, 15) => 3165892961 bit_rotr_u32(1656977767, 15) => 4073637254 bit_rotl_u64(2147483648, 15) => 70368744177664 bit_rotr_u64(2147483648, 15) => 65536 bit_rotl_u32(2147483648, 15) => 16384 bit_rotr_u32(2147483648, 15) => 65536 bit_rotl_u64(2283114629, 15) => 74813100163072 bit_rotr_u64(2283114629, 15) => 2380715353018798123 bit_rotl_u32(2283114629, 15) => 3359818762 bit_rotr_u32(2283114629, 15) => 554373163 bit_rotl_u64(2502548245, 15) => 82003500892160 bit_rotr_u64(2502548245, 15) => 13126304063924808275 bit_rotl_u32(2502548245, 15) => 3985296020 bit_rotr_u32(2502548245, 15) => 3056282195 bit_rotl_u64(4294967295, 15) => 140737488322560 bit_rotr_u64(4294967295, 15) => 18446181123756261375 bit_rotl_u32(4294967295, 15) => 4294967295 bit_rotr_u32(4294967295, 15) => 4294967295 bit_rotl_u64(708915120906848425, 15) => 5279893075283707115 bit_rotr_u64(708915120906848425, 15) => 10471453717962410780 bit_rotl_u64(1960191741125985428, 15) => 108559631781274 bit_rotr_u64(1960191741125985428, 15) => 659837165714377456 bit_rotl_u64(3689348814741910323, 15) => 11068046444225730969 bit_rotr_u64(3689348814741910323, 15) => 7378697629483820646 bit_rotl_u64(5578377670650038654, 15) => 3492485472519661237 bit_rotr_u64(5578377670650038654, 15) => 1368138625390162978 bit_rotl_u64(9223372036854775808, 15) => 16384 bit_rotr_u64(9223372036854775808, 15) => 281474976710656 bit_rotl_u64(10755112315580060033, 15) => 16921572780133108384 bit_rotr_u64(10755112315580060033, 15) => 2522906961261232936 bit_rotl_u64(11163782031541429823, 15) => 15874627889163914614 bit_rotr_u64(11163782031541429823, 15) => 14735555722393159636 bit_rotl_u64(13903686156871869732, 15) => 16749599972631142521 bit_rotr_u64(13903686156871869732, 15) => 5352952463958352314 bit_rotl_u64(14237897302422917095, 15) => 10814437605877473995 bit_rotr_u64(14237897302422917095, 15) => 2292203766521423570 bit_rotl_u64(14302190498657618739, 15) => 14645067421692060477 bit_rotr_u64(14302190498657618739, 15) => 10837786021529578728 bit_rotl_u64(15766411510232741269, 15) => 14257838996763372902 bit_rotr_u64(15766411510232741269, 15) => 16945837700629926938 bit_rotl_u64(15984546468465238145, 15) => 4767449759914979050 bit_rotr_u64(15984546468465238145, 15) => 13908166408919157040 bit_rotl_u64(18446744073709551615, 15) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 15) => 18446744073709551615 bit_rotl_u64(0, 16) => 0 bit_rotr_u64(0, 16) => 0 bit_rotl_u32(0, 16) => 0 bit_rotr_u32(0, 16) => 0 bit_rotl_u64(1, 16) => 65536 bit_rotr_u64(1, 16) => 281474976710656 bit_rotl_u32(1, 16) => 65536 bit_rotr_u32(1, 16) => 65536 bit_rotl_u64(2, 16) => 131072 bit_rotr_u64(2, 16) => 562949953421312 bit_rotl_u32(2, 16) => 131072 bit_rotr_u32(2, 16) => 131072 bit_rotl_u64(32768, 16) => 2147483648 bit_rotr_u64(32768, 16) => 9223372036854775808 bit_rotl_u32(32768, 16) => 2147483648 bit_rotr_u32(32768, 16) => 2147483648 bit_rotl_u64(65535, 16) => 4294901760 bit_rotr_u64(65535, 16) => 18446462598732840960 bit_rotl_u32(65535, 16) => 4294901760 bit_rotr_u32(65535, 16) => 4294901760 bit_rotl_u64(65536, 16) => 4294967296 bit_rotr_u64(65536, 16) => 1 bit_rotl_u32(65536, 16) => 1 bit_rotr_u32(65536, 16) => 1 bit_rotl_u64(726075912, 16) => 47584110968832 bit_rotr_u64(726075912, 16) => 722827740192975687 bit_rotl_u32(726075912, 16) => 168307527 bit_rotr_u32(726075912, 16) => 168307527 bit_rotl_u64(858993459, 16) => 56294995329024 bit_rotr_u64(858993459, 16) => 3689292519746581299 bit_rotl_u32(858993459, 16) => 858993459 bit_rotr_u32(858993459, 16) => 858993459 bit_rotl_u64(1073741824, 16) => 70368744177664 bit_rotr_u64(1073741824, 16) => 16384 bit_rotl_u32(1073741824, 16) => 16384 bit_rotr_u32(1073741824, 16) => 16384 bit_rotl_u64(1245250552, 16) => 81608740175872 bit_rotr_u64(1245250552, 16) => 285978576338045497 bit_rotl_u32(1245250552, 16) => 66603577 bit_rotr_u32(1245250552, 16) => 66603577 bit_rotl_u64(1431655765, 16) => 93824992215040 bit_rotr_u64(1431655765, 16) => 6148820866244302165 bit_rotl_u32(1431655765, 16) => 1431655765 bit_rotr_u32(1431655765, 16) => 1431655765 bit_rotl_u64(1656977767, 16) => 108591694938112 bit_rotr_u64(1656977767, 16) => 8747960801190503107 bit_rotl_u32(1656977767, 16) => 2036818627 bit_rotr_u32(1656977767, 16) => 2036818627 bit_rotl_u64(2147483648, 16) => 140737488355328 bit_rotr_u64(2147483648, 16) => 32768 bit_rotl_u32(2147483648, 16) => 32768 bit_rotr_u32(2147483648, 16) => 32768 bit_rotl_u64(2283114629, 16) => 149626200326144 bit_rotr_u64(2283114629, 16) => 10413729713364174869 bit_rotl_u32(2283114629, 16) => 2424670229 bit_rotr_u32(2283114629, 16) => 2424670229 bit_rotl_u64(2502548245, 16) => 164007001784320 bit_rotr_u64(2502548245, 16) => 15786524068817179945 bit_rotl_u32(2502548245, 16) => 3675624745 bit_rotr_u32(2502548245, 16) => 3675624745 bit_rotl_u64(4294967295, 16) => 281474976645120 bit_rotr_u64(4294967295, 16) => 18446462598732906495 bit_rotl_u32(4294967295, 16) => 4294967295 bit_rotr_u32(4294967295, 16) => 4294967295 bit_rotl_u64(708915120906848425, 16) => 10559786150567414230 bit_rotr_u64(708915120906848425, 16) => 5235726858981205390 bit_rotl_u64(1960191741125985428, 16) => 217119263562548 bit_rotr_u64(1960191741125985428, 16) => 329918582857188728 bit_rotl_u64(3689348814741910323, 16) => 3689348814741910323 bit_rotr_u64(3689348814741910323, 16) => 3689348814741910323 bit_rotl_u64(5578377670650038654, 16) => 6984970945039322474 bit_rotr_u64(5578377670650038654, 16) => 684069312695081489 bit_rotl_u64(9223372036854775808, 16) => 32768 bit_rotr_u64(9223372036854775808, 16) => 140737488355328 bit_rotl_u64(10755112315580060033, 16) => 15396401486556665153 bit_rotr_u64(10755112315580060033, 16) => 1261453480630616468 bit_rotl_u64(11163782031541429823, 16) => 13302511704618277613 bit_rotr_u64(11163782031541429823, 16) => 7367777861196579818 bit_rotl_u64(13903686156871869732, 16) => 15052455871552733427 bit_rotr_u64(13903686156871869732, 16) => 2676476231979176157 bit_rotl_u64(14237897302422917095, 16) => 3182131138045396375 bit_rotr_u64(14237897302422917095, 16) => 1146101883260711785 bit_rotl_u64(14302190498657618739, 16) => 10843390769674569339 bit_rotr_u64(14302190498657618739, 16) => 5418893010764789364 bit_rotl_u64(15766411510232741269, 16) => 10068933919817194189 bit_rotr_u64(15766411510232741269, 16) => 8472918850314963469 bit_rotl_u64(15984546468465238145, 16) => 9534899519829958100 bit_rotr_u64(15984546468465238145, 16) => 6954083204459578520 bit_rotl_u64(18446744073709551615, 16) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 16) => 18446744073709551615 bit_rotl_u64(0, 31) => 0 bit_rotr_u64(0, 31) => 0 bit_rotl_u32(0, 31) => 0 bit_rotr_u32(0, 31) => 0 bit_rotl_u64(1, 31) => 2147483648 bit_rotr_u64(1, 31) => 8589934592 bit_rotl_u32(1, 31) => 2147483648 bit_rotr_u32(1, 31) => 2 bit_rotl_u64(2, 31) => 4294967296 bit_rotr_u64(2, 31) => 17179869184 bit_rotl_u32(2, 31) => 1 bit_rotr_u32(2, 31) => 4 bit_rotl_u64(32768, 31) => 70368744177664 bit_rotr_u64(32768, 31) => 281474976710656 bit_rotl_u32(32768, 31) => 16384 bit_rotr_u32(32768, 31) => 65536 bit_rotl_u64(65535, 31) => 140735340871680 bit_rotr_u64(65535, 31) => 562941363486720 bit_rotl_u32(65535, 31) => 2147516415 bit_rotr_u32(65535, 31) => 131070 bit_rotl_u64(65536, 31) => 140737488355328 bit_rotr_u64(65536, 31) => 562949953421312 bit_rotl_u32(65536, 31) => 32768 bit_rotr_u32(65536, 31) => 131072 bit_rotl_u64(726075912, 31) => 1559236148226686976 bit_rotr_u64(726075912, 31) => 6236944592906747904 bit_rotl_u32(726075912, 31) => 363037956 bit_rotr_u32(726075912, 31) => 1452151824 bit_rotl_u64(858993459, 31) => 1844674406941458432 bit_rotr_u64(858993459, 31) => 7378697627765833728 bit_rotl_u32(858993459, 31) => 2576980377 bit_rotr_u32(858993459, 31) => 1717986918 bit_rotl_u64(1073741824, 31) => 2305843009213693952 bit_rotr_u64(1073741824, 31) => 9223372036854775808 bit_rotl_u32(1073741824, 31) => 536870912 bit_rotr_u32(1073741824, 31) => 2147483648 bit_rotl_u64(1245250552, 31) => 2674155198082973696 bit_rotr_u64(1245250552, 31) => 10696620792331894784 bit_rotl_u32(1245250552, 31) => 622625276 bit_rotr_u32(1245250552, 31) => 2490501104 bit_rotl_u64(1431655765, 31) => 3074457344902430720 bit_rotr_u64(1431655765, 31) => 12297829379609722880 bit_rotl_u32(1431655765, 31) => 2863311530 bit_rotr_u32(1431655765, 31) => 2863311530 bit_rotl_u64(1656977767, 31) => 3558332659732054016 bit_rotr_u64(1656977767, 31) => 14233330638928216064 bit_rotl_u32(1656977767, 31) => 2975972531 bit_rotr_u32(1656977767, 31) => 3313955534 bit_rotl_u64(2147483648, 31) => 4611686018427387904 bit_rotr_u64(2147483648, 31) => 1 bit_rotl_u32(2147483648, 31) => 1073741824 bit_rotr_u32(2147483648, 31) => 1 bit_rotl_u64(2283114629, 31) => 4902951332287086592 bit_rotr_u64(2283114629, 31) => 1165061255438794753 bit_rotl_u32(2283114629, 31) => 3289040962 bit_rotr_u32(2283114629, 31) => 271261963 bit_rotl_u64(2502548245, 31) => 5374181434468597760 bit_rotr_u64(2502548245, 31) => 3049981664164839425 bit_rotl_u32(2502548245, 31) => 3398757770 bit_rotr_u32(2502548245, 31) => 710129195 bit_rotl_u64(4294967295, 31) => 9223372034707292160 bit_rotr_u64(4294967295, 31) => 18446744065119617025 bit_rotl_u32(4294967295, 31) => 4294967295 bit_rotr_u32(4294967295, 31) => 4294967295 bit_rotl_u64(708915120906848425, 31) => 17493991222969846085 bit_rotr_u64(708915120906848425, 31) => 14635732670750729495 bit_rotl_u64(1960191741125985428, 31) => 7114564028417572864 bit_rotr_u64(1960191741125985428, 31) => 10011512039960739841 bit_rotl_u64(3689348814741910323, 31) => 11068046444225730969 bit_rotr_u64(3689348814741910323, 31) => 7378697629483820646 bit_rotl_u64(5578377670650038654, 31) => 14774204534111940727 bit_rotr_u64(5578377670650038654, 31) => 3756585915319108063 bit_rotl_u64(9223372036854775808, 31) => 1073741824 bit_rotr_u64(9223372036854775808, 31) => 4294967296 bit_rotl_u64(10755112315580060033, 31) => 9280239606276614869 bit_rotr_u64(10755112315580060033, 31) => 227470277687356246 bit_rotl_u64(11163782031541429823, 31) => 141075175016160334 bit_rotr_u64(11163782031541429823, 31) => 564300700064641336 bit_rotl_u64(13903686156871869732, 31) => 9830956193977854066 bit_rotr_u64(13903686156871869732, 31) => 2430336628492313034 bit_rotl_u64(14237897302422917095, 31) => 11075626865162688020 bit_rotr_u64(14237897302422917095, 31) => 7409019313231648850 bit_rotl_u64(14302190498657618739, 31) => 13491136976614443837 bit_rotr_u64(14302190498657618739, 31) => 17071059759038672118 bit_rotl_u64(15766411510232741269, 31) => 362182200778999262 bit_rotr_u64(15766411510232741269, 31) => 1448728803115997048 bit_rotl_u64(15984546468465238145, 31) => 7083089369391317545 bit_rotr_u64(15984546468465238145, 31) => 9885613403855718565 bit_rotl_u64(18446744073709551615, 31) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 31) => 18446744073709551615 bit_rotl_u64(0, 32) => 0 bit_rotr_u64(0, 32) => 0 bit_rotl_u32(0, 32) => 0 bit_rotr_u32(0, 32) => 0 bit_rotl_u64(1, 32) => 4294967296 bit_rotr_u64(1, 32) => 4294967296 bit_rotl_u32(1, 32) => 1 bit_rotr_u32(1, 32) => 1 bit_rotl_u64(2, 32) => 8589934592 bit_rotr_u64(2, 32) => 8589934592 bit_rotl_u32(2, 32) => 2 bit_rotr_u32(2, 32) => 2 bit_rotl_u64(32768, 32) => 140737488355328 bit_rotr_u64(32768, 32) => 140737488355328 bit_rotl_u32(32768, 32) => 32768 bit_rotr_u32(32768, 32) => 32768 bit_rotl_u64(65535, 32) => 281470681743360 bit_rotr_u64(65535, 32) => 281470681743360 bit_rotl_u32(65535, 32) => 65535 bit_rotr_u32(65535, 32) => 65535 bit_rotl_u64(65536, 32) => 281474976710656 bit_rotr_u64(65536, 32) => 281474976710656 bit_rotl_u32(65536, 32) => 65536 bit_rotr_u32(65536, 32) => 65536 bit_rotl_u64(726075912, 32) => 3118472296453373952 bit_rotr_u64(726075912, 32) => 3118472296453373952 bit_rotl_u32(726075912, 32) => 726075912 bit_rotr_u32(726075912, 32) => 726075912 bit_rotl_u64(858993459, 32) => 3689348813882916864 bit_rotr_u64(858993459, 32) => 3689348813882916864 bit_rotl_u32(858993459, 32) => 858993459 bit_rotr_u32(858993459, 32) => 858993459 bit_rotl_u64(1073741824, 32) => 4611686018427387904 bit_rotr_u64(1073741824, 32) => 4611686018427387904 bit_rotl_u32(1073741824, 32) => 1073741824 bit_rotr_u32(1073741824, 32) => 1073741824 bit_rotl_u64(1245250552, 32) => 5348310396165947392 bit_rotr_u64(1245250552, 32) => 5348310396165947392 bit_rotl_u32(1245250552, 32) => 1245250552 bit_rotr_u32(1245250552, 32) => 1245250552 bit_rotl_u64(1431655765, 32) => 6148914689804861440 bit_rotr_u64(1431655765, 32) => 6148914689804861440 bit_rotl_u32(1431655765, 32) => 1431655765 bit_rotr_u32(1431655765, 32) => 1431655765 bit_rotl_u64(1656977767, 32) => 7116665319464108032 bit_rotr_u64(1656977767, 32) => 7116665319464108032 bit_rotl_u32(1656977767, 32) => 1656977767 bit_rotr_u32(1656977767, 32) => 1656977767 bit_rotl_u64(2147483648, 32) => 9223372036854775808 bit_rotr_u64(2147483648, 32) => 9223372036854775808 bit_rotl_u32(2147483648, 32) => 2147483648 bit_rotr_u32(2147483648, 32) => 2147483648 bit_rotl_u64(2283114629, 32) => 9805902664574173184 bit_rotr_u64(2283114629, 32) => 9805902664574173184 bit_rotl_u32(2283114629, 32) => 2283114629 bit_rotr_u32(2283114629, 32) => 2283114629 bit_rotl_u64(2502548245, 32) => 10748362868937195520 bit_rotr_u64(2502548245, 32) => 10748362868937195520 bit_rotl_u32(2502548245, 32) => 2502548245 bit_rotr_u32(2502548245, 32) => 2502548245 bit_rotl_u64(4294967295, 32) => 18446744069414584320 bit_rotr_u64(4294967295, 32) => 18446744069414584320 bit_rotl_u32(4294967295, 32) => 4294967295 bit_rotr_u32(4294967295, 32) => 4294967295 bit_rotl_u64(708915120906848425, 32) => 16541238372230140555 bit_rotr_u64(708915120906848425, 32) => 16541238372230140555 bit_rotl_u64(1960191741125985428, 32) => 14229128056835145728 bit_rotr_u64(1960191741125985428, 32) => 14229128056835145728 bit_rotl_u64(3689348814741910323, 32) => 3689348814741910323 bit_rotr_u64(3689348814741910323, 32) => 3689348814741910323 bit_rotl_u64(5578377670650038654, 32) => 11101664994514329839 bit_rotr_u64(5578377670650038654, 32) => 11101664994514329839 bit_rotl_u64(9223372036854775808, 32) => 2147483648 bit_rotr_u64(9223372036854775808, 32) => 2147483648 bit_rotl_u64(10755112315580060033, 32) => 113735138843678123 bit_rotr_u64(10755112315580060033, 32) => 113735138843678123 bit_rotl_u64(11163782031541429823, 32) => 282150350032320668 bit_rotr_u64(11163782031541429823, 32) => 282150350032320668 bit_rotl_u64(13903686156871869732, 32) => 1215168314246156517 bit_rotr_u64(13903686156871869732, 32) => 1215168314246156517 bit_rotl_u64(14237897302422917095, 32) => 3704509656615824425 bit_rotr_u64(14237897302422917095, 32) => 3704509656615824425 bit_rotl_u64(14302190498657618739, 32) => 8535529879519336059 bit_rotr_u64(14302190498657618739, 32) => 8535529879519336059 bit_rotl_u64(15766411510232741269, 32) => 724364401557998524 bit_rotr_u64(15766411510232741269, 32) => 724364401557998524 bit_rotl_u64(15984546468465238145, 32) => 14166178738782635090 bit_rotr_u64(15984546468465238145, 32) => 14166178738782635090 bit_rotl_u64(18446744073709551615, 32) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 32) => 18446744073709551615 bit_rotl_u64(0, 63) => 0 bit_rotr_u64(0, 63) => 0 bit_rotl_u64(1, 63) => 9223372036854775808 bit_rotr_u64(1, 63) => 2 bit_rotl_u64(2, 63) => 1 bit_rotr_u64(2, 63) => 4 bit_rotl_u64(32768, 63) => 16384 bit_rotr_u64(32768, 63) => 65536 bit_rotl_u64(65535, 63) => 9223372036854808575 bit_rotr_u64(65535, 63) => 131070 bit_rotl_u64(65536, 63) => 32768 bit_rotr_u64(65536, 63) => 131072 bit_rotl_u64(726075912, 63) => 363037956 bit_rotr_u64(726075912, 63) => 1452151824 bit_rotl_u64(858993459, 63) => 9223372037284272537 bit_rotr_u64(858993459, 63) => 1717986918 bit_rotl_u64(1073741824, 63) => 536870912 bit_rotr_u64(1073741824, 63) => 2147483648 bit_rotl_u64(1245250552, 63) => 622625276 bit_rotr_u64(1245250552, 63) => 2490501104 bit_rotl_u64(1431655765, 63) => 9223372037570603690 bit_rotr_u64(1431655765, 63) => 2863311530 bit_rotl_u64(1656977767, 63) => 9223372037683264691 bit_rotr_u64(1656977767, 63) => 3313955534 bit_rotl_u64(2147483648, 63) => 1073741824 bit_rotr_u64(2147483648, 63) => 4294967296 bit_rotl_u64(2283114629, 63) => 9223372037996333122 bit_rotr_u64(2283114629, 63) => 4566229258 bit_rotl_u64(2502548245, 63) => 9223372038106049930 bit_rotr_u64(2502548245, 63) => 5005096490 bit_rotl_u64(4294967295, 63) => 9223372039002259455 bit_rotr_u64(4294967295, 63) => 8589934590 bit_rotl_u64(708915120906848425, 63) => 9577829597308200020 bit_rotr_u64(708915120906848425, 63) => 1417830241813696850 bit_rotl_u64(1960191741125985428, 63) => 980095870562992714 bit_rotr_u64(1960191741125985428, 63) => 3920383482251970856 bit_rotl_u64(3689348814741910323, 63) => 11068046444225730969 bit_rotr_u64(3689348814741910323, 63) => 7378697629483820646 bit_rotl_u64(5578377670650038654, 63) => 2789188835325019327 bit_rotr_u64(5578377670650038654, 63) => 11156755341300077308 bit_rotl_u64(9223372036854775808, 63) => 4611686018427387904 bit_rotr_u64(9223372036854775808, 63) => 1 bit_rotl_u64(10755112315580060033, 63) => 14600928194644805824 bit_rotr_u64(10755112315580060033, 63) => 3063480557450568451 bit_rotl_u64(11163782031541429823, 63) => 14805263052625490719 bit_rotr_u64(11163782031541429823, 63) => 3880819989373308031 bit_rotl_u64(13903686156871869732, 63) => 6951843078435934866 bit_rotr_u64(13903686156871869732, 63) => 9360628240034187849 bit_rotl_u64(14237897302422917095, 63) => 16342320688066234355 bit_rotr_u64(14237897302422917095, 63) => 10029050531136282575 bit_rotl_u64(14302190498657618739, 63) => 16374467286183585177 bit_rotr_u64(14302190498657618739, 63) => 10157636923605685863 bit_rotl_u64(15766411510232741269, 63) => 17106577791971146442 bit_rotr_u64(15766411510232741269, 63) => 13086078946755930923 bit_rotl_u64(15984546468465238145, 63) => 17215645271087394880 bit_rotr_u64(15984546468465238145, 63) => 13522348863220924675 bit_rotl_u64(18446744073709551615, 63) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 63) => 18446744073709551615 bit_rotl_u64(0, 64) => 0 bit_rotr_u64(0, 64) => 0 bit_rotl_u64(1, 64) => 1 bit_rotr_u64(1, 64) => 1 bit_rotl_u64(2, 64) => 2 bit_rotr_u64(2, 64) => 2 bit_rotl_u64(32768, 64) => 32768 bit_rotr_u64(32768, 64) => 32768 bit_rotl_u64(65535, 64) => 65535 bit_rotr_u64(65535, 64) => 65535 bit_rotl_u64(65536, 64) => 65536 bit_rotr_u64(65536, 64) => 65536 bit_rotl_u64(726075912, 64) => 726075912 bit_rotr_u64(726075912, 64) => 726075912 bit_rotl_u64(858993459, 64) => 858993459 bit_rotr_u64(858993459, 64) => 858993459 bit_rotl_u64(1073741824, 64) => 1073741824 bit_rotr_u64(1073741824, 64) => 1073741824 bit_rotl_u64(1245250552, 64) => 1245250552 bit_rotr_u64(1245250552, 64) => 1245250552 bit_rotl_u64(1431655765, 64) => 1431655765 bit_rotr_u64(1431655765, 64) => 1431655765 bit_rotl_u64(1656977767, 64) => 1656977767 bit_rotr_u64(1656977767, 64) => 1656977767 bit_rotl_u64(2147483648, 64) => 2147483648 bit_rotr_u64(2147483648, 64) => 2147483648 bit_rotl_u64(2283114629, 64) => 2283114629 bit_rotr_u64(2283114629, 64) => 2283114629 bit_rotl_u64(2502548245, 64) => 2502548245 bit_rotr_u64(2502548245, 64) => 2502548245 bit_rotl_u64(4294967295, 64) => 4294967295 bit_rotr_u64(4294967295, 64) => 4294967295 bit_rotl_u64(708915120906848425, 64) => 708915120906848425 bit_rotr_u64(708915120906848425, 64) => 708915120906848425 bit_rotl_u64(1960191741125985428, 64) => 1960191741125985428 bit_rotr_u64(1960191741125985428, 64) => 1960191741125985428 bit_rotl_u64(3689348814741910323, 64) => 3689348814741910323 bit_rotr_u64(3689348814741910323, 64) => 3689348814741910323 bit_rotl_u64(5578377670650038654, 64) => 5578377670650038654 bit_rotr_u64(5578377670650038654, 64) => 5578377670650038654 bit_rotl_u64(9223372036854775808, 64) => 9223372036854775808 bit_rotr_u64(9223372036854775808, 64) => 9223372036854775808 bit_rotl_u64(10755112315580060033, 64) => 10755112315580060033 bit_rotr_u64(10755112315580060033, 64) => 10755112315580060033 bit_rotl_u64(11163782031541429823, 64) => 11163782031541429823 bit_rotr_u64(11163782031541429823, 64) => 11163782031541429823 bit_rotl_u64(13903686156871869732, 64) => 13903686156871869732 bit_rotr_u64(13903686156871869732, 64) => 13903686156871869732 bit_rotl_u64(14237897302422917095, 64) => 14237897302422917095 bit_rotr_u64(14237897302422917095, 64) => 14237897302422917095 bit_rotl_u64(14302190498657618739, 64) => 14302190498657618739 bit_rotr_u64(14302190498657618739, 64) => 14302190498657618739 bit_rotl_u64(15766411510232741269, 64) => 15766411510232741269 bit_rotr_u64(15766411510232741269, 64) => 15766411510232741269 bit_rotl_u64(15984546468465238145, 64) => 15984546468465238145 bit_rotr_u64(15984546468465238145, 64) => 15984546468465238145 bit_rotl_u64(18446744073709551615, 64) => 18446744073709551615 bit_rotr_u64(18446744073709551615, 64) => 18446744073709551615 *** test_rotl_rotr: done *** *** test_bswap *** bswap_u64(0) => 0 bswap_u32(0) => 0 bswap_u64(1) => 72057594037927936 bswap_u32(1) => 16777216 bswap_u64(2) => 144115188075855872 bswap_u32(2) => 33554432 bswap_u64(32768) => 36028797018963968 bswap_u32(32768) => 8388608 bswap_u64(65535) => 18446462598732840960 bswap_u32(65535) => 4294901760 bswap_u64(65536) => 1099511627776 bswap_u32(65536) => 256 bswap_u64(726075912) => 579353752079695872 bswap_u32(726075912) => 134891307 bswap_u64(858993459) => 3689348813882916864 bswap_u32(858993459) => 858993459 bswap_u64(1073741824) => 274877906944 bswap_u32(1073741824) => 64 bswap_u64(1245250552) => 17871190736326623232 bswap_u32(1245250552) => 4160960842 bswap_u64(1431655765) => 6148914689804861440 bswap_u32(1431655765) => 1431655765 bswap_u64(1656977767) => 7456205483762778112 bswap_u32(1656977767) => 1736033122 bswap_u64(2147483648) => 549755813888 bswap_u32(2147483648) => 128 bswap_u64(2283114629) => 9624216077550485504 bswap_u32(2283114629) => 2240812424 bswap_u64(2502548245) => 1574898214622986240 bswap_u32(2502548245) => 366684565 bswap_u64(4294967295) => 18446744069414584320 bswap_u32(4294967295) => 4294967295 bswap_u64(708915120906848425) => 12198156707273299465 bswap_u64(1960191741125985428) => 10665782605024080923 bswap_u64(3689348814741910323) => 3689348814741910323 bswap_u64(5578377670650038654) => 9081809480708024909 bswap_u64(9223372036854775808) => 128 bswap_u64(10755112315580060033) => 9300377440395542933 bswap_u64(11163782031541429823) => 4568596173249113498 bswap_u64(13903686156871869732) => 2604731024148591552 bswap_u64(14237897302422917095) => 16649642015867049925 bswap_u64(14302190498657618739) => 3696175971416046534 bswap_u64(15766411510232741269) => 10769528423690522074 bswap_u64(15984546468465238145) => 9322619197622375645 bswap_u64(18446744073709551615) => 18446744073709551615 *** test_bswap: done *** *** test_index *** bit_index_u64(0, *, -1) => bit_index_u32(0, *, -1) => bit_index_u64(1, *, -1) => 0 bit_index_u32(1, *, -1) => 0 bit_index_u64(2, *, -1) => 1 bit_index_u32(2, *, -1) => 1 bit_index_u64(32768, *, -1) => 15 bit_index_u32(32768, *, -1) => 15 bit_index_u64(65535, *, -1) => 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 bit_index_u32(65535, *, -1) => 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 bit_index_u64(65536, *, -1) => 16 bit_index_u32(65536, *, -1) => 16 bit_index_u64(726075912, *, -1) => 3 9 11 16 17 18 22 24 25 27 29 bit_index_u32(726075912, *, -1) => 3 9 11 16 17 18 22 24 25 27 29 bit_index_u64(858993459, *, -1) => 0 1 4 5 8 9 12 13 16 17 20 21 24 25 28 29 bit_index_u32(858993459, *, -1) => 0 1 4 5 8 9 12 13 16 17 20 21 24 25 28 29 bit_index_u64(1073741824, *, -1) => 30 bit_index_u32(1073741824, *, -1) => 30 bit_index_u64(1245250552, *, -1) => 3 4 5 6 7 8 9 16 19 20 21 25 27 30 bit_index_u32(1245250552, *, -1) => 3 4 5 6 7 8 9 16 19 20 21 25 27 30 bit_index_u64(1431655765, *, -1) => 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 bit_index_u32(1431655765, *, -1) => 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 bit_index_u64(1656977767, *, -1) => 0 1 2 5 6 8 11 12 13 14 16 17 22 23 25 29 30 bit_index_u32(1656977767, *, -1) => 0 1 2 5 6 8 11 12 13 14 16 17 22 23 25 29 30 bit_index_u64(2147483648, *, -1) => 31 bit_index_u32(2147483648, *, -1) => 31 bit_index_u64(2283114629, *, -1) => 0 2 7 12 15 16 18 20 27 31 bit_index_u32(2283114629, *, -1) => 0 2 7 12 15 16 18 20 27 31 bit_index_u64(2502548245, *, -1) => 0 2 4 8 9 11 12 14 15 16 19 21 24 26 28 31 bit_index_u32(2502548245, *, -1) => 0 2 4 8 9 11 12 14 15 16 19 21 24 26 28 31 bit_index_u64(4294967295, *, -1) => 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit_index_u32(4294967295, *, -1) => 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 bit_index_u64(708915120906848425, *, -1) => 0 3 5 7 11 14 17 18 19 23 24 26 29 30 31 32 33 35 39 41 44 47 49 50 52 54 55 56 59 bit_index_u64(1960191741125985428, *, -1) => 2 4 7 10 19 20 21 22 24 26 30 31 50 52 53 56 57 59 60 bit_index_u64(3689348814741910323, *, -1) => 0 1 4 5 8 9 12 13 16 17 20 21 24 25 28 29 32 33 36 37 40 41 44 45 48 49 52 53 56 57 60 61 bit_index_u64(5578377670650038654, *, -1) => 1 2 3 4 5 6 8 11 16 20 25 27 28 31 32 33 34 35 37 38 39 45 46 49 51 53 54 56 58 59 62 bit_index_u64(9223372036854775808, *, -1) => 63 bit_index_u64(10755112315580060033, *, -1) => 0 7 8 12 18 20 23 24 32 33 35 37 39 40 42 44 46 47 48 54 56 58 60 63 bit_index_u64(11163782031541429823, *, -1) => 0 1 2 3 4 5 9 10 13 14 17 19 21 22 23 24 25 34 35 36 39 43 44 45 47 48 50 51 53 54 55 57 59 60 63 bit_index_u64(13903686156871869732, *, -1) => 2 5 8 10 13 16 18 19 20 22 23 28 32 34 37 38 39 44 46 47 48 49 52 53 54 55 62 63 bit_index_u64(14237897302422917095, *, -1) => 0 1 2 5 6 7 8 9 10 11 16 19 21 22 24 25 28 29 32 35 37 42 43 45 48 49 50 52 55 56 58 62 63 bit_index_u64(14302190498657618739, *, -1) => 0 1 4 5 8 9 11 14 18 20 21 22 25 26 28 29 30 32 33 35 36 37 38 41 42 44 47 48 49 51 52 53 54 57 58 62 63 bit_index_u64(15766411510232741269, *, -1) => 0 2 4 7 8 10 12 13 14 16 18 19 25 27 34 35 36 37 39 40 41 43 47 48 50 51 54 55 57 59 60 62 63 bit_index_u64(15984546468465238145, *, -1) => 0 7 13 14 19 20 23 26 30 31 33 36 38 42 47 50 52 54 55 56 58 59 60 62 63 bit_index_u64(18446744073709551615, *, -1) => 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 *** test_index: done *** *** test_bit_iter *** Set: 3, 9, 11, 16, 17, 18, 22, 24, 25, 27, 29, 64, 65, 68, 69, 72, 73, 76, 77, Clear: 0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 19, 20, 21, 23, 26, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 70, 71, 74, 75, 78, 79, *** test_bit_iter: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/rope_basic.result0000664000000000000000000001021412202131537021256 0ustar rootroot *** test_empty_rope *** size = 0 string = '' └──nil *** test_empty_rope: done *** *** test_append *** insert offset = 0, str = ' a ' size = 3 string = ' a ' └──{ len = 3, height = 1, data = ' a '} insert offset = 3, str = ' b ' size = 6 string = ' a b ' │ ┌──nil └──{ len = 3, height = 2, data = ' a '} └──{ len = 3, height = 1, data = ' b '} insert offset = 6, str = ' c ' size = 9 string = ' a b c ' │ ┌──{ len = 3, height = 1, data = ' a '} └──{ len = 3, height = 2, data = ' b '} └──{ len = 3, height = 1, data = ' c '} *** test_append: done *** *** test_prepend *** insert offset = 0, str = ' c ' size = 3 string = ' c ' └──{ len = 3, height = 1, data = ' c '} insert offset = 0, str = ' b ' size = 6 string = ' b c ' │ ┌──{ len = 3, height = 1, data = ' b '} └──{ len = 3, height = 2, data = ' c '} └──nil insert offset = 0, str = ' a ' size = 9 string = ' a b c ' │ ┌──{ len = 3, height = 1, data = ' a '} └──{ len = 3, height = 2, data = ' b '} └──{ len = 3, height = 1, data = ' c '} *** test_prepend: done *** *** test_insert *** insert offset = 0, str = ' a ' size = 5 string = ' a ' └──{ len = 5, height = 1, data = ' a '} insert offset = 4, str = 'b ' size = 7 string = ' ab ' │ ┌──{ len = 4, height = 1, data = ' a'} └──{ len = 2, height = 2, data = 'b '} └──{ len = 1, height = 1, data = ' '} insert offset = 5, str = 'c ' size = 9 string = ' abc ' │ ┌──{ len = 4, height = 1, data = ' a'} └──{ len = 1, height = 3, data = 'b'} │ ┌──{ len = 2, height = 1, data = 'c '} └──{ len = 1, height = 2, data = ' '} └──{ len = 1, height = 1, data = ' '} insert offset = 1, str = ' ' size = 10 string = ' abc ' │ ┌──{ len = 1, height = 1, data = ' '} │ ┌──{ len = 1, height = 2, data = ' '} │ │ └──{ len = 3, height = 1, data = ' a'} └──{ len = 1, height = 3, data = 'b'} │ ┌──{ len = 2, height = 1, data = 'c '} └──{ len = 1, height = 2, data = ' '} └──{ len = 1, height = 1, data = ' '} insert offset = 9, str = ' ' size = 11 string = ' abc ' │ ┌──{ len = 1, height = 1, data = ' '} │ ┌──{ len = 1, height = 2, data = ' '} │ │ └──{ len = 3, height = 1, data = ' a'} └──{ len = 1, height = 4, data = 'b'} │ ┌──{ len = 2, height = 1, data = 'c '} └──{ len = 1, height = 3, data = ' '} │ ┌──{ len = 1, height = 1, data = ' '} └──{ len = 1, height = 2, data = ' '} └──nil insert offset = 4, str = '*' size = 12 string = ' *abc ' │ ┌──{ len = 1, height = 1, data = ' '} │ ┌──{ len = 1, height = 3, data = ' '} │ │ │ ┌──{ len = 2, height = 1, data = ' '} │ │ └──{ len = 1, height = 2, data = '*'} │ │ └──{ len = 1, height = 1, data = 'a'} └──{ len = 1, height = 4, data = 'b'} │ ┌──{ len = 2, height = 1, data = 'c '} └──{ len = 1, height = 3, data = ' '} │ ┌──{ len = 1, height = 1, data = ' '} └──{ len = 1, height = 2, data = ' '} └──nil insert offset = 8, str = '*' size = 13 string = ' *abc* ' │ ┌──{ len = 1, height = 1, data = ' '} │ ┌──{ len = 1, height = 3, data = ' '} │ │ │ ┌──{ len = 2, height = 1, data = ' '} │ │ └──{ len = 1, height = 2, data = '*'} │ │ └──{ len = 1, height = 1, data = 'a'} └──{ len = 1, height = 4, data = 'b'} │ ┌──{ len = 1, height = 1, data = 'c'} │ ┌──{ len = 1, height = 2, data = '*'} │ │ └──{ len = 1, height = 1, data = ' '} └──{ len = 1, height = 3, data = ' '} │ ┌──{ len = 1, height = 1, data = ' '} └──{ len = 1, height = 2, data = ' '} └──nil *** test_insert: done *** *** test_erase *** erase offset = 0 size = 0 string = '' └──nil erase offset = 0 size = 1 string = 'b' └──{ len = 1, height = 1, data = 'b'} *** test_erase: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/base64.result0000664000000000000000000000030412202131537020233 0ustar rootroot *** base64_test *** *** base64_test: done *** *** base64_test *** *** base64_test: done *** *** base64_test *** *** base64_test: done *** *** base64_test *** *** base64_test: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/small_alloc.test0000775000000000000000000026566212213333056021123 0ustar rootrootELF>@@@@8@%"@@@@@@@@@!! `` ``@@DDPtd@@\\Qtd/lib64/ld-linux-x86-64.so.2GNU GNUZ\a}~><C 4A!Y`V(p H B! DSL `@F Q"#%(*+-.13589:<=>?@ABDFGHJKNPQRSUVY[\^ C!W}y9z)A[c]5K.?LariU5cu FE+n{YoOH"܎7?F\V? ФC?3~2bku7pJf! `1aa : /g2Nk CfFsP$ k|BE9@j- *'Ϻ|O`&ڝ|F8ab/0CzqX i~ + : N h* @X@` e,@ r1@^`= _J@m q@ a@````~@ |)@ &@L @ OT@/ oq@x v@? J@ x@; 7U@` 6@ I@C# W@{ to@ 0{@C t3@<2`{ K@3T~@` \*@  P~@s 1@h 0@{ JS@  GZ@? ?@ p@ @T fH@ X@h }@ [@ 2:@4: 82@<K }Q@ ` |@G &@p Y@?5 t@8` z@& '@ s|@hg 65@[ s@ _@HĢ` T@J u@y T@P  \@aB []@ 4@N L@s@` N@ 5@wp@Z +p@D r@6Ģ` \@libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitsrandmmap64timeabort__assert_failmemset__errno_locationmallocstderrmunmapstrerror_rfprintf__libc_start_main__libc_csu_finimslab_tree_newallocatingfactor_tree_iterfactor_tree_reverse_iterfactor_tree_nsearchfactor_tree_reverse_iter_startmempool_iterator_nextslab_from_ptrslab_cache_check_edatafactor_tree_newmslab_allocmempool_iterator_createmslab_tree_nsearchmslab_tree_removemslab_tree_iterfactor_tree_reverse_iter_recursefactor_tree_insertseedmslab_freefactor_tree_iter_startslab_getsmfreefactor_tree_prevfactor_tree_psearch__data_startcachemslab_tree_psearchslab_cache_createmempool_destroy_IO_stdin_usedslab_get_with_orderfactor_tree_nextsmalloc_nothrowmslab_tree_reverse_iterfactor_tree_last__libc_csu_initmempool_freefactor_tree_search_endmempool_create_with_ordermslab_tree_reverse_iter_startmempool_statsfactor_tree_first__bss_startmslab_tree_iter_recursemslab_offsetmslab_tree_insertfactor_tree_iter_recursemslab_tree_reverse_iter_recursesmall_alloc_destroyslab_putsmall_alloc_basicsmall_alloc_createmslab_tree_searchmempool_alloc_nothrowfactor_tree_removemslab_tree_prevmslab_tree_lastmslab_tree_firstsmall_statsslab_cache_destroymslab_tree_iter_startmslab_tree_nextGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui ` `` `(`0`8`@`H`P` X` `` h` p` x``Z`````HH} HtH5r %t @%r h%j h%b h%Z h%R h%J h%B h%: hp%2 h`%* h P%" h @% h 0% h % h % h% h% h% h% h1I^HHPTIP~@H}@H_@Ϣ`UH-Ȣ`HHw]øHt]Ȣ`Ȣ`UH-Ȣ`HHHH?HHHu]úHt]Ȣ`=q uUH~]^ @H=x tHtU`H]{vUHH0H}HE=/HEHHHHHHEHЋHE9tAHՉ H$@AAp~@~@~@@HǸ[HEEEHH`H;EtAHx H$@AAp~@~@B@@HǸEHH`EHH`HMH HcHHHHEHH`Hƿ`N9EHH`UHSHMb)É؉EEi)‰ЉEph )É؉EEi)‰ЉE} ~ }~E EHH`HtBEHH`;Et@-p~@S@ EHH`Hч t~EHHƿ`n6H‹EHH`EHH`UEHH`HPEEHH`UHcHHHH‹EEHH`H[]UHH1%)ЉEEYEE;E|UHH@g@c ```2E,n  E}~˿`8@t@sUHH̥ Hť `` .``O ]ÐUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@HEHEHPHEHPHEH@HUHHEHUHHEHHEHPHE]UHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HEHPHEH]UHHH}HEHmHEHHUHH}HuHEHUHHPHEHH!]UH0]UHHH}H9Eva@@*@'H}w)H}@v HE)UHSHE} v @@@@E ӉHH[]UHH H}E} v@7`@@@qHEHEEsHH#EHEHEP(`9u HE@,:Et@<`@@HEUHSHH}HEP(x`9t0@D`@@HE@,< v0@E`@@HE@,< t`HE@,HHHEH!HEH9uHEHX HE@,H9t0@I`@ @NH[]UHHH}HuHE@-HE@,9t<@P`@@HEHpHEH@ H)HEHpHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHE@-UHH}HuHEHpHEH@ HHEHpHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHE@,PHEP-]UHH}HE@-]UHATSHH}HEHX [II):bظAHHEHLHH[A\]UHH H}HUE} vl@p`@؁@Y]HEP(HEUP,HE@-HEHUHP UHHPH}HuHUHEHHtXHM@HΉZH HU@HǸ @~`@@H|UHH0E܀} v@`@@@}E܉HEHEHAA"HƿHEH}u HEHPHEH!HEH}tKHEHUH)HEHHHEHUHH)HHEHEHUHHEHHHEHUHHEHHHEHEMHUHEHHEUHHH}HE@,< vU@`@@[HE@,< uHE@,KHHEH1UHH0H}HuHE@,u@`@'@HE@,EEHEMHUHEЉH5HEH*HEMHUHEHHEHPHE@,HHHHEHHHWHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEUHH0H}HuHUHEHqH;EtJ@`@7@HEH9EHFEHEHEHHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHE@,PHEP,HE@,cHHEHP HEUHHH}E EHHHHEHHRE} vHEH`H6UHH@H}HEH`HEHEHHEHEHE>HE@,< uHEHe HHEHH\HEHEHEH;EtHEH=HEHEHEH}uUHH0H}؉EԀ} v@`@@@$EHHHHEHHEHEH@H;E @HEH}u nHEHHEHUH`HHHEHxHEH@ HHEHxHEHPHEHH_HEHPHEH@ HHEHPHE HEH.9HEHHEHEHHEHE@,:EHEHPHEH@ H)HEHPHUHEHHHEHE@,:EuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHUHEHHHEHTHEUHH H}HuHEHEHE} HEHHEH}u MHUHEHiHEHUH`HHHEHxHEH@ HHEHxHEHpHEHHEHpHEUHEH2UHH H}HuHEHRHE@,< u_HEHHEHxHEH@ H)HEHxHEHpHEH@ H)HEHpHEHHUHEHHHEHRHEH}HEP,HE@,8HEHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHUHMHEHH$HEHEHHEH}t$HEP,HE@,8uHEHuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEHHEHPHE@,HHHHEHHHfUHSHxH}HEHEHEHEEHEH`HEHEHHEHEHEHEP(S9t4HEH(}SHu AȉѺ@X@HǸEHE@,< u&HEH@ HEHEH@ HEHEH@ HErHEHX HE@,H9tEHEHX HE@,HHeu IHѺ@@HǸE OHEHEHHEHEHEHEH;EHEHxH;Et7HEHxHt HMIHѺ@@HǸ EHEHE HUHEHH)HHEHEH@HEHEH@HEHEHXEHHغHHHt>EbHHEHPH;t IHѺ@@HǸ^EHEHXEHHغHHHt>EHHEHPHs IHѺ@@@HǸEHE HEH@H;EHEHUHH;Et7Hs HuHMHUIIHѺ@@HǸEHEHpH;Et7HEHpH/s HMIHѺ@Ѓ@HǸNE}uHx[]ÐUHH}HuHEHUHHPHEHH!]UHHH}H9Ev@Є@*@H}w)H}@v HE)UHPZ]UHH}HEH@]UHH}HuHEHE9w&HEHE9s]UHH}HEHPHEHHEHPHEHPHEHHHEH@H HHEHPHEH@HHHEHPHEH@HHHEHP]UHH}HEHHEHEHH;Et! HEHHEHEHHUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@HHEHEH@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@HHUHH9tHHEH@HHEHEHH;E HEHHEHEHHUHH9uHEHHEHEHH;Eu@8@@@HEHHEHUHEHHE}yHEHEHEHHE}~7HEH@HHEHEHH;Eu@8@@@HEHH;EuHEHEUHH0H}HuHEHHUHH9tMHEHHEHEHH;EHEH@HHEHEH@HHUHH9uHEHHEHEHH;Eu@8@@@HEHHEHUHEHHmE}y HEHHE}~?HEHEHEH@HHEHEHH;Eu@8@@@LHEHH;EuHEHEUHH H}HuHEHHE#}y HEHHEHEH@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHESHUHEHH4E}yHEHEHEHHE"}~HEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHESHUHEHHE}y HEHHE*}~HEHEHEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHHHHHH@H HHHPHH@HHHHPHHHHHEHEHHHHrHEPHE@E}uЈ@8@@@z}yHEHPHEHHHHEHPHEHH@HHHEHEHHHH9^HEHHHmHEHHEHE@HEHHHEHEHUHHEH@HHEHHEHEH@HHEH@HHHEHPHEHHEHEH@HHHEHHEH@HƒHEH HHEHPHEHE:HEHHHEHEH@HƒHEH HHEHPHEH@HLHEHHEHEH@HtJHEH@HHHEHPHEH@HHHEHPHEH@HHHEHPHEH@HEHEH@HHEHEHHHEH@H HHEHPHEHUHHEH@HHEH HHEHPHEH@HHHEHPHEHEHEHUHHmHUHH9HHHHHHHHRHHPUHHHXHPHEHXHH`H`HEHEHHPHHHEPHE@E܃}yHEHPHEHHHxHEHPHEHH@HH}uXHE@HEHEHE%HE@HEHPHEHHHHEHEHHXHH9u HEHEHHXHH9HEHH;Pt@8@@@bHmHEHH;PRHEHH@HEHEHHUHHRHHHPHRHH HPHEHHPHHHEHHPHRHHHUHHRH HPHPH@HHEH HHPHPHEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHH_HEHHHUHHHUHHHRH HP,HPHHEHXHH;EHPH@Ht@8@@ȅ@HEH@Hu@8@@@HEH@HHHEHPH`H9EuHXHUH HEH@yHEHHHUH HEHHHUHHHRHуHUH HPv H`H9EuHXHPHXHO HEHH@HtFHEH@x@8@@S@HEHHHXHH HXHPHEHHm HE@u@8@@e@2HE@HEHHUHHHHEHHH@Ht@8@@x@HEHH@HHEHH@HHEHEHHEHEH@HHEHHUHHRHHPHEHHEHEH@HHHEHHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHHHUHHRH HPHEHHEHGHEHH@HHEHEHHUHHHUHHRH HPHEHHEHHUH`H9w@8@@І@^HEH@yHEHHHUHHEHHHUHHHRHуHUH HPHEHH@HHEHEHHEHEH@H8HEH@HHHEHPHEHHEHEH@HHHEHHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHHHUHHRH HPHEHHEHH`H9EuHXHUHxHEH@yHEHHHUHRHEHHHUHHHRHуHUH HP"HEHHUHHRHHPHEHH@HHEHEHHUHHHUHHRH HPHEHHEHHEHUHXHEHHUHHHHUHHRH HPHEHHHEHEH@HLHEH@HHEHEHHEHEH@HHEH@HHHEHPHEHHHEHEHHUHRHHHEHHHEH@H HHEHPHEHHHEHEHHUHRHHHEHHHEH@H HHEHPHEH@HƒHEH HHEHPHEH@HHEHEHHHEH@H HHEHPHEHUHHXHH;Eu@8@@@HEH@HHHEHPHEHHHEHEHHUHRHHHEHHHEH@H HHEHPHEH@HHHEHPH`H9EuHXHUHoHEH@yHEHHHUHIHEHHHUHHHRHуHUH HPHEHH@HHEHHxHxH@H&HEHHUHHRHHPHEH@HHHEHPHxH@HHHxHPHEHHHpHEHHpHRHHHEHHHpH@H HHpHPHUH`H9w@8@@І@HEH@yHEHHHpHHEHHHUHHHRHуHpH HPHEH@HHHEHPHEHHUHHRHHPHEHHhHhH@HHhH@HHHhHPHEHHH`HEHH`HRHHHEHHH`H@H HH`HPH`H9EuHXH`HHEH@yHEHHH`HHEHHHUHHHRHуH`H HPpHEH@HHHEHPHmHUH`H9fH`HXHHXHH@Ht@8@@@|UHH0H}HuHUHMHEHH;Eu HEHHEH0HMHUHEHHEHEHH;EtHENHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHLUHHPH}HuHUHMLEHUHEHH[E}HEHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@HHHMHUHEH}~,HEH@HHH}HMHuHEIHNHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEH UHH0H}HuHUHMH}t(HEHH}HMHuHEIH|HEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@HHHMHUHEHHEHEHH;EtHEIHEHHEHUHuHMHEHHEH}tHEHMHUHuHEHIUHHPH}HuHUHMLEHUHEHHE}HEH@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH0HMHUHEHs}y$HEHH}HMHuHEIHIHEHHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHH@H}HuHUHE؋H;Erp@?@@p@VHEHHu HEBHE؋HEHEHEHEHxH*HHH H*XHEY.1;sH, ;\H,HH1оHHEHE؋H;Erp@S@@@HEH;EOHEHHEHEHHEHHEHEHEHHuH~H*HEHPHEHHEHHEHHHEUHSH8H}HuЉỦMEHEHUHE̾HE̋EȾHEȋE;Er@h@@@EøHHHE؈HEHHE4HEHEHUHEH)EHEHEHH;EwHEH-HE؉E.-9v %9EHE؋HxH*HHH H*X(YMHE؋HxH*HHH H*X.vzHE؋HxH*HHH H*X 8XHE؋HxH*HHH H*Xf(^f(ffZEHU؋EĉHEHHEHEHHEHHEHEHPH;EuHEHǀHEHHEHHEHHUHEؾHH8[]UHHH(H H(H; H HHEH(EE;E~EU)EEHcHHHHHHH(HHHEHEH; r*H HPHEH9}`@@@@kH EH(HH0HHHEH}u`@@@@@HEHH; v!H HMH(HH[HEHEHHEHEH; s`@@@B@HEH'HhUHH0H}HuHEHEЉHHEHEH@HHEHUHEHH(HEHHuYHEHE؋9vEHEHHu5HEHHEHEHHEHH>HEHUHUHHH}HuHEHUHHEHPHEHPHEHH0HHEHPUHH H}HEHPHEHHH9sHEHPHHHUHJTHEH@HtBHEH@HHEHEH@HUHHHHiHHEHPHEUHH0H}HUHEHH HEH%HEH/HEH}uH{UHH`H}HuHUHMHEHHUHEHHSHUHEHHN'HEHHEHHEHHEHPHEHHEHPHMHUHEHHHEHvHEH}uHUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@]UHH}HEH@]UHH}HEH@HEHPHEH]UHHH}HEHHEHHUHH}HuHEHUHHPHEHH!]UHSHE} v@@@@肿E ӉHH[]UHP|]UHH}HuHEH;EwHEH;Es]UHH}HEHPHEHHEHPHEHP@HEHHHEH@HH HHEHPHHEH@HHHHEHPHHEH@HHHHEHPH]UHH}HEHHEHEHH;Et# HEH@8HEHEH@8HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@@HHEHEH@@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@@HHUHH9tJHEH@@HHEHEHH;E HEH@8HEHEH@8HUHH9uHEHHEHEHH;Eup@,@ @3HEHHEHUHEHHE}yHEHEHEH@8HE}~7HEH@@HHEHEHH;Eup@,@ @赼HEHH;EuHEHEUHH0H}HuHEH@8HUHH9tNHEH@8HEHEHH;EHEH@@HHEHEH@@HHUHH9uHEHHEHEHH;Eu`@,@ @HEHHEHUHEHHE}yHEH@8HE}~?HEHEHEH@@HHEHEHH;Eu`@,@ @vHEHH;EuHEHEUHH H}HuHEHHE$}yHEH@8HEHEH@@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHGE}yHEHEHEH@8HE"}~HEH@@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@8HE*}~HEHEHEH@@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHP8HHHHH@@H HHHP@HH@@HHHHP@HHHHHEHEHHHHHEPHE@E}u@@,@%@蠸}yHEHPHEHH@8HHEHPHEHH@@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHP8HEH@@HHEH@8HEHEH@@HHEH@@HHHEHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHE=HEHHHEHEH@@HƒHEH HHEHP@HEH@@HOHEH@8HEHEH@@HtJHEH@@HHHEHP@HEH@@HHHEHP@HEH@@HHHEHP@HEH@@HEHEH@@HHEHEH@8HHEH@@H HHEHP@HEHUHP8HEH@@HHEH HHEHP@HEH@@HHHEHP@HEHEHEHUHHmHUHH9HHHHHHHHR@HHP@UHHHXHPHEHXHH`H`HEHEHHPHH!HEPHE@E܃}yHEHPHEHH@8HyHEHPHEHH@@HH}uYHE@HEHEHE&HE@HEHPHEHH@8HHEHEHHXHH9u HEHEHHXHH9HEHH;Pt @,@.@~HmHEHH;PUHEHH@@HEHEHHUHHR@HHHPHR@HH HP@HEHHPHR8HP8HEHHPHR@HHHUHHR@H HP@HPH@@HHEH HHPHP@HEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHP8aHEHHHUHHHUHHHR@H HP@.HPH@8HEHXHH;EHPH@@Ht @,@H@HEH@@Hu @,@@藲HEH@@HHHEHP@H`H9EuHXHUH HEH@yHEHHHUHP8 HEHHHUHHHR@HуHUH HP@ H`H9EuHXHPHXHt HEHH@@HtGHEH@x @,@ӊ@觱HEHHHXHHP8 HXHPHEHHm HE@u @,@@HHE@HEHHUHHHP8HEHHH@@Ht @,@@HEHH@@HHEHH@@HHEHEH@8HEHEH@@HHEHHUHHR@HHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHHUHHR@HуHUH HP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8IHEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8HUH`H9w @,@P@lHEH@yHEHHHUHP8HEHHHUHHHR@HуHUH HP@HEHH@@HHEHEH@8HEHEH@@H=HEH@@HHHEHP@HEH@8HEHEH@@HHHEHP8HEH@@HƒHEH HHEHP@HEHHUHHR@HуHUH HP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8H`H9EuHXHUHHEH@yHEHHHUHP8gHEHHHUHHHR@HуHUH HP@7HEHHUHHR@HHP@HEHH@@HHEHEHHUHR8HHUHHR@H HP@HEHHEHP8HEHUHkHEHHUHHHHUHHR@H HP@HEHH@8HEHEH@@HVHEH@@HHEHEH@8HEHEH@@HHEH@@HHHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEH@@HƒHEH HHEHP@HEH@@HHEHEH@8HHEH@@H HHEHP@HEHUHP8HXHH;Eu @,@s@}HEH@@HHHEHP@HEHH@8HEHEHHUHR@HHP8HEHHHEH@@H HHEHP@HEH@@HHHEHP@H`H9EuHXHUHxHEH@yHEHHHUHP8QHEHHHUHHHR@HуHUH HP@!HEHH@@HHEH@8HxHxH@@H)HEHHUHHR@HHP@HEH@@HHHEHP@HxH@@HHHxHP@HEHH@8HpHEHHpHR@HHP8HEHHHpH@@H HHpHP@HUH`H9w @,@P@膩HEH@yHEHHHpHP8HEHHHUHHHR@HуHpH HP@HEH@@HHHEHP@HEHHUHHR@HHP@HEH@8HhHhH@@HHhH@@HHHhHP@HEHH@8H`HEHH`HR@HHP8HEHHH`H@@H HH`HP@H`H9EuHXH`HHEH@yHEHHH`HP8HEHHHUHHHR@HуH`H HP@pHEH@@HHHEHP@HmHUH`H9BH`HXHHXHH@@Ht @,@@nUHH0H}HuHUHMHEHH;Eu HEHHEHp8HMHUHEHHEHEHH;EtHENHEH@@HHEHUHuHMHEHHEH}tHEHMHUHuHEHKUHHPH}HuHUHMLEHUHEHH6E}HEHP8H}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@@HHHMHUHEH}~,HEH@@HHH}HMHuHEIHNHEH@@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIH{HEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@@HHHMHUHEHHEHEHH;EtHEJHEH@8HEHUHuHMHEHHEH}tHEHMHUHuHEHHUHHPH}HuHUHMLEHUHEHHE}HEH@@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHp8HMHUHEHu}y%HEHP8H}HMHuHEIHJHEH@8HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEUHHH}HuHE@0HEHEP4HEHUHPHHEHHEHPH,UHHH}HHEH@HHHEHUHHH}uHEHHHEH@HEHUHSHH}HuH]HEHpHH)HHUHRHUuH[]UHSH(H}HE؋@4u @V@@0HE؋P0HE؉H HHHHDHEqHE؋P0HEH@H9u @^@@ΠHE؋@0PHE؉P0HE؋P0HE؉H HHHHDHE}tmHE؋P0HE؋H0HE؉H H4ȋEHHHHH1HE؉H H HE؋@4PHE؉P4HE؋@4uHEH@HHP(HEHHBHE؋@0EHE؉H H([]UHSH8H}HuHUHUHEHHEE?EEEHEЋUH HЋEHHHHH HEЋUH H HEЋ@4PHEЉP4HEЋ@0;Ev HEЋUP0HEЋ@4uHEHP(HEHH HEЋP4HE؋9HEHP(HEHH)HEHH;EvjHEHHHEHEHP HEHH@ H)HEHP HEHHHEHHHHEHUHbHEHHtCHEHHHEHP HEH@ H)HEHP HUHEHHH襱HEHUHH8[]UHSHHH}HuUȈE} v@@@ٝHEHUHHEHHHEH(HHEHǀHEȋUHEUHEHøHH)HHEHEHUHUHuHEH}u@@@HEH?HHEHmHEH?HHEEHEHUHHH;EwHEHH;Es@@@誜EHEHUH)HEHH)‹EH9r'HEHH;Et@@0@aHEHEȉHEHEȉHH[]UHH0H}HEHHHEHEHHEHEHHUHHrHEHEHEHPHEHH9t'HEHHHEHEHHEH}uUHH H}HEH(HHEH}HEHHuHEHEHHHEH}u HUHEHHHEHPHEHHHDHEHP HEH@ HHEHP HEHHEHEHǀHEHP(HEHHmagic == slab_magic && slab->order == orderslab->magic == slab_magicslab->order <= SLAB_HUGEslab->order == SLAB_HUGE || (((intptr_t) slab & ~(slab_order_size(slab->order) - 1)) == (intptr_t) slab && slab->size == slab_order_size(slab->order))slab->in_use == slab->order + 1order <= SLAB_HUGEError in munmap(): %s 0slab->order <= SLAB_ORDER_LASTslab->order > 0slab_buddy(slab) == buddy%s: incorrect slab magic, expected %d, got %d%s: incorrect slab size, expected %zu, got %zu%s: incorrect slab statistics, total %zu, factual %zu %s: incorrect order statistics, the total %zu is not multiple of slab size %zu %s: incorrect order statistics, the used %zu is not multiple of slab size %zu %s: incorrect totals, ordered %zu, huge %zu, total %zu %s: incorrect used total, total %zu, sum %zu slab_cache_checkslab_order_sizeslab_assertslab_set_freeslab_mergeslab_buddyPslab_orderslab_createslab_get_with_orderslab_mmapmunmap_checkedslab_splitslab_from_ptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.hsize <= (4294967295U)/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/small.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0size > alloc->step_pool_objsize_maxobjsize > alloc->step_pool_objsize_maxobjsize_max > objsize_min + STEP_POOL_MAX * STEP_SIZEsize <= pool->objsize && (size + STEP_SIZE > pool->objsize || idx == 0)0size <= pool->objsizesmalloc_nothrowfactor_pool_createsmall_alloc_createslab_orderfactor_tree_removefactor_tree_insertfactor_tree_prevfactor_tree_next_@?/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.horder <= SLAB_ORDER_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/mempool.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0slab->nfree0objcountmapsize * MEMPOOL_MAP_BIT >= objcountslab_size - objcount * objsize - mapsize * MEMPOOL_MAP_SIZEOF < objsize || mapsize * MEMPOOL_MAP_BIT == objcountslab->pool == poolslab_order_sizemempool_alloc_nothrowmempool_create_with_ordermslab_allocmslab_tree_removemslab_tree_insertmslab_tree_prevmslab_tree_next;\jPx<Dߎ0(PIpϏ"4F~0P͐p uJ@Փ`axӔ50ԖP6pC#o ܜ0Plx&w 8 PX x 0 \  8 X x ߼ a  M Ͽ g8 ` g  p8 X x  ) ; `  8 `  E  @`4 q@+`aF~(xPOx&[@(PzRx І*zRx SAC N $<sAC Ei d BAC } ,AC  HAC C Њ!AC \ ъGAC B ?AC z $SAC N DJAC M d<AC M .8AC s F%AC ` K*AC e U'AC b \AC P $QlAC g $DJAC E@ lAC  $*AC E ьAC  mAC  ٍAC R $Ѝ[AC GO <bAC ] zPLRxp@ $$%@AC } AC  |bAC ]  AC  AC  $kLAC G DAC  dAC  AC   AC  $AC Ez 'AC b  lAC g ,?AC P L4AC M l&QAC L W{AC v ^AC Y hAC c 8<AC 7  T<AC 7 ,pAC  L֝AC  l\AC  AC  r4AC / AC  CAC >  ?AC } ,AC  L:3AC . lMAC } AC  $'AC E $|@AC  :AC  պJAC E <AC  $wP@AC K $,@AC  0!AC \ 1GAC B X?AC z  wAC M , iAC M L [%AC ` l `*AC e  j'AC b $ qJAC E@  AC P  5AC p  {AC v 4 `AC [ T 8hAC c t ?AC :  ?AC :  AC   %AC   AC   3AC  4 `AC [ T AC  t DAC ?  AC }  )AC   6AC 1  AC }  ;cAC ^ 4 ~8AC s T 7AC r $t JAC E@ $ yAC Eo $ AC E $ AC E  ~AC  4 CAC > T hAC c $t SAC E $ Jf@X xYwz (FI QE@p@ p@ T~@``o`@ @@  `@x@0 o(@oof@`@@@@@@@@&@6@F@V@f@v@@@@@@GCC: (Debian 4.7.3-4) 4.7.3,@,Z @A,n/@&,y0U@'V @@int 0T3m t- .# /#)  v   0AOI#K# R{# Tb#(mVI#,\I#-C`x/ a{#b{# qr#ItO# ,(#bx# x  Ht ddt#_dt#P]t^#ffi`b#0bb#45 d#8 f#Hmapp#P|1A#x# 6#(t#b#hI#b#Bb#z  Xy6yt#xy#|yT]   gg#_g#7d5 g]# iz#o{# q# tt#xt#Ot w>xb###&#i#1A#Зo #ؗhI#ܗ z   rBB; X ;# # #T # #  #(J #0 #86 #@ #H #P #X #` #h/ ;#pm ;#t #x [# -# # #R &#7 /# 0# 1# 2# 3{# 5;# 7#   # #s ;#    C ] #' u l '@@ptrX @pos;l   z%@@`pos';X (;\ @   <@@O>;hi?;lG@_@ iI;l @  Y;_@@  `/ 1 ``L  `<  `bB @`@/@lint 0T3m wBt- .# /#)  v   0AZI#K# R# Tb#(mVI#,\I#-C`/ a#b# qr#ItZ# ,(#b#   rBB   X;###T## #(J#0#86#@#H#P#X $#` *#h/ ;#pm;#t#x[#-#0#@#R &#7/#0#1#2#3#5;#7F# $ $#*#s;# @  V `8@@8hB@@@OBhB`Z@O@ZhTbO@@6ObXZdho@@`jOoh@@h;@@ hf@#@IfhZ>#@M@88hM@t@@ h`t@@hI@@ ͆h a@   {@?@`EmI\U  @ U El5?@@ptr5Xm5IT @8{h:`   zA@ @ ,AX< 0@ <  , N @U!@1NhN` <@lWU!@!@1WhW`` !@!@@ `hbf!@S"@\ fXh `@m nS"@"@  nhmnId nX  l@,&x"@7#@` 6 xxF  @"@4#@buf{K  F 6 [ ?7#@T$@  mIL  @ `maphS XP    T$@$@ 8 h8  U@$@%@  1H@  @Ioc`X%@&@ 4 1ÓXPH4  J@h&@&@@  1ϓX&@&@iIo&@'@ ( 1ד`htmpH '@'@ ( Xk'@'@( P. m'@|)@  1HmID  @h8`(@(@( XF X%|)@\*@` B!1%X! %Pm(Io)@H*@+`"58\*@e,@ !18X!8PGh"de,@/@ !1d~fX/ gPhHzi@aj lm @,@,@lo( -@-@o( .@F/@8%.@-/@mI  % \@b#/*#/@U@int 0P3i w>zpp- .# /#)  v   0AaI#K# R# T^#(mVE#,\E#-C`/ a#b# qr#Ita# ,(#b#   Hp d%d#_d#P]^#ffi`^#0b^#45 d#8 f#Hmapp#P%|1S## H#(#^#hE#^#B^# # XyHy#xy%#|y# ^#^#^# ^# a#T   gg.#_g.#7d.5 g# i#o# q.# tYt.#xt#Ot4 w>x^###&.#iY#1S#Зo  #ؗhE#ܗ     S %668Y>7 m>"|  }  L # #7.#d/@0@  h`hE0@0@ C ͍hS @ IS  Ct0@0@@' 0@0@ h170@0@a1.hb1.`80@r1@` 7hY8.r1@1@d 7Xret7.h8.1@82@  7Xret7.h 8.82@t3@L 7H5 7.@ret7.h\ @2@X3@~7.`2@X3@cmp77\ I\ L 8.t3@4@  7H5 7.@ret7.h  @3@4@~7.`&4@4@cmp77\L 8.4@65@@j  7Xkey7.Pret7.hcmp77d 8.65@5@  7Hkey7.@ret7.h~7.`_5@5@cmp77\ 8.5@6@h  7Hkey7.@ret7.h~7.`6@X6@cmp77\ 86@2:@`  7o5 7.o 7 5 7.#cmp77#7 o7) h?  Ј@!7@7@" cmp77\7@9@4 7.`!7@8@ 7.P8@8@7.H<8@8@~7.@8@9@x7.8@9@7.I9@9@~7.: 7D  )  I? / b  82:@fH@$ 7n5 7.n 7 5 7.#cmp77#7$h! 7$`7*n: @!t:@5;@ cmp77L!;@<@7 : 7D K!<@>@[ 7.@!?@@@ x7. 7.~7.X!@@B@x7. 7.! A@BB@ ~7.BB@B@~7.B@ H@7.!B@KE@~7.Pt7. 7.~.C@6D@ 7.~!bE@F@7.~E@F@~7.~F@ H@7.~G@G@~7.~ : /  8.fH@I@  7X5 7.Pcb7Harg76@H@I@ret7.hx7.`"..6 8.I@_J@ 7H@ 7.@5 7.cb7arg76cmp77d!XI@I@ret7.hJ@]J@ret7.Px7.X8._J@J@& 7X@ 7.Pcb7Harg76@ret7.h 8.J@K@@ 7X5 7.Pcb7Harg76@K@K@ret7.h7.`8.K@L@ 7H@ 7.@5 7.cb7arg76cmp77d!K@XL@Rret7.hL@L@ret7.P7.Xd 8.L@OM@ 7X@ 7.Pcb7Harg76@ret7.h@ ;.OM@N@`|L ;Hv <.@ =| p@Hh I` U.X/ - `N@}Q@L `H1`S@a^Ha^i b  @ pX7.P/ 6}Q@JS@ L ~ ~ h `@!Q@uR@idx7\PXuR@S@ ~v .` I  JS@T@zL ϳHptr6@цh `S@T@7.X  T@OT@ithL `|S OT@T@@itXT@T@ h#? T@7U@b$L H%it|P&  h#C7U@U@$L $'cb$6%it|P& hzU@U@&IYaq2 U@}@; ;int0p3 w)z;- .# /#)  v   0AaI#K# R0# T~#(mVe#,\e#-C`/ a0#b0# qr#Ita# ,(#b#   H;J   dBd#_d#P]^#ffi`~#0b~#45 d#8 f+#Hmapp1#PB|+1p## e#(#~#he#~#B~# @ Xyey#xyB#|y@ ~#~#~# ~# a#)m`8U@V@`8hBV@XV@]OBhB`ZXV@V@ ZhoV@V@OohV@V@hfV@V@@%If%ha>V@ W@[[h0 W@1W@ 0h0`1W@{W@`me\ @  t0{W@W@ #BW@W@ blhs#hrhs#`! ,W@@X@ ,he ,@X@X@ ,Xret,h ,X@Y@@ ,Xret,h ,Y@GZ@ ,H5 ,@ret,h p@{Y@+Z@~,`Y@+Z@cmp,B\ ,GZ@[@n ,H5 ,@ret,hn `@Z@j[@~,`Z@j[@cmp,B\M ,[@ \@` ,Xkey,Pret,hcmp,Bd , \@\@Q  ,Hkey,@ret,h~,`6\@\@cmp,B\0 ,\@[]@   ,Hkey,@ret,h~,`\@1]@cmp,B\ Z ,[]@a@  ,o5 ,o ,5 5 ,#cmp,B#, o, h  @@!]@x^@ cmp,B\^@`@4 ,`!^@_@ ,P^@_@,H_@_@~,@_@`@x,_@`@,)`@`@~,: ,      b  ,a@to@ ,n5 ,n , 5 ,#cmp,B#,h! ,`,n  @!Va@b@{ cmp,BL!{b@c@ : , K!c@d@ ,@!f@g@ x, ,~,X!g@i@ x, ,!g@;i@] ~,;i@i@~,i@o@,!i@Ql@~,Pt, ,~+j@9k@ ,~!hl@m@H,~l@m@~,~m@o@,~n@o@~,~    ,to@+p@@ 3 ,X5 ,Pcb,MHarg,@o@)p@ret,hx,`"M###30 ,+p@oq@ " ,H@ ,@5 ,cb,Marg,cmp,Bd!gp@p@ret,hq@mq@ret,Px,X ,oq@q@! ,X@ ,Pcb,MHarg,@ret,hR ,q@r@`! ,X5 ,Pcb,MHarg,@$r@r@ret,h,`| ,r@s@! ,H@ ,@5 ,cb,Marg,cmp,Bd!r@js@ret,hs@s@ret,P,X ,s@ct@ "U ,X@ ,Pcb,MHarg,@ret,hl /ct@t@"/h /+`M :t@t@":h Bt@5u@@# BhidxB~dC I~5u@u@#LI`ptrIXF Tu@v@$TH  @idxW~\     sv@x@`$" s+Hs@ptrsidxu~\u v~X  x@z@$ +1p~me @ 0H0XB0P    z@0{@ %e +HehtmpeP!z@z@Dk`{@#{@kXq_ 0{@s|@% +Xʣh Ќ@   r s|@|@%/ +XobjPh  |@}@@&n +XInPv% $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  : ;  : ; I8 !I  : ;I8 : ; .: ; ' @B : ; I 4I4  4: ; I &I.: ; I@B 4: ; I .: ; @B .? : ; @B .? : ; I@B !I/4: ; I? < 4: ; I?  % $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  &I : ;I8 : ; .: ; ' @B : ; I .: ; ' @B .: ; ' I@B 4: ; I .: ; I@B .: ; ' I@B 4I4  .? : ; ' I@B : ; I  4: ; I .? : ; ' @B  4: ;I .? : ;' I@B !: ;I ".? : ;' @B #4: ; I? < % $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  : ;  : ; I8 !I' I &I.: ; ' I@B : ; I .: ; ' I@B 4I4  .: ; I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B  4: ; I .? : ; ' @B ! "' I#.? : ;' @B $: ;I %4: ;I &4: ;I ': ;I % $ > : ; I$ >  : ;  : ; I8  I : ;  (  : ;  I !I/  : ;  : ; I8 !I .: ; ' @B : ; I .: ; ' @B .: ; ' I@B .: ; ' I@B 4I4  &I.: ; I@B : ; I .? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B  4: ; I .? : ; ' @B ! "' I#Ih /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/usr/include/x86_64-linux-gnu/bitssmall_alloc.cstdint.hstddef.hrlist.hslab_cache.hmempool.hsmall.htypes.hlibio.hstdio.h @/A.A@233fv!<Lu"!Y'yJ2>J=1KؠI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hslab_cache.cstdint.hstddef.htypes.hlibio.hstdio.h @85./!2K5..<tYQ..+.3K.uwǯ3fY~tfLK2(yK2K!221Kfɭ2h@f .u0vKYK2v2YYyK2= [!K2gJh!2w 2fvY=u;2w.X <gK/K .uY;h!3-[/,Ks=LK.2ɃLH,LGL1QhtH/M")H(L)H(nJW3LH/LhW"~ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sysslab_cache.hmempool.hsmall.cstdint.hstddef.hrlist.hsmall.htypes.htypes.h /@.uwǯ.K.~.uttsZ0s<ff".<X   J f  f<.X    f t fffJf  ff f2ffX t  . eCJ <1. )2f%f.X   X3#.$.f0 ."#!T%&'),*+f-2./G0123f,04267.89f50(q:L</=>?@uAB.CDf;0EfG%IJKLH3F6M%O}PXQRN0Sf$XU<V'.t-f0ft.4(f,0 ft.tt(ft5f+ft.<f$+ ft.tt(m=tZ$/K5//)۫FnYו1(8e/YY!=tv">X=,JIu=JY."3LZ .2I(hY31/hu[10/Kg7m y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sysrlist.hslab_cache.hmempool.hmempool.cstddef.hstdint.htypes.htypes.h U@85./!..c..+.(.fYtK.3sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt(j)33&32x+/v+fLCxKY7g9+vyfu $t/Y"x"VJ'2=u/8h׻2"g2*'_shortbuf_IO_lock_tSLAB_MAX_SIZEOBJSIZE_MAXstderr_IO_buf_endmapsize_IO_write_end_flagsrbn_right_red_flags2OBJECTS_MAX_markersrbn_leftoscillationnext_in_listslab_listuint32_t_IO_save_endallocatingGNU C 4.7.3floatobjsize_minsmall_alloclong long unsigned int_IO_backup_baseorders_fileno__pad1step_pool_objsize_max_IO_read_base_Boolslab_order_posrbt_nilSLAB_MIN_SIZESTEP_POOL_MAXnfree_mode_IO_markermbitmap_tspare_IO_read_ptrFACTOR_POOL_MAXuint8_tSLAB_MIN_SIZE_LB_IO_write_baselong long intmempool_IO_save_baseslab_cachefactor_poolsmall_statsfactor_tree_tOBJSIZE_MINfactor_poolsSLAB_HUGEbasic_alloc_streakin_use__pad2__pad3__pad4__pad5seed_vtable_offsetmslablong doubleSLAB_ORDER_LAST_IO_read_endITERATIONS_MAXshort intstep_pools/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitallocatedOSCILLATION_MAXmslab_tree_tnext_in_cacherlistrbt_rootsmall_alloc_basic_locksizetypeptrs_old_offset_IO_FILEobjsizeunsigned char_sbuf_IO_write_ptrfree_slabsobjcount/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/small_alloc.c__off_talloc_checkedfree_checkedshort unsigned intmain__PRETTY_FUNCTION____func__total_chainfactor_pool_nextfactor_pool_cache_cur_column__off64_t_unused2_IO_buf_basemunmap_checkedslab_putslab_list_createheadrlist_shiftrlist_createslab_get_with_orderslab_mmaprlist_nextslab_mergeslab_cache_checkslab_splitslab_cache_destroypoison_charslab_cache_createslab_is_free__mptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab_getdont_panicslab_from_ptrslab_assertslab_buddyrlist_emptynew_orderslab_poisonrlist_addsmall_stats_resetmergedrlist_firstslab_magicslab_size_alignlengthorderedslab_set_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/smallnew_sizeslab_set_usedhugeaddritemslab_order_sizerlist_delalignmentslabsizetotalsuintptr_tfactor_tree_insertcb_ctxobjsize_min_lbpathfactor_tree_firstleftleftpathpmslab_sizeof/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/small.cleftrighttnodesmfreesmalloc_nothrowfactor_pool_cmp__ssize_tfactor_tree_newfactor_tree_lastfactor_tree_reverse_iter_startfactor_tree_iterfactor_tree_searchfactor_tree_psearchsmall_alloc_createfactor_pool_createmempool_iterator_nextalloc_factorupper_boundfactor_tree_reverse_iter_recursemempool_statsunodeleftrightleftpatternrbtreeSTEP_SIZEfactor_tree_iter_recursestep_poolprevsizefactor_tree_iter_startnodepmempool_usedcnodetredsmall_alloc_destroymempool_stats_cbfactor_tree_reverse_iterSTEP_SIZE_LBfactor_tree_nsearchfactor_tree_removefactor_tree_prevslabcountmempool_iteratormempool_iterator_createfactor_tree_nextmslab_tree_lastmslab_cmpMEMPOOL_OBJ_MINmslab_tree_psearchmslab_idxmslab_tree_searchmempool_alloc_nothrowbit_nomslab_tree_reverse_iter_startmslab_tree_nextmempool_destroymslab_tree_reverse_itermempool_create_with_orderMEMPOOL_MAP_BITmslab_freemslab_objmslab_tree_itermslab_tree_newmslab_tree_iter_startmslab_allocmslab_tree_reverse_iter_recursemempool_freemslab_tree_prevmslab_tree_removemslab_tree_iter_recursemslab_tree_firstMEMPOOL_MAP_SIZEOFmslab_tree_nsearchslab_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/mempool.cmslab_offsetmslab_tree_insertmslab_createwwRvRSwSTwTWwWvwwwvw w  w vwwwvwww v !w!"w"%w%gvghwhiwilwlvwwwvwww v  w  w wvww"w"UvUVwVWwWZwZzvz{w{|w|wvwwwvwwwvwwwLvLMwMNwNQwQvwww!v!"w"#w#&w&vwwwvwww8v89w9:w:=w=OvOPwPQwQTwTvwww v  w wwvwwwvwww v www v  w  w  w v w w w F vF G wG H wH K wK v w w w v w w w v w w w vwww@v@Awww&v&'w'(w(+w+vwwwvwwwvwww v  w  w wvwwwvwwwKvKLwLMwMPwPvwwwvwwwIvIJwJKwKNwNvwwwvwwwE vE F wF G wG J wJ yvyzwz{w{~w~/v/0w01w14w4rvrswstwtwwwvwwwvwwwvwwwbvbcwcdwdgwgvwww!v!!w!!w!!w!]#v]#^#w^#_#w_#b#wb#$v$$w$$w$$w$b$vb$c$wc$d$wd$g$wg$$v$$w$$w$$w$J%vJ%K%wK%L%wL%O%wO%&v&&www v !w!"w"%w%gvghwhiwilwlvwwwvwwwvwwwvwwwvwww@v@AwABwBEwEvwwwvwwwvwwwOvOPwPQwQTwTvwwwvwwwVvVWwWXwX[w[vwwwvww!w!vwwwjvjkwklwlowo# v# $ w$ % w% ( w( vwww:v:;w;<w<?w?~v~wwwvwwwvwwwvwwwrvrswstwtwwwvwww v wwwDvDEwEFwFIwIvwww!v!!w! !w ! !w !"v""w""w""w"$v$$w$$w$$w$?%v?%@%w@%A%wA%D%wD%&v&&w&&w&&w&&v&&w&&w&&w&'v''w.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @V @ ^of@fko(@(Pzx@x0@ p@p@@@fT~@T~ `~@`~ @\@ @5``````` `Ģ 0Ģ)F5KCO0 y Z &>ePI$ _ @@<@`@@ @f@(@ x@ @ p@ @ @T~@`~@@@@```````` ! ` @. 0@A p@W`f` @``@ @S@  @s@  @B @.; @!H @GR @?\ O@Sh @t @ @8 @% #@* M@' t@ @la@  @J @\@"@; @G0@ ` @n<@ U!@ !@ !@[`@ S"@bl@  "@@  7#@@ / T$@b:U@ S $@ ^@ w %@J@ @@ /@' 0@l@  0@ 0@ 0@Q@ @&Ј@?@X OM@kp@@`@; U@!H V@GR XV@?h V@t V@ V@% V@* W@' 1W@J@ {W@ W@5p@`@@@ @. ct@c; t@7E 5u@JO @ h@Ќ@@`````Ȣ`` P~@  W@{/A`L _J@]p  ` L@ 65@ K@3 OT@ ?@% e,@6Ģ`= 0@{M u@yYT~@_ T@Jw \@ a@` oq@ J@ 6@@` v@ I@C6J |)@Sr JS@ t3@< 5@```  \@ &@L  z@ `~@,  '@@ R  82@<c  }Q@s  s@   1@h  p@  }@  s|@h   4@, `2 a7  @>  x@X  r@6v  |@  r1@^ Ģ`   _@H  to@  t@8  []@   fH@  q@?  T@PS  \*@ \  @n  N@  [@  0{@C  2:@4   GZ@?  X@h   @X@`1  p@7  7U@C  &@V h  +p@D~ `  Y@?crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrysmall_alloc.cptrsfree_checked__func__.3832alloc_checked__PRETTY_FUNCTION__.3838basic_alloc_streak__func__.3849slab_cache.crlist_createrlist_addrlist_delrlist_shiftrlist_firstrlist_nextrlist_emptysmall_stats_resetslab_list_createslab_size_alignslab_sizeofslab_order__PRETTY_FUNCTION__.1752slab_order_size__PRETTY_FUNCTION__.1756slab_magic__PRETTY_FUNCTION__.3149slab_assert__PRETTY_FUNCTION__.3155slab_set_free__PRETTY_FUNCTION__.3160slab_set_usedslab_is_freeslab_poisonpoison_char.3171slab_create__PRETTY_FUNCTION__.3177munmap_checked__PRETTY_FUNCTION__.3183slab_mmap__PRETTY_FUNCTION__.3187slab_buddy__PRETTY_FUNCTION__.3195slab_split__PRETTY_FUNCTION__.3200slab_merge__PRETTY_FUNCTION__.3209__PRETTY_FUNCTION__.3235__func__.3272small.cmslab_sizeofmempool_usedfactor_pool_cmp__PRETTY_FUNCTION__.2816__PRETTY_FUNCTION__.2829__PRETTY_FUNCTION__.2872__PRETTY_FUNCTION__.2904factor_pool_create__PRETTY_FUNCTION__.3001__PRETTY_FUNCTION__.3014__PRETTY_FUNCTION__.3029mempool.cmslab_cmp__PRETTY_FUNCTION__.2761__PRETTY_FUNCTION__.2774__PRETTY_FUNCTION__.2817__PRETTY_FUNCTION__.2849mslab_createmslab_objmslab_idx__PRETTY_FUNCTION__.2959__PRETTY_FUNCTION__.2977__PRETTY_FUNCTION__.3000__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finimslab_tree_newfree@@GLIBC_2.2.5allocatingfactor_tree_iterabort@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startfactor_tree_reverse_iterfactor_tree_nsearchfactor_tree_reverse_iter_startmempool_iterator_nextslab_from_ptrslab_cache_check_edatafactor_tree_newmslab_alloc_finimempool_iterator_createmslab_tree_nsearchmslab_tree_removemslab_tree_iterfactor_tree_reverse_iter_recursefactor_tree_insertprintf@@GLIBC_2.2.5seedmslab_free__assert_fail@@GLIBC_2.2.5factor_tree_iter_startmemset@@GLIBC_2.2.5slab_get__libc_start_main@@GLIBC_2.2.5srand@@GLIBC_2.2.5smfreefactor_tree_prevfactor_tree_psearch__data_startcachefprintf@@GLIBC_2.2.5__gmon_start__mslab_tree_psearchslab_cache_createmempool_destroy_IO_stdin_usedslab_get_with_ordertime@@GLIBC_2.2.5factor_tree_nextsmalloc_nothrowmslab_tree_reverse_iterstrerror_r@@GLIBC_2.2.5factor_tree_lastmmap64@@GLIBC_2.2.5__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmempool_freemalloc@@GLIBC_2.2.5factor_tree_searchalloc_end_startmempool_create_with_ordermslab_tree_reverse_iter_startmempool_statsfactor_tree_first__bss_startmunmap@@GLIBC_2.2.5mainmslab_tree_iter_recursemslab_offsetmslab_tree_insert_Jv_RegisterClassesfactor_tree_iter_recursemslab_tree_reverse_iter_recursesmall_alloc_destroyslab_putsmall_alloc_basicsmall_alloc_createmslab_tree_searchmempool_alloc_nothrowfactor_tree_removeexit@@GLIBC_2.2.5_ITM_registerTMCloneTablemslab_tree_prevmslab_tree_last_Unwind_Resume@@GCC_3.0mslab_tree_first_initsmall_statsslab_cache_destroyrand@@GLIBC_2.2.5mslab_tree_iter_startstderr@@GLIBC_2.2.5mslab_tree_nexttarantool-1.5.1.218.g1a69fd6/test/unit/rope_stress.c0000664000000000000000000000311112202131537020422 0ustar rootroot#include #include #include "unit.h" #include "rope_common.h" static char *data[] = {"a", "bc", "def", "ghij", "klmno"}; static void test_rope_stress_small() { header(); struct rope *rope = rope_new(str_getn, NULL, mem_alloc, mem_free, NULL); const int iterations = 500; int i = 0; for (i = 0; i < iterations; ++i) { char *d = data[((rsize_t) rand())%5]; int len = strlen(d); rsize_t size = rope_size(rope); rsize_t offset = ((rsize_t) rand()) % (size + 1); rope_insert(rope, offset, d, len); fail_unless(size + len == rope_size(rope)); rope_check(rope); size = rope_size(rope); offset = ((rsize_t) rand()) % size; if (offset == size) offset--; rope_erase(rope, offset); fail_unless(size == rope_size(rope) + 1); rope_check(rope); } rope_delete(rope); footer(); } static void test_rope_stress_large() { header(); struct rope *rope = rope_new(str_getn, NULL, mem_alloc, mem_free, NULL); const int iterations = 50000; int i = 0; for (i = 0; i < iterations; ++i) { char *d = data[((rsize_t) rand())%5]; int len = strlen(d); rsize_t size = rope_size(rope); rsize_t offset = ((rsize_t) rand()) % (size + 1); rope_insert(rope, offset, d, len); fail_unless(size + len == rope_size(rope)); size = rope_size(rope); offset = ((rsize_t) rand()) % size; if (offset == size) offset--; rope_erase(rope, offset); fail_unless(size == rope_size(rope) + 1); if (i % 1000 == 0) rope_check(rope); } rope_delete(rope); footer(); } int main() { srand(time(NULL)); test_rope_stress_small(); test_rope_stress_large(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/base64.test0000775000000000000000000004567612213333045017724 0ustar rootrootELF>@@86@8@$!@@@@@@@@@ ```p ``@@DDPtd@@Qtd/lib64/ld-linux-x86-64.so.2GNU GNUK4^m8U] ! , @ BEj Cֻ| : K2bqXj|9 ew` i~ p, d@ ``` `@@ @ @` u @> @w` 0@4@ @r P@A_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTablelibc.so.6exitstrlenmallocstderrfprintfstrcmp__libc_start_mainfree__libc_csu_fini_edata__data_start_IO_stdin_used__libc_csu_init_endbase64_encode__bss_startbase64_decodeGLIBC_2.2.5Zui `````````` ` HH HtH5 % @% h%z h%r h%j h%b h%Z h%R h%J hp%B h`1I^HHPTI0@H@Hu @w`UH-`HHw]øHt]``UH-`HHHH?HHHu]úHt]`= uUH~] @H=8 tHtU`H]{vUH}E VUUU)ȃEEHG98)ȉEEU]UHSHHH}Ⱦ&@H@.HEHEEqEEHHUHEEHHAHE؋MHUuHEH}EHEHUHcH9tAHv H$&@AAX@@@@HǸEXHEHZHUHEHfHUHEHHctAH H$&@AAX@@@@HǸ8^HEHHEH&@@HH[]UHH}Hu'@c(@Y0@O@EÐUHH}HEHE@HE@]UHEEE}@v= E@]UHHPH}ȉuHUMLEEHcHEHHEHEHEHEHEEHcHEHHEHE@EHEr HEH;Et HEH;Er+HEUPHEHUHEHH)HHEEHEE%EEHEHEE׃EHEH;Et HEH;Er+HEUPHEHUHEHH)HLHEEHEE%EEsHEHEE׃EHEH;EtHEHH;Er+HEUPHEHUHEHH)HHEEHEE%EEHEHEE׃?EEHEHEHE@PHEPHE@H‹EUHEEEm+}x;E} EH`@]UHH}HEHE@]UHHPH}ȉuHUMLEHEHEEHcHEHHEHEHEEHcHEHHEHEPHEHEr HEH;Et HEH;Er.HEHEHEPHUHEHH)HHEHEE߀}xEHEHEH;EtHEHH;Er.HEHEHEPHUHEHH)HaHEHEUE߀}xHEU߃0 ʈHEEHEHEH;EtHEHH;Er.HEHEHEPHUHEHH)HHEHEE߀}xHEU߃< ʈHEEHEHEH;Et HEH;Er+HEHEHEPHUHEHH)HLHEHE@E߀}xHEM߃? ʈHEHUHEHH)HUHH(H}uHU؉MHEH$H}MHU؋uHEIH#ÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH *** %s *** /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/base64.cfalsestrlen(base64_buf) == resTest failed: %s is %s at %s:%d, in function '%s' strcmp(str, strbuf) == 0 *** %s: done *** aSomething that doesn't fit into a single line, something that doesn't fit into a single line, something that doesn't fit into a single line, something that doesn't fit into a single line, something that doesn't fit into a single line. base64_testP>?456789:;<=  !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/;q4TtTL4T,|zRx *zRx UAC P $<AC Ez dU>AC y t'AC b {)AC d AC  YAC T &rAC m $x>AC y DAC W dAC  AAC | $@Jf@Xp @P @Z @ 4@``o`@h@@  `@@0 o@oo@`&@6@F@V@f@v@@@@GCC: (Debian 4.7.3-4) 4.7.3, @,3 @/0 @ @z%intb^I^/Bu| RW# # o# # # D#( ;#0 Y#8 #@ #H j#P #X f #` [ #h S W#p W#t e#x 4# I# # # &p# /# 0# 1# 2# 3# 5W# 7#  # # W#  {|  {z+W @ @<+W\'-Wl2.Wh| @u @`str &@len W\6 WX PHresWD  { Wu @ @"Wl`'@ @@'HELS2 )H*)#++#,#int;H#+#m0 @ @   $0 h H 8 @ @h [8\ : @ ;l xx@hB @@P $BP B bC[ ZC $D  FaP GPh H[` *I[H +J_ 2KG V P@@@ b[X ZT $ H [h *[`@X@M $PX T b[H ZP $H`resl MX@@ [\  `@ V @@ Ɇl xO@@` $h a@P@ P ؆ [ Zن $ Ph PX [` *[P 2OuP@@ PXT [HZ P$"`% $ > $ > : ; I  I&I : ;  : ; I8 : ;I8 : ; I !I/ .: ; ' I@B : ; I 4: ; I .: ; ' @B : ; I 4I4  4: ; I .? : ; ' I@B 4: ; I? < %  : ; (  : ;  : ; I8 $ > $ > .: ; ' @B  : ; I  I .: ; ' I@B  4: ; I I!I/ &I.: ; ' I@B .? : ; ' I@B 4: ; I .? : ;' I@B : ;I 4: ;I > /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/include/x86_64-linux-gnu/bits/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebase64.hbase64.ctypes.hstddef.hlibio.hstdio.h  @+u$W.>>fA&fA=w域wf /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partybase64.c  @02ugu4."W ZuZu׭Zuz$/[3/Y׻0Y׻0"//u3Z.. uKfu24+Zg؟Zg؟Zg0gg[5Z_flags2strbuf_IO_FILE_IO_save_endshort intsize_tbase64_buflen_IO_write_ptr_flags_IO_buf_base_markers_IO_read_endbase64_teststderrlong long int_lock_cur_column/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/base64.cargv_sbuf_old_offsetunsigned charargcdatasize/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitlong long unsigned int_IO_marker_shortbufGNU C 4.7.3_IO_write_base__pad3_IO_read_ptr_IO_buf_endmainbinsize_next__pad1__pad2base64_buf__pad4__pad5__func__short unsigned intnewlines_IO_write_end__off64_t_fileno_chain__off_t_IO_backup_basebase64_bufsize_mode_IO_read_basesizetype_vtable_offset_unused2_IO_save_base_IO_lock_tencodingin_base64base64_encode_blockendcodeposin_posin_endbase64_decodestateout_endfragmentbase64_decodestepbase64_decode_valuebase64_decode_blockbase64_decodedecodingbase64_decodestate_initout_binbase64_encodestepdecoding_sizeout_pos/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/base64.cin_binresultbase64_encodestatestep_Astep_Bstep_Cout_lenout_base64base64_encodestate_initbase64_encodebase64_encode_valuestepcountin_lenbase64_encode_blockstep_astep_bstep_cstep_dwwTvTUwUVwVYwYvwwwvwww&v&'w'(w(+w+OvOPwPQwQTwTvwww1v12w23w36w6vwwwvwwwvwwwvwwwvw.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`hN @Vh@h ^o@8ko@ z@0@ @@@ 4@4 @@@ @@`````````0`|^ #%1g(=0w+H_04S8?#B G@@<@`@@h@@@ @ @ @ @ @4@@@@@````````  ` @.  @A P @W`f` p @` @U @&@  @' @)@A$  @8 @YO X@>c@@v`@P @ @@```````& 0@6H d `o`v4@|` @@ @';`@ @G @rU`a u @>f z  @ P@A`crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrybase64.cbase64_bufsizebase64_test__func__.3590base64_encodestate_initbase64_encode_valueencoding.1604base64_encode_blockbase64_encode_blockendbase64_decode_valuedecoding_size.1654decoding.1653base64_decodestate_initbase64_decode_block__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_start_edata_finistrlen@@GLIBC_2.2.5printf@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_startstrcmp@@GLIBC_2.2.5fprintf@@GLIBC_2.2.5__gmon_start___IO_stdin_used__libc_csu_initmalloc@@GLIBC_2.2.5_end_startbase64_encode__bss_startmain_Jv_RegisterClassesexit@@GLIBC_2.2.5_ITM_registerTMCloneTable_initbase64_decodestderr@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/test/unit/rope.c0000664000000000000000000000334512202131537017030 0ustar rootroot#include #include "unit.h" #include "rope_common.h" static void test_rope_extract(struct rope *rope, rsize_t pos) { printf("extract pos = %zu: ", (size_t) pos); struct rope_node *node = rope_extract_node(rope, pos); rope_check(rope); str_print(node->data, node->leaf_size); printf("\n"); } static inline void test_rope_cut(struct rope *rope, rsize_t offset, rsize_t size) { printf("erase offset = %zu, size = %zu \n", (size_t) offset, (size_t) size); while (size-- > 0) rope_erase(rope, offset); rope_pretty_print(rope, str_print); rope_check(rope); } static void test_rope() { struct rope *rope = test_rope_new(); test_rope_insert(rope, rope_size(rope), "who's gonna be"); test_rope_insert(rope, rope_size(rope), ""); test_rope_insert(rope, rope_size(rope), ", Mr. Black"); test_rope_insert(rope, rope_size(rope), ", but they You got four of "); test_rope_insert(rope, rope_size(rope), "special> don't know each other"); test_rope_insert(rope, -1, ", so nobody wants to back."); test_rope_insert(rope, rope_size(rope) - 1, " down"); test_rope_insert(rope, -1, ""); test_rope_cut(rope, 0, 5); test_rope_cut(rope, 0, 9); test_rope_cut(rope, 179, 7); test_rope_cut(rope, 173, 1); test_rope_cut(rope, 58, 7); test_rope_cut(rope, 63, 10); test_rope_cut(rope, 79, 25); test_rope_cut(rope, 25, 5); test_rope_cut(rope, 126, 5); test_rope_extract(rope, 0); test_rope_extract(rope, 5); test_rope_extract(rope, 19); test_rope_extract(rope, 59); test_rope_extract(rope, 124); rope_delete(rope); } int main() { test_rope(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/slab_cache.c0000664000000000000000000000115212202131537020121 0ustar rootroot#include "lib/small/slab_cache.h" #include #include #include #include #include "unit.h" enum { NRUNS = 25, ITERATIONS = 1000, MAX_ALLOC = SLAB_MAX_SIZE + 9999 }; static struct slab *runs[NRUNS]; int main() { srand(time(0)); struct slab_cache cache; slab_cache_create(&cache); int i = 0; while (i < ITERATIONS) { int run = random() % NRUNS; int size = random() % MAX_ALLOC; if (runs[run]) { slab_put(&cache, runs[run]); } runs[run] = slab_get(&cache, size); fail_unless(runs[run]); slab_cache_check(&cache); i++; } slab_cache_destroy(&cache); } tarantool-1.5.1.218.g1a69fd6/test/unit/rope_avl.test0000775000000000000000000007660512213333046020444 0ustar rootrootELF> @@c@8@&#@@@@@@@@@Y/Y/ 00`0` 00`0`@@DDPtdp(p(@p(@<<Qtd/lib64/ld-linux-x86-64.so.2GNU GNU_YcGe leT T@D!#$$$Fik|qXK| j C!$/CE uZb3b/ Y : {{R + : N h @ @%@R @ @L x @w2`3%@`2` >@&2` @wP @2` %@  @Z @B %@, @e $@v( 2` @!libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6putsputcharabort__assert_failstrlenmalloc__libc_start_mainsnprintffree__libc_csu_finirope_iter_next_edatarope_iter_startrope_check__data_start_IO_stdin_used__libc_csu_initrope_traverse_endrope_pretty_print__bss_startrope_insertrope_eraserope_extract_noderope_clearGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui 1` 2` 2`(2`02`82`@2`H2`P2` X2` `2` h2`p2` x2`HHu' HtH5b' %d' @%b' h%Z' h%R' h%J' h%B' h%:' h%2' h%*' hp%"' h`%' h P%' h @% ' h 0%' h 1I^HHPTI%@H%@H@2`UH-2`HHw]øHt]2`2`UH-2`HHHH?HHHu]úHt]2`=i& uUH~]V& @H=# tHtU0`H]{vUHH}HuHUHMLELMHEHHEHUHPHEHUHPHEHUHP HEHUHP(HEHUHP]UHH@H}HuHUHMLEHUHEؾ0HHEH}u*LEH}HMHUHuHEMIH5HEUHHH}HEH*HEH@(HUHRHMHHUHH}HuHUHMHEHUH]UHHH}HuHEHUƿ%@CUHHH}HuHEHUHHH}HuHEHUHA @ @s @]UHH H}uHUEHUHƿ%@HEHHUuHEH HE @H HEHUHH&@%@XIHEHE%@HTHE%@H>HE%@H(HE%@HHE%@HHE%@HHE%@HHE%@HHE%@HHE%@HHE%@HxHEH&@%@8UH]ÐUHH}H}t HE@]UHHH}HEHHUHH}HuHEHUH]UHH}H}tHE]UHSHH}HEH@HpHEH@ H^HE@HEPHEH@HHEH@ H~9~HEH@HjHEH@ HUHUH[]UHH0H}HuUHEH@ HUHR(HHEH}uNHEHEU܉PHEPHEPHEHUHPHEH@ HEHP HEHPHEUHH H}HEHHEgHEH@Hu*HEH@ HEHEH@(HUHRHMHH(HEH@HEHEHP HEHPHEHUHP HEHEH}uHEHUHH0H}HuUHE@EHEU܉PHEH@M܋UHuHvH}HHEE܋U)HMHEHHwUHH H}u}HEHcHHDHE}HEUHcHHTHEHcHHTHEUHcHJHUHTHEH[HEHOHEUHSHH}u}؃}Ѓ}HEHcHHDH)HHEHcHHTUHEHH[]UHSHXH}HuUYHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEH?EHEH0EЋE9EMEЍPHEE;EEЋUԉ)ȃHEUHcHHDHEȃ}HEHcHHDHEHEHEHEHEE;E|$HEH}HEHH"HEH}HEH0HE;Et m}tHEH;EHX[]UHSHPH}HuBHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEHEHEHEЋE9EMEЍPHEEЋUԉ)ȃEЋUԉ)ȃHE؋UHcHHDHEȃ}HEHcHHDHEHEH%EHEHEE;EHEHUHEH9HHEHUHEHHHEH;EHP[]UHH8H}HuHUHEЋEHEHHHEHEPHEHEPHEH@HEE;EsHEHEHPHEH0E)EHE@;Ew3HE@)EHEHEHP HEHHEHHHjHEЋUHEUHH}uUHEHHHEHEEHHHHEHHPHEHPHEHHHEHEPEHEPHE}HHHHEHHPHEHHEHHHuHE]UHHHhdHX`HhH‹d9sHhHd`ub(@V0&@v&@`HXHhHHkHEH}u HhHp`HdHpHHHEHEHHHdtqdHEHHHhHH HEH}u HEHUHPHEPHEHEPHE@HEPHEHEHE@‹dHEHHEHEHHUHHEHMHpHHHUHHHxtHxH‹t9wP(@0&@{&@HxHHtHHHEHEtuHEHHtHEHHHxHHHEH}uLHE@HEHHEHEHHUHHEHMHHHHEHUHSHH84H8H‹49w:(@0&@{&@H8H@H4H@HHH!HEHEHHHEHE@4uTH8H@HURHMHqH8HyHHEHPHE@PHEPHE@EH8H@4HURHuHvH8HHE4HEPE̍P49u ?H8H@4M̉)ӉډH8HyHuHE4Ủ)ȍPHMH8HHSHEH}u HE@HEHxHEHEHHUHHEHMH@HHz4t:(@0&@&@HEH@HHEH@ HHEHEHEH@ HEH@9E܋MHEHHHEHEHHHEHEHPHEHPHEPHEЉPHEЋUHcHHDHE5HEЋPHE@)HEЉP}HEHcHHDHEHEH;EuHEH@HEHEHHUMHcHHTHH8H@(HMH8HHHUH@HHHH[]UHH}2HEH@HPHEH@HH@HHEH@HPHEHPHEH@HH@Hu]UHHH}HEHPHEHPHEH@HUHHHHEH@HHt HEHaHEH@HUHHH}HEH@HH@ Ht@HEH@HPHEH@HH@ HHEH@HPHEHPHEHbHEH@HUHH9uHEH@HBHEH@HPHEHPHEH@HHHEH@HH@ H9tHEH@HUHHHhH`HhHpHHHpHHE3HE@HEHPH`HHHpHHEH}uHUHATSHHXHXH`HHTH`H HEHE@u/(@W0&@&@HEXHEH@HAHEH@ HAHE@9t/(@Z0&@&@HEHEH@HAHEH@ HA9~HEH@HHEH@ H9t/(@]0&@ '@UHE@HEXHEH@HAHEH@ HAHE@9uZHEHEH@H AHEH@ HA9~HEH@HHEH@ H9t\H`HHEH}NHĠ[A\]UHSHXH}HuHUMHE'@HE'@HE'@HE'@HEHHEH؃EEH]HEH}tpHEH@Hu HEH@ HtV}HHLEHUHEIHѺ'@HǸHEH@HUHuH EHHLEHUHEIHѺ'@HǸ`EHHTHEHƿ'@0H}u'@HEHE@Hƿ'@HE@HEHPHEHHп(@H}t7HEH@Hu HEH@ HtHEH@ HUHuH2HEH8HHX[]UHHH}HuHEHZHƿ(@GHUHEHHA,(@ HEHHu.(@H ÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI11Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH%.*sinsert offset = %zu, str = '%s' *** %s *** 12<0>*p *** %s: done *** test_avl_rotations/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.csizeoffset < rope_size(rope)offset == 0node->leaf_size != 0node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_sizenode->height == (((rope_node_height(node->link[0])) > (rope_node_height(node->link[1])) ? (rope_node_height(node->link[0])) : (rope_node_height(node->link[1]))) + 1)┌──└──│ %s%snil{ len = %zu, height = %d, data = ''}size = %zu string = ''rope_checkrope_eraserope_extract_noderope_insert;<&Xa$O(mHhZp(Hh  8` Mn8"`t*.8X zRx *zRx leAC ` <lAC g \6AC q |!AC \ +AC f AC Y AC Y %AC `  lAC g <l>AC 9 \AC P |AC Z AC X |AC T uAC Y $sAC E $AC  DWAC  dhAC c AC  $sAC Ei $AC E $2pAC Ef zAC  <$AC  zPLRxP @ $$ /@AC  $L5!/@AC  $t.+/@AC H RAC M ZAC U 4&AC  $;/@AC  $|:AC J $LI/@AC E vAC q $0Jf@X    e @ @ @ x @ %@0`0`o`@@ @  2`8@ @( @ o@oo@0` @ @ @ @ @ @ @& @6 @F @V @f @v @GCC: (Debian 4.7.3-4) 4.7.3,l @s,@ sl @@@?{int?&f(x~44G)4*  (/: %1F# L3[# 5[# 7# 9:# QJ J e0< V>Q# [@# Bm# D# F# H#(W>W@Gvjnl @ @denh!nm`nXLoPoH[p@ @= @`!mXPLH@[eh= @s @ehjs @ @ mctxh`l4X4P @ @hn4` @ @hl4` @ @@)hptr`" @ @( @@e(h([dstr(X,@@` &@e h  J&F@@ {s@$@{@?{int?&fp'F(444  - ,. (/> %1F# L3[# 5[# 7# 9>#UNN e0< V>U# [@# Bx# D# F# H#(AK eM#topO# Q#[UUN->W@-=GJ=f,vU[@@ UUhg[@@egh@5@ithe`6F5@S@@@6Uh@S@@p@U`JU@@eJXJPlJ[LLUh*\@@`e\Xit^Uh_U`sU@{@esXsUPs[Lhu[lx`}U{@ @ }UX^}FTUhU @}@U`^F\}@ @F U`UX|FTMUHRFDsF@0UKUPFqF @z@@` U`UX|FTMUHRFDsF@@b@U?UFFz@D@yHsy@5O  [l  U` *[\[!S0D@@ 0X"dir0FT50mP 2Uh#QF@@` eQ|Q[|Q|lQ[|$< b(@ XUh ]| ``@Y@ lUX=N N-#U@@ \ e|[|$<l  P(@ | h U`=l N\ #eF@@ q e|[|$<  :(@ | X UP ^FL%{@@O l[ ` UI@@ U@= N q &O@@  "ith# U@>@  "it h#U>@ @@ # "ith'< @ @  e<|y< | F>| aAUh  4 'L @"@  eL| FN| QUX$<  /(@q (i"@$@`  iU j lkD"dirkF m @ Go  q[\ fr7PD N)$@$@ eh4 `% $ > : ; I$ >  I' II '   : ;  : ; I8 I !I/ .: ; ' @B : ; I .: ; ' I@B 4: ; I .: ; ' @B .: ; ' I@B : ; I .: ; I@B .: ; @B 4I4  &I.? : ; I@B % $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/  : ;  : ; I8 &I.: ; ' I@B : ; I .: ; ' I@B .: ; ' @B : ; I .: ; ' @B 4: ; I .? : ; ' @B 4: ; I  U .: ;' I@B : ;I 4: ;I !.: ;' I@B ": ;I #.? : ;' I@B $4I4  % &.: ;' @B '.? : ;' @B (.: ;' @B ).? : ;' @B w /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/includerope.hrope_common.hrope_avl.cstddef.h l @.Zuu&K.~.>2222K2/[.>YY[Y[ZYYYYZ=2KY% /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope.cstddef.htypes.hstdio.h @tY..~.tY6!>s-w"IW;hx0uvuK2/ʻ˻u t2/$2-iK21z=Y/K4 Kg $ "J%<# tY/L4MKgc  t=Y>0[h h<J K .(///K.%L#u# .&ugs"3u"&uu.$s'/s6XLu g/gi!.>Y /:@2L2==Ov=#3N,zLx;.J.JLs,N)WW:MqX,u"t/2uI/s>tYx/long long inttest_rope_newrope_split_functest_avl_rotationsrsize_trope_alloc_funcshort unsigned intstr_getn/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit__func__datasplit_ctxrope_nodestr_printleaf_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/rope_avl.cunsigned chartree_sizerootalloc_ctxroperope_createlong long unsigned intrope_deletetest_rope_insertsizetypemem_freerope_free_funcmainGNU C 4.7.3short intlong doublemem_allocp_endrope_node_printnew_noderope_node_heightROPE_HEIGHT_MAX__PRETTY_FUNCTION__l_left_heightdirectionold_sizel_right_heightrope_iter_nextparentrope_relinkconninsert_heightavl_route_to_offsetchild_prefix_lenr_left__ssize_tr_left_heightr_right_heightl_leftavl_rebalance_after_deleterope_clearadjust_sizerope_iterl_rightavl_route_to_nextrope_eraserssize_tvisit_leafrope_traverseavl_rotate_doublerope_node_newsplit_noderope_pretty_printrope_iter_startsave/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.cleft_sizeprint_leafr_rightpaddingrope_iter_down_to_leafchild_prefixp_offsetmirrorpathrope_sizerope_node_splitavl_rebalance_after_insertrope_checkrope_node_sizeavl_rotate_singlerope_iter_createrope_extract_nodewwdvdewefwfiwivwwwvww w 'v'(w()w),w,RvRSwSTwTWwWpvpqwqrwruwuvwwwvwwwv w !w!$w$]v]^w^_w_bwbrvrswwwvw w #w#;v;<w<=w=@w@TvTUwUVwVYwYrvrswstwtwwwvwwwvwww2v23w34w47w7vwww)v)*w*+w+.w.vwww)v)*w*+w+.w.vwwwcvcdwdewehwhvwww v w w w v w w  w vwwwvwww]v]^w^_w_bwb,v,-w-.w.1w1vwwwvwwwvwwwvw#\"#@?TU.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N  @ V@^o@Lko@Pz( @( @ @@ 8 x @x  @  @ %@% %@%p(@p(<)@)\ /@ /M0`00`00`00`01`12`22`2 2`2022`) 35E CIO0N ZS e`aslp %U w@@<@`@ @@@@ ( @ @ @ x @ @ @%@%@p(@)@ /@0`0`0`0`1`2`2`2` !" 0` @. @A @W2`f0` @ @0` l @e @l = @6 s @! @+ @ @  @% @l) @><&@JQ @` @j @{ 5@ S@ @ @h {@ @s }@ @p z@$ D@6b(@ OP(@h:(@  @R/(@  "@/@0`0`2`0`0`2`!2`7 %@GYn  2` >@2`%@ @Z @/Ji2`v %@P @ %@ @2` @ $@v2` @ @! @, @ @!R l x @ @crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryrope_avl.crope_createrope_newrope_deletestr_getnstr_printmem_allocmem_freetest_rope_newtest_rope_inserttest_avl_rotations__func__.3724rope.crope_node_sizerope_sizerope_iter_createrope_node_heightrope_relinkrope_node_newrope_node_splitavl_rotate_singleavl_rotate_doubleavl_rebalance_after_insertavl_rebalance_after_deleteavl_route_to_offsetavl_route_to_next__PRETTY_FUNCTION__.3131__PRETTY_FUNCTION__.3140__PRETTY_FUNCTION__.3148rope_iter_down_to_leaf__PRETTY_FUNCTION__.3190rope_node_print__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5putchar@@GLIBC_2.2.5abort@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startrope_iter_nextputs@@GLIBC_2.2.5_edata_finistrlen@@GLIBC_2.2.5rope_iter_startrope_checkprintf@@GLIBC_2.2.5snprintf@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_start__gmon_start___IO_stdin_used__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5rope_traverse_end_startrope_pretty_print__bss_startmainrope_insertrope_erase_Jv_RegisterClassesrope_extract_node_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initrope_cleartarantool-1.5.1.218.g1a69fd6/test/unit/slab_cache.result0000664000000000000000000000000012202131537021204 0ustar rootroottarantool-1.5.1.218.g1a69fd6/test/unit/rlist.test0000775000000000000000000006237412213333045017767 0ustar rootrootELF>p @@N@8@%"@@@@@@@@@k(k( p(p(`p(`h ((`(`@@DDPtd(%(%@(%@Qtd/lib64/ld-linux-x86-64.so.2GNU GNU l"C S^  ! $-D@ QR|k|qXK|]ʒ|j C͸/BE9 3b :  + : N h- l @F"@ ) @@  @+`"@+`" 3!@*`' @w0 @+`+` "@ P"@ p @ *`libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6putcharvprintfstderrfwritefprintf__libc_start_main__libc_csu_fini_edata__data_start_IO_stdin_used__libc_csu_init_end__bss_start__okcheck_planGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y 2a_& :ui Dh*`+`*`*`*`*`*`*`*`*` *` HH! HtcH5! %! @%! h%! h%! h%! h%! h%z! h%r! h%j! hp%b! h`1I^HHPTI"@HP"@H) @g+`UH-+`HHw]øHt]+`+`UH-+`HHHH?HHHu]úHt]+`= uUH~] @H=H tHtU(`H]{vUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHH}HuHEHUHPHEHHEHHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEHUHH}HEH@]UHH}HEH]UHH}HEH@]UHH}HEH]UHH}HEHPHEHH9uHEH@H;Eu]UHHH}HuHEH'HUHEHHUHHH}HuHEHHUHEHHUHH0A.*`G"@ǸE}u}H H#@Hy H "@H[ H#@H=  #@m#@HǸ1ENEHcHHHHH +`EBEHcHHHHH +`HHƿ*`E}~*`H=(+`#@ǸE}u}H H#@Ho H #@HQ H#@H3 % #@m#@HǸ'*`VH=+`#@Ǹ#E܃}u}H H#@H H #@H H#@H & #@m#@HǸz*`H=+`#@ǸvE؃}u}H3 H#@lH H #@NH H#@0H ( #@m#@HǸ*`H=(+`#@ǸEԃ}u}H H#@Hh H #@HJ H#@H, ) #@m#@HǸ *`rH=(+`#@ǸEЃ}u}H H#@H H #@H H#@H + #@m#@HǸs*`H=+`#@ǸoẼ}u}H, H#@eH H #@GH H#@)H , #@m#@HǸE*`HEEHcHHHHH +`HH;EU#@ǸEȃ}u{HQ H#@H3 U#@HǸ.H H#@PH 0 #@m#@HǸEHEH9HEH}*`*` HEmEHcHHHHH +`HH;EU#@ǸEă}u{HY H#@H; U#@HǸ6H H#@XH 5 #@m#@HǸHEHWHEH}*`HE(+`HEHH= +`#@Ǹ E}u}H H#@Hl H #@HN H#@H0 : #@m#@HǸ$*`SHEHEHH= +`#@Ǹ E}u}H H#@ H H#@H H#@Hw < #@m#@HǸk(+`HEHEHH=8+`#@Ǹ[ E}u}H H#@QH H#@3H H#@H = #@m#@HǸX+`HEHEHH=8+`$@Ǹ E}u}H_ H#@HA H$@zH# H#@\H > #@m#@HǸE*`!HxHxHHEEHcHHHHH +`H;EU $@Ǹ ttu{Hp H#@HR U $@HǸMH6 H#@oH C #@m#@HǸ EHEHHTHhHhHHEHEHH=*`*`H`H`HHEmEHcHHHHH +`H;EU@$@Ǹ \\u{HH H#@H* U@$@HǸ%H H#@GH H #@m#@HǸHEHHBHPHPHHEHEHH=*`X+`*`c$@ǸLLu}H_ H#@HA Hc$@zH# H#@\H L #@m#@HǸp+`*`*`_r$@ǸHHu}H H#@H Hr$@He H#@HG N #@m#@HǸ;*`jH@H@HH=h+`$@Ǹ%<<u}H H#@H H$@H H#@H P #@m#@HǸv+`*`O*`H0H0HHEEHcHHHHH +`H;EU$@Ǹ.,,u{H H#@H U$@HǸH H#@H S #@m#@HǸE}uEHEHHH H HHEHEHH=*`*`zHHHHEm}umEHcHHHHH +`H;EU$@Ǹu{H H#@H U$@HǸHo H#@HQ \ #@m#@HǸEHEHHHHHHEHEHH=*`*`M*`v"@Ǹ u}H H#@H H "@H H#@Hf a #@m#@HǸZENEHcHHHHH +`EBEHcHHHHH +`HHƿ*`tE}~E*`7HHHHEEHcHHHHH +`H;EU@$@Ǹu{Ht H#@HV U@$@HǸQH: H#@sH h #@m#@HǸEHEHHjHHHHEHEHH=*`*`HHHHEmEHcHHHHH +`H;EU $@Ǹu{HL H#@H. U $@HǸ)H H#@KH m #@m#@HǸHEHH4HHHHEHEHH=*`KÐUHH}EP N u@ ¾$@J$ UHH  9t,  H# $@HǸ!E t.  H $@HǸ EEUHH,H`HhLpLxt )E)M)U)])e)m)u)}H 7 . ( ,t%@%@Hƿ%@),u  Dž8Dž<0HEH@HPHHH8H HH ,H!ÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHHlist is empty# Failed test '' /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/rlist.c# in %s at line %d first itemlast itemrlist_nextrlist_prevelement (foreach) %delement (foreach_reverse) %drlist_entryrlist_first_entryrlist_next_entryrlist_prev_entryelement (foreach_entry) %delement (foreach_entry_reverse) %dhead2 is emptyhead2 isnt emptyItem was movedelement (second deleted) %d%d..%d # Looks like you planned %d tests but ran %d. # Looks like you failed %d test of %d run. oknot ok%s %d - ;H4U(H!h3DVg(HDh (zRx *zRx D!AC \ <EGAC B \lFAC A |?AC z AC M AC L AC M AC L w8AC s <1AC l \1AC l |@AC ; FAC A AC | zPLRx0 @ $$;\(@AC   $$0Jf@XL m0 @ @ @ "@p(`x(`o`@@@ P p*`@@0 oP@oo@(`@@ @ @& @6 @F @V @f @*`*`*`*`GCC: (Debian 4.7.3-4) 4.7.3,\ @ , l @ n)\ @i @-V%.V#e/V#-Hgj o >intOp##### b#( |#0 #8 #@ #H #P 1#X  #`  #h  #p #t #x u# # # # &# */# 10# 81# ?2# F3\# 5# 7# d###     7 ch # no #-#$8\ @} @g8VhwB} @ @`BVhBV`N @ @NVhNV`XZ @I @ ZVhoVI @[ @GoVhxV[ @l @{xVh_Vl @~ @@VhV~ @ @Vh @ @VhT @ @`TtoVhV` @) @toVhV`) @i @  ilit `VX> @ @resT< @ @&res%P @@Jres&L@C@nres(HC@@res)D@@res+@@J@res,d@#@res0\@@%res59@@kres99@I@M9 @@res;@@M; @^@res=@@M= ^@@=res>~^@t@M> ~@:@bMB ~C@@resC~@*@MB ~B@^@MF ~k@,@resH~,@N@ MF ~p@@@ resL~&@@e resN~@@ resO~@@MO ~@@ MR ~@@ resS~@@ MR ~@@? MX ~ @@d res\~@@ MX }@@ resa}@6@ Mg }?@@ resh}@&@ Mg }>@Z@B Mk }g@( @g resm}( @J @Mk } -    +`- *`- *`an)l @A"@H8j o >intiiOcpb##### b#( |#0 #8 #@ #H #P 1#X  #`  #h  b#p b#t p#x F# T#  # # &{# */# 10# 81# ?2# F3-# 5b# 7##(n ~~ aM#M### d##b#   3 9 Ocv l @ @ blob +` b @3!@resbl{)b3!@A"@@)b~fmt)3~ap+>~b +`b +`b +`%  : ;  : ; I8  I: ; I$ > $ >  : ;I8 : ; I !I/ : ; I8 .: ; ' @B : ; I .: ; ' @B .: ; ' I@B : ; I .? : ; ' I@B 4: ; I 4: ; I   &I4: ; I? < % : ; I$ > $ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I.? : ; ' @B : ; I 4: ; I .? : ; ' I@B 4: ; I : ; I 4: ; I? < 8 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerlist.hrlist.cstddef.htypes.hlibio.hstdio.h \ @8555/!.5u55u5<tY ./ ./~.$}*Jl0}0}0}0}0}0}u/D{H/KD{6}<}<}<}u%F{H&@%KF{&A*}2}H}%F{KgF&B%KgKF{&D*}*Jju%F{H&@%KF{&@YS /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includetest.cstddef.htypes.hlibio.hstdarg.hstdio.h l @ 2%w%=21'tX!-_IO_buf_end_old_offsetrlist_firstrlist_create_IO_save_endshort intsize_tsizetyperlist_del_IO_write_ptr_flagsrlist_add_IO_buf_base_markers_IO_read_endheadrlist_emptyrlist_add_tailrlist_laststderr_locklong int_cur_column_poshead2_sbuf_IO_FILEunsigned charrlist_move_tail/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/rlist.c_IO_marker_shortbufGNU C 4.7.3_IO_write_base_unused2_IO_read_ptrshort unsigned intrlistmainrlist_prev__pad1__pad2__pad3__pad4__pad5__mptrrlist_moverlist_nextlong unsigned int_IO_write_end__off64_t__off_titems_chain_IO_backup_base_flags2item_mode_IO_read_base_vtable_offset_IO_save_base_fileno_IO_lock_tcheck_plan/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/test.c__va_list_tagshowed_plan__okfp_offsetgp_offsetreg_save_areaconditionoverflow_arg_areatests_failedcount__gnuc_va_listplan_testtests_doneww v !w!"w"%w%gvghwhiwilwlvwwwvwwwvwwwvwww!v!"w"#w#&w&2v23w34w47w7jvjkwklwlowovwwwvwww v  wwwEvEFwFGwGJwJvwwwvw.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @V@P^o@:koP@PPz@0@ @@p @p t"@" "@"7(%@(%%@%\(@\(p(`p(x(`x((`((`(h*`h*p*`p*`*`*0 +`+ 0++`)|+\5;Cf>?O0CZG:MeW` $H @a@@<@`@@@@P@ @ @ @ @ p @"@"@(%@%@\(@p(`x(`(`(`h*`p*`*`+` ! (` @. @A  @W+`fx(` 0 @p(` \ @! } @G @F @? I @ [ @ l @ ~ @ @8) @14 @1D +`J*`O*`U\+`g+`t+`~+`X(@(`x(`*`(`p(`+`p*` "@* F *`Q+`X"@^r*` "@0 @ P"@+` p @"+`. ) @@3 G 3!@L @Wk  @+` l @Fcrtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryrlist.crlist_createrlist_addrlist_add_tailrlist_delrlist_firstrlist_lastrlist_nextrlist_prevrlist_emptyrlist_moverlist_move_tailitemsheadhead2test.ctests_donetests_failedplan_testshowed_plan.2097__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finiputchar@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_start_edata_finiprintf@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_startfprintf@@GLIBC_2.2.5__gmon_start___IO_stdin_used__gcc_personality_v0@@GCC_3.3.1__libc_csu_init_endvprintf@@GLIBC_2.2.5_start__bss_startmain_Jv_RegisterClasses__okcheck_planfwrite@@GLIBC_2.2.5_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initstderr@@GLIBC_2.2.5plantarantool-1.5.1.218.g1a69fd6/test/unit/mhash.c0000664000000000000000000000400112202131537017151 0ustar rootroot#include #include #include "unit.h" #define MH_SOURCE 1 #define mh_name _i32 struct mh_i32_node_t { int32_t key; int32_t val; }; #define mh_node_t struct mh_i32_node_t #define mh_arg_t void * #define mh_hash(a, arg) (a->key) #define mh_eq(a, b, arg) ((a->key) == (b->key)) #include "mhash.h" #define mh_name _i32_collision struct mh_i32_collision_node_t { int32_t key; int32_t val; }; #define mh_node_t struct mh_i32_collision_node_t #define mh_arg_t void * #define mh_hash(a, arg) 42 #define mh_eq(a, b, arg) ((a->key) == (b->key)) #include "mhash.h" #undef MH_SOURCE static void mhash_int32_id_test() { header(); int k; struct mh_i32_t *h; #define init() ({ mh_i32_new(); }) #define clear(x) ({ mh_i32_clear((x)); }) #define destroy(x) ({ mh_i32_delete((x)); }) #define get(x) ({ \ const struct mh_i32_node_t _node = { .key = (x) }; \ mh_i32_get(h, &_node, NULL); \ }) #define put(x) ({ \ const struct mh_i32_node_t _node = { .key = (x) }; \ mh_i32_put(h, &_node, NULL, NULL); \ }) #define key(k) (mh_i32_node(h, k)->key) #define val(k) (mh_i32_node(h, k)->val) #define del(k) ({ \ mh_i32_del(h, k, NULL); \ }) #include "mhash_body.c" footer(); } static void mhash_int32_collision_test() { header(); int k; struct mh_i32_collision_t *h; #define init() ({ mh_i32_collision_new(); }) #define clear(x) ({ mh_i32_collision_clear((x)); }) #define destroy(x) ({ mh_i32_collision_delete((x)); }) #define get(x) ({ \ const struct mh_i32_collision_node_t _node = { .key = (x) }; \ mh_i32_collision_get(h, &_node, NULL); \ }) #define put(x) ({ \ const struct mh_i32_collision_node_t _node = { .key = (x) }; \ mh_i32_collision_put(h, &_node, NULL, NULL); \ }) #define key(k) (mh_i32_collision_node(h, k)->key) #define val(k) (mh_i32_collision_node(h, k)->val) #define del(k) ({ \ mh_i32_collision_del(h, k, NULL); \ }) #include "mhash_body.c" footer(); } int main(void) { mhash_int32_id_test(); mhash_int32_collision_test(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/slab_cache.test0000775000000000000000000010112012213333056020657 0ustar rootrootELF> @@e@8@%"@@@@@@@@@7/7/ 00`0` 00`0`@@DDPtd))@)@$$Qtd/lib64/ld-linux-x86-64.so.2GNU GNU8iܩuЬ`(!t D !#%'()sk|3~qXLaK|.?k C/BE9 23b : W}V? + : N h)d#@ h@ @/ @ @2`k @L}p#@3`U X@^2`w @N2`2` `#@ @ "@d @` 2`= A@ 8@ libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitsrandmmap64timeabort__assert_failmemset__errno_locationmallocstderrmunmapstrerror_rfprintf__libc_start_mainrandomfree__libc_csu_finislab_from_ptrslab_cache_check_edataslab_get__data_startslab_cache_create_IO_stdin_usedslab_get_with_order__libc_csu_init_end__bss_startslab_putslab_cache_destroyGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui 1` 2`"2` 2`(2`02`82`@2`H2`P2` X2` `2` h2` p2` x2`2` 2`2`2`2`HHe& HtH5R& %T& @%R& h%J& h%B& h%:& h%2& h%*& h%"& h%& hp%& h`% & h P%& h @%% h 0%% h %% h %% h%% h%% h%% h1I^HHPTI`#@H"@H @2`UH-2`HHw]øHt]2`2`UH-2`HHHH?HHHu]úHt]2`=A% uUH~].% @H=h" tHtU0`H]{vUHSHn7H`H EIgHH ףp= ףHHH HHHH?H)HHHHHHH)‰UHH[fHHHHH?HH)HHi'@HH)HЉEEHH2`HtEHH2`H`HHyEHcH`HH H‹EHH2`EHH2`HuAH# H$$@AAx#@#@#@#@HǸH`HE}H`Hb HXHĨ[]ÐUHH}HEHUHPHEHUH]UHH}HuHEHUHHEHPHEHPHEHHUHPHEH@HUH]UHHH}HEHHUHRHPHEH@HUHHHEH[UHH}HEH@HEHEHPHEHPHEH@HUHHEHUHHEHHEHPHE]UHH}HEH@]UHH}HEH@]UHH}HEHPHEHH9uHEH@H;Eu]UHH}HEH@HEHPHEH]UHHH}HEHmHEHHUHH}HuHEHUHHPHEHH!]UH0]UHHH}H9Ev(@ $@z$@[H}w)H}@v HE)UHSHE} vp(@ $@$@E ӉHH[]UHH H}E} v)@7$@$@HEHEEsHH#EHEHEP(69u HE@,:Et)@<$@%@PHEUHSHH}HEP(9t(@D$@:%@HE@,< v(@E$@T%@HE@,< t`HE@,HHHEH!HEH9uHEHX HE@,H9t(@I$@p%@H[]UHHH}HuHE@-HE@,9t(@P$@&@5HEHpHEH@ H)HEHpHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHE@-UHH}HuHEHpHEH@ HHEHpHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHE@,PHEP-]UHH}HE@-]UHATSHH}HEHX [II)ظAHHEHLHH[A\]UHH H}HUE} v(@p$@(&@CHEP(HEUP,HE@-HEHUHP UHHPH}HuHUHEHHtX#HM@HΉH HU;&@HǸA(@~$@R&@HUHH0E܀} v(@$@$@E܉HEHEHAA"HƿHEH}u HEHPHEH!HEH}tKHEHUH)HEHHHEHUHH)HHEHEHUHHEHHHEHUHHEHHHEHEMHUHEHHEUHHH}HE@,< v(@$@X&@HE@,< uHE@,KHHEH1UHH0H}HuHE@,u(@$@w&@)HE@,EEHEMHUHEЉH5HEH*HEMHUHEHHEHPHE@,HHHHEHHHWHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEUHH0H}HuHUHEHqH;Et(@$@&@HEH9EHFEHEHEHHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHE@,PHEP,HE@,cHHEHP HEUHHH}E EHHHHEHHRE} vHEH`H6UHH@H}HEH`HEHEHHEHEHE>HE@,< uHEH HHEHH\HEHEHEH;EtHEH=HEHEHEH}uUHH0H}؉EԀ} v(@$@$@XEHHHHEHHEHEH@H;E @HEH}u nHEHHEHUH`HHHEHxHEH@ HHEHxHEHPHEHH_HEHPHEH@ HHEHPHE HEH.9HEHHEHEHHEHE@,:EHEHPHEH@ H)HEHPHUHEHHHEHE@,:EuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHUHEHHHEHTHEUHH H}HuHEHEHE} HEHHEH}u MHUHEHiHEHUH`HHHEHxHEH@ HHEHxHEHpHEHHEHpHEUHEH2UHH H}HuHEHRHE@,< u_HEHHEHxHEH@ H)HEHxHEHpHEH@ H)HEHpHEHHUHEHHHEHRHEH}HEP,HE@,8HEHHE@,HE@,HEHcHHHHHEH@ H)HEHcHHHHHUHMHEHH$HEHEHHEH}t$HEP,HE@,8uHEHuHE@,HE@,HEHcHHHHHEH@ HHEHcHHHHHEHHEHPHE@,HHHHEHHHfUHSHxH}HEHEHEHEEHEH`HEHEHHEHEHEHEP(9t4HEH(H AȉѺP(@&@HǸREHE@,< u&HEH@ HEHEH@ HEHEH@ HErHEHX HE@,H9tEHEHX HE@,HHi IHѺP(@&@HǸE OHEHEHHEHEHEHEH;EHEHxH;Et7HEHxH HMIHѺP(@'@HǸ@EHEHE HUHEHH)HHEHEH@HEHEH@HEHEHXEHHغHHHt>EbHHEHPH? IHѺP(@@'@HǸEHEHXEHHغHHHt>EHHEHPH IHѺP(@'@HǸ+EHE HEH@H;EHEHUHH;Et7H HuHMHUIIHѺP(@'@HǸEHEHpH;Et7HEHpH3 HMIHѺP(@ (@HǸE}uHx[]ÐHl$Ld$H-' L% H\$Ll$Lt$L|$H8L)AIHI1qHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/slab_cache.cfalseruns[run]Test failed: %s is %s at %s:%d, in function '%s' main/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/slab_cache.hsize <= (4294967295U)order <= SLAB_ORDER_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab->magic == slab_magic && slab->order == orderslab->magic == slab_magicslab->order <= SLAB_HUGEslab->order == SLAB_HUGE || (((intptr_t) slab & ~(slab_order_size(slab->order) - 1)) == (intptr_t) slab && slab->size == slab_order_size(slab->order))slab->in_use == slab->order + 1order <= SLAB_HUGEError in munmap(): %s 0slab->order <= SLAB_ORDER_LASTslab->order > 0slab_buddy(slab) == buddy%s: incorrect slab magic, expected %d, got %d%s: incorrect slab size, expected %zu, got %zu%s: incorrect slab statistics, total %zu, factual %zu %s: incorrect order statistics, the total %zu is not multiple of slab size %zu %s: incorrect order statistics, the used %zu is not multiple of slab size %zu %s: incorrect totals, ordered %zu, huge %zu, total %zu %s: incorrect used total, total %zu, sum %zu slab_cache_checkslab_order_sizeslab_assertslab_set_freeslab_mergeslab_buddyPslab_orderslab_createslab_get_with_orderslab_mmapmunmap_checkedslab_splitslab_from_ptr;$#@xlf8xXx8M8`]0yPxzgP8@X x)HzRx *zPLRx @ $$4/@AC H zRx !AC \ <GAC B \?AC z |SAC N &AC M AC M  8AC s "%AC ` '*AC e <1'AC b \8AC P |-lAC g $yJAC E@ AC  $AC E  AC  ,IAC  LAC R $l[AC GO bAC ] $!+/@AC } {AC  xbAC ]  AC  <AC  \gLAC G |AC  AC  AC   AC  $AC Ez $$Jf@XLX 'Ywz @ @ @ d#@0`0`o`@@@  2` @ @0 oX @oo @0` @ @ @ @ @ @& @6 @F @V @f @v @ @ @ @ @ @ @GCC: (Debian 4.7.3-4) 4.7.3, @,6@A2 @@A5int0T?3m?tk-R.#/#) B   0AOI#K#R{# VTb#(OVI#,]\I#-M`xa{##b{#E qr#StO# 7!#dx# x  FBB H];#,## ## O#(#0n#89#@)#H#P(#X{  #` #h ;#p;#t_#x[#-##)#c&#T/#[0#b1#i2#p3{#5;##7/#d  #Y#;# )  ?  e W w ΀O ; @@<|i;\w $@@M@run;X;T       2`\@"@A5int0T?3m wB?tk-R.#/#) B   0AZI#K#R# VTb#(OVI#,]\I#-M`a##b#E qr#StZ# 7!#d#   FBB  H ];#,## ## O#(#0n#89#@)#H#P(#X{ $#` *#h ;#p;#t_#x[#-#0#@#c&#T/#[0#b1#i2#p3#5;##7F#d$$#Y*#;# @  V 8@@`J8h"B@@BhB`Z@+@ Zhb+@~@6bXdhEo~@@joh@@@h;@@h,f@@SfhZ@)@`8J8h\)@P@h2`P@e@ JIe@@͆h (@   {@@EOI\U p(@ U E5@@@ptr5XO5IT )@8{h:`   A@u@,AX< (@ <  ,{Nu@1@<NhN` (@W1@@`<WhW`7` @@ `hDf@/@ \ fXh (@n/@@ nhOnIdnX  (@,ox@@6 xlxF  (@@@buf{K  F 6 [ ?@0@@ OIL  (@`maphdXP    0@@8 h8  (@@@  <H@  (@Io`X@@` 4 <ÓXPH4  (@>h%@@  <ϓX@@iIo@h@ ( <ד`htmpH@@ U( XG@[@U( P. h@X@  <HOID  (@hJ8`|@@U( XF %X@8@ B!<%X!%PO(Io@$@+`"~88@A@@ !<8X!8PGh"dA@"@ !<d~#fXgPshHi@j lmw P(@@@lUo(  @ @Uo(  @""@J8!@ "@OI  Q% $@b#*% $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/   : ;I8 : ; .? : ; I@B 4: ; I 4: ; I 4I4   &I4: ; I? < % $ > $ > : ; I : ;  : ; I8  I : ;  (  : ;  I !I/  &I : ;I8 : ; .: ; ' @B : ; I .: ; ' @B .: ; ' I@B 4: ; I .: ; I@B .: ; ' I@B 4I4  .? : ; ' I@B : ; I  4: ; I .? : ; ' @B  4: ;I .? : ;' I@B !: ;I ".? : ;' @B #4: ; I? <  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/usr/include/x86_64-linux-gnu/bitsslab_cache.cstdint.hstddef.hrlist.hslab_cache.htypes.hlibio.hstdio.h  @ vYK?!( 7wJ  I /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/small/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bitsrlist.hslab_cache.hslab_cache.cstdint.hstddef.htypes.hlibio.hstdio.h @85./!2K5..<tYQ..+.3K.uwǯ3fY~tfLK2(yK2K!221Kfɭ2h@f .u0vKYK2v2YYyK2= [!K2gJh!2w 2fvY=u;2w.X <gK/K .uY;h!3-[/,Ks=LK.2ɃLH,LGL1QhtH/M")H(L)H(nJW3LH/LhW"runsslab_IO_read_base_IO_FILEorders_IO_save_endshort intsize_tsizetype_IO_write_ptr_flagsallocated_IO_buf_base_markers_IO_read_enduint8_tslabsstderrlong long intSLAB_MAX_SIZE_lockMAX_ALLOC_cur_columnSLAB_HUGE_pos/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/slab_cache.cunsigned charsmall_stats_sbuf_old_offsetlong double__func__/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitlong long unsigned intnext_in_cacheuint32_t_IO_marker_shortbufGNU C 4.7.3_IO_write_base_unused2_IO_read_ptr_IO_buf_endslab_listmain__pad1__pad2__pad3__pad4__pad5ITERATIONSSLAB_MIN_SIZE_LBshort unsigned intrlistSLAB_MIN_SIZE_IO_write_end__off64_t_fileno_chain__off_tnext_in_list_IO_backup_base_flags2_mode_vtable_offsettotal_IO_save_baseslab_cacheSLAB_ORDER_LASTprevNRUNSin_use_IO_lock_tmunmap_checkedslab_putslab_list_createheadrlist_shiftrlist_createslab_get_with_orderslab_mmaprlist_nextslab_mergeslab_cache_checkslab_splitslab_cache_destroypoison_charslab_cache_createslab_is_free_Boolslab_order__mptr/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/small/slab_cache.cslab_getdont_panicslab_from_ptrslab_assertslab_buddyslab_createrlist_emptynew_orderintptr_tslab_poisonrlist_addsmall_stats_resetmergedrlist_firstslab_magicslab_size_alignlengthorderedslab_set_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/smallnew_sizeslab_sizeofslab_set_usedhugeaddritemslab_order_sizerlist_del__PRETTY_FUNCTION__alignmentwwvwww v !w!"w"%w%gvghwhiwilwlvwwwvwww v  w  w wvww"w"UvUVwVWwWZwZzvz{w{|w|wvwwwvwwwvwwwLvLMwMNwNQwQvwww!v!"w"#w#&w&vwwwvwww8v89w9:w:=w=OvOPwPQwQTwTvwww v  w wwvwwwvwww v www v  w  w  w v w w w F vF G wG H wH K wK v w w w v w w w v w w w vwww@v@Aw.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @V@^o @ TkoX @X Pz @ 0 @   @  @ 0 @ d#@d# p#@p#)@)$@*@@*/@/0`00`00`00`01`12`22`2 2`2 022`)43J5~HKCK@O0 R<ZEX Eden $_ {@@<@`@@@ @X @ @ @ @ @ @d#@p#@)@@*@/@0`0`0`0`1`2`2`2` ! 0`  @. @ @A @W2`f0` @0`2`$@ @! @G @? +@S ~@ @ @8( @%: @*K )@'[ P@g e@lr(@  @Jp(@$@)@ @(@  u@ (@$ 1@2 @? @[K(@\ /@bh(@  @(@ @(@  0@b(@  @ (@  @(@ 8(@QP(@_/@m0`y0`2`0`0`2`2` `#@ ( D 2`O @] A@n2`ud#@{ X@2`  @L(p#@7 h@K]u @ "@3` @2`  @ & 8@ /A [s @y @2`crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryslab_cache.cruns__func__.3713rlist_createrlist_addrlist_delrlist_shiftrlist_firstrlist_nextrlist_emptysmall_stats_resetslab_list_createslab_size_alignslab_sizeofslab_order__PRETTY_FUNCTION__.1752slab_order_size__PRETTY_FUNCTION__.1756slab_magic__PRETTY_FUNCTION__.3149slab_assert__PRETTY_FUNCTION__.3155slab_set_free__PRETTY_FUNCTION__.3160slab_set_usedslab_is_freeslab_poisonpoison_char.3171slab_create__PRETTY_FUNCTION__.3177munmap_checked__PRETTY_FUNCTION__.3183slab_mmap__PRETTY_FUNCTION__.3187slab_buddy__PRETTY_FUNCTION__.3195slab_split__PRETTY_FUNCTION__.3200slab_merge__PRETTY_FUNCTION__.3209__PRETTY_FUNCTION__.3235__func__.3272__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5abort@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startslab_from_ptrslab_cache_check_edata_fini__assert_fail@@GLIBC_2.2.5memset@@GLIBC_2.2.5slab_get__libc_start_main@@GLIBC_2.2.5srand@@GLIBC_2.2.5__data_startfprintf@@GLIBC_2.2.5__gmon_start__slab_cache_create_IO_stdin_usedslab_get_with_ordertime@@GLIBC_2.2.5strerror_r@@GLIBC_2.2.5random@@GLIBC_2.2.5mmap64@@GLIBC_2.2.5__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5_end_start__bss_startmunmap@@GLIBC_2.2.5main_Jv_RegisterClassesslab_putexit@@GLIBC_2.2.5_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initslab_cache_destroystderr@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/test/unit/rope.test0000775000000000000000000010153312213333046017567 0ustar rootrootELF> @@h@8@&#@@@@@@@@@22 33`3` 33`3`@@DDPtdp+p+@p+@\\Qtd/lib64/ld-linux-x86-64.so.2GNU GNUʞ~(_RI'x%P*%leT T@D!#$$$Fik|qXK| j C!$/CE uZb3b/ Y : {{R + : N h "@ *@'@R Y"@ @L x @w5`3'@`5` !@&5` @wP @5` '@  0!@Z ;@B P'@, @e &@v( 5` @!libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6putsputcharabort__assert_failstrlenmalloc__libc_start_mainsnprintffree__libc_csu_finirope_iter_next_edatarope_iter_startrope_check__data_start_IO_stdin_used__libc_csu_initrope_traverse_endrope_pretty_print__bss_startrope_insertrope_eraserope_extract_noderope_clearGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui 4` 5` 5`(5`05`85`@5`H5`P5` X5` `5` h5`p5` x5`HHu* HtH5b* %d* @%b* h%Z* h%R* h%J* h%B* h%:* h%2* h%** hp%"* h`%* h P%* h @% * h 0%* h 1I^HHPTI'@HP'@H@5`UH-5`HHw]øHt]5`5`UH-5`HHHH?HHHu]úHt]5`=i) uUH~]V) @H=& tHtU3`H]{vUHH}H}t HE@]UHHH}HEHHUHH}HuHUHMLELMHEHHEHUHPHEHUHPHEHUHP HEHUHP(HEHUHP]UHH@H}HuHUHMLEHUHEؾ0HHEH}u*LEH}HMHUHuHEMIH5HEUHHH}HEH:HEH@(HUHRHMHHUHH}HuHUHMHEHUH]UHHH}HuHEHUƿ'@UHHH}HuHEHIUHHH}HuHEH{UHA@ @ @]UHH H}uHUEHUHƿ(@xHEH\HUuHEH HE @HHEH UHH H}uEHƿ!(@UHEH HEHEHHE@HEH@HH UHHH}uUUEHƿ8(@UHEH }muHE @HCHEHHUHHHEHEHHEY(@HHEHHEh(@HdHEHHEo(@HCHEHfHE(@H"HE(@H HE(@ HHE(@HHEHHE(@HHE(@HHEHHHE)@HHE )@HqHEH4HE HHEHHEHHE:HHE ?HHEOHHEHHE~HHEHHEHHEHHE;HHE|HHEHgUH~]ÐUHH}H}t HE@]UHHH}HEHHUHH}HuHEHUH]UHH}H}tHE]UHSHH}HEH@HpHEH@ H^HE@HEPHEH@HHEH@ H~9~HEH@HjHEH@ HUHUH[]UHH0H}HuUHEH@ HUHR(HHEH}uNHEHEU܉PHEPHEPHEHUHPHEH@ HEHP HEHPHEUHH H}HEHHEgHEH@Hu*HEH@ HEHEH@(HUHRHMHH(HEH@HEHEHP HEHPHEHUHP HEHEH}uHEHUHH0H}HuUHE@EHEU܉PHEH@M܋UHuHvH}HHEE܋U)HMHEHHwUHH H}u}HEHcHHDHE}HEUHcHHTHEHcHHTHEUHcHJHUHTHEH[HEHOHEUHSHH}u}؃}Ѓ}HEHcHHDH)HHEHcHHTUHEHH[]UHSHXH}HuUYHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEH?EHEH0EЋE9EMEЍPHEE;EEЋUԉ)ȃHEUHcHHDHEȃ}HEHcHHDHEHEHEHEHEE;E|$HEH}HEHH"HEH}HEH0HE;Et m}tHEH;EHX[]UHSHPH}HuBHEHHHEHmHEHHHEHEH@H;EE}HEHcHHDHEHEHEHEHEЋE9EMEЍPHEEЋUԉ)ȃEЋUԉ)ȃHE؋UHcHHDHEȃ}HEHcHHDHEHEH%EHEHEE;EHEHUHEH9HHEHUHEHHHEH;EHP[]UHH8H}HuHUHEЋEHEHHHEHEPHEHEPHEH@HEE;EsHEHEHPHEH0E)EHE@;Ew3HE@)EHEHEHP HEHHEHHHjHEЋUHEUHH}uUHEHHHEHEEHHHHEHHPHEHPHEHHHEHEPEHEPHE}HHHHEHHPHEHHEHHHuHE]UHHHhdHX`HhH‹d9sHhHd`ub+@V0)@v)@n`HXHhHHkHEH}u HhHp`HdHpHHHEHEHHHdtqdHEHHHhHH HEH}u HEHUHPHEPHEHEPHE@HEPHEHEHE@‹dHEHHEHEHHUHHEHMHpHHHiUHHHxtHxH‹t9wP+@0)@{)@HxHHtHHHEHEtuHEHHtHEHHHxHHHEH}uLHE@HEHHEHEHHUHHEHMHHHHEHHUHSHH84H8H‹49w:+@0)@{)@H8H@H4H@HHH!HEHEHHHEHE@4uTH8H@HURHMHqH8HyHHEHPHE@PHEPHE@EH8H@4HURHuHvH8HHE4HEPE̍P49u ?H8H@4M̉)ӉډH8HyHuHE4Ủ)ȍPHMH8HHSHEH}u HE@HEHxHEHEHHUHHEHMH@HHz4t:+@0)@)@HEH@HHEH@ HHEHEHEH@ HEH@9E܋MHEHHHEHEHHHEHEHPHEHPHEPHEЉPHEЋUHcHHDHE5HEЋPHE@)HEЉP}HEHcHHDHEHEH;EuHEH@HEHEHHUMHcHHTHH8H@(HMH8HHHUH@HHHH[]UHH}2HEH@HPHEH@HH@HHEH@HPHEHPHEH@HH@Hu]UHHH}HEHPHEHPHEH@HUHHHHEH@HHt HEHaHEH@HUHHH}HEH@HH@ Ht@HEH@HPHEH@HH@ HHEH@HPHEHPHEHbHEH@HUHH9uHEH@HBHEH@HPHEHPHEH@HHHEH@HH@ H9tHEH@HUHHHhH`HhHpHHHpHHE3HE@HEHPH`HHHpHHEH}uHUHATSHHXHXH`HHTH`H HEHE@u/+@W0)@)@HEXHEH@HAHEH@ HAHE@9t/+@Z0)@)@|HEHEH@HAHEH@ HA9~HEH@HHEH@ H9t/+@]0)@ *@ HE@HEXHEH@HAHEH@ HAHE@9uZHEHEH@H AHEH@ HA9~HEH@HHEH@ H9tH`HHEH}NHĠ[A\]UHSHXH}HuHUMHE*@HE*@HE*@HE*@HEHHEH؃EEHHEH}tpHEH@Hu HEH@ HtV}HHLEHUHEIHѺ*@HǸcHEH@HUHuH EHHLEHUHEIHѺ*@HǸEHHTHEHƿ*@H}u*@HEHE@Hƿ*@HE@HEHPHEHHп+@fH}t7HEH@Hu HEH@ HtHEH@ HUHuH2HEHHHX[]UHHH}HuHEHZHƿ+@HUHEHHA,+@HEHHu.+@H wÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH%.*sinsert offset = %zu, str = '%s' extract pos = %zu: erase offset = %zu, size = %zu who's gonna be, Mr. Black, but they You got four of special> don't know each other, so nobody wants to back. down/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.csizeoffset < rope_size(rope)offset == 0node->leaf_size != 0node->tree_size == rope_node_size(node->link[0]) + rope_node_size(node->link[1]) + node->leaf_sizenode->height == (((rope_node_height(node->link[0])) > (rope_node_height(node->link[1])) ? (rope_node_height(node->link[0])) : (rope_node_height(node->link[1]))) + 1)┌──└──│ %s%snil{ len = %zu, height = %d, data = ''}size = %zu string = ''rope_checkrope_eraserope_extract_noderope_insert;\*x8 (?H`hX(0Hh/0[PpWYV( Hn @`vzep zRx *zRx LAC Z <KAC X \HeAC ` |lAC g 6AC q !AC \ +AC f AC Y AC Y <%AC ` \lAC g |HmAC h kAC f tAC o 4AC P ,AC Z +AC X <(AC T \!AC Y $|AC E AC  AC  whAC c AC  $$.sAC Ei $LyAC E $tpAC Ef &AC  AC  zPLRxP @ $$;2@AC  $L!2@AC  $t2@AC H tfRAC M ZAC U AC  $2@AC  $AC J $L2@AC E LvAC q $lJf@XH    e @ @ @ x @ '@3`3`o`@@ @  5`8@ @( @ o@oo@3` @ @ @ @ @ @ @& @6 @F @V @f @v @GCC: (Debian 4.7.3-4) 4.7.3,l @,,@Nl @)@7?oint6&ft(x~44>)4*  (/: C1F# E3[# #5[# 7# 9:# QJ J 10< O>Q# T@# Bm# -D# F# H#(W79@jU[l @ @"UQhg[ @ @`V1gh^n @ @1nh!nm`-nXCoPoHTp@ @y @ G!mX-PCH@T1hy @ @w1h @ @ctxh `4X4P @ @@ hn4` @@S h4`@7@ hptr`"7@\@`(\@@1(h([dstr(X@5@ I1Xpos[T Qh5@@1h[d[`,@@1hAF@)@@ g,@K'@7?oint6&ft'F(444  - J. (/> C1F# E3[# #5[# 7# 9>#UNN 10< O>U# T@# Bx# -D# F# H#(_K 1M#topO# Q#[UUN-79-=@J=f,jU[,@K@UUhg[K@h@1ghh@@`ith1`96F@@@6Uh@@<@ p@U`JU<@@1JX JPJ[LLUhH\@_@1\Xit^Uh_U`sU_@@@1sXsUPs[Lu[l x`}U@V@}UX|}FTUhUV@@ U`|F\@V@` F(U`UXFTkUHpFDF@0&UiUnFF-V@@ `(U`UXFTkUHpFDF@@@U]U FF@@ yHy@SO  [l  U` H[\[!q0@;@ 0X"dir0FTS0mP 2Uh#QF;@ @ 1Q|Q[| Q|Q[|$Z b+@ 0XUh ]| ``4@@ lUX=N N-#U @*@@ \ 1|[|$Zl  P+@ | h 0U`=l N\ #F*@ @ q 1|[|$Z  :+@ | X UP |FL%@P@O [ ~ 0U@^ @ U@= N q &m @0!@  "ith# U0!@!@`  "it h#U!@Y"@ # "ith'<Y"@"@  1<|< | d>| AUh  4 'L"@$@  1L| dN| QUX$Z  /+@q ( i$@&@  iU*j kD"dirkF m @ eo  q[\ r7PD N)&@K'@@1hR `% $ > : ; I$ >  I' II '   : ;  : ; I8 I !I/ .: ; ' I@B : ; I .: ; ' I@B .: ; ' @B 4: ; I .: ; ' @B : ; I .: ; I@B .: ; @B .? : ; I@B % $ > : ; I$ >  I' II '   : ;  (  : ;  : ; I8 I!I/  : ;  : ; I8 &I.: ; ' I@B : ; I .: ; ' I@B .: ; ' @B : ; I .: ; ' @B 4: ; I .? : ; ' @B 4: ; I  U .: ;' I@B : ;I 4: ;I !.: ;' I@B ": ;I #.? : ;' I@B $4I4  % &.: ;' @B '.? : ;' @B (.: ;' @B ).? : ;' @B  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/includerope.hrope_common.hrope.cstddef.h l @tY.5.Zuu&K.~.>2222K2/Y.KK2!u/3ZYYY"ZYYYYYYYYZ2KY% /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includerope.hrope.cstddef.htypes.hstdio.h ,@tY..~.tY6!>s-w"IW;hx0uvuK2/ʻ˻u t2/$2-iK21z=Y/K4 Kg $ "J%<# tY/L4MKgc  t=Y>0[h h<J K .(///K.%L#u# .&ugs"3u"&uu.$s'/s6XLu g/gi!.>Y /:@2L2==Ov=#3N,zLx;.J.JLs,N)WW:MqX,u"t/2uI/s>tYx/long long inttest_rope_newrope_split_functest_ropersize_trope_alloc_func/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/rope.cstr_getnrope_node_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitshort unsigned intdatarope_nodestr_printleaf_sizesplit_ctxunsigned chartree_sizerootalloc_ctxrope_createlong long unsigned intrope_deletemaintest_rope_cuttest_rope_insertsizetypemem_freerope_free_funcGNU C 4.7.3short inttest_rope_extractlong doublemem_allocrope_sizep_endrope_node_printnew_noderope_node_heightROPE_HEIGHT_MAX__PRETTY_FUNCTION__l_left_heightdirectionold_sizel_right_heightrope_iter_nextparentrope_relinkconninsert_heightavl_route_to_offsetchild_prefix_lenr_left__ssize_tr_left_heightr_right_heightl_leftavl_rebalance_after_deleterope_clearadjust_sizerope_iterl_rightavl_route_to_nextrope_eraserssize_tvisit_leafrope_traverseavl_rotate_doublerope_node_newsplit_noderope_pretty_printrope_iter_startsave/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/rope.cleft_sizeprint_leafr_rightpaddingrope_iter_down_to_leafchild_prefixp_offsetmirrorpathrope_node_splitavl_rebalance_after_insertrope_checkavl_rotate_singlerope_iter_createrope_extract_nodewwvw w #w#;v;<w<=w=@w@vwww v  w wwBvBCwCDwDGwGcvcdwdewehwhvwwwvwwwvwwwvwww[v[\w\]w]`w`vwww3v34w45w58w8vwwwvwwwvw w #w#;v;<w<=w=@w@TvTUwUVwVYwYrvrswstwtwwwvwwwvwww2v23w34w47w7vwww)v)*w*+w+.w.vwww)v)*w*+w+.w.vwwwcvcdwdewehwhvwww v w w w v w w  w vwwwvwww]v]^w^_w_bwb,v,-w-.w.1w1vwwwvwwwvwwwvw#\"#@?TU.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N  @ V@^o@Lko@Pz( @( @ @@ 8 x @x  @  @ d'@' '@'~p+@p+\,@,2@2M3`33`33`33`34`45`55`5 5`5055`) 65HCLO0RZWe[fgsr %X }@@<@`@ @@@@ ( @ @ @ x @ @ @'@'@p+@,@2@3`3`3`3`4`5`5`5` !" 3` @. @A @W5`f3` @ @3` l @ @ @e @l y @6 @! @+  @ @ 7@%- \@l> @mP 5@k^ @t ,@ K@h h@y @ @ <@ _@h @ V@s @ V@p @" @4b+@ MP+@f:+@  @R/+@  $@2@3`3`5`3`3`5`5`5 '@EWl  5` !@5`'@ 0!@Z "@-Hg5`t '@P @ P'@ Y"@5` @ &@v5` @ ;@ *@* > @!P j x @ @crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryrope.crope_node_sizerope_sizerope_createrope_newrope_deletestr_getnstr_printmem_allocmem_freetest_rope_newtest_rope_inserttest_rope_extracttest_rope_cuttest_roperope_iter_createrope_node_heightrope_relinkrope_node_newrope_node_splitavl_rotate_singleavl_rotate_doubleavl_rebalance_after_insertavl_rebalance_after_deleteavl_route_to_offsetavl_route_to_next__PRETTY_FUNCTION__.3131__PRETTY_FUNCTION__.3140__PRETTY_FUNCTION__.3148rope_iter_down_to_leaf__PRETTY_FUNCTION__.3190rope_node_print__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5putchar@@GLIBC_2.2.5abort@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startrope_iter_nextputs@@GLIBC_2.2.5_edata_finistrlen@@GLIBC_2.2.5rope_iter_startrope_checkprintf@@GLIBC_2.2.5snprintf@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_start__gmon_start___IO_stdin_used__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5rope_traverse_end_startrope_pretty_print__bss_startmainrope_insertrope_erase_Jv_RegisterClassesrope_extract_node_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initrope_cleartarantool-1.5.1.218.g1a69fd6/test/unit/bitset_basic.test0000775000000000000000000016246112213333055021264 0ustar rootrootELF>@@ @8@%"@@@@@@@@@dd dd`d` dd`d`@@DDPtdYY@Y@Qtd/lib64/ld-linux-x86-64.so.2GNU GNURvF8:TFy=[C  "$5$@`i@X! 9x@ ~BI%DV' !#$%'()*-.123478:=>?@ACEFHILMOPQRTUTf=e/+F-9뺽Pm7i(Kuu[&@cz"cwW"Bcmh͊? ]  2bi.! ^nxE%%6X{urEġ‰r-* : 1)r=k Cs4|Xdz"k|BEweLJ8_ o2?4#| Á / ^1eP%qX + : N h` 1@ u,@l +@= 8L@ K2@8g`8 A,@4 ,@40g`t F/@?Q@ u*@P H@6 [O@I L@\ 2@ /H@ '@W1tQ@ &@@ L@ ' pQ@ zL@V @6 3@" @q .@{ M@ P@ J@ KL@ K@ &@ J@T) &@AD (L@ (@ ,@oM ]N@ J@  g` E@J M@J@ g`7 G@q R7@` P@ %@>0g` L@! c+@ }+@Ip iF@D1 ~.@` L@ +@  &@1Hg` 0@?$ L@! P-@lw`@V L@_ .@h T+@ cL@0g`libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitputsrealloc__assert_failmemsetstdoutrandmallocstderrfprintfqsortsetbuf__libc_start_mainfreebit_index_u64bitset_page_set_zeros__libc_csu_finibitset_pages_iterbit_rotr_u32bswap_u32bitset_pages_searchbitset_pages_nextbit_index_u32_edatabitset_page_nandbitset_pages_iter_recursebitset_infobswap_u64bit_rotr_u64bitset_pages_prevbitset_pages_nsearchbitset_test__data_startbitset_destroybitset_page_set_onesbit_iterator_nextbitset_pages_lastbitset_pages_removebitset_page_create_IO_stdin_usedbitset_page_alloc_sizebitset_createbit_ctz_u64bitset_page_andbit_count_u64__libc_csu_initbit_clearbit_setbit_ctz_u32bit_rotl_u64_endbitset_pages_insertbit_iterator_initbitset_pages_psearchbitset_pages_newbit_count_u32bitset_page_data__bss_startbitset_pages_reverse_iterbit_rotl_u32bitset_page_destroybitset_setbitset_cardinalitybit_testbitset_pages_reverse_iter_recursebitset_pages_firstbit_clz_u32bitset_pages_reverse_iter_startbitset_pages_iter_startbitset_page_orbit_clz_u64bitset_clearbitset_page_first_posGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_& ui xf` 0g`8g`f`f`f`f`f`f`f`f` f` f` f`Pf` g`=g`g`g`HHQ HtH5Q %Q @%Q h%Q h%Q h%Q h%Q h%Q h%Q h%Q hp%Q h`%Q h P%Q h @%Q h 0%zQ h %rQ h %jQ h%bQ h1I^HHPTIpQ@HP@Hǿ%@G7g`UH-0g`HHw]øHt]0g`0g`UH-0g`HHHH?HHHu]úHt]0g`=P uUH~]P @H=N tHtUd`H]{vUHHPpT@Q@8HE@H9HEHHtAHGP H$pT@AAQ@Q@Q@R@HǸeHEHE HLyAHO H$pT@AAQ@JR@OR@R@HǸHEHEHyAHO H$pT@AAQ@JR@gR@R@HǸfHEHEHyAH3O H$pT@AAQ@JR@R@R@HǸ QHEHEH H;EtAHN H$pT@AAQ@Q@R@R@HǸHE HyAHN H$pT@AAQ@JR@OR@R@HǸ]HEH H;EtAH2N H$pT@AAQ@Q@R@R@HǸ PHEHyAHM H$pT@AAQ@JR@R@R@HǸHmHEHY H;EtAHM H$pT@A!AQ@Q@R@R@HǸ\HEHyAH.M H$pT@A#AQ@JR@R@R@HǸLHEH H;EtAHL H$pT@A$AQ@Q@R@R@HǸHEH?yAHL H$pT@A&AQ@JR@R@R@HǸ]HEH H;EtAH2L H$pT@A'AQ@Q@R@R@HǸ PHE H yAHK H$pT@A)AQ@JR@R@R@HǸHmHEHY H;EtAHK H$pT@A+AQ@Q@R@R@HǸ\HEH yAH.K H$pT@A-AQ@JR@S@R@HǸLHmHEH H;EtAHJ H$pT@A/AQ@Q@R@R@HǸHEH pT@ S@DHUHSHHH}HuH}HEHcHEHUHH)H]HuHHEHȺHuHHEHHEHEHHEHHHEHEHHEHHEH HEHHHHEHHEHHEHHEHEHH;E?HH[]UHH}HuHEHEHEHEHEHHEHH9sHEHHEHH9v]UHSH_T@Q@HP@HHE@HEHHHE4S@HE#HEHHEHHHHEHEH;ErӿLS@OS@>HErHEHHEHHHPHHyAH9H H$_T@AgAQ@JR@aS@R@HǸWHEHEH;ErLS@~~S@HUHEHHTHEuHEHHEHHHPHH2tAHG H$_T@AnAQ@Q@S@R@HǸ\HEHEH;ErLS@S@HUHEHHHE"HEHHEHHHHHHHHHHH)HHEHHEHHHPHHFyAHF H$_T@AvAQ@JR@S@R@HǸdHEHHEHHHPHHtAHF H$_T@AxAQ@JR@S@R@HǸ=HEHEH;ELS@`S@HUHEHH6HEHEHHEHHHHHHHHHHH)HHEHHEHHHPHHt(HEHHEHHHƿS@HEHHEHHHPHHwtBHD H$_T@AAQ@Q@S@R@HǸHEHEH;ELS@ T@*HuHE@HHEHEHE@H}vHEHEHEHHtuHEHH;EuhHEHHPHHtAHC H$_T@AAQ@Q@T@R@HǸHE[HUHPHH!tAHvC H$_T@AAQ@JR@4T@R@HǸNHEHEH;ELS@HT@HUHEHHHEHEHHEHHHtmHEHHEHHHPHH[yBHB H$_T@AAQ@JR@S@R@HǸyHEHEH;EcLS@T@HE`HUHPHHtAHB H$_T@AAQ@JR@4T@R@HǸ-HEHEH;ErLS@THEH8HPH_T@ S@UHHĸ[]UHH}HuH[A HÐUHH}HEH@(]UHHH}HuHE8HHEHUHP0HEHUHH0H}HuHUHEHEHEHLHEH@0HUHиUHHH}HEHUHѺR&@H HE(HJUHSHHH}HuHEHHEHEHUHH HEH}uaHEHH;EwHEHHH;EwU@LT@T@HEHHUHH)HEHHH%#HHH[]UHSHXH}HuHEH#HEHEHUHH HEH}uiHEH@0HuHEHEH@0HUHֿHEH}u HEHcHUHEHHEHUHHa HEHH;EwHEHHH;EwU@gT@T@HEHHUHH)HEHHH_"E߀}t-HEH@(HPHEHP(HEH@HPHEHPHHX[]UHSHHH}HuHEHHEHEHUHHHEH}u 4HEHH;EwHEHHH;EwU@T@T@HEHHUHH)HEHHH!EEt HEH@(HuU@T@,U@AHEH@HuU@T@DU@HEH@(HPHEHP(HEH@HPHEHPHEH@Hu5HEHUHH HEH}HEH@0HUHиH2HH[]UHH H}HuHE HHEH@HEH@0HHHEHPHEH@HEHEHHE5HEHHPHEHHEH@HEHEHUHH-HEH}uHEHH;EtU@T@`U@ÐUHH}]UHH}HEH HEHE]UHH H}HEHHHEHH)HHHEHUHEH\UHH}]UHH}HMHHHH HHHHHH)HEH)]UHH H}HEH>HEHEHUHH H}HEH HEHEHUHH0H}HuHEHHEHEHHEEE"HEHHUHH!HHEHEEE;E|UHH0H}HuHEHfHEHEHVHEEE%HEHHUHHH!HHEHEEE;E|UHH0H}HuHEHHEHEHHEEE"HEHHUHH HHEHEEE;E|UHH}HuHEHHEHH9sHEHHEHH9v]UHH}HEHPHEHHEHPHEHPHEHHHEH@H HHEHPHEH@HHHEHPHEH@HHHEHP]UHH}HEHHEHEHH;Et# HEH@HEHEH@HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@HHEHEH@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@HHUHH9tJHEH@HHEHEHH;E HEH@HEHEH@HUHH9uHEHHEHEHH;EuPX@YU@V@%HEHHEHUHEHHE}yHEHEHEH@HE}~7HEH@HHEHEHH;EuPX@YU@V@HEHH;EuHEHEUHH0H}HuHEH@HUHH9tNHEH@HEHEHH;EHEH@HHEHEH@HHUHH9uHEHHEHEHH;Eu0X@YU@V@HEHHEHUHEHHpE}yHEH@HE}~?HEHEHEH@HHEHEHH;Eu0X@YU@V@hHEHH;EuHEHEUHH H}HuHEHHE$}yHEH@HEHEH@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHH5E}yHEHEHEH@HE"}~HEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@HE*}~HEHEHEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHPHHHHH@H HHHPHH@HHHHPHHHHHEHEHHHHpHEPHE@E}uX@YU@+V@}yHEHPHEHH@HHEHPHEHH@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHPHEH@HHEH@HEHEH@HHEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHE=HEHHHEHEH@HƒHEH HHEHPHEH@HOHEH@HEHEH@HtJHEH@HHHEHPHEH@HHHEHPHEH@HHHEHPHEH@HEHEH@HHEHEH@HHEH@H HHEHPHEHUHPHEH@HHEH HHEHPHEH@HHHEHPHEHEHEHUHHmHUHH9HHHHHHHHRHHPUHHHXHPHEHXHH`H`HEHEHHPHHHEPHE@E܃}yHEHPHEHH@HyHEHPHEHH@HH}uYHE@HEHEHE&HE@HEHPHEHH@HHEHEHHXHH9u HEHEHHXHH9HEHH;PtW@YU@4V@pHmHEHH;PUHEHH@HEHEHHUHHRHHHPHRHH HPHEHHPHRHPHEHHPHRHHHUHHRH HPHPH@HHEH HHPHPHEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHPaHEHHHUHHHUHHHRH HP.HPH@HEHXHH;EHPH@HtW@YU@HV@HEH@HuW@YU@V@HEH@HHHEHPH`H9EuHXHUH HEH@yHEHHHUHP HEHHHUHHHRHуHUH HP H`H9EuHXHPHXHt HEHH@HtGHEH@xW@YU@V@HEHHHXHHP HXHPHEHHm HE@uW@YU@V@:HE@HEHHUHHHPHEHHH@HtW@YU@V@HEHH@HHEHH@HHEHEH@HEHEH@HHEHHUHHRHHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPIHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHUH`H9wW@YU@PW@^HEH@yHEHHHUHPHEHHHUHHHRHуHUH HPHEHH@HHEHEH@HEHEH@H=HEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPH`H9EuHXHUHHEH@yHEHHHUHPgHEHHHUHHHRHуHUH HP7HEHHUHHRHHPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHEHUHkHEHHUHHHHUHHRH HPHEHH@HEHEH@HVHEH@HHEHEH@HEHEH@HHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HƒHEH HHEHPHEH@HHEHEH@HHEH@H HHEHPHEHUHPHXHH;EuW@YU@sW@oHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HHHEHPH`H9EuHXHUHxHEH@yHEHHHUHPQHEHHHUHHHRHуHUH HP!HEHH@HHEH@HxHxH@H)HEHHUHHRHHPHEH@HHHEHPHxH@HHHxHPHEHH@HpHEHHpHRHHPHEHHHpH@H HHpHPHUH`H9wW@YU@PW@xHEH@yHEHHHpHPHEHHHUHHHRHуHpH HPHEH@HHHEHPHEHHUHHRHHPHEH@HhHhH@HHhH@HHHhHPHEHH@H`HEHH`HRHHPHEHHH`H@H HH`HPH`H9EuHXH`HHEH@yHEHHH`HPHEHHHUHHHRHуH`H HPpHEH@HHHEHPHmHUH`H9BH`HXHHXHH@HtW@YU@W@`UHH0H}HuHUHMHEHH;Eu HEHHEHpHMHUHEHHEHEHH;EtHENHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHKUHHPH}HuHUHMLEHUHEHH$E}HEHPH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@HHHMHUHEH}~,HEH@HHH}HMHuHEIHNHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIH{HEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@HHHMHUHEHHEHEHH;EtHEJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHHUHHPH}HuHUHMLEHUHEHHE}HEH@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHpHMHUHEHu}y%HEHPH}HMHuHEIHJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEÐUHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE E[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE!E[]UH}E]UHH}HE]UH}E]UHH}HEH?]UHH}EHOUHHH}H}8UHS}uEUӉÉ[]UHSH}uEHUHӉHH[]UHS}uEUӉˉ[]UHSH}uEHUHӉHH[]UH}E]UHH}HEH]UHH}HuHU؉ȈEHEHUHPHEHPHEHP HEHP HEHHEHP(}tHHUHBHEH@HEH@ HU؃HHEHEH@ H;EHtAHEH@ HHEHHEHHEH@H1HEHHEH@ HPHEHP jHEHPHEHHEHE*HEH@ HEHEH@ HPHEHP HEHEH@ H;ErHEHHEH@H1HEH]UHHH}HEHP HEH@(H9Ht HHEH@ HHEHHEHHEH@H1HEHHEH@ HHEH@HH)HHHHEHPHEH@ HPHEHP HEHHHSHEHHEHEHHEHHH!HEHHEHPEHHUHH }HuUEEEECExEEEEmmEHHHEHЋUMʉEE;E|EHHHEHEHHHEHUHH}HuUHEEE=HEHUH!Ht%EHHHEHЋUMʃEHeEE?vEHHHEHEHHHEH]ÐH5 11DHHЃ@uÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1aHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH *** %s *** /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/bitset_basic.cfalsebitset_cardinality(&bm) == 0Test failed: %s is %s at %s:%d, in function '%s' truebitset_set(&bm, 10) < 0bitset_set(&bm, 15) < 0bitset_set(&bm, 20) < 0bitset_cardinality(&bm) == cntbitset_clear(&bm, 20) < 0bitset_clear(&bm, 666) < 0bitset_clear(&bm, 10) < 0bitset_clear(&bm, 15) < 0 *** %s: done *** Generating test set... okSettings bits... bitset_set(&bm, nums[i]) < 0Checking bits... bitset_test(&bm, nums[i])Unsetting random bits... bitset_clear(&bm, nums[i]) < 0Checking set bits... Fail :%zu Checking all bits... bitset_test(&bm, *pn)bitset_test(&bm, i)Unsetting all bits... test_get_settest_cardinality/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/bitset.cpage->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * 8bitset->cardinality > 0page->cardinality > 0bitset_cardinality(bitset) == cardinality_checkbitset_infobitset_clearbitset_setbitset_test/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/page.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0bitset_pages_removebitset_pages_insertbitset_pages_prevbitset_pages_nextbitset_page_orbitset_page_nandbitset_page_and;? XS@(RHh' @`M !@`C @`2 o@)`_8LY8hXxx 8 4X Bx S E  0 X zRx ع*zPLRx`@ $$4d@AC  zRx $hAC E D4WAC R $kCd@AC H >AC y AC M @AC { "EAC @  GAAC | $thRd@AC E $Wad@AC EM $'pd@AC E AC  LAC J ;AC U 5IAC D $^ AC E DH=AC x de4AC o y4AC o lAC g oAC j (lAC g tGAC B ${AC v D`AC [ d6hAC c ~?AC : ?AC : AC  #AC  AC  $1AC  D`AC [ d AC  DAC ? AC } 'AC  6AC 1 AC } $$i,e x ?# # # # # K#( 0#0 Y#8 #@ #H e#P #X y #` V #h H ?#p u?#t p#x M# [# # # &{# /# 0# 1# 2# 3-# }5?# 7# +| # # ?#  x  0FE Ed# "Ed#  Cd D-# E# F-# MGj#  y(J Jd# J#Jy8P R# S-#( T#0-5 @@L\ pT@bm cnt-h \ L7@@`arr7P7-@@i=-X@@j>-Ptmp?-H-fF?@@IaFXbFPaaHhbbI`U@%@  _T@bmY~\t]pnP-r@@i`-X@H@ if-Pt@@,im-H) @f!@Nit-@!@"@qi-#@$@i-;$@$@i-$@r%@i-  -F?%@%@4?l4`$e&@Q+@;jint"0p oEE#"E#  CD0#E#F0#MG#  e  ,(J7J#J#J8PyR7#S0#(T#0   0 y: 0#F0#E0#`0#e6t0&@&@''h-Ba&&@R&@@q&qh&`B0R&@&@t0X0Parg0H3qh76:&@&@ :qhUA&@'@`AqposA0keyCGX U@o   UQB'@(@@QqposQ0keySWXP U@1hO'@8(@PZ0P P  @uB(@u*@ uqposu0keyw{X U@1W   :u*@Q+@]qXA]P0h`c U@ jT+@J@8;jint"0p o7;w)z;EE#"E#  CD0#E#F0#MG#  e, ,,(JXJ#J#J3 xx x 0 c)me6tBZ0T+@c+@ZzhAlxc+@}+@@.lXrnhs}+@+@msXPu0h{+@+@{h0+@ ,@`pos0h ,@A,@XMxhgA,@u,@ QXMxhuu,@,@dstHsrc@dhs` X@cntBX,@,@iB\ ,,@P-@dstHsrc@dhs` X@cntBX-@N-@iB\ ,P-@-@@FdstHsrc@dhs`V bX@cntBX-@-@iB\ V,FNB-@.@aNhbN`Y.@~.@ YhXY~.@.@` YXretYhY.@F/@ aYXretYh6YF/@0@ YHY@retYh PX@/@i0@Y`/@i0@cmpYB\ ,$Y0@1@ YHY@retYh 0X@0@1@Y`91@1@cmpYB\Y1@K2@ $YXkeyYPretYhcmpYBdYK2@2@@ YHkeyY@retYhY`t2@2@cmpYB\,Y2@3@ " YHkeyY@retYhY`3@o3@cmpYB\HY3@R7@  YoYoY Y#cmpYB#Y oY h  X@34@4@ cmpYB\4@7@Y`5@5@_ YP75@5@YHW5@5@Y@5@6@Y6@6@Yg6@6@YY  b ,b , oYR7@E@`  YnYnYj Y#cmpYB#Y hY `Y n  W@7@W8@ cmpYBL8@:@ Y K:@<;@ Y@B<@ >@W YYYX >@?@ YY<>@y?@ Yy?@?@Y?@WE@Y9@@B@T YPYY~i@@wA@|Y~B@+D@ Y~B@C@Y~+D@WE@Y~QD@@E@Y~E E , \YE@iF@ YXYPcbYHargYx@E@gF@retYhY`    xRYiF@G@ tYHaY@YcbYargYxcmpYBdF@+G@EretYh]G@G@retYPYXYG@/H@ YXaYPcbYHargYx@retYhY/H@H@ lYXYPcbYHargYx@bH@H@retYhY`GYH@J@@;YHaY@YcbYargYxcmpYBd%I@I@ retYhI@J@retYPYX-YJ@J@YXaYPcbYHargYx@retYh1.J@P@i ;jint" 3~o7;!0v#{#0#a## end#(  @xJ@J@x M@@ pos@0 B0` C0X EPo e RxJ@K@`  MR @ posR0 T0` U0X WP 1XxOe fxK@ L@ Mf @ posf0 h0` i0X kP 1lxO B L@L@  xsl BL@(L@ xh B(L@8L@* xsl B8L@KL@@] xЅhBKL@cL@ xslBcL@zL@ xhszL@L@`xsdrB`L@L@Gx`rB\0sL@L@ x0sdr0B`:L@L@x:`r:B\IsL@M@xIslYM@M@@5xYhM@]N@itXMPP0HsetxDe`wh0]N@[O@itXbitBl][O@P@` x]s\ ]P ]BX {`BliaBh edO@O@al`B B|P@P@ x|X |P |BLP@P@bithiBd#P@qP@kB`% : ; I$ > $ >   I& : ;  : ; I8 : ;I8 : ; I !I/  : ; !I' II.: ; @B 4I4  4: ; I &I.: ; ' @B : ; I : ; I  .: ; ' I@B 4: ; I  .? : ; ' I@B 4: ; I? < % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I &I.? : ; ' @B .: ; ' I@B : ; I 4: ; I .? : ; ' I@B 4: ; I 4I4  !I/  % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I 4: ; I .? : ; ' @B 4: ; I .? : ; ' @B : ; I 4I4   !I/ &I.: ; ' I@B .? : ; ' I@B  : ; I8  .? : ; ' I@B % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I .? : ; ' I@B  : ; I : ; I 4: ; I & .? : ; ' I@B .? : ;' I@B : ;I .? : ;' @B : ;I 4: ;I .? : ;' I@B 4: ; I  .? : ; ' I@B W /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitsetbitset_basic.cstddef.htypes.hlibio.hstdint.hbitset.hstdio.h @ ?7J7YJ7YJ7Z 7J7 7J7Y 7J7 7J7 7J7Y 7J7Y 7=J,X9 x/u/vZ2?>>X,7X//7X/C,7,7Xݠ/C/(/7zX ֠7v7Xޡ/,7Xݡ7X=?=Y/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebitset.hbitset.cstddef.hstdint.hpage.h &@.Y2>YY2Y2.Kuv.2x.Kv=XKu1.(=hw=>x.Ku.(==>0[{Y/!cz -u /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/syspage.hpage.cstddef.hstdint.hbitset.htypes.htypes.h T+@]4K2eLK2132Y2Y2uJ2uJ2uJ./u/vZ0sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt(" /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebit.hbit.cstddef.hstdint.h J@ɻ% <ɻ(.K <ɻ(0K zL@+ +@ ? '@WJ &@] J@Tf z /H@ ~.@` (L@ H@6  iF@D P-@l.F @L 8L@Xj8g`~ (@ +@=crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrybitset_basic.ctest_cardinality__func__.3540shufflesize_compatortest_get_set__func__.3561bitset.cbitset_destroy_iter_cb__PRETTY_FUNCTION__.2766__PRETTY_FUNCTION__.2774__PRETTY_FUNCTION__.2782__PRETTY_FUNCTION__.2796page.cpage_cmp__PRETTY_FUNCTION__.2813__PRETTY_FUNCTION__.2826__PRETTY_FUNCTION__.2869__PRETTY_FUNCTION__.2901__PRETTY_FUNCTION__.2696__PRETTY_FUNCTION__.2684__PRETTY_FUNCTION__.2672bit.c__FRAME_END____JCR_END____init_array_end__dso_handle__popcount_tab__popcountdi2_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE_bit_index_u64bitset_page_set_zeros__libc_csu_finibitset_pages_iterbit_rotr_u32free@@GLIBC_2.2.5bswap_u32_ITM_deregisterTMCloneTablestdout@@GLIBC_2.2.5data_startbitset_pages_searchputs@@GLIBC_2.2.5bitset_pages_nextqsort@@GLIBC_2.2.5bit_index_u32_edatabitset_page_nandbitset_pages_iter_recurse_finibitset_infosetbuf@@GLIBC_2.2.5printf@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5bswap_u64memset@@GLIBC_2.2.5bit_rotr_u64bitset_pages_prevbitset_pages_nsearch__libc_start_main@@GLIBC_2.2.5bitset_test__data_startbitset_destroybitset_page_set_onesbit_iterator_nextbitset_pages_lastfprintf@@GLIBC_2.2.5__gmon_start__bitset_pages_removebitset_page_create_IO_stdin_usedbitset_page_alloc_sizebitset_createbit_ctz_u64bitset_page_andbit_count_u64__gcc_personality_v0@@GCC_3.3.1__libc_csu_initbit_clearmalloc@@GLIBC_2.2.5bit_setbit_ctz_u32bit_rotl_u64_endbitset_pages_insert_startrealloc@@GLIBC_2.2.5bit_iterator_initbitset_pages_psearchbitset_pages_newbit_count_u32bitset_page_data__bss_startbitset_pages_reverse_itermainbit_rotl_u32bitset_page_destroybitset_setbitset_cardinalitybit_test_Jv_RegisterClassesbitset_pages_reverse_iter_recursebitset_pages_firstbit_clz_u32bitset_pages_reverse_iter_startexit@@GLIBC_2.2.5_ITM_registerTMCloneTablebitset_pages_iter_startbitset_page_or_Unwind_Resume@@GCC_3.0_initbit_clz_u64rand@@GLIBC_2.2.5stderr@@GLIBC_2.2.5bitset_clearbitset_page_first_postarantool-1.5.1.218.g1a69fd6/test/unit/unit.h0000664000000000000000000000360612202131537017047 0ustar rootroot#ifndef INCLUDES_TARANTOOL_TEST_UNIT_H #define INCLUDES_TARANTOOL_TEST_UNIT_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include /* exit() */ #include #define header() printf("\t*** %s ***\n", __func__) #define footer() printf("\t*** %s: done ***\n ", __func__) #define fail(expr, result) do { \ fprintf(stderr, "Test failed: %s is %s at %s:%d, in function '%s'\n",\ expr, result, __FILE__, __LINE__, __func__); \ exit(-1); \ } while (0) #define fail_if(expr) if (expr) fail(#expr, "true") #define fail_unless(expr) if (!(expr)) fail(#expr, "false") #endif /* INCLUDES_TARANTOOL_TEST_UNIT_H */ tarantool-1.5.1.218.g1a69fd6/test/unit/bitset_basic.c0000664000000000000000000000662512202131537020522 0ustar rootroot#include #include #include #include "unit.h" static void test_cardinality() { header(); struct bitset bm; bitset_create(&bm, realloc); fail_unless(bitset_cardinality(&bm) == 0); size_t cnt = 0; fail_if(bitset_set(&bm, 10) < 0); cnt++; fail_if(bitset_set(&bm, 15) < 0); cnt++; fail_if(bitset_set(&bm, 20) < 0); cnt++; fail_unless(bitset_cardinality(&bm) == cnt); fail_if(bitset_set(&bm, 10) < 0); fail_unless(bitset_cardinality(&bm) == cnt); fail_if(bitset_clear(&bm, 20) < 0); cnt--; fail_unless(bitset_cardinality(&bm) == cnt); fail_if(bitset_clear(&bm, 20) < 0); fail_unless(bitset_cardinality(&bm) == cnt); fail_if(bitset_clear(&bm, 666) < 0); fail_unless(bitset_cardinality(&bm) == cnt); fail_if(bitset_clear(&bm, 10) < 0); cnt--; fail_unless(bitset_cardinality(&bm) == cnt); fail_if(bitset_clear(&bm, 15) < 0); cnt--; fail_unless(bitset_cardinality(&bm) == cnt); bitset_destroy(&bm); footer(); } static void shuffle(size_t *arr, size_t size) { if (size <= 1) { return; } for (size_t i = 0; i < (size - 1); i++) { size_t j = i + rand() / (RAND_MAX / (size - i) + 1); size_t tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; } } static int size_compator(const void *a, const void *b) { size_t *aa = (size_t *) a; size_t *bb = (size_t *) b; if (*aa < *bb) { return -1; } else if (*aa > *bb) { return 1; } else { return 0; } } static void test_get_set() { header(); struct bitset bm; bitset_create(&bm, realloc); const size_t NUM_SIZE = (size_t) 1 << 14; size_t *nums = malloc(NUM_SIZE * sizeof(size_t)); printf("Generating test set... "); for(size_t i = 0; i < NUM_SIZE; i++) { nums[i] = rand(); } printf("ok\n"); printf("Settings bits... "); for(size_t i = 0; i < NUM_SIZE; i++) { fail_if(bitset_set(&bm, nums[i]) < 0); } printf("ok\n"); printf("Checking bits... "); shuffle(nums, NUM_SIZE); for(size_t i = 0; i < NUM_SIZE; i++) { fail_unless(bitset_test(&bm, nums[i])); } printf("ok\n"); printf("Unsetting random bits... "); shuffle(nums, NUM_SIZE); for(size_t i = 0; i < NUM_SIZE; i++) { if (nums[i] % 5 == 0) { fail_if(bitset_clear(&bm, nums[i]) < 0); // printf("Clear :%zu\n", nums[i]); fail_if(bitset_test(&bm, nums[i])); } } printf("ok\n"); printf("Checking set bits... "); shuffle(nums, NUM_SIZE); for(size_t i = 0; i < NUM_SIZE; i++) { if (nums[i] % 5 == 0) { continue; } if (!bitset_test(&bm, nums[i])) { printf("Fail :%zu\n", nums[i]); } fail_unless(bitset_test(&bm, nums[i])); } printf("ok\n"); printf("Checking all bits... "); qsort(nums, NUM_SIZE, sizeof(size_t), size_compator); size_t *pn = nums; size_t i_max = (size_t) 1 << 14; if (i_max > RAND_MAX) { i_max = RAND_MAX; } for(size_t i = 0; i < i_max; i++) { if (*pn < SIZE_MAX && *pn == i) { fail_unless(bitset_test(&bm, *pn)); pn++; } else { fail_if(bitset_test(&bm, i)); } } printf("ok\n"); printf("Unsetting all bits... "); shuffle(nums, NUM_SIZE); for(size_t i = 0; i < NUM_SIZE; i++) { if (nums[i] == SIZE_MAX) { continue; } fail_if(bitset_clear(&bm, nums[i]) < 0); } printf("ok\n"); printf("Checking all bits... "); for(size_t i = 0; i < i_max; i++) { fail_if(bitset_test(&bm, i)); } printf("ok\n"); free(nums); bitset_destroy(&bm); footer(); } int main(int argc, char *argv[]) { setbuf(stdout, NULL); test_cardinality(); test_get_set(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/queue.c0000664000000000000000000001154012202131537017203 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "third_party/queue.h" #include "unit.h" #include #include struct elem { STAILQ_ENTRY(elem) entry; int val; }; STAILQ_HEAD(elem_queue, elem); const char * queue2str(struct elem_queue *queue) { static char buf[1024]; buf[0] = '\0'; struct elem *elem; int n = 0; STAILQ_FOREACH(elem, queue, entry) { n += snprintf(buf + n, sizeof(buf) - n - 1, "%d ", elem->val); } return buf; } /** Test a queue with 0 elements. */ void test0() { header(); struct elem_queue queue = STAILQ_HEAD_INITIALIZER(queue); printf("Initialized: %s\n", queue2str(&queue)); STAILQ_INIT(&queue); printf("STAILQ_INIT: %s\n", queue2str(&queue)); STAILQ_REVERSE(&queue, elem, entry); printf("STAILQ_REVERSE: %s\n", queue2str(&queue)); footer(); } /** Test a queue with 1 element. */ void test1() { header(); struct elem el1; struct elem_queue queue = STAILQ_HEAD_INITIALIZER(queue); el1.val = 1; STAILQ_INSERT_TAIL(&queue, &el1, entry); printf("STAILQ_INIT: %s\n", queue2str(&queue)); STAILQ_REVERSE(&queue, elem, entry); printf("STAILQ_REVERSE: %s\n", queue2str(&queue)); footer(); } void test2() { header(); struct elem el1, el2; struct elem_queue queue = STAILQ_HEAD_INITIALIZER(queue); el1.val = 1; el2.val = 2; STAILQ_INSERT_TAIL(&queue, &el1, entry); STAILQ_INSERT_TAIL(&queue, &el2, entry); printf("STAILQ_INIT: %s\n", queue2str(&queue)); STAILQ_REVERSE(&queue, elem, entry); printf("STAILQ_REVERSE: %s\n", queue2str(&queue)); footer(); } void test3() { header(); struct elem el1, el2, el3; struct elem_queue queue = STAILQ_HEAD_INITIALIZER(queue); el1.val = 1; el2.val = 2; el3.val = 3; STAILQ_INSERT_TAIL(&queue, &el1, entry); STAILQ_INSERT_TAIL(&queue, &el2, entry); STAILQ_INSERT_TAIL(&queue, &el3, entry); printf("STAILQ_INIT: %s\n", queue2str(&queue)); STAILQ_REVERSE(&queue, elem, entry); printf("STAILQ_REVERSE: %s\n", queue2str(&queue)); footer(); } void test_splice() { header(); struct elem el1, el2, el3; struct elem_queue queue1 = STAILQ_HEAD_INITIALIZER(queue1); struct elem_queue queue2 = STAILQ_HEAD_INITIALIZER(queue2); STAILQ_SPLICE(&queue1, STAILQ_FIRST(&queue1), entry, &queue2); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); STAILQ_SPLICE(&queue2, STAILQ_FIRST(&queue2), entry, &queue1); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); el1.val = 1; el2.val = 2; el3.val = 3; STAILQ_INSERT_TAIL(&queue1, &el1, entry); STAILQ_INSERT_TAIL(&queue1, &el2, entry); STAILQ_INSERT_TAIL(&queue1, &el3, entry); printf("STAILQ_INIT: %s\n", queue2str(&queue1)); STAILQ_SPLICE(&queue1, STAILQ_FIRST(&queue1), entry, &queue2); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); STAILQ_SPLICE(&queue2, STAILQ_FIRST(&queue2), entry, &queue1); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); STAILQ_SPLICE(&queue1, STAILQ_NEXT(STAILQ_FIRST(&queue1), entry), entry, &queue2); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); STAILQ_SPLICE(&queue2, STAILQ_NEXT(STAILQ_FIRST(&queue2), entry), entry, &queue1); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); STAILQ_SPLICE(&queue2, STAILQ_FIRST(&queue2), entry, &queue1); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); STAILQ_SPLICE(&queue2, STAILQ_FIRST(&queue2), entry, &queue1); printf("q1: %s\n", queue2str(&queue1)); printf("q2: %s\n", queue2str(&queue2)); footer(); } int main() { test0(); test1(); test2(); test3(); test_splice(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/bitset_iterator.test0000775000000000000000000025625512213333056022042 0ustar rootrootELF>@@01@8@%"@@@@@@@@@ `` ؛؛`؛`@@DDPtd @ @Qtd/lib64/ld-linux-x86-64.so.2GNU GNUk"jM7 P.cƯC `II"$0$@`i@X(! ;@`~I%DV'#%&')*+-./014589:;<?@BEFGHIJMOPRSTWXZ[\]bcoZTf=e/AAO-W+F-a/ 9꺽PwQwLm7i(Kuu[&@cz"cwW"Bcmh͊??&]# ]  2bi.! ^nxE%%6X{A3uurEġ‰r-* : 1)r=Kgk Cs4|Xdz"l k|BEweLJ8_ oΌ2?4#| Á / ^h(=x1eP%qX + : N h u@ 8G@ A@l DA@=+ `@4J `j@D w@ G@ t@:` A@4 L`@@ A@4` D@?W`|@> ?@ ]^@6 Cz@h w@2 fH@M ]@ =@W1T|@ ;@@ v@  b@J' P|@ bw@Y p@  I@ @G wC@{_ w@ {@ u@X 3w@ iv@ L<@D u@T@@ <@A w@ [>@ UB@o  Ey@ _@ `` &[@  w@J`@  (a@``7 !]@0 L@` z@} |e@4 :@yp` w@!f @@D @@I [@Do C@`@ w@ :A@ 1 t;@h E@? ~w@! B@lw@@u w@IH@ d@i e@ RD@hf @@ Kw@wp`libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6exitputsrealloc__assert_failmemsetstdoutrandmallocstderrfprintfqsortsetbuf__libc_start_mainfreebit_index_u64bitset_page_set_zeros__libc_csu_finibitset_pages_iterITERATOR_CONJ_DEFAULT_CAPACITYbit_rotr_u32bswap_u32bitset_iterator_nextEXPR_CONJ_DEFAULT_CAPACITYbitset_pages_searchbitset_pages_nextbit_index_u32bitset_expr_add_param_edatabitset_page_nandbitset_pages_iter_recursebitset_expr_createbitset_infobitset_iterator_initbswap_u64bitset_iterator_destroybit_rotr_u64bitset_pages_prevbitset_pages_nsearchITERATOR_DEFAULT_CAPACITYbitset_test__data_startbitset_destroybitset_page_set_onesbit_iterator_nextbitset_pages_lastbitset_pages_removebitset_page_create_IO_stdin_usedbitset_page_alloc_sizebitset_iterator_createbitset_createbit_ctz_u64bitset_page_andbit_count_u64__libc_csu_initbit_clearbit_setbit_ctz_u32bit_rotl_u64_endbitset_pages_insertbit_iterator_initbitset_pages_psearchbitset_pages_newbit_count_u32bitset_page_data__bss_startbitset_expr_destroybitset_pages_reverse_iterbit_rotl_u32bitset_page_destroybitset_expr_add_conjbitset_iterator_rewindbitset_setbitset_expr_clearEXPR_DEFAULT_CAPACITYbitset_cardinalitybit_testbitset_pages_reverse_iter_recursebitset_pages_firstbit_clz_u32bitset_pages_reverse_iter_startbitset_pages_iter_startbitset_page_orbit_clz_u64bitset_clearbitset_page_first_posGCC_3.0GCC_3.3.1GLIBC_2.2.50P&y a_&  ui ` ` ````````` ` (` 0`[8` @`EH`P`X`HH= HtH5: %< @%: h%2 h%* h%" h% h% h% h% hp% h`% h P% h @% h 0%څ h %҅ h %ʅ h%… h1I^HHPTIP|@H{@H:@Gw`UH-p`HHw]øHt]p`p`UH-p`HHHH?HHHu]úHt]p`=I uUH~]6 @H=h tHtUЛ`H]{vUHSH8H}HEHHHEH}uAḦ́ H$`@AAp|@|@|@|@HǸ5{HEHEHHEH80HHEHHEHHHuAHC H$`@AAp|@|@}@|@HǸHEHHEHH`@H HEHEH;EMHEH8[]UHH H}HuHEAHEHHEHHH!HEHHEHHHHEHEH;ErHEHoUHATSH H}HuHE=HHuHEHHEPHEHHEHHEHHHEHL HHuHLHHHEHEH;ErH [A\]UHH}HuHEHEHEHEHEHHEHH9sHEHHEHH9v]UHHH}HuHuHE@HmUHSHHH}HuHEHcHEHUHH)H]HuHHEHȺHuHHEHHEHEHHEHHHEHEHHEHHEH HEHHHHEHHEHHEHHEHEHH;E?HH[]UHHP@%}@HEо`@HBHp`@HGHuHpHLtAH H$P@AZAp|@2}@8}@|@HǸIHEH_BHpH WHEH}tAHz H$P@A^Ap|@2}@g}@|@HǸ(HpHYGP@w}@uH UHH0@%}@JHEо`@HqAHp`@HFHEH#DtAH H$0@AoAp|@2}@}@|@HǸdHuHpH7KtAHT H$0@AqAp|@2}@8}@|@HǸHEH@HpH}UHEH}tAH~ H$0@AuAp|@2}@g}@|@HǸUHpHE0@w}@H~UHH@%}@HEWHEHEHHHEHHUHHHEо`@H?Hp`@HDHEHVBtAH} H$@AAp|@2}@}@|@HǸQHEHBtAH} H$@AAp|@2}@}@|@HǸFHEHAtAHG} H$@AAp|@2}@}@|@HǸHEкHCtAH| H$@AAp|@2}@}@|@HǸTHEкHBtAH| H$@AAp|@2}@}@|@HǸ?HEH@tAH@| H$@AAp|@2}@}@|@HǸHEH\@tAH{ H$@AAp|@2}@}@|@HǸWHUHuHpHqGtAH{ H$@AAp|@2}@~@|@HǸHpH QHtAHz H$@AAp|@2}@~@|@HǸ.HpH_AHEH^@w}@jHUHH@%}@?HEHEHHAHEHH-HEHHHEHHHEHHHEHHHEH@HHEH@HHEHHHHEHHHHEHHHmHEо`@Hp:HEH6=tAHx H$@AAp|@2}@}@|@HǸ1wHEкH>tAHnx H$@AAp|@2}@}@|@HǸHEкHA>tAHx H$@AAp|@2}@~@|@HǸ{Hp`@H>HUHuHpHCtAHw H$@AAp|@2}@~@|@HǸLHEH9HpHMHEH}tAH7w H$@AAp|@2}@g}@|@HǸHpH>HEH@w}@!HUHHЀ@%}@HEHEHHHEHHHEHHHHEHHHHEо`@H7HEH}:tAHv H$Ѐ@AAp|@2}@}@|@HǸxHEкH;tAHu H$Ѐ@AAp|@2}@}@|@HǸcHEкH;tAHZu H$Ѐ@AAp|@2}@~@|@HǸHp`@H<HUHuHpH@tAHt H$Ѐ@AAp|@2}@~@|@HǸMHEHc6HpHKHEH}tAH~t H$Ѐ@AAp|@2}@~@|@HǸ,HpHJHtAH(t H$Ѐ@AAp|@2}@~@|@HǸHpH;HEHЀ@w}@HUHH@%}@ HEо`?HEUUHE5HEHŠ`HEH HEHHHHHEHEH;ErHEHEHHE2HEHŠ`HEH HEHHHH\HEH}vHEH}vHE`@HD4HEH 7tAHr H$@A Ap|@2}@}@|@HǸKHEbHMHEHHd8tAH6r H$@AAp|@2}@~@|@HǸHEH}vH+EHUHH `HHnH@`@H8HUHuH@ Hu=tAHq H$@AAp|@2}@(@|@HǸ@HEH3HEHEiH@HGHHEHŠ`H9tAHq H$@AAp|@2}@h@|@HǸHEH}vH@H>GHtAHp H$@AAp|@2}@~@|@HǸaH@H7HEо H@w}@H3UHH@%}@rHE HEH HEо`@HEHEH;ErH@`@Hm5HMHUHuH@H6:tAHSn H$@A@Ap|@2}@(@|@HǸHEH/@VHE,HEHHEHHHUHH HEHEH;ErHEH;EsAHm H$@ALAp|@|@@|@HǸVH@HCHEH}W@nH@H_4HUHEHH\@w}@hHUHH@%}@=HEHEHEHH7 HEH H# HEHH HEHHH HEHH H HEHH H HEHHH HEHHHUHH HE`@H-HEH^0tAHk H$@AlAp|@2}@}@|@HǸYHEH1tAHk H$@AmAp|@2}@@|@HǸDHEHi1tAH;k H$@AnAp|@2}@~@|@HǸHP`@H1HUHuHPH6tAHj H$@ArAp|@2}@~@|@HǸ.tHEHD,HDž0 HDž8HEH@HEHEkHPH@HEHEH0H;EtAH!j H$@A{Ap|@2}@@|@HǸHEHEH;ErHPHG@HHEH}uAHi H$@A}Ap|@2}@@|@HǸ[HPH0HEH@w}@H-UHH@%}@lHE`HE5HEHŠ`HEH HEHHHH9HEH}vHE`@H-*HEHEH,tAHyh H$@AAp|@2}@}@|@HǸ'HMHEHHJ.tAHh H$@AAp|@2}@0@|@HǸHEH}BHP`@H.HUHuHPHz3tAHg H$@AAp|@2}@(@|@HǸEHEH)HEcHPH=HEHEH;EtAH#g H$@AAp|@2}@[@|@HǸHEH}?vHPH-HEH@w}@HUHH@%}@ uHE`+HE5HEHŠ`HEH HEHHHHHEH}vHE`@H'HEHEHM*tAHe H$@AAp|@2}@}@|@HǸHHMHEHH+tAHe H$@AAp|@2}@~@|@HǸ1HEH}B`HP`@H ,HUHuHP H0tAHd H$@AAp|@2}@(@|@HǸWHEHm&HEkHPH;HEHEHŠ`H;EtAHsd H$@AAp|@2}@d@|@HǸ!HEH}vHPH:HEH}tAH d H$@AAp|@2}@g}@|@HǸqHPH*HE H@w}@HUHH|c H`MN#]ÐUHH}HEH@(]UHHH}HuHE8HTHEHUHP0HEHUHH0H}HuHUHEHEHEHLHEH@0HUHиUHHH}HEHUHѺ;@H HE(HUHSHHH}HuHEHHEHEHUHH HEH}uaHEHH;EwHEHHH;Ew@Lp@ȁ@%HEHHUHH)HEHHH8HHH[]UHSHXH}HuHEH#HEHEHUHH HEH}uiHEH@0HuHEHEH@0HUHֿHEH}u HEHcHUHEHHEHUHHa HEHH;EwHEHHH;Ew@gp@ȁ@ HEHHUHH)HEHHH7E߀}t-HEH@(HPHEHP(HEH@HPHEHPH,HX[]UHSHHH}HuHEHHEHEHUHHHEH}u 4HEHH;EwHEHHH;Ew@p@ȁ@HEHHUHH)HEHHHd7EEt HEH@(Hu@p@@HEH@Hu@p@,@HEH@(HPHEHP(HEH@HPHEHPHEH@Hu5HEHUHH HEH}HEH@0HUHиHHH[]UHH H}HuHE HHEH@HEH@0HHHEHPHEH@HEHEHHE5HEHHPHEHHEH@HEHEHUHH-HEH}uHEHH;Etx@p@H@-ÐUHH}]UHH}HEH HEHE]UHH H}HEHHHEHH)HHHEHUHEHUHH}]UHH}HMHHHH HHHHHH)HEH)]UHH H}HEH>HEHEHMUHH H}HEH HEHEHUHH0H}HuHEHHEHEHHEEE"HEHHUHH!HHEHEEE;E|UHH0H}HuHEHfHEHEHVHEEE%HEHHUHHH!HHEHEEE;E|UHH0H}HuHEHHEHEHHEEE"HEHHUHH HHEHEEE;E|UHH}HuHEHHEHH9sHEHHEHH9v]UHH}HEHPHEHHEHPHEHPHEHHHEH@H HHEHPHEH@HHHEHPHEH@HHHEHP]UHH}HEHHEHEHH;Et# HEH@HEHEH@HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@HHEHEH@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@HHUHH9tJHEH@HHEHEHH;E HEH@HEHEH@HUHH9uHEHHEHEHH;Eu@@Y@@HEHHEHUHEHHE}yHEHEHEH@HE}~7HEH@HHEHEHH;Eu@@Y@@HEHH;EuHEHEUHH0H}HuHEH@HUHH9tNHEH@HEHEHH;EHEH@HHEHEH@HHUHH9uHEHHEHEHH;Eu @Y@@RHEHHEHUHEHHpE}yHEH@HE}~?HEHEHEH@HHEHEHH;Eu @Y@@HEHH;EuHEHEUHH H}HuHEHHE$}yHEH@HEHEH@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHH5E}yHEHEHEH@HE"}~HEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@HE*}~HEHEHEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHPHHHHH@H HHHPHH@HHHHPHHHHHEHEHHHHpHEPHE@E}u@Y@@}yHEHPHEHH@HHEHPHEHH@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHPHEH@HHEH@HEHEH@HHEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHE=HEHHHEHEH@HƒHEH HHEHPHEH@HOHEH@HEHEH@HtJHEH@HHHEHPHEH@HHHEHPHEH@HHHEHPHEH@HEHEH@HHEHEH@HHEH@H HHEHPHEHUHPHEH@HHEH HHEHPHEH@HHHEHPHEHEHEHUHHmHUHH9HHHHHHHHRHHPUHHHXHPHEHXHH`H`HEHEHHPHHHEPHE@E܃}yHEHPHEHH@HyHEHPHEHH@HH}uYHE@HEHEHE&HE@HEHPHEHH@HHEHEHHXHH9u HEHEHHXHH9HEHH;Pt@Y@$@HmHEHH;PUHEHH@HEHEHHUHHRHHHPHRHH HPHEHHPHRHPHEHHPHRHHHUHHRH HPHPH@HHEH HHPHPHEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHPaHEHHHUHHHUHHHRH HP.HPH@HEHXHH;EHPH@Ht@Y@8@HEH@Hu@Y@@HEH@HHHEHPH`H9EuHXHUH HEH@yHEHHHUHP HEHHHUHHHRHуHUH HP H`H9EuHXHPHXHt HEHH@HtGHEH@x@Y@Ã@HEHHHXHHP HXHPHEHHm HE@u@Y@Ճ@HE@HEHHUHHHPHEHHH@Ht@Y@@QHEHH@HHEHH@HHEHEH@HEHEH@HHEHHUHHRHHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPIHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHUH`H9w@Y@@@HEH@yHEHHHUHPHEHHHUHHHRHуHUH HPHEHH@HHEHEH@HEHEH@H=HEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPH`H9EuHXHUHHEH@yHEHHHUHPgHEHHHUHHHRHуHUH HP7HEHHUHHRHHPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHEHUHkHEHHUHHHHUHHRH HPHEHH@HEHEH@HVHEH@HHEHEH@HEHEH@HHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HƒHEH HHEHPHEH@HHEHEH@HHEH@H HHEHPHEHUHPHXHH;Eu@Y@c@HEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HHHEHPH`H9EuHXHUHxHEH@yHEHHHUHPQHEHHHUHHHRHуHUH HP!HEHH@HHEH@HxHxH@H)HEHHUHHRHHPHEH@HHHEHPHxH@HHHxHPHEHH@HpHEHHpHRHHPHEHHHpH@H HHpHPHUH`H9w@Y@@@HEH@yHEHHHpHPHEHHHUHHHRHуHpH HPHEH@HHHEHPHEHHUHHRHHPHEH@HhHhH@HHhH@HHHhHPHEHH@H`HEHH`HRHHPHEHHH`H@H HH`HPH`H9EuHXH`HHEH@yHEHHH`HPHEHHHUHHHRHуH`H HPpHEH@HHHEHPHmHUH`H9BH`HXHHXHH@Ht@Y@@̼UHH0H}HuHUHMHEHH;Eu HEHHEHpHMHUHEHHEHEHH;EtHENHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHKUHHPH}HuHUHMLEHUHEHH$E}HEHPH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@HHHMHUHEH}~,HEH@HHH}HMHuHEIHNHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIH{HEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@HHHMHUHEHHEHEHH;EtHEJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHHUHHPH}HuHUHMLEHUHEHHE}HEH@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHpHMHUHEHu}y%HEHPH}HMHuHEIHJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEÐUHHH}HuHE H·HEHUHPUHH H}HEvHEH@HUHHH@HtTHEH@HUHRHMHHHRHHEH@HUHRHMHHHRHHEHEHH;EyHEH@HtHEH@HUHRHHE HڶUHH H}HEHEH@HUHHHHHEH@HMHHH@H}HEH@HUHHHHEH@HMHHH@HCHEH@HUHHHHEHEHH;ETHEHUHH H}HuHEH@H;Er HEH@Ht HEH@H`#HEHeHEHH;EsHEH@HUHHHUHRHHHEH}u\HEH@HUHH)HHHHEH@HHHEHȾH5HEHUHPHEHUHPUHHH}HEHHPHEHHtHEHHPHEHUHH@H}HuHUHEH@H;Er IHEH@Ht HEH@H*"HEHeHEHH;EsHEH@HUH HUHRHHHEH}HEH@HUHRHMHHHEH}HEH@HUHH)HHHEH@H HEHȾH̳HEH@HUH)HEHHHEHȾH衳HEHUHPHEHUHPHEHUHPHEH@HUHUHH0H}HuЈEHEHHu@@@ HEHPHEHHHHHEHEHHPHMHEHHtLHEHPHEHHHHEHHEHPHEHHE܈HEHHPHEHÐUHHH}HuHE`H^HEHUHP(UHH H}HEHEHHHUHHHHHH@HHEHH(HEHpHUHHHHHH@HHEHH(HEHpHUHHHHHH@ HHEHH(HEHpHUHHHHHH@(HHEHEHH;E(HEH@HtHEH@(HUHRHHEH@Ht*HEH@HUHEH@(HUHRHHEH@Ht*HEH@ HHEH@(HUHR HHE`H贰UHH H}HuHEH@H;Er HEH@Ht HEH@HHEHeHEH;EvHEHH(HUHHHHHHEH@HHHEH}ukHEH@HUH)HHHHHHEHPHHHHHHEHHʾH̯HEHUHPHEHUHPUHH@H}HuHUHEH@H;Er HEH@Ht HEH@HHEHeHEH;EvHEH@(HUH HUHRHHHEH}tHEH@(HUHR HMHHHEH}0HEH@(HUH HUHR(HHHEH}HEH@HUHH)HHHEH@H HEHȾH}HEH@HUH)HEHHHEHȾHRHEH@HUHH)HHHEH@H HEHȾHHEHUHPHEHUHP HEHUHP(HEHUHP8HEH@(HUHHEH@(HUHUHHPH}HuHUHMH}u@P@@XH}u@P@@8H}t H}u@P@ˆ@HEH@(HHEHEH@HtHEH@H*!HEH@(HUHֿHHEHPHEH@HHEH@ HtHEH@ H8HEH@(HUHֿHHEHP HEH@ Hu HEH@ HGHEHHEHHt HEHEH@HUHHHEHEHHHUHHHHHHEHEHHMHEHH't hHEHEH@HUHHHH;Er@P@@tHEHHEH@HUHHHHHEHHHu@P@@#HEH@HUHHHEH@HMHHHH HEHHHHEHP HEHHEHHHEHHEH@(HUHHHHEHEHH;EHEHHEHPHEHEHH;EXHEHHEHHEH/UHSHHH}HuH}u@P@@@HMHHHH HHHHHH)Ht@P@X@ѩHEHH;Ev@P@@諩HEH@HuHEHBHEHEHEHEH@(HUHHHEH@HUHHHHUHHHHEHP HEHHEH@(HUHHHHuHEHHEH@(HUHHHHHEH9s@ P@@轨HEH@(HUHHHHHEH9v#HEH@(HUHHHHHEHEHEH@H;EHUHEHHܨHH[]UHH H}HuH}tH}u@P@Ї@HEHEHEHEHEHHEHH9sHEHHEHH9vUHH H}HuH}u`@-P@@@蓧H}u`@.P@@sHEH@Hu`@/P@ @MHEHHu`@0P@ @'HEHHEHEHP HEHteHEH@(HUHHHHHEHH9t`@6P@X@跦HEH@(HUHHHHEHHhHEH@(HUHHHHtLHEH@(HUHHHHHEHH9u'HEH@(HUHHHHEHHHEHEH@H;EUHH H}HEH0HEH@o@0H貥HEH@HcHEHHtHEH@HUHRHHHEH@HHEH@HHHE~HEHHHUHHHHHHHEH@HH9wbHEHH HEHpHUHHHHHHH_HEHP HEH@HHHEHEHH;EqHEH@HHUHz0HUHH H}H}u @nP@@蓤HE.HEHHHUHHHHHȾHHEHEHH;EwHEH3UHH0H}H}u@|P@@HEHEH@HHEHEHEHHHUHHHHHHH;EHEHUH HEHpHUHHHHHHHHHEHUH4HEHHHUHHHHHHH9v@P@@KHEHEHH;EEHEHUHHH}H}u@P@@HEH-UHH H}H}u@P@@辢HEH@HHu H=HEH0HHEH}tHEH@HHEHHEH)ÐUHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE E[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE!E[]UH}E]UHH}HE]UH}E]UHH}HEH?]UHH}EHGUHHH}H}0UHS}uEUӉÉ[]UHSH}uEHUHӉHH[]UHS}uEUӉˉ[]UHSH}uEHUHӉHH[]UH}E]UHH}HEH]UHH}HuHU؉ȈEHEHUHPHEHPHEHP HEHP HEHHEHP(}tHHUHBHEH@HEH@ HU؃HHEHEH@ H;EHtAHEH@ HHEHHEHHEH@H1HEHHEH@ HPHEHP jHEHPHEHHEHE*HEH@ HEHEH@ HPHEHP HEHEH@ H;ErHEHHEH@H1HEH]UHHH}HEHP HEH@(H9Ht HHEH@ HHEHHEHHEH@H1HEHHEH@ HHEH@HH)HHHHEHPHEH@ HPHEHP HEHHHSHEHHEHEHHEHHH!HEHHEHPEHHUHH }HuUEEEECExEEEEmmEHHHEHЋUMʉEE;E|EHHHEHEHHHEHUHH}HuUHEEE=HEHUH!Ht%EHHHEHЋUMʃEHeEE?vEHHHEHEHHHEH]ÐH5)" 11DHHЃ@uÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1iHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/bitset_iterator.ctruebitsets == NULLTest failed: %s is %s at %s:%d, in function '%s' bitsets[i] == NULL *** %s *** falsebitset_iterator_init(&it, &expr, NULL, 0) == 0pos == SIZE_MAX *** %s: done *** bitset_expr_add_conj(&expr) == 0bitset_expr_add_param(&expr, 0, false) == 0bitset_expr_add_param(&expr, 1, true) == 0bitset_iterator_init(&it, &expr, bitsets, 2) == 0bitset_iterator_next(&it) == 1bitset_iterator_next(&it) == big_ibitset_iterator_next(&it) == SIZE_MAXbitset_expr_add_param(&expr, 1, false) == 0pos == 0bitset_expr_add_param(&expr, b, false) == 0bitset_iterator_init(&it, &expr, bitsets, BITSETS_SIZE) == 0bitset_iterator_next(&it) == NUMS[i]Setting bits... okIterating... b < BITSETS_SIZEbitset_expr_add_param(&expr, 0, true) == 0result[i] == pospos = bitset_iterator_next(&it) == SIZE_MAXbitset_expr_add_param(&expr, b, true) == 0i == pospos == NUMS[i]test_disjunctiontest_not_emptytest_not_lasttest_bigtest_simpletest_first_resulttest_empty_resulttest_empty_expr_conj2test_empty_expr_conj1test_empty_exprbitsets_create/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/bitset.cpage->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * 8bitset->cardinality > 0page->cardinality > 0bitset_cardinality(bitset) == cardinality_checkbitset_infobitset_clearbitset_setbitset_test/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/page.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0bitset_pages_removebitset_pages_insertbitset_pages_prevbitset_pages_nextbitset_page_orbitset_page_nandbitset_page_and /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/expr.cexpr->size > 0bitset_expr_add_param /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/iterator.cit != ((void *)0)expr != ((void *)0)p_bitsets != ((void *)0)exconj->bitset_ids[b] < bitsets_sizep_bitsets[exconj->bitset_ids[b]] != ((void *)0)conj != ((void *)0)pos % (BITSET_PAGE_DATA_SIZE * 8) == 0conj->page_first_pos <= posconj->pages[b]->first_pos >= key.first_posp1 != ((void *)0) && p2 != ((void *)0)dst != ((void *)0)conj->size > 0conj->page_first_pos != (18446744073709551615UL)conj->pages[b]->first_pos == conj->page_first_pospos + PAGE_BIT <= it->conjs[c].page_first_posbitset_iterator_nextbitset_iterator_rewindbitset_iterator_next_pagebitset_iterator_first_pagebitset_page_orbitset_iterator_conj_prepare_pagebitset_page_andbitset_page_nandbitset_iterator_conj_cmpbitset_iterator_conj_rewindbitset_iterator_init;_ lPx 5HWpb/8d`5άٯTf8X,x;ɴ0ѵPp$aɶ50PWpҸ2ٺ 0 FP p    =0 sP p ,   0 \P p . 3 @  8 X x l IH p  +B0^Pp%#0Ppp0zRx X*zRx $4AC E* D sAC n $dsAC G WAC R !,AC g $-AC E zPLRx@@ $$ˍ<@AC 7 $Lߎ@AC  $tD~ @AC y $I@AC D $(@AC   $u7@AC p $5F@AC 0 $<U@AC  $dd@AC  $ s@AC  yAC t TAC M F@AC { fEAC @ $AAC | $T@AC E $|/@r;@c8int^%%Vii  0F78  d?# # # # # #( L#0 #8 %#@ .#H #P #X y #`  #h  ?#p ?#t p#x M# [# # # &{# p/# w0# ~1# 2# 3-# 5?# 7#    # # ?#  0x # g# -# #  # end#(E E# kE# C D-# sEx# @F-# G#  (J J# J#XJ 8P^ R# @S-#( &Ts#0s-^ F G-# H-# I# MJ#- L Q T-# V-# X# &Zs#y ` ?  A-#  B-# C# 0 D#  E# & Fs#(  G#0 t@@-H7 P8 `@@@i-X"' 8(@3@`7 X-P@%@i-hZ'3@@'H'-@C)Pe@@i+-X-.1?@)@ ` a1X b1Paa3hbb4`@)@U@@h@-`FU@;@(FF-f@4@iH-Xs@@jI-PtmpJ-H<Q;@w@@ P@SU@itW~pos]-h fw@ @  0@Sj@itl~post-h } @$@   @-h7 `S@it~1$@'@`   @7 hS@it~pos-`   '@*@v v  Ѐ@7 hS@it~pos-` !%*@O.@    @7 @-"S #it~$+@g+@ #i-h$g+@+@P #i-`q+@+@#b-X$%,@,@s #b-P<-@-@#i-H   %%O.@1@   @"1(H"7 )@"S7#it>~#posD-$.@/@l #i.-h.@ /@#b/-`$/@/@ #b:-X0@1@#bF-P  %X1@U5@   @"7 [`"]-X"Si#itp~"u ~"vv-P#posx-H14@4@#iy-h   - %>U5@7@@ @"7 P"S#it~$5@5@/#i-h$5@6@R#b-`77@7@#i-XA7@7@#pos-H(%7@:@ @"7 P"S#it~#pos-@$*8@s8@-#i-h$8@O9@P#b-`9@^:@#i-X9@O:@#pos-H &q?:@r;@ -'  `( ( e't;@@@B%c;int %0p^ EE#kE# CD0#sE#@F0#G#  e  (J7J#J#XJ 8PyR7#@S0#(&T#0   0 y 0#0#0#0#690t;@;@`' 'h-B&;@;@q &qh&&`Bk0;@ <@ t0X0 0Parg0H 3qh7: <@L<@  :qhAL<@=@ AqposA0keyC0 GX% @   QB=@[>@@@ QqposQ0keyS0 WX%P @hOC=@=@Z0P P  @LuB[>@?@ uqposu0keyw0 {X% @W   ?@@@ ] qX]PY0h0 `%c x@@@`@u %c;int %0p^7;w)z; EE#kE# CD0#sE#@F0#G#  e, ,(JXJ#J#XJ3 xx x 0 c`)bm6"BZ0@@@@` iZzhlx@@@@ .0 lXrnh0s@@:A@ m0 sXu0h{:A@DA@ 0 {hx0DA@A@ pos0hjA@A@@ 0 XxhA@A@ Q0 Xxh A@UB@ dstHsrc@dhs`% @cntBX B@SB@iB\ ,[UB@B@` dstHsrc@dhs`% p@cntBXB@B@iB\ ,uB@0C@ FdstHsrc@dhs`%V R@cntBXB@.C@iB\ V,FGNB0C@wC@ aNhbN`QYwC@C@ bYhXMYC@RD@ bYXretYhYRD@D@@abYXretYhYD@E@bYHsY@retYh% @@-E@E@lY`nE@E@cmpYB\ ,YE@8G@bYHsY@retYh%  @lF@G@lY`F@G@cmpYB\$Y8G@G@`$bYXkeyYPretYhcmpYBdYG@fH@bYHkeyY@retYhlY`G@ 0Ey@Cz@!itXbitBl^ ]Cz@z@`! x]s\ ]P ]BX Q `BliaBh edrz@z@al`B B |z@{@! x|X |P |BLz@{@bithiBd {@Y{@kB`% : ; I$ > $ >   I&I&  : ;  : ; I8 : ;I8 : ; I!I/  : ; : ;I8  : ; !I' II<  : ; ( .: ; ' I@B : ; I 4: ; I 4I4   4: ; I .: ; ' @B .: ; ' I@B  : ; I !.: ; @B "4: ;I #4: ;I $ %.: ;@B &.? : ;' I@B '!I/(4: ; I? < % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I &I.? : ; ' @B .: ; ' I@B : ; I 4: ; I .? : ; ' I@B 4: ; I 4I4  !I/  % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I 4: ; I .? : ; ' @B 4: ; I .? : ; ' @B : ; I 4I4   !I/ &I.: ; ' I@B .? : ; ' I@B  : ; I8  .? : ; ' I@B % $ > : ; I$ > ' II  I  : ;  : ; I8 .? : ; ' @B  : ; I 4: ; I .: ; ' I@B 4: ; I .? : ; ' I@B  : ; 4I4  I!I/ &I4: ; I?  % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I  : ;  : ; I8  : ;  I!I' II & : ; ( .? : ; ' @B : ; I : ; I  4: ; I .: ; ' I@B 4: ; I  : ; .? : ; ' I@B 4I4  !I/ .: ; ' @B !.: ;' I@B ": ;I #4: ;I $.: ;' @B %: ;I &4: ;I '.? : ;' @B (.? : ;' I@B )4: ; I?  % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I .? : ; ' I@B  : ; I : ; I 4: ; I & .? : ; ' I@B .? : ;' I@B : ;I .? : ;' @B : ;I 4: ;I .? : ;' I@B 4: ; I  .? : ; ' I@B > /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitsetbitset_iterator.cstddef.htypes.hstdint.hlibio.hbit.hbitset.hexpr.hiterator.hstdio.h @=tAA#XKxX2/gKX/u/vZ22J,X&x?>7/t7=?>77/t7=>=[>77777777J7J7J7=>====>==>uuw777>7/t7=>=>uw777=70t7J7=@惟0X-XsX77Xx#=7#7XJ7=>域-XX77X=7Z'X7y Ƞ0=>؄==>uuuu777=7/ 7X$7=C0X77X=7/7X=@0X77X=7/ 7X/t7=K=YYYYYY/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebitset.hbitset.cstddef.hstdint.hpage.h t;@.Y2>YY2Y2.Kuv.2x.Kv=XKu1.(=hw=>x.Ku.(==>0[{Y/!cz -u /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/syspage.hpage.cstddef.hstdint.hbitset.htypes.htypes.h @@]4K2eLK2132Y2Y2uJ2uJ2uJ./u/vZ0sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt( /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/includeexpr.cexpr.hstddef.h `@)Y2)+XY2B:X2נWKfrN/Iuv?Y2v"Y3=נWKfrN/I(I,ut nt Y3K"vu"Y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitsetiterator.cstddef.hstdint.hbit.hbitset.hexpr.hiterator.hpage.h |e@7Y .)224X Y3נWKfrN/I$uw?Y3=נWKfrN/I((I,I,rt kt et Y3uttut=""ɡgɠ->#zX pXؼY2t1 <""sXt X Kxtt/u/vZ3tt% '\'p X 2vN//yX0 r, 2t)Xͻ2t)30}X0'3t2t=u?/" /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebit.hbit.cstddef.hstdint.h u@ɻ% <ɻ(.K <ɻ(0Kv>?w?@w@CwCMvMNwNOwORwRvwwwvwwwvwwwavabwbcwcfwfl!vl!m!wm!n!wn!q!wq!!v!!wwwvwwwQvQRwRSwSVwVvwwwvwwwvwwwvwwwtvtuwuvwvywyPvPQwwwvwww(v()w)*w*-w-qvqrwrswsvwv{v{|w|}w}wvwwwvwww v !w!"w"%w%vwwwvwwwgvghwhiwilwlvwww)v)*w*+w+.w.vwwwvwww0v01w12w25w5ovopwpqwqtwtvwwwvwwwDvDEwEFwFIwI v w w  w ]v]^w^_w_bwbvwwwXvXYwYZwZ]w]vwwwvwwwvwwwLvLMwww3v34w45w58w8vwwwvwwwvwwwvww w vwwwavabwww3v34w45w58w8vwwwvwwwvwww'v'(w()w),w,. v. / w/ 0 w0 3 w3 v w w w d vd e we f wf i wi v w w w 3v34w45w58w8OvOPwPQwQTwTvwwwvwwwSvSTwTUwUXwXvwwwgvghwhiwilwltvtuwuvwvywyvwwwvwwwvwwwvwwwvwwwvwwwvwww.v./w/0w03w3OvOPwPQwQTwT]v]^w^_w_bwbnvnowopwpswsvwwwvwww`v`awabwbewevw.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @` Vh@h"^o@koX@XPz@H@ p@p@@cT|@T| `|@`|  @ (@( @`ț`țЛ`Л؛`؛`ȝ`ȝ``` `p  0p )<5 C)O0 Z  "/ep:${ @Om @@<@`@@h@@X@ @ @ p@ @ @T|@`|@ @(@@`ț`Л`؛``ȝ```` ! Л` @. @A @@W`fț` `@`` @4`@ @s 3@ @W )@,  U@- ;@<=P@K w@a0@o  @~@ $@I@ '@Ѐ@ *@u@  O.@5@  1@@  U5@/@= 7@ N@\e ;@E|@ @ @ x@  0C@G@@  @"@;@TR@mp@@ a@ 4c@w@ Ng@ Sh@ ,@E m@a@z o@@ -p@`@" q@P 1s@ @8 s@R@k@@;@@@@Л`ț`h`& @5 {@,C؛`L`_p`kȝ` z@ A@4 P|@ !]@H@ w@ w@ u@$ @`T ``_@z 8G@ D@? Cz@ d@p` UB@o &[@ `@4.T|@4 ?@@Th `j@D} w@ e@ w@! E@? G@ ! @@;  L<@G ``T  <@Ac  A@4x  Ey@  RD@h   L@`  @@I `|@  @@  |e@4$  ;@@2  w@>  A@lN  Kw@\ @@|  {@  iv@   u@  v@  ~w@! h  I@  @ `@  w@J  fH@'  wC@{8  3w@F  @@W p`c  L`@w  _@  :@y  bw@  :A@  b@J  t@:  =@W  (a@ @  t;@)  u@T2 F  ]@h  C@`{  w@  ]^@6   [@D  B@l   p@  w@$ 6 `J  [>@W  DA@=crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrybitset_iterator.cNUMSbitsets_create__func__.3761bitsets_destroynums_fillnums_comparatornums_sortnums_shuffletest_empty_expr__func__.3806test_empty_expr_conj1__func__.3813test_empty_expr_conj2__func__.3820test_empty_result__func__.3828test_first_result__func__.3836test_simple__func__.3843test_big__func__.3872test_not_last__func__.3901test_not_empty__func__.3915test_disjunction__func__.3937bitset.cbitset_destroy_iter_cb__PRETTY_FUNCTION__.2766__PRETTY_FUNCTION__.2774__PRETTY_FUNCTION__.2782__PRETTY_FUNCTION__.2796page.cpage_cmp__PRETTY_FUNCTION__.2813__PRETTY_FUNCTION__.2826__PRETTY_FUNCTION__.2869__PRETTY_FUNCTION__.2901__PRETTY_FUNCTION__.2696__PRETTY_FUNCTION__.2684__PRETTY_FUNCTION__.2672expr.cbitset_expr_reservebitset_expr_conj_reserve__PRETTY_FUNCTION__.2716iterator.cbitset_iterator_reservebitset_iterator_conj_reserve__PRETTY_FUNCTION__.2851bitset_iterator_conj_rewind__PRETTY_FUNCTION__.2867bitset_iterator_conj_cmp__PRETTY_FUNCTION__.2879bitset_iterator_conj_prepare_page__PRETTY_FUNCTION__.2886bitset_iterator_prepare_pagebitset_iterator_first_page__PRETTY_FUNCTION__.2902bitset_iterator_next_page__PRETTY_FUNCTION__.2910__PRETTY_FUNCTION__.2920__PRETTY_FUNCTION__.2924__PRETTY_FUNCTION__.2750__PRETTY_FUNCTION__.2726__PRETTY_FUNCTION__.2738bit.c__FRAME_END____JCR_END____init_array_end__dso_handle__popcount_tab__popcountdi2_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE_bit_index_u64bitset_page_set_zeros__libc_csu_finibitset_pages_iterITERATOR_CONJ_DEFAULT_CAPACITYbit_rotr_u32free@@GLIBC_2.2.5bswap_u32bitset_iterator_next_ITM_deregisterTMCloneTablestdout@@GLIBC_2.2.5data_startEXPR_CONJ_DEFAULT_CAPACITYbitset_pages_searchputs@@GLIBC_2.2.5bitset_pages_nextqsort@@GLIBC_2.2.5bit_index_u32bitset_expr_add_param_edatabitset_page_nandbitset_pages_iter_recursebitset_expr_create_finibitset_infosetbuf@@GLIBC_2.2.5printf@@GLIBC_2.2.5bitset_iterator_init__assert_fail@@GLIBC_2.2.5bswap_u64bitset_iterator_destroymemset@@GLIBC_2.2.5bit_rotr_u64bitset_pages_prevbitset_pages_nsearch__libc_start_main@@GLIBC_2.2.5ITERATOR_DEFAULT_CAPACITYbitset_test__data_startbitset_destroybitset_page_set_onesbit_iterator_nextbitset_pages_lastfprintf@@GLIBC_2.2.5__gmon_start__bitset_pages_removebitset_page_create_IO_stdin_usedbitset_page_alloc_sizebitset_iterator_createbitset_createbit_ctz_u64bitset_page_andbit_count_u64__gcc_personality_v0@@GCC_3.3.1__libc_csu_initbit_clearmalloc@@GLIBC_2.2.5bit_setbit_ctz_u32bit_rotl_u64_endbitset_pages_insert_startrealloc@@GLIBC_2.2.5bit_iterator_initbitset_pages_psearchbitset_pages_newbit_count_u32bitset_page_data__bss_startbitset_expr_destroybitset_pages_reverse_itermainbit_rotl_u32bitset_page_destroybitset_expr_add_conjbitset_iterator_rewindbitset_setbitset_expr_clearEXPR_DEFAULT_CAPACITYbitset_cardinalitybit_test_Jv_RegisterClassesbitset_pages_reverse_iter_recursebitset_pages_firstbit_clz_u32bitset_pages_reverse_iter_startexit@@GLIBC_2.2.5_ITM_registerTMCloneTablebitset_pages_iter_startbitset_page_or_Unwind_Resume@@GCC_3.0_initbit_clz_u64rand@@GLIBC_2.2.5stderr@@GLIBC_2.2.5bitset_clearbitset_page_first_postarantool-1.5.1.218.g1a69fd6/test/unit/bitset_iterator.result0000664000000000000000000000114312202131537022354 0ustar rootroot *** test_empty_expr *** *** test_empty_expr: done *** *** test_empty_expr_conj1 *** *** test_empty_expr_conj1: done *** *** test_empty_expr_conj2 *** *** test_empty_expr_conj2: done *** *** test_empty_result *** *** test_empty_result: done *** *** test_first_result *** *** test_first_result: done *** *** test_simple *** *** test_simple: done *** *** test_big *** Setting bits... ok Iterating... ok *** test_big: done *** *** test_not_empty *** *** test_not_empty: done *** *** test_not_last *** *** test_not_last: done *** *** test_disjunction *** *** test_disjunction: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/test.h0000664000000000000000000000330412202131537017042 0ustar rootroot#ifndef TARANTOOL_TEST_H_INCLUDED #define TARANTOOL_TEST_H_INCLUDED /** @brief example @code #include "test.h" int main(void) { plan(3); // count of test You planned to check ok(1, "Test name 1"); is(4, 2 * 2, "2 * 2 == 4"); isnt(5, 2 * 2, "2 * 2 != 5); return check_plan(); // print resume } @endcode */ /* private function, use ok(...) instead */ int __ok(int condition, const char *fmt, ...); /** @brief set and print plan @param count Before anything else, you need a testing plan. This basically declares how many tests your program is going to run to protect against premature failure. */ void plan(int count); /** @brief check if plan is reached and print report */ int check_plan(void); #define ok(condition, fmt, args...) { \ int res = __ok(condition, fmt, ##args); \ if (!res) { \ fprintf(stderr, "# Failed test '"); \ fprintf(stderr, fmt, ##args); \ fprintf(stderr, "'\n"); \ fprintf(stderr, "# in %s at line %d\n", __FILE__, __LINE__); \ } \ res = res; \ } #define is(a, b, fmt, args...) { \ int res = __ok((a) == (b), fmt, ##args); \ if (!res) { \ fprintf(stderr, "# Failed test '"); \ fprintf(stderr, fmt, ##args); \ fprintf(stderr, "'\n"); \ fprintf(stderr, "# in %s at line %d\n", __FILE__, __LINE__); \ } \ res = res; \ } #define isnt(a, b, fmt, args...) { \ int res = __ok((a) != (b), fmt, ##args); \ if (!res) { \ fprintf(stderr, "# Failed test '"); \ fprintf(stderr, fmt, ##args); \ fprintf(stderr, "'\n"); \ fprintf(stderr, "# in %s at line %d\n", __FILE__, __LINE__); \ } \ res = res; \ } #define fail(fmt, args...) \ ok(0, fmt, ##args) #endif /* TARANTOOL_TEST_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/test/unit/CMakeLists.txt0000664000000000000000000000237712231715257020474 0ustar rootrootfile(GLOB all_sources *.c *.m *.mm) set_source_files_compile_flags(${all_sources}) add_executable(rlist.test rlist.c test.c) add_executable(queue.test queue.c) add_executable(mhash.test mhash.c) add_executable(rope_basic.test rope_basic.c ${CMAKE_SOURCE_DIR}/src/rope.c) add_executable(rope_avl.test rope_avl.c ${CMAKE_SOURCE_DIR}/src/rope.c) add_executable(rope_stress.test rope_stress.c ${CMAKE_SOURCE_DIR}/src/rope.c) add_executable(rope.test rope.c ${CMAKE_SOURCE_DIR}/src/rope.c) add_executable(bit.test bit.c bit.c) target_link_libraries(bit.test bit) add_executable(bitset_basic.test bitset_basic.c) target_link_libraries(bitset_basic.test bitset) add_executable(bitset_iterator.test bitset_iterator.c) target_link_libraries(bitset_iterator.test bitset) add_executable(bitset_index.test bitset_index.c) target_link_libraries(bitset_index.test bitset) add_executable(base64.test base64.c ${CMAKE_SOURCE_DIR}/third_party/base64.c) add_executable(slab_cache.test slab_cache.c) target_link_libraries(slab_cache.test small) add_executable(region.test region.c) target_link_libraries(region.test small) add_executable(mempool.test mempool.c) target_link_libraries(mempool.test small) add_executable(small_alloc.test small_alloc.c) target_link_libraries(small_alloc.test small) tarantool-1.5.1.218.g1a69fd6/test/unit/queue.test0000775000000000000000000003600412213333045017745 0ustar rootrootELF>@@'@8@%"@@@@@@@@@ ``X ``@@DDPtddd@d@\\Qtd/lib64/ld-linux-x86-64.so.2GNU GNUө6vQ@)N H%  D@ k|qXK|5uk6ukk C/7ukBE8ukO 3b :  + : N h@ @= 8@`@ @` 5 @ F @`w@- K @'` r @I# @y @ 0@ @ ` @2libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6__libc_start_mainsnprintf__libc_csu_fini_edatatest3test1__data_start_IO_stdin_used__libc_csu_inittest_splice_end__bss_starttest0queue2strtest2GCC_3.0GCC_3.3.1GLIBC_2.2.50P&y 3a_& ;ui E```````HHu HtSH5b %d @%b h%Z h%R h%J h%B h%: h1I^HHPTI@H0@H@`UH-`HHw]øHt]``UH-`HHHH?HHHu]úHt]`= uUH~] @H=8 tHtU`H]{vUHH H}q EHEHHEDHE@UHcҹHH)֋UHcH@`@gEHEHHEH}u@`UHH ]@@HEHEHEHEHOHƿ@HEHEHEHEH!Hƿ@HEHEHEHEHE:HEHHEHUHEHHEHHuHEHEHEHEHEHEH}uHEHHƿ@J]@@6H|UHH0W@@HEHEHEEHEHEHUHHEHEHEHHƿ@HEHEHEHEHE:HEHHEHUHEHHEHHuHEHEHEHEHEHEH}uHEHHƿ@EW@@1HwUHH@Q@@ HEHEHEEEHEHEHUHHEHEHEHEHUHHEHEHEHHƿ@HEHEHEHEHE:HEHHEHUHEHHEHHuHEHEHEHEHEHEH}uHEH|Hƿ@Q@@ HPUHHPK@@HEHEHEEEEHEHEHUHHEHEHEHEHUHHEHEHEHEHUHHEHEHEHHƿ@NHEHEHEHEHE:HEHHEHUHEHHEHHuHEHEHEHEHEHEH}uHEH3Hƿ@K@@HUHHP?@@HEHEHEHEHEHEHEHtCHEHUHHEHEHEHE HEHHEHEHHEH9uHEHHEHmHƿ/@HEHOHƿ7@HEHtCHEHUHHEHEHEHE HEHHEHEHHEH9uHEHHEHHƿ/@HEHHƿ7@iEEEHEHEHUHHEHEHEHEHUHHEHEHEHEHUHHEHEHEHCHƿ@HEHtCHEHUHHEHEHEHE HEHHEHEHHEH9uHEHHEHHƿ/@{HEHHƿ7@]HEHtCHEHUHHEHEHEHE HEHHEHEHHEH9uHEHHEHQHƿ/@HEH3Hƿ7@HEHHtIHEHUHHHEHEHEHE HEHHEHEHHEHH9uHEHHEHHƿ/@bHEHHƿ7@DHEHHtIHEHUHHHEHEHEHE HEHHEHEHHEHH9uHEHHEH/Hƿ/@HEHHƿ7@HEHtCHEHUHHEHEHEHE HEHHEHEHHEH9uHEHHEHHƿ/@IHEHHƿ7@+HEHtCHEHUHHEHEHEHE HEHHEHEHHEH9uHEHHEHHƿ/@HEHHƿ7@?@@HUH:A<Y]ÐHl$Ld$H- L%x H\$Ll$Lt$L|$H8L)AIHI1Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH%d *** %s *** Initialized: %s STAILQ_INIT: %s STAILQ_REVERSE: %s *** %s: done *** q1: %s q2: %s test_splicetest3test2test1test0;X ltX 4\W\zRx *zRx yAC t zPLRx@ $$t@AC   $L@AC  $t'@AC " $I@AC D $2@AC - $=AC x $DJf@Xl`       @p @ 8@ @``o`@@@ Q `@@ o@@oo@`v@@@@@@GCC: (Debian 4.7.3-4) 4.7.3, @n p5 f @*@Lint,'l$$#"`$# val%W#A((#(# +z @5 @e F+eX buf-k @` /h n0Wdl|eV85 @F @`W ]@ F;P @ @ ?h ?`leEF @K @W W@ el1HP FI@ @ @ Mh M`\SK @r @ W Q@ el1VP el2V@ FW @4 @ ]h ]`bbr @@W K@ el1eP el2e@ el3e Ff"@}@ nh n`t@@=WM ?@ el1w` el2wP el3w@ hx oylMe =W@*@@% $ > $ >  I&I : ;  : ; I8  : ;  : ; I8 .? : ; ' I@B  : ; I 4: ; I 4: ; I I!I/.? : ; @B 4I4   !I/ .? : ; I@B :c /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitqueue.c  @+vu9wY2="u=>u"u=>uu"u=>uuu"u=>uuu..=KYstqe_next/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/queue.c__func__entry/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unitunsigned charshort unsigned intstqh_firstelemmainstqh_lasttest1queue2strlong long unsigned inttest_splicesizetypelong long intGNU C 4.7.3elem_queueshort inttest0test2test3queue1queue2wwxvxywyzwz}w}vwwwvwwwvwwwvwww0 v0 1 w1 2 w2 5 w5 m vm n w.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @V@Q^o@8ko@@@Pz@@ 8@8`@`p@ @ @d@d\@t@tK``````H`  `  040)dt5C>O04"vZ#J&e0$; 9@@<@`@@@@@@ @ @ 8@ `@ @@@d@@t@``````` ` ! ` @. 0 @A p @W `f` @`@`]@W@Q@K@?@ p@`)`:`G`P`c`o` @  ``@ r @I F @`+ :@I@i 0@y @2@` @` @= 5 @ @y K @'   8@crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryqueue.cbuf.3390__func__.3398__func__.3407__func__.3417__func__.3428__func__.3440__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_fini_ITM_deregisterTMCloneTabledata_start_edata_finitest3test1printf@@GLIBC_2.2.5snprintf@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_start__gmon_start___IO_stdin_used__gcc_personality_v0@@GCC_3.3.1__libc_csu_inittest_splice_end_start__bss_startmaintest0queue2strtest2_Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_inittarantool-1.5.1.218.g1a69fd6/test/unit/Makefile0000664000000000000000000011206512213333035017356 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. test/unit/CMakeFiles/base64.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/base64.test.dir/rule .PHONY : test/unit/CMakeFiles/base64.test.dir/rule # Convenience name for target. base64.test: test/unit/CMakeFiles/base64.test.dir/rule .PHONY : base64.test # fast build rule for target. base64.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/build .PHONY : base64.test/fast # Convenience name for target. test/unit/CMakeFiles/bit.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/bit.test.dir/rule .PHONY : test/unit/CMakeFiles/bit.test.dir/rule # Convenience name for target. bit.test: test/unit/CMakeFiles/bit.test.dir/rule .PHONY : bit.test # fast build rule for target. bit.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bit.test.dir/build.make test/unit/CMakeFiles/bit.test.dir/build .PHONY : bit.test/fast # Convenience name for target. test/unit/CMakeFiles/bitset_basic.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/bitset_basic.test.dir/rule .PHONY : test/unit/CMakeFiles/bitset_basic.test.dir/rule # Convenience name for target. bitset_basic.test: test/unit/CMakeFiles/bitset_basic.test.dir/rule .PHONY : bitset_basic.test # fast build rule for target. bitset_basic.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_basic.test.dir/build.make test/unit/CMakeFiles/bitset_basic.test.dir/build .PHONY : bitset_basic.test/fast # Convenience name for target. test/unit/CMakeFiles/bitset_index.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/bitset_index.test.dir/rule .PHONY : test/unit/CMakeFiles/bitset_index.test.dir/rule # Convenience name for target. bitset_index.test: test/unit/CMakeFiles/bitset_index.test.dir/rule .PHONY : bitset_index.test # fast build rule for target. bitset_index.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_index.test.dir/build.make test/unit/CMakeFiles/bitset_index.test.dir/build .PHONY : bitset_index.test/fast # Convenience name for target. test/unit/CMakeFiles/bitset_iterator.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/bitset_iterator.test.dir/rule .PHONY : test/unit/CMakeFiles/bitset_iterator.test.dir/rule # Convenience name for target. bitset_iterator.test: test/unit/CMakeFiles/bitset_iterator.test.dir/rule .PHONY : bitset_iterator.test # fast build rule for target. bitset_iterator.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_iterator.test.dir/build.make test/unit/CMakeFiles/bitset_iterator.test.dir/build .PHONY : bitset_iterator.test/fast # Convenience name for target. test/unit/CMakeFiles/mempool.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/mempool.test.dir/rule .PHONY : test/unit/CMakeFiles/mempool.test.dir/rule # Convenience name for target. mempool.test: test/unit/CMakeFiles/mempool.test.dir/rule .PHONY : mempool.test # fast build rule for target. mempool.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mempool.test.dir/build.make test/unit/CMakeFiles/mempool.test.dir/build .PHONY : mempool.test/fast # Convenience name for target. test/unit/CMakeFiles/mhash.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/mhash.test.dir/rule .PHONY : test/unit/CMakeFiles/mhash.test.dir/rule # Convenience name for target. mhash.test: test/unit/CMakeFiles/mhash.test.dir/rule .PHONY : mhash.test # fast build rule for target. mhash.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mhash.test.dir/build.make test/unit/CMakeFiles/mhash.test.dir/build .PHONY : mhash.test/fast # Convenience name for target. test/unit/CMakeFiles/queue.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/queue.test.dir/rule .PHONY : test/unit/CMakeFiles/queue.test.dir/rule # Convenience name for target. queue.test: test/unit/CMakeFiles/queue.test.dir/rule .PHONY : queue.test # fast build rule for target. queue.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/queue.test.dir/build.make test/unit/CMakeFiles/queue.test.dir/build .PHONY : queue.test/fast # Convenience name for target. test/unit/CMakeFiles/region.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/region.test.dir/rule .PHONY : test/unit/CMakeFiles/region.test.dir/rule # Convenience name for target. region.test: test/unit/CMakeFiles/region.test.dir/rule .PHONY : region.test # fast build rule for target. region.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/region.test.dir/build.make test/unit/CMakeFiles/region.test.dir/build .PHONY : region.test/fast # Convenience name for target. test/unit/CMakeFiles/rlist.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/rlist.test.dir/rule .PHONY : test/unit/CMakeFiles/rlist.test.dir/rule # Convenience name for target. rlist.test: test/unit/CMakeFiles/rlist.test.dir/rule .PHONY : rlist.test # fast build rule for target. rlist.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/build .PHONY : rlist.test/fast # Convenience name for target. test/unit/CMakeFiles/rope.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/rope.test.dir/rule .PHONY : test/unit/CMakeFiles/rope.test.dir/rule # Convenience name for target. rope.test: test/unit/CMakeFiles/rope.test.dir/rule .PHONY : rope.test # fast build rule for target. rope.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/build .PHONY : rope.test/fast # Convenience name for target. test/unit/CMakeFiles/rope_avl.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/rope_avl.test.dir/rule .PHONY : test/unit/CMakeFiles/rope_avl.test.dir/rule # Convenience name for target. rope_avl.test: test/unit/CMakeFiles/rope_avl.test.dir/rule .PHONY : rope_avl.test # fast build rule for target. rope_avl.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/build .PHONY : rope_avl.test/fast # Convenience name for target. test/unit/CMakeFiles/rope_basic.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/rope_basic.test.dir/rule .PHONY : test/unit/CMakeFiles/rope_basic.test.dir/rule # Convenience name for target. rope_basic.test: test/unit/CMakeFiles/rope_basic.test.dir/rule .PHONY : rope_basic.test # fast build rule for target. rope_basic.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/build .PHONY : rope_basic.test/fast # Convenience name for target. test/unit/CMakeFiles/rope_stress.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/rope_stress.test.dir/rule .PHONY : test/unit/CMakeFiles/rope_stress.test.dir/rule # Convenience name for target. rope_stress.test: test/unit/CMakeFiles/rope_stress.test.dir/rule .PHONY : rope_stress.test # fast build rule for target. rope_stress.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/build .PHONY : rope_stress.test/fast # Convenience name for target. test/unit/CMakeFiles/slab_cache.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/slab_cache.test.dir/rule .PHONY : test/unit/CMakeFiles/slab_cache.test.dir/rule # Convenience name for target. slab_cache.test: test/unit/CMakeFiles/slab_cache.test.dir/rule .PHONY : slab_cache.test # fast build rule for target. slab_cache.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/slab_cache.test.dir/build.make test/unit/CMakeFiles/slab_cache.test.dir/build .PHONY : slab_cache.test/fast # Convenience name for target. test/unit/CMakeFiles/small_alloc.test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/unit/CMakeFiles/small_alloc.test.dir/rule .PHONY : test/unit/CMakeFiles/small_alloc.test.dir/rule # Convenience name for target. small_alloc.test: test/unit/CMakeFiles/small_alloc.test.dir/rule .PHONY : small_alloc.test # fast build rule for target. small_alloc.test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/small_alloc.test.dir/build.make test/unit/CMakeFiles/small_alloc.test.dir/build .PHONY : small_alloc.test/fast __/__/src/rope.o: __/__/src/rope.c.o .PHONY : __/__/src/rope.o # target to build an object file __/__/src/rope.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/__/__/src/rope.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/__/__/src/rope.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/__/__/src/rope.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/__/__/src/rope.c.o .PHONY : __/__/src/rope.c.o __/__/src/rope.i: __/__/src/rope.c.i .PHONY : __/__/src/rope.i # target to preprocess a source file __/__/src/rope.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/__/__/src/rope.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/__/__/src/rope.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/__/__/src/rope.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/__/__/src/rope.c.i .PHONY : __/__/src/rope.c.i __/__/src/rope.s: __/__/src/rope.c.s .PHONY : __/__/src/rope.s # target to generate assembly for a file __/__/src/rope.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/__/__/src/rope.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/__/__/src/rope.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/__/__/src/rope.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/__/__/src/rope.c.s .PHONY : __/__/src/rope.c.s __/__/third_party/base64.o: __/__/third_party/base64.c.o .PHONY : __/__/third_party/base64.o # target to build an object file __/__/third_party/base64.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/__/__/third_party/base64.c.o .PHONY : __/__/third_party/base64.c.o __/__/third_party/base64.i: __/__/third_party/base64.c.i .PHONY : __/__/third_party/base64.i # target to preprocess a source file __/__/third_party/base64.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/__/__/third_party/base64.c.i .PHONY : __/__/third_party/base64.c.i __/__/third_party/base64.s: __/__/third_party/base64.c.s .PHONY : __/__/third_party/base64.s # target to generate assembly for a file __/__/third_party/base64.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/__/__/third_party/base64.c.s .PHONY : __/__/third_party/base64.c.s base64.o: base64.c.o .PHONY : base64.o # target to build an object file base64.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/base64.c.o .PHONY : base64.c.o base64.i: base64.c.i .PHONY : base64.i # target to preprocess a source file base64.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/base64.c.i .PHONY : base64.c.i base64.s: base64.c.s .PHONY : base64.s # target to generate assembly for a file base64.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/base64.c.s .PHONY : base64.c.s bit.o: bit.c.o .PHONY : bit.o # target to build an object file bit.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bit.test.dir/build.make test/unit/CMakeFiles/bit.test.dir/bit.c.o .PHONY : bit.c.o bit.i: bit.c.i .PHONY : bit.i # target to preprocess a source file bit.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bit.test.dir/build.make test/unit/CMakeFiles/bit.test.dir/bit.c.i .PHONY : bit.c.i bit.s: bit.c.s .PHONY : bit.s # target to generate assembly for a file bit.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bit.test.dir/build.make test/unit/CMakeFiles/bit.test.dir/bit.c.s .PHONY : bit.c.s bitset_basic.o: bitset_basic.c.o .PHONY : bitset_basic.o # target to build an object file bitset_basic.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_basic.test.dir/build.make test/unit/CMakeFiles/bitset_basic.test.dir/bitset_basic.c.o .PHONY : bitset_basic.c.o bitset_basic.i: bitset_basic.c.i .PHONY : bitset_basic.i # target to preprocess a source file bitset_basic.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_basic.test.dir/build.make test/unit/CMakeFiles/bitset_basic.test.dir/bitset_basic.c.i .PHONY : bitset_basic.c.i bitset_basic.s: bitset_basic.c.s .PHONY : bitset_basic.s # target to generate assembly for a file bitset_basic.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_basic.test.dir/build.make test/unit/CMakeFiles/bitset_basic.test.dir/bitset_basic.c.s .PHONY : bitset_basic.c.s bitset_index.o: bitset_index.c.o .PHONY : bitset_index.o # target to build an object file bitset_index.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_index.test.dir/build.make test/unit/CMakeFiles/bitset_index.test.dir/bitset_index.c.o .PHONY : bitset_index.c.o bitset_index.i: bitset_index.c.i .PHONY : bitset_index.i # target to preprocess a source file bitset_index.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_index.test.dir/build.make test/unit/CMakeFiles/bitset_index.test.dir/bitset_index.c.i .PHONY : bitset_index.c.i bitset_index.s: bitset_index.c.s .PHONY : bitset_index.s # target to generate assembly for a file bitset_index.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_index.test.dir/build.make test/unit/CMakeFiles/bitset_index.test.dir/bitset_index.c.s .PHONY : bitset_index.c.s bitset_iterator.o: bitset_iterator.c.o .PHONY : bitset_iterator.o # target to build an object file bitset_iterator.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_iterator.test.dir/build.make test/unit/CMakeFiles/bitset_iterator.test.dir/bitset_iterator.c.o .PHONY : bitset_iterator.c.o bitset_iterator.i: bitset_iterator.c.i .PHONY : bitset_iterator.i # target to preprocess a source file bitset_iterator.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_iterator.test.dir/build.make test/unit/CMakeFiles/bitset_iterator.test.dir/bitset_iterator.c.i .PHONY : bitset_iterator.c.i bitset_iterator.s: bitset_iterator.c.s .PHONY : bitset_iterator.s # target to generate assembly for a file bitset_iterator.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/bitset_iterator.test.dir/build.make test/unit/CMakeFiles/bitset_iterator.test.dir/bitset_iterator.c.s .PHONY : bitset_iterator.c.s mempool.o: mempool.c.o .PHONY : mempool.o # target to build an object file mempool.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mempool.test.dir/build.make test/unit/CMakeFiles/mempool.test.dir/mempool.c.o .PHONY : mempool.c.o mempool.i: mempool.c.i .PHONY : mempool.i # target to preprocess a source file mempool.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mempool.test.dir/build.make test/unit/CMakeFiles/mempool.test.dir/mempool.c.i .PHONY : mempool.c.i mempool.s: mempool.c.s .PHONY : mempool.s # target to generate assembly for a file mempool.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mempool.test.dir/build.make test/unit/CMakeFiles/mempool.test.dir/mempool.c.s .PHONY : mempool.c.s mhash.o: mhash.c.o .PHONY : mhash.o # target to build an object file mhash.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mhash.test.dir/build.make test/unit/CMakeFiles/mhash.test.dir/mhash.c.o .PHONY : mhash.c.o mhash.i: mhash.c.i .PHONY : mhash.i # target to preprocess a source file mhash.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mhash.test.dir/build.make test/unit/CMakeFiles/mhash.test.dir/mhash.c.i .PHONY : mhash.c.i mhash.s: mhash.c.s .PHONY : mhash.s # target to generate assembly for a file mhash.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/mhash.test.dir/build.make test/unit/CMakeFiles/mhash.test.dir/mhash.c.s .PHONY : mhash.c.s queue.o: queue.c.o .PHONY : queue.o # target to build an object file queue.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/queue.test.dir/build.make test/unit/CMakeFiles/queue.test.dir/queue.c.o .PHONY : queue.c.o queue.i: queue.c.i .PHONY : queue.i # target to preprocess a source file queue.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/queue.test.dir/build.make test/unit/CMakeFiles/queue.test.dir/queue.c.i .PHONY : queue.c.i queue.s: queue.c.s .PHONY : queue.s # target to generate assembly for a file queue.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/queue.test.dir/build.make test/unit/CMakeFiles/queue.test.dir/queue.c.s .PHONY : queue.c.s region.o: region.c.o .PHONY : region.o # target to build an object file region.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/region.test.dir/build.make test/unit/CMakeFiles/region.test.dir/region.c.o .PHONY : region.c.o region.i: region.c.i .PHONY : region.i # target to preprocess a source file region.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/region.test.dir/build.make test/unit/CMakeFiles/region.test.dir/region.c.i .PHONY : region.c.i region.s: region.c.s .PHONY : region.s # target to generate assembly for a file region.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/region.test.dir/build.make test/unit/CMakeFiles/region.test.dir/region.c.s .PHONY : region.c.s rlist.o: rlist.c.o .PHONY : rlist.o # target to build an object file rlist.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/rlist.c.o .PHONY : rlist.c.o rlist.i: rlist.c.i .PHONY : rlist.i # target to preprocess a source file rlist.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/rlist.c.i .PHONY : rlist.c.i rlist.s: rlist.c.s .PHONY : rlist.s # target to generate assembly for a file rlist.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/rlist.c.s .PHONY : rlist.c.s rope.o: rope.c.o .PHONY : rope.o # target to build an object file rope.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/rope.c.o .PHONY : rope.c.o rope.i: rope.c.i .PHONY : rope.i # target to preprocess a source file rope.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/rope.c.i .PHONY : rope.c.i rope.s: rope.c.s .PHONY : rope.s # target to generate assembly for a file rope.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/rope.c.s .PHONY : rope.c.s rope_avl.o: rope_avl.c.o .PHONY : rope_avl.o # target to build an object file rope_avl.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/rope_avl.c.o .PHONY : rope_avl.c.o rope_avl.i: rope_avl.c.i .PHONY : rope_avl.i # target to preprocess a source file rope_avl.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/rope_avl.c.i .PHONY : rope_avl.c.i rope_avl.s: rope_avl.c.s .PHONY : rope_avl.s # target to generate assembly for a file rope_avl.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/rope_avl.c.s .PHONY : rope_avl.c.s rope_basic.o: rope_basic.c.o .PHONY : rope_basic.o # target to build an object file rope_basic.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/rope_basic.c.o .PHONY : rope_basic.c.o rope_basic.i: rope_basic.c.i .PHONY : rope_basic.i # target to preprocess a source file rope_basic.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/rope_basic.c.i .PHONY : rope_basic.c.i rope_basic.s: rope_basic.c.s .PHONY : rope_basic.s # target to generate assembly for a file rope_basic.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/rope_basic.c.s .PHONY : rope_basic.c.s rope_stress.o: rope_stress.c.o .PHONY : rope_stress.o # target to build an object file rope_stress.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/rope_stress.c.o .PHONY : rope_stress.c.o rope_stress.i: rope_stress.c.i .PHONY : rope_stress.i # target to preprocess a source file rope_stress.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/rope_stress.c.i .PHONY : rope_stress.c.i rope_stress.s: rope_stress.c.s .PHONY : rope_stress.s # target to generate assembly for a file rope_stress.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/rope_stress.c.s .PHONY : rope_stress.c.s slab_cache.o: slab_cache.c.o .PHONY : slab_cache.o # target to build an object file slab_cache.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/slab_cache.test.dir/build.make test/unit/CMakeFiles/slab_cache.test.dir/slab_cache.c.o .PHONY : slab_cache.c.o slab_cache.i: slab_cache.c.i .PHONY : slab_cache.i # target to preprocess a source file slab_cache.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/slab_cache.test.dir/build.make test/unit/CMakeFiles/slab_cache.test.dir/slab_cache.c.i .PHONY : slab_cache.c.i slab_cache.s: slab_cache.c.s .PHONY : slab_cache.s # target to generate assembly for a file slab_cache.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/slab_cache.test.dir/build.make test/unit/CMakeFiles/slab_cache.test.dir/slab_cache.c.s .PHONY : slab_cache.c.s small_alloc.o: small_alloc.c.o .PHONY : small_alloc.o # target to build an object file small_alloc.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/small_alloc.test.dir/build.make test/unit/CMakeFiles/small_alloc.test.dir/small_alloc.c.o .PHONY : small_alloc.c.o small_alloc.i: small_alloc.c.i .PHONY : small_alloc.i # target to preprocess a source file small_alloc.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/small_alloc.test.dir/build.make test/unit/CMakeFiles/small_alloc.test.dir/small_alloc.c.i .PHONY : small_alloc.c.i small_alloc.s: small_alloc.c.s .PHONY : small_alloc.s # target to generate assembly for a file small_alloc.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/small_alloc.test.dir/build.make test/unit/CMakeFiles/small_alloc.test.dir/small_alloc.c.s .PHONY : small_alloc.c.s test.o: test.c.o .PHONY : test.o # target to build an object file test.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/test.c.o .PHONY : test.c.o test.i: test.c.i .PHONY : test.i # target to preprocess a source file test.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/test.c.i .PHONY : test.c.i test.s: test.c.s .PHONY : test.s # target to generate assembly for a file test.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/test.c.s .PHONY : test.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... base64.test" @echo "... bit.test" @echo "... bitset_basic.test" @echo "... bitset_index.test" @echo "... bitset_iterator.test" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... mempool.test" @echo "... mhash.test" @echo "... package" @echo "... package_source" @echo "... queue.test" @echo "... rebuild_cache" @echo "... region.test" @echo "... rlist.test" @echo "... rope.test" @echo "... rope_avl.test" @echo "... rope_basic.test" @echo "... rope_stress.test" @echo "... slab_cache.test" @echo "... small_alloc.test" @echo "... __/__/src/rope.o" @echo "... __/__/src/rope.i" @echo "... __/__/src/rope.s" @echo "... __/__/third_party/base64.o" @echo "... __/__/third_party/base64.i" @echo "... __/__/third_party/base64.s" @echo "... base64.o" @echo "... base64.i" @echo "... base64.s" @echo "... bit.o" @echo "... bit.i" @echo "... bit.s" @echo "... bitset_basic.o" @echo "... bitset_basic.i" @echo "... bitset_basic.s" @echo "... bitset_index.o" @echo "... bitset_index.i" @echo "... bitset_index.s" @echo "... bitset_iterator.o" @echo "... bitset_iterator.i" @echo "... bitset_iterator.s" @echo "... mempool.o" @echo "... mempool.i" @echo "... mempool.s" @echo "... mhash.o" @echo "... mhash.i" @echo "... mhash.s" @echo "... queue.o" @echo "... queue.i" @echo "... queue.s" @echo "... region.o" @echo "... region.i" @echo "... region.s" @echo "... rlist.o" @echo "... rlist.i" @echo "... rlist.s" @echo "... rope.o" @echo "... rope.i" @echo "... rope.s" @echo "... rope_avl.o" @echo "... rope_avl.i" @echo "... rope_avl.s" @echo "... rope_basic.o" @echo "... rope_basic.i" @echo "... rope_basic.s" @echo "... rope_stress.o" @echo "... rope_stress.i" @echo "... rope_stress.s" @echo "... slab_cache.o" @echo "... slab_cache.i" @echo "... slab_cache.s" @echo "... small_alloc.o" @echo "... small_alloc.i" @echo "... small_alloc.s" @echo "... test.o" @echo "... test.i" @echo "... test.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/test/unit/mempool.result0000664000000000000000000000006512202131537020623 0ustar rootroot *** mempool_basic *** *** mempool_basic: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/small_alloc.c0000664000000000000000000000332012202131537020336 0ustar rootroot#include "lib/small/small.h" #include "unit.h" #include #include #include enum { OBJSIZE_MIN = 3 * sizeof(int), OBJSIZE_MAX = 5000, OBJECTS_MAX = 1000, OSCILLATION_MAX = 1024, ITERATIONS_MAX = 5000, }; struct slab_cache cache; struct small_alloc alloc; /* Streak type - allocating or freeing */ bool allocating = true; /** Keep global to easily inspect the core. */ long seed; static int *ptrs[OBJECTS_MAX]; static inline void free_checked(int *ptr) { fail_unless(ptr[0] < OBJECTS_MAX && ptr[ptr[1]/sizeof(int)-1] == ptr[0]); int pos = ptr[0]; fail_unless(ptrs[pos] == ptr); ptrs[pos][0] = ptrs[pos][ptr[1]/sizeof(int)-1] = INT_MAX; smfree(&alloc, ptrs[pos]); ptrs[pos] = NULL; } static inline void * alloc_checked() { int pos = rand() % OBJECTS_MAX; int size = rand() % OBJSIZE_MAX; if (size < OBJSIZE_MIN || size > OBJSIZE_MAX) size = OBJSIZE_MIN; if (ptrs[pos]) { assert(ptrs[pos][0] == pos); free_checked(ptrs[pos]); } if (! allocating) return NULL; ptrs[pos] = smalloc_nothrow(&alloc, size); ptrs[pos][0] = pos; ptrs[pos][1] = size; ptrs[pos][size/sizeof(int)-1] = pos; // printf("size: %d\n", size); return ptrs[pos]; } static void basic_alloc_streak() { int oscillation = rand() % OSCILLATION_MAX; int i; for (i = 0; i < oscillation; ++i) { alloc_checked(); } } void small_alloc_basic() { int i; header(); small_alloc_create(&alloc, &cache, OBJSIZE_MIN, OBJSIZE_MAX, 1.3); for (i = 0; i < ITERATIONS_MAX; i++) { basic_alloc_streak(); allocating = ! allocating; } small_alloc_destroy(&alloc); footer(); } int main() { seed = time(0); srand(seed); slab_cache_create(&cache); small_alloc_basic(); slab_cache_destroy(&cache); } tarantool-1.5.1.218.g1a69fd6/test/unit/rope_avl.c0000664000000000000000000000146012202131537017666 0ustar rootroot#include #include "unit.h" #include "rope_common.h" /******************************************************************/ static void test_avl_rotations() { header(); struct rope *rope = test_rope_new(); /* counterclockwise single rotation. */ test_rope_insert(rope, 0, "1"); test_rope_insert(rope, 1, "2"); test_rope_insert(rope, 2, "<"); /* clockwise single rotation */ test_rope_insert(rope, 0, "0"); test_rope_insert(rope, 0, ">"); /* counterclockwise double rotation */ test_rope_insert(rope, 1, "*"); /* clocckwise double rotation */ test_rope_insert(rope, 3, "p"); test_rope_insert(rope, 3, "p"); test_rope_insert(rope, 3, "p"); test_rope_insert(rope, 3, "p"); test_rope_insert(rope, 3, "*"); rope_delete(rope); footer(); } int main() { test_avl_rotations(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/unit/bitset_index.test0000775000000000000000000027147012213333055021313 0ustar rootrootELF>`@@D@8@&#@@@@@@@@@ߝߝ `` ``@@DDPtd @ @<<Qtd/lib64/ld-linux-x86-64.so.2GNU GNU=w\GNqҍ(_CSC 4`IID  ",8%@bi@X(! ;E@`I'DV' "#'()+,-02356789<=@ABCDGHKNPRTUVY[\^_`deghijop7woZTfΦzJ=e/AAOY-W+F-a/ bo9꺽PwQwLm7i(Kq"1uu[&@cz"cw`*W"Bcmh&͊??&]# ]  2bi.! ^nxE%%6X{A3uurEġ‰r,* k : 1)r|=KgNB k Cs4|Xdz"l k|BEweLJ8_ oΌ2?vy._4#| Á / ^h(=x1eP%qX + : N h C@u C@ p\@0 xL@c !W@l& |V@= 0.@4I LM@ x8@D  v@' \@ B@:m kO@A` V@4n d.@@ V@4` Y@? |@U K@o 9D@E !U@ s@6 z@ cw@ K@K ]@8 r@ G@B HECHEHHEHHHEH HEH4HEHѺH1$HEHEH;Er~@HMHUHuHEH1~@HElWgfff)‰Љ)…u?HEHHEHHHEHH&HEHHEHHHEHEH;Er~@HMHUHuHEHHEHHEHHEHЀ@}@HrHh[]UHH,H ,x ,~AH} H$€@AA@|@|@~@|@HǸHE @HstAH\} H$€@AA@|@|@|@|@HǸTH` @H H@ @HrHEHDž8H8H8HEHѺH!,uHEQ,u$H8H H!H H9uHE$,uH8H H!HtHEH8HH8H8H=X,uXH@H%H| H$€@AA@|@|@~@|@HǸ Q,ugH H@HHF&H{ H$€@AA@|@|@ @|@HǸ,ucH H@HH&tAH7{ H$€@AA@|@|@p@|@HǸ/uH@H`HEHH'tAHz H$€@AA@|@|@@}@|@HǸHEHEH`HHE,uRHEH;EtAHYz H$€@AA@|@|@@|@HǸQHEH,u!H HH#UH H9uHE,uH H#EHtHEHEH}7H`HHtAHy H$€@AA@|@|@}@|@HǸHEH;EtAHVy H$€@AA@|@|@@|@HǸNH@HH`H HEHs HnUH徰@0|@@}@]UH徠@0|@w@}@T]UHH@0|@6HEBHEHƿR@}@ UHH`@0|@HEBHEHƿ`@}@UHH@@0|@HE @HtAHw H$@@AA@|@|@|@|@HǸH` @H'H@ @HHEHE>HEHUH!H0HEHEHUH0HEHѺHHEH}vp%)HH#EH8H8H@HH\ tAHv H$@@AA@|@|@@|@HǸH@H`HEHH"tAH/v H$@@AA@|@|@@}@|@HǸ'mH8HE[H`H?H;EtAHu H$@@AA@|@|@ @|@HǸ HEHEHHH8HH;EsH`HHtAHWu H$@@A A@|@|@}@|@HǸOH@HH`HHEHt@@}@ H[UHHt HC41w]ÐUHHH}HuHE HjHEHUHPUHH H}HEvHEH@HUHHH@HtTHEH@HUHRHMHHHRHHEH@HUHRHMHHHRHHEHEHH;EyHEH@HtHEH@HUHRHHE HUHH H}HEHEH@HUHHHHHEH@HMHHH@H%HEH@HUHHHHEH@HMHHH@HHEH@HUHHHHEHEHH;ETHEHUHH H}HuHEH@H;Er HEH@Ht HEH@HPHEHeHEHH;EsHEH@HUHHHUHRHHHEH}u\HEH@HUHH)HHHHEH@HHHEHȾHHEHUHPHEHUHPUHHH}HEHHPHEHHtHEHHPHEHUHH@H}HuHUHEH@H;Er IHEH@Ht HEH@HOHEHeHEHH;EsHEH@HUH HUHRHHHEH}HEH@HUHRHMHHHEH}HEH@HUHH)HHHEH@H HEHȾHtHEH@HUH)HEHHHEHȾHIHEHUHPHEHUHPHEHUHPHEH@HUHUHH0H}HuЈEHEHHu@ @q@HEHPHEHHHHHEHEHHPHMHEHHtLHEHPHEHHHHEHHEHPHEHHE܈HEHHPHEHÐUHHH}HuHE`HHEHUHP(UHH H}HEHEHHHUHHHHHH@HHEHH(HEHpHUHHHHHH@HHEHH(HEHpHUHHHHHH@ HHEHH(HEHpHUHHHHHH@(HHEHEHH;E(HEH@HtHEH@(HUHRHHEH@Ht*HEH@Hu!HEH@(HUHRHHEH@Ht*HEH@ H>!HEH@(HUHR HHE`H\UHH H}HuHEH@H;Er HEH@Ht HEH@HKHEHeHEH;EvHEHH(HUHHHHHHEH@HHHEH}ukHEH@HUH)HHHHHHEHPHHHHHHEHHʾHtHEHUHPHEHUHPUHH@H}HuHUHEH@H;Er HEH@Ht HEH@HJHEHeHEH;EvHEH@(HUH HUHRHHHEH}tHEH@(HUHR HMHHHEH}0HEH@(HUH HUHR(HHHEH}HEH@HUHH)HHHEH@H HEHȾH%HEH@HUH)HEHHHEHȾHHEH@HUHH)HHHEH@H HEHȾHHEHUHPHEHUHP HEHUHP(HEHUHP8HEH@(HUHHEH@(HUHUHHPH}HuHUHMH}u`@@@H}u`@@@H}t H}u`@@+@HEH@(HHEHEH@HtHEH@HJ!HEH@(HUHֿHHEHPHEH@HHEH@ HtHEH@ H8HEH@(HUHֿHHEHP HEH@ Hu HEH@ HgHEHHEHHt HEHEH@HUHHHEHEHHHUHHHHHHEHEHHMHEHH't hHEHEH@HUHHHH;Er`@@H@HEHHEH@HUHHHHHEHHHu`@@p@HEH@HUHHHEH@HMHHHH HEHHHHEHP HEHHEHHHEHHEH@(HUHHHHEHEHH;EHEHHEHPHEHEHH;EXHEHHEHHEH/UHSHHH}HuH}u@@@@HMHHHH HHHHHH)Ht@@@@yHEHH;Ev@@@߂@SHEH@HuHEHBHEHEHEHEH@(HUHHHEH@HUHHHHUHH/ HHEHP HEHHEH@(HUHHHHuHEHHEH@(HUHHHHHEH9s@@ @@eHEH@(HUHHHHHEH9v#HEH@(HUHHHHHEHEHEH@H;EHUHEHHHH[]UHH H}HuH}tH}u @@0@HEHEHEHEHEHHEHH9sHEHHEHH9vUHH H}HuH}u@-@@;H}u@.@W@HEH@Hu@/@j@HEHHu@0@@HEHHEHEHP HEHteHEH@(HUHHHHHEHH9t@6@@_HEH@(HUHHHHEHHhHEH@(HUHHHHtLHEH@(HUHHHHHEHH9u'HEH@(HUHHHHEHHHEHEH@H;EUHH H}HEH0HEH@=@0HZHEH@HHEHHtHEH@HUHRHHHEH@HHEH@HHHE~HEHHHUHHHHHHHEH@HH9wbHEHH HEHpHUHHHHHHH_HEHP HEH@HHHEHEHH;EqHEH@HHUHz0H{6UHH H}H}u@n@@;HE.HEHHHUHHHHHȾHHEHEHH;EwHEH3UHH0H}H}u`@|@@HEHEH@HHEHEHEHHHUHHHHHHH;EHEHUH HEHpHUHHHHHHHHHEHUH4HEHHHUHHHHHHH9v`@@@HEHEHH;EEHEHUHHH}H}u@@@@HEH-UHH H}H}u @@@fHEH@HHu H=HEH0H5HEH}tHEH@HHEHHEH)ÐUHHH}HEHHH UHHH}HuH}uІ@.@څ@HE HHEHUHPHEHWtUHH H}H}u@:@څ@KHEH@Hu@;@@%HE|HEHHUHHHHtvHEHHUHHHHw HEH@HUHHMHHHHHEHHUHHHHEHEH@H;ErHEH@Ht3HEH@HUHHHEH@HUHRHHE HDUHSHHH}HuHEH@H;Er -HEH@Ht HEH@H?HEHeHEH;EvHEH@HUH HUHHHHEH}HEH@HUHH)HHHEH@H HEHȾHtHEHUHHEH@HUHRHMHHHEH}IHEHUHPHEH@HEqHEHHUHHHEH@8HHEHHUHHHHtMHEHPHEHHMHHHHH HEHEH;ErHEHUHPHEH@HE|HEHHUHHHHtxHEHHUHHHH HEH@HUHHMHHHHHEHHUHHHHEHEH;EvHH[]UHHH}HuHxHpH}u@@څ@H}u@@@tHEH@Hu@@@NHxHHHEHUHEHHt {HEHHHpHH E}y LHEH@UHxHuHEH.HETHEHHEHEHHUHHHHpHH E}HEHPHEH‹EHEH/HEH}uHEH@u HxHuHEH'.UHEHHEHEHHUHHHHpHH E}y@@@HEH/HEH}uHUHuHEH-rHEHHEHEHPHEH<u)HEHHUHHHHpHH'HEHHUHHHHpHHHEH_.HEH}tHEH;EiHEH@<uHEHHHpHHNHEHHHpHHH%UHH H}HuH}up@@څ@cHEH@HtyHEFHEHHUHHHHt&HEHHUHHHHUHHHEHEH@H;EwHEHHHUHHUHHH}HuH}uP@@څ@HEHHHUHHeUHHH}HEHHEHt&HEH]tUHH@H}HuHUHEHHEH^t HEZHEHHEHUHEHHu(EEHMHEHHt9HEHEHH;EwHEغHtUHH`H}HuHUHEHHEHtfHUHuHEH#*/HEHHEHMHEHHtHEH0+HEH}uHMUHH`H}HuHUHEH+HUHuHEH)FHEHHEHEHt?HMHEHHXtHEH*HEH}uHUHH`H}HuHUHEHHEH8t HEHtfHUHuHEH(/HEHHEHMHEHHtHEH)HEH}uHUHH@H}HuHUH}u0@r@څ@H}u0@s@@HEHEHEYHEH@HUHHH@HUHHHH;Ev)HEH@HUHHH@HUHHHHEHEHEH@HUHHHH;EwHEHEHH;EkHEHPHEHHtHEHHHEHHuHEHUHH}HEH@(]UHHH}HuHE8HHEHUHP0HEHUHH0H}HuHUHEHEHEHLHEH@0HUHиUHHH}HEHUHѺP@H HE(H>UHSHHH}HuHEHHEHEHUHH HEH}uaHEHH;EwHEHHH;Ew@L@@@HEHHUHH)HEHHH%#H HH[]UHSHXH}HuHEH#HEHEHUHH HEH}uiHEH@0HuHEHEH@0HUHֿHEH}u HEHcHUHEHHEHUHHa HEHH;EwHEHHH;Ew @g@@@HEHHUHH)HEHHH_"E߀}t-HEH@(HPHEHP(HEH@HPHEHPHHX[]UHSHHH}HuHEHHEHEHUHHHEH}u 4HEHH;EwHEHHH;Ew@@@@HEHHUHH)HEHHH!EEt HEH@(Hu@@@5HEH@Hu@@@HEH@(HPHEHP(HEH@HPHEHPHEH@Hu5HEHUHH HEH}HEH@0HUHиH&HH[]UHH H}HuHE HyHEH@HEH@0HHHEHPHEH@HEHEHHE5HEHHPHEHHEH@HEHEHUHH-HEH}uHEHH;Et@@@ÐUHH}]UHH}HEH HEHE]UHH H}HEHHHEHH)HHHEHUHEHPUHH}]UHH}HMHHHH HHHHHH)HEH)]UHH H}HEH>HEHEHUHH H}HEH HEHEHUHH0H}HuHEHHEHEHHEEE"HEHHUHH!HHEHEEE;E|UHH0H}HuHEHfHEHEHVHEEE%HEHHUHHH!HHEHEEE;E|UHH0H}HuHEHHEHEHHEEE"HEHHUHH HHEHEEE;E|UHH}HuHEHHEHH9sHEHHEHH9v]UHH}HEHPHEHHEHPHEHPHEHHHEH@H HHEHPHEH@HHHEHPHEH@HHHEHP]UHH}HEHHEHEHH;Et# HEH@HEHEH@HUHH9uHEHH;EuHEHE]UHH}HEHHEHEHH;Et+HEH@HHEHEH@HHUHH9uHEHH;EuHEHE]UHH0H}HuHEH@HHUHH9tJHEH@HHEHEHH;E HEH@HEHEH@HUHH9uHEHHEHEHH;Eu@Y @q@HEHHEHUHEHHE}yHEHEHEH@HE}~7HEH@HHEHEHH;Eu@Y @q@蛿HEHH;EuHEHEUHH0H}HuHEH@HUHH9tNHEH@HEHEHH;EHEH@HHEHEH@HHUHH9uHEHHEHEHH;Eu@Y @q@ھHEHHEHUHEHHpE}yHEH@HE}~?HEHEHEH@HHEHEHH;Eu@Y @q@\HEHH;EuHEHEUHH H}HuHEHHE$}yHEH@HEHEH@HHEHEHH;EtHUHEHHE}uHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHH5E}yHEHEHEH@HE"}~HEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH0H}HuHEHHEHEHHETHUHEHHE}yHEH@HE*}~HEHEHEH@HHE HEHEHEHH;EuHEHH;EuHEHEUHH`HHHHPHHPHHHHH@H HHHPHH@HHHHPHHHHHEHEHHHHpHEPHE@E}up@Y @@膻}yHEHPHEHH@HHEHPHEHH@HHHEHEHHHH9]HEHHHmHEHHEHE@HEHHHEHEHUHPHEH@HHEH@HEHEH@HHEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHE=HEHHHEHEH@HƒHEH HHEHPHEH@HOHEH@HEHEH@HtJHEH@HHHEHPHEH@HHHEHPHEH@HHHEHPHEH@HEHEH@HHEHEH@HHEH@H HHEHPHEHUHPHEH@HHEH HHEHPHEH@HHHEHPHEHEHEHUHHmHUHH9HHHHHHHHRHHPUHHHXHPHEHXHH`H`HEHEHHPHHHEPHE@E܃}yHEHPHEHH@HyHEHPHEHH@HH}uYHE@HEHEHE&HE@HEHPHEHH@HHEHEHHXHH9u HEHEHHXHH9HEHH;PtP@Y @@dHmHEHH;PUHEHH@HEHEHHUHHRHHHPHRHH HPHEHHPHRHPHEHHPHRHHHUHHRH HPHPH@HHEH HHPHPHEHHEHHEHPHH`H9EuHEHHXHHEH@yHEHHHUHHPaHEHHHUHHHUHHHRH HP.HPH@HEHXHH;EHPH@HtP@Y @@覵HEH@HuP@Y @@}HEH@HHHEHPH`H9EuHXHUH HEH@yHEHHHUHP HEHHHUHHHRHуHUH HP H`H9EuHXHPHXHt HEHH@HtGHEH@xP@Y @3@荴HEHHHXHHP HXHPHEHHm HE@uP@Y @E@.HE@HEHHUHHHPHEHHH@HtP@Y @X@ٳHEHH@HHEHH@HHEHEH@HEHEH@HHEHHUHHRHHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPIHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHUH`H9wP@Y @@RHEH@yHEHHHUHPHEHHHUHHHRHуHUH HPHEHH@HHEHEH@HEHEH@H=HEH@HHHEHPHEH@HEHEH@HHHEHPHEH@HƒHEH HHEHPHEHHUHHRHуHUH HPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPH`H9EuHXHUHHEH@yHEHHHUHPgHEHHHUHHHRHуHUH HP7HEHHUHHRHHPHEHH@HHEHEHHUHRHHUHHRH HPHEHHEHPHEHUHkHEHHUHHHHUHHRH HPHEHH@HEHEH@HVHEH@HHEHEH@HEHEH@HHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HƒHEH HHEHPHEH@HHEHEH@HHEH@H HHEHPHEHUHPHXHH;EuP@Y @Ӊ@cHEH@HHHEHPHEHH@HEHEHHUHRHHPHEHHHEH@H HHEHPHEH@HHHEHPH`H9EuHXHUHxHEH@yHEHHHUHPQHEHHHUHHHRHуHUH HP!HEHH@HHEH@HxHxH@H)HEHHUHHRHHPHEH@HHHEHPHxH@HHHxHPHEHH@HpHEHHpHRHHPHEHHHpH@H HHpHPHUH`H9wP@Y @@lHEH@yHEHHHpHPHEHHHUHHHRHуHpH HPHEH@HHHEHPHEHHUHHRHHPHEH@HhHhH@HHhH@HHHhHPHEHH@H`HEHH`HRHHPHEHHH`H@H HH`HPH`H9EuHXH`HHEH@yHEHHH`HPHEHHHUHHHRHуH`H HPpHEH@HHHEHPHmHUH`H9BH`HXHHXHH@HtP@Y @@TUHH0H}HuHUHMHEHH;Eu HEHHEHpHMHUHEHHEHEHH;EtHENHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHKUHHPH}HuHUHMLEHUHEHH$E}HEHPH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEH@HHHMHUHEH}~,HEH@HHH}HMHuHEIHNHEH@HHEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIH{HEHEH0HMHUHEHHEHEHH;EuHEHEUHH0H}HuHUHMHEHH;Eu HEHHEH@HHHMHUHEHHEHEHH;EtHEJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHHUHHPH}HuHUHMLEHUHEHHE}HEH@HHH}HMHuHEIHHEHEHH9Eu HUHuHMHEHHEH}t HEHEHpHMHUHEHu}y%HEHPH}HMHuHEIHJHEH@HEHUHuHMHEHHEH}tHEHMHUHuHEHUHH0H}HuHUHMH}t(HEHH}HMHuHEIHHEHEH0HMHUHEHHEHEHH;EuHEHEÐUHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE E[]UHSH}HuHEHHEHEȃHEHEHEHEHUHHEӉ؃EHEHUHHEHMH0HE!E[]UH}E]UHH}HE]UH}E]UHH}HEH?]UHH}EHCUHHH}H},UHS}uEUӉÉ[]UHSH}uEHUHӉHH[]UHS}uEUӉˉ[]UHSH}uEHUHӉHH[]UH}E]UHH}HEH]UHH}HuHU؉ȈEHEHUHPHEHPHEHP HEHP HEHHEHP(}tHHUHBHEH@HEH@ HU؃HHEHEH@ H;EHtAHEH@ HHEHHEHHEH@H1HEHHEH@ HPHEHP jHEHPHEHHEHE*HEH@ HEHEH@ HPHEHP HEHEH@ H;ErHEHHEH@H1HEH]UHHH}HEHP HEH@(H9Ht HHEH@ HHEHHEHHEH@H1HEHHEH@ HHEH@HH)HHHHEHPHEH@ HPHEHP HEHHHSHEHHEHEHHEHHH!HEHHEHPEHHUHH }HuUEEEECExEEEEmmEHHHEHЋUMʉEE;E|EHHHEHEHHHEHUHH}HuUHEEE=HEHUH!Ht%EHHHEHЋUMʃEHeEE?vEHHHEHEHHHEH]ÐH5& 11DHHЃ@uÐHl$Ld$H-w$ L%h$ H\$Ll$Lt$L|$H8L)AIHI1aHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH *** %s *** /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/bitset_index.cfalsebitset_index_create(&index, realloc) == 0Test failed: %s is %s at %s:%d, in function '%s' bitset_index_expr_equals(&expr, &key, sizeof(key)) == 0bitset_index_init_iterator(&index, &it, &expr) == 0bitset_iterator_next(&it) == valuebitset_iterator_next(&it) == SIZE_MAX *** %s: done *** bitset_index_size(&index) == SET_SIZEChecking keys... bitset_index_expr_equals(&expr, &keys[i], sizeof(keys[i])) == 0bitset_index_init_iterator(index, &it, &expr) == 0pair_foundokGenerating test set... Inserting pairs... Removing random pairs... mode >= 0 && mode < 3bitset_index_expr_all(&expr) == 0bitset_index_expr_all_set(&expr, &search_mask, sizeof(search_mask)) == 0bitset_index_expr_any_set(&expr, &search_mask, sizeof(search_mask)) == 0key == rfound_count == check_countbitset_index_expr_equals(&expr, &key1, sizeof(key1)) == 0i == bitset_iterator_next(&it)test_equals_simpletest_any_set_simpletest_all_set_simpletest_all_simpletest_empty_simpletest_simpletest_insert_removecheck_keystest_get_sizetest_resize /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/expr.cexpr->size > 0bitset_expr_add_param /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/iterator.cit != ((void *)0)expr != ((void *)0)p_bitsets != ((void *)0)exconj->bitset_ids[b] < bitsets_sizep_bitsets[exconj->bitset_ids[b]] != ((void *)0)conj != ((void *)0)pos % (BITSET_PAGE_DATA_SIZE * 8) == 0conj->page_first_pos <= posconj->pages[b]->first_pos >= key.first_posp1 != ((void *)0) && p2 != ((void *)0)dst != ((void *)0)conj->size > 0conj->page_first_pos != (18446744073709551615UL)conj->pages[b]->first_pos == conj->page_first_pospos + PAGE_BIT <= it->conjs[c].page_first_posbitset_iterator_nextbitset_iterator_rewindbitset_iterator_next_pagebitset_iterator_first_pagebitset_page_orbitset_iterator_conj_prepare_pagebitset_page_andbitset_page_nandbitset_iterator_conj_cmpbitset_iterator_conj_rewindbitset_iterator_init /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/index.cindex != ((void *)0)index->capacity > 0key != ((void *)0)rc >= 0it != ((void *)0)bitset_index_init_iteratorbitset_index_contains_valuebitset_index_remove_valuebitset_index_insertbitset_index_destroybitset_index_create/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/bitset.cpage->first_pos <= pos && pos < page->first_pos + BITSET_PAGE_DATA_SIZE * 8bitset->cardinality > 0page->cardinality > 0bitset_cardinality(bitset) == cardinality_checkbitset_infobitset_clearbitset_setbitset_test/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/page.ctnode != &rbtree->rbt_nilcmp != 0nodep->node == node((_Bool) (((uintptr_t) (node)->node.rbn_right_red) & ((size_t)1))) == 0((_Bool) (((uintptr_t) (left)->node.rbn_right_red) & ((size_t)1)))pathp[-1].cmp < 0pathp->cmp != 0((_Bool) (((uintptr_t) (pathp[1].node)->node.rbn_right_red) & ((size_t)1))) == 0(uintptr_t)pathp > (uintptr_t)pathleftright != &rbtree->rbt_nil((_Bool) (((uintptr_t) (rbtree->rbt_root)->node.rbn_right_red) & ((size_t)1))) == 0bitset_pages_removebitset_pages_insertbitset_pages_prevbitset_pages_nextbitset_page_orbitset_page_nandbitset_page_and;<f@X,"0p.yĞǡ8DX x,t8FXKxX%ٳ )@`Ķ^ HpX, ~@ Kh # d 0 sX  R \ @ `  m H j@ `  P ~ % >@ ` 9 u 0( Px8"XCx_8X0x`zRx *zPLRx@ $$@AC  $L6@AC 1 $t6@AC 1 $!@AC E $}0@AC  zRx <=AC x <Y=AC x \vKAC F |KAC F $̙L@AC  GAC B М4AC o AC  $AC  DRAC  d"JAC E LwAC r AC  T4AC o hAC  AC  $ˣ AC  DDAC ? $Lܨh@AC E AC } AC  PAC K AC z  @AC  ,<:AC u LVAC  l AC [ uAC p EAC @ $6]AC ES $kBw@AC = AC  <KAC F \IWAC R |AC  $4@AC  $@AC  $6@AC  ۹AAC < 4AC M T@AC { tEAC @ 3AAC | $T@AC E $W@AC EM $Н@AC E ,yAC  L8AC J l'AC U !IAC D J AC E 4=AC x Q4AC o  e4AC o ,ylAC g LſoAC j llAC g `GAC B {AC v `AC [ "hAC c  j?AC : ,?AC : LAC  lAC  AC  AC  `AC [ AC   DAC ? , AC } L AC  l 6AC 1  AC } $ (TAC AN $ TAC A $ AC A $  AC H D AC J d AC K  AC N  AC S  AC R  AC AV  !AC A[ $ AC AV D !AC A[ d AC I  AC L  JAC E  AC   AC   1AC  $ ,$< Jf@Xd 0   3 \      r r     @@ (@ |@``o`@@8@ Z `@`@H o@oo*@ @`f@v@@@@@@@@@@@&@6@F@V@GCC: (Debian 4.7.3-4) 4.7.3,L@,[ 0.@b,s3@,C@ ,&P@Q,z+V@M,=Pu@W r#L@..@K 8Kint1P^ii%YF0Fd78 ?# # ~# # # #( t#0 #8 #@ 0#H #P w#X  #`  #h  ?#p ?#t p#x vM# [# h# p# &{# /# 0# 1# *2# 3-# 5?# 7# t] # # q ?#    F0q # &# <-# # # end#(E E# fE#R C l D-# [ Eq# ( F-# G#  (J gJ# J#J8PW ^R# ( S-#( Tl#0l-W F G-# =H-# PI# J#-1 Q T-# =V-# "X# Zl#r` ? A-# = B-# " C#  D#  E#  Fl#( ( G #0 |  # = -#  l# / #   L@@p( @@it~8~key-~ -h  p+@ @`( @/@2`key3-X@@i4-h  -@ @B"@@~A~A~ A-~itC~8E~( @g @"@iI-ht @!@posT-X[Vg  fB"@$@ ( Ѐ@jm-@no"@I#@ir-Xb#@#@iy-P#@j$@i-H  $@)@ ?~D-~(  €@it~8~-h-`%@~&@ key-~%(@(@key-X2(@(@r-Pp)@*@6 (F  @ F 6 *@N*@@ (  @  N*@*@ (  @D-h>*@*@# (#  `@D-h*@-@` (  @@it~8~K-X-~+@+@ i-h+@+@key-~ -P,@E-@i-` ?-@..@!m !R r0.@3@^K ;KintYF1P%0 F G0# =H0# PI# J#0 1 QB T0# =V0# "XB# Z#F O(0.@d.@  8(h )` b0d.@@/@ 80X p.@/@c20h B@/@0@2 8BX L/@0@cD0hPB0@1@@ 8PX P0P=U0h"]B`lB1@L1@ 8lhwBL1@2@^ 8wH xB@ x0=}0hP`?2@XG2@vB2@3@` 8X 0P 7L @Bhz$ @0% @{ r3@C@^K ;KintYF0p1Pd7;0#&#<0# ## end#( % E/ Et# fEt# R Ct l D0# [ E # ( F0# Gz# / e (J gJt# J/#J 8P ^R# ( S0#( T#0   0 FY G0# =H0# PIY# J_#0e 1 Q T0# =V0# "X# Z# `?& A0# =B0# "C# Dt# Et# F#( (G#0 0' g (0# )0# =*0# +# ,_# ^-#(&F6AtW63@3@it6h7`C3@f5@ OitCX3@4@cE0haBf5@k6@itaX a0P=f0h"n`}Bk6@x8@ait}H~@ ~0=0h`?q8@_XGX8@^P?8@Bx8@;@@Oit8O~0e `@ 0X9@;@c0h9@;@OϱPЇHR:@v;@b0`l e U n;@=@pos0  @@key/<@<@=@b0X   !B=@E>@ "p1X"p2P  @#h# `  $*E>@?@`  %*X"dst+tP @>@?@&b30h ! $K?@IA@ r"itKX~@@A@&c\0h$lIA@A@ "itlX @uA@A@&cq0h  $zA@B@ m "itzH}  `@#V~0`&pos0X B@B@&c0h }  m '*B@C@  "ith  @@   (0C@C@@ H "itXH   @JC@C@&pos0h U)$c  @ 0)_%c  @ OrKC@P@ ^K ;KintYF0p1Pd7;0#&#<0# ## end#( % E/ Et# fEt# R Ct l D0# [ E # ( F0# Gz# / e (J gJt# J/#J 8P ^R# ( S0#( T#0   0 FY G0# =H0# PIY# J_#0e 1 Q T0# =V0# "X# Z# `?& A0# =B0# "C,# Dt# Et# F#( (G#0&  |w w# =0# # /#}(0C@C@ (h 2+BC@9D@ "+"h,`8 І@2 8 (; 89D@~E@` 8"X @D@&E@b=0h  NB~E@G@ jN" N0=S0X[w@?G@/gG|.G@Wbo0P 0b}0H BG@K@ "~!key~ 0~ 0~ @ hrcBdpos0XP J@0H`Kb0P"I@I@nb0,J@J@b0@# ( 0 K@K@ "X 0P p@ZK@K@b0h   eK@!L@ ~"h 0` P@  ~Y  B!L@xL@@8 hlBxL@LM@u8H$key@ 0L@$M@%pos 0hL@M@%b!0`&#"e_o /BLM@M@ 8/$key/ 00&7%pos90hM@M@%b;0`! DBM@N@` 8D$keyD E0&I%posK0h0N@vN@%bM0`-XBN@kO@7 8X$keyX Y0&b%posd0hO@CO@%bf0` oBkO@P@  o"H$itp @8p  0@%maxv0hO@iP@%cw0`O@SP@%bx0X   '% @e_rj P@U@r^K ;KintYF0p1P%EE#fE#R Cl D0#[ E#( F0# G#  e  (J7gJ#J#J8Py^R7#( S0#(T#0   0 y ^0# 0# 0# 0#F6A! 0P@P@''h-B &P@P@q&qh&`BS 0P@CQ@@t0X0Parg0H3qh7 :CQ@Q@ :qh AQ@ $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; : ;I8  : ; !I' II<  : ; ( .: ; ' @B 4I4  4: ; I 4: ; I  : ; I  4: ;I 4: ;I .? : ;' I@B !4: ; I? < % $ > : ; I$ > ' II  I  : ;  : ; I8 .? : ; ' @B  : ; I 4: ; I .: ; ' I@B 4: ; I .? : ; ' I@B  : ; 4I4  I!I/ &I4: ; I?  % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I  : ;  : ; I8  : ;  I!I' II & : ; ( .? : ; ' @B : ; I : ; I  4: ; I .: ; ' I@B 4: ; I  : ; .? : ; ' I@B 4I4  !I/ .: ; ' @B !.: ;' I@B ": ;I #4: ;I $.: ;' @B %: ;I &4: ;I '.? : ;' @B (.? : ;' I@B )4: ; I?  % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I  : ;  : ; I8  : ;  I!I' II < .? : ;' I@B : ;I .? : ; ' I@B : ; I 4I4  !I/ .? : ; ' @B  4: ; I .: ; ' I@B 4: ; I  : ;  U U!: ; I " #&$: ;I %4: ;I &4: ;I '4: ; I?  % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I &I.? : ; ' @B .: ; ' I@B : ; I 4: ; I .? : ; ' I@B 4: ; I 4I4  !I/  % $ > : ; I$ >  : ;  : ; I8  : ;  I I !I ' I I   : ; ( .? : ; ' I@B : ; I 4: ; I .? : ; ' @B 4: ; I .? : ; ' @B : ; I 4I4   !I/ &I.: ; ' I@B .? : ; ' I@B  : ; I8  .? : ; ' I@B % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I .? : ; ' I@B  : ; I : ; I 4: ; I & .? : ; ' I@B .? : ;' I@B : ;I .? : ;' @B : ;I 4: ;I .? : ;' I@B 4: ; I  .? : ; ' I@B  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitsetbitset_index.cstddef.htypes.hstdint.hlibio.hbit.hbitset.hexpr.hiterator.hindex.hstdio.h L@ ?J7>>"77J7J7=?J7X 7='>#277K/K+l7oX徑?J7=>X-+Xv(%Xv=u7J7>>"uuYyX  .f7&7"77/7uuxXX J77K==2K==2==2==2?J7>>!X#"77J7XJ7=K>YYYYYYYZY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/includeexpr.cexpr.hstddef.h 0.@)Y2)+XY2B:X2נWKfrN/Iuv?Y2v"Y3=נWKfrN/I(I,ut nt Y3K"vu"Y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitsetiterator.cstddef.hstdint.hbit.hbitset.hexpr.hiterator.hpage.h 3@7Y .)224X Y3נWKfrN/I$uw?Y3=נWKfrN/I((I,I,rt kt et Y3uttut=""ɡgɠ->#zX pXؼY2t1 <""sXt X Kxtt/u/vZ3tt% '\'p X 2vN//yX0 r, 2t)Xͻ2t)30}X0'3t2t=u?/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitindex.hindex.cstddef.hstdint.hbit.hbitset.hexpr.hiterator.h C@!~.tYKvY2t'zX>&Y2נWKfrN/I'I,毽*z(X y 'zXa <<'Yytt/gg/*z< f/*flj /Y)z'f 2t˟&Xw 2t2vvY3=󠟻Y,pXwY3=w/ql3=/uon2=w/ql3=ttɟ+)XX v/ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebitset.hbitset.cstddef.hstdint.hpage.h P@.Y2>YY2Y2.Kuv.2x.Kv=XKu1.(=hw=>x.Ku.(==>0[{Y/!cz -u /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bitset/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bitset/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/syspage.hpage.cstddef.hstdint.hbitset.htypes.htypes.h V@]4K2eLK2132Y2Y2uJ2uJ2uJ./u/vZ0sJff".JX   X f  fJ.X    f t fffXf  ff f2ftX t  / gCJ <1. )2t&f.X   X3$.$.t0 ."#!T%&')-*+f-3./I0123t,04367.89t50(s:M<0=>?@wAB.CDt;0EfG&IJKLH3F6M&OPXQRN0Sf$XU<V'.t.f0ft.5(f,0 ft.tt(ft5f,ft.<f%, ft.tt(" /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebit.hbit.cstddef.hstdint.h Pu@ɻ% <ɻ(.K <ɻ(0K@#@"< ?@PY IA@t@ A@`@@@ @@ @$@=EІ@^ ~E@]s@@p@P@0@ P@E@ ) @ B@ [@ t{ hX@G@@p@P@Š@@@39@G`S`d`q @ P{@,```` z@ V@4 |@ Yr@ LM@,@K cw@Xj !L@W w@ C@ ` `@ p\@  Y@?-@ z@N G@Bb 2@x` W@o K@ ^p@ 0.@4|@ !U@@  (  C@ :  x8@DO j  w@t  3@   w@!  1[@?  \@  @  Q@ `&  9D@E;  CQ@AJ  V@4_  y@q  Y@h   a@`  )V@I  |@  V@  3@4  xL@$  P@@2  v@>  !W@lN  w@\ @|  {@  -v@   u@  v@  Bw@! Ȣ`  E^@  `@  M@  K@K!  @6  w@JH  ]@]  X@{n  v@|  V@ `  d.@  t@  -@G  &w@  rV@  1@J  B@:   @@HP@8@%"@@@@@@@@@$$ $$`$`x %%`%`@@DDPtd@@@@@  Qtd/lib64/ld-linux-x86-64.so.2GNU GNUC$—ym> %d bit_clz_u64(%lu) => %d bit_ctz_u32(%u) => %d bit_clz_u32(%u) => %d *** %s: done *** bit_count_u64(%lu) => %d bit_count_u32(%u) => %d bit_rotl_u64(%lu, %d) => %lu bit_rotr_u64(%lu, %d) => %lu bit_rotl_u32(%u, %d) => %u bit_rotr_u32(%u, %d) => %u bswap_u64(%lu) => %lu bswap_u32(%u) => %u %d bit_index_u64(%lu, *, -1) => bit_index_u32(%u, *, -1) => Set: %zu, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/bit.cfalsebit_test(data, pos)Test failed: %s is %s at %s:%d, in function '%s' Clear: truetest_bit_itertest_indextest_bswaptest_rotl_rotrtest_counttest_ctz_clz;  (Xx9 G@whHtQ(Hh3Jf(Hh-+(@@hzRx *zRx <'AC " <CAC  \AC   zPLRx @ $$$@AC  1AC  BAC } $0$@AC + $$@AC  T)AC d $tTAC AN $AC A $IAC A  AC H  AC J ,AC K LxAC N lkAC S cAC R ZAC AV V!AC A[ WAC AV  S!AC A[ ,TAC I LBAC L l3JAC E ]AC  ;AC  AC  P,$hJf@X, v   @ @ 8 @ @$`$`o`@x@X@ % &`x @H @0 o @oo @@@%`v @ @ @ @ @ @ @ @ G+3333@9JUUUUgyb)H勒 x433333333~ `jMA?f$%i3),3Ktv{{ƕu ځ`RGCC: (Debian 4.7.3-4) 4.7.3, @,@/ @@6?yint,/3~7?0##4##D# end#(  n-P-=   TF# -# w-# -# -# F-#(B-#0-#8-#@!-#H-#P-#Xn 8#`b >#hZ F#pF#t#xp#[#D#T#&# /+#0+#1+#!2+#(34#5F#7Z# ? 8 C8# ># NF#3T$j$p Ft[ @@ -@ @ @i4h @ @h`w\$ 2@@` "@@@i64h,@@h7`8w\$ H@@&rotHFL@@iJ4h@@hK`Lw\^@y@  @b@4@Y@rcFl$ F$ky@E@// @@/@io4h@@hp`qw\ E@@jXendjPU@@curjh@@@## @(}@@i4h@@h`w\ F8$?v@@ @ithi4`pos4X$ F@@$  '`>1K@@6;yint,/3~~7;0##0##D# end#(   @x@@`x @@ pos@0 QB0` C0X EP e IRx@@  R @ posR0 QT0` U0X WP XxOe fx@@  f @ posf0 Qh0` i0X kP lxO }B@)@ xsl B)@8@ xh rB8@H@@* xsl BH@[@] xЅhB[@s@ xsleBs@@` xhSs@@xsdrB`@@ Gx`rB\0s@@x0sdr0B`:@@x:`r:B\sIs@@@xIsl~Y@#@5xYh`#@m@ itXPi0HsetxDe`wh70m@k@` itXbitBlW]k@@  x]s\ ]P ]BX J`BliaBh ed@@al`B B|@@  x|X |P |BL$@@bithiBd3@@kB`% $ > : ; I$ >  : ; : ;I8  : ;I8  I &I   : ;  : ; I8 : ; I!I/ .: ; ' @B 4I4   4: ; I 4: ; I : ; I : ; I .? : ; ' I@B 4: ; I? < % $ > : ; I$ >  : ; : ;I8  : ;I8  I &I .? : ; ' I@B  : ; I : ; I 4: ; I & .? : ; ' I@B .? : ;' I@B : ;I .? : ;' @B : ;I 4: ;I .? : ;' I@B 4: ; I  .? : ; ' I@B H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/unit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/usr/include/x86_64-linux-gnu/bitsbit.cstddef.hstdint.hbit.htypes.hlibio.hstdio.h  @>M$$[q" <s X=2>$[x X=2--Xi(*v X2>8J=>%[x X=2eX2@Y0[=.w X=?/Y7/Yf7=KYYYYY" /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/lib/bit/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/lib/bit/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includebit.hbit.cstddef.hstdint.h @ɻ% <ɻ(.K <ɻ(0K #include #include #include "test.h" #define PLAN 65 #define ITEMS 7 struct test { char ch; int no; struct rlist list; }; static struct test items[ITEMS]; static RLIST_HEAD(head); static RLIST_HEAD(head2); int main(void) { int i; struct test *it; struct rlist *rlist; plan(PLAN); ok(rlist_empty(&head), "list is empty"); for (i = 0; i < ITEMS; i++) { items[i].no = i; rlist_add_tail(&head, &(items[i].list)); } is(rlist_first(&head), &items[0].list, "first item"); isnt(rlist_first(&head), &items[ITEMS - 1].list, "first item"); is(rlist_last(&head), &items[ITEMS - 1].list, "last item"); isnt(rlist_last(&head), &items[0].list, "last item"); is(rlist_next(&head), &items[0].list, "rlist_next"); is(rlist_prev(&head), &items[ITEMS - 1].list, "rlist_prev"); i = 0; rlist_foreach(rlist, &head) { is(rlist, &items[i].list, "element (foreach) %d", i); i++; } rlist_foreach_reverse(rlist, &head) { i--; is(rlist, &items[i].list, "element (foreach_reverse) %d", i); } is(rlist_entry(&items[0].list, struct test, list), &items[0], "rlist_entry"); is(rlist_first_entry(&head, struct test, list), &items[0], "rlist_first_entry"); is(rlist_next_entry(&items[0], list), &items[1], "rlist_next_entry"); is(rlist_prev_entry(&items[2], list), &items[1], "rlist_prev_entry"); i = 0; rlist_foreach_entry(it, &head, list) { is(it, items + i, "element (foreach_entry) %d", i); i++; } rlist_foreach_entry_reverse(it, &head, list) { i--; is(it, items + i, "element (foreach_entry_reverse) %d", i); } rlist_del(&items[2].list); ok(rlist_empty(&head2), "head2 is empty"); rlist_move(&head2, &items[3].list); ok(!rlist_empty(&head2), "head2 isnt empty"); is(rlist_first_entry(&head2, struct test, list), &items[3], "Item was moved"); rlist_move_tail(&head2, &items[4].list); rlist_foreach_entry(it, &head, list) { is(it, items + i, "element (second deleted) %d", i); i++; if (i == 2) i += 3; } rlist_foreach_entry_reverse(it, &head, list) { i--; if (i == 4) i -= 3; is(it, items + i, "element (second deleted) %d", i); } rlist_create(&head); ok(rlist_empty(&head), "list is empty"); for (i = 0; i < ITEMS; i++) { items[i].no = i; rlist_add(&head, &(items[i].list)); } i = 0; rlist_foreach_entry_reverse(it, &head, list) { is(it, items + i, "element (foreach_entry_reverse) %d", i); i++; } rlist_foreach_entry(it, &head, list) { i--; is(it, items + i, "element (foreach_entry) %d", i); } return check_plan(); } tarantool-1.5.1.218.g1a69fd6/test/unit/mhash_body.c0000664000000000000000000000362012202131537020174 0ustar rootroot#define set(x) ({ \ k = put(x); \ val(k) = (x) << 1; \ }) #define rm(x) ({ \ mh_int_t k = get(x); \ del(k); \ }) #define tst(x) ({ \ mh_int_t k = get((x)); \ fail_unless(k != mh_end(h)); \ fail_unless(val(k) == ((x) << 1)); \ }) #define clr(x) fail_unless(get(x) == mh_end(h)) #define usd(x) fail_unless(get(x) != mh_end(h)) h = init(); destroy(h); h = init(); clear(h); /* access not yet initialized hash */ clr(9); /* set & test some data. there is first resize here */ set(1); set(2); set(3); tst(1); tst(2); tst(3); /* delete non existing entry */ k = get(4); del(k + 1); set(4); set(5); set(6); set(7); set(8); set(9); /* there is resize after 8 elems. verify they are inplace */ tst(4); tst(5); tst(6); tst(7); tst(8); tst(9); clear(h); /* after clear no items should exist */ clr(1); clr(2); clr(3); clr(4); clr(5); clr(6); clr(7); clr(8); clr(9); clr(10); clr(11); /* set after del */ set(1); rm(1); set(1); destroy(h); h = init(); set(0); set(1); set(2); set(3); set(4); set(5); set(6); set(7); usd(0); rm(0); clr(0); usd(1); rm(1); clr(1); usd(2); rm(2); clr(2); usd(3); rm(3); clr(3); usd(4); rm(4); clr(4); usd(5); rm(5); clr(5); usd(6); rm(6); clr(6); usd(7); rm(7); clr(7); set(8); set(9); set(10); tst(8); tst(9); tst(10); set(1); set(1); tst(1); rm(1); rm(1); clr(1); /* verify overflow of hash index over hash table */ int i; for (i = 0 ; i < 20; i++) { set(i); } for (i = 0 ; i < 20; i++) { tst(i); } destroy(h); h = init(); set(0); set(1); set(2); set(3); set(4); set(5); set(6); set(7); rm(0); rm(1); rm(2); rm(3); rm(4); destroy(h); /* verify reuse of deleted elements */ h = init(); set(1); int k1 = get(1); rm(1); set(1); int k2 = get(1); fail_unless(k1 == k2); destroy(h); #undef set #undef rm #undef tst #undef clr #undef usd #undef init #undef clear #undef destroy #undef get #undef put #undef del #undef key #undef val tarantool-1.5.1.218.g1a69fd6/test/unit/rope_stress.result0000664000000000000000000000021612202131537021521 0ustar rootroot *** test_rope_stress_small *** *** test_rope_stress_small: done *** *** test_rope_stress_large *** *** test_rope_stress_large: done *** tarantool-1.5.1.218.g1a69fd6/test/unit/rlist.result0000664000000000000000000000410012231715257020313 0ustar rootroot1..65 ok 1 - list is empty ok 2 - first item ok 3 - first item ok 4 - last item ok 5 - last item ok 6 - rlist_next ok 7 - rlist_prev ok 8 - element (foreach) 0 ok 9 - element (foreach) 1 ok 10 - element (foreach) 2 ok 11 - element (foreach) 3 ok 12 - element (foreach) 4 ok 13 - element (foreach) 5 ok 14 - element (foreach) 6 ok 15 - element (foreach_reverse) 6 ok 16 - element (foreach_reverse) 5 ok 17 - element (foreach_reverse) 4 ok 18 - element (foreach_reverse) 3 ok 19 - element (foreach_reverse) 2 ok 20 - element (foreach_reverse) 1 ok 21 - element (foreach_reverse) 0 ok 22 - rlist_entry ok 23 - rlist_first_entry ok 24 - rlist_next_entry ok 25 - rlist_prev_entry ok 26 - element (foreach_entry) 0 ok 27 - element (foreach_entry) 1 ok 28 - element (foreach_entry) 2 ok 29 - element (foreach_entry) 3 ok 30 - element (foreach_entry) 4 ok 31 - element (foreach_entry) 5 ok 32 - element (foreach_entry) 6 ok 33 - element (foreach_entry_reverse) 6 ok 34 - element (foreach_entry_reverse) 5 ok 35 - element (foreach_entry_reverse) 4 ok 36 - element (foreach_entry_reverse) 3 ok 37 - element (foreach_entry_reverse) 2 ok 38 - element (foreach_entry_reverse) 1 ok 39 - element (foreach_entry_reverse) 0 ok 40 - head2 is empty ok 41 - head2 isnt empty ok 42 - Item was moved ok 43 - element (second deleted) 0 ok 44 - element (second deleted) 1 ok 45 - element (second deleted) 5 ok 46 - element (second deleted) 6 ok 47 - element (second deleted) 6 ok 48 - element (second deleted) 5 ok 49 - element (second deleted) 1 ok 50 - element (second deleted) 0 ok 51 - list is empty ok 52 - element (foreach_entry_reverse) 0 ok 53 - element (foreach_entry_reverse) 1 ok 54 - element (foreach_entry_reverse) 2 ok 55 - element (foreach_entry_reverse) 3 ok 56 - element (foreach_entry_reverse) 4 ok 57 - element (foreach_entry_reverse) 5 ok 58 - element (foreach_entry_reverse) 6 ok 59 - element (foreach_entry) 6 ok 60 - element (foreach_entry) 5 ok 61 - element (foreach_entry) 4 ok 62 - element (foreach_entry) 3 ok 63 - element (foreach_entry) 2 ok 64 - element (foreach_entry) 1 ok 65 - element (foreach_entry) 0 tarantool-1.5.1.218.g1a69fd6/test/lib/0000775000000000000000000000000012242653271015511 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/lib/admin_connection.py0000664000000000000000000000424312231715257021376 0ustar rootroot__author__ = "Konstantin Osipov " # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. import socket import yaml import sys import re from tarantool_connection import TarantoolConnection is_admin_re = re.compile("^\s*(show|set|save|lua|exit|reload|help)", re.I) ADMIN_SEPARATOR = '\n' class AdminConnection(TarantoolConnection): def execute_no_reconnect(self, command, silent): self.socket.sendall(command + ADMIN_SEPARATOR) bufsiz = 4096 res = "" while True: buf = self.socket.recv(bufsiz) if not buf: break res = res + buf if (res.rfind("\n...\n") >= 0 or res.rfind("\r\n...\r\n") >= 0): break # validate yaml by parsing it try: yaml.load(res) finally: if not silent: sys.stdout.write(command + ADMIN_SEPARATOR) sys.stdout.write(res.replace("\r\n", "\n")) return res tarantool-1.5.1.218.g1a69fd6/test/lib/tarantool_server.py0000664000000000000000000001514512231715257021463 0ustar rootrootimport os import sys import glob import time import yaml import shutil import pexpect import traceback import subprocess import ConfigParser import pprint import tarantool_preprocessor from server import Server from box_connection import BoxConnection from test_suite import FilteredStream, Test from admin_connection import AdminConnection from memcached_connection import MemcachedConnection class FuncTest(Test): def __init__(self, name, args, suite_ini): Test.__init__(self, name, args, suite_ini) self.name = name self.result = name.replace(".test", ".result") self.skip_cond = name.replace(".test", ".skipcond") self.tmp_result = os.path.join(self.args.vardir, os.path.basename(self.result)) self.reject = "{0}/test/{1}".format(self.args.builddir, name.replace(".test", ".reject")) def execute(self, server): diagnostics = "unknown" builddir = self.args.builddir save_stdout = sys.stdout try: self.skip = 0 if os.path.exists(self.skip_cond): sys.stdout = FilteredStream(self.tmp_result) stdout_fileno = sys.stdout.stream.fileno() execfile(self.skip_cond, dict(locals(), **server.__dict__)) sys.stdout.close() sys.stdout = save_stdout if not self.skip: sys.stdout = FilteredStream(self.tmp_result) stdout_fileno = sys.stdout.stream.fileno() execfile(self.name, dict(locals(), **server.__dict__)) self.is_executed_ok = True except Exception as e: traceback.print_exc(e) diagnostics = str(e) finally: if sys.stdout and sys.stdout != save_stdout: sys.stdout.close() sys.stdout = save_stdout; self.is_executed = True def __repr__(self): return str([self.name, self.result, self.skip_cond, self.tmp_result, self.reject]) __str__ = __repr__ class TarantoolConfigFile: """ConfigParser can't read files without sections, work it around""" def __init__(self, fp, section_name): self.fp = fp self.section_name = "[" + section_name + "]" def readline(self): if self.section_name: section_name = self.section_name self.section_name = None return section_name # tarantool.cfg puts string values in quote return self.fp.readline().replace("\"", '') class TarantoolServer(Server): def __new__(cls, core="tarantool"): return super(Server, cls).__new__(cls) def __init__(self, core="tarantool"): Server.__init__(self, core) self.default_bin_name = "tarantool_box" self.default_config_name = "tarantool.cfg" self.default_init_lua_name = "init.lua" # append additional cleanup patterns self.re_vardir_cleanup += ['*.snap', '*.xlog', '*.inprogress', '*.cfg', '*.sup', '*.lua'] def find_exe(self, builddir, silent=True): return Server.find_exe(self, "{0}/src/box/".format(builddir), silent) def configure(self, config): Server.configure(self, config) # now read the server config, we need some properties from it with open(self.config) as fp: dummy_section_name = "tarantool" config = ConfigParser.ConfigParser() config.readfp(TarantoolConfigFile(fp, dummy_section_name)) self.pidfile = config.get(dummy_section_name, "pid_file") self.primary_port = self.get_option_int(config, dummy_section_name, "primary_port") self.admin_port = self.get_option_int(config, dummy_section_name, "admin_port") self.memcached_port = self.get_option_int(config, dummy_section_name, "memcached_port") self.port = self.admin_port self.admin = AdminConnection("localhost", self.admin_port) self.sql = BoxConnection("localhost", self.primary_port) if self.memcached_port != 0: # Run memcached client self.memcached = MemcachedConnection('localhost', self.memcached_port) def find_tests(self, test_suite, suite_path): for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test"))): for test_pattern in test_suite.args.tests: if test_name.find(test_pattern) != -1: test_suite.tests.append(FuncTest(test_name, test_suite.args, test_suite.ini)) def reconfigure(self, config, silent=False): if config == None: os.unlink(os.path.join(self.vardir, self.default_config_name)) else: self.config = os.path.abspath(config) shutil.copy(self.config, os.path.join(self.vardir, self.default_config_name)) self.admin.execute("reload configuration", silent=silent) def get_option_int(self, config, section, option): if config.has_option(section, option): return config.getint(section, option) else: return 0 def init(self): # init storage subprocess.check_call([self.binary, "--init-storage"], cwd = self.vardir, # catch stdout/stderr to not clutter output stdout = subprocess.PIPE, stderr = subprocess.PIPE) def get_param(self, param): data = self.admin.execute("show info", silent = True) info = yaml.load(data)["info"] return info[param] def wait_lsn(self, lsn): while True: curr_lsn = int(self.get_param("lsn")) if (curr_lsn >= lsn): break time.sleep(0.01) def version(self): p = subprocess.Popen([self.binary, "--version"], cwd = self.vardir, stdout = subprocess.PIPE) version = p.stdout.read().rstrip() p.wait() return version def _start_and_exit(self, args, gdb=None, valgrind=None): if gdb != None: self.gdb = gdb if valgrind != None: self.valgrind = valgrind if self.valgrind: Server._start_and_exit(self, args) else: if not self.gdb: args.append("--background") else: raise RuntimeError("'--gdb' and '--start-and-exit' can't be defined together") self.server = pexpect.spawn(args[0], args[1:], cwd = self.vardir) self.server.wait() tarantool-1.5.1.218.g1a69fd6/test/lib/memcached_connection.py0000664000000000000000000001130512202131537022200 0ustar rootrootimport socket import struct import sys import re from tarantool_connection import TarantoolConnection MEMCACHED_SEPARATOR = '\r\n' class MemcachedCommandBuffer: def __init__(self, commands): self.buf = commands def read_line(self): if self.buf == None: return None index = self.buf.find(MEMCACHED_SEPARATOR) if index > 0: line = self.buf[:index] self.buf = self.buf[index + 2:] else: line = self.buf self.buf = None return line class MemcachedConnection(TarantoolConnection): def execute_no_reconnect(self, commands, silent = True): self.send(commands, silent) return self.recv(silent) def send(self, commands, silent = True): self.commands = commands self.socket.sendall(commands) if not silent: sys.stdout.write(self.commands) def recv(self, silent = True): self.recv_buffer = '' self.command_buffer = MemcachedCommandBuffer(self.commands) self.reply = '' while True: cmd = self.command_buffer.read_line() if cmd == None: # end of buffer reached break if re.match('set|add|replace|append|prepend|cas', cmd, re.I): self.reply_storage(cmd) elif re.match('get|gets', cmd, re.I): self.reply_retrieval(cmd) elif re.match('delete', cmd, re.I): self.reply_deletion(cmd) elif re.match('incr|decr', cmd, re.I): self.reply_incr_decr(cmd) elif re.match('stats', cmd, re.I): self.reply_stats(cmd) elif re.match('flush_all|version|quit', cmd, re.I): self.reply_other(cmd) elif cmd == '': continue else: self.reply_unknown(cmd) if not silent: sys.stdout.write(self.reply) return self.reply def reply_storage(self, cmd): self.command_buffer.read_line() self.reply_single_line(cmd) def reply_retrieval(self, cmd): while True: # read reply cmd key = self.read_line() # store line in reply buffer self.reply += key + MEMCACHED_SEPARATOR # chec reply type if re.match('VALUE', key): # Value header received key_params = key.split() if len(key_params) < 4: continue # receive value value_len = int(key_params[3]) while value_len > 0: # Receive value line value = self.read_line() # store value line in reply buffer self.reply += value + MEMCACHED_SEPARATOR # decrease value len value_len -= len(value) elif re.match('END', key): break elif re.match('ERROR|CLIENT_ERROR|SERVER_ERROR', key): break else: # unknown print "error: unknown line: '%s'" % key self.reply += "error: unknown line: '%s'" % key break def reply_deletion(self, cmd): self.reply_single_line(cmd) def reply_incr_decr(self, cmd): self.reply_single_line(cmd) def reply_stats(self, cmd): while True: # read reply stats stat = self.read_line() # store stat in reply buffer self.reply += stat + MEMCACHED_SEPARATOR if re.match('END', stat): break if re.match('ERROR|CLIENT_ERROR|SERVER_ERROR', stat): break def reply_other(self, cmd): self.reply_single_line(cmd) def reply_single_line(self, cmd): params = cmd.split() if re.match('noreply', params[-1], re.I): # Noreply option exist noreply = True else: noreply = False if not noreply: self.reply += self.read_line() + MEMCACHED_SEPARATOR def reply_unknown(self, line): reply = self.read_line() self.reply += reply + MEMCACHED_SEPARATOR def read_line(self): buf = self.recv_buffer while True: # try to find separator in the exist buffer index = buf.find(MEMCACHED_SEPARATOR) if index > 0: break data = self.socket.recv(4096) if not data: return None buf += data # get line line = buf[:index] # cut line from receive buffer self.recv_buffer = buf[index + 2:] return line tarantool-1.5.1.218.g1a69fd6/test/lib/__init__.py0000664000000000000000000000000012202131537017600 0ustar rootroottarantool-1.5.1.218.g1a69fd6/test/lib/test_suite.py0000664000000000000000000002474512242653271020267 0ustar rootrootimport os import os.path import sys import stat import glob import ConfigParser import subprocess import collections import difflib import filecmp import shlex import time from server import Server import tarantool_preprocessor import re import cStringIO import string import traceback class FilteredStream: """Helper class to filter .result file output""" def __init__(self, filename): self.stream = open(filename, "w+") self.filters = [] def write(self, fragment): """Apply all filters, then write result to the undelrying stream. Do line-oriented filtering: the fragment doesn't have to represent just one line.""" fragment_stream = cStringIO.StringIO(fragment) skipped = False for line in fragment_stream: original_len = len(line.strip()) for pattern, replacement in self.filters: line = re.sub(pattern, replacement, line) # don't write lines that are completely filtered out: skipped = original_len and not line.strip() if skipped: break if not skipped: self.stream.write(line) def push_filter(self, pattern, replacement): self.filters.append([pattern, replacement]) def pop_filter(self): self.filters.pop() def clear_all_filters(self): filters = [] def close(self): self.clear_all_filters() self.stream.close() def check_valgrind_log(path_to_log): """ Check that there were no warnings in the log.""" return os.path.exists(path_to_log) and os.path.getsize(path_to_log) != 0 def print_tail_n(filename, num_lines): """Print N last lines of a file.""" with open(filename, "r+") as logfile: tail_n = collections.deque(logfile, num_lines) for line in tail_n: sys.stdout.write(line) class Test: """An individual test file. A test object can run itself and remembers completion state of the run. If file .skipcond is exists it will be executed before test and if it sets self.skip to True value the test will be skipped. """ def __init__(self, name, args, suite_ini): """Initialize test properties: path to test file, path to temporary result file, path to the client program, test status.""" self.name = name self.args = args self.suite_ini = suite_ini self.result = name.replace(".test", ".result") self.skip_cond = name.replace(".test", ".skipcond") self.tmp_result = os.path.join(self.args.vardir, os.path.basename(self.result)) self.reject = "{0}/test/{1}".format(self.args.builddir, name.replace(".test", ".reject")) self.is_executed = False self.is_executed_ok = None self.is_equal_result = None self.is_valgrind_clean = True def passed(self): """Return true if this test was run successfully.""" return self.is_executed and self.is_executed_ok and self.is_equal_result def run(self, server): """Execute the test assuming it's a python program. If the test aborts, print its output to stdout, and raise an exception. Else, comprare result and reject files. If there is a difference, print it to stdout and raise an exception. The exception is raised only if is_force flag is not set.""" diagnostics = "unknown" builddir = self.args.builddir self.execute(server) self.is_executed = True sys.stdout.flush() if not self.skip: if self.is_executed_ok and os.path.isfile(self.result): self.is_equal_result = filecmp.cmp(self.result, self.tmp_result) else: self.is_equal_result = 1 if self.args.valgrind: self.is_valgrind_clean = \ check_valgrind_log(server.valgrind_log) == False if self.skip: print "[ skip ]" if os.path.exists(self.tmp_result): os.remove(self.tmp_result) elif self.is_executed_ok and self.is_equal_result and self.is_valgrind_clean: print "[ pass ]" if os.path.exists(self.tmp_result): os.remove(self.tmp_result) elif (self.is_executed_ok and not self.is_equal_result and not os.path.isfile(self.result)): os.rename(self.tmp_result, self.result) print "[ NEW ]" else: os.rename(self.tmp_result, self.reject) print "[ fail ]" where = "" if not self.is_executed_ok: self.print_diagnostics(self.reject, "Test failed! Last 10 lines of the result file:") where = ": test execution aborted, reason '{0}'".format(diagnostics) elif not self.is_equal_result: self.print_unidiff() where = ": wrong test output" elif not self.is_valgrind_clean: os.remove(self.reject) self.print_diagnostics(server.valgrind_log, "Test failed! Last 10 lines of valgrind.log:") where = ": there were warnings in valgrind.log" if not self.args.is_force: raise RuntimeError("Failed to run test " + self.name + where) def print_diagnostics(self, logfile, message): """Print 10 lines of client program output leading to test failure. Used to diagnose a failure of the client program""" print message print_tail_n(logfile, 10) def print_unidiff(self): """Print a unified diff between .test and .result files. Used to establish the cause of a failure when .test differs from .result.""" print "Test failed! Result content mismatch:" with open(self.result, "r") as result: with open(self.reject, "r") as reject: result_time = time.ctime(os.stat(self.result).st_mtime) reject_time = time.ctime(os.stat(self.reject).st_mtime) diff = difflib.unified_diff(result.readlines(), reject.readlines(), self.result, self.reject, result_time, reject_time) for line in diff: sys.stdout.write(line) class TestSuite: """Each test suite contains a number of related tests files, located in the same directory on disk. Each test file has extention .test and contains a listing of server commands, followed by their output. The commands are executed, and obtained results are compared with pre-recorded output. In case of a comparision difference, an exception is raised. A test suite must also contain suite.ini, which describes how to start the server for this suite, the client program to execute individual tests and other suite properties. The server is started once per suite.""" def __init__(self, suite_path, args): """Initialize a test suite: check that it exists and contains a syntactically correct configuration file. Then create a test instance for each found test.""" self.args = args self.tests = [] self.ini = {} self.ini["core"] = "tarantool" if os.access(suite_path, os.F_OK) == False: raise RuntimeError("Suite \"" + suite_path + \ "\" doesn't exist") # read the suite config config = ConfigParser.ConfigParser() config.read(os.path.join(suite_path, "suite.ini")) self.ini.update(dict(config.items("default"))) for i in ["config", "init_lua"]: self.ini[i] = os.path.join(suite_path, self.ini[i]) if i in self.ini else None for i in ["disabled", "valgrind_disabled", "release_disabled"]: self.ini[i] = dict.fromkeys(self.ini[i].split()) if i in self.ini else dict() try: self.server = Server(self.ini["core"]) self.ini["server"] = self.server except Exception as e: print e raise RuntimeError("Unknown server: core = {0}".format( self.ini["core"])) print "Collecting tests in \"" + suite_path + "\": " +\ self.ini["description"] + "." self.server.find_tests(self, suite_path); print "Found " + str(len(self.tests)) + " tests." def run_all(self): """For each file in the test suite, run client program assuming each file represents an individual test.""" if not self.tests: # noting to test, exit return 0 self.server.deploy(self.ini["config"], self.server.find_exe(self.args.builddir, silent=False), self.args.vardir, self.args.mem, self.args.start_and_exit, self.args.gdb, self.args.valgrind, init_lua=self.ini["init_lua"], silent=False) if self.args.start_and_exit: print " Start and exit requested, exiting..." exit(0) longsep = '='*70 shortsep = '-'*60 print longsep print string.ljust("TEST", 48), "RESULT" print shortsep failed_tests = [] for test in self.tests: sys.stdout.write(string.ljust(test.name, 48)) # for better diagnostics in case of a long-running test sys.stdout.flush() test_name = os.path.basename(test.name) if (test_name in self.ini["disabled"] or not self.server.debug and test_name in self.ini["release_disabled"] or self.args.valgrind and test_name in self.ini["valgrind_disabled"]): print "[ disabled ]" else: test.run(self.server) if not test.passed(): failed_tests.append(test.name) print shortsep if failed_tests: print "Failed {0} tests: {1}.".format(len(failed_tests), ", ".join(failed_tests)) self.server.stop(silent=False) self.server.cleanup() if self.args.valgrind and check_valgrind_log(self.server.valgrind_log): print " Error! There were warnings/errors in valgrind log file:" print_tail_n(self.server.valgrind_log, 20) return 1 return len(failed_tests) tarantool-1.5.1.218.g1a69fd6/test/lib/sql_ast.py0000664000000000000000000003075012231715276017540 0ustar rootrootimport struct import re import ctypes # IPROTO header is always 3 4-byte ints: # command code, length, request id INT_FIELD_LEN = 4 INT_BER_MAX_LEN = 5 IPROTO_HEADER_LEN = 3*INT_FIELD_LEN INSERT_REQUEST_FIXED_LEN = 2*INT_FIELD_LEN UPDATE_REQUEST_FIXED_LEN = 2*INT_FIELD_LEN DELETE_REQUEST_FIXED_LEN = 2*INT_FIELD_LEN SELECT_REQUEST_FIXED_LEN = 5*INT_FIELD_LEN PACKET_BUF_LEN = 2048 UPDATE_SET_FIELD_OPCODE = 0 # command code in IPROTO header INSERT_REQUEST_TYPE = 13 SELECT_REQUEST_TYPE = 17 UPDATE_REQUEST_TYPE = 19 DELETE_REQUEST_TYPE = 21 CALL_REQUEST_TYPE = 22 PING_REQUEST_TYPE = 65280 ER = { 0: "ER_OK" , 1: "ER_NONMASTER" , 2: "ER_ILLEGAL_PARAMS" , 3: "ER_SECONDARY" , 4: "ER_TUPLE_IS_RO" , 5: "ER_INDEX_TYPE" , 6: "ER_SPACE_EXISTS" , 7: "ER_MEMORY_ISSUE" , 8: "ER_UNUSED8" , 9: "ER_INJECTION" , 10: "ER_UNSUPPORTED" , 11: "ER_RESERVED11" , 12: "ER_RESERVED12" , 13: "ER_RESERVED13" , 14: "ER_RESERVED14" , 15: "ER_RESERVED15" , 16: "ER_RESERVED16" , 17: "ER_RESERVED17" , 18: "ER_RESERVED18" , 19: "ER_RESERVED19" , 20: "ER_RESERVED20" , 21: "ER_RESERVED21" , 22: "ER_RESERVED22" , 23: "ER_RESERVED23" , 24: "ER_UNUSED24" , 25: "ER_UNUSED25" , 26: "ER_FIBER_STACK" , 27: "ER_UNUSED27" , 28: "ER_UNUSED28" , 29: "ER_UNUSED29" , 30: "ER_UNUSED30" , 31: "ER_UNUSED31" , 32: "ER_UNUSED32" , 33: "ER_UNUSED33" , 34: "ER_UNUSED34" , 35: "ER_UNUSED35" , 36: "ER_UNUSED36" , 37: "ER_UNUSED37" , 38: "ER_KEY_FIELD_TYPE" , 39: "ER_WAL_IO" , 40: "ER_FIELD_TYPE" , 41: "ER_ARG_TYPE" , 42: "ER_SPLICE" , 43: "ER_TUPLE_IS_TOO_LONG" , 44: "ER_UNKNOWN_UPDATE_OP" , 45: "ER_EXACT_MATCH" , 46: "ER_UNUSED46" , 47: "ER_KEY_PART_COUNT" , 48: "ER_PROC_RET" , 49: "ER_TUPLE_NOT_FOUND" , 50: "ER_NO_SUCH_PROC" , 51: "ER_PROC_LUA" , 52: "ER_SPACE_DISABLED" , 53: "ER_NO_SUCH_INDEX" , 54: "ER_NO_SUCH_FIELD" , 55: "ER_TUPLE_FOUND" , 56: "ER_INDEX_VIOLATION" , 57: "ER_NO_SUCH_SPACE" } def format_error(return_code, response): err_code = return_code >> 8; return "An error occurred: {0}, '{1}'".\ format(ER.get(err_code, "ER_UNKNOWN (%d)" % err_code), response[4:-1]) def save_varint32(value): """Implement Perl pack's 'w' option, aka base 128 encoding.""" res = '' if value >= 1 << 7: if value >= 1 << 14: if value >= 1 << 21: if value >= 1 << 28: res += chr(value >> 28 & 0xff | 0x80) res += chr(value >> 21 & 0xff | 0x80) res += chr(value >> 14 & 0xff | 0x80) res += chr(value >> 7 & 0xff | 0x80) res += chr(value & 0x7F) return res def read_varint32(varint, offset): """Implement Perl unpack's 'w' option, aka base 128 decoding.""" res = ord(varint[offset]) if ord(varint[offset]) >= 0x80: offset += 1 res = ((res - 0x80) << 7) + ord(varint[offset]) if ord(varint[offset]) >= 0x80: offset += 1 res = ((res - 0x80) << 7) + ord(varint[offset]) if ord(varint[offset]) >= 0x80: offset += 1 res = ((res - 0x80) << 7) + ord(varint[offset]) if ord(varint[offset]) >= 0x80: offset += 1 res = ((res - 0x80) << 7) + ord(varint[offset]) return res, offset + 1 def opt_resize_buf(buf, newsize): if len(buf) < newsize: return ctypes.create_string_buffer(buf.value, max(2*len, newsize)) return buf def pack_field(value, buf, offset): if type(value) is int or type(value) is long: if value > 0xffffffff: raise RuntimeError("Integer value is too big") buf = opt_resize_buf(buf, offset + INT_FIELD_LEN) struct.pack_into(" rule in tarantool protocol description. Pack tuple into a binary representation. buf and offset are in-out parameters, offset is advanced to the amount of bytes that it took to pack the tuple""" # length of int field: 1 byte - field len (is always 4), 4 bytes - data # max length of compressed integer cardinality = len(value_list) struct.pack_into(" 0: yield token_buffer.pop(0) def translate_command(token_buffer, token_stream): operator = token_buffer.pop(0) object = next(token_stream) if token_is_identifier(object): # translate operator translate_operator(token_buffer, operator, object) translate_operands(token_buffer, operator, token_stream) else: token_buffer.append(operator) token_buffer.append(object) def translate_operator(token_buffer, operator, object): # operator object -> object.method # put object token_buffer.append(object[:2] + operator[2:]) # put comma token_buffer.append((tokenize.OP, '.') + operator[2:]) # put method operator_name = operator[1] method_name = TARANTOOL_METHODS[operator_name] token_buffer.append((tokenize.NAME, method_name) + operator[2:]) def translate_operands(token_buffer, operator, token_stream): # put open bracket token_buffer.append((tokenize.OP, '(') + operator[2:]) # put all operatands token = next(token_stream) silent = False if token_is_modifier(token): silent = modifier_to_value(token[1]) token = next(token_stream) comma_needed = False while not token_is_separator(token): token_buffer.append(token[:2] + operator[2:]) comma_needed = True token = next(token_stream) # set verbose flag if comma_needed: # we have operatands, put comma before silent token_buffer.append((tokenize.OP, ',') + operator[2:]) token_buffer.append((tokenize.NAME, 'silent') + operator[2:]) token_buffer.append((tokenize.OP, '=') + operator[2:]) token_buffer.append((tokenize.NAME, '%s' % silent) + operator[2:]) # put close bracket token_buffer.append((tokenize.OP, ')') + operator[2:]) # new line token_buffer.append((tokenize.NEWLINE, '\n') + operator[2:]) def modifier_to_value(name): if name == 'silent': return True return False def token_is_modifier(token): token_type, token_name = token[:2] if token_type == tokenize.NAME and token_name in [ 'silent' , 'verbose' ]: return True return False def token_is_operator(token): token_type, token_name = token[:2] if token_type == tokenize.NAME and token_name in TARANTOOL_OPERATORS: return True return False def token_is_identifier(token): return token[0] == tokenize.NAME def token_is_separator(token): token_type = token[0] if token_type == tokenize.NEWLINE or token_type == tokenize.ENDMARKER: return True return False class TarantoolStreamReader(utf_8.StreamReader): def __init__(self, *args, **kwargs): utf_8.StreamReader.__init__(self, *args, **kwargs) try: data = tokenize.untokenize(tarantool_translate(self.stream.readline)) self.stream = cStringIO.StringIO(data) except Exception: self.stream.seek(0) def tarantool_encoding_builder(encoding_name): """Return an encoding that pre-processes the input and rewrites it to be pure python""" if encoding_name == "tarantool": utf8 = encodings.search_function("utf8") return codecs.CodecInfo(name = "tarantool", encode = utf8.encode, decode = utf8.decode, incrementalencoder = utf8.incrementalencoder, incrementaldecoder = utf8.incrementaldecoder, streamreader = TarantoolStreamReader, streamwriter = utf8.streamwriter) return None codecs.register(tarantool_encoding_builder) def main(): py_input = """exec admin 'show info' print 'hello' exec sql 'select * from namespace1'\n""" print py_input py_stream = cStringIO.StringIO(py_input) print tokenize.untokenize(tarantool_translate(py_stream.readline)) if __name__ == "__main__": main() tarantool-1.5.1.218.g1a69fd6/test/lib/unittest_server.py0000664000000000000000000000677412231715257021347 0ustar rootrootimport os import re import sys import traceback import subprocess from subprocess import Popen, PIPE import tarantool_preprocessor from server import Server from test_suite import FilteredStream, Test class UnitTest(Test): def __init__(self, name, args, suite_ini): Test.__init__(self, name, args, suite_ini) self.name = name + ".test" self.result = name + ".result" self.skip_cond = name + ".skipcond" self.tmp_result = os.path.join(self.args.vardir, os.path.basename(self.result)) self.reject = "{0}/test/{1}".format(self.args.builddir, name + ".reject") def execute(self, server): diagnostics = "unknown" builddir = self.args.builddir save_stdout = sys.stdout try: self.skip = 0 if os.path.exists(self.skip_cond): sys.stdout = FilteredStream(self.tmp_result) stdout_fileno = sys.stdout.stream.fileno() execfile(self.skip_cond, dict(locals(), **server.__dict__)) sys.stdout.close() sys.stdout = save_stdout if not self.skip: sys.stdout = FilteredStream(self.tmp_result) stdout_fileno = sys.stdout.stream.fileno() execs = [os.path.join(server.builddir, "test", self.name)] proc = Popen(execs, stdout=PIPE) sys.stdout.write(proc.communicate()[0]) self.is_executed_ok = True except Exception as e: traceback.print_exc(e) diagnostics = str(e) finally: if sys.stdout and sys.stdout != save_stdout: sys.stdout.close() sys.stdout = save_stdout; self.is_executed = True def __repr__(self): return str([self.name, self.result, self.skip_cond, self.tmp_result, self.reject]) __str__ = __repr__ class UnittestServer(Server): """A dummy server implementation for unit test suite""" def __new__(cls, core="unittest"): return Server.__new__(cls) def __init__(self, core="unittest"): Server.__init__(self, core) self.debug = False def configure(self, config): pass def deploy(self, config=None, binary=None, vardir=None, mem=None, start_and_exit=None, gdb=None, valgrind=None, valgrind_sup=None, init_lua=None, silent=True, need_init=True): self.vardir = vardir if not os.access(self.vardir, os.F_OK): if (self.mem == True and check_tmpfs_exists() and os.path.basename(self.vardir) == self.vardir): create_tmpfs_vardir(self.vardir) else: os.makedirs(self.vardir) def start(self): pass def find_exe(self, builddir, silent=False): self.builddir = builddir def find_tests(self, test_suite, suite_path): def patterned(name): for i in test_suite.args.tests: if name.find(i) != -1: return True return False regexp = re.compile('([a-zA-Z0-9_]*).test') for f in sorted(os.listdir(suite_path)): if regexp.match(f): f = os.path.join(suite_path, regexp.match(f).groups()[0]) + '.test' if os.access(f, os.X_OK) and os.path.isfile(f) and patterned(f): test_suite.tests.append(UnitTest(f[:-5], test_suite.args, test_suite.ini)); def init(self): pass tarantool-1.5.1.218.g1a69fd6/test/lib/Makefile0000664000000000000000000000003312202131537017135 0ustar rootrootsql.py: sql.g yapps sql.g tarantool-1.5.1.218.g1a69fd6/test/lib/yapps/0000775000000000000000000000000012202131537016635 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/lib/yapps/runtime.py0000664000000000000000000002764212202131537020705 0ustar rootroot# Yapps 2 Runtime, part of Yapps 2 - yet another python parser system # Copyright 1999-2003 by Amit J. Patel # Enhancements copyright 2003-2004 by Matthias Urlichs # # This version of the Yapps 2 Runtime can be distributed under the # terms of the MIT open source license, either found in the LICENSE file # included with the Yapps distribution # or at # # """Run time libraries needed to run parsers generated by Yapps. This module defines parse-time exception classes, a scanner class, a base class for parsers produced by Yapps, and a context class that keeps track of the parse stack. """ import sys, re MIN_WINDOW=4096 # File lookup window class SyntaxError(Exception): """When we run into an unexpected token, this is the exception to use""" def __init__(self, pos=None, msg="Bad Token", context=None): Exception.__init__(self) self.pos = pos self.msg = msg self.context = context def __str__(self): if not self.pos: return 'SyntaxError' else: return 'SyntaxError@%s(%s)' % (repr(self.pos), self.msg) class NoMoreTokens(Exception): """Another exception object, for when we run out of tokens""" pass class Token(object): """Yapps token. This is a container for a scanned token. """ def __init__(self, type,value, pos=None): """Initialize a token.""" self.type = type self.value = value self.pos = pos def __repr__(self): output = '<%s: %s' % (self.type, repr(self.value)) if self.pos: output += " @ " if self.pos[0]: output += "%s:" % self.pos[0] if self.pos[1]: output += "%d" % self.pos[1] if self.pos[2] is not None: output += ".%d" % self.pos[2] output += ">" return output in_name=0 class Scanner(object): """Yapps scanner. The Yapps scanner can work in context sensitive or context insensitive modes. The token(i) method is used to retrieve the i-th token. It takes a restrict set that limits the set of tokens it is allowed to return. In context sensitive mode, this restrict set guides the scanner. In context insensitive mode, there is no restriction (the set is always the full set of tokens). """ def __init__(self, patterns, ignore, input="", file=None,filename=None,stacked=False): """Initialize the scanner. Parameters: patterns : [(terminal, uncompiled regex), ...] or None ignore : {terminal:None, ...} input : string If patterns is None, we assume that the subclass has defined self.patterns : [(terminal, compiled regex), ...]. Note that the patterns parameter expects uncompiled regexes, whereas the self.patterns field expects compiled regexes. The 'ignore' value is either None or a callable, which is called with the scanner and the to-be-ignored match object; this can be used for include file or comment handling. """ if not filename: global in_name filename="" % in_name in_name += 1 self.input = input self.ignore = ignore self.file = file self.filename = filename self.pos = 0 self.del_pos = 0 # skipped self.line = 1 self.del_line = 0 # skipped self.col = 0 self.tokens = [] self.stack = None self.stacked = stacked self.last_read_token = None self.last_token = None self.last_types = None if patterns is not None: # Compile the regex strings into regex objects self.patterns = [] for terminal, regex in patterns: self.patterns.append( (terminal, re.compile(regex)) ) def stack_input(self, input="", file=None, filename=None): """Temporarily parse from a second file.""" # Already reading from somewhere else: Go on top of that, please. if self.stack: # autogenerate a recursion-level-identifying filename if not filename: filename = 1 else: try: filename += 1 except TypeError: pass # now pass off to the include file self.stack.stack_input(input,file,filename) else: try: filename += 0 except TypeError: pass else: filename = "" % filename # self.stack = object.__new__(self.__class__) # Scanner.__init__(self.stack,self.patterns,self.ignore,input,file,filename, stacked=True) # Note that the pattern+ignore are added by the generated # scanner code self.stack = self.__class__(input,file,filename, stacked=True) def get_pos(self): """Return a file/line/char tuple.""" if self.stack: return self.stack.get_pos() return (self.filename, self.line+self.del_line, self.col) # def __repr__(self): # """Print the last few tokens that have been scanned in""" # output = '' # for t in self.tokens: # output += '%s\n' % (repr(t),) # return output def print_line_with_pointer(self, pos, length=0, out=sys.stderr): """Print the line of 'text' that includes position 'p', along with a second line with a single caret (^) at position p""" file,line,p = pos if file != self.filename: if self.stack: return self.stack.print_line_with_pointer(pos,length=length,out=out) print >>out, "(%s: not in input buffer)" % file return text = self.input p += length-1 # starts at pos 1 origline=line line -= self.del_line spos=0 if line > 0: while 1: line = line - 1 try: cr = text.index("\n",spos) except ValueError: if line: text = "" break if line == 0: text = text[spos:cr] break spos = cr+1 else: print >>out, "(%s:%d not in input buffer)" % (file,origline) return # Now try printing part of the line text = text[max(p-80, 0):p+80] p = p - max(p-80, 0) # Strip to the left i = text[:p].rfind('\n') j = text[:p].rfind('\r') if i < 0 or (0 <= j < i): i = j if 0 <= i < p: p = p - i - 1 text = text[i+1:] # Strip to the right i = text.find('\n', p) j = text.find('\r', p) if i < 0 or (0 <= j < i): i = j if i >= 0: text = text[:i] # Now shorten the text while len(text) > 70 and p > 60: # Cut off 10 chars text = "..." + text[10:] p = p - 7 # Now print the string, along with an indicator print >>out, '> ',text print >>out, '> ',' '*p + '^' def grab_input(self): """Get more input if possible.""" if not self.file: return if len(self.input) - self.pos >= MIN_WINDOW: return data = self.file.read(MIN_WINDOW) if data is None or data == "": self.file = None # Drop bytes from the start, if necessary. if self.pos > 2*MIN_WINDOW: self.del_pos += MIN_WINDOW self.del_line += self.input[:MIN_WINDOW].count("\n") self.pos -= MIN_WINDOW self.input = self.input[MIN_WINDOW:] + data else: self.input = self.input + data def getchar(self): """Return the next character.""" self.grab_input() c = self.input[self.pos] self.pos += 1 return c def token(self, restrict, context=None): """Scan for another token.""" while 1: if self.stack: try: return self.stack.token(restrict, context) except StopIteration: self.stack = None # Keep looking for a token, ignoring any in self.ignore self.grab_input() # special handling for end-of-file if self.stacked and self.pos==len(self.input): raise StopIteration # Search the patterns for the longest match, with earlier # tokens in the list having preference best_match = -1 best_pat = '(error)' best_m = None for p, regexp in self.patterns: # First check to see if we're ignoring this token if restrict and p not in restrict and p not in self.ignore: continue m = regexp.match(self.input, self.pos) if m and m.end()-m.start() > best_match: # We got a match that's better than the previous one best_pat = p best_match = m.end()-m.start() best_m = m # If we didn't find anything, raise an error if best_pat == '(error)' and best_match < 0: msg = 'Bad Token' if restrict: msg = 'Trying to find one of '+', '.join(restrict) raise SyntaxError(self.get_pos(), msg, context=context) ignore = best_pat in self.ignore value = self.input[self.pos:self.pos+best_match] if not ignore: tok=Token(type=best_pat, value=value, pos=self.get_pos()) self.pos += best_match npos = value.rfind("\n") if npos > -1: self.col = best_match-npos self.line += value.count("\n") else: self.col += best_match # If we found something that isn't to be ignored, return it if not ignore: if len(self.tokens) >= 10: del self.tokens[0] self.tokens.append(tok) self.last_read_token = tok # print repr(tok) return tok else: ignore = self.ignore[best_pat] if ignore: ignore(self, best_m) def peek(self, *types, **kw): """Returns the token type for lookahead; if there are any args then the list of args is the set of token types to allow""" context = kw.get("context",None) if self.last_token is None: self.last_types = types self.last_token = self.token(types,context) elif self.last_types: for t in types: if t not in self.last_types: raise NotImplementedError("Unimplemented: restriction set changed") return self.last_token.type def scan(self, type, **kw): """Returns the matched text, and moves to the next token""" context = kw.get("context",None) if self.last_token is None: tok = self.token([type],context) else: if self.last_types and type not in self.last_types: raise NotImplementedError("Unimplemented: restriction set changed") tok = self.last_token self.last_token = None if tok.type != type: if not self.last_types: self.last_types=[] raise SyntaxError(tok.pos, 'Trying to find '+type+': '+ ', '.join(self.last_types)+", got "+tok.type, context=context) return tok.value class Parser(object): """Base class for Yapps-generated parsers. """ def __init__(self, scanner): self._scanner = scanner def _stack(self, input="",file=None,filename=None): """Temporarily read from someplace else""" self._scanner.stack_input(input,file,filename) self._tok = None def _peek(self, *types, **kw): """Returns the token type for lookahead; if there are any args then the list of args is the set of token types to allow""" return self._scanner.peek(*types, **kw) def _scan(self, type, **kw): """Returns the matched text, and moves to the next token""" return self._scanner.scan(type, **kw) class Context(object): """Class to represent the parser's call stack. Every rule creates a Context that links to its parent rule. The contexts can be used for debugging. """ def __init__(self, parent, scanner, rule, args=()): """Create a new context. Args: parent: Context object or None scanner: Scanner object rule: string (name of the rule) args: tuple listing parameters to the rule """ self.parent = parent self.scanner = scanner self.rule = rule self.args = args while scanner.stack: scanner = scanner.stack self.token = scanner.last_read_token def __str__(self): output = '' if self.parent: output = str(self.parent) + ' > ' output += self.rule return output def print_error(err, scanner, max_ctx=None): """Print error messages, the parser stack, and the input text -- for human-readable error messages.""" # NOTE: this function assumes 80 columns :-( # Figure out the line number pos = err.pos if not pos: pos = scanner.get_pos() file_name, line_number, column_number = pos print >>sys.stderr, '%s:%d:%d: %s' % (file_name, line_number, column_number, err.msg) scanner.print_line_with_pointer(pos) context = err.context token = None while context: print >>sys.stderr, 'while parsing %s%s:' % (context.rule, tuple(context.args)) if context.token: token = context.token if token: scanner.print_line_with_pointer(token.pos, length=len(token.value)) context = context.parent if max_ctx: max_ctx = max_ctx-1 if not max_ctx: break def wrap_error_reporter(parser, rule, *args,**kw): try: return getattr(parser, rule)(*args,**kw) except SyntaxError, e: print_error(e, parser._scanner) except NoMoreTokens: print >>sys.stderr, 'Could not complete parsing; stopped around here:' print >>sys.stderr, parser._scanner tarantool-1.5.1.218.g1a69fd6/test/lib/yapps/__init__.py0000664000000000000000000000000012202131537020734 0ustar rootroottarantool-1.5.1.218.g1a69fd6/test/lib/sql.py0000664000000000000000000002313712202131537016660 0ustar rootrootimport sql_ast import re object_no_re = re.compile("[a-z_]*", re.I) # Begin -- grammar generated by Yapps import sys, re from yapps import runtime class sqlScanner(runtime.Scanner): patterns = [ ("','", re.compile(',')), ("'\\)'", re.compile('\\)')), ('","', re.compile(',')), ("'\\('", re.compile('\\(')), ("'='", re.compile('=')), ("'\\*'", re.compile('\\*')), ('\\s+', re.compile('\\s+')), ('NUM', re.compile('[+-]?[0-9]+')), ('ID', re.compile('[a-z_]+[0-9]+')), ('PROC_ID', re.compile('[a-z_][a-z0-9_.]*')), ('STR', re.compile("'([^']+|\\\\.)*'")), ('PING', re.compile('ping')), ('INSERT', re.compile('insert')), ('REPLACE', re.compile('replace')), ('UPDATE', re.compile('update')), ('DELETE', re.compile('delete')), ('SELECT', re.compile('select')), ('INTO', re.compile('into')), ('FROM', re.compile('from')), ('WHERE', re.compile('where')), ('VALUES', re.compile('values')), ('SET', re.compile('set')), ('OR', re.compile('or')), ('LIMIT', re.compile('limit')), ('CALL', re.compile('call')), ('END', re.compile('\\s*$')), ] def __init__(self, str,*args,**kw): runtime.Scanner.__init__(self,None,{'\\s+':None,},str,*args,**kw) class sql(runtime.Parser): Context = runtime.Context def sql(self, _parent=None): _context = self.Context(_parent, self._scanner, 'sql', []) _token = self._peek('INSERT', 'REPLACE', 'UPDATE', 'DELETE', 'SELECT', 'CALL', 'PING', context=_context) if _token == 'INSERT': insert = self.insert(_context) stmt = insert elif _token == 'REPLACE': replace = self.replace(_context) stmt = replace elif _token == 'UPDATE': update = self.update(_context) stmt = update elif _token == 'DELETE': delete = self.delete(_context) stmt = delete elif _token == 'SELECT': select = self.select(_context) stmt = select elif _token == 'CALL': call = self.call(_context) stmt = call else: # == 'PING' ping = self.ping(_context) stmt = ping END = self._scan('END', context=_context) return stmt def insert(self, _parent=None): _context = self.Context(_parent, self._scanner, 'insert', []) INSERT = self._scan('INSERT', context=_context) if self._peek('INTO', 'ID', context=_context) == 'INTO': INTO = self._scan('INTO', context=_context) ident = self.ident(_context) VALUES = self._scan('VALUES', context=_context) value_list = self.value_list(_context) return sql_ast.StatementInsert(ident, value_list) def replace(self, _parent=None): _context = self.Context(_parent, self._scanner, 'replace', []) REPLACE = self._scan('REPLACE', context=_context) if self._peek('INTO', 'ID', context=_context) == 'INTO': INTO = self._scan('INTO', context=_context) ident = self.ident(_context) VALUES = self._scan('VALUES', context=_context) value_list = self.value_list(_context) return sql_ast.StatementReplace(ident, value_list) def update(self, _parent=None): _context = self.Context(_parent, self._scanner, 'update', []) UPDATE = self._scan('UPDATE', context=_context) ident = self.ident(_context) SET = self._scan('SET', context=_context) update_list = self.update_list(_context) opt_simple_where = self.opt_simple_where(_context) return sql_ast.StatementUpdate(ident, update_list, opt_simple_where) def delete(self, _parent=None): _context = self.Context(_parent, self._scanner, 'delete', []) DELETE = self._scan('DELETE', context=_context) FROM = self._scan('FROM', context=_context) ident = self.ident(_context) opt_simple_where = self.opt_simple_where(_context) return sql_ast.StatementDelete(ident, opt_simple_where) def select(self, _parent=None): _context = self.Context(_parent, self._scanner, 'select', []) SELECT = self._scan('SELECT', context=_context) self._scan("'\\*'", context=_context) FROM = self._scan('FROM', context=_context) ident = self.ident(_context) opt_where = self.opt_where(_context) opt_limit = self.opt_limit(_context) return sql_ast.StatementSelect(ident, opt_where, opt_limit) def ping(self, _parent=None): _context = self.Context(_parent, self._scanner, 'ping', []) PING = self._scan('PING', context=_context) return sql_ast.StatementPing() def call(self, _parent=None): _context = self.Context(_parent, self._scanner, 'call', []) CALL = self._scan('CALL', context=_context) PROC_ID = self._scan('PROC_ID', context=_context) value_list = self.value_list(_context) return sql_ast.StatementCall(PROC_ID, value_list) def predicate(self, _parent=None): _context = self.Context(_parent, self._scanner, 'predicate', []) ident = self.ident(_context) self._scan("'='", context=_context) constant = self.constant(_context) return (ident, constant) def opt_simple_where(self, _parent=None): _context = self.Context(_parent, self._scanner, 'opt_simple_where', []) _token = self._peek('WHERE', 'END', context=_context) if _token == 'END': return None else: # == 'WHERE' WHERE = self._scan('WHERE', context=_context) predicate = self.predicate(_context) return predicate def opt_where(self, _parent=None): _context = self.Context(_parent, self._scanner, 'opt_where', []) _token = self._peek('WHERE', 'LIMIT', 'END', context=_context) if _token != 'WHERE': return None else: # == 'WHERE' WHERE = self._scan('WHERE', context=_context) disjunction = self.disjunction(_context) return disjunction def disjunction(self, _parent=None): _context = self.Context(_parent, self._scanner, 'disjunction', []) predicate = self.predicate(_context) disjunction = [predicate] if self._peek('OR', 'LIMIT', 'END', context=_context) == 'OR': while 1: OR = self._scan('OR', context=_context) predicate = self.predicate(_context) disjunction.append(predicate) if self._peek('OR', 'LIMIT', 'END', context=_context) != 'OR': break return disjunction def opt_limit(self, _parent=None): _context = self.Context(_parent, self._scanner, 'opt_limit', []) _token = self._peek('LIMIT', 'END', context=_context) if _token == 'END': return 0xffffffff else: # == 'LIMIT' LIMIT = self._scan('LIMIT', context=_context) NUM = self._scan('NUM', context=_context) return int(NUM) def value_list(self, _parent=None): _context = self.Context(_parent, self._scanner, 'value_list', []) self._scan("'\\('", context=_context) value_list = [] if self._peek("'\\)'", '","', 'NUM', 'STR', context=_context) in ['NUM', 'STR']: expr = self.expr(_context) value_list = [expr] if self._peek('","', "'\\)'", context=_context) == '","': while 1: self._scan('","', context=_context) expr = self.expr(_context) value_list.append(expr) if self._peek('","', "'\\)'", context=_context) != '","': break self._scan("'\\)'", context=_context) return value_list def update_list(self, _parent=None): _context = self.Context(_parent, self._scanner, 'update_list', []) predicate = self.predicate(_context) update_list = [predicate] if self._peek("','", 'WHERE', 'END', context=_context) == "','": while 1: self._scan("','", context=_context) predicate = self.predicate(_context) update_list.append(predicate) if self._peek("','", 'WHERE', 'END', context=_context) != "','": break return update_list def expr(self, _parent=None): _context = self.Context(_parent, self._scanner, 'expr', []) constant = self.constant(_context) return constant def constant(self, _parent=None): _context = self.Context(_parent, self._scanner, 'constant', []) _token = self._peek('NUM', 'STR', context=_context) if _token == 'NUM': NUM = self._scan('NUM', context=_context) return int(NUM) else: # == 'STR' STR = self._scan('STR', context=_context) return STR[1:-1] def ident(self, _parent=None): _context = self.Context(_parent, self._scanner, 'ident', []) ID = self._scan('ID', context=_context) return int(object_no_re.sub("", ID)) def parse(rule, text): P = sql(sqlScanner(text)) return runtime.wrap_error_reporter(P, rule) # End -- grammar generated by Yapps # SQL is case-insensitive, but in yapps it's not possible to # specify that a token must match in case-insensitive fashion. # This is hack to add re.IGNORECASE flag to all regular # expressions that represent tokens in the generated grammar. sqlScanner.patterns = map(lambda tup: (tup[0], re.compile(tup[1].pattern, re.IGNORECASE)), sqlScanner.patterns) # vim: nospell syntax=off ts=4 et tarantool-1.5.1.218.g1a69fd6/test/lib/server.py0000664000000000000000000002713412231715257017401 0ustar rootrootimport os import stat import shutil import subprocess import pexpect import socket import sys import signal import time import daemon import glob import ConfigParser import re def check_port(port): """Check if the port we're connecting to is available""" try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("localhost", port)) except socket.error as e: return raise RuntimeError("The server is already running on port {0}".format(port)) def prepare_gdb(args): """Prepare server startup arguments to run under gdb.""" if "TERM" in os.environ: term = os.environ["TERM"] else: term = "xterm" if term not in ["xterm", "rxvt", "urxvt", "gnome-terminal", "konsole"]: raise RuntimeError("--gdb: unsupported terminal {0}".format(term)) args = [ term, "-e", "gdb", "-ex", "break main", "-ex", "run" ] + args return args def prepare_valgrind(args, valgrind_log, valgrind_sup): "Prepare server startup arguments to run under valgrind." args = [ "valgrind", "--log-file={0}".format(valgrind_log), "--suppressions={0}".format(valgrind_sup), "--gen-suppressions=all", "--show-reachable=yes", "--leak-check=full", "--read-var-info=yes", "--quiet" ] + args return args def check_tmpfs_exists(): return os.uname()[0] in 'Linux' and os.path.isdir("/dev/shm") def create_tmpfs_vardir(vardir): os.makedirs(os.path.join("/dev/shm", vardir)) os.symlink(os.path.join("/dev/shm", vardir), vardir) class Server(object): """Server represents a single server instance. Normally, the program operates with only one server, but in future we may add replication slaves. The server is started once at the beginning of each suite, and stopped at the end.""" def __new__(cls, core=None): if core == None: return super(Server, cls).__new__(cls) mdlname = "lib.{0}_server".format(core) clsname = "{0}Server".format(core.title()) corecls = __import__(mdlname, fromlist=clsname).__dict__[clsname] return corecls.__new__(corecls, core) def __init__(self, core): self.core = core self.re_vardir_cleanup = ['*.core.*', 'core'] self.process = None self.default_config_name = None self.default_init_lua_name = None self.config = None self.vardir = None self.valgrind_log = "valgrind.log" self.valgrind_sup = os.path.join("share/", "%s.sup" % (core)) self.init_lua = None self.default_suppression_name = "valgrind.sup" self.pidfile = None self.port = None self.binary = None self.is_started = False self.mem = False self.start_and_exit = False self.gdb = False self.valgrind = False def find_exe(self, builddir, silent=True): "Locate server executable in the build dir or in the PATH." path = builddir + os.pathsep + os.environ["PATH"] if not silent: print " Looking for server binary in {0} ...".format(path) for dir in path.split(os.pathsep): exe = os.path.join(dir, self.default_bin_name) if os.access(exe, os.X_OK): return exe raise RuntimeError("Can't find server executable in " + path) def cleanup(self, full=False): trash = [] for re in self.re_vardir_cleanup: trash += glob.glob(os.path.join(self.vardir, re)) for filename in trash: os.remove(filename) if full: shutil.rmtree(self.vardir) def configure(self, config): self.config = os.path.abspath(config) def install(self, binary=None, vardir=None, mem=None, silent=True): """Install server instance: create necessary directories and files. The server working directory is taken from 'vardir', specified in the program options.""" if vardir != None: self.vardir = vardir if binary != None: self.binary = os.path.abspath(binary) if mem != None: self.mem = mem self.pidfile = os.path.abspath(os.path.join(self.vardir, self.pidfile)) self.valgrind_log = os.path.abspath(os.path.join(self.vardir, self.valgrind_log)) if not silent: print "Installing the server..." print " Found executable at " + self.binary print " Creating and populating working directory in " + self.vardir + "..." if os.access(self.vardir, os.F_OK): if not silent: print " Found old vardir, deleting..." self.kill_old_server() self.cleanup() else: if (self.mem == True and check_tmpfs_exists() and os.path.basename(self.vardir) == self.vardir): create_tmpfs_vardir(self.vardir) else: os.makedirs(self.vardir) shutil.copy(self.config, os.path.join(self.vardir, self.default_config_name)) shutil.copy(self.valgrind_sup, os.path.join(self.vardir, self.default_suppression_name)) var_init_lua = os.path.join(self.vardir, self.default_init_lua_name) if self.init_lua != None: shutil.copy(self.init_lua, var_init_lua) elif os.path.exists(var_init_lua): # We must delete old init.lua if it exists os.remove(var_init_lua) def init(self): pass def _start_and_exit(self, args, gdb=None, valgrind=None): if gdb != None: self.gdb = gdb if valgrind != None: self.valgrind = valgrind if self.gdb == True: raise RuntimeError("'--gdb' and '--start-and-exit' can't be defined together") with daemon.DaemonContext(working_directory = self.vardir): os.execvp(args[0], args) def prepare_args(self): return [self.binary] def start(self, start_and_exit=None, gdb=None, valgrind=None, silent=True): if start_and_exit != None: self.start_and_exit = start_and_exit if gdb != None: self.gdb = gdb if valgrind != None: self.valgrind = valgrind self.debug = self.test_debug() if self.is_started: if not silent: print "The server is already started." return if not silent: print "Starting the server..." version = self.version() print "Starting {0} {1}.".format(os.path.basename(self.binary), version) check_port(self.port) args = self.prepare_args() if self.gdb: args = prepare_gdb(args) elif self.valgrind: args = prepare_valgrind(args, self.valgrind_log, os.path.abspath(os.path.join(self.vardir, self.default_suppression_name))) if self.start_and_exit: self._start_and_exit(args) return self.process = pexpect.spawn(args[0], args[1:], cwd = self.vardir) # wait until the server is connected self.wait_until_started() # Set is_started flag, to nicely support cleanup during an exception. self.is_started = True def stop(self, silent=True): """Stop server instance. Do nothing if the server is not started, to properly shut down the server in case of an exception during start up.""" if not self.is_started: if not silent: print "The server is not started." return if not silent: print "Stopping the server..." if self.process == None: self.kill_old_server() return # kill process pid = self.read_pidfile(); if pid != -1: os.kill(pid, signal.SIGTERM) #self.process.kill(signal.SIGTERM) if self.gdb or self.valgrind: self.process.expect(pexpect.EOF, timeout = 1 << 30) else: self.process.expect(pexpect.EOF) self.process.close() self.wait_until_stopped() # clean-up processs flags self.is_started = False self.process = None def deploy(self, config=None, binary=None, vardir=None, mem=None, start_and_exit=None, gdb=None, valgrind=None, valgrind_sup=None, init_lua=None, silent=True, need_init=True): if config != None: self.config = config if binary != None: self.binary = binary if vardir != None: self.vardir = vardir if mem != None: self.mem = mem if start_and_exit != None: self.start_and_exit = start_and_exit if gdb != None: self.gdb = gdb if valgrind != None: self.valgrind = valgrind if init_lua != None: self.init_lua = os.path.abspath(init_lua) else: self.init_lua = None; self.configure(self.config) self.install(self.binary, self.vardir, self.mem, silent) if need_init: self.init() self.start(self.start_and_exit, self.gdb, self.valgrind, silent) def restart(self): self.stop(silent=True) self.start(silent=True) def test_option_get(self, show, option_list_str): args = [self.binary] + option_list_str.split() if show: print " ".join([os.path.basename(self.binary)] + args[1:]) output = subprocess.Popen(args, cwd = self.vardir, stdout = subprocess.PIPE, stderr = subprocess.STDOUT).stdout.read() return output def test_option(self, option_list_str): print self.test_option_get(True, option_list_str) def test_debug(self): output = self.test_option_get(False, "-V") if re.search("-Debug", output): return True return False def kill_old_server(self, silent=True): """Kill old server instance if it exists.""" pid = self.read_pidfile() if pid == -1: return # Nothing to do if not silent: print " Found old server, pid {0}, killing...".format(pid) try: os.kill(pid, signal.SIGTERM) while os.kill(pid, 0) != -1: time.sleep(0.001) except OSError: pass def read_pidfile(self): if os.access(self.pidfile, os.F_OK) == False: # file is inaccessible (not exist or permission denied) return -1 pid = -1 try: with open(self.pidfile) as f: pid = int(f.read()) except: pass return pid def wait_until_started(self): """Wait until the server is started and accepting connections""" while self.read_pidfile() == -1: time.sleep(0.001) is_connected = False while not is_connected: try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("localhost", self.port)) is_connected = True sock.close() except socket.error as e: time.sleep(0.001) def wait_until_stopped(self): """Wait until the server is stoped and has closed sockets""" while self.read_pidfile() != -1: time.sleep(0.001) is_connected = False while not is_connected: try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("localhost", self.port)) is_connected = True sock.close() time.sleep(0.001) continue except socket.error as e: break tarantool-1.5.1.218.g1a69fd6/test/test-run.py0000775000000000000000000001523312231715257017106 0ustar rootroot#!/usr/bin/env python """Tarantool regression test suite front-end.""" __author__ = "Konstantin Osipov " # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. import os import sys import time import string import shutil import os.path import argparse from lib.test_suite import TestSuite # # Run a collection of tests. # class Options: """Handle options of test-runner""" def __init__(self): """Add all program options, with their defaults.""" parser = argparse.ArgumentParser( description = "Tarantool regression test suite front-end.") parser.epilog = "For a complete description, use 'pydoc ./" +\ os.path.basename(sys.argv[0]) + "'" parser.add_argument( "tests", metavar="test", nargs="*", default = [""], help="""Can be empty. List of test names, to look for in suites. Each name is used as a substring to look for in the path to test file, e.g. "show" will run all tests that have "show" in their name in all suites, "box/show" will only enable tests starting with "show" in "box" suite. Default: run all tests in all specified suites.""") parser.add_argument( "--suite", dest = 'suites', metavar = "suite", nargs="*", default = [], help = """List of tests suites to look for tests in. Default: "" - means find all available.""") parser.add_argument( "--force", dest = "is_force", action = "store_true", default = False, help = """Go on with other tests in case of an individual test failure. Default: false.""") parser.add_argument( "--start-and-exit", dest = "start_and_exit", action = "store_true", default = False, help = """Start the server from the first specified suite and exit without running any tests. Default: false.""") parser.add_argument( "--gdb", dest = "gdb", action = "store_true", default = False, help = """Start the server under 'gdb' debugger. See also --start-and-exit. This option is mutually exclusive with --valgrind. Default: false.""") parser.add_argument( "--valgrind", dest = "valgrind", action = "store_true", default = False, help = "Run the server under 'valgrind'. Default: false.") parser.add_argument( "--builddir", dest = "builddir", default = "..", help = """Path to project build directory. Default: " + "../.""") parser.add_argument( "--vardir", dest = "vardir", default = "var", help = """Path to data directory. Default: var.""") parser.add_argument( "--mem", dest = "mem", action = "store_true", default = False, help = """Run test suite in memory, using tmpfs or ramdisk. Is used only if vardir is not an absolute path. In that case vardir is sym-linked to /dev/shm/. Linux only. Default: false.""") self.args = parser.parse_args() self.check() def check(self): """Check the arguments for correctness.""" check_error = False if self.args.gdb and self.args.valgrind: print "Error: option --gdb is not compatible with option --valgrind" check_error = True if check_error: exit(-1) def setenv(): os.putenv("TARANTOOL_PLUGIN_DIR", string.join( ( os.path.join(os.getcwd(), '../src/plugin/mysql'), os.path.join(os.getcwd(), '../src/plugin/pg') ), ':' ) ) ####################################################################### # Program body ####################################################################### def main(): setenv() options = Options() oldcwd = os.getcwd() # Change the current working directory to where all test # collections are supposed to reside # If script executed with (python test-run.py) dirname is '' # so we need to make it . path = os.path.dirname(sys.argv[0]) if not path: path = '.' os.chdir(path) failed_tests = 0 try: print "Started", " ".join(sys.argv) suite_names = [] if options.args.suites != []: suite_names = options.args.suites else: for root, dirs, names in os.walk(os.getcwd()): if "suite.ini" in names: suite_names.append(os.path.basename(root)) suites = [TestSuite(suite_name, options.args) for suite_name in sorted(suite_names)] for suite in suites: failed_tests += suite.run_all() except RuntimeError as e: print "\nFatal error: {0}. Execution aborted.".format(e) if options.args.gdb: time.sleep(100) return (-1) finally: os.chdir(oldcwd) return -failed_tests if __name__ == "__main__": exit(main()) tarantool-1.5.1.218.g1a69fd6/test/replication/0000775000000000000000000000000012231715257017255 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/replication/hot_standby.result0000664000000000000000000001025412231715257023035 0ustar rootroot # Insert 10 tuples to master insert into t0 values (1, 'the tuple 1') Insert OK, 1 row affected insert into t0 values (2, 'the tuple 2') Insert OK, 1 row affected insert into t0 values (3, 'the tuple 3') Insert OK, 1 row affected insert into t0 values (4, 'the tuple 4') Insert OK, 1 row affected insert into t0 values (5, 'the tuple 5') Insert OK, 1 row affected insert into t0 values (6, 'the tuple 6') Insert OK, 1 row affected insert into t0 values (7, 'the tuple 7') Insert OK, 1 row affected insert into t0 values (8, 'the tuple 8') Insert OK, 1 row affected insert into t0 values (9, 'the tuple 9') Insert OK, 1 row affected insert into t0 values (10, 'the tuple 10') Insert OK, 1 row affected # Select 10 tuples from master select * from t0 where k0 = 1 Found 1 tuple: [1, 'the tuple 1'] select * from t0 where k0 = 2 Found 1 tuple: [2, 'the tuple 2'] select * from t0 where k0 = 3 Found 1 tuple: [3, 'the tuple 3'] select * from t0 where k0 = 4 Found 1 tuple: [4, 'the tuple 4'] select * from t0 where k0 = 5 Found 1 tuple: [5, 'the tuple 5'] select * from t0 where k0 = 6 Found 1 tuple: [6, 'the tuple 6'] select * from t0 where k0 = 7 Found 1 tuple: [7, 'the tuple 7'] select * from t0 where k0 = 8 Found 1 tuple: [8, 'the tuple 8'] select * from t0 where k0 = 9 Found 1 tuple: [9, 'the tuple 9'] select * from t0 where k0 = 10 Found 1 tuple: [10, 'the tuple 10'] # Select 10 tuples from replica select * from t0 where k0 = 1 Found 1 tuple: [1, 'the tuple 1'] select * from t0 where k0 = 2 Found 1 tuple: [2, 'the tuple 2'] select * from t0 where k0 = 3 Found 1 tuple: [3, 'the tuple 3'] select * from t0 where k0 = 4 Found 1 tuple: [4, 'the tuple 4'] select * from t0 where k0 = 5 Found 1 tuple: [5, 'the tuple 5'] select * from t0 where k0 = 6 Found 1 tuple: [6, 'the tuple 6'] select * from t0 where k0 = 7 Found 1 tuple: [7, 'the tuple 7'] select * from t0 where k0 = 8 Found 1 tuple: [8, 'the tuple 8'] select * from t0 where k0 = 9 Found 1 tuple: [9, 'the tuple 9'] select * from t0 where k0 = 10 Found 1 tuple: [10, 'the tuple 10'] # Shutdown master server (now the hot_standby must be a primary server) # Insert 10 tuples to hot_standby insert into t0 values (11, 'the tuple 11') Insert OK, 1 row affected insert into t0 values (12, 'the tuple 12') Insert OK, 1 row affected insert into t0 values (13, 'the tuple 13') Insert OK, 1 row affected insert into t0 values (14, 'the tuple 14') Insert OK, 1 row affected insert into t0 values (15, 'the tuple 15') Insert OK, 1 row affected insert into t0 values (16, 'the tuple 16') Insert OK, 1 row affected insert into t0 values (17, 'the tuple 17') Insert OK, 1 row affected insert into t0 values (18, 'the tuple 18') Insert OK, 1 row affected insert into t0 values (19, 'the tuple 19') Insert OK, 1 row affected insert into t0 values (20, 'the tuple 20') Insert OK, 1 row affected # Select 10 tuples from hot_standby select * from t0 where k0 = 11 Found 1 tuple: [11, 'the tuple 11'] select * from t0 where k0 = 12 Found 1 tuple: [12, 'the tuple 12'] select * from t0 where k0 = 13 Found 1 tuple: [13, 'the tuple 13'] select * from t0 where k0 = 14 Found 1 tuple: [14, 'the tuple 14'] select * from t0 where k0 = 15 Found 1 tuple: [15, 'the tuple 15'] select * from t0 where k0 = 16 Found 1 tuple: [16, 'the tuple 16'] select * from t0 where k0 = 17 Found 1 tuple: [17, 'the tuple 17'] select * from t0 where k0 = 18 Found 1 tuple: [18, 'the tuple 18'] select * from t0 where k0 = 19 Found 1 tuple: [19, 'the tuple 19'] select * from t0 where k0 = 20 Found 1 tuple: [20, 'the tuple 20'] # Select 10 tuples from replica select * from t0 where k0 = 11 Found 1 tuple: [11, 'the tuple 11'] select * from t0 where k0 = 12 Found 1 tuple: [12, 'the tuple 12'] select * from t0 where k0 = 13 Found 1 tuple: [13, 'the tuple 13'] select * from t0 where k0 = 14 Found 1 tuple: [14, 'the tuple 14'] select * from t0 where k0 = 15 Found 1 tuple: [15, 'the tuple 15'] select * from t0 where k0 = 16 Found 1 tuple: [16, 'the tuple 16'] select * from t0 where k0 = 17 Found 1 tuple: [17, 'the tuple 17'] select * from t0 where k0 = 18 Found 1 tuple: [18, 'the tuple 18'] select * from t0 where k0 = 19 Found 1 tuple: [19, 'the tuple 19'] select * from t0 where k0 = 20 Found 1 tuple: [20, 'the tuple 20'] tarantool-1.5.1.218.g1a69fd6/test/replication/memcached.result0000664000000000000000000000147412231715257022431 0ustar rootroot# set initial k-v pairs # wait and get last k-v pair from replica get 9 VALUE 9 0 5 good9 END # make multiple cnanges with master # wait and get k-v's from replicas get 1 2 3 4 5 7 8 9 10 VALUE 1 0 8 good1afk VALUE 2 0 8 kfagood2 VALUE 3 0 2 95 VALUE 4 0 2 45 VALUE 5 0 5 good5 VALUE 7 0 21 The expense of spirit VALUE 8 0 19 in a waste of shame VALUE 9 0 18 Is lust in action; VALUE 10 0 21 and till action, lust END # get deleted value get 6 END # flush all k-v on master and try to get them from replica get 10 END # check that expiration is working properly on replica get 1 VALUE 1 0 21 The expense of spirit END get 1 END # check that expiration is working properly, when replica becomes master reload configuration --- ok ... get 1 VALUE 1 0 21 The expense of spirit END get 1 END tarantool-1.5.1.218.g1a69fd6/test/replication/suite.ini0000664000000000000000000000021112231715257021101 0ustar rootroot[default] description = tarantool/box, replication config = cfg/master.cfg # put disabled in valgrind test here #valgrind_disabled = ... tarantool-1.5.1.218.g1a69fd6/test/replication/swap.result0000664000000000000000000015617012231715257021501 0ustar rootroottest 0 iteration insert into t0 values (0, 'tuple 0') Insert OK, 1 row affected insert into t0 values (1, 'tuple 1') Insert OK, 1 row affected insert into t0 values (2, 'tuple 2') Insert OK, 1 row affected insert into t0 values (3, 'tuple 3') Insert OK, 1 row affected insert into t0 values (4, 'tuple 4') Insert OK, 1 row affected select * from t0 where k0 = 0 Found 1 tuple: [0, 'tuple 0'] select * from t0 where k0 = 1 Found 1 tuple: [1, 'tuple 1'] select * from t0 where k0 = 2 Found 1 tuple: [2, 'tuple 2'] select * from t0 where k0 = 3 Found 1 tuple: [3, 'tuple 3'] select * from t0 where k0 = 4 Found 1 tuple: [4, 'tuple 4'] insert into t0 values (5, 'tuple 5') Insert OK, 1 row affected insert into t0 values (6, 'tuple 6') Insert OK, 1 row affected insert into t0 values (7, 'tuple 7') Insert OK, 1 row affected insert into t0 values (8, 'tuple 8') Insert OK, 1 row affected insert into t0 values (9, 'tuple 9') Insert OK, 1 row affected select * from t0 where k0 = 5 Found 1 tuple: [5, 'tuple 5'] select * from t0 where k0 = 6 Found 1 tuple: [6, 'tuple 6'] select * from t0 where k0 = 7 Found 1 tuple: [7, 'tuple 7'] select * from t0 where k0 = 8 Found 1 tuple: [8, 'tuple 8'] select * from t0 where k0 = 9 Found 1 tuple: [9, 'tuple 9'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (10, 'tuple 10') Insert OK, 1 row affected insert into t0 values (11, 'tuple 11') Insert OK, 1 row affected insert into t0 values (12, 'tuple 12') Insert OK, 1 row affected insert into t0 values (13, 'tuple 13') Insert OK, 1 row affected insert into t0 values (14, 'tuple 14') Insert OK, 1 row affected select * from t0 where k0 = 10 Found 1 tuple: [10, 'tuple 10'] select * from t0 where k0 = 11 Found 1 tuple: [11, 'tuple 11'] select * from t0 where k0 = 12 Found 1 tuple: [12, 'tuple 12'] select * from t0 where k0 = 13 Found 1 tuple: [13, 'tuple 13'] select * from t0 where k0 = 14 Found 1 tuple: [14, 'tuple 14'] insert into t0 values (15, 'tuple 15') Insert OK, 1 row affected insert into t0 values (16, 'tuple 16') Insert OK, 1 row affected insert into t0 values (17, 'tuple 17') Insert OK, 1 row affected insert into t0 values (18, 'tuple 18') Insert OK, 1 row affected insert into t0 values (19, 'tuple 19') Insert OK, 1 row affected select * from t0 where k0 = 15 Found 1 tuple: [15, 'tuple 15'] select * from t0 where k0 = 16 Found 1 tuple: [16, 'tuple 16'] select * from t0 where k0 = 17 Found 1 tuple: [17, 'tuple 17'] select * from t0 where k0 = 18 Found 1 tuple: [18, 'tuple 18'] select * from t0 where k0 = 19 Found 1 tuple: [19, 'tuple 19'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 1 iteration insert into t0 values (20, 'tuple 20') Insert OK, 1 row affected insert into t0 values (21, 'tuple 21') Insert OK, 1 row affected insert into t0 values (22, 'tuple 22') Insert OK, 1 row affected insert into t0 values (23, 'tuple 23') Insert OK, 1 row affected insert into t0 values (24, 'tuple 24') Insert OK, 1 row affected select * from t0 where k0 = 20 Found 1 tuple: [20, 'tuple 20'] select * from t0 where k0 = 21 Found 1 tuple: [21, 'tuple 21'] select * from t0 where k0 = 22 Found 1 tuple: [22, 'tuple 22'] select * from t0 where k0 = 23 Found 1 tuple: [23, 'tuple 23'] select * from t0 where k0 = 24 Found 1 tuple: [24, 'tuple 24'] insert into t0 values (25, 'tuple 25') Insert OK, 1 row affected insert into t0 values (26, 'tuple 26') Insert OK, 1 row affected insert into t0 values (27, 'tuple 27') Insert OK, 1 row affected insert into t0 values (28, 'tuple 28') Insert OK, 1 row affected insert into t0 values (29, 'tuple 29') Insert OK, 1 row affected select * from t0 where k0 = 25 Found 1 tuple: [25, 'tuple 25'] select * from t0 where k0 = 26 Found 1 tuple: [26, 'tuple 26'] select * from t0 where k0 = 27 Found 1 tuple: [27, 'tuple 27'] select * from t0 where k0 = 28 Found 1 tuple: [28, 'tuple 28'] select * from t0 where k0 = 29 Found 1 tuple: [29, 'tuple 29'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (30, 'tuple 30') Insert OK, 1 row affected insert into t0 values (31, 'tuple 31') Insert OK, 1 row affected insert into t0 values (32, 'tuple 32') Insert OK, 1 row affected insert into t0 values (33, 'tuple 33') Insert OK, 1 row affected insert into t0 values (34, 'tuple 34') Insert OK, 1 row affected select * from t0 where k0 = 30 Found 1 tuple: [30, 'tuple 30'] select * from t0 where k0 = 31 Found 1 tuple: [31, 'tuple 31'] select * from t0 where k0 = 32 Found 1 tuple: [32, 'tuple 32'] select * from t0 where k0 = 33 Found 1 tuple: [33, 'tuple 33'] select * from t0 where k0 = 34 Found 1 tuple: [34, 'tuple 34'] insert into t0 values (35, 'tuple 35') Insert OK, 1 row affected insert into t0 values (36, 'tuple 36') Insert OK, 1 row affected insert into t0 values (37, 'tuple 37') Insert OK, 1 row affected insert into t0 values (38, 'tuple 38') Insert OK, 1 row affected insert into t0 values (39, 'tuple 39') Insert OK, 1 row affected select * from t0 where k0 = 35 Found 1 tuple: [35, 'tuple 35'] select * from t0 where k0 = 36 Found 1 tuple: [36, 'tuple 36'] select * from t0 where k0 = 37 Found 1 tuple: [37, 'tuple 37'] select * from t0 where k0 = 38 Found 1 tuple: [38, 'tuple 38'] select * from t0 where k0 = 39 Found 1 tuple: [39, 'tuple 39'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 2 iteration insert into t0 values (40, 'tuple 40') Insert OK, 1 row affected insert into t0 values (41, 'tuple 41') Insert OK, 1 row affected insert into t0 values (42, 'tuple 42') Insert OK, 1 row affected insert into t0 values (43, 'tuple 43') Insert OK, 1 row affected insert into t0 values (44, 'tuple 44') Insert OK, 1 row affected select * from t0 where k0 = 40 Found 1 tuple: [40, 'tuple 40'] select * from t0 where k0 = 41 Found 1 tuple: [41, 'tuple 41'] select * from t0 where k0 = 42 Found 1 tuple: [42, 'tuple 42'] select * from t0 where k0 = 43 Found 1 tuple: [43, 'tuple 43'] select * from t0 where k0 = 44 Found 1 tuple: [44, 'tuple 44'] insert into t0 values (45, 'tuple 45') Insert OK, 1 row affected insert into t0 values (46, 'tuple 46') Insert OK, 1 row affected insert into t0 values (47, 'tuple 47') Insert OK, 1 row affected insert into t0 values (48, 'tuple 48') Insert OK, 1 row affected insert into t0 values (49, 'tuple 49') Insert OK, 1 row affected select * from t0 where k0 = 45 Found 1 tuple: [45, 'tuple 45'] select * from t0 where k0 = 46 Found 1 tuple: [46, 'tuple 46'] select * from t0 where k0 = 47 Found 1 tuple: [47, 'tuple 47'] select * from t0 where k0 = 48 Found 1 tuple: [48, 'tuple 48'] select * from t0 where k0 = 49 Found 1 tuple: [49, 'tuple 49'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (50, 'tuple 50') Insert OK, 1 row affected insert into t0 values (51, 'tuple 51') Insert OK, 1 row affected insert into t0 values (52, 'tuple 52') Insert OK, 1 row affected insert into t0 values (53, 'tuple 53') Insert OK, 1 row affected insert into t0 values (54, 'tuple 54') Insert OK, 1 row affected select * from t0 where k0 = 50 Found 1 tuple: [50, 'tuple 50'] select * from t0 where k0 = 51 Found 1 tuple: [51, 'tuple 51'] select * from t0 where k0 = 52 Found 1 tuple: [52, 'tuple 52'] select * from t0 where k0 = 53 Found 1 tuple: [53, 'tuple 53'] select * from t0 where k0 = 54 Found 1 tuple: [54, 'tuple 54'] insert into t0 values (55, 'tuple 55') Insert OK, 1 row affected insert into t0 values (56, 'tuple 56') Insert OK, 1 row affected insert into t0 values (57, 'tuple 57') Insert OK, 1 row affected insert into t0 values (58, 'tuple 58') Insert OK, 1 row affected insert into t0 values (59, 'tuple 59') Insert OK, 1 row affected select * from t0 where k0 = 55 Found 1 tuple: [55, 'tuple 55'] select * from t0 where k0 = 56 Found 1 tuple: [56, 'tuple 56'] select * from t0 where k0 = 57 Found 1 tuple: [57, 'tuple 57'] select * from t0 where k0 = 58 Found 1 tuple: [58, 'tuple 58'] select * from t0 where k0 = 59 Found 1 tuple: [59, 'tuple 59'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 3 iteration insert into t0 values (60, 'tuple 60') Insert OK, 1 row affected insert into t0 values (61, 'tuple 61') Insert OK, 1 row affected insert into t0 values (62, 'tuple 62') Insert OK, 1 row affected insert into t0 values (63, 'tuple 63') Insert OK, 1 row affected insert into t0 values (64, 'tuple 64') Insert OK, 1 row affected select * from t0 where k0 = 60 Found 1 tuple: [60, 'tuple 60'] select * from t0 where k0 = 61 Found 1 tuple: [61, 'tuple 61'] select * from t0 where k0 = 62 Found 1 tuple: [62, 'tuple 62'] select * from t0 where k0 = 63 Found 1 tuple: [63, 'tuple 63'] select * from t0 where k0 = 64 Found 1 tuple: [64, 'tuple 64'] insert into t0 values (65, 'tuple 65') Insert OK, 1 row affected insert into t0 values (66, 'tuple 66') Insert OK, 1 row affected insert into t0 values (67, 'tuple 67') Insert OK, 1 row affected insert into t0 values (68, 'tuple 68') Insert OK, 1 row affected insert into t0 values (69, 'tuple 69') Insert OK, 1 row affected select * from t0 where k0 = 65 Found 1 tuple: [65, 'tuple 65'] select * from t0 where k0 = 66 Found 1 tuple: [66, 'tuple 66'] select * from t0 where k0 = 67 Found 1 tuple: [67, 'tuple 67'] select * from t0 where k0 = 68 Found 1 tuple: [68, 'tuple 68'] select * from t0 where k0 = 69 Found 1 tuple: [69, 'tuple 69'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (70, 'tuple 70') Insert OK, 1 row affected insert into t0 values (71, 'tuple 71') Insert OK, 1 row affected insert into t0 values (72, 'tuple 72') Insert OK, 1 row affected insert into t0 values (73, 'tuple 73') Insert OK, 1 row affected insert into t0 values (74, 'tuple 74') Insert OK, 1 row affected select * from t0 where k0 = 70 Found 1 tuple: [70, 'tuple 70'] select * from t0 where k0 = 71 Found 1 tuple: [71, 'tuple 71'] select * from t0 where k0 = 72 Found 1 tuple: [72, 'tuple 72'] select * from t0 where k0 = 73 Found 1 tuple: [73, 'tuple 73'] select * from t0 where k0 = 74 Found 1 tuple: [74, 'tuple 74'] insert into t0 values (75, 'tuple 75') Insert OK, 1 row affected insert into t0 values (76, 'tuple 76') Insert OK, 1 row affected insert into t0 values (77, 'tuple 77') Insert OK, 1 row affected insert into t0 values (78, 'tuple 78') Insert OK, 1 row affected insert into t0 values (79, 'tuple 79') Insert OK, 1 row affected select * from t0 where k0 = 75 Found 1 tuple: [75, 'tuple 75'] select * from t0 where k0 = 76 Found 1 tuple: [76, 'tuple 76'] select * from t0 where k0 = 77 Found 1 tuple: [77, 'tuple 77'] select * from t0 where k0 = 78 Found 1 tuple: [78, 'tuple 78'] select * from t0 where k0 = 79 Found 1 tuple: [79, 'tuple 79'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 4 iteration insert into t0 values (80, 'tuple 80') Insert OK, 1 row affected insert into t0 values (81, 'tuple 81') Insert OK, 1 row affected insert into t0 values (82, 'tuple 82') Insert OK, 1 row affected insert into t0 values (83, 'tuple 83') Insert OK, 1 row affected insert into t0 values (84, 'tuple 84') Insert OK, 1 row affected select * from t0 where k0 = 80 Found 1 tuple: [80, 'tuple 80'] select * from t0 where k0 = 81 Found 1 tuple: [81, 'tuple 81'] select * from t0 where k0 = 82 Found 1 tuple: [82, 'tuple 82'] select * from t0 where k0 = 83 Found 1 tuple: [83, 'tuple 83'] select * from t0 where k0 = 84 Found 1 tuple: [84, 'tuple 84'] insert into t0 values (85, 'tuple 85') Insert OK, 1 row affected insert into t0 values (86, 'tuple 86') Insert OK, 1 row affected insert into t0 values (87, 'tuple 87') Insert OK, 1 row affected insert into t0 values (88, 'tuple 88') Insert OK, 1 row affected insert into t0 values (89, 'tuple 89') Insert OK, 1 row affected select * from t0 where k0 = 85 Found 1 tuple: [85, 'tuple 85'] select * from t0 where k0 = 86 Found 1 tuple: [86, 'tuple 86'] select * from t0 where k0 = 87 Found 1 tuple: [87, 'tuple 87'] select * from t0 where k0 = 88 Found 1 tuple: [88, 'tuple 88'] select * from t0 where k0 = 89 Found 1 tuple: [89, 'tuple 89'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (90, 'tuple 90') Insert OK, 1 row affected insert into t0 values (91, 'tuple 91') Insert OK, 1 row affected insert into t0 values (92, 'tuple 92') Insert OK, 1 row affected insert into t0 values (93, 'tuple 93') Insert OK, 1 row affected insert into t0 values (94, 'tuple 94') Insert OK, 1 row affected select * from t0 where k0 = 90 Found 1 tuple: [90, 'tuple 90'] select * from t0 where k0 = 91 Found 1 tuple: [91, 'tuple 91'] select * from t0 where k0 = 92 Found 1 tuple: [92, 'tuple 92'] select * from t0 where k0 = 93 Found 1 tuple: [93, 'tuple 93'] select * from t0 where k0 = 94 Found 1 tuple: [94, 'tuple 94'] insert into t0 values (95, 'tuple 95') Insert OK, 1 row affected insert into t0 values (96, 'tuple 96') Insert OK, 1 row affected insert into t0 values (97, 'tuple 97') Insert OK, 1 row affected insert into t0 values (98, 'tuple 98') Insert OK, 1 row affected insert into t0 values (99, 'tuple 99') Insert OK, 1 row affected select * from t0 where k0 = 95 Found 1 tuple: [95, 'tuple 95'] select * from t0 where k0 = 96 Found 1 tuple: [96, 'tuple 96'] select * from t0 where k0 = 97 Found 1 tuple: [97, 'tuple 97'] select * from t0 where k0 = 98 Found 1 tuple: [98, 'tuple 98'] select * from t0 where k0 = 99 Found 1 tuple: [99, 'tuple 99'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 5 iteration insert into t0 values (100, 'tuple 100') Insert OK, 1 row affected insert into t0 values (101, 'tuple 101') Insert OK, 1 row affected insert into t0 values (102, 'tuple 102') Insert OK, 1 row affected insert into t0 values (103, 'tuple 103') Insert OK, 1 row affected insert into t0 values (104, 'tuple 104') Insert OK, 1 row affected select * from t0 where k0 = 100 Found 1 tuple: [100, 'tuple 100'] select * from t0 where k0 = 101 Found 1 tuple: [101, 'tuple 101'] select * from t0 where k0 = 102 Found 1 tuple: [102, 'tuple 102'] select * from t0 where k0 = 103 Found 1 tuple: [103, 'tuple 103'] select * from t0 where k0 = 104 Found 1 tuple: [104, 'tuple 104'] insert into t0 values (105, 'tuple 105') Insert OK, 1 row affected insert into t0 values (106, 'tuple 106') Insert OK, 1 row affected insert into t0 values (107, 'tuple 107') Insert OK, 1 row affected insert into t0 values (108, 'tuple 108') Insert OK, 1 row affected insert into t0 values (109, 'tuple 109') Insert OK, 1 row affected select * from t0 where k0 = 105 Found 1 tuple: [105, 'tuple 105'] select * from t0 where k0 = 106 Found 1 tuple: [106, 'tuple 106'] select * from t0 where k0 = 107 Found 1 tuple: [107, 'tuple 107'] select * from t0 where k0 = 108 Found 1 tuple: [108, 'tuple 108'] select * from t0 where k0 = 109 Found 1 tuple: [109, 'tuple 109'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (110, 'tuple 110') Insert OK, 1 row affected insert into t0 values (111, 'tuple 111') Insert OK, 1 row affected insert into t0 values (112, 'tuple 112') Insert OK, 1 row affected insert into t0 values (113, 'tuple 113') Insert OK, 1 row affected insert into t0 values (114, 'tuple 114') Insert OK, 1 row affected select * from t0 where k0 = 110 Found 1 tuple: [110, 'tuple 110'] select * from t0 where k0 = 111 Found 1 tuple: [111, 'tuple 111'] select * from t0 where k0 = 112 Found 1 tuple: [112, 'tuple 112'] select * from t0 where k0 = 113 Found 1 tuple: [113, 'tuple 113'] select * from t0 where k0 = 114 Found 1 tuple: [114, 'tuple 114'] insert into t0 values (115, 'tuple 115') Insert OK, 1 row affected insert into t0 values (116, 'tuple 116') Insert OK, 1 row affected insert into t0 values (117, 'tuple 117') Insert OK, 1 row affected insert into t0 values (118, 'tuple 118') Insert OK, 1 row affected insert into t0 values (119, 'tuple 119') Insert OK, 1 row affected select * from t0 where k0 = 115 Found 1 tuple: [115, 'tuple 115'] select * from t0 where k0 = 116 Found 1 tuple: [116, 'tuple 116'] select * from t0 where k0 = 117 Found 1 tuple: [117, 'tuple 117'] select * from t0 where k0 = 118 Found 1 tuple: [118, 'tuple 118'] select * from t0 where k0 = 119 Found 1 tuple: [119, 'tuple 119'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 6 iteration insert into t0 values (120, 'tuple 120') Insert OK, 1 row affected insert into t0 values (121, 'tuple 121') Insert OK, 1 row affected insert into t0 values (122, 'tuple 122') Insert OK, 1 row affected insert into t0 values (123, 'tuple 123') Insert OK, 1 row affected insert into t0 values (124, 'tuple 124') Insert OK, 1 row affected select * from t0 where k0 = 120 Found 1 tuple: [120, 'tuple 120'] select * from t0 where k0 = 121 Found 1 tuple: [121, 'tuple 121'] select * from t0 where k0 = 122 Found 1 tuple: [122, 'tuple 122'] select * from t0 where k0 = 123 Found 1 tuple: [123, 'tuple 123'] select * from t0 where k0 = 124 Found 1 tuple: [124, 'tuple 124'] insert into t0 values (125, 'tuple 125') Insert OK, 1 row affected insert into t0 values (126, 'tuple 126') Insert OK, 1 row affected insert into t0 values (127, 'tuple 127') Insert OK, 1 row affected insert into t0 values (128, 'tuple 128') Insert OK, 1 row affected insert into t0 values (129, 'tuple 129') Insert OK, 1 row affected select * from t0 where k0 = 125 Found 1 tuple: [125, 'tuple 125'] select * from t0 where k0 = 126 Found 1 tuple: [126, 'tuple 126'] select * from t0 where k0 = 127 Found 1 tuple: [127, 'tuple 127'] select * from t0 where k0 = 128 Found 1 tuple: [128, 'tuple 128'] select * from t0 where k0 = 129 Found 1 tuple: [129, 'tuple 129'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (130, 'tuple 130') Insert OK, 1 row affected insert into t0 values (131, 'tuple 131') Insert OK, 1 row affected insert into t0 values (132, 'tuple 132') Insert OK, 1 row affected insert into t0 values (133, 'tuple 133') Insert OK, 1 row affected insert into t0 values (134, 'tuple 134') Insert OK, 1 row affected select * from t0 where k0 = 130 Found 1 tuple: [130, 'tuple 130'] select * from t0 where k0 = 131 Found 1 tuple: [131, 'tuple 131'] select * from t0 where k0 = 132 Found 1 tuple: [132, 'tuple 132'] select * from t0 where k0 = 133 Found 1 tuple: [133, 'tuple 133'] select * from t0 where k0 = 134 Found 1 tuple: [134, 'tuple 134'] insert into t0 values (135, 'tuple 135') Insert OK, 1 row affected insert into t0 values (136, 'tuple 136') Insert OK, 1 row affected insert into t0 values (137, 'tuple 137') Insert OK, 1 row affected insert into t0 values (138, 'tuple 138') Insert OK, 1 row affected insert into t0 values (139, 'tuple 139') Insert OK, 1 row affected select * from t0 where k0 = 135 Found 1 tuple: [135, 'tuple 135'] select * from t0 where k0 = 136 Found 1 tuple: [136, 'tuple 136'] select * from t0 where k0 = 137 Found 1 tuple: [137, 'tuple 137'] select * from t0 where k0 = 138 Found 1 tuple: [138, 'tuple 138'] select * from t0 where k0 = 139 Found 1 tuple: [139, 'tuple 139'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 7 iteration insert into t0 values (140, 'tuple 140') Insert OK, 1 row affected insert into t0 values (141, 'tuple 141') Insert OK, 1 row affected insert into t0 values (142, 'tuple 142') Insert OK, 1 row affected insert into t0 values (143, 'tuple 143') Insert OK, 1 row affected insert into t0 values (144, 'tuple 144') Insert OK, 1 row affected select * from t0 where k0 = 140 Found 1 tuple: [140, 'tuple 140'] select * from t0 where k0 = 141 Found 1 tuple: [141, 'tuple 141'] select * from t0 where k0 = 142 Found 1 tuple: [142, 'tuple 142'] select * from t0 where k0 = 143 Found 1 tuple: [143, 'tuple 143'] select * from t0 where k0 = 144 Found 1 tuple: [144, 'tuple 144'] insert into t0 values (145, 'tuple 145') Insert OK, 1 row affected insert into t0 values (146, 'tuple 146') Insert OK, 1 row affected insert into t0 values (147, 'tuple 147') Insert OK, 1 row affected insert into t0 values (148, 'tuple 148') Insert OK, 1 row affected insert into t0 values (149, 'tuple 149') Insert OK, 1 row affected select * from t0 where k0 = 145 Found 1 tuple: [145, 'tuple 145'] select * from t0 where k0 = 146 Found 1 tuple: [146, 'tuple 146'] select * from t0 where k0 = 147 Found 1 tuple: [147, 'tuple 147'] select * from t0 where k0 = 148 Found 1 tuple: [148, 'tuple 148'] select * from t0 where k0 = 149 Found 1 tuple: [149, 'tuple 149'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (150, 'tuple 150') Insert OK, 1 row affected insert into t0 values (151, 'tuple 151') Insert OK, 1 row affected insert into t0 values (152, 'tuple 152') Insert OK, 1 row affected insert into t0 values (153, 'tuple 153') Insert OK, 1 row affected insert into t0 values (154, 'tuple 154') Insert OK, 1 row affected select * from t0 where k0 = 150 Found 1 tuple: [150, 'tuple 150'] select * from t0 where k0 = 151 Found 1 tuple: [151, 'tuple 151'] select * from t0 where k0 = 152 Found 1 tuple: [152, 'tuple 152'] select * from t0 where k0 = 153 Found 1 tuple: [153, 'tuple 153'] select * from t0 where k0 = 154 Found 1 tuple: [154, 'tuple 154'] insert into t0 values (155, 'tuple 155') Insert OK, 1 row affected insert into t0 values (156, 'tuple 156') Insert OK, 1 row affected insert into t0 values (157, 'tuple 157') Insert OK, 1 row affected insert into t0 values (158, 'tuple 158') Insert OK, 1 row affected insert into t0 values (159, 'tuple 159') Insert OK, 1 row affected select * from t0 where k0 = 155 Found 1 tuple: [155, 'tuple 155'] select * from t0 where k0 = 156 Found 1 tuple: [156, 'tuple 156'] select * from t0 where k0 = 157 Found 1 tuple: [157, 'tuple 157'] select * from t0 where k0 = 158 Found 1 tuple: [158, 'tuple 158'] select * from t0 where k0 = 159 Found 1 tuple: [159, 'tuple 159'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 8 iteration insert into t0 values (160, 'tuple 160') Insert OK, 1 row affected insert into t0 values (161, 'tuple 161') Insert OK, 1 row affected insert into t0 values (162, 'tuple 162') Insert OK, 1 row affected insert into t0 values (163, 'tuple 163') Insert OK, 1 row affected insert into t0 values (164, 'tuple 164') Insert OK, 1 row affected select * from t0 where k0 = 160 Found 1 tuple: [160, 'tuple 160'] select * from t0 where k0 = 161 Found 1 tuple: [161, 'tuple 161'] select * from t0 where k0 = 162 Found 1 tuple: [162, 'tuple 162'] select * from t0 where k0 = 163 Found 1 tuple: [163, 'tuple 163'] select * from t0 where k0 = 164 Found 1 tuple: [164, 'tuple 164'] insert into t0 values (165, 'tuple 165') Insert OK, 1 row affected insert into t0 values (166, 'tuple 166') Insert OK, 1 row affected insert into t0 values (167, 'tuple 167') Insert OK, 1 row affected insert into t0 values (168, 'tuple 168') Insert OK, 1 row affected insert into t0 values (169, 'tuple 169') Insert OK, 1 row affected select * from t0 where k0 = 165 Found 1 tuple: [165, 'tuple 165'] select * from t0 where k0 = 166 Found 1 tuple: [166, 'tuple 166'] select * from t0 where k0 = 167 Found 1 tuple: [167, 'tuple 167'] select * from t0 where k0 = 168 Found 1 tuple: [168, 'tuple 168'] select * from t0 where k0 = 169 Found 1 tuple: [169, 'tuple 169'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (170, 'tuple 170') Insert OK, 1 row affected insert into t0 values (171, 'tuple 171') Insert OK, 1 row affected insert into t0 values (172, 'tuple 172') Insert OK, 1 row affected insert into t0 values (173, 'tuple 173') Insert OK, 1 row affected insert into t0 values (174, 'tuple 174') Insert OK, 1 row affected select * from t0 where k0 = 170 Found 1 tuple: [170, 'tuple 170'] select * from t0 where k0 = 171 Found 1 tuple: [171, 'tuple 171'] select * from t0 where k0 = 172 Found 1 tuple: [172, 'tuple 172'] select * from t0 where k0 = 173 Found 1 tuple: [173, 'tuple 173'] select * from t0 where k0 = 174 Found 1 tuple: [174, 'tuple 174'] insert into t0 values (175, 'tuple 175') Insert OK, 1 row affected insert into t0 values (176, 'tuple 176') Insert OK, 1 row affected insert into t0 values (177, 'tuple 177') Insert OK, 1 row affected insert into t0 values (178, 'tuple 178') Insert OK, 1 row affected insert into t0 values (179, 'tuple 179') Insert OK, 1 row affected select * from t0 where k0 = 175 Found 1 tuple: [175, 'tuple 175'] select * from t0 where k0 = 176 Found 1 tuple: [176, 'tuple 176'] select * from t0 where k0 = 177 Found 1 tuple: [177, 'tuple 177'] select * from t0 where k0 = 178 Found 1 tuple: [178, 'tuple 178'] select * from t0 where k0 = 179 Found 1 tuple: [179, 'tuple 179'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 9 iteration insert into t0 values (180, 'tuple 180') Insert OK, 1 row affected insert into t0 values (181, 'tuple 181') Insert OK, 1 row affected insert into t0 values (182, 'tuple 182') Insert OK, 1 row affected insert into t0 values (183, 'tuple 183') Insert OK, 1 row affected insert into t0 values (184, 'tuple 184') Insert OK, 1 row affected select * from t0 where k0 = 180 Found 1 tuple: [180, 'tuple 180'] select * from t0 where k0 = 181 Found 1 tuple: [181, 'tuple 181'] select * from t0 where k0 = 182 Found 1 tuple: [182, 'tuple 182'] select * from t0 where k0 = 183 Found 1 tuple: [183, 'tuple 183'] select * from t0 where k0 = 184 Found 1 tuple: [184, 'tuple 184'] insert into t0 values (185, 'tuple 185') Insert OK, 1 row affected insert into t0 values (186, 'tuple 186') Insert OK, 1 row affected insert into t0 values (187, 'tuple 187') Insert OK, 1 row affected insert into t0 values (188, 'tuple 188') Insert OK, 1 row affected insert into t0 values (189, 'tuple 189') Insert OK, 1 row affected select * from t0 where k0 = 185 Found 1 tuple: [185, 'tuple 185'] select * from t0 where k0 = 186 Found 1 tuple: [186, 'tuple 186'] select * from t0 where k0 = 187 Found 1 tuple: [187, 'tuple 187'] select * from t0 where k0 = 188 Found 1 tuple: [188, 'tuple 188'] select * from t0 where k0 = 189 Found 1 tuple: [189, 'tuple 189'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (190, 'tuple 190') Insert OK, 1 row affected insert into t0 values (191, 'tuple 191') Insert OK, 1 row affected insert into t0 values (192, 'tuple 192') Insert OK, 1 row affected insert into t0 values (193, 'tuple 193') Insert OK, 1 row affected insert into t0 values (194, 'tuple 194') Insert OK, 1 row affected select * from t0 where k0 = 190 Found 1 tuple: [190, 'tuple 190'] select * from t0 where k0 = 191 Found 1 tuple: [191, 'tuple 191'] select * from t0 where k0 = 192 Found 1 tuple: [192, 'tuple 192'] select * from t0 where k0 = 193 Found 1 tuple: [193, 'tuple 193'] select * from t0 where k0 = 194 Found 1 tuple: [194, 'tuple 194'] insert into t0 values (195, 'tuple 195') Insert OK, 1 row affected insert into t0 values (196, 'tuple 196') Insert OK, 1 row affected insert into t0 values (197, 'tuple 197') Insert OK, 1 row affected insert into t0 values (198, 'tuple 198') Insert OK, 1 row affected insert into t0 values (199, 'tuple 199') Insert OK, 1 row affected select * from t0 where k0 = 195 Found 1 tuple: [195, 'tuple 195'] select * from t0 where k0 = 196 Found 1 tuple: [196, 'tuple 196'] select * from t0 where k0 = 197 Found 1 tuple: [197, 'tuple 197'] select * from t0 where k0 = 198 Found 1 tuple: [198, 'tuple 198'] select * from t0 where k0 = 199 Found 1 tuple: [199, 'tuple 199'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 10 iteration insert into t0 values (200, 'tuple 200') Insert OK, 1 row affected insert into t0 values (201, 'tuple 201') Insert OK, 1 row affected insert into t0 values (202, 'tuple 202') Insert OK, 1 row affected insert into t0 values (203, 'tuple 203') Insert OK, 1 row affected insert into t0 values (204, 'tuple 204') Insert OK, 1 row affected select * from t0 where k0 = 200 Found 1 tuple: [200, 'tuple 200'] select * from t0 where k0 = 201 Found 1 tuple: [201, 'tuple 201'] select * from t0 where k0 = 202 Found 1 tuple: [202, 'tuple 202'] select * from t0 where k0 = 203 Found 1 tuple: [203, 'tuple 203'] select * from t0 where k0 = 204 Found 1 tuple: [204, 'tuple 204'] insert into t0 values (205, 'tuple 205') Insert OK, 1 row affected insert into t0 values (206, 'tuple 206') Insert OK, 1 row affected insert into t0 values (207, 'tuple 207') Insert OK, 1 row affected insert into t0 values (208, 'tuple 208') Insert OK, 1 row affected insert into t0 values (209, 'tuple 209') Insert OK, 1 row affected select * from t0 where k0 = 205 Found 1 tuple: [205, 'tuple 205'] select * from t0 where k0 = 206 Found 1 tuple: [206, 'tuple 206'] select * from t0 where k0 = 207 Found 1 tuple: [207, 'tuple 207'] select * from t0 where k0 = 208 Found 1 tuple: [208, 'tuple 208'] select * from t0 where k0 = 209 Found 1 tuple: [209, 'tuple 209'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (210, 'tuple 210') Insert OK, 1 row affected insert into t0 values (211, 'tuple 211') Insert OK, 1 row affected insert into t0 values (212, 'tuple 212') Insert OK, 1 row affected insert into t0 values (213, 'tuple 213') Insert OK, 1 row affected insert into t0 values (214, 'tuple 214') Insert OK, 1 row affected select * from t0 where k0 = 210 Found 1 tuple: [210, 'tuple 210'] select * from t0 where k0 = 211 Found 1 tuple: [211, 'tuple 211'] select * from t0 where k0 = 212 Found 1 tuple: [212, 'tuple 212'] select * from t0 where k0 = 213 Found 1 tuple: [213, 'tuple 213'] select * from t0 where k0 = 214 Found 1 tuple: [214, 'tuple 214'] insert into t0 values (215, 'tuple 215') Insert OK, 1 row affected insert into t0 values (216, 'tuple 216') Insert OK, 1 row affected insert into t0 values (217, 'tuple 217') Insert OK, 1 row affected insert into t0 values (218, 'tuple 218') Insert OK, 1 row affected insert into t0 values (219, 'tuple 219') Insert OK, 1 row affected select * from t0 where k0 = 215 Found 1 tuple: [215, 'tuple 215'] select * from t0 where k0 = 216 Found 1 tuple: [216, 'tuple 216'] select * from t0 where k0 = 217 Found 1 tuple: [217, 'tuple 217'] select * from t0 where k0 = 218 Found 1 tuple: [218, 'tuple 218'] select * from t0 where k0 = 219 Found 1 tuple: [219, 'tuple 219'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 11 iteration insert into t0 values (220, 'tuple 220') Insert OK, 1 row affected insert into t0 values (221, 'tuple 221') Insert OK, 1 row affected insert into t0 values (222, 'tuple 222') Insert OK, 1 row affected insert into t0 values (223, 'tuple 223') Insert OK, 1 row affected insert into t0 values (224, 'tuple 224') Insert OK, 1 row affected select * from t0 where k0 = 220 Found 1 tuple: [220, 'tuple 220'] select * from t0 where k0 = 221 Found 1 tuple: [221, 'tuple 221'] select * from t0 where k0 = 222 Found 1 tuple: [222, 'tuple 222'] select * from t0 where k0 = 223 Found 1 tuple: [223, 'tuple 223'] select * from t0 where k0 = 224 Found 1 tuple: [224, 'tuple 224'] insert into t0 values (225, 'tuple 225') Insert OK, 1 row affected insert into t0 values (226, 'tuple 226') Insert OK, 1 row affected insert into t0 values (227, 'tuple 227') Insert OK, 1 row affected insert into t0 values (228, 'tuple 228') Insert OK, 1 row affected insert into t0 values (229, 'tuple 229') Insert OK, 1 row affected select * from t0 where k0 = 225 Found 1 tuple: [225, 'tuple 225'] select * from t0 where k0 = 226 Found 1 tuple: [226, 'tuple 226'] select * from t0 where k0 = 227 Found 1 tuple: [227, 'tuple 227'] select * from t0 where k0 = 228 Found 1 tuple: [228, 'tuple 228'] select * from t0 where k0 = 229 Found 1 tuple: [229, 'tuple 229'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (230, 'tuple 230') Insert OK, 1 row affected insert into t0 values (231, 'tuple 231') Insert OK, 1 row affected insert into t0 values (232, 'tuple 232') Insert OK, 1 row affected insert into t0 values (233, 'tuple 233') Insert OK, 1 row affected insert into t0 values (234, 'tuple 234') Insert OK, 1 row affected select * from t0 where k0 = 230 Found 1 tuple: [230, 'tuple 230'] select * from t0 where k0 = 231 Found 1 tuple: [231, 'tuple 231'] select * from t0 where k0 = 232 Found 1 tuple: [232, 'tuple 232'] select * from t0 where k0 = 233 Found 1 tuple: [233, 'tuple 233'] select * from t0 where k0 = 234 Found 1 tuple: [234, 'tuple 234'] insert into t0 values (235, 'tuple 235') Insert OK, 1 row affected insert into t0 values (236, 'tuple 236') Insert OK, 1 row affected insert into t0 values (237, 'tuple 237') Insert OK, 1 row affected insert into t0 values (238, 'tuple 238') Insert OK, 1 row affected insert into t0 values (239, 'tuple 239') Insert OK, 1 row affected select * from t0 where k0 = 235 Found 1 tuple: [235, 'tuple 235'] select * from t0 where k0 = 236 Found 1 tuple: [236, 'tuple 236'] select * from t0 where k0 = 237 Found 1 tuple: [237, 'tuple 237'] select * from t0 where k0 = 238 Found 1 tuple: [238, 'tuple 238'] select * from t0 where k0 = 239 Found 1 tuple: [239, 'tuple 239'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 12 iteration insert into t0 values (240, 'tuple 240') Insert OK, 1 row affected insert into t0 values (241, 'tuple 241') Insert OK, 1 row affected insert into t0 values (242, 'tuple 242') Insert OK, 1 row affected insert into t0 values (243, 'tuple 243') Insert OK, 1 row affected insert into t0 values (244, 'tuple 244') Insert OK, 1 row affected select * from t0 where k0 = 240 Found 1 tuple: [240, 'tuple 240'] select * from t0 where k0 = 241 Found 1 tuple: [241, 'tuple 241'] select * from t0 where k0 = 242 Found 1 tuple: [242, 'tuple 242'] select * from t0 where k0 = 243 Found 1 tuple: [243, 'tuple 243'] select * from t0 where k0 = 244 Found 1 tuple: [244, 'tuple 244'] insert into t0 values (245, 'tuple 245') Insert OK, 1 row affected insert into t0 values (246, 'tuple 246') Insert OK, 1 row affected insert into t0 values (247, 'tuple 247') Insert OK, 1 row affected insert into t0 values (248, 'tuple 248') Insert OK, 1 row affected insert into t0 values (249, 'tuple 249') Insert OK, 1 row affected select * from t0 where k0 = 245 Found 1 tuple: [245, 'tuple 245'] select * from t0 where k0 = 246 Found 1 tuple: [246, 'tuple 246'] select * from t0 where k0 = 247 Found 1 tuple: [247, 'tuple 247'] select * from t0 where k0 = 248 Found 1 tuple: [248, 'tuple 248'] select * from t0 where k0 = 249 Found 1 tuple: [249, 'tuple 249'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (250, 'tuple 250') Insert OK, 1 row affected insert into t0 values (251, 'tuple 251') Insert OK, 1 row affected insert into t0 values (252, 'tuple 252') Insert OK, 1 row affected insert into t0 values (253, 'tuple 253') Insert OK, 1 row affected insert into t0 values (254, 'tuple 254') Insert OK, 1 row affected select * from t0 where k0 = 250 Found 1 tuple: [250, 'tuple 250'] select * from t0 where k0 = 251 Found 1 tuple: [251, 'tuple 251'] select * from t0 where k0 = 252 Found 1 tuple: [252, 'tuple 252'] select * from t0 where k0 = 253 Found 1 tuple: [253, 'tuple 253'] select * from t0 where k0 = 254 Found 1 tuple: [254, 'tuple 254'] insert into t0 values (255, 'tuple 255') Insert OK, 1 row affected insert into t0 values (256, 'tuple 256') Insert OK, 1 row affected insert into t0 values (257, 'tuple 257') Insert OK, 1 row affected insert into t0 values (258, 'tuple 258') Insert OK, 1 row affected insert into t0 values (259, 'tuple 259') Insert OK, 1 row affected select * from t0 where k0 = 255 Found 1 tuple: [255, 'tuple 255'] select * from t0 where k0 = 256 Found 1 tuple: [256, 'tuple 256'] select * from t0 where k0 = 257 Found 1 tuple: [257, 'tuple 257'] select * from t0 where k0 = 258 Found 1 tuple: [258, 'tuple 258'] select * from t0 where k0 = 259 Found 1 tuple: [259, 'tuple 259'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 13 iteration insert into t0 values (260, 'tuple 260') Insert OK, 1 row affected insert into t0 values (261, 'tuple 261') Insert OK, 1 row affected insert into t0 values (262, 'tuple 262') Insert OK, 1 row affected insert into t0 values (263, 'tuple 263') Insert OK, 1 row affected insert into t0 values (264, 'tuple 264') Insert OK, 1 row affected select * from t0 where k0 = 260 Found 1 tuple: [260, 'tuple 260'] select * from t0 where k0 = 261 Found 1 tuple: [261, 'tuple 261'] select * from t0 where k0 = 262 Found 1 tuple: [262, 'tuple 262'] select * from t0 where k0 = 263 Found 1 tuple: [263, 'tuple 263'] select * from t0 where k0 = 264 Found 1 tuple: [264, 'tuple 264'] insert into t0 values (265, 'tuple 265') Insert OK, 1 row affected insert into t0 values (266, 'tuple 266') Insert OK, 1 row affected insert into t0 values (267, 'tuple 267') Insert OK, 1 row affected insert into t0 values (268, 'tuple 268') Insert OK, 1 row affected insert into t0 values (269, 'tuple 269') Insert OK, 1 row affected select * from t0 where k0 = 265 Found 1 tuple: [265, 'tuple 265'] select * from t0 where k0 = 266 Found 1 tuple: [266, 'tuple 266'] select * from t0 where k0 = 267 Found 1 tuple: [267, 'tuple 267'] select * from t0 where k0 = 268 Found 1 tuple: [268, 'tuple 268'] select * from t0 where k0 = 269 Found 1 tuple: [269, 'tuple 269'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (270, 'tuple 270') Insert OK, 1 row affected insert into t0 values (271, 'tuple 271') Insert OK, 1 row affected insert into t0 values (272, 'tuple 272') Insert OK, 1 row affected insert into t0 values (273, 'tuple 273') Insert OK, 1 row affected insert into t0 values (274, 'tuple 274') Insert OK, 1 row affected select * from t0 where k0 = 270 Found 1 tuple: [270, 'tuple 270'] select * from t0 where k0 = 271 Found 1 tuple: [271, 'tuple 271'] select * from t0 where k0 = 272 Found 1 tuple: [272, 'tuple 272'] select * from t0 where k0 = 273 Found 1 tuple: [273, 'tuple 273'] select * from t0 where k0 = 274 Found 1 tuple: [274, 'tuple 274'] insert into t0 values (275, 'tuple 275') Insert OK, 1 row affected insert into t0 values (276, 'tuple 276') Insert OK, 1 row affected insert into t0 values (277, 'tuple 277') Insert OK, 1 row affected insert into t0 values (278, 'tuple 278') Insert OK, 1 row affected insert into t0 values (279, 'tuple 279') Insert OK, 1 row affected select * from t0 where k0 = 275 Found 1 tuple: [275, 'tuple 275'] select * from t0 where k0 = 276 Found 1 tuple: [276, 'tuple 276'] select * from t0 where k0 = 277 Found 1 tuple: [277, 'tuple 277'] select * from t0 where k0 = 278 Found 1 tuple: [278, 'tuple 278'] select * from t0 where k0 = 279 Found 1 tuple: [279, 'tuple 279'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 14 iteration insert into t0 values (280, 'tuple 280') Insert OK, 1 row affected insert into t0 values (281, 'tuple 281') Insert OK, 1 row affected insert into t0 values (282, 'tuple 282') Insert OK, 1 row affected insert into t0 values (283, 'tuple 283') Insert OK, 1 row affected insert into t0 values (284, 'tuple 284') Insert OK, 1 row affected select * from t0 where k0 = 280 Found 1 tuple: [280, 'tuple 280'] select * from t0 where k0 = 281 Found 1 tuple: [281, 'tuple 281'] select * from t0 where k0 = 282 Found 1 tuple: [282, 'tuple 282'] select * from t0 where k0 = 283 Found 1 tuple: [283, 'tuple 283'] select * from t0 where k0 = 284 Found 1 tuple: [284, 'tuple 284'] insert into t0 values (285, 'tuple 285') Insert OK, 1 row affected insert into t0 values (286, 'tuple 286') Insert OK, 1 row affected insert into t0 values (287, 'tuple 287') Insert OK, 1 row affected insert into t0 values (288, 'tuple 288') Insert OK, 1 row affected insert into t0 values (289, 'tuple 289') Insert OK, 1 row affected select * from t0 where k0 = 285 Found 1 tuple: [285, 'tuple 285'] select * from t0 where k0 = 286 Found 1 tuple: [286, 'tuple 286'] select * from t0 where k0 = 287 Found 1 tuple: [287, 'tuple 287'] select * from t0 where k0 = 288 Found 1 tuple: [288, 'tuple 288'] select * from t0 where k0 = 289 Found 1 tuple: [289, 'tuple 289'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (290, 'tuple 290') Insert OK, 1 row affected insert into t0 values (291, 'tuple 291') Insert OK, 1 row affected insert into t0 values (292, 'tuple 292') Insert OK, 1 row affected insert into t0 values (293, 'tuple 293') Insert OK, 1 row affected insert into t0 values (294, 'tuple 294') Insert OK, 1 row affected select * from t0 where k0 = 290 Found 1 tuple: [290, 'tuple 290'] select * from t0 where k0 = 291 Found 1 tuple: [291, 'tuple 291'] select * from t0 where k0 = 292 Found 1 tuple: [292, 'tuple 292'] select * from t0 where k0 = 293 Found 1 tuple: [293, 'tuple 293'] select * from t0 where k0 = 294 Found 1 tuple: [294, 'tuple 294'] insert into t0 values (295, 'tuple 295') Insert OK, 1 row affected insert into t0 values (296, 'tuple 296') Insert OK, 1 row affected insert into t0 values (297, 'tuple 297') Insert OK, 1 row affected insert into t0 values (298, 'tuple 298') Insert OK, 1 row affected insert into t0 values (299, 'tuple 299') Insert OK, 1 row affected select * from t0 where k0 = 295 Found 1 tuple: [295, 'tuple 295'] select * from t0 where k0 = 296 Found 1 tuple: [296, 'tuple 296'] select * from t0 where k0 = 297 Found 1 tuple: [297, 'tuple 297'] select * from t0 where k0 = 298 Found 1 tuple: [298, 'tuple 298'] select * from t0 where k0 = 299 Found 1 tuple: [299, 'tuple 299'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 15 iteration insert into t0 values (300, 'tuple 300') Insert OK, 1 row affected insert into t0 values (301, 'tuple 301') Insert OK, 1 row affected insert into t0 values (302, 'tuple 302') Insert OK, 1 row affected insert into t0 values (303, 'tuple 303') Insert OK, 1 row affected insert into t0 values (304, 'tuple 304') Insert OK, 1 row affected select * from t0 where k0 = 300 Found 1 tuple: [300, 'tuple 300'] select * from t0 where k0 = 301 Found 1 tuple: [301, 'tuple 301'] select * from t0 where k0 = 302 Found 1 tuple: [302, 'tuple 302'] select * from t0 where k0 = 303 Found 1 tuple: [303, 'tuple 303'] select * from t0 where k0 = 304 Found 1 tuple: [304, 'tuple 304'] insert into t0 values (305, 'tuple 305') Insert OK, 1 row affected insert into t0 values (306, 'tuple 306') Insert OK, 1 row affected insert into t0 values (307, 'tuple 307') Insert OK, 1 row affected insert into t0 values (308, 'tuple 308') Insert OK, 1 row affected insert into t0 values (309, 'tuple 309') Insert OK, 1 row affected select * from t0 where k0 = 305 Found 1 tuple: [305, 'tuple 305'] select * from t0 where k0 = 306 Found 1 tuple: [306, 'tuple 306'] select * from t0 where k0 = 307 Found 1 tuple: [307, 'tuple 307'] select * from t0 where k0 = 308 Found 1 tuple: [308, 'tuple 308'] select * from t0 where k0 = 309 Found 1 tuple: [309, 'tuple 309'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (310, 'tuple 310') Insert OK, 1 row affected insert into t0 values (311, 'tuple 311') Insert OK, 1 row affected insert into t0 values (312, 'tuple 312') Insert OK, 1 row affected insert into t0 values (313, 'tuple 313') Insert OK, 1 row affected insert into t0 values (314, 'tuple 314') Insert OK, 1 row affected select * from t0 where k0 = 310 Found 1 tuple: [310, 'tuple 310'] select * from t0 where k0 = 311 Found 1 tuple: [311, 'tuple 311'] select * from t0 where k0 = 312 Found 1 tuple: [312, 'tuple 312'] select * from t0 where k0 = 313 Found 1 tuple: [313, 'tuple 313'] select * from t0 where k0 = 314 Found 1 tuple: [314, 'tuple 314'] insert into t0 values (315, 'tuple 315') Insert OK, 1 row affected insert into t0 values (316, 'tuple 316') Insert OK, 1 row affected insert into t0 values (317, 'tuple 317') Insert OK, 1 row affected insert into t0 values (318, 'tuple 318') Insert OK, 1 row affected insert into t0 values (319, 'tuple 319') Insert OK, 1 row affected select * from t0 where k0 = 315 Found 1 tuple: [315, 'tuple 315'] select * from t0 where k0 = 316 Found 1 tuple: [316, 'tuple 316'] select * from t0 where k0 = 317 Found 1 tuple: [317, 'tuple 317'] select * from t0 where k0 = 318 Found 1 tuple: [318, 'tuple 318'] select * from t0 where k0 = 319 Found 1 tuple: [319, 'tuple 319'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 16 iteration insert into t0 values (320, 'tuple 320') Insert OK, 1 row affected insert into t0 values (321, 'tuple 321') Insert OK, 1 row affected insert into t0 values (322, 'tuple 322') Insert OK, 1 row affected insert into t0 values (323, 'tuple 323') Insert OK, 1 row affected insert into t0 values (324, 'tuple 324') Insert OK, 1 row affected select * from t0 where k0 = 320 Found 1 tuple: [320, 'tuple 320'] select * from t0 where k0 = 321 Found 1 tuple: [321, 'tuple 321'] select * from t0 where k0 = 322 Found 1 tuple: [322, 'tuple 322'] select * from t0 where k0 = 323 Found 1 tuple: [323, 'tuple 323'] select * from t0 where k0 = 324 Found 1 tuple: [324, 'tuple 324'] insert into t0 values (325, 'tuple 325') Insert OK, 1 row affected insert into t0 values (326, 'tuple 326') Insert OK, 1 row affected insert into t0 values (327, 'tuple 327') Insert OK, 1 row affected insert into t0 values (328, 'tuple 328') Insert OK, 1 row affected insert into t0 values (329, 'tuple 329') Insert OK, 1 row affected select * from t0 where k0 = 325 Found 1 tuple: [325, 'tuple 325'] select * from t0 where k0 = 326 Found 1 tuple: [326, 'tuple 326'] select * from t0 where k0 = 327 Found 1 tuple: [327, 'tuple 327'] select * from t0 where k0 = 328 Found 1 tuple: [328, 'tuple 328'] select * from t0 where k0 = 329 Found 1 tuple: [329, 'tuple 329'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (330, 'tuple 330') Insert OK, 1 row affected insert into t0 values (331, 'tuple 331') Insert OK, 1 row affected insert into t0 values (332, 'tuple 332') Insert OK, 1 row affected insert into t0 values (333, 'tuple 333') Insert OK, 1 row affected insert into t0 values (334, 'tuple 334') Insert OK, 1 row affected select * from t0 where k0 = 330 Found 1 tuple: [330, 'tuple 330'] select * from t0 where k0 = 331 Found 1 tuple: [331, 'tuple 331'] select * from t0 where k0 = 332 Found 1 tuple: [332, 'tuple 332'] select * from t0 where k0 = 333 Found 1 tuple: [333, 'tuple 333'] select * from t0 where k0 = 334 Found 1 tuple: [334, 'tuple 334'] insert into t0 values (335, 'tuple 335') Insert OK, 1 row affected insert into t0 values (336, 'tuple 336') Insert OK, 1 row affected insert into t0 values (337, 'tuple 337') Insert OK, 1 row affected insert into t0 values (338, 'tuple 338') Insert OK, 1 row affected insert into t0 values (339, 'tuple 339') Insert OK, 1 row affected select * from t0 where k0 = 335 Found 1 tuple: [335, 'tuple 335'] select * from t0 where k0 = 336 Found 1 tuple: [336, 'tuple 336'] select * from t0 where k0 = 337 Found 1 tuple: [337, 'tuple 337'] select * from t0 where k0 = 338 Found 1 tuple: [338, 'tuple 338'] select * from t0 where k0 = 339 Found 1 tuple: [339, 'tuple 339'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 17 iteration insert into t0 values (340, 'tuple 340') Insert OK, 1 row affected insert into t0 values (341, 'tuple 341') Insert OK, 1 row affected insert into t0 values (342, 'tuple 342') Insert OK, 1 row affected insert into t0 values (343, 'tuple 343') Insert OK, 1 row affected insert into t0 values (344, 'tuple 344') Insert OK, 1 row affected select * from t0 where k0 = 340 Found 1 tuple: [340, 'tuple 340'] select * from t0 where k0 = 341 Found 1 tuple: [341, 'tuple 341'] select * from t0 where k0 = 342 Found 1 tuple: [342, 'tuple 342'] select * from t0 where k0 = 343 Found 1 tuple: [343, 'tuple 343'] select * from t0 where k0 = 344 Found 1 tuple: [344, 'tuple 344'] insert into t0 values (345, 'tuple 345') Insert OK, 1 row affected insert into t0 values (346, 'tuple 346') Insert OK, 1 row affected insert into t0 values (347, 'tuple 347') Insert OK, 1 row affected insert into t0 values (348, 'tuple 348') Insert OK, 1 row affected insert into t0 values (349, 'tuple 349') Insert OK, 1 row affected select * from t0 where k0 = 345 Found 1 tuple: [345, 'tuple 345'] select * from t0 where k0 = 346 Found 1 tuple: [346, 'tuple 346'] select * from t0 where k0 = 347 Found 1 tuple: [347, 'tuple 347'] select * from t0 where k0 = 348 Found 1 tuple: [348, 'tuple 348'] select * from t0 where k0 = 349 Found 1 tuple: [349, 'tuple 349'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (350, 'tuple 350') Insert OK, 1 row affected insert into t0 values (351, 'tuple 351') Insert OK, 1 row affected insert into t0 values (352, 'tuple 352') Insert OK, 1 row affected insert into t0 values (353, 'tuple 353') Insert OK, 1 row affected insert into t0 values (354, 'tuple 354') Insert OK, 1 row affected select * from t0 where k0 = 350 Found 1 tuple: [350, 'tuple 350'] select * from t0 where k0 = 351 Found 1 tuple: [351, 'tuple 351'] select * from t0 where k0 = 352 Found 1 tuple: [352, 'tuple 352'] select * from t0 where k0 = 353 Found 1 tuple: [353, 'tuple 353'] select * from t0 where k0 = 354 Found 1 tuple: [354, 'tuple 354'] insert into t0 values (355, 'tuple 355') Insert OK, 1 row affected insert into t0 values (356, 'tuple 356') Insert OK, 1 row affected insert into t0 values (357, 'tuple 357') Insert OK, 1 row affected insert into t0 values (358, 'tuple 358') Insert OK, 1 row affected insert into t0 values (359, 'tuple 359') Insert OK, 1 row affected select * from t0 where k0 = 355 Found 1 tuple: [355, 'tuple 355'] select * from t0 where k0 = 356 Found 1 tuple: [356, 'tuple 356'] select * from t0 where k0 = 357 Found 1 tuple: [357, 'tuple 357'] select * from t0 where k0 = 358 Found 1 tuple: [358, 'tuple 358'] select * from t0 where k0 = 359 Found 1 tuple: [359, 'tuple 359'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 18 iteration insert into t0 values (360, 'tuple 360') Insert OK, 1 row affected insert into t0 values (361, 'tuple 361') Insert OK, 1 row affected insert into t0 values (362, 'tuple 362') Insert OK, 1 row affected insert into t0 values (363, 'tuple 363') Insert OK, 1 row affected insert into t0 values (364, 'tuple 364') Insert OK, 1 row affected select * from t0 where k0 = 360 Found 1 tuple: [360, 'tuple 360'] select * from t0 where k0 = 361 Found 1 tuple: [361, 'tuple 361'] select * from t0 where k0 = 362 Found 1 tuple: [362, 'tuple 362'] select * from t0 where k0 = 363 Found 1 tuple: [363, 'tuple 363'] select * from t0 where k0 = 364 Found 1 tuple: [364, 'tuple 364'] insert into t0 values (365, 'tuple 365') Insert OK, 1 row affected insert into t0 values (366, 'tuple 366') Insert OK, 1 row affected insert into t0 values (367, 'tuple 367') Insert OK, 1 row affected insert into t0 values (368, 'tuple 368') Insert OK, 1 row affected insert into t0 values (369, 'tuple 369') Insert OK, 1 row affected select * from t0 where k0 = 365 Found 1 tuple: [365, 'tuple 365'] select * from t0 where k0 = 366 Found 1 tuple: [366, 'tuple 366'] select * from t0 where k0 = 367 Found 1 tuple: [367, 'tuple 367'] select * from t0 where k0 = 368 Found 1 tuple: [368, 'tuple 368'] select * from t0 where k0 = 369 Found 1 tuple: [369, 'tuple 369'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (370, 'tuple 370') Insert OK, 1 row affected insert into t0 values (371, 'tuple 371') Insert OK, 1 row affected insert into t0 values (372, 'tuple 372') Insert OK, 1 row affected insert into t0 values (373, 'tuple 373') Insert OK, 1 row affected insert into t0 values (374, 'tuple 374') Insert OK, 1 row affected select * from t0 where k0 = 370 Found 1 tuple: [370, 'tuple 370'] select * from t0 where k0 = 371 Found 1 tuple: [371, 'tuple 371'] select * from t0 where k0 = 372 Found 1 tuple: [372, 'tuple 372'] select * from t0 where k0 = 373 Found 1 tuple: [373, 'tuple 373'] select * from t0 where k0 = 374 Found 1 tuple: [374, 'tuple 374'] insert into t0 values (375, 'tuple 375') Insert OK, 1 row affected insert into t0 values (376, 'tuple 376') Insert OK, 1 row affected insert into t0 values (377, 'tuple 377') Insert OK, 1 row affected insert into t0 values (378, 'tuple 378') Insert OK, 1 row affected insert into t0 values (379, 'tuple 379') Insert OK, 1 row affected select * from t0 where k0 = 375 Found 1 tuple: [375, 'tuple 375'] select * from t0 where k0 = 376 Found 1 tuple: [376, 'tuple 376'] select * from t0 where k0 = 377 Found 1 tuple: [377, 'tuple 377'] select * from t0 where k0 = 378 Found 1 tuple: [378, 'tuple 378'] select * from t0 where k0 = 379 Found 1 tuple: [379, 'tuple 379'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... test 19 iteration insert into t0 values (380, 'tuple 380') Insert OK, 1 row affected insert into t0 values (381, 'tuple 381') Insert OK, 1 row affected insert into t0 values (382, 'tuple 382') Insert OK, 1 row affected insert into t0 values (383, 'tuple 383') Insert OK, 1 row affected insert into t0 values (384, 'tuple 384') Insert OK, 1 row affected select * from t0 where k0 = 380 Found 1 tuple: [380, 'tuple 380'] select * from t0 where k0 = 381 Found 1 tuple: [381, 'tuple 381'] select * from t0 where k0 = 382 Found 1 tuple: [382, 'tuple 382'] select * from t0 where k0 = 383 Found 1 tuple: [383, 'tuple 383'] select * from t0 where k0 = 384 Found 1 tuple: [384, 'tuple 384'] insert into t0 values (385, 'tuple 385') Insert OK, 1 row affected insert into t0 values (386, 'tuple 386') Insert OK, 1 row affected insert into t0 values (387, 'tuple 387') Insert OK, 1 row affected insert into t0 values (388, 'tuple 388') Insert OK, 1 row affected insert into t0 values (389, 'tuple 389') Insert OK, 1 row affected select * from t0 where k0 = 385 Found 1 tuple: [385, 'tuple 385'] select * from t0 where k0 = 386 Found 1 tuple: [386, 'tuple 386'] select * from t0 where k0 = 387 Found 1 tuple: [387, 'tuple 387'] select * from t0 where k0 = 388 Found 1 tuple: [388, 'tuple 388'] select * from t0 where k0 = 389 Found 1 tuple: [389, 'tuple 389'] swap servers reload configuration --- ok ... reload configuration --- ok ... insert into t0 values (390, 'tuple 390') Insert OK, 1 row affected insert into t0 values (391, 'tuple 391') Insert OK, 1 row affected insert into t0 values (392, 'tuple 392') Insert OK, 1 row affected insert into t0 values (393, 'tuple 393') Insert OK, 1 row affected insert into t0 values (394, 'tuple 394') Insert OK, 1 row affected select * from t0 where k0 = 390 Found 1 tuple: [390, 'tuple 390'] select * from t0 where k0 = 391 Found 1 tuple: [391, 'tuple 391'] select * from t0 where k0 = 392 Found 1 tuple: [392, 'tuple 392'] select * from t0 where k0 = 393 Found 1 tuple: [393, 'tuple 393'] select * from t0 where k0 = 394 Found 1 tuple: [394, 'tuple 394'] insert into t0 values (395, 'tuple 395') Insert OK, 1 row affected insert into t0 values (396, 'tuple 396') Insert OK, 1 row affected insert into t0 values (397, 'tuple 397') Insert OK, 1 row affected insert into t0 values (398, 'tuple 398') Insert OK, 1 row affected insert into t0 values (399, 'tuple 399') Insert OK, 1 row affected select * from t0 where k0 = 395 Found 1 tuple: [395, 'tuple 395'] select * from t0 where k0 = 396 Found 1 tuple: [396, 'tuple 396'] select * from t0 where k0 = 397 Found 1 tuple: [397, 'tuple 397'] select * from t0 where k0 = 398 Found 1 tuple: [398, 'tuple 398'] select * from t0 where k0 = 399 Found 1 tuple: [399, 'tuple 399'] rollback servers configuration reload configuration --- ok ... reload configuration --- ok ... tarantool-1.5.1.218.g1a69fd6/test/replication/hot_standby.test0000664000000000000000000000360512231715257022500 0ustar rootroot# encoding: tarantool import os import time from lib.tarantool_server import TarantoolServer # master server master = server master_sql = master.sql # hot standby server hot_standby = TarantoolServer() hot_standby.deploy("replication/cfg/hot_standby.cfg", hot_standby.find_exe(self.args.builddir), os.path.join(self.args.vardir, "hot_standby"), need_init=False) hot_standby_sql = hot_standby.sql # replica server replica = TarantoolServer() replica.deploy("replication/cfg/replica.cfg", replica.find_exe(self.args.builddir), os.path.join(self.args.vardir, "replica")) replica_sql = replica.sql # Begin tuple id id = 1 print """ # Insert 10 tuples to master """ for i in range(id, id + 10): exec master_sql "insert into t0 values (%d, 'the tuple %d')" % (i, i) print """ # Select 10 tuples from master """ for i in range(id, id + 10): exec master_sql "select * from t0 where k0 = %d" % i print """ # Select 10 tuples from replica """ replica.wait_lsn(11) for i in range(id, id + 10): exec replica_sql "select * from t0 where k0 = %d" % i print """ # Shutdown master server (now the hot_standby must be a primary server) """ server.stop() id += 10 # White while hot_standby server not bind masters ports time.sleep(0.2) print """ # Insert 10 tuples to hot_standby """ for i in range(id, id + 10): exec hot_standby_sql "insert into t0 values (%d, 'the tuple %d')" % (i, i) print """ # Select 10 tuples from hot_standby """ for i in range(id, id + 10): exec hot_standby_sql "select * from t0 where k0 = %d" % i print """ # Select 10 tuples from replica """ replica.wait_lsn(21) for i in range(id, id + 10): exec replica_sql "select * from t0 where k0 = %d" % i # Cleanup. hot_standby.stop() hot_standby.cleanup(True) replica.stop() replica.cleanup(True) server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/replication/consistent.result0000664000000000000000000004003112231715257022704 0ustar rootrootinsert to master [0, 10) entries insert into t0 values (0, 'mater 0') Insert OK, 1 row affected insert into t0 values (1, 'mater 1') Insert OK, 1 row affected insert into t0 values (2, 'mater 2') Insert OK, 1 row affected insert into t0 values (3, 'mater 3') Insert OK, 1 row affected insert into t0 values (4, 'mater 4') Insert OK, 1 row affected insert into t0 values (5, 'mater 5') Insert OK, 1 row affected insert into t0 values (6, 'mater 6') Insert OK, 1 row affected insert into t0 values (7, 'mater 7') Insert OK, 1 row affected insert into t0 values (8, 'mater 8') Insert OK, 1 row affected insert into t0 values (9, 'mater 9') Insert OK, 1 row affected select from replica [0, 10) entries select * from t0 where k0 = 0 Found 1 tuple: [0, 'mater 0'] select * from t0 where k0 = 1 Found 1 tuple: [1, 'mater 1'] select * from t0 where k0 = 2 Found 1 tuple: [2, 'mater 2'] select * from t0 where k0 = 3 Found 1 tuple: [3, 'mater 3'] select * from t0 where k0 = 4 Found 1 tuple: [4, 'mater 4'] select * from t0 where k0 = 5 Found 1 tuple: [5, 'mater 5'] select * from t0 where k0 = 6 Found 1 tuple: [6, 'mater 6'] select * from t0 where k0 = 7 Found 1 tuple: [7, 'mater 7'] select * from t0 where k0 = 8 Found 1 tuple: [8, 'mater 8'] select * from t0 where k0 = 9 Found 1 tuple: [9, 'mater 9'] master lsn = 11 replica lsn = 11 # # mater lsn > replica lsn # # reconfigure replica to master reload configuration --- ok ... insert to master [10, 20) entries insert into t0 values (10, 'mater 10') Insert OK, 1 row affected insert into t0 values (11, 'mater 11') Insert OK, 1 row affected insert into t0 values (12, 'mater 12') Insert OK, 1 row affected insert into t0 values (13, 'mater 13') Insert OK, 1 row affected insert into t0 values (14, 'mater 14') Insert OK, 1 row affected insert into t0 values (15, 'mater 15') Insert OK, 1 row affected insert into t0 values (16, 'mater 16') Insert OK, 1 row affected insert into t0 values (17, 'mater 17') Insert OK, 1 row affected insert into t0 values (18, 'mater 18') Insert OK, 1 row affected insert into t0 values (19, 'mater 19') Insert OK, 1 row affected select from master [10, 20) entries select * from t0 where k0 = 10 Found 1 tuple: [10, 'mater 10'] select * from t0 where k0 = 11 Found 1 tuple: [11, 'mater 11'] select * from t0 where k0 = 12 Found 1 tuple: [12, 'mater 12'] select * from t0 where k0 = 13 Found 1 tuple: [13, 'mater 13'] select * from t0 where k0 = 14 Found 1 tuple: [14, 'mater 14'] select * from t0 where k0 = 15 Found 1 tuple: [15, 'mater 15'] select * from t0 where k0 = 16 Found 1 tuple: [16, 'mater 16'] select * from t0 where k0 = 17 Found 1 tuple: [17, 'mater 17'] select * from t0 where k0 = 18 Found 1 tuple: [18, 'mater 18'] select * from t0 where k0 = 19 Found 1 tuple: [19, 'mater 19'] insert to replica [10, 15) entries insert into t0 values (10, 'replica 10') Insert OK, 1 row affected insert into t0 values (11, 'replica 11') Insert OK, 1 row affected insert into t0 values (12, 'replica 12') Insert OK, 1 row affected insert into t0 values (13, 'replica 13') Insert OK, 1 row affected insert into t0 values (14, 'replica 14') Insert OK, 1 row affected select from replica [10, 15) entries select * from t0 where k0 = 10 Found 1 tuple: [10, 'replica 10'] select * from t0 where k0 = 11 Found 1 tuple: [11, 'replica 11'] select * from t0 where k0 = 12 Found 1 tuple: [12, 'replica 12'] select * from t0 where k0 = 13 Found 1 tuple: [13, 'replica 13'] select * from t0 where k0 = 14 Found 1 tuple: [14, 'replica 14'] master lsn = 21 replica lsn = 16 # rollback replica reload configuration --- ok ... select from replica [10, 20) entries select * from t0 where k0 = 10 Found 1 tuple: [10, 'replica 10'] select * from t0 where k0 = 11 Found 1 tuple: [11, 'replica 11'] select * from t0 where k0 = 12 Found 1 tuple: [12, 'replica 12'] select * from t0 where k0 = 13 Found 1 tuple: [13, 'replica 13'] select * from t0 where k0 = 14 Found 1 tuple: [14, 'replica 14'] select * from t0 where k0 = 15 Found 1 tuple: [15, 'mater 15'] select * from t0 where k0 = 16 Found 1 tuple: [16, 'mater 16'] select * from t0 where k0 = 17 Found 1 tuple: [17, 'mater 17'] select * from t0 where k0 = 18 Found 1 tuple: [18, 'mater 18'] select * from t0 where k0 = 19 Found 1 tuple: [19, 'mater 19'] master lsn = 21 replica lsn = 21 # # master lsn == replica lsn # # reconfigure replica to master reload configuration --- ok ... insert to master [20, 30) entries insert into t0 values (20, 'mater 20') Insert OK, 1 row affected insert into t0 values (21, 'mater 21') Insert OK, 1 row affected insert into t0 values (22, 'mater 22') Insert OK, 1 row affected insert into t0 values (23, 'mater 23') Insert OK, 1 row affected insert into t0 values (24, 'mater 24') Insert OK, 1 row affected insert into t0 values (25, 'mater 25') Insert OK, 1 row affected insert into t0 values (26, 'mater 26') Insert OK, 1 row affected insert into t0 values (27, 'mater 27') Insert OK, 1 row affected insert into t0 values (28, 'mater 28') Insert OK, 1 row affected insert into t0 values (29, 'mater 29') Insert OK, 1 row affected select from master [20, 30) entries select * from t0 where k0 = 20 Found 1 tuple: [20, 'mater 20'] select * from t0 where k0 = 21 Found 1 tuple: [21, 'mater 21'] select * from t0 where k0 = 22 Found 1 tuple: [22, 'mater 22'] select * from t0 where k0 = 23 Found 1 tuple: [23, 'mater 23'] select * from t0 where k0 = 24 Found 1 tuple: [24, 'mater 24'] select * from t0 where k0 = 25 Found 1 tuple: [25, 'mater 25'] select * from t0 where k0 = 26 Found 1 tuple: [26, 'mater 26'] select * from t0 where k0 = 27 Found 1 tuple: [27, 'mater 27'] select * from t0 where k0 = 28 Found 1 tuple: [28, 'mater 28'] select * from t0 where k0 = 29 Found 1 tuple: [29, 'mater 29'] insert to replica [20, 30) entries insert into t0 values (20, 'replica 20') Insert OK, 1 row affected insert into t0 values (21, 'replica 21') Insert OK, 1 row affected insert into t0 values (22, 'replica 22') Insert OK, 1 row affected insert into t0 values (23, 'replica 23') Insert OK, 1 row affected insert into t0 values (24, 'replica 24') Insert OK, 1 row affected insert into t0 values (25, 'replica 25') Insert OK, 1 row affected insert into t0 values (26, 'replica 26') Insert OK, 1 row affected insert into t0 values (27, 'replica 27') Insert OK, 1 row affected insert into t0 values (28, 'replica 28') Insert OK, 1 row affected insert into t0 values (29, 'replica 29') Insert OK, 1 row affected select from replica [20, 30) entries select * from t0 where k0 = 20 Found 1 tuple: [20, 'replica 20'] select * from t0 where k0 = 21 Found 1 tuple: [21, 'replica 21'] select * from t0 where k0 = 22 Found 1 tuple: [22, 'replica 22'] select * from t0 where k0 = 23 Found 1 tuple: [23, 'replica 23'] select * from t0 where k0 = 24 Found 1 tuple: [24, 'replica 24'] select * from t0 where k0 = 25 Found 1 tuple: [25, 'replica 25'] select * from t0 where k0 = 26 Found 1 tuple: [26, 'replica 26'] select * from t0 where k0 = 27 Found 1 tuple: [27, 'replica 27'] select * from t0 where k0 = 28 Found 1 tuple: [28, 'replica 28'] select * from t0 where k0 = 29 Found 1 tuple: [29, 'replica 29'] master lsn = 31 replica lsn = 31 # rollback replica reload configuration --- ok ... select from replica [20, 30) entries select * from t0 where k0 = 20 Found 1 tuple: [20, 'replica 20'] select * from t0 where k0 = 21 Found 1 tuple: [21, 'replica 21'] select * from t0 where k0 = 22 Found 1 tuple: [22, 'replica 22'] select * from t0 where k0 = 23 Found 1 tuple: [23, 'replica 23'] select * from t0 where k0 = 24 Found 1 tuple: [24, 'replica 24'] select * from t0 where k0 = 25 Found 1 tuple: [25, 'replica 25'] select * from t0 where k0 = 26 Found 1 tuple: [26, 'replica 26'] select * from t0 where k0 = 27 Found 1 tuple: [27, 'replica 27'] select * from t0 where k0 = 28 Found 1 tuple: [28, 'replica 28'] select * from t0 where k0 = 29 Found 1 tuple: [29, 'replica 29'] master lsn = 31 replica lsn = 31 # # mater lsn < replica lsn # #reconfigure replica to master reload configuration --- ok ... insert to master [30, 40) entries insert into t0 values (30, 'mater 30') Insert OK, 1 row affected insert into t0 values (31, 'mater 31') Insert OK, 1 row affected insert into t0 values (32, 'mater 32') Insert OK, 1 row affected insert into t0 values (33, 'mater 33') Insert OK, 1 row affected insert into t0 values (34, 'mater 34') Insert OK, 1 row affected insert into t0 values (35, 'mater 35') Insert OK, 1 row affected insert into t0 values (36, 'mater 36') Insert OK, 1 row affected insert into t0 values (37, 'mater 37') Insert OK, 1 row affected insert into t0 values (38, 'mater 38') Insert OK, 1 row affected insert into t0 values (39, 'mater 39') Insert OK, 1 row affected select from master [30, 40) entries select * from t0 where k0 = 30 Found 1 tuple: [30, 'mater 30'] select * from t0 where k0 = 31 Found 1 tuple: [31, 'mater 31'] select * from t0 where k0 = 32 Found 1 tuple: [32, 'mater 32'] select * from t0 where k0 = 33 Found 1 tuple: [33, 'mater 33'] select * from t0 where k0 = 34 Found 1 tuple: [34, 'mater 34'] select * from t0 where k0 = 35 Found 1 tuple: [35, 'mater 35'] select * from t0 where k0 = 36 Found 1 tuple: [36, 'mater 36'] select * from t0 where k0 = 37 Found 1 tuple: [37, 'mater 37'] select * from t0 where k0 = 38 Found 1 tuple: [38, 'mater 38'] select * from t0 where k0 = 39 Found 1 tuple: [39, 'mater 39'] insert to replica [30, 50) entries insert into t0 values (30, 'replica 30') Insert OK, 1 row affected insert into t0 values (31, 'replica 31') Insert OK, 1 row affected insert into t0 values (32, 'replica 32') Insert OK, 1 row affected insert into t0 values (33, 'replica 33') Insert OK, 1 row affected insert into t0 values (34, 'replica 34') Insert OK, 1 row affected insert into t0 values (35, 'replica 35') Insert OK, 1 row affected insert into t0 values (36, 'replica 36') Insert OK, 1 row affected insert into t0 values (37, 'replica 37') Insert OK, 1 row affected insert into t0 values (38, 'replica 38') Insert OK, 1 row affected insert into t0 values (39, 'replica 39') Insert OK, 1 row affected insert into t0 values (40, 'replica 40') Insert OK, 1 row affected insert into t0 values (41, 'replica 41') Insert OK, 1 row affected insert into t0 values (42, 'replica 42') Insert OK, 1 row affected insert into t0 values (43, 'replica 43') Insert OK, 1 row affected insert into t0 values (44, 'replica 44') Insert OK, 1 row affected insert into t0 values (45, 'replica 45') Insert OK, 1 row affected insert into t0 values (46, 'replica 46') Insert OK, 1 row affected insert into t0 values (47, 'replica 47') Insert OK, 1 row affected insert into t0 values (48, 'replica 48') Insert OK, 1 row affected insert into t0 values (49, 'replica 49') Insert OK, 1 row affected select from replica [30, 50) entries select * from t0 where k0 = 30 Found 1 tuple: [30, 'replica 30'] select * from t0 where k0 = 31 Found 1 tuple: [31, 'replica 31'] select * from t0 where k0 = 32 Found 1 tuple: [32, 'replica 32'] select * from t0 where k0 = 33 Found 1 tuple: [33, 'replica 33'] select * from t0 where k0 = 34 Found 1 tuple: [34, 'replica 34'] select * from t0 where k0 = 35 Found 1 tuple: [35, 'replica 35'] select * from t0 where k0 = 36 Found 1 tuple: [36, 'replica 36'] select * from t0 where k0 = 37 Found 1 tuple: [37, 'replica 37'] select * from t0 where k0 = 38 Found 1 tuple: [38, 'replica 38'] select * from t0 where k0 = 39 Found 1 tuple: [39, 'replica 39'] select * from t0 where k0 = 40 Found 1 tuple: [40, 'replica 40'] select * from t0 where k0 = 41 Found 1 tuple: [41, 'replica 41'] select * from t0 where k0 = 42 Found 1 tuple: [42, 'replica 42'] select * from t0 where k0 = 43 Found 1 tuple: [43, 'replica 43'] select * from t0 where k0 = 44 Found 1 tuple: [44, 'replica 44'] select * from t0 where k0 = 45 Found 1 tuple: [45, 'replica 45'] select * from t0 where k0 = 46 Found 1 tuple: [46, 'replica 46'] select * from t0 where k0 = 47 Found 1 tuple: [47, 'replica 47'] select * from t0 where k0 = 48 Found 1 tuple: [48, 'replica 48'] select * from t0 where k0 = 49 Found 1 tuple: [49, 'replica 49'] master lsn = 41 replica lsn = 51 # rollback replica reload configuration --- ok ... select from replica [30, 50) entries select * from t0 where k0 = 30 Found 1 tuple: [30, 'replica 30'] select * from t0 where k0 = 31 Found 1 tuple: [31, 'replica 31'] select * from t0 where k0 = 32 Found 1 tuple: [32, 'replica 32'] select * from t0 where k0 = 33 Found 1 tuple: [33, 'replica 33'] select * from t0 where k0 = 34 Found 1 tuple: [34, 'replica 34'] select * from t0 where k0 = 35 Found 1 tuple: [35, 'replica 35'] select * from t0 where k0 = 36 Found 1 tuple: [36, 'replica 36'] select * from t0 where k0 = 37 Found 1 tuple: [37, 'replica 37'] select * from t0 where k0 = 38 Found 1 tuple: [38, 'replica 38'] select * from t0 where k0 = 39 Found 1 tuple: [39, 'replica 39'] select * from t0 where k0 = 40 Found 1 tuple: [40, 'replica 40'] select * from t0 where k0 = 41 Found 1 tuple: [41, 'replica 41'] select * from t0 where k0 = 42 Found 1 tuple: [42, 'replica 42'] select * from t0 where k0 = 43 Found 1 tuple: [43, 'replica 43'] select * from t0 where k0 = 44 Found 1 tuple: [44, 'replica 44'] select * from t0 where k0 = 45 Found 1 tuple: [45, 'replica 45'] select * from t0 where k0 = 46 Found 1 tuple: [46, 'replica 46'] select * from t0 where k0 = 47 Found 1 tuple: [47, 'replica 47'] select * from t0 where k0 = 48 Found 1 tuple: [48, 'replica 48'] select * from t0 where k0 = 49 Found 1 tuple: [49, 'replica 49'] insert to master [40, 60) entries insert into t0 values (40, 'master 40') Insert OK, 1 row affected insert into t0 values (41, 'master 41') Insert OK, 1 row affected insert into t0 values (42, 'master 42') Insert OK, 1 row affected insert into t0 values (43, 'master 43') Insert OK, 1 row affected insert into t0 values (44, 'master 44') Insert OK, 1 row affected insert into t0 values (45, 'master 45') Insert OK, 1 row affected insert into t0 values (46, 'master 46') Insert OK, 1 row affected insert into t0 values (47, 'master 47') Insert OK, 1 row affected insert into t0 values (48, 'master 48') Insert OK, 1 row affected insert into t0 values (49, 'master 49') Insert OK, 1 row affected insert into t0 values (50, 'master 50') Insert OK, 1 row affected insert into t0 values (51, 'master 51') Insert OK, 1 row affected insert into t0 values (52, 'master 52') Insert OK, 1 row affected insert into t0 values (53, 'master 53') Insert OK, 1 row affected insert into t0 values (54, 'master 54') Insert OK, 1 row affected insert into t0 values (55, 'master 55') Insert OK, 1 row affected insert into t0 values (56, 'master 56') Insert OK, 1 row affected insert into t0 values (57, 'master 57') Insert OK, 1 row affected insert into t0 values (58, 'master 58') Insert OK, 1 row affected insert into t0 values (59, 'master 59') Insert OK, 1 row affected select from replica [40, 60) entries select * from t0 where k0 = 40 Found 1 tuple: [40, 'replica 40'] select * from t0 where k0 = 41 Found 1 tuple: [41, 'replica 41'] select * from t0 where k0 = 42 Found 1 tuple: [42, 'replica 42'] select * from t0 where k0 = 43 Found 1 tuple: [43, 'replica 43'] select * from t0 where k0 = 44 Found 1 tuple: [44, 'replica 44'] select * from t0 where k0 = 45 Found 1 tuple: [45, 'replica 45'] select * from t0 where k0 = 46 Found 1 tuple: [46, 'replica 46'] select * from t0 where k0 = 47 Found 1 tuple: [47, 'replica 47'] select * from t0 where k0 = 48 Found 1 tuple: [48, 'replica 48'] select * from t0 where k0 = 49 Found 1 tuple: [49, 'replica 49'] select * from t0 where k0 = 50 Found 1 tuple: [50, 'master 50'] select * from t0 where k0 = 51 Found 1 tuple: [51, 'master 51'] select * from t0 where k0 = 52 Found 1 tuple: [52, 'master 52'] select * from t0 where k0 = 53 Found 1 tuple: [53, 'master 53'] select * from t0 where k0 = 54 Found 1 tuple: [54, 'master 54'] select * from t0 where k0 = 55 Found 1 tuple: [55, 'master 55'] select * from t0 where k0 = 56 Found 1 tuple: [56, 'master 56'] select * from t0 where k0 = 57 Found 1 tuple: [57, 'master 57'] select * from t0 where k0 = 58 Found 1 tuple: [58, 'master 58'] select * from t0 where k0 = 59 Found 1 tuple: [59, 'master 59'] master lsn = 61 replica lsn = 61 insert into t0 values (0, 'replica is read only') An error occurred: ER_NONMASTER, 'Can't modify data on a replication slave. My master is: 127.0.0.1:33017' tarantool-1.5.1.218.g1a69fd6/test/replication/memcached.test0000664000000000000000000000646212231715257022074 0ustar rootroot# encoding: tarantool import os import sys import time import yaml from lib.memcached_connection import MemcachedConnection from lib.tarantool_server import TarantoolServer sonet = """The expense of spirit in a waste of shame Is lust in action; and till action, lust""".split('\n') master = server master_memcached = master.memcached replica = TarantoolServer() replica.deploy("replication/cfg/replica.cfg", replica.find_exe(self.args.builddir), os.path.join(self.args.vardir, "replica")) replica_memcached = replica.memcached ################################### def get_lsn(serv): serv_admin = serv.admin resp = exec serv_admin silent "lua box.info.lsn" return yaml.load(resp)[0] def wait(serv_master = master, serv_replica = replica): lsn = get_lsn(serv_master) serv_replica.wait_lsn(lsn) return lsn def get_memcached_len(serv): serv_admin = serv.admin resp = exec serv_admin silent "lua box.space[box.cfg.memcached_space]:len()" return yaml.load(resp)[0] def wait_for_empty_space(serv): serv_admin = serv.admin while True: if get_memcached_len(serv) == 0: return time.sleep(0.01) ################################### print """# set initial k-v pairs""" for i in xrange(10): exec master_memcached silent "set %d 0 0 5\r\ngood%d\r\n" % (i, i) print """# wait and get last k-v pair from replica""" wait() exec replica_memcached "get 9\r\n" print """# make multiple cnanges with master""" answer = exec master_memcached silent "gets 9\r\n" cas = int(answer.split()[4]) exec master_memcached silent "append 1 0 0 3\r\nafk\r\n" exec master_memcached silent "prepend 2 0 0 3\r\nkfa\r\n" exec master_memcached silent "set 3 0 0 2\r\n80\r\n" exec master_memcached silent "set 4 0 0 2\r\n60\r\n" exec master_memcached silent "delete 6\r\n" exec master_memcached silent "replace 7 0 0 %d\r\n%s\r\n" % (len(sonet[0]), sonet[0]) exec master_memcached silent "replace 8 0 0 %d\r\n%s\r\n" % (len(sonet[1]), sonet[1]) exec master_memcached silent "cas 9 0 0 %d %d\r\n%s\r\n" % (len(sonet[2]), cas, sonet[2]) exec master_memcached silent "add 10 0 0 %d\r\n%s\r\n" % (len(sonet[3]), sonet[3]) exec master_memcached silent "incr 3 15\r\n" exec master_memcached silent "decr 4 15\r\n" print """# wait and get k-v's from replicas""" wait() exec replica_memcached "get 1 2 3 4 5 7 8 9 10\r\n" print """# get deleted value""" exec replica_memcached "get 6\r\n" print """# flush all k-v on master and try to get them from replica""" exec master_memcached silent "flush_all\r\n" wait_for_empty_space(replica) exec replica_memcached "get 10\r\n" print """# check that expiration is working properly on replica""" exec master_memcached silent "set 1 0 1 %d\r\n%s\r\n" % (len(sonet[0]), sonet[0]) lsn = wait() exec replica_memcached "get 1\r\n" replica.wait_lsn(lsn + 1) exec replica_memcached "get 1\r\n" print """# check that expiration is working properly, when replica becomes master""" exec master_memcached silent "set 1 0 1 %d\r\n%s\r\n" % (len(sonet[0]), sonet[0]) lsn = wait() replica.reconfigure("replication/cfg/replica_to_master.cfg") exec replica_memcached "get 1\r\n" replica.wait_lsn(lsn + 1) exec replica_memcached "get 1\r\n" # restore default suite config replica.stop() replica.cleanup(True) master.stop() master.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/replication/consistent.test0000664000000000000000000001123012231715257022344 0ustar rootroot# encoding: tarantool import os import time from lib.tarantool_server import TarantoolServer ID_BEGIN = 0 ID_STEP = 10 def insert_tuples(server, begin, end, msg = "tuple"): server_sql = server.sql for i in range(begin, end): exec server_sql "insert into t0 values (%d, '%s %d')" % (i, msg, i) def select_tuples(server, begin, end): server_sql = server.sql # the last lsn is end id + 1 server.wait_lsn(end + 1) for i in range(begin, end): exec server_sql "select * from t0 where k0 = %d" % i # master server master = server # replica server replica = TarantoolServer() replica.deploy("replication/cfg/replica.cfg", replica.find_exe(self.args.builddir), os.path.join(self.args.vardir, "replica")) # Id counter id = 0 print "insert to master [%d, %d) entries" % (id, id + ID_STEP) insert_tuples(master, id, id + ID_STEP, "mater") print "select from replica [%d, %d) entries" % (id, id + ID_STEP) select_tuples(replica, id, id + ID_STEP) id += ID_STEP print "master lsn = %s" % master.get_param("lsn") print "replica lsn = %s" % replica.get_param("lsn") print """ # # mater lsn > replica lsn # """ print """ # reconfigure replica to master """ replica.reconfigure("replication/cfg/replica_to_master.cfg") print "insert to master [%d, %d) entries" % (id, id + ID_STEP) insert_tuples(master, id, id + ID_STEP, "mater") print "select from master [%d, %d) entries" % (id, id + ID_STEP) select_tuples(master, id, id + ID_STEP) print "insert to replica [%d, %d) entries" % (id, id + (ID_STEP / 2)) insert_tuples(replica, id, id + (ID_STEP / 2), "replica") print "select from replica [%d, %d) entries" % (id, id + (ID_STEP / 2)) select_tuples(replica, id, id + (ID_STEP / 2)) print "master lsn = %s" % master.get_param("lsn") print "replica lsn = %s" % replica.get_param("lsn") print """ # rollback replica """ replica.reconfigure("replication/cfg/replica.cfg") print "select from replica [%d, %d) entries" % (id, id + ID_STEP) select_tuples(replica, id, id + ID_STEP) id += ID_STEP print "master lsn = %s" % master.get_param("lsn") print "replica lsn = %s" % replica.get_param("lsn") print """ # # master lsn == replica lsn # """ print """ # reconfigure replica to master """ replica.reconfigure("replication/cfg/replica_to_master.cfg") print "insert to master [%d, %d) entries" % (id, id + ID_STEP) insert_tuples(master, id, id + ID_STEP, "mater") print "select from master [%d, %d) entries" % (id, id + ID_STEP) select_tuples(master, id, id + ID_STEP) print "insert to replica [%d, %d) entries" % (id, id + ID_STEP) insert_tuples(replica, id, id + ID_STEP, "replica") print "select from replica [%d, %d) entries" % (id, id + ID_STEP) select_tuples(replica, id, id + ID_STEP) print "master lsn = %s" % master.get_param("lsn") print "replica lsn = %s" % replica.get_param("lsn") print """ # rollback replica """ replica.reconfigure("replication/cfg/replica.cfg") print "select from replica [%d, %d) entries" % (id, id + ID_STEP) select_tuples(replica, id, id + ID_STEP) id += ID_STEP print "master lsn = %s" % master.get_param("lsn") print "replica lsn = %s" % replica.get_param("lsn") print """ # # mater lsn < replica lsn # """ print """ #reconfigure replica to master """ replica.reconfigure("replication/cfg/replica_to_master.cfg") print "insert to master [%d, %d) entries" % (id, id + ID_STEP) insert_tuples(master, id, id + ID_STEP, "mater") print "select from master [%d, %d) entries" % (id, id + ID_STEP) select_tuples(master, id, id + ID_STEP) print "insert to replica [%d, %d) entries" % (id, id + (ID_STEP * 2)) insert_tuples(replica, id, id + (ID_STEP * 2), "replica") print "select from replica [%d, %d) entries" % (id, id + (ID_STEP * 2)) select_tuples(replica, id, id + (ID_STEP * 2)) print "master lsn = %s" % master.get_param("lsn") print "replica lsn = %s" % replica.get_param("lsn") print """ # rollback replica """ replica.reconfigure("replication/cfg/replica.cfg") print "select from replica [%d, %d) entries" % (id, id + (ID_STEP * 2)) select_tuples(replica, id, id + (ID_STEP * 2)) id += ID_STEP print "insert to master [%d, %d) entries" % (id, id + (ID_STEP * 2)) insert_tuples(master, id, id + (ID_STEP * 2), "master") print "select from replica [%d, %d) entries" % (id, id + (ID_STEP * 2)) select_tuples(replica, id, id + (ID_STEP * 2)) print "master lsn = %s" % master.get_param("lsn") print "replica lsn = %s" % replica.get_param("lsn") # Test that a replica replies with master connection URL on # update requests. replica_sql = replica.sql exec replica_sql "insert into t0 values (0, 'replica is read only')" # Cleanup. replica.stop() replica.cleanup(True) server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/replication/cfg/0000775000000000000000000000000012231715257020014 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/replication/cfg/replica.cfg0000664000000000000000000000076112231715257022120 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "tarantool.pid" logger="cat - >> tarantool.log" bind_ipaddr="INADDR_ANY" custom_proc_title="replica" primary_port = 33113 secondary_port = 33114 admin_port = 33115 memcached_port = 33116 replication_port=33117 replication_source = 127.0.0.1:33017 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" memcached_space = 2 memcached_expire=true tarantool-1.5.1.218.g1a69fd6/test/replication/cfg/master_to_replica.cfg0000664000000000000000000000076312231715257024177 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "tarantool.pid" logger="cat - >> tarantool.log" bind_ipaddr="INADDR_ANY" custom_proc_title="master" primary_port = 33013 secondary_port = 33014 admin_port = 33015 memcached_port = 33016 replication_port=33017 replication_source = "127.0.0.1:33117" space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" memcached_space = 2 memcached_expire=true tarantool-1.5.1.218.g1a69fd6/test/replication/cfg/hot_standby.cfg0000664000000000000000000000075612231715257023023 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "tarantool.pid" logger="cat - >> tarantool.log" bind_ipaddr="INADDR_ANY" custom_proc_title="hot_standby" wal_dir="../" snap_dir="../" primary_port = 33013 secondary_port = 33024 admin_port = 33025 memcached_port = 33026 replication_port=33017 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" memcached_space = 2 memcached_expire=true tarantool-1.5.1.218.g1a69fd6/test/replication/cfg/master.cfg0000664000000000000000000000071412231715257021772 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "tarantool.pid" logger="cat - >> tarantool.log" bind_ipaddr="INADDR_ANY" custom_proc_title="master" primary_port = 33013 secondary_port = 33014 admin_port = 33015 memcached_port = 33016 replication_port = 33017 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" memcached_space = 2 memcached_expire=true tarantool-1.5.1.218.g1a69fd6/test/replication/cfg/replica_to_master.cfg0000664000000000000000000000071512231715257024174 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "tarantool.pid" logger="cat - >> tarantool.log" bind_ipaddr="INADDR_ANY" custom_proc_title="replica" primary_port = 33113 secondary_port = 33114 admin_port = 33115 memcached_port = 33116 replication_port = 33117 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" memcached_space = 2 memcached_expire=true tarantool-1.5.1.218.g1a69fd6/test/replication/swap.test0000664000000000000000000000411312231715257021127 0ustar rootroot# encoding: tarantool import os import time from lib.tarantool_server import TarantoolServer REPEAT = 20 ID_BEGIN = 0 ID_STEP = 5 def insert_tuples(server, begin, end, msg = "tuple"): server_sql = server.sql for i in range(begin, end): exec server_sql "insert into t0 values (%d, '%s %d')" % (i, msg, i) def select_tuples(server, begin, end): server_sql = server.sql # the last lsn is end id + 1 server.wait_lsn(end + 1) for i in range(begin, end): exec server_sql "select * from t0 where k0 = %d" % i # master server master = server # replica server replica = TarantoolServer() replica.deploy("replication/cfg/replica.cfg", replica.find_exe(self.args.builddir), os.path.join(self.args.vardir, "replica")) id = ID_BEGIN for i in range(REPEAT): print "test %d iteration" % i # insert to master insert_tuples(master, id, id + ID_STEP) # select from replica select_tuples(replica, id, id + ID_STEP) id += ID_STEP # insert to master insert_tuples(master, id, id + ID_STEP) # select from replica select_tuples(replica, id, id + ID_STEP) id += ID_STEP print "swap servers" # reconfigure replica to master replica.reconfigure("replication/cfg/replica_to_master.cfg", silent = False) # reconfigure master to replica master.reconfigure("replication/cfg/master_to_replica.cfg", silent = False) # insert to replica insert_tuples(replica, id, id + ID_STEP) # select from master select_tuples(master, id, id + ID_STEP) id += ID_STEP # insert to replica insert_tuples(replica, id, id + ID_STEP) # select from master select_tuples(master, id, id + ID_STEP) id += ID_STEP print "rollback servers configuration" # reconfigure replica to master master.reconfigure("replication/cfg/master.cfg", silent = False) # reconfigure master to replica replica.reconfigure("replication/cfg/replica.cfg", silent = False) # Cleanup. replica.stop() replica.cleanup(True) server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/CMakeLists.txt0000664000000000000000000000220412242653271017501 0ustar rootrootenable_tnt_compile_flags() add_compile_flags("C;CXX" "-Wno-unused-parameter") add_custom_target(test COMMAND ${PROJECT_SOURCE_DIR}/test/test-run.py --builddir=${PROJECT_BINARY_DIR} --vardir=${PROJECT_BINARY_DIR}/test/var) add_custom_target(test-force COMMAND ${PROJECT_SOURCE_DIR}/test/test-run.py --builddir=${PROJECT_BINARY_DIR} --force --vardir=${PROJECT_BINARY_DIR}/test/var) add_subdirectory(unit) add_subdirectory(box) add_subdirectory(connector_c) macro(install_cfg type_cfg dest) install (FILES ${CMAKE_SOURCE_DIR}/test/share/tarantool_${type_cfg}.cfg DESTINATION ${dest} RENAME "tarantool.cfg") endmacro(install_cfg) if (ENABLE_RPM) install_cfg(rpm ${CMAKE_SYSCONF_DIR}/tarantool/) install (FILES ${CMAKE_SOURCE_DIR}/test/box/00000000000000000001.snap DESTINATION share/tarantool) else() if (TARGET_OS_DARWIN) install_cfg(dmg ${CMAKE_SYSCONF_DIR}) else() install_cfg(tgz ${CMAKE_SYSCONF_DIR}) endif() install (FILES ${CMAKE_SOURCE_DIR}/test/box/00000000000000000001.snap DESTINATION "${CMAKE_LOCALSTATE_DIR}/lib/tarantool") endif() tarantool-1.5.1.218.g1a69fd6/test/box/0000775000000000000000000000000012242653271015533 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/box/cmake_install.cmake0000664000000000000000000000225412213333035021335 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/box # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.pg.result0000664000000000000000000000474412231715257021057 0ustar rootrootlua c = box.net.sql.connect('abcd') --- error: '[string "-- sql.lua (internal file)..."]:29: Unknown driver ''abcd''' ... lua dump = function(v) return box.cjson.encode(v) end --- ... lua connect = {} --- ... lua for tk in string.gmatch(os.getenv('PG'), '[^:]+') do table.insert(connect, tk) end --- ... lua c = box.net.sql.connect('pg', unpack(connect)) --- ... lua dump({c:execute('SELECT 123::text AS bla, 345')}) --- - [[{"?column?":345,"bla":"123"}],1,"SELECT 1"] ... lua dump({c:execute('SELECT -1 AS neg, NULL AS abc')}) --- - [[{"neg":-1}],1,"SELECT 1"] ... lua dump({c:execute('SELECT -1.1 AS neg, 1.2 AS pos')}) --- - [[{"neg":-1.1,"pos":1.2}],1,"SELECT 1"] ... lua dump({c:execute('SELECT ARRAY[1,2] AS neg, 1.2 AS pos')}) --- - [[{"neg":"{1,2}","pos":1.2}],1,"SELECT 1"] ... lua dump({c:execute('SELECT ? AS val', 'abc')}) --- - [[{"val":"abc"}],1,"SELECT 1"] ... lua dump({c:execute('SELECT ? AS val', 123)}) --- - [[{"val":123}],1,"SELECT 1"] ... lua dump({c:execute('SELECT ? AS val', true)}) --- - [[{"val":true}],1,"SELECT 1"] ... lua dump({c:execute('SELECT ? AS val', false)}) --- - [[{"val":false}],1,"SELECT 1"] ... lua dump({c:execute('SELECT ? AS val, ? AS num, ? AS str', false, 123, 'abc')}) --- - [[{"str":"abc","num":123,"val":false}],1,"SELECT 1"] ... lua dump({c:execute('DROP TABLE IF EXISTS unknown_table')}) --- - [{},0,"DROP TABLE"] ... lua dump({c:execute('SELECT * FROM (VALUES (1,2), (2,3)) t')}) --- - [[{"column1":1,"column2":2},{"column1":2,"column2":3}],2,"SELECT 2"] ... lua c:ping() --- - true ... lua dump({c:select('SELECT * FROM (VALUES (1,2), (2,3)) t')}) --- - [[{"column1":1,"column2":2},{"column1":2,"column2":3}]] ... lua dump({c:single('SELECT * FROM (VALUES (1,2), (2,3)) t')}) --- error: '[string "-- sql.lua (internal file)..."]:156: SQL request returned multiply rows' ... lua dump({c:single('SELECT * FROM (VALUES (1,2)) t')}) --- - [{"column1":1,"column2":2}] ... lua dump({c:perform('SELECT * FROM (VALUES (1,2), (2,3)) t')}) --- - [2] ... lua c:execute('SELEC T') --- error: '[string "-- sql.lua (internal file)..."]:105: ERROR: syntax error at or near "SELEC" LINE 1: SELEC T ^ ' ... lua c = box.net.sql.connect('abcd') --- error: '[string "-- sql.lua (internal file)..."]:29: Unknown driver ''abcd''' ... lua c:quote('abc"cde"def') --- - 'abc"cde"def' ... lua c:begin_work() --- - 0 ... lua c:rollback() --- - 0 ... lua c:begin_work() --- - 0 ... lua c:commit() --- - 0 ... lua c:txn(function(dbi) dbi:single('SELECT 1') end) --- - true ... tarantool-1.5.1.218.g1a69fd6/test/box/session.result0000664000000000000000000000567612231715257020475 0ustar rootrootlua box.session.exists(box.session.id()) --- - 1 ... lua box.session.exists() --- error: 'session.exists(sid): bad arguments' ... lua box.session.exists(1, 2, 3) --- error: 'session.exists(sid): bad arguments' ... lua box.session.exists(1234567890) --- - 0 ... lua box.session.id() > 0 --- - true ... lua f = box.fiber.create(function() box.fiber.detach() failed = box.session.id() ~= 0 end) --- ... lua box.fiber.resume(f) --- ... lua failed --- - false ... lua f1 = box.fiber.create(function() if box.session.id() == 0 then failed = true end end) --- ... lua box.fiber.resume(f1) --- - true ... lua failed --- - false ... lua box.session.peer() == box.session.peer(box.session.id()) --- - true ... lua box.session.on_connect(function() end) --- - nil ... lua box.session.on_disconnect(function() end) --- - nil ... lua type(box.session.on_connect(function() error('hear') end)) --- - function ... lua type(box.session.on_disconnect(function() error('hear') end)) --- - function ... lua box.session.on_connect() --- error: 'session.on_connect(chunk): bad arguments' ... lua box.session.on_disconnect() --- error: 'session.on_connect(chunk): bad arguments' ... lua box.session.on_connect(function() end, function() end) --- error: 'session.on_connect(chunk): bad arguments' ... lua box.session.on_disconnect(function() end, function() end) --- error: 'session.on_connect(chunk): bad arguments' ... lua box.session.on_connect(1, 2) --- error: 'session.on_connect(chunk): bad arguments' ... lua box.session.on_disconnect(1, 2) --- error: 'session.on_connect(chunk): bad arguments' ... lua box.session.on_connect(1) --- error: 'session.on_connect(chunk): bad arguments' ... lua box.session.on_disconnect(1) --- error: 'session.on_connect(chunk): bad arguments' ... lua type(box.session.on_connect(nil)) --- - function ... lua type(box.session.on_disconnect(nil)) --- - function ... lua type(box.session.on_connect(nil)) --- - nil ... lua type(box.session.on_disconnect(nil)) --- - nil ... lua function inc() active_connections = active_connections + 1 end --- ... lua function dec() active_connections = active_connections - 1 end --- ... lua box.session.on_connect(inc) --- - nil ... lua box.session.on_disconnect(dec) --- - nil ... lua active_connections = 0 --- ... lua active_connections --- - 1 ... lua active_connections --- - 2 ... lua type(box.session.on_connect(nil)) --- - function ... lua type(box.session.on_disconnect(nil)) --- - function ... lua box.session.on_connect(function() box.insert(0, box.session.id()) end) --- - nil ... lua box.session.on_disconnect(function() box.delete(0, box.session.id()) end) --- - nil ... lua box.unpack('i', box.select(0, 0, box.session.id())[0]) == box.session.id() --- - true ... lua type(box.session.on_connect(function() nosuchfunction() end)) --- - function ... disconnected lua type(box.session.on_connect(nil)) --- - function ... lua type(box.session.on_disconnect(nil)) --- - function ... lua active_connections --- - 0 ... tarantool-1.5.1.218.g1a69fd6/test/box/require_mod.lua0000664000000000000000000000011312231715276020546 0ustar rootrootexports = {} function exports.test(a, b) return a+b end return exports tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.pg.test0000664000000000000000000000333112231715257020507 0ustar rootroot# encoding: tarantool exec admin "lua c = box.net.sql.connect('abcd')" exec admin "lua dump = function(v) return box.cjson.encode(v) end" exec admin "lua connect = {}" exec admin "lua for tk in string.gmatch(os.getenv('PG'), '[^:]+') do table.insert(connect, tk) end" # postgresql exec admin "lua c = box.net.sql.connect('pg', unpack(connect))" exec admin "lua dump({c:execute('SELECT 123::text AS bla, 345')})" exec admin "lua dump({c:execute('SELECT -1 AS neg, NULL AS abc')})" exec admin "lua dump({c:execute('SELECT -1.1 AS neg, 1.2 AS pos')})" exec admin "lua dump({c:execute('SELECT ARRAY[1,2] AS neg, 1.2 AS pos')})" exec admin "lua dump({c:execute('SELECT ? AS val', 'abc')})" exec admin "lua dump({c:execute('SELECT ? AS val', 123)})" exec admin "lua dump({c:execute('SELECT ? AS val', true)})" exec admin "lua dump({c:execute('SELECT ? AS val', false)})" exec admin "lua dump({c:execute('SELECT ? AS val, ? AS num, ? AS str', false, 123, 'abc')})" exec admin "lua dump({c:execute('DROP TABLE IF EXISTS unknown_table')})" exec admin "lua dump({c:execute('SELECT * FROM (VALUES (1,2), (2,3)) t')})" exec admin "lua c:ping()" exec admin "lua dump({c:select('SELECT * FROM (VALUES (1,2), (2,3)) t')})" exec admin "lua dump({c:single('SELECT * FROM (VALUES (1,2), (2,3)) t')})" exec admin "lua dump({c:single('SELECT * FROM (VALUES (1,2)) t')})" exec admin "lua dump({c:perform('SELECT * FROM (VALUES (1,2), (2,3)) t')})" exec admin "lua c:execute('SELEC T')" exec admin "lua c = box.net.sql.connect('abcd')" exec admin "lua c:quote('abc\"cde\"def')" exec admin "lua c:begin_work()" exec admin "lua c:rollback()" exec admin "lua c:begin_work()" exec admin "lua c:commit()" exec admin "lua c:txn(function(dbi) dbi:single('SELECT 1') end)" tarantool-1.5.1.218.g1a69fd6/test/box/bug726778.cfg0000664000000000000000000000064512231715257017504 0ustar rootroot# # Used in args.test # slab_alloc_arena = 0.1 pid_file = "box.pid" work_dir = "bug726778" snap_dir = "snapshots" wal_dir = "xlogs" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/just_header.xlog0000664000000000000000000000001312231715257020716 0ustar rootrootXLOG 0.11 tarantool-1.5.1.218.g1a69fd6/test/box/cjson.result0000664000000000000000000000123412231715257020110 0ustar rootrootcjson tests lua type(box.cjson) --- - table ... lua box.cjson.encode(123) --- - 123 ... lua box.cjson.encode({123}) --- - [123] ... lua box.cjson.encode({123, 234, 345}) --- - [123,234,345] ... lua box.cjson.encode({abc = 234, cde = 345}) --- - {"cde":345,"abc":234} ... lua box.cjson.encode({Метапеременная = { 'Метазначение' } }) --- - {"Метапеременная":["Метазначение"]} ... lua box.cjson.decode('123') --- - 123 ... lua box.cjson.decode('[123, "Кудыкины горы"]')[2] --- - Кудыкины горы ... lua box.cjson.decode('{"test": "Результат"}').test --- - Результат ... tarantool-1.5.1.218.g1a69fd6/test/box/fiber.result0000664000000000000000000001144512231715276020071 0ustar rootrootlua box.cfg.rows_per_wal --- - 50 ... insert into t0 values (1, 'testing', 'lua rocks') Insert OK, 1 row affected delete from t0 where k0=1 Delete OK, 1 row affected insert into t0 values (1, 'testing', 'lua rocks') Insert OK, 1 row affected delete from t0 where k0=1 Delete OK, 1 row affected lua box.process(17, box.pack('iiiiiip', 0, 0, 0, 2^31, 1, 1, 1)) --- ... lua box.process(22, box.pack('iii', 0, 0, 0)) --- error: 'box.process(CALL, ...) is not allowed' ... insert into t0 values (1, 'test box delete') Insert OK, 1 row affected call box.delete('0', '') Found 1 tuple: [1, 'test box delete'] insert into t0 values (1, 'test box delete') Insert OK, 1 row affected lua box.delete(0, 1) --- - 1: {'test box delete'} ... insert into t0 values ('abcd', 'test box delete') Insert OK, 1 row affected call box.delete('0', 'abcd') Found 1 tuple: [1684234849, 'test box delete'] insert into t0 values ('abcd', 'test box delete') Insert OK, 1 row affected lua box.delete(0, 'abcd') --- - 1684234849: {'test box delete'} ... insert into t0 values ('abcd', 'test box.select()') Insert OK, 1 row affected call box.replace('0', 'abcd', 'hello', 'world') Found 1 tuple: [1684234849, 'hello', 'world'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'abcd') Found 1 tuple: [1684234849] call box.delete('0', 'abcd') Found 1 tuple: [1684234849] call box.delete('0', 'defc') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.insert('0', 'test', 'old', 'abcd') Found 1 tuple: [1953719668, 'old', 1684234849] call box.insert('0', 'test', 'old', 'abcd') An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 0' call box.update('0', 'test', '=p=p', 0, 'pass', 1, 'new') Found 1 tuple: [1936941424, 'new', 1684234849] call box.update('0', 'miss', '+p', 2, '') No match call box.update('0', 'pass', '+p', 2, '') Found 1 tuple: [1936941424, 'new', 1684234850] call box.update('0', 'pass', '-p', 2, '') Found 1 tuple: [1936941424, 'new', 1684234849] call box.update('0', 'pass', '-p', 2, '') Found 1 tuple: [1936941424, 'new', 1684234848] lua box.update(0, 'pass', '+p', 2, 1) --- - 1936941424: {'new', 1684234849} ... call box.delete('0', 'pass') Found 1 tuple: [1936941424, 'new', 1684234849] reload configuration --- ok ... lua box.insert(0, 'test') --- - 1953719668: {} ... lua box.insert(0, 'abcd') --- - 1684234849: {} ... lua box.delete(0, 'test') --- - 1953719668: {} ... lua box.delete(0, 'abcd') --- - 1684234849: {} ... lua box.space[0]:insert('test', 'hello world') --- - 1953719668: {'hello world'} ... lua box.space[0]:update('test', '=p', 1, 'bye, world') --- - 1953719668: {'bye, world'} ... lua box.space[0]:delete('test') --- - 1953719668: {'bye, world'} ... lua t=box.space[0]:insert('test') --- ... lua t=box.space[0]:replace('test', 'another field') --- ... lua t=box.space[0]:replace('test', 'another field', 'one more') --- ... lua box.space[0]:truncate() --- ... lua function y() print('started') box.fiber.detach() while true do box.replace(0, 'test', os.time()) box.fiber.sleep(0.001) end end --- ... lua f = box.fiber.create(y) --- ... lua box.fiber.resume(f) --- started ... lua box.fiber.sleep(0.002) --- ... lua box.fiber.cancel(f) --- ... lua box.fiber.resume(f) --- error: 'fiber.resume(): the fiber is dead' ... lua for k=1, 1000, 1 do box.fiber.create(function() box.fiber.detach() end) end --- ... lua collectgarbage('collect') --- - 0 ... lua box.fiber.find(900) --- - nil ... lua box.fiber.find(910) --- - nil ... lua box.fiber.find(920) --- - nil ... lua box.space[0]:truncate() --- ... lua box.fiber.find() --- error: 'fiber.find(): bad arguments' ... lua box.fiber.find('test') --- - nil ... tarantool-1.5.1.218.g1a69fd6/test/box/protocol.test0000664000000000000000000000047012231715257020277 0ustar rootroot# encoding: tarantool # import subprocess import sys import os p = subprocess.Popen([ os.path.join(builddir, "test/box/protocol") ], stdout=subprocess.PIPE) p.wait() for line in p.stdout.readlines(): sys.stdout.write(line) exec sql "delete from t0 where k0 = 1" # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/unfinished.xlog0000664000000000000000000000012612231715257020562 0ustar rootrootXLOG 0.11  jn! WA*ArI@  fourth tuple tarantool-1.5.1.218.g1a69fd6/test/box/sql.result0000664000000000000000000000565312231715257017604 0ustar rootrootping ok --- select * from t0 An error occurred: ER_KEY_FIELD_TYPE, 'Supplied key field type does not match index type: expected u32' insert into t0 values (1, 'I am a tuple') Insert OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1, 'I am a tuple'] select * from t0 where k0 = 0 No match select * from t0 where k0 = 2 No match select * from t0 where k0 = 1 Found 1 tuple: [1, 'I am a tuple'] save snapshot --- ok ... select * from t0 where k0 = 1 Found 1 tuple: [1, 'I am a tuple'] select * from t0 where k0 = 1 Found 1 tuple: [1, 'I am a tuple'] delete from t0 where k0 = 1 Delete OK, 1 row affected select * from t0 where k0 = 1 No match update t0 set k1 = 'I am a new tuple' where k0=1 Update OK, 0 row affected select * from t0 where k0=1 No match insert into t0 values (1, 'I am a new tuple') Insert OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1, 'I am a new tuple'] update t0 set k1 = 'I am the newest tuple' where k0=1 Update OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1, 'I am the newest tuple'] update t0 set k1 = 'Huh', k2 = 'I am a new field! I was added via append' where k0=1 Update OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1, 'Huh', 'I am a new field! I was added via append'] update t0 set k1 = 'Huh', k1000 = 'invalid field' where k0=1 An error occurred: ER_NO_SUCH_FIELD, 'Field 1000 was not found in the tuple' select * from t0 where k0 = 1 Found 1 tuple: [1, 'Huh', 'I am a new field! I was added via append'] replace into t0 values (1, 'I am a new tuple', 'stub') Replace OK, 1 row affected update t0 set k1 = 'Huh', k2 = 'Oh-ho-ho' where k0=1 Update OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1, 'Huh', 'Oh-ho-ho'] update t0 set k1 = '', k2 = '' where k0=1 Update OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1, '', ''] update t0 set k1 = 2, k2 = 3 where k0=1 Update OK, 1 row affected select * from t0 where k0 = 1 Found 1 tuple: [1, 2, 3] insert into t0 values (0) Insert OK, 1 row affected select * from t0 where k0=0 Found 1 tuple: [0] insert into t0 values (4294967295) Insert OK, 1 row affected select * from t0 where k0=4294967295 Found 1 tuple: [4294967295] delete from t0 where k0=0 Delete OK, 1 row affected delete from t0 where k0=4294967295 Delete OK, 1 row affected # # A test case for: http://bugs.launchpad.net/bugs/712456 # Verify that when trying to access a non-existing or # very large space id, no crash occurs. # select * from t1 where k0 = 0 An error occurred: ER_NO_SUCH_SPACE, 'Space 1 does not exist' select * from t65537 where k0 = 0 An error occurred: ER_NO_SUCH_SPACE, 'Space 65537 does not exist' select * from t4294967295 where k0 = 0 An error occurred: ER_NO_SUCH_SPACE, 'Space 4294967295 does not exist' lua box.space[0]:truncate() --- ... # # A test case for: http://bugs.launchpad.net/bugs/716683 # Admin console should not stall on unknown command. show status --- unknown command. try typing help. ... tarantool-1.5.1.218.g1a69fd6/test/box/errinj.test0000664000000000000000000000312312231715257017725 0ustar rootroot# encoding: tarantool # import sys # clear statistics: server.stop() server.deploy() exec admin "show injections" exec admin "set injection some-injection on" exec sql "select * from t0 where k0 = 222444" exec admin "set injection ERRINJ_TESTING on" exec sql "select * from t0 where k0 = 222444" exec admin "set injection ERRINJ_TESTING off" # Check how well we handle a failed log write. exec admin "set injection ERRINJ_WAL_IO on" exec sql "insert into t0 values (1)" exec sql "select * from t0 where k0=1" exec admin "set injection ERRINJ_WAL_IO off" exec sql "insert into t0 values (1)" exec admin "set injection ERRINJ_WAL_IO on" exec sql "update t0 set k0=2 where k0=1" exec sql "select * from t0 where k0=1" exec sql "select * from t0 where k0=2" exec admin "set injection ERRINJ_WAL_IO off" exec admin "lua box.space[0]:truncate()" # Check a failed log rotation. exec admin "set injection ERRINJ_WAL_ROTATE on" exec sql "insert into t0 values (1)" exec sql "select * from t0 where k0=1" exec admin "set injection ERRINJ_WAL_ROTATE off" exec sql "insert into t0 values (1)" exec admin "set injection ERRINJ_WAL_ROTATE on" exec sql "update t0 set k0=2 where k0=1" exec sql "select * from t0 where k0=1" exec sql "select * from t0 where k0=2" exec admin "set injection ERRINJ_WAL_ROTATE off" exec sql "update t0 set k0=2 where k0=1" exec sql "select * from t0 where k0=1" exec sql "select * from t0 where k0=2" exec admin "set injection ERRINJ_WAL_ROTATE on" exec admin "lua box.space[0]:truncate()" exec admin "set injection ERRINJ_WAL_ROTATE off" exec admin "lua box.space[0]:truncate()" # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/lua_box_uuid.test0000664000000000000000000000033512231715257021115 0ustar rootroot# encoding: tarantool import os import sys print """# box.uuid()""" exec admin "lua string.len(box.uuid())" exec admin "lua string.len(box.uuid_hex())" exec admin "lua string.match(box.uuid_hex(), '^[a-f0-9]+$') ~= nil" tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bug884768.cfg0000664000000000000000000000354712231715257021577 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 space[0].enabled = 0 space[0].index[0].type = "HASH" space[0].index[0].unique = 0 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" space[1].enabled = 1 space[1].index[0].type = "HASH" space[1].index[0].unique = 1 space[1].index[0].key_field[0].fieldno = 0 space[1].index[0].key_field[0].type = "NUM" space[2].enabled = false space[2].index[0].type = "HASH" space[2].index[0].unique = false space[2].index[0].key_field[0].fieldno = 0 space[2].index[0].key_field[0].type = "NUM" space[3].enabled = true space[3].index[0].type = "HASH" space[3].index[0].unique = true space[3].index[0].key_field[0].fieldno = 0 space[3].index[0].key_field[0].type = "NUM" space[4].enabled = off space[4].index[0].type = "HASH" space[4].index[0].unique = off space[4].index[0].key_field[0].fieldno = 0 space[4].index[0].key_field[0].type = "NUM" space[5].enabled = on space[5].index[0].type = "HASH" space[5].index[0].unique = on space[5].index[0].key_field[0].fieldno = 0 space[5].index[0].key_field[0].type = "NUM" space[6].enabled = no space[6].index[0].type = "HASH" space[6].index[0].unique = no space[6].index[0].key_field[0].fieldno = 0 space[6].index[0].key_field[0].type = "NUM" space[7].enabled = yes space[7].index[0].type = "HASH" space[7].index[0].unique = yes space[7].index[0].key_field[0].fieldno = 0 space[7].index[0].key_field[0].type = "NUM" space[8].enabled = "0" space[8].index[0].type = "HASH" space[8].index[0].unique = "0" space[8].index[0].key_field[0].fieldno = 0 space[8].index[0].key_field[0].type = "NUM" space[9].enabled = "1" space[9].index[0].type = "HASH" space[9].index[0].unique = "1" space[9].index[0].key_field[0].fieldno = 0 space[9].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/sql.test0000664000000000000000000000475212231715257017244 0ustar rootroot# encoding: tarantool exec sql "ping" # xxx: bug -- currently selects no rows exec sql "select * from t0" exec sql "insert into t0 values (1, 'I am a tuple')" exec sql "select * from t0 where k0 = 1" # currently there is no way to find out how many records # a space contains exec sql "select * from t0 where k0 = 0" exec sql "select * from t0 where k0 = 2" server.restart() exec sql "select * from t0 where k0 = 1" exec admin 'save snapshot' exec sql "select * from t0 where k0 = 1" server.restart() exec sql "select * from t0 where k0 = 1" exec sql "delete from t0 where k0 = 1" exec sql "select * from t0 where k0 = 1" # xxx: update comes through, returns 0 rows affected exec sql "update t0 set k1 = 'I am a new tuple' where k0=1" # nothing is selected, since nothing was there exec sql "select * from t0 where k0=1" exec sql "insert into t0 values (1, 'I am a new tuple')" exec sql "select * from t0 where k0 = 1" exec sql "update t0 set k1 = 'I am the newest tuple' where k0=1" exec sql "select * from t0 where k0 = 1" # this is correct, can append field to tuple exec sql "update t0 set k1 = 'Huh', k2 = 'I am a new field! I was added via append' where k0=1" exec sql "select * from t0 where k0 = 1" # this is illegal exec sql "update t0 set k1 = 'Huh', k1000 = 'invalid field' where k0=1" exec sql "select * from t0 where k0 = 1" exec sql "replace into t0 values (1, 'I am a new tuple', 'stub')" exec sql "update t0 set k1 = 'Huh', k2 = 'Oh-ho-ho' where k0=1" exec sql "select * from t0 where k0 = 1" # check empty strings exec sql "update t0 set k1 = '', k2 = '' where k0=1" exec sql "select * from t0 where k0 = 1" # check type change exec sql "update t0 set k1 = 2, k2 = 3 where k0=1" exec sql "select * from t0 where k0 = 1" # check limits exec sql "insert into t0 values (0)" exec sql "select * from t0 where k0=0" exec sql "insert into t0 values (4294967295)" exec sql "select * from t0 where k0=4294967295" # cleanup exec sql "delete from t0 where k0=0" exec sql "delete from t0 where k0=4294967295" print """# # A test case for: http://bugs.launchpad.net/bugs/712456 # Verify that when trying to access a non-existing or # very large space id, no crash occurs. # """ exec sql "select * from t1 where k0 = 0" exec sql "select * from t65537 where k0 = 0" exec sql "select * from t4294967295 where k0 = 0" exec admin "lua box.space[0]:truncate()" print """# # A test case for: http://bugs.launchpad.net/bugs/716683 # Admin console should not stall on unknown command. """ exec admin 'show status' # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/reconfigure.test0000664000000000000000000000312412242653271020744 0ustar rootroot# encoding: tarantool # exec admin "lua box.cfg.too_long_threshold" # bad1 server.reconfigure("box/tarantool_bad1.cfg") exec admin "lua box.cfg.too_long_threshold" # bad2 server.reconfigure("box/tarantool_bad2.cfg") # bad3 server.reconfigure("box/tarantool_bad3.cfg") # bad4 server.reconfigure("box/tarantool_bad4.cfg") # bad5 server.reconfigure("box/tarantool_bad5.cfg") # good server.reconfigure("box/tarantool_good.cfg") exec admin "lua box.cfg.too_long_threshold" exec admin "lua box.cfg.snap_io_rate_limit" exec admin "lua box.cfg.io_collect_interval" # empty server.reconfigure("box/tarantool_empty.cfg") exec admin "lua box.cfg.too_long_threshold" # no config server.reconfigure(None) # cleanup # restore default server.reconfigure(self.suite_ini["config"]) exec admin "lua box.cfg.too_long_threshold" print """# # A test case for http://bugs.launchpad.net/bugs/712447: # Valgrind reports use of not initialized memory after 'reload # configuration' #""" exec sql "insert into t0 values (1, 'tuple')" exec admin "save snapshot" server.reconfigure(None) exec sql "insert into t0 values (2, 'tuple 2')" exec admin "save snapshot" server.reconfigure("box/tarantool_good.cfg") exec sql "insert into t0 values (3, 'tuple 3')" exec admin "save snapshot" print """# # A test case for https://github.com/tarantool/tarantool/issues/112: # Tarantool crushes with SIGSEGV during reload configuration #""" server.reconfigure("box/tarantool_wo_cpt.cfg") server.reconfigure("box/tarantool_with_cpt.cfg") # Cleanup server.reconfigure(self.suite_ini["config"]) exec admin "lua box.space[0]:truncate()" # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/stat.result0000664000000000000000000000360312231715257017751 0ustar rootroot# # check stat_cleanup # add several tuples # insert into t0 values (0, 'tuple') Insert OK, 1 row affected insert into t0 values (1, 'tuple') Insert OK, 1 row affected insert into t0 values (2, 'tuple') Insert OK, 1 row affected insert into t0 values (3, 'tuple') Insert OK, 1 row affected insert into t0 values (4, 'tuple') Insert OK, 1 row affected insert into t0 values (5, 'tuple') Insert OK, 1 row affected insert into t0 values (6, 'tuple') Insert OK, 1 row affected insert into t0 values (7, 'tuple') Insert OK, 1 row affected insert into t0 values (8, 'tuple') Insert OK, 1 row affected insert into t0 values (9, 'tuple') Insert OK, 1 row affected show stat --- statistics: REPLACE: { rps: 2 , total: 10 } SELECT: { rps: 0 , total: 0 } UPDATE: { rps: 0 , total: 0 } DELETE_1_3: { rps: 0 , total: 0 } DELETE: { rps: 0 , total: 0 } CALL: { rps: 0 , total: 0 } ... # # restart server # # # statistics must be zero # show stat --- statistics: REPLACE: { rps: 0 , total: 0 } SELECT: { rps: 0 , total: 0 } UPDATE: { rps: 0 , total: 0 } DELETE_1_3: { rps: 0 , total: 0 } DELETE: { rps: 0 , total: 0 } CALL: { rps: 0 , total: 0 } ... delete from t0 where k0 = 0 Delete OK, 1 row affected delete from t0 where k0 = 1 Delete OK, 1 row affected delete from t0 where k0 = 2 Delete OK, 1 row affected delete from t0 where k0 = 3 Delete OK, 1 row affected delete from t0 where k0 = 4 Delete OK, 1 row affected delete from t0 where k0 = 5 Delete OK, 1 row affected delete from t0 where k0 = 6 Delete OK, 1 row affected delete from t0 where k0 = 7 Delete OK, 1 row affected delete from t0 where k0 = 8 Delete OK, 1 row affected delete from t0 where k0 = 9 Delete OK, 1 row affected tarantool-1.5.1.218.g1a69fd6/test/box/socket.result0000664000000000000000000002330712231715276020272 0ustar rootrootlua s = box.socket.udp() --- ... lua type(s) --- - userdata ... lua s:close() --- ... lua s = box.socket.tcp() --- ... lua type(s) --- - userdata ... lua s:close() --- ... lua s:close() --- ... lua s:error() --- - 0 - Success ... lua s:connect('localhost', '30303') --- - nil - error - 111 - Connection refused ... lua s:error() --- - 111 - Connection refused ... lua s:connect('127.0.0.1', '30303') --- - nil - error - 111 - Connection refused ... lua s:error() --- - 111 - Connection refused ... lua s:connect('127.0.0.1', '30303', 0.01) --- - nil - error - 111 - Connection refused ... lua s:error() --- - 111 - Connection refused ... lua s:connect('127.0.0.1') --- error: 'bad argument #3 to ''?'' (string expected, got no value)' ... lua s:connect() --- error: 'bad argument #2 to ''?'' (string expected, got no value)' ... lua s:connect(123) --- error: 'bad argument #3 to ''?'' (string expected, got no value)' ... lua s:close() --- ... lua s:close() --- ... lua sr, se = s:connect('somewhereelse', '30303', 0.0001) --- ... lua sr == nil and se == 'error' or se == 'timeout' --- - true ... lua e = s:error() --- ... lua e == -1 or e == 110 --- - true ... lua s:close() --- ... lua s:send() --- error: 'box.socket: socket is not initialized' ... lua s:send(1) --- error: 'box.socket: socket is not initialized' ... lua s = box.socket.tcp() --- ... lua type(s:connect('127.0.0.1', '30303')) --- - userdata ... lua s:send('ping') --- - 4 ... lua s:error() --- - 0 - Success ... lua n, status, error_code, error_str = s:send(string.rep('=', 8388608), 0.0000001) --- ... lua type(n) --- - number ... lua type(status) --- - string ... lua type(error_code) --- - number ... lua type(error_str) --- - string ... lua status --- - timeout ... lua error_code --- - 110 ... lua error_str --- - Connection timed out ... lua s:error() --- - 110 - Connection timed out ... connected lua s:send('ping') --- - 0 - error - 104 - Connection reset by peer ... lua s:error() --- - 104 - Connection reset by peer ... lua s:close() --- ... lua s:recv() --- error: 'box.socket: socket is not initialized' ... lua type(s:connect('127.0.0.1', '30308')) --- - userdata ... lua s:error() --- - 0 - Success ... 12 lua s:recv(12) --- - Hello, World ... lua s:error() --- - 0 - Success ... lua s:close() --- ... lua type(s:connect('127.0.0.1', '30308')) --- - userdata ... lua s:error() --- - 0 - Success ... 21 lua s:recv(11) --- - Hello World ... lua s:recv(5) --- - Over ... lua s:recv(5) --- - sized ... lua s:error() --- - 0 - Success ... lua s:close() --- ... lua type(s:connect('127.0.0.1', '30308')) --- - userdata ... lua s:error() --- - 0 - Success ... connected 3 lua s:recv(4, 0.01) --- - - timeout - 110 - Connection timed out ... lua s:error() --- - 110 - Connection timed out ... lua s:recv(4) --- - ping ... lua s:error() --- - 0 - Success ... lua s:close() --- ... lua type(s:connect('127.0.0.1', '30309')) --- - userdata ... lua s:error() --- - 0 - Success ... connected 4 lua s:recv(6) --- - ping - eof ... lua s:error() --- - 0 - Success ... lua s:close() --- ... lua type(s:connect('127.0.0.1', '30311')) --- - userdata ... lua s:error() --- - 0 - Success ... connected 24 lua s:recv(5) --- - ping ... lua s:recv(5) --- - ping ... lua s:recv(5) --- - ping ... lua s:recv(5) --- - ping ... lua s:recv(5) --- - end - eof ... lua s:recv(5) --- - - eof ... lua s:recv(5) --- - - eof ... lua s:error() --- - 0 - Success ... lua s:close() --- ... lua type(s:connect('127.0.0.1', '30305')) --- - userdata ... lua s:error() --- - 0 - Success ... 12 lua s:readline() --- - Hello World - nil - ... lua s:error() --- - 0 - Success ... 12 lua s:readline(5) --- - Hello - limit ... lua s:error() --- - 0 - Success ... lua s:readline(5, 0.01) --- - Worl - limit ... lua s:error() --- - 0 - Success ... lua s:readline(6, 0.01) --- - d - nil - ... lua s:error() --- - 0 - Success ... 9 lua s:readline({'i', 'D'}) --- - AbcD - nil - D ... lua s:error() --- - 0 - Success ... lua s:readline({'i', 'G'}) --- - efG - nil - G ... lua s:error() --- - 0 - Success ... lua s:readline({'i'}) --- - hi - nil - i ... lua s:error() --- - 0 - Success ... 13 lua s:readline({'Cat', 'Cow', 'Dog', 'Star'}) --- - Cat - nil - Cat ... lua s:error() --- - 0 - Success ... lua s:readline({'Cat', 'Cow', 'Dog', 'Star'}) --- - Cow - nil - Cow ... lua s:error() --- - 0 - Success ... lua s:readline({'Cat', 'Cow', 'Dog', 'Star'}) --- - Dog - nil - Dog ... lua s:error() --- - 0 - Success ... lua s:readline({'Cat', 'Cow', 'Dog', 'Star'}) --- - Star - nil - Star ... lua s:error() --- - 0 - Success ... 15 lua s:readline(3, {'Cat', 'Coow'}) --- - Cat - nil - Cat ... lua s:error() --- - 0 - Success ... lua s:readline(3, {'Cat', 'Coow'}) --- - Coo - limit ... lua s:error() --- - 0 - Success ... lua s:readline(3, {'Dogg', 'Star'}) --- - wDo - limit ... lua s:error() --- - 0 - Success ... lua s:readline(3, {'Dogg', 'Star'}) --- - ggS - limit ... lua s:error() --- - 0 - Success ... lua s:readline(3) --- - tar - limit ... lua s:error() --- - 0 - Success ... 23 lua sl = {'Crown', 'King', 'Kong', 'Cezar'} --- ... lua s:readline(sl, 1.0) --- - KKong - nil - Kong ... lua s:error() --- - 0 - Success ... lua s:readline(sl, 1.0) --- - King - nil - King ... lua s:error() --- - 0 - Success ... lua s:readline(sl, 1.0) --- - CezaCezar - nil - Cezar ... lua s:error() --- - 0 - Success ... lua s:readline(sl, 1.0) --- - Crown - nil - Crown ... lua s:error() --- - 0 - Success ... 26 lua sl = {'Agatha', 'Road', 'Corn', 'Drive', 'Pop'} --- ... lua s:readline(64, sl, 1.0) --- - RoAgatha - nil - Agatha ... lua s:error() --- - 0 - Success ... lua s:readline(64, sl, 1.0) --- - Pop - nil - Pop ... lua s:error() --- - 0 - Success ... lua s:readline(64, sl, 1.0) --- - PoCorn - nil - Corn ... lua s:error() --- - 0 - Success ... lua s:readline(64, sl, 1.0) --- - Drive - nil - Drive ... lua s:error() --- - 0 - Success ... 21 lua s:readline({'Canada'}, 0.01) --- - - timeout - 110 - Connection timed out ... lua s:error() --- - 110 - Connection timed out ... 2 lua s:readline({'Canada'}, 0.01) --- - RoadAfricaCubaRomaniaCanada - nil - Canada ... lua s:error() --- - 0 - Success ... 6 lua s:readline({'Canada'}, 0.01) --- - Canada - nil - Canada ... lua s:error() --- - 0 - Success ... 19 lua s:readline({'msg'}) --- - msg - nil - msg ... lua s:error() --- - 0 - Success ... lua s:readline({'msg'}) --- - msg - nil - msg ... lua s:error() --- - 0 - Success ... lua s:readline({'msg'}) --- - msg - nil - msg ... lua s:error() --- - 0 - Success ... lua s:readline({'msg'}) --- - msg - nil - msg ... lua s:error() --- - 0 - Success ... lua s:readline({'msg'}) --- - msg - nil - msg ... lua s:error() --- - 0 - Success ... lua s:readline({'msg'}) --- - - eof ... lua s:error() --- - 0 - Success ... lua s:readline({'msg'}) --- - - eof ... lua s:error() --- - 0 - Success ... lua s:close() --- ... lua type(s:connect('127.0.0.1', '30307')) --- - userdata ... lua s:error() --- - 0 - Success ... 29 lua s:readline({'Z'}) --- - SomelongLongStringStrinString - eof ... lua s:error() --- - 0 - Success ... lua s:close() --- ... lua type(s:connect('localhost', '30303')) --- - userdata ... lua s:send('ping') --- - 4 ... connected lua s:recv(4) --- - ping ... lua s:send('ping') --- - 4 ... lua s:error() --- - 0 - Success ... lua s:send('ping') --- - 0 - error - 32 - Broken pipe ... lua s:error() --- - 32 - Broken pipe ... lua s:close() --- ... lua type(s:bind('127.0.0.1', '30303')) --- - userdata ... lua type(s:listen()) --- - userdata ... lua client, status, addr = s:accept() --- ... lua addr --- - 127.0.0.1 ... lua data = client:recv(4) --- ... lua data --- - ping ... lua client:send(data, 4) --- - 4 ... lua client:close() --- ... lua s:close() --- ... ping lua s = box.socket.udp() --- ... lua type(s:sendto('ping', '127.0.0.1', '30302')) --- - number ... lua s:error() --- - 0 - Success ... ping lua s:recv(4) --- - - error - 107 - Transport endpoint is not connected ... lua s:close() --- ... lua s = box.socket.udp() --- ... lua type(s:bind('127.0.0.1', '30301')) --- - userdata ... lua s:error() --- - 0 - Success ... lua data, status, client, port = s:recvfrom(4) --- ... lua s:error() --- - 0 - Success ... lua data --- - ping ... lua client --- - 127.0.0.1 ... lua type(s:sendto(data, client, port)) --- - number ... lua s:error() --- - 0 - Success ... ping lua s:close() --- ... lua replies = 0 function bug1160869() local s = box.socket.tcp() s:connect('127.0.0.1', box.cfg.primary_port) box.fiber.resume( box.fiber.create(function() box.fiber.detach() while true do s:recv(12) replies = replies + 1 end end) ) return s:send(box.pack('iii', 65280, 0, 1)) end --- ... lua bug1160869() --- - 12 ... lua bug1160869() --- - 12 ... lua bug1160869() --- - 12 ... lua replies --- - 3 ... lua s = nil syncno = 0 reps = 0 function iostart() if s ~= nil then return end s = box.socket.tcp() s:connect('127.0.0.1', box.cfg.primary_port) box.fiber.resume( box.fiber.create(function() box.fiber.detach() while true do s:recv(12) reps = reps + 1 end end)) end function iotest() iostart() syncno = syncno + 1 return s:send(box.pack('iii', 65280, 0, syncno)) end --- ... lua iotest() --- - 12 ... lua iotest() --- - 12 ... lua iotest() --- - 12 ... lua reps --- - 3 ... lua function server() ms = box.socket.tcp() ms:bind('127.0.0.1', 8181) ms:listen() while true do local s = ms:accept( .5 ) if s ~= 'timeout' then print("accepted connection ", s) s:send('Hello world') s:shutdown(box.socket.SHUT_RDWR) end end end box.fiber.wrap(server) --- ... Hello world Hello world Hello world tarantool-1.5.1.218.g1a69fd6/test/box/args.test0000664000000000000000000000545312231715257017400 0ustar rootrootimport sys import os # mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356 sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "") server.test_option("--help") server.test_option("-h") sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool") # Test a cfg-get for something that is not in the config # file (used to crash, Bug#748599 server.test_option("--cfg-get=custom_proc_title") server.test_option("-Z") server.test_option("--no-such-option") server.test_option("--version --no-such-option") server.test_option("--config") server.test_option("-c") server.test_option("--config tarantool.cfg") server.test_option("--daemonize") server.test_option("--background") print """# # Check that --background doesn't work if there is no logger # This is a test case for # https://bugs.launchpad.net/tarantool/+bug/750658 # "--background neither closes nor redirects stdin/stdout/stderr" #""" cfg = os.path.join(vardir, "tarantool_bug750658.cfg") os.symlink(os.path.abspath("box/tarantool_bug750658.cfg"), cfg) server.test_option("--config=tarantool_bug750658.cfg --background") os.unlink(cfg) sys.stdout.pop_filter() sys.stdout.push_filter("(\d)\.\d\.\d(-\d+-\w+)?", "\\1.minor.patch--") sys.stdout.push_filter("Target: .*", "Target: platform ") sys.stdout.push_filter("Build options: .*", "Build options: flags") sys.stdout.push_filter("C_FLAGS:.*", "C_FLAGS: flags") sys.stdout.push_filter("CXX_FLAGS:.*", "CXX_FLAGS: flags") sys.stdout.push_filter("Compiler: .*", "Compiler: cc") server.test_option("--version") server.test_option("-V ") sys.stdout.clear_all_filters() print """# # A test case for Bug#726778 "Gopt broke wal_dir and snap_dir: they are no # longer relative to work_dir". # https://bugs.launchpad.net/tarantool/+bug/726778 # After addition of gopt(), we started to chdir() to the working # directory after option parsing. # Verify that this is not the case, and snap_dir and xlog_dir # can be relative to work_dir. """ import shutil shutil.rmtree(os.path.join(vardir, "bug726778"), True) cfg = os.path.join(vardir, "bug726778.cfg") os.mkdir(os.path.join(vardir, "bug726778")) os.mkdir(os.path.join(vardir, "bug726778/snapshots")) os.mkdir(os.path.join(vardir, "bug726778/xlogs")) os.symlink(os.path.abspath("box/bug726778.cfg"), cfg) sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool") sys.stdout.push_filter(".*(P|p)lugin.*", "") server.test_option("--config=bug726778.cfg --init-storage") sys.stdout.pop_filter() os.unlink(cfg) shutil.rmtree(os.path.join(vardir, "bug726778")) print """# # A test case for Bug#897162, cat command should # not require a configuration file. """ sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool") server.test_option("--config=nonexists.cfg --cat=nonexists.xlog") sys.stdout.pop_filter() # Args filter cleanup # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/suite.ini0000664000000000000000000000040612231715257017366 0ustar rootroot[default] description = tarantool/box, minimal configuration config = tarantool.cfg # put disabled tests here #disabled = xlog.test # disabled = lua.test # put disabled in valgrind test here valgrind_disabled = admin_coredump.test release_disabled = errinj.test tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.pg.skipcond0000664000000000000000000000027712231715257021350 0ustar rootroot# encoding: tarantool import os try: (host, port, user, password, db) = os.getenv('PG').split(':') except (RuntimeError, TypeError, NameError, AttributeError, ValueError): self.skip = 1 tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bug928413.cfg0000664000000000000000000000573712231715257021564 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 log_level = 4 local_hot_standby = true slab_alloc_minimal = 48 # Growth factor, each subsecuent unit size is factor * prev unit size slab_alloc_factor = 1.04 # SESSIONS!!! ##################################### #memcached_space = 52 space[0].enabled = 1 #namespace[0].expire_field = 2 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].type = "STR" space[0].index[0].key_field[0].fieldno = 0 space[0].index[1].type = "TREE" space[0].index[1].unique = 0 space[0].index[1].key_field[0].type = "STR" space[0].index[1].key_field[0].fieldno = 1 ################################################### # video meta. Indexes: 1.ACCID space[46] = { enabled = 1 index = [{ type = "HASH" unique = 1 key_field = [{ fieldno = 0 type = "NUM" }] }] } # upload meta. Indexes: 1.ITEMID 2.ACCID 3.UPLOADTIME space[47] = { enabled = 1 index = [{ type="HASH" unique = 1 Key_field = [{ fieldno = 0 type = "NUM64" }] },{ type="TREE" unique = 0 Key_field = [{ fieldno = 1 type = "NUM" }] },{ type="TREE" unique = 0 Key_field = [{ fieldno = 2 type = "NUM" }] }] } # user meta. Indexes: 0.ITEMID 1.ACCID 2.EXTERNALID 3.FLAGS 4.STATUS 5.SERVICEID space[48] = { enabled = 1 index = [{ type="HASH" unique = 1 Key_field = [{ fieldno = 0 type = "NUM" }] },{ type="TREE" unique=0 Key_field = [{ fieldno = 1 type = "NUM" }] }, { type="HASH" unique = 1 Key_field = [{ fieldno = 2 type = "STR" }] },{ type="TREE" unique = 0 key_field = [{ fieldno = 3 type = "NUM" }] },{ type="TREE" unique = 0 key_field = [{ fieldno = 4 type = "NUM" }] },{ type="TREE" unique = 0 key_field = [{ fieldno = 5 type = "NUM" }] } ] } space[50] = { enabled = 1 index = [{ type="HASH" unique = 1 Key_field = [{ fieldno = 0 type = "NUM" }] }] } space[53] = { enabled = 1 index = [{ type = "HASH" unique = 1 key_field = [{ fieldno = 0 type= "NUM" }] }] } wal_fsync_delay = 0.1 io_collect_interval = 0.001 logger_nonblock = true coredump = true snap_io_rate_limit = 50.0 custom_proc_title = "videobox" tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.mysql.test0000664000000000000000000000231212231715257021244 0ustar rootroot# encoding: tarantool exec admin "lua c = box.net.sql.connect('abcd')" exec admin "lua dump = function(v) return box.cjson.encode(v) end" exec admin "lua connect = {}" exec admin "lua for tk in string.gmatch(os.getenv('MYSQL'), '[^:]+') do table.insert(connect, tk) end" # mysql exec admin "lua c = box.net.sql.connect('mysql', unpack(connect))" exec admin "lua for k, v in pairs(c) do print(k, ': ', type(v)) end" exec admin "lua c:execute('SEL ECT 1')" exec admin "lua dump({c:execute('SELECT ? AS bool1, ? AS bool2, ? AS nil, ? AS num, ? AS str', true, false, nil, 123, 'abc')})" exec admin "lua dump({c:execute('SELECT * FROM (SELECT ?) t WHERE 1 = 0', 2)})" exec admin "lua dump({c:execute('CREATE PROCEDURE p1() BEGIN SELECT 1 AS One; SELECT 2 AS Two, 3 AS Three; END')})" exec admin "lua dump({c:execute('CALL p1')})" exec admin "lua dump({c:execute('DROP PROCEDURE p1')})" exec admin "lua dump({c:execute('SELECT 1 AS one UNION ALL SELECT 2')})" exec admin "lua dump({c:execute('SELECT 1 AS one UNION ALL SELECT 2; SELECT ? AS two', 'abc')})" exec admin "lua c:quote('test \"abc\" test')" exec admin "lua c:begin_work()" exec admin "lua c:rollback()" exec admin "lua c:begin_work()" exec admin "lua c:commit()" tarantool-1.5.1.218.g1a69fd6/test/box/xlog.result0000664000000000000000000000256012231715257017750 0ustar rootroot # Inprogress xlog must be renamed before second insert. insert into t0 values (1, 'first tuple') Insert OK, 1 row affected 00000000000000000002.xlog.inprogress exists insert into t0 values (2, 'second tuple') Insert OK, 1 row affected 00000000000000000002.xlog.inprogress has been successfully renamed # Inprogress xlog must be renamed during regular termination. insert into t0 values (3, 'third tuple') Insert OK, 1 row affected 00000000000000000004.xlog.inprogress exists Stopping the server... 00000000000000000004.xlog.inprogress has been successfully renamed # An inprogress xlog file with one record must be renamed during recovery. 00000000000000000005.xlog.inprogress hash been successfully renamed # Empty (zero size) inprogress xlog must be deleted during recovery. 00000000000000000006.xlog.inprogress has been successfully deleted # Empty (header only, no records) inprogress xlog must be deleted # during recovery. 00000000000000000006.xlog.inprogress has been successfully deleted # Inprogress xlog with bad record must be deleted during recovery. 00000000000000000006.xlog.inprogress has been successfully deleted A test case for https://bugs.launchpad.net/tarantool/+bug/1052018 panic_on_wal_error doens't work for duplicate key errors lua box.space[0]:select(0, 1) --- - 1: {} ... lua box.space[0]:select(0, 2) --- - 2: {} ... lua #box.space[0] --- - 0 ... tarantool-1.5.1.218.g1a69fd6/test/box/dup_key1.xlog0000664000000000000000000000021112231715257020142 0ustar rootrootXLOG 0.11 QV[zAB^/   <= 0 --- - true ... lua box.slab.arena_size > 0 --- - true ... lua string.match(tostring(box.slab.slabs), '^table:') ~= nil --- - true ... lua for k, v in pairs(box.slab()) do print(k) end --- slabs arena_size arena_used ... # # box.error # lua for k,v in pairs(box.error) do print('box.error.', k, ': ', v) end --- box.error.ER_ILLEGAL_PARAMS: 514 box.error.ER_KEY_FIELD_TYPE: 9730 box.error.ER_NONMASTER: 258 box.error.ER_PROC_RET: 12290 box.error.ER_TUPLE_IS_TOO_LONG: 11010 box.error.ER_EXACT_MATCH: 11522 box.error.ER_PROC_LUA: 13058 box.error.ER_FIELD_TYPE: 10242 box.error.ER_UPDATE_FIELD: 14338 box.error.ER_TUPLE_FOUND: 14082 box.error.ER_OK: 0 box.error.ER_NO_SUCH_FIELD: 13826 box.error.ER_TUPLE_NOT_FOUND: 12546 box.error.ER_FIBER_STACK: 6658 box.error.ER_SPLICE: 10754 box.error.ER_NO_SUCH_INDEX: 13570 box.error.ER_UNSUPPORTED: 2562 box.error.ER_INJECTION: 2306 box.error.ER_SPACE_DISABLED: 13314 box.error.ER_INDEX_TYPE: 1282 box.error.ER_ARG_TYPE: 10498 box.error.ER_NO_SUCH_SPACE: 14594 box.error.ER_UNKNOWN_UPDATE_OP: 11266 box.error.ER_SPACE_EXISTS: 1538 box.error.ER_NO_SUCH_PROC: 12802 box.error.ER_WAL_IO: 9986 box.error.ER_KEY_PART_COUNT: 12034 box.error.ER_TUPLE_IS_RO: 1025 box.error.ER_SECONDARY: 770 box.error.ER_MEMORY_ISSUE: 1793 ... tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bad2.cfg0000664000000000000000000000051712231715257021113 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" #primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 #space[0].enabled = 1 #space[0].index[0].type = "HASH" space[0].index[0].unique = 1 #space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/admin_coredump.result0000664000000000000000000000003112231715257021754 0ustar rootrootsave coredump --- ok ... tarantool-1.5.1.218.g1a69fd6/test/box/ipc.result0000664000000000000000000000507112231715257017552 0ustar rootrootlua ch = box.ipc.channel() --- ... lua ch:is_full() --- - false ... lua ch:is_empty() --- - true ... lua ch:get(.1) --- - nil ... lua ch:put() --- error: 'usage: channel:put(var [, timeout])' ... lua ch:put('test') --- - true ... lua ch:get() --- - test ... lua ch:get('wrong timeout') --- error: 'timeout must be a number' ... lua ch:get(-10) --- error: 'wrong timeout' ... lua ch:put(234) --- - true ... lua ch:put(345, .5) --- - false ... lua ch:is_full() --- - true ... lua ch:is_empty() --- - false ... lua buffer = {} --- ... lua tfbr = box.fiber.create(function() box.fiber.detach() while true do table.insert(buffer, ch:get()) end end) --- ... lua box.fiber.resume(tfbr) --- ... lua for i = 1, 10 do print(i, ' ', ch:put(i, 0.1)) end --- 1 true 2 true 3 true 4 true 5 true 6 true 7 true 8 true 9 true 10 true ... lua ch:has_readers() --- - true ... lua ch:has_writers() --- - false ... lua box.fiber.cancel(tfbr) --- ... lua ch:has_readers() --- - false ... lua ch:has_writers() --- - false ... lua ch:put(box.info.pid) --- - true ... lua ch:is_full() --- - true ... lua ch:is_empty() --- - false ... lua ch:get(box.info.pid) == box.info.pid --- - true ... lua for i, v in pairs(buffer) do print(v) end --- 234 1 2 3 4 5 6 7 8 9 10 ... lua ch:is_empty() --- - true ... lua ch:broadcast() --- error: 'usage: channel:broadcast(variable)' ... lua ch:broadcast(123) --- - true ... lua ch:get() --- - 123 ... lua ch:is_full() --- - false ... lua ch:is_empty() --- - true ... lua tfbr = box.fiber.create(function() box.fiber.detach() while true do local v = ch:get() table.insert(buffer, 'tfbr - ' .. tostring(v)) end end) --- ... lua box.fiber.resume(tfbr) --- ... lua tfbr2 = box.fiber.create(function() box.fiber.detach() while true do local v = ch:get() table.insert(buffer, 'tfbr2 - ' .. tostring(v)) end end) --- ... lua box.fiber.resume(tfbr2) --- ... lua buffer = {} --- ... lua for i, v in pairs(buffer) do print(v) end --- ... lua ch:is_full() --- - false ... lua ch:is_empty() --- - true ... lua ch:put(1) --- - true ... lua ch:put(2) --- - true ... lua ch:put(3) --- - true ... lua ch:put(4) --- - true ... lua ch:put(5) --- - true ... lua ch:broadcast('broadcast message!') --- - 2 ... lua for i = 35, 45 do print(ch:put(i)) end --- true true true true true true true true true true true ... lua for i, v in pairs(buffer) do print(v) end --- tfbr - 1 tfbr2 - 2 tfbr - 3 tfbr2 - 4 tfbr - 5 tfbr2 - broadcast message! tfbr - broadcast message! tfbr2 - 35 tfbr - 36 tfbr2 - 37 tfbr - 38 tfbr2 - 39 tfbr - 40 tfbr2 - 41 tfbr - 42 tfbr2 - 43 tfbr - 44 tfbr2 - 45 ... tarantool-1.5.1.218.g1a69fd6/test/box/configuration.result0000664000000000000000000001525112231715276021650 0ustar rootroot # Bug #708685: # Addition of required configuration file options broke backward # compatibility # (https://bugs.launchpad.net/bugs/708685) show configuration --- configuration: username: (null) local_hot_standby: "false" bind_ipaddr: "INADDR_ANY" coredump: "false" admin_port: "33015" replication_port: "0" log_level: "4" slab_alloc_arena: "0.1" slab_alloc_minimal: "64" slab_alloc_factor: "2" work_dir: (null) snap_dir: "." wal_dir: "." script_dir: "." pid_file: "box.pid" logger: "cat - >> tarantool.log" logger_nonblock: "true" io_collect_interval: "0" backlog: "1024" readahead: "16320" snap_io_rate_limit: "0" rows_per_wal: "50" wal_writer_inbox_size: "16384" wal_mode: "fsync_delay" wal_fsync_delay: "0" wal_dir_rescan_delay: "0.1" panic_on_snap_error: "true" panic_on_wal_error: "false" primary_port: "33013" secondary_port: "33014" too_long_threshold: "0.5" custom_proc_title: (null) memcached_port: "0" memcached_space: "23" memcached_expire: "false" memcached_expire_per_loop: "1024" memcached_expire_full_sweep: "3600" replication_source: (null) space[0].enabled: "true" space[0].cardinality: "-1" space[0].estimated_rows: "0" space[0].index[0].type: "HASH" space[0].index[0].unique: "true" space[0].index[0].key_field[0].fieldno: "0" space[0].index[0].key_field[0].type: "NUM" space[1].enabled: "false" space[1].cardinality: "-1" space[1].estimated_rows: "0" space[2].enabled: "true" space[2].cardinality: "-1" space[2].estimated_rows: "0" space[2].index[0].type: "HASH" space[2].index[0].unique: "true" space[2].index[0].key_field[0].fieldno: "0" space[2].index[0].key_field[0].type: "NUM" ... # Bug #884768: # Test representation of boolean values # (https://bugs.launchpad.net/bugs/884768) show configuration --- configuration: username: (null) local_hot_standby: "false" bind_ipaddr: "INADDR_ANY" coredump: "false" admin_port: "33015" replication_port: "0" log_level: "4" slab_alloc_arena: "0.1" slab_alloc_minimal: "64" slab_alloc_factor: "2" work_dir: (null) snap_dir: "." wal_dir: "." script_dir: "." pid_file: "box.pid" logger: "cat - >> tarantool.log" logger_nonblock: "true" io_collect_interval: "0" backlog: "1024" readahead: "16320" snap_io_rate_limit: "0" rows_per_wal: "50" wal_writer_inbox_size: "16384" wal_mode: "fsync_delay" wal_fsync_delay: "0" wal_dir_rescan_delay: "0.1" panic_on_snap_error: "true" panic_on_wal_error: "false" primary_port: "33013" secondary_port: "33014" too_long_threshold: "0.5" custom_proc_title: (null) memcached_port: "0" memcached_space: "23" memcached_expire: "false" memcached_expire_per_loop: "1024" memcached_expire_full_sweep: "3600" replication_source: (null) space[0].enabled: "false" space[0].cardinality: "-1" space[0].estimated_rows: "0" space[0].index[0].type: "HASH" space[0].index[0].unique: "false" space[0].index[0].key_field[0].fieldno: "0" space[0].index[0].key_field[0].type: "NUM" space[1].enabled: "true" space[1].cardinality: "-1" space[1].estimated_rows: "0" space[1].index[0].type: "HASH" space[1].index[0].unique: "true" space[1].index[0].key_field[0].fieldno: "0" space[1].index[0].key_field[0].type: "NUM" space[2].enabled: "false" space[2].cardinality: "-1" space[2].estimated_rows: "0" space[2].index[0].type: "HASH" space[2].index[0].unique: "false" space[2].index[0].key_field[0].fieldno: "0" space[2].index[0].key_field[0].type: "NUM" space[3].enabled: "true" space[3].cardinality: "-1" space[3].estimated_rows: "0" space[3].index[0].type: "HASH" space[3].index[0].unique: "true" space[3].index[0].key_field[0].fieldno: "0" space[3].index[0].key_field[0].type: "NUM" space[4].enabled: "false" space[4].cardinality: "-1" space[4].estimated_rows: "0" space[4].index[0].type: "HASH" space[4].index[0].unique: "false" space[4].index[0].key_field[0].fieldno: "0" space[4].index[0].key_field[0].type: "NUM" space[5].enabled: "true" space[5].cardinality: "-1" space[5].estimated_rows: "0" space[5].index[0].type: "HASH" space[5].index[0].unique: "true" space[5].index[0].key_field[0].fieldno: "0" space[5].index[0].key_field[0].type: "NUM" space[6].enabled: "false" space[6].cardinality: "-1" space[6].estimated_rows: "0" space[6].index[0].type: "HASH" space[6].index[0].unique: "false" space[6].index[0].key_field[0].fieldno: "0" space[6].index[0].key_field[0].type: "NUM" space[7].enabled: "true" space[7].cardinality: "-1" space[7].estimated_rows: "0" space[7].index[0].type: "HASH" space[7].index[0].unique: "true" space[7].index[0].key_field[0].fieldno: "0" space[7].index[0].key_field[0].type: "NUM" space[8].enabled: "false" space[8].cardinality: "-1" space[8].estimated_rows: "0" space[8].index[0].type: "HASH" space[8].index[0].unique: "false" space[8].index[0].key_field[0].fieldno: "0" space[8].index[0].key_field[0].type: "NUM" space[9].enabled: "true" space[9].cardinality: "-1" space[9].estimated_rows: "0" space[9].index[0].type: "HASH" space[9].index[0].unique: "true" space[9].index[0].key_field[0].fieldno: "0" space[9].index[0].key_field[0].type: "NUM" ... # Bug #876541: # Test floating point values (wal_fsync_delay) with fractional part # (https://bugs.launchpad.net/bugs/876541) lua box.cfg.wal_fsync_delay --- - 0.01 ... # Bug#928413 Lua malfunction on certain configuration # (https://bugs.launchpad.net/bugs/928413) lua box.cfg.wal_fsync_delay --- - 0.1 ... lua box.space[0].enabled --- - true ... reload configuration --- ok ... # Test field type conflict in keys tarantool_box -c tarantool_bad_type.cfg tarantool_box: can't load config: - (space = 0 fieldno = 0) index field type mismatch lua print_config() --- io_collect_interval = 0 pid_file = box.pid slab_alloc_minimal = 64 primary_port = 33013 log_level = 4 logger_nonblock = true memcached_expire_per_loop = 1024 snap_dir = . coredump = false panic_on_snap_error = true memcached_expire_full_sweep = 3600 replication_port = 0 wal_fsync_delay = 0 too_long_threshold = 0.5 slab_alloc_factor = 2 admin_port = 33015 logger = cat - >> tarantool.log snap_io_rate_limit = 0 wal_writer_inbox_size = 16384 memcached_expire = false backlog = 1024 memcached_space = 23 memcached_port = 0 rows_per_wal = 50 wal_mode = fsync_delay local_hot_standby = false secondary_port = 33014 panic_on_wal_error = false script_dir = script_dir wal_dir = . bind_ipaddr = INADDR_ANY readahead = 16320 slab_alloc_arena = 0.1 wal_dir_rescan_delay = 0.1 ... lua string.gmatch(package_path, '([^;]*)')() --- - script_dir/?.lua ... lua string.gmatch(package_cpath, '([^;]*)')() --- - script_dir/?.so ... lua mod.test(10, 15) --- - 25 ... tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.common.skipcond0000664000000000000000000000055412242653271022227 0ustar rootroot# encoding: tarantool import os try: (host, port, user, password, db) = os.getenv('MYSQL').split(':') except (RuntimeError, TypeError, NameError, AttributeError, ValueError): self.skip = 1 import os try: (host, port, user, password, db) = os.getenv('PG').split(':') except (RuntimeError, TypeError, NameError, AttributeError, ValueError): self.skip = 1 tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.common.test0000664000000000000000000000025312242653271021370 0ustar rootroot# encoding: tarantool exec admin "lua c = box.net.sql.connect('abcd')" exec admin "lua c = box.net.sql.connect('mysql')" exec admin "lua c = box.net.sql.connect('pg')" tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bad3.cfg0000664000000000000000000000052112231715257021107 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 #space[0].enabled = 1 #space[0].index[0].type = "HASH" #space[0].index[0].unique = 1 #space[0].index[0].key_field[0].fieldno = 0 #space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/lua_misc.test0000664000000000000000000000210712231715257020231 0ustar rootroot# encoding: tarantool print """ # # box.raise # """ exec admin "lua 1 + 1" exec admin "lua box.raise(123, 'test')" exec admin "lua box.raise(0, 'the other test')" exec admin "lua box.raise(12, 345)" print """ # # box.stat # """ exec admin "lua for k, v in pairs(box.stat()) do print(k) end" exec admin "lua for k, v in pairs(box.stat().DELETE) do print(k) end" exec admin "lua for k, v in pairs(box.stat.DELETE) do print(k) end" print """ # # box.space # """ exec admin "lua type(box)" exec admin "lua type(box.space)" exec admin "lua box.cfg.memcached_space" exec admin "lua for i, v in pairs(box.space[0].index[0].key_field[0]) do print(i, ': ', v) end" print """ # # box.space # """ exec admin "lua string.match(tostring(box.slab), '^table:') ~= nil" exec admin "lua box.slab.arena_used >= 0" exec admin "lua box.slab.arena_size > 0" exec admin "lua string.match(tostring(box.slab.slabs), '^table:') ~= nil" exec admin "lua for k, v in pairs(box.slab()) do print(k) end" print """ # # box.error # """ exec admin "lua for k,v in pairs(box.error) do print('box.error.', k, ': ', v) end" tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_wo_cpt.cfg0000664000000000000000000000077212242653271021600 0ustar rootroot# This config does not contain custom_proc_title option slab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 # These are modifiable settings, change them. too_long_threshold=2 snap_io_rate_limit = 10 io_collect_interval = 0.01 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bad_type.cfg0000664000000000000000000000105712231715257022072 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 # This is one of the few modifiable settings, change it too_long_threshold=2 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" space[0].index[1].type = "TREE" space[0].index[1].unique = 1 space[0].index[1].key_field[0].fieldno = 0 space[0].index[1].key_field[0].type = "NUM64" tarantool-1.5.1.218.g1a69fd6/test/box/lua_sandbox.test0000664000000000000000000000061112231715276020733 0ustar rootroot# encoding: tarantool # # Test that some built-in functions were disabled by sandbox # exec admin "lua os.execute" exec admin "lua os.exit" exec admin "lua os.rename" exec admin "lua os.tmpname" exec admin "lua os.remove" exec admin "lua io" exec admin "lua require" exec admin "lua package" # FFI can be mistakenly saved to the global variable by the one of our modules exec admin "lua ffi" tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bad1.cfg0000664000000000000000000000052112231715257021105 0ustar rootrootslab_alloc_arena = 0.2 pid_file = "/var/run/box.pid" logger="cat tarantool.log" primary_port = 33023 secondary_port = 33024 admin_port = 33025 rows_per_wal = 500 space[0].enabled = 0 space[0].index[0].type = "TREE" space[0].index[0].unique = 0 space[0].index[0].key_field[0].fieldno = 1 space[0].index[0].key_field[0].type = "STR" tarantool-1.5.1.218.g1a69fd6/test/box/xlog.test0000664000000000000000000000716612231715257017420 0ustar rootroot# encoding: tarantool # import os from os.path import abspath import shutil # cleanup vardir server.stop() server.deploy() server.stop() print """ # Inprogress xlog must be renamed before second insert. """ wal_inprogress = os.path.join(vardir, "00000000000000000002.xlog.inprogress") wal = os.path.join(vardir, "00000000000000000002.xlog") server.start() exec sql "insert into t0 values (1, 'first tuple')" if os.access(wal_inprogress, os.F_OK): print "00000000000000000002.xlog.inprogress exists" exec sql "insert into t0 values (2, 'second tuple')" if os.access(wal, os.F_OK) and not os.access(wal_inprogress, os.F_OK): print "00000000000000000002.xlog.inprogress has been successfully renamed" server.stop() print """ # Inprogress xlog must be renamed during regular termination. """ server.start() wal_inprogress = os.path.join(vardir, "00000000000000000004.xlog.inprogress") wal = os.path.join(vardir, "00000000000000000004.xlog") exec sql "insert into t0 values (3, 'third tuple')" if os.access(wal_inprogress, os.F_OK): print "00000000000000000004.xlog.inprogress exists" server.stop(silent=False) if os.access(wal, os.F_OK) and not os.access(wal_inprogress, os.F_OK): print "00000000000000000004.xlog.inprogress has been successfully renamed" print """ # An inprogress xlog file with one record must be renamed during recovery. """ wal_inprogress = os.path.join(vardir, "00000000000000000005.xlog.inprogress") wal = os.path.join(vardir, "00000000000000000005.xlog") os.symlink(abspath("box/unfinished.xlog"), wal_inprogress) server.start() if os.access(wal, os.F_OK) and not os.access(wal_inprogress, os.F_OK): print "00000000000000000005.xlog.inprogress hash been successfully renamed" server.stop() print """ # Empty (zero size) inprogress xlog must be deleted during recovery. """ wal_inprogress = os.path.join(vardir, "00000000000000000006.xlog.inprogress") wal = os.path.join(vardir, "00000000000000000006.xlog") os.symlink(abspath("box/empty.xlog"), wal_inprogress) server.start() if not os.access(wal_inprogress, os.F_OK) and not os.access(wal, os.F_OK): print "00000000000000000006.xlog.inprogress has been successfully deleted" server.stop() print """ # Empty (header only, no records) inprogress xlog must be deleted # during recovery. """ # If the previous test has failed, there is a dangling link # and symlink fails. try: os.symlink(abspath("box/just_header.xlog"), wal_inprogress) except OSError as e: print e server.start() if not os.access(wal_inprogress, os.F_OK) and not os.access(wal, os.F_OK): print "00000000000000000006.xlog.inprogress has been successfully deleted" server.stop() print """ # Inprogress xlog with bad record must be deleted during recovery. """ # If the previous test has failed, there is a dangling link # and symlink fails. try: os.symlink(abspath("box/bad_record.xlog"), wal_inprogress) except OSError as e: print e server.start() if not os.access(wal_inprogress, os.F_OK) and not os.access(wal, os.F_OK): print "00000000000000000006.xlog.inprogress has been successfully deleted" print """ A test case for https://bugs.launchpad.net/tarantool/+bug/1052018 panic_on_wal_error doens't work for duplicate key errors """ server.stop() server.deploy("box/panic_on_wal_error.cfg") server.stop() shutil.copy(abspath("box/dup_key1.xlog"), os.path.join(vardir, "00000000000000000002.xlog")) shutil.copy(abspath("box/dup_key2.xlog"), os.path.join(vardir, "00000000000000000004.xlog")) server.start() exec admin "lua box.space[0]:select(0, 1)" exec admin "lua box.space[0]:select(0, 2)" exec admin "lua #box.space[0]" # cleanup server.stop() server.deploy() # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/net.box.result0000664000000000000000000000630212231715257020352 0ustar rootrootlua remote = box.net.box.new('localhost', box.cfg.primary_port, '0.5') --- ... lua type(remote) --- - table ... lua remote:ping() --- - true ... lua remote:ping() --- - true ... lua box.net.box.ping(remote) --- - true ... lua box.insert(0, 123, 'test1', 'test2') --- - 123: {'test1', 'test2'} ... lua box.select(0, 0, 123) --- - 123: {'test1', 'test2'} ... lua tuple = remote:select(0, 0, 123) --- ... lua remote:call('box.select', '0', '0', 123) --- - 123: {'test1', 'test2'} ... lua tuple --- - 123: {'test1', 'test2'} ... lua type(tuple) --- - userdata ... lua #tuple --- - 3 ... lua box.update(0, 123, '=p', 1, 'test1-updated') --- - 123: {'test1-updated', 'test2'} ... lua remote:update(0, 123, '=p', 2, 'test2-updated') --- - 123: {'test1-updated', 'test2-updated'} ... lua box.insert(0, 123, 'test1', 'test2') --- error: 'Duplicate key exists in unique index 0' ... lua remote:insert(0, 123, 'test1', 'test2') --- error: 'Duplicate key exists in unique index 0' ... lua remote:insert(0, 345, 'test1', 'test2') --- - 345: {'test1', 'test2'} ... lua remote:select(0, 0, 345) --- - 345: {'test1', 'test2'} ... lua remote:call('box.select', '0', '0', 345) --- - 345: {'test1', 'test2'} ... lua box.select(0, 0, 345) --- - 345: {'test1', 'test2'} ... lua remote:replace(0, 345, 'test1-replaced', 'test2-replaced') --- - 345: {'test1-replaced', 'test2-replaced'} ... lua box.select(0, 0, 345) --- - 345: {'test1-replaced', 'test2-replaced'} ... lua remote:select_limit(0, 0, 0, 1000, 345) --- - 345: {'test1-replaced', 'test2-replaced'} ... lua box.select_range(0, 0, 1000) --- - 123: {'test1-updated', 'test2-updated'} - 345: {'test1-replaced', 'test2-replaced'} ... lua remote:select_range(0, 0, 1000) --- - 123: {'test1-updated', 'test2-updated'} - 345: {'test1-replaced', 'test2-replaced'} ... lua box.select(0, 0, 345) --- - 345: {'test1-replaced', 'test2-replaced'} ... lua remote:select(0, 0, 345) --- - 345: {'test1-replaced', 'test2-replaced'} ... lua remote:timeout(0.5):select(0, 0, 345) --- - 345: {'test1-replaced', 'test2-replaced'} ... lua remote:call('box.fiber.sleep', '.01') --- ... lua remote:timeout(0.01):call('box.fiber.sleep', '10') --- - nil ... lua pstart = box.time() --- ... lua parallel = {} --- ... lua function parallel_foo(id) box.fiber.sleep(math.random() * .05) return id end --- ... lua parallel_foo('abc') --- - abc ... lua for i = 1, 20 do box.fiber.resume(box.fiber.create(function() box.fiber.detach() local s = string.format('%07d', i) local so = remote:call('parallel_foo', s) table.insert(parallel, tostring(s == so[0]) ) end)) end --- ... lua for i = 1, 20 do if #parallel == 20 then break end box.fiber.sleep(0.1) end --- ... lua unpack(parallel) --- - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true ... lua #parallel --- - 20 ... lua box.time() - pstart < 0.5 --- - true ... lua remote:close() --- - true ... lua remote:close() --- error: '[string "-- box_net.lua (internal file)..."]:404: box.net.box: already closed' ... lua remote:ping() --- error: '[string "-- box_net.lua (internal file)..."]:409: box.net.box: connection was closed' ... lua box.space[0]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/box/reconfigure.result0000664000000000000000000000522512242653271021307 0ustar rootrootlua box.cfg.too_long_threshold --- - 0.5 ... reload configuration --- fail: - Could not accept read only 'slab_alloc_arena' option - Could not accept read only 'pid_file' option - Could not accept read only 'logger' option - Could not accept read only 'primary_port' option - Could not accept read only 'secondary_port' option - Could not accept read only 'admin_port' option - Could not accept read only 'rows_per_wal' option - Could not accept read only 'space[0].enabled' option - Could not accept read only 'space[0].index[0].type' option - Could not accept read only 'space[0].index[0].unique' option - Could not accept read only 'space[0].index[0].key_field[0].fieldno' option - Could not accept read only 'space[0].index[0].key_field[0].type' option ... lua box.cfg.too_long_threshold --- - 0.5 ... reload configuration --- fail: - Option 'primary_port' is not set (or has a default value) - Option 'space[0].enabled' is not set (or has a default value) - Option 'space[0].index[0].type' is not set (or has a default value) - Option 'space[0].index[0].key_field[0].fieldno' is not set (or has a default value) ... reload configuration --- fail: - at least one space or memcached port must be defined ... reload configuration --- fail: - Could not accept read only 'space[1].enabled' option ... reload configuration --- fail: - Could not accept read only 'space[0].index[0].key_field[1].fieldno' option ... reload configuration --- ok ... lua box.cfg.too_long_threshold --- - 2 ... lua box.cfg.snap_io_rate_limit --- - 10 ... lua box.cfg.io_collect_interval --- - 0.01 ... reload configuration --- fail: - empty configuration file 'tarantool.cfg' ... lua box.cfg.too_long_threshold --- - 2 ... reload configuration --- fail: - can't open config `tarantool.cfg' ... reload configuration --- ok ... lua box.cfg.too_long_threshold --- - 0.5 ... # # A test case for http://bugs.launchpad.net/bugs/712447: # Valgrind reports use of not initialized memory after 'reload # configuration' # insert into t0 values (1, 'tuple') Insert OK, 1 row affected save snapshot --- ok ... reload configuration --- fail: - can't open config `tarantool.cfg' ... insert into t0 values (2, 'tuple 2') Insert OK, 1 row affected save snapshot --- ok ... reload configuration --- ok ... insert into t0 values (3, 'tuple 3') Insert OK, 1 row affected save snapshot --- ok ... # # A test case for https://github.com/tarantool/tarantool/issues/112: # Tarantool crushes with SIGSEGV during reload configuration # reload configuration --- ok ... reload configuration --- fail: - Could not accept read only 'custom_proc_title' option ... reload configuration --- ok ... lua box.space[0]:truncate() --- ... tarantool-1.5.1.218.g1a69fd6/test/box/admin.test0000664000000000000000000000157012231715257017530 0ustar rootroot# encoding: tarantool # import sys # clear statistics: server.stop() server.deploy() exec admin "exit" exec admin "show stat" exec admin "help" exec admin "show configuration" exec admin "show stat" exec sql "insert into t0 values (1, 'tuple')" exec admin "save snapshot" exec sql "delete from t0 where k0 = 1" sys.stdout.push_filter("(\d)\.\d\.\d(-\d+-\w+)?", "\\1.minor.patch--") sys.stdout.push_filter("pid: \d+", "pid: ") sys.stdout.push_filter("logger_pid: \d+", "pid: ") sys.stdout.push_filter("uptime: \d+", "uptime: ") sys.stdout.push_filter("uptime: \d+", "uptime: ") sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool") exec admin "show info" sys.stdout.clear_all_filters() sys.stdout.push_filter(".*", "") exec admin "show fiber" exec admin "show slab" exec admin "show palloc" sys.stdout.clear_all_filters() # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/protocol.result0000664000000000000000000000111712231715257020635 0ustar rootroot *** test_ping *** return_code: 0 *** test_ping: done *** *** test_replace *** return_code: 0 *** test_replace: done *** *** test_bug702397 *** return_code: ER_ILLEGAL_PARAMS, Illegal parameters, tuple count must be positive *** test_bug702397: done *** *** test_bug702399 *** return_code: ER_NO_SUCH_INDEX, No index #1 is defined in space 0 *** test_bug702399: done *** *** test_bug1009992 *** return_code: ER_ILLEGAL_PARAMS, Illegal parameters, unsupported command code, check the error log *** test_bug1009992: done *** delete from t0 where k0 = 1 Delete OK, 1 row affected tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bad4.cfg0000664000000000000000000000054112231715257021112 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" space[1].enabled = 1 tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bug750658.cfg0000664000000000000000000000162612231715257021561 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). # slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # pid_file = "box.pid" # # Read only and read-write port. primary_port = 33013 # Read-only port. secondary_port = 33014 # # The port for administrative commands. # admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50 # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/lua.test0000664000000000000000000006367512242653271017236 0ustar rootroot# encoding: tarantool import os import sys # Test Lua from admin console. Whenever producing output, # make sure it's a valid YAML. exec admin "lua" exec admin "lua 1" exec admin "lua print(' lua says: hello')" # What's in the box? exec admin "lua local t = {} for n in pairs(box) do table.insert(t, ' - box.' .. tostring(n)) end table.sort(t) for i = 1, #t do print(t[i]) end t = nil" # Test box.pack() exec admin "lua box.pack()" exec admin "lua box.pack(1)" exec admin "lua box.pack('abc')" exec admin "lua print(box.pack('a', ' - hello'))" exec admin "lua print(box.pack('Aa', ' - hello', ' world'))" exec admin "lua print(box.pack('w', 0x30))" exec admin "lua print(box.pack('www', 0x30, 0x30, 0x30))" exec admin "lua print(box.pack('www', 0x3030, 0x30))" exec admin "lua print(string.byte(box.pack('w', 212345), 1, 2))" exec admin "lua print(string.sub(box.pack('p', 1684234849), 2))" exec admin "lua print(box.pack('p', 'this string is 45 characters long 1234567890 '))" exec admin "lua print(box.pack('s', 0x4d))" exec admin "lua print(box.pack('ssss', 25940, 29811, 28448, 11883))" exec admin "lua print(box.pack('SSSS', 25940, 29811, 28448, 11883))" exec admin "lua print(box.pack('SSSSSSSS', 28493, 29550, 27680, 27497, 29541, 20512, 29285, 8556))" exec admin "lua print(box.pack('bsilww', 84, 29541, 1802444916, 2338318684567380014ULL, 103, 111))" exec admin "lua print(box.unpack('b', 'T'))" exec admin "lua print(box.unpack('s', 'Te'))" exec admin "lua print(box.unpack('i', 'Test'))" exec admin "lua print(box.unpack('l', 'Test ok.'))" exec admin "lua box.unpack('bsil', box.pack('bsil', 255, 65535, 4294967295, tonumber64('18446744073709551615')))" exec admin "lua box.unpack('www', box.pack('www', 255, 65535, 4294967295))" exec admin "lua box.unpack('ppp', box.pack('ppp', 'one', 'two', 'three'))" exec admin "lua num, str, num64 = box.unpack('ppp', box.pack('ppp', 666, 'string', tonumber64('666666666666666')))" exec admin "lua print(box.unpack('i', num), str, box.unpack('l', num64))" exec admin "lua box.unpack('=p', box.pack('=p', 1, '666'))" exec admin "lua box.unpack('','')" exec admin "lua box.unpack('ii', box.pack('i', 1))" exec admin "lua box.unpack('i', box.pack('ii', 1, 1))" exec admin "lua box.unpack('+p', box.pack('=p', 1, '666'))" # Test the low-level box.process() call, which takes a binary packet # and passes it to box for execution. # insert: exec admin "lua box.process(13, box.pack('iiippp', 0, 1, 3, 1, 'testing', 'lua rocks'))" # select: exec admin "lua box.process(17, box.pack('iiiiiip', 0, 0, 0, 2^31, 1, 1, 1))" # delete: exec admin "lua box.process(21, box.pack('iiip', 0, 1, 1, 1))" # check delete: exec admin "lua box.process(17, box.pack('iiiiiip', 0, 0, 0, 2^31, 1, 1, 1))" exec admin "lua box.process(22, box.pack('iii', 0, 0, 0))" exec sql "call box.process('abc', 'def')" exec sql "call box.pack('test')" exec sql "call box.pack('p', 'this string is 45 characters long 1234567890 ')" exec sql "call box.pack('p', 'ascii symbols are visible starting from code 20')" exec admin "lua function f1() return 'testing', 1, false, -1, 1.123, 1e123, nil end" exec admin "lua f1()" exec sql "call f1()" exec admin "lua f1=nil" exec sql "call f1()" exec admin "lua function f1() return f1 end" exec sql "call f1()" exec sql "insert into t0 values (1, 'test box delete')" exec sql "call box.delete('0', '\1\0\0\0')" exec sql "call box.delete('0', '\1\0\0\0')" exec sql "insert into t0 values (1, 'test box delete')" exec admin "lua box.delete(0, 1)" exec admin "lua box.delete(0, 1)" exec sql "insert into t0 values ('abcd', 'test box delete')" exec sql "call box.delete('0', '\1\0\0\0')" exec sql "call box.delete('0', 'abcd')" exec sql "call box.delete('0', 'abcd')" exec sql "insert into t0 values ('abcd', 'test box delete')" exec admin "lua box.delete(0, 'abcd')" exec admin "lua box.delete(0, 'abcd')" exec sql "call box.select('0', '0', 'abcd')" exec sql "insert into t0 values ('abcd', 'test box.select()')" exec sql "call box.select('0', '0', 'abcd')" exec admin "lua box.select(0, 0, 'abcd')" exec admin "lua box.select(0, 0)" exec admin "lua box.select(0, 1)" exec admin "lua box.select(0)" exec sql "call box.replace('0', 'abcd', 'hello', 'world')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.select('0', '0', 'abcd')" exec sql "call box.select('0', '0', 'defc')" exec sql "call box.replace('0', 'abcd')" exec sql "call box.select('0', '0', 'abcd')" exec sql "call box.delete('0', 'abcd')" exec sql "call box.delete('0', 'defc')" exec sql "call box.insert('0', 'test', 'old', 'abcd')" # test that insert produces a duplicate key error exec sql "call box.insert('0', 'test', 'old', 'abcd')" exec sql "call box.update('0', 'test', '=p=p', '\0\0\0\0', 'pass', 1, 'new')" exec sql "call box.select('0', '0', 'pass')" exec sql "call box.select_range(0, 0, 1, 'pass')" exec sql "call box.update('0', 'miss', '+p', 2, '\1\0\0\0')" exec sql "call box.update('0', 'pass', '+p', 2, '\1\0\0\0')" exec sql "call box.update('0', 'pass', '-p', 2, '\1\0\0\0')" exec sql "call box.update('0', 'pass', '-p', 2, '\1\0\0\0')" exec admin "lua box.update(0, 'pass', '+p', 2, 1)" exec sql "call box.select('0', '0', 'pass')" exec admin "lua function field_x(space, key, field_index) return (box.select(space, 0, key))[tonumber(field_index)] end" exec sql "call field_x('0', 'pass', '0')" exec sql "call field_x('0', 'pass', '1')" exec sql "call box.delete('0', 'pass')" fifo_lua = os.path.abspath("box/fifo.lua") # don't log the path name sys.stdout.push_filter("lua dofile(.*)", "lua dofile(...)") exec admin "lua dofile('{0}')".format(fifo_lua) sys.stdout.pop_filter() exec admin "lua fifo_max" exec admin "lua fifo_push('test', 1)" exec admin "lua fifo_push('test', 2)" exec admin "lua fifo_push('test', 3)" exec admin "lua fifo_push('test', 4)" exec admin "lua fifo_push('test', 5)" exec admin "lua fifo_push('test', 6)" exec admin "lua fifo_push('test', 7)" exec admin "lua fifo_push('test', 8)" exec admin "lua fifo_top('test')" exec admin "lua box.delete(0, 'test')" exec admin "lua fifo_top('test')" exec admin "lua box.delete(0, 'test')" exec admin "lua for k,v in pairs(box.cfg) do print(' - ', k, ': ', v) end" exec admin "lua for k,v in pairs(box.space[0]) do if type(v) ~= 'table' then print(' - ', k, ': ', v) end end" exec admin "reload configuration" exec admin "lua for k,v in pairs(box.cfg) do print(' - ', k, ': ', v) end" exec admin "lua for k,v in pairs(box.space[0]) do if type(v) ~= 'table' then print(' - ', k, ': ', v) end end" # must be read-only exec admin "lua box.cfg.nosuchoption = 1" exec admin "lua box.space[300] = 1" exec admin "lua box.index.new('abc', 'cde')" exec admin "lua box.index.new(1, 2)" exec admin "lua box.index.new(0, 1)" exec admin "lua box.index.new(0, 0)" exec admin "lua #box.index.new(0,0)" exec admin "lua #box.space[0].index[0].idx" exec admin "lua box.insert(0, 'test')" exec admin "lua box.insert(0, 'abcd')" exec admin "lua #box.index.new(0,0)" exec admin "lua #box.space[0].index[0].idx" exec admin "lua box.delete(0, 'test')" exec admin "lua #box.index.new(0,0)" exec admin "lua box.delete(0, 'abcd')" exec admin "lua #box.space[0].index[0].idx" exec admin "lua #box.index.new(0,0)" exec admin "lua box.space[0]:insert('test', 'hello world')" exec admin "lua box.space[0]:update('test', '=p', 1, 'bye, world')" exec admin "lua box.space[0]:delete('test')" # test tuple iterators exec admin "lua t=box.space[0]:insert('test')" exec admin "lua t:next('abcd')" exec admin "lua t:next(1)" exec admin "lua t:next(t)" exec admin "lua t:next(t:next())" exec admin "lua for k, v in t:pairs() do print(v) end" exec admin "lua t=box.space[0]:replace('test', 'another field')" exec admin "lua for k, v in t:pairs() do print(v) end" exec admin "lua t=box.space[0]:replace('test', 'another field', 'one more')" exec admin "lua for k, v in t:pairs() do print(v) end" exec admin "lua t=box.tuple.new({'a', 'b', 'c', 'd'})" exec admin "lua for it,field in t:pairs() do print(field); end" exec admin "lua it, field = t:next()" exec admin "lua getmetatable(it)" exec admin "lua box.space[0]:truncate()" exec admin "lua box.fiber.sleep(0)" exec admin "lua box.fiber.sleep(0.01)" exec admin "lua box.fiber.sleep(0.0001)" exec admin "lua box.fiber.sleep('hello')" exec admin "lua box.fiber.sleep(box, 0.001)" exec admin "lua box.fiber.cancel(box.fiber.self())" exec admin "lua f = box.fiber.self()" exec admin "lua old_id = f:id()" exec admin "lua box.fiber.cancel(f)" exec admin "lua box.fiber.self():id() - old_id < 3" exec admin "lua box.fiber.cancel(box.fiber.self())" exec admin "lua box.fiber.self():id() - old_id < 5" exec admin "lua g = box.fiber.self()" exec admin "lua f==g" exec admin "lua function r() f = box.fiber.create(r) return (box.fiber.resume(f)) end" exec admin "lua r()" exec admin "lua f = box.fiber.create(print('hello')" exec admin "lua box.fiber.resume(f)" # test passing arguments in and out created fiber exec admin "lua function r(a, b) print(a) print(b) return a, b end" exec admin "lua f=box.fiber.create(r)" exec admin "lua box.fiber.resume(f)" exec admin "lua f=box.fiber.create(r)" exec admin "lua box.fiber.resume(f, 'hello')" exec admin "lua f=box.fiber.create(r)" exec admin "lua box.fiber.resume(f, 'hello', 'world')" exec admin "lua f=box.fiber.create(r)" exec admin "lua box.fiber.resume(f, 'hello', 'world', 'wide')" exec admin "lua function y(a, b) c=box.fiber.yield(a) return box.fiber.yield(b, c) end" exec admin "lua f=box.fiber.create(y)" exec admin "lua box.fiber.resume(f, 'hello', 'world')" exec admin "lua box.fiber.resume(f, 'wide')" exec admin "lua box.fiber.resume(f)" exec admin "lua function y() print('started') box.fiber.detach() while true do box.replace(0, 'test', os.time()) box.fiber.sleep(0.001) end end" exec admin "lua f = box.fiber.create(y)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.sleep(0.002)" exec admin "lua box.fiber.cancel(f)" exec admin "lua box.fiber.resume(f)" exec admin "lua f=nil" exec admin "lua for k=1, 10000, 1 do box.fiber.create(function() box.fiber.detach() end) end" exec admin "lua collectgarbage('collect')" # check that these newly created fibers are garbage collected exec admin "lua box.fiber.find(900)" exec admin "lua box.fiber.find(910)" exec admin "lua box.fiber.find(920)" # # Test box.fiber.wrap() # # This should try to infinitely create fibers, # but hit the fiber stack size limit and fail # with an error. # exec admin "lua f = function() box.fiber.wrap(f) end" exec sql "call f()" # # Test argument passing # exec admin "lua f = function(a, b) box.fiber.wrap(function(arg) result = arg end, a..b) end" exec admin "lua f('hello ', 'world')" exec admin "lua result" exec admin "lua f('bye ', 'world')" exec admin "lua result" # # Test that the created fiber is detached # exec admin "lua box.fiber.wrap(function() result = box.fiber.status() end)" exec admin "lua result" # # print """# A test case for Bug#933487 # tarantool crashed during shutdown if non running LUA fiber # was created #""" exec admin "lua f = box.fiber.create(function () return true end)" exec admin "save snapshot" exec admin "save snapshot" exec admin "save snapshot" exec admin "lua box.fiber.resume(f)" exec admin "lua f = box.fiber.create(function () return true end)" # # print """# # #""" exec admin "lua box.space[0]:insert('test', 'something to splice')" exec admin "lua box.space[0]:update('test', ':p', 1, box.pack('ppp', 0, 4, 'no'))" exec admin "lua box.space[0]:update('test', ':p', 1, box.pack('ppp', 0, 2, 'every'))" # check an incorrect offset exec admin "lua box.space[0]:update('test', ':p', 1, box.pack('ppp', 100, 2, 'every'))" exec admin "lua box.space[0]:update('test', ':p', 1, box.pack('ppp', -100, 2, 'every'))" exec admin "lua box.space[0]:truncate()" exec admin "lua box.space[0]:insert('test', 'hello', 'october', '20th'):unpack()" exec admin "lua box.space[0]:truncate()" # check how well we can return tables exec admin "lua function f1(...) return {...} end" exec admin "lua function f2(...) return f1({...}) end" exec sql "call f1('test_', 'test_')" exec sql "call f2('test_', 'test_')" exec sql "call f1()" exec sql "call f2()" # check multi-tuple return exec admin "lua function f3() return {{'hello'}, {'world'}} end" exec sql "call f3()" exec admin "lua function f3() return {'hello', {'world'}} end" exec sql "call f3()" exec admin "lua function f3() return 'hello', {{'world'}, {'canada'}} end" exec sql "call f3()" exec admin "lua function f3() return {}, '123', {{}, {}} end" exec sql "call f3()" exec admin "lua function f3() return { {{'hello'}} } end" exec sql "call f3()" exec admin "lua function f3() return { box.tuple.new('hello'), {'world'} } end" exec sql "call f3()" exec admin "lua function f3() return { {'world'}, box.tuple.new('hello') } end" exec sql "call f3()" exec sql "call f1('jason')" exec sql "call f1('jason', 1, 'test', 2, 'stewart')" lua = """ function box.crossjoin(space0, space1, limit) space0 = tonumber(space0) space1 = tonumber(space1) limit = tonumber(limit) local result = {} for k0, v0 in box.space[space0]:pairs() do for k1, v1 in box.space[space1]:pairs() do if limit <= 0 then return unpack(result) end newtuple = {v0:unpack()} for _, v in v1:pairs() do table.insert(newtuple, v) end table.insert(result, newtuple) limit = limit - 1 end end return unpack(result) end""" exec admin "lua " + lua.replace('\n', ' ') exec admin "lua box.crossjoin(0, 0, 0)" exec admin "lua box.crossjoin(0, 0, 10000)" exec admin "lua box.space[0]:insert(1)" exec sql "call box.crossjoin('0', '0', '10000')" exec admin "lua box.space[0]:insert(2)" exec sql "call box.crossjoin('0', '0', '10000')" exec admin "lua box.space[0]:insert(3, 'hello')" exec sql "call box.crossjoin('0', '0', '10000')" exec admin "lua box.space[0]:insert(4, 'world')" exec admin "lua box.space[0]:insert(5, 'hello world')" exec sql "call box.crossjoin('0', '0', '10000')" exec admin "lua box.space[0]:truncate()" exec admin "lua box.crossjoin = nil" print """ # A test case for Bug#901674 # No way to inspect exceptions from Box in Lua """ exec admin "lua pcall(box.insert, 99, 1, 'test')" exec admin "lua pcall(box.insert, 0, 1, 'hello')" exec admin "lua pcall(box.insert, 0, 1, 'hello')" exec admin "lua box.space[0]:truncate()" print """ # A test case for Bug#908094 # Lua provides access to os.execute() """ exec admin "lua os.execute('ls')" print """ # # box.fiber test (create, resume, yield, status) # """ box_fiber_lua = os.path.abspath("box/box_fiber.lua") # don't log the path name sys.stdout.push_filter("lua dofile(.*)", "lua dofile(...)") exec admin "lua dofile('{0}')".format(box_fiber_lua) sys.stdout.pop_filter() print """ # test box.fiber.status functions: invalid arguments """ exec admin "lua box.fiber.status(1)" exec admin "lua box.fiber.status('fafa-gaga')" exec admin "lua box.fiber.status(nil)" print """ # run fiber's test """ exec admin "lua box_fiber_run_test()" # Testing 64bit exec admin "lua tonumber64(123)" exec admin "lua tonumber64('123')" exec admin "lua type(tonumber64('123')) == 'cdata'" exec admin "lua tonumber64('9223372036854775807') == tonumber64('9223372036854775807')" exec admin "lua tonumber64('9223372036854775807') - tonumber64('9223372036854775800')" exec admin "lua tonumber64('18446744073709551615') == tonumber64('18446744073709551615')" exec admin "lua tonumber64('18446744073709551615') + 1" exec admin "lua tonumber64(-1)" exec admin "lua tonumber64('184467440737095516155')" exec admin "lua string.byte(box.pack('p', tonumber64(123)))" # test delete field exec admin "lua box.space[0]:truncate()" exec sql "call box.insert('0', 'tes1', 'tes2', 'tes3', 'tes4', 'tes5')" exec sql "call box.update('0', 'tes1', '#p', 0, '')" exec sql "call box.update('0', 'tes2', '#p', 0, '')" exec sql "call box.update('0', 'tes3', '#p', 0, '')" exec sql "call box.update('0', 'tes4', '#p', 0, '')" exec admin "lua box.update(0, 'tes5', '#p', 0, '')" exec admin "lua box.space[0]:truncate()" print """ # test box.update: INSERT field """ exec admin "lua box.insert(0, 1, 3, 6, 9)" exec admin "lua box.update(0, 1, '!p', 1, 2)" exec admin "lua box.update(0, 1, '!p!p!p!p', 3, 4, 3, 5, 4, 7, 4, 8)" exec admin "lua box.update(0, 1, '!p!p!p', 9, 10, 9, 11, 9, 12)" exec admin "lua box.space[0]:truncate()" exec admin "lua box.insert(0, 1, 'tuple')" exec admin "lua box.update(0, 1, '#p!p=p', 1, '', 1, 'inserted tuple', 2, 'set tuple')" exec admin "lua box.space[0]:truncate()" exec admin "lua box.insert(0, 1, 'tuple')" exec admin "lua box.update(0, 1, '=p!p#p', 1, 'set tuple', 1, 'inerted tuple', 2, '')" exec admin "lua box.update(0, 1, '!p!p', 0, 3, 0, 2)" exec admin "lua box.space[0]:truncate()" print """ # Test for Bug #955226 # Lua Numbers are passed back wrongly as strings # """ exec admin "lua function foo() return 1, 2, '1', '2' end" exec sql "call foo()" print """ # test update's assign opearations """ exec admin "lua box.replace(0, 1, 'field string value')" exec admin "lua box.update(0, 1, '=p=p=p', 1, 'new field string value', 2, 42, 3, 0xdeadbeef)" print """ # test update's arith opearations """ exec admin "lua box.update(0, 1, '+p&p|p^p', 2, 16, 3, 0xffff0000, 3, 0x0000a0a0, 3, 0xffff00aa)" print """ # test update splice operation """ exec admin "lua ops_list = {}" exec admin "lua table.insert(ops_list, box.upd.splice(1, 0, 3, 'the newest'))" exec admin "lua box.update(0, 1, ':p', 1, box.pack('ppp', 0, 3, 'the newest'))" print """ # test update delete operations """ exec admin "lua box.update(0, 1, '#p#p', 3, '', 2, '')" print """ # test update insert operations """ exec admin "lua box.update(0, 1, '!p!p!p!p', 1, 1, 1, 2, 1, 3, 1, 4)" exec admin "lua box.space[0]:truncate()" print """ # # test that ffi extension is inaccessible # """ exec admin "lua ffi" print """ # # Lua init lua script test # """ print """ # Load testing init lua script """ server.stop() server.deploy(init_lua="box/test_init.lua") print """ # Test asscess to box configuration """ exec admin "lua print_config()" print """ # Test bug #977898 """ # Run a dummy insert to avoid race conditions under valgrind exec admin "lua box.insert(0, 4, 8, 16)" print """ # Test insert from init.lua """ exec admin "lua box.select(0, 0, 1)" exec admin "lua box.select(0, 0, 2)" exec admin "lua box.select(0, 0, 4)" print """ # Test bug #1002272 """ exec admin "lua floor(0.5)" exec admin "lua floor(0.9)" exec admin "lua floor(1.1)" print """ # clean-up after tests """ server.stop() server.deploy(init_lua=None) print """ # Test box.tuple:slice() """ exec admin "lua t=box.tuple.new({'0', '1', '2', '3', '4', '5', '6', '7'})" exec admin "lua t:slice(0)" exec admin "lua t:slice(-1)" exec admin "lua t:slice(1)" exec admin "lua t:slice(-1, -1)" exec admin "lua t:slice(-1, 1)" exec admin "lua t:slice(1, -1)" exec admin "lua t:slice(1, 3)" exec admin "lua t:slice(7)" exec admin "lua t:slice(8)" exec admin "lua t:slice(9)" exec admin "lua t:slice(100500)" exec admin "lua t:slice(9, -1)" exec admin "lua t:slice(6, -1)" exec admin "lua t:slice(4, 4)" exec admin "lua t:slice(6, 4)" exec admin "lua t:slice(0, 0)" exec admin "lua t:slice(9, 10)" exec admin "lua t:slice(-7)" exec admin "lua t:slice(-8)" exec admin "lua t:slice(-9)" exec admin "lua t:slice(-100500)" exec admin "lua t:slice(500, 700)" exec admin "lua box.space[0]:truncate()" print """ # A test case for Bug#911641 box.fiber.sleep() works incorrectly if # a fiber is attached. """ exec admin "lua function r() return box.fiber.sleep(0.01) end" exec admin "lua f = box.fiber.create(r)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.resume(f)" exec admin "lua function r() box.fiber.yield(box.space[0]:insert(0, 0, 1)) box.fiber.yield(box.space[0]:select(0, 0)) box.fiber.yield(box.space[0]:truncate()) end" exec admin "lua f = box.fiber.create(r)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.resume(f)" exec admin "lua function r() return box.fiber.yield(box.fiber.create(r)) end" exec admin "lua f = r()" exec admin "lua f1 = box.fiber.resume(f)" exec admin "lua f2 = box.fiber.resume(f1)" exec admin "lua f3 = box.fiber.resume(f2)" exec admin "lua f4 = box.fiber.resume(f3)" exec admin "lua f5 = box.fiber.resume(f4)" exec admin "lua f6 = box.fiber.resume(f5)" exec admin "lua f7 = box.fiber.resume(f6)" exec admin "lua f8 = box.fiber.resume(f7)" exec admin "lua f9 = box.fiber.resume(f8)" exec admin "lua f10 = box.fiber.resume(f9)" exec admin "lua f11 = box.fiber.resume(f10)" exec admin "lua f12 = box.fiber.resume(f11)" exec admin "lua f13 = box.fiber.resume(f12)" exec admin "lua f14 = box.fiber.resume(f13)" exec admin "lua f15 = box.fiber.resume(f14)" exec admin "lua f16 = box.fiber.resume(f15)" exec admin "lua f17 = box.fiber.resume(f16)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.resume(f1)" exec admin "lua box.fiber.resume(f2)" exec admin "lua box.fiber.resume(f3)" exec admin "lua box.fiber.resume(f4)" exec admin "lua box.fiber.resume(f5)" exec admin "lua box.fiber.resume(f6)" exec admin "lua box.fiber.resume(f7)" exec admin "lua box.fiber.resume(f8)" exec admin "lua box.fiber.resume(f9)" exec admin "lua box.fiber.resume(f10)" exec admin "lua box.fiber.resume(f11)" exec admin "lua box.fiber.resume(f12)" exec admin "lua box.fiber.resume(f13)" exec admin "lua box.fiber.resume(f14)" exec admin "lua box.fiber.resume(f15)" exec admin "lua box.fiber.resume(f16)" exec admin "lua f17 = nil" exec admin "lua function r() box.fiber.detach() box.fiber.sleep(1000) end" exec admin "lua f = box.fiber.create(r)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.cancel(f)" exec admin "lua box.fiber.resume(f)" print """ # A test case for Bug#103491 # server CALL processing bug with name path longer than two # https://bugs.launchpad.net/tarantool/+bug/1034912 """ exec admin "lua f = function() return 'OK' end" exec admin "lua test = {}" exec admin "lua test.f = f" exec admin "lua test.test = {}" exec admin "lua test.test.f = f" exec sql "call f()" exec sql "call test.f()" exec sql "call test.test.f()" print """ # A test case for box.counter """ exec admin "lua box.counter.inc(0, 1)" exec admin "lua box.select(0, 0, 1)" exec admin "lua box.counter.inc(0, 1)" exec admin "lua box.counter.inc(0, 1)" exec admin "lua box.select(0, 0, 1)" exec admin "lua box.counter.dec(0, 1)" exec admin "lua box.counter.dec(0, 1)" exec admin "lua box.select(0, 0, 1)" exec admin "lua box.counter.dec(0, 1)" exec admin "lua box.select(0, 0, 1)" print """# box.dostring()""" exec admin "lua box.dostring('abc')" exec admin "lua box.dostring('abc=2')" exec admin "lua box.dostring('return abc')" exec admin "lua box.dostring('return ...', 1, 2, 3)" print """# box.update: push/pop fields""" exec admin "lua box.insert(0, 'abcd')" exec admin "lua box.update(0, 'abcd', '#p', 1, '')" exec admin "lua box.update(0, 'abcd', '=p', -1, 'push1')" exec admin "lua box.update(0, 'abcd', '=p', -1, 'push2')" exec admin "lua box.update(0, 'abcd', '=p', -1, 'push3')" exec admin "lua box.update(0, 'abcd', '#p=p', 1, '', -1, 'swap1')" exec admin "lua box.update(0, 'abcd', '#p=p', 1, '', -1, 'swap2')" exec admin "lua box.update(0, 'abcd', '#p=p', 1, '', -1, 'swap3')" exec admin "lua box.update(0, 'abcd', '#p=p', -1, '', -1, 'noop1')" exec admin "lua box.update(0, 'abcd', '#p=p', -1, '', -1, 'noop2')" exec admin "lua box.update(0, 'abcd', '#p=p', -1, '', -1, 'noop3')" exec admin "lua box.space[0]:truncate()" print """# A test case for Bug#1043804 lua error() -> server crash""" exec admin "lua error()" print """# Test box.fiber.name()""" exec admin "lua old_name = box.fiber.name()" exec admin "lua box.fiber.name() == old_name" exec admin "lua box.fiber.self():name() == old_name" exec admin "lua box.fiber.name('hello fiber')" exec admin "lua box.fiber.name()" exec admin "lua box.fiber.self():name('bye fiber')" exec admin "lua box.fiber.self():name()" exec admin "lua box.fiber.self():name(old_name)" print """# A test case for bitwise operations """ exec admin "lua bit.lshift(1, 32)" exec admin "lua bit.band(1, 3)" exec admin "lua bit.bor(1, 2)" print """# A test case for Bug#1061747 'tonumber64 is not transitive'""" exec admin "lua tonumber64(tonumber64(2))" exec admin "lua tostring(tonumber64(tonumber64(3)))" print """# box.tuple.new test""" exec admin "lua box.tuple.new()" exec admin "lua box.tuple.new(1)" exec admin "lua box.tuple.new('string')" exec admin "lua box.tuple.new(tonumber64('18446744073709551615'))" exec admin "lua box.tuple.new({tonumber64('18446744073709551615'), 'string', 1})" print """# A test case for the key as an tuple""" exec admin "lua t=box.insert(0, 777, '0', '1', '2', '3')" exec admin "lua t" exec admin "lua box.replace(0, t)" exec admin "lua box.replace(0, 777, { 'a', 'b', 'c', {'d', 'e', t}})" print """# A test case for tuple:totable() method""" exec admin "lua t=box.select(0, 0, 777):totable()" exec admin "lua t[2], t[3], t[4], t[5]" exec admin "lua box.space[0]:truncate()" print """# A test case for Bug#1119389 '(lbox_tuple_index) crashes on 'nil' argument'""" exec admin "lua t=box.insert(0, 8989)" exec admin "lua t[nil]" print """# A test case for Bug#1131108 'tonumber64 from negative int inconsistency'""" exec admin "lua tonumber64(-1)" exec admin "lua tonumber64(-1LL)" exec admin "lua tonumber64(-1ULL)" exec admin "lua -1" exec admin "lua -1LL" exec admin "lua -1ULL" exec admin "lua tonumber64(-1.0)" exec admin "lua 6LL - 7LL" print """# A test case for Bug#1131108 'incorrect conversion from boolean lua value to tarantool tuple' """ exec admin "lua function bug1075677() local range = {} table.insert(range, 1>0) return range end" exec sql "call bug1075677()" exec admin "lua bug1075677=nil" exec admin "lua box.tuple.new(false)" exec admin "lua box.tuple.new({false})" exec admin "lua t = box.tuple.new('abc')" exec admin "lua t" exec admin "lua t:bsize()" exec admin silent "lua box.delete(0, 8989)" print """#A test case for gh-37 - print(tonumber64(1)) adds extra newline""" exec admin "lua print(1, tonumber64(2), 3)" # A test case for https://github.com/tarantool/tarantool/issues/44 # IPROTO required! exec sql "call box.dostring('box.raise(33333, \"Hey!\")')" # # A test case for #107 "box.tuple.unpack asserts on extra arguments" # exec admin "lua t=box.tuple.new({'a','b','c'})" exec admin "lua t:unpack(5)" exec admin "lua t:unpack(1, 2, 3, 4, 5)" tarantool-1.5.1.218.g1a69fd6/test/box/fiber.test0000664000000000000000000001022112231715276017521 0ustar rootroot# encoding: tarantool import sys # A test case for a race condition between ev_schedule # and wal_schedule fiber schedulers. # The same fiber should not be scheduled by ev_schedule (e.g. # due to cancellation) if it is within th wal_schedule queue. # The test case is dependent on rows_per_wal, since this is when # we reopen the .xlog file and thus wal_scheduler takes a long # pause. exec admin "lua box.cfg.rows_per_wal" exec sql "insert into t0 values (1, 'testing', 'lua rocks')" exec sql "delete from t0 where k0=1" exec sql "insert into t0 values (1, 'testing', 'lua rocks')" exec sql "delete from t0 where k0=1" # check delete: exec admin "lua box.process(17, box.pack('iiiiiip', 0, 0, 0, 2^31, 1, 1, 1))" exec admin "lua box.process(22, box.pack('iii', 0, 0, 0))" exec sql "insert into t0 values (1, 'test box delete')" exec sql "call box.delete('0', '\1\0\0\0')" exec sql "insert into t0 values (1, 'test box delete')" exec admin "lua box.delete(0, 1)" exec sql "insert into t0 values ('abcd', 'test box delete')" exec sql "call box.delete('0', 'abcd')" exec sql "insert into t0 values ('abcd', 'test box delete')" exec admin "lua box.delete(0, 'abcd')" exec sql "insert into t0 values ('abcd', 'test box.select()')" exec sql "call box.replace('0', 'abcd', 'hello', 'world')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'defc', 'goodbye', 'universe')" exec sql "call box.replace('0', 'abcd')" exec sql "call box.delete('0', 'abcd')" exec sql "call box.delete('0', 'defc')" exec sql "call box.insert('0', 'test', 'old', 'abcd')" # test that insert produces a duplicate key error exec sql "call box.insert('0', 'test', 'old', 'abcd')" exec sql "call box.update('0', 'test', '=p=p', 0, 'pass', 1, 'new')" exec sql "call box.update('0', 'miss', '+p', 2, '\1\0\0\0')" exec sql "call box.update('0', 'pass', '+p', 2, '\1\0\0\0')" exec sql "call box.update('0', 'pass', '-p', 2, '\1\0\0\0')" exec sql "call box.update('0', 'pass', '-p', 2, '\1\0\0\0')" exec admin "lua box.update(0, 'pass', '+p', 2, 1)" exec sql "call box.delete('0', 'pass')" exec admin "reload configuration" # must be read-only exec admin "lua box.insert(0, 'test')" exec admin "lua box.insert(0, 'abcd')" exec admin "lua box.delete(0, 'test')" exec admin "lua box.delete(0, 'abcd')" exec admin "lua box.space[0]:insert('test', 'hello world')" exec admin "lua box.space[0]:update('test', '=p', 1, 'bye, world')" exec admin "lua box.space[0]:delete('test')" # test tuple iterators exec admin "lua t=box.space[0]:insert('test')" exec admin "lua t=box.space[0]:replace('test', 'another field')" exec admin "lua t=box.space[0]:replace('test', 'another field', 'one more')" exec admin "lua box.space[0]:truncate()" # test passing arguments in and out created fiber exec admin "lua function y() print('started') box.fiber.detach() while true do box.replace(0, 'test', os.time()) box.fiber.sleep(0.001) end end" exec admin "lua f = box.fiber.create(y)" exec admin "lua box.fiber.resume(f)" exec admin "lua box.fiber.sleep(0.002)" exec admin "lua box.fiber.cancel(f)" exec admin "lua box.fiber.resume(f)" exec admin "lua for k=1, 1000, 1 do box.fiber.create(function() box.fiber.detach() end) end" exec admin "lua collectgarbage('collect')" # check that these newly created fibers are garbage collected exec admin "lua box.fiber.find(900)" exec admin "lua box.fiber.find(910)" exec admin "lua box.fiber.find(920)" exec admin "lua box.space[0]:truncate()" # https://github.com/tarantool/tarantool/issues/33 exec admin "lua box.fiber.find()" exec admin "lua box.fiber.find('test')" tarantool-1.5.1.218.g1a69fd6/test/box/lua.result0000664000000000000000000010623212242653271017560 0ustar rootrootlua --- unknown command. try typing help. ... lua 1 --- - 1 ... lua print(' lua says: hello') --- lua says: hello ... lua local t = {} for n in pairs(box) do table.insert(t, ' - box.' .. tostring(n)) end table.sort(t) for i = 1, #t do print(t[i]) end t = nil --- - box.auto_increment - box.bless_space - box.call_loadproc - box.cfg - box.cjson - box.counter - box.delete - box.dostring - box.error - box.fiber - box.flags - box.index - box.info - box.insert - box.ipc - box.net - box.on_reload_configuration - box.pack - box.process - box.raise - box.replace - box.select - box.select_limit - box.select_range - box.select_reverse_range - box.session - box.slab - box.socket - box.space - box.stat - box.time - box.time64 - box.tuple - box.unpack - box.update - box.uuid - box.uuid_hex ... lua box.pack() --- error: 'bad argument #1 to ''?'' (string expected, got no value)' ... lua box.pack(1) --- error: 'box.pack: argument count does not match the format' ... lua box.pack('abc') --- error: 'box.pack: argument count does not match the format' ... lua print(box.pack('a', ' - hello')) --- - hello ... lua print(box.pack('Aa', ' - hello', ' world')) --- - hello world ... lua print(box.pack('w', 0x30)) --- 0 ... lua print(box.pack('www', 0x30, 0x30, 0x30)) --- 000 ... lua print(box.pack('www', 0x3030, 0x30)) --- error: '[string "return print(box.pack(''www'', 0x3030, 0x30))"]:1: box.pack: argument count does not match the format' ... lua print(string.byte(box.pack('w', 212345), 1, 2)) --- 140250 ... lua print(string.sub(box.pack('p', 1684234849), 2)) --- abcd ... lua print(box.pack('p', 'this string is 45 characters long 1234567890 ')) --- -this string is 45 characters long 1234567890 ... lua print(box.pack('s', 0x4d)) --- M ... lua print(box.pack('ssss', 25940, 29811, 28448, 11883)) --- Test ok. ... lua print(box.pack('SSSS', 25940, 29811, 28448, 11883)) --- Test ok. ... lua print(box.pack('SSSSSSSS', 28493, 29550, 27680, 27497, 29541, 20512, 29285, 8556)) --- Mons likes Perl! ... lua print(box.pack('bsilww', 84, 29541, 1802444916, 2338318684567380014ULL, 103, 111)) --- Test ok. Let`s go ... lua print(box.unpack('b', 'T')) --- 84 ... lua print(box.unpack('s', 'Te')) --- 25940 ... lua print(box.unpack('i', 'Test')) --- 1953719636 ... lua print(box.unpack('l', 'Test ok.')) --- 3344889333436081492 ... lua box.unpack('bsil', box.pack('bsil', 255, 65535, 4294967295, tonumber64('18446744073709551615'))) --- - 255 - 65535 - 4294967295 - 18446744073709551615 ... lua box.unpack('www', box.pack('www', 255, 65535, 4294967295)) --- - 255 - 65535 - 4294967295 ... lua box.unpack('ppp', box.pack('ppp', 'one', 'two', 'three')) --- - one - two - three ... lua num, str, num64 = box.unpack('ppp', box.pack('ppp', 666, 'string', tonumber64('666666666666666'))) --- ... lua print(box.unpack('i', num), str, box.unpack('l', num64)) --- 666string666666666666666 ... lua box.unpack('=p', box.pack('=p', 1, '666')) --- - 1 - 666 ... lua box.unpack('','') --- ... lua box.unpack('ii', box.pack('i', 1)) --- error: 'box.unpack(''i''): got 4 bytes (expected: 8+)' ... lua box.unpack('i', box.pack('ii', 1, 1)) --- error: 'box.unpack(''i''): too many bytes: unpacked 4, total 8' ... lua box.unpack('+p', box.pack('=p', 1, '666')) --- error: 'box.unpack(''+p''): unexpected opcode: offset 0, expected ''+'',found ''=''' ... lua box.process(13, box.pack('iiippp', 0, 1, 3, 1, 'testing', 'lua rocks')) --- - 1: {'testing', 'lua rocks'} ... lua box.process(17, box.pack('iiiiiip', 0, 0, 0, 2^31, 1, 1, 1)) --- - 1: {'testing', 'lua rocks'} ... lua box.process(21, box.pack('iiip', 0, 1, 1, 1)) --- - 1: {'testing', 'lua rocks'} ... lua box.process(17, box.pack('iiiiiip', 0, 0, 0, 2^31, 1, 1, 1)) --- ... lua box.process(22, box.pack('iii', 0, 0, 0)) --- error: 'box.process(CALL, ...) is not allowed' ... call box.process('abc', 'def') An error occurred: ER_ILLEGAL_PARAMS, 'Illegal parameters, unsupported command code, check the error log' call box.pack('test') An error occurred: ER_PROC_LUA, 'Lua error: box.pack: argument count does not match the format' call box.pack('p', 'this string is 45 characters long 1234567890 ') Found 1 tuple: ['-this string is 45 characters long 1234567890 '] call box.pack('p', 'ascii symbols are visible starting from code 20') Found 1 tuple: ['/ascii symbols are visible starting from code 20'] lua function f1() return 'testing', 1, false, -1, 1.123, 1e123, nil end --- ... lua f1() --- - testing - 1 - false - -1 - 1.123 - 1e+123 - nil ... call f1() Found 7 tuples: ['testing'] [1] ['false'] [4294967295] [1] [''] ['nil'] lua f1=nil --- ... call f1() An error occurred: ER_NO_SUCH_PROC, 'Procedure 'f1' is not defined' lua function f1() return f1 end --- ... call f1() An error occurred: ER_PROC_RET, 'Return type 'function' is not supported in the binary protocol' insert into t0 values (1, 'test box delete') Insert OK, 1 row affected call box.delete('0', '') Found 1 tuple: [1, 'test box delete'] call box.delete('0', '') No match insert into t0 values (1, 'test box delete') Insert OK, 1 row affected lua box.delete(0, 1) --- - 1: {'test box delete'} ... lua box.delete(0, 1) --- ... insert into t0 values ('abcd', 'test box delete') Insert OK, 1 row affected call box.delete('0', '') No match call box.delete('0', 'abcd') Found 1 tuple: [1684234849, 'test box delete'] call box.delete('0', 'abcd') No match insert into t0 values ('abcd', 'test box delete') Insert OK, 1 row affected lua box.delete(0, 'abcd') --- - 1684234849: {'test box delete'} ... lua box.delete(0, 'abcd') --- ... call box.select('0', '0', 'abcd') No match insert into t0 values ('abcd', 'test box.select()') Insert OK, 1 row affected call box.select('0', '0', 'abcd') Found 1 tuple: [1684234849, 'test box.select()'] lua box.select(0, 0, 'abcd') --- - 1684234849: {'test box.select()'} ... lua box.select(0, 0) --- error: 'Invalid key part count in an exact match (expected 1, got 0)' ... lua box.select(0, 1) --- error: 'No index #1 is defined in space 0' ... lua box.select(0) --- error: '[string "-- box.lua (internal file)..."]:13: box.pack: expected 32-bit int' ... call box.replace('0', 'abcd', 'hello', 'world') Found 1 tuple: [1684234849, 'hello', 'world'] call box.replace('0', 'defc', 'goodbye', 'universe') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.select('0', '0', 'abcd') Found 1 tuple: [1684234849, 'hello', 'world'] call box.select('0', '0', 'defc') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.replace('0', 'abcd') Found 1 tuple: [1684234849] call box.select('0', '0', 'abcd') Found 1 tuple: [1684234849] call box.delete('0', 'abcd') Found 1 tuple: [1684234849] call box.delete('0', 'defc') Found 1 tuple: [1667655012, 'goodbye', 'universe'] call box.insert('0', 'test', 'old', 'abcd') Found 1 tuple: [1953719668, 'old', 1684234849] call box.insert('0', 'test', 'old', 'abcd') An error occurred: ER_TUPLE_FOUND, 'Duplicate key exists in unique index 0' call box.update('0', 'test', '=p=p', '', 'pass', 1, 'new') Found 1 tuple: [1936941424, 'new', 1684234849] call box.select('0', '0', 'pass') Found 1 tuple: [1936941424, 'new', 1684234849] call box.select_range(0, 0, 1, 'pass') Found 1 tuple: [1936941424, 'new', 1684234849] call box.update('0', 'miss', '+p', 2, '') No match call box.update('0', 'pass', '+p', 2, '') Found 1 tuple: [1936941424, 'new', 1684234850] call box.update('0', 'pass', '-p', 2, '') Found 1 tuple: [1936941424, 'new', 1684234849] call box.update('0', 'pass', '-p', 2, '') Found 1 tuple: [1936941424, 'new', 1684234848] lua box.update(0, 'pass', '+p', 2, 1) --- - 1936941424: {'new', 1684234849} ... call box.select('0', '0', 'pass') Found 1 tuple: [1936941424, 'new', 1684234849] lua function field_x(space, key, field_index) return (box.select(space, 0, key))[tonumber(field_index)] end --- ... call field_x('0', 'pass', '0') Found 1 tuple: [1936941424] call field_x('0', 'pass', '1') Found 1 tuple: ['new'] call box.delete('0', 'pass') Found 1 tuple: [1936941424, 'new', 1684234849] lua dofile(...) --- ... lua fifo_max --- - nil ... lua fifo_push('test', 1) --- - 1953719668: {3, 4, 1, 0, 0, 0, 0} ... lua fifo_push('test', 2) --- - 1953719668: {4, 5, 1, 2, 0, 0, 0} ... lua fifo_push('test', 3) --- - 1953719668: {5, 6, 1, 2, 3, 0, 0} ... lua fifo_push('test', 4) --- - 1953719668: {6, 7, 1, 2, 3, 4, 0} ... lua fifo_push('test', 5) --- - 1953719668: {7, 3, 1, 2, 3, 4, 5} ... lua fifo_push('test', 6) --- - 1953719668: {3, 4, 6, 2, 3, 4, 5} ... lua fifo_push('test', 7) --- - 1953719668: {4, 5, 6, 7, 3, 4, 5} ... lua fifo_push('test', 8) --- - 1953719668: {5, 6, 6, 7, 8, 4, 5} ... lua fifo_top('test') --- - 8 ... lua box.delete(0, 'test') --- - 1953719668: {5, 6, 6, 7, 8, 4, 5} ... lua fifo_top('test') --- - 0 ... lua box.delete(0, 'test') --- - 1953719668: {3, 3, 0, 0, 0, 0, 0} ... lua for k,v in pairs(box.cfg) do print(' - ', k, ': ', v) end --- - io_collect_interval: 0 - pid_file: box.pid - slab_alloc_minimal: 64 - slab_alloc_arena: 0.1 - log_level: 4 - logger_nonblock: true - memcached_expire_per_loop: 1024 - snap_dir: . - coredump: false - panic_on_snap_error: true - memcached_expire_full_sweep: 3600 - replication_port: 0 - wal_fsync_delay: 0 - too_long_threshold: 0.5 - slab_alloc_factor: 2 - admin_port: 33015 - logger: cat - >> tarantool.log - snap_io_rate_limit: 0 - wal_writer_inbox_size: 16384 - wal_dir_rescan_delay: 0.1 - backlog: 1024 - secondary_port: 33014 - wal_dir: . - local_hot_standby: false - wal_mode: fsync_delay - rows_per_wal: 50 - readahead: 16320 - panic_on_wal_error: false - script_dir: . - primary_port: 33013 - bind_ipaddr: INADDR_ANY - memcached_port: 0 - memcached_space: 23 - memcached_expire: false ... lua for k,v in pairs(box.space[0]) do if type(v) ~= 'table' then print(' - ', k, ': ', v) end end --- - cardinality: 0 - estimated_rows: 0 - n: 0 - enabled: true ... reload configuration --- ok ... lua for k,v in pairs(box.cfg) do print(' - ', k, ': ', v) end --- - io_collect_interval: 0 - pid_file: box.pid - slab_alloc_minimal: 64 - slab_alloc_arena: 0.1 - log_level: 4 - logger_nonblock: true - memcached_expire_per_loop: 1024 - snap_dir: . - coredump: false - panic_on_snap_error: true - memcached_expire_full_sweep: 3600 - replication_port: 0 - wal_fsync_delay: 0 - too_long_threshold: 0.5 - slab_alloc_factor: 2 - admin_port: 33015 - logger: cat - >> tarantool.log - snap_io_rate_limit: 0 - wal_writer_inbox_size: 16384 - wal_dir_rescan_delay: 0.1 - backlog: 1024 - secondary_port: 33014 - wal_dir: . - local_hot_standby: false - wal_mode: fsync_delay - rows_per_wal: 50 - readahead: 16320 - panic_on_wal_error: false - script_dir: . - primary_port: 33013 - bind_ipaddr: INADDR_ANY - memcached_port: 0 - memcached_space: 23 - memcached_expire: false ... lua for k,v in pairs(box.space[0]) do if type(v) ~= 'table' then print(' - ', k, ': ', v) end end --- - cardinality: 0 - estimated_rows: 0 - n: 0 - enabled: true ... lua box.cfg.nosuchoption = 1 --- error: '[string "box.cfg = {}..."]:43: Attempt to modify a read-only table' ... lua box.space[300] = 1 --- ... lua box.index.new('abc', 'cde') --- error: 'bad argument #1 to ''?'' (number expected, got string)' ... lua box.index.new(1, 2) --- error: 'Space 1 does not exist' ... lua box.index.new(0, 1) --- error: 'No index #1 is defined in space 0' ... lua box.index.new(0, 0) --- - index 0 in space 0 ... lua #box.index.new(0,0) --- - 0 ... lua #box.space[0].index[0].idx --- - 0 ... lua box.insert(0, 'test') --- - 1953719668: {} ... lua box.insert(0, 'abcd') --- - 1684234849: {} ... lua #box.index.new(0,0) --- - 2 ... lua #box.space[0].index[0].idx --- - 2 ... lua box.delete(0, 'test') --- - 1953719668: {} ... lua #box.index.new(0,0) --- - 1 ... lua box.delete(0, 'abcd') --- - 1684234849: {} ... lua #box.space[0].index[0].idx --- - 0 ... lua #box.index.new(0,0) --- - 0 ... lua box.space[0]:insert('test', 'hello world') --- - 1953719668: {'hello world'} ... lua box.space[0]:update('test', '=p', 1, 'bye, world') --- - 1953719668: {'bye, world'} ... lua box.space[0]:delete('test') --- - 1953719668: {'bye, world'} ... lua t=box.space[0]:insert('test') --- ... lua t:next('abcd') --- error: 'tuple.next(): bad arguments' ... lua t:next(1) --- error: 'tuple.next(): bad arguments' ... lua t:next(t) --- error: 'bad argument #2 to ''?'' (box.tuple.iterator expected, got userdata)' ... lua t:next(t:next()) --- error: 'tuple.next(): bad arguments' ... lua for k, v in t:pairs() do print(v) end --- test ... lua t=box.space[0]:replace('test', 'another field') --- ... lua for k, v in t:pairs() do print(v) end --- test another field ... lua t=box.space[0]:replace('test', 'another field', 'one more') --- ... lua for k, v in t:pairs() do print(v) end --- test another field one more ... lua t=box.tuple.new({'a', 'b', 'c', 'd'}) --- ... lua for it,field in t:pairs() do print(field); end --- a b c d ... lua it, field = t:next() --- ... lua getmetatable(it) --- - box.tuple.iterator ... lua box.space[0]:truncate() --- ... lua box.fiber.sleep(0) --- ... lua box.fiber.sleep(0.01) --- ... lua box.fiber.sleep(0.0001) --- ... lua box.fiber.sleep('hello') --- error: 'fiber.sleep(delay): bad arguments' ... lua box.fiber.sleep(box, 0.001) --- error: 'fiber.sleep(delay): bad arguments' ... lua box.fiber.cancel(box.fiber.self()) --- error: 'fiber.cancel(): subject fiber does not permit cancel' ... lua f = box.fiber.self() --- ... lua old_id = f:id() --- ... lua box.fiber.cancel(f) --- error: 'fiber.cancel(): subject fiber does not permit cancel' ... lua box.fiber.self():id() - old_id < 3 --- - true ... lua box.fiber.cancel(box.fiber.self()) --- error: 'fiber.cancel(): subject fiber does not permit cancel' ... lua box.fiber.self():id() - old_id < 5 --- - true ... lua g = box.fiber.self() --- ... lua f==g --- - true ... lua function r() f = box.fiber.create(r) return (box.fiber.resume(f)) end --- ... lua r() --- - true ... lua f = box.fiber.create(print('hello') --- error: '[string "f = box.fiber.create(print(''hello'')"]:1: '')'' expected near ''''' ... lua box.fiber.resume(f) --- error: 'fiber.resume(): the fiber is dead' ... lua function r(a, b) print(a) print(b) return a, b end --- ... lua f=box.fiber.create(r) --- ... lua box.fiber.resume(f) --- nil nil - true - nil - nil ... lua f=box.fiber.create(r) --- ... lua box.fiber.resume(f, 'hello') --- hello nil - true - hello - nil ... lua f=box.fiber.create(r) --- ... lua box.fiber.resume(f, 'hello', 'world') --- hello world - true - hello - world ... lua f=box.fiber.create(r) --- ... lua box.fiber.resume(f, 'hello', 'world', 'wide') --- hello world - true - hello - world ... lua function y(a, b) c=box.fiber.yield(a) return box.fiber.yield(b, c) end --- ... lua f=box.fiber.create(y) --- ... lua box.fiber.resume(f, 'hello', 'world') --- - hello ... lua box.fiber.resume(f, 'wide') --- - world - wide ... lua box.fiber.resume(f) --- - true ... lua function y() print('started') box.fiber.detach() while true do box.replace(0, 'test', os.time()) box.fiber.sleep(0.001) end end --- ... lua f = box.fiber.create(y) --- ... lua box.fiber.resume(f) --- started ... lua box.fiber.sleep(0.002) --- ... lua box.fiber.cancel(f) --- ... lua box.fiber.resume(f) --- error: 'fiber.resume(): the fiber is dead' ... lua f=nil --- ... lua for k=1, 10000, 1 do box.fiber.create(function() box.fiber.detach() end) end --- ... lua collectgarbage('collect') --- - 0 ... lua box.fiber.find(900) --- - nil ... lua box.fiber.find(910) --- - nil ... lua box.fiber.find(920) --- - nil ... lua f = function() box.fiber.wrap(f) end --- ... call f() No match lua f = function(a, b) box.fiber.wrap(function(arg) result = arg end, a..b) end --- ... lua f('hello ', 'world') --- ... lua result --- - hello world ... lua f('bye ', 'world') --- ... lua result --- - bye world ... lua box.fiber.wrap(function() result = box.fiber.status() end) --- - nil ... lua result --- - running ... # A test case for Bug#933487 # tarantool crashed during shutdown if non running LUA fiber # was created # lua f = box.fiber.create(function () return true end) --- ... save snapshot --- ok ... save snapshot --- fail: can't save snapshot, errno 17 (File exists) ... save snapshot --- fail: can't save snapshot, errno 17 (File exists) ... lua box.fiber.resume(f) --- - true - true ... lua f = box.fiber.create(function () return true end) --- ... # # # lua box.space[0]:insert('test', 'something to splice') --- error: 'Duplicate key exists in unique index 0' ... lua box.space[0]:update('test', ':p', 1, box.pack('ppp', 0, 4, 'no')) --- - 1953719668: {28526} ... lua box.space[0]:update('test', ':p', 1, box.pack('ppp', 0, 2, 'every')) --- - 1953719668: {'every'} ... lua box.space[0]:update('test', ':p', 1, box.pack('ppp', 100, 2, 'every')) --- - 1953719668: {'everyevery'} ... lua box.space[0]:update('test', ':p', 1, box.pack('ppp', -100, 2, 'every')) --- error: 'Field SPLICE error: offset is out of bound' ... lua box.space[0]:truncate() --- ... lua box.space[0]:insert('test', 'hello', 'october', '20th'):unpack() --- - test - hello - october - 20th ... lua box.space[0]:truncate() --- ... lua function f1(...) return {...} end --- ... lua function f2(...) return f1({...}) end --- ... call f1('test_', 'test_') Found 1 tuple: ['test_', 'test_'] call f2('test_', 'test_') Found 1 tuple: ['test_', 'test_'] call f1() Found 1 tuple: [] call f2() Found 1 tuple: [] lua function f3() return {{'hello'}, {'world'}} end --- ... call f3() Found 2 tuples: ['hello'] ['world'] lua function f3() return {'hello', {'world'}} end --- ... call f3() An error occurred: ER_PROC_RET, 'Return type 'table' is not supported in the binary protocol' lua function f3() return 'hello', {{'world'}, {'canada'}} end --- ... call f3() An error occurred: ER_PROC_RET, 'Return type 'table' is not supported in the binary protocol' lua function f3() return {}, '123', {{}, {}} end --- ... call f3() An error occurred: ER_PROC_RET, 'Return type 'table' is not supported in the binary protocol' lua function f3() return { {{'hello'}} } end --- ... call f3() An error occurred: ER_PROC_RET, 'Return type 'table' is not supported in the binary protocol' lua function f3() return { box.tuple.new('hello'), {'world'} } end --- ... call f3() Found 2 tuples: ['hello'] ['world'] lua function f3() return { {'world'}, box.tuple.new('hello') } end --- ... call f3() Found 2 tuples: ['world'] ['hello'] call f1('jason') Found 1 tuple: ['jason'] call f1('jason', 1, 'test', 2, 'stewart') Found 1 tuple: ['jason', '1', 1953719668, '2', 'stewart'] lua function box.crossjoin(space0, space1, limit) space0 = tonumber(space0) space1 = tonumber(space1) limit = tonumber(limit) local result = {} for k0, v0 in box.space[space0]:pairs() do for k1, v1 in box.space[space1]:pairs() do if limit <= 0 then return unpack(result) end newtuple = {v0:unpack()} for _, v in v1:pairs() do table.insert(newtuple, v) end table.insert(result, newtuple) limit = limit - 1 end end return unpack(result) end --- ... lua box.crossjoin(0, 0, 0) --- ... lua box.crossjoin(0, 0, 10000) --- ... lua box.space[0]:insert(1) --- - 1: {} ... call box.crossjoin('0', '0', '10000') Found 1 tuple: [1, 1] lua box.space[0]:insert(2) --- - 2: {} ... call box.crossjoin('0', '0', '10000') Found 4 tuples: [1, 1] [1, 2] [2, 1] [2, 2] lua box.space[0]:insert(3, 'hello') --- - 3: {'hello'} ... call box.crossjoin('0', '0', '10000') Found 9 tuples: [1, 1] [1, 2] [1, 3, 'hello'] [2, 1] [2, 2] [2, 3, 'hello'] [3, 'hello', 1] [3, 'hello', 2] [3, 'hello', 3, 'hello'] lua box.space[0]:insert(4, 'world') --- - 4: {'world'} ... lua box.space[0]:insert(5, 'hello world') --- - 5: {'hello world'} ... call box.crossjoin('0', '0', '10000') Found 25 tuples: [1, 1] [1, 2] [1, 3, 'hello'] [1, 4, 'world'] [1, 5, 'hello world'] [2, 1] [2, 2] [2, 3, 'hello'] [2, 4, 'world'] [2, 5, 'hello world'] [3, 'hello', 1] [3, 'hello', 2] [3, 'hello', 3, 'hello'] [3, 'hello', 4, 'world'] [3, 'hello', 5, 'hello world'] [4, 'world', 1] [4, 'world', 2] [4, 'world', 3, 'hello'] [4, 'world', 4, 'world'] [4, 'world', 5, 'hello world'] [5, 'hello world', 1] [5, 'hello world', 2] [5, 'hello world', 3, 'hello'] [5, 'hello world', 4, 'world'] [5, 'hello world', 5, 'hello world'] lua box.space[0]:truncate() --- ... lua box.crossjoin = nil --- ... # A test case for Bug#901674 # No way to inspect exceptions from Box in Lua lua pcall(box.insert, 99, 1, 'test') --- - false - Space 99 does not exist ... lua pcall(box.insert, 0, 1, 'hello') --- - true - 1: {'hello'} ... lua pcall(box.insert, 0, 1, 'hello') --- - false - Duplicate key exists in unique index 0 ... lua box.space[0]:truncate() --- ... # A test case for Bug#908094 # Lua provides access to os.execute() lua os.execute('ls') --- error: '[string "return os.execute(''ls'')"]:1: attempt to call field ''execute'' (a nil value)' ... # # box.fiber test (create, resume, yield, status) # lua dofile(...) --- ... # test box.fiber.status functions: invalid arguments lua box.fiber.status(1) --- error: 'bad argument #1 to ''?'' (box.fiber expected, got number)' ... lua box.fiber.status('fafa-gaga') --- error: 'bad argument #1 to ''?'' (box.fiber expected, got string)' ... lua box.fiber.status(nil) --- error: 'bad argument #1 to ''?'' (box.fiber expected, got nil)' ... # run fiber's test lua box_fiber_run_test() --- tester: status(tester) = running tester: status(printer) = suspended count: 1 printer: tester status = normal printer: printer status = running A: odd 1 status: suspended count: 2 B: odd 1 C: even 2 status: suspended count: 3 A: odd 3 status: suspended count: 4 B: odd 3 C: even 4 D: even 4 A: odd 5 status: suspended count: 5 B: odd 5 status: dead ... lua tonumber64(123) --- - 123 ... lua tonumber64('123') --- - 123 ... lua type(tonumber64('123')) == 'cdata' --- - true ... lua tonumber64('9223372036854775807') == tonumber64('9223372036854775807') --- - true ... lua tonumber64('9223372036854775807') - tonumber64('9223372036854775800') --- - 7 ... lua tonumber64('18446744073709551615') == tonumber64('18446744073709551615') --- - true ... lua tonumber64('18446744073709551615') + 1 --- - 0 ... lua tonumber64(-1) --- - 18446744073709551615 ... lua tonumber64('184467440737095516155') --- error: 'lua_tointeger64: bad argument' ... lua string.byte(box.pack('p', tonumber64(123))) --- - 8 ... lua box.space[0]:truncate() --- ... call box.insert('0', 'tes1', 'tes2', 'tes3', 'tes4', 'tes5') Found 1 tuple: [829646196, 846423412, 863200628, 879977844, 896755060] call box.update('0', 'tes1', '#p', 0, '') Found 1 tuple: [846423412, 863200628, 879977844, 896755060] call box.update('0', 'tes2', '#p', 0, '') Found 1 tuple: [863200628, 879977844, 896755060] call box.update('0', 'tes3', '#p', 0, '') Found 1 tuple: [879977844, 896755060] call box.update('0', 'tes4', '#p', 0, '') Found 1 tuple: [896755060] lua box.update(0, 'tes5', '#p', 0, '') --- error: 'Illegal parameters, tuple must have all indexed fields' ... lua box.space[0]:truncate() --- ... # test box.update: INSERT field lua box.insert(0, 1, 3, 6, 9) --- - 1: {3, 6, 9} ... lua box.update(0, 1, '!p', 1, 2) --- - 1: {2, 3, 6, 9} ... lua box.update(0, 1, '!p!p!p!p', 3, 4, 3, 5, 4, 7, 4, 8) --- - 1: {2, 3, 5, 8, 7, 4, 6, 9} ... lua box.update(0, 1, '!p!p!p', 9, 10, 9, 11, 9, 12) --- - 1: {2, 3, 5, 8, 7, 4, 6, 9, 12, 11, 10} ... lua box.space[0]:truncate() --- ... lua box.insert(0, 1, 'tuple') --- - 1: {'tuple'} ... lua box.update(0, 1, '#p!p=p', 1, '', 1, 'inserted tuple', 2, 'set tuple') --- - 1: {'inserted tuple', 'set tuple'} ... lua box.space[0]:truncate() --- ... lua box.insert(0, 1, 'tuple') --- - 1: {'tuple'} ... lua box.update(0, 1, '=p!p#p', 1, 'set tuple', 1, 'inerted tuple', 2, '') --- - 1: {'inerted tuple'} ... lua box.update(0, 1, '!p!p', 0, 3, 0, 2) --- - 2: {3, 1, 'inerted tuple'} ... lua box.space[0]:truncate() --- ... # Test for Bug #955226 # Lua Numbers are passed back wrongly as strings # lua function foo() return 1, 2, '1', '2' end --- ... call foo() Found 4 tuples: [1] [2] ['1'] ['2'] # test update's assign opearations lua box.replace(0, 1, 'field string value') --- - 1: {'field string value'} ... lua box.update(0, 1, '=p=p=p', 1, 'new field string value', 2, 42, 3, 0xdeadbeef) --- - 1: {'new field string value', 42, 3735928559} ... # test update's arith opearations lua box.update(0, 1, '+p&p|p^p', 2, 16, 3, 0xffff0000, 3, 0x0000a0a0, 3, 0xffff00aa) --- - 1: {'new field string value', 58, 559063050} ... # test update splice operation lua ops_list = {} --- ... lua table.insert(ops_list, box.upd.splice(1, 0, 3, 'the newest')) --- error: '[string "return table.insert(ops_list, box.upd.splice(..."]:1: attempt to index field ''upd'' (a nil value)' ... lua box.update(0, 1, ':p', 1, box.pack('ppp', 0, 3, 'the newest')) --- - 1: {'the newest field string value', 58, 559063050} ... # test update delete operations lua box.update(0, 1, '#p#p', 3, '', 2, '') --- - 1: {'the newest field string value'} ... # test update insert operations lua box.update(0, 1, '!p!p!p!p', 1, 1, 1, 2, 1, 3, 1, 4) --- - 1: {4, 3, 2, 1, 'the newest field string value'} ... lua box.space[0]:truncate() --- ... # # test that ffi extension is inaccessible # lua ffi --- - nil ... # # Lua init lua script test # # Load testing init lua script # Test asscess to box configuration lua print_config() --- io_collect_interval = 0 pid_file = box.pid slab_alloc_minimal = 64 primary_port = 33013 log_level = 4 logger_nonblock = true memcached_expire_per_loop = 1024 snap_dir = . coredump = false panic_on_snap_error = true memcached_expire_full_sweep = 3600 replication_port = 0 wal_fsync_delay = 0 too_long_threshold = 0.5 slab_alloc_factor = 2 admin_port = 33015 logger = cat - >> tarantool.log snap_io_rate_limit = 0 wal_writer_inbox_size = 16384 memcached_expire = false backlog = 1024 memcached_space = 23 memcached_port = 0 rows_per_wal = 50 wal_mode = fsync_delay local_hot_standby = false secondary_port = 33014 panic_on_wal_error = false script_dir = . wal_dir = . bind_ipaddr = INADDR_ANY readahead = 16320 slab_alloc_arena = 0.1 wal_dir_rescan_delay = 0.1 ... # Test bug #977898 lua box.insert(0, 4, 8, 16) --- - 4: {8, 16} ... # Test insert from init.lua lua box.select(0, 0, 1) --- - 1: {2, 4, 8} ... lua box.select(0, 0, 2) --- - 2: {4, 8, 16} ... lua box.select(0, 0, 4) --- - 4: {8, 16} ... # Test bug #1002272 lua floor(0.5) --- - 0 ... lua floor(0.9) --- - 0 ... lua floor(1.1) --- - 1 ... # clean-up after tests # Test box.tuple:slice() lua t=box.tuple.new({'0', '1', '2', '3', '4', '5', '6', '7'}) --- ... lua t:slice(0) --- - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 ... lua t:slice(-1) --- - 7 ... lua t:slice(1) --- - 1 - 2 - 3 - 4 - 5 - 6 - 7 ... lua t:slice(-1, -1) --- error: 'tuple.slice(): start must be less than end' ... lua t:slice(-1, 1) --- error: 'tuple.slice(): start must be less than end' ... lua t:slice(1, -1) --- - 1 - 2 - 3 - 4 - 5 - 6 ... lua t:slice(1, 3) --- - 1 - 2 ... lua t:slice(7) --- - 7 ... lua t:slice(8) --- error: 'tuple.slice(): start >= field count' ... lua t:slice(9) --- error: 'tuple.slice(): start >= field count' ... lua t:slice(100500) --- error: 'tuple.slice(): start >= field count' ... lua t:slice(9, -1) --- error: 'tuple.slice(): start >= field count' ... lua t:slice(6, -1) --- - 6 ... lua t:slice(4, 4) --- error: 'tuple.slice(): start must be less than end' ... lua t:slice(6, 4) --- error: 'tuple.slice(): start must be less than end' ... lua t:slice(0, 0) --- error: 'tuple.slice(): end > field count' ... lua t:slice(9, 10) --- error: 'tuple.slice(): start >= field count' ... lua t:slice(-7) --- - 1 - 2 - 3 - 4 - 5 - 6 - 7 ... lua t:slice(-8) --- - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 ... lua t:slice(-9) --- error: 'tuple.slice(): start >= field count' ... lua t:slice(-100500) --- error: 'tuple.slice(): start >= field count' ... lua t:slice(500, 700) --- error: 'tuple.slice(): start >= field count' ... lua box.space[0]:truncate() --- ... # A test case for Bug#911641 box.fiber.sleep() works incorrectly if # a fiber is attached. lua function r() return box.fiber.sleep(0.01) end --- ... lua f = box.fiber.create(r) --- ... lua box.fiber.resume(f) --- - true ... lua box.fiber.resume(f) --- error: 'fiber.resume(): the fiber is dead' ... lua function r() box.fiber.yield(box.space[0]:insert(0, 0, 1)) box.fiber.yield(box.space[0]:select(0, 0)) box.fiber.yield(box.space[0]:truncate()) end --- ... lua f = box.fiber.create(r) --- ... lua box.fiber.resume(f) --- - 0: {0, 1} ... lua box.fiber.resume(f) --- - 0: {0, 1} ... lua box.fiber.resume(f) --- ... lua box.fiber.resume(f) --- - true ... lua function r() return box.fiber.yield(box.fiber.create(r)) end --- ... lua f = r() --- ... lua f1 = box.fiber.resume(f) --- ... lua f2 = box.fiber.resume(f1) --- ... lua f3 = box.fiber.resume(f2) --- ... lua f4 = box.fiber.resume(f3) --- ... lua f5 = box.fiber.resume(f4) --- ... lua f6 = box.fiber.resume(f5) --- ... lua f7 = box.fiber.resume(f6) --- ... lua f8 = box.fiber.resume(f7) --- ... lua f9 = box.fiber.resume(f8) --- ... lua f10 = box.fiber.resume(f9) --- ... lua f11 = box.fiber.resume(f10) --- ... lua f12 = box.fiber.resume(f11) --- ... lua f13 = box.fiber.resume(f12) --- ... lua f14 = box.fiber.resume(f13) --- ... lua f15 = box.fiber.resume(f14) --- ... lua f16 = box.fiber.resume(f15) --- ... lua f17 = box.fiber.resume(f16) --- ... lua box.fiber.resume(f) --- - true ... lua box.fiber.resume(f1) --- - true ... lua box.fiber.resume(f2) --- - true ... lua box.fiber.resume(f3) --- - true ... lua box.fiber.resume(f4) --- - true ... lua box.fiber.resume(f5) --- - true ... lua box.fiber.resume(f6) --- - true ... lua box.fiber.resume(f7) --- - true ... lua box.fiber.resume(f8) --- - true ... lua box.fiber.resume(f9) --- - true ... lua box.fiber.resume(f10) --- - true ... lua box.fiber.resume(f11) --- - true ... lua box.fiber.resume(f12) --- - true ... lua box.fiber.resume(f13) --- - true ... lua box.fiber.resume(f14) --- - true ... lua box.fiber.resume(f15) --- - true ... lua box.fiber.resume(f16) --- - true ... lua f17 = nil --- ... lua function r() box.fiber.detach() box.fiber.sleep(1000) end --- ... lua f = box.fiber.create(r) --- ... lua box.fiber.resume(f) --- ... lua box.fiber.resume(f) --- error: 'fiber.resume(): can''t resume a detached fiber' ... lua box.fiber.cancel(f) --- ... lua box.fiber.resume(f) --- error: 'fiber.resume(): the fiber is dead' ... # A test case for Bug#103491 # server CALL processing bug with name path longer than two # https://bugs.launchpad.net/tarantool/+bug/1034912 lua f = function() return 'OK' end --- ... lua test = {} --- ... lua test.f = f --- ... lua test.test = {} --- ... lua test.test.f = f --- ... call f() Found 1 tuple: ['OK'] call test.f() Found 1 tuple: ['OK'] call test.test.f() Found 1 tuple: ['OK'] # A test case for box.counter lua box.counter.inc(0, 1) --- - 1 ... lua box.select(0, 0, 1) --- - 1: {1} ... lua box.counter.inc(0, 1) --- - 2 ... lua box.counter.inc(0, 1) --- - 3 ... lua box.select(0, 0, 1) --- - 1: {3} ... lua box.counter.dec(0, 1) --- - 2 ... lua box.counter.dec(0, 1) --- - 1 ... lua box.select(0, 0, 1) --- - 1: {1} ... lua box.counter.dec(0, 1) --- - 0 ... lua box.select(0, 0, 1) --- ... # box.dostring() lua box.dostring('abc') --- error: '[string "abc"]:1: ''='' expected near ''''' ... lua box.dostring('abc=2') --- ... lua box.dostring('return abc') --- - 2 ... lua box.dostring('return ...', 1, 2, 3) --- - 1 - 2 - 3 ... # box.update: push/pop fields lua box.insert(0, 'abcd') --- - 1684234849: {} ... lua box.update(0, 'abcd', '#p', 1, '') --- error: 'Field 1 was not found in the tuple' ... lua box.update(0, 'abcd', '=p', -1, 'push1') --- - 1684234849: {'push1'} ... lua box.update(0, 'abcd', '=p', -1, 'push2') --- - 1684234849: {'push1', 'push2'} ... lua box.update(0, 'abcd', '=p', -1, 'push3') --- - 1684234849: {'push1', 'push2', 'push3'} ... lua box.update(0, 'abcd', '#p=p', 1, '', -1, 'swap1') --- - 1684234849: {'push2', 'push3', 'swap1'} ... lua box.update(0, 'abcd', '#p=p', 1, '', -1, 'swap2') --- - 1684234849: {'push3', 'swap1', 'swap2'} ... lua box.update(0, 'abcd', '#p=p', 1, '', -1, 'swap3') --- - 1684234849: {'swap1', 'swap2', 'swap3'} ... lua box.update(0, 'abcd', '#p=p', -1, '', -1, 'noop1') --- - 1684234849: {'swap1', 'swap2', 'noop1'} ... lua box.update(0, 'abcd', '#p=p', -1, '', -1, 'noop2') --- - 1684234849: {'swap1', 'swap2', 'noop2'} ... lua box.update(0, 'abcd', '#p=p', -1, '', -1, 'noop3') --- - 1684234849: {'swap1', 'swap2', 'noop3'} ... lua box.space[0]:truncate() --- ... # A test case for Bug#1043804 lua error() -> server crash lua error() --- error: '' ... # Test box.fiber.name() lua old_name = box.fiber.name() --- ... lua box.fiber.name() == old_name --- - true ... lua box.fiber.self():name() == old_name --- - true ... lua box.fiber.name('hello fiber') --- ... lua box.fiber.name() --- - hello fiber ... lua box.fiber.self():name('bye fiber') --- ... lua box.fiber.self():name() --- - bye fiber ... lua box.fiber.self():name(old_name) --- ... # A test case for bitwise operations lua bit.lshift(1, 32) --- - 1 ... lua bit.band(1, 3) --- - 1 ... lua bit.bor(1, 2) --- - 3 ... # A test case for Bug#1061747 'tonumber64 is not transitive' lua tonumber64(tonumber64(2)) --- - 2 ... lua tostring(tonumber64(tonumber64(3))) --- - 3ULL ... # box.tuple.new test lua box.tuple.new() --- error: 'tuple.new(): bad arguments' ... lua box.tuple.new(1) --- - 1: {} ... lua box.tuple.new('string') --- - 'string': {} ... lua box.tuple.new(tonumber64('18446744073709551615')) --- - 18446744073709551615: {} ... lua box.tuple.new({tonumber64('18446744073709551615'), 'string', 1}) --- - 18446744073709551615: {'string', 1} ... # A test case for the key as an tuple lua t=box.insert(0, 777, '0', '1', '2', '3') --- ... lua t --- - 777: {'0', '1', '2', '3'} ... lua box.replace(0, t) --- - 777: {'0', '1', '2', '3'} ... lua box.replace(0, 777, { 'a', 'b', 'c', {'d', 'e', t}}) --- - 777: {'a', 'b', 'c', 'd', 'e', 777, '0', '1', '2', '3'} ... # A test case for tuple:totable() method lua t=box.select(0, 0, 777):totable() --- ... lua t[2], t[3], t[4], t[5] --- - a - b - c - d ... lua box.space[0]:truncate() --- ... # A test case for Bug#1119389 '(lbox_tuple_index) crashes on 'nil' argument' lua t=box.insert(0, 8989) --- ... lua t[nil] --- error: '[string "return t[nil]"]:1: bad argument #2 to ''__index'' (string expected, got nil)' ... # A test case for Bug#1131108 'tonumber64 from negative int inconsistency' lua tonumber64(-1) --- - 18446744073709551615 ... lua tonumber64(-1LL) --- - 18446744073709551615 ... lua tonumber64(-1ULL) --- - 18446744073709551615 ... lua -1 --- - -1 ... lua -1LL --- - -1 ... lua -1ULL --- - 18446744073709551615 ... lua tonumber64(-1.0) --- - 18446744073709551615 ... lua 6LL - 7LL --- - -1 ... # A test case for Bug#1131108 'incorrect conversion from boolean lua value to tarantool tuple' lua function bug1075677() local range = {} table.insert(range, 1>0) return range end --- ... call bug1075677() Found 1 tuple: [1702195828] lua bug1075677=nil --- ... lua box.tuple.new(false) --- - 'false': {} ... lua box.tuple.new({false}) --- - 'false': {} ... lua t = box.tuple.new('abc') --- ... lua t --- - 'abc': {} ... lua t:bsize() --- - 4 ... #A test case for gh-37 - print(tonumber64(1)) adds extra newline lua print(1, tonumber64(2), 3) --- 123 ... call box.dostring('box.raise(33333, "Hey!")') An error occurred: ER_UNKNOWN (33333), 'Hey!' lua t=box.tuple.new({'a','b','c'}) --- ... lua t:unpack(5) --- - a - b - c ... lua t:unpack(1, 2, 3, 4, 5) --- - a - b - c ... tarantool-1.5.1.218.g1a69fd6/test/box/socket.test0000664000000000000000000003371112231715276017733 0ustar rootroot# encoding: tarantool import socket ######################## # # # box.socket.tcp/udp() # # # ######################## exec admin "lua s = box.socket.udp()" exec admin "lua type(s)" exec admin "lua s:close()" exec admin "lua s = box.socket.tcp()" exec admin "lua type(s)" ### socket:close() # close exec admin "lua s:close()" # close (on closed) exec admin "lua s:close()" # error exec admin "lua s:error()" #################### # # # socket:connect() # # # #################### exec admin "lua s:connect('localhost', '30303')" # Connection refused exec admin "lua s:error()" exec admin "lua s:connect('127.0.0.1', '30303')" # Connection refused exec admin "lua s:error()" exec admin "lua s:connect('127.0.0.1', '30303', 0.01)" # connection refused exec admin "lua s:error()" # bad args exec admin "lua s:connect('127.0.0.1')" exec admin "lua s:connect()" exec admin "lua s:connect(123)" exec admin "lua s:close()" exec admin "lua s:close()" exec admin "lua sr, se = s:connect('somewhereelse', '30303', 0.0001)" exec admin "lua sr == nil and se == 'error' or se == 'timeout'" # timedout or hostname resolution failed exec admin "lua e = s:error()" exec admin "lua e == -1 or e == 110" exec admin "lua s:close()" ################# # # # socket:send() # # # ################# # bad args exec admin "lua s:send()" exec admin "lua s:send(1)" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30303)) s.listen(1) exec admin "lua s = box.socket.tcp()" exec admin "lua type(s:connect('127.0.0.1', '30303'))" exec admin "lua s:send('ping')" exec admin "lua s:error()" # timedout - try to send 64MB (8388608 * 8 bytes) in 0.0000001 sec exec admin "lua n, status, error_code, error_str = s:send(string.rep('=', 8388608), 0.0000001)" exec admin "lua type(n)" exec admin "lua type(status)" exec admin "lua type(error_code)" exec admin "lua type(error_str)" exec admin "lua status" exec admin "lua error_code" exec admin "lua error_str" exec admin "lua s:error()" conn, addr = s.accept() print('connected') conn.close() s.close() # connection reset by peer exec admin "lua s:send('ping')" exec admin "lua s:error()" exec admin "lua s:close()" ################# # # # socket:recv() # # # ################# # bad args exec admin "lua s:recv()" # test for case #1: successful recv # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30308)) s.listen(1) exec admin "lua type(s:connect('127.0.0.1', '30308'))" exec admin "lua s:error()" conn, addr = s.accept() print(conn.send("Hello, World")) exec admin "lua s:recv(12)" exec admin "lua s:error()" exec admin "lua s:close()" conn.close() s.close() # test for case #1: successful serial chunk recv (3 x chunk) # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30308)) s.listen(1) exec admin "lua type(s:connect('127.0.0.1', '30308'))" exec admin "lua s:error()" conn, addr = s.accept() print(conn.send("Hello World Oversized")) exec admin "lua s:recv(11)" exec admin "lua s:recv(5)" exec admin "lua s:recv(5)" exec admin "lua s:error()" exec admin "lua s:close()" conn.close() s.close() # test for case #2-3: timedout, error # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30308)) s.listen(1) exec admin "lua type(s:connect('127.0.0.1', '30308'))" exec admin "lua s:error()" conn, addr = s.accept() print('connected') print(conn.send("pin")) exec admin "lua s:recv(4, 0.01)" # timedout exec admin "lua s:error()" conn.send("g") # ping exec admin "lua s:recv(4)" exec admin "lua s:error()" exec admin "lua s:close()" conn.close() s.close() # test for case #4: EOF (data is less then recv size) # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30309)) s.listen(1) exec admin "lua type(s:connect('127.0.0.1', '30309'))" exec admin "lua s:error()" conn, addr = s.accept() print('connected') print(conn.send("ping")) conn.close() exec admin "lua s:recv(6)" exec admin "lua s:error()" exec admin "lua s:close()" s.close() # test for case #4: EOF (data is more then recv size) # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30311)) s.listen(1) exec admin "lua type(s:connect('127.0.0.1', '30311'))" exec admin "lua s:error()" conn, addr = s.accept() print('connected') print(conn.send("ping ping ping ping end ")) conn.close() # recv should not say EOF, even if it really happened exec admin "lua s:recv(5)" exec admin "lua s:recv(5)" exec admin "lua s:recv(5)" exec admin "lua s:recv(5)" # eof exec admin "lua s:recv(5)" # eof (zero) exec admin "lua s:recv(5)" # eof (zero) exec admin "lua s:recv(5)" exec admin "lua s:error()" exec admin "lua s:close()" s.close() ##################### # # # socket:readline() # # # ##################### # possible usage: # # 1. readline() == readline(limit == inf, seplist == {'\n'}, timeout == inf) # 2. readline(limit) # 3. readline(limit, timeout) # 4. readline({seplist}) # 5. readline(limit, {seplist}) # 6. readline({seplist}, timeout) # 7. readline(limit, {seplist}, timeout) # test for case #1, 4: separator or limit found + different usage # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30305)) s.listen(1) exec admin "lua type(s:connect('127.0.0.1', '30305'))" exec admin "lua s:error()" conn, addr = s.accept() # 1. readline() == readline(limit == inf, seplist == {'\n'}, timeout == inf) print(conn.send("Hello World\n")) exec admin "lua s:readline()" exec admin "lua s:error()" # 2. readline(limit) print(conn.send("Hello World\n")) exec admin "lua s:readline(5)" exec admin "lua s:error()" # 3. readline(limit, timeout) (just api check) exec admin "lua s:readline(5, 0.01)" exec admin "lua s:error()" exec admin "lua s:readline(6, 0.01)" exec admin "lua s:error()" # 4. readline({seplist}) print(conn.send("AbcDefGhi")) exec admin "lua s:readline({'i', 'D'})" exec admin "lua s:error()" exec admin "lua s:readline({'i', 'G'})" exec admin "lua s:error()" exec admin "lua s:readline({'i'})" exec admin "lua s:error()" print(conn.send("CatCowDogStar")) exec admin "lua s:readline({'Cat', 'Cow', 'Dog', 'Star'})" exec admin "lua s:error()" exec admin "lua s:readline({'Cat', 'Cow', 'Dog', 'Star'})" exec admin "lua s:error()" exec admin "lua s:readline({'Cat', 'Cow', 'Dog', 'Star'})" exec admin "lua s:error()" exec admin "lua s:readline({'Cat', 'Cow', 'Dog', 'Star'})" exec admin "lua s:error()" # 5. readline(limit, {seplist}) print(conn.send("CatCoowDoggStar")) exec admin "lua s:readline(3, {'Cat', 'Coow'})" exec admin "lua s:error()" exec admin "lua s:readline(3, {'Cat', 'Coow'})" exec admin "lua s:error()" exec admin "lua s:readline(3, {'Dogg', 'Star'})" exec admin "lua s:error()" exec admin "lua s:readline(3, {'Dogg', 'Star'})" exec admin "lua s:error()" # read 'tar' part exec admin "lua s:readline(3)" exec admin "lua s:error()" # 6. readline({seplist}, timeout) print(conn.send("KKongKingCezaCezarCrown")) exec admin "lua sl = {'Crown', 'King', 'Kong', 'Cezar'}" exec admin "lua s:readline(sl, 1.0)" exec admin "lua s:error()" exec admin "lua s:readline(sl, 1.0)" exec admin "lua s:error()" exec admin "lua s:readline(sl, 1.0)" exec admin "lua s:error()" exec admin "lua s:readline(sl, 1.0)" exec admin "lua s:error()" # 7. readline(limit, {seplist}, timeout) print(conn.send("RoAgathaPopPoCornDriveRoad")) exec admin "lua sl = {'Agatha', 'Road', 'Corn', 'Drive', 'Pop'}" exec admin "lua s:readline(64, sl, 1.0)" exec admin "lua s:error()" exec admin "lua s:readline(64, sl, 1.0)" exec admin "lua s:error()" exec admin "lua s:readline(64, sl, 1.0)" exec admin "lua s:error()" exec admin "lua s:readline(64, sl, 1.0)" exec admin "lua s:error()" # test for case #2-3: timedout, errors # print(conn.send("AfricaCubaRomaniaCana")) exec admin "lua s:readline({'Canada'}, 0.01)" # timedout exec admin "lua s:error()" print(conn.send("da")) # should read whole line exec admin "lua s:readline({'Canada'}, 0.01)" exec admin "lua s:error()" # to ensure readahead pointer correctness print(conn.send("Canada")) exec admin "lua s:readline({'Canada'}, 0.01)" exec admin "lua s:error()" # test for case #5: eof testing # print(conn.send("msg msg msg msg msg")) conn.close() exec admin "lua s:readline({'msg'})" exec admin "lua s:error()" exec admin "lua s:readline({'msg'})" exec admin "lua s:error()" exec admin "lua s:readline({'msg'})" exec admin "lua s:error()" exec admin "lua s:readline({'msg'})" exec admin "lua s:error()" exec admin "lua s:readline({'msg'})" exec admin "lua s:error()" # eof (zero) exec admin "lua s:readline({'msg'})" exec admin "lua s:error()" # eof (zero) exec admin "lua s:readline({'msg'})" exec admin "lua s:error()" exec admin "lua s:close()" s.close() # test for case #5: eof in the middle of a separator # pending # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30307)) s.listen(1) exec admin "lua type(s:connect('127.0.0.1', '30307'))" exec admin "lua s:error()" conn, addr = s.accept() print(conn.send("SomelongLongStringStrinString")) conn.close() # should be returned with eof flag exec admin "lua s:readline({'Z'})" exec admin "lua s:error()" exec admin "lua s:close()" s.close() ########################### # simple usage as testing # ########################### # echo server (test is server) (TCP). # # connect from stored procedure to echo server and # do send/recv. # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30303)) s.listen(1) exec admin "lua type(s:connect('localhost', '30303'))" exec admin "lua s:send('ping')" conn, addr = s.accept() print('connected') data = conn.recv(4) conn.sendall(data) exec admin "lua s:recv(4)" conn.close() s.close() exec admin "lua s:send('ping')" exec admin "lua s:error()" # broken pipe exec admin "lua s:send('ping')" exec admin "lua s:error()" exec admin "lua s:close()" # echo server (box is server) (TCP). # # connect from test to echo server implemented in # stored procedure and do send/recv. # exec admin "lua type(s:bind('127.0.0.1', '30303'))" exec admin "lua type(s:listen())" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.connect(('127.0.0.1', 30303)) s.sendall('ping') exec admin "lua client, status, addr = s:accept()" exec admin "lua addr" exec admin "lua data = client:recv(4)" exec admin "lua data" exec admin "lua client:send(data, 4)" exec admin "lua client:close()" exec admin "lua s:close()" data = s.recv(4) s.close() print(data) # echo server (test is server) (UDP). # # connect from stored procedure to echo server and # do send/recv. # s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('localhost', 30302)) # SOCK_DGRAM exec admin "lua s = box.socket.udp()" exec admin "lua type(s:sendto('ping', '127.0.0.1', '30302'))" exec admin "lua s:error()" data, addr = s.recvfrom(4) print(data) s.sendto(data, addr) exec admin "lua s:recv(4)" s.close() exec admin "lua s:close()" # echo server (box is server) (UDP). # # connect from test to echo server implemented in # stored procedure and do send/recv. # exec admin "lua s = box.socket.udp()" exec admin "lua type(s:bind('127.0.0.1', '30301'))" exec admin "lua s:error()" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.sendto('ping', ('127.0.0.1', 30301)) exec admin "lua data, status, client, port = s:recvfrom(4)" exec admin "lua s:error()" exec admin "lua data" exec admin "lua client" exec admin "lua type(s:sendto(data, client, port))" exec admin "lua s:error()" data = s.recv(4) print(data) s.close() exec admin "lua s:close()" # Bug #1160869: incorrect fiber call order. # (https://bugs.launchpad.net/tarantool/+bug/1160869) # test=""" replies = 0 function bug1160869() local s = box.socket.tcp() s:connect('127.0.0.1', box.cfg.primary_port) box.fiber.resume( box.fiber.create(function() box.fiber.detach() while true do s:recv(12) replies = replies + 1 end end) ) return s:send(box.pack('iii', 65280, 0, 1)) end """ exec admin "lua " + test.replace('\n', ' ') exec admin "lua bug1160869()" exec admin "lua bug1160869()" exec admin "lua bug1160869()" exec admin "lua replies" test=""" s = nil syncno = 0 reps = 0 function iostart() if s ~= nil then return end s = box.socket.tcp() s:connect('127.0.0.1', box.cfg.primary_port) box.fiber.resume( box.fiber.create(function() box.fiber.detach() while true do s:recv(12) reps = reps + 1 end end)) end function iotest() iostart() syncno = syncno + 1 return s:send(box.pack('iii', 65280, 0, syncno)) end """ exec admin "lua " + test.replace('\n', ' ') exec admin "lua iotest()" exec admin "lua iotest()" exec admin "lua iotest()" exec admin "lua reps" # Bug #43: incorrect box:shutdown() arg handling # https://github.com/tarantool/tarantool/issues/43 # test=""" function server() ms = box.socket.tcp() ms:bind('127.0.0.1', 8181) ms:listen() while true do local s = ms:accept( .5 ) if s ~= 'timeout' then print("accepted connection ", s) s:send('Hello world') s:shutdown(box.socket.SHUT_RDWR) end end end box.fiber.wrap(server) """ exec admin "lua " + test.replace('\n', ' ') s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('127.0.0.1', 8181)) data = s.recv(1024) s.close() print data s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('127.0.0.1', 8181)) data = s.recv(1024) s.close() print data s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('127.0.0.1', 8181)) data = s.recv(1024) s.close() print data tarantool-1.5.1.218.g1a69fd6/test/box/args.result0000664000000000000000000000753312242653271017737 0ustar rootroottarantool_box --help Tarantool -- an efficient in-memory data store. Usage: tarantool_box [OPTIONS] --cfg-get=KEY return a value from configuration file described by KEY --check-config Check configuration file for errors -c, --config=FILE path to configuration file (default: tarantool.cfg) --init-storage initialize storage (an empty snapshot file) and exit -v, --verbose increase verbosity level in log messages -B, --background redirect input/output streams to a log file and run as daemon -h, --help display this help and exit -V, --version print program version and exit Please visit project home page at http://tarantool.org to see online documentation, submit bugs or contribute a patch. tarantool_box -h Tarantool -- an efficient in-memory data store. Usage: tarantool_box [OPTIONS] --cfg-get=KEY return a value from configuration file described by KEY --check-config Check configuration file for errors -c, --config=FILE path to configuration file (default: tarantool.cfg) --init-storage initialize storage (an empty snapshot file) and exit -v, --verbose increase verbosity level in log messages -B, --background redirect input/output streams to a log file and run as daemon -h, --help display this help and exit -V, --version print program version and exit Please visit project home page at http://tarantool.org to see online documentation, submit bugs or contribute a patch. tarantool_box --cfg-get=custom_proc_title tarantool_box -Z tarantool_box: -Z: unknown option tarantool_box --no-such-option tarantool_box: --no-such-option: unknown option tarantool_box --version --no-such-option tarantool_box: --no-such-option: unknown option tarantool_box --config tarantool_box: --config: option requires an option argument tarantool_box -c tarantool_box: -c: option requires an option argument tarantool_box --config tarantool.cfg tarantool_box: the daemon is already running tarantool_box --daemonize tarantool_box: --daemonize: unknown option tarantool_box --background tarantool_box: the daemon is already running # # Check that --background doesn't work if there is no logger # This is a test case for # https:tarantool/+bug/750658 # "--background neither closes nor redirects stdin/stdout/stderr" # tarantool_box --config=tarantool_bug750658.cfg --background tarantool_box: --background requires 'logger' configuration option to be set tarantool_box --version Tarantool 1.minor.patch-- Target: platform Build options: flags Compiler: cc C_FLAGS: flags CXX_FLAGS: flags tarantool_box -V Tarantool 1.minor.patch-- Target: platform Build options: flags Compiler: cc C_FLAGS: flags CXX_FLAGS: flags # # A test case for Bug#726778 "Gopt broke wal_dir and snap_dir: they are no # longer relative to work_dir". # https://bugs.launchpad.net/tarantool/+bug/726778 # After addition of gopt(), we started to chdir() to the working # directory after option parsing. # Verify that this is not the case, and snap_dir and xlog_dir # can be relative to work_dir. tarantool_box --config=bug726778.cfg --init-storage tarantool_box: space 0 successfully configured tarantool_box: creating `snapshots/00000000000000000001.snap.inprogress' tarantool_box: saving snapshot `snapshots/00000000000000000001.snap' tarantool_box: done # # A test case for Bug#897162, cat command should # not require a configuration file. tarantool_box --config=nonexists.cfg --cat=nonexists.xlog tarantool_box: --cat: unknown option tarantool-1.5.1.218.g1a69fd6/test/box/iproto.result0000664000000000000000000000027212231715257020311 0ustar rootroot # # iproto packages test # # Test bug #899343 (server assertion failure on incorrect packet) # sending the package with invalid length 12 # checking what is server alive ping ok --- tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bug876541.cfg0000664000000000000000000000054312231715257021556 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" wal_fsync_delay = 0.01 tarantool-1.5.1.218.g1a69fd6/test/box/stat.test0000664000000000000000000000067712231715257017422 0ustar rootroot# encoding: tarantool # # clear statistics server.restart() print """# # check stat_cleanup # add several tuples # """ for i in range(10): exec sql "insert into t0 values ({0}, 'tuple')".format(i) exec admin "show stat" print """# # restart server # """ server.restart() print """# # statistics must be zero # """ exec admin "show stat" # cleanup for i in range(10): exec sql "delete from t0 where k0 = {0}".format(i) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/00000000000000000001.snap0000664000000000000000000000001712231715257020375 0ustar rootrootSNAP 0.11 tarantool-1.5.1.218.g1a69fd6/test/box/CMakeLists.txt0000664000000000000000000000015312231715257020273 0ustar rootroot include_directories("${PROJECT_SOURCE_DIR}/connector/c/include") tarantool_client("protocol" protocol.c) tarantool-1.5.1.218.g1a69fd6/test/box/ipc.test0000664000000000000000000000413512231715257017213 0ustar rootroot# encoding: tarantool # import sys exec admin "lua ch = box.ipc.channel()" exec admin "lua ch:is_full()" exec admin "lua ch:is_empty()" exec admin "lua ch:get(.1)" exec admin "lua ch:put()" exec admin "lua ch:put('test')" exec admin "lua ch:get()" exec admin "lua ch:get('wrong timeout')" exec admin "lua ch:get(-10)" exec admin "lua ch:put(234)" exec admin "lua ch:put(345, .5)" exec admin "lua ch:is_full()" exec admin "lua ch:is_empty()" exec admin "lua buffer = {}" exec admin "lua tfbr = box.fiber.create(function() box.fiber.detach() while true do table.insert(buffer, ch:get()) end end)" exec admin "lua box.fiber.resume(tfbr)" exec admin "lua for i = 1, 10 do print(i, ' ', ch:put(i, 0.1)) end" exec admin "lua ch:has_readers()" exec admin "lua ch:has_writers()" exec admin "lua box.fiber.cancel(tfbr)" exec admin "lua ch:has_readers()" exec admin "lua ch:has_writers()" exec admin "lua ch:put(box.info.pid)" exec admin "lua ch:is_full()" exec admin "lua ch:is_empty()" exec admin "lua ch:get(box.info.pid) == box.info.pid" exec admin "lua for i, v in pairs(buffer) do print(v) end" exec admin "lua ch:is_empty()" exec admin "lua ch:broadcast()" exec admin "lua ch:broadcast(123)" exec admin "lua ch:get()" exec admin "lua ch:is_full()" exec admin "lua ch:is_empty()" exec admin "lua tfbr = box.fiber.create(function() box.fiber.detach() while true do local v = ch:get() table.insert(buffer, 'tfbr - ' .. tostring(v)) end end)" exec admin "lua box.fiber.resume(tfbr)" exec admin "lua tfbr2 = box.fiber.create(function() box.fiber.detach() while true do local v = ch:get() table.insert(buffer, 'tfbr2 - ' .. tostring(v)) end end)" exec admin "lua box.fiber.resume(tfbr2)" exec admin "lua buffer = {}" exec admin "lua for i, v in pairs(buffer) do print(v) end" exec admin "lua ch:is_full()" exec admin "lua ch:is_empty()" exec admin "lua ch:put(1)" exec admin "lua ch:put(2)" exec admin "lua ch:put(3)" exec admin "lua ch:put(4)" exec admin "lua ch:put(5)" exec admin "lua ch:broadcast('broadcast message!')" exec admin "lua for i = 35, 45 do print(ch:put(i)) end" exec admin "lua for i, v in pairs(buffer) do print(v) end" tarantool-1.5.1.218.g1a69fd6/test/box/dup_key2.xlog0000664000000000000000000000021112231715257020143 0ustar rootrootXLOG 0.11 JgY -IhWAF&  unXAJ$& tarantool-1.5.1.218.g1a69fd6/test/box/admin.result0000664000000000000000000000507512231715257020073 0ustar rootrootexit show stat --- statistics: REPLACE: { rps: 0 , total: 0 } SELECT: { rps: 0 , total: 0 } UPDATE: { rps: 0 , total: 0 } DELETE_1_3: { rps: 0 , total: 0 } DELETE: { rps: 0 , total: 0 } CALL: { rps: 0 , total: 0 } ... help --- available commands: - help - exit - show info - show fiber - show configuration - show slab - show palloc - show stat - show plugins - save coredump - save snapshot - lua command - reload configuration - show injections (debug mode only) - set injection (debug mode only) ... show configuration --- configuration: username: (null) local_hot_standby: "false" bind_ipaddr: "INADDR_ANY" coredump: "false" admin_port: "33015" replication_port: "0" log_level: "4" slab_alloc_arena: "0.1" slab_alloc_minimal: "64" slab_alloc_factor: "2" work_dir: (null) snap_dir: "." wal_dir: "." script_dir: "." pid_file: "box.pid" logger: "cat - >> tarantool.log" logger_nonblock: "true" io_collect_interval: "0" backlog: "1024" readahead: "16320" snap_io_rate_limit: "0" rows_per_wal: "50" wal_writer_inbox_size: "16384" wal_mode: "fsync_delay" wal_fsync_delay: "0" wal_dir_rescan_delay: "0.1" panic_on_snap_error: "true" panic_on_wal_error: "false" primary_port: "33013" secondary_port: "33014" too_long_threshold: "0.5" custom_proc_title: (null) memcached_port: "0" memcached_space: "23" memcached_expire: "false" memcached_expire_per_loop: "1024" memcached_expire_full_sweep: "3600" replication_source: (null) space[0].enabled: "true" space[0].cardinality: "-1" space[0].estimated_rows: "0" space[0].index[0].type: "HASH" space[0].index[0].unique: "true" space[0].index[0].key_field[0].fieldno: "0" space[0].index[0].key_field[0].type: "NUM" ... show stat --- statistics: REPLACE: { rps: 0 , total: 0 } SELECT: { rps: 0 , total: 0 } UPDATE: { rps: 0 , total: 0 } DELETE_1_3: { rps: 0 , total: 0 } DELETE: { rps: 0 , total: 0 } CALL: { rps: 0 , total: 0 } ... insert into t0 values (1, 'tuple') Insert OK, 1 row affected save snapshot --- ok ... delete from t0 where k0 = 1 Delete OK, 1 row affected show info --- info: version: "1.minor.patch--" uptime: pid: logger_pid: snapshot_pid: lsn: 3 recovery_lag: 0.000 recovery_last_update: 0.000 status: primary config: "tarantool.cfg" ... tarantool-1.5.1.218.g1a69fd6/test/box/Makefile0000664000000000000000000002237012213333035017166 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/box/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/box/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/box/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/box/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/box/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. test/box/CMakeFiles/protocol.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/box/CMakeFiles/protocol.dir/rule .PHONY : test/box/CMakeFiles/protocol.dir/rule # Convenience name for target. protocol: test/box/CMakeFiles/protocol.dir/rule .PHONY : protocol # fast build rule for target. protocol/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/build .PHONY : protocol/fast __/__/src/errcode.o: __/__/src/errcode.c.o .PHONY : __/__/src/errcode.o # target to build an object file __/__/src/errcode.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/__/__/src/errcode.c.o .PHONY : __/__/src/errcode.c.o __/__/src/errcode.i: __/__/src/errcode.c.i .PHONY : __/__/src/errcode.i # target to preprocess a source file __/__/src/errcode.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/__/__/src/errcode.c.i .PHONY : __/__/src/errcode.c.i __/__/src/errcode.s: __/__/src/errcode.c.s .PHONY : __/__/src/errcode.s # target to generate assembly for a file __/__/src/errcode.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/__/__/src/errcode.c.s .PHONY : __/__/src/errcode.c.s protocol.o: protocol.c.o .PHONY : protocol.o # target to build an object file protocol.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/protocol.c.o .PHONY : protocol.c.o protocol.i: protocol.c.i .PHONY : protocol.i # target to preprocess a source file protocol.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/protocol.c.i .PHONY : protocol.c.i protocol.s: protocol.c.s .PHONY : protocol.s # target to generate assembly for a file protocol.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/protocol.c.s .PHONY : protocol.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... protocol" @echo "... rebuild_cache" @echo "... __/__/src/errcode.o" @echo "... __/__/src/errcode.i" @echo "... __/__/src/errcode.s" @echo "... protocol.o" @echo "... protocol.i" @echo "... protocol.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.common.result0000664000000000000000000000072012242653271021726 0ustar rootrootlua c = box.net.sql.connect('abcd') --- error: '[string "-- sql.lua (internal file)..."]:29: Unknown driver ''abcd''' ... lua c = box.net.sql.connect('mysql') --- error: '[string "-- sql.lua (internal file)..."]:64: Usage: box.net.sql.connect(''mysql'', host, port, user, password, db, ...)' ... lua c = box.net.sql.connect('pg') --- error: '[string "-- sql.lua (internal file)..."]:64: Usage: box.net.sql.connect(''pg'', host, port, user, password, db, ...)' ... tarantool-1.5.1.218.g1a69fd6/test/box/configuration.test0000664000000000000000000000477412231715276021321 0ustar rootroot# encoding: tarantool # import os import sys import shutil # mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356 sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "") print """ # Bug #708685: # Addition of required configuration file options broke backward # compatibility # (https://bugs.launchpad.net/bugs/708685) """ # stop current server server.stop() # start server from config with holes in spaces server.deploy("box/tarantool_bug708685.cfg") # check connection exec admin "show configuration" print """ # Bug #884768: # Test representation of boolean values # (https://bugs.launchpad.net/bugs/884768) """ # stop current server server.stop() # start server from config with different boolean represenation server.deploy("box/tarantool_bug884768.cfg") # check values exec admin "show configuration" print """ # Bug #876541: # Test floating point values (wal_fsync_delay) with fractional part # (https://bugs.launchpad.net/bugs/876541) """ # stop current server server.stop() server.deploy("box/tarantool_bug876541.cfg") # check values exec admin "lua box.cfg.wal_fsync_delay" print """ # Bug#928413 Lua malfunction on certain configuration # (https://bugs.launchpad.net/bugs/928413) """ # stop current server server.stop() server.deploy("box/tarantool_bug928413.cfg") # check values exec admin "lua box.cfg.wal_fsync_delay" exec admin "lua box.space[0].enabled" exec admin "reload configuration" print """ # Test field type conflict in keys """ # stop current server server.stop() # start server with memcached space conflict sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool") server.test_option("-c " + os.path.join(os.getcwd(), "box/tarantool_bad_type.cfg")) sys.stdout.pop_filter() script_dir_path = os.path.join(vardir, "script_dir") os.mkdir(script_dir_path) shutil.copy("box/test_init.lua", os.path.join(script_dir_path, "init.lua")) server.stop() server.deploy("box/tarantool_scriptdir.cfg") exec admin "lua print_config()" # Test script_dir + require server.stop() shutil.copy("box/require_init.lua", os.path.join(script_dir_path, "init.lua")) shutil.copy("box/require_mod.lua", os.path.join(script_dir_path, "mod.lua")) server.deploy("box/tarantool_scriptdir.cfg") exec admin "lua string.gmatch(package_path, '([^;]*)')()" exec admin "lua string.gmatch(package_cpath, '([^;]*)')()" exec admin "lua mod.test(10, 15)" # restore default server server.stop() shutil.rmtree(script_dir_path, True) server.deploy(self.suite_ini["config"]) sys.stdout.pop_filter() # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_empty.cfg0000664000000000000000000000000012202131537021413 0ustar rootroottarantool-1.5.1.218.g1a69fd6/test/box/panic_on_wal_error.cfg0000664000000000000000000000200212231715257022051 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). # slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # pid_file = "box.pid" # # Pipe the logs into the following process. # logger="cat - >> tarantool.log" # # Read only and read-write port. primary_port = 33013 # Read-only port. secondary_port = 33014 # # The port for administrative commands. # admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50 panic_on_wal_error = false # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/cjson.test0000664000000000000000000000106412231715257017552 0ustar rootroot# encoding: tarantool # print("cjson tests") exec admin "lua type(box.cjson)" exec admin "lua box.cjson.encode(123)" exec admin "lua box.cjson.encode({123})" exec admin "lua box.cjson.encode({123, 234, 345})" exec admin "lua box.cjson.encode({abc = 234, cde = 345})" exec admin "lua box.cjson.encode({Метапеременная = { 'Метазначение' } })" exec admin "lua box.cjson.decode('123')" exec admin "lua box.cjson.decode('[123, \"Кудыкины горы\"]')[2]" exec admin "lua box.cjson.decode('{\"test\": \"Результат\"}').test" tarantool-1.5.1.218.g1a69fd6/test/box/snapshot.test0000664000000000000000000000437612231715257020306 0ustar rootroot# encoding: tarantool # import os import time import yaml from signal import SIGUSR1 print """ # Verify that the server starts from a pre-recorded snapshot. # This way we check that the server can read old snapshots (v11) # going forward. """ server.stop() snapshot = os.path.join(vardir, "00000000000000000500.snap") os.symlink(os.path.abspath("box/00000000000000000500.snap"), snapshot) server.start() for i in range(0, 501): exec sql "select * from t0 where k0={0}".format(i) print "# Restore the default server..." server.stop() os.unlink(snapshot) server.start() print """# # A test case for: http://bugs.launchpad.net/bugs/686411 # Check that 'save snapshot' does not overwrite a snapshot # file that already exists. Verify also that any other # error that happens when saving snapshot is propagated # to the caller. """ exec sql "insert into t0 values (1, 'first tuple')" exec admin "save snapshot" # In absence of data modifications, two consecutive # 'save snapshot' statements will try to write # into the same file, since file name is based # on LSN. # Don't allow to overwrite snapshots. exec admin "save snapshot" # # Increment LSN exec sql "insert into t0 values (2, 'second tuple')" # # Check for other errors, e.g. "Permission denied". print "# Make 'var' directory read-only." os.chmod(vardir, 0555) exec admin "save snapshot" # cleanup os.chmod(vardir, 0755) exec sql "delete from t0 where k0 = 1" exec sql "delete from t0 where k0 = 2" print """# # A test case for http://bugs.launchpad.net/bugs/727174 # "tarantool_box crashes when saving snapshot on SIGUSR1" #""" print """ # Increment the lsn number, to make sure there is no such snapshot yet #""" exec sql "insert into t0 values (1, 'Test tuple')" result = exec admin silent "show info" info = yaml.load(result)["info"] pid = info["pid"] snapshot = str(info["lsn"]).zfill(20) + ".snap" snapshot = os.path.join(vardir, snapshot) iteration = 0 MAX_ITERATIONS = 100 while not os.access(snapshot, os.F_OK) and iteration < MAX_ITERATIONS: if iteration % 10 == 0: os.kill(pid, SIGUSR1) time.sleep(0.1) iteration = iteration + 1 if iteration == 0 or iteration >= MAX_ITERATIONS: print "Snapshot is missing." else: print "Snapshot exists." exec sql "delete from t0 where k0=1" # vim: syntax=python spell tarantool-1.5.1.218.g1a69fd6/test/box/protocol.c0000664000000000000000000000717412231715257017552 0ustar rootroot #include #include #include #include "tarantool/util.h" #include "errcode.h" #include #include #include /** Client handler. Reused between tests. */ struct tnt_stream *t; #define header() printf("\t*** %s ***\n", __func__) #define footer() printf("\t*** %s: done ***\n ", __func__) /** Test the ping command. */ void test_ping() { header(); const char message[]= { 0x00, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; tnt_io_send_raw(TNT_SNET_CAST(t), (char*)message, sizeof(message), 1); t->wrcnt++; struct tnt_iter i; tnt_iter_reply(&i, t); tnt_next(&i); struct tnt_reply *r = TNT_IREPLY_PTR(&i); printf("return_code: %"PRIu32"\n", r->code); /* =0 */ tnt_iter_free(&i); footer(); } /** Test the ping command. */ void test_replace() { header(); const char message[]= { 0xd, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x4, 0x1, 0x0, 0x0, 0x0 }; tnt_io_send_raw(TNT_SNET_CAST(t), (char*)message, sizeof(message), 1); t->wrcnt++; struct tnt_iter i; tnt_iter_reply(&i, t); tnt_next(&i); struct tnt_reply *r = TNT_IREPLY_PTR(&i); printf("return_code: %"PRIu32"\n", r->code); /* =0 */ tnt_iter_free(&i); footer(); } /** A test case for Bug#702397 * https://bugs.launchpad.net/tarantool/+bug/702397 "If SELECT * request specifies tuple count 0, no error" */ void test_bug702397() { header(); const char message[]= { 0x11, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0 }; tnt_io_send_raw(TNT_SNET_CAST(t), (char*)message, sizeof(message), 1); t->wrcnt++; struct tnt_iter i; tnt_iter_reply(&i, t); tnt_next(&i); struct tnt_reply *r = TNT_IREPLY_PTR(&i); printf("return_code: %s, %s\n", tnt_errcode_str(TNT_REPLY_ERR(r)), r->error); tnt_iter_free(&i); footer(); } /** A test case for Bug#702399 * https://bugs.launchpad.net/tarantool/+bug/702399 * ERR_CODE_ILLEGAL_PARAMS is returned when there is no such key */ void test_bug702399() { header(); const char message[]= { 0x11, 0x0, 0x0, 0x0, 0x1d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x4, 0x1, 0x0, 0x0, 0x0 }; tnt_io_send_raw(TNT_SNET_CAST(t), (char*)message, sizeof(message), 1); t->wrcnt++; struct tnt_iter i; tnt_iter_reply(&i, t); tnt_next(&i); struct tnt_reply *r = TNT_IREPLY_PTR(&i); printf("return_code: %s, %s\n", tnt_errcode_str(TNT_REPLY_ERR(r)), r->error); tnt_iter_free(&i); footer(); } /** A test case for Bug#1009992 * https://bugs.launchpad.net/tarantool/+bug/1009992 * ER_ILLEGAL_PARAMS is returned on bad operation id */ void test_bug1009992() { header(); struct tnt_header h = { .type = 12345678, /* bad operation */ .len = 0, .reqid = 0 }; tnt_io_send_raw(TNT_SNET_CAST(t), (char*)&h, sizeof(h), 1); t->wrcnt++; struct tnt_iter i; tnt_iter_reply(&i, t); tnt_next(&i); struct tnt_reply *r = TNT_IREPLY_PTR(&i); printf("return_code: %s, %s\n", tnt_errcode_str(TNT_REPLY_ERR(r)), r->error); tnt_iter_free(&i); footer(); } int main() { t = tnt_net(NULL); if (t == NULL) return 1; tnt_set(t, TNT_OPT_HOSTNAME, "localhost"); tnt_set(t, TNT_OPT_PORT, 33013); if (tnt_init(t) == -1) return 1; if (tnt_connect(t) == -1) return 1; test_ping(); test_replace(); test_bug702397(); test_bug702399(); test_bug1009992(); tnt_stream_free(t); return 0; } tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_scriptdir.cfg0000664000000000000000000000207212231715257022304 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). # slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # pid_file = "box.pid" # # Pipe the logs into the following process. # logger="cat - >> tarantool.log" # # Read only and read-write port. primary_port = 33013 # Read-only port. secondary_port = 33014 # # The port for administrative commands. # admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50 # # script directory (where init.lua is expected to be) script_dir = "script_dir" # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.mysql.result0000664000000000000000000000334212231715257021607 0ustar rootrootlua c = box.net.sql.connect('abcd') --- error: '[string "-- sql.lua (internal file)..."]:29: Unknown driver ''abcd''' ... lua dump = function(v) return box.cjson.encode(v) end --- ... lua connect = {} --- ... lua for tk in string.gmatch(os.getenv('MYSQL'), '[^:]+') do table.insert(connect, tk) end --- ... lua c = box.net.sql.connect('mysql', unpack(connect)) --- ... lua for k, v in pairs(c) do print(k, ': ', type(v)) end --- raise: boolean processing: boolean queue: table host: string raw: userdata driver: string password: string db: string user: string port: string ... lua c:execute('SEL ECT 1') --- error: '[string "-- sql.lua (internal file)..."]:105: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''SEL ECT 1'' at line 1' ... lua dump({c:execute('SELECT ? AS bool1, ? AS bool2, ? AS nil, ? AS num, ? AS str', true, false, nil, 123, 'abc')}) --- - [[{"bool2":0,"str":"abc","num":123,"bool1":1}],1] ... lua dump({c:execute('SELECT * FROM (SELECT ?) t WHERE 1 = 0', 2)}) --- - [{},0] ... lua dump({c:execute('CREATE PROCEDURE p1() BEGIN SELECT 1 AS One; SELECT 2 AS Two, 3 AS Three; END')}) --- - [{},0] ... lua dump({c:execute('CALL p1')}) --- - [[{"One":1},{"Three":3,"Two":2}],2] ... lua dump({c:execute('DROP PROCEDURE p1')}) --- - [{},0] ... lua dump({c:execute('SELECT 1 AS one UNION ALL SELECT 2')}) --- - [[{"one":1},{"one":2}],2] ... lua dump({c:execute('SELECT 1 AS one UNION ALL SELECT 2; SELECT ? AS two', 'abc')}) --- - [[{"one":1},{"one":2},{"two":"abc"}],3] ... lua c:quote('test "abc" test') --- - test \"abc\" test ... lua c:begin_work() --- - 0 ... lua c:rollback() --- - 0 ... lua c:begin_work() --- - 0 ... lua c:commit() --- - 0 ... tarantool-1.5.1.218.g1a69fd6/test/box/net.box.test0000664000000000000000000000451012231715257020012 0ustar rootroot# encoding: tarantool # vim: set ft=python : # exec admin "lua iotest()" # exec admin "lua iotest()" # exec admin "lua box.fiber.sleep(.5)" exec admin "lua remote = box.net.box.new('localhost', box.cfg.primary_port, '0.5')" exec admin "lua type(remote)" exec admin "lua remote:ping()" exec admin "lua remote:ping()" exec admin "lua box.net.box.ping(remote)" exec admin "lua box.insert(0, 123, 'test1', 'test2')" exec admin "lua box.select(0, 0, 123)" exec admin "lua tuple = remote:select(0, 0, 123)" exec admin "lua remote:call('box.select', '0', '0', 123)" exec admin "lua tuple" exec admin "lua type(tuple)" exec admin "lua #tuple" exec admin "lua box.update(0, 123, '=p', 1, 'test1-updated')" exec admin "lua remote:update(0, 123, '=p', 2, 'test2-updated')" exec admin "lua box.insert(0, 123, 'test1', 'test2')" exec admin "lua remote:insert(0, 123, 'test1', 'test2')" exec admin "lua remote:insert(0, 345, 'test1', 'test2')" exec admin "lua remote:select(0, 0, 345)" exec admin "lua remote:call('box.select', '0', '0', 345)" exec admin "lua box.select(0, 0, 345)" exec admin "lua remote:replace(0, 345, 'test1-replaced', 'test2-replaced')" exec admin "lua box.select(0, 0, 345)" exec admin "lua remote:select_limit(0, 0, 0, 1000, 345)" exec admin "lua box.select_range(0, 0, 1000)" exec admin "lua remote:select_range(0, 0, 1000)" exec admin "lua box.select(0, 0, 345)" exec admin "lua remote:select(0, 0, 345)" exec admin "lua remote:timeout(0.5):select(0, 0, 345)" exec admin "lua remote:call('box.fiber.sleep', '.01')" exec admin "lua remote:timeout(0.01):call('box.fiber.sleep', '10')" exec admin "lua pstart = box.time()" exec admin "lua parallel = {}" exec admin "lua function parallel_foo(id) box.fiber.sleep(math.random() * .05) return id end" exec admin "lua parallel_foo('abc')" exec admin "lua for i = 1, 20 do box.fiber.resume(box.fiber.create(function() box.fiber.detach() local s = string.format('%07d', i) local so = remote:call('parallel_foo', s) table.insert(parallel, tostring(s == so[0]) ) end)) end" exec admin "lua for i = 1, 20 do if #parallel == 20 then break end box.fiber.sleep(0.1) end" exec admin "lua unpack(parallel)" exec admin "lua #parallel" exec admin "lua box.time() - pstart < 0.5" exec admin "lua remote:close()" exec admin "lua remote:close()" exec admin "lua remote:ping()" exec admin "lua box.space[0]:truncate()" tarantool-1.5.1.218.g1a69fd6/test/box/tarantool.cfg0000664000000000000000000000174712231715257020231 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). # slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # pid_file = "box.pid" # # Pipe the logs into the following process. # logger="cat - >> tarantool.log" # # Read only and read-write port. primary_port = 33013 # Read-only port. secondary_port = 33014 # # The port for administrative commands. # admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50 # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/info.result0000664000000000000000000000213212231715257017725 0ustar rootrootlua box.info.unknown_variable --- - nil ... lua box.info[23] --- - nil ... lua box.info['unknown_variable'] --- - nil ... lua string.match(box.info.version, '^[1-9]') ~= nil --- - true ... lua string.match(box.info.pid, '^[1-9][0-9]*$') ~= nil --- - true ... lua string.match(box.info.logger_pid, '^[1-9][0-9]*$') ~= nil --- - true ... lua box.info.lsn > 0 --- - true ... lua box.info.recovery_lag --- - 0 ... lua box.info.recovery_last_update --- - 0 ... lua box.info.status --- - primary ... lua string.len(box.info.config) > 0 --- - true ... lua string.len(box.info.build.target) > 0 --- - true ... lua string.len(box.info.build.compiler) > 0 --- - true ... lua string.len(box.info.build.flags) > 0 --- - true ... lua string.len(box.info.build.options) > 0 --- - true ... lua string.len(box.info.uptime) > 0 --- - true ... lua string.match(box.info.uptime, '^[1-9][0-9]*$') ~= nil --- - true ... lua for k, v in pairs(box.info()) do print(k) end --- version status pid lsn snapshot_pid recovery_last_update recovery_lag uptime build logger_pid config ... lua box.info.snapshot_pid --- - 0 ... tarantool-1.5.1.218.g1a69fd6/test/box/tarantool_bug708685.cfg0000664000000000000000000000076512231715257021567 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" space[2].enabled = 1 space[2].index[0].type = "HASH" space[2].index[0].unique = 1 space[2].index[0].key_field[0].fieldno = 0 space[2].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/box/box_fiber.lua0000664000000000000000000000416012231715257020177 0ustar rootroot-- -------------------------------------------------------------------------- -- -- Local functions -- -------------------------------------------------------------------------- -- -- printer task fiber local printer_task -- tester task fiber local tester_task -- -------------------------------------------------------------------------- -- -- printer task routines -- -------------------------------------------------------------------------- -- -- odd printer local function odd(x) print('A: odd ', x) box.fiber.yield(x) print('B: odd ', x) end -- even printer local function even(x) print('C: even ', x) if x == 2 then return x end print('D: even ', x) end -- printer task routine main function local function printer_task_routine(x) print("printer: tester status = ", box.fiber.status(tester_task)) print("printer: printer status = ", box.fiber.status(printer_task)) for i = 1, x do if i == 3 then box.fiber.yield(-1) end if i % 2 == 0 then even(i) else odd(i) end end end -- -------------------------------------------------------------------------- -- -- tester task routines -- -------------------------------------------------------------------------- -- -- tester task routine main function local function tester_task_routine() printer_task = box.fiber.create(printer_task_routine) print("tester: status(tester) = ", box.fiber.status(tester_task)) print("tester: status(printer) = ", box.fiber.status(printer_task)) count = 1 while box.fiber.status(printer_task) ~= "dead" do print("count: ", count) box.fiber.resume(printer_task, 5) print("status: ", box.fiber.status(printer_task)) count = count + 1 end end -- -------------------------------------------------------------------------- -- -- Test functions -- -------------------------------------------------------------------------- -- -- run fiber test function box_fiber_run_test() -- run tester tester_task = box.fiber.create(tester_task_routine) box.fiber.resume(tester_task) end tarantool-1.5.1.218.g1a69fd6/test/box/lua_sandbox.result0000664000000000000000000000036412231715276021277 0ustar rootrootlua os.execute --- - nil ... lua os.exit --- - nil ... lua os.rename --- - nil ... lua os.tmpname --- - nil ... lua os.remove --- - nil ... lua io --- - nil ... lua require --- - nil ... lua package --- - nil ... lua ffi --- - nil ... tarantool-1.5.1.218.g1a69fd6/test/box/info.test0000664000000000000000000000237312231715257017375 0ustar rootroot# encoding: tarantool import os import sys # Test Lua from admin console. Whenever producing output, # make sure it's a valid YAML. exec admin "lua box.info.unknown_variable" exec admin "lua box.info[23]" exec admin "lua box.info['unknown_variable']" exec admin "lua string.match(box.info.version, '^[1-9]') ~= nil" exec admin "lua string.match(box.info.pid, '^[1-9][0-9]*$') ~= nil" exec admin "lua string.match(box.info.logger_pid, '^[1-9][0-9]*$') ~= nil" # exec admin "lua box.info.lsn() > 0" # exec admin "lua box.info.recovery_lag()" # exec admin "lua box.info.recovery_last_update()" # exec admin "lua box.info.status()" exec admin "lua box.info.lsn > 0" exec admin "lua box.info.recovery_lag" exec admin "lua box.info.recovery_last_update" exec admin "lua box.info.status" exec admin "lua string.len(box.info.config) > 0" exec admin "lua string.len(box.info.build.target) > 0" exec admin "lua string.len(box.info.build.compiler) > 0" exec admin "lua string.len(box.info.build.flags) > 0" exec admin "lua string.len(box.info.build.options) > 0" exec admin "lua string.len(box.info.uptime) > 0" exec admin "lua string.match(box.info.uptime, '^[1-9][0-9]*$') ~= nil" exec admin "lua for k, v in pairs(box.info()) do print(k) end" exec admin "lua box.info.snapshot_pid" tarantool-1.5.1.218.g1a69fd6/test/box/net_sql.mysql.skipcond0000664000000000000000000000030212231715257022074 0ustar rootroot# encoding: tarantool import os try: (host, port, user, password, db) = os.getenv('MYSQL').split(':') except (RuntimeError, TypeError, NameError, AttributeError, ValueError): self.skip = 1 tarantool-1.5.1.218.g1a69fd6/test/box/00000000000000000500.snap0000664000000000000000000011170712202131537020401 0ustar rootrootSNAP 0.11 pNibWA*ȣdI am a tuple 1 (ͦNibWA*I am a tuple 2 #NibWA*<ŘI am a tuple 3 NibWA*M%mI am a tuple 4 5lBNibWA*&I am a tuple 5 +NibWA*:I am a tuple 6 +NibWA*aujI am a tuple 7 BXNibWA*jI am a tuple 8 FNibWA* 1:_ I am a tuple 9 ͼNibWA+FC I am a tuple 10 C>NibWA+2 I am a tuple 11 %{_NibWA+ I am a tuple 12 %NibWA+cs- I am a tuple 13 oNibWA+O#YI am a tuple 14 1<NibWA+{ I am a tuple 15 QNibWA+ehI am a tuple 16 lNibWA+R@ I am a tuple 17 rX"<NibWA+5 I am a tuple 18 P|NibWA+AI am a tuple 19 m^NibWA+i!I am a tuple 20 ,!3NibWA+׀ I am a tuple 21 <_NibWA+kI am a tuple 22 bNibWA+ZKI am a tuple 23 !lNibWA+vGI am a tuple 24 NibWA+%oaI am a tuple 25 @NibWA++I am a tuple 26 NibWA+I am a tuple 27 >)[NibWA+g 4I am a tuple 28 wNibWA+#I am a tuple 29 NibWA+}HI am a tuple 30 SNibWA+<I am a tuple 31 饉NibWA+X㫠 I am a tuple 32 *NibWA+旃e!I am a tuple 33 7INibWA+"I am a tuple 34 ΚNibWA+t-#I am a tuple 35 +NibWA+>$I am a tuple 36 Qu(NibWA+ %I am a tuple 37 eXNibWA+x&I am a tuple 38 5 NibWA+P'I am a tuple 39 Y?NibWA+(I am a tuple 40 {NibWA+M&A)I am a tuple 41 NibWA+~ *I am a tuple 42 ξNibWA+z+I am a tuple 43 3fcNibWA+؛,I am a tuple 44 =NibWA+[-I am a tuple 45 J2NibWA+G'.I am a tuple 46 lNibWA++3/I am a tuple 47 .NibWA+/0I am a tuple 48 $pNibWA+X1I am a tuple 49  ENibWA+$<2I am a tuple 50 TNibWA+3I am a tuple 51 ѼNibWA+]`n4I am a tuple 52 |$NibWA+H5I am a tuple 53 CGNibWA+τF&6I am a tuple 54 NibWA+qn7I am a tuple 55 1=dNibWA+8I am a tuple 56 cNibWA+z.9I am a tuple 57 GN@NibWA+^ :I am a tuple 58 eNibWA+L*;I am a tuple 59 ;|"NibWA+*O<I am a tuple 60 _NibWA+g=I am a tuple 61 PP#NibWA+>I am a tuple 62 NibWA+tN?I am a tuple 63 fvNibWA+`@I am a tuple 64 DNibWA+޽AI am a tuple 65 6wNibWA+VJMBI am a tuple 66 NibWA+S"bCI am a tuple 67 H NibWA+DغRDI am a tuple 68 ~3NibWA+EI am a tuple 69 NibWA+FFI am a tuple 70 vZhNibWA+8n`GI am a tuple 71 ҩNibWA+}HHI am a tuple 72 KNibWA+X .II am a tuple 73 ;(NibWA+tu JI am a tuple 74 ۪NibWA+KI am a tuple 75 3NibWA+ 4RLI am a tuple 76 ]mINibWA+@MI am a tuple 77 ,i@NibWA+PdlNI am a tuple 78 mNibWA+DUOI am a tuple 79 /tNibWA+6,PI am a tuple 80 $*NibWA+XNQI am a tuple 81 %NibWA+RI am a tuple 82 {NibWA+(SI am a tuple 83 lvNibWA+e)TI am a tuple 84 NۈNibWA+cTUI am a tuple 85 ZNibWA+PVI am a tuple 86 ٛNibWA+WI am a tuple 87 ҝ0NibWA+࿖XI am a tuple 88 0nNibWA+^˾{YI am a tuple 89 DNibWA+"jIZI am a tuple 90 JNibWA+B[I am a tuple 91 ŢNibWA+[\I am a tuple 92 h%NibWA+]I am a tuple 93 WFNibWA+S^I am a tuple 94 NibWA+wז_I am a tuple 95 _2NibWA+r0`I am a tuple 96 llNibWA+RaI am a tuple 97 ANibWA+"\bI am a tuple 98 =kHNibWA+Vt7cI am a tuple 99 w NibWA,XdI am a tuple 100 RNibWA,c9eI am a tuple 101 E@%rI am a tuple 114 p NibWA,оsI am a tuple 115 WSNibWA,<tI am a tuple 116 fNibWA,IuI am a tuple 117 ݓNibWA,Zx\vI am a tuple 118 % NibWA,wI am a tuple 119 NibWA, kxI am a tuple 120 9YNibWA,䕡[yI am a tuple 121 jNibWA,'_zI am a tuple 122 [NibWA,{I am a tuple 123 m`NibWA, sW|I am a tuple 124 ENibWA,O}I am a tuple 125 %+NibWA,\~I am a tuple 126 NibWA,b~=SI am a tuple 127 |ɎNibWA,I am a tuple 128 NibWA,7I am a tuple 129 NibWA,dI am a tuple 130 8/NibWA,U,I am a tuple 131 olNibWA,"۫I am a tuple 132 .IJzNibWA,PTI am a tuple 133 aNibWA,nI am a tuple 134 DNibWA,LhI am a tuple 135 W@NibWA,!;0I am a tuple 136 VNibWA,ZI am a tuple 137 INibWA,eWI am a tuple 138 _NibWA,6yI am a tuple 139 NNibWA,XI am a tuple 140 @kNibWA,I am a tuple 141 NibWA,sI am a tuple 142  NibWA,;\I am a tuple 143  *NibWA,멙I am a tuple 144 -#<NibWA,WI am a tuple 145 ~BMNibWA,"I am a tuple 146 OhNibWA,(I am a tuple 147 INibWA,jI am a tuple 148 x5ҡNibWA,aoI am a tuple 149 fNibWA,I am a tuple 150 NibWA,TI am a tuple 151 *!NibWA,9NI am a tuple 152 Ŏ>7NibWA,ǨI am a tuple 153 &NibWA,.%|rI am a tuple 154 x0NibWA,I am a tuple 155 0yNibWA,YzI am a tuple 156 oNibWA,YBI am a tuple 157 sGpNibWA,J I am a tuple 158 BfNibWA,wI am a tuple 159 Ȟ-NibWA,BI am a tuple 160 :;NibWA,u#xI am a tuple 161 NibWA,m|I am a tuple 162 rNibWA,Xn I am a tuple 163  uNibWA,0{tI am a tuple 164 =,cNibWA,ޅI am a tuple 165 nFBYNibWA,ޏI am a tuple 166 _gONibWA,pI am a tuple 167 @NibWA,I am a tuple 246 -hNibWA,!I am a tuple 247 2ʻNibWA,"b4I am a tuple 248 QNibWA,̜I am a tuple 249 NibWA,@YI am a tuple 250 NibWA,HI am a tuple 251 dlYNibWA,%xI am a tuple 252 IONibWA,7ۧI am a tuple 253 DbNibWA,9sDI am a tuple 254 u6GNibWA,I am a tuple 255 NibWA,huI am a tuple 256 NibWA,=I am a tuple 257 A NibWA,.,I am a tuple 258 NibWA,Ґ<I am a tuple 259 8NibWA,SI am a tuple 260 NibWA,.I am a tuple 261 p2NibWA,;[ݨI am a tuple 262 ԋ$NibWA,եWI am a tuple 263 e92NibWA,_I am a tuple 264 T&$NibWA,;s7 I am a tuple 265 rNibWA,=3 I am a tuple 266 6nWNibWA,*\ I am a tuple 267 0ȯNibWA,gx I am a tuple 268 NibWA,_N I am a tuple 269 NibWA,\2I am a tuple 270 JNibWA,=vI am a tuple 271 NibWA,EI am a tuple 272 RNibWA,I am a tuple 273 mNibWA, PyI am a tuple 274 \ NibWA,.1I am a tuple 275 {f&NibWA,YqVI am a tuple 276 JNibWA,7II am a tuple 277 8ONibWA,5:I am a tuple 278 ?jNibWA,J[I am a tuple 279 L3NibWA,+I am a tuple 280 }C%NibWA,~zI am a tuple 281 .NibWA,I am a tuple 282  NibWA,S/I am a tuple 283 wkNibWA,;GI am a tuple 284 $}NibWA,&'I am a tuple 285 ?JGNibWA,oh#I am a tuple 286 ۛoQNibWA, I am a tuple 287 cLNibWA,&z I am a tuple 288 RϨNibWA,XB!I am a tuple 289 ѻNibWA,>"I am a tuple 290 NibWA,:t#I am a tuple 291 L\NibWA,Ma$I am a tuple 292 yiJNibWA,r%I am a tuple 293 +BNibWA,}&I am a tuple 294 $gNibWA,2'I am a tuple 295 gpNibWA,j(I am a tuple 296 +õfNibWA,`)I am a tuple 297 YyNibWA,s*I am a tuple 298 h>oNibWA,T#+I am a tuple 299 HwNibWA,c7S,I am a tuple 300 y4NibWA,-I am a tuple 301 *?ZNibWA,N.I am a tuple 302 NibWA,BW/I am a tuple 303 Y{NibWA,pf0I am a tuple 304 =|mNibWA,1I am a tuple 305 WNibWA,]2I am a tuple 306 u7ANibWA,3I am a tuple 307 NibWA,^a4I am a tuple 308 æNibWA,5I am a tuple 309 @NibWA,ve6I am a tuple 310 qQNibWA,7I am a tuple 311 ODpNibWA,E8I am a tuple 312 ~afNibWA,i9I am a tuple 313 OJNibWA,.y:I am a tuple 314 oNibWA,[O;I am a tuple 315 )(NibWA,,(<I am a tuple 316 >NibWA,hII=I am a tuple 317 Ի!NibWA,D>I am a tuple 318 p7NibWA,?,%?I am a tuple 319 ƥNibWA,S4@I am a tuple 320 bNibWA,?AI am a tuple 321 ʎNibWA,~;BI am a tuple 322 *NibWA,ACI am a tuple 323 lV3NibWA,T3DI am a tuple 324 ]NibWA,iEI am a tuple 325 xNibWA,'FI am a tuple 326 ?]NibWA,;!F7GI am a tuple 327 aNibWA,1"HI am a tuple 328 CwNibWA,}PII am a tuple 329 NibWA,^JI am a tuple 330 NibWA,xF?^KI am a tuple 331 v.NibWA,XnLI am a tuple 332 NibWA,:9MI am a tuple 333 V ONibWA,=RNI am a tuple 334 g$YNibWA,&OI am a tuple 335 kfGNibWA,%PI am a tuple 336 Z~_I am a tuple 351 ; NibWA,FN`I am a tuple 352 /NibWA,^/aI am a tuple 353 >NibWA,ZbI am a tuple 354 +i!(NibWA,l<cI am a tuple 355 NibWA,& dI am a tuple 356 =NibWA,؜eI am a tuple 357 OVNibWA,bfI am a tuple 358 ~еNibWA,EgI am a tuple 359 SNibWA,qBhI am a tuple 360 bNibWA,XiI am a tuple 361 1MNibWA,jI am a tuple 362 NibWA,uFkI am a tuple 363 HNibWA,rlI am a tuple 364 1mNibWA,NmI am a tuple 365 NibWA,0]JnI am a tuple 366 y&NibWA,d<oI am a tuple 367 pgNibWA,ppI am a tuple 368 BNibWA,/捏qI am a tuple 369 [YNibWA,#rI am a tuple 370 j#|NibWA,M sI am a tuple 371 MyNibWA,:_<tI am a tuple 372 |EoNibWA,ԡuI am a tuple 373 ϵNibWA,C0vI am a tuple 374 NibWA,QwI am a tuple 375 [UNibWA,exI am a tuple 376 8CNibWA,.XyI am a tuple 377 Ӧt\NibWA, zI am a tuple 378 QJNibWA,jh{I am a tuple 379 NibWA,XʔR|I am a tuple 380 TÍNibWA,4}I am a tuple 381 ܸNibWA,uA~I am a tuple 382 NibWA,VI am a tuple 383 X(zNibWA,phI am a tuple 384 iN lNibWA,I am a tuple 385 :cVNibWA,I am a tuple 386 F@NibWA,,lI am a tuple 387 qNibWA,HI am a tuple 388 <NibWA,eI am a tuple 389 NibWA,sI am a tuple 390 "‡NibWA,mI am a tuple 391 5qNibWA,5I am a tuple 392 ngNibWA,I am a tuple 393 b<;NibWA,*i I am a tuple 394 SNibWA,I am a tuple 395 tZ)NibWA,oI am a tuple 396 E?NibWA,]~9I am a tuple 397 7 NibWA,NpI am a tuple 398 6NibWA,:bI am a tuple 399 LNibWA,UI am a tuple 400 } ?NibWA,`4iI am a tuple 401 .Q#NibWA,zmI am a tuple 402 Dt5NibWA,2I am a tuple 403 8WNibWA,ZeI am a tuple 404 ANibWA,I am a tuple 405 p{NibWA,wuɞI am a tuple 406 mNibWA,aI am a tuple 407 ĉ7NibWA,V)tI am a tuple 408 -NibWA,׾I am a tuple 409 v~ NibWA,4I am a tuple 410 G,NibWA,I am a tuple 411 `\NibWA,n8I am a tuple 412 QJNibWA,CI am a tuple 413 NibWA,rI am a tuple 414 JNibWA,qbI am a tuple 415 (LNibWA,RI am a tuple 416 +8ZNibWA, 3(I am a tuple 417 YtENibWA,>aI am a tuple 418 hqQSNibWA,N_I am a tuple 419 \PNibWA,*L=I am a tuple 420 m0FNibWA,IJ\I am a tuple 421 >^|NibWA, I am a tuple 422 @{jNibWA,9sI am a tuple 423 |NibWA,jI am a tuple 424 jNibWA,=I am a tuple 425 ^PNibWA,HI am a tuple 426 FNibWA,*nI am a tuple 427 ԍ8NibWA,I am a tuple 428 )NibWA,cI am a tuple 429 fzNibWA,ؐI am a tuple 430 W#NibWA,>oI am a tuple 431 [b@NibWA,΍*I am a tuple 432 jeNibWA, sKI am a tuple 433 NSNibWA,I am a tuple 434 0kENibWA,o$I am a tuple 435 NibWA,eI am a tuple 436 VNibWA,I am a tuple 437 NibWA,I am a tuple 438 NibWA,vW]I am a tuple 439 kaNibWA,/I am a tuple 440 D NibWA,%NI am a tuple 441 #*1NibWA,9PI am a tuple 442 'NibWA,׮aI am a tuple 443 sENibWA,I am a tuple 444 B_SNibWA,QEI am a tuple 445 iNibWA,0I am a tuple 446 NibWA,|I am a tuple 447 C y<NibWA,a I am a tuple 448 r\*NibWA,gk1I am a tuple 449 GJNibWA,eMI am a tuple 450 Xb\NibWA,\I am a tuple 451 NibWA,cI am a tuple 452 >NibWA,t }I am a tuple 453 5lNibWA,־I am a tuple 454 NibWA,F 0" exec admin "lua f = box.fiber.create(function() box.fiber.detach() failed = box.session.id() ~= 0 end)" exec admin "lua box.fiber.resume(f)" exec admin "lua failed" exec admin "lua f1 = box.fiber.create(function() if box.session.id() == 0 then failed = true end end)" exec admin "lua box.fiber.resume(f1)" exec admin "lua failed" exec admin "lua box.session.peer() == box.session.peer(box.session.id())" # check on_connect/on_disconnect triggers exec admin "lua box.session.on_connect(function() end)" exec admin "lua box.session.on_disconnect(function() end)" # check it's possible to reset these triggers # exec admin "lua type(box.session.on_connect(function() error('hear') end))" exec admin "lua type(box.session.on_disconnect(function() error('hear') end))" # check on_connect/on_disconnect argument count and type exec admin "lua box.session.on_connect()" exec admin "lua box.session.on_disconnect()" exec admin "lua box.session.on_connect(function() end, function() end)" exec admin "lua box.session.on_disconnect(function() end, function() end)" exec admin "lua box.session.on_connect(1, 2)" exec admin "lua box.session.on_disconnect(1, 2)" exec admin "lua box.session.on_connect(1)" exec admin "lua box.session.on_disconnect(1)" # use of nil to clear the trigger exec admin "lua type(box.session.on_connect(nil))" exec admin "lua type(box.session.on_disconnect(nil))" exec admin "lua type(box.session.on_connect(nil))" exec admin "lua type(box.session.on_disconnect(nil))" # check how connect/disconnect triggers work exec admin "lua function inc() active_connections = active_connections + 1 end" exec admin "lua function dec() active_connections = active_connections - 1 end" exec admin "lua box.session.on_connect(inc)" exec admin "lua box.session.on_disconnect(dec)" exec admin "lua active_connections = 0" con1 = AdminConnection('localhost', server.admin_port) exec con1 "lua active_connections" con2 = AdminConnection('localhost', server.admin_port) exec con2 "lua active_connections" con1.disconnect() con2.disconnect() exec admin "lua type(box.session.on_connect(nil))" exec admin "lua type(box.session.on_disconnect(nil))" # write audit trail of connect/disconnect into a space exec admin "lua box.session.on_connect(function() box.insert(0, box.session.id()) end)" exec admin "lua box.session.on_disconnect(function() box.delete(0, box.session.id()) end)" exec con1 "lua box.unpack('i', box.select(0, 0, box.session.id())[0]) == box.session.id()" con1.disconnect() # if on_connect() trigger raises an exception, the connection is dropped exec admin "lua type(box.session.on_connect(function() nosuchfunction() end))" con1 = BoxConnection('localhost', server.primary_port) try: con1.execute("select * from t0 where k0=0") con1.execute("select * from t0 where k0=0") except Exception as e: print "disconnected" # cleanup exec admin "lua type(box.session.on_connect(nil))" exec admin "lua type(box.session.on_disconnect(nil))" exec admin "lua active_connections" # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/box/require_init.lua0000664000000000000000000000011612231715276020735 0ustar rootrootmod = require("mod") package_path = package.path package_cpath = package.cpathtarantool-1.5.1.218.g1a69fd6/test/connector_c/0000775000000000000000000000000012231715257017240 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/connector_c/cmake_install.cmake0000664000000000000000000000226412213333035023042 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/test/connector_c/connector.xlog0000664000000000000000000053447712231715257022151 0ustar rootrootXLOG 0.11 ?R ADB>aZ  key_0_32_0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 02/ AD8Z  key_0_32_1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -e1 ADKUלZ  key_0_32_2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8i#2 AD#Z  key_0_32_3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx j2 AD\Z  key_0_32_4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fT3 ADZ  key_0_32_5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx lh43 AD bZ  key_0_32_6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | 4 AD/Z  key_0_32_7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1. 4 ADrZ  key_0_32_8 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iUE 5 AD ZZ  key_0_32_9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =^ p5 AE7~Z  key_0_32_10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b{ 5 AE{Z  key_0_32_11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 9=6 AE Z  key_0_32_12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6 AE٫Z  key_0_32_13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx k7 AEn=Z  key_0_32_14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3om7 AEZ  key_0_32_15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b7 AEy}Z  key_0_32_16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Td8 AEl Z  key_0_32_17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #H8 AE1Z  key_0_32_18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ',#69 AEygZ  key_0_32_19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CP9 AEύHZ  key_0_32_20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ԴD9 AEbZ  key_0_32_21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx vf: AEmZ  key_0_32_22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx l6: AEUZ  key_0_32_23 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &V/; AEzvZ  key_0_32_24 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7; AE_Z  key_0_32_25 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b< AEßZ  key_0_32_26 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ok< AE HkaZ  key_0_32_27 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ނ < AETHZ  key_0_32_28 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx !@?= AE,Z  key_0_32_29 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2 = AE=Z  key_0_32_30 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CQ!> AE=zCZ  key_0_32_31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "> AEN gZ  key_0_32_32 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx X#> AEZ  key_0_32_33 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;S "$c? AEYBZ  key_0_32_34 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %? AEDZ  key_0_32_35 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ˓&,@ AEUY>Z  key_0_32_36 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #7'@ AE*ޭ@Z  key_0_32_37 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2 (0A AEwZ  key_0_32_38 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %M)A AEUZ  key_0_32_39 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qs*A AEZ  key_0_32_40 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &+8C AEr+Z  key_0_32_41 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ͍,C AE6%Z  key_0_32_42 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +p-D AEve[Z  key_0_32_43 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ˈ.D AE&Z  key_0_32_44 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '/D AEa+XZ  key_0_32_45 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx J90BE AEZ  key_0_32_46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 31E AE<Z  key_0_32_47 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '-2F AEJ AECRZ  key_0_32_60 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -&?%K AE^Z  key_0_32_61 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zVO@K AE»fZ  key_0_32_62 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx N AK AE0IOZ  key_0_32_63 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @BiL AEleZ  key_0_32_64 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JCL AE'Z  key_0_32_65 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8,\D2M AETZ  key_0_32_66 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EM AEqZ  key_0_32_67 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -|HFGN AEbZ  key_0_32_68 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -cDGN AE 6Z  key_0_32_69 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rXHO AE`CZ  key_0_32_70 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yI|O AE`Z  key_0_32_71 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CJO AET}GZ  key_0_32_72 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nKKP AE߉9Z  key_0_32_73 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ЦyLP AEDZ  key_0_32_74 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1MQ AE^:Z  key_0_32_75 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7NyQ AEw CZ  key_0_32_76 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx G`OQ AEZ  key_0_32_77 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _PBR AECZ  key_0_32_78 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *QR AE* =Z  key_0_32_79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx R S AE`fTZ  key_0_32_80 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ݳSrS AE*Z  key_0_32_81 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx )BɞT?T AEqZ  key_0_32_82 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GѭUT AEZ  key_0_32_83 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6V8U AE?#Z  key_0_32_84 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "HWU AEZ  key_0_32_85 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;XV AEw(WZ  key_0_32_86 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx UYdV AE>)Z  key_0_32_87 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *ZV AEZ  key_0_32_88 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i[4W AE*(yZ  key_0_32_89 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E\W AECuZ  key_0_32_90 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5]W AE{/ Z  key_0_32_91 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u]a^gX AE2Z  key_0_32_92 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4_X AE0lZ  key_0_32_93 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx S`;Y AEZ  key_0_32_94 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aY AE'"Z  key_0_32_95 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0ӊbY AET vZ  key_0_32_96 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~cfZ AE5Z  key_0_32_97 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx KdZ AE5KZ  key_0_32_98 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $qe.[ AE Z  key_0_32_99 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \fc AdZ  key_0_64_0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx q}(gG AdBDuZ  key_0_64_1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx hSH AdCZ  key_0_64_2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [l.iH AdDZ  key_0_64_3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jI Ad:Z  key_0_64_4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kI AdZ  key_0_64_5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %lbJ AdKϼZ  key_0_64_6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx VmJ Ad=&Z  key_0_64_7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx J n>K Ad*+Z  key_0_64_8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx oK AdvLZ  key_0_64_9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zZ  key_0_64_27@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $U AeʖwZ  key_0_64_28@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z}U Ae:Z  key_0_64_29@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JU Ae Z  key_0_64_30@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w\V AeRFVZ  key_0_64_31@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ț_V AexZ  key_0_64_32@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx , Ň2W AeggZ  key_0_64_33@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ϱW AecZ  key_0_64_34@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ̍$ X Ae4Z  key_0_64_35@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "Z0Y Ae[BZ  key_0_64_36@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx l FjzY Ae$Z  key_0_64_37@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Y AeZ  key_0_64_38@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx r@BZ Aef"Z  key_0_64_39@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JZ Aep[Z  key_0_64_40@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +5%[ Ae7=.Z  key_0_64_41@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ej[ AezZ  key_0_64_42@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [ AezwZ  key_0_64_43@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iQ\ AesZ  key_0_64_44@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]<\ Ae~LZ  key_0_64_45@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6A] Ae> 9Z  key_0_64_46@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ϒ{] Ae_}Z  key_0_64_47@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zYZ5^ Ae-pZ  key_0_64_48@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /ܴ^ AeZ  key_0_64_49@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _ AeHjZ  key_0_64_50@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ݙc_ Aek QZ  key_0_64_51@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx A^_ AeKZ  key_0_64_52@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JF>*` Ae&O-`Z  key_0_64_53@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /` Ae/)Z  key_0_64_54@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx )` Ae6O3Z  key_0_64_55@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx MXa Aeb1Z  key_0_64_56@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx a AenZ  key_0_64_57@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ڠTb AeZ  key_0_64_58@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b Ae_ŋZ  key_0_64_59@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx c AeQ9JZ  key_0_64_60@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx c Ae_Z  key_0_64_61@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx a`fܤc Ae{Z  key_0_64_62@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zNd Ae~Z  key_0_64_63@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Qe Aeˮz(Z  key_0_64_64@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6fe Ae~Z  key_0_64_65@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5 e Aey[Z  key_0_64_66@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ׬Ef AeX=Z  key_0_64_67@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx f Aee]Z  key_0_64_68@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Q g AeZ  key_0_64_69@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx og Ae 85Z  key_0_64_70@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~g AenZ  key_0_64_71@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]4h Ae@)Z  key_0_64_72@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \Aگh Ae?OZ  key_0_64_73@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -h AeKWZ  key_0_64_74@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #i AeIF-Z  key_0_64_75@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ki AeAjfZ  key_0_64_76@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ѱNj Ae Z  key_0_64_77@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ȸj Ae9eZ  key_0_64_78@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Jė\k AekZ  key_0_64_79@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx k AeκZ  key_0_64_80@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bvl AeEn Z  key_0_64_81@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ozl AeiZ  key_0_64_82@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rXEm AeZ  key_0_64_83@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx inSm AeZ  key_0_64_84@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b`;n AeBZ  key_0_64_85@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8?qn AeLǬZ  key_0_64_86@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GϢn AesZ  key_0_64_87@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7o AeI~Z  key_0_64_88@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx co Aeq3/Z  key_0_64_89@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $p AedžZ  key_0_64_90@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ep AeV_Z  key_0_64_91@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fp AeQZ  key_0_64_92@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6%Pq AeTnZ  key_0_64_93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx `$q Ae](Z  key_0_64_94@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx r Ae=Z  key_0_64_95@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx THFyr AeZ  key_0_64_96@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3[r Ae/ Z  key_0_64_97@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx pAs AexZ  key_0_64_98@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx s Ae- Z  key_0_64_99@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ӑ , A]Z  key_0_128_0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Y ANAEZ  key_0_128_1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ` AS2Z  key_0_128_2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ݄ AΈZ  key_0_128_3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx D ANZ  key_0_128_4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx O( A<^jZ  key_0_128_5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ص A!-Z  key_0_128_6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx .L~ A"Z  key_0_128_7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SU A{Z  key_0_128_8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b A[ Z  key_0_128_9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx XCg̵ Az4Z  key_0_128_10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3 A\_Z  key_0_128_11xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]M AA,|Z  key_0_128_12xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *6_ A'Z  key_0_128_13xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u AZ  key_0_128_14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ݷ A.@qZ  key_0_128_15xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx !fH A33,Z  key_0_128_16xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx k) AϼKZ  key_0_128_17xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |8 AZ  key_0_128_18xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Q AI0Z  key_0_128_19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ( A7uZ  key_0_128_20xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /| Ar=Z  key_0_128_21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx , A/Z  key_0_128_22xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1wbH A*uZ  key_0_128_23xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $ AEjy Z  key_0_128_24xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx N AZ  key_0_128_25xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx C}$x ABZ  key_0_128_26xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2 AX$Z  key_0_128_27xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _k A"=8Z  key_0_128_28xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3 AZ  key_0_128_29xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &3 ArǕZ  key_0_128_30xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx S4C A;XZ  key_0_128_31xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx t AHXZ  key_0_128_32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *' AoZ  key_0_128_33xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # AoZ  key_0_128_34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;_ A$Z  key_0_128_35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx e!, AW'Z  key_0_128_36xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aV: ASZ  key_0_128_37xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \a AgOZ  key_0_128_38xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &ST As~Z  key_0_128_39xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Uu AX?Z  key_0_128_40xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx W ARgZ  key_0_128_41xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HH A!Z  key_0_128_42xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }, AEb/Z  key_0_128_43xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Bp! A*PZ  key_0_128_44xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ً AM4Z  key_0_128_45xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  A>iZ  key_0_128_46xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yVN A7Z  key_0_128_47xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx al7 AMZ  key_0_128_48xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx o7Qe AuAZ  key_0_128_49xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  AHZ  key_0_128_50xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx m; AZ  key_0_128_51xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 43 AZ  key_0_128_52xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx j| AoJZ  key_0_128_53xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx H Ao5Z  key_0_128_54xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *Lx ACZ  key_0_128_55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ԕ b A֌}Z  key_0_128_56xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ns"K ArpZ  key_0_128_57xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx < ATZ  key_0_128_58xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  A$Z  key_0_128_59xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '20 A Z  key_0_128_60xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  Av6@Z  key_0_128_61xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  AkECZ  key_0_128_62xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx MB i AϹZ  key_0_128_63xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wF  AKZ  key_0_128_64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx m` : A)<Z  key_0_128_65xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   AZZ  key_0_128_66xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx U  AtZ  key_0_128_67xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ) Aǂ -Z  key_0_128_68xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Cp4 Ac~Z  key_0_128_69xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7 AxnZ  key_0_128_70xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx a A37Z  key_0_128_71xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Qj A.j&Z  key_0_128_72xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rE^ A Z  key_0_128_73xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z~+ Ag<Z  key_0_128_74xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CH" AAYZ  key_0_128_75xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aܘ} A\Z  key_0_128_76xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx t AaZ  key_0_128_77xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx !eU A0}HZ  key_0_128_78xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx e|q A&Z  key_0_128_79xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ## AtZ  key_0_128_80xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ԡo A"Z  key_0_128_81xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & A?I<Z  key_0_128_82xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [id AkٚZ  key_0_128_83xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -NB AZ  key_0_128_84xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 53 APCZ  key_0_128_85xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   AMҭZ  key_0_128_86xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx O$!6 AtB Z  key_0_128_87xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z" AP^RZ  key_0_128_88xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx X5#r A7Z  key_0_128_89xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :$ AêZ  key_0_128_90xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %` AgVcZ  key_0_128_91xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx L*& Az%>YZ  key_0_128_92xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 40'9 AٮZ  key_0_128_93xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ?( AhZ  key_0_128_94xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +) AI&Z  key_0_128_95xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aCV*m A:Z  key_0_128_96xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _+ A5nZ  key_0_128_97xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,9 A)7Z  key_0_128_98xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E4- ArZ  key_0_128_99xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx c. ADCPZ  key_0_32_0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx š/~ AD=Z  key_0_32_1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 80 AD᡹8Z  key_0_32_2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ji1e AD0*MFZ  key_0_32_3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <2 ADn;Z  key_0_32_4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 73> AD'dEZ  key_0_32_5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NO4 ADTZ  key_0_32_6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Yl5 ADssZ  key_0_32_7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zs6 ADs<Z  key_0_32_8 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E'7 AD 4BZ  key_0_32_9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Xe8r AEZ  key_0_32_10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7(9 AEOZ  key_0_32_11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v]:M AEbJZ  key_0_32_12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |d; AEX4Z  key_0_32_13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx y<* AEu0IZ  key_0_32_14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E= AE7Z  key_0_32_15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (> AE׊ٴZ  key_0_32_16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ݾ ?u AE-Z  key_0_32_17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qo5@ AE[NZ  key_0_32_18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SA AEj0Z  key_0_32_19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ɊIBs AE~EZ  key_0_32_20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fC AEtZ  key_0_32_21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx T7DI AEi(Z  key_0_32_22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx gE AEXVZ  key_0_32_23 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx BFq AE'{+Z  key_0_32_24 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx q"G AEUZ  key_0_32_25 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HO AE0Z  key_0_32_26 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx I AEcfZ  key_0_32_27 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4J, AE>,Z  key_0_32_28 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ԿK AE0!RZ  key_0_32_29 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ՠB"L AEZ  key_0_32_30 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ug:ZM AEWcwZ  key_0_32_31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NA AE$j Z  key_0_32_32 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx V?wO AEtwZ  key_0_32_33 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /PP AE3 Z  key_0_32_34 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ÞQ AE:ItZ  key_0_32_35 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eWR AETZ  key_0_32_36 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx S] AE@-Z  key_0_32_37 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w(T AE- Z  key_0_32_38 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "8U/ AE̦sZ  key_0_32_39 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Bc.V AEo Z  key_0_32_40 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JIW+ AE&oZ  key_0_32_41 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qX AE;Z  key_0_32_42 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ӬdLY AEϒZ  key_0_32_43 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx W+Zh AESZ  key_0_32_44 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _Q[ AE Z  key_0_32_45 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w^\A AExDZ  key_0_32_46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ) ] AElZ  key_0_32_47 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rT^ AEBZ  key_0_32_48 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Zj_ AE%DZ  key_0_32_49 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx L` AEL0Z  key_0_32_50 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -abAENZ  key_0_32_51 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bAEZ  key_0_32_52 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ec6AE? Z  key_0_32_53 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E-OdAE*Z  key_0_32_54 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "݆eAE(NްZ  key_0_32_55 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fAE[3Z  key_0_32_56 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }hg(AEY7MZ  key_0_32_57 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx t"vhAEYZ  key_0_32_58 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EiAEpZ  key_0_32_59 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx e!jAE)&_RZ  key_0_32_60 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "kAE,Z  key_0_32_61 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx YJmlaAE1Z  key_0_32_62 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx spmAEZBZ  key_0_32_63 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx !n7AEaZ  key_0_32_64 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qoAEMZ  key_0_32_65 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nќp AE>hQZ  key_0_32_66 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx )kqvAE|/Z  key_0_32_67 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ErAEϫZ  key_0_32_68 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx F*sF AEch;Z  key_0_32_69 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1qt AE sZ  key_0_32_70 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u AE;m Z  key_0_32_71 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "\v AEpZ  key_0_32_72 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "9w AEy,Z  key_0_32_73 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx g4xn AE駍Z  key_0_32_74 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1]|y AEnbSZ  key_0_32_75 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ڑ BzV AENpZ  key_0_32_76 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx g{ AEuZ  key_0_32_77 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx s\|% AEu Z  key_0_32_78 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'C} AE@Z  key_0_32_79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &0~ AE Z  key_0_32_80 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'TXAEZ  key_0_32_81 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx IK7AE`Z  key_0_32_82 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx B&AEy Z  key_0_32_83 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &!c΂AE.cZ  key_0_32_84 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jكAEnGZ  key_0_32_85 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx B^`AEǞZ  key_0_32_86 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx r,<AEP3Z  key_0_32_87 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -AEPdZ  key_0_32_88 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^09AE@tZ  key_0_32_89 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JAE)ּZ  key_0_32_90 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v|MAE"Z  key_0_32_91 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [AE?AZ  key_0_32_92 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >0^AEZ?Z  key_0_32_93 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ZAEZBZ  key_0_32_94 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx R,AEM<Z  key_0_32_95 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AE>MZ  key_0_32_96 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \CAEZ  key_0_32_97 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <)LbAEFEZ  key_0_32_98 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aAEcM;Z  key_0_32_99 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ppAdNZ  key_0_64_0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u|D!AdiZ  key_0_64_1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^c!AdZ  key_0_64_2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx K*,"AdLIXZ  key_0_64_3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |pٖ"AdE଑Z  key_0_64_4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8k#Ad0 Z  key_0_64_5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ðr#Ad7Z  key_0_64_6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx g#Ad:Z  key_0_64_7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cݚP$Adh7Z  key_0_64_8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $Ad5Z  key_0_64_9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %R2%Aesu`Z  key_0_64_10@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Rf%AexZ  key_0_64_11@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {QAo&AeTQZ  key_0_64_12@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ȃ|&Ae5t2Z  key_0_64_13@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx r&Ae<6Z  key_0_64_14@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zg'Ae PZ  key_0_64_15@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "a'Aeq 3Z  key_0_64_16@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3w㵣B(AeqZ  key_0_64_17@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (K(Ae.Z  key_0_64_18@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx p$)AeL>Z  key_0_64_19@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mR䓦)AeB;&Z  key_0_64_20@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ))Ae@{Z  key_0_64_21@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx l*AeZ  key_0_64_22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,X֩*AeAelKZ  key_0_64_66@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0a>Ae Z  key_0_64_67@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qjM?AeZ  key_0_64_68@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx e?Ae)!FZ  key_0_64_69@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx W!@Ae?gZ  key_0_64_70@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx s@AeADYZ  key_0_64_71@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ؋@AeCVZ  key_0_64_72@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx efAAe xZ  key_0_64_73@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >AAe:|Z  key_0_64_74@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx F=YBAeZ  key_0_64_75@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %`BAeH]4Z  key_0_64_76@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w2CAe=;Z  key_0_64_77@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx l=CAeɸZ  key_0_64_78@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx DAeu9Z  key_0_64_79@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >umDAe Z  key_0_64_80@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $DAeŸrZ  key_0_64_81@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ak 1rGAe=O~,Z  key_0_64_88@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ue]HAeZ  key_0_64_89@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx q|HAeU*ȗZ  key_0_64_90@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &&Q>HAe Z  key_0_64_91@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx לIAeZ  key_0_64_92@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b{JJAe-<Z  key_0_64_93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx lJAeτZ  key_0_64_94@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 57$KAeToZ  key_0_64_95@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx y/KAeSZ  key_0_64_96@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qKAe\^Z  key_0_64_97@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :BYLAeawOSZ  key_0_64_98@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NeYLAe)Z  key_0_64_99@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx B-WA՝YZ  key_0_128_0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HYAqaBZ  key_0_128_1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CAZAlZ  key_0_128_2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ldZAZ  key_0_128_3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jt[AIZ  key_0_128_4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [A~nZ  key_0_128_5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx q-[A Z  key_0_128_6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ul\A&Z  key_0_128_7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qB\AZ  key_0_128_8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx K]Ad)Z  key_0_128_9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx h]AMюZZ  key_0_128_10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u;e(^A-Z  key_0_128_11xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx z 3^A^CZ  key_0_128_12xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {~_APӴZ  key_0_128_13xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ot_A?Z  key_0_128_14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |`A2mZ  key_0_128_15xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eaaAA؃Z  key_0_128_16xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =uaA"H%Z  key_0_128_17xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ?`aAXT|Z  key_0_128_18xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <f [bAeZ  key_0_128_19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u' bAZ  key_0_128_20xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kXq :cA&SZ  key_0_128_21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | cA;۽Z  key_0_128_22xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1: dAtKZ  key_0_128_23xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx dAdZ  key_0_128_24xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx gceATZ  key_0_128_25xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eAI@,Z  key_0_128_26xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4NfAkЊZ  key_0_128_27xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^fAOZ  key_0_128_28xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx o+gA3\uZ  key_0_128_29xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kpgAǵaZ  key_0_128_30xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx vlO@hAcI6Z  key_0_128_31xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx whA~:Z  key_0_128_32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx hA<~Z  key_0_128_33xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5-YiAZ  key_0_128_34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx WiAVjZ  key_0_128_35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx D"XjA %7IZ  key_0_128_36xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx U3S%kA٧Z  key_0_128_37xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cMkAZ  key_0_128_38xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx dͶlAv+Z  key_0_128_39xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx D֘slA˯Z  key_0_128_40xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ԶilAI [ Z  key_0_128_41xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ƭ< MmATSZ  key_0_128_42xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx !mAAZ  key_0_128_43xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '"*nAP>Z  key_0_128_44xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx e#nA;?Z  key_0_128_45xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iT$ oA&LvZ  key_0_128_46xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Wh%{oA Z  key_0_128_47xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v-&oAZ  key_0_128_48xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wg'RpA\h/Z  key_0_128_49xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx !]i(pAnZ  key_0_128_50xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ӝ)/qA ,lZ  key_0_128_51xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^*qAqZ  key_0_128_52xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v?_+rA$Z  key_0_128_53xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx K+{,|rAq'[Z  key_0_128_54xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %-rA~Z  key_0_128_55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qEm..`sAcZ  key_0_128_56xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx h/tAzZ  key_0_128_57xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~0tA&fZ  key_0_128_58xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rJ1uAJZ  key_0_128_59xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u2suAg$eZ  key_0_128_60xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 83uADZ  key_0_128_61xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cEk4QvA7-Z  key_0_128_62xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5vAzyZ  key_0_128_63xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >66,wAZ  key_0_128_64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx p 7wA[/RZ  key_0_128_65xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FK8xA(rZ  key_0_128_66xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx T9xAZ  key_0_128_67xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |d\:xArCZ  key_0_128_68xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  ;pyA nZ  key_0_128_69xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx q@<yA" SZ  key_0_128_70xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PQt@=XzAæZ  key_0_128_71xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v>zAHZ  key_0_128_72xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx L?:{A?yZ  key_0_128_73xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *k@{APȑZ  key_0_128_74xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx T[A|AX7Z  key_0_128_75xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx IB||AZ  key_0_128_76xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ȺC6}AMfZ  key_0_128_77xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx J D}A7B&Z  key_0_128_78xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'nE~AZ  key_0_128_79xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CF~A3jpZ  key_0_128_80xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <G~AZ  key_0_128_81xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aHQARZ  key_0_128_82xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NIA.-Z  key_0_128_83xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1J%AAuZ  key_0_128_84xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx MoFZKA{-Z  key_0_128_85xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6|LA&Z  key_0_128_86xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx MgA\eZ  key_0_128_87xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yNҁA&"<Z  key_0_128_88xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx al9O=A:Z  key_0_128_89xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iEPAvZ  key_0_128_90xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2DQA$Z  key_0_128_91xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eBU.RwAW7Z  key_0_128_92xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #SAkZZ  key_0_128_93xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx oTKAǜZ  key_0_128_94xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nmUA; HZ  key_0_128_95xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =fV:AHQZ  key_0_128_96xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iWAZ  key_0_128_97xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx .WXWAcYZ  key_0_128_98xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx P;YІAlMZ  key_0_128_99xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 9ZAM3Z key_0_32_0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }[AM Z key_0_32_1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx on\qAMWZ key_0_32_2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]AM9+Z key_0_32_3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i^ZAM"ptZ key_0_32_4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3?Z key_0_32_29 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #|xgANL\HZ key_0_32_30 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx YyۣANݡZ key_0_32_31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E zLANiZ key_0_32_32 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2މ{GAN]Z key_0_32_33 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b|¥AN Z key_0_32_34 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx },AN{ⳘZ key_0_32_35 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx P~AN9+Z key_0_32_36 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JtANZ key_0_32_37 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yoAN 4Z key_0_32_38 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx a^ۧAN&o_Z key_0_32_39 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CaGANlZ key_0_32_40 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cAN+\Z key_0_32_41 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z5>"AN!]MZ key_0_32_42 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx †ANB Z key_0_32_43 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx lANC.Z key_0_32_44 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx H+fAN7hZ key_0_32_45 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qMѪANubZ key_0_32_46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ԩr;ANIZ key_0_32_47 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx O0wANLoZ key_0_32_48 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AȋANݬ4{Z key_0_32_49 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :AN?$V Z key_0_32_50 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +AN Z key_0_32_51 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fAN -Z key_0_32_52 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ֭AN}.WZ key_0_32_53 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx T삐DANgNZ key_0_32_54 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx lbANLZ key_0_32_55 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =ޒANJFoZ key_0_32_56 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mANmZ key_0_32_57 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ANs>Z key_0_32_58 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4N_jANeZ key_0_32_59 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6ذAN~HZ key_0_32_60 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx C~<ANc>Z key_0_32_61 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5OJ<ANiZ key_0_32_62 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ƙgANZ key_0_32_86 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #ANZ key_0_32_87 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx f~>ANzaZ key_0_32_88 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx gRAN;!Z key_0_32_89 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx soANxCZ key_0_32_90 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx C_xANHSZ key_0_32_91 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx W RAN YZ key_0_32_92 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nANrB7Z key_0_32_93 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx X&0AN;Z key_0_32_94 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >_EANTZ key_0_32_95 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   ANZ key_0_32_96 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8QAwAN=1uZ key_0_32_97 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8AN+Z key_0_32_98 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cZ key_0_64_1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx L7FAmJSZ key_0_64_2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i_AmfeZ key_0_64_3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {80AmS Z key_0_64_4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx oAmsZ key_0_64_5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w\Am _Z key_0_64_6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx gsAm'ˍ)Z key_0_64_7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -#AmaZ key_0_64_8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (IAmM#Z key_0_64_9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ¬cdAnsFDIZ key_0_64_10@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1n\An_p;?Z key_0_64_11@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An+*Z key_0_64_12@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aDLAnZ key_0_64_13@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An2TZ key_0_64_14@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^>8An+Z key_0_64_15@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AnjyZ key_0_64_16@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *AnFZ key_0_64_17@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AnlZ key_0_64_18@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx plgAn,ZZ key_0_64_19@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An;Z key_0_64_20@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~jAn2Z key_0_64_21@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;uAnch"Z key_0_64_22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AnO^]eZ key_0_64_23@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TW<WAnz#Z key_0_64_24@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx BAnVUZ key_0_64_25@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx T5An"2Z key_0_64_26@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [ MAnMZ key_0_64_27@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bEAnH.BZ key_0_64_28@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +x!Andn4Z key_0_64_29@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bAn:TZ key_0_64_30@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ڷ*cAn/ +Z key_0_64_31@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An[V~Z key_0_64_32@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w:Anw`Z key_0_64_33@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =AnBDNZ key_0_64_34@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx StAnn;8Z key_0_64_35@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [@AnZ key_0_64_36@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %nAn6Z key_0_64_37@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx t=FjAnp/Z key_0_64_38@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ׄYEAn\&YZ key_0_64_39@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;GAnZZ key_0_64_40@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2AnvZ key_0_64_41@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An{Z key_0_64_42@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An. Z key_0_64_43@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ykoAnXKZ key_0_64_44@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SjAn7no=Z key_0_64_45@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx H_TAnC4Z key_0_64_46@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cAnoZ key_0_64_47@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx V4An)*Z key_0_64_48@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TAn\Z key_0_64_49@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx noAnbȈZ key_0_64_50@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "=_AnNZ key_0_64_51@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;An:vZ key_0_64_52@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GaAn `Z key_0_64_53@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iAn#f&Z key_0_64_54@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7D>AnPPZ key_0_64_55@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PAn{ fZ key_0_64_56@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SAnW<Z key_0_64_57@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HAnEGZ key_0_64_58@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx & An=:1Z key_0_64_59@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ?mAn*LZ key_0_64_60@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4[Ano:Z key_0_64_61@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JAnrZ key_0_64_62@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx n4An^БZ key_0_64_63@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]tšAnk$Z key_0_64_64@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~AnGZ key_0_64_65@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  SeAn3H|Z key_0_64_66@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nAn~ Z key_0_64_67@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iAAnYZ key_0_64_68@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx I(/AnuZ key_0_64_69@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zxAAn!Z key_0_64_70@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An>WZ key_0_64_71@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bAnJfZ key_0_64_72@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx dAnfZ key_0_64_73@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $^AnSZ key_0_64_74@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @qE FAn,Z key_0_64_75@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  An vvZ key_0_64_76@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx dM &An'@ gZ key_0_64_77@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Sn AnaUZ key_0_64_78@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx WR AnM*Z key_0_64_79@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EwAnFZ key_0_64_80@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx RAn$0Z key_0_64_81@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x[An~GZ key_0_64_82@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4@AnH8Z key_0_64_83@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +ET9AnټZ key_0_64_84@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SOAnZ key_0_64_85@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AnWvZ key_0_64_86@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #fAn(Z key_0_64_87@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~_An8tZ key_0_64_88@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;57*nAn Z key_0_64_89@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ڏAn,1+Z key_0_64_90@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <PAnN]Z key_0_64_91@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An@Z key_0_64_92@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v|AnvZ key_0_64_93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _An!Z key_0_64_94@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1r^Anʹ^Z key_0_64_95@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fNAnZ key_0_64_96@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OA>AnؠmZ key_0_64_97@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }4 AnZ key_0_64_98@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx y!An0Z key_0_64_99@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ũ"?AzZ key_0_128_0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Jr#AmO.SZ key_0_128_1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx B/$~A0Z key_0_128_2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx A%AaZ key_0_128_3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &kA5 Z key_0_128_4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'A"\`Z key_0_128_5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx j(WAIB4Z key_0_128_6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx S F)AZ key_0_128_7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z *<ADZ key_0_128_8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~+A5Z key_0_128_9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,{ AMsZ key_0_128_10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -- AZP"HZ key_0_128_11xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qL.p A<Z key_0_128_12xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx F'/ A mZ key_0_128_13xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Y0\ A Z key_0_128_14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx KZ1h AP{Z key_0_128_15xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8k2 AVN/Z key_0_128_16xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx y/3r AZ key_0_128_17xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b4 A[Z key_0_128_18xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6S5eA.Z key_0_128_19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx e6AsZ key_0_128_20xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zX7RA0"Z key_0_128_21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &}F8APzA;Z key_0_128_28xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx M@?AgZ key_0_128_29xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx !@ZAW( Z key_0_128_30xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tuAAyZ key_0_128_31xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2IA\Z key_0_128_39xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JA ds\Z key_0_128_40xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx )K|A"Z key_0_128_41xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ?XuLA8<Z key_0_128_42xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^M\AímZ key_0_128_43xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ֖jNADoZ key_0_128_44xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &O?AS>PZ key_0_128_45xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @PANZ key_0_128_46xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >>Q Ab;Z key_0_128_47xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >]YRA:Z key_0_128_48xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx IՃSAoZ key_0_128_49xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [3?TnA(Z key_0_128_50xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CUA yWZ key_0_128_51xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx LVKAgZ key_0_128_52xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ߻)WA_6Z key_0_128_53xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iwXpAUYZZ key_0_128_54xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ˆYAB dZ key_0_128_55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z[A0Z key_0_128_56xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3J[ADZ key_0_128_57xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx c4\7 AZ key_0_128_58xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,] A1Z key_0_128_59xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx KL^!A(Z key_0_128_60xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 9O<_!AcyZ key_0_128_61xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx `!AgJZ key_0_128_62xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $Yag"A?6Z key_0_128_63xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -Hb"A9ZZ key_0_128_64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx lcD#A -Z key_0_128_65xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6d#AHeyZ key_0_128_66xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx e$$A_DZ key_0_128_67xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mrBf$AFhͷZ key_0_128_68xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ksȓg%AQxZ key_0_128_69xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ofʶhq%AsZ key_0_128_70xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx D'i%Aޑ"Z key_0_128_71xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xjN&AX<Z key_0_128_72xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ṑk&AmAZ key_0_128_73xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx lp'A&Z key_0_128_74xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx m'A^PZ key_0_128_75xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nwnW(AYNZ key_0_128_76xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Uo(ANrZ key_0_128_77xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :Sp;)AWsZ key_0_128_78xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]q)A@ǼZ key_0_128_79xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx dNpr*A}Z key_0_128_80xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx zs*AϲZ key_0_128_81xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx t*A-Z key_0_128_82xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Iuf+A:X)Z key_0_128_83xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Vɘv+A^NZ key_0_128_84xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "=wC,A˽Z key_0_128_85xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ۀÃx,AbZ key_0_128_86xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2}y'-AuZ key_0_128_87xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx QRz-Al{Z key_0_128_88xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *y{.A{*Z key_0_128_89xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx K||u.AcŹZ key_0_128_90xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6}.AvZ key_0_128_91xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx h~O/AAMZ key_0_32_3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tG;>AMnZ key_0_32_4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx )S!JAMZ key_0_32_5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xKAM3Z key_0_32_6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx G iKAM,Z key_0_32_7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,0 LAM~qZ key_0_32_8 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ?ۏzLAMU*GZ key_0_32_9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ->LANZ key_0_32_10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 9 Ց_MANUZ key_0_32_11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx l$MANGTZ key_0_32_12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6INAN7Z key_0_32_13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ыCNAN2Z key_0_32_14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx r,OANTZ key_0_32_15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {oӖOANZ key_0_32_16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx JPANpuZ key_0_32_17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx sޮPANNfZ key_0_32_18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ʝE`ANIe=Z key_0_32_19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $ aANե$Z key_0_32_20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rW{aANDZ key_0_32_21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #\mbANZ key_0_32_22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ƝbANZ key_0_32_23 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &16McANsIfZ key_0_32_24 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =+BdANZ key_0_32_25 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w dANGZ key_0_32_26 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7ޡ$eAN1HZ key_0_32_27 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ТeAN"Z key_0_32_28 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ?/fAN 3Z key_0_32_29 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^GfANꁬDZ key_0_32_30 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx umfAN{Z key_0_32_31 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jgAN9eZ key_0_32_32 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx BqgANZ key_0_32_33 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PhANLZ key_0_32_34 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |ehANCZ key_0_32_35 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ̊Oت6iANB'Z key_0_32_36 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Y"iANZ key_0_32_37 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx YGjANZ key_0_32_38 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jAN7-SZ key_0_32_39 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tkAN `Z key_0_32_40 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ivkAN7 Z key_0_32_41 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *,kANu*AZ key_0_32_42 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;A[lANZ key_0_32_43 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {lANHC"Z key_0_32_44 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ADmANcZ key_0_32_45 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'גcmANiZ key_0_32_46 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ou]k$nANBBBZ key_0_32_47 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rvnANꌟZ key_0_32_48 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E8 oAN{wZ key_0_32_49 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z|oAN/Z key_0_32_50 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1koANZ key_0_32_51 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^pANJ!Z key_0_32_52 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ̺@pAN%Z key_0_32_53 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (X]AqAN?lBZ key_0_32_54 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ?߽qANGIZ key_0_32_55 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <+#rANMHcZ key_0_32_56 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx arrAN}fZ key_0_32_57 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx l+0  sANը΅Z key_0_32_58 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx h[~sANDZ key_0_32_59 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2A/sANCUZ key_0_32_60 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx C_tANIh2Z key_0_32_61 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]WuAN bZ key_0_32_62 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx oJuANITZ key_0_32_63 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :/rvAN~Z key_0_32_64 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ńvAN+pZ key_0_32_65 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CA)^wAN!Z key_0_32_66 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [wAN< QZ key_0_32_67 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx BxAN=%Z key_0_32_68 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xANfZ key_0_32_69 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _9$yANgZ key_0_32_70 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :уyANvL_RZ key_0_32_71 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx d8zAN4F^Z key_0_32_72 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Y!~zANmsZ key_0_32_73 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx dvzANA$Z key_0_32_74 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <@In{ANZ key_0_32_75 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx D6{ANZ key_0_32_76 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx P|AN.1Z key_0_32_77 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i|ANlEZ key_0_32_78 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx gc3}AN:7Z key_0_32_79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GV}AN@WZ key_0_32_80 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx r~AN|zZ key_0_32_81 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5Ң~ANvZ key_0_32_82 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 18c~AN][Z key_0_32_83 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PIsANVZ key_0_32_84 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4yANw? 8Z key_0_32_85 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "mMVAN55 Z key_0_32_86 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PʀANWZ key_0_32_87 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx F;AN ЊmZ key_0_32_88 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ϊM3ANZ key_0_32_89 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -AANsZ key_0_32_90 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx I}ANXZ key_0_32_91 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OANRZ key_0_32_92 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rAN=y;Z key_0_32_93 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx iZFAN0Z key_0_32_94 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx t TANH\XZ key_0_32_95 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx J=DńAN ]Z key_0_32_96 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx J9AN:yZ key_0_32_97 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qYAN3 Z key_0_32_98 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "xAN߀Z key_0_32_99 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fAm| eZ key_0_64_0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx sC1RAmPtZ key_0_64_1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx L[ړAm$Z key_0_64_2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx W}ZPAmZ key_0_64_3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HzƔAm=OZ key_0_64_4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0n>AmydZ key_0_64_5@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ame#UZ key_0_64_6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ~l*AmI#Z key_0_64_7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ĉ{AmZ key_0_64_8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ųAm#Z key_0_64_9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EyAn}Z key_0_64_10@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ڣAnKZ key_0_64_11@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx RzAnhZ key_0_64_12@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ѡAn'qZ key_0_64_13@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _iAnXZ key_0_64_14@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =An.Z key_0_64_15@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5;[AnZ key_0_64_16@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ךAn݉aZ key_0_64_17@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx YjuQAnW=9Z key_0_64_18@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx țAnaBOZ key_0_64_19@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bDEAn?h2Z key_0_64_20@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ܹAn DZ key_0_64_21@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx u+AnSZ key_0_64_22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx _F9AneZ key_0_64_23@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [AnxZ key_0_64_24@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7@AnͧZ key_0_64_25@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'AnZ key_0_64_26@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx P cAntZ key_0_64_27@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bAnZ key_0_64_28@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx d ۠An#Z key_0_64_29@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx QLAn_Z key_0_64_30@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ǘ An7)Z key_0_64_31@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx uM (AnmZ key_0_64_32@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx J An[aZ key_0_64_33@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2σA AnٯZ key_0_64_34@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ˟ tAnZ key_0_64_35@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AnoZ key_0_64_36@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx WOAnqZ key_0_64_37@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx QV¤An+-Z key_0_64_38@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx s0AnRZ key_0_64_39@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Z͒AnʹZZ key_0_64_40@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  An,Z key_0_64_41@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx N1xAnJZ key_0_64_42@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =5An5Z key_0_64_43@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx RAncZ key_0_64_44@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {AnUZ key_0_64_45@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx K-AnZjZ key_0_64_46@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx An9%Z key_0_64_47@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nAnyZ key_0_64_48@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^BuAnZ key_0_64_49@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx w]3An<7Z key_0_64_50@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >ITAnCAZ key_0_64_51@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GǪAnZ key_0_64_52@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @AnZ key_0_64_53@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1 An],Z key_0_64_54@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ba!"AnkSZ key_0_64_55@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ƀ`"An1Z key_0_64_56@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7#AnqZ key_0_64_57@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ]$AnZ key_0_64_58@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx { %AnZ key_0_64_59@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (!&}AnZ key_0_64_60@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx n'AnZ key_0_64_61@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4HC(gAnZmZ key_0_64_62@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 9c)ڰAn%Z key_0_64_63@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @*JAn]Z key_0_64_64@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '+An)+Z key_0_64_65@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Δ,&AnsJZ key_0_64_66@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %AnBWZ key_0_64_84@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx i~?Annb!Z key_0_64_85@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx oW@@oAnZ key_0_64_86@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4AAn6ݜZ key_0_64_87@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx IBfAnp6Z key_0_64_88@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :~CռAn\5@Z key_0_64_89@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ȟDHAn;Z key_0_64_90@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ȅEAn!Z key_0_64_91@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx U%F0Anc{{ Z key_0_64_92@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EmZGAnOM|Z key_0_64_93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cjOHAnz:Z key_0_64_94@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,1IAnVLZ key_0_64_95@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1PJ An"kZ key_0_64_96@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rKAnZ key_0_64_97@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx QULAnH=H[Z key_0_64_98@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx M_And 7-Z key_0_64_99@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PNA`Z key_0_128_0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OPA%1Z key_0_128_1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $ePA./EZ key_0_128_2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx B-FQNA9y~Z key_0_128_3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ŷ7tRAZ key_0_128_4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SBAC"Z key_0_128_5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TAa#]vZ key_0_128_6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |U6Av Z key_0_128_7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx . #VAo.Z key_0_128_8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +W(AxwZ key_0_128_9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx `X*AdJNZ key_0_128_10xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx `&LYAsSZ key_0_128_11xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx .Z0AZ key_0_128_12xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tK[APZ key_0_128_13xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ʙ\$A+<Z key_0_128_14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  ]A<m`Z key_0_128_15xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx P^!As4Z key_0_128_16xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx B_AL"Z key_0_128_17xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx đ`AԫZ key_0_128_18xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aAA5Z key_0_128_19xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NF/bA*NZ key_0_128_20xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^oOcuAZ key_0_128_21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Gs dAyvNZ key_0_128_22xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx G e[AnPZ key_0_128_23xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx jV9fA<Z key_0_128_24xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rAJg<Apm)Z key_0_128_25xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx shA6s}Z key_0_128_26xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx MiA!,"Z key_0_128_27xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx fdjA8Z key_0_128_28xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx J#kA/!|Z key_0_128_29xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx BlAZ key_0_128_30xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mBAMDZ key_0_128_31xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6_nAhZZ key_0_128_32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx s*uo A EZ key_0_128_33xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx pAg"Z key_0_128_34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 9l qA6Z key_0_128_35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2;roA'K(Z key_0_128_36xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3ӳ7sA0yvZ key_0_128_37xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -rtLA)FwZ key_0_128_38xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx .keuA>ӡZ key_0_128_39xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +v,A"NGZ key_0_128_40xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ٓwA5~Z key_0_128_41xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4'xAZ key_0_128_42xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^EWyA"PZ key_0_128_43xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }0kzTAm$Au!Z key_0_128_48xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AZ key_0_128_49xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4|A3Z key_0_128_50xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx N:A$DLZ key_0_128_51xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx b"cAEZZ key_0_128_52xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx V҃A Z key_0_128_53xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cnIA|gZ key_0_128_54xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8yAkC6Z key_0_128_55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx t+A(+Z key_0_128_56xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx gヌAyZ key_0_128_57xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <ވ AZ key_0_128_58xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xyA*Z key_0_128_59xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ؓɊAyZ key_0_128_60xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;aZADZ key_0_128_61xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *A.%ZQZ key_0_128_62xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =A9 Z key_0_128_63xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \KGAgZ key_0_128_64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *#A#66Z key_0_128_65xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \QDAa(bZ key_0_128_66xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6Q AvyZ key_0_128_67xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx қmAoZ key_0_128_68xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ғLQAxrcZ key_0_128_69xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FєANZ key_0_128_70xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yB<AZ key_0_128_71xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xA?Z key_0_128_72xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {CA(BPZZ key_0_128_73xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx G|ژAD<=Z key_0_128_74xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @˜ AmZ key_0_128_75xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ԆrApsZ key_0_128_76xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cGAg"iZ key_0_128_77xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @l_A~hZ key_0_128_78xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OAiZ key_0_128_79xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx phAfZ key_0_128_80xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  BA̋Z key_0_128_81xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ȬWNABZ key_0_128_82xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %ƟA׽2Z key_0_128_83xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OUPڢ;AUZ key_0_128_84xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ېADZ key_0_128_85xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'AKZ key_0_128_86xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx OF9A\Z key_0_128_87xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx vfdAEFZ key_0_128_88xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ARZ key_0_128_89xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx kVUAZ key_0_128_90xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +iIAymZ key_0_128_91xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NsH<A9Z key_0_128_92xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx BKgA%Z key_0_128_93xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx d{)A#Z key_0_128_94xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx LA^Z key_0_128_95xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx nAZ Z key_0_128_96xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx XDGAMZ key_0_128_97xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx S6MӰATrZ key_0_128_98xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx `)yACL Z key_0_128_99xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtarantool-1.5.1.218.g1a69fd6/test/connector_c/update.result0000664000000000000000000003262312231715257021770 0ustar rootroot *** test_simple_set *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 2 (0x00000002), 0 (0x00000000), '') # test simple set field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'new field value', '', 1130450022 (0x43614c66)) # set field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'field's new value', '', 1130450022 (0x43614c66)) # test set primary key update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (2 (0x00000002), 'field's new value', '', 1130450022 (0x43614c66)) *** test_simple_set: done *** *** test_long_set *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', '', 'third') # test set big value in empty field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'A long time ago, in a galaxy far, far away... It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the Death Star, an armored space station with enough power to destroy an entire planet. Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy....', 'third') # test replace long value to short update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'short string', 'third') *** test_long_set: done *** *** test_append *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first') # test append field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'second') # test multi append update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'second', 'third') # test append many fields update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'A long time ago, in a galaxy far, far away... It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the Death Star, an armored space station with enough power to destroy an entire planet. Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy....') # test append and change field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'A long time ago, in a galaxy far, far away... It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the Death Star, an armored space station with enough power to destroy an entire planet. Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy....', 765239998 (0x2d9ca2be)) # test set to not an exist field update fields: respond ok (op: 19, reqid: 0, code: 13826, count: 0) *** test_append: done *** *** test_arith_i32 *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 2 (0x00000002), 0 (0x00000000), 0 (0x00000000)) # test add update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 18 (0x00000012), 0 (0x00000000), 0 (0x00000000)) # test overflow add update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), -2147483631 (0x80000011), 0 (0x00000000), 0 (0x00000000)) # test underflow add update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x00000011), 0 (0x00000000), 0 (0x00000000)) # test or update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x00000011), -1160791345 (0xbacfbacf), -88278340 (0xfabcfabc)) # test xor update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x00000011), 1160791344 (0x45304530), 88278339 (0x05430543)) # test and update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x00000011), 1076903984 (0x40304030), 84083971 (0x05030503)) *** test_arith_i32: done *** *** test_arith_i64 *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 2 (0x0000000000000002), 0 (0x0000000000000000), 0 (0x0000000000000000)) # test add update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 18 (0x0000000000000012), 0 (0x0000000000000000), 0 (0x0000000000000000)) # test overflow add update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), -9223372036854775791 (0x8000000000000011), 0 (0x0000000000000000), 0 (0x0000000000000000)) # test underflow add update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x0000000000000011), 0 (0x0000000000000000), 0 (0x0000000000000000)) # test or update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x0000000000000011), -4985560861120677169 (0xbacfbacfbacfbacf), -379152579038479684 (0xfabcfabcfabcfabc)) # test xor update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x0000000000000011), 4985560861120677168 (0x4530453045304530), 379152579038479683 (0x0543054305430543)) # test and update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 17 (0x0000000000000011), 4625267393289011248 (0x4030403040304030), 361137905646896387 (0x0503050305030503)) # test casting 32-bit operand to 64-bit update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 33 (0x0000000000000021), 4625267393289011248 (0x4030403040304030), 361137905646896387 (0x0503050305030503)) *** test_arith_i64: done *** *** test_multi_arith *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 128 (0x00000080), 'third') # test simple and update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first field new value', 61455 (0x0000f00f), 'third field new value') *** test_multi_arith: done *** *** test_splice *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'hi, this is a test string!', 'third') # test cut from begin update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'this is a test string!', 'third') # test cut from middle update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'this is a string!', 'third') # test cut from end update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'this is a string', 'third') # test insert before begin update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'Bonjour, this is a string', 'third') # test insert after end update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'Bonjour, this is a string o_O!?', 'third') # test replace in begin update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'Hello, this is a string o_O!?', 'third') # test replace in middle update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'Hello, this is a field o_O!?', 'third') # test replace in end update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'Hello, this is a field! Is this Sparta!?', 'third') *** test_splice: done *** *** test_set_and_splice *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'hi, this is a test string!', 'third') # test set long string and splice to short update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'A long time ago, in a galaxy far, far away... away away away.', 'third') # test set short value and splice to long update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'A long time ago, in a galaxy far, far away... It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the Death Star, an armored space station with enough power to destroy an entire planet. Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy....', 'third') # test splice to long and set to short update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'short name', 'A long time ago, in a galaxy far, far away... It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the Death Star, an armored space station with enough power to destroy an entire planet. Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy....') *** test_set_and_splice: done *** *** test_delete_field *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'hi, this is a test string!', 'third', 1 (0x00000001), 2 (0x00000002), 3 (0x00000003), 4 (0x00000004), 5 (0x00000005), 6 (0x00000006), 7 (0x00000007), 8 (0x00000008), 9 (0x00000009), 10 (0x0000000a)) # test simple delete fields update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'first', 'third', 1 (0x00000001), 2 (0x00000002), 3 (0x00000003), 4 (0x00000004), 5 (0x00000005), 6 (0x00000006), 7 (0x00000007), 8 (0x00000008), 9 (0x00000009), 10 (0x0000000a)) # test useless operations with delete fields update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 'third', 1 (0x00000001), 2 (0x00000002), 3 (0x00000003), 4 (0x00000004), 5 (0x00000005), 6 (0x00000006), 7 (0x00000007), 8 (0x00000008), 9 (0x00000009), 10 (0x0000000a)) # test multi delete fields update fields: respond ok (op: 19, reqid: 0, code: 13826, count: 0) # test multi delete fields update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 9 (0x00000009), 2 (0x00000002), 3 (0x00000003), 4 (0x00000004), 5 (0x00000005), 6 (0x00000006), 7 (0x00000007), 8 (0x00000008), 9 (0x00000009), 10 (0x0000000a)) # test append and delete update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 9 (0x00000009), 2 (0x00000002), 'third', 'fourth', 'fifth', 'eighth', 'ninth') # test double delete update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (1 (0x00000001), 9 (0x00000009), 2 (0x00000002), 'fifth', 'eighth', 'ninth') select: respond ok (op: 17, reqid: 0, code: 0, count: 1) (1 (0x00000001), 9 (0x00000009), 2 (0x00000002), 'fifth', 'eighth', 'ninth') # test delete not an exist field update fields: respond ok (op: 19, reqid: 0, code: 13826, count: 0) select: respond ok (op: 17, reqid: 0, code: 0, count: 1) (1 (0x00000001), 9 (0x00000009), 2 (0x00000002), 'fifth', 'eighth', 'ninth') *** test_delete_field: done *** *** test_insert_field *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (9 (0x00000009), 'eleven') # insert new field before primary key update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (8 (0x00000008), 7 (0x00000007), 9 (0x00000009), 'eleven') # insert a new field before last field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 0) # double insert at the end update fields: respond ok (op: 19, reqid: 0, code: 0, count: 0) # multi insert update fields: respond ok (op: 19, reqid: 0, code: 0, count: 0) # insert before next to last field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 0) # insert before next to last field update fields: respond ok (op: 19, reqid: 0, code: 0, count: 0) # insert second tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (0 (0x00000000), 'one', 11 (0x0000000b)) # multi insert update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (0 (0x00000000), 9 (0x00000009), 8 (0x00000008), 7 (0x00000007), 6 (0x00000006), 11 (0x0000000b), 4 (0x00000004), 15 (0x0000000f), 2 (0x00000002), 3 (0x00000003), -10 (0xfffffff6), 11 (0x0000000b)) # insert before invalid field number update fields: respond ok (op: 19, reqid: 0, code: 0, count: 0) *** test_insert_field: done *** *** test_boundary_args *** # insert tuple insert: respond ok (op: 13, reqid: 0, code: 0, count: 1) (0 (0x00000000), 1 (0x00000001)) # test: try to do update w/o operations update fields: respond ok (op: 19, reqid: 0, code: 514, count: 0) # test: update w/ maximal allowed opearions count update fields: respond ok (op: 19, reqid: 0, code: 0, count: 1) (0 (0x00000000), 4001 (0x00000fa1)) # test: update w/ grater than maximal allowed opearions count update fields: respond ok (op: 19, reqid: 0, code: 514, count: 0) *** test_boundary_args: done *** tarantool-1.5.1.218.g1a69fd6/test/connector_c/tt0000775000000000000000000067700212213333050017614 0ustar rootrootELF>"@@C@8@&#@@@@@@@@@ aa 8 aa@@DDPtdZZAZATTQtd/lib64/ld-linux-x86-64.so.2GNU GNUNU#` !6ga( *"PPB @+" l )F|  BT}@@D@F@9E $E(*+.045689:;=>?@CDGHJKMOPQRSTVZ]^_acefhijmnopstwyz6i1m7V .ZD |#<h : ~c#Q goR/5T/81koꖲCoі"Ex`e{ =bEAE2} E| 6PBE0*9=9+ 2bld͹aD/˪]#K qX:CD(V *|Cq&#X [r.#f $t jrRY#&`ej N{^Lj Cl߄pbzbe*QOk|!7J)~Z땆 0SnaXN'w0N'bI*Q WL=d]+ C1: N h#J _@x ѻ@&4 e,AU~ q@ a@P2 @; AH @ AZ @a+ )@u 6@  ;@$`ap @= Ay AB ½@)5 0Aq q@t @_ Ay I@)E U@( $.AH A   @)0"@ 3@L A r@ @] @ hA6b QA/ Aev ACa t@s A :@  AW @&} @Gv /A /A/A "@V @ @ @ @sw!@ @h L@9/A A&a? ACj @_a {@# A A9 ad A A @ h@ A$$ A$ B@ DAE <A7 A0 @} A &@# @a '@ hA; @R ,@ A) A9@a @KN P@+8 b@ @k DA$ @ @q @ A6 sA L@ ]@t A7[ 4@d Z@ @J @Q Y@E @M @ko @$p r@p~ @ libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6socketfflushhtonsputsabortstrdupgetaddrinfomemsetwritevstrstr__errno_locationmemcmpgetsockoptvsnprintfmemcpysetsockoptmalloc__ctype_b_locstrncasecmpgettimeofdayfreeaddrinfofcntlstrcmp__libc_start_main__libc_csu_finitnt_io_closetnt_strerrortnt_pingtnt_updatetnt_request_setorigintnt_opt_freetnt_utf8_freetnt_replytnt_io_connecttnt_fieldtnt_update_arith_i32tnt_deletetnt_requesttnt_request_fromtnt_io_sendtnt_tuple_set_astnt_iter_storagetnt_inserttnt_tuple_settnt_list_free_edatatnt_mem_freetnt_opt_settnt_reply_inittnt_enc_readtnt_errortnt_io_flushtnt_iter_replytnt_querytnt_buftnt_lex_idonlytnt_update_inserttnt_calltnt_io_send_rawtnt_reply_fromtnt_flushtnt_mem_alloctnt_tuple_inittnt_errnotnt_closetnt_sql_keywords__data_starttnt_fdtnt_utf8_sizeoftnt_connecttnt_utf8_strlentnt_update_splicetnt_utf8_nexttnt_lex_nameoftnt_settnt_io_sendv_rawtnt_enc_write_IO_stdin_usedtnt_tupletnt_lex_inittnt_itertnt_nettnt_utf8_cmptnt_io_sendv__libc_csu_inittnt_reply_freetnt_update_deletetnt_list_inittnt_error_codestnt_iob_init_endtnt_request_inittnt_lex_freetnt_mem_realloctnt_query_is__bss_starttnt_lex_pushtnt_selecttnt_io_recvtnt_tuple_addtnt_iter_requesttnt_lextnt_nexttnt_stream_freetnt_opt_inittnt_update_arithtnt_update_arith_i64tnt_enc_sizetnt_utf8_inittnt_iter_listtnt_request_freetnt_iob_freetnt_rewindtnt_listtnt_stream_reqidtnt_stream_inittnt_inittnt_mem_inittnt_tuple_freetnt_mem_duptnt_iter_freetnt_list_attnt_io_recv_rawtnt_utf8_chrlentnt_update_assignGCC_3.0GCC_3.3.1GLIBC_2.3GLIBC_2.14GLIBC_2.2.50P&y a_& ii ui aaaaa a(a0a8a @a Ha Pa Xa `ahapaxaaaaaaaaaa[ȃaЃa؃aaCaa a!a"a#a$a% a&(a'HHb!HtkH5b!%b!@%b!h%b!h%zb!h%rb!h%jb!h%bb!h%Zb!h%Rb!hp%Jb!h`%Bb!h P%:b!h @%2b!h 0%*b!h %"b!h %b!h%b!h% b!h%b!h%a!h%a!h%a!h%a!h%a!h%a!hp%a!h`%a!hP%a!h@%a!h0%a!h %a!h%a!h%a!h%a!h %a!h!%za!h"%ra!h#%ja!h$%ba!h%1I^HHPTI/AH/AH@aUH-aHHw]øHt]aaUH-aHHHH?HHHu]úHt]a=)h!uUH~]h!@H=`]!tHtUaH]{vUHH0H}HuHUؿ&HEH}uxHEHhHHEHHEHUHPHEH@HEHHu HEHUHHEH@HUHPHEHUHPHE@PHEPHEUHH H}HEHHEHE/HEH@HEHEHHHEHHEHEH}uUHH H}HEHHEJHEHHƿ/A?%HEH@HUHп/AHEH@HEH}uUHH H}HuUMLE}u"HMUHEHƿ/A#UHH@H}HEHHEй{/A/AHǸvEHEA/AѺp/AHZEЃHEA90AѺq/AH0HEHHEAL0AѺr/AHHEHHEA[0AѺs/AHHEH{/A/AHEHE@HEAg0AѺv/AH~HEHEAv0AѺw/AHQHEH@HHEA0AѺx/AH"HEH@HHEA0AѺy/AHHEHH2UHH0H}HEHHE/AHEHEA/AѺ/AHEHEA0AѺ/AHZHEHHEAL0AѺ/AH/HEHHEA[0AѺ/AHHE0AH[EHEA90AѺ/AHHE0AHEHEA0AѺ/AHHE{0A/AHǸWEHEA0AѺ/AH:HEH7HyUHATSHPH}HEH/A0AHHEкHHǸ~HEHHEA0AѺ/AHE܅HEA1AѺ/AH~E؃HEA1AѺ/AHT/A0A.HHEкHHǸ/A0AHHEкHHǸE؃HEA$1AѺ/AHHEHHUHEHHE؃HEA41AѺ/AHwHEH0A0AEIĺ0A0A)Hú/A0A ALHHƿHEHE@ HEAD1AѺ/AHHEHHHEAR1AѺ/AHHE@HEAb1AѺ/AHnHEHHHP[A\]UHHĀH}HEHEHEAp1AѺ/AHHEHEHEHHHEA}1AѺ/AHHEH@HHEA1AѺ/AHHEH@HHEA1AѺ/AHzEHEA1AѺ/AHQ{1A/A&HEHUHEHѺHHEHHHEA1AѺ/AHHEH@HHEA1AѺ/AHHEH@HHEA1AѺ/AHEHEA1AѺ/AH\HUHEHѺH,EHEA1AѺ/AHHEHHEHsHHUHHHxHEE[EEHUHоHUEЃE@)EEHUHо@HvUEЃ@EHEHCHMHEFHHHHxA1AѺ/AHHMHEKHHJHHxA 2AѺ/AHHEHHUHHHHA0A{/AL2AHEHEHHAS2AѺ/AHXHUHPHHHPH%HHAg2AѺ/AH EHHAy2AѺ/AHEHHA2AѺ/AHHE/AHHHA2AѺ/AHqHPHTHHAg2AѺ/AH8EHHA2AѺ/AH EHHA2AѺ/AHHE{HHA3AѺ/AHHPHHHAg2AѺ/AHuEHHA73AѺ/AHHEHHA2AѺ/AHHE0AHjHHAP3AѺ/AHHPHHHA{3AѺ/AHHPHDHEH蒾HUHHHH/A0AEHEHEHHA3AѺ/AHHUHPHHHPHHHAg2AѺ/AHEHHAy2AѺ/AHEHHA2AѺ/AHvHE/AHHHA2AѺ/AH7HPHHHA{3AѺ/AHHPHHEHH/UHH H}A0A{/AL2A蛾HEHEHEAS2AѺ/AHwHEHƿHEHE@HEA3AѺ/AH0HEHbHHEA3AѺ/AHHE@@HEA3AѺ/AHHE@DHEA3AѺ/AHHEH@P/AHHEA4AѺ/AHXHEHHHEA*4AѺ/AHHE@DHEAH4AѺ/AHHE@@HEA`4AѺ/AHHEH@P{HEAx4AѺ/AHHEHHHEA4AѺ/AHQHE@@HEA4AѺ/AH#HE@DHEA3AѺ /AHHEH@P0AH@HEA4AѺ /AHHEHHHEA5AѺ /AHxHEHHEHiUHH0HHEH%HEHHEH HEк/A0AHǸHE0A0AHǸHE0A0AHǸʺHMHUHEAHƿ_HEHE@HAb1AѺ/AH~HUHHHHHKHAg2AѺ/AH/HHEH9HA 5AѺ/AHHHHAg2AѺ/AHHHEH9HA;5AѺ /AHHHoHAg2AѺ!/AHSHHEH9HAV5AѺ"/AHHHHA{3AѺ#/AHHEHHEH׶HEH˶HHbHEHHUHHHHEHHEHLHMHEкHH蕾HUH HHH HHA{3AѺ4/AHH HHEHH1UHH HHEH>HEHAHEH5HUHHHHHqHAg2AѺA/AHUHH0HEHE@=HAq5AѺC/AHHHHAg2AѺD/AHHE@=HAq5AѺE/AHHHHA{3AѺF/AHoHHHEHHUHHPHHEHHpHHp{/A/AHǸHpHEHѺHHpHEHѺHHUHHHHHHAg2AѺV/AHiHH0HEHE@ HA5AѺX/AH)HEH(HƿWHEHEH=HHA5AѺZ/AHHE@@HA5AѺ[/AHHE@DHA5AѺ\/AHjHEH@P/AHHA5AѺ]/AH'HEHYHHA"6AѺ^/AHHE@DHA@6AѺ_/AHHE@@HAX6AѺ`/AHHEH@P{HAp6AѺa/AHQHH4HAg2AѺb/AHHH0HEHE@ HA5AѺd/AHHEH HHA5AѺe/AHHE@@HA5AѺf/AHhHE@DHA5AѺg/AH7HEH@P/AHHA5AѺh/AHHEH&HHA"6AѺi/AHHE@DHA@6AѺj/AHHE@@HAX6AѺk/AHRHEH@P{HAp6AѺl/AHHHHA{3AѺm/AHHpHHHwHEH2HUHHPHHEHHpHhHp/A0AHǸXHpHEHѺHHpHEHѺHHUHHHHHHAg2AѺ~/AHHH0HEHE@HA6AѺ/AHHEH(HƿHEHEHHHA5AѺ/AH8HE@@HA5AѺ/AHHE@DHA5AѺ/AHHEH@P/AH"HA5AѺ/AHHHwHAg2AѺ/AH[HH0HEHE@HA6AѺ/AHHEHMHHA5AѺ/AHHE@@HA5AѺ/AHHE@DHA5AѺ/AHzHEH@P/AHHA5AѺ/AH7HHHA{3AѺ/AHHpHHH萿HEHKH UHHPHHEH-HpH聪Hp{/A/AHǸlHpHEHѺ6AHHpHEHѺ6AHHUHHHHHHAg2AѺ/AHHH0HEHE@HA6AѺ/AHHEH@06AHHA6AѺ/AHlHEH@Hƿ蚾HEHEH耾HHA5AѺ/AHHE@@HA5AѺ/AHHE@DHA5AѺ/AHHEH@P/AHHA5AѺ/AHjHEH蜽HHA"6AѺ/AH*HE@DHA@6AѺ/AHHE@@HAX6AѺ/AHHEH@P{HAp6AѺ/AHHHwHAg2AѺ/AH[HH0HEHE@HA6AѺ/AHHEH@06AHHA6AѺ/AHHEHHHA5AѺ/AHHE@@HA5AѺ/AHmHE@DHA5AѺ/AH/AH`HEH9HE0AA:AHǸ'HEHaHHA;AѺB/AHa^HHA:AѺC/AHHEH踓HEH謓HaHMHH0HEHE@= HA9;AѺJ/AHHHE@HA:AѺK/AHHE HAI;AѺL/AHHE@(HA`;AѺM/AHHH蚧HH@HUHH0HHEHHHAn;AѺU/AH=HEH_HEW8AH{;AHEHUHEIHa菲HHA;AѺY/AHHEH蛑HEHaH\HHA:AѺ\/AHRHaHHH0HEHE@HA:AѺa/AHHEHA;AѺb/AHHE@(HA`;AѺc/AHHH|IHUHH0H;A>HƿHEHEIAa߳HHA;AѺk/AHaZHHA:AѺl/AHHEHԙH@aHJH@H0HEHE@HA:AѺr/AHHHEHA;AѺs/AHHE@(HA`;AѺt/AHHEHPHHHgHH谣HA$7AѺw/AHHHEHEHAv0AѺz/AHYHE@HAg0AѺ{/AH(HEH@HHA0AѺ|/AHHEH@HHA0AѺ}/AHHUHHHHHH葢HAAѺ/AH迹HEH輅auPHHxA:AѺ/AHHU !HEEHDžxHE?HH_HUHxHpHHE}HxA/>AѺ/AH}unHxHEHpH4HEHFHEH}HxA8>AѺ/AH蚸HUHxHHEm}HxA@>AѺ/AHXHxAH>AѺ/AH) HxAT>AѺ/AHHxAj>AѺ/AHɷ}RHHPHHH<HH腘HxA$7AѺ/AHiHHEHEЋHxAv0AѺ/AH.HEЋ@HxAg0AѺ/AHHEH@HHxA0AѺ/AH˶HEH@HHxA0AѺ/AH虶HUH`HHH`HfHxAAѺ/AH趵H`H虖HxAAѺ/AH۴H`H辕HxAAѺ/AHZHH=HxA?HhHpHH/D=uHh@uHXAFA/AHhHpHHC=uHh@uHXAFA/A茠HhHpHH~C=uHh@uHXAGA/A4HhHpHH&C=uHh@=uHXAHGA/AٟHhHpHHB=uHh@7uHXAGA/A耟HhHpHHrB=uHh@uHXAGA/A'HhHpHHB=uHh@uHXAHA/AΞHhHpHHAHXA8?AѺ/AH茞HpHE=HțUHHHHH INSERTHEH UPDATE HEHINTO OR HEHFROM WHEHEHRE VALUEHEfESHUH`)aH;HXH`HH@=HHA8HAѺ/AH豝HXH`HH@=HHA`HAѺ/AHlHXH`HH^@=HHAHAѺ/AH'HXH`HH@=HHAHAѺ/AHHXH`HH?=HHAHAѺ/AH蝜HXH`HH?=HHAHAѺ/AHXHXH`HHJ?=HHAIAѺ/AHHXH`HH?HHA8?AѺ/AHћH`H:H UHHHHH 1 'heyHEE' ,.fE55EHUHEaHl9HxHEHH`>=HHA8IAѺ/AH)HpHEHH>=HHA`IAѺ/AHHhHEHH=,HHAIAѺ/AH觚H`HEHH=.HHAIAѺ/AHgHXHEHH\==HHAIAѺ/AH%HPHEHH=HHAIAѺ/AHHXHEHH09H`HEHH9HhHEHH9HpHEHH8HxHEHH8HxHEHHm<=HHA8IAѺ/AH6HpHEHH+<=HHA`IAѺ/AHHhHEHH;,HHAIAѺ/AH贘H`HEHH;.HHAIAѺ/AHtHXHEHHi;=HHAIAѺ/AH2HPHEHH';HHAIAѺ/AHHEH6H2UHHHhE 'HUHEaH5HxHEHH:HhAJAѺ/AHhHEH$6H觔UHHHhE ' fE'HUHEaH5HxHEHH :HhAJAѺ/AHזHEH5HUHHH(HEEPINGEHUHEHѺHƿaXH(A(JAѺ/AHTa-HH(A:AѺ/AH H0aHsqH0H0HEHE@H(A:AѺ/AH˕HE=H(A:AѺ/AH處H0H|vxH0H"vH辒UHHHHEHinsert iHEHnto t0 vHEHalues (2HEH22, 'bazHEfE')EHUHEHѺ"HƿaeWHA(JAѺ/AHŔa+HHA:AѺ/AH葔HaH;rHH0HEHE@HA:AѺ/AH9HE HAI;AѺ/AH HE@(HA`;AѺ/AHؓHHtIHHatHUHH@HHupdate tHEH0 set k0HEH = 7 wheHEHre k0 = HEE222HUHEHѺ#HƿaUHAXJAѺ/AHHupdate tHEH0 set k0HEH = k0 + HEH1 where HEEk0 =fE 7EHUHEHѺ&Hƿa UHAJAѺ/AH耒Hupdate tH`H0 set k0HhH = k0 | HpH2 where HxEk0 =fE 8EHUH`HѺ&HƿaTHAJAѺ/AHHupdate tH0H0 set k0H8H = k0 & H@H2 where HHHk0 = 10HPHUH0HѺ'HƿaSHAJAѺ/AHDHupdate tHH0 set k0HH = k0 ^ HH123 wherHHe k0 = 2H ƅ(HUHHѺ(Hƿa?SHAKAѺ/AH蟐Hupdate tHH0 set k0HH = 222, HHk1 = 'heHHllo worlHHd' whereHH k0 = 12HfDž1HUHHѺ9HƿavRHAHKAѺ/AH֏Hupdate tHH0 set k1HH = splicHHe(k1, 0,HH 2, 'AB'HH) where HHk0 = 222HƅHUHHѺ8HƿaQHAxKAѺ /AHa%HHA:AѺ /AHێHaHlHH0HEHE@HA:AѺ/AH胎HEHA;AѺ/AHSHE@(HA`;AѺ/AH"HHoIHHnHGUHHpHHEHselect *HEH from t0HEH where kHEH0 = 222 HEHor k0 = HEE222HUHEHѺ+HƿaOHA(JAѺ/AHCa$HHA:AѺ/AHHaHjHH0HEHE@HA:AѺ /AH跌HEHA;AѺ!/AH臌HE@(HAKAѺ"/AHVHEHPHHHhHHmHA$7AѺ%/AHHHEHEHAv0AѺ(/AHȋHE@HAg0AѺ)/AH藋HEH@HHA0AѺ*/AHeHEH@HHA0AѺ+/AH3HUHPHHfHPHlHAHEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|'sHEH}u rtH}(HEǀvrHE艐H HEHEHEH;Et }&HEUHH0H}HuU܉MHEHEHHt5HEH}NUHMHHuHHE/HE@|UHMHΉqHEH}u qtH}+HEǀqHE艐HHEHE}ucqHEHPHEH9v.HEHHEHHEHHEHPHEH)HEHP(HUHEH@HH)HHEHEm}}HEUHH0H}HuHUHEHHuHUHuHEHt HEHH;EsHEǀHHEHHEHHEHH9wPHEHHEHH HUHEHHcqHEHHEHHEHHElHEHHEHHEHHEH}u H1HEHUHHEHHUHMHHpHEUHH0H}HuUEEHHHHEHHPEHHHHEHHHMHHMHHHHbpHEHEHHHHEHH@HHEHEE;EoUHH@H}HuЉUHEHHuUHuHEعHvHEEEHHHHEHH@HEEE;E|HEHH;EsHEǀHHEHHEHHEHH9wUHMHEHHsHEdHEHHEHHEعHHEH}u H)HEHǀUHMHEHH HEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|lHEH}u mtH}(HEǀlHE艐H HEHEHEH;Et }&HEUHHPH}HuHUHEHHuHUHuHEȹHHEHEHEHEHHEHHEHH9w[HEHHEHH4HEHUH HEHH1mHEHHEHHEHHELHEHHEHHH)HHEHEHUHH)HHEH}t=HEHHEHH4HEHUH HEHHlHEHEHEHǀHEHHEHHEȹHHEH}(kHEȉHEǀHgHUHEHHEHH;Er:HEHHUHMHHUHHkHEHUHHE HEH)E7ÐUHH H}HEH@HHEHEHzHEHHzHEHHhHEHHEH@HH7HEH@HUHH0H}HuHUHEH@HHEHUHMHEHH;UHH0H}HuHUHEH@HHEHUHMHEHHHEH}tHE@PPHEPPHEUHH0H}HuUHEH@HHEUHMHEHHeHEH}tHE@PPHEPPHEUHHH}HuHEPhHEHHpHEHH{UHH0H}HuHUHEH@HHEHUHMHEHH"UHHH}HuHE@Pu&HE@PPHEPPHUHE𾝷@H_UHHH}HuHUHE@HtUHH H}H}EHEHNHEH}u 4HHEHPHHEH@HHu}t HEHNHEH@HHhHEH@ @HEH@(ַ@HEH@0 @HEH@8HEH@@HEH@@HEH@m@HEH@@@HEH@HHEHE@|HEHHEUHHH(H`HhLpLxt )E)M)U)])e)m)u)}$H(H@HHHDž0Dž40HEH8HPH@$HHH0HUHHHHuH-hUHH H}HEH@HHEHEHpPHEH@HHHEH@@HHE@XHH}HIH]uHEǀHEHHhHEH@`HHE@pHHuHIȹH uHEǀFHEHHuHEǀ%HE@uHEǀUHH H}HEH@HHEHE@xt HEHEHEPHEHHEHH]HEHEtUHH H}HEH@HHEHEHUHH H}HEH@HHEHEHUHH}HEH@HHEHE@|]UHH}HEH@HHEHE]UHSH(H}HEH@HHEHE苀uAHE苘HE苀eAH{WA ad aHE苀HHHaH@H([]UHH}HEH@HHEHE]UHH0H}HuHUHMLEHEHUHP HEHUHP(HEHUHP0HEHUHPHEH@HEH@HEHH}tAHEH/HHEHHEHHuHEHHUHcUHHH}HEHHtHEHH=0ÐUHHH}HExHRcHE@;HE@p@HE@X@HEH@HEH@UHHH}HEHHtHEHH/UHH0H}uHU؃} EHŐWAHEHHtHEHHo/HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHH.HHEHHEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHHHEHHa4HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH HEHHyaHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH0HEHH aXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP@HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPPVHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP`HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPhYHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPpÐUHH H}HuHUHMHEHUHMHH&t HEHUHPHEH@ HE@,HE@(HE@0HE@@HEH@8HEH@HHEHPHHEHPPHEH@`HE@XUHH H}HEH@HHE1HE=uHEHH &HEH)HEHEH}tHEH@0HEHE=tHEH%HEH@`HtHEH@`H)UHH}HuHEHP8HEHP(HEHUHP8HE@0PHEP0]UHH}EHEUPX]UHH}HE@0u5HEH@8HEHEH@8HP(HEHP8HE@0PHEP0HE]UHH0H}uUMܿ8+(HEHE8H[HEUHEUP HEU܉P$HEH@0HEH@PHUHHEHP0HEHPPHE@@PHEP@HEUHHH(H`HhLpLxt )E)M)U)])e)m)u)}H H u H(H@`HtH(H@`H'Dž8Dž<0HEH@HPHHH8H HPH(ZHPH'HH(HP`H[UHH H}HEHP HEHH%HEH}~HUHEHP HE@,PHEP,HEUHH}uE=tv=t9t:|=t;=t>l=tW=|I=tP=t*NWAXAXA XAXAXA{XAt!XAm'XAfE;HEH@UHcHHЋ@ ;EuHEH@UHcHHH&EHEH@UHcHHHHu]UHHHxHpHx@0tRHxHtHHpHHpH=uHpH@L HpH; HxHP HxH@H9u?HxH,HxP(HxH?HHpH HxHHxH@ HEtYHUHH% } uDHxH@ HPHxH@H9tHx@(PHxP(Hx@,HxH1HEH}_Hx-XAHǸ }#=HxHP HxH@H9u?HxH,HxP(HxHHHpHHxHHEH}uHx-XAHǸ]yHxHHxH@ H< JHxH@ HPHxH@H9tHx@(PHxP(Hx@,HxHHEH}uHx-XAHǸHx@(EHx@,EHxH@ HEHEHxHHxH@ HE}'mHEHxHLHEH}uHx-XAHǸ7H}uHxAXAHǸHxHHxH@ HE}'t(} tHxAXAHǸHxHP HEHH)HHEHxHHEH}uHx-XAHǸUqMȋUHxHHHpHH}~/HEHxH HUH4HpHHJHH EUHUHH}_HxHHEH}uHx-XAHǸ}-uEHxHHxH@ HE.UHUHH%tEAMȋUHxHHHpHHpHUPETHUHH%HETHHxHHxH@ HHH%HUHHHHHHxHHxH@ HHH0HEHxHFHEH}uHx-XAHǸ1H}@}tH]HxHHxH@ HHUHEHuHE=Ht H}t HUHEHHEHEH@HUHHu/HEH@HP`HEHѺaXAHǸHE=t,=tC=u_HEHHHEHH`HEHHHEHHBHEH@HEHHHEHHHMHE躀XAHHǸHiJUHH H}HuЈEUHuHEH^UHH0H}HuHUHEHUHuHEHѺH$EEtOHE؋uHEPHE؉0HE؋HE@9tHMHE躨XAHHǸHIUHH`H}HuHUEHEHUHEH{HEH8HEHUHEH4HE=HHEH@HUHH==s=|=@==pHEPHE@9t"HMHEXAHHǸ HEH@HUHH+tK+ t&tE^^tG|tKRHEH@HP`HuHEHѺaXAHǸ_E=E4E+E"HMHEXAHHǸ`HUHEH@HE@EHE@HEHL4FHEH@HEHPHE@HEH4HEHPHE@HEH4HEHPHEH@HEHt4HEHEHEHEHE(H`HUHEH@HEPHE؋@9t"HMHEXAHHǸ HE,H=HUHEHDHE,HHUHEHHE,HxHUHEHXHE)H<HEL@HEHxHEȋHHEЋ@HE@HEMIH 3.HEH@HP`HuHEHѺaXAHǸHE,HHEH@HHEHHMHEHHTulHEHuTHE@HEHHMHUIHѺH3HuHMHE YAHHǸEE H6DUHHHHEHHEHHPH(.EHDžHHDž@EHH@HHHHs=0=5U====-=HH+HH@HH@HH"HHH(HHMHHH3XH,HvuHH@H+EHH=uEH)H*HH UH@@HHHMHy-HHHHYAHHǸ xHPHMHHH?KHHh,H@HHiHH#HMHHHHHH@@HHHUHѺH'1H`HHH(YAHHǸFH*Hc'HHDH@HHEHHDž<HEHHEHHEHUHHEHHE@HHHEHHE@PHEPHEÐUHHH}H}tHEH #HELHEH}u0HEH"HE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HHHEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HH HEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@@HEH@vAHEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@>AHEH@AHEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEH'HEH}uYHEHEH@>AHEH@HEH@ AHEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHzHEHHFHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@rAHEH@HEH@ AHEH(HEHEHUHHEHHPHEUHH H}HEH(HEHEHHfHEHH2HEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@AHEH@HEH@ 'AHEH(HEHEHUHHEHHHUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHHEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾ-AHEH}t HUHEHEHÐHl$Ld$H-Q L%Q H\$Ll$Lt$L|$H8L)AIHI1Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH> %-30s[OK][%s:%d] %s foo%s%dt.alloc == 0/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/tt.ct.cardinality == 2t.data != NULLt.size != 0tp->alloc == 1tp->cardinality == 2tp->data != NULLtp->size != 0t.cardinality == 1barbazt.cardinality == 3xyzt.cardinality == 5%slist.list != NULLlist.alloc == 0list.count == 1list.count == 3list.count == 4l->alloc == 1l->list != NULLl->count == 3s.alloc == 0sb->data == NULLsb->size == 0sb->rdoff == 0s.wrcnt == 0keysb->data != NULLsb->size != 0s.wrcnt == 1s.wrcnt == 2tnt_tuple_set(&t, buf, 70) == NULLtnt_tuple_set(&t, buf, sizeof(buf)) != NULL%s%d%st->cardinality == 3tnt_next(&i) == 1TNT_IFIELD_IDX(&i) == 0TNT_IFIELD_SIZE(&i) == 3memcmp(TNT_IFIELD_DATA(&i), "foo", 3) == 0TNT_IFIELD_SIZE(&i) == 4TNT_IFIELD_IDX(&i) == 1*(uint32_t*)TNT_IFIELD_DATA(&i) == 123TNT_IFIELD_IDX(&i) == 2memcmp(TNT_IFIELD_DATA(&i), "bar", 3) == 0tnt_next(&i) == 0t->cardinality == 1i->alloc != 0tnt_field(i, NULL, 0) != NULLTNT_IFIELD_IDX(i) == 0TNT_IFIELD_SIZE(i) == 3memcmp(TNT_IFIELD_DATA(i), "foo", 3) == 0tnt_field(i, NULL, 1) != NULLTNT_IFIELD_SIZE(i) == 4TNT_IFIELD_IDX(i) == 1*(uint32_t*)TNT_IFIELD_DATA(i) == 123tnt_field(i, NULL, 2) != NULLTNT_IFIELD_IDX(i) == 2memcmp(TNT_IFIELD_DATA(i), "bar", 3) == 0tnt_field(i, NULL, 3) == NULLTNT_ILIST_TUPLE(&i) == &t1TNT_ILIST_TUPLE(&i) == &t2TNT_ILIST_TUPLE(&i) == &t3r->h.type == TNT_OP_PINGr->h.type == TNT_OP_INSERTtnt_field(f, NULL, 0) != NULLTNT_IFIELD_IDX(f) == 0TNT_IFIELD_SIZE(f) == 3memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0tnt_field(f, NULL, 1) != NULLTNT_IFIELD_SIZE(f) == 4TNT_IFIELD_IDX(f) == 1*(uint32_t*)TNT_IFIELD_DATA(f) == 123r->h.type == TNT_OP_DELETEbox.selectr->h.type == TNT_OP_CALLstrcmp(r->r.call.proc, "box.select") == 0%s%d%dr->h.type == TNT_OP_SELECTtnt_next(&il) == 1memcmp(TNT_IFIELD_DATA(f), "bar", 3) == 0*(uint32_t*)TNT_IFIELD_DATA(f) == 444memcmp(TNT_IFIELD_DATA(f), "baz", 3) == 0*(uint32_t*)TNT_IFIELD_DATA(f) == 1tnt_field(f, NULL, 2) != NULLTNT_IFIELD_IDX(f) == 2*(uint32_t*)TNT_IFIELD_DATA(f) == 2tnt_next(&il) == 0FOOtnt_update(&s, 0, 0, &t, &ops) > 0r->h.type == TNT_OP_UPDATEr->r.update.opc == 2r->r.update.opv[0].op == TNT_UPDATE_ASSIGNr->r.update.opv[0].field == 444r->r.update.opv[0].size == 3memcmp(r->r.update.opv[0].data, "FOO", 3) == 0r->r.update.opv[1].op == TNT_UPDATE_ADDr->r.update.opv[1].field == 2r->r.update.opv[1].size == 4*(uint32_t*)r->r.update.opv[1].data == 7tnt_net(&net) != NULLlocalhosttnt_set(&net, TNT_OPT_HOSTNAME, "localhost") == 0tnt_set(&net, TNT_OPT_PORT, 33013) == 0tnt_init(&net) == 0tnt_connect(&net) == 0tnt_ping(&net) > 0tnt_flush(&net) > 0r->code == 0r->op == TNT_OP_PING%d%stnt_insert(&net, 0, 0, &kv1) > 0tnt_insert(&net, 0, 0, &kv2) > 0r->reqid == 777r->op == TNT_OP_INSERTr->count == 1tnt_buf(&ops) != NULL%dtnt_update(&net, 0, 0, k, &ops) > 0r->op == TNT_OP_UPDATEtnt_select(&net, 0, 0, 0, 1, search) > 0r->op == TNT_OP_SELECTtnt_next(&ifl) == 1TNT_IFIELD_IDX(&ifl) == 0TNT_IFIELD_SIZE(&ifl) == 4*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 130TNT_IFIELD_IDX(&ifl) == 1TNT_IFIELD_SIZE(&ifl) == 3memcmp(TNT_IFIELD_DATA(&ifl), "FOO", 3) == 0tnt_next(&ifl) == 0tnt_delete(&net, 0, 0, &k) > 0r->op == TNT_OP_DELETECB0%s%d%s%sbox.inserttnt_call(&net, 0, "box.insert", &args) > 0r->op == TNT_OP_CALLr->code != 0box.packstrstr(r->error, "box.pack") != NULLtnt_insert(&net, 0, TNT_FLAG_RETURN, &kv1) > 0tnt_insert(&net, 0, TNT_FLAG_RETURN, &kv2) > 0rc != -1res > 0rc == 0r.code == 0r.op == TNT_OP_INSERTr.count == 1*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 587memcmp(TNT_IFIELD_DATA(&ifl), "foo", 3) == 0*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 785memcmp(TNT_IFIELD_DATA(&ifl), "bar", 3) == 0tnt_lex(&l, &tk) == TNT_TK_EOFtnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 123tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 34tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 56tnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == 888tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == INT_MAX - 1tnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == INT_MAXtnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == INT_MINtnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == INT_MIN - 1LLtnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == 72057594037927935LLtnt_lex(&l, &tk) == ',' && TNT_TK_I32(tk) == ','tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == -10tnt_lex(&l, &tk) == ':' && TNT_TK_I32(tk) == ':'tnt_lex(&l, &tk) == '('&& TNT_TK_I32(tk) == '('tnt_lex(&l, &tk) == ')' && TNT_TK_I32(tk) == ')'hellotnt_lex(&l, &tk) == TNT_TK_STRING && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "hello", 5) == 0worldtnt_lex(&l, &tk) == TNT_TK_STRING && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "world", 5) == 0всем привет!tnt_lex(&l, &tk) == TNT_TK_STRING && TNT_TK_S(tk)->size == 22 && memcmp(TNT_TK_S(tk)->data, "всем привет!", 22) == 0tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "hello", 5) == 0этотtnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 8 && memcmp(TNT_TK_S(tk)->data, "этот", 8) == 0безумныйtnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 16 && memcmp(TNT_TK_S(tk)->data, "безумный", 16) == 0мирtnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 6 && memcmp(TNT_TK_S(tk)->data, "мир", 6) == 0tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "world", 5) == 0tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 0tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 20tnt_lex(&l, &tk) == TNT_TK_TABLE && TNT_TK_I32(tk) == 0tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 1000tnt_lex(&l, &tk) == TNT_TK_TABLE && TNT_TK_I32(tk) == 55tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 1tnt_lex(&l, &tk) == TNT_TK_TABLE && TNT_TK_I32(tk) == 8tnt_lex(&l, &tk) == TNT_TK_INSERTtnt_lex(&l, &tk) == TNT_TK_UPDATEtnt_lex(&l, &tk) == TNT_TK_INTOtnt_lex(&l, &tk) == TNT_TK_ORtnt_lex(&l, &tk) == TNT_TK_FROMtnt_lex(&l, &tk) == TNT_TK_WHEREtnt_lex(&l, &tk) == TNT_TK_VALUEStnt_lex(&l, &tk1) == TNT_TK_NUM32tnt_lex(&l, &tk2) == TNT_TK_STRINGtnt_lex(&l, &tk3) == ','tnt_lex(&l, &tk4) == '.'tnt_lex(&l, &tk5) == TNT_TK_NUM32tnt_lex(&l, &tk6) == TNT_TK_EOFtnt_lex(&l, &tk) == TNT_TK_ERRORtnt_query(&net, q, sizeof(q) - 1, &e) == 0tnt_query(&net, q1, sizeof(q1) - 1, &e) == 0tnt_query(&net, q2, sizeof(q2) - 1, &e) == 0tnt_query(&net, q3, sizeof(q3) - 1, &e) == 0tnt_query(&net, q4, sizeof(q4) - 1, &e) == 0tnt_query(&net, q5, sizeof(q5) - 1, &e) == 0tnt_query(&net, q6, sizeof(q6) - 1, &e) == 0tnt_query(&net, q7, sizeof(q7) - 1, &e) == 0r->count == 2*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 222TNT_IFIELD_SIZE(&ifl) == 11ABllo worldmemcmp(TNT_IFIELD_DATA(&ifl), "ABllo world", 11) == 0r->count == 0tuple1tuple2liststream buffertuple setiterator tupleiterator tuple (single field)iterator tuple (tnt_field)iterator tuple (empty)iterator listmarshaling pingmarshaling insertmarshaling deletemarshaling callmarshaling selectmarshaling updateconnectpinginsertupdateselectdeletecallcall (no args)replylex wslex integerlex stringlex punctuationlex idslex keywordslex keys and tableslex stacklex bad string1lex bad string2sql pingsql insertsql updatesql selectsql select limitsql deletesql callER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not existokfailmemory allocation failedsystem errorbuffer is too bigbad buffer sizegethostbyname(2) failedoperation timeoutbad argument%s (errno: %d)@,@@@\@@ @v@@ @v@@End-Of-StatementERRORNUM32NUM64STRINGIDKEYTABLEPUNCTutf8 decoding errorbad string definition%d:%d %s%sexpected '%c'expected '%s'expected NUM32 or NUM64 or STRINGselect key values must refer to the same indexcan't update on different keysbad update operationupdate failedinsert faileddelete failedselect failed%.*s.call failedping failedinsert, replace, update, delete, select, call, ping are expectedPINGUPDATESETWHERESPLICEDELETEFROMINSERTREPLACEINTOVALUESSELECTORANDLIMITCALL;Tp^#h@Hh2a0KXxIs Z@ nh 1 ( P x A  d 8 @ h :# % |) , m/0 H3X 3 d4 5 }7 3= 8BH Cp E wG lK :LL0PX QxQRRZSYTU8VXWxXY \|\\]8e]X]x]^D^`_M` Ua@a`ab2bRbbb(cHchAdjd$iijj(jH)khklm.nxWz8r{`{{s||~A~0~XD}l+8wXixݑjڒHs(HhD!,(HhϞiQ3Wϡ8:`$n6 @6`j @I`ҫ4k( @ܭ`- ۱Hp`(̵Hh<8`<` 8 X x > !@!]h!!!!!zRx P*zRx  AC  <YAC T \lAC g |EAC @ zPLRx!@ $$ |AAC  $L+|AAC  $ti:|AAC G $^I|AAC Y $J/X|AAC * $QEg|AAC @ $nv|AAC  zAC u $\E|AAC  $|AAC  $y|AAC  $|AAC  $S|AAC  $$|AAC  $L}|AAC Jn $tS|AAC  4!AC  $3|AAC . $)m }AAC h $ n}AAC   $4U*}AAC  $\F}AAC  $U}AAC  $+id}AAC d $l s}AAC  $}AAC  $$}AAC  $L\n}AAC i $tW}AAC R $}AAC  $6}AAC 1 $ }AAC  $5#~AAC  $<&~AAC  $dK'%~AAC  $'X3~AAC S $(B~AAC  $}*Q~AAC  $ 0`~AAC  $,4{~AAC  $T6~AAC  $|8~AAC  $9~AAC  $|=~AAC  ">AC  $>~AAC J (BAC ~ BAC  ^CAC  4C=AC x TDsAC n tZDAC  9EPAC K iFMAC H GAC  (HGAC B  OIAC  4 .JAC  T ,LpAC k t |L9AC t  LYAC T  LWAC R  M0AC k  M9AC t  .MJAC E 4 XM,AC g T dMAC  $ `N~AAC   %OAC   PtAC o  aP&AC a  gP&AC a  mPAC X < jP AC [ $\ jPAC E  P AC [  PAC   jQ)AC d  tQ]AC X  Q)AC d $ QAC  D TVAC  d VAC   sW;AC v  WAC U  WQAC L  WAC  $l 1X ~AAC  , YQAC L L GYAC   l 6Z AC  $ ds~AAC n $ f AAC   g'AC b  g*AC e $ gAAC  Dg*AC e $ gt)AAC o h0AC k $ i8AAC  $<i[FAAC V $dn< nAAC 7 $wAC U $wAAC  $xAAC  LyAC  yLAC G zAC  $ztAC If $5{AC I D{pAC k d{kAC f 8|+AC f C|#AC ^ F|)AC d O|_AC Z |#AC ^ $|AC  DQ~AC  d~KAC F ~$AC _ ~dAC _ @AC  $LAAC  $t7AAC  4AC  TqAC  t3$AC _ 7xAC s $kAAC f ҉AC  }AC x AC  <OAC J \ՌyAC t |.fAC a t!AC \ uyAC t ΍AC | /*AC e 9AC  <AC | \*AC e | AC  vAC | ׏*AC e AC  JCAC ~ mAC Z <l7AC r \AC  |$AC _ qAC l QBAC } tQAC L AC  IAC  <iAC d \AC  |ߓ0AC k $ AAC  $,AAC  -AC   $tZ+AAC U $P7AAC  $ȖFAAC  P6AC q f6AC q |7AC r 9AC t EAC @ $ј0AC k D9AC t $UAAC  $ؙdAAC  $PesAAC ` $DCAAC > $AC _ $;AC v $˝ AAC  ljAC e $AAC  $AC _ AC  )AC d "AC  4AC  T^AC  t AC  $AAC  $$wÀAAC  UAC P "jAC e $l׀AAC  $L0Jf@Xt     ( 1 &  /            &      &  mV   L   e v F .Q 4Q = t i v    x i x  h<[  c  - -Y 7 3b$0! w    3  u  A 3)r       F h  LPS  !   = N ( ,w,d  #@p#@ @ @ /Aaao`@@(@  a@@ o(@oo@av @ @ @ @ @ @ @ @ @!@!@&!@6!@F!@V!@f!@v!@!@!@!@!@!@!@!@!@"@"@&"@6"@F"@V"@f"@v"@"@"@"@"@"@hNAnNAqNANANANANANA0OA?OA\OAjOAOAOAOAOAOAOAOA PAPA-PADPARPA]PAkPAvPAPAPAPAPAPAPAPAPAPAPAQA QAQA%QA3QA>QALQAWQAeQApQA~QAQAQAQAQAQAQAQARARARA&RA2RA;RAGRAPRA\RAeRAqRAzRARARARARARARARARARARARA7SAASAYSAhSASASASATATA2TAGTA\TAuTATATATATATA"UA0UAiUAUAUAUAUAUAUAUAVA(VALVA`VAVAVAVAVAVAVAVAVAVAWA"WA4WADWA\WAnWA YAYAYAYAYAYAYAYAYAYAYAYAYAYAYAZA0"@GCC: (Debian 4.7.3-4) 4.7.3,#@i&,(t@,+6@,2F@,zH@=,K,@,-U@,7ht@,ukP@,mL@,n@ ,u,@, A,A,0 AZ,A,}A>,xA,;Ae,:AC,DA,>Ae&-#@s@ 8int   S$  i i i#  m?!iu  w# P!#  p' # px0F3T /w 05# len15# /25# 5 ns65# 75#: ns;5#> ns?5# @5# C  nsD5# E5# H$ I5# Lh nsM5# ZN5# O5# P5# L # \ $5# %# "&-# '?#L4 ptr5#h8 ]9# _:5# ;?# (  +4  -# .-#( &Y h 'w# t (h#( +~ h ,# t -h# ( 0 h 1# t 2h# 5 op 6*#  75#  8#  95# " :5#  ;#  p H >p h ?# t @h# ops A#( B5#0 opv Cp#8 opc D5#@U @ G h H #  I# t J5#  K# L5# t Mh#  P h Q$# l R# H YCz! Z4 [Ydel \~ ]v ^ _`x U $ V# R W-# h X@# r `# vc a?#h v b#p X0 # op $5# / %5#  &5#  '#  (# _ )5#(XX &  '?#  (# ] )# l *#  +9# ( ,Z#( ^ -u#0 A .#8  /#@  0#H  15#P / 25#T-?C9-?TT??u`?{ #0 -A tu .# /# 0# V 15# K 25#  3?# 4#(  Au l Bu# tu C#  D5#5 O s P# r QC#( \ s ]# t ^h#8 i s j# r k# s f  C  ] Ac {-   z  {#  |#  }?#   #  #  #   #(?  C     # $# "%-# &-#!P Llu 9G !  YD & ne  e x0Z 1# A2?# B3# 4# 5#0 c6#@ 7#H 68#P 9?#X :#` ;#h }?#| w ? # @ # A # B?#! " # "#-# len$-#F# ?T.  ( b :  D8}:  | C 2D# "E?# tkF?# M8i32Ni64OsP SO : S# 8K tkL?# vQ# 5 R?# colR?#$ S8#( T#0OT T#e e#g g# 3g#oh_ buf` # a# posb-# 5 c?#( colc?#, _d?#0 e#8 f?#@ qg#H h#X i#` W , . 2/# cb0# 1#m 4N G5# h 5# _6?# 9#@f$@]9X29Pcb9Ht:hIf$@$@`]IXiJhnK`^T$@+%@3]TXiUhZ`+%@p%@ t`h``5 `?\ `?X=`Plp%@P'@ ltmh@tpuh'~P'@ )@ ~HthP  )@+@@w ]@thluXp +@:.@ ~ssbhkv` :.@i/@> ~buf>off5l?hth~ N pJwi/@2@` ~thiC ~ 2@S4@ ~thiC ~S4@7@ * Xthi `7@:@ }t1h@t2ht3hluhiC },:@Q;@ ,~buf-`t/h@i2C ~:Q;@<@@] :}s;i?C }rBhL<@{B@ L}sMtOh~iTC }rWhfY `t{B@bF@K t}sutwh~i|C }rhf ` bF@vL@` }sth~iC }rhf `vL@T@W {s~ ]~iC }rXilC |tPf H T@Y@  |sops~th~iC |rhf  `o"Y@[@ "h1+[@9\@p +~i.C ~![@\@r1Th 99\@^@@ 9}kv1;h@kv2?hiFC }!]@t^@rIThvS^@`@l S}opsTkXhi]C }!_@`@r`T`h`@e@  h{ iuhinC ~!a@{e@rqT`iluC {tpxXifl~C }e@Ig@` u ~kh@iC ~!wf@g@rThdIg@i@  ~ `h@iC ~!1h@h@rTh i@lj@ S ~ `h@iC ~!i@:j@rTh{lj@@t@  tkv1hkv2h~sX T ?loff-~ "` z!k@t@rtrc?T":l@l@BresH"lm@p@ilC utp@iflC v!p@t@ilC xtpifl C yg #p!@t@u@ < !~sz"<@l# ~tk%~ FL p$ +u@y@@  +~sz,l. ~tk0~ F pVtAy@B}@  A~szBPlC ~tkE~ F) p'SB}@@  S~szT@lU ~tkW~ F p.f@@`  f~szglh ~tkj~ F pC@@ d ~szdPl ~tk~ Ft p@u@  ~sz@l ~tk~ F p)u@P@   ~sz `l ~tk1~tk2~tk3~tk4~tk5~tk6~ F pP@ۍ@   ~sz `l ~tk~ F! pۍ@l@@m! ~szm!`l ~tk~ F}! pl@ď@! ~e`qPiC ~!!@@rTh-ď@@r" }e`qr"iC ~!@S@rTh " p"k@;@`X# {e`q1X#q2h#q3h#~q4~q5x#}q6#}q7#|i C {!i@ @rTh h# p# x# p& # p( # p9 # p8];@@@P$ {eXqP$iC }!5@ @rThil#C {tp&`ifl,C | `$ p+>@@@ $ >}e?`q@iCC ~!3@ҝ@rFThO@@U% O~eP`qQU%@iTC ~!@@rWTh e% p`@@% `}ea`qbieC ~!@M@rhTh$ q?@s@@3&"q?Lq3&@tuPnet a Z&%&O&>-k  Sint$x0@   in# m # $c#K %c#&5# / x    P  <  % ]    L ' Z h v            B N  6    S  ! | " # $ % Y&  ' _ ( D ) B* + , 3- . /  0 1 2 3 m 4 + 5 6  7 8  9 : u+ \9   `a| -7t@@ 8int   S$  i i i# T m!iu  w# P!#6i @% E%# 5 p?K( +p -# .-#! F!6(    M) # #  p G V  # = 7# ~ M#  h# 1M 3T 7P)T M~!)+m,@.m/R23^:;<)`m `\6 g h  B# Fx p0 7 9?# :?#F ;?# <?# 2 =p# > #* ?#  @#(xx 0  1# A 2?# B 3#  4#  5#0 c 6#@ 7#H 6 8#P  9?#X  :#` ;#h } ?#| w ?# @# A}# B?#29}t@B@9VX:PA:ML?hyL}B@ߦ@sLXsetL?TM?lu^}ߦ@@`Ws^}A^}A^?}ab}\@6@nWPoHqw~opt?~lenp~fdsz5}ret}?@@F{?DK{?@ɨ@@y~}@@sXopt?Tmin?Pmax?lavgTh}@@  sXopt?l@}@@ sXAԹPA?L}lout㡬@ @@ sh@b@@ sXrch]b@a@z sXbufP"-Hall?Doff-h@G@!r`"a@@ #sX#iovP$_?L#all?H%-h@@!r`"Y7@@`j #s7X#buf7P$"7-H!rDh&M@@ #sMX#iovMP$_M?L!iN?l"X@@ B #sXH#iovX@$_X?%"\-h!i]?d!rhX"eq@@ #sqX#bufqP$"q-H#allq?D!offs-h@ܳ@!ru`'@@#s#buf$"-!lv-X!rv-P!off-h%-`H@ @!topH-@@ 8int   S$  i i i#  mu  w# P!#S(  pT T# T# '# #ZOx 0F 3T /  0j# len 1j# / 2j#  5 ns 6j#  7j# : ns ;j# > ns ?j#  @j#  C> ns Dj#  Ej#  HY  Ij#  L ns Mj# Z Nj#  Oj#  Pj# L # \ $j#  %# " &-#  '?#L 4 ptr 5# 8: ] 9:# _ :j#  ;?# (  +i  -# .-#q $tz ( & h '# t (#( + h ,# t -# ( 0 h 1# t 2# 5c op 6_#  7j#  8c#  9j# " :j#  ;# s p H > h ?# t @# ops A#( Bj#0 opv C#8 opc Dj#@U @ G3 h H>#  Ic# t Jj#  K# Lj# t M#  PX h QY# l R#H Yz! Z [del \ ] ^3 _s`x U $ V# R W-# h Xu# r `X# vc a?#h v b#p@^!tX0#n op$j# /%j# &j# '# (# _)j#(XX&# '?# (C# ])c# l*# +# (,#( ^-#0 A.#8 / #@ 0#H  1j#P /2j#T ==-n# c=?I ~=~i =- ?= ?=~ ?= =x0 1# A2?# B3# 4# 5#0 c6#@ 7#H 68#P 9?#X :#` ;#h }?#| w ? # @ # A # B?# s   # #(@@@ s(=Xsn) h F3@@ s3=Xbuf3P"3-Hsn4 h:@@w s:=Xbuf:P":-Hsn; hrc<`C@m@` sC=XiovCP_C?LsnD hrcE`jLm@@ sL=hrL~`Q@ַ@ x sQ=XbufQP"QHsnR h~W?ַ@ @ sW=hrW`_? @L@ s_=hr_~`o=L@h@@B so=Xp?lsn `?h@U@ s=~opt?~sn ~`T~?U@]@ s=Xsn h?]@ѻ@`#s=Xsnˮ hѻ@@_s=Xsnޮ h@@ s=Xsn h ?@:@s=Xsn h! :@Z@""s=X#sn h$9$Z@@@"s$=H#sn% X%@ü@#msg'  a  p!6?@@"s6=X#sn7 h G  p &b aD-@@ 8int   S$  i#  my( + -w# .-#F!  w -b "  : w ?08$ buf%# off&-# top'-# "(-# tx)# txv*#( ptr+w#0 *?@½@iob*h"*-`tx+Xtxv,Pptr,wH:?½@@`iob?h0-@)@int   S$  ^ ^# u  l#P!w# I#I#'## G !b  Y    D  &  n e  e x01#A24#B3#4# 5#0c6#@ 7#H68#P94#X:#` ;#h}<4#p .` O   C   N k    +@I@ opt+hb W6I@r@  opt6h d=4r@)@' opt=X2= T`='Htvp?-h{ -j,@@ S&Fint!(X$  S( m#m#'## Zf{ t X  #    m  0          p  !"#"##len$# _  # ? T .       (   b   :     D 8    }  :   |  C2 D#" EF#tk FF#  Mi32 N;i64 OMs P S: Sf# 8 Kftk LF#v Q#5 RF# col RF#$ S#( Tl#0  T Tf# e ef# g gf#3 g# foh _jbuf `# aj#pos b# 5 cF#(col cF#,_ dF#0 e#8 fF#@q g#H hp#X i#` .p,@@l.h.j`buf/X"/P @@@@ $l@XtkBfhtknBf`M@@ `lMhtkMf`T@@!lThonTpdZf@1@`!lZXtk^fhef1@@!BleXtkeFT5 eFPcoleFLtffhqF@@ "lq|fmtq|msgv|`w| $@'@"lXr$h'@6@"=lXtkFTiFloF6@@@#l~tk~ch_o5 FcolF$"$pny @idZ@ i>F\!@@r$P!9@q@Ar$H!@@cr$@!{@@r$!A@y@r$!@I@r$!@@5 numM`!@@ r$"@(@ r$!@j@Y r0$~#0$LF~ idM;X -@s@ S&Fint!(X$x0j  3 Պ  X#  m;S( G # # '# #ZO 0          p    /  0x#len 1x# / 2x#  5 ns 6x#  7x#  :'ns ;x#  >Ons ?x#  @x#  Cwns Dx#  Ex#  H  Ix#  Lns Mx# Z Nx#  Ox#  Px# L # \ $x#  %# " &#  'F# L 46ptr 56#  8s ] 9s# _ :x#  ;F#  (  +  -# .# ( &h '#t (# ( +h , #t -# ( 0h 1'#t 2# 5qop 6_#  7x#  8q#  9x# " :x#  ;#  H >h ?O#t @#ops A#( Bx#0opv C#8opc Dx#@ U @ GAh Hw#  Iq# t Jx#  K# Lx#t M# Pfh Q#l R<#H Yz! Z [del \ ] ^A _ `x U  $ V# R W#h X#r `f# vc aF#hv b #py X0 #qop $x# / %x#  &x#  '#  (<# _ )x#( XX&& 'F# (F# ])f# l*# +# (,#( ^-#0 A.#8 /#@ 0#H  1x#P /2x#T@@q&f@ FL@l@F@F@F@6@ !O L  l   u   9 ! "# "##len$#j #P ? T .       (   b   :     D 8    }  :    | C 2D# "EF#tkFF# M i32N;i64OMsPOS : S# #  8K# tkLF#vQ # 5 RF# colRF#$ S #( T) #0 T@ T# #eW e# #g| g# # 3g| ## oh_' buf`O# a' #posb# 5 cF#(colcF#, _dF#0 e@ #8 fF#@qgW #H h- #X i#`P  2-g s.@#l/g # 0# 4- @_@# sql4 z84# zfmt4y.6 |`7G|5 ;F~colh ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y #Z0 - tu .O# /# 0# V 1# K 2#  3;# 4#(  A l B# tu CO#  D#U5 O' s PY# r Q#( \L s ]Y# t ^#8 iq s jY# r k*# sf   Z] c - L ' z9  {/#  |q#  };#  O #  a #  a #  #(;I I 9 a I U T,I ,@@2 i,I h:;@vA3 i:I Xip; hZbvAA`3 ibI Xipc hyI A>A3e iyI XtyOPip hZ;>AA 4 iI Xil hAA4 iI Xil h I A>A41 iI XlPil h;>AA@5} iI Xir} hrc;dLmAA5 iI Xir} hI ArA6 iI XsYPir} h;rAA`6V iI XirV hrc;dAA6 iI XirV h5I AA 7 iI XsYPirV h ;A'A74 i I Xis 4 hrc;d'{'AQA7x iI Xis4 h +I QAA@8 i+I Xs+YPis34 h!mAAA8 iAI h U;A<A9.iUI h!bd<AsA`9_idI h"vI sA A9ivI XtvOP#ZvL$x;l- AA&- 4int   S$  e#  mux0B3P / 0# len1# /2# 5& ns6# 7#:@ ns;#>h ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y$6 A0A :~s6YX/6Told8lFY0AA:sFYh5\AA:s\Yh -A A'/ 4int   S$  e#  mux0B3P / 0# len1# /2# 5& ns6# 7#:@ ns;#>h ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y #f  $# " %)#  &)#z+A5A@;s+YXsb,h/ 45AA;s4YXbuf4P"4)Hsb5h :)`BA A<sBYH"B)@sbChoffD)`E)XndFPQ A A`<sQYXbufQP"Q)HpRhU[ A A<U s[YHiov[$@_[;"\)hi];dp`Xdl A A = slYhrl`q; A A= sqYHrq@sbrhoffw)Xrcx;dE; A A=_ sYHr@sbhoff)Xrc;d Y A A@>sYX;lsb`c-+ AA1 4int   S$  e#  mux0B3P / 0# len1# /2# 5& ns6# 7#:@ ns;#>h ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y" 4 AA>|s4YHhdr7`v<|P lq- AA3 4int   S$  e#  mux0B3P / 0# len1# /2# 5& ns6# 7#:@ ns;#>h ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y 7AA?s7Yns77kv8Ohdr;` @PvD l - !AA5 4int   S$  e#  mu;x0B3P!74 / 0# len1# /2# 5< ns6# 7#:V ns;#>~ ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #J \ $# %# "&)# ';#L4e ptr5e#8 ]9# _:# ;;# J( + -s# .)#( & h '# t (#( + h ,<# t -# ( 0@ h 1V# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H >  h ?~# t @# ops A#( B#0 opv C #8 opc D#@@U @ Gp h H#  I# t J#  K# L# t M#  P h Q# l Rk# H Yz! Z [del \ ] ^p _`x U: $ V# R W)# h X# r `# vc a;#h v b:#pX0 # op $# / %#  &#  '#  (k# _ )#(XX &U  ';#  (u# ] )# l *#  +# ( ,#( ^ -#0 A .-#8  /?#@  0s#H  1#P / 2#Too)Uo:;{oo);o@;o;-oe?o3 #|  $# " %)#  &)# !Llu 9a!.AhA`?\s.o/op//"/!2;henc3`iov5\!6;l l l VhAA?sVohVdopW`qW\!iAA @$ siohidopj`qj\"|A A@ s|oh|dop}`q}X! ADA@ sohdX"`!DAA@A so!")!l"h!dsz`bufXpPrcH!AAA sohdo!AABX sohdؔX"`!AA`B so~ns~~ke~opso~hdr`!~Pv  l-'"AA8 4int   S$  e#  mux0B3P / 0# len1# /2# 5& ns6# 7#:@ ns;#>h ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y"7AABs7Yns77k7Ohdr:`"?@PvC l%-"AA: 4int   S$  e#  mux0B3P / 0# len1# /2# 5& ns6# 7#:@ ns;#>h ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y"8AA Cs8Y~8~8~`9O~ <;l"=;h>`hdrAP"I@vL~"U~ l Q-#ACA< 4int   S$  e#  mux0B3P / 0# len1# /2# 5& ns6# 7#:@ ns;#>h ns?# @# C nsD# E# H I# L nsM# ZN# O# P# L #4 \ $# %# "&)# ';#L4O ptr5O#8 ]9# _:# ;;# 4( + -s# .)#( & h '# t (#( + h ,&# t -# ( 0* h 1@# t 2# 5 op 6#  7#  8#  9# " :#  ;#  l H > h ?h# t @# ops A#( B#0 opv C#8 opc D#@*U @ GZ h H#  I# t J#  K# L# t M#  P h Q# l RU# H Yz! Z [del \ ] ^Z _`x U$ $ V# R W)# h X# r `# vc a;#h v b$#pX0 # op $# / %#  &#  '#  (U# _ )#(XX &?  ';#  (_# ] )# l *#  +# ( ,#( ^ -#0 A .#8  /)#@  0s#H  1#P / 2#TYY)?Y$;eYY);Y*;Y;YO)Y #Z0 - tu .O# /# 0# V 1# K 2#  3;# 4#(  A l B# tu CO#  D#U5 O' s PY# r Q#( \L s ]Y# t ^#8 iq s jY# r k*# sf   Z] c - L ' z9  {/#  |q#  };#  O #  a #  a #  #(;I I 9 a I U m#;ACACs;Y}ns<}Z=}=}=}`#>}"A)hiB~hdrI~e#N}vcT;TvU$Hvia;drckUAlAo tEOXAAtdO@q-#DAAA> 4int   S$  e#  mu3PL #\ $#%#"&)#';#L4 ptr5#8N]9N#_:#;;#  /0# len1#/2#^!  s X0# op$#/%#&#'#(#_)#( #/DAhACE r/Eh #:hAA@Dz r:Eh#K;AADL rKE rcvK ptrKshdrMT"P\bufPphdi`$A#Lt@x#AAE ptrX bufP"Hsrchoff`sX;AA`E\ rE bufÀ") off\hdrbh#)Xptrh@rc;d)Tsl -d$A/A@ 4int   S$  e#  mux0B3P /0# len1#/2# 5 ns6#7#:5 ns;#>] ns?#@# C nsD#E# HI# L nsM#ZN#O#P# L #)\ $#%#"&)#';#L4D ptr5D#8]9#_:#;;# )( +-s# .)#q $  s ( & h '# t (#( +% h ,# t -# ( 0J h 15# t 2# 5 op 6# 7# 8# 9#" :# ;#  l H > h ?]# t @# ops A#( B#0 opv C#8 opc D#@JU @ Gz h H# I#t J#  K# L# t M#  P h Q# l RJ#H Yz! Z [del \% ] ^z _`x UD$ V#R W)# h X# r `# vc a;#h v bD#p$2AAEyr2yh.$?AA Fr?yh$wAAFrwyhbufw`"w)X};AAFcr}yXrcv}Pptr}sH"lbuf`;AF!A@GryXrcvPptrsH"lbuf` ;F!A#AG7ryXrcvðPptrsH"DZlbufȀ`U ;#A&AHryHrcv@ptrs"lbuf`%A;\ ;&A'A`Hryrcvptrs"\buf P='Ai&l_&Loff'hj,d\ ,H"-`tu6D&A'AK/0;D E;'Ae,AH rEyrcvEptrEs"K\bufLP+AiRl\ RLksSh$bDpp`z(A(A KUV;H)A*Aoprz; D$;e,A-A Ip ryhrcv`ptrsXhdrp PU$-A$.AI ptr XbufP!"Hsrchoff `s `;$.A/AI rybuf!")off hdrp #)Xptr @rc;dG.A.A?$p h)"s l% : ; I$ > $ >   I&I : ;  : ; I8 I !I/ : ; I8  : ;  : ; I : ; I' II'  : ; (  : ;  : ; .: ; ' I@B : ; I : ; I 4: ; I .: ; ' @B 4: ; I .: ;' @B : ;I 4: ;I 4: ;I ! " #!I/$.? : ;' I@B %!&4: ;I? < % $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?  % : ; I$ > $ >   I&I : ;  : ; I8  : ;  I !I/  : ; (  : ;  : ; : ;I8 ' II : ; I8 .: ; ' I@B : ; I 4: ; I : ; I  4: ; I  U  : ; .? : ; ' I@B  : ;  .? : ; ' @B !4: ;I ".? : ;' I@B #: ;I $: ;I %4: ;I &.: ;' @B '.? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 I !I/ : ; I8 ' II : ;  : ; I : ; I'  : ; (  : ; : ;I8 .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I .? : ; ' I@B 4: ; I .? : ; ' @B  .? : ; ' I@B !.? : ;' I@B ": ;I #4: ;I $.? : ;' I@B % &4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 ' I I : ; I8 .? : ; ' I@B : ; I : ; I .? : ; ' @B % $ > $ > : ; I  I : ;  : ; I8  : ;  ( .? : ; ' @B  : ; I .? : ; ' I@B : ; I 4: ; I % $ > : ; I$ > I!I/  : ;  : ; I8   I &I  : ;  (  : ; I8  : ;  : ; I : ; .? : ; ' I@B : ; I : ; I .? : ; ' @B 4: ; I .? : ; ' @B .: ; ' I@B .: ; ' I@B 4: ; I .? : ; ' I@B .? : ; ' I@B  : ; : ; 4: ;I ! " # U$4: ;I % $ > : ; I$ >   I&II !I/  : ;  : ; I8  : ;  (  : ; I8  : ;  : ; I : ; I' II'  : ; .: ; ' I@B : ; I : ; I 4: ; I 4: ; I  : ; .: ;' I@B : ;I 4: ;I !4: ;I " #!I/$.? : ;' I@B %: ;I &4: ;I?  % $ > $ > : ; I : ;  : ; I8  : ; I8  I .? : ; ' I@B  : ; I : ; I 4: ; I &I.? : ; ' @B .? : ; ' I@B 4: ; I .? : ; ' I@B % : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I .? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I : ; I 4: ; I 4: ; I .? : ; ' I@B I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I   % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I 8 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltt.cstddef.htypes.htypes.htime.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htnt_buf.htnt_opt.htnt_iob.htnt_net.htnt_utf8.htnt_update.htnt_lex.h #@8=uuYK0/~z0/{1iU$4)*++".-//Y)*++Y*Y**5+)*55*/*5O...1).//)".//**"uggػBB!(0Y9,-?9--09--?8廽!0Y9,-?8廽(--=-.@=..1=..@=1"(1Y9595958廽"ZvY8廽"Y93938廽"#Y91X*01C@11491@01C@1148廽"Y91X*01C91@01C8廽"#Y91>X*01C@11491>@01C@1148廽LE#+Y919X*01C9X*01C@1169X*01C@114@1148["TY911X*01C475G899<8忻1??001!44=/02k!EE4=Y3001 m"6"*4=Y001l"fLP4=Y00190122Y9/05900B8ff"E4=Y001l",E4=Y001l"E4=/0?k"EE4uZ$+g+,i+/0090122Y9/05900B8ʠ90122Y9/05900B8@J3!CB!tXtXtX.tXtXtX.tXtXtXtXB!"tXtXtXtXtXtXtXtXB!WtXtXtXB!wtXtXtXtXtXtXB!;tXtXtXtXtXtXtXB!LEEEEEEEB!BB@@B?YYYYYBB@@B?!v@!@!F4=/02k!BF4=Y001l"?FIFUIUI\II~I4=Y001l!MF4=Y00190122Y9/05900B8ff!FF4=Y000l!7F4=Y001l!FF4=Y001l[YYYYYYYYYZYYYYYZYYYYYYYYZYYYYYYYYYZYYYYYYZ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.c7  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/netinet/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_io.cstddef.htypes.htypes.htime.hselect.huio.hsocket.hsockaddr.hin.hstdint.hnetdb.htnt_opt.htnt_iob.hsocket_type.htnt_net.h t@:YY/wv0gvguvY2""ggg)?Y=i'V0=;vKv/pX vX=h4fw=yggY!uguu/$Y0u.uw&&utC?#Y2/vhho?$=1׮0u+uK2g>.0uK2YZ50ug0Kg0YxJofK2=׼"-h+uK10,KW$0J2/J׼"Yh+uYK2g>.0uK2="5#Ku5+uד%hZ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_net.cstddef.htypes.htypes.htime.hstdarg.hstdio.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_opt.htnt_iob.htnt_net.h @'!1=g1=uK1/uK11=g1uK1 .uKgK .2&"--t .IK/סI8vvvY .)uY . . .u ..ɻIgI,v tn /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iob.cstddef.htypes.htypes.huio.htnt_iob.h @,uYuvY2o' /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_opt.ctypes.htime.htnt_opt.htnt_net.h @+Y220h$,$Z$Z$Z$Z$"Z$"Z$"Z$Z$"Z$"0$0Zt( Y /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_lex.cstdint.hstdarg.hstddef.htypes.htypes.htnt_utf8.hctype.htnt_lex.h ,@/uɟY1t212ɭ2u=K1KY+K12'1-"1uK2NuuuxJY./!5%ggt 5#g#o. W$g˟|z th$'u/L#gK1'% w ?=/uɭ)'gK/u''!w %/uʭ"3'K1=J $gfftX=uJ%dX<('/Y# /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntsql/usr/include/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_sql.cstdint.hstddef.htypes.htypes.hstdarg.hstdio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.hctype.htnt_update.htnt_utf8.htnt_lex.h @42'-"gh94/g/7u0Y0/K1/g,gvu0 .f4u/0101K2=׭u .>K "X!".0.u/u/u/u0"$\["[#[!"HK-.u10L!4$uYK(XXX.\=>&z &v>"uu/#](\&&4#]&r nz (v>">"uv&>B(vu&vsK5v>9Y Xz &v>"u ,(#44%stdint.htnt_tuple.hctype.h @/Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h ,@+uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h  A6= .uYhuuYK . /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_buf.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.h A*1=Ku&gK0uv1=gugK1/Jgu<JK11󻻟KuBgg1󻻟KuHgg .uKgK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_ping.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h  A4uu$ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_insert.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h A8[uסgi$x /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_update.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.htnt_update.h A/vuuL".g.g.u.Y.uuYuY=ug%K.3Y.#v/ㄡgi!/$ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_delete.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h A7[uסgi$ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_call.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h A9&!u˓*( /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_select.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h A>2/4Ku׻!Yu/F4"H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h DA.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h A2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> w>?w?BwBzvz{w{|w|wvwwwvwww< v< = w= > w> A wA v w w w ; v; < w< = w= @ w@ v w w w vwwwvwwwovopwpqwqtwtvwwwvwwwXvXYwYZwZ]w]vwwwvwww v  w  w w7v78w89w9<w<SvSTwTUwUXwX@v@AwABwBEwEHvHIwIJwJMwMvwwwvwwwv w  w  w %v%&w&'w'*w*EvEFwFGwGJwJvwwwvwwwvwwwvwww\v\]w]^w^awavwww<v<=wwwvwww^v^_w_`w`cwcvwwwvwwwvww w vwwwvwwwvwww v  w  w wvwwwrvrswstwtwwwvwwwvwwwvwwwvwwwvwww,v,-w-.w.1w1\v\]w]^w^awavww w _ v_ ` w` a wa d wd vwwwvwwwvwwwvwwwvwww v  w  w wvwwwpvpqwqrwruwuvwwwmvmnwnoworwrvwww*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvwwwvwwwuvuvwvwwwzwzvwww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  www|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwvwwwPvPQwQRwRUwUvwwwvwwwvwww v  w  w w:v:;w;<w<?w?vwwwvwwwvwwwYvYZwwwvwwwvwwwvwwwvww w RvRSwSTwTWwWvwwwvwwwvwww9v9:w:;w;>w>=v=>wwwvwwwdvdewwwBvBCwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vwC_bc    9= y .symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N (@( V@^o@(ko(@(pz@@ @ @@ ` @` p"@" /A/ /A/V*ZAZT``A``|A|aaaaaaH@a@X a 0@)5l CPDO0$Z@Je!ABsM % (l@@<@`@(@@@(@ @ @ @ @ ` @ "@/A/AZA``A|Aaaaaaa@aa !" a #@. 0#@A p#@Wafa #@a #@ f$@Y $@l +%@E p%@ P'@ )@ +@^ :.@/# i/@E0 2@> S4@zK 7@X :@e Q;@y <@ {B@ bF@ vL@} T@aX Y@ [@3  9\@m ^@0 `@B e@T Ig@d i@iw lj@  @t@ u@ y@n B}@W @ @6 @ u@ P@ ۍ@' l@X7 ď@I @[ ;@m @@ @ @ t@ B@ ߦ@ @ @  @$ @p1 @9> @YL @W[ m@0q @9 ַ@J @,a a @Q 1@ @  @Q @s _@* z@'4 @*? @K {@*V @te @0p I@ @[ L@<  @a @ ,@} @# vAO9 >AfL A!a >Au A* rA A* A 'A* AQ 5A A! Ai/ A> A0T  Ab Ar} A Aj A A F!A. #A ? &AR 'Ae -Ajt|AaaHaaaaa /A @=  Z@  AZ  A(  A)> P b u   I@) @a  3@L  A  @   sA   A63  A>  $.AJ  e,AU[  @Mg ~   Y@  QA   A  q@  _@x a /A   &@#  r@, ? Q e  DA$t  L@  :@   @s  A  @  A   @  A9   Ae'  b@7  A F  @&P c  {@#q  @$   @    ѻ@& a @a  @  @ (  ]@t4  q@tD  DAEV  @kd s  '@  h@  a@P  )@  /A  @   ,@  Ay  L@ r@p @G!!@A /AQe~ hA; A0 ;@$`ap @ a A$ "@ @0"@ @)- @:aF @;S AC^ @j @o @} A 6@  A AB @] hA6  A7 @K t@ Ay A0 ½@)=R <A7] w @k A$ 0Aq U@ P@+ 4@d! @ @' @_3 ACA B@Ma @q @ A9crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrytt.ctt_testtt_freett_runtt_asserttt_tnt_tuple1tt_tnt_tuple2tt_tnt_listtt_tnt_sbuftt_tnt_tuple_settt_tnt_iter1tt_tnt_iter11tt_tnt_iter2tt_tnt_iter3tt_tnt_iter4tt_tnt_marshal_pingtt_tnt_marshal_inserttt_tnt_marshal_deletett_tnt_marshal_calltt_tnt_marshal_selecttt_tnt_marshal_updatenettt_tnt_net_connecttt_tnt_net_pingtt_tnt_net_inserttt_tnt_net_updatett_tnt_net_selecttt_tnt_net_deletett_tnt_net_calltt_tnt_net_call_natt_tnt_net_replytt_tnt_lex_wstt_tnt_lex_inttt_tnt_lex_puncttt_tnt_lex_strtt_tnt_lex_idstt_tnt_lex_kttt_tnt_lex_kwtt_tnt_lex_stacktt_tnt_lex_badstr1tt_tnt_lex_badstr2tt_tnt_sql_pingtt_tnt_sql_inserttt_tnt_sql_updatett_tnt_sql_selecttt_tnt_sql_select_limittt_tnt_sql_deletett_tnt_sql_callerrcode.ctnt_io.ctnt_io_resolvetnt_io_nonblocktnt_io_connect_dotnt_io_xbufmaxtnt_io_setoptstnt_io_sendv_puttnt_net.ctnt_net_freetnt_net_readtnt_net_writetnt_net_writevtnt_net_write_requesttnt_net_recv_cbtnt_net_replytnt_net_requesttnt_error_listmsg.3723tnt_iob.ctnt_opt.ctnt_lex.ctnt_lex_poptnt_lex_tktnt_lex_errortnt_lex_nexttnt_sql.ctnt_sql_errortnt_sql_tktnt_sqltktnt_sqltkvtnt_sql_trytnt_sqltrytnt_sql_keyvaltnt_sql_kvtnt_sql_kv_selecttnt_sql_stmt_updatetnt_sql_stmttnt_sqltnt_utf8.ctnt_mem.c_tnt_realloctnt_enc.ctnt_tuple.ctnt_tuple_validatetnt_iter.ctnt_iter_inittnt_iter_field_nexttnt_iter_field_rewindtnt_iter_list_nexttnt_iter_list_rewindtnt_iter_reply_nexttnt_iter_reply_freetnt_iter_request_nexttnt_iter_request_freetnt_iter_storage_nexttnt_iter_storage_freetnt_stream.ctnt_buf.ctnt_buf_freetnt_buf_readtnt_buf_resizetnt_buf_writetnt_buf_writevtnt_buf_write_requesttnt_buf_replytnt_buf_requesttnt_ping.ctnt_insert.ctnt_update.ctnt_update_optnt_delete.ctnt_call.ctnt_select.ctnt_reply.ctnt_reply_cbtnt_request.ctnt_request_inserttnt_request_delete_1_3tnt_request_deletetnt_request_calltnt_request_selecttnt_request_updatetnt_request_cb__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finitnt_io_closetnt_strerrortnt_pingtnt_updatetnt_request_setoriginfree@@GLIBC_2.2.5recv@@GLIBC_2.2.5abort@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5tnt_opt_free_ITM_deregisterTMCloneTabledata_starttnt_utf8_freetnt_replytnt_io_connectwritev@@GLIBC_2.2.5tnt_fieldputs@@GLIBC_2.2.5tnt_update_arith_i32tnt_deletetnt_requesttnt_request_fromtnt_io_sendvsnprintf@@GLIBC_2.2.5setsockopt@@GLIBC_2.2.5tnt_tuple_set_astnt_iter_storagefcntl@@GLIBC_2.2.5tnt_inserttnt_tuple_settnt_list_free_edata_finistrlen@@GLIBC_2.2.5tnt_mem_freetnt_opt_sethtons@@GLIBC_2.2.5send@@GLIBC_2.2.5printf@@GLIBC_2.2.5tnt_reply_inittnt_enc_readtnt_errorsnprintf@@GLIBC_2.2.5tnt_io_flushtnt_iter_replytnt_querytnt_bufgettimeofday@@GLIBC_2.2.5tnt_lex_idonlytnt_update_insertmemset@@GLIBC_2.2.5tnt_calltnt_io_send_rawtnt_reply_fromtnt_flushclose@@GLIBC_2.2.5tnt_mem_alloctnt_tuple_init__libc_start_main@@GLIBC_2.2.5tnt_errnomemcmp@@GLIBC_2.2.5getsockopt@@GLIBC_2.2.5tnt_closetnt_sql_keywords__data_starttnt_fdtnt_utf8_sizeofstrcmp@@GLIBC_2.2.5tnt_connecttnt_utf8_strlentnt_update_splicetnt_utf8_next__gmon_start__tnt_lex_nameoftnt_settnt_io_sendv_rawtnt_enc_writememcpy@@GLIBC_2.14_IO_stdin_usedtnt_tupleselect@@GLIBC_2.2.5tnt_lex_inittnt_itertnt_nettnt_utf8_cmptnt_io_sendv__gcc_personality_v0@@GCC_3.3.1__libc_csu_initmalloc@@GLIBC_2.2.5strncasecmp@@GLIBC_2.2.5fflush@@GLIBC_2.2.5tnt_reply_freetnt_update_deletetnt_list_inittnt_error_codestnt_iob_init_endtnt_request_init_starttnt_lex_freerealloc@@GLIBC_2.2.5tnt_mem_realloctnt_query_is__bss_starttnt_lex_pushtnt_selecttnt_io_recvmaintnt_tuple_addtnt_iter_requesttnt_lextnt_nexttnt_stream_freetnt_opt_inittnt_update_arith_Jv_RegisterClassestnt_update_arith_i64tnt_enc_sizetnt_utf8_inittnt_iter_listtnt_request_freetnt_iob_freeconnect@@GLIBC_2.2.5tnt_rewind_ITM_registerTMCloneTablegetaddrinfo@@GLIBC_2.2.5tnt_listtnt_stream_reqidtnt_stream_initstrdup@@GLIBC_2.2.5strerror@@GLIBC_2.2.5tnt_init_Unwind_Resume@@GCC_3.0tnt_mem_inittnt_tuple_free_inittnt_mem_duptnt_iter_freetnt_list_atstrstr@@GLIBC_2.2.5tnt_io_recv_raw__ctype_b_loc@@GLIBC_2.3freeaddrinfo@@GLIBC_2.2.5tnt_utf8_chrlensocket@@GLIBC_2.2.5tnt_update_assigntarantool-1.5.1.218.g1a69fd6/test/connector_c/suite.ini0000664000000000000000000000027412231715257021075 0ustar rootroot[default] description = tarantool/box connector C config = cfg/tarantool.cfg # put disabled tests here # disabled = xlog_rpl.test # put disabled in valgrind test here #valgrind_disabled = tarantool-1.5.1.218.g1a69fd6/test/connector_c/rpl0000775000000000000000000032707412213333046017770 0ustar rootrootELF>`@@@8@&#@@@@@@@@@VV XX`X`P pp`p`@@DDPtdp}p}@p}@ttQtd/lib64/ld-linux-x86-64.so.2GNU GNUU\cv(n/`C  ,~1)GP$1@B `&F ΈET@" REF"I "#$&')*+,-./045689<>?@BDEGHJLNPQSXYZ\^`defikmnpN'*T/ld[r ezbeCK<=9 K +˪]oꖲ# ➅pb.͸ 3b9V aXN'7V 7{ *b땆&#Q : #EH#=CrR)~Z(0mj C4DN{^goR/~k|BE엀X 6ij߲aDZDoі'`e|w0x`e =+2}/AEqXlk# +EC 1+ : N mh ,@M :@  dJ@q o@$ $f@ d@@+ @J@$ z!@_ K@$% QG@B`s@Q g@ /9@& H@n b@\ )@=VTs@S ;@t .@G /0@c C@yl 5@L Ps@ *@ I@C# m@ P@  q@i 9@ `@ F@ r@i D@yw O@ "@  .1@ 9`@U I@ @@){ r9@  cp@k e@d 6@`p `` a@[ J @0@ ;@) >)@ 8@t @@# 9@&`` :@) @@_v uQ@)? J@B4 d@> @H?` O@$1 o@x6 QI@F :A@# '*@s# +@P 7@ HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|HEH}u _tH}(HEǀ>HE艐H HEHEHEH;Et }&HEUHH0H}HuU܉MHEHEHHt5HEH}NUHMHHuHHE/HE@|UHMHΉHEH}u wtH}+HEǀVHE艐HHEHE}ucqHEHPHEH9v.HEHHEHHEHHEHPHEH)HEHP(HUHEH@HH)HHEHEm}}HEUHH0H}HuHUHEHHuHUHuHEHt HEHH;EsHEǀHHEHHEHHEHH9wPHEHHEHH HUHEHHHEHHEHHEHHElHEHHEHHEHHEH}u H1HEHUHHEHHUHMHHpHEUHH0H}HuUEEHHHHEHHPEHHHHEHHHMHHMHHHHHEHEHHHHEHH@HHEHEE;EoUHH@H}HuЉUHEHHuUHuHEعHvHEEEHHHHEHH@HEEE;E|HEHH;EsHEǀHHEHHEHHEHH9wUHMHEHHsHEdHEHHEHHEعHHEH}u H)HEHǀUHMHEHH HEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|HEH}u tH}(HEǀHE艐H HEHEHEH;Et }&HEUHHPH}HuHUHEHHuHUHuHEȹHHEHEHEHEHHEHHEHH9w[HEHHEHH4HEHUH HEHHHEHHEHHEHHELHEHHEHHH)HHEHEHUHH)HHEH}t=HEHHEHH4HEHUH HEHH/HEHEHEHǀHEHHEHHEȹHHEH}(HEȉHEǀHgHUHEHHEHH;Er:HEHHUHMHHUHHyHEHUHHE HEH)E7ÐUHH H}HEH@HHEHEHzHEHHzHEHHhHEHHEH@HH HEH@HUHH0H}HuHUHEH@HHEHUHMHEHH;UHH0H}HuHUHEH@HHEHUHMHEHHHEH}tHE@PPHEPPHEUHH0H}HuUHEH@HHEUHMHEHHeHEH}tHE@PPHEPPHEUHHH}HuHEPhHEHHpHEHH{UHH0H}HuHUHEH@HHEHUHMHEHH"UHHH}HuHE@Pu&HE@PPHEPPHUHE4@H!UHHH}HuHUHE4@H*UHH H}H}EHEHHEH}u HHEHPHHEH@HHu}t HEHHEH@HH9HEH@ 3@HEH@(5@HEH@0X5@HEH@8HEH@3@HEH@N4@HEH@4@HEH@@L3@HEH@HHEHE@|HEHHEUHHH(H`HhLpLxt )E)M)U)])e)m)u)}$H(H@HHHDž0Dž40HEH8HPH@$HHH0HUHHHHuHUHH H}HEH@HHEHEHpPHEH@HHHEH@@HHE@XHH}HIH]uHEǀHEHHhHEH@`HHE@pHHuHIȹH uHEǀFHEHHuHEǀ%HE@uHEǀUHH H}HEH@HHEHE@xt HEHEHEPHEHHEHH]HEHEtUHH H}HEH@HHEHEHUHH H}HEH@HHEHEHUHH}HEH@HHEHE@|]UHH}HEH@HHEHE]UHSH(H}HEH@HHEHE苀uAHE苘HE苀;AH|@`<`HE苀HHH`H@H([]UHH}HEH@HHEHE]UHH0H}HuHUHMLEHEHUHP HEHUHP(HEHUHP0HEHUHPHEH@HEH@HEHH}tAHEHHHEHHEHHuHEHHUH]UHHH}HEHHtHEHHÐUHHH}HExH HE@;HE@p@HE@X@HEH@HEH@UHHH}HEHHtHEHHUHH0H}uHU؃} EH}@HEHHtHEHHKHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHHHEHHEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHHHEHH4HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH HEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH0HEHHXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP@HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPPVHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP`HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPhYHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPpÐUHH}H-Y HEH}t HEHY HE]UHHH}HX HUHֿUHHH}HuHX HMHUHHUHH H}HEHHEHEHHHEH}uHEHPHMHEHHlHEUHHH}HSX HUHÐUHHH}H}tHEHHELHEH}u0HEHHE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HH< HEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHxHEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@A@HEH@C@HEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@rD@HEH@D@HEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHnHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHH!UHH H}HuHEH'HEH}uYHEHEH@rE@HEH@HEH@ E@HEH(HEHEHUHHEHHxHEUHH H}HEH(HEHEHH HEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@F@HEH@HEH@ 'G@HEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHHEHHHEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHH=UHH H}HuHEHHEH}uYHEHEH@G@HEH@HEH@ [H@HEH(HEHEHUHHEHHHEUHHH}HEH@ HtHEH@ HUHHE@t HEHUHHH}HEH@HUHUHHH}HE@HEH@HtHEH@HUHUHH0H}HuUH}EH}u%HUHEHHHEH}u'HHEHpHE@@;EuHE(HEH0u݃}t HEHÐUHH}uHE@TEHEUPTE]UHHH}H}tHEXHHE@XHEH}u$HEXHHEHEUHHH}HEH@@HtHEH@@HUHHEt HEH%ÐUHHH}HE0HUHHH}HEH@HtHEH@HHEHHv$UHH`H}HuHUHuHMHE HHu EĉEHEHH$HE@(HEH@UHEPHE@UHEHE=u cHEHpHMHEHHu 9mHE@toEH8HHEHPHEH@Hu UHEHpHMHEHHuHEH@HHE t6HEt+HEt HEtHEt z}u jHEHp(HMHEHHu @m}u ,EH:HEH}u UHuHMHEHHuHEHHEHEEE|HEE܋EU);EHEE܃HEHƿ HEH}t[HEHPHEHH#E܃HEEUЃEEHE@(;EtHEH%HEHH!HEHHUHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHHEHHEHHEHHEUHHPH}HuHUHMH} w$H}t HH+UHEHHEHEHE@H H;Ev&H}tHE@H+EHP HEHEHEHEHEHEHEHUHEȾN@HEH}t HUHEHEHaÐUHHH}HExHjUHHH}HE@tJw ttNr4=HEH(H{HEH(HfHEH(HQHEH@0HtHEH@0HHEH@0HEH@HuHEH0H,cHEH(HHEH@HHtHEH@HHLHEH@HHEH@XHtHEH@XH#HEH@XHEH@pHtHEH@pHHEH@pHEHHtHEHHHEHUHH}HuHUHEHUHHEHUHP]UHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEH !UHEHH(HEHHHuHEHHE@hHE@hHHHHHEHPpHEH@pHu&HEH(H HEHxHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHUHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEHM!UHEHH(HEHHHuHEHHE@hHE@hHHHCHHEHPpHEH@pHu&HEH(HLHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEH'UHH0H}HuHUHEHp HMHEHHu ~HE@EEHHEH}u QUHuHMHEHHuHEH!UHEHH(HEHH.HuHEHZHE@hHE@hHHHHHEHPpHEH@pHu&HEH(HHEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHiUHH@H}HuHUHEHp HMHEкHHu HE؋@EEHaHEH}tUHuHMHEHHYHEHP8HEHHf E}<}2EHcHEHH$HEHHUHE؉P,HE؋@8HHHEHP0HEH@0HHE؋@8‹EHcHEHHEH@0HHHEHP0HE؋@8HHE؋P8E)EEUHcHU؋R8HHUH4HUHJ@HHHu!HEH@0HHEH@06HE@hHE؋@hHHHHHEHPpHEH@pHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pH HUH$HHEH@pHP HE؋@,HBHEH@pHP0HEH@0HHEH@pHP0HE؋@8HBHEH@pHP@HEH@HHHEH@pHP@HEH@PHBHEH2HEH@H H}t HEH\UHH`H}HuHUHEHp HMHEHHu lHE@EEHTHEH}UHuHMHEHHHEEEHEH0H?EUHEHЋEEEBEUEHHEHHEHHEԃ}UԋEEEE;ErHEH0HHEȋUMHEHHEHHHt/EEEE;EGHEH/HEH0HtH}t HEHH臿UHH`H}HuHUHEHp HMHEHHu THE@`HEH@XHE@EEHHEH}UHuHMHEHHqHEEEEHUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHHøHEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾa@HEH}t HUHEHEHKÐUHH}HuHEHExHEƒHEHEHx7HEHEH ЉHEUHEHxMHEHEH HEH ЉHEHEHxcHEHEH HEH HEH ЉHEHEHxsHEHEH HEH HEH HEH ЉHE]UHH}u}vs}?vT}v5}vEȀHEHEEȀHEHEEȀHEHEEȀHEHEEƒHEHE]UH}}w5}?w%}w}w]ÐUHHH}HE H蒴UHHH}HEH@HtHEH@HQHEH@HEHEH@HE@t HEHUHH@H}HuЉUH}EH}uO 9HEH}u =HEغ HϳHE@}u HE HEH@Hu HEH@ẺEHEHPEHH‹EHHEHEH@HUHH޳HEH}u}t HEH+HE؋PHE؉HMHEHH`HEHPHEH‹ẺHYH}t)UHEHHEHHHEHHEHHHEHUHPHEHUHPHEUHH HH`HhLpLxt )E)M)U)])e)m)u)}HHuEHHu Hu HDžDž0HEH HPH(HHH虲HHHHHH% t HHjHH<%t kHHHHl/l*t%dsuHHHHEHUHHEHHE@HHHEHHE@PHEPHEÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1IHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHHPingInsertDeleteUpdateSelectCallUnknownusage %s: host port limit %s lsn: %lu, time: %f, len: %d parsing failedER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not exist okfailmemory allocation failedsystem errorbuffer is too bigbad buffer sizegethostbyname(2) failedoperation timeoutbad argument%s (errno: %d);@d<@<@&=@=@>@X>@>@?@X?@?@@@;tmܞ@0ˡPpڢ <  HhX۪Ϋz*0)PypưxܵL0P޶p5e00X%x" @ ̼`  :  B@ k` m :  h@ `  6 j@ `  7 @ e`   |T0xPp.hu+8`hE,(PHh:uW{8X^PzRx X*zRx dAC _ zPLRx@ ,$8HT@AC L7 PCAC ~ s9AC t $c@AC  :0AC + $Jq@AC  <3AC n \AC Y $D@AC  AC  $7@AC J AC ~  #AC  ,AC  L=AC x lsAC n AC  ѧPAC K MAC H .AC   GAC B ,AC  LƬAC  lĮpAC k 9AC t -YAC T fWAC R 0AC k  9AC t ,ƯJAC E L,AC g lAC  $T@AC  AC  tAC o &AC a &AC a 4AC X T AC [ $tAC E d AC [ dAC  )AC d  ]AC X I)AC d <RAC  \+AC f |#AC ^ )AC d _AC Z B#AC ^ H}AC x AC  <ROAC J \yAC t |ڻfAC a  !AC \ !yAC t zAC | ۼ*AC e AC  <NAC | \*AC e |AC  "AC | *AC e AC  CAC ~  AC Z < 7AC r \ /AC  | $AC _  qAC l  BAC }  $AC _  $;AC v $ ? @AC  D "jAC e $, lƏ@AC   $AC _  AC   )AC d  AC   4AC  , AC  L p AC  $4 ]Տ@AC  $\ @AC   aUAC P  jAC e $ @AC  $ AC  D UAC  d KAC F  $AC _  dAC _  DAC  $  @AC  $ ;9@AC  4 AC  T uAC  t 7$AC _  ;xAC s $| kG@AC f  AC  $ Jf@X$ = ?z ' h<[  ( ,w,d  )r       F h @@ P@ Ts@X```o`@@@ X X`@h@ o@oo@p`@@@@@@@@@@&@6@F@V@f@v@@@@@@@@@@@&@6@F@V@s@s@s@t@;t@Mt@dt@xt@t@t@t@t@u@u@-u@@u@iu@tu@|u@u@u@u@u@u@u@u@u@v@v@v@(v@6v@Av@Ov@Zv@hv@sv@v@v@v@v@v@v@v@v@v@v@v@ w@w@w@*w@3w@Hw@|w@w@w@w@w@w@w@w@w@w@w@w@w@x@x@x@$x@0x@9x@Ex@Nx@Zx@cx@xx@x@x@x@x@+y@8y@|y@y@y@y@y@y@y@z@Gz@Sz@\z@pz@z@z@z@{@ {@0{@P{@\{@j{@|{@{@{@{@{@|@|@@|@J|@K|@\|@x|@{|@|@|@|@|@|@|@|@ @GCC: (Debian 4.7.3-4) 4.7.3,L@w , @,"@,H(L3@,O8<:@,:$;@=,=d@@,?`A@,N@J@,vVK@,ZO@,fb@,he@ s #zL@@8[intR`VimyV`0FK1M3T78 / 0# len1# X2#_5@ ns6#  7#:Z ns;#L> ns?#  @#C nsD#  E#H  I#rL  nsM# N# O# P#  #N $# %# &-# }'?#4i ptr5i# 48 9# ?:# };?# Ne+ h-w# 4.-#m( & h '# t ( #( + h ,@# t - #( 0D h 1Z# t 2 #< 5 op 6# 7# = 8# ' 9#  :# ;#  pCH > h ?# t @ # ops A#( q B#0 opv C#8 opc D#@D @ Gt h H#  I# , J# > K#  L# t M #  P h Q# l Ro# H Yj Z [del \ ]} ^t _x U>  V#  W-# h X# r `# vc a?#h v b>#p 0 # op $# X %#  &# Q '#  (o# ? )#(X &Y } '?#  (y#  )#  *#  +#  ,#( S -#0 H .1#8  /C#@ 0w#H  1#P X 2#Tss-Ys>?ss-?sD?s?1siCs7 #tzm0 - tu .i#  /# ^ 0# 1# 6 2#  3?#  4#( A l B# tu Ci# d D#o~ OA s Ps# r Q#$( \f s ]s# t ^ #k8 i s js# r kD#q s  t X  f- A zS  {I# z |# } }?#  i #  { #  { # #(?c c S { c o  ! #5T  E 0( 1# lsn2# tm3( # len4# 5#k 8e tag9# /:# op;# 0! hdr" # row#/ # net$s#('L@@ 'l94?@@`p 4?|F4e |s:~sn<~iF|I?L@w@srKp @k >S#Zint`0@R`[Vin#$c#%c#&5# x  =     d O      5   (  6  D  R  t      '  j v 6  L X! " # $ )% & ' ( ) * + , - S. _/ 0 1 C2 ` 3 4 5 q6 7 B8 9 : u+ \9 Z  ` # b @"@,8[intR`VD i iim   w# < !#Ve+ h-# 4.-#`0FK1M3T78 / 03# len13# X23#_5 ns63#  73#: ns;3#L> ns?3#  @3#C nsD3#  E3#H-  I3#rLq nsM3# N3# O3# P3#  #  $3# %#  &-# } '?# 4 ptr 5#q4 8  9# ? :3# } ;?#  $% ? m( &d h '# t (q#( + h ,# t -q#( 0 h 1# t 2q#< 5 op 6# 73# = 8# ' 93#  :3# ;# pCH >{ h ?# t @q# ops A#( q B3#0 opv C{#8 opc D3#@ @ G h H#  I# , J3# > K#  L3# t Mq#  P h Q-# l R#H YNj Z? [ddel \ ]} ^ _x U  V#  W-# h XI# r `# vc a?#h v b#p 0 # op $3# X %3#  &3# Q '#  (# ? )3#(X & } '?#  (#  )#  *$#  +D#  ,e#( S -#0 H .#8  /#@ 0#H  13#P X 23#T   -    ?   N  D  -* ?_  _J ?  k ?    x 0h 1# X 2?# . 3# } 4# # 5#0 ] 6#@  7#H 8#P T 9?#X 2 :#`  ;#h  ?#| ?# @# Q A, # B?#09 13# lsn2># tm39 # len43# 53#k 8v tag9(# /:># op;(# 0! hdr" # row#@ # net$#( 0@;@ s0Xsr1 hv * :;@t@ I s:Xbuf:P:Hsn;I hu  @?t@J @ s@Hr@@srB hsnCI ` KIP bJ @z!@ sbX d?lQ y8!@srv ` ?z!@["@@{ sHlsn>@sr hsnI `B 3\ ["@"@ sXsr h "@"@ shnet`: . t|@3| #N "@K3@8[intR`VD i ii(Tmi   w# < !#6i @% E%# 5 pV KVe+p h-# 4.-#*! ] 8M ?  -  M@ # ##  p G+  V # T 7# M# 7 h#K 1M 3T 7gI +4k m   ! )+ ,` ./i 23u : ;< ;  @ w3 `\V g  h B# Fx p$ 0 7 9?# :?#] ;?#' <?# I =p# > #A ?#  @#(x x 0 1# X 2?# . 3# } 4# # 5#0 ] 6#@  7#H 8#P T 9?#X 2 :#`  ;#h  ?#| ?# @# Q A}# B?#I9}"@z#@`9VX :PX:ML?hL}z#@$@sLXsetL?T M?l ^}$@'@ Ws^}X^}X^?}ab}\$@n'@nWPoHq w~opt?~lenp~fdsz5}ret}?.%@U%@]{?Db{?@&@&@~ }'@K(@sXopt?Tmin?Pmax?lavgTh}K(@>)@ sXopt?lQ &)@}>)@)@@ sXXԹPX?L}lout)@ )@'*@ sh'*@*@ sXrcht*@+@`z sXbufP-Hall?Doff-h*@+@!r`" +@,@ #sX#iovP$??L#all?H%-h+@,@!r`"y 7,@6.@ j #s7X#buf7P$7-H!rDh& M6.@.@ #sMX#iovMP$?M?L!iN?l"X.@/0@B #sXH#iovX@$?X?%\-h!i]?d!rhX" q/0@.1@@ #sqX#bufqP$q-H#allq?D!offs-hN0@1@!ru`'.1@K3@#s#buf$-!lv-X!rv-P!off-h%-`1@D3@!topH# L3@<:@ 8[intR`VD i iim   w# < !#Vx(  pT T# T# ># #O` 0F 3T /  0j# len 1j# X 2j#_ 5 ns 6j#  7j# : ns ;j#L > ns ?j#  @j# C> ns Dj#  Ej# HY  Ij#r L ns Mj# Nj#  Oj# Pj#  #  $j# %#  &-# } '?# 4 ptr 5#4 8:  9:# ? :j# } ;?# e +i h -# 4 .-# $tz m( & h '# t (#( + h ,# t -#( 0 h 1# t 2#< 5c op 6_# 7j# = 8c# ' 9j#  :j# ;# s pCH > h ?# t @# ops A#( q Bj#0 opv C#8 opc Dj#@ @ G3 h H>#  Ic# , Jj# > K#  Lj# t M#  PX h QY# l R#H Yj Z [del \ ]} ^3 _sx U  V#  W-# h Xu# r `X# vc a?#h v b#p@p!t 0#n op$j# X%j# &j# Q '# (# ?)j#(X&# }'?# (C# )c# *# +# ,#( S-#0 H.#8 / #@ 0#H 1j#P X2j#T ==-n# c=?I ~=~i =- ?= ?=~ ?= = x0 1# X2?# . 3# } 4# # 5#0 ] 6#@  7#H 8#P T 9?#X 2 :#`  ;#h  ?#| ? # @ # Q A # B?# s   #& #(L3@3@  s(=Xsn) h k33@3@`  s3=Xbuf3P3-Hsn4 h :3@N4@ w s:=Xbuf:P:-Hsn; hrc<`CN4@4@  sC=XiovCP?C?LsnD hrcE`|L4@4@  sL=hrL~`Q4@5@ x sQ=XbufQPQHsnR h]W?5@X5@@  sW=hrW`_?X5@5@  s_=hr_~`o=5@6@ B so=X p?lsn `?6@7@`  s=~opt?~sn ~T~+?7@8@  s=Xsn h?8@ 9@ #s=Xsnˮ h 9@/9@ _s=Xsnޮ h4/9@U9@ s=Xsn h ?U9@r9@@s=Xsn h!M  r9@9@""s=X#sn h$P$9@:@"s$=H#sn% X%9@9@#msg' `  p!6?:@<:@`"s6=X#sn7 h G  p & `D# <:@#;@ 8[intR`VimyVe+ h-w# 4.-# !  w - "  : w ? 8$ buf%# off&-# top'-# (-# tx)# txv*#( ptr+w#0 *?<:@:@iob*h*-`tx+Xtxv,Pptr,wH:?:@#;@ iob?h0# $;@a@@[intR`VD ^ ^   l#< !w#V I#I#>## !b #   5  T      E  x0 1#X24#. 3#} 4# # 5#0] 6#@ 7#H 8#PT 94#X2 :#` ;#h <4#p M .` x  e  q   J   W  l  +$;@;@ opt+hb i6;@;@ opt6h v=4;@a@@@' opt=XI= T='Htvp?-h #d@@]A@8[intR`VV!ww- (wd@@@@ }(X ptr)wh u/w@@@@2 /-h 3w@@@@`u ptr3wh 3-` i7y@@:A@ sz7yX len8-h szp9y`@:A@]A@  ptr@wh%  ` #'`A@>J@O4[intR`VemuV`0B3P / 0# len1# X2#_5& ns6#  7#:@ ns;#L>h ns?#  @#C nsD#  E#H  I#rL nsM# N# O# P#  #4 $# %# &)# }';#4O ptr5O#48 9# ?:# };;# 4e+ h-s# 4.)#m( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2#< 5 op 6# 7# = 8# ' 9#  :# ;#  lCH > h ?h# t @# ops A#( q B#0 opv C#8 opc D#@* @ GZ h H#  I# , J# > K#  L# t M#  P h Q# l RU# H Yj Z [del \ ]} ^Z _x U$  V#  W)# h X# r `# vc a;#h v b$#p 0 # op $# X %#  &# Q '#  (U# ? )#(X &? } ';#  (_#  )#  *#  +#  ,#( S -#0 H .#8  /)#@ 0s#H  1#P X 2#TYY)?Y$;eYY);Y*;Y;YO)Y #Zzm0 - tu .O#  /# ^ 0# 1# 6 2#  3;#  4#( A l B# tu CO# d D#U~ O' s PY# r Q#$( \L s ]Y# t ^#k8 iq s jY# r k*#q s  Z X  L- ' z9  {/# z |q# } };#  O #  a #  a # #(;I I 9 a I U },I `A@A@ i,I h:;A@C@ i:I Xip; hZbC@C@@ ibI Xipc hyI C@rD@e iyI XtyOPip h;rD@D@ iI Xil hD@D@` iI Xil hI D@rE@1 iI XlPil h;rE@E@ } iI Xir} hrc;dLE@F@ iI Xir} hkI F@F@ iI XsYPir} h;F@'G@@V iI XirV hrc;d'G@QG@ iI XirV h~I QG@G@ iI XsYPirV h ;G@[H@`4 i I Xis 4 hrc;d'[H@H@x iI Xis4 h $+I H@I@  i+I Xs+YPis34 h!AI@QI@ iAI h U;QI@pI@.iUI h!dpI@I@@_idI h"vI I@>J@ivI XtvOP#vL$ x;l #@J@K@84[intR`VemuV`0B3P / 0# len1# X2#_5& ns6#  7#:@ ns;#L>h ns?#  @#C nsD#  E#H  I#rL nsM# N# O# P#  #4 $# %# &)# }';#4O ptr5O#48 9# ?:# };;# 4e+ h-s# 4.)#m( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2#< 5 op 6# 7# = 8# ' 9#  :# ;#  lCH > h ?h# t @# ops A#( q B#0 opv C#8 opc D#@* @ GZ h H#  I# , J# > K#  L# t M#  P h Q# l RU# H Yj Z [del \ ]} ^Z _x U$  V#  W)# h X# r `# vc a;#h v b$#p 0 # op $# X %#  &# Q '#  (U# ? )#(X &? } ';#  (_#  )#  *#  +#  ,#( S -#0 H .#8  /)#@ 0s#H  1#P X 2#TYY)?Y$;eYY);Y*;Y;YO)YM6@J@dJ@~s6YXX6Told8lFYdJ@J@`sFYh^\J@K@s\YhqB#K@O@94[intR`VemuV3P #$#%#&)#}';#4 ptr5#48N9N#?:#};;#  /0# len1#X2#p!  s  0# op$#X%# &#Q '#(#?)#( /K@] ns?# @#C nsD# E#H I#rL nsM#N#O#P#  #)$#%#&)#}';#4D ptr5D#489#?:#};;# )e+h-s#4.)# $  s m( & h '# t (#( +% h ,# t -#( 0J h 15# t 2#< 5 op 6# 7#= 8#' 9# :# ;#  lCH > h ?]# t @# ops A#(q B#0 opv C#8 opc D#@J @ Gz h H# I#, J# > K# L# t M#  P h Q# l RJ#H Yj Z [del \% ]} ^z _x UD V# W)# h X# r `# vc a;#h v bD#p2O@O@yr2yh$?O@uQ@`r?yhwuQ@Q@rwyhbufw`w)Xm};Q@\S@ cr}yXrcv}Pptr}sHlbuf`;\S@U@ryXrcvPptrsHlbuf`;U@V@7ryXrcvðPptrsHDZlbufȀ` ;V@Y@@ ryHrcv@ptrslbuf`Q Y@;\;Y@[@ ryrcvptrs\buf PQ =g[@i&l?&Loff'h`j,d,H-`tu6DZ@Z@6/0;DCE;[@9`@! rEyrcvEptrEsK\bufLPQ _@iRlRLksShbDpp`N\@\@ 6UV;H]@e^@oprz; :;9`@a@`!p ryhrcv`ptrsXhdrp PKa@a@! ptr XbufP!Hsrchoff `s ;a@b@ " rybuf!)off hdrp {)Xptr @rc;db@b@5p h)"s lO^#b@e@H[intR`VnnV3E&0b@d@"buf&|h L&` Kd@Ne@"!bufKhh LKd \0Ne@e@@# L\l#e@r@78[intR`VVx( p  T# T# >w# w#f3T 0xwv nRm # $# %y# &-# }'?# 4ptr5#x 48 9# ?:# };?# 0e@e@#Jt0h;e@$f@$yt;hY$f@g@`$tYHY@Y [?lg?hh-`EjyXg@cm@$et}fmt}~p~Ei@j@len?~sy~j@j@sy~j@ k@i?~5k@k@ull}k@ l@!ul8}Al@l@Elldž}l@+m@li}[?cm@m@ %bufH-@K-hdm@m@6\?`m@n@%ctXbufP-H ?lQ n@'n@o@%t'Xbuf'P'-Hnum'D )?lQ 7o@Do@o@@&lDh_Oo@cp@&YlOX iRl4ccp@q@'lc~k~! ptrn~"Sq@r@`'lXtP ?lEy`% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I .? : ; ' I@B 4: ; I 4: ; I  % $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?  % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 ' I I I!I/  : ;  : ; I : ; I'  : ; ( .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I .? : ; ' I@B  : ; .? : ; ' @B .? : ; ' @B % : ; I$ > $ >   I&I : ;  : ; I8  : ;  I !I/  : ; (  : ;  : ; : ;I8 ' II : ; I8 .: ; ' I@B : ; I 4: ; I : ; I  4: ; I  U  : ; .? : ; ' I@B  : ;  .? : ; ' @B !4: ;I ".? : ;' I@B #: ;I $: ;I %4: ;I &.: ;' @B '.? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 I !I/ : ; I8 ' II : ;  : ; I : ; I'  : ; (  : ; : ;I8 .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I .? : ; ' I@B 4: ; I .? : ; ' @B  .? : ; ' I@B !.? : ;' I@B ": ;I #4: ;I $.? : ;' I@B % &4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 ' I I : ; I8 .? : ; ' I@B : ; I : ; I .? : ; ' @B % $ > $ > : ; I  I : ;  : ; I8  : ;  ( .? : ; ' @B  : ; I .? : ; ' I@B : ; I 4: ; I % : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I% $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B V /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantoolrpl.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htnt_opt.htnt_log.htnt_rpl.h L@&u,uuuuuvY2'1/GMGLHK15 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.c /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_rpl.cstddef.htypes.htypes.htime.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_reply.htnt_stream.htnt_opt.htnt_iob.htnt_net.htnt_log.htnt_rpl.h @/ʼ1=g2v"wwu.uKsf gY.KKvvuuu .ɻ .7  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/netinet/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_io.cstddef.htypes.htypes.htime.hselect.huio.hsocket.hsockaddr.hin.hstdint.hnetdb.htnt_opt.htnt_iob.hsocket_type.htnt_net.h "@:YY/wv0gvguvY2""ggg)?Y=i'V0=;vKv/pX vX=h4fw=yggY!uguu/$Y0u.uw&&utC?#Y2/vhho?$=1׮0u+uK2g>.0uK2YZ50ug0Kg0YxJofK2=׼"-h+uK10,KW$0J2/J׼"Yh+uYK2g>.0uK2="5#Ku5+uד%hZ /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_net.cstddef.htypes.htypes.htime.hstdarg.hstdio.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_opt.htnt_iob.htnt_net.h L3@'!1=g1=uK1/uK11=g1uK1 .uKgK .2&"--t .IK/סI8vvvY .)uY . . .u ..ɻIgI,v tn /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iob.cstddef.htypes.htypes.huio.htnt_iob.h <:@,uYuvY2o' /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_opt.ctypes.htime.htnt_opt.htnt_net.h $;@+Y220h$,$Z$Z$Z$Z$"Z$"Z$"Z$Z$"Z$"0$0Zt( Y; /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_mem.cstddef.htnt_mem.h d@@'uK0K0g0=uuK0K /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h `A@+uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h @J@6= .uYhuuYK .H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h K@.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h O@2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> stdint.htnt_tuple.hctype.h e@/Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_ctnt_header_deletefld_ptr_prevtnt_iter_replyTNT_ITER_LISTTNT_ITER_REQUESTargctnt_tuplefld_indexcrc32_datatnt_requestlimittnt_iter_fieldTNT_ITER_OKtnt_request_delete_1_3tuplesuint32_ttnt_header_updateGNU C 4.7.3cookiefld_sizecountTNT_OPT_RECV_BUFlong long unsigned inttnt_request_insertdel_1_3read_replycrc32_hdrorigin_sizeTNT_OPT_RECV_CBtnt_log_header_v11tnt_iterTNT_ITER_FIELDTNT_OPT_PORTtnt_stream_rpltnt_streamcodeTNT_OPT_RECV_CB_ARGtnt_iter_storageTNT_OPT_TMOUT_RECVread_tupleread_requestuint8_tiov_basetnt_iter_statusTNT_ITER_REPLYtnt_headertnt_request_deletelong long inttnt_list_ptrTNT_OPT_TMOUT_CONNECTtnt_header_delete_1_3proc_enctnt_iter_typetnt_replyTNT_OPT_SEND_BUFsize_enc_lentnt_listsize_encargvuint16_tTNT_OPT_SEND_CBtu_indexTNT_ITER_STORAGEtnt_iter_requestshort inttnt_log_row_v11TNT_OPT_TMOUT_SENDuint64_tfld_esizewrcntproc_len__ssize_tTNT_OPT_SEND_CB_ARGTNT_OPT_SEND_CBVtnt_request_callTNT_ITER_FAILproc_enc_lenmainproctnt_request_updatesizetypetnt_header_insertops_size/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/rpl.ctnt_iter_listopnameunsigned chartnt_opt_typecardinalityfld_ptrtnt_request_selectTNT_OPT_HOSTNAMEiov_lentnt_request_update_opshort unsigned intiovecdoubletnt_header_selecttnt_header_callfld_dataER_WAL_IOER_NO_SUCH_SPACEtnt_error_codes_enumER_ARG_TYPEER_SECONDARYER_SPACE_EXISTSER_SPACE_DISABLEDER_PROC_RETER_TUPLE_NOT_FOUNDER_FIBER_STACKER_UNUSED30ER_UNUSEDER_UNUSED32ER_UNUSED33ER_MEMORY_ISSUEER_RESERVED20ER_RESERVED21ER_RESERVED22errstrER_TUPLE_FOUNDER_NO_SUCH_INDEXER_TUPLE_IS_ROerrdescER_UNUSED31ER_FIELD_TYPEerrcode_recordER_UNUSED34ER_UNUSED35ER_UNUSED36ER_UNUSED37ER_RESERVED14ER_NO_SUCH_PROCER_UNUSED46ER_KEY_PART_COUNTER_NO_SUCH_FIELDER_TUPLE_IS_TOO_LONGtnt_error_codes_enum_MAXER_UNSUPPORTEDER_UNUSED27ER_SPLICEER_INJECTIONER_KEY_FIELD_TYPE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errcode.cER_ILLEGAL_PARAMSER_UNUSED8tnt_error_codesER_UNUSED28ER_UNUSED29ER_UNKNOWN_UPDATE_OPER_RESERVED23errflagsER_INDEX_TYPEER_EXACT_MATCHER_UNUSED24ER_UNUSED25ER_RESERVED11ER_RESERVED12ER_RESERVED13ER_NONMASTERER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19ER_PROC_LUATNT_EBADVALTNT_EOKtnt_rpl_attachtnt_rpl_closetnt_stream_netsend_cb_argrbufTNT_LAST/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/tnt_rpl.crecv_cb_argtnt_rpl_recv_cbtnt_rpl_versionTNT_ESIZEsend_bufsend_cbTNT_EMEMORYTNT_ESYSTEMtmout_recvtnt_iob_txv_tTNT_EBIG__suseconds_ttnt_rpltnt_request_ttimevalallocatedtv_sectnt_rpl_freeTNT_ERESOLVEhdr_iprototnt_rpl_requestsend_cbvrecv_buftmout_sendtmout_connecttv_usec__time_ttnt_errorTNT_ETMOUT/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrplconnectedtnt_iobTNT_EFAILtnt_rpl_openhostnametnt_iob_tx_terrno_tnt_optsbufai_flagsIPPROTO_MTPIPPROTO_PIMaddrinfoSOCK_NONBLOCKIPPROTO_ENCAPIPPROTO_IGMPin_addr_tIPPROTO_RSVPIPPROTO_UDPtnt_io_sendtnt_io_recv_rawtnt_io_connect_doIPPROTO_NONEai_family/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnettmoutSOCK_STREAMIPPROTO_DCCPsockaddr_insin_zeroIPPROTO_COMPSOCK_RDMfd_setai_socktypeIPPROTO_ESPIPPROTO_ICMPV6IPPROTO_FRAGMENTsin_addrs_addrSOCK_CLOEXECtnt_io_sendv_puttnt_io_sendv_rawIPPROTO_TPIPPROTO_IPV6sin_familypassd_usectnt_io_connectin_port_tIPPROTO_TCPai_protocolIPPROTO_MAXSOCK_DCCPai_addrlensin_port__socket_typeIPPROTO_PUPIPPROTO_SCTPIPPROTO_RAWcurrIPPROTO_IDP__fd_maskai_addraddr_infosa_familyai_nexttnt_io_flushSOCK_PACKETtmout_usecmicrotnt_io_setoptsIPPROTO_HOPOPTSIPPROTO_UDPLITE__socklen_tIPPROTO_EGPsockaddrtnt_io_resolvehost__d0__d1IPPROTO_ICMPtnt_io_send_rawIPPROTO_GREtnt_io_nonblocktnt_io_xbufmaxtotalsa_family_ttnt_io_recvfds_bitscurr_tmeoutSOCK_DGRAMtnt_io_closestart_connectIPPROTO_AHIPPROTO_ROUTINGsa_dataIPPROTO_IPIPSOCK_RAWai_canonname/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_io.cSOCK_SEQPACKETtnt_io_sendvleftresultIPPROTO_DSTOPTSIPPROTO_IPgp_offsettnt_net_requesttnt_net_recv_cbtnt_closetnt_error_desctnt_inittnt_flushoverflow_arg_areatnt_strerrortnt_net_replytnt_net_read__gnuc_va_listtnt_error_listtnt_errnoargstnt_net_writev__va_list_tagfp_offsettnt_connecttnt_net_freereg_save_areatnt_nettnt_fdtnt_settnt_net_write/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_net.ctnt_reply_ttnt_net_write_request/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_iob.ctnt_iob_inittnt_iob_freetnt_opt_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/tnt_opt.ctnt_opt_freetnt_opt_settnt_mem_inittnt_allocator_ttnt_mem_free/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnttnt_mem_realloc_tnt_realloc/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_mem.ctnt_mem_duptnt_mem_alloctnt_iter_list_nexttnt_iter_reply_freetnt_fieldtnt_iter_request_freetnt_iter_reply_nexttnt_nexttnt_iter_request_nexttnt_iter_field_nexttnt_iter_field_rewind/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_iter.ctnt_iter_inittnt_rewindtnt_iter_freetnt_iter_storage_freetnt_iter_storage_nexttnt_iter_list_rewindtnt_stream_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_stream.ctnt_stream_reqidtnt_stream_freetnt_reply_cboffvtnt_reply_freetnt_reply_fromtsizetnt_reply_init/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_reply.crollbacktnt_request_inittnt_request_freehdr_tnt_request_fromtnt_request_cb/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_request.copvsztnt_request_setorigintnt_enc_writetnt_enc_sizetnt_enc_read/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_enc.cvalue_ISgraphtnt_tuple_validate_ISspace_ISlower_ISalpha_ISdigittnt_tuple_setnsize_ISalnumtnt_tuple_addtnt_list_init_ISblank_ISpuncttnt_tuple_set_as/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/tnt_tuple.cndatafld_offtnt_list_attnt_list_free_IScntrl_ISxdigittnt_tuple_inittnt_tuple_free_ISupper_ISprintwwcvcdwdewehwhvwwwBvBCwCDwDGwG{v{|w|}w}wQvQRwRSwSVwVvwwwbvbcwcdwdgwgvwwwvwwwvwwwjvjkwklwlowovww w vwwwvwww=v=>w>?w?BwBzvz{w{|w|wvwwwvwww< v< = w= > w> A wA v w w w ; v; < w< = w= @ w@ v w w w vwwwvwwwovopwpqwqtwtvwwwvwwwXvXYwYZwZ]w]vwwwvwww v  w  w w7v78w89w9<w<SvSTwTUwUXwX@v@AwABwBEwEHvHIwIJwJMwMvwwwvwwwv w  w  w %v%&w&'w'*w*EvEFwFGwGJwJvwwwvwwwvwwwvwww\v\]w]^w^awavwww<v<=www*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvwww|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwvwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vwwwvwwwuvuvwvwwwzwzvwww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  wC9= y    .symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N @ V@X^o@ko@pzh@h@ P@Pp@p`@`WTs@Ts `s@`s p}@p}t@lT@TX`X```h`hp`pP`PX`X```H `  0ę)To5o Cm~!O0@ZZ'e[s%m \ @@<@`@@@@@ h@ @ P@ p@ `@Ts@`s@p}@@T@X```h`p`P`X```` !" h` @. @A @W`f`` @X` L@dt|@ @C ;@9 t@ "@. z#@> $@P '@_ K(@n 6.@ L3@p 3@9 3@Y N4@W 4@0 4@9 5@J X5@,``&0:`GR `A@}` A@t C@O rD@f D@! rE@ E@* F@ 'G@* G@ [H@*2?K N@jXf Q@y \S@ U@ V@  Y@ [@ a@j cm@P@ h`,``=h`Jp`SX`f`rX` Ps@ )@= 9@ uQ@) "@ ;@)& B ``M N@W >)@fz z!@ I@ a@ 9`@U ,@M n@ H@ m@' o@x5`<Ts@BV :A@#c ;@o K@$ b@ r9@  '*@s F@. *@> wK@ M /9@&Wj @@#x e@$ :@  9@&`` U9@ 8@t  6@  +@P d@(;`s@J g@Th J @0p C@yy 5@ .@G@ r@ ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include static void print_tuple(struct tnt_tuple *tu) { printf("["); struct tnt_iter ifl; tnt_iter(&ifl, tu); while (tnt_next(&ifl)) { if (TNT_IFIELD_IDX(&ifl) != 0) printf(", "); char *data = TNT_IFIELD_DATA(&ifl); uint32_t size = TNT_IFIELD_SIZE(&ifl); if (!isprint(data[0]) && (size == 4 || size == 8)) { if (size == 4) { uint32_t i = *((uint32_t*)data); printf("%"PRIu32, i); } else { uint64_t i = *((uint64_t*)data); printf("%"PRIu64, i); } } else { printf("'%-.*s'", size, data); } } if (ifl.status == TNT_ITER_FAIL) printf(""); tnt_iter_free(&ifl); printf("]\n"); } int main(int argc, char * argv[]) { if (argc != 2) return 1; struct tnt_stream s; tnt_snapshot(&s); if (tnt_snapshot_open(&s, argv[1]) == -1) return 1; struct tnt_iter i; tnt_iter_storage(&i, &s); while (tnt_next(&i)) { struct tnt_iter_storage *is = TNT_ISTORAGE(&i); print_tuple(&is->t); } if (i.status == TNT_ITER_FAIL) printf("parsing failed: %s\n", tnt_snapshot_strerror(&s)); tnt_iter_free(&i); tnt_stream_free(&s); return 0; } tarantool-1.5.1.218.g1a69fd6/test/connector_c/connector.result0000664000000000000000000000302212231715257022467 0ustar rootroot> tuple1 [OK] > tuple2 [OK] > list [OK] > stream buffer [OK] > tuple set [OK] > iterator tuple [OK] > iterator tuple (single field) [OK] > iterator tuple (tnt_field) [OK] > iterator tuple (empty) [OK] > iterator list [OK] > marshaling ping [OK] > marshaling insert [OK] > marshaling delete [OK] > marshaling call [OK] > marshaling select [OK] > marshaling update [OK] > connect [OK] > ping [OK] > insert [OK] > update [OK] > select [OK] > delete [OK] > call [OK] > call (no args) [OK] > reply [OK] > lex ws [OK] > lex integer [OK] > lex string [OK] > lex punctuation [OK] > lex ids [OK] > lex keywords [OK] > lex keys and tables [OK] > lex stack [OK] > lex bad string1 [OK] > lex bad string2 [OK] > sql ping [OK] > sql insert [OK] > sql update [OK] > sql select [OK] > sql select limit [OK] > sql delete [OK] > sql call [OK] tarantool-1.5.1.218.g1a69fd6/test/connector_c/update.test0000664000000000000000000000050612231715257021424 0ustar rootrootimport subprocess import sys import os p = subprocess.Popen([ os.path.join(builddir, "test/connector_c/update") ], stdout=subprocess.PIPE) p.wait() for line in p.stdout.readlines(): sys.stdout.write(line) # resore default suite server.stop() server.deploy(self.suite_ini["config"]) server.start() # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/connector_c/tt.c0000664000000000000000000011152712202131537020031 0ustar rootroot /* * Copyright (C) 2011 Mail.RU * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include struct tt_test; typedef void (*tt_testf_t)(struct tt_test *t); struct tt_test { char *name; tt_testf_t cb; struct tt_test *next; }; struct tt_list { struct tt_test *head, *tail; int count; }; static struct tt_test* tt_test(struct tt_list *list, char *name, tt_testf_t cb) { struct tt_test *t = malloc(sizeof(struct tt_test)); if (t == NULL) return NULL; t->name = strdup(name); t->cb = cb; t->next = NULL; if (list->head == NULL) list->head = t; else list->tail->next = t; list->tail = t; list->count++; return t; } static void tt_free(struct tt_list *list) { struct tt_test *i = list->head; struct tt_test *n = NULL; while (i) { n = i->next; free(i->name); free(i); i = n; } } static void tt_run(struct tt_list *list) { struct tt_test *i = list->head; while (i) { printf("> %-30s", i->name); fflush(NULL); i->cb(i); printf("[OK]\n"); i = i->next; } } static void tt_assert(struct tt_test *t, char *file, int line, int expr, char *exprsz) { if (expr) return; (void)t; printf("[%s:%d] %s\n", file, line, exprsz); abort(); } #define TT_ASSERT(EXPR) \ tt_assert(test, __FILE__, __LINE__, (EXPR), #EXPR) /* basic tuple creation */ static void tt_tnt_tuple1(struct tt_test *test) { struct tnt_tuple t; tnt_tuple_init(&t); tnt_tuple(&t, "%s%d", "foo", 123); TT_ASSERT(t.alloc == 0); TT_ASSERT(t.cardinality == 2); TT_ASSERT(t.data != NULL); TT_ASSERT(t.size != 0); tnt_tuple_free(&t); struct tnt_tuple *tp = tnt_tuple(NULL, "%s%d", "foo", 123); TT_ASSERT(tp->alloc == 1); TT_ASSERT(tp->cardinality == 2); TT_ASSERT(tp->data != NULL); TT_ASSERT(tp->size != 0); tnt_tuple_free(tp); } /* basic tuple field manipulation */ static void tt_tnt_tuple2(struct tt_test *test) { struct tnt_tuple t; tnt_tuple_init(&t); tnt_tuple_add(&t, "foo", 4); TT_ASSERT(t.alloc == 0); TT_ASSERT(t.cardinality == 1); TT_ASSERT(t.data != NULL); TT_ASSERT(t.size != 0); tnt_tuple_add(&t, "bar", 4); TT_ASSERT(t.cardinality == 2); tnt_tuple_add(&t, "baz", 4); TT_ASSERT(t.cardinality == 3); tnt_tuple(&t, "%s%d", "xyz", 123); TT_ASSERT(t.cardinality == 5); tnt_tuple_free(&t); } /* basic list operations */ static void tt_tnt_list(struct tt_test *test) { struct tnt_list list; tnt_list_init(&list); tnt_list(&list, tnt_tuple(NULL, "%s", "foo"), NULL); TT_ASSERT(list.list != NULL); TT_ASSERT(list.alloc == 0); TT_ASSERT(list.count == 1); tnt_list(&list, tnt_tuple(NULL, "%s", "foo"), NULL); tnt_list(&list, tnt_tuple(NULL, "%s", "foo"), NULL); TT_ASSERT(list.count == 3); struct tnt_tuple t; tnt_tuple_init(&t); tnt_list_at(&list, &t); TT_ASSERT(list.count == 4); tnt_list_free(&list); struct tnt_list *l = tnt_list(NULL, tnt_tuple(NULL, "%s", "foo"), tnt_tuple(NULL, "%s", "bar"), tnt_tuple(NULL, "%s", "baz"), NULL); TT_ASSERT(l->alloc == 1); TT_ASSERT(l->list != NULL); TT_ASSERT(l->count == 3); tnt_list_free(l); } /* stream buffer */ static void tt_tnt_sbuf(struct tt_test *test) { struct tnt_stream s; tnt_buf(&s); TT_ASSERT(s.alloc == 0); struct tnt_stream_buf *sb = TNT_SBUF_CAST(&s); TT_ASSERT(sb->data == NULL); TT_ASSERT(sb->size == 0); TT_ASSERT(sb->rdoff == 0); TT_ASSERT(s.wrcnt == 0); struct tnt_tuple *kv = tnt_tuple(NULL, "%s%d", "key", 123); tnt_insert(&s, 0, 0, kv); TT_ASSERT(sb->data != NULL); TT_ASSERT(sb->size != 0); TT_ASSERT(sb->rdoff == 0); TT_ASSERT(s.wrcnt == 1); tnt_insert(&s, 0, 0, kv); TT_ASSERT(s.wrcnt == 2); tnt_tuple_free(kv); tnt_stream_free(&s); } /* tuple set */ static void tt_tnt_tuple_set(struct tt_test *test) { char buf[75]; *((uint32_t*)buf) = 2; /* cardinality */ /* 4 + 1 + 5 + 1 + 64 = 75 */ uint32_t off = sizeof(uint32_t); int esize = tnt_enc_size(5); tnt_enc_write(buf + off, 5); off += esize + 5; esize = tnt_enc_size(64); tnt_enc_write(buf + off, 64); off += esize + 64; struct tnt_tuple t; tnt_tuple_init(&t); TT_ASSERT(tnt_tuple_set(&t, buf, 70) == NULL); TT_ASSERT(tnt_tuple_set(&t, buf, sizeof(buf)) != NULL); tnt_tuple_free(&t); } /* iterator tuple */ static void tt_tnt_iter1(struct tt_test *test) { struct tnt_tuple *t = tnt_tuple(NULL, "%s%d%s", "foo", 123, "bar"); TT_ASSERT(t->cardinality == 3); struct tnt_iter i; tnt_iter(&i, t); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(TNT_IFIELD_IDX(&i) == 0); TT_ASSERT(TNT_IFIELD_SIZE(&i) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(&i), "foo", 3) == 0); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(TNT_IFIELD_SIZE(&i) == 4); TT_ASSERT(TNT_IFIELD_IDX(&i) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(&i) == 123); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(TNT_IFIELD_IDX(&i) == 2); TT_ASSERT(TNT_IFIELD_SIZE(&i) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(&i), "bar", 3) == 0); TT_ASSERT(tnt_next(&i) == 0); tnt_iter_free(&i); tnt_tuple_free(t); } /* iterator tuple single field */ static void tt_tnt_iter11(struct tt_test *test) { struct tnt_tuple *t = tnt_tuple(NULL, "%s", "foo"); TT_ASSERT(t->cardinality == 1); struct tnt_iter i; tnt_iter(&i, t); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(TNT_IFIELD_IDX(&i) == 0); TT_ASSERT(TNT_IFIELD_SIZE(&i) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(&i), "foo", 3) == 0); TT_ASSERT(tnt_next(&i) == 0); tnt_iter_free(&i); tnt_tuple_free(t); } /* iterator tuple field */ static void tt_tnt_iter2(struct tt_test *test) { struct tnt_tuple *t = tnt_tuple(NULL, "%s%d%s", "foo", 123, "bar"); TT_ASSERT(t->cardinality == 3); struct tnt_iter *i = tnt_field(NULL, t, 0); TT_ASSERT(i->alloc != 0); TT_ASSERT(tnt_field(i, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(i) == 0); TT_ASSERT(TNT_IFIELD_SIZE(i) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(i), "foo", 3) == 0); TT_ASSERT(tnt_field(i, NULL, 1) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(i) == 4); TT_ASSERT(TNT_IFIELD_IDX(i) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(i) == 123); TT_ASSERT(tnt_field(i, NULL, 2) != NULL); TT_ASSERT(TNT_IFIELD_IDX(i) == 2); TT_ASSERT(TNT_IFIELD_SIZE(i) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(i), "bar", 3) == 0); TT_ASSERT(tnt_field(i, NULL, 3) == NULL); tnt_iter_free(i); tnt_tuple_free(t); } /* iterator list */ static void tt_tnt_iter3(struct tt_test *test) { struct tnt_tuple t1, t2, t3; tnt_tuple_init(&t1); tnt_tuple_init(&t2); tnt_tuple_init(&t3); tnt_tuple(&t1, "%s", "foo"); tnt_tuple(&t2, "%s", "bar"); tnt_tuple(&t3, "%s", "baz"); struct tnt_list *l = tnt_list(NULL, &t1, &t2, &t3, NULL); TT_ASSERT(l->count == 3); struct tnt_iter i; tnt_iter_list(&i, l); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(TNT_ILIST_TUPLE(&i) == &t1); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(TNT_ILIST_TUPLE(&i) == &t2); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(TNT_ILIST_TUPLE(&i) == &t3); TT_ASSERT(tnt_next(&i) == 0); tnt_tuple_free(&t1); tnt_tuple_free(&t2); tnt_tuple_free(&t3); tnt_iter_free(&i); tnt_list_free(l); } /* iterator empty tuple */ static void tt_tnt_iter4(struct tt_test *test) { char buf[4]; memset(buf, 0, sizeof(buf)); struct tnt_tuple t; tnt_tuple_init(&t); tnt_tuple_set(&t, buf, sizeof(buf)); struct tnt_iter i; tnt_iter(&i, &t); TT_ASSERT(tnt_next(&i) == 0); tnt_iter_free(&i); tnt_tuple_free(&t); } /* marshal ping */ static void tt_tnt_marshal_ping(struct tt_test *test) { struct tnt_stream s; tnt_buf(&s); tnt_ping(&s); tnt_ping(&s); struct tnt_iter i; tnt_iter_request(&i, &s); TT_ASSERT(tnt_next(&i) == 1); struct tnt_request *r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_PING); TT_ASSERT(tnt_next(&i) == 1); TT_ASSERT(r->h.type == TNT_OP_PING); TT_ASSERT(tnt_next(&i) == 0); tnt_iter_free(&i); tnt_stream_free(&s); } /* marshal insert */ static void tt_tnt_marshal_insert(struct tt_test *test) { struct tnt_stream s; tnt_buf(&s); struct tnt_tuple t; tnt_tuple_init(&t); tnt_tuple(&t, "%s%d", "foo", 123); tnt_insert(&s, 0, 0, &t); tnt_insert(&s, 0, 0, &t); struct tnt_iter i; tnt_iter_request(&i, &s); TT_ASSERT(tnt_next(&i) == 1); struct tnt_request *r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_INSERT); struct tnt_iter *f = tnt_field(NULL, &r->r.insert.t, 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); TT_ASSERT(tnt_field(f, NULL, 1) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(f) == 4); TT_ASSERT(TNT_IFIELD_IDX(f) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(f) == 123); TT_ASSERT(tnt_next(&i) == 1); r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_INSERT); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); TT_ASSERT(tnt_field(f, NULL, 1) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(f) == 4); TT_ASSERT(TNT_IFIELD_IDX(f) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(f) == 123); TT_ASSERT(tnt_next(&i) == 0); tnt_tuple_free(&t); tnt_iter_free(&i); tnt_stream_free(&s); } /* marshal delete */ static void tt_tnt_marshal_delete(struct tt_test *test) { struct tnt_stream s; tnt_buf(&s); struct tnt_tuple t; tnt_tuple_init(&t); tnt_tuple(&t, "%s", "foo"); tnt_delete(&s, 0, 0, &t); tnt_delete(&s, 0, 0, &t); struct tnt_iter i; tnt_iter_request(&i, &s); TT_ASSERT(tnt_next(&i) == 1); struct tnt_request *r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_DELETE); struct tnt_iter *f = tnt_field(NULL, &r->r.del.t, 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); TT_ASSERT(tnt_next(&i) == 1); r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_DELETE); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); TT_ASSERT(tnt_next(&i) == 0); tnt_tuple_free(&t); tnt_iter_free(&i); tnt_stream_free(&s); } /* marshal call */ static void tt_tnt_marshal_call(struct tt_test *test) { struct tnt_stream s; tnt_buf(&s); struct tnt_tuple t; tnt_tuple_init(&t); tnt_tuple(&t, "%s%d", "foo", 123); tnt_call(&s, 0, "box.select", &t); tnt_call(&s, 0, "box.select", &t); struct tnt_iter i; tnt_iter_request(&i, &s); TT_ASSERT(tnt_next(&i) == 1); struct tnt_request *r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_CALL); TT_ASSERT(strcmp(r->r.call.proc, "box.select") == 0); struct tnt_iter *f = tnt_field(NULL, &r->r.call.t, 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); TT_ASSERT(tnt_field(f, NULL, 1) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(f) == 4); TT_ASSERT(TNT_IFIELD_IDX(f) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(f) == 123); TT_ASSERT(tnt_next(&i) == 1); r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_CALL); TT_ASSERT(strcmp(r->r.call.proc, "box.select") == 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); TT_ASSERT(tnt_field(f, NULL, 1) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(f) == 4); TT_ASSERT(TNT_IFIELD_IDX(f) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(f) == 123); TT_ASSERT(tnt_next(&i) == 0); tnt_tuple_free(&t); tnt_iter_free(&i); tnt_stream_free(&s); } /* marshal select */ static void tt_tnt_marshal_select(struct tt_test *test) { struct tnt_stream s; tnt_buf(&s); struct tnt_list list; tnt_list_init(&list); tnt_list(&list, tnt_tuple(NULL, "%s", "foo"), tnt_tuple(NULL, "%s%d", "bar", 444), tnt_tuple(NULL, "%s%d%d", "baz", 1, 2), NULL); tnt_select(&s, 0, 0, 0, 1, &list); struct tnt_iter i; tnt_iter_request(&i, &s); TT_ASSERT(tnt_next(&i) == 1); struct tnt_request *r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_SELECT); struct tnt_iter il; tnt_iter_list(&il, &r->r.select.l); TT_ASSERT(tnt_next(&il) == 1); struct tnt_tuple *t = TNT_ILIST_TUPLE(&il); struct tnt_iter *f = tnt_field(NULL, t, 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); tnt_iter_free(f); TT_ASSERT(tnt_next(&il) == 1); t = TNT_ILIST_TUPLE(&il); f = tnt_field(NULL, t, 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "bar", 3) == 0); TT_ASSERT(tnt_field(f, NULL, 1) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(f) == 4); TT_ASSERT(TNT_IFIELD_IDX(f) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(f) == 444); tnt_iter_free(f); TT_ASSERT(tnt_next(&il) == 1); t = TNT_ILIST_TUPLE(&il); f = tnt_field(NULL, t, 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "baz", 3) == 0); TT_ASSERT(tnt_field(f, NULL, 1) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(f) == 4); TT_ASSERT(TNT_IFIELD_IDX(f) == 1); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(f) == 1); TT_ASSERT(tnt_field(f, NULL, 2) != NULL); TT_ASSERT(TNT_IFIELD_SIZE(f) == 4); TT_ASSERT(TNT_IFIELD_IDX(f) == 2); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(f) == 2); tnt_iter_free(f); TT_ASSERT(tnt_next(&il) == 0); tnt_iter_free(&i); tnt_iter_free(&il); tnt_list_free(&list); tnt_stream_free(&s); } /* marshal update */ static void tt_tnt_marshal_update(struct tt_test *test) { struct tnt_stream s, ops; tnt_buf(&s); tnt_buf(&ops); struct tnt_tuple t; tnt_tuple_init(&t); tnt_tuple(&t, "%s", "foo"); tnt_update_assign(&ops, 444, "FOO", 3); tnt_update_arith(&ops, 2, TNT_UPDATE_ADD, 7); TT_ASSERT(tnt_update(&s, 0, 0, &t, &ops) > 0); struct tnt_iter i; tnt_iter_request(&i, &s); TT_ASSERT(tnt_next(&i) == 1); struct tnt_request *r = TNT_IREQUEST_PTR(&i); TT_ASSERT(r->h.type == TNT_OP_UPDATE); TT_ASSERT(r->r.update.opc == 2); struct tnt_iter *f = tnt_field(NULL, &r->r.update.t, 0); TT_ASSERT(tnt_field(f, NULL, 0) != NULL); TT_ASSERT(TNT_IFIELD_IDX(f) == 0); TT_ASSERT(TNT_IFIELD_SIZE(f) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(f), "foo", 3) == 0); TT_ASSERT(r->r.update.opv[0].op == TNT_UPDATE_ASSIGN); TT_ASSERT(r->r.update.opv[0].field == 444); TT_ASSERT(r->r.update.opv[0].size == 3); TT_ASSERT(memcmp(r->r.update.opv[0].data, "FOO", 3) == 0); TT_ASSERT(r->r.update.opv[1].op == TNT_UPDATE_ADD); TT_ASSERT(r->r.update.opv[1].field == 2); TT_ASSERT(r->r.update.opv[1].size == 4); TT_ASSERT(*(uint32_t*)r->r.update.opv[1].data == 7); TT_ASSERT(tnt_next(&i) == 0); tnt_tuple_free(&t); tnt_stream_free(&s); tnt_stream_free(&ops); tnt_iter_free(&i); } static struct tnt_stream net; /* network connection */ static void tt_tnt_net_connect(struct tt_test *test) { TT_ASSERT(tnt_net(&net) != NULL); TT_ASSERT(tnt_set(&net, TNT_OPT_HOSTNAME, "localhost") == 0); TT_ASSERT(tnt_set(&net, TNT_OPT_PORT, 33013) == 0); TT_ASSERT(tnt_init(&net) == 0); TT_ASSERT(tnt_connect(&net) == 0); } /* ping */ static void tt_tnt_net_ping(struct tt_test *test) { TT_ASSERT(tnt_ping(&net) > 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_PING); } tnt_iter_free(&i); } /* insert */ static void tt_tnt_net_insert(struct tt_test *test) { tnt_stream_reqid(&net, 777); struct tnt_tuple kv1; tnt_tuple_init(&kv1); tnt_tuple(&kv1, "%d%s", 123, "foo"); TT_ASSERT(tnt_insert(&net, 0, 0, &kv1) > 0); struct tnt_tuple kv2; tnt_tuple_init(&kv2); tnt_tuple(&kv2, "%d%s", 321, "bar"); TT_ASSERT(tnt_insert(&net, 0, 0, &kv2) > 0); TT_ASSERT(tnt_flush(&net) > 0); tnt_tuple_free(&kv1); tnt_tuple_free(&kv2); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->reqid == 777); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_INSERT); TT_ASSERT(r->count == 1); } tnt_iter_free(&i); } /* update */ static void tt_tnt_net_update(struct tt_test *test) { struct tnt_stream ops; TT_ASSERT(tnt_buf(&ops) != NULL); tnt_update_arith(&ops, 0, TNT_UPDATE_ADD, 7); tnt_update_assign(&ops, 1, "FOO", 3); struct tnt_tuple *k = tnt_tuple(NULL, "%d", 123); TT_ASSERT(tnt_update(&net, 0, 0, k, &ops) > 0); tnt_tuple_free(k); tnt_stream_free(&ops); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_UPDATE); TT_ASSERT(r->count == 1); } } /* select */ static void tt_tnt_net_select(struct tt_test *test) { struct tnt_list *search = tnt_list(NULL, tnt_tuple(NULL, "%d", 130), NULL); TT_ASSERT(tnt_select(&net, 0, 0, 0, 1, search) > 0); TT_ASSERT(tnt_flush(&net) > 0); tnt_list_free(search); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_SELECT); TT_ASSERT(r->count == 1); struct tnt_iter il; tnt_iter_list(&il, TNT_REPLY_LIST(r)); TT_ASSERT(tnt_next(&il) == 1); struct tnt_tuple *tp; tp = TNT_ILIST_TUPLE(&il); TT_ASSERT(tp->cardinality == 2); TT_ASSERT(tp->alloc == 1); TT_ASSERT(tp->data != NULL); TT_ASSERT(tp->size != 0); struct tnt_iter ifl; tnt_iter(&ifl, tp); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 0); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 4); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 130); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 1); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(&ifl), "FOO", 3) == 0); TT_ASSERT(tnt_next(&ifl) == 0); tnt_iter_free(&ifl); tnt_iter_free(&il); } } /* delete */ static void tt_tnt_net_delete(struct tt_test *test) { struct tnt_tuple k; tnt_tuple_init(&k); tnt_tuple(&k, "%d", 321); TT_ASSERT(tnt_delete(&net, 0, 0, &k) > 0); TT_ASSERT(tnt_flush(&net) > 0); tnt_tuple_free(&k); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_DELETE); TT_ASSERT(r->count == 1); } tnt_iter_free(&i); } /* call */ static void tt_tnt_net_call(struct tt_test *test) { struct tnt_tuple args; tnt_tuple_init(&args); tnt_tuple(&args, "%s%d%s%s", "0", 333, "B", "C"); TT_ASSERT(tnt_call(&net, 0, "box.insert", &args) > 0); TT_ASSERT(tnt_flush(&net) > 0); tnt_tuple_free(&args); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_CALL); TT_ASSERT(r->count == 1); } tnt_iter_free(&i); } /* call (no args) */ static void tt_tnt_net_call_na(struct tt_test *test) { struct tnt_tuple args; tnt_tuple_init(&args); TT_ASSERT(tnt_call(&net, 0, "box.insert", &args) > 0); TT_ASSERT(tnt_flush(&net) > 0); tnt_tuple_free(&args); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code != 0); TT_ASSERT(strstr(r->error, "box.pack") != NULL); } tnt_iter_free(&i); } /* reply */ static void tt_tnt_net_reply(struct tt_test *test) { struct tnt_tuple kv1, kv2; tnt_tuple_init(&kv1); tnt_tuple(&kv1, "%d%s", 587, "foo"); TT_ASSERT(tnt_insert(&net, 0, TNT_FLAG_RETURN, &kv1) > 0); tnt_tuple_free(&kv1); tnt_tuple_init(&kv2); tnt_tuple(&kv2, "%d%s", 785, "bar"); TT_ASSERT(tnt_insert(&net, 0, TNT_FLAG_RETURN, &kv2) > 0); tnt_tuple_free(&kv2); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_stream_net *s = TNT_SNET_CAST(&net); int current = 0; size_t off = 0; ssize_t size = 0; char buffer[512]; while (current != 2) { struct tnt_reply r; tnt_reply_init(&r); int rc = tnt_reply(&r, buffer, size, &off); TT_ASSERT(rc != -1); if (rc == 1) { ssize_t res = tnt_io_recv_raw(s, buffer + size, off, 1); TT_ASSERT(res > 0); size += off; continue; } TT_ASSERT(rc == 0); TT_ASSERT(r.code == 0); TT_ASSERT(r.op == TNT_OP_INSERT); TT_ASSERT(r.count == 1); if (current == 0) { struct tnt_iter il; tnt_iter_list(&il, TNT_REPLY_LIST(&r)); TT_ASSERT(tnt_next(&il) == 1); struct tnt_tuple *tp = TNT_ILIST_TUPLE(&il); TT_ASSERT(tp->cardinality == 2); TT_ASSERT(tp->alloc == 1); TT_ASSERT(tp->data != NULL); TT_ASSERT(tp->size != 0); struct tnt_iter ifl; tnt_iter(&ifl, tp); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 0); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 4); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 587); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 1); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(&ifl), "foo", 3) == 0); TT_ASSERT(tnt_next(&ifl) == 0); tnt_iter_free(&ifl); tnt_iter_free(&il); off = 0; size = 0; } else if (current == 1) { struct tnt_iter il; tnt_iter_list(&il, TNT_REPLY_LIST(&r)); TT_ASSERT(tnt_next(&il) == 1); struct tnt_tuple *tp = TNT_ILIST_TUPLE(&il); TT_ASSERT(tp->cardinality == 2); TT_ASSERT(tp->alloc == 1); TT_ASSERT(tp->data != NULL); TT_ASSERT(tp->size != 0); struct tnt_iter ifl; tnt_iter(&ifl, tp); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 0); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 4); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 785); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 1); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 3); TT_ASSERT(memcmp(TNT_IFIELD_DATA(&ifl), "bar", 3) == 0); TT_ASSERT(tnt_next(&ifl) == 0); tnt_iter_free(&ifl); tnt_iter_free(&il); } tnt_reply_free(&r); current++; } net.wrcnt -= 2; } extern struct tnt_lex_keyword tnt_sql_keywords[]; /* lex ws */ static void tt_tnt_lex_ws(struct tt_test *test) { unsigned char sz[] = " # abcde fghjk ## hh\n # zzz\n#NOCR"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex integer */ static void tt_tnt_lex_int(struct tt_test *test) { unsigned char sz[] = "\f\r\n 123 34\n\t\r56 888L56 2147483646 2147483647 " "-2147483648 -2147483649 72057594037927935"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 123); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 34); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 56); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == 888); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 56); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == INT_MAX - 1); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == INT_MAX); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == INT_MIN); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == INT_MIN - 1LL); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM64 && TNT_TK_I64(tk) == 72057594037927935LL); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex punctuation */ static void tt_tnt_lex_punct(struct tt_test *test) { unsigned char sz[] = "123,34\n-10\t:\r(56)"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 123); TT_ASSERT(tnt_lex(&l, &tk) == ',' && TNT_TK_I32(tk) == ','); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 34); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == -10); TT_ASSERT(tnt_lex(&l, &tk) == ':' && TNT_TK_I32(tk) == ':'); TT_ASSERT(tnt_lex(&l, &tk) == '('&& TNT_TK_I32(tk) == '('); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_NUM32 && TNT_TK_I32(tk) == 56); TT_ASSERT(tnt_lex(&l, &tk) == ')' && TNT_TK_I32(tk) == ')'); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex string */ static void tt_tnt_lex_str(struct tt_test *test) { unsigned char sz[] = " 'hello'\n\t 'world' 'всем привет!'"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_STRING && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "hello", 5) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_STRING && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "world", 5) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_STRING && TNT_TK_S(tk)->size == 22 && memcmp(TNT_TK_S(tk)->data, "всем привет!", 22) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex id's */ static void tt_tnt_lex_ids(struct tt_test *test) { unsigned char sz[] = " hello\nэтот безумный безумный мир\t world "; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "hello", 5) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 8 && memcmp(TNT_TK_S(tk)->data, "этот", 8) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 16 && memcmp(TNT_TK_S(tk)->data, "безумный", 16) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 16 && memcmp(TNT_TK_S(tk)->data, "безумный", 16) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 6 && memcmp(TNT_TK_S(tk)->data, "мир", 6) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ID && TNT_TK_S(tk)->size == 5 && memcmp(TNT_TK_S(tk)->data, "world", 5) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex keys and tables */ static void tt_tnt_lex_kt(struct tt_test *test) { unsigned char sz[] = " k0\n\tk20 t0 k1000 t55 k001 t8"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 20); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_TABLE && TNT_TK_I32(tk) == 0); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 1000); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_TABLE && TNT_TK_I32(tk) == 55); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_KEY && TNT_TK_I32(tk) == 1); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_TABLE && TNT_TK_I32(tk) == 8); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex keywords */ static void tt_tnt_lex_kw(struct tt_test *test) { unsigned char sz[] = " INSERT UPDATE INTO OR FROM WHERE VALUES"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_INSERT); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_UPDATE); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_INTO); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_OR); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_FROM); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_WHERE); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_VALUES); TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex stack */ static void tt_tnt_lex_stack(struct tt_test *test) { unsigned char sz[] = " 1 'hey' ,.55"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk1, *tk2, *tk3, *tk4, *tk5, *tk6; TT_ASSERT(tnt_lex(&l, &tk1) == TNT_TK_NUM32); TT_ASSERT(tnt_lex(&l, &tk2) == TNT_TK_STRING); TT_ASSERT(tnt_lex(&l, &tk3) == ','); TT_ASSERT(tnt_lex(&l, &tk4) == '.'); TT_ASSERT(tnt_lex(&l, &tk5) == TNT_TK_NUM32); TT_ASSERT(tnt_lex(&l, &tk6) == TNT_TK_EOF); tnt_lex_push(&l, tk5); tnt_lex_push(&l, tk4); tnt_lex_push(&l, tk3); tnt_lex_push(&l, tk2); tnt_lex_push(&l, tk1); TT_ASSERT(tnt_lex(&l, &tk1) == TNT_TK_NUM32); TT_ASSERT(tnt_lex(&l, &tk2) == TNT_TK_STRING); TT_ASSERT(tnt_lex(&l, &tk3) == ','); TT_ASSERT(tnt_lex(&l, &tk4) == '.'); TT_ASSERT(tnt_lex(&l, &tk5) == TNT_TK_NUM32); TT_ASSERT(tnt_lex(&l, &tk6) == TNT_TK_EOF); tnt_lex_free(&l); } /* lex bad string 1 */ static void tt_tnt_lex_badstr1(struct tt_test *test) { unsigned char sz[] = " '"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ERROR); tnt_lex_free(&l); } /* lex bad string 2 */ static void tt_tnt_lex_badstr2(struct tt_test *test) { unsigned char sz[] = " '\n'"; struct tnt_lex l; tnt_lex_init(&l, tnt_sql_keywords, sz, sizeof(sz) - 1); struct tnt_tk *tk; TT_ASSERT(tnt_lex(&l, &tk) == TNT_TK_ERROR); tnt_lex_free(&l); } /* sql ping */ static void tt_tnt_sql_ping(struct tt_test *test) { char *e = NULL; char q[] = "PING"; TT_ASSERT(tnt_query(&net, q, sizeof(q) - 1, &e) == 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_PING); } tnt_iter_free(&i); } /* sql insert */ static void tt_tnt_sql_insert(struct tt_test *test) { char *e = NULL; char q[] = "insert into t0 values (222, 'baz')"; TT_ASSERT(tnt_query(&net, q, sizeof(q) - 1, &e) == 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_INSERT); TT_ASSERT(r->count == 1); } tnt_iter_free(&i); } /* sql update */ static void tt_tnt_sql_update(struct tt_test *test) { char *e; char q1[] = "update t0 set k0 = 7 where k0 = 222"; TT_ASSERT(tnt_query(&net, q1, sizeof(q1) - 1, &e) == 0); /* 7 + 1 = 8 */ char q2[] = "update t0 set k0 = k0 + 1 where k0 = 7"; TT_ASSERT(tnt_query(&net, q2, sizeof(q2) - 1, &e) == 0); /* 8 | 2 = 10 */ char q3[] = "update t0 set k0 = k0 | 2 where k0 = 8"; TT_ASSERT(tnt_query(&net, q3, sizeof(q3) - 1, &e) == 0); /* 10 & 2 = 2 */ char q4[] = "update t0 set k0 = k0 & 2 where k0 = 10"; TT_ASSERT(tnt_query(&net, q4, sizeof(q4) - 1, &e) == 0); /* 2 ^ 123 = 121 */ char q5[] = "update t0 set k0 = k0 ^ 123 where k0 = 2"; TT_ASSERT(tnt_query(&net, q5, sizeof(q5) - 1, &e) == 0); /* assign */ char q6[] = "update t0 set k0 = 222, k1 = 'hello world' where k0 = 121"; TT_ASSERT(tnt_query(&net, q6, sizeof(q6) - 1, &e) == 0); /* splice */ char q7[] = "update t0 set k1 = splice(k1, 0, 2, 'AB') where k0 = 222"; TT_ASSERT(tnt_query(&net, q7, sizeof(q7) - 1, &e) == 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_UPDATE); TT_ASSERT(r->count == 1); } tnt_iter_free(&i); } /* sql select */ static void tt_tnt_sql_select(struct tt_test *test) { char *e = NULL; char q[] = "select * from t0 where k0 = 222 or k0 = 222"; TT_ASSERT(tnt_query(&net, q, sizeof(q) - 1, &e) == 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_SELECT); TT_ASSERT(r->count == 2); struct tnt_iter il; tnt_iter_list(&il, TNT_REPLY_LIST(r)); TT_ASSERT(tnt_next(&il) == 1); struct tnt_tuple *tp; tp = TNT_ILIST_TUPLE(&il); TT_ASSERT(tp->cardinality == 2); TT_ASSERT(tp->alloc == 1); TT_ASSERT(tp->data != NULL); TT_ASSERT(tp->size != 0); struct tnt_iter ifl; tnt_iter(&ifl, tp); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 0); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 4); TT_ASSERT(*(uint32_t*)TNT_IFIELD_DATA(&ifl) == 222); TT_ASSERT(tnt_next(&ifl) == 1); TT_ASSERT(TNT_IFIELD_IDX(&ifl) == 1); TT_ASSERT(TNT_IFIELD_SIZE(&ifl) == 11); TT_ASSERT(memcmp(TNT_IFIELD_DATA(&ifl), "ABllo world", 11) == 0); TT_ASSERT(tnt_next(&ifl) == 0); tnt_iter_free(&ifl); tnt_iter_free(&il); } tnt_iter_free(&i); } /* sql select limit */ static void tt_tnt_sql_select_limit(struct tt_test *test) { char *e = NULL; char q[] = "select * from t0 where k0 = 222 limit 0"; TT_ASSERT(tnt_query(&net, q, sizeof(q) - 1, &e) == 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_SELECT); TT_ASSERT(r->count == 0); } tnt_iter_free(&i); } /* sql delete */ static void tt_tnt_sql_delete(struct tt_test *test) { char *e = NULL; char q[] = "delete from t0 where k0 = 222"; TT_ASSERT(tnt_query(&net, q, sizeof(q) - 1, &e) == 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_DELETE); TT_ASSERT(r->count == 1); } tnt_iter_free(&i); } /* sql call */ static void tt_tnt_sql_call(struct tt_test *test) { char *e = NULL; char q[] = "call box.insert('0', 454, 'abc', 'cba')"; TT_ASSERT(tnt_query(&net, q, sizeof(q) - 1, &e) == 0); TT_ASSERT(tnt_flush(&net) > 0); struct tnt_iter i; tnt_iter_reply(&i, &net); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); TT_ASSERT(r->code == 0); TT_ASSERT(r->op == TNT_OP_CALL); TT_ASSERT(r->count == 1); } tnt_iter_free(&i); } int main(int argc, char * argv[]) { (void)argc, (void)argv; struct tt_list t; memset(&t, 0, sizeof(t)); /* common data manipulation */ tt_test(&t, "tuple1", tt_tnt_tuple1); tt_test(&t, "tuple2", tt_tnt_tuple2); tt_test(&t, "list", tt_tnt_list); tt_test(&t, "stream buffer", tt_tnt_sbuf); tt_test(&t, "tuple set", tt_tnt_tuple_set); tt_test(&t, "iterator tuple", tt_tnt_iter1); tt_test(&t, "iterator tuple (single field)", tt_tnt_iter11); tt_test(&t, "iterator tuple (tnt_field)", tt_tnt_iter2); tt_test(&t, "iterator tuple (empty)", tt_tnt_iter4); tt_test(&t, "iterator list", tt_tnt_iter3); /* marshaling */ tt_test(&t, "marshaling ping", tt_tnt_marshal_ping); tt_test(&t, "marshaling insert", tt_tnt_marshal_insert); tt_test(&t, "marshaling delete", tt_tnt_marshal_delete); tt_test(&t, "marshaling call", tt_tnt_marshal_call); tt_test(&t, "marshaling select", tt_tnt_marshal_select); tt_test(&t, "marshaling update", tt_tnt_marshal_update); /* common operations */ tt_test(&t, "connect", tt_tnt_net_connect); tt_test(&t, "ping", tt_tnt_net_ping); tt_test(&t, "insert", tt_tnt_net_insert); tt_test(&t, "update", tt_tnt_net_update); tt_test(&t, "select", tt_tnt_net_select); tt_test(&t, "delete", tt_tnt_net_delete); tt_test(&t, "call", tt_tnt_net_call); tt_test(&t, "call (no args)", tt_tnt_net_call_na); tt_test(&t, "reply", tt_tnt_net_reply); /* sql lexer */ tt_test(&t, "lex ws", tt_tnt_lex_ws); tt_test(&t, "lex integer", tt_tnt_lex_int); tt_test(&t, "lex string", tt_tnt_lex_str); tt_test(&t, "lex punctuation", tt_tnt_lex_punct); tt_test(&t, "lex ids", tt_tnt_lex_ids); tt_test(&t, "lex keywords", tt_tnt_lex_kw); tt_test(&t, "lex keys and tables", tt_tnt_lex_kt); tt_test(&t, "lex stack", tt_tnt_lex_stack); tt_test(&t, "lex bad string1", tt_tnt_lex_badstr1); tt_test(&t, "lex bad string2", tt_tnt_lex_badstr2); /* sql stmts */ tt_test(&t, "sql ping", tt_tnt_sql_ping); tt_test(&t, "sql insert", tt_tnt_sql_insert); tt_test(&t, "sql update", tt_tnt_sql_update); tt_test(&t, "sql select", tt_tnt_sql_select); tt_test(&t, "sql select limit", tt_tnt_sql_select_limit); tt_test(&t, "sql delete", tt_tnt_sql_delete); tt_test(&t, "sql call", tt_tnt_sql_call); tt_run(&t); tt_free(&t); tnt_stream_free(&net); return 0; } tarantool-1.5.1.218.g1a69fd6/test/connector_c/snap0000775000000000000000000031620412213333047020126 0ustar rootrootELF>p@@s@8@&#@@@@@@@@@yy  y y` y`(1`2 8y8y`8y`@@DDPtdhh@h@Qtd/lib64/ld-linux-x86-64.so.2GNU GNUV Ά){ ʵ716vC ,f)@P%5$r* PB"0 *Etf(I "#%()*+,-./0123689;>?ACDFGHKLMPQRTWYZ[\_`beM2>$aCT/ld[rzbefUaAїCKͅ< K 8qoꖲ .͸2bZ?9^mq㞂iV aC6V }`7{ ɈWb땆Q6 : "E#>=(j CDN{^goR/~k|BEΗqX 6ij'`e|w0x`e /;O5~'$qXlC# ><*#+ : N h h@9 a(@ dC@qB o7@$ -@ H,@+ @C@$ D@$d :@6`` @ Q@@@_@ '@K R/@ A@  [@ '(@: @O4_@ <@yE 0_@ B@C 5@ @ v9@ p@ P@* ?@ p@& ^@9 @|T =@yb H@ (@ 9Y@U @$@u B@ ,@)6@`~ 8@k h-@dP@|`p Z%@  |` Z@ )@`0@ ,@DV s,@# |` ,@_U uJ@)) C@B ]@7 @H`` @x H@$ 7@x  QB@ -@#' @H=^ tHtU0y`H]{vUHHH8[hH8H@HHh"EtD_@HEHEEEHHEHHH%@uT}t}uH}uHEEEƿG_@?;HEHHEHEHƿJ_@HUEƿN_@H@H&1DuV_@H@H&f_@xHUHH Ht HEHuHHHHEHHBu HUHHHh%HH(HEHEHHHH&u΋uHEHFHƿh_@HH%HEH@'HÐUHH H}HEH@HHEHEH HEH@HHBHEH@HUHH H}HuHEH@HHEHEHUHH'HEH}uHEH1 uH}tUHH H}H}EHEH%HEH}u HHEHPHHEH@HHu}t HEH&rHEH@HHHEH@ HEH@0HEH@(HEH@8@HEH@HEH@HEH@@@HEUHH H}HuHEH@HHEHEHMHHUHH H}HEH@HHEHEHH UHH}HEH@H]UHHH}HEH@HH UHH}HEH@H]UHH H}H}u`HE.HaHEH}u=HEh@Hu!HEh@HuUHHH}uHEU}uyHEUHH H}HuEH}t HEHZ HEH@HHHEH@HH9HEHHHEH@HHHEHPHEHѺHHtHEH@UG9tHEH HEH@H*HHEHPHUHH@H}HuHUHEH@HHHEHPHEEHEHPHEHѺH/Ht^HUHEHHHEH@HqE}uHUHEHH_EE ЉEUF9uHEH@HUHz0HHtHUHEHH3HEH@HHHEHPHEH0HHƿ' EHE؋@0;EtHEؾHdHE؋@DHa HEH}uHEؾH2HEHPHE؋@DHEHѺHHtHUHEHH)cHE؋PDHEHƿx EHE؋@H;EtHEHx HEؾHHEHUHHE؋PDHEȉHpUHH@H}HuЉUHMHEHHLHEк HHHE@VEHE؋@D EEHEH%HEHE؋@DHxHEHp HEHMHUIHHH{7E}tHEؾHHUHH0H}HuUHMHEH HEHHXHEHHHEHfHE@jHEHpHEHHEH}uHEH7H}tUHH0H}HuHEEHEH@ HUHuHMHЉE}tnHEH@(UHuHMH}ЉE}tHEHh9HE؋uEHMHEHH% HEH0HEH0HPUHHH}HEHPxHEHHUHHH}uUHEHHEHUHHpHHHE$h@HHtKH&h@HBHHHPHH@Hu+HHGHt HHPHHPHEо HHEH}uHHHHPHE HmHEH}uHHWHH@ @t r9t3HE(h@HH@("@HE.h@HH@(#@HUHEHHtHH,HE4h@HtHHHHPHHrHEH}uHH_HE:h@HPtHEHEHUHHEHHE@HHHEHHE@PHEPHEÐUHHH}H}tHEHHELHEH}u0HEHHE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HH< HEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHxHEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@:@HEH@<@HEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@r=@HEH@=@HEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHnHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHH!UHH H}HuHEH'HEH}uYHEHEH@r>@HEH@HEH@ >@HEH(HEHEHUHHEHHxHEUHH H}HEH(HEHEHH HEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@?@HEH@HEH@ '@@HEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHfHEHH2HEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@@@HEH@HEH@ [A@HEH(HEHEHUHHEHHHE@hHE@hHHHiHHEHPpHEH@pHu&HEH(H6HEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHMUHH@H}HuHUHEHp HMHEкHHu HE؋@EEHEHEH}tUHuHMHEHHYHEHP8HEHHf E}<}2EHcHEHH$HEHHZUHE؉P,HE؋@8HHHEHP0HEH@0HHE؋@8‹EHcHEHHEH@0HHHEHP0HE؋@8HHE؋P8E)EEUHcHU؋R8HHUH4HUHJ@HHFHu!HEH@0HHEH@06HE@hHE؋@hHHHHHEHPpHEH@pHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pH HUH$HHEH@pHP HE؋@,HBHEH@pHP0HEH@0HHEH@pHP0HE؋@8HBHEH@pHP@HEH@HHHEH@pHP@HEH@PHBHEHt2HEH@HH}t HEH@UHH`H}HuHUHEHp HMHEHHu lHE@EEH8HEH}UHuHMHEHHHEEEHEH0HEUHEHЋEEEBEUEHHEHHEHHEԃ}UԋEEEE;ErHEH0HdHEȋUMHEHHEHHsHt/EEEE;EGHEH/HEH0HH}t HEHHUHH`H}HuHUHEHp HMHEHHu THE@`HEH@XHE@EEHkHEH}UHuHMHEHHqHEEEEHEH@HHEH@XHtHEH@XHHEH@XH}t HEHHUHH H}HuHUHMH}tHEHHHE HH茿*HEHpHMHE HHu HE@tWw ttcrE=HUHMHEHHHUHMHEHHBpHUHMHEHHWHUHMHEHH>HUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHH#HEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾZ@HEH}t HUHEHEH{ÐUHH}HuHEHExHEƒHEHEHx7HEHEH ЉHEUHEHxMHEHEH HEH ЉHEHEHxcHEHEH HEH HEH ЉHEHEHxsHEHEH HEH HEH HEH ЉHE]UHH}u}vs}?vT}v5}vEȀHEHEEȀHEHEEȀHEHEEȀHEHEEƒHEHE]UH}}w5}?w%}w}w]ÐHl$Ld$H-w L%h H\$Ll$Lt$L|$H8L)AIHI1蹸Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH, %u%lu'%-.*s']parsing failed: %s ER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not exist.snap.xlog rXLOG SNAP 0.11 okfailmemory allocation failedfile type mismatchfile version mismatchfile crc failed or bad eof markersystem error%s (errno: %d);\@Բhسj(ƵH޵hʶ·8ں`p2W W0Pp#838xXxNt8X; ;( P p )  )0 P #p M W  0 P >p p  0 HP lp   @ ` J   i0P(p~` zRx *zPLRx@ $$DH x@AC C $Ldx@AC  zRx (BAC } <JfAC a \AC  |Z6AC q p&AC a vAC S nAC Y lAC S d|AC w <:AC u $ڱ*x@AC  $P9x@AC K $ҴHx@AC  rAC  $dVx@AC  %AC ` <3AC n $dx@AC } KAC F :AC u 9AC O $-~AC Et  AC O ,x`AC [ LZAC U lAC  ͻFAC A DAC  +AC f ##AC ^  &)AC d ,/_AC Z Ln#AC ^ lt$AC _ xdAC _ AC  $<"x@AC  $dx@AC  %AC  <AC  \$AC _ |xAC s $  kx@AC f NAC  }AC x uAC  $"OAC J DQyAC t dfAC a !AC \ yAC t JAC | *AC e AC  $AC | D*AC e dAC  AC | S*AC e ]AC  CAC ~ AC Z $7AC r DAC  dx$AC _ |qAC l BAC } $AC _ ;AC v $t  x@AC  , jAC e $ <x@AC  t $AC _  AC   ])AC d  fAC   AC   AC  4 @ AC  $ -x@AC  $ x@AC   1UAC P  fjAC e $T y@AC   hAC  , %AC  L KAC F $l Jf@X 8  2 %  \? 6xO$)r       F h ( ,w,d  0@@ @ 4_@ y`(y`o`@@@ 0  {`p0@@0 o@oo@8y`@@@@@&@6@F@V@f@v@@@@@@@@@@@&@6@F@V@f@_@_@_@_@_@_@_@`@H`@W`@t`@`@`@`@`@`@a@ a@a@!a@6a@Ea@\a@ja@ua@a@a@a@a@a@a@a@a@a@a@b@ b@b@$b@2b@=b@Kb@Vb@db@ob@}b@b@b@b@b@b@b@b@b@c@ c@)c@5c@>c@Jc@Sc@_c@hc@tc@}c@c@c@c@c@c@c@c@c@c@c@c@c@d@Od@Yd@qd@d@d@d@e@e@5e@Je@_e@te@e@e@e@e@e@f@:f@Hf@f@f@f@f@f@f@g@g@)g@@g@dg@xg@g@g@g@g@g@g@?h@Bh@Gh@`h@sh@h@h@0w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V00@GCC: (Debian 4.7.3-4) 4.7.3,\@J ,S @<,@# ,+)@?,/H,@,1D-@ ,8`:@,`G@C@,=OD@,SH@,|_[@ \@@8:int(?*ei1my5=0F3To78 02  ~     \    S J m /i 0# len1# v2# 5 ns6# l 7# : ns;# L> ns?# l @# C nsD# l E# H l I# LZ nsM# N# O# P# # 6$# %# &-# T'?# 4 ptr5#Z 8 99# /:# T;?#  +& E-w# f.-# L( &K h 'i# t (Z# ( +p h ,# t -Z# x( 0 h 1# t 2Z# n 5 op 6# 7#  8#  9# :# ;# p H >b h ?# t @Z# ops A#(  B#0 opv Cb#8 opc D#@ @ G h H#  I#  J#  K#  L# t MZ# S P h Q# l R#H Y5 Z&_ [Kdel \p ]h ^ _ x U  V# r W-# h X2# r `# vc a?#h v b#p 0 # op $# v %#  &# l '# (# / )#( X & T '?#  (# )# / * # 0 ++# g ,L#( " -g#0 1 .#8  /#@ 0w#H  1#P v 2#T-?5+-?FF1?gR?m #  z  ^ 1 0 -3 tu .# B /# ^ 0# 1# & 2# x 3?#  4#(  Ag l Bg# tu C# ( D# B O s P# r Q5# ( \ s ]# t ^Z# k8 i s j# r k#N s  5  9 3' ml    z {# W |# T }?# *  # > #  # #(?  5     )\@@ tu)~ifl+5 ~@N@ 0h 1d@@l i4`@4@i7XE?@@` E?}#E }sJiP5 }@>@isT h>x8A*eint=0@(?:in1:#$c#%c#&5# x Q     *     ' 5 C y ^ l z         k    z   ! I" U# a$ m% && ' ,( ) * + , - . / L0 X1 2 3 :4 5 6 7 8 9 : u+ \9   @|`c @@8:int(?*e ij ii1 X{m5 0  k ?# # J # t # # #( #0 #8 r #@ V #H #P #X  #`  #h B  ?#p x ?#t p#x ~ M# [# # r # &{#  /# 0# 1# 2# 3-# 5?# 7#   )# # Q ?#    +A E-# f.-#=0F 1M3To78m / 0W#len 1W# v 2W# 5ns 6W# l 7W# :ns ;W#L >ns ?W# l @W# C6ns DW# l EW# HQ l IW# Lns MW# NW# OW# PW#  # 6 $W# %# &-# T '?# 4ptr 5# 82 9 92# / :W# T ;?# L( &]h '#t (#( +h ,#t -#x( 0h 1#t 2#n 5op 6A# 7W#  8#  9W# :W# ;#  H >th ?#t @#ops A#(  BW#0opv Ct#8opc DW#@@ Gh H6#  I#  JW#  K#  LW#t M# S Ph QQ#l R#H YG Z8_ []del \ ]z ^ _x U  V# r W-#h Xm#r `# vc a?#hv b#p0 #op $W# v %W#  &W# l '# (# / )W#(X & T '?#  (# )# / * # 0 += # g ,^ #( " -y #0 1 . #8  / #@ 0#H  1W#P v 2W#T-?  G = -# ?X X C ?y  d ?    d %  ! 1    0; M 1W#lsn2b#tm3; # len4W# 5W# 8x tag9L# 1 :b#op;L# 8 > tag?L# 1 @b# AW# BW# CW# F     xL rMGtNHQN hdrR #rowSB #  Tx #( UN #@ < X Y #fdZ # [# \# 0] #  ^E #( ` #0 a #x l b #  c?#?    T W ?E  WN & W #f log$T # .@@ s.Xss/ hK $ 6?@P@  s6Xt6Pss8 hrow: ` D NP@:@G sNX P?l q?:@p@ sqX qPssr h p@@@ sXss h W  @@sh @@7sh!q ?@@`sh @)@8:int(?*e ij i1 X{5 0  k ?# # J # t # # #( #0 #8 r #@ V #H #P #X  #`  #h B  ?#p x ?#t p#x ~ M# [# # r # &{#  /# 0# 1# 2# 3-# 5?# 7#    )# # Q ?# +0 E-# f.-#=0F 1M3To78 m / 0F# len 1F# v 2F#  5 ns 6F# l 7F#  : ns ;F# L > ns ?F# l @F#  C% ns DF# l EF#  H@ l IF#  L ns MF# NF# OF# PF# # 6 $F# %# &-# T '?#  4 ptr 5#  8! 9 9!# / :F# T ;?#  L( &L h '# t (# ( +q h ,# t -# x( 0 h 1# t 2# n 5 op 60# 7F#  8#  9F# :F# ;# H >c h ?# t @# ops A#(  BF#0 opv Cc#8 opc DF#@ @ G h H%#  I#  JF#  K#  LF# t M# S P h Q@# l R#H Y6 Z'_ [Ldel \q ]i ^ _ x U  V# r W-# h X\# r `# vc a?#h v b#pd  % ! 1     0% M 1F# lsn 2Q# tm 3%# len 4F# 5F# 8b tag 9;# 1 :Q# op ;;# 8  > tag ?;# 1 @Q#  AF# BF# CF#  F    x Lr M6t N H Q8 hdr R# row S,#  Tb#( U8 #@ < X Y# fd Z # [# \# 0 ] #  ^/ #( `#0 a#x l b#  c?#?    > F ?/  F8  m *a +# { ,#D -@`@  -Xext0h;?`@@  l; he;d F?@ @0 lF X FP GFl X? @"@ lX HbufX @ X  ^h _FXM tF` F\!@U!@ce?dE?"@#@@\ l Hbuf@ F 8 \`off-Xrc?l?#@@$@ l XbufP FL 8 @tuh4 / @$@%@/ l H 8 @bufď` F\rc?l8/ %@'%@`h l h ?'%@Z%@ l heۖd Z%@'@ Rl } } }@ rc`Zh/'@'@buf R}bq'@'(@ l h!R  ?'(@a(@ l  h"  `#d &a(@u(@@  l& h!`;u(@(@i l; X(@(@msg=R `#_ F?(@)@  lF h5 $%/ `% &! B h@'F& C  h@=)@G,@(?:*eint1>=0)37z>_)@h)@` buf_X _oPpahcrcbd   z Fh)@)@ fcrcÅ\bufP oHph )@+@ crcL@Hlil `\hd  )+@,@ R\P7XlR,@G,@ Rl`7ha# @` @`! @`4Y @` @`J @`0 @``9 @`vq @`0 @`H,@A-@K 8:int(?*e15f!ww- Y(wH,@s,@@  T(X ptr)wh L/ws,@,@ 2 /-h 3w,@,@ u ptr3wh 3-` @7y,@-@`  sz7yX len8-h szp9y`v@-@A-@  ptr@wh%  @`D-@]:@ 8:int(?*e15/( p  mT# T# w# Xw#6f3T 0x~ \SJ # 6$# %y# &-# T'?# 4ptr5#x 8 99# /:# T;?# f0D-@h-@ Jt0hu;h-@-@ yt;hY-@R/@ tYH Y@ Y [?l|g?hh-`!jyXR/@ 5@@et}fmt}~p~0@1@len?~sy~1@?2@sy~?2@2@i?~2@P3@ull}U3@3@!ul8}3@]4@Elldž}_4@4@li}Z? 5@5@bufH -@'-h6d<5@5@&\x?`w5@6@ctXbufP -H ?ll t6@'6@o7@`t'Xbuf'P '-Hnum'D )?ll 7V7@Do7@7@lDhJO7@ 8@ YlOX iRlc 8@v9@lc~k~! ptrn~">v9@]:@lXtP ?l!y`| E`:@>C@4:int(?*ee1mu5=0B3Pm / 0# len1# v2#5& ns6# l 7#:@ ns;#L>h ns?# l @#C nsD# l E#H l I#L nsM# N# O# P#  #4 6$# %# &)# T';#4O ptr5O#8 99# /:# T;;# 4+ E-s# f.)#L( & h '# t (#( + h ,&# t -#x( 0* h 1@# t 2#n 5 op 6# 7#  8#  9# :# ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J#  K#  L# t M# S P h Q# l RU# H Y Z_ [del \ ] ^Z _x U$  V# r W)# h X# r `# vc a;#h v b$#p0 # op $# v %#  &# l '# (U# / )#(X &? T ';#  (_# )# / *# 0 +# g ,#( " -#0 1 .#8  /)#@ 0s#H  1#P v 2#TYY)?Y$;eYY);Y*;Y;YO)Y #Zz^10 - tu .O# B /# ^ 0# 1# & 2# x 3;#  4#( A l B# tu CO# ( D#UB O' s PY# r Q#( \L s ]Y# t ^#k8 iq s jY# r k*#N s  Z9 ' l L ' z9 {/# W |q# T };# * O # > a #  a # #(;I I 9 a I U ,I `:@:@@ i,I h:;:@<@ i:I Xip; hZ/b<@<@ ibI Xipc hyI <@r=@`e iyI XtyOPip h;r=@=@ iI Xil h=@=@  iI Xil hI =@r>@1 iI XlPil h;r>@>@} iI Xir} hrc;dL>@?@@ iI Xir} hkI ?@?@ iI XsYPir} h;?@'@@V iI XirV hrc;d'@@Q@@` iI XirV hBI Q@@@@ iI XsYPirV h ;@@[A@ 4 i I Xis 4 hrc;d'[A@A@x iI Xis4 h +I A@B@ i+I Xs+YPis34 h!AB@QB@@ iAI h U;QB@pB@.iUI h!dpB@B@_idI h"vI B@>C@`ivI XtvOP#vL$ x;l @C@D@4:int(?*ee1mu5=0B3Pm / 0# len1# v2#5& ns6# l 7#:@ ns;#L>h ns?# l @#C nsD# l E#H l I#L nsM# N# O# P#  #4 6$# %# &)# T';#4O ptr5O#8 99# /:# T;;# 4+ E-s# f.)#L( & h '# t (#( + h ,&# t -#x( 0* h 1@# t 2#n 5 op 6# 7#  8#  9# :# ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H#  I#  J#  K#  L# t M# S P h Q# l RU# H Y Z_ [del \ ] ^Z _x U$  V# r W)# h X# r `# vc a;#h v b$#p0 # op $# v %#  &# l '# (U# / )#(X &? T ';#  (_# )# / *# 0 +# g ,#( " -#0 1 .#8  /)#@ 0s#H  1#P v 2#TYY)?Y$;eYY);Y*;Y;YO)Yk6@C@dC@~s6YXv6Told8lFYdC@C@ sFYh|\C@D@s\YhqD@H@4:int(?*ee1mu53P #6$# %# &)#T';#4 ptr5#8N99N#/:#T;;# m / 0# len1#v2#!  s 0# op$#v%#&#l '#(#/)#( /D@] ns?#l @#C nsD#l E#Hl I#L nsM#N# O#P#  #)6$# %# &)#T';#4D ptr5D#899#/:#T;;# )+E-s#f.)#j $  s L( & h '# t (#( +% h ,# t -#x( 0J h 15# t 2#n 5 op 6# 7# 8# 9# :# ;#  lH > h ?]# t @# ops A#( B#0 opv C#8 opc D#@J@ Gz h H# I# J#  K# L# t M# S P h Q# l RJ#H Y Z_ [del \% ] ^z _x UD V#r W)# h X# r `# vc a;#h v bD#pC2H@H@yr2yhT?H@uJ@ r?yhwuJ@J@rwyhbufw` w)XL};J@\L@cr}yXrcv}Pptr}sH lbuf`;\L@N@@ryXrcvPptrsH lbuf`x;N@O@7ryXrcvðPptrsH DZlbufȀ`;O@R@ryHrcv@ptrs lbuf`l R@|;\S;R@T@`ryrcvptrs \buf Pl =gT@i&l/&Loff'h`j,d6,H -`tu6DS@S@&/x0;DE;T@9Y@ rEyrcvEptrEs K\bufLPl X@iRl6RLksShbDpp`NU@U@ &UxV;HV@eW@opr|z; x;9Y@Z@ p ryhrcv`ptrsXhdrp PZ@Z@ ptr XbufP! Hsrchoff `s ;Z@[@ rybuf! )off hdrp )Xptr @rc;d[@[@ep h)"s lO#5[@^@:int(?*en1n53E(&0[@]@@ buf&|h &`  K]@N^@ !bufKhh Kd \0N^@^@! \l% : ; I$ > $ >   I&I : ;  (  : ;  : ; I8 : ; I8 I!I/  : ;  : ; I : ; I' II'  : ; .: ; ' @B : ; I 4: ; I  4: ; I  .? : ; ' I@B : ; I % $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?  % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % : ; I$ > $ >   II!I/  : ;  : ; I8 : ;I8 : ; : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;.? : ; ' I@B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I  4: ;I .? : ;' @B  : ;I !.? : ;' I@B ": ;I #.? : ;' I@B $4: ;I %4: ; I? < &4: ; I?  '&I% $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?  % : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I% $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantoolsnap.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.hctype.h \@(!Yug(g:2S6rtf埾u"Z/2 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.cp /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_snapshot.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_reply.htnt_stream.htnt_log.htnt_snapshot.h @-2I1tvttY.uKgvK .u . . . .  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_log.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_log.h @,uuKuuKuKuY1gY4uu('0/1>ugx/guF  (w @[KuY+M13iwr.g/3jH=sվu0ttY1ugugv!0g1Y2ك"#uuh00"gK#uYJN0=10.HgI,vv /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includecrc32.cstddef.hstdint.h )@u/+Y./+=.K"eJ!KKO;ZZ:]kJ"eJ=4#gZ/=4!gZ>; /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_mem.cstddef.htnt_mem.h H,@'uK0K0g0=uuK0KCI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_tuple.cstddef.hstdarg.hstdint.htnt_tuple.hctype.h D-@/Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h `:@+uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h @C@6= .uYhuuYK .H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h D@.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h H@2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> v>?www*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvwww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  www|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwvwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vwwwvwwwuvuvwvwwwzwzvw    9= y .symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N @ V@0^o@ko@pz@00@0p @@p@pE4_@4_ @_@@_ h@hk@kL  x@ x y` y(y`(y0y`0y8y`8y{`{ {` { |` |(. ``H  0Hd0)`5c C9O09Z|P`!eqlrs`}%m (\ @@<@`@@@@@ @ 0@ @ @ p@4_@@_@h@k@ x@ y`(y`0y`8y`{` {` |``` !" 0y` @. @A @Wh`f(y` 0@ y` \@H @B @f `@:' @3 @P@ "@U #@n '%@3``@` h)@Z@`@`@`@`@`1@`G@`]@`s )@ +@F@` 5@ `:@} :@ <@O r=@f# =@!8 r>@L >@*` ?@v '@@* @@ [A@* G@j J@ \L@ N@) O@ : R@M T@` Z@joyx@0y`(y`(|`8y` y`H` {` 0_@ uJ@)'<Tr   |` G@ B@ Z@ 9Y@U`` 6@ )@` A@* 5@8 7@xF ,@DMH`Th4_@n -@# D@$ [@h@ ?@   @|. wD@ =P s,@#^ :@6p D-@$ '@K |` Z%@ @$@ "7 ]@EX h@o@_@~ R/@ <@y p@&@ ^@ #include #include #include #include #include #include #include #include #include static char *opname(uint32_t type) { switch (type) { case TNT_OP_PING: return "Ping"; case TNT_OP_INSERT: return "Insert"; case TNT_OP_DELETE: return "Delete"; case TNT_OP_UPDATE: return "Update"; case TNT_OP_SELECT: return "Select"; case TNT_OP_CALL: return "Call"; } return "Unknown"; } int main(int argc, char * argv[]) { if (argc != 4) { printf("usage %s: host port limit\n", argv[0]); return 1; } struct tnt_stream s; tnt_rpl(&s); struct tnt_stream sn; tnt_net(&sn); tnt_set(&sn, TNT_OPT_HOSTNAME, argv[1]); tnt_set(&sn, TNT_OPT_PORT, atoi(argv[2])); tnt_set(&sn, TNT_OPT_SEND_BUF, 0); tnt_set(&sn, TNT_OPT_RECV_BUF, 0); tnt_rpl_attach(&s, &sn); if (tnt_rpl_open(&s, 2) == -1) return 1; struct tnt_iter i; tnt_iter_request(&i, &s); int limit = atoi(argv[3]); while (limit-- > 0 && tnt_next(&i)) { struct tnt_stream_rpl *sr = TNT_RPL_CAST(&s); printf("%s lsn: %"PRIu64", time: %f, len: %d\n", opname(sr->row.op), sr->hdr.lsn, sr->hdr.tm, sr->hdr.len); } if (i.status == TNT_ITER_FAIL) printf("parsing failed\n"); tnt_iter_free(&i); tnt_stream_free(&s); tnt_stream_free(&sn); return 0; } tarantool-1.5.1.218.g1a69fd6/test/connector_c/update0000775000000000000000000045034712213333047020456 0ustar rootrootELF>"@@H@8@&#@@@@@@@@@$$ ``h ``@@DDPtd@@Qtd/lib64/ld-linux-x86-64.so.2GNU GNUݶ@2=!Zza" *@(B QBF" l $%N| D Tm @@@F@G)E@ A cI@v M@j c'@N &@^T@ <@ $@lh` +@2x $@C i@_ 9,@| h@#U 8@# 7@94` |@ @- 8N@9 @$ @$ u@  p@E +@>s ~@7 >@ @0 ~@ ri@# NY@ @; œ@)  @9 `+ @K h@+. Z@ 1@ h@$ -@N #@8 4@, ʇ@6 '@G &@: ~@ (@ -P@t  @7 i@d *Q@ >a@1 r@% \@M _t@k i@$ Q@ libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6socketexithtonsputsputcharstrlengetaddrinfomemsetwritev__errno_locationgetsockoptmemcpysetsockopt__ctype_b_locstderrgettimeofdayfprintffreeaddrinfofcntl__libc_start_mainsnprintf__libc_csu_finiprint_tupletnt_io_closetnt_strerrortnt_updatetnt_request_setoriginfail_tnt_perrortnt_opt_freetnt_replytnt_io_connecttnt_fieldtnt_update_arith_i32tnt_requesttnt_request_fromtnt_io_sendtnt_tuple_set_astnt_iter_storagetnt_inserttnt_tuple_settnt_list_free_edatatest_suite_setuptnt_mem_freetnt_opt_setupdate_insert_i32tnt_reply_inittnt_enc_readtnt_io_flushtnt_iter_replytnt_buffail_tnt_errortnt_update_inserttest_simple_settnt_io_send_rawtest_boundary_argstnt_reply_fromtnt_flushupdate_insert_strtnt_mem_alloctnt_tuple_initupdate_splice_strtnt_errnoselect_tupletnt_close__data_startupdate_set_strtnt_fdtest_multi_arithtnt_connecttnt_update_spliceupdate_set_i32tnt_settnt_io_sendv_rawtnt_enc_write_IO_stdin_usedtnt_tupletnt_itertnt_netinsert_tupletnt_io_sendv__libc_csu_inittest_delete_fieldtnt_reply_freetnt_update_deletetest_splicetest_set_and_splicetnt_list_inittnt_error_codestest_long_settnt_iob_init_endtnt_request_inittest_insert_fieldtnt_mem_realloc__bss_starttnt_selecttnt_io_recvtest_arith_i32tnt_tuple_addtnt_iter_requesttnt_nexttnt_stream_freetest_suite_tear_downtnt_opt_inittnt_update_arithtnt_update_arith_i64recv_commandtnt_enc_sizetest_arith_i64tnt_iter_listtnt_request_freetnt_iob_freetnt_rewindtest_appendtnt_listtnt_stream_reqidtnt_stream_inittnt_inittnt_mem_inittnt_tuple_freeupdate_delete_fieldtnt_mem_duptnt_iter_freetnt_list_attnt_io_recv_rawtnt_update_assignGCC_3.0GCC_3.3.1GLIBC_2.3GLIBC_2.14GLIBC_2.2.50P&y 5a_& =ii GQui \``P` `(`0`8`@`H`P` X` `` h` p` x```````````[`<``````` `!HH] HtKH5R %T @%R h%J h%B h%: h%2 h%* h%" h% hp% h`% h P% h @% h 0% h % h % h% h% h% h% h% h% h% h% h% hp% h`% hP% h@%z h0%r h %j h%b h%Z h1I^HHPTI@H@HǬ#@o`UH-h`HHw]øHt]h`h`UH-h`HHHH?HHHu]úHt]h`=! uUH~] @H= tHtU`H]{vUHu& 6 &;%]UHHH}HD HUHѺHaHy ê@H HD,Hy Ϊ@iت@UHH0}HEHOHEHQHEUHEߪ@HǸFH HUIAHfHy @Hl H+Hy Ϊ@@lHEHNH%UHH }HuE¾ߪ@!FHEH HMHUIHѺHndHy @<H H*Hy Ϊ@HEHC@UHH H}uUuHUHEHbE}yEƿ @UHH0H}uHUHEHuHUHEHaE}yEƿ @DUHH0H}uUMLEHEHHNjUuLEЋMHEIHaE}yEƿ@UHH H}uUHEHbE}yEƿ1@UHH H}uUuHUHEHbE}yEƿC@hUHH0H}uHUHEHuHUHEHNbE}yEƿU@UHAVAUATSHHhH H HHSH H0HEHED`(HEDpHEDhHE؋Ht H)HHhD$$EEHƿp@$HEHPHpHHQHHEHEHyHpHVuHpHUH HU0$u @.H HU HHĐ[A\A]A^]UHHH8E(H8H@HHPHEHEEEEt@EEtEw ttVtpHEHEƿ@HEHEƿ@ZHEHEƿͫ@;HEHHEHHƿ٫@]HUEƿ@CH@HhTDuAH) H$!@AnA@E@J@h@HǸYH@HS@fHUHHT"H H HuAH H$@A|A@E@@h@HǸ$Hm @HǸ"HO HǸ"H1 HǸ"H H#u @gH H$u @IUHHѽ HbT]UHHH}uUHEHƿǬ@EUHHH}H H%HHEHƿլ@AUHH@@@A@A@?HEHEHHEH= @a|XHEHE!@HfHE@HPHE1@H:HEHƿMHEH S6@XHEHEB@HHEP@HHE{@HHEHƿHEHRWHE𿍭@eHEH4HEHƿHEHKR@@~UHH@@`@A@A@@ĭ@b=HEHEHHEH\;Э@VHEH HEHHEHƿHEH|Q@YtVHEHE@H^HEHƿqHEH1Q@@dUHHߴ@@F@@(@T<HEHEHHEHN:UHE-@HEA@HHEHƿHEHpPrUHEH@?HE\@HRHE!@HO@THE𿰮@ H& HE HHEAϮ@  HKHE HsVHE HXVHEHƿHEHNSHEخ@iHE@ᆳH|HEHƿHEHONߴ@@UHHд@@d@AA@f9HEHEHHEH`7 @RHEHEH;UHEHƿHEH}M@ZuRHEHEHTHEHƿmHEH-M*@ %RHEHEHTHEHƿHEHL?@QHEHEϺϺHKTHEH0THEHƿHEHrLI@OjQHEHEHSHEHSHEHƿGHEHLT@PHEHEHuSHEHZSHEHƿHEHKд@@UHH @@@G$AA_@6HEHEH/HEH4 @ PHEHEHRHEHƿHEHJ@OHEHEHHbRHEHƿHEHnJ*@KfOHEHEHH RHEHƿYHEHJ?@OHEHEHϺϺϺϺHQHEHHQHEHƿHEHII@NHEHEHHFQHEHH)QHEHƿuHEH5IT@-NHEHEHHPHEHHPHEHƿHEHHp@MHEHEH.PHEHƿHEHpH@@UHH@@@A@A@@3HEHEH HEH1@LHEHEHHE𺳯@HHEH0OHEɯ@HHEHNHEHƿHEHAG@@tUHH@@V@A@A߯@@ĭ@X2HEHEHHEHR0KHE@HEA@HHEHƿHEHiF@FaKHEHEA@ HHEHƿSHEHF'@ KHEHEA@H8HEHƿHEHE;@JHEHEAV@HHEHƿHEHgE`@D_JHEHEAx@'HHEHƿQHEHE@ JHEHEA@H6HEHƿHEHD@IHEHEA@HHEHƿHEHeD@B]IHEHEAҰ@HHEHƿOHEHD@@BUHH@@$@A@A߯@@ĭ@&/HEHEHHEH -@jHHEHu HEHmHEA@-HHEHƿ_HEHC(@HHEHER@HH HEIйH*HEHƿHEHBX@GHEH HEIйHHE@HlHEHƿHEH?B@@rUHH`p@@T@D$H D$@ D$8D$0D$(D$ D$D$D$$A@A߯@@@-HEHEHHEH+@KfFHEHEHHEHƿhHEH(Aȱ@ FHEHEHHEHHHEHeHHEHJHHEH/HHEHHHEHGHEHGHEHGHEHHEHƿ4HEH?@DHEHEHHEHvHEHeHEHTHEHCHEH2HEH!HE HHE HHEHƿfHEH&?@DHEHEHHEHHEHmFHEHRFHEH7FHEHFHEHFHEHEHEHƿhHEH(>@ CHEHEA@H HEHHE𺸭@HHE𺸭@HHEHhHE𺸭@HHE𺎮@HHE𺕮@HzHE𺛮@HdHE𺡮@HNHE)@H8HE0@ H"HEHHEHHEHƿHEH<6@AHEHEHfHEHUHEHƿHEH|<P@OjAHEHEᆳHHEHƿlHEH,<p@@UUHHP@@7@q@ (@E'HEHEHHEH?%x@@HEHEHtHEH^HEHƿ HEHK;@(C@HEHE HHEHƿ@HEH;Dz@?HEHEHHE HHE HHEHƿHEH:@f?HEHEHQHEH;HE H%HE HHEHƿHEHEHHEHƿHEH9@>HEHE HOHE HcHE H#HE H7HEHƿdHEH$9@A 1@5@s$HEHEHHEHm"=HE<@HEHxHEH?HEHqHEH?HEH@HEH*HEH?HEHi?HEHN?HEHHEHHEH?HEH|HEHfHEHPHE H:HEHƿgHEH'7P@<HEHEu@H3HEHƿHEH6P@@UHH 0@@E@}@!HEHEH{HEH@<W;HEHEHƿjHEH*6@";HEEHEH=EE;E|HEHƿHEH5@:HEEHEH*=EE;EHEHƿHEH]50@@ÐUHH H}HEH@HHEHEHHEHHzHEHHhHEHHEH@HH,HEH@HUHH0H}HuHUHEH@HHEHUHMHEHHUHH0H}HuHUHEH@HHEHUHMHEHH5HEH}tHE@PPHEPPHEUHH0H}HuUHEH@HHEUHMHEHHHEH}tHE@PPHEPPHEUHHH}HuHEPhHEHHpHEHH{UHH0H}HuHUHEH@HHEHUHMHEHHUHHH}HuHE@Pu&HE@PPHEPPHUHEmL@H@UHHH}HuHUHEmL@HoUUHH H}H}EHEHv2HEH}u fHHEHPHHEH@HHu}t HEH2HEH@HHHEH@ TK@HEH@(L@HEH@0L@HEH@8HEH@K@HEH@K@HEH@=L@HEH@@J@HEH@HHEHE@|HEH*HEUHHH(H`HhLpLxt )E)M)U)])e)m)u)}$H(H@HHHDž0Dž40HEH8HPH@$HHH0HHHHHuH]UHH H}HEH@HHEHEHpPHEH@HHHEH@@HHE@XHH}HIH]uHEǀHEHHhHEH@`HHE@pHHuHIȹH uHEǀFHEHHuHEǀ%HE@uHEǀUHH H}HEH@HHEHE@xt HEHEHEPHEHHEHHHEHEtUHH H}HEH@HHEHEH5 UHH H}HEH@HHEHEHL UHH}HEH@HHEHE@|]UHH}HEH@HHEHE]UHSH(H}HEH@HHEHE苀uAHE苘HE苀AHC@``HE苀HHH`H@H([]UHH}HEH@HHEHE]UHH0H}HuHUHMLEHEHUHP HEHUHP(HEHUHP0HEHUHPHEH@HEH@HEHH}tAHEHqHHEHHEHHuHEHHUHUHHH}HEHHtHEHHÐUHH0H}HufEHEHHEfE܉THUfBHEHUHEHѺH7u7HEH@HHHEHHHHEHCHEHt HEH'HUHH H}uHE@|ǸE}u1HE艐S}t MeHE@|UǸ-uHE艐UHATSH0HHHHEHHTE}tEGHHE}tE"HEHH@|HΉ$sHE@BHH@HEHEHEHuHHHPHUH@HEHHHHADeԉ]H@|P?HHcHHR|ʃ?)ʿHHHH HHH@|xHUHIйH¾(Ẽ}t H`HkuHxH`HEHH)HHEHhHUHH)HHHEHEHUHH)HHEH} HEHH?H}HEHEHH?H}HHEmH}u Dž|DžxH@|HxH|IHѺt |tH|u |HBmH'HHE}tE HH0[A\]UHH H}uUE}uE@EEEUEHE@|HMUAu EE EEE;E~UHH H}EHE@|HUAHѺHEPXHEH$HEPpHEH HEHP0HE@|AHѺ+t8HEHP HE@|AHѺt HE艐UHH0H}HuUܺ;HUB|HE@|ydHE艐YHEHE}u1UHMHEHH]E}uHE@xHEHEUHHH}HE@|~HE@|HE@|HE@xUHH H}HEHHuNHEHHEHHEH)HEH}u HHEHǀHEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|HEH}u tH}(HEǀ~HE艐H HEHEHEH;Et }&HEUHH0H}HuU܉MHEHEHHt5HEH}NUHMHHuHHE/HE@|UHMHΉHEH}u tH}+HEǀHE艐HHEHE}ucqHEHPHEH9v.HEHHEHHEHHEHPHEH)HEHP(HUHEH@HH)HHEHEm}}HEUHH0H}HuHUHEHHuHUHuHEHt HEHH;EsHEǀHHEHHEHHEHH9wPHEHHEHH HUHEHHKHEHHEHHEHHElHEHHEHHEHHEH}u H1HEHUHHEHHUHMHHHEUHH0H}HuUEEHHHHEHHPEHHHHEHHHMHHMHHHHJHEHEHHHHEHH@HHEHEE;EoUHH@H}HuЉUHEHHuUHuHEعHvHEEEHHHHEHH@HEEE;E|HEHH;EsHEǀHHEHHEHHEHH9wUHMHEHHsHEdHEHHEHHEعHHEH}u H)HEHǀUHMHEHH HEUHH0H}HuHU؉MHEHEHHt>HEHHUHMHH)HUHMH4HUHHHHEAHEHUH)HEHMH4HE@|HEH}u tH}(HEǀHE艐H HEHEHEH;Et }&HEUHHPH}HuHUHEHHuHUHuHEȹHHEHEHEHEHHEHHEHH9w[HEHHEHH4HEHUH HEHHHEHHEHHEHHELHEHHEHHH)HHEHEHUHH)HHEH}t=HEHHEHH4HEHUH HEHHHEHEHEHǀHEHHEHHEȹHHEH}(!HEȉHEǀHgHUHEHHEHH;Er:HEHHUHMHHUHHɾHEHUHHE HEH)E7ÐUHHH}HExH"HE@;HE@p@HE@X@HEH@HEH@UHHH}HEHHtHEHHUHH0H}uHU؃} EHX@HEHHtHEHHKHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHHHEHHEHHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHHHEHH觼4HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH HEHH9HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHEHH0HEHH˻XHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP@HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPHHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPPVHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPXHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHP`HE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHHEHPhYHE؋0s$HEHPHE؋HHU؋JHU؉ HEHPHHJHUHJHEPpÐUHH}H HEH}t HEH HE]UHHH}H HUHֿUHHH}HuH_ HMHUHHUHH H}HEHHEHEHHHEH}uHEHPHMHEHH蔸HEUHHH}H HUHÐUHHH}HE HUHHH}HEH@HtHEH@HHEH@HEHEH@HE@t HEHTUHH@H}HuЉUH}EH}uO uHEH}u =HEغ H#HE@}u HE HEH@Hu HEH@Ẻ<EHEHPEHH‹EHHEHEH@HUHHBHEH}u}t HEHgHE؋PHE؉HMHEHHĶHEHPHEH‹ẺH;H}t)UHEHHEHHHEHHEHHxHEHUHPHEHUHPHEUHH HH`HhLpLxt )E)M)U)])e)m)u)}HHuEHHu Hu HDžDž0HEH HPH(HHHHHHHHH% t HHjHH<%t kHHHHl/l*t%dsuHHHHEHUHHEHHE@HHHEHHE@PHEPHEÐUHHH}H}tHEHêHELHEH}u0HEH苪HE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HH8-HEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHt,HEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@1w@HEH@x@HEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@y@HEH@,z@HEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHjHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEH'HEH}uYHEHEH@z@HEH@HEH@ G{@HEH(HEHEHUHHEHHtHEUHH H}HEH(HEHEHHHEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@{@HEH@HEH@ {|@HEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHfHEHH2HEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@.}@HEH@HEH@ }@HEH(HEHEHUHHEHHHUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHH}HEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾޣ@HEH}t HUHEHEH[}ÐUHH}HuHEHExHEƒHEHEHx7HEHEH ЉHEUHEHxMHEHEH HEH ЉHEHEHxcHEHEH HEH HEH ЉHEHEHxsHEHEH HEH HEH HEH ЉHE]UHH}u}vs}?vT}v5}vEȀHEHEEȀHEHEEȀHEHEEȀHEHEEƒHEHE]UH}}w5}?w%}w}w]ÐHl$Ld$H-8 L%7 H\$Ll$Lt$L|$H8L)AIHI1YxHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHHA long time ago, in a galaxy far, far away... It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the Death Star, an armored space station with enough power to destroy an entire planet. Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy....tnt_inserttnt_flushinsert%dtnt_selectselecttnt_updateupdate fieldstnt_update_assigntnt_update_splicetnt_update_deletetnt_update_inserttnt_update_insert_before%s: respond %s (op: %u, reqid: %u, code: %u, count: %u) tnt_next, %i (0x%02x)%i (0x%04x)%i (0x%08x)%li (0x%016lx)'%.*s'/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/update.ctrueifl.status == TNT_ITER_FAILTest failed: %s is %s at %s:%d, in function '%s' )tnt == NULLlocalhosttnt_inittnt_connectfail: %s: %i fail: %s: %s *** %s *** # insert tuple%d%d%d%s# test simple set fieldnew field valuefLaC# set fieldvalue?very very very very very long field value?field's new value# test set primary key *** %s: done *** thirdfirst%d%s%s%s# test set big value in empty field# test replace long value to shortshort string%d%s# test append fieldsecond# test multi append3other new field value# test append many fieldsfourthfifthsixthseventh# test append and change fieldac# test set to not an exist fieldinvalid!%d%d%d%d# test add# test overflow add# test underflow add# test or# test xor# test and%d%ll%ll%ll# test casting 32-bit operand to 64-bit%d%s%d%s# test simple andfirst field new valuethird field new valuehi, this is a test string!# test cut from begin# test cut from middle# test cut from end# test insert before beginBonjour, # test insert after end o_O!?# test replace in beginHello# test replace in middlefield# test replace in end! Is this Sparta# test set long string and splice to short away away away# test set short value and splice to longtest# test splice to long and set to shortshort name%d%s%s%s%d%d%d%d%d%d%d%d%d%d# test simple delete fields# test useless operations with delete fields# test multi delete fields# test append and deleteeighthninth# test double delete# test delete not an exist fieldeleven# insert new field before primary key# insert a new field before last field# double insert at the end# multi insert # insert before next to last field# insert second tupleone%d%s%d# multi insert# insert before invalid field numberooppps!%d%d# test: try to do update w/o operations# test: update w/ maximal allowed opearions count# test: update w/ grater than maximal allowed opearions counttest_boundary_argstest_insert_fieldtest_delete_fieldtest_set_and_splicetest_splicetest_multi_arithtest_arith_i64test_arith_i32test_appendtest_long_settest_simple_settest_suite_setupprint_tupleER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not existokfailmemory allocation failedsystem errorbuffer is too bigbad buffer sizegethostbyname(2) failedoperation timeoutbad argument%s (errno: %d) d@d@d@^e@e@:f@f@f@AC \IfAC  |gAC  hAC  kAC  3n,AC ' ?q/AC * Nr2AC - <`uAC  \wAC  | }FAC A 3AC z pAC k 9AC t YAC T 6WAC R <m0AC k \}9AC t |JAC E ,AC g ̄AC  $ȅ@AC  AC  $utAC o Dɇ&AC a dχ&AC a ՇAC X ҇ AC [ $҇AC E 4 AC [  4AC  ,҈)AC d $܈@AC  tAC  $<@AC J AC ~ AC  AC  J=AC x <gsAC n \AC  |PAC K ɑMAC H AC  GAC B AC  AC  <]AC X \ɗ)AC d |җAC  l+AC f w#AC ^ z)AC d _AC Z  œ#AC ^ < Ȝ$AC _ \ ̜dAC _ | AC  $D v+@AC  $l X@AC   yAC   AAC  , $AC _ L xAC s $ _kf@AC f  AC   l}AC x  ɨAC   vOAC J  yAC t 4 fAC a T D!AC \ t EyAC t  AC |  *AC e  AC   rAC |  Ӭ*AC e 4 ݬAC  T FAC | t *AC e  AC   CAC ~  =AC Z  <7AC r  SAC  4 ̮$AC _ T ЮqAC l t !BAC }  DQAC L  uAC   AC   iAC d װAC  40AC k $ u@AC  $$[@AC  AC   $l@AC  $d@AC  6AC q 46AC q T7AC r t/9AC t HEAC @ m0AC k }9AC t $@AC  $tC@AC > D$AC _ d;AC v $, @AC  jAC e $tܼ@AC  $AC _ AC  4)AC d TAC  tAC  BAC   AC  $|@AC  $[@AC  $UAC P DjAC e $ P@AC  AC  AC  >KAC F $pJf@X -n1   h<[)r       F h    !  N ( ,w,d  #@`#@ @ @``o`@X@H@ h `@`@0 o@oo@` @ @ @ @!@!@&!@6!@F!@V!@f!@v!@!@!@!@!@!@!@!@!@"@"@&"@6"@F"@V"@f"@v"@"@"@"@"@@0@6@9@H@@@@@@@$@2@M@]@u@@@@Ķ@Ѷ@@@ @@%@3@>@L@W@e@p@~@@@@@@ɷ@Է@@@@@@@-@8@F@Q@]@f@r@{@@ĸ@и@ٸ@@@@@@@$@-@9@B@N@W@c@l@x@@@@@@@@ @!@0@s@@ĺ@κ@@@@$@=@P@@@@@@@1@H@h@x@@@@ļ@ټ@@@(@L@`@@@@@@@Ľ@ݽ@@@ @$@6@ 0"@GCC: (Debian 4.7.3-4) 4.7.3,#@6',J@,!)Q@,i+R@,8\c@=,<h@,/>i@ ,BEv@,S@,[l@,fD@,In@>,Dz$@C,ӄh@,H@,(@V#@J@8intty+bii i&?m[cb?hi4 ?# # # #  # I#( #0 k#8 #@ #H #P #X  #`  #h  ?#p O?#t cp#x M# [#  # 8# g&{# /# ?0# F1# M2# T3-# 5?# [7## ) # * # ?#   3 0F3T` / 0>#len1># 2>#5ns6># 7>#:ns;>#>ns?># @>##CnsD># E>#jH- I>#,LqnsM># N># hO># P># 5 # $># s%# n&-# '?#w4ptr5#qk8 9# :># ;?# d += c -# x .-#( &bh '#t (q#( +h ,#t -q#( 0h 1#t 2q# 5 op 63# r 7># W 8 # W 9># n :># s ;#  H >yh ?#t @q#ops A#(  B>#0opv Cy#8opc D>#@K@ Gh H#  I #  J># $ K#  L>#t Mq#  Ph Q-#l R#H YL Z=o [bdel \u ]7 ^A _>x U Q V# = W-#h XI#r `# vc a?#hv b#pj0 # op $>#  %># L &>#  '#  (#  )>#(`X &  '?# ` (#  ) # , *" # { +B #  ,c #( -~ #0  . #8  / #@ s 0#H Q 1>#P  2>#T-  ?  L B -( ?] ] H ?~  i ?     # C>:0 -J tu .#  /#  0#  1>#  2>#  3?# 5 4#( A~ l B~ #tu C# # D># O s P#r QL#5( \ s ]#t ^q#48 i s j#r k#  s = L r  J   > \ z  { #  | #  }?#   #  #  # s #(?  L     !" k}#!w IO  ) Q# $# %# x&3#?#@9$@9$@$@` h $@]%@M keyLPhA]%@%@  key\dPkhJ%@9&@ dXrTP # ?l9&@&@XdXrT!strH #  ?lx&@&@@dXrThP.L @ # ?ld&@'@'dXrT # ?lY"'@c'@d"Xr"T"P # $?l+c'@'@`d+Xr+T!str+H # -?l3'@(@w3|"i5L ~#'@(@"r8] H"it?L |#h(@(@"tuB@WM(@*@ M~ Oo"iflRL ~$% !@#6)@.*@ sU` nV>\ % %y*@+@a$q @ q a&t+@+@+@+@@!msghF?d+@9,@ !msgh%9,@-@^$n @ h d` n ^%-@/@8$ @ h d`  %/@1@2$2 ߴ@ h d`%1@4@$ д@  h d%`  %P4@7@X$ @ Uh dZ`%>7@8@P$P @ h d`a%l8@0<@$ @ h d`%e0<@>@x$ @ h d`#%>@D@^$n p@ h d` n ^%gD@cI@8 $ P@ lh dq`^%cI@J@ s$ 0@ d X dP'J@GJ@S"i?l#|J@J@"i?h  stnt. `0 0`(z w )(y>7Vi =yint+0@tinQ#$c#%c#x&5# K x  i   l  Q   y    J % ? M [  v          #   '  3   4     `  ! z " # $ % W & 0 ' l ( ` ) @ * + ,  - . / 0 1 2 3 4 @ 5 6 1 7 8 : 9 : u+ \9   @`VJ@Q@8intty+diVi i&m   w# !# (  pT T# T# b # %# O 0F 3T` /  0j# len 1j#  2j# 5 ns 6j#  7j# : ns ;j# > ns ?j#  @j## C> ns Dj#  Ej#j HY  Ij#, L ns Mj#  Nj# h Oj#  Pj# 5 #  $j# s %# n &-#  '?#w 4 ptr 5#k 8: 9:#  :j#  ;?# d +i c -# x .-#n $tz ( & h '# t (#( + h ,# t -#( 0 h 1# t 2# 5c op 6_# r 7j# W 8c# W 9j# n :j# s ;# s pH > h ?# t @# ops A#(  Bj#0 opv C#8 opc Dj#@K@ G3 h H>#  Ic#  Jj# $ K#  Lj# t M#  PX h QY# l R#H Y Zo [del \u ]7 ^3A _s>x U Q V# = W-# h Xu# r `X# vc a?#h v b#p@!tj0#n op$j# %j# L&j# '# (# )j#(`X&# '?# `(C# )c# ,*# {+# ,#( -#0 .#8 / #@ s0#H Q1j#P 2j#T ==-n# c=?I ~=~i =- ?= ?=~ ?= =x0 |1# 2?# 3# 4# V5#0 6#@ 7#H 8#P 9?#X :#` {;#h ?#| + ? # @ # A # B?#2  s   #<  #(J@TK@  s(=Xsn) h  3TK@K@X  s3=Xbuf3Pn3-Hsn4 hm:K@K@ w s:=Xbuf:Pn:-Hsn; hrc<`CK@=L@  sC=XiovCPC?LsnD hrcE`L=L@mL@x  sL=hrL~` QmL@L@ x sQ=XbufQPnQHsnR h W?L@L@8  sW=hrW` _?L@M@  s_=hr_~`3o=M@8N@ B so=Xp?lsn `B?8N@%O@X  s=~opt?~sn ~T~A ?%O@-P@  s=Xsn h?-P@P@#s=Xsnˮ h( P@P@x_s=Xsnޮ hX P@P@s=Xsn h ;?P@ Q@8s=Xsn h! Q@*Q@""s=X#sn h$t $*Q@Q@"s$=H#sn% X%RQ@Q@#msg' `  p!6?Q@Q@X"s6=X#sn7 h G  p &  `D V#Q@R@ 8intty+ i&myd+ c-w# x.-#!  w -J "  : w ? 8$ buf%# off&-# top'-# n(-# tx)# txv*#( ptr+w#0 {*?Q@R@iob*hn*-`tx+Xtxv,Pptr,wH:?R@R@iob?h| VR@[c@ 8intty+diVi iuT&mhi   w# !#6i @% E%# 5 pKd+p c-# x.-#w! V/)   M # p#  p Gx V 9 #  7#  M#  h#b 1M 3T 7#Uxh !k!,)`+,./2U3:9;<e^ `\ g h  B# Fx p0 7 9?#F :?# ;?#t <?#  =p# > # ?#  @#(xx 0 | 1#  2?# 3# 4# V 5#0 6#@  7#H 8#P  9?#X :#` { ;#h ?#| + ?# @# A}# B?#9}R@S@x9VX|:P:ML?hL}S@'T@sLXsetL?TM?l'^}'T@W@8Ws^}^}^?}a# b}\T@~W@@nWP5oHGqPw~opt?~lenp~fdsz5}ret}?>U@eU@{?D{?@V@V@~D#}W@[X@sXopt?Tmin?Pmax?lavgThF}[X@NY@ sXopt?l6Y@O}NY@Y@X sXԹP?L# }loutY@ :Y@7Z@ sh7Z@Z@ sXrchZ@[@xz sXbufPn-Hall?Doff-hZ@[@!r`"[@\@ #sX#iovP$?L#all?H%-h[@\@!r`" 7\@F^@8j #s7X#buf7P$n7-H!rDh&MF^@^@ #sMX#iovMP$M?L!iN?l"X^@?`@B #sXH#iovX@$X?%n\-h!i]?d!rhX"q?`@>a@X #sqX#bufqP$nq-H#allq?D!offs-h^`@$a@!ru`'>a@[c@#s#buf$n-!lv-X!rv-P!off-h%-`a@Tc@!topH0"V;\c@h@intty+d^V^&  l# !w#  I#I#b #%# !b  I      O    ) x0|1#24# 3# 4# V5#0 6#@7#H 8#P94#X :#`{;#h <4#p .`       a  J .+\c@c@ opt+hb 6c@c@x opt6h =4c@h@' opt=X= T='Htvp?-h V>h@i@`8intty+&!ww- (wh@h@8 (X ptr)wh /wh@h@2 n/-h !3wh@i@u ptr3wh n3-` 7yi@ri@X sz7yX len8-h szp9y`@ri@i@ ptr@wh1%  `` VIi@v@8intty+& ( p  T# T# b w# %w# f3T 0x &/ 5 # $# s%y# n&-# '?# w4ptr5#x k8 9# :# ;?# 0i@i@Jt0h;i@ j@xyt;h Y j@k@tYHsY@nY[?lg?hh-`jyX5k@_q@8et}fmt}~p~Am@n@len?~sy~n@n@sy~n@ o@i?~1o@o@ull}o@p@!ul8}=p@p@Elldž}p@'q@li}?_q@q@bufHn-@-hdq@q@\?`q@r@ctXbufPn-H?lr@8'r@s@Xt'Xbuf'Pn'-Hnum'D)?l7s@Ds@s@lDhOs@_t@YlOX iRlkc_t@u@xlc~k~!0 ptrn~"u@v@lXtP?ly` Vv@@4intty+ e&mu0B3P` / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @##C nsD# E#jH I#,L nsM# N# hO# P# 5 #4 $# s%# n&)# ';#w4O ptr5O#k8 9# :# ;;# 4d+ c-s# x.)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# r 7# W 8# W 9# n :# s ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*K@ GZ h H#  I#  J# $ K#  L# t M#  P h Q# l RU# H Y Zo [del \u ]7 ^ZA _>x U$ Q V# = W)# h X# r `# vc a;#h v b$#pj0 # op $#  %# L &#  '#  (U#  )#(`X &?  ';# ` (_#  )# , *# { +#  ,#( -#0  .#8  /)#@ s 0s#H Q 1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y #ZC>:0 - tu .O#  /#  0#  1#  2#  3;# 5 4#( A l B# tu CO# # D#U O' s PY# r Q#5( \L s ]Y# t ^#48 iq s jY# r k*#  s= r Z   L> '\ z9  {/#  |q#  };#  O #  a #  a # s #(;I I 9 a I U ,I v@1w@8 i,I h:;1w@x@ i:I Xip; hZbx@My@ ibI Xipc h\yI My@y@Xe iyI XtyOPip h ;y@,z@ iI Xil hX,z@Mz@  iI Xil hI Mz@z@x 1 iI XlPil hR;z@G{@ } iI Xir} hrc;dLG{@q{@8! iI Xir} h4I q{@{@! iI XsYPir} ho;{@{|@!V iI XirV hrc;d<{|@|@X" iI XirV hI |@.}@" iI XsYPirV hB ;.}@}@#4 i I Xis 4 hrc;d',}@}@x#x iI Xis4 h 5+I }@b~@# i+I Xs+YPis34 h!Ab~@~@8$ iAI h fU;~@~@$.iUI h!d~@~@$_idI h"2vI ~@@X%ivI XtvOP#vL$x;lV}@k@4intty+ e&mu0B3P` / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @##C nsD# E#jH I#,L nsM# N# hO# P# 5 #4 $# s%# n&)# ';#w4O ptr5O#k8 9# :# ;;# 4d+ c-s# x.)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# r 7# W 8# W 9# n :# s ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*K@ GZ h H#  I#  J# $ K#  L# t M#  P h Q# l RU# H Y Zo [del \u ]7 ^ZA _>x U$ Q V# = W)# h X# r `# vc a;#h v b$#pj0 # op $#  %# L &#  '#  (U#  )#(`X &?  ';# ` (_#  )# , *# { +#  ,#( -#0  .#8  /)#@ s 0s#H Q 1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y6@@%~s6YX6Told8lmFY@)@&sFYh\)@k@x&s\Yh aVxl@C@4intty+ e&mu0B3P` / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @##C nsD# E#jH I#,L nsM# N# hO# P# 5 #4 $# s%# n&)# ';#w4O ptr5O#k8 9# :# ;;# 4d+ c-s# x.)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# r 7# W 8# W 9# n :# s ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*K@ GZ h H#  I#  J# $ K#  L# t M#  P h Q# l RU# H Y Zo [del \u ]7 ^ZA _>x U$ Q V# = W)# h X# r `# vc a;#h v b$#pj0 # op $#  %# L &#  '#  (U#  )#(`X &?  ';# ` (_#  )# , *# { +#  ,#( -#0  .#8  /)#@ s 0s#H Q 1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y #f s $# n %)# r &)#:+l@@&s+YXsb,h/4@@8's4YXbuf4Pn4)Hsb5h:)`cB@@'sBYHnB)@sbChoffD)`E)XndFPGQ@@'sQYXbufQPnQ)HpRh[@w@X(U s[YHiov[$@[;n\)hi];dp`X$lw@@( slYhrl`Uq;@k@) sqYHrq@sbrhoffw)Xrcx;d;k@5@x)_ sYHr@sbhoff)Xrc;dY5@C@)sYX;lsb`VD@@h4intty+ e&mu0B3P` / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @##C nsD# E#jH I#,L nsM# N# hO# P# 5 #4 $# s%# n&)# ';#w4O ptr5O#k8 9# :# ;;# 4d+ c-s# x.)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# r 7# W 8# W 9# n :# s ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*K@ GZ h H#  I#  J# $ K#  L# t M#  P h Q# l RU# H Y Zo [del \u ]7 ^ZA _>x U$ Q V# = W)# h X# r `# vc a;#h v b$#pj0 # op $#  %# L &#  '#  (U#  )#(`X &?  ';# ` (_#  )# , *# { +#  ,#( -#0  .#8  /)#@ s 0s#H Q 1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y7D@@8*s7Yns77kv8Ohdr;`K@PvD l Vp@"@] 4intty+ e&mu;0B3Pg74` / 0# len1# 2#5< ns6# 7#:V ns;#>~ ns?# @##C nsD# E#jH I#,L nsM# N# hO# P# 5 #J $# s%# n&)# ';#w4e ptr5e#k8 9# :# ;;# Jd+ c-s# x.)#( & h '# t (#( + h ,<# t -#( 0@ h 1V# t 2# 5 op 6# r 7# W 8# W 9# n :# s ;#  lH >  h ?~# t @# ops A#(  B#0 opv C #8 opc D#@@K@ Gp h H#  I#  J# $ K#  L# t M#  P h Q# l Rk# H Y Zo [del \u ]7 ^pA _>x U: Q V# = W)# h X# r `# vc a;#h v b:#pj0 # op $#  %# L &#  '#  (k#  )#(`X &U  ';# ` (u#  )# , *# { +#  ,#( -#0  .-#8  /?#@ s 0s#H Q 1#P  2#Too)Uo:;{oo);o@;o;-oe?o3 #| s $# n %)# r &)# !k}#.@@*\s.or/op/s/n/&2;henc3`iov5\ 6;l l lVV@ʇ@*sVohrVdopW`W\iʇ@@X+$ siohridopj`j\r|@7@+ s|ohr|dop}`}X7@p@, sohrdsXn`+p@@x, sorh.sn)QlghHdsz`bufXpPrcH@@, sohrd@@8-X sohrdsؔXn`\@"@- so~ns~~ke~opso~hdr`=~Pv  l >V$@g@"4intty+ e&mu0B3P` / 0# len1# 2#5& ns6# 7#:@ ns;#>h ns?# @##C nsD# E#jH I#,L nsM# N# hO# P# 5 #4 $# s%# n&)# ';#w4O ptr5O#k8 9# :# ;;# 4d+ c-s# x.)#( & h '# t (#( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# r 7# W 8# W 9# n :# s ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*K@ GZ h H#  I#  J# $ K#  L# t M#  P h Q# l RU# H Y Zo [del \u ]7 ^ZA _>x U$ Q V# = W)# h X# r `# vc a;#h v b$#pj0 # op $#  %# L &#  '#  (U#  )#(`X &?  ';# ` (_#  )# , *# { +#  ,#( -#0  .#8  /)#@ s 0s#H Q 1#P  2#TYY)?Y$;eYY);Y*;Y;YO)Y #ZC>:0 - tu .O#  /#  0#  1#  2#  3;# 5 4#( A l B# tu CO# # D#U O' s PY# r Q#5( \L s ]Y# t ^#48 iq s jY# r k*#  s= r Z   L> '\ z9  {/#  |q#  };#  O #  a #  a # s #(;I I 9 a I U ;$@g@-s;Y}ns<}=}h=}=}>}nA)hiB~hdrI~N}vcT;TvU$Hvia;drcky@@o tEOX@@tdO@qV<h@@%4intty+ e&mu3P5 #$#s%#n&)#';#w4 ptr5#k8N 9N#:#;;# ` /0# len1#2#!  s j0# op$#%#L&#'#(#)#( -/h@@X.E r/Eh  :@Ǎ@.z r:EhK;Ǎ@Ґ@/L rKE rcvK ptrKshdrMTnP\bufPphdi`@`'Lt@Ґ@<@x/ ptrX bufPnHsrchoff`sj;<@@/\ rE bufÀn) off\hdrbh)Xptrh@rc;d)Tsl V@'@Q'4intty+ e&mu0B3P` /0# len1#2#5 ns6#7#:5 ns;#>] ns?#@##C nsD#E#jHI#,L nsM#N#hO#P# 5 #)$#s%#n&)#';#w4D ptr5D#k8 9#:#;;# )d+c-s#x.)#n $  s ( & h '# t (#( +% h ,# t -#( 0J h 15# t 2# 5 op 6#r 7#W 8#W 9#n :#s ;#  lH > h ?]# t @# ops A#( B#0 opv C#8 opc D#@JK@ Gz h H# I# J# $ K# L# t M#  P h Q# l RJ#H Y Zo [del \%u ]7 ^zA _>x UDQ V#= W)# h X# r `# vc a;#h v bD#p2@8@80yr2yh?8@œ@0r?yhBwœ@@0rwyhbufw`nw)X};@@X1cr}yXrcv}Pptr}sHnlbuf`;@j@1ryXrcvPptrsHnlbuf`;j@(@27ryXrcvðPptrsHnDZlbufȀ`K;(@5@x2ryHrcv@ptrsnlbuf` @;\;5@@2ryrcvptrsn\buf P=@i&l&Loff'hj,d,Hn-`tu6D@A@/0;DE;@@83 rEyrcvEptrEsnK\bufLP@iRlRLksSh<bDpp`@֞@ UV;Hڟ@@oprz; ;@ޣ@3p ryhrcv`ptrsXhdrp Pޣ@H@3 ptr XbufP!nHsrchoff `s >;H@'@X4 rybuf!n)off hdrp )Xptr @rc;dk@Ҥ@p h)"s lOV(@@+intty+n&n3Es&0(@@4buf&|h &` XK@@5!bufKhh Kd f\0@@x5 \l% : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .? : ; I@B .? : ; ' @B : ; I : ; I 4: ; I 4: ; I .? : ;' @B : ;I 4: ;I !: ;I "4: ;I # $4I4  %.? : ;@B &.? : ;@B ' (4: ; I? < )!% $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?  % : ; I$ > $ >   I&I : ;  : ; I8 I !I/ : ; I8 ' II : ;  : ; I : ; I'  : ; (  : ; : ;I8 .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I .? : ; ' I@B 4: ; I .? : ; ' @B  .? : ; ' I@B !.? : ;' I@B ": ;I #4: ;I $.? : ;' I@B % &4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 ' I I : ; I8 .? : ; ' I@B : ; I : ; I .? : ; ' @B % : ; I$ > $ >   I&I : ;  : ; I8  : ;  I !I/  : ; (  : ;  : ; : ;I8 ' II : ; I8 .: ; ' I@B : ; I 4: ; I : ; I  4: ; I  U  : ; .? : ; ' I@B  : ;  .? : ; ' @B !4: ;I ".? : ;' I@B #: ;I $: ;I %4: ;I &.: ;' @B '.? : ;' I@B % $ > $ > : ; I  I : ;  : ; I8  : ;  ( .? : ; ' @B  : ; I .? : ; ' I@B : ; I 4: ; I % : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .: ; ' @B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I .? : ; ' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I : ; I 4: ; I 4: ; I .? : ; ' I@B I% : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .? : ; ' I@B : ; I : ; I 4: ; I 4: ; I   % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I% $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B 9V /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantool/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/includeupdate.cstddef.htypes.htypes.hlibio.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htnt_opt.herrcode.hstdio.htnt_update.h #@LY .%=2K0=,=2!g2/$g3.g2=g2!g2/$g2YENFMGLH9/2rf!KYgL&%0#000ui f7 A==2K2( ?.YYYYYYןY=2>.uY=2?"ןYןYYYYןYYYYuןuןY=2>.=3>5=2>.YYY=2>.ן=2>.uY%%Y=2>}YYYYYYYYYYYY=2>"YYYYYYYYYYYYYYY(ןYYYYYYYYYYY=2>v"JJ= /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.c /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_net.cstddef.htypes.htypes.htime.hstdarg.hstdio.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_opt.htnt_iob.htnt_net.h J@'!1=g1=uK1/uK11=g1uK1 .uKgK .2&"--t .IK/סI8vvvY .)uY . . .u ..ɻIgI,v tn /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iob.cstddef.htypes.htypes.huio.htnt_iob.h Q@,uYuvY27  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/netinet/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_io.cstddef.htypes.htypes.htime.hselect.huio.hsocket.hsockaddr.hin.hstdint.hnetdb.htnt_opt.htnt_iob.hsocket_type.htnt_net.h R@:YY/wv0gvguvY2""ggg)?Y=i'V0=;vKv/pX vX=h4fw=yggY!uguu/$Y0u.uw&&utC?#Y2/vhho?$=1׮0u+uK2g>.0uK2YZ50ug0Kg0YxJofK2=׼"-h+uK10,KW$0J2/J׼"Yh+uYK2g>.0uK2="5#Ku5+uד%hZo' /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntnet/usr/include/x86_64-linux-gnu/bits/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_opt.ctypes.htime.htnt_opt.htnt_net.h \c@+Y220h$,$Z$Z$Z$Z$"Z$"Z$"Z$Z$"Z$"0$0Zt( Y; /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_mem.cstddef.htnt_mem.h h@'uK0K0g0=uuK0KCI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_tuple.cstddef.hstdarg.hstdint.htnt_tuple.hctype.h i@/Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h v@+uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h @6= .uYhuuYK . /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_buf.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.h l@*1=Ku&gK0uv1=gugK1/Jgu<JK11󻻟KuBgg1󻻟KuHgg .uKgK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_insert.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h D@8[uסgi$x /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_update.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_buf.htnt_update.h @/vuuL".g.g.u.Y.uuYuY=ug%K.3Y.#v/ㄡgi!/$( /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_select.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h $@>2/4Ku׻!Yu/F4"H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h h@.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h @2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> w>?w?BwBzvz{w{|w|wvwwwvwww< v< = w= > w> A wA v w w w ; v; < w< = w= @ w@ v w w w vwwwvwww\v\]w]^w^awavwww<v<=www*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvwww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  www|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwvwwwPvPQwQRwRUwUvwwwvwwwvwww v  w  w w:v:;w;<w<?w?vwwwvwwwvwwwvwwwvwwwvwwwvww w RvRSwSTwTWwWvwwwvwwwvwww9v9:w:;w;>w>=v=>wwwBvBCwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vwwwvwwwuvuvwvwwwzwzvwC    9= y .symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N H@HVX@Xh^o@,ko@pz`@`0@  @  @ "@"ą@ @(@`@`\@h`````` ` H `h  0h )e5 \Ce,O0hZ=5es'@% B@@<@`@H@X@@@ `@ @ @ @ "@@@@`@@`````` `` !" ` "@. #@A `#@W`f` #@``0`!@ @@@ ߴ@ д@%@3@A@ O@]p@kP@y0@ J@p TK@9 K@Y K@W =L@0 mL@9 L@J L@,`%`.8A R@P S@` 'T@r W@ [X@ F^@`` _q@ v@} 1w@ x@O$ y@f7 ,z@!L z@` G{@*t {@ {|@* .}@ }@* l@Q @ @  @i @) w@0? @M k@]jw @ Ґ@j @ @ j@ (@  5@ @- ޣ@j<F@T```q(`~``h`` @ (@ Y@= *Q@ ]%@ @ œ@), +@><Nc c@)   ` <@ NY@ ~@ ʇ@6 H@ @U0 \@M<T r@e }@v D@ q@ s@xh` *@@ ri@# c@  '@D2F h@$U (@b Q@ l 7Z@s q{@ 5@ +@2 @9 9,@  Z@  cI@(  Ǎ@ 7  P@&A T  c'@Nf  h@#t  i@$  &@^   Q@  $@   P@&  `  9&@N  P@  7@/!  -P@t- B  p@ET c  %@Dr  8N@z  [@P  @  @  k@   My@y  M@  9$@e  ^@G  "@$  @4  >@F  @;U  @0g  8@2s  0<@  s@$ @`p  -@  Q@ `  @$  D@F  "@ 0"@  h@) h`  $@C+  >a@7  #@<  1@K  j@Y  |@j  ~@s  )@B  +@  \c@]  @6  @7  '@G  @K  4@,  Mz@y  8@'  R@)4 F [  ~@7f  /@   _t@k  @$  @q   %O@  h@+ i@d" &@:6 @< i@_H b~@CV u@b ?`@r` 7@9crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryupdate.ctntlong_string__func__.4455__func__.4458__func__.4470__func__.4475__func__.4480__func__.4485__func__.4490__func__.4495__func__.4500__func__.4505__func__.4510__func__.4515__func__.4520errcode.ctnt_net.ctnt_net_freetnt_net_readtnt_net_writetnt_net_writevtnt_net_write_requesttnt_net_recv_cbtnt_net_replytnt_net_requesttnt_error_listmsg.3723tnt_iob.ctnt_io.ctnt_io_resolvetnt_io_nonblocktnt_io_connect_dotnt_io_xbufmaxtnt_io_setoptstnt_io_sendv_puttnt_opt.ctnt_mem.c_tnt_realloctnt_tuple.ctnt_tuple_validatetnt_iter.ctnt_iter_inittnt_iter_field_nexttnt_iter_field_rewindtnt_iter_list_nexttnt_iter_list_rewindtnt_iter_reply_nexttnt_iter_reply_freetnt_iter_request_nexttnt_iter_request_freetnt_iter_storage_nexttnt_iter_storage_freetnt_stream.ctnt_buf.ctnt_buf_freetnt_buf_readtnt_buf_resizetnt_buf_writetnt_buf_writevtnt_buf_write_requesttnt_buf_replytnt_buf_requesttnt_insert.ctnt_update.ctnt_update_optnt_select.ctnt_reply.ctnt_reply_cbtnt_request.ctnt_request_inserttnt_request_delete_1_3tnt_request_deletetnt_request_calltnt_request_selecttnt_request_updatetnt_request_cbtnt_enc.c__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finiprint_tupletnt_io_closetnt_strerrorupdatetnt_updatetnt_request_setoriginfree@@GLIBC_2.2.5fail_tnt_perrorrecv@@GLIBC_2.2.5putchar@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5tnt_opt_free_ITM_deregisterTMCloneTabledata_starttnt_replytnt_io_connectwritev@@GLIBC_2.2.5tnt_fieldputs@@GLIBC_2.2.5tnt_update_arith_i32tnt_requesttnt_request_fromtnt_io_sendsetsockopt@@GLIBC_2.2.5tnt_tuple_set_astnt_iter_storagefcntl@@GLIBC_2.2.5tnt_inserttnt_tuple_settnt_list_free_edatatest_suite_setup_finistrlen@@GLIBC_2.2.5tnt_mem_freetnt_opt_sethtons@@GLIBC_2.2.5send@@GLIBC_2.2.5update_insert_i32printf@@GLIBC_2.2.5tnt_reply_inittnt_enc_readtnt_errorsnprintf@@GLIBC_2.2.5tnt_io_flushtnt_iter_replytnt_bufgettimeofday@@GLIBC_2.2.5fail_tnt_errortnt_update_inserttest_simple_setmemset@@GLIBC_2.2.5tnt_io_send_rawtest_boundary_argstnt_reply_fromtnt_flushclose@@GLIBC_2.2.5update_insert_strtnt_mem_alloctnt_tuple_initupdate_splice_str__libc_start_main@@GLIBC_2.2.5tnt_errnoselect_tuplegetsockopt@@GLIBC_2.2.5tnt_close__data_startupdate_set_strtnt_fdtest_multi_arithtnt_connectfprintf@@GLIBC_2.2.5tnt_update_splice__gmon_start__update_set_i32tnt_settnt_io_sendv_rawtnt_enc_writememcpy@@GLIBC_2.14_IO_stdin_usedtnt_tupleselect@@GLIBC_2.2.5tnt_itertnt_netinsert_tupletnt_io_sendv__gcc_personality_v0@@GCC_3.3.1__libc_csu_inittest_delete_fieldtnt_reply_freetnt_update_deletetest_splicetest_set_and_splicetnt_list_inittnt_error_codestest_long_settnt_iob_init_endtnt_request_inittest_insert_field_startrealloc@@GLIBC_2.2.5tnt_mem_realloc__bss_starttnt_selecttnt_io_recvmaintest_arith_i32tnt_tuple_addtnt_iter_requesttnt_nexttnt_stream_freetest_suite_tear_downtnt_opt_inittnt_update_arith_Jv_RegisterClassestnt_update_arith_i64recv_commandtnt_enc_sizetest_arith_i64tnt_iter_listtnt_request_freetnt_iob_freeexit@@GLIBC_2.2.5connect@@GLIBC_2.2.5tnt_rewind_ITM_registerTMCloneTabletest_appendgetaddrinfo@@GLIBC_2.2.5tnt_listtnt_stream_reqidtnt_stream_initstrerror@@GLIBC_2.2.5tnt_init_Unwind_Resume@@GCC_3.0tnt_mem_inittnt_tuple_freeupdate_delete_field_inittnt_mem_duptnt_iter_freetnt_list_attnt_io_recv_raw__ctype_b_loc@@GLIBC_2.3freeaddrinfo@@GLIBC_2.2.5stderr@@GLIBC_2.2.5socket@@GLIBC_2.2.5tnt_update_assigntarantool-1.5.1.218.g1a69fd6/test/connector_c/tp0000775000000000000000000011755212213333047017615 0ustar rootrootELF> @@@8@&#@@@@@@@@@,9,9 @@`@`PX @@`@`@@DDPtd00@0@Qtd/lib64/ld-linux-x86-64.so.2GNU GNU c@&{iSh !  D@"BEj C/| : K2bqXj| Q + : N h,PH`3B`w @oXH`5 B`@p&@O %@9 @tPH`  %@ Y @ `&@&d&@_B`plibgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6sockethtonsconnectputsputcharrealloc__assert_failprintfstrlenmemsetreadinet_addrmemcpyclose__libc_start_mainwritefree__libc_csu_fini_edata__data_start_IO_stdin_used__libc_csu_inittnt_error_codes_end__bss_startGCC_3.0GCC_3.3.1GLIBC_2.14GLIBC_2.2.50P&y a_& ui A`B` B`(B`0B`8B`@B`HB`PB` XB` `B` hB` pB` xB`B`B`B`B`B`B`B`HH]7 HtH5R7 %T7 @%R7 h%J7 h%B7 h%:7 h%27 h%*7 h%"7 h%7 hp%7 h`% 7 h P%7 h @%6 h 0%6 h %6 h %6 h%6 h%6 h%6 h%6 h%6 h1I^HHPTI`&@H%@Hǥ%@GWH`UH-PH`HHw]øHt]PH`PH`UH-PH`HHHH?HHHu]úHt]PH`=; uUH~]; @H=H3 tHtU@`H]{vUHH}HEH@HHEH@HH)H]UHH}HEH@HHEH@HH)H]UHH}HEH@HHEH@HH)H]UHH0H}HuHUHEHnHHEHEH;EHtHEHHHHEHHEHEHUHHEH@HUHHUHHH}HEH@HUHH}HEH@]UHH}HuHUHMLEHEHUHPHEHPHEHPHEHPHEHHEHPHEH@ HEH@(HEH@0HEH@8HEHHE@@HE@DHE@PHE@LHEHUHPXHEHUHP`]UHSH(H}HuHEHIH;EHt HEH@XHHt HoHEH@XHUHuHMHHHHt H9HEH@HHEH@HH)HHHEHPHEHHHt&HEHHHEH@HH)HHHEHHEH@ HHt(HEH@ HHEH@HH)HHHEHP HEH@(HHt(HEH@(HHEH@HH)HHHEHP(HEH@0HHt(HEH@0HHEH@HH)HHHEHP0HEHXHEHHEHPHEH=H([]UHHH}HuHEHPHEHHEHPHEH5UHH H}HuHUHUHEHHHHt H.HEH@HUHMHHgHUHEHH^UHHH}HEH@ Hu'@&@&@HEH@ UHHH}HEHHu'@&@&@sHEHHHt HwHEHPHEHP HEH@ HEH@HPHEHPHEHHUHRPHEHuHEHH PPHEHUH}}HuR}?Hu9}Hu }Ht]UHH}u}HtP}HtHEH@UʀHPHEHPHEH@UʀHPHEHPHEH@UʀHEH@HPEȀHEH@HUHEH@HPHEHP]UHHH}u}?HtUHEH J}HtHEH@UʀHPHEHPHEH@UHPHEHPUHH}HuHEH@(HHthHEH@(HEH@(H HEH@(H ЉHEHEH@(HPHEHP(MHEH@(HHEH@(HEH@(H HEH@(H HEH@(H ЉHEHEH@(HPHEHP(HEH@(HHEH@(HEH@(H HEH@(H HEH@(H HEH@(H ЉHEHEH@(HPHEHP(]UHHH}HuHEH@(Ht'HEH@(҉уHU HPHEHP(|HEH@(HHtKHEH@(HEH@(H ЉHEHEH@(HPHEHP(HUHEHHSUHSH(H}HuHUHEHHu'@1&@&@1HEH@ Hu'@2&@&@ HE؉/HcHEHHEHHHHt HHE؉HEHHEH@HUHMHH HEHPHEHHEHPHEH@ HEHHUHRHM؉ΉʉPHEH+H([]UHH}HEHPHEHHEH@ HEH@0]UHH0H}HuHUHEH@HEHEHHUHMHEHHuHEH}Ht H}uHEHPHEHHEUHH0H}؉uԉUE EEEԉEEЉEHMHEغHH2HUHH@H}؉uԉUЉMDEEEEEԉEEЉEẺEEȉEEHMHEغ HHHxUHHH}HuHEHzHHMHEHH)UHSH}HuH} Ht H+EHE@ HcH+E[]UHHH}HEHHHEH@HHUHH}HEH@HHEH@8HH)H]UHSHH}uHEHH‹EHH9s(@t&@&@HEHX8HEHP8EHHHEHP8HH[]UHH}HEH@8]UHHH}HEHDUHH}HEH]UHH H}HEHHEH}Ht HHEHPHEHHEHPHEHPHEHP8HE HHHEHHEH@0HEHP0HEHP(HEHP(HEHP HE@PHE@LHEH=Ht $HEHHtHEH HttHEHHttHEHHtt HEHHt HxHEHHEPLHE@Lt HE@LHHEHhHHt HE@L#HEHdHEPPHE@LUHH}HE@@]UHH}HEH@(]UHH}HE@D]UHH}HEHP HE@@HH]UHHH}HEHz=tHEHHtUHSHH}HEH@ Hu'@&@&@HEH@HHEHVHH)HHH[]UHSHH}HEH@ Hu'@&@&@#HEHP(HE@DHHEH@(HHt HEH@ HXHEHHHHH)HHH[]UHHH}HEH@ HHt9HEHHt HEH@8HPHEHP 8HEHHtlHEH HPHEHP HEH@ PHEP@HEHP HE@@HHEH@H9HtHEH@(UHSHH}HEH@ Hu'@<&@&@HEH@(HHt9HEH-Ht HEH@ HPHEHP(?HEHHt HEHP(HE@DHHEHP(HEHPDHEHHÃHt6HEHP(HE@DHHEH@H9HtH[]UHSHH}HEHƿ'@mHEH#ƿ%'@P[NHEH HHEHHډƿ5'@HEHt;'@HEH"u>'@HEH>H[]UHSH\H`A^ @HqH`H8HEH}HUH`HH HEH}u HUHp\HΉgHEH}u H}y HUH`HHu[H`HHEH}tKH`H:HH`H:Hډƿ@'@H`H=TH`HuH`HH`H tH`HHHĨ[]UHSHE}yN'@HEкHfEf'@EԿfEHEHEHΉ;yp'@=eH`A^ @H5H`HH`HH`'@H]H`'@HIH`AHH`H8H`'@HH`HHH`HkHEHHΉTEEHcH`H^H9tRH`HEE}t)ElE}tECHHĘ[]UHHpHEA^ @HHEAHHEHHE'@HHEH=H=UHH}HumJÐHl$Ld$H-' L% H\$Ll$Lt$L|$H8L)AIHI1yHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tp.hp->t != ((void *)0)p->h != ((void *)0)tp_unfetched(p) >= inctuple fields: %d tuple size: %d %-.*s, ]error: %-.*s Failed to create socket127.0.0.1Failed to connect_i320e72ae1a-d0be-4e49-aeb9-aebea074363ckeytp_tupletp_fieldtp_tuplecounttp_hasnextfieldtp_nextfieldtp_hasnexttp_fetchER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not exist;0\Hn42TPtb.;<\|*kO!JD{dU8h4T| &9>Oa<r\|6 4\d,zRx *zRx l&AC a <r&AC a \x&AC a |~xAC s AC Y AC M AC  zPLRx @ $$R8@AC E D5AC p doAC j f>AC y AC  7oAC j AC  'AC { $AC  DKAC  $d)AC E 1AC l AC ~ $rW8@AC R $q8@AC l 4AC o <>AC Ax \0AC k |,&AC a $2lAC Eb vAC M hAC U bAC N $UAC  D:AC L d+AC M AC L "AC ] >AC y $.dAC EZ $ jAC E 4AC  $T,AC E" $|AC E $W9@AC H $9@AC H $ 9@AC z % AC [ $<0Jf@Xd oFMP`gj e .E"ux @ @ @ d&@@`@`o`@@@@  B`@@ o8@oo@@` @ @ @ @ @ @& @6 @F @V @f @v @ @ @ @ @ @ @ @ @(@(@!(@0(@k(@}(@(@(@(@(@ )@)@5)@E)@])@p)@)@)@)@)@)@)@)@*@ *@*@&*@4*@?*@M*@X*@f*@q*@*@*@*@*@*@*@*@*@*@*@*@+@+@ +@.+@9+@E+@N+@Z+@c+@x+@+@+@+@+@+@+@+@+@,@ ,@,@!,@*,@6,@?,@K,@T,@`,@i,@u,@~,@,@,@,@,@,@ -@-@[-@h-@-@-@-@-@-@ .@%.@8.@w.@.@.@.@.@.@/@0/@P/@`/@/@/@/@/@/@/@/@0@40@H0@p0@z0@{0@0@GCC: (Debian 4.7.3-4) 4.7.3, @ o @%@8%int~ifyO  / I      T aF 4/ =# /# ? p  S# 4_# 8u# #Q 1F 3M _ O  a p    m    -! ) + , . w/ 2 3 : ; <  b !  y   `} 9 j# ? p}-tph#h${#s%#p%#e%#t&# f&#(u&#0c'#8tsz(#@fsz(#Dtc(#H/)#Lcnt*#P+#Xobj,w#`-> X#len##J"Z#s #{Z#=#Z## #1- @ @p1hA7- @8 @`p7h=-8 @^ @p=hT^ @ @ ~pTXnT-PTHU-hI_ @ @p_he @@pehu@@@Npuhbufu`u-XvPobjvwH^@@pH-@sz-XnpSC@@ph-`@N@`Aph`-X&N@@ph '@/@_@ ph '@  pC-_@@!l@@`phd@@@phdb@@ph`b@@+ ph` 0@@` p0X0P0-H  '@esz3bSCC@@ pChUP@@ A pPXhPwPP-HQblrcS`ts@@ psHZsDs s@t hu#iv# hw P@j@g pHZD=@Z Y h#s"# h5 PHj@@@ pHhszH`/T@@ bufT`T-XszWbS`@ @ / p`hi- @2@` c pihsw2@@  psXincsbT  (@pouS;}@@  p}hb@@ 4 ph9@@ h ph:@@@  pXDhM@@  ph@@ ph@@` Gph@8@ {ph$ b8@v@ p hDbv@@ pX '@  p ]b@o@ `pXp '@fS p p`u&bo@X@@p&h 0@;bX@ @p;X. '@ F @rcGbS . p !h  @_!@c"rep X#b_!@#@`"fdb~$rep~%(1P&%GX%!H$res&@#eEb#@&%@@$fdGb\$ttH?@$reqW~$rc`bX!r&%@%@ q$reqs'`|b%@%@(|bl(*|`>N int[0@%~in#c$c#%c#p &5# ux \      y   !    u          1 ? M b      /  ;     ! " # $ % & Z' ( ) * G+ G , - . $/ 0 1 2 + 3 4 y5 66 j7 8 d9 \: u+ \9    B`% : ; I$ > $ >   I&I : ;  (  : ;  : ; I8 I !I/  : ; &' II : ; : ;I8  : ;I8  : ;.: ;' I@B : ;I .: ;' I@B : ;I 4: ;I .: ;' @B .: ;' @B 4: ;I 4I4   : ; : ;!.: ; ' @B ": ; I #.: ; ' I@B $4: ; I %4: ; I & U'.? : ; ' I@B (: ; I % $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?   /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/netinettp.htp.cstddef.htypes.hstdio.hsockaddr.hsocket.hin.hstdint.hsocket_type.h  @22.=//g32.ug3Y׻(K&Y(Y(Y({g .="/.2=gsK2uZ[Xtttt \1!!/g==1!01Ys0I-gYs0s0I,g/s0s0s0I+ZuY1u'5ZKY5K(=g{廻 .==gK.%uuugg".uuuggggu"." .s[uA"56u=y3..g,fftXJftX J f t X Jk&.u22u2u3.tY2*xKY$zY=0uv!*uY3Y=0u*uYwtY//w v墽Yg$==$=7vgugv塄Y2YYY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.ctp_getfieldtp_fieldIPPROTO_MTPIPPROTO_PIMIPPROTO_DCCPtp_replytp_usetp_hinserttp_appendreqIPPROTO_ENCAPIPPROTO_IGMPin_addr_ttoalloclimitIPPROTO_RSVPtest_check_read_replylong long int__PRETTY_FUNCTION__IPPROTO_UDPlong long unsigned inttp_inittp_sizeIPPROTO_NONE__ssize_ttp_hasdataSOCK_STREAMtp_replyerrortp_freeuint16_tspacemaintest_check_readtp_nexttp_reservesin_zerotp_replyerrorlenIPPROTO_COMPvalueSOCK_RDMtp_ber128loads_addrtp_realloctp_hselectIPPROTO_ESPIPPROTO_ICMPV6tp_getfieldsizeIPPROTO_FRAGMENTshort unsigned intsin_addrtp_usedSOCK_DGRAMSOCK_CLOEXECSOCK_NONBLOCK/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_cIPPROTO_ROUTINGIPPROTO_TPin_port_tIPPROTO_IPV6/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/tp.ctp_htp_ber128sizeofsin_familytp_ensurereply_printtp_insertsizetypetp_tupleIPPROTO_DSTOPTStest_check_buffer_initializedtp_nextfieldtp_ber128load_slowpathtp_sznew_sizeIPPROTO_TCPIPPROTO_MAXGNU C 4.7.3tp_fetchSOCK_DCCPserver_codesin_portsa_familyto_read__socket_typetp_hasnextfieldIPPROTO_PUPIPPROTO_SCTPunsigned charIPPROTO_RAWtp_appendargcIPPROTO_IDPshort intisallocatedtp_unusedSOCK_PACKETuint32_tIPPROTO_HOPOPTSIPPROTO_UDPLITEtp_selectIPPROTO_EGPtp_tuplecountsockaddrindextp_setreqtp_tuplesizeoffsetIPPROTO_ICMPrequiredIPPROTO_GREtp_ber128savesa_family_treqidtp_ber128save_slowpathsockaddr_intp_unfetchedkeyctp_tupleendIPPROTO_AHtp_bufsa_dataIPPROTO_IPIPSOCK_RAWtp_reqSOCK_SEQPACKETargvtp_reqbuftp_replyoptp_hasnextIPPROTO_IPER_WAL_IOER_NO_SUCH_SPACEtnt_error_codes_enumER_ARG_TYPEER_SECONDARYER_SPACE_EXISTSER_SPACE_DISABLEDER_PROC_RETER_TUPLE_NOT_FOUNDER_FIBER_STACKER_UNUSED30ER_UNUSEDER_UNUSED32ER_UNUSED33ER_MEMORY_ISSUEER_RESERVED20ER_RESERVED21ER_RESERVED22uint8_terrstrER_TUPLE_FOUNDER_NO_SUCH_INDEXER_TUPLE_IS_ROerrdescER_UNUSED31ER_FIELD_TYPEerrcode_recordER_UNUSED34ER_UNUSED35ER_UNUSED36ER_UNUSED37ER_RESERVED14ER_NO_SUCH_PROCER_UNUSED46ER_KEY_PART_COUNTER_NO_SUCH_FIELDER_TUPLE_IS_TOO_LONGtnt_error_codes_enum_MAXER_UNSUPPORTEDER_UNUSED27ER_SPLICEER_INJECTIONER_KEY_FIELD_TYPE/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/src/errcode.cER_ILLEGAL_PARAMSER_UNUSED8tnt_error_codesER_UNUSED28ER_UNUSED29ER_UNKNOWN_UPDATE_OPER_OKER_RESERVED23errflagsER_INDEX_TYPEER_EXACT_MATCHER_UNUSED24ER_UNUSED25ER_RESERVED11ER_RESERVED12ER_RESERVED13ER_NONMASTERER_RESERVED15ER_RESERVED16ER_RESERVED17ER_RESERVED18ER_RESERVED19ER_PROC_LUAww%v%&w&'w'*w*KvKLwLMwMPwPqvqrwrswsvwvvwwwvw w  w vwwwvwwwvwwwvwwwavabwbcwcfwfvwwwrvrswstwtwwwvwwwvwww"v"#w#$w$'w' v  w  w w v w w w  v  w  w  w 2 v2 3 w3 4 w4 7 w7 v w w w v w  w  w } v} ~ w~  w w v w w w v w w w  v w ! w! $ w$ E vE F wF G wG J wJ v w w w v w w w v w w w v w w w vwwwvww w vwww)v)*w*+w+.w.KvKLwLMwMPwPvwwwvwwwvwwwkvklwlmwmpwpvwwwrvrswstwtwwwvww w 9v9:w:;w;>w>vwwwvwINO.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`dN @xV@@@^o@Jko8@8`z@@  @  @ P @ dd&@d& p&@p&4 0@002@028@8P@`@@`@@`@@`@A`AB`BB`B PH`PH0PHlHP)H5\C_O0We7 Zoen0sP %j @@<@`@@@@@8@ @ @ @ @ @d&@p&@0@02@8@@`@`@`@`A`B`B`PH` !" @` 0 @. ` @A @WPH`f@` @@` @&  @& 8 @& ^ @x @ @ @ @ @5  @o N@>"'@; @D'@ ] _@om @ @ @ @ @)'@  @1 @ @W @q j@4  @> @0 @&( 2@l1(@ J @X @i @t @} @ @ @ @" 8@> v@d'@  @'@  o@ X@,'@ 8 @D _!@Z #@j &%@8@@`@`B`@`@`PH`B` `&@*? [ B`fxPH`d&@'FB`Sj yp&@ @ %@B`pXH` @PH` %@  !6 Ph @ncrtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrytp.ctp_sizetp_usedtp_unusedtp_realloctp_freetp_buftp_inittp_ensuretp_usetp_appendtp_tuplecount__PRETTY_FUNCTION__.4293tp_tuple__PRETTY_FUNCTION__.4297tp_ber128sizeoftp_ber128save_slowpathtp_ber128savetp_ber128load_slowpathtp_ber128loadtp_field__PRETTY_FUNCTION__.4322tp_setreqtp_appendreqtp_inserttp_selecttp_sztp_reqbuftp_reqtp_unfetchedtp_fetch__PRETTY_FUNCTION__.4432tp_replyerrortp_replyerrorlentp_replyoptp_replytp_tuplesizetp_getfieldtp_getfieldsizetp_tupleendtp_hasdatatp_hasnext__PRETTY_FUNCTION__.4480tp_hasnextfield__PRETTY_FUNCTION__.4484tp_nexttp_nextfield__PRETTY_FUNCTION__.4493reply_printtest_check_read_replytest_check_readtest_check_buffer_initializederrcode.c__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finifree@@GLIBC_2.2.5putchar@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_startputs@@GLIBC_2.2.5write@@GLIBC_2.2.5_edata_finistrlen@@GLIBC_2.2.5htons@@GLIBC_2.2.5printf@@GLIBC_2.2.5__assert_fail@@GLIBC_2.2.5memset@@GLIBC_2.2.5close@@GLIBC_2.2.5read@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_startinet_addr@@GLIBC_2.2.5__gmon_start__memcpy@@GLIBC_2.14_IO_stdin_used__gcc_personality_v0@@GCC_3.3.1__libc_csu_inittnt_error_codes_end_startrealloc@@GLIBC_2.2.5__bss_startmain_Jv_RegisterClassesconnect@@GLIBC_2.2.5_ITM_registerTMCloneTable_Unwind_Resume@@GCC_3.0_initsocket@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/test/connector_c/snap.test0000664000000000000000000000043412231715257021103 0ustar rootrootimport subprocess import sys import os p = subprocess.Popen([os.path.join(builddir, "test/connector_c/snap"), os.path.abspath("connector_c/connector.snap")], stdout=subprocess.PIPE) o,e = p.communicate() sys.stdout.write(o) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/connector_c/xlog_rpl.test0000664000000000000000000000145512231715257021774 0ustar rootrootimport subprocess import sys import os from lib.tarantool_server import TarantoolServer p = subprocess.Popen([os.path.join(builddir, "test/connector_c/xlog"), os.path.abspath("connector_c/connector.xlog")], stdout=subprocess.PIPE) o,e = p.communicate() sys.stdout.write(o) server.stop() server.deploy("connector_c/cfg/master.cfg") server.stop() current_xlog = os.path.join(vardir, "00000000000000000002.xlog") os.symlink(os.path.abspath("connector_c/connector.xlog"), current_xlog) server.start() print "" p = subprocess.Popen([os.path.join(builddir, "test/connector_c/rpl"), "127.0.0.1", "33016", "1200"], stdout=subprocess.PIPE) o,e = p.communicate() sys.stdout.write(o) server.stop() server.deploy() # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/connector_c/xlog.c0000664000000000000000000000500112202131537020340 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include static char *opname(uint32_t type) { switch (type) { case TNT_OP_PING: return "Ping"; case TNT_OP_INSERT: return "Insert"; case TNT_OP_DELETE: return "Delete"; case TNT_OP_UPDATE: return "Update"; case TNT_OP_SELECT: return "Select"; case TNT_OP_CALL: return "Call"; } return "Unknown"; } int main(int argc, char * argv[]) { if (argc != 2) return 1; struct tnt_stream s; tnt_xlog(&s); if (tnt_xlog_open(&s, argv[1]) == -1) return 1; struct tnt_iter i; tnt_iter_request(&i, &s); while (tnt_next(&i)) { struct tnt_stream_xlog *sx = TNT_SXLOG_CAST(&s); printf("%s lsn: %"PRIu64", time: %f, len: %d\n", opname(sx->log.current.row.op), sx->log.current.hdr.lsn, sx->log.current.hdr.tm, sx->log.current.hdr.len); } if (i.status == TNT_ITER_FAIL) printf("parsing failed: %s\n", tnt_xlog_strerror(&s)); tnt_iter_free(&i); tnt_stream_free(&s); return 0; } tarantool-1.5.1.218.g1a69fd6/test/connector_c/xlog0000775000000000000000000031740112213333047020136 0ustar rootrootELF>@@v@8@&#@@@@@@@@@xx xx`x`1P2 (x(x`(x`@@DDPtdgg@g@Qtd/lib64/ld-linux-x86-64.so.2GNU GNUKCw# -3%qC ,f*@P%5r"P B"0 *etf(I!"#%&'()*+,-/034569:=?@BDEHJKNOPRUWXYZ]^`cM2>$aCT/gld[rzbefUaCKͅ< K 8oꖲ 7S.͸3b9㞂iV aCͤ`6V }`7{ ɈWb땆gQ6 : "E#>=U(j CDN{^goR/~k|BE얀X I6ij'`e|w0x`e /;O5~'$qXlC# 1/+ : N {h g@ )'@w ,B@q? 76@$ @ ,@ +@+f B@$ B@$@` ?@^@ &@K .@ M@@, Z@ &@:B^@  ;@y8 ^@  v@ @@C m4@ @ >8@ @L =@ p]@[ @|* <@yA G@ '@w @6 X@U #@ oA@ ^+@)3 `] 6@k 0,@dh ^@M {`p "$@ {` Y@ '@`@8 @ *@Dx ;+@#{` +@_H =I@) B@B }\@* @M(`b G@$ 8@& [6@x A@ +@#$ C@;]`` U5@i ?C@  ,@$^ F@wp@ #@%s ='@~(` ]@K9g@R 8A@7libgcc_s.so.1_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTable_Unwind_Resume__gcc_personality_v0libc.so.6strrchrstdinfgetcfgetsstrlenmemset__errno_locationfseeko64memcpyfclosestrcasecmpftello64__ctype_b_locfreadfopen64strcmp__libc_start_mainsnprintf__libc_csu_finitnt_request_setorigintnt_replytnt_xlog_errortnt_xlog_opentnt_fieldtnt_requesttnt_request_fromtnt_tuple_set_ascrc32tnt_iter_storagetnt_tuple_settnt_list_freecrc32c_edatatnt_mem_freetnt_xlog_strerrortnt_reply_inittnt_enc_readtnt_log_marker_v11tnt_iter_replytnt_log_guesstnt_reply_fromtnt_mem_alloctnt_tuple_inittnt_log_close__data_starttnt_log_opentnt_log_next_totnt_enc_writetnt_log_marker_eof_v11_IO_stdin_usedtnt_tupletnt_iter__libc_csu_inittnt_reply_freecrc32_tabletnt_list_inittnt_error_codes_endtnt_request_inittnt_log_strerrortnt_log_seektnt_mem_realloc__bss_starttnt_log_nexttnt_log_errnotnt_tuple_addtnt_iter_requesttnt_nexttnt_stream_freetnt_xlog_closetnt_log_errortnt_enc_sizetnt_iter_listtnt_xlogtnt_request_freetnt_rewindtnt_listtnt_stream_reqidtnt_stream_inittnt_mem_inittnt_tuple_freetnt_mem_duptnt_xlog_errnotnt_iter_freetnt_list_atGCC_3.0GCC_3.3.1GLIBC_2.3GLIBC_2.14GLIBC_2.2.50P&y a_& ii ui z`@`#(z`0z`8z`@z`Hz`Pz`Xz``z` hz` pz` xz` z` z`z`z`z`z`z`z`^z`z`Hz`z`z`HHb HtH5b %b @%b h%b h%b h%b h%b h%b h%b h%b hp%b h`%b h P%b h @%zb h 0%rb h %jb h %bb h%Zb h%Rb h%Jb h%Bb h%:b h%2b h%*b h%"b h%b hp1I^HHPTI^@Hp]@H @/`UH-(`HHw]øHt](`(`UH-(`HHHH?HHHu]úHt](`=я uUH~] @H=^ tHtU x`H]{vUH}Et9w t!t1=t1=tt*^@(^@!$^@+^@2^@ 9^@>^@]UHAUATSH8Ht HEHHHHHEHHu HUHHH{$YHEHEHEDhDHEHXHEHUHHEHHE@HHHEHHE@PHEPHEÐUHHH}H}tHEHHELHEH}u0HEHWHE@HE@HEUHH H}HEH(HEHEH@HHEHH@HwHE@|HEHH@Hu"HEHt HE@IHEHH@HPHEHPHE@HEHPHEH@HH< HEP HE@ uHE@HEHPHE@ HHHEHP(HEHHE@9u HEHPHE@ HE@ȉHHEHPHE@PHEPHEHPHEH@HHxHEP HE@ uHE@!HEHPHE@ HHHEHP(UHH}HEH(HEHEH@HE@HEH@(HE@HE@ ]UHH H}HuHEHKHEH}uIHEHEH@9@HEH@r;@HEH@ HEH(HEHEHUHHEUHH}HEH(HEHEPHEH@9u4HEHHHE@HHH HUHJPHEP]UHH}HEH(HEHE@]UHH H}HuHEHKHEH}uIHEHEH@:<@HEH@<@HEH@ HEH(HEHEHUHHEUHH H}HEH(HEHEHHHEHHnHEHH@(HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHH!UHH H}HuHEH'HEH}uYHEHEH@:=@HEH@HEH@ =@HEH(HEHEHUHHEHHxHEUHH H}HEH(HEHEHH HEHHHEHH@0HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@n>@HEH@HEH@ >@HEH(HEHEHUHHEHHHEUHH H}HEH(HEHEHHfHEHH2HEHH@8HUHJHUHHHЉE}uHE@ }UHH H}HEH(HEHEHHUHH H}HuHEHHEH}uYHEHEH@?@HEH@HEH@ #@@HEH(HEHEHUHHEHHHE@hHE@hHHHiHHEHPpHEH@pHu&HEH(H6HEHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pHP HEH@0HHEH@pHP HEH@8HBHEHMUHH@H}HuHUHEHp HMHEкHHu HE؋@EEHEHEH}tUHuHMHEHHYHEHP8HEHHf E}<}2EHcHEHH$HEHHUHE؉P,HE؋@8HHHEHP0HEH@0HHE؋@8‹EHcHEHHEH@0HHHEHP0HE؋@8HHE؋P8E)EEUHcHU؋R8HHUH4HUHJ@HHFHu!HEH@0HHEH@06HE@hHE؋@hHHHHHEHPpHEH@pHHEH@pHUHHHEH@pH@ HEH@pHHUH HHEH@pHH@HEH@pH HUH$HHEH@pHP HE؋@,HBHEH@pHP0HEH@0HHEH@pHP0HE؋@8HBHEH@pHP@HEH@HHHEH@pHP@HEH@PHBHEHt2HEH@HH}t HEH@UHH`H}HuHUHEHp HMHEHHu lHE@EEH8HEH}UHuHMHEHHHEEEHEH0HEUHEHЋEEEBEUEHHEHHEHHEԃ}UԋEEEE;ErHEH0HdHEȋUMHEHHEHHsHt/EEEE;EGHEH/HEH0HH}t HEHHOUHH`H}HuHUHEHp HMHEHHu THE@`HEH@XHE@EEHkHEH}UHuHMHEHHqHEEEEHEH@HHEH@XHtHEH@XHHEH@XH}t HEHHUHH H}HuHUHMH}tHEHHHE HH$*HEHpHMHE HHu HE@tWw ttcrE=HUHMHEHHHUHMHEHHBpHUHMHEHHWHUHMHEHH>HUHMHEHH%HUHMHEHH UHH0H}HuHUHEHHEHEH@HEHUHEHHHEHHEHH軾HEHHEHHEHHEUHH`H}HuHUHMLEH}ugH} w$H}t HH+UHEHHEHEHE@H;Ev%H}tHE@HH+UHEHIHEHEHEHEHEHMHUHEȾVY@HEH}t HUHEHEHÐUHH}HuHEHExHEƒHEHEHx7HEHEH ЉHEUHEHxMHEHEH HEH ЉHEHEHxcHEHEH HEH HEH ЉHEHEHxsHEHEH HEH HEH HEH ЉHE]UHH}u}vs}?vT}v5}vEȀHEHEEȀHEHEEȀHEHEEȀHEHEEƒHEHE]UH}}w5}?w%}w}w]ÐHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1aHt@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHHPingInsertDeleteUpdateSelectCallUnknown%s lsn: %lu, time: %f, len: %d parsing failed: %s ER_OKOKER_NONMASTERCan't modify data on a replication slave. My master is: %sER_ILLEGAL_PARAMSIllegal parameters, %sER_SECONDARYCan't modify data upon a request on the secondary port.ER_TUPLE_IS_ROTuple is marked as read-onlyER_INDEX_TYPEUnsupported index type: %sER_SPACE_EXISTSSpace %u already existsER_MEMORY_ISSUEFailed to allocate %u bytes in %s for %sER_UNUSED8Unused8ER_INJECTIONError injection '%s'ER_UNSUPPORTED%s does not support %sER_RESERVED11Reserved11ER_RESERVED12Reserved12ER_RESERVED13Reserved13ER_RESERVED14Reserved14ER_RESERVED15Reserved15ER_RESERVED16Reserved16ER_RESERVED17Reserved17ER_RESERVED18Reserved18ER_RESERVED19Reserved19ER_RESERVED20Reserved20ER_RESERVED21Reserved21ER_RESERVED22Reserved22ER_RESERVED23Reserved23ER_UNUSED24Unused24ER_UNUSED25Unused25ER_FIBER_STACKCan not create a new fiber: recursion limit reachedER_UNUSED27Unused27ER_UNUSED28Unused28ER_UNUSED29Unused29ER_UNUSED30Unused30ER_UNUSED31Unused31ER_UNUSED32Unused32ER_UNUSED33Unused33ER_UNUSED34Unused34ER_UNUSED35Unused35ER_UNUSED36Unused36ER_UNUSED37Unused37ER_KEY_FIELD_TYPESupplied key field type does not match index type: expected %sER_WAL_IOFailed to write to diskER_FIELD_TYPEField type does not match one required by operation: expected a %sER_ARG_TYPEArgument type in operation does not match field type: expected a %sER_SPLICEField SPLICE error: %sER_TUPLE_IS_TOO_LONGTuple is too long %uER_UNKNOWN_UPDATE_OPUnknown UPDATE operationER_EXACT_MATCHInvalid key part count in an exact match (expected %u, got %u)ER_UNUSED46Unused46ER_KEY_PART_COUNTInvalid key part count (expected [0..%u], got %u)ER_PROC_RETReturn type '%s' is not supported in the binary protocolER_TUPLE_NOT_FOUNDTuple doesn't exist in index %uER_NO_SUCH_PROCProcedure '%.*s' is not definedER_PROC_LUALua error: %sER_SPACE_DISABLEDSpace %u is disabledER_NO_SUCH_INDEXNo index #%u is defined in space %uER_NO_SUCH_FIELDField %u was not found in the tupleER_TUPLE_FOUNDDuplicate key exists in unique index %uER_UNUSEDER_NO_SUCH_SPACESpace %u does not exist.snap.xlog rXLOG SNAP 0.11 okfailmemory allocation failedfile type mismatchfile version mismatchfile crc failed or bad eof markersystem error%s (errno: %d);\8PxH2h(HhĵܵXڹ8`8RԾ0YPmp`8@Xkx<`8JXg ( nP Xp j  0 jP p   I  S0 }P p I h 8 \ 0 P 4p o z m@ ` T  10PpF0 zRx *zRx dAC _ zPLRxp@ ,$ЮM w@AC L< BAC } fAC a XAC  "6AC q  8&AC a ,>AC S L6AC Y l4AC S ,|AC w :AC u $w@AC  $rP*w@AC K $9w@AC  D:AC  $,Gw@AC  J%AC ` O3AC n $bUw@AC } KAC F :AC u 4AC O $T~AC Et |KAC O @`AC [ ZAC U AC  FAC A DAC  <+AC f \#AC ^ |)AC d _AC Z 6#AC ^ <$AC _ @dAC _ AC  $pw@AC  $,{w@AC  AC  AC  w$AC _ {xAC s $kw@AC f 4AC  T}AC x t=AC  OAC J yAC t rfAC a !AC \ yAC t 4AC | Ts*AC e t}AC  AC | G*AC e QAC  AC | *AC e 4%AC  TCAC ~ tAC Z 7AC r AC  @$AC _ DqAC l  BAC } 4 $AC _ T ;AC v $< w@AC   jAC e $ w@AC   $AC _  AC  $ %)AC d D .AC  d AC   jAC    AC  $ w@AC  $ w@AC   UAC P 4 .jAC e $ xx@AC  | 0AC   AC   fKAC F $ Jf@X  7 %  \? 6xO$)r       F h ( ,w,d  @p@ @ ^@x`x`o`@`@@  z`@@@0 o8@ool@(x`V@f@v@@@@@@@@@@@&@6@F@V@f@v@@@@@@^@^@^@^@^@^@^@_@H_@W_@t_@_@_@_@_@_@`@ `@`@!`@6`@E`@\`@j`@u`@`@`@`@`@`@`@`@`@`@`@a@ a@a@$a@2a@=a@Ka@Va@da@oa@}a@a@a@a@a@a@a@a@a@b@ b@)b@5b@>b@Jb@Sb@_b@hb@tb@}b@b@b@b@b@b@b@b@b@b@b@b@b@c@Oc@Yc@qc@c@c@c@d@d@5d@Jd@_d@td@d@d@d@d@d@e@:e@He@e@e@e@e@e@e@f@f@)f@@f@df@xf@f@f@f@f@f@f@?g@Bg@Gg@`g@sg@g@g@0w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V0@GCC: (Debian 4.7.3-4) 4.7.3,@W,p@<, @# ,0'@?,3+@,5 ,@ ,<(9@,KB@,SB@,WG@,cZ@Sa@m@8 int<>:iRiiEX{m0F1M3Ti78 0  ?# L# # # # P#( #0 e#8 #@ #H :#P #X * #`  #h m ?#p ?#t p#x =M# [# L# .# &{# >/# E0# L1# S2# Z3-# 5?# \74# u6 # J# ?#  .  D  /{ R0#len1# Q2#5ns6# 7#:ns;#V>ns?# @#C nsD# E#H( I#LlnsM# N# O# 3P#  # ^ $#  %#  &-#  '?# 4ptr 5#l 8   9 #  :#  ;?#  +8  -#  .-#( &]h '{#t (l#a( +h ,#t -l#( 0h 1#t 2l# 5op 6# O 7# I 8# 9 9#  :#  ;#  H >th ?#t @l#ops A#(  B#0opv Ct#8opc D#@@ Gh H # ' I#  J#  K#  L#t Ml#  Ph Q(#l R#H YG Z82 []del \  ]z( ^ _x U  V# a W-#h XD#r `# vc a?#hv b#p0 #op $# Q %#  &#  '#  (#  )#(X &  '?#  (#  )# f * #  += #  ,^ #( Y -y #0 A . #8  / #@  0#H | 1#P Q 2#T-?  G = -# ?X X C ?y  d ?    0# F0-E tu.# z/# h0# 1# 2# r3?# r4#('Ay lBy #tuC# D# O sP#rQG#(\ s]#t^l#8i sj#rk#s UG O E ^   z R{ # | # }?#  #  #  #  #(?  G     %! j/&u0s W1#lsn2#tm3s # len4# 5#D 8 tag9# :#op;# T> tag?# @# A# B# C#JF" t)xLA rMGtNlHQ hdrR! #rowSz # xT #( U #@" X& RY #fdZ&# [# \# ]X# ^}#( `A #0 a" #x b # c?#?FFLR ,?}F ^#log$ #5)@ @R)l6? @m@`P6?}6L}s;~iAG }@@sxEPH>m N>:int0@< inE#|$c#%c# &5# x [        B -         "  0  R ` n u      H  T    * 6! " # $  % & {' ( ) * ` + ` , - 1 . = / 0 1 ! 2 > 3 4 5 O 6 7 8 9 u : u+ \9 8    {`c p@@ 8 int<>:iRiiEX{m 0 ?# L# # # # P#( #0 e#8 #@ #H :#P #X * #`  #h m ?#p ?#t p#x =M# [# L# # &{# >/# E0# L1# S2# Z3-# 5?# \7# u6 # J# ?#    +A -# .-#0F1M3Ti78 / R 0W#len 1W# Q 2W# 5ns 6W# 7W# :ns ;W#V >ns ?W# @W# C6ns DW# EW# HQ IW# Lns MW# NW#  OW# 3 PW#  # ^ $W#  %#  &-#  '?# 4ptr 5# 82  92#  :W#  ;?# ( &]h '#t (#a( +h ,#t -#( 0h 1#t 2# 5op 6A# O 7W# I 8# 9 9W#  :W#  ;#  H >th ?#t @#ops A#(  BW#0opv Ct#8opc DW#@@ Gh H6# ' I#  JW#  K#  LW#t M#  Ph QQ#l R#H YG Z82 []del \  ]z( ^ _x U  V# a W-#h Xm#r `# vc a?#hv b#p0 #op $W# Q %W#  &W#  '#  (#  )W#(X &  '?#  (#  )# f * #  += #  ,^ #( Y -y #0 A . #8  / #@  0#H | 1W#P Q 2W#T-?  G = -# ?X X C ?y  d ?    % j/&u0; W1W#lsn2b#tm3; # len4W# 5W#D 8x tag9L# :b#op;L# T> tag?L# @b# AW# BW# CW#JF t)xL rMGtNHQN hdrR #rowSB # xTx #( UN #@ X RY #fdZ # [# \# ] # ^E #( ` #0 a #x b # c?#?    T W ?E  WN & #f log$T #Y .p@@ s.Xsx/ hK v 6?@@  s6Xr6 Psx8 hrow: ` K N@@G sNX P?l= q?@8@ sqX8 qPsxr hf 8@^@@ sXsx h g  ^@v@shT v@@7sh!J ?@@`sh @'@8 int<>:iRiEX{ 0  ?# L# # # # P#( #0 e#8 #@ #H :#P #X * #`  #h m ?#p ?#t p#x =M# [# L# # &{# >/# E0# L1# S2# Z3-# 5?# \7# u 6 # J# ?# +0 -# .-#0F1M3Ti78  / R 0F# len 1F# Q 2F#  5 ns 6F# 7F#  : ns ;F# V > ns ?F# @F#  C% ns DF# EF#  H@ IF#  L ns MF# NF#  OF# 3 PF# # ^ $F#  %#  &-#  '?#  4 ptr 5#  8!  9!#  :F#  ;?#  ( &L h '# t (# a( +q h ,# t -# ( 0 h 1# t 2#  5 op 60# O 7F# I 8# 9 9F#  :F#  ;# H >c h ?# t @# ops A#(  BF#0 opv Cc#8 opc DF#@ @ G h H%# ' I#  JF#  K#  LF# t M#  P h Q@# l R#H Y6 Z'2 [Ldel \q  ]i( ^ _ x U  V# a W-# h X\# r `# vc a?#h v b#p %j/& u 0% W 1F# lsn 2Q# tm 3%# len 4F#  5F# D 8b tag 9;#  :Q# op ;;# T > tag ?;#  @Q#  AF#  BF#  CF#J Ft)x Lr M6t N H Q8 hdr R# row S,# x Tb#(  U8 #@  X R Y# fd Z #  [#  \#  ] # ^/ #(  `#0  a#x  b#  c?#?    > F ?/  F8   *a R+# ,# -@(@ 8 -Xext0h ;?(@b@  l; he;d F?b@Z@0 lF X FP:GFl X?Z@!@ lX HbufX @X  ^h:_FXWtF`F\@ @ce?d ?!@r"@@\ l Hbuf@F8  \`off-Xrc?l?r"@#@ l XbufPFL8 @tuh / #@#@/ l H8 @bufď`F\rc?l / #@#@`h l hw ?#@"$@ l heۖdu "$@&@ Rl }8 }R} @X rc` h%@a&@buf R}b &@&@ l h!  ?&@)'@ l  h" `#&)'@='@@  l& h! ;='@'@i l; XY'@'@msg=R ``# F?'@'@  lF h5 $ / `%R & B g@'F&` C  g@2S'@+@< >:intE>0)37z>7_'@0(@` buf_X_oPpahcrcbd   z 0(@(@ fcrcÅ\bufPoHph (@*@ crcLu@0Hjlil{`\(hd  )*@*@ \MP07Xl*@+@ lM`07ha  `T  `=!  `Y  `+  `  `  `9  `q  `A0  `Y+@ ,@P 8 int<>:E!ww- (w+@;+@@  (X ptr)wh /w;+@^+@ 2 /-h <3w^+@+@ u ptr3wh 3-` 7y+@+@`  sz7yX len8-h szp9y`@+@ ,@  ptr@whL%   ` ,@%9@ 8 int<>:E( p n T# VT# nw# w#f3T 0xM % eKT& # ^$# %y# &-# '?# 4ptr5#x 8 9# :# ;?# /0 ,@0,@ Jt0h>;0,@,@ yt;h/Y,@.@ tYH Y@Y [?lvg?h h-`jyX.@3@@et}fmt}`~p~/@t0@len?~sy~0@1@sy~1@}1@i?~1@2@ull}2@2@!ul8}2@%3@Elldž}'3@3@li}?3@m4@bufH-@-h^d4@M4@\r?`m4@U5@ctXbufP-H ?l<5@]'U5@76@`t'Xbuf'P'-Hnum'D )?l76@=D76@[6@lDhO[6@6@ YlOX iRlc6@>8@lc~`k~! ptrn~">8@%9@lXtP ?ly`q  (9@B@4 int<>:eEmu0B3P / R0# len1# Q2#5& ns6# 7#:@ ns;#V>h ns?# @#C nsD# E#H I#L nsM# N# O# 3P#  #4 ^$# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#a( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# O 7# I 8# 9 9#  :#  ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H# ' I#  J#  K#  L# t M#  P h Q# l RU# H Y Z2 [del \  ]( ^Z _x U$  V# a W)# h X# r `# vc a;#h v b$#p0 # op $# Q %#  &#  '#  (U#  )#(X &?  ';#  (_#  )# f *#  +#  ,#( Y -#0 A .#8  /)#@  0s#H | 1#P Q 2#TYY)?Y$;eYY);Y*;Y;YO)Y0 #ZF0 - tu .O# z /# h 0# 1#  2# r 3;# r 4#(' A l B# tu CO#  D#U  O' s PY# r Q#( \L s ]Y# t ^#8 iq s jY# r k*# sU O Z ^  L ' z9 R {/#  |q#  };#  O #  a #  a #  #(;I I 9 a I U v,I (9@9@@ i,I h:;9@r;@ i:I Xip; hZ br;@;@ ibI Xipc hyI ;@:<@`e iyI XtyOPip h|;:<@<@ iI Xil h<@<@  iI Xil h'I <@:=@1 iI XlPil h;:=@=@} iI Xir} hrc;dL=@=@@ iI Xir} hI =@n>@ iI XsYPir} h;n>@>@V iI XirV hrc;d>@?@` iI XirV h I ?@?@ iI XsYPirV h ;?@#@@ 4 i I Xis 4 hrc;d'#@@M@@x iI Xis4 h +I M@@@@ i+I Xs+YPis34 h!A@@A@@ iAI h U;A@8A@.iUI h!d8A@oA@_idI h"vI oA@B@`ivI XtvOP#vL$ x;l B@B@4 int<>:eEmu0B3P / R0# len1# Q2#5& ns6# 7#:@ ns;#V>h ns?# @#C nsD# E#H I#L nsM# N# O# 3P#  #4 ^$# %# &)# ';#4O ptr5O#8 9# :# ;;# 4+ -s# .)#( & h '# t (#a( + h ,&# t -#( 0* h 1@# t 2# 5 op 6# O 7# I 8# 9 9#  :#  ;#  lH > h ?h# t @# ops A#(  B#0 opv C#8 opc D#@*@ GZ h H# ' I#  J#  K#  L# t M#  P h Q# l RU# H Y Z2 [del \  ]( ^Z _x U$  V# a W)# h X# r `# vc a;#h v b$#p0 # op $# Q %#  &#  '#  (U#  )#(X &?  ';#  (_#  )# f *#  +#  ,#( Y -#0 A .#8  /)#@  0s#H | 1#P Q 2#TYY)?Y$;eYY);Y*;Y;YO)YF6B@,B@~s6YXQ6Told8lFY,B@B@ sFYhW\B@B@s\Yhq B@G@4 int<>:eEmu3P #^$# %#&)#';#4 ptr5#8N9N#:#;;#  /R0# len1#Q2#!  s 0# op$#Q%#&#'#(#)#( /B@C@E r/Eh y:C@?C@@z r:EhK;?C@JF@L rKE rcvK ptrKshdrMTP\bufPphdi`F@0Lt@gJF@F@ ptrX bufPHsrchoff`s;F@G@`\ rE bufÀ) off\hdrbht)Xptrh@rc;d)Tsl 0sG@Z@ 4 int<>:eEmu0B3P /R0# len1#Q2#5 ns6#7#:5 ns;#V>] ns?#@#C nsD#E#HI#L nsM#N#O#3P#  #)^$# %#&)#';#4D ptr5D#89#:#;;# )+-s#.)#E $  s ( & h '# t (#a( +% h ,# t -#( 0J h 15# t 2# 5 op 6#O 7#I 8#9 9# :#  ;#  lH > h ?]# t @# ops A#( B#0 opv C#8 opc D#@J@ Gz h H#' I# J#  K# L# t M#  P h Q# l RJ#H Y Z2 [del \%  ]( ^z _x UD V#a W)# h X# r `# vc a;#h v bD#p2G@G@yr2yh/?G@=I@ r?yhw=I@fI@rwyhbufw`w)X};fI@$K@cr}yXrcv}Pptr}sHlbuf`a;$K@L@@ryXrcvPptrsHlbuf`;L@N@7ryXrcvðPptrsHDZlbufȀ`;N@Q@ryHrcv@ptrslbuf`Q@v;\;Q@cS@`ryrcvptrs\buf P=/S@i&l&Loff'h`j,d^,H-`tu6D{R@R@/r0;DE;cS@X@ rEyrcvEptrEsK\bufLP{W@iRl^RLksShbDpp`T@NT@ UrV;HRU@-V@oprvz; S;X@VY@ p ryhrcv`ptrsXhdrp PdVY@Y@ ptr XbufP!Hsrchoff `s ;Y@Z@ rybuf!)off hdrp t)Xptr @rc;dY@JZ@@p h)"s lOZ@a]@ int<>:nEn3E&0Z@}\@@ buf&|h &` K}\@]@ !bufKhh Kd \0]@a]@! \l% : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' I@B : ; I .? : ; ' I@B 4: ; I  % $ > $ > : ; I I&I : ;  : ; I8  : ;  ( I !I/ 4: ; I?  % : ; I$ > $ >   I&I : ;  : ; I8 : ;I8 : ; I !I/  : ; I8  : ;  : ; I : ; I' II'  : ; (  : ; .: ; ' @B : ; I 4: ; I .: ; ' I@B .? : ; ' I@B 4: ; I : ; I .? : ; ' @B  .? : ; ' I@B !.? : ; ' I@B % : ; I$ > $ >   II!I/  : ;  : ; I8 : ;I8 : ; : ; I8  : ;  : ; I : ; I : ; (  : ; ' II : ;.? : ; ' I@B : ; I 4: ; I .: ; ' I@B : ; I 4: ; I  4: ;I .? : ;' @B  : ;I !.? : ;' I@B ": ;I #.? : ;' I@B $4: ;I %4: ; I? < &4: ; I?  '&I% $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?  % : ; I$ > $ >   I' II .? : ; ' I@B  : ; I 4: ; I .? : ; ' I@B  : ; I .? : ; ' @B 4: ; I % : ; I$ > $ >   I&I& I !I/  : ;  : ; I8  : ; (  : ; I8 .? : ; ' @B : ; I .? : ; ' I@B : ; I 4: ; I 4: ; I   .: ; ' I@B .? : ;' I@B : ;I : ;I 4: ;I  : ;.? : ;' @B  4: ;I ! U".? : ;' I@B % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II'  : ; ( .: ; ' I@B : ; I 4: ; I .: ; ' @B .? : ; ' I@B .: ; ' I@B .: ; ' @B 4: ;I .: ;' I@B : ;I .: ;' @B  .? : ;' I@B !.? : ;' @B ".? : ;' I@B #: ;I $4: ;I % : ; I$ > $ >   I&I : ;  : ; I8 : ; I8 I !I/  : ;  : ; I : ; I' II' .? : ; ' I@B : ; I : ; I 4: ; I .? : ; ' I@B .? : ; ' @B % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I .? : ; ' @B  : ; I .? : ; ' I@B 4: ; I 4: ; I  : ;  U.: ; ' I@B : ; I I!I/ % : ; I$ > $ >   I : ;  : ; I8 : ; I8 ' I I I !I/  : ;  : ; I : ; I.? : ; ' @B : ; I .? : ; ' @B : ; I .: ; ' I@B 4: ; I 4: ; I  : ;.: ;' I@B : ;I 4: ;I 4: ;I  U   .? : ;' I@B !: ;I "I% $ > $ >  I&I: ; I.? : ; ' I@B : ; I : ; I .? : ; ' @B  .? : ; ' I@B J /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantoolxlog.cstddef.htypes.htypes.hstdint.hstdio.hlibio.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.htnt_log.htnt_xlog.h @(u,uuuuuvY2"Z/FMGLHK16 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/srcerrcode.hstdint.herrcode.ch /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_xlog.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_reply.htnt_stream.htnt_log.htnt_xlog.h p@-2I1tvttY.uKgvK .u . . . .  /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tntrpl/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_log.cstddef.htypes.htypes.hstdio.hlibio.huio.hstdint.htnt_proto.htnt_tuple.htnt_request.htnt_log.h @,uuKuuKuKuY1gY4uu('0/1>ugx/guF  (w @[KuY+M13iwr.g/3jH=sվu0ttY1ugugv!0g1Y2ك"#uuh00"gK#uYJN0=10.HgI,vv /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includecrc32.cstddef.hstdint.h '@u/+Y./+=.K"eJ!KKO;ZZ:]kJ"eJ=4#gZ/=4!gZ>; /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_mem.cstddef.htnt_mem.h +@'uK0K0g0=uuK0KCI /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_tuple.cstddef.hstdarg.hstdint.htnt_tuple.hctype.h  ,@/Y .󻟻./uuYgɻugvu)K.2'-Y+ZןEY##ׅW#*[#Y!#ɊzX#ɆW!#Ɉ*#Ʉ0Gt=  .uu0guןyt .=uuuuvgd$gY.guuuc%gY .Y .Jz' .2'i-#נ,$ .uuu*ugvK /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_iter.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.htnt_iter.h (9@+uYhuuYK0ɭg$g'$vY0.uuK0Ku/Y0.uuK0%gv0.uuK0%gv0.uuK0%gv0.uuK .. ../uguv/d gY /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_stream.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.htnt_reply.htnt_stream.h B@6= .uYhuuYK .H /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_reply.cstddef.htypes.htypes.hstdint.htnt_tuple.htnt_proto.htnt_reply.h B@.Y . .?h󭻟ɡMYɟeZeZeZeZgMguvLZvguJ utA .=$KK1xuu//uuvuu /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/tnt/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/include/x86_64-linux-gnu/sys/usr/include/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/connector/c/include/tarantooltnt_request.cstddef.htypes.htypes.hstdint.htnt_proto.htnt_tuple.huio.htnt_request.h G@2Y . <bXZZZ00$ .2=u׻/g=guY2=u׻/g=guY2=u׻/g=guY2=)h5[/g=gggu[t> << uY2=ˑvuu"JqfJft><&u2=埭ˑuuJ#i/YYZZZɻo#J/g=gug=g> v>?www*v*+w+,w,/w/MvMNwNOwORwRvvvwwwxwx{w{vwwwvwww#v#$w$%w%(w(vwww v wwwvwww`v`awabwbeweH vH I wI J wJ M wM * v* + w+ , w, / w/ N vN O wO P wP S wS v w w w 1 v1 2 w2 3 w3 6 w6  v  www|v|}w}~w~wIvIJwJKwKNwNvwwwvwwwwvwxwxywy|w|vwwwvwwwvwwwvwwwEvEFwFGwGJwJvwwwvwwwyvyzwz{w{~w~vwww$v$%w%&w&)w)vwwwvwwwvwwwFvFGwGHwHKwKvwww#v#$w$%w%(w(vwwwvwww#v#$w$%w%(w(^v^_w_`w`cwcivijwjkwknwnvwwwvwww#v#$w$%w%(w(vwwwvwwwvwwwUvUVwVWwWZwZvwww v ! w! " w" % w% v w w w tvtuwuvwvywyvwww3v34w45w58w8vwwwvwwwuvuvwvwwwzwzvw    9= y .symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_ranges@#@ 1<@<$Do`@`N @x V`@` ^ol@lko8@8pz@0@@ @@@@@4E^@^ ^@^ g@gj@jL  w@ wx`xx`x x` x(x`(xz`zz`z{`{(. @`(  0(D0)te5CT"O0=eZwS`!etgus`%m  @@<@`@@`@l@8@ @ @ @ @@ @^@^@g@j@ w@x`x` x`(x`z`z`{`@` !"  x` @. 0@A p@WH`fx` @x` @d p@B @f (@: b@ Z@P, !@A r"@Z #@3k`~`` ` 0(@Z ` ` ` ` ` `3 `I `_ (@q *@F ` 3@ (9@} 9@ r;@O :<@f <@!$ :=@8 =@*L n>@b >@*x ?@ #@@* JF@j fI@ $K@ L@ N@ & Q@9 cS@L VY@j[ew@s x`x`{`(x`x`(`z` ^@ =I@)+I e {`p F@z ^@ @6 oA@ Y@ X@U@` U5@ '@` M@@  m4@ [6@x( *@D/(`6J^@Pd +@#q v@ B@$ Z@g@ =@ @|" ?C@ 1D ;+@#R ,@$a &@Ko{` "$@ #@  }\@': g@Q^@` .@j ;@ysp@ p]@ C@; ` 76@$ {`p`` G@$ @  ='@~  &@:- @B  ^+@)R (`^  #@%k  '@y  @M~  ,@  ?@  A@  B@B  8@&  )'@  ]@K  <@y  @  G@  8A@7' A  6@kJ  B@$[  ,B@qk    +@+  0,@d  @  +@_  @  @@C  >8@ crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryxlog.copnameerrcode.ctnt_xlog.ctnt_xlog_freetnt_xlog_requesttnt_log.ctnt_log_seterrtnt_log_eoftnt_log_readtnt_log_process_xlogtnt_log_process_snapshottnt_log_open_errtnt_log_error_listmsg.4461crc32.ccrc32c_tablesingletable_crc32csctp_crc_tableil8_o32sctp_crc_tableil8_o40sctp_crc_tableil8_o48sctp_crc_tableil8_o56sctp_crc_tableil8_o64sctp_crc_tableil8_o72sctp_crc_tableil8_o80sctp_crc_tableil8_o88crc32c_sb8_64_bitmultitable_crc32ctnt_mem.c_tnt_realloctnt_tuple.ctnt_tuple_validatetnt_iter.ctnt_iter_inittnt_iter_field_nexttnt_iter_field_rewindtnt_iter_list_nexttnt_iter_list_rewindtnt_iter_reply_nexttnt_iter_reply_freetnt_iter_request_nexttnt_iter_request_freetnt_iter_storage_nexttnt_iter_storage_freetnt_stream.ctnt_reply.ctnt_reply_cbtnt_request.ctnt_request_inserttnt_request_delete_1_3tnt_request_deletetnt_request_calltnt_request_selecttnt_request_updatetnt_request_cbtnt_enc.c__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_finitnt_request_setoriginfree@@GLIBC_2.2.5strcasecmp@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5_ITM_deregisterTMCloneTabledata_starttnt_replytnt_xlog_errortnt_xlog_opentnt_fieldtnt_requestfread@@GLIBC_2.2.5tnt_request_fromstdin@@GLIBC_2.2.5tnt_tuple_set_ascrc32tnt_iter_storagetnt_tuple_settnt_list_freecrc32c_edatafclose@@GLIBC_2.2.5_finistrlen@@GLIBC_2.2.5tnt_mem_freetnt_xlog_strerrorprintf@@GLIBC_2.2.5tnt_reply_inittnt_enc_readsnprintf@@GLIBC_2.2.5tnt_log_marker_v11strrchr@@GLIBC_2.2.5tnt_iter_replymemset@@GLIBC_2.2.5tnt_log_guesstnt_reply_fromfgetc@@GLIBC_2.2.5tnt_mem_alloctnt_tuple_inittnt_log_closeftello64@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5fgets@@GLIBC_2.2.5__data_startstrcmp@@GLIBC_2.2.5tnt_log_opentnt_log_next_to__gmon_start__fopen64@@GLIBC_2.2.5tnt_enc_writememcpy@@GLIBC_2.14tnt_log_marker_eof_v11_IO_stdin_usedtnt_tupletnt_iter__gcc_personality_v0@@GCC_3.3.1__libc_csu_inittnt_reply_freecrc32_tabletnt_list_inittnt_error_codes_endtnt_request_init_startfseeko64@@GLIBC_2.2.5tnt_log_strerrortnt_log_seekrealloc@@GLIBC_2.2.5tnt_mem_realloc__bss_starttnt_log_nexttnt_log_errnomaintnt_tuple_addtnt_iter_requesttnt_nexttnt_stream_freetnt_xlog_closetnt_log_error_Jv_RegisterClassestnt_enc_sizetnt_iter_listtnt_xlogtnt_request_freetnt_rewind_ITM_registerTMCloneTabletnt_listtnt_stream_reqidtnt_stream_initstrerror@@GLIBC_2.2.5_Unwind_Resume@@GCC_3.0tnt_mem_inittnt_tuple_free_inittnt_mem_duptnt_xlog_errnotnt_iter_freetnt_list_at__ctype_b_loc@@GLIBC_2.3tarantool-1.5.1.218.g1a69fd6/test/connector_c/snap.result0000664000000000000000000000007012202131537021425 0ustar rootroot['3', '3'] ['hello', 'world'] ['1', 'world'] ['2', '2'] tarantool-1.5.1.218.g1a69fd6/test/connector_c/cfg/0000775000000000000000000000000012231715257017777 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/connector_c/cfg/master.cfg0000664000000000000000000000054412231715257021756 0ustar rootroot slab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 replication_port = 33016 rows_per_wal = 50 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "STR" tarantool-1.5.1.218.g1a69fd6/test/connector_c/cfg/tarantool.cfg0000664000000000000000000000051212231715257022461 0ustar rootroot slab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" primary_port = 33013 secondary_port = 33014 admin_port = 33015 rows_per_wal = 50 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/connector_c/connector.snap0000664000000000000000000000040312231715257022112 0ustar rootrootSNAP 0.11 1fuv4A&§33 Ꮒuv4A"GjP helloworld luv4Avѫ1world r6uv4Ah722tarantool-1.5.1.218.g1a69fd6/test/connector_c/CMakeLists.txt0000664000000000000000000000061712231715257022004 0ustar rootrootfile(GLOB all_sources *.c *.m *.mm) set_source_files_compile_flags("TESTS" ${all_sources}) include_directories("${PROJECT_SOURCE_DIR}/test/unit") include_directories("${PROJECT_SOURCE_DIR}/connector/c/include") tarantool_client("tt" tt.c) tarantool_client("tp" tp.c) tarantool_client("update" update.c) tarantool_client("xlog" xlog.c) tarantool_client("rpl" rpl.c) tarantool_client("snap" snap.c) tarantool-1.5.1.218.g1a69fd6/test/connector_c/tp.test0000664000000000000000000000030512231715257020562 0ustar rootrootimport subprocess import sys import os p = subprocess.Popen([os.path.join(builddir, "test/connector_c/tp")], stdout=subprocess.PIPE) o,e = p.communicate() sys.stdout.write(o) tarantool-1.5.1.218.g1a69fd6/test/connector_c/tp.c0000664000000000000000000000505312202131537020021 0ustar rootroot #include #include #include #include #include #include #include #include static void reply_print(struct tp *rep) { while (tp_next(rep)) { printf("tuple fields: %d\n", tp_tuplecount(rep)); printf("tuple size: %d\n", tp_tuplesize(rep)); printf("["); while (tp_nextfield(rep)) { printf("%-.*s", tp_getfieldsize(rep), tp_getfield(rep)); if (tp_hasnextfield(rep)) printf(", "); } printf("]\n"); } } static inline int test_check_read_reply(int fd) { struct tp rep; tp_init(&rep, NULL, 0, tp_realloc, NULL); while (1) { ssize_t to_read = tp_req(&rep); if (to_read <= 0) break; ssize_t new_size = tp_ensure(&rep, to_read); if (new_size == -1) { // no memory (?) return 1; } ssize_t res = read(fd, rep.p, to_read); if (res == 0) { // eof return 1; } else if (res < 0) { // error return 1; } tp_use(&rep, res); } ssize_t server_code = tp_reply(&rep); if (server_code != 0) { printf("error: %-.*s\n", tp_replyerrorlen(&rep), tp_replyerror(&rep)); tp_free(&rep); return 1; } if (tp_replyop(&rep) == 17) { /* select */ reply_print(&rep); } else if (tp_replyop(&rep) == 13) { /* insert */ } else { return 1; } tp_free(&rep); return 0; } static inline int test_check_read(void) { int fd; struct sockaddr_in tt; if ((fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { printf("Failed to create socket\n"); return 1; } memset(&tt, 0, sizeof(tt)); tt.sin_family = AF_INET; tt.sin_addr.s_addr = inet_addr("127.0.0.1"); tt.sin_port = htons(33013); if (connect(fd, (struct sockaddr *) &tt, sizeof(tt)) < 0) { printf("Failed to connect\n"); return 1; } struct tp req; tp_init(&req, NULL, 0, tp_realloc, NULL); tp_insert(&req, 0, 0); tp_tuple(&req); tp_sz(&req, "_i32"); tp_sz(&req, "0e72ae1a-d0be-4e49-aeb9-aebea074363c"); tp_select(&req, 0, 0, 0, 1); tp_tuple(&req); tp_sz(&req, "_i32"); int rc = write(fd, tp_buf(&req), tp_used(&req)); if (rc != tp_used(&req)) return 1; tp_free(&req); rc = test_check_read_reply(fd); if (rc != 0) return 1; rc = test_check_read_reply(fd); if (rc != 0) return 1; close(fd); return 0; } static inline void test_check_buffer_initialized(void) { struct tp req; tp_init(&req, NULL, 0, tp_realloc, NULL); tp_select(&req, 0, 0, 0, 0); /* could fail on assert */ tp_tuple(&req); tp_sz(&req, "key"); tp_free(&req); } int main(int argc, char *argv[]) { (void)argc; (void)argv; test_check_buffer_initialized(); test_check_read(); return 0; } tarantool-1.5.1.218.g1a69fd6/test/connector_c/Makefile0000664000000000000000000004605412213333035020677 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/connector_c/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. test/connector_c/CMakeFiles/rpl.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/CMakeFiles/rpl.dir/rule .PHONY : test/connector_c/CMakeFiles/rpl.dir/rule # Convenience name for target. rpl: test/connector_c/CMakeFiles/rpl.dir/rule .PHONY : rpl # fast build rule for target. rpl/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/build .PHONY : rpl/fast # Convenience name for target. test/connector_c/CMakeFiles/snap.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/CMakeFiles/snap.dir/rule .PHONY : test/connector_c/CMakeFiles/snap.dir/rule # Convenience name for target. snap: test/connector_c/CMakeFiles/snap.dir/rule .PHONY : snap # fast build rule for target. snap/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/build .PHONY : snap/fast # Convenience name for target. test/connector_c/CMakeFiles/tp.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/CMakeFiles/tp.dir/rule .PHONY : test/connector_c/CMakeFiles/tp.dir/rule # Convenience name for target. tp: test/connector_c/CMakeFiles/tp.dir/rule .PHONY : tp # fast build rule for target. tp/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/build .PHONY : tp/fast # Convenience name for target. test/connector_c/CMakeFiles/tt.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/CMakeFiles/tt.dir/rule .PHONY : test/connector_c/CMakeFiles/tt.dir/rule # Convenience name for target. tt: test/connector_c/CMakeFiles/tt.dir/rule .PHONY : tt # fast build rule for target. tt/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/build .PHONY : tt/fast # Convenience name for target. test/connector_c/CMakeFiles/update.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/CMakeFiles/update.dir/rule .PHONY : test/connector_c/CMakeFiles/update.dir/rule # Convenience name for target. update: test/connector_c/CMakeFiles/update.dir/rule .PHONY : update # fast build rule for target. update/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/build .PHONY : update/fast # Convenience name for target. test/connector_c/CMakeFiles/xlog.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/connector_c/CMakeFiles/xlog.dir/rule .PHONY : test/connector_c/CMakeFiles/xlog.dir/rule # Convenience name for target. xlog: test/connector_c/CMakeFiles/xlog.dir/rule .PHONY : xlog # fast build rule for target. xlog/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/build .PHONY : xlog/fast __/__/src/errcode.o: __/__/src/errcode.c.o .PHONY : __/__/src/errcode.o # target to build an object file __/__/src/errcode.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/__/__/src/errcode.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/__/__/src/errcode.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/__/__/src/errcode.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/__/__/src/errcode.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/__/__/src/errcode.c.o cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/__/__/src/errcode.c.o .PHONY : __/__/src/errcode.c.o __/__/src/errcode.i: __/__/src/errcode.c.i .PHONY : __/__/src/errcode.i # target to preprocess a source file __/__/src/errcode.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/__/__/src/errcode.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/__/__/src/errcode.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/__/__/src/errcode.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/__/__/src/errcode.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/__/__/src/errcode.c.i cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/__/__/src/errcode.c.i .PHONY : __/__/src/errcode.c.i __/__/src/errcode.s: __/__/src/errcode.c.s .PHONY : __/__/src/errcode.s # target to generate assembly for a file __/__/src/errcode.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/__/__/src/errcode.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/__/__/src/errcode.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/__/__/src/errcode.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/__/__/src/errcode.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/__/__/src/errcode.c.s cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/__/__/src/errcode.c.s .PHONY : __/__/src/errcode.c.s rpl.o: rpl.c.o .PHONY : rpl.o # target to build an object file rpl.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/rpl.c.o .PHONY : rpl.c.o rpl.i: rpl.c.i .PHONY : rpl.i # target to preprocess a source file rpl.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/rpl.c.i .PHONY : rpl.c.i rpl.s: rpl.c.s .PHONY : rpl.s # target to generate assembly for a file rpl.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/rpl.c.s .PHONY : rpl.c.s snap.o: snap.c.o .PHONY : snap.o # target to build an object file snap.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/snap.c.o .PHONY : snap.c.o snap.i: snap.c.i .PHONY : snap.i # target to preprocess a source file snap.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/snap.c.i .PHONY : snap.c.i snap.s: snap.c.s .PHONY : snap.s # target to generate assembly for a file snap.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/snap.c.s .PHONY : snap.c.s tp.o: tp.c.o .PHONY : tp.o # target to build an object file tp.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/tp.c.o .PHONY : tp.c.o tp.i: tp.c.i .PHONY : tp.i # target to preprocess a source file tp.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/tp.c.i .PHONY : tp.c.i tp.s: tp.c.s .PHONY : tp.s # target to generate assembly for a file tp.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/tp.c.s .PHONY : tp.c.s tt.o: tt.c.o .PHONY : tt.o # target to build an object file tt.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/tt.c.o .PHONY : tt.c.o tt.i: tt.c.i .PHONY : tt.i # target to preprocess a source file tt.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/tt.c.i .PHONY : tt.c.i tt.s: tt.c.s .PHONY : tt.s # target to generate assembly for a file tt.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/tt.c.s .PHONY : tt.c.s update.o: update.c.o .PHONY : update.o # target to build an object file update.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/update.c.o .PHONY : update.c.o update.i: update.c.i .PHONY : update.i # target to preprocess a source file update.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/update.c.i .PHONY : update.c.i update.s: update.c.s .PHONY : update.s # target to generate assembly for a file update.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/update.c.s .PHONY : update.c.s xlog.o: xlog.c.o .PHONY : xlog.o # target to build an object file xlog.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/xlog.c.o .PHONY : xlog.c.o xlog.i: xlog.c.i .PHONY : xlog.i # target to preprocess a source file xlog.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/xlog.c.i .PHONY : xlog.c.i xlog.s: xlog.c.s .PHONY : xlog.s # target to generate assembly for a file xlog.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/xlog.c.s .PHONY : xlog.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... rpl" @echo "... snap" @echo "... tp" @echo "... tt" @echo "... update" @echo "... xlog" @echo "... __/__/src/errcode.o" @echo "... __/__/src/errcode.i" @echo "... __/__/src/errcode.s" @echo "... rpl.o" @echo "... rpl.i" @echo "... rpl.s" @echo "... snap.o" @echo "... snap.i" @echo "... snap.s" @echo "... tp.o" @echo "... tp.i" @echo "... tp.s" @echo "... tt.o" @echo "... tt.i" @echo "... tt.s" @echo "... update.o" @echo "... update.i" @echo "... update.s" @echo "... xlog.o" @echo "... xlog.i" @echo "... xlog.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/test/connector_c/connector.test0000664000000000000000000000037212231715257022135 0ustar rootrootimport subprocess import sys import os p = subprocess.Popen([os.path.join(builddir, "test/connector_c/tt")], stdout=subprocess.PIPE) p.wait() for line in p.stdout.readlines(): sys.stdout.write(line) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/connector_c/tp.result0000664000000000000000000000011412231715257021117 0ustar rootroottuple fields: 2 tuple size: 42 [_i32, 0e72ae1a-d0be-4e49-aeb9-aebea074363c] tarantool-1.5.1.218.g1a69fd6/test/connector_c/update.c0000664000000000000000000006362012202131537020664 0ustar rootroot /* * Copyright (C) 2011 Mail.RU * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include "tarantool/util.h" #include #include /*========================================================================== * test variables *==========================================================================*/ /** tarantool connector instance */ static struct tnt_stream *tnt; static char *long_string = "A long time ago, in a galaxy far, far away...\n" "It is a period of civil war. Rebel\n" "spaceships, striking from a hidden\n" "base, have won their first victory\n" "against the evil Galactic Empire.\n" "During the battle, Rebel spies managed\n" "to steal secret plans to the Empire's\n" "ultimate weapon, the Death Star, an\n" "armored space station with enough\n" "power to destroy an entire planet.\n" "Pursued by the Empire's sinister agents,\n" "Princess Leia races home aboard her\n" "starship, custodian of the stolen plans\n" "that can save her people and restore\n" "freedom to the galaxy...."; /*========================================================================== * function declaration *==========================================================================*/ /*-------------------------------------------------------------------------- * tarantool management functions *--------------------------------------------------------------------------*/ /** insert tuple */ void insert_tuple(struct tnt_tuple *tuple); /** select tuple by key */ void select_tuple(int32_t key); /** update fields */ void update(int32_t key, struct tnt_stream *stream); /** add update fields operation: set int32 */ void update_set_i32(struct tnt_stream *stream, int32_t field, int32_t value); /** add update fields operation: set string */ void update_set_str(struct tnt_stream *stream, int32_t field, char *str); /** add update fields operation: splice string */ void update_splice_str(struct tnt_stream *stream, int32_t field, int32_t offset, int32_t length, char *list); /** add update fields operation: delete field */ void update_delete_field(struct tnt_stream *stream, int32_t field); /** add update fields operation: insert before int32 */ void update_insert_i32(struct tnt_stream *stream, int32_t field, int32_t value); /** add update fields operation: insert before string */ void update_insert_str(struct tnt_stream *stream, int32_t field, char *str); /** receive reply from server */ void recv_command(char *command); /** print tuple */ void print_tuple(struct tnt_tuple *tuple); /*-------------------------------------------------------------------------- * test suite functions *--------------------------------------------------------------------------*/ /** setup test suite */ void test_suite_setup(); /** clean-up test suite */ void test_suite_tear_down(); /** print tarantool error message and exit */ void fail_tnt_error(char *msg, int error_code); /** print tarantool error message and exit */ void fail_tnt_perror(char *msg); /*-------------------------------------------------------------------------- * test cases functions *--------------------------------------------------------------------------*/ /** update fields test case: simple set operation test */ void test_simple_set(); /** update fields test case: long set operation test */ void test_long_set(); /** update fields test case: append(set) operation test */ void test_append(); /** update fields test case: 32-bit arithmetics operations test */ void test_arith_i32(); /** update fields test case: 64-bit arithmetics operations test */ void test_arith_i64(); /** update fields test case: multi arithmetics operations test */ void test_multi_arith(); /** update fields test case: splice operations test */ void test_splice(); /** update fields test case: set and spice operations test */ void test_set_and_splice(); /** update fields test case: delete field operations test */ void test_delete_field(); /** update fields test case: insert field operations test */ void test_insert_field(); /** update fields test case: boundary arguments values test */ void test_boundary_args(); /*========================================================================== * function definition *==========================================================================*/ int main() { /* initialize suite */ test_suite_setup(); /* run tests */ test_simple_set(); test_long_set(); test_append(); test_arith_i32(); test_arith_i64(); test_multi_arith(); test_splice(); test_set_and_splice(); test_delete_field(); test_insert_field(); test_boundary_args(); /* clean-up suite */ test_suite_tear_down(); return EXIT_SUCCESS; } /*-------------------------------------------------------------------------- * tarantool management functions *--------------------------------------------------------------------------*/ void insert_tuple(struct tnt_tuple *tuple) { if (tnt_insert(tnt, 0, TNT_FLAG_RETURN, tuple) < 0) fail_tnt_perror("tnt_insert"); if (tnt_flush(tnt) < 0) fail_tnt_perror("tnt_flush"); recv_command("insert"); } void select_tuple(int32_t key) { struct tnt_list tuple_list; tnt_list_init(&tuple_list); struct tnt_tuple *tuple = tnt_list_at(&tuple_list, NULL); tnt_tuple(tuple, "%d", key); if (tnt_select(tnt, 0, 0, 0, 1, &tuple_list) < 0) fail_tnt_perror("tnt_select"); if (tnt_flush(tnt) < 0) fail_tnt_perror("tnt_flush"); recv_command("select"); tnt_list_free(&tuple_list); } void update(int32_t key, struct tnt_stream *stream) { struct tnt_tuple *k = tnt_tuple(NULL, "%d", key); if (tnt_update(tnt, 0, TNT_FLAG_RETURN, k, stream) < 0) fail_tnt_perror("tnt_update"); if (tnt_flush(tnt) < 0) fail_tnt_perror("tnt_flush"); tnt_tuple_free(k); recv_command("update fields"); } void update_set_i32(struct tnt_stream *stream, int32_t field, int32_t value) { int result = tnt_update_assign(stream, field, (char *)&value, sizeof(value)); if (result < 0) fail_tnt_error("tnt_update_assign", result); } void update_set_str(struct tnt_stream *stream, int32_t field, char *str) { int result = tnt_update_assign(stream, field, str, strlen(str)); if (result < 0) fail_tnt_error("tnt_update_assign", result); } void update_splice_str(struct tnt_stream *stream, int32_t field, int32_t offset, int32_t length, char *list) { int result = tnt_update_splice(stream, field, offset, length, list, strlen(list)); if (result < 0) fail_tnt_error("tnt_update_splice", result); } void update_delete_field(struct tnt_stream *stream, int32_t field) { int result = tnt_update_delete(stream, field); if (result < 0) fail_tnt_error("tnt_update_delete", result); } void update_insert_i32(struct tnt_stream *stream, int32_t field, int32_t value) { int result = tnt_update_insert(stream, field, (char *)&value, sizeof(value)); if (result < 0) fail_tnt_error("tnt_update_insert", result); } void update_insert_str(struct tnt_stream *stream, int32_t field, char *str) { int result = tnt_update_insert(stream, field, str, strlen(str)); if (result < 0) fail_tnt_error("tnt_update_insert_before", result); } void recv_command(char *command) { struct tnt_iter i; tnt_iter_reply(&i, tnt); while (tnt_next(&i)) { struct tnt_reply *r = TNT_IREPLY_PTR(&i); printf("%s: respond %s (op: %"PRIu32", reqid: %"PRIu32", code: %"PRIu32", count: %"PRIu32")\n", command, tnt_strerror(tnt), r->op, r->reqid, r->code, r->count); struct tnt_iter it; tnt_iter_list(&it, TNT_REPLY_LIST(r)); while (tnt_next(&it)) { struct tnt_tuple *tu = TNT_ILIST_TUPLE(&it); print_tuple(tu); } tnt_iter_free(&it); } if (i.status == TNT_ITER_FAIL) fail_tnt_perror("tnt_next"); tnt_iter_free(&i); } void print_tuple(struct tnt_tuple *tuple) { bool is_first = true; printf("("); struct tnt_iter ifl; tnt_iter(&ifl, tuple); while (tnt_next(&ifl)) { char *data = TNT_IFIELD_DATA(&ifl); uint32_t size = TNT_IFIELD_SIZE(&ifl); if (!is_first) { printf(", "); } is_first = false; switch(size) { case 1: printf("%"PRIi8" (0x%02"PRIx8")", *(int8_t *)data, *(int8_t *)data); break; case 2: printf("%"PRIi16" (0x%04"PRIx16")", *(int16_t *)data, *(int16_t *)data); break; case 4: printf("%"PRIi32" (0x%08"PRIx32")", *(int32_t *)data, *(int32_t *)data); break; case 8: printf("%"PRIi64" (0x%016"PRIx64")", *(int64_t *)data, *(int64_t *)data); break; default: printf("'%.*s'", size, data); break; } } fail_if(ifl.status == TNT_ITER_FAIL); tnt_iter_free(&ifl); printf(")\n"); } /*-------------------------------------------------------------------------- * test suite functions *--------------------------------------------------------------------------*/ void test_suite_setup() { tnt = tnt_net(NULL); fail_if(tnt == NULL); tnt_set(tnt, TNT_OPT_HOSTNAME, "localhost"); tnt_set(tnt, TNT_OPT_PORT, 33013); tnt_set(tnt, TNT_OPT_SEND_BUF, 128000); if (tnt_init(tnt) == -1) fail_tnt_perror("tnt_init"); if (tnt_connect(tnt) == -1) fail_tnt_perror("tnt_connect"); } void test_suite_tear_down() { tnt_stream_free(tnt); } void fail_tnt_error(char *msg, int error_code) { printf("fail: %s: %i\n", msg, error_code); exit(EXIT_FAILURE); } void fail_tnt_perror(char *msg) { printf("fail: %s: %s\n", msg, tnt_strerror(tnt)); exit(EXIT_FAILURE); } /*-------------------------------------------------------------------------- * test cases functions *--------------------------------------------------------------------------*/ void test_simple_set() { header(); /* insert tuple */ printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%d%d%s", 1, 2, 0, ""); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test simple set field\n"); struct tnt_stream *stream = tnt_buf(NULL); update_set_str(stream, 1, "new field value"); update_set_str(stream, 2, ""); update_set_str(stream, 3, "fLaC"); update(1, stream); tnt_stream_free(stream); printf("# set field\n"); stream = tnt_buf(NULL); update_set_str(stream, 1, "value?"); update_set_str(stream, 1, "very very very very very long field value?"); update_set_str(stream, 1, "field's new value"); update(1, stream); tnt_stream_free(stream); stream = tnt_buf(NULL); printf("# test set primary key\n"); update_set_i32(stream, 0, 2); update(1, stream); tnt_stream_free(stream); footer(); } void test_long_set() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%s%s%s", 1, "first", "", "third"); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test set big value in empty field\n"); struct tnt_stream *stream = tnt_buf(NULL); update_set_str(stream, 2, long_string); update(1, stream); tnt_stream_free(stream); printf("# test replace long value to short\n"); stream = tnt_buf(NULL); update_set_str(stream, 2, "short string"); update(1, stream); tnt_stream_free(stream); footer(); } void test_append() { header(); /* insert tuple */ printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%s", 1, "first"); insert_tuple(tuple); tnt_tuple_free(tuple); /* test append field */ struct tnt_stream *stream = tnt_buf(NULL); printf("# test append field\n"); update_set_str(stream, 2, "second"); update(1, stream); tnt_stream_free(stream); /* test multi append field */ stream = tnt_buf(NULL); printf("# test multi append\n"); update_set_str(stream, 3, "3"); update_set_str(stream, 3, "new field value"); update_set_str(stream, 3, "other new field value"); update_set_str(stream, 3, "third"); update(1, stream); tnt_stream_free(stream); /* test append many field */ stream = tnt_buf(NULL); printf("# test append many fields\n"); update_set_str(stream, 4, "fourth"); update_set_str(stream, 5, "fifth"); update_set_str(stream, 6, "sixth"); update_set_str(stream, 7, "seventh"); update_set_str(stream, 8, long_string); update(1, stream); tnt_stream_free(stream); /* test append and change field */ stream = tnt_buf(NULL); printf("# test append and change field\n"); update_set_str(stream, 9, long_string); update_splice_str(stream, 9, 1, 544, "ac"); tnt_update_arith_i32(stream, 9, TNT_UPDATE_XOR, 0x3ffffff); tnt_update_arith_i32(stream, 9, TNT_UPDATE_ADD, 1024); update(1, stream); tnt_stream_free(stream); /* test set to not an exist field */ stream = tnt_buf(NULL); printf("# test set to not an exist field\n"); update_set_str(stream, 0xDEADBEEF, "invalid!"); update(1, stream); tnt_stream_free(stream); footer(); } void test_arith_i32() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%d%d%d", 1, 2, 0, 0); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test add\n"); struct tnt_stream *stream = tnt_buf(NULL); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 16); update(1, stream); tnt_stream_free(stream); printf("# test overflow add\n"); stream = tnt_buf(NULL); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, INT32_MAX); update(1, stream); tnt_stream_free(stream); printf("# test underflow add\n"); stream = tnt_buf(NULL); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, INT32_MIN); update(1, stream); tnt_stream_free(stream); printf("# test or\n"); stream = tnt_buf(NULL); tnt_update_arith_i32(stream, 2, TNT_UPDATE_OR, 0xbacfbacf); tnt_update_arith_i32(stream, 3, TNT_UPDATE_OR, 0xfabcfabc); update(1, stream); tnt_stream_free(stream); printf("# test xor\n"); stream = tnt_buf(NULL); tnt_update_arith_i32(stream, 2, TNT_UPDATE_XOR, 0xffffffff); tnt_update_arith_i32(stream, 3, TNT_UPDATE_XOR, 0xffffffff); update(1, stream); tnt_stream_free(stream); printf("# test and\n"); stream = tnt_buf(NULL); tnt_update_arith_i32(stream, 2, TNT_UPDATE_AND, 0xf0f0f0f0); tnt_update_arith_i32(stream, 3, TNT_UPDATE_AND, 0x0f0f0f0f); update(1, stream); tnt_stream_free(stream); footer(); } /** update fields test case: 64-bit arithmetics operations test */ void test_arith_i64() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%ll%ll%ll", 1, 2, 0, 0, 0); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test add\n"); struct tnt_stream *stream = tnt_buf(NULL); tnt_update_arith_i64(stream, 1, TNT_UPDATE_ADD, 16); update(1, stream); tnt_stream_free(stream); printf("# test overflow add\n"); stream = tnt_buf(NULL); tnt_update_arith_i64(stream, 1, TNT_UPDATE_ADD, INT64_MAX); update(1, stream); tnt_stream_free(stream); printf("# test underflow add\n"); stream = tnt_buf(NULL); tnt_update_arith_i64(stream, 1, TNT_UPDATE_ADD, INT64_MIN); update(1, stream); tnt_stream_free(stream); printf("# test or\n"); stream = tnt_buf(NULL); tnt_update_arith_i64(stream, 2, TNT_UPDATE_OR, 0xbacfbacfbacfbacf); tnt_update_arith_i64(stream, 3, TNT_UPDATE_OR, 0xfabcfabcfabcfabc); update(1, stream); tnt_stream_free(stream); printf("# test xor\n"); stream = tnt_buf(NULL); tnt_update_arith_i64(stream, 2, TNT_UPDATE_XOR, 0xffffffffffffffff); tnt_update_arith_i64(stream, 3, TNT_UPDATE_XOR, 0xffffffffffffffff); update(1, stream); tnt_stream_free(stream); printf("# test and\n"); stream = tnt_buf(NULL); tnt_update_arith_i64(stream, 2, TNT_UPDATE_AND, 0xf0f0f0f0f0f0f0f0); tnt_update_arith_i64(stream, 3, TNT_UPDATE_AND, 0x0f0f0f0f0f0f0f0f); update(1, stream); tnt_stream_free(stream); printf("# test casting 32-bit operand to 64-bit\n"); stream = tnt_buf(NULL); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 16); update(1, stream); tnt_stream_free(stream); footer(); } void test_multi_arith() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%s%d%s", 1, "first", 128, "third"); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test simple and\n"); struct tnt_stream *stream = tnt_buf(NULL); update_set_i32(stream, 2, 0); update_set_str(stream, 1, "first field new value"); tnt_update_arith_i32(stream, 2, TNT_UPDATE_XOR, 0xF00F); update_set_str(stream, 3, "third field new value"); tnt_update_arith_i32(stream, 2, TNT_UPDATE_OR, 0xF00F); update(1, stream); tnt_stream_free(stream); footer(); } void test_splice() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%s%s%s", 1, "first", "hi, this is a test string!", "third"); insert_tuple(tuple); tnt_tuple_free(tuple); struct tnt_stream *stream = tnt_buf(NULL); printf("# test cut from begin\n"); update_splice_str(stream, 2, 0, 4, ""); update(1, stream); tnt_stream_free(stream); printf("# test cut from middle\n"); stream = tnt_buf(NULL); update_splice_str(stream, 2, 9, -8, ""); update(1, stream); tnt_stream_free(stream); printf("# test cut from end\n"); stream = tnt_buf(NULL); update_splice_str(stream, 2, -1, 1, ""); update(1, stream); tnt_stream_free(stream); printf("# test insert before begin\n"); stream = tnt_buf(NULL); update_splice_str(stream, 2, 0, 0, "Bonjour, "); update(1, stream); tnt_stream_free(stream); printf("# test insert after end\n"); stream = tnt_buf(NULL); update_splice_str(stream, 2, 10000, 0, " o_O!?"); update(1, stream); tnt_stream_free(stream); printf("# test replace in begin\n"); stream = tnt_buf(NULL); update_splice_str(stream, 2, 0, 7, "Hello"); update(1, stream); tnt_stream_free(stream); printf("# test replace in middle\n"); stream = tnt_buf(NULL); update_splice_str(stream, 2, 17, -6, "field"); update(1, stream); tnt_stream_free(stream); printf("# test replace in end\n"); stream = tnt_buf(NULL); update_splice_str(stream, 2, -6, 4, "! Is this Sparta"); update(1, stream); tnt_stream_free(stream); footer(); } void test_set_and_splice() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%s%s%s", 1, "first", "hi, this is a test string!", "third"); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test set long string and splice to short\n"); struct tnt_stream *stream = tnt_buf(NULL); update_set_str(stream, 2, long_string); update_splice_str(stream, 2, 45, 500, " away away away"); update(1, stream); tnt_stream_free(stream); printf("# test set short value and splice to long\n"); stream = tnt_buf(NULL); update_set_str(stream, 2, "test"); update_splice_str(stream, 2, -4, 4, long_string); update(1, stream); tnt_stream_free(stream); printf("# test splice to long and set to short\n"); stream = tnt_buf(NULL); update_splice_str(stream, 3, -5, 5, long_string); update_set_str(stream, 2, "short name"); update(1, stream); tnt_stream_free(stream); footer(); } void test_delete_field() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%s%s%s%d%d%d%d%d%d%d%d%d%d", 1, "first", "hi, this is a test string!", "third", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test simple delete fields\n"); struct tnt_stream *stream = tnt_buf(NULL); update_delete_field(stream, 2); update(1, stream); tnt_stream_free(stream); printf("# test useless operations with delete fields\n"); stream = tnt_buf(NULL); update_set_i32(stream, 1, 0); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); update_delete_field(stream, 1); update(1, stream); tnt_stream_free(stream); printf("# test multi delete fields\n"); stream = tnt_buf(NULL); update_delete_field(stream, 2); update_delete_field(stream, 3); update_delete_field(stream, 4); update_delete_field(stream, 5); update_delete_field(stream, 6); update_delete_field(stream, 7); update_delete_field(stream, 8); update_delete_field(stream, 9); update_delete_field(stream, 10); update(1, stream); tnt_stream_free(stream); printf("# test multi delete fields\n"); stream = tnt_buf(NULL); update_delete_field(stream, 1); update_set_i32(stream, 1, 3); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); update(1, stream); tnt_stream_free(stream); printf("# test append and delete\n"); stream = tnt_buf(NULL); update_set_str(stream, 3, "second"); update_delete_field(stream, 3); update_set_str(stream, 3, "third"); update_set_str(stream, 4, "third"); update_delete_field(stream, 4); update_set_str(stream, 4, "third"); update_set_str(stream, 4, "fourth"); update_set_str(stream, 5, "fifth"); update_set_str(stream, 6, "sixth"); update_set_str(stream, 7, "seventh"); update_set_str(stream, 8, "eighth"); update_set_str(stream, 9, "ninth"); update_delete_field(stream, 7); update_delete_field(stream, 6); update(1, stream); tnt_stream_free(stream); printf("# test double delete\n"); stream = tnt_buf(NULL); update_delete_field(stream, 3); update_delete_field(stream, 3); update(1, stream); tnt_stream_free(stream); select_tuple(1); printf("# test delete not an exist field\n"); stream = tnt_buf(NULL); update_delete_field(stream, 0xDEADBEEF); update(1, stream); tnt_stream_free(stream); select_tuple(1); footer(); } void test_insert_field() { header(); printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%s", 9, "eleven"); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# insert new field before primary key\n"); struct tnt_stream *stream = tnt_buf(NULL); update_insert_i32(stream, 0, 7); update_insert_i32(stream, 0, 8); update(9, stream); tnt_stream_free(stream); printf("# insert a new field before last field\n"); stream = tnt_buf(NULL); update_insert_i32(stream, 3, 10); update(7, stream); tnt_stream_free(stream); printf("# double insert at the end\n"); stream = tnt_buf(NULL); update_set_i32(stream, 5, 14); update_insert_i32(stream, 6, 12); update_insert_i32(stream, 5, 13); update(7, stream); tnt_stream_free(stream); printf("# multi insert \n"); stream = tnt_buf(NULL); update_insert_i32(stream, 5, 15); update_insert_i32(stream, 5, 14); update_insert_i32(stream, 5, 13); update_insert_i32(stream, 5, 12); update(7, stream); tnt_stream_free(stream); printf("# insert before next to last field\n"); stream = tnt_buf(NULL); update_insert_i32(stream, 8, 15); update(7, stream); tnt_stream_free(stream); printf("# insert before next to last field\n"); stream = tnt_buf(NULL); update_set_i32(stream, 9, 17); update_insert_i32(stream, 9, 16); update_set_i32(stream, 10, 19); update_insert_i32(stream, 10, 18); update(7, stream); tnt_stream_free(stream); printf("# insert second tuple\n"); tuple = tnt_tuple(NULL, "%d%s%d", 0, "one", 11); insert_tuple(tuple); tnt_tuple_free(tuple); stream = tnt_buf(NULL); printf("# multi insert\n"); update_set_i32(stream, 1, -11); tnt_update_arith(stream, 1, TNT_UPDATE_ADD, 1); update_insert_i32(stream, 1, 1); tnt_update_arith(stream, 1, TNT_UPDATE_ADD, 2); update_insert_i32(stream, 1, 2); update_insert_i32(stream, 1, 3); tnt_update_arith(stream, 1, TNT_UPDATE_ADD, 3); tnt_update_arith(stream, 1, TNT_UPDATE_ADD, 4); tnt_update_arith(stream, 1, TNT_UPDATE_ADD, 5); update_insert_i32(stream, 1, 4); update_insert_i32(stream, 1, 5); tnt_update_arith(stream, 1, TNT_UPDATE_ADD, 6); update_insert_i32(stream, 1, 6); update_insert_i32(stream, 1, 7); update_insert_i32(stream, 1, 8); update_insert_i32(stream, 1, 9); update(0, stream); tnt_stream_free(stream); printf("# insert before invalid field number\n"); stream = tnt_buf(NULL); update_insert_str(stream, 100000, "ooppps!"); update(7, stream); tnt_stream_free(stream); footer(); } void test_boundary_args() { header(); const int max_update_op_cnt = 4000; printf("# insert tuple\n"); struct tnt_tuple *tuple = tnt_tuple(NULL, "%d%d", 0, 1); insert_tuple(tuple); tnt_tuple_free(tuple); printf("# test: try to do update w/o operations\n"); struct tnt_stream *stream = tnt_buf(NULL); update(0, stream); tnt_stream_free(stream); printf("# test: update w/ maximal allowed opearions count\n"); stream = tnt_buf(NULL); for (int i = 0; i < max_update_op_cnt; ++i) tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); update(0, stream); tnt_stream_free(stream); printf("# test: update w/ grater than maximal allowed opearions count\n"); stream = tnt_buf(NULL); for (int i = 0; i < max_update_op_cnt + 1; ++i) tnt_update_arith_i32(stream, 1, TNT_UPDATE_ADD, 1); update(0, stream); tnt_stream_free(stream); footer(); } tarantool-1.5.1.218.g1a69fd6/test/Makefile0000664000000000000000000001736212213333035016403 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/test/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. test/CMakeFiles/test.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/CMakeFiles/test.dir/rule .PHONY : test/CMakeFiles/test.dir/rule # Convenience name for target. test: test/CMakeFiles/test.dir/rule .PHONY : test # fast build rule for target. test/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/CMakeFiles/test.dir/build.make test/CMakeFiles/test.dir/build .PHONY : test/fast # Convenience name for target. test/CMakeFiles/test-force.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 test/CMakeFiles/test-force.dir/rule .PHONY : test/CMakeFiles/test-force.dir/rule # Convenience name for target. test-force: test/CMakeFiles/test-force.dir/rule .PHONY : test-force # fast build rule for target. test-force/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f test/CMakeFiles/test-force.dir/build.make test/CMakeFiles/test-force.dir/build .PHONY : test-force/fast # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... test" @echo "... test-force" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/test/memcached/0000775000000000000000000000000012231715257016652 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/memcached/noreply.result0000664000000000000000000000152412231715257021604 0ustar rootroot# Test that commands can take 'noreply' parameter. flush_all noreply flush_all 0 noreply get noreply:foo END add noreply:foo 0 0 1 noreply 1 get noreply:foo VALUE noreply:foo 0 1 1 END set noreply:foo 0 0 1 noreply 2 get noreply:foo VALUE noreply:foo 0 1 2 END replace noreply:foo 0 0 1 noreply 3 get noreply:foo VALUE noreply:foo 0 1 3 END append noreply:foo 0 0 1 noreply 4 get noreply:foo VALUE noreply:foo 0 2 34 END prepend noreply:foo 0 0 1 noreply 5 get noreply:foo VALUE noreply:foo 0 3 534 END gets noreply:foo cas noreply:foo 0 0 1 noreply 6 get noreply:foo VALUE noreply:foo 0 1 6 END incr noreply:foo 3 noreply get noreply:foo VALUE noreply:foo 0 1 9 END decr noreply:foo 2 noreply get noreply:foo VALUE noreply:foo 0 1 7 END delete noreply:foo noreply get noreply:foo END tarantool-1.5.1.218.g1a69fd6/test/memcached/getset.test0000664000000000000000000000534712231715257021057 0ustar rootroot# encoding: tarantool print """# set foo (and should get it) """ exec memcached "set foo 0 0 6\r\nfooval\r\n" exec memcached "get foo\r\n" print """# add bar (and should get it)""" exec memcached "set bar 0 0 6\r\nbarval\r\n" exec memcached "get bar\r\n" print """# add foo (but shouldn't get new value)""" exec memcached "add foo 0 0 5\r\nfoov2\r\n" exec memcached "get foo\r\n" print """# replace bar (should work)""" exec memcached "replace bar 0 0 6\r\nbarva2\r\n" exec memcached "get bar\r\n" print """# replace notexist (shouldn't work)""" exec memcached "replace notexist 0 0 6\r\nbarva2\r\n" exec memcached "get notexist\r\n" print """# delete foo""" exec memcached "delete foo\r\n" exec memcached "get foo\r\n" print """# delete foo again. not found this time.""" exec memcached "delete foo\r\n" exec memcached "get foo\r\n" print """# add moo""" exec memcached "add moo 0 0 6\r\nmooval\r\n" exec memcached "get moo\r\n" print """# check-and-set (cas) failure case, try to set value with incorrect cas unique val""" exec memcached "cas moo 0 0 6 0\r\nMOOVAL\r\n" exec memcached "get moo\r\n" result = exec memcached silent "gets moo\r\n" unique_id = int(result.split()[4]) print """# now test that we can store moo with the correct unique id""" exec memcached silent "cas moo 0 0 6 %d\r\nMOOVAL\r\n" % unique_id exec memcached "get moo\r\n" exec memcached "set foo 0 0 6\r\nfooval\r\ndelete foo\r\nset foo 0 0 6\r\nfooval\r\ndelete foo\r\n" len = 1024 while len < (1024 * 1028): val = 'B' * len if len > (1024 * 1024): print """# Ensure causing a memory overflow doesn't leave stale data.""" print "# set small data: - should pass" exec memcached "set foo_%d 0 0 3\r\nMOO\r\n" % (len) exec memcached "get foo_%d\r\n" % (len) print "# set big data: - should fail" print "set foo_%d 0 0 %d\r\n\r\n" % (len, len) print exec memcached silent "set foo_%d 0 0 %d\r\n%s\r\n" % (len, len, val) else: print "# set big data: - should pass" print "set foo_%d 0 0 %d\r\n\r\n" % (len, len) print exec memcached silent "set foo_%d 0 0 %d\r\n%s\r\n" % (len, len, val) len += 1024 * 512 print """# # A test for Bug#898198 memcached protocol isn't case-insensitive" #""" exec memcached "SET foo 0 0 6\r\nfooval\r\n" exec memcached "GET foo\r\n" exec memcached "ADD foo 0 0 5\r\nfoov2\r\n" exec memcached "GET foo\r\n" exec memcached "REPLACE bar 0 0 6\r\nbarva2\r\n" exec memcached "GET bar\r\n" exec memcached "DELETE foo\r\n" exec memcached "GET foo\r\n" exec memcached "CAS moo 0 0 6 0\r\nMOOVAL\r\n" exec memcached "GET moo\r\n" exec memcached "GETS moo\r\n" # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/incrdecr.test0000664000000000000000000000214412231715257021345 0ustar rootroot# encoding: tarantool print """# incr/decr big value """ exec memcached "set bug21 0 0 19\r\n9223372036854775807\r\n" exec memcached "incr bug21 1\r\n" exec memcached "incr bug21 1\r\n" exec memcached "decr bug21 1\r\n" print """# underflow protection """ exec memcached "set num 0 0 1\r\n1\r\n" exec memcached "incr num 1\r\n" exec memcached "incr num 8\r\n" exec memcached "decr num 1\r\n" exec memcached "decr num 9\r\n" exec memcached "decr num 5\r\n" print """# 32-bit value """ exec memcached "set num 0 0 10\r\n4294967296\r\n" exec memcached "incr num 1\r\n" print """# overflow value """ exec memcached "set num 0 0 20\r\n18446744073709551615\r\n" exec memcached "incr num 1\r\n" print """# bogus """ exec memcached "decr bogus 1\r\n" exec memcached "decr incr 1\r\n" print """# bit increment """ exec memcached "set bigincr 0 0 1\r\n0\r\n" exec memcached "incr num 18446744073709551610\r\n" print """# incr text value error """ exec memcached "set text 0 0 2\r\nhi\r\n" exec memcached "incr text 1\r\n" # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/incrdecr.result0000664000000000000000000000134612231715257021707 0ustar rootroot# incr/decr big value set bug21 0 0 19 9223372036854775807 STORED incr bug21 1 9223372036854775808 incr bug21 1 9223372036854775809 decr bug21 1 9223372036854775808 # underflow protection set num 0 0 1 1 STORED incr num 1 2 incr num 8 10 decr num 1 9 decr num 9 0 decr num 5 0 # 32-bit value set num 0 0 10 4294967296 STORED incr num 1 4294967297 # overflow value set num 0 0 20 18446744073709551615 STORED incr num 1 0 # bogus decr bogus 1 NOT_FOUND decr incr 1 NOT_FOUND # bit increment set bigincr 0 0 1 0 STORED incr num 18446744073709551610 18446744073709551610 # incr text value error set text 0 0 2 hi STORED incr text 1 CLIENT_ERROR cannot increment or decrement non-numeric value tarantool-1.5.1.218.g1a69fd6/test/memcached/cas.result0000664000000000000000000000263612231715257020667 0ustar rootrootcas bad blah 0 0 0 CLIENT_ERROR bad command line format cas bad 0 blah 0 0 CLIENT_ERROR bad command line format cas bad 0 0 blah 0 CLIENT_ERROR bad command line format cas bad 0 0 0 blah CLIENT_ERROR bad command line format # gets foo (should not exist) gets foo END # set foo set foo 0 0 6 barval STORED # gets foo and verify identifier exists gets foo VALUE foo 0 6 42 barval END # cas fail cas foo 0 0 6 123 barva2 EXISTS # gets foo and verify identifier exists gets foo # cas success cas foo 0 0 6 barva2 STORED # cas failure (reusing the same key) cas foo 0 0 6 barva2 EXISTS # delete foo delete foo DELETED # cas missing cas foo 0 0 6 barva2 NOT_FOUND # set foo1 set foo1 0 0 1 1 STORED # set foo2 set foo2 0 0 1 2 STORED # gets foo1 check gets foo1 VALUE foo1 0 1 44 1 END # gets foo2 check gets foo2 VALUE foo2 0 1 45 2 END # validate foo1 != foo2 pass: foo1_cas != foo2_cas # gets foo from memcached1 - should success # gets foo from memcached2 - should success # send 'cas foo1' from memcached1 # send 'cas foo1' from memcached2 # recv reply 'cas foo1' from memcached1 # recv reply 'cas foo1' from memcached2 race cas: pass # set bug15 set bug15 0 0 1 0 STORED # Check out the first gets. # Increment. incr bug15 1 1 # Validate a changed CAS. # validate bug15_cas != next_bug15_cas pass: bug15_cas != next_bug15_cas tarantool-1.5.1.218.g1a69fd6/test/memcached/multiversioning.test0000664000000000000000000000242212231715257023011 0ustar rootroot# encoding: tarantool from lib.memcached_connection import MemcachedConnection buf_size = 256 * 1024 buf = "0123456789abcdef" * (buf_size / 16) buf_upper = buf.upper() memcached1 = server.memcached memcached2 = MemcachedConnection('localhost', server.memcached_port) print """# Store big in lower case via first memcached client """ print "set big 0 0 %d\r\n" % buf_size print exec memcached1 silent "set big 0 0 %d\r\n%s\r\n" % (buf_size, buf) print """# send command 'get big' to firs memcached client """ send memcached1 "get big\r\n" print """# send command 'delete big' to second client """ exec memcached2 "delete big\r\n" print """# Store big in lower case via first memcached client """ print "set big 0 0 %d\r\n" % buf_size print exec memcached2 silent "set big 0 0 %d\r\n%s\r\n" % (buf_size, buf_upper) print """# recv reply 'get big' from the first memcached client """ reply = recv memcached1 silent reply_buf = reply.split('\r\n')[1] if buf == reply_buf: print "success: buf == reply" else: print "fail: buf != reply" print len(buf), len(reply_buf) # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # check that we print clear memcached stats exec admin "show stat" # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/suite.ini0000664000000000000000000000026712231715257020511 0ustar rootroot[default] description = tarantool/box memcached tests config = cfg/master.cfg disabled = cas.test # put disabled in valgrind test here valgrind_disabled = expirations.test, repl.test tarantool-1.5.1.218.g1a69fd6/test/memcached/bogus-commands.result0000664000000000000000000000010112231715257023020 0ustar rootrootboguscommand slkdsldkfjsd CLIENT_ERROR bad command line format tarantool-1.5.1.218.g1a69fd6/test/memcached/noreply.test0000664000000000000000000000254212231715257021246 0ustar rootroot# encoding: tarantool import sys print """# Test that commands can take 'noreply' parameter. """ exec memcached "flush_all noreply\r\n" exec memcached "flush_all 0 noreply\r\n" exec memcached "get noreply:foo\r\n" exec memcached "add noreply:foo 0 0 1 noreply\r\n1\r\n" exec memcached "get noreply:foo\r\n" exec memcached "set noreply:foo 0 0 1 noreply\r\n2\r\n" exec memcached "get noreply:foo\r\n" exec memcached "replace noreply:foo 0 0 1 noreply\r\n3\r\n" exec memcached "get noreply:foo\r\n" exec memcached "append noreply:foo 0 0 1 noreply\r\n4\r\n" exec memcached "get noreply:foo\r\n" exec memcached "prepend noreply:foo 0 0 1 noreply\r\n5\r\n" exec memcached "get noreply:foo\r\n" sys.stdout.write("gets noreply:foo\r\n") result = exec memcached silent "gets noreply:foo\r\n" unique_id = int(result.split()[4]) sys.stdout.write("cas noreply:foo 0 0 1 noreply\r\n6\r\n") exec memcached silent "cas noreply:foo 0 0 1 %d noreply\r\n6\r\n" % unique_id exec memcached "get noreply:foo\r\n" exec memcached "incr noreply:foo 3 noreply\r\n" exec memcached "get noreply:foo\r\n" exec memcached "decr noreply:foo 2 noreply\r\n" exec memcached "get noreply:foo\r\n" exec memcached "delete noreply:foo noreply\r\n" exec memcached "get noreply:foo\r\n" # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/flags.test0000664000000000000000000000101112231715257020640 0ustar rootroot# encoding: tarantool flags_list = [ 0x0, 0x7b, 0xffff ] for flags in flags_list: exec memcached "set foo %d 0 6\r\nfooval\r\n" % flags result = exec memcached "gets foo\r\n" ret_flags = int(result.split()[2]) if flags == ret_flags: print "success: flags (0x%x) == ret_flags (0x%x)" % (flags, ret_flags) else: print "fail: flags (0x%x) != ret_flags (0x%x)" % (flags, ret_flags) # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/bogus-commands.test0000664000000000000000000000013212231715257022465 0ustar rootroot# encoding: tarantool exec memcached "boguscommand slkdsldkfjsd\r\n" # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/getset.result0000664000000000000000000000362412231715257021412 0ustar rootroot# set foo (and should get it) set foo 0 0 6 fooval STORED get foo VALUE foo 0 6 fooval END # add bar (and should get it) set bar 0 0 6 barval STORED get bar VALUE bar 0 6 barval END # add foo (but shouldn't get new value) add foo 0 0 5 foov2 NOT_STORED get foo VALUE foo 0 6 fooval END # replace bar (should work) replace bar 0 0 6 barva2 STORED get bar VALUE bar 0 6 barva2 END # replace notexist (shouldn't work) replace notexist 0 0 6 barva2 NOT_STORED get notexist END # delete foo delete foo DELETED get foo END # delete foo again. not found this time. delete foo NOT_FOUND get foo END # add moo add moo 0 0 6 mooval STORED get moo VALUE moo 0 6 mooval END # check-and-set (cas) failure case, try to set value with incorrect cas unique val cas moo 0 0 6 0 MOOVAL EXISTS get moo VALUE moo 0 6 mooval END # now test that we can store moo with the correct unique id get moo VALUE moo 0 6 MOOVAL END set foo 0 0 6 fooval delete foo set foo 0 0 6 fooval delete foo STORED DELETED STORED DELETED # set big data: - should pass set foo_1024 0 0 1024 STORED # set big data: - should pass set foo_525312 0 0 525312 STORED # Ensure causing a memory overflow doesn't leave stale data. # set small data: - should pass set foo_1049600 0 0 3 MOO STORED get foo_1049600 VALUE foo_1049600 0 3 MOO END # set big data: - should fail set foo_1049600 0 0 1049600 SERVER_ERROR object too large for cache # # A test for Bug#898198 memcached protocol isn't case-insensitive" # SET foo 0 0 6 fooval STORED GET foo VALUE foo 0 6 fooval END ADD foo 0 0 5 foov2 NOT_STORED GET foo VALUE foo 0 6 fooval END REPLACE bar 0 0 6 barva2 STORED GET bar VALUE bar 0 6 barva2 END DELETE foo DELETED GET foo END CAS moo 0 0 6 0 MOOVAL EXISTS GET moo VALUE moo 0 6 MOOVAL END GETS moo VALUE moo 0 6 46 MOOVAL END tarantool-1.5.1.218.g1a69fd6/test/memcached/off.result0000664000000000000000000000314012231715257020662 0ustar rootroot # Bug #855616: # memcached_space must not be configured # (https://bugs.launchpad.net/bugs/855616) show configuration --- configuration: username: (null) local_hot_standby: "false" bind_ipaddr: "INADDR_ANY" coredump: "false" admin_port: "33015" replication_port: "0" log_level: "4" slab_alloc_arena: "0.1" slab_alloc_minimal: "64" slab_alloc_factor: "2" work_dir: (null) snap_dir: "." wal_dir: "." script_dir: "." pid_file: "box.pid" logger: "cat - >> tarantool.log" logger_nonblock: "true" io_collect_interval: "0" backlog: "1024" readahead: "16320" snap_io_rate_limit: "0" rows_per_wal: "50" wal_writer_inbox_size: "16384" wal_mode: "fsync_delay" wal_fsync_delay: "0" wal_dir_rescan_delay: "0.1" panic_on_snap_error: "true" panic_on_wal_error: "false" primary_port: "33013" secondary_port: "33014" too_long_threshold: "0.5" custom_proc_title: (null) memcached_port: "0" memcached_space: "0" memcached_expire: "false" memcached_expire_per_loop: "1024" memcached_expire_full_sweep: "3600" replication_source: (null) space[0].enabled: "true" space[0].cardinality: "-1" space[0].estimated_rows: "0" space[0].index[0].type: "HASH" space[0].index[0].unique: "true" space[0].index[0].key_field[0].fieldno: "0" space[0].index[0].key_field[0].type: "NUM" space[0].index[1].type: "TREE" space[0].index[1].unique: "false" space[0].index[1].key_field[0].fieldno: "1" space[0].index[1].key_field[0].type: "STR" ... tarantool_box -c tarantool_memcached_bad.cfg tarantool_box: can't load config: - Space 0 is already used as memcached_space. tarantool-1.5.1.218.g1a69fd6/test/memcached/off.test0000664000000000000000000000154612231715257020333 0ustar rootroot# encoding: tarantool # import os import sys # mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356 sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "") print """ # Bug #855616: # memcached_space must not be configured # (https://bugs.launchpad.net/bugs/855616) """ # stop current server server.stop() # start server with memcached off server.deploy("memcached/cfg/tarantool_memcached_off.cfg") # check values exec admin "show configuration" # stop current server server.stop() # start server with memcached space conflict sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool") server.test_option("-c " + os.path.join(os.getcwd(), "memcached/cfg/tarantool_memcached_bad.cfg")) sys.stdout.pop_filter() # restore default server server.stop() server.deploy(self.suite_ini["config"]) sys.stdout.pop_filter() # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/flags.result0000664000000000000000000000054412231715257021211 0ustar rootrootset foo 0 0 6 fooval STORED gets foo VALUE foo 0 6 42 fooval END success: flags (0x0) == ret_flags (0x0) set foo 123 0 6 fooval STORED gets foo VALUE foo 123 6 43 fooval END success: flags (0x7b) == ret_flags (0x7b) set foo 65535 0 6 fooval STORED gets foo VALUE foo 65535 6 44 fooval END success: flags (0xffff) == ret_flags (0xffff) tarantool-1.5.1.218.g1a69fd6/test/memcached/expirations.result0000664000000000000000000000115612231715257022462 0ustar rootroot# expire: after 1 second # set foo set foo 0 1 6 fooval STORED # foo shoud be exists get foo VALUE foo 0 6 fooval END # foo shoud expired get foo END # expire: time - 1 second # set foo # foo shoud expired get foo END # expire: time + 1 second # set foo # foo shoud be exists get foo VALUE foo 0 6 fooval END # foo shoud expired get foo END # expire: time - 20 second # set boo # foo shoud expired get boo END # expire: after 2 second # add add add add 0 1 6 addval STORED # readd add - shoud be fail add add 0 1 7 addval1 NOT_STORED # readd add - shoud be success add add 0 1 7 addval2 STORED tarantool-1.5.1.218.g1a69fd6/test/memcached/cas.test0000664000000000000000000000714212231715257020325 0ustar rootroot# encoding: tarantool import sys from lib.memcached_connection import MemcachedConnection exec memcached "cas bad blah 0 0 0\r\n" exec memcached "cas bad 0 blah 0 0\r\n" exec memcached "cas bad 0 0 blah 0\r\n" exec memcached "cas bad 0 0 0 blah\r\n" print """# gets foo (should not exist) """ exec memcached "gets foo\r\n" print """# set foo """ exec memcached "set foo 0 0 6\r\nbarval\r\n" print """# gets foo and verify identifier exists """ exec memcached "gets foo\r\n" print """# cas fail """ exec memcached "cas foo 0 0 6 123\r\nbarva2\r\n" print """# gets foo and verify identifier exists """ sys.stdout.write("gets foo\r\n") result = exec memcached silent "gets foo\r\n" unique_id = int(result.split()[4]) print """# cas success """ sys.stdout.write("cas foo 0 0 6 \r\nbarva2\r\n") result = exec memcached silent "cas foo 0 0 6 %d\r\nbarva2\r\n" % unique_id sys.stdout.write(result) print """# cas failure (reusing the same key) """ sys.stdout.write("cas foo 0 0 6 \r\nbarva2\r\n") result = exec memcached silent "cas foo 0 0 6 %d\r\nbarva2\r\n" % unique_id sys.stdout.write(result) print """# delete foo """ exec memcached "delete foo\r\n" print """# cas missing """ sys.stdout.write("cas foo 0 0 6 \r\nbarva2\r\n") result = exec memcached silent "cas foo 0 0 6 %d\r\nbarva2\r\n" % unique_id sys.stdout.write(result) print """# set foo1 """ exec memcached "set foo1 0 0 1\r\n1\r\n" print """# set foo2 """ exec memcached "set foo2 0 0 1\r\n2\r\n" print """# gets foo1 check """ result = exec memcached "gets foo1\r\n" foo1_cas = int(result.split()[4]) print """# gets foo2 check """ result = exec memcached "gets foo2\r\n" foo2_cas = int(result.split()[4]) print """# validate foo1 != foo2 """ if foo1_cas != foo2_cas: print "pass: foo1_cas != foo2_cas" else: print "fail: foo1_cas == foo2_cas" memcached1 = server.memcached memcached2 = MemcachedConnection('localhost', server.memcached_port) print """# gets foo from memcached1 - should success """ result = exec memcached1 silent "gets foo1\r\n" mem1_cas = int(result.split()[4]) print """# gets foo from memcached2 - should success """ result = exec memcached2 silent "gets foo1\r\n" mem2_cas = int(result.split()[4]) print """# send 'cas foo1' from memcached1 """ send memcached1 silent "cas foo1 0 0 6 %d\r\nbarva2\r\n" % mem1_cas print """# send 'cas foo1' from memcached2 """ send memcached2 silent "cas foo1 0 0 4 %d\r\npear\r\n" % mem2_cas print """# recv reply 'cas foo1' from memcached1 """ result = recv memcached1 silent mem1_cas_result = result.split()[0] print """# recv reply 'cas foo1' from memcached2 """ result = recv memcached2 silent mem2_cas_result = result.split()[0] if mem1_cas_result == "STORED" and mem2_cas_result == "EXISTS": print "race cas: pass" elif mem1_cas_result == "EXISTS" and mem2_cas_result == "STORED": print "race cas: pass" else: print "race cas: fail" print "cas 1 = %s" % mem1_cas_result print "cas 2 = %s" % mem2_cas_result print """# set bug15 """ exec memcached "set bug15 0 0 1\r\n0\r\n" print """# Check out the first gets. """ result = exec memcached silent "gets bug15\r\n" bug15_cas = int(result.split()[4]) print """# Increment. """ exec memcached "incr bug15 1\r\n" print """# Validate a changed CAS. """ result = exec memcached silent "gets bug15\r\n" next_bug15_cas = int(result.split()[4]) print """# validate bug15_cas != next_bug15_cas """ if bug15_cas != next_bug15_cas: print "pass: bug15_cas != next_bug15_cas" else: print "fail: bug15_cas == next_bug15_cas" # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/expirations.test0000664000000000000000000000346212231715257022125 0ustar rootroot# encoding: tarantool import time import yaml ################################### def wait_for_next_lsn(lsn, serv): serv_admin = serv.admin while True: if get_lsn(serv) != lsn: return lsn time.sleep(0.01) def get_lsn(serv): serv_admin = serv.admin resp = exec serv_admin silent "lua box.info.lsn" return yaml.load(resp)[0] def wait(serv = server): lsn = get_lsn(serv) return wait_for_next_lsn(lsn, serv) ################################### print """# expire: after 1 second""" print """# set foo""" exec memcached "set foo 0 1 6\r\nfooval\r\n" print """# foo shoud be exists""" exec memcached "get foo\r\n" wait() print """# foo shoud expired""" exec memcached "get foo\r\n" print """# expire: time - 1 second""" expire = time.time() - 1 print """# set foo""" exec memcached silent "set foo 0 %d 6\r\nfooval\r\n" % expire print """# foo shoud expired""" exec memcached "get foo\r\n" print """# expire: time + 1 second""" expire = time.time() + 1 print """# set foo""" exec memcached silent "set foo 0 %d 6\r\nfooval\r\n" % expire print """# foo shoud be exists""" exec memcached "get foo\r\n" wait() print """# foo shoud expired""" exec memcached "get foo\r\n" print """# expire: time - 20 second""" expire = time.time() - 20 print """# set boo""" exec memcached silent "set boo 0 %d 6\r\nbooval\r\n" % expire print """# foo shoud expired""" exec memcached "get boo\r\n" print """# expire: after 2 second""" print """# add add""" exec memcached "add add 0 1 6\r\naddval\r\n" print """# readd add - shoud be fail""" exec memcached "add add 0 1 7\r\naddval1\r\n" wait() print """# readd add - shoud be success""" exec memcached "add add 0 1 7\r\naddval2\r\n" # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/lua.test0000664000000000000000000000052212231715257020333 0ustar rootroot# encoding: tarantool exec admin "lua box.space[box.cfg.memcached_space].cardinality" exec admin "lua box.space[box.cfg.memcached_space].estimated_rows" exec admin "lua box.space[box.cfg.memcached_space].n" exec admin "lua box.space[box.cfg.memcached_space].index[0].idx" exec admin "lua box.space[box.cfg.memcached_space].index[0].type" tarantool-1.5.1.218.g1a69fd6/test/memcached/lua.result0000664000000000000000000000052012231715257020670 0ustar rootrootlua box.space[box.cfg.memcached_space].cardinality --- - 4 ... lua box.space[box.cfg.memcached_space].estimated_rows --- - 0 ... lua box.space[box.cfg.memcached_space].n --- - 2 ... lua box.space[box.cfg.memcached_space].index[0].idx --- - index 0 in space 2 ... lua box.space[box.cfg.memcached_space].index[0].type --- - HASH ... tarantool-1.5.1.218.g1a69fd6/test/memcached/flush-all.test0000664000000000000000000000231712231715257021445 0ustar rootroot# encoding: tarantool import time import yaml ################################### def get_memcached_len(serv): serv_admin = serv.admin resp = exec serv_admin silent "lua box.space[box.cfg.memcached_space]:len()" return yaml.load(resp)[0] def wait_for_empty_space(serv = server): serv_admin = serv.admin while True: if get_memcached_len(serv) == 0: return time.sleep(0.01) ################################### print """# Test flush_all with zero delay. """ exec memcached "set foo 0 0 6\r\nfooval\r\n" exec memcached "get foo\r\n" exec memcached "flush_all\r\n" exec memcached "get foo\r\n" print """# check that flush_all doesn't blow away items that immediately get set """ exec memcached "set foo 0 0 3\r\nnew\r\n" exec memcached "get foo\r\n" print """# and the other form, specifying a flush_all time... """ expire = time.time() + 1 print "flush_all time + 1" print exec memcached silent "flush_all %d\r\n" % expire exec memcached "get foo\r\n" exec memcached "set foo 0 0 3\r\n123\r\n" exec memcached "get foo\r\n" wait_for_empty_space() exec memcached "get foo\r\n" # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/multiversioning.result0000664000000000000000000000200312231715257023343 0ustar rootroot# Store big in lower case via first memcached client set big 0 0 262144 STORED # send command 'get big' to firs memcached client get big # send command 'delete big' to second client delete big DELETED # Store big in lower case via first memcached client set big 0 0 262144 STORED # recv reply 'get big' from the first memcached client success: buf == reply show stat --- statistics: REPLACE: { rps: 0 , total: 0 } SELECT: { rps: 0 , total: 0 } UPDATE: { rps: 0 , total: 0 } DELETE_1_3: { rps: 0 , total: 0 } DELETE: { rps: 0 , total: 0 } CALL: { rps: 0 , total: 0 } MEMC_GET: { rps: 0 , total: 0 } MEMC_GET_MISS: { rps: 0 , total: 0 } MEMC_GET_HIT: { rps: 0 , total: 0 } MEMC_EXPIRED_KEYS: { rps: 0 , total: 0 } ... tarantool-1.5.1.218.g1a69fd6/test/memcached/cfg/0000775000000000000000000000000012231715257017411 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/memcached/cfg/tarantool_memcached_off.cfg0000664000000000000000000000225012231715257024714 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). # slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # pid_file = "box.pid" # # Pipe the logs into the following process. # logger="cat - >> tarantool.log" # # Read only and read-write port. primary_port = 33013 # Read-only port. secondary_port = 33014 # # The port for administrative commands. # admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50 # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" space[0].index[1].type = "TREE" space[0].index[1].unique = 0 space[0].index[1].key_field[0].fieldno = 1 space[0].index[1].key_field[0].type = "STR" #memcached_port = 33333 memcached_space = 0 tarantool-1.5.1.218.g1a69fd6/test/memcached/cfg/master.cfg0000664000000000000000000000073412231715257021371 0ustar rootrootslab_alloc_arena = 0.1 pid_file = "box.pid" logger="cat - >> tarantool.log" bind_ipaddr="INADDR_ANY" custom_proc_title="master" primary_port = 33013 secondary_port = 33014 admin_port = 33015 memcached_port = 33016 replication_port = 33017 rows_per_wal = 200 space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" memcached_space = 2 memcached_expire=true tarantool-1.5.1.218.g1a69fd6/test/memcached/cfg/tarantool_memcached_bad.cfg0000664000000000000000000000224712231715257024676 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). # slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # pid_file = "box.pid" # # Pipe the logs into the following process. # logger="cat - >> tarantool.log" # # Read only and read-write port. primary_port = 33013 # Read-only port. secondary_port = 33014 # # The port for administrative commands. # admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50 # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" space[0].index[1].type = "TREE" space[0].index[1].unique = 0 space[0].index[1].key_field[0].fieldno = 1 space[0].index[1].key_field[0].type = "STR" memcached_port = 33333 memcached_space = 0 tarantool-1.5.1.218.g1a69fd6/test/memcached/binary-get.test0000664000000000000000000000067112231715257021620 0ustar rootroot# encoding: tarantool blobs_list = [ "mooo\0", "mumble\0\0\0\0\r\rblarg", "\0", "\r" ] for i in range(len(blobs_list)): key = "foo_%d" % i blob = blobs_list[i] blob_len = len(blob) print "len is %d" % blob_len exec memcached "set %s 0 0 %d\r\n%s\r\n" % (key, blob_len, blob) exec memcached "get %s\r\n" % key # resore default suite config server.stop() server.deploy(self.suite_ini["config"]) # vim: syntax=python tarantool-1.5.1.218.g1a69fd6/test/memcached/flush-all.result0000664000000000000000000000070712231715257022005 0ustar rootroot# Test flush_all with zero delay. set foo 0 0 6 fooval STORED get foo VALUE foo 0 6 fooval END flush_all OK get foo END # check that flush_all doesn't blow away items that immediately get set set foo 0 0 3 new STORED get foo VALUE foo 0 3 new END # and the other form, specifying a flush_all time... flush_all time + 1 OK get foo VALUE foo 0 3 new END set foo 0 0 3 123 STORED get foo VALUE foo 0 3 123 END get foo END tarantool-1.5.1.218.g1a69fd6/test/memcached/binary-get.result0000664000000000000000000000051712231715257022156 0ustar rootrootlen is 5 set foo_0 0 0 5 mooo STORED get foo_0 VALUE foo_0 0 5 mooo END len is 17 set foo_1 0 0 17 mumble blarg STORED get foo_1 VALUE foo_1 0 17 mumble blarg END len is 1 set foo_2 0 0 1 STORED get foo_2 VALUE foo_2 0 1 END len is 1 set foo_3 0 0 1 STORED get foo_3 VALUE foo_3 0 1 END tarantool-1.5.1.218.g1a69fd6/test/.gitattributes0000664000000000000000000000003212202131537017621 0ustar rootroot*.result diff merge=text tarantool-1.5.1.218.g1a69fd6/test/share/0000775000000000000000000000000012242653271016045 5ustar rootroottarantool-1.5.1.218.g1a69fd6/test/share/tarantool_tgz.cfg0000664000000000000000000000203512231715257021416 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. pid_file = "box.pid" # # Pipe all the logs to the console #logger="" # # Read only and read-write port. primary_port = 33013 # # Read-only port. secondary_port = 33014 # # The port for administrative commands. admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50000 # # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" # # working directory (daemon will chdir(2) to it) work_dir = "var/lib/tarantool" tarantool-1.5.1.218.g1a69fd6/test/share/tarantool_rpm.cfg0000664000000000000000000000170512231715257021413 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. # (Should not be changed in rpm deployment) pid_file = "box.pid" # # Read only and read-write port. primary_port = 33013 # # Read-only port. secondary_port = 33014 # # The port for administrative commands. admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50000 # # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/share/tarantool.sup0000664000000000000000000000655312202131537020602 0ustar rootroot ## ## obj-c leaks ## { Memcheck:Leak fun:malloc fun:objc_malloc ... } { Memcheck:Leak fun:calloc fun:objc_calloc ... } { Memcheck:Leak fun:realloc fun:objc_realloc ... } { Memcheck:Leak ... fun:objc_msg_lookup ... } { Memcheck:Leak ... fun:.objc_load_function ... } { Memcheck:Leak fun:malloc fun:strdup fun:objc_register_selector_copy ... } ## ## libev internals ## { Memcheck:Param write(buf) fun:__write_nocancel fun:evpipe_write fun:ev_feed_signal fun:ev_sighandler ... } { Memcheck:Leak ... fun:ev_default_destroy fun:tarantool_free ... } ## ## backtrace ## ## backtrace implementation is low-level and ## produces alot of warnings. { Memcheck:Cond fun:backtrace ... } { Memcheck:Value8 fun:backtrace ... } { Memcheck:Cond fun:vfprintf fun:vsnprintf fun:snprintf fun:backtrace ... } { Memcheck:Value8 fun:_itoa_word fun:vfprintf fun:vsnprintf fun:snprintf fun:backtrace ... } { Memcheck:Cond fun:_itoa_word fun:vfprintf fun:vsnprintf fun:snprintf fun:backtrace ... } ## ## box allocations ## ## we can't directly free tuple allocations. { Memcheck:Leak fun:salloc fun:tuple_alloc fun:_i_Replace__execute__ fun:box_process_rw ... } { Memcheck:Leak fun:salloc fun:tuple_alloc fun:_i_Update__execute__ fun:box_process_rw ... } ## ## tarantool/lua suppressions ## #----------------------------------------------------------------------------# # tarantool_lua function #----------------------------------------------------------------------------# # # lua_* function suppressions # { Memcheck:Cond ... fun:lua_* fun:tarantool_lua ... } { Memcheck:Cond ... fun:lua_* fun:tarantool_lua_dostring fun:tarantool_lua ... } { Memcheck:Cond ... fun:lua_* fun:tarantool_lua_tostring fun:tarantool_lua_printstack_yaml fun:tarantool_lua ... } # # luaL_* function suppressions # { Memcheck:Cond ... fun:luaL_* fun:tarantool_lua ... } { Memcheck:Cond ... fun:luaL_* fun:tarantool_lua_dostring fun:tarantool_lua ... } { Memcheck:Cond ... fun:luaL_* fun:tarantool_lua_tostring fun:tarantool_lua_printstack_yaml fun:tarantool_lua ... } # third_party/luajit/src/lj.supp -- add as recommended in # http://lua-users.org/lists/lua-l/2011-08/msg00736.html # Valgrind suppression file for LuaJIT 2.x. { Optimized string compare Memcheck:Addr4 fun:lj_str_cmp } { Optimized string compare Memcheck:Addr4 fun:lj_str_new } { Optimized string compare Memcheck:Cond fun:lj_str_new } tarantool-1.5.1.218.g1a69fd6/test/share/tarantool_dmg.cfg0000664000000000000000000000176512242653271021371 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. pid_file = "/var/run/box.pid" # # Read only and read-write port. primary_port = 33013 # # Read-only port. secondary_port = 33014 # # The port for administrative commands. admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50000 # # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" # # working directory (daemon will chdir(2) to it) work_dir = "var/lib/tarantool" tarantool-1.5.1.218.g1a69fd6/test/share/tarantool.cfg0000664000000000000000000000175012231715257020535 0ustar rootroot# # Limit of memory used to store tuples to 100MB # (0.1 GB) # This effectively limits the memory, used by # Tarantool. However, index and connection memory # is stored outside the slab allocator, hence # the effective memory usage can be higher (sometimes # twice as high). slab_alloc_arena = 0.1 # # Store the pid in this file. Relative to # startup dir. pid_file = "box.pid" # # Pipe the logs into the following process. logger="cat - >> tarantool.log" # # Read only and read-write port. primary_port = 33013 # # Read-only port. secondary_port = 33014 # # The port for administrative commands. admin_port = 33015 # # Each write ahead log contains this many rows. # When the limit is reached, Tarantool closes # the WAL and starts a new one. rows_per_wal = 50000 # # Define a simple space with 1 HASH-based # primary key. space[0].enabled = 1 space[0].index[0].type = "HASH" space[0].index[0].unique = 1 space[0].index[0].key_field[0].fieldno = 0 space[0].index[0].key_field[0].type = "NUM" tarantool-1.5.1.218.g1a69fd6/test/run0000775000000000000000000000042612202131537015467 0ustar rootroot#!/bin/sh /usr/bin/env python <<__EOB__ import sys if sys.hexversion < 0x02060000 or sys.hexversion >= 0x03000000: sys.stderr.write("ERROR: test harness must use python >= 2.6 but not 3.x\n") sys.exit(1) else: sys.exit(0) __EOB__ [ $? -eq 0 ] && ./test-run.py $* tarantool-1.5.1.218.g1a69fd6/CMakeLists.txt0000664000000000000000000002677412242653271016544 0ustar rootrootcmake_minimum_required(VERSION 2.6) project(tarantool C CXX) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH}) include(CheckLibraryExists) include(CheckIncludeFile) include(CheckCCompilerFlag) include(CheckSymbolExists) include(CheckCSourceRuns) include(CheckCXXSourceRuns) include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) include(TestBigEndian) include(CheckFunctionExists) include(FindOptionalPackage) find_program(ECHO echo) find_program(XSLTPROC xsltproc) find_program(XMLLINT xmllint) find_program(JING jing) find_program(LYNX lynx) find_program(CAT cat) find_program(GIT git) find_program(RAGEL ragel) find_program(CONFETTI confetti) find_program(LD ld) find_program(POD2MAN pod2man) # # This instructs the rest of the build system what product # and what modules to produce. # set (TARANTOOL_PRODUCT "box") set (TARANTOOL_MODULES "box") set (TARANTOOL_CLIENTS "tarancheck" "tarantar") # Define PACKAGE macro in tarantool/config.h set (PACKAGE "Tarantool") # # Set default build type to Debug. This is to ease a developer's # life. Release binaries are built by BuildBot automatically anyway. # if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE) endif() if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR lib) endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/tarantool/plugins") include(cmake/utils.cmake) # the order is significant: we need to know os and compiler to configure libs include(cmake/arch.cmake) include(cmake/os.cmake) include(cmake/compiler.cmake) include(cmake/simd.cmake) include(cmake/profile.cmake) check_symbol_exists(MAP_ANON sys/mman.h HAVE_MAP_ANON) check_symbol_exists(MAP_ANONYMOUS sys/mman.h HAVE_MAP_ANONYMOUS) check_include_file(sys/time.h HAVE_SYS_TIME_H) check_include_file(unwind.h HAVE_UNWIND_H) check_include_file(cpuid.h HAVE_CPUID_H) check_include_file(sys/prctl.h HAVE_PRCTL_H) check_symbol_exists(O_DSYNC fcntl.h HAVE_O_DSYNC) check_symbol_exists(fdatasync unistd.h HAVE_FDATASYNC) check_function_exists(memmem HAVE_MEMMEM) check_function_exists(memrchr HAVE_MEMRCHR) # # Some versions of GNU libc define non-portable __libc_stack_end # which we use to determine the end (or beginning, actually) of # stack. Find whether or not it's present. check_library_exists("" __libc_stack_end "" HAVE_LIBC_STACK_END) # # Enable 'make tags' target. # add_custom_target(tags COMMAND ctags -R -f tags WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) # # Define PACKAGE_VERSION -- a string constant with tarantool version. # set (CPACK_PACKAGE_VERSION_MAJOR "1") set (CPACK_PACKAGE_VERSION_MINOR "5") set (CPACK_PACKAGE_VERSION_PATCH "1") set (PACKAGE_VERSION "") # Get git version only if source directory has .git repository, this # avoids git to search .git repository in parent # directories. # if (EXISTS "${CMAKE_SOURCE_DIR}/.git") execute_process (COMMAND ${GIT} describe HEAD OUTPUT_VARIABLE PACKAGE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) if (PACKAGE_VERSION STREQUAL "") message (FATAL_ERROR "Failed to retrive git version.") endif() endif() set (VERSION_FILE "${CMAKE_SOURCE_DIR}/VERSION") # Update version file or use it when there is no git # repository within sources (source tarballs). # if (PACKAGE_VERSION STREQUAL "") if (NOT EXISTS "${VERSION_FILE}") message (FATAL_ERROR "Version file ${VERSION_FILE} does not exists.") endif() message (WARNING "Using version from version file ${VERSION_FILE}") execute_process (COMMAND ${CAT} ${VERSION_FILE} OUTPUT_VARIABLE PACKAGE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) if (PACKAGE_VERSION STREQUAL "") message (FATAL_ERROR "Unable to retrive version from git or ${VERSION_FILE} file.") endif() else() file(WRITE ${VERSION_FILE} "${PACKAGE_VERSION}\n") endif() # # Specify where to look for include files. # include_directories("${PROJECT_SOURCE_DIR}") include_directories("${PROJECT_SOURCE_DIR}/include") include_directories("${PROJECT_BINARY_DIR}/include") include_directories("${PROJECT_SOURCE_DIR}/third_party") # # Specify prefixes # if (NOT DEFINED CMAKE_SYSCONF_DIR) set (CMAKE_SYSCONF_DIR "etc") endif() if (NOT DEFINED CMAKE_LOCALSTATE_DIR) set (CMAKE_LOCALSTATE_DIR "var") endif() if (NOT DEFINED CMAKE_MAN_DIR) set (CMAKE_MAN_DIR "man") endif() # # Specify system-specific Lua prefixes # if (NOT DEFINED LUA_SYSPATH) set (LUA_SYSPATH "") endif() if (NOT DEFINED LUA_SYSCPATH) set (LUA_SYSCPATH "") endif() # # Specify Tarantool modules Lua prefixes # if (NOT DEFINED LUA_LIBPATH) set (LUA_LIBPATH "") endif() if (NOT DEFINED LUA_LIBCPATH) set (LUA_LIBCPATH "") endif() # # Now handle all configuration options. # option(ENABLE_DOC "Enable building of documentation" OFF) option(ENABLE_CLIENT "Enable building of console client" OFF) if (ENABLE_CLIENT) set (TARANTOOL_CLIENTS ${TARANTOOL_CLIENTS} "tarantool") endif() option(ENABLE_TRACE "Enable debug trace of tarantool_box execution to a file specified in TARANTOOL_TRACE environment variable" ON) option(ENABLE_BACKTRACE "Enable output of fiber backtrace information in 'show fiber' administrative command. Only works on x86 architectures, if compiled with gcc. If GNU binutils and binutils-dev libraries are installed, backtrace is output with resolved function (symbol) names. Otherwise only frame addresses are printed." ${CMAKE_COMPILER_IS_GNUCC}) set (HAVE_BFD False) if (ENABLE_BACKTRACE) if (NOT ${CMAKE_COMPILER_IS_GNUCC} OR NOT (${CMAKE_SYSTEM_PROCESSOR} MATCHES "86|amd64")) # We only know this option to work with gcc # on x86 architecture. message (FATAL_ERROR "ENABLE_BACKTRACE option is set but the system is not x86 based (${CMAKE_SYSTEM_PROCESSOR}) or the compiler is not GNU GCC (${CMAKE_C_COMPILER}).") endif() # Use GNU bfd if present. check_library_exists (bfd bfd_init "" HAVE_BFD_LIB) set(CMAKE_REQUIRED_DEFINITIONS -DPACKAGE=${PACKAGE} -DPACKAGE_VERSION=${PACKAGE_VERSION}) check_include_file(bfd.h HAVE_BFD_H) set(CMAKE_REQUIRED_DEFINITIONS) if (HAVE_BFD_LIB AND HAVE_BFD_H) set (HAVE_BFD True) endif() endif() option(ENABLE_STATIC "Perform static linking whenever possible." OFF) if (ENABLE_STATIC) add_compile_flags("C;CXX" "-static") endif() ## ## Third-Party libraries ## # # Since we *optionally* build bundled libs, a direct build # dependency between tarantool_box and libluajit/libobjc won't # work: add an empty custom target for this dependency instead. # If a bundled objc or luajit is built, it is added to the # dependency list of build_bundled_libs target. # add_custom_target(build_bundled_libs) # # LibLUAJIT # include(luajit) # # LibEV # # # Currently our code uses libev with #define EV_MULTIPLICITY 0. # This option means that libev has a global variable with # struct ev_loop data. # Such design is not compatible with the dynamic version of libev # provided by distros. set(ENABLE_BUNDLED_LIBEV ON) include(BuildLibEV) libev_build() add_dependencies(build_bundled_libs ev) # # LibEIO # option(ENABLE_BUNDLED_LIBEIO "Enable building of the bundled libeio" ON) if (ENABLE_BUNDLED_LIBEIO) include(BuildLibEIO) libeio_build() add_dependencies(build_bundled_libs eio) else() set(LIBEIO_FIND_REQUIRED ON) find_package(LibEIO) endif() # # LibCORO # # # Tarantool uses 'coro' (coroutines) library to implement # cooperative multi-tasking. Since coro.h is included # universally, define the underlying implementation switch # in the top level CMakeLists.txt, to ensure a consistent # header file layout across the entire project. # set(ENABLE_BUNDLED_LIBCORO ON) include(BuildLibCORO) libcoro_build() add_dependencies(build_bundled_libs coro) if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "86" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "amd64") add_definitions("-DCORO_ASM") else() add_definitions("-DCORO_SJLJ") endif() # # LibGOPT # include(BuildLibGOPT) libgopt_build() add_dependencies(build_bundled_libs gopt) # # LibCJSON # include(BuildLibCJSON) libcjson_build() add_dependencies(build_bundled_libs cjson) # # Third-Party misc # include(BuildMisc) libmisc_build() add_dependencies(build_bundled_libs misc) option(ENABLE_RPM "Enable install of a RPM specific files" OFF) # cpack config. called package.cmake to avoid # conflicts with the global CPack.cmake (On MacOS X # file names are case-insensitive) # include (cmake/package.cmake) # # RPM build environment # CPACK is only used for .tar.gz package generation. # To build an RPM we need a source package, # so rpm.cmake depends on package.cmake. # include (cmake/rpm.cmake) add_subdirectory(cfg) add_subdirectory(connector) add_subdirectory(src) add_subdirectory(extra) add_subdirectory(client) add_subdirectory(test) add_subdirectory(doc) install (FILES README.md LICENSE doc/box-protocol.txt DESTINATION share/doc/tarantool) # # tarantool info summary (used in server version output) # set(TARANTOOL_OPTIONS "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") set(TARANTOOL_OPTIONS "${TARANTOOL_OPTIONS} -DENABLE_STATIC=${ENABLE_STATIC}") set(TARANTOOL_OPTIONS "${TARANTOOL_OPTIONS} -DENABLE_TRACE=${ENABLE_TRACE} -DENABLE_BACKTRACE=${ENABLE_BACKTRACE}") set(TARANTOOL_OPTIONS "${TARANTOOL_OPTIONS} -DENABLE_CLIENT=${ENABLE_CLIENT}") set(TARANTOOL_BUILD "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_BUILD_TYPE}") set(TARANTOOL_C_COMPILER ${CMAKE_C_COMPILER}) set(TARANTOOL_CXX_COMPILER ${CMAKE_CXX_COMPILER}) # # Output compile-time defines into config.h. Do it at the end # of the script to make sure all variables are set. # configure_file( "${PROJECT_SOURCE_DIR}/include/tarantool/config.h.cmake" "${PROJECT_BINARY_DIR}/include/tarantool/config.h" ) configure_file( "${PROJECT_SOURCE_DIR}/doc/tnt.ent.cmake" "${PROJECT_BINARY_DIR}/doc/tnt.ent" ) configure_file( "${PROJECT_SOURCE_DIR}/doc/www-data.in/download.cmake" "${PROJECT_BINARY_DIR}/doc/www-data.in/download" ) message (STATUS "") message (STATUS "Tarantool configuration is complete:") message (STATUS "") message (STATUS "VERSION: ${PACKAGE_VERSION}") message (STATUS "BUILD: ${TARANTOOL_BUILD}") message (STATUS "C_COMPILER: ${TARANTOOL_C_COMPILER}") message (STATUS "CXX_COMPILER: ${TARANTOOL_CXX_COMPILER}") message (STATUS "C_FLAGS:${TARANTOOL_C_FLAGS}") message (STATUS "CXX_FLAGS:${TARANTOOL_CXX_FLAGS}") message (STATUS "PREFIX: ${CMAKE_INSTALL_PREFIX}") message (STATUS "MODULES: ${TARANTOOL_MODULES}") message (STATUS "ENABLE_STATIC: ${ENABLE_STATIC}") message (STATUS "ENABLE_SSE2: ${ENABLE_SSE2}") message (STATUS "ENABLE_AVX: ${ENABLE_AVX}") message (STATUS "ENABLE_GCOV: ${ENABLE_GCOV}") message (STATUS "ENABLE_GPROF: ${ENABLE_GPROF}") message (STATUS "ENABLE_TRACE: ${ENABLE_TRACE}") message (STATUS "ENABLE_BACKTRACE: ${ENABLE_BACKTRACE} (symbol resolve: ${HAVE_BFD})") message (STATUS "ENABLE_CLIENT: ${ENABLE_CLIENT}") message (STATUS "ENABLE_BUNDLED_LUAJIT: ${ENABLE_BUNDLED_LUAJIT}") message (STATUS "ENABLE_BUNDLED_LIBEV: ${ENABLE_BUNDLED_LIBEV}") message (STATUS "ENABLE_BUNDLED_LIBEIO: ${ENABLE_BUNDLED_LIBEIO}") message (STATUS "ENABLE_BUNDLED_LIBCORO: ${ENABLE_BUNDLED_LIBCORO}") message (STATUS "ENABLE_DOC: ${ENABLE_DOC}") list_optional_packages() if (TARGET_OS_DARWIN) message (STATUS "DARWIN_BUILD_TYPE: ${DARWIN_BUILD_TYPE}") endif() message (STATUS "") message (STATUS "To view or modify configuration results, check out CMakeCache.txt.") message (STATUS "") tarantool-1.5.1.218.g1a69fd6/.gdbinit0000664000000000000000000000006712202131537015400 0ustar rootrootset history save on handle SIGPIPE nostop noprint pass tarantool-1.5.1.218.g1a69fd6/Doxyfile0000664000000000000000000022521312202131537015467 0ustar rootroot# Doxyfile 1.8.1.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or sequence of words) that should # identify the project. Note that if you do not use Doxywizard you need # to put quotes around the project name if it contains spaces. PROJECT_NAME = "Tarantool/Box" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "A transactional NoSQL database" # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = doc/www-data/logo.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc/doxygen # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. MARKDOWN_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation # of the scope in which they are defined (i.e. file, namespace, or group # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. SYMBOL_CACHE_SIZE = 0 # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the # same symbol appear multiple times in the code, doxygen keeps a cache of # pre-resolved symbols. If the cache is too small doxygen will become slower. # If the cache is too large, memory is wasted. The cache size is given by this # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = YES # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = include src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = *_p.h # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C, C++ and Fortran comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # style sheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of # entries shown in the various tree structured indices initially; the user # can expand and collapse entries dynamically later on. Doxygen will expand # the tree to such a level that at most the specified number of entries are # visible (unless a fully collapsed tree already exceeds this amount). # So setting the number of entries 1 will produce a full collapsed tree by # default. 0 is a special value representing an infinite number of entries # and will result in a full expanded tree by default. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = __attribute__(x)= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # managable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES tarantool-1.5.1.218.g1a69fd6/Makefile0000664000000000000000000013066412213333034015424 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles/progress.marks $(MAKE) -f CMakeFiles/Makefile2 all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: $(MAKE) -f CMakeFiles/Makefile2 clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all $(MAKE) -f CMakeFiles/Makefile2 preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: $(MAKE) -f CMakeFiles/Makefile2 preinstall .PHONY : preinstall/fast # clear depends depend: $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend #============================================================================= # Target rules for targets named build_bundled_libs # Build rule for target. build_bundled_libs: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 build_bundled_libs .PHONY : build_bundled_libs # fast build rule for target. build_bundled_libs/fast: $(MAKE) -f CMakeFiles/build_bundled_libs.dir/build.make CMakeFiles/build_bundled_libs.dir/build .PHONY : build_bundled_libs/fast #============================================================================= # Target rules for targets named cjson # Build rule for target. cjson: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 cjson .PHONY : cjson # fast build rule for target. cjson/fast: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/build .PHONY : cjson/fast #============================================================================= # Target rules for targets named coro # Build rule for target. coro: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 coro .PHONY : coro # fast build rule for target. coro/fast: $(MAKE) -f CMakeFiles/coro.dir/build.make CMakeFiles/coro.dir/build .PHONY : coro/fast #============================================================================= # Target rules for targets named eio # Build rule for target. eio: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 eio .PHONY : eio # fast build rule for target. eio/fast: $(MAKE) -f CMakeFiles/eio.dir/build.make CMakeFiles/eio.dir/build .PHONY : eio/fast #============================================================================= # Target rules for targets named ev # Build rule for target. ev: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 ev .PHONY : ev # fast build rule for target. ev/fast: $(MAKE) -f CMakeFiles/ev.dir/build.make CMakeFiles/ev.dir/build .PHONY : ev/fast #============================================================================= # Target rules for targets named gopt # Build rule for target. gopt: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 gopt .PHONY : gopt # fast build rule for target. gopt/fast: $(MAKE) -f CMakeFiles/gopt.dir/build.make CMakeFiles/gopt.dir/build .PHONY : gopt/fast #============================================================================= # Target rules for targets named libluajit # Build rule for target. libluajit: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 libluajit .PHONY : libluajit # fast build rule for target. libluajit/fast: $(MAKE) -f CMakeFiles/libluajit.dir/build.make CMakeFiles/libluajit.dir/build .PHONY : libluajit/fast #============================================================================= # Target rules for targets named misc # Build rule for target. misc: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 misc .PHONY : misc # fast build rule for target. misc/fast: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/build .PHONY : misc/fast #============================================================================= # Target rules for targets named rpm # Build rule for target. rpm: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rpm .PHONY : rpm # fast build rule for target. rpm/fast: $(MAKE) -f CMakeFiles/rpm.dir/build.make CMakeFiles/rpm.dir/build .PHONY : rpm/fast #============================================================================= # Target rules for targets named rpm_src # Build rule for target. rpm_src: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rpm_src .PHONY : rpm_src # fast build rule for target. rpm_src/fast: $(MAKE) -f CMakeFiles/rpm_src.dir/build.make CMakeFiles/rpm_src.dir/build .PHONY : rpm_src/fast #============================================================================= # Target rules for targets named tags # Build rule for target. tags: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tags .PHONY : tags # fast build rule for target. tags/fast: $(MAKE) -f CMakeFiles/tags.dir/build.make CMakeFiles/tags.dir/build .PHONY : tags/fast #============================================================================= # Target rules for targets named cfg # Build rule for target. cfg: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 cfg .PHONY : cfg # fast build rule for target. cfg/fast: $(MAKE) -f cfg/CMakeFiles/cfg.dir/build.make cfg/CMakeFiles/cfg.dir/build .PHONY : cfg/fast #============================================================================= # Target rules for targets named config # Build rule for target. config: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 config .PHONY : config # fast build rule for target. config/fast: $(MAKE) -f cfg/CMakeFiles/config.dir/build.make cfg/CMakeFiles/config.dir/build .PHONY : config/fast #============================================================================= # Target rules for targets named tnt # Build rule for target. tnt: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tnt .PHONY : tnt # fast build rule for target. tnt/fast: $(MAKE) -f connector/c/tnt/CMakeFiles/tnt.dir/build.make connector/c/tnt/CMakeFiles/tnt.dir/build .PHONY : tnt/fast #============================================================================= # Target rules for targets named tnt_shared # Build rule for target. tnt_shared: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tnt_shared .PHONY : tnt_shared # fast build rule for target. tnt_shared/fast: $(MAKE) -f connector/c/tnt/CMakeFiles/tnt_shared.dir/build.make connector/c/tnt/CMakeFiles/tnt_shared.dir/build .PHONY : tnt_shared/fast #============================================================================= # Target rules for targets named tntsql # Build rule for target. tntsql: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tntsql .PHONY : tntsql # fast build rule for target. tntsql/fast: $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql.dir/build.make connector/c/tntsql/CMakeFiles/tntsql.dir/build .PHONY : tntsql/fast #============================================================================= # Target rules for targets named tntsql_shared # Build rule for target. tntsql_shared: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tntsql_shared .PHONY : tntsql_shared # fast build rule for target. tntsql_shared/fast: $(MAKE) -f connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build.make connector/c/tntsql/CMakeFiles/tntsql_shared.dir/build .PHONY : tntsql_shared/fast #============================================================================= # Target rules for targets named tntnet # Build rule for target. tntnet: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tntnet .PHONY : tntnet # fast build rule for target. tntnet/fast: $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet.dir/build.make connector/c/tntnet/CMakeFiles/tntnet.dir/build .PHONY : tntnet/fast #============================================================================= # Target rules for targets named tntnet_shared # Build rule for target. tntnet_shared: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tntnet_shared .PHONY : tntnet_shared # fast build rule for target. tntnet_shared/fast: $(MAKE) -f connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build.make connector/c/tntnet/CMakeFiles/tntnet_shared.dir/build .PHONY : tntnet_shared/fast #============================================================================= # Target rules for targets named tntrpl # Build rule for target. tntrpl: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tntrpl .PHONY : tntrpl # fast build rule for target. tntrpl/fast: $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl.dir/build .PHONY : tntrpl/fast #============================================================================= # Target rules for targets named tntrpl_shared # Build rule for target. tntrpl_shared: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tntrpl_shared .PHONY : tntrpl_shared # fast build rule for target. tntrpl_shared/fast: $(MAKE) -f connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build.make connector/c/tntrpl/CMakeFiles/tntrpl_shared.dir/build .PHONY : tntrpl_shared/fast #============================================================================= # Target rules for targets named core # Build rule for target. core: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 core .PHONY : core # fast build rule for target. core/fast: $(MAKE) -f src/CMakeFiles/core.dir/build.make src/CMakeFiles/core.dir/build .PHONY : core/fast #============================================================================= # Target rules for targets named generate_admin_cc # Build rule for target. generate_admin_cc: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 generate_admin_cc .PHONY : generate_admin_cc # fast build rule for target. generate_admin_cc/fast: $(MAKE) -f src/CMakeFiles/generate_admin_cc.dir/build.make src/CMakeFiles/generate_admin_cc.dir/build .PHONY : generate_admin_cc/fast #============================================================================= # Target rules for targets named generate_lua_sources # Build rule for target. generate_lua_sources: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 generate_lua_sources .PHONY : generate_lua_sources # fast build rule for target. generate_lua_sources/fast: $(MAKE) -f src/CMakeFiles/generate_lua_sources.dir/build.make src/CMakeFiles/generate_lua_sources.dir/build .PHONY : generate_lua_sources/fast #============================================================================= # Target rules for targets named generate_memcached_grammar_cc # Build rule for target. generate_memcached_grammar_cc: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 generate_memcached_grammar_cc .PHONY : generate_memcached_grammar_cc # fast build rule for target. generate_memcached_grammar_cc/fast: $(MAKE) -f src/CMakeFiles/generate_memcached_grammar_cc.dir/build.make src/CMakeFiles/generate_memcached_grammar_cc.dir/build .PHONY : generate_memcached_grammar_cc/fast #============================================================================= # Target rules for targets named pg # Build rule for target. pg: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 pg .PHONY : pg # fast build rule for target. pg/fast: $(MAKE) -f src/plugin/pg/CMakeFiles/pg.dir/build.make src/plugin/pg/CMakeFiles/pg.dir/build .PHONY : pg/fast #============================================================================= # Target rules for targets named mysql # Build rule for target. mysql: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 mysql .PHONY : mysql # fast build rule for target. mysql/fast: $(MAKE) -f src/plugin/mysql/CMakeFiles/mysql.dir/build.make src/plugin/mysql/CMakeFiles/mysql.dir/build .PHONY : mysql/fast #============================================================================= # Target rules for targets named bit # Build rule for target. bit: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 bit .PHONY : bit # fast build rule for target. bit/fast: $(MAKE) -f src/lib/bit/CMakeFiles/bit.dir/build.make src/lib/bit/CMakeFiles/bit.dir/build .PHONY : bit/fast #============================================================================= # Target rules for targets named bitset # Build rule for target. bitset: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 bitset .PHONY : bitset # fast build rule for target. bitset/fast: $(MAKE) -f src/lib/bitset/CMakeFiles/bitset.dir/build.make src/lib/bitset/CMakeFiles/bitset.dir/build .PHONY : bitset/fast #============================================================================= # Target rules for targets named small # Build rule for target. small: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 small .PHONY : small # fast build rule for target. small/fast: $(MAKE) -f src/lib/small/CMakeFiles/small.dir/build.make src/lib/small/CMakeFiles/small.dir/build .PHONY : small/fast #============================================================================= # Target rules for targets named box_generate_lua_sources # Build rule for target. box_generate_lua_sources: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 box_generate_lua_sources .PHONY : box_generate_lua_sources # fast build rule for target. box_generate_lua_sources/fast: $(MAKE) -f src/box/CMakeFiles/box_generate_lua_sources.dir/build.make src/box/CMakeFiles/box_generate_lua_sources.dir/build .PHONY : box_generate_lua_sources/fast #============================================================================= # Target rules for targets named ltbox # Build rule for target. ltbox: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 ltbox .PHONY : ltbox # fast build rule for target. ltbox/fast: $(MAKE) -f src/box/CMakeFiles/ltbox.dir/build.make src/box/CMakeFiles/ltbox.dir/build .PHONY : ltbox/fast #============================================================================= # Target rules for targets named tarantool_box # Build rule for target. tarantool_box: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tarantool_box .PHONY : tarantool_box # fast build rule for target. tarantool_box/fast: $(MAKE) -f src/box/CMakeFiles/tarantool_box.dir/build.make src/box/CMakeFiles/tarantool_box.dir/build .PHONY : tarantool_box/fast #============================================================================= # Target rules for targets named txt2c # Build rule for target. txt2c: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 txt2c .PHONY : txt2c # fast build rule for target. txt2c/fast: $(MAKE) -f extra/CMakeFiles/txt2c.dir/build.make extra/CMakeFiles/txt2c.dir/build .PHONY : txt2c/fast #============================================================================= # Target rules for targets named tarancheck # Build rule for target. tarancheck: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tarancheck .PHONY : tarancheck # fast build rule for target. tarancheck/fast: $(MAKE) -f client/tarancheck/CMakeFiles/tarancheck.dir/build.make client/tarancheck/CMakeFiles/tarancheck.dir/build .PHONY : tarancheck/fast #============================================================================= # Target rules for targets named tarantar # Build rule for target. tarantar: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tarantar .PHONY : tarantar # fast build rule for target. tarantar/fast: $(MAKE) -f client/tarantar/CMakeFiles/tarantar.dir/build.make client/tarantar/CMakeFiles/tarantar.dir/build .PHONY : tarantar/fast #============================================================================= # Target rules for targets named test # Build rule for target. test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 test .PHONY : test # fast build rule for target. test/fast: $(MAKE) -f test/CMakeFiles/test.dir/build.make test/CMakeFiles/test.dir/build .PHONY : test/fast #============================================================================= # Target rules for targets named test-force # Build rule for target. test-force: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 test-force .PHONY : test-force # fast build rule for target. test-force/fast: $(MAKE) -f test/CMakeFiles/test-force.dir/build.make test/CMakeFiles/test-force.dir/build .PHONY : test-force/fast #============================================================================= # Target rules for targets named base64.test # Build rule for target. base64.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 base64.test .PHONY : base64.test # fast build rule for target. base64.test/fast: $(MAKE) -f test/unit/CMakeFiles/base64.test.dir/build.make test/unit/CMakeFiles/base64.test.dir/build .PHONY : base64.test/fast #============================================================================= # Target rules for targets named bit.test # Build rule for target. bit.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 bit.test .PHONY : bit.test # fast build rule for target. bit.test/fast: $(MAKE) -f test/unit/CMakeFiles/bit.test.dir/build.make test/unit/CMakeFiles/bit.test.dir/build .PHONY : bit.test/fast #============================================================================= # Target rules for targets named bitset_basic.test # Build rule for target. bitset_basic.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 bitset_basic.test .PHONY : bitset_basic.test # fast build rule for target. bitset_basic.test/fast: $(MAKE) -f test/unit/CMakeFiles/bitset_basic.test.dir/build.make test/unit/CMakeFiles/bitset_basic.test.dir/build .PHONY : bitset_basic.test/fast #============================================================================= # Target rules for targets named bitset_index.test # Build rule for target. bitset_index.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 bitset_index.test .PHONY : bitset_index.test # fast build rule for target. bitset_index.test/fast: $(MAKE) -f test/unit/CMakeFiles/bitset_index.test.dir/build.make test/unit/CMakeFiles/bitset_index.test.dir/build .PHONY : bitset_index.test/fast #============================================================================= # Target rules for targets named bitset_iterator.test # Build rule for target. bitset_iterator.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 bitset_iterator.test .PHONY : bitset_iterator.test # fast build rule for target. bitset_iterator.test/fast: $(MAKE) -f test/unit/CMakeFiles/bitset_iterator.test.dir/build.make test/unit/CMakeFiles/bitset_iterator.test.dir/build .PHONY : bitset_iterator.test/fast #============================================================================= # Target rules for targets named mempool.test # Build rule for target. mempool.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 mempool.test .PHONY : mempool.test # fast build rule for target. mempool.test/fast: $(MAKE) -f test/unit/CMakeFiles/mempool.test.dir/build.make test/unit/CMakeFiles/mempool.test.dir/build .PHONY : mempool.test/fast #============================================================================= # Target rules for targets named mhash.test # Build rule for target. mhash.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 mhash.test .PHONY : mhash.test # fast build rule for target. mhash.test/fast: $(MAKE) -f test/unit/CMakeFiles/mhash.test.dir/build.make test/unit/CMakeFiles/mhash.test.dir/build .PHONY : mhash.test/fast #============================================================================= # Target rules for targets named queue.test # Build rule for target. queue.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 queue.test .PHONY : queue.test # fast build rule for target. queue.test/fast: $(MAKE) -f test/unit/CMakeFiles/queue.test.dir/build.make test/unit/CMakeFiles/queue.test.dir/build .PHONY : queue.test/fast #============================================================================= # Target rules for targets named region.test # Build rule for target. region.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 region.test .PHONY : region.test # fast build rule for target. region.test/fast: $(MAKE) -f test/unit/CMakeFiles/region.test.dir/build.make test/unit/CMakeFiles/region.test.dir/build .PHONY : region.test/fast #============================================================================= # Target rules for targets named rlist.test # Build rule for target. rlist.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rlist.test .PHONY : rlist.test # fast build rule for target. rlist.test/fast: $(MAKE) -f test/unit/CMakeFiles/rlist.test.dir/build.make test/unit/CMakeFiles/rlist.test.dir/build .PHONY : rlist.test/fast #============================================================================= # Target rules for targets named rope.test # Build rule for target. rope.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rope.test .PHONY : rope.test # fast build rule for target. rope.test/fast: $(MAKE) -f test/unit/CMakeFiles/rope.test.dir/build.make test/unit/CMakeFiles/rope.test.dir/build .PHONY : rope.test/fast #============================================================================= # Target rules for targets named rope_avl.test # Build rule for target. rope_avl.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rope_avl.test .PHONY : rope_avl.test # fast build rule for target. rope_avl.test/fast: $(MAKE) -f test/unit/CMakeFiles/rope_avl.test.dir/build.make test/unit/CMakeFiles/rope_avl.test.dir/build .PHONY : rope_avl.test/fast #============================================================================= # Target rules for targets named rope_basic.test # Build rule for target. rope_basic.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rope_basic.test .PHONY : rope_basic.test # fast build rule for target. rope_basic.test/fast: $(MAKE) -f test/unit/CMakeFiles/rope_basic.test.dir/build.make test/unit/CMakeFiles/rope_basic.test.dir/build .PHONY : rope_basic.test/fast #============================================================================= # Target rules for targets named rope_stress.test # Build rule for target. rope_stress.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rope_stress.test .PHONY : rope_stress.test # fast build rule for target. rope_stress.test/fast: $(MAKE) -f test/unit/CMakeFiles/rope_stress.test.dir/build.make test/unit/CMakeFiles/rope_stress.test.dir/build .PHONY : rope_stress.test/fast #============================================================================= # Target rules for targets named slab_cache.test # Build rule for target. slab_cache.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 slab_cache.test .PHONY : slab_cache.test # fast build rule for target. slab_cache.test/fast: $(MAKE) -f test/unit/CMakeFiles/slab_cache.test.dir/build.make test/unit/CMakeFiles/slab_cache.test.dir/build .PHONY : slab_cache.test/fast #============================================================================= # Target rules for targets named small_alloc.test # Build rule for target. small_alloc.test: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 small_alloc.test .PHONY : small_alloc.test # fast build rule for target. small_alloc.test/fast: $(MAKE) -f test/unit/CMakeFiles/small_alloc.test.dir/build.make test/unit/CMakeFiles/small_alloc.test.dir/build .PHONY : small_alloc.test/fast #============================================================================= # Target rules for targets named protocol # Build rule for target. protocol: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 protocol .PHONY : protocol # fast build rule for target. protocol/fast: $(MAKE) -f test/box/CMakeFiles/protocol.dir/build.make test/box/CMakeFiles/protocol.dir/build .PHONY : protocol/fast #============================================================================= # Target rules for targets named rpl # Build rule for target. rpl: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 rpl .PHONY : rpl # fast build rule for target. rpl/fast: $(MAKE) -f test/connector_c/CMakeFiles/rpl.dir/build.make test/connector_c/CMakeFiles/rpl.dir/build .PHONY : rpl/fast #============================================================================= # Target rules for targets named snap # Build rule for target. snap: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 snap .PHONY : snap # fast build rule for target. snap/fast: $(MAKE) -f test/connector_c/CMakeFiles/snap.dir/build.make test/connector_c/CMakeFiles/snap.dir/build .PHONY : snap/fast #============================================================================= # Target rules for targets named tp # Build rule for target. tp: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tp .PHONY : tp # fast build rule for target. tp/fast: $(MAKE) -f test/connector_c/CMakeFiles/tp.dir/build.make test/connector_c/CMakeFiles/tp.dir/build .PHONY : tp/fast #============================================================================= # Target rules for targets named tt # Build rule for target. tt: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 tt .PHONY : tt # fast build rule for target. tt/fast: $(MAKE) -f test/connector_c/CMakeFiles/tt.dir/build.make test/connector_c/CMakeFiles/tt.dir/build .PHONY : tt/fast #============================================================================= # Target rules for targets named update # Build rule for target. update: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 update .PHONY : update # fast build rule for target. update/fast: $(MAKE) -f test/connector_c/CMakeFiles/update.dir/build.make test/connector_c/CMakeFiles/update.dir/build .PHONY : update/fast #============================================================================= # Target rules for targets named xlog # Build rule for target. xlog: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 xlog .PHONY : xlog # fast build rule for target. xlog/fast: $(MAKE) -f test/connector_c/CMakeFiles/xlog.dir/build.make test/connector_c/CMakeFiles/xlog.dir/build .PHONY : xlog/fast #============================================================================= # Target rules for targets named man # Build rule for target. man: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 man .PHONY : man # fast build rule for target. man/fast: $(MAKE) -f doc/man/CMakeFiles/man.dir/build.make doc/man/CMakeFiles/man.dir/build .PHONY : man/fast #============================================================================= # Target rules for targets named www-data # Build rule for target. www-data: cmake_check_build_system $(MAKE) -f CMakeFiles/Makefile2 www-data .PHONY : www-data # fast build rule for target. www-data/fast: $(MAKE) -f doc/www-data.in/CMakeFiles/www-data.dir/build.make doc/www-data.in/CMakeFiles/www-data.dir/build .PHONY : www-data/fast third_party/PMurHash.o: third_party/PMurHash.c.o .PHONY : third_party/PMurHash.o # target to build an object file third_party/PMurHash.c.o: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/PMurHash.c.o .PHONY : third_party/PMurHash.c.o third_party/PMurHash.i: third_party/PMurHash.c.i .PHONY : third_party/PMurHash.i # target to preprocess a source file third_party/PMurHash.c.i: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/PMurHash.c.i .PHONY : third_party/PMurHash.c.i third_party/PMurHash.s: third_party/PMurHash.c.s .PHONY : third_party/PMurHash.s # target to generate assembly for a file third_party/PMurHash.c.s: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/PMurHash.c.s .PHONY : third_party/PMurHash.c.s third_party/base64.o: third_party/base64.c.o .PHONY : third_party/base64.o # target to build an object file third_party/base64.c.o: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/base64.c.o .PHONY : third_party/base64.c.o third_party/base64.i: third_party/base64.c.i .PHONY : third_party/base64.i # target to preprocess a source file third_party/base64.c.i: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/base64.c.i .PHONY : third_party/base64.c.i third_party/base64.s: third_party/base64.c.s .PHONY : third_party/base64.s # target to generate assembly for a file third_party/base64.c.s: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/base64.c.s .PHONY : third_party/base64.c.s third_party/coro/coro.o: third_party/coro/coro.c.o .PHONY : third_party/coro/coro.o # target to build an object file third_party/coro/coro.c.o: $(MAKE) -f CMakeFiles/coro.dir/build.make CMakeFiles/coro.dir/third_party/coro/coro.c.o .PHONY : third_party/coro/coro.c.o third_party/coro/coro.i: third_party/coro/coro.c.i .PHONY : third_party/coro/coro.i # target to preprocess a source file third_party/coro/coro.c.i: $(MAKE) -f CMakeFiles/coro.dir/build.make CMakeFiles/coro.dir/third_party/coro/coro.c.i .PHONY : third_party/coro/coro.c.i third_party/coro/coro.s: third_party/coro/coro.c.s .PHONY : third_party/coro/coro.s # target to generate assembly for a file third_party/coro/coro.c.s: $(MAKE) -f CMakeFiles/coro.dir/build.make CMakeFiles/coro.dir/third_party/coro/coro.c.s .PHONY : third_party/coro/coro.c.s third_party/crc32.o: third_party/crc32.c.o .PHONY : third_party/crc32.o # target to build an object file third_party/crc32.c.o: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/crc32.c.o .PHONY : third_party/crc32.c.o third_party/crc32.i: third_party/crc32.c.i .PHONY : third_party/crc32.i # target to preprocess a source file third_party/crc32.c.i: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/crc32.c.i .PHONY : third_party/crc32.c.i third_party/crc32.s: third_party/crc32.c.s .PHONY : third_party/crc32.s # target to generate assembly for a file third_party/crc32.c.s: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/crc32.c.s .PHONY : third_party/crc32.c.s third_party/gopt/gopt.o: third_party/gopt/gopt.c.o .PHONY : third_party/gopt/gopt.o # target to build an object file third_party/gopt/gopt.c.o: $(MAKE) -f CMakeFiles/gopt.dir/build.make CMakeFiles/gopt.dir/third_party/gopt/gopt.c.o .PHONY : third_party/gopt/gopt.c.o third_party/gopt/gopt.i: third_party/gopt/gopt.c.i .PHONY : third_party/gopt/gopt.i # target to preprocess a source file third_party/gopt/gopt.c.i: $(MAKE) -f CMakeFiles/gopt.dir/build.make CMakeFiles/gopt.dir/third_party/gopt/gopt.c.i .PHONY : third_party/gopt/gopt.c.i third_party/gopt/gopt.s: third_party/gopt/gopt.c.s .PHONY : third_party/gopt/gopt.s # target to generate assembly for a file third_party/gopt/gopt.c.s: $(MAKE) -f CMakeFiles/gopt.dir/build.make CMakeFiles/gopt.dir/third_party/gopt/gopt.c.s .PHONY : third_party/gopt/gopt.c.s third_party/lua-cjson/fpconv.o: third_party/lua-cjson/fpconv.c.o .PHONY : third_party/lua-cjson/fpconv.o # target to build an object file third_party/lua-cjson/fpconv.c.o: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/fpconv.c.o .PHONY : third_party/lua-cjson/fpconv.c.o third_party/lua-cjson/fpconv.i: third_party/lua-cjson/fpconv.c.i .PHONY : third_party/lua-cjson/fpconv.i # target to preprocess a source file third_party/lua-cjson/fpconv.c.i: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/fpconv.c.i .PHONY : third_party/lua-cjson/fpconv.c.i third_party/lua-cjson/fpconv.s: third_party/lua-cjson/fpconv.c.s .PHONY : third_party/lua-cjson/fpconv.s # target to generate assembly for a file third_party/lua-cjson/fpconv.c.s: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/fpconv.c.s .PHONY : third_party/lua-cjson/fpconv.c.s third_party/lua-cjson/lua_cjson.o: third_party/lua-cjson/lua_cjson.c.o .PHONY : third_party/lua-cjson/lua_cjson.o # target to build an object file third_party/lua-cjson/lua_cjson.c.o: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/lua_cjson.c.o .PHONY : third_party/lua-cjson/lua_cjson.c.o third_party/lua-cjson/lua_cjson.i: third_party/lua-cjson/lua_cjson.c.i .PHONY : third_party/lua-cjson/lua_cjson.i # target to preprocess a source file third_party/lua-cjson/lua_cjson.c.i: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/lua_cjson.c.i .PHONY : third_party/lua-cjson/lua_cjson.c.i third_party/lua-cjson/lua_cjson.s: third_party/lua-cjson/lua_cjson.c.s .PHONY : third_party/lua-cjson/lua_cjson.s # target to generate assembly for a file third_party/lua-cjson/lua_cjson.c.s: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/lua_cjson.c.s .PHONY : third_party/lua-cjson/lua_cjson.c.s third_party/lua-cjson/strbuf.o: third_party/lua-cjson/strbuf.c.o .PHONY : third_party/lua-cjson/strbuf.o # target to build an object file third_party/lua-cjson/strbuf.c.o: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/strbuf.c.o .PHONY : third_party/lua-cjson/strbuf.c.o third_party/lua-cjson/strbuf.i: third_party/lua-cjson/strbuf.c.i .PHONY : third_party/lua-cjson/strbuf.i # target to preprocess a source file third_party/lua-cjson/strbuf.c.i: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/strbuf.c.i .PHONY : third_party/lua-cjson/strbuf.c.i third_party/lua-cjson/strbuf.s: third_party/lua-cjson/strbuf.c.s .PHONY : third_party/lua-cjson/strbuf.s # target to generate assembly for a file third_party/lua-cjson/strbuf.c.s: $(MAKE) -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/third_party/lua-cjson/strbuf.c.s .PHONY : third_party/lua-cjson/strbuf.c.s third_party/proctitle.o: third_party/proctitle.c.o .PHONY : third_party/proctitle.o # target to build an object file third_party/proctitle.c.o: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/proctitle.c.o .PHONY : third_party/proctitle.c.o third_party/proctitle.i: third_party/proctitle.c.i .PHONY : third_party/proctitle.i # target to preprocess a source file third_party/proctitle.c.i: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/proctitle.c.i .PHONY : third_party/proctitle.c.i third_party/proctitle.s: third_party/proctitle.c.s .PHONY : third_party/proctitle.s # target to generate assembly for a file third_party/proctitle.c.s: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/proctitle.c.s .PHONY : third_party/proctitle.c.s third_party/qsort_arg.o: third_party/qsort_arg.c.o .PHONY : third_party/qsort_arg.o # target to build an object file third_party/qsort_arg.c.o: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/qsort_arg.c.o .PHONY : third_party/qsort_arg.c.o third_party/qsort_arg.i: third_party/qsort_arg.c.i .PHONY : third_party/qsort_arg.i # target to preprocess a source file third_party/qsort_arg.c.i: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/qsort_arg.c.i .PHONY : third_party/qsort_arg.c.i third_party/qsort_arg.s: third_party/qsort_arg.c.s .PHONY : third_party/qsort_arg.s # target to generate assembly for a file third_party/qsort_arg.c.s: $(MAKE) -f CMakeFiles/misc.dir/build.make CMakeFiles/misc.dir/third_party/qsort_arg.c.s .PHONY : third_party/qsort_arg.c.s third_party/tarantool_eio.o: third_party/tarantool_eio.c.o .PHONY : third_party/tarantool_eio.o # target to build an object file third_party/tarantool_eio.c.o: $(MAKE) -f CMakeFiles/eio.dir/build.make CMakeFiles/eio.dir/third_party/tarantool_eio.c.o .PHONY : third_party/tarantool_eio.c.o third_party/tarantool_eio.i: third_party/tarantool_eio.c.i .PHONY : third_party/tarantool_eio.i # target to preprocess a source file third_party/tarantool_eio.c.i: $(MAKE) -f CMakeFiles/eio.dir/build.make CMakeFiles/eio.dir/third_party/tarantool_eio.c.i .PHONY : third_party/tarantool_eio.c.i third_party/tarantool_eio.s: third_party/tarantool_eio.c.s .PHONY : third_party/tarantool_eio.s # target to generate assembly for a file third_party/tarantool_eio.c.s: $(MAKE) -f CMakeFiles/eio.dir/build.make CMakeFiles/eio.dir/third_party/tarantool_eio.c.s .PHONY : third_party/tarantool_eio.c.s third_party/tarantool_ev.o: third_party/tarantool_ev.c.o .PHONY : third_party/tarantool_ev.o # target to build an object file third_party/tarantool_ev.c.o: $(MAKE) -f CMakeFiles/ev.dir/build.make CMakeFiles/ev.dir/third_party/tarantool_ev.c.o .PHONY : third_party/tarantool_ev.c.o third_party/tarantool_ev.i: third_party/tarantool_ev.c.i .PHONY : third_party/tarantool_ev.i # target to preprocess a source file third_party/tarantool_ev.c.i: $(MAKE) -f CMakeFiles/ev.dir/build.make CMakeFiles/ev.dir/third_party/tarantool_ev.c.i .PHONY : third_party/tarantool_ev.c.i third_party/tarantool_ev.s: third_party/tarantool_ev.c.s .PHONY : third_party/tarantool_ev.s # target to generate assembly for a file third_party/tarantool_ev.c.s: $(MAKE) -f CMakeFiles/ev.dir/build.make CMakeFiles/ev.dir/third_party/tarantool_ev.c.s .PHONY : third_party/tarantool_ev.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... build_bundled_libs" @echo "... cjson" @echo "... coro" @echo "... edit_cache" @echo "... eio" @echo "... ev" @echo "... gopt" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... libluajit" @echo "... list_install_components" @echo "... misc" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... rpm" @echo "... rpm_src" @echo "... tags" @echo "... cfg" @echo "... config" @echo "... tnt" @echo "... tnt_shared" @echo "... tntsql" @echo "... tntsql_shared" @echo "... tntnet" @echo "... tntnet_shared" @echo "... tntrpl" @echo "... tntrpl_shared" @echo "... core" @echo "... generate_admin_cc" @echo "... generate_lua_sources" @echo "... generate_memcached_grammar_cc" @echo "... pg" @echo "... mysql" @echo "... bit" @echo "... bitset" @echo "... small" @echo "... box_generate_lua_sources" @echo "... ltbox" @echo "... tarantool_box" @echo "... txt2c" @echo "... tarancheck" @echo "... tarantar" @echo "... test" @echo "... test-force" @echo "... base64.test" @echo "... bit.test" @echo "... bitset_basic.test" @echo "... bitset_index.test" @echo "... bitset_iterator.test" @echo "... mempool.test" @echo "... mhash.test" @echo "... queue.test" @echo "... region.test" @echo "... rlist.test" @echo "... rope.test" @echo "... rope_avl.test" @echo "... rope_basic.test" @echo "... rope_stress.test" @echo "... slab_cache.test" @echo "... small_alloc.test" @echo "... protocol" @echo "... rpl" @echo "... snap" @echo "... tp" @echo "... tt" @echo "... update" @echo "... xlog" @echo "... man" @echo "... www-data" @echo "... third_party/PMurHash.o" @echo "... third_party/PMurHash.i" @echo "... third_party/PMurHash.s" @echo "... third_party/base64.o" @echo "... third_party/base64.i" @echo "... third_party/base64.s" @echo "... third_party/coro/coro.o" @echo "... third_party/coro/coro.i" @echo "... third_party/coro/coro.s" @echo "... third_party/crc32.o" @echo "... third_party/crc32.i" @echo "... third_party/crc32.s" @echo "... third_party/gopt/gopt.o" @echo "... third_party/gopt/gopt.i" @echo "... third_party/gopt/gopt.s" @echo "... third_party/lua-cjson/fpconv.o" @echo "... third_party/lua-cjson/fpconv.i" @echo "... third_party/lua-cjson/fpconv.s" @echo "... third_party/lua-cjson/lua_cjson.o" @echo "... third_party/lua-cjson/lua_cjson.i" @echo "... third_party/lua-cjson/lua_cjson.s" @echo "... third_party/lua-cjson/strbuf.o" @echo "... third_party/lua-cjson/strbuf.i" @echo "... third_party/lua-cjson/strbuf.s" @echo "... third_party/proctitle.o" @echo "... third_party/proctitle.i" @echo "... third_party/proctitle.s" @echo "... third_party/qsort_arg.o" @echo "... third_party/qsort_arg.i" @echo "... third_party/qsort_arg.s" @echo "... third_party/tarantool_eio.o" @echo "... third_party/tarantool_eio.i" @echo "... third_party/tarantool_eio.s" @echo "... third_party/tarantool_ev.o" @echo "... third_party/tarantool_ev.i" @echo "... third_party/tarantool_ev.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/cmake/0000775000000000000000000000000012242653271015044 5ustar rootroottarantool-1.5.1.218.g1a69fd6/cmake/BuildLibEV.cmake0000664000000000000000000000337612202131537017770 0ustar rootroot# # A macro to build the bundled libev macro(libev_build) set(ev_compile_flags) set(ev_link_libraries) if (CC_HAS_WNO_UNUSED_RESULT) set(ev_compile_flags "${ev_compile_flags} -Wno-unused-value") endif() if (CC_HAS_WNO_COMMENT) set(ev_compile_flags "${ev_compile_flags} -Wno-comment") endif() if (CC_HAS_FNO_STRICT_ALIASING) set(ev_compile_flags "${ev_compile_flags} -fno-strict-aliasing") endif() if (CC_HAS_WNO_PARENTHESES) set(ev_compile_flags "${ev_compile_flags} -Wno-parentheses") endif() set(ev_compile_flags "${ev_compile_flags} -DENABLE_BUNDLED_LIBEV=1") if (TARGET_OS_LINUX) # # Enable Linux-specific event notification API (man inotify) set(ev_compile_flags "${ev_compile_flags} -DEV_USE_INOTIFY") elseif (TARGET_OS_FREEBSD) # # On FreeBSD build libev loop on top of set(ev_compile_flags "${ev_compile_flags} -DEV_USE_KQUEUE") endif() list(APPEND ev_link_libraries "m") if (TARGET_OS_DEBIAN_FREEBSD) # libev depends on librt under kFreeBSD list(APPEND ev_link_libraries "rt") else() endif() set(libev_src ${PROJECT_SOURCE_DIR}/third_party/tarantool_ev.c ) add_library(ev STATIC ${libev_src}) set_target_properties(ev PROPERTIES COMPILE_FLAGS "${ev_compile_flags}") target_link_libraries(ev ${ev_link_libraries}) set(LIBEV_INCLUDE_DIR ${PROJECT_BINARY_DIR}/third_party) set(LIBEV_LIBRARIES ev) message(STATUS "Use bundled libev includes: " "${LIBEV_INCLUDE_DIR}/tarantool_ev.h") message(STATUS "Use bundled libev library: " "${LIBEV_LIBRARIES}") unset(ev_src) unset(ev_compile_flags) unset(ev_link_libraries) endmacro(libev_build) tarantool-1.5.1.218.g1a69fd6/cmake/BuildMisc.cmake0000664000000000000000000000167512202131537017722 0ustar rootroot# # A macro to build the bundled libmisc macro(libmisc_build) set(misc_src ${PROJECT_SOURCE_DIR}/third_party/crc32.c ${PROJECT_SOURCE_DIR}/third_party/proctitle.c ${PROJECT_SOURCE_DIR}/third_party/qsort_arg.c ${PROJECT_SOURCE_DIR}/third_party/PMurHash.c ${PROJECT_SOURCE_DIR}/third_party/base64.c ) if (NOT HAVE_MEMMEM) list(APPEND misc_src ${PROJECT_SOURCE_DIR}/third_party/memmem.c ) endif() if (NOT HAVE_MEMRCHR) list(APPEND misc_src ${PROJECT_SOURCE_DIR}/third_party/memrchr.c ) endif() if (NOT TARGET_OS_DEBIAN_FREEBSD) if (TARGET_OS_FREEBSD) set_source_files_properties( ${PROJECT_SOURCE_DIR}/third_party/proctitle.c PROPERTIES COMPILE_FLAGS "-DHAVE_SETPROCTITLE") endif() endif() add_library(misc STATIC ${misc_src}) unset(misc_src) endmacro(libmisc_build) tarantool-1.5.1.218.g1a69fd6/cmake/arch.cmake0000664000000000000000000000202212231715276016761 0ustar rootroottest_big_endian(HAVE_BYTE_ORDER_BIG_ENDIAN) # # We do not perform host-to-network byte order translation, # and simply assume the machine is little-endian. # We also do not bother with trying to avoid unaligned # word access. Refuse to compile on rare hardware such as # Sparc or Itanium. # if (${HAVE_BYTE_ORDER_BIG_ENDIAN} OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "sparc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ia64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^alpha") message (FATAL_ERROR "Unsupported architecture -- ${CMAKE_SYSTEM_PROCESSOR}, ") message (FATAL_ERROR "Tarantool currently only supports little-endian hardware") message (FATAL_ERROR "with unaligned word access.") endif() # # Bug in CMake, Darwin always detect on i386 # Fixed with check types # if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") if (CMAKE_SIZEOF_VOID_P MATCHES 8) set(CMAKE_SYSTEM_PROCESSOR "x86_64") else(CMAKE_SIZEOF_VOID_P MATCHES 8) set(CMAKE_SYSTEM_PROCESSOR "x86") endif(CMAKE_SIZEOF_VOID_P MATCHES 8) endif() tarantool-1.5.1.218.g1a69fd6/cmake/os.cmake0000664000000000000000000000300112242653271016461 0ustar rootroot# # Perform operating-system specific configuration. # if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(TARGET_OS_LINUX 1) # # Enable GNU glibc extentions. add_definitions("-D_GNU_SOURCE") # # On 32-bit systems, support files larger than 2GB # (see man page for feature_test_macros). add_definitions("-D_FILE_OFFSET_BITS=64") message(STATUS "Building for Linux") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD") set(TARGET_OS_FREEBSD 1) set(TARGET_OS_DEBIAN_FREEBSD 1) # Debian/kFreeBSD uses GNU glibc. add_definitions("-D_GNU_SOURCE") add_definitions("-D_FILE_OFFSET_BITS=64") message(STATUS "Building for Debian/kFreeBSD") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") set(TARGET_OS_FREEBSD 1) message(STATUS "Building for FreeBSD") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") set(TARGET_OS_DARWIN 1) # # Default build type is None, which uses depends by Apple # command line tools. Also supportting install with MacPorts. # if (NOT DARWIN_BUILD_TYPE) set(DARWIN_BUILD_TYPE None CACHE STRING "Choose the type of Darwin build, options are: None, Ports." FORCE) endif() if (${DARWIN_BUILD_TYPE} STREQUAL "Ports") # Mac ports get installed into /opt/local, hence: include_directories("/opt/local/include") set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/opt/local/lib") endif() message(STATUS "Building for Mac OS X") else() message (FATAL_ERROR "Unsupported platform -- ${CMAKE_SYSTEM_NAME}") endif() tarantool-1.5.1.218.g1a69fd6/cmake/FindMySQL.cmake0000664000000000000000000000130412231715276017614 0ustar rootrootfind_path(MYSQL_INCLUDE_DIR NAMES mysql.h PATH_SUFFIXES mysql ) find_library(MYSQL_LIBRARIES NAMES mysqlclient_r PATH_SUFFIXES mysql ) if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) set(MYSQL_FOUND ON) endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) if(MYSQL_FOUND) if (NOT MYSQL_FIND_QUIETLY) message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}/mysql.h") message(STATUS "Found MySQL library: ${MYSQL_LIBRARIES}") endif (NOT MYSQL_FIND_QUIETLY) set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR}) else(MYSQL_FOUND) if (MYSQL_FIND_REQUIRED) message(FATAL_ERROR "Could not find mysql development files") endif (MYSQL_FIND_REQUIRED) endif (MYSQL_FOUND) tarantool-1.5.1.218.g1a69fd6/cmake/luajit.cmake0000664000000000000000000001703012242653271017337 0ustar rootroot # # LuaJIT configuration file. # # A copy of LuaJIT is maintained within Tarantool # source. It's located in third_party/luajit. # # Instead of this copy, Tarantool can be compiled # with a system-wide LuaJIT, or LuaJIT at a given # prefix. This is used when compiling Tarantool # as part of a distribution, e.g. Debian. # # To explicitly request use of the bundled LuaJIT, # add -DENABLE_BUNDLED_LUAJIT=True to CMake # configuration flags. # To explicitly request use of LuaJIT at a given # prefix, use -DLUAJIT_PREFIX=/path/to/LuaJIT. # # These two options are incompatible with each other. # # If neither of the two options is given, this script # first attempts to use the system-installed LuaJIT # and, in case it is not present or can not be used, # falls back to the bundled one. # # Adds CMake options: ENABLED_BUNDLED_LUAJIT, LUAJIT_PREFIX # Exports CMake defines: LUAJIT_PREFIX, LUAJIT_INCLUDE, LUAJIT_LIB # Modifies CMAKE_CFLAGS with -I${LUAJIT_INCLUDE} # # # Bundled LuaJIT paths. # set (LUAJIT_BUNDLED_PREFIX "${PROJECT_BINARY_DIR}/third_party/luajit/src") set (LUAJIT_BUNDLED_LIB "${LUAJIT_BUNDLED_PREFIX}/libluajit.a") macro (luajit_use_bundled) set (LUAJIT_PREFIX "${LUAJIT_BUNDLED_PREFIX}") set (LUAJIT_INCLUDE "${PROJECT_SOURCE_DIR}/third_party/luajit/src") set (LUAJIT_LIB "${LUAJIT_BUNDLED_LIB}") set (ENABLE_BUNDLED_LUAJIT True) endmacro() # # LuaJIT testing routine # (see cmake/luatest.cpp for a description). # macro (luajit_test) file (READ "${CMAKE_SOURCE_DIR}/cmake/luatest.cpp" LUAJIT_TEST) set (CMAKE_REQUIRED_LIBRARIES "${LUAJIT_LIB}") if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set (CMAKE_REQUIRED_LIBRARIES "-ldl ${CMAKE_REQUIRED_LIBRARIES}") endif() set (CMAKE_REQUIRED_INCLUDES "${LUAJIT_INCLUDE}") CHECK_CXX_SOURCE_RUNS ("${LUAJIT_TEST}" LUAJIT_RUNS) unset (LUAJIT_TEST) unset (CMAKE_REQUIRED_LIBRARIES) unset (CMAKE_REQUIRED_INCLUDES) endmacro() # # Check if there is a system LuaJIT availaible and # usable with the server (determined by a compiled test). # macro (luajit_try_system) find_path (LUAJIT_INCLUDE lj_obj.h PATH_SUFFIXES luajit-2.0 luajit) find_library (LUAJIT_LIB NAMES luajit luajit-5.1 PATH_SUFFIXES x86_64-linux-gnu) if (LUAJIT_INCLUDE AND LUAJIT_LIB) message (STATUS "include: ${LUAJIT_INCLUDE}, lib: ${LUAJIT_LIB}") message (STATUS "Found a system-wide LuaJIT.") luajit_test() if ("${LUAJIT_RUNS}" STREQUAL "1") message (STATUS "System-wide LuaJIT at ${LUAJIT_LIB} is suitable for use.") else() message (WARNING "System-wide LuaJIT at ${LUAJIT_LIB} is NOT suitable for use, using the bundled one.") luajit_use_bundled() endif() else() message (FATAL_ERROR "Not found a system LuaJIT") #luajit_use_bundled() endif() endmacro() # # Check if there is a usable LuaJIT at the given prefix path. # macro (luajit_try_prefix) find_path (LUAJIT_INCLUDE "lua.h" ${LUAJIT_PREFIX} NO_DEFAULT_PATH) find_library (LUAJIT_LIB "luajit" ${LUAJIT_PREFIX} NO_DEFAULT_PATH) if (LUAJIT_INCLUDE AND LUAJIT_LIB) include_directories("${LUAJIT_INCLUDE}") luajit_test() if (LUAJIT_RUNS) message (STATUS "LuaJIT at ${LUAJIT_PREFIX} is suitable for use.") else() message (FATAL_ERROR "LuaJIT at ${LUAJIT_PREFIX} is NOT suitable for use.") endif() else() message (FATAL_ERROR "Couldn't find LuaJIT in '${LUAJIT_PREFIX}'") endif() endmacro() # # LuaJIT options. # option(ENABLE_BUNDLED_LUAJIT "Enable building of the bundled LuaJIT" ON) option(LUAJIT_PREFIX "Build with LuaJIT at the given path" "") if (LUAJIT_PREFIX AND ENABLE_BUNDLED_LUAJIT) message (FATAL_ERROR "Options LUAJIT_PREFIX and ENABLE_BUNDLED_LUAJIT " "are not compatible with each other.") endif() if (LUAJIT_PREFIX) # trying to build with specified LuaJIT. luajit_try_prefix() elseif (NOT ENABLE_BUNDLED_LUAJIT) # trying to build with system LuaJIT, macro can turn on # building of LuaJIT bundled with the server source. luajit_try_system() else() luajit_use_bundled() endif() unset (LUAJIT_RUNS) include_directories("${LUAJIT_INCLUDE}") message (STATUS "Use LuaJIT includes: ${LUAJIT_INCLUDE}") message (STATUS "Use LuaJIT library: ${LUAJIT_LIB}") macro(luajit_build) set (luajit_buildoptions BUILDMODE=static) set (luajit_copt "") if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") set (luajit_buildoptions ${luajit_buildoptions} CCDEBUG=${CC_DEBUG_OPT}) set (luajit_copt ${luajit_copt} -O1) set (luajit_buildoptions ${luajit_buildoptions} XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT') else () set (luajit_copt ${luajit_copt} -O2) endif() set (luajit_copt ${luajit_copt} -I${PROJECT_SOURCE_DIR}/libobjc) set (luajit_target_cc "${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS}") # Use external unwind on all platforms. set (luajit_target_cc "${luajit_target_cc} -DLUAJIT_UNWIND_EXTERNAL=1") if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) # Regular mode - use CMake compiler for building host utils. set (luajit_host_cc ${CMAKE_C_COMPILER}) else() # Crosscompile mode - use a host CC compiler for building host utils. # Since CMake does not support cross compilation properly # we have to use system CC here. set (luajit_host_cc "cc") endif() if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64" AND ${CMAKE_SIZEOF_VOID_P} EQUAL 4) # The host compiler must have same pointer size as the target compiler. set (luajit_host_cc "${luajit_host_cc} -m32") endif() set(luajit_ldflags "${CMAKE_SHARED_LINKER_FLAGS}") separate_arguments(luajit_copt) separate_arguments(luajit_ldflags) separate_arguments(luajit_host_cc) separate_arguments(luajit_target_cc) set (luajit_buildoptions ${luajit_buildoptions} CFLAGS="" CXXFLAGS="" HOST_CC="${luajit_host_cc}" TARGET_CC="${luajit_target_cc}" CCOPT="${luajit_copt}") set (luajit_buildoptions ${luajit_buildoptions} Q='' LDFLAGS="${luajit_ldflags}") if (${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/third_party/luajit COMMAND $(MAKE) ${luajit_buildoptions} clean COMMAND $(MAKE) -C src ${luajit_buildoptions} libluajit.a DEPENDS ${CMAKE_SOURCE_DIR}/CMakeCache.txt ) else() add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/third_party/luajit" ) add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/third_party/luajit COMMAND cp -r ${PROJECT_SOURCE_DIR}/third_party/luajit/* . COMMAND $(MAKE) ${luajit_buildoptions} clean COMMAND $(MAKE) -C src ${luajit_buildoptions} libluajit.a DEPENDS ${PROJECT_BINARY_DIR}/CMakeCache.txt ${PROJECT_BINARY_DIR}/third_party/luajit ) endif() add_custom_target(libluajit DEPENDS ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a ) add_dependencies(build_bundled_libs libluajit) unset (luajit_buildoptions) endmacro() # # Building shipped luajit only if there is no # usable system one (see cmake/luajit.cmake) or by demand. # if (ENABLE_BUNDLED_LUAJIT) luajit_build() endif() tarantool-1.5.1.218.g1a69fd6/cmake/package.cmake0000664000000000000000000000515112242653271017443 0ustar rootroot # # List generators # set (CPACK_GENERATOR "TGZ") set (CPACK_SOURCE_GENERATOR "TGZ") # # Ignoring generated files # set (CPACK_SOURCE_IGNORE_FILES "\\\\.git" "_CPack_Packages" "CMakeCache.txt" "CPackSourceConfig.cmake" "CPackConfig.cmake" "CMakeFiles" "\\\\.gz" "\\\\.Z" "\\\\.zip" "\\\\.rpm" "\\\\.o" "\\\\.so" "\\\\.a" "client/tarantool/tarantool" "src/box/tarantool_box" "install_manifest.txt" "cmake_install.cmake" "test/var/" ) set (CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}" "${CMAKE_SOURCE_DIR}/Makefile" "${CMAKE_SOURCE_DIR}/test/Makefile" "${CMAKE_SOURCE_DIR}/test/lib/Makefile" "${CMAKE_SOURCE_DIR}/client/Makefile" "${CMAKE_SOURCE_DIR}/client/tarantool/Makefile" "${CMAKE_SOURCE_DIR}/third_party/Makefile" "${CMAKE_SOURCE_DIR}/third_party/gopt/Makefile" "${CMAKE_SOURCE_DIR}/third_party/memcached/doc/Makefile" "${CMAKE_SOURCE_DIR}/third_party/coro/Makefile" "${CMAKE_SOURCE_DIR}/connector/Makefile" "${CMAKE_SOURCE_DIR}/connector/c/Makefile" "${CMAKE_SOURCE_DIR}/connector/c/include/Makefile" "${CMAKE_SOURCE_DIR}/connector/c/tnt/Makefile" "${CMAKE_SOURCE_DIR}/connector/c/tntnet/Makefile" "${CMAKE_SOURCE_DIR}/connector/c/tntsql/Makefile" "${CMAKE_SOURCE_DIR}/connector/c/tntrp/Makefile" "${CMAKE_SOURCE_DIR}/src/Makefile" "${CMAKE_SOURCE_DIR}/src/box/Makefile" "${CMAKE_SOURCE_DIR}/cfg/Makefile" "${CMAKE_SOURCE_DIR}/src/Makefile" "${CMAKE_SOURCE_DIR}/extra/Makefile" "${CMAKE_SOURCE_DIR}/doc/Makefile" "${CMAKE_SOURCE_DIR}/doc/user/Makefile" "${CMAKE_SOURCE_DIR}/doc/developer/Makefile" "${CMAKE_SOURCE_DIR}/doc/man/Makefile" ) set (CPACK_SOURCE_PACKAGE_FILE_NAME "tarantool-${PACKAGE_VERSION}-src") # # Provide options for the binary distribution. # string (TOLOWER "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" platform) set (CPACK_PACKAGE_FILE_NAME "tarantool-${PACKAGE_VERSION}-${platform}") if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-debug") endif() if (${TARGET_OS_DARWIN}) set (CPACK_GENERATOR "PackageMaker") set (CPACK_SOURCE_GENERATOR "PackageMaker") set (CPACK_PACKAGE_VENDOR "tarantool") set (CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) set (CPACK_POSTFLIGHT_SCRIPT "${CMAKE_BINARY_DIR}/extra/postflight") set (CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/extra/dmg/DESCRIPTION.rtf") set (CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/extra/dmg/README.rtf") set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/extra/dmg/LICENSE.rtf") endif() ## include (CPack) tarantool-1.5.1.218.g1a69fd6/cmake/BuildLibEIO.cmake0000664000000000000000000000162512202131537020065 0ustar rootroot# # A macro to build the bundled libeio macro(libeio_build) set(eio_compile_flags) set(eio_compile_flags "${eio_compile_flags} -Wno-unused-value") set(eio_compile_flags "${eio_compile_flags} -Wno-dangling-else") set(eio_compile_flags "${eio_compile_flags} -DENABLE_BUNDLED_LIBEIO=1") set(eio_compile_flags "${eio_compile_flags} -DEIO_STACKSIZE=0") set(eio_src ${PROJECT_SOURCE_DIR}/third_party/tarantool_eio.c ) add_library(eio STATIC ${eio_src}) set_target_properties(eio PROPERTIES COMPILE_FLAGS "${eio_compile_flags}") set(LIBEIO_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party) set(LIBEIO_LIBRARIES eio) message(STATUS "Use bundled libeio includes: " "${LIBEIO_INCLUDE_DIR}/tarantool_eio.h") message(STATUS "Use bundled libeio library: " "${LIBEIO_LIBRARIES}") unset(eio_src) unset(eio_compile_flags) endmacro(libeio_build) tarantool-1.5.1.218.g1a69fd6/cmake/profile.cmake0000664000000000000000000000206712202131537017503 0ustar rootrootcheck_library_exists (gcov __gcov_flush "" HAVE_GCOV) set(ENABLE_GCOV_DEFAULT OFF) option(ENABLE_GCOV "Enable integration with gcov, a code coverage program" ${ENABLE_GCOV_DEFAULT}) if (ENABLE_GCOV) if (NOT HAVE_GCOV) message (FATAL_ERROR "ENABLE_GCOV option requested but gcov library is not found") endif() add_compile_flags("C;CXX" "-fprofile-arcs" "-ftest-coverage" ) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs") set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ftest-coverage") set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs") set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage") # add_library(gcov SHARED IMPORTED) endif() if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") set(ENABLE_GPROF_DEFAULT ON) else() set(ENABLE_GPROF_DEFAULT OFF) endif() option(ENABLE_GPROF "Enable integration with gprof, a performance analyzing tool" ${GPROF_DEFAULT}) if (ENABLE_GPROF) add_compile_flags("C;CXX" "-pg") endif() tarantool-1.5.1.218.g1a69fd6/cmake/BuildLibGOPT.cmake0000664000000000000000000000072712202131537020224 0ustar rootroot# # A macro to build the bundled libgopt macro(libgopt_build) set(gopt_src ${PROJECT_SOURCE_DIR}/third_party/gopt/gopt.c) add_library(gopt STATIC ${gopt_src}) set(LIBGOPT_INCLUDE_DIR ${PROJECT_BINARY_DIR}/third_party/gopt) set(LIBGOPT_LIBRARIES gopt) message(STATUS "Use bundled libgopt includes: ${LIBGOPT_INCLUDE_DIR}/gopt.h") message(STATUS "Use bundled libgopt library: ${LIBGOPT_LIBRARIES}") unset(gopt_src) endmacro(libgopt_build) tarantool-1.5.1.218.g1a69fd6/cmake/simd.cmake0000664000000000000000000000301512202131537016771 0ustar rootrootif (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|^i[3,9]86$") return() endif() # # Check compiler for SSE2 intrinsics # if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG ) set(CMAKE_REQUIRED_FLAGS "-msse2") check_c_source_runs(" #include int main() { __m128i a = _mm_setzero_si128(); return 0; }" CC_HAS_SSE2_INTRINSICS) endif() # # Check compiler for AVX intrinsics # if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG ) set(CMAKE_REQUIRED_FLAGS "-mavx") check_c_source_runs(" #include int main() { __m256i a = _mm256_setzero_si256(); return 0; }" CC_HAS_AVX_INTRINSICS) endif() if ((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") AND CC_HAS_SSE2_INTRINSICS) # any amd64 supports sse2 instructions set(ENABLE_SSE2_DEFAULT ON) else() set(ENABLE_SSE2_DEFAULT OFF) endif() option(ENABLE_SSE2 "Enable compile-time SSE2 support." ${ENABLE_SSE2_DEFAULT}) option(ENABLE_AVX "Enable compile-time AVX support." OFF) if (ENABLE_SSE2) if (!CC_HAS_SSE2_INTRINSICS) message( SEND_ERROR "SSE2 is enabled, but is not supported by compiler.") else() add_compile_flags("C;CXX" "-msse2") message(STATUS "SSE2 is enabled - target CPU must support it") endif() endif() if (ENABLE_AVX) if (!CC_HAS_AVX_INTRINSICS) message(SEND_ERROR "AVX is enabled") else() add_compile_flags("C;CXX" "-mavx") message(STATUS "AVX is enabled - target CPU must support it") endif() endif() tarantool-1.5.1.218.g1a69fd6/cmake/rpm.cmake0000664000000000000000000000350712202131537016641 0ustar rootroot find_program(RPMBUILD rpmbuild) find_program(MKDIR mkdir) find_program(CP cp) find_program(WC wc) execute_process (COMMAND ${GIT} describe HEAD --abbrev=0 OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process (COMMAND ${GIT} rev-list --oneline ${VERSION}.. COMMAND ${WC} -l OUTPUT_VARIABLE RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE) set (RPM_PACKAGE_VERSION ${VERSION} CACHE STRING "" FORCE) set (RPM_PACKAGE_RELEASE ${RELEASE} CACHE STRING "" FORCE) set (RPM_SOURCE_DIRECTORY_NAME ${CPACK_SOURCE_PACKAGE_FILE_NAME} CACHE STRING "" FORCE) set (RPM_PACKAGE_SOURCE_FILE_NAME ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz CACHE STRING "" FORCE) set (RPM_ROOT "${PROJECT_BINARY_DIR}/RPM" CACHE STRING "" FORCE) set (RPM_BUILDROOT "${RPM_ROOT}/BUILDROOT" CACHE STRING "" FORCE) add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR} COMMAND $(MAKE) package_source) add_custom_command(OUTPUT ${RPM_ROOT} COMMAND ${MKDIR} -p ${RPM_ROOT}/BUILD ${RPM_ROOT}/BUILDROOT ${RPM_ROOT}/SOURCES) add_custom_target(rpm DEPENDS ${RPM_ROOT} DEPENDS ${PROJECT_SOURCE_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz COMMAND ${CP} ${PROJECT_BINARY_DIR}/${RPM_PACKAGE_SOURCE_FILE_NAME} ${RPM_ROOT}/SOURCES COMMAND ${RPMBUILD} --buildroot ${RPM_BUILDROOT} -bb ${PROJECT_SOURCE_DIR}/extra/rpm.spec WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) add_custom_target(rpm_src DEPENDS ${RPM_ROOT} DEPENDS ${PROJECT_SOURCE_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz COMMAND ${CP} ${PROJECT_BINARY_DIR}/${RPM_PACKAGE_SOURCE_FILE_NAME} ${RPM_ROOT}/SOURCES COMMAND ${RPMBUILD} --buildroot ${RPM_BUILDROOT} -bs ${PROJECT_SOURCE_DIR}/extra/rpm.spec WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) tarantool-1.5.1.218.g1a69fd6/cmake/luatest.cpp0000664000000000000000000000501412202131537017221 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Find out LuaJIT behavior on the current platform. * * LuaJIT uses different stack unwinding mechanisms on 32-bit x86 * and 64-bit x86-64 hardware: on a 32-bit system it can use * its own * longjmp-style "internal stack unwinding". * Among other things, this mechanism doesn't support exception * propagation from Lua panic function (lua_atpanic()), and * this is exactly what Tarantool does: throws an exception * in lua_atpanic(). * * Which mechanism to use is determined at library * compile time, by a set of flags * (-fexceptions -funwind-tables -DLUAJIT_UNWIND_EXTERNAL), * hence, when configuring, we can't just check the library file * to find out whether or not it will work. * Instead, we compile and run this test. * * http://lua-users.org/lists/lua-l/2010-04/msg00470.html */ #include #include static int panic = 0; static int lua_panic_cb(lua_State *L) { if (!panic++) throw 0; abort(); return 0; } int main(int argc, char * argv[]) { lua_State *L = luaL_newstate(); if (L == NULL) return 1; lua_atpanic(L, lua_panic_cb); try { lua_pushstring(L, "uncallable"); lua_call(L, 0, LUA_MULTRET); } catch (...) { /* If we're lucky, we should get here. */ } lua_close(L); return 0; } tarantool-1.5.1.218.g1a69fd6/cmake/compiler.cmake0000664000000000000000000001353712231715257017672 0ustar rootroot# # Check if the same compile family is used for both C and CXX # if (NOT (CMAKE_C_COMPILER_ID STREQUAL CMAKE_CXX_COMPILER_ID)) message(WARNING "CMAKE_C_COMPILER_ID (${CMAKE_C_COMPILER_ID}) is different " "from CMAKE_CXX_COMPILER_ID (${CMAKE_CXX_COMPILER_ID})." "The final binary may be unusable.") endif() # We support building with Clang and gcc. First check # what we're using for build. # if (CMAKE_C_COMPILER_ID STREQUAL Clang) set(CMAKE_COMPILER_IS_CLANG ON) set(CMAKE_COMPILER_IS_GNUCC OFF) set(CMAKE_COMPILER_IS_GNUCXX OFF) endif() # # Check supported standards # if((NOT HAVE_STD_C11 AND NOT HAVE_STD_GNU99) OR (NOT HAVE_STD_CXX11 AND NOT HAVE_STD_GNUXX0X)) set(CMAKE_REQUIRED_FLAGS "-std=c11") check_c_source_compiles("int main(void) { return 0; }" HAVE_STD_C11) set(CMAKE_REQUIRED_FLAGS "-std=gnu99") check_c_source_compiles("int main(void) { return 0; }" HAVE_STD_GNU99) set(CMAKE_REQUIRED_FLAGS "-std=c++11") check_cxx_source_compiles("int main(void) { return 0; }" HAVE_STD_CXX11) set(CMAKE_REQUIRED_FLAGS "-std=gnu++0x") check_cxx_source_compiles("int main(void) { return 0; }" HAVE_STD_GNUXX0X) set(CMAKE_REQUIRED_FLAGS "") endif() if((NOT HAVE_STD_C11 AND NOT HAVE_STD_GNU99) OR (NOT HAVE_STD_CXX11 AND NOT HAVE_STD_GNUXX0X)) message (FATAL_ERROR "${CMAKE_C_COMPILER} should support -std=c11 or -std=gnu99. " "${CMAKE_CXX_COMPILER} should support -std=c++11 or -std=gnu++0x. " "Please consider upgrade to gcc 4.5+ or clang 3.2+.") endif() # # Perform build type specific configuration. # if (CMAKE_COMPILER_IS_GNUCC) set (CC_DEBUG_OPT "-ggdb") else() set (CC_DEBUG_OPT "-g") endif() set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CC_DEBUG_OPT} -O0") set (CMAKE_C_FLAGS_RELWITHDEBUGINFO "${CMAKE_C_FLAGS_RELWITHDEBUGINFO} ${CC_DEBUG_OPT} -O2") set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CC_DEBUG_OPT} -O0") set (CMAKE_CXX_FLAGS_RELWITHDEBUGINFO "${CMAKE_CXX_FLAGS_RELWITHDEBUGINFO} ${CC_DEBUG_OPT} -O2") unset(CC_DEBUG_OPT) # # Set flags for all include files: those maintained by us and # coming from third parties. # We must set -fno-omit-frame-pointer here, since we rely # on frame pointer when getting a backtrace, and it must # be used consistently across all object files. # The same reasoning applies to -fno-stack-protector switch. # Since we began using luajit, which uses gcc stack unwind # internally, we also need to make sure all code is compiled # with unwind info. # add_compile_flags("C;CXX" "-fno-omit-frame-pointer" "-fno-stack-protector" "-fexceptions" "-funwind-tables") if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") # Remove VALGRIND code and assertions in *any* type of release build. add_definitions("-DNDEBUG" "-DNVALGRIND") endif() macro(enable_tnt_compile_flags) # Tarantool code is written in GNU C dialect. # Additionally, compile it with more strict flags than the rest # of the code. # Set standard if (HAVE_STD_C11) add_compile_flags("C" "-std=c11") else() add_compile_flags("C" "-std=gnu99") endif() if (HAVE_STD_CXX11) add_compile_flags("CXX" "-std=c++11") else() add_compile_flags("CXX" "-std=gnu++0x") endif() # Disable Run-time type information add_compile_flags("CXX" "-fno-rtti") add_compile_flags("C;CXX" "-Wall" "-Wextra" "-Wno-sign-compare" "-Wno-strict-aliasing" ) if (CMAKE_COMPILER_IS_GNUCXX) # G++ bug. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31488 add_compile_flags("CXX" "-Wno-invalid-offsetof" ) endif() add_definitions("-D__STDC_FORMAT_MACROS=1") add_definitions("-D__STDC_LIMIT_MACROS=1") add_definitions("-D__STDC_CONSTANT_MACROS=1") # Only add -Werror if it's a debug build, done by developers. # Release builds should not cause extra trouble. if ((${CMAKE_BUILD_TYPE} STREQUAL "Debug") AND HAVE_STD_C11 AND HAVE_STD_CXX11) add_compile_flags("C;CXX" "-Werror") endif() endmacro(enable_tnt_compile_flags) # # GCC started to warn for unused result starting from 4.2, and # this is when it introduced -Wno-unused-result # GCC can also be built on top of llvm runtime (on mac). # check_c_compiler_flag("-Wno-unused-result" CC_HAS_WNO_UNUSED_RESULT) check_c_compiler_flag("-Wno-unused-value" CC_HAS_WNO_UNUSED_VALUE) check_c_compiler_flag("-fno-strict-aliasing" CC_HAS_FNO_STRICT_ALIASING) check_c_compiler_flag("-Wno-comment" CC_HAS_WNO_COMMENT) check_c_compiler_flag("-Wno-parentheses" CC_HAS_WNO_PARENTHESES) if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC) set(HAVE_BUILTIN_CTZ 1) set(HAVE_BUILTIN_CTZLL 1) set(HAVE_BUILTIN_CLZ 1) set(HAVE_BUILTIN_CLZLL 1) set(HAVE_BUILTIN_POPCOUNT 1) set(HAVE_BUILTIN_POPCOUNTLL 1) set(HAVE_BUILTIN_BSWAP32 1) set(HAVE_BUILTIN_BSWAP64 1) else() set(HAVE_BUILTIN_CTZ 0) set(HAVE_BUILTIN_CTZLL 0) set(HAVE_BUILTIN_CLZ 0) set(HAVE_BUILTIN_CLZLL 0) set(HAVE_BUILTIN_POPCOUNT 0) set(HAVE_BUILTIN_POPCOUNTLL 0) set(HAVE_BUILTIN_BSWAP32 0) set(HAVE_BUILTIN_BSWAP64 0) endif() if (NOT HAVE_BUILTIN_CTZ OR NOT HAVE_BUILTIN_CTZLL) # Check if -D_GNU_SOURCE has been defined and add this flag to # CMAKE_REQUIRED_DEFINITIONS in order to get check_prototype_definition work get_property(var DIRECTORY PROPERTY COMPILE_DEFINITIONS) list(FIND var "_GNU_SOURCE" var) if (NOT var EQUAL -1) set(CMAKE_REQUIRED_FLAGS "-Wno-error") set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") check_c_source_compiles("#include \n#include \nint main(void) { return ffsl(0L); }" HAVE_FFSL) check_c_source_compiles("#include \n#include \nint main(void) { return ffsll(0UL); }" HAVE_FFSLL) endif() endif() tarantool-1.5.1.218.g1a69fd6/cmake/FindReadline.cmake0000664000000000000000000000146412202131537020367 0ustar rootroot# - Find the readline include files and libraries # - Include finding of termcap or curses # # READLINE_FOUND # READLINE_INCLUDE_DIR # READLINE_LIBRARIES # include(FindTermcap) FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h) SET(READLINE_FOUND FALSE) IF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) SET (READLINE_FOUND TRUE) SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY}) MESSAGE(STATUS "Found GNU readline: ${READLINE_READLINE_LIBRARY}") IF (TERMCAP_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY}) ENDIF (TERMCAP_FOUND) ENDIF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) MARK_AS_ADVANCED( READLINE_FOUND READLINE_INCLUDE_DIR READLINE_LIBRARIES ) tarantool-1.5.1.218.g1a69fd6/cmake/BuildLibCJSON.cmake0000664000000000000000000000107012202131537020317 0ustar rootroot# # A macro to build the bundled liblua-cjson macro(libcjson_build) set(cjson_src ${PROJECT_SOURCE_DIR}/third_party/lua-cjson/lua_cjson.c ${PROJECT_SOURCE_DIR}/third_party/lua-cjson/strbuf.c ${PROJECT_SOURCE_DIR}/third_party/lua-cjson/fpconv.c) add_library(cjson STATIC ${cjson_src}) set(LIBCJSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/lua-cjson) set(LIBCJSON_LIBRARIES cjson) message(STATUS "Use bundled Lua-CJSON library: ${LIBCJSON_LIBRARIES}") unset(lua_cjson_src) endmacro(libcjson_build) tarantool-1.5.1.218.g1a69fd6/cmake/BuildLibCORO.cmake0000664000000000000000000000074312202131537020213 0ustar rootroot# # A macro to build the bundled libcoro macro(libcoro_build) set(coro_src ${PROJECT_SOURCE_DIR}/third_party/coro/coro.c ) add_library(coro STATIC ${coro_src}) set(LIBCORO_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/coro) set(LIBCORO_LIBRARIES coro) message(STATUS "Use bundled libcoro includes: ${LIBCORO_INCLUDE_DIR}/coro.h") message(STATUS "Use bundled libcoro library: ${LIBCORO_LIBRARIES}") unset(coro_src) endmacro(libcoro_build) tarantool-1.5.1.218.g1a69fd6/cmake/FindLibEIO.cmake0000664000000000000000000000113612202131537017703 0ustar rootrootfind_path(LIBEIO_INCLUDE_DIR NAMES eio.h) find_library(LIBEIO_LIBRARIES NAMES eio) if(LIBEIO_INCLUDE_DIR AND LIBEIO_LIBRARIES) set(LIBEIO_FOUND ON) endif(LIBEIO_INCLUDE_DIR AND LIBEIO_LIBRARIES) if(LIBEIO_FOUND) if (NOT LIBEIO_FIND_QUIETLY) message(STATUS "Found libeio includes: ${LIBEIO_INCLUDE_DIR}/eio.h") message(STATUS "Found libeio library: ${LIBEIO_LIBRARIES}") endif (NOT LIBEIO_FIND_QUIETLY) else(LIBEIO_FOUND) if (LIBEIO_FIND_REQUIRED) message(FATAL_ERROR "Could not find libeio development files") endif (LIBEIO_FIND_REQUIRED) endif (LIBEIO_FOUND) tarantool-1.5.1.218.g1a69fd6/cmake/FindOptionalPackage.cmake0000664000000000000000000000262312212057124021703 0ustar rootrootif (NOT _OptionalPackagesFile) set(_OptionalPackagesFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OptionalPackages.txt) if (EXISTS ${_OptionalPackagesFile}) file(REMOVE ${_OptionalPackagesFile}) endif() endif() file(APPEND "${_OptionalPackagesFile}" "") macro (find_optional_package _package) string(TOUPPER ${_package} _packageUpper) if (NOT DEFINED WITH_${_packageUpper}) # First run and WITH_${_packageUpper} option is not set by the user. # Enable auto-mode and try to find package. find_package(${_package} ${ARGN}) elseif (WITH_${_packageUpper}) # Non-first run or WITH_${_packageUpper} was set by the user. # Force error if the package will not be found. set(${_packageUpper}_FIND_REQUIRED ON) find_package(${_package} ${ARGN}) endif () if (${_package}_FOUND OR ${_packageUpper}_FOUND) set(_default ON) else() set(_default OFF) endif() # Add the user option and (!) update the cache option(WITH_${_packageUpper} "Search for ${_package} package" ${_default}) # Now ${WITH_${_packageUpper}} is either ON or OFF file(APPEND "${_OptionalPackagesFile}" "-- WITH_${_packageUpper}=${WITH_${_packageUpper}}\n") endmacro (find_optional_package) macro(list_optional_packages) file(READ ${_OptionalPackagesFile} _message) message(STATUS "\n${_message}") endmacro() tarantool-1.5.1.218.g1a69fd6/cmake/FindTermcap.cmake0000664000000000000000000000061512202131537020234 0ustar rootroot# find Termcap includes and library # # TERMCAP_FOUND # TERMCAP_LIBRARY # TERMCAP_INCLUDE_DIR FIND_LIBRARY(TERMCAP_LIBRARY NAMES termcap) FIND_PATH(TERMCAP_INCLUDE_DIR NAMES termcap.h) SET (TERMCAP_FOUND FALSE) IF (TERMCAP_LIBRARY) SET (TERMCAP_FOUND TRUE) MESSAGE(STATUS "Found Termcap: ${TERMCAP_LIBRARY}") ENDIF () MARK_AS_ADVANCED( TERMCAP_FOUND TERMCAP_LIBRARY TERMCAP_INCLUDE_DIR ) tarantool-1.5.1.218.g1a69fd6/cmake/FindLibEV.cmake0000664000000000000000000000111012202131537017571 0ustar rootrootfind_path(LIBEV_INCLUDE_DIR NAMES ev.h) find_library(LIBEV_LIBRARIES NAMES ev) if(LIBEV_INCLUDE_DIR AND LIBEV_LIBRARIES) set(LIBEV_FOUND ON) endif(LIBEV_INCLUDE_DIR AND LIBEV_LIBRARIES) if(LIBEV_FOUND) if (NOT LIBEV_FIND_QUIETLY) message(STATUS "Found libev includes: ${LIBEV_INCLUDE_DIR}/ev.h") message(STATUS "Found libev library: ${LIBEV_LIBRARIES}") endif (NOT LIBEV_FIND_QUIETLY) else(LIBEV_FOUND) if (LIBEV_FIND_REQUIRED) message(FATAL_ERROR "Could not find libev development files") endif (LIBEV_FIND_REQUIRED) endif (LIBEV_FOUND) tarantool-1.5.1.218.g1a69fd6/cmake/utils.cmake0000664000000000000000000000427212231715257017214 0ustar rootrootmacro(add_compile_flags langs) foreach(_lang ${langs}) string (REPLACE ";" " " _flags "${ARGN}") set ("CMAKE_${_lang}_FLAGS" "${CMAKE_${_lang}_FLAGS} ${_flags}") unset (${_lang}) unset (${_flags}) endforeach() endmacro(add_compile_flags) macro(set_source_files_compile_flags) foreach(file ${ARGN}) get_filename_component(_file_ext ${file} EXT) set(_lang "") if ("${_file_ext}" STREQUAL ".m") set(_lang OBJC) # CMake believes that Objective C is a flavor of C++, not C, # and uses g++ compiler for .m files. # LANGUAGE property forces CMake to use CC for ${file} set_source_files_properties(${file} PROPERTIES LANGUAGE C) elseif("${_file_ext}" STREQUAL ".mm") set(_lang OBJCXX) endif() if (_lang) get_source_file_property(_flags ${file} COMPILE_FLAGS) if ("${_flags}" STREQUAL "NOTFOUND") set(_flags "${CMAKE_${_lang}_FLAGS}") else() set(_flags "${_flags} ${CMAKE_${_lang}_FLAGS}") endif() # message(STATUS "Set (${file} ${_flags}") set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "${_flags}") endif() endforeach() unset(_file_ext) unset(_lang) endmacro(set_source_files_compile_flags) # A helper function to compile *.lua source into *.lua.c sources function(lua_source varname filename) set (srcfile "${CMAKE_CURRENT_SOURCE_DIR}/${filename}") set (tmpfile "${CMAKE_CURRENT_BINARY_DIR}/${filename}.new.c") set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/${filename}.c") get_filename_component(module ${filename} NAME_WE) ADD_CUSTOM_COMMAND(OUTPUT ${dstfile} COMMAND ${ECHO} 'const char ${module}_lua[] =' > ${tmpfile} COMMAND ${CMAKE_BINARY_DIR}/extra/txt2c ${srcfile} >> ${tmpfile} COMMAND ${ECHO} '\;' >> ${tmpfile} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${tmpfile} ${dstfile} COMMAND ${CMAKE_COMMAND} -E remove ${tmpfile} DEPENDS ${srcfile} txt2c) set(var ${${varname}}) set(${varname} ${var} ${dstfile} PARENT_SCOPE) endfunction() tarantool-1.5.1.218.g1a69fd6/extra/0000775000000000000000000000000012242653271015107 5ustar rootroottarantool-1.5.1.218.g1a69fd6/extra/cmake_install.cmake0000664000000000000000000000225112213333034020705 0ustar rootroot# Install script for directory: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/extra # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) IF(BUILD_TYPE) STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) SET(CMAKE_INSTALL_CONFIG_NAME "Debug") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) # Set the component getting installed. IF(NOT CMAKE_INSTALL_COMPONENT) IF(COMPONENT) MESSAGE(STATUS "Install component: \"${COMPONENT}\"") SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") ELSE(COMPONENT) SET(CMAKE_INSTALL_COMPONENT) ENDIF(COMPONENT) ENDIF(NOT CMAKE_INSTALL_COMPONENT) # Install shared libraries without execute permission? IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) tarantool-1.5.1.218.g1a69fd6/extra/org.tarantool.in0000664000000000000000000000201312242653271020224 0ustar rootroot StandardOutPath /var/log/tarantool_@TARANTOOL_PRODUCT@.log StandardErrorPath /var/log/tarantool_@TARANTOOL_PRODUCT@.log WorkingDirectory @CMAKE_INSTALL_PREFIX@ EnvironmentVariables PATH @CMAKE_INSTALL_PREFIX@/bin:/bin:/sbin:/opt/bin KeepAlive SuccessfulExit Label @DARWIN_PACKAGE_ID@.@CPACK_PACKAGE_VENDOR@.tarantool_@TARANTOOL_PRODUCT@ ProgramArguments tarantool_@TARANTOOL_PRODUCT@ --config=@CMAKE_INSTALL_PREFIX@/etc/tarantool.cfg RunAtLoad tarantool-1.5.1.218.g1a69fd6/extra/tarantool_multi.sh0000775000000000000000000000177312202131537020663 0ustar rootroot#!/bin/sh -x # A wrapper script to run a single tarantool instance # and restart it when it crashes export PATH=$PATH:/usr/bin NAME="tarantool_box" BINARY="/usr/bin/${NAME}" INST=$(basename $0 .sh) CONF="/etc/tarantool/${INST}.cfg" LOGDIR="/var/${INST}/logs" WRAP_PIDFILE="/var/${INST}/wrapper.pid" # set to get restart emails #MAILTO="" exec <&- report() { if [ "${MAILTO}" ]; then tail -n 500 ${LOGDIR}/tarantool.log | mail ${MAILTO} -s "\"${INST} is restarted\"" fi echo \""${@}"\" >> ${LOGDIR}/wrapper.log } runtarantool() { ulimit -n 40960 ${BINARY} ${OPTIONS} --config ${CONF} 2>&1 ${WRAP_PIDFILE} tarantool-1.5.1.218.g1a69fd6/extra/logger.pl0000664000000000000000000000053012202131537016711 0ustar rootroot#!/usr/bin/perl use strict; use warnings; my $log = shift or die "usage: $0 some.log\n"; my $reopen; $SIG{HUP} = sub { $reopen = 1 }; my $fh; while () { if ($reopen or not $fh) { undef $fh; undef $reopen; if (open $fh, ">>", $log) { select $fh; $| = 1; } } print; } tarantool-1.5.1.218.g1a69fd6/extra/rpm.spec0000664000000000000000000001027612213333034016555 0ustar rootroot%define _topdir /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/RPM %define _rpmdir /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/RPM BuildRoot: /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/RPM/BUILDROOT Name: tarantool Version: 1.5.1 Release: 83 Group: Applications/Databases Summary: Tarantool - an efficient in-memory data store License: BSD URL: http://tarantool.org Source0: tarantool-1.5.1-83-gf2974d6-src.tar.gz %description Tarantool is a high performance in-memory NoSQL database. It supports replication, online backup, stored procedures in Lua. This package provides the server daemon and administration scripts. # Tarantool client spec %package client Summary: Tarantool command line client with history support Group: Applications/Databases Provides: tarantool-client Obsoletes: tarantool-client %description -n tarantool-client Tarantool is a high performance in-memory NoSQL database. It supports replication, online backup, stored procedures in Lua. This package provides a command line client for Tarantool with history support. # Tarantool dev spec %package dev Summary: Tarantool C connector and header files Group: Applications/Databases #Requires: /sbin/ldconfig Provides: tarantool-dev Obsoletes: tarantool-dev %description -n tarantool-dev Tarantool is a high performance in-memory NoSQL database. It supports replication, online backup, stored procedures in Lua. This package provides Tarantool client libraries. ### %prep %setup -n tarantool-1.5.1-83-gf2974d6-src %build cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=ON -DENABLE_RPM=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SYSCONF_DIR=/etc -DCMAKE_MAN_DIR=/usr/share/man make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %post groupadd tarantool useradd -r -g tarantool tarantool # Performe a single instance setup /usr/bin/tarantool_deploy.sh --yes 1.1 %preun %files %defattr(-,root,root,-) %dir "%{_datadir}/tarantool" "%{_datadir}/tarantool/00000000000000000001.snap" %dir "%{_datadir}/doc/tarantool" "%{_datadir}/doc/tarantool/README.md" "%{_datadir}/doc/tarantool/LICENSE" "%{_datadir}/doc/tarantool/box-protocol.txt" "%{_mandir}/man1/tarantool_box.1.gz" "%{_bindir}/tarantool_box" "%{_bindir}/tarantool_multi.sh" "%{_bindir}/tarantool_deploy.sh" "/etc/init.d/tarantool_box" %dir "%{_sysconfdir}/tarantool" %config(noreplace) "%{_sysconfdir}/tarantool/tarantool.cfg" %files dev %defattr(-,root,root,-) %dir "/usr/include/tarantool" "/usr/include/tarantool/tnt.h" "/usr/include/tarantool/tnt_buf.h" "/usr/include/tarantool/tnt_call.h" "/usr/include/tarantool/tnt_delete.h" "/usr/include/tarantool/tnt_dir.h" "/usr/include/tarantool/tnt_enc.h" "/usr/include/tarantool/tnt_insert.h" "/usr/include/tarantool/tnt_io.h" "/usr/include/tarantool/tnt_iob.h" "/usr/include/tarantool/tnt_iter.h" "/usr/include/tarantool/tnt_lex.h" "/usr/include/tarantool/tnt_log.h" "/usr/include/tarantool/tnt_mem.h" "/usr/include/tarantool/tnt_net.h" "/usr/include/tarantool/tnt_opt.h" "/usr/include/tarantool/tnt_ping.h" "/usr/include/tarantool/tnt_proto.h" "/usr/include/tarantool/tnt_queue.h" "/usr/include/tarantool/tnt_reply.h" "/usr/include/tarantool/tnt_request.h" "/usr/include/tarantool/tnt_rpl.h" "/usr/include/tarantool/tnt_select.h" "/usr/include/tarantool/tnt_snapshot.h" "/usr/include/tarantool/tnt_sql.h" "/usr/include/tarantool/tnt_stream.h" "/usr/include/tarantool/tnt_tuple.h" "/usr/include/tarantool/tnt_update.h" "/usr/include/tarantool/tnt_utf8.h" "/usr/include/tarantool/tnt_xlog.h" "/usr/lib/libtarantool.a" "/usr/lib/libtarantool.so" "/usr/lib/libtarantool.so.1" "/usr/lib/libtarantool.so.1.1" "/usr/lib/libtarantoolnet.a" "/usr/lib/libtarantoolnet.so" "/usr/lib/libtarantoolnet.so.1" "/usr/lib/libtarantoolnet.so.1.1" "/usr/lib/libtarantoolrpl.a" "/usr/lib/libtarantoolrpl.so" "/usr/lib/libtarantoolrpl.so.1" "/usr/lib/libtarantoolrpl.so.1.1" "/usr/lib/libtarantoolsql.a" "/usr/lib/libtarantoolsql.so" "/usr/lib/libtarantoolsql.so.1" "/usr/lib/libtarantoolsql.so.1.1" %files client %defattr(-,root,root,-) "%{_mandir}/man1/tarantool.1.gz" "%{_bindir}/tarantool" "%{_bindir}/tarancheck" "%{_bindir}/tarantar" %changelog * Mon May 20 2013 Dmitry Simonenko 1.0-1 - Initial version of the RPM spec tarantool-1.5.1.218.g1a69fd6/extra/dmg/0000775000000000000000000000000012242653271015656 5ustar rootroottarantool-1.5.1.218.g1a69fd6/extra/dmg/postflight.in0000664000000000000000000000063512242653271020375 0ustar rootroot#!/usr/bin/env sh PLIST_PRODUCT=@LUANCHD_PLIST@ LUANCHD_PLIST=/Library/LaunchDaemons/${PLIST_PRODUCT} if [ -f ${LUANCHD_PLIST} ] then launchctl unload ${LUANCHD_PLIST} rm -f ${LUANCHD_PLIST} fi cp ${3}@CMAKE_INSTALL_PREFIX@/share/tarantool/${PLIST_PRODUCT} ${LUANCHD_PLIST} if [ -f ${LUANCHD_PLIST} ] then launchctl load ${LUANCHD_PLIST} else echo "${LUANCHD_PLIST} could not install" exit 1 fi exit 0 tarantool-1.5.1.218.g1a69fd6/extra/dmg/LICENSE.rtf0000664000000000000000000000341312242653271017456 0ustar rootroot{\rtf1\ansi\ansicpg1252\cocoartf1265 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;\red0\green41\blue57;} \margl1440\margr1440\vieww10800\viewh8400\viewkind0 \deftab720 \pard\pardeftab720 \f0\fs24 \cf2 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ \ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ \ THIS SOFTWARE IS PROVIDED BY AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ \ Copyright (C) 2010-2013 Tarantool AUTHORS:\ \ Aleksey Demakov, Aleksey Mashanov, Alexandre Kalendarev,\ Damien Lefortier, Dmitry E. Oboukhov, Dmitry Simonenko,\ Konstantin Osipov, Konstantin Shulgin, Mons Anderson,\ Pavel Cherenkov, Roman Antipin, Roman Tokarev, Roman Tsisyk,\ Teodor Sigaev, Timofey Khryukin, Yuriy Nevinitsin, Yuriy Vostrikov\ Veniamin Gvozdikov\ }tarantool-1.5.1.218.g1a69fd6/extra/dmg/README.rtf0000664000000000000000000000715412242653271017337 0ustar rootroot{\rtf1\ansi\ansicpg1252\cocoartf1265 {\fonttbl\f0\froman\fcharset0 Times-Roman;} {\colortbl;\red255\green255\blue255;\red26\green26\blue26;\red48\green48\blue48;} \margl1440\margr1440\vieww12600\viewh7800\viewkind0 \deftab720 \pard\pardeftab720\sa298 \f0\b\fs24 \cf2 What is Tarantool?\ \pard\pardeftab720\sa380 \b0 \cf2 Tarantool is an in-memory NoSQL database. The code is available for free under the terms of {\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/license-list.html#ModifiedBSD"}}{\fldrslt \i \ul \ulc3 BSD license}}. Supported platforms are GNU/Linux, Mac OS and FreeBSD.\ \pard\pardeftab720\sa298 \b \cf2 An overview of the architecture\ \pard\pardeftab720\sa380 \b0 \cf2 The server \b maintains all its data in random-access memory \b0 , and therefore has very low read latency. At the same time, a copy of the data is kept on non-volatile storage (a disk drive), and inserts and updates are performed atomically.\ To ensure atomicity, consistency and crash-safety of the persistent copy, a write-ahead log (WAL) is maintained, and each change is recorded in the WAL before it is considered complete. The logging subsystem supports group commit.\ If update and delete rate is high, a constantly growing write-ahead log file (or files) can pose a disk space problem, and significantly increase time necessary to restart from disk. A simple solution is employed: the server \b can be requested to save a concise snapshot \b0 of its current data. The underlying operating system's \'93copy-on-write\'94 feature is employed to take the snapshot in a quick, resource-savvy and non-blocking manner. The \'93copy-on-write\'94 technique guarantees that snapshotting has minimal impact on server performance.\ \pard\pardeftab720\sa380 \b \cf2 Tarantool is lock-free \b0 . Instead of the operating system's concurrency primitives, such as threads and mutexes, Tarantool uses a cooperative multitasking environment to simultaneously operate on thousands of connections. A fixed number of independent execution threads within the server do not share state, but exchange data using low overhead message queues. While this approach limits server scalability to a few CPU cores, it removes competition for the memory bus and sets the scalability limit to the top of memory and network throughput. CPU utilization of a typical highly-loaded Tarantool server is under 10%.\ \pard\pardeftab720\sa298 \b \cf2 Key features\ \pard\pardeftab720\sa380 \b0 \cf2 Unlike most of NoSQL databases, Tarantool supports primary, \b secondary keys, multi-part keys \b0 , HASH, TREE and BITSET index types.\ Tarantool supports \b Lua stored procedures \b0 , which can access and modify data atomically. Procedures can be created, modified and dropped at runtime.\ Use of Lua as an extension language does not end with stored procedures: Lua programs can be used during startup, to define triggers and background tasks, interact with networked peers. Unlike popular application development frameworks implemented around "reactor" pattern, networking in server-side Lua is sequential, yet very efficient, as is built on top of the cooperating multitasking environment used by the server itself.\ Extended with Lua, Tarantool typically replaces more not one but a few existing components with a single well-performing system, changing and simplifying complex multi-tier Web application architectures.\ Tarantool supports replication. Replicas may run locally or on a remote host. Tarantool replication is asynchronous and does not block writes to the master. When or if the master becomes unavailable, the replica can be switched to assume the role of the master without server restart.\ }tarantool-1.5.1.218.g1a69fd6/extra/dmg/DESCRIPTION.rtf0000664000000000000000000000274512242653271020166 0ustar rootroot{\rtf1\ansi\ansicpg1252\cocoartf1265 {\fonttbl\f0\froman\fcharset0 Times-Roman;} {\colortbl;\red255\green255\blue255;\red0\green41\blue57;} {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}} {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} \margl1440\margr1440\vieww10800\viewh8400\viewkind0 \deftab720 \pard\pardeftab720\sl480\sa321 \f0\b\fs30 \cf2 Tarantool \fs24 \ \pard\pardeftab720\sa380 \b0 \cf2 Tarantool is an in-memory database designed to store the most volatile and highly accessible web content. Tarantool has been extensively used in production since 2009. It's \b open source \b0 , BSD licensed.\ \pard\pardeftab720\sa241 \b \cf2 Features\ \pard\tx220\tx720\pardeftab720\li720\fi-720 \ls1\ilvl0 \b0 \cf2 {\listtext \'95 }{\field{\*\fldinst{HYPERLINK "http://tarantool.org/benchmark.html"}}{\fldrslt \ul lowest CPU overhead}} to store or serve a piece of content,\ {\listtext \'95 }optional Write Ahead Logging for persistency and reliability,\ {\listtext \'95 }universal data access with {\field{\*\fldinst{HYPERLINK "http://github.com/mailru/tntlua"}}{\fldrslt \ul rich Lua stored procedures}}, which can exchange messages between each other or networked peers,\ {\listtext \'95 }asynchronous master-slave replication and hot backup.\ }tarantool-1.5.1.218.g1a69fd6/extra/CMakeLists.txt0000664000000000000000000000316412242653271017653 0ustar rootroot # # Scripts for a RPM package # if (ENABLE_RPM) # chmod +x 655 install (FILES tarantool_box DESTINATION ${CMAKE_SYSCONF_DIR}/init.d PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # chmod +x 755 install (FILES tarantool_multi.sh DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # chmod +x 755 install (FILES tarantool_deploy.sh DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() configure_file(rpm.spec.in rpm.spec @ONLY) if (TARGET_OS_DARWIN) # NOTE: need add execution 'plutil -lint org.tarantool.tarantool_${TARANTOOL_PRODUCT}.plist # to check syntax of plist file. # Also cmake doesn't support changing package id from 'com.' to 'org.' # Need chage to 'org.' after update lines this file: # https://github.com/Kitware/CMake/blob/v2.8.11.2/Source/CPack/cmCPackPackageMakerGenerator.cxx#L763 # # ^^^ DO NOT CHANGE DARWIN_PACKAGE_ID BEFORE SEE URL ABOVE ^^^ # set (DARWIN_PACKAGE_ID "com") set (LUANCHD_PLIST "${DARWIN_PACKAGE_ID}.${CPACK_PACKAGE_VENDOR}.tarantool_${TARANTOOL_PRODUCT}.plist") # Configure scripts for *.pkg and luanchd daemon by templates configure_file(dmg/postflight.in postflight @ONLY) configure_file(org.tarantool.in ${LUANCHD_PLIST} @ONLY) # chmod +x 644 install (FILES ${CMAKE_BINARY_DIR}/extra/${LUANCHD_PLIST} DESTINATION share/tarantool PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_READ WORLD_READ WORLD_READ) endif() add_executable(txt2c txt2c.c) tarantool-1.5.1.218.g1a69fd6/extra/Makefile0000664000000000000000000001776112213333034016551 0ustar rootroot# CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8 # Default target executed when no arguments are given to make. default_target: all .PHONY : default_target #============================================================================= # Special targets provided by cmake. # Disable implicit rules so canonical targets will work. .SUFFIXES: # Remove some rules from gmake that .SUFFIXES does not remove. SUFFIXES = .SUFFIXES: .hpux_make_needs_suffix_list # Suppress display of executed commands. $(VERBOSE).SILENT: # A target that is always out of date. cmake_force: .PHONY : cmake_force #============================================================================= # Set environment variables for the build. # The shell in which to execute make rules. SHELL = /bin/sh # The CMake executable. CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. RM = /usr/bin/cmake -E remove -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. CMAKE_SOURCE_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe # The top-level build directory on which CMake was run. CMAKE_BINARY_DIR = /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe #============================================================================= # Targets provided globally by CMake. # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." /usr/bin/cmake -i . .PHONY : edit_cache # Special rule for the target edit_cache edit_cache/fast: edit_cache .PHONY : edit_cache/fast # Special rule for the target install install: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install # Special rule for the target install install/fast: preinstall/fast @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." /usr/bin/cmake -P cmake_install.cmake .PHONY : install/fast # Special rule for the target install/local install/local: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake .PHONY : install/local # Special rule for the target install/local install/local/fast: install/local .PHONY : install/local/fast # Special rule for the target install/strip install/strip: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake .PHONY : install/strip # Special rule for the target install/strip install/strip/fast: install/strip .PHONY : install/strip/fast # Special rule for the target list_install_components list_install_components: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" .PHONY : list_install_components # Special rule for the target list_install_components list_install_components/fast: list_install_components .PHONY : list_install_components/fast # Special rule for the target package package: preinstall @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackConfig.cmake .PHONY : package # Special rule for the target package package/fast: package .PHONY : package/fast # Special rule for the target package_source package_source: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && /usr/bin/cpack --config ./CPackSourceConfig.cmake /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CPackSourceConfig.cmake .PHONY : package_source # Special rule for the target package_source package_source/fast: package_source .PHONY : package_source/fast # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache rebuild_cache/fast: rebuild_cache .PHONY : rebuild_cache/fast # The main all target all: cmake_check_build_system cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/extra/CMakeFiles/progress.marks cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 extra/all $(CMAKE_COMMAND) -E cmake_progress_start /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/CMakeFiles 0 .PHONY : all # The main clean target clean: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 extra/clean .PHONY : clean # The main clean target clean/fast: clean .PHONY : clean/fast # Prepare targets for installation. preinstall: all cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 extra/preinstall .PHONY : preinstall # Prepare targets for installation. preinstall/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 extra/preinstall .PHONY : preinstall/fast # clear depends depend: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend # Convenience name for target. extra/CMakeFiles/txt2c.dir/rule: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f CMakeFiles/Makefile2 extra/CMakeFiles/txt2c.dir/rule .PHONY : extra/CMakeFiles/txt2c.dir/rule # Convenience name for target. txt2c: extra/CMakeFiles/txt2c.dir/rule .PHONY : txt2c # fast build rule for target. txt2c/fast: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f extra/CMakeFiles/txt2c.dir/build.make extra/CMakeFiles/txt2c.dir/build .PHONY : txt2c/fast txt2c.o: txt2c.c.o .PHONY : txt2c.o # target to build an object file txt2c.c.o: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f extra/CMakeFiles/txt2c.dir/build.make extra/CMakeFiles/txt2c.dir/txt2c.c.o .PHONY : txt2c.c.o txt2c.i: txt2c.c.i .PHONY : txt2c.i # target to preprocess a source file txt2c.c.i: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f extra/CMakeFiles/txt2c.dir/build.make extra/CMakeFiles/txt2c.dir/txt2c.c.i .PHONY : txt2c.c.i txt2c.s: txt2c.c.s .PHONY : txt2c.s # target to generate assembly for a file txt2c.c.s: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(MAKE) -f extra/CMakeFiles/txt2c.dir/build.make extra/CMakeFiles/txt2c.dir/txt2c.c.s .PHONY : txt2c.c.s # Help Target help: @echo "The following are some of the valid targets for this Makefile:" @echo "... all (the default if no target is provided)" @echo "... clean" @echo "... depend" @echo "... edit_cache" @echo "... install" @echo "... install/local" @echo "... install/strip" @echo "... list_install_components" @echo "... package" @echo "... package_source" @echo "... rebuild_cache" @echo "... txt2c" @echo "... txt2c.o" @echo "... txt2c.i" @echo "... txt2c.s" .PHONY : help #============================================================================= # Special targets to cleanup operation of make. # Special rule to run CMake to check the build system integrity. # No rule that depends on this can have commands that come from listfiles # because they might be regenerated. cmake_check_build_system: cd /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 .PHONY : cmake_check_build_system tarantool-1.5.1.218.g1a69fd6/extra/txt2c.c0000664000000000000000000000314112202131537016306 0ustar rootroot/* * txt2c: Converts text files to C strings * * Compile with: * gcc txt2cs.c -o txt2cs * * Public domain. */ #include #include #include #include int main(int argc, char** argv) { const char *prefix = ""; const char *suffix = "\n"; int no_quote = 0; /* if 1, do not prepend and append quotation marks (") */ FILE *in = stdin; FILE *out = stdout; int c; while ((c = getopt(argc, argv, "np:s:h")) != -1) { switch (c) { case 'n': no_quote = 1; break; case 'p': prefix = optarg; break; case 's': suffix = optarg; break; case 'h': printf("Usage: %s [-n] [-p prefix] [-s suffix] [infile] [outfile]\n", argv[0]); exit(0); break; } } if (optind < argc) { if (strcmp(argv[optind], "-") != 0) { if (!(in = fopen(argv[optind], "r"))) { fprintf(stderr, "Can't open %s\n", argv[optind]); perror(argv[0]); exit(1); } } if (optind + 1 < argc) { if (strcmp(argv[optind + 1], "-") != 0) { if (!(out = fopen(argv[optind + 1], "w"))) { fprintf(stderr, "Can't open %s\n", argv[optind + 1]); perror(argv[0]); exit(1); } } } } fputs(prefix, out); if (!no_quote) fputs("\"", out); while ((c = fgetc(in)) != -1) { switch (c) { case '\0': fputs("\\0", out); break; case '\t': fputs("\\t", out); break; case '\n': fputs("\\n\"\n\"", out); break; case '\r': fputs("\\r", out); break; case '\\': fputs("\\\\", out); break; case '\"': fputs("\\\"", out); break; default: fputc(c, out); break; } } if (!no_quote) fputs("\"", out); fputs(suffix, out); return 0; } tarantool-1.5.1.218.g1a69fd6/extra/tarantool_deploy.sh0000775000000000000000000001454212231715276021035 0ustar rootroot#!/bin/sh # # Copyright (C) 2012 Mail.RU # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # # Tarantool instance deployment script # prompt_name=`basename $0` act_prompt=1 act_status=0 act_debug=0 act_dry=0 act_quiet=0 error() { echo "$prompt_name error: $*" 1>&2 exit 1 } log() { echo "$prompt_name: $*" } usage() { echo "Tarantool deployment script: add more Tarantool instances." echo "usage: tarantool_deploy.sh [options] " echo echo " --prefix installation path (/usr)" echo " --prefix_etc installation etc path (/etc)" echo " --prefix_var installation var path (/var)" echo echo " --status display deployment status" echo " --dry don't create anything, show commands" echo echo " --debug show commands" echo " --yes don't prompt" echo " --help display this usage" echo exit $1 } rollback_instance() { id=$1 workdir="${prefix_var}/tarantool_box$id" config="${prefix_etc}/tarantool/tarantool_box$id.cfg" rm -rf $workdir rm -f $config rm -f "${prefix}/bin/tarantool_box$id.sh" rm -f "${prefix_etc}/init.d/tarantool_box$id" } rollback() { log ">>> rollback changes" rollback_instance $deploy_name exit 1 } try() { cmd="$*" [ $act_debug -gt 0 ] && log "$cmd" if [ $act_dry -eq 0 ]; then eval "$cmd" if [ $? -gt 0 ]; then rollback fi fi } deploy() { id=$1 workdir="${prefix_var}/tarantool_box$id" config="${prefix_etc}/tarantool/tarantool_box$id.cfg" log ">>> deploy instance $id" # setup work environment try "mkdir -p $workdir/logs" # setup startup snapshot try "cp \"${prefix}/share/tarantool/00000000000000000001.snap\" $workdir" try "chown tarantool:tarantool -R $workdir" # setup configuration file try "cp \"${prefix_etc}/tarantool/tarantool.cfg\" $config" try 'echo work_dir = \"$workdir\" >> $config' try 'echo username = \"tarantool\" >> $config' try 'echo logger = \"cat - \>\> logs/tarantool.log\" >> $config' # setup wrapper try "ln -s \"${prefix}/bin/tarantool_multi.sh\" \"${prefix}/bin/tarantool_box$id.sh\"" # setup startup script try "ln -s \"${prefix_etc}/init.d/tarantool_box\" \"${prefix_etc}/init.d/tarantool_box$id\"" # register service [ -x /sbin/chkconfig ] && try "/sbin/chkconfig --add tarantool_box$id" } deploy_check() { id=$1 # check, if instance is already exist (configuration file, consistent way) if [ $deploy_exists -eq 1 ]; then grep "^\(${id}\)$" $deploy_cfg > /dev/null if [ $? -eq 0 ]; then [ $act_quiet -eq 0 ] && log "Instance '${id}' is already deployed." exit 0 fi fi # check, if there are any instance-related files exists that could be # accidently removed or overwritten by setup. instance_workdir="${prefix_var}/tarantool_box$id" instance_config="${prefix_etc}/tarantool/tarantool_box$id.cfg" instance_wrapper="${prefix}/bin/tarantool_box$id.sh" instance_startup="${prefix_etc}/init.d/tarantool_box$id" [ -d $instance_workdir ] && error "Instance workdir exists: '$instance_workdir'" [ -f $instance_config ] && error "Instance configuration file exists: $instance_config" [ -f $instance_wrapper ] && error "Instance wrapper file exists: $instance_wrapper" [ -f $instance_startup ] && error "Instance startup file exists: $instance_startup" } commit() { log ">>> updating deployment config" try "echo $1 >> $deploy_cfg" } # process command line arguments [ $# -eq 0 ] && usage 1 deploy_name_set=0 deploy_name="" while [ $# -ge 1 ]; do case $1 in --yes) act_prompt=0; shift 1 ;; --quiet) act_quiet=1; shift 1 ;; --prefix) prefix=$2; shift 2 ;; --prefix_var) prefix_var=$2; shift 2 ;; --prefix_etc) prefix_etc=$2; shift 2 ;; --dry) act_dry=1 ; act_debug=1 ; shift 1 ;; --debug) act_debug=1; shift 1 ;; --status) act_status=1; shift 1 ;; --help) usage 0; shift 1 ;; *) deploy_name=$1; deploy_name_set=1; break ;; esac done set ${prefix:="/usr"} set ${prefix_var:="/var"} set ${prefix_etc:="/etc"} deploy_cfg="${prefix_etc}/tarantool/tarantool_deploy.cfg" deploy_exists=0 # check deployment configuration file [ -f $deploy_cfg ] && deploy_exists=1 # do migration from old deployment (if necessary) if [ $deploy_exists -eq 0 ]; then deploy_cfg_old="/usr/local/etc/tarantool_deploy.cfg" if [ -f $deploy_cfg_old ]; then mkdir -p /etc/tarantool cp /usr/local/etc/tarantool* "${prefix_etc}/tarantool/" deploy_exists=1 fi fi # display status if [ $act_status -ne 0 ]; then if [ $deploy_exists -eq 0 ]; then log "No tarantool instances found." else log "Current instances:\n`cat $deploy_cfg`" fi exit 0 fi # check that instance name was specified [ $deploy_name_set -eq 0 ] && usage 1 # validate instance name echo $deploy_name | grep '^[[:digit:]]\+.\(1\|2\)' > /dev/null if [ $? -eq 1 ]; then error "Bad instance name format, should be e.g: 1.1, 1.2, etc." fi # check if it consistent to deploy new instance deploy_check $deploy_name # ask permission to continue if [ $act_prompt -eq 1 ]; then [ $act_dry -ne 0 ] && log "(dry mode)" log "About to deploy Tarantool instance $deploy_name." log "Continue? [n/y]" read answer case "$answer" in [Yy]) ;; *) log "Abort" exit 0 ;; esac fi deploy $deploy_name commit $deploy_name log "done" # __EOF__ tarantool-1.5.1.218.g1a69fd6/extra/rpm.spec.in0000664000000000000000000001077512242653271017200 0ustar rootroot%define _topdir @RPM_ROOT@ %define _rpmdir @RPM_ROOT@ # Require for libbfd (backtrace support) BuildRequires: binutils-devel BuildRoot: @RPM_BUILDROOT@ Name: tarantool Version: @RPM_PACKAGE_VERSION@ Release: @RPM_PACKAGE_RELEASE@ Group: Applications/Databases Summary: Tarantool - an efficient in-memory data store Vendor: tarantool.org License: BSD Requires: libgcc >= 4.1.2-50 tarantool-debug = @RPM_PACKAGE_VERSION@-@RPM_PACKAGE_RELEASE@ URL: http://tarantool.org Source0: @RPM_PACKAGE_SOURCE_FILE_NAME@ %description Tarantool is a high performance in-memory NoSQL database. It supports replication, online backup, stored procedures in Lua. This package provides the server daemon and administration scripts. # Tarantool client spec %package client Summary: Tarantool command line client with history support Vendor: tarantool.org Group: Applications/Databases Provides: tarantool-client Obsoletes: tarantool-client Requires: tarantool-debug = @RPM_PACKAGE_VERSION@-@RPM_PACKAGE_RELEASE@ %description -n tarantool-client Tarantool is a high performance in-memory NoSQL database. It supports replication, online backup, stored procedures in Lua. This package provides a command line client for Tarantool with history support. # Tarantool dev spec %package dev Summary: Tarantool C connector and header files Vendor: tarantool.org Group: Applications/Databases #Requires: /sbin/ldconfig Provides: tarantool-dev Obsoletes: tarantool-dev Requires: tarantool-debug = @RPM_PACKAGE_VERSION@-@RPM_PACKAGE_RELEASE@ %description -n tarantool-dev Tarantool is a high performance in-memory NoSQL database. It supports replication, online backup, stored procedures in Lua. This package provides Tarantool client libraries. # Tarantool debug package %debug_package ### %prep %setup -n @RPM_SOURCE_DIRECTORY_NAME@ %build cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=ON -DENABLE_RPM=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SYSCONF_DIR=/etc -DCMAKE_MAN_DIR=/usr/share/man make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %post groupadd tarantool > /dev/null 2>&1 useradd -r -g tarantool tarantool > /dev/null 2>&1 # Performe a single instance setup /usr/bin/tarantool_deploy.sh --yes --quiet 1.1 %preun %files %defattr(-,root,root,-) %dir "%{_datadir}/tarantool" "%{_datadir}/tarantool/00000000000000000001.snap" %dir "%{_datadir}/doc/tarantool" "%{_datadir}/doc/tarantool/README.md" "%{_datadir}/doc/tarantool/LICENSE" "%{_datadir}/doc/tarantool/box-protocol.txt" "%{_mandir}/man1/tarantool_box.1.gz" "%{_bindir}/tarantool_box" "%{_bindir}/tarantool_multi.sh" "%{_bindir}/tarantool_deploy.sh" "/etc/init.d/tarantool_box" %dir "%{_sysconfdir}/tarantool" %config(noreplace) "%{_sysconfdir}/tarantool/tarantool.cfg" %files dev %defattr(-,root,root,-) %dir "/usr/include/tarantool" "/usr/include/tarantool/tnt.h" "/usr/include/tarantool/tnt_buf.h" "/usr/include/tarantool/tnt_call.h" "/usr/include/tarantool/tnt_delete.h" "/usr/include/tarantool/tnt_dir.h" "/usr/include/tarantool/tnt_enc.h" "/usr/include/tarantool/tnt_insert.h" "/usr/include/tarantool/tnt_io.h" "/usr/include/tarantool/tnt_iob.h" "/usr/include/tarantool/tnt_iter.h" "/usr/include/tarantool/tnt_lex.h" "/usr/include/tarantool/tnt_log.h" "/usr/include/tarantool/tnt_mem.h" "/usr/include/tarantool/tnt_net.h" "/usr/include/tarantool/tnt_opt.h" "/usr/include/tarantool/tnt_ping.h" "/usr/include/tarantool/tnt_proto.h" "/usr/include/tarantool/tnt_queue.h" "/usr/include/tarantool/tnt_reply.h" "/usr/include/tarantool/tnt_request.h" "/usr/include/tarantool/tnt_rpl.h" "/usr/include/tarantool/tnt_select.h" "/usr/include/tarantool/tnt_snapshot.h" "/usr/include/tarantool/tnt_sql.h" "/usr/include/tarantool/tnt_stream.h" "/usr/include/tarantool/tnt_tuple.h" "/usr/include/tarantool/tnt_update.h" "/usr/include/tarantool/tnt_utf8.h" "/usr/include/tarantool/tnt_xlog.h" "/usr/lib/libtarantool.a" "/usr/lib/libtarantool.so" "/usr/lib/libtarantool.so.1" "/usr/lib/libtarantool.so.1.1" "/usr/lib/libtarantoolnet.a" "/usr/lib/libtarantoolnet.so" "/usr/lib/libtarantoolnet.so.1" "/usr/lib/libtarantoolnet.so.1.1" "/usr/lib/libtarantoolrpl.a" "/usr/lib/libtarantoolrpl.so" "/usr/lib/libtarantoolrpl.so.1" "/usr/lib/libtarantoolrpl.so.1.1" "/usr/lib/libtarantoolsql.a" "/usr/lib/libtarantoolsql.so" "/usr/lib/libtarantoolsql.so.1" "/usr/lib/libtarantoolsql.so.1.1" %files client %defattr(-,root,root,-) "%{_mandir}/man1/tarantool.1.gz" "%{_bindir}/tarantool" "%{_bindir}/tarancheck" "%{_bindir}/tarantar" %changelog * Mon May 20 2013 Dmitry Simonenko 1.0-1 - Initial version of the RPM spec tarantool-1.5.1.218.g1a69fd6/extra/tarantool_box0000664000000000000000000000546312231715276017717 0ustar rootroot#!/bin/bash # /etc/rc.d/init.d/tarantool_box # # chkconfig: 2345 99 99 # description: tarantool_box # processname: tarantool_box . /etc/init.d/functions RETVAL=0 # If we're running from sysinit, the basename is # prefixed with a prefix like: # /etc/rc3.d/S99tarantool_box1.1 -> ../init.d/tarantool_box1.1 # Filter S99 out. INST=$(basename $0 | sed 's/^[SK][0-9]\{2\}//g') export PIDFILE="/var/${INST}/box.pid" export WRAP_PIDFILE="/var/${INST}/wrapper.pid" export OPTIONS="" # This script is normally invoked via a symlink. # An own symlink is created for each instance. # E.g., in case of 4 instances, there are symlinks # tarantool0, tarantool1, tarantool2, tarantool3. # If, for some reason, this script is invoked not via # a symlink, do nothing. # if [ "${INST}" == "tarantool_box" ] then echo_failure echo exit fi checkactive() { if [ -f ${WRAP_PIDFILE} ] then ps -p $(cat ${WRAP_PIDFILE}) >/dev/null 2>&1 if [ $? -eq 0 ]; then echo -n "(instance is active)" echo_failure exit 1 fi fi if [ -f ${PIDFILE} ] then ps -p $(cat ${PIDFILE}) >/dev/null 2>&1 if [ $? -eq 0 ]; then echo -n "(instance is active)" echo_failure exit 1 fi fi } start() { echo -n $"Starting ${INST}: " checkactive /usr/bin/${INST}.sh ${OPTIONS} >> /var/${INST}/logs/init.log 2>&1 RETVAL=${?} if [ ${RETVAL} -eq 0 ] then echo_success else echo_failure fi echo return ${RETVAL} } terminate() { timeout=${1} pid=${2} kill ${pid} >/dev/null 2>&1 sleep ${timeout} ps -p ${pid} >/dev/null 2>&1 if [ $? -eq 0 ]; then sleep 10; ps -p ${pid} >/dev/null 2>&1 if [ $? -eq 0 ]; then kill -9 ${pid} sleep 3 ps -p 0 ${pid} >/dev/null 2>&1 if [ $? -eq 0 ]; then echo_failure exit 1 fi fi fi } stop() { echo -n $"Stopping $INST: " if [ -f ${WRAP_PIDFILE} ] then terminate 1 $(cat ${WRAP_PIDFILE}) rm -f ${WRAP_PIDFILE} >/dev/null 2>&1 fi if [ -f ${PIDFILE} ] then terminate 3 $(cat ${PIDFILE}) rm -f ${PIDFILE} >/dev/null 2>&1 fi echo_success echo return ${RETVAL} } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|restart}" RETVAL=1 esac exit ${RETVAL} tarantool-1.5.1.218.g1a69fd6/extra/txt2c0000775000000000000000000003141112213333044016070 0ustar rootrootELF> @@@8@$!@@@@@@@@@DD HH`H` `````@@DDPtdll@l@,,Qtd/lib64/ld-linux-x86-64.so.2GNU GNUE2E g d! @ !k|2qXK|k CBE9 3b : gUa) } p, d@ @ @i` @#`@```` @ P@ @` `w``_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTablelibc.so.6exitoptindperrorstdinfgetcgetoptstdoutfputcfputsoptargstderrfwritefprintffopen64strcmp__libc_start_main__libc_csu_fini_edata__data_start_IO_stdin_used__libc_csu_init_end__bss_startGLIBC_2.2.5Zui /0` `!` ```P`X```h`p`x``` ` ` ` ``HH HtH5z %| @%z h%r h%j h%b h%Z h%R h%J h%B hp%: h`%2 h P%* h @%" h 0% h 1I^HHPTI@HP@Hnj @G`UH-`HHw]øHt]``UH-`HHHH?HHHu]úHt]`= uUH~] @H= tHtUX`H]{vUHH@}HuHE@HE@EH/ HEH HEfEԃntnht1RptstFE=H HE0H HE#HEHHƿ@PHME̺;@HΉ*Eԃ}w ;Et HHHEHHB@Ht~] HHHEHHD@HHEH}uL+ HHHEHHH( F@HǸ>HEHH_u ;E HHHHEHHB@H HHHHEHHU@HHEH}uPd HHHHEHHH] F@HǸsHEHHHUHEHH}HEHƿ"Eԃ to t& tA"\ tbHEHW@5HEHZ@HEH]@iHEHc@LHEHf@/HEHi@HU؋EH։HEHEԃ}}uHEHƿ"HUHEHHHl$Ld$H- L% H\$Ll$Lt$L|$H8L)AIHI1 Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐHH Usage: %s [-n] [-p prefix] [-s suffix] [infile] [outfile] np:s:h-rCan't open %s w\0\t\n" "\r\\\";(4D ttzRx *zRx AC  $<HJf@Xd` @@ @Z @ @H`P`o`@8@@ ; 8`8h@@ o@oot@`` @ @ @ @ @& @6 @F @V @f @v @ @ @GCC: (Debian 4.7.3-4) 4.7.3, @v @P@.8kJpL$int>i%i5S0nLb##i#j## >#( #0 S#8 #@ #H F#P #X ` #` 7 #h / b#p \b#t >p#x F# xT# # # B&{# /# 0# 1# 2# 3-# d5b# 7# }#8#.b#u  n   fb @P@Xb3'h`]b\inPoutHcbDV:Hb% : ; I$ > $ >   I : ;  : ; I8 : ;I8 : ; I !I/ &I.? : ; ' I@B : ; I 4: ; I 4: ; I 4: ; I? < j /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/extra/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/include/x86_64-linux-gnu/bits/usr/includetxt2c.cstddef.htypes.hstdio.hlibio.hgetopt.h  @ 僃u/u000s#+2e!36/Y7x  g/Yoptindoptarg_IO_FILE_IO_save_endshort intsize_tsizetype_IO_write_ptr_flags_IO_buf_base_markers_IO_read_end/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/extrastderrlong long int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/extra/txt2c.c_lock_cur_columnprefix_posargv_sbuf_old_offsetunsigned charargcno_quotelong long unsigned int_IO_marker_shortbufGNU C 4.7.3_IO_write_base_unused2_IO_read_ptr_IO_buf_endmain_next__pad1__pad2__pad3__pad4__pad5suffixshort unsigned int_IO_write_end__off64_t_fileno_chain__off_t_IO_backup_basestdin_flags2_mode_IO_read_base_vtable_offset_IO_save_basestdout_IO_lock_twwvw.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc@#@ 1<@<$Do`@`N @0V8@8;^ot@tDko@ z@h@h8  @  @  @ D@ @|l@l,@H`HP`PX`X```0`08`8``8 00#1n=0OH`VS'#4 /a@@<@`@@8@t@@ @ h@ @ @ @@@l@@H`P`X```0`8```  X` @. @A @ @W`fP` ` @H`@@X`P````H`` 8`6 @F b`v ````@!`.B`Vk z@ P@` @` @ - G @M`crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrytxt2c.c__FRAME_END____JCR_END____init_array_end__dso_handle_DYNAMIC__init_array_start__TMC_END___GLOBAL_OFFSET_TABLE___libc_csu_fini_ITM_deregisterTMCloneTablestdout@@GLIBC_2.2.5data_startstdin@@GLIBC_2.2.5_edataoptind@@GLIBC_2.2.5_finiprintf@@GLIBC_2.2.5fputs@@GLIBC_2.2.5fgetc@@GLIBC_2.2.5fputc@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5__data_startstrcmp@@GLIBC_2.2.5optarg@@GLIBC_2.2.5fprintf@@GLIBC_2.2.5__gmon_start__fopen64@@GLIBC_2.2.5_IO_stdin_used__libc_csu_init_end_start__bss_startmainperror@@GLIBC_2.2.5_Jv_RegisterClassesgetopt@@GLIBC_2.2.5exit@@GLIBC_2.2.5fwrite@@GLIBC_2.2.5_ITM_registerTMCloneTable_initstderr@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/libcoro.a0000664000000000000000000001404612213333042015551 0ustar rootroot! / 1378727458 0 0 0 38 ` jjcoro_transfercoro_createcoro.c.o/ 1378727458 1000 1000 100664 6016 ` ELF>@@UHHHHEHHEHHHHHEHUHUSATAUAVAWH'H&A_A^A]A\[]UHH@H}HuHUHMLEH}HEHHEHHEHHEHHUHEHHEHHEHHPHEHHEHHHEHHPHEHHEHHHEHHPHEHHEH0HHHHHH 4:FFSospo#F    int         T V` argW h)ctx֋X)PargFHF@ִ H`H O)  PF  Q  Q % : ; I I' I  : ; : ;I8 $ >  $ >  .: ; ' @B  4: ; I 4: ; I 5I5.? : ; ' @B : ; I : ; I wwIvdewehwhYvYZw,Zs /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/corocoro.ccoro.h !!~long long intcoro_init_argunsigned intnew_corocoro_contextGNU C 4.7.3corolong unsigned intlong long unsigned intcoro_funcnctxcoro_init_func/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/coro/coro.cunsigned charcharssizecreate_corocoro_initlong intshort unsigned intsigned charsptrcoro_createshort intfuncsizetypeGCC: (Debian 4.7.3-4) 4.7.3zRx IAC szPLRx  $AC  .symtab.strtab.shstrtab.rela.text.data.bss.gcc_except_table.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @Zh&, 1HCTbr.0m0 ^ 0j0x ` hp %.:I   DIRXddycoro.ccoro_init_funccoro_init_argnew_corocreate_corocoro_initcoro_transferabortcoro_create__gcc_personality_v0memset_Unwind_Resume !( 3E   07 >IS ? Z% * yI 2T 2x P a "    5 R   b I \ Fd$Z, LD K` An }    )   G \de tarantool-1.5.1.218.g1a69fd6/libmisc.a0000664000000000000000000015604212213333043015546 0ustar rootroot! / 1378727459 0 0 0 234 ` ...KKKtcrc32_tablecrc32crc32cinit_set_proc_titlefree_proc_titleset_proc_titleqsort_argPMurHash32_ProcessPMurHash32_ResultPMurHash32PMurHash32_testbase64_encodebase64_decodecrc32.c.o/ 1378727458 1000 1000 100664 19016 ` ELF>P8@@UHH}HuHEHEE+HE3E%U1ЉEHEH}HmuċE]UH}HuHUHEHE+HE3E%U1ЉEHEH}HmuċE]UH}HuЉU؉M̋E̋U؉)EE̋U؉)+EEE/HE3E%U1ЉEHEEE;ErE#HE1EHEHE1EHEHE1EHEHE1EHEE%E%1ЉEEEE%3UE%1ЉEHEH1EHEHEH1EHEHEH1EHEHEH1EHEEE;EE/HE3E%U1ЉEHEEE;ErɋE]UHH }HuU}uE'HEƒ)ЉEMUHuEUHH}HuU}wUHMEHΉ9UHMEHΉx0w,aQ mjp5c飕d2yҗ+L |~-d jHqA}mQDžӃVlkdzbeO\lcc=  n;^iLA`rqgjm Zjz  ' }Dңhi]Wbgeq6lknv+ӉZzJgo߹ホCՎ`~ѡ8ROggW?K6H+ L J6`zA`Ugn1yiFafo%6hRw G "/&U;( Z+j\1е,[d&c윣ju m ?6grWJz+{8 Ғ |! ӆBhn[&wowGZpj;f\ eibkaElx TN³9a&g`MGiIwn>JjѮZf @;7SŞϲG0򽽊º0S$6к)WTg#.zfJah]+o*7 Z-kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}kp;P5&dXي۲x8(k;CML('x$<^o^lD5☷e4pPsӯ% 6ĠhW{Tl׉]vHx&KMNގ )*}3'šL6i5wdUX_K%4Am •1Ō~I0ʈF9E#y]YBZ-)~:}QHa[ja}bˏun{AKm@H+Rᆠ tTgWysEp95*l8 oQS!h%QYN$')uBMd;=w8):qf e]6baa`r}\~7TtgG HtZ$ Y8O\,E,F? Tq$b@iD9W0R A* 5|z6ݛ<*)h/x;{pKcȦglEd/W_3̦K6 PQpCRF"eNRMсvi(jnڞɝ;vzuc 3Xr~@>.S=Euf!"f*8Zٜ+V>= mN&ǥ13V"0۱2|,,/BG ~TI?oZΎj|oӨb!\2_vI"Cr@d Yg:a1JZJ{.xl^0+[ [`?$O7is"҈!zgs\=HO>#uonvU>j4i{Ɲ՞ '7y܋MGNj-#FLR_QS}w0E'4aN(]2QiEmz[VQ!kd:< y?ig,oY" ]Oq*b V8E92ѢNs6S[ c|u{)lXKlKނ1"0DG* ͸=T#xfAٷqPN@Sm" gt_s(fC)#:;ZLIyГ(r ~7s^R؝nا??6ؖAzb˝qR5FE%V`d,+?T n7pk5YVX.f=]JldNăz\!iL  4x='%q>٧{Dέܴ4tSC~*P:'No)bS@Gt/gYLi|[,-qⵅ4?M"H1'vle FKz Xbaʆ`R$%IR˫ 3A9f6uu Aؑ0RX](;shx ז;Cj.JZɭ=kYPJ.W~Y`mk1:0#H) b'xP`H%C\4B >r-W#tDqp1cz荻 p/Ȝ@jHB?!+&;5,[~Jhiұ{zVO\<v #d30!]^JVYmm~E2gbυW'Jw6|; U(Teu49fNR9|A*>@]oo-_ρh_{Gh\fwO#5T&w&͎2GK0,޴қ}cuM&~.D 8Wc}pO ײLU-;>ٱu,(_EimA$~A RoOs.ޞd6;idt>Q8l>wߚZL}pՇ/?|K=KROCH1ѲB<ݢU-+ulsXB&'<DjiD+g;j _p 0}ٯWT|ܗz;3aG3孞4ԉF{"8ypW@[%* V(xCAi7?(LNx2Gـeǧ$b @K-$Yv䕳4b,uZ[o~ax H.uċSǷ-o^ =]IY)7XD vf:7ÖÖQ*egH 5'^f{!&`)NiMڍREpv1Q{^ᮀls%a!jGV9JT4ƭ]]#0mP2.bs"8nˏj! MUc\"Cw'=f.N%H0 aY'ATZ*Iv7XY-鈑b- ^X괺ʫӮ[e<4*nu 4rff) ]hKeeP$Wcj)"Z %$LMM(3Q@zһ>2R s]riD&cУU1U^!p˴1nϐ"f]чmkkN|9!q`VBLe闥-7lSw8_t![RR|;, =Em;OH?6t|QyHմ&Kto.?BռAp G^i(G3:|hK2W50F`88yQ /Ȯ\D"Vqzx #˒w7zC`G; mTOݴ@+{yjֹD4+E݁#g9"b1"{KgrEʸcD^+g@#IfRf#Pq2,D=d!4V8F΀Fv*OO!- d cxeZG[}(dIGej %3` 7Bhx%Bq`A%mwa!$TTCCFCZ&e$a8A>7&,c\EcE>&ķ|A'Pl@bwiO'']bn"@ ~__vf|քnЬ Mo-禲<]8? &Js.˄DBbD[ͥg )9uV[<'i ϼwNp5lK|ơhU¡z'YƸe(NJ2W 5y,:N@ǓQPHـ*hsa3#QB猷c36܎Dŋ}!z?ɠRc叾@0)tRMqK٪ayX#*ߒ1`xĻҁf[;IIpjĢM\Őe8ݒ/*6 ʼn.T݅ wX5:TGF#A~eRsӝk7% jll1ƤOӰz]~CuoץG,%V>$<^ؖ`B_ҿ%|`m`tun%LMB'b]'dܮ@r@k5'/b D&c;gAY:uHA@qVc"&S#.(fҡDj LUD!f:#7g K"4ghEFEz~"Ygn3G֙ xWee% a!GވP10F sd!S{a!JdBFB(o8X"p3HETagDv g=dvEeT!"%3yjUma"3'cgoϰvW;EoT'BjEJTrg:v^ "d3Wڹ#jkS Kdÿϋ޳ƾja2v>o.ߨNvԊ( pd4jtLl<QiM!oa QћjQ7@sGZbײF 6d'?a6'gs#b*Qb{o@Z} sdb%Qȉ@͵6Xa'`j(9}@oE6 '5\Q@asb,U\ odIaяhԞĻ0 dj t1y,A*ۣʛraC6o{߼3n fڭ^jO. dS\բnV e&k@ūaԓ9n}`Ks%;г#ۑk{? e9gq˺I$F`TlnހZ ` uMS(9=O^mOn|ݚkm6|´On^*(P9hr e(tn9€ ,hm|"0`Oj^RI O?e^mO|w Uk( 9Y^a`)Bnޔɶcۅ;k |eD '4!֍yn➑`6=ɿFeЧ~ն+ cDe[kXу [B eJzy2Qh Mk<-40 '[HN9WR7&?c&EMȪptiDq z=,ڱì>%UorvB b;xL·[04(1:lS_}gFMCn(27㎵.Ztܚ3@{YKk8!˄\|7͓aqxAHs>A ӂuD/~wgG(fM&d|PLz95ډ˱ yU`>z0JbY 3ԩmX}KA̤p@/J 6!9"Ge+^ĄvF0R)9?vB꙳ַ8 |(Ab qu{KAɯ|> dHΧ!}8wdSG43+'2L蟰n\}E{MZ2S4?g-TC{ZcK:[BvpBj@, +596]D]v"rF3K*?.EeY|1|ZLm 50mz9cֹ)zBJ 3dPu= $#6ё7Rr~KN7j%E^<.,hYXuAuS-N.&ä+ (8J΃a;MS[nX6]L^$w?9Qf/Jv=+ue^prsj$–w|Ͻ[=uXU-]^lFjH43 ~vs&Ru~'p s?gΓnyUɋ qC ʼlZԒH-.+?(WAJQm" ˚4zz+^"r«WcT;QRg)4֙\q?z0yhf|AJ)L6^ 8 C+a UM G,Yxu^! "eΜ'$DŽG/WꗟA m 2N4 Zy \Ua ıE!"'|$a~۩R' 9 cW~xT QR2ڜEj-Fz0+jyXs|3n<"mdWh%{kM%ˎP8}Co@7EkFv6vo.CR5i6­3 0у1K֤hDt '%OPY|@R:I5ȁ630pHmPdӽ=p\)VB>˵#K[wnT'[m<.hk>!fNjICt@r,EFmOco5: ُF%P_|7_9*:Bϕ?<My 1d hTD(߁{p6b1aiodfCg{]"5W#{ObL:I(J@3ڣӄbk Ob*cardǺ:g`w[.,8DOYyL1!IJp.]\F)ܖD9:?[<3ƍ`VHdO=}'}̷QmM)V0int>0)37z>_buf_X_oPpahcrcbd   z fcrcÅ\bufPoHph crcL@Hlil`\hd  )\P7Xll`7ha  ! Y    9 q 0 % $ > $ > : ; I.? : ; ' I@B : ; I : ; I 4: ; I  I & &I .: ; ' I@B  .: ;' I@B : ;I : ;I 4: ;I 4: ;I .: ;' I@B .? : ;' I@B I!I/ 4: ; I 4: ; I?  ww_v_`w`awadwdvwwwvwwwvwww>v>?w,? /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includecrc32.cstddef.hstdint.h u/+Y./+=.K"eJ!KKO;ZZ:]kJ"eJ=4#gZ/=4!gZ>size_tuintptr_tcrc32crunning_lengthshort unsigned intcrc32sizesctp_crc_tableil8_o40long unsigned int/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/crc32.csctp_crc_tableil8_o48sctp_crc_tableil8_o64sctp_crc_tableil8_o80sctp_crc_tableil8_o88to_even_wordunsigned charunsigned intcharuint8_tcrc32c_sb8_64_bitmultitable_crc32csigned charsctp_crc_tableil8_o56sizetypeGNU C 4.7.3crc32_tableshort intbuffersctp_crc_tableil8_o32init_bytesuint32_tlong intp_bufterm1term2end_bytescrc32c_tablesctp_crc_tableil8_o72lengthsingletable_crc32cGCC: (Debian 4.7.3-4) 4.7.3zRx `AC [ <ZAC U \AC  |FAC A DAC  .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @?`A &( ,+6+1BBB/kP0`20[I0 t2oI 0p4M0666Ix7= H@ `Z)? Uk $F    `Dcrc32.ccrc32c_tablesingletable_crc32csctp_crc_tableil8_o32sctp_crc_tableil8_o40sctp_crc_tableil8_o48sctp_crc_tableil8_o56sctp_crc_tableil8_o64sctp_crc_tableil8_o72sctp_crc_tableil8_o80sctp_crc_tableil8_o88crc32c_sb8_64_bitmultitable_crc32ccrc32_tablecrc32crc32c4    $      6  Q     m?% , !3 ': /A [H mO ] d k <p { A   :`  @  :`& `L @g Is{   3       [,4<  F U d 3s  ?    3    E ( 5> yKT aj w   $   @``proctitle.c.o/ 1378727458 1000 1000 100664 10272 ` ELF>@@UHSH8HHHHHHEEt}t'HEHPEHH HHHH9uCEHHHHHEHHHHHHHHEEE;|H}u"HHHEeHEHHHUHcHHHH9u=HUHcHHHHUHcHHHHHHEEHUHcHHHH{HHHHUHHHH)HHHHEHHHHEE;EHHHEHHUHcHHHHHEHUHcHHHHuEHHHEHHHEHHHHHEE>EHHHEHEHHHHHHHEE;|HHHEHHHEHHHHHѺHǸHHHH5HHѺHǸHHHHHH9v/HHH)H HHȾHHH8[]UHH }HuE#HUHcHHHHEHUHcHHHHuHHHHE#EHHHEHHHEE;E|HEHUHHHXH`HhLpLxt )E)M)U)])e)m)u)}H(HHDž0Dž40HEH8HPH@HHHH)HHH<H0H(HHHHLLHcHH9s1HLHH)H LHHȾHLHH%s%s: D(8OHH####f-ճ int    { {_ {_XHiT@iP_ H@ \ Pil  ~ap~3~c d e h k l n !% : ; II!I/ $ >  : ;  : ; I8  $ >   I &I .? : ; ' I@B  : ; I  4: ; I 4: ; I  !I/.? : ; ' @B .? : ;' @B : ;I 4: ;I 4: ;I 4: ;I? < wwvwwwwvwxwxywy|w|vw, /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includeproctitle.cstdarg.hstddef.hunistd.h ܉f'CJu$=J,u7J:J +5[//uJJ22'-&s LK1ps_buffer_sizeend_of_areasize_tnew_environargv/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebeset_proc_title__gnuc_va_listunsigned char/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/proctitle.cps_buffer_fixed_sizelong unsigned intshort unsigned intbasename_bufva_listps_buffergp_offsetformatunsigned intreg_save_arealast_status_lenlong long unsigned intoverflow_arg_areasave_argcsizetypesave_environlong long intcharinit_set_proc_titleGNU C 4.7.3short intnew_argvsave_argvenvironbuflenlong intsigned char__va_list_tagfree_proc_titlefp_offsetargcGCC: (Debian 4.7.3-4) 4.7.3zRx  AC H @AC   `AAC < .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @&,81>H9 JP [X h 0c'0 | w' 0 l09@'H0 0 &6K U(_0   lxAproctitle.cps_bufferps_buffer_sizelast_status_lenps_buffer_fixed_sizesave_argcsave_argvsave_environinit_set_proc_titleenvironstrlenmallocstrdupsnprintfbasenamememsetfree_proc_titlefreeset_proc_titlevsnprintf!/$6=,*AYk $_v /9@H U\dkry$+,2Zr%,I!PXn z      3!) . }K P ?\ Fj ]x  d W 4     3  *     ' 1 g@ .OAWcd r "c Y ' Mx ` g& .B nJxRZ d PM # <  r    (% 10:   Ddxqsort_arg.c.o/ 1378727459 1000 1000 100664 8504 ` ELF>@@UHH}HuHUM}XHEHHEHEHEHEHEHEHHEHEHHEHHEHEHUHHEHmH}uOHEHEHEHEHEHEHEEHEHE؈HEHEULjHEHmH}u]UHH0H}HuHUHMLEHUHuHMHEHЅyDHUHuHMHEHЅx%HUHuHMHEHЅyHEHEHEBHUHuHMHEHЅ%HUHuHMHEHЅyHEHEHEUHSHHhH`HXHPLHHhHu!HXHuHXHHEH`'HXHhHHEHEHEH}uFHEHHEHXHHHEHHHEHHXHHHEHHEH.HEHXHHHEH4HXHEHiHXHHEHEH;hv4HXHHHEH<HHHMHPHЅ6HXHEH`HHXHhHH;EHEHXHhHHEEHXHHHEH<HHHMHPHЅ~ HE-HXHEH`HHXHhHH;EwH}H`HHHXHhHHEH`RHhHEH`HHHXHhHHEH`(H`HHXHEHEHHHEH<HUHEH4HHHPHEIHHHOHEHUHEH4HEHHHEH<HHHPHEIHHH HEHEHHHEH4HEHHHHEH<HHHPHEIHHHEHHHPHUHuHEIHHEH}u,HhHHEHEHHhHHEHUH HEHXHuHhH}HXHhHHEHEHEH`HHHXHhHHEHEHEgH}uUH}u&HEHHEHEHHEHHEHUHHEHXHuHEHHXHEHXHEHEH;EHHHhHMHPHHHEH}\sH}u^H}u,HEHHxHEHHEHHEHxHHEHXHuHEH5HXHHEHXHHEHEH;Ew/HHHhHMHPHHHEH}THEH;EwoH}u,HEHHpHEHHEHHEHpHHEHXHuHEHHXHEHXHHEؐH`HHXHhHHEHUHEH)HMHhHH)HH9HNHEH}~*HEHUHEHHHEHHhHHUHEHH)HHH+XHMHEHH)HH9HFHEH}~'HEHUHEHHHEHHEHHUHEHH)HHEHEH;Xv:HEHXHHHHPHXHhIHHUHEHH)HHEHEH;Xv5HEHHHEHHhHEHXH`Hĸ[]intp>wZRaRjbRjnRw RS M iUwh piU` pjUX tUZ iWwP piWjH pjWj@ tWpZ ejaejhbej`cejXcmpe2PargehHS+++h1mamh~nmw~esmw~cmpm2~argmh~ paojX pbpjP pcqjH pdrj@ plsj pmtj pnuj dv rw~xy{ d tZ  tZ  tZ~  tZ~ tZ~% $ > $ >   I: ; I.: ; ' @B : ; I : ; I  4: ; I  .: ; ' I@B ' II&.? : ; ' @B 4: ; I  : ; wwvwww~v~www6 v6 7 w,7 6 /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/usr/lib/gcc/x86_64-linux-gnu/4.7/include/usr/includeqsort_arg.cstddef.hstdint.h /g:0t7.LI82 / XKtF.4&Zh0)"#ح$gEEK)t,,0vt&y /0vt,y /t,i X%*t*7t'":"ugHX;  size_tGNU C 4.7.3/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/qsort_arg.cswapfunclooppresortedlong unsigned intshort unsigned intunsigned charintptr_tunsigned intlong long unsigned intqsort_argsizetypelong long intswaptypecharmed3short intlong intsigned charGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <AC  $\AC H .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @7 &x ,x 6x 1Bf Pi `0[ 0 t:o  010$AH H X%    qsort_arg.cswapfuncmed3qsort_arg   7 % , 3 : A ~H %O ] d s x f q.56cNqV  `: AI7 Q  $ t3 o9B#Jie7mc1]  @`PMurHash.c.o/ 1378727459 1000 1000 100664 6344 ` ELF> @@UHH}HuHUMHEȋEHEEHEHEEEE؃E}E;EEElEHE ЉEHEEm}u?EiQ-̉EEEi5EE1EE U-EE}muEPHHcHEHHEHEHUH HEH HEH ЉEԋEiQ-̉EEEi5EԋE1EE U-EHEHEH;EoEЃ)ЉEEElEHE ЉEHEEm}u?EiQ-̉EEEi5EE1EE U-EE}muHEȋUE²E HE]UHS}uU܋EE}t;+EUӉ؉EEiQ-̉EEEi5EE1EE1EE1EEik녉EE 1EEi5‰EE1EE[]UHH }HuUEEEMHUHuHEHUMEΉUHH8H}؉uԉUHMȋEЉEEHEHEEHcHEHHEHUHEHH)HȉHUHuHEHUԋMEΉEUHEȉ:ph1::keyGlenNh1@lc@hptrU`endUHnN\iNP_iNXk1@D_iNT@ M int[ `  @h@T@P@Lk1 @`n Nd@G@\keyGPlenNXh1 @l @h(key(GHlen(ND(@@out(h1*@\*@Xptr+Uhend,U`% .? : ; ' @B : ; I : ; I 4: ; I    I $ >  & $ >  &I .? : ;' I@B : ;I : ;I 4: ;I .? : ;' I@B 4: ;I .? : ;' @B  wwCvCDwDEwEHwHvwww$v$%w%&w&)w)vw,h /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partyPMurHash.c /-?YF8X2M-?!4ؑg"i=B!g!4YɃ 'Kunsigned intcarry/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/PMurHash.cpcarryGNU C 4.7.3PMurHash32_ResultPMurHash32_Processunsigned charPMurHash32_testseedtotal_lengthPMurHash32GCC: (Debian 4.7.3-4) 4.7.3zRx DAC ?  <AC A `JAC E  AC ~ .symtab.strtab.shstrtab.rela.text.data.bss.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @H`&,61xB-P`{ 0[ 0 t oP 0 0   h`P H L    DD1J<%PMurHash.cPMurHash32_ProcessPMurHash32_ResultPMurHash32PMurHash32_test   l % + 2:DB [ eW|#'C c i xuD} `   %  8 I Q%Ya     u @Dd%base64.c.o/ 1378727459 1000 1000 100664 11616 ` ELF>@@UHH}HEHE@HE@]UHEEE}@v= E]UHHPH}ȉuHUMLEEHcHEHHEHEHEHEHEEHcHEHHEHE@EHEr HEH;Et HEH;Er+HEUPHEHUHEHH)HHEEHEE%EEHEHEE׃EHEH;Et HEH;Er+HEUPHEHUHEHH)HLHEEHEE%EEsHEHEE׃EHEH;EtHEHH;Er+HEUPHEHUHEHH)HHEEHEE%EEHEHEE׃?EEHEHEHE@PHEPHE@H‹EUHEEEm+}x;E} EH]UHH}HEHE@]UHHPH}ȉuHUMLEHEHEEHcHEHHEHEHEEHcHEHHEHEPHEHEr HEH;Et HEH;Er.HEHEHEPHUHEHH)HHEHEE߀}xEHEHEH;EtHEHH;Er.HEHEHEPHUHEHH)HaHEHEUE߀}xHEU߃0 ʈHEEHEHEH;EtHEHH;Er.HEHEHEPHUHEHH)HHEHEE߀}xHEU߃< ʈHEEHEHEH;Et HEH;Er+HEHEHEPHUHEHH)HLHEHE@E߀}xHEM߃? ʈHEHUHEHH)HUHH(H}uHU؉MHEH$H}MHU؋uHEIH#P>?456789:;<=  !"#$%&'()*+,-./0123ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/''H )*)#+#,#int##0  0 h H 8h 8\ :  ;l xx@hBP BP B C[ C D  FaP GPh H[` I[H J_ KG V P [X T  H [h [`M PX T [H P H`resl  \   V  Ɇl xO h  P ؆ [ ن  Ph PX [` [P OPXT [H P"`%  : ; (  : ;  : ; I8 $ > $ > .: ; ' @B  : ; I  I .: ; ' I@B  4: ; I I!I/ &I.: ; ' I@B .? : ; ' I@B 4: ; I .? : ;' I@B : ;I 4: ;I ww&v&'w'(w(+w+OvOPwPQwQTwTvwww1v12w23w36w6vwwwvwwwvwwwvwwwvw,wf /home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_partybase64.c 02ugu4."W ZuZu׭Zuz$/[3/Y׻0Y׻0"//u3Z.. uKfu24+Zg؟Zg؟Zg0gg[5Zencodingin_base64base64_encode_blockendstatevaluecodeposstepin_posin_endbase64_decodestateout_endfragmentbase64_decodestepbase64_decode_valuebase64_decode_blockbase64_decodedecodingbase64_decodestate_initout_binbase64_encodestepdecoding_sizeout_pos/home/unera/work/deb/tarantool/tarantool-1.5.1.82.ga064ebe/third_party/base64.cin_binunsigned intcharresultbase64_encodestatestep_Astep_Bstep_Csizetypeout_lenGNU C 4.7.3out_base64base64_encodestate_initbase64_encodebase64_encode_valuestepcountin_lenbase64_encode_blockstep_astep_bstep_cstep_dGCC: (Debian 4.7.3-4) 4.7.3zRx 'AC b <)AC d \AC  |YAC T rAC m >AC y AC W AC  AAC | .symtab.strtab.shstrtab.rela.text.data.bss.rodata.rela.debug_info.debug_abbrev.debug_loc.rela.debug_aranges.rela.debug_line.debug_str.comment.note.GNU-stack.rela.eh_frame @!H& , 1  >+9"8 J MXY`h0c@,0 |{wp, 0dI08,H   '"')6ADPXYo> P   2rAbase64.cbase64_encodestate_initbase64_encode_valueencoding.1732base64_encode_blockbase64_encode_blockendbase64_decode_valuedecoding_size.1782decoding.1781base64_decodestate_initbase64_decode_blockbase64_encodebase64_decodeJ      % * 6 < B I ~U >c wq  r u - 4 ; B Q > w '  * '%P- `7 0E QZ 6{  e P  ^    * J  C & d4 wB lg rz2     *  d 2  ^  # 1 *N Yai s 0    6  @ *   *  9 H W f *u C J  d l         * s @'`P2 tarantool-1.5.1.218.g1a69fd6/LICENSE0000664000000000000000000000252012202131537014760 0ustar rootrootCopyright (C) 2010-2013 Tarantool AUTHORS: please see AUTHORS file. /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ tarantool-1.5.1.218.g1a69fd6/include/0000775000000000000000000000000012242653271015407 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/salloc.h0000664000000000000000000000645312231715276017047 0ustar rootroot#ifndef TARANTOOL_SALLOC_H_INCLUDED #define TARANTOOL_SALLOC_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include "tarantool/util.h" /* for uint64_t */ struct tbuf; bool salloc_init(size_t size, size_t minimal, double factor); void salloc_free(void); void *salloc(size_t size, const char *what); void sfree(void *ptr); void sfree_delayed(void *ptr); void slab_validate(); void salloc_protect(void); /** Statistics on utilization of a single slab class. */ struct slab_cache_stats { int64_t item_size; int64_t slabs; int64_t items; int64_t bytes_used; int64_t bytes_free; }; /** Statistics on utilization of the slab allocator. */ struct slab_arena_stats { size_t size; size_t used; }; typedef int (*salloc_stat_cb)(const struct slab_cache_stats *st, void *ctx); int salloc_stat(salloc_stat_cb cb, struct slab_arena_stats *astat, void *cb_ctx); /** * @brief Return an unique index associated with a chunk allocated by salloc. * This index space is more dense than pointers space, especially in the less * significant bits. This number is needed because some types of box's indexes * (e.g. BITSET) have better performance then they operate on sequencial * offsets (i.e. dense space) instead of memory pointers (sparse space). * * The calculation is based on SLAB number and the position of an item within * it. Current implementation only guarantees that adjacent chunks from one * SLAB will have consecutive indexes. That is, if two chunks were sequencially * allocated from one chunk they will have sequencial ids. If a second chunk was * allocated from another SLAB thеn the difference between indexes may be more * then one. * * @param ptr pointer to memory allocated by salloc * @return unique index */ size_t salloc_ptr_to_index(void *ptr); /** * @brief Perform the opposite action of a salloc_ptr_to_index. * @param index unique index * @see salloc_ptr_to_index * @return point to memory area associated with \a index. */ void * salloc_ptr_from_index(size_t index); #endif /* TARANTOOL_SALLOC_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/say.h0000664000000000000000000000557012202131537016353 0ustar rootroot#ifndef TARANTOOL_SAY_H_INCLUDED #define TARANTOOL_SAY_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include "tarantool/util.h" /* for FORMAT_PRINTF */ #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ enum say_level { S_FATAL, /* do not this value use directly */ S_ERROR, S_CRIT, S_WARN, S_INFO, S_DEBUG }; extern int sayfd; extern pid_t logger_pid; void say_logger_init(int nonblock); void vsay(int level, const char *filename, int line, const char *error, const char *format, va_list ap) __attribute__ ((format(FORMAT_PRINTF, 5, 0))); typedef void (*sayfunc_t)(int level, const char *filename, int line, const char *error, const char *format, ...); extern sayfunc_t _say __attribute__ ((format(FORMAT_PRINTF, 5, 6))); #define say(level, ...) ({ _say(level, __FILE__, __LINE__, __VA_ARGS__); }) #define panic_status(status, ...) ({ say(S_FATAL, NULL, __VA_ARGS__); exit(status); }) #define panic(...) panic_status(EXIT_FAILURE, __VA_ARGS__) #define panic_syserror(...) ({ say(S_FATAL, strerror(errno), __VA_ARGS__); exit(EXIT_FAILURE); }) #define say_syserror(...) say(S_ERROR, strerror(errno), __VA_ARGS__) #define say_error(...) say(S_ERROR, NULL, __VA_ARGS__) #define say_crit(...) say(S_CRIT, NULL, __VA_ARGS__) #define say_warn(...) say(S_WARN, NULL, __VA_ARGS__) #define say_info(...) say(S_INFO, NULL, __VA_ARGS__) #define say_debug(...) say(S_DEBUG, NULL, __VA_ARGS__) #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_SAY_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/admin.h0000664000000000000000000000271112202131537016641 0ustar rootroot#ifndef TARANTOOL_ADMIN_H_INCLUDED #define TARANTOOL_ADMIN_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ int admin_init(const char *bind_ipaddr, int admin_port); #endif /* TARANTOOL_ADMIN_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/tt_pthread.h0000664000000000000000000001176712202131537017722 0ustar rootroot#ifndef TARANTOOL_PTHREAD_H_INCLUDED #define TARANTOOL_PTHREAD_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/config.h" #include #include "tarantool/util.h" #include /** * Assert on any pthread* error in debug mode. In release, * write into the log file where and what has failed. * * Still give the user an opportunity to manually * check for error, by returning the pthread_* * function status. */ #define tt_pthread_error(e) \ if (e != 0) \ say_error("%s error %d", __func__, e);\ assert(e == 0); \ e /** * Debug/logging friendly wrappers around pthread * functions. */ #define tt_pthread_mutex_init(mutex, attr) \ ({ int e = pthread_mutex_init(mutex, attr);\ tt_pthread_error(e); \ }) #define tt_pthread_mutex_destroy(mutex) \ ({ int e = pthread_mutex_destroy(mutex); \ tt_pthread_error(e); \ }) #define tt_pthread_mutex_lock(mutex) \ ({ int e = pthread_mutex_lock(mutex); \ say_debug("%s: locking %s", __func__, #mutex);\ tt_pthread_error(e);\ }) #define tt_pthread_mutex_trylock(mutex) \ ({ int e = pthread_mutex_trylock(mutex); \ if (e != 0 && e != EBUSY) \ say_error("%s error %d at %s:%d", __func__, e, __FILE__, __LINE__);\ assert(e == 0 || e == EBUSY); \ e \ }) #define tt_pthread_mutex_unlock(mutex) \ ({ int e = pthread_mutex_unlock(mutex); \ say_debug("%s: unlocking %s", __func__, #mutex);\ tt_pthread_error(e); \ }) #define tt_pthread_mutex_destroy(mutex) \ ({ int e = pthread_mutex_destroy(mutex); \ tt_pthread_error(e); \ }) #define tt_pthread_mutexattr_init(attr) \ ({ int e = pthread_mutexattr_init(attr); \ tt_pthread_error(e); \ }) #define tt_pthread_mutexattr_destroy(attr) \ ({ int e = pthread_mutexattr_destroy(attr);\ tt_pthread_error(e); \ }) #define tt_pthread_mutexattr_gettype(attr, type)\ ({ int e = pthread_mutexattr_gettype(attr, type);\ tt_pthread_error(e); \ }) #define tt_pthread_mutexattr_settype(attr, type)\ ({ int e = pthread_mutexattr_settype(attr, type);\ tt_pthread_error(e); \ }) #define tt_pthread_condattr_init(attr) \ ({ int e = pthread_condattr_init(attr); \ tt_pthread_error(e); \ }) #define tt_pthread_condattr_destroy(attr) \ ({ int e = pthread_condattr_destroy(attr); \ tt_pthread_error(e); \ }) #define tt_pthread_cond_init(cond, attr) \ ({ int e = pthread_cond_init(cond, attr); \ tt_pthread_error(e); \ }) #define tt_pthread_cond_destroy(cond) \ ({ int e = pthread_cond_destroy(cond); \ tt_pthread_error(e); \ }) #define tt_pthread_cond_signal(cond) \ ({ int e = pthread_cond_signal(cond); \ tt_pthread_error(e); \ }) #define tt_pthread_cond_wait(cond, mutex) \ ({ int e = pthread_cond_wait(cond, mutex);\ tt_pthread_error(e); \ }) #define tt_pthread_cond_timedwait(cond, mutex, timeout) \ ({ int e = pthread_cond_timedwait(cond, mutex, timeout);\ if (ETIMEDOUT != e) \ say_error("%s error %d", __func__, e);\ assert(e == 0 || e == ETIMEDOUT); \ e \ }) #define tt_pthread_once(control, function) \ ({ int e = pthread_once(control, function);\ tt_pthread_error(e); \ }) #define tt_pthread_atfork(prepare, parent, child)\ ({ int e = pthread_atfork(prepare, parent, child);\ tt_pthread_error(e); \ }) /** Make sure the created thread blocks all signals, * they are handled in the main thread. */ #define tt_pthread_create(thread, attr, run, arg) \ ({ sigset_t set, oldset; \ sigfillset(&set); \ pthread_sigmask(SIG_BLOCK, &set, &oldset); \ int e = pthread_create(thread, attr, run, arg); \ pthread_sigmask(SIG_SETMASK, &oldset, NULL); \ tt_pthread_error(e); \ }) #define tt_pthread_join(thread, ret) \ ({ int e = pthread_join(thread, ret); \ tt_pthread_error(e); \ }) #endif /* TARANTOOL_PTHREAD_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/scoped_guard.h0000664000000000000000000000404012202131537020205 0ustar rootroot#ifndef TARANTOOL_SCOPED_GUARD_H_INCLUDED #define TARANTOOL_SCOPED_GUARD_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "object.h" template class ScopedGuard { public: explicit ScopedGuard(const Functor& fun) : m_fun(fun), m_active(true) { /* nothing */ } ScopedGuard(ScopedGuard&& guard) : m_fun(guard.m_fun), m_active(true) { guard.m_active = false; abort(); } ~ScopedGuard() { if (!m_active) return; m_fun(); } private: explicit ScopedGuard(const ScopedGuard&) = delete; ScopedGuard& operator=(const ScopedGuard&) = delete; Functor m_fun; bool m_active; }; template inline ScopedGuard make_scoped_guard(Functor guard) { return ScopedGuard(guard); } #endif /* TARANTOOL_SCOPED_GUARD_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/log_io.h0000664000000000000000000001011512231715257017027 0ustar rootroot#ifndef TARANTOOL_LOG_IO_H_INCLUDED #define TARANTOOL_LOG_IO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include "tarantool/util.h" #include "tarantool_ev.h" extern const uint32_t default_version; enum log_format { XLOG = 65534, SNAP = 65535 }; enum log_mode { LOG_READ, LOG_WRITE }; enum log_suffix { NONE, INPROGRESS }; struct log_dir { bool panic_if_error; /** * true if the file can by fsync()ed at close * in a separate thread. */ bool sync_is_async; /* Additional flags to apply at open(2) to write. */ int open_wflags; const char *filetype; const char *filename_ext; char *dirname; }; extern struct log_dir snap_dir; extern struct log_dir wal_dir; int64_t greatest_lsn(struct log_dir *dir); char * format_filename(struct log_dir *dir, int64_t lsn, enum log_suffix suffix); int64_t find_including_file(struct log_dir *dir, int64_t target_lsn); struct log_io { struct log_dir *dir; FILE *f; enum log_mode mode; size_t rows; int retry; char filename[PATH_MAX + 1]; bool is_inprogress; }; struct log_io * log_io_open_for_read(struct log_dir *dir, int64_t lsn, enum log_suffix suffix); struct log_io * log_io_open_for_write(struct log_dir *dir, int64_t lsn, enum log_suffix suffix); struct log_io * log_io_open(struct log_dir *dir, enum log_mode mode, const char *filename, enum log_suffix suffix, FILE *file); int log_io_sync(struct log_io *l); int log_io_close(struct log_io **lptr); void log_io_atfork(struct log_io **lptr); struct log_io_cursor { struct log_io *log; int row_count; off_t good_offset; bool eof_read; }; void log_io_cursor_open(struct log_io_cursor *i, struct log_io *l); void log_io_cursor_close(struct log_io_cursor *i); const char * log_io_cursor_next(struct log_io_cursor *i, uint32_t *rowlen); typedef uint32_t log_magic_t; struct header_v11 { uint32_t header_crc32c; int64_t lsn; double tm; uint32_t len; uint32_t data_crc32c; } __attribute__((packed)); static inline struct header_v11 *header_v11(const char *t) { return (struct header_v11 *)t; } static inline void header_v11_fill(struct header_v11 *header, int64_t lsn, size_t data_len) { header->lsn = lsn; header->tm = ev_now(); header->len = data_len; } void header_v11_sign(struct header_v11 *header); struct row_v11 { log_magic_t marker; struct header_v11 header; uint16_t tag; uint64_t cookie; uint8_t data[]; } __attribute__((packed)); void row_v11_fill(struct row_v11 *row, int64_t lsn, uint16_t tag, uint64_t cookie, const char *metadata, size_t metadata_len, const char *data, size_t data_len); static inline size_t row_v11_size(struct row_v11 *row) { return sizeof(row->marker) + sizeof(struct header_v11) + row->header.len; } int inprogress_log_unlink(char *filename); int inprogress_log_rename(struct log_io *l); #endif /* TARANTOOL_LOG_IO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/ipc.h0000664000000000000000000001024212202131537016322 0ustar rootroot#ifndef TARANTOOL_IPC_H_INCLUDED #define TARANTOOL_IPC_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include /** * @brief CHANNELS */ struct ipc_channel; /** * @brief Allocate and construct new IPC channel * @param size of channel * @return new channel * @code * struct ipc_channel *ch = ipc_channel_new(10); * @endcode */ struct ipc_channel * ipc_channel_new(unsigned size); /** * @brief Destruct and free a IPC channel * @param ch channel */ void ipc_channel_delete(struct ipc_channel *ch); /** * @brief Put data into a channel. * @detail Yield current fiber if the channel is full. * @param channel * @param data * @code * ipc_channel_put(ch, "message"); * @endcode */ void ipc_channel_put(struct ipc_channel *ch, void *data); /** * @brief Get data from a channel. * @detail Yield current fiber if the channel is empty. * @param channel * @return data that was put into channel by ipc_channel_put * @code * char *msg = ipc_channel_get(ch); * @endcode */ void * ipc_channel_get(struct ipc_channel *ch); /** * @brief Wake up all fibers that sleep in ipc_channel_get and * send a message to them. * @param channel * @param data * @return count of fibers to which the message was delivered */ int ipc_channel_broadcast(struct ipc_channel *ch, void *data); /** * @brief check if channel is empty * @param channel * @retval 1 (TRUE) if channel is empty * @retval 0 otherwise * @code * if (!ipc_channel_is_empty(ch)) * char *msg = ipc_channel_get(ch); * @endcode */ bool ipc_channel_is_empty(struct ipc_channel *ch); /** * @brief check if channel is full * @param channel * @return 1 (TRUE) if channel is full * @return 0 otherwise * @code * if (!ipc_channel_is_full(ch)) * ipc_channel_put(ch, "message"); * @endcode */ bool ipc_channel_is_full(struct ipc_channel *ch); /** * @brief put data into channel in timeout * @param channel * @param data * @param timeout * @return 0 if success * @return -1, errno=ETIMEDOUT if timeout exceeded * @code * if (ipc_channel_put_timeout(ch, "message", 0.25) == 0) * return "ok"; * else * return "timeout exceeded"; * @endcode */ int ipc_channel_put_timeout(struct ipc_channel *ch, void *data, ev_tstamp timeout); /** * @brief Get data from a channel with a timeout * @param channel * @param timeout * @return data if success * @return NULL if timeout exceeded * @code * do { * char *msg = ipc_channel_get_timeout(ch, 0.5); * printf("message: %p\n", msg); * } while (msg); * return msg; * @endcode */ void * ipc_channel_get_timeout(struct ipc_channel *ch, ev_tstamp timeout); /** * @brief return true if channel has reader fibers that wait data * @param channel */ bool ipc_channel_has_readers(struct ipc_channel *ch); /** * @brief return true if channel has writer fibers that wait data * @param channel */ bool ipc_channel_has_writers(struct ipc_channel *ch); #endif /* TARANTOOL_IPC_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/coeio.h0000664000000000000000000000402712202131537016651 0ustar rootroot#ifndef TARANTOOL_COEIO_H_INCLUDED #define TARANTOOL_COEIO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/config.h" #include "tarantool/util.h" #include #include #include #include #include #include #include #include #include #include #include #define ERESOLVE -1 /** * Asynchronous IO Tasks (libeio wrapper) * * Yield the current fiber until a created task is complete. */ void coeio_init(void); ssize_t coeio_custom(ssize_t (*f)(va_list ap), ev_tstamp timeout, ...); struct addrinfo * coeio_resolve(int socktype, const char *host, const char *port, ev_tstamp timeout); #endif /* TARANTOOL_COEIO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/iobuf.h0000664000000000000000000001416612202131537016664 0ustar rootroot#ifndef TARANTOOL_IOBUF_H_INCLUDED #define TARANTOOL_IOBUF_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include "tarantool/util.h" #include "third_party/queue.h" struct ev_io; /** {{{ Input buffer. * * Continuous piece of memory to store input. * Allocated in factors of cfg.readahead. * Maintains position of the data "to be processed". * * Typical use case: * * struct ibuf *in; * coio_bread(coio, in, request_len); * if (ibuf_size(in) >= request_len) { * process_request(in->pos, request_len); * in->pos += request_len; * } */ struct ibuf { struct palloc_pool *pool; char *buf; /** Start of input. */ char *pos; /** End of useful input */ char *end; /** Buffer size. */ size_t capacity; }; /** Reserve space for sz bytes in the input buffer. */ void ibuf_reserve(struct ibuf *ibuf, size_t sz); /** How much data is read and is not parsed yet. */ static inline size_t ibuf_size(struct ibuf *ibuf) { return ibuf->end - ibuf->pos; } /** How much data can we fit beyond buf->end */ static inline size_t ibuf_unused(struct ibuf *ibuf) { return ibuf->buf + ibuf->capacity - ibuf->end; } /* Integer value of the position in the buffer - stable * in case of realloc. */ static inline size_t ibuf_pos(struct ibuf *ibuf) { return ibuf->pos - ibuf->buf; } /* }}} */ /* {{{ Output buffer. */ enum { IOBUF_IOV_MAX = 32 }; /** * An output buffer is an array of struct iovec vectors * for writev(). * Each buffer is allocated on palloc pool. * Buffer size grows by a factor of 2. With this growth factor, * the number of used buffers is unlikely to ever exceed the * hard limit of IOBUF_IOV_MAX. If it does, an exception is * raised. */ struct obuf { struct palloc_pool *pool; /* How many bytes are in the buffer. */ size_t size; /** Position of the "current" iovec. */ size_t pos; /** How many bytes are actually allocated for each iovec. */ size_t capacity[IOBUF_IOV_MAX]; /** * List of iovec vectors, each vector is at least twice * as big as the previous one. The vector following the * last allocated one is always zero-initialized * (iov_base = NULL, iov_len = 0). */ struct iovec iov[IOBUF_IOV_MAX]; }; /** How many bytes are in the output buffer. */ static inline size_t obuf_size(struct obuf *obuf) { return obuf->size; } /** The size of iov vector in the buffer. */ static inline int obuf_iovcnt(struct obuf *buf) { return buf->iov[buf->pos].iov_len > 0 ? buf->pos + 1 : buf->pos; } /** * Output buffer savepoint. It's possible to * save the current buffer state in a savepoint * and roll back to the saved state at any time * before iobuf_flush() */ struct obuf_svp { size_t pos; size_t iov_len; size_t size; }; /** * Reserve size bytes in the output buffer * and return a pointer to the reserved * data. Returns a pointer to a continuous piece of * memory. * Typical use case: * struct obuf_svp svp = obuf_book(buf, sizeof(uint32_t)); * for (...) * obuf_dup(buf, ...); * uint32_t total = obuf_size(buf); * memcpy(obuf_svp_to_ptr(&svp), &total, sizeof(total); * iobuf_flush(); */ struct obuf_svp obuf_book(struct obuf *obuf, size_t size); /** Append data to the output buffer. */ void obuf_dup(struct obuf *obuf, const void *data, size_t size); static inline struct obuf_svp obuf_create_svp(struct obuf *buf) { struct obuf_svp svp; svp.pos = buf->pos; svp.iov_len = buf->iov[buf->pos].iov_len; svp.size = buf->size; return svp; } /** Convert a savepoint position to a pointer in the buffer. */ static inline void * obuf_svp_to_ptr(struct obuf *buf, struct obuf_svp *svp) { return (char *) buf->iov[svp->pos].iov_base + svp->iov_len; } /** Forget anything added to output buffer after the savepoint. */ void obuf_rollback_to_svp(struct obuf *buf, struct obuf_svp *svp); /* }}} */ /** {{{ Input/output pair. */ struct iobuf { /** Used for iobuf cache. */ SLIST_ENTRY(iobuf) next; /** Input buffer. */ struct ibuf in; /** Output buffer. */ struct obuf out; }; /** Create an instance of input/output buffer. */ struct iobuf * iobuf_new(const char *name); /** Destroy an input/output buffer. */ void iobuf_delete(struct iobuf *iobuf); /** Flush output using cooperative I/O and garbage collect. * @return number of bytes written */ ssize_t iobuf_flush(struct iobuf *iobuf, struct ev_io *coio); /** * Must be called when we are done sending all output, * and there is likely no cached input. * Is automatically called by iobuf_flush(). */ void iobuf_gc(struct iobuf *iobuf); /** Return true if there is no input and no output. */ static inline bool iobuf_is_idle(struct iobuf *iobuf) { return ibuf_size(&iobuf->in) == 0 && obuf_size(&iobuf->out) == 0; } /** * Network readahead. A signed integer to avoid * automatic type coercion to an unsigned type. */ extern int cfg_readahead; static inline void iobuf_init_readahead(int readahead) { cfg_readahead = readahead; } /* }}} */ #endif /* TARANTOOL_IOBUF_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/coio_buf.h0000664000000000000000000000565512202131537017350 0ustar rootroot#ifndef TARANTOOL_COIO_BUF_H_INCLUDED #define TARANTOOL_COIO_BUF_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "coio.h" #include "iobuf.h" /** Buffered cooperative IO */ /** * Read at least sz bytes, buffered. * Return the number of bytes read (can be less than n in case * of EOF). */ static inline ssize_t coio_bread(struct ev_io *coio, struct ibuf *buf, size_t sz) { ibuf_reserve(buf, sz); ssize_t n = coio_read_ahead(coio, buf->end, sz, ibuf_unused(buf)); buf->end += n; return n; } /** * Read at least sz bytes buffered or until a timeout reached. * Return the amount of bytes read (can be less than sz * in case of EOF or timeout). */ static inline ssize_t coio_bread_timeout(struct ev_io *coio, struct ibuf *buf, size_t sz, ev_tstamp timeout) { ibuf_reserve(buf, sz); ssize_t n = coio_read_ahead_timeout(coio, buf->end, sz, ibuf_unused(buf), timeout); buf->end += n; return n; } /** Read at least sz bytes, buffered. Throw an exception in case of EOF. */ static inline ssize_t coio_breadn(struct ev_io *coio, struct ibuf *buf, size_t sz) { ibuf_reserve(buf, sz); ssize_t n = coio_readn_ahead(coio, buf->end, sz, ibuf_unused(buf)); buf->end += n; return n; } /** Reat at least sz bytes, buffered. Throw an exception in case * of EOF. * @return the number of bytes read. Can be less than sz in * case of timeout. */ static inline ssize_t coio_breadn_timeout(struct ev_io *coio, struct ibuf *buf, size_t sz, ev_tstamp timeout) { ibuf_reserve(buf, sz); ssize_t n = coio_readn_ahead_timeout(coio, buf->end, sz, ibuf_unused(buf), timeout); buf->end += n; return n; } #endif /* TARANTOOL_COIO_BUF_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/replication.h0000664000000000000000000000365412202131537020071 0ustar rootroot#ifndef TARANTOOL_REPLICATION_H_INCLUDED #define TARANTOOL_REPLICATION_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "tarantool/util.h" /** * Check replication configuration. * * @param config config file to check. * * @return 0 on success, -1 on error */ int replication_check_config(struct tarantool_cfg *config); /** * Pre-fork replication spawner process. * * @return None. Panics and exits on error. */ void replication_prefork(); /** * Initialize replication module. * * @return None. Panics and exits on error. */ void replication_init(const char *bind_ipaddr, int replication_port); #endif // TARANTOOL_REPLICATION_H_INCLUDED tarantool-1.5.1.218.g1a69fd6/include/mutex.h0000664000000000000000000000670712202131537016724 0ustar rootroot#ifndef TARANTOOL_MUTEX_H_INCLUDED #define TARNATOOL_MUTEX_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include /** Mutex of cooperative multitasking environment. */ struct mutex { /** * The queue of fibers waiting on a mutex. * The first fiber owns the mutex. */ struct rlist queue; }; /** * Initialize the given mutex. * * @param m mutex to be initialized. */ static inline void mutex_create(struct mutex *m) { rlist_create(&m->queue); } static inline void mutex_destroy(struct mutex *m) { while (!rlist_empty(&m->queue)) { struct fiber *f = rlist_first_entry(&m->queue, struct fiber, state); rlist_del_entry(f, state); } } /** * Lock a mutex. If the mutex is already locked by another fiber, * waits for timeout. * * @param m mutex to be locked. * * @retval false success * @retval true timeout */ static inline bool mutex_lock_timeout(struct mutex *m, ev_tstamp timeout) { rlist_add_tail_entry(&m->queue, fiber, state); ev_tstamp start = timeout; while (timeout > 0) { struct fiber *f = rlist_first_entry(&m->queue, struct fiber, state); if (f == fiber) break; fiber_yield_timeout(timeout); timeout -= ev_now() - start; if (timeout <= 0) { rlist_del_entry(fiber, state); errno = ETIMEDOUT; return true; } } return false; } /** * Lock a mutex (no timeout). Waits indefinitely until * the current fiber can gain access to the mutex. */ static inline void mutex_lock(struct mutex *m) { (void) mutex_lock_timeout(m, TIMEOUT_INFINITY); } /** * Try to lock a mutex. Return immediately if the mutex is locked. * @retval false success * @retval true the mutex is locked. */ static inline bool mutex_trylock(struct mutex *m) { if (rlist_empty(&m->queue)) { mutex_lock(m); return false; } return true; } /** * Unlock a mutex. The fiber calling this function must * own the mutex. */ static inline void mutex_unlock(struct mutex *m) { struct fiber *f; f = rlist_first_entry(&m->queue, struct fiber, state); assert(f == fiber); rlist_del_entry(f, state); if (!rlist_empty(&m->queue)) { f = rlist_first_entry(&m->queue, struct fiber, state); fiber_wakeup(f); } } #endif /* TARANTOOL_MUTEX_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/lib/0000775000000000000000000000000012202131537016145 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/lib/small/0000775000000000000000000000000012202131537017255 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/lib/small/slab_cache.h0000664000000000000000000001432512202131537021477 0ustar rootroot#ifndef INCLUDES_TARANTOOL_SMALL_SLAB_CACHE_H #define INCLUDES_TARANTOOL_SMALL_SLAB_CACHE_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include "rlist.h" #ifdef __cplusplus extern "C" { #endif enum { /* * Slabs of "order" from 0 to 8 have size which is a power * of 2. They are obtained either using mmap(), or by * splitting an mmapped() slab of higher order (buddy * system). Memory address of such slab is aligned to * slab size. */ SLAB_ORDER_LAST = 10, /* * The last "order" contains huge slabs, allocated with * malloc(). This order is provided to make life of * slab_cache user easier, so that one doesn't have to * worry about allocation sizes larger than SLAB_MAX_SIZE. */ SLAB_HUGE = SLAB_ORDER_LAST + 1, /** Binary logarithm of SLAB_MIN_SIZE. */ SLAB_MIN_SIZE_LB = 12, /** Minimal size of an ordered slab, 4096 */ SLAB_MIN_SIZE = 1 << SLAB_MIN_SIZE_LB, /** Maximal size of an ordered slab, 1M */ SLAB_MAX_SIZE = SLAB_MIN_SIZE << SLAB_ORDER_LAST }; struct slab { /* * Next slab in the list of allocated slabs. Unused if * this slab has a buddy. Sic: if a slab is not allocated * but is made by a split of a larger (allocated) slab, * this member got to be left intact, to not corrupt * cache->allocated list. */ struct rlist next_in_cache; /** Next slab in slab_list->slabs list. */ struct rlist next_in_list; /** * Allocated size. * Is different from (SLAB_MIN_SIZE << slab->order) * when requested size is bigger than SLAB_MAX_SIZE * (i.e. slab->order is SLAB_CLASS_LAST). */ size_t size; /** Slab magic (for sanity checks). */ uint32_t magic; /** Base of lb(size) for ordered slabs. */ uint8_t order; /** * Only used for buddy slabs. If the buddy of the current * free slab is also free, both slabs are merged and * a free slab of the higher order emerges. */ uint8_t in_use; }; /** Allocation statistics. */ struct small_stats { size_t used; size_t total; }; static inline void small_stats_reset(struct small_stats *stats) { stats->used = stats->total = 0; } /** * A general purpose list of slabs. Is used * to store unused slabs of a certain order in the * slab cache, as well as to contain allocated * slabs of a specialized allocator. */ struct slab_list { struct rlist slabs; /** Total/used bytes in this list. */ struct small_stats stats; }; #define slab_list_add(list, slab, member) \ do { \ rlist_add_entry(&(list)->slabs, (slab), member);\ (list)->stats.total += (slab)->size; \ } while (0) #define slab_list_del(list, slab, member) \ do { \ rlist_del_entry((slab), member); \ (list)->stats.total -= (slab)->size; \ } while (0) static inline void slab_list_create(struct slab_list *list) { rlist_create(&list->slabs); small_stats_reset(&list->stats); } struct slab_cache { /** * Slabs are ordered by size, which is a multiple of two. * orders[0] contains slabs of size SLAB_MIN_SIZE * (order 0). orders[1] contains slabs of * 2 * SLAB_MIN_SIZE, and so on. The list only contains * unused slabs - a used slab is removed from the * slab_cache list and its next_in_list link may * be reused for some other purpose. * Note, that SLAB_HUGE slabs are not accounted * here, since they are never reused. */ struct slab_list orders[SLAB_ORDER_LAST + 1]; /** All allocated slabs used in the cache. * The stats reflect the total used/allocated * memory in the cache. */ struct slab_list allocated; }; void slab_cache_create(struct slab_cache *cache); void slab_cache_destroy(struct slab_cache *cache); struct slab * slab_get(struct slab_cache *cache, size_t size); struct slab * slab_get_with_order(struct slab_cache *cache, uint8_t order); void slab_put(struct slab_cache *cache, struct slab *slab); struct slab * slab_from_ptr(void *ptr, uint8_t order); /** Align a size. Alignment must be a power of 2 */ static inline size_t slab_size_align(size_t size, size_t alignment) { return (size + alignment - 1) & ~(alignment - 1); } /* Aligned size of slab meta. */ static inline size_t slab_sizeof() { return slab_size_align(sizeof(struct slab), sizeof(intptr_t)); } static inline size_t slab_size(struct slab *slab) { return slab->size - slab_sizeof(); } void slab_cache_check(struct slab_cache *cache); /** * Find the nearest power of 2 size capable of containing * a chunk of the given size. Adjust for SLAB_MIN_SIZE and * SLAB_MAX_SIZE. */ static inline uint8_t slab_order(size_t size) { assert(size <= UINT32_MAX); if (size <= SLAB_MIN_SIZE) return 0; if (size > SLAB_MAX_SIZE) return SLAB_HUGE; return (uint8_t) (CHAR_BIT * sizeof(uint32_t) - __builtin_clz((uint32_t) size - 1) - SLAB_MIN_SIZE_LB); } /** Convert slab order to the mmap()ed size. */ static inline intptr_t slab_order_size(uint8_t order) { assert(order <= SLAB_ORDER_LAST); return 1 << (order + SLAB_MIN_SIZE_LB); } #ifdef __cplusplus } /* extern "C" */ #endif #endif /* INCLUDES_TARANTOOL_SMALL_SLAB_CACHE_H */ tarantool-1.5.1.218.g1a69fd6/include/lib/small/region.h0000664000000000000000000001355712202131537020724 0ustar rootroot#ifndef INCLUDES_TARANTOOL_SMALL_REGION_H #define INCLUDES_TARANTOOL_SMALL_REGION_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include "rlist.h" #include "slab_cache.h" #ifdef __cplusplus extern "C" { #endif /** * Region allocator. * * Good for allocating objects of any size, as long as * all of them can be freed at once. Keeps a list of * order-of-page-size memory blocks, thus has no external * fragmentation. Does have a fair bit of internal fragmentation, * but only if average allocation size is close to the block size. * Therefore is ideal for a ton of small allocations of different * sizes. * * Under the hood, the allocator uses a page cache of * mmap()-allocated pages. Pages of the page cache are never * released back to the operating system. * * Thread-safety * ------------- * @todo, not thread safe ATM * * Errors * ---------------- * The only type of failure which can occur is a failure to * allocate memory. alloc() calls return NULL in this case. */ /** A memory region. * * A memory region is a list of memory blocks. * * It's possible to allocate a chunk of any size * from a region. * It's not possible, however, to free a single allocated * piece, all memory must be freed at once with region_reset() or * region_free(). */ enum { REGION_NAME_MAX = 30 }; struct region { struct slab_cache *cache; struct slab_list slabs; char name[REGION_NAME_MAX]; }; /** * Initialize a memory region. * @sa region_free(). */ static inline void region_create(struct region *region, struct slab_cache *cache) { region->cache = cache; slab_list_create(®ion->slabs); region->name[0] = '\0'; } /** * Free all allocated objects and release the allocated * blocks. */ void region_free(struct region *region); /** Internal: a single block in a region. */ struct rslab { /* * slab is a wrapper around struct slab - with a few * extra members. */ struct slab slab; uint32_t used; }; static inline size_t rslab_sizeof() { return slab_size_align(sizeof(struct rslab), sizeof(intptr_t)); } static inline void * rslab_data(struct rslab *slab) { return (char *) slab + rslab_sizeof(); } /** How much memory is available in a given block? */ static inline size_t rslab_unused(struct rslab *slab) { return slab->slab.size - rslab_sizeof() - slab->used; } /** * Allocate 'size' bytes from a block. * @pre block must have enough unused space */ static inline void * slab_alloc(struct rslab *slab, size_t size) { assert(size <= rslab_unused(slab)); char *ptr = (char*)rslab_data(slab) + slab->used; slab->used += size; return ptr; } void * region_alloc_slow(struct region *region, size_t size); /** Allocate size bytes from a region. */ static inline void * region_alloc_nothrow(struct region *region, size_t size) { if (! rlist_empty(®ion->slabs.slabs)) { struct rslab *slab = rlist_first_entry(®ion->slabs.slabs, struct rslab, slab.next_in_list); if (size <= rslab_unused(slab)) { region->slabs.stats.used += size; return slab_alloc(slab, size); } } return region_alloc_slow(region, size); } /** * Mark region as empty, but keep the blocks. */ static inline void region_reset(struct region *region) { if (! rlist_empty(®ion->slabs.slabs)) { struct rslab *slab = rlist_first_entry(®ion->slabs.slabs, struct rslab, slab.next_in_list); region->slabs.stats.used -= slab->used; slab->used = 0; } } /** How much memory is used by this region. */ static inline size_t region_used(struct region *region) { return region->slabs.stats.used; } /** How much memory is held by this region. */ static inline size_t region_total(struct region *region) { return region->slabs.stats.total; } static inline void region_free_after(struct region *region, size_t after) { if (region_used(region) > after) region_free(region); } void region_truncate(struct region *pool, size_t sz); static inline void region_set_name(struct region *region, const char *name) { snprintf(region->name, sizeof(region->name), "%s", name); } static inline const char * region_name(struct region *region) { return region->name; } #if defined(__cplusplus) #include "exception.h" static inline void * region_alloc(struct region *region, size_t size) { void *ptr = region_alloc_nothrow(region, size); if (ptr == NULL) tnt_raise(LoggedError, ER_MEMORY_ISSUE, size, "region", "new slab"); return ptr; } static inline void * region_calloc(struct region *region, size_t size) { return memset(region_alloc(region, size), 0, size); } } /* extern "C" */ #endif #endif /* INCLUDES_TARANTOOL_SMALL_REGION_H */ tarantool-1.5.1.218.g1a69fd6/include/lib/small/small.h0000664000000000000000000001652112202131537020543 0ustar rootroot#ifndef INCLUDES_TARANTOOL_SMALL_SMALL_H #define INCLUDES_TARANTOOL_SMALL_SMALL_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "lib/small/mempool.h" #ifdef __cplusplus extern "C" { #endif /** * Small object allocator. * * The allocator consists of a collection of mempools. * * There are two containers of pools: * * pools for objects of size 8-500 bytes are stored in an array, * where pool->objsize of each array member is a multiple of 8-16 * (value defined in STEP_SIZE constant). These are * "stepped" pools, since pool->objsize of each next pool in the * array differs from the previous size by a fixed step size. * * For example, there is a pool for size range 16-32, * another one for 32-48, 48-64, etc. This makes the look up * procedure for small allocations just a matter of getting an * array index via a bit shift. All stepped pools are initialized * when an instance of small_alloc is created. * * Objects of size beyond the stepped pools range (the upper limit * is usually around 300 bytes), are stored in pools with a size * which is a multiple of alloc_factor. alloc_factor is itself * a configuration constant in the range (1.0, 2.0]. I.e. imagine * alloc_factor is 1.1, then there are pools for objects of size * 300-330, 330-363, and so on. These pools are created upon first * allocation within given range, and stored in a red-black tree. * * Initially this red-black tree contains only a pool for * alloc->object_max. * When a request for a new allocation of sz bytes arrives * and it can not be satisfied from a stepped pool, * a search for a nearest factored pool is made in the tree. * * If, for the nearest found factored pool: * * pool->objsize > sz * alloc_factor, * * (i.e. pool object size is too big) a new factored pool is * created and inserted into the tree. * * This way the tree only contains factored pools for sizes * which are actually used by the server, and can be kept * small. */ /** Basic constants of small object allocator. */ enum { /** How many stepped pools there is. */ STEP_POOL_MAX = 32, /** How many factored pools there can be. */ FACTOR_POOL_MAX = 256, }; /** * A mempool to store objects sized within one multiple of * alloc_factor. Is a member of the red-black tree which * contains all such pools. * * Example: let's assume alloc_factor is 1.1. There will be an * instance of factor_pool for objects of size from 300 to 330, * from 330 to 363, and so on. */ struct factor_pool { /** rb_tree entry */ rb_node(struct factor_pool) node; /** the pool itself. */ struct mempool pool; /** * Objects starting from this size and up to * pool->objsize are stored in this factored * pool. */ size_t objsize_min; /** next free factor pool in the cache. */ struct factor_pool *next; }; typedef rb_tree(struct factor_pool) factor_tree_t; /** A slab allocator for a wide range of object sizes. */ struct small_alloc { uint32_t step_pool_objsize_max; /** * All slabs in all pools must be of the same order, * otherwise small_free() has no way to derive from * pointer its slab and then the pool. */ /** * An array of "stepped" pools, pool->objsize of adjacent * pools differ by a fixed size (step). */ struct mempool step_pools[STEP_POOL_MAX]; /** A cache for nodes in the factor_pools tree. */ struct factor_pool factor_pool_cache[FACTOR_POOL_MAX]; /** First free element in factor_pool_cache. */ struct factor_pool *factor_pool_next; /** * A red-black tree with "factored" pools, i.e. * each pool differs from its neighbor by a factor. */ factor_tree_t factor_pools; struct slab_cache *cache; /** * The factor used for factored pools. Must be > 1. * Is provided during initialization. */ float factor; /** All slabs in all mempools have the same order. */ uint8_t slab_order; }; /** Initialize a small memory allocator. */ void small_alloc_create(struct small_alloc *alloc, struct slab_cache *cache, uint32_t objsize_min, uint32_t objsize_max, float alloc_factor); /** Destroy the allocator and all allocated memory. */ void small_alloc_destroy(struct small_alloc *alloc); /** Allocate a piece of memory in the small allocator. * * @retval NULL the requested size is beyond objsize_max * or out of memory */ void * smalloc_nothrow(struct small_alloc *alloc, size_t size); /** Free memory chunk allocated by the small allocator. */ void smfree(struct small_alloc *alloc, void *ptr); /** * @brief Return an unique index associated with a chunk allocated * by the allocator. * * This index space is more dense than the pointers space, * especially in the least significant bits. This number is * needed because some types of box's indexes (e.g. BITSET) have * better performance then they operate on sequential offsets * (i.e. dense space) instead of memory pointers (sparse space). * * The calculation is based on SLAB number and the position of an * item within it. Current implementation only guarantees that * adjacent chunks from one SLAB will have consecutive indexes. * That is, if two chunks were sequentially allocated from one * chunk they will have sequential ids. If a second chunk was * allocated from another SLAB thеn the difference between indexes * may be more than one. * * @param ptr pointer to memory allocated in small_alloc * @return unique index */ size_t small_ptr_compress(struct small_alloc *alloc, void *ptr); void * small_ptr_decompress(struct small_alloc *alloc, size_t val); typedef void (*mempool_stats_cb)(void *cb_ctx, struct mempool_stats *stats); void small_stats(struct small_alloc *alloc, struct small_stats *totals, mempool_stats_cb cb, void *cb_ctx); #ifdef __cplusplus #include "exception.h" static inline void * smalloc(struct small_alloc *alloc, size_t size) { void *ptr = smalloc_nothrow(alloc, size); if (ptr == NULL) tnt_raise(LoggedError, ER_MEMORY_ISSUE, size, "small object allocator", "new slab"); return ptr; } static inline void * smalloc0(struct small_alloc *alloc, size_t size) { return memset(smalloc(alloc, size), 0, size); } } /* extern "C" */ #endif #endif /* INCLUDES_TARANTOOL_SMALL_SMALL_H */ tarantool-1.5.1.218.g1a69fd6/include/lib/small/mempool.h0000664000000000000000000001674012202131537021106 0ustar rootroot#ifndef INCLUDES_TARANTOOL_SMALL_MEMPOOL_H #define INCLUDES_TARANTOOL_SMALL_MEMPOOL_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include "lib/small/slab_cache.h" #define RB_COMPACT 1 #include "third_party/rb.h" #ifdef __cplusplus extern "C" { #endif /** * Pool allocator. * * Good for allocating tons of small objects of the same size. * Stores all objects in order-of-virtual-page-size memory blocks, * called slabs. Each object can be freed if necessary. There is * (practically) no allocation overhead. Internal fragmentation * may occur if lots of objects are allocated, and then many of * them are freed in reverse-to-allocation order. * * Under the hood, uses a slab cache of mmap()-allocated slabs. * Slabs of the slab cache are never released back to the * operating system. * * Thread-safety * ------------- * Calls to alloc() and free() on the same mempool instance must * be externally synchronized. Use of different instances in * different threads is thread-safe (but they must also be based * on distinct slab caches). * * Exception-safety * ---------------- * The only type of failure which can occur is a failure to * allocate memory. In case of such error, an exception * (ClientError, ER_OUT_OF_RESOURCES) is raised. _nothrow() * version of mempool_alloc() returns NULL rather than raises an * error in case of failure. */ typedef unsigned long mbitmap_t; enum { /** * At least this many bytes must be reserved * for free/occupied object bit map. */ MEMPOOL_MAP_SIZEOF = sizeof(mbitmap_t), /** * How many bits per bitmap, i.e. how many objects * a single bitmap can map. */ MEMPOOL_MAP_BIT = MEMPOOL_MAP_SIZEOF * CHAR_BIT, /** Mempool slab has to contain at least this many * objects, to ensure that overhead on bitmaps * for free/used objects is small. */ MEMPOOL_OBJ_MIN = 2 * MEMPOOL_MAP_BIT }; /** mslab - a standard slab formatted to store objects of equal size. */ struct mslab { struct slab slab; /** Index of the first bitmap element which has a free slot. */ uint32_t ffi; /** Number of available slots in the slab. */ uint32_t nfree; /** Used if this slab is a member of free_slabs tree. */ rb_node(struct mslab) node; /* Reference to the owning pool. */ struct mempool *pool; /** * A bitmap for free used/objects in the slab. * A bitmap rather than a free list is used since: * - this tends to keep allocations close to the * beginning of the slab, which is better for * cache locality * - it makes it possible to iterate over all * objects in a slab. */ mbitmap_t map[0]; }; static inline size_t mslab_sizeof() { return slab_size_align(sizeof(struct mslab), sizeof(intptr_t)); } typedef rb_tree(struct mslab) mslab_tree_t; /** A memory pool. */ struct mempool { /** The source of empty slabs. */ struct slab_cache *cache; /** All slabs. */ struct slab_list slabs; /** * Slabs with some amount of free space available are put * into this red-black tree, which is sorted by slab * address. A (partially) free slab with the smallest * address is chosen for allocation. This reduces internal * memory fragmentation across many slabs. */ mslab_tree_t free_slabs; /** * A completely empty slab which is not freed only to * avoid the overhead of slab_cache oscillation around * a single element allocation. */ struct mslab *spare; /** * The size of an individual object. All objects * allocated on the pool have the same size. */ uint32_t objsize; /** * Mempool slabs are ordered (@sa slab_cache.h for * definition of "ordered"). The order is calculated * when the pool is initialized. */ uint8_t slab_order; /** How many objects can fit in a slab. */ uint32_t objcount; /** * How many bytes of the slab are reserved for * slab map. */ uint32_t mapsize; }; /** Allocation statistics. */ struct mempool_stats { /** Object size. */ uint32_t objsize; /** Total objects allocated. */ uint32_t objcount; /** Size of the slab. */ uint32_t slabsize; /** Number of slabs. All slabs are of the same size. */ uint32_t slabcount; /** Memory used and booked but passive (to see fragmentation). */ struct small_stats totals; }; void mempool_stats(struct mempool *mempool, struct mempool_stats *stats); /** @todo: struct mempool_iterator */ void mempool_create_with_order(struct mempool *pool, struct slab_cache *cache, uint32_t objsize, uint8_t order); /** * Initialize a mempool. Tell the pool the size of objects * it will contain. * * objsize must be >= sizeof(mbitmap_t) * If allocated objects must be aligned, then objsize must * be aligned. The start of free area in a slab is always * uint64_t aligned. * * @sa mempool_destroy() */ static inline void mempool_create(struct mempool *pool, struct slab_cache *cache, uint32_t objsize) { /* Keep size-induced internal fragmentation within limits. */ size_t slab_size_min = objsize * MEMPOOL_OBJ_MIN; /* * Calculate the amount of usable space in a slab. * @note: this asserts that slab_size_min is less than * SLAB_ORDER_MAX. */ uint8_t order = slab_order(slab_size_min); return mempool_create_with_order(pool, cache, objsize, order); } /** * Free the memory pool and release all cached memory blocks. * @sa mempool_create() */ void mempool_destroy(struct mempool *pool); /** Allocate an object. */ void * mempool_alloc_nothrow(struct mempool *pool); /** * Free a single object. * @pre the object is allocated in this pool. */ void mempool_free(struct mempool *pool, void *ptr); /** How much memory is used by this pool. */ static inline size_t mempool_used(struct mempool *pool) { return pool->slabs.stats.used; } /** How much memory is held by this pool. */ static inline size_t mempool_total(struct mempool *pool) { return pool->slabs.stats.total; } #if defined(__cplusplus) #include "exception.h" static inline void * mempool_alloc(struct mempool *pool) { void *ptr = mempool_alloc_nothrow(pool); if (ptr == NULL) tnt_raise(LoggedError, ER_MEMORY_ISSUE, pool->objsize, "mempool", "new slab"); return ptr; } static inline void * mempool_calloc(struct mempool *pool) { return memset(mempool_alloc(pool), 0, pool->objsize); } } /* extern "C" */ #endif /* __cplusplus */ #endif /* INCLUDES_TARANTOOL_SMALL_MEMPOOL_H */ tarantool-1.5.1.218.g1a69fd6/include/lib/bitset/0000775000000000000000000000000012202131537017437 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/lib/bitset/bitset.h0000664000000000000000000001126312202131537021105 0ustar rootroot#ifndef TARANTOOL_LIB_BITSET_BITSET_H_INCLUDED #define TARANTOOL_LIB_BITSET_BITSET_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * @file * @brief Module to work with arrays of bits (bitsets) * * Bitset is an array of bits where each bit can be set or unset * independently. The bits of a @link bitset @endlink are indexed * by \a size_t position number. Initially all bits are set to * false. You can use any values in range [0,SIZE_MAX). The * container grows automatically. */ #include "tarantool/config.h" #include #include #include #include #if defined(DEBUG) #include /* for dumping debug output to FILE */ #endif /* defined(DEBUG) */ /** @cond false */ #define RB_COMPACT 1 #include /** @endcond */ #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ /** @cond false */ struct bitset_page { size_t first_pos; rb_node(struct bitset_page) node; size_t cardinality; uint8_t data[0]; }; typedef rb_tree(struct bitset_page) bitset_pages_t; /** @endcond */ /** * Bitset */ struct bitset { /** @cond false */ bitset_pages_t pages; size_t cardinality; void *(*realloc)(void *ptr, size_t size); /** @endcond */ }; /** * @brief Construct \a bitset * @param bitset bitset * @param realloc memory allocator to use */ void bitset_create(struct bitset *bitset, void *(*realloc)(void *ptr, size_t size)); /** * @brief Destruct \a bitset * @param bitset bitset */ void bitset_destroy(struct bitset *bitset); /** * @brief Test bit \a pos in \a bitset * @param bitset bitset * @param pos bit number * @retval true if \a pos is set in \a bitset * @retval false if \a pos is not set in \a bitset */ bool bitset_test(struct bitset *bitset, size_t pos); /** * @brief Set bit \a pos in \a bitset * @param bitset bitset * @param pos bit number * @retval 1 on success if previous value of \a pos was true * @retval 0 on success if previous value of \a pos was false * @retval -1 on memory error */ int bitset_set(struct bitset *bitset, size_t pos); /** * @brief Clear bit \a pos in \a bitset * @param bitset bitset * @param pos bit number * @retval 1 on success if previous value of \a pos was true * @retval 0 on success if previous value of \a pos was false * @retval -1 on memory error */ int bitset_clear(struct bitset *bitset, size_t pos); /** * @brief Return the number of bits set to \a true in \a bitset. * @param bitset bitset * @return returns the number of bits set to \a true in \a bitset. */ inline size_t bitset_cardinality(const struct bitset *bitset) { return bitset->cardinality; } /** * @brief Bitset Information structure * @see bitset_info */ struct bitset_info { /** Number of allocated pages */ size_t pages; /** Data (payload) size of one page (in bytes) */ size_t page_data_size; /** Full size of one page (in bytes, including padding and tree data) */ size_t page_total_size; /** A multiplier by which an address of page data is aligned **/ size_t page_data_alignment; }; /** * @brief Fill information about \a bitset * @param bitset bitset * @param stat structure to fill */ void bitset_info(struct bitset *bitset, struct bitset_info *info); #if defined(DEBUG) void bitset_dump(struct bitset *bitset, int verbose, FILE *stream); #endif /* defined(DEBUG) */ #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_LIB_BITSET_BITSET_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/lib/bitset/iterator.h0000664000000000000000000001037712202131537021451 0ustar rootroot#ifndef TARANTOOL_LIB_BITSET_ITERATOR_H_INCLUDED #define TARANTOOL_LIB_BITSET_ITERATOR_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * @file * @brief Iterator for @link bitset @endlink objects with * expression support. * * @link bitset_iterator @endlink is used to iterate over a result * of the evaluation a @link bitset_expr logical expression * @endlink on a set of bitsets. The iterator evaluates its * expression on the fly, without producing temporary bitsets. * Each iteration (@link bitset_iterator_next @endlink) returns * the next position where a given expression evaluates to true on * a given set of bitsets. * * @see expr.h */ #include #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ /** @cond false **/ struct bitset_iterator_conj; /** @endcond **/ /** * @brief Bitset Iterator */ struct bitset_iterator { /** @cond false **/ size_t size; size_t capacity; struct bitset_iterator_conj *conjs; struct bitset_page *page; struct bitset_page *page_tmp; void *(*realloc)(void *ptr, size_t size); struct bit_iterator page_it; /** @endcond **/ }; /** * @brief Construct \a it. * * The created iterator must be initialized by * @link bitset_iterator_init @endlink method before first usage. * @param it bitset iterator * @param realloc memory allocator to use */ void bitset_iterator_create(struct bitset_iterator *it, void *(*realloc)(void *ptr, size_t size)); /** * @brief Destruct \a it. * @param it bitset iterator */ void bitset_iterator_destroy(struct bitset_iterator *it); /** * @brief Initialize the \a it using \a expr and \a bitsets and rewind the * iterator to the start position. * * @note It is safe to reinitialize an iterator with a new expression and new * bitsets. All internal buffers are safely reused in this case with minimal * number of new allocations. * * @note @a expr object is only used during initialization time and can be * safetly reused or destroyed just after this call. * * @param it bitset iterator * @param expr bitset expression * @param bitsets array of pointers to bitsets that should be used to bind * the expression parameters. * @param size of @a bitsets array * @retval 0 on success * @retval -1 on memory error * @see expr.h */ int bitset_iterator_init(struct bitset_iterator *it, struct bitset_expr *expr, struct bitset **bitsets, size_t bitsets_size); /** * @brief Rewind the \a it to the start position. * @param it bitset iterator * @see @link bitset_iterator_init @endlink */ void bitset_iterator_rewind(struct bitset_iterator *it); /** * @brief Move \a it to a next position * @param it bitset iterator * @return the next offset where the expression evaluates to true * or SIZE_MAX if there is no more bits in the result set. * @see @link bitset_iterator_init @endlink */ size_t bitset_iterator_next(struct bitset_iterator *it); #if defined(__cplusplus) } #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_LIB_BITSET_ITERATOR_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/lib/bitset/index.h0000664000000000000000000002365412202131537020731 0ustar rootroot#ifndef TARANTOOL_LIB_BITSET_INDEX_H_INCLUDED #define TARANTOOL_LIB_BITSET_INDEX_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * @file * @brief bitset_index - a bit index based on @link bitset @endlink. * * @section Purpose * * bitset_index is an associative container that stores (key, * value) pairs in a way that is optimized for searching values * matching a logical expressions on bits of the key. The * organization structure of bitset_index makes it easy to respond * to queries like 'return all (key, value) pairs where the key * has bit i and bit j set'. The implementation supports * evaluation of arbitrary logical expressions represented in * Disjunctive Normal Form. * * To search over keys in a bitset_index, a logical expression * needs to be constructed. * logical expression. The expression can be constructed one time * and used for multiple queries. A search for an exact match for * a given key is not what bitset_index is designed for -- * a conventional TREE or HASH index suits this task better. * * @section Organization * * bitset_index is a compressed bit matrix with dimensions N+1xK, * where N corresponds to the bit count of the longest key present * in the index, and K is the maximal value present in the index. * Each column in the matrix stands for a single bit of the key * and is represented by a single bitset. * If there is value k, which corresponding key has bit i set, * then bitset i+1 will have bit k set. * For example, if a pair with (key, value) is inserted to the * index and its key, has 0, 2, 5, 6 bits set then bitsets #1, #3, * #6, #7 are set at position = pair.value (@link bitset_test * bitset_test(bitset, pair.value) @endlink is true) and bitsets * #2, #4, #7 , ... are unset at the position. * * bitset_index also uses a special bitset #0 that is set to true * for each position where a pair with value = position exists in * an index. This bitset is mostly needed for evaluation * expressions with binary NOTs. * * A consequence of to the above design, is that in a bitset_index * one can have multiple pairs with same key, but all values in an * index must be unique. * * @section Performance * * For a certain kind of tasks bitset_index is more efficient both * speed- and memory- wise than a binary search tree or a hash * table. * * The complexity of @link bitset_insert @endlink operation is * mostly equivalent to inserting one value into \a k balanced * binary search trees, each of size \a m, where \a k is the number of * set bits in the key and \ m is the number of pairs in the index * divided by bitset page size. * * The complexity of iteration is linear from the number of pairs * in which the search expression evaluates to true. The * complexity of an iterator expression does not affect * iteration performance directly, which is more dependent * on the number of matching values. * * The actual performance heavily depends on the distribution of * values. If the value space is dense, then internal bitsets are * also compact and better optimized for iteration. * * @section Limitations * * Key size is limited only by the available memory. * bitset_index automatically resizes on 'insert' if a key * contains more bits than in any key inserted thus far. * * Since values are used as a position in bitsets, the actual * range of values must be in [0..SIZE_MAX) range. * * @see bitset.h * @see expr.h * @see iterator.h */ #include #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ /** * @brief BitsetIndex */ struct bitset_index { /** @cond false **/ /* Used bitsets */ struct bitset **bitsets; /* Capacity of bitsets array */ size_t capacity; /* Memory allocator to use */ void *(*realloc)(void *ptr, size_t size); /* A buffer used for rollback changes in bitset_insert */ char *rollback_buf; /** @endcond **/ }; /** * @brief Construct \a index * @param index bitset index * @param realloc memory allocator to use * @retval 0 on success * @retval -1 on memory error */ int bitset_index_create(struct bitset_index *index, void *(*realloc)(void *ptr, size_t size)); /** * @brief Destruct \a index * @param index bitset index */ void bitset_index_destroy(struct bitset_index *index); /** * @brief Insert (\a key, \a value) pair into \a index. * Only one pair with a given value can exist in the index. * If a pair with the same \a value exists, it is updated quietly. * This method is atomic, i.e. \a index will be in a consistent * state after a return even in case of error. * * @param index object * @param key key * @param key_size size of the key * @param value value * @retval 0 on success * @retval -1 on memory error */ int bitset_index_insert(struct bitset_index *index, const void *key, size_t key_size, size_t value); /** * @brief Remove a pair with \a value (*, \a value) from \a index. * @param index bitset index * @param value value */ void bitset_index_remove_value(struct bitset_index *index, size_t value); /** * @brief Initialize \a expr to iterate over a bitset index. * The \a expr can be then passed to @link bitset_index_init_iterator @endlink. * * 'All' algorithm. Matches all pairs in a index. * * @param expr bitset expression * @retval 0 on success * @retval -1 on memory error * @see @link bitset_index_init_iterator @endlink * @see expr.h */ int bitset_index_expr_all(struct bitset_expr *expr); /** * @brief Initialize \a expr to iterate over a bitset index. * The \a expr can be then passed to @link bitset_index_init_iterator @endlink. * * 'Equals' algorithm. Matches all pairs where \a key exactly equals to * pair.key (\a key == pair.key). * * @param expr bitset expression * @param key key * @param key_size of \a key (in char, as sizeof returns) * @retval 0 on success * @retval -1 on memory error * @see @link bitset_index_init_iterator @endlink * @see expr.h */ int bitset_index_expr_equals(struct bitset_expr *expr, const void *key, size_t key_size); /** * @brief Initialize \a expr to iterate over a bitset index. * The \a expr can be then passed to @link bitset_index_init_iterator @endlink. * * 'All-Bits-Set' algorithm. Matches all pairs where all bits from \a key * are set in pair.key ((\a key & pair.key) == \a key). * * @param expr bitset expression * @retval 0 on success * @retval -1 on memory error * @see @link bitset_index_init_iterator @endlink * @see expr.h */ int bitset_index_expr_all_set(struct bitset_expr *expr, const void *key, size_t key_size); /** * @brief Initialize \a expr to iterate over a bitset index. * The \a expr can then be passed to @link bitset_index_init_iterator @endlink. * * 'Any-Bits-Set' algorithm. Matches all pairs where at least one bit from * \a key is set in pair.key ((\a key & pair.key) != 0). * * @param expr bitset expression * @retval 0 on success * @retval -1 on memory error * @see @link bitset_index_init_iterator @endlink * @see expr.h */ int bitset_index_expr_any_set(struct bitset_expr *expr, const void *key, size_t key_size); /** * @brief Initialize \a expr to iterate over a bitset index. * The \a expr can be then passed to @link bitset_index_init_iterator @endlink. * * 'All-Bits-Not-Set' algorithm. Matches all pairs in the \a index, where all * bits from the \a key is not set in pair.key ((\a key & pair.key) == 0). * * @param expr bitset expression * @retval 0 on success * @retval -1 on memory error * @see @link bitset_index_init_iterator @endlink * @see expr.h */ int bitset_index_expr_all_not_set(struct bitset_expr *expr, const void *key, size_t key_size); /** * @brief Initialize \a it using \a expr and bitsets used in \a index. * * @param index bitset index * @param it bitset iterator * @param expr bitset expression * @retval 0 on success * @retval 1 on memory error */ int bitset_index_init_iterator(struct bitset_index *index, struct bitset_iterator *it, struct bitset_expr *expr); /** * @brief Checks if a (*, \a value) pair exists in \a index * @param index bitset index * @param value * @retval true if \a index contains pair with the \a value * @retval false otherwise */ bool bitset_index_contains_value(struct bitset_index *index, size_t value); /** * @brief Return the number of pairs in \a index. * @param index bitset index * @return number of pairs in \a index */ inline size_t bitset_index_size(const struct bitset_index *index) { return bitset_cardinality(index->bitsets[0]); } #if defined(DEBUG) void bitset_index_dump(struct bitset_index *index, int verbose, FILE *stream); #endif /* defined(DEBUG) */ #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_LIB_BITSET_INDEX_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/lib/bitset/expr.h0000664000000000000000000001121112202131537020562 0ustar rootroot#ifndef TARANTOOL_LIB_BITSET_EXPR_H_INCLUDED #define TARANTOOL_LIB_BITSET_EXPR_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * @file * @brief Expressions on bitsets. * * This library provides full support for evaluation of logical expressions * on @link bitset bitsets @endlink. One can prepare an arbitrary logical * expression in Disjunctive normal form (DNF) using @link bitset_expr @endlink * methods and then evaluate the expression on the set of @link bitset @endlink * objects. Currently only @link bitset_iterator @endlink supports expressions. * It can be used for performing iteration over the expression result on the fly, * without producing temporary bitsets. * * @link bitset_expr @endlink holds any expression that can be represented * in DNF form. Since every propositional formula can be represented using DNF, * one can construct any such logical expression using methods from this module. * * A DNF example: (~b0 & b1 & ~b2) | (b2 & ~b3 & b4) | (b3 & b6) * where b[0-9] is an arbitrary bitset. * * @link bitset_expr @endlink does not operate directly on @link bitset @endlink * objects. Instead of this, one should use placeholders (identifiers) * which will be bound to the actual bitsets by the selected evaluator * (e.g. bitset_iterator). * * @link http://en.wikipedia.org/wiki/Disjunctive_normal_form @endlink * @note Reduce operations in both cases are left-associate. * * @see bitset_iterator_init */ #include "bitset.h" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ /** @cond false **/ struct bitset_expr_conj { size_t size; size_t capacity; size_t *bitset_ids; bool *pre_nots; }; /** @endcond **/ /** * @brief Bitset Expression */ struct bitset_expr { /** @cond false **/ /** Size of \a conjs array **/ size_t size; /** Capacity of \a conjs array **/ size_t capacity; /** Array of conjunctions **/ struct bitset_expr_conj *conjs; /** Memory allocator **/ void *(*realloc)(void *ptr, size_t size); /** @endcond **/ }; /** * @brief Construct bitset expression \a expr * @param expr bitset expression * @param realloc memory allocator to use */ void bitset_expr_create(struct bitset_expr *expr, void *(*realloc)(void *ptr, size_t size)); /** * @brief Destruct bitset expression \a expr * @param expr bitset expression */ void bitset_expr_destroy(struct bitset_expr *expr); /** * @brief Clear @a expr (remove all conjunctions from it) * @param expr bitset expression * @note Allocated memory is not freed. One can continue using the object * after this operation. Use @link bitset_expr_destroy @endlink to destroy * the object completely. */ void bitset_expr_clear(struct bitset_expr *expr); /** * @brief Add a new conjunction to \a expr. * @param expr bitset expression * @retval 0 on success * @retval -1 on memory error */ int bitset_expr_add_conj(struct bitset_expr *expr); /** * @brief Add a new placeholder for a bitset to the current conjunction. * @param expr bitset expression * @param bitset_id identifier of a bitset (placeholder) * @param pre_not if set to true, then logical NOT will be performed on * the bitset during evaluation process. * @retval 0 on success * @retval -1 on memory error */ int bitset_expr_add_param(struct bitset_expr *expr, size_t bitset_id, bool pre_not); #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_LIB_BITSET_EXPR_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/lib/bit/0000775000000000000000000000000012202131537016723 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/lib/bit/bit.h0000664000000000000000000002711112202131537017654 0ustar rootroot#ifndef TARANTOOL_LIB_BIT_BIT_H_INCLUDED #define TARANTOOL_LIB_BIT_BIT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * @file * @brief Bit manipulation library */ #include "tarantool/config.h" #include #include #include #if defined(HAVE_FFSL) || defined(HAVE_FFSLL) #include #include #endif /* defined(HAVE_FFSL) || defined(HAVE_FFSLL) */ #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ /** @cond false **/ #define bit_likely(x) __builtin_expect((x),1) #define bit_unlikely(x) __builtin_expect((x),0) /** @endcond **/ /** * @brief Test bit \a pos in memory chunk \a data * @param data memory chunk * @param pos bit number (zero-based) * @retval true bit \a pos is set in \a data * @retval false otherwise */ inline bool bit_test(const void *data, size_t pos) { size_t chunk = pos / CHAR_BIT; size_t offset = pos % CHAR_BIT; const unsigned char *cdata = (const unsigned char *) data; return (cdata[chunk] >> offset) & 0x1; } /** * @brief Set bit \a pos in a memory chunk \a data * @param data memory chunk * @param pos bit number (zero-based) * @return previous value * @see bit_test * @see bit_clear */ inline bool bit_set(void *data, size_t pos) { size_t chunk = pos / CHAR_BIT; size_t offset = pos % CHAR_BIT; unsigned char *cdata = (unsigned char *) data; bool prev = (cdata[chunk] >> offset) & 0x1; cdata[chunk] |= (1U << offset); return prev; } /** * @brief Clear bit \a pos in memory chunk \a data * @param data memory chunk * @param pos bit number (zero-based) * @return previous value * @see bit_test * @see bit_set */ inline bool bit_clear(void *data, size_t pos) { size_t chunk = pos / CHAR_BIT; size_t offset = pos % CHAR_BIT; unsigned char *cdata = (unsigned char *) data; bool prev = (cdata[chunk] >> offset) & 0x1; cdata[chunk] &= ~(1U << offset); return prev; } /** * @cond false * @brief Naive implementation of ctz. */ #define CTZ_NAIVE(x, bitsize) { \ if (x == 0) { \ return (bitsize); \ } \ \ int r = 0; \ for (; (x & 1) == 0; r++) { \ x >>= 1; \ } \ \ return r; \ } /** @endcond */ /** * @brief Count Trailing Zeros. * Returns the number of trailing 0-bits in @a x, starting at the least * significant bit position. If @a x is 0, the result is undefined. * @param x integer * @see __builtin_ctz() * @return the number trailing 0-bits */ inline int bit_ctz_u32(uint32_t x) { #if defined(HAVE_BUILTIN_CTZ) return __builtin_ctz(x); #elif defined(HAVE_FFSL) return ffsl(x) - 1; #else CTZ_NAIVE(x, sizeof(uint32_t) * CHAR_BIT); #endif } /** * @copydoc bit_ctz_u32 */ inline int bit_ctz_u64(uint64_t x) { #if defined(HAVE_BUILTIN_CTZLL) return __builtin_ctzll(x); #elif defined(HAVE_FFSLL) return ffsll(x) - 1; #else CTZ_NAIVE(x, sizeof(uint64_t) * CHAR_BIT); #endif } #undef CTZ_NAIVE /** * @cond false * @brief Naive implementation of clz. */ #define CLZ_NAIVE(x, bitsize) { \ if (x == 0) { \ return (bitsize); \ } \ \ int r = (bitsize); \ for (; x; r--) { \ x >>= 1; \ } \ \ return r; \ } /** @endcond */ /** * @brief Count Leading Zeros. * Returns the number of leading 0-bits in @a x, starting at the most * significant bit position. If @a x is 0, the result is undefined. * @param x integer * @see __builtin_clz() * @return the number of leading 0-bits */ inline int bit_clz_u32(uint32_t x) { #if defined(HAVE_BUILTIN_CLZ) return __builtin_clz(x); #else /* !defined(HAVE_BUILTIN_CLZ) */ CLZ_NAIVE(x, sizeof(uint32_t) * CHAR_BIT); #endif } /** * @copydoc bit_clz_u32 */ inline int bit_clz_u64(uint64_t x) { #if defined(HAVE_BUILTIN_CLZLL) return __builtin_clzll(x); #else /* !defined(HAVE_BUILTIN_CLZLL) */ CLZ_NAIVE(x, sizeof(uint64_t) * CHAR_BIT); #endif } #undef CLZ_NAIVE /** * @cond false * @brief Naive implementation of popcount. */ #define POPCOUNT_NAIVE(x, bitsize) { \ int r; \ for (r = 0; x; r++) { \ x &= (x-1); \ } \ \ return r; \ } /** @endcond */ /** * @brief Returns the number of 1-bits in @a x. * @param x integer * @see __builtin_popcount() * @return the number of 1-bits in @a x */ inline int bit_count_u32(uint32_t x) { #if defined(HAVE_BUILTIN_POPCOUNT) return __builtin_popcount(x); #else /* !defined(HAVE_BUILTIN_POPCOUNT) */ POPCOUNT_NAIVE(x, sizeof(uint32_t) * CHAR_BIT); #endif } /** * @copydoc bit_count_u32 */ inline int bit_count_u64(uint64_t x) { #if defined(HAVE_BUILTIN_POPCOUNTLL) return __builtin_popcountll(x); #else /* !defined(HAVE_BUILTIN_POPCOUNTLL) */ POPCOUNT_NAIVE(x, sizeof(uint64_t) * CHAR_BIT); #endif } #undef POPCOUNT_NAIVE /** * @brief Rotate @a x left by @a r bits * @param x integer * @param r number for bits to rotate * @return @a x rotated left by @a r bits */ inline uint32_t bit_rotl_u32(uint32_t x, int r) { /* gcc recognises this code and generates a rotate instruction */ return ((x << r) | (x >> (32 - r))); } /** * @copydoc bit_rotl_u32 */ inline uint64_t bit_rotl_u64(uint64_t x, int r) { /* gcc recognises this code and generates a rotate instruction */ return ((x << r) | (x >> (64 - r))); } /** * @copydoc bit_rotl_u32 */ __attribute__ ((const)) inline uintmax_t bit_rotl_umax(uintmax_t x, int r) { /* gcc recognises this code and generates a rotate instruction */ return ((x << r) | (x >> (sizeof(uintmax_t) * CHAR_BIT - r))); } /** * @brief Rotate @a x right by @a r bits * @param x integer * @param r number for bits to rotate * @return @a x rotated right by @a r bits * @todo Move this method to bit.h */ inline uint32_t bit_rotr_u32(uint32_t x, int r) { /* gcc recognises this code and generates a rotate instruction */ return ((x >> r) | (x << (32 - r))); } /** * @copydoc bit_rotr_u32 */ inline uint64_t bit_rotr_u64(uint64_t x, int r) { /* gcc recognises this code and generates a rotate instruction */ return ((x >> r) | (x << (64 - r))); } /** * @brief Returns a byte order swapped integer @a x. * This function does not take into account host architecture * (as it done by htonl / ntohl functions) and always returns @a x * with byte order swapped (BE -> LE if @a x is in BE and vice versa). * @param x integer * @return @a x with swapped bytes */ inline uint32_t bswap_u32(uint32_t x) { #if defined(HAVE_BUILTIN_BSWAP32) return __builtin_bswap32(x); #else /* !defined(HAVE_BUILTIN_BSWAP32) */ return ((x << 24) & UINT32_C(0xff000000)) | ((x << 8) & UINT32_C(0x00ff0000)) | ((x >> 8) & UINT32_C(0x0000ff00)) | ((x >> 24) & UINT32_C(0x000000ff)); #endif } /** * @copydoc bswap_u32 */ inline uint64_t bswap_u64(uint64_t x) { #if defined(HAVE_BUILTIN_BSWAP64) return __builtin_bswap64(x); #else /* !defined(HAVE_BUILTIN_BSWAP64) */ return ( (x << 56) & UINT64_C(0xff00000000000000)) | ( (x << 40) & UINT64_C(0x00ff000000000000)) | ( (x << 24) & UINT64_C(0x0000ff0000000000)) | ( (x << 8) & UINT64_C(0x000000ff00000000)) | ( (x >> 8) & UINT64_C(0x00000000ff000000)) | ( (x >> 24) & UINT64_C(0x0000000000ff0000)) | ( (x >> 40) & UINT64_C(0x000000000000ff00)) | ( (x >> 56) & UINT64_C(0x00000000000000ff)); #endif } /** * @brief Index bits in the @a x, i.e. find all positions where bits are set. * This method fills @a indexes array with found positions in increasing order. * @a offset is added to each index before putting it into @a indexes. * @param x integer * @param indexes memory array where found indexes are stored * @param offset a number added to each index * @return pointer to last+1 element in indexes array */ int * bit_index_u32(uint32_t x, int *indexes, int offset); /** * @copydoc bit_index_u32 */ int * bit_index_u64(uint64_t x, int *indexes, int offset); /** @cond false **/ #if defined(__x86_64__) /* Use bigger words on x86_64 */ #define ITER_UINT uint64_t #define ITER_CTZ bit_ctz_u64 #else #define ITER_UINT uint32_t #define ITER_CTZ bit_ctz_u32 #endif /** @endcond **/ /** * @brief The Bit Iterator */ struct bit_iterator { /** @cond false **/ /** Current word to process using ctz **/ ITER_UINT word; /** A bitmask that XORed with word (for set = false iteration) **/ ITER_UINT word_xor; /** A base offset of the word in bits **/ size_t word_base; /** A pointer to the start of a memory chunk **/ const char *start; /** A pointer to the next part of a memory chunk */ const char *next; /** A pointer to the end of a memory chunk */ const char *end; /** @endcond **/ }; /** * @brief Initialize bit iterator \a it * @param it bit iterator * @param data memory chunk * @param size size of the memory chunk \a data * @param set true to iterate over set bits or false to iterate over clear bits */ inline void bit_iterator_init(struct bit_iterator *it, const void *data, size_t size, bool set) { it->start = (const char *) data; it->next = it->start; it->end = it->next + size; it->word_xor = set ? 0 : (ITER_UINT) -1; it->word_base = 0; /* Check if size is a multiple of sizeof(ITER_UINT) */ const char *e = it->next + size % sizeof(ITER_UINT); if (bit_likely(it->next == e)) { it->word = *(ITER_UINT *) it->next; it->word ^= it->word_xor; it->next += sizeof(ITER_UINT); return; } it->word = it->word_xor; char *w = (char *) &it->word; while (it->next < e) { *w = *it->next; it->next++; w++; } it->word ^= it->word_xor; } /** * @brief Return a number of a next set bit in \a it or \a SIZE_MAX * if no bits are remain in \a it * @param it bit iterator * @retval a zero-based number of a next set bit in iterator \a it * @retval SIZE_MAX if \a it does not have more set bits */ inline size_t bit_iterator_next(struct bit_iterator *it) { while (bit_unlikely(it->word == 0)) { if (bit_unlikely(it->next >= it->end)) return SIZE_MAX; /* Extract the next word from memory */ it->word = *(ITER_UINT *) it->next; it->word ^= it->word_xor; it->word_base = (it->next - it->start) * CHAR_BIT; it->next += sizeof(ITER_UINT); } /* Find the position of a first traling bit in the current word */ int bit = ITER_CTZ(it->word); /* Remove the first trailing bit from the current word */ it->word &= it->word - 1; /* Add start position if the current word to the found bit */ return it->word_base + bit; } #undef ITER_CTZ #undef ITER_UINT #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_LIB_BIT_BIT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/exception.h0000664000000000000000000000640712202131537017555 0ustar rootroot#ifndef TARANTOOL_EXCEPTION_H_INCLUDED #define TARANTOOL_EXCEPTION_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "object.h" #include #include "errcode.h" #include "say.h" class Exception: public Object { public: const char * errmsg() const { return m_errmsg; } virtual void log() const = 0; protected: Exception(const char *file, unsigned line); /* The copy constructor is needed for C++ throw */ Exception(const Exception&); /* file name */ const char *m_file; /* line number */ unsigned m_line; /* error description */ char m_errmsg[TNT_ERRMSG_MAX]; }; class SystemError: public Exception { public: int errnum() const { return m_errnum; } virtual void log() const; protected: SystemError(const char *file, unsigned line); void init(const char *format, ...); void init(const char *format, va_list ap); private: /* system errno */ int m_errnum; }; class ClientError: public Exception { public: virtual void log() const; int errcode() const { return m_errcode; } ClientError(const char *file, unsigned line, uint32_t errcode, ...); /* A special constructor for lbox_raise */ ClientError(const char *file, unsigned line, const char *msg, uint32_t errcode); private: /* client errno code */ int m_errcode; }; class LoggedError: public ClientError { public: template LoggedError(const char *file, unsigned line, uint32_t errcode, Args ... args) : ClientError(file, line, errcode, args...) { /* TODO: actually calls ClientError::log */ log(); } }; class IllegalParams: public LoggedError { public: IllegalParams(const char *file, unsigned line, const char *msg); }; class ErrorInjection: public LoggedError { public: ErrorInjection(const char *file, unsigned line, const char *msg); }; #define tnt_raise(...) tnt_raise0(__VA_ARGS__) #define tnt_raise0(class, ...) do { \ say_debug("%s at %s:%i", #class, __FILE__, __LINE__); \ throw class(__FILE__, __LINE__, ##__VA_ARGS__); \ } while (0) #endif /* TARANTOOL_EXCEPTION_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/pickle.h0000664000000000000000000001420712202131537017023 0ustar rootroot#ifndef TARANTOOL_PICKLE_H_INCLUDED #define TARANTOOL_PICKLE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include "exception.h" /** * pickle (pick-little-endian) -- serialize/de-serialize data from * tuple and iproto binary formats. * * load_* - no boundary checking * pick_* - throws exception if no data in the buffer */ static inline uint32_t load_u32(const char **data) { const uint32_t *b = (const uint32_t *) *data; *data += sizeof(uint32_t); return *b; } static inline uint32_t load_varint32(const char **data) { assert(data != NULL && *data != NULL); const uint8_t *b = (const uint8_t *) *data; if (!(b[0] & 0x80)) { *data += 1; return (b[0] & 0x7f); } if (!(b[1] & 0x80)) { *data += 2; return (b[0] & 0x7f) << 7 | (b[1] & 0x7f); } if (!(b[2] & 0x80)) { *data += 3; return (b[0] & 0x7f) << 14 | (b[1] & 0x7f) << 7 | (b[2] & 0x7f); } if (!(b[3] & 0x80)) { *data += 4; return (b[0] & 0x7f) << 21 | (b[1] & 0x7f) << 14 | (b[2] & 0x7f) << 7 | (b[3] & 0x7f); } if (!(b[4] & 0x80)) { *data += 5; return (b[0] & 0x7f) << 28 | (b[1] & 0x7f) << 21 | (b[2] & 0x7f) << 14 | (b[3] & 0x7f) << 7 | (b[4] & 0x7f); } assert(false); return 0; } static inline uint32_t pick_varint32(const char **data, const char *end) { assert(data != NULL && *data != NULL); const uint8_t *b = (const uint8_t *) *data; ssize_t size = end - *data; if (unlikely(size < 1)) tnt_raise(IllegalParams, "varint is too short (expected 1+ bytes)"); if (!(b[0] & 0x80)) { *data += 1; return (b[0] & 0x7f); } if (unlikely(size < 2)) tnt_raise(IllegalParams, "varint is too short (expected 2+ bytes)"); if (!(b[1] & 0x80)) { *data += 2; return (b[0] & 0x7f) << 7 | (b[1] & 0x7f); } if (unlikely(size < 3)) tnt_raise(IllegalParams, "BER int is too short (expected 3+ bytes)"); if (!(b[2] & 0x80)) { *data += 3; return (b[0] & 0x7f) << 14 | (b[1] & 0x7f) << 7 | (b[2] & 0x7f); } if (unlikely(size < 4)) tnt_raise(IllegalParams, "BER int is too short (expected 4+ bytes)"); if (!(b[3] & 0x80)) { *data += 4; return (b[0] & 0x7f) << 21 | (b[1] & 0x7f) << 14 | (b[2] & 0x7f) << 7 | (b[3] & 0x7f); } if (unlikely(size < 5)) tnt_raise(IllegalParams, "BER int is too short (expected 5+ bytes)"); if (!(b[4] & 0x80)) { *data += 5; return (b[0] & 0x7f) << 28 | (b[1] & 0x7f) << 21 | (b[2] & 0x7f) << 14 | (b[3] & 0x7f) << 7 | (b[4] & 0x7f); } tnt_raise(IllegalParams, "incorrect BER integer format"); } #define pick_u(bits) \ static inline uint##bits##_t \ pick_u##bits(const char **begin, const char *end) \ { \ if (end - *begin < (bits)/8) \ tnt_raise(IllegalParams, \ "packet too short (expected "#bits" bits)");\ uint##bits##_t r = *(uint##bits##_t *)*begin; \ *begin += (bits)/8; \ return r; \ } pick_u(8) pick_u(16) pick_u(32) pick_u(64) static inline const char * pick_str(const char **data, const char *end, uint32_t size) { const char *str = *data; if (str + size > end) tnt_raise(IllegalParams, "packet too short (expected a field)"); *data += size; return str; } static inline const char * pick_field(const char **data, const char *end) { const char *field = *data; uint32_t field_len = pick_varint32(data, end); pick_str(data, end, field_len); return field; } static inline const char * pick_field_str(const char **data, const char *end, uint32_t *size) { *size = pick_varint32(data, end); return pick_str(data, end, *size); } static inline uint32_t pick_field_u32(const char **data, const char *end) { uint32_t size = pick_varint32(data, end); if (size != sizeof(uint32_t)) tnt_raise(IllegalParams, "incorrect packet format (expected a 32-bit int)"); return *(uint32_t *) pick_str(data, end, size); } static inline size_t varint32_sizeof(uint32_t value) { if (value < (1 << 7)) return 1; if (value < (1 << 14)) return 2; if (value < (1 << 21)) return 3; if (value < (1 << 28)) return 4; return 5; } /** The caller must ensure that there is space in the buffer */ static inline char * pack_varint32(char *buf, uint32_t value) { uint8_t *target = (uint8_t *) buf; if (value >= (1 << 7)) { if (value >= (1 << 14)) { if (value >= (1 << 21)) { if (value >= (1 << 28)) *(target++) = (uint8_t)(value >> 28) | 0x80; *(target++) = (uint8_t)(value >> 21) | 0x80; } *(target++) = (uint8_t)((value >> 14) | 0x80); } *(target++) = (uint8_t)((value >> 7) | 0x80); } *(target++) = (uint8_t)((value) & 0x7F); return (char *) target; } static inline char * pack_lstr(char *buf, const void *str, uint32_t len) { return (char *) memcpy(pack_varint32(buf, len), str, len) + len; } #define pack_u(bits) \ static inline char * \ pack_u##bits(char *buf, uint##bits##_t val) \ { \ *(uint##bits##_t *) buf = val; \ return buf + sizeof(uint##bits##_t); \ } pack_u(8) pack_u(16) pack_u(32) pack_u(64) #endif /* TARANTOOL_PICKLE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/stat.h0000664000000000000000000000340012202131537016520 0ustar rootroot#ifndef TARANTOOL_STAT_H_INCLUDED #define TARANTOOL_STAT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include void stat_init(void); void stat_free(void); void stat_cleanup(int base, size_t max_idx); int stat_register(const char **name, size_t count); extern int stat_max_name_len; void stat_collect(int base, int name, int64_t value); typedef int (*stat_cb)(const char *name, int rps, int64_t total, void *cb_ctx); int stat_foreach(stat_cb cb, void *cb_ctx); #endif /* TARANTOOL_STAT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/object.h0000664000000000000000000000310412202131537017014 0ustar rootroot#ifndef TARANTOOL_OBJECT_H_INCLUDED #define TARANTOOL_OBJECT_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ class Object { public: Object() { /* Nothing */ } virtual ~Object() { /* Nothing */ } Object(const Object&) = delete; Object& operator=(const Object&) = delete; }; #endif /* TARANTOOL_OBJECT_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/evio.h0000664000000000000000000001124112202131537016511 0ustar rootroot#ifndef TARANTOOL_EVIO_H_INCLUDED #define TARANTOOL_EVIO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * Asynchronous IO in libev event loop. * Requires a running libev loop. */ #include #include "tarantool_ev.h" #include "sio.h" /** * Exception-aware way to add a listening socket to the event * loop. Callbacks are invoked on bind and accept events. * * Coroutines/fibers are not used for port listeners * since listener's job is usually simple and only involves * creating a session for the accepted socket. The session itself * can be built around simple libev callbacks, or around * cooperative multitasking (on_accept callback can create * a fiber and use coio.h (cooperative multi-tasking I/O)) API. * * How to use a service: * struct evio_service *service; * service = malloc(sizeof(struct evio_service)); * evio_service_init(service, ..., on_accept_cb, ...); * evio_service_start(service); * ... * evio_service_stop(service); * free(service); * * If a service is not started, but only initialized, no * dedicated cleanup/destruction is necessary. */ struct evio_service { /** Service name. E.g. 'primary', 'secondary', etc. */ char name[SERVICE_NAME_MAXLEN]; /** Interface/port to bind to */ struct sockaddr_in addr; /** A callback invoked upon a successful bind, optional. * If on_bind callback throws an exception, it's * service start is aborted, and exception is re-thrown. */ void (*on_bind)(void *); void *on_bind_param; /** * A callback invoked on every accepted client socket. * It's OK to throw an exception in the callback: * when it happens, the exception is logged, and the * accepted socket is closed. */ void (*on_accept)(struct evio_service *, int, struct sockaddr_in *); void *on_accept_param; /** libev timer object for the bind retry delay. */ struct ev_timer timer; /** libev io object for the acceptor socket. */ struct ev_io ev; }; /** Initialize the service. Don't bind to the port yet. */ void evio_service_init(struct evio_service *service, const char *name, const char *host, int port, void (*on_accept)(struct evio_service *, int, struct sockaddr_in *), void *on_accept_param); /** Set an optional callback to be invoked upon a successful bind. */ static inline void evio_service_on_bind(struct evio_service *service, void (*on_bind)(void *), void *on_bind_param) { service->on_bind = on_bind; service->on_bind_param = on_bind_param; } /** Bind to the port and begin listening. */ void evio_service_start(struct evio_service *service); /** If started, stop event flow and close the acceptor socket. */ void evio_service_stop(struct evio_service *service); void evio_socket(struct ev_io *coio, int domain, int type, int protocol); void evio_close(struct ev_io *evio); static inline bool evio_is_active(struct ev_io *ev) { return ev->fd >= 0; } static inline void evio_timeout_init(ev_tstamp *start, ev_tstamp *delay, ev_tstamp timeout) { *start = ev_now(); *delay = timeout; } static inline void evio_timeout_update(ev_tstamp start, ev_tstamp *delay) { ev_tstamp elapsed = ev_now() - start; *delay = (elapsed >= *delay) ? 0 : *delay - elapsed; } void evio_setsockopt_tcp(int fd); void evio_setsockopt_tcpserver(int fd); void evio_bind_addrinfo(struct ev_io *coio, struct addrinfo *ai); int evio_pton(const char *addr, const char *port, struct sockaddr_storage *sa, socklen_t *salen); #endif /* TARANTOOL_EVIO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/assoc.h0000664000000000000000000000535112231715257016675 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #if !MH_SOURCE #define MH_UNDEF #endif /* * Map: (i32) => (void *) */ #define mh_name _i32ptr struct mh_i32ptr_node_t { uint32_t key; void *val; }; #define mh_node_t struct mh_i32ptr_node_t #define mh_arg_t void * #define mh_hash(a, arg) (a->key) #define mh_eq(a, b, arg) ((a->key) == (b->key)) #include /* * Map: (i64) => (void *) */ #define mh_name _i64ptr struct mh_i64ptr_node_t { uint64_t key; void *val; }; #define mh_node_t struct mh_i64ptr_node_t #define mh_int_t uint32_t #define mh_arg_t void * #define mh_hash(a, arg) ((uint32_t)((a->key)>>33^(a->key)^(a->key)<<11)) #define mh_eq(a, b, arg) ((a->key) == (b->key)) #include /* * Map: (char *) => (void *) */ static inline int lstrcmp(const char *a, const char *b) { unsigned int al, bl; al = load_varint32(&a); bl = load_varint32(&b); if (al != bl) return bl - al; return memcmp(a, b, al); } #include #define mh_name _lstrptr struct mh_lstrptr_node_t { const char *key; void *val; }; #define mh_node_t struct mh_lstrptr_node_t #define mh_int_t uint32_t #define mh_arg_t void * static inline uint32_t mh_strptr_hash(const mh_node_t *a, mh_arg_t arg) { (void) arg; const char *_k = a->key; const uint32_t l = load_varint32(&_k); return PMurHash32(13, _k, l); } #define mh_hash(a, arg) mh_strptr_hash(a, arg) #define mh_eq(a, b, arg) (lstrcmp(a->key, b->key) == 0) #include tarantool-1.5.1.218.g1a69fd6/include/recovery.h0000664000000000000000000001140212231715276017416 0ustar rootroot#ifndef TARANTOOL_RECOVERY_H_INCLUDED #define TARANTOOL_RECOVERY_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include "tarantool/util.h" #include "tarantool_ev.h" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ struct fiber; struct tbuf; #define RECOVER_READONLY 1 typedef int (row_handler)(void *, const char *, uint32_t); /** A "condition variable" that allows fibers to wait when a given * LSN makes it to disk. */ struct wait_lsn { struct fiber *waiter; int64_t lsn; }; void wait_lsn_set(struct wait_lsn *wait_lsn, int64_t lsn); inline static void wait_lsn_clear(struct wait_lsn *wait_lsn) { wait_lsn->waiter = NULL; wait_lsn->lsn = 0LL; } struct wal_writer; struct wal_watcher; /** Master connection */ struct remote { struct sockaddr_in addr; struct fiber *reader; uint64_t cookie; ev_tstamp recovery_lag, recovery_last_update_tstamp; }; enum wal_mode { WAL_NONE = 0, WAL_WRITE, WAL_FSYNC, WAL_FSYNC_DELAY, WAL_MODE_MAX }; /** String constants for the supported modes. */ extern const char *wal_mode_STRS[]; struct recovery_state { int64_t lsn, confirmed_lsn; /* The WAL we're currently reading/writing from/to. */ struct log_io *current_wal; struct log_dir *snap_dir; struct log_dir *wal_dir; struct wal_writer *writer; struct wal_watcher *watcher; struct remote *remote; /** * row_handler is a module callback invoked during initial * recovery and when reading rows from the master. It is * presented with the most recent format of data. * row_reader is responsible for converting data from old * formats. */ row_handler *row_handler; void *row_handler_param; uint64_t snap_io_rate_limit; int rows_per_wal; int flags; double wal_fsync_delay; struct wait_lsn wait_lsn; enum wal_mode wal_mode; bool finalize; }; extern struct recovery_state *recovery_state; void recovery_init(const char *snap_dirname, const char *xlog_dirname, row_handler row_handler, void *row_handler_param, int rows_per_wal, int flags); void recovery_update_mode(struct recovery_state *r, const char *wal_mode, double fsync_delay); void recovery_update_io_rate_limit(struct recovery_state *r, double new_limit); void recovery_free(); void recover_snap(struct recovery_state *); void recover_existing_wals(struct recovery_state *); void recovery_follow_local(struct recovery_state *r, ev_tstamp wal_dir_rescan_delay); void recovery_finalize(struct recovery_state *r); int wal_write(struct recovery_state *r, int64_t lsn, uint64_t cookie, uint16_t op, const char *data, uint32_t len); void recovery_setup_panic(struct recovery_state *r, bool on_snap_error, bool on_wal_error); void confirm_lsn(struct recovery_state *r, int64_t lsn, bool is_commit); int64_t next_lsn(struct recovery_state *r); void set_lsn(struct recovery_state *r, int64_t lsn); void recovery_wait_lsn(struct recovery_state *r, int64_t lsn); int read_log(const char *filename, row_handler xlog_handler, row_handler snap_handler, void *param); void recovery_follow_remote(struct recovery_state *r, const char *addr); void recovery_stop_remote(struct recovery_state *r); struct fio_batch; void snapshot_write_row(struct log_io *i, struct fio_batch *batch, const char *metadata, size_t metadata_size, const char *data, size_t data_size); void snapshot_save(struct recovery_state *r, void (*loop) (struct log_io *, struct fio_batch *)); #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_RECOVERY_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/palloc.h0000664000000000000000000000527012202131537017026 0ustar rootroot#ifndef TARANTOOL_PALLOC_H_INCLUDED #define TARANTOOL_PALLOC_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include "tarantool/util.h" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ #define PALLOC_POOL_NAME_MAXLEN 30 struct tbuf; struct palloc_pool; extern struct palloc_pool *eter_pool; int palloc_init(void); void palloc_free(void); void *palloc(struct palloc_pool *pool, size_t size) __attribute__((regparm(2))); void *p0alloc(struct palloc_pool *pool, size_t size) __attribute__((regparm(2))); void *palloca(struct palloc_pool *pool, size_t size, size_t align); void prelease(struct palloc_pool *pool); void palloc_reset(struct palloc_pool *pool); void ptruncate(struct palloc_pool *pool, size_t sz); void prelease_after(struct palloc_pool *pool, size_t after); struct palloc_pool *palloc_create_pool(const char *name); void palloc_destroy_pool(struct palloc_pool *); void palloc_free_unused(void); /* Set a name of this pool. Does not copy the argument name. */ void palloc_set_name(struct palloc_pool *, const char *); const char *palloc_name(struct palloc_pool *); size_t palloc_allocated(struct palloc_pool *); void palloc_stat(struct tbuf *buf); static inline void * palloc_region_alloc(void *ctx, size_t size) { return palloc((struct palloc_pool *) ctx, size); } #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_PALLOC_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/session.h0000664000000000000000000000571112231715276017251 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include /** * Abstraction of a single user session: * for now, only provides accounting of established * sessions and on-connect/on-disconnect event * handling, in future: user credentials, protocol, etc. * Session identifiers grow monotonically. * 0 sid is reserved to mean 'no session'. */ /** * Create a session. * Invokes a Lua trigger box.session.on_connect if it is * defined. Issues a new session identifier. * Must called by the networking layer * when a new connection is established. * * @return handle for a created session * @exception tnt_Exception or lua error if session * trigger fails or runs out of resources. */ uint32_t session_create(int fd, uint64_t cookie); /** * Destroy a session. * Must be called by the networking layer on disconnect. * Invokes a Lua trigger box.session.on_disconnect if it * is defined. * @param session session to destroy. may be NULL. * * @exception none */ void session_destroy(uint32_t sid); /** * Return a file descriptor * associated with a session, or -1 if the * session doesn't exist. */ int session_fd(uint32_t sid); /** * Check whether a session exists or not. */ static inline bool session_exists(uint32_t sid) { return session_fd(sid) >= 0; } /** * Type of the callback which may be invoked * on connect or disconnect event. */ typedef void (*session_trigger_f)(void *); struct session_trigger { session_trigger_f trigger; void *param; }; /* The global on-connect trigger. */ extern struct session_trigger session_on_connect; /* The global on-disconnect trigger. */ extern struct session_trigger session_on_disconnect; void session_init(); void session_free(); tarantool-1.5.1.218.g1a69fd6/include/tarantool.h0000664000000000000000000000441412202131537017556 0ustar rootroot#ifndef TARANTOOL_H_INCLUDED #define TARANTOOL_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "tarantool/util.h" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ struct tarantool_cfg; struct tbuf; extern int snapshot_pid; extern struct tarantool_cfg cfg; extern const char *cfg_filename; extern char *cfg_filename_fullpath; extern bool booting; extern char *binary_filename; extern char *custom_proc_title; int reload_cfg(struct tbuf *out); void show_cfg(struct tbuf *out); int snapshot(void); const char *tarantool_version(void); double tarantool_uptime(void); void tarantool_free(void); char **init_set_proc_title(int argc, char **argv); void free_proc_title(int argc, char **argv); void set_proc_title(const char *format, ...); void title(const char *fmt, ...); #define DEFAULT_CFG_FILENAME "tarantool.cfg" #define DEFAULT_CFG SYSCONF_DIR "/" DEFAULT_CFG_FILENAME #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/crc32.h0000664000000000000000000000350612231715276016502 0ustar rootroot#ifndef TARANTOOL_CRC32_H_INCLUDED #define TARANTOOL_CRC32_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "tarantool/util.h" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ typedef uint32_t (*crc32_func)(uint32_t crc, const unsigned char *buf, unsigned int len); /* * Pointer to an architecture-specific implementation of * CRC32 calculation method. */ extern crc32_func crc32_calc; void crc32_init(); #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_CRC32_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/fiber.h0000664000000000000000000001171112231715276016652 0ustar rootroot#ifndef TARANTOOL_FIBER_H_INCLUDED #define TARANTOOL_FIBER_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/config.h" #include #include #include #include #include #include #include "third_party/queue.h" #if defined(__cplusplus) #include "exception.h" #endif /* defined(__cplusplus) */ #include "palloc.h" #include #define FIBER_NAME_MAXLEN PALLOC_POOL_NAME_MAXLEN #define FIBER_READING_INBOX (1 << 0) /** This fiber can be cancelled synchronously. */ #define FIBER_CANCELLABLE (1 << 1) /** Indicates that a fiber has been cancelled. */ #define FIBER_CANCEL (1 << 2) /** This fiber was created via stored procedures API. */ #define FIBER_USER_MODE (1 << 3) /** This fiber was marked as ready for wake up */ #define FIBER_READY (1 << 4) /** This is thrown by fiber_* API calls when the fiber is * cancelled. */ #if defined(__cplusplus) class FiberCancelException: public Exception { public: FiberCancelException(const char *file, unsigned line) : Exception(file, line) { /* Nothing */ } virtual void log() const { say_debug("FiberCancelException"); } }; #endif /* defined(__cplusplus) */ struct fiber { #ifdef ENABLE_BACKTRACE void *last_stack_frame; #endif int csw; struct tarantool_coro coro; /* A garbage-collected memory pool. */ struct palloc_pool *gc_pool; /** Fiber id. */ uint32_t fid; /** * Session id of the session the fiber is running * on behalf of. The concept of an associated session * is similar to the concept of controlling tty * in a UNIX process. When a fiber is created, * its sid is 0. If it's running a request on behalf * of a user connection, it's sid is changed to module- * generated identifier of the session. */ uint32_t sid; struct rlist link; struct rlist state; /* This struct is considered as non-POD when compiling by g++. * You can safetly ignore all offset_of-related warnings. * See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31488 */ void (*f) (va_list); va_list f_data; uint32_t flags; struct fiber *waiter; uint64_t cookie; }; extern __thread struct fiber *fiber; void fiber_init(void); void fiber_free(void); typedef void(*fiber_func)(va_list); struct fiber *fiber_new(const char *name, fiber_func f); void fiber_set_name(struct fiber *fiber, const char *name); int wait_for_child(pid_t pid); static inline const char * fiber_name(struct fiber *f) { return f->gc_pool ? palloc_name(f->gc_pool) : "(none)"; } void fiber_checkstack(); void fiber_yield(void); void fiber_yield_to(struct fiber *f); /** * @brief yield & check for timeout * @return true if timeout exceeded */ bool fiber_yield_timeout(ev_tstamp delay); void fiber_destroy_all(); void fiber_gc(void); void fiber_call(struct fiber *callee, ...); void fiber_wakeup(struct fiber *f); struct fiber *fiber_find(uint32_t fid); /** Cancel a fiber. A cancelled fiber will have * tnt_FiberCancelException raised in it. * * A fiber can be cancelled only if it is * FIBER_CANCELLABLE flag is set. */ void fiber_cancel(struct fiber *f); /** Check if the current fiber has been cancelled. Raises * tnt_FiberCancelException */ void fiber_testcancel(void); /** Make it possible or not possible to cancel the current * fiber. * * return previous state. */ bool fiber_setcancellable(bool enable); void fiber_sleep(ev_tstamp s); struct tbuf; void fiber_info(struct tbuf *out); void fiber_schedule(ev_watcher *watcher, int event __attribute__((unused))); /** * Attach this fiber to a session identified by sid and to a cookie. */ static inline void fiber_set_sid(struct fiber *f, uint32_t sid, uint64_t cookie) { f->sid = sid; f->cookie = cookie; } #endif /* TARANTOOL_FIBER_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/coro.h0000664000000000000000000000327512202131537016521 0ustar rootroot#ifndef TARANTOOL_CORO_H_INCLUDED #define TARANTOOL_CORO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include /* size_t */ #include struct tarantool_coro { coro_context ctx; void *stack; size_t stack_size; }; void tarantool_coro_create(struct tarantool_coro *ctx, void (*f) (void *), void *data); void tarantool_coro_destroy(struct tarantool_coro *ctx); #endif /* TARANTOOL_CORO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/mhash.h0000664000000000000000000003304112202131537016651 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* The MIT License Copyright (c) 2008, by Attractive Chaos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef MH_INCREMENTAL_RESIZE #define MH_INCREMENTAL_RESIZE 1 #endif #include #include #include #include #define mh_cat(a, b) mh##a##_##b #define mh_ecat(a, b) mh_cat(a, b) #define _mh(x) mh_ecat(mh_name, x) #define mh_unlikely(x) __builtin_expect((x),0) #ifndef MH_TYPEDEFS #define MH_TYPEDEFS 1 typedef uint32_t mh_int_t; #endif /* MH_TYPEDEFS */ #ifndef __ac_HASH_PRIME_SIZE #define __ac_HASH_PRIME_SIZE 31 static const mh_int_t __ac_prime_list[__ac_HASH_PRIME_SIZE] = { 3ul, 11ul, 23ul, 53ul, 97ul, 193ul, 389ul, 769ul, 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul }; #endif /* __ac_HASH_PRIME_SIZE */ #ifndef MH_HEADER #define MH_HEADER struct _mh(t) { mh_node_t *p; mh_int_t *b; mh_int_t n_buckets; mh_int_t n_dirty; mh_int_t size; mh_int_t upper_bound; mh_int_t prime; mh_int_t resize_cnt; mh_int_t resize_position; mh_int_t batch; struct _mh(t) *shadow; }; #define mh_exist(h, i) ({ h->b[i >> 4] & (1 << (i % 16)); }) #define mh_dirty(h, i) ({ h->b[i >> 4] & (1 << (i % 16 + 16)); }) #define mh_setfree(h, i) ({ h->b[i >> 4] &= ~(1 << (i % 16)); }) #define mh_setexist(h, i) ({ h->b[i >> 4] |= (1 << (i % 16)); }) #define mh_setdirty(h, i) ({ h->b[i >> 4] |= (1 << (i % 16 + 16)); }) #define mh_node(h, i) ((const mh_node_t *) &((h)->p[(i)])) #define mh_size(h) ({ (h)->size; }) #define mh_capacity(h) ({ (h)->n_buckets; }) #define mh_begin(h) ({ 0; }) #define mh_end(h) ({ (h)->n_buckets; }) #define mh_first(h) ({ \ mh_int_t i; \ for (i = 0; i < mh_end(h); i++) { \ if (mh_exist(h, i)) \ break; \ } \ i; \ }) #define mh_next(h, i) ({ \ mh_int_t n = i; \ if (n < mh_end(h)) { \ for (n = i + 1; n < mh_end(h); n++) { \ if (mh_exist(h, n)) \ break; \ } \ } \ n; \ }) #define mh_foreach(h, i) \ for (i = mh_first(h); i < mh_end(h); i = mh_next(h, i)) #define MH_DENSITY 0.7 struct _mh(t) * _mh(new)(); void _mh(clear)(struct _mh(t) *h); void _mh(delete)(struct _mh(t) *h); void _mh(resize)(struct _mh(t) *h, mh_arg_t arg); int _mh(start_resize)(struct _mh(t) *h, mh_int_t buckets, mh_int_t batch, mh_arg_t arg); void _mh(reserve)(struct _mh(t) *h, mh_int_t size, mh_arg_t arg); void __attribute__((noinline)) _mh(del_resize)(struct _mh(t) *h, mh_int_t x, mh_arg_t arg); void _mh(dump)(struct _mh(t) *h); #define put_slot(h, node, arg) \ _mh(put_slot)(h, node, arg) static inline mh_node_t * _mh(node)(struct _mh(t) *h, mh_int_t x) { return (mh_node_t *) &(h->p[x]); } static inline mh_int_t _mh(next_slot)(mh_int_t slot, mh_int_t inc, mh_int_t size) { slot += inc; return slot >= size ? slot - size : slot; } #if defined(mh_hash_key) && defined(mh_eq_key) /** * If it is necessary to search by something different * than a hash node, define mh_hash_key and mh_eq_key * and use mh_find(). */ static inline mh_int_t _mh(find)(struct _mh(t) *h, mh_key_t key, mh_arg_t arg) { (void) arg; mh_int_t k = mh_hash_key(key, arg); mh_int_t i = k % h->n_buckets; mh_int_t inc = 1 + k % (h->n_buckets - 1); for (;;) { if ((mh_exist(h, i) && mh_eq_key(key, mh_node(h, i), arg))) return i; if (!mh_dirty(h, i)) return h->n_buckets; i = _mh(next_slot)(i, inc, h->n_buckets); } } #endif static inline mh_int_t _mh(get)(struct _mh(t) *h, const mh_node_t *node, mh_arg_t arg) { (void) arg; mh_int_t k = mh_hash(node, arg); mh_int_t i = k % h->n_buckets; mh_int_t inc = 1 + k % (h->n_buckets - 1); for (;;) { if ((mh_exist(h, i) && mh_eq(node, mh_node(h, i), arg))) return i; if (!mh_dirty(h, i)) return h->n_buckets; i = _mh(next_slot)(i, inc, h->n_buckets); } } static inline mh_int_t _mh(random)(struct _mh(t) *h, mh_int_t rnd) { for (mh_int_t i = 0; i < mh_size(h); i++, rnd++) { rnd %= h->n_buckets; if (mh_exist(h, rnd)) return rnd; } return h->n_buckets; } static inline mh_int_t _mh(put_slot)(struct _mh(t) *h, const mh_node_t *node, mh_arg_t arg) { (void) arg; mh_int_t k = mh_hash(node, arg); /* hash key */ mh_int_t i = k % h->n_buckets; /* offset in the hash table. */ mh_int_t inc = 1 + k % (h->n_buckets - 1); /* overflow chain increment. */ /* Skip through all collisions. */ while (mh_exist(h, i)) { if (mh_eq(node, mh_node(h, i), arg)) return i; /* Found a duplicate. */ /* * Mark this link as part of a collision chain. The * chain always ends with a non-marked link. * Note: the collision chain for this key may share * links with collision chains of other keys. */ mh_setdirty(h, i); i = _mh(next_slot)(i, inc, h->n_buckets); } /* * Found an unused, but possibly dirty slot. Use it. * However, if this is a dirty slot, first check that * there are no duplicates down the collision chain. The * current link can also be from a collision chain of some * other key, but this is can't be established, so check * anyway. */ mh_int_t save_i = i; while (mh_dirty(h, i)) { i = _mh(next_slot)(i, inc, h->n_buckets); if (mh_exist(h, i) && mh_eq(mh_node(h, i), node, arg)) return i; /* Found a duplicate. */ } /* Reached the end of the collision chain: no duplicates. */ return save_i; } /** * Find a node in the hash and replace it with a new value. * Save the old node in ret pointer, if it is provided. * If the old node didn't exist, just insert the new node. * * @retval != mh_end() pos of the new node, ret is either NULL * or copy of the old node * @retval mh_end() out of memory, ret is unchanged. */ static inline mh_int_t _mh(put)(struct _mh(t) *h, const mh_node_t *node, mh_node_t **ret, mh_arg_t arg) { mh_int_t x = mh_end(h); int exist; if (h->size == h->n_buckets) /* no one free elements in the hash table */ goto put_done; #if MH_INCREMENTAL_RESIZE if (mh_unlikely(h->resize_position > 0)) _mh(resize)(h, arg); else if (mh_unlikely(h->n_dirty >= h->upper_bound)) { if (_mh(start_resize)(h, h->n_buckets + 1, 0, arg)) goto put_done; } if (h->resize_position) _mh(put)(h->shadow, node, NULL, arg); #else if (mh_unlikely(h->n_dirty >= h->upper_bound)) { if (_mh(start_resize)(h, h->n_buckets + 1, h->size, arg)) goto put_done; } #endif x = put_slot(h, node, arg); exist = mh_exist(h, x); if (!exist) { /* add new */ mh_setexist(h, x); h->size++; if (!mh_dirty(h, x)) h->n_dirty++; memcpy(&(h->p[x]), node, sizeof(mh_node_t)); if (ret) *ret = NULL; } else { if (ret) memcpy(*ret, &(h->p[x]), sizeof(mh_node_t)); /* replace old */ memcpy(&(h->p[x]), node, sizeof(mh_node_t)); } put_done: return x; } static inline void _mh(del)(struct _mh(t) *h, mh_int_t x, mh_arg_t arg) { if (x != h->n_buckets && mh_exist(h, x)) { mh_setfree(h, x); h->size--; if (!mh_dirty(h, x)) h->n_dirty--; #if MH_INCREMENTAL_RESIZE if (mh_unlikely(h->resize_position)) _mh(del_resize)(h, x, arg); #endif } } #endif static inline void _mh(remove)(struct _mh(t) *h, const mh_node_t *node, mh_arg_t arg) { mh_int_t k = _mh(get)(h, node, arg); if (k != mh_end(h)) _mh(del)(h, k, arg); } #ifdef MH_SOURCE void __attribute__((noinline)) _mh(del_resize)(struct _mh(t) *h, mh_int_t x, mh_arg_t arg) { struct _mh(t) *s = h->shadow; uint32_t y = _mh(get)(s, (const mh_node_t *) &(h->p[x]), arg); _mh(del)(s, y, arg); _mh(resize)(h, arg); } struct _mh(t) * _mh(new)() { struct _mh(t) *h = (struct _mh(t) *) calloc(1, sizeof(*h)); h->shadow = (struct _mh(t) *) calloc(1, sizeof(*h)); h->prime = 0; h->n_buckets = __ac_prime_list[h->prime]; h->p = (mh_node_t *) calloc(h->n_buckets, sizeof(mh_node_t)); h->b = (mh_int_t *) calloc(h->n_buckets / 16 + 1, sizeof(unsigned)); h->upper_bound = h->n_buckets * MH_DENSITY; return h; } void _mh(clear)(struct _mh(t) *h) { free(h->p); h->prime = 0; h->n_buckets = __ac_prime_list[h->prime]; h->p = (mh_node_t *) calloc(h->n_buckets, sizeof(mh_node_t)); h->upper_bound = h->n_buckets * MH_DENSITY; } void _mh(delete)(struct _mh(t) *h) { free(h->shadow); free(h->b); free(h->p); free(h); } void _mh(resize)(struct _mh(t) *h, mh_arg_t arg) { struct _mh(t) *s = h->shadow; #if MH_INCREMENTAL_RESIZE mh_int_t batch = h->batch; #endif for (mh_int_t i = h->resize_position; i < h->n_buckets; i++) { #if MH_INCREMENTAL_RESIZE if (batch-- == 0) { h->resize_position = i; return; } #endif if (!mh_exist(h, i)) continue; mh_int_t n = put_slot(s, mh_node(h, i), arg); s->p[n] = h->p[i]; mh_setexist(s, n); s->n_dirty++; } free(h->p); free(h->b); s->size = h->size; memcpy(h, s, sizeof(*h)); h->resize_cnt++; } int _mh(start_resize)(struct _mh(t) *h, mh_int_t buckets, mh_int_t batch, mh_arg_t arg) { if (h->resize_position) { /* resize has already been started */ return 0; } if (buckets < h->n_buckets) { /* hash size is already greater than requested */ return 0; } while (h->prime < __ac_HASH_PRIME_SIZE) { if (__ac_prime_list[h->prime] >= buckets) break; h->prime += 1; } h->batch = batch > 0 ? batch : h->n_buckets / (256 * 1024); if (h->batch < 256) { /* * Minimal batch must be greater or equal to * 1 / (1 - f), where f is upper bound percent * = MH_DENSITY */ h->batch = 256; } struct _mh(t) *s = h->shadow; memcpy(s, h, sizeof(*h)); s->resize_position = 0; s->n_buckets = __ac_prime_list[h->prime]; s->upper_bound = s->n_buckets * MH_DENSITY; s->n_dirty = 0; s->p = (mh_node_t *) malloc(s->n_buckets * sizeof(mh_node_t)); if (s->p == NULL) return -1; s->b = (mh_int_t *) calloc(s->n_buckets / 16 + 1, sizeof(unsigned)); if (s->b == NULL) { free(s->p); s->p = NULL; return -1; } _mh(resize)(h, arg); return 0; } void _mh(reserve)(struct _mh(t) *h, mh_int_t size, mh_arg_t arg) { _mh(start_resize)(h, size/MH_DENSITY, h->size, arg); } #ifndef mh_stat #define mh_stat(buf, h) ({ \ tbuf_printf(buf, " n_buckets: %" PRIu32 CRLF \ " n_dirty: %" PRIu32 CRLF \ " size: %" PRIu32 CRLF \ " resize_cnt: %" PRIu32 CRLF \ " resize_position: %" PRIu32 CRLF, \ h->n_buckets, \ h->n_dirty, \ h->size, \ h->resize_cnt, \ h->resize_position); \ }) #endif #ifdef MH_DEBUG void _mh(dump)(struct _mh(t) *h) { printf("slots:\n"); int k = 0; for(int i = 0; i < h->n_buckets; i++) { if (mh_dirty(h, i) || mh_exist(h, i)) { printf(" [%i] ", i); if (mh_exist(h, i)) { /* TODO(roman): fix this printf */ printf(" -> %p", h->p[i]); k++; } if (mh_dirty(h, i)) printf(" dirty"); printf("\n"); } } printf("end(%i)\n", k); } #endif #endif #if defined(MH_SOURCE) || defined(MH_UNDEF) #undef MH_HEADER #undef mh_int_t #undef mh_node_t #undef mh_arg_t #undef mh_key_t #undef mh_name #undef mh_hash #undef mh_hash_key #undef mh_eq #undef mh_eq_key #undef mh_node #undef mh_dirty #undef mh_place #undef mh_setdirty #undef mh_setexist #undef mh_setvalue #undef mh_unlikely #undef slot #undef slot_and_dirty #undef MH_DENSITY #endif #undef mh_cat #undef mh_ecat #undef _mh tarantool-1.5.1.218.g1a69fd6/include/errcode.h0000664000000000000000000001442212242653271017206 0ustar rootroot#ifndef TARANTOOL_ERRCODE_H_INCLUDED #define TARANTOOL_ERRCODE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include "tarantool/util.h" struct errcode_record { const char *errstr; const char *errdesc; uint8_t errflags; }; enum { TNT_ERRMSG_MAX = 512 }; /* * To add a new error code to Tarantool, extend this array. Please * try to reuse empty slots (ER_UNUSED*), if there are any left. * * !IMPORTANT! Currently you need to manually update the user * guide (doc/user/errcode.xml) with each added error code. * Please don't forget to do it! */ #define ERROR_CODES(_) \ /* 0 */_(ER_OK, 0, "OK") \ /* 1 */_(ER_NONMASTER, 2, "Can't modify data on a replication slave. My master is: %s") \ /* 2 */_(ER_ILLEGAL_PARAMS, 2, "Illegal parameters, %s") \ /* 3 */_(ER_SECONDARY, 2, "Can't modify data upon a request on the secondary port.") \ /* 4 */_(ER_TUPLE_IS_RO, 1, "Tuple is marked as read-only") \ /* 5 */_(ER_INDEX_TYPE, 2, "Unsupported index type: %s") \ /* 6 */_(ER_SPACE_EXISTS, 2, "Space %u already exists") \ /* 7 */_(ER_MEMORY_ISSUE, 1, "Failed to allocate %u bytes in %s for %s") \ /* 8 */_(ER_UNUSED8, 2, "Unused8") \ /* 9 */_(ER_INJECTION, 2, "Error injection '%s'") \ /* 10 */_(ER_UNSUPPORTED, 2, "%s does not support %s") \ /* silverproxy error codes */ \ /* 11 */_(ER_RESERVED11, 0, "Reserved11") \ /* 12 */_(ER_RESERVED12, 0, "Reserved12") \ /* 13 */_(ER_RESERVED13, 0, "Reserved13") \ /* 14 */_(ER_RESERVED14, 0, "Reserved14") \ /* 15 */_(ER_RESERVED15, 0, "Reserved15") \ /* 16 */_(ER_RESERVED16, 0, "Reserved16") \ /* 17 */_(ER_RESERVED17, 0, "Reserved17") \ /* 18 */_(ER_RESERVED18, 0, "Reserved18") \ /* 19 */_(ER_RESERVED19, 0, "Reserved19") \ /* 20 */_(ER_RESERVED20, 0, "Reserved20") \ /* 21 */_(ER_RESERVED21, 0, "Reserved21") \ /* 22 */_(ER_RESERVED22, 0, "Reserved22") \ /* 23 */_(ER_RESERVED23, 0, "Reserved23") \ /* end of silverproxy error codes */ \ /* 24 */_(ER_UNUSED24, 2, "Unused24") \ /* 25 */_(ER_UNUSED25, 2, "Unused25") \ /* 26 */_(ER_FIBER_STACK, 2, "Can not create a new fiber: recursion limit reached") \ /* 27 */_(ER_UNUSED27, 2, "Unused27") \ /* 28 */_(ER_UNUSED28, 2, "Unused28") \ /* 29 */_(ER_UNUSED29, 2, "Unused29") \ /* 30 */_(ER_UNUSED30, 2, "Unused30") \ /* 31 */_(ER_UNUSED31, 2, "Unused31") \ /* 32 */_(ER_UNUSED32, 2, "Unused32") \ /* 33 */_(ER_UNUSED33, 2, "Unused33") \ /* 34 */_(ER_UNUSED34, 2, "Unused34") \ /* 35 */_(ER_UNUSED35, 2, "Unused35") \ /* 36 */_(ER_UNUSED36, 2, "Unused36") \ /* 37 */_(ER_UNUSED37, 2, "Unused37") \ /* 38 */_(ER_KEY_FIELD_TYPE, 2, "Supplied key field type does not match index type: expected %s") \ /* 39 */_(ER_WAL_IO, 2, "Failed to write to disk") \ /* 40 */_(ER_FIELD_TYPE, 2, "Field type does not match one required by operation: expected a %s") \ /* 41 */_(ER_ARG_TYPE, 2, "Argument type in operation on field %u does not match field type: expected a %s") \ /* 42 */_(ER_SPLICE, 2, "Field SPLICE error: %s") \ /* 43 */_(ER_TUPLE_IS_TOO_LONG, 2, "Tuple is too long %u") \ /* 44 */_(ER_UNKNOWN_UPDATE_OP, 2, "Unknown UPDATE operation") \ /* 45 */_(ER_EXACT_MATCH, 2, "Invalid key part count in an exact match (expected %u, got %u)") \ /* 46 */_(ER_UNUSED46, 2, "Unused46") \ /* 47 */_(ER_KEY_PART_COUNT, 2, "Invalid key part count (expected [0..%u], got %u)") \ /* 48 */_(ER_PROC_RET, 2, "Return type '%s' is not supported in the binary protocol") \ /* 49 */_(ER_TUPLE_NOT_FOUND, 2, "Tuple doesn't exist in index %u") \ /* 50 */_(ER_NO_SUCH_PROC, 2, "Procedure '%.*s' is not defined") \ /* 51 */_(ER_PROC_LUA, 2, "Lua error: %s") \ /* 52 */_(ER_SPACE_DISABLED, 2, "Space %u is disabled") \ /* 53 */_(ER_NO_SUCH_INDEX, 2, "No index #%u is defined in space %u") \ /* 54 */_(ER_NO_SUCH_FIELD, 2, "Field %u was not found in the tuple") \ /* 55 */_(ER_TUPLE_FOUND, 2, "Duplicate key exists in unique index %u") \ /* 56 */_(ER_UPDATE_FIELD, 2, "Field %u UPDATE error: %s") \ /* 57 */_(ER_NO_SUCH_SPACE, 2, "Space %u does not exist") /* * !IMPORTANT! Please follow instructions at start of the file * when adding new errors. */ ENUM0(tnt_error_codes_enum, ERROR_CODES); extern struct errcode_record tnt_error_codes[]; /** Return a string representation of error name, e.g. "ER_OK". */ static inline const char *tnt_errcode_str(uint32_t errcode) { if (errcode >= tnt_error_codes_enum_MAX) { /* Unknown error code - can be triggered using box.raise() */ return "ER_UNKNOWN"; } return tnt_error_codes[errcode].errstr; } /** Return a 4-byte numeric error code, with status flags. */ static inline uint32_t tnt_errcode_val(uint32_t errcode) { if (errcode >= tnt_error_codes_enum_MAX) return (errcode << 8) | 2; /* non-recoverable */ return (errcode << 8) | tnt_error_codes[errcode].errflags; } /** Return a description of the error. */ static inline const char *tnt_errcode_desc(uint32_t errcode) { if (errcode >= tnt_error_codes_enum_MAX) return ""; return tnt_error_codes[errcode].errdesc; } #endif /* TARANTOOL_ERRCODE_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/qbuf.h0000664000000000000000000000545312231715276016526 0ustar rootroot#ifndef TARANTOOL_QBUF_H_INCLUDED #define TARANTOOL_QBUF_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #define QBUF_WATERMARK (512 * sizeof(void*)) struct qbuf { char *buf; size_t bottom; /* advanced by batch free */ size_t top; size_t size; /* total buffer size */ }; static inline int qbuf_init(struct qbuf *q, size_t size) { q->size = size; q->bottom = 0; q->top = 0; q->buf = (char*)malloc(size); return (q->buf == NULL ? -1 : 0); } static inline void qbuf_free(struct qbuf *q) { if (q->buf) { free(q->buf); q->buf = NULL; } } static inline int qbuf_n(struct qbuf *q) { return (q->top - q->bottom) / sizeof(void*); } #ifndef unlikely # define unlikely __builtin_expect(!! (EXPR), 0) #endif static inline int qbuf_push(struct qbuf *q, void *ptr) { /* reduce memory allocation and memmove * effect by reusing free pointers buffer space only after the * watermark frees reached. */ if (unlikely(q->bottom >= QBUF_WATERMARK)) { memmove(q->buf, q->buf + q->bottom, q->bottom); q->top -= q->bottom; q->bottom = 0; } if (unlikely((q->top + sizeof(void*)) > q->size)) { size_t newsize = q->size * 2; char *ptr = (char*)realloc((void*)q->buf, newsize); if (unlikely(ptr == NULL)) return -1; q->buf = ptr; q->size = newsize; } memcpy(q->buf + q->top, (char*)&ptr, sizeof(ptr)); q->top += sizeof(void*); return 0; } static inline void* qbuf_pop(struct qbuf *q) { if (unlikely(q->bottom == q->top)) return NULL; void *ret = *(void**)(q->buf + q->bottom); q->bottom += sizeof(void*); return ret; } #endif tarantool-1.5.1.218.g1a69fd6/include/sio.h0000664000000000000000000000766412202131537016357 0ustar rootroot#ifndef TARANTOOL_SIO_H_INCLUDED #define TARANTOOL_SIO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * Exception-aware wrappers around BSD sockets. * Provide better error logging and I/O statistics. */ #include #include #include #include #include #include #include "exception.h" enum { SERVICE_NAME_MAXLEN = 32 }; class SocketError: public SystemError { public: SocketError(const char *file, unsigned line, int fd, const char *format, ...); }; const char *sio_socketname(int fd); int sio_socket(int domain, int type, int protocol); int sio_shutdown(int fd, int how); int sio_getfl(int fd); int sio_setfl(int fd, int flag, int on); void sio_setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen); void sio_getsockopt(int fd, int level, int optname, void *optval, socklen_t *optlen); int sio_connect(int fd, struct sockaddr_in *addr, socklen_t addrlen); int sio_bind(int fd, struct sockaddr_in *addr, socklen_t addrlen); int sio_listen(int fd); int sio_listen_backlog(); int sio_accept(int fd, struct sockaddr_in *addr, socklen_t *addrlen); ssize_t sio_read(int fd, void *buf, size_t count); ssize_t sio_read_total(int fd, void *buf, size_t count, size_t total); ssize_t sio_write(int fd, const void *buf, size_t count); ssize_t sio_writev(int fd, const struct iovec *iov, int iovcnt); ssize_t sio_write_total(int fd, const void *buf, size_t count, size_t total); ssize_t sio_sendto(int fd, const void *buf, size_t len, int flags, const struct sockaddr_in *dest_addr, socklen_t addrlen); ssize_t sio_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr_in *src_addr, socklen_t *addrlen); int sio_getpeername(int fd, struct sockaddr_in *addr); const char *sio_strfaddr(struct sockaddr_in *addr); /** * Advance write position in the iovec array * based on its current value and the number of * bytes written. * * @param[in] iov the vector being written with writev(). * @param[in] nwr number of bytes written, @pre >= 0 * @param[in,out] iov_len offset in iov[0]; * * @return offset of iov[0] for the next write */ static inline int sio_move_iov(struct iovec *iov, ssize_t nwr, size_t *iov_len) { nwr += *iov_len; struct iovec *begin = iov; while (nwr > 0 && nwr >= iov->iov_len) { nwr -= iov->iov_len; iov++; } *iov_len = nwr; return iov - begin; } /** * Change values of iov->iov_len and iov->iov_base * to adjust to a partial write. */ static inline void sio_add_to_iov(struct iovec *iov, ssize_t size) { iov->iov_len += size; iov->iov_base = (char *) iov->iov_base - size; } #endif /* TARANTOOL_SIO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/lua/0000775000000000000000000000000012231715257016171 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/lua/cjson.h0000664000000000000000000000300712202131537017445 0ustar rootroot#ifndef TARANTOOL_LUA_CJSON_H_INCLUDED #define TARANTOOL_LUA_CJSON_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; /** * Initialize box.cjson system */ int tarantool_lua_cjson_init(struct lua_State *L); #endif /* TARANTOOL_LUA_CJSON_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/lua/stat.h0000664000000000000000000000273712202131537017315 0ustar rootroot#ifndef INCLUDES_TARANTOOL_LUA_STAT_H #define INCLUDES_TARANTOOL_LUA_STAT_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; void tarantool_lua_stat_init(struct lua_State *L); #endif /* INCLUDES_TARANTOOL_LUA_STAT_H */ tarantool-1.5.1.218.g1a69fd6/include/lua/info.h0000664000000000000000000000274012202131537017267 0ustar rootroot#ifndef INCLUDES_TARANTOOL_LUA_INFO_H #define INCLUDES_TARANTOOL_LUA_INFO_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; void tarantool_lua_info_init(struct lua_State *L); #endif /* INCLUDES_TARANTOOL_LUA_INFO_H */ tarantool-1.5.1.218.g1a69fd6/include/lua/session.h0000664000000000000000000000275212202131537020022 0ustar rootroot#ifndef INCLUDES_TARANTOOL_LUA_SESSION_H #define INCLUDES_TARANTOOL_LUA_SESSION_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; void tarantool_lua_session_init(struct lua_State *L); #endif /* INCLUDES_TARANTOOL_LUA_SESSION_H */ tarantool-1.5.1.218.g1a69fd6/include/lua/slab.h0000664000000000000000000000273712202131537017263 0ustar rootroot#ifndef INCLUDES_TARANTOOL_LUA_SLAB_H #define INCLUDES_TARANTOOL_LUA_SLAB_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ struct lua_State; void tarantool_lua_slab_init(struct lua_State *L); #endif /* INCLUDES_TARANTOOL_LUA_SLAB_H */ tarantool-1.5.1.218.g1a69fd6/include/lua/init.h0000664000000000000000000000711412231715257017310 0ustar rootroot#ifndef INCLUDES_TARANTOOL_LUA_H #define INCLUDES_TARANTOOL_LUA_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include struct lua_State; struct luaL_Reg; struct tarantool_cfg; struct tbuf; /* * Single global lua_State shared by core and modules. * Created with tarantool_lua_init(). */ extern struct lua_State *tarantool_L; /** * This is a callback used by tarantool_lua_init() to open * module-specific libraries into given Lua state. * * No return value, panics if error. */ void mod_lua_init(struct lua_State *L); void tarantool_lua_register_type(struct lua_State *L, const char *type_name, const struct luaL_Reg *methods); /** * Create an instance of Lua interpreter and load it with * Tarantool modules. Creates a Lua state, imports global * Tarantool modules, then calls mod_lua_init(), which performs * module-specific imports. The created state can be freed as any * other, with lua_close(). * * @return L on success, 0 if out of memory */ struct lua_State * tarantool_lua_init(); void tarantool_lua_close(struct lua_State *L); /** * This function exists because lua_tostring does not use * __tostring metamethod, and this metamethod has to be used * if we want to print Lua userdata correctly. */ const char * tarantool_lua_tostring(struct lua_State *L, int index); /** * Convert Lua string, number or cdata (u64) to 64bit value */ uint64_t tarantool_lua_tointeger64(struct lua_State *L, int idx); /** * Make a new configuration available in Lua */ void tarantool_lua_load_cfg(struct lua_State *L, struct tarantool_cfg *cfg); /** * Load and execute start-up file * * @param L is a Lua State. */ void tarantool_lua_load_init_script(struct lua_State *L); void tarantool_lua(struct lua_State *L, struct tbuf *out, const char *str); /** * push uint64_t to Lua stack * * @param L is a Lua State * @param val is a value to push * */ int luaL_pushnumber64(struct lua_State *L, uint64_t val); /** * show plugin statistics (for admin port) */ struct tbuf; void show_plugins_stat(struct tbuf *out); /** * @brief A palloc-like wrapper to allocate memory using lua_newuserdata * @param ctx lua_State * @param size a number of bytes to allocate * @return a pointer to the allocated memory */ void * lua_region_alloc(void *ctx, size_t size); #endif /* INCLUDES_TARANTOOL_LUA_H */ tarantool-1.5.1.218.g1a69fd6/include/fio.h0000664000000000000000000001451012202131537016326 0ustar rootroot#ifndef TARANTOOL_FIO_H_INCLUDED #define TARANTOOL_FIO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /** * POSIX file I/O: take into account EINTR (read and write exactly * the requested number of bytes), log errors nicely, provide batch * writes. */ #include #include #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ struct iovec; /** * Read up to N bytes from file into the buffer, * re-trying for interrupted reads. In case of a non-transient * error, writes a message to the error log. * * @param fd file descriptor. * @param buf pointer to the buffer. * @param count how many bytes to read. * * @return When count is 0, returns 0. When count > SSIZE_MAX, * the result is unspecified. Otherwise, returns the total * number of bytes read, or -1 if error. In case EOF is * reached and less than count bytes are read, the actual * number of bytes read is returned (can be 0 or more). * * Blocking I/O: * ------------- * If an error occurs after a few bytes were read, -1 is * returned and current read offset is unspecified. * * Non-blocking I/O * ---------------- * Same as with blocking I/O but: * If EAGAIN/EWOULDBLOCK occurs right away, returns -1, * like read(). * If EAGAIN/EWOULDBLOCK occurs after a few bytes were * read, the actual number of bytes read is returned. */ ssize_t fio_read(int fd, void *buf, size_t count); /** * Write the given buffer, re-trying for partial writes * (when interrupted by a signal, for instance). In case * of a non-transient error, writes a message to the error * log. * * @param fd file descriptor. * @param buf pointer to a buffer. * @param count buffer size. * * @return When count is 0, returns 0. When count is positive, * returns the total number of bytes written, or -1 if error. * * Blocking I/O: * ------------- * If an error occurs after a few bytes were written, -1 is * returned and current write offset is unspecified. * In other words, with blocking I/O this function * returns either -1 or count. * * Non-blocking I/O * ---------------- * If EAGAIN/EWOULDBLOCK occurs and no data's been written * yet, sets errno to EAGAIN and returns -1 (like read()). * If EAGAIN/EWOULDBLOCK happens after a few bytes were * written, the actual number of bytes written is * returned. */ ssize_t fio_write(int fd, const void *buf, size_t count); /** * A simple wrapper around writev(). * Re-tries write in case of EINTR. * In case of a serious error, writes a message to the error log. * * This function does not retry for partial writes because: * - it requires tedious byte counting, even when there is no * partial write, just to find out what happened * - on most file systems, a partial write happens * only in case of ENOSPC, which won't go away * if we retry. * - there is a remote chance of partial write of a large iov, * (> 4MB) due to a signal interrupt, but this is so rare that * it's not worth slowing down the main case for the sake of it. * - to finish a partial write one has to allocate a copy of iov * * @param fd file descriptor. * @param iov a vector of buffer descriptors (@sa man * writev). * @param count vector size * * @return When count is 0, returns 0. When count is positive, * returns the total number of bytes written, or -1 if error. */ ssize_t fio_writev(int fd, struct iovec *iov, int iovcnt); /** * An error-reporting aware wrapper around lseek(). * * @return file offset value or -1 if error */ off_t fio_lseek(int fd, off_t offset, int whence); /** Truncate a file and log a message in case of error. */ int fio_truncate(int fd, off_t offset); /** * A helper wrapper around writev() to do batched * writes. */ struct fio_batch { /** Total number of bytes in batched rows. */ ssize_t bytes; /** Total number of batched rows.*/ int rows; /** A cap on how many rows can be batched. Can be set to INT_MAX. */ int max_rows; /** A system cap on how many rows can be batched. */ long max_iov; /* Batched rows. */ struct iovec iov[]; }; struct fio_batch * fio_batch_alloc(long max_iov); /** Begin a new batch write. Set a cap on the number of rows in the batch. */ void fio_batch_start(struct fio_batch *batch, long max_rows); static inline bool fio_batch_is_full(struct fio_batch *batch) { return batch->rows >= batch->max_iov || batch->rows >= batch->max_rows; } /** * Add a row to a batch. * @pre fio_batch_is_full() == false */ void fio_batch_add(struct fio_batch *batch, void *row, ssize_t row_len); /** * Write all rows stacked into the batch. * In case of error, seeks back to the end of * the last fully written row. * * @return The number of rows written. */ int fio_batch_write(struct fio_batch *batch, int fd); #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_FIO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/tarantool/0000775000000000000000000000000012231715276017414 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/tarantool/plugin.h0000664000000000000000000000412712202131537021055 0ustar rootroot#ifndef TARANTOOL_PLUGIN_H_INCLUDED #define TARANTOOL_PLUGIN_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define PLUGIN_API_VERSION 1 #include #include #include struct lua_State; typedef void(*plugin_init_cb)(struct lua_State *L); typedef void(*plugin_stat_cb)(struct tbuf *out); struct tarantool_plugin { int api_version; int version; const char *name; plugin_init_cb init; plugin_stat_cb stat; struct rlist list; }; #define DECLARE_PLUGIN(name, version, init, stat) \ extern "C" { \ struct tarantool_plugin plugin_meta = { \ PLUGIN_API_VERSION, \ version, \ name, \ init, \ stat, \ { NULL, NULL } \ }; \ } #endif /* TARANTOOL_PLUGIN_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/tarantool/config.h.cmake0000664000000000000000000000636312231715276022121 0ustar rootroot#ifndef TARANTOOL_CONFIG_H_INCLUDED #define TARANTOOL_CONFIG_H_INCLUDED /* * This file is generated by CMake. The original file is called * config.h.cmake. Please do not modify. */ /* * A string with major-minor-patch-commit-id identifier of the * release. */ #define PACKAGE_VERSION "@PACKAGE_VERSION@" #define PACKAGE "@PACKAGE@" /* Defined if building for Linux */ #cmakedefine TARGET_OS_LINUX 1 /* Defined if building for FreeBSD */ #cmakedefine TARGET_OS_FREEBSD 1 /* Defined if building for Darwin */ #cmakedefine TARGET_OS_DARWIN 1 /* * Defined if gcov instrumentation should be enabled. */ #cmakedefine ENABLE_GCOV 1 /* * Defined if configured with ENABLE_TRACE (debug trace into * a file specified by TRANTOOL_TRACE environment variable. */ #cmakedefine ENABLE_TRACE 1 /* * Defined if configured with ENABLE_BACKTRACE ('show fiber' * showing fiber call stack. */ #cmakedefine ENABLE_BACKTRACE 1 /* * Set if the system has bfd.h header and GNU bfd library. */ #cmakedefine HAVE_BFD 1 #cmakedefine HAVE_MAP_ANON 1 #cmakedefine HAVE_MAP_ANONYMOUS 1 #if !defined(HAVE_MAP_ANONYMOUS) && defined(HAVE_MAP_ANON) /* * MAP_ANON is deprecated, MAP_ANONYMOUS should be used instead. * Unfortunately, it's not universally present (e.g. not present * on FreeBSD. */ #define MAP_ANONYMOUS MAP_ANON #endif /* * Defined if O_DSYNC mode exists for open(2). */ #cmakedefine HAVE_O_DSYNC 1 #if defined(HAVE_O_DSYNC) #define WAL_SYNC_FLAG O_DSYNC #else #define WAL_SYNC_FLAG O_SYNC #endif /* * Defined if fdatasync(2) call is present. */ #cmakedefine HAVE_FDATASYNC 1 #ifndef HAVE_FDATASYNC #define fdatasync fsync #endif /* * Defined if this platform has GNU specific memmem(). */ #cmakedefine HAVE_MEMMEM 1 /* * Defined if this platform has GNU specific memrchr(). */ #cmakedefine HAVE_MEMRCHR 1 /* * Set if this is a GNU system and libc has __libc_stack_end. */ #cmakedefine HAVE_LIBC_STACK_END 1 /* * Defined if this is a big-endian system. */ #cmakedefine HAVE_BYTE_ORDER_BIG_ENDIAN 1 /* * Set if compiler has __builtin_XXX methods. */ #cmakedefine HAVE_BUILTIN_CTZ 1 #cmakedefine HAVE_BUILTIN_CTZLL 1 #cmakedefine HAVE_BUILTIN_CLZ 1 #cmakedefine HAVE_BUILTIN_CLZLL 1 #cmakedefine HAVE_BUILTIN_POPCOUNT 1 #cmakedefine HAVE_BUILTIN_POPCOUNTLL 1 #cmakedefine HAVE_BUILTIN_BSWAP32 1 #cmakedefine HAVE_BUILTIN_BSWAP64 1 #cmakedefine HAVE_FFSL 1 #cmakedefine HAVE_FFSLL 1 /* * pthread have problems with -std=c99 */ #cmakedefine HAVE_NON_C99_PTHREAD_H 1 #cmakedefine ENABLE_BUNDLED_LIBEV 1 #cmakedefine ENABLE_BUNDLED_LIBEIO 1 #cmakedefine ENABLE_BUNDLED_LIBCORO 1 #cmakedefine HAVE_PRCTL_H 1 /* * predefined /etc directory prefix. */ #define SYSCONF_DIR "@CMAKE_SYSCONF_DIR@" #define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" #define BUILD_TYPE "@CMAKE_BUILD_TYPE@" #define BUILD_INFO "@TARANTOOL_BUILD@" #define BUILD_OPTIONS "cmake . @TARANTOOL_OPTIONS@" #define COMPILER_INFO "@CMAKE_C_COMPILER@ @CMAKE_CXX_COMPILER@" #define TARANTOOL_C_FLAGS "@TARANTOOL_C_FLAGS@" #define TARANTOOL_CXX_FLAGS "@TARANTOOL_CXX_FLAGS@" #define LUA_SYSPATH "@LUA_SYSPATH@" #define LUA_SYSCPATH "@LUA_SYSCPATH@" #define LUA_LIBPATH "@LUA_LIBPATH@" #define LUA_LIBCPATH "@LUA_LIBCPATH@" #define PLUGIN_DIR "@PLUGIN_DIR@" /* * vim: syntax=c */ #endif /* TARANTOOL_CONFIG_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/tarantool/util.h0000664000000000000000000001312212231715257020540 0ustar rootroot#ifndef TARANTOOL_UTIL_H_INCLUDED #define TARANTOOL_UTIL_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/config.h" #include #include #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ #define restrict __restrict__ #ifndef NDEBUG #define TRASH(ptr) memset(ptr, '#', sizeof(*ptr)) #else #define TRASH(ptr) #endif #ifndef MAX # define MAX(a, b) ((a) > (b) ? (a) : (b)) # define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif /* Macros to define enum and corresponding strings. */ #define ENUM0_MEMBER(s, ...) s, #define ENUM_MEMBER(s, v, ...) s = v, #define ENUM0(enum_name, enum_members) enum enum_name {enum_members(ENUM0_MEMBER) enum_name##_MAX} #define ENUM(enum_name, enum_members) enum enum_name {enum_members(ENUM_MEMBER) enum_name##_MAX} #if defined(__cplusplus) #define ENUM_STRS_MEMBER(s, v, ...) names[s] = #s; /* A special hack to emulate C99 designated initializers */ #define STRS(enum_name, enum_members) \ const char *enum_name##_strs[enum_name##_MAX]; \ namespace { \ const struct enum_name##_strs_init { \ enum_name##_strs_init(const char **names) { \ memset(names, 0, sizeof(*names) * \ enum_name##_MAX); \ enum_members(ENUM_STRS_MEMBER) \ } \ } enum_name##_strs_init(enum_name##_strs); \ } #else /* !defined(__cplusplus) */ #define ENUM_STRS_MEMBER(s, v, ...) [s] = #s, #define STRS(enum_name, enum_members) \ const char *enum_name##_strs[(unsigned) enum_name##_MAX + 1] = {enum_members(ENUM_STRS_MEMBER) 0} #endif #define STR2ENUM(enum_name, str) ((enum enum_name) strindex(enum_name##_strs, str, enum_name##_MAX)) uint32_t strindex(const char **haystack, const char *needle, uint32_t hmax); // Macros for printf functions #ifdef __x86_64__ #define PRI_SZ "lu" #define PRI_SSZ "ld" #define PRI_OFFT "lu" #define PRI_XFFT "lx" #else #define PRI_SZ "u" #define PRI_SSZ "d" #define PRI_OFFT "llu" #define PRI_XFFT "llx" #endif #define nelem(x) (sizeof((x))/sizeof((x)[0])) #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) #define field_sizeof(compound_type, field) sizeof(((compound_type *)NULL)->field) #ifndef offsetof #define offsetof(type, member) ((size_t) &((type *)0)->member) #endif #ifndef __offsetof #define __offsetof offsetof #endif #ifndef lengthof #define lengthof(array) (sizeof (array) / sizeof ((array)[0])) #endif #ifndef TYPEALIGN #define TYPEALIGN(ALIGNVAL,LEN) \ (((uintptr_t) (LEN) + ((ALIGNVAL) - 1)) & ~((uintptr_t) ((ALIGNVAL) - 1))) #define SHORTALIGN(LEN) TYPEALIGN(sizeof(int16_t), (LEN)) #define INTALIGN(LEN) TYPEALIGN(sizeof(int32_t), (LEN)) #define MAXALIGN(LEN) TYPEALIGN(sizeof(int64_t), (LEN)) #define PTRALIGN(LEN) TYPEALIGN(sizeof(void*), (LEN)) #define CACHEALIGN(LEN) TYPEALIGN(32, (LEN)) #endif #define CRLF "\n" #ifdef GCC # define FORMAT_PRINTF gnu_printf #else # define FORMAT_PRINTF printf #endif extern int forked; pid_t tfork(); void close_all_xcpt(int fdc, ...); void coredump(int dump_interval); void __gcov_flush(); /** * Async-signal-safe implementation of printf(), to * be able to write messages into the error log * inside a signal handler. */ ssize_t fdprintf(int fd, const char *format, ...) __attribute__((format(printf, 2, 3))); extern void *__libc_stack_end; #ifdef ENABLE_BACKTRACE void print_backtrace(); char *backtrace(void *frame, void *stack, size_t stack_size); #endif /* ENABLE_BACKTRACE */ #ifdef HAVE_BFD struct symbol { void *addr; const char *name; void *end; }; struct symbol *addr2symbol(void *addr); void symbols_load(const char *name); void symbols_free(); #endif /* HAVE_BFD */ #ifdef NDEBUG # define assert(pred) (void)(0) #else # define assert(pred) ((pred) ? (void)(0) : assert_fail (#pred, __FILE__, __LINE__, __FUNCTION__)) void assert_fail(const char *assertion, const char *file, unsigned int line, const char *function) __attribute__ ((noreturn)); #endif #ifndef HAVE_MEMMEM /* Declare memmem(). */ void * memmem(const void *block, size_t blen, const void *pat, size_t plen); #endif /* HAVE_MEMMEM */ #ifndef HAVE_MEMRCHR /* Declare memrchr(). */ void * memrchr(const void *s, int c, size_t n); #endif /* HAVE_MEMRCHR */ #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_UTIL_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/memcached.h0000664000000000000000000000327312231715276017475 0ustar rootroot#ifndef TARANTOOL_MEMCACHED_H_INCLUDED #define TARANTOOL_MEMCACHED_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include struct tarantool_cfg; void memcached_init(const char *bind_ipaddr, int memcached_port); void memcached_free(void); void memcached_space_init(); int memcached_check_config(struct tarantool_cfg *conf); void memcached_start_expire(); void memcached_stop_expire(); #endif /* TARANTOOL_MEMCACHED_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/box/0000775000000000000000000000000012231715257016200 5ustar rootroottarantool-1.5.1.218.g1a69fd6/include/box/box.h0000664000000000000000000000632512231715257017147 0ustar rootroot#ifndef INCLUDES_TARANTOOL_BOX_H #define INCLUDES_TARANTOOL_BOX_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/util.h" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ /* * Box - data storage (spaces, indexes) and query * processor (INSERT, UPDATE, DELETE, SELECT, Lua) * subsystem of Tarantool. */ struct txn; struct tbuf; struct port; struct fio_batch; struct log_io; struct tarantool_cfg; struct lua_State; /** To be called at program start. */ void box_init(bool init_storage); /** To be called at program end. */ void box_free(void); /** * The main entry point to the * Box: callbacks into the request processor. * These are function pointers since they can * change when entering/leaving read-only mode * (master->slave propagation). */ typedef void (*box_process_func)(struct port *, uint32_t, const char *, uint32_t); /** For read-write operations. */ extern box_process_func box_process; /** For read-only port. */ extern box_process_func box_process_ro; /* * Check storage-layer related options in the * configuration file. */ int box_check_config(struct tarantool_cfg *conf); /* * Take into effect storage-layer related * changes in the server configuration. */ int box_reload_config(struct tarantool_cfg *old_conf, struct tarantool_cfg *new_conf); void box_lua_load_cfg(struct lua_State *L); /** * Iterate over all spaces and save them to the * snapshot file. */ void box_snapshot(struct log_io *, struct fio_batch *batch); /** * Spit out some basic module status (master/slave, etc. */ void box_info(struct tbuf *out); const char *box_status(void); /** * Called to enter master or replica * mode (depending on the configuration) after * binding to the primary port. */ void box_leave_local_standby_mode(void *data __attribute__((unused))); enum { BOX_SPACE_MAX = UINT32_MAX, BOX_INDEX_MAX = 10, BOX_FIELD_MAX = UINT32_MAX }; #if defined(__cplusplus) } #endif /* defined(__cplusplus) */ #endif /* INCLUDES_TARANTOOL_BOX_H */ tarantool-1.5.1.218.g1a69fd6/include/cpu_feature.h0000664000000000000000000000402612231715276020066 0ustar rootroot#ifndef TARANTOOL_CPU_FEATURES_H #define TARANTOOL_CPU_FEATURES_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include /* Check whether CPU supports SSE 4.2 (needed to compute CRC32 in hardware). * * @param feature indetifier (see above) of the target feature * * @return true if feature is available, false if unavailable. */ bool sse42_enabled_cpu(); #if defined (__x86_64__) || defined (__i386__) /* Hardware-calculate CRC32 for the given data buffer. * * @param crc initial CRC * @param buf data buffer * @param len buffer length * * @pre true == cpu_has (cpuf_sse4_2) * @return CRC32 value */ uint32_t crc32c_hw(uint32_t crc, const unsigned char *buf, unsigned int len); #endif #endif /* TARANTOOL_CPU_FEATURES_H */ tarantool-1.5.1.218.g1a69fd6/include/rlist.h0000664000000000000000000001511212231715257016716 0ustar rootroot#ifndef TARANTOOL_RLIST_H_INCLUDED #define TARANTOOL_RLIST_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ #ifndef typeof /* TODO: 'typeof' is a GNU extension */ #define typeof __typeof__ #endif /** * list entry and head structure */ struct rlist { struct rlist *prev; struct rlist *next; }; /** * init list head (or list entry as ins't included in list) */ inline static void rlist_create(struct rlist *list) { list->next = list; list->prev = list; } /** * add item to list */ inline static void rlist_add(struct rlist *head, struct rlist *item) { item->prev = head; item->next = head->next; item->prev->next = item; item->next->prev = item; } /** * add item to list tail */ inline static void rlist_add_tail(struct rlist *head, struct rlist *item) { item->next = head; item->prev = head->prev; item->prev->next = item; item->next->prev = item; } /** * delete element */ inline static void rlist_del(struct rlist *item) { item->prev->next = item->next; item->next->prev = item->prev; rlist_create(item); } inline static struct rlist * rlist_shift(struct rlist *head) { struct rlist *shift = head->next; head->next = shift->next; shift->next->prev = head; shift->next = shift->prev = shift; return shift; } /** * return first element */ inline static struct rlist * rlist_first(struct rlist *head) { return head->next; } /** * return last element */ inline static struct rlist * rlist_last(struct rlist *head) { return head->prev; } /** * return next element by element */ inline static struct rlist * rlist_next(struct rlist *item) { return item->next; } /** * return previous element */ inline static struct rlist * rlist_prev(struct rlist *item) { return item->prev; } /** * return TRUE if list is empty */ inline static int rlist_empty(struct rlist *item) { return item->next == item->prev && item->next == item; } /** @brief delete from one list and add as another's head @param to the head that will precede our entry @param item the entry to move */ static inline void rlist_move(struct rlist *to, struct rlist *item) { rlist_del(item); rlist_add(to, item); } /** @brief delete from one list and add_tail as another's head @param to the head that will precede our entry @param item the entry to move */ static inline void rlist_move_tail(struct rlist *to, struct rlist *item) { rlist_del(item); rlist_add_tail(to, item); } /** * allocate and init head of list */ #define RLIST_HEAD(name) \ struct rlist name = { &(name), &(name) } /** * return entry by list item */ #define rlist_entry(item, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (item); \ (type *)( (char *)__mptr - ((size_t) &((type *)0)->member) ); }) /** * return first entry */ #define rlist_first_entry(head, type, member) \ rlist_entry(rlist_first(head), type, member) /** * Remove one element from the list and return it * @pre the list is not empty */ #define rlist_shift_entry(head, type, member) \ rlist_entry(rlist_shift(head), type, member) \ /** * return last entry * @pre the list is not empty */ #define rlist_last_entry(head, type, member) \ rlist_entry(rlist_last(head), type, member) /** * return next entry */ #define rlist_next_entry(item, member) \ rlist_entry(rlist_next(&(item)->member), typeof(*item), member) /** * return previous entry */ #define rlist_prev_entry(item, member) \ rlist_entry(rlist_prev(&(item)->member), typeof(*item), member) /** * add entry to list */ #define rlist_add_entry(head, item, member) \ rlist_add((head), &(item)->member) /** * add entry to list tail */ #define rlist_add_tail_entry(head, item, member) \ rlist_add_tail((head), &(item)->member) /** delete from one list and add as another's head */ #define rlist_move_entry(to, item, member) \ rlist_move((to), &((item)->member)) /** delete from one list and add_tail as another's head */ #define rlist_move_tail_entry(to, item, member) \ rlist_move_tail((to), &((item)->member)) /** * delete entry from list */ #define rlist_del_entry(item, member) \ rlist_del(&((item)->member)) /** * foreach through list */ #define rlist_foreach(item, head) \ for (item = rlist_first(head); item != (head); item = rlist_next(item)) /** * foreach backward through list */ #define rlist_foreach_reverse(item, head) \ for (item = rlist_last(head); item != (head); item = rlist_prev(item)) /** * foreach through all list entries */ #define rlist_foreach_entry(item, head, member) \ for (item = rlist_first_entry((head), typeof(*item), member); \ &item->member != (head); \ item = rlist_next_entry((item), member)) /** * foreach backward through all list entries */ #define rlist_foreach_entry_reverse(item, head, member) \ for (item = rlist_last_entry((head), typeof(*item), member); \ &item->member != (head); \ item = rlist_prev_entry((item), member)) #define rlist_foreach_entry_safe(item, head, member, tmp) \ for ((item) = rlist_first_entry((head), typeof(*item), member); \ &item->member != (head) && \ ((tmp) = rlist_next_entry((item), member)); \ (item) = (tmp)) #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_RLIST_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/rope.h0000664000000000000000000001545512202131537016527 0ustar rootroot#ifndef INCLUDES_TARANTOOL_ROPE_H #define INCLUDES_TARANTOOL_ROPE_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ typedef unsigned int rsize_t; typedef int rssize_t; typedef void *(*rope_split_func)(void *, void *, size_t, size_t); typedef void *(*rope_alloc_func)(void *, size_t); typedef void (*rope_free_func)(void *, void *); /** Tallest allowable tree, 1.44*log(2^32) */ enum { ROPE_HEIGHT_MAX = 46 }; struct rope_node { /** Node height, see rope_node_height(), used for AVL balance. */ int height; /** Subtree size. */ rsize_t tree_size; /* Substring size. */ rsize_t leaf_size; /* Substring. */ void *data; /* Left (0) and right (1) links */ struct rope_node *link[2]; }; struct rope { /** Top of the tree */ struct rope_node *root; /** Memory management context. */ void *alloc_ctx; /** Get a sequence tail, given offset. */ rope_split_func split; /** Split function context. */ void *split_ctx; /** Allocate memory (context, size). */ void *(*alloc)(void *, size_t); /** Free memory (context, pointer) */ void (*free)(void *, void *); }; struct rope_iter { /** rope->free is used to free the iterator. */ struct rope *rope; /** End of the traversal path. */ struct rope_node **top; /** Traversal path */ struct rope_node *path[ROPE_HEIGHT_MAX]; }; static inline rsize_t rope_node_size(struct rope_node *node) { return node ? node->tree_size : 0; } static inline rsize_t rope_leaf_size(struct rope_node *node) { return node->leaf_size; } static inline void * rope_leaf_data(struct rope_node *node) { return node->data; } static inline rsize_t rope_size(struct rope *rope) { return rope_node_size(rope->root); } /** Initialize an empty rope. */ static inline void rope_create(struct rope *rope, rope_split_func split_func, void *split_ctx, rope_alloc_func alloc_func, rope_free_func free_func, void *alloc_ctx) { rope->root = NULL; rope->split = split_func; rope->split_ctx = split_ctx; rope->alloc = alloc_func; rope->free = free_func; rope->alloc_ctx = alloc_ctx; } /** Create a new empty rope. * @param split_func a function which returns * a pointer to substring * given an offset. Used * to split substrings when * inserting into a rope. * @param alloc_func used to allocate memory * @param free_func used to free memory * @param alloc_ctx allocator context * * @return an empty rope, or NULL if failed * to allocate memory */ static inline struct rope * rope_new(rope_split_func split_func, void *split_ctx, rope_alloc_func alloc_func, rope_free_func free_func, void *alloc_ctx) { struct rope *rope= (struct rope *) alloc_func(alloc_ctx, sizeof(struct rope)); if (rope == NULL) return NULL; rope_create(rope, split_func, split_ctx, alloc_func, free_func, alloc_ctx); return rope; } /** Delete rope contents. Can also be used * to free a rope which is allocated on stack. * Doesn't delete rope substrings, only * rope nodes. */ void rope_clear(struct rope *rope); /** Delete a rope allocated with rope_new() */ static inline void rope_delete(struct rope *rope) { rope_clear(rope); rope->free(rope->alloc_ctx, rope); } /** Insert a substring into a rope at the given * offset. * If offset is greater than rope size, insertion * happens at the end. * * @retval 0 success * @retval -1 failed to allocate memory for a new * tree node */ int rope_insert(struct rope *rope, rsize_t offset, void *data, rsize_t size); /** Append a substring at rope tail. */ static inline int rope_append(struct rope *rope, void *data, size_t size) { return rope_insert(rope, rope_size(rope), data, size); } /** Make sure there is a rope node which has a substring * which starts at the given offset. Useful when * rope substrings carry additional information. * * @retval NULL failed to allocate memory for a new * tree node */ struct rope_node * rope_extract_node(struct rope *rope, rsize_t offset); static inline void * rope_extract(struct rope *rope, rsize_t offset) { return rope_leaf_data(rope_extract_node(rope, offset)); } /** * Erase a single element from a rope at the given * offset. * * @pre offset < rope_size(rope) */ int rope_erase(struct rope *rope, rsize_t offset); /** Initialize an iterator. */ static inline void rope_iter_create(struct rope_iter *it, struct rope *rope) { it->rope = rope; } /** Create an iterator. */ static inline struct rope_iter * rope_iter_new(struct rope *rope) { struct rope_iter *it = (struct rope_iter *) rope->alloc(rope->alloc_ctx, sizeof(struct rope_iter)); if (it == NULL) return NULL; rope_iter_create(it, rope); return it; } /** * Begin iteration. * @retval NULL the rope is empty */ struct rope_node * rope_iter_start(struct rope_iter *it); /** * Advance to the next rope node. * * @return node, or NULL if iterator * has advanced beyond the last * node. */ struct rope_node * rope_iter_next(struct rope_iter *it); /** Free iterator. */ static inline void rope_iter_delete(struct rope_iter *it) { it->rope->free(it->rope->alloc_ctx, it); } /** Apply visit_leaf function to every rope leaf. */ void rope_traverse(struct rope *rope, void (*visit_leaf)(void *, size_t)); /** Check AVL tree consistency. */ void rope_check(struct rope *rope); /** Pretty print a rope. */ void rope_pretty_print(struct rope *rope, void (*print_leaf)(void *, size_t)); #if defined(__cplusplus) } #endif /* defined(__cplusplus) */ #endif /* INCLUDES_TARANTOOL_ROPE_H */ tarantool-1.5.1.218.g1a69fd6/include/iproto.h0000664000000000000000000000270612202131537017071 0ustar rootroot#ifndef TARANTOOL_IPROTO_H_INCLUDED #define TARANTOOL_IPROTO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ void iproto_init(const char *bind_ipaddr, int primary_port, int secondary_port); #endif tarantool-1.5.1.218.g1a69fd6/include/tbuf.h0000664000000000000000000000650712202131537016520 0ustar rootroot#ifndef TARANTOOL_TBUF_H_INCLUDED #define TARANTOOL_TBUF_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include "tarantool/util.h" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ struct tbuf { /* Used space in the buffer. */ uint32_t size; /* Total allocated buffer capacity. */ uint32_t capacity; /* Allocated buffer. */ char *data; struct palloc_pool *pool; }; struct tbuf * tbuf_new(struct palloc_pool *pool); void tbuf_ensure_resize(struct tbuf *e, size_t bytes_required); static inline void tbuf_ensure(struct tbuf *e, size_t required) { assert(e->size <= e->capacity); if (unlikely(e->size + required > e->capacity)) tbuf_ensure_resize(e, required); } static inline void tbuf_append(struct tbuf *b, const void *data, size_t len) { tbuf_ensure(b, len + 1); /* +1 for trailing '\0' */ memcpy(b->data + b->size, data, len); b->size += len; *((b->data) + b->size) = '\0'; } static inline char * tbuf_str(struct tbuf *tbuf) { return tbuf->data; } static inline void * tbuf_end(struct tbuf *tbuf) { return tbuf->data + tbuf->size; } static inline size_t tbuf_unused(const struct tbuf *tbuf) { return tbuf->capacity - tbuf->size; } struct tbuf *tbuf_clone(struct palloc_pool *pool, const struct tbuf *orig); struct tbuf *tbuf_split(struct tbuf *e, size_t at); void tbuf_reset(struct tbuf *b); void *tbuf_peek(struct tbuf *b, size_t count); /** * Remove count bytes from the beginning, and adjust all sizes * accordingly. * * @param count the number of bytes to forget about. * * @pre 0 <= count <= tbuf->len */ void tbuf_ltrim(struct tbuf *b, size_t count); void tbuf_append_field(struct tbuf *b, const void *f); void tbuf_vprintf(struct tbuf *b, const char *format, va_list ap) __attribute__ ((format(FORMAT_PRINTF, 2, 0))); void tbuf_printf(struct tbuf *b, const char *format, ...) __attribute__ ((format(FORMAT_PRINTF, 2, 3))); char *tbuf_to_hex(const struct tbuf *x); #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_TBUF_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/errinj.h0000664000000000000000000000431512231715257017055 0ustar rootroot#ifndef TARANTOOL_ERRINJ_H_INCLUDED #define TARANTOOL_ERRINJ_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "exception.h" #include "tarantool/util.h" struct errinj { const char *name; bool state; }; /** * list of error injection handles. */ #define ERRINJ_LIST(_) \ _(ERRINJ_TESTING, false) \ _(ERRINJ_WAL_IO, false) \ _(ERRINJ_WAL_ROTATE, false) \ _(ERRINJ_INDEX_ALLOC, false) ENUM0(errinj_enum, ERRINJ_LIST); extern struct errinj errinjs[]; bool errinj_get(int id); void errinj_set(int id, bool state); int errinj_set_byname(char *name, bool state); struct tbuf; void errinj_info(struct tbuf *out); #ifdef NDEBUG # define ERROR_INJECT(ID, CODE) #else # define ERROR_INJECT(ID, CODE) \ do { \ if (errinj_get(ID) == true) \ CODE; \ } while (0) #endif #define ERROR_INJECT_EXCEPTION(ID) \ ERROR_INJECT(ID, tnt_raise(ErrorInjection, #ID)) #define ERROR_INJECT_RETURN(ID) ERROR_INJECT(ID, return -1) #endif /* TATRANTOOL_ERRINJ_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/include/coio.h0000664000000000000000000000766312202131537016515 0ustar rootroot#ifndef TARANTOOL_COIO_H_INCLUDED #define TARANTOOL_COIO_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "evio.h" /** * Co-operative I/O * Yield the current fiber until IO is ready. */ struct coio_service { struct evio_service evio_service; /* Fiber function. */ void (*handler)(va_list ap); /** Passed to the created fiber. */ void *handler_param; }; void coio_connect(struct ev_io *coio, struct sockaddr_in *addr); bool coio_connect_timeout(struct ev_io *coio, struct sockaddr_in *addr, socklen_t len, ev_tstamp timeout); bool coio_connect_addrinfo(struct ev_io *coio, struct addrinfo *ai, ev_tstamp timeout); void coio_bind(struct ev_io *coio, struct sockaddr_in *addr, socklen_t addrlen); int coio_accept(struct ev_io *coio, struct sockaddr_in *addr, socklen_t addrlen, ev_tstamp timeout); void coio_init(struct ev_io *coio); ssize_t coio_read_ahead_timeout(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz, ev_tstamp timeout); /** * Reat at least sz bytes, with readahead. * * Returns 0 in case of EOF. */ static inline ssize_t coio_read_ahead(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz) { return coio_read_ahead_timeout(coio, buf, sz, bufsiz, TIMEOUT_INFINITY); } ssize_t coio_readn_ahead(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz); static inline ssize_t coio_read(struct ev_io *coio, void *buf, size_t sz) { return coio_read_ahead(coio, buf, sz, sz); } static inline ssize_t coio_read_timeout(struct ev_io *coio, void *buf, size_t sz, ev_tstamp timeout) { return coio_read_ahead_timeout(coio, buf, sz, sz, timeout); } static inline ssize_t coio_readn(struct ev_io *coio, void *buf, size_t sz) { return coio_readn_ahead(coio, buf, sz, sz); } ssize_t coio_readn_ahead_timeout(struct ev_io *coio, void *buf, size_t sz, size_t bufsiz, ev_tstamp timeout); ssize_t coio_write_timeout(struct ev_io *coio, const void *buf, size_t sz, ev_tstamp timeout); static inline void coio_write(struct ev_io *coio, const void *buf, size_t sz) { coio_write_timeout(coio, buf, sz, TIMEOUT_INFINITY); } ssize_t coio_writev(struct ev_io *coio, struct iovec *iov, int iovcnt, size_t size); ssize_t coio_sendto_timeout(struct ev_io *coio, const void *buf, size_t sz, int flags, const struct sockaddr_in *dest_addr, socklen_t addrlen, ev_tstamp timeout); ssize_t coio_recvfrom_timeout(struct ev_io *coio, void *buf, size_t sz, int flags, struct sockaddr_in *src_addr, socklen_t addrlen, ev_tstamp timeout); void coio_service_init(struct coio_service *service, const char *name, const char *host, int port, void (*handler)(va_list ap), void *handler_param); #endif /* TARANTOOL_COIO_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/third_party/0000775000000000000000000000000012231715276016317 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/memrchr.c0000664000000000000000000000351012202131537020105 0ustar rootroot/* $NetBSD: memrchr.c,v 1.2 2009/04/11 21:42:16 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Christos Zoulas. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include void * memrchr(const void *s, int c, size_t n) { assert(s != NULL); if (n != 0) { const unsigned char *p = (const unsigned char *)s + n; const unsigned char cmp = c; do { if (*--p == cmp) return (void *) p; } while (--n != 0); } return NULL; } tarantool-1.5.1.218.g1a69fd6/third_party/tarantool_ev.c0000664000000000000000000000305312213313337021151 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool_ev.h" #include "third_party/libev/ev.c" #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ const ev_tstamp TIMEOUT_INFINITY = 365*86400*100.0; #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ tarantool-1.5.1.218.g1a69fd6/third_party/tarantool_ev.h0000664000000000000000000000412612213313337021160 0ustar rootroot#ifndef TARANTOOL_EV_H_INCLUDED #define TARANTOOL_EV_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool/config.h" #include #include #include #include #if defined(ENABLE_BUNDLED_LIBEV) #define EV_MULTIPLICITY 0 #define EV_STANDALONE 1 #define EV_USE_SELECT 1 #define EV_USE_POLL 1 #define EV_USE_NANOSLEEP 1 #define EV_USE_REALTIME 1 #define EV_PERIODIC_ENABLE 1 #define EV_IDLE_ENABLE 1 #define EV_STAT_ENABLE 1 #define EV_FORK_ENABLE 1 #define EV_CONFIG_H 0 #include "third_party/libev/ev.h" #else /* !defined(ENABLE_BUNDLED_LIBEV) */ #include #endif #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ extern const ev_tstamp TIMEOUT_INFINITY; #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* TARANTOOL_EV_H_INCLUDED */ tarantool-1.5.1.218.g1a69fd6/third_party/queue.h0000664000000000000000000004434212202131537017611 0ustar rootroot/*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 * $FreeBSD: src/sys/sys/queue.h,v 1.60.2.1 2005/08/16 22:41:39 phk Exp $ */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ #include /* * This file defines four types of data structures: singly-linked lists, * singly-linked tail queues, lists and tail queues. * * A singly-linked list is headed by a single forward pointer. The elements * are singly linked for minimum space and pointer manipulation overhead at * the expense of O(n) removal for arbitrary elements. New elements can be * added to the list after an existing element or at the head of the list. * Elements being removed from the head of the list should use the explicit * macro for this purpose for optimum efficiency. A singly-linked list may * only be traversed in the forward direction. Singly-linked lists are ideal * for applications with large datasets and few or no removals or for * implementing a LIFO queue. * * A singly-linked tail queue is headed by a pair of pointers, one to the * head of the list and the other to the tail of the list. The elements are * singly linked for minimum space and pointer manipulation overhead at the * expense of O(n) removal for arbitrary elements. New elements can be added * to the list after an existing element, at the head of the list, or at the * end of the list. Elements being removed from the head of the tail queue * should use the explicit macro for this purpose for optimum efficiency. * A singly-linked tail queue may only be traversed in the forward direction. * Singly-linked tail queues are ideal for applications with large datasets * and few or no removals or for implementing a FIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * For details on the use of these macros, see the queue(3) manual page. * * * SLIST LIST STAILQ TAILQ * _HEAD + + + + * _HEAD_INITIALIZER + + + + * _ENTRY + + + + * _INIT + + + + * _EMPTY + + + + * _FIRST + + + + * _NEXT + + + + * _PREV - - - + * _LAST - - + + * _FOREACH + + + + * _FOREACH_SAFE + + + + * _FOREACH_REVERSE - - - + * _FOREACH_REVERSE_SAFE - - - + * _INSERT_HEAD + + + + * _INSERT_BEFORE - + - + * _INSERT_AFTER + + + + * _INSERT_TAIL - - + + * _CONCAT - - + + * _REMOVE_HEAD + - + - * _REMOVE + + + + * */ #define QUEUE_MACRO_DEBUG 0 #if QUEUE_MACRO_DEBUG /* Store the last 2 places the queue element or head was altered */ struct qm_trace { char * lastfile; int lastline; char * prevfile; int prevline; }; #define TRACEBUF struct qm_trace trace; #define TRASHIT(x) do {(x) = (void *)-1;} while (0) #define QMD_TRACE_HEAD(head) do { \ (head)->trace.prevline = (head)->trace.lastline; \ (head)->trace.prevfile = (head)->trace.lastfile; \ (head)->trace.lastline = __LINE__; \ (head)->trace.lastfile = __FILE__; \ } while (0) #define QMD_TRACE_ELEM(elem) do { \ (elem)->trace.prevline = (elem)->trace.lastline; \ (elem)->trace.prevfile = (elem)->trace.lastfile; \ (elem)->trace.lastline = __LINE__; \ (elem)->trace.lastfile = __FILE__; \ } while (0) #else #define QMD_TRACE_ELEM(elem) #define QMD_TRACE_HEAD(head) #define TRACEBUF #define TRASHIT(x) #endif /* QUEUE_MACRO_DEBUG */ /* * Singly-linked List declarations. */ #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } /* * Singly-linked List functions. */ #define SLIST_EMPTY(head) ((head)->slh_first == NULL) #define SLIST_FIRST(head) ((head)->slh_first) #define SLIST_FOREACH(var, head, field) \ for ((var) = SLIST_FIRST((head)); \ (var); \ (var) = SLIST_NEXT((var), field)) #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = SLIST_FIRST((head)); \ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ (var) = (tvar)) #define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ for ((varp) = &SLIST_FIRST((head)); \ ((var) = *(varp)) != NULL; \ (varp) = &SLIST_NEXT((var), field)) #define SLIST_INIT(head) do { \ SLIST_FIRST((head)) = NULL; \ } while (0) #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \ SLIST_NEXT((slistelm), field) = (elm); \ } while (0) #define SLIST_INSERT_HEAD(head, elm, field) do { \ SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \ SLIST_FIRST((head)) = (elm); \ } while (0) #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) #define SLIST_REMOVE(head, elm, type, field) do { \ if (SLIST_FIRST((head)) == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = SLIST_FIRST((head)); \ while (SLIST_NEXT(curelm, field) != (elm)) \ curelm = SLIST_NEXT(curelm, field); \ SLIST_NEXT(curelm, field) = \ SLIST_NEXT(SLIST_NEXT(curelm, field), field); \ } \ } while (0) #define SLIST_REMOVE_HEAD(head, field) do { \ SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ } while (0) /* * Singly-linked Tail queue declarations. */ #define STAILQ_HEAD(name, type) \ struct name { \ struct type *stqh_first;/* first element */ \ struct type **stqh_last;/* addr of last next element */ \ } #define STAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).stqh_first } #define STAILQ_ENTRY(type) \ struct { \ struct type *stqe_next; /* next element */ \ } /* * Singly-linked Tail queue functions. */ #define STAILQ_CONCAT(head1, head2) do { \ if (!STAILQ_EMPTY((head2))) { \ *(head1)->stqh_last = (head2)->stqh_first; \ (head1)->stqh_last = (head2)->stqh_last; \ STAILQ_INIT((head2)); \ } \ } while (0) #define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) #define STAILQ_FIRST(head) ((head)->stqh_first) #define STAILQ_FOREACH(var, head, field) \ for((var) = STAILQ_FIRST((head)); \ (var); \ (var) = STAILQ_NEXT((var), field)) #define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = STAILQ_FIRST((head)); \ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ (var) = (tvar)) #define STAILQ_INIT(head) do { \ STAILQ_FIRST((head)) = NULL; \ (head)->stqh_last = &STAILQ_FIRST((head)); \ } while (0) #define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ STAILQ_NEXT((tqelm), field) = (elm); \ } while (0) #define STAILQ_INSERT_HEAD(head, elm, field) do { \ if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ STAILQ_FIRST((head)) = (elm); \ } while (0) #define STAILQ_INSERT_TAIL(head, elm, field) do { \ STAILQ_NEXT((elm), field) = NULL; \ *(head)->stqh_last = (elm); \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ } while (0) #define STAILQ_LAST(head, type, field) \ (STAILQ_EMPTY((head)) ? \ NULL : \ ((struct type *) \ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) #define STAILQ_REMOVE(head, elm, type, field) do { \ if (STAILQ_FIRST((head)) == (elm)) { \ STAILQ_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = STAILQ_FIRST((head)); \ while (STAILQ_NEXT(curelm, field) != (elm)) \ curelm = STAILQ_NEXT(curelm, field); \ if ((STAILQ_NEXT(curelm, field) = \ STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\ (head)->stqh_last = &STAILQ_NEXT((curelm), field);\ } \ } while (0) #define STAILQ_REMOVE_HEAD(head, field) do { \ if ((STAILQ_FIRST((head)) = \ STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ (head)->stqh_last = &STAILQ_FIRST((head)); \ } while (0) #define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \ (head)->stqh_last = &STAILQ_FIRST((head)); \ } while (0) /* Reverse a list in-place. */ #define STAILQ_REVERSE(head, type, member) do { \ struct type *elem = STAILQ_FIRST(head), *next; \ STAILQ_INIT(head); \ while (elem) { \ next = STAILQ_NEXT(elem, member); \ STAILQ_INSERT_HEAD(head, elem, member); \ elem = next; \ } \ } while (0) /* Concat all members of head1 starting from elem to the end of head2. */ #define STAILQ_SPLICE(head1, elem, member, head2) do { \ if (elem) { \ *(head2)->stqh_last = (elem); \ (head2)->stqh_last = (head1)->stqh_last; \ (head1)->stqh_last = &STAILQ_FIRST(head1); \ while (*(head1)->stqh_last != (elem)) { \ (head1)->stqh_last = &STAILQ_NEXT( \ *(head1)->stqh_last, member); \ } \ *(head1)->stqh_last = NULL; \ } \ } while (0) /* * List declarations. */ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #define LIST_HEAD_INITIALIZER(head) \ { NULL } #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } /* * List functions. */ #define LIST_EMPTY(head) ((head)->lh_first == NULL) #define LIST_FIRST(head) ((head)->lh_first) #define LIST_FOREACH(var, head, field) \ for ((var) = LIST_FIRST((head)); \ (var); \ (var) = LIST_NEXT((var), field)) #define LIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = LIST_FIRST((head)); \ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ (var) = (tvar)) #define LIST_INIT(head) do { \ LIST_FIRST((head)) = NULL; \ } while (0) #define LIST_INSERT_AFTER(listelm, elm, field) do { \ if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\ LIST_NEXT((listelm), field)->field.le_prev = \ &LIST_NEXT((elm), field); \ LIST_NEXT((listelm), field) = (elm); \ (elm)->field.le_prev = &LIST_NEXT((listelm), field); \ } while (0) #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.le_prev = (listelm)->field.le_prev; \ LIST_NEXT((elm), field) = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ } while (0) #define LIST_INSERT_HEAD(head, elm, field) do { \ if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \ LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\ LIST_FIRST((head)) = (elm); \ (elm)->field.le_prev = &LIST_FIRST((head)); \ } while (0) #define LIST_NEXT(elm, field) ((elm)->field.le_next) #define LIST_REMOVE(elm, field) do { \ if (LIST_NEXT((elm), field) != NULL) \ LIST_NEXT((elm), field)->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = LIST_NEXT((elm), field); \ } while (0) /* * Tail queue declarations. */ #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; /* first element */ \ struct type **tqh_last; /* addr of last next element */ \ TRACEBUF \ } #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ TRACEBUF \ } /* * Tail queue functions. */ #define TAILQ_CONCAT(head1, head2, field) do { \ if (!TAILQ_EMPTY(head2)) { \ *(head1)->tqh_last = (head2)->tqh_first; \ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ (head1)->tqh_last = (head2)->tqh_last; \ TAILQ_INIT((head2)); \ QMD_TRACE_HEAD(head1); \ QMD_TRACE_HEAD(head2); \ } \ } while (0) #define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_FOREACH(var, head, field) \ for ((var) = TAILQ_FIRST((head)); \ (var); \ (var) = TAILQ_NEXT((var), field)) #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST((head)); \ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ (var) = (tvar)) #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = TAILQ_LAST((head), headname); \ (var); \ (var) = TAILQ_PREV((var), headname, field)) #define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ for ((var) = TAILQ_LAST((head), headname); \ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ (var) = (tvar)) #define TAILQ_INIT(head) do { \ TAILQ_FIRST((head)) = NULL; \ (head)->tqh_last = &TAILQ_FIRST((head)); \ QMD_TRACE_HEAD(head); \ } while (0) #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ TAILQ_NEXT((elm), field)->field.tqe_prev = \ &TAILQ_NEXT((elm), field); \ else { \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ QMD_TRACE_HEAD(head); \ } \ TAILQ_NEXT((listelm), field) = (elm); \ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ QMD_TRACE_ELEM(&listelm->field); \ } while (0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ TAILQ_NEXT((elm), field) = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ QMD_TRACE_ELEM(&listelm->field); \ } while (0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \ TAILQ_FIRST((head))->field.tqe_prev = \ &TAILQ_NEXT((elm), field); \ else \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ TAILQ_FIRST((head)) = (elm); \ (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ QMD_TRACE_HEAD(head); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) #define TAILQ_INSERT_TAIL(head, elm, field) do { \ TAILQ_NEXT((elm), field) = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ QMD_TRACE_HEAD(head); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)->tqh_last))->tqh_last)) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_PREV(elm, headname, field) \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) #define TAILQ_REMOVE(head, elm, field) do { \ if ((TAILQ_NEXT((elm), field)) != NULL) \ TAILQ_NEXT((elm), field)->field.tqe_prev = \ (elm)->field.tqe_prev; \ else { \ (head)->tqh_last = (elm)->field.tqe_prev; \ QMD_TRACE_HEAD(head); \ } \ *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ TRASHIT((elm)->field.tqe_next); \ TRASHIT((elm)->field.tqe_prev); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) #define TAILQ_REMOVE_HEAD(head, field) do { \ TAILQ_REMOVE(head, TAILQ_FIRST(head), field); \ } while (0) #ifdef _KERNEL /* * XXX insque() and remque() are an old way of handling certain queues. * They bogusly assumes that all queue heads look alike. */ struct quehead { struct quehead *qh_link; struct quehead *qh_rlink; }; #ifdef __CC_SUPPORTS___INLINE static __inline void insque(void *a, void *b) { struct quehead *element = (struct quehead *)a, *head = (struct quehead *)b; element->qh_link = head->qh_link; element->qh_rlink = head; head->qh_link = element; element->qh_link->qh_rlink = element; } static __inline void remque(void *a) { struct quehead *element = (struct quehead *)a; element->qh_link->qh_rlink = element->qh_rlink; element->qh_rlink->qh_link = element->qh_link; element->qh_rlink = 0; } #else /* !__CC_SUPPORTS___INLINE */ void insque(void *a, void *b); void remque(void *a); #endif /* __CC_SUPPORTS___INLINE */ #endif /* _KERNEL */ #endif /* !_SYS_QUEUE_H_ */ tarantool-1.5.1.218.g1a69fd6/third_party/base64.c0000664000000000000000000001673512202131537017551 0ustar rootroot/* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "third_party/base64.h" /* * This is part of the libb64 project, and has been placed in the * public domain. For details, see * http://sourceforge.net/projects/libb64 */ /* {{{ encode */ enum base64_encodestep { step_A, step_B, step_C }; struct base64_encodestate { enum base64_encodestep step; char result; int stepcount; }; static inline void base64_encodestate_init(struct base64_encodestate *state) { state->step = step_A; state->result = 0; state->stepcount = 0; } static inline char base64_encode_value(char value) { static const char encoding[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; unsigned codepos = (unsigned) value; if (codepos > sizeof(encoding) - 1) return '='; return encoding[codepos]; } static int base64_encode_block(const char *in_bin, int in_len, char *out_base64, int out_len, struct base64_encodestate *state) { const char *const in_end = in_bin + in_len; const char *in_pos = in_bin; char *out_pos = out_base64; char *out_end = out_base64 + out_len; char result; char fragment; result = state->result; switch (state->step) { while (1) { case step_A: if (in_pos == in_end || out_pos >= out_end) { state->result = result; state->step = step_A; return out_pos - out_base64; } fragment = *in_pos++; result = (fragment & 0x0fc) >> 2; *out_pos++ = base64_encode_value(result); result = (fragment & 0x003) << 4; case step_B: if (in_pos == in_end || out_pos >= out_end) { state->result = result; state->step = step_B; return out_pos - out_base64; } fragment = *in_pos++; result |= (fragment & 0x0f0) >> 4; *out_pos++ = base64_encode_value(result); result = (fragment & 0x00f) << 2; case step_C: if (in_pos == in_end || out_pos + 2 >= out_end) { state->result = result; state->step = step_C; return out_pos - out_base64; } fragment = *in_pos++; result |= (fragment & 0x0c0) >> 6; *out_pos++ = base64_encode_value(result); result = (fragment & 0x03f) >> 0; *out_pos++ = base64_encode_value(result); /* * Each full step (A->B->C) yields * 4 characters. */ if (++state->stepcount * 4 == BASE64_CHARS_PER_LINE) { if (out_pos >= out_end) return out_pos - out_base64; *out_pos++ = '\n'; state->stepcount = 0; } } } /* control should not reach here */ return out_pos - out_base64; } static int base64_encode_blockend(char *out_base64, int out_len, struct base64_encodestate *state) { char *out_pos = out_base64; char *out_end = out_base64 + out_len; switch (state->step) { case step_B: if (out_pos + 2 >= out_end) return out_pos - out_base64; *out_pos++ = base64_encode_value(state->result); *out_pos++ = '='; *out_pos++ = '='; break; case step_C: if (out_pos + 1 >= out_end) return out_pos - out_base64; *out_pos++ = base64_encode_value(state->result); *out_pos++ = '='; break; case step_A: break; } if (out_pos >= out_end) return out_pos - out_base64; *out_pos++ = '\n'; if (out_pos >= out_end) return out_pos - out_base64; *out_pos = '\0'; return out_pos - out_base64; } int base64_encode(const char *in_bin, int in_len, char *out_base64, int out_len) { struct base64_encodestate state; base64_encodestate_init(&state); int res = base64_encode_block(in_bin, in_len, out_base64, out_len, &state); return res + base64_encode_blockend(out_base64 + res, out_len - res, &state); } /* }}} */ /* {{{ decode */ enum base64_decodestep { step_a, step_b, step_c, step_d }; struct base64_decodestate { enum base64_decodestep step; char result; }; static char base64_decode_value(char value) { static const char decoding[] = { 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -2, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 }; static const char decoding_size = sizeof(decoding); int codepos = (signed char) value; codepos -= 43; if (codepos < 0 || codepos > decoding_size) return -1; return decoding[codepos]; } static inline void base64_decodestate_init(struct base64_decodestate *state) { state->step = step_a; state->result = 0; } static int base64_decode_block(const char *in_base64, int in_len, char *out_bin, int out_len, struct base64_decodestate *state) { const char *in_pos = in_base64; const char *in_end = in_base64 + in_len; char *out_pos = out_bin; char *out_end = out_bin + out_len; char fragment; *out_pos = state->result; switch (state->step) { while (1) { case step_a: do { if (in_pos == in_end || out_pos >= out_end) { state->step = step_a; state->result = *out_pos; return out_pos - out_bin; } fragment = base64_decode_value(*in_pos++); } while (fragment < 0); *out_pos = (fragment & 0x03f) << 2; case step_b: do { if (in_pos == in_end || out_pos + 1 >= out_end) { state->step = step_b; state->result = *out_pos; return out_pos - out_bin; } fragment = base64_decode_value(*in_pos++); } while (fragment < 0); *out_pos++ |= (fragment & 0x030) >> 4; *out_pos = (fragment & 0x00f) << 4; case step_c: do { if (in_pos == in_end || out_pos + 1 >= out_end) { state->step = step_c; state->result = *out_pos; return out_pos - out_bin; } fragment = base64_decode_value(*in_pos++); } while (fragment < 0); *out_pos++ |= (fragment & 0x03c) >> 2; *out_pos = (fragment & 0x003) << 6; case step_d: do { if (in_pos == in_end || out_pos >= out_end) { state->step = step_d; state->result = *out_pos; return out_pos - out_bin; } fragment = base64_decode_value(*in_pos++); } while (fragment < 0); *out_pos++ |= (fragment & 0x03f); } } /* control should not reach here */ return out_pos - out_bin; } int base64_decode(const char *in_base64, int in_len, char *out_bin, int out_len) { struct base64_decodestate state; base64_decodestate_init(&state); return base64_decode_block(in_base64, in_len, out_bin, out_len, &state); } /* }}} */ tarantool-1.5.1.218.g1a69fd6/third_party/proctitle.c0000664000000000000000000002260112202131537020457 0ustar rootroot/* * Copyright (C) 2000-2010 PostgreSQL Global Development Group * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #ifdef HAVE_SYS_PSTAT_H #include /* for HP-UX */ #endif #ifdef HAVE_PS_STRINGS #include /* for old BSD */ #include #endif #if defined(__darwin__) #include #endif extern char **environ; /* * Alternative ways of updating ps display: * * PS_USE_SETPROCTITLE * use the function setproctitle(const char *, ...) * (newer BSD systems) * PS_USE_PSTAT * use the pstat(PSTAT_SETCMD, ) * (HPUX) * PS_USE_PS_STRINGS * assign PS_STRINGS->ps_argvstr = "string" * (some BSD systems) * PS_USE_CHANGE_ARGV * assign argv[0] = "string" * (some other BSD systems) * PS_USE_CLOBBER_ARGV * write over the argv and environment area * (most SysV-like systems) * PS_USE_WIN32 * push the string out as the name of a Windows event * PS_USE_NONE * don't update ps display * (This is the default, as it is safest.) */ #if defined(HAVE_SETPROCTITLE) #define PS_USE_SETPROCTITLE #elif defined(HAVE_PSTAT) && defined(PSTAT_SETCMD) #define PS_USE_PSTAT #elif defined(HAVE_PS_STRINGS) #define PS_USE_PS_STRINGS #elif (defined(BSD) || defined(__bsdi__) || defined(__hurd__)) && !defined(__darwin__) #define PS_USE_CHANGE_ARGV #elif defined(__linux__) || defined(_AIX) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__ksr__) || defined(__osf__) || defined(__svr4__) || defined(__svr5__) || defined(__darwin__) #define PS_USE_CLOBBER_ARGV #elif defined(WIN32) #define PS_USE_WIN32 #else #define PS_USE_NONE #endif /* Different systems want the buffer padded differently */ #if defined(_AIX) || defined(__linux__) || defined(__svr4__) #define PS_PADDING '\0' #else #define PS_PADDING ' ' #endif #ifndef PS_USE_CLOBBER_ARGV /* all but one options need a buffer to write their ps line in */ #define PS_BUFFER_SIZE 256 static char ps_buffer[PS_BUFFER_SIZE]; static const size_t ps_buffer_size = PS_BUFFER_SIZE; #else /* PS_USE_CLOBBER_ARGV */ static char *ps_buffer; /* will point to argv area */ static size_t ps_buffer_size; /* space determined at run time */ static size_t last_status_len; /* use to minimize length of clobber */ #endif /* PS_USE_CLOBBER_ARGV */ static size_t ps_buffer_fixed_size; /* size of the constant prefix */ /* save the original argv[] location here */ static int save_argc; static char **save_argv; /* save the original environ[] here */ static char **save_environ = NULL; /* * Call this early in startup to save the original argc/argv values. * If needed, we make a copy of the original argv[] array to preserve it * from being clobbered by subsequent ps_display actions. * * (The original argv[] will not be overwritten by this routine, but may be * overwritten during init_ps_display. Also, the physical location of the * environment strings may be moved, so this should be called before any code * that might try to hang onto a getenv() result.) */ char ** init_set_proc_title(int argc, char **argv) { save_argc = argc; save_argv = argv; #if defined(PS_USE_CLOBBER_ARGV) save_environ = environ; /* * If we're going to overwrite the argv area, count the available space. * Also move the environment to make additional room. */ { char *end_of_area = NULL; char **new_environ; int i; /* * check for contiguous argv strings */ for (i = 0; i < argc; i++) { if (i == 0 || end_of_area + 1 == argv[i]) end_of_area = argv[i] + strlen(argv[i]); } if (end_of_area == NULL) { /* probably can't happen? */ ps_buffer = NULL; ps_buffer_size = 0; return argv; } /* * check for contiguous environ strings following argv */ for (i = 0; environ[i] != NULL; i++) { if (end_of_area + 1 == environ[i]) end_of_area = environ[i] + strlen(environ[i]); } ps_buffer = argv[0]; last_status_len = ps_buffer_size = end_of_area - argv[0]; /* * move the environment out of the way */ new_environ = (char **)malloc((i + 1) * sizeof(char *)); for (i = 0; environ[i] != NULL; i++) new_environ[i] = strdup(environ[i]); new_environ[i] = NULL; environ = new_environ; } #endif /* PS_USE_CLOBBER_ARGV */ #if defined(PS_USE_CHANGE_ARGV) || defined(PS_USE_CLOBBER_ARGV) /* * If we're going to change the original argv[] then make a copy for * argument parsing purposes. * * (NB: do NOT think to remove the copying of argv[], even though * postmaster.c finishes looking at argv[] long before we ever consider * changing the ps display. On some platforms, getopt() keeps pointers * into the argv array, and will get horribly confused when it is * re-called to analyze a subprocess' argument string if the argv storage * has been clobbered meanwhile. Other platforms have other dependencies * on argv[]. */ { char **new_argv; int i; new_argv = (char **)malloc((argc + 1) * sizeof(char *)); for (i = 0; i < argc; i++) new_argv[i] = strdup(argv[i]); new_argv[argc] = NULL; #if defined(__darwin__) /* * Darwin (and perhaps other NeXT-derived platforms?) has a static * copy of the argv pointer, which we may fix like so: */ *_NSGetArgv() = new_argv; #endif argv = new_argv; } #endif /* PS_USE_CHANGE_ARGV or PS_USE_CLOBBER_ARGV */ #ifndef PS_USE_NONE /* init first part of proctitle */ #ifdef PS_USE_SETPROCTITLE /* * apparently setproctitle() already adds a `progname:' prefix to the ps * line */ ps_buffer_fixed_size = 0; #else { char basename_buf[PATH_MAX]; /* * At least partially mimic FreeBSD, which for * ./a.out outputs: * * a.out: custom title here (a.out) */ snprintf(basename_buf, sizeof basename_buf, "%s", argv[0]); snprintf(ps_buffer, ps_buffer_size, "%s: ", basename(basename_buf)); } ps_buffer_fixed_size = strlen(ps_buffer); #ifdef PS_USE_CLOBBER_ARGV if (ps_buffer_size > ps_buffer_fixed_size) memset(ps_buffer + ps_buffer_fixed_size, PS_PADDING, ps_buffer_size - ps_buffer_fixed_size); #endif /* PS_USE_CLOBBER_ARGV */ #endif #endif /*PS_USE_NONE */ return argv; } void free_proc_title(int argc, char **argv) { int i; #if defined(PS_USE_CLOBBER_ARGV) for (i = 0; environ[i] != NULL; i++) free(environ[i]); free(environ); environ = save_environ; #endif /* PS_USE_CLOBBER_ARGV */ #if defined(PS_USE_CHANGE_ARGV) || defined(PS_USE_CLOBBER_ARGV) for (i = 0; i < argc; i++) free(argv[i]); free(argv); #endif /* PS_USE_CHANGE_ARGV or PS_USE_CLOBBER_ARGV */ } void set_proc_title(const char *format, ...) { va_list ap; #ifndef PS_USE_NONE #ifdef PS_USE_CLOBBER_ARGV /* If ps_buffer is a pointer, it might still be null */ if (!ps_buffer) return; #endif /* Update ps_buffer to contain both fixed part and activity */ va_start(ap, format); vsnprintf(ps_buffer + ps_buffer_fixed_size, ps_buffer_size - ps_buffer_fixed_size, format, ap); va_end(ap); /* Transmit new setting to kernel, if necessary */ #ifdef PS_USE_SETPROCTITLE setproctitle("%s", ps_buffer); #endif #ifdef PS_USE_PSTAT { union pstun pst; pst.pst_command = ps_buffer; pstat(PSTAT_SETCMD, pst, strlen(ps_buffer), 0, 0); } #endif /* PS_USE_PSTAT */ #ifdef PS_USE_PS_STRINGS PS_STRINGS->ps_nargvstr = 1; PS_STRINGS->ps_argvstr = ps_buffer; #endif /* PS_USE_PS_STRINGS */ #ifdef PS_USE_CLOBBER_ARGV { int buflen; /* pad unused memory */ buflen = strlen(ps_buffer); /* clobber remainder of old status string */ if (last_status_len > buflen) memset(ps_buffer + buflen, PS_PADDING, last_status_len - buflen); last_status_len = buflen; } #endif /* PS_USE_CLOBBER_ARGV */ #ifdef PS_USE_WIN32 { /* * Win32 does not support showing any changed arguments. To make it at * all possible to track which backend is doing what, we create a * named object that can be viewed with for example Process Explorer. */ static HANDLE ident_handle = INVALID_HANDLE_VALUE; char name[PS_BUFFER_SIZE + 32]; if (ident_handle != INVALID_HANDLE_VALUE) CloseHandle(ident_handle); sprintf(name, "pgident(%d): %s", MyProcPid, ps_buffer); ident_handle = CreateEvent(NULL, TRUE, FALSE, name); } #endif /* PS_USE_WIN32 */ #endif /* not PS_USE_NONE */ } tarantool-1.5.1.218.g1a69fd6/third_party/PMurHash.c0000664000000000000000000002417312202131537020147 0ustar rootroot/*----------------------------------------------------------------------------- * MurmurHash3 was written by Austin Appleby, and is placed in the public * domain. * * This implementation was written by Shane Day, and is also public domain. * * This is a portable ANSI C implementation of MurmurHash3_x86_32 (Murmur3A) * with support for progressive processing. */ /*----------------------------------------------------------------------------- If you want to understand the MurmurHash algorithm you would be much better off reading the original source. Just point your browser at: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp What this version provides? 1. Progressive data feeding. Useful when the entire payload to be hashed does not fit in memory or when the data is streamed through the application. Also useful when hashing a number of strings with a common prefix. A partial hash of a prefix string can be generated and reused for each suffix string. 2. Portability. Plain old C so that it should compile on any old compiler. Both CPU endian and access-alignment neutral, but avoiding inefficient code when possible depending on CPU capabilities. 3. Drop in. I personally like nice self contained public domain code, making it easy to pilfer without loads of refactoring to work properly in the existing application code & makefile structure and mucking around with licence files. Just copy PMurHash.h and PMurHash.c and you're ready to go. How does it work? We can only process entire 32 bit chunks of input, except for the very end that may be shorter. So along with the partial hash we need to give back to the caller a carry containing up to 3 bytes that we were unable to process. This carry also needs to record the number of bytes the carry holds. I use the low 2 bits as a count (0..3) and the carry bytes are shifted into the high byte in stream order. To handle endianess I simply use a macro that reads a uint32_t and define that macro to be a direct read on little endian machines, a read and swap on big endian machines, or a byte-by-byte read if the endianess is unknown. -----------------------------------------------------------------------------*/ #include "PMurHash.h" /* I used ugly type names in the header to avoid potential conflicts with * application or system typedefs & defines. Since I'm not including any more * headers below here I can rename these so that the code reads like C99 */ #undef uint32_t #define uint32_t MH_UINT32 #undef uint8_t #define uint8_t MH_UINT8 /* MSVC warnings we choose to ignore */ #if defined(_MSC_VER) #pragma warning(disable: 4127) /* conditional expression is constant */ #endif /*----------------------------------------------------------------------------- * Endianess, misalignment capabilities and util macros * * The following 3 macros are defined in this section. The other macros defined * are only needed to help derive these 3. * * READ_UINT32(x) Read a little endian unsigned 32-bit int * UNALIGNED_SAFE Defined if READ_UINT32 works on non-word boundaries * ROTL32(x,r) Rotate x left by r bits */ /* Convention is to define __BYTE_ORDER == to one of these values */ #if !defined(__BIG_ENDIAN) #define __BIG_ENDIAN 4321 #endif #if !defined(__LITTLE_ENDIAN) #define __LITTLE_ENDIAN 1234 #endif /* I386 */ #if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(i386) #define __BYTE_ORDER __LITTLE_ENDIAN #define UNALIGNED_SAFE #endif /* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __), * or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */ #if !defined(__BYTE_ORDER) #if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN==1 #define __BYTE_ORDER __LITTLE_ENDIAN #elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN==1 #define __BYTE_ORDER __BIG_ENDIAN #endif #endif /* gcc (usually) defines xEL/EB macros for ARM and MIPS endianess */ #if !defined(__BYTE_ORDER) #if defined(__ARMEL__) || defined(__MIPSEL__) #define __BYTE_ORDER __LITTLE_ENDIAN #endif #if defined(__ARMEB__) || defined(__MIPSEB__) #define __BYTE_ORDER __BIG_ENDIAN #endif #endif /* Now find best way we can to READ_UINT32 */ #if __BYTE_ORDER==__LITTLE_ENDIAN /* CPU endian matches murmurhash algorithm, so read 32-bit word directly */ #define READ_UINT32(ptr) (*((uint32_t*)(ptr))) #elif __BYTE_ORDER==__BIG_ENDIAN /* TODO: Add additional cases below where a compiler provided bswap32 is available */ #if defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3)) #define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr)))) #else /* Without a known fast bswap32 we're just as well off doing this */ #define READ_UINT32(ptr) (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24) #define UNALIGNED_SAFE #endif #else /* Unknown endianess so last resort is to read individual bytes */ #define READ_UINT32(ptr) (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24) /* Since we're not doing word-reads we can skip the messing about with realignment */ #define UNALIGNED_SAFE #endif /* Find best way to ROTL32 */ #if defined(_MSC_VER) #include /* Microsoft put _rotl declaration in here */ #define ROTL32(x,r) _rotl(x,r) #else /* gcc recognises this code and generates a rotate instruction for CPUs with one */ #define ROTL32(x,r) (((uint32_t)x << r) | ((uint32_t)x >> (32 - r))) #endif /*----------------------------------------------------------------------------- * Core murmurhash algorithm macros */ #define C1 (0xcc9e2d51) #define C2 (0x1b873593) /* This is the main processing body of the algorithm. It operates * on each full 32-bits of input. */ #define DOBLOCK(h1, k1) do{ \ k1 *= C1; \ k1 = ROTL32(k1,15); \ k1 *= C2; \ \ h1 ^= k1; \ h1 = ROTL32(h1,13); \ h1 = h1*5+0xe6546b64; \ }while(0) /* Append unaligned bytes to carry, forcing hash churn if we have 4 bytes */ /* cnt=bytes to process, h1=name of h1 var, c=carry, n=bytes in c, ptr/len=payload */ #define DOBYTES(cnt, h1, c, n, ptr, len) do{ \ int _i = cnt; \ while(_i--) { \ c = c>>8 | *ptr++<<24; \ n++; len--; \ if(n==4) { \ DOBLOCK(h1, c); \ n = 0; \ } \ } }while(0) /*---------------------------------------------------------------------------*/ /* Main hashing function. Initialise carry to 0 and h1 to 0 or an initial seed * if wanted. Both ph1 and pcarry are required arguments. */ void PMurHash32_Process(uint32_t *ph1, uint32_t *pcarry, const void *key, int len) { uint32_t h1 = *ph1; uint32_t c = *pcarry; const uint8_t *ptr = (uint8_t*)key; const uint8_t *end; /* Extract carry count from low 2 bits of c value */ int n = c & 3; #if defined(UNALIGNED_SAFE) /* This CPU handles unaligned word access */ /* Consume any carry bytes */ int i = (4-n) & 3; if(i && i <= len) { DOBYTES(i, h1, c, n, ptr, len); } /* Process 32-bit chunks */ end = ptr + len/4*4; for( ; ptr < end ; ptr+=4) { uint32_t k1 = READ_UINT32(ptr); DOBLOCK(h1, k1); } #else /*UNALIGNED_SAFE*/ /* This CPU does not handle unaligned word access */ /* Consume enough so that the next data byte is word aligned */ int i = -(long)ptr & 3; if(i && i <= len) { DOBYTES(i, h1, c, n, ptr, len); } /* We're now aligned. Process in aligned blocks. Specialise for each possible carry count */ end = ptr + len/4*4; switch(n) { /* how many bytes in c */ case 0: /* c=[----] w=[3210] b=[3210]=w c'=[----] */ for( ; ptr < end ; ptr+=4) { uint32_t k1 = READ_UINT32(ptr); DOBLOCK(h1, k1); } break; case 1: /* c=[0---] w=[4321] b=[3210]=c>>24|w<<8 c'=[4---] */ for( ; ptr < end ; ptr+=4) { uint32_t k1 = c>>24; c = READ_UINT32(ptr); k1 |= c<<8; DOBLOCK(h1, k1); } break; case 2: /* c=[10--] w=[5432] b=[3210]=c>>16|w<<16 c'=[54--] */ for( ; ptr < end ; ptr+=4) { uint32_t k1 = c>>16; c = READ_UINT32(ptr); k1 |= c<<16; DOBLOCK(h1, k1); } break; case 3: /* c=[210-] w=[6543] b=[3210]=c>>8|w<<24 c'=[654-] */ for( ; ptr < end ; ptr+=4) { uint32_t k1 = c>>8; c = READ_UINT32(ptr); k1 |= c<<24; DOBLOCK(h1, k1); } } #endif /*UNALIGNED_SAFE*/ /* Advance over whole 32-bit chunks, possibly leaving 1..3 bytes */ len -= len/4*4; /* Append any remaining bytes into carry */ DOBYTES(len, h1, c, n, ptr, len); /* Copy out new running hash and carry */ *ph1 = h1; *pcarry = (c & ~0xff) | n; } /*---------------------------------------------------------------------------*/ /* Finalize a hash. To match the original Murmur3A the total_length must be provided */ uint32_t PMurHash32_Result(uint32_t h, uint32_t carry, uint32_t total_length) { uint32_t k1; int n = carry & 3; if(n) { k1 = carry >> (4-n)*8; k1 *= C1; k1 = ROTL32(k1,15); k1 *= C2; h ^= k1; } h ^= total_length; /* fmix */ h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; h *= 0xc2b2ae35; h ^= h >> 16; return h; } /*---------------------------------------------------------------------------*/ /* Murmur3A compatable all-at-once */ uint32_t PMurHash32(uint32_t seed, const void *key, int len) { uint32_t h1=seed, carry=0; PMurHash32_Process(&h1, &carry, key, len); return PMurHash32_Result(h1, carry, len); } /*---------------------------------------------------------------------------*/ /* Provide an API suitable for smhasher */ void PMurHash32_test(const void *key, int len, uint32_t seed, void *out) { uint32_t h1=seed, carry=0; const uint8_t *ptr = (uint8_t*)key; const uint8_t *end = ptr + len; #if 0 /* Exercise the progressive processing */ while(ptr < end) { //const uint8_t *mid = ptr + rand()%(end-ptr)+1; const uint8_t *mid = ptr + (rand()&0xF); mid = mid ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "tarantool_eio.h" #include "third_party/libeio/eio.c" tarantool-1.5.1.218.g1a69fd6/third_party/qsort_arg.c0000664000000000000000000001304212202131537020452 0ustar rootroot/* * Imported from PostgreSQL sources by Teodor Sigaev , */ /* * qsort_arg.c: qsort with a passthrough "void *" argument * * Modifications from vanilla NetBSD source: * Add do ... while() macro fix * Remove __inline, _DIAGASSERTs, __P * Remove ill-considered "swap_cnt" switch to insertion sort, * in favor of a simple check for presorted input. * * CAUTION: if you change this file, see also qsort.c * * $PostgreSQL: pgsql/src/port/qsort_arg.c,v 1.4 2007/03/18 05:36:50 neilc Exp $ */ /* $NetBSD: qsort.c,v 1.13 2003/08/07 16:43:42 agc Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #define min(a, b) (a) < (b) ? a : b static char *med3(char *a, char *b, char *c, int (*cmp)(const void *a, const void *b, void *arg), void *arg); static void swapfunc(char *, char *, size_t, int); /* * Qsort routine based on J. L. Bentley and M. D. McIlroy, * "Engineering a sort function", * Software--Practice and Experience 23 (1993) 1249-1265. * We have modified their original by adding a check for already-sorted input, * which seems to be a win per discussions on pgsql-hackers around 2006-03-21. */ #define swapcode(TYPE, parmi, parmj, n) \ do { \ size_t i = (n) / sizeof (TYPE); \ TYPE *pi = (TYPE *)(void *)(parmi); \ TYPE *pj = (TYPE *)(void *)(parmj); \ do { \ TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ } while (--i > 0); \ } while (0) #define SWAPINIT(a, es) swaptype = ((char *)(a) - (char *)0) % sizeof(long) || \ (es) % sizeof(long) ? 2 : (es) == sizeof(long)? 0 : 1; static void swapfunc(char *a, char *b, size_t n, int swaptype) { if (swaptype <= 1) swapcode(long, a, b, n); else swapcode(char, a, b, n); } #define swap(a, b) \ if (swaptype == 0) { \ long t = *(long *)(void *)(a); \ *(long *)(void *)(a) = *(long *)(void *)(b); \ *(long *)(void *)(b) = t; \ } else \ swapfunc(a, b, es, swaptype) #define vecswap(a, b, n) if ((n) > 0) swapfunc((a), (b), (size_t)(n), swaptype) static char * med3(char *a, char *b, char *c, int (*cmp)(const void *a, const void *b, void *arg), void *arg) { return cmp(a, b, arg) < 0 ? (cmp(b, c, arg) < 0 ? b : (cmp(a, c, arg) < 0 ? c : a)) : (cmp(b, c, arg) > 0 ? b : (cmp(a, c, arg) < 0 ? a : c)); } void qsort_arg(void *a, size_t n, size_t es, int (*cmp)(const void *a, const void *b, void *arg), void *arg) { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; intptr_t d, r, swaptype, presorted; loop:SWAPINIT(a, es); if (n < 7) { for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es) for (pl = pm; pl > (char *) a && cmp(pl - es, pl, arg) > 0; pl -= es) swap(pl, pl - es); return; } presorted = 1; for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es) { if (cmp(pm - es, pm, arg) > 0) { presorted = 0; break; } } if (presorted) return; pm = (char *) a + (n / 2) * es; if (n > 7) { pl = (char *) a; pn = (char *) a + (n - 1) * es; if (n > 40) { d = (n / 8) * es; pl = med3(pl, pl + d, pl + 2 * d, cmp, arg); pm = med3(pm - d, pm, pm + d, cmp, arg); pn = med3(pn - 2 * d, pn - d, pn, cmp, arg); } pm = med3(pl, pm, pn, cmp, arg); } swap(a, pm); pa = pb = (char *) a + es; pc = pd = (char *) a + (n - 1) * es; for (;;) { while (pb <= pc && (r = cmp(pb, a, arg)) <= 0) { if (r == 0) { swap(pa, pb); pa += es; } pb += es; } while (pb <= pc && (r = cmp(pc, a, arg)) >= 0) { if (r == 0) { swap(pc, pd); pd -= es; } pc -= es; } if (pb > pc) break; swap(pb, pc); pb += es; pc -= es; } pn = (char *) a + n * es; r = min(pa - (char *) a, pb - pa); vecswap(a, pb - r, r); r = min(pd - pc, pn - pd - es); vecswap(pb, pn - r, r); if ((r = pb - pa) > es) qsort_arg(a, r / es, es, cmp, arg); if ((r = pd - pc) > es) { /* Iterate rather than recurse to save stack space */ a = pn - r; n = r / es; goto loop; } /* qsort_arg(pn - r, r / es, es, cmp, arg);*/ } tarantool-1.5.1.218.g1a69fd6/third_party/memmem.c0000664000000000000000000000444712202131537017737 0ustar rootroot/* $NetBSD: memmem.c,v 1.2 2008/04/28 20:23:00 martin Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Perry E. Metzger of Metzger, Dowdeswell & Co. LLC. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include void * memmem(const void *block, size_t blen, const void *pat, size_t plen) { const unsigned char *bp, *pp, *endp; assert(block != NULL); assert(pat != NULL); /* * Following the precedent in ststr(3) and glibc, a zero * length pattern matches the start of block. */ if (plen == 0) return (void*) block; if (blen < plen) return NULL; bp = block; pp = pat; endp = bp + (blen - plen) + 1; /* * As a cheezy optimization, check that the first chars are * the same before calling memcmp. Really we should use bm(3) * to speed this up if blen is large enough. */ while (bp < endp) { if ((*bp == *pp) && (memcmp(bp, pp, plen) == 0)) return (void *) bp; bp++; } return NULL; } tarantool-1.5.1.218.g1a69fd6/third_party/rb.patch0000664000000000000000000000620012202131537017727 0ustar rootrootdiff --git a/third_party/rb.h b/third_party/rb.h index 7b675f0..6a6c7e3 100644 --- a/third_party/rb.h +++ b/third_party/rb.h @@ -861,14 +861,17 @@ a_prefix##iter_recurse(a_rbt_type *rbtree, a_type *node, \ if (node == &rbtree->rbt_nil) { \ return (&rbtree->rbt_nil); \ } else { \ - a_type *ret; \ - if ((ret = a_prefix##iter_recurse(rbtree, rbtn_left_get(a_type, \ - a_field, node), cb, arg)) != &rbtree->rbt_nil \ - || (ret = cb(rbtree, node, arg)) != NULL) { \ + a_type *ret = a_prefix##iter_recurse(rbtree, rbtn_left_get( \ + a_type, a_field, node), cb, arg); \ + if (ret != &rbtree->rbt_nil) { \ return (ret); \ } \ - return (a_prefix##iter_recurse(rbtree, rbtn_right_get(a_type, \ - a_field, node), cb, arg)); \ + a_type *right = rbtn_right_get(a_type, a_field, node); \ + ret = cb(rbtree, node, arg); \ + if (ret != NULL) { \ + return (ret); \ + } \ + return (a_prefix##iter_recurse(rbtree, right, cb, arg)); \ } \ } \ a_attr a_type * \ @@ -889,11 +892,11 @@ a_prefix##iter_start(a_rbt_type *rbtree, a_type *start, a_type *node, \ rbtn_right_get(a_type, a_field, node), cb, arg)); \ } else { \ a_type *ret; \ + a_type *right = rbtn_right_get(a_type, a_field, node); \ if ((ret = cb(rbtree, node, arg)) != NULL) { \ return (ret); \ } \ - return (a_prefix##iter_recurse(rbtree, rbtn_right_get(a_type, \ - a_field, node), cb, arg)); \ + return (a_prefix##iter_recurse(rbtree, right, cb, arg)); \ } \ } \ a_attr a_type * \ @@ -917,14 +920,17 @@ a_prefix##reverse_iter_recurse(a_rbt_type *rbtree, a_type *node, \ if (node == &rbtree->rbt_nil) { \ return (&rbtree->rbt_nil); \ } else { \ - a_type *ret; \ - if ((ret = a_prefix##reverse_iter_recurse(rbtree, \ - rbtn_right_get(a_type, a_field, node), cb, arg)) != \ - &rbtree->rbt_nil || (ret = cb(rbtree, node, arg)) != NULL) { \ + a_type *ret = a_prefix##reverse_iter_recurse(rbtree, \ + rbtn_right_get(a_type, a_field, node), cb, arg); \ + if (ret != &rbtree->rbt_nil) { \ return (ret); \ } \ - return (a_prefix##reverse_iter_recurse(rbtree, \ - rbtn_left_get(a_type, a_field, node), cb, arg)); \ + a_type *left = rbtn_left_get(a_type, a_field, node); \ + ret = cb(rbtree, node, arg); \ + if (ret != NULL) { \ + return (ret); \ + } \ + return (a_prefix##reverse_iter_recurse(rbtree, left, cb, arg)); \ } \ } \ a_attr a_type * \ @@ -946,11 +952,11 @@ a_prefix##reverse_iter_start(a_rbt_type *rbtree, a_type *start, \ rbtn_left_get(a_type, a_field, node), cb, arg)); \ } else { \ a_type *ret; \ + a_type *left = rbtn_left_get(a_type, a_field, node); \ if ((ret = cb(rbtree, node, arg)) != NULL) { \ return (ret); \ } \ - return (a_prefix##reverse_iter_recurse(rbtree, \ - rbtn_left_get(a_type, a_field, node), cb, arg)); \ + return (a_prefix##reverse_iter_recurse(rbtree, left, cb, arg)); \ } \ } \ a_attr a_type * \ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/0000775000000000000000000000000012231715321017576 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/0000775000000000000000000000000012231715321020343 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/ext_c_api.html0000664000000000000000000001354712202141143023167 0ustar rootroot Lua/C API Extensions

    LuaJIT adds some extensions to the standard Lua/C API. The LuaJIT include directory must be in the compiler search path (-Ipath) to be able to include the required header for C code:

    #include "luajit.h"
    

    Or for C++ code:

    #include "lua.hpp"
    

    luaJIT_setmode(L, idx, mode) — Control VM

    This is a C API extension to allow control of the VM from C code. The full prototype of LuaJIT_setmode is:

    LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode);
    

    The returned status is either success (1) or failure (0). The second argument is either 0 or a stack index (similar to the other Lua/C API functions).

    The third argument specifies the mode, which is 'or'ed with a flag. The flag can be LUAJIT_MODE_OFF to turn a feature on, LUAJIT_MODE_ON to turn a feature off, or LUAJIT_MODE_FLUSH to flush cached code.

    The following modes are defined:

    luaJIT_setmode(L, 0, LUAJIT_MODE_ENGINE|flag)

    Turn the whole JIT compiler on or off or flush the whole cache of compiled code.

    luaJIT_setmode(L, idx, LUAJIT_MODE_FUNC|flag)
    luaJIT_setmode(L, idx, LUAJIT_MODE_ALLFUNC|flag)
    luaJIT_setmode(L, idx, LUAJIT_MODE_ALLSUBFUNC|flag)

    This sets the mode for the function at the stack index idx or the parent of the calling function (idx = 0). It either enables JIT compilation for a function, disables it and flushes any already compiled code or only flushes already compiled code. This applies recursively to all sub-functions of the function with LUAJIT_MODE_ALLFUNC or only to the sub-functions with LUAJIT_MODE_ALLSUBFUNC.

    luaJIT_setmode(L, trace,
      LUAJIT_MODE_TRACE|LUAJIT_MODE_FLUSH)

    Flushes the specified root trace and all of its side traces from the cache. The code for the trace will be retained as long as there are any other traces which link to it.

    luaJIT_setmode(L, idx, LUAJIT_MODE_WRAPCFUNC|flag)

    This mode defines a wrapper function for calls to C functions. If called with LUAJIT_MODE_ON, the stack index at idx must be a lightuserdata object holding a pointer to the wrapper function. From now on all C functions are called through the wrapper function. If called with LUAJIT_MODE_OFF this mode is turned off and all C functions are directly called.

    The wrapper function can be used for debugging purposes or to catch and convert foreign exceptions. But please read the section on C++ exception interoperability first. Recommended usage can be seen in this C++ code excerpt:

    #include <exception>
    #include "lua.hpp"
    
    // Catch C++ exceptions and convert them to Lua error messages.
    // Customize as needed for your own exception classes.
    static int wrap_exceptions(lua_State *L, lua_CFunction f)
    {
      try {
        return f(L);  // Call wrapped function and return result.
      } catch (const char *s) {  // Catch and convert exceptions.
        lua_pushstring(L, s);
      } catch (std::exception& e) {
        lua_pushstring(L, e.what());
      } catch (...) {
        lua_pushliteral(L, "caught (...)");
      }
      return lua_error(L);  // Rethrow as a Lua error.
    }
    
    static int myinit(lua_State *L)
    {
      ...
      // Define wrapper function and enable it.
      lua_pushlightuserdata(L, (void *)wrap_exceptions);
      luaJIT_setmode(L, -1, LUAJIT_MODE_WRAPCFUNC|LUAJIT_MODE_ON);
      lua_pop(L, 1);
      ...
    }
    

    Note that you can only define a single global wrapper function, so be careful when using this mechanism from multiple C++ modules. Also note that this mechanism is not without overhead.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/bluequad.css0000664000000000000000000001270712202141143022657 0ustar rootroot/* Copyright (C) 2004-2013 Mike Pall. * * You are welcome to use the general ideas of this design for your own sites. * But please do not steal the stylesheet, the layout or the color scheme. */ /* colorscheme: * * site | head #4162bf/white | #6078bf/#e6ecff * ------+------ ----------------+------------------- * nav | main #bfcfff | #e6ecff/black * * nav: hiback loback #c5d5ff #b9c9f9 * hiborder loborder #e6ecff #97a7d7 * link hover #2142bf #ff0000 * * link: link visited hover #2142bf #8122bf #ff0000 * * main: boxback boxborder #f0f4ff #bfcfff */ body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; margin: 0; padding: 0; border: none; background: #e0e0e0; color: #000000; } a:link { text-decoration: none; background: transparent; color: #2142bf; } a:visited { text-decoration: none; background: transparent; color: #8122bf; } a:hover, a:active { text-decoration: underline; background: transparent; color: #ff0000; } h1, h2, h3 { font-weight: bold; text-align: left; margin: 0.5em 0; padding: 0; background: transparent; } h1 { font-size: 200%; line-height: 3em; /* really 6em relative to body, match #site span */ margin: 0; } h2 { font-size: 150%; color: #606060; } h3 { font-size: 125%; color: #404040; } p { max-width: 600px; margin: 0 0 0.5em 0; padding: 0; } b { color: #404040; } ul, ol { max-width: 600px; margin: 0.5em 0; padding: 0 0 0 2em; } ul { list-style: outside square; } ol { list-style: outside decimal; } li { margin: 0; padding: 0; } dl { max-width: 600px; margin: 1em 0; padding: 1em; border: 1px solid #bfcfff; background: #f0f4ff; } dt { font-weight: bold; margin: 0; padding: 0; } dt sup { float: right; margin-left: 1em; color: #808080; } dt a:visited { text-decoration: none; color: #2142bf; } dt a:hover, dt a:active { text-decoration: none; color: #ff0000; } dd { margin: 0.5em 0 0 2em; padding: 0; } div.tablewrap { /* for IE *sigh* */ max-width: 600px; } table { table-layout: fixed; border-spacing: 0; border-collapse: collapse; max-width: 600px; width: 100%; margin: 1em 0; padding: 0; border: 1px solid #bfcfff; } tr { margin: 0; padding: 0; border: none; } tr.odd { background: #f0f4ff; } tr.separate td { border-top: 1px solid #bfcfff; } td { text-align: left; margin: 0; padding: 0.2em 0.5em; border: none; } tt, code, kbd, samp { font-family: Courier New, Courier, monospace; line-height: 1.2; font-size: 110%; } kbd { font-weight: bolder; } blockquote, pre { max-width: 600px; margin: 1em 2em; padding: 0; } pre { line-height: 1.1; } pre.code { line-height: 1.4; margin: 0.5em 0 1em 0.5em; padding: 0.5em 1em; border: 1px solid #bfcfff; background: #f0f4ff; } pre.mark { padding-left: 2em; } span.codemark { position:absolute; left: 16em; color: #4040c0; } span.mark { color: #4040c0; font-family: Courier New, Courier, monospace; line-height: 1.1; } img { border: none; vertical-align: baseline; margin: 0; padding: 0; } img.left { float: left; margin: 0.5em 1em 0.5em 0; } img.right { float: right; margin: 0.5em 0 0.5em 1em; } .indent { padding-left: 1em; } .flush { clear: both; visibility: hidden; } .hide, .noscreen { display: none !important; } .ext { color: #ff8000; } .new { font-size: 6pt; vertical-align: middle; background: #ff8000; color: #ffffff; } #site { clear: both; float: left; width: 13em; text-align: center; font-weight: bold; margin: 0; padding: 0; background: transparent; color: #ffffff; } #site a { font-size: 200%; } #site a:link, #site a:visited { text-decoration: none; font-weight: bold; background: transparent; color: #ffffff; } #site span { line-height: 3em; /* really 6em relative to body, match h1 */ } #logo { color: #ffb380; } #head { margin: 0; padding: 0 0 0 2em; border-left: solid 13em #4162bf; border-right: solid 3em #6078bf; background: #6078bf; color: #e6ecff; } #nav { clear: both; float: left; overflow: hidden; text-align: left; line-height: 1.5; width: 13em; padding-top: 1em; background: transparent; } #nav ul { list-style: none outside; margin: 0; padding: 0; } #nav li { margin: 0; padding: 0; } #nav a { display: block; text-decoration: none; font-weight: bold; margin: 0; padding: 2px 1em; border-top: 1px solid transparent; border-bottom: 1px solid transparent; background: transparent; color: #2142bf; } #nav a:hover, #nav a:active { text-decoration: none; border-top: 1px solid #97a7d7; border-bottom: 1px solid #e6ecff; background: #b9c9f9; color: #ff0000; } #nav a.current, #nav a.current:hover, #nav a.current:active { border-top: 1px solid #e6ecff; border-bottom: 1px solid #97a7d7; background: #c5d5ff; color: #2142bf; } #nav ul ul a { padding: 0 1em 0 1.7em; } #nav ul ul ul a { padding: 0 0.5em 0 2.4em; } #main { line-height: 1.5; text-align: left; margin: 0; padding: 1em 2em; border-left: solid 13em #bfcfff; border-right: solid 3em #e6ecff; background: #e6ecff; } #foot { clear: both; font-size: 80%; text-align: center; margin: 0; padding: 0.5em; background: #6078bf; color: #ffffff; } #foot a:link, #foot a:visited { text-decoration: underline; background: transparent; color: #ffffff; } #foot a:hover, #foot a:active { text-decoration: underline; background: transparent; color: #bfcfff; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/ext_ffi.html0000664000000000000000000002405512202141143022654 0ustar rootroot FFI Library

    The FFI library allows calling external C functions and using C data structures from pure Lua code.

    The FFI library largely obviates the need to write tedious manual Lua/C bindings in C. No need to learn a separate binding language — it parses plain C declarations! These can be cut-n-pasted from C header files or reference manuals. It's up to the task of binding large libraries without the need for dealing with fragile binding generators.

    The FFI library is tightly integrated into LuaJIT (it's not available as a separate module). The code generated by the JIT-compiler for accesses to C data structures from Lua code is on par with the code a C compiler would generate. Calls to C functions can be inlined in JIT-compiled code, unlike calls to functions bound via the classic Lua/C API.

    This page gives a short introduction to the usage of the FFI library. Please use the FFI sub-topics in the navigation bar to learn more.

    Motivating Example: Calling External C Functions

    It's really easy to call an external C library function:

    ①
    ②
    
    
    ③local ffi = require("ffi")
    ffi.cdef[[
    int printf(const char *fmt, ...);
    ]]
    ffi.C.printf("Hello %s!", "world")
    

    So, let's pick that apart:

    Load the FFI library.

    Add a C declaration for the function. The part inside the double-brackets (in green) is just standard C syntax.

    Call the named C function — Yes, it's that simple!

    Actually, what goes on behind the scenes is far from simple: makes use of the standard C library namespace ffi.C. Indexing this namespace with a symbol name ("printf") automatically binds it to the standard C library. The result is a special kind of object which, when called, runs the printf function. The arguments passed to this function are automatically converted from Lua objects to the corresponding C types.

    Ok, so maybe the use of printf() wasn't such a spectacular example. You could have done that with io.write() and string.format(), too. But you get the idea ...

    So here's something to pop up a message box on Windows:

    local ffi = require("ffi")
    ffi.cdef[[
    int MessageBoxA(void *w, const char *txt, const char *cap, int type);
    ]]
    ffi.C.MessageBoxA(nil, "Hello world!", "Test", 0)
    

    Bing! Again, that was far too easy, no?

    Compare this with the effort required to bind that function using the classic Lua/C API: create an extra C file, add a C function that retrieves and checks the argument types passed from Lua and calls the actual C function, add a list of module functions and their names, add a luaopen_* function and register all module functions, compile and link it into a shared library (DLL), move it to the proper path, add Lua code that loads the module aaaand ... finally call the binding function. Phew!

    Motivating Example: Using C Data Structures

    The FFI library allows you to create and access C data structures. Of course the main use for this is for interfacing with C functions. But they can be used stand-alone, too.

    Lua is built upon high-level data types. They are flexible, extensible and dynamic. That's why we all love Lua so much. Alas, this can be inefficient for certain tasks, where you'd really want a low-level data type. E.g. a large array of a fixed structure needs to be implemented with a big table holding lots of tiny tables. This imposes both a substantial memory overhead as well as a performance overhead.

    Here's a sketch of a library that operates on color images plus a simple benchmark. First, the plain Lua version:

    local floor = math.floor
    
    local function image_ramp_green(n)
      local img = {}
      local f = 255/(n-1)
      for i=1,n do
        img[i] = { red = 0, green = floor((i-1)*f), blue = 0, alpha = 255 }
      end
      return img
    end
    
    local function image_to_grey(img, n)
      for i=1,n do
        local y = floor(0.3*img[i].red + 0.59*img[i].green + 0.11*img[i].blue)
        img[i].red = y; img[i].green = y; img[i].blue = y
      end
    end
    
    local N = 400*400
    local img = image_ramp_green(N)
    for i=1,1000 do
      image_to_grey(img, N)
    end
    

    This creates a table with 160.000 pixels, each of which is a table holding four number values in the range of 0-255. First an image with a green ramp is created (1D for simplicity), then the image is converted to greyscale 1000 times. Yes, that's silly, but I was in need of a simple example ...

    And here's the FFI version. The modified parts have been marked in bold:

    ①
    
    
    
    
    
    ②
    
    ③
    ④
    
    
    
    
    
    
    ③
    ⑤local ffi = require("ffi")
    ffi.cdef[[
    typedef struct { uint8_t red, green, blue, alpha; } rgba_pixel;
    ]]
    
    local function image_ramp_green(n)
      local img = ffi.new("rgba_pixel[?]", n)
      local f = 255/(n-1)
      for i=0,n-1 do
        img[i].green = i*f
        img[i].alpha = 255
      end
      return img
    end
    
    local function image_to_grey(img, n)
      for i=0,n-1 do
        local y = 0.3*img[i].red + 0.59*img[i].green + 0.11*img[i].blue
        img[i].red = y; img[i].green = y; img[i].blue = y
      end
    end
    
    local N = 400*400
    local img = image_ramp_green(N)
    for i=1,1000 do
      image_to_grey(img, N)
    end
    

    Ok, so that wasn't too difficult:

    First, load the FFI library and declare the low-level data type. Here we choose a struct which holds four byte fields, one for each component of a 4x8 bit RGBA pixel.

    Creating the data structure with ffi.new() is straightforward — the '?' is a placeholder for the number of elements of a variable-length array.

    C arrays are zero-based, so the indexes have to run from 0 to n-1. One might want to allocate one more element instead to simplify converting legacy code.

    Since ffi.new() zero-fills the array by default, we only need to set the green and the alpha fields.

    The calls to math.floor() can be omitted here, because floating-point numbers are already truncated towards zero when converting them to an integer. This happens implicitly when the number is stored in the fields of each pixel.

    Now let's have a look at the impact of the changes: first, memory consumption for the image is down from 22 Megabytes to 640 Kilobytes (400*400*4 bytes). That's a factor of 35x less! So, yes, tables do have a noticeable overhead. BTW: The original program would consume 40 Megabytes in plain Lua (on x64).

    Next, performance: the pure Lua version runs in 9.57 seconds (52.9 seconds with the Lua interpreter) and the FFI version runs in 0.48 seconds on my machine (YMMV). That's a factor of 20x faster (110x faster than the Lua interpreter).

    The avid reader may notice that converting the pure Lua version over to use array indexes for the colors ([1] instead of .red, [2] instead of .green etc.) ought to be more compact and faster. This is certainly true (by a factor of ~1.7x). Switching to a struct-of-arrays would help, too.

    However the resulting code would be less idiomatic and rather error-prone. And it still doesn't get even close to the performance of the FFI version of the code. Also, high-level data structures cannot be easily passed to other C functions, especially I/O functions, without undue conversion penalties.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/changes.html0000664000000000000000000012010412202141143022630 0ustar rootroot LuaJIT Change History

    This is a list of changes between the released versions of LuaJIT.
    The current stable version is LuaJIT 2.0.2.

    Please check the » Online Change History to see whether newer versions are available.

    LuaJIT 2.0.2 — 2013-06-03

    • Fix memory access check for fast string interning.
    • Fix MSVC intrinsics for older versions.
    • Add missing GC steps for io.* functions.
    • Fix spurious red zone overflows in machine code generation.
    • Fix jump-range constrained mcode allocation.
    • Inhibit DSE for implicit loads via calls.
    • Fix builtin string to number conversion for overflow digits.
    • Fix optional argument handling while recording builtins.
    • Fix optional argument handling in table.concat().
    • Add partial support for building with MingW64 GCC 4.8-SEH.
    • Add missing PHI barrier to string.sub(str, a, b) == kstr FOLD rule.
    • Fix compatibility issues with Illumos.
    • ARM: Fix cache flush/sync for exit stubs of JIT-compiled code.
    • MIPS: Fix cache flush/sync for JIT-compiled code jump area.
    • PPC: Add plt suffix for external calls from assembler code.
    • FFI: Fix snapshot substitution in SPLIT pass.
    • FFI/x86: Fix register allocation for 64 bit comparisons.
    • FFI: Fix tailcall in lowest frame to C function with bool result.
    • FFI: Ignore long type specifier in ffi.istype().
    • FFI: Fix calling conventions for 32 bit OSX and iOS simulator (struct returns).
    • FFI: Fix calling conventions for ARM hard-float EABI (nested structs).
    • FFI: Improve error messages for arithmetic and comparison operators.
    • FFI: Insert no-op type conversion for pointer to integer cast.
    • FFI: Fix unroll limit for ffi.fill().
    • FFI: Must sink XBAR together with XSTOREs.
    • FFI: Preserve intermediate string for const char * conversion.

    LuaJIT 2.0.1 — 2013-02-19

    • Don't clear frame for out-of-memory error.
    • Leave hook when resume catches error thrown from hook.
    • Add missing GC steps for template table creation.
    • Fix discharge order of comparisons in Lua parser.
    • Improve buffer handling for io.read().
    • OSX: Add support for Mach-O object files to -b option.
    • Fix PS3 port.
    • Fix/enable Xbox 360 port.
    • x86/x64: Always mark ref for shift count as non-weak.
    • x64: Don't fuse implicitly 32-to-64 extended operands.
    • ARM: Fix armhf call argument handling.
    • ARM: Fix code generation for integer math.min/math.max.
    • PPC/e500: Fix lj_vm_floor() for Inf/NaN.
    • FFI: Change priority of table initializer variants for structs.
    • FFI: Fix code generation for bool call result check on x86/x64.
    • FFI: Load FFI library on-demand for bytecode with cdata literals.
    • FFI: Fix handling of qualified transparent structs/unions.

    LuaJIT 2.0.0 — 2012-11-08

    • Correctness and completeness:
      • Fix Android/x86 build.
      • Fix recording of equality comparisons with __eq metamethods.
      • Fix detection of immutable upvalues.
      • Replace error with PANIC for callbacks from JIT-compiled code.
      • Fix builtin string to number conversion for INT_MIN.
      • Don't create unneeded array part for template tables.
      • Fix CONV.num.int sinking.
      • Don't propagate implicitly widened number to index metamethods.
      • ARM: Fix ordered comparisons of number vs. non-number.
      • FFI: Fix code generation for replay of sunk float fields.
      • FFI: Fix signedness of bool.
      • FFI: Fix recording of bool call result check on x86/x64.
      • FFI: Fix stack-adjustment for __thiscall callbacks.

    LuaJIT 2.0.0-beta11 — 2012-10-16

    • New features:
      • Use ARM VFP instructions, if available (build-time detection).
      • Add support for ARM hard-float EABI (armhf).
      • Add PS3 port.
      • Add many features from Lua 5.2, e.g. goto/labels. Refer to this list.
      • FFI: Add parameterized C types.
      • FFI: Add support for copy constructors.
      • FFI: Equality comparisons never raise an error (treat as unequal instead).
      • FFI: Box all accessed or returned enums.
      • FFI: Check for __new metamethod when calling a constructor.
      • FFI: Handle __pairs/__ipairs metamethods for cdata objects.
      • FFI: Convert io.* file handle to FILE * pointer (but as a void *).
      • FFI: Detect and support type punning through unions.
      • FFI: Improve various error messages.
    • Build-system reorganization:
      • Reorganize directory layout:
        lib/*src/jit/*
        src/buildvm_*.dascsrc/vm_*.dasc
        src/buildvm_*.h → removed
        src/buildvm*src/host/*
      • Add minified Lua interpreter plus Lua BitOp (minilua) to run DynASM.
      • Change DynASM bit operations to use Lua BitOp
      • Translate only vm_*.dasc for detected target architecture.
      • Improve target detection for msvcbuild.bat.
      • Fix build issues on Cygwin and MinGW with optional MSys.
      • Handle cross-compiles with FPU/no-FPU or hard-fp/soft-fp ABI mismatch.
      • Remove some library functions for no-JIT/no-FFI builds.
      • Add uninstall target to top-level Makefile.
    • Correctness and completeness:
      • Preserve snapshot #0 PC for all traces.
      • Fix argument checks for coroutine.create().
      • Command line prints version and JIT status to stdout, not stderr.
      • Fix userdata __gc separations at Lua state close.
      • Fix TDUP to HLOAD forwarding for LJ_DUALNUM builds.
      • Fix buffer check in bytecode writer.
      • Make os.date() thread-safe.
      • Add missing declarations for MSVC intrinsics.
      • Fix dispatch table modifications for return hooks.
      • Workaround for MSVC conversion bug (doubleuint32_tint32_t).
      • Fix FOLD rule (i-j)-i => 0-j.
      • Never use DWARF unwinder on Windows.
      • Fix shrinking of direct mapped blocks in builtin allocator.
      • Limit recursion depth in string.match() et al.
      • Fix late despecialization of ITERN after loop has been entered.
      • Fix 'f' and 'L' options for debug.getinfo() and lua_getinfo().
      • Fix package.searchpath().
      • OSX: Change dylib names to be consistent with other platforms.
      • Android: Workaround for broken sprintf("%g", -0.0).
      • x86: Remove support for ancient CPUs without CMOV (before Pentium Pro).
      • x86: Fix register allocation for calls returning register pair.
      • x86/x64: Fix fusion of unsigned byte comparisons with swapped operands.
      • ARM: Fix tonumber() argument check.
      • ARM: Fix modulo operator and math.floor()/math.ceil() for inf/nan.
      • ARM: Invoke SPLIT pass for leftover IR_TOBIT.
      • ARM: Fix BASE register coalescing.
      • PPC: Fix interpreter state setup in callbacks.
      • PPC: Fix string.sub() range check.
      • MIPS: Support generation of MIPS/MIPSEL bytecode object files.
      • MIPS: Fix calls to floor()/ceil()/trunc().
      • ARM/PPC: Detect more target architecture variants.
      • ARM/PPC/e500/MIPS: Fix tailcalls from fast functions, esp. tostring().
      • ARM/PPC/MIPS: Fix rematerialization of FP constants.
      • FFI: Don't call FreeLibrary() on our own EXE/DLL.
      • FFI: Resolve metamethods for constructors, too.
      • FFI: Properly disable callbacks on iOS (would require executable memory).
      • FFI: Fix cdecl string parsing during recording.
      • FFI: Show address pointed to for tostring(ref), too.
      • FFI: Fix alignment of C call argument/return structure.
      • FFI: Initialize all fields of standard types.
      • FFI: Fix callback handling when new C types are declared in callback.
      • FFI: Fix recording of constructors for pointers.
      • FFI: Always resolve metamethods for pointers to structs.
      • FFI: Correctly propagate alignment when interning nested types.
    • Structural and performance enhancements:
      • Add allocation sinking and store sinking optimization.
      • Constify immutable upvalues.
      • Add builtin string to integer or FP number conversion. Improves cross-platform consistency and correctness.
      • Create string hash slots in template tables for non-const values, too. Avoids later table resizes.
      • Eliminate HREFK guard for template table references.
      • Add various new FOLD rules.
      • Don't use stack unwinding for lua_yield() (slow on x64).
      • ARM, PPC, MIPS: Improve XLOAD operand fusion and register hinting.
      • PPC, MIPS: Compile math.sqrt() to sqrt instruction, if available.
      • FFI: Fold KPTR + constant offset in SPLIT pass.
      • FFI: Optimize/inline ffi.copy() and ffi.fill().
      • FFI: Compile and optimize array/struct copies.
      • FFI: Compile ffi.typeof(cdata|ctype), ffi.sizeof(), ffi.alignof(), ffi.offsetof() and ffi.gc().

    LuaJIT 2.0.0-beta10 — 2012-05-09

    • New features:
      • The MIPS of LuaJIT is complete. It requires a CPU conforming to the MIPS32 R1 architecture with hardware FPU. O32 hard-fp ABI, little-endian or big-endian.
      • Auto-detect target arch via cross-compiler. No need for TARGET=arch anymore.
      • Make DynASM compatible with Lua 5.2.
      • From Lua 5.2: Try __tostring metamethod on non-string error messages..
    • Correctness and completeness:
      • Fix parsing of hex literals with exponents.
      • Fix bytecode dump for certain number constants.
      • Fix argument type in error message for relative arguments.
      • Fix argument error handling on Lua stacks without a frame.
      • Add missing mcode limit check in assembler backend.
      • Fix compilation on OpenBSD.
      • Avoid recursive GC steps after GC-triggered trace exit.
      • Replace <unwind.h> definitions with our own.
      • Fix OSX build issues. Bump minimum required OSX version to 10.4.
      • Fix discharge order of comparisons in Lua parser.
      • Ensure running __gc of userdata created in __gc at state close.
      • Limit number of userdata __gc separations at state close.
      • Fix bytecode JMP slot range when optimizing and/or with constant LHS.
      • Fix DSE of USTORE.
      • Make lua_concat() work from C hook with partial frame.
      • Add required PHIs for implicit conversions, e.g. via XREF forwarding.
      • Add more comparison variants to Valgrind suppressions file.
      • Disable loading bytecode with an extra header (BOM or #!).
      • Fix PHI stack slot syncing.
      • ARM: Reorder type/value tests to silence Valgrind.
      • ARM: Fix register allocation for ldrd-optimized HREFK.
      • ARM: Fix conditional branch fixup for OBAR.
      • ARM: Invoke SPLIT pass for double args in FFI call.
      • ARM: Handle all CALL* ops with double results in SPLIT pass.
      • ARM: Fix rejoin of POW in SPLIT pass.
      • ARM: Fix compilation of math.sinh, math.cosh, math.tanh.
      • ARM, PPC: Avoid pointless arg clearing in BC_IFUNCF.
      • PPC: Fix resume after yield from hook.
      • PPC: Fix argument checking for rawget().
      • PPC: Fix fusion of floating-point XLOAD/XSTORE.
      • PPC: Fix HREFK code generation for huge tables.
      • PPC: Use builtin D-Cache/I-Cache sync code.
    • FFI library:
      • Ignore empty statements in ffi.cdef().
      • Ignore number parsing errors while skipping definitions.
      • Don't touch frame in callbacks with tailcalls to fast functions.
      • Fix library unloading on POSIX systems.
      • Finalize cdata before userdata when closing the state.
      • Change ffi.load() library name resolution for Cygwin.
      • Fix resolving of function name redirects on Windows/x86.
      • Fix symbol resolving error messages on Windows.
      • Fix blacklisting of C functions calling callbacks.
      • Fix result type of pointer difference.
      • Use correct PC in FFI metamethod error message.
      • Allow 'typedef _Bool int BOOL;' for the Windows API.
      • Don't record test for bool result of call, if ignored.

    LuaJIT 2.0.0-beta9 — 2011-12-14

    • New features:
      • PPC port of LuaJIT is complete. Default is the dual-number port (usually faster). Single-number port selectable via src/Makefile at build time.
      • Add FFI callback support.
      • Extend -b to generate .c, .h or .obj/.o files with embedded bytecode.
      • Allow loading embedded bytecode with require().
      • From Lua 5.2: Change to '\z' escape. Reject undefined escape sequences.
    • Correctness and completeness:
      • Fix OSX 10.7 build. Fix install_name and versioning on OSX.
      • Fix iOS build.
      • Install dis_arm.lua, too.
      • Mark installed shared library as executable.
      • Add debug option to msvcbuild.bat and improve error handling.
      • Fix data-flow analysis for iterators.
      • Fix forced unwinding triggered by external unwinder.
      • Record missing for loop slot loads (return to lower frame).
      • Always use ANSI variants of Windows system functions.
      • Fix GC barrier for multi-result table constructor (TSETM).
      • Fix/add various FOLD rules.
      • Add potential PHI for number conversions due to type instability.
      • Do not eliminate PHIs only referenced from other PHIs.
      • Correctly anchor implicit number to string conversions in Lua/C API.
      • Fix various stack limit checks.
      • x64: Use thread-safe exceptions for external unwinding (GCC platforms).
      • x64: Fix result type of cdata index conversions.
      • x64: Fix math.random() and bit.bswap() code generation.
      • x64: Fix lightuserdata comparisons.
      • x64: Always extend stack-passed arguments to pointer size.
      • ARM: Many fixes to code generation backend.
      • PPC/e500: Fix dispatch for binop metamethods.
      • PPC/e500: Save/restore condition registers when entering/leaving the VM.
      • PPC/e500: Fix write barrier in stores of strings to upvalues.
    • FFI library:
      • Fix C comment parsing.
      • Fix snapshot optimization for cdata comparisons.
      • Fix recording of const/enum lookups in namespaces.
      • Fix call argument and return handling for I8/U8/I16/U16 types.
      • Fix unfused loads of float fields.
      • Fix ffi.string() recording.
      • Save GetLastError() around ffi.load() and symbol resolving, too.
      • Improve ld script detection in ffi.load().
      • Record loads/stores to external variables in namespaces.
      • Compile calls to stdcall, fastcall and vararg functions.
      • Treat function ctypes like pointers in comparisons.
      • Resolve __call metamethod for pointers, too.
      • Record C function calls with bool return values.
      • Record ffi.errno().
      • x86: Fix number to uint32_t conversion rounding.
      • x86: Fix 64 bit arithmetic in assembler backend.
      • x64: Fix struct-by-value calling conventions.
      • ARM: Ensure invocation of SPLIT pass for float conversions.
    • Structural and performance enhancements:
      • Display trace types with -jv and -jdump.
      • Record isolated calls. But prefer recording loops over calls.
      • Specialize to prototype for non-monomorphic functions. Solves the trace-explosion problem for closure-heavy programming styles.
      • Always generate a portable vmdef.lua. Easier for distros.

    LuaJIT 2.0.0-beta8 — 2011-06-23

    • New features:
      • Soft-float ARM port of LuaJIT is complete.
      • Add support for bytecode loading/saving and -b command line option.
      • From Lua 5.2: __len metamethod for tables (disabled by default).
    • Correctness and completeness:
      • ARM: Misc. fixes for interpreter.
      • x86/x64: Fix bit.* argument checking in interpreter.
      • Catch early out-of-memory in memory allocator initialization.
      • Fix data-flow analysis for paths leading to an upvalue close.
      • Fix check for missing arguments in string.format().
      • Fix Solaris/x86 build (note: not a supported target).
      • Fix recording of loops with instable directions in side traces.
      • x86/x64: Fix fusion of comparisons with u8/u16 XLOAD.
      • x86/x64: Fix register allocation for variable shifts.
    • FFI library:
      • Add ffi.errno(). Save errno/GetLastError() around allocations etc.
      • Fix __gc for VLA/VLS cdata objects.
      • Fix recording of casts from 32 bit cdata pointers to integers.
      • tonumber(cdata) returns nil for non-numbers.
      • Show address pointed to for tostring(pointer).
      • Print NULL pointers as "cdata<... *>: NULL".
      • Support __tostring metamethod for pointers to structs, too.
    • Structural and performance enhancements:
      • More tuning for loop unrolling heuristics.
      • Flatten and compress in-memory debug info (saves ~70%).

    LuaJIT 2.0.0-beta7 — 2011-05-05

    • New features:
      • ARM port of the LuaJIT interpreter is complete.
      • FFI library: Add ffi.gc(), ffi.metatype(), ffi.istype().
      • FFI library: Resolve ld script redirection in ffi.load().
      • From Lua 5.2: package.searchpath(), fp:read("*L"), load(string).
      • From Lua 5.2, disabled by default: empty statement, table.unpack(), modified coroutine.running().
    • Correctness and completeness:
      • FFI library: numerous fixes.
      • Fix type mismatches in store-to-load forwarding.
      • Fix error handling within metamethods.
      • Fix table.maxn().
      • Improve accuracy of x^-k on x64.
      • Fix code generation for Intel Atom in x64 mode.
      • Fix narrowing of POW.
      • Fix recording of retried fast functions.
      • Fix code generation for bit.bnot() and multiplies.
      • Fix error location within cpcall frames.
      • Add workaround for old libgcc unwind bug.
      • Fix lua_yield() and getmetatable(lightuserdata) on x64.
      • Misc. fixes for PPC/e500 interpreter.
      • Fix stack slot updates for down-recursion.
    • Structural and performance enhancements:
      • Add dual-number mode (int/double) for the VM. Enabled for ARM.
      • Improve narrowing of arithmetic operators and for loops.
      • Tune loop unrolling heuristics and increase trace recorder limits.
      • Eliminate dead slots in snapshots using bytecode data-flow analysis.
      • Avoid phantom stores to proxy tables.
      • Optimize lookups in empty proxy tables.
      • Improve bytecode optimization of and/or operators.

    LuaJIT 2.0.0-beta6 — 2011-02-11

    • New features:
      • PowerPC/e500v2 port of the LuaJIT interpreter is complete.
      • Various minor features from Lua 5.2: Hex escapes in literals, '\*' escape, reversible string.format("%q",s), "%g" pattern, table.sort checks callbacks, os.exit(status|true|false[,close]).
      • Lua 5.2 __pairs and __ipairs metamethods (disabled by default).
      • Initial release of the FFI library.
    • Correctness and completeness:
      • Fix string.format() for non-finite numbers.
      • Fix memory leak when compiled to use the built-in allocator.
      • x86/x64: Fix unnecessary resize in TSETM bytecode.
      • Fix various GC issues with traces and jit.flush().
      • x64: Fix fusion of indexes for array references.
      • x86/x64: Fix stack overflow handling for coroutine results.
      • Enable low-2GB memory allocation on FreeBSD/x64.
      • Fix collectgarbage("count") result if more than 2GB is in use.
      • Fix parsing of hex floats.
      • x86/x64: Fix loop branch inversion with trailing HREF+NE/EQ.
      • Add jit.os string.
      • coroutine.create() permits running C functions, too.
      • Fix OSX build to work with newer ld64 versions.
      • Fix bytecode optimization of and/or operators.
    • Structural and performance enhancements:
      • Emit specialized bytecode for pairs()/next().
      • Improve bytecode coalescing of nil constants.
      • Compile calls to vararg functions.
      • Compile select().
      • Improve alias analysis, esp. for loads from allocations.
      • Tuning of various compiler heuristics.
      • Refactor and extend IR conversion instructions.
      • x86/x64: Various backend enhancements related to the FFI.
      • Add SPLIT pass to split 64 bit IR instructions for 32 bit CPUs.

    LuaJIT 2.0.0-beta5 — 2010-08-24

    • Correctness and completeness:
      • Fix trace exit dispatch to function headers.
      • Fix Windows and OSX builds with LUAJIT_DISABLE_JIT.
      • Reorganize and fix placement of generated machine code on x64.
      • Fix TNEW in x64 interpreter.
      • Do not eliminate PHIs for values only referenced from side exits.
      • OS-independent canonicalization of strings for non-finite numbers.
      • Fix string.char() range check on x64.
      • Fix tostring() resolving within print().
      • Fix error handling for next().
      • Fix passing of constant arguments to external calls on x64.
      • Fix interpreter argument check for two-argument SSE math functions.
      • Fix C frame chain corruption caused by lua_cpcall().
      • Fix return from pcall() within active hook.
    • Structural and performance enhancements:
      • Replace on-trace GC frame syncing with interpreter exit.
      • Improve hash lookup specialization by not removing dead keys during GC.
      • Turn traces into true GC objects.
      • Avoid starting a GC cycle immediately after library init.
      • Add weak guards to improve dead-code elimination.
      • Speed up string interning.

    LuaJIT 2.0.0-beta4 — 2010-03-28

    • Correctness and completeness:
      • Fix precondition for on-trace creation of table keys.
      • Fix {f()} on x64 when table is resized.
      • Fix folding of ordered comparisons with same references.
      • Fix snapshot restores for multi-result bytecodes.
      • Fix potential hang when recording bytecode with nested closures.
      • Fix recording of getmetatable(), tonumber() and bad argument types.
      • Fix SLOAD fusion across returns to lower frames.
    • Structural and performance enhancements:
      • Add array bounds check elimination. -Oabc is enabled by default.
      • More tuning for x64, e.g. smaller table objects.

    LuaJIT 2.0.0-beta3 — 2010-03-07

    • LuaJIT x64 port:
      • Port integrated memory allocator to Linux/x64, Windows/x64 and OSX/x64.
      • Port interpreter and JIT compiler to x64.
      • Port DynASM to x64.
      • Many 32/64 bit cleanups in the VM.
      • Allow building the interpreter with either x87 or SSE2 arithmetics.
      • Add external unwinding and C++ exception interop (default on x64).
    • Correctness and completeness:
      • Fix constructor bytecode generation for certain conditional values.
      • Fix some cases of ordered string comparisons.
      • Fix lua_tocfunction().
      • Fix cutoff register in JMP bytecode for some conditional expressions.
      • Fix PHI marking algorithm for references from variant slots.
      • Fix package.cpath for non-default PREFIX.
      • Fix DWARF2 frame unwind information for interpreter on OSX.
      • Drive the GC forward on string allocations in the parser.
      • Implement call/return hooks (zero-cost if disabled).
      • Implement yield from C hooks.
      • Disable JIT compiler on older non-SSE2 CPUs instead of aborting.
    • Structural and performance enhancements:
      • Compile recursive code (tail-, up- and down-recursion).
      • Improve heuristics for bytecode penalties and blacklisting.
      • Split CALL/FUNC recording and clean up fast function call semantics.
      • Major redesign of internal function call handling.
      • Improve FOR loop const specialization and integerness checks.
      • Switch to pre-initialized stacks. Avoid frame-clearing.
      • Colocation of prototypes and related data: bytecode, constants, debug info.
      • Cleanup parser and streamline bytecode generation.
      • Add support for weak IR references to register allocator.
      • Switch to compressed, extensible snapshots.
      • Compile returns to frames below the start frame.
      • Improve alias analysis of upvalues using a disambiguation hash value.
      • Compile floor/ceil/trunc to SSE2 helper calls or SSE4.1 instructions.
      • Add generic C call handling to IR and backend.
      • Improve KNUM fuse vs. load heuristics.
      • Compile various io.*() functions.
      • Compile math.sinh(), math.cosh(), math.tanh() and math.random().

    LuaJIT 2.0.0-beta2 — 2009-11-09

    • Reorganize build system. Build static+shared library on POSIX.
    • Allow C++ exception conversion on all platforms using a wrapper function.
    • Automatically catch C++ exceptions and rethrow Lua error (DWARF2 only).
    • Check for the correct x87 FPU precision at strategic points.
    • Always use wrappers for libm functions.
    • Resurrect metamethod name strings before copying them.
    • Mark current trace, even if compiler is idle.
    • Ensure FILE metatable is created only once.
    • Fix type comparisons when different integer types are involved.
    • Fix getmetatable() recording.
    • Fix TDUP with dead keys in template table.
    • jit.flush(tr) returns status. Prevent manual flush of a trace that's still linked.
    • Improve register allocation heuristics for invariant references.
    • Compile the push/pop variants of table.insert() and table.remove().
    • Compatibility with MSVC link /debug.
    • Fix lua_iscfunction().
    • Fix math.random() when compiled with -fpic (OSX).
    • Fix table.maxn().
    • Bump MACOSX_DEPLOYMENT_TARGET to 10.4
    • luaL_check*() and luaL_opt*() now support negative arguments, too.
      This matches the behavior of Lua 5.1, but not the specification.

    LuaJIT 2.0.0-beta1 — 2009-10-31

    • This is the first public release of LuaJIT 2.0.
    • The whole VM has been rewritten from the ground up, so there's no point in listing differences over earlier versions.

    LuaJIT 1.1.8 — 2012-04-16

    LuaJIT 1.1.7 — 2011-05-05

    LuaJIT 1.1.6 — 2010-03-28

    • Added fixes for the » currently known bugs in Lua 5.1.4.
    • Removed wrong GC check in jit_createstate(). Thanks to Tim Mensch.
    • Fixed bad assertions while compiling table.insert() and table.remove().

    LuaJIT 1.1.5 — 2008-10-25

    LuaJIT 1.1.4 — 2008-02-05

    • Merged with Lua 5.1.3. Fixes all » known bugs in Lua 5.1.2.
    • Fixed possible (but unlikely) stack corruption while compiling k^x expressions.
    • Fixed DynASM template for cmpss instruction.

    LuaJIT 1.1.3 — 2007-05-24

    • Merged with Lua 5.1.2. Fixes all » known bugs in Lua 5.1.1.
    • Merged pending Lua 5.1.x fixes: "return -nil" bug, spurious count hook call.
    • Remove a (sometimes) wrong assertion in luaJIT_findpc().
    • DynASM now allows labels for displacements and .aword.
    • Fix some compiler warnings for DynASM glue (internal API change).
    • Correct naming for SSSE3 (temporarily known as SSE4) in DynASM and x86 disassembler.
    • The loadable debug modules now handle redirection to stdout (e.g. -j trace=-).

    LuaJIT 1.1.2 — 2006-06-24

    • Fix MSVC inline assembly: use only local variables with lua_number2int().
    • Fix "attempt to call a thread value" bug on Mac OS X: make values of consts used as lightuserdata keys unique to avoid joining by the compiler/linker.

    LuaJIT 1.1.1 — 2006-06-20

    • Merged with Lua 5.1.1. Fixes all » known bugs in Lua 5.1.
    • Enforce (dynamic) linker error for EXE/DLL version mismatches.
    • Minor changes to DynASM: faster pre-processing, smaller encoding for some immediates.

    This release is in sync with Coco 1.1.1 (see the » Coco Change History).

    LuaJIT 1.1.0 — 2006-03-13

    • Merged with Lua 5.1 (final).
    • New JIT call frame setup:
      • The C stack is kept 16 byte aligned (faster). Mandatory for Mac OS X on Intel, too.
      • Faster calling conventions for internal C helper functions.
      • Better instruction scheduling for function prologue, OP_CALL and OP_RETURN.
    • Miscellaneous optimizations:
      • Faster loads of FP constants. Remove narrow-to-wide store-to-load forwarding stalls.
      • Use (scalar) SSE2 ops (if the CPU supports it) to speed up slot moves and FP to integer conversions.
      • Optimized the two-argument form of OP_CONCAT (a..b).
      • Inlined OP_MOD (a%b). With better accuracy than the C variant, too.
      • Inlined OP_POW (a^b). Unroll x^k or use k^x = 2^(log2(k)*x) or call pow().
    • Changes in the optimizer:
      • Improved hinting for table keys derived from table values (t1[t2[x]]).
      • Lookup hinting now works with arbitrary object types and supports index chains, too.
      • Generate type hints for arithmetic and comparison operators, OP_LEN, OP_CONCAT and OP_FORPREP.
      • Remove several hint definitions in favour of a generic COMBINE hint.
      • Complete rewrite of jit.opt_inline module (ex jit.opt_lib).
    • Use adaptive deoptimization:
      • If runtime verification of a contract fails, the affected instruction is recompiled and patched on-the-fly. Regular programs will trigger deoptimization only occasionally.
      • This avoids generating code for uncommon fallback cases most of the time. Generated code is up to 30% smaller compared to LuaJIT 1.0.3.
      • Deoptimization is used for many opcodes and contracts:
        • OP_CALL, OP_TAILCALL: type mismatch for callable.
        • Inlined calls: closure mismatch, parameter number and type mismatches.
        • OP_GETTABLE, OP_SETTABLE: table or key type and range mismatches.
        • All arithmetic and comparison operators, OP_LEN, OP_CONCAT, OP_FORPREP: operand type and range mismatches.
      • Complete redesign of the debug and traceback info (bytecode ↔ mcode) to support deoptimization. Much more flexible and needs only 50% of the space.
      • The modules jit.trace, jit.dumphints and jit.dump handle deoptimization.
    • Inlined many popular library functions (for commonly used arguments only):
      • Most math.* functions (the 18 most used ones) [2x-10x faster].
      • string.len, string.sub and string.char [2x-10x faster].
      • table.insert, table.remove and table.getn [3x-5x faster].
      • coroutine.yield and coroutine.resume [3x-5x faster].
      • pairs, ipairs and the corresponding iterators [8x-15x faster].
    • Changes in the core and loadable modules and the stand-alone executable:
      • Added jit.version, jit.version_num and jit.arch.
      • Reorganized some internal API functions (jit.util.*mcode*).
      • The -j dump output now shows JSUB names, too.
      • New x86 disassembler module written in pure Lua. No dependency on ndisasm anymore. Flexible API, very compact (500 lines) and complete (x87, MMX, SSE, SSE2, SSE3, SSSE3, privileged instructions).
      • luajit -v prints the LuaJIT version and copyright on a separate line.
    • Added SSE, SSE2, SSE3 and SSSE3 support to DynASM.
    • Miscellaneous doc changes. Added a section about embedding LuaJIT.

    This release is in sync with Coco 1.1.0 (see the » Coco Change History).

    LuaJIT 1.0.3 — 2005-09-08

    • Even more docs.
    • Unified closure checks in jit.*.
    • Fixed some range checks in jit.util.*.
    • Fixed __newindex call originating from jit_settable_str().
    • Merged with Lua 5.1 alpha (including early bug fixes).

    This is the first public release of LuaJIT.

    LuaJIT 1.0.2 — 2005-09-02

    • Add support for flushing the Valgrind translation cache
      (MYCFLAGS= -DUSE_VALGRIND).
    • Add support for freeing executable mcode memory to the mmap()-based variant for POSIX systems.
    • Reorganized the C function signature handling in jit.opt_lib.
    • Changed to index-based hints for inlining C functions. Still no support in the backend for inlining.
    • Hardcode HEAP_CREATE_ENABLE_EXECUTE value if undefined.
    • Misc. changes to the jit.* modules.
    • Misc. changes to the Makefiles.
    • Lots of new docs.
    • Complete doc reorg.

    Not released because Lua 5.1 alpha came out today.

    LuaJIT 1.0.1 — 2005-08-31

    • Missing GC step in OP_CONCAT.
    • Fix result handling for C –> JIT calls.
    • Detect CPU feature bits.
    • Encode conditional moves (fucomip) only when supported.
    • Add fallback instructions for FP compares.
    • Add support for LUA_COMPAT_VARARG. Still disabled by default.
    • MSVC needs a specific place for the CALLBACK attribute (David Burgess).
    • Misc. doc updates.

    Interim non-public release. Special thanks to Adam D. Moss for reporting most of the bugs.

    LuaJIT 1.0.0 — 2005-08-29

    This is the initial non-public release of LuaJIT.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/faq.html0000664000000000000000000001672212202141143022001 0ustar rootroot Frequently Asked Questions (FAQ)
    Q: Where can I learn more about LuaJIT and Lua?
    Q: Where can I learn more about the compiler technology used by LuaJIT?
    I'm planning to write more documentation about the internals of LuaJIT. In the meantime, please use the following Google Scholar searches to find relevant papers:
    Search for: » Trace Compiler
    Search for: » JIT Compiler
    Search for: » Dynamic Language Optimizations
    Search for: » SSA Form
    Search for: » Linear Scan Register Allocation
    Here is a list of the » innovative features in LuaJIT.
    And, you know, reading the source is of course the only way to enlightenment. :-)
    Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?
    Q: My vararg functions fail after switching to LuaJIT!
    LuaJIT is compatible to the Lua 5.1 language standard. It doesn't support the implicit arg parameter for old-style vararg functions from Lua 5.0.
    Please convert your code to the » Lua 5.1 vararg syntax.
    Q: Why do I get this error: "bad FPU precision"?
    Q: I get weird behavior after initializing Direct3D.
    Q: Some FPU operations crash after I load a Delphi DLL.
    DirectX/Direct3D (up to version 9) sets the x87 FPU to single-precision mode by default. This violates the Windows ABI and interferes with the operation of many programs — LuaJIT is affected, too. Please make sure you always use the D3DCREATE_FPU_PRESERVE flag when initializing Direct3D.
    Direct3D version 10 or higher do not show this behavior anymore. Consider testing your application with older versions, too.
    Similarly, the Borland/Delphi runtime modifies the FPU control word and enables FP exceptions. Of course this violates the Windows ABI, too. Please check the Delphi docs for the Set8087CW method.
    Q: Sometimes Ctrl-C fails to stop my Lua program. Why?
    The interrupt signal handler sets a Lua debug hook. But this is currently ignored by compiled code (this will eventually be fixed). If your program is running in a tight loop and never falls back to the interpreter, the debug hook never runs and can't throw the "interrupted!" error.
    In the meantime you have to press Ctrl-C twice to get stop your program. That's similar to when it's stuck running inside a C function under the Lua interpreter.
    Q: Why doesn't my favorite power-patch for Lua apply against LuaJIT?
    Because it's a completely redesigned VM and has very little code in common with Lua anymore. Also, if the patch introduces changes to the Lua semantics, these would need to be reflected everywhere in the VM, from the interpreter up to all stages of the compiler.
    Please use only standard Lua language constructs. For many common needs you can use source transformations or use wrapper or proxy functions. The compiler will happily optimize away such indirections.
    Q: Lua runs everywhere. Why doesn't LuaJIT support my CPU?
    Because it's a compiler — it needs to generate native machine code. This means the code generator must be ported to each architecture. And the fast interpreter is written in assembler and must be ported, too. This is quite an undertaking.
    The install documentation shows the supported architectures. Other architectures will follow based on sufficient user demand and/or sponsoring.
    Q: When will feature X be added? When will the next version be released?
    When it's ready.
    C'mon, it's open source — I'm doing it on my own time and you're getting it for free. You can either contribute a patch or sponsor the development of certain features, if they are important to you.

    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/img/0000775000000000000000000000000012202141143021110 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/img/contact.png0000664000000000000000000000247412202141143023260 0ustar rootrootPNG  IHDR (PLTEiktfiqKMSIKQGIOEGM237./3*+/{~y|uxsv`bj^`hY\cWZaEFL>@E<>C)*-'(+%&)#$'!"% ps|nqzjmvWY`SU\NQW:;@57;Ϲͷ"Ǡ~|gjrehpcfnadlNPVLNTHJPFHN348126/04-.2+,0Į|z}x{vytwack_ai]_gZ]dX[bDEK?AF=?D(),Խ$%(  svqt}or{mpyknwVX_PRY68<46:θ # vIDATHǽ_QO=O QӰ̭H$JfIGsH aM.=?l{Vk]\^9>|yc1͸CG0"> D l;r_f,:?dbtԨ&ث;T{_6]xNost_2=s;\&r8L>f^z@>jTՙ~o^;\G _K?vF{Em:;: Md]uK=j}ٹU 7Y[W\߃Y@Qxp@R5Т PԐpr^[e~Ljќ1cbx4Fu4·.(ܮSfA5@I~A9gi,Ts͡?xŕ֚cM5uvw, ADv 7OWVejb8UU PF\ā}RLhJ?mpo%@$ ! |]Mӏ9AYҖg"Ɗ)sxUmIKr]+ 8tSA@z[r Gݙ \Q/mOHjDR 6,"pVhW/OvU r/{k9)/1{:gw~3s1gO=`=BgGǹ\7h`M]m]d/N}4IENDB`tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/ext_ffi_semantics.html0000664000000000000000000014735212202141143024730 0ustar rootroot FFI Semantics

    This page describes the detailed semantics underlying the FFI library and its interaction with both Lua and C code.

    Given that the FFI library is designed to interface with C code and that declarations can be written in plain C syntax, it closely follows the C language semantics, wherever possible. Some minor concessions are needed for smoother interoperation with Lua language semantics.

    Please don't be overwhelmed by the contents of this page — this is a reference and you may need to consult it, if in doubt. It doesn't hurt to skim this page, but most of the semantics "just work" as you'd expect them to work. It should be straightforward to write applications using the LuaJIT FFI for developers with a C or C++ background.

    C Language Support

    The FFI library has a built-in C parser with a minimal memory footprint. It's used by the ffi.* library functions to declare C types or external symbols.

    It's only purpose is to parse C declarations, as found e.g. in C header files. Although it does evaluate constant expressions, it's not a C compiler. The body of inline C function definitions is simply ignored.

    Also, this is not a validating C parser. It expects and accepts correctly formed C declarations, but it may choose to ignore bad declarations or show rather generic error messages. If in doubt, please check the input against your favorite C compiler.

    The C parser complies to the C99 language standard plus the following extensions:

    • The '\e' escape in character and string literals.
    • The C99/C++ boolean type, declared with the keywords bool or _Bool.
    • Complex numbers, declared with the keywords complex or _Complex.
    • Two complex number types: complex (aka complex double) and complex float.
    • Vector types, declared with the GCC mode or vector_size attribute.
    • Unnamed ('transparent') struct/union fields inside a struct/union.
    • Incomplete enum declarations, handled like incomplete struct declarations.
    • Unnamed enum fields inside a struct/union. This is similar to a scoped C++ enum, except that declared constants are visible in the global namespace, too.
    • Scoped static const declarations inside a struct/union (from C++).
    • Zero-length arrays ([0]), empty struct/union, variable-length arrays (VLA, [?]) and variable-length structs (VLS, with a trailing VLA).
    • C++ reference types (int &x).
    • Alternate GCC keywords with '__', e.g. __const__.
    • GCC __attribute__ with the following attributes: aligned, packed, mode, vector_size, cdecl, fastcall, stdcall, thiscall.
    • The GCC __extension__ keyword and the GCC __alignof__ operator.
    • GCC __asm__("symname") symbol name redirection for function declarations.
    • MSVC keywords for fixed-length types: __int8, __int16, __int32 and __int64.
    • MSVC __cdecl, __fastcall, __stdcall, __thiscall, __ptr32, __ptr64, __declspec(align(n)) and #pragma pack.
    • All other GCC/MSVC-specific attributes are ignored.

    The following C types are pre-defined by the C parser (like a typedef, except re-declarations will be ignored):

    • Vararg handling: va_list, __builtin_va_list, __gnuc_va_list.
    • From <stddef.h>: ptrdiff_t, size_t, wchar_t.
    • From <stdint.h>: int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, intptr_t, uintptr_t.

    You're encouraged to use these types in preference to compiler-specific extensions or target-dependent standard types. E.g. char differs in signedness and long differs in size, depending on the target architecture and platform ABI.

    The following C features are not supported:

    • A declaration must always have a type specifier; it doesn't default to an int type.
    • Old-style empty function declarations (K&R) are not allowed. All C functions must have a proper prototype declaration. A function declared without parameters (int foo();) is treated as a function taking zero arguments, like in C++.
    • The long double C type is parsed correctly, but there's no support for the related conversions, accesses or arithmetic operations.
    • Wide character strings and character literals are not supported.
    • See below for features that are currently not implemented.

    C Type Conversion Rules

    Conversions from C types to Lua objects

    These conversion rules apply for read accesses to C types: indexing pointers, arrays or struct/union types; reading external variables or constant values; retrieving return values from C calls:

    Input Conversion Output
    int8_t, int16_tsign-ext int32_tdoublenumber
    uint8_t, uint16_tzero-ext int32_tdoublenumber
    int32_t, uint32_tdoublenumber
    int64_t, uint64_tboxed value64 bit int cdata
    double, floatdoublenumber
    bool0 → false, otherwise trueboolean
    enumboxed valueenum cdata
    Complex numberboxed valuecomplex cdata
    Vectorboxed valuevector cdata
    Pointerboxed valuepointer cdata
    Arrayboxed referencereference cdata
    struct/unionboxed referencereference cdata

    Bitfields are treated like their underlying type.

    Reference types are dereferenced before a conversion can take place — the conversion is applied to the C type pointed to by the reference.

    Conversions from Lua objects to C types

    These conversion rules apply for write accesses to C types: indexing pointers, arrays or struct/union types; initializing cdata objects; casts to C types; writing to external variables; passing arguments to C calls:

    Input Conversion Output
    numberdouble
    booleanfalse → 0, true → 1bool
    nilNULL(void *)
    lightuserdatalightuserdata address →(void *)
    userdatauserdata payload →(void *)
    io.* fileget FILE * handle →(void *)
    stringmatch against enum constantenum
    stringcopy string data + zero-byteint8_t[], uint8_t[]
    stringstring data →const char[]
    functioncreate callbackC function type
    tabletable initializerArray
    tabletable initializerstruct/union
    cdatacdata payload →C type

    If the result type of this conversion doesn't match the C type of the destination, the conversion rules between C types are applied.

    Reference types are immutable after initialization ("no re-seating of references"). For initialization purposes or when passing values to reference parameters, they are treated like pointers. Note that unlike in C++, there's no way to implement automatic reference generation of variables under the Lua language semantics. If you want to call a function with a reference parameter, you need to explicitly pass a one-element array.

    Conversions between C types

    These conversion rules are more or less the same as the standard C conversion rules. Some rules only apply to casts, or require pointer or type compatibility:

    Input Conversion Output
    Signed integernarrow or sign-extendInteger
    Unsigned integernarrow or zero-extendInteger
    Integerrounddouble, float
    double, floattrunc int32_tnarrow(u)int8_t, (u)int16_t
    double, floattrunc(u)int32_t, (u)int64_t
    double, floatroundfloat, double
    Numbern == 0 → 0, otherwise 1bool
    boolfalse → 0, true → 1Number
    Complex numberconvert real partNumber
    Numberconvert real part, imag = 0Complex number
    Complex numberconvert real and imag partComplex number
    Numberconvert scalar and replicateVector
    Vectorcopy (same size)Vector
    struct/uniontake base address (compat)Pointer
    Arraytake base address (compat)Pointer
    Functiontake function addressFunction pointer
    Numberconvert via uintptr_t (cast)Pointer
    Pointerconvert address (compat/cast)Pointer
    Pointerconvert address (cast)Integer
    Arrayconvert base address (cast)Integer
    Arraycopy (compat)Array
    struct/unioncopy (identical type)struct/union

    Bitfields or enum types are treated like their underlying type.

    Conversions not listed above will raise an error. E.g. it's not possible to convert a pointer to a complex number or vice versa.

    Conversions for vararg C function arguments

    The following default conversion rules apply when passing Lua objects to the variable argument part of vararg C functions:

    Input Conversion Output
    numberdouble
    booleanfalse → 0, true → 1bool
    nilNULL(void *)
    userdatauserdata payload →(void *)
    lightuserdatalightuserdata address →(void *)
    stringstring data →const char *
    float cdatadouble
    Array cdatatake base addressElement pointer
    struct/union cdatatake base addressstruct/union pointer
    Function cdatatake function addressFunction pointer
    Any other cdatano conversionC type

    To pass a Lua object, other than a cdata object, as a specific type, you need to override the conversion rules: create a temporary cdata object with a constructor or a cast and initialize it with the value to pass:

    Assuming x is a Lua number, here's how to pass it as an integer to a vararg function:

    ffi.cdef[[
    int printf(const char *fmt, ...);
    ]]
    ffi.C.printf("integer value: %d\n", ffi.new("int", x))
    

    If you don't do this, the default Lua number → double conversion rule applies. A vararg C function expecting an integer will see a garbled or uninitialized value.

    Initializers

    Creating a cdata object with ffi.new() or the equivalent constructor syntax always initializes its contents, too. Different rules apply, depending on the number of optional initializers and the C types involved:

    • If no initializers are given, the object is filled with zero bytes.
    • Scalar types (numbers and pointers) accept a single initializer. The Lua object is converted to the scalar C type.
    • Valarrays (complex numbers and vectors) are treated like scalars when a single initializer is given. Otherwise they are treated like regular arrays.
    • Aggregate types (arrays and structs) accept either a single cdata initializer of the same type (copy constructor), a single table initializer, or a flat list of initializers.
    • The elements of an array are initialized, starting at index zero. If a single initializer is given for an array, it's repeated for all remaining elements. This doesn't happen if two or more initializers are given: all remaining uninitialized elements are filled with zero bytes.
    • Byte arrays may also be initialized with a Lua string. This copies the whole string plus a terminating zero-byte. The copy stops early only if the array has a known, fixed size.
    • The fields of a struct are initialized in the order of their declaration. Uninitialized fields are filled with zero bytes.
    • Only the first field of a union can be initialized with a flat initializer.
    • Elements or fields which are aggregates themselves are initialized with a single initializer, but this may be a table initializer or a compatible aggregate.
    • Excess initializers cause an error.

    Table Initializers

    The following rules apply if a Lua table is used to initialize an Array or a struct/union:

    • If the table index [0] is non-nil, then the table is assumed to be zero-based. Otherwise it's assumed to be one-based.
    • Array elements, starting at index zero, are initialized one-by-one with the consecutive table elements, starting at either index [0] or [1]. This process stops at the first nil table element.
    • If exactly one array element was initialized, it's repeated for all the remaining elements. Otherwise all remaining uninitialized elements are filled with zero bytes.
    • The above logic only applies to arrays with a known fixed size. A VLA is only initialized with the element(s) given in the table. Depending on the use case, you may need to explicitly add a NULL or 0 terminator to a VLA.
    • A struct/union can be initialized in the order of the declaration of its fields. Each field is initialized with consecutive table elements, starting at either index [0] or [1]. This process stops at the first nil table element.
    • Otherwise, if neither index [0] nor [1] is present, a struct/union is initialized by looking up each field name (as a string key) in the table. Each non-nil value is used to initialize the corresponding field.
    • Uninitialized fields of a struct are filled with zero bytes, except for the trailing VLA of a VLS.
    • Initialization of a union stops after one field has been initialized. If no field has been initialized, the union is filled with zero bytes.
    • Elements or fields which are aggregates themselves are initialized with a single initializer, but this may be a nested table initializer (or a compatible aggregate).
    • Excess initializers for an array cause an error. Excess initializers for a struct/union are ignored. Unrelated table entries are ignored, too.

    Example:

    local ffi = require("ffi")
    
    ffi.cdef[[
    struct foo { int a, b; };
    union bar { int i; double d; };
    struct nested { int x; struct foo y; };
    ]]
    
    ffi.new("int[3]", {})            --> 0, 0, 0
    ffi.new("int[3]", {1})           --> 1, 1, 1
    ffi.new("int[3]", {1,2})         --> 1, 2, 0
    ffi.new("int[3]", {1,2,3})       --> 1, 2, 3
    ffi.new("int[3]", {[0]=1})       --> 1, 1, 1
    ffi.new("int[3]", {[0]=1,2})     --> 1, 2, 0
    ffi.new("int[3]", {[0]=1,2,3})   --> 1, 2, 3
    ffi.new("int[3]", {[0]=1,2,3,4}) --> error: too many initializers
    
    ffi.new("struct foo", {})            --> a = 0, b = 0
    ffi.new("struct foo", {1})           --> a = 1, b = 0
    ffi.new("struct foo", {1,2})         --> a = 1, b = 2
    ffi.new("struct foo", {[0]=1,2})     --> a = 1, b = 2
    ffi.new("struct foo", {b=2})         --> a = 0, b = 2
    ffi.new("struct foo", {a=1,b=2,c=3}) --> a = 1, b = 2  'c' is ignored
    
    ffi.new("union bar", {})        --> i = 0, d = 0.0
    ffi.new("union bar", {1})       --> i = 1, d = ?
    ffi.new("union bar", {[0]=1,2}) --> i = 1, d = ?    '2' is ignored
    ffi.new("union bar", {d=2})     --> i = ?, d = 2.0
    
    ffi.new("struct nested", {1,{2,3}})     --> x = 1, y.a = 2, y.b = 3
    ffi.new("struct nested", {x=1,y={2,3}}) --> x = 1, y.a = 2, y.b = 3
    

    Operations on cdata Objects

    All of the standard Lua operators can be applied to cdata objects or a mix of a cdata object and another Lua object. The following list shows the pre-defined operations.

    Reference types are dereferenced before performing each of the operations below — the operation is applied to the C type pointed to by the reference.

    The pre-defined operations are always tried first before deferring to a metamethod or index table (if any) for the corresponding ctype (except for __new). An error is raised if the metamethod lookup or index table lookup fails.

    Indexing a cdata object

    • Indexing a pointer/array: a cdata pointer/array can be indexed by a cdata number or a Lua number. The element address is computed as the base address plus the number value multiplied by the element size in bytes. A read access loads the element value and converts it to a Lua object. A write access converts a Lua object to the element type and stores the converted value to the element. An error is raised if the element size is undefined or a write access to a constant element is attempted.
    • Dereferencing a struct/union field: a cdata struct/union or a pointer to a struct/union can be dereferenced by a string key, giving the field name. The field address is computed as the base address plus the relative offset of the field. A read access loads the field value and converts it to a Lua object. A write access converts a Lua object to the field type and stores the converted value to the field. An error is raised if a write access to a constant struct/union or a constant field is attempted. Scoped enum constants or static constants are treated like a constant field.
    • Indexing a complex number: a complex number can be indexed either by a cdata number or a Lua number with the values 0 or 1, or by the strings "re" or "im". A read access loads the real part ([0], .re) or the imaginary part ([1], .im) part of a complex number and converts it to a Lua number. The sub-parts of a complex number are immutable — assigning to an index of a complex number raises an error. Accessing out-of-bound indexes returns unspecified results, but is guaranteed not to trigger memory access violations.
    • Indexing a vector: a vector is treated like an array for indexing purposes, except the vector elements are immutable — assigning to an index of a vector raises an error.

    A ctype object can be indexed with a string key, too. The only pre-defined operation is reading scoped constants of struct/union types. All other accesses defer to the corresponding metamethods or index tables (if any).

    Note: since there's (deliberately) no address-of operator, a cdata object holding a value type is effectively immutable after initialization. The JIT compiler benefits from this fact when applying certain optimizations.

    As a consequence, the elements of complex numbers and vectors are immutable. But the elements of an aggregate holding these types may be modified of course. I.e. you cannot assign to foo.c.im, but you can assign a (newly created) complex number to foo.c.

    The JIT compiler implements strict aliasing rules: accesses to different types do not alias, except for differences in signedness (this applies even to char pointers, unlike C99). Type punning through unions is explicitly detected and allowed.

    Calling a cdata object

    • Constructor: a ctype object can be called and used as a constructor. This is equivalent to ffi.new(ct, ...), unless a __new metamethod is defined. The __new metamethod is called with the ctype object plus any other arguments passed to the contructor. Note that you have to use ffi.new inside of it, since calling ct(...) would cause infinite recursion.
    • C function call: a cdata function or cdata function pointer can be called. The passed arguments are converted to the C types of the parameters given by the function declaration. Arguments passed to the variable argument part of vararg C function use special conversion rules. This C function is called and the return value (if any) is converted to a Lua object.
      On Windows/x86 systems, __stdcall functions are automatically detected and a function declared as __cdecl (the default) is silently fixed up after the first call.

    Arithmetic on cdata objects

    • Pointer arithmetic: a cdata pointer/array and a cdata number or a Lua number can be added or subtracted. The number must be on the right hand side for a subtraction. The result is a pointer of the same type with an address plus or minus the number value multiplied by the element size in bytes. An error is raised if the element size is undefined.
    • Pointer difference: two compatible cdata pointers/arrays can be subtracted. The result is the difference between their addresses, divided by the element size in bytes. An error is raised if the element size is undefined or zero.
    • 64 bit integer arithmetic: the standard arithmetic operators (+ - * / % ^ and unary minus) can be applied to two cdata numbers, or a cdata number and a Lua number. If one of them is an uint64_t, the other side is converted to an uint64_t and an unsigned arithmetic operation is performed. Otherwise both sides are converted to an int64_t and a signed arithmetic operation is performed. The result is a boxed 64 bit cdata object.
      If one of the operands is an enum and the other operand is a string, the string is converted to the value of a matching enum constant before the above conversion.
      These rules ensure that 64 bit integers are "sticky". Any expression involving at least one 64 bit integer operand results in another one. The undefined cases for the division, modulo and power operators return 2LL ^ 63 or 2ULL ^ 63.
      You'll have to explicitly convert a 64 bit integer to a Lua number (e.g. for regular floating-point calculations) with tonumber(). But note this may incur a precision loss.

    Comparisons of cdata objects

    • Pointer comparison: two compatible cdata pointers/arrays can be compared. The result is the same as an unsigned comparison of their addresses. nil is treated like a NULL pointer, which is compatible with any other pointer type.
    • 64 bit integer comparison: two cdata numbers, or a cdata number and a Lua number can be compared with each other. If one of them is an uint64_t, the other side is converted to an uint64_t and an unsigned comparison is performed. Otherwise both sides are converted to an int64_t and a signed comparison is performed.
      If one of the operands is an enum and the other operand is a string, the string is converted to the value of a matching enum constant before the above conversion.
    • Comparisons for equality/inequality never raise an error. Even incompatible pointers can be compared for equality by address. Any other incompatible comparison (also with non-cdata objects) treats the two sides as unequal.

    cdata objects as table keys

    Lua tables may be indexed by cdata objects, but this doesn't provide any useful semantics — cdata objects are unsuitable as table keys!

    A cdata object is treated like any other garbage-collected object and is hashed and compared by its address for table indexing. Since there's no interning for cdata value types, the same value may be boxed in different cdata objects with different addresses. Thus t[1LL+1LL] and t[2LL] usually do not point to the same hash slot and they certainly do not point to the same hash slot as t[2].

    It would seriously drive up implementation complexity and slow down the common case, if one were to add extra handling for by-value hashing and comparisons to Lua tables. Given the ubiquity of their use inside the VM, this is not acceptable.

    There are three viable alternatives, if you really need to use cdata objects as keys:

    • If you can get by with the precision of Lua numbers (52 bits), then use tonumber() on a cdata number or combine multiple fields of a cdata aggregate to a Lua number. Then use the resulting Lua number as a key when indexing tables.
      One obvious benefit: t[tonumber(2LL)] does point to the same slot as t[2].
    • Otherwise use either tostring() on 64 bit integers or complex numbers or combine multiple fields of a cdata aggregate to a Lua string (e.g. with ffi.string()). Then use the resulting Lua string as a key when indexing tables.
    • Create your own specialized hash table implementation using the C types provided by the FFI library, just like you would in C code. Ultimately this may give much better performance than the other alternatives or what a generic by-value hash table could possibly provide.

    Parameterized Types

    To facilitate some abstractions, the two functions ffi.typeof and ffi.cdef support parameterized types in C declarations. Note: none of the other API functions taking a cdecl allow this.

    Any place you can write a typedef name, an identifier or a number in a declaration, you can write $ (the dollar sign) instead. These placeholders are replaced in order of appearance with the arguments following the cdecl string:

    -- Declare a struct with a parameterized field type and name:
    ffi.cdef([[
    typedef struct { $ $; } foo_t;
    ]], type1, name1)
    
    -- Anonymous struct with dynamic names:
    local bar_t = ffi.typeof("struct { int $, $; }", name1, name2)
    -- Derived pointer type:
    local bar_ptr_t = ffi.typeof("$ *", bar_t)
    
    -- Parameterized dimensions work even where a VLA won't work:
    local matrix_t = ffi.typeof("uint8_t[$][$]", width, height)
    

    Caveat: this is not simple text substitution! A passed ctype or cdata object is treated like the underlying type, a passed string is considered an identifier and a number is considered a number. You must not mix this up: e.g. passing "int" as a string doesn't work in place of a type, you'd need to use ffi.typeof("int") instead.

    The main use for parameterized types are libraries implementing abstract data types (» example), similar to what can be achieved with C++ template metaprogramming. Another use case are derived types of anonymous structs, which avoids pollution of the global struct namespace.

    Please note that parameterized types are a nice tool and indispensable for certain use cases. But you'll want to use them sparingly in regular code, e.g. when all types are actually fixed.

    Garbage Collection of cdata Objects

    All explicitly (ffi.new(), ffi.cast() etc.) or implicitly (accessors) created cdata objects are garbage collected. You need to ensure to retain valid references to cdata objects somewhere on a Lua stack, an upvalue or in a Lua table while they are still in use. Once the last reference to a cdata object is gone, the garbage collector will automatically free the memory used by it (at the end of the next GC cycle).

    Please note that pointers themselves are cdata objects, however they are not followed by the garbage collector. So e.g. if you assign a cdata array to a pointer, you must keep the cdata object holding the array alive as long as the pointer is still in use:

    ffi.cdef[[
    typedef struct { int *a; } foo_t;
    ]]
    
    local s = ffi.new("foo_t", ffi.new("int[10]")) -- WRONG!
    
    local a = ffi.new("int[10]") -- OK
    local s = ffi.new("foo_t", a)
    -- Now do something with 's', but keep 'a' alive until you're done.
    

    Similar rules apply for Lua strings which are implicitly converted to "const char *": the string object itself must be referenced somewhere or it'll be garbage collected eventually. The pointer will then point to stale data, which may have already been overwritten. Note that string literals are automatically kept alive as long as the function containing it (actually its prototype) is not garbage collected.

    Objects which are passed as an argument to an external C function are kept alive until the call returns. So it's generally safe to create temporary cdata objects in argument lists. This is a common idiom for passing specific C types to vararg functions.

    Memory areas returned by C functions (e.g. from malloc()) must be manually managed, of course (or use ffi.gc()). Pointers to cdata objects are indistinguishable from pointers returned by C functions (which is one of the reasons why the GC cannot follow them).

    Callbacks

    The LuaJIT FFI automatically generates special callback functions whenever a Lua function is converted to a C function pointer. This associates the generated callback function pointer with the C type of the function pointer and the Lua function object (closure).

    This can happen implicitly due to the usual conversions, e.g. when passing a Lua function to a function pointer argument. Or you can use ffi.cast() to explicitly cast a Lua function to a C function pointer.

    Currently only certain C function types can be used as callback functions. Neither C vararg functions nor functions with pass-by-value aggregate argument or result types are supported. There are no restrictions for the kind of Lua functions that can be called from the callback — no checks for the proper number of arguments are made. The return value of the Lua function will be converted to the result type and an error will be thrown for invalid conversions.

    It's allowed to throw errors across a callback invocation, but it's not advisable in general. Do this only if you know the C function, that called the callback, copes with the forced stack unwinding and doesn't leak resources.

    One thing that's not allowed, is to let an FFI call into a C function get JIT-compiled, which in turn calls a callback, calling into Lua again. Usually this attempt is caught by the interpreter first and the C function is blacklisted for compilation.

    However, this heuristic may fail under specific circumstances: e.g. a message polling function might not run Lua callbacks right away and the call gets JIT-compiled. If it later happens to call back into Lua (e.g. a rarely invoked error callback), you'll get a VM PANIC with the message "bad callback". Then you'll need to manually turn off JIT-compilation with jit.off() for the surrounding Lua function that invokes such a message polling function (or similar).

    Callback resource handling

    Callbacks take up resources — you can only have a limited number of them at the same time (500 - 1000, depending on the architecture). The associated Lua functions are anchored to prevent garbage collection, too.

    Callbacks due to implicit conversions are permanent! There is no way to guess their lifetime, since the C side might store the function pointer for later use (typical for GUI toolkits). The associated resources cannot be reclaimed until termination:

    ffi.cdef[[
    typedef int (__stdcall *WNDENUMPROC)(void *hwnd, intptr_t l);
    int EnumWindows(WNDENUMPROC func, intptr_t l);
    ]]
    
    -- Implicit conversion to a callback via function pointer argument.
    local count = 0
    ffi.C.EnumWindows(function(hwnd, l)
      count = count + 1
      return true
    end, 0)
    -- The callback is permanent and its resources cannot be reclaimed!
    -- Ok, so this may not be a problem, if you do this only once.
    

    Note: this example shows that you must properly declare __stdcall callbacks on Windows/x86 systems. The calling convention cannot be automatically detected, unlike for __stdcall calls to Windows functions.

    For some use cases it's necessary to free up the resources or to dynamically redirect callbacks. Use an explicit cast to a C function pointer and keep the resulting cdata object. Then use the cb:free() or cb:set() methods on the cdata object:

    -- Explicitly convert to a callback via cast.
    local count = 0
    local cb = ffi.cast("WNDENUMPROC", function(hwnd, l)
      count = count + 1
      return true
    end)
    
    -- Pass it to a C function.
    ffi.C.EnumWindows(cb, 0)
    -- EnumWindows doesn't need the callback after it returns, so free it.
    
    cb:free()
    -- The callback function pointer is no longer valid and its resources
    -- will be reclaimed. The created Lua closure will be garbage collected.
    

    Callback performance

    Callbacks are slow! First, the C to Lua transition itself has an unavoidable cost, similar to a lua_call() or lua_pcall(). Argument and result marshalling add to that cost. And finally, neither the C compiler nor LuaJIT can inline or optimize across the language barrier and hoist repeated computations out of a callback function.

    Do not use callbacks for performance-sensitive work: e.g. consider a numerical integration routine which takes a user-defined function to integrate over. It's a bad idea to call a user-defined Lua function from C code millions of times. The callback overhead will be absolutely detrimental for performance.

    It's considerably faster to write the numerical integration routine itself in Lua — the JIT compiler will be able to inline the user-defined function and optimize it together with its calling context, with very competitive performance.

    As a general guideline: use callbacks only when you must, because of existing C APIs. E.g. callback performance is irrelevant for a GUI application, which waits for user input most of the time, anyway.

    For new designs avoid push-style APIs: a C function repeatedly calling a callback for each result. Instead use pull-style APIs: call a C function repeatedly to get a new result. Calls from Lua to C via the FFI are much faster than the other way round. Most well-designed libraries already use pull-style APIs (read/write, get/put).

    C Library Namespaces

    A C library namespace is a special kind of object which allows access to the symbols contained in shared libraries or the default symbol namespace. The default ffi.C namespace is automatically created when the FFI library is loaded. C library namespaces for specific shared libraries may be created with the ffi.load() API function.

    Indexing a C library namespace object with a symbol name (a Lua string) automatically binds it to the library. First the symbol type is resolved — it must have been declared with ffi.cdef. Then the symbol address is resolved by searching for the symbol name in the associated shared libraries or the default symbol namespace. Finally, the resulting binding between the symbol name, the symbol type and its address is cached. Missing symbol declarations or nonexistent symbol names cause an error.

    This is what happens on a read access for the different kinds of symbols:

    • External functions: a cdata object with the type of the function and its address is returned.
    • External variables: the symbol address is dereferenced and the loaded value is converted to a Lua object and returned.
    • Constant values (static const or enum constants): the constant is converted to a Lua object and returned.

    This is what happens on a write access:

    • External variables: the value to be written is converted to the C type of the variable and then stored at the symbol address.
    • Writing to constant variables or to any other symbol type causes an error, like any other attempted write to a constant location.

    C library namespaces themselves are garbage collected objects. If the last reference to the namespace object is gone, the garbage collector will eventually release the shared library reference and remove all memory associated with the namespace. Since this may trigger the removal of the shared library from the memory of the running process, it's generally not safe to use function cdata objects obtained from a library if the namespace object may be unreferenced.

    Performance notice: the JIT compiler specializes to the identity of namespace objects and to the strings used to index it. This effectively turns function cdata objects into constants. It's not useful and actually counter-productive to explicitly cache these function objects, e.g. local strlen = ffi.C.strlen. OTOH it is useful to cache the namespace itself, e.g. local C = ffi.C.

    No Hand-holding!

    The FFI library has been designed as a low-level library. The goal is to interface with C code and C data types with a minimum of overhead. This means you can do anything you can do from C: access all memory, overwrite anything in memory, call machine code at any memory address and so on.

    The FFI library provides no memory safety, unlike regular Lua code. It will happily allow you to dereference a NULL pointer, to access arrays out of bounds or to misdeclare C functions. If you make a mistake, your application might crash, just like equivalent C code would.

    This behavior is inevitable, since the goal is to provide full interoperability with C code. Adding extra safety measures, like bounds checks, would be futile. There's no way to detect misdeclarations of C functions, since shared libraries only provide symbol names, but no type information. Likewise there's no way to infer the valid range of indexes for a returned pointer.

    Again: the FFI library is a low-level library. This implies it needs to be used with care, but it's flexibility and performance often outweigh this concern. If you're a C or C++ developer, it'll be easy to apply your existing knowledge. OTOH writing code for the FFI library is not for the faint of heart and probably shouldn't be the first exercise for someone with little experience in Lua, C or C++.

    As a corollary of the above, the FFI library is not safe for use by untrusted Lua code. If you're sandboxing untrusted Lua code, you definitely don't want to give this code access to the FFI library or to any cdata object (except 64 bit integers or complex numbers). Any properly engineered Lua sandbox needs to provide safety wrappers for many of the standard Lua library functions — similar wrappers need to be written for high-level operations on FFI data types, too.

    Current Status

    The initial release of the FFI library has some limitations and is missing some features. Most of these will be fixed in future releases.

    C language support is currently incomplete:

    • C declarations are not passed through a C pre-processor, yet.
    • The C parser is able to evaluate most constant expressions commonly found in C header files. However it doesn't handle the full range of C expression semantics and may fail for some obscure constructs.
    • static const declarations only work for integer types up to 32 bits. Neither declaring string constants nor floating-point constants is supported.
    • Packed struct bitfields that cross container boundaries are not implemented.
    • Native vector types may be defined with the GCC mode or vector_size attribute. But no operations other than loading, storing and initializing them are supported, yet.
    • The volatile type qualifier is currently ignored by compiled code.
    • ffi.cdef silently ignores all re-declarations.

    The JIT compiler already handles a large subset of all FFI operations. It automatically falls back to the interpreter for unimplemented operations (you can check for this with the -jv command line option). The following operations are currently not compiled and may exhibit suboptimal performance, especially when used in inner loops:

    • Bitfield accesses and initializations.
    • Vector operations.
    • Table initializers.
    • Initialization of nested struct/union types.
    • Allocations of variable-length arrays or structs.
    • Allocations of C types with a size > 128 bytes or an alignment > 8 bytes.
    • Conversions from lightuserdata to void *.
    • Pointer differences for element sizes that are not a power of two.
    • Calls to C functions with aggregates passed or returned by value.
    • Calls to ctype metamethods which are not plain functions.
    • ctype __newindex tables and non-string lookups in ctype __index tables.
    • tostring() for cdata types.
    • Calls to ffi.cdef(), ffi.load() and ffi.metatype().

    Other missing features:

    • Bit operations for 64 bit types.
    • Arithmetic for complex numbers.
    • Passing structs by value to vararg C functions.
    • C++ exception interoperability does not extend to C functions called via the FFI, if the call is compiled.

    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/ext_ffi_tutorial.html0000664000000000000000000005375212202141143024605 0ustar rootroot FFI Tutorial

    This page is intended to give you an overview of the features of the FFI library by presenting a few use cases and guidelines.

    This page makes no attempt to explain all of the FFI library, though. You'll want to have a look at the ffi.* API function reference and the FFI semantics to learn more.

    Loading the FFI Library

    The FFI library is built into LuaJIT by default, but it's not loaded and initialized by default. The suggested way to use the FFI library is to add the following to the start of every Lua file that needs one of its functions:

    local ffi = require("ffi")
    

    Please note this doesn't define an ffi variable in the table of globals — you really need to use the local variable. The require function ensures the library is only loaded once.

    Note: If you want to experiment with the FFI from the interactive prompt of the command line executable, omit the local, as it doesn't preserve local variables across lines.

    Accessing Standard System Functions

    The following code explains how to access standard system functions. We slowly print two lines of dots by sleeping for 10 milliseconds after each dot:

     
    ①
    
    
    
    
    
    ②
    ③
    ④
    
    
    
    ⑤
    
    
    
    
    
    ⑥local ffi = require("ffi")
    ffi.cdef[[
    void Sleep(int ms);
    int poll(struct pollfd *fds, unsigned long nfds, int timeout);
    ]]
    
    local sleep
    if ffi.os == "Windows" then
      function sleep(s)
        ffi.C.Sleep(s*1000)
      end
    else
      function sleep(s)
        ffi.C.poll(nil, 0, s*1000)
      end
    end
    
    for i=1,160 do
      io.write("."); io.flush()
      sleep(0.01)
    end
    io.write("\n")
    

    Here's the step-by-step explanation:

    This defines the C library functions we're going to use. The part inside the double-brackets (in green) is just standard C syntax. You can usually get this info from the C header files or the documentation provided by each C library or C compiler.

    The difficulty we're facing here, is that there are different standards to choose from. Windows has a simple Sleep() function. On other systems there are a variety of functions available to achieve sub-second sleeps, but with no clear consensus. Thankfully poll() can be used for this task, too, and it's present on most non-Windows systems. The check for ffi.os makes sure we use the Windows-specific function only on Windows systems.

    Here we're wrapping the call to the C function in a Lua function. This isn't strictly necessary, but it's helpful to deal with system-specific issues only in one part of the code. The way we're wrapping it ensures the check for the OS is only done during initialization and not for every call.

    A more subtle point is that we defined our sleep() function (for the sake of this example) as taking the number of seconds, but accepting fractional seconds. Multiplying this by 1000 gets us milliseconds, but that still leaves it a Lua number, which is a floating-point value. Alas, the Sleep() function only accepts an integer value. Luckily for us, the FFI library automatically performs the conversion when calling the function (truncating the FP value towards zero, like in C).

    Some readers will notice that Sleep() is part of KERNEL32.DLL and is also a stdcall function. So how can this possibly work? The FFI library provides the ffi.C default C library namespace, which allows calling functions from the default set of libraries, like a C compiler would. Also, the FFI library automatically detects stdcall functions, so you don't need to declare them as such.

    The poll() function takes a couple more arguments we're not going to use. You can simply use nil to pass a NULL pointer and 0 for the nfds parameter. Please note that the number 0 does not convert to a pointer value, unlike in C++. You really have to pass pointers to pointer arguments and numbers to number arguments.

    The page on FFI semantics has all of the gory details about conversions between Lua objects and C types. For the most part you don't have to deal with this, as it's performed automatically and it's carefully designed to bridge the semantic differences between Lua and C.

    Now that we have defined our own sleep() function, we can just call it from plain Lua code. That wasn't so bad, huh? Turning these boring animated dots into a fascinating best-selling game is left as an exercise for the reader. :-)

    Accessing the zlib Compression Library

    The following code shows how to access the zlib compression library from Lua code. We'll define two convenience wrapper functions that take a string and compress or uncompress it to another string:

     
    ①
    
    
    
    
    
    
    ②
    
    
    ③
    
    ④
    
    
    ⑤
    
    
    ⑥
    
    
    
    
    
    
    
    ⑦local ffi = require("ffi")
    ffi.cdef[[
    unsigned long compressBound(unsigned long sourceLen);
    int compress2(uint8_t *dest, unsigned long *destLen,
    	      const uint8_t *source, unsigned long sourceLen, int level);
    int uncompress(uint8_t *dest, unsigned long *destLen,
    	       const uint8_t *source, unsigned long sourceLen);
    ]]
    local zlib = ffi.load(ffi.os == "Windows" and "zlib1" or "z")
    
    local function compress(txt)
      local n = zlib.compressBound(#txt)
      local buf = ffi.new("uint8_t[?]", n)
      local buflen = ffi.new("unsigned long[1]", n)
      local res = zlib.compress2(buf, buflen, txt, #txt, 9)
      assert(res == 0)
      return ffi.string(buf, buflen[0])
    end
    
    local function uncompress(comp, n)
      local buf = ffi.new("uint8_t[?]", n)
      local buflen = ffi.new("unsigned long[1]", n)
      local res = zlib.uncompress(buf, buflen, comp, #comp)
      assert(res == 0)
      return ffi.string(buf, buflen[0])
    end
    
    -- Simple test code.
    local txt = string.rep("abcd", 1000)
    print("Uncompressed size: ", #txt)
    local c = compress(txt)
    print("Compressed size: ", #c)
    local txt2 = uncompress(c, #txt)
    assert(txt2 == txt)
    

    Here's the step-by-step explanation:

    This defines some of the C functions provided by zlib. For the sake of this example, some type indirections have been reduced and it uses the pre-defined fixed-size integer types, while still adhering to the zlib API/ABI.

    This loads the zlib shared library. On POSIX systems it's named libz.so and usually comes pre-installed. Since ffi.load() automatically adds any missing standard prefixes/suffixes, we can simply load the "z" library. On Windows it's named zlib1.dll and you'll have to download it first from the » zlib site. The check for ffi.os makes sure we pass the right name to ffi.load().

    First, the maximum size of the compression buffer is obtained by calling the zlib.compressBound function with the length of the uncompressed string. The next line allocates a byte buffer of this size. The [?] in the type specification indicates a variable-length array (VLA). The actual number of elements of this array is given as the 2nd argument to ffi.new().

    This may look strange at first, but have a look at the declaration of the compress2 function from zlib: the destination length is defined as a pointer! This is because you pass in the maximum buffer size and get back the actual length that was used.

    In C you'd pass in the address of a local variable (&buflen). But since there's no address-of operator in Lua, we'll just pass in a one-element array. Conveniently it can be initialized with the maximum buffer size in one step. Calling the actual zlib.compress2 function is then straightforward.

    We want to return the compressed data as a Lua string, so we'll use ffi.string(). It needs a pointer to the start of the data and the actual length. The length has been returned in the buflen array, so we'll just get it from there.

    Note that since the function returns now, the buf and buflen variables will eventually be garbage collected. This is fine, because ffi.string() has copied the contents to a newly created (interned) Lua string. If you plan to call this function lots of times, consider reusing the buffers and/or handing back the results in buffers instead of strings. This will reduce the overhead for garbage collection and string interning.

    The uncompress functions does the exact opposite of the compress function. The compressed data doesn't include the size of the original string, so this needs to be passed in. Otherwise no surprises here.

    The code, that makes use of the functions we just defined, is just plain Lua code. It doesn't need to know anything about the LuaJIT FFI — the convenience wrapper functions completely hide it.

    One major advantage of the LuaJIT FFI is that you are now able to write those wrappers in Lua. And at a fraction of the time it would cost you to create an extra C module using the Lua/C API. Many of the simpler C functions can probably be used directly from your Lua code, without any wrappers.

    Side note: the zlib API uses the long type for passing lengths and sizes around. But all those zlib functions actually only deal with 32 bit values. This is an unfortunate choice for a public API, but may be explained by zlib's history — we'll just have to deal with it.

    First, you should know that a long is a 64 bit type e.g. on POSIX/x64 systems, but a 32 bit type on Windows/x64 and on 32 bit systems. Thus a long result can be either a plain Lua number or a boxed 64 bit integer cdata object, depending on the target system.

    Ok, so the ffi.* functions generally accept cdata objects wherever you'd want to use a number. That's why we get a away with passing n to ffi.string() above. But other Lua library functions or modules don't know how to deal with this. So for maximum portability one needs to use tonumber() on returned long results before passing them on. Otherwise the application might work on some systems, but would fail in a POSIX/x64 environment.

    Defining Metamethods for a C Type

    The following code explains how to define metamethods for a C type. We define a simple point type and add some operations to it:

     
    ①
    
    
    
    ②
    
    ③
    
    ④
    
    
    
    ⑤
    
    ⑥local ffi = require("ffi")
    ffi.cdef[[
    typedef struct { double x, y; } point_t;
    ]]
    
    local point
    local mt = {
      __add = function(a, b) return point(a.x+b.x, a.y+b.y) end,
      __len = function(a) return math.sqrt(a.x*a.x + a.y*a.y) end,
      __index = {
        area = function(a) return a.x*a.x + a.y*a.y end,
      },
    }
    point = ffi.metatype("point_t", mt)
    
    local a = point(3, 4)
    print(a.x, a.y)  --> 3  4
    print(#a)        --> 5
    print(a:area())  --> 25
    local b = a + point(0.5, 8)
    print(#b)        --> 12.5
    

    Here's the step-by-step explanation:

    This defines the C type for a two-dimensional point object.

    We have to declare the variable holding the point constructor first, because it's used inside of a metamethod.

    Let's define an __add metamethod which adds the coordinates of two points and creates a new point object. For simplicity, this function assumes that both arguments are points. But it could be any mix of objects, if at least one operand is of the required type (e.g. adding a point plus a number or vice versa). Our __len metamethod returns the distance of a point to the origin.

    If we run out of operators, we can define named methods, too. Here the __index table defines an area function. For custom indexing needs, one might want to define __index and __newindex functions instead.

    This associates the metamethods with our C type. This only needs to be done once. For convenience, a constructor is returned by ffi.metatype(). We're not required to use it, though. The original C type can still be used e.g. to create an array of points. The metamethods automatically apply to any and all uses of this type.

    Please note that the association with a metatable is permanent and the metatable must not be modified afterwards! Ditto for the __index table.

    Here are some simple usage examples for the point type and their expected results. The pre-defined operations (such as a.x) can be freely mixed with the newly defined metamethods. Note that area is a method and must be called with the Lua syntax for methods: a:area(), not a.area().

    The C type metamethod mechanism is most useful when used in conjunction with C libraries that are written in an object-oriented style. Creators return a pointer to a new instance and methods take an instance pointer as the first argument. Sometimes you can just point __index to the library namespace and __gc to the destructor and you're done. But often enough you'll want to add convenience wrappers, e.g. to return actual Lua strings or when returning multiple values.

    Some C libraries only declare instance pointers as an opaque void * type. In this case you can use a fake type for all declarations, e.g. a pointer to a named (incomplete) struct will do: typedef struct foo_type *foo_handle. The C side doesn't know what you declare with the LuaJIT FFI, but as long as the underlying types are compatible, everything still works.

    Translating C Idioms

    Here's a list of common C idioms and their translation to the LuaJIT FFI:

    Idiom C code Lua code
    Pointer dereference
    int *p;
    x = *p;
    *p = y;
    x = p[0]
    p[0] = y
    Pointer indexing
    int i, *p;
    x = p[i];
    p[i+1] = y;
    x = p[i]
    p[i+1] = y
    Array indexing
    int i, a[];
    x = a[i];
    a[i+1] = y;
    x = a[i]
    a[i+1] = y
    struct/union dereference
    struct foo s;
    x = s.field;
    s.field = y;
    x = s.field
    s.field = y
    struct/union pointer deref.
    struct foo *sp;
    x = sp->field;
    sp->field = y;
    x = s.field
    s.field = y
    Pointer arithmetic
    int i, *p;
    x = p + i;
    y = p - i;
    x = p + i
    y = p - i
    Pointer difference
    int *p1, *p2;
    x = p1 - p2;x = p1 - p2
    Array element pointer
    int i, a[];
    x = &a[i];x = a+i
    Cast pointer to address
    int *p;
    x = (intptr_t)p;x = tonumber(
     ffi.cast("intptr_t",
              p))
    Functions with outargs
    void foo(int *inoutlen);
    int len = x;
    foo(&len);
    y = len;
    local len =
      ffi.new("int[1]", x)
    foo(len)
    y = len[0]
    Vararg conversions
    int printf(char *fmt, ...);
    printf("%g", 1.0);
    printf("%d", 1);
     
    printf("%g", 1);
    printf("%d",
      ffi.new("int", 1))

    To Cache or Not to Cache

    It's a common Lua idiom to cache library functions in local variables or upvalues, e.g.:

    local byte, char = string.byte, string.char
    local function foo(x)
      return char(byte(x)+1)
    end
    

    This replaces several hash-table lookups with a (faster) direct use of a local or an upvalue. This is less important with LuaJIT, since the JIT compiler optimizes hash-table lookups a lot and is even able to hoist most of them out of the inner loops. It can't eliminate all of them, though, and it saves some typing for often-used functions. So there's still a place for this, even with LuaJIT.

    The situation is a bit different with C function calls via the FFI library. The JIT compiler has special logic to eliminate all of the lookup overhead for functions resolved from a C library namespace! Thus it's not helpful and actually counter-productive to cache individual C functions like this:

    local funca, funcb = ffi.C.funcb, ffi.C.funcb -- Not helpful!
    local function foo(x, n)
      for i=1,n do funcb(funca(x, i), 1) end
    end
    

    This turns them into indirect calls and generates bigger and slower machine code. Instead you'll want to cache the namespace itself and rely on the JIT compiler to eliminate the lookups:

    local C = ffi.C          -- Instead use this!
    local function foo(x, n)
      for i=1,n do C.funcb(C.funca(x, i), 1) end
    end
    

    This generates both shorter and faster code. So don't cache C functions, but do cache namespaces! Most often the namespace is already in a local variable at an outer scope, e.g. from local lib = ffi.load(...). Note that copying it to a local variable in the function scope is unnecessary.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/luajit.html0000664000000000000000000001733212202141143022520 0ustar rootroot LuaJIT

    LuaJIT is a Just-In-Time Compiler (JIT) for the » Lua programming language. Lua is a powerful, dynamic and light-weight programming language. It may be embedded or used as a general-purpose, stand-alone language.

    LuaJIT is Copyright © 2005-2013 Mike Pall, released under the » MIT open source license.

    Compatibility

    WindowsLinuxBSDOSXPOSIX
    EmbeddedAndroidiOSPS3Xbox 360
    GCCCLANG
    LLVM
    MSVC
    x86x64ARMPPCe500MIPS
    Lua 5.1
    API+ABI
    + JIT+ BitOp+ FFIDrop-in
    DLL/.so

    Overview

    3x
    -  100x
    115 KB
    VM
    90 KB
    JIT
    63 KLOC
    C
    24 KLOC
    ASM
    11 KLOC
    Lua

    LuaJIT has been successfully used as a scripting middleware in games, appliances, network and graphics apps, numerical simulations, trading platforms and many other specialty applications. It scales from embedded devices, smartphones, desktops up to server farms. It combines high flexibility with » high performance and an unmatched low memory footprint.

    LuaJIT has been in continuous development since 2005. It's widely considered to be one of the fastest dynamic language implementations. It has outperformed other dynamic languages on many cross-language benchmarks since its first release — often by a substantial margin.

    For LuaJIT 2.0, the whole VM has been rewritten from the ground up and relentlessly optimized for performance. It combines a high-speed interpreter, written in assembler, with a state-of-the-art JIT compiler.

    An innovative trace compiler is integrated with advanced, SSA-based optimizations and highly tuned code generation backends. A substantial reduction of the overhead associated with dynamic languages allows it to break into the performance range traditionally reserved for offline, static language compilers.

    More ...

    Please select a sub-topic in the navigation bar to learn more about LuaJIT.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/running.html0000664000000000000000000003237712202141143022716 0ustar rootroot Running LuaJIT

    LuaJIT has only a single stand-alone executable, called luajit on POSIX systems or luajit.exe on Windows. It can be used to run simple Lua statements or whole Lua applications from the command line. It has an interactive mode, too.

    Command Line Options

    The luajit stand-alone executable is just a slightly modified version of the regular lua stand-alone executable. It supports the same basic options, too. luajit -h prints a short list of the available options. Please have a look at the » Lua manual for details.

    LuaJIT has some additional options:

    -b[options] input output

    This option saves or lists bytecode. The following additional options are accepted:

    • -l — Only list bytecode.
    • -s — Strip debug info (this is the default).
    • -g — Keep debug info.
    • -n name — Set module name (default: auto-detect from input name)
    • -t type — Set output file type (default: auto-detect from output name).
    • -a arch — Override architecture for object files (default: native).
    • -o os — Override OS for object files (default: native).
    • -e chunk — Use chunk string as input.
    • - (a single minus sign) — Use stdin as input and/or stdout as output.

    The output file type is auto-detected from the extension of the output file name:

    • c — C source file, exported bytecode data.
    • h — C header file, static bytecode data.
    • obj or o — Object file, exported bytecode data (OS- and architecture-specific).
    • raw or any other extension — Raw bytecode file (portable).

    Notes:

    • See also string.dump() for information on bytecode portability and compatibility.
    • A file in raw bytecode format is auto-detected and can be loaded like any Lua source file. E.g. directly from the command line or with loadfile(), dofile() etc.
    • To statically embed the bytecode of a module in your application, generate an object file and just link it with your application.
    • On most ELF-based systems (e.g. Linux) you need to explicitly export the global symbols when linking your application, e.g. with: -Wl,-E
    • require() tries to load embedded bytecode data from exported symbols (in *.exe or lua51.dll on Windows) and from shared libraries in package.cpath.

    Typical usage examples:

    luajit -b test.lua test.out                 # Save bytecode to test.out
    luajit -bg test.lua test.out                # Keep debug info
    luajit -be "print('hello world')" test.out  # Save cmdline script
    
    luajit -bl test.lua                         # List to stdout
    luajit -bl test.lua test.txt                # List to test.txt
    luajit -ble "print('hello world')"          # List cmdline script
    
    luajit -b test.lua test.obj                 # Generate object file
    # Link test.obj with your application and load it with require("test")
    

    -j cmd[=arg[,arg...]]

    This option performs a LuaJIT control command or activates one of the loadable extension modules. The command is first looked up in the jit.* library. If no matching function is found, a module named jit.<cmd> is loaded and the start() function of the module is called with the specified arguments (if any). The space between -j and cmd is optional.

    Here are the available LuaJIT control commands:

    • -jon — Turns the JIT compiler on (default).
    • -joff — Turns the JIT compiler off (only use the interpreter).
    • -jflush — Flushes the whole cache of compiled code.
    • -jv — Shows verbose information about the progress of the JIT compiler.
    • -jdump — Dumps the code and structures used in various compiler stages.

    The -jv and -jdump commands are extension modules written in Lua. They are mainly used for debugging the JIT compiler itself. For a description of their options and output format, please read the comment block at the start of their source. They can be found in the lib directory of the source distribution or installed under the jit directory. By default this is /usr/local/share/luajit-2.0.2/jit on POSIX systems.

    -O[level]
    -O[+]flag   -O-flag
    -Oparam=value

    This options allows fine-tuned control of the optimizations used by the JIT compiler. This is mainly intended for debugging LuaJIT itself. Please note that the JIT compiler is extremely fast (we are talking about the microsecond to millisecond range). Disabling optimizations doesn't have any visible impact on its overhead, but usually generates code that runs slower.

    The first form sets an optimization level — this enables a specific mix of optimization flags. -O0 turns off all optimizations and higher numbers enable more optimizations. Omitting the level (i.e. just -O) sets the default optimization level, which is -O3 in the current version.

    The second form adds or removes individual optimization flags. The third form sets a parameter for the VM or the JIT compiler to a specific value.

    You can either use this option multiple times (like -Ocse -O-dce -Ohotloop=10) or separate several settings with a comma (like -O+cse,-dce,hotloop=10). The settings are applied from left to right and later settings override earlier ones. You can freely mix the three forms, but note that setting an optimization level overrides all earlier flags.

    Here are the available flags and at what optimization levels they are enabled:

    Flag -O1 -O2 -O3  
    foldConstant Folding, Simplifications and Reassociation
    cseCommon-Subexpression Elimination
    dceDead-Code Elimination
    narrow Narrowing of numbers to integers
    loop Loop Optimizations (code hoisting)
    fwd  Load Forwarding (L2L) and Store Forwarding (S2L)
    dse  Dead-Store Elimination
    abc  Array Bounds Check Elimination
    sink  Allocation/Store Sinking
    fuse  Fusion of operands into instructions

    Here are the parameters and their default settings:

    Parameter Default  
    maxtrace1000Max. number of traces in the cache
    maxrecord4000Max. number of recorded IR instructions
    maxirconst500Max. number of IR constants of a trace
    maxside100Max. number of side traces of a root trace
    maxsnap500Max. number of snapshots for a trace
    hotloop56Number of iterations to detect a hot loop or hot call
    hotexit10Number of taken exits to start a side trace
    tryside4Number of attempts to compile a side trace
    instunroll4Max. unroll factor for instable loops
    loopunroll15Max. unroll factor for loop ops in side traces
    callunroll3Max. unroll factor for pseudo-recursive calls
    recunroll2Min. unroll factor for true recursion
    sizemcode32Size of each machine code area in KBytes (Windows: 64K)
    maxmcode512Max. total size of all machine code areas in KBytes

    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/ext_ffi_api.html0000664000000000000000000005146012202141143023505 0ustar rootroot ffi.* API Functions

    This page describes the API functions provided by the FFI library in detail. It's recommended to read through the introduction and the FFI tutorial first.

    Glossary

    • cdecl — An abstract C type declaration (a Lua string).
    • ctype — A C type object. This is a special kind of cdata returned by ffi.typeof(). It serves as a cdata constructor when called.
    • cdata — A C data object. It holds a value of the corresponding ctype.
    • ct — A C type specification which can be used for most of the API functions. Either a cdecl, a ctype or a cdata serving as a template type.
    • cb — A callback object. This is a C data object holding a special function pointer. Calling this function from C code runs an associated Lua function.
    • VLA — A variable-length array is declared with a ? instead of the number of elements, e.g. "int[?]". The number of elements (nelem) must be given when it's created.
    • VLS — A variable-length struct is a struct C type where the last element is a VLA. The same rules for declaration and creation apply.

    Declaring and Accessing External Symbols

    External symbols must be declared first and can then be accessed by indexing a C library namespace, which automatically binds the symbol to a specific library.

    ffi.cdef(def)

    Adds multiple C declarations for types or external symbols (named variables or functions). def must be a Lua string. It's recommended to use the syntactic sugar for string arguments as follows:

    ffi.cdef[[
    typedef struct foo { int a, b; } foo_t;  // Declare a struct and typedef.
    int dofoo(foo_t *f, int n);  /* Declare an external C function. */
    ]]
    

    The contents of the string (the part in green above) must be a sequence of C declarations, separated by semicolons. The trailing semicolon for a single declaration may be omitted.

    Please note that external symbols are only declared, but they are not bound to any specific address, yet. Binding is achieved with C library namespaces (see below).

    C declarations are not passed through a C pre-processor, yet. No pre-processor tokens are allowed, except for #pragma pack. Replace #define in existing C header files with enum, static const or typedef and/or pass the files through an external C pre-processor (once). Be careful not to include unneeded or redundant declarations from unrelated header files.

    ffi.C

    This is the default C library namespace — note the uppercase 'C'. It binds to the default set of symbols or libraries on the target system. These are more or less the same as a C compiler would offer by default, without specifying extra link libraries.

    On POSIX systems, this binds to symbols in the default or global namespace. This includes all exported symbols from the executable and any libraries loaded into the global namespace. This includes at least libc, libm, libdl (on Linux), libgcc (if compiled with GCC), as well as any exported symbols from the Lua/C API provided by LuaJIT itself.

    On Windows systems, this binds to symbols exported from the *.exe, the lua51.dll (i.e. the Lua/C API provided by LuaJIT itself), the C runtime library LuaJIT was linked with (msvcrt*.dll), kernel32.dll, user32.dll and gdi32.dll.

    clib = ffi.load(name [,global])

    This loads the dynamic library given by name and returns a new C library namespace which binds to its symbols. On POSIX systems, if global is true, the library symbols are loaded into the global namespace, too.

    If name is a path, the library is loaded from this path. Otherwise name is canonicalized in a system-dependent way and searched in the default search path for dynamic libraries:

    On POSIX systems, if the name contains no dot, the extension .so is appended. Also, the lib prefix is prepended if necessary. So ffi.load("z") looks for "libz.so" in the default shared library search path.

    On Windows systems, if the name contains no dot, the extension .dll is appended. So ffi.load("ws2_32") looks for "ws2_32.dll" in the default DLL search path.

    Creating cdata Objects

    The following API functions create cdata objects (type() returns "cdata"). All created cdata objects are garbage collected.

    cdata = ffi.new(ct [,nelem] [,init...])
    cdata = ctype([nelem,] [init...])

    Creates a cdata object for the given ct. VLA/VLS types require the nelem argument. The second syntax uses a ctype as a constructor and is otherwise fully equivalent.

    The cdata object is initialized according to the rules for initializers, using the optional init arguments. Excess initializers cause an error.

    Performance notice: if you want to create many objects of one kind, parse the cdecl only once and get its ctype with ffi.typeof(). Then use the ctype as a constructor repeatedly.

    Please note that an anonymous struct declaration implicitly creates a new and distinguished ctype every time you use it for ffi.new(). This is probably not what you want, especially if you create more than one cdata object. Different anonymous structs are not considered assignment-compatible by the C standard, even though they may have the same fields! Also, they are considered different types by the JIT-compiler, which may cause an excessive number of traces. It's strongly suggested to either declare a named struct or typedef with ffi.cdef() or to create a single ctype object for an anonymous struct with ffi.typeof().

    ctype = ffi.typeof(ct)

    Creates a ctype object for the given ct.

    This function is especially useful to parse a cdecl only once and then use the resulting ctype object as a constructor.

    cdata = ffi.cast(ct, init)

    Creates a scalar cdata object for the given ct. The cdata object is initialized with init using the "cast" variant of the C type conversion rules.

    This functions is mainly useful to override the pointer compatibility checks or to convert pointers to addresses or vice versa.

    ctype = ffi.metatype(ct, metatable)

    Creates a ctype object for the given ct and associates it with a metatable. Only struct/union types, complex numbers and vectors are allowed. Other types may be wrapped in a struct, if needed.

    The association with a metatable is permanent and cannot be changed afterwards. Neither the contents of the metatable nor the contents of an __index table (if any) may be modified afterwards. The associated metatable automatically applies to all uses of this type, no matter how the objects are created or where they originate from. Note that pre-defined operations on types have precedence (e.g. declared field names cannot be overriden).

    All standard Lua metamethods are implemented. These are called directly, without shortcuts and on any mix of types. For binary operations, the left operand is checked first for a valid ctype metamethod. The __gc metamethod only applies to struct/union types and performs an implicit ffi.gc() call during creation of an instance.

    cdata = ffi.gc(cdata, finalizer)

    Associates a finalizer with a pointer or aggregate cdata object. The cdata object is returned unchanged.

    This function allows safe integration of unmanaged resources into the automatic memory management of the LuaJIT garbage collector. Typical usage:

    local p = ffi.gc(ffi.C.malloc(n), ffi.C.free)
    ...
    p = nil -- Last reference to p is gone.
    -- GC will eventually run finalizer: ffi.C.free(p)
    

    A cdata finalizer works like the __gc metamethod for userdata objects: when the last reference to a cdata object is gone, the associated finalizer is called with the cdata object as an argument. The finalizer can be a Lua function or a cdata function or cdata function pointer. An existing finalizer can be removed by setting a nil finalizer, e.g. right before explicitly deleting a resource:

    ffi.C.free(ffi.gc(p, nil)) -- Manually free the memory.
    

    C Type Information

    The following API functions return information about C types. They are most useful for inspecting cdata objects.

    size = ffi.sizeof(ct [,nelem])

    Returns the size of ct in bytes. Returns nil if the size is not known (e.g. for "void" or function types). Requires nelem for VLA/VLS types, except for cdata objects.

    align = ffi.alignof(ct)

    Returns the minimum required alignment for ct in bytes.

    ofs [,bpos,bsize] = ffi.offsetof(ct, field)

    Returns the offset (in bytes) of field relative to the start of ct, which must be a struct. Additionally returns the position and the field size (in bits) for bit fields.

    status = ffi.istype(ct, obj)

    Returns true if obj has the C type given by ct. Returns false otherwise.

    C type qualifiers (const etc.) are ignored. Pointers are checked with the standard pointer compatibility rules, but without any special treatment for void *. If ct specifies a struct/union, then a pointer to this type is accepted, too. Otherwise the types must match exactly.

    Note: this function accepts all kinds of Lua objects for the obj argument, but always returns false for non-cdata objects.

    Utility Functions

    err = ffi.errno([newerr])

    Returns the error number set by the last C function call which indicated an error condition. If the optional newerr argument is present, the error number is set to the new value and the previous value is returned.

    This function offers a portable and OS-independent way to get and set the error number. Note that only some C functions set the error number. And it's only significant if the function actually indicated an error condition (e.g. with a return value of -1 or NULL). Otherwise, it may or may not contain any previously set value.

    You're advised to call this function only when needed and as close as possible after the return of the related C function. The errno value is preserved across hooks, memory allocations, invocations of the JIT compiler and other internal VM activity. The same applies to the value returned by GetLastError() on Windows, but you need to declare and call it yourself.

    str = ffi.string(ptr [,len])

    Creates an interned Lua string from the data pointed to by ptr.

    If the optional argument len is missing, ptr is converted to a "char *" and the data is assumed to be zero-terminated. The length of the string is computed with strlen().

    Otherwise ptr is converted to a "void *" and len gives the length of the data. The data may contain embedded zeros and need not be byte-oriented (though this may cause endianess issues).

    This function is mainly useful to convert (temporary) "const char *" pointers returned by C functions to Lua strings and store them or pass them to other functions expecting a Lua string. The Lua string is an (interned) copy of the data and bears no relation to the original data area anymore. Lua strings are 8 bit clean and may be used to hold arbitrary, non-character data.

    Performance notice: it's faster to pass the length of the string, if it's known. E.g. when the length is returned by a C call like sprintf().

    ffi.copy(dst, src, len)
    ffi.copy(dst, str)

    Copies the data pointed to by src to dst. dst is converted to a "void *" and src is converted to a "const void *".

    In the first syntax, len gives the number of bytes to copy. Caveat: if src is a Lua string, then len must not exceed #src+1.

    In the second syntax, the source of the copy must be a Lua string. All bytes of the string plus a zero-terminator are copied to dst (i.e. #src+1 bytes).

    Performance notice: ffi.copy() may be used as a faster (inlinable) replacement for the C library functions memcpy(), strcpy() and strncpy().

    ffi.fill(dst, len [,c])

    Fills the data pointed to by dst with len constant bytes, given by c. If c is omitted, the data is zero-filled.

    Performance notice: ffi.fill() may be used as a faster (inlinable) replacement for the C library function memset(dst, c, len). Please note the different order of arguments!

    Target-specific Information

    status = ffi.abi(param)

    Returns true if param (a Lua string) applies for the target ABI (Application Binary Interface). Returns false otherwise. The following parameters are currently defined:

    Parameter Description
    32bit32 bit architecture
    64bit64 bit architecture
    leLittle-endian architecture
    beBig-endian architecture
    fpuTarget has a hardware FPU
    softfpsoftfp calling conventions
    hardfphardfp calling conventions
    eabiEABI variant of the standard ABI
    winWindows variant of the standard ABI

    ffi.os

    Contains the target OS name. Same contents as jit.os.

    ffi.arch

    Contains the target architecture name. Same contents as jit.arch.

    Methods for Callbacks

    The C types for callbacks have some extra methods:

    cb:free()

    Free the resources associated with a callback. The associated Lua function is unanchored and may be garbage collected. The callback function pointer is no longer valid and must not be called anymore (it may be reused by a subsequently created callback).

    cb:set(func)

    Associate a new Lua function with a callback. The C type of the callback and the callback function pointer are unchanged.

    This method is useful to dynamically switch the receiver of callbacks without creating a new callback each time and registering it again (e.g. with a GUI library).

    Extended Standard Library Functions

    The following standard library functions have been extended to work with cdata objects:

    n = tonumber(cdata)

    Converts a number cdata object to a double and returns it as a Lua number. This is particularly useful for boxed 64 bit integer values. Caveat: this conversion may incur a precision loss.

    s = tostring(cdata)

    Returns a string representation of the value of 64 bit integers ("nnnLL" or "nnnULL") or complex numbers ("re±imi"). Otherwise returns a string representation of the C type of a ctype object ("ctype<type>") or a cdata object ("cdata<type>: address"), unless you override it with a __tostring metamethod (see ffi.metatype()).

    iter, obj, start = pairs(cdata)
    iter, obj, start = ipairs(cdata)

    Calls the __pairs or __ipairs metamethod of the corresponding ctype.

    Extensions to the Lua Parser

    The parser for Lua source code treats numeric literals with the suffixes LL or ULL as signed or unsigned 64 bit integers. Case doesn't matter, but uppercase is recommended for readability. It handles both decimal (42LL) and hexadecimal (0x2aLL) literals.

    The imaginary part of complex numbers can be specified by suffixing number literals with i or I, e.g. 12.5i. Caveat: you'll need to use 1i to get an imaginary part with the value one, since i itself still refers to a variable named i.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/install.html0000664000000000000000000005335712231715321022714 0ustar rootroot Installation

    LuaJIT is only distributed as a source package. This page explains how to build and install LuaJIT with different operating systems and C compilers.

    For the impatient (on POSIX systems):

    make && sudo make install
    

    LuaJIT currently builds out-of-the box on most systems. Here's the compatibility matrix for the supported combinations of operating systems, CPUs and compilers:

    CPU / OS Linux or
    Android
    *BSD, Other OSX 10.4+ or
    iOS 3.0+
    Windows
    XP/Vista/7
    x86 (32 bit) GCC 4.x
    GCC 3.4
    GCC 4.x
    GCC 3.4
    GCC 4.x
    GCC 3.4
    MSVC, MSVC/EE
    WinSDK
    MinGW, Cygwin
    x64 (64 bit) GCC 4.x   GCC 4.x MSVC + SDK v7.0
    WinSDK v7.0
    ARMv5+
    ARM9E+
    GCC 4.2+ GCC 4.2+ GCC 4.2+  
    PPC GCC 4.3+ GCC 4.3+
    GCC 4.1 (PS3)
      XEDK (Xbox 360)
    PPC/e500v2 GCC 4.3+ GCC 4.3+    
    MIPS GCC 4.3+ GCC 4.3+    

    Configuring LuaJIT

    The standard configuration should work fine for most installations. Usually there is no need to tweak the settings. The following files hold all user-configurable settings:

    • src/luaconf.h sets some configuration variables.
    • Makefile has settings for installing LuaJIT (POSIX only).
    • src/Makefile has settings for compiling LuaJIT under POSIX, MinGW or Cygwin.
    • src/msvcbuild.bat has settings for compiling LuaJIT with MSVC or WinSDK.

    Please read the instructions given in these files, before changing any settings.

    POSIX Systems (Linux, OSX, *BSD etc.)

    Prerequisites

    Depending on your distribution, you may need to install a package for GCC, the development headers and/or a complete SDK. E.g. on a current Debian/Ubuntu, install libc6-dev with the package manager.

    Download the current source package of LuaJIT (pick the .tar.gz), if you haven't already done so. Move it to a directory of your choice, open a terminal window and change to this directory. Now unpack the archive and change to the newly created directory:

    tar zxf LuaJIT-2.0.2.tar.gz
    cd LuaJIT-2.0.2

    Building LuaJIT

    The supplied Makefiles try to auto-detect the settings needed for your operating system and your compiler. They need to be run with GNU Make, which is probably the default on your system, anyway. Simply run:

    make
    

    This always builds a native x86, x64 or PPC binary, depending on the host OS you're running this command on. Check the section on cross-compilation for more options.

    By default, modules are only searched under the prefix /usr/local. You can add an extra prefix to the search paths by appending the PREFIX option, e.g.:

    make PREFIX=/home/myself/lj2
    

    Note for OSX: if the MACOSX_DEPLOYMENT_TARGET environment variable is not set, then it's forced to 10.4.

    Installing LuaJIT

    The top-level Makefile installs LuaJIT by default under /usr/local, i.e. the executable ends up in /usr/local/bin and so on. You need root privileges to write to this path. So, assuming sudo is installed on your system, run the following command and enter your sudo password:

    sudo make install
    

    Otherwise specify the directory prefix as an absolute path, e.g.:

    make install PREFIX=/home/myself/lj2
    

    Obviously the prefixes given during build and installation need to be the same.

    Windows Systems

    Prerequisites

    Either install one of the open source SDKs (» MinGW or » Cygwin), which come with a modified GCC plus the required development headers.

    Or install Microsoft's Visual C++ (MSVC). The freely downloadable » Express Edition works just fine, but only contains an x86 compiler.

    The freely downloadable » Windows SDK only comes with command line tools, but this is all you need to build LuaJIT. It contains x86 and x64 compilers.

    Next, download the source package and unpack it using an archive manager (e.g. the Windows Explorer) to a directory of your choice.

    Building with MSVC

    Open a "Visual Studio .NET Command Prompt", cd to the directory where you've unpacked the sources and run these commands:

    cd src
    msvcbuild
    

    Then follow the installation instructions below.

    Building with the Windows SDK

    Open a "Windows SDK Command Shell" and select the x86 compiler:

    setenv /release /x86
    

    Or select the x64 compiler:

    setenv /release /x64
    

    Then cd to the directory where you've unpacked the sources and run these commands:

    cd src
    msvcbuild
    

    Then follow the installation instructions below.

    Building with MinGW or Cygwin

    Open a command prompt window and make sure the MinGW or Cygwin programs are in your path. Then cd to the directory where you've unpacked the sources and run this command for MinGW:

    mingw32-make
    

    Or this command for Cygwin:

    make
    

    Then follow the installation instructions below.

    Installing LuaJIT

    Copy luajit.exe and lua51.dll (built in the src directory) to a newly created directory (any location is ok). Add lua and lua\jit directories below it and copy all Lua files from the src\jit directory of the distribution to the latter directory.

    There are no hardcoded absolute path names — all modules are loaded relative to the directory where luajit.exe is installed (see src/luaconf.h).

    Cross-compiling LuaJIT

    The GNU Makefile-based build system allows cross-compiling on any host for any supported target, as long as both architectures have the same pointer size. If you want to cross-compile to any 32 bit target on an x64 OS, you need to install the multilib development package (e.g. libc6-dev-i386 on Debian/Ubuntu) and build a 32 bit host part (HOST_CC="gcc -m32").

    You need to specify TARGET_SYS whenever the host OS and the target OS differ, or you'll get assembler or linker errors. E.g. if you're compiling on a Windows or OSX host for embedded Linux or Android, you need to add TARGET_SYS=Linux to the examples below. For a minimal target OS, you may need to disable the built-in allocator in src/Makefile and use TARGET_SYS=Other. The examples below only show some popular targets — please check the comments in src/Makefile for more details.

    # Cross-compile to a 32 bit binary on a multilib x64 OS
    make CC="gcc -m32"
    
    # Cross-compile on Debian/Ubuntu for Windows (mingw32 package)
    make HOST_CC="gcc -m32" CROSS=i586-mingw32msvc- TARGET_SYS=Windows
    

    The CROSS prefix allows specifying a standard GNU cross-compile toolchain (Binutils, GCC and a matching libc). The prefix may vary depending on the --target the toolchain was built for (note the CROSS prefix has a trailing "-"). The examples below use the canonical toolchain triplets for Linux.

    Since there's often no easy way to detect CPU features at runtime, it's important to compile with the proper CPU or architecture settings. You can specify these when building the toolchain yourself. Or add -mcpu=... or -march=... to TARGET_CFLAGS. For ARM it's important to have the correct -mfloat-abi=... setting, too. Otherwise LuaJIT may not run at the full performance of your target CPU.

    # ARM soft-float
    make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- \
         TARGET_CFLAGS="-mfloat-abi=soft"
    
    # ARM soft-float ABI with VFP (example for Cortex-A8)
    make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- \
         TARGET_CFLAGS="-mcpu=cortex-a8 -mfloat-abi=softfp"
    
    # ARM hard-float ABI with VFP (armhf, requires recent toolchain)
    make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf-
    
    # PPC
    make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu-
    # PPC/e500v2 (fast interpreter only)
    make HOST_CC="gcc -m32" CROSS=powerpc-e500v2-linux-gnuspe-
    
    # MIPS big-endian
    make HOST_CC="gcc -m32" CROSS=mips-linux-
    # MIPS little-endian
    make HOST_CC="gcc -m32" CROSS=mipsel-linux-
    

    You can cross-compile for Android using the » Android NDK. The environment variables need to match the install locations and the desired target platform. E.g. Android 4.0 corresponds to ABI level 14. For details check the folder docs in the NDK directory.

    Only a few common variations for the different CPUs, ABIs and platforms are listed. Please use your own judgement for which combination you want to build/deploy or which lowest common denominator you want to pick:

    # Android/ARM, armeabi (ARMv5TE soft-float), Android 2.2+ (Froyo)
    NDK=/opt/android/ndk
    NDKABI=8
    NDKVER=$NDK/toolchains/arm-linux-androideabi-4.6
    NDKP=$NDKVER/prebuilt/linux-x86/bin/arm-linux-androideabi-
    NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
    make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
    
    # Android/ARM, armeabi-v7a (ARMv7 VFP), Android 4.0+ (ICS)
    NDK=/opt/android/ndk
    NDKABI=14
    NDKVER=$NDK/toolchains/arm-linux-androideabi-4.6
    NDKP=$NDKVER/prebuilt/linux-x86/bin/arm-linux-androideabi-
    NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
    NDKARCH="-march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8"
    make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF $NDKARCH"
    
    # Android/MIPS, mips (MIPS32R1 hard-float), Android 4.0+ (ICS)
    NDK=/opt/android/ndk
    NDKABI=14
    NDKVER=$NDK/toolchains/mipsel-linux-android-4.6
    NDKP=$NDKVER/prebuilt/linux-x86/bin/mipsel-linux-android-
    NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-mips"
    make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
    
    # Android/x86, x86 (i686 SSE3), Android 4.0+ (ICS)
    NDK=/opt/android/ndk
    NDKABI=14
    NDKVER=$NDK/toolchains/x86-4.6
    NDKP=$NDKVER/prebuilt/linux-x86/bin/i686-linux-android-
    NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-x86"
    make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_FLAGS="$NDKF"
    

    You can cross-compile for iOS 3.0+ (iPhone/iPad) using the » iOS SDK. The environment variables need to match the iOS SDK version:

    Note: the JIT compiler is disabled for iOS, because regular iOS Apps are not allowed to generate code at runtime. You'll only get the performance of the LuaJIT interpreter on iOS. This is still faster than plain Lua, but much slower than the JIT compiler. Please complain to Apple, not me. Or use Android. :-p

    IXCODE=`xcode-select -print-path`
    ISDK=$IXCODE/Platforms/iPhoneOS.platform/Developer
    ISDKVER=iPhoneOS6.0.sdk
    ISDKP=$ISDK/usr/bin/
    ISDKF="-arch armv7 -isysroot $ISDK/SDKs/$ISDKVER"
    make HOST_CC="gcc -m32 -arch i386" CROSS=$ISDKP TARGET_FLAGS="$ISDKF" \
         TARGET_SYS=iOS
    

    You can cross-compile for PS3 using the PS3 SDK from a Linux host or a Windows host (requires 32 bit MinGW (GCC) on the host, too). Due to restrictions on consoles, the JIT compiler is disabled and only the fast interpreter is built:

    make HOST_CC="gcc -m32" CROSS=ppu-lv2-
    

    You can cross-compile for Xbox 360 using the Xbox 360 SDK (MSVC + XEDK). Due to restrictions on consoles, the JIT compiler is disabled and only the fast interpreter is built.

    Open a "Visual Studio .NET Command Prompt" (32 bit host compiler), cd to the directory where you've unpacked the sources and run the following commands. This builds a static library luajit20.lib, which can be linked against your game, just like the Lua library.

    cd src
    xedkbuild
    

    Embedding LuaJIT

    LuaJIT is API-compatible with Lua 5.1. If you've already embedded Lua into your application, you probably don't need to do anything to switch to LuaJIT, except link with a different library:

    • It's strongly suggested to build LuaJIT separately using the supplied build system. Please do not attempt to integrate the individual source files into your build tree. You'll most likely get the internal build dependencies wrong or mess up the compiler flags. Treat LuaJIT like any other external library and link your application with either the dynamic or static library, depending on your needs.
    • If you want to load C modules compiled for plain Lua with require(), you need to make sure the public symbols (e.g. lua_pushnumber) are exported, too:
      • On POSIX systems you can either link to the shared library or link the static library into your application. In the latter case you'll need to export all public symbols from your main executable (e.g. -Wl,-E on Linux) and add the external dependencies (e.g. -lm -ldl on Linux).
      • Since Windows symbols are bound to a specific DLL name, you need to link to the lua51.dll created by the LuaJIT build (do not rename the DLL). You may link LuaJIT statically on Windows only if you don't intend to load Lua/C modules at runtime.
    • If you're building a 64 bit application on OSX which links directly or indirectly against LuaJIT, you need to link your main executable with these flags:
      -pagezero_size 10000 -image_base 100000000
      
      Also, it's recommended to rebase all (self-compiled) shared libraries which are loaded at runtime on OSX/x64 (e.g. C extension modules for Lua). See: man rebase

    Additional hints for initializing LuaJIT using the C API functions:

    • Here's a » simple example for embedding Lua or LuaJIT into your application.
    • Make sure you use luaL_newstate. Avoid using lua_newstate, since this uses the (slower) default memory allocator from your system (no support for this on x64).
    • Make sure you use luaL_openlibs and not the old Lua 5.0 style of calling luaopen_base etc. directly.
    • To change or extend the list of standard libraries to load, copy src/lib_init.c to your project and modify it accordingly. Make sure the jit library is loaded or the JIT compiler will not be activated.
    • The bit.* module for bitwise operations is already built-in. There's no need to statically link » Lua BitOp to your application.

    Hints for Distribution Maintainers

    The LuaJIT build system has extra provisions for the needs of most POSIX-based distributions. If you're a package maintainer for a distribution, please make use of these features and avoid patching, subverting, autotoolizing or messing up the build system in unspeakable ways.

    There should be absolutely no need to patch luaconf.h or any of the Makefiles. And please do not hand-pick files for your packages — simply use whatever make install creates. There's a reason for all of the files and directories it creates.

    The build system uses GNU make and auto-detects most settings based on the host you're building it on. This should work fine for native builds, even when sandboxed. You may need to pass some of the following flags to both the make and the make install command lines for a regular distribution build:

    • PREFIX overrides the installation path and should usually be set to /usr. Setting this also changes the module paths and the paths needed to locate the shared library.
    • DESTDIR is an absolute path which allows you to install to a shadow tree instead of the root tree of the build system.
    • MULTILIB sets the architecture-specific library path component for multilib systems. The default is lib.
    • Have a look at the top-level Makefile and src/Makefile for additional variables to tweak. The following variables may be overridden, but it's not recommended, except for special needs like cross-builds: BUILDMODE, CC, HOST_CC, STATIC_CC, DYNAMIC_CC, CFLAGS, HOST_CFLAGS, TARGET_CFLAGS, LDFLAGS, HOST_LDFLAGS, TARGET_LDFLAGS, TARGET_SHLDFLAGS, TARGET_FLAGS, LIBS, HOST_LIBS, TARGET_LIBS, CROSS, HOST_SYS, TARGET_SYS

    The build system has a special target for an amalgamated build, i.e. make amalg. This compiles the LuaJIT core as one huge C file and allows GCC to generate faster and shorter code. Alas, this requires lots of memory during the build. This may be a problem for some users, that's why it's not enabled by default. But it shouldn't be a problem for most build farms. It's recommended that binary distributions use this target for their LuaJIT builds.

    The tl;dr version of the above:

    make amalg PREFIX=/usr && \
    make install PREFIX=/usr DESTDIR=/tmp/buildroot
    

    Finally, if you encounter any difficulties, please contact me first, instead of releasing a broken package onto unsuspecting users. Because they'll usually gonna complain to me (the upstream) and not you (the package maintainer), anyway.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/ext_jit.html0000664000000000000000000001327512202141143022700 0ustar rootroot jit.* Library

    The functions in this built-in module control the behavior of the JIT compiler engine. Note that JIT-compilation is fully automatic — you probably won't need to use any of the following functions unless you have special needs.

    jit.on()
    jit.off()

    Turns the whole JIT compiler on (default) or off.

    These functions are typically used with the command line options -j on or -j off.

    jit.flush()

    Flushes the whole cache of compiled code.

    jit.on(func|true [,true|false])
    jit.off(func|true [,true|false])
    jit.flush(func|true [,true|false])

    jit.on enables JIT compilation for a Lua function (this is the default).

    jit.off disables JIT compilation for a Lua function and flushes any already compiled code from the code cache.

    jit.flush flushes the code, but doesn't affect the enable/disable status.

    The current function, i.e. the Lua function calling this library function, can also be specified by passing true as the first argument.

    If the second argument is true, JIT compilation is also enabled, disabled or flushed recursively for all sub-functions of a function. With false only the sub-functions are affected.

    The jit.on and jit.off functions only set a flag which is checked when the function is about to be compiled. They do not trigger immediate compilation.

    Typical usage is jit.off(true, true) in the main chunk of a module to turn off JIT compilation for the whole module for debugging purposes.

    jit.flush(tr)

    Flushes the root trace, specified by its number, and all of its side traces from the cache. The code for the trace will be retained as long as there are any other traces which link to it.

    status, ... = jit.status()

    Returns the current status of the JIT compiler. The first result is either true or false if the JIT compiler is turned on or off. The remaining results are strings for CPU-specific features and enabled optimizations.

    jit.version

    Contains the LuaJIT version string.

    jit.version_num

    Contains the version number of the LuaJIT core. Version xx.yy.zz is represented by the decimal number xxyyzz.

    jit.os

    Contains the target OS name: "Windows", "Linux", "OSX", "BSD", "POSIX" or "Other".

    jit.arch

    Contains the target architecture name: "x86", "x64" or "ppcspe".

    jit.opt.* — JIT compiler optimization control

    This sub-module provides the backend for the -O command line option.

    You can also use it programmatically, e.g.:

    jit.opt.start(2) -- same as -O2
    jit.opt.start("-dce")
    jit.opt.start("hotloop=10", "hotexit=2")
    

    Unlike in LuaJIT 1.x, the module is built-in and optimization is turned on by default! It's no longer necessary to run require("jit.opt").start(), which was one of the ways to enable optimization.

    jit.util.* — JIT compiler introspection

    This sub-module holds functions to introspect the bytecode, generated traces, the IR and the generated machine code. The functionality provided by this module is still in flux and therefore undocumented.

    The debug modules -jbc, -jv and -jdump make extensive use of these functions. Please check out their source code, if you want to know more.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/extensions.html0000664000000000000000000003560012202141143023425 0ustar rootroot Extensions

    LuaJIT is fully upwards-compatible with Lua 5.1. It supports all » standard Lua library functions and the full set of » Lua/C API functions.

    LuaJIT is also fully ABI-compatible to Lua 5.1 at the linker/dynamic loader level. This means you can compile a C module against the standard Lua headers and load the same shared library from either Lua or LuaJIT.

    LuaJIT extends the standard Lua VM with new functionality and adds several extension modules. Please note this page is only about functional enhancements and not about performance enhancements, such as the optimized VM, the faster interpreter or the JIT compiler.

    Extensions Modules

    LuaJIT comes with several built-in extension modules:

    bit.* — Bitwise operations

    LuaJIT supports all bitwise operations as defined by » Lua BitOp:

    bit.tobit  bit.tohex  bit.bnot    bit.band bit.bor  bit.bxor
    bit.lshift bit.rshift bit.arshift bit.rol  bit.ror  bit.bswap
    

    This module is a LuaJIT built-in — you don't need to download or install Lua BitOp. The Lua BitOp site has full documentation for all » Lua BitOp API functions.

    Please make sure to require the module before using any of its functions:

    local bit = require("bit")
    

    An already installed Lua BitOp module is ignored by LuaJIT. This way you can use bit operations from both Lua and LuaJIT on a shared installation.

    ffi.* — FFI library

    The FFI library allows calling external C functions and the use of C data structures from pure Lua code.

    jit.* — JIT compiler control

    The functions in this module control the behavior of the JIT compiler engine.

    C API extensions

    LuaJIT adds some extra functions to the Lua/C API.

    Enhanced Standard Library Functions

    xpcall(f, err [,args...]) passes arguments

    Unlike the standard implementation in Lua 5.1, xpcall() passes any arguments after the error function to the function which is called in a protected context.

    loadfile() etc. handle UTF-8 source code

    Non-ASCII characters are handled transparently by the Lua source code parser. This allows the use of UTF-8 characters in identifiers and strings. A UTF-8 BOM is skipped at the start of the source code.

    tostring() etc. canonicalize NaN and ±Inf

    All number-to-string conversions consistently convert non-finite numbers to the same strings on all platforms. NaN results in "nan", positive infinity results in "inf" and negative infinity results in "-inf".

    tonumber() etc. use builtin string to number conversion

    All string-to-number conversions consistently convert integer and floating-point inputs in decimal and hexadecimal on all platforms. strtod() is not used anymore, which avoids numerous problems with poor C library implementations. The builtin conversion function provides full precision according to the IEEE-754 standard, it works independently of the current locale and it supports hex floating-point numbers (e.g. 0x1.5p-3).

    string.dump(f [,strip]) generates portable bytecode

    An extra argument has been added to string.dump(). If set to true, 'stripped' bytecode without debug information is generated. This speeds up later bytecode loading and reduces memory usage. See also the -b command line option.

    The generated bytecode is portable and can be loaded on any architecture that LuaJIT supports, independent of word size or endianess. However the bytecode compatibility versions must match. Bytecode stays compatible for dot releases (x.y.0 → x.y.1), but may change with major or minor releases (2.0 → 2.1) or between any beta release. Foreign bytecode (e.g. from Lua 5.1) is incompatible and cannot be loaded.

    Enhanced PRNG for math.random()

    LuaJIT uses a Tausworthe PRNG with period 2^223 to implement math.random() and math.randomseed(). The quality of the PRNG results is much superior compared to the standard Lua implementation which uses the platform-specific ANSI rand().

    The PRNG generates the same sequences from the same seeds on all platforms and makes use of all bits in the seed argument. math.random() without arguments generates 52 pseudo-random bits for every call. The result is uniformly distributed between 0.0 and 1.0. It's correctly scaled up and rounded for math.random(n [,m]) to preserve uniformity.

    io.* functions handle 64 bit file offsets

    The file I/O functions in the standard io.* library handle 64 bit file offsets. In particular this means it's possible to open files larger than 2 Gigabytes and to reposition or obtain the current file position for offsets beyond 2 GB (fp:seek() method).

    debug.* functions identify metamethods

    debug.getinfo() and lua_getinfo() also return information about invoked metamethods. The namewhat field is set to "metamethod" and the name field has the name of the corresponding metamethod (e.g. "__index").

    Fully Resumable VM

    The LuaJIT VM is fully resumable. This means you can yield from a coroutine even across contexts, where this would not possible with the standard Lua 5.1 VM: e.g. you can yield across pcall() and xpcall(), across iterators and across metamethods.

    Extensions from Lua 5.2

    LuaJIT supports some language and library extensions from Lua 5.2. Features that are unlikely to break existing code are unconditionally enabled:

    • goto and ::labels::.
    • Hex escapes '\x3F' and '\*' escape in strings.
    • load(string|reader [, chunkname [,mode [,env]]]).
    • loadstring() is an alias for load().
    • loadfile(filename [,mode [,env]]).
    • math.log(x [,base]).
    • string.rep(s, n [,sep]).
    • string.format(): %q reversible. %s checks __tostring. %a and "%A added.
    • String matching pattern %g added.
    • io.read("*L").
    • io.lines() and file:lines() process io.read() options.
    • os.exit(status|true|false [,close]).
    • package.searchpath(name, path [, sep [, rep]]).
    • package.loadlib(name, "*").
    • debug.getinfo() returns nparams and isvararg for option "u".
    • debug.getlocal() accepts function instead of level.
    • debug.getlocal() and debug.setlocal() accept negative indexes for varargs.
    • debug.getupvalue() and debug.setupvalue() handle C functions.
    • debug.upvalueid() and debug.upvaluejoin().
    • Command line option -E.
    • Command line checks __tostring for errors.

    Other features are only enabled, if LuaJIT is built with -DLUAJIT_ENABLE_LUA52COMPAT:

    • goto is a keyword and not a valid variable name anymore.
    • break can be placed anywhere. Empty statements (;;) are allowed.
    • __lt, __le are invoked for mixed types.
    • __len for tables. rawlen() library function.
    • pairs() and ipairs() check for __pairs and __ipairs.
    • coroutine.running() returns two results.
    • table.pack() and table.unpack() (same as unpack()).
    • io.write() and file:write() return file handle instead of true.
    • os.execute() and pipe:close() return detailed exit status.
    • debug.setmetatable() returns object.
    • debug.getuservalue() and debug.setuservalue().
    • Remove math.mod(), string.gfind().

    Note: this provides only partial compatibility with Lua 5.2 at the language and Lua library level. LuaJIT is API+ABI-compatible with Lua 5.1, which prevents implementing features that would otherwise break the Lua/C API and ABI (e.g. _ENV).

    C++ Exception Interoperability

    LuaJIT has built-in support for interoperating with C++ exceptions. The available range of features depends on the target platform and the toolchain used to compile LuaJIT:

    Platform Compiler Interoperability
    POSIX/x64, DWARF2 unwinding GCC 4.3+ Full
    Other platforms, DWARF2 unwinding GCC Limited
    Windows/x64 MSVC or WinSDK Full
    Windows/x86 Any No
    Other platforms Other compilers No

    Full interoperability means:

    • C++ exceptions can be caught on the Lua side with pcall(), lua_pcall() etc.
    • C++ exceptions will be converted to the generic Lua error "C++ exception", unless you use the C call wrapper feature.
    • It's safe to throw C++ exceptions across non-protected Lua frames on the C stack. The contents of the C++ exception object pass through unmodified.
    • Lua errors can be caught on the C++ side with catch(...). The corresponding Lua error message can be retrieved from the Lua stack.
    • Throwing Lua errors across C++ frames is safe. C++ destructors will be called.

    Limited interoperability means:

    • C++ exceptions can be caught on the Lua side with pcall(), lua_pcall() etc.
    • C++ exceptions will be converted to the generic Lua error "C++ exception", unless you use the C call wrapper feature.
    • C++ exceptions will be caught by non-protected Lua frames and are rethrown as a generic Lua error. The C++ exception object will be destroyed.
    • Lua errors cannot be caught on the C++ side.
    • Throwing Lua errors across C++ frames will not call C++ destructors.

    No interoperability means:

    • It's not safe to throw C++ exceptions across Lua frames.
    • C++ exceptions cannot be caught on the Lua side.
    • Lua errors cannot be caught on the C++ side.
    • Throwing Lua errors across C++ frames will not call C++ destructors.
    • Additionally, on Windows/x86 with SEH-based C++ exceptions: it's not safe to throw a Lua error across any frames containing a C++ function with any try/catch construct or using variables with (implicit) destructors. This also applies to any functions which may be inlined in such a function. It doesn't matter whether lua_error() is called inside or outside of a try/catch or whether any object actually needs to be destroyed: the SEH chain is corrupted and this will eventually lead to the termination of the process.

    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/bluequad-print.css0000664000000000000000000000472212202141143024007 0ustar rootroot/* Copyright (C) 2004-2013 Mike Pall. * * You are welcome to use the general ideas of this design for your own sites. * But please do not steal the stylesheet, the layout or the color scheme. */ body { font-family: serif; font-size: 11pt; margin: 0 3em; padding: 0; border: none; } a:link, a:visited, a:hover, a:active { text-decoration: none; background: transparent; color: #0000ff; } h1, h2, h3 { font-family: sans-serif; font-weight: bold; text-align: left; margin: 0.5em 0; padding: 0; } h1 { font-size: 200%; } h2 { font-size: 150%; } h3 { font-size: 125%; } p { margin: 0 0 0.5em 0; padding: 0; } ul, ol { margin: 0.5em 0; padding: 0 0 0 2em; } ul { list-style: outside square; } ol { list-style: outside decimal; } li { margin: 0; padding: 0; } dl { margin: 1em 0; padding: 1em; border: 1px solid black; } dt { font-weight: bold; margin: 0; padding: 0; } dt sup { float: right; margin-left: 1em; } dd { margin: 0.5em 0 0 2em; padding: 0; } table { table-layout: fixed; width: 100%; margin: 1em 0; padding: 0; border: 1px solid black; border-spacing: 0; border-collapse: collapse; } tr { margin: 0; padding: 0; border: none; } td { text-align: left; margin: 0; padding: 0.2em 0.5em; border-top: 1px solid black; border-bottom: 1px solid black; } tr.separate td { border-top: double; } tt, pre, code, kbd, samp { font-family: monospace; font-size: 75%; } kbd { font-weight: bolder; } blockquote, pre { margin: 1em 2em; padding: 0; } img { border: none; vertical-align: baseline; margin: 0; padding: 0; } img.left { float: left; margin: 0.5em 1em 0.5em 0; } img.right { float: right; margin: 0.5em 0 0.5em 1em; } .flush { clear: both; visibility: hidden; } .hide, .noprint, #nav { display: none !important; } .pagebreak { page-break-before: always; } #site { text-align: right; font-family: sans-serif; font-weight: bold; margin: 0 1em; border-bottom: 1pt solid black; } #site a { font-size: 1.2em; } #site a:link, #site a:visited { text-decoration: none; font-weight: bold; background: transparent; color: #ffffff; } #logo { color: #ff8000; } #head { clear: both; margin: 0 1em; } #main { line-height: 1.3; text-align: justify; margin: 1em; } #foot { clear: both; font-size: 80%; text-align: center; margin: 0 1.25em; padding: 0.5em 0 0 0; border-top: 1pt solid black; page-break-before: avoid; page-break-after: avoid; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/contact.html0000664000000000000000000000531212202141143022656 0ustar rootroot Contact

    Please send general questions to the » LuaJIT mailing list. You can also send any questions you have directly to me:

    Copyright

    All documentation is Copyright © 2005-2013 Mike Pall.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/doc/status.html0000664000000000000000000000747412202141143022561 0ustar rootroot Status & Roadmap

    LuaJIT 2.0 is the current stable branch. This branch is in feature-freeze — new features will only be added to LuaJIT 2.1.

    Current Status

    LuaJIT ought to run all Lua 5.1-compatible source code just fine. It's considered a serious bug if the VM crashes or produces unexpected results — please report this.

    Known incompatibilities and issues in LuaJIT 2.0:

    • There are some differences in implementation-defined behavior. These either have a good reason, are arbitrary design choices or are due to quirks in the VM. The latter cases may get fixed if a demonstrable need is shown.
    • The Lua debug API is missing a couple of features (return hooks for non-Lua functions) and shows slightly different behavior in LuaJIT (no per-coroutine hooks, no tail call counting).
    • Some checks are missing in the JIT-compiled code for obscure situations with open upvalues aliasing one of the SSA slots later on (or vice versa). Bonus points, if you can find a real world test case for this.
    • Currently some out-of-memory errors from on-trace code are not handled correctly. The error may fall through an on-trace pcall or it may be passed on to the function set with lua_atpanic on x64. This issue will be fixed with the new garbage collector.

    Roadmap

    Please refer to the » LuaJIT Roadmap 2012/2013 and an » update on release planning for details.


    tarantool-1.5.1.218.g1a69fd6/third_party/luajit/.gitignore0000664000000000000000000000010712202141143021555 0ustar rootroot*.[oa] *.so *.obj *.lib *.exp *.dll *.exe *.manifest *.dmp *.swp .tags tarantool-1.5.1.218.g1a69fd6/third_party/luajit/COPYRIGHT0000664000000000000000000000556412202141143021074 0ustar rootroot=============================================================================== LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/ Copyright (C) 2005-2013 Mike Pall. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [ MIT license: http://www.opensource.org/licenses/mit-license.php ] =============================================================================== [ LuaJIT includes code from Lua 5.1/5.2, which has this license statement: ] Copyright (C) 1994-2012 Lua.org, PUC-Rio. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =============================================================================== [ LuaJIT includes code from dlmalloc, which has this license statement: ] This is a version (aka dlmalloc) of malloc/free/realloc written by Doug Lea and released to the public domain, as explained at http://creativecommons.org/licenses/publicdomain =============================================================================== tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/0000775000000000000000000000000012231715321021071 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_x64.lua0000664000000000000000000000107012202141143023210 0ustar rootroot------------------------------------------------------------------------------ -- DynASM x64 module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- This module just sets 64 bit mode for the combined x86/x64 module. -- All the interesting stuff is there. ------------------------------------------------------------------------------ x64 = true -- Using a global is an ugly, but effective solution. return require("dasm_x86") tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_ppc.h0000664000000000000000000002751612202141143023034 0ustar rootroot/* ** DynASM PPC encoding engine. ** Copyright (C) 2005-2013 Mike Pall. All rights reserved. ** Released under the MIT license. See dynasm.lua for full copyright notice. */ #include #include #include #include #define DASM_ARCH "ppc" #ifndef DASM_EXTERN #define DASM_EXTERN(a,b,c,d) 0 #endif /* Action definitions. */ enum { DASM_STOP, DASM_SECTION, DASM_ESC, DASM_REL_EXT, /* The following actions need a buffer position. */ DASM_ALIGN, DASM_REL_LG, DASM_LABEL_LG, /* The following actions also have an argument. */ DASM_REL_PC, DASM_LABEL_PC, DASM_IMM, DASM__MAX }; /* Maximum number of section buffer positions for a single dasm_put() call. */ #define DASM_MAXSECPOS 25 /* DynASM encoder status codes. Action list offset or number are or'ed in. */ #define DASM_S_OK 0x00000000 #define DASM_S_NOMEM 0x01000000 #define DASM_S_PHASE 0x02000000 #define DASM_S_MATCH_SEC 0x03000000 #define DASM_S_RANGE_I 0x11000000 #define DASM_S_RANGE_SEC 0x12000000 #define DASM_S_RANGE_LG 0x13000000 #define DASM_S_RANGE_PC 0x14000000 #define DASM_S_RANGE_REL 0x15000000 #define DASM_S_UNDEF_LG 0x21000000 #define DASM_S_UNDEF_PC 0x22000000 /* Macros to convert positions (8 bit section + 24 bit index). */ #define DASM_POS2IDX(pos) ((pos)&0x00ffffff) #define DASM_POS2BIAS(pos) ((pos)&0xff000000) #define DASM_SEC2POS(sec) ((sec)<<24) #define DASM_POS2SEC(pos) ((pos)>>24) #define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) /* Action list type. */ typedef const unsigned int *dasm_ActList; /* Per-section structure. */ typedef struct dasm_Section { int *rbuf; /* Biased buffer pointer (negative section bias). */ int *buf; /* True buffer pointer. */ size_t bsize; /* Buffer size in bytes. */ int pos; /* Biased buffer position. */ int epos; /* End of biased buffer position - max single put. */ int ofs; /* Byte offset into section. */ } dasm_Section; /* Core structure holding the DynASM encoding state. */ struct dasm_State { size_t psize; /* Allocated size of this structure. */ dasm_ActList actionlist; /* Current actionlist pointer. */ int *lglabels; /* Local/global chain/pos ptrs. */ size_t lgsize; int *pclabels; /* PC label chains/pos ptrs. */ size_t pcsize; void **globals; /* Array of globals (bias -10). */ dasm_Section *section; /* Pointer to active section. */ size_t codesize; /* Total size of all code sections. */ int maxsection; /* 0 <= sectionidx < maxsection. */ int status; /* Status code. */ dasm_Section sections[1]; /* All sections. Alloc-extended. */ }; /* The size of the core structure depends on the max. number of sections. */ #define DASM_PSZ(ms) (sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section)) /* Initialize DynASM state. */ void dasm_init(Dst_DECL, int maxsection) { dasm_State *D; size_t psz = 0; int i; Dst_REF = NULL; DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection)); D = Dst_REF; D->psize = psz; D->lglabels = NULL; D->lgsize = 0; D->pclabels = NULL; D->pcsize = 0; D->globals = NULL; D->maxsection = maxsection; for (i = 0; i < maxsection; i++) { D->sections[i].buf = NULL; /* Need this for pass3. */ D->sections[i].rbuf = D->sections[i].buf - DASM_SEC2POS(i); D->sections[i].bsize = 0; D->sections[i].epos = 0; /* Wrong, but is recalculated after resize. */ } } /* Free DynASM state. */ void dasm_free(Dst_DECL) { dasm_State *D = Dst_REF; int i; for (i = 0; i < D->maxsection; i++) if (D->sections[i].buf) DASM_M_FREE(Dst, D->sections[i].buf, D->sections[i].bsize); if (D->pclabels) DASM_M_FREE(Dst, D->pclabels, D->pcsize); if (D->lglabels) DASM_M_FREE(Dst, D->lglabels, D->lgsize); DASM_M_FREE(Dst, D, D->psize); } /* Setup global label array. Must be called before dasm_setup(). */ void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl) { dasm_State *D = Dst_REF; D->globals = gl - 10; /* Negative bias to compensate for locals. */ DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int)); } /* Grow PC label array. Can be called after dasm_setup(), too. */ void dasm_growpc(Dst_DECL, unsigned int maxpc) { dasm_State *D = Dst_REF; size_t osz = D->pcsize; DASM_M_GROW(Dst, int, D->pclabels, D->pcsize, maxpc*sizeof(int)); memset((void *)(((unsigned char *)D->pclabels)+osz), 0, D->pcsize-osz); } /* Setup encoder. */ void dasm_setup(Dst_DECL, const void *actionlist) { dasm_State *D = Dst_REF; int i; D->actionlist = (dasm_ActList)actionlist; D->status = DASM_S_OK; D->section = &D->sections[0]; memset((void *)D->lglabels, 0, D->lgsize); if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); D->sections[i].ofs = 0; } } #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) { \ D->status = DASM_S_##st|(p-D->actionlist-1); return; } } while (0) #define CKPL(kind, st) \ do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ D->status = DASM_S_RANGE_##st|(p-D->actionlist-1); return; } } while (0) #else #define CK(x, st) ((void)0) #define CKPL(kind, st) ((void)0) #endif /* Pass 1: Store actions and args, link branches/labels, estimate offsets. */ void dasm_put(Dst_DECL, int start, ...) { va_list ap; dasm_State *D = Dst_REF; dasm_ActList p = D->actionlist + start; dasm_Section *sec = D->section; int pos = sec->pos, ofs = sec->ofs; int *b; if (pos >= sec->epos) { DASM_M_GROW(Dst, int, sec->buf, sec->bsize, sec->bsize + 2*DASM_MAXSECPOS*sizeof(int)); sec->rbuf = sec->buf - DASM_POS2BIAS(pos); sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); } b = sec->rbuf; b[pos++] = start; va_start(ap, start); while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16); if (action >= DASM__MAX) { ofs += 4; } else { int *pl, n = action >= DASM_REL_PC ? va_arg(ap, int) : 0; switch (action) { case DASM_STOP: goto stop; case DASM_SECTION: n = (ins & 255); CK(n < D->maxsection, RANGE_SEC); D->section = &D->sections[n]; goto stop; case DASM_ESC: p++; ofs += 4; break; case DASM_REL_EXT: break; case DASM_ALIGN: ofs += (ins & 255); b[pos++] = ofs; break; case DASM_REL_LG: n = (ins & 2047) - 10; pl = D->lglabels + n; /* Bkwd rel or global. */ if (n >= 0) { CK(n>=10||*pl<0, RANGE_LG); CKPL(lg, LG); goto putrel; } pl += 10; n = *pl; if (n < 0) n = 0; /* Start new chain for fwd rel if label exists. */ goto linkrel; case DASM_REL_PC: pl = D->pclabels + n; CKPL(pc, PC); putrel: n = *pl; if (n < 0) { /* Label exists. Get label pos and store it. */ b[pos] = -n; } else { linkrel: b[pos] = n; /* Else link to rel chain, anchored at label. */ *pl = pos; } pos++; break; case DASM_LABEL_LG: pl = D->lglabels + (ins & 2047) - 10; CKPL(lg, LG); goto putlabel; case DASM_LABEL_PC: pl = D->pclabels + n; CKPL(pc, PC); putlabel: n = *pl; /* n > 0: Collapse rel chain and replace with label pos. */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; } *pl = -pos; /* Label exists now. */ b[pos++] = ofs; /* Store pass1 offset estimate. */ break; case DASM_IMM: #ifdef DASM_CHECKS CK((n & ((1<<((ins>>10)&31))-1)) == 0, RANGE_I); #endif n >>= ((ins>>10)&31); #ifdef DASM_CHECKS if (ins & 0x8000) CK(((n + (1<<(((ins>>5)&31)-1)))>>((ins>>5)&31)) == 0, RANGE_I); else CK((n>>((ins>>5)&31)) == 0, RANGE_I); #endif b[pos++] = n; break; } } } stop: va_end(ap); sec->pos = pos; sec->ofs = ofs; } #undef CK /* Pass 2: Link sections, shrink aligns, fix label offsets. */ int dasm_link(Dst_DECL, size_t *szp) { dasm_State *D = Dst_REF; int secnum; int ofs = 0; #ifdef DASM_CHECKS *szp = 0; if (D->status != DASM_S_OK) return D->status; { int pc; for (pc = 0; pc*sizeof(int) < D->pcsize; pc++) if (D->pclabels[pc] > 0) return DASM_S_UNDEF_PC|pc; } #endif { /* Handle globals not defined in this translation unit. */ int idx; for (idx = 20; idx*sizeof(int) < D->lgsize; idx++) { int n = D->lglabels[idx]; /* Undefined label: Collapse rel chain and replace with marker (< 0). */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = -idx; } } } /* Combine all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->rbuf; int pos = DASM_SEC2POS(secnum); int lastpos = sec->pos; while (pos != lastpos) { dasm_ActList p = D->actionlist + b[pos++]; while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16); switch (action) { case DASM_STOP: case DASM_SECTION: goto stop; case DASM_ESC: p++; break; case DASM_REL_EXT: break; case DASM_ALIGN: ofs -= (b[pos++] + ofs) & (ins & 255); break; case DASM_REL_LG: case DASM_REL_PC: pos++; break; case DASM_LABEL_LG: case DASM_LABEL_PC: b[pos++] += ofs; break; case DASM_IMM: pos++; break; } } stop: (void)0; } ofs += sec->ofs; /* Next section starts right after current section. */ } D->codesize = ofs; /* Total size of all code sections */ *szp = ofs; return DASM_S_OK; } #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) return DASM_S_##st|(p-D->actionlist-1); } while (0) #else #define CK(x, st) ((void)0) #endif /* Pass 3: Encode sections. */ int dasm_encode(Dst_DECL, void *buffer) { dasm_State *D = Dst_REF; char *base = (char *)buffer; unsigned int *cp = (unsigned int *)buffer; int secnum; /* Encode all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->buf; int *endb = sec->rbuf + sec->pos; while (b != endb) { dasm_ActList p = D->actionlist + *b++; while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16); int n = (action >= DASM_ALIGN && action < DASM__MAX) ? *b++ : 0; switch (action) { case DASM_STOP: case DASM_SECTION: goto stop; case DASM_ESC: *cp++ = *p++; break; case DASM_REL_EXT: n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins & 2047), 1) - 4; goto patchrel; case DASM_ALIGN: ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0x60000000; break; case DASM_REL_LG: CK(n >= 0, UNDEF_LG); case DASM_REL_PC: CK(n >= 0, UNDEF_PC); n = *DASM_POS2PTR(D, n) - (int)((char *)cp - base); patchrel: CK((n & 3) == 0 && (((n+4) + ((ins & 2048) ? 0x00008000 : 0x02000000)) >> ((ins & 2048) ? 16 : 26)) == 0, RANGE_REL); cp[-1] |= ((n+4) & ((ins & 2048) ? 0x0000fffc: 0x03fffffc)); break; case DASM_LABEL_LG: ins &= 2047; if (ins >= 20) D->globals[ins-10] = (void *)(base + n); break; case DASM_LABEL_PC: break; case DASM_IMM: cp[-1] |= (n & ((1<<((ins>>5)&31))-1)) << (ins&31); break; default: *cp++ = ins; break; } } stop: (void)0; } } if (base + D->codesize != (char *)cp) /* Check for phase errors. */ return DASM_S_PHASE; return DASM_S_OK; } #undef CK /* Get PC label offset. */ int dasm_getpclabel(Dst_DECL, unsigned int pc) { dasm_State *D = Dst_REF; if (pc*sizeof(int) < D->pcsize) { int pos = D->pclabels[pc]; if (pos < 0) return *DASM_POS2PTR(D, -pos); if (pos > 0) return -1; /* Undefined. */ } return -2; /* Unused or out of range. */ } #ifdef DASM_CHECKS /* Optional sanity checker to call between isolated encoding steps. */ int dasm_checkstep(Dst_DECL, int secmatch) { dasm_State *D = Dst_REF; if (D->status == DASM_S_OK) { int i; for (i = 1; i <= 9; i++) { if (D->lglabels[i] > 0) { D->status = DASM_S_UNDEF_LG|i; break; } D->lglabels[i] = 0; } } if (D->status == DASM_S_OK && secmatch >= 0 && D->section != &D->sections[secmatch]) D->status = DASM_S_MATCH_SEC|(D->section-D->sections); return D->status; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_x86.h0000664000000000000000000003571512202141143022677 0ustar rootroot/* ** DynASM x86 encoding engine. ** Copyright (C) 2005-2013 Mike Pall. All rights reserved. ** Released under the MIT license. See dynasm.lua for full copyright notice. */ #include #include #include #include #define DASM_ARCH "x86" #ifndef DASM_EXTERN #define DASM_EXTERN(a,b,c,d) 0 #endif /* Action definitions. DASM_STOP must be 255. */ enum { DASM_DISP = 233, DASM_IMM_S, DASM_IMM_B, DASM_IMM_W, DASM_IMM_D, DASM_IMM_WB, DASM_IMM_DB, DASM_VREG, DASM_SPACE, DASM_SETLABEL, DASM_REL_A, DASM_REL_LG, DASM_REL_PC, DASM_IMM_LG, DASM_IMM_PC, DASM_LABEL_LG, DASM_LABEL_PC, DASM_ALIGN, DASM_EXTERN, DASM_ESC, DASM_MARK, DASM_SECTION, DASM_STOP }; /* Maximum number of section buffer positions for a single dasm_put() call. */ #define DASM_MAXSECPOS 25 /* DynASM encoder status codes. Action list offset or number are or'ed in. */ #define DASM_S_OK 0x00000000 #define DASM_S_NOMEM 0x01000000 #define DASM_S_PHASE 0x02000000 #define DASM_S_MATCH_SEC 0x03000000 #define DASM_S_RANGE_I 0x11000000 #define DASM_S_RANGE_SEC 0x12000000 #define DASM_S_RANGE_LG 0x13000000 #define DASM_S_RANGE_PC 0x14000000 #define DASM_S_RANGE_VREG 0x15000000 #define DASM_S_UNDEF_L 0x21000000 #define DASM_S_UNDEF_PC 0x22000000 /* Macros to convert positions (8 bit section + 24 bit index). */ #define DASM_POS2IDX(pos) ((pos)&0x00ffffff) #define DASM_POS2BIAS(pos) ((pos)&0xff000000) #define DASM_SEC2POS(sec) ((sec)<<24) #define DASM_POS2SEC(pos) ((pos)>>24) #define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) /* Action list type. */ typedef const unsigned char *dasm_ActList; /* Per-section structure. */ typedef struct dasm_Section { int *rbuf; /* Biased buffer pointer (negative section bias). */ int *buf; /* True buffer pointer. */ size_t bsize; /* Buffer size in bytes. */ int pos; /* Biased buffer position. */ int epos; /* End of biased buffer position - max single put. */ int ofs; /* Byte offset into section. */ } dasm_Section; /* Core structure holding the DynASM encoding state. */ struct dasm_State { size_t psize; /* Allocated size of this structure. */ dasm_ActList actionlist; /* Current actionlist pointer. */ int *lglabels; /* Local/global chain/pos ptrs. */ size_t lgsize; int *pclabels; /* PC label chains/pos ptrs. */ size_t pcsize; void **globals; /* Array of globals (bias -10). */ dasm_Section *section; /* Pointer to active section. */ size_t codesize; /* Total size of all code sections. */ int maxsection; /* 0 <= sectionidx < maxsection. */ int status; /* Status code. */ dasm_Section sections[1]; /* All sections. Alloc-extended. */ }; /* The size of the core structure depends on the max. number of sections. */ #define DASM_PSZ(ms) (sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section)) /* Initialize DynASM state. */ void dasm_init(Dst_DECL, int maxsection) { dasm_State *D; size_t psz = 0; int i; Dst_REF = NULL; DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection)); D = Dst_REF; D->psize = psz; D->lglabels = NULL; D->lgsize = 0; D->pclabels = NULL; D->pcsize = 0; D->globals = NULL; D->maxsection = maxsection; for (i = 0; i < maxsection; i++) { D->sections[i].buf = NULL; /* Need this for pass3. */ D->sections[i].rbuf = D->sections[i].buf - DASM_SEC2POS(i); D->sections[i].bsize = 0; D->sections[i].epos = 0; /* Wrong, but is recalculated after resize. */ } } /* Free DynASM state. */ void dasm_free(Dst_DECL) { dasm_State *D = Dst_REF; int i; for (i = 0; i < D->maxsection; i++) if (D->sections[i].buf) DASM_M_FREE(Dst, D->sections[i].buf, D->sections[i].bsize); if (D->pclabels) DASM_M_FREE(Dst, D->pclabels, D->pcsize); if (D->lglabels) DASM_M_FREE(Dst, D->lglabels, D->lgsize); DASM_M_FREE(Dst, D, D->psize); } /* Setup global label array. Must be called before dasm_setup(). */ void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl) { dasm_State *D = Dst_REF; D->globals = gl - 10; /* Negative bias to compensate for locals. */ DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int)); } /* Grow PC label array. Can be called after dasm_setup(), too. */ void dasm_growpc(Dst_DECL, unsigned int maxpc) { dasm_State *D = Dst_REF; size_t osz = D->pcsize; DASM_M_GROW(Dst, int, D->pclabels, D->pcsize, maxpc*sizeof(int)); memset((void *)(((unsigned char *)D->pclabels)+osz), 0, D->pcsize-osz); } /* Setup encoder. */ void dasm_setup(Dst_DECL, const void *actionlist) { dasm_State *D = Dst_REF; int i; D->actionlist = (dasm_ActList)actionlist; D->status = DASM_S_OK; D->section = &D->sections[0]; memset((void *)D->lglabels, 0, D->lgsize); if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); D->sections[i].ofs = 0; } } #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) { \ D->status = DASM_S_##st|(int)(p-D->actionlist-1); return; } } while (0) #define CKPL(kind, st) \ do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ D->status=DASM_S_RANGE_##st|(int)(p-D->actionlist-1); return; } } while (0) #else #define CK(x, st) ((void)0) #define CKPL(kind, st) ((void)0) #endif /* Pass 1: Store actions and args, link branches/labels, estimate offsets. */ void dasm_put(Dst_DECL, int start, ...) { va_list ap; dasm_State *D = Dst_REF; dasm_ActList p = D->actionlist + start; dasm_Section *sec = D->section; int pos = sec->pos, ofs = sec->ofs, mrm = 4; int *b; if (pos >= sec->epos) { DASM_M_GROW(Dst, int, sec->buf, sec->bsize, sec->bsize + 2*DASM_MAXSECPOS*sizeof(int)); sec->rbuf = sec->buf - DASM_POS2BIAS(pos); sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); } b = sec->rbuf; b[pos++] = start; va_start(ap, start); while (1) { int action = *p++; if (action < DASM_DISP) { ofs++; } else if (action <= DASM_REL_A) { int n = va_arg(ap, int); b[pos++] = n; switch (action) { case DASM_DISP: if (n == 0) { if ((mrm&7) == 4) mrm = p[-2]; if ((mrm&7) != 5) break; } case DASM_IMM_DB: if (((n+128)&-256) == 0) goto ob; case DASM_REL_A: /* Assumes ptrdiff_t is int. !x64 */ case DASM_IMM_D: ofs += 4; break; case DASM_IMM_S: CK(((n+128)&-256) == 0, RANGE_I); goto ob; case DASM_IMM_B: CK((n&-256) == 0, RANGE_I); ob: ofs++; break; case DASM_IMM_WB: if (((n+128)&-256) == 0) goto ob; case DASM_IMM_W: CK((n&-65536) == 0, RANGE_I); ofs += 2; break; case DASM_SPACE: p++; ofs += n; break; case DASM_SETLABEL: b[pos-2] = -0x40000000; break; /* Neg. label ofs. */ case DASM_VREG: CK((n&-8) == 0 && (n != 4 || (*p&1) == 0), RANGE_VREG); if (*p++ == 1 && *p == DASM_DISP) mrm = n; continue; } mrm = 4; } else { int *pl, n; switch (action) { case DASM_REL_LG: case DASM_IMM_LG: n = *p++; pl = D->lglabels + n; /* Bkwd rel or global. */ if (n <= 246) { CK(n>=10||*pl<0, RANGE_LG); CKPL(lg, LG); goto putrel; } pl -= 246; n = *pl; if (n < 0) n = 0; /* Start new chain for fwd rel if label exists. */ goto linkrel; case DASM_REL_PC: case DASM_IMM_PC: pl = D->pclabels + va_arg(ap, int); CKPL(pc, PC); putrel: n = *pl; if (n < 0) { /* Label exists. Get label pos and store it. */ b[pos] = -n; } else { linkrel: b[pos] = n; /* Else link to rel chain, anchored at label. */ *pl = pos; } pos++; ofs += 4; /* Maximum offset needed. */ if (action == DASM_REL_LG || action == DASM_REL_PC) b[pos++] = ofs; /* Store pass1 offset estimate. */ break; case DASM_LABEL_LG: pl = D->lglabels + *p++; CKPL(lg, LG); goto putlabel; case DASM_LABEL_PC: pl = D->pclabels + va_arg(ap, int); CKPL(pc, PC); putlabel: n = *pl; /* n > 0: Collapse rel chain and replace with label pos. */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; } *pl = -pos; /* Label exists now. */ b[pos++] = ofs; /* Store pass1 offset estimate. */ break; case DASM_ALIGN: ofs += *p++; /* Maximum alignment needed (arg is 2**n-1). */ b[pos++] = ofs; /* Store pass1 offset estimate. */ break; case DASM_EXTERN: p += 2; ofs += 4; break; case DASM_ESC: p++; ofs++; break; case DASM_MARK: mrm = p[-2]; break; case DASM_SECTION: n = *p; CK(n < D->maxsection, RANGE_SEC); D->section = &D->sections[n]; case DASM_STOP: goto stop; } } } stop: va_end(ap); sec->pos = pos; sec->ofs = ofs; } #undef CK /* Pass 2: Link sections, shrink branches/aligns, fix label offsets. */ int dasm_link(Dst_DECL, size_t *szp) { dasm_State *D = Dst_REF; int secnum; int ofs = 0; #ifdef DASM_CHECKS *szp = 0; if (D->status != DASM_S_OK) return D->status; { int pc; for (pc = 0; pc*sizeof(int) < D->pcsize; pc++) if (D->pclabels[pc] > 0) return DASM_S_UNDEF_PC|pc; } #endif { /* Handle globals not defined in this translation unit. */ int idx; for (idx = 10; idx*sizeof(int) < D->lgsize; idx++) { int n = D->lglabels[idx]; /* Undefined label: Collapse rel chain and replace with marker (< 0). */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = -idx; } } } /* Combine all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->rbuf; int pos = DASM_SEC2POS(secnum); int lastpos = sec->pos; while (pos != lastpos) { dasm_ActList p = D->actionlist + b[pos++]; while (1) { int op, action = *p++; switch (action) { case DASM_REL_LG: p++; op = p[-3]; goto rel_pc; case DASM_REL_PC: op = p[-2]; rel_pc: { int shrink = op == 0xe9 ? 3 : ((op&0xf0) == 0x80 ? 4 : 0); if (shrink) { /* Shrinkable branch opcode? */ int lofs, lpos = b[pos]; if (lpos < 0) goto noshrink; /* Ext global? */ lofs = *DASM_POS2PTR(D, lpos); if (lpos > pos) { /* Fwd label: add cumulative section offsets. */ int i; for (i = secnum; i < DASM_POS2SEC(lpos); i++) lofs += D->sections[i].ofs; } else { lofs -= ofs; /* Bkwd label: unfix offset. */ } lofs -= b[pos+1]; /* Short branch ok? */ if (lofs >= -128-shrink && lofs <= 127) ofs -= shrink; /* Yes. */ else { noshrink: shrink = 0; } /* No, cannot shrink op. */ } b[pos+1] = shrink; pos += 2; break; } case DASM_SPACE: case DASM_IMM_LG: case DASM_VREG: p++; case DASM_DISP: case DASM_IMM_S: case DASM_IMM_B: case DASM_IMM_W: case DASM_IMM_D: case DASM_IMM_WB: case DASM_IMM_DB: case DASM_SETLABEL: case DASM_REL_A: case DASM_IMM_PC: pos++; break; case DASM_LABEL_LG: p++; case DASM_LABEL_PC: b[pos++] += ofs; break; /* Fix label offset. */ case DASM_ALIGN: ofs -= (b[pos++]+ofs)&*p++; break; /* Adjust ofs. */ case DASM_EXTERN: p += 2; break; case DASM_ESC: p++; break; case DASM_MARK: break; case DASM_SECTION: case DASM_STOP: goto stop; } } stop: (void)0; } ofs += sec->ofs; /* Next section starts right after current section. */ } D->codesize = ofs; /* Total size of all code sections */ *szp = ofs; return DASM_S_OK; } #define dasmb(x) *cp++ = (unsigned char)(x) #ifndef DASM_ALIGNED_WRITES #define dasmw(x) \ do { *((unsigned short *)cp) = (unsigned short)(x); cp+=2; } while (0) #define dasmd(x) \ do { *((unsigned int *)cp) = (unsigned int)(x); cp+=4; } while (0) #else #define dasmw(x) do { dasmb(x); dasmb((x)>>8); } while (0) #define dasmd(x) do { dasmw(x); dasmw((x)>>16); } while (0) #endif /* Pass 3: Encode sections. */ int dasm_encode(Dst_DECL, void *buffer) { dasm_State *D = Dst_REF; unsigned char *base = (unsigned char *)buffer; unsigned char *cp = base; int secnum; /* Encode all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->buf; int *endb = sec->rbuf + sec->pos; while (b != endb) { dasm_ActList p = D->actionlist + *b++; unsigned char *mark = NULL; while (1) { int action = *p++; int n = (action >= DASM_DISP && action <= DASM_ALIGN) ? *b++ : 0; switch (action) { case DASM_DISP: if (!mark) mark = cp; { unsigned char *mm = mark; if (*p != DASM_IMM_DB && *p != DASM_IMM_WB) mark = NULL; if (n == 0) { int mrm = mm[-1]&7; if (mrm == 4) mrm = mm[0]&7; if (mrm != 5) { mm[-1] -= 0x80; break; } } if (((n+128) & -256) != 0) goto wd; else mm[-1] -= 0x40; } case DASM_IMM_S: case DASM_IMM_B: wb: dasmb(n); break; case DASM_IMM_DB: if (((n+128)&-256) == 0) { db: if (!mark) mark = cp; mark[-2] += 2; mark = NULL; goto wb; } else mark = NULL; case DASM_IMM_D: wd: dasmd(n); break; case DASM_IMM_WB: if (((n+128)&-256) == 0) goto db; else mark = NULL; case DASM_IMM_W: dasmw(n); break; case DASM_VREG: { int t = *p++; if (t >= 2) n<<=3; cp[-1] |= n; break; } case DASM_REL_LG: p++; if (n >= 0) goto rel_pc; b++; n = (int)(ptrdiff_t)D->globals[-n]; case DASM_REL_A: rel_a: n -= (int)(ptrdiff_t)(cp+4); goto wd; /* !x64 */ case DASM_REL_PC: rel_pc: { int shrink = *b++; int *pb = DASM_POS2PTR(D, n); if (*pb < 0) { n = pb[1]; goto rel_a; } n = *pb - ((int)(cp-base) + 4-shrink); if (shrink == 0) goto wd; if (shrink == 4) { cp--; cp[-1] = *cp-0x10; } else cp[-1] = 0xeb; goto wb; } case DASM_IMM_LG: p++; if (n < 0) { n = (int)(ptrdiff_t)D->globals[-n]; goto wd; } case DASM_IMM_PC: { int *pb = DASM_POS2PTR(D, n); n = *pb < 0 ? pb[1] : (*pb + (int)(ptrdiff_t)base); goto wd; } case DASM_LABEL_LG: { int idx = *p++; if (idx >= 10) D->globals[idx] = (void *)(base + (*p == DASM_SETLABEL ? *b : n)); break; } case DASM_LABEL_PC: case DASM_SETLABEL: break; case DASM_SPACE: { int fill = *p++; while (n--) *cp++ = fill; break; } case DASM_ALIGN: n = *p++; while (((cp-base) & n)) *cp++ = 0x90; /* nop */ break; case DASM_EXTERN: n = DASM_EXTERN(Dst, cp, p[1], *p); p += 2; goto wd; case DASM_MARK: mark = cp; break; case DASM_ESC: action = *p++; default: *cp++ = action; break; case DASM_SECTION: case DASM_STOP: goto stop; } } stop: (void)0; } } if (base + D->codesize != cp) /* Check for phase errors. */ return DASM_S_PHASE; return DASM_S_OK; } /* Get PC label offset. */ int dasm_getpclabel(Dst_DECL, unsigned int pc) { dasm_State *D = Dst_REF; if (pc*sizeof(int) < D->pcsize) { int pos = D->pclabels[pc]; if (pos < 0) return *DASM_POS2PTR(D, -pos); if (pos > 0) return -1; /* Undefined. */ } return -2; /* Unused or out of range. */ } #ifdef DASM_CHECKS /* Optional sanity checker to call between isolated encoding steps. */ int dasm_checkstep(Dst_DECL, int secmatch) { dasm_State *D = Dst_REF; if (D->status == DASM_S_OK) { int i; for (i = 1; i <= 9; i++) { if (D->lglabels[i] > 0) { D->status = DASM_S_UNDEF_L|i; break; } D->lglabels[i] = 0; } } if (D->status == DASM_S_OK && secmatch >= 0 && D->section != &D->sections[secmatch]) D->status = DASM_S_MATCH_SEC|(int)(D->section-D->sections); return D->status; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_ppc.lua0000664000000000000000000011031012202141143023347 0ustar rootroot------------------------------------------------------------------------------ -- DynASM PPC module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _info = { arch = "ppc", description = "DynASM PPC module", version = "1.3.0", vernum = 10300, release = "2011-05-05", author = "Mike Pall", license = "MIT", } -- Exported glue functions for the arch-specific module. local _M = { _info = _info } -- Cache library functions. local type, tonumber, pairs, ipairs = type, tonumber, pairs, ipairs local assert, setmetatable = assert, setmetatable local _s = string local sub, format, byte, char = _s.sub, _s.format, _s.byte, _s.char local match, gmatch = _s.match, _s.gmatch local concat, sort = table.concat, table.sort local bit = bit or require("bit") local band, shl, shr, sar = bit.band, bit.lshift, bit.rshift, bit.arshift local tohex = bit.tohex -- Inherited tables and callbacks. local g_opt, g_arch local wline, werror, wfatal, wwarn -- Action name list. -- CHECK: Keep this in sync with the C code! local action_names = { "STOP", "SECTION", "ESC", "REL_EXT", "ALIGN", "REL_LG", "LABEL_LG", "REL_PC", "LABEL_PC", "IMM", } -- Maximum number of section buffer positions for dasm_put(). -- CHECK: Keep this in sync with the C code! local maxsecpos = 25 -- Keep this low, to avoid excessively long C lines. -- Action name -> action number. local map_action = {} for n,name in ipairs(action_names) do map_action[name] = n-1 end -- Action list buffer. local actlist = {} -- Argument list for next dasm_put(). Start with offset 0 into action list. local actargs = { 0 } -- Current number of section buffer positions for dasm_put(). local secpos = 1 ------------------------------------------------------------------------------ -- Dump action names and numbers. local function dumpactions(out) out:write("DynASM encoding engine action codes:\n") for n,name in ipairs(action_names) do local num = map_action[name] out:write(format(" %-10s %02X %d\n", name, num, num)) end out:write("\n") end -- Write action list buffer as a huge static C array. local function writeactions(out, name) local nn = #actlist if nn == 0 then nn = 1; actlist[0] = map_action.STOP end out:write("static const unsigned int ", name, "[", nn, "] = {\n") for i = 1,nn-1 do assert(out:write("0x", tohex(actlist[i]), ",\n")) end assert(out:write("0x", tohex(actlist[nn]), "\n};\n\n")) end ------------------------------------------------------------------------------ -- Add word to action list. local function wputxw(n) assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range") actlist[#actlist+1] = n end -- Add action to list with optional arg. Advance buffer pos, too. local function waction(action, val, a, num) local w = assert(map_action[action], "bad action name `"..action.."'") wputxw(w * 0x10000 + (val or 0)) if a then actargs[#actargs+1] = a end if a or num then secpos = secpos + (num or 1) end end -- Flush action list (intervening C code or buffer pos overflow). local function wflush(term) if #actlist == actargs[1] then return end -- Nothing to flush. if not term then waction("STOP") end -- Terminate action list. wline(format("dasm_put(Dst, %s);", concat(actargs, ", ")), true) actargs = { #actlist } -- Actionlist offset is 1st arg to next dasm_put(). secpos = 1 -- The actionlist offset occupies a buffer position, too. end -- Put escaped word. local function wputw(n) if n <= 0xffffff then waction("ESC") end wputxw(n) end -- Reserve position for word. local function wpos() local pos = #actlist+1 actlist[pos] = "" return pos end -- Store word to reserved position. local function wputpos(pos, n) assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range") actlist[pos] = n end ------------------------------------------------------------------------------ -- Global label name -> global label number. With auto assignment on 1st use. local next_global = 20 local map_global = setmetatable({}, { __index = function(t, name) if not match(name, "^[%a_][%w_]*$") then werror("bad global label") end local n = next_global if n > 2047 then werror("too many global labels") end next_global = n + 1 t[name] = n return n end}) -- Dump global labels. local function dumpglobals(out, lvl) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("Global labels:\n") for i=20,next_global-1 do out:write(format(" %s\n", t[i])) end out:write("\n") end -- Write global label enum. local function writeglobals(out, prefix) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("enum {\n") for i=20,next_global-1 do out:write(" ", prefix, t[i], ",\n") end out:write(" ", prefix, "_MAX\n};\n") end -- Write global label names. local function writeglobalnames(out, name) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("static const char *const ", name, "[] = {\n") for i=20,next_global-1 do out:write(" \"", t[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Extern label name -> extern label number. With auto assignment on 1st use. local next_extern = 0 local map_extern_ = {} local map_extern = setmetatable({}, { __index = function(t, name) -- No restrictions on the name for now. local n = next_extern if n > 2047 then werror("too many extern labels") end next_extern = n + 1 t[name] = n map_extern_[n] = name return n end}) -- Dump extern labels. local function dumpexterns(out, lvl) out:write("Extern labels:\n") for i=0,next_extern-1 do out:write(format(" %s\n", map_extern_[i])) end out:write("\n") end -- Write extern label names. local function writeexternnames(out, name) out:write("static const char *const ", name, "[] = {\n") for i=0,next_extern-1 do out:write(" \"", map_extern_[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Arch-specific maps. local map_archdef = { sp = "r1" } -- Ext. register name -> int. name. local map_type = {} -- Type name -> { ctype, reg } local ctypenum = 0 -- Type number (for Dt... macros). -- Reverse defines for registers. function _M.revdef(s) if s == "r1" then return "sp" end return s end local map_cond = { lt = 0, gt = 1, eq = 2, so = 3, ge = 4, le = 5, ne = 6, ns = 7, } ------------------------------------------------------------------------------ -- Template strings for PPC instructions. local map_op = { tdi_3 = "08000000ARI", twi_3 = "0c000000ARI", mulli_3 = "1c000000RRI", subfic_3 = "20000000RRI", cmplwi_3 = "28000000XRU", cmplwi_2 = "28000000-RU", cmpldi_3 = "28200000XRU", cmpldi_2 = "28200000-RU", cmpwi_3 = "2c000000XRI", cmpwi_2 = "2c000000-RI", cmpdi_3 = "2c200000XRI", cmpdi_2 = "2c200000-RI", addic_3 = "30000000RRI", ["addic._3"] = "34000000RRI", addi_3 = "38000000RR0I", li_2 = "38000000RI", la_2 = "38000000RD", addis_3 = "3c000000RR0I", lis_2 = "3c000000RI", lus_2 = "3c000000RU", bc_3 = "40000000AAK", bcl_3 = "40000001AAK", bdnz_1 = "42000000K", bdz_1 = "42400000K", sc_0 = "44000000", b_1 = "48000000J", bl_1 = "48000001J", rlwimi_5 = "50000000RR~AAA.", rlwinm_5 = "54000000RR~AAA.", rlwnm_5 = "5c000000RR~RAA.", ori_3 = "60000000RR~U", nop_0 = "60000000", oris_3 = "64000000RR~U", xori_3 = "68000000RR~U", xoris_3 = "6c000000RR~U", ["andi._3"] = "70000000RR~U", ["andis._3"] = "74000000RR~U", lwz_2 = "80000000RD", lwzu_2 = "84000000RD", lbz_2 = "88000000RD", lbzu_2 = "8c000000RD", stw_2 = "90000000RD", stwu_2 = "94000000RD", stb_2 = "98000000RD", stbu_2 = "9c000000RD", lhz_2 = "a0000000RD", lhzu_2 = "a4000000RD", lha_2 = "a8000000RD", lhau_2 = "ac000000RD", sth_2 = "b0000000RD", sthu_2 = "b4000000RD", lmw_2 = "b8000000RD", stmw_2 = "bc000000RD", lfs_2 = "c0000000FD", lfsu_2 = "c4000000FD", lfd_2 = "c8000000FD", lfdu_2 = "cc000000FD", stfs_2 = "d0000000FD", stfsu_2 = "d4000000FD", stfd_2 = "d8000000FD", stfdu_2 = "dc000000FD", ld_2 = "e8000000RD", -- NYI: displacement must be divisible by 4. ldu_2 = "e8000001RD", lwa_2 = "e8000002RD", std_2 = "f8000000RD", stdu_2 = "f8000001RD", -- Primary opcode 19: mcrf_2 = "4c000000XX", isync_0 = "4c00012c", crnor_3 = "4c000042CCC", crnot_2 = "4c000042CC=", crandc_3 = "4c000102CCC", crxor_3 = "4c000182CCC", crclr_1 = "4c000182C==", crnand_3 = "4c0001c2CCC", crand_3 = "4c000202CCC", creqv_3 = "4c000242CCC", crset_1 = "4c000242C==", crorc_3 = "4c000342CCC", cror_3 = "4c000382CCC", crmove_2 = "4c000382CC=", bclr_2 = "4c000020AA", bclrl_2 = "4c000021AA", bcctr_2 = "4c000420AA", bcctrl_2 = "4c000421AA", blr_0 = "4e800020", blrl_0 = "4e800021", bctr_0 = "4e800420", bctrl_0 = "4e800421", -- Primary opcode 31: cmpw_3 = "7c000000XRR", cmpw_2 = "7c000000-RR", cmpd_3 = "7c200000XRR", cmpd_2 = "7c200000-RR", tw_3 = "7c000008ARR", subfc_3 = "7c000010RRR.", subc_3 = "7c000010RRR~.", mulhdu_3 = "7c000012RRR.", addc_3 = "7c000014RRR.", mulhwu_3 = "7c000016RRR.", isel_4 = "7c00001eRRRC", isellt_3 = "7c00001eRRR", iselgt_3 = "7c00005eRRR", iseleq_3 = "7c00009eRRR", mfcr_1 = "7c000026R", mfocrf_2 = "7c100026RG", mtcrf_2 = "7c000120GR", mtocrf_2 = "7c100120GR", lwarx_3 = "7c000028RR0R", ldx_3 = "7c00002aRR0R", lwzx_3 = "7c00002eRR0R", slw_3 = "7c000030RR~R.", cntlzw_2 = "7c000034RR~", sld_3 = "7c000036RR~R.", and_3 = "7c000038RR~R.", cmplw_3 = "7c000040XRR", cmplw_2 = "7c000040-RR", cmpld_3 = "7c200040XRR", cmpld_2 = "7c200040-RR", subf_3 = "7c000050RRR.", sub_3 = "7c000050RRR~.", ldux_3 = "7c00006aRR0R", dcbst_2 = "7c00006c-RR", lwzux_3 = "7c00006eRR0R", cntlzd_2 = "7c000074RR~", andc_3 = "7c000078RR~R.", td_3 = "7c000088ARR", mulhd_3 = "7c000092RRR.", mulhw_3 = "7c000096RRR.", ldarx_3 = "7c0000a8RR0R", dcbf_2 = "7c0000ac-RR", lbzx_3 = "7c0000aeRR0R", neg_2 = "7c0000d0RR.", lbzux_3 = "7c0000eeRR0R", popcntb_2 = "7c0000f4RR~", not_2 = "7c0000f8RR~%.", nor_3 = "7c0000f8RR~R.", subfe_3 = "7c000110RRR.", sube_3 = "7c000110RRR~.", adde_3 = "7c000114RRR.", stdx_3 = "7c00012aRR0R", stwcx_3 = "7c00012cRR0R.", stwx_3 = "7c00012eRR0R", prtyw_2 = "7c000134RR~", stdux_3 = "7c00016aRR0R", stwux_3 = "7c00016eRR0R", prtyd_2 = "7c000174RR~", subfze_2 = "7c000190RR.", addze_2 = "7c000194RR.", stdcx_3 = "7c0001acRR0R.", stbx_3 = "7c0001aeRR0R", subfme_2 = "7c0001d0RR.", mulld_3 = "7c0001d2RRR.", addme_2 = "7c0001d4RR.", mullw_3 = "7c0001d6RRR.", dcbtst_2 = "7c0001ec-RR", stbux_3 = "7c0001eeRR0R", add_3 = "7c000214RRR.", dcbt_2 = "7c00022c-RR", lhzx_3 = "7c00022eRR0R", eqv_3 = "7c000238RR~R.", eciwx_3 = "7c00026cRR0R", lhzux_3 = "7c00026eRR0R", xor_3 = "7c000278RR~R.", mfspefscr_1 = "7c0082a6R", mfxer_1 = "7c0102a6R", mflr_1 = "7c0802a6R", mfctr_1 = "7c0902a6R", lwax_3 = "7c0002aaRR0R", lhax_3 = "7c0002aeRR0R", mftb_1 = "7c0c42e6R", mftbu_1 = "7c0d42e6R", lwaux_3 = "7c0002eaRR0R", lhaux_3 = "7c0002eeRR0R", sthx_3 = "7c00032eRR0R", orc_3 = "7c000338RR~R.", ecowx_3 = "7c00036cRR0R", sthux_3 = "7c00036eRR0R", or_3 = "7c000378RR~R.", mr_2 = "7c000378RR~%.", divdu_3 = "7c000392RRR.", divwu_3 = "7c000396RRR.", mtspefscr_1 = "7c0083a6R", mtxer_1 = "7c0103a6R", mtlr_1 = "7c0803a6R", mtctr_1 = "7c0903a6R", dcbi_2 = "7c0003ac-RR", nand_3 = "7c0003b8RR~R.", divd_3 = "7c0003d2RRR.", divw_3 = "7c0003d6RRR.", cmpb_3 = "7c0003f8RR~R.", mcrxr_1 = "7c000400X", subfco_3 = "7c000410RRR.", subco_3 = "7c000410RRR~.", addco_3 = "7c000414RRR.", ldbrx_3 = "7c000428RR0R", lswx_3 = "7c00042aRR0R", lwbrx_3 = "7c00042cRR0R", lfsx_3 = "7c00042eFR0R", srw_3 = "7c000430RR~R.", srd_3 = "7c000436RR~R.", subfo_3 = "7c000450RRR.", subo_3 = "7c000450RRR~.", lfsux_3 = "7c00046eFR0R", lswi_3 = "7c0004aaRR0A", sync_0 = "7c0004ac", lwsync_0 = "7c2004ac", ptesync_0 = "7c4004ac", lfdx_3 = "7c0004aeFR0R", nego_2 = "7c0004d0RR.", lfdux_3 = "7c0004eeFR0R", subfeo_3 = "7c000510RRR.", subeo_3 = "7c000510RRR~.", addeo_3 = "7c000514RRR.", stdbrx_3 = "7c000528RR0R", stswx_3 = "7c00052aRR0R", stwbrx_3 = "7c00052cRR0R", stfsx_3 = "7c00052eFR0R", stfsux_3 = "7c00056eFR0R", subfzeo_2 = "7c000590RR.", addzeo_2 = "7c000594RR.", stswi_3 = "7c0005aaRR0A", stfdx_3 = "7c0005aeFR0R", subfmeo_2 = "7c0005d0RR.", mulldo_3 = "7c0005d2RRR.", addmeo_2 = "7c0005d4RR.", mullwo_3 = "7c0005d6RRR.", dcba_2 = "7c0005ec-RR", stfdux_3 = "7c0005eeFR0R", addo_3 = "7c000614RRR.", lhbrx_3 = "7c00062cRR0R", sraw_3 = "7c000630RR~R.", srad_3 = "7c000634RR~R.", srawi_3 = "7c000670RR~A.", sradi_3 = "7c000674RR~H.", eieio_0 = "7c0006ac", lfiwax_3 = "7c0006aeFR0R", sthbrx_3 = "7c00072cRR0R", extsh_2 = "7c000734RR~.", extsb_2 = "7c000774RR~.", divduo_3 = "7c000792RRR.", divwou_3 = "7c000796RRR.", icbi_2 = "7c0007ac-RR", stfiwx_3 = "7c0007aeFR0R", extsw_2 = "7c0007b4RR~.", divdo_3 = "7c0007d2RRR.", divwo_3 = "7c0007d6RRR.", dcbz_2 = "7c0007ec-RR", -- Primary opcode 30: rldicl_4 = "78000000RR~HM.", rldicr_4 = "78000004RR~HM.", rldic_4 = "78000008RR~HM.", rldimi_4 = "7800000cRR~HM.", rldcl_4 = "78000010RR~RM.", rldcr_4 = "78000012RR~RM.", -- Primary opcode 59: fdivs_3 = "ec000024FFF.", fsubs_3 = "ec000028FFF.", fadds_3 = "ec00002aFFF.", fsqrts_2 = "ec00002cF-F.", fres_2 = "ec000030F-F.", fmuls_3 = "ec000032FF-F.", frsqrtes_2 = "ec000034F-F.", fmsubs_4 = "ec000038FFFF~.", fmadds_4 = "ec00003aFFFF~.", fnmsubs_4 = "ec00003cFFFF~.", fnmadds_4 = "ec00003eFFFF~.", -- Primary opcode 63: fdiv_3 = "fc000024FFF.", fsub_3 = "fc000028FFF.", fadd_3 = "fc00002aFFF.", fsqrt_2 = "fc00002cF-F.", fsel_4 = "fc00002eFFFF~.", fre_2 = "fc000030F-F.", fmul_3 = "fc000032FF-F.", frsqrte_2 = "fc000034F-F.", fmsub_4 = "fc000038FFFF~.", fmadd_4 = "fc00003aFFFF~.", fnmsub_4 = "fc00003cFFFF~.", fnmadd_4 = "fc00003eFFFF~.", fcmpu_3 = "fc000000XFF", fcpsgn_3 = "fc000010FFF.", fcmpo_3 = "fc000040XFF", mtfsb1_1 = "fc00004cA", fneg_2 = "fc000050F-F.", mcrfs_2 = "fc000080XX", mtfsb0_1 = "fc00008cA", fmr_2 = "fc000090F-F.", frsp_2 = "fc000018F-F.", fctiw_2 = "fc00001cF-F.", fctiwz_2 = "fc00001eF-F.", mtfsfi_2 = "fc00010cAA", -- NYI: upshift. fnabs_2 = "fc000110F-F.", fabs_2 = "fc000210F-F.", frin_2 = "fc000310F-F.", friz_2 = "fc000350F-F.", frip_2 = "fc000390F-F.", frim_2 = "fc0003d0F-F.", mffs_1 = "fc00048eF.", -- NYI: mtfsf, mtfsb0, mtfsb1. fctid_2 = "fc00065cF-F.", fctidz_2 = "fc00065eF-F.", fcfid_2 = "fc00069cF-F.", -- Primary opcode 4, SPE APU extension: evaddw_3 = "10000200RRR", evaddiw_3 = "10000202RAR~", evsubw_3 = "10000204RRR~", evsubiw_3 = "10000206RAR~", evabs_2 = "10000208RR", evneg_2 = "10000209RR", evextsb_2 = "1000020aRR", evextsh_2 = "1000020bRR", evrndw_2 = "1000020cRR", evcntlzw_2 = "1000020dRR", evcntlsw_2 = "1000020eRR", brinc_3 = "1000020fRRR", evand_3 = "10000211RRR", evandc_3 = "10000212RRR", evxor_3 = "10000216RRR", evor_3 = "10000217RRR", evmr_2 = "10000217RR=", evnor_3 = "10000218RRR", evnot_2 = "10000218RR=", eveqv_3 = "10000219RRR", evorc_3 = "1000021bRRR", evnand_3 = "1000021eRRR", evsrwu_3 = "10000220RRR", evsrws_3 = "10000221RRR", evsrwiu_3 = "10000222RRA", evsrwis_3 = "10000223RRA", evslw_3 = "10000224RRR", evslwi_3 = "10000226RRA", evrlw_3 = "10000228RRR", evsplati_2 = "10000229RS", evrlwi_3 = "1000022aRRA", evsplatfi_2 = "1000022bRS", evmergehi_3 = "1000022cRRR", evmergelo_3 = "1000022dRRR", evcmpgtu_3 = "10000230XRR", evcmpgtu_2 = "10000230-RR", evcmpgts_3 = "10000231XRR", evcmpgts_2 = "10000231-RR", evcmpltu_3 = "10000232XRR", evcmpltu_2 = "10000232-RR", evcmplts_3 = "10000233XRR", evcmplts_2 = "10000233-RR", evcmpeq_3 = "10000234XRR", evcmpeq_2 = "10000234-RR", evsel_4 = "10000278RRRW", evsel_3 = "10000278RRR", evfsadd_3 = "10000280RRR", evfssub_3 = "10000281RRR", evfsabs_2 = "10000284RR", evfsnabs_2 = "10000285RR", evfsneg_2 = "10000286RR", evfsmul_3 = "10000288RRR", evfsdiv_3 = "10000289RRR", evfscmpgt_3 = "1000028cXRR", evfscmpgt_2 = "1000028c-RR", evfscmplt_3 = "1000028dXRR", evfscmplt_2 = "1000028d-RR", evfscmpeq_3 = "1000028eXRR", evfscmpeq_2 = "1000028e-RR", evfscfui_2 = "10000290R-R", evfscfsi_2 = "10000291R-R", evfscfuf_2 = "10000292R-R", evfscfsf_2 = "10000293R-R", evfsctui_2 = "10000294R-R", evfsctsi_2 = "10000295R-R", evfsctuf_2 = "10000296R-R", evfsctsf_2 = "10000297R-R", evfsctuiz_2 = "10000298R-R", evfsctsiz_2 = "1000029aR-R", evfststgt_3 = "1000029cXRR", evfststgt_2 = "1000029c-RR", evfststlt_3 = "1000029dXRR", evfststlt_2 = "1000029d-RR", evfststeq_3 = "1000029eXRR", evfststeq_2 = "1000029e-RR", efsadd_3 = "100002c0RRR", efssub_3 = "100002c1RRR", efsabs_2 = "100002c4RR", efsnabs_2 = "100002c5RR", efsneg_2 = "100002c6RR", efsmul_3 = "100002c8RRR", efsdiv_3 = "100002c9RRR", efscmpgt_3 = "100002ccXRR", efscmpgt_2 = "100002cc-RR", efscmplt_3 = "100002cdXRR", efscmplt_2 = "100002cd-RR", efscmpeq_3 = "100002ceXRR", efscmpeq_2 = "100002ce-RR", efscfd_2 = "100002cfR-R", efscfui_2 = "100002d0R-R", efscfsi_2 = "100002d1R-R", efscfuf_2 = "100002d2R-R", efscfsf_2 = "100002d3R-R", efsctui_2 = "100002d4R-R", efsctsi_2 = "100002d5R-R", efsctuf_2 = "100002d6R-R", efsctsf_2 = "100002d7R-R", efsctuiz_2 = "100002d8R-R", efsctsiz_2 = "100002daR-R", efststgt_3 = "100002dcXRR", efststgt_2 = "100002dc-RR", efststlt_3 = "100002ddXRR", efststlt_2 = "100002dd-RR", efststeq_3 = "100002deXRR", efststeq_2 = "100002de-RR", efdadd_3 = "100002e0RRR", efdsub_3 = "100002e1RRR", efdcfuid_2 = "100002e2R-R", efdcfsid_2 = "100002e3R-R", efdabs_2 = "100002e4RR", efdnabs_2 = "100002e5RR", efdneg_2 = "100002e6RR", efdmul_3 = "100002e8RRR", efddiv_3 = "100002e9RRR", efdctuidz_2 = "100002eaR-R", efdctsidz_2 = "100002ebR-R", efdcmpgt_3 = "100002ecXRR", efdcmpgt_2 = "100002ec-RR", efdcmplt_3 = "100002edXRR", efdcmplt_2 = "100002ed-RR", efdcmpeq_3 = "100002eeXRR", efdcmpeq_2 = "100002ee-RR", efdcfs_2 = "100002efR-R", efdcfui_2 = "100002f0R-R", efdcfsi_2 = "100002f1R-R", efdcfuf_2 = "100002f2R-R", efdcfsf_2 = "100002f3R-R", efdctui_2 = "100002f4R-R", efdctsi_2 = "100002f5R-R", efdctuf_2 = "100002f6R-R", efdctsf_2 = "100002f7R-R", efdctuiz_2 = "100002f8R-R", efdctsiz_2 = "100002faR-R", efdtstgt_3 = "100002fcXRR", efdtstgt_2 = "100002fc-RR", efdtstlt_3 = "100002fdXRR", efdtstlt_2 = "100002fd-RR", efdtsteq_3 = "100002feXRR", efdtsteq_2 = "100002fe-RR", evlddx_3 = "10000300RR0R", evldd_2 = "10000301R8", evldwx_3 = "10000302RR0R", evldw_2 = "10000303R8", evldhx_3 = "10000304RR0R", evldh_2 = "10000305R8", evlwhex_3 = "10000310RR0R", evlwhe_2 = "10000311R4", evlwhoux_3 = "10000314RR0R", evlwhou_2 = "10000315R4", evlwhosx_3 = "10000316RR0R", evlwhos_2 = "10000317R4", evstddx_3 = "10000320RR0R", evstdd_2 = "10000321R8", evstdwx_3 = "10000322RR0R", evstdw_2 = "10000323R8", evstdhx_3 = "10000324RR0R", evstdh_2 = "10000325R8", evstwhex_3 = "10000330RR0R", evstwhe_2 = "10000331R4", evstwhox_3 = "10000334RR0R", evstwho_2 = "10000335R4", evstwwex_3 = "10000338RR0R", evstwwe_2 = "10000339R4", evstwwox_3 = "1000033cRR0R", evstwwo_2 = "1000033dR4", evmhessf_3 = "10000403RRR", evmhossf_3 = "10000407RRR", evmheumi_3 = "10000408RRR", evmhesmi_3 = "10000409RRR", evmhesmf_3 = "1000040bRRR", evmhoumi_3 = "1000040cRRR", evmhosmi_3 = "1000040dRRR", evmhosmf_3 = "1000040fRRR", evmhessfa_3 = "10000423RRR", evmhossfa_3 = "10000427RRR", evmheumia_3 = "10000428RRR", evmhesmia_3 = "10000429RRR", evmhesmfa_3 = "1000042bRRR", evmhoumia_3 = "1000042cRRR", evmhosmia_3 = "1000042dRRR", evmhosmfa_3 = "1000042fRRR", evmwhssf_3 = "10000447RRR", evmwlumi_3 = "10000448RRR", evmwhumi_3 = "1000044cRRR", evmwhsmi_3 = "1000044dRRR", evmwhsmf_3 = "1000044fRRR", evmwssf_3 = "10000453RRR", evmwumi_3 = "10000458RRR", evmwsmi_3 = "10000459RRR", evmwsmf_3 = "1000045bRRR", evmwhssfa_3 = "10000467RRR", evmwlumia_3 = "10000468RRR", evmwhumia_3 = "1000046cRRR", evmwhsmia_3 = "1000046dRRR", evmwhsmfa_3 = "1000046fRRR", evmwssfa_3 = "10000473RRR", evmwumia_3 = "10000478RRR", evmwsmia_3 = "10000479RRR", evmwsmfa_3 = "1000047bRRR", evmra_2 = "100004c4RR", evdivws_3 = "100004c6RRR", evdivwu_3 = "100004c7RRR", evmwssfaa_3 = "10000553RRR", evmwumiaa_3 = "10000558RRR", evmwsmiaa_3 = "10000559RRR", evmwsmfaa_3 = "1000055bRRR", evmwssfan_3 = "100005d3RRR", evmwumian_3 = "100005d8RRR", evmwsmian_3 = "100005d9RRR", evmwsmfan_3 = "100005dbRRR", evmergehilo_3 = "1000022eRRR", evmergelohi_3 = "1000022fRRR", evlhhesplatx_3 = "10000308RR0R", evlhhesplat_2 = "10000309R2", evlhhousplatx_3 = "1000030cRR0R", evlhhousplat_2 = "1000030dR2", evlhhossplatx_3 = "1000030eRR0R", evlhhossplat_2 = "1000030fR2", evlwwsplatx_3 = "10000318RR0R", evlwwsplat_2 = "10000319R4", evlwhsplatx_3 = "1000031cRR0R", evlwhsplat_2 = "1000031dR4", evaddusiaaw_2 = "100004c0RR", evaddssiaaw_2 = "100004c1RR", evsubfusiaaw_2 = "100004c2RR", evsubfssiaaw_2 = "100004c3RR", evaddumiaaw_2 = "100004c8RR", evaddsmiaaw_2 = "100004c9RR", evsubfumiaaw_2 = "100004caRR", evsubfsmiaaw_2 = "100004cbRR", evmheusiaaw_3 = "10000500RRR", evmhessiaaw_3 = "10000501RRR", evmhessfaaw_3 = "10000503RRR", evmhousiaaw_3 = "10000504RRR", evmhossiaaw_3 = "10000505RRR", evmhossfaaw_3 = "10000507RRR", evmheumiaaw_3 = "10000508RRR", evmhesmiaaw_3 = "10000509RRR", evmhesmfaaw_3 = "1000050bRRR", evmhoumiaaw_3 = "1000050cRRR", evmhosmiaaw_3 = "1000050dRRR", evmhosmfaaw_3 = "1000050fRRR", evmhegumiaa_3 = "10000528RRR", evmhegsmiaa_3 = "10000529RRR", evmhegsmfaa_3 = "1000052bRRR", evmhogumiaa_3 = "1000052cRRR", evmhogsmiaa_3 = "1000052dRRR", evmhogsmfaa_3 = "1000052fRRR", evmwlusiaaw_3 = "10000540RRR", evmwlssiaaw_3 = "10000541RRR", evmwlumiaaw_3 = "10000548RRR", evmwlsmiaaw_3 = "10000549RRR", evmheusianw_3 = "10000580RRR", evmhessianw_3 = "10000581RRR", evmhessfanw_3 = "10000583RRR", evmhousianw_3 = "10000584RRR", evmhossianw_3 = "10000585RRR", evmhossfanw_3 = "10000587RRR", evmheumianw_3 = "10000588RRR", evmhesmianw_3 = "10000589RRR", evmhesmfanw_3 = "1000058bRRR", evmhoumianw_3 = "1000058cRRR", evmhosmianw_3 = "1000058dRRR", evmhosmfanw_3 = "1000058fRRR", evmhegumian_3 = "100005a8RRR", evmhegsmian_3 = "100005a9RRR", evmhegsmfan_3 = "100005abRRR", evmhogumian_3 = "100005acRRR", evmhogsmian_3 = "100005adRRR", evmhogsmfan_3 = "100005afRRR", evmwlusianw_3 = "100005c0RRR", evmwlssianw_3 = "100005c1RRR", evmwlumianw_3 = "100005c8RRR", evmwlsmianw_3 = "100005c9RRR", -- NYI: Book E instructions. } -- Add mnemonics for "." variants. do local t = {} for k,v in pairs(map_op) do if sub(v, -1) == "." then local v2 = sub(v, 1, 7)..char(byte(v, 8)+1)..sub(v, 9, -2) t[sub(k, 1, -3).."."..sub(k, -2)] = v2 end end for k,v in pairs(t) do map_op[k] = v end end -- Add more branch mnemonics. for cond,c in pairs(map_cond) do local b1 = "b"..cond local c1 = shl(band(c, 3), 16) + (c < 4 and 0x01000000 or 0) -- bX[l] map_op[b1.."_1"] = tohex(0x40800000 + c1).."K" map_op[b1.."y_1"] = tohex(0x40a00000 + c1).."K" map_op[b1.."l_1"] = tohex(0x40800001 + c1).."K" map_op[b1.."_2"] = tohex(0x40800000 + c1).."-XK" map_op[b1.."y_2"] = tohex(0x40a00000 + c1).."-XK" map_op[b1.."l_2"] = tohex(0x40800001 + c1).."-XK" -- bXlr[l] map_op[b1.."lr_0"] = tohex(0x4c800020 + c1) map_op[b1.."lrl_0"] = tohex(0x4c800021 + c1) map_op[b1.."ctr_0"] = tohex(0x4c800420 + c1) map_op[b1.."ctrl_0"] = tohex(0x4c800421 + c1) -- bXctr[l] map_op[b1.."lr_1"] = tohex(0x4c800020 + c1).."-X" map_op[b1.."lrl_1"] = tohex(0x4c800021 + c1).."-X" map_op[b1.."ctr_1"] = tohex(0x4c800420 + c1).."-X" map_op[b1.."ctrl_1"] = tohex(0x4c800421 + c1).."-X" end ------------------------------------------------------------------------------ local function parse_gpr(expr) local tname, ovreg = match(expr, "^([%w_]+):(r[1-3]?[0-9])$") local tp = map_type[tname or expr] if tp then local reg = ovreg or tp.reg if not reg then werror("type `"..(tname or expr).."' needs a register override") end expr = reg end local r = match(expr, "^r([1-3]?[0-9])$") if r then r = tonumber(r) if r <= 31 then return r, tp end end werror("bad register name `"..expr.."'") end local function parse_fpr(expr) local r = match(expr, "^f([1-3]?[0-9])$") if r then r = tonumber(r) if r <= 31 then return r end end werror("bad register name `"..expr.."'") end local function parse_cr(expr) local r = match(expr, "^cr([0-7])$") if r then return tonumber(r) end werror("bad condition register name `"..expr.."'") end local function parse_cond(expr) local r, cond = match(expr, "^4%*cr([0-7])%+(%w%w)$") if r then r = tonumber(r) local c = map_cond[cond] if c and c < 4 then return r*4+c end end werror("bad condition bit name `"..expr.."'") end local function parse_imm(imm, bits, shift, scale, signed) local n = tonumber(imm) if n then local m = sar(n, scale) if shl(m, scale) == n then if signed then local s = sar(m, bits-1) if s == 0 then return shl(m, shift) elseif s == -1 then return shl(m + shl(1, bits), shift) end else if sar(m, bits) == 0 then return shl(m, shift) end end end werror("out of range immediate `"..imm.."'") elseif match(imm, "^r([1-3]?[0-9])$") or match(imm, "^([%w_]+):(r[1-3]?[0-9])$") then werror("expected immediate operand, got register") else waction("IMM", (signed and 32768 or 0)+scale*1024+bits*32+shift, imm) return 0 end end local function parse_shiftmask(imm, isshift) local n = tonumber(imm) if n then if shr(n, 6) == 0 then local lsb = band(imm, 31) local msb = imm - lsb return isshift and (shl(lsb, 11)+shr(msb, 4)) or (shl(lsb, 6)+msb) end werror("out of range immediate `"..imm.."'") elseif match(imm, "^r([1-3]?[0-9])$") or match(imm, "^([%w_]+):(r[1-3]?[0-9])$") then werror("expected immediate operand, got register") else werror("NYI: parameterized 64 bit shift/mask") end end local function parse_disp(disp) local imm, reg = match(disp, "^(.*)%(([%w_:]+)%)$") if imm then local r = parse_gpr(reg) if r == 0 then werror("cannot use r0 in displacement") end return shl(r, 16) + parse_imm(imm, 16, 0, 0, true) end local reg, tailr = match(disp, "^([%w_:]+)%s*(.*)$") if reg and tailr ~= "" then local r, tp = parse_gpr(reg) if r == 0 then werror("cannot use r0 in displacement") end if tp then waction("IMM", 32768+16*32, format(tp.ctypefmt, tailr)) return shl(r, 16) end end werror("bad displacement `"..disp.."'") end local function parse_u5disp(disp, scale) local imm, reg = match(disp, "^(.*)%(([%w_:]+)%)$") if imm then local r = parse_gpr(reg) if r == 0 then werror("cannot use r0 in displacement") end return shl(r, 16) + parse_imm(imm, 5, 11, scale, false) end local reg, tailr = match(disp, "^([%w_:]+)%s*(.*)$") if reg and tailr ~= "" then local r, tp = parse_gpr(reg) if r == 0 then werror("cannot use r0 in displacement") end if tp then waction("IMM", scale*1024+5*32+11, format(tp.ctypefmt, tailr)) return shl(r, 16) end end werror("bad displacement `"..disp.."'") end local function parse_label(label, def) local prefix = sub(label, 1, 2) -- =>label (pc label reference) if prefix == "=>" then return "PC", 0, sub(label, 3) end -- ->name (global label reference) if prefix == "->" then return "LG", map_global[sub(label, 3)] end if def then -- [1-9] (local label definition) if match(label, "^[1-9]$") then return "LG", 10+tonumber(label) end else -- [<>][1-9] (local label reference) local dir, lnum = match(label, "^([<>])([1-9])$") if dir then -- Fwd: 1-9, Bkwd: 11-19. return "LG", lnum + (dir == ">" and 0 or 10) end -- extern label (extern label reference) local extname = match(label, "^extern%s+(%S+)$") if extname then return "EXT", map_extern[extname] end end werror("bad label `"..label.."'") end ------------------------------------------------------------------------------ -- Handle opcodes defined with template strings. map_op[".template__"] = function(params, template, nparams) if not params then return sub(template, 9) end local op = tonumber(sub(template, 1, 8), 16) local n, rs = 1, 26 -- Limit number of section buffer positions used by a single dasm_put(). -- A single opcode needs a maximum of 3 positions (rlwinm). if secpos+3 > maxsecpos then wflush() end local pos = wpos() -- Process each character. for p in gmatch(sub(template, 9), ".") do if p == "R" then rs = rs - 5; op = op + shl(parse_gpr(params[n]), rs); n = n + 1 elseif p == "F" then rs = rs - 5; op = op + shl(parse_fpr(params[n]), rs); n = n + 1 elseif p == "A" then rs = rs - 5; op = op + parse_imm(params[n], 5, rs, 0, false); n = n + 1 elseif p == "S" then rs = rs - 5; op = op + parse_imm(params[n], 5, rs, 0, true); n = n + 1 elseif p == "I" then op = op + parse_imm(params[n], 16, 0, 0, true); n = n + 1 elseif p == "U" then op = op + parse_imm(params[n], 16, 0, 0, false); n = n + 1 elseif p == "D" then op = op + parse_disp(params[n]); n = n + 1 elseif p == "2" then op = op + parse_u5disp(params[n], 1); n = n + 1 elseif p == "4" then op = op + parse_u5disp(params[n], 2); n = n + 1 elseif p == "8" then op = op + parse_u5disp(params[n], 3); n = n + 1 elseif p == "C" then rs = rs - 5; op = op + shl(parse_cond(params[n]), rs); n = n + 1 elseif p == "X" then rs = rs - 5; op = op + shl(parse_cr(params[n]), rs+2); n = n + 1 elseif p == "W" then op = op + parse_cr(params[n]); n = n + 1 elseif p == "G" then op = op + parse_imm(params[n], 8, 12, 0, false); n = n + 1 elseif p == "H" then op = op + parse_shiftmask(params[n], true); n = n + 1 elseif p == "M" then op = op + parse_shiftmask(params[n], false); n = n + 1 elseif p == "J" or p == "K" then local mode, n, s = parse_label(params[n], false) if p == "K" then n = n + 2048 end waction("REL_"..mode, n, s, 1) n = n + 1 elseif p == "0" then if band(shr(op, rs), 31) == 0 then werror("cannot use r0") end elseif p == "=" or p == "%" then local t = band(shr(op, p == "%" and rs+5 or rs), 31) rs = rs - 5 op = op + shl(t, rs) elseif p == "~" then local mm = shl(31, rs) local lo = band(op, mm) local hi = band(op, shl(mm, 5)) op = op - lo - hi + shl(lo, 5) + shr(hi, 5) elseif p == "-" then rs = rs - 5 elseif p == "." then -- Ignored. else assert(false) end end wputpos(pos, op) end ------------------------------------------------------------------------------ -- Pseudo-opcode to mark the position where the action list is to be emitted. map_op[".actionlist_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeactions(out, name) end) end -- Pseudo-opcode to mark the position where the global enum is to be emitted. map_op[".globals_1"] = function(params) if not params then return "prefix" end local prefix = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobals(out, prefix) end) end -- Pseudo-opcode to mark the position where the global names are to be emitted. map_op[".globalnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobalnames(out, name) end) end -- Pseudo-opcode to mark the position where the extern names are to be emitted. map_op[".externnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeexternnames(out, name) end) end ------------------------------------------------------------------------------ -- Label pseudo-opcode (converted from trailing colon form). map_op[".label_1"] = function(params) if not params then return "[1-9] | ->global | =>pcexpr" end if secpos+1 > maxsecpos then wflush() end local mode, n, s = parse_label(params[1], true) if mode == "EXT" then werror("bad label definition") end waction("LABEL_"..mode, n, s, 1) end ------------------------------------------------------------------------------ -- Pseudo-opcodes for data storage. map_op[".long_*"] = function(params) if not params then return "imm..." end for _,p in ipairs(params) do local n = tonumber(p) if not n then werror("bad immediate `"..p.."'") end if n < 0 then n = n + 2^32 end wputw(n) if secpos+2 > maxsecpos then wflush() end end end -- Alignment pseudo-opcode. map_op[".align_1"] = function(params) if not params then return "numpow2" end if secpos+1 > maxsecpos then wflush() end local align = tonumber(params[1]) if align then local x = align -- Must be a power of 2 in the range (2 ... 256). for i=1,8 do x = x / 2 if x == 1 then waction("ALIGN", align-1, nil, 1) -- Action byte is 2**n-1. return end end end werror("bad alignment") end ------------------------------------------------------------------------------ -- Pseudo-opcode for (primitive) type definitions (map to C types). map_op[".type_3"] = function(params, nparams) if not params then return nparams == 2 and "name, ctype" or "name, ctype, reg" end local name, ctype, reg = params[1], params[2], params[3] if not match(name, "^[%a_][%w_]*$") then werror("bad type name `"..name.."'") end local tp = map_type[name] if tp then werror("duplicate type `"..name.."'") end -- Add #type to defines. A bit unclean to put it in map_archdef. map_archdef["#"..name] = "sizeof("..ctype..")" -- Add new type and emit shortcut define. local num = ctypenum + 1 map_type[name] = { ctype = ctype, ctypefmt = format("Dt%X(%%s)", num), reg = reg, } wline(format("#define Dt%X(_V) (int)(ptrdiff_t)&(((%s *)0)_V)", num, ctype)) ctypenum = num end map_op[".type_2"] = map_op[".type_3"] -- Dump type definitions. local function dumptypes(out, lvl) local t = {} for name in pairs(map_type) do t[#t+1] = name end sort(t) out:write("Type definitions:\n") for _,name in ipairs(t) do local tp = map_type[name] local reg = tp.reg or "" out:write(format(" %-20s %-20s %s\n", name, tp.ctype, reg)) end out:write("\n") end ------------------------------------------------------------------------------ -- Set the current section. function _M.section(num) waction("SECTION", num) wflush(true) -- SECTION is a terminal action. end ------------------------------------------------------------------------------ -- Dump architecture description. function _M.dumparch(out) out:write(format("DynASM %s version %s, released %s\n\n", _info.arch, _info.version, _info.release)) dumpactions(out) end -- Dump all user defined elements. function _M.dumpdef(out, lvl) dumptypes(out, lvl) dumpglobals(out, lvl) dumpexterns(out, lvl) end ------------------------------------------------------------------------------ -- Pass callbacks from/to the DynASM core. function _M.passcb(wl, we, wf, ww) wline, werror, wfatal, wwarn = wl, we, wf, ww return wflush end -- Setup the arch-specific module. function _M.setup(arch, opt) g_arch, g_opt = arch, opt end -- Merge the core maps and the arch-specific maps. function _M.mergemaps(map_coreop, map_def) setmetatable(map_op, { __index = map_coreop }) setmetatable(map_def, { __index = map_archdef }) return map_op, map_def end return _M ------------------------------------------------------------------------------ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_mips.lua0000664000000000000000000006666012202141143023557 0ustar rootroot------------------------------------------------------------------------------ -- DynASM MIPS module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _info = { arch = "mips", description = "DynASM MIPS module", version = "1.3.0", vernum = 10300, release = "2012-01-23", author = "Mike Pall", license = "MIT", } -- Exported glue functions for the arch-specific module. local _M = { _info = _info } -- Cache library functions. local type, tonumber, pairs, ipairs = type, tonumber, pairs, ipairs local assert, setmetatable = assert, setmetatable local _s = string local sub, format, byte, char = _s.sub, _s.format, _s.byte, _s.char local match, gmatch = _s.match, _s.gmatch local concat, sort = table.concat, table.sort local bit = bit or require("bit") local band, shl, sar, tohex = bit.band, bit.lshift, bit.arshift, bit.tohex -- Inherited tables and callbacks. local g_opt, g_arch local wline, werror, wfatal, wwarn -- Action name list. -- CHECK: Keep this in sync with the C code! local action_names = { "STOP", "SECTION", "ESC", "REL_EXT", "ALIGN", "REL_LG", "LABEL_LG", "REL_PC", "LABEL_PC", "IMM", } -- Maximum number of section buffer positions for dasm_put(). -- CHECK: Keep this in sync with the C code! local maxsecpos = 25 -- Keep this low, to avoid excessively long C lines. -- Action name -> action number. local map_action = {} for n,name in ipairs(action_names) do map_action[name] = n-1 end -- Action list buffer. local actlist = {} -- Argument list for next dasm_put(). Start with offset 0 into action list. local actargs = { 0 } -- Current number of section buffer positions for dasm_put(). local secpos = 1 ------------------------------------------------------------------------------ -- Dump action names and numbers. local function dumpactions(out) out:write("DynASM encoding engine action codes:\n") for n,name in ipairs(action_names) do local num = map_action[name] out:write(format(" %-10s %02X %d\n", name, num, num)) end out:write("\n") end -- Write action list buffer as a huge static C array. local function writeactions(out, name) local nn = #actlist if nn == 0 then nn = 1; actlist[0] = map_action.STOP end out:write("static const unsigned int ", name, "[", nn, "] = {\n") for i = 1,nn-1 do assert(out:write("0x", tohex(actlist[i]), ",\n")) end assert(out:write("0x", tohex(actlist[nn]), "\n};\n\n")) end ------------------------------------------------------------------------------ -- Add word to action list. local function wputxw(n) assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range") actlist[#actlist+1] = n end -- Add action to list with optional arg. Advance buffer pos, too. local function waction(action, val, a, num) local w = assert(map_action[action], "bad action name `"..action.."'") wputxw(0xff000000 + w * 0x10000 + (val or 0)) if a then actargs[#actargs+1] = a end if a or num then secpos = secpos + (num or 1) end end -- Flush action list (intervening C code or buffer pos overflow). local function wflush(term) if #actlist == actargs[1] then return end -- Nothing to flush. if not term then waction("STOP") end -- Terminate action list. wline(format("dasm_put(Dst, %s);", concat(actargs, ", ")), true) actargs = { #actlist } -- Actionlist offset is 1st arg to next dasm_put(). secpos = 1 -- The actionlist offset occupies a buffer position, too. end -- Put escaped word. local function wputw(n) if n >= 0xff000000 then waction("ESC") end wputxw(n) end -- Reserve position for word. local function wpos() local pos = #actlist+1 actlist[pos] = "" return pos end -- Store word to reserved position. local function wputpos(pos, n) assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range") actlist[pos] = n end ------------------------------------------------------------------------------ -- Global label name -> global label number. With auto assignment on 1st use. local next_global = 20 local map_global = setmetatable({}, { __index = function(t, name) if not match(name, "^[%a_][%w_]*$") then werror("bad global label") end local n = next_global if n > 2047 then werror("too many global labels") end next_global = n + 1 t[name] = n return n end}) -- Dump global labels. local function dumpglobals(out, lvl) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("Global labels:\n") for i=20,next_global-1 do out:write(format(" %s\n", t[i])) end out:write("\n") end -- Write global label enum. local function writeglobals(out, prefix) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("enum {\n") for i=20,next_global-1 do out:write(" ", prefix, t[i], ",\n") end out:write(" ", prefix, "_MAX\n};\n") end -- Write global label names. local function writeglobalnames(out, name) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("static const char *const ", name, "[] = {\n") for i=20,next_global-1 do out:write(" \"", t[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Extern label name -> extern label number. With auto assignment on 1st use. local next_extern = 0 local map_extern_ = {} local map_extern = setmetatable({}, { __index = function(t, name) -- No restrictions on the name for now. local n = next_extern if n > 2047 then werror("too many extern labels") end next_extern = n + 1 t[name] = n map_extern_[n] = name return n end}) -- Dump extern labels. local function dumpexterns(out, lvl) out:write("Extern labels:\n") for i=0,next_extern-1 do out:write(format(" %s\n", map_extern_[i])) end out:write("\n") end -- Write extern label names. local function writeexternnames(out, name) out:write("static const char *const ", name, "[] = {\n") for i=0,next_extern-1 do out:write(" \"", map_extern_[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Arch-specific maps. local map_archdef = { sp="r29", ra="r31" } -- Ext. register name -> int. name. local map_type = {} -- Type name -> { ctype, reg } local ctypenum = 0 -- Type number (for Dt... macros). -- Reverse defines for registers. function _M.revdef(s) if s == "r29" then return "sp" elseif s == "r31" then return "ra" end return s end ------------------------------------------------------------------------------ -- Template strings for MIPS instructions. local map_op = { -- First-level opcodes. j_1 = "08000000J", jal_1 = "0c000000J", b_1 = "10000000B", beqz_2 = "10000000SB", beq_3 = "10000000STB", bnez_2 = "14000000SB", bne_3 = "14000000STB", blez_2 = "18000000SB", bgtz_2 = "1c000000SB", addi_3 = "20000000TSI", li_2 = "24000000TI", addiu_3 = "24000000TSI", slti_3 = "28000000TSI", sltiu_3 = "2c000000TSI", andi_3 = "30000000TSU", lu_2 = "34000000TU", ori_3 = "34000000TSU", xori_3 = "38000000TSU", lui_2 = "3c000000TU", beqzl_2 = "50000000SB", beql_3 = "50000000STB", bnezl_2 = "54000000SB", bnel_3 = "54000000STB", blezl_2 = "58000000SB", bgtzl_2 = "5c000000SB", lb_2 = "80000000TO", lh_2 = "84000000TO", lwl_2 = "88000000TO", lw_2 = "8c000000TO", lbu_2 = "90000000TO", lhu_2 = "94000000TO", lwr_2 = "98000000TO", sb_2 = "a0000000TO", sh_2 = "a4000000TO", swl_2 = "a8000000TO", sw_2 = "ac000000TO", swr_2 = "b8000000TO", cache_2 = "bc000000NO", ll_2 = "c0000000TO", lwc1_2 = "c4000000HO", pref_2 = "cc000000NO", ldc1_2 = "d4000000HO", sc_2 = "e0000000TO", swc1_2 = "e4000000HO", sdc1_2 = "f4000000HO", -- Opcode SPECIAL. nop_0 = "00000000", sll_3 = "00000000DTA", movf_2 = "00000001DS", movf_3 = "00000001DSC", movt_2 = "00010001DS", movt_3 = "00010001DSC", srl_3 = "00000002DTA", rotr_3 = "00200002DTA", sra_3 = "00000003DTA", sllv_3 = "00000004DTS", srlv_3 = "00000006DTS", rotrv_3 = "00000046DTS", srav_3 = "00000007DTS", jr_1 = "00000008S", jalr_1 = "0000f809S", jalr_2 = "00000009DS", movz_3 = "0000000aDST", movn_3 = "0000000bDST", syscall_0 = "0000000c", syscall_1 = "0000000cY", break_0 = "0000000d", break_1 = "0000000dY", sync_0 = "0000000f", mfhi_1 = "00000010D", mthi_1 = "00000011S", mflo_1 = "00000012D", mtlo_1 = "00000013S", mult_2 = "00000018ST", multu_2 = "00000019ST", div_2 = "0000001aST", divu_2 = "0000001bST", add_3 = "00000020DST", move_2 = "00000021DS", addu_3 = "00000021DST", sub_3 = "00000022DST", negu_2 = "00000023DT", subu_3 = "00000023DST", and_3 = "00000024DST", or_3 = "00000025DST", xor_3 = "00000026DST", not_2 = "00000027DS", nor_3 = "00000027DST", slt_3 = "0000002aDST", sltu_3 = "0000002bDST", tge_2 = "00000030ST", tge_3 = "00000030STZ", tgeu_2 = "00000031ST", tgeu_3 = "00000031STZ", tlt_2 = "00000032ST", tlt_3 = "00000032STZ", tltu_2 = "00000033ST", tltu_3 = "00000033STZ", teq_2 = "00000034ST", teq_3 = "00000034STZ", tne_2 = "00000036ST", tne_3 = "00000036STZ", -- Opcode REGIMM. bltz_2 = "04000000SB", bgez_2 = "04010000SB", bltzl_2 = "04020000SB", bgezl_2 = "04030000SB", tgei_2 = "04080000SI", tgeiu_2 = "04090000SI", tlti_2 = "040a0000SI", tltiu_2 = "040b0000SI", teqi_2 = "040c0000SI", tnei_2 = "040e0000SI", bltzal_2 = "04100000SB", bal_1 = "04110000B", bgezal_2 = "04110000SB", bltzall_2 = "04120000SB", bgezall_2 = "04130000SB", synci_1 = "041f0000O", -- Opcode SPECIAL2. madd_2 = "70000000ST", maddu_2 = "70000001ST", mul_3 = "70000002DST", msub_2 = "70000004ST", msubu_2 = "70000005ST", clz_2 = "70000020DS=", clo_2 = "70000021DS=", sdbbp_0 = "7000003f", sdbbp_1 = "7000003fY", -- Opcode SPECIAL3. ext_4 = "7c000000TSAM", -- Note: last arg is msbd = size-1 ins_4 = "7c000004TSAM", -- Note: last arg is msb = pos+size-1 wsbh_2 = "7c0000a0DT", seb_2 = "7c000420DT", seh_2 = "7c000620DT", rdhwr_2 = "7c00003bTD", -- Opcode COP0. mfc0_2 = "40000000TD", mfc0_3 = "40000000TDW", mtc0_2 = "40800000TD", mtc0_3 = "40800000TDW", rdpgpr_2 = "41400000DT", di_0 = "41606000", di_1 = "41606000T", ei_0 = "41606020", ei_1 = "41606020T", wrpgpr_2 = "41c00000DT", tlbr_0 = "42000001", tlbwi_0 = "42000002", tlbwr_0 = "42000006", tlbp_0 = "42000008", eret_0 = "42000018", deret_0 = "4200001f", wait_0 = "42000020", -- Opcode COP1. mfc1_2 = "44000000TG", cfc1_2 = "44400000TG", mfhc1_2 = "44600000TG", mtc1_2 = "44800000TG", ctc1_2 = "44c00000TG", mthc1_2 = "44e00000TG", bc1f_1 = "45000000B", bc1f_2 = "45000000CB", bc1t_1 = "45010000B", bc1t_2 = "45010000CB", bc1fl_1 = "45020000B", bc1fl_2 = "45020000CB", bc1tl_1 = "45030000B", bc1tl_2 = "45030000CB", ["add.s_3"] = "46000000FGH", ["sub.s_3"] = "46000001FGH", ["mul.s_3"] = "46000002FGH", ["div.s_3"] = "46000003FGH", ["sqrt.s_2"] = "46000004FG", ["abs.s_2"] = "46000005FG", ["mov.s_2"] = "46000006FG", ["neg.s_2"] = "46000007FG", ["round.l.s_2"] = "46000008FG", ["trunc.l.s_2"] = "46000009FG", ["ceil.l.s_2"] = "4600000aFG", ["floor.l.s_2"] = "4600000bFG", ["round.w.s_2"] = "4600000cFG", ["trunc.w.s_2"] = "4600000dFG", ["ceil.w.s_2"] = "4600000eFG", ["floor.w.s_2"] = "4600000fFG", ["movf.s_2"] = "46000011FG", ["movf.s_3"] = "46000011FGC", ["movt.s_2"] = "46010011FG", ["movt.s_3"] = "46010011FGC", ["movz.s_3"] = "46000012FGT", ["movn.s_3"] = "46000013FGT", ["recip.s_2"] = "46000015FG", ["rsqrt.s_2"] = "46000016FG", ["cvt.d.s_2"] = "46000021FG", ["cvt.w.s_2"] = "46000024FG", ["cvt.l.s_2"] = "46000025FG", ["cvt.ps.s_3"] = "46000026FGH", ["c.f.s_2"] = "46000030GH", ["c.f.s_3"] = "46000030VGH", ["c.un.s_2"] = "46000031GH", ["c.un.s_3"] = "46000031VGH", ["c.eq.s_2"] = "46000032GH", ["c.eq.s_3"] = "46000032VGH", ["c.ueq.s_2"] = "46000033GH", ["c.ueq.s_3"] = "46000033VGH", ["c.olt.s_2"] = "46000034GH", ["c.olt.s_3"] = "46000034VGH", ["c.ult.s_2"] = "46000035GH", ["c.ult.s_3"] = "46000035VGH", ["c.ole.s_2"] = "46000036GH", ["c.ole.s_3"] = "46000036VGH", ["c.ule.s_2"] = "46000037GH", ["c.ule.s_3"] = "46000037VGH", ["c.sf.s_2"] = "46000038GH", ["c.sf.s_3"] = "46000038VGH", ["c.ngle.s_2"] = "46000039GH", ["c.ngle.s_3"] = "46000039VGH", ["c.seq.s_2"] = "4600003aGH", ["c.seq.s_3"] = "4600003aVGH", ["c.ngl.s_2"] = "4600003bGH", ["c.ngl.s_3"] = "4600003bVGH", ["c.lt.s_2"] = "4600003cGH", ["c.lt.s_3"] = "4600003cVGH", ["c.nge.s_2"] = "4600003dGH", ["c.nge.s_3"] = "4600003dVGH", ["c.le.s_2"] = "4600003eGH", ["c.le.s_3"] = "4600003eVGH", ["c.ngt.s_2"] = "4600003fGH", ["c.ngt.s_3"] = "4600003fVGH", ["add.d_3"] = "46200000FGH", ["sub.d_3"] = "46200001FGH", ["mul.d_3"] = "46200002FGH", ["div.d_3"] = "46200003FGH", ["sqrt.d_2"] = "46200004FG", ["abs.d_2"] = "46200005FG", ["mov.d_2"] = "46200006FG", ["neg.d_2"] = "46200007FG", ["round.l.d_2"] = "46200008FG", ["trunc.l.d_2"] = "46200009FG", ["ceil.l.d_2"] = "4620000aFG", ["floor.l.d_2"] = "4620000bFG", ["round.w.d_2"] = "4620000cFG", ["trunc.w.d_2"] = "4620000dFG", ["ceil.w.d_2"] = "4620000eFG", ["floor.w.d_2"] = "4620000fFG", ["movf.d_2"] = "46200011FG", ["movf.d_3"] = "46200011FGC", ["movt.d_2"] = "46210011FG", ["movt.d_3"] = "46210011FGC", ["movz.d_3"] = "46200012FGT", ["movn.d_3"] = "46200013FGT", ["recip.d_2"] = "46200015FG", ["rsqrt.d_2"] = "46200016FG", ["cvt.s.d_2"] = "46200020FG", ["cvt.w.d_2"] = "46200024FG", ["cvt.l.d_2"] = "46200025FG", ["c.f.d_2"] = "46200030GH", ["c.f.d_3"] = "46200030VGH", ["c.un.d_2"] = "46200031GH", ["c.un.d_3"] = "46200031VGH", ["c.eq.d_2"] = "46200032GH", ["c.eq.d_3"] = "46200032VGH", ["c.ueq.d_2"] = "46200033GH", ["c.ueq.d_3"] = "46200033VGH", ["c.olt.d_2"] = "46200034GH", ["c.olt.d_3"] = "46200034VGH", ["c.ult.d_2"] = "46200035GH", ["c.ult.d_3"] = "46200035VGH", ["c.ole.d_2"] = "46200036GH", ["c.ole.d_3"] = "46200036VGH", ["c.ule.d_2"] = "46200037GH", ["c.ule.d_3"] = "46200037VGH", ["c.sf.d_2"] = "46200038GH", ["c.sf.d_3"] = "46200038VGH", ["c.ngle.d_2"] = "46200039GH", ["c.ngle.d_3"] = "46200039VGH", ["c.seq.d_2"] = "4620003aGH", ["c.seq.d_3"] = "4620003aVGH", ["c.ngl.d_2"] = "4620003bGH", ["c.ngl.d_3"] = "4620003bVGH", ["c.lt.d_2"] = "4620003cGH", ["c.lt.d_3"] = "4620003cVGH", ["c.nge.d_2"] = "4620003dGH", ["c.nge.d_3"] = "4620003dVGH", ["c.le.d_2"] = "4620003eGH", ["c.le.d_3"] = "4620003eVGH", ["c.ngt.d_2"] = "4620003fGH", ["c.ngt.d_3"] = "4620003fVGH", ["add.ps_3"] = "46c00000FGH", ["sub.ps_3"] = "46c00001FGH", ["mul.ps_3"] = "46c00002FGH", ["abs.ps_2"] = "46c00005FG", ["mov.ps_2"] = "46c00006FG", ["neg.ps_2"] = "46c00007FG", ["movf.ps_2"] = "46c00011FG", ["movf.ps_3"] = "46c00011FGC", ["movt.ps_2"] = "46c10011FG", ["movt.ps_3"] = "46c10011FGC", ["movz.ps_3"] = "46c00012FGT", ["movn.ps_3"] = "46c00013FGT", ["cvt.s.pu_2"] = "46c00020FG", ["cvt.s.pl_2"] = "46c00028FG", ["pll.ps_3"] = "46c0002cFGH", ["plu.ps_3"] = "46c0002dFGH", ["pul.ps_3"] = "46c0002eFGH", ["puu.ps_3"] = "46c0002fFGH", ["c.f.ps_2"] = "46c00030GH", ["c.f.ps_3"] = "46c00030VGH", ["c.un.ps_2"] = "46c00031GH", ["c.un.ps_3"] = "46c00031VGH", ["c.eq.ps_2"] = "46c00032GH", ["c.eq.ps_3"] = "46c00032VGH", ["c.ueq.ps_2"] = "46c00033GH", ["c.ueq.ps_3"] = "46c00033VGH", ["c.olt.ps_2"] = "46c00034GH", ["c.olt.ps_3"] = "46c00034VGH", ["c.ult.ps_2"] = "46c00035GH", ["c.ult.ps_3"] = "46c00035VGH", ["c.ole.ps_2"] = "46c00036GH", ["c.ole.ps_3"] = "46c00036VGH", ["c.ule.ps_2"] = "46c00037GH", ["c.ule.ps_3"] = "46c00037VGH", ["c.sf.ps_2"] = "46c00038GH", ["c.sf.ps_3"] = "46c00038VGH", ["c.ngle.ps_2"] = "46c00039GH", ["c.ngle.ps_3"] = "46c00039VGH", ["c.seq.ps_2"] = "46c0003aGH", ["c.seq.ps_3"] = "46c0003aVGH", ["c.ngl.ps_2"] = "46c0003bGH", ["c.ngl.ps_3"] = "46c0003bVGH", ["c.lt.ps_2"] = "46c0003cGH", ["c.lt.ps_3"] = "46c0003cVGH", ["c.nge.ps_2"] = "46c0003dGH", ["c.nge.ps_3"] = "46c0003dVGH", ["c.le.ps_2"] = "46c0003eGH", ["c.le.ps_3"] = "46c0003eVGH", ["c.ngt.ps_2"] = "46c0003fGH", ["c.ngt.ps_3"] = "46c0003fVGH", ["cvt.s.w_2"] = "46800020FG", ["cvt.d.w_2"] = "46800021FG", ["cvt.s.l_2"] = "46a00020FG", ["cvt.d.l_2"] = "46a00021FG", -- Opcode COP1X. lwxc1_2 = "4c000000FX", ldxc1_2 = "4c000001FX", luxc1_2 = "4c000005FX", swxc1_2 = "4c000008FX", sdxc1_2 = "4c000009FX", suxc1_2 = "4c00000dFX", prefx_2 = "4c00000fMX", ["alnv.ps_4"] = "4c00001eFGHS", ["madd.s_4"] = "4c000020FRGH", ["madd.d_4"] = "4c000021FRGH", ["madd.ps_4"] = "4c000026FRGH", ["msub.s_4"] = "4c000028FRGH", ["msub.d_4"] = "4c000029FRGH", ["msub.ps_4"] = "4c00002eFRGH", ["nmadd.s_4"] = "4c000030FRGH", ["nmadd.d_4"] = "4c000031FRGH", ["nmadd.ps_4"] = "4c000036FRGH", ["nmsub.s_4"] = "4c000038FRGH", ["nmsub.d_4"] = "4c000039FRGH", ["nmsub.ps_4"] = "4c00003eFRGH", } ------------------------------------------------------------------------------ local function parse_gpr(expr) local tname, ovreg = match(expr, "^([%w_]+):(r[1-3]?[0-9])$") local tp = map_type[tname or expr] if tp then local reg = ovreg or tp.reg if not reg then werror("type `"..(tname or expr).."' needs a register override") end expr = reg end local r = match(expr, "^r([1-3]?[0-9])$") if r then r = tonumber(r) if r <= 31 then return r, tp end end werror("bad register name `"..expr.."'") end local function parse_fpr(expr) local r = match(expr, "^f([1-3]?[0-9])$") if r then r = tonumber(r) if r <= 31 then return r end end werror("bad register name `"..expr.."'") end local function parse_imm(imm, bits, shift, scale, signed) local n = tonumber(imm) if n then local m = sar(n, scale) if shl(m, scale) == n then if signed then local s = sar(m, bits-1) if s == 0 then return shl(m, shift) elseif s == -1 then return shl(m + shl(1, bits), shift) end else if sar(m, bits) == 0 then return shl(m, shift) end end end werror("out of range immediate `"..imm.."'") elseif match(imm, "^[rf]([1-3]?[0-9])$") or match(imm, "^([%w_]+):([rf][1-3]?[0-9])$") then werror("expected immediate operand, got register") else waction("IMM", (signed and 32768 or 0)+scale*1024+bits*32+shift, imm) return 0 end end local function parse_disp(disp) local imm, reg = match(disp, "^(.*)%(([%w_:]+)%)$") if imm then local r = shl(parse_gpr(reg), 21) local extname = match(imm, "^extern%s+(%S+)$") if extname then waction("REL_EXT", map_extern[extname], nil, 1) return r else return r + parse_imm(imm, 16, 0, 0, true) end end local reg, tailr = match(disp, "^([%w_:]+)%s*(.*)$") if reg and tailr ~= "" then local r, tp = parse_gpr(reg) if tp then waction("IMM", 32768+16*32, format(tp.ctypefmt, tailr)) return shl(r, 21) end end werror("bad displacement `"..disp.."'") end local function parse_index(idx) local rt, rs = match(idx, "^(.*)%(([%w_:]+)%)$") if rt then rt = parse_gpr(rt) rs = parse_gpr(rs) return shl(rt, 16) + shl(rs, 21) end werror("bad index `"..idx.."'") end local function parse_label(label, def) local prefix = sub(label, 1, 2) -- =>label (pc label reference) if prefix == "=>" then return "PC", 0, sub(label, 3) end -- ->name (global label reference) if prefix == "->" then return "LG", map_global[sub(label, 3)] end if def then -- [1-9] (local label definition) if match(label, "^[1-9]$") then return "LG", 10+tonumber(label) end else -- [<>][1-9] (local label reference) local dir, lnum = match(label, "^([<>])([1-9])$") if dir then -- Fwd: 1-9, Bkwd: 11-19. return "LG", lnum + (dir == ">" and 0 or 10) end -- extern label (extern label reference) local extname = match(label, "^extern%s+(%S+)$") if extname then return "EXT", map_extern[extname] end end werror("bad label `"..label.."'") end ------------------------------------------------------------------------------ -- Handle opcodes defined with template strings. map_op[".template__"] = function(params, template, nparams) if not params then return sub(template, 9) end local op = tonumber(sub(template, 1, 8), 16) local n = 1 -- Limit number of section buffer positions used by a single dasm_put(). -- A single opcode needs a maximum of 2 positions (ins/ext). if secpos+2 > maxsecpos then wflush() end local pos = wpos() -- Process each character. for p in gmatch(sub(template, 9), ".") do if p == "D" then op = op + shl(parse_gpr(params[n]), 11); n = n + 1 elseif p == "T" then op = op + shl(parse_gpr(params[n]), 16); n = n + 1 elseif p == "S" then op = op + shl(parse_gpr(params[n]), 21); n = n + 1 elseif p == "F" then op = op + shl(parse_fpr(params[n]), 6); n = n + 1 elseif p == "G" then op = op + shl(parse_fpr(params[n]), 11); n = n + 1 elseif p == "H" then op = op + shl(parse_fpr(params[n]), 16); n = n + 1 elseif p == "R" then op = op + shl(parse_fpr(params[n]), 21); n = n + 1 elseif p == "I" then op = op + parse_imm(params[n], 16, 0, 0, true); n = n + 1 elseif p == "U" then op = op + parse_imm(params[n], 16, 0, 0, false); n = n + 1 elseif p == "O" then op = op + parse_disp(params[n]); n = n + 1 elseif p == "X" then op = op + parse_index(params[n]); n = n + 1 elseif p == "B" or p == "J" then local mode, n, s = parse_label(params[n], false) if p == "B" then n = n + 2048 end waction("REL_"..mode, n, s, 1) n = n + 1 elseif p == "A" then op = op + parse_imm(params[n], 5, 6, 0, false); n = n + 1 elseif p == "M" then op = op + parse_imm(params[n], 5, 11, 0, false); n = n + 1 elseif p == "N" then op = op + parse_imm(params[n], 5, 16, 0, false); n = n + 1 elseif p == "C" then op = op + parse_imm(params[n], 3, 18, 0, false); n = n + 1 elseif p == "V" then op = op + parse_imm(params[n], 3, 8, 0, false); n = n + 1 elseif p == "W" then op = op + parse_imm(params[n], 3, 0, 0, false); n = n + 1 elseif p == "Y" then op = op + parse_imm(params[n], 20, 6, 0, false); n = n + 1 elseif p == "Z" then op = op + parse_imm(params[n], 10, 6, 0, false); n = n + 1 elseif p == "=" then op = op + shl(band(op, 0xf800), 5) -- Copy D to T for clz, clo. else assert(false) end end wputpos(pos, op) end ------------------------------------------------------------------------------ -- Pseudo-opcode to mark the position where the action list is to be emitted. map_op[".actionlist_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeactions(out, name) end) end -- Pseudo-opcode to mark the position where the global enum is to be emitted. map_op[".globals_1"] = function(params) if not params then return "prefix" end local prefix = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobals(out, prefix) end) end -- Pseudo-opcode to mark the position where the global names are to be emitted. map_op[".globalnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobalnames(out, name) end) end -- Pseudo-opcode to mark the position where the extern names are to be emitted. map_op[".externnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeexternnames(out, name) end) end ------------------------------------------------------------------------------ -- Label pseudo-opcode (converted from trailing colon form). map_op[".label_1"] = function(params) if not params then return "[1-9] | ->global | =>pcexpr" end if secpos+1 > maxsecpos then wflush() end local mode, n, s = parse_label(params[1], true) if mode == "EXT" then werror("bad label definition") end waction("LABEL_"..mode, n, s, 1) end ------------------------------------------------------------------------------ -- Pseudo-opcodes for data storage. map_op[".long_*"] = function(params) if not params then return "imm..." end for _,p in ipairs(params) do local n = tonumber(p) if not n then werror("bad immediate `"..p.."'") end if n < 0 then n = n + 2^32 end wputw(n) if secpos+2 > maxsecpos then wflush() end end end -- Alignment pseudo-opcode. map_op[".align_1"] = function(params) if not params then return "numpow2" end if secpos+1 > maxsecpos then wflush() end local align = tonumber(params[1]) if align then local x = align -- Must be a power of 2 in the range (2 ... 256). for i=1,8 do x = x / 2 if x == 1 then waction("ALIGN", align-1, nil, 1) -- Action byte is 2**n-1. return end end end werror("bad alignment") end ------------------------------------------------------------------------------ -- Pseudo-opcode for (primitive) type definitions (map to C types). map_op[".type_3"] = function(params, nparams) if not params then return nparams == 2 and "name, ctype" or "name, ctype, reg" end local name, ctype, reg = params[1], params[2], params[3] if not match(name, "^[%a_][%w_]*$") then werror("bad type name `"..name.."'") end local tp = map_type[name] if tp then werror("duplicate type `"..name.."'") end -- Add #type to defines. A bit unclean to put it in map_archdef. map_archdef["#"..name] = "sizeof("..ctype..")" -- Add new type and emit shortcut define. local num = ctypenum + 1 map_type[name] = { ctype = ctype, ctypefmt = format("Dt%X(%%s)", num), reg = reg, } wline(format("#define Dt%X(_V) (int)(ptrdiff_t)&(((%s *)0)_V)", num, ctype)) ctypenum = num end map_op[".type_2"] = map_op[".type_3"] -- Dump type definitions. local function dumptypes(out, lvl) local t = {} for name in pairs(map_type) do t[#t+1] = name end sort(t) out:write("Type definitions:\n") for _,name in ipairs(t) do local tp = map_type[name] local reg = tp.reg or "" out:write(format(" %-20s %-20s %s\n", name, tp.ctype, reg)) end out:write("\n") end ------------------------------------------------------------------------------ -- Set the current section. function _M.section(num) waction("SECTION", num) wflush(true) -- SECTION is a terminal action. end ------------------------------------------------------------------------------ -- Dump architecture description. function _M.dumparch(out) out:write(format("DynASM %s version %s, released %s\n\n", _info.arch, _info.version, _info.release)) dumpactions(out) end -- Dump all user defined elements. function _M.dumpdef(out, lvl) dumptypes(out, lvl) dumpglobals(out, lvl) dumpexterns(out, lvl) end ------------------------------------------------------------------------------ -- Pass callbacks from/to the DynASM core. function _M.passcb(wl, we, wf, ww) wline, werror, wfatal, wwarn = wl, we, wf, ww return wflush end -- Setup the arch-specific module. function _M.setup(arch, opt) g_arch, g_opt = arch, opt end -- Merge the core maps and the arch-specific maps. function _M.mergemaps(map_coreop, map_def) setmetatable(map_op, { __index = map_coreop }) setmetatable(map_def, { __index = map_archdef }) return map_op, map_def end return _M ------------------------------------------------------------------------------ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_x86.lua0000664000000000000000000016260312231715321023235 0ustar rootroot------------------------------------------------------------------------------ -- DynASM x86/x64 module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ local x64 = x64 -- Module information: local _info = { arch = x64 and "x64" or "x86", description = "DynASM x86/x64 module", version = "1.3.0", vernum = 10300, release = "2011-05-05", author = "Mike Pall", license = "MIT", } -- Exported glue functions for the arch-specific module. local _M = { _info = _info } -- Cache library functions. local type, tonumber, pairs, ipairs = type, tonumber, pairs, ipairs local assert, unpack, setmetatable = assert, unpack or table.unpack, setmetatable local _s = string local sub, format, byte, char = _s.sub, _s.format, _s.byte, _s.char local find, match, gmatch, gsub = _s.find, _s.match, _s.gmatch, _s.gsub local concat, sort = table.concat, table.sort local bit = bit or require("bit") local band, shl, shr = bit.band, bit.lshift, bit.rshift -- Inherited tables and callbacks. local g_opt, g_arch local wline, werror, wfatal, wwarn -- Action name list. -- CHECK: Keep this in sync with the C code! local action_names = { -- int arg, 1 buffer pos: "DISP", "IMM_S", "IMM_B", "IMM_W", "IMM_D", "IMM_WB", "IMM_DB", -- action arg (1 byte), int arg, 1 buffer pos (reg/num): "VREG", "SPACE", -- !x64: VREG support NYI. -- ptrdiff_t arg, 1 buffer pos (address): !x64 "SETLABEL", "REL_A", -- action arg (1 byte) or int arg, 2 buffer pos (link, offset): "REL_LG", "REL_PC", -- action arg (1 byte) or int arg, 1 buffer pos (link): "IMM_LG", "IMM_PC", -- action arg (1 byte) or int arg, 1 buffer pos (offset): "LABEL_LG", "LABEL_PC", -- action arg (1 byte), 1 buffer pos (offset): "ALIGN", -- action args (2 bytes), no buffer pos. "EXTERN", -- action arg (1 byte), no buffer pos. "ESC", -- no action arg, no buffer pos. "MARK", -- action arg (1 byte), no buffer pos, terminal action: "SECTION", -- no args, no buffer pos, terminal action: "STOP" } -- Maximum number of section buffer positions for dasm_put(). -- CHECK: Keep this in sync with the C code! local maxsecpos = 25 -- Keep this low, to avoid excessively long C lines. -- Action name -> action number (dynamically generated below). local map_action = {} -- First action number. Everything below does not need to be escaped. local actfirst = 256-#action_names -- Action list buffer and string (only used to remove dupes). local actlist = {} local actstr = "" -- Argument list for next dasm_put(). Start with offset 0 into action list. local actargs = { 0 } -- Current number of section buffer positions for dasm_put(). local secpos = 1 ------------------------------------------------------------------------------ -- Compute action numbers for action names. for n,name in ipairs(action_names) do local num = actfirst + n - 1 map_action[name] = num end -- Dump action names and numbers. local function dumpactions(out) out:write("DynASM encoding engine action codes:\n") for n,name in ipairs(action_names) do local num = map_action[name] out:write(format(" %-10s %02X %d\n", name, num, num)) end out:write("\n") end -- Write action list buffer as a huge static C array. local function writeactions(out, name) local nn = #actlist local last = actlist[nn] or 255 actlist[nn] = nil -- Remove last byte. if nn == 0 then nn = 1 end out:write("static const unsigned char ", name, "[", nn, "] = {\n") local s = " " for n,b in ipairs(actlist) do s = s..b.."," if #s >= 75 then assert(out:write(s, "\n")) s = " " end end out:write(s, last, "\n};\n\n") -- Add last byte back. end ------------------------------------------------------------------------------ -- Add byte to action list. local function wputxb(n) assert(n >= 0 and n <= 255 and n % 1 == 0, "byte out of range") actlist[#actlist+1] = n end -- Add action to list with optional arg. Advance buffer pos, too. local function waction(action, a, num) wputxb(assert(map_action[action], "bad action name `"..action.."'")) if a then actargs[#actargs+1] = a end if a or num then secpos = secpos + (num or 1) end end -- Add call to embedded DynASM C code. local function wcall(func, args) wline(format("dasm_%s(Dst, %s);", func, concat(args, ", ")), true) end -- Delete duplicate action list chunks. A tad slow, but so what. local function dedupechunk(offset) local al, as = actlist, actstr local chunk = char(unpack(al, offset+1, #al)) local orig = find(as, chunk, 1, true) if orig then actargs[1] = orig-1 -- Replace with original offset. for i=offset+1,#al do al[i] = nil end -- Kill dupe. else actstr = as..chunk end end -- Flush action list (intervening C code or buffer pos overflow). local function wflush(term) local offset = actargs[1] if #actlist == offset then return end -- Nothing to flush. if not term then waction("STOP") end -- Terminate action list. dedupechunk(offset) wcall("put", actargs) -- Add call to dasm_put(). actargs = { #actlist } -- Actionlist offset is 1st arg to next dasm_put(). secpos = 1 -- The actionlist offset occupies a buffer position, too. end -- Put escaped byte. local function wputb(n) if n >= actfirst then waction("ESC") end -- Need to escape byte. wputxb(n) end ------------------------------------------------------------------------------ -- Global label name -> global label number. With auto assignment on 1st use. local next_global = 10 local map_global = setmetatable({}, { __index = function(t, name) if not match(name, "^[%a_][%w_@]*$") then werror("bad global label") end local n = next_global if n > 246 then werror("too many global labels") end next_global = n + 1 t[name] = n return n end}) -- Dump global labels. local function dumpglobals(out, lvl) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("Global labels:\n") for i=10,next_global-1 do out:write(format(" %s\n", t[i])) end out:write("\n") end -- Write global label enum. local function writeglobals(out, prefix) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("enum {\n") for i=10,next_global-1 do out:write(" ", prefix, gsub(t[i], "@.*", ""), ",\n") end out:write(" ", prefix, "_MAX\n};\n") end -- Write global label names. local function writeglobalnames(out, name) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("static const char *const ", name, "[] = {\n") for i=10,next_global-1 do out:write(" \"", t[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Extern label name -> extern label number. With auto assignment on 1st use. local next_extern = -1 local map_extern = setmetatable({}, { __index = function(t, name) -- No restrictions on the name for now. local n = next_extern if n < -256 then werror("too many extern labels") end next_extern = n - 1 t[name] = n return n end}) -- Dump extern labels. local function dumpexterns(out, lvl) local t = {} for name, n in pairs(map_extern) do t[-n] = name end out:write("Extern labels:\n") for i=1,-next_extern-1 do out:write(format(" %s\n", t[i])) end out:write("\n") end -- Write extern label names. local function writeexternnames(out, name) local t = {} for name, n in pairs(map_extern) do t[-n] = name end out:write("static const char *const ", name, "[] = {\n") for i=1,-next_extern-1 do out:write(" \"", t[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Arch-specific maps. local map_archdef = {} -- Ext. register name -> int. name. local map_reg_rev = {} -- Int. register name -> ext. name. local map_reg_num = {} -- Int. register name -> register number. local map_reg_opsize = {} -- Int. register name -> operand size. local map_reg_valid_base = {} -- Int. register name -> valid base register? local map_reg_valid_index = {} -- Int. register name -> valid index register? local map_reg_needrex = {} -- Int. register name -> need rex vs. no rex. local reg_list = {} -- Canonical list of int. register names. local map_type = {} -- Type name -> { ctype, reg } local ctypenum = 0 -- Type number (for _PTx macros). local addrsize = x64 and "q" or "d" -- Size for address operands. -- Helper functions to fill register maps. local function mkrmap(sz, cl, names) local cname = format("@%s", sz) reg_list[#reg_list+1] = cname map_archdef[cl] = cname map_reg_rev[cname] = cl map_reg_num[cname] = -1 map_reg_opsize[cname] = sz if sz == addrsize or sz == "d" then map_reg_valid_base[cname] = true map_reg_valid_index[cname] = true end if names then for n,name in ipairs(names) do local iname = format("@%s%x", sz, n-1) reg_list[#reg_list+1] = iname map_archdef[name] = iname map_reg_rev[iname] = name map_reg_num[iname] = n-1 map_reg_opsize[iname] = sz if sz == "b" and n > 4 then map_reg_needrex[iname] = false end if sz == addrsize or sz == "d" then map_reg_valid_base[iname] = true map_reg_valid_index[iname] = true end end end for i=0,(x64 and sz ~= "f") and 15 or 7 do local needrex = sz == "b" and i > 3 local iname = format("@%s%x%s", sz, i, needrex and "R" or "") if needrex then map_reg_needrex[iname] = true end local name if sz == "o" then name = format("xmm%d", i) elseif sz == "f" then name = format("st%d", i) else name = format("r%d%s", i, sz == addrsize and "" or sz) end map_archdef[name] = iname if not map_reg_rev[iname] then reg_list[#reg_list+1] = iname map_reg_rev[iname] = name map_reg_num[iname] = i map_reg_opsize[iname] = sz if sz == addrsize or sz == "d" then map_reg_valid_base[iname] = true map_reg_valid_index[iname] = true end end end reg_list[#reg_list+1] = "" end -- Integer registers (qword, dword, word and byte sized). if x64 then mkrmap("q", "Rq", {"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi"}) end mkrmap("d", "Rd", {"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"}) mkrmap("w", "Rw", {"ax", "cx", "dx", "bx", "sp", "bp", "si", "di"}) mkrmap("b", "Rb", {"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"}) map_reg_valid_index[map_archdef.esp] = false if x64 then map_reg_valid_index[map_archdef.rsp] = false end map_archdef["Ra"] = "@"..addrsize -- FP registers (internally tword sized, but use "f" as operand size). mkrmap("f", "Rf") -- SSE registers (oword sized, but qword and dword accessible). mkrmap("o", "xmm") -- Operand size prefixes to codes. local map_opsize = { byte = "b", word = "w", dword = "d", qword = "q", oword = "o", tword = "t", aword = addrsize, } -- Operand size code to number. local map_opsizenum = { b = 1, w = 2, d = 4, q = 8, o = 16, t = 10, } -- Operand size code to name. local map_opsizename = { b = "byte", w = "word", d = "dword", q = "qword", o = "oword", t = "tword", f = "fpword", } -- Valid index register scale factors. local map_xsc = { ["1"] = 0, ["2"] = 1, ["4"] = 2, ["8"] = 3, } -- Condition codes. local map_cc = { o = 0, no = 1, b = 2, nb = 3, e = 4, ne = 5, be = 6, nbe = 7, s = 8, ns = 9, p = 10, np = 11, l = 12, nl = 13, le = 14, nle = 15, c = 2, nae = 2, nc = 3, ae = 3, z = 4, nz = 5, na = 6, a = 7, pe = 10, po = 11, nge = 12, ge = 13, ng = 14, g = 15, } -- Reverse defines for registers. function _M.revdef(s) return gsub(s, "@%w+", map_reg_rev) end -- Dump register names and numbers local function dumpregs(out) out:write("Register names, sizes and internal numbers:\n") for _,reg in ipairs(reg_list) do if reg == "" then out:write("\n") else local name = map_reg_rev[reg] local num = map_reg_num[reg] local opsize = map_opsizename[map_reg_opsize[reg]] out:write(format(" %-5s %-8s %s\n", name, opsize, num < 0 and "(variable)" or num)) end end end ------------------------------------------------------------------------------ -- Put action for label arg (IMM_LG, IMM_PC, REL_LG, REL_PC). local function wputlabel(aprefix, imm, num) if type(imm) == "number" then if imm < 0 then waction("EXTERN") wputxb(aprefix == "IMM_" and 0 or 1) imm = -imm-1 else waction(aprefix.."LG", nil, num); end wputxb(imm) else waction(aprefix.."PC", imm, num) end end -- Put signed byte or arg. local function wputsbarg(n) if type(n) == "number" then if n < -128 or n > 127 then werror("signed immediate byte out of range") end if n < 0 then n = n + 256 end wputb(n) else waction("IMM_S", n) end end -- Put unsigned byte or arg. local function wputbarg(n) if type(n) == "number" then if n < 0 or n > 255 then werror("unsigned immediate byte out of range") end wputb(n) else waction("IMM_B", n) end end -- Put unsigned word or arg. local function wputwarg(n) if type(n) == "number" then if shr(n, 16) ~= 0 then werror("unsigned immediate word out of range") end wputb(band(n, 255)); wputb(shr(n, 8)); else waction("IMM_W", n) end end -- Put signed or unsigned dword or arg. local function wputdarg(n) local tn = type(n) if tn == "number" then wputb(band(n, 255)) wputb(band(shr(n, 8), 255)) wputb(band(shr(n, 16), 255)) wputb(shr(n, 24)) elseif tn == "table" then wputlabel("IMM_", n[1], 1) else waction("IMM_D", n) end end -- Put operand-size dependent number or arg (defaults to dword). local function wputszarg(sz, n) if not sz or sz == "d" or sz == "q" then wputdarg(n) elseif sz == "w" then wputwarg(n) elseif sz == "b" then wputbarg(n) elseif sz == "s" then wputsbarg(n) else werror("bad operand size") end end -- Put multi-byte opcode with operand-size dependent modifications. local function wputop(sz, op, rex) local r if rex ~= 0 and not x64 then werror("bad operand size") end if sz == "w" then wputb(102) end -- Needs >32 bit numbers, but only for crc32 eax, word [ebx] if op >= 4294967296 then r = op%4294967296 wputb((op-r)/4294967296) op = r end if op >= 16777216 then wputb(shr(op, 24)); op = band(op, 0xffffff) end if op >= 65536 then if rex ~= 0 then local opc3 = band(op, 0xffff00) if opc3 == 0x0f3a00 or opc3 == 0x0f3800 then wputb(64 + band(rex, 15)); rex = 0 end end wputb(shr(op, 16)); op = band(op, 0xffff) end if op >= 256 then local b = shr(op, 8) if b == 15 and rex ~= 0 then wputb(64 + band(rex, 15)); rex = 0 end wputb(b) op = band(op, 255) end if rex ~= 0 then wputb(64 + band(rex, 15)) end if sz == "b" then op = op - 1 end wputb(op) end -- Put ModRM or SIB formatted byte. local function wputmodrm(m, s, rm, vs, vrm) assert(m < 4 and s < 16 and rm < 16, "bad modrm operands") wputb(shl(m, 6) + shl(band(s, 7), 3) + band(rm, 7)) end -- Put ModRM/SIB plus optional displacement. local function wputmrmsib(t, imark, s, vsreg) local vreg, vxreg local reg, xreg = t.reg, t.xreg if reg and reg < 0 then reg = 0; vreg = t.vreg end if xreg and xreg < 0 then xreg = 0; vxreg = t.vxreg end if s < 0 then s = 0 end -- Register mode. if sub(t.mode, 1, 1) == "r" then wputmodrm(3, s, reg) if vsreg then waction("VREG", vsreg); wputxb(2) end if vreg then waction("VREG", vreg); wputxb(0) end return end local disp = t.disp local tdisp = type(disp) -- No base register? if not reg then local riprel = false if xreg then -- Indexed mode with index register only. -- [xreg*xsc+disp] -> (0, s, esp) (xsc, xreg, ebp) wputmodrm(0, s, 4) if imark == "I" then waction("MARK") end if vsreg then waction("VREG", vsreg); wputxb(2) end wputmodrm(t.xsc, xreg, 5) if vxreg then waction("VREG", vxreg); wputxb(3) end else -- Pure 32 bit displacement. if x64 and tdisp ~= "table" then wputmodrm(0, s, 4) -- [disp] -> (0, s, esp) (0, esp, ebp) if imark == "I" then waction("MARK") end wputmodrm(0, 4, 5) else riprel = x64 wputmodrm(0, s, 5) -- [disp|rip-label] -> (0, s, ebp) if imark == "I" then waction("MARK") end end if vsreg then waction("VREG", vsreg); wputxb(2) end end if riprel then -- Emit rip-relative displacement. if match("UWSiI", imark) then werror("NYI: rip-relative displacement followed by immediate") end -- The previous byte in the action buffer cannot be 0xe9 or 0x80-0x8f. wputlabel("REL_", disp[1], 2) else wputdarg(disp) end return end local m if tdisp == "number" then -- Check displacement size at assembly time. if disp == 0 and band(reg, 7) ~= 5 then -- [ebp] -> [ebp+0] (in SIB, too) if not vreg then m = 0 end -- Force DISP to allow [Rd(5)] -> [ebp+0] elseif disp >= -128 and disp <= 127 then m = 1 else m = 2 end elseif tdisp == "table" then m = 2 end -- Index register present or esp as base register: need SIB encoding. if xreg or band(reg, 7) == 4 then wputmodrm(m or 2, s, 4) -- ModRM. if m == nil or imark == "I" then waction("MARK") end if vsreg then waction("VREG", vsreg); wputxb(2) end wputmodrm(t.xsc or 0, xreg or 4, reg) -- SIB. if vxreg then waction("VREG", vxreg); wputxb(3) end if vreg then waction("VREG", vreg); wputxb(1) end else wputmodrm(m or 2, s, reg) -- ModRM. if (imark == "I" and (m == 1 or m == 2)) or (m == nil and (vsreg or vreg)) then waction("MARK") end if vsreg then waction("VREG", vsreg); wputxb(2) end if vreg then waction("VREG", vreg); wputxb(1) end end -- Put displacement. if m == 1 then wputsbarg(disp) elseif m == 2 then wputdarg(disp) elseif m == nil then waction("DISP", disp) end end ------------------------------------------------------------------------------ -- Return human-readable operand mode string. local function opmodestr(op, args) local m = {} for i=1,#args do local a = args[i] m[#m+1] = sub(a.mode, 1, 1)..(a.opsize or "?") end return op.." "..concat(m, ",") end -- Convert number to valid integer or nil. local function toint(expr) local n = tonumber(expr) if n then if n % 1 ~= 0 or n < -2147483648 or n > 4294967295 then werror("bad integer number `"..expr.."'") end return n end end -- Parse immediate expression. local function immexpr(expr) -- &expr (pointer) if sub(expr, 1, 1) == "&" then return "iPJ", format("(ptrdiff_t)(%s)", sub(expr,2)) end local prefix = sub(expr, 1, 2) -- =>expr (pc label reference) if prefix == "=>" then return "iJ", sub(expr, 3) end -- ->name (global label reference) if prefix == "->" then return "iJ", map_global[sub(expr, 3)] end -- [<>][1-9] (local label reference) local dir, lnum = match(expr, "^([<>])([1-9])$") if dir then -- Fwd: 247-255, Bkwd: 1-9. return "iJ", lnum + (dir == ">" and 246 or 0) end local extname = match(expr, "^extern%s+(%S+)$") if extname then return "iJ", map_extern[extname] end -- expr (interpreted as immediate) return "iI", expr end -- Parse displacement expression: +-num, +-expr, +-opsize*num local function dispexpr(expr) local disp = expr == "" and 0 or toint(expr) if disp then return disp end local c, dispt = match(expr, "^([+-])%s*(.+)$") if c == "+" then expr = dispt elseif not c then werror("bad displacement expression `"..expr.."'") end local opsize, tailops = match(dispt, "^(%w+)%s*%*%s*(.+)$") local ops, imm = map_opsize[opsize], toint(tailops) if ops and imm then if c == "-" then imm = -imm end return imm*map_opsizenum[ops] end local mode, iexpr = immexpr(dispt) if mode == "iJ" then if c == "-" then werror("cannot invert label reference") end return { iexpr } end return expr -- Need to return original signed expression. end -- Parse register or type expression. local function rtexpr(expr) if not expr then return end local tname, ovreg = match(expr, "^([%w_]+):(@[%w_]+)$") local tp = map_type[tname or expr] if tp then local reg = ovreg or tp.reg local rnum = map_reg_num[reg] if not rnum then werror("type `"..(tname or expr).."' needs a register override") end if not map_reg_valid_base[reg] then werror("bad base register override `"..(map_reg_rev[reg] or reg).."'") end return reg, rnum, tp end return expr, map_reg_num[expr] end -- Parse operand and return { mode, opsize, reg, xreg, xsc, disp, imm }. local function parseoperand(param) local t = {} local expr = param local opsize, tailops = match(param, "^(%w+)%s*(.+)$") if opsize then t.opsize = map_opsize[opsize] if t.opsize then expr = tailops end end local br = match(expr, "^%[%s*(.-)%s*%]$") repeat if br then t.mode = "xm" -- [disp] t.disp = toint(br) if t.disp then t.mode = x64 and "xm" or "xmO" break end -- [reg...] local tp local reg, tailr = match(br, "^([@%w_:]+)%s*(.*)$") reg, t.reg, tp = rtexpr(reg) if not t.reg then -- [expr] t.mode = x64 and "xm" or "xmO" t.disp = dispexpr("+"..br) break end if t.reg == -1 then t.vreg, tailr = match(tailr, "^(%b())(.*)$") if not t.vreg then werror("bad variable register expression") end end -- [xreg*xsc] or [xreg*xsc+-disp] or [xreg*xsc+-expr] local xsc, tailsc = match(tailr, "^%*%s*([1248])%s*(.*)$") if xsc then if not map_reg_valid_index[reg] then werror("bad index register `"..map_reg_rev[reg].."'") end t.xsc = map_xsc[xsc] t.xreg = t.reg t.vxreg = t.vreg t.reg = nil t.vreg = nil t.disp = dispexpr(tailsc) break end if not map_reg_valid_base[reg] then werror("bad base register `"..map_reg_rev[reg].."'") end -- [reg] or [reg+-disp] t.disp = toint(tailr) or (tailr == "" and 0) if t.disp then break end -- [reg+xreg...] local xreg, tailx = match(tailr, "^+%s*([@%w_:]+)%s*(.*)$") xreg, t.xreg, tp = rtexpr(xreg) if not t.xreg then -- [reg+-expr] t.disp = dispexpr(tailr) break end if not map_reg_valid_index[xreg] then werror("bad index register `"..map_reg_rev[xreg].."'") end if t.xreg == -1 then t.vxreg, tailx = match(tailx, "^(%b())(.*)$") if not t.vxreg then werror("bad variable register expression") end end -- [reg+xreg*xsc...] local xsc, tailsc = match(tailx, "^%*%s*([1248])%s*(.*)$") if xsc then t.xsc = map_xsc[xsc] tailx = tailsc end -- [...] or [...+-disp] or [...+-expr] t.disp = dispexpr(tailx) else -- imm or opsize*imm local imm = toint(expr) if not imm and sub(expr, 1, 1) == "*" and t.opsize then imm = toint(sub(expr, 2)) if imm then imm = imm * map_opsizenum[t.opsize] t.opsize = nil end end if imm then if t.opsize then werror("bad operand size override") end local m = "i" if imm == 1 then m = m.."1" end if imm >= 4294967168 and imm <= 4294967295 then imm = imm-4294967296 end if imm >= -128 and imm <= 127 then m = m.."S" end t.imm = imm t.mode = m break end local tp local reg, tailr = match(expr, "^([@%w_:]+)%s*(.*)$") reg, t.reg, tp = rtexpr(reg) if t.reg then if t.reg == -1 then t.vreg, tailr = match(tailr, "^(%b())(.*)$") if not t.vreg then werror("bad variable register expression") end end -- reg if tailr == "" then if t.opsize then werror("bad operand size override") end t.opsize = map_reg_opsize[reg] if t.opsize == "f" then t.mode = t.reg == 0 and "fF" or "f" else if reg == "@w4" or (x64 and reg == "@d4") then wwarn("bad idea, try again with `"..(x64 and "rsp'" or "esp'")) end t.mode = t.reg == 0 and "rmR" or (reg == "@b1" and "rmC" or "rm") end t.needrex = map_reg_needrex[reg] break end -- type[idx], type[idx].field, type->field -> [reg+offset_expr] if not tp then werror("bad operand `"..param.."'") end t.mode = "xm" t.disp = format(tp.ctypefmt, tailr) else t.mode, t.imm = immexpr(expr) if sub(t.mode, -1) == "J" then if t.opsize and t.opsize ~= addrsize then werror("bad operand size override") end t.opsize = addrsize end end end until true return t end ------------------------------------------------------------------------------ -- x86 Template String Description -- =============================== -- -- Each template string is a list of [match:]pattern pairs, -- separated by "|". The first match wins. No match means a -- bad or unsupported combination of operand modes or sizes. -- -- The match part and the ":" is omitted if the operation has -- no operands. Otherwise the first N characters are matched -- against the mode strings of each of the N operands. -- -- The mode string for each operand type is (see parseoperand()): -- Integer register: "rm", +"R" for eax, ax, al, +"C" for cl -- FP register: "f", +"F" for st0 -- Index operand: "xm", +"O" for [disp] (pure offset) -- Immediate: "i", +"S" for signed 8 bit, +"1" for 1, -- +"I" for arg, +"P" for pointer -- Any: +"J" for valid jump targets -- -- So a match character "m" (mixed) matches both an integer register -- and an index operand (to be encoded with the ModRM/SIB scheme). -- But "r" matches only a register and "x" only an index operand -- (e.g. for FP memory access operations). -- -- The operand size match string starts right after the mode match -- characters and ends before the ":". "dwb" or "qdwb" is assumed, if empty. -- The effective data size of the operation is matched against this list. -- -- If only the regular "b", "w", "d", "q", "t" operand sizes are -- present, then all operands must be the same size. Unspecified sizes -- are ignored, but at least one operand must have a size or the pattern -- won't match (use the "byte", "word", "dword", "qword", "tword" -- operand size overrides. E.g.: mov dword [eax], 1). -- -- If the list has a "1" or "2" prefix, the operand size is taken -- from the respective operand and any other operand sizes are ignored. -- If the list contains only ".", all operand sizes are ignored. -- If the list has a "/" prefix, the concatenated (mixed) operand sizes -- are compared to the match. -- -- E.g. "rrdw" matches for either two dword registers or two word -- registers. "Fx2dq" matches an st0 operand plus an index operand -- pointing to a dword (float) or qword (double). -- -- Every character after the ":" is part of the pattern string: -- Hex chars are accumulated to form the opcode (left to right). -- "n" disables the standard opcode mods -- (otherwise: -1 for "b", o16 prefix for "w", rex.w for "q") -- "X" Force REX.W. -- "r"/"R" adds the reg. number from the 1st/2nd operand to the opcode. -- "m"/"M" generates ModRM/SIB from the 1st/2nd operand. -- The spare 3 bits are either filled with the last hex digit or -- the result from a previous "r"/"R". The opcode is restored. -- -- All of the following characters force a flush of the opcode: -- "o"/"O" stores a pure 32 bit disp (offset) from the 1st/2nd operand. -- "S" stores a signed 8 bit immediate from the last operand. -- "U" stores an unsigned 8 bit immediate from the last operand. -- "W" stores an unsigned 16 bit immediate from the last operand. -- "i" stores an operand sized immediate from the last operand. -- "I" dito, but generates an action code to optionally modify -- the opcode (+2) for a signed 8 bit immediate. -- "J" generates one of the REL action codes from the last operand. -- ------------------------------------------------------------------------------ -- Template strings for x86 instructions. Ordered by first opcode byte. -- Unimplemented opcodes (deliberate omissions) are marked with *. local map_op = { -- 00-05: add... -- 06: *push es -- 07: *pop es -- 08-0D: or... -- 0E: *push cs -- 0F: two byte opcode prefix -- 10-15: adc... -- 16: *push ss -- 17: *pop ss -- 18-1D: sbb... -- 1E: *push ds -- 1F: *pop ds -- 20-25: and... es_0 = "26", -- 27: *daa -- 28-2D: sub... cs_0 = "2E", -- 2F: *das -- 30-35: xor... ss_0 = "36", -- 37: *aaa -- 38-3D: cmp... ds_0 = "3E", -- 3F: *aas inc_1 = x64 and "m:FF0m" or "rdw:40r|m:FF0m", dec_1 = x64 and "m:FF1m" or "rdw:48r|m:FF1m", push_1 = (x64 and "rq:n50r|rw:50r|mq:nFF6m|mw:FF6m" or "rdw:50r|mdw:FF6m").."|S.:6AS|ib:n6Ai|i.:68i", pop_1 = x64 and "rq:n58r|rw:58r|mq:n8F0m|mw:8F0m" or "rdw:58r|mdw:8F0m", -- 60: *pusha, *pushad, *pushaw -- 61: *popa, *popad, *popaw -- 62: *bound rdw,x -- 63: x86: *arpl mw,rw movsxd_2 = x64 and "rm/qd:63rM", fs_0 = "64", gs_0 = "65", o16_0 = "66", a16_0 = not x64 and "67" or nil, a32_0 = x64 and "67", -- 68: push idw -- 69: imul rdw,mdw,idw -- 6A: push ib -- 6B: imul rdw,mdw,S -- 6C: *insb -- 6D: *insd, *insw -- 6E: *outsb -- 6F: *outsd, *outsw -- 70-7F: jcc lb -- 80: add... mb,i -- 81: add... mdw,i -- 82: *undefined -- 83: add... mdw,S test_2 = "mr:85Rm|rm:85rM|Ri:A9ri|mi:F70mi", -- 86: xchg rb,mb -- 87: xchg rdw,mdw -- 88: mov mb,r -- 89: mov mdw,r -- 8A: mov r,mb -- 8B: mov r,mdw -- 8C: *mov mdw,seg lea_2 = "rx1dq:8DrM", -- 8E: *mov seg,mdw -- 8F: pop mdw nop_0 = "90", xchg_2 = "Rrqdw:90R|rRqdw:90r|rm:87rM|mr:87Rm", cbw_0 = "6698", cwde_0 = "98", cdqe_0 = "4898", cwd_0 = "6699", cdq_0 = "99", cqo_0 = "4899", -- 9A: *call iw:idw wait_0 = "9B", fwait_0 = "9B", pushf_0 = "9C", pushfd_0 = not x64 and "9C", pushfq_0 = x64 and "9C", popf_0 = "9D", popfd_0 = not x64 and "9D", popfq_0 = x64 and "9D", sahf_0 = "9E", lahf_0 = "9F", mov_2 = "OR:A3o|RO:A1O|mr:89Rm|rm:8BrM|rib:nB0ri|ridw:B8ri|mi:C70mi", movsb_0 = "A4", movsw_0 = "66A5", movsd_0 = "A5", cmpsb_0 = "A6", cmpsw_0 = "66A7", cmpsd_0 = "A7", -- A8: test Rb,i -- A9: test Rdw,i stosb_0 = "AA", stosw_0 = "66AB", stosd_0 = "AB", lodsb_0 = "AC", lodsw_0 = "66AD", lodsd_0 = "AD", scasb_0 = "AE", scasw_0 = "66AF", scasd_0 = "AF", -- B0-B7: mov rb,i -- B8-BF: mov rdw,i -- C0: rol... mb,i -- C1: rol... mdw,i ret_1 = "i.:nC2W", ret_0 = "C3", -- C4: *les rdw,mq -- C5: *lds rdw,mq -- C6: mov mb,i -- C7: mov mdw,i -- C8: *enter iw,ib leave_0 = "C9", -- CA: *retf iw -- CB: *retf int3_0 = "CC", int_1 = "i.:nCDU", into_0 = "CE", -- CF: *iret -- D0: rol... mb,1 -- D1: rol... mdw,1 -- D2: rol... mb,cl -- D3: rol... mb,cl -- D4: *aam ib -- D5: *aad ib -- D6: *salc -- D7: *xlat -- D8-DF: floating point ops -- E0: *loopne -- E1: *loope -- E2: *loop -- E3: *jcxz, *jecxz -- E4: *in Rb,ib -- E5: *in Rdw,ib -- E6: *out ib,Rb -- E7: *out ib,Rdw call_1 = x64 and "mq:nFF2m|J.:E8nJ" or "md:FF2m|J.:E8J", jmp_1 = x64 and "mq:nFF4m|J.:E9nJ" or "md:FF4m|J.:E9J", -- short: EB -- EA: *jmp iw:idw -- EB: jmp ib -- EC: *in Rb,dx -- ED: *in Rdw,dx -- EE: *out dx,Rb -- EF: *out dx,Rdw lock_0 = "F0", int1_0 = "F1", repne_0 = "F2", repnz_0 = "F2", rep_0 = "F3", repe_0 = "F3", repz_0 = "F3", -- F4: *hlt cmc_0 = "F5", -- F6: test... mb,i; div... mb -- F7: test... mdw,i; div... mdw clc_0 = "F8", stc_0 = "F9", -- FA: *cli cld_0 = "FC", std_0 = "FD", -- FE: inc... mb -- FF: inc... mdw -- misc ops not_1 = "m:F72m", neg_1 = "m:F73m", mul_1 = "m:F74m", imul_1 = "m:F75m", div_1 = "m:F76m", idiv_1 = "m:F77m", imul_2 = "rmqdw:0FAFrM|rIqdw:69rmI|rSqdw:6BrmS|riqdw:69rmi", imul_3 = "rmIqdw:69rMI|rmSqdw:6BrMS|rmiqdw:69rMi", movzx_2 = "rm/db:0FB6rM|rm/qb:|rm/wb:0FB6rM|rm/dw:0FB7rM|rm/qw:", movsx_2 = "rm/db:0FBErM|rm/qb:|rm/wb:0FBErM|rm/dw:0FBFrM|rm/qw:", bswap_1 = "rqd:0FC8r", bsf_2 = "rmqdw:0FBCrM", bsr_2 = "rmqdw:0FBDrM", bt_2 = "mrqdw:0FA3Rm|miqdw:0FBA4mU", btc_2 = "mrqdw:0FBBRm|miqdw:0FBA7mU", btr_2 = "mrqdw:0FB3Rm|miqdw:0FBA6mU", bts_2 = "mrqdw:0FABRm|miqdw:0FBA5mU", rdtsc_0 = "0F31", -- P1+ cpuid_0 = "0FA2", -- P1+ -- floating point ops fst_1 = "ff:DDD0r|xd:D92m|xq:nDD2m", fstp_1 = "ff:DDD8r|xd:D93m|xq:nDD3m|xt:DB7m", fld_1 = "ff:D9C0r|xd:D90m|xq:nDD0m|xt:DB5m", fpop_0 = "DDD8", -- Alias for fstp st0. fist_1 = "xw:nDF2m|xd:DB2m", fistp_1 = "xw:nDF3m|xd:DB3m|xq:nDF7m", fild_1 = "xw:nDF0m|xd:DB0m|xq:nDF5m", fxch_0 = "D9C9", fxch_1 = "ff:D9C8r", fxch_2 = "fFf:D9C8r|Fff:D9C8R", fucom_1 = "ff:DDE0r", fucom_2 = "Fff:DDE0R", fucomp_1 = "ff:DDE8r", fucomp_2 = "Fff:DDE8R", fucomi_1 = "ff:DBE8r", -- P6+ fucomi_2 = "Fff:DBE8R", -- P6+ fucomip_1 = "ff:DFE8r", -- P6+ fucomip_2 = "Fff:DFE8R", -- P6+ fcomi_1 = "ff:DBF0r", -- P6+ fcomi_2 = "Fff:DBF0R", -- P6+ fcomip_1 = "ff:DFF0r", -- P6+ fcomip_2 = "Fff:DFF0R", -- P6+ fucompp_0 = "DAE9", fcompp_0 = "DED9", fldcw_1 = "xw:nD95m", fstcw_1 = "xw:n9BD97m", fnstcw_1 = "xw:nD97m", fstsw_1 = "Rw:n9BDFE0|xw:n9BDD7m", fnstsw_1 = "Rw:nDFE0|xw:nDD7m", fclex_0 = "9BDBE2", fnclex_0 = "DBE2", fnop_0 = "D9D0", -- D9D1-D9DF: unassigned fchs_0 = "D9E0", fabs_0 = "D9E1", -- D9E2: unassigned -- D9E3: unassigned ftst_0 = "D9E4", fxam_0 = "D9E5", -- D9E6: unassigned -- D9E7: unassigned fld1_0 = "D9E8", fldl2t_0 = "D9E9", fldl2e_0 = "D9EA", fldpi_0 = "D9EB", fldlg2_0 = "D9EC", fldln2_0 = "D9ED", fldz_0 = "D9EE", -- D9EF: unassigned f2xm1_0 = "D9F0", fyl2x_0 = "D9F1", fptan_0 = "D9F2", fpatan_0 = "D9F3", fxtract_0 = "D9F4", fprem1_0 = "D9F5", fdecstp_0 = "D9F6", fincstp_0 = "D9F7", fprem_0 = "D9F8", fyl2xp1_0 = "D9F9", fsqrt_0 = "D9FA", fsincos_0 = "D9FB", frndint_0 = "D9FC", fscale_0 = "D9FD", fsin_0 = "D9FE", fcos_0 = "D9FF", -- SSE, SSE2 andnpd_2 = "rmo:660F55rM", andnps_2 = "rmo:0F55rM", andpd_2 = "rmo:660F54rM", andps_2 = "rmo:0F54rM", clflush_1 = "x.:0FAE7m", cmppd_3 = "rmio:660FC2rMU", cmpps_3 = "rmio:0FC2rMU", cmpsd_3 = "rrio:F20FC2rMU|rxi/oq:", cmpss_3 = "rrio:F30FC2rMU|rxi/od:", comisd_2 = "rro:660F2FrM|rx/oq:", comiss_2 = "rro:0F2FrM|rx/od:", cvtdq2pd_2 = "rro:F30FE6rM|rx/oq:", cvtdq2ps_2 = "rmo:0F5BrM", cvtpd2dq_2 = "rmo:F20FE6rM", cvtpd2ps_2 = "rmo:660F5ArM", cvtpi2pd_2 = "rx/oq:660F2ArM", cvtpi2ps_2 = "rx/oq:0F2ArM", cvtps2dq_2 = "rmo:660F5BrM", cvtps2pd_2 = "rro:0F5ArM|rx/oq:", cvtsd2si_2 = "rr/do:F20F2DrM|rr/qo:|rx/dq:|rxq:", cvtsd2ss_2 = "rro:F20F5ArM|rx/oq:", cvtsi2sd_2 = "rm/od:F20F2ArM|rm/oq:F20F2ArXM", cvtsi2ss_2 = "rm/od:F30F2ArM|rm/oq:F30F2ArXM", cvtss2sd_2 = "rro:F30F5ArM|rx/od:", cvtss2si_2 = "rr/do:F20F2CrM|rr/qo:|rxd:|rx/qd:", cvttpd2dq_2 = "rmo:660FE6rM", cvttps2dq_2 = "rmo:F30F5BrM", cvttsd2si_2 = "rr/do:F20F2CrM|rr/qo:|rx/dq:|rxq:", cvttss2si_2 = "rr/do:F30F2CrM|rr/qo:|rxd:|rx/qd:", ldmxcsr_1 = "xd:0FAE2m", lfence_0 = "0FAEE8", maskmovdqu_2 = "rro:660FF7rM", mfence_0 = "0FAEF0", movapd_2 = "rmo:660F28rM|mro:660F29Rm", movaps_2 = "rmo:0F28rM|mro:0F29Rm", movd_2 = "rm/od:660F6ErM|rm/oq:660F6ErXM|mr/do:660F7ERm|mr/qo:", movdqa_2 = "rmo:660F6FrM|mro:660F7FRm", movdqu_2 = "rmo:F30F6FrM|mro:F30F7FRm", movhlps_2 = "rro:0F12rM", movhpd_2 = "rx/oq:660F16rM|xr/qo:n660F17Rm", movhps_2 = "rx/oq:0F16rM|xr/qo:n0F17Rm", movlhps_2 = "rro:0F16rM", movlpd_2 = "rx/oq:660F12rM|xr/qo:n660F13Rm", movlps_2 = "rx/oq:0F12rM|xr/qo:n0F13Rm", movmskpd_2 = "rr/do:660F50rM", movmskps_2 = "rr/do:0F50rM", movntdq_2 = "xro:660FE7Rm", movnti_2 = "xrqd:0FC3Rm", movntpd_2 = "xro:660F2BRm", movntps_2 = "xro:0F2BRm", movq_2 = "rro:F30F7ErM|rx/oq:|xr/qo:n660FD6Rm", movsd_2 = "rro:F20F10rM|rx/oq:|xr/qo:nF20F11Rm", movss_2 = "rro:F30F10rM|rx/od:|xr/do:F30F11Rm", movupd_2 = "rmo:660F10rM|mro:660F11Rm", movups_2 = "rmo:0F10rM|mro:0F11Rm", orpd_2 = "rmo:660F56rM", orps_2 = "rmo:0F56rM", packssdw_2 = "rmo:660F6BrM", packsswb_2 = "rmo:660F63rM", packuswb_2 = "rmo:660F67rM", paddb_2 = "rmo:660FFCrM", paddd_2 = "rmo:660FFErM", paddq_2 = "rmo:660FD4rM", paddsb_2 = "rmo:660FECrM", paddsw_2 = "rmo:660FEDrM", paddusb_2 = "rmo:660FDCrM", paddusw_2 = "rmo:660FDDrM", paddw_2 = "rmo:660FFDrM", pand_2 = "rmo:660FDBrM", pandn_2 = "rmo:660FDFrM", pause_0 = "F390", pavgb_2 = "rmo:660FE0rM", pavgw_2 = "rmo:660FE3rM", pcmpeqb_2 = "rmo:660F74rM", pcmpeqd_2 = "rmo:660F76rM", pcmpeqw_2 = "rmo:660F75rM", pcmpgtb_2 = "rmo:660F64rM", pcmpgtd_2 = "rmo:660F66rM", pcmpgtw_2 = "rmo:660F65rM", pextrw_3 = "rri/do:660FC5rMU|xri/wo:660F3A15nrMU", -- Mem op: SSE4.1 only. pinsrw_3 = "rri/od:660FC4rMU|rxi/ow:", pmaddwd_2 = "rmo:660FF5rM", pmaxsw_2 = "rmo:660FEErM", pmaxub_2 = "rmo:660FDErM", pminsw_2 = "rmo:660FEArM", pminub_2 = "rmo:660FDArM", pmovmskb_2 = "rr/do:660FD7rM", pmulhuw_2 = "rmo:660FE4rM", pmulhw_2 = "rmo:660FE5rM", pmullw_2 = "rmo:660FD5rM", pmuludq_2 = "rmo:660FF4rM", por_2 = "rmo:660FEBrM", prefetchnta_1 = "xb:n0F180m", prefetcht0_1 = "xb:n0F181m", prefetcht1_1 = "xb:n0F182m", prefetcht2_1 = "xb:n0F183m", psadbw_2 = "rmo:660FF6rM", pshufd_3 = "rmio:660F70rMU", pshufhw_3 = "rmio:F30F70rMU", pshuflw_3 = "rmio:F20F70rMU", pslld_2 = "rmo:660FF2rM|rio:660F726mU", pslldq_2 = "rio:660F737mU", psllq_2 = "rmo:660FF3rM|rio:660F736mU", psllw_2 = "rmo:660FF1rM|rio:660F716mU", psrad_2 = "rmo:660FE2rM|rio:660F724mU", psraw_2 = "rmo:660FE1rM|rio:660F714mU", psrld_2 = "rmo:660FD2rM|rio:660F722mU", psrldq_2 = "rio:660F733mU", psrlq_2 = "rmo:660FD3rM|rio:660F732mU", psrlw_2 = "rmo:660FD1rM|rio:660F712mU", psubb_2 = "rmo:660FF8rM", psubd_2 = "rmo:660FFArM", psubq_2 = "rmo:660FFBrM", psubsb_2 = "rmo:660FE8rM", psubsw_2 = "rmo:660FE9rM", psubusb_2 = "rmo:660FD8rM", psubusw_2 = "rmo:660FD9rM", psubw_2 = "rmo:660FF9rM", punpckhbw_2 = "rmo:660F68rM", punpckhdq_2 = "rmo:660F6ArM", punpckhqdq_2 = "rmo:660F6DrM", punpckhwd_2 = "rmo:660F69rM", punpcklbw_2 = "rmo:660F60rM", punpckldq_2 = "rmo:660F62rM", punpcklqdq_2 = "rmo:660F6CrM", punpcklwd_2 = "rmo:660F61rM", pxor_2 = "rmo:660FEFrM", rcpps_2 = "rmo:0F53rM", rcpss_2 = "rro:F30F53rM|rx/od:", rsqrtps_2 = "rmo:0F52rM", rsqrtss_2 = "rmo:F30F52rM", sfence_0 = "0FAEF8", shufpd_3 = "rmio:660FC6rMU", shufps_3 = "rmio:0FC6rMU", stmxcsr_1 = "xd:0FAE3m", ucomisd_2 = "rro:660F2ErM|rx/oq:", ucomiss_2 = "rro:0F2ErM|rx/od:", unpckhpd_2 = "rmo:660F15rM", unpckhps_2 = "rmo:0F15rM", unpcklpd_2 = "rmo:660F14rM", unpcklps_2 = "rmo:0F14rM", xorpd_2 = "rmo:660F57rM", xorps_2 = "rmo:0F57rM", -- SSE3 ops fisttp_1 = "xw:nDF1m|xd:DB1m|xq:nDD1m", addsubpd_2 = "rmo:660FD0rM", addsubps_2 = "rmo:F20FD0rM", haddpd_2 = "rmo:660F7CrM", haddps_2 = "rmo:F20F7CrM", hsubpd_2 = "rmo:660F7DrM", hsubps_2 = "rmo:F20F7DrM", lddqu_2 = "rxo:F20FF0rM", movddup_2 = "rmo:F20F12rM", movshdup_2 = "rmo:F30F16rM", movsldup_2 = "rmo:F30F12rM", -- SSSE3 ops pabsb_2 = "rmo:660F381CrM", pabsd_2 = "rmo:660F381ErM", pabsw_2 = "rmo:660F381DrM", palignr_3 = "rmio:660F3A0FrMU", phaddd_2 = "rmo:660F3802rM", phaddsw_2 = "rmo:660F3803rM", phaddw_2 = "rmo:660F3801rM", phsubd_2 = "rmo:660F3806rM", phsubsw_2 = "rmo:660F3807rM", phsubw_2 = "rmo:660F3805rM", pmaddubsw_2 = "rmo:660F3804rM", pmulhrsw_2 = "rmo:660F380BrM", pshufb_2 = "rmo:660F3800rM", psignb_2 = "rmo:660F3808rM", psignd_2 = "rmo:660F380ArM", psignw_2 = "rmo:660F3809rM", -- SSE4.1 ops blendpd_3 = "rmio:660F3A0DrMU", blendps_3 = "rmio:660F3A0CrMU", blendvpd_3 = "rmRo:660F3815rM", blendvps_3 = "rmRo:660F3814rM", dppd_3 = "rmio:660F3A41rMU", dpps_3 = "rmio:660F3A40rMU", extractps_3 = "mri/do:660F3A17RmU|rri/qo:660F3A17RXmU", insertps_3 = "rrio:660F3A41rMU|rxi/od:", movntdqa_2 = "rmo:660F382ArM", mpsadbw_3 = "rmio:660F3A42rMU", packusdw_2 = "rmo:660F382BrM", pblendvb_3 = "rmRo:660F3810rM", pblendw_3 = "rmio:660F3A0ErMU", pcmpeqq_2 = "rmo:660F3829rM", pextrb_3 = "rri/do:660F3A14nRmU|rri/qo:|xri/bo:", pextrd_3 = "mri/do:660F3A16RmU", pextrq_3 = "mri/qo:660F3A16RmU", -- pextrw is SSE2, mem operand is SSE4.1 only phminposuw_2 = "rmo:660F3841rM", pinsrb_3 = "rri/od:660F3A20nrMU|rxi/ob:", pinsrd_3 = "rmi/od:660F3A22rMU", pinsrq_3 = "rmi/oq:660F3A22rXMU", pmaxsb_2 = "rmo:660F383CrM", pmaxsd_2 = "rmo:660F383DrM", pmaxud_2 = "rmo:660F383FrM", pmaxuw_2 = "rmo:660F383ErM", pminsb_2 = "rmo:660F3838rM", pminsd_2 = "rmo:660F3839rM", pminud_2 = "rmo:660F383BrM", pminuw_2 = "rmo:660F383ArM", pmovsxbd_2 = "rro:660F3821rM|rx/od:", pmovsxbq_2 = "rro:660F3822rM|rx/ow:", pmovsxbw_2 = "rro:660F3820rM|rx/oq:", pmovsxdq_2 = "rro:660F3825rM|rx/oq:", pmovsxwd_2 = "rro:660F3823rM|rx/oq:", pmovsxwq_2 = "rro:660F3824rM|rx/od:", pmovzxbd_2 = "rro:660F3831rM|rx/od:", pmovzxbq_2 = "rro:660F3832rM|rx/ow:", pmovzxbw_2 = "rro:660F3830rM|rx/oq:", pmovzxdq_2 = "rro:660F3835rM|rx/oq:", pmovzxwd_2 = "rro:660F3833rM|rx/oq:", pmovzxwq_2 = "rro:660F3834rM|rx/od:", pmuldq_2 = "rmo:660F3828rM", pmulld_2 = "rmo:660F3840rM", ptest_2 = "rmo:660F3817rM", roundpd_3 = "rmio:660F3A09rMU", roundps_3 = "rmio:660F3A08rMU", roundsd_3 = "rrio:660F3A0BrMU|rxi/oq:", roundss_3 = "rrio:660F3A0ArMU|rxi/od:", -- SSE4.2 ops crc32_2 = "rmqd:F20F38F1rM|rm/dw:66F20F38F1rM|rm/db:F20F38F0rM|rm/qb:", pcmpestri_3 = "rmio:660F3A61rMU", pcmpestrm_3 = "rmio:660F3A60rMU", pcmpgtq_2 = "rmo:660F3837rM", pcmpistri_3 = "rmio:660F3A63rMU", pcmpistrm_3 = "rmio:660F3A62rMU", popcnt_2 = "rmqdw:F30FB8rM", -- SSE4a extrq_2 = "rro:660F79rM", extrq_3 = "riio:660F780mUU", insertq_2 = "rro:F20F79rM", insertq_4 = "rriio:F20F78rMUU", lzcnt_2 = "rmqdw:F30FBDrM", movntsd_2 = "xr/qo:nF20F2BRm", movntss_2 = "xr/do:F30F2BRm", -- popcnt is also in SSE4.2 } ------------------------------------------------------------------------------ -- Arithmetic ops. for name,n in pairs{ add = 0, ["or"] = 1, adc = 2, sbb = 3, ["and"] = 4, sub = 5, xor = 6, cmp = 7 } do local n8 = shl(n, 3) map_op[name.."_2"] = format( "mr:%02XRm|rm:%02XrM|mI1qdw:81%XmI|mS1qdw:83%XmS|Ri1qdwb:%02Xri|mi1qdwb:81%Xmi", 1+n8, 3+n8, n, n, 5+n8, n) end -- Shift ops. for name,n in pairs{ rol = 0, ror = 1, rcl = 2, rcr = 3, shl = 4, shr = 5, sar = 7, sal = 4 } do map_op[name.."_2"] = format("m1:D1%Xm|mC1qdwb:D3%Xm|mi:C1%XmU", n, n, n) end -- Conditional ops. for cc,n in pairs(map_cc) do map_op["j"..cc.."_1"] = format("J.:n0F8%XJ", n) -- short: 7%X map_op["set"..cc.."_1"] = format("mb:n0F9%X2m", n) map_op["cmov"..cc.."_2"] = format("rmqdw:0F4%XrM", n) -- P6+ end -- FP arithmetic ops. for name,n in pairs{ add = 0, mul = 1, com = 2, comp = 3, sub = 4, subr = 5, div = 6, divr = 7 } do local nc = 0xc0 + shl(n, 3) local nr = nc + (n < 4 and 0 or (n % 2 == 0 and 8 or -8)) local fn = "f"..name map_op[fn.."_1"] = format("ff:D8%02Xr|xd:D8%Xm|xq:nDC%Xm", nc, n, n) if n == 2 or n == 3 then map_op[fn.."_2"] = format("Fff:D8%02XR|Fx2d:D8%XM|Fx2q:nDC%XM", nc, n, n) else map_op[fn.."_2"] = format("Fff:D8%02XR|fFf:DC%02Xr|Fx2d:D8%XM|Fx2q:nDC%XM", nc, nr, n, n) map_op[fn.."p_1"] = format("ff:DE%02Xr", nr) map_op[fn.."p_2"] = format("fFf:DE%02Xr", nr) end map_op["fi"..name.."_1"] = format("xd:DA%Xm|xw:nDE%Xm", n, n) end -- FP conditional moves. for cc,n in pairs{ b=0, e=1, be=2, u=3, nb=4, ne=5, nbe=6, nu=7 } do local nc = 0xdac0 + shl(band(n, 3), 3) + shl(band(n, 4), 6) map_op["fcmov"..cc.."_1"] = format("ff:%04Xr", nc) -- P6+ map_op["fcmov"..cc.."_2"] = format("Fff:%04XR", nc) -- P6+ end -- SSE FP arithmetic ops. for name,n in pairs{ sqrt = 1, add = 8, mul = 9, sub = 12, min = 13, div = 14, max = 15 } do map_op[name.."ps_2"] = format("rmo:0F5%XrM", n) map_op[name.."ss_2"] = format("rro:F30F5%XrM|rx/od:", n) map_op[name.."pd_2"] = format("rmo:660F5%XrM", n) map_op[name.."sd_2"] = format("rro:F20F5%XrM|rx/oq:", n) end ------------------------------------------------------------------------------ -- Process pattern string. local function dopattern(pat, args, sz, op, needrex) local digit, addin local opcode = 0 local szov = sz local narg = 1 local rex = 0 -- Limit number of section buffer positions used by a single dasm_put(). -- A single opcode needs a maximum of 5 positions. if secpos+5 > maxsecpos then wflush() end -- Process each character. for c in gmatch(pat.."|", ".") do if match(c, "%x") then -- Hex digit. digit = byte(c) - 48 if digit > 48 then digit = digit - 39 elseif digit > 16 then digit = digit - 7 end opcode = opcode*16 + digit addin = nil elseif c == "n" then -- Disable operand size mods for opcode. szov = nil elseif c == "X" then -- Force REX.W. rex = 8 elseif c == "r" then -- Merge 1st operand regno. into opcode. addin = args[1]; opcode = opcode + (addin.reg % 8) if narg < 2 then narg = 2 end elseif c == "R" then -- Merge 2nd operand regno. into opcode. addin = args[2]; opcode = opcode + (addin.reg % 8) narg = 3 elseif c == "m" or c == "M" then -- Encode ModRM/SIB. local s if addin then s = addin.reg opcode = opcode - band(s, 7) -- Undo regno opcode merge. else s = band(opcode, 15) -- Undo last digit. opcode = shr(opcode, 4) end local nn = c == "m" and 1 or 2 local t = args[nn] if narg <= nn then narg = nn + 1 end if szov == "q" and rex == 0 then rex = rex + 8 end if t.reg and t.reg > 7 then rex = rex + 1 end if t.xreg and t.xreg > 7 then rex = rex + 2 end if s > 7 then rex = rex + 4 end if needrex then rex = rex + 16 end wputop(szov, opcode, rex); opcode = nil local imark = sub(pat, -1) -- Force a mark (ugly). -- Put ModRM/SIB with regno/last digit as spare. wputmrmsib(t, imark, s, addin and addin.vreg) addin = nil else if opcode then -- Flush opcode. if szov == "q" and rex == 0 then rex = rex + 8 end if needrex then rex = rex + 16 end if addin and addin.reg == -1 then wputop(szov, opcode - 7, rex) waction("VREG", addin.vreg); wputxb(0) else if addin and addin.reg > 7 then rex = rex + 1 end wputop(szov, opcode, rex) end opcode = nil end if c == "|" then break end if c == "o" then -- Offset (pure 32 bit displacement). wputdarg(args[1].disp); if narg < 2 then narg = 2 end elseif c == "O" then wputdarg(args[2].disp); narg = 3 else -- Anything else is an immediate operand. local a = args[narg] narg = narg + 1 local mode, imm = a.mode, a.imm if mode == "iJ" and not match("iIJ", c) then werror("bad operand size for label") end if c == "S" then wputsbarg(imm) elseif c == "U" then wputbarg(imm) elseif c == "W" then wputwarg(imm) elseif c == "i" or c == "I" then if mode == "iJ" then wputlabel("IMM_", imm, 1) elseif mode == "iI" and c == "I" then waction(sz == "w" and "IMM_WB" or "IMM_DB", imm) else wputszarg(sz, imm) end elseif c == "J" then if mode == "iPJ" then waction("REL_A", imm) -- !x64 (secpos) else wputlabel("REL_", imm, 2) end else werror("bad char `"..c.."' in pattern `"..pat.."' for `"..op.."'") end end end end end ------------------------------------------------------------------------------ -- Mapping of operand modes to short names. Suppress output with '#'. local map_modename = { r = "reg", R = "eax", C = "cl", x = "mem", m = "mrm", i = "imm", f = "stx", F = "st0", J = "lbl", ["1"] = "1", I = "#", S = "#", O = "#", } -- Return a table/string showing all possible operand modes. local function templatehelp(template, nparams) if nparams == 0 then return "" end local t = {} for tm in gmatch(template, "[^%|]+") do local s = map_modename[sub(tm, 1, 1)] s = s..gsub(sub(tm, 2, nparams), ".", function(c) return ", "..map_modename[c] end) if not match(s, "#") then t[#t+1] = s end end return t end -- Match operand modes against mode match part of template. local function matchtm(tm, args) for i=1,#args do if not match(args[i].mode, sub(tm, i, i)) then return end end return true end -- Handle opcodes defined with template strings. map_op[".template__"] = function(params, template, nparams) if not params then return templatehelp(template, nparams) end local args = {} -- Zero-operand opcodes have no match part. if #params == 0 then dopattern(template, args, "d", params.op, nil) return end -- Determine common operand size (coerce undefined size) or flag as mixed. local sz, szmix, needrex for i,p in ipairs(params) do args[i] = parseoperand(p) local nsz = args[i].opsize if nsz then if sz and sz ~= nsz then szmix = true else sz = nsz end end local nrex = args[i].needrex if nrex ~= nil then if needrex == nil then needrex = nrex elseif needrex ~= nrex then werror("bad mix of byte-addressable registers") end end end -- Try all match:pattern pairs (separated by '|'). local gotmatch, lastpat for tm in gmatch(template, "[^%|]+") do -- Split off size match (starts after mode match) and pattern string. local szm, pat = match(tm, "^(.-):(.*)$", #args+1) if pat == "" then pat = lastpat else lastpat = pat end if matchtm(tm, args) then local prefix = sub(szm, 1, 1) if prefix == "/" then -- Match both operand sizes. if args[1].opsize == sub(szm, 2, 2) and args[2].opsize == sub(szm, 3, 3) then dopattern(pat, args, sz, params.op, needrex) -- Process pattern. return end else -- Match common operand size. local szp = sz if szm == "" then szm = x64 and "qdwb" or "dwb" end -- Default sizes. if prefix == "1" then szp = args[1].opsize; szmix = nil elseif prefix == "2" then szp = args[2].opsize; szmix = nil end if not szmix and (prefix == "." or match(szm, szp or "#")) then dopattern(pat, args, szp, params.op, needrex) -- Process pattern. return end end gotmatch = true end end local msg = "bad operand mode" if gotmatch then if szmix then msg = "mixed operand size" else msg = sz and "bad operand size" or "missing operand size" end end werror(msg.." in `"..opmodestr(params.op, args).."'") end ------------------------------------------------------------------------------ -- x64-specific opcode for 64 bit immediates and displacements. if x64 then function map_op.mov64_2(params) if not params then return { "reg, imm", "reg, [disp]", "[disp], reg" } end if secpos+2 > maxsecpos then wflush() end local opcode, op64, sz, rex, vreg local op64 = match(params[1], "^%[%s*(.-)%s*%]$") if op64 then local a = parseoperand(params[2]) if a.mode ~= "rmR" then werror("bad operand mode") end sz = a.opsize rex = sz == "q" and 8 or 0 opcode = 0xa3 else op64 = match(params[2], "^%[%s*(.-)%s*%]$") local a = parseoperand(params[1]) if op64 then if a.mode ~= "rmR" then werror("bad operand mode") end sz = a.opsize rex = sz == "q" and 8 or 0 opcode = 0xa1 else if sub(a.mode, 1, 1) ~= "r" or a.opsize ~= "q" then werror("bad operand mode") end op64 = params[2] if a.reg == -1 then vreg = a.vreg opcode = 0xb8 else opcode = 0xb8 + band(a.reg, 7) end rex = a.reg > 7 and 9 or 8 end end wputop(sz, opcode, rex) if vreg then waction("VREG", vreg); wputxb(0) end waction("IMM_D", format("(unsigned int)(%s)", op64)) waction("IMM_D", format("(unsigned int)((%s)>>32)", op64)) end end ------------------------------------------------------------------------------ -- Pseudo-opcodes for data storage. local function op_data(params) if not params then return "imm..." end local sz = sub(params.op, 2, 2) if sz == "a" then sz = addrsize end for _,p in ipairs(params) do local a = parseoperand(p) if sub(a.mode, 1, 1) ~= "i" or (a.opsize and a.opsize ~= sz) then werror("bad mode or size in `"..p.."'") end if a.mode == "iJ" then wputlabel("IMM_", a.imm, 1) else wputszarg(sz, a.imm) end if secpos+2 > maxsecpos then wflush() end end end map_op[".byte_*"] = op_data map_op[".sbyte_*"] = op_data map_op[".word_*"] = op_data map_op[".dword_*"] = op_data map_op[".aword_*"] = op_data ------------------------------------------------------------------------------ -- Pseudo-opcode to mark the position where the action list is to be emitted. map_op[".actionlist_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeactions(out, name) end) end -- Pseudo-opcode to mark the position where the global enum is to be emitted. map_op[".globals_1"] = function(params) if not params then return "prefix" end local prefix = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobals(out, prefix) end) end -- Pseudo-opcode to mark the position where the global names are to be emitted. map_op[".globalnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobalnames(out, name) end) end -- Pseudo-opcode to mark the position where the extern names are to be emitted. map_op[".externnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeexternnames(out, name) end) end ------------------------------------------------------------------------------ -- Label pseudo-opcode (converted from trailing colon form). map_op[".label_2"] = function(params) if not params then return "[1-9] | ->global | =>pcexpr [, addr]" end if secpos+2 > maxsecpos then wflush() end local a = parseoperand(params[1]) local mode, imm = a.mode, a.imm if type(imm) == "number" and (mode == "iJ" or (imm >= 1 and imm <= 9)) then -- Local label (1: ... 9:) or global label (->global:). waction("LABEL_LG", nil, 1) wputxb(imm) elseif mode == "iJ" then -- PC label (=>pcexpr:). waction("LABEL_PC", imm) else werror("bad label definition") end -- SETLABEL must immediately follow LABEL_LG/LABEL_PC. local addr = params[2] if addr then local a = parseoperand(addr) if a.mode == "iPJ" then waction("SETLABEL", a.imm) else werror("bad label assignment") end end end map_op[".label_1"] = map_op[".label_2"] ------------------------------------------------------------------------------ -- Alignment pseudo-opcode. map_op[".align_1"] = function(params) if not params then return "numpow2" end if secpos+1 > maxsecpos then wflush() end local align = tonumber(params[1]) or map_opsizenum[map_opsize[params[1]]] if align then local x = align -- Must be a power of 2 in the range (2 ... 256). for i=1,8 do x = x / 2 if x == 1 then waction("ALIGN", nil, 1) wputxb(align-1) -- Action byte is 2**n-1. return end end end werror("bad alignment") end -- Spacing pseudo-opcode. map_op[".space_2"] = function(params) if not params then return "num [, filler]" end if secpos+1 > maxsecpos then wflush() end waction("SPACE", params[1]) local fill = params[2] if fill then fill = tonumber(fill) if not fill or fill < 0 or fill > 255 then werror("bad filler") end end wputxb(fill or 0) end map_op[".space_1"] = map_op[".space_2"] ------------------------------------------------------------------------------ -- Pseudo-opcode for (primitive) type definitions (map to C types). map_op[".type_3"] = function(params, nparams) if not params then return nparams == 2 and "name, ctype" or "name, ctype, reg" end local name, ctype, reg = params[1], params[2], params[3] if not match(name, "^[%a_][%w_]*$") then werror("bad type name `"..name.."'") end local tp = map_type[name] if tp then werror("duplicate type `"..name.."'") end if reg and not map_reg_valid_base[reg] then werror("bad base register `"..(map_reg_rev[reg] or reg).."'") end -- Add #type to defines. A bit unclean to put it in map_archdef. map_archdef["#"..name] = "sizeof("..ctype..")" -- Add new type and emit shortcut define. local num = ctypenum + 1 map_type[name] = { ctype = ctype, ctypefmt = format("Dt%X(%%s)", num), reg = reg, } wline(format("#define Dt%X(_V) (int)(ptrdiff_t)&(((%s *)0)_V)", num, ctype)) ctypenum = num end map_op[".type_2"] = map_op[".type_3"] -- Dump type definitions. local function dumptypes(out, lvl) local t = {} for name in pairs(map_type) do t[#t+1] = name end sort(t) out:write("Type definitions:\n") for _,name in ipairs(t) do local tp = map_type[name] local reg = tp.reg and map_reg_rev[tp.reg] or "" out:write(format(" %-20s %-20s %s\n", name, tp.ctype, reg)) end out:write("\n") end ------------------------------------------------------------------------------ -- Set the current section. function _M.section(num) waction("SECTION") wputxb(num) wflush(true) -- SECTION is a terminal action. end ------------------------------------------------------------------------------ -- Dump architecture description. function _M.dumparch(out) out:write(format("DynASM %s version %s, released %s\n\n", _info.arch, _info.version, _info.release)) dumpregs(out) dumpactions(out) end -- Dump all user defined elements. function _M.dumpdef(out, lvl) dumptypes(out, lvl) dumpglobals(out, lvl) dumpexterns(out, lvl) end ------------------------------------------------------------------------------ -- Pass callbacks from/to the DynASM core. function _M.passcb(wl, we, wf, ww) wline, werror, wfatal, wwarn = wl, we, wf, ww return wflush end -- Setup the arch-specific module. function _M.setup(arch, opt) g_arch, g_opt = arch, opt end -- Merge the core maps and the arch-specific maps. function _M.mergemaps(map_coreop, map_def) setmetatable(map_op, { __index = map_coreop }) setmetatable(map_def, { __index = map_archdef }) return map_op, map_def end return _M ------------------------------------------------------------------------------ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_arm.h0000664000000000000000000003215712202141143023026 0ustar rootroot/* ** DynASM ARM encoding engine. ** Copyright (C) 2005-2013 Mike Pall. All rights reserved. ** Released under the MIT license. See dynasm.lua for full copyright notice. */ #include #include #include #include #define DASM_ARCH "arm" #ifndef DASM_EXTERN #define DASM_EXTERN(a,b,c,d) 0 #endif /* Action definitions. */ enum { DASM_STOP, DASM_SECTION, DASM_ESC, DASM_REL_EXT, /* The following actions need a buffer position. */ DASM_ALIGN, DASM_REL_LG, DASM_LABEL_LG, /* The following actions also have an argument. */ DASM_REL_PC, DASM_LABEL_PC, DASM_IMM, DASM_IMM12, DASM_IMM16, DASM_IMML8, DASM_IMML12, DASM_IMMV8, DASM__MAX }; /* Maximum number of section buffer positions for a single dasm_put() call. */ #define DASM_MAXSECPOS 25 /* DynASM encoder status codes. Action list offset or number are or'ed in. */ #define DASM_S_OK 0x00000000 #define DASM_S_NOMEM 0x01000000 #define DASM_S_PHASE 0x02000000 #define DASM_S_MATCH_SEC 0x03000000 #define DASM_S_RANGE_I 0x11000000 #define DASM_S_RANGE_SEC 0x12000000 #define DASM_S_RANGE_LG 0x13000000 #define DASM_S_RANGE_PC 0x14000000 #define DASM_S_RANGE_REL 0x15000000 #define DASM_S_UNDEF_LG 0x21000000 #define DASM_S_UNDEF_PC 0x22000000 /* Macros to convert positions (8 bit section + 24 bit index). */ #define DASM_POS2IDX(pos) ((pos)&0x00ffffff) #define DASM_POS2BIAS(pos) ((pos)&0xff000000) #define DASM_SEC2POS(sec) ((sec)<<24) #define DASM_POS2SEC(pos) ((pos)>>24) #define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) /* Action list type. */ typedef const unsigned int *dasm_ActList; /* Per-section structure. */ typedef struct dasm_Section { int *rbuf; /* Biased buffer pointer (negative section bias). */ int *buf; /* True buffer pointer. */ size_t bsize; /* Buffer size in bytes. */ int pos; /* Biased buffer position. */ int epos; /* End of biased buffer position - max single put. */ int ofs; /* Byte offset into section. */ } dasm_Section; /* Core structure holding the DynASM encoding state. */ struct dasm_State { size_t psize; /* Allocated size of this structure. */ dasm_ActList actionlist; /* Current actionlist pointer. */ int *lglabels; /* Local/global chain/pos ptrs. */ size_t lgsize; int *pclabels; /* PC label chains/pos ptrs. */ size_t pcsize; void **globals; /* Array of globals (bias -10). */ dasm_Section *section; /* Pointer to active section. */ size_t codesize; /* Total size of all code sections. */ int maxsection; /* 0 <= sectionidx < maxsection. */ int status; /* Status code. */ dasm_Section sections[1]; /* All sections. Alloc-extended. */ }; /* The size of the core structure depends on the max. number of sections. */ #define DASM_PSZ(ms) (sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section)) /* Initialize DynASM state. */ void dasm_init(Dst_DECL, int maxsection) { dasm_State *D; size_t psz = 0; int i; Dst_REF = NULL; DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection)); D = Dst_REF; D->psize = psz; D->lglabels = NULL; D->lgsize = 0; D->pclabels = NULL; D->pcsize = 0; D->globals = NULL; D->maxsection = maxsection; for (i = 0; i < maxsection; i++) { D->sections[i].buf = NULL; /* Need this for pass3. */ D->sections[i].rbuf = D->sections[i].buf - DASM_SEC2POS(i); D->sections[i].bsize = 0; D->sections[i].epos = 0; /* Wrong, but is recalculated after resize. */ } } /* Free DynASM state. */ void dasm_free(Dst_DECL) { dasm_State *D = Dst_REF; int i; for (i = 0; i < D->maxsection; i++) if (D->sections[i].buf) DASM_M_FREE(Dst, D->sections[i].buf, D->sections[i].bsize); if (D->pclabels) DASM_M_FREE(Dst, D->pclabels, D->pcsize); if (D->lglabels) DASM_M_FREE(Dst, D->lglabels, D->lgsize); DASM_M_FREE(Dst, D, D->psize); } /* Setup global label array. Must be called before dasm_setup(). */ void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl) { dasm_State *D = Dst_REF; D->globals = gl - 10; /* Negative bias to compensate for locals. */ DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int)); } /* Grow PC label array. Can be called after dasm_setup(), too. */ void dasm_growpc(Dst_DECL, unsigned int maxpc) { dasm_State *D = Dst_REF; size_t osz = D->pcsize; DASM_M_GROW(Dst, int, D->pclabels, D->pcsize, maxpc*sizeof(int)); memset((void *)(((unsigned char *)D->pclabels)+osz), 0, D->pcsize-osz); } /* Setup encoder. */ void dasm_setup(Dst_DECL, const void *actionlist) { dasm_State *D = Dst_REF; int i; D->actionlist = (dasm_ActList)actionlist; D->status = DASM_S_OK; D->section = &D->sections[0]; memset((void *)D->lglabels, 0, D->lgsize); if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); D->sections[i].ofs = 0; } } #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) { \ D->status = DASM_S_##st|(p-D->actionlist-1); return; } } while (0) #define CKPL(kind, st) \ do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ D->status = DASM_S_RANGE_##st|(p-D->actionlist-1); return; } } while (0) #else #define CK(x, st) ((void)0) #define CKPL(kind, st) ((void)0) #endif static int dasm_imm12(unsigned int n) { int i; for (i = 0; i < 16; i++, n = (n << 2) | (n >> 30)) if (n <= 255) return (int)(n + (i << 8)); return -1; } /* Pass 1: Store actions and args, link branches/labels, estimate offsets. */ void dasm_put(Dst_DECL, int start, ...) { va_list ap; dasm_State *D = Dst_REF; dasm_ActList p = D->actionlist + start; dasm_Section *sec = D->section; int pos = sec->pos, ofs = sec->ofs; int *b; if (pos >= sec->epos) { DASM_M_GROW(Dst, int, sec->buf, sec->bsize, sec->bsize + 2*DASM_MAXSECPOS*sizeof(int)); sec->rbuf = sec->buf - DASM_POS2BIAS(pos); sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); } b = sec->rbuf; b[pos++] = start; va_start(ap, start); while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16); if (action >= DASM__MAX) { ofs += 4; } else { int *pl, n = action >= DASM_REL_PC ? va_arg(ap, int) : 0; switch (action) { case DASM_STOP: goto stop; case DASM_SECTION: n = (ins & 255); CK(n < D->maxsection, RANGE_SEC); D->section = &D->sections[n]; goto stop; case DASM_ESC: p++; ofs += 4; break; case DASM_REL_EXT: break; case DASM_ALIGN: ofs += (ins & 255); b[pos++] = ofs; break; case DASM_REL_LG: n = (ins & 2047) - 10; pl = D->lglabels + n; /* Bkwd rel or global. */ if (n >= 0) { CK(n>=10||*pl<0, RANGE_LG); CKPL(lg, LG); goto putrel; } pl += 10; n = *pl; if (n < 0) n = 0; /* Start new chain for fwd rel if label exists. */ goto linkrel; case DASM_REL_PC: pl = D->pclabels + n; CKPL(pc, PC); putrel: n = *pl; if (n < 0) { /* Label exists. Get label pos and store it. */ b[pos] = -n; } else { linkrel: b[pos] = n; /* Else link to rel chain, anchored at label. */ *pl = pos; } pos++; break; case DASM_LABEL_LG: pl = D->lglabels + (ins & 2047) - 10; CKPL(lg, LG); goto putlabel; case DASM_LABEL_PC: pl = D->pclabels + n; CKPL(pc, PC); putlabel: n = *pl; /* n > 0: Collapse rel chain and replace with label pos. */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; } *pl = -pos; /* Label exists now. */ b[pos++] = ofs; /* Store pass1 offset estimate. */ break; case DASM_IMM: case DASM_IMM16: #ifdef DASM_CHECKS CK((n & ((1<<((ins>>10)&31))-1)) == 0, RANGE_I); if ((ins & 0x8000)) CK(((n + (1<<(((ins>>5)&31)-1)))>>((ins>>5)&31)) == 0, RANGE_I); else CK((n>>((ins>>5)&31)) == 0, RANGE_I); #endif b[pos++] = n; break; case DASM_IMMV8: CK((n & 3) == 0, RANGE_I); n >>= 2; case DASM_IMML8: case DASM_IMML12: CK(n >= 0 ? ((n>>((ins>>5)&31)) == 0) : (((-n)>>((ins>>5)&31)) == 0), RANGE_I); b[pos++] = n; break; case DASM_IMM12: CK(dasm_imm12((unsigned int)n) != -1, RANGE_I); b[pos++] = n; break; } } } stop: va_end(ap); sec->pos = pos; sec->ofs = ofs; } #undef CK /* Pass 2: Link sections, shrink aligns, fix label offsets. */ int dasm_link(Dst_DECL, size_t *szp) { dasm_State *D = Dst_REF; int secnum; int ofs = 0; #ifdef DASM_CHECKS *szp = 0; if (D->status != DASM_S_OK) return D->status; { int pc; for (pc = 0; pc*sizeof(int) < D->pcsize; pc++) if (D->pclabels[pc] > 0) return DASM_S_UNDEF_PC|pc; } #endif { /* Handle globals not defined in this translation unit. */ int idx; for (idx = 20; idx*sizeof(int) < D->lgsize; idx++) { int n = D->lglabels[idx]; /* Undefined label: Collapse rel chain and replace with marker (< 0). */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = -idx; } } } /* Combine all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->rbuf; int pos = DASM_SEC2POS(secnum); int lastpos = sec->pos; while (pos != lastpos) { dasm_ActList p = D->actionlist + b[pos++]; while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16); switch (action) { case DASM_STOP: case DASM_SECTION: goto stop; case DASM_ESC: p++; break; case DASM_REL_EXT: break; case DASM_ALIGN: ofs -= (b[pos++] + ofs) & (ins & 255); break; case DASM_REL_LG: case DASM_REL_PC: pos++; break; case DASM_LABEL_LG: case DASM_LABEL_PC: b[pos++] += ofs; break; case DASM_IMM: case DASM_IMM12: case DASM_IMM16: case DASM_IMML8: case DASM_IMML12: case DASM_IMMV8: pos++; break; } } stop: (void)0; } ofs += sec->ofs; /* Next section starts right after current section. */ } D->codesize = ofs; /* Total size of all code sections */ *szp = ofs; return DASM_S_OK; } #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) return DASM_S_##st|(p-D->actionlist-1); } while (0) #else #define CK(x, st) ((void)0) #endif /* Pass 3: Encode sections. */ int dasm_encode(Dst_DECL, void *buffer) { dasm_State *D = Dst_REF; char *base = (char *)buffer; unsigned int *cp = (unsigned int *)buffer; int secnum; /* Encode all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->buf; int *endb = sec->rbuf + sec->pos; while (b != endb) { dasm_ActList p = D->actionlist + *b++; while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16); int n = (action >= DASM_ALIGN && action < DASM__MAX) ? *b++ : 0; switch (action) { case DASM_STOP: case DASM_SECTION: goto stop; case DASM_ESC: *cp++ = *p++; break; case DASM_REL_EXT: n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins&2047), !(ins&2048)); goto patchrel; case DASM_ALIGN: ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0xe1a00000; break; case DASM_REL_LG: CK(n >= 0, UNDEF_LG); case DASM_REL_PC: CK(n >= 0, UNDEF_PC); n = *DASM_POS2PTR(D, n) - (int)((char *)cp - base) - 4; patchrel: if ((ins & 0x800) == 0) { CK((n & 3) == 0 && ((n+0x02000000) >> 26) == 0, RANGE_REL); cp[-1] |= ((n >> 2) & 0x00ffffff); } else if ((ins & 0x1000)) { CK((n & 3) == 0 && -256 <= n && n <= 256, RANGE_REL); goto patchimml8; } else if ((ins & 0x2000) == 0) { CK((n & 3) == 0 && -4096 <= n && n <= 4096, RANGE_REL); goto patchimml; } else { CK((n & 3) == 0 && -1020 <= n && n <= 1020, RANGE_REL); n >>= 2; goto patchimml; } break; case DASM_LABEL_LG: ins &= 2047; if (ins >= 20) D->globals[ins-10] = (void *)(base + n); break; case DASM_LABEL_PC: break; case DASM_IMM: cp[-1] |= ((n>>((ins>>10)&31)) & ((1<<((ins>>5)&31))-1)) << (ins&31); break; case DASM_IMM12: cp[-1] |= dasm_imm12((unsigned int)n); break; case DASM_IMM16: cp[-1] |= ((n & 0xf000) << 4) | (n & 0x0fff); break; case DASM_IMML8: patchimml8: cp[-1] |= n >= 0 ? (0x00800000 | (n & 0x0f) | ((n & 0xf0) << 4)) : ((-n & 0x0f) | ((-n & 0xf0) << 4)); break; case DASM_IMML12: case DASM_IMMV8: patchimml: cp[-1] |= n >= 0 ? (0x00800000 | n) : (-n); break; default: *cp++ = ins; break; } } stop: (void)0; } } if (base + D->codesize != (char *)cp) /* Check for phase errors. */ return DASM_S_PHASE; return DASM_S_OK; } #undef CK /* Get PC label offset. */ int dasm_getpclabel(Dst_DECL, unsigned int pc) { dasm_State *D = Dst_REF; if (pc*sizeof(int) < D->pcsize) { int pos = D->pclabels[pc]; if (pos < 0) return *DASM_POS2PTR(D, -pos); if (pos > 0) return -1; /* Undefined. */ } return -2; /* Unused or out of range. */ } #ifdef DASM_CHECKS /* Optional sanity checker to call between isolated encoding steps. */ int dasm_checkstep(Dst_DECL, int secmatch) { dasm_State *D = Dst_REF; if (D->status == DASM_S_OK) { int i; for (i = 1; i <= 9; i++) { if (D->lglabels[i] > 0) { D->status = DASM_S_UNDEF_LG|i; break; } D->lglabels[i] = 0; } } if (D->status == DASM_S_OK && secmatch >= 0 && D->section != &D->sections[secmatch]) D->status = DASM_S_MATCH_SEC|(D->section-D->sections); return D->status; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_arm.lua0000664000000000000000000010326312202141143023355 0ustar rootroot------------------------------------------------------------------------------ -- DynASM ARM module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _info = { arch = "arm", description = "DynASM ARM module", version = "1.3.0", vernum = 10300, release = "2011-05-05", author = "Mike Pall", license = "MIT", } -- Exported glue functions for the arch-specific module. local _M = { _info = _info } -- Cache library functions. local type, tonumber, pairs, ipairs = type, tonumber, pairs, ipairs local assert, setmetatable, rawget = assert, setmetatable, rawget local _s = string local sub, format, byte, char = _s.sub, _s.format, _s.byte, _s.char local match, gmatch, gsub = _s.match, _s.gmatch, _s.gsub local concat, sort, insert = table.concat, table.sort, table.insert local bit = bit or require("bit") local band, shl, shr, sar = bit.band, bit.lshift, bit.rshift, bit.arshift local ror, tohex = bit.ror, bit.tohex -- Inherited tables and callbacks. local g_opt, g_arch local wline, werror, wfatal, wwarn -- Action name list. -- CHECK: Keep this in sync with the C code! local action_names = { "STOP", "SECTION", "ESC", "REL_EXT", "ALIGN", "REL_LG", "LABEL_LG", "REL_PC", "LABEL_PC", "IMM", "IMM12", "IMM16", "IMML8", "IMML12", "IMMV8", } -- Maximum number of section buffer positions for dasm_put(). -- CHECK: Keep this in sync with the C code! local maxsecpos = 25 -- Keep this low, to avoid excessively long C lines. -- Action name -> action number. local map_action = {} for n,name in ipairs(action_names) do map_action[name] = n-1 end -- Action list buffer. local actlist = {} -- Argument list for next dasm_put(). Start with offset 0 into action list. local actargs = { 0 } -- Current number of section buffer positions for dasm_put(). local secpos = 1 ------------------------------------------------------------------------------ -- Dump action names and numbers. local function dumpactions(out) out:write("DynASM encoding engine action codes:\n") for n,name in ipairs(action_names) do local num = map_action[name] out:write(format(" %-10s %02X %d\n", name, num, num)) end out:write("\n") end -- Write action list buffer as a huge static C array. local function writeactions(out, name) local nn = #actlist if nn == 0 then nn = 1; actlist[0] = map_action.STOP end out:write("static const unsigned int ", name, "[", nn, "] = {\n") for i = 1,nn-1 do assert(out:write("0x", tohex(actlist[i]), ",\n")) end assert(out:write("0x", tohex(actlist[nn]), "\n};\n\n")) end ------------------------------------------------------------------------------ -- Add word to action list. local function wputxw(n) assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range") actlist[#actlist+1] = n end -- Add action to list with optional arg. Advance buffer pos, too. local function waction(action, val, a, num) local w = assert(map_action[action], "bad action name `"..action.."'") wputxw(w * 0x10000 + (val or 0)) if a then actargs[#actargs+1] = a end if a or num then secpos = secpos + (num or 1) end end -- Flush action list (intervening C code or buffer pos overflow). local function wflush(term) if #actlist == actargs[1] then return end -- Nothing to flush. if not term then waction("STOP") end -- Terminate action list. wline(format("dasm_put(Dst, %s);", concat(actargs, ", ")), true) actargs = { #actlist } -- Actionlist offset is 1st arg to next dasm_put(). secpos = 1 -- The actionlist offset occupies a buffer position, too. end -- Put escaped word. local function wputw(n) if n <= 0x000fffff then waction("ESC") end wputxw(n) end -- Reserve position for word. local function wpos() local pos = #actlist+1 actlist[pos] = "" return pos end -- Store word to reserved position. local function wputpos(pos, n) assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range") if n <= 0x000fffff then insert(actlist, pos+1, n) n = map_action.ESC * 0x10000 end actlist[pos] = n end ------------------------------------------------------------------------------ -- Global label name -> global label number. With auto assignment on 1st use. local next_global = 20 local map_global = setmetatable({}, { __index = function(t, name) if not match(name, "^[%a_][%w_]*$") then werror("bad global label") end local n = next_global if n > 2047 then werror("too many global labels") end next_global = n + 1 t[name] = n return n end}) -- Dump global labels. local function dumpglobals(out, lvl) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("Global labels:\n") for i=20,next_global-1 do out:write(format(" %s\n", t[i])) end out:write("\n") end -- Write global label enum. local function writeglobals(out, prefix) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("enum {\n") for i=20,next_global-1 do out:write(" ", prefix, t[i], ",\n") end out:write(" ", prefix, "_MAX\n};\n") end -- Write global label names. local function writeglobalnames(out, name) local t = {} for name, n in pairs(map_global) do t[n] = name end out:write("static const char *const ", name, "[] = {\n") for i=20,next_global-1 do out:write(" \"", t[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Extern label name -> extern label number. With auto assignment on 1st use. local next_extern = 0 local map_extern_ = {} local map_extern = setmetatable({}, { __index = function(t, name) -- No restrictions on the name for now. local n = next_extern if n > 2047 then werror("too many extern labels") end next_extern = n + 1 t[name] = n map_extern_[n] = name return n end}) -- Dump extern labels. local function dumpexterns(out, lvl) out:write("Extern labels:\n") for i=0,next_extern-1 do out:write(format(" %s\n", map_extern_[i])) end out:write("\n") end -- Write extern label names. local function writeexternnames(out, name) out:write("static const char *const ", name, "[] = {\n") for i=0,next_extern-1 do out:write(" \"", map_extern_[i], "\",\n") end out:write(" (const char *)0\n};\n") end ------------------------------------------------------------------------------ -- Arch-specific maps. -- Ext. register name -> int. name. local map_archdef = { sp = "r13", lr = "r14", pc = "r15", } -- Int. register name -> ext. name. local map_reg_rev = { r13 = "sp", r14 = "lr", r15 = "pc", } local map_type = {} -- Type name -> { ctype, reg } local ctypenum = 0 -- Type number (for Dt... macros). -- Reverse defines for registers. function _M.revdef(s) return map_reg_rev[s] or s end local map_shift = { lsl = 0, lsr = 1, asr = 2, ror = 3, } local map_cond = { eq = 0, ne = 1, cs = 2, cc = 3, mi = 4, pl = 5, vs = 6, vc = 7, hi = 8, ls = 9, ge = 10, lt = 11, gt = 12, le = 13, al = 14, hs = 2, lo = 3, } ------------------------------------------------------------------------------ -- Template strings for ARM instructions. local map_op = { -- Basic data processing instructions. and_3 = "e0000000DNPs", eor_3 = "e0200000DNPs", sub_3 = "e0400000DNPs", rsb_3 = "e0600000DNPs", add_3 = "e0800000DNPs", adc_3 = "e0a00000DNPs", sbc_3 = "e0c00000DNPs", rsc_3 = "e0e00000DNPs", tst_2 = "e1100000NP", teq_2 = "e1300000NP", cmp_2 = "e1500000NP", cmn_2 = "e1700000NP", orr_3 = "e1800000DNPs", mov_2 = "e1a00000DPs", bic_3 = "e1c00000DNPs", mvn_2 = "e1e00000DPs", and_4 = "e0000000DNMps", eor_4 = "e0200000DNMps", sub_4 = "e0400000DNMps", rsb_4 = "e0600000DNMps", add_4 = "e0800000DNMps", adc_4 = "e0a00000DNMps", sbc_4 = "e0c00000DNMps", rsc_4 = "e0e00000DNMps", tst_3 = "e1100000NMp", teq_3 = "e1300000NMp", cmp_3 = "e1500000NMp", cmn_3 = "e1700000NMp", orr_4 = "e1800000DNMps", mov_3 = "e1a00000DMps", bic_4 = "e1c00000DNMps", mvn_3 = "e1e00000DMps", lsl_3 = "e1a00000DMws", lsr_3 = "e1a00020DMws", asr_3 = "e1a00040DMws", ror_3 = "e1a00060DMws", rrx_2 = "e1a00060DMs", -- Multiply and multiply-accumulate. mul_3 = "e0000090NMSs", mla_4 = "e0200090NMSDs", umaal_4 = "e0400090DNMSs", -- v6 mls_4 = "e0600090DNMSs", -- v6T2 umull_4 = "e0800090DNMSs", umlal_4 = "e0a00090DNMSs", smull_4 = "e0c00090DNMSs", smlal_4 = "e0e00090DNMSs", -- Halfword multiply and multiply-accumulate. smlabb_4 = "e1000080NMSD", -- v5TE smlatb_4 = "e10000a0NMSD", -- v5TE smlabt_4 = "e10000c0NMSD", -- v5TE smlatt_4 = "e10000e0NMSD", -- v5TE smlawb_4 = "e1200080NMSD", -- v5TE smulwb_3 = "e12000a0NMS", -- v5TE smlawt_4 = "e12000c0NMSD", -- v5TE smulwt_3 = "e12000e0NMS", -- v5TE smlalbb_4 = "e1400080NMSD", -- v5TE smlaltb_4 = "e14000a0NMSD", -- v5TE smlalbt_4 = "e14000c0NMSD", -- v5TE smlaltt_4 = "e14000e0NMSD", -- v5TE smulbb_3 = "e1600080NMS", -- v5TE smultb_3 = "e16000a0NMS", -- v5TE smulbt_3 = "e16000c0NMS", -- v5TE smultt_3 = "e16000e0NMS", -- v5TE -- Miscellaneous data processing instructions. clz_2 = "e16f0f10DM", -- v5T rev_2 = "e6bf0f30DM", -- v6 rev16_2 = "e6bf0fb0DM", -- v6 revsh_2 = "e6ff0fb0DM", -- v6 sel_3 = "e6800fb0DNM", -- v6 usad8_3 = "e780f010NMS", -- v6 usada8_4 = "e7800010NMSD", -- v6 rbit_2 = "e6ff0f30DM", -- v6T2 movw_2 = "e3000000DW", -- v6T2 movt_2 = "e3400000DW", -- v6T2 -- Note: the X encodes width-1, not width. sbfx_4 = "e7a00050DMvX", -- v6T2 ubfx_4 = "e7e00050DMvX", -- v6T2 -- Note: the X encodes the msb field, not the width. bfc_3 = "e7c0001fDvX", -- v6T2 bfi_4 = "e7c00010DMvX", -- v6T2 -- Packing and unpacking instructions. pkhbt_3 = "e6800010DNM", pkhbt_4 = "e6800010DNMv", -- v6 pkhtb_3 = "e6800050DNM", pkhtb_4 = "e6800050DNMv", -- v6 sxtab_3 = "e6a00070DNM", sxtab_4 = "e6a00070DNMv", -- v6 sxtab16_3 = "e6800070DNM", sxtab16_4 = "e6800070DNMv", -- v6 sxtah_3 = "e6b00070DNM", sxtah_4 = "e6b00070DNMv", -- v6 sxtb_2 = "e6af0070DM", sxtb_3 = "e6af0070DMv", -- v6 sxtb16_2 = "e68f0070DM", sxtb16_3 = "e68f0070DMv", -- v6 sxth_2 = "e6bf0070DM", sxth_3 = "e6bf0070DMv", -- v6 uxtab_3 = "e6e00070DNM", uxtab_4 = "e6e00070DNMv", -- v6 uxtab16_3 = "e6c00070DNM", uxtab16_4 = "e6c00070DNMv", -- v6 uxtah_3 = "e6f00070DNM", uxtah_4 = "e6f00070DNMv", -- v6 uxtb_2 = "e6ef0070DM", uxtb_3 = "e6ef0070DMv", -- v6 uxtb16_2 = "e6cf0070DM", uxtb16_3 = "e6cf0070DMv", -- v6 uxth_2 = "e6ff0070DM", uxth_3 = "e6ff0070DMv", -- v6 -- Saturating instructions. qadd_3 = "e1000050DMN", -- v5TE qsub_3 = "e1200050DMN", -- v5TE qdadd_3 = "e1400050DMN", -- v5TE qdsub_3 = "e1600050DMN", -- v5TE -- Note: the X for ssat* encodes sat_imm-1, not sat_imm. ssat_3 = "e6a00010DXM", ssat_4 = "e6a00010DXMp", -- v6 usat_3 = "e6e00010DXM", usat_4 = "e6e00010DXMp", -- v6 ssat16_3 = "e6a00f30DXM", -- v6 usat16_3 = "e6e00f30DXM", -- v6 -- Parallel addition and subtraction. sadd16_3 = "e6100f10DNM", -- v6 sasx_3 = "e6100f30DNM", -- v6 ssax_3 = "e6100f50DNM", -- v6 ssub16_3 = "e6100f70DNM", -- v6 sadd8_3 = "e6100f90DNM", -- v6 ssub8_3 = "e6100ff0DNM", -- v6 qadd16_3 = "e6200f10DNM", -- v6 qasx_3 = "e6200f30DNM", -- v6 qsax_3 = "e6200f50DNM", -- v6 qsub16_3 = "e6200f70DNM", -- v6 qadd8_3 = "e6200f90DNM", -- v6 qsub8_3 = "e6200ff0DNM", -- v6 shadd16_3 = "e6300f10DNM", -- v6 shasx_3 = "e6300f30DNM", -- v6 shsax_3 = "e6300f50DNM", -- v6 shsub16_3 = "e6300f70DNM", -- v6 shadd8_3 = "e6300f90DNM", -- v6 shsub8_3 = "e6300ff0DNM", -- v6 uadd16_3 = "e6500f10DNM", -- v6 uasx_3 = "e6500f30DNM", -- v6 usax_3 = "e6500f50DNM", -- v6 usub16_3 = "e6500f70DNM", -- v6 uadd8_3 = "e6500f90DNM", -- v6 usub8_3 = "e6500ff0DNM", -- v6 uqadd16_3 = "e6600f10DNM", -- v6 uqasx_3 = "e6600f30DNM", -- v6 uqsax_3 = "e6600f50DNM", -- v6 uqsub16_3 = "e6600f70DNM", -- v6 uqadd8_3 = "e6600f90DNM", -- v6 uqsub8_3 = "e6600ff0DNM", -- v6 uhadd16_3 = "e6700f10DNM", -- v6 uhasx_3 = "e6700f30DNM", -- v6 uhsax_3 = "e6700f50DNM", -- v6 uhsub16_3 = "e6700f70DNM", -- v6 uhadd8_3 = "e6700f90DNM", -- v6 uhsub8_3 = "e6700ff0DNM", -- v6 -- Load/store instructions. str_2 = "e4000000DL", str_3 = "e4000000DL", str_4 = "e4000000DL", strb_2 = "e4400000DL", strb_3 = "e4400000DL", strb_4 = "e4400000DL", ldr_2 = "e4100000DL", ldr_3 = "e4100000DL", ldr_4 = "e4100000DL", ldrb_2 = "e4500000DL", ldrb_3 = "e4500000DL", ldrb_4 = "e4500000DL", strh_2 = "e00000b0DL", strh_3 = "e00000b0DL", ldrh_2 = "e01000b0DL", ldrh_3 = "e01000b0DL", ldrd_2 = "e00000d0DL", ldrd_3 = "e00000d0DL", -- v5TE ldrsb_2 = "e01000d0DL", ldrsb_3 = "e01000d0DL", strd_2 = "e00000f0DL", strd_3 = "e00000f0DL", -- v5TE ldrsh_2 = "e01000f0DL", ldrsh_3 = "e01000f0DL", ldm_2 = "e8900000oR", ldmia_2 = "e8900000oR", ldmfd_2 = "e8900000oR", ldmda_2 = "e8100000oR", ldmfa_2 = "e8100000oR", ldmdb_2 = "e9100000oR", ldmea_2 = "e9100000oR", ldmib_2 = "e9900000oR", ldmed_2 = "e9900000oR", stm_2 = "e8800000oR", stmia_2 = "e8800000oR", stmfd_2 = "e8800000oR", stmda_2 = "e8000000oR", stmfa_2 = "e8000000oR", stmdb_2 = "e9000000oR", stmea_2 = "e9000000oR", stmib_2 = "e9800000oR", stmed_2 = "e9800000oR", pop_1 = "e8bd0000R", push_1 = "e92d0000R", -- Branch instructions. b_1 = "ea000000B", bl_1 = "eb000000B", blx_1 = "e12fff30C", bx_1 = "e12fff10M", -- Miscellaneous instructions. nop_0 = "e1a00000", mrs_1 = "e10f0000D", bkpt_1 = "e1200070K", -- v5T svc_1 = "ef000000T", swi_1 = "ef000000T", ud_0 = "e7f001f0", -- VFP instructions. ["vadd.f32_3"] = "ee300a00dnm", ["vadd.f64_3"] = "ee300b00Gdnm", ["vsub.f32_3"] = "ee300a40dnm", ["vsub.f64_3"] = "ee300b40Gdnm", ["vmul.f32_3"] = "ee200a00dnm", ["vmul.f64_3"] = "ee200b00Gdnm", ["vnmul.f32_3"] = "ee200a40dnm", ["vnmul.f64_3"] = "ee200b40Gdnm", ["vmla.f32_3"] = "ee000a00dnm", ["vmla.f64_3"] = "ee000b00Gdnm", ["vmls.f32_3"] = "ee000a40dnm", ["vmls.f64_3"] = "ee000b40Gdnm", ["vnmla.f32_3"] = "ee100a40dnm", ["vnmla.f64_3"] = "ee100b40Gdnm", ["vnmls.f32_3"] = "ee100a00dnm", ["vnmls.f64_3"] = "ee100b00Gdnm", ["vdiv.f32_3"] = "ee800a00dnm", ["vdiv.f64_3"] = "ee800b00Gdnm", ["vabs.f32_2"] = "eeb00ac0dm", ["vabs.f64_2"] = "eeb00bc0Gdm", ["vneg.f32_2"] = "eeb10a40dm", ["vneg.f64_2"] = "eeb10b40Gdm", ["vsqrt.f32_2"] = "eeb10ac0dm", ["vsqrt.f64_2"] = "eeb10bc0Gdm", ["vcmp.f32_2"] = "eeb40a40dm", ["vcmp.f64_2"] = "eeb40b40Gdm", ["vcmpe.f32_2"] = "eeb40ac0dm", ["vcmpe.f64_2"] = "eeb40bc0Gdm", ["vcmpz.f32_1"] = "eeb50a40d", ["vcmpz.f64_1"] = "eeb50b40Gd", ["vcmpze.f32_1"] = "eeb50ac0d", ["vcmpze.f64_1"] = "eeb50bc0Gd", vldr_2 = "ed100a00dl|ed100b00Gdl", vstr_2 = "ed000a00dl|ed000b00Gdl", vldm_2 = "ec900a00or", vldmia_2 = "ec900a00or", vldmdb_2 = "ed100a00or", vpop_1 = "ecbd0a00r", vstm_2 = "ec800a00or", vstmia_2 = "ec800a00or", vstmdb_2 = "ed000a00or", vpush_1 = "ed2d0a00r", ["vmov.f32_2"] = "eeb00a40dm|eeb00a00dY", -- #imm is VFPv3 only ["vmov.f64_2"] = "eeb00b40Gdm|eeb00b00GdY", -- #imm is VFPv3 only vmov_2 = "ee100a10Dn|ee000a10nD", vmov_3 = "ec500a10DNm|ec400a10mDN|ec500b10GDNm|ec400b10GmDN", vmrs_0 = "eef1fa10", vmrs_1 = "eef10a10D", vmsr_1 = "eee10a10D", ["vcvt.s32.f32_2"] = "eebd0ac0dm", ["vcvt.s32.f64_2"] = "eebd0bc0dGm", ["vcvt.u32.f32_2"] = "eebc0ac0dm", ["vcvt.u32.f64_2"] = "eebc0bc0dGm", ["vcvtr.s32.f32_2"] = "eebd0a40dm", ["vcvtr.s32.f64_2"] = "eebd0b40dGm", ["vcvtr.u32.f32_2"] = "eebc0a40dm", ["vcvtr.u32.f64_2"] = "eebc0b40dGm", ["vcvt.f32.s32_2"] = "eeb80ac0dm", ["vcvt.f64.s32_2"] = "eeb80bc0GdFm", ["vcvt.f32.u32_2"] = "eeb80a40dm", ["vcvt.f64.u32_2"] = "eeb80b40GdFm", ["vcvt.f32.f64_2"] = "eeb70bc0dGm", ["vcvt.f64.f32_2"] = "eeb70ac0GdFm", -- VFPv4 only: ["vfma.f32_3"] = "eea00a00dnm", ["vfma.f64_3"] = "eea00b00Gdnm", ["vfms.f32_3"] = "eea00a40dnm", ["vfms.f64_3"] = "eea00b40Gdnm", ["vfnma.f32_3"] = "ee900a40dnm", ["vfnma.f64_3"] = "ee900b40Gdnm", ["vfnms.f32_3"] = "ee900a00dnm", ["vfnms.f64_3"] = "ee900b00Gdnm", -- NYI: Advanced SIMD instructions. -- NYI: I have no need for these instructions right now: -- swp, swpb, strex, ldrex, strexd, ldrexd, strexb, ldrexb, strexh, ldrexh -- msr, nopv6, yield, wfe, wfi, sev, dbg, bxj, smc, srs, rfe -- cps, setend, pli, pld, pldw, clrex, dsb, dmb, isb -- stc, ldc, mcr, mcr2, mrc, mrc2, mcrr, mcrr2, mrrc, mrrc2, cdp, cdp2 } -- Add mnemonics for "s" variants. do local t = {} for k,v in pairs(map_op) do if sub(v, -1) == "s" then local v2 = sub(v, 1, 2)..char(byte(v, 3)+1)..sub(v, 4, -2) t[sub(k, 1, -3).."s"..sub(k, -2)] = v2 end end for k,v in pairs(t) do map_op[k] = v end end ------------------------------------------------------------------------------ local function parse_gpr(expr) local tname, ovreg = match(expr, "^([%w_]+):(r1?[0-9])$") local tp = map_type[tname or expr] if tp then local reg = ovreg or tp.reg if not reg then werror("type `"..(tname or expr).."' needs a register override") end expr = reg end local r = match(expr, "^r(1?[0-9])$") if r then r = tonumber(r) if r <= 15 then return r, tp end end werror("bad register name `"..expr.."'") end local function parse_gpr_pm(expr) local pm, expr2 = match(expr, "^([+-]?)(.*)$") return parse_gpr(expr2), (pm == "-") end local function parse_vr(expr, tp) local t, r = match(expr, "^([sd])([0-9]+)$") if t == tp then r = tonumber(r) if r <= 31 then if t == "s" then return shr(r, 1), band(r, 1) end return band(r, 15), shr(r, 4) end end werror("bad register name `"..expr.."'") end local function parse_reglist(reglist) reglist = match(reglist, "^{%s*([^}]*)}$") if not reglist then werror("register list expected") end local rr = 0 for p in gmatch(reglist..",", "%s*([^,]*),") do local rbit = shl(1, parse_gpr(gsub(p, "%s+$", ""))) if band(rr, rbit) ~= 0 then werror("duplicate register `"..p.."'") end rr = rr + rbit end return rr end local function parse_vrlist(reglist) local ta, ra, tb, rb = match(reglist, "^{%s*([sd])([0-9]+)%s*%-%s*([sd])([0-9]+)%s*}$") ra, rb = tonumber(ra), tonumber(rb) if ta and ta == tb and ra and rb and ra <= 31 and rb <= 31 and ra <= rb then local nr = rb+1 - ra if ta == "s" then return shl(shr(ra,1),12)+shl(band(ra,1),22) + nr else return shl(band(ra,15),12)+shl(shr(ra,4),22) + nr*2 + 0x100 end end werror("register list expected") end local function parse_imm(imm, bits, shift, scale, signed) imm = match(imm, "^#(.*)$") if not imm then werror("expected immediate operand") end local n = tonumber(imm) if n then local m = sar(n, scale) if shl(m, scale) == n then if signed then local s = sar(m, bits-1) if s == 0 then return shl(m, shift) elseif s == -1 then return shl(m + shl(1, bits), shift) end else if sar(m, bits) == 0 then return shl(m, shift) end end end werror("out of range immediate `"..imm.."'") else waction("IMM", (signed and 32768 or 0)+scale*1024+bits*32+shift, imm) return 0 end end local function parse_imm12(imm) local n = tonumber(imm) if n then local m = band(n) for i=0,-15,-1 do if shr(m, 8) == 0 then return m + shl(band(i, 15), 8) end m = ror(m, 2) end werror("out of range immediate `"..imm.."'") else waction("IMM12", 0, imm) return 0 end end local function parse_imm16(imm) imm = match(imm, "^#(.*)$") if not imm then werror("expected immediate operand") end local n = tonumber(imm) if n then if shr(n, 16) == 0 then return band(n, 0x0fff) + shl(band(n, 0xf000), 4) end werror("out of range immediate `"..imm.."'") else waction("IMM16", 32*16, imm) return 0 end end local function parse_imm_load(imm, ext) local n = tonumber(imm) if n then if ext then if n >= -255 and n <= 255 then local up = 0x00800000 if n < 0 then n = -n; up = 0 end return shl(band(n, 0xf0), 4) + band(n, 0x0f) + up end else if n >= -4095 and n <= 4095 then if n >= 0 then return n+0x00800000 end return -n end end werror("out of range immediate `"..imm.."'") else waction(ext and "IMML8" or "IMML12", 32768 + shl(ext and 8 or 12, 5), imm) return 0 end end local function parse_shift(shift, gprok) if shift == "rrx" then return 3 * 32 else local s, s2 = match(shift, "^(%S+)%s*(.*)$") s = map_shift[s] if not s then werror("expected shift operand") end if sub(s2, 1, 1) == "#" then return parse_imm(s2, 5, 7, 0, false) + shl(s, 5) else if not gprok then werror("expected immediate shift operand") end return shl(parse_gpr(s2), 8) + shl(s, 5) + 16 end end end local function parse_label(label, def) local prefix = sub(label, 1, 2) -- =>label (pc label reference) if prefix == "=>" then return "PC", 0, sub(label, 3) end -- ->name (global label reference) if prefix == "->" then return "LG", map_global[sub(label, 3)] end if def then -- [1-9] (local label definition) if match(label, "^[1-9]$") then return "LG", 10+tonumber(label) end else -- [<>][1-9] (local label reference) local dir, lnum = match(label, "^([<>])([1-9])$") if dir then -- Fwd: 1-9, Bkwd: 11-19. return "LG", lnum + (dir == ">" and 0 or 10) end -- extern label (extern label reference) local extname = match(label, "^extern%s+(%S+)$") if extname then return "EXT", map_extern[extname] end end werror("bad label `"..label.."'") end local function parse_load(params, nparams, n, op) local oplo = band(op, 255) local ext, ldrd = (oplo ~= 0), (oplo == 208) local d if (ldrd or oplo == 240) then d = band(shr(op, 12), 15) if band(d, 1) ~= 0 then werror("odd destination register") end end local pn = params[n] local p1, wb = match(pn, "^%[%s*(.-)%s*%](!?)$") local p2 = params[n+1] if not p1 then if not p2 then if match(pn, "^[<>=%-]") or match(pn, "^extern%s+") then local mode, n, s = parse_label(pn, false) waction("REL_"..mode, n + (ext and 0x1800 or 0x0800), s, 1) return op + 15 * 65536 + 0x01000000 + (ext and 0x00400000 or 0) end local reg, tailr = match(pn, "^([%w_:]+)%s*(.*)$") if reg and tailr ~= "" then local d, tp = parse_gpr(reg) if tp then waction(ext and "IMML8" or "IMML12", 32768 + 32*(ext and 8 or 12), format(tp.ctypefmt, tailr)) return op + shl(d, 16) + 0x01000000 + (ext and 0x00400000 or 0) end end end werror("expected address operand") end if wb == "!" then op = op + 0x00200000 end if p2 then if wb == "!" then werror("bad use of '!'") end local p3 = params[n+2] op = op + shl(parse_gpr(p1), 16) local imm = match(p2, "^#(.*)$") if imm then local m = parse_imm_load(imm, ext) if p3 then werror("too many parameters") end op = op + m + (ext and 0x00400000 or 0) else local m, neg = parse_gpr_pm(p2) if ldrd and (m == d or m-1 == d) then werror("register conflict") end op = op + m + (neg and 0 or 0x00800000) + (ext and 0 or 0x02000000) if p3 then op = op + parse_shift(p3) end end else local p1a, p2 = match(p1, "^([^,%s]*)%s*(.*)$") op = op + shl(parse_gpr(p1a), 16) + 0x01000000 if p2 ~= "" then local imm = match(p2, "^,%s*#(.*)$") if imm then local m = parse_imm_load(imm, ext) op = op + m + (ext and 0x00400000 or 0) else local p2a, p3 = match(p2, "^,%s*([^,%s]*)%s*,?%s*(.*)$") local m, neg = parse_gpr_pm(p2a) if ldrd and (m == d or m-1 == d) then werror("register conflict") end op = op + m + (neg and 0 or 0x00800000) + (ext and 0 or 0x02000000) if p3 ~= "" then if ext then werror("too many parameters") end op = op + parse_shift(p3) end end else if wb == "!" then werror("bad use of '!'") end op = op + (ext and 0x00c00000 or 0x00800000) end end return op end local function parse_vload(q) local reg, imm = match(q, "^%[%s*([^,%s]*)%s*(.*)%]$") if reg then local d = shl(parse_gpr(reg), 16) if imm == "" then return d end imm = match(imm, "^,%s*#(.*)$") if imm then local n = tonumber(imm) if n then if n >= -1020 and n <= 1020 and n%4 == 0 then return d + (n >= 0 and n/4+0x00800000 or -n/4) end werror("out of range immediate `"..imm.."'") else waction("IMMV8", 32768 + 32*8, imm) return d end end else if match(q, "^[<>=%-]") or match(q, "^extern%s+") then local mode, n, s = parse_label(q, false) waction("REL_"..mode, n + 0x2800, s, 1) return 15 * 65536 end local reg, tailr = match(q, "^([%w_:]+)%s*(.*)$") if reg and tailr ~= "" then local d, tp = parse_gpr(reg) if tp then waction("IMMV8", 32768 + 32*8, format(tp.ctypefmt, tailr)) return shl(d, 16) end end end werror("expected address operand") end ------------------------------------------------------------------------------ -- Handle opcodes defined with template strings. local function parse_template(params, template, nparams, pos) local op = tonumber(sub(template, 1, 8), 16) local n = 1 local vr = "s" -- Process each character. for p in gmatch(sub(template, 9), ".") do local q = params[n] if p == "D" then op = op + shl(parse_gpr(q), 12); n = n + 1 elseif p == "N" then op = op + shl(parse_gpr(q), 16); n = n + 1 elseif p == "S" then op = op + shl(parse_gpr(q), 8); n = n + 1 elseif p == "M" then op = op + parse_gpr(q); n = n + 1 elseif p == "d" then local r,h = parse_vr(q, vr); op = op+shl(r,12)+shl(h,22); n = n + 1 elseif p == "n" then local r,h = parse_vr(q, vr); op = op+shl(r,16)+shl(h,7); n = n + 1 elseif p == "m" then local r,h = parse_vr(q, vr); op = op+r+shl(h,5); n = n + 1 elseif p == "P" then local imm = match(q, "^#(.*)$") if imm then op = op + parse_imm12(imm) + 0x02000000 else op = op + parse_gpr(q) end n = n + 1 elseif p == "p" then op = op + parse_shift(q, true); n = n + 1 elseif p == "L" then op = parse_load(params, nparams, n, op) elseif p == "l" then op = op + parse_vload(q) elseif p == "B" then local mode, n, s = parse_label(q, false) waction("REL_"..mode, n, s, 1) elseif p == "C" then -- blx gpr vs. blx label. if match(q, "^([%w_]+):(r1?[0-9])$") or match(q, "^r(1?[0-9])$") then op = op + parse_gpr(q) else if op < 0xe0000000 then werror("unconditional instruction") end local mode, n, s = parse_label(q, false) waction("REL_"..mode, n, s, 1) op = 0xfa000000 end elseif p == "F" then vr = "s" elseif p == "G" then vr = "d" elseif p == "o" then local r, wb = match(q, "^([^!]*)(!?)$") op = op + shl(parse_gpr(r), 16) + (wb == "!" and 0x00200000 or 0) n = n + 1 elseif p == "R" then op = op + parse_reglist(q); n = n + 1 elseif p == "r" then op = op + parse_vrlist(q); n = n + 1 elseif p == "W" then op = op + parse_imm16(q); n = n + 1 elseif p == "v" then op = op + parse_imm(q, 5, 7, 0, false); n = n + 1 elseif p == "w" then local imm = match(q, "^#(.*)$") if imm then op = op + parse_imm(q, 5, 7, 0, false); n = n + 1 else op = op + shl(parse_gpr(q), 8) + 16 end elseif p == "X" then op = op + parse_imm(q, 5, 16, 0, false); n = n + 1 elseif p == "Y" then local imm = tonumber(match(q, "^#(.*)$")); n = n + 1 if not imm or shr(imm, 8) ~= 0 then werror("bad immediate operand") end op = op + shl(band(imm, 0xf0), 12) + band(imm, 0x0f) elseif p == "K" then local imm = tonumber(match(q, "^#(.*)$")); n = n + 1 if not imm or shr(imm, 16) ~= 0 then werror("bad immediate operand") end op = op + shl(band(imm, 0xfff0), 4) + band(imm, 0x000f) elseif p == "T" then op = op + parse_imm(q, 24, 0, 0, false); n = n + 1 elseif p == "s" then -- Ignored. else assert(false) end end wputpos(pos, op) end map_op[".template__"] = function(params, template, nparams) if not params then return sub(template, 9) end -- Limit number of section buffer positions used by a single dasm_put(). -- A single opcode needs a maximum of 3 positions. if secpos+3 > maxsecpos then wflush() end local pos = wpos() local apos, spos = #actargs, secpos local ok, err for t in gmatch(template, "[^|]+") do ok, err = pcall(parse_template, params, t, nparams, pos) if ok then return end secpos = spos actargs[apos+1] = nil actargs[apos+2] = nil actargs[apos+3] = nil end error(err, 0) end ------------------------------------------------------------------------------ -- Pseudo-opcode to mark the position where the action list is to be emitted. map_op[".actionlist_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeactions(out, name) end) end -- Pseudo-opcode to mark the position where the global enum is to be emitted. map_op[".globals_1"] = function(params) if not params then return "prefix" end local prefix = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobals(out, prefix) end) end -- Pseudo-opcode to mark the position where the global names are to be emitted. map_op[".globalnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeglobalnames(out, name) end) end -- Pseudo-opcode to mark the position where the extern names are to be emitted. map_op[".externnames_1"] = function(params) if not params then return "cvar" end local name = params[1] -- No syntax check. You get to keep the pieces. wline(function(out) writeexternnames(out, name) end) end ------------------------------------------------------------------------------ -- Label pseudo-opcode (converted from trailing colon form). map_op[".label_1"] = function(params) if not params then return "[1-9] | ->global | =>pcexpr" end if secpos+1 > maxsecpos then wflush() end local mode, n, s = parse_label(params[1], true) if mode == "EXT" then werror("bad label definition") end waction("LABEL_"..mode, n, s, 1) end ------------------------------------------------------------------------------ -- Pseudo-opcodes for data storage. map_op[".long_*"] = function(params) if not params then return "imm..." end for _,p in ipairs(params) do local n = tonumber(p) if not n then werror("bad immediate `"..p.."'") end if n < 0 then n = n + 2^32 end wputw(n) if secpos+2 > maxsecpos then wflush() end end end -- Alignment pseudo-opcode. map_op[".align_1"] = function(params) if not params then return "numpow2" end if secpos+1 > maxsecpos then wflush() end local align = tonumber(params[1]) if align then local x = align -- Must be a power of 2 in the range (2 ... 256). for i=1,8 do x = x / 2 if x == 1 then waction("ALIGN", align-1, nil, 1) -- Action byte is 2**n-1. return end end end werror("bad alignment") end ------------------------------------------------------------------------------ -- Pseudo-opcode for (primitive) type definitions (map to C types). map_op[".type_3"] = function(params, nparams) if not params then return nparams == 2 and "name, ctype" or "name, ctype, reg" end local name, ctype, reg = params[1], params[2], params[3] if not match(name, "^[%a_][%w_]*$") then werror("bad type name `"..name.."'") end local tp = map_type[name] if tp then werror("duplicate type `"..name.."'") end -- Add #type to defines. A bit unclean to put it in map_archdef. map_archdef["#"..name] = "sizeof("..ctype..")" -- Add new type and emit shortcut define. local num = ctypenum + 1 map_type[name] = { ctype = ctype, ctypefmt = format("Dt%X(%%s)", num), reg = reg, } wline(format("#define Dt%X(_V) (int)(ptrdiff_t)&(((%s *)0)_V)", num, ctype)) ctypenum = num end map_op[".type_2"] = map_op[".type_3"] -- Dump type definitions. local function dumptypes(out, lvl) local t = {} for name in pairs(map_type) do t[#t+1] = name end sort(t) out:write("Type definitions:\n") for _,name in ipairs(t) do local tp = map_type[name] local reg = tp.reg or "" out:write(format(" %-20s %-20s %s\n", name, tp.ctype, reg)) end out:write("\n") end ------------------------------------------------------------------------------ -- Set the current section. function _M.section(num) waction("SECTION", num) wflush(true) -- SECTION is a terminal action. end ------------------------------------------------------------------------------ -- Dump architecture description. function _M.dumparch(out) out:write(format("DynASM %s version %s, released %s\n\n", _info.arch, _info.version, _info.release)) dumpactions(out) end -- Dump all user defined elements. function _M.dumpdef(out, lvl) dumptypes(out, lvl) dumpglobals(out, lvl) dumpexterns(out, lvl) end ------------------------------------------------------------------------------ -- Pass callbacks from/to the DynASM core. function _M.passcb(wl, we, wf, ww) wline, werror, wfatal, wwarn = wl, we, wf, ww return wflush end -- Setup the arch-specific module. function _M.setup(arch, opt) g_arch, g_opt = arch, opt end -- Merge the core maps and the arch-specific maps. function _M.mergemaps(map_coreop, map_def) setmetatable(map_op, { __index = function(t, k) local v = map_coreop[k] if v then return v end local k1, cc, k2 = match(k, "^(.-)(..)([._].*)$") local cv = map_cond[cc] if cv then local v = rawget(t, k1..k2) if type(v) == "string" then local scv = format("%x", cv) return gsub(scv..sub(v, 2), "|e", "|"..scv) end end end }) setmetatable(map_def, { __index = map_archdef }) return map_op, map_def end return _M ------------------------------------------------------------------------------ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_mips.h0000664000000000000000000002765012202141143023221 0ustar rootroot/* ** DynASM MIPS encoding engine. ** Copyright (C) 2005-2013 Mike Pall. All rights reserved. ** Released under the MIT license. See dynasm.lua for full copyright notice. */ #include #include #include #include #define DASM_ARCH "mips" #ifndef DASM_EXTERN #define DASM_EXTERN(a,b,c,d) 0 #endif /* Action definitions. */ enum { DASM_STOP, DASM_SECTION, DASM_ESC, DASM_REL_EXT, /* The following actions need a buffer position. */ DASM_ALIGN, DASM_REL_LG, DASM_LABEL_LG, /* The following actions also have an argument. */ DASM_REL_PC, DASM_LABEL_PC, DASM_IMM, DASM__MAX }; /* Maximum number of section buffer positions for a single dasm_put() call. */ #define DASM_MAXSECPOS 25 /* DynASM encoder status codes. Action list offset or number are or'ed in. */ #define DASM_S_OK 0x00000000 #define DASM_S_NOMEM 0x01000000 #define DASM_S_PHASE 0x02000000 #define DASM_S_MATCH_SEC 0x03000000 #define DASM_S_RANGE_I 0x11000000 #define DASM_S_RANGE_SEC 0x12000000 #define DASM_S_RANGE_LG 0x13000000 #define DASM_S_RANGE_PC 0x14000000 #define DASM_S_RANGE_REL 0x15000000 #define DASM_S_UNDEF_LG 0x21000000 #define DASM_S_UNDEF_PC 0x22000000 /* Macros to convert positions (8 bit section + 24 bit index). */ #define DASM_POS2IDX(pos) ((pos)&0x00ffffff) #define DASM_POS2BIAS(pos) ((pos)&0xff000000) #define DASM_SEC2POS(sec) ((sec)<<24) #define DASM_POS2SEC(pos) ((pos)>>24) #define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) /* Action list type. */ typedef const unsigned int *dasm_ActList; /* Per-section structure. */ typedef struct dasm_Section { int *rbuf; /* Biased buffer pointer (negative section bias). */ int *buf; /* True buffer pointer. */ size_t bsize; /* Buffer size in bytes. */ int pos; /* Biased buffer position. */ int epos; /* End of biased buffer position - max single put. */ int ofs; /* Byte offset into section. */ } dasm_Section; /* Core structure holding the DynASM encoding state. */ struct dasm_State { size_t psize; /* Allocated size of this structure. */ dasm_ActList actionlist; /* Current actionlist pointer. */ int *lglabels; /* Local/global chain/pos ptrs. */ size_t lgsize; int *pclabels; /* PC label chains/pos ptrs. */ size_t pcsize; void **globals; /* Array of globals (bias -10). */ dasm_Section *section; /* Pointer to active section. */ size_t codesize; /* Total size of all code sections. */ int maxsection; /* 0 <= sectionidx < maxsection. */ int status; /* Status code. */ dasm_Section sections[1]; /* All sections. Alloc-extended. */ }; /* The size of the core structure depends on the max. number of sections. */ #define DASM_PSZ(ms) (sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section)) /* Initialize DynASM state. */ void dasm_init(Dst_DECL, int maxsection) { dasm_State *D; size_t psz = 0; int i; Dst_REF = NULL; DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection)); D = Dst_REF; D->psize = psz; D->lglabels = NULL; D->lgsize = 0; D->pclabels = NULL; D->pcsize = 0; D->globals = NULL; D->maxsection = maxsection; for (i = 0; i < maxsection; i++) { D->sections[i].buf = NULL; /* Need this for pass3. */ D->sections[i].rbuf = D->sections[i].buf - DASM_SEC2POS(i); D->sections[i].bsize = 0; D->sections[i].epos = 0; /* Wrong, but is recalculated after resize. */ } } /* Free DynASM state. */ void dasm_free(Dst_DECL) { dasm_State *D = Dst_REF; int i; for (i = 0; i < D->maxsection; i++) if (D->sections[i].buf) DASM_M_FREE(Dst, D->sections[i].buf, D->sections[i].bsize); if (D->pclabels) DASM_M_FREE(Dst, D->pclabels, D->pcsize); if (D->lglabels) DASM_M_FREE(Dst, D->lglabels, D->lgsize); DASM_M_FREE(Dst, D, D->psize); } /* Setup global label array. Must be called before dasm_setup(). */ void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl) { dasm_State *D = Dst_REF; D->globals = gl - 10; /* Negative bias to compensate for locals. */ DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int)); } /* Grow PC label array. Can be called after dasm_setup(), too. */ void dasm_growpc(Dst_DECL, unsigned int maxpc) { dasm_State *D = Dst_REF; size_t osz = D->pcsize; DASM_M_GROW(Dst, int, D->pclabels, D->pcsize, maxpc*sizeof(int)); memset((void *)(((unsigned char *)D->pclabels)+osz), 0, D->pcsize-osz); } /* Setup encoder. */ void dasm_setup(Dst_DECL, const void *actionlist) { dasm_State *D = Dst_REF; int i; D->actionlist = (dasm_ActList)actionlist; D->status = DASM_S_OK; D->section = &D->sections[0]; memset((void *)D->lglabels, 0, D->lgsize); if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); D->sections[i].ofs = 0; } } #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) { \ D->status = DASM_S_##st|(p-D->actionlist-1); return; } } while (0) #define CKPL(kind, st) \ do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ D->status = DASM_S_RANGE_##st|(p-D->actionlist-1); return; } } while (0) #else #define CK(x, st) ((void)0) #define CKPL(kind, st) ((void)0) #endif /* Pass 1: Store actions and args, link branches/labels, estimate offsets. */ void dasm_put(Dst_DECL, int start, ...) { va_list ap; dasm_State *D = Dst_REF; dasm_ActList p = D->actionlist + start; dasm_Section *sec = D->section; int pos = sec->pos, ofs = sec->ofs; int *b; if (pos >= sec->epos) { DASM_M_GROW(Dst, int, sec->buf, sec->bsize, sec->bsize + 2*DASM_MAXSECPOS*sizeof(int)); sec->rbuf = sec->buf - DASM_POS2BIAS(pos); sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); } b = sec->rbuf; b[pos++] = start; va_start(ap, start); while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16) - 0xff00; if (action >= DASM__MAX) { ofs += 4; } else { int *pl, n = action >= DASM_REL_PC ? va_arg(ap, int) : 0; switch (action) { case DASM_STOP: goto stop; case DASM_SECTION: n = (ins & 255); CK(n < D->maxsection, RANGE_SEC); D->section = &D->sections[n]; goto stop; case DASM_ESC: p++; ofs += 4; break; case DASM_REL_EXT: break; case DASM_ALIGN: ofs += (ins & 255); b[pos++] = ofs; break; case DASM_REL_LG: n = (ins & 2047) - 10; pl = D->lglabels + n; /* Bkwd rel or global. */ if (n >= 0) { CK(n>=10||*pl<0, RANGE_LG); CKPL(lg, LG); goto putrel; } pl += 10; n = *pl; if (n < 0) n = 0; /* Start new chain for fwd rel if label exists. */ goto linkrel; case DASM_REL_PC: pl = D->pclabels + n; CKPL(pc, PC); putrel: n = *pl; if (n < 0) { /* Label exists. Get label pos and store it. */ b[pos] = -n; } else { linkrel: b[pos] = n; /* Else link to rel chain, anchored at label. */ *pl = pos; } pos++; break; case DASM_LABEL_LG: pl = D->lglabels + (ins & 2047) - 10; CKPL(lg, LG); goto putlabel; case DASM_LABEL_PC: pl = D->pclabels + n; CKPL(pc, PC); putlabel: n = *pl; /* n > 0: Collapse rel chain and replace with label pos. */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; } *pl = -pos; /* Label exists now. */ b[pos++] = ofs; /* Store pass1 offset estimate. */ break; case DASM_IMM: #ifdef DASM_CHECKS CK((n & ((1<<((ins>>10)&31))-1)) == 0, RANGE_I); #endif n >>= ((ins>>10)&31); #ifdef DASM_CHECKS if (ins & 0x8000) CK(((n + (1<<(((ins>>5)&31)-1)))>>((ins>>5)&31)) == 0, RANGE_I); else CK((n>>((ins>>5)&31)) == 0, RANGE_I); #endif b[pos++] = n; break; } } } stop: va_end(ap); sec->pos = pos; sec->ofs = ofs; } #undef CK /* Pass 2: Link sections, shrink aligns, fix label offsets. */ int dasm_link(Dst_DECL, size_t *szp) { dasm_State *D = Dst_REF; int secnum; int ofs = 0; #ifdef DASM_CHECKS *szp = 0; if (D->status != DASM_S_OK) return D->status; { int pc; for (pc = 0; pc*sizeof(int) < D->pcsize; pc++) if (D->pclabels[pc] > 0) return DASM_S_UNDEF_PC|pc; } #endif { /* Handle globals not defined in this translation unit. */ int idx; for (idx = 20; idx*sizeof(int) < D->lgsize; idx++) { int n = D->lglabels[idx]; /* Undefined label: Collapse rel chain and replace with marker (< 0). */ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = -idx; } } } /* Combine all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->rbuf; int pos = DASM_SEC2POS(secnum); int lastpos = sec->pos; while (pos != lastpos) { dasm_ActList p = D->actionlist + b[pos++]; while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16) - 0xff00; switch (action) { case DASM_STOP: case DASM_SECTION: goto stop; case DASM_ESC: p++; break; case DASM_REL_EXT: break; case DASM_ALIGN: ofs -= (b[pos++] + ofs) & (ins & 255); break; case DASM_REL_LG: case DASM_REL_PC: pos++; break; case DASM_LABEL_LG: case DASM_LABEL_PC: b[pos++] += ofs; break; case DASM_IMM: pos++; break; } } stop: (void)0; } ofs += sec->ofs; /* Next section starts right after current section. */ } D->codesize = ofs; /* Total size of all code sections */ *szp = ofs; return DASM_S_OK; } #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) return DASM_S_##st|(p-D->actionlist-1); } while (0) #else #define CK(x, st) ((void)0) #endif /* Pass 3: Encode sections. */ int dasm_encode(Dst_DECL, void *buffer) { dasm_State *D = Dst_REF; char *base = (char *)buffer; unsigned int *cp = (unsigned int *)buffer; int secnum; /* Encode all code sections. No support for data sections (yet). */ for (secnum = 0; secnum < D->maxsection; secnum++) { dasm_Section *sec = D->sections + secnum; int *b = sec->buf; int *endb = sec->rbuf + sec->pos; while (b != endb) { dasm_ActList p = D->actionlist + *b++; while (1) { unsigned int ins = *p++; unsigned int action = (ins >> 16) - 0xff00; int n = (action >= DASM_ALIGN && action < DASM__MAX) ? *b++ : 0; switch (action) { case DASM_STOP: case DASM_SECTION: goto stop; case DASM_ESC: *cp++ = *p++; break; case DASM_REL_EXT: n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins & 2047), 1); goto patchrel; case DASM_ALIGN: ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0x60000000; break; case DASM_REL_LG: CK(n >= 0, UNDEF_LG); case DASM_REL_PC: CK(n >= 0, UNDEF_PC); n = *DASM_POS2PTR(D, n); if (ins & 2048) n = n - (int)((char *)cp - base); else n = (n + (int)base) & 0x0fffffff; patchrel: CK((n & 3) == 0 && ((n + ((ins & 2048) ? 0x00020000 : 0)) >> ((ins & 2048) ? 18 : 28)) == 0, RANGE_REL); cp[-1] |= ((n>>2) & ((ins & 2048) ? 0x0000ffff: 0x03ffffff)); break; case DASM_LABEL_LG: ins &= 2047; if (ins >= 20) D->globals[ins-10] = (void *)(base + n); break; case DASM_LABEL_PC: break; case DASM_IMM: cp[-1] |= (n & ((1<<((ins>>5)&31))-1)) << (ins&31); break; default: *cp++ = ins; break; } } stop: (void)0; } } if (base + D->codesize != (char *)cp) /* Check for phase errors. */ return DASM_S_PHASE; return DASM_S_OK; } #undef CK /* Get PC label offset. */ int dasm_getpclabel(Dst_DECL, unsigned int pc) { dasm_State *D = Dst_REF; if (pc*sizeof(int) < D->pcsize) { int pos = D->pclabels[pc]; if (pos < 0) return *DASM_POS2PTR(D, -pos); if (pos > 0) return -1; /* Undefined. */ } return -2; /* Unused or out of range. */ } #ifdef DASM_CHECKS /* Optional sanity checker to call between isolated encoding steps. */ int dasm_checkstep(Dst_DECL, int secmatch) { dasm_State *D = Dst_REF; if (D->status == DASM_S_OK) { int i; for (i = 1; i <= 9; i++) { if (D->lglabels[i] > 0) { D->status = DASM_S_UNDEF_LG|i; break; } D->lglabels[i] = 0; } } if (D->status == DASM_S_OK && secmatch >= 0 && D->section != &D->sections[secmatch]) D->status = DASM_S_MATCH_SEC|(D->section-D->sections); return D->status; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dasm_proto.h0000664000000000000000000000401612202141143023403 0ustar rootroot/* ** DynASM encoding engine prototypes. ** Copyright (C) 2005-2013 Mike Pall. All rights reserved. ** Released under the MIT license. See dynasm.lua for full copyright notice. */ #ifndef _DASM_PROTO_H #define _DASM_PROTO_H #include #include #define DASM_IDENT "DynASM 1.3.0" #define DASM_VERSION 10300 /* 1.3.0 */ #ifndef Dst_DECL #define Dst_DECL dasm_State **Dst #endif #ifndef Dst_REF #define Dst_REF (*Dst) #endif #ifndef DASM_FDEF #define DASM_FDEF extern #endif #ifndef DASM_M_GROW #define DASM_M_GROW(ctx, t, p, sz, need) \ do { \ size_t _sz = (sz), _need = (need); \ if (_sz < _need) { \ if (_sz < 16) _sz = 16; \ while (_sz < _need) _sz += _sz; \ (p) = (t *)realloc((p), _sz); \ if ((p) == NULL) exit(1); \ (sz) = _sz; \ } \ } while(0) #endif #ifndef DASM_M_FREE #define DASM_M_FREE(ctx, p, sz) free(p) #endif /* Internal DynASM encoder state. */ typedef struct dasm_State dasm_State; /* Initialize and free DynASM state. */ DASM_FDEF void dasm_init(Dst_DECL, int maxsection); DASM_FDEF void dasm_free(Dst_DECL); /* Setup global array. Must be called before dasm_setup(). */ DASM_FDEF void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl); /* Grow PC label array. Can be called after dasm_setup(), too. */ DASM_FDEF void dasm_growpc(Dst_DECL, unsigned int maxpc); /* Setup encoder. */ DASM_FDEF void dasm_setup(Dst_DECL, const void *actionlist); /* Feed encoder with actions. Calls are generated by pre-processor. */ DASM_FDEF void dasm_put(Dst_DECL, int start, ...); /* Link sections and return the resulting size. */ DASM_FDEF int dasm_link(Dst_DECL, size_t *szp); /* Encode sections into buffer. */ DASM_FDEF int dasm_encode(Dst_DECL, void *buffer); /* Get PC label offset. */ DASM_FDEF int dasm_getpclabel(Dst_DECL, unsigned int pc); #ifdef DASM_CHECKS /* Optional sanity checker to call between isolated encoding steps. */ DASM_FDEF int dasm_checkstep(Dst_DECL, int secmatch); #else #define dasm_checkstep(a, b) 0 #endif #endif /* _DASM_PROTO_H */ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/dynasm/dynasm.lua0000664000000000000000000007434512231715321023104 0ustar rootroot------------------------------------------------------------------------------ -- DynASM. A dynamic assembler for code generation engines. -- Originally designed and implemented for LuaJIT. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- See below for full copyright notice. ------------------------------------------------------------------------------ -- Application information. local _info = { name = "DynASM", description = "A dynamic assembler for code generation engines", version = "1.3.0", vernum = 10300, release = "2011-05-05", author = "Mike Pall", url = "http://luajit.org/dynasm.html", license = "MIT", copyright = [[ Copyright (C) 2005-2013 Mike Pall. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [ MIT license: http://www.opensource.org/licenses/mit-license.php ] ]], } -- Cache library functions. local type, pairs, ipairs = type, pairs, ipairs local pcall, error, assert = pcall, error, assert local _s = string local sub, match, gmatch, gsub = _s.sub, _s.match, _s.gmatch, _s.gsub local format, rep, upper = _s.format, _s.rep, _s.upper local _t = table local insert, remove, concat, sort = _t.insert, _t.remove, _t.concat, _t.sort local exit = os.exit local io = io local stdin, stdout, stderr = io.stdin, io.stdout, io.stderr ------------------------------------------------------------------------------ -- Program options. local g_opt = {} -- Global state for current file. local g_fname, g_curline, g_indent, g_lineno, g_synclineno, g_arch local g_errcount = 0 -- Write buffer for output file. local g_wbuffer, g_capbuffer ------------------------------------------------------------------------------ -- Write an output line (or callback function) to the buffer. local function wline(line, needindent) local buf = g_capbuffer or g_wbuffer buf[#buf+1] = needindent and g_indent..line or line g_synclineno = g_synclineno + 1 end -- Write assembler line as a comment, if requestd. local function wcomment(aline) if g_opt.comment then wline(g_opt.comment..aline..g_opt.endcomment, true) end end -- Resync CPP line numbers. local function wsync() if g_synclineno ~= g_lineno and g_opt.cpp then wline("#line "..g_lineno..' "'..g_fname..'"') g_synclineno = g_lineno end end -- Dummy action flush function. Replaced with arch-specific function later. local function wflush(term) end -- Dump all buffered output lines. local function wdumplines(out, buf) for _,line in ipairs(buf) do if type(line) == "string" then assert(out:write(line, "\n")) else -- Special callback to dynamically insert lines after end of processing. line(out) end end end ------------------------------------------------------------------------------ -- Emit an error. Processing continues with next statement. local function werror(msg) error(format("%s:%s: error: %s:\n%s", g_fname, g_lineno, msg, g_curline), 0) end -- Emit a fatal error. Processing stops. local function wfatal(msg) g_errcount = "fatal" werror(msg) end -- Print a warning. Processing continues. local function wwarn(msg) stderr:write(format("%s:%s: warning: %s:\n%s\n", g_fname, g_lineno, msg, g_curline)) end -- Print caught error message. But suppress excessive errors. local function wprinterr(...) if type(g_errcount) == "number" then -- Regular error. g_errcount = g_errcount + 1 if g_errcount < 21 then -- Seems to be a reasonable limit. stderr:write(...) elseif g_errcount == 21 then stderr:write(g_fname, ":*: warning: too many errors (suppressed further messages).\n") end else -- Fatal error. stderr:write(...) return true -- Stop processing. end end ------------------------------------------------------------------------------ -- Map holding all option handlers. local opt_map = {} local opt_current -- Print error and exit with error status. local function opterror(...) stderr:write("dynasm.lua: ERROR: ", ...) stderr:write("\n") exit(1) end -- Get option parameter. local function optparam(args) local argn = args.argn local p = args[argn] if not p then opterror("missing parameter for option `", opt_current, "'.") end args.argn = argn + 1 return p end ------------------------------------------------------------------------------ -- Core pseudo-opcodes. local map_coreop = {} -- Dummy opcode map. Replaced by arch-specific map. local map_op = {} -- Forward declarations. local dostmt local readfile ------------------------------------------------------------------------------ -- Map for defines (initially empty, chains to arch-specific map). local map_def = {} -- Pseudo-opcode to define a substitution. map_coreop[".define_2"] = function(params, nparams) if not params then return nparams == 1 and "name" or "name, subst" end local name, def = params[1], params[2] or "1" if not match(name, "^[%a_][%w_]*$") then werror("bad or duplicate define") end map_def[name] = def end map_coreop[".define_1"] = map_coreop[".define_2"] -- Define a substitution on the command line. function opt_map.D(args) local namesubst = optparam(args) local name, subst = match(namesubst, "^([%a_][%w_]*)=(.*)$") if name then map_def[name] = subst elseif match(namesubst, "^[%a_][%w_]*$") then map_def[namesubst] = "1" else opterror("bad define") end end -- Undefine a substitution on the command line. function opt_map.U(args) local name = optparam(args) if match(name, "^[%a_][%w_]*$") then map_def[name] = nil else opterror("bad define") end end -- Helper for definesubst. local gotsubst local function definesubst_one(word) local subst = map_def[word] if subst then gotsubst = word; return subst else return word end end -- Iteratively substitute defines. local function definesubst(stmt) -- Limit number of iterations. for i=1,100 do gotsubst = false stmt = gsub(stmt, "#?[%w_]+", definesubst_one) if not gotsubst then break end end if gotsubst then wfatal("recursive define involving `"..gotsubst.."'") end return stmt end -- Dump all defines. local function dumpdefines(out, lvl) local t = {} for name in pairs(map_def) do t[#t+1] = name end sort(t) out:write("Defines:\n") for _,name in ipairs(t) do local subst = map_def[name] if g_arch then subst = g_arch.revdef(subst) end out:write(format(" %-20s %s\n", name, subst)) end out:write("\n") end ------------------------------------------------------------------------------ -- Support variables for conditional assembly. local condlevel = 0 local condstack = {} -- Evaluate condition with a Lua expression. Substitutions already performed. local function cond_eval(cond) local func, err if setfenv then func, err = loadstring("return "..cond, "=expr") else -- No globals. All unknown identifiers evaluate to nil. func, err = load("return "..cond, "=expr", "t", {}) end if func then if setfenv then setfenv(func, {}) -- No globals. All unknown identifiers evaluate to nil. end local ok, res = pcall(func) if ok then if res == 0 then return false end -- Oh well. return not not res end err = res end wfatal("bad condition: "..err) end -- Skip statements until next conditional pseudo-opcode at the same level. local function stmtskip() local dostmt_save = dostmt local lvl = 0 dostmt = function(stmt) local op = match(stmt, "^%s*(%S+)") if op == ".if" then lvl = lvl + 1 elseif lvl ~= 0 then if op == ".endif" then lvl = lvl - 1 end elseif op == ".elif" or op == ".else" or op == ".endif" then dostmt = dostmt_save dostmt(stmt) end end end -- Pseudo-opcodes for conditional assembly. map_coreop[".if_1"] = function(params) if not params then return "condition" end local lvl = condlevel + 1 local res = cond_eval(params[1]) condlevel = lvl condstack[lvl] = res if not res then stmtskip() end end map_coreop[".elif_1"] = function(params) if not params then return "condition" end if condlevel == 0 then wfatal(".elif without .if") end local lvl = condlevel local res = condstack[lvl] if res then if res == "else" then wfatal(".elif after .else") end else res = cond_eval(params[1]) if res then condstack[lvl] = res return end end stmtskip() end map_coreop[".else_0"] = function(params) if condlevel == 0 then wfatal(".else without .if") end local lvl = condlevel local res = condstack[lvl] condstack[lvl] = "else" if res then if res == "else" then wfatal(".else after .else") end stmtskip() end end map_coreop[".endif_0"] = function(params) local lvl = condlevel if lvl == 0 then wfatal(".endif without .if") end condlevel = lvl - 1 end -- Check for unfinished conditionals. local function checkconds() if g_errcount ~= "fatal" and condlevel ~= 0 then wprinterr(g_fname, ":*: error: unbalanced conditional\n") end end ------------------------------------------------------------------------------ -- Search for a file in the given path and open it for reading. local function pathopen(path, name) local dirsep = package and match(package.path, "\\") and "\\" or "/" for _,p in ipairs(path) do local fullname = p == "" and name or p..dirsep..name local fin = io.open(fullname, "r") if fin then g_fname = fullname return fin end end end -- Include a file. map_coreop[".include_1"] = function(params) if not params then return "filename" end local name = params[1] -- Save state. Ugly, I know. but upvalues are fast. local gf, gl, gcl, gi = g_fname, g_lineno, g_curline, g_indent -- Read the included file. local fatal = readfile(pathopen(g_opt.include, name) or wfatal("include file `"..name.."' not found")) -- Restore state. g_synclineno = -1 g_fname, g_lineno, g_curline, g_indent = gf, gl, gcl, gi if fatal then wfatal("in include file") end end -- Make .include and conditionals initially available, too. map_op[".include_1"] = map_coreop[".include_1"] map_op[".if_1"] = map_coreop[".if_1"] map_op[".elif_1"] = map_coreop[".elif_1"] map_op[".else_0"] = map_coreop[".else_0"] map_op[".endif_0"] = map_coreop[".endif_0"] ------------------------------------------------------------------------------ -- Support variables for macros. local mac_capture, mac_lineno, mac_name local mac_active = {} local mac_list = {} -- Pseudo-opcode to define a macro. map_coreop[".macro_*"] = function(mparams) if not mparams then return "name [, params...]" end -- Split off and validate macro name. local name = remove(mparams, 1) if not name then werror("missing macro name") end if not (match(name, "^[%a_][%w_%.]*$") or match(name, "^%.[%w_%.]*$")) then wfatal("bad macro name `"..name.."'") end -- Validate macro parameter names. local mdup = {} for _,mp in ipairs(mparams) do if not match(mp, "^[%a_][%w_]*$") then wfatal("bad macro parameter name `"..mp.."'") end if mdup[mp] then wfatal("duplicate macro parameter name `"..mp.."'") end mdup[mp] = true end -- Check for duplicate or recursive macro definitions. local opname = name.."_"..#mparams if map_op[opname] or map_op[name.."_*"] then wfatal("duplicate macro `"..name.."' ("..#mparams.." parameters)") end if mac_capture then wfatal("recursive macro definition") end -- Enable statement capture. local lines = {} mac_lineno = g_lineno mac_name = name mac_capture = function(stmt) -- Statement capture function. -- Stop macro definition with .endmacro pseudo-opcode. if not match(stmt, "^%s*.endmacro%s*$") then lines[#lines+1] = stmt return end mac_capture = nil mac_lineno = nil mac_name = nil mac_list[#mac_list+1] = opname -- Add macro-op definition. map_op[opname] = function(params) if not params then return mparams, lines end -- Protect against recursive macro invocation. if mac_active[opname] then wfatal("recursive macro invocation") end mac_active[opname] = true -- Setup substitution map. local subst = {} for i,mp in ipairs(mparams) do subst[mp] = params[i] end local mcom if g_opt.maccomment and g_opt.comment then mcom = " MACRO "..name.." ("..#mparams..")" wcomment("{"..mcom) end -- Loop through all captured statements for _,stmt in ipairs(lines) do -- Substitute macro parameters. local st = gsub(stmt, "[%w_]+", subst) st = definesubst(st) st = gsub(st, "%s*%.%.%s*", "") -- Token paste a..b. if mcom and sub(st, 1, 1) ~= "|" then wcomment(st) end -- Emit statement. Use a protected call for better diagnostics. local ok, err = pcall(dostmt, st) if not ok then -- Add the captured statement to the error. wprinterr(err, "\n", g_indent, "| ", stmt, "\t[MACRO ", name, " (", #mparams, ")]\n") end end if mcom then wcomment("}"..mcom) end mac_active[opname] = nil end end end -- An .endmacro pseudo-opcode outside of a macro definition is an error. map_coreop[".endmacro_0"] = function(params) wfatal(".endmacro without .macro") end -- Dump all macros and their contents (with -PP only). local function dumpmacros(out, lvl) sort(mac_list) out:write("Macros:\n") for _,opname in ipairs(mac_list) do local name = sub(opname, 1, -3) local params, lines = map_op[opname]() out:write(format(" %-20s %s\n", name, concat(params, ", "))) if lvl > 1 then for _,line in ipairs(lines) do out:write(" |", line, "\n") end out:write("\n") end end out:write("\n") end -- Check for unfinished macro definitions. local function checkmacros() if mac_capture then wprinterr(g_fname, ":", mac_lineno, ": error: unfinished .macro `", mac_name ,"'\n") end end ------------------------------------------------------------------------------ -- Support variables for captures. local cap_lineno, cap_name local cap_buffers = {} local cap_used = {} -- Start a capture. map_coreop[".capture_1"] = function(params) if not params then return "name" end wflush() local name = params[1] if not match(name, "^[%a_][%w_]*$") then wfatal("bad capture name `"..name.."'") end if cap_name then wfatal("already capturing to `"..cap_name.."' since line "..cap_lineno) end cap_name = name cap_lineno = g_lineno -- Create or continue a capture buffer and start the output line capture. local buf = cap_buffers[name] if not buf then buf = {}; cap_buffers[name] = buf end g_capbuffer = buf g_synclineno = 0 end -- Stop a capture. map_coreop[".endcapture_0"] = function(params) wflush() if not cap_name then wfatal(".endcapture without a valid .capture") end cap_name = nil cap_lineno = nil g_capbuffer = nil g_synclineno = 0 end -- Dump a capture buffer. map_coreop[".dumpcapture_1"] = function(params) if not params then return "name" end wflush() local name = params[1] if not match(name, "^[%a_][%w_]*$") then wfatal("bad capture name `"..name.."'") end cap_used[name] = true wline(function(out) local buf = cap_buffers[name] if buf then wdumplines(out, buf) end end) g_synclineno = 0 end -- Dump all captures and their buffers (with -PP only). local function dumpcaptures(out, lvl) out:write("Captures:\n") for name,buf in pairs(cap_buffers) do out:write(format(" %-20s %4s)\n", name, "("..#buf)) if lvl > 1 then local bar = rep("=", 76) out:write(" ", bar, "\n") for _,line in ipairs(buf) do out:write(" ", line, "\n") end out:write(" ", bar, "\n\n") end end out:write("\n") end -- Check for unfinished or unused captures. local function checkcaptures() if cap_name then wprinterr(g_fname, ":", cap_lineno, ": error: unfinished .capture `", cap_name,"'\n") return end for name in pairs(cap_buffers) do if not cap_used[name] then wprinterr(g_fname, ":*: error: missing .dumpcapture ", name ,"\n") end end end ------------------------------------------------------------------------------ -- Sections names. local map_sections = {} -- Pseudo-opcode to define code sections. -- TODO: Data sections, BSS sections. Needs extra C code and API. map_coreop[".section_*"] = function(params) if not params then return "name..." end if #map_sections > 0 then werror("duplicate section definition") end wflush() for sn,name in ipairs(params) do local opname = "."..name.."_0" if not match(name, "^[%a][%w_]*$") or map_op[opname] or map_op["."..name.."_*"] then werror("bad section name `"..name.."'") end map_sections[#map_sections+1] = name wline(format("#define DASM_SECTION_%s\t%d", upper(name), sn-1)) map_op[opname] = function(params) g_arch.section(sn-1) end end wline(format("#define DASM_MAXSECTION\t\t%d", #map_sections)) end -- Dump all sections. local function dumpsections(out, lvl) out:write("Sections:\n") for _,name in ipairs(map_sections) do out:write(format(" %s\n", name)) end out:write("\n") end ------------------------------------------------------------------------------ -- Replacement for customized Lua, which lacks the package library. local prefix = "" if not require then function require(name) local fp = assert(io.open(prefix..name..".lua")) local s = fp:read("*a") assert(fp:close()) return assert(loadstring(s, "@"..name..".lua"))() end end -- Load architecture-specific module. local function loadarch(arch) if not match(arch, "^[%w_]+$") then return "bad arch name" end local ok, m_arch = pcall(require, "dasm_"..arch) if not ok then return "cannot load module: "..m_arch end g_arch = m_arch wflush = m_arch.passcb(wline, werror, wfatal, wwarn) m_arch.setup(arch, g_opt) map_op, map_def = m_arch.mergemaps(map_coreop, map_def) end -- Dump architecture description. function opt_map.dumparch(args) local name = optparam(args) if not g_arch then local err = loadarch(name) if err then opterror(err) end end local t = {} for name in pairs(map_coreop) do t[#t+1] = name end for name in pairs(map_op) do t[#t+1] = name end sort(t) local out = stdout local _arch = g_arch._info out:write(format("%s version %s, released %s, %s\n", _info.name, _info.version, _info.release, _info.url)) g_arch.dumparch(out) local pseudo = true out:write("Pseudo-Opcodes:\n") for _,sname in ipairs(t) do local name, nparam = match(sname, "^(.+)_([0-9%*])$") if name then if pseudo and sub(name, 1, 1) ~= "." then out:write("\nOpcodes:\n") pseudo = false end local f = map_op[sname] local s if nparam ~= "*" then nparam = nparam + 0 end if nparam == 0 then s = "" elseif type(f) == "string" then s = map_op[".template__"](nil, f, nparam) else s = f(nil, nparam) end if type(s) == "table" then for _,s2 in ipairs(s) do out:write(format(" %-12s %s\n", name, s2)) end else out:write(format(" %-12s %s\n", name, s)) end end end out:write("\n") exit(0) end -- Pseudo-opcode to set the architecture. -- Only initially available (map_op is replaced when called). map_op[".arch_1"] = function(params) if not params then return "name" end local err = loadarch(params[1]) if err then wfatal(err) end end -- Dummy .arch pseudo-opcode to improve the error report. map_coreop[".arch_1"] = function(params) if not params then return "name" end wfatal("duplicate .arch statement") end ------------------------------------------------------------------------------ -- Dummy pseudo-opcode. Don't confuse '.nop' with 'nop'. map_coreop[".nop_*"] = function(params) if not params then return "[ignored...]" end end -- Pseudo-opcodes to raise errors. map_coreop[".error_1"] = function(params) if not params then return "message" end werror(params[1]) end map_coreop[".fatal_1"] = function(params) if not params then return "message" end wfatal(params[1]) end -- Dump all user defined elements. local function dumpdef(out) local lvl = g_opt.dumpdef if lvl == 0 then return end dumpsections(out, lvl) dumpdefines(out, lvl) if g_arch then g_arch.dumpdef(out, lvl) end dumpmacros(out, lvl) dumpcaptures(out, lvl) end ------------------------------------------------------------------------------ -- Helper for splitstmt. local splitlvl local function splitstmt_one(c) if c == "(" then splitlvl = ")"..splitlvl elseif c == "[" then splitlvl = "]"..splitlvl elseif c == "{" then splitlvl = "}"..splitlvl elseif c == ")" or c == "]" or c == "}" then if sub(splitlvl, 1, 1) ~= c then werror("unbalanced (), [] or {}") end splitlvl = sub(splitlvl, 2) elseif splitlvl == "" then return " \0 " end return c end -- Split statement into (pseudo-)opcode and params. local function splitstmt(stmt) -- Convert label with trailing-colon into .label statement. local label = match(stmt, "^%s*(.+):%s*$") if label then return ".label", {label} end -- Split at commas and equal signs, but obey parentheses and brackets. splitlvl = "" stmt = gsub(stmt, "[,%(%)%[%]{}]", splitstmt_one) if splitlvl ~= "" then werror("unbalanced () or []") end -- Split off opcode. local op, other = match(stmt, "^%s*([^%s%z]+)%s*(.*)$") if not op then werror("bad statement syntax") end -- Split parameters. local params = {} for p in gmatch(other, "%s*(%Z+)%z?") do params[#params+1] = gsub(p, "%s+$", "") end if #params > 16 then werror("too many parameters") end params.op = op return op, params end -- Process a single statement. dostmt = function(stmt) -- Ignore empty statements. if match(stmt, "^%s*$") then return end -- Capture macro defs before substitution. if mac_capture then return mac_capture(stmt) end stmt = definesubst(stmt) -- Emit C code without parsing the line. if sub(stmt, 1, 1) == "|" then local tail = sub(stmt, 2) wflush() if sub(tail, 1, 2) == "//" then wcomment(tail) else wline(tail, true) end return end -- Split into (pseudo-)opcode and params. local op, params = splitstmt(stmt) -- Get opcode handler (matching # of parameters or generic handler). local f = map_op[op.."_"..#params] or map_op[op.."_*"] if not f then if not g_arch then wfatal("first statement must be .arch") end -- Improve error report. for i=0,9 do if map_op[op.."_"..i] then werror("wrong number of parameters for `"..op.."'") end end werror("unknown statement `"..op.."'") end -- Call opcode handler or special handler for template strings. if type(f) == "string" then map_op[".template__"](params, f) else f(params) end end -- Process a single line. local function doline(line) if g_opt.flushline then wflush() end -- Assembler line? local indent, aline = match(line, "^(%s*)%|(.*)$") if not aline then -- No, plain C code line, need to flush first. wflush() wsync() wline(line, false) return end g_indent = indent -- Remember current line indentation. -- Emit C code (even from macros). Avoids echo and line parsing. if sub(aline, 1, 1) == "|" then if not mac_capture then wsync() elseif g_opt.comment then wsync() wcomment(aline) end dostmt(aline) return end -- Echo assembler line as a comment. if g_opt.comment then wsync() wcomment(aline) end -- Strip assembler comments. aline = gsub(aline, "//.*$", "") -- Split line into statements at semicolons. if match(aline, ";") then for stmt in gmatch(aline, "[^;]+") do dostmt(stmt) end else dostmt(aline) end end ------------------------------------------------------------------------------ -- Write DynASM header. local function dasmhead(out) out:write(format([[ /* ** This file has been pre-processed with DynASM. ** %s ** DynASM version %s, DynASM %s version %s ** DO NOT EDIT! The original file is in "%s". */ #if DASM_VERSION != %d #error "Version mismatch between DynASM and included encoding engine" #endif ]], _info.url, _info.version, g_arch._info.arch, g_arch._info.version, g_fname, _info.vernum)) end -- Read input file. readfile = function(fin) g_indent = "" g_lineno = 0 g_synclineno = -1 -- Process all lines. for line in fin:lines() do g_lineno = g_lineno + 1 g_curline = line local ok, err = pcall(doline, line) if not ok and wprinterr(err, "\n") then return true end end wflush() -- Close input file. assert(fin == stdin or fin:close()) end -- Write output file. local function writefile(outfile) local fout -- Open output file. if outfile == nil or outfile == "-" then fout = stdout else fout = assert(io.open(outfile, "w")) end -- Write all buffered lines wdumplines(fout, g_wbuffer) -- Close output file. assert(fout == stdout or fout:close()) -- Optionally dump definitions. dumpdef(fout == stdout and stderr or stdout) end -- Translate an input file to an output file. local function translate(infile, outfile) g_wbuffer = {} g_indent = "" g_lineno = 0 g_synclineno = -1 -- Put header. wline(dasmhead) -- Read input file. local fin if infile == "-" then g_fname = "(stdin)" fin = stdin else g_fname = infile fin = assert(io.open(infile, "r")) end readfile(fin) -- Check for errors. if not g_arch then wprinterr(g_fname, ":*: error: missing .arch directive\n") end checkconds() checkmacros() checkcaptures() if g_errcount ~= 0 then stderr:write(g_fname, ":*: info: ", g_errcount, " error", (type(g_errcount) == "number" and g_errcount > 1) and "s" or "", " in input file -- no output file generated.\n") dumpdef(stderr) exit(1) end -- Write output file. writefile(outfile) end ------------------------------------------------------------------------------ -- Print help text. function opt_map.help() stdout:write("DynASM -- ", _info.description, ".\n") stdout:write("DynASM ", _info.version, " ", _info.release, " ", _info.url, "\n") stdout:write[[ Usage: dynasm [OPTION]... INFILE.dasc|- -h, --help Display this help text. -V, --version Display version and copyright information. -o, --outfile FILE Output file name (default is stdout). -I, --include DIR Add directory to the include search path. -c, --ccomment Use /* */ comments for assembler lines. -C, --cppcomment Use // comments for assembler lines (default). -N, --nocomment Suppress assembler lines in output. -M, --maccomment Show macro expansions as comments (default off). -L, --nolineno Suppress CPP line number information in output. -F, --flushline Flush action list for every line. -D NAME[=SUBST] Define a substitution. -U NAME Undefine a substitution. -P, --dumpdef Dump defines, macros, etc. Repeat for more output. -A, --dumparch ARCH Load architecture ARCH and dump description. ]] exit(0) end -- Print version information. function opt_map.version() stdout:write(format("%s version %s, released %s\n%s\n\n%s", _info.name, _info.version, _info.release, _info.url, _info.copyright)) exit(0) end -- Misc. options. function opt_map.outfile(args) g_opt.outfile = optparam(args) end function opt_map.include(args) insert(g_opt.include, 1, optparam(args)) end function opt_map.ccomment() g_opt.comment = "/*|"; g_opt.endcomment = " */" end function opt_map.cppcomment() g_opt.comment = "//|"; g_opt.endcomment = "" end function opt_map.nocomment() g_opt.comment = false end function opt_map.maccomment() g_opt.maccomment = true end function opt_map.nolineno() g_opt.cpp = false end function opt_map.flushline() g_opt.flushline = true end function opt_map.dumpdef() g_opt.dumpdef = g_opt.dumpdef + 1 end ------------------------------------------------------------------------------ -- Short aliases for long options. local opt_alias = { h = "help", ["?"] = "help", V = "version", o = "outfile", I = "include", c = "ccomment", C = "cppcomment", N = "nocomment", M = "maccomment", L = "nolineno", F = "flushline", P = "dumpdef", A = "dumparch", } -- Parse single option. local function parseopt(opt, args) opt_current = #opt == 1 and "-"..opt or "--"..opt local f = opt_map[opt] or opt_map[opt_alias[opt]] if not f then opterror("unrecognized option `", opt_current, "'. Try `--help'.\n") end f(args) end -- Parse arguments. local function parseargs(args) -- Default options. g_opt.comment = "//|" g_opt.endcomment = "" g_opt.cpp = true g_opt.dumpdef = 0 g_opt.include = { "" } -- Process all option arguments. args.argn = 1 repeat local a = args[args.argn] if not a then break end local lopt, opt = match(a, "^%-(%-?)(.+)") if not opt then break end args.argn = args.argn + 1 if lopt == "" then -- Loop through short options. for o in gmatch(opt, ".") do parseopt(o, args) end else -- Long option. parseopt(opt, args) end until false -- Check for proper number of arguments. local nargs = #args - args.argn + 1 if nargs ~= 1 then if nargs == 0 then if g_opt.dumpdef > 0 then return dumpdef(stdout) end end opt_map.help() end -- Translate a single input file to a single output file -- TODO: Handle multiple files? translate(args[args.argn], g_opt.outfile) end ------------------------------------------------------------------------------ -- Add the directory dynasm.lua resides in to the Lua module search path. local arg = arg if arg and arg[0] then prefix = match(arg[0], "^(.*[/\\])") if package and prefix then package.path = prefix.."?.lua;"..package.path end end -- Start DynASM. parseargs{...} ------------------------------------------------------------------------------ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/etc/0000775000000000000000000000000012231715321020351 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/etc/luajit.10000664000000000000000000000444312202141143021721 0ustar rootroot.TH luajit 1 "" "" "LuaJIT documentation" .SH NAME luajit \- Just-In-Time Compiler for the Lua Language \fB .SH SYNOPSIS .B luajit [\fIoptions\fR]... [\fIscript\fR [\fIargs\fR]...] .SH "WEB SITE" .IR http://luajit.org .SH DESCRIPTION .PP This is the command-line program to run Lua programs with \fBLuaJIT\fR. .PP \fBLuaJIT\fR is a just-in-time (JIT) compiler for the Lua language. The virtual machine (VM) is based on a fast interpreter combined with a trace compiler. It can significantly improve the performance of Lua programs. .PP \fBLuaJIT\fR is API\- and ABI-compatible with the VM of the standard Lua\ 5.1 interpreter. When embedding the VM into an application, the built library can be used as a drop-in replacement. .SH OPTIONS .TP .BI "\-e " chunk Run the given chunk of Lua code. .TP .BI "\-l " library Load the named library, just like \fBrequire("\fR\fIlibrary\fR\fB")\fR. .TP .BI "\-b " ... Save or list bytecode. Run without arguments to get help on options. .TP .BI "\-j " command Perform LuaJIT control command (optional space after \fB\-j\fR). .TP .BI "\-O" [opt] Control LuaJIT optimizations. .TP .B "\-i" Run in interactive mode. .TP .B "\-v" Show \fBLuaJIT\fR version. .TP .B "\-E" Ignore environment variables. .TP .B "\-\-" Stop processing options. .TP .B "\-" Read script from stdin instead. .PP After all options are processed, the given \fIscript\fR is run. The arguments are passed in the global \fIarg\fR table. .PP Interactive mode is only entered, if no \fIscript\fR and no \fB\-e\fR option is given. Interactive mode can be left with EOF (\fICtrl\-Z\fB). .SH EXAMPLES .TP luajit hello.lua world Prints "Hello world", assuming \fIhello.lua\fR contains: .br print("Hello", arg[1]) .TP luajit \-e "local x=0; for i=1,1e9 do x=x+i end; print(x)" Calculates the sum of the numbers from 1 to 1000000000. .br And finishes in a reasonable amount of time, too. .TP luajit \-jv \-e "for i=1,10 do for j=1,10 do for k=1,100 do end end end" Runs some nested loops and shows the resulting traces. .SH COPYRIGHT .PP \fBLuaJIT\fR is Copyright \(co 2005-2013 Mike Pall. .br \fBLuaJIT\fR is open source software, released under the MIT license. .SH SEE ALSO .PP More details in the provided HTML docs or at: .IR http://luajit.org .br More about the Lua language can be found at: .IR http://lua.org/docs.html .PP lua(1) tarantool-1.5.1.218.g1a69fd6/third_party/luajit/etc/luajit.pc0000664000000000000000000000112012231715321022157 0ustar rootroot# Package information for LuaJIT to be used by pkg-config. majver=2 minver=0 relver=2 version=${majver}.${minver}.${relver} abiver=5.1 prefix=/usr/local multilib=lib exec_prefix=${prefix} libdir=${exec_prefix}/${multilib} libname=luajit-${abiver} includedir=${prefix}/include/luajit-${majver}.${minver} INSTALL_LMOD=${prefix}/share/lua/${abiver} INSTALL_CMOD=${prefix}/${multilib}/lua/${abiver} Name: LuaJIT Description: Just-in-time compiler for Lua URL: http://luajit.org Version: ${version} Requires: Libs: -L${libdir} -l${libname} Libs.private: -Wl,-E -lm -ldl Cflags: -I${includedir} tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/0000775000000000000000000000000012231715321020365 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_load.c0000664000000000000000000000777512202141143022146 0ustar rootroot/* ** Load and dump code. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include #include #define lj_load_c #define LUA_CORE #include "lua.h" #include "lauxlib.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_func.h" #include "lj_frame.h" #include "lj_vm.h" #include "lj_lex.h" #include "lj_bcdump.h" #include "lj_parse.h" /* -- Load Lua source code and bytecode ----------------------------------- */ static TValue *cpparser(lua_State *L, lua_CFunction dummy, void *ud) { LexState *ls = (LexState *)ud; GCproto *pt; GCfunc *fn; int bc; UNUSED(dummy); cframe_errfunc(L->cframe) = -1; /* Inherit error function. */ bc = lj_lex_setup(L, ls); if (ls->mode && !strchr(ls->mode, bc ? 'b' : 't')) { setstrV(L, L->top++, lj_err_str(L, LJ_ERR_XMODE)); lj_err_throw(L, LUA_ERRSYNTAX); } pt = bc ? lj_bcread(ls) : lj_parse(ls); fn = lj_func_newL_empty(L, pt, tabref(L->env)); /* Don't combine above/below into one statement. */ setfuncV(L, L->top++, fn); return NULL; } LUA_API int lua_loadx(lua_State *L, lua_Reader reader, void *data, const char *chunkname, const char *mode) { LexState ls; int status; ls.rfunc = reader; ls.rdata = data; ls.chunkarg = chunkname ? chunkname : "?"; ls.mode = mode; lj_str_initbuf(&ls.sb); status = lj_vm_cpcall(L, NULL, &ls, cpparser); lj_lex_cleanup(L, &ls); lj_gc_check(L); return status; } LUA_API int lua_load(lua_State *L, lua_Reader reader, void *data, const char *chunkname) { return lua_loadx(L, reader, data, chunkname, NULL); } typedef struct FileReaderCtx { FILE *fp; char buf[LUAL_BUFFERSIZE]; } FileReaderCtx; static const char *reader_file(lua_State *L, void *ud, size_t *size) { FileReaderCtx *ctx = (FileReaderCtx *)ud; UNUSED(L); if (feof(ctx->fp)) return NULL; *size = fread(ctx->buf, 1, sizeof(ctx->buf), ctx->fp); return *size > 0 ? ctx->buf : NULL; } LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename, const char *mode) { FileReaderCtx ctx; int status; const char *chunkname; if (filename) { ctx.fp = fopen(filename, "rb"); if (ctx.fp == NULL) { lua_pushfstring(L, "cannot open %s: %s", filename, strerror(errno)); return LUA_ERRFILE; } chunkname = lua_pushfstring(L, "@%s", filename); } else { ctx.fp = stdin; chunkname = "=stdin"; } status = lua_loadx(L, reader_file, &ctx, chunkname, mode); if (ferror(ctx.fp)) { L->top -= filename ? 2 : 1; lua_pushfstring(L, "cannot read %s: %s", chunkname+1, strerror(errno)); if (filename) fclose(ctx.fp); return LUA_ERRFILE; } if (filename) { L->top--; copyTV(L, L->top-1, L->top); fclose(ctx.fp); } return status; } LUALIB_API int luaL_loadfile(lua_State *L, const char *filename) { return luaL_loadfilex(L, filename, NULL); } typedef struct StringReaderCtx { const char *str; size_t size; } StringReaderCtx; static const char *reader_string(lua_State *L, void *ud, size_t *size) { StringReaderCtx *ctx = (StringReaderCtx *)ud; UNUSED(L); if (ctx->size == 0) return NULL; *size = ctx->size; ctx->size = 0; return ctx->str; } LUALIB_API int luaL_loadbufferx(lua_State *L, const char *buf, size_t size, const char *name, const char *mode) { StringReaderCtx ctx; ctx.str = buf; ctx.size = size; return lua_loadx(L, reader_string, &ctx, name, mode); } LUALIB_API int luaL_loadbuffer(lua_State *L, const char *buf, size_t size, const char *name) { return luaL_loadbufferx(L, buf, size, name, NULL); } LUALIB_API int luaL_loadstring(lua_State *L, const char *s) { return luaL_loadbuffer(L, s, strlen(s), s); } /* -- Dump bytecode ------------------------------------------------------- */ LUA_API int lua_dump(lua_State *L, lua_Writer writer, void *data) { cTValue *o = L->top-1; api_check(L, L->top > L->base); if (tvisfunc(o) && isluafunc(funcV(o))) return lj_bcwrite(L, funcproto(funcV(o)), writer, data, 0); else return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_lex.c0000664000000000000000000003061512202141143022004 0ustar rootroot/* ** Lexical analyzer. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_lex_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #if LJ_HASFFI #include "lj_tab.h" #include "lj_ctype.h" #include "lj_cdata.h" #include "lualib.h" #endif #include "lj_state.h" #include "lj_lex.h" #include "lj_parse.h" #include "lj_char.h" #include "lj_strscan.h" /* Lua lexer token names. */ static const char *const tokennames[] = { #define TKSTR1(name) #name, #define TKSTR2(name, sym) #sym, TKDEF(TKSTR1, TKSTR2) #undef TKSTR1 #undef TKSTR2 NULL }; /* -- Buffer handling ----------------------------------------------------- */ #define char2int(c) ((int)(uint8_t)(c)) #define next(ls) \ (ls->current = (ls->n--) > 0 ? char2int(*ls->p++) : fillbuf(ls)) #define save_and_next(ls) (save(ls, ls->current), next(ls)) #define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') #define END_OF_STREAM (-1) static int fillbuf(LexState *ls) { size_t sz; const char *buf = ls->rfunc(ls->L, ls->rdata, &sz); if (buf == NULL || sz == 0) return END_OF_STREAM; ls->n = (MSize)sz - 1; ls->p = buf; return char2int(*(ls->p++)); } static LJ_NOINLINE void save_grow(LexState *ls, int c) { MSize newsize; if (ls->sb.sz >= LJ_MAX_STR/2) lj_lex_error(ls, 0, LJ_ERR_XELEM); newsize = ls->sb.sz * 2; lj_str_resizebuf(ls->L, &ls->sb, newsize); ls->sb.buf[ls->sb.n++] = (char)c; } static LJ_AINLINE void save(LexState *ls, int c) { if (LJ_UNLIKELY(ls->sb.n + 1 > ls->sb.sz)) save_grow(ls, c); else ls->sb.buf[ls->sb.n++] = (char)c; } static void inclinenumber(LexState *ls) { int old = ls->current; lua_assert(currIsNewline(ls)); next(ls); /* skip `\n' or `\r' */ if (currIsNewline(ls) && ls->current != old) next(ls); /* skip `\n\r' or `\r\n' */ if (++ls->linenumber >= LJ_MAX_LINE) lj_lex_error(ls, ls->token, LJ_ERR_XLINES); } /* -- Scanner for terminals ----------------------------------------------- */ /* Parse a number literal. */ static void lex_number(LexState *ls, TValue *tv) { StrScanFmt fmt; int c, xp = 'e'; lua_assert(lj_char_isdigit(ls->current)); if ((c = ls->current) == '0') { save_and_next(ls); if ((ls->current | 0x20) == 'x') xp = 'p'; } while (lj_char_isident(ls->current) || ls->current == '.' || ((ls->current == '-' || ls->current == '+') && (c | 0x20) == xp)) { c = ls->current; save_and_next(ls); } save(ls, '\0'); fmt = lj_strscan_scan((const uint8_t *)ls->sb.buf, tv, (LJ_DUALNUM ? STRSCAN_OPT_TOINT : STRSCAN_OPT_TONUM) | (LJ_HASFFI ? (STRSCAN_OPT_LL|STRSCAN_OPT_IMAG) : 0)); if (LJ_DUALNUM && fmt == STRSCAN_INT) { setitype(tv, LJ_TISNUM); } else if (fmt == STRSCAN_NUM) { /* Already in correct format. */ #if LJ_HASFFI } else if (fmt != STRSCAN_ERROR) { lua_State *L = ls->L; GCcdata *cd; lua_assert(fmt == STRSCAN_I64 || fmt == STRSCAN_U64 || fmt == STRSCAN_IMAG); if (!ctype_ctsG(G(L))) { ptrdiff_t oldtop = savestack(L, L->top); luaopen_ffi(L); /* Load FFI library on-demand. */ L->top = restorestack(L, oldtop); } if (fmt == STRSCAN_IMAG) { cd = lj_cdata_new_(L, CTID_COMPLEX_DOUBLE, 2*sizeof(double)); ((double *)cdataptr(cd))[0] = 0; ((double *)cdataptr(cd))[1] = numV(tv); } else { cd = lj_cdata_new_(L, fmt==STRSCAN_I64 ? CTID_INT64 : CTID_UINT64, 8); *(uint64_t *)cdataptr(cd) = tv->u64; } lj_parse_keepcdata(ls, tv, cd); #endif } else { lua_assert(fmt == STRSCAN_ERROR); lj_lex_error(ls, TK_number, LJ_ERR_XNUMBER); } } static int skip_sep(LexState *ls) { int count = 0; int s = ls->current; lua_assert(s == '[' || s == ']'); save_and_next(ls); while (ls->current == '=') { save_and_next(ls); count++; } return (ls->current == s) ? count : (-count) - 1; } static void read_long_string(LexState *ls, TValue *tv, int sep) { save_and_next(ls); /* skip 2nd `[' */ if (currIsNewline(ls)) /* string starts with a newline? */ inclinenumber(ls); /* skip it */ for (;;) { switch (ls->current) { case END_OF_STREAM: lj_lex_error(ls, TK_eof, tv ? LJ_ERR_XLSTR : LJ_ERR_XLCOM); break; case ']': if (skip_sep(ls) == sep) { save_and_next(ls); /* skip 2nd `]' */ goto endloop; } break; case '\n': case '\r': save(ls, '\n'); inclinenumber(ls); if (!tv) lj_str_resetbuf(&ls->sb); /* avoid wasting space */ break; default: if (tv) save_and_next(ls); else next(ls); break; } } endloop: if (tv) { GCstr *str = lj_parse_keepstr(ls, ls->sb.buf + (2 + (MSize)sep), ls->sb.n - 2*(2 + (MSize)sep)); setstrV(ls->L, tv, str); } } static void read_string(LexState *ls, int delim, TValue *tv) { save_and_next(ls); while (ls->current != delim) { switch (ls->current) { case END_OF_STREAM: lj_lex_error(ls, TK_eof, LJ_ERR_XSTR); continue; case '\n': case '\r': lj_lex_error(ls, TK_string, LJ_ERR_XSTR); continue; case '\\': { int c = next(ls); /* Skip the '\\'. */ switch (c) { case 'a': c = '\a'; break; case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\v'; break; case 'x': /* Hexadecimal escape '\xXX'. */ c = (next(ls) & 15u) << 4; if (!lj_char_isdigit(ls->current)) { if (!lj_char_isxdigit(ls->current)) goto err_xesc; c += 9 << 4; } c += (next(ls) & 15u); if (!lj_char_isdigit(ls->current)) { if (!lj_char_isxdigit(ls->current)) goto err_xesc; c += 9; } break; case 'z': /* Skip whitespace. */ next(ls); while (lj_char_isspace(ls->current)) if (currIsNewline(ls)) inclinenumber(ls); else next(ls); continue; case '\n': case '\r': save(ls, '\n'); inclinenumber(ls); continue; case '\\': case '\"': case '\'': break; case END_OF_STREAM: continue; default: if (!lj_char_isdigit(c)) goto err_xesc; c -= '0'; /* Decimal escape '\ddd'. */ if (lj_char_isdigit(next(ls))) { c = c*10 + (ls->current - '0'); if (lj_char_isdigit(next(ls))) { c = c*10 + (ls->current - '0'); if (c > 255) { err_xesc: lj_lex_error(ls, TK_string, LJ_ERR_XESC); } next(ls); } } save(ls, c); continue; } save(ls, c); next(ls); continue; } default: save_and_next(ls); break; } } save_and_next(ls); /* skip delimiter */ setstrV(ls->L, tv, lj_parse_keepstr(ls, ls->sb.buf + 1, ls->sb.n - 2)); } /* -- Main lexical scanner ------------------------------------------------ */ static int llex(LexState *ls, TValue *tv) { lj_str_resetbuf(&ls->sb); for (;;) { if (lj_char_isident(ls->current)) { GCstr *s; if (lj_char_isdigit(ls->current)) { /* Numeric literal. */ lex_number(ls, tv); return TK_number; } /* Identifier or reserved word. */ do { save_and_next(ls); } while (lj_char_isident(ls->current)); s = lj_parse_keepstr(ls, ls->sb.buf, ls->sb.n); setstrV(ls->L, tv, s); if (s->reserved > 0) /* Reserved word? */ return TK_OFS + s->reserved; return TK_name; } switch (ls->current) { case '\n': case '\r': inclinenumber(ls); continue; case ' ': case '\t': case '\v': case '\f': next(ls); continue; case '-': next(ls); if (ls->current != '-') return '-'; /* else is a comment */ next(ls); if (ls->current == '[') { int sep = skip_sep(ls); lj_str_resetbuf(&ls->sb); /* `skip_sep' may dirty the buffer */ if (sep >= 0) { read_long_string(ls, NULL, sep); /* long comment */ lj_str_resetbuf(&ls->sb); continue; } } /* else short comment */ while (!currIsNewline(ls) && ls->current != END_OF_STREAM) next(ls); continue; case '[': { int sep = skip_sep(ls); if (sep >= 0) { read_long_string(ls, tv, sep); return TK_string; } else if (sep == -1) { return '['; } else { lj_lex_error(ls, TK_string, LJ_ERR_XLDELIM); continue; } } case '=': next(ls); if (ls->current != '=') return '='; else { next(ls); return TK_eq; } case '<': next(ls); if (ls->current != '=') return '<'; else { next(ls); return TK_le; } case '>': next(ls); if (ls->current != '=') return '>'; else { next(ls); return TK_ge; } case '~': next(ls); if (ls->current != '=') return '~'; else { next(ls); return TK_ne; } case ':': next(ls); if (ls->current != ':') return ':'; else { next(ls); return TK_label; } case '"': case '\'': read_string(ls, ls->current, tv); return TK_string; case '.': save_and_next(ls); if (ls->current == '.') { next(ls); if (ls->current == '.') { next(ls); return TK_dots; /* ... */ } return TK_concat; /* .. */ } else if (!lj_char_isdigit(ls->current)) { return '.'; } else { lex_number(ls, tv); return TK_number; } case END_OF_STREAM: return TK_eof; default: { int c = ls->current; next(ls); return c; /* Single-char tokens (+ - / ...). */ } } } } /* -- Lexer API ----------------------------------------------------------- */ /* Setup lexer state. */ int lj_lex_setup(lua_State *L, LexState *ls) { int header = 0; ls->L = L; ls->fs = NULL; ls->n = 0; ls->p = NULL; ls->vstack = NULL; ls->sizevstack = 0; ls->vtop = 0; ls->bcstack = NULL; ls->sizebcstack = 0; ls->lookahead = TK_eof; /* No look-ahead token. */ ls->linenumber = 1; ls->lastline = 1; lj_str_resizebuf(ls->L, &ls->sb, LJ_MIN_SBUF); next(ls); /* Read-ahead first char. */ if (ls->current == 0xef && ls->n >= 2 && char2int(ls->p[0]) == 0xbb && char2int(ls->p[1]) == 0xbf) { /* Skip UTF-8 BOM (if buffered). */ ls->n -= 2; ls->p += 2; next(ls); header = 1; } if (ls->current == '#') { /* Skip POSIX #! header line. */ do { next(ls); if (ls->current == END_OF_STREAM) return 0; } while (!currIsNewline(ls)); inclinenumber(ls); header = 1; } if (ls->current == LUA_SIGNATURE[0]) { /* Bytecode dump. */ if (header) { /* ** Loading bytecode with an extra header is disabled for security ** reasons. This may circumvent the usual check for bytecode vs. ** Lua code by looking at the first char. Since this is a potential ** security violation no attempt is made to echo the chunkname either. */ setstrV(L, L->top++, lj_err_str(L, LJ_ERR_BCBAD)); lj_err_throw(L, LUA_ERRSYNTAX); } return 1; } return 0; } /* Cleanup lexer state. */ void lj_lex_cleanup(lua_State *L, LexState *ls) { global_State *g = G(L); lj_mem_freevec(g, ls->bcstack, ls->sizebcstack, BCInsLine); lj_mem_freevec(g, ls->vstack, ls->sizevstack, VarInfo); lj_str_freebuf(g, &ls->sb); } void lj_lex_next(LexState *ls) { ls->lastline = ls->linenumber; if (LJ_LIKELY(ls->lookahead == TK_eof)) { /* No lookahead token? */ ls->token = llex(ls, &ls->tokenval); /* Get next token. */ } else { /* Otherwise return lookahead token. */ ls->token = ls->lookahead; ls->lookahead = TK_eof; ls->tokenval = ls->lookaheadval; } } LexToken lj_lex_lookahead(LexState *ls) { lua_assert(ls->lookahead == TK_eof); ls->lookahead = llex(ls, &ls->lookaheadval); return ls->lookahead; } const char *lj_lex_token2str(LexState *ls, LexToken token) { if (token > TK_OFS) return tokennames[token-TK_OFS-1]; else if (!lj_char_iscntrl(token)) return lj_str_pushf(ls->L, "%c", token); else return lj_str_pushf(ls->L, "char(%d)", token); } void lj_lex_error(LexState *ls, LexToken token, ErrMsg em, ...) { const char *tok; va_list argp; if (token == 0) { tok = NULL; } else if (token == TK_name || token == TK_string || token == TK_number) { save(ls, '\0'); tok = ls->sb.buf; } else { tok = lj_lex_token2str(ls, token); } va_start(argp, em); lj_err_lex(ls->L, ls->chunkname, tok, ls->linenumber, em, argp); va_end(argp); } void lj_lex_init(lua_State *L) { uint32_t i; for (i = 0; i < TK_RESERVED; i++) { GCstr *s = lj_str_newz(L, tokennames[i]); fixstring(s); /* Reserved words are never collected. */ s->reserved = (uint8_t)(i+1); } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_iropt.h0000664000000000000000000001345112202141143022355 0ustar rootroot/* ** Common header for IR emitter and optimizations. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_IROPT_H #define _LJ_IROPT_H #include #include "lj_obj.h" #include "lj_jit.h" #if LJ_HASJIT /* IR emitter. */ LJ_FUNC void LJ_FASTCALL lj_ir_growtop(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_ir_emit(jit_State *J); /* Save current IR in J->fold.ins, but do not emit it (yet). */ static LJ_AINLINE void lj_ir_set_(jit_State *J, uint16_t ot, IRRef1 a, IRRef1 b) { J->fold.ins.ot = ot; J->fold.ins.op1 = a; J->fold.ins.op2 = b; } #define lj_ir_set(J, ot, a, b) \ lj_ir_set_(J, (uint16_t)(ot), (IRRef1)(a), (IRRef1)(b)) /* Get ref of next IR instruction and optionally grow IR. ** Note: this may invalidate all IRIns*! */ static LJ_AINLINE IRRef lj_ir_nextins(jit_State *J) { IRRef ref = J->cur.nins; if (LJ_UNLIKELY(ref >= J->irtoplim)) lj_ir_growtop(J); J->cur.nins = ref + 1; return ref; } /* Interning of constants. */ LJ_FUNC TRef LJ_FASTCALL lj_ir_kint(jit_State *J, int32_t k); LJ_FUNC void lj_ir_k64_freeall(jit_State *J); LJ_FUNC TRef lj_ir_k64(jit_State *J, IROp op, cTValue *tv); LJ_FUNC cTValue *lj_ir_k64_find(jit_State *J, uint64_t u64); LJ_FUNC TRef lj_ir_knum_u64(jit_State *J, uint64_t u64); LJ_FUNC TRef lj_ir_knumint(jit_State *J, lua_Number n); LJ_FUNC TRef lj_ir_kint64(jit_State *J, uint64_t u64); LJ_FUNC TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t); LJ_FUNC TRef lj_ir_kptr_(jit_State *J, IROp op, void *ptr); LJ_FUNC TRef lj_ir_knull(jit_State *J, IRType t); LJ_FUNC TRef lj_ir_kslot(jit_State *J, TRef key, IRRef slot); #if LJ_64 #define lj_ir_kintp(J, k) lj_ir_kint64(J, (uint64_t)(k)) #else #define lj_ir_kintp(J, k) lj_ir_kint(J, (int32_t)(k)) #endif static LJ_AINLINE TRef lj_ir_knum(jit_State *J, lua_Number n) { TValue tv; tv.n = n; return lj_ir_knum_u64(J, tv.u64); } #define lj_ir_kstr(J, str) lj_ir_kgc(J, obj2gco((str)), IRT_STR) #define lj_ir_ktab(J, tab) lj_ir_kgc(J, obj2gco((tab)), IRT_TAB) #define lj_ir_kfunc(J, func) lj_ir_kgc(J, obj2gco((func)), IRT_FUNC) #define lj_ir_kptr(J, ptr) lj_ir_kptr_(J, IR_KPTR, (ptr)) #define lj_ir_kkptr(J, ptr) lj_ir_kptr_(J, IR_KKPTR, (ptr)) /* Special FP constants. */ #define lj_ir_knum_zero(J) lj_ir_knum_u64(J, U64x(00000000,00000000)) #define lj_ir_knum_one(J) lj_ir_knum_u64(J, U64x(3ff00000,00000000)) #define lj_ir_knum_tobit(J) lj_ir_knum_u64(J, U64x(43380000,00000000)) /* Special 128 bit SIMD constants. */ #define lj_ir_knum_abs(J) lj_ir_k64(J, IR_KNUM, LJ_KSIMD(J, LJ_KSIMD_ABS)) #define lj_ir_knum_neg(J) lj_ir_k64(J, IR_KNUM, LJ_KSIMD(J, LJ_KSIMD_NEG)) /* Access to constants. */ LJ_FUNC void lj_ir_kvalue(lua_State *L, TValue *tv, const IRIns *ir); /* Convert IR operand types. */ LJ_FUNC TRef LJ_FASTCALL lj_ir_tonumber(jit_State *J, TRef tr); LJ_FUNC TRef LJ_FASTCALL lj_ir_tonum(jit_State *J, TRef tr); LJ_FUNC TRef LJ_FASTCALL lj_ir_tostr(jit_State *J, TRef tr); /* Miscellaneous IR ops. */ LJ_FUNC int lj_ir_numcmp(lua_Number a, lua_Number b, IROp op); LJ_FUNC int lj_ir_strcmp(GCstr *a, GCstr *b, IROp op); LJ_FUNC void lj_ir_rollback(jit_State *J, IRRef ref); /* Emit IR instructions with on-the-fly optimizations. */ LJ_FUNC TRef LJ_FASTCALL lj_opt_fold(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_cse(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_cselim(jit_State *J, IRRef lim); /* Special return values for the fold functions. */ enum { NEXTFOLD, /* Couldn't fold, pass on. */ RETRYFOLD, /* Retry fold with modified fins. */ KINTFOLD, /* Return ref for int constant in fins->i. */ FAILFOLD, /* Guard would always fail. */ DROPFOLD, /* Guard eliminated. */ MAX_FOLD }; #define INTFOLD(k) ((J->fold.ins.i = (k)), (TRef)KINTFOLD) #define INT64FOLD(k) (lj_ir_kint64(J, (k))) #define CONDFOLD(cond) ((TRef)FAILFOLD + (TRef)(cond)) #define LEFTFOLD (J->fold.ins.op1) #define RIGHTFOLD (J->fold.ins.op2) #define CSEFOLD (lj_opt_cse(J)) #define EMITFOLD (lj_ir_emit(J)) /* Load/store forwarding. */ LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_aload(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_hload(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_uload(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_fload(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_xload(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_tab_len(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_hrefk(jit_State *J); LJ_FUNC int LJ_FASTCALL lj_opt_fwd_href_nokey(jit_State *J); LJ_FUNC int LJ_FASTCALL lj_opt_fwd_tptr(jit_State *J, IRRef lim); LJ_FUNC int lj_opt_fwd_wasnonnil(jit_State *J, IROpT loadop, IRRef xref); /* Dead-store elimination. */ LJ_FUNC TRef LJ_FASTCALL lj_opt_dse_ahstore(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_dse_ustore(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_dse_fstore(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_dse_xstore(jit_State *J); /* Narrowing. */ LJ_FUNC TRef LJ_FASTCALL lj_opt_narrow_convert(jit_State *J); LJ_FUNC TRef LJ_FASTCALL lj_opt_narrow_index(jit_State *J, TRef key); LJ_FUNC TRef LJ_FASTCALL lj_opt_narrow_toint(jit_State *J, TRef tr); LJ_FUNC TRef LJ_FASTCALL lj_opt_narrow_tobit(jit_State *J, TRef tr); #if LJ_HASFFI LJ_FUNC TRef LJ_FASTCALL lj_opt_narrow_cindex(jit_State *J, TRef key); #endif LJ_FUNC TRef lj_opt_narrow_arith(jit_State *J, TRef rb, TRef rc, TValue *vb, TValue *vc, IROp op); LJ_FUNC TRef lj_opt_narrow_unm(jit_State *J, TRef rc, TValue *vc); LJ_FUNC TRef lj_opt_narrow_mod(jit_State *J, TRef rb, TRef rc, TValue *vc); LJ_FUNC TRef lj_opt_narrow_pow(jit_State *J, TRef rb, TRef rc, TValue *vc); LJ_FUNC IRType lj_opt_narrow_forl(jit_State *J, cTValue *forbase); /* Optimization passes. */ LJ_FUNC void lj_opt_dce(jit_State *J); LJ_FUNC int lj_opt_loop(jit_State *J); #if LJ_SOFTFP || (LJ_32 && LJ_HASFFI) LJ_FUNC void lj_opt_split(jit_State *J); #else #define lj_opt_split(J) UNUSED(J) #endif LJ_FUNC void lj_opt_sink(jit_State *J); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_sink.o0000664000000000000000000001673012213333055023067 0ustar rootrootELF> @@ UHHHfzxFJA<w HA<v>t (u!HPNHC]UHH]LeHIHGHC@u@3fv¸u#sfvLH]LeøvTHOH@@uxUufxuD@t fFø;sUH6]UHAVAUATSH%=u }uDSHC HDHS(H<pt$v HKL H9wSHCL$AD$ $LHHt.@ u(LH)HH=AOffAD$fAD$A$HCD u fAD$Ad$fAD$sAD$ uAD$fAD$CZSAD$fAD$AAT$HCH@ u@N<w fAD$fAD$Ad$fAD$IM9[A\A]A^]GCC: (Debian 4.7.3-4) 4.7.3zRx cAC ^  <rAC La `cNC P (AC G .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.comment.note.GNU-stack.rela.eh_frame @0 &8,868x1h >0 G \ Wx` x f`8  Eccr+c 98lj_opt_sink.csink_checkallocsink_phidepsink_checkphilj_opt_sink  ; (08@HPX`hpx (08@HPX`hpx#### p(08@HPX`hpx (08@HPX`hpxB (08@HPXo`ohopo @cd8tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_fold.o0000664000000000000000000020264012213333066023046 0ustar rootrootELF>@@UH]UH勇Љ]UH僿]UHt u!ff]UH勗ftftʁfEʉ]UH倿 f91]UHfw]UH]UH@uf]UH@u]UH@u(Ƈ)ff]UH@uƇ)f]UH@uƇ(f]UH@u*@u!ff]UH@ufu y]UH9u]UH@u@fuffLJ fu]UH@uRʃw=f%9u  ff]UH@uf u]UHw]UHu]UH勗u 2u $uƇ5f]UHu LJ]UH<t>@u5f9u f;E]UH<t'@uf9u]UH<@@f9u#ffmf9uffEDfD9uff"fD9uff]UHHW@uLH4ʀ~u?B`҃?#9uf]UHf;tf;u]UH@u.f9u f;E]UHf;tf;u]UHf;tf;u]UHtfbЃ]UHf9sff]UHf9u <t]UHf9u)t61Ѓ!f9sff]f;uUH]UHf;bЃ]UHt ]UHt ]UHt@u]UHtbT9vIHwH9u0Bfx'ȸDD9}&fBB9r]UHfHWH4¸~(FfxfD¸DudTDA9C9s6Hf;ufD;@t+@9r! ]UHtkDfAAD"9s>LGE҉I29u!rffA9u@"r@D9} B9r]UHAVAUATSIDtMDG@9B9s6It$H9u H9uDrADyR9rEt$E;$rLAFAD$DID$HEIŠClfPfG4lA$PA$A$PD[A\A]A^]UHSHHf9bv%Huu ftHH[]UHSHHB`҃?!u su%#uƇ(fI9tHf/'u!ƃ&ى!HfH[]UHSHH<tt@ukf9u&ff2f;u$ffH[]UHSHH<tD@u;f9u+ffH[]UHSHHu Ƈ(fH[]UHSHHtf9Vv5H+uH[]UHtXtx t@]UHtWtxt@ ]UHWDAG@tlztlDLAyu umHwH fH ΀ytq ytqDBBLytrI9u0ABHH):HH1HH!)HH !HH1]]<u Hc-<vUHHHHw<u Hc-<vUHHHu<u Hc-<vUHgHHuøHuƇfLJ<u Hc-<vUHZHHuøHu<u Hc-<vUHMHHuøHuUHSHHuf~&ruƇ fH[]ÀtUHH:u<u .<tUHH8¸tƇ.f@Du¾3¾(u'fxHOHc4¾< 9ukE t > @ D tUHt(HOHcHֺHøøøøw2<tUHÀtUH'fWf.z uøUHutH,]ÀtUHu%,y *f.zu,øÀtUHHUHHtJXEE<vUHH8UH<vH<vHwf$H9ЃeH9[H9QH9ЃEH9Ѓ9H9/H9%H9Ѓ]UH勇 wj$9h9[9N9A9Ѓ69-9$9ЃB]UHH*EHuUHHH*EHuUHSHH@ubfta fWEHufH[]UHSHH@ubft2 fWEHufH[]UHHt|HHx H*EHHH H*XEHuUHHtvH*EHuNwDUH$H2+22222 H2 @]UH<v$Hi]UHtvtx tB`s Hp@]UHf9u1B`s LJ]UHSHHHW@HʀzB`?#2#9}6J݀wuLJ6*!ƀ%DfHfH[]UHSHHHGH иyut<vH6H8hHƸ@u"fHfH[]øf9u?<t*B`sUHLJø]UHSHHtH0Hu Ƈ(HfH[]UHutf.sH,\H,HH1]UHutH,0]UHtHc ]UH<vH0H]UH<vH0?#<wG$HOHHHAHHHH -HHHH ]UHSHH<vkH0<vkH8HHH[]UHH]LeHILu LÉH]LeUHSHHtotfHCHЀxtx t@ H[]UHSHHtotfHCHЀxtx t@ H[]UHSHHt0t H[]UHSHHt&tH[]UHATSHHHH`HutHCHЀxt0~ tH{`HUIHI9uEHt4tLHH[A\]UHSHHt8tHHH[]UHF<v0t2H@]UH倿ttL< z t BȋdLtv9rHAuE%t9w& %t9wHAtȃt*t&t!t4t %=8uLʾ Lʾ]UH倿txt;P vHcHT]UHSHH5**,*f.zu H[]UHSHHt*EHuHH[]UHSHHtt(EHuHH[]UH $7){u!o i1c[SKى ;ى +9N"9M]UHH]LeH HHGH QE(tFEMf.zu @ffEHuHfbuXD!DTA9u 0@u"fHfH]LeUHH]LeHHHGL$иA|$uWA<$A;$u 0@u"fHfH]LeUHSHHHGH иyu)1A¸;uH[]UHSHHH[]UHSHHu 'VuƇ#fH[]UH倿tH0HuHwj]ËuLJø~ UH<]@uBfbu>UH倿Uu$fud ø]UHSHHtCf.zu f.z2u0ƃ.HHHf<*f.ƃ(f}fEHUHHu`HH4qwHƃ*)H4HH!H Hf <+tH[]UHSHHttHut/}vfHuH‰H[]UHSHHH`HHH[]øuUHH]UHSHHtH`HHH[]UHSHHffHOHxt 8t Hрxt 0~t  H[]UHSHHHc<vH`HHH[]UH<vH0H]UHSHH<vtH8<vtH0<u-<+u HE<,u H7H-<+u H<,u HfHHH[]UH勇ȉ]UHHt t]UHSHHtEHuHH[]UHAVAUATSIu`u  t.A`@uEtLf%=t#A`<`u L~AQAAAF9rIvHr HIA9wIFHDhAHI D,فD )A) iғ)։Ɓ9t9uL%u$u L} ÁlvIVTTuAL5u Lt[A\A]A^]UHH]LeLmLuL}H0HtDA|$tEl$ <t@tAqDDHWAƀ|?t"Au0DfǃffH"fȸD9,1E#AtAADD DffDfHAIT$HCH4HAAu0Hfǃ fDfHAfDfDAAϓfDWPIBfǃDfDfǃHAIT$HCH4H;AH]LeLmLuL}UHH]LeHHHW@uaH ʀyuT9AfHfDHffǃ H]LeUHH]LeLmLuL}H@HDDDD@ucfLJUfEfǃUfDfDHAAE fDUffH]LeLmLuL}UHSHHtf.zSuQƇUffLJfH?Hfƃ1H[]UHAVAUATSHDDEEuH?AFA<A$=#Ey5H?fǃ+ffDHAAAu/Afǃ*ffHAAAtAAfǃ*ffHAAtYAt$fǃ*fDfDHAAfǃ*ffHAAAufǃ*fDfDHAAD[A\A]A^]UHH]LeHH@fxu }HCHD"z?tB@u@Bfǃ(fHffDfǃ?H]LeUHG@DD9v'LGI9 u I9 tR9r]lj_opt_fold.c0k != 0(o)->gch.gct == ~(~10u)lj_ctype.hid > 0 && id < cts->top(((&n)->it) < 0xfffeffffu)ref == DROPFOLDir->o == IR_STRREFJ->slot[(&J->fold.ins)->op1] != 0(((&J->fold.left)))->o == IR_KGC(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 2015, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~10u)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 1996, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 1900, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~8u)(((GCobj *)(uintptr_t)(fn->l.uvptr[((&J->fold.ins)->op2 >> 8)]).gcptr32))->gch.gct == ~(~5u)(((&J->cur.ir[(ir->op1)])))->o == IR_KGC(((((((&J->cur.ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(ir->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1905, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)(((GCobj *)(uintptr_t)(fn2->l.uvptr[(ir->op2 >> 8)]).gcptr32))->gch.gct == ~(~5u)((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))(((((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR) ? (void) (0) : __assert_fail ("((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR", "lj_opt_fold.c", 1875, __PRETTY_FUNCTION__)), (((void *)(void *)(uintptr_t)(((&J->fold.left))->ptr).ptr32))) == ((((((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))", "lj_opt_fold.c", 1875, __PRETTY_FUNCTION__)), (&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val))((&J->fold.left))->o == IR_KNUM || ((&J->fold.left))->o == IR_KINT64((&J->fold.right))->o == IR_KNUM || ((&J->fold.right))->o == IR_KINT64((&J->fold.right))->o == IR_KINT64((&J->fold.left))->o == IR_KINT64(((IRType)((J->scev.t).irt & IRT_TYPE)) == IRT_INT)(((IRType)(((&J->fold.left)->t).irt & IRT_TYPE)) == IRT_NUM)((&J->fold.right))->o == IR_KNUM((&J->fold.ins)->op2 & 0x0400)((&J->fold.left))->o == IR_KNUM(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 2026, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~10u)(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1976, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1968, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1936, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)((&J->fold.left))->o == IR_KGC(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 494, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(MSize)(&J->fold.right)->i <= str->len(&J->fold.ins)->o != IR_CONV || ((&J->fold.ins)->op2&0xf000) != (0<<12)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 711, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 523, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~4u)(((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC(((((((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC", "lj_opt_fold.c", 524, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op2)])))->gcr).gcptr32))))->gch.gct == ~(~4u)(((&J->fold.right)))->o == IR_KGC(((((((&J->fold.right)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.right)))->o == IR_KGC", "lj_opt_fold.c", 1810, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.right)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE)) == IRT_STR)(&J->cur.ir[(strref)])->o == IR_STRREFL[pN p )H[pJ {pF sLZ)SQ@]sHYDg*pZ @\iY jh+V.lpEVnn"B^NaX lZATA(RSX \PlCkX CX>\|U=XBQ[HYS1pX d_lZpT yq^-rpP oEu{\~k*ZkDAV5mNR2T^pD \(_xsp@ ekrZfb[7Ti?0mT>D]dPtSFlOWUhluAKWdoQhZX*l qGW{X lnl`P\.CUX l DEl X Ak.S3X P/X<fb@_Cp*dc \~.V6Ap Ja^,\*puV<8wplj_opt_foldfold_xload_kptrfold_fwd_sloadfold_fload_cdata_int64_kgcfold_fload_cdata_typeid_kgcfold_fload_str_len_kgcfold_fload_tab_tdup_hmaskfold_fload_tab_tdup_asizefold_fwd_href_tdupfold_fwd_href_tnewfold_cse_ureffold_kfold_hload_kkptrfold_merge_eqne_snew_kgcfold_reassoc_minmax_kkfold_intopfold_reassoc_intarith_k64kfold_int64arithfold_simplify_shift2_kifold_simplify_shift1_kifold_simplify_bxor_kfold_simplify_bor_kfold_simplify_band_kfold_simplify_intmod_kfold_simplify_intmul_k64fold_simplify_intsub_k64fold_simplify_intadd_k64fold_simplify_intsub_kleftfold_narrow_convertfold_simplify_conv_sextfold_simplify_tobit_convfold_simplify_numpow_kxfold_simplify_nummuldiv_negkfold_simplify_nummuldiv_kfold_simplify_numsub_negkfold_simplify_numsub_kfold_kfold_strtofold_kfold_tostr_knumfold_kfold_conv_knum_u64_numfold_kfold_conv_knum_i64_numfold_kfold_conv_knum_u32_numfold_kfold_conv_knum_int_numfold_kfold_conv_kint64_int_i64fold_kfold_conv_kint64_num_u64fold_kfold_conv_kint64_num_i64fold_kfold_tobitfold_kfold_add_kptrfold_kfold_add_kgcctype_checkfold_kfold_strcmpfold_kfold_strref_snewfold_kfold_strreffold_kfold_snew_kptrfold_kfold_int64comp0fold_kfold_int64compfold_kfold_bswap64fold_kfold_bnot64fold_kfold_int64shiftfold_kfold_int64arith2fold_kfold_int64arithfold_kfold_intcompfold_kfold_numcompfold_kfold_numpowfold_kfold_fpmathfold_kfold_numarith8CC?@GCC: (Debian 4.7.3-4) 4.7.3zRx  AC F <AC T \AC M |=AC x CAC ~ )AC d AC W  AC H 'AC b <AC V \<AC w |.AC i .AC i >AC y 2AC m 0AC k TAC O <fAC a \+AC f |$AC _ AC V KAC F  AC [ WAC R @AC { <AC  \kAC f |+AC f BAC } 'AC b 'AC b )AC d .AC i <;AC v \cAC ^ |UC F AC V AC X AC X +AC f vAC q <AC  \AC z $|AC G FAC E|  AC E  AC E  jAC E` 0@AC Ev  P_AC EU tlAC g kAC f qAC l AC z _AC Z Y\C Y 4T\C Y Tm\C Y tb\C Y b\C Y  dAC EZ @JC Y j\C Y C Y 8KfC Y XFJC Y x`AC [ tJC Y ;JC Y QAC L ;OC Y  AC  8 AC  X AC [ x #AC ^  AC Ey  AC Ey  iAC d  EAC @  ZUC @ @ ?AC z ` AC   LAC G  AC E  AC E ( VnC L V A   gAC E] 8 AC  X ZAC U x (AC c  >AC y  AC   AC E  ?AC Ln  AC E  D AC E  h SAC EI  IAC E  AC G  YAC EO  gAC b  cAC ^ 4 AC ~  T TAC EJ  x bAC EX  AC E  AC   >AC L-  AC L  (VAC EL L6AC El lHAC E~ PAC K /dC F (YTC t L A  OAC EE  AC E @2AC Eh `&OC R  TAC EJ  AC E  `AC EV >AC y  AC E 0AC T PpAC k  p\AC ER $=AC G1 (AC Xf  AC L ( AC X  8AC E $\AC G  AC L  ]AC X .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.rodata.cst16.comment.note.GNU-stack.rela.eh_frame @:3&$;,$;12$;@2;TPT OP\8m(i`mw0pmmm  Xx   0$D6=ZsCs) '/J<. .&>E 2`R0{Tf<+g$K .WQh@uk+BZ'').$;4:cCQh+<vu  F2  / jR @i0 _x l  k@fq4MV_^wYTbmb41bI bdy@@7j)KB [Fr0``t;/?Q@Y;oW w# 4 `M g  i   E  NZ ? % @ Y qLh {  ` (V ~g    + mZH @a (z > @ - `   i ?  / `H ?!b { !S )"I r"  t#Y  #g  4 4$cG @` S y %  &T n&b  & @['F 7(>M0fQ)~)V7*6m*H*P`+/ 4+Y6+OPi,zy-2-&-T%.`/`.Gh/>Z s/00p1\  P`p 83Qj.667@389      # ) / 5  ;F Q_jx(7AP[fwn1= :]*;L_plj_opt_fold.cfold_kfold_ldexpfold_kfold_bnotfold_kfold_intcomp0fold_kfold_add_krightfold_kfold_conv_kint_extfold_kfold_kreffold_shortcut_roundfold_shortcut_leftfold_shortcut_dropleftfold_shortcut_leftleftfold_simplify_numadd_negxfold_simplify_numadd_xnegfold_simplify_numsub_xnegfold_simplify_nummuldiv_negnegfold_shortcut_conv_num_intfold_simplify_conv_int_numfold_simplify_conv_i64_numfold_simplify_conv_int_i64fold_simplify_conv_flt_numfold_simplify_floor_convfold_simplify_intadd_kfold_simplify_intmul_kfold_simplify_intmod_kleftfold_simplify_intsubadd_leftcancelfold_simplify_intsubsub_rightcancelfold_simplify_intsubaddadd_cancelfold_simplify_shift_andkfold_reassoc_dupfold_reassoc_bxorfold_reassoc_minmax_leftfold_reassoc_minmax_rightfold_abc_invarfold_comm_swapfold_comm_equalfold_comm_compfold_comm_dupfold_barrier_tnew_tdupfold_fload_cdata_ptr_int64_cnewfold_fload_cdata_typeid_cnewfold_fload_str_len_snewfold_abc_kfold_abc_fwdfold_cse_convfold_barrier_tabfold_simplify_shift_ikfold_simplify_intsubadd_rightcancelfold_simplify_intsubsub_leftcancelfold_simplify_intsub_kfold_fwd_sload__PRETTY_FUNCTION__.6498fold_fload_cdata_typeid_kgc__PRETTY_FUNCTION__.6482fold_fload_str_len_kgc__PRETTY_FUNCTION__.6475fold_cse_uref__PRETTY_FUNCTION__.6438fold_kfold_hload_kkptr__PRETTY_FUNCTION__.6432kfold_int64arith__PRETTY_FUNCTION__.5948fold_simplify_shift2_ki__PRETTY_FUNCTION__.6313fold_simplify_shift1_ki__PRETTY_FUNCTION__.6308fold_simplify_bxor_k__PRETTY_FUNCTION__.6292fold_simplify_bor_k__PRETTY_FUNCTION__.6287fold_simplify_band_k__PRETTY_FUNCTION__.6282fold_simplify_intmod_k__PRETTY_FUNCTION__.6256fold_simplify_intadd_k64__PRETTY_FUNCTION__.6235fold_simplify_intsub_kleft__PRETTY_FUNCTION__.6231fold_simplify_conv_sext__PRETTY_FUNCTION__.6195fold_simplify_tobit_conv__PRETTY_FUNCTION__.6184fold_simplify_numsub_k__PRETTY_FUNCTION__.6126fold_kfold_conv_knum_u32_num__PRETTY_FUNCTION__.6079fold_kfold_conv_knum_int_num__PRETTY_FUNCTION__.6074fold_kfold_conv_kint64_int_i64__PRETTY_FUNCTION__.6069fold_kfold_tobit__PRETTY_FUNCTION__.6044fold_kfold_int64comp0__PRETTY_FUNCTION__.5998fold_kfold_int64comp__PRETTY_FUNCTION__.5984fold_kfold_intcomp__PRETTY_FUNCTION__.5931fold_kfold_conv_kint_numfold_kfold_conv_kintu32_numfold_simplify_nummuldiv_negk__PRETTY_FUNCTION__.6144fold_simplify_numsub_negk__PRETTY_FUNCTION__.6130fold_kfold_conv_kint64_num_u64__PRETTY_FUNCTION__.6065fold_kfold_conv_kint64_num_i64__PRETTY_FUNCTION__.6061kfold_xloadfold_xload_kptr__PRETTY_FUNCTION__.6503fold_fload_cdata_int64_kgc__PRETTY_FUNCTION__.6487fold_comm_bxorfold_reassoc_shiftfold_reassoc_intarith_k64__PRETTY_FUNCTION__.6333fold_simplify_intsubfold_simplify_intsub_k64__PRETTY_FUNCTION__.6240fold_kfold_conv_knum_u64_num__PRETTY_FUNCTION__.6087fold_kfold_conv_knum_i64_num__PRETTY_FUNCTION__.6083fold_kfold_conv_kint_i64fold_kfold_bnot64__PRETTY_FUNCTION__.5975fold_kfold_int64shift__PRETTY_FUNCTION__.5963fold_kfold_int64arith__PRETTY_FUNCTION__.5952fold_fload_tab_ahfold_fload_tab_tdup_hmask__PRETTY_FUNCTION__.6467fold_fload_tab_tdup_asize__PRETTY_FUNCTION__.6463fold_fload_tab_tnew_hmaskfold_fload_tab_tnew_asizefold_fwd_href_tdup__PRETTY_FUNCTION__.6453fold_fwd_href_tnew__PRETTY_FUNCTION__.6448fold_kfold_add_kptr__PRETTY_FUNCTION__.6035fold_kfold_add_kgc__PRETTY_FUNCTION__.6028__PRETTY_FUNCTION__.5632fold_kfold_strref__PRETTY_FUNCTION__.6011fold_kfold_intovarithfold_kfold_numpow__PRETTY_FUNCTION__.5872fold_kfold_numarith__PRETTY_FUNCTION__.5856kfold_intop__PRETTY_FUNCTION__.5901fold_reassoc_minmax_k__PRETTY_FUNCTION__.6351fold_reassoc_intarith_kfold_simplify_andk_shiftkfold_kfold_intarithsimplify_intmul_kfold_simplify_intmul_k64__PRETTY_FUNCTION__.6251fold_simplify_intmul_k32fold_narrow_convert__PRETTY_FUNCTION__.6218fold_simplify_nummuldiv_k__PRETTY_FUNCTION__.6138fold_kfold_strto__PRETTY_FUNCTION__.6099fold_kfold_tostr_kintfold_kfold_snew_emptyfold_kfold_tostr_knum__PRETTY_FUNCTION__.6091fold_kfold_strcmp__PRETTY_FUNCTION__.6022fold_kfold_snew_kptr__PRETTY_FUNCTION__.6003fold_kfold_bswap64__PRETTY_FUNCTION__.5979fold_kfold_int64arith2__PRETTY_FUNCTION__.5957fold_kfold_bswapfold_kfold_numcomp__PRETTY_FUNCTION__.5878fold_kfold_fpmath__PRETTY_FUNCTION__.5866fold_hashfold_func__PRETTY_FUNCTION__.6519fold_merge_eqne_snew_kgc__PRETTY_FUNCTION__.6422fold_simplify_shiftk_andkfold_simplify_conv_narrowfold_simplify_numpow_kx__PRETTY_FUNCTION__.6164fold_simplify_numpow_xkfold_kfold_strref_snew__PRETTY_FUNCTION__.6017.LC25.LC26.LC28.LC40.LC41.LC42lj_ir_emitlj_opt_cselj_ir_growtoplj_ir_kint__assert_faillj_ir_knum_u64lj_ir_kint64lj_opt_fwd_tptrlj_ir_kvaluelj_tab_getlj_opt_fwd_href_nokeylj_ir_kptr_lj_vm_foldarithlj_vm_modilj_opt_narrow_convertlj_ir_k64lj_strscan_numlj_str_fromintlj_ir_kgclj_str_fromnumlj_str_cmplj_str_newlj_carith_divi64lj_carith_modi64lj_carith_powi64lj_carith_divu64lj_carith_modu64lj_carith_powu64lj_ir_numcmplj_vm_foldfpmlj_opt_foldlj_ir_modelj_trace_errlj_opt_cselimlj_opt_fwd_aloadlj_opt_fwd_hloadlj_opt_fwd_uloadlj_opt_fwd_tab_lenlj_opt_fwd_hrefklj_opt_fwd_floadlj_opt_fwd_xloadlj_opt_dse_ahstorelj_opt_dse_ustorelj_opt_dse_fstorelj_opt_dse_xstore   '   ; h   F W p Bz 5 6  B  5 6(  B  5 6P  B@ 5! 6(&7 B@A 5F 68K B 5 6( B 5 6  B 5 6+ B5 5: 6h?L BV 5[ 6`u B 5 6 B 5 6  B 5 68 7 BA 5F 6Kg B B 5 5 B 5 6X. B8 5= 6XB B 5 6 B 5 6Q B [ 5` 6e B@ 5 5 B 5 6W Ba 5f 6 kT B^ 5c 68 h B  5 6p  B 5 6 > B`H 5M 6 R` B`j 5o 6 t B 5 6  B 5! 6 &Q B[ 5` 6 es B 5 6 B 5 6X B 5 6"B BX B 5 5 B= BG 5L 5Qq B` 5 6 J BT 5Y 6 ^p B 5 6  B% 5* 6 /Hl Bt B 5 6 B 5  6(# B- 52 6 7TPp B` 5 6_ B 5 6 B  5 6  B  5$ 6 );Pg{ B@ 5 6  B@ 5 6  B@  5 6X'@ B`J 5O 6XT~ B8 B` 5 5 B 5 6 1 B; 5@ 6XE ^ }     B` 5 6 ! B`! 5! 68 !\!z! B! 5! 6 !! B! 5! 6` !!F""" B" 5" 68"" B" 5" 6 "" B" 5" 6 ##*#<# BF# 5K# 68P#`### B# 5# 68### B # 5# 6#$ B $ 5$ 6$.$B$ B@L$ 5Q$ 6V$j$ B@t$ 5y$ 6~$$ B@$ 5$ 5$$ BS$ 5/$ 5:$% BS(% 5/-% 5:2%%%% B% 5% 6(%% B% 5% 6%% B% 5% 6&&A&& B& 5& 6 &&&& B@& 5& 6 &' B@' 5!' 6 &'?'P'p' B`'' BF( 5( 5 (a( B0k( 5p( 6 u(((7))** B`* 5* 6**`+ Bj+ 5o+ 6t+y++ B+ 5+ 6 +++,,,,, B, 5- 6(-- B!- 5&- 6(+-4-K- BT- 5Y- 5R^-j----- B- 5- 6 - ..c. B`m. 5r. 6 w.. B`. 5. 6.. B`. 5. 68.. B`. 5. 6p..*/ B4/ 59/ 6>/M/]/{/ B / 5/ 6X/// B/ 5/ 6X// B/ 50 60,0:0D0Y0g0s0~00 B0 50 6 00 B0 50 6 0 1(1 B 21 571 6 <1R1c11 11 1 2 22 B2 B3 B`3g3{33 B3 53 5m33 B3 53 633 B4 5 4 64(4 B24 574 6<4w4 B4 54 6444B5s55566*7N77 B@7 57 6 7778d8888$9T9z99: B": 5': 5},:S:: (08@kHqPyXF`Rh\pfxr~(1<<1pz (08@HPX`'h'p'x'''''t'|'''''''''''`&hp1xn&07*& 0$/-h//-%9%.4$ #(60?8W@wHsPX `hpx0m-y-,/J+38 7( 0R8@H<PXg`h6pu x4+ 7~+*( h 1b2 (08.6@)HQ)PX`hp(xZ<:q3ft#r")" !(?!0 8i @ HP X`hpx0   @ `$6s @/`J R @`<g h@`Z @`: <@`u   2   4 T0 x  fV8Xbx17<\|0? < \ W| w     $ ND d  q   ( ~< \ m|   -  i $  H ?!l ! )" r" t# # 4$8 %X &| n& & [' (Q),)P7*pm**+4++ ,Dy-d--%./h//40T0t1n13.66<7`389:tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ccallback.c0000664000000000000000000004460012231715321023121 0ustar rootroot/* ** FFI C callback handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_tab.h" #include "lj_state.h" #include "lj_frame.h" #include "lj_ctype.h" #include "lj_cconv.h" #include "lj_ccall.h" #include "lj_ccallback.h" #include "lj_target.h" #include "lj_mcode.h" #include "lj_trace.h" #include "lj_vm.h" /* -- Target-specific handling of callback slots -------------------------- */ #define CALLBACK_MCODE_SIZE (LJ_PAGESIZE * LJ_NUM_CBPAGE) #if LJ_OS_NOJIT /* Disabled callback support. */ #define CALLBACK_SLOT2OFS(slot) (0*(slot)) #define CALLBACK_OFS2SLOT(ofs) (0*(ofs)) #define CALLBACK_MAX_SLOT 0 #elif LJ_TARGET_X86ORX64 #define CALLBACK_MCODE_HEAD (LJ_64 ? 8 : 0) #define CALLBACK_MCODE_GROUP (-2+1+2+5+(LJ_64 ? 6 : 5)) #define CALLBACK_SLOT2OFS(slot) \ (CALLBACK_MCODE_HEAD + CALLBACK_MCODE_GROUP*((slot)/32) + 4*(slot)) static MSize CALLBACK_OFS2SLOT(MSize ofs) { MSize group; ofs -= CALLBACK_MCODE_HEAD; group = ofs / (32*4 + CALLBACK_MCODE_GROUP); return (ofs % (32*4 + CALLBACK_MCODE_GROUP))/4 + group*32; } #define CALLBACK_MAX_SLOT \ (((CALLBACK_MCODE_SIZE-CALLBACK_MCODE_HEAD)/(CALLBACK_MCODE_GROUP+4*32))*32) #elif LJ_TARGET_ARM #define CALLBACK_MCODE_HEAD 32 #define CALLBACK_SLOT2OFS(slot) (CALLBACK_MCODE_HEAD + 8*(slot)) #define CALLBACK_OFS2SLOT(ofs) (((ofs)-CALLBACK_MCODE_HEAD)/8) #define CALLBACK_MAX_SLOT (CALLBACK_OFS2SLOT(CALLBACK_MCODE_SIZE)) #elif LJ_TARGET_PPC #define CALLBACK_MCODE_HEAD 24 #define CALLBACK_SLOT2OFS(slot) (CALLBACK_MCODE_HEAD + 8*(slot)) #define CALLBACK_OFS2SLOT(ofs) (((ofs)-CALLBACK_MCODE_HEAD)/8) #define CALLBACK_MAX_SLOT (CALLBACK_OFS2SLOT(CALLBACK_MCODE_SIZE)) #elif LJ_TARGET_MIPS #define CALLBACK_MCODE_HEAD 24 #define CALLBACK_SLOT2OFS(slot) (CALLBACK_MCODE_HEAD + 8*(slot)) #define CALLBACK_OFS2SLOT(ofs) (((ofs)-CALLBACK_MCODE_HEAD)/8) #define CALLBACK_MAX_SLOT (CALLBACK_OFS2SLOT(CALLBACK_MCODE_SIZE)) #else /* Missing support for this architecture. */ #define CALLBACK_SLOT2OFS(slot) (0*(slot)) #define CALLBACK_OFS2SLOT(ofs) (0*(ofs)) #define CALLBACK_MAX_SLOT 0 #endif /* Convert callback slot number to callback function pointer. */ static void *callback_slot2ptr(CTState *cts, MSize slot) { return (uint8_t *)cts->cb.mcode + CALLBACK_SLOT2OFS(slot); } /* Convert callback function pointer to slot number. */ MSize lj_ccallback_ptr2slot(CTState *cts, void *p) { uintptr_t ofs = (uintptr_t)((uint8_t *)p -(uint8_t *)cts->cb.mcode); if (ofs < CALLBACK_MCODE_SIZE) { MSize slot = CALLBACK_OFS2SLOT((MSize)ofs); if (CALLBACK_SLOT2OFS(slot) == (MSize)ofs) return slot; } return ~0u; /* Not a known callback function pointer. */ } /* Initialize machine code for callback function pointers. */ #if LJ_OS_NOJIT /* Disabled callback support. */ #define callback_mcode_init(g, p) UNUSED(p) #elif LJ_TARGET_X86ORX64 static void callback_mcode_init(global_State *g, uint8_t *page) { uint8_t *p = page; uint8_t *target = (uint8_t *)(void *)lj_vm_ffi_callback; MSize slot; #if LJ_64 *(void **)p = target; p += 8; #endif for (slot = 0; slot < CALLBACK_MAX_SLOT; slot++) { /* mov al, slot; jmp group */ *p++ = XI_MOVrib | RID_EAX; *p++ = (uint8_t)slot; if ((slot & 31) == 31 || slot == CALLBACK_MAX_SLOT-1) { /* push ebp/rbp; mov ah, slot>>8; mov ebp, &g. */ *p++ = XI_PUSH + RID_EBP; *p++ = XI_MOVrib | (RID_EAX+4); *p++ = (uint8_t)(slot >> 8); *p++ = XI_MOVri | RID_EBP; *(int32_t *)p = i32ptr(g); p += 4; #if LJ_64 /* jmp [rip-pageofs] where lj_vm_ffi_callback is stored. */ *p++ = XI_GROUP5; *p++ = XM_OFS0 + (XOg_JMP<<3) + RID_EBP; *(int32_t *)p = (int32_t)(page-(p+4)); p += 4; #else /* jmp lj_vm_ffi_callback. */ *p++ = XI_JMP; *(int32_t *)p = target-(p+4); p += 4; #endif } else { *p++ = XI_JMPs; *p++ = (uint8_t)((2+2)*(31-(slot&31)) - 2); } } lua_assert(p - page <= CALLBACK_MCODE_SIZE); } #elif LJ_TARGET_ARM static void callback_mcode_init(global_State *g, uint32_t *page) { uint32_t *p = page; void *target = (void *)lj_vm_ffi_callback; MSize slot; /* This must match with the saveregs macro in buildvm_arm.dasc. */ *p++ = ARMI_SUB|ARMF_D(RID_R12)|ARMF_N(RID_R12)|ARMF_M(RID_PC); *p++ = ARMI_PUSH|ARMF_N(RID_SP)|RSET_RANGE(RID_R4,RID_R11+1)|RID2RSET(RID_LR); *p++ = ARMI_SUB|ARMI_K12|ARMF_D(RID_R12)|ARMF_N(RID_R12)|CALLBACK_MCODE_HEAD; *p++ = ARMI_STR|ARMI_LS_P|ARMI_LS_W|ARMF_D(RID_R12)|ARMF_N(RID_SP)|(CFRAME_SIZE-4*9); *p++ = ARMI_LDR|ARMI_LS_P|ARMI_LS_U|ARMF_D(RID_R12)|ARMF_N(RID_PC); *p++ = ARMI_LDR|ARMI_LS_P|ARMI_LS_U|ARMF_D(RID_PC)|ARMF_N(RID_PC); *p++ = u32ptr(g); *p++ = u32ptr(target); for (slot = 0; slot < CALLBACK_MAX_SLOT; slot++) { *p++ = ARMI_MOV|ARMF_D(RID_R12)|ARMF_M(RID_PC); *p = ARMI_B | ((page-p-2) & 0x00ffffffu); p++; } lua_assert(p - page <= CALLBACK_MCODE_SIZE); } #elif LJ_TARGET_PPC static void callback_mcode_init(global_State *g, uint32_t *page) { uint32_t *p = page; void *target = (void *)lj_vm_ffi_callback; MSize slot; *p++ = PPCI_LIS | PPCF_T(RID_TMP) | (u32ptr(target) >> 16); *p++ = PPCI_LIS | PPCF_T(RID_R12) | (u32ptr(g) >> 16); *p++ = PPCI_ORI | PPCF_A(RID_TMP)|PPCF_T(RID_TMP) | (u32ptr(target) & 0xffff); *p++ = PPCI_ORI | PPCF_A(RID_R12)|PPCF_T(RID_R12) | (u32ptr(g) & 0xffff); *p++ = PPCI_MTCTR | PPCF_T(RID_TMP); *p++ = PPCI_BCTR; for (slot = 0; slot < CALLBACK_MAX_SLOT; slot++) { *p++ = PPCI_LI | PPCF_T(RID_R11) | slot; *p = PPCI_B | (((page-p) & 0x00ffffffu) << 2); p++; } lua_assert(p - page <= CALLBACK_MCODE_SIZE); } #elif LJ_TARGET_MIPS static void callback_mcode_init(global_State *g, uint32_t *page) { uint32_t *p = page; void *target = (void *)lj_vm_ffi_callback; MSize slot; *p++ = MIPSI_SW | MIPSF_T(RID_R1)|MIPSF_S(RID_SP) | 0; *p++ = MIPSI_LUI | MIPSF_T(RID_R3) | (u32ptr(target) >> 16); *p++ = MIPSI_LUI | MIPSF_T(RID_R2) | (u32ptr(g) >> 16); *p++ = MIPSI_ORI | MIPSF_T(RID_R3)|MIPSF_S(RID_R3) |(u32ptr(target)&0xffff); *p++ = MIPSI_JR | MIPSF_S(RID_R3); *p++ = MIPSI_ORI | MIPSF_T(RID_R2)|MIPSF_S(RID_R2) | (u32ptr(g)&0xffff); for (slot = 0; slot < CALLBACK_MAX_SLOT; slot++) { *p = MIPSI_B | ((page-p-1) & 0x0000ffffu); p++; *p++ = MIPSI_LI | MIPSF_T(RID_R1) | slot; } lua_assert(p - page <= CALLBACK_MCODE_SIZE); } #else /* Missing support for this architecture. */ #define callback_mcode_init(g, p) UNUSED(p) #endif /* -- Machine code management --------------------------------------------- */ #if LJ_TARGET_WINDOWS #define WIN32_LEAN_AND_MEAN #include #elif LJ_TARGET_POSIX #include #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON #endif #endif /* Allocate and initialize area for callback function pointers. */ static void callback_mcode_new(CTState *cts) { size_t sz = (size_t)CALLBACK_MCODE_SIZE; void *p; if (CALLBACK_MAX_SLOT == 0) lj_err_caller(cts->L, LJ_ERR_FFI_CBACKOV); #if LJ_TARGET_WINDOWS p = VirtualAlloc(NULL, sz, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); if (!p) lj_err_caller(cts->L, LJ_ERR_FFI_CBACKOV); #elif LJ_TARGET_POSIX p = mmap(NULL, sz, (PROT_READ|PROT_WRITE), MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) lj_err_caller(cts->L, LJ_ERR_FFI_CBACKOV); #else /* Fallback allocator. Fails if memory is not executable by default. */ p = lj_mem_new(cts->L, sz); #endif cts->cb.mcode = p; callback_mcode_init(cts->g, p); lj_mcode_sync(p, (char *)p + sz); #if LJ_TARGET_WINDOWS { DWORD oprot; VirtualProtect(p, sz, PAGE_EXECUTE_READ, &oprot); } #elif LJ_TARGET_POSIX mprotect(p, sz, (PROT_READ|PROT_EXEC)); #endif } /* Free area for callback function pointers. */ void lj_ccallback_mcode_free(CTState *cts) { size_t sz = (size_t)CALLBACK_MCODE_SIZE; void *p = cts->cb.mcode; if (p == NULL) return; #if LJ_TARGET_WINDOWS VirtualFree(p, 0, MEM_RELEASE); UNUSED(sz); #elif LJ_TARGET_POSIX munmap(p, sz); #else lj_mem_free(cts->g, p, sz); #endif } /* -- C callback entry ---------------------------------------------------- */ /* Target-specific handling of register arguments. Similar to lj_ccall.c. */ #if LJ_TARGET_X86 #define CALLBACK_HANDLE_REGARG \ if (!isfp) { /* Only non-FP values may be passed in registers. */ \ if (n > 1) { /* Anything > 32 bit is passed on the stack. */ \ if (!LJ_ABI_WIN) ngpr = maxgpr; /* Prevent reordering. */ \ } else if (ngpr + 1 <= maxgpr) { \ sp = &cts->cb.gpr[ngpr]; \ ngpr += n; \ goto done; \ } \ } #elif LJ_TARGET_X64 && LJ_ABI_WIN /* Windows/x64 argument registers are strictly positional (use ngpr). */ #define CALLBACK_HANDLE_REGARG \ if (isfp) { \ if (ngpr < maxgpr) { sp = &cts->cb.fpr[ngpr++]; UNUSED(nfpr); goto done; } \ } else { \ if (ngpr < maxgpr) { sp = &cts->cb.gpr[ngpr++]; goto done; } \ } #elif LJ_TARGET_X64 #define CALLBACK_HANDLE_REGARG \ if (isfp) { \ if (nfpr + n <= CCALL_NARG_FPR) { \ sp = &cts->cb.fpr[nfpr]; \ nfpr += n; \ goto done; \ } \ } else { \ if (ngpr + n <= maxgpr) { \ sp = &cts->cb.gpr[ngpr]; \ ngpr += n; \ goto done; \ } \ } #elif LJ_TARGET_ARM #if LJ_ABI_SOFTFP #define CALLBACK_HANDLE_REGARG_FP1 UNUSED(isfp); #define CALLBACK_HANDLE_REGARG_FP2 #else #define CALLBACK_HANDLE_REGARG_FP1 \ if (isfp) { \ if (n == 1) { \ if (fprodd) { \ sp = &cts->cb.fpr[fprodd-1]; \ fprodd = 0; \ goto done; \ } else if (nfpr + 1 <= CCALL_NARG_FPR) { \ sp = &cts->cb.fpr[nfpr++]; \ fprodd = nfpr; \ goto done; \ } \ } else { \ if (nfpr + 1 <= CCALL_NARG_FPR) { \ sp = &cts->cb.fpr[nfpr++]; \ goto done; \ } \ } \ fprodd = 0; /* No reordering after the first FP value is on stack. */ \ } else { #define CALLBACK_HANDLE_REGARG_FP2 } #endif #define CALLBACK_HANDLE_REGARG \ CALLBACK_HANDLE_REGARG_FP1 \ if (n > 1) ngpr = (ngpr + 1u) & ~1u; /* Align to regpair. */ \ if (ngpr + n <= maxgpr) { \ sp = &cts->cb.gpr[ngpr]; \ ngpr += n; \ goto done; \ } CALLBACK_HANDLE_REGARG_FP2 #elif LJ_TARGET_PPC #define CALLBACK_HANDLE_REGARG \ if (isfp) { \ if (nfpr + 1 <= CCALL_NARG_FPR) { \ sp = &cts->cb.fpr[nfpr++]; \ cta = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ \ goto done; \ } \ } else { /* Try to pass argument in GPRs. */ \ if (n > 1) { \ lua_assert(ctype_isinteger(cta->info) && n == 2); /* int64_t. */ \ ngpr = (ngpr + 1u) & ~1u; /* Align int64_t to regpair. */ \ } \ if (ngpr + n <= maxgpr) { \ sp = &cts->cb.gpr[ngpr]; \ ngpr += n; \ goto done; \ } \ } #define CALLBACK_HANDLE_RET \ if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ *(double *)dp = *(float *)dp; /* FPRs always hold doubles. */ #elif LJ_TARGET_MIPS #define CALLBACK_HANDLE_REGARG \ if (isfp && nfpr < CCALL_NARG_FPR) { /* Try to pass argument in FPRs. */ \ sp = (void *)((uint8_t *)&cts->cb.fpr[nfpr] + ((LJ_BE && n==1) ? 4 : 0)); \ nfpr++; ngpr += n; \ goto done; \ } else { /* Try to pass argument in GPRs. */ \ nfpr = CCALL_NARG_FPR; \ if (n > 1) ngpr = (ngpr + 1u) & ~1u; /* Align to regpair. */ \ if (ngpr + n <= maxgpr) { \ sp = &cts->cb.gpr[ngpr]; \ ngpr += n; \ goto done; \ } \ } #define CALLBACK_HANDLE_RET \ if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ ((float *)dp)[1] = *(float *)dp; #else #error "Missing calling convention definitions for this architecture" #endif /* Convert and push callback arguments to Lua stack. */ static void callback_conv_args(CTState *cts, lua_State *L) { TValue *o = L->top; intptr_t *stack = cts->cb.stack; MSize slot = cts->cb.slot; CTypeID id = 0, rid, fid; int gcsteps = 0; CType *ct; GCfunc *fn; MSize ngpr = 0, nsp = 0, maxgpr = CCALL_NARG_GPR; #if CCALL_NARG_FPR MSize nfpr = 0; #if LJ_TARGET_ARM MSize fprodd = 0; #endif #endif if (slot < cts->cb.sizeid && (id = cts->cb.cbid[slot]) != 0) { ct = ctype_get(cts, id); rid = ctype_cid(ct->info); fn = funcV(lj_tab_getint(cts->miscmap, (int32_t)slot)); } else { /* Must set up frame first, before throwing the error. */ ct = NULL; rid = 0; fn = (GCfunc *)L; } o->u32.lo = LJ_CONT_FFI_CALLBACK; /* Continuation returns from callback. */ o->u32.hi = rid; /* Return type. x86: +(spadj<<16). */ o++; setframe_gc(o, obj2gco(fn)); setframe_ftsz(o, (int)((char *)(o+1) - (char *)L->base) + FRAME_CONT); L->top = L->base = ++o; if (!ct) lj_err_caller(cts->L, LJ_ERR_FFI_BADCBACK); if (isluafunc(fn)) setcframe_pc(L->cframe, proto_bc(funcproto(fn))+1); lj_state_checkstack(L, LUA_MINSTACK); /* May throw. */ o = L->base; /* Might have been reallocated. */ #if LJ_TARGET_X86 /* x86 has several different calling conventions. */ switch (ctype_cconv(ct->info)) { case CTCC_FASTCALL: maxgpr = 2; break; case CTCC_THISCALL: maxgpr = 1; break; default: maxgpr = 0; break; } #endif fid = ct->sib; while (fid) { CType *ctf = ctype_get(cts, fid); if (!ctype_isattrib(ctf->info)) { CType *cta; void *sp; CTSize sz; int isfp; MSize n; lua_assert(ctype_isfield(ctf->info)); cta = ctype_rawchild(cts, ctf); isfp = ctype_isfp(cta->info); sz = (cta->size + CTSIZE_PTR-1) & ~(CTSIZE_PTR-1); n = sz / CTSIZE_PTR; /* Number of GPRs or stack slots needed. */ CALLBACK_HANDLE_REGARG /* Handle register arguments. */ /* Otherwise pass argument on stack. */ if (CCALL_ALIGN_STACKARG && LJ_32 && sz == 8) nsp = (nsp + 1) & ~1u; /* Align 64 bit argument on stack. */ sp = &stack[nsp]; nsp += n; done: if (LJ_BE && cta->size < CTSIZE_PTR) sp = (void *)((uint8_t *)sp + CTSIZE_PTR-cta->size); gcsteps += lj_cconv_tv_ct(cts, cta, 0, o++, sp); } fid = ctf->sib; } L->top = o; #if LJ_TARGET_X86 /* Store stack adjustment for returns from non-cdecl callbacks. */ if (ctype_cconv(ct->info) != CTCC_CDECL) (L->base-2)->u32.hi |= (nsp << (16+2)); #endif while (gcsteps-- > 0) lj_gc_check(L); } /* Convert Lua object to callback result. */ static void callback_conv_result(CTState *cts, lua_State *L, TValue *o) { CType *ctr = ctype_raw(cts, (uint16_t)(L->base-2)->u32.hi); #if LJ_TARGET_X86 cts->cb.gpr[2] = 0; #endif if (!ctype_isvoid(ctr->info)) { uint8_t *dp = (uint8_t *)&cts->cb.gpr[0]; #if CCALL_NUM_FPR if (ctype_isfp(ctr->info)) dp = (uint8_t *)&cts->cb.fpr[0]; #endif lj_cconv_ct_tv(cts, ctr, dp, o, 0); #ifdef CALLBACK_HANDLE_RET CALLBACK_HANDLE_RET #endif /* Extend returned integers to (at least) 32 bits. */ if (ctype_isinteger_or_bool(ctr->info) && ctr->size < 4) { if (ctr->info & CTF_UNSIGNED) *(uint32_t *)dp = ctr->size == 1 ? (uint32_t)*(uint8_t *)dp : (uint32_t)*(uint16_t *)dp; else *(int32_t *)dp = ctr->size == 1 ? (int32_t)*(int8_t *)dp : (int32_t)*(int16_t *)dp; } #if LJ_TARGET_X86 if (ctype_isfp(ctr->info)) cts->cb.gpr[2] = ctr->size == sizeof(float) ? 1 : 2; #endif } } /* Enter callback. */ lua_State * LJ_FASTCALL lj_ccallback_enter(CTState *cts, void *cf) { lua_State *L = cts->L; global_State *g = cts->g; lua_assert(L != NULL); if (gcref(g->jit_L)) { setstrV(L, L->top++, lj_err_str(L, LJ_ERR_FFI_BADCBACK)); if (g->panic) g->panic(L); exit(EXIT_FAILURE); } lj_trace_abort(g); /* Never record across callback. */ /* Setup C frame. */ cframe_prev(cf) = L->cframe; setcframe_L(cf, L); cframe_errfunc(cf) = -1; cframe_nres(cf) = 0; L->cframe = cf; callback_conv_args(cts, L); return L; /* Now call the function on this stack. */ } /* Leave callback. */ void LJ_FASTCALL lj_ccallback_leave(CTState *cts, TValue *o) { lua_State *L = cts->L; GCfunc *fn; TValue *obase = L->base; L->base = L->top; /* Keep continuation frame for throwing errors. */ if (o >= L->base) { /* PC of RET* is lost. Point to last line for result conv. errors. */ fn = curr_func(L); if (isluafunc(fn)) { GCproto *pt = funcproto(fn); setcframe_pc(L->cframe, proto_bc(pt)+pt->sizebc+1); } } callback_conv_result(cts, L, o); /* Finally drop C frame and continuation frame. */ L->cframe = cframe_prev(L->cframe); L->top -= 2; L->base = obase; cts->cb.slot = 0; /* Blacklist C function that called the callback. */ } /* -- C callback management ----------------------------------------------- */ /* Get an unused slot in the callback slot table. */ static MSize callback_slot_new(CTState *cts, CType *ct) { CTypeID id = ctype_typeid(cts, ct); CTypeID1 *cbid = cts->cb.cbid; MSize top; for (top = cts->cb.topid; top < cts->cb.sizeid; top++) if (LJ_LIKELY(cbid[top] == 0)) goto found; #if CALLBACK_MAX_SLOT if (top >= CALLBACK_MAX_SLOT) #endif lj_err_caller(cts->L, LJ_ERR_FFI_CBACKOV); if (!cts->cb.mcode) callback_mcode_new(cts); lj_mem_growvec(cts->L, cbid, cts->cb.sizeid, CALLBACK_MAX_SLOT, CTypeID1); cts->cb.cbid = cbid; memset(cbid+top, 0, (cts->cb.sizeid-top)*sizeof(CTypeID1)); found: cbid[top] = id; cts->cb.topid = top+1; return top; } /* Check for function pointer and supported argument/result types. */ static CType *callback_checkfunc(CTState *cts, CType *ct) { int narg = 0; if (!ctype_isptr(ct->info) || (LJ_64 && ct->size != CTSIZE_PTR)) return NULL; ct = ctype_rawchild(cts, ct); if (ctype_isfunc(ct->info)) { CType *ctr = ctype_rawchild(cts, ct); CTypeID fid = ct->sib; if (!(ctype_isvoid(ctr->info) || ctype_isenum(ctr->info) || ctype_isptr(ctr->info) || (ctype_isnum(ctr->info) && ctr->size <= 8))) return NULL; if ((ct->info & CTF_VARARG)) return NULL; while (fid) { CType *ctf = ctype_get(cts, fid); if (!ctype_isattrib(ctf->info)) { CType *cta; lua_assert(ctype_isfield(ctf->info)); cta = ctype_rawchild(cts, ctf); if (!(ctype_isenum(cta->info) || ctype_isptr(cta->info) || (ctype_isnum(cta->info) && cta->size <= 8)) || ++narg >= LUA_MINSTACK-3) return NULL; } fid = ctf->sib; } return ct; } return NULL; } /* Create a new callback and return the callback function pointer. */ void *lj_ccallback_new(CTState *cts, CType *ct, GCfunc *fn) { ct = callback_checkfunc(cts, ct); if (ct) { MSize slot = callback_slot_new(cts, ct); GCtab *t = cts->miscmap; setfuncV(cts->L, lj_tab_setint(cts->L, t, (int32_t)slot), fn); lj_gc_anybarriert(cts->L, t); return callback_slot2ptr(cts, slot); } return NULL; /* Bad conversion. */ } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/0000775000000000000000000000000012202141143021144 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/v.lua0000664000000000000000000001275612202141143022127 0ustar rootroot---------------------------------------------------------------------------- -- Verbose mode of the LuaJIT compiler. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This module shows verbose information about the progress of the -- JIT compiler. It prints one line for each generated trace. This module -- is useful to see which code has been compiled or where the compiler -- punts and falls back to the interpreter. -- -- Example usage: -- -- luajit -jv -e "for i=1,1000 do for j=1,1000 do end end" -- luajit -jv=myapp.out myapp.lua -- -- Default output is to stderr. To redirect the output to a file, pass a -- filename as an argument (use '-' for stdout) or set the environment -- variable LUAJIT_VERBOSEFILE. The file is overwritten every time the -- module is started. -- -- The output from the first example should look like this: -- -- [TRACE 1 (command line):1 loop] -- [TRACE 2 (1/3) (command line):1 -> 1] -- -- The first number in each line is the internal trace number. Next are -- the file name ('(command line)') and the line number (':1') where the -- trace has started. Side traces also show the parent trace number and -- the exit number where they are attached to in parentheses ('(1/3)'). -- An arrow at the end shows where the trace links to ('-> 1'), unless -- it loops to itself. -- -- In this case the inner loop gets hot and is traced first, generating -- a root trace. Then the last exit from the 1st trace gets hot, too, -- and triggers generation of the 2nd trace. The side trace follows the -- path along the outer loop and *around* the inner loop, back to its -- start, and then links to the 1st trace. Yes, this may seem unusual, -- if you know how traditional compilers work. Trace compilers are full -- of surprises like this -- have fun! :-) -- -- Aborted traces are shown like this: -- -- [TRACE --- foo.lua:44 -- leaving loop in root trace at foo:lua:50] -- -- Don't worry -- trace aborts are quite common, even in programs which -- can be fully compiled. The compiler may retry several times until it -- finds a suitable trace. -- -- Of course this doesn't work with features that are not-yet-implemented -- (NYI error messages). The VM simply falls back to the interpreter. This -- may not matter at all if the particular trace is not very high up in -- the CPU usage profile. Oh, and the interpreter is quite fast, too. -- -- Also check out the -jdump module, which prints all the gory details. -- ------------------------------------------------------------------------------ -- Cache some library functions and objects. local jit = require("jit") assert(jit.version_num == 20002, "LuaJIT core/library version mismatch") local jutil = require("jit.util") local vmdef = require("jit.vmdef") local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo local type, format = type, string.format local stdout, stderr = io.stdout, io.stderr -- Active flag and output file handle. local active, out ------------------------------------------------------------------------------ local startloc, startex local function fmtfunc(func, pc) local fi = funcinfo(func, pc) if fi.loc then return fi.loc elseif fi.ffid then return vmdef.ffnames[fi.ffid] elseif fi.addr then return format("C:%x", fi.addr) else return "(?)" end end -- Format trace error message. local function fmterr(err, info) if type(err) == "number" then if type(info) == "function" then info = fmtfunc(info) end err = format(vmdef.traceerr[err], info) end return err end -- Dump trace states. local function dump_trace(what, tr, func, pc, otr, oex) if what == "start" then startloc = fmtfunc(func, pc) startex = otr and "("..otr.."/"..oex..") " or "" else if what == "abort" then local loc = fmtfunc(func, pc) if loc ~= startloc then out:write(format("[TRACE --- %s%s -- %s at %s]\n", startex, startloc, fmterr(otr, oex), loc)) else out:write(format("[TRACE --- %s%s -- %s]\n", startex, startloc, fmterr(otr, oex))) end elseif what == "stop" then local info = traceinfo(tr) local link, ltype = info.link, info.linktype if ltype == "interpreter" then out:write(format("[TRACE %3s %s%s -- fallback to interpreter]\n", tr, startex, startloc)) elseif link == tr or link == 0 then out:write(format("[TRACE %3s %s%s %s]\n", tr, startex, startloc, ltype)) elseif ltype == "root" then out:write(format("[TRACE %3s %s%s -> %d]\n", tr, startex, startloc, link)) else out:write(format("[TRACE %3s %s%s -> %d %s]\n", tr, startex, startloc, link, ltype)) end else out:write(format("[TRACE %s]\n", what)) end out:flush() end end ------------------------------------------------------------------------------ -- Detach dump handlers. local function dumpoff() if active then active = false jit.attach(dump_trace) if out and out ~= stdout and out ~= stderr then out:close() end out = nil end end -- Open the output file and attach dump handlers. local function dumpon(outfile) if active then dumpoff() end if not outfile then outfile = os.getenv("LUAJIT_VERBOSEFILE") end if outfile then out = outfile == "-" and stdout or assert(io.open(outfile, "w")) else out = stderr end jit.attach(dump_trace, "trace") active = true end -- Public module functions. module(...) on = dumpon off = dumpoff start = dumpon -- For -j command line option. tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/dis_x86.lua0000664000000000000000000007122212202141143023137 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT x86/x64 disassembler module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- This is a helper module used by the LuaJIT machine code dumper module. -- -- Sending small code snippets to an external disassembler and mixing the -- output with our own stuff was too fragile. So I had to bite the bullet -- and write yet another x86 disassembler. Oh well ... -- -- The output format is very similar to what ndisasm generates. But it has -- been developed independently by looking at the opcode tables from the -- Intel and AMD manuals. The supported instruction set is quite extensive -- and reflects what a current generation Intel or AMD CPU implements in -- 32 bit and 64 bit mode. Yes, this includes MMX, SSE, SSE2, SSE3, SSSE3, -- SSE4.1, SSE4.2, SSE4a and even privileged and hypervisor (VMX/SVM) -- instructions. -- -- Notes: -- * The (useless) a16 prefix, 3DNow and pre-586 opcodes are unsupported. -- * No attempt at optimization has been made -- it's fast enough for my needs. -- * The public API may change when more architectures are added. ------------------------------------------------------------------------------ local type = type local sub, byte, format = string.sub, string.byte, string.format local match, gmatch, gsub = string.match, string.gmatch, string.gsub local lower, rep = string.lower, string.rep -- Map for 1st opcode byte in 32 bit mode. Ugly? Well ... read on. local map_opc1_32 = { --0x [0]="addBmr","addVmr","addBrm","addVrm","addBai","addVai","push es","pop es", "orBmr","orVmr","orBrm","orVrm","orBai","orVai","push cs","opc2*", --1x "adcBmr","adcVmr","adcBrm","adcVrm","adcBai","adcVai","push ss","pop ss", "sbbBmr","sbbVmr","sbbBrm","sbbVrm","sbbBai","sbbVai","push ds","pop ds", --2x "andBmr","andVmr","andBrm","andVrm","andBai","andVai","es:seg","daa", "subBmr","subVmr","subBrm","subVrm","subBai","subVai","cs:seg","das", --3x "xorBmr","xorVmr","xorBrm","xorVrm","xorBai","xorVai","ss:seg","aaa", "cmpBmr","cmpVmr","cmpBrm","cmpVrm","cmpBai","cmpVai","ds:seg","aas", --4x "incVR","incVR","incVR","incVR","incVR","incVR","incVR","incVR", "decVR","decVR","decVR","decVR","decVR","decVR","decVR","decVR", --5x "pushUR","pushUR","pushUR","pushUR","pushUR","pushUR","pushUR","pushUR", "popUR","popUR","popUR","popUR","popUR","popUR","popUR","popUR", --6x "sz*pushaw,pusha","sz*popaw,popa","boundVrm","arplWmr", "fs:seg","gs:seg","o16:","a16", "pushUi","imulVrmi","pushBs","imulVrms", "insb","insVS","outsb","outsVS", --7x "joBj","jnoBj","jbBj","jnbBj","jzBj","jnzBj","jbeBj","jaBj", "jsBj","jnsBj","jpeBj","jpoBj","jlBj","jgeBj","jleBj","jgBj", --8x "arith!Bmi","arith!Vmi","arith!Bmi","arith!Vms", "testBmr","testVmr","xchgBrm","xchgVrm", "movBmr","movVmr","movBrm","movVrm", "movVmg","leaVrm","movWgm","popUm", --9x "nop*xchgVaR|pause|xchgWaR|repne nop","xchgVaR","xchgVaR","xchgVaR", "xchgVaR","xchgVaR","xchgVaR","xchgVaR", "sz*cbw,cwde,cdqe","sz*cwd,cdq,cqo","call farViw","wait", "sz*pushfw,pushf","sz*popfw,popf","sahf","lahf", --Ax "movBao","movVao","movBoa","movVoa", "movsb","movsVS","cmpsb","cmpsVS", "testBai","testVai","stosb","stosVS", "lodsb","lodsVS","scasb","scasVS", --Bx "movBRi","movBRi","movBRi","movBRi","movBRi","movBRi","movBRi","movBRi", "movVRI","movVRI","movVRI","movVRI","movVRI","movVRI","movVRI","movVRI", --Cx "shift!Bmu","shift!Vmu","retBw","ret","$lesVrm","$ldsVrm","movBmi","movVmi", "enterBwu","leave","retfBw","retf","int3","intBu","into","iretVS", --Dx "shift!Bm1","shift!Vm1","shift!Bmc","shift!Vmc","aamBu","aadBu","salc","xlatb", "fp*0","fp*1","fp*2","fp*3","fp*4","fp*5","fp*6","fp*7", --Ex "loopneBj","loopeBj","loopBj","sz*jcxzBj,jecxzBj,jrcxzBj", "inBau","inVau","outBua","outVua", "callVj","jmpVj","jmp farViw","jmpBj","inBad","inVad","outBda","outVda", --Fx "lock:","int1","repne:rep","rep:","hlt","cmc","testb!Bm","testv!Vm", "clc","stc","cli","sti","cld","std","incb!Bm","incd!Vm", } assert(#map_opc1_32 == 255) -- Map for 1st opcode byte in 64 bit mode (overrides only). local map_opc1_64 = setmetatable({ [0x06]=false, [0x07]=false, [0x0e]=false, [0x16]=false, [0x17]=false, [0x1e]=false, [0x1f]=false, [0x27]=false, [0x2f]=false, [0x37]=false, [0x3f]=false, [0x60]=false, [0x61]=false, [0x62]=false, [0x63]="movsxdVrDmt", [0x67]="a32:", [0x40]="rex*", [0x41]="rex*b", [0x42]="rex*x", [0x43]="rex*xb", [0x44]="rex*r", [0x45]="rex*rb", [0x46]="rex*rx", [0x47]="rex*rxb", [0x48]="rex*w", [0x49]="rex*wb", [0x4a]="rex*wx", [0x4b]="rex*wxb", [0x4c]="rex*wr", [0x4d]="rex*wrb", [0x4e]="rex*wrx", [0x4f]="rex*wrxb", [0x82]=false, [0x9a]=false, [0xc4]=false, [0xc5]=false, [0xce]=false, [0xd4]=false, [0xd5]=false, [0xd6]=false, [0xea]=false, }, { __index = map_opc1_32 }) -- Map for 2nd opcode byte (0F xx). True CISC hell. Hey, I told you. -- Prefix dependent MMX/SSE opcodes: (none)|rep|o16|repne, -|F3|66|F2 local map_opc2 = { --0x [0]="sldt!Dmp","sgdt!Ump","larVrm","lslVrm",nil,"syscall","clts","sysret", "invd","wbinvd",nil,"ud1",nil,"$prefetch!Bm","femms","3dnowMrmu", --1x "movupsXrm|movssXrm|movupdXrm|movsdXrm", "movupsXmr|movssXmr|movupdXmr|movsdXmr", "movhlpsXrm$movlpsXrm|movsldupXrm|movlpdXrm|movddupXrm", "movlpsXmr||movlpdXmr", "unpcklpsXrm||unpcklpdXrm", "unpckhpsXrm||unpckhpdXrm", "movlhpsXrm$movhpsXrm|movshdupXrm|movhpdXrm", "movhpsXmr||movhpdXmr", "$prefetcht!Bm","hintnopVm","hintnopVm","hintnopVm", "hintnopVm","hintnopVm","hintnopVm","hintnopVm", --2x "movUmx$","movUmy$","movUxm$","movUym$","movUmz$",nil,"movUzm$",nil, "movapsXrm||movapdXrm", "movapsXmr||movapdXmr", "cvtpi2psXrMm|cvtsi2ssXrVmt|cvtpi2pdXrMm|cvtsi2sdXrVmt", "movntpsXmr|movntssXmr|movntpdXmr|movntsdXmr", "cvttps2piMrXm|cvttss2siVrXm|cvttpd2piMrXm|cvttsd2siVrXm", "cvtps2piMrXm|cvtss2siVrXm|cvtpd2piMrXm|cvtsd2siVrXm", "ucomissXrm||ucomisdXrm", "comissXrm||comisdXrm", --3x "wrmsr","rdtsc","rdmsr","rdpmc","sysenter","sysexit",nil,"getsec", "opc3*38",nil,"opc3*3a",nil,nil,nil,nil,nil, --4x "cmovoVrm","cmovnoVrm","cmovbVrm","cmovnbVrm", "cmovzVrm","cmovnzVrm","cmovbeVrm","cmovaVrm", "cmovsVrm","cmovnsVrm","cmovpeVrm","cmovpoVrm", "cmovlVrm","cmovgeVrm","cmovleVrm","cmovgVrm", --5x "movmskpsVrXm$||movmskpdVrXm$","sqrtpsXrm|sqrtssXrm|sqrtpdXrm|sqrtsdXrm", "rsqrtpsXrm|rsqrtssXrm","rcppsXrm|rcpssXrm", "andpsXrm||andpdXrm","andnpsXrm||andnpdXrm", "orpsXrm||orpdXrm","xorpsXrm||xorpdXrm", "addpsXrm|addssXrm|addpdXrm|addsdXrm","mulpsXrm|mulssXrm|mulpdXrm|mulsdXrm", "cvtps2pdXrm|cvtss2sdXrm|cvtpd2psXrm|cvtsd2ssXrm", "cvtdq2psXrm|cvttps2dqXrm|cvtps2dqXrm", "subpsXrm|subssXrm|subpdXrm|subsdXrm","minpsXrm|minssXrm|minpdXrm|minsdXrm", "divpsXrm|divssXrm|divpdXrm|divsdXrm","maxpsXrm|maxssXrm|maxpdXrm|maxsdXrm", --6x "punpcklbwPrm","punpcklwdPrm","punpckldqPrm","packsswbPrm", "pcmpgtbPrm","pcmpgtwPrm","pcmpgtdPrm","packuswbPrm", "punpckhbwPrm","punpckhwdPrm","punpckhdqPrm","packssdwPrm", "||punpcklqdqXrm","||punpckhqdqXrm", "movPrVSm","movqMrm|movdquXrm|movdqaXrm", --7x "pshufwMrmu|pshufhwXrmu|pshufdXrmu|pshuflwXrmu","pshiftw!Pmu", "pshiftd!Pmu","pshiftq!Mmu||pshiftdq!Xmu", "pcmpeqbPrm","pcmpeqwPrm","pcmpeqdPrm","emms|", "vmreadUmr||extrqXmuu$|insertqXrmuu$","vmwriteUrm||extrqXrm$|insertqXrm$", nil,nil, "||haddpdXrm|haddpsXrm","||hsubpdXrm|hsubpsXrm", "movVSmMr|movqXrm|movVSmXr","movqMmr|movdquXmr|movdqaXmr", --8x "joVj","jnoVj","jbVj","jnbVj","jzVj","jnzVj","jbeVj","jaVj", "jsVj","jnsVj","jpeVj","jpoVj","jlVj","jgeVj","jleVj","jgVj", --9x "setoBm","setnoBm","setbBm","setnbBm","setzBm","setnzBm","setbeBm","setaBm", "setsBm","setnsBm","setpeBm","setpoBm","setlBm","setgeBm","setleBm","setgBm", --Ax "push fs","pop fs","cpuid","btVmr","shldVmru","shldVmrc",nil,nil, "push gs","pop gs","rsm","btsVmr","shrdVmru","shrdVmrc","fxsave!Dmp","imulVrm", --Bx "cmpxchgBmr","cmpxchgVmr","$lssVrm","btrVmr", "$lfsVrm","$lgsVrm","movzxVrBmt","movzxVrWmt", "|popcntVrm","ud2Dp","bt!Vmu","btcVmr", "bsfVrm","bsrVrm|lzcntVrm|bsrWrm","movsxVrBmt","movsxVrWmt", --Cx "xaddBmr","xaddVmr", "cmppsXrmu|cmpssXrmu|cmppdXrmu|cmpsdXrmu","$movntiVmr|", "pinsrwPrWmu","pextrwDrPmu", "shufpsXrmu||shufpdXrmu","$cmpxchg!Qmp", "bswapVR","bswapVR","bswapVR","bswapVR","bswapVR","bswapVR","bswapVR","bswapVR", --Dx "||addsubpdXrm|addsubpsXrm","psrlwPrm","psrldPrm","psrlqPrm", "paddqPrm","pmullwPrm", "|movq2dqXrMm|movqXmr|movdq2qMrXm$","pmovmskbVrMm||pmovmskbVrXm", "psubusbPrm","psubuswPrm","pminubPrm","pandPrm", "paddusbPrm","padduswPrm","pmaxubPrm","pandnPrm", --Ex "pavgbPrm","psrawPrm","psradPrm","pavgwPrm", "pmulhuwPrm","pmulhwPrm", "|cvtdq2pdXrm|cvttpd2dqXrm|cvtpd2dqXrm","$movntqMmr||$movntdqXmr", "psubsbPrm","psubswPrm","pminswPrm","porPrm", "paddsbPrm","paddswPrm","pmaxswPrm","pxorPrm", --Fx "|||lddquXrm","psllwPrm","pslldPrm","psllqPrm", "pmuludqPrm","pmaddwdPrm","psadbwPrm","maskmovqMrm||maskmovdquXrm$", "psubbPrm","psubwPrm","psubdPrm","psubqPrm", "paddbPrm","paddwPrm","padddPrm","ud", } assert(map_opc2[255] == "ud") -- Map for three-byte opcodes. Can't wait for their next invention. local map_opc3 = { ["38"] = { -- [66] 0f 38 xx --0x [0]="pshufbPrm","phaddwPrm","phadddPrm","phaddswPrm", "pmaddubswPrm","phsubwPrm","phsubdPrm","phsubswPrm", "psignbPrm","psignwPrm","psigndPrm","pmulhrswPrm", nil,nil,nil,nil, --1x "||pblendvbXrma",nil,nil,nil, "||blendvpsXrma","||blendvpdXrma",nil,"||ptestXrm", nil,nil,nil,nil, "pabsbPrm","pabswPrm","pabsdPrm",nil, --2x "||pmovsxbwXrm","||pmovsxbdXrm","||pmovsxbqXrm","||pmovsxwdXrm", "||pmovsxwqXrm","||pmovsxdqXrm",nil,nil, "||pmuldqXrm","||pcmpeqqXrm","||$movntdqaXrm","||packusdwXrm", nil,nil,nil,nil, --3x "||pmovzxbwXrm","||pmovzxbdXrm","||pmovzxbqXrm","||pmovzxwdXrm", "||pmovzxwqXrm","||pmovzxdqXrm",nil,"||pcmpgtqXrm", "||pminsbXrm","||pminsdXrm","||pminuwXrm","||pminudXrm", "||pmaxsbXrm","||pmaxsdXrm","||pmaxuwXrm","||pmaxudXrm", --4x "||pmulddXrm","||phminposuwXrm", --Fx [0xf0] = "|||crc32TrBmt",[0xf1] = "|||crc32TrVmt", }, ["3a"] = { -- [66] 0f 3a xx --0x [0x00]=nil,nil,nil,nil,nil,nil,nil,nil, "||roundpsXrmu","||roundpdXrmu","||roundssXrmu","||roundsdXrmu", "||blendpsXrmu","||blendpdXrmu","||pblendwXrmu","palignrPrmu", --1x nil,nil,nil,nil, "||pextrbVmXru","||pextrwVmXru","||pextrVmSXru","||extractpsVmXru", nil,nil,nil,nil,nil,nil,nil,nil, --2x "||pinsrbXrVmu","||insertpsXrmu","||pinsrXrVmuS",nil, --4x [0x40] = "||dppsXrmu", [0x41] = "||dppdXrmu", [0x42] = "||mpsadbwXrmu", --6x [0x60] = "||pcmpestrmXrmu",[0x61] = "||pcmpestriXrmu", [0x62] = "||pcmpistrmXrmu",[0x63] = "||pcmpistriXrmu", }, } -- Map for VMX/SVM opcodes 0F 01 C0-FF (sgdt group with register operands). local map_opcvm = { [0xc1]="vmcall",[0xc2]="vmlaunch",[0xc3]="vmresume",[0xc4]="vmxoff", [0xc8]="monitor",[0xc9]="mwait", [0xd8]="vmrun",[0xd9]="vmmcall",[0xda]="vmload",[0xdb]="vmsave", [0xdc]="stgi",[0xdd]="clgi",[0xde]="skinit",[0xdf]="invlpga", [0xf8]="swapgs",[0xf9]="rdtscp", } -- Map for FP opcodes. And you thought stack machines are simple? local map_opcfp = { -- D8-DF 00-BF: opcodes with a memory operand. -- D8 [0]="faddFm","fmulFm","fcomFm","fcompFm","fsubFm","fsubrFm","fdivFm","fdivrFm", "fldFm",nil,"fstFm","fstpFm","fldenvVm","fldcwWm","fnstenvVm","fnstcwWm", -- DA "fiaddDm","fimulDm","ficomDm","ficompDm", "fisubDm","fisubrDm","fidivDm","fidivrDm", -- DB "fildDm","fisttpDm","fistDm","fistpDm",nil,"fld twordFmp",nil,"fstp twordFmp", -- DC "faddGm","fmulGm","fcomGm","fcompGm","fsubGm","fsubrGm","fdivGm","fdivrGm", -- DD "fldGm","fisttpQm","fstGm","fstpGm","frstorDmp",nil,"fnsaveDmp","fnstswWm", -- DE "fiaddWm","fimulWm","ficomWm","ficompWm", "fisubWm","fisubrWm","fidivWm","fidivrWm", -- DF "fildWm","fisttpWm","fistWm","fistpWm", "fbld twordFmp","fildQm","fbstp twordFmp","fistpQm", -- xx C0-FF: opcodes with a pseudo-register operand. -- D8 "faddFf","fmulFf","fcomFf","fcompFf","fsubFf","fsubrFf","fdivFf","fdivrFf", -- D9 "fldFf","fxchFf",{"fnop"},nil, {"fchs","fabs",nil,nil,"ftst","fxam"}, {"fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz"}, {"f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp"}, {"fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos"}, -- DA "fcmovbFf","fcmoveFf","fcmovbeFf","fcmovuFf",nil,{nil,"fucompp"},nil,nil, -- DB "fcmovnbFf","fcmovneFf","fcmovnbeFf","fcmovnuFf", {nil,nil,"fnclex","fninit"},"fucomiFf","fcomiFf",nil, -- DC "fadd toFf","fmul toFf",nil,nil, "fsub toFf","fsubr toFf","fdivr toFf","fdiv toFf", -- DD "ffreeFf",nil,"fstFf","fstpFf","fucomFf","fucompFf",nil,nil, -- DE "faddpFf","fmulpFf",nil,{nil,"fcompp"}, "fsubrpFf","fsubpFf","fdivrpFf","fdivpFf", -- DF nil,nil,nil,nil,{"fnstsw ax"},"fucomipFf","fcomipFf",nil, } assert(map_opcfp[126] == "fcomipFf") -- Map for opcode groups. The subkey is sp from the ModRM byte. local map_opcgroup = { arith = { "add", "or", "adc", "sbb", "and", "sub", "xor", "cmp" }, shift = { "rol", "ror", "rcl", "rcr", "shl", "shr", "sal", "sar" }, testb = { "testBmi", "testBmi", "not", "neg", "mul", "imul", "div", "idiv" }, testv = { "testVmi", "testVmi", "not", "neg", "mul", "imul", "div", "idiv" }, incb = { "inc", "dec" }, incd = { "inc", "dec", "callUmp", "$call farDmp", "jmpUmp", "$jmp farDmp", "pushUm" }, sldt = { "sldt", "str", "lldt", "ltr", "verr", "verw" }, sgdt = { "vm*$sgdt", "vm*$sidt", "$lgdt", "vm*$lidt", "smsw", nil, "lmsw", "vm*$invlpg" }, bt = { nil, nil, nil, nil, "bt", "bts", "btr", "btc" }, cmpxchg = { nil, "sz*,cmpxchg8bQmp,cmpxchg16bXmp", nil, nil, nil, nil, "vmptrld|vmxon|vmclear", "vmptrst" }, pshiftw = { nil, nil, "psrlw", nil, "psraw", nil, "psllw" }, pshiftd = { nil, nil, "psrld", nil, "psrad", nil, "pslld" }, pshiftq = { nil, nil, "psrlq", nil, nil, nil, "psllq" }, pshiftdq = { nil, nil, "psrlq", "psrldq", nil, nil, "psllq", "pslldq" }, fxsave = { "$fxsave", "$fxrstor", "$ldmxcsr", "$stmxcsr", nil, "lfenceDp$", "mfenceDp$", "sfenceDp$clflush" }, prefetch = { "prefetch", "prefetchw" }, prefetcht = { "prefetchnta", "prefetcht0", "prefetcht1", "prefetcht2" }, } ------------------------------------------------------------------------------ -- Maps for register names. local map_regs = { B = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh", "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b" }, B64 = { "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b" }, W = { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }, D = { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }, Q = { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" }, M = { "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" }, -- No x64 ext! X = { "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" }, } local map_segregs = { "es", "cs", "ss", "ds", "fs", "gs", "segr6", "segr7" } -- Maps for size names. local map_sz2n = { B = 1, W = 2, D = 4, Q = 8, M = 8, X = 16, } local map_sz2prefix = { B = "byte", W = "word", D = "dword", Q = "qword", M = "qword", X = "xword", F = "dword", G = "qword", -- No need for sizes/register names for these two. } ------------------------------------------------------------------------------ -- Output a nicely formatted line with an opcode and operands. local function putop(ctx, text, operands) local code, pos, hex = ctx.code, ctx.pos, "" local hmax = ctx.hexdump if hmax > 0 then for i=ctx.start,pos-1 do hex = hex..format("%02X", byte(code, i, i)) end if #hex > hmax then hex = sub(hex, 1, hmax)..". " else hex = hex..rep(" ", hmax-#hex+2) end end if operands then text = text.." "..operands end if ctx.o16 then text = "o16 "..text; ctx.o16 = false end if ctx.a32 then text = "a32 "..text; ctx.a32 = false end if ctx.rep then text = ctx.rep.." "..text; ctx.rep = false end if ctx.rex then local t = (ctx.rexw and "w" or "")..(ctx.rexr and "r" or "").. (ctx.rexx and "x" or "")..(ctx.rexb and "b" or "") if t ~= "" then text = "rex."..t.." "..text end ctx.rexw = false; ctx.rexr = false; ctx.rexx = false; ctx.rexb = false ctx.rex = false end if ctx.seg then local text2, n = gsub(text, "%[", "["..ctx.seg..":") if n == 0 then text = ctx.seg.." "..text else text = text2 end ctx.seg = false end if ctx.lock then text = "lock "..text; ctx.lock = false end local imm = ctx.imm if imm then local sym = ctx.symtab[imm] if sym then text = text.."\t->"..sym end end ctx.out(format("%08x %s%s\n", ctx.addr+ctx.start, hex, text)) ctx.mrm = false ctx.start = pos ctx.imm = nil end -- Clear all prefix flags. local function clearprefixes(ctx) ctx.o16 = false; ctx.seg = false; ctx.lock = false; ctx.rep = false ctx.rexw = false; ctx.rexr = false; ctx.rexx = false; ctx.rexb = false ctx.rex = false; ctx.a32 = false end -- Fallback for incomplete opcodes at the end. local function incomplete(ctx) ctx.pos = ctx.stop+1 clearprefixes(ctx) return putop(ctx, "(incomplete)") end -- Fallback for unknown opcodes. local function unknown(ctx) clearprefixes(ctx) return putop(ctx, "(unknown)") end -- Return an immediate of the specified size. local function getimm(ctx, pos, n) if pos+n-1 > ctx.stop then return incomplete(ctx) end local code = ctx.code if n == 1 then local b1 = byte(code, pos, pos) return b1 elseif n == 2 then local b1, b2 = byte(code, pos, pos+1) return b1+b2*256 else local b1, b2, b3, b4 = byte(code, pos, pos+3) local imm = b1+b2*256+b3*65536+b4*16777216 ctx.imm = imm return imm end end -- Process pattern string and generate the operands. local function putpat(ctx, name, pat) local operands, regs, sz, mode, sp, rm, sc, rx, sdisp local code, pos, stop = ctx.code, ctx.pos, ctx.stop -- Chars used: 1DFGIMPQRSTUVWXacdfgijmoprstuwxyz for p in gmatch(pat, ".") do local x = nil if p == "V" or p == "U" then if ctx.rexw then sz = "Q"; ctx.rexw = false elseif ctx.o16 then sz = "W"; ctx.o16 = false elseif p == "U" and ctx.x64 then sz = "Q" else sz = "D" end regs = map_regs[sz] elseif p == "T" then if ctx.rexw then sz = "Q"; ctx.rexw = false else sz = "D" end regs = map_regs[sz] elseif p == "B" then sz = "B" regs = ctx.rex and map_regs.B64 or map_regs.B elseif match(p, "[WDQMXFG]") then sz = p regs = map_regs[sz] elseif p == "P" then sz = ctx.o16 and "X" or "M"; ctx.o16 = false regs = map_regs[sz] elseif p == "S" then name = name..lower(sz) elseif p == "s" then local imm = getimm(ctx, pos, 1); if not imm then return end x = imm <= 127 and format("+0x%02x", imm) or format("-0x%02x", 256-imm) pos = pos+1 elseif p == "u" then local imm = getimm(ctx, pos, 1); if not imm then return end x = format("0x%02x", imm) pos = pos+1 elseif p == "w" then local imm = getimm(ctx, pos, 2); if not imm then return end x = format("0x%x", imm) pos = pos+2 elseif p == "o" then -- [offset] if ctx.x64 then local imm1 = getimm(ctx, pos, 4); if not imm1 then return end local imm2 = getimm(ctx, pos+4, 4); if not imm2 then return end x = format("[0x%08x%08x]", imm2, imm1) pos = pos+8 else local imm = getimm(ctx, pos, 4); if not imm then return end x = format("[0x%08x]", imm) pos = pos+4 end elseif p == "i" or p == "I" then local n = map_sz2n[sz] if n == 8 and ctx.x64 and p == "I" then local imm1 = getimm(ctx, pos, 4); if not imm1 then return end local imm2 = getimm(ctx, pos+4, 4); if not imm2 then return end x = format("0x%08x%08x", imm2, imm1) else if n == 8 then n = 4 end local imm = getimm(ctx, pos, n); if not imm then return end if sz == "Q" and (imm < 0 or imm > 0x7fffffff) then imm = (0xffffffff+1)-imm x = format(imm > 65535 and "-0x%08x" or "-0x%x", imm) else x = format(imm > 65535 and "0x%08x" or "0x%x", imm) end end pos = pos+n elseif p == "j" then local n = map_sz2n[sz] if n == 8 then n = 4 end local imm = getimm(ctx, pos, n); if not imm then return end if sz == "B" and imm > 127 then imm = imm-256 elseif imm > 2147483647 then imm = imm-4294967296 end pos = pos+n imm = imm + pos + ctx.addr if imm > 4294967295 and not ctx.x64 then imm = imm-4294967296 end ctx.imm = imm if sz == "W" then x = format("word 0x%04x", imm%65536) elseif ctx.x64 then local lo = imm % 0x1000000 x = format("0x%02x%06x", (imm-lo) / 0x1000000, lo) else x = format("0x%08x", imm) end elseif p == "R" then local r = byte(code, pos-1, pos-1)%8 if ctx.rexb then r = r + 8; ctx.rexb = false end x = regs[r+1] elseif p == "a" then x = regs[1] elseif p == "c" then x = "cl" elseif p == "d" then x = "dx" elseif p == "1" then x = "1" else if not mode then mode = ctx.mrm if not mode then if pos > stop then return incomplete(ctx) end mode = byte(code, pos, pos) pos = pos+1 end rm = mode%8; mode = (mode-rm)/8 sp = mode%8; mode = (mode-sp)/8 sdisp = "" if mode < 3 then if rm == 4 then if pos > stop then return incomplete(ctx) end sc = byte(code, pos, pos) pos = pos+1 rm = sc%8; sc = (sc-rm)/8 rx = sc%8; sc = (sc-rx)/8 if ctx.rexx then rx = rx + 8; ctx.rexx = false end if rx == 4 then rx = nil end end if mode > 0 or rm == 5 then local dsz = mode if dsz ~= 1 then dsz = 4 end local disp = getimm(ctx, pos, dsz); if not disp then return end if mode == 0 then rm = nil end if rm or rx or (not sc and ctx.x64 and not ctx.a32) then if dsz == 1 and disp > 127 then sdisp = format("-0x%x", 256-disp) elseif disp >= 0 and disp <= 0x7fffffff then sdisp = format("+0x%x", disp) else sdisp = format("-0x%x", (0xffffffff+1)-disp) end else sdisp = format(ctx.x64 and not ctx.a32 and not (disp >= 0 and disp <= 0x7fffffff) and "0xffffffff%08x" or "0x%08x", disp) end pos = pos+dsz end end if rm and ctx.rexb then rm = rm + 8; ctx.rexb = false end if ctx.rexr then sp = sp + 8; ctx.rexr = false end end if p == "m" then if mode == 3 then x = regs[rm+1] else local aregs = ctx.a32 and map_regs.D or ctx.aregs local srm, srx = "", "" if rm then srm = aregs[rm+1] elseif not sc and ctx.x64 and not ctx.a32 then srm = "rip" end ctx.a32 = false if rx then if rm then srm = srm.."+" end srx = aregs[rx+1] if sc > 0 then srx = srx.."*"..(2^sc) end end x = format("[%s%s%s]", srm, srx, sdisp) end if mode < 3 and (not match(pat, "[aRrgp]") or match(pat, "t")) then -- Yuck. x = map_sz2prefix[sz].." "..x end elseif p == "r" then x = regs[sp+1] elseif p == "g" then x = map_segregs[sp+1] elseif p == "p" then -- Suppress prefix. elseif p == "f" then x = "st"..rm elseif p == "x" then if sp == 0 and ctx.lock and not ctx.x64 then x = "CR8"; ctx.lock = false else x = "CR"..sp end elseif p == "y" then x = "DR"..sp elseif p == "z" then x = "TR"..sp elseif p == "t" then else error("bad pattern `"..pat.."'") end end if x then operands = operands and operands..", "..x or x end end ctx.pos = pos return putop(ctx, name, operands) end -- Forward declaration. local map_act -- Fetch and cache MRM byte. local function getmrm(ctx) local mrm = ctx.mrm if not mrm then local pos = ctx.pos if pos > ctx.stop then return nil end mrm = byte(ctx.code, pos, pos) ctx.pos = pos+1 ctx.mrm = mrm end return mrm end -- Dispatch to handler depending on pattern. local function dispatch(ctx, opat, patgrp) if not opat then return unknown(ctx) end if match(opat, "%|") then -- MMX/SSE variants depending on prefix. local p if ctx.rep then p = ctx.rep=="rep" and "%|([^%|]*)" or "%|[^%|]*%|[^%|]*%|([^%|]*)" ctx.rep = false elseif ctx.o16 then p = "%|[^%|]*%|([^%|]*)"; ctx.o16 = false else p = "^[^%|]*" end opat = match(opat, p) if not opat then return unknown(ctx) end -- ctx.rep = false; ctx.o16 = false --XXX fails for 66 f2 0f 38 f1 06 crc32 eax,WORD PTR [esi] --XXX remove in branches? end if match(opat, "%$") then -- reg$mem variants. local mrm = getmrm(ctx); if not mrm then return incomplete(ctx) end opat = match(opat, mrm >= 192 and "^[^%$]*" or "%$(.*)") if opat == "" then return unknown(ctx) end end if opat == "" then return unknown(ctx) end local name, pat = match(opat, "^([a-z0-9 ]*)(.*)") if pat == "" and patgrp then pat = patgrp end return map_act[sub(pat, 1, 1)](ctx, name, pat) end -- Get a pattern from an opcode map and dispatch to handler. local function dispatchmap(ctx, opcmap) local pos = ctx.pos local opat = opcmap[byte(ctx.code, pos, pos)] pos = pos + 1 ctx.pos = pos return dispatch(ctx, opat) end -- Map for action codes. The key is the first char after the name. map_act = { -- Simple opcodes without operands. [""] = function(ctx, name, pat) return putop(ctx, name) end, -- Operand size chars fall right through. B = putpat, W = putpat, D = putpat, Q = putpat, V = putpat, U = putpat, T = putpat, M = putpat, X = putpat, P = putpat, F = putpat, G = putpat, -- Collect prefixes. [":"] = function(ctx, name, pat) ctx[pat == ":" and name or sub(pat, 2)] = name if ctx.pos - ctx.start > 5 then return unknown(ctx) end -- Limit #prefixes. end, -- Chain to special handler specified by name. ["*"] = function(ctx, name, pat) return map_act[name](ctx, name, sub(pat, 2)) end, -- Use named subtable for opcode group. ["!"] = function(ctx, name, pat) local mrm = getmrm(ctx); if not mrm then return incomplete(ctx) end return dispatch(ctx, map_opcgroup[name][((mrm-(mrm%8))/8)%8+1], sub(pat, 2)) end, -- o16,o32[,o64] variants. sz = function(ctx, name, pat) if ctx.o16 then ctx.o16 = false else pat = match(pat, ",(.*)") if ctx.rexw then local p = match(pat, ",(.*)") if p then pat = p; ctx.rexw = false end end end pat = match(pat, "^[^,]*") return dispatch(ctx, pat) end, -- Two-byte opcode dispatch. opc2 = function(ctx, name, pat) return dispatchmap(ctx, map_opc2) end, -- Three-byte opcode dispatch. opc3 = function(ctx, name, pat) return dispatchmap(ctx, map_opc3[pat]) end, -- VMX/SVM dispatch. vm = function(ctx, name, pat) return dispatch(ctx, map_opcvm[ctx.mrm]) end, -- Floating point opcode dispatch. fp = function(ctx, name, pat) local mrm = getmrm(ctx); if not mrm then return incomplete(ctx) end local rm = mrm%8 local idx = pat*8 + ((mrm-rm)/8)%8 if mrm >= 192 then idx = idx + 64 end local opat = map_opcfp[idx] if type(opat) == "table" then opat = opat[rm+1] end return dispatch(ctx, opat) end, -- REX prefix. rex = function(ctx, name, pat) if ctx.rex then return unknown(ctx) end -- Only 1 REX prefix allowed. for p in gmatch(pat, ".") do ctx["rex"..p] = true end ctx.rex = true end, -- Special case for nop with REX prefix. nop = function(ctx, name, pat) return dispatch(ctx, ctx.rex and pat or "nop") end, } ------------------------------------------------------------------------------ -- Disassemble a block of code. local function disass_block(ctx, ofs, len) if not ofs then ofs = 0 end local stop = len and ofs+len or #ctx.code ofs = ofs + 1 ctx.start = ofs ctx.pos = ofs ctx.stop = stop ctx.imm = nil ctx.mrm = false clearprefixes(ctx) while ctx.pos <= stop do dispatchmap(ctx, ctx.map1) end if ctx.pos ~= ctx.start then incomplete(ctx) end end -- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). local function create_(code, addr, out) local ctx = {} ctx.code = code ctx.addr = (addr or 0) - 1 ctx.out = out or io.write ctx.symtab = {} ctx.disass = disass_block ctx.hexdump = 16 ctx.x64 = false ctx.map1 = map_opc1_32 ctx.aregs = map_regs.D return ctx end local function create64_(code, addr, out) local ctx = create_(code, addr, out) ctx.x64 = true ctx.map1 = map_opc1_64 ctx.aregs = map_regs.Q return ctx end -- Simple API: disassemble code (a string) at address and output via out. local function disass_(code, addr, out) create_(code, addr, out):disass() end local function disass64_(code, addr, out) create64_(code, addr, out):disass() end -- Return register name for RID. local function regname_(r) if r < 8 then return map_regs.D[r+1] end return map_regs.X[r-7] end local function regname64_(r) if r < 16 then return map_regs.Q[r+1] end return map_regs.X[r-15] end -- Public module functions. module(...) create = create_ create64 = create64_ disass = disass_ disass64 = disass64_ regname = regname_ regname64 = regname64_ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/dump.lua0000664000000000000000000004605612202141143022627 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT compiler dump module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This module can be used to debug the JIT compiler itself. It dumps the -- code representations and structures used in various compiler stages. -- -- Example usage: -- -- luajit -jdump -e "local x=0; for i=1,1e6 do x=x+i end; print(x)" -- luajit -jdump=im -e "for i=1,1000 do for j=1,1000 do end end" | less -R -- luajit -jdump=is myapp.lua | less -R -- luajit -jdump=-b myapp.lua -- luajit -jdump=+aH,myapp.html myapp.lua -- luajit -jdump=ixT,myapp.dump myapp.lua -- -- The first argument specifies the dump mode. The second argument gives -- the output file name. Default output is to stdout, unless the environment -- variable LUAJIT_DUMPFILE is set. The file is overwritten every time the -- module is started. -- -- Different features can be turned on or off with the dump mode. If the -- mode starts with a '+', the following features are added to the default -- set of features; a '-' removes them. Otherwise the features are replaced. -- -- The following dump features are available (* marks the default): -- -- * t Print a line for each started, ended or aborted trace (see also -jv). -- * b Dump the traced bytecode. -- * i Dump the IR (intermediate representation). -- r Augment the IR with register/stack slots. -- s Dump the snapshot map. -- * m Dump the generated machine code. -- x Print each taken trace exit. -- X Print each taken trace exit and the contents of all registers. -- -- The output format can be set with the following characters: -- -- T Plain text output. -- A ANSI-colored text output -- H Colorized HTML + CSS output. -- -- The default output format is plain text. It's set to ANSI-colored text -- if the COLORTERM variable is set. Note: this is independent of any output -- redirection, which is actually considered a feature. -- -- You probably want to use less -R to enjoy viewing ANSI-colored text from -- a pipe or a file. Add this to your ~/.bashrc: export LESS="-R" -- ------------------------------------------------------------------------------ -- Cache some library functions and objects. local jit = require("jit") assert(jit.version_num == 20002, "LuaJIT core/library version mismatch") local jutil = require("jit.util") local vmdef = require("jit.vmdef") local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc local traceinfo, traceir, tracek = jutil.traceinfo, jutil.traceir, jutil.tracek local tracemc, tracesnap = jutil.tracemc, jutil.tracesnap local traceexitstub, ircalladdr = jutil.traceexitstub, jutil.ircalladdr local bit = require("bit") local band, shl, shr = bit.band, bit.lshift, bit.rshift local sub, gsub, format = string.sub, string.gsub, string.format local byte, char, rep = string.byte, string.char, string.rep local type, tostring = type, tostring local stdout, stderr = io.stdout, io.stderr -- Load other modules on-demand. local bcline, disass -- Active flag, output file handle and dump mode. local active, out, dumpmode ------------------------------------------------------------------------------ local symtabmt = { __index = false } local symtab = {} local nexitsym = 0 -- Fill nested symbol table with per-trace exit stub addresses. local function fillsymtab_tr(tr, nexit) local t = {} symtabmt.__index = t if jit.arch == "mips" or jit.arch == "mipsel" then t[traceexitstub(tr, 0)] = "exit" return end for i=0,nexit-1 do local addr = traceexitstub(tr, i) t[addr] = tostring(i) end local addr = traceexitstub(tr, nexit) if addr then t[addr] = "stack_check" end end -- Fill symbol table with trace exit stub addresses. local function fillsymtab(tr, nexit) local t = symtab if nexitsym == 0 then local ircall = vmdef.ircall for i=0,#ircall do local addr = ircalladdr(i) if addr ~= 0 then t[addr] = ircall[i] end end end if nexitsym == 1000000 then -- Per-trace exit stubs. fillsymtab_tr(tr, nexit) elseif nexit > nexitsym then -- Shared exit stubs. for i=nexitsym,nexit-1 do local addr = traceexitstub(i) if addr == nil then -- Fall back to per-trace exit stubs. fillsymtab_tr(tr, nexit) setmetatable(symtab, symtabmt) nexit = 1000000 break end t[addr] = tostring(i) end nexitsym = nexit end return t end local function dumpwrite(s) out:write(s) end -- Disassemble machine code. local function dump_mcode(tr) local info = traceinfo(tr) if not info then return end local mcode, addr, loop = tracemc(tr) if not mcode then return end if not disass then disass = require("jit.dis_"..jit.arch) end out:write("---- TRACE ", tr, " mcode ", #mcode, "\n") local ctx = disass.create(mcode, addr, dumpwrite) ctx.hexdump = 0 ctx.symtab = fillsymtab(tr, info.nexit) if loop ~= 0 then symtab[addr+loop] = "LOOP" ctx:disass(0, loop) out:write("->LOOP:\n") ctx:disass(loop, #mcode-loop) symtab[addr+loop] = nil else ctx:disass(0, #mcode) end end ------------------------------------------------------------------------------ local irtype_text = { [0] = "nil", "fal", "tru", "lud", "str", "p32", "thr", "pro", "fun", "p64", "cdt", "tab", "udt", "flt", "num", "i8 ", "u8 ", "i16", "u16", "int", "u32", "i64", "u64", "sfp", } local colortype_ansi = { [0] = "%s", "%s", "%s", "\027[36m%s\027[m", "\027[32m%s\027[m", "%s", "\027[1m%s\027[m", "%s", "\027[1m%s\027[m", "%s", "\027[33m%s\027[m", "\027[31m%s\027[m", "\027[36m%s\027[m", "\027[34m%s\027[m", "\027[34m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", "\027[35m%s\027[m", } local function colorize_text(s, t) return s end local function colorize_ansi(s, t) return format(colortype_ansi[t], s) end local irtype_ansi = setmetatable({}, { __index = function(tab, t) local s = colorize_ansi(irtype_text[t], t); tab[t] = s; return s; end }) local html_escape = { ["<"] = "<", [">"] = ">", ["&"] = "&", } local function colorize_html(s, t) s = gsub(s, "[<>&]", html_escape) return format('%s', irtype_text[t], s) end local irtype_html = setmetatable({}, { __index = function(tab, t) local s = colorize_html(irtype_text[t], t); tab[t] = s; return s; end }) local header_html = [[ ]] local colorize, irtype -- Lookup tables to convert some literals into names. local litname = { ["SLOAD "] = setmetatable({}, { __index = function(t, mode) local s = "" if band(mode, 1) ~= 0 then s = s.."P" end if band(mode, 2) ~= 0 then s = s.."F" end if band(mode, 4) ~= 0 then s = s.."T" end if band(mode, 8) ~= 0 then s = s.."C" end if band(mode, 16) ~= 0 then s = s.."R" end if band(mode, 32) ~= 0 then s = s.."I" end t[mode] = s return s end}), ["XLOAD "] = { [0] = "", "R", "V", "RV", "U", "RU", "VU", "RVU", }, ["CONV "] = setmetatable({}, { __index = function(t, mode) local s = irtype[band(mode, 31)] s = irtype[band(shr(mode, 5), 31)].."."..s if band(mode, 0x400) ~= 0 then s = s.." trunc" elseif band(mode, 0x800) ~= 0 then s = s.." sext" end local c = shr(mode, 14) if c == 2 then s = s.." index" elseif c == 3 then s = s.." check" end t[mode] = s return s end}), ["FLOAD "] = vmdef.irfield, ["FREF "] = vmdef.irfield, ["FPMATH"] = vmdef.irfpm, } local function ctlsub(c) if c == "\n" then return "\\n" elseif c == "\r" then return "\\r" elseif c == "\t" then return "\\t" else return format("\\%03d", byte(c)) end end local function fmtfunc(func, pc) local fi = funcinfo(func, pc) if fi.loc then return fi.loc elseif fi.ffid then return vmdef.ffnames[fi.ffid] elseif fi.addr then return format("C:%x", fi.addr) else return "(?)" end end local function formatk(tr, idx) local k, t, slot = tracek(tr, idx) local tn = type(k) local s if tn == "number" then if k == 2^52+2^51 then s = "bias" else s = format("%+.14g", k) end elseif tn == "string" then s = format(#k > 20 and '"%.20s"~' or '"%s"', gsub(k, "%c", ctlsub)) elseif tn == "function" then s = fmtfunc(k) elseif tn == "table" then s = format("{%p}", k) elseif tn == "userdata" then if t == 12 then s = format("userdata:%p", k) else s = format("[%p]", k) if s == "[0x00000000]" then s = "NULL" end end elseif t == 21 then -- int64_t s = sub(tostring(k), 1, -3) if sub(s, 1, 1) ~= "-" then s = "+"..s end else s = tostring(k) -- For primitives. end s = colorize(format("%-4s", s), t) if slot then s = format("%s @%d", s, slot) end return s end local function printsnap(tr, snap) local n = 2 for s=0,snap[1]-1 do local sn = snap[n] if shr(sn, 24) == s then n = n + 1 local ref = band(sn, 0xffff) - 0x8000 -- REF_BIAS if ref < 0 then out:write(formatk(tr, ref)) elseif band(sn, 0x80000) ~= 0 then -- SNAP_SOFTFPNUM out:write(colorize(format("%04d/%04d", ref, ref+1), 14)) else local m, ot, op1, op2 = traceir(tr, ref) out:write(colorize(format("%04d", ref), band(ot, 31))) end out:write(band(sn, 0x10000) == 0 and " " or "|") -- SNAP_FRAME else out:write("---- ") end end out:write("]\n") end -- Dump snapshots (not interleaved with IR). local function dump_snap(tr) out:write("---- TRACE ", tr, " snapshots\n") for i=0,1000000000 do local snap = tracesnap(tr, i) if not snap then break end out:write(format("#%-3d %04d [ ", i, snap[0])) printsnap(tr, snap) end end -- Return a register name or stack slot for a rid/sp location. local function ridsp_name(ridsp, ins) if not disass then disass = require("jit.dis_"..jit.arch) end local rid, slot = band(ridsp, 0xff), shr(ridsp, 8) if rid == 253 or rid == 254 then return (slot == 0 or slot == 255) and " {sink" or format(" {%04d", ins-slot) end if ridsp > 255 then return format("[%x]", slot*4) end if rid < 128 then return disass.regname(rid) end return "" end -- Dump CALL* function ref and return optional ctype. local function dumpcallfunc(tr, ins) local ctype if ins > 0 then local m, ot, op1, op2 = traceir(tr, ins) if band(ot, 31) == 0 then -- nil type means CARG(func, ctype). ins = op1 ctype = formatk(tr, op2) end end if ins < 0 then out:write(format("[0x%x](", tonumber((tracek(tr, ins))))) else out:write(format("%04d (", ins)) end return ctype end -- Recursively gather CALL* args and dump them. local function dumpcallargs(tr, ins) if ins < 0 then out:write(formatk(tr, ins)) else local m, ot, op1, op2 = traceir(tr, ins) local oidx = 6*shr(ot, 8) local op = sub(vmdef.irnames, oidx+1, oidx+6) if op == "CARG " then dumpcallargs(tr, op1) if op2 < 0 then out:write(" ", formatk(tr, op2)) else out:write(" ", format("%04d", op2)) end else out:write(format("%04d", ins)) end end end -- Dump IR and interleaved snapshots. local function dump_ir(tr, dumpsnap, dumpreg) local info = traceinfo(tr) if not info then return end local nins = info.nins out:write("---- TRACE ", tr, " IR\n") local irnames = vmdef.irnames local snapref = 65536 local snap, snapno if dumpsnap then snap = tracesnap(tr, 0) snapref = snap[0] snapno = 0 end for ins=1,nins do if ins >= snapref then if dumpreg then out:write(format(".... SNAP #%-3d [ ", snapno)) else out:write(format(".... SNAP #%-3d [ ", snapno)) end printsnap(tr, snap) snapno = snapno + 1 snap = tracesnap(tr, snapno) snapref = snap and snap[0] or 65536 end local m, ot, op1, op2, ridsp = traceir(tr, ins) local oidx, t = 6*shr(ot, 8), band(ot, 31) local op = sub(irnames, oidx+1, oidx+6) if op == "LOOP " then if dumpreg then out:write(format("%04d ------------ LOOP ------------\n", ins)) else out:write(format("%04d ------ LOOP ------------\n", ins)) end elseif op ~= "NOP " and op ~= "CARG " and (dumpreg or op ~= "RENAME") then local rid = band(ridsp, 255) if dumpreg then out:write(format("%04d %-6s", ins, ridsp_name(ridsp, ins))) else out:write(format("%04d ", ins)) end out:write(format("%s%s %s %s ", (rid == 254 or rid == 253) and "}" or (band(ot, 128) == 0 and " " or ">"), band(ot, 64) == 0 and " " or "+", irtype[t], op)) local m1, m2 = band(m, 3), band(m, 3*4) if sub(op, 1, 4) == "CALL" then local ctype if m2 == 1*4 then -- op2 == IRMlit out:write(format("%-10s (", vmdef.ircall[op2])) else ctype = dumpcallfunc(tr, op2) end if op1 ~= -1 then dumpcallargs(tr, op1) end out:write(")") if ctype then out:write(" ctype ", ctype) end elseif op == "CNEW " and op2 == -1 then out:write(formatk(tr, op1)) elseif m1 ~= 3 then -- op1 != IRMnone if op1 < 0 then out:write(formatk(tr, op1)) else out:write(format(m1 == 0 and "%04d" or "#%-3d", op1)) end if m2 ~= 3*4 then -- op2 != IRMnone if m2 == 1*4 then -- op2 == IRMlit local litn = litname[op] if litn and litn[op2] then out:write(" ", litn[op2]) elseif op == "UREFO " or op == "UREFC " then out:write(format(" #%-3d", shr(op2, 8))) else out:write(format(" #%-3d", op2)) end elseif op2 < 0 then out:write(" ", formatk(tr, op2)) else out:write(format(" %04d", op2)) end end end out:write("\n") end end if snap then if dumpreg then out:write(format(".... SNAP #%-3d [ ", snapno)) else out:write(format(".... SNAP #%-3d [ ", snapno)) end printsnap(tr, snap) end end ------------------------------------------------------------------------------ local recprefix = "" local recdepth = 0 -- Format trace error message. local function fmterr(err, info) if type(err) == "number" then if type(info) == "function" then info = fmtfunc(info) end err = format(vmdef.traceerr[err], info) end return err end -- Dump trace states. local function dump_trace(what, tr, func, pc, otr, oex) if what == "stop" or (what == "abort" and dumpmode.a) then if dumpmode.i then dump_ir(tr, dumpmode.s, dumpmode.r and what == "stop") elseif dumpmode.s then dump_snap(tr) end if dumpmode.m then dump_mcode(tr) end end if what == "start" then if dumpmode.H then out:write('
    \n') end
        out:write("---- TRACE ", tr, " ", what)
        if otr then out:write(" ", otr, "/", oex) end
        out:write(" ", fmtfunc(func, pc), "\n")
        recprefix = ""
      elseif what == "stop" or what == "abort" then
        out:write("---- TRACE ", tr, " ", what)
        recprefix = nil
        if what == "abort" then
          out:write(" ", fmtfunc(func, pc), " -- ", fmterr(otr, oex), "\n")
        else
          local info = traceinfo(tr)
          local link, ltype = info.link, info.linktype
          if link == tr or link == 0 then
    	out:write(" -> ", ltype, "\n")
          elseif ltype == "root" then
    	out:write(" -> ", link, "\n")
          else
    	out:write(" -> ", link, " ", ltype, "\n")
          end
        end
        if dumpmode.H then out:write("
    \n\n") else out:write("\n") end else out:write("---- TRACE ", what, "\n\n") end out:flush() end -- Dump recorded bytecode. local function dump_record(tr, func, pc, depth, callee) if depth ~= recdepth then recdepth = depth recprefix = rep(" .", depth) end local line if pc >= 0 then line = bcline(func, pc, recprefix) if dumpmode.H then line = gsub(line, "[<>&]", html_escape) end else line = "0000 "..recprefix.." FUNCC \n" callee = func end if pc <= 0 then out:write(sub(line, 1, -2), " ; ", fmtfunc(func), "\n") else out:write(line) end if pc >= 0 and band(funcbc(func, pc), 0xff) < 16 then -- ORDER BC out:write(bcline(func, pc+1, recprefix)) -- Write JMP for cond. end end ------------------------------------------------------------------------------ -- Dump taken trace exits. local function dump_texit(tr, ex, ngpr, nfpr, ...) out:write("---- TRACE ", tr, " exit ", ex, "\n") if dumpmode.X then local regs = {...} if jit.arch == "x64" then for i=1,ngpr do out:write(format(" %016x", regs[i])) if i % 4 == 0 then out:write("\n") end end else for i=1,ngpr do out:write(format(" %08x", regs[i])) if i % 8 == 0 then out:write("\n") end end end if jit.arch == "mips" or jit.arch == "mipsel" then for i=1,nfpr,2 do out:write(format(" %+17.14g", regs[ngpr+i])) if i % 8 == 7 then out:write("\n") end end else for i=1,nfpr do out:write(format(" %+17.14g", regs[ngpr+i])) if i % 4 == 0 then out:write("\n") end end end end end ------------------------------------------------------------------------------ -- Detach dump handlers. local function dumpoff() if active then active = false jit.attach(dump_texit) jit.attach(dump_record) jit.attach(dump_trace) if out and out ~= stdout and out ~= stderr then out:close() end out = nil end end -- Open the output file and attach dump handlers. local function dumpon(opt, outfile) if active then dumpoff() end local colormode = os.getenv("COLORTERM") and "A" or "T" if opt then opt = gsub(opt, "[TAH]", function(mode) colormode = mode; return ""; end) end local m = { t=true, b=true, i=true, m=true, } if opt and opt ~= "" then local o = sub(opt, 1, 1) if o ~= "+" and o ~= "-" then m = {} end for i=1,#opt do m[sub(opt, i, i)] = (o ~= "-") end end dumpmode = m if m.t or m.b or m.i or m.s or m.m then jit.attach(dump_trace, "trace") end if m.b then jit.attach(dump_record, "record") if not bcline then bcline = require("jit.bc").line end end if m.x or m.X then jit.attach(dump_texit, "texit") end if not outfile then outfile = os.getenv("LUAJIT_DUMPFILE") end if outfile then out = outfile == "-" and stdout or assert(io.open(outfile, "w")) else out = stdout end m[colormode] = true if colormode == "A" then colorize = colorize_ansi irtype = irtype_ansi elseif colormode == "H" then colorize = colorize_html irtype = irtype_html out:write(header_html) else colorize = colorize_text irtype = irtype_text end active = true end -- Public module functions. module(...) on = dumpon off = dumpoff start = dumpon -- For -j command line option. tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/bc.lua0000664000000000000000000001274612202141143022245 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT bytecode listing module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This module lists the bytecode of a Lua function. If it's loaded by -jbc -- it hooks into the parser and lists all functions of a chunk as they -- are parsed. -- -- Example usage: -- -- luajit -jbc -e 'local x=0; for i=1,1e6 do x=x+i end; print(x)' -- luajit -jbc=- foo.lua -- luajit -jbc=foo.list foo.lua -- -- Default output is to stderr. To redirect the output to a file, pass a -- filename as an argument (use '-' for stdout) or set the environment -- variable LUAJIT_LISTFILE. The file is overwritten every time the module -- is started. -- -- This module can also be used programmatically: -- -- local bc = require("jit.bc") -- -- local function foo() print("hello") end -- -- bc.dump(foo) --> -- BYTECODE -- [...] -- print(bc.line(foo, 2)) --> 0002 KSTR 1 1 ; "hello" -- -- local out = { -- -- Do something with each line: -- write = function(t, ...) io.write(...) end, -- close = function(t) end, -- flush = function(t) end, -- } -- bc.dump(foo, out) -- ------------------------------------------------------------------------------ -- Cache some library functions and objects. local jit = require("jit") assert(jit.version_num == 20002, "LuaJIT core/library version mismatch") local jutil = require("jit.util") local vmdef = require("jit.vmdef") local bit = require("bit") local sub, gsub, format = string.sub, string.gsub, string.format local byte, band, shr = string.byte, bit.band, bit.rshift local funcinfo, funcbc, funck = jutil.funcinfo, jutil.funcbc, jutil.funck local funcuvname = jutil.funcuvname local bcnames = vmdef.bcnames local stdout, stderr = io.stdout, io.stderr ------------------------------------------------------------------------------ local function ctlsub(c) if c == "\n" then return "\\n" elseif c == "\r" then return "\\r" elseif c == "\t" then return "\\t" else return format("\\%03d", byte(c)) end end -- Return one bytecode line. local function bcline(func, pc, prefix) local ins, m = funcbc(func, pc) if not ins then return end local ma, mb, mc = band(m, 7), band(m, 15*8), band(m, 15*128) local a = band(shr(ins, 8), 0xff) local oidx = 6*band(ins, 0xff) local op = sub(bcnames, oidx+1, oidx+6) local s = format("%04d %s %-6s %3s ", pc, prefix or " ", op, ma == 0 and "" or a) local d = shr(ins, 16) if mc == 13*128 then -- BCMjump return format("%s=> %04d\n", s, pc+d-0x7fff) end if mb ~= 0 then d = band(d, 0xff) elseif mc == 0 then return s.."\n" end local kc if mc == 10*128 then -- BCMstr kc = funck(func, -d-1) kc = format(#kc > 40 and '"%.40s"~' or '"%s"', gsub(kc, "%c", ctlsub)) elseif mc == 9*128 then -- BCMnum kc = funck(func, d) if op == "TSETM " then kc = kc - 2^52 end elseif mc == 12*128 then -- BCMfunc local fi = funcinfo(funck(func, -d-1)) if fi.ffid then kc = vmdef.ffnames[fi.ffid] else kc = fi.loc end elseif mc == 5*128 then -- BCMuv kc = funcuvname(func, d) end if ma == 5 then -- BCMuv local ka = funcuvname(func, a) if kc then kc = ka.." ; "..kc else kc = ka end end if mb ~= 0 then local b = shr(ins, 24) if kc then return format("%s%3d %3d ; %s\n", s, b, d, kc) end return format("%s%3d %3d\n", s, b, d) end if kc then return format("%s%3d ; %s\n", s, d, kc) end if mc == 7*128 and d > 32767 then d = d - 65536 end -- BCMlits return format("%s%3d\n", s, d) end -- Collect branch targets of a function. local function bctargets(func) local target = {} for pc=1,1000000000 do local ins, m = funcbc(func, pc) if not ins then break end if band(m, 15*128) == 13*128 then target[pc+shr(ins, 16)-0x7fff] = true end end return target end -- Dump bytecode instructions of a function. local function bcdump(func, out, all) if not out then out = stdout end local fi = funcinfo(func) if all and fi.children then for n=-1,-1000000000,-1 do local k = funck(func, n) if not k then break end if type(k) == "proto" then bcdump(k, out, true) end end end out:write(format("-- BYTECODE -- %s-%d\n", fi.loc, fi.lastlinedefined)) local target = bctargets(func) for pc=1,1000000000 do local s = bcline(func, pc, target[pc] and "=>") if not s then break end out:write(s) end out:write("\n") out:flush() end ------------------------------------------------------------------------------ -- Active flag and output file handle. local active, out -- List handler. local function h_list(func) return bcdump(func, out) end -- Detach list handler. local function bclistoff() if active then active = false jit.attach(h_list) if out and out ~= stdout and out ~= stderr then out:close() end out = nil end end -- Open the output file and attach list handler. local function bcliston(outfile) if active then bclistoff() end if not outfile then outfile = os.getenv("LUAJIT_LISTFILE") end if outfile then out = outfile == "-" and stdout or assert(io.open(outfile, "w")) else out = stderr end jit.attach(h_list, "bc") active = true end -- Public module functions. module(...) line = bcline dump = bcdump targets = bctargets on = bcliston off = bclistoff start = bcliston -- For -j command line option. tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/dis_ppc.lua0000664000000000000000000004753712202141143023310 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT PPC disassembler module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT/X license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- This is a helper module used by the LuaJIT machine code dumper module. -- -- It disassembles all common, non-privileged 32/64 bit PowerPC instructions -- plus the e500 SPE instructions and some Cell/Xenon extensions. -- -- NYI: VMX, VMX128 ------------------------------------------------------------------------------ local type = type local sub, byte, format = string.sub, string.byte, string.format local match, gmatch, gsub = string.match, string.gmatch, string.gsub local concat = table.concat local bit = require("bit") local band, bor, tohex = bit.band, bit.bor, bit.tohex local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift ------------------------------------------------------------------------------ -- Primary and extended opcode maps ------------------------------------------------------------------------------ local map_crops = { shift = 1, mask = 1023, [0] = "mcrfXX", [33] = "crnor|crnotCCC=", [129] = "crandcCCC", [193] = "crxor|crclrCCC%", [225] = "crnandCCC", [257] = "crandCCC", [289] = "creqv|crsetCCC%", [417] = "crorcCCC", [449] = "cror|crmoveCCC=", [16] = "b_lrKB", [528] = "b_ctrKB", [150] = "isync", } local map_rlwinm = setmetatable({ shift = 0, mask = -1, }, { __index = function(t, x) local rot = band(rshift(x, 11), 31) local mb = band(rshift(x, 6), 31) local me = band(rshift(x, 1), 31) if mb == 0 and me == 31-rot then return "slwiRR~A." elseif me == 31 and mb == 32-rot then return "srwiRR~-A." else return "rlwinmRR~AAA." end end }) local map_rld = { shift = 2, mask = 7, [0] = "rldiclRR~HM.", "rldicrRR~HM.", "rldicRR~HM.", "rldimiRR~HM.", { shift = 1, mask = 1, [0] = "rldclRR~RM.", "rldcrRR~RM.", }, } local map_ext = setmetatable({ shift = 1, mask = 1023, [0] = "cmp_YLRR", [32] = "cmpl_YLRR", [4] = "twARR", [68] = "tdARR", [8] = "subfcRRR.", [40] = "subfRRR.", [104] = "negRR.", [136] = "subfeRRR.", [200] = "subfzeRR.", [232] = "subfmeRR.", [520] = "subfcoRRR.", [552] = "subfoRRR.", [616] = "negoRR.", [648] = "subfeoRRR.", [712] = "subfzeoRR.", [744] = "subfmeoRR.", [9] = "mulhduRRR.", [73] = "mulhdRRR.", [233] = "mulldRRR.", [457] = "divduRRR.", [489] = "divdRRR.", [745] = "mulldoRRR.", [969] = "divduoRRR.", [1001] = "divdoRRR.", [10] = "addcRRR.", [138] = "addeRRR.", [202] = "addzeRR.", [234] = "addmeRR.", [266] = "addRRR.", [522] = "addcoRRR.", [650] = "addeoRRR.", [714] = "addzeoRR.", [746] = "addmeoRR.", [778] = "addoRRR.", [11] = "mulhwuRRR.", [75] = "mulhwRRR.", [235] = "mullwRRR.", [459] = "divwuRRR.", [491] = "divwRRR.", [747] = "mullwoRRR.", [971] = "divwouRRR.", [1003] = "divwoRRR.", [15] = "iselltRRR", [47] = "iselgtRRR", [79] = "iseleqRRR", [144] = { shift = 20, mask = 1, [0] = "mtcrfRZ~", "mtocrfRZ~", }, [19] = { shift = 20, mask = 1, [0] = "mfcrR", "mfocrfRZ", }, [371] = { shift = 11, mask = 1023, [392] = "mftbR", [424] = "mftbuR", }, [339] = { shift = 11, mask = 1023, [32] = "mferR", [256] = "mflrR", [288] = "mfctrR", [16] = "mfspefscrR", }, [467] = { shift = 11, mask = 1023, [32] = "mtxerR", [256] = "mtlrR", [288] = "mtctrR", [16] = "mtspefscrR", }, [20] = "lwarxRR0R", [84] = "ldarxRR0R", [21] = "ldxRR0R", [53] = "lduxRRR", [149] = "stdxRR0R", [181] = "stduxRRR", [341] = "lwaxRR0R", [373] = "lwauxRRR", [23] = "lwzxRR0R", [55] = "lwzuxRRR", [87] = "lbzxRR0R", [119] = "lbzuxRRR", [151] = "stwxRR0R", [183] = "stwuxRRR", [215] = "stbxRR0R", [247] = "stbuxRRR", [279] = "lhzxRR0R", [311] = "lhzuxRRR", [343] = "lhaxRR0R", [375] = "lhauxRRR", [407] = "sthxRR0R", [439] = "sthuxRRR", [54] = "dcbst-R0R", [86] = "dcbf-R0R", [150] = "stwcxRR0R.", [214] = "stdcxRR0R.", [246] = "dcbtst-R0R", [278] = "dcbt-R0R", [310] = "eciwxRR0R", [438] = "ecowxRR0R", [470] = "dcbi-RR", [598] = { shift = 21, mask = 3, [0] = "sync", "lwsync", "ptesync", }, [758] = "dcba-RR", [854] = "eieio", [982] = "icbi-R0R", [1014] = "dcbz-R0R", [26] = "cntlzwRR~", [58] = "cntlzdRR~", [122] = "popcntbRR~", [154] = "prtywRR~", [186] = "prtydRR~", [28] = "andRR~R.", [60] = "andcRR~R.", [124] = "nor|notRR~R=.", [284] = "eqvRR~R.", [316] = "xorRR~R.", [412] = "orcRR~R.", [444] = "or|mrRR~R=.", [476] = "nandRR~R.", [508] = "cmpbRR~R", [512] = "mcrxrX", [532] = "ldbrxRR0R", [660] = "stdbrxRR0R", [533] = "lswxRR0R", [597] = "lswiRR0A", [661] = "stswxRR0R", [725] = "stswiRR0A", [534] = "lwbrxRR0R", [662] = "stwbrxRR0R", [790] = "lhbrxRR0R", [918] = "sthbrxRR0R", [535] = "lfsxFR0R", [567] = "lfsuxFRR", [599] = "lfdxFR0R", [631] = "lfduxFRR", [663] = "stfsxFR0R", [695] = "stfsuxFRR", [727] = "stfdxFR0R", [759] = "stfduxFR0R", [855] = "lfiwaxFR0R", [983] = "stfiwxFR0R", [24] = "slwRR~R.", [27] = "sldRR~R.", [536] = "srwRR~R.", [792] = "srawRR~R.", [824] = "srawiRR~A.", [794] = "sradRR~R.", [826] = "sradiRR~H.", [827] = "sradiRR~H.", [922] = "extshRR~.", [954] = "extsbRR~.", [986] = "extswRR~.", [539] = "srdRR~R.", }, { __index = function(t, x) if band(x, 31) == 15 then return "iselRRRC" end end }) local map_ld = { shift = 0, mask = 3, [0] = "ldRRE", "lduRRE", "lwaRRE", } local map_std = { shift = 0, mask = 3, [0] = "stdRRE", "stduRRE", } local map_fps = { shift = 5, mask = 1, { shift = 1, mask = 15, [0] = false, false, "fdivsFFF.", false, "fsubsFFF.", "faddsFFF.", "fsqrtsF-F.", false, "fresF-F.", "fmulsFF-F.", "frsqrtesF-F.", false, "fmsubsFFFF~.", "fmaddsFFFF~.", "fnmsubsFFFF~.", "fnmaddsFFFF~.", } } local map_fpd = { shift = 5, mask = 1, [0] = { shift = 1, mask = 1023, [0] = "fcmpuXFF", [32] = "fcmpoXFF", [64] = "mcrfsXX", [38] = "mtfsb1A.", [70] = "mtfsb0A.", [134] = "mtfsfiA>>-A>", [8] = "fcpsgnFFF.", [40] = "fnegF-F.", [72] = "fmrF-F.", [136] = "fnabsF-F.", [264] = "fabsF-F.", [12] = "frspF-F.", [14] = "fctiwF-F.", [15] = "fctiwzF-F.", [583] = "mffsF.", [711] = "mtfsfZF.", [392] = "frinF-F.", [424] = "frizF-F.", [456] = "fripF-F.", [488] = "frimF-F.", [814] = "fctidF-F.", [815] = "fctidzF-F.", [846] = "fcfidF-F.", }, { shift = 1, mask = 15, [0] = false, false, "fdivFFF.", false, "fsubFFF.", "faddFFF.", "fsqrtF-F.", "fselFFFF~.", "freF-F.", "fmulFF-F.", "frsqrteF-F.", false, "fmsubFFFF~.", "fmaddFFFF~.", "fnmsubFFFF~.", "fnmaddFFFF~.", } } local map_spe = { shift = 0, mask = 2047, [512] = "evaddwRRR", [514] = "evaddiwRAR~", [516] = "evsubwRRR~", [518] = "evsubiwRAR~", [520] = "evabsRR", [521] = "evnegRR", [522] = "evextsbRR", [523] = "evextshRR", [524] = "evrndwRR", [525] = "evcntlzwRR", [526] = "evcntlswRR", [527] = "brincRRR", [529] = "evandRRR", [530] = "evandcRRR", [534] = "evxorRRR", [535] = "evor|evmrRRR=", [536] = "evnor|evnotRRR=", [537] = "eveqvRRR", [539] = "evorcRRR", [542] = "evnandRRR", [544] = "evsrwuRRR", [545] = "evsrwsRRR", [546] = "evsrwiuRRA", [547] = "evsrwisRRA", [548] = "evslwRRR", [550] = "evslwiRRA", [552] = "evrlwRRR", [553] = "evsplatiRS", [554] = "evrlwiRRA", [555] = "evsplatfiRS", [556] = "evmergehiRRR", [557] = "evmergeloRRR", [558] = "evmergehiloRRR", [559] = "evmergelohiRRR", [560] = "evcmpgtuYRR", [561] = "evcmpgtsYRR", [562] = "evcmpltuYRR", [563] = "evcmpltsYRR", [564] = "evcmpeqYRR", [632] = "evselRRR", [633] = "evselRRRW", [634] = "evselRRRW", [635] = "evselRRRW", [636] = "evselRRRW", [637] = "evselRRRW", [638] = "evselRRRW", [639] = "evselRRRW", [640] = "evfsaddRRR", [641] = "evfssubRRR", [644] = "evfsabsRR", [645] = "evfsnabsRR", [646] = "evfsnegRR", [648] = "evfsmulRRR", [649] = "evfsdivRRR", [652] = "evfscmpgtYRR", [653] = "evfscmpltYRR", [654] = "evfscmpeqYRR", [656] = "evfscfuiR-R", [657] = "evfscfsiR-R", [658] = "evfscfufR-R", [659] = "evfscfsfR-R", [660] = "evfsctuiR-R", [661] = "evfsctsiR-R", [662] = "evfsctufR-R", [663] = "evfsctsfR-R", [664] = "evfsctuizR-R", [666] = "evfsctsizR-R", [668] = "evfststgtYRR", [669] = "evfststltYRR", [670] = "evfststeqYRR", [704] = "efsaddRRR", [705] = "efssubRRR", [708] = "efsabsRR", [709] = "efsnabsRR", [710] = "efsnegRR", [712] = "efsmulRRR", [713] = "efsdivRRR", [716] = "efscmpgtYRR", [717] = "efscmpltYRR", [718] = "efscmpeqYRR", [719] = "efscfdR-R", [720] = "efscfuiR-R", [721] = "efscfsiR-R", [722] = "efscfufR-R", [723] = "efscfsfR-R", [724] = "efsctuiR-R", [725] = "efsctsiR-R", [726] = "efsctufR-R", [727] = "efsctsfR-R", [728] = "efsctuizR-R", [730] = "efsctsizR-R", [732] = "efststgtYRR", [733] = "efststltYRR", [734] = "efststeqYRR", [736] = "efdaddRRR", [737] = "efdsubRRR", [738] = "efdcfuidR-R", [739] = "efdcfsidR-R", [740] = "efdabsRR", [741] = "efdnabsRR", [742] = "efdnegRR", [744] = "efdmulRRR", [745] = "efddivRRR", [746] = "efdctuidzR-R", [747] = "efdctsidzR-R", [748] = "efdcmpgtYRR", [749] = "efdcmpltYRR", [750] = "efdcmpeqYRR", [751] = "efdcfsR-R", [752] = "efdcfuiR-R", [753] = "efdcfsiR-R", [754] = "efdcfufR-R", [755] = "efdcfsfR-R", [756] = "efdctuiR-R", [757] = "efdctsiR-R", [758] = "efdctufR-R", [759] = "efdctsfR-R", [760] = "efdctuizR-R", [762] = "efdctsizR-R", [764] = "efdtstgtYRR", [765] = "efdtstltYRR", [766] = "efdtsteqYRR", [768] = "evlddxRR0R", [769] = "evlddRR8", [770] = "evldwxRR0R", [771] = "evldwRR8", [772] = "evldhxRR0R", [773] = "evldhRR8", [776] = "evlhhesplatxRR0R", [777] = "evlhhesplatRR2", [780] = "evlhhousplatxRR0R", [781] = "evlhhousplatRR2", [782] = "evlhhossplatxRR0R", [783] = "evlhhossplatRR2", [784] = "evlwhexRR0R", [785] = "evlwheRR4", [788] = "evlwhouxRR0R", [789] = "evlwhouRR4", [790] = "evlwhosxRR0R", [791] = "evlwhosRR4", [792] = "evlwwsplatxRR0R", [793] = "evlwwsplatRR4", [796] = "evlwhsplatxRR0R", [797] = "evlwhsplatRR4", [800] = "evstddxRR0R", [801] = "evstddRR8", [802] = "evstdwxRR0R", [803] = "evstdwRR8", [804] = "evstdhxRR0R", [805] = "evstdhRR8", [816] = "evstwhexRR0R", [817] = "evstwheRR4", [820] = "evstwhoxRR0R", [821] = "evstwhoRR4", [824] = "evstwwexRR0R", [825] = "evstwweRR4", [828] = "evstwwoxRR0R", [829] = "evstwwoRR4", [1027] = "evmhessfRRR", [1031] = "evmhossfRRR", [1032] = "evmheumiRRR", [1033] = "evmhesmiRRR", [1035] = "evmhesmfRRR", [1036] = "evmhoumiRRR", [1037] = "evmhosmiRRR", [1039] = "evmhosmfRRR", [1059] = "evmhessfaRRR", [1063] = "evmhossfaRRR", [1064] = "evmheumiaRRR", [1065] = "evmhesmiaRRR", [1067] = "evmhesmfaRRR", [1068] = "evmhoumiaRRR", [1069] = "evmhosmiaRRR", [1071] = "evmhosmfaRRR", [1095] = "evmwhssfRRR", [1096] = "evmwlumiRRR", [1100] = "evmwhumiRRR", [1101] = "evmwhsmiRRR", [1103] = "evmwhsmfRRR", [1107] = "evmwssfRRR", [1112] = "evmwumiRRR", [1113] = "evmwsmiRRR", [1115] = "evmwsmfRRR", [1127] = "evmwhssfaRRR", [1128] = "evmwlumiaRRR", [1132] = "evmwhumiaRRR", [1133] = "evmwhsmiaRRR", [1135] = "evmwhsmfaRRR", [1139] = "evmwssfaRRR", [1144] = "evmwumiaRRR", [1145] = "evmwsmiaRRR", [1147] = "evmwsmfaRRR", [1216] = "evaddusiaawRR", [1217] = "evaddssiaawRR", [1218] = "evsubfusiaawRR", [1219] = "evsubfssiaawRR", [1220] = "evmraRR", [1222] = "evdivwsRRR", [1223] = "evdivwuRRR", [1224] = "evaddumiaawRR", [1225] = "evaddsmiaawRR", [1226] = "evsubfumiaawRR", [1227] = "evsubfsmiaawRR", [1280] = "evmheusiaawRRR", [1281] = "evmhessiaawRRR", [1283] = "evmhessfaawRRR", [1284] = "evmhousiaawRRR", [1285] = "evmhossiaawRRR", [1287] = "evmhossfaawRRR", [1288] = "evmheumiaawRRR", [1289] = "evmhesmiaawRRR", [1291] = "evmhesmfaawRRR", [1292] = "evmhoumiaawRRR", [1293] = "evmhosmiaawRRR", [1295] = "evmhosmfaawRRR", [1320] = "evmhegumiaaRRR", [1321] = "evmhegsmiaaRRR", [1323] = "evmhegsmfaaRRR", [1324] = "evmhogumiaaRRR", [1325] = "evmhogsmiaaRRR", [1327] = "evmhogsmfaaRRR", [1344] = "evmwlusiaawRRR", [1345] = "evmwlssiaawRRR", [1352] = "evmwlumiaawRRR", [1353] = "evmwlsmiaawRRR", [1363] = "evmwssfaaRRR", [1368] = "evmwumiaaRRR", [1369] = "evmwsmiaaRRR", [1371] = "evmwsmfaaRRR", [1408] = "evmheusianwRRR", [1409] = "evmhessianwRRR", [1411] = "evmhessfanwRRR", [1412] = "evmhousianwRRR", [1413] = "evmhossianwRRR", [1415] = "evmhossfanwRRR", [1416] = "evmheumianwRRR", [1417] = "evmhesmianwRRR", [1419] = "evmhesmfanwRRR", [1420] = "evmhoumianwRRR", [1421] = "evmhosmianwRRR", [1423] = "evmhosmfanwRRR", [1448] = "evmhegumianRRR", [1449] = "evmhegsmianRRR", [1451] = "evmhegsmfanRRR", [1452] = "evmhogumianRRR", [1453] = "evmhogsmianRRR", [1455] = "evmhogsmfanRRR", [1472] = "evmwlusianwRRR", [1473] = "evmwlssianwRRR", [1480] = "evmwlumianwRRR", [1481] = "evmwlsmianwRRR", [1491] = "evmwssfanRRR", [1496] = "evmwumianRRR", [1497] = "evmwsmianRRR", [1499] = "evmwsmfanRRR", } local map_pri = { [0] = false, false, "tdiARI", "twiARI", map_spe, false, false, "mulliRRI", "subficRRI", false, "cmpl_iYLRU", "cmp_iYLRI", "addicRRI", "addic.RRI", "addi|liRR0I", "addis|lisRR0I", "b_KBJ", "sc", "bKJ", map_crops, "rlwimiRR~AAA.", map_rlwinm, false, "rlwnmRR~RAA.", "oriNRR~U", "orisRR~U", "xoriRR~U", "xorisRR~U", "andi.RR~U", "andis.RR~U", map_rld, map_ext, "lwzRRD", "lwzuRRD", "lbzRRD", "lbzuRRD", "stwRRD", "stwuRRD", "stbRRD", "stbuRRD", "lhzRRD", "lhzuRRD", "lhaRRD", "lhauRRD", "sthRRD", "sthuRRD", "lmwRRD", "stmwRRD", "lfsFRD", "lfsuFRD", "lfdFRD", "lfduFRD", "stfsFRD", "stfsuFRD", "stfdFRD", "stfduFRD", false, false, map_ld, map_fps, false, false, map_std, map_fpd, } ------------------------------------------------------------------------------ local map_gpr = { [0] = "r0", "sp", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", } local map_cond = { [0] = "lt", "gt", "eq", "so", "ge", "le", "ne", "ns", } -- Format a condition bit. local function condfmt(cond) if cond <= 3 then return map_cond[band(cond, 3)] else return format("4*cr%d+%s", rshift(cond, 2), map_cond[band(cond, 3)]) end end ------------------------------------------------------------------------------ -- Output a nicely formatted line with an opcode and operands. local function putop(ctx, text, operands) local pos = ctx.pos local extra = "" if ctx.rel then local sym = ctx.symtab[ctx.rel] if sym then extra = "\t->"..sym end end if ctx.hexdump > 0 then ctx.out(format("%08x %s %-7s %s%s\n", ctx.addr+pos, tohex(ctx.op), text, concat(operands, ", "), extra)) else ctx.out(format("%08x %-7s %s%s\n", ctx.addr+pos, text, concat(operands, ", "), extra)) end ctx.pos = pos + 4 end -- Fallback for unknown opcodes. local function unknown(ctx) return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) end -- Disassemble a single instruction. local function disass_ins(ctx) local pos = ctx.pos local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) local op = bor(lshift(b0, 24), lshift(b1, 16), lshift(b2, 8), b3) local operands = {} local last = nil local rs = 21 ctx.op = op ctx.rel = nil local opat = map_pri[rshift(b0, 2)] while type(opat) ~= "string" do if not opat then return unknown(ctx) end opat = opat[band(rshift(op, opat.shift), opat.mask)] end local name, pat = match(opat, "^([a-z0-9_.]*)(.*)") local altname, pat2 = match(pat, "|([a-z0-9_.]*)(.*)") if altname then pat = pat2 end for p in gmatch(pat, ".") do local x = nil if p == "R" then x = map_gpr[band(rshift(op, rs), 31)] rs = rs - 5 elseif p == "F" then x = "f"..band(rshift(op, rs), 31) rs = rs - 5 elseif p == "A" then x = band(rshift(op, rs), 31) rs = rs - 5 elseif p == "S" then x = arshift(lshift(op, 27-rs), 27) rs = rs - 5 elseif p == "I" then x = arshift(lshift(op, 16), 16) elseif p == "U" then x = band(op, 0xffff) elseif p == "D" or p == "E" then local disp = arshift(lshift(op, 16), 16) if p == "E" then disp = band(disp, -4) end if last == "r0" then last = "0" end operands[#operands] = format("%d(%s)", disp, last) elseif p >= "2" and p <= "8" then local disp = band(rshift(op, rs), 31) * p if last == "r0" then last = "0" end operands[#operands] = format("%d(%s)", disp, last) elseif p == "H" then x = band(rshift(op, rs), 31) + lshift(band(op, 2), 4) rs = rs - 5 elseif p == "M" then x = band(rshift(op, rs), 31) + band(op, 0x20) elseif p == "C" then x = condfmt(band(rshift(op, rs), 31)) rs = rs - 5 elseif p == "B" then local bo = rshift(op, 21) local cond = band(rshift(op, 16), 31) local cn = "" rs = rs - 10 if band(bo, 4) == 0 then cn = band(bo, 2) == 0 and "dnz" or "dz" if band(bo, 0x10) == 0 then cn = cn..(band(bo, 8) == 0 and "f" or "t") end if band(bo, 0x10) == 0 then x = condfmt(cond) end name = name..(band(bo, 1) == band(rshift(op, 15), 1) and "-" or "+") elseif band(bo, 0x10) == 0 then cn = map_cond[band(cond, 3) + (band(bo, 8) == 0 and 4 or 0)] if cond > 3 then x = "cr"..rshift(cond, 2) end name = name..(band(bo, 1) == band(rshift(op, 15), 1) and "-" or "+") end name = gsub(name, "_", cn) elseif p == "J" then x = arshift(lshift(op, 27-rs), 29-rs)*4 if band(op, 2) == 0 then x = ctx.addr + pos + x end ctx.rel = x x = "0x"..tohex(x) elseif p == "K" then if band(op, 1) ~= 0 then name = name.."l" end if band(op, 2) ~= 0 then name = name.."a" end elseif p == "X" or p == "Y" then x = band(rshift(op, rs+2), 7) if x == 0 and p == "Y" then x = nil else x = "cr"..x end rs = rs - 5 elseif p == "W" then x = "cr"..band(op, 7) elseif p == "Z" then x = band(rshift(op, rs-4), 255) rs = rs - 10 elseif p == ">" then operands[#operands] = rshift(operands[#operands], 1) elseif p == "0" then if last == "r0" then operands[#operands] = nil if altname then name = altname end end elseif p == "L" then name = gsub(name, "_", band(op, 0x00200000) ~= 0 and "d" or "w") elseif p == "." then if band(op, 1) == 1 then name = name.."." end elseif p == "N" then if op == 0x60000000 then name = "nop"; break end elseif p == "~" then local n = #operands operands[n-1], operands[n] = operands[n], operands[n-1] elseif p == "=" then local n = #operands if last == operands[n-1] then operands[n] = nil name = altname end elseif p == "%" then local n = #operands if last == operands[n-1] and last == operands[n-2] then operands[n] = nil operands[n-1] = nil name = altname end elseif p == "-" then rs = rs - 5 else assert(false) end if x then operands[#operands+1] = x; last = x end end return putop(ctx, name, operands) end ------------------------------------------------------------------------------ -- Disassemble a block of code. local function disass_block(ctx, ofs, len) if not ofs then ofs = 0 end local stop = len and ofs+len or #ctx.code stop = stop - stop % 4 ctx.pos = ofs - ofs % 4 ctx.rel = nil while ctx.pos < stop do disass_ins(ctx) end end -- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). local function create_(code, addr, out) local ctx = {} ctx.code = code ctx.addr = addr or 0 ctx.out = out or io.write ctx.symtab = {} ctx.disass = disass_block ctx.hexdump = 8 return ctx end -- Simple API: disassemble code (a string) at address and output via out. local function disass_(code, addr, out) create_(code, addr, out):disass() end -- Return register name for RID. local function regname_(r) if r < 32 then return map_gpr[r] end return "f"..(r-32) end -- Public module functions. module(...) create = create_ disass = disass_ regname = regname_ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/.gitignore0000664000000000000000000000001212202141143023125 0ustar rootrootvmdef.lua tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/dis_mipsel.lua0000664000000000000000000000130612202141143023777 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT MIPSEL disassembler wrapper module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- This module just exports the little-endian functions from the -- MIPS disassembler module. All the interesting stuff is there. ------------------------------------------------------------------------------ local require = require module(...) local dis_mips = require(_PACKAGE.."dis_mips") create = dis_mips.create_el disass = dis_mips.disass_el regname = dis_mips.regname tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/dis_x64.lua0000664000000000000000000000130312202141143023124 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT x64 disassembler wrapper module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- This module just exports the 64 bit functions from the combined -- x86/x64 disassembler module. All the interesting stuff is there. ------------------------------------------------------------------------------ local require = require module(...) local dis_x86 = require(_PACKAGE.."dis_x86") create = dis_x86.create64 disass = dis_x86.disass64 regname = dis_x86.regname64 tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/dis_arm.lua0000664000000000000000000004564412202141143023302 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT ARM disassembler module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- This is a helper module used by the LuaJIT machine code dumper module. -- -- It disassembles most user-mode ARMv7 instructions -- NYI: Advanced SIMD and VFP instructions. ------------------------------------------------------------------------------ local type = type local sub, byte, format = string.sub, string.byte, string.format local match, gmatch, gsub = string.match, string.gmatch, string.gsub local concat = table.concat local bit = require("bit") local band, bor, ror, tohex = bit.band, bit.bor, bit.ror, bit.tohex local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift ------------------------------------------------------------------------------ -- Opcode maps ------------------------------------------------------------------------------ local map_loadc = { shift = 8, mask = 15, [10] = { shift = 20, mask = 1, [0] = { shift = 23, mask = 3, [0] = "vmovFmDN", "vstmFNdr", _ = { shift = 21, mask = 1, [0] = "vstrFdl", { shift = 16, mask = 15, [13] = "vpushFdr", _ = "vstmdbFNdr", } }, }, { shift = 23, mask = 3, [0] = "vmovFDNm", { shift = 16, mask = 15, [13] = "vpopFdr", _ = "vldmFNdr", }, _ = { shift = 21, mask = 1, [0] = "vldrFdl", "vldmdbFNdr", }, }, }, [11] = { shift = 20, mask = 1, [0] = { shift = 23, mask = 3, [0] = "vmovGmDN", "vstmGNdr", _ = { shift = 21, mask = 1, [0] = "vstrGdl", { shift = 16, mask = 15, [13] = "vpushGdr", _ = "vstmdbGNdr", } }, }, { shift = 23, mask = 3, [0] = "vmovGDNm", { shift = 16, mask = 15, [13] = "vpopGdr", _ = "vldmGNdr", }, _ = { shift = 21, mask = 1, [0] = "vldrGdl", "vldmdbGNdr", }, }, }, _ = { shift = 0, mask = 0 -- NYI ldc, mcrr, mrrc. }, } local map_vfps = { shift = 6, mask = 0x2c001, [0] = "vmlaF.dnm", "vmlsF.dnm", [0x04000] = "vnmlsF.dnm", [0x04001] = "vnmlaF.dnm", [0x08000] = "vmulF.dnm", [0x08001] = "vnmulF.dnm", [0x0c000] = "vaddF.dnm", [0x0c001] = "vsubF.dnm", [0x20000] = "vdivF.dnm", [0x24000] = "vfnmsF.dnm", [0x24001] = "vfnmaF.dnm", [0x28000] = "vfmaF.dnm", [0x28001] = "vfmsF.dnm", [0x2c000] = "vmovF.dY", [0x2c001] = { shift = 7, mask = 0x1e01, [0] = "vmovF.dm", "vabsF.dm", [0x0200] = "vnegF.dm", [0x0201] = "vsqrtF.dm", [0x0800] = "vcmpF.dm", [0x0801] = "vcmpeF.dm", [0x0a00] = "vcmpzF.d", [0x0a01] = "vcmpzeF.d", [0x0e01] = "vcvtG.dF.m", [0x1000] = "vcvt.f32.u32Fdm", [0x1001] = "vcvt.f32.s32Fdm", [0x1800] = "vcvtr.u32F.dm", [0x1801] = "vcvt.u32F.dm", [0x1a00] = "vcvtr.s32F.dm", [0x1a01] = "vcvt.s32F.dm", }, } local map_vfpd = { shift = 6, mask = 0x2c001, [0] = "vmlaG.dnm", "vmlsG.dnm", [0x04000] = "vnmlsG.dnm", [0x04001] = "vnmlaG.dnm", [0x08000] = "vmulG.dnm", [0x08001] = "vnmulG.dnm", [0x0c000] = "vaddG.dnm", [0x0c001] = "vsubG.dnm", [0x20000] = "vdivG.dnm", [0x24000] = "vfnmsG.dnm", [0x24001] = "vfnmaG.dnm", [0x28000] = "vfmaG.dnm", [0x28001] = "vfmsG.dnm", [0x2c000] = "vmovG.dY", [0x2c001] = { shift = 7, mask = 0x1e01, [0] = "vmovG.dm", "vabsG.dm", [0x0200] = "vnegG.dm", [0x0201] = "vsqrtG.dm", [0x0800] = "vcmpG.dm", [0x0801] = "vcmpeG.dm", [0x0a00] = "vcmpzG.d", [0x0a01] = "vcmpzeG.d", [0x0e01] = "vcvtF.dG.m", [0x1000] = "vcvt.f64.u32GdFm", [0x1001] = "vcvt.f64.s32GdFm", [0x1800] = "vcvtr.u32FdG.m", [0x1801] = "vcvt.u32FdG.m", [0x1a00] = "vcvtr.s32FdG.m", [0x1a01] = "vcvt.s32FdG.m", }, } local map_datac = { shift = 24, mask = 1, [0] = { shift = 4, mask = 1, [0] = { shift = 8, mask = 15, [10] = map_vfps, [11] = map_vfpd, -- NYI cdp, mcr, mrc. }, { shift = 8, mask = 15, [10] = { shift = 20, mask = 15, [0] = "vmovFnD", "vmovFDn", [14] = "vmsrD", [15] = { shift = 12, mask = 15, [15] = "vmrs", _ = "vmrsD", }, }, }, }, "svcT", } local map_loadcu = { shift = 0, mask = 0, -- NYI unconditional CP load/store. } local map_datacu = { shift = 0, mask = 0, -- NYI unconditional CP data. } local map_simddata = { shift = 0, mask = 0, -- NYI SIMD data. } local map_simdload = { shift = 0, mask = 0, -- NYI SIMD load/store, preload. } local map_preload = { shift = 0, mask = 0, -- NYI preload. } local map_media = { shift = 20, mask = 31, [0] = false, { --01 shift = 5, mask = 7, [0] = "sadd16DNM", "sasxDNM", "ssaxDNM", "ssub16DNM", "sadd8DNM", false, false, "ssub8DNM", }, { --02 shift = 5, mask = 7, [0] = "qadd16DNM", "qasxDNM", "qsaxDNM", "qsub16DNM", "qadd8DNM", false, false, "qsub8DNM", }, { --03 shift = 5, mask = 7, [0] = "shadd16DNM", "shasxDNM", "shsaxDNM", "shsub16DNM", "shadd8DNM", false, false, "shsub8DNM", }, false, { --05 shift = 5, mask = 7, [0] = "uadd16DNM", "uasxDNM", "usaxDNM", "usub16DNM", "uadd8DNM", false, false, "usub8DNM", }, { --06 shift = 5, mask = 7, [0] = "uqadd16DNM", "uqasxDNM", "uqsaxDNM", "uqsub16DNM", "uqadd8DNM", false, false, "uqsub8DNM", }, { --07 shift = 5, mask = 7, [0] = "uhadd16DNM", "uhasxDNM", "uhsaxDNM", "uhsub16DNM", "uhadd8DNM", false, false, "uhsub8DNM", }, { --08 shift = 5, mask = 7, [0] = "pkhbtDNMU", false, "pkhtbDNMU", { shift = 16, mask = 15, [15] = "sxtb16DMU", _ = "sxtab16DNMU", }, "pkhbtDNMU", "selDNM", "pkhtbDNMU", }, false, { --0a shift = 5, mask = 7, [0] = "ssatDxMu", "ssat16DxM", "ssatDxMu", { shift = 16, mask = 15, [15] = "sxtbDMU", _ = "sxtabDNMU", }, "ssatDxMu", false, "ssatDxMu", }, { --0b shift = 5, mask = 7, [0] = "ssatDxMu", "revDM", "ssatDxMu", { shift = 16, mask = 15, [15] = "sxthDMU", _ = "sxtahDNMU", }, "ssatDxMu", "rev16DM", "ssatDxMu", }, { --0c shift = 5, mask = 7, [3] = { shift = 16, mask = 15, [15] = "uxtb16DMU", _ = "uxtab16DNMU", }, }, false, { --0e shift = 5, mask = 7, [0] = "usatDwMu", "usat16DwM", "usatDwMu", { shift = 16, mask = 15, [15] = "uxtbDMU", _ = "uxtabDNMU", }, "usatDwMu", false, "usatDwMu", }, { --0f shift = 5, mask = 7, [0] = "usatDwMu", "rbitDM", "usatDwMu", { shift = 16, mask = 15, [15] = "uxthDMU", _ = "uxtahDNMU", }, "usatDwMu", "revshDM", "usatDwMu", }, { --10 shift = 12, mask = 15, [15] = { shift = 5, mask = 7, "smuadNMS", "smuadxNMS", "smusdNMS", "smusdxNMS", }, _ = { shift = 5, mask = 7, [0] = "smladNMSD", "smladxNMSD", "smlsdNMSD", "smlsdxNMSD", }, }, false, false, false, { --14 shift = 5, mask = 7, [0] = "smlaldDNMS", "smlaldxDNMS", "smlsldDNMS", "smlsldxDNMS", }, { --15 shift = 5, mask = 7, [0] = { shift = 12, mask = 15, [15] = "smmulNMS", _ = "smmlaNMSD", }, { shift = 12, mask = 15, [15] = "smmulrNMS", _ = "smmlarNMSD", }, false, false, false, false, "smmlsNMSD", "smmlsrNMSD", }, false, false, { --18 shift = 5, mask = 7, [0] = { shift = 12, mask = 15, [15] = "usad8NMS", _ = "usada8NMSD", }, }, false, { --1a shift = 5, mask = 3, [2] = "sbfxDMvw", }, { --1b shift = 5, mask = 3, [2] = "sbfxDMvw", }, { --1c shift = 5, mask = 3, [0] = { shift = 0, mask = 15, [15] = "bfcDvX", _ = "bfiDMvX", }, }, { --1d shift = 5, mask = 3, [0] = { shift = 0, mask = 15, [15] = "bfcDvX", _ = "bfiDMvX", }, }, { --1e shift = 5, mask = 3, [2] = "ubfxDMvw", }, { --1f shift = 5, mask = 3, [2] = "ubfxDMvw", }, } local map_load = { shift = 21, mask = 9, { shift = 20, mask = 5, [0] = "strtDL", "ldrtDL", [4] = "strbtDL", [5] = "ldrbtDL", }, _ = { shift = 20, mask = 5, [0] = "strDL", "ldrDL", [4] = "strbDL", [5] = "ldrbDL", } } local map_load1 = { shift = 4, mask = 1, [0] = map_load, map_media, } local map_loadm = { shift = 20, mask = 1, [0] = { shift = 23, mask = 3, [0] = "stmdaNR", "stmNR", { shift = 16, mask = 63, [45] = "pushR", _ = "stmdbNR", }, "stmibNR", }, { shift = 23, mask = 3, [0] = "ldmdaNR", { shift = 16, mask = 63, [61] = "popR", _ = "ldmNR", }, "ldmdbNR", "ldmibNR", }, } local map_data = { shift = 21, mask = 15, [0] = "andDNPs", "eorDNPs", "subDNPs", "rsbDNPs", "addDNPs", "adcDNPs", "sbcDNPs", "rscDNPs", "tstNP", "teqNP", "cmpNP", "cmnNP", "orrDNPs", "movDPs", "bicDNPs", "mvnDPs", } local map_mul = { shift = 21, mask = 7, [0] = "mulNMSs", "mlaNMSDs", "umaalDNMS", "mlsDNMS", "umullDNMSs", "umlalDNMSs", "smullDNMSs", "smlalDNMSs", } local map_sync = { shift = 20, mask = 15, -- NYI: brackets around N. R(D+1) for ldrexd/strexd. [0] = "swpDMN", false, false, false, "swpbDMN", false, false, false, "strexDMN", "ldrexDN", "strexdDN", "ldrexdDN", "strexbDMN", "ldrexbDN", "strexhDN", "ldrexhDN", } local map_mulh = { shift = 21, mask = 3, [0] = { shift = 5, mask = 3, [0] = "smlabbNMSD", "smlatbNMSD", "smlabtNMSD", "smlattNMSD", }, { shift = 5, mask = 3, [0] = "smlawbNMSD", "smulwbNMS", "smlawtNMSD", "smulwtNMS", }, { shift = 5, mask = 3, [0] = "smlalbbDNMS", "smlaltbDNMS", "smlalbtDNMS", "smlalttDNMS", }, { shift = 5, mask = 3, [0] = "smulbbNMS", "smultbNMS", "smulbtNMS", "smulttNMS", }, } local map_misc = { shift = 4, mask = 7, -- NYI: decode PSR bits of msr. [0] = { shift = 21, mask = 1, [0] = "mrsD", "msrM", }, { shift = 21, mask = 3, "bxM", false, "clzDM", }, { shift = 21, mask = 3, "bxjM", }, { shift = 21, mask = 3, "blxM", }, false, { shift = 21, mask = 3, [0] = "qaddDMN", "qsubDMN", "qdaddDMN", "qdsubDMN", }, false, { shift = 21, mask = 3, "bkptK", }, } local map_datar = { shift = 4, mask = 9, [9] = { shift = 5, mask = 3, [0] = { shift = 24, mask = 1, [0] = map_mul, map_sync, }, { shift = 20, mask = 1, [0] = "strhDL", "ldrhDL", }, { shift = 20, mask = 1, [0] = "ldrdDL", "ldrsbDL", }, { shift = 20, mask = 1, [0] = "strdDL", "ldrshDL", }, }, _ = { shift = 20, mask = 25, [16] = { shift = 7, mask = 1, [0] = map_misc, map_mulh, }, _ = { shift = 0, mask = 0xffffffff, [bor(0xe1a00000)] = "nop", _ = map_data, } }, } local map_datai = { shift = 20, mask = 31, -- NYI: decode PSR bits of msr. Decode imm12. [16] = "movwDW", [20] = "movtDW", [18] = { shift = 0, mask = 0xf00ff, [0] = "nopv6", _ = "msrNW", }, [22] = "msrNW", _ = map_data, } local map_branch = { shift = 24, mask = 1, [0] = "bB", "blB" } local map_condins = { [0] = map_datar, map_datai, map_load, map_load1, map_loadm, map_branch, map_loadc, map_datac } -- NYI: setend. local map_uncondins = { [0] = false, map_simddata, map_simdload, map_preload, false, "blxB", map_loadcu, map_datacu, } ------------------------------------------------------------------------------ local map_gpr = { [0] = "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc", } local map_cond = { [0] = "eq", "ne", "hs", "lo", "mi", "pl", "vs", "vc", "hi", "ls", "ge", "lt", "gt", "le", "al", } local map_shift = { [0] = "lsl", "lsr", "asr", "ror", } ------------------------------------------------------------------------------ -- Output a nicely formatted line with an opcode and operands. local function putop(ctx, text, operands) local pos = ctx.pos local extra = "" if ctx.rel then local sym = ctx.symtab[ctx.rel] if sym then extra = "\t->"..sym elseif band(ctx.op, 0x0e000000) ~= 0x0a000000 then extra = "\t; 0x"..tohex(ctx.rel) end end if ctx.hexdump > 0 then ctx.out(format("%08x %s %-5s %s%s\n", ctx.addr+pos, tohex(ctx.op), text, concat(operands, ", "), extra)) else ctx.out(format("%08x %-5s %s%s\n", ctx.addr+pos, text, concat(operands, ", "), extra)) end ctx.pos = pos + 4 end -- Fallback for unknown opcodes. local function unknown(ctx) return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) end -- Format operand 2 of load/store opcodes. local function fmtload(ctx, op, pos) local base = map_gpr[band(rshift(op, 16), 15)] local x, ofs local ext = (band(op, 0x04000000) == 0) if not ext and band(op, 0x02000000) == 0 then ofs = band(op, 4095) if band(op, 0x00800000) == 0 then ofs = -ofs end if base == "pc" then ctx.rel = ctx.addr + pos + 8 + ofs end ofs = "#"..ofs elseif ext and band(op, 0x00400000) ~= 0 then ofs = band(op, 15) + band(rshift(op, 4), 0xf0) if band(op, 0x00800000) == 0 then ofs = -ofs end if base == "pc" then ctx.rel = ctx.addr + pos + 8 + ofs end ofs = "#"..ofs else ofs = map_gpr[band(op, 15)] if ext or band(op, 0xfe0) == 0 then elseif band(op, 0xfe0) == 0x60 then ofs = format("%s, rrx", ofs) else local sh = band(rshift(op, 7), 31) if sh == 0 then sh = 32 end ofs = format("%s, %s #%d", ofs, map_shift[band(rshift(op, 5), 3)], sh) end if band(op, 0x00800000) == 0 then ofs = "-"..ofs end end if ofs == "#0" then x = format("[%s]", base) elseif band(op, 0x01000000) == 0 then x = format("[%s], %s", base, ofs) else x = format("[%s, %s]", base, ofs) end if band(op, 0x01200000) == 0x01200000 then x = x.."!" end return x end -- Format operand 2 of vector load/store opcodes. local function fmtvload(ctx, op, pos) local base = map_gpr[band(rshift(op, 16), 15)] local ofs = band(op, 255)*4 if band(op, 0x00800000) == 0 then ofs = -ofs end if base == "pc" then ctx.rel = ctx.addr + pos + 8 + ofs end if ofs == 0 then return format("[%s]", base) else return format("[%s, #%d]", base, ofs) end end local function fmtvr(op, vr, sh0, sh1) if vr == "s" then return format("s%d", 2*band(rshift(op, sh0), 15)+band(rshift(op, sh1), 1)) else return format("d%d", band(rshift(op, sh0), 15)+band(rshift(op, sh1-4), 16)) end end -- Disassemble a single instruction. local function disass_ins(ctx) local pos = ctx.pos local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) local op = bor(lshift(b3, 24), lshift(b2, 16), lshift(b1, 8), b0) local operands = {} local suffix = "" local last, name, pat local vr ctx.op = op ctx.rel = nil local cond = rshift(op, 28) local opat if cond == 15 then opat = map_uncondins[band(rshift(op, 25), 7)] else if cond ~= 14 then suffix = map_cond[cond] end opat = map_condins[band(rshift(op, 25), 7)] end while type(opat) ~= "string" do if not opat then return unknown(ctx) end opat = opat[band(rshift(op, opat.shift), opat.mask)] or opat._ end name, pat = match(opat, "^([a-z0-9]*)(.*)") if sub(pat, 1, 1) == "." then local s2, p2 = match(pat, "^([a-z0-9.]*)(.*)") suffix = suffix..s2 pat = p2 end for p in gmatch(pat, ".") do local x = nil if p == "D" then x = map_gpr[band(rshift(op, 12), 15)] elseif p == "N" then x = map_gpr[band(rshift(op, 16), 15)] elseif p == "S" then x = map_gpr[band(rshift(op, 8), 15)] elseif p == "M" then x = map_gpr[band(op, 15)] elseif p == "d" then x = fmtvr(op, vr, 12, 22) elseif p == "n" then x = fmtvr(op, vr, 16, 7) elseif p == "m" then x = fmtvr(op, vr, 0, 5) elseif p == "P" then if band(op, 0x02000000) ~= 0 then x = ror(band(op, 255), 2*band(rshift(op, 8), 15)) else x = map_gpr[band(op, 15)] if band(op, 0xff0) ~= 0 then operands[#operands+1] = x local s = map_shift[band(rshift(op, 5), 3)] local r = nil if band(op, 0xf90) == 0 then if s == "ror" then s = "rrx" else r = "#32" end elseif band(op, 0x10) == 0 then r = "#"..band(rshift(op, 7), 31) else r = map_gpr[band(rshift(op, 8), 15)] end if name == "mov" then name = s; x = r elseif r then x = format("%s %s", s, r) else x = s end end end elseif p == "L" then x = fmtload(ctx, op, pos) elseif p == "l" then x = fmtvload(ctx, op, pos) elseif p == "B" then local addr = ctx.addr + pos + 8 + arshift(lshift(op, 8), 6) if cond == 15 then addr = addr + band(rshift(op, 23), 2) end ctx.rel = addr x = "0x"..tohex(addr) elseif p == "F" then vr = "s" elseif p == "G" then vr = "d" elseif p == "." then suffix = suffix..(vr == "s" and ".f32" or ".f64") elseif p == "R" then if band(op, 0x00200000) ~= 0 and #operands == 1 then operands[1] = operands[1].."!" end local t = {} for i=0,15 do if band(rshift(op, i), 1) == 1 then t[#t+1] = map_gpr[i] end end x = "{"..concat(t, ", ").."}" elseif p == "r" then if band(op, 0x00200000) ~= 0 and #operands == 2 then operands[1] = operands[1].."!" end local s = tonumber(sub(last, 2)) local n = band(op, 255) if vr == "d" then n = rshift(n, 1) end operands[#operands] = format("{%s-%s%d}", last, vr, s+n-1) elseif p == "W" then x = band(op, 0x0fff) + band(rshift(op, 4), 0xf000) elseif p == "T" then x = "#0x"..tohex(band(op, 0x00ffffff), 6) elseif p == "U" then x = band(rshift(op, 7), 31) if x == 0 then x = nil end elseif p == "u" then x = band(rshift(op, 7), 31) if band(op, 0x40) == 0 then if x == 0 then x = nil else x = "lsl #"..x end else if x == 0 then x = "asr #32" else x = "asr #"..x end end elseif p == "v" then x = band(rshift(op, 7), 31) elseif p == "w" then x = band(rshift(op, 16), 31) elseif p == "x" then x = band(rshift(op, 16), 31) + 1 elseif p == "X" then x = band(rshift(op, 16), 31) - last + 1 elseif p == "Y" then x = band(rshift(op, 12), 0xf0) + band(op, 0x0f) elseif p == "K" then x = "#0x"..tohex(band(rshift(op, 4), 0x0000fff0) + band(op, 15), 4) elseif p == "s" then if band(op, 0x00100000) ~= 0 then suffix = "s"..suffix end else assert(false) end if x then last = x if type(x) == "number" then x = "#"..x end operands[#operands+1] = x end end return putop(ctx, name..suffix, operands) end ------------------------------------------------------------------------------ -- Disassemble a block of code. local function disass_block(ctx, ofs, len) if not ofs then ofs = 0 end local stop = len and ofs+len or #ctx.code ctx.pos = ofs ctx.rel = nil while ctx.pos < stop do disass_ins(ctx) end end -- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). local function create_(code, addr, out) local ctx = {} ctx.code = code ctx.addr = addr or 0 ctx.out = out or io.write ctx.symtab = {} ctx.disass = disass_block ctx.hexdump = 8 return ctx end -- Simple API: disassemble code (a string) at address and output via out. local function disass_(code, addr, out) create_(code, addr, out):disass() end -- Return register name for RID. local function regname_(r) if r < 16 then return map_gpr[r] end return "d"..(r-16) end -- Public module functions. module(...) create = create_ disass = disass_ regname = regname_ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/bcsave.lua0000664000000000000000000004331312202141143023116 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT module to save/list bytecode. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This module saves or lists the bytecode for an input file. -- It's run by the -b command line option. -- ------------------------------------------------------------------------------ local jit = require("jit") assert(jit.version_num == 20002, "LuaJIT core/library version mismatch") local bit = require("bit") -- Symbol name prefix for LuaJIT bytecode. local LJBC_PREFIX = "luaJIT_BC_" ------------------------------------------------------------------------------ local function usage() io.stderr:write[[ Save LuaJIT bytecode: luajit -b[options] input output -l Only list bytecode. -s Strip debug info (default). -g Keep debug info. -n name Set module name (default: auto-detect from input name). -t type Set output file type (default: auto-detect from output name). -a arch Override architecture for object files (default: native). -o os Override OS for object files (default: native). -e chunk Use chunk string as input. -- Stop handling options. - Use stdin as input and/or stdout as output. File types: c h obj o raw (default) ]] os.exit(1) end local function check(ok, ...) if ok then return ok, ... end io.stderr:write("luajit: ", ...) io.stderr:write("\n") os.exit(1) end local function readfile(input) if type(input) == "function" then return input end if input == "-" then input = nil end return check(loadfile(input)) end local function savefile(name, mode) if name == "-" then return io.stdout end return check(io.open(name, mode)) end ------------------------------------------------------------------------------ local map_type = { raw = "raw", c = "c", h = "h", o = "obj", obj = "obj", } local map_arch = { x86 = true, x64 = true, arm = true, ppc = true, ppcspe = true, mips = true, mipsel = true, } local map_os = { linux = true, windows = true, osx = true, freebsd = true, netbsd = true, openbsd = true, solaris = true, } local function checkarg(str, map, err) str = string.lower(str) local s = check(map[str], "unknown ", err) return s == true and str or s end local function detecttype(str) local ext = string.match(string.lower(str), "%.(%a+)$") return map_type[ext] or "raw" end local function checkmodname(str) check(string.match(str, "^[%w_.%-]+$"), "bad module name") return string.gsub(str, "[%.%-]", "_") end local function detectmodname(str) if type(str) == "string" then local tail = string.match(str, "[^/\\]+$") if tail then str = tail end local head = string.match(str, "^(.*)%.[^.]*$") if head then str = head end str = string.match(str, "^[%w_.%-]+") else str = nil end check(str, "cannot derive module name, use -n name") return string.gsub(str, "[%.%-]", "_") end ------------------------------------------------------------------------------ local function bcsave_tail(fp, output, s) local ok, err = fp:write(s) if ok and output ~= "-" then ok, err = fp:close() end check(ok, "cannot write ", output, ": ", err) end local function bcsave_raw(output, s) local fp = savefile(output, "wb") bcsave_tail(fp, output, s) end local function bcsave_c(ctx, output, s) local fp = savefile(output, "w") if ctx.type == "c" then fp:write(string.format([[ #ifdef _cplusplus extern "C" #endif #ifdef _WIN32 __declspec(dllexport) #endif const char %s%s[] = { ]], LJBC_PREFIX, ctx.modname)) else fp:write(string.format([[ #define %s%s_SIZE %d static const char %s%s[] = { ]], LJBC_PREFIX, ctx.modname, #s, LJBC_PREFIX, ctx.modname)) end local t, n, m = {}, 0, 0 for i=1,#s do local b = tostring(string.byte(s, i)) m = m + #b + 1 if m > 78 then fp:write(table.concat(t, ",", 1, n), ",\n") n, m = 0, #b + 1 end n = n + 1 t[n] = b end bcsave_tail(fp, output, table.concat(t, ",", 1, n).."\n};\n") end local function bcsave_elfobj(ctx, output, s, ffi) ffi.cdef[[ typedef struct { uint8_t emagic[4], eclass, eendian, eversion, eosabi, eabiversion, epad[7]; uint16_t type, machine; uint32_t version; uint32_t entry, phofs, shofs; uint32_t flags; uint16_t ehsize, phentsize, phnum, shentsize, shnum, shstridx; } ELF32header; typedef struct { uint8_t emagic[4], eclass, eendian, eversion, eosabi, eabiversion, epad[7]; uint16_t type, machine; uint32_t version; uint64_t entry, phofs, shofs; uint32_t flags; uint16_t ehsize, phentsize, phnum, shentsize, shnum, shstridx; } ELF64header; typedef struct { uint32_t name, type, flags, addr, ofs, size, link, info, align, entsize; } ELF32sectheader; typedef struct { uint32_t name, type; uint64_t flags, addr, ofs, size; uint32_t link, info; uint64_t align, entsize; } ELF64sectheader; typedef struct { uint32_t name, value, size; uint8_t info, other; uint16_t sectidx; } ELF32symbol; typedef struct { uint32_t name; uint8_t info, other; uint16_t sectidx; uint64_t value, size; } ELF64symbol; typedef struct { ELF32header hdr; ELF32sectheader sect[6]; ELF32symbol sym[2]; uint8_t space[4096]; } ELF32obj; typedef struct { ELF64header hdr; ELF64sectheader sect[6]; ELF64symbol sym[2]; uint8_t space[4096]; } ELF64obj; ]] local symname = LJBC_PREFIX..ctx.modname local is64, isbe = false, false if ctx.arch == "x64" then is64 = true elseif ctx.arch == "ppc" or ctx.arch == "ppcspe" or ctx.arch == "mips" then isbe = true end -- Handle different host/target endianess. local function f32(x) return x end local f16, fofs = f32, f32 if ffi.abi("be") ~= isbe then f32 = bit.bswap function f16(x) return bit.rshift(bit.bswap(x), 16) end if is64 then local two32 = ffi.cast("int64_t", 2^32) function fofs(x) return bit.bswap(x)*two32 end else fofs = f32 end end -- Create ELF object and fill in header. local o = ffi.new(is64 and "ELF64obj" or "ELF32obj") local hdr = o.hdr if ctx.os == "bsd" or ctx.os == "other" then -- Determine native hdr.eosabi. local bf = assert(io.open("/bin/ls", "rb")) local bs = bf:read(9) bf:close() ffi.copy(o, bs, 9) check(hdr.emagic[0] == 127, "no support for writing native object files") else hdr.emagic = "\127ELF" hdr.eosabi = ({ freebsd=9, netbsd=2, openbsd=12, solaris=6 })[ctx.os] or 0 end hdr.eclass = is64 and 2 or 1 hdr.eendian = isbe and 2 or 1 hdr.eversion = 1 hdr.type = f16(1) hdr.machine = f16(({ x86=3, x64=62, arm=40, ppc=20, ppcspe=20, mips=8, mipsel=8 })[ctx.arch]) if ctx.arch == "mips" or ctx.arch == "mipsel" then hdr.flags = 0x50001006 end hdr.version = f32(1) hdr.shofs = fofs(ffi.offsetof(o, "sect")) hdr.ehsize = f16(ffi.sizeof(hdr)) hdr.shentsize = f16(ffi.sizeof(o.sect[0])) hdr.shnum = f16(6) hdr.shstridx = f16(2) -- Fill in sections and symbols. local sofs, ofs = ffi.offsetof(o, "space"), 1 for i,name in ipairs{ ".symtab", ".shstrtab", ".strtab", ".rodata", ".note.GNU-stack", } do local sect = o.sect[i] sect.align = fofs(1) sect.name = f32(ofs) ffi.copy(o.space+ofs, name) ofs = ofs + #name+1 end o.sect[1].type = f32(2) -- .symtab o.sect[1].link = f32(3) o.sect[1].info = f32(1) o.sect[1].align = fofs(8) o.sect[1].ofs = fofs(ffi.offsetof(o, "sym")) o.sect[1].entsize = fofs(ffi.sizeof(o.sym[0])) o.sect[1].size = fofs(ffi.sizeof(o.sym)) o.sym[1].name = f32(1) o.sym[1].sectidx = f16(4) o.sym[1].size = fofs(#s) o.sym[1].info = 17 o.sect[2].type = f32(3) -- .shstrtab o.sect[2].ofs = fofs(sofs) o.sect[2].size = fofs(ofs) o.sect[3].type = f32(3) -- .strtab o.sect[3].ofs = fofs(sofs + ofs) o.sect[3].size = fofs(#symname+1) ffi.copy(o.space+ofs+1, symname) ofs = ofs + #symname + 2 o.sect[4].type = f32(1) -- .rodata o.sect[4].flags = fofs(2) o.sect[4].ofs = fofs(sofs + ofs) o.sect[4].size = fofs(#s) o.sect[5].type = f32(1) -- .note.GNU-stack o.sect[5].ofs = fofs(sofs + ofs + #s) -- Write ELF object file. local fp = savefile(output, "wb") fp:write(ffi.string(o, ffi.sizeof(o)-4096+ofs)) bcsave_tail(fp, output, s) end local function bcsave_peobj(ctx, output, s, ffi) ffi.cdef[[ typedef struct { uint16_t arch, nsects; uint32_t time, symtabofs, nsyms; uint16_t opthdrsz, flags; } PEheader; typedef struct { char name[8]; uint32_t vsize, vaddr, size, ofs, relocofs, lineofs; uint16_t nreloc, nline; uint32_t flags; } PEsection; typedef struct __attribute((packed)) { union { char name[8]; uint32_t nameref[2]; }; uint32_t value; int16_t sect; uint16_t type; uint8_t scl, naux; } PEsym; typedef struct __attribute((packed)) { uint32_t size; uint16_t nreloc, nline; uint32_t cksum; uint16_t assoc; uint8_t comdatsel, unused[3]; } PEsymaux; typedef struct { PEheader hdr; PEsection sect[2]; // Must be an even number of symbol structs. PEsym sym0; PEsymaux sym0aux; PEsym sym1; PEsymaux sym1aux; PEsym sym2; PEsym sym3; uint32_t strtabsize; uint8_t space[4096]; } PEobj; ]] local symname = LJBC_PREFIX..ctx.modname local is64 = false if ctx.arch == "x86" then symname = "_"..symname elseif ctx.arch == "x64" then is64 = true end local symexport = " /EXPORT:"..symname..",DATA " -- The file format is always little-endian. Swap if the host is big-endian. local function f32(x) return x end local f16 = f32 if ffi.abi("be") then f32 = bit.bswap function f16(x) return bit.rshift(bit.bswap(x), 16) end end -- Create PE object and fill in header. local o = ffi.new("PEobj") local hdr = o.hdr hdr.arch = f16(({ x86=0x14c, x64=0x8664, arm=0x1c0, ppc=0x1f2, mips=0x366, mipsel=0x366 })[ctx.arch]) hdr.nsects = f16(2) hdr.symtabofs = f32(ffi.offsetof(o, "sym0")) hdr.nsyms = f32(6) -- Fill in sections and symbols. o.sect[0].name = ".drectve" o.sect[0].size = f32(#symexport) o.sect[0].flags = f32(0x00100a00) o.sym0.sect = f16(1) o.sym0.scl = 3 o.sym0.name = ".drectve" o.sym0.naux = 1 o.sym0aux.size = f32(#symexport) o.sect[1].name = ".rdata" o.sect[1].size = f32(#s) o.sect[1].flags = f32(0x40300040) o.sym1.sect = f16(2) o.sym1.scl = 3 o.sym1.name = ".rdata" o.sym1.naux = 1 o.sym1aux.size = f32(#s) o.sym2.sect = f16(2) o.sym2.scl = 2 o.sym2.nameref[1] = f32(4) o.sym3.sect = f16(-1) o.sym3.scl = 2 o.sym3.value = f32(1) o.sym3.name = "@feat.00" -- Mark as SafeSEH compliant. ffi.copy(o.space, symname) local ofs = #symname + 1 o.strtabsize = f32(ofs + 4) o.sect[0].ofs = f32(ffi.offsetof(o, "space") + ofs) ffi.copy(o.space + ofs, symexport) ofs = ofs + #symexport o.sect[1].ofs = f32(ffi.offsetof(o, "space") + ofs) -- Write PE object file. local fp = savefile(output, "wb") fp:write(ffi.string(o, ffi.sizeof(o)-4096+ofs)) bcsave_tail(fp, output, s) end local function bcsave_machobj(ctx, output, s, ffi) ffi.cdef[[ typedef struct { uint32_t magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags; } mach_header; typedef struct { mach_header; uint32_t reserved; } mach_header_64; typedef struct { uint32_t cmd, cmdsize; char segname[16]; uint32_t vmaddr, vmsize, fileoff, filesize; uint32_t maxprot, initprot, nsects, flags; } mach_segment_command; typedef struct { uint32_t cmd, cmdsize; char segname[16]; uint64_t vmaddr, vmsize, fileoff, filesize; uint32_t maxprot, initprot, nsects, flags; } mach_segment_command_64; typedef struct { char sectname[16], segname[16]; uint32_t addr, size; uint32_t offset, align, reloff, nreloc, flags; uint32_t reserved1, reserved2; } mach_section; typedef struct { char sectname[16], segname[16]; uint64_t addr, size; uint32_t offset, align, reloff, nreloc, flags; uint32_t reserved1, reserved2, reserved3; } mach_section_64; typedef struct { uint32_t cmd, cmdsize, symoff, nsyms, stroff, strsize; } mach_symtab_command; typedef struct { int32_t strx; uint8_t type, sect; int16_t desc; uint32_t value; } mach_nlist; typedef struct { uint32_t strx; uint8_t type, sect; uint16_t desc; uint64_t value; } mach_nlist_64; typedef struct { uint32_t magic, nfat_arch; } mach_fat_header; typedef struct { uint32_t cputype, cpusubtype, offset, size, align; } mach_fat_arch; typedef struct { struct { mach_header hdr; mach_segment_command seg; mach_section sec; mach_symtab_command sym; } arch[1]; mach_nlist sym_entry; uint8_t space[4096]; } mach_obj; typedef struct { struct { mach_header_64 hdr; mach_segment_command_64 seg; mach_section_64 sec; mach_symtab_command sym; } arch[1]; mach_nlist_64 sym_entry; uint8_t space[4096]; } mach_obj_64; typedef struct { mach_fat_header fat; mach_fat_arch fat_arch[4]; struct { mach_header hdr; mach_segment_command seg; mach_section sec; mach_symtab_command sym; } arch[4]; mach_nlist sym_entry; uint8_t space[4096]; } mach_fat_obj; ]] local symname = '_'..LJBC_PREFIX..ctx.modname local isfat, is64, align, mobj = false, false, 4, "mach_obj" if ctx.arch == "x64" then is64, align, mobj = true, 8, "mach_obj_64" elseif ctx.arch == "arm" then isfat, mobj = true, "mach_fat_obj" else check(ctx.arch == "x86", "unsupported architecture for OSX") end local function aligned(v, a) return bit.band(v+a-1, -a) end local be32 = bit.bswap -- Mach-O FAT is BE, supported archs are LE. -- Create Mach-O object and fill in header. local o = ffi.new(mobj) local mach_size = aligned(ffi.offsetof(o, "space")+#symname+2, align) local cputype = ({ x86={7}, x64={0x01000007}, arm={7,12,12,12} })[ctx.arch] local cpusubtype = ({ x86={3}, x64={3}, arm={3,6,9,11} })[ctx.arch] if isfat then o.fat.magic = be32(0xcafebabe) o.fat.nfat_arch = be32(#cpusubtype) end -- Fill in sections and symbols. for i=0,#cpusubtype-1 do local ofs = 0 if isfat then local a = o.fat_arch[i] a.cputype = be32(cputype[i+1]) a.cpusubtype = be32(cpusubtype[i+1]) -- Subsequent slices overlap each other to share data. ofs = ffi.offsetof(o, "arch") + i*ffi.sizeof(o.arch[0]) a.offset = be32(ofs) a.size = be32(mach_size-ofs+#s) end local a = o.arch[i] a.hdr.magic = is64 and 0xfeedfacf or 0xfeedface a.hdr.cputype = cputype[i+1] a.hdr.cpusubtype = cpusubtype[i+1] a.hdr.filetype = 1 a.hdr.ncmds = 2 a.hdr.sizeofcmds = ffi.sizeof(a.seg)+ffi.sizeof(a.sec)+ffi.sizeof(a.sym) a.seg.cmd = is64 and 0x19 or 0x1 a.seg.cmdsize = ffi.sizeof(a.seg)+ffi.sizeof(a.sec) a.seg.vmsize = #s a.seg.fileoff = mach_size-ofs a.seg.filesize = #s a.seg.maxprot = 1 a.seg.initprot = 1 a.seg.nsects = 1 ffi.copy(a.sec.sectname, "__data") ffi.copy(a.sec.segname, "__DATA") a.sec.size = #s a.sec.offset = mach_size-ofs a.sym.cmd = 2 a.sym.cmdsize = ffi.sizeof(a.sym) a.sym.symoff = ffi.offsetof(o, "sym_entry")-ofs a.sym.nsyms = 1 a.sym.stroff = ffi.offsetof(o, "sym_entry")+ffi.sizeof(o.sym_entry)-ofs a.sym.strsize = aligned(#symname+2, align) end o.sym_entry.type = 0xf o.sym_entry.sect = 1 o.sym_entry.strx = 1 ffi.copy(o.space+1, symname) -- Write Macho-O object file. local fp = savefile(output, "wb") fp:write(ffi.string(o, mach_size)) bcsave_tail(fp, output, s) end local function bcsave_obj(ctx, output, s) local ok, ffi = pcall(require, "ffi") check(ok, "FFI library required to write this file type") if ctx.os == "windows" then return bcsave_peobj(ctx, output, s, ffi) elseif ctx.os == "osx" then return bcsave_machobj(ctx, output, s, ffi) else return bcsave_elfobj(ctx, output, s, ffi) end end ------------------------------------------------------------------------------ local function bclist(input, output) local f = readfile(input) require("jit.bc").dump(f, savefile(output, "w"), true) end local function bcsave(ctx, input, output) local f = readfile(input) local s = string.dump(f, ctx.strip) local t = ctx.type if not t then t = detecttype(output) ctx.type = t end if t == "raw" then bcsave_raw(output, s) else if not ctx.modname then ctx.modname = detectmodname(input) end if t == "obj" then bcsave_obj(ctx, output, s) else bcsave_c(ctx, output, s) end end end local function docmd(...) local arg = {...} local n = 1 local list = false local ctx = { strip = true, arch = jit.arch, os = string.lower(jit.os), type = false, modname = false, } while n <= #arg do local a = arg[n] if type(a) == "string" and string.sub(a, 1, 1) == "-" and a ~= "-" then table.remove(arg, n) if a == "--" then break end for m=2,#a do local opt = string.sub(a, m, m) if opt == "l" then list = true elseif opt == "s" then ctx.strip = true elseif opt == "g" then ctx.strip = false else if arg[n] == nil or m ~= #a then usage() end if opt == "e" then if n ~= 1 then usage() end arg[1] = check(loadstring(arg[1])) elseif opt == "n" then ctx.modname = checkmodname(table.remove(arg, n)) elseif opt == "t" then ctx.type = checkarg(table.remove(arg, n), map_type, "file type") elseif opt == "a" then ctx.arch = checkarg(table.remove(arg, n), map_arch, "architecture") elseif opt == "o" then ctx.os = checkarg(table.remove(arg, n), map_os, "OS name") else usage() end end end else n = n + 1 end end if list then if #arg == 0 or #arg > 2 then usage() end bclist(arg[1], arg[2] or "-") else if #arg ~= 2 then usage() end bcsave(ctx, arg[1], arg[2]) end end ------------------------------------------------------------------------------ -- Public module functions. module(...) start = docmd -- Process -b command line option. tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/jit/dis_mips.lua0000664000000000000000000003164612202141143023470 0ustar rootroot---------------------------------------------------------------------------- -- LuaJIT MIPS disassembler module. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT/X license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- This is a helper module used by the LuaJIT machine code dumper module. -- -- It disassembles all standard MIPS32R1/R2 instructions. -- Default mode is big-endian, but see: dis_mipsel.lua ------------------------------------------------------------------------------ local type = type local sub, byte, format = string.sub, string.byte, string.format local match, gmatch, gsub = string.match, string.gmatch, string.gsub local concat = table.concat local bit = require("bit") local band, bor, tohex = bit.band, bit.bor, bit.tohex local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift ------------------------------------------------------------------------------ -- Primary and extended opcode maps ------------------------------------------------------------------------------ local map_movci = { shift = 16, mask = 1, [0] = "movfDSC", "movtDSC", } local map_srl = { shift = 21, mask = 1, [0] = "srlDTA", "rotrDTA", } local map_srlv = { shift = 6, mask = 1, [0] = "srlvDTS", "rotrvDTS", } local map_special = { shift = 0, mask = 63, [0] = { shift = 0, mask = -1, [0] = "nop", _ = "sllDTA" }, map_movci, map_srl, "sraDTA", "sllvDTS", false, map_srlv, "sravDTS", "jrS", "jalrD1S", "movzDST", "movnDST", "syscallY", "breakY", false, "sync", "mfhiD", "mthiS", "mfloD", "mtloS", false, false, false, false, "multST", "multuST", "divST", "divuST", false, false, false, false, "addDST", "addu|moveDST0", "subDST", "subu|neguDS0T", "andDST", "orDST", "xorDST", "nor|notDST0", false, false, "sltDST", "sltuDST", false, false, false, false, "tgeSTZ", "tgeuSTZ", "tltSTZ", "tltuSTZ", "teqSTZ", false, "tneSTZ", } local map_special2 = { shift = 0, mask = 63, [0] = "maddST", "madduST", "mulDST", false, "msubST", "msubuST", [32] = "clzDS", [33] = "cloDS", [63] = "sdbbpY", } local map_bshfl = { shift = 6, mask = 31, [2] = "wsbhDT", [16] = "sebDT", [24] = "sehDT", } local map_special3 = { shift = 0, mask = 63, [0] = "extTSAK", [4] = "insTSAL", [32] = map_bshfl, [59] = "rdhwrTD", } local map_regimm = { shift = 16, mask = 31, [0] = "bltzSB", "bgezSB", "bltzlSB", "bgezlSB", false, false, false, false, "tgeiSI", "tgeiuSI", "tltiSI", "tltiuSI", "teqiSI", false, "tneiSI", false, "bltzalSB", "bgezalSB", "bltzallSB", "bgezallSB", false, false, false, false, false, false, false, false, false, false, false, "synciSO", } local map_cop0 = { shift = 25, mask = 1, [0] = { shift = 21, mask = 15, [0] = "mfc0TDW", [4] = "mtc0TDW", [10] = "rdpgprDT", [11] = { shift = 5, mask = 1, [0] = "diT0", "eiT0", }, [14] = "wrpgprDT", }, { shift = 0, mask = 63, [1] = "tlbr", [2] = "tlbwi", [6] = "tlbwr", [8] = "tlbp", [24] = "eret", [31] = "deret", [32] = "wait", }, } local map_cop1s = { shift = 0, mask = 63, [0] = "add.sFGH", "sub.sFGH", "mul.sFGH", "div.sFGH", "sqrt.sFG", "abs.sFG", "mov.sFG", "neg.sFG", "round.l.sFG", "trunc.l.sFG", "ceil.l.sFG", "floor.l.sFG", "round.w.sFG", "trunc.w.sFG", "ceil.w.sFG", "floor.w.sFG", false, { shift = 16, mask = 1, [0] = "movf.sFGC", "movt.sFGC" }, "movz.sFGT", "movn.sFGT", false, "recip.sFG", "rsqrt.sFG", false, false, false, false, false, false, false, false, false, false, "cvt.d.sFG", false, false, "cvt.w.sFG", "cvt.l.sFG", "cvt.ps.sFGH", false, false, false, false, false, false, false, false, false, "c.f.sVGH", "c.un.sVGH", "c.eq.sVGH", "c.ueq.sVGH", "c.olt.sVGH", "c.ult.sVGH", "c.ole.sVGH", "c.ule.sVGH", "c.sf.sVGH", "c.ngle.sVGH", "c.seq.sVGH", "c.ngl.sVGH", "c.lt.sVGH", "c.nge.sVGH", "c.le.sVGH", "c.ngt.sVGH", } local map_cop1d = { shift = 0, mask = 63, [0] = "add.dFGH", "sub.dFGH", "mul.dFGH", "div.dFGH", "sqrt.dFG", "abs.dFG", "mov.dFG", "neg.dFG", "round.l.dFG", "trunc.l.dFG", "ceil.l.dFG", "floor.l.dFG", "round.w.dFG", "trunc.w.dFG", "ceil.w.dFG", "floor.w.dFG", false, { shift = 16, mask = 1, [0] = "movf.dFGC", "movt.dFGC" }, "movz.dFGT", "movn.dFGT", false, "recip.dFG", "rsqrt.dFG", false, false, false, false, false, false, false, false, false, "cvt.s.dFG", false, false, false, "cvt.w.dFG", "cvt.l.dFG", false, false, false, false, false, false, false, false, false, false, "c.f.dVGH", "c.un.dVGH", "c.eq.dVGH", "c.ueq.dVGH", "c.olt.dVGH", "c.ult.dVGH", "c.ole.dVGH", "c.ule.dVGH", "c.df.dVGH", "c.ngle.dVGH", "c.deq.dVGH", "c.ngl.dVGH", "c.lt.dVGH", "c.nge.dVGH", "c.le.dVGH", "c.ngt.dVGH", } local map_cop1ps = { shift = 0, mask = 63, [0] = "add.psFGH", "sub.psFGH", "mul.psFGH", false, false, "abs.psFG", "mov.psFG", "neg.psFG", false, false, false, false, false, false, false, false, false, { shift = 16, mask = 1, [0] = "movf.psFGC", "movt.psFGC" }, "movz.psFGT", "movn.psFGT", false, false, false, false, false, false, false, false, false, false, false, false, "cvt.s.puFG", false, false, false, false, false, false, false, "cvt.s.plFG", false, false, false, "pll.psFGH", "plu.psFGH", "pul.psFGH", "puu.psFGH", "c.f.psVGH", "c.un.psVGH", "c.eq.psVGH", "c.ueq.psVGH", "c.olt.psVGH", "c.ult.psVGH", "c.ole.psVGH", "c.ule.psVGH", "c.psf.psVGH", "c.ngle.psVGH", "c.pseq.psVGH", "c.ngl.psVGH", "c.lt.psVGH", "c.nge.psVGH", "c.le.psVGH", "c.ngt.psVGH", } local map_cop1w = { shift = 0, mask = 63, [32] = "cvt.s.wFG", [33] = "cvt.d.wFG", } local map_cop1l = { shift = 0, mask = 63, [32] = "cvt.s.lFG", [33] = "cvt.d.lFG", } local map_cop1bc = { shift = 16, mask = 3, [0] = "bc1fCB", "bc1tCB", "bc1flCB", "bc1tlCB", } local map_cop1 = { shift = 21, mask = 31, [0] = "mfc1TG", false, "cfc1TG", "mfhc1TG", "mtc1TG", false, "ctc1TG", "mthc1TG", map_cop1bc, false, false, false, false, false, false, false, map_cop1s, map_cop1d, false, false, map_cop1w, map_cop1l, map_cop1ps, } local map_cop1x = { shift = 0, mask = 63, [0] = "lwxc1FSX", "ldxc1FSX", false, false, false, "luxc1FSX", false, false, "swxc1FSX", "sdxc1FSX", false, false, false, "suxc1FSX", false, "prefxMSX", false, false, false, false, false, false, false, false, false, false, false, false, false, false, "alnv.psFGHS", false, "madd.sFRGH", "madd.dFRGH", false, false, false, false, "madd.psFRGH", false, "msub.sFRGH", "msub.dFRGH", false, false, false, false, "msub.psFRGH", false, "nmadd.sFRGH", "nmadd.dFRGH", false, false, false, false, "nmadd.psFRGH", false, "nmsub.sFRGH", "nmsub.dFRGH", false, false, false, false, "nmsub.psFRGH", false, } local map_pri = { [0] = map_special, map_regimm, "jJ", "jalJ", "beq|beqz|bST00B", "bne|bnezST0B", "blezSB", "bgtzSB", "addiTSI", "addiu|liTS0I", "sltiTSI", "sltiuTSI", "andiTSU", "ori|liTS0U", "xoriTSU", "luiTU", map_cop0, map_cop1, false, map_cop1x, "beql|beqzlST0B", "bnel|bnezlST0B", "blezlSB", "bgtzlSB", false, false, false, false, map_special2, false, false, map_special3, "lbTSO", "lhTSO", "lwlTSO", "lwTSO", "lbuTSO", "lhuTSO", "lwrTSO", false, "sbTSO", "shTSO", "swlTSO", "swTSO", false, false, "swrTSO", "cacheNSO", "llTSO", "lwc1HSO", "lwc2TSO", "prefNSO", false, "ldc1HSO", "ldc2TSO", false, "scTSO", "swc1HSO", "swc2TSO", false, false, "sdc1HSO", "sdc2TSO", false, } ------------------------------------------------------------------------------ local map_gpr = { [0] = "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "sp", "r30", "ra", } ------------------------------------------------------------------------------ -- Output a nicely formatted line with an opcode and operands. local function putop(ctx, text, operands) local pos = ctx.pos local extra = "" if ctx.rel then local sym = ctx.symtab[ctx.rel] if sym then extra = "\t->"..sym end end if ctx.hexdump > 0 then ctx.out(format("%08x %s %-7s %s%s\n", ctx.addr+pos, tohex(ctx.op), text, concat(operands, ", "), extra)) else ctx.out(format("%08x %-7s %s%s\n", ctx.addr+pos, text, concat(operands, ", "), extra)) end ctx.pos = pos + 4 end -- Fallback for unknown opcodes. local function unknown(ctx) return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) end local function get_be(ctx) local pos = ctx.pos local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) return bor(lshift(b0, 24), lshift(b1, 16), lshift(b2, 8), b3) end local function get_le(ctx) local pos = ctx.pos local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) return bor(lshift(b3, 24), lshift(b2, 16), lshift(b1, 8), b0) end -- Disassemble a single instruction. local function disass_ins(ctx) local op = ctx:get() local operands = {} local last = nil ctx.op = op ctx.rel = nil local opat = map_pri[rshift(op, 26)] while type(opat) ~= "string" do if not opat then return unknown(ctx) end opat = opat[band(rshift(op, opat.shift), opat.mask)] or opat._ end local name, pat = match(opat, "^([a-z0-9_.]*)(.*)") local altname, pat2 = match(pat, "|([a-z0-9_.|]*)(.*)") if altname then pat = pat2 end for p in gmatch(pat, ".") do local x = nil if p == "S" then x = map_gpr[band(rshift(op, 21), 31)] elseif p == "T" then x = map_gpr[band(rshift(op, 16), 31)] elseif p == "D" then x = map_gpr[band(rshift(op, 11), 31)] elseif p == "F" then x = "f"..band(rshift(op, 6), 31) elseif p == "G" then x = "f"..band(rshift(op, 11), 31) elseif p == "H" then x = "f"..band(rshift(op, 16), 31) elseif p == "R" then x = "f"..band(rshift(op, 21), 31) elseif p == "A" then x = band(rshift(op, 6), 31) elseif p == "M" then x = band(rshift(op, 11), 31) elseif p == "N" then x = band(rshift(op, 16), 31) elseif p == "C" then x = band(rshift(op, 18), 7) if x == 0 then x = nil end elseif p == "K" then x = band(rshift(op, 11), 31) + 1 elseif p == "L" then x = band(rshift(op, 11), 31) - last + 1 elseif p == "I" then x = arshift(lshift(op, 16), 16) elseif p == "U" then x = band(op, 0xffff) elseif p == "O" then local disp = arshift(lshift(op, 16), 16) operands[#operands] = format("%d(%s)", disp, last) elseif p == "X" then local index = map_gpr[band(rshift(op, 16), 31)] operands[#operands] = format("%s(%s)", index, last) elseif p == "B" then x = ctx.addr + ctx.pos + arshift(lshift(op, 16), 16)*4 + 4 ctx.rel = x x = "0x"..tohex(x) elseif p == "J" then x = band(ctx.addr + ctx.pos, 0xf0000000) + band(op, 0x03ffffff)*4 ctx.rel = x x = "0x"..tohex(x) elseif p == "V" then x = band(rshift(op, 8), 7) if x == 0 then x = nil end elseif p == "W" then x = band(op, 7) if x == 0 then x = nil end elseif p == "Y" then x = band(rshift(op, 6), 0x000fffff) if x == 0 then x = nil end elseif p == "Z" then x = band(rshift(op, 6), 1023) if x == 0 then x = nil end elseif p == "0" then if last == "r0" or last == 0 then local n = #operands operands[n] = nil last = operands[n-1] if altname then local a1, a2 = match(altname, "([^|]*)|(.*)") if a1 then name, altname = a1, a2 else name = altname end end end elseif p == "1" then if last == "ra" then operands[#operands] = nil end else assert(false) end if x then operands[#operands+1] = x; last = x end end return putop(ctx, name, operands) end ------------------------------------------------------------------------------ -- Disassemble a block of code. local function disass_block(ctx, ofs, len) if not ofs then ofs = 0 end local stop = len and ofs+len or #ctx.code stop = stop - stop % 4 ctx.pos = ofs - ofs % 4 ctx.rel = nil while ctx.pos < stop do disass_ins(ctx) end end -- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). local function create_(code, addr, out) local ctx = {} ctx.code = code ctx.addr = addr or 0 ctx.out = out or io.write ctx.symtab = {} ctx.disass = disass_block ctx.hexdump = 8 ctx.get = get_be return ctx end local function create_el_(code, addr, out) local ctx = create_(code, addr, out) ctx.get = get_le return ctx end -- Simple API: disassemble code (a string) at address and output via out. local function disass_(code, addr, out) create_(code, addr, out):disass() end local function disass_el_(code, addr, out) create_el_(code, addr, out):disass() end -- Return register name for RID. local function regname_(r) if r < 32 then return map_gpr[r] end return "f"..(r-32) end -- Public module functions. module(...) create = create_ create_el = create_el_ disass = disass_ disass_el = disass_el_ regname = regname_ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_fold.c0000664000000000000000000017166012231715321023037 0ustar rootroot/* ** FOLD: Constant Folding, Algebraic Simplifications and Reassociation. ** ABCelim: Array Bounds Check Elimination. ** CSE: Common-Subexpression Elimination. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_opt_fold_c #define LUA_CORE #include #include "lj_obj.h" #if LJ_HASJIT #include "lj_str.h" #include "lj_tab.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" #include "lj_trace.h" #if LJ_HASFFI #include "lj_ctype.h" #endif #include "lj_carith.h" #include "lj_vm.h" #include "lj_strscan.h" /* Here's a short description how the FOLD engine processes instructions: ** ** The FOLD engine receives a single instruction stored in fins (J->fold.ins). ** The instruction and its operands are used to select matching fold rules. ** These are applied iteratively until a fixed point is reached. ** ** The 8 bit opcode of the instruction itself plus the opcodes of the ** two instructions referenced by its operands form a 24 bit key ** 'ins left right' (unused operands -> 0, literals -> lowest 8 bits). ** ** This key is used for partial matching against the fold rules. The ** left/right operand fields of the key are successively masked with ** the 'any' wildcard, from most specific to least specific: ** ** ins left right ** ins any right ** ins left any ** ins any any ** ** The masked key is used to lookup a matching fold rule in a semi-perfect ** hash table. If a matching rule is found, the related fold function is run. ** Multiple rules can share the same fold function. A fold rule may return ** one of several special values: ** ** - NEXTFOLD means no folding was applied, because an additional test ** inside the fold function failed. Matching continues against less ** specific fold rules. Finally the instruction is passed on to CSE. ** ** - RETRYFOLD means the instruction was modified in-place. Folding is ** retried as if this instruction had just been received. ** ** All other return values are terminal actions -- no further folding is ** applied: ** ** - INTFOLD(i) returns a reference to the integer constant i. ** ** - LEFTFOLD and RIGHTFOLD return the left/right operand reference ** without emitting an instruction. ** ** - CSEFOLD and EMITFOLD pass the instruction directly to CSE or emit ** it without passing through any further optimizations. ** ** - FAILFOLD, DROPFOLD and CONDFOLD only apply to instructions which have ** no result (e.g. guarded assertions): FAILFOLD means the guard would ** always fail, i.e. the current trace is pointless. DROPFOLD means ** the guard is always true and has been eliminated. CONDFOLD is a ** shortcut for FAILFOLD + cond (i.e. drop if true, otherwise fail). ** ** - Any other return value is interpreted as an IRRef or TRef. This ** can be a reference to an existing or a newly created instruction. ** Only the least-significant 16 bits (IRRef1) are used to form a TRef ** which is finally returned to the caller. ** ** The FOLD engine receives instructions both from the trace recorder and ** substituted instructions from LOOP unrolling. This means all types ** of instructions may end up here, even though the recorder bypasses ** FOLD in some cases. Thus all loads, stores and allocations must have ** an any/any rule to avoid being passed on to CSE. ** ** Carefully read the following requirements before adding or modifying ** any fold rules: ** ** Requirement #1: All fold rules must preserve their destination type. ** ** Consistently use INTFOLD() (KINT result) or lj_ir_knum() (KNUM result). ** Never use lj_ir_knumint() which can have either a KINT or KNUM result. ** ** Requirement #2: Fold rules should not create *new* instructions which ** reference operands *across* PHIs. ** ** E.g. a RETRYFOLD with 'fins->op1 = fleft->op1' is invalid if the ** left operand is a PHI. Then fleft->op1 would point across the PHI ** frontier to an invariant instruction. Adding a PHI for this instruction ** would be counterproductive. The solution is to add a barrier which ** prevents folding across PHIs, i.e. 'PHIBARRIER(fleft)' in this case. ** The only exception is for recurrences with high latencies like ** repeated int->num->int conversions. ** ** One could relax this condition a bit if the referenced instruction is ** a PHI, too. But this often leads to worse code due to excessive ** register shuffling. ** ** Note: returning *existing* instructions (e.g. LEFTFOLD) is ok, though. ** Even returning fleft->op1 would be ok, because a new PHI will added, ** if needed. But again, this leads to excessive register shuffling and ** should be avoided. ** ** Requirement #3: The set of all fold rules must be monotonic to guarantee ** termination. ** ** The goal is optimization, so one primarily wants to add strength-reducing ** rules. This means eliminating an instruction or replacing an instruction ** with one or more simpler instructions. Don't add fold rules which point ** into the other direction. ** ** Some rules (like commutativity) do not directly reduce the strength of ** an instruction, but enable other fold rules (e.g. by moving constants ** to the right operand). These rules must be made unidirectional to avoid ** cycles. ** ** Rule of thumb: the trace recorder expands the IR and FOLD shrinks it. */ /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) #define fins (&J->fold.ins) #define fleft (&J->fold.left) #define fright (&J->fold.right) #define knumleft (ir_knum(fleft)->n) #define knumright (ir_knum(fright)->n) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) /* Fold function type. Fastcall on x86 significantly reduces their size. */ typedef IRRef (LJ_FASTCALL *FoldFunc)(jit_State *J); /* Macros for the fold specs, so buildvm can recognize them. */ #define LJFOLD(x) #define LJFOLDX(x) #define LJFOLDF(name) static TRef LJ_FASTCALL fold_##name(jit_State *J) /* Note: They must be at the start of a line or buildvm ignores them! */ /* Barrier to prevent using operands across PHIs. */ #define PHIBARRIER(ir) if (irt_isphi((ir)->t)) return NEXTFOLD /* Barrier to prevent folding across a GC step. ** GC steps can only happen at the head of a trace and at LOOP. ** And the GC is only driven forward if there is at least one allocation. */ #define gcstep_barrier(J, ref) \ ((ref) < J->chain[IR_LOOP] && \ (J->chain[IR_SNEW] || J->chain[IR_XSNEW] || \ J->chain[IR_TNEW] || J->chain[IR_TDUP] || \ J->chain[IR_CNEW] || J->chain[IR_CNEWI] || J->chain[IR_TOSTR])) /* -- Constant folding for FP numbers ------------------------------------- */ LJFOLD(ADD KNUM KNUM) LJFOLD(SUB KNUM KNUM) LJFOLD(MUL KNUM KNUM) LJFOLD(DIV KNUM KNUM) LJFOLD(NEG KNUM KNUM) LJFOLD(ABS KNUM KNUM) LJFOLD(ATAN2 KNUM KNUM) LJFOLD(LDEXP KNUM KNUM) LJFOLD(MIN KNUM KNUM) LJFOLD(MAX KNUM KNUM) LJFOLDF(kfold_numarith) { lua_Number a = knumleft; lua_Number b = knumright; lua_Number y = lj_vm_foldarith(a, b, fins->o - IR_ADD); return lj_ir_knum(J, y); } LJFOLD(LDEXP KNUM KINT) LJFOLDF(kfold_ldexp) { #if LJ_TARGET_X86ORX64 UNUSED(J); return NEXTFOLD; #else return lj_ir_knum(J, ldexp(knumleft, fright->i)); #endif } LJFOLD(FPMATH KNUM any) LJFOLDF(kfold_fpmath) { lua_Number a = knumleft; lua_Number y = lj_vm_foldfpm(a, fins->op2); return lj_ir_knum(J, y); } LJFOLD(POW KNUM KINT) LJFOLDF(kfold_numpow) { lua_Number a = knumleft; lua_Number b = (lua_Number)fright->i; lua_Number y = lj_vm_foldarith(a, b, IR_POW - IR_ADD); return lj_ir_knum(J, y); } /* Must not use kfold_kref for numbers (could be NaN). */ LJFOLD(EQ KNUM KNUM) LJFOLD(NE KNUM KNUM) LJFOLD(LT KNUM KNUM) LJFOLD(GE KNUM KNUM) LJFOLD(LE KNUM KNUM) LJFOLD(GT KNUM KNUM) LJFOLD(ULT KNUM KNUM) LJFOLD(UGE KNUM KNUM) LJFOLD(ULE KNUM KNUM) LJFOLD(UGT KNUM KNUM) LJFOLDF(kfold_numcomp) { return CONDFOLD(lj_ir_numcmp(knumleft, knumright, (IROp)fins->o)); } /* -- Constant folding for 32 bit integers -------------------------------- */ static int32_t kfold_intop(int32_t k1, int32_t k2, IROp op) { switch (op) { case IR_ADD: k1 += k2; break; case IR_SUB: k1 -= k2; break; case IR_MUL: k1 *= k2; break; case IR_MOD: k1 = lj_vm_modi(k1, k2); break; case IR_NEG: k1 = -k1; break; case IR_BAND: k1 &= k2; break; case IR_BOR: k1 |= k2; break; case IR_BXOR: k1 ^= k2; break; case IR_BSHL: k1 <<= (k2 & 31); break; case IR_BSHR: k1 = (int32_t)((uint32_t)k1 >> (k2 & 31)); break; case IR_BSAR: k1 >>= (k2 & 31); break; case IR_BROL: k1 = (int32_t)lj_rol((uint32_t)k1, (k2 & 31)); break; case IR_BROR: k1 = (int32_t)lj_ror((uint32_t)k1, (k2 & 31)); break; case IR_MIN: k1 = k1 < k2 ? k1 : k2; break; case IR_MAX: k1 = k1 > k2 ? k1 : k2; break; default: lua_assert(0); break; } return k1; } LJFOLD(ADD KINT KINT) LJFOLD(SUB KINT KINT) LJFOLD(MUL KINT KINT) LJFOLD(MOD KINT KINT) LJFOLD(NEG KINT KINT) LJFOLD(BAND KINT KINT) LJFOLD(BOR KINT KINT) LJFOLD(BXOR KINT KINT) LJFOLD(BSHL KINT KINT) LJFOLD(BSHR KINT KINT) LJFOLD(BSAR KINT KINT) LJFOLD(BROL KINT KINT) LJFOLD(BROR KINT KINT) LJFOLD(MIN KINT KINT) LJFOLD(MAX KINT KINT) LJFOLDF(kfold_intarith) { return INTFOLD(kfold_intop(fleft->i, fright->i, (IROp)fins->o)); } LJFOLD(ADDOV KINT KINT) LJFOLD(SUBOV KINT KINT) LJFOLD(MULOV KINT KINT) LJFOLDF(kfold_intovarith) { lua_Number n = lj_vm_foldarith((lua_Number)fleft->i, (lua_Number)fright->i, fins->o - IR_ADDOV); int32_t k = lj_num2int(n); if (n != (lua_Number)k) return FAILFOLD; return INTFOLD(k); } LJFOLD(BNOT KINT) LJFOLDF(kfold_bnot) { return INTFOLD(~fleft->i); } LJFOLD(BSWAP KINT) LJFOLDF(kfold_bswap) { return INTFOLD((int32_t)lj_bswap((uint32_t)fleft->i)); } LJFOLD(LT KINT KINT) LJFOLD(GE KINT KINT) LJFOLD(LE KINT KINT) LJFOLD(GT KINT KINT) LJFOLD(ULT KINT KINT) LJFOLD(UGE KINT KINT) LJFOLD(ULE KINT KINT) LJFOLD(UGT KINT KINT) LJFOLD(ABC KINT KINT) LJFOLDF(kfold_intcomp) { int32_t a = fleft->i, b = fright->i; switch ((IROp)fins->o) { case IR_LT: return CONDFOLD(a < b); case IR_GE: return CONDFOLD(a >= b); case IR_LE: return CONDFOLD(a <= b); case IR_GT: return CONDFOLD(a > b); case IR_ULT: return CONDFOLD((uint32_t)a < (uint32_t)b); case IR_UGE: return CONDFOLD((uint32_t)a >= (uint32_t)b); case IR_ULE: return CONDFOLD((uint32_t)a <= (uint32_t)b); case IR_ABC: case IR_UGT: return CONDFOLD((uint32_t)a > (uint32_t)b); default: lua_assert(0); return FAILFOLD; } } LJFOLD(UGE any KINT) LJFOLDF(kfold_intcomp0) { if (fright->i == 0) return DROPFOLD; return NEXTFOLD; } /* -- Constant folding for 64 bit integers -------------------------------- */ static uint64_t kfold_int64arith(uint64_t k1, uint64_t k2, IROp op) { switch (op) { #if LJ_64 || LJ_HASFFI case IR_ADD: k1 += k2; break; case IR_SUB: k1 -= k2; break; #endif #if LJ_HASFFI case IR_MUL: k1 *= k2; break; case IR_BAND: k1 &= k2; break; case IR_BOR: k1 |= k2; break; case IR_BXOR: k1 ^= k2; break; #endif default: UNUSED(k2); lua_assert(0); break; } return k1; } LJFOLD(ADD KINT64 KINT64) LJFOLD(SUB KINT64 KINT64) LJFOLD(MUL KINT64 KINT64) LJFOLD(BAND KINT64 KINT64) LJFOLD(BOR KINT64 KINT64) LJFOLD(BXOR KINT64 KINT64) LJFOLDF(kfold_int64arith) { return INT64FOLD(kfold_int64arith(ir_k64(fleft)->u64, ir_k64(fright)->u64, (IROp)fins->o)); } LJFOLD(DIV KINT64 KINT64) LJFOLD(MOD KINT64 KINT64) LJFOLD(POW KINT64 KINT64) LJFOLDF(kfold_int64arith2) { #if LJ_HASFFI uint64_t k1 = ir_k64(fleft)->u64, k2 = ir_k64(fright)->u64; if (irt_isi64(fins->t)) { k1 = fins->o == IR_DIV ? lj_carith_divi64((int64_t)k1, (int64_t)k2) : fins->o == IR_MOD ? lj_carith_modi64((int64_t)k1, (int64_t)k2) : lj_carith_powi64((int64_t)k1, (int64_t)k2); } else { k1 = fins->o == IR_DIV ? lj_carith_divu64(k1, k2) : fins->o == IR_MOD ? lj_carith_modu64(k1, k2) : lj_carith_powu64(k1, k2); } return INT64FOLD(k1); #else UNUSED(J); lua_assert(0); return FAILFOLD; #endif } LJFOLD(BSHL KINT64 KINT) LJFOLD(BSHR KINT64 KINT) LJFOLD(BSAR KINT64 KINT) LJFOLD(BROL KINT64 KINT) LJFOLD(BROR KINT64 KINT) LJFOLDF(kfold_int64shift) { #if LJ_HASFFI || LJ_64 uint64_t k = ir_k64(fleft)->u64; int32_t sh = (fright->i & 63); switch ((IROp)fins->o) { case IR_BSHL: k <<= sh; break; #if LJ_HASFFI case IR_BSHR: k >>= sh; break; case IR_BSAR: k = (uint64_t)((int64_t)k >> sh); break; case IR_BROL: k = lj_rol(k, sh); break; case IR_BROR: k = lj_ror(k, sh); break; #endif default: lua_assert(0); break; } return INT64FOLD(k); #else UNUSED(J); lua_assert(0); return FAILFOLD; #endif } LJFOLD(BNOT KINT64) LJFOLDF(kfold_bnot64) { #if LJ_HASFFI return INT64FOLD(~ir_k64(fleft)->u64); #else UNUSED(J); lua_assert(0); return FAILFOLD; #endif } LJFOLD(BSWAP KINT64) LJFOLDF(kfold_bswap64) { #if LJ_HASFFI return INT64FOLD(lj_bswap64(ir_k64(fleft)->u64)); #else UNUSED(J); lua_assert(0); return FAILFOLD; #endif } LJFOLD(LT KINT64 KINT64) LJFOLD(GE KINT64 KINT64) LJFOLD(LE KINT64 KINT64) LJFOLD(GT KINT64 KINT64) LJFOLD(ULT KINT64 KINT64) LJFOLD(UGE KINT64 KINT64) LJFOLD(ULE KINT64 KINT64) LJFOLD(UGT KINT64 KINT64) LJFOLDF(kfold_int64comp) { #if LJ_HASFFI uint64_t a = ir_k64(fleft)->u64, b = ir_k64(fright)->u64; switch ((IROp)fins->o) { case IR_LT: return CONDFOLD(a < b); case IR_GE: return CONDFOLD(a >= b); case IR_LE: return CONDFOLD(a <= b); case IR_GT: return CONDFOLD(a > b); case IR_ULT: return CONDFOLD((uint64_t)a < (uint64_t)b); case IR_UGE: return CONDFOLD((uint64_t)a >= (uint64_t)b); case IR_ULE: return CONDFOLD((uint64_t)a <= (uint64_t)b); case IR_UGT: return CONDFOLD((uint64_t)a > (uint64_t)b); default: lua_assert(0); return FAILFOLD; } #else UNUSED(J); lua_assert(0); return FAILFOLD; #endif } LJFOLD(UGE any KINT64) LJFOLDF(kfold_int64comp0) { #if LJ_HASFFI if (ir_k64(fright)->u64 == 0) return DROPFOLD; return NEXTFOLD; #else UNUSED(J); lua_assert(0); return FAILFOLD; #endif } /* -- Constant folding for strings ---------------------------------------- */ LJFOLD(SNEW KKPTR KINT) LJFOLDF(kfold_snew_kptr) { GCstr *s = lj_str_new(J->L, (const char *)ir_kptr(fleft), (size_t)fright->i); return lj_ir_kstr(J, s); } LJFOLD(SNEW any KINT) LJFOLDF(kfold_snew_empty) { if (fright->i == 0) return lj_ir_kstr(J, &J2G(J)->strempty); return NEXTFOLD; } LJFOLD(STRREF KGC KINT) LJFOLDF(kfold_strref) { GCstr *str = ir_kstr(fleft); lua_assert((MSize)fright->i <= str->len); return lj_ir_kkptr(J, (char *)strdata(str) + fright->i); } LJFOLD(STRREF SNEW any) LJFOLDF(kfold_strref_snew) { PHIBARRIER(fleft); if (irref_isk(fins->op2) && fright->i == 0) { return fleft->op1; /* strref(snew(ptr, len), 0) ==> ptr */ } else { /* Reassociate: strref(snew(strref(str, a), len), b) ==> strref(str, a+b) */ IRIns *ir = IR(fleft->op1); IRRef1 str = ir->op1; /* IRIns * is not valid across emitir. */ lua_assert(ir->o == IR_STRREF); PHIBARRIER(ir); fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */ fins->op1 = str; fins->ot = IRT(IR_STRREF, IRT_P32); return RETRYFOLD; } return NEXTFOLD; } LJFOLD(CALLN CARG IRCALL_lj_str_cmp) LJFOLDF(kfold_strcmp) { if (irref_isk(fleft->op1) && irref_isk(fleft->op2)) { GCstr *a = ir_kstr(IR(fleft->op1)); GCstr *b = ir_kstr(IR(fleft->op2)); return INTFOLD(lj_str_cmp(a, b)); } return NEXTFOLD; } /* -- Constant folding of pointer arithmetic ------------------------------ */ LJFOLD(ADD KGC KINT) LJFOLD(ADD KGC KINT64) LJFOLDF(kfold_add_kgc) { GCobj *o = ir_kgc(fleft); #if LJ_64 ptrdiff_t ofs = (ptrdiff_t)ir_kint64(fright)->u64; #else ptrdiff_t ofs = fright->i; #endif #if LJ_HASFFI if (irt_iscdata(fleft->t)) { CType *ct = ctype_raw(ctype_ctsG(J2G(J)), gco2cd(o)->ctypeid); if (ctype_isnum(ct->info) || ctype_isenum(ct->info) || ctype_isptr(ct->info) || ctype_isfunc(ct->info) || ctype_iscomplex(ct->info) || ctype_isvector(ct->info)) return lj_ir_kkptr(J, (char *)o + ofs); } #endif return lj_ir_kptr(J, (char *)o + ofs); } LJFOLD(ADD KPTR KINT) LJFOLD(ADD KPTR KINT64) LJFOLD(ADD KKPTR KINT) LJFOLD(ADD KKPTR KINT64) LJFOLDF(kfold_add_kptr) { void *p = ir_kptr(fleft); #if LJ_64 ptrdiff_t ofs = (ptrdiff_t)ir_kint64(fright)->u64; #else ptrdiff_t ofs = fright->i; #endif return lj_ir_kptr_(J, fleft->o, (char *)p + ofs); } LJFOLD(ADD any KGC) LJFOLD(ADD any KPTR) LJFOLD(ADD any KKPTR) LJFOLDF(kfold_add_kright) { if (fleft->o == IR_KINT || fleft->o == IR_KINT64) { IRRef1 tmp = fins->op1; fins->op1 = fins->op2; fins->op2 = tmp; return RETRYFOLD; } return NEXTFOLD; } /* -- Constant folding of conversions ------------------------------------- */ LJFOLD(TOBIT KNUM KNUM) LJFOLDF(kfold_tobit) { return INTFOLD(lj_num2bit(knumleft)); } LJFOLD(CONV KINT IRCONV_NUM_INT) LJFOLDF(kfold_conv_kint_num) { return lj_ir_knum(J, (lua_Number)fleft->i); } LJFOLD(CONV KINT IRCONV_NUM_U32) LJFOLDF(kfold_conv_kintu32_num) { return lj_ir_knum(J, (lua_Number)(uint32_t)fleft->i); } LJFOLD(CONV KINT IRCONV_INT_I8) LJFOLD(CONV KINT IRCONV_INT_U8) LJFOLD(CONV KINT IRCONV_INT_I16) LJFOLD(CONV KINT IRCONV_INT_U16) LJFOLDF(kfold_conv_kint_ext) { int32_t k = fleft->i; if ((fins->op2 & IRCONV_SRCMASK) == IRT_I8) k = (int8_t)k; else if ((fins->op2 & IRCONV_SRCMASK) == IRT_U8) k = (uint8_t)k; else if ((fins->op2 & IRCONV_SRCMASK) == IRT_I16) k = (int16_t)k; else k = (uint16_t)k; return INTFOLD(k); } LJFOLD(CONV KINT IRCONV_I64_INT) LJFOLD(CONV KINT IRCONV_U64_INT) LJFOLD(CONV KINT IRCONV_I64_U32) LJFOLD(CONV KINT IRCONV_U64_U32) LJFOLDF(kfold_conv_kint_i64) { if ((fins->op2 & IRCONV_SEXT)) return INT64FOLD((uint64_t)(int64_t)fleft->i); else return INT64FOLD((uint64_t)(int64_t)(uint32_t)fleft->i); } LJFOLD(CONV KINT64 IRCONV_NUM_I64) LJFOLDF(kfold_conv_kint64_num_i64) { return lj_ir_knum(J, (lua_Number)(int64_t)ir_kint64(fleft)->u64); } LJFOLD(CONV KINT64 IRCONV_NUM_U64) LJFOLDF(kfold_conv_kint64_num_u64) { return lj_ir_knum(J, (lua_Number)ir_kint64(fleft)->u64); } LJFOLD(CONV KINT64 IRCONV_INT_I64) LJFOLD(CONV KINT64 IRCONV_U32_I64) LJFOLDF(kfold_conv_kint64_int_i64) { return INTFOLD((int32_t)ir_kint64(fleft)->u64); } LJFOLD(CONV KNUM IRCONV_INT_NUM) LJFOLDF(kfold_conv_knum_int_num) { lua_Number n = knumleft; if (!(fins->op2 & IRCONV_TRUNC)) { int32_t k = lj_num2int(n); if (irt_isguard(fins->t) && n != (lua_Number)k) { /* We're about to create a guard which always fails, like CONV +1.5. ** Some pathological loops cause this during LICM, e.g.: ** local x,k,t = 0,1.5,{1,[1.5]=2} ** for i=1,200 do x = x+ t[k]; k = k == 1 and 1.5 or 1 end ** assert(x == 300) */ return FAILFOLD; } return INTFOLD(k); } else { return INTFOLD((int32_t)n); } } LJFOLD(CONV KNUM IRCONV_U32_NUM) LJFOLDF(kfold_conv_knum_u32_num) { lua_assert((fins->op2 & IRCONV_TRUNC)); #ifdef _MSC_VER { /* Workaround for MSVC bug. */ volatile uint32_t u = (uint32_t)knumleft; return INTFOLD((int32_t)u); } #else return INTFOLD((int32_t)(uint32_t)knumleft); #endif } LJFOLD(CONV KNUM IRCONV_I64_NUM) LJFOLDF(kfold_conv_knum_i64_num) { lua_assert((fins->op2 & IRCONV_TRUNC)); return INT64FOLD((uint64_t)(int64_t)knumleft); } LJFOLD(CONV KNUM IRCONV_U64_NUM) LJFOLDF(kfold_conv_knum_u64_num) { lua_assert((fins->op2 & IRCONV_TRUNC)); return INT64FOLD(lj_num2u64(knumleft)); } LJFOLD(TOSTR KNUM) LJFOLDF(kfold_tostr_knum) { return lj_ir_kstr(J, lj_str_fromnum(J->L, &knumleft)); } LJFOLD(TOSTR KINT) LJFOLDF(kfold_tostr_kint) { return lj_ir_kstr(J, lj_str_fromint(J->L, fleft->i)); } LJFOLD(STRTO KGC) LJFOLDF(kfold_strto) { TValue n; if (lj_strscan_num(ir_kstr(fleft), &n)) return lj_ir_knum(J, numV(&n)); return FAILFOLD; } /* -- Constant folding of equality checks --------------------------------- */ /* Don't constant-fold away FLOAD checks against KNULL. */ LJFOLD(EQ FLOAD KNULL) LJFOLD(NE FLOAD KNULL) LJFOLDX(lj_opt_cse) /* But fold all other KNULL compares, since only KNULL is equal to KNULL. */ LJFOLD(EQ any KNULL) LJFOLD(NE any KNULL) LJFOLD(EQ KNULL any) LJFOLD(NE KNULL any) LJFOLD(EQ KINT KINT) /* Constants are unique, so same refs <==> same value. */ LJFOLD(NE KINT KINT) LJFOLD(EQ KINT64 KINT64) LJFOLD(NE KINT64 KINT64) LJFOLD(EQ KGC KGC) LJFOLD(NE KGC KGC) LJFOLDF(kfold_kref) { return CONDFOLD((fins->op1 == fins->op2) ^ (fins->o == IR_NE)); } /* -- Algebraic shortcuts ------------------------------------------------- */ LJFOLD(FPMATH FPMATH IRFPM_FLOOR) LJFOLD(FPMATH FPMATH IRFPM_CEIL) LJFOLD(FPMATH FPMATH IRFPM_TRUNC) LJFOLDF(shortcut_round) { IRFPMathOp op = (IRFPMathOp)fleft->op2; if (op == IRFPM_FLOOR || op == IRFPM_CEIL || op == IRFPM_TRUNC) return LEFTFOLD; /* round(round_left(x)) = round_left(x) */ return NEXTFOLD; } LJFOLD(ABS ABS KNUM) LJFOLDF(shortcut_left) { return LEFTFOLD; /* f(g(x)) ==> g(x) */ } LJFOLD(ABS NEG KNUM) LJFOLDF(shortcut_dropleft) { PHIBARRIER(fleft); fins->op1 = fleft->op1; /* abs(neg(x)) ==> abs(x) */ return RETRYFOLD; } /* Note: no safe shortcuts with STRTO and TOSTR ("1e2" ==> +100 ==> "100"). */ LJFOLD(NEG NEG any) LJFOLD(BNOT BNOT) LJFOLD(BSWAP BSWAP) LJFOLDF(shortcut_leftleft) { PHIBARRIER(fleft); /* See above. Fold would be ok, but not beneficial. */ return fleft->op1; /* f(g(x)) ==> x */ } /* -- FP algebraic simplifications ---------------------------------------- */ /* FP arithmetic is tricky -- there's not much to simplify. ** Please note the following common pitfalls before sending "improvements": ** x+0 ==> x is INVALID for x=-0 ** 0-x ==> -x is INVALID for x=+0 ** x*0 ==> 0 is INVALID for x=-0, x=+-Inf or x=NaN */ LJFOLD(ADD NEG any) LJFOLDF(simplify_numadd_negx) { PHIBARRIER(fleft); fins->o = IR_SUB; /* (-a) + b ==> b - a */ fins->op1 = fins->op2; fins->op2 = fleft->op1; return RETRYFOLD; } LJFOLD(ADD any NEG) LJFOLDF(simplify_numadd_xneg) { PHIBARRIER(fright); fins->o = IR_SUB; /* a + (-b) ==> a - b */ fins->op2 = fright->op1; return RETRYFOLD; } LJFOLD(SUB any KNUM) LJFOLDF(simplify_numsub_k) { lua_Number n = knumright; if (n == 0.0) /* x - (+-0) ==> x */ return LEFTFOLD; return NEXTFOLD; } LJFOLD(SUB NEG KNUM) LJFOLDF(simplify_numsub_negk) { PHIBARRIER(fleft); fins->op2 = fleft->op1; /* (-x) - k ==> (-k) - x */ fins->op1 = (IRRef1)lj_ir_knum(J, -knumright); return RETRYFOLD; } LJFOLD(SUB any NEG) LJFOLDF(simplify_numsub_xneg) { PHIBARRIER(fright); fins->o = IR_ADD; /* a - (-b) ==> a + b */ fins->op2 = fright->op1; return RETRYFOLD; } LJFOLD(MUL any KNUM) LJFOLD(DIV any KNUM) LJFOLDF(simplify_nummuldiv_k) { lua_Number n = knumright; if (n == 1.0) { /* x o 1 ==> x */ return LEFTFOLD; } else if (n == -1.0) { /* x o -1 ==> -x */ fins->o = IR_NEG; fins->op2 = (IRRef1)lj_ir_knum_neg(J); return RETRYFOLD; } else if (fins->o == IR_MUL && n == 2.0) { /* x * 2 ==> x + x */ fins->o = IR_ADD; fins->op2 = fins->op1; return RETRYFOLD; } else if (fins->o == IR_DIV) { /* x / 2^k ==> x * 2^-k */ uint64_t u = ir_knum(fright)->u64; uint32_t ex = ((uint32_t)(u >> 52) & 0x7ff); if ((u & U64x(000fffff,ffffffff)) == 0 && ex - 1 < 0x7fd) { u = (u & ((uint64_t)1 << 63)) | ((uint64_t)(0x7fe - ex) << 52); fins->o = IR_MUL; /* Multiply by exact reciprocal. */ fins->op2 = lj_ir_knum_u64(J, u); return RETRYFOLD; } } return NEXTFOLD; } LJFOLD(MUL NEG KNUM) LJFOLD(DIV NEG KNUM) LJFOLDF(simplify_nummuldiv_negk) { PHIBARRIER(fleft); fins->op1 = fleft->op1; /* (-a) o k ==> a o (-k) */ fins->op2 = (IRRef1)lj_ir_knum(J, -knumright); return RETRYFOLD; } LJFOLD(MUL NEG NEG) LJFOLD(DIV NEG NEG) LJFOLDF(simplify_nummuldiv_negneg) { PHIBARRIER(fleft); PHIBARRIER(fright); fins->op1 = fleft->op1; /* (-a) o (-b) ==> a o b */ fins->op2 = fright->op1; return RETRYFOLD; } LJFOLD(POW any KINT) LJFOLDF(simplify_numpow_xk) { int32_t k = fright->i; TRef ref = fins->op1; if (k == 0) /* x ^ 0 ==> 1 */ return lj_ir_knum_one(J); /* Result must be a number, not an int. */ if (k == 1) /* x ^ 1 ==> x */ return LEFTFOLD; if ((uint32_t)(k+65536) > 2*65536u) /* Limit code explosion. */ return NEXTFOLD; if (k < 0) { /* x ^ (-k) ==> (1/x) ^ k. */ ref = emitir(IRTN(IR_DIV), lj_ir_knum_one(J), ref); k = -k; } /* Unroll x^k for 1 <= k <= 65536. */ for (; (k & 1) == 0; k >>= 1) /* Handle leading zeros. */ ref = emitir(IRTN(IR_MUL), ref, ref); if ((k >>= 1) != 0) { /* Handle trailing bits. */ TRef tmp = emitir(IRTN(IR_MUL), ref, ref); for (; k != 1; k >>= 1) { if (k & 1) ref = emitir(IRTN(IR_MUL), ref, tmp); tmp = emitir(IRTN(IR_MUL), tmp, tmp); } ref = emitir(IRTN(IR_MUL), ref, tmp); } return ref; } LJFOLD(POW KNUM any) LJFOLDF(simplify_numpow_kx) { lua_Number n = knumleft; if (n == 2.0) { /* 2.0 ^ i ==> ldexp(1.0, tonum(i)) */ fins->o = IR_CONV; #if LJ_TARGET_X86ORX64 fins->op1 = fins->op2; fins->op2 = IRCONV_NUM_INT; fins->op2 = (IRRef1)lj_opt_fold(J); #endif fins->op1 = (IRRef1)lj_ir_knum_one(J); fins->o = IR_LDEXP; return RETRYFOLD; } return NEXTFOLD; } /* -- Simplify conversions ------------------------------------------------ */ LJFOLD(CONV CONV IRCONV_NUM_INT) /* _NUM */ LJFOLDF(shortcut_conv_num_int) { PHIBARRIER(fleft); /* Only safe with a guarded conversion to int. */ if ((fleft->op2 & IRCONV_SRCMASK) == IRT_NUM && irt_isguard(fleft->t)) return fleft->op1; /* f(g(x)) ==> x */ return NEXTFOLD; } LJFOLD(CONV CONV IRCONV_INT_NUM) /* _INT */ LJFOLD(CONV CONV IRCONV_U32_NUM) /* _U32*/ LJFOLDF(simplify_conv_int_num) { /* Fold even across PHI to avoid expensive num->int conversions in loop. */ if ((fleft->op2 & IRCONV_SRCMASK) == ((fins->op2 & IRCONV_DSTMASK) >> IRCONV_DSH)) return fleft->op1; return NEXTFOLD; } LJFOLD(CONV CONV IRCONV_I64_NUM) /* _INT or _U32 */ LJFOLD(CONV CONV IRCONV_U64_NUM) /* _INT or _U32 */ LJFOLDF(simplify_conv_i64_num) { PHIBARRIER(fleft); if ((fleft->op2 & IRCONV_SRCMASK) == IRT_INT) { /* Reduce to a sign-extension. */ fins->op1 = fleft->op1; fins->op2 = ((IRT_I64<<5)|IRT_INT|IRCONV_SEXT); return RETRYFOLD; } else if ((fleft->op2 & IRCONV_SRCMASK) == IRT_U32) { #if LJ_TARGET_X64 return fleft->op1; #else /* Reduce to a zero-extension. */ fins->op1 = fleft->op1; fins->op2 = (IRT_I64<<5)|IRT_U32; return RETRYFOLD; #endif } return NEXTFOLD; } LJFOLD(CONV CONV IRCONV_INT_I64) /* _INT or _U32 */ LJFOLD(CONV CONV IRCONV_INT_U64) /* _INT or _U32 */ LJFOLD(CONV CONV IRCONV_U32_I64) /* _INT or _U32 */ LJFOLD(CONV CONV IRCONV_U32_U64) /* _INT or _U32 */ LJFOLDF(simplify_conv_int_i64) { int src; PHIBARRIER(fleft); src = (fleft->op2 & IRCONV_SRCMASK); if (src == IRT_INT || src == IRT_U32) { if (src == ((fins->op2 & IRCONV_DSTMASK) >> IRCONV_DSH)) { return fleft->op1; } else { fins->op2 = ((fins->op2 & IRCONV_DSTMASK) | src); fins->op1 = fleft->op1; return RETRYFOLD; } } return NEXTFOLD; } LJFOLD(CONV CONV IRCONV_FLOAT_NUM) /* _FLOAT */ LJFOLDF(simplify_conv_flt_num) { PHIBARRIER(fleft); if ((fleft->op2 & IRCONV_SRCMASK) == IRT_FLOAT) return fleft->op1; return NEXTFOLD; } /* Shortcut TOBIT + IRT_NUM <- IRT_INT/IRT_U32 conversion. */ LJFOLD(TOBIT CONV KNUM) LJFOLDF(simplify_tobit_conv) { if ((fleft->op2 & IRCONV_SRCMASK) == IRT_INT || (fleft->op2 & IRCONV_SRCMASK) == IRT_U32) { /* Fold even across PHI to avoid expensive num->int conversions in loop. */ lua_assert(irt_isnum(fleft->t)); return fleft->op1; } return NEXTFOLD; } /* Shortcut floor/ceil/round + IRT_NUM <- IRT_INT/IRT_U32 conversion. */ LJFOLD(FPMATH CONV IRFPM_FLOOR) LJFOLD(FPMATH CONV IRFPM_CEIL) LJFOLD(FPMATH CONV IRFPM_TRUNC) LJFOLDF(simplify_floor_conv) { if ((fleft->op2 & IRCONV_SRCMASK) == IRT_INT || (fleft->op2 & IRCONV_SRCMASK) == IRT_U32) return LEFTFOLD; return NEXTFOLD; } /* Strength reduction of widening. */ LJFOLD(CONV any IRCONV_I64_INT) LJFOLD(CONV any IRCONV_U64_INT) LJFOLDF(simplify_conv_sext) { IRRef ref = fins->op1; int64_t ofs = 0; if (!(fins->op2 & IRCONV_SEXT)) return NEXTFOLD; PHIBARRIER(fleft); if (fleft->o == IR_XLOAD && (irt_isu8(fleft->t) || irt_isu16(fleft->t))) goto ok_reduce; if (fleft->o == IR_ADD && irref_isk(fleft->op2)) { ofs = (int64_t)IR(fleft->op2)->i; ref = fleft->op1; } /* Use scalar evolution analysis results to strength-reduce sign-extension. */ if (ref == J->scev.idx) { IRRef lo = J->scev.dir ? J->scev.start : J->scev.stop; lua_assert(irt_isint(J->scev.t)); if (lo && IR(lo)->i + ofs >= 0) { ok_reduce: #if LJ_TARGET_X64 /* Eliminate widening. All 32 bit ops do an implicit zero-extension. */ return LEFTFOLD; #else /* Reduce to a (cheaper) zero-extension. */ fins->op2 &= ~IRCONV_SEXT; return RETRYFOLD; #endif } } return NEXTFOLD; } /* Strength reduction of narrowing. */ LJFOLD(CONV ADD IRCONV_INT_I64) LJFOLD(CONV SUB IRCONV_INT_I64) LJFOLD(CONV MUL IRCONV_INT_I64) LJFOLD(CONV ADD IRCONV_INT_U64) LJFOLD(CONV SUB IRCONV_INT_U64) LJFOLD(CONV MUL IRCONV_INT_U64) LJFOLD(CONV ADD IRCONV_U32_I64) LJFOLD(CONV SUB IRCONV_U32_I64) LJFOLD(CONV MUL IRCONV_U32_I64) LJFOLD(CONV ADD IRCONV_U32_U64) LJFOLD(CONV SUB IRCONV_U32_U64) LJFOLD(CONV MUL IRCONV_U32_U64) LJFOLDF(simplify_conv_narrow) { IROp op = (IROp)fleft->o; IRType t = irt_type(fins->t); IRRef op1 = fleft->op1, op2 = fleft->op2, mode = fins->op2; PHIBARRIER(fleft); op1 = emitir(IRTI(IR_CONV), op1, mode); op2 = emitir(IRTI(IR_CONV), op2, mode); fins->ot = IRT(op, t); fins->op1 = op1; fins->op2 = op2; return RETRYFOLD; } /* Special CSE rule for CONV. */ LJFOLD(CONV any any) LJFOLDF(cse_conv) { if (LJ_LIKELY(J->flags & JIT_F_OPT_CSE)) { IRRef op1 = fins->op1, op2 = (fins->op2 & IRCONV_MODEMASK); uint8_t guard = irt_isguard(fins->t); IRRef ref = J->chain[IR_CONV]; while (ref > op1) { IRIns *ir = IR(ref); /* Commoning with stronger checks is ok. */ if (ir->op1 == op1 && (ir->op2 & IRCONV_MODEMASK) == op2 && irt_isguard(ir->t) >= guard) return ref; ref = ir->prev; } } return EMITFOLD; /* No fallthrough to regular CSE. */ } /* FP conversion narrowing. */ LJFOLD(TOBIT ADD KNUM) LJFOLD(TOBIT SUB KNUM) LJFOLD(CONV ADD IRCONV_INT_NUM) LJFOLD(CONV SUB IRCONV_INT_NUM) LJFOLD(CONV ADD IRCONV_I64_NUM) LJFOLD(CONV SUB IRCONV_I64_NUM) LJFOLDF(narrow_convert) { PHIBARRIER(fleft); /* Narrowing ignores PHIs and repeating it inside the loop is not useful. */ if (J->chain[IR_LOOP]) return NEXTFOLD; lua_assert(fins->o != IR_CONV || (fins->op2&IRCONV_CONVMASK) != IRCONV_TOBIT); return lj_opt_narrow_convert(J); } /* -- Integer algebraic simplifications ----------------------------------- */ LJFOLD(ADD any KINT) LJFOLD(ADDOV any KINT) LJFOLD(SUBOV any KINT) LJFOLDF(simplify_intadd_k) { if (fright->i == 0) /* i o 0 ==> i */ return LEFTFOLD; return NEXTFOLD; } LJFOLD(MULOV any KINT) LJFOLDF(simplify_intmul_k) { if (fright->i == 0) /* i * 0 ==> 0 */ return RIGHTFOLD; if (fright->i == 1) /* i * 1 ==> i */ return LEFTFOLD; if (fright->i == 2) { /* i * 2 ==> i + i */ fins->o = IR_ADDOV; fins->op2 = fins->op1; return RETRYFOLD; } return NEXTFOLD; } LJFOLD(SUB any KINT) LJFOLDF(simplify_intsub_k) { if (fright->i == 0) /* i - 0 ==> i */ return LEFTFOLD; fins->o = IR_ADD; /* i - k ==> i + (-k) */ fins->op2 = (IRRef1)lj_ir_kint(J, -fright->i); /* Overflow for -2^31 ok. */ return RETRYFOLD; } LJFOLD(SUB KINT any) LJFOLD(SUB KINT64 any) LJFOLDF(simplify_intsub_kleft) { if (fleft->o == IR_KINT ? (fleft->i == 0) : (ir_kint64(fleft)->u64 == 0)) { fins->o = IR_NEG; /* 0 - i ==> -i */ fins->op1 = fins->op2; return RETRYFOLD; } return NEXTFOLD; } LJFOLD(ADD any KINT64) LJFOLDF(simplify_intadd_k64) { if (ir_kint64(fright)->u64 == 0) /* i + 0 ==> i */ return LEFTFOLD; return NEXTFOLD; } LJFOLD(SUB any KINT64) LJFOLDF(simplify_intsub_k64) { uint64_t k = ir_kint64(fright)->u64; if (k == 0) /* i - 0 ==> i */ return LEFTFOLD; fins->o = IR_ADD; /* i - k ==> i + (-k) */ fins->op2 = (IRRef1)lj_ir_kint64(J, (uint64_t)-(int64_t)k); return RETRYFOLD; } static TRef simplify_intmul_k(jit_State *J, int32_t k) { /* Note: many more simplifications are possible, e.g. 2^k1 +- 2^k2. ** But this is mainly intended for simple address arithmetic. ** Also it's easier for the backend to optimize the original multiplies. */ if (k == 1) { /* i * 1 ==> i */ return LEFTFOLD; } else if ((k & (k-1)) == 0) { /* i * 2^k ==> i << k */ fins->o = IR_BSHL; fins->op2 = lj_ir_kint(J, lj_fls((uint32_t)k)); return RETRYFOLD; } return NEXTFOLD; } LJFOLD(MUL any KINT) LJFOLDF(simplify_intmul_k32) { if (fright->i == 0) /* i * 0 ==> 0 */ return INTFOLD(0); else if (fright->i > 0) return simplify_intmul_k(J, fright->i); return NEXTFOLD; } LJFOLD(MUL any KINT64) LJFOLDF(simplify_intmul_k64) { if (ir_kint64(fright)->u64 == 0) /* i * 0 ==> 0 */ return INT64FOLD(0); #if LJ_64 /* NYI: SPLIT for BSHL and 32 bit backend support. */ else if (ir_kint64(fright)->u64 < 0x80000000u) return simplify_intmul_k(J, (int32_t)ir_kint64(fright)->u64); #endif return NEXTFOLD; } LJFOLD(MOD any KINT) LJFOLDF(simplify_intmod_k) { int32_t k = fright->i; lua_assert(k != 0); if (k > 0 && (k & (k-1)) == 0) { /* i % (2^k) ==> i & (2^k-1) */ fins->o = IR_BAND; fins->op2 = lj_ir_kint(J, k-1); return RETRYFOLD; } return NEXTFOLD; } LJFOLD(MOD KINT any) LJFOLDF(simplify_intmod_kleft) { if (fleft->i == 0) return INTFOLD(0); return NEXTFOLD; } LJFOLD(SUB any any) LJFOLD(SUBOV any any) LJFOLDF(simplify_intsub) { if (fins->op1 == fins->op2 && !irt_isnum(fins->t)) /* i - i ==> 0 */ return irt_is64(fins->t) ? INT64FOLD(0) : INTFOLD(0); return NEXTFOLD; } LJFOLD(SUB ADD any) LJFOLDF(simplify_intsubadd_leftcancel) { if (!irt_isnum(fins->t)) { PHIBARRIER(fleft); if (fins->op2 == fleft->op1) /* (i + j) - i ==> j */ return fleft->op2; if (fins->op2 == fleft->op2) /* (i + j) - j ==> i */ return fleft->op1; } return NEXTFOLD; } LJFOLD(SUB SUB any) LJFOLDF(simplify_intsubsub_leftcancel) { if (!irt_isnum(fins->t)) { PHIBARRIER(fleft); if (fins->op2 == fleft->op1) { /* (i - j) - i ==> 0 - j */ fins->op1 = (IRRef1)lj_ir_kint(J, 0); fins->op2 = fleft->op2; return RETRYFOLD; } } return NEXTFOLD; } LJFOLD(SUB any SUB) LJFOLDF(simplify_intsubsub_rightcancel) { if (!irt_isnum(fins->t)) { PHIBARRIER(fright); if (fins->op1 == fright->op1) /* i - (i - j) ==> j */ return fright->op2; } return NEXTFOLD; } LJFOLD(SUB any ADD) LJFOLDF(simplify_intsubadd_rightcancel) { if (!irt_isnum(fins->t)) { PHIBARRIER(fright); if (fins->op1 == fright->op1) { /* i - (i + j) ==> 0 - j */ fins->op2 = fright->op2; fins->op1 = (IRRef1)lj_ir_kint(J, 0); return RETRYFOLD; } if (fins->op1 == fright->op2) { /* i - (j + i) ==> 0 - j */ fins->op2 = fright->op1; fins->op1 = (IRRef1)lj_ir_kint(J, 0); return RETRYFOLD; } } return NEXTFOLD; } LJFOLD(SUB ADD ADD) LJFOLDF(simplify_intsubaddadd_cancel) { if (!irt_isnum(fins->t)) { PHIBARRIER(fleft); PHIBARRIER(fright); if (fleft->op1 == fright->op1) { /* (i + j1) - (i + j2) ==> j1 - j2 */ fins->op1 = fleft->op2; fins->op2 = fright->op2; return RETRYFOLD; } if (fleft->op1 == fright->op2) { /* (i + j1) - (j2 + i) ==> j1 - j2 */ fins->op1 = fleft->op2; fins->op2 = fright->op1; return RETRYFOLD; } if (fleft->op2 == fright->op1) { /* (j1 + i) - (i + j2) ==> j1 - j2 */ fins->op1 = fleft->op1; fins->op2 = fright->op2; return RETRYFOLD; } if (fleft->op2 == fright->op2) { /* (j1 + i) - (j2 + i) ==> j1 - j2 */ fins->op1 = fleft->op1; fins->op2 = fright->op1; return RETRYFOLD; } } return NEXTFOLD; } LJFOLD(BAND any KINT) LJFOLD(BAND any KINT64) LJFOLDF(simplify_band_k) { int64_t k = fright->o == IR_KINT ? (int64_t)fright->i : (int64_t)ir_k64(fright)->u64; if (k == 0) /* i & 0 ==> 0 */ return RIGHTFOLD; if (k == -1) /* i & -1 ==> i */ return LEFTFOLD; return NEXTFOLD; } LJFOLD(BOR any KINT) LJFOLD(BOR any KINT64) LJFOLDF(simplify_bor_k) { int64_t k = fright->o == IR_KINT ? (int64_t)fright->i : (int64_t)ir_k64(fright)->u64; if (k == 0) /* i | 0 ==> i */ return LEFTFOLD; if (k == -1) /* i | -1 ==> -1 */ return RIGHTFOLD; return NEXTFOLD; } LJFOLD(BXOR any KINT) LJFOLD(BXOR any KINT64) LJFOLDF(simplify_bxor_k) { int64_t k = fright->o == IR_KINT ? (int64_t)fright->i : (int64_t)ir_k64(fright)->u64; if (k == 0) /* i xor 0 ==> i */ return LEFTFOLD; if (k == -1) { /* i xor -1 ==> ~i */ fins->o = IR_BNOT; fins->op2 = 0; return RETRYFOLD; } return NEXTFOLD; } LJFOLD(BSHL any KINT) LJFOLD(BSHR any KINT) LJFOLD(BSAR any KINT) LJFOLD(BROL any KINT) LJFOLD(BROR any KINT) LJFOLDF(simplify_shift_ik) { int32_t mask = irt_is64(fins->t) ? 63 : 31; int32_t k = (fright->i & mask); if (k == 0) /* i o 0 ==> i */ return LEFTFOLD; if (k == 1 && fins->o == IR_BSHL) { /* i << 1 ==> i + i */ fins->o = IR_ADD; fins->op2 = fins->op1; return RETRYFOLD; } if (k != fright->i) { /* i o k ==> i o (k & mask) */ fins->op2 = (IRRef1)lj_ir_kint(J, k); return RETRYFOLD; } #ifndef LJ_TARGET_UNIFYROT if (fins->o == IR_BROR) { /* bror(i, k) ==> brol(i, (-k)&mask) */ fins->o = IR_BROL; fins->op2 = (IRRef1)lj_ir_kint(J, (-k)&mask); return RETRYFOLD; } #endif return NEXTFOLD; } LJFOLD(BSHL any BAND) LJFOLD(BSHR any BAND) LJFOLD(BSAR any BAND) LJFOLD(BROL any BAND) LJFOLD(BROR any BAND) LJFOLDF(simplify_shift_andk) { IRIns *irk = IR(fright->op2); PHIBARRIER(fright); if ((fins->o < IR_BROL ? LJ_TARGET_MASKSHIFT : LJ_TARGET_MASKROT) && irk->o == IR_KINT) { /* i o (j & mask) ==> i o j */ int32_t mask = irt_is64(fins->t) ? 63 : 31; int32_t k = irk->i & mask; if (k == mask) { fins->op2 = fright->op1; return RETRYFOLD; } } return NEXTFOLD; } LJFOLD(BSHL KINT any) LJFOLD(BSHR KINT any) LJFOLD(BSHL KINT64 any) LJFOLD(BSHR KINT64 any) LJFOLDF(simplify_shift1_ki) { int64_t k = fleft->o == IR_KINT ? (int64_t)fleft->i : (int64_t)ir_k64(fleft)->u64; if (k == 0) /* 0 o i ==> 0 */ return LEFTFOLD; return NEXTFOLD; } LJFOLD(BSAR KINT any) LJFOLD(BROL KINT any) LJFOLD(BROR KINT any) LJFOLD(BSAR KINT64 any) LJFOLD(BROL KINT64 any) LJFOLD(BROR KINT64 any) LJFOLDF(simplify_shift2_ki) { int64_t k = fleft->o == IR_KINT ? (int64_t)fleft->i : (int64_t)ir_k64(fleft)->u64; if (k == 0 || k == -1) /* 0 o i ==> 0; -1 o i ==> -1 */ return LEFTFOLD; return NEXTFOLD; } LJFOLD(BSHL BAND KINT) LJFOLD(BSHR BAND KINT) LJFOLD(BROL BAND KINT) LJFOLD(BROR BAND KINT) LJFOLDF(simplify_shiftk_andk) { IRIns *irk = IR(fleft->op2); PHIBARRIER(fleft); if (irk->o == IR_KINT) { /* (i & k1) o k2 ==> (i o k2) & (k1 o k2) */ int32_t k = kfold_intop(irk->i, fright->i, (IROp)fins->o); fins->op1 = fleft->op1; fins->op1 = (IRRef1)lj_opt_fold(J); fins->op2 = (IRRef1)lj_ir_kint(J, k); fins->ot = IRTI(IR_BAND); return RETRYFOLD; } return NEXTFOLD; } LJFOLD(BAND BSHL KINT) LJFOLD(BAND BSHR KINT) LJFOLDF(simplify_andk_shiftk) { IRIns *irk = IR(fleft->op2); if (irk->o == IR_KINT && kfold_intop(-1, irk->i, (IROp)fleft->o) == fright->i) return LEFTFOLD; /* (i o k1) & k2 ==> i, if (-1 o k1) == k2 */ return NEXTFOLD; } /* -- Reassociation ------------------------------------------------------- */ LJFOLD(ADD ADD KINT) LJFOLD(MUL MUL KINT) LJFOLD(BAND BAND KINT) LJFOLD(BOR BOR KINT) LJFOLD(BXOR BXOR KINT) LJFOLDF(reassoc_intarith_k) { IRIns *irk = IR(fleft->op2); if (irk->o == IR_KINT) { int32_t k = kfold_intop(irk->i, fright->i, (IROp)fins->o); if (k == irk->i) /* (i o k1) o k2 ==> i o k1, if (k1 o k2) == k1. */ return LEFTFOLD; PHIBARRIER(fleft); fins->op1 = fleft->op1; fins->op2 = (IRRef1)lj_ir_kint(J, k); return RETRYFOLD; /* (i o k1) o k2 ==> i o (k1 o k2) */ } return NEXTFOLD; } LJFOLD(ADD ADD KINT64) LJFOLD(MUL MUL KINT64) LJFOLD(BAND BAND KINT64) LJFOLD(BOR BOR KINT64) LJFOLD(BXOR BXOR KINT64) LJFOLDF(reassoc_intarith_k64) { #if LJ_HASFFI || LJ_64 IRIns *irk = IR(fleft->op2); if (irk->o == IR_KINT64) { uint64_t k = kfold_int64arith(ir_k64(irk)->u64, ir_k64(fright)->u64, (IROp)fins->o); PHIBARRIER(fleft); fins->op1 = fleft->op1; fins->op2 = (IRRef1)lj_ir_kint64(J, k); return RETRYFOLD; /* (i o k1) o k2 ==> i o (k1 o k2) */ } return NEXTFOLD; #else UNUSED(J); lua_assert(0); return FAILFOLD; #endif } LJFOLD(MIN MIN any) LJFOLD(MAX MAX any) LJFOLD(BAND BAND any) LJFOLD(BOR BOR any) LJFOLDF(reassoc_dup) { if (fins->op2 == fleft->op1 || fins->op2 == fleft->op2) return LEFTFOLD; /* (a o b) o a ==> a o b; (a o b) o b ==> a o b */ return NEXTFOLD; } LJFOLD(BXOR BXOR any) LJFOLDF(reassoc_bxor) { PHIBARRIER(fleft); if (fins->op2 == fleft->op1) /* (a xor b) xor a ==> b */ return fleft->op2; if (fins->op2 == fleft->op2) /* (a xor b) xor b ==> a */ return fleft->op1; return NEXTFOLD; } LJFOLD(BSHL BSHL KINT) LJFOLD(BSHR BSHR KINT) LJFOLD(BSAR BSAR KINT) LJFOLD(BROL BROL KINT) LJFOLD(BROR BROR KINT) LJFOLDF(reassoc_shift) { IRIns *irk = IR(fleft->op2); PHIBARRIER(fleft); /* The (shift any KINT) rule covers k2 == 0 and more. */ if (irk->o == IR_KINT) { /* (i o k1) o k2 ==> i o (k1 + k2) */ int32_t mask = irt_is64(fins->t) ? 63 : 31; int32_t k = (irk->i & mask) + (fright->i & mask); if (k > mask) { /* Combined shift too wide? */ if (fins->o == IR_BSHL || fins->o == IR_BSHR) return mask == 31 ? INTFOLD(0) : INT64FOLD(0); else if (fins->o == IR_BSAR) k = mask; else k &= mask; } fins->op1 = fleft->op1; fins->op2 = (IRRef1)lj_ir_kint(J, k); return RETRYFOLD; } return NEXTFOLD; } LJFOLD(MIN MIN KNUM) LJFOLD(MAX MAX KNUM) LJFOLD(MIN MIN KINT) LJFOLD(MAX MAX KINT) LJFOLDF(reassoc_minmax_k) { IRIns *irk = IR(fleft->op2); if (irk->o == IR_KNUM) { lua_Number a = ir_knum(irk)->n; lua_Number y = lj_vm_foldarith(a, knumright, fins->o - IR_ADD); if (a == y) /* (x o k1) o k2 ==> x o k1, if (k1 o k2) == k1. */ return LEFTFOLD; PHIBARRIER(fleft); fins->op1 = fleft->op1; fins->op2 = (IRRef1)lj_ir_knum(J, y); return RETRYFOLD; /* (x o k1) o k2 ==> x o (k1 o k2) */ } else if (irk->o == IR_KINT) { int32_t a = irk->i; int32_t y = kfold_intop(a, fright->i, fins->o); if (a == y) /* (x o k1) o k2 ==> x o k1, if (k1 o k2) == k1. */ return LEFTFOLD; PHIBARRIER(fleft); fins->op1 = fleft->op1; fins->op2 = (IRRef1)lj_ir_kint(J, y); return RETRYFOLD; /* (x o k1) o k2 ==> x o (k1 o k2) */ } return NEXTFOLD; } LJFOLD(MIN MAX any) LJFOLD(MAX MIN any) LJFOLDF(reassoc_minmax_left) { if (fins->op2 == fleft->op1 || fins->op2 == fleft->op2) return RIGHTFOLD; /* (b o1 a) o2 b ==> b; (a o1 b) o2 b ==> b */ return NEXTFOLD; } LJFOLD(MIN any MAX) LJFOLD(MAX any MIN) LJFOLDF(reassoc_minmax_right) { if (fins->op1 == fright->op1 || fins->op1 == fright->op2) return LEFTFOLD; /* a o2 (a o1 b) ==> a; a o2 (b o1 a) ==> a */ return NEXTFOLD; } /* -- Array bounds check elimination -------------------------------------- */ /* Eliminate ABC across PHIs to handle t[i-1] forwarding case. ** ABC(asize, (i+k)+(-k)) ==> ABC(asize, i), but only if it already exists. ** Could be generalized to (i+k1)+k2 ==> i+(k1+k2), but needs better disambig. */ LJFOLD(ABC any ADD) LJFOLDF(abc_fwd) { if (LJ_LIKELY(J->flags & JIT_F_OPT_ABC)) { if (irref_isk(fright->op2)) { IRIns *add2 = IR(fright->op1); if (add2->o == IR_ADD && irref_isk(add2->op2) && IR(fright->op2)->i == -IR(add2->op2)->i) { IRRef ref = J->chain[IR_ABC]; IRRef lim = add2->op1; if (fins->op1 > lim) lim = fins->op1; while (ref > lim) { IRIns *ir = IR(ref); if (ir->op1 == fins->op1 && ir->op2 == add2->op1) return DROPFOLD; ref = ir->prev; } } } } return NEXTFOLD; } /* Eliminate ABC for constants. ** ABC(asize, k1), ABC(asize k2) ==> ABC(asize, max(k1, k2)) ** Drop second ABC if k2 is lower. Otherwise patch first ABC with k2. */ LJFOLD(ABC any KINT) LJFOLDF(abc_k) { if (LJ_LIKELY(J->flags & JIT_F_OPT_ABC)) { IRRef ref = J->chain[IR_ABC]; IRRef asize = fins->op1; while (ref > asize) { IRIns *ir = IR(ref); if (ir->op1 == asize && irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (fright->i > k) ir->op2 = fins->op2; return DROPFOLD; } ref = ir->prev; } return EMITFOLD; /* Already performed CSE. */ } return NEXTFOLD; } /* Eliminate invariant ABC inside loop. */ LJFOLD(ABC any any) LJFOLDF(abc_invar) { /* Invariant ABC marked as PTR. Drop if op1 is invariant, too. */ if (!irt_isint(fins->t) && fins->op1 < J->chain[IR_LOOP]) return DROPFOLD; return NEXTFOLD; } /* -- Commutativity ------------------------------------------------------- */ /* The refs of commutative ops are canonicalized. Lower refs go to the right. ** Rationale behind this: ** - It (also) moves constants to the right. ** - It reduces the number of FOLD rules (e.g. (BOR any KINT) suffices). ** - It helps CSE to find more matches. ** - The assembler generates better code with constants at the right. */ LJFOLD(ADD any any) LJFOLD(MUL any any) LJFOLD(ADDOV any any) LJFOLD(MULOV any any) LJFOLDF(comm_swap) { if (fins->op1 < fins->op2) { /* Move lower ref to the right. */ IRRef1 tmp = fins->op1; fins->op1 = fins->op2; fins->op2 = tmp; return RETRYFOLD; } return NEXTFOLD; } LJFOLD(EQ any any) LJFOLD(NE any any) LJFOLDF(comm_equal) { /* For non-numbers only: x == x ==> drop; x ~= x ==> fail */ if (fins->op1 == fins->op2 && !irt_isnum(fins->t)) return CONDFOLD(fins->o == IR_EQ); return fold_comm_swap(J); } LJFOLD(LT any any) LJFOLD(GE any any) LJFOLD(LE any any) LJFOLD(GT any any) LJFOLD(ULT any any) LJFOLD(UGE any any) LJFOLD(ULE any any) LJFOLD(UGT any any) LJFOLDF(comm_comp) { /* For non-numbers only: x <=> x ==> drop; x <> x ==> fail */ if (fins->op1 == fins->op2 && !irt_isnum(fins->t)) return CONDFOLD((fins->o ^ (fins->o >> 1)) & 1); if (fins->op1 < fins->op2) { /* Move lower ref to the right. */ IRRef1 tmp = fins->op1; fins->op1 = fins->op2; fins->op2 = tmp; fins->o ^= 3; /* GT <-> LT, GE <-> LE, does not affect U */ return RETRYFOLD; } return NEXTFOLD; } LJFOLD(BAND any any) LJFOLD(BOR any any) LJFOLD(MIN any any) LJFOLD(MAX any any) LJFOLDF(comm_dup) { if (fins->op1 == fins->op2) /* x o x ==> x */ return LEFTFOLD; return fold_comm_swap(J); } LJFOLD(BXOR any any) LJFOLDF(comm_bxor) { if (fins->op1 == fins->op2) /* i xor i ==> 0 */ return irt_is64(fins->t) ? INT64FOLD(0) : INTFOLD(0); return fold_comm_swap(J); } /* -- Simplification of compound expressions ------------------------------ */ static TRef kfold_xload(jit_State *J, IRIns *ir, const void *p) { int32_t k; switch (irt_type(ir->t)) { case IRT_NUM: return lj_ir_knum_u64(J, *(uint64_t *)p); case IRT_I8: k = (int32_t)*(int8_t *)p; break; case IRT_U8: k = (int32_t)*(uint8_t *)p; break; case IRT_I16: k = (int32_t)(int16_t)lj_getu16(p); break; case IRT_U16: k = (int32_t)(uint16_t)lj_getu16(p); break; case IRT_INT: case IRT_U32: k = (int32_t)lj_getu32(p); break; case IRT_I64: case IRT_U64: return lj_ir_kint64(J, *(uint64_t *)p); default: return 0; } return lj_ir_kint(J, k); } /* Turn: string.sub(str, a, b) == kstr ** into: string.byte(str, a) == string.byte(kstr, 1) etc. ** Note: this creates unaligned XLOADs on x86/x64. */ LJFOLD(EQ SNEW KGC) LJFOLD(NE SNEW KGC) LJFOLDF(merge_eqne_snew_kgc) { GCstr *kstr = ir_kstr(fright); int32_t len = (int32_t)kstr->len; lua_assert(irt_isstr(fins->t)); #if LJ_TARGET_UNALIGNED #define FOLD_SNEW_MAX_LEN 4 /* Handle string lengths 0, 1, 2, 3, 4. */ #define FOLD_SNEW_TYPE8 IRT_I8 /* Creates shorter immediates. */ #else #define FOLD_SNEW_MAX_LEN 1 /* Handle string lengths 0 or 1. */ #define FOLD_SNEW_TYPE8 IRT_U8 /* Prefer unsigned loads. */ #endif PHIBARRIER(fleft); if (len <= FOLD_SNEW_MAX_LEN) { IROp op = (IROp)fins->o; IRRef strref = fleft->op1; lua_assert(IR(strref)->o == IR_STRREF); if (op == IR_EQ) { emitir(IRTGI(IR_EQ), fleft->op2, lj_ir_kint(J, len)); /* Caveat: fins/fleft/fright is no longer valid after emitir. */ } else { /* NE is not expanded since this would need an OR of two conds. */ if (!irref_isk(fleft->op2)) /* Only handle the constant length case. */ return NEXTFOLD; if (IR(fleft->op2)->i != len) return DROPFOLD; } if (len > 0) { /* A 4 byte load for length 3 is ok -- all strings have an extra NUL. */ uint16_t ot = (uint16_t)(len == 1 ? IRT(IR_XLOAD, FOLD_SNEW_TYPE8) : len == 2 ? IRT(IR_XLOAD, IRT_U16) : IRTI(IR_XLOAD)); TRef tmp = emitir(ot, strref, IRXLOAD_READONLY | (len > 1 ? IRXLOAD_UNALIGNED : 0)); TRef val = kfold_xload(J, IR(tref_ref(tmp)), strdata(kstr)); if (len == 3) tmp = emitir(IRTI(IR_BAND), tmp, lj_ir_kint(J, LJ_ENDIAN_SELECT(0x00ffffff, 0xffffff00))); fins->op1 = (IRRef1)tmp; fins->op2 = (IRRef1)val; fins->ot = (IROpT)IRTGI(op); return RETRYFOLD; } else { return DROPFOLD; } } return NEXTFOLD; } /* -- Loads --------------------------------------------------------------- */ /* Loads cannot be folded or passed on to CSE in general. ** Alias analysis is needed to check for forwarding opportunities. ** ** Caveat: *all* loads must be listed here or they end up at CSE! */ LJFOLD(ALOAD any) LJFOLDX(lj_opt_fwd_aload) /* From HREF fwd (see below). Must eliminate, not supported by fwd/backend. */ LJFOLD(HLOAD KKPTR) LJFOLDF(kfold_hload_kkptr) { UNUSED(J); lua_assert(ir_kptr(fleft) == niltvg(J2G(J))); return TREF_NIL; } LJFOLD(HLOAD any) LJFOLDX(lj_opt_fwd_hload) LJFOLD(ULOAD any) LJFOLDX(lj_opt_fwd_uload) LJFOLD(CALLL any IRCALL_lj_tab_len) LJFOLDX(lj_opt_fwd_tab_len) /* Upvalue refs are really loads, but there are no corresponding stores. ** So CSE is ok for them, except for UREFO across a GC step (see below). ** If the referenced function is const, its upvalue addresses are const, too. ** This can be used to improve CSE by looking for the same address, ** even if the upvalues originate from a different function. */ LJFOLD(UREFO KGC any) LJFOLD(UREFC KGC any) LJFOLDF(cse_uref) { if (LJ_LIKELY(J->flags & JIT_F_OPT_CSE)) { IRRef ref = J->chain[fins->o]; GCfunc *fn = ir_kfunc(fleft); GCupval *uv = gco2uv(gcref(fn->l.uvptr[(fins->op2 >> 8)])); while (ref > 0) { IRIns *ir = IR(ref); if (irref_isk(ir->op1)) { GCfunc *fn2 = ir_kfunc(IR(ir->op1)); if (gco2uv(gcref(fn2->l.uvptr[(ir->op2 >> 8)])) == uv) { if (fins->o == IR_UREFO && gcstep_barrier(J, ref)) break; return ref; } } ref = ir->prev; } } return EMITFOLD; } LJFOLD(HREFK any any) LJFOLDX(lj_opt_fwd_hrefk) LJFOLD(HREF TNEW any) LJFOLDF(fwd_href_tnew) { if (lj_opt_fwd_href_nokey(J)) return lj_ir_kkptr(J, niltvg(J2G(J))); return NEXTFOLD; } LJFOLD(HREF TDUP KPRI) LJFOLD(HREF TDUP KGC) LJFOLD(HREF TDUP KNUM) LJFOLDF(fwd_href_tdup) { TValue keyv; lj_ir_kvalue(J->L, &keyv, fright); if (lj_tab_get(J->L, ir_ktab(IR(fleft->op1)), &keyv) == niltvg(J2G(J)) && lj_opt_fwd_href_nokey(J)) return lj_ir_kkptr(J, niltvg(J2G(J))); return NEXTFOLD; } /* We can safely FOLD/CSE array/hash refs and field loads, since there ** are no corresponding stores. But we need to check for any NEWREF with ** an aliased table, as it may invalidate all of the pointers and fields. ** Only HREF needs the NEWREF check -- AREF and HREFK already depend on ** FLOADs. And NEWREF itself is treated like a store (see below). */ LJFOLD(FLOAD TNEW IRFL_TAB_ASIZE) LJFOLDF(fload_tab_tnew_asize) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1)) return INTFOLD(fleft->op1); return NEXTFOLD; } LJFOLD(FLOAD TNEW IRFL_TAB_HMASK) LJFOLDF(fload_tab_tnew_hmask) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1)) return INTFOLD((1 << fleft->op2)-1); return NEXTFOLD; } LJFOLD(FLOAD TDUP IRFL_TAB_ASIZE) LJFOLDF(fload_tab_tdup_asize) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1)) return INTFOLD((int32_t)ir_ktab(IR(fleft->op1))->asize); return NEXTFOLD; } LJFOLD(FLOAD TDUP IRFL_TAB_HMASK) LJFOLDF(fload_tab_tdup_hmask) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && lj_opt_fwd_tptr(J, fins->op1)) return INTFOLD((int32_t)ir_ktab(IR(fleft->op1))->hmask); return NEXTFOLD; } LJFOLD(HREF any any) LJFOLD(FLOAD any IRFL_TAB_ARRAY) LJFOLD(FLOAD any IRFL_TAB_NODE) LJFOLD(FLOAD any IRFL_TAB_ASIZE) LJFOLD(FLOAD any IRFL_TAB_HMASK) LJFOLDF(fload_tab_ah) { TRef tr = lj_opt_cse(J); return lj_opt_fwd_tptr(J, tref_ref(tr)) ? tr : EMITFOLD; } /* Strings are immutable, so we can safely FOLD/CSE the related FLOAD. */ LJFOLD(FLOAD KGC IRFL_STR_LEN) LJFOLDF(fload_str_len_kgc) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD)) return INTFOLD((int32_t)ir_kstr(fleft)->len); return NEXTFOLD; } LJFOLD(FLOAD SNEW IRFL_STR_LEN) LJFOLDF(fload_str_len_snew) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD)) { PHIBARRIER(fleft); return fleft->op2; } return NEXTFOLD; } /* The C type ID of cdata objects is immutable. */ LJFOLD(FLOAD KGC IRFL_CDATA_CTYPEID) LJFOLDF(fload_cdata_typeid_kgc) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD)) return INTFOLD((int32_t)ir_kcdata(fleft)->ctypeid); return NEXTFOLD; } /* Get the contents of immutable cdata objects. */ LJFOLD(FLOAD KGC IRFL_CDATA_PTR) LJFOLD(FLOAD KGC IRFL_CDATA_INT) LJFOLD(FLOAD KGC IRFL_CDATA_INT64) LJFOLDF(fload_cdata_int64_kgc) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD)) { void *p = cdataptr(ir_kcdata(fleft)); if (irt_is64(fins->t)) return INT64FOLD(*(uint64_t *)p); else return INTFOLD(*(int32_t *)p); } return NEXTFOLD; } LJFOLD(FLOAD CNEW IRFL_CDATA_CTYPEID) LJFOLD(FLOAD CNEWI IRFL_CDATA_CTYPEID) LJFOLDF(fload_cdata_typeid_cnew) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD)) return fleft->op1; /* No PHI barrier needed. CNEW/CNEWI op1 is const. */ return NEXTFOLD; } /* Pointer, int and int64 cdata objects are immutable. */ LJFOLD(FLOAD CNEWI IRFL_CDATA_PTR) LJFOLD(FLOAD CNEWI IRFL_CDATA_INT) LJFOLD(FLOAD CNEWI IRFL_CDATA_INT64) LJFOLDF(fload_cdata_ptr_int64_cnew) { if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD)) return fleft->op2; /* Fold even across PHI to avoid allocations. */ return NEXTFOLD; } LJFOLD(FLOAD any IRFL_STR_LEN) LJFOLD(FLOAD any IRFL_CDATA_CTYPEID) LJFOLD(FLOAD any IRFL_CDATA_PTR) LJFOLD(FLOAD any IRFL_CDATA_INT) LJFOLD(FLOAD any IRFL_CDATA_INT64) LJFOLD(VLOAD any any) /* Vararg loads have no corresponding stores. */ LJFOLDX(lj_opt_cse) /* All other field loads need alias analysis. */ LJFOLD(FLOAD any any) LJFOLDX(lj_opt_fwd_fload) /* This is for LOOP only. Recording handles SLOADs internally. */ LJFOLD(SLOAD any any) LJFOLDF(fwd_sload) { if ((fins->op2 & IRSLOAD_FRAME)) { TRef tr = lj_opt_cse(J); return tref_ref(tr) < J->chain[IR_RETF] ? EMITFOLD : tr; } else { lua_assert(J->slot[fins->op1] != 0); return J->slot[fins->op1]; } } /* Only fold for KKPTR. The pointer _and_ the contents must be const. */ LJFOLD(XLOAD KKPTR any) LJFOLDF(xload_kptr) { TRef tr = kfold_xload(J, fins, ir_kptr(fleft)); return tr ? tr : NEXTFOLD; } LJFOLD(XLOAD any any) LJFOLDX(lj_opt_fwd_xload) /* -- Write barriers ------------------------------------------------------ */ /* Write barriers are amenable to CSE, but not across any incremental ** GC steps. ** ** The same logic applies to open upvalue references, because a stack ** may be resized during a GC step (not the current stack, but maybe that ** of a coroutine). */ LJFOLD(TBAR any) LJFOLD(OBAR any any) LJFOLD(UREFO any any) LJFOLDF(barrier_tab) { TRef tr = lj_opt_cse(J); if (gcstep_barrier(J, tref_ref(tr))) /* CSE across GC step? */ return EMITFOLD; /* Raw emit. Assumes fins is left intact by CSE. */ return tr; } LJFOLD(TBAR TNEW) LJFOLD(TBAR TDUP) LJFOLDF(barrier_tnew_tdup) { /* New tables are always white and never need a barrier. */ if (fins->op1 < J->chain[IR_LOOP]) /* Except across a GC step. */ return NEXTFOLD; return DROPFOLD; } /* -- Stores and allocations ---------------------------------------------- */ /* Stores and allocations cannot be folded or passed on to CSE in general. ** But some stores can be eliminated with dead-store elimination (DSE). ** ** Caveat: *all* stores and allocs must be listed here or they end up at CSE! */ LJFOLD(ASTORE any any) LJFOLD(HSTORE any any) LJFOLDX(lj_opt_dse_ahstore) LJFOLD(USTORE any any) LJFOLDX(lj_opt_dse_ustore) LJFOLD(FSTORE any any) LJFOLDX(lj_opt_dse_fstore) LJFOLD(XSTORE any any) LJFOLDX(lj_opt_dse_xstore) LJFOLD(NEWREF any any) /* Treated like a store. */ LJFOLD(CALLS any any) LJFOLD(CALLL any any) /* Safeguard fallback. */ LJFOLD(CALLXS any any) LJFOLD(XBAR) LJFOLD(RETF any any) /* Modifies BASE. */ LJFOLD(TNEW any any) LJFOLD(TDUP any) LJFOLD(CNEW any any) LJFOLD(XSNEW any any) LJFOLDX(lj_ir_emit) /* ------------------------------------------------------------------------ */ /* Every entry in the generated hash table is a 32 bit pattern: ** ** xxxxxxxx iiiiiii lllllll rrrrrrrrrr ** ** xxxxxxxx = 8 bit index into fold function table ** iiiiiii = 7 bit folded instruction opcode ** lllllll = 7 bit left instruction opcode ** rrrrrrrrrr = 8 bit right instruction opcode or 10 bits from literal field */ #include "lj_folddef.h" /* ------------------------------------------------------------------------ */ /* Fold IR instruction. */ TRef LJ_FASTCALL lj_opt_fold(jit_State *J) { uint32_t key, any; IRRef ref; if (LJ_UNLIKELY((J->flags & JIT_F_OPT_MASK) != JIT_F_OPT_DEFAULT)) { lua_assert(((JIT_F_OPT_FOLD|JIT_F_OPT_FWD|JIT_F_OPT_CSE|JIT_F_OPT_DSE) | JIT_F_OPT_DEFAULT) == JIT_F_OPT_DEFAULT); /* Folding disabled? Chain to CSE, but not for loads/stores/allocs. */ if (!(J->flags & JIT_F_OPT_FOLD) && irm_kind(lj_ir_mode[fins->o]) == IRM_N) return lj_opt_cse(J); /* No FOLD, forwarding or CSE? Emit raw IR for loads, except for SLOAD. */ if ((J->flags & (JIT_F_OPT_FOLD|JIT_F_OPT_FWD|JIT_F_OPT_CSE)) != (JIT_F_OPT_FOLD|JIT_F_OPT_FWD|JIT_F_OPT_CSE) && irm_kind(lj_ir_mode[fins->o]) == IRM_L && fins->o != IR_SLOAD) return lj_ir_emit(J); /* No FOLD or DSE? Emit raw IR for stores. */ if ((J->flags & (JIT_F_OPT_FOLD|JIT_F_OPT_DSE)) != (JIT_F_OPT_FOLD|JIT_F_OPT_DSE) && irm_kind(lj_ir_mode[fins->o]) == IRM_S) return lj_ir_emit(J); } /* Fold engine start/retry point. */ retry: /* Construct key from opcode and operand opcodes (unless literal/none). */ key = ((uint32_t)fins->o << 17); if (fins->op1 >= J->cur.nk) { key += (uint32_t)IR(fins->op1)->o << 10; *fleft = *IR(fins->op1); } if (fins->op2 >= J->cur.nk) { key += (uint32_t)IR(fins->op2)->o; *fright = *IR(fins->op2); } else { key += (fins->op2 & 0x3ffu); /* Literal mask. Must include IRCONV_*MASK. */ } /* Check for a match in order from most specific to least specific. */ any = 0; for (;;) { uint32_t k = key | (any & 0x1ffff); uint32_t h = fold_hashkey(k); uint32_t fh = fold_hash[h]; /* Lookup key in semi-perfect hash table. */ if ((fh & 0xffffff) == k || (fh = fold_hash[h+1], (fh & 0xffffff) == k)) { ref = (IRRef)tref_ref(fold_func[fh >> 24](J)); if (ref != NEXTFOLD) break; } if (any == 0xfffff) /* Exhausted folding. Pass on to CSE. */ return lj_opt_cse(J); any = (any | (any >> 10)) ^ 0xffc00; } /* Return value processing, ordered by frequency. */ if (LJ_LIKELY(ref >= MAX_FOLD)) return TREF(ref, irt_t(IR(ref)->t)); if (ref == RETRYFOLD) goto retry; if (ref == KINTFOLD) return lj_ir_kint(J, fins->i); if (ref == FAILFOLD) lj_trace_err(J, LJ_TRERR_GFAIL); lua_assert(ref == DROPFOLD); return REF_DROP; } /* -- Common-Subexpression Elimination ------------------------------------ */ /* CSE an IR instruction. This is very fast due to the skip-list chains. */ TRef LJ_FASTCALL lj_opt_cse(jit_State *J) { /* Avoid narrow to wide store-to-load forwarding stall */ IRRef2 op12 = (IRRef2)fins->op1 + ((IRRef2)fins->op2 << 16); IROp op = fins->o; if (LJ_LIKELY(J->flags & JIT_F_OPT_CSE)) { /* Limited search for same operands in per-opcode chain. */ IRRef ref = J->chain[op]; IRRef lim = fins->op1; if (fins->op2 > lim) lim = fins->op2; /* Relies on lit < REF_BIAS. */ while (ref > lim) { if (IR(ref)->op12 == op12) return TREF(ref, irt_t(IR(ref)->t)); /* Common subexpression found. */ ref = IR(ref)->prev; } } /* Otherwise emit IR (inlined for speed). */ { IRRef ref = lj_ir_nextins(J); IRIns *ir = IR(ref); ir->prev = J->chain[op]; ir->op12 = op12; J->chain[op] = (IRRef1)ref; ir->o = fins->o; J->guardemit.irt |= fins->t.irt; return TREF(ref, irt_t((ir->t = fins->t))); } } /* CSE with explicit search limit. */ TRef LJ_FASTCALL lj_opt_cselim(jit_State *J, IRRef lim) { IRRef ref = J->chain[fins->o]; IRRef2 op12 = (IRRef2)fins->op1 + ((IRRef2)fins->op2 << 16); while (ref > lim) { if (IR(ref)->op12 == op12) return ref; ref = IR(ref)->prev; } return lj_ir_emit(J); } /* ------------------------------------------------------------------------ */ #undef IR #undef fins #undef fleft #undef fright #undef knumleft #undef knumright #undef emitir #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ccall.o0000664000000000000000000002722012213333061022310 0ustar rootrootELF>@@ UHAVAUATSH~IIAnM$t A|$9rHLDK u|Hދt t u%t9wHHLƋtLL uLAuwHދt t u%t9wHHLƋtLLg[fAFA IVF[A\A]A^]UHAWAVAUATSHIIA΋Ht t uIU%tA;ErIIILA$tAD$Eȋvu̅DLLL6]ȉD)9Ewqu LQa%=vV!ʺEƒwLA  IOH[A\A]A^A_]UHVPHt;GrHHʋ20u Ztu  4u&zDt]UHAWAVAUATSH8HGDIFItA9rIIIA$uL%t9w' %t9wIIIA$tƒ ED$A$t t u%t9wIIIA$tA$^ AuF#AtHFHHH@HHHHHHHHHLt t uI?%tAw9rHHHt8u Ct Dž%=4tDžDCE4$EtA9rDHHuJ%t9w' %t9rHHHtøwBA9t+ApII@ E;wrfDpHHBHPHHQD(@A} uAUA@(tu`DžDžHHLtƅILDž$ƅDžƅDžAD$DEtaIAwA9sHHȋt4?A9rHHȋu @DEuHH@HHH9DžDžDžDLI܃tkIA;OrHHP t%-H u HLLI7tAO9rHHuL%t9w)%t9wHHHtDkuA8uAAhDžDžHHLNHDžHDžDALHHLtu,tDsHHHH LHH͠utHH͠*t%HHHH ˆHH%=4A$DIIHI։Dw LՠDžxDžv)-!‰D vHLDALLHLu5Sw-tuAAAuAAAAuauXHHHHI9u6H(HHfW(IL9%DLDžDžEt Hw DžLI+ALJHAt6HH HIw(HH@IHˋt t u%tA;GrHHHˋt'HHBxtCD`IDžDžHHLNsut4H H$HH tHHHtHHHHHLA4utHHAxtJ@{uH HPAH HPH0HPAt"HL 8LEL %=0uXHH@HHHLAA ALAEP$9P rLAA$Aʃ4  DžDž DžAAD:AAADžDH8[A\A]A^A_]lj_ctype.hid > 0 && id < cts->toplj_ccall.clj_cdata.hsz == 8lj_obj.h!(rcl[i] & 4)(((L->top-1)->it) == (~10u))!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((((ct->info)) >> 28) <= CT_HASSIZE)(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((ctf->info)) >> 28) == CT_FIELD)!((((ctr->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_ARRAY) << 28) + (0))) || ((((ctr->info)) >> 28) == CT_STRUCT))ctype_checkctype_childcdata_getptrlj_cdata_newsetgcVccall_set_argsccall_classify_ctccall_struct_regccall_get_resultsGCC: (Debian 4.7.3-4) 4.7.3zRx $AC G (DYAC MG pAC  (AC P .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @ h &,12u@2XO W0`up0.` 0  " ; TYfP % 29p  #"8HVdrlj_ccall.cccall_classify_struct__PRETTY_FUNCTION__.4054__PRETTY_FUNCTION__.4063ccall_classify_ct__PRETTY_FUNCTION__.5000__PRETTY_FUNCTION__.4201__PRETTY_FUNCTION__.4215__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.5088__PRETTY_FUNCTION__.5019__PRETTY_FUNCTION__.5106__assert_faillj_ccall_ctid_vararglj_ctype_internlj_ccall_funclj_mem_newgcolj_err_callerlj_cconv_ct_tvmemcpylj_vm_ffi_calllj_tab_setlj_cconv_tv_ctlj_gc_step@ J O  T       <  F K P` j o  t     !7 A F  K P # xY c h  mA K P  U             ] g .l 9q                & %0 .5 :GY c h  m 2 A     " , 1  6 ^ 9h #m r             1 p; #@ JE   #         g q #v X{N  # X$ . #3 08Z ! Ht"tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ffrecord.o0000664000000000000000000007677012213333064023045 0ustar rootrootELF><@@ UHHG`H@@u @@HH]UH勿H~]UHSHH%= uH[]UHH]LeLmLuH HIt;HcHhfǃ DffǃHArHD D%= t fLJCfDfLJ AƾHfǃfDfHEefǃ CfDfǃ HAľ Hfǃ fDfHDH]LeLmLuUHATSHHVHu¾H߸AHHt-HfǃfDfHHH[A\]UHAWAVAUATSH(HIVHu"EHAǾHEA|$AEHB4YIIAHDfǃ?fDfDHAfǃCfDfǃHAfHC<uxfǃDfDfǃHM¾H߸AHHtHfǃ fDfHPDMEMDH߸AHRHt!fǃfDfDHHB4(IH([A\A]A^A_]UHH]LeHHH0fǃCffǃLHA$H]LeUHHPHUHM@E ( EHxtHO`UEz urQR(@tHPHUH rv>uDFD9uvQR(@tH@HEH Pv;Ur9uRA@(tHuUHSHXHEЋSU%= EEHxtHO`UEz urQR(@tH@HEH Pv;Ur9uRA@(tHuHX[]UHHGpHW` LJ xuHB@(tUHH]LeLmLuL}HHIHD HFD%= {H@D|IExtD0LAǾH%|EAV@@(tA*EEHHt&ELHuHA$IEEHuHoMfǃ ffHDe|EHC`DuEA~ ->fǃffHH]LeLmLuL}UHH]LeLmHpHIHU@EHFс HxAI$ztD"Hfǃ(fDfHEHC`DeEA|$ uAT$@@(tL*EEHuHH]LeLmUHHGpHW` LJ xuHB@(t UHHGpHW` LJ xuHB@(tUHH]LeLmHpHHE%= >IHH v vB,H*ExtfHw`EEx uHF@(tEErELHUfǃ(ffHEAELHuHAEH@%HHЃID$H]LeLmUHH]LeLmLuH HLEeD%= ucHGpx$ttIp AEHD`LHAD$IFH]LeLmLuUHSHHP v҃EHHWp|$tt H[]UHH]LeHHF=v Iu >u L{vF,H]LeUHAWAVAUATSH(HIH0%AfǃCffǃHEHEM,$AEu EmLmr=v HH{`LHEHC`UAUAEHUzuRU@@(tA|$txI4$HHAHpHEHpuHEAHEI4$HH1AH@tcI4$HH AHpHEHpEEĉEtDHEI4$HHA$HEĉEAAEUȉUfǃfEfHHEfǃ(UfEfHfǃ(fUfHEHEDp AhHED;p w)fǃUfEfH5fǃUfEfHHEDp EEEypUĉUEfEfǃffHfǃ(EfUfHE%HUDj 4Eu/fǃEfUfHẺEZHfǃ(UffHEfǃfEfHAA|$E9Defǃ)UffDHDfǃfDEfHfǃ?fDfDHfǃLffDLHA$fǃUfEfHLHuHH{`HHA$E)EMcMEfEfǃ)UffHEDHfǃUffHLH=~ HMt$ADHfǃ(UffHfǃ?fDfHfǃDffǃHN,HAEIM9ufǃEfUfHID$\fǃfEfHẺEA_fǃfUfH7H([A\A]A^A_]UHAVAUATSHIH0AEt$HptMAAAHfDfDfHAAHD4uD([A\A]A^]UHH]LeLmH HIH0AHpHAUffDfLHA$H]LeLmUHH]LeLmH HIH0LAUVt%fffǃHA$H]LeLmUHH]LeLmLuH HHGpx$t8D` LIT$H¾ H߸AH?HAfǃ)fDfHAH07HAHpHAfǃ)ffDHfǃ(ffDHfǃ*fDfHfǃ4ffǃHfǃ(ffDHAefǃ*fDfDHfǃ4ffǃHfǃ(ffDHAHD H]LeLmLuUHH]LeHHH0AHpHfǃ1fDfLHA$H]LeUHH]LeHHH0AHpHfǃ0fDfLHA$H]LeUHATSHH0HSpz$vAHr Hfǃ*fDfLHA$[A\]UHH]LeLmH HH0AHpHAfǃ4fDfǃHAfǃ4fDfǃHAH?Hfǃ+ffDHfǃ*fDfH"fǃ4fDfǃHHH]LeLmUHH]LeLmH HILA4$wAD$`Dfǃ4fDfǃHHfǃ)fDfLHAD$IEH]LeLmUHH]LeHHIH0AT$fǃYffLHA$H]LeUHH]LeLmLuH HIH0AH?HAEvA0tsAfǃ*ffHfǃ)fDfHfǃ4ffǃHAA.tEAfǃ0fDfDLHA$H]LeLmLuUHH]LeHHDfH0fǃ4ffDLHA$H]LeUHH]LeHHHv5Dffǃ4ffDHHH]LeUHAWAVAUATSHHIH0AE}HpAAHADwBDvlfǃUfDfǃHAĸ@Dw*fǃUfDfǃHAŸD ffDfDHAAHD4$D H[A\A]A^A_]UHH]LeLmH HIH0LAT$vсt HIMHHA$H]LeLmUHATSHH0AHHHfǃ/fDfLHA$[A\]UHH]LeLmLuL}H@HIHHHPHHO`UDhAUvAuEA~A9u~qv(@tpuDp EFDEAD׉DFD9u AD"NDAE@(AE_vA@(@tI$HK`ủpDh EADEAAGA9uAWA@(AwQR(@tI$HK`uȉrDr }v=ArA9urQR(@tt H{`ID$DEDDpDEDDpF9H{`HھI$M̉ Dj:H{`HھI$HK`ủ2DjAW9UH]LeLmLuL}UHH׋]Ët'UHSHHHCH[]UHH]LeLmLuL}HĀHHD(D%=IDmHO`HHHEH Pv;Ur9uRA@(tHuH/HPHUI$HK`D8DhEuADDz9uAD"By(ARA@(tI$Hs`HEHH Hv:J9uRF@(tH{`HھI$HK`D:DjAv@EAAWA9uAwQR(@tt H{`ID$fǃWfDfǃLHA$wFLHSp|$tWt HA$FHHHPH8HxB9QaDPt=H]LeLmLuL}UHH]LeLmLuL}HHHD DhD%= MEAA tE1E(DeHK`HHHEH Pv;Ur9uRA@(tHuHAf~fǃ>ffǃHAEu@ Hfǃ JfDfHHD ƃJfǃ JffDHfǃ R~ffǃHH]LeLmLuL}UHSHXHHEHO`HHHEH Pv;Ur9uRA@(tHuHtHU HU܉HX[]UHH׺]UHH]LeLmH0IIHpt fxIT$< tLv%=uy%=IExt8HuuLlfADŽ$XfA$fADŽ$L= uLLI$H]LeLmUHSHHH8Pt-t)HLAHH%H[]UHH]LeHHA%=zt2~#~ u4fǃfDfHfǃ?fDfHfǃDffǃHAľ#HfǃfDfHHHsu HH]LeUHH]LeLmH HHD EIHDHHuLHA$_fExQHyHH9HOH)I}H~6H~1HH44HHH9uHH]LeLmUHSH(HHGpPw ЉUHEHS`HRHUЋHHuHHUHx ,u ǃ,HH([]lj_ffrecord.clj_obj.h(((o)->it) < 0xfffeffffu)(((tv)->it) == (~4u))(((&rd->argv[0])->it) == (~11u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&J->fn->c.upvalue[0])->it) == (~8u))(((&J->fn->c.upvalue[t])->it) == (~4u))(((&J->fn->c.upvalue[0])->it) == (~12u))(((&J->fn->c.upvalue[0])->it) < 0xfffeffffu)(((&J->fn->c.upvalue[((IRType)(((tr)>>24) & IRT_TYPE))])->it) == (~4u))(((&rd->argv[0])->it) == (~4u))lj_ffrecord_select_modeargv2intrecff_table_removesetgcVrecff_table_insertrecff_math_randomrecff_math_degradcopyTVrecff_tostringrecff_tonumberrecff_rawsetrecff_rawgetrecff_ipairsnumberVintrecff_ipairs_auxrecff_type    ./023V#$%&' !" !!"#$%&%%%&''((((() ( ( ( ((((**++,-.../01234GCC: (Debian 4.7.3-4) 4.7.3zRx (AC c <AC K \8AC En $|:AC T!  AC Gu (AC M  WAC LF \AC W  8 AC E \XAC (xAC [ $LAC P7 ZAC ZAC $AC Pj $,AC T  TvAC El  xmAC L\ (AC M $AC G $~AC Pi $oAC PZ $@AC T  hkAC LZ  kAC LZ  }AC Cu $AC P $AC P  $^AC LM $HAC T  p[AC LJ  kAC LZ (6AC M$ $AC Pp  cAC C[ (0AC X \!AC \  |3KC E]A (AC X (AC [  AC E AC X $<#AC P  dPAC EF  5AC L$ $AC P $AC E .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @,8S`!&,,,12,G@2 -T0t Ot\045eQ5zX5uyh P<@@ J L((+88<p:HW+fWwW\ b  X,L?X; Z` Zj { n   v  m  ,;k~Ko[Xm0okkE}P^[%Rk66HWxcfs"!"3#q(i &'(#x)P&?6+LX@   cnz +6JYet*5,.<N`q lj_ffrecord.cresults_wantedrecff_assertrecff_table_getnrecff_io_fprecff_io_flushrecff_io_writerecff_string_lenrecff_rawset__PRETTY_FUNCTION__.5320__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3429recff_rawget__PRETTY_FUNCTION__.5314recff_nyiurecff_table_remove__PRETTY_FUNCTION__.5551recff_table_insert__PRETTY_FUNCTION__.5561recff_crecff_nyirecff_ipairs_aux__PRETTY_FUNCTION__.3440__PRETTY_FUNCTION__.5381recff_ipairs__PRETTY_FUNCTION__.5387recff_type__PRETTY_FUNCTION__.5293argv2int__PRETTY_FUNCTION__.5262recff_string_rangerecff_bit_naryrecff_bit_shiftrecff_bit_unaryrecff_math_random__PRETTY_FUNCTION__.5488recff_math_ldexprecff_math_atan2recff_math_degrad__PRETTY_FUNCTION__.5465recff_math_logrecff_math_modfrecff_math_htrigrecff_math_atrigrecff_math_unaryrecff_math_roundrecff_math_minmaxrecff_math_powrecff_math_absrecff_xpcallrecff_xpcall_cprecff_pcallrecff_tostringrecff_metacall_cp__PRETTY_FUNCTION__.5375recff_setmetatablerecff_getmetatablerecff_tonumber__PRETTY_FUNCTION__.5355recff_rawequal__PRETTY_FUNCTION__.5333recff_selectrecff_idmaprecff_funclj_ir_calllj_ir_kptr_lj_opt_foldlj_trace_errlj_ir_kintlj_ir_knulllj_ir_tostr__assert_faillj_record_idxlj_trace_err_infolj_tab_lenlj_opt_narrow_tointlj_ir_kgclj_strscan_numlj_str_fromnumlj_str_newlj_opt_narrow_tobitlj_ir_knum_u64lj_ir_tonumlj_ir_tonumberlj_opt_narrow_powlj_ir_k64lj_err_throwlj_vm_cpcalllj_record_calllj_record_mm_lookuplj_record_tailcalllj_crecord_tonumberlj_record_objcmplj_ffrecord_select_modelj_ffrecord_funclj_record_retrecff_cdata_indexrecff_cdata_arithrecff_cdata_callrecff_clib_indexrecff_ffi_newrecff_ffi_typeofrecff_ffi_istyperecff_ffi_xofrecff_ffi_errnorecff_ffi_stringrecff_ffi_copyrecff_ffi_fillrecff_ffi_abirecff_ffi_gccJKLM LN;LaLqOLJNLZNjNPLL*LAJ^N~LJLPEL F  Q F  (QA FbK P PUQ Fb  PQR F  QC FM R (WQ Fb  PQR F  (QSJ F  QTN F  ( QERdRLL[ Jm Fw | Q N L F  ( Q T" Rs F}  ( Q S F  ( Q S9 MF FP U Z Qv F Q F  ( Q U N L8 R F  Q V N] Fg l q Q V W M F  QPELUNMX F  (QU0NFUUUN+L8NbLLLL1LXLLNLL?LgLLLLY VRL`NLSNLL&LcLLLZ$ZCLZZL ZBL~ F0  QVKJ[L \=\dLLLLL L,LLL\\L\ \3LY\k FPu z Q[L\\%LJL_[LLLN%\KL{L\L \5[eLLLL\@L\L] ]ULLL\PMb^\_Ld Fbn s Px Q Fb  P Q Fb! ! P !Q^! Fbh! m! Pr!Q! Fb! ! P!Q! Fb! ! P!Q"`I" "V"aq" "~"a"b"b# Fb# # P#Q#c$$ Fb.$ 3$ P8$QR$ Fb\$ a$ Pf$Q$ Fb$ $ P$Q$ q($a% Fb% !% P&%Q5%`l%L% Fi% % 0%Q%V& Fb& & P&Q&c'L/'OO'L'L'L#( Fb-( 2( P7(QH(c(d(U!) Fx+) 0) x5)Q@)Ws)L)e)f0* F:* ?* 1D*Q`*V*L*N*L*L*N+L(+Mj+g+N%, Fd, F@,i@ H; P(X ` hn p'x &W)6+(#"xREo X(0k8@H P8X`h+pxjklmnopqrstuvw @(`8p+W<`|;   0n X |  kDXloE(LtRx4`""# &' q(@(h)*6+,tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_meta.o0000664000000000000000000004353012213333050022160 0ustar rootrootELF>p%@@ UHHGLOEQAzu AB@IHH0HHPH rv>pDND9uvWR(@tHHPH Jv;Hq9uIWR(tIHPH Jv;Hq9uIWR(tH]ËG=v*u UHSHH?HE HHH[]UHAVAUATSIDwAH^F<_ttH<_tuHH)LDAAHހ;u[A\A]A^]UHH]LeHHAHAv/HtxuDCH]LeUHSHHFux5ux)w#=vtЍHɋHtKҋHu&CxltFHhH[]UHHWHGDBHHJH qv>rDND9uvOI(@tD@xHHHH)HP HOHO]UHAWAVAUATSHIHHUAd{uRD#HULLIƃxA|$HGAGHu(iHLxuHLxu#LEHH¾LIGAHALlLLH[A\A]A^A_]UHH]LeLmLuL}HPIIIEdA|$A$H]LHLIŃxtzCCHAV!J(@tTJ)tuUCBJ9uRHMA@(tH-HCHCAFE=IvH}AFAFxuPHuF@(} !8H}AŃ9]}|HcHMI)AD$ =wULH}A$AD$xuPHMA@(HEpHXDHIǃ]xvHcEHLH)ƒzu'2Dn D]A5HcHLH)yt)1Dn DDLHEyADLH}HcUHLH)։FxuPHMA@(t)EEu)uHcHI)ƃ}HUBH$9H rO}u9HBPzt3RRHHuHFH}]VHEpHXDHIErADh E+A$@ D)9H([A\A]A^A_]UHATSHIxuLHDCAxltDIhLH¾H*[A\]UHH]LeLmLuL}H0IHA΋~HGIAD$IHhA}CH9]Ht/Gu)AD$HHt LuIcSIT$Bxu @@HID$EtH HHIHPH Jv=Hq9uIAT$R(tK҉XPrs9u{At$v(@tlAMAT$R(tH7Ic2IT$BxDhPAU9tDhPH]LeLmLuL}UHH]LeLmLuL}H@HAAALE%HOL$uLu LC =v"uHs{u LC=v"uHs{u LH]Lelj_obj.hlj_meta.cmm <= MM_FASTlj_gc.h(((c)->it) < 0xfffeffffu)(((b)->it) < 0xfffeffffu)(((top-i)->it) == (~4u))op == BC_ISEQP!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))__index__newindex__gc__mode__eq__len__lt__le__concat__call__add__sub__mul__div__mod__pow__unm__metatable__tostring__new__pairs__ipairs(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail (\"(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)\", \"lj_meta.c\", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc", "lj_meta.c", 363, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)(((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->k).ptr32)[(~(ptrdiff_t)((BCReg)((ins)>>16)))]).gcptr32))))->gch.gct == ~(~4u)lj_meta_cachelj_meta_lookupcopyTVlj_meta_tsetlj_gc_barrierbacklj_meta_arithsetgcVlj_meta_catlj_meta_lenlj_meta_equal_cdGCC: (Debian 4.7.3-4) 4.7.3zRx  AC  0<BPC EW I HA $pjAC G^  dAC LS  AC E AC  (AC M (,AC X (XCAC X& (AC M  mAC Ce (AC X (AC X (,AC Mn $XAC I  AC L .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @1 &,12@2 O!W01"`N"uP"pE $0) .  + B3Le@~$ R`g s   $2AbjNYdgu0XLC!W-?KZaln mx P=lj_meta.cmmcall__PRETTY_FUNCTION__.3429str2num__PRETTY_FUNCTION__.4245__PRETTY_FUNCTION__.4252__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.4292__PRETTY_FUNCTION__.4314__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4328__PRETTY_FUNCTION__.4347__PRETTY_FUNCTION__.4370lj_vm_asm_begin__assert_faillj_strscan_numlj_meta_initlj_str_newlj_meta_cachelj_tab_getstrlj_meta_lookuplj_meta_tailcalllj_meta_tgetlj_tab_getlj_err_optypelj_cont_ralj_err_msglj_meta_tsetlj_tab_newkeylj_cont_noplj_meta_arithlj_bc_modelj_vm_foldarithlj_meta_catlj_str_fromnumberlj_cont_catlj_str_needbufmemcpylj_gc_steplj_meta_lenlj_meta_equallj_obj_equallj_cont_condflj_cont_condtlj_meta_equal_cdlj_meta_complj_str_cmplj_err_complj_meta_calllj_err_optype_calllj_meta_for& f p u z       >{ 0            %!" #6$! @ !  @ ! ;z @ !  @ !  $    $*$9&Qg"} '   $E ) R   ) R   C*&"4 #, `   - X "        9 C H M R -X  , `    $2 ,g `q v {  . g  ]  /' b `l q v  g    0 .  " s    #*fv3 4  5     S `] b g `   4 5s }       0     `   2 <  A F^ h  m vr 4  5+j8 4 53=9l;    $ ) .ev$$$ @ tb0X0L\Wn  0\P=tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_api.c0000664000000000000000000007040112202141143021762 0ustar rootroot/* ** Public Lua/C API. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_api_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_func.h" #include "lj_udata.h" #include "lj_meta.h" #include "lj_state.h" #include "lj_bc.h" #include "lj_frame.h" #include "lj_trace.h" #include "lj_vm.h" #include "lj_strscan.h" /* -- Common helper functions --------------------------------------------- */ #define api_checknelems(L, n) api_check(L, (n) <= (L->top - L->base)) #define api_checkvalidindex(L, i) api_check(L, (i) != niltv(L)) static TValue *index2adr(lua_State *L, int idx) { if (idx > 0) { TValue *o = L->base + (idx - 1); return o < L->top ? o : niltv(L); } else if (idx > LUA_REGISTRYINDEX) { api_check(L, idx != 0 && -idx <= L->top - L->base); return L->top + idx; } else if (idx == LUA_GLOBALSINDEX) { TValue *o = &G(L)->tmptv; settabV(L, o, tabref(L->env)); return o; } else if (idx == LUA_REGISTRYINDEX) { return registry(L); } else { GCfunc *fn = curr_func(L); api_check(L, fn->c.gct == ~LJ_TFUNC && !isluafunc(fn)); if (idx == LUA_ENVIRONINDEX) { TValue *o = &G(L)->tmptv; settabV(L, o, tabref(fn->c.env)); return o; } else { idx = LUA_GLOBALSINDEX - idx; return idx <= fn->c.nupvalues ? &fn->c.upvalue[idx-1] : niltv(L); } } } static TValue *stkindex2adr(lua_State *L, int idx) { if (idx > 0) { TValue *o = L->base + (idx - 1); return o < L->top ? o : niltv(L); } else { api_check(L, idx != 0 && -idx <= L->top - L->base); return L->top + idx; } } static GCtab *getcurrenv(lua_State *L) { GCfunc *fn = curr_func(L); return fn->c.gct == ~LJ_TFUNC ? tabref(fn->c.env) : tabref(L->env); } /* -- Miscellaneous API functions ----------------------------------------- */ LUA_API int lua_status(lua_State *L) { return L->status; } LUA_API int lua_checkstack(lua_State *L, int size) { if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) { return 0; /* Stack overflow. */ } else if (size > 0) { lj_state_checkstack(L, (MSize)size); } return 1; } LUALIB_API void luaL_checkstack(lua_State *L, int size, const char *msg) { if (!lua_checkstack(L, size)) lj_err_callerv(L, LJ_ERR_STKOVM, msg); } LUA_API void lua_xmove(lua_State *from, lua_State *to, int n) { TValue *f, *t; if (from == to) return; api_checknelems(from, n); api_check(from, G(from) == G(to)); lj_state_checkstack(to, (MSize)n); f = from->top; t = to->top = to->top + n; while (--n >= 0) copyTV(to, --t, --f); from->top = f; } /* -- Stack manipulation -------------------------------------------------- */ LUA_API int lua_gettop(lua_State *L) { return (int)(L->top - L->base); } LUA_API void lua_settop(lua_State *L, int idx) { if (idx >= 0) { api_check(L, idx <= tvref(L->maxstack) - L->base); if (L->base + idx > L->top) { if (L->base + idx >= tvref(L->maxstack)) lj_state_growstack(L, (MSize)idx - (MSize)(L->top - L->base)); do { setnilV(L->top++); } while (L->top < L->base + idx); } else { L->top = L->base + idx; } } else { api_check(L, -(idx+1) <= (L->top - L->base)); L->top += idx+1; /* Shrinks top (idx < 0). */ } } LUA_API void lua_remove(lua_State *L, int idx) { TValue *p = stkindex2adr(L, idx); api_checkvalidindex(L, p); while (++p < L->top) copyTV(L, p-1, p); L->top--; } LUA_API void lua_insert(lua_State *L, int idx) { TValue *q, *p = stkindex2adr(L, idx); api_checkvalidindex(L, p); for (q = L->top; q > p; q--) copyTV(L, q, q-1); copyTV(L, p, L->top); } LUA_API void lua_replace(lua_State *L, int idx) { api_checknelems(L, 1); if (idx == LUA_GLOBALSINDEX) { api_check(L, tvistab(L->top-1)); /* NOBARRIER: A thread (i.e. L) is never black. */ setgcref(L->env, obj2gco(tabV(L->top-1))); } else if (idx == LUA_ENVIRONINDEX) { GCfunc *fn = curr_func(L); if (fn->c.gct != ~LJ_TFUNC) lj_err_msg(L, LJ_ERR_NOENV); api_check(L, tvistab(L->top-1)); setgcref(fn->c.env, obj2gco(tabV(L->top-1))); lj_gc_barrier(L, fn, L->top-1); } else { TValue *o = index2adr(L, idx); api_checkvalidindex(L, o); copyTV(L, o, L->top-1); if (idx < LUA_GLOBALSINDEX) /* Need a barrier for upvalues. */ lj_gc_barrier(L, curr_func(L), L->top-1); } L->top--; } LUA_API void lua_pushvalue(lua_State *L, int idx) { copyTV(L, L->top, index2adr(L, idx)); incr_top(L); } /* -- Stack getters ------------------------------------------------------- */ LUA_API int lua_type(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); if (tvisnumber(o)) { return LUA_TNUMBER; #if LJ_64 } else if (tvislightud(o)) { return LUA_TLIGHTUSERDATA; #endif } else if (o == niltv(L)) { return LUA_TNONE; } else { /* Magic internal/external tag conversion. ORDER LJ_T */ uint32_t t = ~itype(o); #if LJ_64 int tt = (int)((U64x(75a06,98042110) >> 4*t) & 15u); #else int tt = (int)(((t < 8 ? 0x98042110u : 0x75a06u) >> 4*(t&7)) & 15u); #endif lua_assert(tt != LUA_TNIL || tvisnil(o)); return tt; } } LUALIB_API void luaL_checktype(lua_State *L, int idx, int tt) { if (lua_type(L, idx) != tt) lj_err_argt(L, idx, tt); } LUALIB_API void luaL_checkany(lua_State *L, int idx) { if (index2adr(L, idx) == niltv(L)) lj_err_arg(L, idx, LJ_ERR_NOVAL); } LUA_API const char *lua_typename(lua_State *L, int t) { UNUSED(L); return lj_obj_typename[t+1]; } LUA_API int lua_iscfunction(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); return tvisfunc(o) && !isluafunc(funcV(o)); } LUA_API int lua_isnumber(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); TValue tmp; return (tvisnumber(o) || (tvisstr(o) && lj_strscan_number(strV(o), &tmp))); } LUA_API int lua_isstring(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); return (tvisstr(o) || tvisnumber(o)); } LUA_API int lua_isuserdata(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); return (tvisudata(o) || tvislightud(o)); } LUA_API int lua_rawequal(lua_State *L, int idx1, int idx2) { cTValue *o1 = index2adr(L, idx1); cTValue *o2 = index2adr(L, idx2); return (o1 == niltv(L) || o2 == niltv(L)) ? 0 : lj_obj_equal(o1, o2); } LUA_API int lua_equal(lua_State *L, int idx1, int idx2) { cTValue *o1 = index2adr(L, idx1); cTValue *o2 = index2adr(L, idx2); if (tvisint(o1) && tvisint(o2)) { return intV(o1) == intV(o2); } else if (tvisnumber(o1) && tvisnumber(o2)) { return numberVnum(o1) == numberVnum(o2); } else if (itype(o1) != itype(o2)) { return 0; } else if (tvispri(o1)) { return o1 != niltv(L) && o2 != niltv(L); #if LJ_64 } else if (tvislightud(o1)) { return o1->u64 == o2->u64; #endif } else if (gcrefeq(o1->gcr, o2->gcr)) { return 1; } else if (!tvistabud(o1)) { return 0; } else { TValue *base = lj_meta_equal(L, gcV(o1), gcV(o2), 0); if ((uintptr_t)base <= 1) { return (int)(uintptr_t)base; } else { L->top = base+2; lj_vm_call(L, base, 1+1); L->top -= 2; return tvistruecond(L->top+1); } } } LUA_API int lua_lessthan(lua_State *L, int idx1, int idx2) { cTValue *o1 = index2adr(L, idx1); cTValue *o2 = index2adr(L, idx2); if (o1 == niltv(L) || o2 == niltv(L)) { return 0; } else if (tvisint(o1) && tvisint(o2)) { return intV(o1) < intV(o2); } else if (tvisnumber(o1) && tvisnumber(o2)) { return numberVnum(o1) < numberVnum(o2); } else { TValue *base = lj_meta_comp(L, o1, o2, 0); if ((uintptr_t)base <= 1) { return (int)(uintptr_t)base; } else { L->top = base+2; lj_vm_call(L, base, 1+1); L->top -= 2; return tvistruecond(L->top+1); } } } LUA_API lua_Number lua_tonumber(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); TValue tmp; if (LJ_LIKELY(tvisnumber(o))) return numberVnum(o); else if (tvisstr(o) && lj_strscan_num(strV(o), &tmp)) return numV(&tmp); else return 0; } LUALIB_API lua_Number luaL_checknumber(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); TValue tmp; if (LJ_LIKELY(tvisnumber(o))) return numberVnum(o); else if (!(tvisstr(o) && lj_strscan_num(strV(o), &tmp))) lj_err_argt(L, idx, LUA_TNUMBER); return numV(&tmp); } LUALIB_API lua_Number luaL_optnumber(lua_State *L, int idx, lua_Number def) { cTValue *o = index2adr(L, idx); TValue tmp; if (LJ_LIKELY(tvisnumber(o))) return numberVnum(o); else if (tvisnil(o)) return def; else if (!(tvisstr(o) && lj_strscan_num(strV(o), &tmp))) lj_err_argt(L, idx, LUA_TNUMBER); return numV(&tmp); } LUA_API lua_Integer lua_tointeger(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); TValue tmp; lua_Number n; if (LJ_LIKELY(tvisint(o))) { return intV(o); } else if (LJ_LIKELY(tvisnum(o))) { n = numV(o); } else { if (!(tvisstr(o) && lj_strscan_number(strV(o), &tmp))) return 0; if (tvisint(&tmp)) return (lua_Integer)intV(&tmp); n = numV(&tmp); } #if LJ_64 return (lua_Integer)n; #else return lj_num2int(n); #endif } LUALIB_API lua_Integer luaL_checkinteger(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); TValue tmp; lua_Number n; if (LJ_LIKELY(tvisint(o))) { return intV(o); } else if (LJ_LIKELY(tvisnum(o))) { n = numV(o); } else { if (!(tvisstr(o) && lj_strscan_number(strV(o), &tmp))) lj_err_argt(L, idx, LUA_TNUMBER); if (tvisint(&tmp)) return (lua_Integer)intV(&tmp); n = numV(&tmp); } #if LJ_64 return (lua_Integer)n; #else return lj_num2int(n); #endif } LUALIB_API lua_Integer luaL_optinteger(lua_State *L, int idx, lua_Integer def) { cTValue *o = index2adr(L, idx); TValue tmp; lua_Number n; if (LJ_LIKELY(tvisint(o))) { return intV(o); } else if (LJ_LIKELY(tvisnum(o))) { n = numV(o); } else if (tvisnil(o)) { return def; } else { if (!(tvisstr(o) && lj_strscan_number(strV(o), &tmp))) lj_err_argt(L, idx, LUA_TNUMBER); if (tvisint(&tmp)) return (lua_Integer)intV(&tmp); n = numV(&tmp); } #if LJ_64 return (lua_Integer)n; #else return lj_num2int(n); #endif } LUA_API int lua_toboolean(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); return tvistruecond(o); } LUA_API const char *lua_tolstring(lua_State *L, int idx, size_t *len) { TValue *o = index2adr(L, idx); GCstr *s; if (LJ_LIKELY(tvisstr(o))) { s = strV(o); } else if (tvisnumber(o)) { lj_gc_check(L); o = index2adr(L, idx); /* GC may move the stack. */ s = lj_str_fromnumber(L, o); setstrV(L, o, s); } else { if (len != NULL) *len = 0; return NULL; } if (len != NULL) *len = s->len; return strdata(s); } LUALIB_API const char *luaL_checklstring(lua_State *L, int idx, size_t *len) { TValue *o = index2adr(L, idx); GCstr *s; if (LJ_LIKELY(tvisstr(o))) { s = strV(o); } else if (tvisnumber(o)) { lj_gc_check(L); o = index2adr(L, idx); /* GC may move the stack. */ s = lj_str_fromnumber(L, o); setstrV(L, o, s); } else { lj_err_argt(L, idx, LUA_TSTRING); } if (len != NULL) *len = s->len; return strdata(s); } LUALIB_API const char *luaL_optlstring(lua_State *L, int idx, const char *def, size_t *len) { TValue *o = index2adr(L, idx); GCstr *s; if (LJ_LIKELY(tvisstr(o))) { s = strV(o); } else if (tvisnil(o)) { if (len != NULL) *len = def ? strlen(def) : 0; return def; } else if (tvisnumber(o)) { lj_gc_check(L); o = index2adr(L, idx); /* GC may move the stack. */ s = lj_str_fromnumber(L, o); setstrV(L, o, s); } else { lj_err_argt(L, idx, LUA_TSTRING); } if (len != NULL) *len = s->len; return strdata(s); } LUALIB_API int luaL_checkoption(lua_State *L, int idx, const char *def, const char *const lst[]) { ptrdiff_t i; const char *s = lua_tolstring(L, idx, NULL); if (s == NULL && (s = def) == NULL) lj_err_argt(L, idx, LUA_TSTRING); for (i = 0; lst[i]; i++) if (strcmp(lst[i], s) == 0) return (int)i; lj_err_argv(L, idx, LJ_ERR_INVOPTM, s); } LUA_API size_t lua_objlen(lua_State *L, int idx) { TValue *o = index2adr(L, idx); if (tvisstr(o)) { return strV(o)->len; } else if (tvistab(o)) { return (size_t)lj_tab_len(tabV(o)); } else if (tvisudata(o)) { return udataV(o)->len; } else if (tvisnumber(o)) { GCstr *s = lj_str_fromnumber(L, o); setstrV(L, o, s); return s->len; } else { return 0; } } LUA_API lua_CFunction lua_tocfunction(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); if (tvisfunc(o)) { BCOp op = bc_op(*mref(funcV(o)->c.pc, BCIns)); if (op == BC_FUNCC || op == BC_FUNCCW) return funcV(o)->c.f; } return NULL; } LUA_API void *lua_touserdata(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); if (tvisudata(o)) return uddata(udataV(o)); else if (tvislightud(o)) return lightudV(o); else return NULL; } LUA_API lua_State *lua_tothread(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); return (!tvisthread(o)) ? NULL : threadV(o); } LUA_API const void *lua_topointer(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); if (tvisudata(o)) return uddata(udataV(o)); else if (tvislightud(o)) return lightudV(o); else if (tviscdata(o)) return cdataptr(cdataV(o)); else if (tvisgcv(o)) return gcV(o); else return NULL; } /* -- Stack setters (object creation) ------------------------------------- */ LUA_API void lua_pushnil(lua_State *L) { setnilV(L->top); incr_top(L); } LUA_API void lua_pushnumber(lua_State *L, lua_Number n) { setnumV(L->top, n); if (LJ_UNLIKELY(tvisnan(L->top))) setnanV(L->top); /* Canonicalize injected NaNs. */ incr_top(L); } LUA_API void lua_pushinteger(lua_State *L, lua_Integer n) { setintptrV(L->top, n); incr_top(L); } LUA_API void lua_pushlstring(lua_State *L, const char *str, size_t len) { GCstr *s; lj_gc_check(L); s = lj_str_new(L, str, len); setstrV(L, L->top, s); incr_top(L); } LUA_API void lua_pushstring(lua_State *L, const char *str) { if (str == NULL) { setnilV(L->top); } else { GCstr *s; lj_gc_check(L); s = lj_str_newz(L, str); setstrV(L, L->top, s); } incr_top(L); } LUA_API const char *lua_pushvfstring(lua_State *L, const char *fmt, va_list argp) { lj_gc_check(L); return lj_str_pushvf(L, fmt, argp); } LUA_API const char *lua_pushfstring(lua_State *L, const char *fmt, ...) { const char *ret; va_list argp; lj_gc_check(L); va_start(argp, fmt); ret = lj_str_pushvf(L, fmt, argp); va_end(argp); return ret; } LUA_API void lua_pushcclosure(lua_State *L, lua_CFunction f, int n) { GCfunc *fn; lj_gc_check(L); api_checknelems(L, n); fn = lj_func_newC(L, (MSize)n, getcurrenv(L)); fn->c.f = f; L->top -= n; while (n--) copyTV(L, &fn->c.upvalue[n], L->top+n); setfuncV(L, L->top, fn); lua_assert(iswhite(obj2gco(fn))); incr_top(L); } LUA_API void lua_pushboolean(lua_State *L, int b) { setboolV(L->top, (b != 0)); incr_top(L); } LUA_API void lua_pushlightuserdata(lua_State *L, void *p) { setlightudV(L->top, checklightudptr(L, p)); incr_top(L); } LUA_API void lua_createtable(lua_State *L, int narray, int nrec) { GCtab *t; lj_gc_check(L); t = lj_tab_new(L, (uint32_t)(narray > 0 ? narray+1 : 0), hsize2hbits(nrec)); settabV(L, L->top, t); incr_top(L); } LUALIB_API int luaL_newmetatable(lua_State *L, const char *tname) { GCtab *regt = tabV(registry(L)); TValue *tv = lj_tab_setstr(L, regt, lj_str_newz(L, tname)); if (tvisnil(tv)) { GCtab *mt = lj_tab_new(L, 0, 1); settabV(L, tv, mt); settabV(L, L->top++, mt); lj_gc_anybarriert(L, regt); return 1; } else { copyTV(L, L->top++, tv); return 0; } } LUA_API int lua_pushthread(lua_State *L) { setthreadV(L, L->top, L); incr_top(L); return (mainthread(G(L)) == L); } LUA_API lua_State *lua_newthread(lua_State *L) { lua_State *L1; lj_gc_check(L); L1 = lj_state_new(L); setthreadV(L, L->top, L1); incr_top(L); return L1; } LUA_API void *lua_newuserdata(lua_State *L, size_t size) { GCudata *ud; lj_gc_check(L); if (size > LJ_MAX_UDATA) lj_err_msg(L, LJ_ERR_UDATAOV); ud = lj_udata_new(L, (MSize)size, getcurrenv(L)); setudataV(L, L->top, ud); incr_top(L); return uddata(ud); } LUA_API void lua_concat(lua_State *L, int n) { api_checknelems(L, n); if (n >= 2) { n--; do { TValue *top = lj_meta_cat(L, L->top-1, -n); if (top == NULL) { L->top -= n; break; } n -= (int)(L->top - top); L->top = top+2; lj_vm_call(L, top, 1+1); L->top--; copyTV(L, L->top-1, L->top); } while (--n > 0); } else if (n == 0) { /* Push empty string. */ setstrV(L, L->top, &G(L)->strempty); incr_top(L); } /* else n == 1: nothing to do. */ } /* -- Object getters ------------------------------------------------------ */ LUA_API void lua_gettable(lua_State *L, int idx) { cTValue *v, *t = index2adr(L, idx); api_checkvalidindex(L, t); v = lj_meta_tget(L, t, L->top-1); if (v == NULL) { L->top += 2; lj_vm_call(L, L->top-2, 1+1); L->top -= 2; v = L->top+1; } copyTV(L, L->top-1, v); } LUA_API void lua_getfield(lua_State *L, int idx, const char *k) { cTValue *v, *t = index2adr(L, idx); TValue key; api_checkvalidindex(L, t); setstrV(L, &key, lj_str_newz(L, k)); v = lj_meta_tget(L, t, &key); if (v == NULL) { L->top += 2; lj_vm_call(L, L->top-2, 1+1); L->top -= 2; v = L->top+1; } copyTV(L, L->top, v); incr_top(L); } LUA_API void lua_rawget(lua_State *L, int idx) { cTValue *t = index2adr(L, idx); api_check(L, tvistab(t)); copyTV(L, L->top-1, lj_tab_get(L, tabV(t), L->top-1)); } LUA_API void lua_rawgeti(lua_State *L, int idx, int n) { cTValue *v, *t = index2adr(L, idx); api_check(L, tvistab(t)); v = lj_tab_getint(tabV(t), n); if (v) { copyTV(L, L->top, v); } else { setnilV(L->top); } incr_top(L); } LUA_API int lua_getmetatable(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); GCtab *mt = NULL; if (tvistab(o)) mt = tabref(tabV(o)->metatable); else if (tvisudata(o)) mt = tabref(udataV(o)->metatable); else mt = tabref(basemt_obj(G(L), o)); if (mt == NULL) return 0; settabV(L, L->top, mt); incr_top(L); return 1; } LUALIB_API int luaL_getmetafield(lua_State *L, int idx, const char *field) { if (lua_getmetatable(L, idx)) { cTValue *tv = lj_tab_getstr(tabV(L->top-1), lj_str_newz(L, field)); if (tv && !tvisnil(tv)) { copyTV(L, L->top-1, tv); return 1; } L->top--; } return 0; } LUA_API void lua_getfenv(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); api_checkvalidindex(L, o); if (tvisfunc(o)) { settabV(L, L->top, tabref(funcV(o)->c.env)); } else if (tvisudata(o)) { settabV(L, L->top, tabref(udataV(o)->env)); } else if (tvisthread(o)) { settabV(L, L->top, tabref(threadV(o)->env)); } else { setnilV(L->top); } incr_top(L); } LUA_API int lua_next(lua_State *L, int idx) { cTValue *t = index2adr(L, idx); int more; api_check(L, tvistab(t)); more = lj_tab_next(L, tabV(t), L->top-1); if (more) { incr_top(L); /* Return new key and value slot. */ } else { /* End of traversal. */ L->top--; /* Remove key slot. */ } return more; } LUA_API const char *lua_getupvalue(lua_State *L, int idx, int n) { TValue *val; const char *name = lj_debug_uvnamev(index2adr(L, idx), (uint32_t)(n-1), &val); if (name) { copyTV(L, L->top, val); incr_top(L); } return name; } LUA_API void *lua_upvalueid(lua_State *L, int idx, int n) { GCfunc *fn = funcV(index2adr(L, idx)); n--; api_check(L, (uint32_t)n < fn->l.nupvalues); return isluafunc(fn) ? (void *)gcref(fn->l.uvptr[n]) : (void *)&fn->c.upvalue[n]; } LUA_API void lua_upvaluejoin(lua_State *L, int idx1, int n1, int idx2, int n2) { GCfunc *fn1 = funcV(index2adr(L, idx1)); GCfunc *fn2 = funcV(index2adr(L, idx2)); n1--; n2--; api_check(L, isluafunc(fn1) && (uint32_t)n1 < fn1->l.nupvalues); api_check(L, isluafunc(fn2) && (uint32_t)n2 < fn2->l.nupvalues); setgcrefr(fn1->l.uvptr[n1], fn2->l.uvptr[n2]); lj_gc_objbarrier(L, fn1, gcref(fn1->l.uvptr[n1])); } LUALIB_API void *luaL_checkudata(lua_State *L, int idx, const char *tname) { cTValue *o = index2adr(L, idx); if (tvisudata(o)) { GCudata *ud = udataV(o); cTValue *tv = lj_tab_getstr(tabV(registry(L)), lj_str_newz(L, tname)); if (tv && tvistab(tv) && tabV(tv) == tabref(ud->metatable)) return uddata(ud); } lj_err_argtype(L, idx, tname); return NULL; /* unreachable */ } /* -- Object setters ------------------------------------------------------ */ LUA_API void lua_settable(lua_State *L, int idx) { TValue *o; cTValue *t = index2adr(L, idx); api_checknelems(L, 2); api_checkvalidindex(L, t); o = lj_meta_tset(L, t, L->top-2); if (o) { /* NOBARRIER: lj_meta_tset ensures the table is not black. */ copyTV(L, o, L->top-1); L->top -= 2; } else { L->top += 3; copyTV(L, L->top-1, L->top-6); lj_vm_call(L, L->top-3, 0+1); L->top -= 3; } } LUA_API void lua_setfield(lua_State *L, int idx, const char *k) { TValue *o; TValue key; cTValue *t = index2adr(L, idx); api_checknelems(L, 1); api_checkvalidindex(L, t); setstrV(L, &key, lj_str_newz(L, k)); o = lj_meta_tset(L, t, &key); if (o) { L->top--; /* NOBARRIER: lj_meta_tset ensures the table is not black. */ copyTV(L, o, L->top); } else { L->top += 3; copyTV(L, L->top-1, L->top-6); lj_vm_call(L, L->top-3, 0+1); L->top -= 2; } } LUA_API void lua_rawset(lua_State *L, int idx) { GCtab *t = tabV(index2adr(L, idx)); TValue *dst, *key; api_checknelems(L, 2); key = L->top-2; dst = lj_tab_set(L, t, key); copyTV(L, dst, key+1); lj_gc_anybarriert(L, t); L->top = key; } LUA_API void lua_rawseti(lua_State *L, int idx, int n) { GCtab *t = tabV(index2adr(L, idx)); TValue *dst, *src; api_checknelems(L, 1); dst = lj_tab_setint(L, t, n); src = L->top-1; copyTV(L, dst, src); lj_gc_barriert(L, t, dst); L->top = src; } LUA_API int lua_setmetatable(lua_State *L, int idx) { global_State *g; GCtab *mt; cTValue *o = index2adr(L, idx); api_checknelems(L, 1); api_checkvalidindex(L, o); if (tvisnil(L->top-1)) { mt = NULL; } else { api_check(L, tvistab(L->top-1)); mt = tabV(L->top-1); } g = G(L); if (tvistab(o)) { setgcref(tabV(o)->metatable, obj2gco(mt)); if (mt) lj_gc_objbarriert(L, tabV(o), mt); } else if (tvisudata(o)) { setgcref(udataV(o)->metatable, obj2gco(mt)); if (mt) lj_gc_objbarrier(L, udataV(o), mt); } else { /* Flush cache, since traces specialize to basemt. But not during __gc. */ if (lj_trace_flushall(L)) lj_err_caller(L, LJ_ERR_NOGCMM); if (tvisbool(o)) { /* NOBARRIER: basemt is a GC root. */ setgcref(basemt_it(g, LJ_TTRUE), obj2gco(mt)); setgcref(basemt_it(g, LJ_TFALSE), obj2gco(mt)); } else { /* NOBARRIER: basemt is a GC root. */ setgcref(basemt_obj(g, o), obj2gco(mt)); } } L->top--; return 1; } LUA_API int lua_setfenv(lua_State *L, int idx) { cTValue *o = index2adr(L, idx); GCtab *t; api_checknelems(L, 1); api_checkvalidindex(L, o); api_check(L, tvistab(L->top-1)); t = tabV(L->top-1); if (tvisfunc(o)) { setgcref(funcV(o)->c.env, obj2gco(t)); } else if (tvisudata(o)) { setgcref(udataV(o)->env, obj2gco(t)); } else if (tvisthread(o)) { setgcref(threadV(o)->env, obj2gco(t)); } else { L->top--; return 0; } lj_gc_objbarrier(L, gcV(o), t); L->top--; return 1; } LUA_API const char *lua_setupvalue(lua_State *L, int idx, int n) { cTValue *f = index2adr(L, idx); TValue *val; const char *name; api_checknelems(L, 1); name = lj_debug_uvnamev(f, (uint32_t)(n-1), &val); if (name) { L->top--; copyTV(L, val, L->top); lj_gc_barrier(L, funcV(f), L->top); } return name; } /* -- Calls --------------------------------------------------------------- */ LUA_API void lua_call(lua_State *L, int nargs, int nresults) { api_check(L, L->status == 0 || L->status == LUA_ERRERR); api_checknelems(L, nargs+1); lj_vm_call(L, L->top - nargs, nresults+1); } LUA_API int lua_pcall(lua_State *L, int nargs, int nresults, int errfunc) { global_State *g = G(L); uint8_t oldh = hook_save(g); ptrdiff_t ef; int status; api_check(L, L->status == 0 || L->status == LUA_ERRERR); api_checknelems(L, nargs+1); if (errfunc == 0) { ef = 0; } else { cTValue *o = stkindex2adr(L, errfunc); api_checkvalidindex(L, o); ef = savestack(L, o); } status = lj_vm_pcall(L, L->top - nargs, nresults+1, ef); if (status) hook_restore(g, oldh); return status; } static TValue *cpcall(lua_State *L, lua_CFunction func, void *ud) { GCfunc *fn = lj_func_newC(L, 0, getcurrenv(L)); fn->c.f = func; setfuncV(L, L->top, fn); setlightudV(L->top+1, checklightudptr(L, ud)); cframe_nres(L->cframe) = 1+0; /* Zero results. */ L->top += 2; return L->top-1; /* Now call the newly allocated C function. */ } LUA_API int lua_cpcall(lua_State *L, lua_CFunction func, void *ud) { global_State *g = G(L); uint8_t oldh = hook_save(g); int status; api_check(L, L->status == 0 || L->status == LUA_ERRERR); status = lj_vm_cpcall(L, func, ud, cpcall); if (status) hook_restore(g, oldh); return status; } LUALIB_API int luaL_callmeta(lua_State *L, int idx, const char *field) { if (luaL_getmetafield(L, idx, field)) { TValue *base = L->top--; copyTV(L, base, index2adr(L, idx)); L->top = base+1; lj_vm_call(L, base, 1+1); return 1; } return 0; } /* -- Coroutine yield and resume ------------------------------------------ */ LUA_API int lua_yield(lua_State *L, int nresults) { void *cf = L->cframe; global_State *g = G(L); if (cframe_canyield(cf)) { cf = cframe_raw(cf); if (!hook_active(g)) { /* Regular yield: move results down if needed. */ cTValue *f = L->top - nresults; if (f > L->base) { TValue *t = L->base; while (--nresults >= 0) copyTV(L, t++, f++); L->top = t; } L->cframe = NULL; L->status = LUA_YIELD; return -1; } else { /* Yield from hook: add a pseudo-frame. */ TValue *top = L->top; hook_leave(g); top->u64 = cframe_multres(cf); setcont(top+1, lj_cont_hook); setframe_pc(top+1, cframe_pc(cf)-1); setframe_gc(top+2, obj2gco(L)); setframe_ftsz(top+2, (int)((char *)(top+3)-(char *)L->base)+FRAME_CONT); L->top = L->base = top+3; #if LJ_TARGET_X64 lj_err_throw(L, LUA_YIELD); #else L->cframe = NULL; L->status = LUA_YIELD; lj_vm_unwind_c(cf, LUA_YIELD); #endif } } lj_err_msg(L, LJ_ERR_CYIELD); return 0; /* unreachable */ } LUA_API int lua_resume(lua_State *L, int nargs) { if (L->cframe == NULL && L->status <= LUA_YIELD) return lj_vm_resume(L, L->top - nargs, 0, 0); L->top = L->base; setstrV(L, L->top, lj_err_str(L, LJ_ERR_COSUSP)); incr_top(L); return LUA_ERRRUN; } /* -- GC and memory management -------------------------------------------- */ LUA_API int lua_gc(lua_State *L, int what, int data) { global_State *g = G(L); int res = 0; switch (what) { case LUA_GCSTOP: g->gc.threshold = LJ_MAX_MEM; break; case LUA_GCRESTART: g->gc.threshold = data == -1 ? (g->gc.total/100)*g->gc.pause : g->gc.total; break; case LUA_GCCOLLECT: lj_gc_fullgc(L); break; case LUA_GCCOUNT: res = (int)(g->gc.total >> 10); break; case LUA_GCCOUNTB: res = (int)(g->gc.total & 0x3ff); break; case LUA_GCSTEP: { MSize a = (MSize)data << 10; g->gc.threshold = (a <= g->gc.total) ? (g->gc.total - a) : 0; while (g->gc.total >= g->gc.threshold) if (lj_gc_step(L)) { res = 1; break; } break; } case LUA_GCSETPAUSE: res = (int)(g->gc.pause); g->gc.pause = (MSize)data; break; case LUA_GCSETSTEPMUL: res = (int)(g->gc.stepmul); g->gc.stepmul = (MSize)data; break; default: res = -1; /* Invalid option. */ } return res; } LUA_API lua_Alloc lua_getallocf(lua_State *L, void **ud) { global_State *g = G(L); if (ud) *ud = g->allocd; return g->allocf; } LUA_API void lua_setallocf(lua_State *L, lua_Alloc f, void *ud) { global_State *g = G(L); g->allocd = ud; g->allocf = f; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_folddef.h0000664000000000000000000003466612213333065022646 0ustar rootroot/* This is a generated file. DO NOT EDIT! */ static const FoldFunc fold_func[] = { fold_kfold_numarith, fold_kfold_ldexp, fold_kfold_fpmath, fold_kfold_numpow, fold_kfold_numcomp, fold_kfold_intarith, fold_kfold_intovarith, fold_kfold_bnot, fold_kfold_bswap, fold_kfold_intcomp, fold_kfold_intcomp0, fold_kfold_int64arith, fold_kfold_int64arith2, fold_kfold_int64shift, fold_kfold_bnot64, fold_kfold_bswap64, fold_kfold_int64comp, fold_kfold_int64comp0, fold_kfold_snew_kptr, fold_kfold_snew_empty, fold_kfold_strref, fold_kfold_strref_snew, fold_kfold_strcmp, fold_kfold_add_kgc, fold_kfold_add_kptr, fold_kfold_add_kright, fold_kfold_tobit, fold_kfold_conv_kint_num, fold_kfold_conv_kintu32_num, fold_kfold_conv_kint_ext, fold_kfold_conv_kint_i64, fold_kfold_conv_kint64_num_i64, fold_kfold_conv_kint64_num_u64, fold_kfold_conv_kint64_int_i64, fold_kfold_conv_knum_int_num, fold_kfold_conv_knum_u32_num, fold_kfold_conv_knum_i64_num, fold_kfold_conv_knum_u64_num, fold_kfold_tostr_knum, fold_kfold_tostr_kint, fold_kfold_strto, lj_opt_cse, fold_kfold_kref, fold_shortcut_round, fold_shortcut_left, fold_shortcut_dropleft, fold_shortcut_leftleft, fold_simplify_numadd_negx, fold_simplify_numadd_xneg, fold_simplify_numsub_k, fold_simplify_numsub_negk, fold_simplify_numsub_xneg, fold_simplify_nummuldiv_k, fold_simplify_nummuldiv_negk, fold_simplify_nummuldiv_negneg, fold_simplify_numpow_xk, fold_simplify_numpow_kx, fold_shortcut_conv_num_int, fold_simplify_conv_int_num, fold_simplify_conv_i64_num, fold_simplify_conv_int_i64, fold_simplify_conv_flt_num, fold_simplify_tobit_conv, fold_simplify_floor_conv, fold_simplify_conv_sext, fold_simplify_conv_narrow, fold_cse_conv, fold_narrow_convert, fold_simplify_intadd_k, fold_simplify_intmul_k, fold_simplify_intsub_k, fold_simplify_intsub_kleft, fold_simplify_intadd_k64, fold_simplify_intsub_k64, fold_simplify_intmul_k32, fold_simplify_intmul_k64, fold_simplify_intmod_k, fold_simplify_intmod_kleft, fold_simplify_intsub, fold_simplify_intsubadd_leftcancel, fold_simplify_intsubsub_leftcancel, fold_simplify_intsubsub_rightcancel, fold_simplify_intsubadd_rightcancel, fold_simplify_intsubaddadd_cancel, fold_simplify_band_k, fold_simplify_bor_k, fold_simplify_bxor_k, fold_simplify_shift_ik, fold_simplify_shift_andk, fold_simplify_shift1_ki, fold_simplify_shift2_ki, fold_simplify_shiftk_andk, fold_simplify_andk_shiftk, fold_reassoc_intarith_k, fold_reassoc_intarith_k64, fold_reassoc_dup, fold_reassoc_bxor, fold_reassoc_shift, fold_reassoc_minmax_k, fold_reassoc_minmax_left, fold_reassoc_minmax_right, fold_abc_fwd, fold_abc_k, fold_abc_invar, fold_comm_swap, fold_comm_equal, fold_comm_comp, fold_comm_dup, fold_comm_bxor, fold_merge_eqne_snew_kgc, lj_opt_fwd_aload, fold_kfold_hload_kkptr, lj_opt_fwd_hload, lj_opt_fwd_uload, lj_opt_fwd_tab_len, fold_cse_uref, lj_opt_fwd_hrefk, fold_fwd_href_tnew, fold_fwd_href_tdup, fold_fload_tab_tnew_asize, fold_fload_tab_tnew_hmask, fold_fload_tab_tdup_asize, fold_fload_tab_tdup_hmask, fold_fload_tab_ah, fold_fload_str_len_kgc, fold_fload_str_len_snew, fold_fload_cdata_typeid_kgc, fold_fload_cdata_int64_kgc, fold_fload_cdata_typeid_cnew, fold_fload_cdata_ptr_int64_cnew, lj_opt_cse, lj_opt_fwd_fload, fold_fwd_sload, fold_xload_kptr, lj_opt_fwd_xload, fold_barrier_tab, fold_barrier_tnew_tdup, lj_opt_dse_ahstore, lj_opt_dse_ustore, lj_opt_dse_fstore, lj_opt_dse_xstore, lj_ir_emit }; static const uint32_t fold_hash[916] = { 0xffffffff, 0xffffffff, 0x5b4c8016, 0x0d4e7016, 0xffffffff, 0x1000701c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x29110c1a, 0xffffffff, 0xffffffff, 0x5b488016, 0x0d4a7016, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7b87fc07, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0d467016, 0xffffffff, 0x5a4c73ff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x5153fc29, 0xffffffff, 0xffffffff, 0xffffffff, 0x5d408016, 0xffffffff, 0x594873ff, 0x8187440f, 0xffffffff, 0xffffffff, 0xffffffff, 0x8287fc0f, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6715ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2a11fc1a, 0xffffffff, 0x1daa5a70, 0xffffffff, 0xffffffff, 0x0a0bfc16, 0x5c408c16, 0x6911ffff, 0x8db7ffff, 0xffffffff, 0xffffffff, 0x1caa59d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6a0dffff, 0x2b68d002, 0xffffffff, 0x3cab5695, 0xffffffff, 0x41aaa675, 0xffffffff, 0xffffffff, 0xffffffff, 0x27ae5800, 0xffffffff, 0x6a09ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7f865c0f, 0xffffffff, 0xffffffff, 0xffffffff, 0x6a05ffff, 0x42abffff, 0x5e44881c, 0x5d50a016, 0x066c5816, 0x00646c1b, 0x75753bff, 0x1951fc18, 0x6264c81b, 0x1850641c, 0xffffffff, 0x6a01ffff, 0x87a7ffff, 0x4953fc1c, 0x8da80000, 0x4f52a3ff, 0x00606c1b, 0xffffffff, 0xffffffff, 0xffffffff, 0x5d428416, 0x88a53800, 0xffffffff, 0xffffffff, 0xffffffff, 0x05645816, 0xffffffff, 0x005c6c1b, 0x20aa71d6, 0xffffffff, 0xffffffff, 0xffffffff, 0x1399fc16, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x157f33ff, 0xffffffff, 0xffffffff, 0x584dfc20, 0xffffffff, 0xffffffff, 0xffffffff, 0x8d9bffff, 0xffffffff, 0x055c5816, 0xffffffff, 0x00546c1b, 0xffffffff, 0xffffffff, 0x5849fc20, 0xffffffff, 0xffffffff, 0xffffffff, 0x8c97ffff, 0x5543fc1c, 0x05585816, 0xffffffff, 0x00506c1b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x8a93ffff, 0x26ae6c00, 0x05545816, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x76753c17, 0x41aaa695, 0xffffffff, 0x898fffff, 0xffffffff, 0x05505816, 0xffffffff, 0xffffffff, 0xffffffff, 0x858867ff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x848bffff, 0xffffffff, 0x054c5816, 0x79873c06, 0x47525bff, 0xffffffff, 0x3f695401, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x8387ffff, 0xffffffff, 0x05485816, 0xffffffff, 0x5a4e5bff, 0xffffffff, 0xffffffff, 0x6264c816, 0x43aaa26e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x05445816, 0xffffffff, 0x5a4a5bff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3455fc1b, 0x0c5a701c, 0x6366cbff, 0x0e3c7000, 0xffffffff, 0x05405816, 0xffffffff, 0x59465bff, 0xffffffff, 0xffffffff, 0xffffffff, 0x41aaa276, 0x0c56701c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x21aa7275, 0x0b52701c, 0x61489016, 0x6465fc33, 0x8d77ffff, 0xffffffff, 0x7b87fc05, 0xffffffff, 0xffffffff, 0x2a126bff, 0x385a6fff, 0xffffffff, 0x446dfc16, 0xffffffff, 0x7473ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7d873000, 0xffffffff, 0x5c409016, 0x686fffff, 0x8187440d, 0xffffffff, 0xffffffff, 0x3554b81b, 0x8287fc0d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x686bffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x8d9ffc00, 0x737a5fff, 0x41aaaa75, 0xffffffff, 0xffffffff, 0x5e40801c, 0x0b42701c, 0x6b67ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2b68d000, 0xffffffff, 0xffffffff, 0x6d133017, 0xffffffff, 0xffffffff, 0x4c59fc16, 0xffffffff, 0xffffffff, 0x110bfc1c, 0x3aab566e, 0xffffffff, 0x5052a7ff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6515fc28, 0x4a55fc16, 0x7f865c0d, 0x88a53c00, 0x41aaa296, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x4451fc16, 0xffffffff, 0x60448bff, 0x21aa7295, 0xffffffff, 0x3cab5676, 0x04106c1b, 0xffffffff, 0x78873807, 0xffffffff, 0xffffffff, 0x574dfc16, 0xffffffff, 0x4e53ffff, 0xffffffff, 0x09145816, 0xffffffff, 0x040c6c1b, 0x8287fc00, 0x5e50a01c, 0x6467fc32, 0xffffffff, 0x5749fc16, 0xffffffff, 0xffffffff, 0xffffffff, 0x2a105816, 0x2e3e7c00, 0x04086c1b, 0x7083fc00, 0xffffffff, 0xffffffff, 0xffffffff, 0x5645fc16, 0xffffffff, 0x22aa6e6e, 0x5e42841c, 0x614e9c16, 0x090c5816, 0x04046c1b, 0x1eaa5ab3, 0xffffffff, 0xffffffff, 0xffffffff, 0x5441fc16, 0x41aaaa95, 0xffffffff, 0x5352a028, 0x09085816, 0x17505c16, 0x04006c1b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6b43ffff, 0xffffffff, 0x09045816, 0xffffffff, 0x43aaa2ae, 0xffffffff, 0xffffffff, 0xffffffff, 0x083e5800, 0x7c865c00, 0xffffffff, 0x76753c15, 0x3051fc2e, 0x09005816, 0xffffffff, 0xffffffff, 0xffffffff, 0x3aab568e, 0xffffffff, 0x43aaa66e, 0xffffffff, 0x1daa5a71, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2a12701c, 0x5f66cfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3cab5696, 0xffffffff, 0x100e701c, 0x41aaa676, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2a125c17, 0x3654b82e, 0x100a701c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x1006701c, 0xffffffff, 0x1951fc19, 0xffffffff, 0xffffffff, 0xffffffff, 0x23aa6e8e, 0xffffffff, 0x5b4e8016, 0xffffffff, 0x1eaa5ad3, 0x1002701c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x29130c1a, 0xffffffff, 0xffffffff, 0x0d4c7016, 0xffffffff, 0x475273ff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x5b468016, 0x0d487016, 0x5a4e73ff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x5d54a816, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x5a4a73ff, 0x6615fc16, 0x3bab56ae, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x594673ff, 0xffffffff, 0x61468c16, 0x8d17ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2a13fc1a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6913ffff, 0x40abfeb3, 0x8db9ffff, 0x41aaa696, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6a0fffff, 0x8db5ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7a873c07, 0xffffffff, 0xffffffff, 0xffffffff, 0x6a0bffff, 0x3f695402, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x24aa6eae, 0xffffffff, 0xffffffff, 0x6a07ffff, 0xffffffff, 0xffffffff, 0x066e5816, 0xffffffff, 0x00666c1b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6a03ffff, 0xffffffff, 0x4b55fc1c, 0x066a5816, 0xffffffff, 0x00626c1b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x4851fc1c, 0x05665816, 0x18506016, 0x005e6c1b, 0x12986416, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x8da1ffff, 0xffffffff, 0x3bab56ce, 0xffffffff, 0x43aaa6ae, 0xffffffff, 0xffffffff, 0x584ffc20, 0x7b87fc06, 0xffffffff, 0x5f4287ff, 0x8d9dffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x00566c1b, 0xffffffff, 0xffffffff, 0x584bfc20, 0x5253fc28, 0xffffffff, 0xffffffff, 0xffffffff, 0x5645fc1c, 0xffffffff, 0x40abfed3, 0x00526c1b, 0x8187440e, 0xffffffff, 0x5847fc20, 0x8287fc0e, 0xffffffff, 0xffffffff, 0x8b95ffff, 0x2e3c7800, 0x5441fc1c, 0xffffffff, 0xffffffff, 0xffffffff, 0x17505c1c, 0xffffffff, 0xffffffff, 0x41aaaa76, 0xffffffff, 0x614c9816, 0x8991ffff, 0x1daa5a6f, 0x05525816, 0x4d585bff, 0xffffffff, 0x8087400c, 0xffffffff, 0xffffffff, 0xffffffff, 0x1baa59d3, 0x828dffff, 0x25aa6ece, 0x054e5816, 0x76753c1b, 0xffffffff, 0xffffffff, 0xffffffff, 0x2b68d001, 0xffffffff, 0xffffffff, 0xffffffff, 0x8689ffff, 0xffffffff, 0x054a5816, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x43aca01b, 0x05465816, 0x7f865c0e, 0x5a4c5bff, 0x39ab55d3, 0x01626c16, 0x02686fff, 0x3457fc1b, 0xffffffff, 0xffffffff, 0x0f3e7000, 0x3dab55ae, 0x05425816, 0x1951fc17, 0x59485bff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3153fc1b, 0x0c58701c, 0x5f64cbff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x035a6c16, 0xffffffff, 0xffffffff, 0xffffffff, 0x0b54701c, 0xffffffff, 0x8779ffff, 0x1faa71d5, 0xffffffff, 0xffffffff, 0x2d5eb81b, 0x72b5fc08, 0xffffffff, 0xffffffff, 0xffffffff, 0x0b50701c, 0x456ffc16, 0x7b75ffff, 0xffffffff, 0xffffffff, 0x147e5c16, 0xffffffff, 0xffffffff, 0x2a106bff, 0xffffffff, 0x1eaa5ab4, 0x446bfc16, 0xffffffff, 0xffffffff, 0xffffffff, 0x41aaaa96, 0xffffffff, 0x3556b81b, 0x87a5fc00, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x4e6dffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3252b81b, 0xffffffff, 0x5e54a81c, 0xffffffff, 0xffffffff, 0x0b44701c, 0x28b05c00, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x73785fff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0b40701c, 0xffffffff, 0x6b65ffff, 0xffffffff, 0xffffffff, 0x1daa5a72, 0xffffffff, 0xffffffff, 0xffffffff, 0x6266cc1b, 0xffffffff, 0x375bfc16, 0xffffffff, 0xffffffff, 0xffffffff, 0x3f695400, 0xffffffff, 0xffffffff, 0xffffffff, 0x6d113017, 0x3ead541b, 0xffffffff, 0x5d448816, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x18506416, 0xffffffff, 0xffffffff, 0x16b37400, 0xffffffff, 0x4653fc16, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x04126c1b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x574ffc16, 0xffffffff, 0x6855ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x040e6c1b, 0x41aaa275, 0xffffffff, 0xffffffff, 0xffffffff, 0x574bfc16, 0x6f826400, 0x6851ffff, 0x1eaa5ad4, 0x2a125816, 0xffffffff, 0x040a6c1b, 0x7185fc00, 0xffffffff, 0xffffffff, 0xffffffff, 0x5747fc16, 0x7b87fc04, 0xffffffff, 0xffffffff, 0x090e5816, 0xffffffff, 0x04066c1b, 0x6e81fc00, 0x1aac6c1b, 0x1850601c, 0x2e5cbbff, 0x5543fc16, 0xffffffff, 0xffffffff, 0xffffffff, 0x090a5816, 0xffffffff, 0x04026c1b, 0xffffffff, 0xffffffff, 0x8087440c, 0xffffffff, 0xffffffff, 0xffffffff, 0x6c45ffff, 0x8287fc0c, 0x09065816, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x6b41ffff, 0x3353fc2e, 0x09025816, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2f50bbff, 0x073c5800, 0x6266cc16, 0x5f4083ff, 0xffffffff, 0xffffffff, 0x43aca41b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2a10701c, 0x6364cfff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x7e865c0c, 0xffffffff, 0xffffffff, 0x3656b82e, 0x41aaa295, 0x100c701c, 0x614a9416, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x2c5ebc1b, 0xffffffff, 0x2a105c17, 0xffffffff, 0x1008701c, 0x3cab5675, 0xffffffff, 0xffffffff, 0x77873806, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x1004701c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; #define fold_hashkey(k) (lj_rol(lj_rol((k),17)-(k),16)%915) tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_aux.c0000664000000000000000000002132412202141143022147 0ustar rootroot/* ** Auxiliary library for the Lua/C API. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major parts taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #include #include #include #define lib_aux_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lj_obj.h" #include "lj_err.h" #include "lj_state.h" #include "lj_trace.h" #include "lj_lib.h" #if LJ_TARGET_POSIX #include #endif /* -- I/O error handling -------------------------------------------------- */ LUALIB_API int luaL_fileresult(lua_State *L, int stat, const char *fname) { if (stat) { setboolV(L->top++, 1); return 1; } else { int en = errno; /* Lua API calls may change this value. */ setnilV(L->top++); if (fname) lua_pushfstring(L, "%s: %s", fname, strerror(en)); else lua_pushfstring(L, "%s", strerror(en)); setintV(L->top++, en); lj_trace_abort(G(L)); return 3; } } LUALIB_API int luaL_execresult(lua_State *L, int stat) { if (stat != -1) { #if LJ_TARGET_POSIX if (WIFSIGNALED(stat)) { stat = WTERMSIG(stat); setnilV(L->top++); lua_pushliteral(L, "signal"); } else { if (WIFEXITED(stat)) stat = WEXITSTATUS(stat); if (stat == 0) setboolV(L->top++, 1); else setnilV(L->top++); lua_pushliteral(L, "exit"); } #else if (stat == 0) setboolV(L->top++, 1); else setnilV(L->top++); lua_pushliteral(L, "exit"); #endif setintV(L->top++, stat); return 3; } return luaL_fileresult(L, 0, NULL); } /* -- Module registration ------------------------------------------------- */ LUALIB_API const char *luaL_findtable(lua_State *L, int idx, const char *fname, int szhint) { const char *e; lua_pushvalue(L, idx); do { e = strchr(fname, '.'); if (e == NULL) e = fname + strlen(fname); lua_pushlstring(L, fname, (size_t)(e - fname)); lua_rawget(L, -2); if (lua_isnil(L, -1)) { /* no such field? */ lua_pop(L, 1); /* remove this nil */ lua_createtable(L, 0, (*e == '.' ? 1 : szhint)); /* new table for field */ lua_pushlstring(L, fname, (size_t)(e - fname)); lua_pushvalue(L, -2); lua_settable(L, -4); /* set new table into field */ } else if (!lua_istable(L, -1)) { /* field has a non-table value? */ lua_pop(L, 2); /* remove table and value */ return fname; /* return problematic part of the name */ } lua_remove(L, -2); /* remove previous table */ fname = e + 1; } while (*e == '.'); return NULL; } static int libsize(const luaL_Reg *l) { int size = 0; for (; l->name; l++) size++; return size; } LUALIB_API void luaL_openlib(lua_State *L, const char *libname, const luaL_Reg *l, int nup) { lj_lib_checkfpu(L); if (libname) { int size = libsize(l); /* check whether lib already exists */ luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 16); lua_getfield(L, -1, libname); /* get _LOADED[libname] */ if (!lua_istable(L, -1)) { /* not found? */ lua_pop(L, 1); /* remove previous result */ /* try global variable (and create one if it does not exist) */ if (luaL_findtable(L, LUA_GLOBALSINDEX, libname, size) != NULL) lj_err_callerv(L, LJ_ERR_BADMODN, libname); lua_pushvalue(L, -1); lua_setfield(L, -3, libname); /* _LOADED[libname] = new table */ } lua_remove(L, -2); /* remove _LOADED table */ lua_insert(L, -(nup+1)); /* move library table to below upvalues */ } for (; l->name; l++) { int i; for (i = 0; i < nup; i++) /* copy upvalues to the top */ lua_pushvalue(L, -nup); lua_pushcclosure(L, l->func, nup); lua_setfield(L, -(nup+2), l->name); } lua_pop(L, nup); /* remove upvalues */ } LUALIB_API void luaL_register(lua_State *L, const char *libname, const luaL_Reg *l) { luaL_openlib(L, libname, l, 0); } LUALIB_API const char *luaL_gsub(lua_State *L, const char *s, const char *p, const char *r) { const char *wild; size_t l = strlen(p); luaL_Buffer b; luaL_buffinit(L, &b); while ((wild = strstr(s, p)) != NULL) { luaL_addlstring(&b, s, (size_t)(wild - s)); /* push prefix */ luaL_addstring(&b, r); /* push replacement in place of pattern */ s = wild + l; /* continue after `p' */ } luaL_addstring(&b, s); /* push last suffix */ luaL_pushresult(&b); return lua_tostring(L, -1); } /* -- Buffer handling ----------------------------------------------------- */ #define bufflen(B) ((size_t)((B)->p - (B)->buffer)) #define bufffree(B) ((size_t)(LUAL_BUFFERSIZE - bufflen(B))) static int emptybuffer(luaL_Buffer *B) { size_t l = bufflen(B); if (l == 0) return 0; /* put nothing on stack */ lua_pushlstring(B->L, B->buffer, l); B->p = B->buffer; B->lvl++; return 1; } static void adjuststack(luaL_Buffer *B) { if (B->lvl > 1) { lua_State *L = B->L; int toget = 1; /* number of levels to concat */ size_t toplen = lua_strlen(L, -1); do { size_t l = lua_strlen(L, -(toget+1)); if (!(B->lvl - toget + 1 >= LUA_MINSTACK/2 || toplen > l)) break; toplen += l; toget++; } while (toget < B->lvl); lua_concat(L, toget); B->lvl = B->lvl - toget + 1; } } LUALIB_API char *luaL_prepbuffer(luaL_Buffer *B) { if (emptybuffer(B)) adjuststack(B); return B->buffer; } LUALIB_API void luaL_addlstring(luaL_Buffer *B, const char *s, size_t l) { while (l--) luaL_addchar(B, *s++); } LUALIB_API void luaL_addstring(luaL_Buffer *B, const char *s) { luaL_addlstring(B, s, strlen(s)); } LUALIB_API void luaL_pushresult(luaL_Buffer *B) { emptybuffer(B); lua_concat(B->L, B->lvl); B->lvl = 1; } LUALIB_API void luaL_addvalue(luaL_Buffer *B) { lua_State *L = B->L; size_t vl; const char *s = lua_tolstring(L, -1, &vl); if (vl <= bufffree(B)) { /* fit into buffer? */ memcpy(B->p, s, vl); /* put it there */ B->p += vl; lua_pop(L, 1); /* remove from stack */ } else { if (emptybuffer(B)) lua_insert(L, -2); /* put buffer before new value */ B->lvl++; /* add new value into B stack */ adjuststack(B); } } LUALIB_API void luaL_buffinit(lua_State *L, luaL_Buffer *B) { B->L = L; B->p = B->buffer; B->lvl = 0; } /* -- Reference management ------------------------------------------------ */ #define FREELIST_REF 0 /* Convert a stack index to an absolute index. */ #define abs_index(L, i) \ ((i) > 0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1) LUALIB_API int luaL_ref(lua_State *L, int t) { int ref; t = abs_index(L, t); if (lua_isnil(L, -1)) { lua_pop(L, 1); /* remove from stack */ return LUA_REFNIL; /* `nil' has a unique fixed reference */ } lua_rawgeti(L, t, FREELIST_REF); /* get first free element */ ref = (int)lua_tointeger(L, -1); /* ref = t[FREELIST_REF] */ lua_pop(L, 1); /* remove it from stack */ if (ref != 0) { /* any free element? */ lua_rawgeti(L, t, ref); /* remove it from list */ lua_rawseti(L, t, FREELIST_REF); /* (t[FREELIST_REF] = t[ref]) */ } else { /* no free elements */ ref = (int)lua_objlen(L, t); ref++; /* create new reference */ } lua_rawseti(L, t, ref); return ref; } LUALIB_API void luaL_unref(lua_State *L, int t, int ref) { if (ref >= 0) { t = abs_index(L, t); lua_rawgeti(L, t, FREELIST_REF); lua_rawseti(L, t, ref); /* t[ref] = t[FREELIST_REF] */ lua_pushinteger(L, ref); lua_rawseti(L, t, FREELIST_REF); /* t[FREELIST_REF] = ref */ } } /* -- Default allocator and panic function -------------------------------- */ static int panic(lua_State *L) { const char *s = lua_tostring(L, -1); fputs("PANIC: unprotected error in call to Lua API (", stderr); fputs(s ? s : "?", stderr); fputc(')', stderr); fputc('\n', stderr); fflush(stderr); return 0; } #ifdef LUAJIT_USE_SYSMALLOC #if LJ_64 #error "Must use builtin allocator for 64 bit target" #endif static void *mem_alloc(void *ud, void *ptr, size_t osize, size_t nsize) { (void)ud; (void)osize; if (nsize == 0) { free(ptr); return NULL; } else { return realloc(ptr, nsize); } } LUALIB_API lua_State *luaL_newstate(void) { lua_State *L = lua_newstate(mem_alloc, NULL); if (L) G(L)->panic = panic; return L; } #else #include "lj_alloc.h" LUALIB_API lua_State *luaL_newstate(void) { lua_State *L; void *ud = lj_alloc_create(); if (ud == NULL) return NULL; #if LJ_64 L = lj_state_newstate(lj_alloc_f, ud); #else L = lua_newstate(lj_alloc_f, ud); #endif if (L) G(L)->panic = panic; return L; } #if LJ_64 LUA_API lua_State *lua_newstate(lua_Alloc f, void *ud) { UNUSED(f); UNUSED(ud); fputs("Must use luaL_newstate() for 64 bit target\n", stderr); return NULL; } #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_package.o0000664000000000000000000004232012213333062022765 0ustar rootrootELF>@@ UHH]LeLmH HIIźHMLH¾H߸H]LeLmUHAVAUATSHIžHHLHHt3HH=LH߸HHtH߸HAADDHHu(DHHLH߸LHHHt4HtH DHAVHLHLHHHtLHLHHH=u*HHLH[A\A]A^]UHAVAUATSHĀHIHADpHLDHHtWHLHHtLH߸HLDHHHtHHHHLHH.LHPHIDL)LHHHH`Ht)H`HtHtH߸HHHA~=AADHDHHAE9}ϸH[A\A]A^]UHH]LeLmH IHIվ-HHPHHEڹHLHLLHþLHH]LeLmUHAWAVAUATSH8 IHHIMHA}tzLLHLH\LHHLHþLHHHIA<;u H<;ttB;HIHutHLDHLl LH)HLM?HJHھLDLHLaHH)HLHH8 [A\A]A^A_]UHH]LeLmLuH HIIվHIHuLH߸ALLHH]LeLmLuUH]UHH]LeLmLuL}H0HIIAHHHtHIrHHIHHHLH߸HHI<$uCA}*DLIHHHM<$MA}*uHLEuHHI<$HuxHHEu~LHHI<$UIľHMtHLHLHЃ' HH I$$H]LeLmLuL}UHH]LeLmH HIľ.HHHL)LHHHHIſHtILHHQt-t LHLLH߸H]LeLmUHH]LeLmH HIźHHBIHt"LHHt LHH]LeLmUHATSHIĺHHtH߸LHHuPLHyHƿHtLHHHtLH߸[A\]UHATSHHHIHtHHt LH[A\]UHSHHHu,HHHHHH[]UHH]LeLmLuH HIƹHIźHIĺHMLLHHNHuHHH]LeLmLuUHATSHIĺHHLHAĸEt4HHAHDH[A\]UHH]LeLmLuH HIIEHHtEt LH5HHLHHHLHH]LeLmLuUHSHHH8HtHH[]UHAUATSHHHHCxtE@@SHPHHHHHAAHHCxtE@@SHPAT$DHIJ4HuHHHAľHEHEH HHHHHHHHHH[A\A]]error loading module '%s' from file '%s': %sloop or previous error loading module '%s''package.loaders' must be a table'module' not called from a Lua function'package.preload' must be a table no field package.preload['%s']./?.lua;/usr/local/share/luajit-2.0.2/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so_LOADEDloadersmodule '%s' not found:%s_NAME_M_PACKAGEf_.?r no file '%s''package.%s' must be a string/LOADLIB: %s_LOADLIBluaopen_%sluaJIT_BC_%scpath no module '%s' in file '%s'preloadpath__indexopeninit;;;;lj_lib.h(((L->top-1)->it) == (~8u))__gcpackageLUA_NOENVLUA_PATHLUA_CPATH/ ; ? ! -configloaded_PRELOADloadlibsearchpathseeallmodulerequirelj_lib_pushccGCC: (Debian 4.7.3-4) 4.7.3zRx $gAC PR $DIAC G= $lNAC K> $~AC Pi (AC Pv $AC Tl  AC F (0AC X $\AC P $vAC Pa  AC C  UAC CM  AC Ey $AC T  @AC C $dAC T ;AC Eq $PAC IB .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.8.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @H*&T,T12X@2 T OAP\0tezu C h! %ggI/9NN~X|cl u  v  U$  f - 5;Mf @r`(0    %.;F\iy'/6FTZgw*1AIPYkylib_package.cloaderrorlj_cf_package_requiresentinel_lj_cf_package_modulemksymnamesearchpathfindfilell_bcsymll_loadfunclj_cf_package_loader_crootlj_cf_package_loader_clj_cf_package_loader_preloadlj_cf_package_loader_lualj_cf_package_seealllj_cf_package_searchpathlj_cf_package_loadlibsetpathlj_cf_package_unloadlib__PRETTY_FUNCTION__.4442package_libpackage_loaderspackage_globallua_tolstringluaL_errorluaL_checklstringlua_settoplua_getfieldlua_tobooleanlua_touserdatalua_typelua_pushlstringlua_rawgetilua_pushstringlua_calllua_isstringlua_concatlua_pushlightuserdatalua_setfieldlua_pushbooleanlua_pushvaluelua_gettopluaL_findtablelj_err_callervstrrchrlua_getstacklua_getinfolua_iscfunctionlua_setfenvstrchrluaL_gsublua_pushfstringlua_removeluaL_buffinitfopen64fcloseluaL_pushresultluaL_addvaluedlsymlua_gettablelua_newuserdatalua_setmetatablelua_settabledlopendlerrorluaL_loadbufferlua_pushcclosureluaL_loadfileluaL_checktypelua_getmetatablelua_createtableluaL_optlstringlua_pushnillua_insertgetenvluaL_checkudatadlcloseluaopen_packageluaL_newmetatable__assert_failluaL_registerlua_replacelua_rawseti%!:!H U"#$ %%&'  0" %( `,"6 >)X*e(y! "+,(-.$ /0+.,;(O0_%l'r 120#3 %% ($34M5Z2h0m *z%($$2 00+ *06 ) 30+2?7O <W8h9q ~"2:$22,$;4 >9 @D<W=g>?<! B< > D@'A\;)B F=>C).%@!P U]"c sh @D u=E(' $F& 3%@GH uU=b2oHIJ+1 D J + C $b K L # ; ) ! f s = #  # , %9 (C P "` %m (v  K  = #  M; NH O^ Pk 2x G 2  0 s Q @ Q # #< RI S{ # # R S   +T*+1 6 A<I T<a>q0 UV X L    Y& 308  = EZR2_[qP|  L   Y\ ` 0   %&($0 5 *: J pO 3T f =n)s G0 4 N0 U4 02 Z$ ^(f 0f8 @qH$ ` h p x xg Hgp|4`    $  Df h tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bcread.o0000664000000000000000000002332012213333053022450 0ustar rootrootELF>@@ HG0W,9sUHu)W,HHw0UHSHHW0 HvKȃ w,uw,2H@xO,uO,HW0H[]UHH]LeLmH HIIvcDhDHHDH{HSA$AD$xuHB@(twuH*A$EuHA$HAD$%vAD$H]LeLmUHH]LeHIӉ"HLH]LeUHATSIWD9s&9wIt$8I|$ID$8A\$D[A\]UHSHH_HWh<t<=t<@u HHcH H߸HUHAWAVAUATSHAu;Hw Aփ y HZC,tdK@t=Hs0H{8L AIM9tC9tDHK,Hs0H{8HC8HC0C,C@HsPH{HUSHIHt HEHuEt HC SS@t;D<E9DACHUC@HC8HMHLD{@D{,HC8HC0C,Lc0D9k,H[A\A]A^A_]UHAWAVAUATSHxIHGHE tHUHB+B$G\G@, w ;AV,uJAN,IF00HxI~0@Ly uJAN,pHxI~0@J? uAV,PHIF0 L4AAt,I^CuC$LkI)HC$ILkAt.IvhHHHHHI~IF`;LA;F,vLL[I~HIF`AF,t"IV0:uAF,HIV0wLLn >= (len)ls->n > 0lj_obj.htp <= BCDUMP_KTAB_TRUE(binary)%s: %slen != 0ls->current == 0x1b!(((&key)->it) == (~0u))(((L->top)->it) == (~7u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))ls->p + ls->n == ls->sb.buf + ls->sb.nlj_bcreadsetgcVbcread_bytebcread_uleb128bcread_fillbcread_membcread_kgcbcread_ktabbcread_ktabkbcread_uleb128_33GCC: (Debian 4.7.3-4) 4.7.3zRx 7LC Y  <AC E $`AC P  3AC Lb  <AC Ct TAC E(`AC MN (8 AC M& .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @ &`,`12`@2OO`W0`u@p& @ p 78 17@Yf Z 3<1T`,   N 0C Ip  bp{8 lj_bcread.cbcread_mem__PRETTY_FUNCTION__.4562bcread_uleb128__PRETTY_FUNCTION__.4578bcread_ktabk__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4621bcread_blockbcread_resizebcread_errorbcread_fill__PRETTY_FUNCTION__.4543__PRETTY_FUNCTION__.4722__PRETTY_FUNCTION__.4571__PRETTY_FUNCTION__.4635__PRETTY_FUNCTION__.4654__PRETTY_FUNCTION__.4587__assert_faillj_str_newmemcpylj_mem_realloclj_err_allmsglj_str_pushflj_err_throwmemmovelj_bcreadluaopen_ffilj_mem_newgcolj_tab_newlj_tab_setlj_state_growstack1 8   $t ~      >  H %M R Z  .X Eb g Nt!" ,  U ,   (#   ^S Z _ d      :%r' 1 6 ;a h m r      &D  ' N  r  (\ & C   l ps x }  p   [  e %j o  )     @7d1tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_debug.o0000664000000000000000000004133012213333065022463 0ustar rootrootELF>(@@ UHWHGHHHOHHH Jv:H9uPG@(t]HGH;Gs7xu1HGxtUH\8HUHH]LeLmH0HHuIŋu܃HIHuHCHcUH H9Kv HDHC'L9ҋu܃HLLHH]LeLmUHAWAVAUATSHIHAIH HHHHL8HLHHQHLuLt5L-LLHH5 L#H[A\A]A^A_]UHATSHHAHHtH=t HHHAtEcAt HcDrAt HcDlHcDHuHHHcHH[A\]UHH]LeHHIHHuDIc$H4HAt$(x HcHHHH]LeUHH]LeLmLuL}H@HHuũH%ũHAAAũHIŋũHũHAƾcLHAEErLAHEElLDHDEDEDOAHũHHDDLHH]LeLmLuL}UHATSHIľHAT$9rFHA|$u HALHIL HCHH HP[A\]UHATSH HIHExuBHAT$9s[HIDHEоHIĀxt_HHAT$9rFHHIDHHUЉ PBtHuFt{H [A\]UHH]LeLmH HAAžHEtDHDHHtmHHEtdHCHPHH Jv:H9uPC@(tHC H]LeLmUHSHHHH[]UH]UHATSHĀHHuIċuHHpLuukHuHIT$HJIL$HHH Hv<J9uRAD$@(tuHHpLHHH[A\]UHAUATSHHHuIċu܃HAHKuHcƃ|u.HDHCDHHHHH`Luu܃kHDH`LIHt/HLLHHHC@HĈ[A\A]]UHH]LeHHIHcLHH]LeUHH]LeHHIHLHH]LeUHH]LeHHHIH9uHH HLHH]LeUHAWAVAUATSHIHLIŋLLHËLLt;LLHPLID$@_LHcID$HI;D$xHھLHHcLID$HЃxt{IUHJIMBxuPAE@(t)ruLHPHLuLLLGAAL<)$HpLHULuUL-ULHhLAxLz|LUȾLuLL8HXLH`LAAHEtLLEtLLHĘ[A\A]A^A_]UHSHHHCHHCHu HH[]UHSHHHH[]UHSHHHCHHCHHC@H[]UHSHHHu HC@H[]UH]lj_obj.hlib_debug.c(((L->base)->it) == (~6u))lua_debug> cont =(debug command)external hookflnSu>%ssourceshort_srclinedefinedlastlinedefinedwhatcurrentlinenupsnparamsisvarargnamenamewhatactivelinesfuncdebugcallreturnlinecounttail return!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((L->base+arg)->it) == (~8u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))> getregistry getmetatable setmetatablegetfenvsetfenvgetinfogetlocalsetlocal getupvalue setupvalue upvalueid upvaluejoinsethookgethookdebug tracebackgetthreadhcopyTVlj_cf_debug_getinfosetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx jAC e <KaC Y $\AC P (AC P   AC G  AC L| (RAC X5  $zAC Cr  HAC G $lAC P *AC E` AC K  AC G $ AC L  8AC Lg  D8AC Lg  haAC LP ( AC P  LAC EB /AC Ee FAC E| >AC Et <AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @},&,12@2wT@ O:\0+eHzHXu@( (x ) &p j%>jKH awJi*(R zhO*%y<Q{ f 8o 8x aU _ L / F >)9`   KYgu+<LUaj| 0=JWany0AR^`lib_debug.clj_cf_debug_getregistry__PRETTY_FUNCTION__.4040getthread__PRETTY_FUNCTION__.4550lj_cf_debug_tracebacklj_cf_debug_debuglj_cf_debug_gethookhookfKEY_HOOKhooknames.4624lj_cf_debug_sethooklj_cf_debug_upvalueidlj_cf_debug_upvaluejoindebug_getupvaluelj_cf_debug_setupvaluelj_cf_debug_getupvaluelj_cf_debug_setlocallj_cf_debug_getlocalsettabsisettabsstreatstackoptionlj_cf_debug_getinfo__PRETTY_FUNCTION__.4565__PRETTY_FUNCTION__.3991lj_cf_debug_setfenvlj_cf_debug_getfenvlj_cf_debug_setmetatablelj_cf_debug_getmetatablelj_lib_cf_debuglj_lib_init_debug__assert_faillua_tolstringlj_lib_optintluaL_tracebackstderrfwritestdinfgetsluaL_loadbufferlua_pcallfputsfputclua_settoplua_gethookmasklua_gethooklua_pushlstringlua_pushlightuserdatalua_rawgetlua_pushstringlua_gethookcountlua_pushintegerlua_typelua_pushnillua_callluaL_checklstringluaL_checktypeluaL_optintegerstrchrlua_pushvaluelua_rawsetlua_sethooklj_lib_checkfunclj_lib_checkintlj_err_arglj_gc_barrierflua_getupvaluelua_setupvaluelj_lib_checkanylua_getstacklua_setlocallua_getlocallua_xmovelua_setfieldlua_removeluaL_optlstringlua_isnumberlua_tointegerlua_pushfstringlj_debug_getinfolua_createtablelua_pushbooleanlj_lib_checktablua_setfenvlj_err_callerlua_getfenvlj_lib_checktabornillua_setmetatablelua_getmetatableluaopen_debuglj_lib_registerK U Z _)   )*#+3,x- 0./0 < B12- *+32-<4I5x67 * S8 9:; <=A F9S:`>q y;=?@>5%A;BNC^DyDD * 9EFGH)IHJHIHJI+JVKIHLM;    %)aNIOJN+ 5 : ?)MI^Pi;IQ;I O J+ QC RN ;[ E = S ; S E( T7 RG S a U V W O g! X? I  N 0S )   P ) J Y J Z * k; rK |[ o     [  S  $ 9 q \ ] ^ N _ `a2N?bc h `m rd     ( 0 8" @ H P X ` h p x                      ( 0 8 @ H    _ (U 0{8@yHOP X`hipJx @j`Ji*( LphOy{$ H l U _    @^tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_bit.o0000664000000000000000000000606012213333064022153 0ustar rootrootELF>@@ UHATSHIID$HI9D$v3Ly ؿNЉуy,HcHރ47@tuHcHuLH[A\]UHATSILHcID$HI9D$w[A\]UHSHHHH[]UH]UH]0123456789abcdef0123456789ABCDEFbitA* EtobitbnotbswapFlshiftrshiftarshiftrolrorDbandborbxortohexGCC: (Debian 4.7.3-4) 4.7.3zRx  AC G  @9AC Cq d/AC Ee AC P AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @B P &,12&E @X ` M0@V]k`f x  uX P  9+/=N` \G  l|#lib_bit.clj_cf_bit_tohexlj_ffh_bit_bandlj_ffh_bit_lshiftlj_ffh_bit_tobitlj_lib_cf_bitlj_lib_init_bitlj_lib_checkbitlua_pushlstringlj_lib_checknumluaopen_bitlj_lib_register3> E c ( `- 2 "7`hpx Dh#tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_char.h0000664000000000000000000000263512202141143022137 0ustar rootroot/* ** Character types. ** Donated to the public domain. */ #ifndef _LJ_CHAR_H #define _LJ_CHAR_H #include "lj_def.h" #define LJ_CHAR_CNTRL 0x01 #define LJ_CHAR_SPACE 0x02 #define LJ_CHAR_PUNCT 0x04 #define LJ_CHAR_DIGIT 0x08 #define LJ_CHAR_XDIGIT 0x10 #define LJ_CHAR_UPPER 0x20 #define LJ_CHAR_LOWER 0x40 #define LJ_CHAR_IDENT 0x80 #define LJ_CHAR_ALPHA (LJ_CHAR_LOWER|LJ_CHAR_UPPER) #define LJ_CHAR_ALNUM (LJ_CHAR_ALPHA|LJ_CHAR_DIGIT) #define LJ_CHAR_GRAPH (LJ_CHAR_ALNUM|LJ_CHAR_PUNCT) /* Only pass -1 or 0..255 to these macros. Never pass a signed char! */ #define lj_char_isa(c, t) ((lj_char_bits+1)[(c)] & t) #define lj_char_iscntrl(c) lj_char_isa((c), LJ_CHAR_CNTRL) #define lj_char_isspace(c) lj_char_isa((c), LJ_CHAR_SPACE) #define lj_char_ispunct(c) lj_char_isa((c), LJ_CHAR_PUNCT) #define lj_char_isdigit(c) lj_char_isa((c), LJ_CHAR_DIGIT) #define lj_char_isxdigit(c) lj_char_isa((c), LJ_CHAR_XDIGIT) #define lj_char_isupper(c) lj_char_isa((c), LJ_CHAR_UPPER) #define lj_char_islower(c) lj_char_isa((c), LJ_CHAR_LOWER) #define lj_char_isident(c) lj_char_isa((c), LJ_CHAR_IDENT) #define lj_char_isalpha(c) lj_char_isa((c), LJ_CHAR_ALPHA) #define lj_char_isalnum(c) lj_char_isa((c), LJ_CHAR_ALNUM) #define lj_char_isgraph(c) lj_char_isa((c), LJ_CHAR_GRAPH) #define lj_char_toupper(c) ((c) - (lj_char_islower(c) >> 1)) #define lj_char_tolower(c) ((c) + lj_char_isupper(c)) LJ_DATA const uint8_t lj_char_bits[257]; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/vm_arm.dasc0000664000000000000000000036011512202141143022501 0ustar rootroot|// Low-level VM code for ARM CPUs. |// Bytecode interpreter, fast functions and helper functions. |// Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h | |.arch arm |.section code_op, code_sub | |.actionlist build_actionlist |.globals GLOB_ |.globalnames globnames |.externnames extnames | |// Note: The ragged indentation of the instructions is intentional. |// The starting columns indicate data dependencies. | |//----------------------------------------------------------------------- | |// Fixed register assignments for the interpreter. | |// The following must be C callee-save. |.define MASKR8, r4 // 255*8 constant for fast bytecode decoding. |.define KBASE, r5 // Constants of current Lua function. |.define PC, r6 // Next PC. |.define DISPATCH, r7 // Opcode dispatch table. |.define LREG, r8 // Register holding lua_State (also in SAVE_L). | |// C callee-save in EABI, but often refetched. Temporary in iOS 3.0+. |.define BASE, r9 // Base of current Lua stack frame. | |// The following temporaries are not saved across C calls, except for RA/RC. |.define RA, r10 // Callee-save. |.define RC, r11 // Callee-save. |.define RB, r12 |.define OP, r12 // Overlaps RB, must not be lr. |.define INS, lr | |// Calling conventions. Also used as temporaries. |.define CARG1, r0 |.define CARG2, r1 |.define CARG3, r2 |.define CARG4, r3 |.define CARG12, r0 // For 1st soft-fp double. |.define CARG34, r2 // For 2nd soft-fp double. | |.define CRET1, r0 |.define CRET2, r1 | |// Stack layout while in interpreter. Must match with lj_frame.h. |.define SAVE_R4, [sp, #28] |.define CFRAME_SPACE, #28 |.define SAVE_ERRF, [sp, #24] |.define SAVE_NRES, [sp, #20] |.define SAVE_CFRAME, [sp, #16] |.define SAVE_L, [sp, #12] |.define SAVE_PC, [sp, #8] |.define SAVE_MULTRES, [sp, #4] |.define ARG5, [sp] | |.define TMPDhi, [sp, #4] |.define TMPDlo, [sp] |.define TMPD, [sp] |.define TMPDp, sp | |.if FPU |.macro saveregs | push {r5, r6, r7, r8, r9, r10, r11, lr} | vpush {d8-d15} | sub sp, sp, CFRAME_SPACE+4 | str r4, SAVE_R4 |.endmacro |.macro restoreregs_ret | ldr r4, SAVE_R4 | add sp, sp, CFRAME_SPACE+4 | vpop {d8-d15} | pop {r5, r6, r7, r8, r9, r10, r11, pc} |.endmacro |.else |.macro saveregs | push {r4, r5, r6, r7, r8, r9, r10, r11, lr} | sub sp, sp, CFRAME_SPACE |.endmacro |.macro restoreregs_ret | add sp, sp, CFRAME_SPACE | pop {r4, r5, r6, r7, r8, r9, r10, r11, pc} |.endmacro |.endif | |// Type definitions. Some of these are only used for documentation. |.type L, lua_State, LREG |.type GL, global_State |.type TVALUE, TValue |.type GCOBJ, GCobj |.type STR, GCstr |.type TAB, GCtab |.type LFUNC, GCfuncL |.type CFUNC, GCfuncC |.type PROTO, GCproto |.type UPVAL, GCupval |.type NODE, Node |.type NARGS8, int |.type TRACE, GCtrace | |//----------------------------------------------------------------------- | |// Trap for not-yet-implemented parts. |.macro NYI; ud; .endmacro | |//----------------------------------------------------------------------- | |// Access to frame relative to BASE. |.define FRAME_FUNC, #-8 |.define FRAME_PC, #-4 | |.macro decode_RA8, dst, ins; and dst, MASKR8, ins, lsr #5; .endmacro |.macro decode_RB8, dst, ins; and dst, MASKR8, ins, lsr #21; .endmacro |.macro decode_RC8, dst, ins; and dst, MASKR8, ins, lsr #13; .endmacro |.macro decode_RD, dst, ins; lsr dst, ins, #16; .endmacro |.macro decode_OP, dst, ins; and dst, ins, #255; .endmacro | |// Instruction fetch. |.macro ins_NEXT1 | ldrb OP, [PC] |.endmacro |.macro ins_NEXT2 | ldr INS, [PC], #4 |.endmacro |// Instruction decode+dispatch. |.macro ins_NEXT3 | ldr OP, [DISPATCH, OP, lsl #2] | decode_RA8 RA, INS | decode_RD RC, INS | bx OP |.endmacro |.macro ins_NEXT | ins_NEXT1 | ins_NEXT2 | ins_NEXT3 |.endmacro | |// Instruction footer. |.if 1 | // Replicated dispatch. Less unpredictable branches, but higher I-Cache use. | .define ins_next, ins_NEXT | .define ins_next_, ins_NEXT | .define ins_next1, ins_NEXT1 | .define ins_next2, ins_NEXT2 | .define ins_next3, ins_NEXT3 |.else | // Common dispatch. Lower I-Cache use, only one (very) unpredictable branch. | // Affects only certain kinds of benchmarks (and only with -j off). | .macro ins_next | b ->ins_next | .endmacro | .macro ins_next1 | .endmacro | .macro ins_next2 | .endmacro | .macro ins_next3 | b ->ins_next | .endmacro | .macro ins_next_ | ->ins_next: | ins_NEXT | .endmacro |.endif | |// Avoid register name substitution for field name. #define field_pc pc | |// Call decode and dispatch. |.macro ins_callt | // BASE = new base, CARG3 = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | ldr PC, LFUNC:CARG3->field_pc | ldrb OP, [PC] // STALL: load PC. early PC. | ldr INS, [PC], #4 | ldr OP, [DISPATCH, OP, lsl #2] // STALL: load OP. early OP. | decode_RA8 RA, INS | add RA, RA, BASE | bx OP |.endmacro | |.macro ins_call | // BASE = new base, CARG3 = LFUNC/CFUNC, RC = nargs*8, PC = caller PC | str PC, [BASE, FRAME_PC] | ins_callt // STALL: locked PC. |.endmacro | |//----------------------------------------------------------------------- | |// Macros to test operand types. |.macro checktp, reg, tp; cmn reg, #-tp; .endmacro |.macro checktpeq, reg, tp; cmneq reg, #-tp; .endmacro |.macro checktpne, reg, tp; cmnne reg, #-tp; .endmacro |.macro checkstr, reg, target; checktp reg, LJ_TSTR; bne target; .endmacro |.macro checktab, reg, target; checktp reg, LJ_TTAB; bne target; .endmacro |.macro checkfunc, reg, target; checktp reg, LJ_TFUNC; bne target; .endmacro | |// Assumes DISPATCH is relative to GL. #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | |.macro hotcheck, delta | lsr CARG1, PC, #1 | and CARG1, CARG1, #126 | sub CARG1, CARG1, #-GG_DISP2HOT | ldrh CARG2, [DISPATCH, CARG1] | subs CARG2, CARG2, #delta | strh CARG2, [DISPATCH, CARG1] |.endmacro | |.macro hotloop | hotcheck HOTCOUNT_LOOP | blo ->vm_hotloop |.endmacro | |.macro hotcall | hotcheck HOTCOUNT_CALL | blo ->vm_hotcall |.endmacro | |// Set current VM state. |.macro mv_vmstate, reg, st; mvn reg, #LJ_VMST_..st; .endmacro |.macro st_vmstate, reg; str reg, [DISPATCH, #DISPATCH_GL(vmstate)]; .endmacro | |// Move table write barrier back. Overwrites mark and tmp. |.macro barrierback, tab, mark, tmp | ldr tmp, [DISPATCH, #DISPATCH_GL(gc.grayagain)] | bic mark, mark, #LJ_GC_BLACK // black2gray(tab) | str tab, [DISPATCH, #DISPATCH_GL(gc.grayagain)] | strb mark, tab->marked | str tmp, tab->gclist |.endmacro | |.macro .IOS, a, b |.if IOS | a, b |.endif |.endmacro | |//----------------------------------------------------------------------- #if !LJ_DUALNUM #error "Only dual-number mode supported for ARM target" #endif /* Generate subroutines used by opcodes and other parts of the VM. */ /* The .code_sub section should be last to help static branch prediction. */ static void build_subroutines(BuildCtx *ctx) { |.code_sub | |//----------------------------------------------------------------------- |//-- Return handling ---------------------------------------------------- |//----------------------------------------------------------------------- | |->vm_returnp: | // See vm_return. Also: RB = previous base. | tst PC, #FRAME_P | beq ->cont_dispatch | | // Return from pcall or xpcall fast func. | ldr PC, [RB, FRAME_PC] // Fetch PC of previous frame. | mvn CARG2, #~LJ_TTRUE | mov BASE, RB | // Prepending may overwrite the pcall frame, so do it at the end. | str CARG2, [RA, FRAME_PC] // Prepend true to results. | sub RA, RA, #8 | |->vm_returnc: | adds RC, RC, #8 // RC = (nresults+1)*8. | mov CRET1, #LUA_YIELD | beq ->vm_unwind_c_eh | str RC, SAVE_MULTRES | ands CARG1, PC, #FRAME_TYPE | beq ->BC_RET_Z // Handle regular return to Lua. | |->vm_return: | // BASE = base, RA = resultptr, RC/MULTRES = (nresults+1)*8, PC = return | // CARG1 = PC & FRAME_TYPE | bic RB, PC, #FRAME_TYPEP | cmp CARG1, #FRAME_C | sub RB, BASE, RB // RB = previous base. | bne ->vm_returnp | | str RB, L->base | ldr KBASE, SAVE_NRES | mv_vmstate CARG4, C | sub BASE, BASE, #8 | subs CARG3, RC, #8 | lsl KBASE, KBASE, #3 // KBASE = (nresults_wanted+1)*8 | st_vmstate CARG4 | beq >2 |1: | subs CARG3, CARG3, #8 | ldrd CARG12, [RA], #8 | strd CARG12, [BASE], #8 | bne <1 |2: | cmp KBASE, RC // More/less results wanted? | bne >6 |3: | str BASE, L->top // Store new top. | |->vm_leave_cp: | ldr RC, SAVE_CFRAME // Restore previous C frame. | mov CRET1, #0 // Ok return status for vm_pcall. | str RC, L->cframe | |->vm_leave_unw: | restoreregs_ret | |6: | blt >7 // Less results wanted? | // More results wanted. Check stack size and fill up results with nil. | ldr CARG3, L->maxstack | mvn CARG2, #~LJ_TNIL | cmp BASE, CARG3 | bhs >8 | str CARG2, [BASE, #4] | add RC, RC, #8 | add BASE, BASE, #8 | b <2 | |7: // Less results wanted. | sub CARG1, RC, KBASE | cmp KBASE, #0 // LUA_MULTRET+1 case? | subne BASE, BASE, CARG1 // Either keep top or shrink it. | b <3 | |8: // Corner case: need to grow stack for filling up results. | // This can happen if: | // - A C function grows the stack (a lot). | // - The GC shrinks the stack in between. | // - A return back from a lua_call() with (high) nresults adjustment. | str BASE, L->top // Save current top held in BASE (yes). | mov CARG2, KBASE | mov CARG1, L | bl extern lj_state_growstack // (lua_State *L, int n) | ldr BASE, L->top // Need the (realloced) L->top in BASE. | b <2 | |->vm_unwind_c: // Unwind C stack, return from vm_pcall. | // (void *cframe, int errcode) | mov sp, CARG1 | mov CRET1, CARG2 |->vm_unwind_c_eh: // Landing pad for external unwinder. | ldr L, SAVE_L | mv_vmstate CARG4, C | ldr GL:CARG3, L->glref | str CARG4, GL:CARG3->vmstate | b ->vm_leave_unw | |->vm_unwind_ff: // Unwind C stack, return from ff pcall. | // (void *cframe) | bic CARG1, CARG1, #~CFRAME_RAWMASK // Use two steps: bic sp is deprecated. | mov sp, CARG1 |->vm_unwind_ff_eh: // Landing pad for external unwinder. | ldr L, SAVE_L | mov MASKR8, #255 | mov RC, #16 // 2 results: false + error message. | lsl MASKR8, MASKR8, #3 // MASKR8 = 255*8. | ldr BASE, L->base | ldr DISPATCH, L->glref // Setup pointer to dispatch table. | mvn CARG1, #~LJ_TFALSE | sub RA, BASE, #8 // Results start at BASE-8. | ldr PC, [BASE, FRAME_PC] // Fetch PC of previous frame. | add DISPATCH, DISPATCH, #GG_G2DISP | mv_vmstate CARG2, INTERP | str CARG1, [BASE, #-4] // Prepend false to error message. | st_vmstate CARG2 | b ->vm_returnc | |//----------------------------------------------------------------------- |//-- Grow stack for calls ----------------------------------------------- |//----------------------------------------------------------------------- | |->vm_growstack_c: // Grow stack for C function. | // CARG1 = L | mov CARG2, #LUA_MINSTACK | b >2 | |->vm_growstack_l: // Grow stack for Lua function. | // BASE = new base, RA = BASE+framesize*8, RC = nargs*8, PC = first PC | add RC, BASE, RC | sub RA, RA, BASE | mov CARG1, L | str BASE, L->base | add PC, PC, #4 // Must point after first instruction. | str RC, L->top | lsr CARG3, RA, #3 |2: | // L->base = new base, L->top = top | str PC, SAVE_PC | bl extern lj_state_growstack // (lua_State *L, int n) | ldr BASE, L->base | ldr RC, L->top | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] | sub NARGS8:RC, RC, BASE | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | ins_callt // Just retry the call. | |//----------------------------------------------------------------------- |//-- Entry points into the assembler VM --------------------------------- |//----------------------------------------------------------------------- | |->vm_resume: // Setup C frame and resume thread. | // (lua_State *L, TValue *base, int nres1 = 0, ptrdiff_t ef = 0) | saveregs | mov L, CARG1 | ldr DISPATCH, L:CARG1->glref // Setup pointer to dispatch table. | mov BASE, CARG2 | add DISPATCH, DISPATCH, #GG_G2DISP | str L, SAVE_L | mov PC, #FRAME_CP | str CARG3, SAVE_NRES | add CARG2, sp, #CFRAME_RESUME | ldrb CARG1, L->status | str CARG3, SAVE_ERRF | str CARG2, L->cframe | str CARG3, SAVE_CFRAME | cmp CARG1, #0 | str L, SAVE_PC // Any value outside of bytecode is ok. | beq >3 | | // Resume after yield (like a return). | mov RA, BASE | ldr BASE, L->base | ldr CARG1, L->top | mov MASKR8, #255 | strb CARG3, L->status | sub RC, CARG1, BASE | ldr PC, [BASE, FRAME_PC] | lsl MASKR8, MASKR8, #3 // MASKR8 = 255*8. | mv_vmstate CARG2, INTERP | add RC, RC, #8 | ands CARG1, PC, #FRAME_TYPE | st_vmstate CARG2 | str RC, SAVE_MULTRES | beq ->BC_RET_Z | b ->vm_return | |->vm_pcall: // Setup protected C frame and enter VM. | // (lua_State *L, TValue *base, int nres1, ptrdiff_t ef) | saveregs | mov PC, #FRAME_CP | str CARG4, SAVE_ERRF | b >1 | |->vm_call: // Setup C frame and enter VM. | // (lua_State *L, TValue *base, int nres1) | saveregs | mov PC, #FRAME_C | |1: // Entry point for vm_pcall above (PC = ftype). | ldr RC, L:CARG1->cframe | str CARG3, SAVE_NRES | mov L, CARG1 | str CARG1, SAVE_L | mov BASE, CARG2 | str sp, L->cframe // Add our C frame to cframe chain. | ldr DISPATCH, L->glref // Setup pointer to dispatch table. | str CARG1, SAVE_PC // Any value outside of bytecode is ok. | str RC, SAVE_CFRAME | add DISPATCH, DISPATCH, #GG_G2DISP | |3: // Entry point for vm_cpcall/vm_resume (BASE = base, PC = ftype). | ldr RB, L->base // RB = old base (for vmeta_call). | ldr CARG1, L->top | mov MASKR8, #255 | add PC, PC, BASE | lsl MASKR8, MASKR8, #3 // MASKR8 = 255*8. | sub PC, PC, RB // PC = frame delta + frame type | mv_vmstate CARG2, INTERP | sub NARGS8:RC, CARG1, BASE | st_vmstate CARG2 | |->vm_call_dispatch: | // RB = old base, BASE = new base, RC = nargs*8, PC = caller PC | ldrd CARG34, [BASE, FRAME_FUNC] | checkfunc CARG4, ->vmeta_call | |->vm_call_dispatch_f: | ins_call | // BASE = new base, CARG3 = func, RC = nargs*8, PC = caller PC | |->vm_cpcall: // Setup protected C frame, call C. | // (lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp) | saveregs | mov L, CARG1 | ldr RA, L:CARG1->stack | str CARG1, SAVE_L | ldr RB, L->top | str CARG1, SAVE_PC // Any value outside of bytecode is ok. | ldr RC, L->cframe | sub RA, RA, RB // Compute -savestack(L, L->top). | str sp, L->cframe // Add our C frame to cframe chain. | mov RB, #0 | str RA, SAVE_NRES // Neg. delta means cframe w/o frame. | str RB, SAVE_ERRF // No error function. | str RC, SAVE_CFRAME | blx CARG4 // (lua_State *L, lua_CFunction func, void *ud) | ldr DISPATCH, L->glref // Setup pointer to dispatch table. | movs BASE, CRET1 | mov PC, #FRAME_CP | add DISPATCH, DISPATCH, #GG_G2DISP | bne <3 // Else continue with the call. | b ->vm_leave_cp // No base? Just remove C frame. | |//----------------------------------------------------------------------- |//-- Metamethod handling ------------------------------------------------ |//----------------------------------------------------------------------- | |//-- Continuation dispatch ---------------------------------------------- | |->cont_dispatch: | // BASE = meta base, RA = resultptr, RC = (nresults+1)*8 | ldr LFUNC:CARG3, [RB, FRAME_FUNC] | ldr CARG1, [BASE, #-16] // Get continuation. | mov CARG4, BASE | mov BASE, RB // Restore caller BASE. |.if FFI | cmp CARG1, #1 |.endif | ldr PC, [CARG4, #-12] // Restore PC from [cont|PC]. | ldr CARG3, LFUNC:CARG3->field_pc | mvn INS, #~LJ_TNIL | add CARG2, RA, RC | str INS, [CARG2, #-4] // Ensure one valid arg. |.if FFI | bls >1 |.endif | ldr KBASE, [CARG3, #PC2PROTO(k)] | // BASE = base, RA = resultptr, CARG4 = meta base | bx CARG1 | |.if FFI |1: | beq ->cont_ffi_callback // cont = 1: return from FFI callback. | // cont = 0: tailcall from C function. | ldr CARG3, [BASE, FRAME_FUNC] | sub CARG4, CARG4, #16 | sub RC, CARG4, BASE | b ->vm_call_tail |.endif | |->cont_cat: // RA = resultptr, CARG4 = meta base | ldr INS, [PC, #-4] | sub CARG2, CARG4, #16 | ldrd CARG34, [RA] | str BASE, L->base | decode_RB8 RC, INS | decode_RA8 RA, INS | add CARG1, BASE, RC | subs CARG1, CARG2, CARG1 | strdne CARG34, [CARG2] | movne CARG3, CARG1 | bne ->BC_CAT_Z | strd CARG34, [BASE, RA] | b ->cont_nop | |//-- Table indexing metamethods ----------------------------------------- | |->vmeta_tgets1: | add CARG2, BASE, RB | b >2 | |->vmeta_tgets: | sub CARG2, DISPATCH, #-DISPATCH_GL(tmptv) | mvn CARG4, #~LJ_TTAB | str TAB:RB, [CARG2] | str CARG4, [CARG2, #4] |2: | mvn CARG4, #~LJ_TSTR | str STR:RC, TMPDlo | str CARG4, TMPDhi | mov CARG3, TMPDp | b >1 | |->vmeta_tgetb: // RC = index | decode_RB8 RB, INS | str RC, TMPDlo | mvn CARG4, #~LJ_TISNUM | add CARG2, BASE, RB | str CARG4, TMPDhi | mov CARG3, TMPDp | b >1 | |->vmeta_tgetv: | add CARG2, BASE, RB | add CARG3, BASE, RC |1: | str BASE, L->base | mov CARG1, L | str PC, SAVE_PC | bl extern lj_meta_tget // (lua_State *L, TValue *o, TValue *k) | // Returns TValue * (finished) or NULL (metamethod). | .IOS ldr BASE, L->base | cmp CRET1, #0 | beq >3 | ldrd CARG34, [CRET1] | ins_next1 | ins_next2 | strd CARG34, [BASE, RA] | ins_next3 | |3: // Call __index metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k | rsb CARG1, BASE, #FRAME_CONT | ldr BASE, L->top | mov NARGS8:RC, #16 // 2 args for func(t, k). | str PC, [BASE, #-12] // [cont|PC] | add PC, CARG1, BASE | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] // Guaranteed to be a function here. | b ->vm_call_dispatch_f | |//----------------------------------------------------------------------- | |->vmeta_tsets1: | add CARG2, BASE, RB | b >2 | |->vmeta_tsets: | sub CARG2, DISPATCH, #-DISPATCH_GL(tmptv) | mvn CARG4, #~LJ_TTAB | str TAB:RB, [CARG2] | str CARG4, [CARG2, #4] |2: | mvn CARG4, #~LJ_TSTR | str STR:RC, TMPDlo | str CARG4, TMPDhi | mov CARG3, TMPDp | b >1 | |->vmeta_tsetb: // RC = index | decode_RB8 RB, INS | str RC, TMPDlo | mvn CARG4, #~LJ_TISNUM | add CARG2, BASE, RB | str CARG4, TMPDhi | mov CARG3, TMPDp | b >1 | |->vmeta_tsetv: | add CARG2, BASE, RB | add CARG3, BASE, RC |1: | str BASE, L->base | mov CARG1, L | str PC, SAVE_PC | bl extern lj_meta_tset // (lua_State *L, TValue *o, TValue *k) | // Returns TValue * (finished) or NULL (metamethod). | .IOS ldr BASE, L->base | cmp CRET1, #0 | ldrd CARG34, [BASE, RA] | beq >3 | ins_next1 | // NOBARRIER: lj_meta_tset ensures the table is not black. | strd CARG34, [CRET1] | ins_next2 | ins_next3 | |3: // Call __newindex metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k/(v) | rsb CARG1, BASE, #FRAME_CONT | ldr BASE, L->top | mov NARGS8:RC, #24 // 3 args for func(t, k, v). | strd CARG34, [BASE, #16] // Copy value to third argument. | str PC, [BASE, #-12] // [cont|PC] | add PC, CARG1, BASE | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] // Guaranteed to be a function here. | b ->vm_call_dispatch_f | |//-- Comparison metamethods --------------------------------------------- | |->vmeta_comp: | mov CARG1, L | sub PC, PC, #4 | mov CARG2, RA | str BASE, L->base | mov CARG3, RC | str PC, SAVE_PC | decode_OP CARG4, INS | bl extern lj_meta_comp // (lua_State *L, TValue *o1, *o2, int op) | // Returns 0/1 or TValue * (metamethod). |3: | .IOS ldr BASE, L->base | cmp CRET1, #1 | bhi ->vmeta_binop |4: | ldrh RB, [PC, #2] | add PC, PC, #4 | add RB, PC, RB, lsl #2 | subhs PC, RB, #0x20000 |->cont_nop: | ins_next | |->cont_ra: // RA = resultptr | ldr INS, [PC, #-4] | ldrd CARG12, [RA] | decode_RA8 CARG3, INS | strd CARG12, [BASE, CARG3] | b ->cont_nop | |->cont_condt: // RA = resultptr | ldr CARG2, [RA, #4] | mvn CARG1, #~LJ_TTRUE | cmp CARG1, CARG2 // Branch if result is true. | b <4 | |->cont_condf: // RA = resultptr | ldr CARG2, [RA, #4] | checktp CARG2, LJ_TFALSE // Branch if result is false. | b <4 | |->vmeta_equal: | // CARG2, CARG3, CARG4 are already set by BC_ISEQV/BC_ISNEV. | sub PC, PC, #4 | str BASE, L->base | mov CARG1, L | str PC, SAVE_PC | bl extern lj_meta_equal // (lua_State *L, GCobj *o1, *o2, int ne) | // Returns 0/1 or TValue * (metamethod). | b <3 | |->vmeta_equal_cd: |.if FFI | sub PC, PC, #4 | str BASE, L->base | mov CARG1, L | mov CARG2, INS | str PC, SAVE_PC | bl extern lj_meta_equal_cd // (lua_State *L, BCIns op) | // Returns 0/1 or TValue * (metamethod). | b <3 |.endif | |//-- Arithmetic metamethods --------------------------------------------- | |->vmeta_arith_vn: | decode_RB8 RB, INS | decode_RC8 RC, INS | add CARG3, BASE, RB | add CARG4, KBASE, RC | b >1 | |->vmeta_arith_nv: | decode_RB8 RB, INS | decode_RC8 RC, INS | add CARG4, BASE, RB | add CARG3, KBASE, RC | b >1 | |->vmeta_unm: | ldr INS, [PC, #-8] | sub PC, PC, #4 | add CARG3, BASE, RC | add CARG4, BASE, RC | b >1 | |->vmeta_arith_vv: | decode_RB8 RB, INS | decode_RC8 RC, INS | add CARG3, BASE, RB | add CARG4, BASE, RC |1: | decode_OP OP, INS | add CARG2, BASE, RA | str BASE, L->base | mov CARG1, L | str PC, SAVE_PC | str OP, ARG5 | bl extern lj_meta_arith // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) | // Returns NULL (finished) or TValue * (metamethod). | .IOS ldr BASE, L->base | cmp CRET1, #0 | beq ->cont_nop | | // Call metamethod for binary op. |->vmeta_binop: | // BASE = old base, CRET1 = new base, stack = cont/func/o1/o2 | sub CARG2, CRET1, BASE | str PC, [CRET1, #-12] // [cont|PC] | add PC, CARG2, #FRAME_CONT | mov BASE, CRET1 | mov NARGS8:RC, #16 // 2 args for func(o1, o2). | b ->vm_call_dispatch | |->vmeta_len: | add CARG2, BASE, RC | str BASE, L->base | mov CARG1, L | str PC, SAVE_PC | bl extern lj_meta_len // (lua_State *L, TValue *o) | // Returns NULL (retry) or TValue * (metamethod base). | .IOS ldr BASE, L->base #if LJ_52 | cmp CRET1, #0 | bne ->vmeta_binop // Binop call for compatibility. | ldr TAB:CARG1, [BASE, RC] | b ->BC_LEN_Z #else | b ->vmeta_binop // Binop call for compatibility. #endif | |//-- Call metamethod ---------------------------------------------------- | |->vmeta_call: // Resolve and call __call metamethod. | // RB = old base, BASE = new base, RC = nargs*8 | mov CARG1, L | str RB, L->base // This is the callers base! | sub CARG2, BASE, #8 | str PC, SAVE_PC | add CARG3, BASE, NARGS8:RC | .IOS mov RA, BASE | bl extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) | .IOS mov BASE, RA | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] // Guaranteed to be a function here. | add NARGS8:RC, NARGS8:RC, #8 // Got one more argument now. | ins_call | |->vmeta_callt: // Resolve __call for BC_CALLT. | // BASE = old base, RA = new base, RC = nargs*8 | mov CARG1, L | str BASE, L->base | sub CARG2, RA, #8 | str PC, SAVE_PC | add CARG3, RA, NARGS8:RC | bl extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) | .IOS ldr BASE, L->base | ldr LFUNC:CARG3, [RA, FRAME_FUNC] // Guaranteed to be a function here. | ldr PC, [BASE, FRAME_PC] | add NARGS8:RC, NARGS8:RC, #8 // Got one more argument now. | b ->BC_CALLT2_Z | |//-- Argument coercion for 'for' statement ------------------------------ | |->vmeta_for: | mov CARG1, L | str BASE, L->base | mov CARG2, RA | str PC, SAVE_PC | bl extern lj_meta_for // (lua_State *L, TValue *base) | .IOS ldr BASE, L->base |.if JIT | ldrb OP, [PC, #-4] |.endif | ldr INS, [PC, #-4] |.if JIT | cmp OP, #BC_JFORI |.endif | decode_RA8 RA, INS | decode_RD RC, INS |.if JIT | beq =>BC_JFORI |.endif | b =>BC_FORI | |//----------------------------------------------------------------------- |//-- Fast functions ----------------------------------------------------- |//----------------------------------------------------------------------- | |.macro .ffunc, name |->ff_ .. name: |.endmacro | |.macro .ffunc_1, name |->ff_ .. name: | ldrd CARG12, [BASE] | cmp NARGS8:RC, #8 | blo ->fff_fallback |.endmacro | |.macro .ffunc_2, name |->ff_ .. name: | ldrd CARG12, [BASE] | ldrd CARG34, [BASE, #8] | cmp NARGS8:RC, #16 | blo ->fff_fallback |.endmacro | |.macro .ffunc_n, name | .ffunc_1 name | checktp CARG2, LJ_TISNUM | bhs ->fff_fallback |.endmacro | |.macro .ffunc_nn, name | .ffunc_2 name | checktp CARG2, LJ_TISNUM | cmnlo CARG4, #-LJ_TISNUM | bhs ->fff_fallback |.endmacro | |.macro .ffunc_d, name | .ffunc name | ldr CARG2, [BASE, #4] | cmp NARGS8:RC, #8 | vldr d0, [BASE] | blo ->fff_fallback | checktp CARG2, LJ_TISNUM | bhs ->fff_fallback |.endmacro | |.macro .ffunc_dd, name | .ffunc name | ldr CARG2, [BASE, #4] | ldr CARG4, [BASE, #12] | cmp NARGS8:RC, #16 | vldr d0, [BASE] | vldr d1, [BASE, #8] | blo ->fff_fallback | checktp CARG2, LJ_TISNUM | cmnlo CARG4, #-LJ_TISNUM | bhs ->fff_fallback |.endmacro | |// Inlined GC threshold check. Caveat: uses CARG1 and CARG2. |.macro ffgccheck | ldr CARG1, [DISPATCH, #DISPATCH_GL(gc.total)] | ldr CARG2, [DISPATCH, #DISPATCH_GL(gc.threshold)] | cmp CARG1, CARG2 | blge ->fff_gcstep |.endmacro | |//-- Base library: checks ----------------------------------------------- | |.ffunc_1 assert | checktp CARG2, LJ_TTRUE | bhi ->fff_fallback | ldr PC, [BASE, FRAME_PC] | strd CARG12, [BASE, #-8] | mov RB, BASE | subs RA, NARGS8:RC, #8 | add RC, NARGS8:RC, #8 // Compute (nresults+1)*8. | beq ->fff_res // Done if exactly 1 argument. |1: | ldrd CARG12, [RB, #8] | subs RA, RA, #8 | strd CARG12, [RB], #8 | bne <1 | b ->fff_res | |.ffunc type | ldr CARG2, [BASE, #4] | cmp NARGS8:RC, #8 | blo ->fff_fallback | checktp CARG2, LJ_TISNUM | mvnlo CARG2, #~LJ_TISNUM | rsb CARG4, CARG2, #(int)(offsetof(GCfuncC, upvalue)>>3)-1 | lsl CARG4, CARG4, #3 | ldrd CARG12, [CFUNC:CARG3, CARG4] | b ->fff_restv | |//-- Base library: getters and setters --------------------------------- | |.ffunc_1 getmetatable | checktp CARG2, LJ_TTAB | cmnne CARG2, #-LJ_TUDATA | bne >6 |1: // Field metatable must be at same offset for GCtab and GCudata! | ldr TAB:RB, TAB:CARG1->metatable |2: | mvn CARG2, #~LJ_TNIL | ldr STR:RC, [DISPATCH, #DISPATCH_GL(gcroot[GCROOT_MMNAME+MM_metatable])] | cmp TAB:RB, #0 | beq ->fff_restv | ldr CARG3, TAB:RB->hmask | ldr CARG4, STR:RC->hash | ldr NODE:INS, TAB:RB->node | and CARG3, CARG3, CARG4 // idx = str->hash & tab->hmask | add CARG3, CARG3, CARG3, lsl #1 | add NODE:INS, NODE:INS, CARG3, lsl #3 // node = tab->node + idx*3*8 |3: // Rearranged logic, because we expect _not_ to find the key. | ldrd CARG34, NODE:INS->key // STALL: early NODE:INS. | ldrd CARG12, NODE:INS->val | ldr NODE:INS, NODE:INS->next | checktp CARG4, LJ_TSTR | cmpeq CARG3, STR:RC | beq >5 | cmp NODE:INS, #0 | bne <3 |4: | mov CARG1, RB // Use metatable as default result. | mvn CARG2, #~LJ_TTAB | b ->fff_restv |5: | checktp CARG2, LJ_TNIL | bne ->fff_restv | b <4 | |6: | checktp CARG2, LJ_TISNUM | mvnhs CARG2, CARG2 | movlo CARG2, #~LJ_TISNUM | add CARG4, DISPATCH, CARG2, lsl #2 | ldr TAB:RB, [CARG4, #DISPATCH_GL(gcroot[GCROOT_BASEMT])] | b <2 | |.ffunc_2 setmetatable | // Fast path: no mt for table yet and not clearing the mt. | checktp CARG2, LJ_TTAB | ldreq TAB:RB, TAB:CARG1->metatable | checktpeq CARG4, LJ_TTAB | ldrbeq CARG4, TAB:CARG1->marked | cmpeq TAB:RB, #0 | bne ->fff_fallback | tst CARG4, #LJ_GC_BLACK // isblack(table) | str TAB:CARG3, TAB:CARG1->metatable | beq ->fff_restv | barrierback TAB:CARG1, CARG4, CARG3 | b ->fff_restv | |.ffunc rawget | ldrd CARG34, [BASE] | cmp NARGS8:RC, #16 | blo ->fff_fallback | mov CARG2, CARG3 | checktab CARG4, ->fff_fallback | mov CARG1, L | add CARG3, BASE, #8 | .IOS mov RA, BASE | bl extern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) | // Returns cTValue *. | .IOS mov BASE, RA | ldrd CARG12, [CRET1] | b ->fff_restv | |//-- Base library: conversions ------------------------------------------ | |.ffunc tonumber | // Only handles the number case inline (without a base argument). | ldrd CARG12, [BASE] | cmp NARGS8:RC, #8 | bne ->fff_fallback | checktp CARG2, LJ_TISNUM | bls ->fff_restv | b ->fff_fallback | |.ffunc_1 tostring | // Only handles the string or number case inline. | checktp CARG2, LJ_TSTR | // A __tostring method in the string base metatable is ignored. | beq ->fff_restv | // Handle numbers inline, unless a number base metatable is present. | ldr CARG4, [DISPATCH, #DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM])] | str BASE, L->base | checktp CARG2, LJ_TISNUM | cmpls CARG4, #0 | str PC, SAVE_PC // Redundant (but a defined value). | bhi ->fff_fallback | ffgccheck | mov CARG1, L | mov CARG2, BASE | bl extern lj_str_fromnumber // (lua_State *L, cTValue *o) | // Returns GCstr *. | ldr BASE, L->base | mvn CARG2, #~LJ_TSTR | b ->fff_restv | |//-- Base library: iterators ------------------------------------------- | |.ffunc_1 next | mvn CARG4, #~LJ_TNIL | checktab CARG2, ->fff_fallback | strd CARG34, [BASE, NARGS8:RC] // Set missing 2nd arg to nil. | ldr PC, [BASE, FRAME_PC] | mov CARG2, CARG1 | str BASE, L->base // Add frame since C call can throw. | mov CARG1, L | str BASE, L->top // Dummy frame length is ok. | add CARG3, BASE, #8 | str PC, SAVE_PC | bl extern lj_tab_next // (lua_State *L, GCtab *t, TValue *key) | // Returns 0 at end of traversal. | .IOS ldr BASE, L->base | cmp CRET1, #0 | mvneq CRET2, #~LJ_TNIL | beq ->fff_restv // End of traversal: return nil. | ldrd CARG12, [BASE, #8] // Copy key and value to results. | ldrd CARG34, [BASE, #16] | mov RC, #(2+1)*8 | strd CARG12, [BASE, #-8] | strd CARG34, [BASE] | b ->fff_res | |.ffunc_1 pairs | checktab CARG2, ->fff_fallback #if LJ_52 | ldr TAB:RB, TAB:CARG1->metatable #endif | ldrd CFUNC:CARG34, CFUNC:CARG3->upvalue[0] | ldr PC, [BASE, FRAME_PC] #if LJ_52 | cmp TAB:RB, #0 | bne ->fff_fallback #endif | mvn CARG2, #~LJ_TNIL | mov RC, #(3+1)*8 | strd CFUNC:CARG34, [BASE, #-8] | str CARG2, [BASE, #12] | b ->fff_res | |.ffunc_2 ipairs_aux | checktp CARG2, LJ_TTAB | checktpeq CARG4, LJ_TISNUM | bne ->fff_fallback | ldr RB, TAB:CARG1->asize | ldr RC, TAB:CARG1->array | add CARG3, CARG3, #1 | ldr PC, [BASE, FRAME_PC] | cmp CARG3, RB | add RC, RC, CARG3, lsl #3 | strd CARG34, [BASE, #-8] | ldrdlo CARG12, [RC] | mov RC, #(0+1)*8 | bhs >2 // Not in array part? |1: | checktp CARG2, LJ_TNIL | movne RC, #(2+1)*8 | strdne CARG12, [BASE] | b ->fff_res |2: // Check for empty hash part first. Otherwise call C function. | ldr RB, TAB:CARG1->hmask | mov CARG2, CARG3 | cmp RB, #0 | beq ->fff_res | .IOS mov RA, BASE | bl extern lj_tab_getinth // (GCtab *t, int32_t key) | // Returns cTValue * or NULL. | .IOS mov BASE, RA | cmp CRET1, #0 | beq ->fff_res | ldrd CARG12, [CRET1] | b <1 | |.ffunc_1 ipairs | checktab CARG2, ->fff_fallback #if LJ_52 | ldr TAB:RB, TAB:CARG1->metatable #endif | ldrd CFUNC:CARG34, CFUNC:CARG3->upvalue[0] | ldr PC, [BASE, FRAME_PC] #if LJ_52 | cmp TAB:RB, #0 | bne ->fff_fallback #endif | mov CARG1, #0 | mvn CARG2, #~LJ_TISNUM | mov RC, #(3+1)*8 | strd CFUNC:CARG34, [BASE, #-8] | strd CARG12, [BASE, #8] | b ->fff_res | |//-- Base library: catch errors ---------------------------------------- | |.ffunc pcall | ldrb RA, [DISPATCH, #DISPATCH_GL(hookmask)] | cmp NARGS8:RC, #8 | blo ->fff_fallback | tst RA, #HOOK_ACTIVE // Remember active hook before pcall. | mov RB, BASE | add BASE, BASE, #8 | moveq PC, #8+FRAME_PCALL | movne PC, #8+FRAME_PCALLH | sub NARGS8:RC, NARGS8:RC, #8 | b ->vm_call_dispatch | |.ffunc_2 xpcall | ldrb RA, [DISPATCH, #DISPATCH_GL(hookmask)] | checkfunc CARG4, ->fff_fallback // Traceback must be a function. | mov RB, BASE | strd CARG12, [BASE, #8] // Swap function and traceback. | strd CARG34, [BASE] | tst RA, #HOOK_ACTIVE // Remember active hook before pcall. | add BASE, BASE, #16 | moveq PC, #16+FRAME_PCALL | movne PC, #16+FRAME_PCALLH | sub NARGS8:RC, NARGS8:RC, #16 | b ->vm_call_dispatch | |//-- Coroutine library -------------------------------------------------- | |.macro coroutine_resume_wrap, resume |.if resume |.ffunc_1 coroutine_resume | checktp CARG2, LJ_TTHREAD | bne ->fff_fallback |.else |.ffunc coroutine_wrap_aux | ldr L:CARG1, CFUNC:CARG3->upvalue[0].gcr |.endif | ldr PC, [BASE, FRAME_PC] | str BASE, L->base | ldr CARG2, L:CARG1->top | ldrb RA, L:CARG1->status | ldr RB, L:CARG1->base | add CARG3, CARG2, NARGS8:RC | add CARG4, CARG2, RA | str PC, SAVE_PC | cmp CARG4, RB | beq ->fff_fallback | ldr CARG4, L:CARG1->maxstack | ldr RB, L:CARG1->cframe | cmp RA, #LUA_YIELD | cmpls CARG3, CARG4 | cmpls RB, #0 | bhi ->fff_fallback |1: |.if resume | sub CARG3, CARG3, #8 // Keep resumed thread in stack for GC. | add BASE, BASE, #8 | sub NARGS8:RC, NARGS8:RC, #8 |.endif | str CARG3, L:CARG1->top | str BASE, L->top |2: // Move args to coroutine. | ldrd CARG34, [BASE, RB] | cmp RB, NARGS8:RC | strdne CARG34, [CARG2, RB] | add RB, RB, #8 | bne <2 | | mov CARG3, #0 | mov L:RA, L:CARG1 | mov CARG4, #0 | bl ->vm_resume // (lua_State *L, TValue *base, 0, 0) | // Returns thread status. |4: | ldr CARG3, L:RA->base | mv_vmstate CARG2, INTERP | ldr CARG4, L:RA->top | st_vmstate CARG2 | cmp CRET1, #LUA_YIELD | ldr BASE, L->base | bhi >8 | subs RC, CARG4, CARG3 | ldr CARG1, L->maxstack | add CARG2, BASE, RC | beq >6 // No results? | cmp CARG2, CARG1 | mov RB, #0 | bhi >9 // Need to grow stack? | | sub CARG4, RC, #8 | str CARG3, L:RA->top // Clear coroutine stack. |5: // Move results from coroutine. | ldrd CARG12, [CARG3, RB] | cmp RB, CARG4 | strd CARG12, [BASE, RB] | add RB, RB, #8 | bne <5 |6: |.if resume | mvn CARG3, #~LJ_TTRUE | add RC, RC, #16 |7: | str CARG3, [BASE, #-4] // Prepend true/false to results. | sub RA, BASE, #8 |.else | mov RA, BASE | add RC, RC, #8 |.endif | ands CARG1, PC, #FRAME_TYPE | str PC, SAVE_PC | str RC, SAVE_MULTRES | beq ->BC_RET_Z | b ->vm_return | |8: // Coroutine returned with error (at co->top-1). |.if resume | ldrd CARG12, [CARG4, #-8]! | mvn CARG3, #~LJ_TFALSE | mov RC, #(2+1)*8 | str CARG4, L:RA->top // Remove error from coroutine stack. | strd CARG12, [BASE] // Copy error message. | b <7 |.else | mov CARG1, L | mov CARG2, L:RA | bl extern lj_ffh_coroutine_wrap_err // (lua_State *L, lua_State *co) | // Never returns. |.endif | |9: // Handle stack expansion on return from yield. | mov CARG1, L | lsr CARG2, RC, #3 | bl extern lj_state_growstack // (lua_State *L, int n) | mov CRET1, #0 | b <4 |.endmacro | | coroutine_resume_wrap 1 // coroutine.resume | coroutine_resume_wrap 0 // coroutine.wrap | |.ffunc coroutine_yield | ldr CARG1, L->cframe | add CARG2, BASE, NARGS8:RC | str BASE, L->base | tst CARG1, #CFRAME_RESUME | str CARG2, L->top | mov CRET1, #LUA_YIELD | mov CARG3, #0 | beq ->fff_fallback | str CARG3, L->cframe | strb CRET1, L->status | b ->vm_leave_unw | |//-- Math library ------------------------------------------------------- | |.macro math_round, func | .ffunc_1 math_ .. func | checktp CARG2, LJ_TISNUM | beq ->fff_restv | bhi ->fff_fallback | // Round FP value and normalize result. | lsl CARG3, CARG2, #1 | adds RB, CARG3, #0x00200000 | bpl >2 // |x| < 1? | mvn CARG4, #0x3e0 | subs RB, CARG4, RB, asr #21 | lsl CARG4, CARG2, #11 | lsl CARG3, CARG1, #11 | orr CARG4, CARG4, #0x80000000 | rsb INS, RB, #32 | orr CARG4, CARG4, CARG1, lsr #21 | bls >3 // |x| >= 2^31? | orr CARG3, CARG3, CARG4, lsl INS | lsr CARG1, CARG4, RB |.if "func" == "floor" | tst CARG3, CARG2, asr #31 | addne CARG1, CARG1, #1 |.else | bics CARG3, CARG3, CARG2, asr #31 | addsne CARG1, CARG1, #1 | ldrdvs CARG12, >9 | bvs ->fff_restv |.endif | cmp CARG2, #0 | rsblt CARG1, CARG1, #0 |1: | mvn CARG2, #~LJ_TISNUM | b ->fff_restv | |2: // |x| < 1 | bcs ->fff_restv // |x| is not finite. | orr CARG3, CARG3, CARG1 // ztest = abs(hi) | lo |.if "func" == "floor" | tst CARG3, CARG2, asr #31 // return (ztest & sign) == 0 ? 0 : -1 | moveq CARG1, #0 | mvnne CARG1, #0 |.else | bics CARG3, CARG3, CARG2, asr #31 // return (ztest & ~sign) == 0 ? 0 : 1 | moveq CARG1, #0 | movne CARG1, #1 |.endif | mvn CARG2, #~LJ_TISNUM | b ->fff_restv | |3: // |x| >= 2^31. Check for x == -(2^31). | cmpeq CARG4, #0x80000000 |.if "func" == "floor" | cmpeq CARG3, #0 |.endif | bne >4 | cmp CARG2, #0 | movmi CARG1, #0x80000000 | bmi <1 |4: | bl ->vm_..func.._sf | b ->fff_restv |.endmacro | | math_round floor | math_round ceil | |.align 8 |9: | .long 0x00000000, 0x41e00000 // 2^31. | |.ffunc_1 math_abs | checktp CARG2, LJ_TISNUM | bhi ->fff_fallback | bicne CARG2, CARG2, #0x80000000 | bne ->fff_restv | cmp CARG1, #0 | rsbslt CARG1, CARG1, #0 | ldrdvs CARG12, <9 | // Fallthrough. | |->fff_restv: | // CARG12 = TValue result. | ldr PC, [BASE, FRAME_PC] | strd CARG12, [BASE, #-8] |->fff_res1: | // PC = return. | mov RC, #(1+1)*8 |->fff_res: | // RC = (nresults+1)*8, PC = return. | ands CARG1, PC, #FRAME_TYPE | ldreq INS, [PC, #-4] | str RC, SAVE_MULTRES | sub RA, BASE, #8 | bne ->vm_return | decode_RB8 RB, INS |5: | cmp RB, RC // More results expected? | bhi >6 | decode_RA8 CARG1, INS | ins_next1 | ins_next2 | // Adjust BASE. KBASE is assumed to be set for the calling frame. | sub BASE, RA, CARG1 | ins_next3 | |6: // Fill up results with nil. | add CARG2, RA, RC | mvn CARG1, #~LJ_TNIL | add RC, RC, #8 | str CARG1, [CARG2, #-4] | b <5 | |.macro math_extern, func |.if HFABI | .ffunc_d math_ .. func |.else | .ffunc_n math_ .. func |.endif | .IOS mov RA, BASE | bl extern func | .IOS mov BASE, RA |.if HFABI | b ->fff_resd |.else | b ->fff_restv |.endif |.endmacro | |.macro math_extern2, func |.if HFABI | .ffunc_dd math_ .. func |.else | .ffunc_nn math_ .. func |.endif | .IOS mov RA, BASE | bl extern func | .IOS mov BASE, RA |.if HFABI | b ->fff_resd |.else | b ->fff_restv |.endif |.endmacro | |.if FPU | .ffunc_d math_sqrt | vsqrt.f64 d0, d0 |->fff_resd: | ldr PC, [BASE, FRAME_PC] | vstr d0, [BASE, #-8] | b ->fff_res1 |.else | math_extern sqrt |.endif | |.ffunc math_log |.if HFABI | ldr CARG2, [BASE, #4] | cmp NARGS8:RC, #8 // Need exactly 1 argument. | vldr d0, [BASE] | bne ->fff_fallback |.else | ldrd CARG12, [BASE] | cmp NARGS8:RC, #8 // Need exactly 1 argument. | bne ->fff_fallback |.endif | checktp CARG2, LJ_TISNUM | bhs ->fff_fallback | .IOS mov RA, BASE | bl extern log | .IOS mov BASE, RA |.if HFABI | b ->fff_resd |.else | b ->fff_restv |.endif | | math_extern log10 | math_extern exp | math_extern sin | math_extern cos | math_extern tan | math_extern asin | math_extern acos | math_extern atan | math_extern sinh | math_extern cosh | math_extern tanh | math_extern2 pow | math_extern2 atan2 | math_extern2 fmod | |->ff_math_deg: |.if FPU | .ffunc_d math_rad | vldr d1, CFUNC:CARG3->upvalue[0] | vmul.f64 d0, d0, d1 | b ->fff_resd |.else | .ffunc_n math_rad | ldrd CARG34, CFUNC:CARG3->upvalue[0] | bl extern __aeabi_dmul | b ->fff_restv |.endif | |.if HFABI | .ffunc math_ldexp | ldr CARG4, [BASE, #4] | ldrd CARG12, [BASE, #8] | cmp NARGS8:RC, #16 | blo ->fff_fallback | vldr d0, [BASE] | checktp CARG4, LJ_TISNUM | bhs ->fff_fallback | checktp CARG2, LJ_TISNUM | bne ->fff_fallback | .IOS mov RA, BASE | bl extern ldexp // (double x, int exp) | .IOS mov BASE, RA | b ->fff_resd |.else |.ffunc_2 math_ldexp | checktp CARG2, LJ_TISNUM | bhs ->fff_fallback | checktp CARG4, LJ_TISNUM | bne ->fff_fallback | .IOS mov RA, BASE | bl extern ldexp // (double x, int exp) | .IOS mov BASE, RA | b ->fff_restv |.endif | |.if HFABI |.ffunc_d math_frexp | mov CARG1, sp | .IOS mov RA, BASE | bl extern frexp | .IOS mov BASE, RA | ldr CARG3, [sp] | mvn CARG4, #~LJ_TISNUM | ldr PC, [BASE, FRAME_PC] | vstr d0, [BASE, #-8] | mov RC, #(2+1)*8 | strd CARG34, [BASE] | b ->fff_res |.else |.ffunc_n math_frexp | mov CARG3, sp | .IOS mov RA, BASE | bl extern frexp | .IOS mov BASE, RA | ldr CARG3, [sp] | mvn CARG4, #~LJ_TISNUM | ldr PC, [BASE, FRAME_PC] | strd CARG12, [BASE, #-8] | mov RC, #(2+1)*8 | strd CARG34, [BASE] | b ->fff_res |.endif | |.if HFABI |.ffunc_d math_modf | sub CARG1, BASE, #8 | ldr PC, [BASE, FRAME_PC] | .IOS mov RA, BASE | bl extern modf | .IOS mov BASE, RA | mov RC, #(2+1)*8 | vstr d0, [BASE] | b ->fff_res |.else |.ffunc_n math_modf | sub CARG3, BASE, #8 | ldr PC, [BASE, FRAME_PC] | .IOS mov RA, BASE | bl extern modf | .IOS mov BASE, RA | mov RC, #(2+1)*8 | strd CARG12, [BASE] | b ->fff_res |.endif | |.macro math_minmax, name, cond, fcond |.if FPU | .ffunc_1 name | add RB, BASE, RC | checktp CARG2, LJ_TISNUM | add RA, BASE, #8 | bne >4 |1: // Handle integers. | ldrd CARG34, [RA] | cmp RA, RB | bhs ->fff_restv | checktp CARG4, LJ_TISNUM | bne >3 | cmp CARG1, CARG3 | add RA, RA, #8 | mov..cond CARG1, CARG3 | b <1 |3: // Convert intermediate result to number and continue below. | vmov s4, CARG1 | bhi ->fff_fallback | vldr d1, [RA] | vcvt.f64.s32 d0, s4 | b >6 | |4: | vldr d0, [BASE] | bhi ->fff_fallback |5: // Handle numbers. | ldrd CARG34, [RA] | vldr d1, [RA] | cmp RA, RB | bhs ->fff_resd | checktp CARG4, LJ_TISNUM | bhs >7 |6: | vcmp.f64 d0, d1 | vmrs | add RA, RA, #8 | vmov..fcond.f64 d0, d1 | b <5 |7: // Convert integer to number and continue above. | vmov s4, CARG3 | bhi ->fff_fallback | vcvt.f64.s32 d1, s4 | b <6 | |.else | | .ffunc_1 name | checktp CARG2, LJ_TISNUM | mov RA, #8 | bne >4 |1: // Handle integers. | ldrd CARG34, [BASE, RA] | cmp RA, RC | bhs ->fff_restv | checktp CARG4, LJ_TISNUM | bne >3 | cmp CARG1, CARG3 | add RA, RA, #8 | mov..cond CARG1, CARG3 | b <1 |3: // Convert intermediate result to number and continue below. | bhi ->fff_fallback | bl extern __aeabi_i2d | ldrd CARG34, [BASE, RA] | b >6 | |4: | bhi ->fff_fallback |5: // Handle numbers. | ldrd CARG34, [BASE, RA] | cmp RA, RC | bhs ->fff_restv | checktp CARG4, LJ_TISNUM | bhs >7 |6: | bl extern __aeabi_cdcmple | add RA, RA, #8 | mov..fcond CARG1, CARG3 | mov..fcond CARG2, CARG4 | b <5 |7: // Convert integer to number and continue above. | bhi ->fff_fallback | strd CARG12, TMPD | mov CARG1, CARG3 | bl extern __aeabi_i2d | ldrd CARG34, TMPD | b <6 |.endif |.endmacro | | math_minmax math_min, gt, hi | math_minmax math_max, lt, lo | |//-- String library ----------------------------------------------------- | |.ffunc_1 string_len | checkstr CARG2, ->fff_fallback | ldr CARG1, STR:CARG1->len | mvn CARG2, #~LJ_TISNUM | b ->fff_restv | |.ffunc string_byte // Only handle the 1-arg case here. | ldrd CARG12, [BASE] | ldr PC, [BASE, FRAME_PC] | cmp NARGS8:RC, #8 | checktpeq CARG2, LJ_TSTR // Need exactly 1 argument. | bne ->fff_fallback | ldr CARG3, STR:CARG1->len | ldrb CARG1, STR:CARG1[1] // Access is always ok (NUL at end). | mvn CARG2, #~LJ_TISNUM | cmp CARG3, #0 | moveq RC, #(0+1)*8 | movne RC, #(1+1)*8 | strd CARG12, [BASE, #-8] | b ->fff_res | |.ffunc string_char // Only handle the 1-arg case here. | ffgccheck | ldrd CARG12, [BASE] | ldr PC, [BASE, FRAME_PC] | cmp NARGS8:RC, #8 // Need exactly 1 argument. | checktpeq CARG2, LJ_TISNUM | bicseq CARG4, CARG1, #255 | mov CARG3, #1 | bne ->fff_fallback | str CARG1, TMPD | mov CARG2, TMPDp // Points to stack. Little-endian. |->fff_newstr: | // CARG2 = str, CARG3 = len. | str BASE, L->base | mov CARG1, L | str PC, SAVE_PC | bl extern lj_str_new // (lua_State *L, char *str, size_t l) | // Returns GCstr *. | ldr BASE, L->base | mvn CARG2, #~LJ_TSTR | b ->fff_restv | |.ffunc string_sub | ffgccheck | ldrd CARG12, [BASE] | ldrd CARG34, [BASE, #16] | cmp NARGS8:RC, #16 | mvn RB, #0 | beq >1 | blo ->fff_fallback | checktp CARG4, LJ_TISNUM | mov RB, CARG3 | bne ->fff_fallback |1: | ldrd CARG34, [BASE, #8] | checktp CARG2, LJ_TSTR | ldreq CARG2, STR:CARG1->len | checktpeq CARG4, LJ_TISNUM | bne ->fff_fallback | // CARG1 = str, CARG2 = str->len, CARG3 = start, RB = end | add CARG4, CARG2, #1 | cmp CARG3, #0 // if (start < 0) start += len+1 | addlt CARG3, CARG3, CARG4 | cmp CARG3, #1 // if (start < 1) start = 1 | movlt CARG3, #1 | cmp RB, #0 // if (end < 0) end += len+1 | addlt RB, RB, CARG4 | bic RB, RB, RB, asr #31 // if (end < 0) end = 0 | cmp RB, CARG2 // if (end > len) end = len | add CARG1, STR:CARG1, #sizeof(GCstr)-1 | movgt RB, CARG2 | add CARG2, CARG1, CARG3 | subs CARG3, RB, CARG3 // len = end - start | add CARG3, CARG3, #1 // len += 1 | bge ->fff_newstr |->fff_emptystr: | sub STR:CARG1, DISPATCH, #-DISPATCH_GL(strempty) | mvn CARG2, #~LJ_TSTR | b ->fff_restv | |.ffunc string_rep // Only handle the 1-char case inline. | ffgccheck | ldrd CARG12, [BASE] | ldrd CARG34, [BASE, #8] | cmp NARGS8:RC, #16 | bne ->fff_fallback // Exactly 2 arguments | checktp CARG2, LJ_TSTR | checktpeq CARG4, LJ_TISNUM | bne ->fff_fallback | subs CARG4, CARG3, #1 | ldr CARG2, STR:CARG1->len | blt ->fff_emptystr // Count <= 0? | cmp CARG2, #1 | blo ->fff_emptystr // Zero-length string? | bne ->fff_fallback // Fallback for > 1-char strings. | ldr RB, [DISPATCH, #DISPATCH_GL(tmpbuf.sz)] | ldr CARG2, [DISPATCH, #DISPATCH_GL(tmpbuf.buf)] | ldr CARG1, STR:CARG1[1] | cmp RB, CARG3 | blo ->fff_fallback |1: // Fill buffer with char. | strb CARG1, [CARG2, CARG4] | subs CARG4, CARG4, #1 | bge <1 | b ->fff_newstr | |.ffunc string_reverse | ffgccheck | ldrd CARG12, [BASE] | cmp NARGS8:RC, #8 | blo ->fff_fallback | checkstr CARG2, ->fff_fallback | ldr CARG3, STR:CARG1->len | ldr RB, [DISPATCH, #DISPATCH_GL(tmpbuf.sz)] | ldr CARG2, [DISPATCH, #DISPATCH_GL(tmpbuf.buf)] | mov CARG4, CARG3 | add CARG1, STR:CARG1, #sizeof(GCstr) | cmp RB, CARG3 | blo ->fff_fallback |1: // Reverse string copy. | ldrb RB, [CARG1], #1 | subs CARG4, CARG4, #1 | blt ->fff_newstr | strb RB, [CARG2, CARG4] | b <1 | |.macro ffstring_case, name, lo | .ffunc name | ffgccheck | ldrd CARG12, [BASE] | cmp NARGS8:RC, #8 | blo ->fff_fallback | checkstr CARG2, ->fff_fallback | ldr CARG3, STR:CARG1->len | ldr RB, [DISPATCH, #DISPATCH_GL(tmpbuf.sz)] | ldr CARG2, [DISPATCH, #DISPATCH_GL(tmpbuf.buf)] | mov CARG4, #0 | add CARG1, STR:CARG1, #sizeof(GCstr) | cmp RB, CARG3 | blo ->fff_fallback |1: // ASCII case conversion. | ldrb RB, [CARG1, CARG4] | cmp CARG4, CARG3 | bhs ->fff_newstr | sub RC, RB, #lo | cmp RC, #26 | eorlo RB, RB, #0x20 | strb RB, [CARG2, CARG4] | add CARG4, CARG4, #1 | b <1 |.endmacro | |ffstring_case string_lower, 65 |ffstring_case string_upper, 97 | |//-- Table library ------------------------------------------------------ | |.ffunc_1 table_getn | checktab CARG2, ->fff_fallback | .IOS mov RA, BASE | bl extern lj_tab_len // (GCtab *t) | // Returns uint32_t (but less than 2^31). | .IOS mov BASE, RA | mvn CARG2, #~LJ_TISNUM | b ->fff_restv | |//-- Bit library -------------------------------------------------------- | |// FP number to bit conversion for soft-float. Clobbers r0-r3. |->vm_tobit_fb: | bhi ->fff_fallback |->vm_tobit: | lsl RB, CARG2, #1 | adds RB, RB, #0x00200000 | movpl CARG1, #0 // |x| < 1? | bxpl lr | mvn CARG4, #0x3e0 | subs RB, CARG4, RB, asr #21 | bmi >1 // |x| >= 2^32? | lsl CARG4, CARG2, #11 | orr CARG4, CARG4, #0x80000000 | orr CARG4, CARG4, CARG1, lsr #21 | cmp CARG2, #0 | lsr CARG1, CARG4, RB | rsblt CARG1, CARG1, #0 | bx lr |1: | add RB, RB, #21 | lsr CARG4, CARG1, RB | rsb RB, RB, #20 | lsl CARG1, CARG2, #12 | cmp CARG2, #0 | orr CARG1, CARG4, CARG1, lsl RB | rsblt CARG1, CARG1, #0 | bx lr | |.macro .ffunc_bit, name | .ffunc_1 bit_..name | checktp CARG2, LJ_TISNUM | blne ->vm_tobit_fb |.endmacro | |.ffunc_bit tobit | mvn CARG2, #~LJ_TISNUM | b ->fff_restv | |.macro .ffunc_bit_op, name, ins | .ffunc_bit name | mov CARG3, CARG1 | mov RA, #8 |1: | ldrd CARG12, [BASE, RA] | cmp RA, NARGS8:RC | add RA, RA, #8 | bge >2 | checktp CARG2, LJ_TISNUM | blne ->vm_tobit_fb | ins CARG3, CARG3, CARG1 | b <1 |.endmacro | |.ffunc_bit_op band, and |.ffunc_bit_op bor, orr |.ffunc_bit_op bxor, eor | |2: | mvn CARG4, #~LJ_TISNUM | ldr PC, [BASE, FRAME_PC] | strd CARG34, [BASE, #-8] | b ->fff_res1 | |.ffunc_bit bswap | eor CARG3, CARG1, CARG1, ror #16 | bic CARG3, CARG3, #0x00ff0000 | ror CARG1, CARG1, #8 | mvn CARG2, #~LJ_TISNUM | eor CARG1, CARG1, CARG3, lsr #8 | b ->fff_restv | |.ffunc_bit bnot | mvn CARG1, CARG1 | mvn CARG2, #~LJ_TISNUM | b ->fff_restv | |.macro .ffunc_bit_sh, name, ins, shmod | .ffunc bit_..name | ldrd CARG12, [BASE, #8] | cmp NARGS8:RC, #16 | blo ->fff_fallback | checktp CARG2, LJ_TISNUM | blne ->vm_tobit_fb |.if shmod == 0 | and RA, CARG1, #31 |.else | rsb RA, CARG1, #0 |.endif | ldrd CARG12, [BASE] | checktp CARG2, LJ_TISNUM | blne ->vm_tobit_fb | ins CARG1, CARG1, RA | mvn CARG2, #~LJ_TISNUM | b ->fff_restv |.endmacro | |.ffunc_bit_sh lshift, lsl, 0 |.ffunc_bit_sh rshift, lsr, 0 |.ffunc_bit_sh arshift, asr, 0 |.ffunc_bit_sh rol, ror, 1 |.ffunc_bit_sh ror, ror, 0 | |//----------------------------------------------------------------------- | |->fff_fallback: // Call fast function fallback handler. | // BASE = new base, RC = nargs*8 | ldr CARG3, [BASE, FRAME_FUNC] | ldr CARG2, L->maxstack | add CARG1, BASE, NARGS8:RC | ldr PC, [BASE, FRAME_PC] // Fallback may overwrite PC. | str CARG1, L->top | ldr CARG3, CFUNC:CARG3->f | str BASE, L->base | add CARG1, CARG1, #8*LUA_MINSTACK | str PC, SAVE_PC // Redundant (but a defined value). | cmp CARG1, CARG2 | mov CARG1, L | bhi >5 // Need to grow stack. | blx CARG3 // (lua_State *L) | // Either throws an error, or recovers and returns -1, 0 or nresults+1. | ldr BASE, L->base | cmp CRET1, #0 | lsl RC, CRET1, #3 | sub RA, BASE, #8 | bgt ->fff_res // Returned nresults+1? |1: // Returned 0 or -1: retry fast path. | ldr CARG1, L->top | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] | sub NARGS8:RC, CARG1, BASE | bne ->vm_call_tail // Returned -1? | ins_callt // Returned 0: retry fast path. | |// Reconstruct previous base for vmeta_call during tailcall. |->vm_call_tail: | ands CARG1, PC, #FRAME_TYPE | bic CARG2, PC, #FRAME_TYPEP | ldreq INS, [PC, #-4] | andeq CARG2, MASKR8, INS, lsr #5 // Conditional decode_RA8. | addeq CARG2, CARG2, #8 | sub RB, BASE, CARG2 | b ->vm_call_dispatch // Resolve again for tailcall. | |5: // Grow stack for fallback handler. | mov CARG2, #LUA_MINSTACK | bl extern lj_state_growstack // (lua_State *L, int n) | ldr BASE, L->base | cmp CARG1, CARG1 // Set zero-flag to force retry. | b <1 | |->fff_gcstep: // Call GC step function. | // BASE = new base, RC = nargs*8 | mov RA, lr | str BASE, L->base | add CARG2, BASE, NARGS8:RC | str PC, SAVE_PC // Redundant (but a defined value). | str CARG2, L->top | mov CARG1, L | bl extern lj_gc_step // (lua_State *L) | ldr BASE, L->base | mov lr, RA // Help return address predictor. | ldr CFUNC:CARG3, [BASE, FRAME_FUNC] | bx lr | |//----------------------------------------------------------------------- |//-- Special dispatch targets ------------------------------------------- |//----------------------------------------------------------------------- | |->vm_record: // Dispatch target for recording phase. |.if JIT | ldrb CARG1, [DISPATCH, #DISPATCH_GL(hookmask)] | tst CARG1, #HOOK_VMEVENT // No recording while in vmevent. | bne >5 | // Decrement the hookcount for consistency, but always do the call. | ldr CARG2, [DISPATCH, #DISPATCH_GL(hookcount)] | tst CARG1, #HOOK_ACTIVE | bne >1 | sub CARG2, CARG2, #1 | tst CARG1, #LUA_MASKLINE|LUA_MASKCOUNT | strne CARG2, [DISPATCH, #DISPATCH_GL(hookcount)] | b >1 |.endif | |->vm_rethook: // Dispatch target for return hooks. | ldrb CARG1, [DISPATCH, #DISPATCH_GL(hookmask)] | tst CARG1, #HOOK_ACTIVE // Hook already active? | beq >1 |5: // Re-dispatch to static ins. | decode_OP OP, INS | add OP, DISPATCH, OP, lsl #2 | ldr pc, [OP, #GG_DISP2STATIC] | |->vm_inshook: // Dispatch target for instr/line hooks. | ldrb CARG1, [DISPATCH, #DISPATCH_GL(hookmask)] | ldr CARG2, [DISPATCH, #DISPATCH_GL(hookcount)] | tst CARG1, #HOOK_ACTIVE // Hook already active? | bne <5 | tst CARG1, #LUA_MASKLINE|LUA_MASKCOUNT | beq <5 | subs CARG2, CARG2, #1 | str CARG2, [DISPATCH, #DISPATCH_GL(hookcount)] | beq >1 | tst CARG1, #LUA_MASKLINE | beq <5 |1: | mov CARG1, L | str BASE, L->base | mov CARG2, PC | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. | bl extern lj_dispatch_ins // (lua_State *L, const BCIns *pc) |3: | ldr BASE, L->base |4: // Re-dispatch to static ins. | ldrb OP, [PC, #-4] | ldr INS, [PC, #-4] | add OP, DISPATCH, OP, lsl #2 | ldr OP, [OP, #GG_DISP2STATIC] | decode_RA8 RA, INS | decode_RD RC, INS | bx OP | |->cont_hook: // Continue from hook yield. | ldr CARG1, [CARG4, #-24] | add PC, PC, #4 | str CARG1, SAVE_MULTRES // Restore MULTRES for *M ins. | b <4 | |->vm_hotloop: // Hot loop counter underflow. |.if JIT | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] // Same as curr_topL(L). | sub CARG1, DISPATCH, #-GG_DISP2J | str PC, SAVE_PC | ldr CARG3, LFUNC:CARG3->field_pc | mov CARG2, PC | str L, [DISPATCH, #DISPATCH_J(L)] | ldrb CARG3, [CARG3, #PC2PROTO(framesize)] | str BASE, L->base | add CARG3, BASE, CARG3, lsl #3 | str CARG3, L->top | bl extern lj_trace_hot // (jit_State *J, const BCIns *pc) | b <3 |.endif | |->vm_callhook: // Dispatch target for call hooks. | mov CARG2, PC |.if JIT | b >1 |.endif | |->vm_hotcall: // Hot call counter underflow. |.if JIT | orr CARG2, PC, #1 |1: |.endif | add CARG4, BASE, RC | str PC, SAVE_PC | mov CARG1, L | str BASE, L->base | sub RA, RA, BASE | str CARG4, L->top | bl extern lj_dispatch_call // (lua_State *L, const BCIns *pc) | // Returns ASMFunction. | ldr BASE, L->base | ldr CARG4, L->top | mov CARG2, #0 | add RA, BASE, RA | sub NARGS8:RC, CARG4, BASE | str CARG2, SAVE_PC // Invalidate for subsequent line hook. | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] | ldr INS, [PC, #-4] | bx CRET1 | |//----------------------------------------------------------------------- |//-- Trace exit handler ------------------------------------------------- |//----------------------------------------------------------------------- | |->vm_exit_handler: |.if JIT | sub sp, sp, #12 | push {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12} | ldr CARG1, [sp, #64] // Load original value of lr. | ldr DISPATCH, [lr] // Load DISPATCH. | add CARG3, sp, #64 // Recompute original value of sp. | mv_vmstate CARG4, EXIT | str CARG3, [sp, #52] // Store sp in RID_SP | st_vmstate CARG4 | ldr CARG2, [CARG1, #-4]! // Get exit instruction. | str CARG1, [sp, #56] // Store exit pc in RID_LR and RID_PC. | str CARG1, [sp, #60] |.if FPU | vpush {d0-d15} |.endif | lsl CARG2, CARG2, #8 | add CARG1, CARG1, CARG2, asr #6 | ldr CARG2, [lr, #4] // Load exit stub group offset. | sub CARG1, CARG1, lr | ldr L, [DISPATCH, #DISPATCH_GL(jit_L)] | add CARG1, CARG2, CARG1, lsr #2 // Compute exit number. | ldr BASE, [DISPATCH, #DISPATCH_GL(jit_base)] | str CARG1, [DISPATCH, #DISPATCH_J(exitno)] | mov CARG4, #0 | str L, [DISPATCH, #DISPATCH_J(L)] | str BASE, L->base | str CARG4, [DISPATCH, #DISPATCH_GL(jit_L)] | sub CARG1, DISPATCH, #-GG_DISP2J | mov CARG2, sp | bl extern lj_trace_exit // (jit_State *J, ExitState *ex) | // Returns MULTRES (unscaled) or negated error code. | ldr CARG2, L->cframe | ldr BASE, L->base | bic CARG2, CARG2, #~CFRAME_RAWMASK // Use two steps: bic sp is deprecated. | mov sp, CARG2 | ldr PC, SAVE_PC // Get SAVE_PC. | str L, SAVE_L // Set SAVE_L (on-trace resume/yield). | b >1 |.endif |->vm_exit_interp: | // CARG1 = MULTRES or negated error code, BASE, PC and DISPATCH set. |.if JIT | ldr L, SAVE_L |1: | cmp CARG1, #0 | blt >3 // Check for error from exit. | lsl RC, CARG1, #3 | ldr LFUNC:CARG2, [BASE, FRAME_FUNC] | str RC, SAVE_MULTRES | mov CARG3, #0 | ldr CARG2, LFUNC:CARG2->field_pc | str CARG3, [DISPATCH, #DISPATCH_GL(jit_L)] | mv_vmstate CARG4, INTERP | ldr KBASE, [CARG2, #PC2PROTO(k)] | // Modified copy of ins_next which handles function header dispatch, too. | ldrb OP, [PC] | mov MASKR8, #255 | ldr INS, [PC], #4 | lsl MASKR8, MASKR8, #3 // MASKR8 = 255*8. | st_vmstate CARG4 | cmp OP, #BC_FUNCF // Function header? | ldr OP, [DISPATCH, OP, lsl #2] | decode_RA8 RA, INS | lsrlo RC, INS, #16 // No: Decode operands A*8 and D. | subhs RC, RC, #8 | addhs RA, RA, BASE // Yes: RA = BASE+framesize*8, RC = nargs*8 | bx OP | |3: // Rethrow error from the right C frame. | rsb CARG2, CARG1, #0 | mov CARG1, L | bl extern lj_err_throw // (lua_State *L, int errcode) |.endif | |//----------------------------------------------------------------------- |//-- Math helper functions ---------------------------------------------- |//----------------------------------------------------------------------- | |// FP value rounding. Called from JIT code. |// |// double lj_vm_floor/ceil/trunc(double x); |.macro vm_round, func, hf |.if hf == 1 | vmov CARG1, CARG2, d0 |.endif | lsl CARG3, CARG2, #1 | adds RB, CARG3, #0x00200000 | bpl >2 // |x| < 1? | mvn CARG4, #0x3cc | subs RB, CARG4, RB, asr #21 // 2^0: RB = 51, 2^51: RB = 0. | bxlo lr // |x| >= 2^52: done. | mvn CARG4, #1 | bic CARG3, CARG1, CARG4, lsl RB // ztest = lo & ~lomask | and CARG1, CARG1, CARG4, lsl RB // lo &= lomask | subs RB, RB, #32 | bicpl CARG4, CARG2, CARG4, lsl RB // |x| <= 2^20: ztest |= hi & ~himask | orrpl CARG3, CARG3, CARG4 | mvnpl CARG4, #1 | andpl CARG2, CARG2, CARG4, lsl RB // |x| <= 2^20: hi &= himask |.if "func" == "floor" | tst CARG3, CARG2, asr #31 // iszero = ((ztest & signmask) == 0) |.else | bics CARG3, CARG3, CARG2, asr #31 // iszero = ((ztest & ~signmask) == 0) |.endif |.if hf == 1 | vmoveq d0, CARG1, CARG2 |.endif | bxeq lr // iszero: done. | mvn CARG4, #1 | cmp RB, #0 | lslpl CARG3, CARG4, RB | mvnmi CARG3, #0 | add RB, RB, #32 | subs CARG1, CARG1, CARG4, lsl RB // lo = lo-lomask | sbc CARG2, CARG2, CARG3 // hi = hi-himask+carry |.if hf == 1 | vmov d0, CARG1, CARG2 |.endif | bx lr | |2: // |x| < 1: | bxcs lr // |x| is not finite. | orr CARG3, CARG3, CARG1 // ztest = (2*hi) | lo |.if "func" == "floor" | tst CARG3, CARG2, asr #31 // iszero = ((ztest & signmask) == 0) |.else | bics CARG3, CARG3, CARG2, asr #31 // iszero = ((ztest & ~signmask) == 0) |.endif | mov CARG1, #0 // lo = 0 | and CARG2, CARG2, #0x80000000 | ldrne CARG4, <9 // hi = sign(x) | (iszero ? 0.0 : 1.0) | orrne CARG2, CARG2, CARG4 |.if hf == 1 | vmov d0, CARG1, CARG2 |.endif | bx lr |.endmacro | |9: | .long 0x3ff00000 // hiword(+1.0) | |->vm_floor: |.if HFABI | vm_round floor, 1 |.endif |->vm_floor_sf: | vm_round floor, 0 | |->vm_ceil: |.if HFABI | vm_round ceil, 1 |.endif |->vm_ceil_sf: | vm_round ceil, 0 | |.macro vm_trunc, hf |.if JIT |.if hf == 1 | vmov CARG1, CARG2, d0 |.endif | lsl CARG3, CARG2, #1 | adds RB, CARG3, #0x00200000 | andpl CARG2, CARG2, #0x80000000 // |x| < 1? hi = sign(x), lo = 0. | movpl CARG1, #0 |.if hf == 1 | vmovpl d0, CARG1, CARG2 |.endif | bxpl lr | mvn CARG4, #0x3cc | subs RB, CARG4, RB, asr #21 // 2^0: RB = 51, 2^51: RB = 0. | bxlo lr // |x| >= 2^52: already done. | mvn CARG4, #1 | and CARG1, CARG1, CARG4, lsl RB // lo &= lomask | subs RB, RB, #32 | andpl CARG2, CARG2, CARG4, lsl RB // |x| <= 2^20: hi &= himask |.if hf == 1 | vmov d0, CARG1, CARG2 |.endif | bx lr |.endif |.endmacro | |->vm_trunc: |.if HFABI | vm_trunc 1 |.endif |->vm_trunc_sf: | vm_trunc 0 | | // double lj_vm_mod(double dividend, double divisor); |->vm_mod: |.if FPU | // Special calling convention. Also, RC (r11) is not preserved. | vdiv.f64 d0, d6, d7 | mov RC, lr | vmov CARG1, CARG2, d0 | bl ->vm_floor_sf | vmov d0, CARG1, CARG2 | vmul.f64 d0, d0, d7 | mov lr, RC | vsub.f64 d6, d6, d0 | bx lr |.else | push {r0, r1, r2, r3, r4, lr} | bl extern __aeabi_ddiv | bl ->vm_floor_sf | ldrd CARG34, [sp, #8] | bl extern __aeabi_dmul | ldrd CARG34, [sp] | eor CARG2, CARG2, #0x80000000 | bl extern __aeabi_dadd | add sp, sp, #20 | pop {pc} |.endif | | // int lj_vm_modi(int dividend, int divisor); |->vm_modi: | ands RB, CARG1, #0x80000000 | rsbmi CARG1, CARG1, #0 // a = |dividend| | eor RB, RB, CARG2, asr #1 // Keep signdiff and sign(divisor). | cmp CARG2, #0 | rsbmi CARG2, CARG2, #0 // b = |divisor| | subs CARG4, CARG2, #1 | cmpne CARG1, CARG2 | moveq CARG1, #0 // if (b == 1 || a == b) a = 0 | tsthi CARG2, CARG4 | andeq CARG1, CARG1, CARG4 // else if ((b & (b-1)) == 0) a &= b-1 | bls >1 | // Use repeated subtraction to get the remainder. | clz CARG3, CARG1 | clz CARG4, CARG2 | sub CARG4, CARG4, CARG3 | rsbs CARG3, CARG4, #31 // entry = (31-(clz(b)-clz(a)))*8 | addne pc, pc, CARG3, lsl #3 // Duff's device. | nop { int i; for (i = 31; i >= 0; i--) { | cmp CARG1, CARG2, lsl #i | subhs CARG1, CARG1, CARG2, lsl #i } } |1: | cmp CARG1, #0 | cmpne RB, #0 | submi CARG1, CARG1, CARG2 // if (y != 0 && signdiff) y = y - b | eors CARG2, CARG1, RB, lsl #1 | rsbmi CARG1, CARG1, #0 // if (sign(divisor) != sign(y)) y = -y | bx lr | |//----------------------------------------------------------------------- |//-- Miscellaneous functions -------------------------------------------- |//----------------------------------------------------------------------- | |//----------------------------------------------------------------------- |//-- FFI helper functions ----------------------------------------------- |//----------------------------------------------------------------------- | |// Handler for callback functions. |// Saveregs already performed. Callback slot number in [sp], g in r12. |->vm_ffi_callback: |.if FFI |.type CTSTATE, CTState, PC | ldr CTSTATE, GL:r12->ctype_state | add DISPATCH, r12, #GG_G2DISP |.if FPU | str r4, SAVE_R4 | add r4, sp, CFRAME_SPACE+4+8*8 | vstmdb r4!, {d8-d15} |.endif |.if HFABI | add r12, CTSTATE, #offsetof(CTState, cb.fpr[8]) |.endif | strd CARG34, CTSTATE->cb.gpr[2] | strd CARG12, CTSTATE->cb.gpr[0] |.if HFABI | vstmdb r12!, {d0-d7} |.endif | ldr CARG4, [sp] | add CARG3, sp, #CFRAME_SIZE | mov CARG1, CTSTATE | lsr CARG4, CARG4, #3 | str CARG3, CTSTATE->cb.stack | mov CARG2, sp | str CARG4, CTSTATE->cb.slot | str CTSTATE, SAVE_PC // Any value outside of bytecode is ok. | bl extern lj_ccallback_enter // (CTState *cts, void *cf) | // Returns lua_State *. | ldr BASE, L:CRET1->base | mv_vmstate CARG2, INTERP | ldr RC, L:CRET1->top | mov MASKR8, #255 | ldr LFUNC:CARG3, [BASE, FRAME_FUNC] | mov L, CRET1 | sub RC, RC, BASE | lsl MASKR8, MASKR8, #3 // MASKR8 = 255*8. | st_vmstate CARG2 | ins_callt |.endif | |->cont_ffi_callback: // Return from FFI callback. |.if FFI | ldr CTSTATE, [DISPATCH, #DISPATCH_GL(ctype_state)] | str BASE, L->base | str CARG4, L->top | str L, CTSTATE->L | mov CARG1, CTSTATE | mov CARG2, RA | bl extern lj_ccallback_leave // (CTState *cts, TValue *o) | ldrd CARG12, CTSTATE->cb.gpr[0] |.if HFABI | vldr d0, CTSTATE->cb.fpr[0] |.endif | b ->vm_leave_unw |.endif | |->vm_ffi_call: // Call C function via FFI. | // Caveat: needs special frame unwinding, see below. |.if FFI | .type CCSTATE, CCallState, r4 | push {CCSTATE, r5, r11, lr} | mov CCSTATE, CARG1 | ldr CARG1, CCSTATE:CARG1->spadj | ldrb CARG2, CCSTATE->nsp | add CARG3, CCSTATE, #offsetof(CCallState, stack) |.if HFABI | add RB, CCSTATE, #offsetof(CCallState, fpr[0]) |.endif | mov r11, sp | sub sp, sp, CARG1 // Readjust stack. | subs CARG2, CARG2, #1 |.if HFABI | vldm RB, {d0-d7} |.endif | ldr RB, CCSTATE->func | bmi >2 |1: // Copy stack slots. | ldr CARG4, [CARG3, CARG2, lsl #2] | str CARG4, [sp, CARG2, lsl #2] | subs CARG2, CARG2, #1 | bpl <1 |2: | ldrd CARG12, CCSTATE->gpr[0] | ldrd CARG34, CCSTATE->gpr[2] | blx RB | mov sp, r11 |.if HFABI | add r12, CCSTATE, #offsetof(CCallState, fpr[4]) |.endif | strd CRET1, CCSTATE->gpr[0] |.if HFABI | vstmdb r12!, {d0-d3} |.endif | pop {CCSTATE, r5, r11, pc} |.endif |// Note: vm_ffi_call must be the last function in this object file! | |//----------------------------------------------------------------------- } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; |=>defop: switch (op) { /* -- Comparison ops ---------------------------------------------------- */ /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | // RA = src1*8, RC = src2, JMP with RC = target | lsl RC, RC, #3 | ldrd CARG12, [RA, BASE]! | ldrh RB, [PC, #2] | ldrd CARG34, [RC, BASE]! | add PC, PC, #4 | add RB, PC, RB, lsl #2 | checktp CARG2, LJ_TISNUM | bne >3 | checktp CARG4, LJ_TISNUM | bne >4 | cmp CARG1, CARG3 if (op == BC_ISLT) { | sublt PC, RB, #0x20000 } else if (op == BC_ISGE) { | subge PC, RB, #0x20000 } else if (op == BC_ISLE) { | suble PC, RB, #0x20000 } else { | subgt PC, RB, #0x20000 } |1: | ins_next | |3: // CARG12 is not an integer. |.if FPU | vldr d0, [RA] | bhi ->vmeta_comp | // d0 is a number. | checktp CARG4, LJ_TISNUM | vldr d1, [RC] | blo >5 | bhi ->vmeta_comp | // d0 is a number, CARG3 is an integer. | vmov s4, CARG3 | vcvt.f64.s32 d1, s4 | b >5 |4: // CARG1 is an integer, CARG34 is not an integer. | vldr d1, [RC] | bhi ->vmeta_comp | // CARG1 is an integer, d1 is a number. | vmov s4, CARG1 | vcvt.f64.s32 d0, s4 |5: // d0 and d1 are numbers. | vcmp.f64 d0, d1 | vmrs | // To preserve NaN semantics GE/GT branch on unordered, but LT/LE don't. if (op == BC_ISLT) { | sublo PC, RB, #0x20000 } else if (op == BC_ISGE) { | subhs PC, RB, #0x20000 } else if (op == BC_ISLE) { | subls PC, RB, #0x20000 } else { | subhi PC, RB, #0x20000 } | b <1 |.else | bhi ->vmeta_comp | // CARG12 is a number. | checktp CARG4, LJ_TISNUM | movlo RA, RB // Save RB. | blo >5 | bhi ->vmeta_comp | // CARG12 is a number, CARG3 is an integer. | mov CARG1, CARG3 | mov RC, RA | mov RA, RB // Save RB. | bl extern __aeabi_i2d | mov CARG3, CARG1 | mov CARG4, CARG2 | ldrd CARG12, [RC] // Restore first operand. | b >5 |4: // CARG1 is an integer, CARG34 is not an integer. | bhi ->vmeta_comp | // CARG1 is an integer, CARG34 is a number. | mov RA, RB // Save RB. | bl extern __aeabi_i2d | ldrd CARG34, [RC] // Restore second operand. |5: // CARG12 and CARG34 are numbers. | bl extern __aeabi_cdcmple | // To preserve NaN semantics GE/GT branch on unordered, but LT/LE don't. if (op == BC_ISLT) { | sublo PC, RA, #0x20000 } else if (op == BC_ISGE) { | subhs PC, RA, #0x20000 } else if (op == BC_ISLE) { | subls PC, RA, #0x20000 } else { | subhi PC, RA, #0x20000 } | b <1 |.endif break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; | // RA = src1*8, RC = src2, JMP with RC = target | lsl RC, RC, #3 | ldrd CARG12, [RA, BASE]! | ldrh RB, [PC, #2] | ldrd CARG34, [RC, BASE]! | add PC, PC, #4 | add RB, PC, RB, lsl #2 | checktp CARG2, LJ_TISNUM | cmnls CARG4, #-LJ_TISNUM if (vk) { | bls ->BC_ISEQN_Z } else { | bls ->BC_ISNEN_Z } | // Either or both types are not numbers. |.if FFI | checktp CARG2, LJ_TCDATA | checktpne CARG4, LJ_TCDATA | beq ->vmeta_equal_cd |.endif | cmp CARG2, CARG4 // Compare types. | bne >2 // Not the same type? | checktp CARG2, LJ_TISPRI | bhs >1 // Same type and primitive type? | | // Same types and not a primitive type. Compare GCobj or pvalue. | cmp CARG1, CARG3 if (vk) { | bne >3 // Different GCobjs or pvalues? |1: // Branch if same. | sub PC, RB, #0x20000 |2: // Different. | ins_next |3: | checktp CARG2, LJ_TISTABUD | bhi <2 // Different objects and not table/ud? } else { | beq >1 // Same GCobjs or pvalues? | checktp CARG2, LJ_TISTABUD | bhi >2 // Different objects and not table/ud? } | // Different tables or userdatas. Need to check __eq metamethod. | // Field metatable must be at same offset for GCtab and GCudata! | ldr TAB:RA, TAB:CARG1->metatable | cmp TAB:RA, #0 if (vk) { | beq <2 // No metatable? } else { | beq >2 // No metatable? } | ldrb RA, TAB:RA->nomm | mov CARG4, #1-vk // ne = 0 or 1. | mov CARG2, CARG1 | tst RA, #1<vmeta_equal // 'no __eq' flag not set? if (vk) { | b <2 } else { |2: // Branch if different. | sub PC, RB, #0x20000 |1: // Same. | ins_next } break; case BC_ISEQS: case BC_ISNES: vk = op == BC_ISEQS; | // RA = src*8, RC = str_const (~), JMP with RC = target | mvn RC, RC | ldrd CARG12, [BASE, RA] | ldrh RB, [PC, #2] | ldr STR:CARG3, [KBASE, RC, lsl #2] | add PC, PC, #4 | add RB, PC, RB, lsl #2 | checktp CARG2, LJ_TSTR |.if FFI | bne >7 | cmp CARG1, CARG3 |.else | cmpeq CARG1, CARG3 |.endif if (vk) { | subeq PC, RB, #0x20000 |1: } else { |1: | subne PC, RB, #0x20000 } | ins_next | |.if FFI |7: | checktp CARG2, LJ_TCDATA | bne <1 | b ->vmeta_equal_cd |.endif break; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; | // RA = src*8, RC = num_const (~), JMP with RC = target | lsl RC, RC, #3 | ldrd CARG12, [RA, BASE]! | ldrh RB, [PC, #2] | ldrd CARG34, [RC, KBASE]! | add PC, PC, #4 | add RB, PC, RB, lsl #2 if (vk) { |->BC_ISEQN_Z: } else { |->BC_ISNEN_Z: } | checktp CARG2, LJ_TISNUM | bne >3 | checktp CARG4, LJ_TISNUM | bne >4 | cmp CARG1, CARG3 if (vk) { | subeq PC, RB, #0x20000 |1: } else { |1: | subne PC, RB, #0x20000 } |2: | ins_next | |3: // CARG12 is not an integer. |.if FFI | bhi >7 |.else if (!vk) { | subhi PC, RB, #0x20000 } | bhi <2 |.endif |.if FPU | checktp CARG4, LJ_TISNUM | vmov s4, CARG3 | vldr d0, [RA] | vldrlo d1, [RC] | vcvths.f64.s32 d1, s4 | b >5 |4: // CARG1 is an integer, d1 is a number. | vmov s4, CARG1 | vldr d1, [RC] | vcvt.f64.s32 d0, s4 |5: // d0 and d1 are numbers. | vcmp.f64 d0, d1 | vmrs if (vk) { | subeq PC, RB, #0x20000 } else { | subne PC, RB, #0x20000 } | b <2 |.else | // CARG12 is a number. | checktp CARG4, LJ_TISNUM | movlo RA, RB // Save RB. | blo >5 | // CARG12 is a number, CARG3 is an integer. | mov CARG1, CARG3 | mov RC, RA |4: // CARG1 is an integer, CARG34 is a number. | mov RA, RB // Save RB. | bl extern __aeabi_i2d | ldrd CARG34, [RC] // Restore other operand. |5: // CARG12 and CARG34 are numbers. | bl extern __aeabi_cdcmpeq if (vk) { | subeq PC, RA, #0x20000 } else { | subne PC, RA, #0x20000 } | b <2 |.endif | |.if FFI |7: | checktp CARG2, LJ_TCDATA | bne <1 | b ->vmeta_equal_cd |.endif break; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; | // RA = src*8, RC = primitive_type (~), JMP with RC = target | ldrd CARG12, [BASE, RA] | ldrh RB, [PC, #2] | add PC, PC, #4 | mvn RC, RC | add RB, PC, RB, lsl #2 |.if FFI | checktp CARG2, LJ_TCDATA | beq ->vmeta_equal_cd |.endif | cmp CARG2, RC if (vk) { | subeq PC, RB, #0x20000 } else { | subne PC, RB, #0x20000 } | ins_next break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | // RA = dst*8 or unused, RC = src, JMP with RC = target | add RC, BASE, RC, lsl #3 | ldrh RB, [PC, #2] | ldrd CARG12, [RC] | add PC, PC, #4 | add RB, PC, RB, lsl #2 | checktp CARG2, LJ_TTRUE if (op == BC_ISTC || op == BC_IST) { | subls PC, RB, #0x20000 if (op == BC_ISTC) { | strdls CARG12, [BASE, RA] } } else { | subhi PC, RB, #0x20000 if (op == BC_ISFC) { | strdhi CARG12, [BASE, RA] } } | ins_next break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: | // RA = dst*8, RC = src | lsl RC, RC, #3 | ins_next1 | ldrd CARG12, [BASE, RC] | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 break; case BC_NOT: | // RA = dst*8, RC = src | add RC, BASE, RC, lsl #3 | ins_next1 | ldr CARG1, [RC, #4] | add RA, BASE, RA | ins_next2 | checktp CARG1, LJ_TTRUE | mvnls CARG2, #~LJ_TFALSE | mvnhi CARG2, #~LJ_TTRUE | str CARG2, [RA, #4] | ins_next3 break; case BC_UNM: | // RA = dst*8, RC = src | lsl RC, RC, #3 | ldrd CARG12, [BASE, RC] | ins_next1 | ins_next2 | checktp CARG2, LJ_TISNUM | bhi ->vmeta_unm | eorne CARG2, CARG2, #0x80000000 | bne >5 | rsbseq CARG1, CARG1, #0 | ldrdvs CARG12, >9 |5: | strd CARG12, [BASE, RA] | ins_next3 | |.align 8 |9: | .long 0x00000000, 0x41e00000 // 2^31. break; case BC_LEN: | // RA = dst*8, RC = src | lsl RC, RC, #3 | ldrd CARG12, [BASE, RC] | checkstr CARG2, >2 | ldr CARG1, STR:CARG1->len |1: | mvn CARG2, #~LJ_TISNUM | ins_next1 | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 |2: | checktab CARG2, ->vmeta_len #if LJ_52 | ldr TAB:CARG3, TAB:CARG1->metatable | cmp TAB:CARG3, #0 | bne >9 |3: #endif |->BC_LEN_Z: | .IOS mov RC, BASE | bl extern lj_tab_len // (GCtab *t) | // Returns uint32_t (but less than 2^31). | .IOS mov BASE, RC | b <1 #if LJ_52 |9: | ldrb CARG4, TAB:CARG3->nomm | tst CARG4, #1<vmeta_len #endif break; /* -- Binary ops -------------------------------------------------------- */ |.macro ins_arithcheck, cond, ncond, target ||if (vk == 1) { | cmn CARG4, #-LJ_TISNUM | cmn..cond CARG2, #-LJ_TISNUM ||} else { | cmn CARG2, #-LJ_TISNUM | cmn..cond CARG4, #-LJ_TISNUM ||} | b..ncond target |.endmacro |.macro ins_arithcheck_int, target | ins_arithcheck eq, ne, target |.endmacro |.macro ins_arithcheck_num, target | ins_arithcheck lo, hs, target |.endmacro | |.macro ins_arithpre | decode_RB8 RB, INS | decode_RC8 RC, INS | // RA = dst*8, RB = src1*8, RC = src2*8 | num_const*8 ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); ||switch (vk) { ||case 0: | .if FPU | ldrd CARG12, [RB, BASE]! | ldrd CARG34, [RC, KBASE]! | .else | ldrd CARG12, [BASE, RB] | ldrd CARG34, [KBASE, RC] | .endif || break; ||case 1: | .if FPU | ldrd CARG34, [RB, BASE]! | ldrd CARG12, [RC, KBASE]! | .else | ldrd CARG34, [BASE, RB] | ldrd CARG12, [KBASE, RC] | .endif || break; ||default: | .if FPU | ldrd CARG12, [RB, BASE]! | ldrd CARG34, [RC, BASE]! | .else | ldrd CARG12, [BASE, RB] | ldrd CARG34, [BASE, RC] | .endif || break; ||} |.endmacro | |.macro ins_arithpre_fpu, reg1, reg2 |.if FPU ||if (vk == 1) { | vldr reg2, [RB] | vldr reg1, [RC] ||} else { | vldr reg1, [RB] | vldr reg2, [RC] ||} |.endif |.endmacro | |.macro ins_arithpost_fpu, reg | ins_next1 | add RA, BASE, RA | ins_next2 | vstr reg, [RA] | ins_next3 |.endmacro | |.macro ins_arithfallback, ins ||switch (vk) { ||case 0: | ins ->vmeta_arith_vn || break; ||case 1: | ins ->vmeta_arith_nv || break; ||default: | ins ->vmeta_arith_vv || break; ||} |.endmacro | |.macro ins_arithdn, intins, fpins, fpcall | ins_arithpre |.if "intins" ~= "vm_modi" and not FPU | ins_next1 |.endif | ins_arithcheck_int >5 |.if "intins" == "smull" | smull CARG1, RC, CARG3, CARG1 | cmp RC, CARG1, asr #31 | ins_arithfallback bne |.elif "intins" == "vm_modi" | movs CARG2, CARG3 | ins_arithfallback beq | bl ->vm_modi | mvn CARG2, #~LJ_TISNUM |.else | intins CARG1, CARG1, CARG3 | ins_arithfallback bvs |.endif |4: |.if "intins" == "vm_modi" or FPU | ins_next1 |.endif | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 |5: // FP variant. | ins_arithpre_fpu d6, d7 | ins_arithfallback ins_arithcheck_num |.if FPU |.if "intins" == "vm_modi" | bl fpcall |.else | fpins d6, d6, d7 |.endif | ins_arithpost_fpu d6 |.else | bl fpcall |.if "intins" ~= "vm_modi" | ins_next1 |.endif | b <4 |.endif |.endmacro | |.macro ins_arithfp, fpins, fpcall | ins_arithpre |.if "fpins" ~= "extern" or HFABI | ins_arithpre_fpu d0, d1 |.endif | ins_arithfallback ins_arithcheck_num |.if "fpins" == "extern" | .IOS mov RC, BASE | bl fpcall | .IOS mov BASE, RC |.elif FPU | fpins d0, d0, d1 |.else | bl fpcall |.endif |.if ("fpins" ~= "extern" or HFABI) and FPU | ins_arithpost_fpu d0 |.else | ins_next1 | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 |.endif |.endmacro case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | ins_arithdn adds, vadd.f64, extern __aeabi_dadd break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | ins_arithdn subs, vsub.f64, extern __aeabi_dsub break; case BC_MULVN: case BC_MULNV: case BC_MULVV: | ins_arithdn smull, vmul.f64, extern __aeabi_dmul break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | ins_arithfp vdiv.f64, extern __aeabi_ddiv break; case BC_MODVN: case BC_MODNV: case BC_MODVV: | ins_arithdn vm_modi, vm_mod, ->vm_mod break; case BC_POW: | // NYI: (partial) integer arithmetic. | ins_arithfp extern, extern pow break; case BC_CAT: | decode_RB8 RC, INS | decode_RC8 RB, INS | // RA = dst*8, RC = src_start*8, RB = src_end*8 (note: RB/RC swapped!) | sub CARG3, RB, RC | str BASE, L->base | add CARG2, BASE, RB |->BC_CAT_Z: | // RA = dst*8, RC = src_start*8, CARG2 = top-1 | mov CARG1, L | str PC, SAVE_PC | lsr CARG3, CARG3, #3 | bl extern lj_meta_cat // (lua_State *L, TValue *top, int left) | // Returns NULL (finished) or TValue * (metamethod). | ldr BASE, L->base | cmp CRET1, #0 | bne ->vmeta_binop | ldrd CARG34, [BASE, RC] | ins_next1 | ins_next2 | strd CARG34, [BASE, RA] // Copy result to RA. | ins_next3 break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: | // RA = dst*8, RC = str_const (~) | mvn RC, RC | ins_next1 | ldr CARG1, [KBASE, RC, lsl #2] | mvn CARG2, #~LJ_TSTR | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 break; case BC_KCDATA: |.if FFI | // RA = dst*8, RC = cdata_const (~) | mvn RC, RC | ins_next1 | ldr CARG1, [KBASE, RC, lsl #2] | mvn CARG2, #~LJ_TCDATA | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 |.endif break; case BC_KSHORT: | // RA = dst*8, (RC = int16_literal) | mov CARG1, INS, asr #16 // Refetch sign-extended reg. | mvn CARG2, #~LJ_TISNUM | ins_next1 | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 break; case BC_KNUM: | // RA = dst*8, RC = num_const | lsl RC, RC, #3 | ins_next1 | ldrd CARG12, [KBASE, RC] | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 break; case BC_KPRI: | // RA = dst*8, RC = primitive_type (~) | add RA, BASE, RA | mvn RC, RC | ins_next1 | ins_next2 | str RC, [RA, #4] | ins_next3 break; case BC_KNIL: | // RA = base*8, RC = end | add RA, BASE, RA | add RC, BASE, RC, lsl #3 | mvn CARG1, #~LJ_TNIL | str CARG1, [RA, #4] | add RA, RA, #8 |1: | str CARG1, [RA, #4] | cmp RA, RC | add RA, RA, #8 | blt <1 | ins_next_ break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: | // RA = dst*8, RC = uvnum | ldr LFUNC:CARG2, [BASE, FRAME_FUNC] | lsl RC, RC, #2 | add RC, RC, #offsetof(GCfuncL, uvptr) | ldr UPVAL:CARG2, [LFUNC:CARG2, RC] | ldr CARG2, UPVAL:CARG2->v | ldrd CARG34, [CARG2] | ins_next1 | ins_next2 | strd CARG34, [BASE, RA] | ins_next3 break; case BC_USETV: | // RA = uvnum*8, RC = src | ldr LFUNC:CARG2, [BASE, FRAME_FUNC] | lsr RA, RA, #1 | add RA, RA, #offsetof(GCfuncL, uvptr) | lsl RC, RC, #3 | ldr UPVAL:CARG2, [LFUNC:CARG2, RA] | ldrd CARG34, [BASE, RC] | ldrb RB, UPVAL:CARG2->marked | ldrb RC, UPVAL:CARG2->closed | ldr CARG2, UPVAL:CARG2->v | tst RB, #LJ_GC_BLACK // isblack(uv) | add RB, CARG4, #-LJ_TISGCV | cmpne RC, #0 | strd CARG34, [CARG2] | bne >2 // Upvalue is closed and black? |1: | ins_next | |2: // Check if new value is collectable. | cmn RB, #-(LJ_TISNUM - LJ_TISGCV) | ldrbhi RC, GCOBJ:CARG3->gch.marked | bls <1 // tvisgcv(v) | sub CARG1, DISPATCH, #-GG_DISP2G | tst RC, #LJ_GC_WHITES | // Crossed a write barrier. Move the barrier forward. |.if IOS | beq <1 | mov RC, BASE | bl extern lj_gc_barrieruv // (global_State *g, TValue *tv) | mov BASE, RC |.else | blne extern lj_gc_barrieruv // (global_State *g, TValue *tv) |.endif | b <1 break; case BC_USETS: | // RA = uvnum*8, RC = str_const (~) | ldr LFUNC:CARG2, [BASE, FRAME_FUNC] | lsr RA, RA, #1 | add RA, RA, #offsetof(GCfuncL, uvptr) | mvn RC, RC | ldr UPVAL:CARG2, [LFUNC:CARG2, RA] | ldr STR:CARG3, [KBASE, RC, lsl #2] | mvn CARG4, #~LJ_TSTR | ldrb RB, UPVAL:CARG2->marked | ldr CARG2, UPVAL:CARG2->v | ldrb RC, UPVAL:CARG2->closed | tst RB, #LJ_GC_BLACK // isblack(uv) | ldrb RB, STR:CARG3->marked | strd CARG34, [CARG2] | bne >2 |1: | ins_next | |2: // Check if string is white and ensure upvalue is closed. | tst RB, #LJ_GC_WHITES // iswhite(str) | cmpne RC, #0 | sub CARG1, DISPATCH, #-GG_DISP2G | // Crossed a write barrier. Move the barrier forward. |.if IOS | beq <1 | mov RC, BASE | bl extern lj_gc_barrieruv // (global_State *g, TValue *tv) | mov BASE, RC |.else | blne extern lj_gc_barrieruv // (global_State *g, TValue *tv) |.endif | b <1 break; case BC_USETN: | // RA = uvnum*8, RC = num_const | ldr LFUNC:CARG2, [BASE, FRAME_FUNC] | lsr RA, RA, #1 | add RA, RA, #offsetof(GCfuncL, uvptr) | lsl RC, RC, #3 | ldr UPVAL:CARG2, [LFUNC:CARG2, RA] | ldrd CARG34, [KBASE, RC] | ldr CARG2, UPVAL:CARG2->v | ins_next1 | ins_next2 | strd CARG34, [CARG2] | ins_next3 break; case BC_USETP: | // RA = uvnum*8, RC = primitive_type (~) | ldr LFUNC:CARG2, [BASE, FRAME_FUNC] | lsr RA, RA, #1 | add RA, RA, #offsetof(GCfuncL, uvptr) | ldr UPVAL:CARG2, [LFUNC:CARG2, RA] | mvn RC, RC | ldr CARG2, UPVAL:CARG2->v | ins_next1 | ins_next2 | str RC, [CARG2, #4] | ins_next3 break; case BC_UCLO: | // RA = level*8, RC = target | ldr CARG3, L->openupval | add RC, PC, RC, lsl #2 | str BASE, L->base | cmp CARG3, #0 | sub PC, RC, #0x20000 | beq >1 | mov CARG1, L | add CARG2, BASE, RA | bl extern lj_func_closeuv // (lua_State *L, TValue *level) | ldr BASE, L->base |1: | ins_next break; case BC_FNEW: | // RA = dst*8, RC = proto_const (~) (holding function prototype) | mvn RC, RC | str BASE, L->base | ldr CARG2, [KBASE, RC, lsl #2] | str PC, SAVE_PC | ldr CARG3, [BASE, FRAME_FUNC] | mov CARG1, L | // (lua_State *L, GCproto *pt, GCfuncL *parent) | bl extern lj_func_newL_gc | // Returns GCfuncL *. | ldr BASE, L->base | mvn CARG2, #~LJ_TFUNC | ins_next1 | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: case BC_TDUP: | // RA = dst*8, RC = (hbits|asize) | tab_const (~) if (op == BC_TDUP) { | mvn RC, RC } | ldr CARG3, [DISPATCH, #DISPATCH_GL(gc.total)] | ldr CARG4, [DISPATCH, #DISPATCH_GL(gc.threshold)] | str BASE, L->base | str PC, SAVE_PC | cmp CARG3, CARG4 | mov CARG1, L | bhs >5 |1: if (op == BC_TNEW) { | lsl CARG2, RC, #21 | lsr CARG3, RC, #11 | asr RC, CARG2, #21 | lsr CARG2, CARG2, #21 | cmn RC, #1 | addeq CARG2, CARG2, #2 | bl extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits) | // Returns GCtab *. } else { | ldr CARG2, [KBASE, RC, lsl #2] | bl extern lj_tab_dup // (lua_State *L, Table *kt) | // Returns GCtab *. } | ldr BASE, L->base | mvn CARG2, #~LJ_TTAB | ins_next1 | ins_next2 | strd CARG12, [BASE, RA] | ins_next3 |5: | bl extern lj_gc_step_fixtop // (lua_State *L) | mov CARG1, L | b <1 break; case BC_GGET: | // RA = dst*8, RC = str_const (~) case BC_GSET: | // RA = dst*8, RC = str_const (~) | ldr LFUNC:CARG2, [BASE, FRAME_FUNC] | mvn RC, RC | ldr TAB:CARG1, LFUNC:CARG2->env | ldr STR:RC, [KBASE, RC, lsl #2] if (op == BC_GGET) { | b ->BC_TGETS_Z } else { | b ->BC_TSETS_Z } break; case BC_TGETV: | decode_RB8 RB, INS | decode_RC8 RC, INS | // RA = dst*8, RB = table*8, RC = key*8 | ldrd TAB:CARG12, [BASE, RB] | ldrd CARG34, [BASE, RC] | checktab CARG2, ->vmeta_tgetv // STALL: load CARG12. | checktp CARG4, LJ_TISNUM // Integer key? | ldreq CARG4, TAB:CARG1->array | ldreq CARG2, TAB:CARG1->asize | bne >9 | | add CARG4, CARG4, CARG3, lsl #3 | cmp CARG3, CARG2 // In array part? | ldrdlo CARG34, [CARG4] | bhs ->vmeta_tgetv | ins_next1 // Overwrites RB! | checktp CARG4, LJ_TNIL | beq >5 |1: | ins_next2 | strd CARG34, [BASE, RA] | ins_next3 | |5: // Check for __index if table value is nil. | ldr TAB:CARG2, TAB:CARG1->metatable | cmp TAB:CARG2, #0 | beq <1 // No metatable: done. | ldrb CARG2, TAB:CARG2->nomm | tst CARG2, #1<vmeta_tgetv | |9: | checktp CARG4, LJ_TSTR // String key? | moveq STR:RC, CARG3 | beq ->BC_TGETS_Z | b ->vmeta_tgetv break; case BC_TGETS: | decode_RB8 RB, INS | and RC, RC, #255 | // RA = dst*8, RB = table*8, RC = str_const (~) | ldrd CARG12, [BASE, RB] | mvn RC, RC | ldr STR:RC, [KBASE, RC, lsl #2] // STALL: early RC. | checktab CARG2, ->vmeta_tgets1 |->BC_TGETS_Z: | // (TAB:RB =) TAB:CARG1 = GCtab *, STR:RC = GCstr *, RA = dst*8 | ldr CARG3, TAB:CARG1->hmask | ldr CARG4, STR:RC->hash | ldr NODE:INS, TAB:CARG1->node | mov TAB:RB, TAB:CARG1 | and CARG3, CARG3, CARG4 // idx = str->hash & tab->hmask | add CARG3, CARG3, CARG3, lsl #1 | add NODE:INS, NODE:INS, CARG3, lsl #3 // node = tab->node + idx*3*8 |1: | ldrd CARG12, NODE:INS->key // STALL: early NODE:INS. | ldrd CARG34, NODE:INS->val | ldr NODE:INS, NODE:INS->next | checktp CARG2, LJ_TSTR | cmpeq CARG1, STR:RC | bne >4 | checktp CARG4, LJ_TNIL | beq >5 |3: | ins_next1 | ins_next2 | strd CARG34, [BASE, RA] | ins_next3 | |4: // Follow hash chain. | cmp NODE:INS, #0 | bne <1 | // End of hash chain: key not found, nil result. | |5: // Check for __index if table value is nil. | ldr TAB:CARG1, TAB:RB->metatable | mov CARG3, #0 // Optional clear of undef. value (during load stall). | mvn CARG4, #~LJ_TNIL | cmp TAB:CARG1, #0 | beq <3 // No metatable: done. | ldrb CARG2, TAB:CARG1->nomm | tst CARG2, #1<vmeta_tgets break; case BC_TGETB: | decode_RB8 RB, INS | and RC, RC, #255 | // RA = dst*8, RB = table*8, RC = index | ldrd CARG12, [BASE, RB] | checktab CARG2, ->vmeta_tgetb // STALL: load CARG12. | ldr CARG3, TAB:CARG1->asize | ldr CARG4, TAB:CARG1->array | lsl CARG2, RC, #3 | cmp RC, CARG3 | ldrdlo CARG34, [CARG4, CARG2] | bhs ->vmeta_tgetb | ins_next1 // Overwrites RB! | checktp CARG4, LJ_TNIL | beq >5 |1: | ins_next2 | strd CARG34, [BASE, RA] | ins_next3 | |5: // Check for __index if table value is nil. | ldr TAB:CARG2, TAB:CARG1->metatable | cmp TAB:CARG2, #0 | beq <1 // No metatable: done. | ldrb CARG2, TAB:CARG2->nomm | tst CARG2, #1<vmeta_tgetb break; case BC_TSETV: | decode_RB8 RB, INS | decode_RC8 RC, INS | // RA = src*8, RB = table*8, RC = key*8 | ldrd TAB:CARG12, [BASE, RB] | ldrd CARG34, [BASE, RC] | checktab CARG2, ->vmeta_tsetv // STALL: load CARG12. | checktp CARG4, LJ_TISNUM // Integer key? | ldreq CARG2, TAB:CARG1->array | ldreq CARG4, TAB:CARG1->asize | bne >9 | | add CARG2, CARG2, CARG3, lsl #3 | cmp CARG3, CARG4 // In array part? | ldrlo INS, [CARG2, #4] | bhs ->vmeta_tsetv | ins_next1 // Overwrites RB! | checktp INS, LJ_TNIL | ldrb INS, TAB:CARG1->marked | ldrd CARG34, [BASE, RA] | beq >5 |1: | tst INS, #LJ_GC_BLACK // isblack(table) | strd CARG34, [CARG2] | bne >7 |2: | ins_next2 | ins_next3 | |5: // Check for __newindex if previous value is nil. | ldr TAB:RA, TAB:CARG1->metatable | cmp TAB:RA, #0 | beq <1 // No metatable: done. | ldrb RA, TAB:RA->nomm | tst RA, #1<vmeta_tsetv | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:CARG1, INS, CARG3 | b <2 | |9: | checktp CARG4, LJ_TSTR // String key? | moveq STR:RC, CARG3 | beq ->BC_TSETS_Z | b ->vmeta_tsetv break; case BC_TSETS: | decode_RB8 RB, INS | and RC, RC, #255 | // RA = src*8, RB = table*8, RC = str_const (~) | ldrd CARG12, [BASE, RB] | mvn RC, RC | ldr STR:RC, [KBASE, RC, lsl #2] // STALL: early RC. | checktab CARG2, ->vmeta_tsets1 |->BC_TSETS_Z: | // (TAB:RB =) TAB:CARG1 = GCtab *, STR:RC = GCstr *, RA = dst*8 | ldr CARG3, TAB:CARG1->hmask | ldr CARG4, STR:RC->hash | ldr NODE:INS, TAB:CARG1->node | mov TAB:RB, TAB:CARG1 | and CARG3, CARG3, CARG4 // idx = str->hash & tab->hmask | add CARG3, CARG3, CARG3, lsl #1 | mov CARG4, #0 | add NODE:INS, NODE:INS, CARG3, lsl #3 // node = tab->node + idx*3*8 | strb CARG4, TAB:RB->nomm // Clear metamethod cache. |1: | ldrd CARG12, NODE:INS->key | ldr CARG4, NODE:INS->val.it | ldr NODE:CARG3, NODE:INS->next | checktp CARG2, LJ_TSTR | cmpeq CARG1, STR:RC | bne >5 | ldrb CARG2, TAB:RB->marked | checktp CARG4, LJ_TNIL // Key found, but nil value? | ldrd CARG34, [BASE, RA] | beq >4 |2: | tst CARG2, #LJ_GC_BLACK // isblack(table) | strd CARG34, NODE:INS->val | bne >7 |3: | ins_next | |4: // Check for __newindex if previous value is nil. | ldr TAB:CARG1, TAB:RB->metatable | cmp TAB:CARG1, #0 | beq <2 // No metatable: done. | ldrb CARG1, TAB:CARG1->nomm | tst CARG1, #1<vmeta_tsets | |5: // Follow hash chain. | movs NODE:INS, NODE:CARG3 | bne <1 | // End of hash chain: key not found, add a new one. | | // But check for __newindex first. | ldr TAB:CARG1, TAB:RB->metatable | mov CARG3, TMPDp | str PC, SAVE_PC | cmp TAB:CARG1, #0 // No metatable: continue. | str BASE, L->base | ldrbne CARG2, TAB:CARG1->nomm | mov CARG1, L | beq >6 | tst CARG2, #1<vmeta_tsets // 'no __newindex' flag NOT set: check. |6: | mvn CARG4, #~LJ_TSTR | str STR:RC, TMPDlo | mov CARG2, TAB:RB | str CARG4, TMPDhi | bl extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k) | // Returns TValue *. | ldr BASE, L->base | ldrd CARG34, [BASE, RA] | strd CARG34, [CRET1] | b <3 // No 2nd write barrier needed. | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, CARG2, CARG3 | b <3 break; case BC_TSETB: | decode_RB8 RB, INS | and RC, RC, #255 | // RA = src*8, RB = table*8, RC = index | ldrd CARG12, [BASE, RB] | checktab CARG2, ->vmeta_tsetb // STALL: load CARG12. | ldr CARG3, TAB:CARG1->asize | ldr RB, TAB:CARG1->array | lsl CARG2, RC, #3 | cmp RC, CARG3 | ldrdlo CARG34, [CARG2, RB]! | bhs ->vmeta_tsetb | ins_next1 // Overwrites RB! | checktp CARG4, LJ_TNIL | ldrb INS, TAB:CARG1->marked | ldrd CARG34, [BASE, RA] | beq >5 |1: | tst INS, #LJ_GC_BLACK // isblack(table) | strd CARG34, [CARG2] | bne >7 |2: | ins_next2 | ins_next3 | |5: // Check for __newindex if previous value is nil. | ldr TAB:RA, TAB:CARG1->metatable | cmp TAB:RA, #0 | beq <1 // No metatable: done. | ldrb RA, TAB:RA->nomm | tst RA, #1<vmeta_tsetb | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:CARG1, INS, CARG3 | b <2 break; case BC_TSETM: | // RA = base*8 (table at base-1), RC = num_const (start index) | add RA, BASE, RA |1: | ldr RB, SAVE_MULTRES | ldr TAB:CARG2, [RA, #-8] // Guaranteed to be a table. | ldr CARG1, [KBASE, RC, lsl #3] // Integer constant is in lo-word. | subs RB, RB, #8 | ldr CARG4, TAB:CARG2->asize | beq >4 // Nothing to copy? | add CARG3, CARG1, RB, lsr #3 | cmp CARG3, CARG4 | ldr CARG4, TAB:CARG2->array | add RB, RA, RB | bhi >5 | add INS, CARG4, CARG1, lsl #3 | ldrb CARG1, TAB:CARG2->marked |3: // Copy result slots to table. | ldrd CARG34, [RA], #8 | strd CARG34, [INS], #8 | cmp RA, RB | blo <3 | tst CARG1, #LJ_GC_BLACK // isblack(table) | bne >7 |4: | ins_next | |5: // Need to resize array part. | str BASE, L->base | mov CARG1, L | str PC, SAVE_PC | bl extern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize) | // Must not reallocate the stack. | .IOS ldr BASE, L->base | b <1 | |7: // Possible table write barrier for any value. Skip valiswhite check. | barrierback TAB:CARG2, CARG1, CARG3 | b <4 break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALLM: | // RA = base*8, (RB = nresults+1,) RC = extra_nargs | ldr CARG1, SAVE_MULTRES | decode_RC8 NARGS8:RC, INS | add NARGS8:RC, NARGS8:RC, CARG1 | b ->BC_CALL_Z break; case BC_CALL: | decode_RC8 NARGS8:RC, INS | // RA = base*8, (RB = nresults+1,) RC = (nargs+1)*8 |->BC_CALL_Z: | mov RB, BASE // Save old BASE for vmeta_call. | ldrd CARG34, [BASE, RA]! | sub NARGS8:RC, NARGS8:RC, #8 | add BASE, BASE, #8 | checkfunc CARG4, ->vmeta_call | ins_call break; case BC_CALLMT: | // RA = base*8, (RB = 0,) RC = extra_nargs | ldr CARG1, SAVE_MULTRES | add NARGS8:RC, CARG1, RC, lsl #3 | b ->BC_CALLT1_Z break; case BC_CALLT: | lsl NARGS8:RC, RC, #3 | // RA = base*8, (RB = 0,) RC = (nargs+1)*8 |->BC_CALLT1_Z: | ldrd LFUNC:CARG34, [RA, BASE]! | sub NARGS8:RC, NARGS8:RC, #8 | add RA, RA, #8 | checkfunc CARG4, ->vmeta_callt | ldr PC, [BASE, FRAME_PC] |->BC_CALLT2_Z: | mov RB, #0 | ldrb CARG4, LFUNC:CARG3->ffid | tst PC, #FRAME_TYPE | bne >7 |1: | str LFUNC:CARG3, [BASE, FRAME_FUNC] // Copy function down, but keep PC. | cmp NARGS8:RC, #0 | beq >3 |2: | ldrd CARG12, [RA, RB] | add INS, RB, #8 | cmp INS, NARGS8:RC | strd CARG12, [BASE, RB] | mov RB, INS | bne <2 |3: | cmp CARG4, #1 // (> FF_C) Calling a fast function? | bhi >5 |4: | ins_callt | |5: // Tailcall to a fast function with a Lua frame below. | ldr INS, [PC, #-4] | decode_RA8 RA, INS | sub CARG1, BASE, RA | ldr LFUNC:CARG1, [CARG1, #-16] | ldr CARG1, LFUNC:CARG1->field_pc | ldr KBASE, [CARG1, #PC2PROTO(k)] | b <4 | |7: // Tailcall from a vararg function. | eor PC, PC, #FRAME_VARG | tst PC, #FRAME_TYPEP // Vararg frame below? | movne CARG4, #0 // Clear ffid if no Lua function below. | bne <1 | sub BASE, BASE, PC | ldr PC, [BASE, FRAME_PC] | tst PC, #FRAME_TYPE | movne CARG4, #0 // Clear ffid if no Lua function below. | b <1 break; case BC_ITERC: | // RA = base*8, (RB = nresults+1, RC = nargs+1 (2+1)) | add RA, BASE, RA | mov RB, BASE // Save old BASE for vmeta_call. | ldrd CARG34, [RA, #-16] | ldrd CARG12, [RA, #-8] | add BASE, RA, #8 | strd CARG34, [RA, #8] // Copy state. | strd CARG12, [RA, #16] // Copy control var. | // STALL: locked CARG34. | ldrd LFUNC:CARG34, [RA, #-24] | mov NARGS8:RC, #16 // Iterators get 2 arguments. | // STALL: load CARG34. | strd LFUNC:CARG34, [RA] // Copy callable. | checkfunc CARG4, ->vmeta_call | ins_call break; case BC_ITERN: | // RA = base*8, (RB = nresults+1, RC = nargs+1 (2+1)) |.if JIT | // NYI: add hotloop, record BC_ITERN. |.endif | add RA, BASE, RA | ldr TAB:RB, [RA, #-16] | ldr CARG1, [RA, #-8] // Get index from control var. | ldr INS, TAB:RB->asize | ldr CARG2, TAB:RB->array | add PC, PC, #4 |1: // Traverse array part. | subs RC, CARG1, INS | add CARG3, CARG2, CARG1, lsl #3 | bhs >5 // Index points after array part? | ldrd CARG34, [CARG3] | checktp CARG4, LJ_TNIL | addeq CARG1, CARG1, #1 // Skip holes in array part. | beq <1 | ldrh RC, [PC, #-2] | mvn CARG2, #~LJ_TISNUM | strd CARG34, [RA, #8] | add RC, PC, RC, lsl #2 | add RB, CARG1, #1 | strd CARG12, [RA] | sub PC, RC, #0x20000 | str RB, [RA, #-8] // Update control var. |3: | ins_next | |5: // Traverse hash part. | ldr CARG4, TAB:RB->hmask | ldr NODE:RB, TAB:RB->node |6: | add CARG1, RC, RC, lsl #1 | cmp RC, CARG4 // End of iteration? Branch to ITERL+1. | add NODE:CARG3, NODE:RB, CARG1, lsl #3 // node = tab->node + idx*3*8 | bhi <3 | ldrd CARG12, NODE:CARG3->val | checktp CARG2, LJ_TNIL | add RC, RC, #1 | beq <6 // Skip holes in hash part. | ldrh RB, [PC, #-2] | add RC, RC, INS | ldrd CARG34, NODE:CARG3->key | str RC, [RA, #-8] // Update control var. | strd CARG12, [RA, #8] | add RC, PC, RB, lsl #2 | sub PC, RC, #0x20000 | strd CARG34, [RA] | b <3 break; case BC_ISNEXT: | // RA = base*8, RC = target (points to ITERN) | add RA, BASE, RA | add RC, PC, RC, lsl #2 | ldrd CFUNC:CARG12, [RA, #-24] | ldr CARG3, [RA, #-12] | ldr CARG4, [RA, #-4] | checktp CARG2, LJ_TFUNC | ldrbeq CARG1, CFUNC:CARG1->ffid | checktpeq CARG3, LJ_TTAB | checktpeq CARG4, LJ_TNIL | cmpeq CARG1, #FF_next_N | subeq PC, RC, #0x20000 | bne >5 | ins_next1 | ins_next2 | mov CARG1, #0 | mvn CARG2, #0x00018000 | strd CARG1, [RA, #-8] // Initialize control var. |1: | ins_next3 |5: // Despecialize bytecode if any of the checks fail. | mov CARG1, #BC_JMP | mov OP, #BC_ITERC | strb CARG1, [PC, #-4] | sub PC, RC, #0x20000 | strb OP, [PC] // Subsumes ins_next1. | ins_next2 | b <1 break; case BC_VARG: | decode_RB8 RB, INS | decode_RC8 RC, INS | // RA = base*8, RB = (nresults+1)*8, RC = numparams*8 | ldr CARG1, [BASE, FRAME_PC] | add RC, BASE, RC | add RA, BASE, RA | add RC, RC, #FRAME_VARG | add CARG4, RA, RB | sub CARG3, BASE, #8 // CARG3 = vtop | sub RC, RC, CARG1 // RC = vbase | // Note: RC may now be even _above_ BASE if nargs was < numparams. | cmp RB, #0 | sub CARG1, CARG3, RC | beq >5 // Copy all varargs? | sub CARG4, CARG4, #16 |1: // Copy vararg slots to destination slots. | cmp RC, CARG3 | ldrdlo CARG12, [RC], #8 | mvnhs CARG2, #~LJ_TNIL | cmp RA, CARG4 | strd CARG12, [RA], #8 | blo <1 |2: | ins_next | |5: // Copy all varargs. | ldr CARG4, L->maxstack | cmp CARG1, #0 | movle RB, #8 // MULTRES = (0+1)*8 | addgt RB, CARG1, #8 | add CARG2, RA, CARG1 | str RB, SAVE_MULTRES | ble <2 | cmp CARG2, CARG4 | bhi >7 |6: | ldrd CARG12, [RC], #8 | strd CARG12, [RA], #8 | cmp RC, CARG3 | blo <6 | b <2 | |7: // Grow stack for varargs. | lsr CARG2, CARG1, #3 | str RA, L->top | mov CARG1, L | str BASE, L->base | sub RC, RC, BASE // Need delta, because BASE may change. | str PC, SAVE_PC | sub RA, RA, BASE | bl extern lj_state_growstack // (lua_State *L, int n) | ldr BASE, L->base | add RA, BASE, RA | add RC, BASE, RC | sub CARG3, BASE, #8 | b <6 break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: | // RA = results*8, RC = extra results | ldr CARG1, SAVE_MULTRES | ldr PC, [BASE, FRAME_PC] | add RA, BASE, RA | add RC, CARG1, RC, lsl #3 | b ->BC_RETM_Z break; case BC_RET: | // RA = results*8, RC = nresults+1 | ldr PC, [BASE, FRAME_PC] | lsl RC, RC, #3 | add RA, BASE, RA |->BC_RETM_Z: | str RC, SAVE_MULTRES |1: | ands CARG1, PC, #FRAME_TYPE | eor CARG2, PC, #FRAME_VARG | bne ->BC_RETV2_Z | |->BC_RET_Z: | // BASE = base, RA = resultptr, RC = (nresults+1)*8, PC = return | ldr INS, [PC, #-4] | subs CARG4, RC, #8 | sub CARG3, BASE, #8 | beq >3 |2: | ldrd CARG12, [RA], #8 | add BASE, BASE, #8 | subs CARG4, CARG4, #8 | strd CARG12, [BASE, #-16] | bne <2 |3: | decode_RA8 RA, INS | sub CARG4, CARG3, RA | decode_RB8 RB, INS | ldr LFUNC:CARG1, [CARG4, FRAME_FUNC] |5: | cmp RB, RC // More results expected? | bhi >6 | mov BASE, CARG4 | ldr CARG2, LFUNC:CARG1->field_pc | ins_next1 | ins_next2 | ldr KBASE, [CARG2, #PC2PROTO(k)] | ins_next3 | |6: // Fill up results with nil. | mvn CARG2, #~LJ_TNIL | add BASE, BASE, #8 | add RC, RC, #8 | str CARG2, [BASE, #-12] | b <5 | |->BC_RETV1_Z: // Non-standard return case. | add RA, BASE, RA |->BC_RETV2_Z: | tst CARG2, #FRAME_TYPEP | bne ->vm_return | // Return from vararg function: relocate BASE down. | sub BASE, BASE, CARG2 | ldr PC, [BASE, FRAME_PC] | b <1 break; case BC_RET0: case BC_RET1: | // RA = results*8, RC = nresults+1 | ldr PC, [BASE, FRAME_PC] | lsl RC, RC, #3 | str RC, SAVE_MULTRES | ands CARG1, PC, #FRAME_TYPE | eor CARG2, PC, #FRAME_VARG | ldreq INS, [PC, #-4] | bne ->BC_RETV1_Z if (op == BC_RET1) { | ldrd CARG12, [BASE, RA] } | sub CARG4, BASE, #8 | decode_RA8 RA, INS if (op == BC_RET1) { | strd CARG12, [CARG4] } | sub BASE, CARG4, RA | decode_RB8 RB, INS | ldr LFUNC:CARG1, [BASE, FRAME_FUNC] |5: | cmp RB, RC | bhi >6 | ldr CARG2, LFUNC:CARG1->field_pc | ins_next1 | ins_next2 | ldr KBASE, [CARG2, #PC2PROTO(k)] | ins_next3 | |6: // Fill up results with nil. | sub CARG2, CARG4, #4 | mvn CARG3, #~LJ_TNIL | str CARG3, [CARG2, RC] | add RC, RC, #8 | b <5 break; /* -- Loops and branches ------------------------------------------------ */ |.define FOR_IDX, [RA]; .define FOR_TIDX, [RA, #4] |.define FOR_STOP, [RA, #8]; .define FOR_TSTOP, [RA, #12] |.define FOR_STEP, [RA, #16]; .define FOR_TSTEP, [RA, #20] |.define FOR_EXT, [RA, #24]; .define FOR_TEXT, [RA, #28] case BC_FORL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IFORL follows. break; case BC_JFORI: case BC_JFORL: #if !LJ_HASJIT break; #endif case BC_FORI: case BC_IFORL: | // RA = base*8, RC = target (after end of loop or start of loop) vk = (op == BC_IFORL || op == BC_JFORL); | ldrd CARG12, [RA, BASE]! if (op != BC_JFORL) { | add RC, PC, RC, lsl #2 } if (!vk) { | ldrd CARG34, FOR_STOP | checktp CARG2, LJ_TISNUM | ldr RB, FOR_TSTEP | bne >5 | checktp CARG4, LJ_TISNUM | ldr CARG4, FOR_STEP | checktpeq RB, LJ_TISNUM | bne ->vmeta_for | cmp CARG4, #0 | blt >4 | cmp CARG1, CARG3 } else { | ldrd CARG34, FOR_STEP | checktp CARG2, LJ_TISNUM | bne >5 | adds CARG1, CARG1, CARG3 | ldr CARG4, FOR_STOP if (op == BC_IFORL) { | addvs RC, PC, #0x20000 // Overflow: prevent branch. } else { | bvs >2 // Overflow: do not enter mcode. } | cmp CARG3, #0 | blt >4 | cmp CARG1, CARG4 } |1: if (op == BC_FORI) { | subgt PC, RC, #0x20000 } else if (op == BC_JFORI) { | sub PC, RC, #0x20000 | ldrhle RC, [PC, #-2] } else if (op == BC_IFORL) { | suble PC, RC, #0x20000 } if (vk) { | strd CARG12, FOR_IDX } |2: | ins_next1 | ins_next2 | strd CARG12, FOR_EXT if (op == BC_JFORI || op == BC_JFORL) { | ble =>BC_JLOOP } |3: | ins_next3 | |4: // Invert check for negative step. if (!vk) { | cmp CARG3, CARG1 } else { | cmp CARG4, CARG1 } | b <1 | |5: // FP loop. if (!vk) { | cmnlo CARG4, #-LJ_TISNUM | cmnlo RB, #-LJ_TISNUM | bhs ->vmeta_for |.if FPU | vldr d0, FOR_IDX | vldr d1, FOR_STOP | cmp RB, #0 | vstr d0, FOR_EXT |.else | cmp RB, #0 | strd CARG12, FOR_EXT | blt >8 |.endif } else { |.if FPU | vldr d0, FOR_IDX | vldr d2, FOR_STEP | vldr d1, FOR_STOP | cmp CARG4, #0 | vadd.f64 d0, d0, d2 |.else | cmp CARG4, #0 | blt >8 | bl extern __aeabi_dadd | strd CARG12, FOR_IDX | ldrd CARG34, FOR_STOP | strd CARG12, FOR_EXT |.endif } |6: |.if FPU | vcmpge.f64 d0, d1 | vcmplt.f64 d1, d0 | vmrs |.else | bl extern __aeabi_cdcmple |.endif if (vk) { |.if FPU | vstr d0, FOR_IDX | vstr d0, FOR_EXT |.endif } if (op == BC_FORI) { | subhi PC, RC, #0x20000 } else if (op == BC_JFORI) { | sub PC, RC, #0x20000 | ldrhls RC, [PC, #-2] | bls =>BC_JLOOP } else if (op == BC_IFORL) { | subls PC, RC, #0x20000 } else { | bls =>BC_JLOOP } | ins_next1 | ins_next2 | b <3 | |.if not FPU |8: // Invert check for negative step. if (vk) { | bl extern __aeabi_dadd | strd CARG12, FOR_IDX | strd CARG12, FOR_EXT } | mov CARG3, CARG1 | mov CARG4, CARG2 | ldrd CARG12, FOR_STOP | b <6 |.endif break; case BC_ITERL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IITERL follows. break; case BC_JITERL: #if !LJ_HASJIT break; #endif case BC_IITERL: | // RA = base*8, RC = target | ldrd CARG12, [RA, BASE]! if (op == BC_JITERL) { | cmn CARG2, #-LJ_TNIL // Stop if iterator returned nil. | strdne CARG12, [RA, #-8] | bne =>BC_JLOOP } else { | add RC, PC, RC, lsl #2 | // STALL: load CARG12. | cmn CARG2, #-LJ_TNIL // Stop if iterator returned nil. | subne PC, RC, #0x20000 // Otherwise save control var + branch. | strdne CARG12, [RA, #-8] } | ins_next break; case BC_LOOP: | // RA = base*8, RC = target (loop extent) | // Note: RA/RC is only used by trace recorder to determine scope/extent | // This opcode does NOT jump, it's only purpose is to detect a hot loop. |.if JIT | hotloop |.endif | // Fall through. Assumes BC_ILOOP follows. break; case BC_ILOOP: | // RA = base*8, RC = target (loop extent) | ins_next break; case BC_JLOOP: |.if JIT | // RA = base (ignored), RC = traceno | ldr CARG1, [DISPATCH, #DISPATCH_J(trace)] | mov CARG2, #0 // Traces on ARM don't store the trace number, so use 0. | ldr TRACE:RC, [CARG1, RC, lsl #2] | st_vmstate CARG2 | ldr RA, TRACE:RC->mcode | str BASE, [DISPATCH, #DISPATCH_GL(jit_base)] | str L, [DISPATCH, #DISPATCH_GL(jit_L)] | bx RA |.endif break; case BC_JMP: | // RA = base*8 (only used by trace recorder), RC = target | add RC, PC, RC, lsl #2 | sub PC, RC, #0x20000 | ins_next break; /* -- Function headers -------------------------------------------------- */ case BC_FUNCF: |.if JIT | hotcall |.endif case BC_FUNCV: /* NYI: compiled vararg functions. */ | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow. break; case BC_JFUNCF: #if !LJ_HASJIT break; #endif case BC_IFUNCF: | // BASE = new base, RA = BASE+framesize*8, CARG3 = LFUNC, RC = nargs*8 | ldr CARG1, L->maxstack | ldrb CARG2, [PC, #-4+PC2PROTO(numparams)] | ldr KBASE, [PC, #-4+PC2PROTO(k)] | cmp RA, CARG1 | bhi ->vm_growstack_l if (op != BC_JFUNCF) { | ins_next1 | ins_next2 } |2: | cmp NARGS8:RC, CARG2, lsl #3 // Check for missing parameters. | mvn CARG4, #~LJ_TNIL | blo >3 if (op == BC_JFUNCF) { | decode_RD RC, INS | b =>BC_JLOOP } else { | ins_next3 } | |3: // Clear missing parameters. | strd CARG34, [BASE, NARGS8:RC] | add NARGS8:RC, NARGS8:RC, #8 | b <2 break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif | NYI // NYI: compiled vararg functions break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: | // BASE = new base, RA = BASE+framesize*8, CARG3 = LFUNC, RC = nargs*8 | ldr CARG1, L->maxstack | add CARG4, BASE, RC | add RA, RA, RC | str LFUNC:CARG3, [CARG4] // Store copy of LFUNC. | add CARG2, RC, #8+FRAME_VARG | ldr KBASE, [PC, #-4+PC2PROTO(k)] | cmp RA, CARG1 | str CARG2, [CARG4, #4] // Store delta + FRAME_VARG. | bhs ->vm_growstack_l | ldrb RB, [PC, #-4+PC2PROTO(numparams)] | mov RA, BASE | mov RC, CARG4 | cmp RB, #0 | add BASE, CARG4, #8 | beq >3 | mvn CARG3, #~LJ_TNIL |1: | cmp RA, RC // Less args than parameters? | ldrdlo CARG12, [RA], #8 | movhs CARG2, CARG3 | strlo CARG3, [RA, #-4] // Clear old fixarg slot (help the GC). |2: | subs RB, RB, #1 | strd CARG12, [CARG4, #8]! | bne <1 |3: | ins_next break; case BC_FUNCC: case BC_FUNCCW: | // BASE = new base, RA = BASE+framesize*8, CARG3 = CFUNC, RC = nargs*8 if (op == BC_FUNCC) { | ldr CARG4, CFUNC:CARG3->f } else { | ldr CARG4, [DISPATCH, #DISPATCH_GL(wrapf)] } | add CARG2, RA, NARGS8:RC | ldr CARG1, L->maxstack | add RC, BASE, NARGS8:RC | str BASE, L->base | cmp CARG2, CARG1 | str RC, L->top if (op == BC_FUNCCW) { | ldr CARG2, CFUNC:CARG3->f } | mv_vmstate CARG3, C | mov CARG1, L | bhi ->vm_growstack_c // Need to grow stack. | st_vmstate CARG3 | blx CARG4 // (lua_State *L [, lua_CFunction f]) | // Returns nresults. | ldr BASE, L->base | mv_vmstate CARG3, INTERP | ldr CRET2, L->top | lsl RC, CRET1, #3 | st_vmstate CARG3 | ldr PC, [BASE, FRAME_PC] | sub RA, CRET2, RC // RA = L->top - nresults*8 | b ->vm_returnc break; /* ---------------------------------------------------------------------- */ default: fprintf(stderr, "Error: undefined opcode BC_%s\n", bc_names[op]); exit(2); break; } } static int build_backend(BuildCtx *ctx) { int op; dasm_growpc(Dst, BC__MAX); build_subroutines(ctx); |.code_op for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op); return BC__MAX; } /* Emit pseudo frame-info for all assembler functions. */ static void emit_asm_debug(BuildCtx *ctx) { int fcofs = (int)((uint8_t *)ctx->glob[GLOB_vm_ffi_call] - ctx->code); int i; switch (ctx->mode) { case BUILD_elfasm: fprintf(ctx->fp, "\t.section .debug_frame,\"\",%%progbits\n"); fprintf(ctx->fp, ".Lframe0:\n" "\t.long .LECIE0-.LSCIE0\n" ".LSCIE0:\n" "\t.long 0xffffffff\n" "\t.byte 0x1\n" "\t.string \"\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 0xe\n" /* Return address is in lr. */ "\t.byte 0xc\n\t.uleb128 0xd\n\t.uleb128 0\n" /* def_cfa sp */ "\t.align 2\n" ".LECIE0:\n\n"); fprintf(ctx->fp, ".LSFDE0:\n" "\t.long .LEFDE0-.LASFDE0\n" ".LASFDE0:\n" "\t.long .Lframe0\n" "\t.long .Lbegin\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */ "\t.byte 0x8e\n\t.uleb128 1\n", /* offset lr */ fcofs, CFRAME_SIZE); for (i = 11; i >= (LJ_ARCH_HASFPU ? 5 : 4); i--) /* offset r4-r11 */ fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+i, 2+(11-i)); #if LJ_ARCH_HASFPU for (i = 15; i >= 8; i--) /* offset d8-d15 */ fprintf(ctx->fp, "\t.byte 5\n\t.uleb128 %d, %d\n", 64+2*i, 10+2*(15-i)); fprintf(ctx->fp, "\t.byte 0x84\n\t.uleb128 %d\n", 25); /* offset r4 */ #endif fprintf(ctx->fp, "\t.align 2\n" ".LEFDE0:\n\n"); #if LJ_HASFFI fprintf(ctx->fp, ".LSFDE1:\n" "\t.long .LEFDE1-.LASFDE1\n" ".LASFDE1:\n" "\t.long .Lframe0\n" "\t.long lj_vm_ffi_call\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 16\n" /* def_cfa_offset */ "\t.byte 0x8e\n\t.uleb128 1\n" /* offset lr */ "\t.byte 0x8b\n\t.uleb128 2\n" /* offset r11 */ "\t.byte 0x85\n\t.uleb128 3\n" /* offset r5 */ "\t.byte 0x84\n\t.uleb128 4\n" /* offset r4 */ "\t.byte 0xd\n\t.uleb128 0xb\n" /* def_cfa_register r11 */ "\t.align 2\n" ".LEFDE1:\n\n", (int)ctx->codesz - fcofs); #endif break; default: break; } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cdata.c0000664000000000000000000002065012202141143022266 0ustar rootroot/* ** C data management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_ctype.h" #include "lj_cconv.h" #include "lj_cdata.h" /* -- C data allocation --------------------------------------------------- */ /* Allocate a new C data object holding a reference to another object. */ GCcdata *lj_cdata_newref(CTState *cts, const void *p, CTypeID id) { CTypeID refid = lj_ctype_intern(cts, CTINFO_REF(id), CTSIZE_PTR); GCcdata *cd = lj_cdata_new(cts, refid, CTSIZE_PTR); *(const void **)cdataptr(cd) = p; return cd; } /* Allocate variable-sized or specially aligned C data object. */ GCcdata *lj_cdata_newv(CTState *cts, CTypeID id, CTSize sz, CTSize align) { global_State *g; MSize extra = sizeof(GCcdataVar) + sizeof(GCcdata) + (align > CT_MEMALIGN ? (1u<L, extra + sz, char); uintptr_t adata = (uintptr_t)p + sizeof(GCcdataVar) + sizeof(GCcdata); uintptr_t almask = (1u << align) - 1u; GCcdata *cd = (GCcdata *)(((adata + almask) & ~almask) - sizeof(GCcdata)); lua_assert((char *)cd - p < 65536); cdatav(cd)->offset = (uint16_t)((char *)cd - p); cdatav(cd)->extra = extra; cdatav(cd)->len = sz; g = cts->g; setgcrefr(cd->nextgc, g->gc.root); setgcref(g->gc.root, obj2gco(cd)); newwhite(g, obj2gco(cd)); cd->marked |= 0x80; cd->gct = ~LJ_TCDATA; cd->ctypeid = id; return cd; } /* Free a C data object. */ void LJ_FASTCALL lj_cdata_free(global_State *g, GCcdata *cd) { if (LJ_UNLIKELY(cd->marked & LJ_GC_CDATA_FIN)) { GCobj *root; makewhite(g, obj2gco(cd)); markfinalized(obj2gco(cd)); if ((root = gcref(g->gc.mmudata)) != NULL) { setgcrefr(cd->nextgc, root->gch.nextgc); setgcref(root->gch.nextgc, obj2gco(cd)); setgcref(g->gc.mmudata, obj2gco(cd)); } else { setgcref(cd->nextgc, obj2gco(cd)); setgcref(g->gc.mmudata, obj2gco(cd)); } } else if (LJ_LIKELY(!cdataisv(cd))) { CType *ct = ctype_raw(ctype_ctsG(g), cd->ctypeid); CTSize sz = ctype_hassize(ct->info) ? ct->size : CTSIZE_PTR; lua_assert(ctype_hassize(ct->info) || ctype_isfunc(ct->info) || ctype_isextern(ct->info)); lj_mem_free(g, cd, sizeof(GCcdata) + sz); } else { lj_mem_free(g, memcdatav(cd), sizecdatav(cd)); } } TValue * LJ_FASTCALL lj_cdata_setfin(lua_State *L, GCcdata *cd) { global_State *g = G(L); GCtab *t = ctype_ctsG(g)->finalizer; if (gcref(t->metatable)) { /* Add cdata to finalizer table, if still enabled. */ TValue *tv, tmp; setcdataV(L, &tmp, cd); lj_gc_anybarriert(L, t); tv = lj_tab_set(L, t, &tmp); cd->marked |= LJ_GC_CDATA_FIN; return tv; } else { /* Otherwise return dummy TValue. */ return &g->tmptv; } } /* -- C data indexing ----------------------------------------------------- */ /* Index C data by a TValue. Return CType and pointer. */ CType *lj_cdata_index(CTState *cts, GCcdata *cd, cTValue *key, uint8_t **pp, CTInfo *qual) { uint8_t *p = (uint8_t *)cdataptr(cd); CType *ct = ctype_get(cts, cd->ctypeid); ptrdiff_t idx; /* Resolve reference for cdata object. */ if (ctype_isref(ct->info)) { lua_assert(ct->size == CTSIZE_PTR); p = *(uint8_t **)p; ct = ctype_child(cts, ct); } collect_attrib: /* Skip attributes and collect qualifiers. */ while (ctype_isattrib(ct->info)) { if (ctype_attrib(ct->info) == CTA_QUAL) *qual |= ct->size; ct = ctype_child(cts, ct); } lua_assert(!ctype_isref(ct->info)); /* Interning rejects refs to refs. */ if (tvisint(key)) { idx = (ptrdiff_t)intV(key); goto integer_key; } else if (tvisnum(key)) { /* Numeric key. */ idx = LJ_64 ? (ptrdiff_t)numV(key) : (ptrdiff_t)lj_num2int(numV(key)); integer_key: if (ctype_ispointer(ct->info)) { CTSize sz = lj_ctype_size(cts, ctype_cid(ct->info)); /* Element size. */ if (sz != CTSIZE_INVALID) { if (ctype_isptr(ct->info)) { p = (uint8_t *)cdata_getptr(p, ct->size); } else if ((ct->info & (CTF_VECTOR|CTF_COMPLEX))) { if ((ct->info & CTF_COMPLEX)) idx &= 1; *qual |= CTF_CONST; /* Valarray elements are constant. */ } *pp = p + idx*(int32_t)sz; return ct; } } } else if (tviscdata(key)) { /* Integer cdata key. */ GCcdata *cdk = cdataV(key); CType *ctk = ctype_raw(cts, cdk->ctypeid); if (ctype_isenum(ctk->info)) ctk = ctype_child(cts, ctk); if (ctype_isinteger(ctk->info)) { lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ctk, (uint8_t *)&idx, cdataptr(cdk), 0); goto integer_key; } } else if (tvisstr(key)) { /* String key. */ GCstr *name = strV(key); if (ctype_isstruct(ct->info)) { CTSize ofs; CType *fct = lj_ctype_getfieldq(cts, ct, name, &ofs, qual); if (fct) { *pp = p + ofs; return fct; } } else if (ctype_iscomplex(ct->info)) { if (name->len == 2) { *qual |= CTF_CONST; /* Complex fields are constant. */ if (strdata(name)[0] == 'r' && strdata(name)[1] == 'e') { *pp = p; return ct; } else if (strdata(name)[0] == 'i' && strdata(name)[1] == 'm') { *pp = p + (ct->size >> 1); return ct; } } } else if (cd->ctypeid == CTID_CTYPEID) { /* Allow indexing a (pointer to) struct constructor to get constants. */ CType *sct = ctype_raw(cts, *(CTypeID *)p); if (ctype_isptr(sct->info)) sct = ctype_rawchild(cts, sct); if (ctype_isstruct(sct->info)) { CTSize ofs; CType *fct = lj_ctype_getfield(cts, sct, name, &ofs); if (fct && ctype_isconstval(fct->info)) return fct; } ct = sct; /* Allow resolving metamethods for constructors, too. */ } } if (ctype_isptr(ct->info)) { /* Automatically perform '->'. */ if (ctype_isstruct(ctype_rawchild(cts, ct)->info)) { p = (uint8_t *)cdata_getptr(p, ct->size); ct = ctype_child(cts, ct); goto collect_attrib; } } *qual |= 1; /* Lookup failed. */ return ct; /* But return the resolved raw type. */ } /* -- C data getters ------------------------------------------------------ */ /* Get constant value and convert to TValue. */ static void cdata_getconst(CTState *cts, TValue *o, CType *ct) { CType *ctt = ctype_child(cts, ct); lua_assert(ctype_isinteger(ctt->info) && ctt->size <= 4); /* Constants are already zero-extended/sign-extended to 32 bits. */ if ((ctt->info & CTF_UNSIGNED) && (int32_t)ct->size < 0) setnumV(o, (lua_Number)(uint32_t)ct->size); else setintV(o, (int32_t)ct->size); } /* Get C data value and convert to TValue. */ int lj_cdata_get(CTState *cts, CType *s, TValue *o, uint8_t *sp) { CTypeID sid; if (ctype_isconstval(s->info)) { cdata_getconst(cts, o, s); return 0; /* No GC step needed. */ } else if (ctype_isbitfield(s->info)) { return lj_cconv_tv_bf(cts, s, o, sp); } /* Get child type of pointer/array/field. */ lua_assert(ctype_ispointer(s->info) || ctype_isfield(s->info)); sid = ctype_cid(s->info); s = ctype_get(cts, sid); /* Resolve reference for field. */ if (ctype_isref(s->info)) { lua_assert(s->size == CTSIZE_PTR); sp = *(uint8_t **)sp; sid = ctype_cid(s->info); s = ctype_get(cts, sid); } /* Skip attributes. */ while (ctype_isattrib(s->info)) s = ctype_child(cts, s); return lj_cconv_tv_ct(cts, s, sid, o, sp); } /* -- C data setters ------------------------------------------------------ */ /* Convert TValue and set C data value. */ void lj_cdata_set(CTState *cts, CType *d, uint8_t *dp, TValue *o, CTInfo qual) { if (ctype_isconstval(d->info)) { goto err_const; } else if (ctype_isbitfield(d->info)) { if (((d->info|qual) & CTF_CONST)) goto err_const; lj_cconv_bf_tv(cts, d, dp, o); return; } /* Get child type of pointer/array/field. */ lua_assert(ctype_ispointer(d->info) || ctype_isfield(d->info)); d = ctype_child(cts, d); /* Resolve reference for field. */ if (ctype_isref(d->info)) { lua_assert(d->size == CTSIZE_PTR); dp = *(uint8_t **)dp; d = ctype_child(cts, d); } /* Skip attributes and collect qualifiers. */ for (;;) { if (ctype_isattrib(d->info)) { if (ctype_attrib(d->info) == CTA_QUAL) qual |= d->size; } else { break; } d = ctype_child(cts, d); } lua_assert(ctype_hassize(d->info) && !ctype_isvoid(d->info)); if (((d->info|qual) & CTF_CONST)) { err_const: lj_err_caller(cts->L, LJ_ERR_FFI_WRCONST); } lj_cconv_ct_tv(cts, d, dp, o, 0); } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_strscan.o0000664000000000000000000001534012213333051022706 0ustar rootrootELF>@@UHSHHȁ}KHtFHύ 34w6)ѾHHHtH46LD1I!HMHEHHH!Hy`H*Džt  fWtH[]UHAWAVAUATSHӉUQAՁ vEA DD1t*<.t GHAHLLDMRDA.t AEk ODk HD_A.t LgA LgD_AEEII|$wIEAEMAt0<.t A AHACA AAIAHǁ vE<.t<0 0Ht AJ =Hʁ u.AIAwEƅLAEDAHHkdDLHL9rHuAHtBwurwkRuAH9vEE‰4t5II  EE‰HEHEH>HxH*Et  fWutHLH)ADEtAt ~#EHHHDHI]WEt$AzAFAADi{DkdE)FD9t!EuEBAA9EDρ멅t^AAAzAFEtE9uDGAFDEBA ADD)%9EAEBljB?kduE9u E`AAAE9uE?E9uAABE&DAADAA?kdu \ADAD$%HkdAFL%Ʌ~D9u D9u Hkdy%HAS tH %D9uD H[A\A]A^A_]UHAWAVAUATSH(IAOtHu<-t A<+uDH@ iW HnW fEHHHDHWO iueO nu^O iuWO tuPO HyHE?Hnu0W au$W nuHH HHHtHuqI$fAEAt ?0*<0wm <0u.G H([A\A]A^A_]UHHv]lj_strscan.c(int64_t)x >= 0lo > 0 && (ex10 & 1) == 0fmt == STRSCAN_ERROR || fmt == STRSCAN_NUMstrscan_doublestrscan_declj_strscan_numGCC: (Debian 4.7.3-4) 4.7.3zRx  AC E (@fAC PQ (lAC M  :AC u .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.rodata.cst16.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @=&,127@2+O*We r0({EH` X 86fB [   ty  ~:lj_strscan.cstrscan_double__PRETTY_FUNCTION__.4534strscan_dec__PRETTY_FUNCTION__.4614__PRETTY_FUNCTION__.4689.LC2.LC3__assert_failldexplj_strscan_scanlj_char_bitslj_strscan_numg q v  {p z  0 N Z m H T q     % * / Dptarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_libdef.h0000664000000000000000000003052012213333063022447 0ustar rootroot/* This is a generated file. DO NOT EDIT! */ #ifdef LJLIB_MODULE_base #undef LJLIB_MODULE_base static const lua_CFunction lj_lib_cf_base[] = { lj_ffh_assert, lj_ffh_next, lj_ffh_pairs, lj_ffh_ipairs_aux, lj_ffh_ipairs, lj_ffh_setmetatable, lj_cf_getfenv, lj_cf_setfenv, lj_ffh_rawget, lj_cf_rawset, lj_cf_rawequal, lj_cf_unpack, lj_cf_select, lj_ffh_tonumber, lj_ffh_tostring, lj_cf_error, lj_ffh_pcall, lj_cf_loadfile, lj_cf_load, lj_cf_loadstring, lj_cf_dofile, lj_cf_gcinfo, lj_cf_collectgarbage, lj_cf_newproxy, lj_cf_print }; static const uint8_t lj_lib_init_base[] = { 2,0,28,70,97,115,115,101,114,116,195,110,105,108,199,98,111,111,108,101,97, 110,252,1,200,117,115,101,114,100,97,116,97,198,115,116,114,105,110,103,197, 117,112,118,97,108,198,116,104,114,101,97,100,197,112,114,111,116,111,200,102, 117,110,99,116,105,111,110,197,116,114,97,99,101,197,99,100,97,116,97,197,116, 97,98,108,101,252,9,198,110,117,109,98,101,114,132,116,121,112,101,68,110,101, 120,116,253,69,112,97,105,114,115,64,253,70,105,112,97,105,114,115,140,103, 101,116,109,101,116,97,116,97,98,108,101,76,115,101,116,109,101,116,97,116, 97,98,108,101,7,103,101,116,102,101,110,118,7,115,101,116,102,101,110,118,70, 114,97,119,103,101,116,6,114,97,119,115,101,116,8,114,97,119,101,113,117,97, 108,6,117,110,112,97,99,107,6,115,101,108,101,99,116,72,116,111,110,117,109, 98,101,114,195,110,105,108,197,102,97,108,115,101,196,116,114,117,101,72,116, 111,115,116,114,105,110,103,5,101,114,114,111,114,69,112,99,97,108,108,134, 120,112,99,97,108,108,8,108,111,97,100,102,105,108,101,4,108,111,97,100,10, 108,111,97,100,115,116,114,105,110,103,6,100,111,102,105,108,101,6,103,99,105, 110,102,111,14,99,111,108,108,101,99,116,103,97,114,98,97,103,101,252,2,8,110, 101,119,112,114,111,120,121,200,116,111,115,116,114,105,110,103,5,112,114,105, 110,116,252,3,200,95,86,69,82,83,73,79,78,250,255 }; #endif #ifdef LJLIB_MODULE_coroutine #undef LJLIB_MODULE_coroutine static const lua_CFunction lj_lib_cf_coroutine[] = { lj_cf_coroutine_status, lj_cf_coroutine_running, lj_cf_coroutine_create, lj_ffh_coroutine_yield, lj_ffh_coroutine_resume, lj_cf_coroutine_wrap }; static const uint8_t lj_lib_init_coroutine[] = { 30,13,6,6,115,116,97,116,117,115,7,114,117,110,110,105,110,103,6,99,114,101, 97,116,101,69,121,105,101,108,100,70,114,101,115,117,109,101,254,4,119,114, 97,112,255 }; #endif #ifdef LJLIB_MODULE_math #undef LJLIB_MODULE_math static const lua_CFunction lj_lib_cf_math[] = { lj_ffh_math_abs, lj_ffh_math_sqrt, lj_ffh_math_log, lj_ffh_math_atan2, lj_ffh_math_ldexp, lj_ffh_math_min, lj_cf_math_random, lj_cf_math_randomseed }; static const uint8_t lj_lib_init_math[] = { 37,16,30,67,97,98,115,133,102,108,111,111,114,132,99,101,105,108,68,115,113, 114,116,133,108,111,103,49,48,131,101,120,112,131,115,105,110,131,99,111,115, 131,116,97,110,132,97,115,105,110,132,97,99,111,115,132,97,116,97,110,132,115, 105,110,104,132,99,111,115,104,132,116,97,110,104,133,102,114,101,120,112,132, 109,111,100,102,67,108,111,103,251,248,193,99,26,220,165,76,64,131,100,101, 103,251,57,157,82,162,70,223,145,63,131,114,97,100,69,97,116,97,110,50,131, 112,111,119,132,102,109,111,100,69,108,100,101,120,112,67,109,105,110,131,109, 97,120,251,24,45,68,84,251,33,9,64,194,112,105,250,251,0,0,0,0,0,0,240,127, 196,104,117,103,101,250,252,2,6,114,97,110,100,111,109,252,2,10,114,97,110, 100,111,109,115,101,101,100,255 }; #endif #ifdef LJLIB_MODULE_bit #undef LJLIB_MODULE_bit static const lua_CFunction lj_lib_cf_bit[] = { lj_ffh_bit_tobit, lj_ffh_bit_lshift, lj_ffh_bit_band, lj_cf_bit_tohex }; static const uint8_t lj_lib_init_bit[] = { 65,42,12,69,116,111,98,105,116,132,98,110,111,116,133,98,115,119,97,112,70, 108,115,104,105,102,116,134,114,115,104,105,102,116,135,97,114,115,104,105, 102,116,131,114,111,108,131,114,111,114,68,98,97,110,100,131,98,111,114,132, 98,120,111,114,5,116,111,104,101,120,255 }; #endif #ifdef LJLIB_MODULE_string #undef LJLIB_MODULE_string static const lua_CFunction lj_lib_cf_string[] = { lj_ffh_string_len, lj_ffh_string_byte, lj_ffh_string_char, lj_ffh_string_sub, lj_ffh_string_rep, lj_ffh_string_reverse, lj_cf_string_dump, lj_cf_string_find, lj_cf_string_match, lj_cf_string_gmatch, lj_cf_string_gsub, lj_cf_string_format }; static const uint8_t lj_lib_init_string[] = { 77,53,14,67,108,101,110,68,98,121,116,101,68,99,104,97,114,67,115,117,98,67, 114,101,112,71,114,101,118,101,114,115,101,133,108,111,119,101,114,133,117, 112,112,101,114,4,100,117,109,112,4,102,105,110,100,5,109,97,116,99,104,254, 6,103,109,97,116,99,104,4,103,115,117,98,6,102,111,114,109,97,116,255 }; #endif #ifdef LJLIB_MODULE_table #undef LJLIB_MODULE_table static const lua_CFunction lj_lib_cf_table[] = { lj_cf_table_foreachi, lj_cf_table_foreach, lj_ffh_table_getn, lj_cf_table_maxn, lj_cf_table_insert, lj_cf_table_remove, lj_cf_table_concat, lj_cf_table_sort }; static const uint8_t lj_lib_init_table[] = { 92,61,8,8,102,111,114,101,97,99,104,105,7,102,111,114,101,97,99,104,68,103, 101,116,110,4,109,97,120,110,6,105,110,115,101,114,116,6,114,101,109,111,118, 101,6,99,111,110,99,97,116,4,115,111,114,116,255 }; #endif #ifdef LJLIB_MODULE_io_method #undef LJLIB_MODULE_io_method static const lua_CFunction lj_lib_cf_io_method[] = { lj_cf_io_method_close, lj_cf_io_method_read, lj_cf_io_method_write, lj_cf_io_method_flush, lj_cf_io_method_seek, lj_cf_io_method_setvbuf, lj_cf_io_method_lines, lj_cf_io_method___gc, lj_cf_io_method___tostring }; static const uint8_t lj_lib_init_io_method[] = { 100,62,10,5,99,108,111,115,101,4,114,101,97,100,5,119,114,105,116,101,5,102, 108,117,115,104,4,115,101,101,107,7,115,101,116,118,98,117,102,5,108,105,110, 101,115,4,95,95,103,99,10,95,95,116,111,115,116,114,105,110,103,252,1,199,95, 95,105,110,100,101,120,250,255 }; #endif #ifdef LJLIB_MODULE_io #undef LJLIB_MODULE_io static const lua_CFunction lj_lib_cf_io[] = { lj_cf_io_open, lj_cf_io_popen, lj_cf_io_tmpfile, lj_cf_io_close, lj_cf_io_read, lj_cf_io_write, lj_cf_io_flush, lj_cf_io_input, lj_cf_io_output, lj_cf_io_lines, lj_cf_io_type }; static const uint8_t lj_lib_init_io[] = { 109,62,12,252,2,192,250,4,111,112,101,110,5,112,111,112,101,110,7,116,109,112, 102,105,108,101,5,99,108,111,115,101,4,114,101,97,100,5,119,114,105,116,101, 5,102,108,117,115,104,5,105,110,112,117,116,6,111,117,116,112,117,116,5,108, 105,110,101,115,4,116,121,112,101,255 }; #endif #ifdef LJLIB_MODULE_os #undef LJLIB_MODULE_os static const lua_CFunction lj_lib_cf_os[] = { lj_cf_os_execute, lj_cf_os_remove, lj_cf_os_rename, lj_cf_os_tmpname, lj_cf_os_getenv, lj_cf_os_exit, lj_cf_os_clock, lj_cf_os_date, lj_cf_os_time, lj_cf_os_difftime, lj_cf_os_setlocale }; static const uint8_t lj_lib_init_os[] = { 120,62,11,7,101,120,101,99,117,116,101,6,114,101,109,111,118,101,6,114,101, 110,97,109,101,7,116,109,112,110,97,109,101,6,103,101,116,101,110,118,4,101, 120,105,116,5,99,108,111,99,107,4,100,97,116,101,4,116,105,109,101,8,100,105, 102,102,116,105,109,101,9,115,101,116,108,111,99,97,108,101,255 }; #endif #ifdef LJLIB_MODULE_debug #undef LJLIB_MODULE_debug static const lua_CFunction lj_lib_cf_debug[] = { lj_cf_debug_getregistry, lj_cf_debug_getmetatable, lj_cf_debug_setmetatable, lj_cf_debug_getfenv, lj_cf_debug_setfenv, lj_cf_debug_getinfo, lj_cf_debug_getlocal, lj_cf_debug_setlocal, lj_cf_debug_getupvalue, lj_cf_debug_setupvalue, lj_cf_debug_upvalueid, lj_cf_debug_upvaluejoin, lj_cf_debug_sethook, lj_cf_debug_gethook, lj_cf_debug_debug, lj_cf_debug_traceback }; static const uint8_t lj_lib_init_debug[] = { 131,62,16,11,103,101,116,114,101,103,105,115,116,114,121,12,103,101,116,109, 101,116,97,116,97,98,108,101,12,115,101,116,109,101,116,97,116,97,98,108,101, 7,103,101,116,102,101,110,118,7,115,101,116,102,101,110,118,7,103,101,116,105, 110,102,111,8,103,101,116,108,111,99,97,108,8,115,101,116,108,111,99,97,108, 10,103,101,116,117,112,118,97,108,117,101,10,115,101,116,117,112,118,97,108, 117,101,9,117,112,118,97,108,117,101,105,100,11,117,112,118,97,108,117,101, 106,111,105,110,7,115,101,116,104,111,111,107,7,103,101,116,104,111,111,107, 5,100,101,98,117,103,9,116,114,97,99,101,98,97,99,107,255 }; #endif #ifdef LJLIB_MODULE_jit #undef LJLIB_MODULE_jit static const lua_CFunction lj_lib_cf_jit[] = { lj_cf_jit_on, lj_cf_jit_off, lj_cf_jit_flush, lj_cf_jit_status, lj_cf_jit_attach }; static const uint8_t lj_lib_init_jit[] = { 147,62,9,2,111,110,3,111,102,102,5,102,108,117,115,104,6,115,116,97,116,117, 115,6,97,116,116,97,99,104,252,5,194,111,115,250,252,4,196,97,114,99,104,250, 252,3,203,118,101,114,115,105,111,110,95,110,117,109,250,252,2,199,118,101, 114,115,105,111,110,250,255 }; #endif #ifdef LJLIB_MODULE_jit_util #undef LJLIB_MODULE_jit_util static const lua_CFunction lj_lib_cf_jit_util[] = { lj_cf_jit_util_funcinfo, lj_cf_jit_util_funcbc, lj_cf_jit_util_funck, lj_cf_jit_util_funcuvname, lj_cf_jit_util_traceinfo, lj_cf_jit_util_traceir, lj_cf_jit_util_tracek, lj_cf_jit_util_tracesnap, lj_cf_jit_util_tracemc, lj_cf_jit_util_traceexitstub, lj_cf_jit_util_ircalladdr }; static const uint8_t lj_lib_init_jit_util[] = { 152,62,11,8,102,117,110,99,105,110,102,111,6,102,117,110,99,98,99,5,102,117, 110,99,107,10,102,117,110,99,117,118,110,97,109,101,9,116,114,97,99,101,105, 110,102,111,7,116,114,97,99,101,105,114,6,116,114,97,99,101,107,9,116,114,97, 99,101,115,110,97,112,7,116,114,97,99,101,109,99,13,116,114,97,99,101,101,120, 105,116,115,116,117,98,10,105,114,99,97,108,108,97,100,100,114,255 }; #endif #ifdef LJLIB_MODULE_jit_opt #undef LJLIB_MODULE_jit_opt static const lua_CFunction lj_lib_cf_jit_opt[] = { lj_cf_jit_opt_start }; static const uint8_t lj_lib_init_jit_opt[] = { 163,62,1,5,115,116,97,114,116,255 }; #endif #ifdef LJLIB_MODULE_ffi_meta #undef LJLIB_MODULE_ffi_meta static const lua_CFunction lj_lib_cf_ffi_meta[] = { lj_cf_ffi_meta___index, lj_cf_ffi_meta___newindex, lj_cf_ffi_meta___eq, lj_cf_ffi_meta___len, lj_cf_ffi_meta___lt, lj_cf_ffi_meta___le, lj_cf_ffi_meta___concat, lj_cf_ffi_meta___call, lj_cf_ffi_meta___add, lj_cf_ffi_meta___sub, lj_cf_ffi_meta___mul, lj_cf_ffi_meta___div, lj_cf_ffi_meta___mod, lj_cf_ffi_meta___pow, lj_cf_ffi_meta___unm, lj_cf_ffi_meta___tostring, lj_cf_ffi_meta___pairs, lj_cf_ffi_meta___ipairs }; static const uint8_t lj_lib_init_ffi_meta[] = { 164,62,19,7,95,95,105,110,100,101,120,10,95,95,110,101,119,105,110,100,101, 120,4,95,95,101,113,5,95,95,108,101,110,4,95,95,108,116,4,95,95,108,101,8,95, 95,99,111,110,99,97,116,6,95,95,99,97,108,108,5,95,95,97,100,100,5,95,95,115, 117,98,5,95,95,109,117,108,5,95,95,100,105,118,5,95,95,109,111,100,5,95,95, 112,111,119,5,95,95,117,110,109,10,95,95,116,111,115,116,114,105,110,103,7, 95,95,112,97,105,114,115,8,95,95,105,112,97,105,114,115,195,102,102,105,203, 95,95,109,101,116,97,116,97,98,108,101,250,255 }; #endif #ifdef LJLIB_MODULE_ffi_clib #undef LJLIB_MODULE_ffi_clib static const lua_CFunction lj_lib_cf_ffi_clib[] = { lj_cf_ffi_clib___index, lj_cf_ffi_clib___newindex, lj_cf_ffi_clib___gc }; static const uint8_t lj_lib_init_ffi_clib[] = { 182,62,3,7,95,95,105,110,100,101,120,10,95,95,110,101,119,105,110,100,101,120, 4,95,95,103,99,255 }; #endif #ifdef LJLIB_MODULE_ffi_callback #undef LJLIB_MODULE_ffi_callback static const lua_CFunction lj_lib_cf_ffi_callback[] = { lj_cf_ffi_callback_free, lj_cf_ffi_callback_set }; static const uint8_t lj_lib_init_ffi_callback[] = { 185,62,3,4,102,114,101,101,3,115,101,116,252,1,199,95,95,105,110,100,101,120, 250,255 }; #endif #ifdef LJLIB_MODULE_ffi #undef LJLIB_MODULE_ffi static const lua_CFunction lj_lib_cf_ffi[] = { lj_cf_ffi_cdef, lj_cf_ffi_new, lj_cf_ffi_cast, lj_cf_ffi_typeof, lj_cf_ffi_istype, lj_cf_ffi_sizeof, lj_cf_ffi_alignof, lj_cf_ffi_offsetof, lj_cf_ffi_errno, lj_cf_ffi_string, lj_cf_ffi_copy, lj_cf_ffi_fill, lj_cf_ffi_abi, lj_cf_ffi_metatype, lj_cf_ffi_gc, lj_cf_ffi_load }; static const uint8_t lj_lib_init_ffi[] = { 187,62,22,4,99,100,101,102,3,110,101,119,4,99,97,115,116,6,116,121,112,101, 111,102,6,105,115,116,121,112,101,6,115,105,122,101,111,102,7,97,108,105,103, 110,111,102,8,111,102,102,115,101,116,111,102,5,101,114,114,110,111,6,115,116, 114,105,110,103,4,99,111,112,121,4,102,105,108,108,3,97,98,105,252,8,192,250, 8,109,101,116,97,116,121,112,101,252,7,192,250,2,103,99,252,5,192,250,4,108, 111,97,100,252,4,193,67,250,252,3,194,111,115,250,252,2,196,97,114,99,104,250, 255 }; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/vm_ppc.dasc0000664000000000000000000041633412202141143022511 0ustar rootroot|// Low-level VM code for PowerPC CPUs. |// Bytecode interpreter, fast functions and helper functions. |// Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h | |.arch ppc |.section code_op, code_sub | |.actionlist build_actionlist |.globals GLOB_ |.globalnames globnames |.externnames extnames | |// Note: The ragged indentation of the instructions is intentional. |// The starting columns indicate data dependencies. | |//----------------------------------------------------------------------- | |// DynASM defines used by the PPC port: |// |// P64 64 bit pointers (only for GPR64 testing). |// Note: a full PPC64 _LP64 port is not planned. |// GPR64 64 bit registers (but possibly 32 bit pointers, e.g. PS3). |// Affects reg saves, stack layout, carry/overflow/dot flags etc. |// FRAME32 Use 32 bit frame layout, even with GPR64 (Xbox 360). |// TOC Need table of contents (64 bit or 32 bit variant, e.g. PS3). |// Function pointers are really a struct: code, TOC, env (optional). |// TOCENV Function pointers have an environment pointer, too (not on PS3). |// PPE Power Processor Element of Cell (PS3) or Xenon (Xbox 360). |// Must avoid (slow) micro-coded instructions. | |.if P64 |.define TOC, 1 |.define TOCENV, 1 |.macro lpx, a, b, c; ldx a, b, c; .endmacro |.macro lp, a, b; ld a, b; .endmacro |.macro stp, a, b; std a, b; .endmacro |.define decode_OPP, decode_OP8 |.if FFI |// Missing: Calling conventions, 64 bit regs, TOC. |.error lib_ffi not yet implemented for PPC64 |.endif |.else |.macro lpx, a, b, c; lwzx a, b, c; .endmacro |.macro lp, a, b; lwz a, b; .endmacro |.macro stp, a, b; stw a, b; .endmacro |.define decode_OPP, decode_OP4 |.endif | |// Convenience macros for TOC handling. |.if TOC |// Linker needs a TOC patch area for every external call relocation. |.macro blex, target; bl extern target@plt; nop; .endmacro |.macro .toc, a, b; a, b; .endmacro |.if P64 |.define TOC_OFS, 8 |.define ENV_OFS, 16 |.else |.define TOC_OFS, 4 |.define ENV_OFS, 8 |.endif |.else // No TOC. |.macro blex, target; bl extern target@plt; .endmacro |.macro .toc, a, b; .endmacro |.endif |.macro .tocenv, a, b; .if TOCENV; a, b; .endif; .endmacro | |.macro .gpr64, a, b; .if GPR64; a, b; .endif; .endmacro | |.macro andix., y, a, i |.if PPE | rlwinm y, a, 0, 31-lj_fls(i), 31-lj_ffs(i) | cmpwi y, 0 |.else | andi. y, a, i |.endif |.endmacro | |//----------------------------------------------------------------------- | |// Fixed register assignments for the interpreter. |// Don't use: r1 = sp, r2 and r13 = reserved (TOC, TLS or SDATA) | |// The following must be C callee-save (but BASE is often refetched). |.define BASE, r14 // Base of current Lua stack frame. |.define KBASE, r15 // Constants of current Lua function. |.define PC, r16 // Next PC. |.define DISPATCH, r17 // Opcode dispatch table. |.define LREG, r18 // Register holding lua_State (also in SAVE_L). |.define MULTRES, r19 // Size of multi-result: (nresults+1)*8. |.define JGL, r31 // On-trace: global_State + 32768. | |// Constants for type-comparisons, stores and conversions. C callee-save. |.define TISNUM, r22 |.define TISNIL, r23 |.define ZERO, r24 |.define TOBIT, f30 // 2^52 + 2^51. |.define TONUM, f31 // 2^52 + 2^51 + 2^31. | |// The following temporaries are not saved across C calls, except for RA. |.define RA, r20 // Callee-save. |.define RB, r10 |.define RC, r11 |.define RD, r12 |.define INS, r7 // Overlaps CARG5. | |.define TMP0, r0 |.define TMP1, r8 |.define TMP2, r9 |.define TMP3, r6 // Overlaps CARG4. | |// Saved temporaries. |.define SAVE0, r21 | |// Calling conventions. |.define CARG1, r3 |.define CARG2, r4 |.define CARG3, r5 |.define CARG4, r6 // Overlaps TMP3. |.define CARG5, r7 // Overlaps INS. | |.define FARG1, f1 |.define FARG2, f2 | |.define CRET1, r3 |.define CRET2, r4 | |.define TOCREG, r2 // TOC register (only used by C code). |.define ENVREG, r11 // Environment pointer (nested C functions). | |// Stack layout while in interpreter. Must match with lj_frame.h. |.if GPR64 |.if FRAME32 | |// 456(sp) // \ 32/64 bit C frame info |.define TONUM_LO, 452(sp) // | |.define TONUM_HI, 448(sp) // | |.define TMPD_LO, 444(sp) // | |.define TMPD_HI, 440(sp) // | |.define SAVE_CR, 432(sp) // | 64 bit CR save. |.define SAVE_ERRF, 424(sp) // > Parameter save area. |.define SAVE_NRES, 420(sp) // | |.define SAVE_L, 416(sp) // | |.define SAVE_PC, 412(sp) // | |.define SAVE_MULTRES, 408(sp) // | |.define SAVE_CFRAME, 400(sp) // / 64 bit C frame chain. |// 392(sp) // Reserved. |.define CFRAME_SPACE, 384 // Delta for sp. |// Back chain for sp: 384(sp) <-- sp entering interpreter |.define SAVE_LR, 376(sp) // 32 bit LR stored in hi-part. |.define SAVE_GPR_, 232 // .. 232+18*8: 64 bit GPR saves. |.define SAVE_FPR_, 88 // .. 88+18*8: 64 bit FPR saves. |// 80(sp) // Needed for 16 byte stack frame alignment. |// 16(sp) // Callee parameter save area (ABI mandated). |// 8(sp) // Reserved |// Back chain for sp: 0(sp) <-- sp while in interpreter |// 32 bit sp stored in hi-part of 0(sp). | |.define TMPD_BLO, 447(sp) |.define TMPD, TMPD_HI |.define TONUM_D, TONUM_HI | |.else | |// 508(sp) // \ 32 bit C frame info. |.define SAVE_ERRF, 472(sp) // | |.define SAVE_NRES, 468(sp) // | |.define SAVE_L, 464(sp) // > Parameter save area. |.define SAVE_PC, 460(sp) // | |.define SAVE_MULTRES, 456(sp) // | |.define SAVE_CFRAME, 448(sp) // / 64 bit C frame chain. |.define SAVE_LR, 416(sp) |.define CFRAME_SPACE, 400 // Delta for sp. |// Back chain for sp: 400(sp) <-- sp entering interpreter |.define SAVE_FPR_, 256 // .. 256+18*8: 64 bit FPR saves. |.define SAVE_GPR_, 112 // .. 112+18*8: 64 bit GPR saves. |// 48(sp) // Callee parameter save area (ABI mandated). |.define SAVE_TOC, 40(sp) // TOC save area. |.define TMPD_LO, 36(sp) // \ Link editor temp (ABI mandated). |.define TMPD_HI, 32(sp) // / |.define TONUM_LO, 28(sp) // \ Compiler temp (ABI mandated). |.define TONUM_HI, 24(sp) // / |// Next frame lr: 16(sp) |.define SAVE_CR, 8(sp) // 64 bit CR save. |// Back chain for sp: 0(sp) <-- sp while in interpreter | |.define TMPD_BLO, 39(sp) |.define TMPD, TMPD_HI |.define TONUM_D, TONUM_HI | |.endif |.else | |.define SAVE_LR, 276(sp) |.define CFRAME_SPACE, 272 // Delta for sp. |// Back chain for sp: 272(sp) <-- sp entering interpreter |.define SAVE_FPR_, 128 // .. 128+18*8: 64 bit FPR saves. |.define SAVE_GPR_, 56 // .. 56+18*4: 32 bit GPR saves. |.define SAVE_CR, 52(sp) // 32 bit CR save. |.define SAVE_ERRF, 48(sp) // 32 bit C frame info. |.define SAVE_NRES, 44(sp) |.define SAVE_CFRAME, 40(sp) |.define SAVE_L, 36(sp) |.define SAVE_PC, 32(sp) |.define SAVE_MULTRES, 28(sp) |.define UNUSED1, 24(sp) |.define TMPD_LO, 20(sp) |.define TMPD_HI, 16(sp) |.define TONUM_LO, 12(sp) |.define TONUM_HI, 8(sp) |// Next frame lr: 4(sp) |// Back chain for sp: 0(sp) <-- sp while in interpreter | |.define TMPD_BLO, 23(sp) |.define TMPD, TMPD_HI |.define TONUM_D, TONUM_HI | |.endif | |.macro save_, reg |.if GPR64 | std r..reg, SAVE_GPR_+(reg-14)*8(sp) |.else | stw r..reg, SAVE_GPR_+(reg-14)*4(sp) |.endif | stfd f..reg, SAVE_FPR_+(reg-14)*8(sp) |.endmacro |.macro rest_, reg |.if GPR64 | ld r..reg, SAVE_GPR_+(reg-14)*8(sp) |.else | lwz r..reg, SAVE_GPR_+(reg-14)*4(sp) |.endif | lfd f..reg, SAVE_FPR_+(reg-14)*8(sp) |.endmacro | |.macro saveregs |.if GPR64 and not FRAME32 | stdu sp, -CFRAME_SPACE(sp) |.else | stwu sp, -CFRAME_SPACE(sp) |.endif | save_ 14; save_ 15; save_ 16 | mflr r0 | save_ 17; save_ 18; save_ 19; save_ 20; save_ 21; save_ 22 |.if GPR64 and not FRAME32 | std r0, SAVE_LR |.else | stw r0, SAVE_LR |.endif | save_ 23; save_ 24; save_ 25 | mfcr r0 | save_ 26; save_ 27; save_ 28; save_ 29; save_ 30; save_ 31 |.if GPR64 | std r0, SAVE_CR |.else | stw r0, SAVE_CR |.endif | .toc std TOCREG, SAVE_TOC |.endmacro | |.macro restoreregs |.if GPR64 and not FRAME32 | ld r0, SAVE_LR |.else | lwz r0, SAVE_LR |.endif |.if GPR64 | ld r12, SAVE_CR |.else | lwz r12, SAVE_CR |.endif | rest_ 14; rest_ 15; rest_ 16; rest_ 17; rest_ 18; rest_ 19 | mtlr r0; |.if PPE; mtocrf 0x20, r12; .else; mtcrf 0x38, r12; .endif | rest_ 20; rest_ 21; rest_ 22; rest_ 23; rest_ 24; rest_ 25 |.if PPE; mtocrf 0x10, r12; .endif | rest_ 26; rest_ 27; rest_ 28; rest_ 29; rest_ 30; rest_ 31 |.if PPE; mtocrf 0x08, r12; .endif | addi sp, sp, CFRAME_SPACE |.endmacro | |// Type definitions. Some of these are only used for documentation. |.type L, lua_State, LREG |.type GL, global_State |.type TVALUE, TValue |.type GCOBJ, GCobj |.type STR, GCstr |.type TAB, GCtab |.type LFUNC, GCfuncL |.type CFUNC, GCfuncC |.type PROTO, GCproto |.type UPVAL, GCupval |.type NODE, Node |.type NARGS8, int |.type TRACE, GCtrace | |//----------------------------------------------------------------------- | |// These basic macros should really be part of DynASM. |.macro srwi, rx, ry, n; rlwinm rx, ry, 32-n, n, 31; .endmacro |.macro slwi, rx, ry, n; rlwinm rx, ry, n, 0, 31-n; .endmacro |.macro rotlwi, rx, ry, n; rlwinm rx, ry, n, 0, 31; .endmacro |.macro rotlw, rx, ry, rn; rlwnm rx, ry, rn, 0, 31; .endmacro |.macro subi, rx, ry, i; addi rx, ry, -i; .endmacro | |// Trap for not-yet-implemented parts. |.macro NYI; tw 4, sp, sp; .endmacro | |// int/FP conversions. |.macro tonum_i, freg, reg | xoris reg, reg, 0x8000 | stw reg, TONUM_LO | lfd freg, TONUM_D | fsub freg, freg, TONUM |.endmacro | |.macro tonum_u, freg, reg | stw reg, TONUM_LO | lfd freg, TONUM_D | fsub freg, freg, TOBIT |.endmacro | |.macro toint, reg, freg, tmpfreg | fctiwz tmpfreg, freg | stfd tmpfreg, TMPD | lwz reg, TMPD_LO |.endmacro | |.macro toint, reg, freg | toint reg, freg, freg |.endmacro | |//----------------------------------------------------------------------- | |// Access to frame relative to BASE. |.define FRAME_PC, -8 |.define FRAME_FUNC, -4 | |// Instruction decode. |.macro decode_OP4, dst, ins; rlwinm dst, ins, 2, 22, 29; .endmacro |.macro decode_OP8, dst, ins; rlwinm dst, ins, 3, 21, 28; .endmacro |.macro decode_RA8, dst, ins; rlwinm dst, ins, 27, 21, 28; .endmacro |.macro decode_RB8, dst, ins; rlwinm dst, ins, 11, 21, 28; .endmacro |.macro decode_RC8, dst, ins; rlwinm dst, ins, 19, 21, 28; .endmacro |.macro decode_RD8, dst, ins; rlwinm dst, ins, 19, 13, 28; .endmacro | |.macro decode_OP1, dst, ins; rlwinm dst, ins, 0, 24, 31; .endmacro |.macro decode_RD4, dst, ins; rlwinm dst, ins, 18, 14, 29; .endmacro | |// Instruction fetch. |.macro ins_NEXT1 | lwz INS, 0(PC) | addi PC, PC, 4 |.endmacro |// Instruction decode+dispatch. Note: optimized for e300! |.macro ins_NEXT2 | decode_OPP TMP1, INS | lpx TMP0, DISPATCH, TMP1 | mtctr TMP0 | decode_RB8 RB, INS | decode_RD8 RD, INS | decode_RA8 RA, INS | decode_RC8 RC, INS | bctr |.endmacro |.macro ins_NEXT | ins_NEXT1 | ins_NEXT2 |.endmacro | |// Instruction footer. |.if 1 | // Replicated dispatch. Less unpredictable branches, but higher I-Cache use. | .define ins_next, ins_NEXT | .define ins_next_, ins_NEXT | .define ins_next1, ins_NEXT1 | .define ins_next2, ins_NEXT2 |.else | // Common dispatch. Lower I-Cache use, only one (very) unpredictable branch. | // Affects only certain kinds of benchmarks (and only with -j off). | .macro ins_next | b ->ins_next | .endmacro | .macro ins_next1 | .endmacro | .macro ins_next2 | b ->ins_next | .endmacro | .macro ins_next_ | ->ins_next: | ins_NEXT | .endmacro |.endif | |// Call decode and dispatch. |.macro ins_callt | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | lwz PC, LFUNC:RB->pc | lwz INS, 0(PC) | addi PC, PC, 4 | decode_OPP TMP1, INS | decode_RA8 RA, INS | lpx TMP0, DISPATCH, TMP1 | add RA, RA, BASE | mtctr TMP0 | bctr |.endmacro | |.macro ins_call | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, PC = caller PC | stw PC, FRAME_PC(BASE) | ins_callt |.endmacro | |//----------------------------------------------------------------------- | |// Macros to test operand types. |.macro checknum, reg; cmplw reg, TISNUM; .endmacro |.macro checknum, cr, reg; cmplw cr, reg, TISNUM; .endmacro |.macro checkstr, reg; cmpwi reg, LJ_TSTR; .endmacro |.macro checktab, reg; cmpwi reg, LJ_TTAB; .endmacro |.macro checkfunc, reg; cmpwi reg, LJ_TFUNC; .endmacro |.macro checknil, reg; cmpwi reg, LJ_TNIL; .endmacro | |.macro branch_RD | srwi TMP0, RD, 1 | addis PC, PC, -(BCBIAS_J*4 >> 16) | add PC, PC, TMP0 |.endmacro | |// Assumes DISPATCH is relative to GL. #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | |.macro hotcheck, delta, target | rlwinm TMP1, PC, 31, 25, 30 | addi TMP1, TMP1, GG_DISP2HOT | lhzx TMP2, DISPATCH, TMP1 | addic. TMP2, TMP2, -delta | sthx TMP2, DISPATCH, TMP1 | blt target |.endmacro | |.macro hotloop | hotcheck HOTCOUNT_LOOP, ->vm_hotloop |.endmacro | |.macro hotcall | hotcheck HOTCOUNT_CALL, ->vm_hotcall |.endmacro | |// Set current VM state. Uses TMP0. |.macro li_vmstate, st; li TMP0, ~LJ_VMST_..st; .endmacro |.macro st_vmstate; stw TMP0, DISPATCH_GL(vmstate)(DISPATCH); .endmacro | |// Move table write barrier back. Overwrites mark and tmp. |.macro barrierback, tab, mark, tmp | lwz tmp, DISPATCH_GL(gc.grayagain)(DISPATCH) | // Assumes LJ_GC_BLACK is 0x04. | rlwinm mark, mark, 0, 30, 28 // black2gray(tab) | stw tab, DISPATCH_GL(gc.grayagain)(DISPATCH) | stb mark, tab->marked | stw tmp, tab->gclist |.endmacro | |//----------------------------------------------------------------------- /* Generate subroutines used by opcodes and other parts of the VM. */ /* The .code_sub section should be last to help static branch prediction. */ static void build_subroutines(BuildCtx *ctx) { |.code_sub | |//----------------------------------------------------------------------- |//-- Return handling ---------------------------------------------------- |//----------------------------------------------------------------------- | |->vm_returnp: | // See vm_return. Also: TMP2 = previous base. | andix. TMP0, PC, FRAME_P | li TMP1, LJ_TTRUE | beq ->cont_dispatch | | // Return from pcall or xpcall fast func. | lwz PC, FRAME_PC(TMP2) // Fetch PC of previous frame. | mr BASE, TMP2 // Restore caller base. | // Prepending may overwrite the pcall frame, so do it at the end. | stwu TMP1, FRAME_PC(RA) // Prepend true to results. | |->vm_returnc: | addi RD, RD, 8 // RD = (nresults+1)*8. | andix. TMP0, PC, FRAME_TYPE | cmpwi cr1, RD, 0 | li CRET1, LUA_YIELD | beq cr1, ->vm_unwind_c_eh | mr MULTRES, RD | beq ->BC_RET_Z // Handle regular return to Lua. | |->vm_return: | // BASE = base, RA = resultptr, RD/MULTRES = (nresults+1)*8, PC = return | // TMP0 = PC & FRAME_TYPE | cmpwi TMP0, FRAME_C | rlwinm TMP2, PC, 0, 0, 28 | li_vmstate C | sub TMP2, BASE, TMP2 // TMP2 = previous base. | bney ->vm_returnp | | addic. TMP1, RD, -8 | stp TMP2, L->base | lwz TMP2, SAVE_NRES | subi BASE, BASE, 8 | st_vmstate | slwi TMP2, TMP2, 3 | beq >2 |1: | addic. TMP1, TMP1, -8 | lfd f0, 0(RA) | addi RA, RA, 8 | stfd f0, 0(BASE) | addi BASE, BASE, 8 | bney <1 | |2: | cmpw TMP2, RD // More/less results wanted? | bne >6 |3: | stp BASE, L->top // Store new top. | |->vm_leave_cp: | lp TMP0, SAVE_CFRAME // Restore previous C frame. | li CRET1, 0 // Ok return status for vm_pcall. | stp TMP0, L->cframe | |->vm_leave_unw: | restoreregs | blr | |6: | ble >7 // Less results wanted? | // More results wanted. Check stack size and fill up results with nil. | lwz TMP1, L->maxstack | cmplw BASE, TMP1 | bge >8 | stw TISNIL, 0(BASE) | addi RD, RD, 8 | addi BASE, BASE, 8 | b <2 | |7: // Less results wanted. | subfic TMP3, TMP2, 0 // LUA_MULTRET+1 case? | sub TMP0, RD, TMP2 | subfe TMP1, TMP1, TMP1 // TMP1 = TMP2 == 0 ? 0 : -1 | and TMP0, TMP0, TMP1 | sub BASE, BASE, TMP0 // Either keep top or shrink it. | b <3 | |8: // Corner case: need to grow stack for filling up results. | // This can happen if: | // - A C function grows the stack (a lot). | // - The GC shrinks the stack in between. | // - A return back from a lua_call() with (high) nresults adjustment. | stp BASE, L->top // Save current top held in BASE (yes). | mr SAVE0, RD | mr CARG2, TMP2 | mr CARG1, L | bl extern lj_state_growstack // (lua_State *L, int n) | lwz TMP2, SAVE_NRES | mr RD, SAVE0 | slwi TMP2, TMP2, 3 | lp BASE, L->top // Need the (realloced) L->top in BASE. | b <2 | |->vm_unwind_c: // Unwind C stack, return from vm_pcall. | // (void *cframe, int errcode) | mr sp, CARG1 | mr CRET1, CARG2 |->vm_unwind_c_eh: // Landing pad for external unwinder. | lwz L, SAVE_L | .toc ld TOCREG, SAVE_TOC | li TMP0, ~LJ_VMST_C | lwz GL:TMP1, L->glref | stw TMP0, GL:TMP1->vmstate | b ->vm_leave_unw | |->vm_unwind_ff: // Unwind C stack, return from ff pcall. | // (void *cframe) |.if GPR64 | rldicr sp, CARG1, 0, 61 |.else | rlwinm sp, CARG1, 0, 0, 29 |.endif |->vm_unwind_ff_eh: // Landing pad for external unwinder. | lwz L, SAVE_L | .toc ld TOCREG, SAVE_TOC | li TISNUM, LJ_TISNUM // Setup type comparison constants. | lp BASE, L->base | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | li ZERO, 0 | stw TMP3, TMPD | li TMP1, LJ_TFALSE | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). | li TISNIL, LJ_TNIL | li_vmstate INTERP | lfs TOBIT, TMPD | lwz PC, FRAME_PC(BASE) // Fetch PC of previous frame. | la RA, -8(BASE) // Results start at BASE-8. | stw TMP3, TMPD | addi DISPATCH, DISPATCH, GG_G2DISP | stw TMP1, 0(RA) // Prepend false to error message. | li RD, 16 // 2 results: false + error message. | st_vmstate | lfs TONUM, TMPD | b ->vm_returnc | |//----------------------------------------------------------------------- |//-- Grow stack for calls ----------------------------------------------- |//----------------------------------------------------------------------- | |->vm_growstack_c: // Grow stack for C function. | li CARG2, LUA_MINSTACK | b >2 | |->vm_growstack_l: // Grow stack for Lua function. | // BASE = new base, RA = BASE+framesize*8, RC = nargs*8, PC = first PC | add RC, BASE, RC | sub RA, RA, BASE | stp BASE, L->base | addi PC, PC, 4 // Must point after first instruction. | stp RC, L->top | srwi CARG2, RA, 3 |2: | // L->base = new base, L->top = top | stw PC, SAVE_PC | mr CARG1, L | bl extern lj_state_growstack // (lua_State *L, int n) | lp BASE, L->base | lp RC, L->top | lwz LFUNC:RB, FRAME_FUNC(BASE) | sub RC, RC, BASE | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | ins_callt // Just retry the call. | |//----------------------------------------------------------------------- |//-- Entry points into the assembler VM --------------------------------- |//----------------------------------------------------------------------- | |->vm_resume: // Setup C frame and resume thread. | // (lua_State *L, TValue *base, int nres1 = 0, ptrdiff_t ef = 0) | saveregs | mr L, CARG1 | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | mr BASE, CARG2 | lbz TMP1, L->status | stw L, SAVE_L | li PC, FRAME_CP | addi TMP0, sp, CFRAME_RESUME | addi DISPATCH, DISPATCH, GG_G2DISP | stw CARG3, SAVE_NRES | cmplwi TMP1, 0 | stw CARG3, SAVE_ERRF | stp TMP0, L->cframe | stp CARG3, SAVE_CFRAME | stw CARG1, SAVE_PC // Any value outside of bytecode is ok. | beq >3 | | // Resume after yield (like a return). | mr RA, BASE | lp BASE, L->base | li TISNUM, LJ_TISNUM // Setup type comparison constants. | lp TMP1, L->top | lwz PC, FRAME_PC(BASE) | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | stb CARG3, L->status | stw TMP3, TMPD | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). | lfs TOBIT, TMPD | sub RD, TMP1, BASE | stw TMP3, TMPD | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) | addi RD, RD, 8 | stw TMP0, TONUM_HI | li_vmstate INTERP | li ZERO, 0 | st_vmstate | andix. TMP0, PC, FRAME_TYPE | mr MULTRES, RD | lfs TONUM, TMPD | li TISNIL, LJ_TNIL | beq ->BC_RET_Z | b ->vm_return | |->vm_pcall: // Setup protected C frame and enter VM. | // (lua_State *L, TValue *base, int nres1, ptrdiff_t ef) | saveregs | li PC, FRAME_CP | stw CARG4, SAVE_ERRF | b >1 | |->vm_call: // Setup C frame and enter VM. | // (lua_State *L, TValue *base, int nres1) | saveregs | li PC, FRAME_C | |1: // Entry point for vm_pcall above (PC = ftype). | lp TMP1, L:CARG1->cframe | stw CARG3, SAVE_NRES | mr L, CARG1 | stw CARG1, SAVE_L | mr BASE, CARG2 | stp sp, L->cframe // Add our C frame to cframe chain. | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | stw CARG1, SAVE_PC // Any value outside of bytecode is ok. | stp TMP1, SAVE_CFRAME | addi DISPATCH, DISPATCH, GG_G2DISP | |3: // Entry point for vm_cpcall/vm_resume (BASE = base, PC = ftype). | lp TMP2, L->base // TMP2 = old base (used in vmeta_call). | li TISNUM, LJ_TISNUM // Setup type comparison constants. | lp TMP1, L->top | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | add PC, PC, BASE | stw TMP3, TMPD | li ZERO, 0 | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). | lfs TOBIT, TMPD | sub PC, PC, TMP2 // PC = frame delta + frame type | stw TMP3, TMPD | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) | sub NARGS8:RC, TMP1, BASE | stw TMP0, TONUM_HI | li_vmstate INTERP | lfs TONUM, TMPD | li TISNIL, LJ_TNIL | st_vmstate | |->vm_call_dispatch: | // TMP2 = old base, BASE = new base, RC = nargs*8, PC = caller PC | lwz TMP0, FRAME_PC(BASE) | lwz LFUNC:RB, FRAME_FUNC(BASE) | checkfunc TMP0; bne ->vmeta_call | |->vm_call_dispatch_f: | ins_call | // BASE = new base, RB = func, RC = nargs*8, PC = caller PC | |->vm_cpcall: // Setup protected C frame, call C. | // (lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp) | saveregs | mr L, CARG1 | lwz TMP0, L:CARG1->stack | stw CARG1, SAVE_L | lp TMP1, L->top | stw CARG1, SAVE_PC // Any value outside of bytecode is ok. | sub TMP0, TMP0, TMP1 // Compute -savestack(L, L->top). | lp TMP1, L->cframe | stp sp, L->cframe // Add our C frame to cframe chain. | .toc lp CARG4, 0(CARG4) | li TMP2, 0 | stw TMP0, SAVE_NRES // Neg. delta means cframe w/o frame. | stw TMP2, SAVE_ERRF // No error function. | stp TMP1, SAVE_CFRAME | mtctr CARG4 | bctrl // (lua_State *L, lua_CFunction func, void *ud) |.if PPE | mr BASE, CRET1 | cmpwi CRET1, 0 |.else | mr. BASE, CRET1 |.endif | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | li PC, FRAME_CP | addi DISPATCH, DISPATCH, GG_G2DISP | bne <3 // Else continue with the call. | b ->vm_leave_cp // No base? Just remove C frame. | |//----------------------------------------------------------------------- |//-- Metamethod handling ------------------------------------------------ |//----------------------------------------------------------------------- | |// The lj_meta_* functions (except for lj_meta_cat) don't reallocate the |// stack, so BASE doesn't need to be reloaded across these calls. | |//-- Continuation dispatch ---------------------------------------------- | |->cont_dispatch: | // BASE = meta base, RA = resultptr, RD = (nresults+1)*8 | lwz TMP0, -12(BASE) // Continuation. | mr RB, BASE | mr BASE, TMP2 // Restore caller BASE. | lwz LFUNC:TMP1, FRAME_FUNC(TMP2) |.if FFI | cmplwi TMP0, 1 |.endif | lwz PC, -16(RB) // Restore PC from [cont|PC]. | subi TMP2, RD, 8 | lwz TMP1, LFUNC:TMP1->pc | stwx TISNIL, RA, TMP2 // Ensure one valid arg. |.if FFI | ble >1 |.endif | lwz KBASE, PC2PROTO(k)(TMP1) | // BASE = base, RA = resultptr, RB = meta base | mtctr TMP0 | bctr // Jump to continuation. | |.if FFI |1: | beq ->cont_ffi_callback // cont = 1: return from FFI callback. | // cont = 0: tailcall from C function. | subi TMP1, RB, 16 | sub RC, TMP1, BASE | b ->vm_call_tail |.endif | |->cont_cat: // RA = resultptr, RB = meta base | lwz INS, -4(PC) | subi CARG2, RB, 16 | decode_RB8 SAVE0, INS | lfd f0, 0(RA) | add TMP1, BASE, SAVE0 | stp BASE, L->base | cmplw TMP1, CARG2 | sub CARG3, CARG2, TMP1 | decode_RA8 RA, INS | stfd f0, 0(CARG2) | bney ->BC_CAT_Z | stfdx f0, BASE, RA | b ->cont_nop | |//-- Table indexing metamethods ----------------------------------------- | |->vmeta_tgets1: | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | li TMP0, LJ_TSTR | decode_RB8 RB, INS | stw STR:RC, 4(CARG3) | add CARG2, BASE, RB | stw TMP0, 0(CARG3) | b >1 | |->vmeta_tgets: | la CARG2, DISPATCH_GL(tmptv)(DISPATCH) | li TMP0, LJ_TTAB | stw TAB:RB, 4(CARG2) | la CARG3, DISPATCH_GL(tmptv2)(DISPATCH) | stw TMP0, 0(CARG2) | li TMP1, LJ_TSTR | stw STR:RC, 4(CARG3) | stw TMP1, 0(CARG3) | b >1 | |->vmeta_tgetb: // TMP0 = index |.if not DUALNUM | tonum_u f0, TMP0 |.endif | decode_RB8 RB, INS | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | add CARG2, BASE, RB |.if DUALNUM | stw TISNUM, 0(CARG3) | stw TMP0, 4(CARG3) |.else | stfd f0, 0(CARG3) |.endif | b >1 | |->vmeta_tgetv: | decode_RB8 RB, INS | decode_RC8 RC, INS | add CARG2, BASE, RB | add CARG3, BASE, RC |1: | stp BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_tget // (lua_State *L, TValue *o, TValue *k) | // Returns TValue * (finished) or NULL (metamethod). | cmplwi CRET1, 0 | beq >3 | lfd f0, 0(CRET1) | ins_next1 | stfdx f0, BASE, RA | ins_next2 | |3: // Call __index metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k | subfic TMP1, BASE, FRAME_CONT | lp BASE, L->top | stw PC, -16(BASE) // [cont|PC] | add PC, TMP1, BASE | lwz LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | li NARGS8:RC, 16 // 2 args for func(t, k). | b ->vm_call_dispatch_f | |//----------------------------------------------------------------------- | |->vmeta_tsets1: | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | li TMP0, LJ_TSTR | decode_RB8 RB, INS | stw STR:RC, 4(CARG3) | add CARG2, BASE, RB | stw TMP0, 0(CARG3) | b >1 | |->vmeta_tsets: | la CARG2, DISPATCH_GL(tmptv)(DISPATCH) | li TMP0, LJ_TTAB | stw TAB:RB, 4(CARG2) | la CARG3, DISPATCH_GL(tmptv2)(DISPATCH) | stw TMP0, 0(CARG2) | li TMP1, LJ_TSTR | stw STR:RC, 4(CARG3) | stw TMP1, 0(CARG3) | b >1 | |->vmeta_tsetb: // TMP0 = index |.if not DUALNUM | tonum_u f0, TMP0 |.endif | decode_RB8 RB, INS | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | add CARG2, BASE, RB |.if DUALNUM | stw TISNUM, 0(CARG3) | stw TMP0, 4(CARG3) |.else | stfd f0, 0(CARG3) |.endif | b >1 | |->vmeta_tsetv: | decode_RB8 RB, INS | decode_RC8 RC, INS | add CARG2, BASE, RB | add CARG3, BASE, RC |1: | stp BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_tset // (lua_State *L, TValue *o, TValue *k) | // Returns TValue * (finished) or NULL (metamethod). | cmplwi CRET1, 0 | lfdx f0, BASE, RA | beq >3 | // NOBARRIER: lj_meta_tset ensures the table is not black. | ins_next1 | stfd f0, 0(CRET1) | ins_next2 | |3: // Call __newindex metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k/(v) | subfic TMP1, BASE, FRAME_CONT | lp BASE, L->top | stw PC, -16(BASE) // [cont|PC] | add PC, TMP1, BASE | lwz LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | li NARGS8:RC, 24 // 3 args for func(t, k, v) | stfd f0, 16(BASE) // Copy value to third argument. | b ->vm_call_dispatch_f | |//-- Comparison metamethods --------------------------------------------- | |->vmeta_comp: | mr CARG1, L | subi PC, PC, 4 |.if DUALNUM | mr CARG2, RA |.else | add CARG2, BASE, RA |.endif | stw PC, SAVE_PC |.if DUALNUM | mr CARG3, RD |.else | add CARG3, BASE, RD |.endif | stp BASE, L->base | decode_OP1 CARG4, INS | bl extern lj_meta_comp // (lua_State *L, TValue *o1, *o2, int op) | // Returns 0/1 or TValue * (metamethod). |3: | cmplwi CRET1, 1 | bgt ->vmeta_binop | subfic CRET1, CRET1, 0 |4: | lwz INS, 0(PC) | addi PC, PC, 4 | decode_RD4 TMP2, INS | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) | and TMP2, TMP2, CRET1 | add PC, PC, TMP2 |->cont_nop: | ins_next | |->cont_ra: // RA = resultptr | lwz INS, -4(PC) | lfd f0, 0(RA) | decode_RA8 TMP1, INS | stfdx f0, BASE, TMP1 | b ->cont_nop | |->cont_condt: // RA = resultptr | lwz TMP0, 0(RA) | .gpr64 extsw TMP0, TMP0 | subfic TMP0, TMP0, LJ_TTRUE // Branch if result is true. | subfe CRET1, CRET1, CRET1 | not CRET1, CRET1 | b <4 | |->cont_condf: // RA = resultptr | lwz TMP0, 0(RA) | .gpr64 extsw TMP0, TMP0 | subfic TMP0, TMP0, LJ_TTRUE // Branch if result is false. | subfe CRET1, CRET1, CRET1 | b <4 | |->vmeta_equal: | // CARG2, CARG3, CARG4 are already set by BC_ISEQV/BC_ISNEV. | subi PC, PC, 4 | stp BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_equal // (lua_State *L, GCobj *o1, *o2, int ne) | // Returns 0/1 or TValue * (metamethod). | b <3 | |->vmeta_equal_cd: |.if FFI | mr CARG2, INS | subi PC, PC, 4 | stp BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_equal_cd // (lua_State *L, BCIns op) | // Returns 0/1 or TValue * (metamethod). | b <3 |.endif | |//-- Arithmetic metamethods --------------------------------------------- | |->vmeta_arith_nv: | add CARG3, KBASE, RC | add CARG4, BASE, RB | b >1 |->vmeta_arith_nv2: |.if DUALNUM | mr CARG3, RC | mr CARG4, RB | b >1 |.endif | |->vmeta_unm: | mr CARG3, RD | mr CARG4, RD | b >1 | |->vmeta_arith_vn: | add CARG3, BASE, RB | add CARG4, KBASE, RC | b >1 | |->vmeta_arith_vv: | add CARG3, BASE, RB | add CARG4, BASE, RC |.if DUALNUM | b >1 |.endif |->vmeta_arith_vn2: |->vmeta_arith_vv2: |.if DUALNUM | mr CARG3, RB | mr CARG4, RC |.endif |1: | add CARG2, BASE, RA | stp BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | decode_OP1 CARG5, INS // Caveat: CARG5 overlaps INS. | bl extern lj_meta_arith // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) | // Returns NULL (finished) or TValue * (metamethod). | cmplwi CRET1, 0 | beq ->cont_nop | | // Call metamethod for binary op. |->vmeta_binop: | // BASE = old base, CRET1 = new base, stack = cont/func/o1/o2 | sub TMP1, CRET1, BASE | stw PC, -16(CRET1) // [cont|PC] | mr TMP2, BASE | addi PC, TMP1, FRAME_CONT | mr BASE, CRET1 | li NARGS8:RC, 16 // 2 args for func(o1, o2). | b ->vm_call_dispatch | |->vmeta_len: #if LJ_52 | mr SAVE0, CARG1 #endif | mr CARG2, RD | stp BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_len // (lua_State *L, TValue *o) | // Returns NULL (retry) or TValue * (metamethod base). #if LJ_52 | cmplwi CRET1, 0 | bne ->vmeta_binop // Binop call for compatibility. | mr CARG1, SAVE0 | b ->BC_LEN_Z #else | b ->vmeta_binop // Binop call for compatibility. #endif | |//-- Call metamethod ---------------------------------------------------- | |->vmeta_call: // Resolve and call __call metamethod. | // TMP2 = old base, BASE = new base, RC = nargs*8 | mr CARG1, L | stp TMP2, L->base // This is the callers base! | subi CARG2, BASE, 8 | stw PC, SAVE_PC | add CARG3, BASE, RC | mr SAVE0, NARGS8:RC | bl extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) | lwz LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | addi NARGS8:RC, SAVE0, 8 // Got one more argument now. | ins_call | |->vmeta_callt: // Resolve __call for BC_CALLT. | // BASE = old base, RA = new base, RC = nargs*8 | mr CARG1, L | stp BASE, L->base | subi CARG2, RA, 8 | stw PC, SAVE_PC | add CARG3, RA, RC | mr SAVE0, NARGS8:RC | bl extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) | lwz TMP1, FRAME_PC(BASE) | addi NARGS8:RC, SAVE0, 8 // Got one more argument now. | lwz LFUNC:RB, FRAME_FUNC(RA) // Guaranteed to be a function here. | b ->BC_CALLT_Z | |//-- Argument coercion for 'for' statement ------------------------------ | |->vmeta_for: | mr CARG1, L | stp BASE, L->base | mr CARG2, RA | stw PC, SAVE_PC | mr SAVE0, INS | bl extern lj_meta_for // (lua_State *L, TValue *base) |.if JIT | decode_OP1 TMP0, SAVE0 |.endif | decode_RA8 RA, SAVE0 |.if JIT | cmpwi TMP0, BC_JFORI |.endif | decode_RD8 RD, SAVE0 |.if JIT | beqy =>BC_JFORI |.endif | b =>BC_FORI | |//----------------------------------------------------------------------- |//-- Fast functions ----------------------------------------------------- |//----------------------------------------------------------------------- | |.macro .ffunc, name |->ff_ .. name: |.endmacro | |.macro .ffunc_1, name |->ff_ .. name: | cmplwi NARGS8:RC, 8 | lwz CARG3, 0(BASE) | lwz CARG1, 4(BASE) | blt ->fff_fallback |.endmacro | |.macro .ffunc_2, name |->ff_ .. name: | cmplwi NARGS8:RC, 16 | lwz CARG3, 0(BASE) | lwz CARG4, 8(BASE) | lwz CARG1, 4(BASE) | lwz CARG2, 12(BASE) | blt ->fff_fallback |.endmacro | |.macro .ffunc_n, name |->ff_ .. name: | cmplwi NARGS8:RC, 8 | lwz CARG3, 0(BASE) | lfd FARG1, 0(BASE) | blt ->fff_fallback | checknum CARG3; bge ->fff_fallback |.endmacro | |.macro .ffunc_nn, name |->ff_ .. name: | cmplwi NARGS8:RC, 16 | lwz CARG3, 0(BASE) | lfd FARG1, 0(BASE) | lwz CARG4, 8(BASE) | lfd FARG2, 8(BASE) | blt ->fff_fallback | checknum CARG3; bge ->fff_fallback | checknum CARG4; bge ->fff_fallback |.endmacro | |// Inlined GC threshold check. Caveat: uses TMP0 and TMP1. |.macro ffgccheck | lwz TMP0, DISPATCH_GL(gc.total)(DISPATCH) | lwz TMP1, DISPATCH_GL(gc.threshold)(DISPATCH) | cmplw TMP0, TMP1 | bgel ->fff_gcstep |.endmacro | |//-- Base library: checks ----------------------------------------------- | |.ffunc_1 assert | li TMP1, LJ_TFALSE | la RA, -8(BASE) | cmplw cr1, CARG3, TMP1 | lwz PC, FRAME_PC(BASE) | bge cr1, ->fff_fallback | stw CARG3, 0(RA) | addi RD, NARGS8:RC, 8 // Compute (nresults+1)*8. | stw CARG1, 4(RA) | beq ->fff_res // Done if exactly 1 argument. | li TMP1, 8 | subi RC, RC, 8 |1: | cmplw TMP1, RC | lfdx f0, BASE, TMP1 | stfdx f0, RA, TMP1 | addi TMP1, TMP1, 8 | bney <1 | b ->fff_res | |.ffunc type | cmplwi NARGS8:RC, 8 | lwz CARG1, 0(BASE) | blt ->fff_fallback | .gpr64 extsw CARG1, CARG1 | subfc TMP0, TISNUM, CARG1 | subfe TMP2, CARG1, CARG1 | orc TMP1, TMP2, TMP0 | addi TMP1, TMP1, ~LJ_TISNUM+1 | slwi TMP1, TMP1, 3 | la TMP2, CFUNC:RB->upvalue | lfdx FARG1, TMP2, TMP1 | b ->fff_resn | |//-- Base library: getters and setters --------------------------------- | |.ffunc_1 getmetatable | checktab CARG3; bne >6 |1: // Field metatable must be at same offset for GCtab and GCudata! | lwz TAB:CARG1, TAB:CARG1->metatable |2: | li CARG3, LJ_TNIL | cmplwi TAB:CARG1, 0 | lwz STR:RC, DISPATCH_GL(gcroot[GCROOT_MMNAME+MM_metatable])(DISPATCH) | beq ->fff_restv | lwz TMP0, TAB:CARG1->hmask | li CARG3, LJ_TTAB // Use metatable as default result. | lwz TMP1, STR:RC->hash | lwz NODE:TMP2, TAB:CARG1->node | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | slwi TMP0, TMP1, 5 | slwi TMP1, TMP1, 3 | sub TMP1, TMP0, TMP1 | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) |3: // Rearranged logic, because we expect _not_ to find the key. | lwz CARG4, NODE:TMP2->key | lwz TMP0, 4+offsetof(Node, key)(NODE:TMP2) | lwz CARG2, NODE:TMP2->val | lwz TMP1, 4+offsetof(Node, val)(NODE:TMP2) | checkstr CARG4; bne >4 | cmpw TMP0, STR:RC; beq >5 |4: | lwz NODE:TMP2, NODE:TMP2->next | cmplwi NODE:TMP2, 0 | beq ->fff_restv // Not found, keep default result. | b <3 |5: | checknil CARG2 | beq ->fff_restv // Ditto for nil value. | mr CARG3, CARG2 // Return value of mt.__metatable. | mr CARG1, TMP1 | b ->fff_restv | |6: | cmpwi CARG3, LJ_TUDATA; beq <1 | .gpr64 extsw CARG3, CARG3 | subfc TMP0, TISNUM, CARG3 | subfe TMP2, CARG3, CARG3 | orc TMP1, TMP2, TMP0 | addi TMP1, TMP1, ~LJ_TISNUM+1 | slwi TMP1, TMP1, 2 | la TMP2, DISPATCH_GL(gcroot[GCROOT_BASEMT])(DISPATCH) | lwzx TAB:CARG1, TMP2, TMP1 | b <2 | |.ffunc_2 setmetatable | // Fast path: no mt for table yet and not clearing the mt. | checktab CARG3; bne ->fff_fallback | lwz TAB:TMP1, TAB:CARG1->metatable | checktab CARG4; bne ->fff_fallback | cmplwi TAB:TMP1, 0 | lbz TMP3, TAB:CARG1->marked | bne ->fff_fallback | andix. TMP0, TMP3, LJ_GC_BLACK // isblack(table) | stw TAB:CARG2, TAB:CARG1->metatable | beq ->fff_restv | barrierback TAB:CARG1, TMP3, TMP0 | b ->fff_restv | |.ffunc rawget | cmplwi NARGS8:RC, 16 | lwz CARG4, 0(BASE) | lwz TAB:CARG2, 4(BASE) | blt ->fff_fallback | checktab CARG4; bne ->fff_fallback | la CARG3, 8(BASE) | mr CARG1, L | bl extern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) | // Returns cTValue *. | lfd FARG1, 0(CRET1) | b ->fff_resn | |//-- Base library: conversions ------------------------------------------ | |.ffunc tonumber | // Only handles the number case inline (without a base argument). | cmplwi NARGS8:RC, 8 | lwz CARG1, 0(BASE) | lfd FARG1, 0(BASE) | bne ->fff_fallback // Exactly one argument. | checknum CARG1; bgt ->fff_fallback | b ->fff_resn | |.ffunc_1 tostring | // Only handles the string or number case inline. | checkstr CARG3 | // A __tostring method in the string base metatable is ignored. | beq ->fff_restv // String key? | // Handle numbers inline, unless a number base metatable is present. | lwz TMP0, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM])(DISPATCH) | checknum CARG3 | cmplwi cr1, TMP0, 0 | stp BASE, L->base // Add frame since C call can throw. | crorc 4*cr0+eq, 4*cr0+gt, 4*cr1+eq | stw PC, SAVE_PC // Redundant (but a defined value). | beq ->fff_fallback | ffgccheck | mr CARG1, L | mr CARG2, BASE |.if DUALNUM | bl extern lj_str_fromnumber // (lua_State *L, cTValue *o) |.else | bl extern lj_str_fromnum // (lua_State *L, lua_Number *np) |.endif | // Returns GCstr *. | li CARG3, LJ_TSTR | b ->fff_restv | |//-- Base library: iterators ------------------------------------------- | |.ffunc next | cmplwi NARGS8:RC, 8 | lwz CARG1, 0(BASE) | lwz TAB:CARG2, 4(BASE) | blt ->fff_fallback | stwx TISNIL, BASE, NARGS8:RC // Set missing 2nd arg to nil. | checktab CARG1 | lwz PC, FRAME_PC(BASE) | bne ->fff_fallback | stp BASE, L->base // Add frame since C call can throw. | mr CARG1, L | stp BASE, L->top // Dummy frame length is ok. | la CARG3, 8(BASE) | stw PC, SAVE_PC | bl extern lj_tab_next // (lua_State *L, GCtab *t, TValue *key) | // Returns 0 at end of traversal. | cmplwi CRET1, 0 | li CARG3, LJ_TNIL | beq ->fff_restv // End of traversal: return nil. | lfd f0, 8(BASE) // Copy key and value to results. | la RA, -8(BASE) | lfd f1, 16(BASE) | stfd f0, 0(RA) | li RD, (2+1)*8 | stfd f1, 8(RA) | b ->fff_res | |.ffunc_1 pairs | checktab CARG3 | lwz PC, FRAME_PC(BASE) | bne ->fff_fallback #if LJ_52 | lwz TAB:TMP2, TAB:CARG1->metatable | lfd f0, CFUNC:RB->upvalue[0] | cmplwi TAB:TMP2, 0 | la RA, -8(BASE) | bne ->fff_fallback #else | lfd f0, CFUNC:RB->upvalue[0] | la RA, -8(BASE) #endif | stw TISNIL, 8(BASE) | li RD, (3+1)*8 | stfd f0, 0(RA) | b ->fff_res | |.ffunc ipairs_aux | cmplwi NARGS8:RC, 16 | lwz CARG3, 0(BASE) | lwz TAB:CARG1, 4(BASE) | lwz CARG4, 8(BASE) |.if DUALNUM | lwz TMP2, 12(BASE) |.else | lfd FARG2, 8(BASE) |.endif | blt ->fff_fallback | checktab CARG3 | checknum cr1, CARG4 | lwz PC, FRAME_PC(BASE) |.if DUALNUM | bne ->fff_fallback | bne cr1, ->fff_fallback |.else | lus TMP0, 0x3ff0 | stw ZERO, TMPD_LO | bne ->fff_fallback | stw TMP0, TMPD_HI | bge cr1, ->fff_fallback | lfd FARG1, TMPD | toint TMP2, FARG2, f0 |.endif | lwz TMP0, TAB:CARG1->asize | lwz TMP1, TAB:CARG1->array |.if not DUALNUM | fadd FARG2, FARG2, FARG1 |.endif | addi TMP2, TMP2, 1 | la RA, -8(BASE) | cmplw TMP0, TMP2 |.if DUALNUM | stw TISNUM, 0(RA) | slwi TMP3, TMP2, 3 | stw TMP2, 4(RA) |.else | slwi TMP3, TMP2, 3 | stfd FARG2, 0(RA) |.endif | ble >2 // Not in array part? | lwzx TMP2, TMP1, TMP3 | lfdx f0, TMP1, TMP3 |1: | checknil TMP2 | li RD, (0+1)*8 | beq ->fff_res // End of iteration, return 0 results. | li RD, (2+1)*8 | stfd f0, 8(RA) | b ->fff_res |2: // Check for empty hash part first. Otherwise call C function. | lwz TMP0, TAB:CARG1->hmask | cmplwi TMP0, 0 | li RD, (0+1)*8 | beq ->fff_res | mr CARG2, TMP2 | bl extern lj_tab_getinth // (GCtab *t, int32_t key) | // Returns cTValue * or NULL. | cmplwi CRET1, 0 | li RD, (0+1)*8 | beq ->fff_res | lwz TMP2, 0(CRET1) | lfd f0, 0(CRET1) | b <1 | |.ffunc_1 ipairs | checktab CARG3 | lwz PC, FRAME_PC(BASE) | bne ->fff_fallback #if LJ_52 | lwz TAB:TMP2, TAB:CARG1->metatable | lfd f0, CFUNC:RB->upvalue[0] | cmplwi TAB:TMP2, 0 | la RA, -8(BASE) | bne ->fff_fallback #else | lfd f0, CFUNC:RB->upvalue[0] | la RA, -8(BASE) #endif |.if DUALNUM | stw TISNUM, 8(BASE) |.else | stw ZERO, 8(BASE) |.endif | stw ZERO, 12(BASE) | li RD, (3+1)*8 | stfd f0, 0(RA) | b ->fff_res | |//-- Base library: catch errors ---------------------------------------- | |.ffunc pcall | cmplwi NARGS8:RC, 8 | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | blt ->fff_fallback | mr TMP2, BASE | la BASE, 8(BASE) | // Remember active hook before pcall. | rlwinm TMP3, TMP3, 32-HOOK_ACTIVE_SHIFT, 31, 31 | subi NARGS8:RC, NARGS8:RC, 8 | addi PC, TMP3, 8+FRAME_PCALL | b ->vm_call_dispatch | |.ffunc xpcall | cmplwi NARGS8:RC, 16 | lwz CARG4, 8(BASE) | lfd FARG2, 8(BASE) | lfd FARG1, 0(BASE) | blt ->fff_fallback | lbz TMP1, DISPATCH_GL(hookmask)(DISPATCH) | mr TMP2, BASE | checkfunc CARG4; bne ->fff_fallback // Traceback must be a function. | la BASE, 16(BASE) | // Remember active hook before pcall. | rlwinm TMP1, TMP1, 32-HOOK_ACTIVE_SHIFT, 31, 31 | stfd FARG2, 0(TMP2) // Swap function and traceback. | subi NARGS8:RC, NARGS8:RC, 16 | stfd FARG1, 8(TMP2) | addi PC, TMP1, 16+FRAME_PCALL | b ->vm_call_dispatch | |//-- Coroutine library -------------------------------------------------- | |.macro coroutine_resume_wrap, resume |.if resume |.ffunc_1 coroutine_resume | cmpwi CARG3, LJ_TTHREAD; bne ->fff_fallback |.else |.ffunc coroutine_wrap_aux | lwz L:CARG1, CFUNC:RB->upvalue[0].gcr |.endif | lbz TMP0, L:CARG1->status | lp TMP1, L:CARG1->cframe | lp CARG2, L:CARG1->top | cmplwi cr0, TMP0, LUA_YIELD | lp TMP2, L:CARG1->base | cmplwi cr1, TMP1, 0 | lwz TMP0, L:CARG1->maxstack | cmplw cr7, CARG2, TMP2 | lwz PC, FRAME_PC(BASE) | crorc 4*cr6+lt, 4*cr0+gt, 4*cr1+eq // st>LUA_YIELD || cframe!=0 | add TMP2, CARG2, NARGS8:RC | crandc 4*cr6+gt, 4*cr7+eq, 4*cr0+eq // base==top && st!=LUA_YIELD | cmplw cr1, TMP2, TMP0 | cror 4*cr6+lt, 4*cr6+lt, 4*cr6+gt | stw PC, SAVE_PC | cror 4*cr6+lt, 4*cr6+lt, 4*cr1+gt // cond1 || cond2 || stackov | stp BASE, L->base | blt cr6, ->fff_fallback |1: |.if resume | addi BASE, BASE, 8 // Keep resumed thread in stack for GC. | subi NARGS8:RC, NARGS8:RC, 8 | subi TMP2, TMP2, 8 |.endif | stp TMP2, L:CARG1->top | li TMP1, 0 | stp BASE, L->top |2: // Move args to coroutine. | cmpw TMP1, NARGS8:RC | lfdx f0, BASE, TMP1 | beq >3 | stfdx f0, CARG2, TMP1 | addi TMP1, TMP1, 8 | b <2 |3: | li CARG3, 0 | mr L:SAVE0, L:CARG1 | li CARG4, 0 | bl ->vm_resume // (lua_State *L, TValue *base, 0, 0) | // Returns thread status. |4: | lp TMP2, L:SAVE0->base | cmplwi CRET1, LUA_YIELD | lp TMP3, L:SAVE0->top | li_vmstate INTERP | lp BASE, L->base | st_vmstate | bgt >8 | sub RD, TMP3, TMP2 | lwz TMP0, L->maxstack | cmplwi RD, 0 | add TMP1, BASE, RD | beq >6 // No results? | cmplw TMP1, TMP0 | li TMP1, 0 | bgt >9 // Need to grow stack? | | subi TMP3, RD, 8 | stp TMP2, L:SAVE0->top // Clear coroutine stack. |5: // Move results from coroutine. | cmplw TMP1, TMP3 | lfdx f0, TMP2, TMP1 | stfdx f0, BASE, TMP1 | addi TMP1, TMP1, 8 | bne <5 |6: | andix. TMP0, PC, FRAME_TYPE |.if resume | li TMP1, LJ_TTRUE | la RA, -8(BASE) | stw TMP1, -8(BASE) // Prepend true to results. | addi RD, RD, 16 |.else | mr RA, BASE | addi RD, RD, 8 |.endif |7: | stw PC, SAVE_PC | mr MULTRES, RD | beq ->BC_RET_Z | b ->vm_return | |8: // Coroutine returned with error (at co->top-1). |.if resume | andix. TMP0, PC, FRAME_TYPE | la TMP3, -8(TMP3) | li TMP1, LJ_TFALSE | lfd f0, 0(TMP3) | stp TMP3, L:SAVE0->top // Remove error from coroutine stack. | li RD, (2+1)*8 | stw TMP1, -8(BASE) // Prepend false to results. | la RA, -8(BASE) | stfd f0, 0(BASE) // Copy error message. | b <7 |.else | mr CARG1, L | mr CARG2, L:SAVE0 | bl extern lj_ffh_coroutine_wrap_err // (lua_State *L, lua_State *co) |.endif | |9: // Handle stack expansion on return from yield. | mr CARG1, L | srwi CARG2, RD, 3 | bl extern lj_state_growstack // (lua_State *L, int n) | li CRET1, 0 | b <4 |.endmacro | | coroutine_resume_wrap 1 // coroutine.resume | coroutine_resume_wrap 0 // coroutine.wrap | |.ffunc coroutine_yield | lp TMP0, L->cframe | add TMP1, BASE, NARGS8:RC | stp BASE, L->base | andix. TMP0, TMP0, CFRAME_RESUME | stp TMP1, L->top | li CRET1, LUA_YIELD | beq ->fff_fallback | stp ZERO, L->cframe | stb CRET1, L->status | b ->vm_leave_unw | |//-- Math library ------------------------------------------------------- | |.ffunc_1 math_abs | checknum CARG3 |.if DUALNUM | bne >2 | srawi TMP1, CARG1, 31 | xor TMP2, TMP1, CARG1 |.if GPR64 | lus TMP0, 0x8000 | sub CARG1, TMP2, TMP1 | cmplw CARG1, TMP0 | beq >1 |.else | sub. CARG1, TMP2, TMP1 | blt >1 |.endif |->fff_resi: | lwz PC, FRAME_PC(BASE) | la RA, -8(BASE) | stw TISNUM, -8(BASE) | stw CRET1, -4(BASE) | b ->fff_res1 |1: | lus CARG3, 0x41e0 // 2^31. | li CARG1, 0 | b ->fff_restv |2: |.endif | bge ->fff_fallback | rlwinm CARG3, CARG3, 0, 1, 31 | // Fallthrough. | |->fff_restv: | // CARG3/CARG1 = TValue result. | lwz PC, FRAME_PC(BASE) | stw CARG3, -8(BASE) | la RA, -8(BASE) | stw CARG1, -4(BASE) |->fff_res1: | // RA = results, PC = return. | li RD, (1+1)*8 |->fff_res: | // RA = results, RD = (nresults+1)*8, PC = return. | andix. TMP0, PC, FRAME_TYPE | mr MULTRES, RD | bney ->vm_return | lwz INS, -4(PC) | decode_RB8 RB, INS |5: | cmplw RB, RD // More results expected? | decode_RA8 TMP0, INS | bgt >6 | ins_next1 | // Adjust BASE. KBASE is assumed to be set for the calling frame. | sub BASE, RA, TMP0 | ins_next2 | |6: // Fill up results with nil. | subi TMP1, RD, 8 | addi RD, RD, 8 | stwx TISNIL, RA, TMP1 | b <5 | |.macro math_extern, func | .ffunc_n math_ .. func | blex func | b ->fff_resn |.endmacro | |.macro math_extern2, func | .ffunc_nn math_ .. func | blex func | b ->fff_resn |.endmacro | |.macro math_round, func | .ffunc_1 math_ .. func | checknum CARG3; beqy ->fff_restv | rlwinm TMP2, CARG3, 12, 21, 31 | bge ->fff_fallback | addic. TMP2, TMP2, -1023 // exp = exponent(x) - 1023 | cmplwi cr1, TMP2, 31 // 0 <= exp < 31? | subfic TMP0, TMP2, 31 | blt >3 | slwi TMP1, CARG3, 11 | srwi TMP3, CARG1, 21 | oris TMP1, TMP1, 0x8000 | addi TMP2, TMP2, 1 | or TMP1, TMP1, TMP3 | slwi CARG2, CARG1, 11 | bge cr1, >4 | slw TMP3, TMP1, TMP2 | srw RD, TMP1, TMP0 | or TMP3, TMP3, CARG2 | srawi TMP2, CARG3, 31 |.if "func" == "floor" | and TMP1, TMP3, TMP2 | addic TMP0, TMP1, -1 | subfe TMP1, TMP0, TMP1 | add CARG1, RD, TMP1 | xor CARG1, CARG1, TMP2 | sub CARG1, CARG1, TMP2 | b ->fff_resi |.else | andc TMP1, TMP3, TMP2 | addic TMP0, TMP1, -1 | subfe TMP1, TMP0, TMP1 | add CARG1, RD, TMP1 | cmpw CARG1, RD | xor CARG1, CARG1, TMP2 | sub CARG1, CARG1, TMP2 | bge ->fff_resi | // Overflow to 2^31. | lus CARG3, 0x41e0 // 2^31. | li CARG1, 0 | b ->fff_restv |.endif |3: // |x| < 1 | slwi TMP2, CARG3, 1 | srawi TMP1, CARG3, 31 | or TMP2, CARG1, TMP2 // ztest = (hi+hi) | lo |.if "func" == "floor" | and TMP1, TMP2, TMP1 // (ztest & sign) == 0 ? 0 : -1 | subfic TMP2, TMP1, 0 | subfe CARG1, CARG1, CARG1 |.else | andc TMP1, TMP2, TMP1 // (ztest & ~sign) == 0 ? 0 : 1 | addic TMP2, TMP1, -1 | subfe CARG1, TMP2, TMP1 |.endif | b ->fff_resi |4: // exp >= 31. Check for -(2^31). | xoris TMP1, TMP1, 0x8000 | srawi TMP2, CARG3, 31 |.if "func" == "floor" | or TMP1, TMP1, CARG2 |.endif |.if PPE | orc TMP1, TMP1, TMP2 | cmpwi TMP1, 0 |.else | orc. TMP1, TMP1, TMP2 |.endif | crand 4*cr0+eq, 4*cr0+eq, 4*cr1+eq | lus CARG1, 0x8000 // -(2^31). | beqy ->fff_resi |5: | lfd FARG1, 0(BASE) | blex func | b ->fff_resn |.endmacro | |.if DUALNUM | math_round floor | math_round ceil |.else | // NYI: use internal implementation. | math_extern floor | math_extern ceil |.endif | |.if SQRT |.ffunc_n math_sqrt | fsqrt FARG1, FARG1 | b ->fff_resn |.else | math_extern sqrt |.endif | |.ffunc math_log | cmplwi NARGS8:RC, 8 | lwz CARG3, 0(BASE) | lfd FARG1, 0(BASE) | bne ->fff_fallback // Need exactly 1 argument. | checknum CARG3; bge ->fff_fallback | blex log | b ->fff_resn | | math_extern log10 | math_extern exp | math_extern sin | math_extern cos | math_extern tan | math_extern asin | math_extern acos | math_extern atan | math_extern sinh | math_extern cosh | math_extern tanh | math_extern2 pow | math_extern2 atan2 | math_extern2 fmod | |->ff_math_deg: |.ffunc_n math_rad | lfd FARG2, CFUNC:RB->upvalue[0] | fmul FARG1, FARG1, FARG2 | b ->fff_resn | |.if DUALNUM |.ffunc math_ldexp | cmplwi NARGS8:RC, 16 | lwz CARG3, 0(BASE) | lfd FARG1, 0(BASE) | lwz CARG4, 8(BASE) |.if GPR64 | lwz CARG2, 12(BASE) |.else | lwz CARG1, 12(BASE) |.endif | blt ->fff_fallback | checknum CARG3; bge ->fff_fallback | checknum CARG4; bne ->fff_fallback |.else |.ffunc_nn math_ldexp |.if GPR64 | toint CARG2, FARG2 |.else | toint CARG1, FARG2 |.endif |.endif | blex ldexp | b ->fff_resn | |.ffunc_n math_frexp |.if GPR64 | la CARG2, DISPATCH_GL(tmptv)(DISPATCH) |.else | la CARG1, DISPATCH_GL(tmptv)(DISPATCH) |.endif | lwz PC, FRAME_PC(BASE) | blex frexp | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) | la RA, -8(BASE) |.if not DUALNUM | tonum_i FARG2, TMP1 |.endif | stfd FARG1, 0(RA) | li RD, (2+1)*8 |.if DUALNUM | stw TISNUM, 8(RA) | stw TMP1, 12(RA) |.else | stfd FARG2, 8(RA) |.endif | b ->fff_res | |.ffunc_n math_modf |.if GPR64 | la CARG2, -8(BASE) |.else | la CARG1, -8(BASE) |.endif | lwz PC, FRAME_PC(BASE) | blex modf | la RA, -8(BASE) | stfd FARG1, 0(BASE) | li RD, (2+1)*8 | b ->fff_res | |.macro math_minmax, name, ismax |.if DUALNUM | .ffunc_1 name | checknum CARG3 | addi TMP1, BASE, 8 | add TMP2, BASE, NARGS8:RC | bne >4 |1: // Handle integers. | lwz CARG4, 0(TMP1) | cmplw cr1, TMP1, TMP2 | lwz CARG2, 4(TMP1) | bge cr1, ->fff_resi | checknum CARG4 | xoris TMP0, CARG1, 0x8000 | xoris TMP3, CARG2, 0x8000 | bne >3 | subfc TMP3, TMP3, TMP0 | subfe TMP0, TMP0, TMP0 |.if ismax | andc TMP3, TMP3, TMP0 |.else | and TMP3, TMP3, TMP0 |.endif | add CARG1, TMP3, CARG2 |.if GPR64 | rldicl CARG1, CARG1, 0, 32 |.endif | addi TMP1, TMP1, 8 | b <1 |3: | bge ->fff_fallback | // Convert intermediate result to number and continue below. | tonum_i FARG1, CARG1 | lfd FARG2, 0(TMP1) | b >6 |4: | lfd FARG1, 0(BASE) | bge ->fff_fallback |5: // Handle numbers. | lwz CARG4, 0(TMP1) | cmplw cr1, TMP1, TMP2 | lfd FARG2, 0(TMP1) | bge cr1, ->fff_resn | checknum CARG4; bge >7 |6: | fsub f0, FARG1, FARG2 | addi TMP1, TMP1, 8 |.if ismax | fsel FARG1, f0, FARG1, FARG2 |.else | fsel FARG1, f0, FARG2, FARG1 |.endif | b <5 |7: // Convert integer to number and continue above. | lwz CARG2, 4(TMP1) | bne ->fff_fallback | tonum_i FARG2, CARG2 | b <6 |.else | .ffunc_n name | li TMP1, 8 |1: | lwzx CARG2, BASE, TMP1 | lfdx FARG2, BASE, TMP1 | cmplw cr1, TMP1, NARGS8:RC | checknum CARG2 | bge cr1, ->fff_resn | bge ->fff_fallback | fsub f0, FARG1, FARG2 | addi TMP1, TMP1, 8 |.if ismax | fsel FARG1, f0, FARG1, FARG2 |.else | fsel FARG1, f0, FARG2, FARG1 |.endif | b <1 |.endif |.endmacro | | math_minmax math_min, 0 | math_minmax math_max, 1 | |//-- String library ----------------------------------------------------- | |.ffunc_1 string_len | checkstr CARG3; bne ->fff_fallback | lwz CRET1, STR:CARG1->len | b ->fff_resi | |.ffunc string_byte // Only handle the 1-arg case here. | cmplwi NARGS8:RC, 8 | lwz CARG3, 0(BASE) | lwz STR:CARG1, 4(BASE) | bne ->fff_fallback // Need exactly 1 argument. | checkstr CARG3 | bne ->fff_fallback | lwz TMP0, STR:CARG1->len |.if DUALNUM | lbz CARG1, STR:CARG1[1] // Access is always ok (NUL at end). | li RD, (0+1)*8 | lwz PC, FRAME_PC(BASE) | cmplwi TMP0, 0 | la RA, -8(BASE) | beqy ->fff_res | b ->fff_resi |.else | lbz TMP1, STR:CARG1[1] // Access is always ok (NUL at end). | addic TMP3, TMP0, -1 // RD = ((str->len != 0)+1)*8 | subfe RD, TMP3, TMP0 | stw TMP1, TONUM_LO // Inlined tonum_u f0, TMP1. | addi RD, RD, 1 | lfd f0, TONUM_D | la RA, -8(BASE) | lwz PC, FRAME_PC(BASE) | fsub f0, f0, TOBIT | slwi RD, RD, 3 | stfd f0, 0(RA) | b ->fff_res |.endif | |.ffunc string_char // Only handle the 1-arg case here. | ffgccheck | cmplwi NARGS8:RC, 8 | lwz CARG3, 0(BASE) |.if DUALNUM | lwz TMP0, 4(BASE) | bne ->fff_fallback // Exactly 1 argument. | checknum CARG3; bne ->fff_fallback | la CARG2, 7(BASE) |.else | lfd FARG1, 0(BASE) | bne ->fff_fallback // Exactly 1 argument. | checknum CARG3; bge ->fff_fallback | toint TMP0, FARG1 | la CARG2, TMPD_BLO |.endif | li CARG3, 1 | cmplwi TMP0, 255; bgt ->fff_fallback |->fff_newstr: | mr CARG1, L | stp BASE, L->base | stw PC, SAVE_PC | bl extern lj_str_new // (lua_State *L, char *str, size_t l) | // Returns GCstr *. | lp BASE, L->base | li CARG3, LJ_TSTR | b ->fff_restv | |.ffunc string_sub | ffgccheck | cmplwi NARGS8:RC, 16 | lwz CARG3, 16(BASE) |.if not DUALNUM | lfd f0, 16(BASE) |.endif | lwz TMP0, 0(BASE) | lwz STR:CARG1, 4(BASE) | blt ->fff_fallback | lwz CARG2, 8(BASE) |.if DUALNUM | lwz TMP1, 12(BASE) |.else | lfd f1, 8(BASE) |.endif | li TMP2, -1 | beq >1 |.if DUALNUM | checknum CARG3 | lwz TMP2, 20(BASE) | bne ->fff_fallback |1: | checknum CARG2; bne ->fff_fallback |.else | checknum CARG3; bge ->fff_fallback | toint TMP2, f0 |1: | checknum CARG2; bge ->fff_fallback |.endif | checkstr TMP0; bne ->fff_fallback |.if not DUALNUM | toint TMP1, f1 |.endif | lwz TMP0, STR:CARG1->len | cmplw TMP0, TMP2 // len < end? (unsigned compare) | addi TMP3, TMP2, 1 | blt >5 |2: | cmpwi TMP1, 0 // start <= 0? | add TMP3, TMP1, TMP0 | ble >7 |3: | sub CARG3, TMP2, TMP1 | addi CARG2, STR:CARG1, #STR-1 | srawi TMP0, CARG3, 31 | addi CARG3, CARG3, 1 | add CARG2, CARG2, TMP1 | andc CARG3, CARG3, TMP0 |.if GPR64 | rldicl CARG2, CARG2, 0, 32 | rldicl CARG3, CARG3, 0, 32 |.endif | b ->fff_newstr | |5: // Negative end or overflow. | cmpw TMP0, TMP2 // len >= end? (signed compare) | add TMP2, TMP0, TMP3 // Negative end: end = end+len+1. | bge <2 | mr TMP2, TMP0 // Overflow: end = len. | b <2 | |7: // Negative start or underflow. | .gpr64 extsw TMP1, TMP1 | addic CARG3, TMP1, -1 | subfe CARG3, CARG3, CARG3 | srawi CARG2, TMP3, 31 // Note: modifies carry. | andc TMP3, TMP3, CARG3 | andc TMP1, TMP3, CARG2 | addi TMP1, TMP1, 1 // start = 1 + (start ? start+len : 0) | b <3 | |.ffunc string_rep // Only handle the 1-char case inline. | ffgccheck | cmplwi NARGS8:RC, 16 | lwz TMP0, 0(BASE) | lwz STR:CARG1, 4(BASE) | lwz CARG4, 8(BASE) |.if DUALNUM | lwz CARG3, 12(BASE) |.else | lfd FARG2, 8(BASE) |.endif | bne ->fff_fallback // Exactly 2 arguments. | checkstr TMP0; bne ->fff_fallback |.if DUALNUM | checknum CARG4; bne ->fff_fallback |.else | checknum CARG4; bge ->fff_fallback | toint CARG3, FARG2 |.endif | lwz TMP0, STR:CARG1->len | cmpwi CARG3, 0 | lwz TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | ble >2 // Count <= 0? (or non-int) | cmplwi TMP0, 1 | subi TMP2, CARG3, 1 | blt >2 // Zero length string? | cmplw cr1, TMP1, CARG3 | bne ->fff_fallback // Fallback for > 1-char strings. | lbz TMP0, STR:CARG1[1] | lp CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | blt cr1, ->fff_fallback |1: // Fill buffer with char. Yes, this is suboptimal code (do you care?). | cmplwi TMP2, 0 | stbx TMP0, CARG2, TMP2 | subi TMP2, TMP2, 1 | bne <1 | b ->fff_newstr |2: // Return empty string. | la STR:CARG1, DISPATCH_GL(strempty)(DISPATCH) | li CARG3, LJ_TSTR | b ->fff_restv | |.ffunc string_reverse | ffgccheck | cmplwi NARGS8:RC, 8 | lwz CARG3, 0(BASE) | lwz STR:CARG1, 4(BASE) | blt ->fff_fallback | checkstr CARG3 | lwz TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | bne ->fff_fallback | lwz CARG3, STR:CARG1->len | la CARG1, #STR(STR:CARG1) | lp CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | li TMP2, 0 | cmplw TMP1, CARG3 | subi TMP3, CARG3, 1 | blt ->fff_fallback |1: // Reverse string copy. | cmpwi TMP3, 0 | lbzx TMP1, CARG1, TMP2 | blty ->fff_newstr | stbx TMP1, CARG2, TMP3 | subi TMP3, TMP3, 1 | addi TMP2, TMP2, 1 | b <1 | |.macro ffstring_case, name, lo | .ffunc name | ffgccheck | cmplwi NARGS8:RC, 8 | lwz CARG3, 0(BASE) | lwz STR:CARG1, 4(BASE) | blt ->fff_fallback | checkstr CARG3 | lwz TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | bne ->fff_fallback | lwz CARG3, STR:CARG1->len | la CARG1, #STR(STR:CARG1) | lp CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | cmplw TMP1, CARG3 | li TMP2, 0 | blt ->fff_fallback |1: // ASCII case conversion. | cmplw TMP2, CARG3 | lbzx TMP1, CARG1, TMP2 | bgey ->fff_newstr | subi TMP0, TMP1, lo | xori TMP3, TMP1, 0x20 | addic TMP0, TMP0, -26 | subfe TMP3, TMP3, TMP3 | rlwinm TMP3, TMP3, 0, 26, 26 // x &= 0x20. | xor TMP1, TMP1, TMP3 | stbx TMP1, CARG2, TMP2 | addi TMP2, TMP2, 1 | b <1 |.endmacro | |ffstring_case string_lower, 65 |ffstring_case string_upper, 97 | |//-- Table library ------------------------------------------------------ | |.ffunc_1 table_getn | checktab CARG3; bne ->fff_fallback | bl extern lj_tab_len // (GCtab *t) | // Returns uint32_t (but less than 2^31). | b ->fff_resi | |//-- Bit library -------------------------------------------------------- | |.macro .ffunc_bit, name |.if DUALNUM | .ffunc_1 bit_..name | checknum CARG3; bnel ->fff_tobit_fb |.else | .ffunc_n bit_..name | fadd FARG1, FARG1, TOBIT | stfd FARG1, TMPD | lwz CARG1, TMPD_LO |.endif |.endmacro | |.macro .ffunc_bit_op, name, ins | .ffunc_bit name | addi TMP1, BASE, 8 | add TMP2, BASE, NARGS8:RC |1: | lwz CARG4, 0(TMP1) | cmplw cr1, TMP1, TMP2 |.if DUALNUM | lwz CARG2, 4(TMP1) |.else | lfd FARG1, 0(TMP1) |.endif | bgey cr1, ->fff_resi | checknum CARG4 |.if DUALNUM | bnel ->fff_bitop_fb |.else | fadd FARG1, FARG1, TOBIT | bge ->fff_fallback | stfd FARG1, TMPD | lwz CARG2, TMPD_LO |.endif | ins CARG1, CARG1, CARG2 | addi TMP1, TMP1, 8 | b <1 |.endmacro | |.ffunc_bit_op band, and |.ffunc_bit_op bor, or |.ffunc_bit_op bxor, xor | |.ffunc_bit bswap | rotlwi TMP0, CARG1, 8 | rlwimi TMP0, CARG1, 24, 0, 7 | rlwimi TMP0, CARG1, 24, 16, 23 | mr CRET1, TMP0 | b ->fff_resi | |.ffunc_bit bnot | not CRET1, CARG1 | b ->fff_resi | |.macro .ffunc_bit_sh, name, ins, shmod |.if DUALNUM | .ffunc_2 bit_..name | checknum CARG3; bnel ->fff_tobit_fb | // Note: no inline conversion from number for 2nd argument! | checknum CARG4; bne ->fff_fallback |.else | .ffunc_nn bit_..name | fadd FARG1, FARG1, TOBIT | fadd FARG2, FARG2, TOBIT | stfd FARG1, TMPD | lwz CARG1, TMPD_LO | stfd FARG2, TMPD | lwz CARG2, TMPD_LO |.endif |.if shmod == 1 | rlwinm CARG2, CARG2, 0, 27, 31 |.elif shmod == 2 | neg CARG2, CARG2 |.endif | ins CRET1, CARG1, CARG2 | b ->fff_resi |.endmacro | |.ffunc_bit_sh lshift, slw, 1 |.ffunc_bit_sh rshift, srw, 1 |.ffunc_bit_sh arshift, sraw, 1 |.ffunc_bit_sh rol, rotlw, 0 |.ffunc_bit_sh ror, rotlw, 2 | |.ffunc_bit tobit |.if DUALNUM | b ->fff_resi |.else |->fff_resi: | tonum_i FARG1, CRET1 |.endif |->fff_resn: | lwz PC, FRAME_PC(BASE) | la RA, -8(BASE) | stfd FARG1, -8(BASE) | b ->fff_res1 | |// Fallback FP number to bit conversion. |->fff_tobit_fb: |.if DUALNUM | lfd FARG1, 0(BASE) | bgt ->fff_fallback | fadd FARG1, FARG1, TOBIT | stfd FARG1, TMPD | lwz CARG1, TMPD_LO | blr |.endif |->fff_bitop_fb: |.if DUALNUM | lfd FARG1, 0(TMP1) | bgt ->fff_fallback | fadd FARG1, FARG1, TOBIT | stfd FARG1, TMPD | lwz CARG2, TMPD_LO | blr |.endif | |//----------------------------------------------------------------------- | |->fff_fallback: // Call fast function fallback handler. | // BASE = new base, RB = CFUNC, RC = nargs*8 | lp TMP3, CFUNC:RB->f | add TMP1, BASE, NARGS8:RC | lwz PC, FRAME_PC(BASE) // Fallback may overwrite PC. | addi TMP0, TMP1, 8*LUA_MINSTACK | lwz TMP2, L->maxstack | stw PC, SAVE_PC // Redundant (but a defined value). | .toc lp TMP3, 0(TMP3) | cmplw TMP0, TMP2 | stp BASE, L->base | stp TMP1, L->top | mr CARG1, L | bgt >5 // Need to grow stack. | mtctr TMP3 | bctrl // (lua_State *L) | // Either throws an error, or recovers and returns -1, 0 or nresults+1. | lp BASE, L->base | cmpwi CRET1, 0 | slwi RD, CRET1, 3 | la RA, -8(BASE) | bgt ->fff_res // Returned nresults+1? |1: // Returned 0 or -1: retry fast path. | lp TMP0, L->top | lwz LFUNC:RB, FRAME_FUNC(BASE) | sub NARGS8:RC, TMP0, BASE | bne ->vm_call_tail // Returned -1? | ins_callt // Returned 0: retry fast path. | |// Reconstruct previous base for vmeta_call during tailcall. |->vm_call_tail: | andix. TMP0, PC, FRAME_TYPE | rlwinm TMP1, PC, 0, 0, 28 | bne >3 | lwz INS, -4(PC) | decode_RA8 TMP1, INS | addi TMP1, TMP1, 8 |3: | sub TMP2, BASE, TMP1 | b ->vm_call_dispatch // Resolve again for tailcall. | |5: // Grow stack for fallback handler. | li CARG2, LUA_MINSTACK | bl extern lj_state_growstack // (lua_State *L, int n) | lp BASE, L->base | cmpw TMP0, TMP0 // Set 4*cr0+eq to force retry. | b <1 | |->fff_gcstep: // Call GC step function. | // BASE = new base, RC = nargs*8 | mflr SAVE0 | stp BASE, L->base | add TMP0, BASE, NARGS8:RC | stw PC, SAVE_PC // Redundant (but a defined value). | stp TMP0, L->top | mr CARG1, L | bl extern lj_gc_step // (lua_State *L) | lp BASE, L->base | mtlr SAVE0 | lp TMP0, L->top | sub NARGS8:RC, TMP0, BASE | lwz CFUNC:RB, FRAME_FUNC(BASE) | blr | |//----------------------------------------------------------------------- |//-- Special dispatch targets ------------------------------------------- |//----------------------------------------------------------------------- | |->vm_record: // Dispatch target for recording phase. |.if JIT | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | andix. TMP0, TMP3, HOOK_VMEVENT // No recording while in vmevent. | bne >5 | // Decrement the hookcount for consistency, but always do the call. | lwz TMP2, DISPATCH_GL(hookcount)(DISPATCH) | andix. TMP0, TMP3, HOOK_ACTIVE | bne >1 | subi TMP2, TMP2, 1 | andi. TMP0, TMP3, LUA_MASKLINE|LUA_MASKCOUNT | beqy >1 | stw TMP2, DISPATCH_GL(hookcount)(DISPATCH) | b >1 |.endif | |->vm_rethook: // Dispatch target for return hooks. | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | andix. TMP0, TMP3, HOOK_ACTIVE // Hook already active? | beq >1 |5: // Re-dispatch to static ins. | addi TMP1, TMP1, GG_DISP2STATIC // Assumes decode_OPP TMP1, INS. | lpx TMP0, DISPATCH, TMP1 | mtctr TMP0 | bctr | |->vm_inshook: // Dispatch target for instr/line hooks. | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | lwz TMP2, DISPATCH_GL(hookcount)(DISPATCH) | andix. TMP0, TMP3, HOOK_ACTIVE // Hook already active? | rlwinm TMP0, TMP3, 31-LUA_HOOKLINE, 31, 0 | bne <5 | | cmpwi cr1, TMP0, 0 | addic. TMP2, TMP2, -1 | beq cr1, <5 | stw TMP2, DISPATCH_GL(hookcount)(DISPATCH) | beq >1 | bge cr1, <5 |1: | mr CARG1, L | stw MULTRES, SAVE_MULTRES | mr CARG2, PC | stp BASE, L->base | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. | bl extern lj_dispatch_ins // (lua_State *L, const BCIns *pc) |3: | lp BASE, L->base |4: // Re-dispatch to static ins. | lwz INS, -4(PC) | decode_OPP TMP1, INS | decode_RB8 RB, INS | addi TMP1, TMP1, GG_DISP2STATIC | decode_RD8 RD, INS | lpx TMP0, DISPATCH, TMP1 | decode_RA8 RA, INS | decode_RC8 RC, INS | mtctr TMP0 | bctr | |->cont_hook: // Continue from hook yield. | addi PC, PC, 4 | lwz MULTRES, -20(RB) // Restore MULTRES for *M ins. | b <4 | |->vm_hotloop: // Hot loop counter underflow. |.if JIT | lwz LFUNC:TMP1, FRAME_FUNC(BASE) | addi CARG1, DISPATCH, GG_DISP2J | stw PC, SAVE_PC | lwz TMP1, LFUNC:TMP1->pc | mr CARG2, PC | stw L, DISPATCH_J(L)(DISPATCH) | lbz TMP1, PC2PROTO(framesize)(TMP1) | stp BASE, L->base | slwi TMP1, TMP1, 3 | add TMP1, BASE, TMP1 | stp TMP1, L->top | bl extern lj_trace_hot // (jit_State *J, const BCIns *pc) | b <3 |.endif | |->vm_callhook: // Dispatch target for call hooks. | mr CARG2, PC |.if JIT | b >1 |.endif | |->vm_hotcall: // Hot call counter underflow. |.if JIT | ori CARG2, PC, 1 |1: |.endif | add TMP0, BASE, RC | stw PC, SAVE_PC | mr CARG1, L | stp BASE, L->base | sub RA, RA, BASE | stp TMP0, L->top | bl extern lj_dispatch_call // (lua_State *L, const BCIns *pc) | // Returns ASMFunction. | lp BASE, L->base | lp TMP0, L->top | stw ZERO, SAVE_PC // Invalidate for subsequent line hook. | sub NARGS8:RC, TMP0, BASE | add RA, BASE, RA | lwz LFUNC:RB, FRAME_FUNC(BASE) | lwz INS, -4(PC) | mtctr CRET1 | bctr | |//----------------------------------------------------------------------- |//-- Trace exit handler ------------------------------------------------- |//----------------------------------------------------------------------- | |.macro savex_, a, b, c, d | stfd f..a, 16+a*8(sp) | stfd f..b, 16+b*8(sp) | stfd f..c, 16+c*8(sp) | stfd f..d, 16+d*8(sp) |.endmacro | |->vm_exit_handler: |.if JIT | addi sp, sp, -(16+32*8+32*4) | stmw r2, 16+32*8+2*4(sp) | addi DISPATCH, JGL, -GG_DISP2G-32768 | li CARG2, ~LJ_VMST_EXIT | lwz CARG1, 16+32*8+32*4(sp) // Get stack chain. | stw CARG2, DISPATCH_GL(vmstate)(DISPATCH) | savex_ 0,1,2,3 | stw CARG1, 0(sp) // Store extended stack chain. | mcrxr cr0 // Clear SO flag. | savex_ 4,5,6,7 | addi CARG2, sp, 16+32*8+32*4 // Recompute original value of sp. | savex_ 8,9,10,11 | stw CARG2, 16+32*8+1*4(sp) // Store sp in RID_SP. | savex_ 12,13,14,15 | mflr CARG3 | li TMP1, 0 | savex_ 16,17,18,19 | stw TMP1, 16+32*8+0*4(sp) // Clear RID_TMP. | savex_ 20,21,22,23 | lhz CARG4, 2(CARG3) // Load trace number. | savex_ 24,25,26,27 | lwz L, DISPATCH_GL(jit_L)(DISPATCH) | savex_ 28,29,30,31 | sub CARG3, TMP0, CARG3 // Compute exit number. | lp BASE, DISPATCH_GL(jit_base)(DISPATCH) | srwi CARG3, CARG3, 2 | stw L, DISPATCH_J(L)(DISPATCH) | subi CARG3, CARG3, 2 | stw TMP1, DISPATCH_GL(jit_L)(DISPATCH) | stw CARG4, DISPATCH_J(parent)(DISPATCH) | stp BASE, L->base | addi CARG1, DISPATCH, GG_DISP2J | stw CARG3, DISPATCH_J(exitno)(DISPATCH) | addi CARG2, sp, 16 | bl extern lj_trace_exit // (jit_State *J, ExitState *ex) | // Returns MULTRES (unscaled) or negated error code. | lp TMP1, L->cframe | lwz TMP2, 0(sp) | lp BASE, L->base |.if GPR64 | rldicr sp, TMP1, 0, 61 |.else | rlwinm sp, TMP1, 0, 0, 29 |.endif | lwz PC, SAVE_PC // Get SAVE_PC. | stw TMP2, 0(sp) | stw L, SAVE_L // Set SAVE_L (on-trace resume/yield). | b >1 |.endif |->vm_exit_interp: |.if JIT | // CARG1 = MULTRES or negated error code, BASE, PC and JGL set. | lwz L, SAVE_L | addi DISPATCH, JGL, -GG_DISP2G-32768 |1: | cmpwi CARG1, 0 | blt >3 // Check for error from exit. | lwz LFUNC:TMP1, FRAME_FUNC(BASE) | slwi MULTRES, CARG1, 3 | li TMP2, 0 | stw MULTRES, SAVE_MULTRES | lwz TMP1, LFUNC:TMP1->pc | stw TMP2, DISPATCH_GL(jit_L)(DISPATCH) | lwz KBASE, PC2PROTO(k)(TMP1) | // Setup type comparison constants. | li TISNUM, LJ_TISNUM | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | stw TMP3, TMPD | li ZERO, 0 | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). | lfs TOBIT, TMPD | stw TMP3, TMPD | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) | li TISNIL, LJ_TNIL | stw TMP0, TONUM_HI | lfs TONUM, TMPD | // Modified copy of ins_next which handles function header dispatch, too. | lwz INS, 0(PC) | addi PC, PC, 4 | // Assumes TISNIL == ~LJ_VMST_INTERP == -1. | stw TISNIL, DISPATCH_GL(vmstate)(DISPATCH) | decode_OPP TMP1, INS | decode_RA8 RA, INS | lpx TMP0, DISPATCH, TMP1 | mtctr TMP0 | cmplwi TMP1, BC_FUNCF*4 // Function header? | bge >2 | decode_RB8 RB, INS | decode_RD8 RD, INS | decode_RC8 RC, INS | bctr |2: | subi RC, MULTRES, 8 | add RA, RA, BASE | bctr | |3: // Rethrow error from the right C frame. | neg CARG2, CARG1 | mr CARG1, L | bl extern lj_err_throw // (lua_State *L, int errcode) |.endif | |//----------------------------------------------------------------------- |//-- Math helper functions ---------------------------------------------- |//----------------------------------------------------------------------- | |// NYI: Use internal implementations of floor, ceil, trunc. | |->vm_modi: | divwo. TMP0, CARG1, CARG2 | bso >1 |.if GPR64 | xor CARG3, CARG1, CARG2 | cmpwi CARG3, 0 |.else | xor. CARG3, CARG1, CARG2 |.endif | mullw TMP0, TMP0, CARG2 | sub CARG1, CARG1, TMP0 | bgelr | cmpwi CARG1, 0; beqlr | add CARG1, CARG1, CARG2 | blr |1: | cmpwi CARG2, 0 | li CARG1, 0 | beqlr | mcrxr cr0 // Clear SO for -2147483648 % -1 and return 0. | blr | |//----------------------------------------------------------------------- |//-- Miscellaneous functions -------------------------------------------- |//----------------------------------------------------------------------- | |// void lj_vm_cachesync(void *start, void *end) |// Flush D-Cache and invalidate I-Cache. Assumes 32 byte cache line size. |// This is a good lower bound, except for very ancient PPC models. |->vm_cachesync: |.if JIT or FFI | // Compute start of first cache line and number of cache lines. | rlwinm CARG1, CARG1, 0, 0, 26 | sub CARG2, CARG2, CARG1 | addi CARG2, CARG2, 31 | rlwinm. CARG2, CARG2, 27, 5, 31 | beqlr | mtctr CARG2 | mr CARG3, CARG1 |1: // Flush D-Cache. | dcbst r0, CARG1 | addi CARG1, CARG1, 32 | bdnz <1 | sync | mtctr CARG2 |1: // Invalidate I-Cache. | icbi r0, CARG3 | addi CARG3, CARG3, 32 | bdnz <1 | isync | blr |.endif | |//----------------------------------------------------------------------- |//-- FFI helper functions ----------------------------------------------- |//----------------------------------------------------------------------- | |// Handler for callback functions. Callback slot number in r11, g in r12. |->vm_ffi_callback: |.if FFI |.type CTSTATE, CTState, PC | saveregs | lwz CTSTATE, GL:r12->ctype_state | addi DISPATCH, r12, GG_G2DISP | stw r11, CTSTATE->cb.slot | stw r3, CTSTATE->cb.gpr[0] | stfd f1, CTSTATE->cb.fpr[0] | stw r4, CTSTATE->cb.gpr[1] | stfd f2, CTSTATE->cb.fpr[1] | stw r5, CTSTATE->cb.gpr[2] | stfd f3, CTSTATE->cb.fpr[2] | stw r6, CTSTATE->cb.gpr[3] | stfd f4, CTSTATE->cb.fpr[3] | stw r7, CTSTATE->cb.gpr[4] | stfd f5, CTSTATE->cb.fpr[4] | stw r8, CTSTATE->cb.gpr[5] | stfd f6, CTSTATE->cb.fpr[5] | stw r9, CTSTATE->cb.gpr[6] | stfd f7, CTSTATE->cb.fpr[6] | stw r10, CTSTATE->cb.gpr[7] | stfd f8, CTSTATE->cb.fpr[7] | addi TMP0, sp, CFRAME_SPACE+8 | stw TMP0, CTSTATE->cb.stack | mr CARG1, CTSTATE | stw CTSTATE, SAVE_PC // Any value outside of bytecode is ok. | mr CARG2, sp | bl extern lj_ccallback_enter // (CTState *cts, void *cf) | // Returns lua_State *. | lp BASE, L:CRET1->base | li TISNUM, LJ_TISNUM // Setup type comparison constants. | lp RC, L:CRET1->top | lus TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | li ZERO, 0 | mr L, CRET1 | stw TMP3, TMPD | lus TMP0, 0x4338 // Hiword of 2^52 + 2^51 (double) | lwz LFUNC:RB, FRAME_FUNC(BASE) | ori TMP3, TMP3, 0x0004 // TONUM = 2^52 + 2^51 + 2^31 (float). | stw TMP0, TONUM_HI | li TISNIL, LJ_TNIL | li_vmstate INTERP | lfs TOBIT, TMPD | stw TMP3, TMPD | sub RC, RC, BASE | st_vmstate | lfs TONUM, TMPD | ins_callt |.endif | |->cont_ffi_callback: // Return from FFI callback. |.if FFI | lwz CTSTATE, DISPATCH_GL(ctype_state)(DISPATCH) | stp BASE, L->base | stp RB, L->top | stp L, CTSTATE->L | mr CARG1, CTSTATE | mr CARG2, RA | bl extern lj_ccallback_leave // (CTState *cts, TValue *o) | lwz CRET1, CTSTATE->cb.gpr[0] | lfd FARG1, CTSTATE->cb.fpr[0] | lwz CRET2, CTSTATE->cb.gpr[1] | b ->vm_leave_unw |.endif | |->vm_ffi_call: // Call C function via FFI. | // Caveat: needs special frame unwinding, see below. |.if FFI | .type CCSTATE, CCallState, CARG1 | lwz TMP1, CCSTATE->spadj | mflr TMP0 | lbz CARG2, CCSTATE->nsp | lbz CARG3, CCSTATE->nfpr | neg TMP1, TMP1 | stw TMP0, 4(sp) | cmpwi cr1, CARG3, 0 | mr TMP2, sp | addic. CARG2, CARG2, -1 | stwux sp, sp, TMP1 | crnot 4*cr1+eq, 4*cr1+eq // For vararg calls. | stw r14, -4(TMP2) | stw CCSTATE, -8(TMP2) | mr r14, TMP2 | la TMP1, CCSTATE->stack | slwi CARG2, CARG2, 2 | blty >2 | la TMP2, 8(sp) |1: | lwzx TMP0, TMP1, CARG2 | stwx TMP0, TMP2, CARG2 | addic. CARG2, CARG2, -4 | bge <1 |2: | bney cr1, >3 | lfd f1, CCSTATE->fpr[0] | lfd f2, CCSTATE->fpr[1] | lfd f3, CCSTATE->fpr[2] | lfd f4, CCSTATE->fpr[3] | lfd f5, CCSTATE->fpr[4] | lfd f6, CCSTATE->fpr[5] | lfd f7, CCSTATE->fpr[6] | lfd f8, CCSTATE->fpr[7] |3: | lp TMP0, CCSTATE->func | lwz CARG2, CCSTATE->gpr[1] | lwz CARG3, CCSTATE->gpr[2] | lwz CARG4, CCSTATE->gpr[3] | lwz CARG5, CCSTATE->gpr[4] | mtctr TMP0 | lwz r8, CCSTATE->gpr[5] | lwz r9, CCSTATE->gpr[6] | lwz r10, CCSTATE->gpr[7] | lwz CARG1, CCSTATE->gpr[0] // Do this last, since CCSTATE is CARG1. | bctrl | lwz CCSTATE:TMP1, -8(r14) | lwz TMP2, -4(r14) | lwz TMP0, 4(r14) | stw CARG1, CCSTATE:TMP1->gpr[0] | stfd FARG1, CCSTATE:TMP1->fpr[0] | stw CARG2, CCSTATE:TMP1->gpr[1] | mtlr TMP0 | stw CARG3, CCSTATE:TMP1->gpr[2] | mr sp, r14 | stw CARG4, CCSTATE:TMP1->gpr[3] | mr r14, TMP2 | blr |.endif |// Note: vm_ffi_call must be the last function in this object file! | |//----------------------------------------------------------------------- } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; |=>defop: switch (op) { /* -- Comparison ops ---------------------------------------------------- */ /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | // RA = src1*8, RD = src2*8, JMP with RD = target |.if DUALNUM | lwzux TMP0, RA, BASE | addi PC, PC, 4 | lwz CARG2, 4(RA) | lwzux TMP1, RD, BASE | lwz TMP2, -4(PC) | checknum cr0, TMP0 | lwz CARG3, 4(RD) | decode_RD4 TMP2, TMP2 | checknum cr1, TMP1 | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) | bne cr0, >7 | bne cr1, >8 | cmpw CARG2, CARG3 if (op == BC_ISLT) { | bge >2 } else if (op == BC_ISGE) { | blt >2 } else if (op == BC_ISLE) { | bgt >2 } else { | ble >2 } |1: | add PC, PC, TMP2 |2: | ins_next | |7: // RA is not an integer. | bgt cr0, ->vmeta_comp | // RA is a number. | lfd f0, 0(RA) | bgt cr1, ->vmeta_comp | blt cr1, >4 | // RA is a number, RD is an integer. | tonum_i f1, CARG3 | b >5 | |8: // RA is an integer, RD is not an integer. | bgt cr1, ->vmeta_comp | // RA is an integer, RD is a number. | tonum_i f0, CARG2 |4: | lfd f1, 0(RD) |5: | fcmpu cr0, f0, f1 if (op == BC_ISLT) { | bge <2 } else if (op == BC_ISGE) { | blt <2 } else if (op == BC_ISLE) { | cror 4*cr0+lt, 4*cr0+lt, 4*cr0+eq | bge <2 } else { | cror 4*cr0+lt, 4*cr0+lt, 4*cr0+eq | blt <2 } | b <1 |.else | lwzx TMP0, BASE, RA | addi PC, PC, 4 | lfdx f0, BASE, RA | lwzx TMP1, BASE, RD | checknum cr0, TMP0 | lwz TMP2, -4(PC) | lfdx f1, BASE, RD | checknum cr1, TMP1 | decode_RD4 TMP2, TMP2 | bge cr0, ->vmeta_comp | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) | bge cr1, ->vmeta_comp | fcmpu cr0, f0, f1 if (op == BC_ISLT) { | bge >1 } else if (op == BC_ISGE) { | blt >1 } else if (op == BC_ISLE) { | cror 4*cr0+lt, 4*cr0+lt, 4*cr0+eq | bge >1 } else { | cror 4*cr0+lt, 4*cr0+lt, 4*cr0+eq | blt >1 } | add PC, PC, TMP2 |1: | ins_next |.endif break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; | // RA = src1*8, RD = src2*8, JMP with RD = target |.if DUALNUM | lwzux TMP0, RA, BASE | addi PC, PC, 4 | lwz CARG2, 4(RA) | lwzux TMP1, RD, BASE | checknum cr0, TMP0 | lwz TMP2, -4(PC) | checknum cr1, TMP1 | decode_RD4 TMP2, TMP2 | lwz CARG3, 4(RD) | cror 4*cr7+gt, 4*cr0+gt, 4*cr1+gt | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) if (vk) { | ble cr7, ->BC_ISEQN_Z } else { | ble cr7, ->BC_ISNEN_Z } |.else | lwzux TMP0, RA, BASE | lwz TMP2, 0(PC) | lfd f0, 0(RA) | addi PC, PC, 4 | lwzux TMP1, RD, BASE | checknum cr0, TMP0 | decode_RD4 TMP2, TMP2 | lfd f1, 0(RD) | checknum cr1, TMP1 | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) | bge cr0, >5 | bge cr1, >5 | fcmpu cr0, f0, f1 if (vk) { | bne >1 | add PC, PC, TMP2 } else { | beq >1 | add PC, PC, TMP2 } |1: | ins_next |.endif |5: // Either or both types are not numbers. |.if not DUALNUM | lwz CARG2, 4(RA) | lwz CARG3, 4(RD) |.endif |.if FFI | cmpwi cr7, TMP0, LJ_TCDATA | cmpwi cr5, TMP1, LJ_TCDATA |.endif | not TMP3, TMP0 | cmplw TMP0, TMP1 | cmplwi cr1, TMP3, ~LJ_TISPRI // Primitive? |.if FFI | cror 4*cr7+eq, 4*cr7+eq, 4*cr5+eq |.endif | cmplwi cr6, TMP3, ~LJ_TISTABUD // Table or userdata? |.if FFI | beq cr7, ->vmeta_equal_cd |.endif | cmplw cr5, CARG2, CARG3 | crandc 4*cr0+gt, 4*cr0+eq, 4*cr1+gt // 2: Same type and primitive. | crorc 4*cr0+lt, 4*cr5+eq, 4*cr0+eq // 1: Same tv or different type. | crand 4*cr0+eq, 4*cr0+eq, 4*cr5+eq // 0: Same type and same tv. | mr SAVE0, PC | cror 4*cr0+eq, 4*cr0+eq, 4*cr0+gt // 0 or 2. | cror 4*cr0+lt, 4*cr0+lt, 4*cr0+gt // 1 or 2. if (vk) { | bne cr0, >6 | add PC, PC, TMP2 |6: } else { | beq cr0, >6 | add PC, PC, TMP2 |6: } |.if DUALNUM | bge cr0, >2 // Done if 1 or 2. |1: | ins_next |2: |.else | blt cr0, <1 // Done if 1 or 2. |.endif | blt cr6, <1 // Done if not tab/ud. | | // Different tables or userdatas. Need to check __eq metamethod. | // Field metatable must be at same offset for GCtab and GCudata! | lwz TAB:TMP2, TAB:CARG2->metatable | li CARG4, 1-vk // ne = 0 or 1. | cmplwi TAB:TMP2, 0 | beq <1 // No metatable? | lbz TMP2, TAB:TMP2->nomm | andix. TMP2, TMP2, 1<vmeta_equal // Handle __eq metamethod. break; case BC_ISEQS: case BC_ISNES: vk = op == BC_ISEQS; | // RA = src*8, RD = str_const*8 (~), JMP with RD = target | lwzux TMP0, RA, BASE | srwi RD, RD, 1 | lwz STR:TMP3, 4(RA) | lwz TMP2, 0(PC) | subfic RD, RD, -4 | addi PC, PC, 4 |.if FFI | cmpwi TMP0, LJ_TCDATA |.endif | lwzx STR:TMP1, KBASE, RD // KBASE-4-str_const*4 | .gpr64 extsw TMP0, TMP0 | subfic TMP0, TMP0, LJ_TSTR |.if FFI | beq ->vmeta_equal_cd |.endif | sub TMP1, STR:TMP1, STR:TMP3 | or TMP0, TMP0, TMP1 | decode_RD4 TMP2, TMP2 | subfic TMP0, TMP0, 0 | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) | subfe TMP1, TMP1, TMP1 if (vk) { | andc TMP2, TMP2, TMP1 } else { | and TMP2, TMP2, TMP1 } | add PC, PC, TMP2 | ins_next break; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; | // RA = src*8, RD = num_const*8, JMP with RD = target |.if DUALNUM | lwzux TMP0, RA, BASE | addi PC, PC, 4 | lwz CARG2, 4(RA) | lwzux TMP1, RD, KBASE | checknum cr0, TMP0 | lwz TMP2, -4(PC) | checknum cr1, TMP1 | decode_RD4 TMP2, TMP2 | lwz CARG3, 4(RD) | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) if (vk) { |->BC_ISEQN_Z: } else { |->BC_ISNEN_Z: } | bne cr0, >7 | bne cr1, >8 | cmpw CARG2, CARG3 |4: |.else if (vk) { |->BC_ISEQN_Z: // Dummy label. } else { |->BC_ISNEN_Z: // Dummy label. } | lwzx TMP0, BASE, RA | addi PC, PC, 4 | lfdx f0, BASE, RA | lwz TMP2, -4(PC) | lfdx f1, KBASE, RD | decode_RD4 TMP2, TMP2 | checknum TMP0 | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) | bge >3 | fcmpu cr0, f0, f1 |.endif if (vk) { | bne >1 | add PC, PC, TMP2 |1: |.if not FFI |3: |.endif } else { | beq >2 |1: |.if not FFI |3: |.endif | add PC, PC, TMP2 |2: } | ins_next |.if FFI |3: | cmpwi TMP0, LJ_TCDATA | beq ->vmeta_equal_cd | b <1 |.endif |.if DUALNUM |7: // RA is not an integer. | bge cr0, <3 | // RA is a number. | lfd f0, 0(RA) | blt cr1, >1 | // RA is a number, RD is an integer. | tonum_i f1, CARG3 | b >2 | |8: // RA is an integer, RD is a number. | tonum_i f0, CARG2 |1: | lfd f1, 0(RD) |2: | fcmpu cr0, f0, f1 | b <4 |.endif break; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; | // RA = src*8, RD = primitive_type*8 (~), JMP with RD = target | lwzx TMP0, BASE, RA | srwi TMP1, RD, 3 | lwz TMP2, 0(PC) | not TMP1, TMP1 | addi PC, PC, 4 |.if FFI | cmpwi TMP0, LJ_TCDATA |.endif | sub TMP0, TMP0, TMP1 |.if FFI | beq ->vmeta_equal_cd |.endif | decode_RD4 TMP2, TMP2 | .gpr64 extsw TMP0, TMP0 | addic TMP0, TMP0, -1 | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) | subfe TMP1, TMP1, TMP1 if (vk) { | and TMP2, TMP2, TMP1 } else { | andc TMP2, TMP2, TMP1 } | add PC, PC, TMP2 | ins_next break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | // RA = dst*8 or unused, RD = src*8, JMP with RD = target | lwzx TMP0, BASE, RD | lwz INS, 0(PC) | addi PC, PC, 4 if (op == BC_IST || op == BC_ISF) { | .gpr64 extsw TMP0, TMP0 | subfic TMP0, TMP0, LJ_TTRUE | decode_RD4 TMP2, INS | subfe TMP1, TMP1, TMP1 | addis TMP2, TMP2, -(BCBIAS_J*4 >> 16) if (op == BC_IST) { | andc TMP2, TMP2, TMP1 } else { | and TMP2, TMP2, TMP1 } | add PC, PC, TMP2 } else { | li TMP1, LJ_TFALSE | lfdx f0, BASE, RD | cmplw TMP0, TMP1 if (op == BC_ISTC) { | bge >1 } else { | blt >1 } | addis PC, PC, -(BCBIAS_J*4 >> 16) | decode_RD4 TMP2, INS | stfdx f0, BASE, RA | add PC, PC, TMP2 |1: } | ins_next break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: | // RA = dst*8, RD = src*8 | ins_next1 | lfdx f0, BASE, RD | stfdx f0, BASE, RA | ins_next2 break; case BC_NOT: | // RA = dst*8, RD = src*8 | ins_next1 | lwzx TMP0, BASE, RD | .gpr64 extsw TMP0, TMP0 | subfic TMP1, TMP0, LJ_TTRUE | adde TMP0, TMP0, TMP1 | stwx TMP0, BASE, RA | ins_next2 break; case BC_UNM: | // RA = dst*8, RD = src*8 | lwzux TMP1, RD, BASE | lwz TMP0, 4(RD) | checknum TMP1 |.if DUALNUM | bne >5 |.if GPR64 | lus TMP2, 0x8000 | neg TMP0, TMP0 | cmplw TMP0, TMP2 | beq >4 |.else | nego. TMP0, TMP0 | bso >4 |1: |.endif | ins_next1 | stwux TISNUM, RA, BASE | stw TMP0, 4(RA) |3: | ins_next2 |4: |.if not GPR64 | // Potential overflow. | mcrxr cr0; bley <1 // Ignore unrelated overflow. |.endif | lus TMP1, 0x41e0 // 2^31. | li TMP0, 0 | b >7 |.endif |5: | bge ->vmeta_unm | xoris TMP1, TMP1, 0x8000 |7: | ins_next1 | stwux TMP1, RA, BASE | stw TMP0, 4(RA) |.if DUALNUM | b <3 |.else | ins_next2 |.endif break; case BC_LEN: | // RA = dst*8, RD = src*8 | lwzux TMP0, RD, BASE | lwz CARG1, 4(RD) | checkstr TMP0; bne >2 | lwz CRET1, STR:CARG1->len |1: |.if DUALNUM | ins_next1 | stwux TISNUM, RA, BASE | stw CRET1, 4(RA) |.else | tonum_u f0, CRET1 // Result is a non-negative integer. | ins_next1 | stfdx f0, BASE, RA |.endif | ins_next2 |2: | checktab TMP0; bne ->vmeta_len #if LJ_52 | lwz TAB:TMP2, TAB:CARG1->metatable | cmplwi TAB:TMP2, 0 | bne >9 |3: #endif |->BC_LEN_Z: | bl extern lj_tab_len // (GCtab *t) | // Returns uint32_t (but less than 2^31). | b <1 #if LJ_52 |9: | lbz TMP0, TAB:TMP2->nomm | andix. TMP0, TMP0, 1<vmeta_len #endif break; /* -- Binary ops -------------------------------------------------------- */ |.macro ins_arithpre | // RA = dst*8, RB = src1*8, RC = src2*8 | num_const*8 ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); ||switch (vk) { ||case 0: | lwzx TMP1, BASE, RB | .if DUALNUM | lwzx TMP2, KBASE, RC | .endif | lfdx f14, BASE, RB | lfdx f15, KBASE, RC | .if DUALNUM | checknum cr0, TMP1 | checknum cr1, TMP2 | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | bge ->vmeta_arith_vn | .else | checknum TMP1; bge ->vmeta_arith_vn | .endif || break; ||case 1: | lwzx TMP1, BASE, RB | .if DUALNUM | lwzx TMP2, KBASE, RC | .endif | lfdx f15, BASE, RB | lfdx f14, KBASE, RC | .if DUALNUM | checknum cr0, TMP1 | checknum cr1, TMP2 | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | bge ->vmeta_arith_nv | .else | checknum TMP1; bge ->vmeta_arith_nv | .endif || break; ||default: | lwzx TMP1, BASE, RB | lwzx TMP2, BASE, RC | lfdx f14, BASE, RB | lfdx f15, BASE, RC | checknum cr0, TMP1 | checknum cr1, TMP2 | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | bge ->vmeta_arith_vv || break; ||} |.endmacro | |.macro ins_arithfallback, ins ||switch (vk) { ||case 0: | ins ->vmeta_arith_vn2 || break; ||case 1: | ins ->vmeta_arith_nv2 || break; ||default: | ins ->vmeta_arith_vv2 || break; ||} |.endmacro | |.macro intmod, a, b, c | bl ->vm_modi |.endmacro | |.macro fpmod, a, b, c |->BC_MODVN_Z: | fdiv FARG1, b, c | // NYI: Use internal implementation of floor. | blex floor // floor(b/c) | fmul a, FARG1, c | fsub a, b, a // b - floor(b/c)*c |.endmacro | |.macro ins_arithfp, fpins | ins_arithpre |.if "fpins" == "fpmod_" | b ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. |.else | fpins f0, f14, f15 | ins_next1 | stfdx f0, BASE, RA | ins_next2 |.endif |.endmacro | |.macro ins_arithdn, intins, fpins | // RA = dst*8, RB = src1*8, RC = src2*8 | num_const*8 ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); ||switch (vk) { ||case 0: | lwzux TMP1, RB, BASE | lwzux TMP2, RC, KBASE | lwz CARG1, 4(RB) | checknum cr0, TMP1 | lwz CARG2, 4(RC) || break; ||case 1: | lwzux TMP1, RB, BASE | lwzux TMP2, RC, KBASE | lwz CARG2, 4(RB) | checknum cr0, TMP1 | lwz CARG1, 4(RC) || break; ||default: | lwzux TMP1, RB, BASE | lwzux TMP2, RC, BASE | lwz CARG1, 4(RB) | checknum cr0, TMP1 | lwz CARG2, 4(RC) || break; ||} | checknum cr1, TMP2 | bne >5 | bne cr1, >5 | intins CARG1, CARG1, CARG2 | bso >4 |1: | ins_next1 | stwux TISNUM, RA, BASE | stw CARG1, 4(RA) |2: | ins_next2 |4: // Overflow. | mcrxr cr0; bley <1 // Ignore unrelated overflow. | ins_arithfallback b |5: // FP variant. ||if (vk == 1) { | lfd f15, 0(RB) | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | lfd f14, 0(RC) ||} else { | lfd f14, 0(RB) | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | lfd f15, 0(RC) ||} | ins_arithfallback bge |.if "fpins" == "fpmod_" | b ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. |.else | fpins f0, f14, f15 | ins_next1 | stfdx f0, BASE, RA | b <2 |.endif |.endmacro | |.macro ins_arith, intins, fpins |.if DUALNUM | ins_arithdn intins, fpins |.else | ins_arithfp fpins |.endif |.endmacro case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: |.if GPR64 |.macro addo32., y, a, b | // Need to check overflow for (a<<32) + (b<<32). | rldicr TMP0, a, 32, 31 | rldicr TMP3, b, 32, 31 | addo. TMP0, TMP0, TMP3 | add y, a, b |.endmacro | ins_arith addo32., fadd |.else | ins_arith addo., fadd |.endif break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: |.if GPR64 |.macro subo32., y, a, b | // Need to check overflow for (a<<32) - (b<<32). | rldicr TMP0, a, 32, 31 | rldicr TMP3, b, 32, 31 | subo. TMP0, TMP0, TMP3 | sub y, a, b |.endmacro | ins_arith subo32., fsub |.else | ins_arith subo., fsub |.endif break; case BC_MULVN: case BC_MULNV: case BC_MULVV: | ins_arith mullwo., fmul break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | ins_arithfp fdiv break; case BC_MODVN: | ins_arith intmod, fpmod break; case BC_MODNV: case BC_MODVV: | ins_arith intmod, fpmod_ break; case BC_POW: | // NYI: (partial) integer arithmetic. | lwzx TMP1, BASE, RB | lfdx FARG1, BASE, RB | lwzx TMP2, BASE, RC | lfdx FARG2, BASE, RC | checknum cr0, TMP1 | checknum cr1, TMP2 | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | bge ->vmeta_arith_vv | blex pow | ins_next1 | stfdx FARG1, BASE, RA | ins_next2 break; case BC_CAT: | // RA = dst*8, RB = src_start*8, RC = src_end*8 | sub CARG3, RC, RB | stp BASE, L->base | add CARG2, BASE, RC | mr SAVE0, RB |->BC_CAT_Z: | stw PC, SAVE_PC | mr CARG1, L | srwi CARG3, CARG3, 3 | bl extern lj_meta_cat // (lua_State *L, TValue *top, int left) | // Returns NULL (finished) or TValue * (metamethod). | cmplwi CRET1, 0 | lp BASE, L->base | bne ->vmeta_binop | ins_next1 | lfdx f0, BASE, SAVE0 // Copy result from RB to RA. | stfdx f0, BASE, RA | ins_next2 break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: | // RA = dst*8, RD = str_const*8 (~) | srwi TMP1, RD, 1 | subfic TMP1, TMP1, -4 | ins_next1 | lwzx TMP0, KBASE, TMP1 // KBASE-4-str_const*4 | li TMP2, LJ_TSTR | stwux TMP2, RA, BASE | stw TMP0, 4(RA) | ins_next2 break; case BC_KCDATA: |.if FFI | // RA = dst*8, RD = cdata_const*8 (~) | srwi TMP1, RD, 1 | subfic TMP1, TMP1, -4 | ins_next1 | lwzx TMP0, KBASE, TMP1 // KBASE-4-cdata_const*4 | li TMP2, LJ_TCDATA | stwux TMP2, RA, BASE | stw TMP0, 4(RA) | ins_next2 |.endif break; case BC_KSHORT: | // RA = dst*8, RD = int16_literal*8 |.if DUALNUM | slwi RD, RD, 13 | srawi RD, RD, 16 | ins_next1 | stwux TISNUM, RA, BASE | stw RD, 4(RA) | ins_next2 |.else | // The soft-float approach is faster. | slwi RD, RD, 13 | srawi TMP1, RD, 31 | xor TMP2, TMP1, RD | sub TMP2, TMP2, TMP1 // TMP2 = abs(x) | cntlzw TMP3, TMP2 | subfic TMP1, TMP3, 0x40d // TMP1 = exponent-1 | slw TMP2, TMP2, TMP3 // TMP2 = left aligned mantissa | subfic TMP3, RD, 0 | slwi TMP1, TMP1, 20 | rlwimi RD, TMP2, 21, 1, 31 // hi = sign(x) | (mantissa>>11) | subfe TMP0, TMP0, TMP0 | add RD, RD, TMP1 // hi = hi + exponent-1 | and RD, RD, TMP0 // hi = x == 0 ? 0 : hi | ins_next1 | stwux RD, RA, BASE | stw ZERO, 4(RA) | ins_next2 |.endif break; case BC_KNUM: | // RA = dst*8, RD = num_const*8 | ins_next1 | lfdx f0, KBASE, RD | stfdx f0, BASE, RA | ins_next2 break; case BC_KPRI: | // RA = dst*8, RD = primitive_type*8 (~) | srwi TMP1, RD, 3 | not TMP0, TMP1 | ins_next1 | stwx TMP0, BASE, RA | ins_next2 break; case BC_KNIL: | // RA = base*8, RD = end*8 | stwx TISNIL, BASE, RA | addi RA, RA, 8 |1: | stwx TISNIL, BASE, RA | cmpw RA, RD | addi RA, RA, 8 | blt <1 | ins_next_ break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: | // RA = dst*8, RD = uvnum*8 | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RD, RD, 1 | addi RD, RD, offsetof(GCfuncL, uvptr) | lwzx UPVAL:RB, LFUNC:RB, RD | ins_next1 | lwz TMP1, UPVAL:RB->v | lfd f0, 0(TMP1) | stfdx f0, BASE, RA | ins_next2 break; case BC_USETV: | // RA = uvnum*8, RD = src*8 | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RA, RA, 1 | addi RA, RA, offsetof(GCfuncL, uvptr) | lfdux f0, RD, BASE | lwzx UPVAL:RB, LFUNC:RB, RA | lbz TMP3, UPVAL:RB->marked | lwz CARG2, UPVAL:RB->v | andix. TMP3, TMP3, LJ_GC_BLACK // isblack(uv) | lbz TMP0, UPVAL:RB->closed | lwz TMP2, 0(RD) | stfd f0, 0(CARG2) | cmplwi cr1, TMP0, 0 | lwz TMP1, 4(RD) | cror 4*cr0+eq, 4*cr0+eq, 4*cr1+eq | subi TMP2, TMP2, (LJ_TISNUM+1) | bne >2 // Upvalue is closed and black? |1: | ins_next | |2: // Check if new value is collectable. | cmplwi TMP2, LJ_TISGCV - (LJ_TISNUM+1) | bge <1 // tvisgcv(v) | lbz TMP3, GCOBJ:TMP1->gch.marked | andix. TMP3, TMP3, LJ_GC_WHITES // iswhite(v) | la CARG1, GG_DISP2G(DISPATCH) | // Crossed a write barrier. Move the barrier forward. | beq <1 | bl extern lj_gc_barrieruv // (global_State *g, TValue *tv) | b <1 break; case BC_USETS: | // RA = uvnum*8, RD = str_const*8 (~) | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi TMP1, RD, 1 | srwi RA, RA, 1 | subfic TMP1, TMP1, -4 | addi RA, RA, offsetof(GCfuncL, uvptr) | lwzx STR:TMP1, KBASE, TMP1 // KBASE-4-str_const*4 | lwzx UPVAL:RB, LFUNC:RB, RA | lbz TMP3, UPVAL:RB->marked | lwz CARG2, UPVAL:RB->v | andix. TMP3, TMP3, LJ_GC_BLACK // isblack(uv) | lbz TMP3, STR:TMP1->marked | lbz TMP2, UPVAL:RB->closed | li TMP0, LJ_TSTR | stw STR:TMP1, 4(CARG2) | stw TMP0, 0(CARG2) | bne >2 |1: | ins_next | |2: // Check if string is white and ensure upvalue is closed. | andix. TMP3, TMP3, LJ_GC_WHITES // iswhite(str) | cmplwi cr1, TMP2, 0 | cror 4*cr0+eq, 4*cr0+eq, 4*cr1+eq | la CARG1, GG_DISP2G(DISPATCH) | // Crossed a write barrier. Move the barrier forward. | beq <1 | bl extern lj_gc_barrieruv // (global_State *g, TValue *tv) | b <1 break; case BC_USETN: | // RA = uvnum*8, RD = num_const*8 | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RA, RA, 1 | addi RA, RA, offsetof(GCfuncL, uvptr) | lfdx f0, KBASE, RD | lwzx UPVAL:RB, LFUNC:RB, RA | ins_next1 | lwz TMP1, UPVAL:RB->v | stfd f0, 0(TMP1) | ins_next2 break; case BC_USETP: | // RA = uvnum*8, RD = primitive_type*8 (~) | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RA, RA, 1 | srwi TMP0, RD, 3 | addi RA, RA, offsetof(GCfuncL, uvptr) | not TMP0, TMP0 | lwzx UPVAL:RB, LFUNC:RB, RA | ins_next1 | lwz TMP1, UPVAL:RB->v | stw TMP0, 0(TMP1) | ins_next2 break; case BC_UCLO: | // RA = level*8, RD = target | lwz TMP1, L->openupval | branch_RD // Do this first since RD is not saved. | stp BASE, L->base | cmplwi TMP1, 0 | mr CARG1, L | beq >1 | add CARG2, BASE, RA | bl extern lj_func_closeuv // (lua_State *L, TValue *level) | lp BASE, L->base |1: | ins_next break; case BC_FNEW: | // RA = dst*8, RD = proto_const*8 (~) (holding function prototype) | srwi TMP1, RD, 1 | stp BASE, L->base | subfic TMP1, TMP1, -4 | stw PC, SAVE_PC | lwzx CARG2, KBASE, TMP1 // KBASE-4-tab_const*4 | mr CARG1, L | lwz CARG3, FRAME_FUNC(BASE) | // (lua_State *L, GCproto *pt, GCfuncL *parent) | bl extern lj_func_newL_gc | // Returns GCfuncL *. | lp BASE, L->base | li TMP0, LJ_TFUNC | stwux TMP0, RA, BASE | stw LFUNC:CRET1, 4(RA) | ins_next break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: case BC_TDUP: | // RA = dst*8, RD = (hbits|asize)*8 | tab_const*8 (~) | lwz TMP0, DISPATCH_GL(gc.total)(DISPATCH) | mr CARG1, L | lwz TMP1, DISPATCH_GL(gc.threshold)(DISPATCH) | stp BASE, L->base | cmplw TMP0, TMP1 | stw PC, SAVE_PC | bge >5 |1: if (op == BC_TNEW) { | rlwinm CARG2, RD, 29, 21, 31 | rlwinm CARG3, RD, 18, 27, 31 | cmpwi CARG2, 0x7ff; beq >3 |2: | bl extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits) | // Returns Table *. } else { | srwi TMP1, RD, 1 | subfic TMP1, TMP1, -4 | lwzx CARG2, KBASE, TMP1 // KBASE-4-tab_const*4 | bl extern lj_tab_dup // (lua_State *L, Table *kt) | // Returns Table *. } | lp BASE, L->base | li TMP0, LJ_TTAB | stwux TMP0, RA, BASE | stw TAB:CRET1, 4(RA) | ins_next if (op == BC_TNEW) { |3: | li CARG2, 0x801 | b <2 } |5: | mr SAVE0, RD | bl extern lj_gc_step_fixtop // (lua_State *L) | mr RD, SAVE0 | mr CARG1, L | b <1 break; case BC_GGET: | // RA = dst*8, RD = str_const*8 (~) case BC_GSET: | // RA = src*8, RD = str_const*8 (~) | lwz LFUNC:TMP2, FRAME_FUNC(BASE) | srwi TMP1, RD, 1 | lwz TAB:RB, LFUNC:TMP2->env | subfic TMP1, TMP1, -4 | lwzx STR:RC, KBASE, TMP1 // KBASE-4-str_const*4 if (op == BC_GGET) { | b ->BC_TGETS_Z } else { | b ->BC_TSETS_Z } break; case BC_TGETV: | // RA = dst*8, RB = table*8, RC = key*8 | lwzux CARG1, RB, BASE | lwzux CARG2, RC, BASE | lwz TAB:RB, 4(RB) |.if DUALNUM | lwz RC, 4(RC) |.else | lfd f0, 0(RC) |.endif | checktab CARG1 | checknum cr1, CARG2 | bne ->vmeta_tgetv |.if DUALNUM | lwz TMP0, TAB:RB->asize | bne cr1, >5 | lwz TMP1, TAB:RB->array | cmplw TMP0, RC | slwi TMP2, RC, 3 |.else | bge cr1, >5 | // Convert number key to integer, check for integerness and range. | fctiwz f1, f0 | fadd f2, f0, TOBIT | stfd f1, TMPD | lwz TMP0, TAB:RB->asize | fsub f2, f2, TOBIT | lwz TMP2, TMPD_LO | lwz TMP1, TAB:RB->array | fcmpu cr1, f0, f2 | cmplw cr0, TMP0, TMP2 | crand 4*cr0+gt, 4*cr0+gt, 4*cr1+eq | slwi TMP2, TMP2, 3 |.endif | ble ->vmeta_tgetv // Integer key and in array part? | lwzx TMP0, TMP1, TMP2 | lfdx f14, TMP1, TMP2 | checknil TMP0; beq >2 |1: | ins_next1 | stfdx f14, BASE, RA | ins_next2 | |2: // Check for __index if table value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <1 // No metatable: done. | lbz TMP0, TAB:TMP2->nomm | andix. TMP0, TMP0, 1<vmeta_tgetv | |5: | checkstr CARG2; bne ->vmeta_tgetv |.if not DUALNUM | lwz STR:RC, 4(RC) |.endif | b ->BC_TGETS_Z // String key? break; case BC_TGETS: | // RA = dst*8, RB = table*8, RC = str_const*8 (~) | lwzux CARG1, RB, BASE | srwi TMP1, RC, 1 | lwz TAB:RB, 4(RB) | subfic TMP1, TMP1, -4 | checktab CARG1 | lwzx STR:RC, KBASE, TMP1 // KBASE-4-str_const*4 | bne ->vmeta_tgets1 |->BC_TGETS_Z: | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = dst*8 | lwz TMP0, TAB:RB->hmask | lwz TMP1, STR:RC->hash | lwz NODE:TMP2, TAB:RB->node | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | slwi TMP0, TMP1, 5 | slwi TMP1, TMP1, 3 | sub TMP1, TMP0, TMP1 | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) |1: | lwz CARG1, NODE:TMP2->key | lwz TMP0, 4+offsetof(Node, key)(NODE:TMP2) | lwz CARG2, NODE:TMP2->val | lwz TMP1, 4+offsetof(Node, val)(NODE:TMP2) | checkstr CARG1; bne >4 | cmpw TMP0, STR:RC; bne >4 | checknil CARG2; beq >5 // Key found, but nil value? |3: | stwux CARG2, RA, BASE | stw TMP1, 4(RA) | ins_next | |4: // Follow hash chain. | lwz NODE:TMP2, NODE:TMP2->next | cmplwi NODE:TMP2, 0 | bne <1 | // End of hash chain: key not found, nil result. | li CARG2, LJ_TNIL | |5: // Check for __index if table value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <3 // No metatable: done. | lbz TMP0, TAB:TMP2->nomm | andix. TMP0, TMP0, 1<vmeta_tgets break; case BC_TGETB: | // RA = dst*8, RB = table*8, RC = index*8 | lwzux CARG1, RB, BASE | srwi TMP0, RC, 3 | lwz TAB:RB, 4(RB) | checktab CARG1; bne ->vmeta_tgetb | lwz TMP1, TAB:RB->asize | lwz TMP2, TAB:RB->array | cmplw TMP0, TMP1; bge ->vmeta_tgetb | lwzx TMP1, TMP2, RC | lfdx f0, TMP2, RC | checknil TMP1; beq >5 |1: | ins_next1 | stfdx f0, BASE, RA | ins_next2 | |5: // Check for __index if table value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <1 // No metatable: done. | lbz TMP2, TAB:TMP2->nomm | andix. TMP2, TMP2, 1<vmeta_tgetb // Caveat: preserve TMP0! break; case BC_TSETV: | // RA = src*8, RB = table*8, RC = key*8 | lwzux CARG1, RB, BASE | lwzux CARG2, RC, BASE | lwz TAB:RB, 4(RB) |.if DUALNUM | lwz RC, 4(RC) |.else | lfd f0, 0(RC) |.endif | checktab CARG1 | checknum cr1, CARG2 | bne ->vmeta_tsetv |.if DUALNUM | lwz TMP0, TAB:RB->asize | bne cr1, >5 | lwz TMP1, TAB:RB->array | cmplw TMP0, RC | slwi TMP0, RC, 3 |.else | bge cr1, >5 | // Convert number key to integer, check for integerness and range. | fctiwz f1, f0 | fadd f2, f0, TOBIT | stfd f1, TMPD | lwz TMP0, TAB:RB->asize | fsub f2, f2, TOBIT | lwz TMP2, TMPD_LO | lwz TMP1, TAB:RB->array | fcmpu cr1, f0, f2 | cmplw cr0, TMP0, TMP2 | crand 4*cr0+gt, 4*cr0+gt, 4*cr1+eq | slwi TMP0, TMP2, 3 |.endif | ble ->vmeta_tsetv // Integer key and in array part? | lwzx TMP2, TMP1, TMP0 | lbz TMP3, TAB:RB->marked | lfdx f14, BASE, RA | checknil TMP2; beq >3 |1: | andix. TMP2, TMP3, LJ_GC_BLACK // isblack(table) | stfdx f14, TMP1, TMP0 | bne >7 |2: | ins_next | |3: // Check for __newindex if previous value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <1 // No metatable: done. | lbz TMP2, TAB:TMP2->nomm | andix. TMP2, TMP2, 1<vmeta_tsetv | |5: | checkstr CARG2; bne ->vmeta_tsetv |.if not DUALNUM | lwz STR:RC, 4(RC) |.endif | b ->BC_TSETS_Z // String key? | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0 | b <2 break; case BC_TSETS: | // RA = src*8, RB = table*8, RC = str_const*8 (~) | lwzux CARG1, RB, BASE | srwi TMP1, RC, 1 | lwz TAB:RB, 4(RB) | subfic TMP1, TMP1, -4 | checktab CARG1 | lwzx STR:RC, KBASE, TMP1 // KBASE-4-str_const*4 | bne ->vmeta_tsets1 |->BC_TSETS_Z: | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = src*8 | lwz TMP0, TAB:RB->hmask | lwz TMP1, STR:RC->hash | lwz NODE:TMP2, TAB:RB->node | stb ZERO, TAB:RB->nomm // Clear metamethod cache. | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | lfdx f14, BASE, RA | slwi TMP0, TMP1, 5 | slwi TMP1, TMP1, 3 | sub TMP1, TMP0, TMP1 | lbz TMP3, TAB:RB->marked | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) |1: | lwz CARG1, NODE:TMP2->key | lwz TMP0, 4+offsetof(Node, key)(NODE:TMP2) | lwz CARG2, NODE:TMP2->val | lwz NODE:TMP1, NODE:TMP2->next | checkstr CARG1; bne >5 | cmpw TMP0, STR:RC; bne >5 | checknil CARG2; beq >4 // Key found, but nil value? |2: | andix. TMP0, TMP3, LJ_GC_BLACK // isblack(table) | stfd f14, NODE:TMP2->val | bne >7 |3: | ins_next | |4: // Check for __newindex if previous value is nil. | lwz TAB:TMP1, TAB:RB->metatable | cmplwi TAB:TMP1, 0 | beq <2 // No metatable: done. | lbz TMP0, TAB:TMP1->nomm | andix. TMP0, TMP0, 1<vmeta_tsets | |5: // Follow hash chain. | cmplwi NODE:TMP1, 0 | mr NODE:TMP2, NODE:TMP1 | bne <1 | // End of hash chain: key not found, add a new one. | | // But check for __newindex first. | lwz TAB:TMP1, TAB:RB->metatable | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | stw PC, SAVE_PC | mr CARG1, L | cmplwi TAB:TMP1, 0 | stp BASE, L->base | beq >6 // No metatable: continue. | lbz TMP0, TAB:TMP1->nomm | andix. TMP0, TMP0, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. |6: | li TMP0, LJ_TSTR | stw STR:RC, 4(CARG3) | mr CARG2, TAB:RB | stw TMP0, 0(CARG3) | bl extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k) | // Returns TValue *. | lp BASE, L->base | stfd f14, 0(CRET1) | b <3 // No 2nd write barrier needed. | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0 | b <3 break; case BC_TSETB: | // RA = src*8, RB = table*8, RC = index*8 | lwzux CARG1, RB, BASE | srwi TMP0, RC, 3 | lwz TAB:RB, 4(RB) | checktab CARG1; bne ->vmeta_tsetb | lwz TMP1, TAB:RB->asize | lwz TMP2, TAB:RB->array | lbz TMP3, TAB:RB->marked | cmplw TMP0, TMP1 | lfdx f14, BASE, RA | bge ->vmeta_tsetb | lwzx TMP1, TMP2, RC | checknil TMP1; beq >5 |1: | andix. TMP0, TMP3, LJ_GC_BLACK // isblack(table) | stfdx f14, TMP2, RC | bne >7 |2: | ins_next | |5: // Check for __newindex if previous value is nil. | lwz TAB:TMP1, TAB:RB->metatable | cmplwi TAB:TMP1, 0 | beq <1 // No metatable: done. | lbz TMP1, TAB:TMP1->nomm | andix. TMP1, TMP1, 1<vmeta_tsetb // Caveat: preserve TMP0! | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0 | b <2 break; case BC_TSETM: | // RA = base*8 (table at base-1), RD = num_const*8 (start index) | add RA, BASE, RA |1: | add TMP3, KBASE, RD | lwz TAB:CARG2, -4(RA) // Guaranteed to be a table. | addic. TMP0, MULTRES, -8 | lwz TMP3, 4(TMP3) // Integer constant is in lo-word. | srwi CARG3, TMP0, 3 | beq >4 // Nothing to copy? | add CARG3, CARG3, TMP3 | lwz TMP2, TAB:CARG2->asize | slwi TMP1, TMP3, 3 | lbz TMP3, TAB:CARG2->marked | cmplw CARG3, TMP2 | add TMP2, RA, TMP0 | lwz TMP0, TAB:CARG2->array | bgt >5 | add TMP1, TMP1, TMP0 | andix. TMP0, TMP3, LJ_GC_BLACK // isblack(table) |3: // Copy result slots to table. | lfd f0, 0(RA) | addi RA, RA, 8 | cmpw cr1, RA, TMP2 | stfd f0, 0(TMP1) | addi TMP1, TMP1, 8 | blt cr1, <3 | bne >7 |4: | ins_next | |5: // Need to resize array part. | stp BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | mr SAVE0, RD | bl extern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize) | // Must not reallocate the stack. | mr RD, SAVE0 | b <1 | |7: // Possible table write barrier for any value. Skip valiswhite check. | barrierback TAB:CARG2, TMP3, TMP0 | b <4 break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALLM: | // RA = base*8, (RB = (nresults+1)*8,) RC = extra_nargs*8 | add NARGS8:RC, NARGS8:RC, MULTRES | // Fall through. Assumes BC_CALL follows. break; case BC_CALL: | // RA = base*8, (RB = (nresults+1)*8,) RC = (nargs+1)*8 | mr TMP2, BASE | lwzux TMP0, BASE, RA | lwz LFUNC:RB, 4(BASE) | subi NARGS8:RC, NARGS8:RC, 8 | addi BASE, BASE, 8 | checkfunc TMP0; bne ->vmeta_call | ins_call break; case BC_CALLMT: | // RA = base*8, (RB = 0,) RC = extra_nargs*8 | add NARGS8:RC, NARGS8:RC, MULTRES | // Fall through. Assumes BC_CALLT follows. break; case BC_CALLT: | // RA = base*8, (RB = 0,) RC = (nargs+1)*8 | lwzux TMP0, RA, BASE | lwz LFUNC:RB, 4(RA) | subi NARGS8:RC, NARGS8:RC, 8 | lwz TMP1, FRAME_PC(BASE) | checkfunc TMP0 | addi RA, RA, 8 | bne ->vmeta_callt |->BC_CALLT_Z: | andix. TMP0, TMP1, FRAME_TYPE // Caveat: preserve cr0 until the crand. | lbz TMP3, LFUNC:RB->ffid | xori TMP2, TMP1, FRAME_VARG | cmplwi cr1, NARGS8:RC, 0 | bne >7 |1: | stw LFUNC:RB, FRAME_FUNC(BASE) // Copy function down, but keep PC. | li TMP2, 0 | cmplwi cr7, TMP3, 1 // (> FF_C) Calling a fast function? | beq cr1, >3 |2: | addi TMP3, TMP2, 8 | lfdx f0, RA, TMP2 | cmplw cr1, TMP3, NARGS8:RC | stfdx f0, BASE, TMP2 | mr TMP2, TMP3 | bne cr1, <2 |3: | crand 4*cr0+eq, 4*cr0+eq, 4*cr7+gt | beq >5 |4: | ins_callt | |5: // Tailcall to a fast function with a Lua frame below. | lwz INS, -4(TMP1) | decode_RA8 RA, INS | sub TMP1, BASE, RA | lwz LFUNC:TMP1, FRAME_FUNC-8(TMP1) | lwz TMP1, LFUNC:TMP1->pc | lwz KBASE, PC2PROTO(k)(TMP1) // Need to prepare KBASE. | b <4 | |7: // Tailcall from a vararg function. | andix. TMP0, TMP2, FRAME_TYPEP | bne <1 // Vararg frame below? | sub BASE, BASE, TMP2 // Relocate BASE down. | lwz TMP1, FRAME_PC(BASE) | andix. TMP0, TMP1, FRAME_TYPE | b <1 break; case BC_ITERC: | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 ((2+1)*8)) | mr TMP2, BASE | add BASE, BASE, RA | lwz TMP1, -24(BASE) | lwz LFUNC:RB, -20(BASE) | lfd f1, -8(BASE) | lfd f0, -16(BASE) | stw TMP1, 0(BASE) // Copy callable. | stw LFUNC:RB, 4(BASE) | checkfunc TMP1 | stfd f1, 16(BASE) // Copy control var. | li NARGS8:RC, 16 // Iterators get 2 arguments. | stfdu f0, 8(BASE) // Copy state. | bne ->vmeta_call | ins_call break; case BC_ITERN: | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 (2+1)*8) |.if JIT | // NYI: add hotloop, record BC_ITERN. |.endif | add RA, BASE, RA | lwz TAB:RB, -12(RA) | lwz RC, -4(RA) // Get index from control var. | lwz TMP0, TAB:RB->asize | lwz TMP1, TAB:RB->array | addi PC, PC, 4 |1: // Traverse array part. | cmplw RC, TMP0 | slwi TMP3, RC, 3 | bge >5 // Index points after array part? | lwzx TMP2, TMP1, TMP3 | lfdx f0, TMP1, TMP3 | checknil TMP2 | lwz INS, -4(PC) | beq >4 |.if DUALNUM | stw RC, 4(RA) | stw TISNUM, 0(RA) |.else | tonum_u f1, RC |.endif | addi RC, RC, 1 | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | stfd f0, 8(RA) | decode_RD4 TMP1, INS | stw RC, -4(RA) // Update control var. | add PC, TMP1, TMP3 |.if not DUALNUM | stfd f1, 0(RA) |.endif |3: | ins_next | |4: // Skip holes in array part. | addi RC, RC, 1 | b <1 | |5: // Traverse hash part. | lwz TMP1, TAB:RB->hmask | sub RC, RC, TMP0 | lwz TMP2, TAB:RB->node |6: | cmplw RC, TMP1 // End of iteration? Branch to ITERL+1. | slwi TMP3, RC, 5 | bgty <3 | slwi RB, RC, 3 | sub TMP3, TMP3, RB | lwzx RB, TMP2, TMP3 | lfdx f0, TMP2, TMP3 | add NODE:TMP3, TMP2, TMP3 | checknil RB | lwz INS, -4(PC) | beq >7 | lfd f1, NODE:TMP3->key | addis TMP2, PC, -(BCBIAS_J*4 >> 16) | stfd f0, 8(RA) | add RC, RC, TMP0 | decode_RD4 TMP1, INS | stfd f1, 0(RA) | addi RC, RC, 1 | add PC, TMP1, TMP2 | stw RC, -4(RA) // Update control var. | b <3 | |7: // Skip holes in hash part. | addi RC, RC, 1 | b <6 break; case BC_ISNEXT: | // RA = base*8, RD = target (points to ITERN) | add RA, BASE, RA | lwz TMP0, -24(RA) | lwz CFUNC:TMP1, -20(RA) | lwz TMP2, -16(RA) | lwz TMP3, -8(RA) | cmpwi cr0, TMP2, LJ_TTAB | cmpwi cr1, TMP0, LJ_TFUNC | cmpwi cr6, TMP3, LJ_TNIL | bne cr1, >5 | lbz TMP1, CFUNC:TMP1->ffid | crand 4*cr0+eq, 4*cr0+eq, 4*cr6+eq | cmpwi cr7, TMP1, FF_next_N | srwi TMP0, RD, 1 | crand 4*cr0+eq, 4*cr0+eq, 4*cr7+eq | add TMP3, PC, TMP0 | bne cr0, >5 | lus TMP1, 0xfffe | ori TMP1, TMP1, 0x7fff | stw ZERO, -4(RA) // Initialize control var. | stw TMP1, -8(RA) | addis PC, TMP3, -(BCBIAS_J*4 >> 16) |1: | ins_next |5: // Despecialize bytecode if any of the checks fail. | li TMP0, BC_JMP | li TMP1, BC_ITERC | stb TMP0, -1(PC) | addis PC, TMP3, -(BCBIAS_J*4 >> 16) | stb TMP1, 3(PC) | b <1 break; case BC_VARG: | // RA = base*8, RB = (nresults+1)*8, RC = numparams*8 | lwz TMP0, FRAME_PC(BASE) | add RC, BASE, RC | add RA, BASE, RA | addi RC, RC, FRAME_VARG | add TMP2, RA, RB | subi TMP3, BASE, 8 // TMP3 = vtop | sub RC, RC, TMP0 // RC = vbase | // Note: RC may now be even _above_ BASE if nargs was < numparams. | cmplwi cr1, RB, 0 |.if PPE | sub TMP1, TMP3, RC | cmpwi TMP1, 0 |.else | sub. TMP1, TMP3, RC |.endif | beq cr1, >5 // Copy all varargs? | subi TMP2, TMP2, 16 | ble >2 // No vararg slots? |1: // Copy vararg slots to destination slots. | lfd f0, 0(RC) | addi RC, RC, 8 | stfd f0, 0(RA) | cmplw RA, TMP2 | cmplw cr1, RC, TMP3 | bge >3 // All destination slots filled? | addi RA, RA, 8 | blt cr1, <1 // More vararg slots? |2: // Fill up remainder with nil. | stw TISNIL, 0(RA) | cmplw RA, TMP2 | addi RA, RA, 8 | blt <2 |3: | ins_next | |5: // Copy all varargs. | lwz TMP0, L->maxstack | li MULTRES, 8 // MULTRES = (0+1)*8 | bley <3 // No vararg slots? | add TMP2, RA, TMP1 | cmplw TMP2, TMP0 | addi MULTRES, TMP1, 8 | bgt >7 |6: | lfd f0, 0(RC) | addi RC, RC, 8 | stfd f0, 0(RA) | cmplw RC, TMP3 | addi RA, RA, 8 | blt <6 // More vararg slots? | b <3 | |7: // Grow stack for varargs. | mr CARG1, L | stp RA, L->top | sub SAVE0, RC, BASE // Need delta, because BASE may change. | stp BASE, L->base | sub RA, RA, BASE | stw PC, SAVE_PC | srwi CARG2, TMP1, 3 | bl extern lj_state_growstack // (lua_State *L, int n) | lp BASE, L->base | add RA, BASE, RA | add RC, BASE, SAVE0 | subi TMP3, BASE, 8 | b <6 break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: | // RA = results*8, RD = extra_nresults*8 | add RD, RD, MULTRES // MULTRES >= 8, so RD >= 8. | // Fall through. Assumes BC_RET follows. break; case BC_RET: | // RA = results*8, RD = (nresults+1)*8 | lwz PC, FRAME_PC(BASE) | add RA, BASE, RA | mr MULTRES, RD |1: | andix. TMP0, PC, FRAME_TYPE | xori TMP1, PC, FRAME_VARG | bne ->BC_RETV_Z | |->BC_RET_Z: | // BASE = base, RA = resultptr, RD = (nresults+1)*8, PC = return | lwz INS, -4(PC) | cmpwi RD, 8 | subi TMP2, BASE, 8 | subi RC, RD, 8 | decode_RB8 RB, INS | beq >3 | li TMP1, 0 |2: | addi TMP3, TMP1, 8 | lfdx f0, RA, TMP1 | cmpw TMP3, RC | stfdx f0, TMP2, TMP1 | beq >3 | addi TMP1, TMP3, 8 | lfdx f1, RA, TMP3 | cmpw TMP1, RC | stfdx f1, TMP2, TMP3 | bne <2 |3: |5: | cmplw RB, RD | decode_RA8 RA, INS | bgt >6 | sub BASE, TMP2, RA | lwz LFUNC:TMP1, FRAME_FUNC(BASE) | ins_next1 | lwz TMP1, LFUNC:TMP1->pc | lwz KBASE, PC2PROTO(k)(TMP1) | ins_next2 | |6: // Fill up results with nil. | subi TMP1, RD, 8 | addi RD, RD, 8 | stwx TISNIL, TMP2, TMP1 | b <5 | |->BC_RETV_Z: // Non-standard return case. | andix. TMP2, TMP1, FRAME_TYPEP | bne ->vm_return | // Return from vararg function: relocate BASE down. | sub BASE, BASE, TMP1 | lwz PC, FRAME_PC(BASE) | b <1 break; case BC_RET0: case BC_RET1: | // RA = results*8, RD = (nresults+1)*8 | lwz PC, FRAME_PC(BASE) | add RA, BASE, RA | mr MULTRES, RD | andix. TMP0, PC, FRAME_TYPE | xori TMP1, PC, FRAME_VARG | bney ->BC_RETV_Z | | lwz INS, -4(PC) | subi TMP2, BASE, 8 | decode_RB8 RB, INS if (op == BC_RET1) { | lfd f0, 0(RA) | stfd f0, 0(TMP2) } |5: | cmplw RB, RD | decode_RA8 RA, INS | bgt >6 | sub BASE, TMP2, RA | lwz LFUNC:TMP1, FRAME_FUNC(BASE) | ins_next1 | lwz TMP1, LFUNC:TMP1->pc | lwz KBASE, PC2PROTO(k)(TMP1) | ins_next2 | |6: // Fill up results with nil. | subi TMP1, RD, 8 | addi RD, RD, 8 | stwx TISNIL, TMP2, TMP1 | b <5 break; /* -- Loops and branches ------------------------------------------------ */ case BC_FORL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IFORL follows. break; case BC_JFORI: case BC_JFORL: #if !LJ_HASJIT break; #endif case BC_FORI: case BC_IFORL: | // RA = base*8, RD = target (after end of loop or start of loop) vk = (op == BC_IFORL || op == BC_JFORL); |.if DUALNUM | // Integer loop. | lwzux TMP1, RA, BASE | lwz CARG1, FORL_IDX*8+4(RA) | cmplw cr0, TMP1, TISNUM if (vk) { | lwz CARG3, FORL_STEP*8+4(RA) | bne >9 |.if GPR64 | // Need to check overflow for (a<<32) + (b<<32). | rldicr TMP0, CARG1, 32, 31 | rldicr TMP2, CARG3, 32, 31 | add CARG1, CARG1, CARG3 | addo. TMP0, TMP0, TMP2 |.else | addo. CARG1, CARG1, CARG3 |.endif | cmpwi cr6, CARG3, 0 | lwz CARG2, FORL_STOP*8+4(RA) | bso >6 |4: | stw CARG1, FORL_IDX*8+4(RA) } else { | lwz TMP3, FORL_STEP*8(RA) | lwz CARG3, FORL_STEP*8+4(RA) | lwz TMP2, FORL_STOP*8(RA) | lwz CARG2, FORL_STOP*8+4(RA) | cmplw cr7, TMP3, TISNUM | cmplw cr1, TMP2, TISNUM | crand 4*cr0+eq, 4*cr0+eq, 4*cr7+eq | crand 4*cr0+eq, 4*cr0+eq, 4*cr1+eq | cmpwi cr6, CARG3, 0 | bne >9 } | blt cr6, >5 | cmpw CARG1, CARG2 |1: | stw TISNUM, FORL_EXT*8(RA) if (op != BC_JFORL) { | srwi RD, RD, 1 } | stw CARG1, FORL_EXT*8+4(RA) if (op != BC_JFORL) { | add RD, PC, RD } if (op == BC_FORI) { | bgt >3 // See FP loop below. } else if (op == BC_JFORI) { | addis PC, RD, -(BCBIAS_J*4 >> 16) | bley >7 } else if (op == BC_IFORL) { | bgt >2 | addis PC, RD, -(BCBIAS_J*4 >> 16) } else { | bley =>BC_JLOOP } |2: | ins_next |5: // Invert check for negative step. | cmpw CARG2, CARG1 | b <1 if (vk) { |6: // Potential overflow. | mcrxr cr0; bley <4 // Ignore unrelated overflow. | b <2 } |.endif if (vk) { |.if DUALNUM |9: // FP loop. | lfd f1, FORL_IDX*8(RA) |.else | lfdux f1, RA, BASE |.endif | lfd f3, FORL_STEP*8(RA) | lfd f2, FORL_STOP*8(RA) | lwz TMP3, FORL_STEP*8(RA) | fadd f1, f1, f3 | stfd f1, FORL_IDX*8(RA) } else { |.if DUALNUM |9: // FP loop. |.else | lwzux TMP1, RA, BASE | lwz TMP3, FORL_STEP*8(RA) | lwz TMP2, FORL_STOP*8(RA) | cmplw cr0, TMP1, TISNUM | cmplw cr7, TMP3, TISNUM | cmplw cr1, TMP2, TISNUM |.endif | lfd f1, FORL_IDX*8(RA) | crand 4*cr0+lt, 4*cr0+lt, 4*cr7+lt | crand 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | lfd f2, FORL_STOP*8(RA) | bge ->vmeta_for } | cmpwi cr6, TMP3, 0 if (op != BC_JFORL) { | srwi RD, RD, 1 } | stfd f1, FORL_EXT*8(RA) if (op != BC_JFORL) { | add RD, PC, RD } | fcmpu cr0, f1, f2 if (op == BC_JFORI) { | addis PC, RD, -(BCBIAS_J*4 >> 16) } | blt cr6, >5 if (op == BC_FORI) { | bgt >3 } else if (op == BC_IFORL) { |.if DUALNUM | bgty <2 |.else | bgt >2 |.endif |1: | addis PC, RD, -(BCBIAS_J*4 >> 16) } else if (op == BC_JFORI) { | bley >7 } else { | bley =>BC_JLOOP } |.if DUALNUM | b <2 |.else |2: | ins_next |.endif |5: // Negative step. if (op == BC_FORI) { | bge <2 |3: // Used by integer loop, too. | addis PC, RD, -(BCBIAS_J*4 >> 16) } else if (op == BC_IFORL) { | bgey <1 } else if (op == BC_JFORI) { | bgey >7 } else { | bgey =>BC_JLOOP } | b <2 if (op == BC_JFORI) { |7: | lwz INS, -4(PC) | decode_RD8 RD, INS | b =>BC_JLOOP } break; case BC_ITERL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IITERL follows. break; case BC_JITERL: #if !LJ_HASJIT break; #endif case BC_IITERL: | // RA = base*8, RD = target | lwzux TMP1, RA, BASE | lwz TMP2, 4(RA) | checknil TMP1; beq >1 // Stop if iterator returned nil. if (op == BC_JITERL) { | stw TMP1, -8(RA) | stw TMP2, -4(RA) | b =>BC_JLOOP } else { | branch_RD // Otherwise save control var + branch. | stw TMP1, -8(RA) | stw TMP2, -4(RA) } |1: | ins_next break; case BC_LOOP: | // RA = base*8, RD = target (loop extent) | // Note: RA/RD is only used by trace recorder to determine scope/extent | // This opcode does NOT jump, it's only purpose is to detect a hot loop. |.if JIT | hotloop |.endif | // Fall through. Assumes BC_ILOOP follows. break; case BC_ILOOP: | // RA = base*8, RD = target (loop extent) | ins_next break; case BC_JLOOP: |.if JIT | // RA = base*8 (ignored), RD = traceno*8 | lwz TMP1, DISPATCH_J(trace)(DISPATCH) | srwi RD, RD, 1 | // Traces on PPC don't store the trace number, so use 0. | stw ZERO, DISPATCH_GL(vmstate)(DISPATCH) | lwzx TRACE:TMP2, TMP1, RD | mcrxr cr0 // Clear SO flag. | lp TMP2, TRACE:TMP2->mcode | stw BASE, DISPATCH_GL(jit_base)(DISPATCH) | mtctr TMP2 | stw L, DISPATCH_GL(jit_L)(DISPATCH) | addi JGL, DISPATCH, GG_DISP2G+32768 | bctr |.endif break; case BC_JMP: | // RA = base*8 (only used by trace recorder), RD = target | branch_RD | ins_next break; /* -- Function headers -------------------------------------------------- */ case BC_FUNCF: |.if JIT | hotcall |.endif case BC_FUNCV: /* NYI: compiled vararg functions. */ | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow. break; case BC_JFUNCF: #if !LJ_HASJIT break; #endif case BC_IFUNCF: | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 | lwz TMP2, L->maxstack | lbz TMP1, -4+PC2PROTO(numparams)(PC) | lwz KBASE, -4+PC2PROTO(k)(PC) | cmplw RA, TMP2 | slwi TMP1, TMP1, 3 | bgt ->vm_growstack_l if (op != BC_JFUNCF) { | ins_next1 } |2: | cmplw NARGS8:RC, TMP1 // Check for missing parameters. | blt >3 if (op == BC_JFUNCF) { | decode_RD8 RD, INS | b =>BC_JLOOP } else { | ins_next2 } | |3: // Clear missing parameters. | stwx TISNIL, BASE, NARGS8:RC | addi NARGS8:RC, NARGS8:RC, 8 | b <2 break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif | NYI // NYI: compiled vararg functions break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 | lwz TMP2, L->maxstack | add TMP1, BASE, RC | add TMP0, RA, RC | stw LFUNC:RB, 4(TMP1) // Store copy of LFUNC. | addi TMP3, RC, 8+FRAME_VARG | lwz KBASE, -4+PC2PROTO(k)(PC) | cmplw TMP0, TMP2 | stw TMP3, 0(TMP1) // Store delta + FRAME_VARG. | bge ->vm_growstack_l | lbz TMP2, -4+PC2PROTO(numparams)(PC) | mr RA, BASE | mr RC, TMP1 | ins_next1 | cmpwi TMP2, 0 | addi BASE, TMP1, 8 | beq >3 |1: | cmplw RA, RC // Less args than parameters? | lwz TMP0, 0(RA) | lwz TMP3, 4(RA) | bge >4 | stw TISNIL, 0(RA) // Clear old fixarg slot (help the GC). | addi RA, RA, 8 |2: | addic. TMP2, TMP2, -1 | stw TMP0, 8(TMP1) | stw TMP3, 12(TMP1) | addi TMP1, TMP1, 8 | bne <1 |3: | ins_next2 | |4: // Clear missing parameters. | li TMP0, LJ_TNIL | b <2 break; case BC_FUNCC: case BC_FUNCCW: | // BASE = new base, RA = BASE+framesize*8, RB = CFUNC, RC = nargs*8 if (op == BC_FUNCC) { | lp RD, CFUNC:RB->f } else { | lp RD, DISPATCH_GL(wrapf)(DISPATCH) } | add TMP1, RA, NARGS8:RC | lwz TMP2, L->maxstack | .toc lp TMP3, 0(RD) | add RC, BASE, NARGS8:RC | stp BASE, L->base | cmplw TMP1, TMP2 | stp RC, L->top | li_vmstate C |.if TOC | mtctr TMP3 |.else | mtctr RD |.endif if (op == BC_FUNCCW) { | lp CARG2, CFUNC:RB->f } | mr CARG1, L | bgt ->vm_growstack_c // Need to grow stack. | .toc lp TOCREG, TOC_OFS(RD) | .tocenv lp ENVREG, ENV_OFS(RD) | st_vmstate | bctrl // (lua_State *L [, lua_CFunction f]) | // Returns nresults. | lp BASE, L->base | .toc ld TOCREG, SAVE_TOC | slwi RD, CRET1, 3 | lp TMP1, L->top | li_vmstate INTERP | lwz PC, FRAME_PC(BASE) // Fetch PC of caller. | sub RA, TMP1, RD // RA = L->top - nresults*8 | st_vmstate | b ->vm_returnc break; /* ---------------------------------------------------------------------- */ default: fprintf(stderr, "Error: undefined opcode BC_%s\n", bc_names[op]); exit(2); break; } } static int build_backend(BuildCtx *ctx) { int op; dasm_growpc(Dst, BC__MAX); build_subroutines(ctx); |.code_op for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op); return BC__MAX; } /* Emit pseudo frame-info for all assembler functions. */ static void emit_asm_debug(BuildCtx *ctx) { int fcofs = (int)((uint8_t *)ctx->glob[GLOB_vm_ffi_call] - ctx->code); int i; switch (ctx->mode) { case BUILD_elfasm: fprintf(ctx->fp, "\t.section .debug_frame,\"\",@progbits\n"); fprintf(ctx->fp, ".Lframe0:\n" "\t.long .LECIE0-.LSCIE0\n" ".LSCIE0:\n" "\t.long 0xffffffff\n" "\t.byte 0x1\n" "\t.string \"\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 65\n" "\t.byte 0xc\n\t.uleb128 1\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE0:\n\n"); fprintf(ctx->fp, ".LSFDE0:\n" "\t.long .LEFDE0-.LASFDE0\n" ".LASFDE0:\n" "\t.long .Lframe0\n" "\t.long .Lbegin\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n" "\t.byte 0x5\n\t.uleb128 70\n\t.uleb128 55\n", fcofs, CFRAME_SIZE); for (i = 14; i <= 31; i++) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n" "\t.byte %d\n\t.uleb128 %d\n", 0x80+i, 37+(31-i), 0x80+32+i, 2+2*(31-i)); fprintf(ctx->fp, "\t.align 2\n" ".LEFDE0:\n\n"); #if LJ_HASFFI fprintf(ctx->fp, ".LSFDE1:\n" "\t.long .LEFDE1-.LASFDE1\n" ".LASFDE1:\n" "\t.long .Lframe0\n" #if LJ_TARGET_PS3 "\t.long .lj_vm_ffi_call\n" #else "\t.long lj_vm_ffi_call\n" #endif "\t.long %d\n" "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n" "\t.byte 0x8e\n\t.uleb128 2\n" "\t.byte 0xd\n\t.uleb128 0xe\n" "\t.align 2\n" ".LEFDE1:\n\n", (int)ctx->codesz - fcofs); #endif #if !LJ_NO_UNWIND fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); fprintf(ctx->fp, ".Lframe1:\n" "\t.long .LECIE1-.LSCIE1\n" ".LSCIE1:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.string \"zPR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 65\n" "\t.uleb128 6\n" /* augmentation length */ "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.long lj_err_unwind_dwarf-.\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.uleb128 1\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE1:\n\n"); fprintf(ctx->fp, ".LSFDE2:\n" "\t.long .LEFDE2-.LASFDE2\n" ".LASFDE2:\n" "\t.long .LASFDE2-.Lframe1\n" "\t.long .Lbegin-.\n" "\t.long %d\n" "\t.uleb128 0\n" /* augmentation length */ "\t.byte 0xe\n\t.uleb128 %d\n" "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n" "\t.byte 0x5\n\t.uleb128 70\n\t.uleb128 55\n", fcofs, CFRAME_SIZE); for (i = 14; i <= 31; i++) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n" "\t.byte %d\n\t.uleb128 %d\n", 0x80+i, 37+(31-i), 0x80+32+i, 2+2*(31-i)); fprintf(ctx->fp, "\t.align 2\n" ".LEFDE2:\n\n"); #if LJ_HASFFI fprintf(ctx->fp, ".Lframe2:\n" "\t.long .LECIE2-.LSCIE2\n" ".LSCIE2:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.string \"zR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 65\n" "\t.uleb128 1\n" /* augmentation length */ "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.uleb128 1\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE2:\n\n"); fprintf(ctx->fp, ".LSFDE3:\n" "\t.long .LEFDE3-.LASFDE3\n" ".LASFDE3:\n" "\t.long .LASFDE3-.Lframe2\n" "\t.long lj_vm_ffi_call-.\n" "\t.long %d\n" "\t.uleb128 0\n" /* augmentation length */ "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n" "\t.byte 0x8e\n\t.uleb128 2\n" "\t.byte 0xd\n\t.uleb128 0xe\n" "\t.align 2\n" ".LEFDE3:\n\n", (int)ctx->codesz - fcofs); #endif #endif break; default: break; } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_math.c0000664000000000000000000001405612231715321022316 0ustar rootroot/* ** Math library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include #define lib_math_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_lib.h" #include "lj_vm.h" /* ------------------------------------------------------------------------ */ #define LJLIB_MODULE_math LJLIB_ASM(math_abs) LJLIB_REC(.) { lj_lib_checknumber(L, 1); return FFH_RETRY; } LJLIB_ASM_(math_floor) LJLIB_REC(math_round IRFPM_FLOOR) LJLIB_ASM_(math_ceil) LJLIB_REC(math_round IRFPM_CEIL) LJLIB_ASM(math_sqrt) LJLIB_REC(math_unary IRFPM_SQRT) { lj_lib_checknum(L, 1); return FFH_RETRY; } LJLIB_ASM_(math_log10) LJLIB_REC(math_unary IRFPM_LOG10) LJLIB_ASM_(math_exp) LJLIB_REC(math_unary IRFPM_EXP) LJLIB_ASM_(math_sin) LJLIB_REC(math_unary IRFPM_SIN) LJLIB_ASM_(math_cos) LJLIB_REC(math_unary IRFPM_COS) LJLIB_ASM_(math_tan) LJLIB_REC(math_unary IRFPM_TAN) LJLIB_ASM_(math_asin) LJLIB_REC(math_atrig FF_math_asin) LJLIB_ASM_(math_acos) LJLIB_REC(math_atrig FF_math_acos) LJLIB_ASM_(math_atan) LJLIB_REC(math_atrig FF_math_atan) LJLIB_ASM_(math_sinh) LJLIB_REC(math_htrig IRCALL_sinh) LJLIB_ASM_(math_cosh) LJLIB_REC(math_htrig IRCALL_cosh) LJLIB_ASM_(math_tanh) LJLIB_REC(math_htrig IRCALL_tanh) LJLIB_ASM_(math_frexp) LJLIB_ASM_(math_modf) LJLIB_REC(.) LJLIB_PUSH(57.29577951308232) LJLIB_ASM_(math_deg) LJLIB_REC(math_degrad) LJLIB_PUSH(0.017453292519943295) LJLIB_ASM_(math_rad) LJLIB_REC(math_degrad) LJLIB_ASM(math_log) LJLIB_REC(math_log) { double x = lj_lib_checknum(L, 1); if (L->base+1 < L->top) { double y = lj_lib_checknum(L, 2); #ifdef LUAJIT_NO_LOG2 x = log(x); y = 1.0 / log(y); #else x = lj_vm_log2(x); y = 1.0 / lj_vm_log2(y); #endif setnumV(L->base-1, x*y); /* Do NOT join the expression to x / y. */ return FFH_RES(1); } return FFH_RETRY; } LJLIB_ASM(math_atan2) LJLIB_REC(.) { lj_lib_checknum(L, 1); lj_lib_checknum(L, 2); return FFH_RETRY; } LJLIB_ASM_(math_pow) LJLIB_REC(.) LJLIB_ASM_(math_fmod) LJLIB_ASM(math_ldexp) LJLIB_REC(.) { lj_lib_checknum(L, 1); #if LJ_DUALNUM && !LJ_TARGET_X86ORX64 lj_lib_checkint(L, 2); #else lj_lib_checknum(L, 2); #endif return FFH_RETRY; } LJLIB_ASM(math_min) LJLIB_REC(math_minmax IR_MIN) { int i = 0; do { lj_lib_checknumber(L, ++i); } while (L->base+i < L->top); return FFH_RETRY; } LJLIB_ASM_(math_max) LJLIB_REC(math_minmax IR_MAX) LJLIB_PUSH(3.14159265358979323846) LJLIB_SET(pi) LJLIB_PUSH(1e310) LJLIB_SET(huge) /* ------------------------------------------------------------------------ */ /* This implements a Tausworthe PRNG with period 2^223. Based on: ** Tables of maximally-equidistributed combined LFSR generators, ** Pierre L'Ecuyer, 1991, table 3, 1st entry. ** Full-period ME-CF generator with L=64, J=4, k=223, N1=49. */ /* PRNG state. */ struct RandomState { uint64_t gen[4]; /* State of the 4 LFSR generators. */ int valid; /* State is valid. */ }; /* Union needed for bit-pattern conversion between uint64_t and double. */ typedef union { uint64_t u64; double d; } U64double; /* Update generator i and compute a running xor of all states. */ #define TW223_GEN(i, k, q, s) \ z = rs->gen[i]; \ z = (((z<> (k-s)) ^ ((z&((uint64_t)(int64_t)-1 << (64-k)))<gen[i] = z; /* PRNG step function. Returns a double in the range 1.0 <= d < 2.0. */ LJ_NOINLINE uint64_t LJ_FASTCALL lj_math_random_step(RandomState *rs) { uint64_t z, r = 0; TW223_GEN(0, 63, 31, 18) TW223_GEN(1, 58, 19, 28) TW223_GEN(2, 55, 24, 7) TW223_GEN(3, 47, 21, 8) return (r & U64x(000fffff,ffffffff)) | U64x(3ff00000,00000000); } /* PRNG initialization function. */ static void random_init(RandomState *rs, double d) { uint32_t r = 0x11090601; /* 64-k[i] as four 8 bit constants. */ int i; for (i = 0; i < 4; i++) { U64double u; uint32_t m = 1u << (r&255); r >>= 8; u.d = d = d * 3.14159265358979323846 + 2.7182818284590452354; if (u.u64 < m) u.u64 += m; /* Ensure k[i] MSB of gen[i] are non-zero. */ rs->gen[i] = u.u64; } rs->valid = 1; for (i = 0; i < 10; i++) lj_math_random_step(rs); } /* PRNG extract function. */ LJLIB_PUSH(top-2) /* Upvalue holds userdata with RandomState. */ LJLIB_CF(math_random) LJLIB_REC(.) { int n = (int)(L->top - L->base); RandomState *rs = (RandomState *)(uddata(udataV(lj_lib_upvalue(L, 1)))); U64double u; double d; if (LJ_UNLIKELY(!rs->valid)) random_init(rs, 0.0); u.u64 = lj_math_random_step(rs); d = u.d - 1.0; if (n > 0) { #if LJ_DUALNUM int isint = 1; double r1; lj_lib_checknumber(L, 1); if (tvisint(L->base)) { r1 = (lua_Number)intV(L->base); } else { isint = 0; r1 = numV(L->base); } #else double r1 = lj_lib_checknum(L, 1); #endif if (n == 1) { d = lj_vm_floor(d*r1) + 1.0; /* d is an int in range [1, r1] */ } else { #if LJ_DUALNUM double r2; lj_lib_checknumber(L, 2); if (tvisint(L->base+1)) { r2 = (lua_Number)intV(L->base+1); } else { isint = 0; r2 = numV(L->base+1); } #else double r2 = lj_lib_checknum(L, 2); #endif d = lj_vm_floor(d*(r2-r1+1.0)) + r1; /* d is an int in range [r1, r2] */ } #if LJ_DUALNUM if (isint) { setintV(L->top-1, lj_num2int(d)); return 1; } #endif } /* else: d is a double in range [0, 1] */ setnumV(L->top++, d); return 1; } /* PRNG seed function. */ LJLIB_PUSH(top-2) /* Upvalue holds userdata with RandomState. */ LJLIB_CF(math_randomseed) { RandomState *rs = (RandomState *)(uddata(udataV(lj_lib_upvalue(L, 1)))); random_init(rs, lj_lib_checknum(L, 1)); return 0; } /* ------------------------------------------------------------------------ */ #include "lj_libdef.h" LUALIB_API int luaopen_math(lua_State *L) { RandomState *rs; rs = (RandomState *)lua_newuserdata(L, sizeof(RandomState)); rs->valid = 0; /* Use lazy initialization to save some time on startup. */ LJ_LIB_REG(L, LUA_MATHLIBNAME, math); #if defined(LUA_COMPAT_MOD) && !LJ_52 lua_getfield(L, -1, "fmod"); lua_setfield(L, -2, "mod"); #endif return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ir.c0000664000000000000000000003240012202141143021620 0ustar rootroot/* ** SSA IR (Intermediate Representation) emitter. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_ir_c #define LUA_CORE /* For pointers to libc/libm functions. */ #include #include #include "lj_obj.h" #if LJ_HASJIT #include "lj_gc.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_ircall.h" #include "lj_iropt.h" #include "lj_trace.h" #if LJ_HASFFI #include "lj_ctype.h" #include "lj_cdata.h" #include "lj_carith.h" #endif #include "lj_vm.h" #include "lj_strscan.h" #include "lj_lib.h" /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) #define fins (&J->fold.ins) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) /* -- IR tables ----------------------------------------------------------- */ /* IR instruction modes. */ LJ_DATADEF const uint8_t lj_ir_mode[IR__MAX+1] = { IRDEF(IRMODE) 0 }; /* IR type sizes. */ LJ_DATADEF const uint8_t lj_ir_type_size[IRT__MAX+1] = { #define IRTSIZE(name, size) size, IRTDEF(IRTSIZE) #undef IRTSIZE 0 }; /* C call info for CALL* instructions. */ LJ_DATADEF const CCallInfo lj_ir_callinfo[] = { #define IRCALLCI(cond, name, nargs, kind, type, flags) \ { (ASMFunction)IRCALLCOND_##cond(name), \ (nargs)|(CCI_CALL_##kind)|(IRT_##type<irbuf + J->irbotlim; MSize szins = J->irtoplim - J->irbotlim; if (szins) { baseir = (IRIns *)lj_mem_realloc(J->L, baseir, szins*sizeof(IRIns), 2*szins*sizeof(IRIns)); J->irtoplim = J->irbotlim + 2*szins; } else { baseir = (IRIns *)lj_mem_realloc(J->L, NULL, 0, LJ_MIN_IRSZ*sizeof(IRIns)); J->irbotlim = REF_BASE - LJ_MIN_IRSZ/4; J->irtoplim = J->irbotlim + LJ_MIN_IRSZ; } J->cur.ir = J->irbuf = baseir - J->irbotlim; } /* Grow IR buffer at the bottom or shift it up. */ static void lj_ir_growbot(jit_State *J) { IRIns *baseir = J->irbuf + J->irbotlim; MSize szins = J->irtoplim - J->irbotlim; lua_assert(szins != 0); lua_assert(J->cur.nk == J->irbotlim); if (J->cur.nins + (szins >> 1) < J->irtoplim) { /* More than half of the buffer is free on top: shift up by a quarter. */ MSize ofs = szins >> 2; memmove(baseir + ofs, baseir, (J->cur.nins - J->irbotlim)*sizeof(IRIns)); J->irbotlim -= ofs; J->irtoplim -= ofs; J->cur.ir = J->irbuf = baseir - J->irbotlim; } else { /* Double the buffer size, but split the growth amongst top/bottom. */ IRIns *newbase = lj_mem_newt(J->L, 2*szins*sizeof(IRIns), IRIns); MSize ofs = szins >= 256 ? 128 : (szins >> 1); /* Limit bottom growth. */ memcpy(newbase + ofs, baseir, (J->cur.nins - J->irbotlim)*sizeof(IRIns)); lj_mem_free(G(J->L), baseir, szins*sizeof(IRIns)); J->irbotlim -= ofs; J->irtoplim = J->irbotlim + 2*szins; J->cur.ir = J->irbuf = newbase - J->irbotlim; } } /* Emit IR without any optimizations. */ TRef LJ_FASTCALL lj_ir_emit(jit_State *J) { IRRef ref = lj_ir_nextins(J); IRIns *ir = IR(ref); IROp op = fins->o; ir->prev = J->chain[op]; J->chain[op] = (IRRef1)ref; ir->o = op; ir->op1 = fins->op1; ir->op2 = fins->op2; J->guardemit.irt |= fins->t.irt; return TREF(ref, irt_t((ir->t = fins->t))); } /* Emit call to a C function. */ TRef lj_ir_call(jit_State *J, IRCallID id, ...) { const CCallInfo *ci = &lj_ir_callinfo[id]; uint32_t n = CCI_NARGS(ci); TRef tr = TREF_NIL; va_list argp; va_start(argp, id); if ((ci->flags & CCI_L)) n--; if (n > 0) tr = va_arg(argp, IRRef); while (n-- > 1) tr = emitir(IRT(IR_CARG, IRT_NIL), tr, va_arg(argp, IRRef)); va_end(argp); if (CCI_OP(ci) == IR_CALLS) J->needsnap = 1; /* Need snapshot after call with side effect. */ return emitir(CCI_OPTYPE(ci), tr, id); } /* -- Interning of constants ---------------------------------------------- */ /* ** IR instructions for constants are kept between J->cur.nk >= ref < REF_BIAS. ** They are chained like all other instructions, but grow downwards. ** The are interned (like strings in the VM) to facilitate reference ** comparisons. The same constant must get the same reference. */ /* Get ref of next IR constant and optionally grow IR. ** Note: this may invalidate all IRIns *! */ static LJ_AINLINE IRRef ir_nextk(jit_State *J) { IRRef ref = J->cur.nk; if (LJ_UNLIKELY(ref <= J->irbotlim)) lj_ir_growbot(J); J->cur.nk = --ref; return ref; } /* Intern int32_t constant. */ TRef LJ_FASTCALL lj_ir_kint(jit_State *J, int32_t k) { IRIns *ir, *cir = J->cur.ir; IRRef ref; for (ref = J->chain[IR_KINT]; ref; ref = cir[ref].prev) if (cir[ref].i == k) goto found; ref = ir_nextk(J); ir = IR(ref); ir->i = k; ir->t.irt = IRT_INT; ir->o = IR_KINT; ir->prev = J->chain[IR_KINT]; J->chain[IR_KINT] = (IRRef1)ref; found: return TREF(ref, IRT_INT); } /* The MRef inside the KNUM/KINT64 IR instructions holds the address of the ** 64 bit constant. The constants themselves are stored in a chained array ** and shared across traces. ** ** Rationale for choosing this data structure: ** - The address of the constants is embedded in the generated machine code ** and must never move. A resizable array or hash table wouldn't work. ** - Most apps need very few non-32 bit integer constants (less than a dozen). ** - Linear search is hard to beat in terms of speed and low complexity. */ typedef struct K64Array { MRef next; /* Pointer to next list. */ MSize numk; /* Number of used elements in this array. */ TValue k[LJ_MIN_K64SZ]; /* Array of constants. */ } K64Array; /* Free all chained arrays. */ void lj_ir_k64_freeall(jit_State *J) { K64Array *k; for (k = mref(J->k64, K64Array); k; ) { K64Array *next = mref(k->next, K64Array); lj_mem_free(J2G(J), k, sizeof(K64Array)); k = next; } } /* Find 64 bit constant in chained array or add it. */ cTValue *lj_ir_k64_find(jit_State *J, uint64_t u64) { K64Array *k, *kp = NULL; TValue *ntv; MSize idx; /* Search for the constant in the whole chain of arrays. */ for (k = mref(J->k64, K64Array); k; k = mref(k->next, K64Array)) { kp = k; /* Remember previous element in list. */ for (idx = 0; idx < k->numk; idx++) { /* Search one array. */ TValue *tv = &k->k[idx]; if (tv->u64 == u64) /* Needed for +-0/NaN/absmask. */ return tv; } } /* Constant was not found, need to add it. */ if (!(kp && kp->numk < LJ_MIN_K64SZ)) { /* Allocate a new array. */ K64Array *kn = lj_mem_newt(J->L, sizeof(K64Array), K64Array); setmref(kn->next, NULL); kn->numk = 0; if (kp) setmref(kp->next, kn); /* Chain to the end of the list. */ else setmref(J->k64, kn); /* Link first array. */ kp = kn; } ntv = &kp->k[kp->numk++]; /* Add to current array. */ ntv->u64 = u64; return ntv; } /* Intern 64 bit constant, given by its address. */ TRef lj_ir_k64(jit_State *J, IROp op, cTValue *tv) { IRIns *ir, *cir = J->cur.ir; IRRef ref; IRType t = op == IR_KNUM ? IRT_NUM : IRT_I64; for (ref = J->chain[op]; ref; ref = cir[ref].prev) if (ir_k64(&cir[ref]) == tv) goto found; ref = ir_nextk(J); ir = IR(ref); lua_assert(checkptr32(tv)); setmref(ir->ptr, tv); ir->t.irt = t; ir->o = op; ir->prev = J->chain[op]; J->chain[op] = (IRRef1)ref; found: return TREF(ref, t); } /* Intern FP constant, given by its 64 bit pattern. */ TRef lj_ir_knum_u64(jit_State *J, uint64_t u64) { return lj_ir_k64(J, IR_KNUM, lj_ir_k64_find(J, u64)); } /* Intern 64 bit integer constant. */ TRef lj_ir_kint64(jit_State *J, uint64_t u64) { return lj_ir_k64(J, IR_KINT64, lj_ir_k64_find(J, u64)); } /* Check whether a number is int and return it. -0 is NOT considered an int. */ static int numistrueint(lua_Number n, int32_t *kp) { int32_t k = lj_num2int(n); if (n == (lua_Number)k) { if (kp) *kp = k; if (k == 0) { /* Special check for -0. */ TValue tv; setnumV(&tv, n); if (tv.u32.hi != 0) return 0; } return 1; } return 0; } /* Intern number as int32_t constant if possible, otherwise as FP constant. */ TRef lj_ir_knumint(jit_State *J, lua_Number n) { int32_t k; if (numistrueint(n, &k)) return lj_ir_kint(J, k); else return lj_ir_knum(J, n); } /* Intern GC object "constant". */ TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t) { IRIns *ir, *cir = J->cur.ir; IRRef ref; lua_assert(!isdead(J2G(J), o)); for (ref = J->chain[IR_KGC]; ref; ref = cir[ref].prev) if (ir_kgc(&cir[ref]) == o) goto found; ref = ir_nextk(J); ir = IR(ref); /* NOBARRIER: Current trace is a GC root. */ setgcref(ir->gcr, o); ir->t.irt = (uint8_t)t; ir->o = IR_KGC; ir->prev = J->chain[IR_KGC]; J->chain[IR_KGC] = (IRRef1)ref; found: return TREF(ref, t); } /* Intern 32 bit pointer constant. */ TRef lj_ir_kptr_(jit_State *J, IROp op, void *ptr) { IRIns *ir, *cir = J->cur.ir; IRRef ref; lua_assert((void *)(intptr_t)i32ptr(ptr) == ptr); for (ref = J->chain[op]; ref; ref = cir[ref].prev) if (mref(cir[ref].ptr, void) == ptr) goto found; ref = ir_nextk(J); ir = IR(ref); setmref(ir->ptr, ptr); ir->t.irt = IRT_P32; ir->o = op; ir->prev = J->chain[op]; J->chain[op] = (IRRef1)ref; found: return TREF(ref, IRT_P32); } /* Intern typed NULL constant. */ TRef lj_ir_knull(jit_State *J, IRType t) { IRIns *ir, *cir = J->cur.ir; IRRef ref; for (ref = J->chain[IR_KNULL]; ref; ref = cir[ref].prev) if (irt_t(cir[ref].t) == t) goto found; ref = ir_nextk(J); ir = IR(ref); ir->i = 0; ir->t.irt = (uint8_t)t; ir->o = IR_KNULL; ir->prev = J->chain[IR_KNULL]; J->chain[IR_KNULL] = (IRRef1)ref; found: return TREF(ref, t); } /* Intern key slot. */ TRef lj_ir_kslot(jit_State *J, TRef key, IRRef slot) { IRIns *ir, *cir = J->cur.ir; IRRef2 op12 = IRREF2((IRRef1)key, (IRRef1)slot); IRRef ref; /* Const part is not touched by CSE/DCE, so 0-65535 is ok for IRMlit here. */ lua_assert(tref_isk(key) && slot == (IRRef)(IRRef1)slot); for (ref = J->chain[IR_KSLOT]; ref; ref = cir[ref].prev) if (cir[ref].op12 == op12) goto found; ref = ir_nextk(J); ir = IR(ref); ir->op12 = op12; ir->t.irt = IRT_P32; ir->o = IR_KSLOT; ir->prev = J->chain[IR_KSLOT]; J->chain[IR_KSLOT] = (IRRef1)ref; found: return TREF(ref, IRT_P32); } /* -- Access to IR constants ---------------------------------------------- */ /* Copy value of IR constant. */ void lj_ir_kvalue(lua_State *L, TValue *tv, const IRIns *ir) { UNUSED(L); lua_assert(ir->o != IR_KSLOT); /* Common mistake. */ switch (ir->o) { case IR_KPRI: setitype(tv, irt_toitype(ir->t)); break; case IR_KINT: setintV(tv, ir->i); break; case IR_KGC: setgcV(L, tv, ir_kgc(ir), irt_toitype(ir->t)); break; case IR_KPTR: case IR_KKPTR: case IR_KNULL: setlightudV(tv, mref(ir->ptr, void)); break; case IR_KNUM: setnumV(tv, ir_knum(ir)->n); break; #if LJ_HASFFI case IR_KINT64: { GCcdata *cd = lj_cdata_new_(L, CTID_INT64, 8); *(uint64_t *)cdataptr(cd) = ir_kint64(ir)->u64; setcdataV(L, tv, cd); break; } #endif default: lua_assert(0); break; } } /* -- Convert IR operand types -------------------------------------------- */ /* Convert from string to number. */ TRef LJ_FASTCALL lj_ir_tonumber(jit_State *J, TRef tr) { if (!tref_isnumber(tr)) { if (tref_isstr(tr)) tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0); else lj_trace_err(J, LJ_TRERR_BADTYPE); } return tr; } /* Convert from integer or string to number. */ TRef LJ_FASTCALL lj_ir_tonum(jit_State *J, TRef tr) { if (!tref_isnum(tr)) { if (tref_isinteger(tr)) tr = emitir(IRTN(IR_CONV), tr, IRCONV_NUM_INT); else if (tref_isstr(tr)) tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0); else lj_trace_err(J, LJ_TRERR_BADTYPE); } return tr; } /* Convert from integer or number to string. */ TRef LJ_FASTCALL lj_ir_tostr(jit_State *J, TRef tr) { if (!tref_isstr(tr)) { if (!tref_isnumber(tr)) lj_trace_err(J, LJ_TRERR_BADTYPE); tr = emitir(IRT(IR_TOSTR, IRT_STR), tr, 0); } return tr; } /* -- Miscellaneous IR ops ------------------------------------------------ */ /* Evaluate numeric comparison. */ int lj_ir_numcmp(lua_Number a, lua_Number b, IROp op) { switch (op) { case IR_EQ: return (a == b); case IR_NE: return (a != b); case IR_LT: return (a < b); case IR_GE: return (a >= b); case IR_LE: return (a <= b); case IR_GT: return (a > b); case IR_ULT: return !(a >= b); case IR_UGE: return !(a < b); case IR_ULE: return !(a > b); case IR_UGT: return !(a <= b); default: lua_assert(0); return 0; } } /* Evaluate string comparison. */ int lj_ir_strcmp(GCstr *a, GCstr *b, IROp op) { int res = lj_str_cmp(a, b); switch (op) { case IR_LT: return (res < 0); case IR_GE: return (res >= 0); case IR_LE: return (res <= 0); case IR_GT: return (res > 0); default: lua_assert(0); return 0; } } /* Rollback IR to previous state. */ void lj_ir_rollback(jit_State *J, IRRef ref) { IRRef nins = J->cur.nins; while (nins > ref) { IRIns *ir; nins--; ir = IR(nins); J->chain[ir->o] = ir->prev; } J->cur.nins = nins; } #undef IR #undef fins #undef emitir #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bcdump.h0000664000000000000000000000362012202141143022467 0ustar rootroot/* ** Bytecode dump definitions. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_BCDUMP_H #define _LJ_BCDUMP_H #include "lj_obj.h" #include "lj_lex.h" /* -- Bytecode dump format ------------------------------------------------ */ /* ** dump = header proto+ 0U ** header = ESC 'L' 'J' versionB flagsU [namelenU nameB*] ** proto = lengthU pdata ** pdata = phead bcinsW* uvdataH* kgc* knum* [debugB*] ** phead = flagsB numparamsB framesizeB numuvB numkgcU numknU numbcU ** [debuglenU [firstlineU numlineU]] ** kgc = kgctypeU { ktab | (loU hiU) | (rloU rhiU iloU ihiU) | strB* } ** knum = intU0 | (loU1 hiU) ** ktab = narrayU nhashU karray* khash* ** karray = ktabk ** khash = ktabk ktabk ** ktabk = ktabtypeU { intU | (loU hiU) | strB* } ** ** B = 8 bit, H = 16 bit, W = 32 bit, U = ULEB128 of W, U0/U1 = ULEB128 of W+1 */ /* Bytecode dump header. */ #define BCDUMP_HEAD1 0x1b #define BCDUMP_HEAD2 0x4c #define BCDUMP_HEAD3 0x4a /* If you perform *any* kind of private modifications to the bytecode itself ** or to the dump format, you *must* set BCDUMP_VERSION to 0x80 or higher. */ #define BCDUMP_VERSION 1 /* Compatibility flags. */ #define BCDUMP_F_BE 0x01 #define BCDUMP_F_STRIP 0x02 #define BCDUMP_F_FFI 0x04 #define BCDUMP_F_KNOWN (BCDUMP_F_FFI*2-1) /* Type codes for the GC constants of a prototype. Plus length for strings. */ enum { BCDUMP_KGC_CHILD, BCDUMP_KGC_TAB, BCDUMP_KGC_I64, BCDUMP_KGC_U64, BCDUMP_KGC_COMPLEX, BCDUMP_KGC_STR }; /* Type codes for the keys/values of a constant table. */ enum { BCDUMP_KTAB_NIL, BCDUMP_KTAB_FALSE, BCDUMP_KTAB_TRUE, BCDUMP_KTAB_INT, BCDUMP_KTAB_NUM, BCDUMP_KTAB_STR }; /* -- Bytecode reader/writer ---------------------------------------------- */ LJ_FUNC int lj_bcwrite(lua_State *L, GCproto *pt, lua_Writer writer, void *data, int strip); LJ_FUNC GCproto *lj_bcread(LexState *ls); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_clib.c0000664000000000000000000002422312231715321022132 0ustar rootroot/* ** FFI C library loader. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_tab.h" #include "lj_str.h" #include "lj_udata.h" #include "lj_ctype.h" #include "lj_cconv.h" #include "lj_cdata.h" #include "lj_clib.h" /* -- OS-specific functions ----------------------------------------------- */ #if LJ_TARGET_DLOPEN #include #include #if defined(RTLD_DEFAULT) #define CLIB_DEFHANDLE RTLD_DEFAULT #elif LJ_TARGET_OSX || LJ_TARGET_BSD #define CLIB_DEFHANDLE ((void *)(intptr_t)-2) #else #define CLIB_DEFHANDLE NULL #endif LJ_NORET LJ_NOINLINE static void clib_error_(lua_State *L) { lj_err_callermsg(L, dlerror()); } #define clib_error(L, fmt, name) clib_error_(L) #if defined(__CYGWIN__) #define CLIB_SOPREFIX "cyg" #else #define CLIB_SOPREFIX "lib" #endif #if LJ_TARGET_OSX #define CLIB_SOEXT "%s.dylib" #elif defined(__CYGWIN__) #define CLIB_SOEXT "%s.dll" #else #define CLIB_SOEXT "%s.so" #endif static const char *clib_extname(lua_State *L, const char *name) { if (!strchr(name, '/') #ifdef __CYGWIN__ && !strchr(name, '\\') #endif ) { if (!strchr(name, '.')) { name = lj_str_pushf(L, CLIB_SOEXT, name); L->top--; #ifdef __CYGWIN__ } else { return name; #endif } if (!(name[0] == CLIB_SOPREFIX[0] && name[1] == CLIB_SOPREFIX[1] && name[2] == CLIB_SOPREFIX[2])) { name = lj_str_pushf(L, CLIB_SOPREFIX "%s", name); L->top--; } } return name; } /* Check for a recognized ld script line. */ static const char *clib_check_lds(lua_State *L, const char *buf) { char *p, *e; if ((!strncmp(buf, "GROUP", 5) || !strncmp(buf, "INPUT", 5)) && (p = strchr(buf, '('))) { while (*++p == ' ') ; for (e = p; *e && *e != ' ' && *e != ')'; e++) ; return strdata(lj_str_new(L, p, e-p)); } return NULL; } /* Quick and dirty solution to resolve shared library name from ld script. */ static const char *clib_resolve_lds(lua_State *L, const char *name) { FILE *fp = fopen(name, "r"); const char *p = NULL; if (fp) { char buf[256]; if (fgets(buf, sizeof(buf), fp)) { if (!strncmp(buf, "/* GNU ld script", 16)) { /* ld script magic? */ while (fgets(buf, sizeof(buf), fp)) { /* Check all lines. */ p = clib_check_lds(L, buf); if (p) break; } } else { /* Otherwise check only the first line. */ p = clib_check_lds(L, buf); } } fclose(fp); } return p; } static void *clib_loadlib(lua_State *L, const char *name, int global) { void *h = dlopen(clib_extname(L, name), RTLD_LAZY | (global?RTLD_GLOBAL:RTLD_LOCAL)); if (!h) { const char *e, *err = dlerror(); if (*err == '/' && (e = strchr(err, ':')) && (name = clib_resolve_lds(L, strdata(lj_str_new(L, err, e-err))))) { h = dlopen(name, RTLD_LAZY | (global?RTLD_GLOBAL:RTLD_LOCAL)); if (h) return h; err = dlerror(); } lj_err_callermsg(L, err); } return h; } static void clib_unloadlib(CLibrary *cl) { if (cl->handle && cl->handle != CLIB_DEFHANDLE) dlclose(cl->handle); } static void *clib_getsym(CLibrary *cl, const char *name) { void *p = dlsym(cl->handle, name); return p; } #elif LJ_TARGET_WINDOWS #define WIN32_LEAN_AND_MEAN #ifndef WINVER #define WINVER 0x0500 #endif #include #ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2 BOOL WINAPI GetModuleHandleExA(DWORD, LPCSTR, HMODULE*); #endif #define CLIB_DEFHANDLE ((void *)-1) /* Default libraries. */ enum { CLIB_HANDLE_EXE, CLIB_HANDLE_DLL, CLIB_HANDLE_CRT, CLIB_HANDLE_KERNEL32, CLIB_HANDLE_USER32, CLIB_HANDLE_GDI32, CLIB_HANDLE_MAX }; static void *clib_def_handle[CLIB_HANDLE_MAX]; LJ_NORET LJ_NOINLINE static void clib_error(lua_State *L, const char *fmt, const char *name) { DWORD err = GetLastError(); char buf[128]; if (!FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS|FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, buf, sizeof(buf), NULL)) buf[0] = '\0'; lj_err_callermsg(L, lj_str_pushf(L, fmt, name, buf)); } static int clib_needext(const char *s) { while (*s) { if (*s == '/' || *s == '\\' || *s == '.') return 0; s++; } return 1; } static const char *clib_extname(lua_State *L, const char *name) { if (clib_needext(name)) { name = lj_str_pushf(L, "%s.dll", name); L->top--; } return name; } static void *clib_loadlib(lua_State *L, const char *name, int global) { DWORD oldwerr = GetLastError(); void *h = (void *)LoadLibraryA(clib_extname(L, name)); if (!h) clib_error(L, "cannot load module " LUA_QS ": %s", name); SetLastError(oldwerr); UNUSED(global); return h; } static void clib_unloadlib(CLibrary *cl) { if (cl->handle == CLIB_DEFHANDLE) { MSize i; for (i = CLIB_HANDLE_KERNEL32; i < CLIB_HANDLE_MAX; i++) { void *h = clib_def_handle[i]; if (h) { clib_def_handle[i] = NULL; FreeLibrary((HINSTANCE)h); } } } else if (cl->handle) { FreeLibrary((HINSTANCE)cl->handle); } } static void *clib_getsym(CLibrary *cl, const char *name) { void *p = NULL; if (cl->handle == CLIB_DEFHANDLE) { /* Search default libraries. */ MSize i; for (i = 0; i < CLIB_HANDLE_MAX; i++) { HINSTANCE h = (HINSTANCE)clib_def_handle[i]; if (!(void *)h) { /* Resolve default library handles (once). */ switch (i) { case CLIB_HANDLE_EXE: GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, NULL, &h); break; case CLIB_HANDLE_DLL: GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS|GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (const char *)clib_def_handle, &h); break; case CLIB_HANDLE_CRT: GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS|GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (const char *)&_fmode, &h); break; case CLIB_HANDLE_KERNEL32: h = LoadLibraryA("kernel32.dll"); break; case CLIB_HANDLE_USER32: h = LoadLibraryA("user32.dll"); break; case CLIB_HANDLE_GDI32: h = LoadLibraryA("gdi32.dll"); break; } if (!h) continue; clib_def_handle[i] = (void *)h; } p = (void *)GetProcAddress(h, name); if (p) break; } } else { p = (void *)GetProcAddress((HINSTANCE)cl->handle, name); } return p; } #else #define CLIB_DEFHANDLE NULL LJ_NORET LJ_NOINLINE static void clib_error(lua_State *L, const char *fmt, const char *name) { lj_err_callermsg(L, lj_str_pushf(L, fmt, name, "no support for this OS")); } static void *clib_loadlib(lua_State *L, const char *name, int global) { lj_err_callermsg(L, "no support for loading dynamic libraries for this OS"); UNUSED(name); UNUSED(global); return NULL; } static void clib_unloadlib(CLibrary *cl) { UNUSED(cl); } static void *clib_getsym(CLibrary *cl, const char *name) { UNUSED(cl); UNUSED(name); return NULL; } #endif /* -- C library indexing -------------------------------------------------- */ #if LJ_TARGET_X86 && LJ_ABI_WIN /* Compute argument size for fastcall/stdcall functions. */ static CTSize clib_func_argsize(CTState *cts, CType *ct) { CTSize n = 0; while (ct->sib) { CType *d; ct = ctype_get(cts, ct->sib); if (ctype_isfield(ct->info)) { d = ctype_rawchild(cts, ct); n += ((d->size + 3) & ~3); } } return n; } #endif /* Get redirected or mangled external symbol. */ static const char *clib_extsym(CTState *cts, CType *ct, GCstr *name) { if (ct->sib) { CType *ctf = ctype_get(cts, ct->sib); if (ctype_isxattrib(ctf->info, CTA_REDIR)) return strdata(gco2str(gcref(ctf->name))); } return strdata(name); } /* Index a C library by name. */ TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name) { TValue *tv = lj_tab_setstr(L, cl->cache, name); if (LJ_UNLIKELY(tvisnil(tv))) { CTState *cts = ctype_cts(L); CType *ct; CTypeID id = lj_ctype_getname(cts, &ct, name, CLNS_INDEX); if (!id) lj_err_callerv(L, LJ_ERR_FFI_NODECL, strdata(name)); if (ctype_isconstval(ct->info)) { CType *ctt = ctype_child(cts, ct); lua_assert(ctype_isinteger(ctt->info) && ctt->size <= 4); if ((ctt->info & CTF_UNSIGNED) && (int32_t)ct->size < 0) setnumV(tv, (lua_Number)(uint32_t)ct->size); else setintV(tv, (int32_t)ct->size); } else { const char *sym = clib_extsym(cts, ct, name); #if LJ_TARGET_WINDOWS DWORD oldwerr = GetLastError(); #endif void *p = clib_getsym(cl, sym); GCcdata *cd; lua_assert(ctype_isfunc(ct->info) || ctype_isextern(ct->info)); #if LJ_TARGET_X86 && LJ_ABI_WIN /* Retry with decorated name for fastcall/stdcall functions. */ if (!p && ctype_isfunc(ct->info)) { CTInfo cconv = ctype_cconv(ct->info); if (cconv == CTCC_FASTCALL || cconv == CTCC_STDCALL) { CTSize sz = clib_func_argsize(cts, ct); const char *symd = lj_str_pushf(L, cconv == CTCC_FASTCALL ? "@%s@%d" : "_%s@%d", sym, sz); L->top--; p = clib_getsym(cl, symd); } } #endif if (!p) clib_error(L, "cannot resolve symbol " LUA_QS ": %s", sym); #if LJ_TARGET_WINDOWS SetLastError(oldwerr); #endif cd = lj_cdata_new(cts, id, CTSIZE_PTR); *(void **)cdataptr(cd) = p; setcdataV(L, tv, cd); } } return tv; } /* -- C library management ------------------------------------------------ */ /* Create a new CLibrary object and push it on the stack. */ static CLibrary *clib_new(lua_State *L, GCtab *mt) { GCtab *t = lj_tab_new(L, 0, 0); GCudata *ud = lj_udata_new(L, sizeof(CLibrary), t); CLibrary *cl = (CLibrary *)uddata(ud); cl->cache = t; ud->udtype = UDTYPE_FFI_CLIB; /* NOBARRIER: The GCudata is new (marked white). */ setgcref(ud->metatable, obj2gco(mt)); setudataV(L, L->top++, ud); return cl; } /* Load a C library. */ void lj_clib_load(lua_State *L, GCtab *mt, GCstr *name, int global) { void *handle = clib_loadlib(L, strdata(name), global); CLibrary *cl = clib_new(L, mt); cl->handle = handle; } /* Unload a C library. */ void lj_clib_unload(CLibrary *cl) { clib_unloadlib(cl); cl->handle = NULL; } /* Create the default C library object. */ void lj_clib_default(lua_State *L, GCtab *mt) { CLibrary *cl = clib_new(L, mt); cl->handle = CLIB_DEFHANDLE; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vmmath.o0000664000000000000000000000456012213333050022526 0ustar rootrootELF>0@@ UH]UH]UH]ÅuUHD1)AAD1D)Ѕt 1)ʅH1ƉڅHUH]lj_vmmath.cb != 0lj_vm_modiGCC: (Debian 4.7.3-4) 4.7.3zRx  AC F < AC F \ AC F |]EC Y  AC H .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.comment.note.GNU-stack.rela.eh_frame @8 &,12@ H0Qfax p     & 16 AF QV!]ao~ {lj_vmmath.c__PRETTY_FUNCTION__.4856lj_vm_sinhsinhlj_vm_coshcoshlj_vm_tanhtanhlj_vm_modi__assert_faillj_vm_errno__errno_location * 4 9  > @ `!~tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_crecord.c0000664000000000000000000015043112231715321022643 0ustar rootroot/* ** Trace recorder for C data operations. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_ffrecord_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT && LJ_HASFFI #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_frame.h" #include "lj_ctype.h" #include "lj_cdata.h" #include "lj_cparse.h" #include "lj_cconv.h" #include "lj_clib.h" #include "lj_ccall.h" #include "lj_ff.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_ircall.h" #include "lj_iropt.h" #include "lj_trace.h" #include "lj_record.h" #include "lj_ffrecord.h" #include "lj_snap.h" #include "lj_crecord.h" #include "lj_dispatch.h" /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) #define emitconv(a, dt, st, flags) \ emitir(IRT(IR_CONV, (dt)), (a), (st)|((dt) << 5)|(flags)) /* -- C type checks ------------------------------------------------------- */ static GCcdata *argv2cdata(jit_State *J, TRef tr, cTValue *o) { GCcdata *cd; TRef trtypeid; if (!tref_iscdata(tr)) lj_trace_err(J, LJ_TRERR_BADTYPE); cd = cdataV(o); /* Specialize to the CTypeID. */ trtypeid = emitir(IRT(IR_FLOAD, IRT_U16), tr, IRFL_CDATA_CTYPEID); emitir(IRTG(IR_EQ, IRT_INT), trtypeid, lj_ir_kint(J, (int32_t)cd->ctypeid)); return cd; } /* Specialize to the CTypeID held by a cdata constructor. */ static CTypeID crec_constructor(jit_State *J, GCcdata *cd, TRef tr) { CTypeID id; lua_assert(tref_iscdata(tr) && cd->ctypeid == CTID_CTYPEID); id = *(CTypeID *)cdataptr(cd); tr = emitir(IRT(IR_FLOAD, IRT_INT), tr, IRFL_CDATA_INT); emitir(IRTG(IR_EQ, IRT_INT), tr, lj_ir_kint(J, (int32_t)id)); return id; } static CTypeID argv2ctype(jit_State *J, TRef tr, cTValue *o) { if (tref_isstr(tr)) { GCstr *s = strV(o); CPState cp; CTypeID oldtop; /* Specialize to the string containing the C type declaration. */ emitir(IRTG(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, s)); cp.L = J->L; cp.cts = ctype_ctsG(J2G(J)); oldtop = cp.cts->top; cp.srcname = strdata(s); cp.p = strdata(s); cp.param = NULL; cp.mode = CPARSE_MODE_ABSTRACT|CPARSE_MODE_NOIMPLICIT; if (lj_cparse(&cp) || cp.cts->top > oldtop) /* Avoid new struct defs. */ lj_trace_err(J, LJ_TRERR_BADTYPE); return cp.val.id; } else { GCcdata *cd = argv2cdata(J, tr, o); return cd->ctypeid == CTID_CTYPEID ? crec_constructor(J, cd, tr) : cd->ctypeid; } } /* Convert CType to IRType (if possible). */ static IRType crec_ct2irt(CTState *cts, CType *ct) { if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); if (LJ_LIKELY(ctype_isnum(ct->info))) { if ((ct->info & CTF_FP)) { if (ct->size == sizeof(double)) return IRT_NUM; else if (ct->size == sizeof(float)) return IRT_FLOAT; } else { uint32_t b = lj_fls(ct->size); if (b <= 3) return IRT_I8 + 2*b + ((ct->info & CTF_UNSIGNED) ? 1 : 0); } } else if (ctype_isptr(ct->info)) { return (LJ_64 && ct->size == 8) ? IRT_P64 : IRT_P32; } else if (ctype_iscomplex(ct->info)) { if (ct->size == 2*sizeof(double)) return IRT_NUM; else if (ct->size == 2*sizeof(float)) return IRT_FLOAT; } return IRT_CDATA; } /* -- Optimized memory fill and copy -------------------------------------- */ /* Maximum length and unroll of inlined copy/fill. */ #define CREC_COPY_MAXUNROLL 16 #define CREC_COPY_MAXLEN 128 #define CREC_FILL_MAXUNROLL 16 /* Number of windowed registers used for optimized memory copy. */ #if LJ_TARGET_X86 #define CREC_COPY_REGWIN 2 #elif LJ_TARGET_PPC || LJ_TARGET_MIPS #define CREC_COPY_REGWIN 8 #else #define CREC_COPY_REGWIN 4 #endif /* List of memory offsets for copy/fill. */ typedef struct CRecMemList { CTSize ofs; /* Offset in bytes. */ IRType tp; /* Type of load/store. */ TRef trofs; /* TRef of interned offset. */ TRef trval; /* TRef of load value. */ } CRecMemList; /* Generate copy list for element-wise struct copy. */ static MSize crec_copy_struct(CRecMemList *ml, CTState *cts, CType *ct) { CTypeID fid = ct->sib; MSize mlp = 0; while (fid) { CType *df = ctype_get(cts, fid); fid = df->sib; if (ctype_isfield(df->info)) { CType *cct; IRType tp; if (!gcref(df->name)) continue; /* Ignore unnamed fields. */ cct = ctype_rawchild(cts, df); /* Field type. */ tp = crec_ct2irt(cts, cct); if (tp == IRT_CDATA) return 0; /* NYI: aggregates. */ if (mlp >= CREC_COPY_MAXUNROLL) return 0; ml[mlp].ofs = df->size; ml[mlp].tp = tp; mlp++; if (ctype_iscomplex(cct->info)) { if (mlp >= CREC_COPY_MAXUNROLL) return 0; ml[mlp].ofs = df->size + (cct->size >> 1); ml[mlp].tp = tp; mlp++; } } else if (!ctype_isconstval(df->info)) { /* NYI: bitfields and sub-structures. */ return 0; } } return mlp; } /* Generate unrolled copy list, from highest to lowest step size/alignment. */ static MSize crec_copy_unroll(CRecMemList *ml, CTSize len, CTSize step, IRType tp) { CTSize ofs = 0; MSize mlp = 0; if (tp == IRT_CDATA) tp = IRT_U8 + 2*lj_fls(step); do { while (ofs + step <= len) { if (mlp >= CREC_COPY_MAXUNROLL) return 0; ml[mlp].ofs = ofs; ml[mlp].tp = tp; mlp++; ofs += step; } step >>= 1; tp -= 2; } while (ofs < len); return mlp; } /* ** Emit copy list with windowed loads/stores. ** LJ_TARGET_UNALIGNED: may emit unaligned loads/stores (not marked as such). */ static void crec_copy_emit(jit_State *J, CRecMemList *ml, MSize mlp, TRef trdst, TRef trsrc) { MSize i, j, rwin = 0; for (i = 0, j = 0; i < mlp; ) { TRef trofs = lj_ir_kintp(J, ml[i].ofs); TRef trsptr = emitir(IRT(IR_ADD, IRT_PTR), trsrc, trofs); ml[i].trval = emitir(IRT(IR_XLOAD, ml[i].tp), trsptr, 0); ml[i].trofs = trofs; i++; rwin += (LJ_SOFTFP && ml[i].tp == IRT_NUM) ? 2 : 1; if (rwin >= CREC_COPY_REGWIN || i >= mlp) { /* Flush buffered stores. */ rwin = 0; for ( ; j < i; j++) { TRef trdptr = emitir(IRT(IR_ADD, IRT_PTR), trdst, ml[j].trofs); emitir(IRT(IR_XSTORE, ml[j].tp), trdptr, ml[j].trval); } } } } /* Optimized memory copy. */ static void crec_copy(jit_State *J, TRef trdst, TRef trsrc, TRef trlen, CType *ct) { if (tref_isk(trlen)) { /* Length must be constant. */ CRecMemList ml[CREC_COPY_MAXUNROLL]; MSize mlp = 0; CTSize step = 1, len = (CTSize)IR(tref_ref(trlen))->i; IRType tp = IRT_CDATA; int needxbar = 0; if (len == 0) return; /* Shortcut. */ if (len > CREC_COPY_MAXLEN) goto fallback; if (ct) { CTState *cts = ctype_ctsG(J2G(J)); lua_assert(ctype_isarray(ct->info) || ctype_isstruct(ct->info)); if (ctype_isarray(ct->info)) { CType *cct = ctype_rawchild(cts, ct); tp = crec_ct2irt(cts, cct); if (tp == IRT_CDATA) goto rawcopy; step = lj_ir_type_size[tp]; lua_assert((len & (step-1)) == 0); } else if ((ct->info & CTF_UNION)) { step = (1u << ctype_align(ct->info)); goto rawcopy; } else { mlp = crec_copy_struct(ml, cts, ct); goto emitcopy; } } else { rawcopy: needxbar = 1; if (LJ_TARGET_UNALIGNED || step >= CTSIZE_PTR) step = CTSIZE_PTR; } mlp = crec_copy_unroll(ml, len, step, tp); emitcopy: if (mlp) { crec_copy_emit(J, ml, mlp, trdst, trsrc); if (needxbar) emitir(IRT(IR_XBAR, IRT_NIL), 0, 0); return; } } fallback: /* Call memcpy. Always needs a barrier to disable alias analysis. */ lj_ir_call(J, IRCALL_memcpy, trdst, trsrc, trlen); emitir(IRT(IR_XBAR, IRT_NIL), 0, 0); } /* Generate unrolled fill list, from highest to lowest step size/alignment. */ static MSize crec_fill_unroll(CRecMemList *ml, CTSize len, CTSize step) { CTSize ofs = 0; MSize mlp = 0; IRType tp = IRT_U8 + 2*lj_fls(step); do { while (ofs + step <= len) { if (mlp >= CREC_COPY_MAXUNROLL) return 0; ml[mlp].ofs = ofs; ml[mlp].tp = tp; mlp++; ofs += step; } step >>= 1; tp -= 2; } while (ofs < len); return mlp; } /* ** Emit stores for fill list. ** LJ_TARGET_UNALIGNED: may emit unaligned stores (not marked as such). */ static void crec_fill_emit(jit_State *J, CRecMemList *ml, MSize mlp, TRef trdst, TRef trfill) { MSize i; for (i = 0; i < mlp; i++) { TRef trofs = lj_ir_kintp(J, ml[i].ofs); TRef trdptr = emitir(IRT(IR_ADD, IRT_PTR), trdst, trofs); emitir(IRT(IR_XSTORE, ml[i].tp), trdptr, trfill); } } /* Optimized memory fill. */ static void crec_fill(jit_State *J, TRef trdst, TRef trlen, TRef trfill, CTSize step) { if (tref_isk(trlen)) { /* Length must be constant. */ CRecMemList ml[CREC_FILL_MAXUNROLL]; MSize mlp; CTSize len = (CTSize)IR(tref_ref(trlen))->i; if (len == 0) return; /* Shortcut. */ if (LJ_TARGET_UNALIGNED || step >= CTSIZE_PTR) step = CTSIZE_PTR; if (step * CREC_FILL_MAXUNROLL < len) goto fallback; mlp = crec_fill_unroll(ml, len, step); if (!mlp) goto fallback; if (tref_isk(trfill) || ml[0].tp != IRT_U8) trfill = emitconv(trfill, IRT_INT, IRT_U8, 0); if (ml[0].tp != IRT_U8) { /* Scatter U8 to U16/U32/U64. */ if (CTSIZE_PTR == 8 && ml[0].tp == IRT_U64) { if (tref_isk(trfill)) /* Pointless on x64 with zero-extended regs. */ trfill = emitconv(trfill, IRT_U64, IRT_U32, 0); trfill = emitir(IRT(IR_MUL, IRT_U64), trfill, lj_ir_kint64(J, U64x(01010101,01010101))); } else { trfill = emitir(IRTI(IR_MUL), trfill, lj_ir_kint(J, ml[0].tp == IRT_U16 ? 0x0101 : 0x01010101)); } } crec_fill_emit(J, ml, mlp, trdst, trfill); } else { fallback: /* Call memset. Always needs a barrier to disable alias analysis. */ lj_ir_call(J, IRCALL_memset, trdst, trfill, trlen); /* Note: arg order! */ } emitir(IRT(IR_XBAR, IRT_NIL), 0, 0); } /* -- Convert C type to C type -------------------------------------------- */ /* ** This code mirrors the code in lj_cconv.c. It performs the same steps ** for the trace recorder that lj_cconv.c does for the interpreter. ** ** One major difference is that we can get away with much fewer checks ** here. E.g. checks for casts, constness or correct types can often be ** omitted, even if they might fail. The interpreter subsequently throws ** an error, which aborts the trace. ** ** All operations are specialized to their C types, so the on-trace ** outcome must be the same as the outcome in the interpreter. If the ** interpreter doesn't throw an error, then the trace is correct, too. ** Care must be taken not to generate invalid (temporary) IR or to ** trigger asserts. */ /* Determine whether a passed number or cdata number is non-zero. */ static int crec_isnonzero(CType *s, void *p) { if (p == (void *)0) return 0; if (p == (void *)1) return 1; if ((s->info & CTF_FP)) { if (s->size == sizeof(float)) return (*(float *)p != 0); else return (*(double *)p != 0); } else { if (s->size == 1) return (*(uint8_t *)p != 0); else if (s->size == 2) return (*(uint16_t *)p != 0); else if (s->size == 4) return (*(uint32_t *)p != 0); else return (*(uint64_t *)p != 0); } } static TRef crec_ct_ct(jit_State *J, CType *d, CType *s, TRef dp, TRef sp, void *svisnz) { IRType dt = crec_ct2irt(ctype_ctsG(J2G(J)), d); IRType st = crec_ct2irt(ctype_ctsG(J2G(J)), s); CTSize dsize = d->size, ssize = s->size; CTInfo dinfo = d->info, sinfo = s->info; if (ctype_type(dinfo) > CT_MAYCONVERT || ctype_type(sinfo) > CT_MAYCONVERT) goto err_conv; /* ** Note: Unlike lj_cconv_ct_ct(), sp holds the _value_ of pointers and ** numbers up to 8 bytes. Otherwise sp holds a pointer. */ switch (cconv_idx2(dinfo, sinfo)) { /* Destination is a bool. */ case CCX(B, B): goto xstore; /* Source operand is already normalized. */ case CCX(B, I): case CCX(B, F): if (st != IRT_CDATA) { /* Specialize to the result of a comparison against 0. */ TRef zero = (st == IRT_NUM || st == IRT_FLOAT) ? lj_ir_knum(J, 0) : (st == IRT_I64 || st == IRT_U64) ? lj_ir_kint64(J, 0) : lj_ir_kint(J, 0); int isnz = crec_isnonzero(s, svisnz); emitir(IRTG(isnz ? IR_NE : IR_EQ, st), sp, zero); sp = lj_ir_kint(J, isnz); goto xstore; } goto err_nyi; /* Destination is an integer. */ case CCX(I, B): case CCX(I, I): conv_I_I: if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi; /* Extend 32 to 64 bit integer. */ if (dsize == 8 && ssize < 8 && !(LJ_64 && (sinfo & CTF_UNSIGNED))) sp = emitconv(sp, dt, ssize < 4 ? IRT_INT : st, (sinfo & CTF_UNSIGNED) ? 0 : IRCONV_SEXT); else if (dsize < 8 && ssize == 8) /* Truncate from 64 bit integer. */ sp = emitconv(sp, dsize < 4 ? IRT_INT : dt, st, 0); else if (st == IRT_INT) sp = lj_opt_narrow_toint(J, sp); xstore: if (dt == IRT_I64 || dt == IRT_U64) lj_needsplit(J); if (dp == 0) return sp; emitir(IRT(IR_XSTORE, dt), dp, sp); break; case CCX(I, C): sp = emitir(IRT(IR_XLOAD, st), sp, 0); /* Load re. */ /* fallthrough */ case CCX(I, F): if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi; sp = emitconv(sp, dsize < 4 ? IRT_INT : dt, st, IRCONV_TRUNC|IRCONV_ANY); goto xstore; case CCX(I, P): case CCX(I, A): sinfo = CTINFO(CT_NUM, CTF_UNSIGNED); ssize = CTSIZE_PTR; st = IRT_UINTP; if (((dsize ^ ssize) & 8) == 0) { /* Must insert no-op type conversion. */ sp = emitconv(sp, dsize < 4 ? IRT_INT : dt, IRT_PTR, 0); goto xstore; } goto conv_I_I; /* Destination is a floating-point number. */ case CCX(F, B): case CCX(F, I): conv_F_I: if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi; sp = emitconv(sp, dt, ssize < 4 ? IRT_INT : st, 0); goto xstore; case CCX(F, C): sp = emitir(IRT(IR_XLOAD, st), sp, 0); /* Load re. */ /* fallthrough */ case CCX(F, F): conv_F_F: if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi; if (dt != st) sp = emitconv(sp, dt, st, 0); goto xstore; /* Destination is a complex number. */ case CCX(C, I): case CCX(C, F): { /* Clear im. */ TRef ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, (dsize >> 1))); emitir(IRT(IR_XSTORE, dt), ptr, lj_ir_knum(J, 0)); } /* Convert to re. */ if ((sinfo & CTF_FP)) goto conv_F_F; else goto conv_F_I; case CCX(C, C): if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi; { TRef re, im, ptr; re = emitir(IRT(IR_XLOAD, st), sp, 0); ptr = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, (ssize >> 1))); im = emitir(IRT(IR_XLOAD, st), ptr, 0); if (dt != st) { re = emitconv(re, dt, st, 0); im = emitconv(im, dt, st, 0); } emitir(IRT(IR_XSTORE, dt), dp, re); ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, (dsize >> 1))); emitir(IRT(IR_XSTORE, dt), ptr, im); } break; /* Destination is a vector. */ case CCX(V, I): case CCX(V, F): case CCX(V, C): case CCX(V, V): goto err_nyi; /* Destination is a pointer. */ case CCX(P, P): case CCX(P, A): case CCX(P, S): /* There are only 32 bit pointers/addresses on 32 bit machines. ** Also ok on x64, since all 32 bit ops clear the upper part of the reg. */ goto xstore; case CCX(P, I): if (st == IRT_CDATA) goto err_nyi; if (!LJ_64 && ssize == 8) /* Truncate from 64 bit integer. */ sp = emitconv(sp, IRT_U32, st, 0); goto xstore; case CCX(P, F): if (st == IRT_CDATA) goto err_nyi; /* The signed conversion is cheaper. x64 really has 47 bit pointers. */ sp = emitconv(sp, (LJ_64 && dsize == 8) ? IRT_I64 : IRT_U32, st, IRCONV_TRUNC|IRCONV_ANY); goto xstore; /* Destination is an array. */ case CCX(A, A): /* Destination is a struct/union. */ case CCX(S, S): if (dp == 0) goto err_conv; crec_copy(J, dp, sp, lj_ir_kint(J, dsize), d); break; default: err_conv: err_nyi: lj_trace_err(J, LJ_TRERR_NYICONV); break; } return 0; } /* -- Convert C type to TValue (load) ------------------------------------- */ static TRef crec_tv_ct(jit_State *J, CType *s, CTypeID sid, TRef sp) { CTState *cts = ctype_ctsG(J2G(J)); IRType t = crec_ct2irt(cts, s); CTInfo sinfo = s->info; if (ctype_isnum(sinfo)) { TRef tr; if (t == IRT_CDATA) goto err_nyi; /* NYI: copyval of >64 bit integers. */ tr = emitir(IRT(IR_XLOAD, t), sp, 0); if (t == IRT_FLOAT || t == IRT_U32) { /* Keep uint32_t/float as numbers. */ return emitconv(tr, IRT_NUM, t, 0); } else if (t == IRT_I64 || t == IRT_U64) { /* Box 64 bit integer. */ sp = tr; lj_needsplit(J); } else if ((sinfo & CTF_BOOL)) { /* Assume not equal to zero. Fixup and emit pending guard later. */ lj_ir_set(J, IRTGI(IR_NE), tr, lj_ir_kint(J, 0)); J->postproc = LJ_POST_FIXGUARD; return TREF_TRUE; } else { return tr; } } else if (ctype_isptr(sinfo) || ctype_isenum(sinfo)) { sp = emitir(IRT(IR_XLOAD, t), sp, 0); /* Box pointers and enums. */ } else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) { cts->L = J->L; sid = lj_ctype_intern(cts, CTINFO_REF(sid), CTSIZE_PTR); /* Create ref. */ } else if (ctype_iscomplex(sinfo)) { /* Unbox/box complex. */ ptrdiff_t esz = (ptrdiff_t)(s->size >> 1); TRef ptr, tr1, tr2, dp; dp = emitir(IRTG(IR_CNEW, IRT_CDATA), lj_ir_kint(J, sid), TREF_NIL); tr1 = emitir(IRT(IR_XLOAD, t), sp, 0); ptr = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, esz)); tr2 = emitir(IRT(IR_XLOAD, t), ptr, 0); ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, sizeof(GCcdata))); emitir(IRT(IR_XSTORE, t), ptr, tr1); ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, sizeof(GCcdata)+esz)); emitir(IRT(IR_XSTORE, t), ptr, tr2); return dp; } else { /* NYI: copyval of vectors. */ err_nyi: lj_trace_err(J, LJ_TRERR_NYICONV); } /* Box pointer, ref, enum or 64 bit integer. */ return emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, sid), sp); } /* -- Convert TValue to C type (store) ------------------------------------ */ static TRef crec_ct_tv(jit_State *J, CType *d, TRef dp, TRef sp, cTValue *sval) { CTState *cts = ctype_ctsG(J2G(J)); CTypeID sid = CTID_P_VOID; void *svisnz = 0; CType *s; if (LJ_LIKELY(tref_isinteger(sp))) { sid = CTID_INT32; svisnz = (void *)(intptr_t)(tvisint(sval)?(intV(sval)!=0):!tviszero(sval)); } else if (tref_isnum(sp)) { sid = CTID_DOUBLE; svisnz = (void *)(intptr_t)(tvisint(sval)?(intV(sval)!=0):!tviszero(sval)); } else if (tref_isbool(sp)) { sp = lj_ir_kint(J, tref_istrue(sp) ? 1 : 0); sid = CTID_BOOL; } else if (tref_isnil(sp)) { sp = lj_ir_kptr(J, NULL); } else if (tref_isudata(sp)) { GCudata *ud = udataV(sval); if (ud->udtype == UDTYPE_IO_FILE) { TRef tr = emitir(IRT(IR_FLOAD, IRT_U8), sp, IRFL_UDATA_UDTYPE); emitir(IRTGI(IR_EQ), tr, lj_ir_kint(J, UDTYPE_IO_FILE)); sp = emitir(IRT(IR_FLOAD, IRT_PTR), sp, IRFL_UDATA_FILE); } else { sp = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, sizeof(GCudata))); } } else if (tref_isstr(sp)) { if (ctype_isenum(d->info)) { /* Match string against enum constant. */ GCstr *str = strV(sval); CTSize ofs; CType *cct = lj_ctype_getfield(cts, d, str, &ofs); /* Specialize to the name of the enum constant. */ emitir(IRTG(IR_EQ, IRT_STR), sp, lj_ir_kstr(J, str)); if (cct && ctype_isconstval(cct->info)) { lua_assert(ctype_child(cts, cct)->size == 4); svisnz = (void *)(intptr_t)(ofs != 0); sp = lj_ir_kint(J, (int32_t)ofs); sid = ctype_cid(cct->info); } /* else: interpreter will throw. */ } else if (ctype_isrefarray(d->info)) { /* Copy string to array. */ lj_trace_err(J, LJ_TRERR_BADTYPE); /* NYI */ } else { /* Otherwise pass the string data as a const char[]. */ /* Don't use STRREF. It folds with SNEW, which loses the trailing NUL. */ sp = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, sizeof(GCstr))); sid = CTID_A_CCHAR; } } else { /* NYI: tref_istab(sp), tref_islightud(sp). */ IRType t; sid = argv2cdata(J, sp, sval)->ctypeid; s = ctype_raw(cts, sid); svisnz = cdataptr(cdataV(sval)); t = crec_ct2irt(cts, s); if (ctype_isptr(s->info)) { sp = emitir(IRT(IR_FLOAD, t), sp, IRFL_CDATA_PTR); if (ctype_isref(s->info)) { svisnz = *(void **)svisnz; s = ctype_rawchild(cts, s); if (ctype_isenum(s->info)) s = ctype_child(cts, s); t = crec_ct2irt(cts, s); } else { goto doconv; } } else if (t == IRT_I64 || t == IRT_U64) { sp = emitir(IRT(IR_FLOAD, t), sp, IRFL_CDATA_INT64); lj_needsplit(J); goto doconv; } else if (t == IRT_INT || t == IRT_U32) { if (ctype_isenum(s->info)) s = ctype_child(cts, s); sp = emitir(IRT(IR_FLOAD, t), sp, IRFL_CDATA_INT); goto doconv; } else { sp = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, sizeof(GCcdata))); } if (ctype_isnum(s->info) && t != IRT_CDATA) sp = emitir(IRT(IR_XLOAD, t), sp, 0); /* Load number value. */ goto doconv; } s = ctype_get(cts, sid); doconv: if (ctype_isenum(d->info)) d = ctype_child(cts, d); return crec_ct_ct(J, d, s, dp, sp, svisnz); } /* -- C data metamethods -------------------------------------------------- */ /* This would be rather difficult in FOLD, so do it here: ** (base+k)+(idx*sz)+ofs ==> (base+idx*sz)+(ofs+k) ** (base+(idx+k)*sz)+ofs ==> (base+idx*sz)+(ofs+k*sz) */ static TRef crec_reassoc_ofs(jit_State *J, TRef tr, ptrdiff_t *ofsp, MSize sz) { IRIns *ir = IR(tref_ref(tr)); if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && irref_isk(ir->op2) && (ir->o == IR_ADD || ir->o == IR_ADDOV || ir->o == IR_SUBOV)) { IRIns *irk = IR(ir->op2); ptrdiff_t k; if (LJ_64 && irk->o == IR_KINT64) k = (ptrdiff_t)ir_kint64(irk)->u64 * sz; else k = (ptrdiff_t)irk->i * sz; if (ir->o == IR_SUBOV) *ofsp -= k; else *ofsp += k; tr = ir->op1; /* Not a TRef, but the caller doesn't care. */ } return tr; } /* Record ctype __index/__newindex metamethods. */ static void crec_index_meta(jit_State *J, CTState *cts, CType *ct, RecordFFData *rd) { CTypeID id = ctype_typeid(cts, ct); cTValue *tv = lj_ctype_meta(cts, id, rd->data ? MM_newindex : MM_index); if (!tv) lj_trace_err(J, LJ_TRERR_BADTYPE); if (tvisfunc(tv)) { J->base[-1] = lj_ir_kfunc(J, funcV(tv)) | TREF_FRAME; rd->nres = -1; /* Pending tailcall. */ } else if (rd->data == 0 && tvistab(tv) && tref_isstr(J->base[1])) { /* Specialize to result of __index lookup. */ cTValue *o = lj_tab_get(J->L, tabV(tv), &rd->argv[1]); J->base[0] = lj_record_constify(J, o); if (!J->base[0]) lj_trace_err(J, LJ_TRERR_BADTYPE); /* Always specialize to the key. */ emitir(IRTG(IR_EQ, IRT_STR), J->base[1], lj_ir_kstr(J, strV(&rd->argv[1]))); } else { /* NYI: resolving of non-function metamethods. */ /* NYI: non-string keys for __index table. */ /* NYI: stores to __newindex table. */ lj_trace_err(J, LJ_TRERR_BADTYPE); } } void LJ_FASTCALL recff_cdata_index(jit_State *J, RecordFFData *rd) { TRef idx, ptr = J->base[0]; ptrdiff_t ofs = sizeof(GCcdata); GCcdata *cd = argv2cdata(J, ptr, &rd->argv[0]); CTState *cts = ctype_ctsG(J2G(J)); CType *ct = ctype_raw(cts, cd->ctypeid); CTypeID sid = 0; /* Resolve pointer or reference for cdata object. */ if (ctype_isptr(ct->info)) { IRType t = (LJ_64 && ct->size == 8) ? IRT_P64 : IRT_P32; if (ctype_isref(ct->info)) ct = ctype_rawchild(cts, ct); ptr = emitir(IRT(IR_FLOAD, t), ptr, IRFL_CDATA_PTR); ofs = 0; ptr = crec_reassoc_ofs(J, ptr, &ofs, 1); } again: idx = J->base[1]; if (tref_isnumber(idx)) { idx = lj_opt_narrow_cindex(J, idx); if (ctype_ispointer(ct->info)) { CTSize sz; integer_key: if ((ct->info & CTF_COMPLEX)) idx = emitir(IRT(IR_BAND, IRT_INTP), idx, lj_ir_kintp(J, 1)); sz = lj_ctype_size(cts, (sid = ctype_cid(ct->info))); idx = crec_reassoc_ofs(J, idx, &ofs, sz); #if LJ_TARGET_ARM || LJ_TARGET_PPC /* Hoist base add to allow fusion of index/shift into operands. */ if (LJ_LIKELY(J->flags & JIT_F_OPT_LOOP) && ofs #if LJ_TARGET_ARM && (sz == 1 || sz == 4) #endif ) { ptr = emitir(IRT(IR_ADD, IRT_PTR), ptr, lj_ir_kintp(J, ofs)); ofs = 0; } #endif idx = emitir(IRT(IR_MUL, IRT_INTP), idx, lj_ir_kintp(J, sz)); ptr = emitir(IRT(IR_ADD, IRT_PTR), idx, ptr); } } else if (tref_iscdata(idx)) { GCcdata *cdk = cdataV(&rd->argv[1]); CType *ctk = ctype_raw(cts, cdk->ctypeid); IRType t = crec_ct2irt(cts, ctk); if (ctype_ispointer(ct->info) && t >= IRT_I8 && t <= IRT_U64) { if (ctk->size == 8) { idx = emitir(IRT(IR_FLOAD, t), idx, IRFL_CDATA_INT64); } else if (ctk->size == 4) { idx = emitir(IRT(IR_FLOAD, t), idx, IRFL_CDATA_INT); } else { idx = emitir(IRT(IR_ADD, IRT_PTR), idx, lj_ir_kintp(J, sizeof(GCcdata))); idx = emitir(IRT(IR_XLOAD, t), idx, 0); } if (LJ_64 && ctk->size < sizeof(intptr_t) && !(ctk->info & CTF_UNSIGNED)) idx = emitconv(idx, IRT_INTP, IRT_INT, IRCONV_SEXT); if (!LJ_64 && ctk->size > sizeof(intptr_t)) { idx = emitconv(idx, IRT_INTP, t, 0); lj_needsplit(J); } goto integer_key; } } else if (tref_isstr(idx)) { GCstr *name = strV(&rd->argv[1]); if (cd->ctypeid == CTID_CTYPEID) ct = ctype_raw(cts, crec_constructor(J, cd, ptr)); if (ctype_isstruct(ct->info)) { CTSize fofs; CType *fct; fct = lj_ctype_getfield(cts, ct, name, &fofs); if (fct) { /* Always specialize to the field name. */ emitir(IRTG(IR_EQ, IRT_STR), idx, lj_ir_kstr(J, name)); if (ctype_isconstval(fct->info)) { if (fct->size >= 0x80000000u && (ctype_child(cts, fct)->info & CTF_UNSIGNED)) { J->base[0] = lj_ir_knum(J, (lua_Number)(uint32_t)fct->size); return; } J->base[0] = lj_ir_kint(J, (int32_t)fct->size); return; /* Interpreter will throw for newindex. */ } else if (ctype_isbitfield(fct->info)) { lj_trace_err(J, LJ_TRERR_NYICONV); } else { lua_assert(ctype_isfield(fct->info)); sid = ctype_cid(fct->info); } ofs += (ptrdiff_t)fofs; } } else if (ctype_iscomplex(ct->info)) { if (name->len == 2 && ((strdata(name)[0] == 'r' && strdata(name)[1] == 'e') || (strdata(name)[0] == 'i' && strdata(name)[1] == 'm'))) { /* Always specialize to the field name. */ emitir(IRTG(IR_EQ, IRT_STR), idx, lj_ir_kstr(J, name)); if (strdata(name)[0] == 'i') ofs += (ct->size >> 1); sid = ctype_cid(ct->info); } } } if (!sid) { if (ctype_isptr(ct->info)) { /* Automatically perform '->'. */ CType *cct = ctype_rawchild(cts, ct); if (ctype_isstruct(cct->info)) { ct = cct; if (tref_isstr(idx)) goto again; } } crec_index_meta(J, cts, ct, rd); return; } if (ofs) ptr = emitir(IRT(IR_ADD, IRT_PTR), ptr, lj_ir_kintp(J, ofs)); /* Resolve reference for field. */ ct = ctype_get(cts, sid); if (ctype_isref(ct->info)) ptr = emitir(IRT(IR_XLOAD, IRT_PTR), ptr, 0); while (ctype_isattrib(ct->info)) ct = ctype_child(cts, ct); /* Skip attributes. */ if (rd->data == 0) { /* __index metamethod. */ J->base[0] = crec_tv_ct(J, ct, sid, ptr); } else { /* __newindex metamethod. */ rd->nres = 0; J->needsnap = 1; crec_ct_tv(J, ct, ptr, J->base[2], &rd->argv[2]); } } /* Record setting a finalizer. */ static void crec_finalizer(jit_State *J, TRef trcd, cTValue *fin) { TRef trlo = lj_ir_call(J, IRCALL_lj_cdata_setfin, trcd); TRef trhi = emitir(IRT(IR_ADD, IRT_P32), trlo, lj_ir_kint(J, 4)); if (LJ_BE) { TRef tmp = trlo; trlo = trhi; trhi = tmp; } if (tvisfunc(fin)) { emitir(IRT(IR_XSTORE, IRT_P32), trlo, lj_ir_kfunc(J, funcV(fin))); emitir(IRTI(IR_XSTORE), trhi, lj_ir_kint(J, LJ_TFUNC)); } else if (tviscdata(fin)) { emitir(IRT(IR_XSTORE, IRT_P32), trlo, lj_ir_kgc(J, obj2gco(cdataV(fin)), IRT_CDATA)); emitir(IRTI(IR_XSTORE), trhi, lj_ir_kint(J, LJ_TCDATA)); } else { lj_trace_err(J, LJ_TRERR_BADTYPE); } J->needsnap = 1; } /* Record cdata allocation. */ static void crec_alloc(jit_State *J, RecordFFData *rd, CTypeID id) { CTState *cts = ctype_ctsG(J2G(J)); CTSize sz; CTInfo info = lj_ctype_info(cts, id, &sz); CType *d = ctype_raw(cts, id); TRef trid; if (!sz || sz > 128 || (info & CTF_VLA) || ctype_align(info) > CT_MEMALIGN) lj_trace_err(J, LJ_TRERR_NYICONV); /* NYI: large/special allocations. */ trid = lj_ir_kint(J, id); /* Use special instruction to box pointer or 32/64 bit integer. */ if (ctype_isptr(info) || (ctype_isinteger(info) && (sz == 4 || sz == 8))) { TRef sp = J->base[1] ? crec_ct_tv(J, d, 0, J->base[1], &rd->argv[1]) : ctype_isptr(info) ? lj_ir_kptr(J, NULL) : sz == 4 ? lj_ir_kint(J, 0) : (lj_needsplit(J), lj_ir_kint64(J, 0)); J->base[0] = emitir(IRTG(IR_CNEWI, IRT_CDATA), trid, sp); } else { TRef trcd = emitir(IRTG(IR_CNEW, IRT_CDATA), trid, TREF_NIL); cTValue *fin; J->base[0] = trcd; if (J->base[1] && !J->base[2] && !lj_cconv_multi_init(cts, d, &rd->argv[1])) { goto single_init; } else if (ctype_isarray(d->info)) { CType *dc = ctype_rawchild(cts, d); /* Array element type. */ CTSize ofs, esize = dc->size; TRef sp = 0; TValue tv; TValue *sval = &tv; MSize i; tv.u64 = 0; if (!(ctype_isnum(dc->info) || ctype_isptr(dc->info))) lj_trace_err(J, LJ_TRERR_NYICONV); /* NYI: init array of aggregates. */ for (i = 1, ofs = 0; ofs < sz; ofs += esize) { TRef dp = emitir(IRT(IR_ADD, IRT_PTR), trcd, lj_ir_kintp(J, ofs + sizeof(GCcdata))); if (J->base[i]) { sp = J->base[i]; sval = &rd->argv[i]; i++; } else if (i != 2) { sp = ctype_isnum(dc->info) ? lj_ir_kint(J, 0) : TREF_NIL; } crec_ct_tv(J, dc, dp, sp, sval); } } else if (ctype_isstruct(d->info)) { CTypeID fid = d->sib; MSize i = 1; while (fid) { CType *df = ctype_get(cts, fid); fid = df->sib; if (ctype_isfield(df->info)) { CType *dc; TRef sp, dp; TValue tv; TValue *sval = &tv; setintV(&tv, 0); if (!gcref(df->name)) continue; /* Ignore unnamed fields. */ dc = ctype_rawchild(cts, df); /* Field type. */ if (!(ctype_isnum(dc->info) || ctype_isptr(dc->info) || ctype_isenum(dc->info))) lj_trace_err(J, LJ_TRERR_NYICONV); /* NYI: init aggregates. */ if (J->base[i]) { sp = J->base[i]; sval = &rd->argv[i]; i++; } else { sp = ctype_isptr(dc->info) ? TREF_NIL : lj_ir_kint(J, 0); } dp = emitir(IRT(IR_ADD, IRT_PTR), trcd, lj_ir_kintp(J, df->size + sizeof(GCcdata))); crec_ct_tv(J, dc, dp, sp, sval); } else if (!ctype_isconstval(df->info)) { /* NYI: init bitfields and sub-structures. */ lj_trace_err(J, LJ_TRERR_NYICONV); } } } else { TRef dp; single_init: dp = emitir(IRT(IR_ADD, IRT_PTR), trcd, lj_ir_kintp(J, sizeof(GCcdata))); if (J->base[1]) { crec_ct_tv(J, d, dp, J->base[1], &rd->argv[1]); } else { TValue tv; tv.u64 = 0; crec_ct_tv(J, d, dp, lj_ir_kint(J, 0), &tv); } } /* Handle __gc metamethod. */ fin = lj_ctype_meta(cts, id, MM_gc); if (fin) crec_finalizer(J, trcd, fin); } } /* Record argument conversions. */ static TRef crec_call_args(jit_State *J, RecordFFData *rd, CTState *cts, CType *ct) { TRef args[CCI_NARGS_MAX]; CTypeID fid; MSize i, n; TRef tr, *base; cTValue *o; #if LJ_TARGET_X86 #if LJ_ABI_WIN TRef *arg0 = NULL, *arg1 = NULL; #endif int ngpr = 0; if (ctype_cconv(ct->info) == CTCC_THISCALL) ngpr = 1; else if (ctype_cconv(ct->info) == CTCC_FASTCALL) ngpr = 2; #endif /* Skip initial attributes. */ fid = ct->sib; while (fid) { CType *ctf = ctype_get(cts, fid); if (!ctype_isattrib(ctf->info)) break; fid = ctf->sib; } args[0] = TREF_NIL; for (n = 0, base = J->base+1, o = rd->argv+1; *base; n++, base++, o++) { CTypeID did; CType *d; if (n >= CCI_NARGS_MAX) lj_trace_err(J, LJ_TRERR_NYICALL); if (fid) { /* Get argument type from field. */ CType *ctf = ctype_get(cts, fid); fid = ctf->sib; lua_assert(ctype_isfield(ctf->info)); did = ctype_cid(ctf->info); } else { if (!(ct->info & CTF_VARARG)) lj_trace_err(J, LJ_TRERR_NYICALL); /* Too many arguments. */ did = lj_ccall_ctid_vararg(cts, o); /* Infer vararg type. */ } d = ctype_raw(cts, did); if (!(ctype_isnum(d->info) || ctype_isptr(d->info) || ctype_isenum(d->info))) lj_trace_err(J, LJ_TRERR_NYICALL); tr = crec_ct_tv(J, d, 0, *base, o); if (ctype_isinteger_or_bool(d->info)) { if (d->size < 4) { if ((d->info & CTF_UNSIGNED)) tr = emitconv(tr, IRT_INT, d->size==1 ? IRT_U8 : IRT_U16, 0); else tr = emitconv(tr, IRT_INT, d->size==1 ? IRT_I8 : IRT_I16,IRCONV_SEXT); } } else if (LJ_SOFTFP && ctype_isfp(d->info) && d->size > 4) { lj_needsplit(J); } #if LJ_TARGET_X86 /* 64 bit args must not end up in registers for fastcall/thiscall. */ #if LJ_ABI_WIN if (!ctype_isfp(d->info)) { /* Sigh, the Windows/x86 ABI allows reordering across 64 bit args. */ if (tref_typerange(tr, IRT_I64, IRT_U64)) { if (ngpr) { arg0 = &args[n]; args[n++] = TREF_NIL; ngpr--; if (ngpr) { arg1 = &args[n]; args[n++] = TREF_NIL; ngpr--; } } } else { if (arg0) { *arg0 = tr; arg0 = NULL; n--; continue; } if (arg1) { *arg1 = tr; arg1 = NULL; n--; continue; } if (ngpr) ngpr--; } } #else if (!ctype_isfp(d->info) && ngpr) { if (tref_typerange(tr, IRT_I64, IRT_U64)) { /* No reordering for other x86 ABIs. Simply add alignment args. */ do { args[n++] = TREF_NIL; } while (--ngpr); } else { ngpr--; } } #endif #endif args[n] = tr; } tr = args[0]; for (i = 1; i < n; i++) tr = emitir(IRT(IR_CARG, IRT_NIL), tr, args[i]); return tr; } /* Create a snapshot for the caller, simulating a 'false' return value. */ static void crec_snap_caller(jit_State *J) { lua_State *L = J->L; TValue *base = L->base, *top = L->top; const BCIns *pc = J->pc; TRef ftr = J->base[-1]; ptrdiff_t delta; if (!frame_islua(base-1) || J->framedepth <= 0) lj_trace_err(J, LJ_TRERR_NYICALL); J->pc = frame_pc(base-1); delta = 1+bc_a(J->pc[-1]); L->top = base; L->base = base - delta; J->base[-1] = TREF_FALSE; J->base -= delta; J->baseslot -= (BCReg)delta; J->maxslot = (BCReg)delta; J->framedepth--; lj_snap_add(J); L->base = base; L->top = top; J->framedepth++; J->maxslot = 1; J->base += delta; J->baseslot += (BCReg)delta; J->base[-1] = ftr; J->pc = pc; } /* Record function call. */ static int crec_call(jit_State *J, RecordFFData *rd, GCcdata *cd) { CTState *cts = ctype_ctsG(J2G(J)); CType *ct = ctype_raw(cts, cd->ctypeid); IRType tp = IRT_PTR; if (ctype_isptr(ct->info)) { tp = (LJ_64 && ct->size == 8) ? IRT_P64 : IRT_P32; ct = ctype_rawchild(cts, ct); } if (ctype_isfunc(ct->info)) { TRef func = emitir(IRT(IR_FLOAD, tp), J->base[0], IRFL_CDATA_PTR); CType *ctr = ctype_rawchild(cts, ct); IRType t = crec_ct2irt(cts, ctr); TRef tr; TValue tv; /* Check for blacklisted C functions that might call a callback. */ setlightudV(&tv, cdata_getptr(cdataptr(cd), (LJ_64 && tp == IRT_P64) ? 8 : 4)); if (tvistrue(lj_tab_get(J->L, cts->miscmap, &tv))) lj_trace_err(J, LJ_TRERR_BLACKL); if (ctype_isvoid(ctr->info)) { t = IRT_NIL; rd->nres = 0; } else if (!(ctype_isnum(ctr->info) || ctype_isptr(ctr->info) || ctype_isenum(ctr->info)) || t == IRT_CDATA) { lj_trace_err(J, LJ_TRERR_NYICALL); } if ((ct->info & CTF_VARARG) #if LJ_TARGET_X86 || ctype_cconv(ct->info) != CTCC_CDECL #endif ) func = emitir(IRT(IR_CARG, IRT_NIL), func, lj_ir_kint(J, ctype_typeid(cts, ct))); tr = emitir(IRT(IR_CALLXS, t), crec_call_args(J, rd, cts, ct), func); if (ctype_isbool(ctr->info)) { if (frame_islua(J->L->base-1) && bc_b(frame_pc(J->L->base-1)[-1]) == 1) { /* Don't check result if ignored. */ tr = TREF_NIL; } else { crec_snap_caller(J); #if LJ_TARGET_X86ORX64 /* Note: only the x86/x64 backend supports U8 and only for EQ(tr, 0). */ lj_ir_set(J, IRTG(IR_NE, IRT_U8), tr, lj_ir_kint(J, 0)); #else lj_ir_set(J, IRTGI(IR_NE), tr, lj_ir_kint(J, 0)); #endif J->postproc = LJ_POST_FIXGUARDSNAP; tr = TREF_TRUE; } } else if (t == IRT_PTR || (LJ_64 && t == IRT_P32) || t == IRT_I64 || t == IRT_U64 || ctype_isenum(ctr->info)) { TRef trid = lj_ir_kint(J, ctype_cid(ct->info)); tr = emitir(IRTG(IR_CNEWI, IRT_CDATA), trid, tr); if (t == IRT_I64 || t == IRT_U64) lj_needsplit(J); } else if (t == IRT_FLOAT || t == IRT_U32) { tr = emitconv(tr, IRT_NUM, t, 0); } else if (t == IRT_I8 || t == IRT_I16) { tr = emitconv(tr, IRT_INT, t, IRCONV_SEXT); } else if (t == IRT_U8 || t == IRT_U16) { tr = emitconv(tr, IRT_INT, t, 0); } J->base[0] = tr; J->needsnap = 1; return 1; } return 0; } void LJ_FASTCALL recff_cdata_call(jit_State *J, RecordFFData *rd) { CTState *cts = ctype_ctsG(J2G(J)); GCcdata *cd = argv2cdata(J, J->base[0], &rd->argv[0]); CTypeID id = cd->ctypeid; CType *ct; cTValue *tv; MMS mm = MM_call; if (id == CTID_CTYPEID) { id = crec_constructor(J, cd, J->base[0]); mm = MM_new; } else if (crec_call(J, rd, cd)) { return; } /* Record ctype __call/__new metamethod. */ ct = ctype_raw(cts, id); tv = lj_ctype_meta(cts, ctype_isptr(ct->info) ? ctype_cid(ct->info) : id, mm); if (tv) { if (tvisfunc(tv)) { J->base[-1] = lj_ir_kfunc(J, funcV(tv)) | TREF_FRAME; rd->nres = -1; /* Pending tailcall. */ return; } } else if (mm == MM_new) { crec_alloc(J, rd, id); return; } /* No metamethod or NYI: non-function metamethods. */ lj_trace_err(J, LJ_TRERR_BADTYPE); } static TRef crec_arith_int64(jit_State *J, TRef *sp, CType **s, MMS mm) { if (ctype_isnum(s[0]->info) && ctype_isnum(s[1]->info)) { IRType dt; CTypeID id; TRef tr; MSize i; IROp op; lj_needsplit(J); if (((s[0]->info & CTF_UNSIGNED) && s[0]->size == 8) || ((s[1]->info & CTF_UNSIGNED) && s[1]->size == 8)) { dt = IRT_U64; id = CTID_UINT64; } else { dt = IRT_I64; id = CTID_INT64; if (mm < MM_add && !((s[0]->info | s[1]->info) & CTF_FP) && s[0]->size == 4 && s[1]->size == 4) { /* Try to narrow comparison. */ if (!((s[0]->info ^ s[1]->info) & CTF_UNSIGNED) || (tref_isk(sp[1]) && IR(tref_ref(sp[1]))->i >= 0)) { dt = (s[0]->info & CTF_UNSIGNED) ? IRT_U32 : IRT_INT; goto comp; } else if (tref_isk(sp[0]) && IR(tref_ref(sp[0]))->i >= 0) { dt = (s[1]->info & CTF_UNSIGNED) ? IRT_U32 : IRT_INT; goto comp; } } } for (i = 0; i < 2; i++) { IRType st = tref_type(sp[i]); if (st == IRT_NUM || st == IRT_FLOAT) sp[i] = emitconv(sp[i], dt, st, IRCONV_TRUNC|IRCONV_ANY); else if (!(st == IRT_I64 || st == IRT_U64)) sp[i] = emitconv(sp[i], dt, IRT_INT, (s[i]->info & CTF_UNSIGNED) ? 0 : IRCONV_SEXT); } if (mm < MM_add) { comp: /* Assume true comparison. Fixup and emit pending guard later. */ if (mm == MM_eq) { op = IR_EQ; } else { op = mm == MM_lt ? IR_LT : IR_LE; if (dt == IRT_U32 || dt == IRT_U64) op += (IR_ULT-IR_LT); } lj_ir_set(J, IRTG(op, dt), sp[0], sp[1]); J->postproc = LJ_POST_FIXGUARD; return TREF_TRUE; } else { tr = emitir(IRT(mm+(int)IR_ADD-(int)MM_add, dt), sp[0], sp[1]); } return emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr); } return 0; } static TRef crec_arith_ptr(jit_State *J, TRef *sp, CType **s, MMS mm) { CTState *cts = ctype_ctsG(J2G(J)); CType *ctp = s[0]; if (ctype_isptr(ctp->info) || ctype_isrefarray(ctp->info)) { if ((mm == MM_sub || mm == MM_eq || mm == MM_lt || mm == MM_le) && (ctype_isptr(s[1]->info) || ctype_isrefarray(s[1]->info))) { if (mm == MM_sub) { /* Pointer difference. */ TRef tr; CTSize sz = lj_ctype_size(cts, ctype_cid(ctp->info)); if (sz == 0 || (sz & (sz-1)) != 0) return 0; /* NYI: integer division. */ tr = emitir(IRT(IR_SUB, IRT_INTP), sp[0], sp[1]); tr = emitir(IRT(IR_BSAR, IRT_INTP), tr, lj_ir_kint(J, lj_fls(sz))); #if LJ_64 tr = emitconv(tr, IRT_NUM, IRT_INTP, 0); #endif return tr; } else { /* Pointer comparison (unsigned). */ /* Assume true comparison. Fixup and emit pending guard later. */ IROp op = mm == MM_eq ? IR_EQ : mm == MM_lt ? IR_ULT : IR_ULE; lj_ir_set(J, IRTG(op, IRT_PTR), sp[0], sp[1]); J->postproc = LJ_POST_FIXGUARD; return TREF_TRUE; } } if (!((mm == MM_add || mm == MM_sub) && ctype_isnum(s[1]->info))) return 0; } else if (mm == MM_add && ctype_isnum(ctp->info) && (ctype_isptr(s[1]->info) || ctype_isrefarray(s[1]->info))) { TRef tr = sp[0]; sp[0] = sp[1]; sp[1] = tr; /* Swap pointer and index. */ ctp = s[1]; } else { return 0; } { TRef tr = sp[1]; IRType t = tref_type(tr); CTSize sz = lj_ctype_size(cts, ctype_cid(ctp->info)); CTypeID id; #if LJ_64 if (t == IRT_NUM || t == IRT_FLOAT) tr = emitconv(tr, IRT_INTP, t, IRCONV_TRUNC|IRCONV_ANY); else if (!(t == IRT_I64 || t == IRT_U64)) tr = emitconv(tr, IRT_INTP, IRT_INT, ((t - IRT_I8) & 1) ? 0 : IRCONV_SEXT); #else if (!tref_typerange(sp[1], IRT_I8, IRT_U32)) { tr = emitconv(tr, IRT_INTP, t, (t == IRT_NUM || t == IRT_FLOAT) ? IRCONV_TRUNC|IRCONV_ANY : 0); } #endif tr = emitir(IRT(IR_MUL, IRT_INTP), tr, lj_ir_kintp(J, sz)); tr = emitir(IRT(mm+(int)IR_ADD-(int)MM_add, IRT_PTR), sp[0], tr); id = lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|ctype_cid(ctp->info)), CTSIZE_PTR); return emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr); } } /* Record ctype arithmetic metamethods. */ static void crec_arith_meta(jit_State *J, CTState *cts, RecordFFData *rd) { cTValue *tv = NULL; if (J->base[0]) { if (tviscdata(&rd->argv[0])) { CTypeID id = argv2cdata(J, J->base[0], &rd->argv[0])->ctypeid; CType *ct = ctype_raw(cts, id); if (ctype_isptr(ct->info)) id = ctype_cid(ct->info); tv = lj_ctype_meta(cts, id, (MMS)rd->data); } if (!tv && J->base[1] && tviscdata(&rd->argv[1])) { CTypeID id = argv2cdata(J, J->base[1], &rd->argv[1])->ctypeid; CType *ct = ctype_raw(cts, id); if (ctype_isptr(ct->info)) id = ctype_cid(ct->info); tv = lj_ctype_meta(cts, id, (MMS)rd->data); } } if (tv) { if (tvisfunc(tv)) { J->base[-1] = lj_ir_kfunc(J, funcV(tv)) | TREF_FRAME; rd->nres = -1; /* Pending tailcall. */ return; } /* NYI: non-function metamethods. */ } else if ((MMS)rd->data == MM_eq) { J->base[0] = TREF_FALSE; return; } lj_trace_err(J, LJ_TRERR_BADTYPE); } void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd) { CTState *cts = ctype_ctsG(J2G(J)); TRef sp[2]; CType *s[2]; MSize i; for (i = 0; i < 2; i++) { TRef tr = J->base[i]; CType *ct = ctype_get(cts, CTID_DOUBLE); if (!tr) { goto trymeta; } else if (tref_iscdata(tr)) { CTypeID id = argv2cdata(J, tr, &rd->argv[i])->ctypeid; IRType t; ct = ctype_raw(cts, id); t = crec_ct2irt(cts, ct); if (ctype_isptr(ct->info)) { /* Resolve pointer or reference. */ tr = emitir(IRT(IR_FLOAD, t), tr, IRFL_CDATA_PTR); if (ctype_isref(ct->info)) { ct = ctype_rawchild(cts, ct); t = crec_ct2irt(cts, ct); } } else if (t == IRT_I64 || t == IRT_U64) { tr = emitir(IRT(IR_FLOAD, t), tr, IRFL_CDATA_INT64); lj_needsplit(J); goto ok; } else if (t == IRT_INT || t == IRT_U32) { tr = emitir(IRT(IR_FLOAD, t), tr, IRFL_CDATA_INT); if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); goto ok; } else if (ctype_isfunc(ct->info)) { tr = emitir(IRT(IR_FLOAD, IRT_PTR), tr, IRFL_CDATA_PTR); ct = ctype_get(cts, lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR)); goto ok; } else { tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCcdata))); } if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); if (ctype_isnum(ct->info)) { if (t == IRT_CDATA) goto trymeta; if (t == IRT_I64 || t == IRT_U64) lj_needsplit(J); tr = emitir(IRT(IR_XLOAD, t), tr, 0); } else if (!(ctype_isptr(ct->info) || ctype_isrefarray(ct->info))) { goto trymeta; } } else if (tref_isnil(tr)) { tr = lj_ir_kptr(J, NULL); ct = ctype_get(cts, CTID_P_VOID); } else if (tref_isinteger(tr)) { ct = ctype_get(cts, CTID_INT32); } else if (tref_isstr(tr)) { TRef tr2 = J->base[1-i]; CTypeID id = argv2cdata(J, tr2, &rd->argv[1-i])->ctypeid; ct = ctype_raw(cts, id); if (ctype_isenum(ct->info)) { /* Match string against enum constant. */ GCstr *str = strV(&rd->argv[i]); CTSize ofs; CType *cct = lj_ctype_getfield(cts, ct, str, &ofs); if (cct && ctype_isconstval(cct->info)) { /* Specialize to the name of the enum constant. */ emitir(IRTG(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, str)); ct = ctype_child(cts, cct); tr = lj_ir_kint(J, (int32_t)ofs); } /* else: interpreter will throw. */ } /* else: interpreter will throw. */ } else if (!tref_isnum(tr)) { goto trymeta; } ok: s[i] = ct; sp[i] = tr; } { TRef tr; if ((tr = crec_arith_int64(J, sp, s, (MMS)rd->data)) || (tr = crec_arith_ptr(J, sp, s, (MMS)rd->data))) { J->base[0] = tr; /* Fixup cdata comparisons, too. Avoids some cdata escapes. */ if (J->postproc == LJ_POST_FIXGUARD && frame_iscont(J->L->base-1) && !irt_isguard(J->guardemit)) { const BCIns *pc = frame_contpc(J->L->base-1) - 1; if (bc_op(*pc) <= BC_ISNEP) { setframe_pc(&J2G(J)->tmptv, pc); J2G(J)->tmptv.u32.lo = ((tref_istrue(tr) ^ bc_op(*pc)) & 1); J->postproc = LJ_POST_FIXCOMP; } } } else { trymeta: crec_arith_meta(J, cts, rd); } } } /* -- C library namespace metamethods ------------------------------------- */ void LJ_FASTCALL recff_clib_index(jit_State *J, RecordFFData *rd) { CTState *cts = ctype_ctsG(J2G(J)); if (tref_isudata(J->base[0]) && tref_isstr(J->base[1]) && udataV(&rd->argv[0])->udtype == UDTYPE_FFI_CLIB) { CLibrary *cl = (CLibrary *)uddata(udataV(&rd->argv[0])); GCstr *name = strV(&rd->argv[1]); CType *ct; CTypeID id = lj_ctype_getname(cts, &ct, name, CLNS_INDEX); cTValue *tv = lj_tab_getstr(cl->cache, name); rd->nres = rd->data; if (id && tv && !tvisnil(tv)) { /* Specialize to the symbol name and make the result a constant. */ emitir(IRTG(IR_EQ, IRT_STR), J->base[1], lj_ir_kstr(J, name)); if (ctype_isconstval(ct->info)) { if (ct->size >= 0x80000000u && (ctype_child(cts, ct)->info & CTF_UNSIGNED)) J->base[0] = lj_ir_knum(J, (lua_Number)(uint32_t)ct->size); else J->base[0] = lj_ir_kint(J, (int32_t)ct->size); } else if (ctype_isextern(ct->info)) { CTypeID sid = ctype_cid(ct->info); void *sp = *(void **)cdataptr(cdataV(tv)); TRef ptr; ct = ctype_raw(cts, sid); if (LJ_64 && !checkptr32(sp)) ptr = lj_ir_kintp(J, (uintptr_t)sp); else ptr = lj_ir_kptr(J, sp); if (rd->data) { J->base[0] = crec_tv_ct(J, ct, sid, ptr); } else { J->needsnap = 1; crec_ct_tv(J, ct, ptr, J->base[2], &rd->argv[2]); } } else { J->base[0] = lj_ir_kgc(J, obj2gco(cdataV(tv)), IRT_CDATA); } } else { lj_trace_err(J, LJ_TRERR_NOCACHE); } } /* else: interpreter will throw. */ } /* -- FFI library functions ----------------------------------------------- */ static TRef crec_toint(jit_State *J, CTState *cts, TRef sp, TValue *sval) { return crec_ct_tv(J, ctype_get(cts, CTID_INT32), 0, sp, sval); } void LJ_FASTCALL recff_ffi_new(jit_State *J, RecordFFData *rd) { crec_alloc(J, rd, argv2ctype(J, J->base[0], &rd->argv[0])); } void LJ_FASTCALL recff_ffi_errno(jit_State *J, RecordFFData *rd) { UNUSED(rd); if (J->base[0]) lj_trace_err(J, LJ_TRERR_NYICALL); J->base[0] = lj_ir_call(J, IRCALL_lj_vm_errno); } void LJ_FASTCALL recff_ffi_string(jit_State *J, RecordFFData *rd) { CTState *cts = ctype_ctsG(J2G(J)); TRef tr = J->base[0]; if (tr) { TRef trlen = J->base[1]; if (!tref_isnil(trlen)) { trlen = crec_toint(J, cts, trlen, &rd->argv[1]); tr = crec_ct_tv(J, ctype_get(cts, CTID_P_CVOID), 0, tr, &rd->argv[0]); } else { tr = crec_ct_tv(J, ctype_get(cts, CTID_P_CCHAR), 0, tr, &rd->argv[0]); trlen = lj_ir_call(J, IRCALL_strlen, tr); } J->base[0] = emitir(IRT(IR_XSNEW, IRT_STR), tr, trlen); } /* else: interpreter will throw. */ } void LJ_FASTCALL recff_ffi_copy(jit_State *J, RecordFFData *rd) { CTState *cts = ctype_ctsG(J2G(J)); TRef trdst = J->base[0], trsrc = J->base[1], trlen = J->base[2]; if (trdst && trsrc && (trlen || tref_isstr(trsrc))) { trdst = crec_ct_tv(J, ctype_get(cts, CTID_P_VOID), 0, trdst, &rd->argv[0]); trsrc = crec_ct_tv(J, ctype_get(cts, CTID_P_CVOID), 0, trsrc, &rd->argv[1]); if (trlen) { trlen = crec_toint(J, cts, trlen, &rd->argv[2]); } else { trlen = emitir(IRTI(IR_FLOAD), J->base[1], IRFL_STR_LEN); trlen = emitir(IRTI(IR_ADD), trlen, lj_ir_kint(J, 1)); } rd->nres = 0; crec_copy(J, trdst, trsrc, trlen, NULL); } /* else: interpreter will throw. */ } void LJ_FASTCALL recff_ffi_fill(jit_State *J, RecordFFData *rd) { CTState *cts = ctype_ctsG(J2G(J)); TRef trdst = J->base[0], trlen = J->base[1], trfill = J->base[2]; if (trdst && trlen) { CTSize step = 1; if (tviscdata(&rd->argv[0])) { /* Get alignment of original destination. */ CTSize sz; CType *ct = ctype_raw(cts, cdataV(&rd->argv[0])->ctypeid); if (ctype_isptr(ct->info)) ct = ctype_rawchild(cts, ct); step = (1u<argv[0]); trlen = crec_toint(J, cts, trlen, &rd->argv[1]); if (trfill) trfill = crec_toint(J, cts, trfill, &rd->argv[2]); else trfill = lj_ir_kint(J, 0); rd->nres = 0; crec_fill(J, trdst, trlen, trfill, step); } /* else: interpreter will throw. */ } void LJ_FASTCALL recff_ffi_typeof(jit_State *J, RecordFFData *rd) { if (tref_iscdata(J->base[0])) { TRef trid = lj_ir_kint(J, argv2ctype(J, J->base[0], &rd->argv[0])); J->base[0] = emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, CTID_CTYPEID), trid); } else { setfuncV(J->L, &J->errinfo, J->fn); lj_trace_err_info(J, LJ_TRERR_NYIFFU); } } void LJ_FASTCALL recff_ffi_istype(jit_State *J, RecordFFData *rd) { argv2ctype(J, J->base[0], &rd->argv[0]); if (tref_iscdata(J->base[1])) { argv2ctype(J, J->base[1], &rd->argv[1]); J->postproc = LJ_POST_FIXBOOL; J->base[0] = TREF_TRUE; } else { J->base[0] = TREF_FALSE; } } void LJ_FASTCALL recff_ffi_abi(jit_State *J, RecordFFData *rd) { if (tref_isstr(J->base[0])) { /* Specialize to the ABI string to make the boolean result a constant. */ emitir(IRTG(IR_EQ, IRT_STR), J->base[0], lj_ir_kstr(J, strV(&rd->argv[0]))); J->postproc = LJ_POST_FIXBOOL; J->base[0] = TREF_TRUE; } else { lj_trace_err(J, LJ_TRERR_BADTYPE); } } /* Record ffi.sizeof(), ffi.alignof(), ffi.offsetof(). */ void LJ_FASTCALL recff_ffi_xof(jit_State *J, RecordFFData *rd) { CTypeID id = argv2ctype(J, J->base[0], &rd->argv[0]); if (rd->data == FF_ffi_sizeof) { CType *ct = lj_ctype_rawref(ctype_ctsG(J2G(J)), id); if (ctype_isvltype(ct->info)) lj_trace_err(J, LJ_TRERR_BADTYPE); } else if (rd->data == FF_ffi_offsetof) { /* Specialize to the field name. */ if (!tref_isstr(J->base[1])) lj_trace_err(J, LJ_TRERR_BADTYPE); emitir(IRTG(IR_EQ, IRT_STR), J->base[1], lj_ir_kstr(J, strV(&rd->argv[1]))); rd->nres = 3; /* Just in case. */ } J->postproc = LJ_POST_FIXCONST; J->base[0] = J->base[1] = J->base[2] = TREF_NIL; } void LJ_FASTCALL recff_ffi_gc(jit_State *J, RecordFFData *rd) { argv2cdata(J, J->base[0], &rd->argv[0]); crec_finalizer(J, J->base[0], &rd->argv[1]); } /* -- Miscellaneous library functions ------------------------------------- */ void LJ_FASTCALL lj_crecord_tonumber(jit_State *J, RecordFFData *rd) { CTState *cts = ctype_ctsG(J2G(J)); CType *d, *ct = lj_ctype_rawref(cts, cdataV(&rd->argv[0])->ctypeid); if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); if (ctype_isnum(ct->info) || ctype_iscomplex(ct->info)) { if (ctype_isinteger_or_bool(ct->info) && ct->size <= 4 && !(ct->size == 4 && (ct->info & CTF_UNSIGNED))) d = ctype_get(cts, CTID_INT32); else d = ctype_get(cts, CTID_DOUBLE); J->base[0] = crec_ct_tv(J, d, 0, J->base[0], &rd->argv[0]); } else { J->base[0] = TREF_NIL; } } #undef IR #undef emitir #undef emitconv #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_jit.c0000664000000000000000000004236612231715321022160 0ustar rootroot/* ** JIT library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lib_jit_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_arch.h" #include "lj_obj.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_bc.h" #if LJ_HASJIT #include "lj_ir.h" #include "lj_jit.h" #include "lj_ircall.h" #include "lj_iropt.h" #include "lj_target.h" #endif #include "lj_dispatch.h" #include "lj_vm.h" #include "lj_vmevent.h" #include "lj_lib.h" #include "luajit.h" /* -- jit.* functions ----------------------------------------------------- */ #define LJLIB_MODULE_jit static int setjitmode(lua_State *L, int mode) { int idx = 0; if (L->base == L->top || tvisnil(L->base)) { /* jit.on/off/flush([nil]) */ mode |= LUAJIT_MODE_ENGINE; } else { /* jit.on/off/flush(func|proto, nil|true|false) */ if (tvisfunc(L->base) || tvisproto(L->base)) idx = 1; else if (!tvistrue(L->base)) /* jit.on/off/flush(true, nil|true|false) */ goto err; if (L->base+1 < L->top && tvisbool(L->base+1)) mode |= boolV(L->base+1) ? LUAJIT_MODE_ALLFUNC : LUAJIT_MODE_ALLSUBFUNC; else mode |= LUAJIT_MODE_FUNC; } if (luaJIT_setmode(L, idx, mode) != 1) { if ((mode & LUAJIT_MODE_MASK) == LUAJIT_MODE_ENGINE) lj_err_caller(L, LJ_ERR_NOJIT); err: lj_err_argt(L, 1, LUA_TFUNCTION); } return 0; } LJLIB_CF(jit_on) { return setjitmode(L, LUAJIT_MODE_ON); } LJLIB_CF(jit_off) { return setjitmode(L, LUAJIT_MODE_OFF); } LJLIB_CF(jit_flush) { #if LJ_HASJIT if (L->base < L->top && tvisnumber(L->base)) { int traceno = lj_lib_checkint(L, 1); luaJIT_setmode(L, traceno, LUAJIT_MODE_FLUSH|LUAJIT_MODE_TRACE); return 0; } #endif return setjitmode(L, LUAJIT_MODE_FLUSH); } #if LJ_HASJIT /* Push a string for every flag bit that is set. */ static void flagbits_to_strings(lua_State *L, uint32_t flags, uint32_t base, const char *str) { for (; *str; base <<= 1, str += 1+*str) if (flags & base) setstrV(L, L->top++, lj_str_new(L, str+1, *(uint8_t *)str)); } #endif LJLIB_CF(jit_status) { #if LJ_HASJIT jit_State *J = L2J(L); L->top = L->base; setboolV(L->top++, (J->flags & JIT_F_ON) ? 1 : 0); flagbits_to_strings(L, J->flags, JIT_F_CPU_FIRST, JIT_F_CPUSTRING); flagbits_to_strings(L, J->flags, JIT_F_OPT_FIRST, JIT_F_OPTSTRING); return (int)(L->top - L->base); #else setboolV(L->top++, 0); return 1; #endif } LJLIB_CF(jit_attach) { #ifdef LUAJIT_DISABLE_VMEVENT luaL_error(L, "vmevent API disabled"); #else GCfunc *fn = lj_lib_checkfunc(L, 1); GCstr *s = lj_lib_optstr(L, 2); luaL_findtable(L, LUA_REGISTRYINDEX, LJ_VMEVENTS_REGKEY, LJ_VMEVENTS_HSIZE); if (s) { /* Attach to given event. */ const uint8_t *p = (const uint8_t *)strdata(s); uint32_t h = s->len; while (*p) h = h ^ (lj_rol(h, 6) + *p++); lua_pushvalue(L, 1); lua_rawseti(L, -2, VMEVENT_HASHIDX(h)); G(L)->vmevmask = VMEVENT_NOCACHE; /* Invalidate cache. */ } else { /* Detach if no event given. */ setnilV(L->top++); while (lua_next(L, -2)) { L->top--; if (tvisfunc(L->top) && funcV(L->top) == fn) { setnilV(lj_tab_set(L, tabV(L->top-2), L->top-1)); } } } #endif return 0; } LJLIB_PUSH(top-5) LJLIB_SET(os) LJLIB_PUSH(top-4) LJLIB_SET(arch) LJLIB_PUSH(top-3) LJLIB_SET(version_num) LJLIB_PUSH(top-2) LJLIB_SET(version) #include "lj_libdef.h" /* -- jit.util.* functions ------------------------------------------------ */ #define LJLIB_MODULE_jit_util /* -- Reflection API for Lua functions ------------------------------------ */ /* Return prototype of first argument (Lua function or prototype object) */ static GCproto *check_Lproto(lua_State *L, int nolua) { TValue *o = L->base; if (L->top > o) { if (tvisproto(o)) { return protoV(o); } else if (tvisfunc(o)) { if (isluafunc(funcV(o))) return funcproto(funcV(o)); else if (nolua) return NULL; } } lj_err_argt(L, 1, LUA_TFUNCTION); return NULL; /* unreachable */ } static void setintfield(lua_State *L, GCtab *t, const char *name, int32_t val) { setintV(lj_tab_setstr(L, t, lj_str_newz(L, name)), val); } /* local info = jit.util.funcinfo(func [,pc]) */ LJLIB_CF(jit_util_funcinfo) { GCproto *pt = check_Lproto(L, 1); if (pt) { BCPos pc = (BCPos)lj_lib_optint(L, 2, 0); GCtab *t; lua_createtable(L, 0, 16); /* Increment hash size if fields are added. */ t = tabV(L->top-1); setintfield(L, t, "linedefined", pt->firstline); setintfield(L, t, "lastlinedefined", pt->firstline + pt->numline); setintfield(L, t, "stackslots", pt->framesize); setintfield(L, t, "params", pt->numparams); setintfield(L, t, "bytecodes", (int32_t)pt->sizebc); setintfield(L, t, "gcconsts", (int32_t)pt->sizekgc); setintfield(L, t, "nconsts", (int32_t)pt->sizekn); setintfield(L, t, "upvalues", (int32_t)pt->sizeuv); if (pc < pt->sizebc) setintfield(L, t, "currentline", lj_debug_line(pt, pc)); lua_pushboolean(L, (pt->flags & PROTO_VARARG)); lua_setfield(L, -2, "isvararg"); lua_pushboolean(L, (pt->flags & PROTO_CHILD)); lua_setfield(L, -2, "children"); setstrV(L, L->top++, proto_chunkname(pt)); lua_setfield(L, -2, "source"); lj_debug_pushloc(L, pt, pc); lua_setfield(L, -2, "loc"); } else { GCfunc *fn = funcV(L->base); GCtab *t; lua_createtable(L, 0, 4); /* Increment hash size if fields are added. */ t = tabV(L->top-1); if (!iscfunc(fn)) setintfield(L, t, "ffid", fn->c.ffid); setintptrV(lj_tab_setstr(L, t, lj_str_newlit(L, "addr")), (intptr_t)(void *)fn->c.f); setintfield(L, t, "upvalues", fn->c.nupvalues); } return 1; } /* local ins, m = jit.util.funcbc(func, pc) */ LJLIB_CF(jit_util_funcbc) { GCproto *pt = check_Lproto(L, 0); BCPos pc = (BCPos)lj_lib_checkint(L, 2); if (pc < pt->sizebc) { BCIns ins = proto_bc(pt)[pc]; BCOp op = bc_op(ins); lua_assert(op < BC__MAX); setintV(L->top, ins); setintV(L->top+1, lj_bc_mode[op]); L->top += 2; return 2; } return 0; } /* local k = jit.util.funck(func, idx) */ LJLIB_CF(jit_util_funck) { GCproto *pt = check_Lproto(L, 0); ptrdiff_t idx = (ptrdiff_t)lj_lib_checkint(L, 2); if (idx >= 0) { if (idx < (ptrdiff_t)pt->sizekn) { copyTV(L, L->top-1, proto_knumtv(pt, idx)); return 1; } } else { if (~idx < (ptrdiff_t)pt->sizekgc) { GCobj *gc = proto_kgc(pt, idx); setgcV(L, L->top-1, gc, ~gc->gch.gct); return 1; } } return 0; } /* local name = jit.util.funcuvname(func, idx) */ LJLIB_CF(jit_util_funcuvname) { GCproto *pt = check_Lproto(L, 0); uint32_t idx = (uint32_t)lj_lib_checkint(L, 2); if (idx < pt->sizeuv) { setstrV(L, L->top-1, lj_str_newz(L, lj_debug_uvname(pt, idx))); return 1; } return 0; } /* -- Reflection API for traces ------------------------------------------- */ #if LJ_HASJIT /* Check trace argument. Must not throw for non-existent trace numbers. */ static GCtrace *jit_checktrace(lua_State *L) { TraceNo tr = (TraceNo)lj_lib_checkint(L, 1); jit_State *J = L2J(L); if (tr > 0 && tr < J->sizetrace) return traceref(J, tr); return NULL; } /* Names of link types. ORDER LJ_TRLINK */ static const char *const jit_trlinkname[] = { "none", "root", "loop", "tail-recursion", "up-recursion", "down-recursion", "interpreter", "return" }; /* local info = jit.util.traceinfo(tr) */ LJLIB_CF(jit_util_traceinfo) { GCtrace *T = jit_checktrace(L); if (T) { GCtab *t; lua_createtable(L, 0, 8); /* Increment hash size if fields are added. */ t = tabV(L->top-1); setintfield(L, t, "nins", (int32_t)T->nins - REF_BIAS - 1); setintfield(L, t, "nk", REF_BIAS - (int32_t)T->nk); setintfield(L, t, "link", T->link); setintfield(L, t, "nexit", T->nsnap); setstrV(L, L->top++, lj_str_newz(L, jit_trlinkname[T->linktype])); lua_setfield(L, -2, "linktype"); /* There are many more fields. Add them only when needed. */ return 1; } return 0; } /* local m, ot, op1, op2, prev = jit.util.traceir(tr, idx) */ LJLIB_CF(jit_util_traceir) { GCtrace *T = jit_checktrace(L); IRRef ref = (IRRef)lj_lib_checkint(L, 2) + REF_BIAS; if (T && ref >= REF_BIAS && ref < T->nins) { IRIns *ir = &T->ir[ref]; int32_t m = lj_ir_mode[ir->o]; setintV(L->top-2, m); setintV(L->top-1, ir->ot); setintV(L->top++, (int32_t)ir->op1 - (irm_op1(m)==IRMref ? REF_BIAS : 0)); setintV(L->top++, (int32_t)ir->op2 - (irm_op2(m)==IRMref ? REF_BIAS : 0)); setintV(L->top++, ir->prev); return 5; } return 0; } /* local k, t [, slot] = jit.util.tracek(tr, idx) */ LJLIB_CF(jit_util_tracek) { GCtrace *T = jit_checktrace(L); IRRef ref = (IRRef)lj_lib_checkint(L, 2) + REF_BIAS; if (T && ref >= T->nk && ref < REF_BIAS) { IRIns *ir = &T->ir[ref]; int32_t slot = -1; if (ir->o == IR_KSLOT) { slot = ir->op2; ir = &T->ir[ir->op1]; } lj_ir_kvalue(L, L->top-2, ir); setintV(L->top-1, (int32_t)irt_type(ir->t)); if (slot == -1) return 2; setintV(L->top++, slot); return 3; } return 0; } /* local snap = jit.util.tracesnap(tr, sn) */ LJLIB_CF(jit_util_tracesnap) { GCtrace *T = jit_checktrace(L); SnapNo sn = (SnapNo)lj_lib_checkint(L, 2); if (T && sn < T->nsnap) { SnapShot *snap = &T->snap[sn]; SnapEntry *map = &T->snapmap[snap->mapofs]; MSize n, nent = snap->nent; GCtab *t; lua_createtable(L, nent+2, 0); t = tabV(L->top-1); setintV(lj_tab_setint(L, t, 0), (int32_t)snap->ref - REF_BIAS); setintV(lj_tab_setint(L, t, 1), (int32_t)snap->nslots); for (n = 0; n < nent; n++) setintV(lj_tab_setint(L, t, (int32_t)(n+2)), (int32_t)map[n]); setintV(lj_tab_setint(L, t, (int32_t)(nent+2)), (int32_t)SNAP(255, 0, 0)); return 1; } return 0; } /* local mcode, addr, loop = jit.util.tracemc(tr) */ LJLIB_CF(jit_util_tracemc) { GCtrace *T = jit_checktrace(L); if (T && T->mcode != NULL) { setstrV(L, L->top-1, lj_str_new(L, (const char *)T->mcode, T->szmcode)); setintptrV(L->top++, (intptr_t)(void *)T->mcode); setintV(L->top++, T->mcloop); return 3; } return 0; } /* local addr = jit.util.traceexitstub([tr,] exitno) */ LJLIB_CF(jit_util_traceexitstub) { #ifdef EXITSTUBS_PER_GROUP ExitNo exitno = (ExitNo)lj_lib_checkint(L, 1); jit_State *J = L2J(L); if (exitno < EXITSTUBS_PER_GROUP*LJ_MAX_EXITSTUBGR) { setintptrV(L->top-1, (intptr_t)(void *)exitstub_addr(J, exitno)); return 1; } #else if (L->top > L->base+1) { /* Don't throw for one-argument variant. */ GCtrace *T = jit_checktrace(L); ExitNo exitno = (ExitNo)lj_lib_checkint(L, 2); ExitNo maxexit = T->root ? T->nsnap+1 : T->nsnap; if (T && T->mcode != NULL && exitno < maxexit) { setintptrV(L->top-1, (intptr_t)(void *)exitstub_trace_addr(T, exitno)); return 1; } } #endif return 0; } /* local addr = jit.util.ircalladdr(idx) */ LJLIB_CF(jit_util_ircalladdr) { uint32_t idx = (uint32_t)lj_lib_checkint(L, 1); if (idx < IRCALL__MAX) { setintptrV(L->top-1, (intptr_t)(void *)lj_ir_callinfo[idx].func); return 1; } return 0; } #endif #include "lj_libdef.h" /* -- jit.opt module ------------------------------------------------------ */ #if LJ_HASJIT #define LJLIB_MODULE_jit_opt /* Parse optimization level. */ static int jitopt_level(jit_State *J, const char *str) { if (str[0] >= '0' && str[0] <= '9' && str[1] == '\0') { uint32_t flags; if (str[0] == '0') flags = JIT_F_OPT_0; else if (str[0] == '1') flags = JIT_F_OPT_1; else if (str[0] == '2') flags = JIT_F_OPT_2; else flags = JIT_F_OPT_3; J->flags = (J->flags & ~JIT_F_OPT_MASK) | flags; return 1; /* Ok. */ } return 0; /* No match. */ } /* Parse optimization flag. */ static int jitopt_flag(jit_State *J, const char *str) { const char *lst = JIT_F_OPTSTRING; uint32_t opt; int set = 1; if (str[0] == '+') { str++; } else if (str[0] == '-') { str++; set = 0; } else if (str[0] == 'n' && str[1] == 'o') { str += str[2] == '-' ? 3 : 2; set = 0; } for (opt = JIT_F_OPT_FIRST; ; opt <<= 1) { size_t len = *(const uint8_t *)lst; if (len == 0) break; if (strncmp(str, lst+1, len) == 0 && str[len] == '\0') { if (set) J->flags |= opt; else J->flags &= ~opt; return 1; /* Ok. */ } lst += 1+len; } return 0; /* No match. */ } /* Parse optimization parameter. */ static int jitopt_param(jit_State *J, const char *str) { const char *lst = JIT_P_STRING; int i; for (i = 0; i < JIT_P__MAX; i++) { size_t len = *(const uint8_t *)lst; lua_assert(len != 0); if (strncmp(str, lst+1, len) == 0 && str[len] == '=') { int32_t n = 0; const char *p = &str[len+1]; while (*p >= '0' && *p <= '9') n = n*10 + (*p++ - '0'); if (*p) return 0; /* Malformed number. */ J->param[i] = n; if (i == JIT_P_hotloop) lj_dispatch_init_hotcount(J2G(J)); return 1; /* Ok. */ } lst += 1+len; } return 0; /* No match. */ } /* jit.opt.start(flags...) */ LJLIB_CF(jit_opt_start) { jit_State *J = L2J(L); int nargs = (int)(L->top - L->base); if (nargs == 0) { J->flags = (J->flags & ~JIT_F_OPT_MASK) | JIT_F_OPT_DEFAULT; } else { int i; for (i = 1; i <= nargs; i++) { const char *str = strdata(lj_lib_checkstr(L, i)); if (!jitopt_level(J, str) && !jitopt_flag(J, str) && !jitopt_param(J, str)) lj_err_callerv(L, LJ_ERR_JITOPT, str); } } return 0; } #include "lj_libdef.h" #endif /* -- JIT compiler initialization ----------------------------------------- */ #if LJ_HASJIT /* Default values for JIT parameters. */ static const int32_t jit_param_default[JIT_P__MAX+1] = { #define JIT_PARAMINIT(len, name, value) (value), JIT_PARAMDEF(JIT_PARAMINIT) #undef JIT_PARAMINIT 0 }; #endif #if LJ_TARGET_ARM && LJ_TARGET_LINUX #include #endif /* Arch-dependent CPU detection. */ static uint32_t jit_cpudetect(lua_State *L) { uint32_t flags = 0; #if LJ_TARGET_X86ORX64 uint32_t vendor[4]; uint32_t features[4]; if (lj_vm_cpuid(0, vendor) && lj_vm_cpuid(1, features)) { #if !LJ_HASJIT #define JIT_F_CMOV 1 #define JIT_F_SSE2 2 #endif flags |= ((features[3] >> 15)&1) * JIT_F_CMOV; flags |= ((features[3] >> 26)&1) * JIT_F_SSE2; #if LJ_HASJIT flags |= ((features[2] >> 0)&1) * JIT_F_SSE3; flags |= ((features[2] >> 19)&1) * JIT_F_SSE4_1; if (vendor[2] == 0x6c65746e) { /* Intel. */ if ((features[0] & 0x0ff00f00) == 0x00000f00) /* P4. */ flags |= JIT_F_P4; /* Currently unused. */ else if ((features[0] & 0x0fff0ff0) == 0x000106c0) /* Atom. */ flags |= JIT_F_LEA_AGU; } else if (vendor[2] == 0x444d4163) { /* AMD. */ uint32_t fam = (features[0] & 0x0ff00f00); if (fam == 0x00000f00) /* K8. */ flags |= JIT_F_SPLIT_XMM; if (fam >= 0x00000f00) /* K8, K10. */ flags |= JIT_F_PREFER_IMUL; } #endif } /* Check for required instruction set support on x86 (unnecessary on x64). */ #if LJ_TARGET_X86 #if !defined(LUAJIT_CPU_NOCMOV) if (!(flags & JIT_F_CMOV)) luaL_error(L, "CPU not supported"); #endif #if defined(LUAJIT_CPU_SSE2) if (!(flags & JIT_F_SSE2)) luaL_error(L, "CPU does not support SSE2 (recompile without -DLUAJIT_CPU_SSE2)"); #endif #endif #elif LJ_TARGET_ARM #if LJ_HASJIT int ver = LJ_ARCH_VERSION; /* Compile-time ARM CPU detection. */ #if LJ_TARGET_LINUX if (ver < 70) { /* Runtime ARM CPU detection. */ struct utsname ut; uname(&ut); if (strncmp(ut.machine, "armv", 4) == 0) { if (ut.machine[4] >= '7') ver = 70; else if (ut.machine[4] == '6') ver = 60; } } #endif flags |= ver >= 70 ? JIT_F_ARMV7 : ver >= 61 ? JIT_F_ARMV6T2_ : ver >= 60 ? JIT_F_ARMV6_ : 0; flags |= LJ_ARCH_HASFPU == 0 ? 0 : ver >= 70 ? JIT_F_VFPV3 : JIT_F_VFPV2; #endif #elif LJ_TARGET_PPC #if LJ_HASJIT #if LJ_ARCH_SQRT flags |= JIT_F_SQRT; #endif #if LJ_ARCH_ROUND flags |= JIT_F_ROUND; #endif #endif #elif LJ_TARGET_PPCSPE /* Nothing to do. */ #elif LJ_TARGET_MIPS #if LJ_HASJIT /* Compile-time MIPS CPU detection. */ #if LJ_ARCH_VERSION >= 20 flags |= JIT_F_MIPS32R2; #endif /* Runtime MIPS CPU detection. */ #if defined(__GNUC__) if (!(flags & JIT_F_MIPS32R2)) { int x; /* On MIPS32R1 rotr is treated as srl. rotr r2,r2,1 -> srl r2,r2,1. */ __asm__("li $2, 1\n\t.long 0x00221042\n\tmove %0, $2" : "=r"(x) : : "$2"); if (x) flags |= JIT_F_MIPS32R2; /* Either 0x80000000 (R2) or 0 (R1). */ } #endif #endif #else #error "Missing CPU detection for this architecture" #endif UNUSED(L); return flags; } /* Initialize JIT compiler. */ static void jit_init(lua_State *L) { uint32_t flags = jit_cpudetect(L); #if LJ_HASJIT jit_State *J = L2J(L); #if LJ_TARGET_X86 /* Silently turn off the JIT compiler on CPUs without SSE2. */ if ((flags & JIT_F_SSE2)) #endif J->flags = flags | JIT_F_ON | JIT_F_OPT_DEFAULT; memcpy(J->param, jit_param_default, sizeof(J->param)); lj_dispatch_update(G(L)); #else UNUSED(flags); #endif } LUALIB_API int luaopen_jit(lua_State *L) { lua_pushliteral(L, LJ_OS_NAME); lua_pushliteral(L, LJ_ARCH_NAME); lua_pushinteger(L, LUAJIT_VERSION_NUM); lua_pushliteral(L, LUAJIT_VERSION); LJ_LIB_REG(L, LUA_JITLIBNAME, jit); #ifndef LUAJIT_DISABLE_JITUTIL LJ_LIB_REG(L, "jit.util", jit_util); #endif #if LJ_HASJIT LJ_LIB_REG(L, "jit.opt", jit_opt); #endif L->top -= 2; jit_init(L); return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_math.o0000664000000000000000000001404012213333063022322 0ustar rootrootELF> @@UHATSILHcID$HI9D$w[A\]UHSHHHH[]UHSHHHH[]UH]UH]UHH]LeLmH0HELeHSHH9SvZHELmLeEELmEHC ^f(YE@H]LeLmUHHHHH1H-HHH1HHGHHH1HHHH1H1HOHGHHH1H0H%HHHH1HH1HGHWHHH1H'HHHHH1HWH1HHH!H?H ]UHATSHI A DYXfEHuEHUH9sH7IHH uAD$  LuH[A\]UHSHHWRz$tZ HH+H[]UHH]LeLmH@HHGLgI)I@x$t@ Lhx8u fWLLHEE\EE~dHEAuEYEXE.H\EXYEXEEHCEHHCH]LeLmUHSHH(@ HHHH[]lib_math.cmathfmodmod((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~12u))%CabsfloorceilDsqrtlog10expsincostanasinacosatansinhcoshtanhfrexpmodfClogcܥL@deg9RFߑ?radEatan2powfmodEldexpCminmax-DT! @pihugerandom randomseedlj_cf_math_randomseedlj_cf_math_random?-DT! @iW @GCC: (Debian 4.7.3-4) 4.7.3zRx  9AC Cq @/AC Ee `/AC Ee AC P AC P $AC P AC   AC G  ,TAC EJ $PAC P  xdAC EZ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @}&,12@2aT`R OX\i0r `   99/.h/@Qaq(}T  @@     !f5CIdVfvlib_math.clj_ffh_math_minlj_ffh_math_ldexplj_ffh_math_atan2lj_ffh_math_sqrtlj_ffh_math_abslj_ffh_math_lograndom_initlj_cf_math_randomseed__PRETTY_FUNCTION__.5323lj_cf_math_random__PRETTY_FUNCTION__.5314lj_lib_cf_mathlj_lib_init_math.LC0.LC1.LC2lj_lib_checknumlj_vm_log2lj_math_random_step__assert_failfloorluaopen_mathlua_newuserdatalj_lib_registerlua_getfieldlua_setfieldKXz1=JR    9 @C H Mn  +"7 < A I#N [$` m%h9  D9dhf (0T |tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_ffi.c0000664000000000000000000005376012231715321022136 0ustar rootroot/* ** FFI library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lib_ffi_c #define LUA_LIB #include #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_meta.h" #include "lj_ctype.h" #include "lj_cparse.h" #include "lj_cdata.h" #include "lj_cconv.h" #include "lj_carith.h" #include "lj_ccall.h" #include "lj_ccallback.h" #include "lj_clib.h" #include "lj_ff.h" #include "lj_lib.h" /* -- C type checks ------------------------------------------------------- */ /* Check first argument for a C type and returns its ID. */ static CTypeID ffi_checkctype(lua_State *L, CTState *cts, TValue *param) { TValue *o = L->base; if (!(o < L->top)) { err_argtype: lj_err_argtype(L, 1, "C type"); } if (tvisstr(o)) { /* Parse an abstract C type declaration. */ GCstr *s = strV(o); CPState cp; int errcode; cp.L = L; cp.cts = cts; cp.srcname = strdata(s); cp.p = strdata(s); cp.param = param; cp.mode = CPARSE_MODE_ABSTRACT|CPARSE_MODE_NOIMPLICIT; errcode = lj_cparse(&cp); if (errcode) lj_err_throw(L, errcode); /* Propagate errors. */ return cp.val.id; } else { GCcdata *cd; if (!tviscdata(o)) goto err_argtype; if (param && param < L->top) lj_err_arg(L, 1, LJ_ERR_FFI_NUMPARAM); cd = cdataV(o); return cd->ctypeid == CTID_CTYPEID ? *(CTypeID *)cdataptr(cd) : cd->ctypeid; } } /* Check argument for C data and return it. */ static GCcdata *ffi_checkcdata(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (!(o < L->top && tviscdata(o))) lj_err_argt(L, narg, LUA_TCDATA); return cdataV(o); } /* Convert argument to C pointer. */ static void *ffi_checkptr(lua_State *L, int narg, CTypeID id) { CTState *cts = ctype_cts(L); TValue *o = L->base + narg-1; void *p; if (o >= L->top) lj_err_arg(L, narg, LJ_ERR_NOVAL); lj_cconv_ct_tv(cts, ctype_get(cts, id), (uint8_t *)&p, o, CCF_ARG(narg)); return p; } /* Convert argument to int32_t. */ static int32_t ffi_checkint(lua_State *L, int narg) { CTState *cts = ctype_cts(L); TValue *o = L->base + narg-1; int32_t i; if (o >= L->top) lj_err_arg(L, narg, LJ_ERR_NOVAL); lj_cconv_ct_tv(cts, ctype_get(cts, CTID_INT32), (uint8_t *)&i, o, CCF_ARG(narg)); return i; } /* -- C type metamethods -------------------------------------------------- */ #define LJLIB_MODULE_ffi_meta /* Handle ctype __index/__newindex metamethods. */ static int ffi_index_meta(lua_State *L, CTState *cts, CType *ct, MMS mm) { CTypeID id = ctype_typeid(cts, ct); cTValue *tv = lj_ctype_meta(cts, id, mm); TValue *base = L->base; if (!tv) { const char *s; err_index: s = strdata(lj_ctype_repr(L, id, NULL)); if (tvisstr(L->base+1)) { lj_err_callerv(L, LJ_ERR_FFI_BADMEMBER, s, strVdata(L->base+1)); } else { const char *key = tviscdata(L->base+1) ? strdata(lj_ctype_repr(L, cdataV(L->base+1)->ctypeid, NULL)) : lj_typename(L->base+1); lj_err_callerv(L, LJ_ERR_FFI_BADIDXW, s, key); } } if (!tvisfunc(tv)) { if (mm == MM_index) { cTValue *o = lj_meta_tget(L, tv, base+1); if (o) { if (tvisnil(o)) goto err_index; copyTV(L, L->top-1, o); return 1; } } else { TValue *o = lj_meta_tset(L, tv, base+1); if (o) { copyTV(L, o, base+2); return 0; } } tv = L->top-1; } return lj_meta_tailcall(L, tv); } LJLIB_CF(ffi_meta___index) LJLIB_REC(cdata_index 0) { CTState *cts = ctype_cts(L); CTInfo qual = 0; CType *ct; uint8_t *p; TValue *o = L->base; if (!(o+1 < L->top && tviscdata(o))) /* Also checks for presence of key. */ lj_err_argt(L, 1, LUA_TCDATA); ct = lj_cdata_index(cts, cdataV(o), o+1, &p, &qual); if ((qual & 1)) return ffi_index_meta(L, cts, ct, MM_index); if (lj_cdata_get(cts, ct, L->top-1, p)) lj_gc_check(L); return 1; } LJLIB_CF(ffi_meta___newindex) LJLIB_REC(cdata_index 1) { CTState *cts = ctype_cts(L); CTInfo qual = 0; CType *ct; uint8_t *p; TValue *o = L->base; if (!(o+2 < L->top && tviscdata(o))) /* Also checks for key and value. */ lj_err_argt(L, 1, LUA_TCDATA); ct = lj_cdata_index(cts, cdataV(o), o+1, &p, &qual); if ((qual & 1)) { if ((qual & CTF_CONST)) lj_err_caller(L, LJ_ERR_FFI_WRCONST); return ffi_index_meta(L, cts, ct, MM_newindex); } lj_cdata_set(cts, ct, p, o+2, qual); return 0; } /* Common handler for cdata arithmetic. */ static int ffi_arith(lua_State *L) { MMS mm = (MMS)(curr_func(L)->c.ffid - (int)FF_ffi_meta___eq + (int)MM_eq); return lj_carith_op(L, mm); } /* The following functions must be in contiguous ORDER MM. */ LJLIB_CF(ffi_meta___eq) LJLIB_REC(cdata_arith MM_eq) { return ffi_arith(L); } LJLIB_CF(ffi_meta___len) LJLIB_REC(cdata_arith MM_len) { return ffi_arith(L); } LJLIB_CF(ffi_meta___lt) LJLIB_REC(cdata_arith MM_lt) { return ffi_arith(L); } LJLIB_CF(ffi_meta___le) LJLIB_REC(cdata_arith MM_le) { return ffi_arith(L); } LJLIB_CF(ffi_meta___concat) LJLIB_REC(cdata_arith MM_concat) { return ffi_arith(L); } /* Forward declaration. */ static int lj_cf_ffi_new(lua_State *L); LJLIB_CF(ffi_meta___call) LJLIB_REC(cdata_call) { CTState *cts = ctype_cts(L); GCcdata *cd = ffi_checkcdata(L, 1); CTypeID id = cd->ctypeid; CType *ct; cTValue *tv; MMS mm = MM_call; if (cd->ctypeid == CTID_CTYPEID) { id = *(CTypeID *)cdataptr(cd); mm = MM_new; } else { int ret = lj_ccall_func(L, cd); if (ret >= 0) return ret; } /* Handle ctype __call/__new metamethod. */ ct = ctype_raw(cts, id); if (ctype_isptr(ct->info)) id = ctype_cid(ct->info); tv = lj_ctype_meta(cts, id, mm); if (tv) return lj_meta_tailcall(L, tv); else if (mm == MM_call) lj_err_callerv(L, LJ_ERR_FFI_BADCALL, strdata(lj_ctype_repr(L, id, NULL))); return lj_cf_ffi_new(L); } LJLIB_CF(ffi_meta___add) LJLIB_REC(cdata_arith MM_add) { return ffi_arith(L); } LJLIB_CF(ffi_meta___sub) LJLIB_REC(cdata_arith MM_sub) { return ffi_arith(L); } LJLIB_CF(ffi_meta___mul) LJLIB_REC(cdata_arith MM_mul) { return ffi_arith(L); } LJLIB_CF(ffi_meta___div) LJLIB_REC(cdata_arith MM_div) { return ffi_arith(L); } LJLIB_CF(ffi_meta___mod) LJLIB_REC(cdata_arith MM_mod) { return ffi_arith(L); } LJLIB_CF(ffi_meta___pow) LJLIB_REC(cdata_arith MM_pow) { return ffi_arith(L); } LJLIB_CF(ffi_meta___unm) LJLIB_REC(cdata_arith MM_unm) { return ffi_arith(L); } /* End of contiguous ORDER MM. */ LJLIB_CF(ffi_meta___tostring) { GCcdata *cd = ffi_checkcdata(L, 1); const char *msg = "cdata<%s>: %p"; CTypeID id = cd->ctypeid; void *p = cdataptr(cd); if (id == CTID_CTYPEID) { msg = "ctype<%s>"; id = *(CTypeID *)p; } else { CTState *cts = ctype_cts(L); CType *ct = ctype_raw(cts, id); if (ctype_isref(ct->info)) { p = *(void **)p; ct = ctype_rawchild(cts, ct); } if (ctype_iscomplex(ct->info)) { setstrV(L, L->top-1, lj_ctype_repr_complex(L, cdataptr(cd), ct->size)); goto checkgc; } else if (ct->size == 8 && ctype_isinteger(ct->info)) { setstrV(L, L->top-1, lj_ctype_repr_int64(L, *(uint64_t *)cdataptr(cd), (ct->info & CTF_UNSIGNED))); goto checkgc; } else if (ctype_isfunc(ct->info)) { p = *(void **)p; } else if (ctype_isenum(ct->info)) { msg = "cdata<%s>: %d"; p = (void *)(uintptr_t)*(uint32_t **)p; } else { if (ctype_isptr(ct->info)) { p = cdata_getptr(p, ct->size); ct = ctype_rawchild(cts, ct); } if (ctype_isstruct(ct->info) || ctype_isvector(ct->info)) { /* Handle ctype __tostring metamethod. */ cTValue *tv = lj_ctype_meta(cts, ctype_typeid(cts, ct), MM_tostring); if (tv) return lj_meta_tailcall(L, tv); } } } lj_str_pushf(L, msg, strdata(lj_ctype_repr(L, id, NULL)), p); checkgc: lj_gc_check(L); return 1; } static int ffi_pairs(lua_State *L, MMS mm) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkcdata(L, 1)->ctypeid; CType *ct = ctype_raw(cts, id); cTValue *tv; if (ctype_isptr(ct->info)) id = ctype_cid(ct->info); tv = lj_ctype_meta(cts, id, mm); if (!tv) lj_err_callerv(L, LJ_ERR_FFI_BADMM, strdata(lj_ctype_repr(L, id, NULL)), strdata(mmname_str(G(L), mm))); return lj_meta_tailcall(L, tv); } LJLIB_CF(ffi_meta___pairs) { return ffi_pairs(L, MM_pairs); } LJLIB_CF(ffi_meta___ipairs) { return ffi_pairs(L, MM_ipairs); } LJLIB_PUSH("ffi") LJLIB_SET(__metatable) #include "lj_libdef.h" /* -- C library metamethods ----------------------------------------------- */ #define LJLIB_MODULE_ffi_clib /* Index C library by a name. */ static TValue *ffi_clib_index(lua_State *L) { TValue *o = L->base; CLibrary *cl; if (!(o < L->top && tvisudata(o) && udataV(o)->udtype == UDTYPE_FFI_CLIB)) lj_err_argt(L, 1, LUA_TUSERDATA); cl = (CLibrary *)uddata(udataV(o)); if (!(o+1 < L->top && tvisstr(o+1))) lj_err_argt(L, 2, LUA_TSTRING); return lj_clib_index(L, cl, strV(o+1)); } LJLIB_CF(ffi_clib___index) LJLIB_REC(clib_index 1) { TValue *tv = ffi_clib_index(L); if (tviscdata(tv)) { CTState *cts = ctype_cts(L); GCcdata *cd = cdataV(tv); CType *s = ctype_get(cts, cd->ctypeid); if (ctype_isextern(s->info)) { CTypeID sid = ctype_cid(s->info); void *sp = *(void **)cdataptr(cd); CType *ct = ctype_raw(cts, sid); if (lj_cconv_tv_ct(cts, ct, sid, L->top-1, sp)) lj_gc_check(L); return 1; } } copyTV(L, L->top-1, tv); return 1; } LJLIB_CF(ffi_clib___newindex) LJLIB_REC(clib_index 0) { TValue *tv = ffi_clib_index(L); TValue *o = L->base+2; if (o < L->top && tviscdata(tv)) { CTState *cts = ctype_cts(L); GCcdata *cd = cdataV(tv); CType *d = ctype_get(cts, cd->ctypeid); if (ctype_isextern(d->info)) { CTInfo qual = 0; for (;;) { /* Skip attributes and collect qualifiers. */ d = ctype_child(cts, d); if (!ctype_isattrib(d->info)) break; if (ctype_attrib(d->info) == CTA_QUAL) qual |= d->size; } if (!((d->info|qual) & CTF_CONST)) { lj_cconv_ct_tv(cts, d, *(void **)cdataptr(cd), o, 0); return 0; } } } lj_err_caller(L, LJ_ERR_FFI_WRCONST); return 0; /* unreachable */ } LJLIB_CF(ffi_clib___gc) { TValue *o = L->base; if (o < L->top && tvisudata(o) && udataV(o)->udtype == UDTYPE_FFI_CLIB) lj_clib_unload((CLibrary *)uddata(udataV(o))); return 0; } #include "lj_libdef.h" /* -- Callback function metamethods --------------------------------------- */ #define LJLIB_MODULE_ffi_callback static int ffi_callback_set(lua_State *L, GCfunc *fn) { GCcdata *cd = ffi_checkcdata(L, 1); CTState *cts = ctype_cts(L); CType *ct = ctype_raw(cts, cd->ctypeid); if (ctype_isptr(ct->info) && (LJ_32 || ct->size == 8)) { MSize slot = lj_ccallback_ptr2slot(cts, *(void **)cdataptr(cd)); if (slot < cts->cb.sizeid && cts->cb.cbid[slot] != 0) { GCtab *t = cts->miscmap; TValue *tv = lj_tab_setint(L, t, (int32_t)slot); if (fn) { setfuncV(L, tv, fn); lj_gc_anybarriert(L, t); } else { setnilV(tv); cts->cb.cbid[slot] = 0; cts->cb.topid = slot < cts->cb.topid ? slot : cts->cb.topid; } return 0; } } lj_err_caller(L, LJ_ERR_FFI_BADCBACK); return 0; } LJLIB_CF(ffi_callback_free) { return ffi_callback_set(L, NULL); } LJLIB_CF(ffi_callback_set) { GCfunc *fn = lj_lib_checkfunc(L, 2); return ffi_callback_set(L, fn); } LJLIB_PUSH(top-1) LJLIB_SET(__index) #include "lj_libdef.h" /* -- FFI library functions ----------------------------------------------- */ #define LJLIB_MODULE_ffi LJLIB_CF(ffi_cdef) { GCstr *s = lj_lib_checkstr(L, 1); CPState cp; int errcode; cp.L = L; cp.cts = ctype_cts(L); cp.srcname = strdata(s); cp.p = strdata(s); cp.param = L->base+1; cp.mode = CPARSE_MODE_MULTI|CPARSE_MODE_DIRECT; errcode = lj_cparse(&cp); if (errcode) lj_err_throw(L, errcode); /* Propagate errors. */ lj_gc_check(L); return 0; } LJLIB_CF(ffi_new) LJLIB_REC(.) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkctype(L, cts, NULL); CType *ct = ctype_raw(cts, id); CTSize sz; CTInfo info = lj_ctype_info(cts, id, &sz); TValue *o = L->base+1; GCcdata *cd; if ((info & CTF_VLA)) { o++; sz = lj_ctype_vlsize(cts, ct, (CTSize)ffi_checkint(L, 2)); } if (sz == CTSIZE_INVALID) lj_err_arg(L, 1, LJ_ERR_FFI_INVSIZE); if (!(info & CTF_VLA) && ctype_align(info) <= CT_MEMALIGN) cd = lj_cdata_new(cts, id, sz); else cd = lj_cdata_newv(cts, id, sz, ctype_align(info)); setcdataV(L, o-1, cd); /* Anchor the uninitialized cdata. */ lj_cconv_ct_init(cts, ct, sz, cdataptr(cd), o, (MSize)(L->top - o)); /* Initialize cdata. */ if (ctype_isstruct(ct->info)) { /* Handle ctype __gc metamethod. Use the fast lookup here. */ cTValue *tv = lj_tab_getinth(cts->miscmap, -(int32_t)id); if (tv && tvistab(tv) && (tv = lj_meta_fast(L, tabV(tv), MM_gc))) { GCtab *t = cts->finalizer; if (gcref(t->metatable)) { /* Add to finalizer table, if still enabled. */ copyTV(L, lj_tab_set(L, t, o-1), tv); lj_gc_anybarriert(L, t); cd->marked |= LJ_GC_CDATA_FIN; } } } L->top = o; /* Only return the cdata itself. */ lj_gc_check(L); return 1; } LJLIB_CF(ffi_cast) LJLIB_REC(ffi_new) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkctype(L, cts, NULL); CType *d = ctype_raw(cts, id); TValue *o = lj_lib_checkany(L, 2); L->top = o+1; /* Make sure this is the last item on the stack. */ if (!(ctype_isnum(d->info) || ctype_isptr(d->info) || ctype_isenum(d->info))) lj_err_arg(L, 1, LJ_ERR_FFI_INVTYPE); if (!(tviscdata(o) && cdataV(o)->ctypeid == id)) { GCcdata *cd = lj_cdata_new(cts, id, d->size); lj_cconv_ct_tv(cts, d, cdataptr(cd), o, CCF_CAST); setcdataV(L, o, cd); lj_gc_check(L); } return 1; } LJLIB_CF(ffi_typeof) LJLIB_REC(.) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkctype(L, cts, L->base+1); GCcdata *cd = lj_cdata_new(cts, CTID_CTYPEID, 4); *(CTypeID *)cdataptr(cd) = id; setcdataV(L, L->top-1, cd); lj_gc_check(L); return 1; } LJLIB_CF(ffi_istype) LJLIB_REC(.) { CTState *cts = ctype_cts(L); CTypeID id1 = ffi_checkctype(L, cts, NULL); TValue *o = lj_lib_checkany(L, 2); int b = 0; if (tviscdata(o)) { GCcdata *cd = cdataV(o); CTypeID id2 = cd->ctypeid == CTID_CTYPEID ? *(CTypeID *)cdataptr(cd) : cd->ctypeid; CType *ct1 = lj_ctype_rawref(cts, id1); CType *ct2 = lj_ctype_rawref(cts, id2); if (ct1 == ct2) { b = 1; } else if (ctype_type(ct1->info) == ctype_type(ct2->info) && ct1->size == ct2->size) { if (ctype_ispointer(ct1->info)) b = lj_cconv_compatptr(cts, ct1, ct2, CCF_IGNQUAL); else if (ctype_isnum(ct1->info) || ctype_isvoid(ct1->info)) b = (((ct1->info ^ ct2->info) & ~(CTF_QUAL|CTF_LONG)) == 0); } else if (ctype_isstruct(ct1->info) && ctype_isptr(ct2->info) && ct1 == ctype_rawchild(cts, ct2)) { b = 1; } } setboolV(L->top-1, b); setboolV(&G(L)->tmptv2, b); /* Remember for trace recorder. */ return 1; } LJLIB_CF(ffi_sizeof) LJLIB_REC(ffi_xof FF_ffi_sizeof) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkctype(L, cts, NULL); CTSize sz; if (LJ_UNLIKELY(tviscdata(L->base) && cdataisv(cdataV(L->base)))) { sz = cdatavlen(cdataV(L->base)); } else { CType *ct = lj_ctype_rawref(cts, id); if (ctype_isvltype(ct->info)) sz = lj_ctype_vlsize(cts, ct, (CTSize)ffi_checkint(L, 2)); else sz = ctype_hassize(ct->info) ? ct->size : CTSIZE_INVALID; if (LJ_UNLIKELY(sz == CTSIZE_INVALID)) { setnilV(L->top-1); return 1; } } setintV(L->top-1, (int32_t)sz); return 1; } LJLIB_CF(ffi_alignof) LJLIB_REC(ffi_xof FF_ffi_alignof) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkctype(L, cts, NULL); CTSize sz = 0; CTInfo info = lj_ctype_info(cts, id, &sz); setintV(L->top-1, 1 << ctype_align(info)); return 1; } LJLIB_CF(ffi_offsetof) LJLIB_REC(ffi_xof FF_ffi_offsetof) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkctype(L, cts, NULL); GCstr *name = lj_lib_checkstr(L, 2); CType *ct = lj_ctype_rawref(cts, id); CTSize ofs; if (ctype_isstruct(ct->info) && ct->size != CTSIZE_INVALID) { CType *fct = lj_ctype_getfield(cts, ct, name, &ofs); if (fct) { setintV(L->top-1, ofs); if (ctype_isfield(fct->info)) { return 1; } else if (ctype_isbitfield(fct->info)) { setintV(L->top++, ctype_bitpos(fct->info)); setintV(L->top++, ctype_bitbsz(fct->info)); return 3; } } } return 0; } LJLIB_CF(ffi_errno) LJLIB_REC(.) { int err = errno; if (L->top > L->base) errno = ffi_checkint(L, 1); setintV(L->top++, err); return 1; } LJLIB_CF(ffi_string) LJLIB_REC(.) { CTState *cts = ctype_cts(L); TValue *o = lj_lib_checkany(L, 1); const char *p; size_t len; if (o+1 < L->top && !tvisnil(o+1)) { len = (size_t)ffi_checkint(L, 2); lj_cconv_ct_tv(cts, ctype_get(cts, CTID_P_CVOID), (uint8_t *)&p, o, CCF_ARG(1)); } else { lj_cconv_ct_tv(cts, ctype_get(cts, CTID_P_CCHAR), (uint8_t *)&p, o, CCF_ARG(1)); len = strlen(p); } L->top = o+1; /* Make sure this is the last item on the stack. */ setstrV(L, o, lj_str_new(L, p, len)); lj_gc_check(L); return 1; } LJLIB_CF(ffi_copy) LJLIB_REC(.) { void *dp = ffi_checkptr(L, 1, CTID_P_VOID); void *sp = ffi_checkptr(L, 2, CTID_P_CVOID); TValue *o = L->base+1; CTSize len; if (tvisstr(o) && o+1 >= L->top) len = strV(o)->len+1; /* Copy Lua string including trailing '\0'. */ else len = (CTSize)ffi_checkint(L, 3); memcpy(dp, sp, len); return 0; } LJLIB_CF(ffi_fill) LJLIB_REC(.) { void *dp = ffi_checkptr(L, 1, CTID_P_VOID); CTSize len = (CTSize)ffi_checkint(L, 2); int32_t fill = 0; if (L->base+2 < L->top && !tvisnil(L->base+2)) fill = ffi_checkint(L, 3); memset(dp, fill, len); return 0; } #define H_(le, be) LJ_ENDIAN_SELECT(0x##le, 0x##be) /* Test ABI string. */ LJLIB_CF(ffi_abi) LJLIB_REC(.) { GCstr *s = lj_lib_checkstr(L, 1); int b = 0; switch (s->hash) { #if LJ_64 case H_(849858eb,ad35fd06): b = 1; break; /* 64bit */ #else case H_(662d3c79,d0e22477): b = 1; break; /* 32bit */ #endif #if LJ_ARCH_HASFPU case H_(e33ee463,e33ee463): b = 1; break; /* fpu */ #endif #if LJ_ABI_SOFTFP case H_(61211a23,c2e8c81c): b = 1; break; /* softfp */ #else case H_(539417a8,8ce0812f): b = 1; break; /* hardfp */ #endif #if LJ_ABI_EABI case H_(2182df8f,f2ed1152): b = 1; break; /* eabi */ #endif #if LJ_ABI_WIN case H_(4ab624a8,4ab624a8): b = 1; break; /* win */ #endif case H_(3af93066,1f001464): b = 1; break; /* le/be */ default: break; } setboolV(L->top-1, b); setboolV(&G(L)->tmptv2, b); /* Remember for trace recorder. */ return 1; } #undef H_ LJLIB_PUSH(top-8) LJLIB_SET(!) /* Store reference to miscmap table. */ LJLIB_CF(ffi_metatype) { CTState *cts = ctype_cts(L); CTypeID id = ffi_checkctype(L, cts, NULL); GCtab *mt = lj_lib_checktab(L, 2); GCtab *t = cts->miscmap; CType *ct = ctype_get(cts, id); /* Only allow raw types. */ TValue *tv; GCcdata *cd; if (!(ctype_isstruct(ct->info) || ctype_iscomplex(ct->info) || ctype_isvector(ct->info))) lj_err_arg(L, 1, LJ_ERR_FFI_INVTYPE); tv = lj_tab_setinth(L, t, -(int32_t)id); if (!tvisnil(tv)) lj_err_caller(L, LJ_ERR_PROTMT); settabV(L, tv, mt); lj_gc_anybarriert(L, t); cd = lj_cdata_new(cts, CTID_CTYPEID, 4); *(CTypeID *)cdataptr(cd) = id; setcdataV(L, L->top-1, cd); lj_gc_check(L); return 1; } LJLIB_PUSH(top-7) LJLIB_SET(!) /* Store reference to finalizer table. */ LJLIB_CF(ffi_gc) LJLIB_REC(.) { GCcdata *cd = ffi_checkcdata(L, 1); TValue *fin = lj_lib_checkany(L, 2); CTState *cts = ctype_cts(L); GCtab *t = cts->finalizer; CType *ct = ctype_raw(cts, cd->ctypeid); if (!(ctype_isptr(ct->info) || ctype_isstruct(ct->info) || ctype_isrefarray(ct->info))) lj_err_arg(L, 1, LJ_ERR_FFI_INVTYPE); if (gcref(t->metatable)) { /* Update finalizer table, if still enabled. */ copyTV(L, lj_tab_set(L, t, L->base), fin); lj_gc_anybarriert(L, t); if (!tvisnil(fin)) cd->marked |= LJ_GC_CDATA_FIN; else cd->marked &= ~LJ_GC_CDATA_FIN; } L->top = L->base+1; /* Pass through the cdata object. */ return 1; } LJLIB_PUSH(top-5) LJLIB_SET(!) /* Store clib metatable in func environment. */ LJLIB_CF(ffi_load) { GCstr *name = lj_lib_checkstr(L, 1); int global = (L->base+1 < L->top && tvistruecond(L->base+1)); lj_clib_load(L, tabref(curr_func(L)->c.env), name, global); return 1; } LJLIB_PUSH(top-4) LJLIB_SET(C) LJLIB_PUSH(top-3) LJLIB_SET(os) LJLIB_PUSH(top-2) LJLIB_SET(arch) #include "lj_libdef.h" /* ------------------------------------------------------------------------ */ /* Create special weak-keyed finalizer table. */ static GCtab *ffi_finalizer(lua_State *L) { /* NOBARRIER: The table is new (marked white). */ GCtab *t = lj_tab_new(L, 0, 1); settabV(L, L->top++, t); setgcref(t->metatable, obj2gco(t)); setstrV(L, lj_tab_setstr(L, t, lj_str_newlit(L, "__mode")), lj_str_newlit(L, "K")); t->nomm = (uint8_t)(~(1u<top-1); lj_gc_anybarriert(L, t); } } LUALIB_API int luaopen_ffi(lua_State *L) { CTState *cts = lj_ctype_init(L); settabV(L, L->top++, (cts->miscmap = lj_tab_new(L, 0, 1))); cts->finalizer = ffi_finalizer(L); LJ_LIB_REG(L, NULL, ffi_meta); /* NOBARRIER: basemt is a GC root. */ setgcref(basemt_it(G(L), LJ_TCDATA), obj2gco(tabV(L->top-1))); LJ_LIB_REG(L, NULL, ffi_clib); LJ_LIB_REG(L, NULL, ffi_callback); /* NOBARRIER: the key is new and lj_tab_newkey() handles the barrier. */ settabV(L, lj_tab_setstr(L, cts->miscmap, &cts->g->strempty), tabV(L->top-1)); L->top--; lj_clib_default(L, tabV(L->top-1)); /* Create ffi.C default namespace. */ lua_pushliteral(L, LJ_OS_NAME); lua_pushliteral(L, LJ_ARCH_NAME); LJ_LIB_REG(L, NULL, ffi); /* Note: no global "ffi" created! */ ffi_register_module(L); return 1; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_err.c0000664000000000000000000005575112202141143022014 0ustar rootroot/* ** Error handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_err_c #define LUA_CORE #include "lj_obj.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_str.h" #include "lj_func.h" #include "lj_state.h" #include "lj_frame.h" #include "lj_ff.h" #include "lj_trace.h" #include "lj_vm.h" /* ** LuaJIT can either use internal or external frame unwinding: ** ** - Internal frame unwinding (INT) is free-standing and doesn't require ** any OS or library support. ** ** - External frame unwinding (EXT) uses the system-provided unwind handler. ** ** Pros and Cons: ** ** - EXT requires unwind tables for *all* functions on the C stack between ** the pcall/catch and the error/throw. This is the default on x64, ** but needs to be manually enabled on x86/PPC for non-C++ code. ** ** - INT is faster when actually throwing errors (but this happens rarely). ** Setting up error handlers is zero-cost in any case. ** ** - EXT provides full interoperability with C++ exceptions. You can throw ** Lua errors or C++ exceptions through a mix of Lua frames and C++ frames. ** C++ destructors are called as needed. C++ exceptions caught by pcall ** are converted to the string "C++ exception". Lua errors can be caught ** with catch (...) in C++. ** ** - INT has only limited support for automatically catching C++ exceptions ** on POSIX systems using DWARF2 stack unwinding. Other systems may use ** the wrapper function feature. Lua errors thrown through C++ frames ** cannot be caught by C++ code and C++ destructors are not run. ** ** EXT is the default on x64 systems, INT is the default on all other systems. ** ** EXT can be manually enabled on POSIX systems using GCC and DWARF2 stack ** unwinding with -DLUAJIT_UNWIND_EXTERNAL. *All* C code must be compiled ** with -funwind-tables (or -fexceptions). This includes LuaJIT itself (set ** TARGET_CFLAGS), all of your C/Lua binding code, all loadable C modules ** and all C libraries that have callbacks which may be used to call back ** into Lua. C++ code must *not* be compiled with -fno-exceptions. ** ** EXT cannot be enabled on WIN32 since system exceptions use code-driven SEH. ** EXT is mandatory on WIN64 since the calling convention has an abundance ** of callee-saved registers (rbx, rbp, rsi, rdi, r12-r15, xmm6-xmm15). ** EXT is mandatory on POSIX/x64 since the interpreter doesn't save r12/r13. */ #if defined(__GNUC__) && (LJ_TARGET_X64 || defined(LUAJIT_UNWIND_EXTERNAL)) #define LJ_UNWIND_EXT 1 #elif LJ_TARGET_X64 && LJ_TARGET_WINDOWS #define LJ_UNWIND_EXT 1 #endif /* -- Error messages ------------------------------------------------------ */ /* Error message strings. */ LJ_DATADEF const char *lj_err_allmsg = #define ERRDEF(name, msg) msg "\0" #include "lj_errmsg.h" ; /* -- Internal frame unwinding -------------------------------------------- */ /* Unwind Lua stack and move error message to new top. */ LJ_NOINLINE static void unwindstack(lua_State *L, TValue *top) { lj_func_closeuv(L, top); if (top < L->top-1) { copyTV(L, top, L->top-1); L->top = top+1; } lj_state_relimitstack(L); } /* Unwind until stop frame. Optionally cleanup frames. */ static void *err_unwind(lua_State *L, void *stopcf, int errcode) { TValue *frame = L->base-1; void *cf = L->cframe; while (cf) { int32_t nres = cframe_nres(cframe_raw(cf)); if (nres < 0) { /* C frame without Lua frame? */ TValue *top = restorestack(L, -nres); if (frame < top) { /* Frame reached? */ if (errcode) { L->cframe = cframe_prev(cf); L->base = frame+1; unwindstack(L, top); } return cf; } } if (frame <= tvref(L->stack)) break; switch (frame_typep(frame)) { case FRAME_LUA: /* Lua frame. */ case FRAME_LUAP: frame = frame_prevl(frame); break; case FRAME_C: /* C frame. */ #if LJ_HASFFI unwind_c: #endif #if LJ_UNWIND_EXT if (errcode) { L->cframe = cframe_prev(cf); L->base = frame_prevd(frame) + 1; unwindstack(L, frame); } else if (cf != stopcf) { cf = cframe_prev(cf); frame = frame_prevd(frame); break; } return NULL; /* Continue unwinding. */ #else UNUSED(stopcf); cf = cframe_prev(cf); frame = frame_prevd(frame); break; #endif case FRAME_CP: /* Protected C frame. */ if (cframe_canyield(cf)) { /* Resume? */ if (errcode) { hook_leave(G(L)); /* Assumes nobody uses coroutines inside hooks. */ L->cframe = NULL; L->status = (uint8_t)errcode; } return cf; } if (errcode) { L->cframe = cframe_prev(cf); L->base = frame_prevd(frame) + 1; unwindstack(L, frame); } return cf; case FRAME_CONT: /* Continuation frame. */ #if LJ_HASFFI if ((frame-1)->u32.lo == LJ_CONT_FFI_CALLBACK) goto unwind_c; #endif case FRAME_VARG: /* Vararg frame. */ frame = frame_prevd(frame); break; case FRAME_PCALL: /* FF pcall() frame. */ case FRAME_PCALLH: /* FF pcall() frame inside hook. */ if (errcode) { if (errcode == LUA_YIELD) { frame = frame_prevd(frame); break; } if (frame_typep(frame) == FRAME_PCALL) hook_leave(G(L)); L->cframe = cf; L->base = frame_prevd(frame) + 1; unwindstack(L, L->base); } return (void *)((intptr_t)cf | CFRAME_UNWIND_FF); } } /* No C frame. */ if (errcode) { L->cframe = NULL; L->base = tvref(L->stack)+1; unwindstack(L, L->base); if (G(L)->panic) G(L)->panic(L); exit(EXIT_FAILURE); } return L; /* Anything non-NULL will do. */ } /* -- External frame unwinding -------------------------------------------- */ #if defined(__GNUC__) && !LJ_NO_UNWIND && !LJ_TARGET_WINDOWS /* ** We have to use our own definitions instead of the mandatory (!) unwind.h, ** since various OS, distros and compilers mess up the header installation. */ typedef struct _Unwind_Exception { uint64_t exclass; void (*excleanup)(int, struct _Unwind_Exception); uintptr_t p1, p2; } __attribute__((__aligned__)) _Unwind_Exception; typedef struct _Unwind_Context _Unwind_Context; #define _URC_OK 0 #define _URC_FATAL_PHASE1_ERROR 3 #define _URC_HANDLER_FOUND 6 #define _URC_INSTALL_CONTEXT 7 #define _URC_CONTINUE_UNWIND 8 #define _URC_FAILURE 9 #if !LJ_TARGET_ARM extern uintptr_t _Unwind_GetCFA(_Unwind_Context *); extern void _Unwind_SetGR(_Unwind_Context *, int, uintptr_t); extern void _Unwind_SetIP(_Unwind_Context *, uintptr_t); extern void _Unwind_DeleteException(_Unwind_Exception *); extern int _Unwind_RaiseException(_Unwind_Exception *); #define _UA_SEARCH_PHASE 1 #define _UA_CLEANUP_PHASE 2 #define _UA_HANDLER_FRAME 4 #define _UA_FORCE_UNWIND 8 #define LJ_UEXCLASS 0x4c55414a49543200ULL /* LUAJIT2\0 */ #define LJ_UEXCLASS_MAKE(c) (LJ_UEXCLASS | (uint64_t)(c)) #define LJ_UEXCLASS_CHECK(cl) (((cl) ^ LJ_UEXCLASS) <= 0xff) #define LJ_UEXCLASS_ERRCODE(cl) ((int)((cl) & 0xff)) /* DWARF2 personality handler referenced from interpreter .eh_frame. */ LJ_FUNCA int lj_err_unwind_dwarf(int version, int actions, uint64_t uexclass, _Unwind_Exception *uex, _Unwind_Context *ctx) { void *cf; lua_State *L; if (version != 1) return _URC_FATAL_PHASE1_ERROR; UNUSED(uexclass); cf = (void *)_Unwind_GetCFA(ctx); L = cframe_L(cf); if ((actions & _UA_SEARCH_PHASE)) { #if LJ_UNWIND_EXT if (err_unwind(L, cf, 0) == NULL) return _URC_CONTINUE_UNWIND; #endif if (!LJ_UEXCLASS_CHECK(uexclass)) { setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); } return _URC_HANDLER_FOUND; } if ((actions & _UA_CLEANUP_PHASE)) { int errcode; if (LJ_UEXCLASS_CHECK(uexclass)) { errcode = LJ_UEXCLASS_ERRCODE(uexclass); } else { if ((actions & _UA_HANDLER_FRAME)) _Unwind_DeleteException(uex); errcode = LUA_ERRRUN; } #if LJ_UNWIND_EXT cf = err_unwind(L, cf, errcode); if ((actions & _UA_FORCE_UNWIND)) { return _URC_CONTINUE_UNWIND; } else if (cf) { _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode); _Unwind_SetIP(ctx, (uintptr_t)(cframe_unwind_ff(cf) ? lj_vm_unwind_ff_eh : lj_vm_unwind_c_eh)); return _URC_INSTALL_CONTEXT; } #if LJ_TARGET_X86ORX64 else if ((actions & _UA_HANDLER_FRAME)) { /* Workaround for ancient libgcc bug. Still present in RHEL 5.5. :-/ ** Real fix: http://gcc.gnu.org/viewcvs/trunk/gcc/unwind-dw2.c?r1=121165&r2=124837&pathrev=153877&diff_format=h */ _Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode); _Unwind_SetIP(ctx, (uintptr_t)lj_vm_unwind_rethrow); return _URC_INSTALL_CONTEXT; } #endif #else /* This is not the proper way to escape from the unwinder. We get away with ** it on non-x64 because the interpreter restores all callee-saved regs. */ lj_err_throw(L, errcode); #endif } return _URC_CONTINUE_UNWIND; } #if LJ_UNWIND_EXT #if LJ_TARGET_OSX || defined(__OpenBSD__) /* Sorry, no thread safety for OSX. Complain to Apple, not me. */ static _Unwind_Exception static_uex; #else static __thread _Unwind_Exception static_uex; #endif /* Raise DWARF2 exception. */ static void err_raise_ext(int errcode) { static_uex.exclass = LJ_UEXCLASS_MAKE(errcode); static_uex.excleanup = NULL; _Unwind_RaiseException(&static_uex); } #endif #else extern void _Unwind_DeleteException(void *); extern int __gnu_unwind_frame (void *, _Unwind_Context *); extern int _Unwind_VRS_Set(_Unwind_Context *, int, uint32_t, int, void *); extern int _Unwind_VRS_Get(_Unwind_Context *, int, uint32_t, int, void *); static inline uint32_t _Unwind_GetGR(_Unwind_Context *ctx, int r) { uint32_t v; _Unwind_VRS_Get(ctx, 0, r, 0, &v); return v; } static inline void _Unwind_SetGR(_Unwind_Context *ctx, int r, uint32_t v) { _Unwind_VRS_Set(ctx, 0, r, 0, &v); } #define _US_VIRTUAL_UNWIND_FRAME 0 #define _US_UNWIND_FRAME_STARTING 1 #define _US_ACTION_MASK 3 #define _US_FORCE_UNWIND 8 /* ARM unwinder personality handler referenced from interpreter .ARM.extab. */ LJ_FUNCA int lj_err_unwind_arm(int state, void *ucb, _Unwind_Context *ctx) { void *cf = (void *)_Unwind_GetGR(ctx, 13); lua_State *L = cframe_L(cf); if ((state & _US_ACTION_MASK) == _US_VIRTUAL_UNWIND_FRAME) { setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); return _URC_HANDLER_FOUND; } if ((state&(_US_ACTION_MASK|_US_FORCE_UNWIND)) == _US_UNWIND_FRAME_STARTING) { _Unwind_DeleteException(ucb); _Unwind_SetGR(ctx, 15, (uint32_t)(void *)lj_err_throw); _Unwind_SetGR(ctx, 0, (uint32_t)L); _Unwind_SetGR(ctx, 1, (uint32_t)LUA_ERRRUN); return _URC_INSTALL_CONTEXT; } if (__gnu_unwind_frame(ucb, ctx) != _URC_OK) return _URC_FAILURE; return _URC_CONTINUE_UNWIND; } #endif #elif LJ_TARGET_X64 && LJ_TARGET_WINDOWS /* ** Someone in Redmond owes me several days of my life. A lot of this is ** undocumented or just plain wrong on MSDN. Some of it can be gathered ** from 3rd party docs or must be found by trial-and-error. They really ** don't want you to write your own language-specific exception handler ** or to interact gracefully with MSVC. :-( ** ** Apparently MSVC doesn't call C++ destructors for foreign exceptions ** unless you compile your C++ code with /EHa. Unfortunately this means ** catch (...) also catches things like access violations. The use of ** _set_se_translator doesn't really help, because it requires /EHa, too. */ #define WIN32_LEAN_AND_MEAN #include /* Taken from: http://www.nynaeve.net/?p=99 */ typedef struct UndocumentedDispatcherContext { ULONG64 ControlPc; ULONG64 ImageBase; PRUNTIME_FUNCTION FunctionEntry; ULONG64 EstablisherFrame; ULONG64 TargetIp; PCONTEXT ContextRecord; PEXCEPTION_ROUTINE LanguageHandler; PVOID HandlerData; PUNWIND_HISTORY_TABLE HistoryTable; ULONG ScopeIndex; ULONG Fill0; } UndocumentedDispatcherContext; /* Another wild guess. */ extern void __DestructExceptionObject(EXCEPTION_RECORD *rec, int nothrow); #ifdef MINGW_SDK_INIT /* Workaround for broken MinGW64 declaration. */ VOID RtlUnwindEx_FIXED(PVOID,PVOID,PVOID,PVOID,PVOID,PVOID) asm("RtlUnwindEx"); #define RtlUnwindEx RtlUnwindEx_FIXED #endif #define LJ_MSVC_EXCODE ((DWORD)0xe06d7363) #define LJ_GCC_EXCODE ((DWORD)0x20474343) #define LJ_EXCODE ((DWORD)0xe24c4a00) #define LJ_EXCODE_MAKE(c) (LJ_EXCODE | (DWORD)(c)) #define LJ_EXCODE_CHECK(cl) (((cl) ^ LJ_EXCODE) <= 0xff) #define LJ_EXCODE_ERRCODE(cl) ((int)((cl) & 0xff)) /* Win64 exception handler for interpreter frame. */ LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win64(EXCEPTION_RECORD *rec, void *cf, CONTEXT *ctx, UndocumentedDispatcherContext *dispatch) { lua_State *L = cframe_L(cf); int errcode = LJ_EXCODE_CHECK(rec->ExceptionCode) ? LJ_EXCODE_ERRCODE(rec->ExceptionCode) : LUA_ERRRUN; if ((rec->ExceptionFlags & 6)) { /* EH_UNWINDING|EH_EXIT_UNWIND */ /* Unwind internal frames. */ err_unwind(L, cf, errcode); } else { void *cf2 = err_unwind(L, cf, 0); if (cf2) { /* We catch it, so start unwinding the upper frames. */ if (rec->ExceptionCode == LJ_MSVC_EXCODE || rec->ExceptionCode == LJ_GCC_EXCODE) { __DestructExceptionObject(rec, 1); setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); } else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) { /* Don't catch access violations etc. */ return ExceptionContinueSearch; } /* Unwind the stack and call all handlers for all lower C frames ** (including ourselves) again with EH_UNWINDING set. Then set ** rsp = cf, rax = errcode and jump to the specified target. */ RtlUnwindEx(cf, (void *)((cframe_unwind_ff(cf2) && errcode != LUA_YIELD) ? lj_vm_unwind_ff_eh : lj_vm_unwind_c_eh), rec, (void *)(uintptr_t)errcode, ctx, dispatch->HistoryTable); /* RtlUnwindEx should never return. */ } } return ExceptionContinueSearch; } /* Raise Windows exception. */ static void err_raise_ext(int errcode) { RaiseException(LJ_EXCODE_MAKE(errcode), 1 /* EH_NONCONTINUABLE */, 0, NULL); } #endif /* -- Error handling ------------------------------------------------------ */ /* Throw error. Find catch frame, unwind stack and continue. */ LJ_NOINLINE void LJ_FASTCALL lj_err_throw(lua_State *L, int errcode) { global_State *g = G(L); lj_trace_abort(g); setgcrefnull(g->jit_L); L->status = 0; #if LJ_UNWIND_EXT err_raise_ext(errcode); /* ** A return from this function signals a corrupt C stack that cannot be ** unwound. We have no choice but to call the panic function and exit. ** ** Usually this is caused by a C function without unwind information. ** This should never happen on x64, but may happen if you've manually ** enabled LUAJIT_UNWIND_EXTERNAL and forgot to recompile *every* ** non-C++ file with -funwind-tables. */ if (G(L)->panic) G(L)->panic(L); #else { void *cf = err_unwind(L, NULL, errcode); if (cframe_unwind_ff(cf)) lj_vm_unwind_ff(cframe_raw(cf)); else lj_vm_unwind_c(cframe_raw(cf), errcode); } #endif exit(EXIT_FAILURE); } /* Return string object for error message. */ LJ_NOINLINE GCstr *lj_err_str(lua_State *L, ErrMsg em) { return lj_str_newz(L, err2msg(em)); } /* Out-of-memory error. */ LJ_NOINLINE void lj_err_mem(lua_State *L) { if (L->status == LUA_ERRERR+1) /* Don't touch the stack during lua_open. */ lj_vm_unwind_c(L->cframe, LUA_ERRMEM); setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRMEM)); lj_err_throw(L, LUA_ERRMEM); } /* Find error function for runtime errors. Requires an extra stack traversal. */ static ptrdiff_t finderrfunc(lua_State *L) { cTValue *frame = L->base-1, *bot = tvref(L->stack); void *cf = L->cframe; while (frame > bot) { lua_assert(cf != NULL); while (cframe_nres(cframe_raw(cf)) < 0) { /* cframe without frame? */ if (frame >= restorestack(L, -cframe_nres(cf))) break; if (cframe_errfunc(cf) >= 0) /* Error handler not inherited (-1)? */ return cframe_errfunc(cf); cf = cframe_prev(cf); /* Else unwind cframe and continue searching. */ if (cf == NULL) return 0; } switch (frame_typep(frame)) { case FRAME_LUA: case FRAME_LUAP: frame = frame_prevl(frame); break; case FRAME_C: cf = cframe_prev(cf); /* fallthrough */ case FRAME_CONT: #if LJ_HASFFI if ((frame-1)->u32.lo == LJ_CONT_FFI_CALLBACK) cf = cframe_prev(cf); #endif case FRAME_VARG: frame = frame_prevd(frame); break; case FRAME_CP: if (cframe_canyield(cf)) return 0; if (cframe_errfunc(cf) >= 0) return cframe_errfunc(cf); frame = frame_prevd(frame); break; case FRAME_PCALL: case FRAME_PCALLH: if (frame_ftsz(frame) >= (ptrdiff_t)(2*sizeof(TValue))) /* xpcall? */ return savestack(L, frame-1); /* Point to xpcall's errorfunc. */ return 0; default: lua_assert(0); return 0; } } return 0; } /* Runtime error. */ LJ_NOINLINE void lj_err_run(lua_State *L) { ptrdiff_t ef = finderrfunc(L); if (ef) { TValue *errfunc = restorestack(L, ef); TValue *top = L->top; lj_trace_abort(G(L)); if (!tvisfunc(errfunc) || L->status == LUA_ERRERR) { setstrV(L, top-1, lj_err_str(L, LJ_ERR_ERRERR)); lj_err_throw(L, LUA_ERRERR); } L->status = LUA_ERRERR; copyTV(L, top, top-1); copyTV(L, top-1, errfunc); L->top = top+1; lj_vm_call(L, top, 1+1); /* Stack: |errfunc|msg| -> |msg| */ } lj_err_throw(L, LUA_ERRRUN); } /* Formatted runtime error message. */ LJ_NORET LJ_NOINLINE static void err_msgv(lua_State *L, ErrMsg em, ...) { const char *msg; va_list argp; va_start(argp, em); if (curr_funcisL(L)) L->top = curr_topL(L); msg = lj_str_pushvf(L, err2msg(em), argp); va_end(argp); lj_debug_addloc(L, msg, L->base-1, NULL); lj_err_run(L); } /* Non-vararg variant for better calling conventions. */ LJ_NOINLINE void lj_err_msg(lua_State *L, ErrMsg em) { err_msgv(L, em); } /* Lexer error. */ LJ_NOINLINE void lj_err_lex(lua_State *L, GCstr *src, const char *tok, BCLine line, ErrMsg em, va_list argp) { char buff[LUA_IDSIZE]; const char *msg; lj_debug_shortname(buff, src); msg = lj_str_pushvf(L, err2msg(em), argp); msg = lj_str_pushf(L, "%s:%d: %s", buff, line, msg); if (tok) lj_str_pushf(L, err2msg(LJ_ERR_XNEAR), msg, tok); lj_err_throw(L, LUA_ERRSYNTAX); } /* Typecheck error for operands. */ LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm) { const char *tname = lj_typename(o); const char *opname = err2msg(opm); if (curr_funcisL(L)) { GCproto *pt = curr_proto(L); const BCIns *pc = cframe_Lpc(L) - 1; const char *oname = NULL; const char *kind = lj_debug_slotname(pt, pc, (BCReg)(o-L->base), &oname); if (kind) err_msgv(L, LJ_ERR_BADOPRT, opname, kind, oname, tname); } err_msgv(L, LJ_ERR_BADOPRV, opname, tname); } /* Typecheck error for ordered comparisons. */ LJ_NOINLINE void lj_err_comp(lua_State *L, cTValue *o1, cTValue *o2) { const char *t1 = lj_typename(o1); const char *t2 = lj_typename(o2); err_msgv(L, t1 == t2 ? LJ_ERR_BADCMPV : LJ_ERR_BADCMPT, t1, t2); /* This assumes the two "boolean" entries are commoned by the C compiler. */ } /* Typecheck error for __call. */ LJ_NOINLINE void lj_err_optype_call(lua_State *L, TValue *o) { /* Gross hack if lua_[p]call or pcall/xpcall fail for a non-callable object: ** L->base still points to the caller. So add a dummy frame with L instead ** of a function. See lua_getstack(). */ const BCIns *pc = cframe_Lpc(L); if (((ptrdiff_t)pc & FRAME_TYPE) != FRAME_LUA) { const char *tname = lj_typename(o); setframe_pc(o, pc); setframe_gc(o, obj2gco(L)); L->top = L->base = o+1; err_msgv(L, LJ_ERR_BADCALL, tname); } lj_err_optype(L, o, LJ_ERR_OPCALL); } /* Error in context of caller. */ LJ_NOINLINE void lj_err_callermsg(lua_State *L, const char *msg) { TValue *frame = L->base-1; TValue *pframe = NULL; if (frame_islua(frame)) { pframe = frame_prevl(frame); } else if (frame_iscont(frame)) { #if LJ_HASFFI if ((frame-1)->u32.lo == LJ_CONT_FFI_CALLBACK) { pframe = frame; frame = NULL; } else #endif { pframe = frame_prevd(frame); #if LJ_HASFFI /* Remove frame for FFI metamethods. */ if (frame_func(frame)->c.ffid >= FF_ffi_meta___index && frame_func(frame)->c.ffid <= FF_ffi_meta___tostring) { L->base = pframe+1; L->top = frame; setcframe_pc(cframe_raw(L->cframe), frame_contpc(frame)); } #endif } } lj_debug_addloc(L, msg, pframe, frame); lj_err_run(L); } /* Formatted error in context of caller. */ LJ_NOINLINE void lj_err_callerv(lua_State *L, ErrMsg em, ...) { const char *msg; va_list argp; va_start(argp, em); msg = lj_str_pushvf(L, err2msg(em), argp); va_end(argp); lj_err_callermsg(L, msg); } /* Error in context of caller. */ LJ_NOINLINE void lj_err_caller(lua_State *L, ErrMsg em) { lj_err_callermsg(L, err2msg(em)); } /* Argument error message. */ LJ_NORET LJ_NOINLINE static void err_argmsg(lua_State *L, int narg, const char *msg) { const char *fname = "?"; const char *ftype = lj_debug_funcname(L, L->base - 1, &fname); if (narg < 0 && narg > LUA_REGISTRYINDEX) narg = (int)(L->top - L->base) + narg + 1; if (ftype && ftype[3] == 'h' && --narg == 0) /* Check for "method". */ msg = lj_str_pushf(L, err2msg(LJ_ERR_BADSELF), fname, msg); else msg = lj_str_pushf(L, err2msg(LJ_ERR_BADARG), narg, fname, msg); lj_err_callermsg(L, msg); } /* Formatted argument error. */ LJ_NOINLINE void lj_err_argv(lua_State *L, int narg, ErrMsg em, ...) { const char *msg; va_list argp; va_start(argp, em); msg = lj_str_pushvf(L, err2msg(em), argp); va_end(argp); err_argmsg(L, narg, msg); } /* Argument error. */ LJ_NOINLINE void lj_err_arg(lua_State *L, int narg, ErrMsg em) { err_argmsg(L, narg, err2msg(em)); } /* Typecheck error for arguments. */ LJ_NOINLINE void lj_err_argtype(lua_State *L, int narg, const char *xname) { TValue *o = narg < 0 ? L->top + narg : L->base + narg-1; const char *tname = o < L->top ? lj_typename(o) : lj_obj_typename[0]; const char *msg = lj_str_pushf(L, err2msg(LJ_ERR_BADTYPE), xname, tname); err_argmsg(L, narg, msg); } /* Typecheck error for arguments. */ LJ_NOINLINE void lj_err_argt(lua_State *L, int narg, int tt) { lj_err_argtype(L, narg, lj_obj_typename[tt+1]); } /* -- Public error handling API ------------------------------------------- */ LUA_API lua_CFunction lua_atpanic(lua_State *L, lua_CFunction panicf) { lua_CFunction old = G(L)->panic; G(L)->panic = panicf; return old; } /* Forwarders for the public API (C calling convention and no LJ_NORET). */ LUA_API int lua_error(lua_State *L) { lj_err_run(L); return 0; /* unreachable */ } LUALIB_API int luaL_argerror(lua_State *L, int narg, const char *msg) { err_argmsg(L, narg, msg); return 0; /* unreachable */ } LUALIB_API int luaL_typerror(lua_State *L, int narg, const char *xname) { lj_err_argtype(L, narg, xname); return 0; /* unreachable */ } LUALIB_API void luaL_where(lua_State *L, int level) { int size; cTValue *frame = lj_debug_frame(L, level, &size); lj_debug_addloc(L, "", frame, size ? frame+size : NULL); } LUALIB_API int luaL_error(lua_State *L, const char *fmt, ...) { const char *msg; va_list argp; va_start(argp, fmt); msg = lj_str_pushvf(L, fmt, argp); va_end(argp); lj_err_callermsg(L, msg); return 0; /* unreachable */ } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cparse.o0000664000000000000000000010660012213333062022510 0ustar rootrootELF> S@@ UHHW  t u 9tHHW GX]UHWv&uHGt $]UHGGPHHfD G4G,G8G0HGHG ]HG  t tHHHO H t u 9tHHG GXHW HHW \u UH]UH ~-~HcH8HcuH8H8]UHAVAUATSHHHHLPLXt&)`)p)U)])e)m)u)}AՅ=t uV{0u#{4u$HpHC($C0S0B;C4vHH HK(C0Ls( HILc8DžDž0HEH H0H(McH5LHLMt!H5HƑLHLKX~H¾LHLLc8DžDž0HEH H0H(McH5LHLUHSHHsHy H߸UHUHH]LeLmH HW4?v AD$Hw(H8DHC(Dc4S0D,S0H]LeLmËcvUHHjHHH1QfAA WHHHr fq fB PUHSHHCH[]UHH]LeLmLuH HHWHR@H t;rrAIIEeEuD$pcS,HGc,D%=uD!G,AH3DfDHnADfDHCHHfD?DDAUHHfTs,D DHc,H]LeLmLuUHAUATSHHG0D#Ics3S0B;C4v H{ HK(@4C0HS HHS \uHtHxS0B;C4vH+ HK(C0H{(Huu C +u C Cd uH߸EЉCA7 3S0B;C4v H HK(@4C0HS HHS \uHHxS0Hs(H{8HCK`HsH{@HC HC% ADDA|$D$HHS HHS \BH 5HS HHS \Hu1 fH߸\'HC 03HHC \u Hƃnn4bbtVa@effKtDt_t rEvtTx1 H߸ p f \ R H>AHct0 AAHS HHS \uHHuAS0B;C4v HGHK(@4C0HcDnHS HHS \uH$HtUFlHS HHS \uHHt%FlHS HHS \uHAS0B;C4v HTHK(@4C0ES0B;C4v H^ HK(@4C0HS HHS \uHW3A9kHS HHS \uH.A"uS0Hs(H{8HCfA[{0t 'HHC(CC A,HS HHS \uH*HS HHS \uH*uOHS HHS \uHs/u'HS HHS \HLt;*t t uH;qL;/gHS HHS \uH  ;u HS HHS \uH|HS HHS \HAHS HHS \uHj&HS HHS \ZH?AHS HHS \uH=^HS HHS \HA1HS HHS \uH= HS HHS \HAHS HHS \uHn=u-HS HHS \zHGA;<HS HHS \LHA WHS HHS \uH=u-HS HHS \HA ;>HS HHS \HA HS HHS \uHb>HS HHS \H7A }HS HHS \uHHSHHcȀx$u% H߸Ht H{8H;Wr HHBHCHBu#HSC HC@HHCA=w9=vB,CC AtH+WHHBfuBC vC nHS HHS \uXHNAFA>A6A.A&AA A A A DcDH[A\A]]ø9wuUH]UH9wt]UHAWAVAUATSH(IIEEAHHLD'WU_ DEt@IW@H EAtD;jrDHHȋM@EE:Eu)ېHHLIG@H0HA9rDHuG%t9w) %t9wHtɃt%=0? LnHHLuX uf}I@HuEDeHUD"HUȋMJHUMfJAE*uND%=uU U=uUE ‰UCt%I@UAEtfAAV,Ut4At tu!AGуA ԉE}3E9E&I@UDAŸME}FEDA9CE8 EIG@H0HA9rDHuG%t9w)%t9wHt%= u L"D%= AHHLt HHLX ufufE%= u LE%=t}u Ln}t"UEHH=v LIEE%D9v AA ċE%A tEDeI@UDAŋUUDH([A\A]A^A_]UHSHHHG@H+0HHxHH H߸UHAVAUATSH HG\G\~ YIuHGH+tLHj-HtLHAF~HtLH[A"!Hgt%LH7A>AAF (H1tUHEt,H\$Aľ)H$LHEfLHj)H*Ht@LHAvH{@t HH9AAF5&Hzt,LHJAv H{@AF*H=tLH)+HtLH)suUHS uBAHCAF* uC AHCAFuQC AC AFHSLu2HCD` HCD` H/=tAE&AF H߸[HEtcHuHAvH{@Iċt$H{@uIċt LH]HA C= t .AvH{@IŁ{ u)0t LH:H{@IH4{t HAEu3A}t,HSH{@AHMLIHt  u?HC@LH+0HHxHSHHLB H߸` uAT$AHA$AFsk\H [A\A]A^]UHAUATSH(HIAxEEA D$?HjtNHuH :HhHuHA<$tEEA$E9ECEAD$덾H t9HuHBA<$u }A$AD$ CHt9HuHA<$t }A$AD$ |HwtHuHEA $^HItHuHEA1$&HtHuHREA!$Ht0HuH$EA9$A$AD$ .Ht0HuHEA9$A$AD$ <HktQHuHA|$ u} uEA9$A$EA9$A$AD$ >H tQHuH@A|$ u} uEA9$A$EA9$A$AD$ )HtQHuHA|$ u} uEA9$A$EA9$A$AD$ HEtQHuH|A|$ u} uEA9$A$EA9$A$AD$ e Ht HuHMA$$7 Ht1 HuHA|$ u MA<$MA,$+Hst0 HuHEA$EA;D$AD$-H2t HuHiEA)$뽾*HtHuHA$EA$뒾/HtnHuHEA;D$vAD$MtA|$ u0A<$uu HA$A$A$A$%H]tnHuH,EA;D$vAD$MtA|$ u0A<$uu HuA$A$tA$A$`H([A\A]]UHATSHIAD$HS@H2tJ9rHuH%t9w*@ %t9wHtɩt H[A\]UHSHHHu0Ey H^H[]UHH]LeLmH HDo`G`8(HADk`)HDH]LeLmUHSHH(u ЅE‹K, ЉC,H[]UHAUATSHHIC-$AL$,AL$,H(H(H=LkHAE=GBth=GBw= X= )tO= M=1ct+=1cw = dd=,\t+=VPLHAL$,t(H_{HSHBz_u HJz_HD8Vu(H0Pr@ vH ҍLJHDwo$! @ 0 && id < cts->toplj_obj.h(((o)->it) < 0xfffeffffu)type parameterid == 0((((info)) >> 28) == CT_VOID)%s%s(((cp->L->top)->it) == (~4u))sz != 0cp->p != ((void *)0)cp->depth == 0||&&==!=<=>=<<>>->cpcparsercp_initcp_tok2strnumberVintctype_childctype_checkcp_decl_multicp_decl_speccp_decl_asmcp_struct_namecp_decl_intern((((cinfo)) >> 28) == CT_STRUCT) || ((((cinfo)) >> 28) == CT_ENUM)(((GCobj *)(uintptr_t)(ct->name).gcptr32))->gch.gct == ~(~4u)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((GCobj *)(uintptr_t)(ct->name).gcptr32) == ((void *)0)GCC: (Debian 4.7.3-4) 4.7.3zRx 'AC b <?AC z \>AC y |\QC F zAC u  AC N)AC EAC $hAC PS @XHC N `AC EQ $aAC TH $M AC I? KC K AC P (oAC M] <@AC E$XmAC K] $AC I  AC C 0AC Ef $YAC PD FAC E| $4 AC I $\AC P  3AC Ck (LAC M: (AC P (AC M (,<AC P' $XAC G{  RAC HE  aAC HT (AC P  AC E  $AC P (@ AC L .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.rodata.str1.8.comment.note.GNU-stack.rela.eh_frame @Cb&C,C12CFE@E @8xM2K8\0Me-Mz0Mhux R Wh; ^ ''?&f>4\>zI bplzv~h@)iX>YaG M 0 "7o %@3mAJ;RR'3`AoS{'  0!Yk!F! n %z 'L)*/78Ea ^5<k;az;; S@    ,:KZjuB  lj_cparse.ccp_newlinecp_istypedeclcp_decl_resetcp_get_bscp_tok2str__PRETTY_FUNCTION__.4414ctoknamescp_errmsgcp_save_growcp_err_tokencp_errcp_addcp_pushcp_push_type__PRETTY_FUNCTION__.4001cp_next__PRETTY_FUNCTION__.3440cp_optcp_checkcp_decl_intern__PRETTY_FUNCTION__.4716cp_err_badidxcp_expr_unarycp_decl_abstractcp_expr_commacp_expr_sizeofcp_expr_subcp_expr_kintcp_expr_ksizecp_decl_sizeattrcp_decl_aligncp_decl_attributes__PRETTY_FUNCTION__.4767cp_struct_name__PRETTY_FUNCTION__.4848cp_decl_constinitcp_decl_structcp_decl_speccp_declarator__PRETTY_FUNCTION__.4935cp_decl_funccp_decl_singlecp_decl_multi__PRETTY_FUNCTION__.4010__PRETTY_FUNCTION__.4997cpcparser__PRETTY_FUNCTION__.4579__PRETTY_FUNCTION__.5014__assert_faillj_char_bitslj_str_pushflj_err_allmsglj_str_pushvflj_err_callermsglj_mem_realloclj_strscan_scanlj_str_newlj_ctype_getnamelj_err_argtypelj_ctype_newlj_ctype_internlj_ctype_reprlj_ctype_rawreflj_ctype_getfieldqlj_ctype_addnamelj_ctype_infolj_cparselj_vm_cpcall    !;: E <S !]=j $t=>?>= -=@(>:?A G ; F;  <4 <pB <C.Di H < <S < < < C < 0' ^, g1;b gE   ; G ; F;   ;f Gp ;u Fz; G ; F;+FG   ;RG G ; F; G  ; F;U _ d i;GHTIGIIEIwIJH 0V G` ;e Fj ; G ; F ;! -# $ $=$ n$ $ $;W& za& f& Hk&;&F&K'F=' zG' L' HQ';' G' ;' F';9( GC( ;H( FM(;(F) G) ;) F*;9*FR* G\* ;a* Ff*;* G* ;* F*;, G, ;, F,;, G, ;, F,;- G - ;- F-;]- Gg- ;l- Fq-;-L22FO2 GY2 ;^2 Fc2;2K3 G3 ;3 F3;73 GA3 ;F3 FK3;4 a4 4 4;M6 GW6 ;\6 Fa6;6 G6 ;6 F6;6G7G07FS7 G]7 ;b7 Fg7;> ;> ;#> (>;<> GF> ;K> FP>;>F> G? ;? F ?;1? S:? ?? D?;s?F?F? G? ;? F?;C@K AA&A 0A 5A :A;A A A A;JBLB @BN: (0i8@HPX`hpxumuum (08@HuP X`hxpx $  ( 0p 8 @HPX`hpx (08@HPX`hpx ( 08@9HPX` hpx!!%%%%%%%%f$!%%%?#### T#(#0#8#@#H#P#XM#`#h1#p#x8#F#    % + . 1 4 7 : = @  C @'`fz@i~Dd>Y"7@\S'  !k!8!`%'')/05\8J;;;@ADBtarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_strscan.h0000664000000000000000000000210012202141143022662 0ustar rootroot/* ** String scanning. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_STRSCAN_H #define _LJ_STRSCAN_H #include "lj_obj.h" /* Options for accepted/returned formats. */ #define STRSCAN_OPT_TOINT 0x01 /* Convert to int32_t, if possible. */ #define STRSCAN_OPT_TONUM 0x02 /* Always convert to double. */ #define STRSCAN_OPT_IMAG 0x04 #define STRSCAN_OPT_LL 0x08 #define STRSCAN_OPT_C 0x10 /* Returned format. */ typedef enum { STRSCAN_ERROR, STRSCAN_NUM, STRSCAN_IMAG, STRSCAN_INT, STRSCAN_U32, STRSCAN_I64, STRSCAN_U64, } StrScanFmt; LJ_FUNC StrScanFmt lj_strscan_scan(const uint8_t *p, TValue *o, uint32_t opt); LJ_FUNC int LJ_FASTCALL lj_strscan_num(GCstr *str, TValue *o); #if LJ_DUALNUM LJ_FUNC int LJ_FASTCALL lj_strscan_number(GCstr *str, TValue *o); #else #define lj_strscan_number(s, o) lj_strscan_num((s), (o)) #endif /* Check for number or convert string to number/int in-place (!). */ static LJ_AINLINE int lj_strscan_numberobj(TValue *o) { return tvisnumber(o) || (tvisstr(o) && lj_strscan_number(strV(o), o)); } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_aux.o0000664000000000000000000002216012213333062022167 0ustar rootrootELF> @@ UHSHHH -H۸HDH5HH5)H5 H=H[]UHH]LeHHLgHL)tHLL#CH]LeUHAVAUATSI~[LwLIĻLAU)ك I9v Iă9ՉLAE)؃AE[A\A]A^]UHH]LeLmH HtHG@HHGID(HC@HHCMt"DHLH߸DH¾H߸HCHPHSA*CTH]LeLmUHH]LeLmH HAAAAE<~$HG@HHGOELDDEuHG@HHGHG@HHGHEHCHPHSA*H]LeLmUHAWAVAUATSHHIA.LIHuLHHMd MM)LLHHHuRHA<$.AE׾HLLHHH!HtH#HMl$A<$.ALH[A\A]A^A_]UHAWAVAUATSHIIIAHH:tHлHH8uLLLLtVLLLHtLLLLLLDLEA޸D)EI?uEKQXhs~I' (3l@M\it(Q)8+c&4@zK[# 7iyZ &lib_aux.cpanicemptybufferadjuststacklua_tolstringstderrfwritefputsfputcfflushlua_pushlstringlua_objlenlua_concatluaL_fileresult__errno_locationstrerrorlua_pushfstringluaL_execresultluaL_findtablelua_pushvaluestrchrlua_rawgetlua_typelua_settoplua_createtablelua_settablelua_removeluaL_openliblua_getfieldlj_err_callervlua_setfieldlua_insertlua_pushcclosureluaL_registerluaL_prepbufferluaL_addlstringluaL_addstringluaL_pushresultluaL_addvaluememcpyluaL_buffinitluaL_gsubstrstrluaL_reflua_gettoplua_rawgetilua_tointegerlua_rawsetiluaL_unreflua_pushintegerluaL_newstatelj_alloc_createlj_alloc_flj_state_newstatelua_newstate - 2: EMT^eov{/   `  e P]j{ !" #h u% &'#(+B)P's $+2,Q 0 (N1e,t-3-. 5  56B7R e6u88568 : 8( <5 =: >M a p 0u  DhI 8Xx8c$Px# Z tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_emit_x86.h0000664000000000000000000002720112202141143022661 0ustar rootroot/* ** x86/x64 instruction emitter. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Emit basic instructions --------------------------------------------- */ #define MODRM(mode, r1, r2) ((MCode)((mode)+(((r1)&7)<<3)+((r2)&7))) #if LJ_64 #define REXRB(p, rr, rb) \ { MCode rex = 0x40 + (((rr)>>1)&4) + (((rb)>>3)&1); \ if (rex != 0x40) *--(p) = rex; } #define FORCE_REX 0x200 #define REX_64 (FORCE_REX|0x080000) #else #define REXRB(p, rr, rb) ((void)0) #define FORCE_REX 0 #define REX_64 0 #endif #define emit_i8(as, i) (*--as->mcp = (MCode)(i)) #define emit_i32(as, i) (*(int32_t *)(as->mcp-4) = (i), as->mcp -= 4) #define emit_u32(as, u) (*(uint32_t *)(as->mcp-4) = (u), as->mcp -= 4) #define emit_x87op(as, xo) \ (*(uint16_t *)(as->mcp-2) = (uint16_t)(xo), as->mcp -= 2) /* op */ static LJ_AINLINE MCode *emit_op(x86Op xo, Reg rr, Reg rb, Reg rx, MCode *p, int delta) { int n = (int8_t)xo; #if defined(__GNUC__) if (__builtin_constant_p(xo) && n == -2) p[delta-2] = (MCode)(xo >> 24); else if (__builtin_constant_p(xo) && n == -3) *(uint16_t *)(p+delta-3) = (uint16_t)(xo >> 16); else #endif *(uint32_t *)(p+delta-5) = (uint32_t)xo; p += n + delta; #if LJ_64 { uint32_t rex = 0x40 + ((rr>>1)&(4+(FORCE_REX>>1)))+((rx>>2)&2)+((rb>>3)&1); if (rex != 0x40) { rex |= (rr >> 16); if (n == -4) { *p = (MCode)rex; rex = (MCode)(xo >> 8); } else if ((xo & 0xffffff) == 0x6600fd) { *p = (MCode)rex; rex = 0x66; } *--p = (MCode)rex; } } #else UNUSED(rr); UNUSED(rb); UNUSED(rx); #endif return p; } /* op + modrm */ #define emit_opm(xo, mode, rr, rb, p, delta) \ (p[(delta)-1] = MODRM((mode), (rr), (rb)), \ emit_op((xo), (rr), (rb), 0, (p), (delta))) /* op + modrm + sib */ #define emit_opmx(xo, mode, scale, rr, rb, rx, p) \ (p[-1] = MODRM((scale), (rx), (rb)), \ p[-2] = MODRM((mode), (rr), RID_ESP), \ emit_op((xo), (rr), (rb), (rx), (p), -1)) /* op r1, r2 */ static void emit_rr(ASMState *as, x86Op xo, Reg r1, Reg r2) { MCode *p = as->mcp; as->mcp = emit_opm(xo, XM_REG, r1, r2, p, 0); } #if LJ_64 && defined(LUA_USE_ASSERT) /* [addr] is sign-extended in x64 and must be in lower 2G (not 4G). */ static int32_t ptr2addr(const void *p) { lua_assert((uintptr_t)p < (uintptr_t)0x80000000); return i32ptr(p); } #else #define ptr2addr(p) (i32ptr((p))) #endif /* op r, [addr] */ static void emit_rma(ASMState *as, x86Op xo, Reg rr, const void *addr) { MCode *p = as->mcp; *(int32_t *)(p-4) = ptr2addr(addr); #if LJ_64 p[-5] = MODRM(XM_SCALE1, RID_ESP, RID_EBP); as->mcp = emit_opm(xo, XM_OFS0, rr, RID_ESP, p, -5); #else as->mcp = emit_opm(xo, XM_OFS0, rr, RID_EBP, p, -4); #endif } /* op r, [base+ofs] */ static void emit_rmro(ASMState *as, x86Op xo, Reg rr, Reg rb, int32_t ofs) { MCode *p = as->mcp; x86Mode mode; if (ra_hasreg(rb)) { if (ofs == 0 && (rb&7) != RID_EBP) { mode = XM_OFS0; } else if (checki8(ofs)) { *--p = (MCode)ofs; mode = XM_OFS8; } else { p -= 4; *(int32_t *)p = ofs; mode = XM_OFS32; } if ((rb&7) == RID_ESP) *--p = MODRM(XM_SCALE1, RID_ESP, RID_ESP); } else { *(int32_t *)(p-4) = ofs; #if LJ_64 p[-5] = MODRM(XM_SCALE1, RID_ESP, RID_EBP); p -= 5; rb = RID_ESP; #else p -= 4; rb = RID_EBP; #endif mode = XM_OFS0; } as->mcp = emit_opm(xo, mode, rr, rb, p, 0); } /* op r, [base+idx*scale+ofs] */ static void emit_rmrxo(ASMState *as, x86Op xo, Reg rr, Reg rb, Reg rx, x86Mode scale, int32_t ofs) { MCode *p = as->mcp; x86Mode mode; if (ofs == 0 && (rb&7) != RID_EBP) { mode = XM_OFS0; } else if (checki8(ofs)) { mode = XM_OFS8; *--p = (MCode)ofs; } else { mode = XM_OFS32; p -= 4; *(int32_t *)p = ofs; } as->mcp = emit_opmx(xo, mode, scale, rr, rb, rx, p); } /* op r, i */ static void emit_gri(ASMState *as, x86Group xg, Reg rb, int32_t i) { MCode *p = as->mcp; x86Op xo; if (checki8(i)) { *--p = (MCode)i; xo = XG_TOXOi8(xg); } else { p -= 4; *(int32_t *)p = i; xo = XG_TOXOi(xg); } as->mcp = emit_opm(xo, XM_REG, (Reg)(xg & 7) | (rb & REX_64), rb, p, 0); } /* op [base+ofs], i */ static void emit_gmroi(ASMState *as, x86Group xg, Reg rb, int32_t ofs, int32_t i) { x86Op xo; if (checki8(i)) { emit_i8(as, i); xo = XG_TOXOi8(xg); } else { emit_i32(as, i); xo = XG_TOXOi(xg); } emit_rmro(as, xo, (Reg)(xg & 7), rb, ofs); } #define emit_shifti(as, xg, r, i) \ (emit_i8(as, (i)), emit_rr(as, XO_SHIFTi, (Reg)(xg), (r))) /* op r, rm/mrm */ static void emit_mrm(ASMState *as, x86Op xo, Reg rr, Reg rb) { MCode *p = as->mcp; x86Mode mode = XM_REG; if (rb == RID_MRM) { rb = as->mrm.base; if (rb == RID_NONE) { rb = RID_EBP; mode = XM_OFS0; p -= 4; *(int32_t *)p = as->mrm.ofs; if (as->mrm.idx != RID_NONE) goto mrmidx; #if LJ_64 *--p = MODRM(XM_SCALE1, RID_ESP, RID_EBP); rb = RID_ESP; #endif } else { if (as->mrm.ofs == 0 && (rb&7) != RID_EBP) { mode = XM_OFS0; } else if (checki8(as->mrm.ofs)) { *--p = (MCode)as->mrm.ofs; mode = XM_OFS8; } else { p -= 4; *(int32_t *)p = as->mrm.ofs; mode = XM_OFS32; } if (as->mrm.idx != RID_NONE) { mrmidx: as->mcp = emit_opmx(xo, mode, as->mrm.scale, rr, rb, as->mrm.idx, p); return; } if ((rb&7) == RID_ESP) *--p = MODRM(XM_SCALE1, RID_ESP, RID_ESP); } } as->mcp = emit_opm(xo, mode, rr, rb, p, 0); } /* op rm/mrm, i */ static void emit_gmrmi(ASMState *as, x86Group xg, Reg rb, int32_t i) { x86Op xo; if (checki8(i)) { emit_i8(as, i); xo = XG_TOXOi8(xg); } else { emit_i32(as, i); xo = XG_TOXOi(xg); } emit_mrm(as, xo, (Reg)(xg & 7) | (rb & REX_64), (rb & ~REX_64)); } /* -- Emit loads/stores --------------------------------------------------- */ /* Instruction selection for XMM moves. */ #define XMM_MOVRR(as) ((as->flags & JIT_F_SPLIT_XMM) ? XO_MOVSD : XO_MOVAPS) #define XMM_MOVRM(as) ((as->flags & JIT_F_SPLIT_XMM) ? XO_MOVLPD : XO_MOVSD) /* mov [base+ofs], i */ static void emit_movmroi(ASMState *as, Reg base, int32_t ofs, int32_t i) { emit_i32(as, i); emit_rmro(as, XO_MOVmi, 0, base, ofs); } /* mov [base+ofs], r */ #define emit_movtomro(as, r, base, ofs) \ emit_rmro(as, XO_MOVto, (r), (base), (ofs)) /* Get/set global_State fields. */ #define emit_opgl(as, xo, r, field) \ emit_rma(as, (xo), (r), (void *)&J2G(as->J)->field) #define emit_getgl(as, r, field) emit_opgl(as, XO_MOV, (r), field) #define emit_setgl(as, r, field) emit_opgl(as, XO_MOVto, (r), field) #define emit_setvmstate(as, i) \ (emit_i32(as, i), emit_opgl(as, XO_MOVmi, 0, vmstate)) /* mov r, i / xor r, r */ static void emit_loadi(ASMState *as, Reg r, int32_t i) { /* XOR r,r is shorter, but modifies the flags. This is bad for HIOP. */ if (i == 0 && !(LJ_32 && (IR(as->curins)->o == IR_HIOP || (as->curins+1 < as->T->nins && IR(as->curins+1)->o == IR_HIOP)))) { emit_rr(as, XO_ARITH(XOg_XOR), r, r); } else { MCode *p = as->mcp; *(int32_t *)(p-4) = i; p[-5] = (MCode)(XI_MOVri+(r&7)); p -= 5; REXRB(p, 0, r); as->mcp = p; } } /* mov r, addr */ #define emit_loada(as, r, addr) \ emit_loadi(as, (r), ptr2addr((addr))) #if LJ_64 /* mov r, imm64 or shorter 32 bit extended load. */ static void emit_loadu64(ASMState *as, Reg r, uint64_t u64) { if (checku32(u64)) { /* 32 bit load clears upper 32 bits. */ emit_loadi(as, r, (int32_t)u64); } else if (checki32((int64_t)u64)) { /* Sign-extended 32 bit load. */ MCode *p = as->mcp; *(int32_t *)(p-4) = (int32_t)u64; as->mcp = emit_opm(XO_MOVmi, XM_REG, REX_64, r, p, -4); } else { /* Full-size 64 bit load. */ MCode *p = as->mcp; *(uint64_t *)(p-8) = u64; p[-9] = (MCode)(XI_MOVri+(r&7)); p[-10] = 0x48 + ((r>>3)&1); p -= 10; as->mcp = p; } } #endif /* movsd r, [&tv->n] / xorps r, r */ static void emit_loadn(ASMState *as, Reg r, cTValue *tv) { if (tvispzero(tv)) /* Use xor only for +0. */ emit_rr(as, XO_XORPS, r, r); else emit_rma(as, XMM_MOVRM(as), r, &tv->n); } /* -- Emit control-flow instructions -------------------------------------- */ /* Label for short jumps. */ typedef MCode *MCLabel; #if LJ_32 && LJ_HASFFI /* jmp short target */ static void emit_sjmp(ASMState *as, MCLabel target) { MCode *p = as->mcp; ptrdiff_t delta = target - p; lua_assert(delta == (int8_t)delta); p[-1] = (MCode)(int8_t)delta; p[-2] = XI_JMPs; as->mcp = p - 2; } #endif /* jcc short target */ static void emit_sjcc(ASMState *as, int cc, MCLabel target) { MCode *p = as->mcp; ptrdiff_t delta = target - p; lua_assert(delta == (int8_t)delta); p[-1] = (MCode)(int8_t)delta; p[-2] = (MCode)(XI_JCCs+(cc&15)); as->mcp = p - 2; } /* jcc short (pending target) */ static MCLabel emit_sjcc_label(ASMState *as, int cc) { MCode *p = as->mcp; p[-1] = 0; p[-2] = (MCode)(XI_JCCs+(cc&15)); as->mcp = p - 2; return p; } /* Fixup jcc short target. */ static void emit_sfixup(ASMState *as, MCLabel source) { source[-1] = (MCode)(as->mcp-source); } /* Return label pointing to current PC. */ #define emit_label(as) ((as)->mcp) /* Compute relative 32 bit offset for jump and call instructions. */ static LJ_AINLINE int32_t jmprel(MCode *p, MCode *target) { ptrdiff_t delta = target - p; lua_assert(delta == (int32_t)delta); return (int32_t)delta; } /* jcc target */ static void emit_jcc(ASMState *as, int cc, MCode *target) { MCode *p = as->mcp; *(int32_t *)(p-4) = jmprel(p, target); p[-5] = (MCode)(XI_JCCn+(cc&15)); p[-6] = 0x0f; as->mcp = p - 6; } /* jmp target */ static void emit_jmp(ASMState *as, MCode *target) { MCode *p = as->mcp; *(int32_t *)(p-4) = jmprel(p, target); p[-5] = XI_JMP; as->mcp = p - 5; } /* call target */ static void emit_call_(ASMState *as, MCode *target) { MCode *p = as->mcp; #if LJ_64 if (target-p != (int32_t)(target-p)) { /* Assumes RID_RET is never an argument to calls and always clobbered. */ emit_rr(as, XO_GROUP5, XOg_CALL, RID_RET); emit_loadu64(as, RID_RET, (uint64_t)target); return; } #endif *(int32_t *)(p-4) = jmprel(p, target); p[-5] = XI_CALL; as->mcp = p - 5; } #define emit_call(as, f) emit_call_(as, (MCode *)(void *)(f)) /* -- Emit generic operations --------------------------------------------- */ /* Use 64 bit operations to handle 64 bit IR types. */ #if LJ_64 #define REX_64IR(ir, r) ((r) + (irt_is64((ir)->t) ? REX_64 : 0)) #else #define REX_64IR(ir, r) (r) #endif /* Generic move between two regs. */ static void emit_movrr(ASMState *as, IRIns *ir, Reg dst, Reg src) { UNUSED(ir); if (dst < RID_MAX_GPR) emit_rr(as, XO_MOV, REX_64IR(ir, dst), src); else emit_rr(as, XMM_MOVRR(as), dst, src); } /* Generic load of register from stack slot. */ static void emit_spload(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { if (r < RID_MAX_GPR) emit_rmro(as, XO_MOV, REX_64IR(ir, r), RID_ESP, ofs); else emit_rmro(as, irt_isnum(ir->t) ? XMM_MOVRM(as) : XO_MOVSS, r, RID_ESP, ofs); } /* Generic store of register to stack slot. */ static void emit_spstore(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { if (r < RID_MAX_GPR) emit_rmro(as, XO_MOVto, REX_64IR(ir, r), RID_ESP, ofs); else emit_rmro(as, irt_isnum(ir->t) ? XO_MOVSDto : XO_MOVSSto, r, RID_ESP, ofs); } /* Add offset to pointer. */ static void emit_addptr(ASMState *as, Reg r, int32_t ofs) { if (ofs) { if ((as->flags & JIT_F_LEA_AGU)) emit_rmro(as, XO_LEA, r, r, ofs); else emit_gri(as, XG_ARITHi(XOg_ADD), r, ofs); } } #define emit_spsub(as, ofs) emit_addptr(as, RID_ESP|REX_64, -(ofs)) /* Prefer rematerialization of BASE/L from global_State over spills. */ #define emit_canremat(ref) ((ref) <= REF_BASE) tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_arch.h0000664000000000000000000002563512202141143022144 0ustar rootroot/* ** Target architecture selection. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_ARCH_H #define _LJ_ARCH_H #include "lua.h" /* Target endianess. */ #define LUAJIT_LE 0 #define LUAJIT_BE 1 /* Target architectures. */ #define LUAJIT_ARCH_X86 1 #define LUAJIT_ARCH_x86 1 #define LUAJIT_ARCH_X64 2 #define LUAJIT_ARCH_x64 2 #define LUAJIT_ARCH_ARM 3 #define LUAJIT_ARCH_arm 3 #define LUAJIT_ARCH_PPC 4 #define LUAJIT_ARCH_ppc 4 #define LUAJIT_ARCH_PPCSPE 5 #define LUAJIT_ARCH_ppcspe 5 #define LUAJIT_ARCH_MIPS 6 #define LUAJIT_ARCH_mips 6 /* Target OS. */ #define LUAJIT_OS_OTHER 0 #define LUAJIT_OS_WINDOWS 1 #define LUAJIT_OS_LINUX 2 #define LUAJIT_OS_OSX 3 #define LUAJIT_OS_BSD 4 #define LUAJIT_OS_POSIX 5 /* Select native target if no target defined. */ #ifndef LUAJIT_TARGET #if defined(__i386) || defined(__i386__) || defined(_M_IX86) #define LUAJIT_TARGET LUAJIT_ARCH_X86 #elif defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64) #define LUAJIT_TARGET LUAJIT_ARCH_X64 #elif defined(__arm__) || defined(__arm) || defined(__ARM__) || defined(__ARM) #define LUAJIT_TARGET LUAJIT_ARCH_ARM #elif defined(__ppc__) || defined(__ppc) || defined(__PPC__) || defined(__PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__POWERPC) || defined(_M_PPC) #ifdef __NO_FPRS__ #define LUAJIT_TARGET LUAJIT_ARCH_PPCSPE #else #define LUAJIT_TARGET LUAJIT_ARCH_PPC #endif #elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(__MIPS) #define LUAJIT_TARGET LUAJIT_ARCH_MIPS #else #error "No support for this architecture (yet)" #endif #endif /* Select native OS if no target OS defined. */ #ifndef LUAJIT_OS #if defined(_WIN32) && !defined(_XBOX_VER) #define LUAJIT_OS LUAJIT_OS_WINDOWS #elif defined(__linux__) #define LUAJIT_OS LUAJIT_OS_LINUX #elif defined(__MACH__) && defined(__APPLE__) #define LUAJIT_OS LUAJIT_OS_OSX #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ defined(__NetBSD__) || defined(__OpenBSD__) #define LUAJIT_OS LUAJIT_OS_BSD #elif (defined(__sun__) && defined(__svr4__)) || defined(__CYGWIN__) #define LUAJIT_OS LUAJIT_OS_POSIX #else #define LUAJIT_OS LUAJIT_OS_OTHER #endif #endif /* Set target OS properties. */ #if LUAJIT_OS == LUAJIT_OS_WINDOWS #define LJ_OS_NAME "Windows" #elif LUAJIT_OS == LUAJIT_OS_LINUX #define LJ_OS_NAME "Linux" #elif LUAJIT_OS == LUAJIT_OS_OSX #define LJ_OS_NAME "OSX" #elif LUAJIT_OS == LUAJIT_OS_BSD #define LJ_OS_NAME "BSD" #elif LUAJIT_OS == LUAJIT_OS_POSIX #define LJ_OS_NAME "POSIX" #else #define LJ_OS_NAME "Other" #endif #define LJ_TARGET_WINDOWS (LUAJIT_OS == LUAJIT_OS_WINDOWS) #define LJ_TARGET_LINUX (LUAJIT_OS == LUAJIT_OS_LINUX) #define LJ_TARGET_OSX (LUAJIT_OS == LUAJIT_OS_OSX) #define LJ_TARGET_IOS (LJ_TARGET_OSX && LUAJIT_TARGET == LUAJIT_ARCH_ARM) #define LJ_TARGET_POSIX (LUAJIT_OS > LUAJIT_OS_WINDOWS) #define LJ_TARGET_DLOPEN LJ_TARGET_POSIX #ifdef __CELLOS_LV2__ #define LJ_TARGET_PS3 1 #define LJ_TARGET_CONSOLE 1 #endif #if _XBOX_VER >= 200 #define LJ_TARGET_XBOX360 1 #define LJ_TARGET_CONSOLE 1 #endif #define LJ_NUMMODE_SINGLE 0 /* Single-number mode only. */ #define LJ_NUMMODE_SINGLE_DUAL 1 /* Default to single-number mode. */ #define LJ_NUMMODE_DUAL 2 /* Dual-number mode only. */ #define LJ_NUMMODE_DUAL_SINGLE 3 /* Default to dual-number mode. */ /* Set target architecture properties. */ #if LUAJIT_TARGET == LUAJIT_ARCH_X86 #define LJ_ARCH_NAME "x86" #define LJ_ARCH_BITS 32 #define LJ_ARCH_ENDIAN LUAJIT_LE #if LJ_TARGET_WINDOWS || __CYGWIN__ #define LJ_ABI_WIN 1 #else #define LJ_ABI_WIN 0 #endif #define LJ_TARGET_X86 1 #define LJ_TARGET_X86ORX64 1 #define LJ_TARGET_EHRETREG 0 #define LJ_TARGET_MASKSHIFT 1 #define LJ_TARGET_MASKROT 1 #define LJ_TARGET_UNALIGNED 1 #define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL #elif LUAJIT_TARGET == LUAJIT_ARCH_X64 #define LJ_ARCH_NAME "x64" #define LJ_ARCH_BITS 64 #define LJ_ARCH_ENDIAN LUAJIT_LE #define LJ_ABI_WIN LJ_TARGET_WINDOWS #define LJ_TARGET_X64 1 #define LJ_TARGET_X86ORX64 1 #define LJ_TARGET_EHRETREG 0 #define LJ_TARGET_JUMPRANGE 31 /* +-2^31 = +-2GB */ #define LJ_TARGET_MASKSHIFT 1 #define LJ_TARGET_MASKROT 1 #define LJ_TARGET_UNALIGNED 1 #define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL #elif LUAJIT_TARGET == LUAJIT_ARCH_ARM #define LJ_ARCH_NAME "arm" #define LJ_ARCH_BITS 32 #define LJ_ARCH_ENDIAN LUAJIT_LE #if !defined(LJ_ARCH_HASFPU) && __SOFTFP__ #define LJ_ARCH_HASFPU 0 #endif #if !defined(LJ_ABI_SOFTFP) && !__ARM_PCS_VFP #define LJ_ABI_SOFTFP 1 #endif #define LJ_ABI_EABI 1 #define LJ_TARGET_ARM 1 #define LJ_TARGET_EHRETREG 0 #define LJ_TARGET_JUMPRANGE 25 /* +-2^25 = +-32MB */ #define LJ_TARGET_MASKSHIFT 0 #define LJ_TARGET_MASKROT 1 #define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */ #define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL #if __ARM_ARCH_7__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH_7S__ #define LJ_ARCH_VERSION 70 #elif __ARM_ARCH_6T2__ #define LJ_ARCH_VERSION 61 #elif __ARM_ARCH_6__ || __ARM_ARCH_6J__ || __ARM_ARCH_6K__ || __ARM_ARCH_6Z__ || __ARM_ARCH_6ZK__ #define LJ_ARCH_VERSION 60 #else #define LJ_ARCH_VERSION 50 #endif #elif LUAJIT_TARGET == LUAJIT_ARCH_PPC #define LJ_ARCH_NAME "ppc" #if _LP64 #define LJ_ARCH_BITS 64 #else #define LJ_ARCH_BITS 32 #endif #define LJ_ARCH_ENDIAN LUAJIT_BE #define LJ_TARGET_PPC 1 #define LJ_TARGET_EHRETREG 3 #define LJ_TARGET_JUMPRANGE 25 /* +-2^25 = +-32MB */ #define LJ_TARGET_MASKSHIFT 0 #define LJ_TARGET_MASKROT 1 #define LJ_TARGET_UNIFYROT 1 /* Want only IR_BROL. */ #define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL_SINGLE #if _ARCH_PWR7 #define LJ_ARCH_VERSION 70 #elif _ARCH_PWR6 #define LJ_ARCH_VERSION 60 #elif _ARCH_PWR5X #define LJ_ARCH_VERSION 51 #elif _ARCH_PWR5 #define LJ_ARCH_VERSION 50 #elif _ARCH_PWR4 #define LJ_ARCH_VERSION 40 #else #define LJ_ARCH_VERSION 0 #endif #if __PPC64__ || __powerpc64__ || LJ_TARGET_CONSOLE #define LJ_ARCH_PPC64 1 #define LJ_ARCH_NOFFI 1 #endif #if _ARCH_PPCSQ #define LJ_ARCH_SQRT 1 #endif #if _ARCH_PWR5X #define LJ_ARCH_ROUND 1 #endif #if __PPU__ #define LJ_ARCH_CELL 1 #endif #if LJ_TARGET_XBOX360 #define LJ_ARCH_XENON 1 #endif #elif LUAJIT_TARGET == LUAJIT_ARCH_PPCSPE #define LJ_ARCH_NAME "ppcspe" #define LJ_ARCH_BITS 32 #define LJ_ARCH_ENDIAN LUAJIT_BE #ifndef LJ_ABI_SOFTFP #define LJ_ABI_SOFTFP 1 #endif #define LJ_ABI_EABI 1 #define LJ_TARGET_PPCSPE 1 #define LJ_TARGET_EHRETREG 3 #define LJ_TARGET_JUMPRANGE 25 /* +-2^25 = +-32MB */ #define LJ_TARGET_MASKSHIFT 0 #define LJ_TARGET_MASKROT 1 #define LJ_TARGET_UNIFYROT 1 /* Want only IR_BROL. */ #define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE #define LJ_ARCH_NOFFI 1 /* NYI: comparisons, calls. */ #define LJ_ARCH_NOJIT 1 #elif LUAJIT_TARGET == LUAJIT_ARCH_MIPS #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) #define LJ_ARCH_NAME "mipsel" #define LJ_ARCH_ENDIAN LUAJIT_LE #else #define LJ_ARCH_NAME "mips" #define LJ_ARCH_ENDIAN LUAJIT_BE #endif #define LJ_ARCH_BITS 32 #define LJ_TARGET_MIPS 1 #define LJ_TARGET_EHRETREG 4 #define LJ_TARGET_JUMPRANGE 27 /* 2*2^27 = 256MB-aligned region */ #define LJ_TARGET_MASKSHIFT 1 #define LJ_TARGET_MASKROT 1 #define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */ #define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE #if _MIPS_ARCH_MIPS32R2 #define LJ_ARCH_VERSION 20 #else #define LJ_ARCH_VERSION 10 #endif #else #error "No target architecture defined" #endif #ifndef LJ_PAGESIZE #define LJ_PAGESIZE 4096 #endif /* Check for minimum required compiler versions. */ #if defined(__GNUC__) #if LJ_TARGET_X86 #if (__GNUC__ < 3) || ((__GNUC__ == 3) && __GNUC_MINOR__ < 4) #error "Need at least GCC 3.4 or newer" #endif #elif LJ_TARGET_X64 #if __GNUC__ < 4 #error "Need at least GCC 4.0 or newer" #endif #elif LJ_TARGET_ARM #if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 2) #error "Need at least GCC 4.2 or newer" #endif #elif !LJ_TARGET_PS3 #if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) #error "Need at least GCC 4.3 or newer" #endif #endif #endif /* Check target-specific constraints. */ #ifndef _BUILDVM_H #if LJ_TARGET_X64 #if __USING_SJLJ_EXCEPTIONS__ #error "Need a C compiler with native exception handling on x64" #endif #elif LJ_TARGET_ARM #if defined(__ARMEB__) #error "No support for big-endian ARM" #endif #if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__ #error "No support for Cortex-M CPUs" #endif #if !(__ARM_EABI__ || LJ_TARGET_IOS) #error "Only ARM EABI or iOS 3.0+ ABI is supported" #endif #elif LJ_TARGET_PPC || LJ_TARGET_PPCSPE #if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) #error "No support for PowerPC CPUs without double-precision FPU" #endif #if defined(_LITTLE_ENDIAN) #error "No support for little-endian PowerPC" #endif #if defined(_LP64) #error "No support for PowerPC 64 bit mode" #endif #elif LJ_TARGET_MIPS #if defined(__mips_soft_float) #error "No support for MIPS CPUs without FPU" #endif #endif #endif /* Enable or disable the dual-number mode for the VM. */ #if (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE && LUAJIT_NUMMODE == 2) || \ (LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL && LUAJIT_NUMMODE == 1) #error "No support for this number mode on this architecture" #endif #if LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL || \ (LJ_ARCH_NUMMODE == LJ_NUMMODE_DUAL_SINGLE && LUAJIT_NUMMODE != 1) || \ (LJ_ARCH_NUMMODE == LJ_NUMMODE_SINGLE_DUAL && LUAJIT_NUMMODE == 2) #define LJ_DUALNUM 1 #else #define LJ_DUALNUM 0 #endif #if LJ_TARGET_IOS || LJ_TARGET_CONSOLE /* Runtime code generation is restricted on iOS. Complain to Apple, not me. */ /* Ditto for the consoles. Complain to Sony or MS, not me. */ #ifndef LUAJIT_ENABLE_JIT #define LJ_OS_NOJIT 1 #endif #endif /* Disable or enable the JIT compiler. */ #if defined(LUAJIT_DISABLE_JIT) || defined(LJ_ARCH_NOJIT) || defined(LJ_OS_NOJIT) #define LJ_HASJIT 0 #else #define LJ_HASJIT 1 #endif /* Disable or enable the FFI extension. */ #if defined(LUAJIT_DISABLE_FFI) || defined(LJ_ARCH_NOFFI) #define LJ_HASFFI 0 #else #define LJ_HASFFI 1 #endif #ifndef LJ_ARCH_HASFPU #define LJ_ARCH_HASFPU 1 #endif #ifndef LJ_ABI_SOFTFP #define LJ_ABI_SOFTFP 0 #endif #define LJ_SOFTFP (!LJ_ARCH_HASFPU) #if LJ_ARCH_ENDIAN == LUAJIT_BE #define LJ_LE 0 #define LJ_BE 1 #define LJ_ENDIAN_SELECT(le, be) be #define LJ_ENDIAN_LOHI(lo, hi) hi lo #else #define LJ_LE 1 #define LJ_BE 0 #define LJ_ENDIAN_SELECT(le, be) le #define LJ_ENDIAN_LOHI(lo, hi) lo hi #endif #if LJ_ARCH_BITS == 32 #define LJ_32 1 #define LJ_64 0 #else #define LJ_32 0 #define LJ_64 1 #endif #ifndef LJ_TARGET_UNALIGNED #define LJ_TARGET_UNALIGNED 0 #endif /* Various workarounds for embedded operating systems. */ #if (defined(__ANDROID__) && !defined(LJ_TARGET_X86ORX64)) || defined(__symbian__) || LJ_TARGET_XBOX360 #define LUAJIT_NO_LOG2 #endif #if defined(__symbian__) #define LUAJIT_NO_EXP2 #endif #if defined(LUAJIT_NO_UNWIND) || defined(__symbian__) || LJ_TARGET_IOS || LJ_TARGET_PS3 #define LJ_NO_UNWIND 1 #endif /* Compatibility with Lua 5.1 vs. 5.2. */ #ifdef LUAJIT_ENABLE_LUA52COMPAT #define LJ_52 1 #else #define LJ_52 0 #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_func.h0000664000000000000000000000141012202141143022143 0ustar rootroot/* ** Function handling (prototypes, functions and upvalues). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_FUNC_H #define _LJ_FUNC_H #include "lj_obj.h" /* Prototypes. */ LJ_FUNC void LJ_FASTCALL lj_func_freeproto(global_State *g, GCproto *pt); /* Upvalues. */ LJ_FUNCA void LJ_FASTCALL lj_func_closeuv(lua_State *L, TValue *level); LJ_FUNC void LJ_FASTCALL lj_func_freeuv(global_State *g, GCupval *uv); /* Functions (closures). */ LJ_FUNC GCfunc *lj_func_newC(lua_State *L, MSize nelems, GCtab *env); LJ_FUNC GCfunc *lj_func_newL_empty(lua_State *L, GCproto *pt, GCtab *env); LJ_FUNCA GCfunc *lj_func_newL_gc(lua_State *L, GCproto *pt, GCfuncL *parent); LJ_FUNC void LJ_FASTCALL lj_func_free(global_State *g, GCfunc *c); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_str.h0000664000000000000000000000326712202141143022034 0ustar rootroot/* ** String handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_STR_H #define _LJ_STR_H #include #include "lj_obj.h" /* String interning. */ LJ_FUNC int32_t LJ_FASTCALL lj_str_cmp(GCstr *a, GCstr *b); LJ_FUNC void lj_str_resize(lua_State *L, MSize newmask); LJ_FUNCA GCstr *lj_str_new(lua_State *L, const char *str, size_t len); LJ_FUNC void LJ_FASTCALL lj_str_free(global_State *g, GCstr *s); #define lj_str_newz(L, s) (lj_str_new(L, s, strlen(s))) #define lj_str_newlit(L, s) (lj_str_new(L, "" s, sizeof(s)-1)) /* Type conversions. */ LJ_FUNC size_t LJ_FASTCALL lj_str_bufnum(char *s, cTValue *o); LJ_FUNC char * LJ_FASTCALL lj_str_bufint(char *p, int32_t k); LJ_FUNCA GCstr * LJ_FASTCALL lj_str_fromnum(lua_State *L, const lua_Number *np); LJ_FUNC GCstr * LJ_FASTCALL lj_str_fromint(lua_State *L, int32_t k); LJ_FUNCA GCstr * LJ_FASTCALL lj_str_fromnumber(lua_State *L, cTValue *o); #define LJ_STR_INTBUF (1+10) #define LJ_STR_NUMBUF LUAI_MAXNUMBER2STR /* String formatting. */ LJ_FUNC const char *lj_str_pushvf(lua_State *L, const char *fmt, va_list argp); LJ_FUNC const char *lj_str_pushf(lua_State *L, const char *fmt, ...) #if defined(__GNUC__) __attribute__ ((format (printf, 2, 3))) #endif ; /* Resizable string buffers. Struct definition in lj_obj.h. */ LJ_FUNC char *lj_str_needbuf(lua_State *L, SBuf *sb, MSize sz); #define lj_str_initbuf(sb) ((sb)->buf = NULL, (sb)->sz = 0) #define lj_str_resetbuf(sb) ((sb)->n = 0) #define lj_str_resizebuf(L, sb, size) \ ((sb)->buf = (char *)lj_mem_realloc(L, (sb)->buf, (sb)->sz, (size)), \ (sb)->sz = (size)) #define lj_str_freebuf(g, sb) lj_mem_free(g, (void *)(sb)->buf, (sb)->sz) #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ir.o0000664000000000000000000003631012213333053021645 0ustar rootrootELF>@@ UHAWAVAUATSHH HL4ʋAA)u[;Gt\WEAAt9vHA)HDIcur.nk == J->irbotlim(&cir[ref])->o == IR_KGCir->o != IR_KSLOTlj_ir.h!1 || t != IRT_LIGHTUDt <= IRT_NUMlj_obj.h(ir)->o == IR_KINT640(&cir[ref])->o == IR_KNUM || (&cir[ref])->o == IR_KINT64((uintptr_t)(tv) == (uint32_t)(uintptr_t)(tv))!((o)->gch.marked & ((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g)->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))(void *)(intptr_t)((int32_t)(intptr_t)(void *)(ptr)) == ptr(((((IRRef1)((key)))) < REF_BIAS)) && slot == (IRRef)(IRRef1)slot!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))$Y[ Y!Y!Y! [! [[ Z![ [![&[ YYYY[[[YYYYYYYYYYYYYYYYYYYYYYYYYYY Y Y YYYYY Y YYYYYYYYYYY!YZ [ [[Y䏎DD%, lj_ir_growbotlj_ir_k64lj_ir_kgclj_ir_kptr_lj_ir_kslotlj_ir_kvalueirt_toitype_setgcVlj_ir_numcmplj_ir_strcmpGCC: (Debian 4.7.3-4) 4.7.3zRx (eAC MS  HAC C  lAC Cx $AC K  $AC I  FAC C~ $AC I (,#AC M X(AC E^ x(AC E^ DAC  $AC G $AC G $AC I $0AC I $X AC P SSC { {SC c QSC y C Y  fAC E\ $3AC n .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @x, &<,<12<@2T4 O 6\0ez@u: 8  p( e0 I b {    '    '6eDOZiu=F{#((D22 {  S-: {FU QR _`flw3 !,16;AHO`q0`_lj_ir.clj_ir_growbot__PRETTY_FUNCTION__.6488__PRETTY_FUNCTION__.6562__PRETTY_FUNCTION__.6594__PRETTY_FUNCTION__.6607__PRETTY_FUNCTION__.6632__PRETTY_FUNCTION__.6642__PRETTY_FUNCTION__.5232__PRETTY_FUNCTION__.4866__PRETTY_FUNCTION__.6682__PRETTY_FUNCTION__.6694__assert_failmemmovelj_mem_realloclj_ir_growtoplj_ir_emitlj_ir_calllj_ir_callinfolj_opt_foldlj_ir_kintlj_ir_k64_freealllj_ir_k64_findlj_ir_k64lj_ir_knum_u64lj_ir_kint64lj_ir_knumintlj_ir_kgclj_ir_kptr_lj_ir_knulllj_ir_kslotlj_ir_kvaluelj_mem_newgcolj_ir_tonumberlj_trace_errlj_ir_tonumlj_ir_tostrlj_ir_numcmplj_ir_strcmplj_str_cmplj_ir_rollbacklj_str_newlj_strscan_numlj_str_fromintlj_str_fromnumlj_tab_new1lj_tab_duplj_tab_newkeylj_tab_lenlj_gc_step_jitlj_gc_barrieruvlj_math_random_steplj_vm_modisinhcoshtanhfputcfwritefflushlj_carith_divi64lj_carith_divu64lj_carith_modi64lj_carith_modu64lj_carith_powi64lj_carith_powu64lj_cdata_setfinstrlenmemcpymemsetlj_vm_errnolj_ir_type_sizelj_ir_mode6 @ E JT ^ c h S#R   N X ] @b ! !,"` j o pt   ,S ] b g   H    E    W _   W v 5 ? WD _I S ] Wb vg      *    H R W \ a k p u   , B N , ,  @F P U Zl1 '    (   ( 0 8 @ H P X `h p+x6  13456789 :0;@<P*`=p>?@ABCD`EpFGHIJKLMNO Lep=0{\|22 4 \{   U  `(tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_func.o0000664000000000000000000001241012213333050022156 0ustar rootrootELF> @@ UHATSHIF$4@@@HS@PD`S%  )ʈS%[A\]UHW BH9u H΋v H9tJP @P ]UHHV )W HP]UHH]LeHHI~uH|k H{LSH]LeUHAVAUATSIIDohCu{u HSH9uWAD$(SAE(t HLHHLA\$(Ht+{tUCL9c[A\A]A^]UHH]LeLmH HAIՍ4 @@D`SHPDhH]LeLmUHAWAVAUATSHIIIAD$$EtPL|L@@@ HPPAT$D1PAD]HL9uEAELH[A\A]A^A_]UHAWAVAUATSHHIHuHUGP$9P rHEPHuL$HEHUR$UIWHUHDHEAL}HUȋBF4(fEAHUHHEDxII(P(HzBH9zu"HJH9tH9u\H0zu HJH9u+H9u*HJ!Aw(@JIԋHt+zt*BH9tH}AW(P@@XA$A$IPAP ҉BAP RH9u PR H9t@EDPAHUD3rDp EHUBDHUBDjIL;m;EHUBHHH[A\A]A^A_]UHH~u V V )P HxP]lj_func.c(&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->next).gcptr32)->uv))->prev).gcptr32)->uv) == uv && (&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->prev).gcptr32)->uv))->next).gcptr32)->uv) == uv!((o)->gch.marked & 0x04) && !uv->closed && (((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)) != &uv->tv(((GCobj *)(uintptr_t)(L->openupval).gcptr32))->gch.gct == ~(~5u)!p->closed && (((TValue *)(void *)(uintptr_t)((p)->v).ptr32)) != &p->tv(((GCobj *)(uintptr_t)(*pp).gcptr32))->gch.gct == ~(~5u)lj_func_closeuvunlinkuvfunc_finduvGCC: (Debian 4.7.3-4) 4.7.3zRx  MAC CE @CAC ~ `AC X  FAC Lu $AC G  TAC P (AC M (YAC MG  H8AC s .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @.H &p,p12p @2 O%W0`uhp0 @    " MMC 7P   iwFTY8lj_func.cfunc_newLunlinkuv__PRETTY_FUNCTION__.4268__PRETTY_FUNCTION__.4291__PRETTY_FUNCTION__.4277lj_mem_newgco__assert_faillj_func_freeprotolj_func_freeuvlj_func_closeuvlj_gc_closeuvlj_func_newClj_func_newL_emptylj_func_newL_gclj_gc_step_fixtoplj_mem_realloclj_func_freej t y ~  * / 4Yn   @I       {    DMd Ltarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_state.h0000664000000000000000000000202512202141143022333 0ustar rootroot/* ** State and stack handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_STATE_H #define _LJ_STATE_H #include "lj_obj.h" #define incr_top(L) \ (++L->top >= tvref(L->maxstack) && (lj_state_growstack1(L), 0)) #define savestack(L, p) ((char *)(p) - mref(L->stack, char)) #define restorestack(L, n) ((TValue *)(mref(L->stack, char) + (n))) LJ_FUNC void lj_state_relimitstack(lua_State *L); LJ_FUNC void lj_state_shrinkstack(lua_State *L, MSize used); LJ_FUNCA void LJ_FASTCALL lj_state_growstack(lua_State *L, MSize need); LJ_FUNC void LJ_FASTCALL lj_state_growstack1(lua_State *L); static LJ_AINLINE void lj_state_checkstack(lua_State *L, MSize need) { if ((mref(L->maxstack, char) - (char *)L->top) <= (ptrdiff_t)need*(ptrdiff_t)sizeof(TValue)) lj_state_growstack(L, need); } LJ_FUNC lua_State *lj_state_new(lua_State *L); LJ_FUNC void LJ_FASTCALL lj_state_free(global_State *g, lua_State *L); #if LJ_64 LJ_FUNC lua_State *lj_state_newstate(lua_Alloc f, void *ud); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_trace.c0000664000000000000000000005560612202141143022321 0ustar rootroot/* ** Trace management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_trace_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_gc.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_str.h" #include "lj_frame.h" #include "lj_state.h" #include "lj_bc.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" #include "lj_mcode.h" #include "lj_trace.h" #include "lj_snap.h" #include "lj_gdbjit.h" #include "lj_record.h" #include "lj_asm.h" #include "lj_dispatch.h" #include "lj_vm.h" #include "lj_vmevent.h" #include "lj_target.h" /* -- Error handling ------------------------------------------------------ */ /* Synchronous abort with error message. */ void lj_trace_err(jit_State *J, TraceError e) { setnilV(&J->errinfo); /* No error info. */ setintV(J->L->top++, (int32_t)e); lj_err_throw(J->L, LUA_ERRRUN); } /* Synchronous abort with error message and error info. */ void lj_trace_err_info(jit_State *J, TraceError e) { setintV(J->L->top++, (int32_t)e); lj_err_throw(J->L, LUA_ERRRUN); } /* -- Trace management ---------------------------------------------------- */ /* The current trace is first assembled in J->cur. The variable length ** arrays point to shared, growable buffers (J->irbuf etc.). When trace ** recording ends successfully, the current trace and its data structures ** are copied to a new (compact) GCtrace object. */ /* Find a free trace number. */ static TraceNo trace_findfree(jit_State *J) { MSize osz, lim; if (J->freetrace == 0) J->freetrace = 1; for (; J->freetrace < J->sizetrace; J->freetrace++) if (traceref(J, J->freetrace) == NULL) return J->freetrace++; /* Need to grow trace array. */ lim = (MSize)J->param[JIT_P_maxtrace] + 1; if (lim < 2) lim = 2; else if (lim > 65535) lim = 65535; osz = J->sizetrace; if (osz >= lim) return 0; /* Too many traces. */ lj_mem_growvec(J->L, J->trace, J->sizetrace, lim, GCRef); for (; osz < J->sizetrace; osz++) setgcrefnull(J->trace[osz]); return J->freetrace; } #define TRACE_APPENDVEC(field, szfield, tp) \ T->field = (tp *)p; \ memcpy(p, J->cur.field, J->cur.szfield*sizeof(tp)); \ p += J->cur.szfield*sizeof(tp); #ifdef LUAJIT_USE_PERFTOOLS /* ** Create symbol table of JIT-compiled code. For use with Linux perf tools. ** Example usage: ** perf record -f -e cycles luajit test.lua ** perf report -s symbol ** rm perf.data /tmp/perf-*.map */ #include #include static void perftools_addtrace(GCtrace *T) { static FILE *fp; GCproto *pt = &gcref(T->startpt)->pt; const BCIns *startpc = mref(T->startpc, const BCIns); const char *name = proto_chunknamestr(pt); BCLine lineno; if (name[0] == '@' || name[0] == '=') name++; else name = "(string)"; lua_assert(startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc); lineno = lj_debug_line(pt, proto_bcpos(pt, startpc)); if (!fp) { char fname[40]; sprintf(fname, "/tmp/perf-%d.map", getpid()); if (!(fp = fopen(fname, "w"))) return; setlinebuf(fp); } fprintf(fp, "%lx %x TRACE_%d::%s:%u\n", (long)T->mcode, T->szmcode, T->traceno, name, lineno); } #endif /* Save current trace by copying and compacting it. */ static void trace_save(jit_State *J) { size_t sztr = ((sizeof(GCtrace)+7)&~7); size_t szins = (J->cur.nins-J->cur.nk)*sizeof(IRIns); size_t sz = sztr + szins + J->cur.nsnap*sizeof(SnapShot) + J->cur.nsnapmap*sizeof(SnapEntry); GCtrace *T = lj_mem_newt(J->L, (MSize)sz, GCtrace); char *p = (char *)T + sztr; memcpy(T, &J->cur, sizeof(GCtrace)); setgcrefr(T->nextgc, J2G(J)->gc.root); setgcrefp(J2G(J)->gc.root, T); newwhite(J2G(J), T); T->gct = ~LJ_TTRACE; T->ir = (IRIns *)p - J->cur.nk; memcpy(p, J->cur.ir+J->cur.nk, szins); p += szins; TRACE_APPENDVEC(snap, nsnap, SnapShot) TRACE_APPENDVEC(snapmap, nsnapmap, SnapEntry) J->cur.traceno = 0; setgcrefp(J->trace[T->traceno], T); lj_gc_barriertrace(J2G(J), T->traceno); lj_gdbjit_addtrace(J, T); #ifdef LUAJIT_USE_PERFTOOLS perftools_addtrace(T); #endif } void LJ_FASTCALL lj_trace_free(global_State *g, GCtrace *T) { jit_State *J = G2J(g); if (T->traceno) { lj_gdbjit_deltrace(J, T); if (T->traceno < J->freetrace) J->freetrace = T->traceno; setgcrefnull(J->trace[T->traceno]); } lj_mem_free(g, T, ((sizeof(GCtrace)+7)&~7) + (T->nins-T->nk)*sizeof(IRIns) + T->nsnap*sizeof(SnapShot) + T->nsnapmap*sizeof(SnapEntry)); } /* Re-enable compiling a prototype by unpatching any modified bytecode. */ void lj_trace_reenableproto(GCproto *pt) { if ((pt->flags & PROTO_ILOOP)) { BCIns *bc = proto_bc(pt); BCPos i, sizebc = pt->sizebc;; pt->flags &= ~PROTO_ILOOP; if (bc_op(bc[0]) == BC_IFUNCF) setbc_op(&bc[0], BC_FUNCF); for (i = 1; i < sizebc; i++) { BCOp op = bc_op(bc[i]); if (op == BC_IFORL || op == BC_IITERL || op == BC_ILOOP) setbc_op(&bc[i], (int)op+(int)BC_LOOP-(int)BC_ILOOP); } } } /* Unpatch the bytecode modified by a root trace. */ static void trace_unpatch(jit_State *J, GCtrace *T) { BCOp op = bc_op(T->startins); BCIns *pc = mref(T->startpc, BCIns); UNUSED(J); if (op == BC_JMP) return; /* No need to unpatch branches in parent traces (yet). */ switch (bc_op(*pc)) { case BC_JFORL: lua_assert(traceref(J, bc_d(*pc)) == T); *pc = T->startins; pc += bc_j(T->startins); lua_assert(bc_op(*pc) == BC_JFORI); setbc_op(pc, BC_FORI); break; case BC_JITERL: case BC_JLOOP: lua_assert(op == BC_ITERL || op == BC_LOOP || bc_isret(op)); *pc = T->startins; break; case BC_JMP: lua_assert(op == BC_ITERL); pc += bc_j(*pc)+2; if (bc_op(*pc) == BC_JITERL) { lua_assert(traceref(J, bc_d(*pc)) == T); *pc = T->startins; } break; case BC_JFUNCF: lua_assert(op == BC_FUNCF); *pc = T->startins; break; default: /* Already unpatched. */ break; } } /* Flush a root trace. */ static void trace_flushroot(jit_State *J, GCtrace *T) { GCproto *pt = &gcref(T->startpt)->pt; lua_assert(T->root == 0 && pt != NULL); /* First unpatch any modified bytecode. */ trace_unpatch(J, T); /* Unlink root trace from chain anchored in prototype. */ if (pt->trace == T->traceno) { /* Trace is first in chain. Easy. */ pt->trace = T->nextroot; } else if (pt->trace) { /* Otherwise search in chain of root traces. */ GCtrace *T2 = traceref(J, pt->trace); if (T2) { for (; T2->nextroot; T2 = traceref(J, T2->nextroot)) if (T2->nextroot == T->traceno) { T2->nextroot = T->nextroot; /* Unlink from chain. */ break; } } } } /* Flush a trace. Only root traces are considered. */ void lj_trace_flush(jit_State *J, TraceNo traceno) { if (traceno > 0 && traceno < J->sizetrace) { GCtrace *T = traceref(J, traceno); if (T && T->root == 0) trace_flushroot(J, T); } } /* Flush all traces associated with a prototype. */ void lj_trace_flushproto(global_State *g, GCproto *pt) { while (pt->trace != 0) trace_flushroot(G2J(g), traceref(G2J(g), pt->trace)); } /* Flush all traces. */ int lj_trace_flushall(lua_State *L) { jit_State *J = L2J(L); ptrdiff_t i; if ((J2G(J)->hookmask & HOOK_GC)) return 1; for (i = (ptrdiff_t)J->sizetrace-1; i > 0; i--) { GCtrace *T = traceref(J, i); if (T) { if (T->root == 0) trace_flushroot(J, T); lj_gdbjit_deltrace(J, T); T->traceno = 0; setgcrefnull(J->trace[i]); } } J->cur.traceno = 0; J->freetrace = 0; /* Clear penalty cache. */ memset(J->penalty, 0, sizeof(J->penalty)); /* Free the whole machine code and invalidate all exit stub groups. */ lj_mcode_free(J); memset(J->exitstubgroup, 0, sizeof(J->exitstubgroup)); lj_vmevent_send(L, TRACE, setstrV(L, L->top++, lj_str_newlit(L, "flush")); ); return 0; } /* Initialize JIT compiler state. */ void lj_trace_initstate(global_State *g) { jit_State *J = G2J(g); TValue *tv; /* Initialize SIMD constants. */ tv = LJ_KSIMD(J, LJ_KSIMD_ABS); tv[0].u64 = U64x(7fffffff,ffffffff); tv[1].u64 = U64x(7fffffff,ffffffff); tv = LJ_KSIMD(J, LJ_KSIMD_NEG); tv[0].u64 = U64x(80000000,00000000); tv[1].u64 = U64x(80000000,00000000); } /* Free everything associated with the JIT compiler state. */ void lj_trace_freestate(global_State *g) { jit_State *J = G2J(g); #ifdef LUA_USE_ASSERT { /* This assumes all traces have already been freed. */ ptrdiff_t i; for (i = 1; i < (ptrdiff_t)J->sizetrace; i++) lua_assert(i == (ptrdiff_t)J->cur.traceno || traceref(J, i) == NULL); } #endif lj_mcode_free(J); lj_ir_k64_freeall(J); lj_mem_freevec(g, J->snapmapbuf, J->sizesnapmap, SnapEntry); lj_mem_freevec(g, J->snapbuf, J->sizesnap, SnapShot); lj_mem_freevec(g, J->irbuf + J->irbotlim, J->irtoplim - J->irbotlim, IRIns); lj_mem_freevec(g, J->trace, J->sizetrace, GCRef); } /* -- Penalties and blacklisting ------------------------------------------ */ /* Blacklist a bytecode instruction. */ static void blacklist_pc(GCproto *pt, BCIns *pc) { setbc_op(pc, (int)bc_op(*pc)+(int)BC_ILOOP-(int)BC_LOOP); pt->flags |= PROTO_ILOOP; } /* Penalize a bytecode instruction. */ static void penalty_pc(jit_State *J, GCproto *pt, BCIns *pc, TraceError e) { uint32_t i, val = PENALTY_MIN; for (i = 0; i < PENALTY_SLOTS; i++) if (mref(J->penalty[i].pc, const BCIns) == pc) { /* Cache slot found? */ /* First try to bump its hotcount several times. */ val = ((uint32_t)J->penalty[i].val << 1) + LJ_PRNG_BITS(J, PENALTY_RNDBITS); if (val > PENALTY_MAX) { blacklist_pc(pt, pc); /* Blacklist it, if that didn't help. */ return; } goto setpenalty; } /* Assign a new penalty cache slot. */ i = J->penaltyslot; J->penaltyslot = (J->penaltyslot + 1) & (PENALTY_SLOTS-1); setmref(J->penalty[i].pc, pc); setpenalty: J->penalty[i].val = (uint16_t)val; J->penalty[i].reason = e; hotcount_set(J2GG(J), pc+1, val); } /* -- Trace compiler state machine ---------------------------------------- */ /* Start tracing. */ static void trace_start(jit_State *J) { lua_State *L; TraceNo traceno; if ((J->pt->flags & PROTO_NOJIT)) { /* JIT disabled for this proto? */ if (J->parent == 0) { /* Lazy bytecode patching to disable hotcount events. */ lua_assert(bc_op(*J->pc) == BC_FORL || bc_op(*J->pc) == BC_ITERL || bc_op(*J->pc) == BC_LOOP || bc_op(*J->pc) == BC_FUNCF); setbc_op(J->pc, (int)bc_op(*J->pc)+(int)BC_ILOOP-(int)BC_LOOP); J->pt->flags |= PROTO_ILOOP; } J->state = LJ_TRACE_IDLE; /* Silently ignored. */ return; } /* Get a new trace number. */ traceno = trace_findfree(J); if (LJ_UNLIKELY(traceno == 0)) { /* No free trace? */ lua_assert((J2G(J)->hookmask & HOOK_GC) == 0); lj_trace_flushall(J->L); J->state = LJ_TRACE_IDLE; /* Silently ignored. */ return; } setgcrefp(J->trace[traceno], &J->cur); /* Setup enough of the current trace to be able to send the vmevent. */ memset(&J->cur, 0, sizeof(GCtrace)); J->cur.traceno = traceno; J->cur.nins = J->cur.nk = REF_BASE; J->cur.ir = J->irbuf; J->cur.snap = J->snapbuf; J->cur.snapmap = J->snapmapbuf; J->mergesnap = 0; J->needsnap = 0; J->bcskip = 0; J->guardemit.irt = 0; J->postproc = LJ_POST_NONE; lj_resetsplit(J); setgcref(J->cur.startpt, obj2gco(J->pt)); L = J->L; lj_vmevent_send(L, TRACE, setstrV(L, L->top++, lj_str_newlit(L, "start")); setintV(L->top++, traceno); setfuncV(L, L->top++, J->fn); setintV(L->top++, proto_bcpos(J->pt, J->pc)); if (J->parent) { setintV(L->top++, J->parent); setintV(L->top++, J->exitno); } ); lj_record_setup(J); } /* Stop tracing. */ static void trace_stop(jit_State *J) { BCIns *pc = mref(J->cur.startpc, BCIns); BCOp op = bc_op(J->cur.startins); GCproto *pt = &gcref(J->cur.startpt)->pt; TraceNo traceno = J->cur.traceno; lua_State *L; switch (op) { case BC_FORL: setbc_op(pc+bc_j(J->cur.startins), BC_JFORI); /* Patch FORI, too. */ /* fallthrough */ case BC_LOOP: case BC_ITERL: case BC_FUNCF: /* Patch bytecode of starting instruction in root trace. */ setbc_op(pc, (int)op+(int)BC_JLOOP-(int)BC_LOOP); setbc_d(pc, traceno); addroot: /* Add to root trace chain in prototype. */ J->cur.nextroot = pt->trace; pt->trace = (TraceNo1)traceno; break; case BC_RET: case BC_RET0: case BC_RET1: *pc = BCINS_AD(BC_JLOOP, J->cur.snap[0].nslots, traceno); goto addroot; case BC_JMP: /* Patch exit branch in parent to side trace entry. */ lua_assert(J->parent != 0 && J->cur.root != 0); lj_asm_patchexit(J, traceref(J, J->parent), J->exitno, J->cur.mcode); /* Avoid compiling a side trace twice (stack resizing uses parent exit). */ traceref(J, J->parent)->snap[J->exitno].count = SNAPCOUNT_DONE; /* Add to side trace chain in root trace. */ { GCtrace *root = traceref(J, J->cur.root); root->nchild++; J->cur.nextside = root->nextside; root->nextside = (TraceNo1)traceno; } break; default: lua_assert(0); break; } /* Commit new mcode only after all patching is done. */ lj_mcode_commit(J, J->cur.mcode); J->postproc = LJ_POST_NONE; trace_save(J); L = J->L; lj_vmevent_send(L, TRACE, setstrV(L, L->top++, lj_str_newlit(L, "stop")); setintV(L->top++, traceno); ); } /* Start a new root trace for down-recursion. */ static int trace_downrec(jit_State *J) { /* Restart recording at the return instruction. */ lua_assert(J->pt != NULL); lua_assert(bc_isret(bc_op(*J->pc))); if (bc_op(*J->pc) == BC_RETM) return 0; /* NYI: down-recursion with RETM. */ J->parent = 0; J->exitno = 0; J->state = LJ_TRACE_RECORD; trace_start(J); return 1; } /* Abort tracing. */ static int trace_abort(jit_State *J) { lua_State *L = J->L; TraceError e = LJ_TRERR_RECERR; TraceNo traceno; J->postproc = LJ_POST_NONE; lj_mcode_abort(J); if (tvisnumber(L->top-1)) e = (TraceError)numberVint(L->top-1); if (e == LJ_TRERR_MCODELM) { L->top--; /* Remove error object */ J->state = LJ_TRACE_ASM; return 1; /* Retry ASM with new MCode area. */ } /* Penalize or blacklist starting bytecode instruction. */ if (J->parent == 0 && !bc_isret(bc_op(J->cur.startins))) penalty_pc(J, &gcref(J->cur.startpt)->pt, mref(J->cur.startpc, BCIns), e); /* Is there anything to abort? */ traceno = J->cur.traceno; if (traceno) { ptrdiff_t errobj = savestack(L, L->top-1); /* Stack may be resized. */ J->cur.link = 0; J->cur.linktype = LJ_TRLINK_NONE; lj_vmevent_send(L, TRACE, TValue *frame; const BCIns *pc; GCfunc *fn; setstrV(L, L->top++, lj_str_newlit(L, "abort")); setintV(L->top++, traceno); /* Find original Lua function call to generate a better error message. */ frame = J->L->base-1; pc = J->pc; while (!isluafunc(frame_func(frame))) { pc = (frame_iscont(frame) ? frame_contpc(frame) : frame_pc(frame)) - 1; frame = frame_prev(frame); } fn = frame_func(frame); setfuncV(L, L->top++, fn); setintV(L->top++, proto_bcpos(funcproto(fn), pc)); copyTV(L, L->top++, restorestack(L, errobj)); copyTV(L, L->top++, &J->errinfo); ); /* Drop aborted trace after the vmevent (which may still access it). */ setgcrefnull(J->trace[traceno]); if (traceno < J->freetrace) J->freetrace = traceno; J->cur.traceno = 0; } L->top--; /* Remove error object */ if (e == LJ_TRERR_DOWNREC) return trace_downrec(J); else if (e == LJ_TRERR_MCODEAL) lj_trace_flushall(L); return 0; } /* Perform pending re-patch of a bytecode instruction. */ static LJ_AINLINE void trace_pendpatch(jit_State *J, int force) { if (LJ_UNLIKELY(J->patchpc)) { if (force || J->bcskip == 0) { *J->patchpc = J->patchins; J->patchpc = NULL; } else { J->bcskip = 0; } } } /* State machine for the trace compiler. Protected callback. */ static TValue *trace_state(lua_State *L, lua_CFunction dummy, void *ud) { jit_State *J = (jit_State *)ud; UNUSED(dummy); do { retry: switch (J->state) { case LJ_TRACE_START: J->state = LJ_TRACE_RECORD; /* trace_start() may change state. */ trace_start(J); lj_dispatch_update(J2G(J)); break; case LJ_TRACE_RECORD: trace_pendpatch(J, 0); setvmstate(J2G(J), RECORD); lj_vmevent_send_(L, RECORD, /* Save/restore tmptv state for trace recorder. */ TValue savetv = J2G(J)->tmptv; TValue savetv2 = J2G(J)->tmptv2; setintV(L->top++, J->cur.traceno); setfuncV(L, L->top++, J->fn); setintV(L->top++, J->pt ? (int32_t)proto_bcpos(J->pt, J->pc) : -1); setintV(L->top++, J->framedepth); , J2G(J)->tmptv = savetv; J2G(J)->tmptv2 = savetv2; ); lj_record_ins(J); break; case LJ_TRACE_END: trace_pendpatch(J, 1); J->loopref = 0; if ((J->flags & JIT_F_OPT_LOOP) && J->cur.link == J->cur.traceno && J->framedepth + J->retdepth == 0) { setvmstate(J2G(J), OPT); lj_opt_dce(J); if (lj_opt_loop(J)) { /* Loop optimization failed? */ J->cur.link = 0; J->cur.linktype = LJ_TRLINK_NONE; J->loopref = J->cur.nins; J->state = LJ_TRACE_RECORD; /* Try to continue recording. */ break; } J->loopref = J->chain[IR_LOOP]; /* Needed by assembler. */ } lj_opt_split(J); lj_opt_sink(J); J->state = LJ_TRACE_ASM; break; case LJ_TRACE_ASM: setvmstate(J2G(J), ASM); lj_asm_trace(J, &J->cur); trace_stop(J); setvmstate(J2G(J), INTERP); J->state = LJ_TRACE_IDLE; lj_dispatch_update(J2G(J)); return NULL; default: /* Trace aborted asynchronously. */ setintV(L->top++, (int32_t)LJ_TRERR_RECERR); /* fallthrough */ case LJ_TRACE_ERR: trace_pendpatch(J, 1); if (trace_abort(J)) goto retry; setvmstate(J2G(J), INTERP); J->state = LJ_TRACE_IDLE; lj_dispatch_update(J2G(J)); return NULL; } } while (J->state > LJ_TRACE_RECORD); return NULL; } /* -- Event handling ------------------------------------------------------ */ /* A bytecode instruction is about to be executed. Record it. */ void lj_trace_ins(jit_State *J, const BCIns *pc) { /* Note: J->L must already be set. pc is the true bytecode PC here. */ J->pc = pc; J->fn = curr_func(J->L); J->pt = isluafunc(J->fn) ? funcproto(J->fn) : NULL; while (lj_vm_cpcall(J->L, NULL, (void *)J, trace_state) != 0) J->state = LJ_TRACE_ERR; } /* A hotcount triggered. Start recording a root trace. */ void LJ_FASTCALL lj_trace_hot(jit_State *J, const BCIns *pc) { /* Note: pc is the interpreter bytecode PC here. It's offset by 1. */ ERRNO_SAVE /* Reset hotcount. */ hotcount_set(J2GG(J), pc, J->param[JIT_P_hotloop]*HOTCOUNT_LOOP); /* Only start a new trace if not recording or inside __gc call or vmevent. */ if (J->state == LJ_TRACE_IDLE && !(J2G(J)->hookmask & (HOOK_GC|HOOK_VMEVENT))) { J->parent = 0; /* Root trace. */ J->exitno = 0; J->state = LJ_TRACE_START; lj_trace_ins(J, pc-1); } ERRNO_RESTORE } /* Check for a hot side exit. If yes, start recording a side trace. */ static void trace_hotside(jit_State *J, const BCIns *pc) { SnapShot *snap = &traceref(J, J->parent)->snap[J->exitno]; if (!(J2G(J)->hookmask & (HOOK_GC|HOOK_VMEVENT)) && snap->count != SNAPCOUNT_DONE && ++snap->count >= J->param[JIT_P_hotexit]) { lua_assert(J->state == LJ_TRACE_IDLE); /* J->parent is non-zero for a side trace. */ J->state = LJ_TRACE_START; lj_trace_ins(J, pc); } } /* Tiny struct to pass data to protected call. */ typedef struct ExitDataCP { jit_State *J; void *exptr; /* Pointer to exit state. */ const BCIns *pc; /* Restart interpreter at this PC. */ } ExitDataCP; /* Need to protect lj_snap_restore because it may throw. */ static TValue *trace_exit_cp(lua_State *L, lua_CFunction dummy, void *ud) { ExitDataCP *exd = (ExitDataCP *)ud; cframe_errfunc(L->cframe) = -1; /* Inherit error function. */ exd->pc = lj_snap_restore(exd->J, exd->exptr); UNUSED(dummy); return NULL; } #ifndef LUAJIT_DISABLE_VMEVENT /* Push all registers from exit state. */ static void trace_exit_regs(lua_State *L, ExitState *ex) { int32_t i; setintV(L->top++, RID_NUM_GPR); setintV(L->top++, RID_NUM_FPR); for (i = 0; i < RID_NUM_GPR; i++) { if (sizeof(ex->gpr[i]) == sizeof(int32_t)) setintV(L->top++, (int32_t)ex->gpr[i]); else setnumV(L->top++, (lua_Number)ex->gpr[i]); } #if !LJ_SOFTFP for (i = 0; i < RID_NUM_FPR; i++) { setnumV(L->top, ex->fpr[i]); if (LJ_UNLIKELY(tvisnan(L->top))) setnanV(L->top); L->top++; } #endif } #endif #ifdef EXITSTATE_PCREG /* Determine trace number from pc of exit instruction. */ static TraceNo trace_exit_find(jit_State *J, MCode *pc) { TraceNo traceno; for (traceno = 1; traceno < J->sizetrace; traceno++) { GCtrace *T = traceref(J, traceno); if (T && pc >= T->mcode && pc < (MCode *)((char *)T->mcode + T->szmcode)) return traceno; } lua_assert(0); return 0; } #endif /* A trace exited. Restore interpreter state. */ int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr) { ERRNO_SAVE lua_State *L = J->L; ExitState *ex = (ExitState *)exptr; ExitDataCP exd; int errcode; const BCIns *pc; void *cf; GCtrace *T; #ifdef EXITSTATE_PCREG J->parent = trace_exit_find(J, (MCode *)(intptr_t)ex->gpr[EXITSTATE_PCREG]); #endif T = traceref(J, J->parent); UNUSED(T); #ifdef EXITSTATE_CHECKEXIT if (J->exitno == T->nsnap) { /* Treat stack check like a parent exit. */ lua_assert(T->root != 0); J->exitno = T->ir[REF_BASE].op2; J->parent = T->ir[REF_BASE].op1; T = traceref(J, J->parent); } #endif lua_assert(T != NULL && J->exitno < T->nsnap); exd.J = J; exd.exptr = exptr; errcode = lj_vm_cpcall(L, NULL, &exd, trace_exit_cp); if (errcode) return -errcode; /* Return negated error code. */ lj_vmevent_send(L, TEXIT, lj_state_checkstack(L, 4+RID_NUM_GPR+RID_NUM_FPR+LUA_MINSTACK); setintV(L->top++, J->parent); setintV(L->top++, J->exitno); trace_exit_regs(L, ex); ); pc = exd.pc; cf = cframe_raw(L->cframe); setcframe_pc(cf, pc); if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize) { if (!(G(L)->hookmask & HOOK_GC)) lj_gc_step(L); /* Exited because of GC: drive GC forward. */ } else { trace_hotside(J, pc); } if (bc_op(*pc) == BC_JLOOP) { BCIns *retpc = &traceref(J, bc_d(*pc))->startins; if (bc_isret(bc_op(*retpc))) { if (J->state == LJ_TRACE_RECORD) { J->patchins = *pc; J->patchpc = (BCIns *)pc; *J->patchpc = *retpc; J->bcskip = 1; } else { pc = retpc; setcframe_pc(cf, pc); } } } /* Return MULTRES or 0. */ ERRNO_RESTORE switch (bc_op(*pc)) { case BC_CALLM: case BC_CALLMT: return (int)((BCReg)(L->top - L->base) - bc_a(*pc) - bc_c(*pc)); case BC_RETM: return (int)((BCReg)(L->top - L->base) + 1 - bc_a(*pc) - bc_d(*pc)); case BC_TSETM: return (int)((BCReg)(L->top - L->base) + 1 - bc_a(*pc)); default: if (bc_op(*pc) >= BC_FUNCF) return (int)((BCReg)(L->top - L->base) + 1); return 0; } } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_target_x86.h0000664000000000000000000002352012202141143023211 0ustar rootroot/* ** Definitions for x86 and x64 CPUs. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_TARGET_X86_H #define _LJ_TARGET_X86_H /* -- Registers IDs ------------------------------------------------------- */ #if LJ_64 #define GPRDEF(_) \ _(EAX) _(ECX) _(EDX) _(EBX) _(ESP) _(EBP) _(ESI) _(EDI) \ _(R8D) _(R9D) _(R10D) _(R11D) _(R12D) _(R13D) _(R14D) _(R15D) #define FPRDEF(_) \ _(XMM0) _(XMM1) _(XMM2) _(XMM3) _(XMM4) _(XMM5) _(XMM6) _(XMM7) \ _(XMM8) _(XMM9) _(XMM10) _(XMM11) _(XMM12) _(XMM13) _(XMM14) _(XMM15) #else #define GPRDEF(_) \ _(EAX) _(ECX) _(EDX) _(EBX) _(ESP) _(EBP) _(ESI) _(EDI) #define FPRDEF(_) \ _(XMM0) _(XMM1) _(XMM2) _(XMM3) _(XMM4) _(XMM5) _(XMM6) _(XMM7) #endif #define VRIDDEF(_) \ _(MRM) #define RIDENUM(name) RID_##name, enum { GPRDEF(RIDENUM) /* General-purpose registers (GPRs). */ FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */ RID_MAX, RID_MRM = RID_MAX, /* Pseudo-id for ModRM operand. */ /* Calling conventions. */ RID_RET = RID_EAX, #if LJ_64 RID_FPRET = RID_XMM0, #else RID_RETLO = RID_EAX, RID_RETHI = RID_EDX, #endif /* These definitions must match with the *.dasc file(s): */ RID_BASE = RID_EDX, /* Interpreter BASE. */ #if LJ_64 && !LJ_ABI_WIN RID_LPC = RID_EBX, /* Interpreter PC. */ RID_DISPATCH = RID_R14D, /* Interpreter DISPATCH table. */ #else RID_LPC = RID_ESI, /* Interpreter PC. */ RID_DISPATCH = RID_EBX, /* Interpreter DISPATCH table. */ #endif /* Register ranges [min, max) and number of registers. */ RID_MIN_GPR = RID_EAX, RID_MIN_FPR = RID_XMM0, RID_MAX_GPR = RID_MIN_FPR, RID_MAX_FPR = RID_MAX, RID_NUM_GPR = RID_MAX_GPR - RID_MIN_GPR, RID_NUM_FPR = RID_MAX_FPR - RID_MIN_FPR, }; /* -- Register sets ------------------------------------------------------- */ /* Make use of all registers, except the stack pointer. */ #define RSET_GPR (RSET_RANGE(RID_MIN_GPR, RID_MAX_GPR)-RID2RSET(RID_ESP)) #define RSET_FPR (RSET_RANGE(RID_MIN_FPR, RID_MAX_FPR)) #define RSET_ALL (RSET_GPR|RSET_FPR) #define RSET_INIT RSET_ALL #if LJ_64 /* Note: this requires the use of FORCE_REX! */ #define RSET_GPR8 RSET_GPR #else #define RSET_GPR8 (RSET_RANGE(RID_EAX, RID_EBX+1)) #endif /* ABI-specific register sets. */ #define RSET_ACD (RID2RSET(RID_EAX)|RID2RSET(RID_ECX)|RID2RSET(RID_EDX)) #if LJ_64 #if LJ_ABI_WIN /* Windows x64 ABI. */ #define RSET_SCRATCH \ (RSET_ACD|RSET_RANGE(RID_R8D, RID_R11D+1)|RSET_RANGE(RID_XMM0, RID_XMM5+1)) #define REGARG_GPRS \ (RID_ECX|((RID_EDX|((RID_R8D|(RID_R9D<<5))<<5))<<5)) #define REGARG_NUMGPR 4 #define REGARG_NUMFPR 4 #define REGARG_FIRSTFPR RID_XMM0 #define REGARG_LASTFPR RID_XMM3 #define STACKARG_OFS (4*8) #else /* The rest of the civilized x64 world has a common ABI. */ #define RSET_SCRATCH \ (RSET_ACD|RSET_RANGE(RID_ESI, RID_R11D+1)|RSET_FPR) #define REGARG_GPRS \ (RID_EDI|((RID_ESI|((RID_EDX|((RID_ECX|((RID_R8D|(RID_R9D \ <<5))<<5))<<5))<<5))<<5)) #define REGARG_NUMGPR 6 #define REGARG_NUMFPR 8 #define REGARG_FIRSTFPR RID_XMM0 #define REGARG_LASTFPR RID_XMM7 #define STACKARG_OFS 0 #endif #else /* Common x86 ABI. */ #define RSET_SCRATCH (RSET_ACD|RSET_FPR) #define REGARG_GPRS (RID_ECX|(RID_EDX<<5)) /* Fastcall only. */ #define REGARG_NUMGPR 2 /* Fastcall only. */ #define REGARG_NUMFPR 0 #define STACKARG_OFS 0 #endif #if LJ_64 /* Prefer the low 8 regs of each type to reduce REX prefixes. */ #undef rset_picktop #define rset_picktop(rs) (lj_fls(lj_bswap(rs)) ^ 0x18) #endif /* -- Spill slots --------------------------------------------------------- */ /* Spill slots are 32 bit wide. An even/odd pair is used for FPRs. ** ** SPS_FIXED: Available fixed spill slots in interpreter frame. ** This definition must match with the *.dasc file(s). ** ** SPS_FIRST: First spill slot for general use. Reserve min. two 32 bit slots. */ #if LJ_64 #if LJ_ABI_WIN #define SPS_FIXED (4*2) #define SPS_FIRST (4*2) /* Don't use callee register save area. */ #else #define SPS_FIXED 4 #define SPS_FIRST 2 #endif #else #define SPS_FIXED 6 #define SPS_FIRST 2 #endif #define SPOFS_TMP 0 #define sps_scale(slot) (4 * (int32_t)(slot)) #define sps_align(slot) (((slot) - SPS_FIXED + 3) & ~3) /* -- Exit state ---------------------------------------------------------- */ /* This definition must match with the *.dasc file(s). */ typedef struct { lua_Number fpr[RID_NUM_FPR]; /* Floating-point registers. */ intptr_t gpr[RID_NUM_GPR]; /* General-purpose registers. */ int32_t spill[256]; /* Spill slots. */ } ExitState; /* Limited by the range of a short fwd jump (127): (2+2)*(32-1)-2 = 122. */ #define EXITSTUB_SPACING (2+2) #define EXITSTUBS_PER_GROUP 32 /* -- x86 ModRM operand encoding ------------------------------------------ */ typedef enum { XM_OFS0 = 0x00, XM_OFS8 = 0x40, XM_OFS32 = 0x80, XM_REG = 0xc0, XM_SCALE1 = 0x00, XM_SCALE2 = 0x40, XM_SCALE4 = 0x80, XM_SCALE8 = 0xc0, XM_MASK = 0xc0 } x86Mode; /* Structure to hold variable ModRM operand. */ typedef struct { int32_t ofs; /* Offset. */ uint8_t base; /* Base register or RID_NONE. */ uint8_t idx; /* Index register or RID_NONE. */ uint8_t scale; /* Index scale (XM_SCALE1 .. XM_SCALE8). */ } x86ModRM; /* -- Opcodes ------------------------------------------------------------- */ /* Macros to construct variable-length x86 opcodes. -(len+1) is in LSB. */ #define XO_(o) ((uint32_t)(0x0000fe + (0x##o<<24))) #define XO_FPU(a,b) ((uint32_t)(0x00fd + (0x##a<<16)+(0x##b<<24))) #define XO_0f(o) ((uint32_t)(0x0f00fd + (0x##o<<24))) #define XO_66(o) ((uint32_t)(0x6600fd + (0x##o<<24))) #define XO_660f(o) ((uint32_t)(0x0f66fc + (0x##o<<24))) #define XO_f20f(o) ((uint32_t)(0x0ff2fc + (0x##o<<24))) #define XO_f30f(o) ((uint32_t)(0x0ff3fc + (0x##o<<24))) /* This list of x86 opcodes is not intended to be complete. Opcodes are only ** included when needed. Take a look at DynASM or jit.dis_x86 to see the ** whole mess. */ typedef enum { /* Fixed length opcodes. XI_* prefix. */ XI_NOP = 0x90, XI_XCHGa = 0x90, XI_CALL = 0xe8, XI_JMP = 0xe9, XI_JMPs = 0xeb, XI_PUSH = 0x50, /* Really 50+r. */ XI_JCCs = 0x70, /* Really 7x. */ XI_JCCn = 0x80, /* Really 0f8x. */ XI_LEA = 0x8d, XI_MOVrib = 0xb0, /* Really b0+r. */ XI_MOVri = 0xb8, /* Really b8+r. */ XI_ARITHib = 0x80, XI_ARITHi = 0x81, XI_ARITHi8 = 0x83, XI_PUSHi8 = 0x6a, XI_TESTb = 0x84, XI_TEST = 0x85, XI_MOVmi = 0xc7, XI_GROUP5 = 0xff, /* Note: little-endian byte-order! */ XI_FLDZ = 0xeed9, XI_FLD1 = 0xe8d9, XI_FLDLG2 = 0xecd9, XI_FLDLN2 = 0xedd9, XI_FDUP = 0xc0d9, /* Really fld st0. */ XI_FPOP = 0xd8dd, /* Really fstp st0. */ XI_FPOP1 = 0xd9dd, /* Really fstp st1. */ XI_FRNDINT = 0xfcd9, XI_FSIN = 0xfed9, XI_FCOS = 0xffd9, XI_FPTAN = 0xf2d9, XI_FPATAN = 0xf3d9, XI_FSCALE = 0xfdd9, XI_FYL2X = 0xf1d9, /* Variable-length opcodes. XO_* prefix. */ XO_MOV = XO_(8b), XO_MOVto = XO_(89), XO_MOVtow = XO_66(89), XO_MOVtob = XO_(88), XO_MOVmi = XO_(c7), XO_MOVmib = XO_(c6), XO_LEA = XO_(8d), XO_ARITHib = XO_(80), XO_ARITHi = XO_(81), XO_ARITHi8 = XO_(83), XO_ARITHiw8 = XO_66(83), XO_SHIFTi = XO_(c1), XO_SHIFT1 = XO_(d1), XO_SHIFTcl = XO_(d3), XO_IMUL = XO_0f(af), XO_IMULi = XO_(69), XO_IMULi8 = XO_(6b), XO_CMP = XO_(3b), XO_TESTb = XO_(84), XO_TEST = XO_(85), XO_GROUP3b = XO_(f6), XO_GROUP3 = XO_(f7), XO_GROUP5b = XO_(fe), XO_GROUP5 = XO_(ff), XO_MOVZXb = XO_0f(b6), XO_MOVZXw = XO_0f(b7), XO_MOVSXb = XO_0f(be), XO_MOVSXw = XO_0f(bf), XO_MOVSXd = XO_(63), XO_BSWAP = XO_0f(c8), XO_CMOV = XO_0f(40), XO_MOVSD = XO_f20f(10), XO_MOVSDto = XO_f20f(11), XO_MOVSS = XO_f30f(10), XO_MOVSSto = XO_f30f(11), XO_MOVLPD = XO_660f(12), XO_MOVAPS = XO_0f(28), XO_XORPS = XO_0f(57), XO_ANDPS = XO_0f(54), XO_ADDSD = XO_f20f(58), XO_SUBSD = XO_f20f(5c), XO_MULSD = XO_f20f(59), XO_DIVSD = XO_f20f(5e), XO_SQRTSD = XO_f20f(51), XO_MINSD = XO_f20f(5d), XO_MAXSD = XO_f20f(5f), XO_ROUNDSD = 0x0b3a0ffc, /* Really 66 0f 3a 0b. See asm_fpmath. */ XO_UCOMISD = XO_660f(2e), XO_CVTSI2SD = XO_f20f(2a), XO_CVTSD2SI = XO_f20f(2d), XO_CVTTSD2SI= XO_f20f(2c), XO_CVTSI2SS = XO_f30f(2a), XO_CVTSS2SI = XO_f30f(2d), XO_CVTTSS2SI= XO_f30f(2c), XO_CVTSS2SD = XO_f30f(5a), XO_CVTSD2SS = XO_f20f(5a), XO_ADDSS = XO_f30f(58), XO_MOVD = XO_660f(6e), XO_MOVDto = XO_660f(7e), XO_FLDd = XO_(d9), XOg_FLDd = 0, XO_FLDq = XO_(dd), XOg_FLDq = 0, XO_FILDd = XO_(db), XOg_FILDd = 0, XO_FILDq = XO_(df), XOg_FILDq = 5, XO_FSTPd = XO_(d9), XOg_FSTPd = 3, XO_FSTPq = XO_(dd), XOg_FSTPq = 3, XO_FISTPq = XO_(df), XOg_FISTPq = 7, XO_FISTTPq = XO_(dd), XOg_FISTTPq = 1, XO_FADDq = XO_(dc), XOg_FADDq = 0, XO_FLDCW = XO_(d9), XOg_FLDCW = 5, XO_FNSTCW = XO_(d9), XOg_FNSTCW = 7 } x86Op; /* x86 opcode groups. */ typedef uint32_t x86Group; #define XG_(i8, i, g) ((x86Group)(((i8) << 16) + ((i) << 8) + (g))) #define XG_ARITHi(g) XG_(XI_ARITHi8, XI_ARITHi, g) #define XG_TOXOi(xg) ((x86Op)(0x000000fe + (((xg)<<16) & 0xff000000))) #define XG_TOXOi8(xg) ((x86Op)(0x000000fe + (((xg)<<8) & 0xff000000))) #define XO_ARITH(a) ((x86Op)(0x030000fe + ((a)<<27))) #define XO_ARITHw(a) ((x86Op)(0x036600fd + ((a)<<27))) typedef enum { XOg_ADD, XOg_OR, XOg_ADC, XOg_SBB, XOg_AND, XOg_SUB, XOg_XOR, XOg_CMP, XOg_X_IMUL } x86Arith; typedef enum { XOg_ROL, XOg_ROR, XOg_RCL, XOg_RCR, XOg_SHL, XOg_SHR, XOg_SAL, XOg_SAR } x86Shift; typedef enum { XOg_TEST, XOg_TEST_, XOg_NOT, XOg_NEG, XOg_MUL, XOg_IMUL, XOg_DIV, XOg_IDIV } x86Group3; typedef enum { XOg_INC, XOg_DEC, XOg_CALL, XOg_CALLfar, XOg_JMP, XOg_JMPfar, XOg_PUSH } x86Group5; /* x86 condition codes. */ typedef enum { CC_O, CC_NO, CC_B, CC_NB, CC_E, CC_NE, CC_BE, CC_NBE, CC_S, CC_NS, CC_P, CC_NP, CC_L, CC_NL, CC_LE, CC_NLE, CC_C = CC_B, CC_NAE = CC_C, CC_NC = CC_NB, CC_AE = CC_NB, CC_Z = CC_E, CC_NZ = CC_NE, CC_NA = CC_BE, CC_A = CC_NBE, CC_PE = CC_P, CC_PO = CC_NP, CC_NGE = CC_L, CC_GE = CC_NL, CC_NG = CC_LE, CC_G = CC_NLE } x86CC; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_udata.h0000664000000000000000000000046312202141143022315 0ustar rootroot/* ** Userdata handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_UDATA_H #define _LJ_UDATA_H #include "lj_obj.h" LJ_FUNC GCudata *lj_udata_new(lua_State *L, MSize sz, GCtab *env); LJ_FUNC void LJ_FASTCALL lj_udata_free(global_State *g, GCudata *ud); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_debug.h0000664000000000000000000000340212202141143022301 0ustar rootroot/* ** Debugging and introspection. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_DEBUG_H #define _LJ_DEBUG_H #include "lj_obj.h" typedef struct lj_Debug { /* Common fields. Must be in the same order as in lua.h. */ int event; const char *name; const char *namewhat; const char *what; const char *source; int currentline; int nups; int linedefined; int lastlinedefined; char short_src[LUA_IDSIZE]; int i_ci; /* Extended fields. Only valid if lj_debug_getinfo() is called with ext = 1.*/ int nparams; int isvararg; } lj_Debug; LJ_FUNC cTValue *lj_debug_frame(lua_State *L, int level, int *size); LJ_FUNC BCLine LJ_FASTCALL lj_debug_line(GCproto *pt, BCPos pc); LJ_FUNC const char *lj_debug_uvname(GCproto *pt, uint32_t idx); LJ_FUNC const char *lj_debug_uvnamev(cTValue *o, uint32_t idx, TValue **tvp); LJ_FUNC const char *lj_debug_slotname(GCproto *pt, const BCIns *pc, BCReg slot, const char **name); LJ_FUNC const char *lj_debug_funcname(lua_State *L, TValue *frame, const char **name); LJ_FUNC void lj_debug_shortname(char *out, GCstr *str); LJ_FUNC void lj_debug_addloc(lua_State *L, const char *msg, cTValue *frame, cTValue *nextframe); LJ_FUNC void lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc); LJ_FUNC int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, int ext); /* Fixed internal variable names. */ #define VARNAMEDEF(_) \ _(FOR_IDX, "(for index)") \ _(FOR_STOP, "(for limit)") \ _(FOR_STEP, "(for step)") \ _(FOR_GEN, "(for generator)") \ _(FOR_STATE, "(for state)") \ _(FOR_CTL, "(for control)") enum { VARNAME_END, #define VARNAMEENUM(name, str) VARNAME_##name, VARNAMEDEF(VARNAMEENUM) #undef VARNAMEENUM VARNAME__MAX }; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/ljamalg.c0000664000000000000000000000437412231715321022150 0ustar rootroot/* ** LuaJIT core and libraries amalgamation. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* +--------------------------------------------------------------------------+ | WARNING: Compiling the amalgamation needs a lot of virtual memory | | (around 300 MB with GCC 4.x)! If you don't have enough physical memory | | your machine will start swapping to disk and the compile will not finish | | within a reasonable amount of time. | | So either compile on a bigger machine or use the non-amalgamated build. | +--------------------------------------------------------------------------+ */ #define ljamalg_c #define LUA_CORE /* To get the mremap prototype. Must be defined before any system includes. */ #if defined(__linux__) && !defined(_GNU_SOURCE) #define _GNU_SOURCE #endif #ifndef WINVER #define WINVER 0x0500 #endif #include "lua.h" #include "lauxlib.h" #include "lj_gc.c" #include "lj_err.c" #include "lj_char.c" #include "lj_bc.c" #include "lj_obj.c" #include "lj_str.c" #include "lj_tab.c" #include "lj_func.c" #include "lj_udata.c" #include "lj_meta.c" #include "lj_debug.c" #include "lj_state.c" #include "lj_dispatch.c" #include "lj_vmevent.c" #include "lj_vmmath.c" #include "lj_strscan.c" #include "lj_api.c" #include "lj_lex.c" #include "lj_parse.c" #include "lj_bcread.c" #include "lj_bcwrite.c" #include "lj_load.c" #include "lj_ctype.c" #include "lj_cdata.c" #include "lj_cconv.c" #include "lj_ccall.c" #include "lj_ccallback.c" #include "lj_carith.c" #include "lj_clib.c" #include "lj_cparse.c" #include "lj_lib.c" #include "lj_ir.c" #include "lj_opt_mem.c" #include "lj_opt_fold.c" #include "lj_opt_narrow.c" #include "lj_opt_dce.c" #include "lj_opt_loop.c" #include "lj_opt_split.c" #include "lj_opt_sink.c" #include "lj_mcode.c" #include "lj_snap.c" #include "lj_record.c" #include "lj_crecord.c" #include "lj_ffrecord.c" #include "lj_asm.c" #include "lj_trace.c" #include "lj_gdbjit.c" #include "lj_alloc.c" #include "lib_aux.c" #include "lib_base.c" #include "lib_math.c" #include "lib_string.c" #include "lib_table.c" #include "lib_io.c" #include "lib_os.c" #include "lib_package.c" #include "lib_debug.c" #include "lib_bit.c" #include "lib_jit.c" #include "lib_ffi.c" #include "lib_init.c" tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cparse.c0000664000000000000000000015640512231715321022506 0ustar rootroot/* ** C declaration parser. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_ctype.h" #include "lj_cparse.h" #include "lj_frame.h" #include "lj_vm.h" #include "lj_char.h" #include "lj_strscan.h" /* ** Important note: this is NOT a validating C parser! This is a minimal ** C declaration parser, solely for use by the LuaJIT FFI. ** ** It ought to return correct results for properly formed C declarations, ** but it may accept some invalid declarations, too (and return nonsense). ** Also, it shows rather generic error messages to avoid unnecessary bloat. ** If in doubt, please check the input against your favorite C compiler. */ /* -- C lexer ------------------------------------------------------------- */ /* C lexer token names. */ static const char *const ctoknames[] = { #define CTOKSTR(name, str) str, CTOKDEF(CTOKSTR) #undef CTOKSTR NULL }; /* Forward declaration. */ LJ_NORET static void cp_err(CPState *cp, ErrMsg em); static const char *cp_tok2str(CPState *cp, CPToken tok) { lua_assert(tok < CTOK_FIRSTDECL); if (tok > CTOK_OFS) return ctoknames[tok-CTOK_OFS-1]; else if (!lj_char_iscntrl(tok)) return lj_str_pushf(cp->L, "%c", tok); else return lj_str_pushf(cp->L, "char(%d)", tok); } /* End-of-line? */ static LJ_AINLINE int cp_iseol(CPChar c) { return (c == '\n' || c == '\r'); } /* Peek next raw character. */ static LJ_AINLINE CPChar cp_rawpeek(CPState *cp) { return (CPChar)(uint8_t)(*cp->p); } static LJ_NOINLINE CPChar cp_get_bs(CPState *cp); /* Get next character. */ static LJ_AINLINE CPChar cp_get(CPState *cp) { cp->c = (CPChar)(uint8_t)(*cp->p++); if (LJ_LIKELY(cp->c != '\\')) return cp->c; return cp_get_bs(cp); } /* Transparently skip backslash-escaped line breaks. */ static LJ_NOINLINE CPChar cp_get_bs(CPState *cp) { CPChar c2, c = cp_rawpeek(cp); if (!cp_iseol(c)) return cp->c; cp->p++; c2 = cp_rawpeek(cp); if (cp_iseol(c2) && c2 != c) cp->p++; cp->linenumber++; return cp_get(cp); } /* Grow save buffer. */ static LJ_NOINLINE void cp_save_grow(CPState *cp, CPChar c) { MSize newsize; if (cp->sb.sz >= CPARSE_MAX_BUF/2) cp_err(cp, LJ_ERR_XELEM); newsize = cp->sb.sz * 2; lj_str_resizebuf(cp->L, &cp->sb, newsize); cp->sb.buf[cp->sb.n++] = (char)c; } /* Save character in buffer. */ static LJ_AINLINE void cp_save(CPState *cp, CPChar c) { if (LJ_UNLIKELY(cp->sb.n + 1 > cp->sb.sz)) cp_save_grow(cp, c); else cp->sb.buf[cp->sb.n++] = (char)c; } /* Skip line break. Handles "\n", "\r", "\r\n" or "\n\r". */ static void cp_newline(CPState *cp) { CPChar c = cp_rawpeek(cp); if (cp_iseol(c) && c != cp->c) cp->p++; cp->linenumber++; } LJ_NORET static void cp_errmsg(CPState *cp, CPToken tok, ErrMsg em, ...) { const char *msg, *tokstr; lua_State *L; va_list argp; if (tok == 0) { tokstr = NULL; } else if (tok == CTOK_IDENT || tok == CTOK_INTEGER || tok == CTOK_STRING || tok >= CTOK_FIRSTDECL) { if (cp->sb.n == 0) cp_save(cp, '$'); cp_save(cp, '\0'); tokstr = cp->sb.buf; } else { tokstr = cp_tok2str(cp, tok); } L = cp->L; va_start(argp, em); msg = lj_str_pushvf(L, err2msg(em), argp); va_end(argp); if (tokstr) msg = lj_str_pushf(L, err2msg(LJ_ERR_XNEAR), msg, tokstr); if (cp->linenumber > 1) msg = lj_str_pushf(L, "%s at line %d", msg, cp->linenumber); lj_err_callermsg(L, msg); } LJ_NORET LJ_NOINLINE static void cp_err_token(CPState *cp, CPToken tok) { cp_errmsg(cp, cp->tok, LJ_ERR_XTOKEN, cp_tok2str(cp, tok)); } LJ_NORET LJ_NOINLINE static void cp_err_badidx(CPState *cp, CType *ct) { GCstr *s = lj_ctype_repr(cp->cts->L, ctype_typeid(cp->cts, ct), NULL); cp_errmsg(cp, 0, LJ_ERR_FFI_BADIDX, strdata(s)); } LJ_NORET LJ_NOINLINE static void cp_err(CPState *cp, ErrMsg em) { cp_errmsg(cp, 0, em); } /* -- Main lexical scanner ------------------------------------------------ */ /* Parse number literal. Only handles int32_t/uint32_t right now. */ static CPToken cp_number(CPState *cp) { StrScanFmt fmt; TValue o; do { cp_save(cp, cp->c); } while (lj_char_isident(cp_get(cp))); cp_save(cp, '\0'); fmt = lj_strscan_scan((const uint8_t *)cp->sb.buf, &o, STRSCAN_OPT_C); if (fmt == STRSCAN_INT) cp->val.id = CTID_INT32; else if (fmt == STRSCAN_U32) cp->val.id = CTID_UINT32; else if (!(cp->mode & CPARSE_MODE_SKIP)) cp_errmsg(cp, CTOK_INTEGER, LJ_ERR_XNUMBER); cp->val.u32 = (uint32_t)o.i; return CTOK_INTEGER; } /* Parse identifier or keyword. */ static CPToken cp_ident(CPState *cp) { do { cp_save(cp, cp->c); } while (lj_char_isident(cp_get(cp))); cp->str = lj_str_new(cp->L, cp->sb.buf, cp->sb.n); cp->val.id = lj_ctype_getname(cp->cts, &cp->ct, cp->str, cp->tmask); if (ctype_type(cp->ct->info) == CT_KW) return ctype_cid(cp->ct->info); return CTOK_IDENT; } /* Parse parameter. */ static CPToken cp_param(CPState *cp) { CPChar c = cp_get(cp); TValue *o = cp->param; if (lj_char_isident(c) || c == '$') /* Reserve $xyz for future extensions. */ cp_errmsg(cp, c, LJ_ERR_XSYNTAX); if (!o || o >= cp->L->top) cp_err(cp, LJ_ERR_FFI_NUMPARAM); cp->param = o+1; if (tvisstr(o)) { cp->str = strV(o); cp->val.id = 0; cp->ct = &cp->cts->tab[0]; return CTOK_IDENT; } else if (tvisnumber(o)) { cp->val.i32 = numberVint(o); cp->val.id = CTID_INT32; return CTOK_INTEGER; } else { GCcdata *cd; if (!tviscdata(o)) lj_err_argtype(cp->L, (int)(o-cp->L->base)+1, "type parameter"); cd = cdataV(o); if (cd->ctypeid == CTID_CTYPEID) cp->val.id = *(CTypeID *)cdataptr(cd); else cp->val.id = cd->ctypeid; return '$'; } } /* Parse string or character constant. */ static CPToken cp_string(CPState *cp) { CPChar delim = cp->c; cp_get(cp); while (cp->c != delim) { CPChar c = cp->c; if (c == '\0') cp_errmsg(cp, CTOK_EOF, LJ_ERR_XSTR); if (c == '\\') { c = cp_get(cp); switch (c) { case '\0': cp_errmsg(cp, CTOK_EOF, LJ_ERR_XSTR); break; case 'a': c = '\a'; break; case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\v'; break; case 'e': c = 27; break; case 'x': c = 0; while (lj_char_isxdigit(cp_get(cp))) c = (c<<4) + (lj_char_isdigit(cp->c) ? cp->c-'0' : (cp->c&15)+9); cp_save(cp, (c & 0xff)); continue; default: if (lj_char_isdigit(c)) { c -= '0'; if (lj_char_isdigit(cp_get(cp))) { c = c*8 + (cp->c - '0'); if (lj_char_isdigit(cp_get(cp))) { c = c*8 + (cp->c - '0'); cp_get(cp); } } cp_save(cp, (c & 0xff)); continue; } break; } } cp_save(cp, c); cp_get(cp); } cp_get(cp); if (delim == '"') { cp->str = lj_str_new(cp->L, cp->sb.buf, cp->sb.n); return CTOK_STRING; } else { if (cp->sb.n != 1) cp_err_token(cp, '\''); cp->val.i32 = (int32_t)(char)cp->sb.buf[0]; cp->val.id = CTID_INT32; return CTOK_INTEGER; } } /* Skip C comment. */ static void cp_comment_c(CPState *cp) { do { if (cp_get(cp) == '*') { do { if (cp_get(cp) == '/') { cp_get(cp); return; } } while (cp->c == '*'); } if (cp_iseol(cp->c)) cp_newline(cp); } while (cp->c != '\0'); } /* Skip C++ comment. */ static void cp_comment_cpp(CPState *cp) { while (!cp_iseol(cp_get(cp)) && cp->c != '\0') ; } /* Lexical scanner for C. Only a minimal subset is implemented. */ static CPToken cp_next_(CPState *cp) { lj_str_resetbuf(&cp->sb); for (;;) { if (lj_char_isident(cp->c)) return lj_char_isdigit(cp->c) ? cp_number(cp) : cp_ident(cp); switch (cp->c) { case '\n': case '\r': cp_newline(cp); /* fallthrough. */ case ' ': case '\t': case '\v': case '\f': cp_get(cp); break; case '"': case '\'': return cp_string(cp); case '/': if (cp_get(cp) == '*') cp_comment_c(cp); else if (cp->c == '/') cp_comment_cpp(cp); else return '/'; break; case '|': if (cp_get(cp) != '|') return '|'; cp_get(cp); return CTOK_OROR; case '&': if (cp_get(cp) != '&') return '&'; cp_get(cp); return CTOK_ANDAND; case '=': if (cp_get(cp) != '=') return '='; cp_get(cp); return CTOK_EQ; case '!': if (cp_get(cp) != '=') return '!'; cp_get(cp); return CTOK_NE; case '<': if (cp_get(cp) == '=') { cp_get(cp); return CTOK_LE; } else if (cp->c == '<') { cp_get(cp); return CTOK_SHL; } return '<'; case '>': if (cp_get(cp) == '=') { cp_get(cp); return CTOK_GE; } else if (cp->c == '>') { cp_get(cp); return CTOK_SHR; } return '>'; case '-': if (cp_get(cp) != '>') return '-'; cp_get(cp); return CTOK_DEREF; case '$': return cp_param(cp); case '\0': return CTOK_EOF; default: { CPToken c = cp->c; cp_get(cp); return c; } } } } static LJ_NOINLINE CPToken cp_next(CPState *cp) { return (cp->tok = cp_next_(cp)); } /* -- C parser ------------------------------------------------------------ */ /* Namespaces for resolving identifiers. */ #define CPNS_DEFAULT \ ((1u<linenumber = 1; cp->depth = 0; cp->curpack = 0; cp->packstack[0] = 255; lj_str_initbuf(&cp->sb); lj_str_resizebuf(cp->L, &cp->sb, LJ_MIN_SBUF); lua_assert(cp->p != NULL); cp_get(cp); /* Read-ahead first char. */ cp->tok = 0; cp->tmask = CPNS_DEFAULT; cp_next(cp); /* Read-ahead first token. */ } /* Cleanup C parser state. */ static void cp_cleanup(CPState *cp) { global_State *g = G(cp->L); lj_str_freebuf(g, &cp->sb); } /* Check and consume optional token. */ static int cp_opt(CPState *cp, CPToken tok) { if (cp->tok == tok) { cp_next(cp); return 1; } return 0; } /* Check and consume token. */ static void cp_check(CPState *cp, CPToken tok) { if (cp->tok != tok) cp_err_token(cp, tok); cp_next(cp); } /* Check if the next token may start a type declaration. */ static int cp_istypedecl(CPState *cp) { if (cp->tok >= CTOK_FIRSTDECL && cp->tok <= CTOK_LASTDECL) return 1; if (cp->tok == CTOK_IDENT && ctype_istypedef(cp->ct->info)) return 1; if (cp->tok == '$') return 1; return 0; } /* -- Constant expression evaluator --------------------------------------- */ /* Forward declarations. */ static void cp_expr_unary(CPState *cp, CPValue *k); static void cp_expr_sub(CPState *cp, CPValue *k, int pri); /* Please note that type handling is very weak here. Most ops simply ** assume integer operands. Accessors are only needed to compute types and ** return synthetic values. The only purpose of the expression evaluator ** is to compute the values of constant expressions one would typically ** find in C header files. And again: this is NOT a validating C parser! */ /* Parse comma separated expression and return last result. */ static void cp_expr_comma(CPState *cp, CPValue *k) { do { cp_expr_sub(cp, k, 0); } while (cp_opt(cp, ',')); } /* Parse sizeof/alignof operator. */ static void cp_expr_sizeof(CPState *cp, CPValue *k, int wantsz) { CTSize sz; CTInfo info; if (cp_opt(cp, '(')) { if (cp_istypedecl(cp)) k->id = cp_decl_abstract(cp); else cp_expr_comma(cp, k); cp_check(cp, ')'); } else { cp_expr_unary(cp, k); } info = lj_ctype_info(cp->cts, k->id, &sz); if (wantsz) { if (sz != CTSIZE_INVALID) k->u32 = sz; else if (k->id != CTID_A_CCHAR) /* Special case for sizeof("string"). */ cp_err(cp, LJ_ERR_FFI_INVSIZE); } else { k->u32 = 1u << ctype_align(info); } k->id = CTID_UINT32; /* Really size_t. */ } /* Parse prefix operators. */ static void cp_expr_prefix(CPState *cp, CPValue *k) { if (cp->tok == CTOK_INTEGER) { *k = cp->val; cp_next(cp); } else if (cp_opt(cp, '+')) { cp_expr_unary(cp, k); /* Nothing to do (well, integer promotion). */ } else if (cp_opt(cp, '-')) { cp_expr_unary(cp, k); k->i32 = -k->i32; } else if (cp_opt(cp, '~')) { cp_expr_unary(cp, k); k->i32 = ~k->i32; } else if (cp_opt(cp, '!')) { cp_expr_unary(cp, k); k->i32 = !k->i32; k->id = CTID_INT32; } else if (cp_opt(cp, '(')) { if (cp_istypedecl(cp)) { /* Cast operator. */ CTypeID id = cp_decl_abstract(cp); cp_check(cp, ')'); cp_expr_unary(cp, k); k->id = id; /* No conversion performed. */ } else { /* Sub-expression. */ cp_expr_comma(cp, k); cp_check(cp, ')'); } } else if (cp_opt(cp, '*')) { /* Indirection. */ CType *ct; cp_expr_unary(cp, k); ct = lj_ctype_rawref(cp->cts, k->id); if (!ctype_ispointer(ct->info)) cp_err_badidx(cp, ct); k->u32 = 0; k->id = ctype_cid(ct->info); } else if (cp_opt(cp, '&')) { /* Address operator. */ cp_expr_unary(cp, k); k->id = lj_ctype_intern(cp->cts, CTINFO(CT_PTR, CTALIGN_PTR+k->id), CTSIZE_PTR); } else if (cp_opt(cp, CTOK_SIZEOF)) { cp_expr_sizeof(cp, k, 1); } else if (cp_opt(cp, CTOK_ALIGNOF)) { cp_expr_sizeof(cp, k, 0); } else if (cp->tok == CTOK_IDENT) { if (ctype_type(cp->ct->info) == CT_CONSTVAL) { k->u32 = cp->ct->size; k->id = ctype_cid(cp->ct->info); } else if (ctype_type(cp->ct->info) == CT_EXTERN) { k->u32 = cp->val.id; k->id = ctype_cid(cp->ct->info); } else if (ctype_type(cp->ct->info) == CT_FUNC) { k->u32 = cp->val.id; k->id = cp->val.id; } else { goto err_expr; } cp_next(cp); } else if (cp->tok == CTOK_STRING) { CTSize sz = cp->str->len; while (cp_next(cp) == CTOK_STRING) sz += cp->str->len; k->u32 = sz + 1; k->id = CTID_A_CCHAR; } else { err_expr: cp_errmsg(cp, cp->tok, LJ_ERR_XSYMBOL); } } /* Parse postfix operators. */ static void cp_expr_postfix(CPState *cp, CPValue *k) { for (;;) { CType *ct; if (cp_opt(cp, '[')) { /* Array/pointer index. */ CPValue k2; cp_expr_comma(cp, &k2); ct = lj_ctype_rawref(cp->cts, k->id); if (!ctype_ispointer(ct->info)) { ct = lj_ctype_rawref(cp->cts, k2.id); if (!ctype_ispointer(ct->info)) cp_err_badidx(cp, ct); } cp_check(cp, ']'); k->u32 = 0; } else if (cp->tok == '.' || cp->tok == CTOK_DEREF) { /* Struct deref. */ CTSize ofs; CType *fct; ct = lj_ctype_rawref(cp->cts, k->id); if (cp->tok == CTOK_DEREF) { if (!ctype_ispointer(ct->info)) cp_err_badidx(cp, ct); ct = lj_ctype_rawref(cp->cts, ctype_cid(ct->info)); } cp_next(cp); if (cp->tok != CTOK_IDENT) cp_err_token(cp, CTOK_IDENT); if (!ctype_isstruct(ct->info) || ct->size == CTSIZE_INVALID || !(fct = lj_ctype_getfield(cp->cts, ct, cp->str, &ofs)) || ctype_isbitfield(fct->info)) { GCstr *s = lj_ctype_repr(cp->cts->L, ctype_typeid(cp->cts, ct), NULL); cp_errmsg(cp, 0, LJ_ERR_FFI_BADMEMBER, strdata(s), strdata(cp->str)); } ct = fct; k->u32 = ctype_isconstval(ct->info) ? ct->size : 0; cp_next(cp); } else { return; } k->id = ctype_cid(ct->info); } } /* Parse infix operators. */ static void cp_expr_infix(CPState *cp, CPValue *k, int pri) { CPValue k2; k2.u32 = 0; k2.id = 0; /* Silence the compiler. */ for (;;) { switch (pri) { case 0: if (cp_opt(cp, '?')) { CPValue k3; cp_expr_comma(cp, &k2); /* Right-associative. */ cp_check(cp, ':'); cp_expr_sub(cp, &k3, 0); k->u32 = k->u32 ? k2.u32 : k3.u32; k->id = k2.id > k3.id ? k2.id : k3.id; continue; } case 1: if (cp_opt(cp, CTOK_OROR)) { cp_expr_sub(cp, &k2, 2); k->i32 = k->u32 || k2.u32; k->id = CTID_INT32; continue; } case 2: if (cp_opt(cp, CTOK_ANDAND)) { cp_expr_sub(cp, &k2, 3); k->i32 = k->u32 && k2.u32; k->id = CTID_INT32; continue; } case 3: if (cp_opt(cp, '|')) { cp_expr_sub(cp, &k2, 4); k->u32 = k->u32 | k2.u32; goto arith_result; } case 4: if (cp_opt(cp, '^')) { cp_expr_sub(cp, &k2, 5); k->u32 = k->u32 ^ k2.u32; goto arith_result; } case 5: if (cp_opt(cp, '&')) { cp_expr_sub(cp, &k2, 6); k->u32 = k->u32 & k2.u32; goto arith_result; } case 6: if (cp_opt(cp, CTOK_EQ)) { cp_expr_sub(cp, &k2, 7); k->i32 = k->u32 == k2.u32; k->id = CTID_INT32; continue; } else if (cp_opt(cp, CTOK_NE)) { cp_expr_sub(cp, &k2, 7); k->i32 = k->u32 != k2.u32; k->id = CTID_INT32; continue; } case 7: if (cp_opt(cp, '<')) { cp_expr_sub(cp, &k2, 8); if (k->id == CTID_INT32 && k2.id == CTID_INT32) k->i32 = k->i32 < k2.i32; else k->i32 = k->u32 < k2.u32; k->id = CTID_INT32; continue; } else if (cp_opt(cp, '>')) { cp_expr_sub(cp, &k2, 8); if (k->id == CTID_INT32 && k2.id == CTID_INT32) k->i32 = k->i32 > k2.i32; else k->i32 = k->u32 > k2.u32; k->id = CTID_INT32; continue; } else if (cp_opt(cp, CTOK_LE)) { cp_expr_sub(cp, &k2, 8); if (k->id == CTID_INT32 && k2.id == CTID_INT32) k->i32 = k->i32 <= k2.i32; else k->i32 = k->u32 <= k2.u32; k->id = CTID_INT32; continue; } else if (cp_opt(cp, CTOK_GE)) { cp_expr_sub(cp, &k2, 8); if (k->id == CTID_INT32 && k2.id == CTID_INT32) k->i32 = k->i32 >= k2.i32; else k->i32 = k->u32 >= k2.u32; k->id = CTID_INT32; continue; } case 8: if (cp_opt(cp, CTOK_SHL)) { cp_expr_sub(cp, &k2, 9); k->u32 = k->u32 << k2.u32; continue; } else if (cp_opt(cp, CTOK_SHR)) { cp_expr_sub(cp, &k2, 9); if (k->id == CTID_INT32) k->i32 = k->i32 >> k2.i32; else k->u32 = k->u32 >> k2.u32; continue; } case 9: if (cp_opt(cp, '+')) { cp_expr_sub(cp, &k2, 10); k->u32 = k->u32 + k2.u32; arith_result: if (k2.id > k->id) k->id = k2.id; /* Trivial promotion to unsigned. */ continue; } else if (cp_opt(cp, '-')) { cp_expr_sub(cp, &k2, 10); k->u32 = k->u32 - k2.u32; goto arith_result; } case 10: if (cp_opt(cp, '*')) { cp_expr_unary(cp, &k2); k->u32 = k->u32 * k2.u32; goto arith_result; } else if (cp_opt(cp, '/')) { cp_expr_unary(cp, &k2); if (k2.id > k->id) k->id = k2.id; /* Trivial promotion to unsigned. */ if (k2.u32 == 0 || (k->id == CTID_INT32 && k->u32 == 0x80000000u && k2.i32 == -1)) cp_err(cp, LJ_ERR_BADVAL); if (k->id == CTID_INT32) k->i32 = k->i32 / k2.i32; else k->u32 = k->u32 / k2.u32; continue; } else if (cp_opt(cp, '%')) { cp_expr_unary(cp, &k2); if (k2.id > k->id) k->id = k2.id; /* Trivial promotion to unsigned. */ if (k2.u32 == 0 || (k->id == CTID_INT32 && k->u32 == 0x80000000u && k2.i32 == -1)) cp_err(cp, LJ_ERR_BADVAL); if (k->id == CTID_INT32) k->i32 = k->i32 % k2.i32; else k->u32 = k->u32 % k2.u32; continue; } default: return; } } } /* Parse and evaluate unary expression. */ static void cp_expr_unary(CPState *cp, CPValue *k) { if (++cp->depth > CPARSE_MAX_DECLDEPTH) cp_err(cp, LJ_ERR_XLEVELS); cp_expr_prefix(cp, k); cp_expr_postfix(cp, k); cp->depth--; } /* Parse and evaluate sub-expression. */ static void cp_expr_sub(CPState *cp, CPValue *k, int pri) { cp_expr_unary(cp, k); cp_expr_infix(cp, k, pri); } /* Parse constant integer expression. */ static void cp_expr_kint(CPState *cp, CPValue *k) { CType *ct; cp_expr_sub(cp, k, 0); ct = ctype_raw(cp->cts, k->id); if (!ctype_isinteger(ct->info)) cp_err(cp, LJ_ERR_BADVAL); } /* Parse (non-negative) size expression. */ static CTSize cp_expr_ksize(CPState *cp) { CPValue k; cp_expr_kint(cp, &k); if (k.u32 >= 0x80000000u) cp_err(cp, LJ_ERR_FFI_INVSIZE); return k.u32; } /* -- Type declaration stack management ----------------------------------- */ /* Add declaration element behind the insertion position. */ static CPDeclIdx cp_add(CPDecl *decl, CTInfo info, CTSize size) { CPDeclIdx top = decl->top; if (top >= CPARSE_MAX_DECLSTACK) cp_err(decl->cp, LJ_ERR_XLEVELS); decl->stack[top].info = info; decl->stack[top].size = size; decl->stack[top].sib = 0; setgcrefnull(decl->stack[top].name); decl->stack[top].next = decl->stack[decl->pos].next; decl->stack[decl->pos].next = (CTypeID1)top; decl->top = top+1; return top; } /* Push declaration element before the insertion position. */ static CPDeclIdx cp_push(CPDecl *decl, CTInfo info, CTSize size) { return (decl->pos = cp_add(decl, info, size)); } /* Push or merge attributes. */ static void cp_push_attributes(CPDecl *decl) { CType *ct = &decl->stack[decl->pos]; if (ctype_isfunc(ct->info)) { /* Ok to modify in-place. */ #if LJ_TARGET_X86 if ((decl->fattr & CTFP_CCONV)) ct->info = (ct->info & (CTMASK_NUM|CTF_VARARG|CTMASK_CID)) + (decl->fattr & ~CTMASK_CID); #endif } else { if ((decl->attr & CTFP_ALIGNED) && !(decl->mode & CPARSE_MODE_FIELD)) cp_push(decl, CTINFO(CT_ATTRIB, CTATTRIB(CTA_ALIGN)), ctype_align(decl->attr)); } } /* Push unrolled type to declaration stack and merge qualifiers. */ static void cp_push_type(CPDecl *decl, CTypeID id) { CType *ct = ctype_get(decl->cp->cts, id); CTInfo info = ct->info; CTSize size = ct->size; switch (ctype_type(info)) { case CT_STRUCT: case CT_ENUM: cp_push(decl, CTINFO(CT_TYPEDEF, id), 0); /* Don't copy unique types. */ if ((decl->attr & CTF_QUAL)) { /* Push unmerged qualifiers. */ cp_push(decl, CTINFO(CT_ATTRIB, CTATTRIB(CTA_QUAL)), (decl->attr & CTF_QUAL)); decl->attr &= ~CTF_QUAL; } break; case CT_ATTRIB: if (ctype_isxattrib(info, CTA_QUAL)) decl->attr &= ~size; /* Remove redundant qualifiers. */ cp_push_type(decl, ctype_cid(info)); /* Unroll. */ cp_push(decl, info & ~CTMASK_CID, size); /* Copy type. */ break; case CT_ARRAY: cp_push_type(decl, ctype_cid(info)); /* Unroll. */ cp_push(decl, info & ~CTMASK_CID, size); /* Copy type. */ decl->stack[decl->pos].sib = 1; /* Mark as already checked and sized. */ /* Note: this is not copied to the ct->sib in the C type table. */ break; case CT_FUNC: /* Copy type, link parameters (shared). */ decl->stack[cp_push(decl, info, size)].sib = ct->sib; break; default: /* Copy type, merge common qualifiers. */ cp_push(decl, info|(decl->attr & CTF_QUAL), size); decl->attr &= ~CTF_QUAL; break; } } /* Consume the declaration element chain and intern the C type. */ static CTypeID cp_decl_intern(CPState *cp, CPDecl *decl) { CTypeID id = 0; CPDeclIdx idx = 0; CTSize csize = CTSIZE_INVALID; CTSize cinfo = 0; do { CType *ct = &decl->stack[idx]; CTInfo info = ct->info; CTInfo size = ct->size; /* The cid is already part of info for copies of pointers/functions. */ idx = ct->next; if (ctype_istypedef(info)) { lua_assert(id == 0); id = ctype_cid(info); /* Always refetch info/size, since struct/enum may have been completed. */ cinfo = ctype_get(cp->cts, id)->info; csize = ctype_get(cp->cts, id)->size; lua_assert(ctype_isstruct(cinfo) || ctype_isenum(cinfo)); } else if (ctype_isfunc(info)) { /* Intern function. */ CType *fct; CTypeID fid; CTypeID sib; if (id) { CType *refct = ctype_raw(cp->cts, id); /* Reject function or refarray return types. */ if (ctype_isfunc(refct->info) || ctype_isrefarray(refct->info)) cp_err(cp, LJ_ERR_FFI_INVTYPE); } /* No intervening attributes allowed, skip forward. */ while (idx) { CType *ctn = &decl->stack[idx]; if (!ctype_isattrib(ctn->info)) break; idx = ctn->next; /* Skip attribute. */ } sib = ct->sib; /* Next line may reallocate the C type table. */ fid = lj_ctype_new(cp->cts, &fct); csize = CTSIZE_INVALID; fct->info = cinfo = info + id; fct->size = size; fct->sib = sib; id = fid; } else if (ctype_isattrib(info)) { if (ctype_isxattrib(info, CTA_QUAL)) cinfo |= size; else if (ctype_isxattrib(info, CTA_ALIGN)) CTF_INSERT(cinfo, ALIGN, size); id = lj_ctype_intern(cp->cts, info+id, size); /* Inherit csize/cinfo from original type. */ } else { if (ctype_isnum(info)) { /* Handle mode/vector-size attributes. */ lua_assert(id == 0); if (!(info & CTF_BOOL)) { CTSize msize = ctype_msizeP(decl->attr); CTSize vsize = ctype_vsizeP(decl->attr); if (msize && (!(info & CTF_FP) || (msize == 4 || msize == 8))) { CTSize malign = lj_fls(msize); if (malign > 4) malign = 4; /* Limit alignment. */ CTF_INSERT(info, ALIGN, malign); size = msize; /* Override size via mode. */ } if (vsize) { /* Vector size set? */ CTSize esize = lj_fls(size); if (vsize >= esize) { /* Intern the element type first. */ id = lj_ctype_intern(cp->cts, info, size); /* Then create a vector (array) with vsize alignment. */ size = (1u << vsize); if (vsize > 4) vsize = 4; /* Limit alignment. */ if (ctype_align(info) > vsize) vsize = ctype_align(info); info = CTINFO(CT_ARRAY, (info & CTF_QUAL) + CTF_VECTOR + CTALIGN(vsize)); } } } } else if (ctype_isptr(info)) { /* Reject pointer/ref to ref. */ if (id && ctype_isref(ctype_raw(cp->cts, id)->info)) cp_err(cp, LJ_ERR_FFI_INVTYPE); if (ctype_isref(info)) { info &= ~CTF_VOLATILE; /* Refs are always const, never volatile. */ /* No intervening attributes allowed, skip forward. */ while (idx) { CType *ctn = &decl->stack[idx]; if (!ctype_isattrib(ctn->info)) break; idx = ctn->next; /* Skip attribute. */ } } } else if (ctype_isarray(info)) { /* Check for valid array size etc. */ if (ct->sib == 0) { /* Only check/size arrays not copied by unroll. */ if (ctype_isref(cinfo)) /* Reject arrays of refs. */ cp_err(cp, LJ_ERR_FFI_INVTYPE); /* Reject VLS or unknown-sized types. */ if (ctype_isvltype(cinfo) || csize == CTSIZE_INVALID) cp_err(cp, LJ_ERR_FFI_INVSIZE); /* a[] and a[?] keep their invalid size. */ if (size != CTSIZE_INVALID) { uint64_t xsz = (uint64_t)size * csize; if (xsz >= 0x80000000u) cp_err(cp, LJ_ERR_FFI_INVSIZE); size = (CTSize)xsz; } } if ((cinfo & CTF_ALIGN) > (info & CTF_ALIGN)) /* Find max. align. */ info = (info & ~CTF_ALIGN) | (cinfo & CTF_ALIGN); info |= (cinfo & CTF_QUAL); /* Inherit qual. */ } else { lua_assert(ctype_isvoid(info)); } csize = size; cinfo = info+id; id = lj_ctype_intern(cp->cts, info+id, size); } } while (idx); return id; } /* -- C declaration parser ------------------------------------------------ */ #define H_(le, be) LJ_ENDIAN_SELECT(0x##le, 0x##be) /* Reset declaration state to declaration specifier. */ static void cp_decl_reset(CPDecl *decl) { decl->pos = decl->specpos; decl->top = decl->specpos+1; decl->stack[decl->specpos].next = 0; decl->attr = decl->specattr; decl->fattr = decl->specfattr; decl->name = NULL; decl->redir = NULL; } /* Parse constant initializer. */ /* NYI: FP constants and strings as initializers. */ static CTypeID cp_decl_constinit(CPState *cp, CType **ctp, CTypeID ctypeid) { CType *ctt = ctype_get(cp->cts, ctypeid); CTInfo info; CTSize size; CPValue k; CTypeID constid; while (ctype_isattrib(ctt->info)) { /* Skip attributes. */ ctypeid = ctype_cid(ctt->info); /* Update ID, too. */ ctt = ctype_get(cp->cts, ctypeid); } info = ctt->info; size = ctt->size; if (!ctype_isinteger(info) || !(info & CTF_CONST) || size > 4) cp_err(cp, LJ_ERR_FFI_INVTYPE); cp_check(cp, '='); cp_expr_sub(cp, &k, 0); constid = lj_ctype_new(cp->cts, ctp); (*ctp)->info = CTINFO(CT_CONSTVAL, CTF_CONST|ctypeid); k.u32 <<= 8*(4-size); if ((info & CTF_UNSIGNED)) k.u32 >>= 8*(4-size); else k.u32 = (uint32_t)((int32_t)k.u32 >> 8*(4-size)); (*ctp)->size = k.u32; return constid; } /* Parse size in parentheses as part of attribute. */ static CTSize cp_decl_sizeattr(CPState *cp) { CTSize sz; uint32_t oldtmask = cp->tmask; cp->tmask = CPNS_DEFAULT; /* Required for expression evaluator. */ cp_check(cp, '('); sz = cp_expr_ksize(cp); cp->tmask = oldtmask; cp_check(cp, ')'); return sz; } /* Parse alignment attribute. */ static void cp_decl_align(CPState *cp, CPDecl *decl) { CTSize al = 4; /* Unspecified alignment is 16 bytes. */ if (cp->tok == '(') { al = cp_decl_sizeattr(cp); al = al ? lj_fls(al) : 0; } CTF_INSERT(decl->attr, ALIGN, al); decl->attr |= CTFP_ALIGNED; } /* Parse GCC asm("name") redirect. */ static void cp_decl_asm(CPState *cp, CPDecl *decl) { UNUSED(decl); cp_next(cp); cp_check(cp, '('); if (cp->tok == CTOK_STRING) { GCstr *str = cp->str; while (cp_next(cp) == CTOK_STRING) { lj_str_pushf(cp->L, "%s%s", strdata(str), strdata(cp->str)); cp->L->top--; str = strV(cp->L->top); } decl->redir = str; } cp_check(cp, ')'); } /* Parse GCC __attribute__((mode(...))). */ static void cp_decl_mode(CPState *cp, CPDecl *decl) { cp_check(cp, '('); if (cp->tok == CTOK_IDENT) { const char *s = strdata(cp->str); CTSize sz = 0, vlen = 0; if (s[0] == '_' && s[1] == '_') s += 2; if (*s == 'V') { s++; vlen = *s++ - '0'; if (*s >= '0' && *s <= '9') vlen = vlen*10 + (*s++ - '0'); } switch (*s++) { case 'Q': sz = 1; break; case 'H': sz = 2; break; case 'S': sz = 4; break; case 'D': sz = 8; break; case 'T': sz = 16; break; case 'O': sz = 32; break; default: goto bad_size; } if (*s == 'I' || *s == 'F') { CTF_INSERT(decl->attr, MSIZEP, sz); if (vlen) CTF_INSERT(decl->attr, VSIZEP, lj_fls(vlen*sz)); } bad_size: cp_next(cp); } cp_check(cp, ')'); } /* Parse GCC __attribute__((...)). */ static void cp_decl_gccattribute(CPState *cp, CPDecl *decl) { cp_next(cp); cp_check(cp, '('); cp_check(cp, '('); while (cp->tok != ')') { if (cp->tok == CTOK_IDENT) { GCstr *attrstr = cp->str; cp_next(cp); switch (attrstr->hash) { case H_(64a9208e,8ce14319): case H_(8e6331b2,95a282af): /* aligned */ cp_decl_align(cp, decl); break; case H_(42eb47de,f0ede26c): case H_(29f48a09,cf383e0c): /* packed */ decl->attr |= CTFP_PACKED; break; case H_(0a84eef6,8dfab04c): case H_(995cf92c,d5696591): /* mode */ cp_decl_mode(cp, decl); break; case H_(0ab31997,2d5213fa): case H_(bf875611,200e9990): /* vector_size */ { CTSize vsize = cp_decl_sizeattr(cp); if (vsize) CTF_INSERT(decl->attr, VSIZEP, lj_fls(vsize)); } break; #if LJ_TARGET_X86 case H_(5ad22db8,c689b848): case H_(439150fa,65ea78cb): /* regparm */ CTF_INSERT(decl->fattr, REGPARM, cp_decl_sizeattr(cp)); decl->fattr |= CTFP_CCONV; break; case H_(18fc0b98,7ff4c074): case H_(4e62abed,0a747424): /* cdecl */ CTF_INSERT(decl->fattr, CCONV, CTCC_CDECL); decl->fattr |= CTFP_CCONV; break; case H_(72b2e41b,494c5a44): case H_(f2356d59,f25fc9bd): /* thiscall */ CTF_INSERT(decl->fattr, CCONV, CTCC_THISCALL); decl->fattr |= CTFP_CCONV; break; case H_(0d0ffc42,ab746f88): case H_(21c54ba1,7f0ca7e3): /* fastcall */ CTF_INSERT(decl->fattr, CCONV, CTCC_FASTCALL); decl->fattr |= CTFP_CCONV; break; case H_(ef76b040,9412e06a): case H_(de56697b,c750e6e1): /* stdcall */ CTF_INSERT(decl->fattr, CCONV, CTCC_STDCALL); decl->fattr |= CTFP_CCONV; break; case H_(ea78b622,f234bd8e): case H_(252ffb06,8d50f34b): /* sseregparm */ decl->fattr |= CTF_SSEREGPARM; decl->fattr |= CTFP_CCONV; break; #endif default: /* Skip all other attributes. */ goto skip_attr; } } else if (cp->tok >= CTOK_FIRSTDECL) { /* For __attribute((const)) etc. */ cp_next(cp); skip_attr: if (cp_opt(cp, '(')) { while (cp->tok != ')' && cp->tok != CTOK_EOF) cp_next(cp); cp_check(cp, ')'); } } else { break; } if (!cp_opt(cp, ',')) break; } cp_check(cp, ')'); cp_check(cp, ')'); } /* Parse MSVC __declspec(...). */ static void cp_decl_msvcattribute(CPState *cp, CPDecl *decl) { cp_next(cp); cp_check(cp, '('); while (cp->tok == CTOK_IDENT) { GCstr *attrstr = cp->str; cp_next(cp); switch (attrstr->hash) { case H_(bc2395fa,98f267f8): /* align */ cp_decl_align(cp, decl); break; default: /* Ignore all other attributes. */ if (cp_opt(cp, '(')) { while (cp->tok != ')' && cp->tok != CTOK_EOF) cp_next(cp); cp_check(cp, ')'); } break; } } cp_check(cp, ')'); } /* Parse declaration attributes (and common qualifiers). */ static void cp_decl_attributes(CPState *cp, CPDecl *decl) { for (;;) { switch (cp->tok) { case CTOK_CONST: decl->attr |= CTF_CONST; break; case CTOK_VOLATILE: decl->attr |= CTF_VOLATILE; break; case CTOK_RESTRICT: break; /* Ignore. */ case CTOK_EXTENSION: break; /* Ignore. */ case CTOK_ATTRIBUTE: cp_decl_gccattribute(cp, decl); continue; case CTOK_ASM: cp_decl_asm(cp, decl); continue; case CTOK_DECLSPEC: cp_decl_msvcattribute(cp, decl); continue; case CTOK_CCDECL: #if LJ_TARGET_X86 CTF_INSERT(decl->fattr, CCONV, cp->ct->size); decl->fattr |= CTFP_CCONV; #endif break; case CTOK_PTRSZ: #if LJ_64 CTF_INSERT(decl->attr, MSIZEP, cp->ct->size); #endif break; default: return; } cp_next(cp); } } /* Parse struct/union/enum name. */ static CTypeID cp_struct_name(CPState *cp, CPDecl *sdecl, CTInfo info) { CTypeID sid; CType *ct; cp->tmask = CPNS_STRUCT; cp_next(cp); cp_decl_attributes(cp, sdecl); cp->tmask = CPNS_DEFAULT; if (cp->tok != '{') { if (cp->tok != CTOK_IDENT) cp_err_token(cp, CTOK_IDENT); if (cp->val.id) { /* Name of existing struct/union/enum. */ sid = cp->val.id; ct = cp->ct; if ((ct->info ^ info) & (CTMASK_NUM|CTF_UNION)) /* Wrong type. */ cp_errmsg(cp, 0, LJ_ERR_FFI_REDEF, strdata(gco2str(gcref(ct->name)))); } else { /* Create named, incomplete struct/union/enum. */ if ((cp->mode & CPARSE_MODE_NOIMPLICIT)) cp_errmsg(cp, 0, LJ_ERR_FFI_BADTAG, strdata(cp->str)); sid = lj_ctype_new(cp->cts, &ct); ct->info = info; ct->size = CTSIZE_INVALID; ctype_setname(ct, cp->str); lj_ctype_addname(cp->cts, ct, sid); } cp_next(cp); } else { /* Create anonymous, incomplete struct/union/enum. */ sid = lj_ctype_new(cp->cts, &ct); ct->info = info; ct->size = CTSIZE_INVALID; } if (cp->tok == '{') { if (ct->size != CTSIZE_INVALID || ct->sib) cp_errmsg(cp, 0, LJ_ERR_FFI_REDEF, strdata(gco2str(gcref(ct->name)))); ct->sib = 1; /* Indicate the type is currently being defined. */ } return sid; } /* Determine field alignment. */ static CTSize cp_field_align(CPState *cp, CType *ct, CTInfo info) { CTSize align = ctype_align(info); UNUSED(cp); UNUSED(ct); #if (LJ_TARGET_X86 && !LJ_ABI_WIN) || (LJ_TARGET_ARM && __APPLE__) /* The SYSV i386 and iOS ABIs limit alignment of non-vector fields to 2^2. */ if (align > 2 && !(info & CTFP_ALIGNED)) { if (ctype_isarray(info) && !(info & CTF_VECTOR)) { do { ct = ctype_rawchild(cp->cts, ct); info = ct->info; } while (ctype_isarray(info) && !(info & CTF_VECTOR)); } if (ctype_isnum(info) || ctype_isenum(info)) align = 2; } #endif return align; } /* Layout struct/union fields. */ static void cp_struct_layout(CPState *cp, CTypeID sid, CTInfo sattr) { CTSize bofs = 0, bmaxofs = 0; /* Bit offset and max. bit offset. */ CTSize maxalign = ctype_align(sattr); CType *sct = ctype_get(cp->cts, sid); CTInfo sinfo = sct->info; CTypeID fieldid = sct->sib; while (fieldid) { CType *ct = ctype_get(cp->cts, fieldid); CTInfo attr = ct->size; /* Field declaration attributes (temp.). */ if (ctype_isfield(ct->info) || (ctype_isxattrib(ct->info, CTA_SUBTYPE) && attr)) { CTSize align, amask; /* Alignment (pow2) and alignment mask (bits). */ CTSize sz; CTInfo info = lj_ctype_info(cp->cts, ctype_cid(ct->info), &sz); CTSize bsz, csz = 8*sz; /* Field size and container size (in bits). */ sinfo |= (info & (CTF_QUAL|CTF_VLA)); /* Merge pseudo-qualifiers. */ /* Check for size overflow and determine alignment. */ if (sz >= 0x20000000u || bofs + csz < bofs) { if (!(sz == CTSIZE_INVALID && ctype_isarray(info) && !(sinfo & CTF_UNION))) cp_err(cp, LJ_ERR_FFI_INVSIZE); csz = sz = 0; /* Treat a[] and a[?] as zero-sized. */ } align = cp_field_align(cp, ct, info); if (((attr|sattr) & CTFP_PACKED) || ((attr & CTFP_ALIGNED) && ctype_align(attr) > align)) align = ctype_align(attr); if (cp->packstack[cp->curpack] < align) align = cp->packstack[cp->curpack]; if (align > maxalign) maxalign = align; amask = (8u << align) - 1; bsz = ctype_bitcsz(ct->info); /* Bitfield size (temp.). */ if (bsz == CTBSZ_FIELD || !ctype_isfield(ct->info)) { bsz = csz; /* Regular fields or subtypes always fill the container. */ bofs = (bofs + amask) & ~amask; /* Start new aligned field. */ ct->size = (bofs >> 3); /* Store field offset. */ } else { /* Bitfield. */ if (bsz == 0 || (attr & CTFP_ALIGNED) || (!((attr|sattr) & CTFP_PACKED) && (bofs & amask) + bsz > csz)) bofs = (bofs + amask) & ~amask; /* Start new aligned field. */ /* Prefer regular field over bitfield. */ if (bsz == csz && (bofs & amask) == 0) { ct->info = CTINFO(CT_FIELD, ctype_cid(ct->info)); ct->size = (bofs >> 3); /* Store field offset. */ } else { ct->info = CTINFO(CT_BITFIELD, (info & (CTF_QUAL|CTF_UNSIGNED|CTF_BOOL)) + (csz << (CTSHIFT_BITCSZ-3)) + (bsz << CTSHIFT_BITBSZ)); #if LJ_BE ct->info += ((csz - (bofs & (csz-1)) - bsz) << CTSHIFT_BITPOS); #else ct->info += ((bofs & (csz-1)) << CTSHIFT_BITPOS); #endif ct->size = ((bofs & ~(csz-1)) >> 3); /* Store container offset. */ } } /* Determine next offset or max. offset. */ if ((sinfo & CTF_UNION)) { if (bsz > bmaxofs) bmaxofs = bsz; } else { bofs += bsz; } } /* All other fields in the chain are already set up. */ fieldid = ct->sib; } /* Complete struct/union. */ sct->info = sinfo + CTALIGN(maxalign); bofs = (sinfo & CTF_UNION) ? bmaxofs : bofs; maxalign = (8u << maxalign) - 1; sct->size = (((bofs + maxalign) & ~maxalign) >> 3); } /* Parse struct/union declaration. */ static CTypeID cp_decl_struct(CPState *cp, CPDecl *sdecl, CTInfo sinfo) { CTypeID sid = cp_struct_name(cp, sdecl, sinfo); if (cp_opt(cp, '{')) { /* Struct/union definition. */ CTypeID lastid = sid; int lastdecl = 0; while (cp->tok != '}') { CPDecl decl; CPscl scl = cp_decl_spec(cp, &decl, CDF_STATIC); decl.mode = scl ? CPARSE_MODE_DIRECT : CPARSE_MODE_DIRECT|CPARSE_MODE_ABSTRACT|CPARSE_MODE_FIELD; for (;;) { CTypeID ctypeid; if (lastdecl) cp_err_token(cp, '}'); /* Parse field declarator. */ decl.bits = CTSIZE_INVALID; cp_declarator(cp, &decl); ctypeid = cp_decl_intern(cp, &decl); if ((scl & CDF_STATIC)) { /* Static constant in struct namespace. */ CType *ct; CTypeID fieldid = cp_decl_constinit(cp, &ct, ctypeid); ctype_get(cp->cts, lastid)->sib = fieldid; lastid = fieldid; ctype_setname(ct, decl.name); } else { CTSize bsz = CTBSZ_FIELD; /* Temp. for layout phase. */ CType *ct; CTypeID fieldid = lj_ctype_new(cp->cts, &ct); /* Do this first. */ CType *tct = ctype_raw(cp->cts, ctypeid); if (decl.bits == CTSIZE_INVALID) { /* Regular field. */ if (ctype_isarray(tct->info) && tct->size == CTSIZE_INVALID) lastdecl = 1; /* a[] or a[?] must be the last declared field. */ /* Accept transparent struct/union/enum. */ if (!decl.name) { if (!((ctype_isstruct(tct->info) && !(tct->info & CTF_VLA)) || ctype_isenum(tct->info))) cp_err_token(cp, CTOK_IDENT); ct->info = CTINFO(CT_ATTRIB, CTATTRIB(CTA_SUBTYPE) + ctypeid); ct->size = ctype_isstruct(tct->info) ? (decl.attr|0x80000000u) : 0; /* For layout phase. */ goto add_field; } } else { /* Bitfield. */ bsz = decl.bits; if (!ctype_isinteger_or_bool(tct->info) || (bsz == 0 && decl.name) || 8*tct->size > CTBSZ_MAX || bsz > ((tct->info & CTF_BOOL) ? 1 : 8*tct->size)) cp_errmsg(cp, ':', LJ_ERR_BADVAL); } /* Create temporary field for layout phase. */ ct->info = CTINFO(CT_FIELD, ctypeid + (bsz << CTSHIFT_BITCSZ)); ct->size = decl.attr; if (decl.name) ctype_setname(ct, decl.name); add_field: ctype_get(cp->cts, lastid)->sib = fieldid; lastid = fieldid; } if (!cp_opt(cp, ',')) break; cp_decl_reset(&decl); } cp_check(cp, ';'); } cp_check(cp, '}'); ctype_get(cp->cts, lastid)->sib = 0; /* Drop sib = 1 for empty structs. */ cp_decl_attributes(cp, sdecl); /* Layout phase needs postfix attributes. */ cp_struct_layout(cp, sid, sdecl->attr); } return sid; } /* Parse enum declaration. */ static CTypeID cp_decl_enum(CPState *cp, CPDecl *sdecl) { CTypeID eid = cp_struct_name(cp, sdecl, CTINFO(CT_ENUM, CTID_VOID)); CTInfo einfo = CTINFO(CT_ENUM, CTALIGN(2) + CTID_UINT32); CTSize esize = 4; /* Only 32 bit enums are supported. */ if (cp_opt(cp, '{')) { /* Enum definition. */ CPValue k; CTypeID lastid = eid; k.u32 = 0; k.id = CTID_INT32; do { GCstr *name = cp->str; if (cp->tok != CTOK_IDENT) cp_err_token(cp, CTOK_IDENT); if (cp->val.id) cp_errmsg(cp, 0, LJ_ERR_FFI_REDEF, strdata(name)); cp_next(cp); if (cp_opt(cp, '=')) { cp_expr_kint(cp, &k); if (k.id == CTID_UINT32) { /* C99 says that enum constants are always (signed) integers. ** But since unsigned constants like 0x80000000 are quite common, ** those are left as uint32_t. */ if (k.i32 >= 0) k.id = CTID_INT32; } else { /* OTOH it's common practice and even mandated by some ABIs ** that the enum type itself is unsigned, unless there are any ** negative constants. */ k.id = CTID_INT32; if (k.i32 < 0) einfo = CTINFO(CT_ENUM, CTALIGN(2) + CTID_INT32); } } /* Add named enum constant. */ { CType *ct; CTypeID constid = lj_ctype_new(cp->cts, &ct); ctype_get(cp->cts, lastid)->sib = constid; lastid = constid; ctype_setname(ct, name); ct->info = CTINFO(CT_CONSTVAL, CTF_CONST|k.id); ct->size = k.u32++; if (k.u32 == 0x80000000u) k.id = CTID_UINT32; lj_ctype_addname(cp->cts, ct, constid); } if (!cp_opt(cp, ',')) break; } while (cp->tok != '}'); /* Trailing ',' is ok. */ cp_check(cp, '}'); /* Complete enum. */ ctype_get(cp->cts, eid)->info = einfo; ctype_get(cp->cts, eid)->size = esize; } return eid; } /* Parse declaration specifiers. */ static CPscl cp_decl_spec(CPState *cp, CPDecl *decl, CPscl scl) { uint32_t cds = 0, sz = 0; CTypeID tdef = 0; decl->cp = cp; decl->mode = cp->mode; decl->name = NULL; decl->redir = NULL; decl->attr = 0; decl->fattr = 0; decl->pos = decl->top = 0; decl->stack[0].next = 0; for (;;) { /* Parse basic types. */ cp_decl_attributes(cp, decl); if (cp->tok >= CTOK_FIRSTDECL && cp->tok <= CTOK_LASTDECLFLAG) { uint32_t cbit; if (cp->ct->size) { if (sz) goto end_decl; sz = cp->ct->size; } cbit = (1u << (cp->tok - CTOK_FIRSTDECL)); cds = cds | cbit | ((cbit & cds & CDF_LONG) << 1); if (cp->tok >= CTOK_FIRSTSCL) { if (!(scl & cbit)) cp_errmsg(cp, cp->tok, LJ_ERR_FFI_BADSCL); } else if (tdef) { goto end_decl; } cp_next(cp); continue; } if (sz || tdef || (cds & (CDF_SHORT|CDF_LONG|CDF_SIGNED|CDF_UNSIGNED|CDF_COMPLEX))) break; switch (cp->tok) { case CTOK_STRUCT: tdef = cp_decl_struct(cp, decl, CTINFO(CT_STRUCT, 0)); continue; case CTOK_UNION: tdef = cp_decl_struct(cp, decl, CTINFO(CT_STRUCT, CTF_UNION)); continue; case CTOK_ENUM: tdef = cp_decl_enum(cp, decl); continue; case CTOK_IDENT: if (ctype_istypedef(cp->ct->info)) { tdef = ctype_cid(cp->ct->info); /* Get typedef. */ cp_next(cp); continue; } break; case '$': tdef = cp->val.id; cp_next(cp); continue; default: break; } break; } end_decl: if ((cds & CDF_COMPLEX)) /* Use predefined complex types. */ tdef = sz == 4 ? CTID_COMPLEX_FLOAT : CTID_COMPLEX_DOUBLE; if (tdef) { cp_push_type(decl, tdef); } else if ((cds & CDF_VOID)) { cp_push(decl, CTINFO(CT_VOID, (decl->attr & CTF_QUAL)), CTSIZE_INVALID); decl->attr &= ~CTF_QUAL; } else { /* Determine type info and size. */ CTInfo info = CTINFO(CT_NUM, (cds & CDF_UNSIGNED) ? CTF_UNSIGNED : 0); if ((cds & CDF_BOOL)) { if ((cds & ~(CDF_SCL|CDF_BOOL|CDF_INT|CDF_SIGNED|CDF_UNSIGNED))) cp_errmsg(cp, 0, LJ_ERR_FFI_INVTYPE); info |= CTF_BOOL; if (!(cds & CDF_SIGNED)) info |= CTF_UNSIGNED; if (!sz) { sz = 1; } } else if ((cds & CDF_FP)) { info = CTINFO(CT_NUM, CTF_FP); if ((cds & CDF_LONG)) sz = sizeof(long double); } else if ((cds & CDF_CHAR)) { if ((cds & (CDF_CHAR|CDF_SIGNED|CDF_UNSIGNED)) == CDF_CHAR) info |= CTF_UCHAR; /* Handle platforms where char is unsigned. */ } else if ((cds & CDF_SHORT)) { sz = sizeof(short); } else if ((cds & CDF_LONGLONG)) { sz = 8; } else if ((cds & CDF_LONG)) { info |= CTF_LONG; sz = sizeof(long); } else if (!sz) { if (!(cds & (CDF_SIGNED|CDF_UNSIGNED))) cp_errmsg(cp, cp->tok, LJ_ERR_FFI_DECLSPEC); sz = sizeof(int); } lua_assert(sz != 0); info += CTALIGN(lj_fls(sz)); /* Use natural alignment. */ info += (decl->attr & CTF_QUAL); /* Merge qualifiers. */ cp_push(decl, info, sz); decl->attr &= ~CTF_QUAL; } decl->specpos = decl->pos; decl->specattr = decl->attr; decl->specfattr = decl->fattr; return (cds & CDF_SCL); /* Return storage class. */ } /* Parse array declaration. */ static void cp_decl_array(CPState *cp, CPDecl *decl) { CTInfo info = CTINFO(CT_ARRAY, 0); CTSize nelem = CTSIZE_INVALID; /* Default size for a[] or a[?]. */ cp_decl_attributes(cp, decl); if (cp_opt(cp, '?')) info |= CTF_VLA; /* Create variable-length array a[?]. */ else if (cp->tok != ']') nelem = cp_expr_ksize(cp); cp_check(cp, ']'); cp_add(decl, info, nelem); } /* Parse function declaration. */ static void cp_decl_func(CPState *cp, CPDecl *fdecl) { CTSize nargs = 0; CTInfo info = CTINFO(CT_FUNC, 0); CTypeID lastid = 0, anchor = 0; if (cp->tok != ')') { do { CPDecl decl; CTypeID ctypeid, fieldid; CType *ct; if (cp_opt(cp, '.')) { /* Vararg function. */ cp_check(cp, '.'); /* Workaround for the minimalistic lexer. */ cp_check(cp, '.'); info |= CTF_VARARG; break; } cp_decl_spec(cp, &decl, CDF_REGISTER); decl.mode = CPARSE_MODE_DIRECT|CPARSE_MODE_ABSTRACT; cp_declarator(cp, &decl); ctypeid = cp_decl_intern(cp, &decl); ct = ctype_raw(cp->cts, ctypeid); if (ctype_isvoid(ct->info)) break; else if (ctype_isrefarray(ct->info)) ctypeid = lj_ctype_intern(cp->cts, CTINFO(CT_PTR, CTALIGN_PTR|ctype_cid(ct->info)), CTSIZE_PTR); else if (ctype_isfunc(ct->info)) ctypeid = lj_ctype_intern(cp->cts, CTINFO(CT_PTR, CTALIGN_PTR|ctypeid), CTSIZE_PTR); /* Add new parameter. */ fieldid = lj_ctype_new(cp->cts, &ct); if (anchor) ctype_get(cp->cts, lastid)->sib = fieldid; else anchor = fieldid; lastid = fieldid; if (decl.name) ctype_setname(ct, decl.name); ct->info = CTINFO(CT_FIELD, ctypeid); ct->size = nargs++; } while (cp_opt(cp, ',')); } cp_check(cp, ')'); if (cp_opt(cp, '{')) { /* Skip function definition. */ int level = 1; cp->mode |= CPARSE_MODE_SKIP; for (;;) { if (cp->tok == '{') level++; else if (cp->tok == '}' && --level == 0) break; else if (cp->tok == CTOK_EOF) cp_err_token(cp, '}'); cp_next(cp); } cp->mode &= ~CPARSE_MODE_SKIP; cp->tok = ';'; /* Ok for cp_decl_multi(), error in cp_decl_single(). */ } info |= (fdecl->fattr & ~CTMASK_CID); fdecl->fattr = 0; fdecl->stack[cp_add(fdecl, info, nargs)].sib = anchor; } /* Parse declarator. */ static void cp_declarator(CPState *cp, CPDecl *decl) { if (++cp->depth > CPARSE_MAX_DECLDEPTH) cp_err(cp, LJ_ERR_XLEVELS); for (;;) { /* Head of declarator. */ if (cp_opt(cp, '*')) { /* Pointer. */ CTSize sz; CTInfo info; cp_decl_attributes(cp, decl); sz = CTSIZE_PTR; info = CTINFO(CT_PTR, CTALIGN_PTR); #if LJ_64 if (ctype_msizeP(decl->attr) == 4) { sz = 4; info = CTINFO(CT_PTR, CTALIGN(2)); } #endif info += (decl->attr & (CTF_QUAL|CTF_REF)); decl->attr &= ~(CTF_QUAL|(CTMASK_MSIZEP<attr &= ~(CTF_QUAL|(CTMASK_MSIZEP<mode & CPARSE_MODE_ABSTRACT) && (cp->tok == ')' || cp_istypedecl(cp))) goto func_decl; pos = decl->pos; cp_declarator(cp, decl); cp_check(cp, ')'); decl->pos = pos; } else if (cp->tok == CTOK_IDENT) { /* Direct declarator. */ if (!(decl->mode & CPARSE_MODE_DIRECT)) cp_err_token(cp, CTOK_EOF); decl->name = cp->str; decl->nameid = cp->val.id; cp_next(cp); } else { /* Abstract declarator. */ if (!(decl->mode & CPARSE_MODE_ABSTRACT)) cp_err_token(cp, CTOK_IDENT); } for (;;) { /* Tail of declarator. */ if (cp_opt(cp, '[')) { /* Array. */ cp_decl_array(cp, decl); } else if (cp_opt(cp, '(')) { /* Function. */ func_decl: cp_decl_func(cp, decl); } else { break; } } if ((decl->mode & CPARSE_MODE_FIELD) && cp_opt(cp, ':')) /* Field width. */ decl->bits = cp_expr_ksize(cp); /* Process postfix attributes. */ cp_decl_attributes(cp, decl); cp_push_attributes(decl); cp->depth--; } /* Parse an abstract type declaration and return it's C type ID. */ static CTypeID cp_decl_abstract(CPState *cp) { CPDecl decl; cp_decl_spec(cp, &decl, 0); decl.mode = CPARSE_MODE_ABSTRACT; cp_declarator(cp, &decl); return cp_decl_intern(cp, &decl); } /* Handle pragmas. */ static void cp_pragma(CPState *cp, BCLine pragmaline) { cp_next(cp); if (cp->tok == CTOK_IDENT && cp->str->hash == H_(e79b999f,42ca3e85)) { /* pack */ cp_next(cp); cp_check(cp, '('); if (cp->tok == CTOK_IDENT) { if (cp->str->hash == H_(738e923c,a1b65954)) { /* push */ if (cp->curpack < CPARSE_MAX_PACKSTACK) { cp->packstack[cp->curpack+1] = cp->packstack[cp->curpack]; cp->curpack++; } } else if (cp->str->hash == H_(6c71cf27,6c71cf27)) { /* pop */ if (cp->curpack > 0) cp->curpack--; } else { cp_errmsg(cp, cp->tok, LJ_ERR_XSYMBOL); } cp_next(cp); if (!cp_opt(cp, ',')) goto end_pack; } if (cp->tok == CTOK_INTEGER) { cp->packstack[cp->curpack] = cp->val.u32 ? lj_fls(cp->val.u32) : 0; cp_next(cp); } else { cp->packstack[cp->curpack] = 255; } end_pack: cp_check(cp, ')'); } else { /* Ignore all other pragmas. */ while (cp->tok != CTOK_EOF && cp->linenumber == pragmaline) cp_next(cp); } } /* Parse multiple C declarations of types or extern identifiers. */ static void cp_decl_multi(CPState *cp) { int first = 1; while (cp->tok != CTOK_EOF) { CPDecl decl; CPscl scl; if (cp_opt(cp, ';')) { /* Skip empty statements. */ first = 0; continue; } if (cp->tok == '#') { /* Workaround, since we have no preprocessor, yet. */ BCLine pragmaline = cp->linenumber; if (!(cp_next(cp) == CTOK_IDENT && cp->str->hash == H_(f5e6b4f8,1d509107))) /* pragma */ cp_errmsg(cp, cp->tok, LJ_ERR_XSYMBOL); cp_pragma(cp, pragmaline); continue; } scl = cp_decl_spec(cp, &decl, CDF_TYPEDEF|CDF_EXTERN|CDF_STATIC); if ((cp->tok == ';' || cp->tok == CTOK_EOF) && ctype_istypedef(decl.stack[0].info)) { CTInfo info = ctype_rawchild(cp->cts, &decl.stack[0])->info; if (ctype_isstruct(info) || ctype_isenum(info)) goto decl_end; /* Accept empty declaration of struct/union/enum. */ } for (;;) { CTypeID ctypeid; cp_declarator(cp, &decl); ctypeid = cp_decl_intern(cp, &decl); if (decl.name && !decl.nameid) { /* NYI: redeclarations are ignored. */ CType *ct; CTypeID id; if ((scl & CDF_TYPEDEF)) { /* Create new typedef. */ id = lj_ctype_new(cp->cts, &ct); ct->info = CTINFO(CT_TYPEDEF, ctypeid); goto noredir; } else if (ctype_isfunc(ctype_get(cp->cts, ctypeid)->info)) { /* Treat both static and extern function declarations as extern. */ ct = ctype_get(cp->cts, ctypeid); /* We always get new anonymous functions (typedefs are copied). */ lua_assert(gcref(ct->name) == NULL); id = ctypeid; /* Just name it. */ } else if ((scl & CDF_STATIC)) { /* Accept static constants. */ id = cp_decl_constinit(cp, &ct, ctypeid); goto noredir; } else { /* External references have extern or no storage class. */ id = lj_ctype_new(cp->cts, &ct); ct->info = CTINFO(CT_EXTERN, ctypeid); } if (decl.redir) { /* Add attribute for redirected symbol name. */ CType *cta; CTypeID aid = lj_ctype_new(cp->cts, &cta); ct = ctype_get(cp->cts, id); /* Table may have been reallocated. */ cta->info = CTINFO(CT_ATTRIB, CTATTRIB(CTA_REDIR)); cta->sib = ct->sib; ct->sib = aid; ctype_setname(cta, decl.redir); } noredir: ctype_setname(ct, decl.name); lj_ctype_addname(cp->cts, ct, id); } if (!cp_opt(cp, ',')) break; cp_decl_reset(&decl); } decl_end: if (cp->tok == CTOK_EOF && first) break; /* May omit ';' for 1 decl. */ first = 0; cp_check(cp, ';'); } } /* Parse a single C type declaration. */ static void cp_decl_single(CPState *cp) { CPDecl decl; cp_decl_spec(cp, &decl, 0); cp_declarator(cp, &decl); cp->val.id = cp_decl_intern(cp, &decl); if (cp->tok != CTOK_EOF) cp_err_token(cp, CTOK_EOF); } #undef H_ /* ------------------------------------------------------------------------ */ /* Protected callback for C parser. */ static TValue *cpcparser(lua_State *L, lua_CFunction dummy, void *ud) { CPState *cp = (CPState *)ud; UNUSED(dummy); cframe_errfunc(L->cframe) = -1; /* Inherit error function. */ cp_init(cp); if ((cp->mode & CPARSE_MODE_MULTI)) cp_decl_multi(cp); else cp_decl_single(cp); if (cp->param && cp->param != cp->L->top) cp_err(cp, LJ_ERR_FFI_NUMPARAM); lua_assert(cp->depth == 0); return NULL; } /* C parser. */ int lj_cparse(CPState *cp) { LJ_CTYPE_SAVE(cp->cts); int errcode = lj_vm_cpcall(cp->L, NULL, cp, cpcparser); if (errcode) LJ_CTYPE_RESTORE(cp->cts); cp_cleanup(cp); return errcode; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_lex.h0000664000000000000000000000601212202141143022003 0ustar rootroot/* ** Lexical analyzer. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_LEX_H #define _LJ_LEX_H #include #include "lj_obj.h" #include "lj_err.h" /* Lua lexer tokens. */ #define TKDEF(_, __) \ _(and) _(break) _(do) _(else) _(elseif) _(end) _(false) \ _(for) _(function) _(goto) _(if) _(in) _(local) _(nil) _(not) _(or) \ _(repeat) _(return) _(then) _(true) _(until) _(while) \ __(concat, ..) __(dots, ...) __(eq, ==) __(ge, >=) __(le, <=) __(ne, ~=) \ __(label, ::) __(number, ) __(name, ) __(string, ) \ __(eof, ) enum { TK_OFS = 256, #define TKENUM1(name) TK_##name, #define TKENUM2(name, sym) TK_##name, TKDEF(TKENUM1, TKENUM2) #undef TKENUM1 #undef TKENUM2 TK_RESERVED = TK_while - TK_OFS }; typedef int LexToken; /* Combined bytecode ins/line. Only used during bytecode generation. */ typedef struct BCInsLine { BCIns ins; /* Bytecode instruction. */ BCLine line; /* Line number for this bytecode. */ } BCInsLine; /* Info for local variables. Only used during bytecode generation. */ typedef struct VarInfo { GCRef name; /* Local variable name or goto/label name. */ BCPos startpc; /* First point where the local variable is active. */ BCPos endpc; /* First point where the local variable is dead. */ uint8_t slot; /* Variable slot. */ uint8_t info; /* Variable/goto/label info. */ } VarInfo; /* Lua lexer state. */ typedef struct LexState { struct FuncState *fs; /* Current FuncState. Defined in lj_parse.c. */ struct lua_State *L; /* Lua state. */ TValue tokenval; /* Current token value. */ TValue lookaheadval; /* Lookahead token value. */ int current; /* Current character (charint). */ LexToken token; /* Current token. */ LexToken lookahead; /* Lookahead token. */ MSize n; /* Bytes left in input buffer. */ const char *p; /* Current position in input buffer. */ SBuf sb; /* String buffer for tokens. */ lua_Reader rfunc; /* Reader callback. */ void *rdata; /* Reader callback data. */ BCLine linenumber; /* Input line counter. */ BCLine lastline; /* Line of last token. */ GCstr *chunkname; /* Current chunk name (interned string). */ const char *chunkarg; /* Chunk name argument. */ const char *mode; /* Allow loading bytecode (b) and/or source text (t). */ VarInfo *vstack; /* Stack for names and extents of local variables. */ MSize sizevstack; /* Size of variable stack. */ MSize vtop; /* Top of variable stack. */ BCInsLine *bcstack; /* Stack for bytecode instructions/line numbers. */ MSize sizebcstack; /* Size of bytecode stack. */ uint32_t level; /* Syntactical nesting level. */ } LexState; LJ_FUNC int lj_lex_setup(lua_State *L, LexState *ls); LJ_FUNC void lj_lex_cleanup(lua_State *L, LexState *ls); LJ_FUNC void lj_lex_next(LexState *ls); LJ_FUNC LexToken lj_lex_lookahead(LexState *ls); LJ_FUNC const char *lj_lex_token2str(LexState *ls, LexToken token); LJ_FUNC_NORET void lj_lex_error(LexState *ls, LexToken token, ErrMsg em, ...); LJ_FUNC void lj_lex_init(lua_State *L); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/vm_x86.dasc0000664000000000000000000051334112202141143022350 0ustar rootroot|// Low-level VM code for x86 CPUs. |// Bytecode interpreter, fast functions and helper functions. |// Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h | |.if P64 |.arch x64 |.else |.arch x86 |.endif |.section code_op, code_sub | |.actionlist build_actionlist |.globals GLOB_ |.globalnames globnames |.externnames extnames | |//----------------------------------------------------------------------- | |.if P64 |.define X64, 1 |.define SSE, 1 |.if WIN |.define X64WIN, 1 |.endif |.endif | |// Fixed register assignments for the interpreter. |// This is very fragile and has many dependencies. Caveat emptor. |.define BASE, edx // Not C callee-save, refetched anyway. |.if not X64 |.define KBASE, edi // Must be C callee-save. |.define KBASEa, KBASE |.define PC, esi // Must be C callee-save. |.define PCa, PC |.define DISPATCH, ebx // Must be C callee-save. |.elif X64WIN |.define KBASE, edi // Must be C callee-save. |.define KBASEa, rdi |.define PC, esi // Must be C callee-save. |.define PCa, rsi |.define DISPATCH, ebx // Must be C callee-save. |.else |.define KBASE, r15d // Must be C callee-save. |.define KBASEa, r15 |.define PC, ebx // Must be C callee-save. |.define PCa, rbx |.define DISPATCH, r14d // Must be C callee-save. |.endif | |.define RA, ecx |.define RAH, ch |.define RAL, cl |.define RB, ebp // Must be ebp (C callee-save). |.define RC, eax // Must be eax. |.define RCW, ax |.define RCH, ah |.define RCL, al |.define OP, RB |.define RD, RC |.define RDW, RCW |.define RDL, RCL |.if X64 |.define RAa, rcx |.define RBa, rbp |.define RCa, rax |.define RDa, rax |.else |.define RAa, RA |.define RBa, RB |.define RCa, RC |.define RDa, RD |.endif | |.if not X64 |.define FCARG1, ecx // x86 fastcall arguments. |.define FCARG2, edx |.elif X64WIN |.define CARG1, rcx // x64/WIN64 C call arguments. |.define CARG2, rdx |.define CARG3, r8 |.define CARG4, r9 |.define CARG1d, ecx |.define CARG2d, edx |.define CARG3d, r8d |.define CARG4d, r9d |.define FCARG1, CARG1d // Upwards compatible to x86 fastcall. |.define FCARG2, CARG2d |.else |.define CARG1, rdi // x64/POSIX C call arguments. |.define CARG2, rsi |.define CARG3, rdx |.define CARG4, rcx |.define CARG5, r8 |.define CARG6, r9 |.define CARG1d, edi |.define CARG2d, esi |.define CARG3d, edx |.define CARG4d, ecx |.define CARG5d, r8d |.define CARG6d, r9d |.define FCARG1, CARG1d // Simulate x86 fastcall. |.define FCARG2, CARG2d |.endif | |// Type definitions. Some of these are only used for documentation. |.type L, lua_State |.type GL, global_State |.type TVALUE, TValue |.type GCOBJ, GCobj |.type STR, GCstr |.type TAB, GCtab |.type LFUNC, GCfuncL |.type CFUNC, GCfuncC |.type PROTO, GCproto |.type UPVAL, GCupval |.type NODE, Node |.type NARGS, int |.type TRACE, GCtrace | |// Stack layout while in interpreter. Must match with lj_frame.h. |//----------------------------------------------------------------------- |.if not X64 // x86 stack layout. | |.define CFRAME_SPACE, aword*7 // Delta for esp (see <--). |.macro saveregs_ | push edi; push esi; push ebx | sub esp, CFRAME_SPACE |.endmacro |.macro saveregs | push ebp; saveregs_ |.endmacro |.macro restoreregs | add esp, CFRAME_SPACE | pop ebx; pop esi; pop edi; pop ebp |.endmacro | |.define SAVE_ERRF, aword [esp+aword*15] // vm_pcall/vm_cpcall only. |.define SAVE_NRES, aword [esp+aword*14] |.define SAVE_CFRAME, aword [esp+aword*13] |.define SAVE_L, aword [esp+aword*12] |//----- 16 byte aligned, ^^^ arguments from C caller |.define SAVE_RET, aword [esp+aword*11] //<-- esp entering interpreter. |.define SAVE_R4, aword [esp+aword*10] |.define SAVE_R3, aword [esp+aword*9] |.define SAVE_R2, aword [esp+aword*8] |//----- 16 byte aligned |.define SAVE_R1, aword [esp+aword*7] //<-- esp after register saves. |.define SAVE_PC, aword [esp+aword*6] |.define TMP2, aword [esp+aword*5] |.define TMP1, aword [esp+aword*4] |//----- 16 byte aligned |.define ARG4, aword [esp+aword*3] |.define ARG3, aword [esp+aword*2] |.define ARG2, aword [esp+aword*1] |.define ARG1, aword [esp] //<-- esp while in interpreter. |//----- 16 byte aligned, ^^^ arguments for C callee | |// FPARGx overlaps ARGx and ARG(x+1) on x86. |.define FPARG3, qword [esp+qword*1] |.define FPARG1, qword [esp] |// TMPQ overlaps TMP1/TMP2. ARG5/MULTRES overlap TMP1/TMP2 (and TMPQ). |.define TMPQ, qword [esp+aword*4] |.define TMP3, ARG4 |.define ARG5, TMP1 |.define TMPa, TMP1 |.define MULTRES, TMP2 | |// Arguments for vm_call and vm_pcall. |.define INARG_BASE, SAVE_CFRAME // Overwritten by SAVE_CFRAME! | |// Arguments for vm_cpcall. |.define INARG_CP_CALL, SAVE_ERRF |.define INARG_CP_UD, SAVE_NRES |.define INARG_CP_FUNC, SAVE_CFRAME | |//----------------------------------------------------------------------- |.elif X64WIN // x64/Windows stack layout | |.define CFRAME_SPACE, aword*5 // Delta for rsp (see <--). |.macro saveregs_ | push rdi; push rsi; push rbx | sub rsp, CFRAME_SPACE |.endmacro |.macro saveregs | push rbp; saveregs_ |.endmacro |.macro restoreregs | add rsp, CFRAME_SPACE | pop rbx; pop rsi; pop rdi; pop rbp |.endmacro | |.define SAVE_CFRAME, aword [rsp+aword*13] |.define SAVE_PC, dword [rsp+dword*25] |.define SAVE_L, dword [rsp+dword*24] |.define SAVE_ERRF, dword [rsp+dword*23] |.define SAVE_NRES, dword [rsp+dword*22] |.define TMP2, dword [rsp+dword*21] |.define TMP1, dword [rsp+dword*20] |//----- 16 byte aligned, ^^^ 32 byte register save area, owned by interpreter |.define SAVE_RET, aword [rsp+aword*9] //<-- rsp entering interpreter. |.define SAVE_R4, aword [rsp+aword*8] |.define SAVE_R3, aword [rsp+aword*7] |.define SAVE_R2, aword [rsp+aword*6] |.define SAVE_R1, aword [rsp+aword*5] //<-- rsp after register saves. |.define ARG5, aword [rsp+aword*4] |.define CSAVE_4, aword [rsp+aword*3] |.define CSAVE_3, aword [rsp+aword*2] |.define CSAVE_2, aword [rsp+aword*1] |.define CSAVE_1, aword [rsp] //<-- rsp while in interpreter. |//----- 16 byte aligned, ^^^ 32 byte register save area, owned by callee | |// TMPQ overlaps TMP1/TMP2. MULTRES overlaps TMP2 (and TMPQ). |.define TMPQ, qword [rsp+aword*10] |.define MULTRES, TMP2 |.define TMPa, ARG5 |.define ARG5d, dword [rsp+aword*4] |.define TMP3, ARG5d | |//----------------------------------------------------------------------- |.else // x64/POSIX stack layout | |.define CFRAME_SPACE, aword*5 // Delta for rsp (see <--). |.macro saveregs_ | push rbx; push r15; push r14 | sub rsp, CFRAME_SPACE |.endmacro |.macro saveregs | push rbp; saveregs_ |.endmacro |.macro restoreregs | add rsp, CFRAME_SPACE | pop r14; pop r15; pop rbx; pop rbp |.endmacro | |//----- 16 byte aligned, |.define SAVE_RET, aword [rsp+aword*9] //<-- rsp entering interpreter. |.define SAVE_R4, aword [rsp+aword*8] |.define SAVE_R3, aword [rsp+aword*7] |.define SAVE_R2, aword [rsp+aword*6] |.define SAVE_R1, aword [rsp+aword*5] //<-- rsp after register saves. |.define SAVE_CFRAME, aword [rsp+aword*4] |.define SAVE_PC, dword [rsp+dword*7] |.define SAVE_L, dword [rsp+dword*6] |.define SAVE_ERRF, dword [rsp+dword*5] |.define SAVE_NRES, dword [rsp+dword*4] |.define TMPa, aword [rsp+aword*1] |.define TMP2, dword [rsp+dword*1] |.define TMP1, dword [rsp] //<-- rsp while in interpreter. |//----- 16 byte aligned | |// TMPQ overlaps TMP1/TMP2. MULTRES overlaps TMP2 (and TMPQ). |.define TMPQ, qword [rsp] |.define TMP3, dword [rsp+aword*1] |.define MULTRES, TMP2 | |.endif | |//----------------------------------------------------------------------- | |// Instruction headers. |.macro ins_A; .endmacro |.macro ins_AD; .endmacro |.macro ins_AJ; .endmacro |.macro ins_ABC; movzx RB, RCH; movzx RC, RCL; .endmacro |.macro ins_AB_; movzx RB, RCH; .endmacro |.macro ins_A_C; movzx RC, RCL; .endmacro |.macro ins_AND; not RDa; .endmacro | |// Instruction decode+dispatch. Carefully tuned (nope, lodsd is not faster). |.macro ins_NEXT | mov RC, [PC] | movzx RA, RCH | movzx OP, RCL | add PC, 4 | shr RC, 16 |.if X64 | jmp aword [DISPATCH+OP*8] |.else | jmp aword [DISPATCH+OP*4] |.endif |.endmacro | |// Instruction footer. |.if 1 | // Replicated dispatch. Less unpredictable branches, but higher I-Cache use. | .define ins_next, ins_NEXT | .define ins_next_, ins_NEXT |.else | // Common dispatch. Lower I-Cache use, only one (very) unpredictable branch. | // Affects only certain kinds of benchmarks (and only with -j off). | // Around 10%-30% slower on Core2, a lot more slower on P4. | .macro ins_next | jmp ->ins_next | .endmacro | .macro ins_next_ | ->ins_next: | ins_NEXT | .endmacro |.endif | |// Call decode and dispatch. |.macro ins_callt | // BASE = new base, RB = LFUNC, RD = nargs+1, [BASE-4] = PC | mov PC, LFUNC:RB->pc | mov RA, [PC] | movzx OP, RAL | movzx RA, RAH | add PC, 4 |.if X64 | jmp aword [DISPATCH+OP*8] |.else | jmp aword [DISPATCH+OP*4] |.endif |.endmacro | |.macro ins_call | // BASE = new base, RB = LFUNC, RD = nargs+1 | mov [BASE-4], PC | ins_callt |.endmacro | |//----------------------------------------------------------------------- | |// Macros to test operand types. |.macro checktp, reg, tp; cmp dword [BASE+reg*8+4], tp; .endmacro |.macro checknum, reg, target; checktp reg, LJ_TISNUM; jae target; .endmacro |.macro checkint, reg, target; checktp reg, LJ_TISNUM; jne target; .endmacro |.macro checkstr, reg, target; checktp reg, LJ_TSTR; jne target; .endmacro |.macro checktab, reg, target; checktp reg, LJ_TTAB; jne target; .endmacro | |// These operands must be used with movzx. |.define PC_OP, byte [PC-4] |.define PC_RA, byte [PC-3] |.define PC_RB, byte [PC-1] |.define PC_RC, byte [PC-2] |.define PC_RD, word [PC-2] | |.macro branchPC, reg | lea PC, [PC+reg*4-BCBIAS_J*4] |.endmacro | |// Assumes DISPATCH is relative to GL. #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | |// Decrement hashed hotcount and trigger trace recorder if zero. |.macro hotloop, reg | mov reg, PC | shr reg, 1 | and reg, HOTCOUNT_PCMASK | sub word [DISPATCH+reg+GG_DISP2HOT], HOTCOUNT_LOOP | jb ->vm_hotloop |.endmacro | |.macro hotcall, reg | mov reg, PC | shr reg, 1 | and reg, HOTCOUNT_PCMASK | sub word [DISPATCH+reg+GG_DISP2HOT], HOTCOUNT_CALL | jb ->vm_hotcall |.endmacro | |// Set current VM state. |.macro set_vmstate, st | mov dword [DISPATCH+DISPATCH_GL(vmstate)], ~LJ_VMST_..st |.endmacro | |// x87 compares. |.macro fcomparepp // Compare and pop st0 >< st1. | fucomip st1 | fpop |.endmacro | |.macro fdup; fld st0; .endmacro |.macro fpop1; fstp st1; .endmacro | |// Synthesize SSE FP constants. |.macro sseconst_abs, reg, tmp // Synthesize abs mask. |.if X64 | mov64 tmp, U64x(7fffffff,ffffffff); movd reg, tmp |.else | pxor reg, reg; pcmpeqd reg, reg; psrlq reg, 1 |.endif |.endmacro | |.macro sseconst_hi, reg, tmp, val // Synthesize hi-32 bit const. |.if X64 | mov64 tmp, U64x(val,00000000); movd reg, tmp |.else | mov tmp, 0x .. val; movd reg, tmp; pshufd reg, reg, 0x51 |.endif |.endmacro | |.macro sseconst_sign, reg, tmp // Synthesize sign mask. | sseconst_hi reg, tmp, 80000000 |.endmacro |.macro sseconst_1, reg, tmp // Synthesize 1.0. | sseconst_hi reg, tmp, 3ff00000 |.endmacro |.macro sseconst_m1, reg, tmp // Synthesize -1.0. | sseconst_hi reg, tmp, bff00000 |.endmacro |.macro sseconst_2p52, reg, tmp // Synthesize 2^52. | sseconst_hi reg, tmp, 43300000 |.endmacro |.macro sseconst_tobit, reg, tmp // Synthesize 2^52 + 2^51. | sseconst_hi reg, tmp, 43380000 |.endmacro | |// Move table write barrier back. Overwrites reg. |.macro barrierback, tab, reg | and byte tab->marked, (uint8_t)~LJ_GC_BLACK // black2gray(tab) | mov reg, [DISPATCH+DISPATCH_GL(gc.grayagain)] | mov [DISPATCH+DISPATCH_GL(gc.grayagain)], tab | mov tab->gclist, reg |.endmacro | |//----------------------------------------------------------------------- /* Generate subroutines used by opcodes and other parts of the VM. */ /* The .code_sub section should be last to help static branch prediction. */ static void build_subroutines(BuildCtx *ctx) { |.code_sub | |//----------------------------------------------------------------------- |//-- Return handling ---------------------------------------------------- |//----------------------------------------------------------------------- | |->vm_returnp: | test PC, FRAME_P | jz ->cont_dispatch | | // Return from pcall or xpcall fast func. | and PC, -8 | sub BASE, PC // Restore caller base. | lea RAa, [RA+PC-8] // Rebase RA and prepend one result. | mov PC, [BASE-4] // Fetch PC of previous frame. | // Prepending may overwrite the pcall frame, so do it at the end. | mov dword [BASE+RA+4], LJ_TTRUE // Prepend true to results. | |->vm_returnc: | add RD, 1 // RD = nresults+1 | jz ->vm_unwind_yield | mov MULTRES, RD | test PC, FRAME_TYPE | jz ->BC_RET_Z // Handle regular return to Lua. | |->vm_return: | // BASE = base, RA = resultofs, RD = nresults+1 (= MULTRES), PC = return | xor PC, FRAME_C | test PC, FRAME_TYPE | jnz ->vm_returnp | | // Return to C. | set_vmstate C | and PC, -8 | sub PC, BASE | neg PC // Previous base = BASE - delta. | | sub RD, 1 | jz >2 |1: // Move results down. |.if X64 | mov RBa, [BASE+RA] | mov [BASE-8], RBa |.else | mov RB, [BASE+RA] | mov [BASE-8], RB | mov RB, [BASE+RA+4] | mov [BASE-4], RB |.endif | add BASE, 8 | sub RD, 1 | jnz <1 |2: | mov L:RB, SAVE_L | mov L:RB->base, PC |3: | mov RD, MULTRES | mov RA, SAVE_NRES // RA = wanted nresults+1 |4: | cmp RA, RD | jne >6 // More/less results wanted? |5: | sub BASE, 8 | mov L:RB->top, BASE | |->vm_leave_cp: | mov RAa, SAVE_CFRAME // Restore previous C frame. | mov L:RB->cframe, RAa | xor eax, eax // Ok return status for vm_pcall. | |->vm_leave_unw: | restoreregs | ret | |6: | jb >7 // Less results wanted? | // More results wanted. Check stack size and fill up results with nil. | cmp BASE, L:RB->maxstack | ja >8 | mov dword [BASE-4], LJ_TNIL | add BASE, 8 | add RD, 1 | jmp <4 | |7: // Less results wanted. | test RA, RA | jz <5 // But check for LUA_MULTRET+1. | sub RA, RD // Negative result! | lea BASE, [BASE+RA*8] // Correct top. | jmp <5 | |8: // Corner case: need to grow stack for filling up results. | // This can happen if: | // - A C function grows the stack (a lot). | // - The GC shrinks the stack in between. | // - A return back from a lua_call() with (high) nresults adjustment. | mov L:RB->top, BASE // Save current top held in BASE (yes). | mov MULTRES, RD // Need to fill only remainder with nil. | mov FCARG2, RA | mov FCARG1, L:RB | call extern lj_state_growstack@8 // (lua_State *L, int n) | mov BASE, L:RB->top // Need the (realloced) L->top in BASE. | jmp <3 | |->vm_unwind_yield: | mov al, LUA_YIELD | jmp ->vm_unwind_c_eh | |->vm_unwind_c@8: // Unwind C stack, return from vm_pcall. | // (void *cframe, int errcode) |.if X64 | mov eax, CARG2d // Error return status for vm_pcall. | mov rsp, CARG1 |.else | mov eax, FCARG2 // Error return status for vm_pcall. | mov esp, FCARG1 |.endif |->vm_unwind_c_eh: // Landing pad for external unwinder. | mov L:RB, SAVE_L | mov GL:RB, L:RB->glref | mov dword GL:RB->vmstate, ~LJ_VMST_C | jmp ->vm_leave_unw | |->vm_unwind_rethrow: |.if X64 and not X64WIN | mov FCARG1, SAVE_L | mov FCARG2, eax | restoreregs | jmp extern lj_err_throw@8 // (lua_State *L, int errcode) |.endif | |->vm_unwind_ff@4: // Unwind C stack, return from ff pcall. | // (void *cframe) |.if X64 | and CARG1, CFRAME_RAWMASK | mov rsp, CARG1 |.else | and FCARG1, CFRAME_RAWMASK | mov esp, FCARG1 |.endif |->vm_unwind_ff_eh: // Landing pad for external unwinder. | mov L:RB, SAVE_L | mov RAa, -8 // Results start at BASE+RA = BASE-8. | mov RD, 1+1 // Really 1+2 results, incr. later. | mov BASE, L:RB->base | mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. | add DISPATCH, GG_G2DISP | mov PC, [BASE-4] // Fetch PC of previous frame. | mov dword [BASE-4], LJ_TFALSE // Prepend false to error message. | set_vmstate INTERP | jmp ->vm_returnc // Increments RD/MULTRES and returns. | |//----------------------------------------------------------------------- |//-- Grow stack for calls ----------------------------------------------- |//----------------------------------------------------------------------- | |->vm_growstack_c: // Grow stack for C function. | mov FCARG2, LUA_MINSTACK | jmp >2 | |->vm_growstack_v: // Grow stack for vararg Lua function. | sub RD, 8 | jmp >1 | |->vm_growstack_f: // Grow stack for fixarg Lua function. | // BASE = new base, RD = nargs+1, RB = L, PC = first PC | lea RD, [BASE+NARGS:RD*8-8] |1: | movzx RA, byte [PC-4+PC2PROTO(framesize)] | add PC, 4 // Must point after first instruction. | mov L:RB->base, BASE | mov L:RB->top, RD | mov SAVE_PC, PC | mov FCARG2, RA |2: | // RB = L, L->base = new base, L->top = top | mov FCARG1, L:RB | call extern lj_state_growstack@8 // (lua_State *L, int n) | mov BASE, L:RB->base | mov RD, L:RB->top | mov LFUNC:RB, [BASE-8] | sub RD, BASE | shr RD, 3 | add NARGS:RD, 1 | // BASE = new base, RB = LFUNC, RD = nargs+1 | ins_callt // Just retry the call. | |//----------------------------------------------------------------------- |//-- Entry points into the assembler VM --------------------------------- |//----------------------------------------------------------------------- | |->vm_resume: // Setup C frame and resume thread. | // (lua_State *L, TValue *base, int nres1 = 0, ptrdiff_t ef = 0) | saveregs |.if X64 | mov L:RB, CARG1d // Caveat: CARG1d may be RA. | mov SAVE_L, CARG1d | mov RA, CARG2d |.else | mov L:RB, SAVE_L | mov RA, INARG_BASE // Caveat: overlaps SAVE_CFRAME! |.endif | mov PC, FRAME_CP | xor RD, RD | lea KBASEa, [esp+CFRAME_RESUME] | mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. | add DISPATCH, GG_G2DISP | mov L:RB->cframe, KBASEa | mov SAVE_PC, RD // Any value outside of bytecode is ok. | mov SAVE_CFRAME, RDa |.if X64 | mov SAVE_NRES, RD | mov SAVE_ERRF, RD |.endif | cmp byte L:RB->status, RDL | je >3 // Initial resume (like a call). | | // Resume after yield (like a return). | set_vmstate INTERP | mov byte L:RB->status, RDL | mov BASE, L:RB->base | mov RD, L:RB->top | sub RD, RA | shr RD, 3 | add RD, 1 // RD = nresults+1 | sub RA, BASE // RA = resultofs | mov PC, [BASE-4] | mov MULTRES, RD | test PC, FRAME_TYPE | jz ->BC_RET_Z | jmp ->vm_return | |->vm_pcall: // Setup protected C frame and enter VM. | // (lua_State *L, TValue *base, int nres1, ptrdiff_t ef) | saveregs | mov PC, FRAME_CP |.if X64 | mov SAVE_ERRF, CARG4d |.endif | jmp >1 | |->vm_call: // Setup C frame and enter VM. | // (lua_State *L, TValue *base, int nres1) | saveregs | mov PC, FRAME_C | |1: // Entry point for vm_pcall above (PC = ftype). |.if X64 | mov SAVE_NRES, CARG3d | mov L:RB, CARG1d // Caveat: CARG1d may be RA. | mov SAVE_L, CARG1d | mov RA, CARG2d |.else | mov L:RB, SAVE_L | mov RA, INARG_BASE // Caveat: overlaps SAVE_CFRAME! |.endif | | mov KBASEa, L:RB->cframe // Add our C frame to cframe chain. | mov SAVE_CFRAME, KBASEa | mov SAVE_PC, L:RB // Any value outside of bytecode is ok. |.if X64 | mov L:RB->cframe, rsp |.else | mov L:RB->cframe, esp |.endif | |2: // Entry point for vm_cpcall below (RA = base, RB = L, PC = ftype). | mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. | add DISPATCH, GG_G2DISP | |3: // Entry point for vm_resume above (RA = base, RB = L, PC = ftype). | set_vmstate INTERP | mov BASE, L:RB->base // BASE = old base (used in vmeta_call). | add PC, RA | sub PC, BASE // PC = frame delta + frame type | | mov RD, L:RB->top | sub RD, RA | shr NARGS:RD, 3 | add NARGS:RD, 1 // RD = nargs+1 | |->vm_call_dispatch: | mov LFUNC:RB, [RA-8] | cmp dword [RA-4], LJ_TFUNC | jne ->vmeta_call // Ensure KBASE defined and != BASE. | |->vm_call_dispatch_f: | mov BASE, RA | ins_call | // BASE = new base, RB = func, RD = nargs+1, PC = caller PC | |->vm_cpcall: // Setup protected C frame, call C. | // (lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp) | saveregs |.if X64 | mov L:RB, CARG1d // Caveat: CARG1d may be RA. | mov SAVE_L, CARG1d |.else | mov L:RB, SAVE_L | // Caveat: INARG_CP_* and SAVE_CFRAME/SAVE_NRES/SAVE_ERRF overlap! | mov RC, INARG_CP_UD // Get args before they are overwritten. | mov RA, INARG_CP_FUNC | mov BASE, INARG_CP_CALL |.endif | mov SAVE_PC, L:RB // Any value outside of bytecode is ok. | | mov KBASE, L:RB->stack // Compute -savestack(L, L->top). | sub KBASE, L:RB->top | mov SAVE_ERRF, 0 // No error function. | mov SAVE_NRES, KBASE // Neg. delta means cframe w/o frame. | // Handler may change cframe_nres(L->cframe) or cframe_errfunc(L->cframe). | |.if X64 | mov KBASEa, L:RB->cframe // Add our C frame to cframe chain. | mov SAVE_CFRAME, KBASEa | mov L:RB->cframe, rsp | | call CARG4 // (lua_State *L, lua_CFunction func, void *ud) |.else | mov ARG3, RC // Have to copy args downwards. | mov ARG2, RA | mov ARG1, L:RB | | mov KBASE, L:RB->cframe // Add our C frame to cframe chain. | mov SAVE_CFRAME, KBASE | mov L:RB->cframe, esp | | call BASE // (lua_State *L, lua_CFunction func, void *ud) |.endif | // TValue * (new base) or NULL returned in eax (RC). | test RC, RC | jz ->vm_leave_cp // No base? Just remove C frame. | mov RA, RC | mov PC, FRAME_CP | jmp <2 // Else continue with the call. | |//----------------------------------------------------------------------- |//-- Metamethod handling ------------------------------------------------ |//----------------------------------------------------------------------- | |//-- Continuation dispatch ---------------------------------------------- | |->cont_dispatch: | // BASE = meta base, RA = resultofs, RD = nresults+1 (also in MULTRES) | add RA, BASE | and PC, -8 | mov RB, BASE | sub BASE, PC // Restore caller BASE. | mov dword [RA+RD*8-4], LJ_TNIL // Ensure one valid arg. | mov RC, RA // ... in [RC] | mov PC, [RB-12] // Restore PC from [cont|PC]. |.if X64 | movsxd RAa, dword [RB-16] // May be negative on WIN64 with debug. |.if FFI | cmp RA, 1 | jbe >1 |.endif | lea KBASEa, qword [=>0] | add RAa, KBASEa |.else | mov RA, dword [RB-16] |.if FFI | cmp RA, 1 | jbe >1 |.endif |.endif | mov LFUNC:KBASE, [BASE-8] | mov KBASE, LFUNC:KBASE->pc | mov KBASE, [KBASE+PC2PROTO(k)] | // BASE = base, RC = result, RB = meta base | jmp RAa // Jump to continuation. | |.if FFI |1: | je ->cont_ffi_callback // cont = 1: return from FFI callback. | // cont = 0: Tail call from C function. | sub RB, BASE | shr RB, 3 | lea RD, [RB-1] | jmp ->vm_call_tail |.endif | |->cont_cat: // BASE = base, RC = result, RB = mbase | movzx RA, PC_RB | sub RB, 16 | lea RA, [BASE+RA*8] | sub RA, RB | je ->cont_ra | neg RA | shr RA, 3 |.if X64WIN | mov CARG3d, RA | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE | mov RCa, [RC] | mov [RB], RCa | mov CARG2d, RB |.elif X64 | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE | mov CARG3d, RA | mov RAa, [RC] | mov [RB], RAa | mov CARG2d, RB |.else | mov ARG3, RA | mov RA, [RC+4] | mov RC, [RC] | mov [RB+4], RA | mov [RB], RC | mov ARG2, RB |.endif | jmp ->BC_CAT_Z | |//-- Table indexing metamethods ----------------------------------------- | |->vmeta_tgets: | mov TMP1, RC // RC = GCstr * | mov TMP2, LJ_TSTR | lea RCa, TMP1 // Store temp. TValue in TMP1/TMP2. | cmp PC_OP, BC_GGET | jne >1 | lea RA, [DISPATCH+DISPATCH_GL(tmptv)] // Store fn->l.env in g->tmptv. | mov [RA], TAB:RB // RB = GCtab * | mov dword [RA+4], LJ_TTAB | mov RB, RA | jmp >2 | |->vmeta_tgetb: | movzx RC, PC_RC |.if DUALNUM | mov TMP2, LJ_TISNUM | mov TMP1, RC |.elif SSE | cvtsi2sd xmm0, RC | movsd TMPQ, xmm0 |.else | mov ARG4, RC | fild ARG4 | fstp TMPQ |.endif | lea RCa, TMPQ // Store temp. TValue in TMPQ. | jmp >1 | |->vmeta_tgetv: | movzx RC, PC_RC // Reload TValue *k from RC. | lea RC, [BASE+RC*8] |1: | movzx RB, PC_RB // Reload TValue *t from RB. | lea RB, [BASE+RB*8] |2: |.if X64 | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE. | mov CARG2d, RB | mov CARG3, RCa // May be 64 bit ptr to stack. | mov L:RB, L:CARG1d |.else | mov ARG2, RB | mov L:RB, SAVE_L | mov ARG3, RC | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | call extern lj_meta_tget // (lua_State *L, TValue *o, TValue *k) | // TValue * (finished) or NULL (metamethod) returned in eax (RC). | mov BASE, L:RB->base | test RC, RC | jz >3 |->cont_ra: // BASE = base, RC = result | movzx RA, PC_RA |.if X64 | mov RBa, [RC] | mov [BASE+RA*8], RBa |.else | mov RB, [RC+4] | mov RC, [RC] | mov [BASE+RA*8+4], RB | mov [BASE+RA*8], RC |.endif | ins_next | |3: // Call __index metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k | mov RA, L:RB->top | mov [RA-12], PC // [cont|PC] | lea PC, [RA+FRAME_CONT] | sub PC, BASE | mov LFUNC:RB, [RA-8] // Guaranteed to be a function here. | mov NARGS:RD, 2+1 // 2 args for func(t, k). | jmp ->vm_call_dispatch_f | |//----------------------------------------------------------------------- | |->vmeta_tsets: | mov TMP1, RC // RC = GCstr * | mov TMP2, LJ_TSTR | lea RCa, TMP1 // Store temp. TValue in TMP1/TMP2. | cmp PC_OP, BC_GSET | jne >1 | lea RA, [DISPATCH+DISPATCH_GL(tmptv)] // Store fn->l.env in g->tmptv. | mov [RA], TAB:RB // RB = GCtab * | mov dword [RA+4], LJ_TTAB | mov RB, RA | jmp >2 | |->vmeta_tsetb: | movzx RC, PC_RC |.if DUALNUM | mov TMP2, LJ_TISNUM | mov TMP1, RC |.elif SSE | cvtsi2sd xmm0, RC | movsd TMPQ, xmm0 |.else | mov ARG4, RC | fild ARG4 | fstp TMPQ |.endif | lea RCa, TMPQ // Store temp. TValue in TMPQ. | jmp >1 | |->vmeta_tsetv: | movzx RC, PC_RC // Reload TValue *k from RC. | lea RC, [BASE+RC*8] |1: | movzx RB, PC_RB // Reload TValue *t from RB. | lea RB, [BASE+RB*8] |2: |.if X64 | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE. | mov CARG2d, RB | mov CARG3, RCa // May be 64 bit ptr to stack. | mov L:RB, L:CARG1d |.else | mov ARG2, RB | mov L:RB, SAVE_L | mov ARG3, RC | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | call extern lj_meta_tset // (lua_State *L, TValue *o, TValue *k) | // TValue * (finished) or NULL (metamethod) returned in eax (RC). | mov BASE, L:RB->base | test RC, RC | jz >3 | // NOBARRIER: lj_meta_tset ensures the table is not black. | movzx RA, PC_RA |.if X64 | mov RBa, [BASE+RA*8] | mov [RC], RBa |.else | mov RB, [BASE+RA*8+4] | mov RA, [BASE+RA*8] | mov [RC+4], RB | mov [RC], RA |.endif |->cont_nop: // BASE = base, (RC = result) | ins_next | |3: // Call __newindex metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k/(v) | mov RA, L:RB->top | mov [RA-12], PC // [cont|PC] | movzx RC, PC_RA | // Copy value to third argument. |.if X64 | mov RBa, [BASE+RC*8] | mov [RA+16], RBa |.else | mov RB, [BASE+RC*8+4] | mov RC, [BASE+RC*8] | mov [RA+20], RB | mov [RA+16], RC |.endif | lea PC, [RA+FRAME_CONT] | sub PC, BASE | mov LFUNC:RB, [RA-8] // Guaranteed to be a function here. | mov NARGS:RD, 3+1 // 3 args for func(t, k, v). | jmp ->vm_call_dispatch_f | |//-- Comparison metamethods --------------------------------------------- | |->vmeta_comp: |.if X64 | mov L:RB, SAVE_L | mov L:RB->base, BASE // Caveat: CARG2d/CARG3d == BASE. |.if X64WIN | lea CARG3d, [BASE+RD*8] | lea CARG2d, [BASE+RA*8] |.else | lea CARG2d, [BASE+RA*8] | lea CARG3d, [BASE+RD*8] |.endif | mov CARG1d, L:RB // Caveat: CARG1d/CARG4d == RA. | movzx CARG4d, PC_OP |.else | movzx RB, PC_OP | lea RD, [BASE+RD*8] | lea RA, [BASE+RA*8] | mov ARG4, RB | mov L:RB, SAVE_L | mov ARG3, RD | mov ARG2, RA | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | call extern lj_meta_comp // (lua_State *L, TValue *o1, *o2, int op) | // 0/1 or TValue * (metamethod) returned in eax (RC). |3: | mov BASE, L:RB->base | cmp RC, 1 | ja ->vmeta_binop |4: | lea PC, [PC+4] | jb >6 |5: | movzx RD, PC_RD | branchPC RD |6: | ins_next | |->cont_condt: // BASE = base, RC = result | add PC, 4 | cmp dword [RC+4], LJ_TISTRUECOND // Branch if result is true. | jb <5 | jmp <6 | |->cont_condf: // BASE = base, RC = result | cmp dword [RC+4], LJ_TISTRUECOND // Branch if result is false. | jmp <4 | |->vmeta_equal: | sub PC, 4 |.if X64WIN | mov CARG3d, RD | mov CARG4d, RB | mov L:RB, SAVE_L | mov L:RB->base, BASE // Caveat: CARG2d == BASE. | mov CARG2d, RA | mov CARG1d, L:RB // Caveat: CARG1d == RA. |.elif X64 | mov CARG2d, RA | mov CARG4d, RB // Caveat: CARG4d == RA. | mov L:RB, SAVE_L | mov L:RB->base, BASE // Caveat: CARG3d == BASE. | mov CARG3d, RD | mov CARG1d, L:RB |.else | mov ARG4, RB | mov L:RB, SAVE_L | mov ARG3, RD | mov ARG2, RA | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | call extern lj_meta_equal // (lua_State *L, GCobj *o1, *o2, int ne) | // 0/1 or TValue * (metamethod) returned in eax (RC). | jmp <3 | |->vmeta_equal_cd: |.if FFI | sub PC, 4 | mov L:RB, SAVE_L | mov L:RB->base, BASE | mov FCARG1, L:RB | mov FCARG2, dword [PC-4] | mov SAVE_PC, PC | call extern lj_meta_equal_cd@8 // (lua_State *L, BCIns ins) | // 0/1 or TValue * (metamethod) returned in eax (RC). | jmp <3 |.endif | |//-- Arithmetic metamethods --------------------------------------------- | |->vmeta_arith_vno: |.if DUALNUM | movzx RB, PC_RB |.endif |->vmeta_arith_vn: | lea RC, [KBASE+RC*8] | jmp >1 | |->vmeta_arith_nvo: |.if DUALNUM | movzx RC, PC_RC |.endif |->vmeta_arith_nv: | lea RC, [KBASE+RC*8] | lea RB, [BASE+RB*8] | xchg RB, RC | jmp >2 | |->vmeta_unm: | lea RC, [BASE+RD*8] | mov RB, RC | jmp >2 | |->vmeta_arith_vvo: |.if DUALNUM | movzx RB, PC_RB |.endif |->vmeta_arith_vv: | lea RC, [BASE+RC*8] |1: | lea RB, [BASE+RB*8] |2: | lea RA, [BASE+RA*8] |.if X64WIN | mov CARG3d, RB | mov CARG4d, RC | movzx RC, PC_OP | mov ARG5d, RC | mov L:RB, SAVE_L | mov L:RB->base, BASE // Caveat: CARG2d == BASE. | mov CARG2d, RA | mov CARG1d, L:RB // Caveat: CARG1d == RA. |.elif X64 | movzx CARG5d, PC_OP | mov CARG2d, RA | mov CARG4d, RC // Caveat: CARG4d == RA. | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE // Caveat: CARG3d == BASE. | mov CARG3d, RB | mov L:RB, L:CARG1d |.else | mov ARG3, RB | mov L:RB, SAVE_L | mov ARG4, RC | movzx RC, PC_OP | mov ARG2, RA | mov ARG5, RC | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | call extern lj_meta_arith // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) | // NULL (finished) or TValue * (metamethod) returned in eax (RC). | mov BASE, L:RB->base | test RC, RC | jz ->cont_nop | | // Call metamethod for binary op. |->vmeta_binop: | // BASE = base, RC = new base, stack = cont/func/o1/o2 | mov RA, RC | sub RC, BASE | mov [RA-12], PC // [cont|PC] | lea PC, [RC+FRAME_CONT] | mov NARGS:RD, 2+1 // 2 args for func(o1, o2). | jmp ->vm_call_dispatch | |->vmeta_len: | mov L:RB, SAVE_L | mov L:RB->base, BASE | lea FCARG2, [BASE+RD*8] // Caveat: FCARG2 == BASE | mov L:FCARG1, L:RB | mov SAVE_PC, PC | call extern lj_meta_len@8 // (lua_State *L, TValue *o) | // NULL (retry) or TValue * (metamethod) returned in eax (RC). | mov BASE, L:RB->base #if LJ_52 | test RC, RC | jne ->vmeta_binop // Binop call for compatibility. | movzx RD, PC_RD | mov TAB:FCARG1, [BASE+RD*8] | jmp ->BC_LEN_Z #else | jmp ->vmeta_binop // Binop call for compatibility. #endif | |//-- Call metamethod ---------------------------------------------------- | |->vmeta_call_ra: | lea RA, [BASE+RA*8+8] |->vmeta_call: // Resolve and call __call metamethod. | // BASE = old base, RA = new base, RC = nargs+1, PC = return | mov TMP2, RA // Save RA, RC for us. | mov TMP1, NARGS:RD | sub RA, 8 |.if X64 | mov L:RB, SAVE_L | mov L:RB->base, BASE // Caveat: CARG2d/CARG3d may be BASE. | mov CARG2d, RA | lea CARG3d, [RA+NARGS:RD*8] | mov CARG1d, L:RB // Caveat: CARG1d may be RA. |.else | lea RC, [RA+NARGS:RD*8] | mov L:RB, SAVE_L | mov ARG2, RA | mov ARG3, RC | mov ARG1, L:RB | mov L:RB->base, BASE // This is the callers base! |.endif | mov SAVE_PC, PC | call extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) | mov BASE, L:RB->base | mov RA, TMP2 | mov NARGS:RD, TMP1 | mov LFUNC:RB, [RA-8] | add NARGS:RD, 1 | // This is fragile. L->base must not move, KBASE must always be defined. | cmp KBASE, BASE // Continue with CALLT if flag set. | je ->BC_CALLT_Z | mov BASE, RA | ins_call // Otherwise call resolved metamethod. | |//-- Argument coercion for 'for' statement ------------------------------ | |->vmeta_for: | mov L:RB, SAVE_L | mov L:RB->base, BASE | mov FCARG2, RA // Caveat: FCARG2 == BASE | mov L:FCARG1, L:RB // Caveat: FCARG1 == RA | mov SAVE_PC, PC | call extern lj_meta_for@8 // (lua_State *L, TValue *base) | mov BASE, L:RB->base | mov RC, [PC-4] | movzx RA, RCH | movzx OP, RCL | shr RC, 16 |.if X64 | jmp aword [DISPATCH+OP*8+GG_DISP2STATIC] // Retry FORI or JFORI. |.else | jmp aword [DISPATCH+OP*4+GG_DISP2STATIC] // Retry FORI or JFORI. |.endif | |//----------------------------------------------------------------------- |//-- Fast functions ----------------------------------------------------- |//----------------------------------------------------------------------- | |.macro .ffunc, name |->ff_ .. name: |.endmacro | |.macro .ffunc_1, name |->ff_ .. name: | cmp NARGS:RD, 1+1; jb ->fff_fallback |.endmacro | |.macro .ffunc_2, name |->ff_ .. name: | cmp NARGS:RD, 2+1; jb ->fff_fallback |.endmacro | |.macro .ffunc_n, name | .ffunc_1 name | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback | fld qword [BASE] |.endmacro | |.macro .ffunc_n, name, op | .ffunc_1 name | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback | op | fld qword [BASE] |.endmacro | |.macro .ffunc_nsse, name, op | .ffunc_1 name | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback | op xmm0, qword [BASE] |.endmacro | |.macro .ffunc_nsse, name | .ffunc_nsse name, movsd |.endmacro | |.macro .ffunc_nn, name | .ffunc_2 name | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback | cmp dword [BASE+12], LJ_TISNUM; jae ->fff_fallback | fld qword [BASE] | fld qword [BASE+8] |.endmacro | |.macro .ffunc_nnsse, name | .ffunc_2 name | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback | cmp dword [BASE+12], LJ_TISNUM; jae ->fff_fallback | movsd xmm0, qword [BASE] | movsd xmm1, qword [BASE+8] |.endmacro | |.macro .ffunc_nnr, name | .ffunc_2 name | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback | cmp dword [BASE+12], LJ_TISNUM; jae ->fff_fallback | fld qword [BASE+8] | fld qword [BASE] |.endmacro | |// Inlined GC threshold check. Caveat: uses label 1. |.macro ffgccheck | mov RB, [DISPATCH+DISPATCH_GL(gc.total)] | cmp RB, [DISPATCH+DISPATCH_GL(gc.threshold)] | jb >1 | call ->fff_gcstep |1: |.endmacro | |//-- Base library: checks ----------------------------------------------- | |.ffunc_1 assert | mov RB, [BASE+4] | cmp RB, LJ_TISTRUECOND; jae ->fff_fallback | mov PC, [BASE-4] | mov MULTRES, RD | mov [BASE-4], RB | mov RB, [BASE] | mov [BASE-8], RB | sub RD, 2 | jz >2 | mov RA, BASE |1: | add RA, 8 |.if X64 | mov RBa, [RA] | mov [RA-8], RBa |.else | mov RB, [RA+4] | mov [RA-4], RB | mov RB, [RA] | mov [RA-8], RB |.endif | sub RD, 1 | jnz <1 |2: | mov RD, MULTRES | jmp ->fff_res_ | |.ffunc_1 type | mov RB, [BASE+4] |.if X64 | mov RA, RB | sar RA, 15 | cmp RA, -2 | je >3 |.endif | mov RC, ~LJ_TNUMX | not RB | cmp RC, RB | cmova RC, RB |2: | mov CFUNC:RB, [BASE-8] | mov STR:RC, [CFUNC:RB+RC*8+((char *)(&((GCfuncC *)0)->upvalue))] | mov PC, [BASE-4] | mov dword [BASE-4], LJ_TSTR | mov [BASE-8], STR:RC | jmp ->fff_res1 |.if X64 |3: | mov RC, ~LJ_TLIGHTUD | jmp <2 |.endif | |//-- Base library: getters and setters --------------------------------- | |.ffunc_1 getmetatable | mov RB, [BASE+4] | mov PC, [BASE-4] | cmp RB, LJ_TTAB; jne >6 |1: // Field metatable must be at same offset for GCtab and GCudata! | mov TAB:RB, [BASE] | mov TAB:RB, TAB:RB->metatable |2: | test TAB:RB, TAB:RB | mov dword [BASE-4], LJ_TNIL | jz ->fff_res1 | mov STR:RC, [DISPATCH+DISPATCH_GL(gcroot)+4*(GCROOT_MMNAME+MM_metatable)] | mov dword [BASE-4], LJ_TTAB // Store metatable as default result. | mov [BASE-8], TAB:RB | mov RA, TAB:RB->hmask | and RA, STR:RC->hash | imul RA, #NODE | add NODE:RA, TAB:RB->node |3: // Rearranged logic, because we expect _not_ to find the key. | cmp dword NODE:RA->key.it, LJ_TSTR | jne >4 | cmp dword NODE:RA->key.gcr, STR:RC | je >5 |4: | mov NODE:RA, NODE:RA->next | test NODE:RA, NODE:RA | jnz <3 | jmp ->fff_res1 // Not found, keep default result. |5: | mov RB, [RA+4] | cmp RB, LJ_TNIL; je ->fff_res1 // Ditto for nil value. | mov RC, [RA] | mov [BASE-4], RB // Return value of mt.__metatable. | mov [BASE-8], RC | jmp ->fff_res1 | |6: | cmp RB, LJ_TUDATA; je <1 |.if X64 | cmp RB, LJ_TNUMX; ja >8 | cmp RB, LJ_TISNUM; jbe >7 | mov RB, LJ_TLIGHTUD | jmp >8 |7: |.else | cmp RB, LJ_TISNUM; ja >8 |.endif | mov RB, LJ_TNUMX |8: | not RB | mov TAB:RB, [DISPATCH+RB*4+DISPATCH_GL(gcroot[GCROOT_BASEMT])] | jmp <2 | |.ffunc_2 setmetatable | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback | // Fast path: no mt for table yet and not clearing the mt. | mov TAB:RB, [BASE] | cmp dword TAB:RB->metatable, 0; jne ->fff_fallback | cmp dword [BASE+12], LJ_TTAB; jne ->fff_fallback | mov TAB:RC, [BASE+8] | mov TAB:RB->metatable, TAB:RC | mov PC, [BASE-4] | mov dword [BASE-4], LJ_TTAB // Return original table. | mov [BASE-8], TAB:RB | test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) | jz >1 | // Possible write barrier. Table is black, but skip iswhite(mt) check. | barrierback TAB:RB, RC |1: | jmp ->fff_res1 | |.ffunc_2 rawget | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback |.if X64WIN | mov RB, BASE // Save BASE. | lea CARG3d, [BASE+8] | mov CARG2d, [BASE] // Caveat: CARG2d == BASE. | mov CARG1d, SAVE_L |.elif X64 | mov RB, BASE // Save BASE. | mov CARG2d, [BASE] | lea CARG3d, [BASE+8] // Caveat: CARG3d == BASE. | mov CARG1d, SAVE_L |.else | mov TAB:RD, [BASE] | mov L:RB, SAVE_L | mov ARG2, TAB:RD | mov ARG1, L:RB | mov RB, BASE // Save BASE. | add BASE, 8 | mov ARG3, BASE |.endif | call extern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) | // cTValue * returned in eax (RD). | mov BASE, RB // Restore BASE. | // Copy table slot. |.if X64 | mov RBa, [RD] | mov PC, [BASE-4] | mov [BASE-8], RBa |.else | mov RB, [RD] | mov RD, [RD+4] | mov PC, [BASE-4] | mov [BASE-8], RB | mov [BASE-4], RD |.endif | jmp ->fff_res1 | |//-- Base library: conversions ------------------------------------------ | |.ffunc tonumber | // Only handles the number case inline (without a base argument). | cmp NARGS:RD, 1+1; jne ->fff_fallback // Exactly one argument. | cmp dword [BASE+4], LJ_TISNUM |.if DUALNUM | jne >1 | mov RB, dword [BASE]; jmp ->fff_resi |1: | ja ->fff_fallback |.else | jae ->fff_fallback |.endif |.if SSE | movsd xmm0, qword [BASE]; jmp ->fff_resxmm0 |.else | fld qword [BASE]; jmp ->fff_resn |.endif | |.ffunc_1 tostring | // Only handles the string or number case inline. | mov PC, [BASE-4] | cmp dword [BASE+4], LJ_TSTR; jne >3 | // A __tostring method in the string base metatable is ignored. | mov STR:RD, [BASE] |2: | mov dword [BASE-4], LJ_TSTR | mov [BASE-8], STR:RD | jmp ->fff_res1 |3: // Handle numbers inline, unless a number base metatable is present. | cmp dword [BASE+4], LJ_TISNUM; ja ->fff_fallback | cmp dword [DISPATCH+DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM])], 0 | jne ->fff_fallback | ffgccheck // Caveat: uses label 1. | mov L:RB, SAVE_L | mov L:RB->base, BASE // Add frame since C call can throw. | mov SAVE_PC, PC // Redundant (but a defined value). |.if X64 and not X64WIN | mov FCARG2, BASE // Otherwise: FCARG2 == BASE |.endif | mov L:FCARG1, L:RB |.if DUALNUM | call extern lj_str_fromnumber@8 // (lua_State *L, cTValue *o) |.else | call extern lj_str_fromnum@8 // (lua_State *L, lua_Number *np) |.endif | // GCstr returned in eax (RD). | mov BASE, L:RB->base | jmp <2 | |//-- Base library: iterators ------------------------------------------- | |.ffunc_1 next | je >2 // Missing 2nd arg? |1: | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback | mov L:RB, SAVE_L | mov L:RB->base, BASE // Add frame since C call can throw. | mov L:RB->top, BASE // Dummy frame length is ok. | mov PC, [BASE-4] |.if X64WIN | lea CARG3d, [BASE+8] | mov CARG2d, [BASE] // Caveat: CARG2d == BASE. | mov CARG1d, L:RB |.elif X64 | mov CARG2d, [BASE] | lea CARG3d, [BASE+8] // Caveat: CARG3d == BASE. | mov CARG1d, L:RB |.else | mov TAB:RD, [BASE] | mov ARG2, TAB:RD | mov ARG1, L:RB | add BASE, 8 | mov ARG3, BASE |.endif | mov SAVE_PC, PC // Needed for ITERN fallback. | call extern lj_tab_next // (lua_State *L, GCtab *t, TValue *key) | // Flag returned in eax (RD). | mov BASE, L:RB->base | test RD, RD; jz >3 // End of traversal? | // Copy key and value to results. |.if X64 | mov RBa, [BASE+8] | mov RDa, [BASE+16] | mov [BASE-8], RBa | mov [BASE], RDa |.else | mov RB, [BASE+8] | mov RD, [BASE+12] | mov [BASE-8], RB | mov [BASE-4], RD | mov RB, [BASE+16] | mov RD, [BASE+20] | mov [BASE], RB | mov [BASE+4], RD |.endif |->fff_res2: | mov RD, 1+2 | jmp ->fff_res |2: // Set missing 2nd arg to nil. | mov dword [BASE+12], LJ_TNIL | jmp <1 |3: // End of traversal: return nil. | mov dword [BASE-4], LJ_TNIL | jmp ->fff_res1 | |.ffunc_1 pairs | mov TAB:RB, [BASE] | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback #if LJ_52 | cmp dword TAB:RB->metatable, 0; jne ->fff_fallback #endif | mov CFUNC:RB, [BASE-8] | mov CFUNC:RD, CFUNC:RB->upvalue[0] | mov PC, [BASE-4] | mov dword [BASE-4], LJ_TFUNC | mov [BASE-8], CFUNC:RD | mov dword [BASE+12], LJ_TNIL | mov RD, 1+3 | jmp ->fff_res | |.ffunc_1 ipairs_aux | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback | cmp dword [BASE+12], LJ_TISNUM |.if DUALNUM | jne ->fff_fallback |.else | jae ->fff_fallback |.endif | mov PC, [BASE-4] |.if DUALNUM | mov RD, dword [BASE+8] | add RD, 1 | mov dword [BASE-4], LJ_TISNUM | mov dword [BASE-8], RD |.elif SSE | movsd xmm0, qword [BASE+8] | sseconst_1 xmm1, RBa | addsd xmm0, xmm1 | cvtsd2si RD, xmm0 | movsd qword [BASE-8], xmm0 |.else | fld qword [BASE+8] | fld1 | faddp st1 | fist ARG1 | fstp qword [BASE-8] | mov RD, ARG1 |.endif | mov TAB:RB, [BASE] | cmp RD, TAB:RB->asize; jae >2 // Not in array part? | shl RD, 3 | add RD, TAB:RB->array |1: | cmp dword [RD+4], LJ_TNIL; je ->fff_res0 | // Copy array slot. |.if X64 | mov RBa, [RD] | mov [BASE], RBa |.else | mov RB, [RD] | mov RD, [RD+4] | mov [BASE], RB | mov [BASE+4], RD |.endif | jmp ->fff_res2 |2: // Check for empty hash part first. Otherwise call C function. | cmp dword TAB:RB->hmask, 0; je ->fff_res0 | mov FCARG1, TAB:RB | mov RB, BASE // Save BASE. | mov FCARG2, RD // Caveat: FCARG2 == BASE | call extern lj_tab_getinth@8 // (GCtab *t, int32_t key) | // cTValue * or NULL returned in eax (RD). | mov BASE, RB | test RD, RD | jnz <1 |->fff_res0: | mov RD, 1+0 | jmp ->fff_res | |.ffunc_1 ipairs | mov TAB:RB, [BASE] | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback #if LJ_52 | cmp dword TAB:RB->metatable, 0; jne ->fff_fallback #endif | mov CFUNC:RB, [BASE-8] | mov CFUNC:RD, CFUNC:RB->upvalue[0] | mov PC, [BASE-4] | mov dword [BASE-4], LJ_TFUNC | mov [BASE-8], CFUNC:RD |.if DUALNUM | mov dword [BASE+12], LJ_TISNUM | mov dword [BASE+8], 0 |.elif SSE | xorps xmm0, xmm0 | movsd qword [BASE+8], xmm0 |.else | fldz | fstp qword [BASE+8] |.endif | mov RD, 1+3 | jmp ->fff_res | |//-- Base library: catch errors ---------------------------------------- | |.ffunc_1 pcall | lea RA, [BASE+8] | sub NARGS:RD, 1 | mov PC, 8+FRAME_PCALL |1: | movzx RB, byte [DISPATCH+DISPATCH_GL(hookmask)] | shr RB, HOOK_ACTIVE_SHIFT | and RB, 1 | add PC, RB // Remember active hook before pcall. | jmp ->vm_call_dispatch | |.ffunc_2 xpcall | cmp dword [BASE+12], LJ_TFUNC; jne ->fff_fallback | mov RB, [BASE+4] // Swap function and traceback. | mov [BASE+12], RB | mov dword [BASE+4], LJ_TFUNC | mov LFUNC:RB, [BASE] | mov PC, [BASE+8] | mov [BASE+8], LFUNC:RB | mov [BASE], PC | lea RA, [BASE+16] | sub NARGS:RD, 2 | mov PC, 16+FRAME_PCALL | jmp <1 | |//-- Coroutine library -------------------------------------------------- | |.macro coroutine_resume_wrap, resume |.if resume |.ffunc_1 coroutine_resume | mov L:RB, [BASE] |.else |.ffunc coroutine_wrap_aux | mov CFUNC:RB, [BASE-8] | mov L:RB, CFUNC:RB->upvalue[0].gcr |.endif | mov PC, [BASE-4] | mov SAVE_PC, PC |.if X64 | mov TMP1, L:RB |.else | mov ARG1, L:RB |.endif |.if resume | cmp dword [BASE+4], LJ_TTHREAD; jne ->fff_fallback |.endif | cmp aword L:RB->cframe, 0; jne ->fff_fallback | cmp byte L:RB->status, LUA_YIELD; ja ->fff_fallback | mov RA, L:RB->top | je >1 // Status != LUA_YIELD (i.e. 0)? | cmp RA, L:RB->base // Check for presence of initial func. | je ->fff_fallback |1: |.if resume | lea PC, [RA+NARGS:RD*8-16] // Check stack space (-1-thread). |.else | lea PC, [RA+NARGS:RD*8-8] // Check stack space (-1). |.endif | cmp PC, L:RB->maxstack; ja ->fff_fallback | mov L:RB->top, PC | | mov L:RB, SAVE_L | mov L:RB->base, BASE |.if resume | add BASE, 8 // Keep resumed thread in stack for GC. |.endif | mov L:RB->top, BASE |.if resume | lea RB, [BASE+NARGS:RD*8-24] // RB = end of source for stack move. |.else | lea RB, [BASE+NARGS:RD*8-16] // RB = end of source for stack move. |.endif | sub RBa, PCa // Relative to PC. | | cmp PC, RA | je >3 |2: // Move args to coroutine. |.if X64 | mov RCa, [PC+RB] | mov [PC-8], RCa |.else | mov RC, [PC+RB+4] | mov [PC-4], RC | mov RC, [PC+RB] | mov [PC-8], RC |.endif | sub PC, 8 | cmp PC, RA | jne <2 |3: |.if X64 | mov CARG2d, RA | mov CARG1d, TMP1 |.else | mov ARG2, RA | xor RA, RA | mov ARG4, RA | mov ARG3, RA |.endif | call ->vm_resume // (lua_State *L, TValue *base, 0, 0) | set_vmstate INTERP | | mov L:RB, SAVE_L |.if X64 | mov L:PC, TMP1 |.else | mov L:PC, ARG1 // The callee doesn't modify SAVE_L. |.endif | mov BASE, L:RB->base | cmp eax, LUA_YIELD | ja >8 |4: | mov RA, L:PC->base | mov KBASE, L:PC->top | mov L:PC->top, RA // Clear coroutine stack. | mov PC, KBASE | sub PC, RA | je >6 // No results? | lea RD, [BASE+PC] | shr PC, 3 | cmp RD, L:RB->maxstack | ja >9 // Need to grow stack? | | mov RB, BASE | sub RBa, RAa |5: // Move results from coroutine. |.if X64 | mov RDa, [RA] | mov [RA+RB], RDa |.else | mov RD, [RA] | mov [RA+RB], RD | mov RD, [RA+4] | mov [RA+RB+4], RD |.endif | add RA, 8 | cmp RA, KBASE | jne <5 |6: |.if resume | lea RD, [PC+2] // nresults+1 = 1 + true + results. | mov dword [BASE-4], LJ_TTRUE // Prepend true to results. |.else | lea RD, [PC+1] // nresults+1 = 1 + results. |.endif |7: | mov PC, SAVE_PC | mov MULTRES, RD |.if resume | mov RAa, -8 |.else | xor RA, RA |.endif | test PC, FRAME_TYPE | jz ->BC_RET_Z | jmp ->vm_return | |8: // Coroutine returned with error (at co->top-1). |.if resume | mov dword [BASE-4], LJ_TFALSE // Prepend false to results. | mov RA, L:PC->top | sub RA, 8 | mov L:PC->top, RA // Clear error from coroutine stack. | // Copy error message. |.if X64 | mov RDa, [RA] | mov [BASE], RDa |.else | mov RD, [RA] | mov [BASE], RD | mov RD, [RA+4] | mov [BASE+4], RD |.endif | mov RD, 1+2 // nresults+1 = 1 + false + error. | jmp <7 |.else | mov FCARG2, L:PC | mov FCARG1, L:RB | call extern lj_ffh_coroutine_wrap_err@8 // (lua_State *L, lua_State *co) | // Error function does not return. |.endif | |9: // Handle stack expansion on return from yield. |.if X64 | mov L:RA, TMP1 |.else | mov L:RA, ARG1 // The callee doesn't modify SAVE_L. |.endif | mov L:RA->top, KBASE // Undo coroutine stack clearing. | mov FCARG2, PC | mov FCARG1, L:RB | call extern lj_state_growstack@8 // (lua_State *L, int n) |.if X64 | mov L:PC, TMP1 |.else | mov L:PC, ARG1 |.endif | mov BASE, L:RB->base | jmp <4 // Retry the stack move. |.endmacro | | coroutine_resume_wrap 1 // coroutine.resume | coroutine_resume_wrap 0 // coroutine.wrap | |.ffunc coroutine_yield | mov L:RB, SAVE_L | test aword L:RB->cframe, CFRAME_RESUME | jz ->fff_fallback | mov L:RB->base, BASE | lea RD, [BASE+NARGS:RD*8-8] | mov L:RB->top, RD | xor RD, RD | mov aword L:RB->cframe, RDa | mov al, LUA_YIELD | mov byte L:RB->status, al | jmp ->vm_leave_unw | |//-- Math library ------------------------------------------------------- | |.if not DUALNUM |->fff_resi: // Dummy. |.endif | |.if SSE |->fff_resn: | mov PC, [BASE-4] | fstp qword [BASE-8] | jmp ->fff_res1 |.endif | | .ffunc_1 math_abs |.if DUALNUM | cmp dword [BASE+4], LJ_TISNUM; jne >2 | mov RB, dword [BASE] | cmp RB, 0; jns ->fff_resi | neg RB; js >1 |->fff_resbit: |->fff_resi: | mov PC, [BASE-4] | mov dword [BASE-4], LJ_TISNUM | mov dword [BASE-8], RB | jmp ->fff_res1 |1: | mov PC, [BASE-4] | mov dword [BASE-4], 0x41e00000 // 2^31. | mov dword [BASE-8], 0 | jmp ->fff_res1 |2: | ja ->fff_fallback |.else | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback |.endif | |.if SSE | movsd xmm0, qword [BASE] | sseconst_abs xmm1, RDa | andps xmm0, xmm1 |->fff_resxmm0: | mov PC, [BASE-4] | movsd qword [BASE-8], xmm0 | // fallthrough |.else | fld qword [BASE] | fabs | // fallthrough |->fff_resxmm0: // Dummy. |->fff_resn: | mov PC, [BASE-4] | fstp qword [BASE-8] |.endif | |->fff_res1: | mov RD, 1+1 |->fff_res: | mov MULTRES, RD |->fff_res_: | test PC, FRAME_TYPE | jnz >7 |5: | cmp PC_RB, RDL // More results expected? | ja >6 | // Adjust BASE. KBASE is assumed to be set for the calling frame. | movzx RA, PC_RA | not RAa // Note: ~RA = -(RA+1) | lea BASE, [BASE+RA*8] // base = base - (RA+1)*8 | ins_next | |6: // Fill up results with nil. | mov dword [BASE+RD*8-12], LJ_TNIL | add RD, 1 | jmp <5 | |7: // Non-standard return case. | mov RAa, -8 // Results start at BASE+RA = BASE-8. | jmp ->vm_return | |.macro math_round, func | .ffunc math_ .. func |.if DUALNUM | cmp dword [BASE+4], LJ_TISNUM; jne >1 | mov RB, dword [BASE]; jmp ->fff_resi |1: | ja ->fff_fallback |.else | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback |.endif |.if SSE | movsd xmm0, qword [BASE] | call ->vm_ .. func | .if DUALNUM | cvtsd2si RB, xmm0 | cmp RB, 0x80000000 | jne ->fff_resi | cvtsi2sd xmm1, RB | ucomisd xmm0, xmm1 | jp ->fff_resxmm0 | je ->fff_resi | .endif | jmp ->fff_resxmm0 |.else | fld qword [BASE] | call ->vm_ .. func | .if DUALNUM | fist ARG1 | mov RB, ARG1 | cmp RB, 0x80000000; jne >2 | fdup | fild ARG1 | fcomparepp | jp ->fff_resn | jne ->fff_resn |2: | fpop | jmp ->fff_resi | .else | jmp ->fff_resn | .endif |.endif |.endmacro | | math_round floor | math_round ceil | |.if SSE |.ffunc_nsse math_sqrt, sqrtsd; jmp ->fff_resxmm0 |.else |.ffunc_n math_sqrt; fsqrt; jmp ->fff_resn |.endif | |.ffunc math_log | cmp NARGS:RD, 1+1; jne ->fff_fallback // Exactly one argument. | cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback | fldln2; fld qword [BASE]; fyl2x; jmp ->fff_resn | |.ffunc_n math_log10, fldlg2; fyl2x; jmp ->fff_resn |.ffunc_n math_exp; call ->vm_exp_x87; jmp ->fff_resn | |.ffunc_n math_sin; fsin; jmp ->fff_resn |.ffunc_n math_cos; fcos; jmp ->fff_resn |.ffunc_n math_tan; fptan; fpop; jmp ->fff_resn | |.ffunc_n math_asin | fdup; fmul st0; fld1; fsubrp st1; fsqrt; fpatan | jmp ->fff_resn |.ffunc_n math_acos | fdup; fmul st0; fld1; fsubrp st1; fsqrt; fxch; fpatan | jmp ->fff_resn |.ffunc_n math_atan; fld1; fpatan; jmp ->fff_resn | |.macro math_extern, func |.if SSE | .ffunc_nsse math_ .. func | .if not X64 | movsd FPARG1, xmm0 | .endif |.else | .ffunc_n math_ .. func | fstp FPARG1 |.endif | mov RB, BASE | call extern lj_vm_ .. func | mov BASE, RB | .if X64 | jmp ->fff_resxmm0 | .else | jmp ->fff_resn | .endif |.endmacro | | math_extern sinh | math_extern cosh | math_extern tanh | |->ff_math_deg: |.if SSE |.ffunc_nsse math_rad | mov CFUNC:RB, [BASE-8] | mulsd xmm0, qword CFUNC:RB->upvalue[0] | jmp ->fff_resxmm0 |.else |.ffunc_n math_rad | mov CFUNC:RB, [BASE-8] | fmul qword CFUNC:RB->upvalue[0] | jmp ->fff_resn |.endif | |.ffunc_nn math_atan2; fpatan; jmp ->fff_resn |.ffunc_nnr math_ldexp; fscale; fpop1; jmp ->fff_resn | |.ffunc_1 math_frexp | mov RB, [BASE+4] | cmp RB, LJ_TISNUM; jae ->fff_fallback | mov PC, [BASE-4] | mov RC, [BASE] | mov [BASE-4], RB; mov [BASE-8], RC | shl RB, 1; cmp RB, 0xffe00000; jae >3 | or RC, RB; jz >3 | mov RC, 1022 | cmp RB, 0x00200000; jb >4 |1: | shr RB, 21; sub RB, RC // Extract and unbias exponent. |.if SSE | cvtsi2sd xmm0, RB |.else | mov TMP1, RB; fild TMP1 |.endif | mov RB, [BASE-4] | and RB, 0x800fffff // Mask off exponent. | or RB, 0x3fe00000 // Put mantissa in range [0.5,1) or 0. | mov [BASE-4], RB |2: |.if SSE | movsd qword [BASE], xmm0 |.else | fstp qword [BASE] |.endif | mov RD, 1+2 | jmp ->fff_res |3: // Return +-0, +-Inf, NaN unmodified and an exponent of 0. |.if SSE | xorps xmm0, xmm0; jmp <2 |.else | fldz; jmp <2 |.endif |4: // Handle denormals by multiplying with 2^54 and adjusting the bias. |.if SSE | movsd xmm0, qword [BASE] | sseconst_hi xmm1, RBa, 43500000 // 2^54. | mulsd xmm0, xmm1 | movsd qword [BASE-8], xmm0 |.else | fld qword [BASE] | mov TMP1, 0x5a800000; fmul TMP1 // x = x*2^54 | fstp qword [BASE-8] |.endif | mov RB, [BASE-4]; mov RC, 1076; shl RB, 1; jmp <1 | |.if SSE |.ffunc_nsse math_modf |.else |.ffunc_n math_modf |.endif | mov RB, [BASE+4] | mov PC, [BASE-4] | shl RB, 1; cmp RB, 0xffe00000; je >4 // +-Inf? |.if SSE | movaps xmm4, xmm0 | call ->vm_trunc | subsd xmm4, xmm0 |1: | movsd qword [BASE-8], xmm0 | movsd qword [BASE], xmm4 |.else | fdup | call ->vm_trunc | fsub st1, st0 |1: | fstp qword [BASE-8] | fstp qword [BASE] |.endif | mov RC, [BASE-4]; mov RB, [BASE+4] | xor RC, RB; js >3 // Need to adjust sign? |2: | mov RD, 1+2 | jmp ->fff_res |3: | xor RB, 0x80000000; mov [BASE+4], RB // Flip sign of fraction. | jmp <2 |4: |.if SSE | xorps xmm4, xmm4; jmp <1 // Return +-Inf and +-0. |.else | fldz; fxch; jmp <1 // Return +-Inf and +-0. |.endif | |.ffunc_nnr math_fmod |1: ; fprem; fnstsw ax; sahf; jp <1 | fpop1 | jmp ->fff_resn | |.if SSE |.ffunc_nnsse math_pow; call ->vm_pow; jmp ->fff_resxmm0 |.else |.ffunc_nn math_pow; call ->vm_pow; jmp ->fff_resn |.endif | |.macro math_minmax, name, cmovop, fcmovop, sseop | .ffunc name | mov RA, 2 | cmp dword [BASE+4], LJ_TISNUM |.if DUALNUM | jne >4 | mov RB, dword [BASE] |1: // Handle integers. | cmp RA, RD; jae ->fff_resi | cmp dword [BASE+RA*8-4], LJ_TISNUM; jne >3 | cmp RB, dword [BASE+RA*8-8] | cmovop RB, dword [BASE+RA*8-8] | add RA, 1 | jmp <1 |3: | ja ->fff_fallback | // Convert intermediate result to number and continue below. |.if SSE | cvtsi2sd xmm0, RB |.else | mov TMP1, RB | fild TMP1 |.endif | jmp >6 |4: | ja ->fff_fallback |.else | jae ->fff_fallback |.endif | |.if SSE | movsd xmm0, qword [BASE] |5: // Handle numbers or integers. | cmp RA, RD; jae ->fff_resxmm0 | cmp dword [BASE+RA*8-4], LJ_TISNUM |.if DUALNUM | jb >6 | ja ->fff_fallback | cvtsi2sd xmm1, dword [BASE+RA*8-8] | jmp >7 |.else | jae ->fff_fallback |.endif |6: | movsd xmm1, qword [BASE+RA*8-8] |7: | sseop xmm0, xmm1 | add RA, 1 | jmp <5 |.else | fld qword [BASE] |5: // Handle numbers or integers. | cmp RA, RD; jae ->fff_resn | cmp dword [BASE+RA*8-4], LJ_TISNUM |.if DUALNUM | jb >6 | ja >9 | fild dword [BASE+RA*8-8] | jmp >7 |.else | jae >9 |.endif |6: | fld qword [BASE+RA*8-8] |7: | fucomi st1; fcmovop st1; fpop1 | add RA, 1 | jmp <5 |.endif |.endmacro | | math_minmax math_min, cmovg, fcmovnbe, minsd | math_minmax math_max, cmovl, fcmovbe, maxsd |.if not SSE |9: | fpop; jmp ->fff_fallback |.endif | |//-- String library ----------------------------------------------------- | |.ffunc_1 string_len | cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback | mov STR:RB, [BASE] |.if DUALNUM | mov RB, dword STR:RB->len; jmp ->fff_resi |.elif SSE | cvtsi2sd xmm0, dword STR:RB->len; jmp ->fff_resxmm0 |.else | fild dword STR:RB->len; jmp ->fff_resn |.endif | |.ffunc string_byte // Only handle the 1-arg case here. | cmp NARGS:RD, 1+1; jne ->fff_fallback | cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback | mov STR:RB, [BASE] | mov PC, [BASE-4] | cmp dword STR:RB->len, 1 | jb ->fff_res0 // Return no results for empty string. | movzx RB, byte STR:RB[1] |.if DUALNUM | jmp ->fff_resi |.elif SSE | cvtsi2sd xmm0, RB; jmp ->fff_resxmm0 |.else | mov TMP1, RB; fild TMP1; jmp ->fff_resn |.endif | |.ffunc string_char // Only handle the 1-arg case here. | ffgccheck | cmp NARGS:RD, 1+1; jne ->fff_fallback // *Exactly* 1 arg. | cmp dword [BASE+4], LJ_TISNUM |.if DUALNUM | jne ->fff_fallback | mov RB, dword [BASE] | cmp RB, 255; ja ->fff_fallback | mov TMP2, RB |.elif SSE | jae ->fff_fallback | cvttsd2si RB, qword [BASE] | cmp RB, 255; ja ->fff_fallback | mov TMP2, RB |.else | jae ->fff_fallback | fld qword [BASE] | fistp TMP2 | cmp TMP2, 255; ja ->fff_fallback |.endif |.if X64 | mov TMP3, 1 |.else | mov ARG3, 1 |.endif | lea RDa, TMP2 // Points to stack. Little-endian. |->fff_newstr: | mov L:RB, SAVE_L | mov L:RB->base, BASE |.if X64 | mov CARG3d, TMP3 // Zero-extended to size_t. | mov CARG2, RDa // May be 64 bit ptr to stack. | mov CARG1d, L:RB |.else | mov ARG2, RD | mov ARG1, L:RB |.endif | mov SAVE_PC, PC | call extern lj_str_new // (lua_State *L, char *str, size_t l) | // GCstr * returned in eax (RD). | mov BASE, L:RB->base | mov PC, [BASE-4] | mov dword [BASE-4], LJ_TSTR | mov [BASE-8], STR:RD | jmp ->fff_res1 | |.ffunc string_sub | ffgccheck | mov TMP2, -1 | cmp NARGS:RD, 1+2; jb ->fff_fallback | jna >1 | cmp dword [BASE+20], LJ_TISNUM |.if DUALNUM | jne ->fff_fallback | mov RB, dword [BASE+16] | mov TMP2, RB |.elif SSE | jae ->fff_fallback | cvttsd2si RB, qword [BASE+16] | mov TMP2, RB |.else | jae ->fff_fallback | fld qword [BASE+16] | fistp TMP2 |.endif |1: | cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback | cmp dword [BASE+12], LJ_TISNUM |.if DUALNUM | jne ->fff_fallback |.else | jae ->fff_fallback |.endif | mov STR:RB, [BASE] | mov TMP3, STR:RB | mov RB, STR:RB->len |.if DUALNUM | mov RA, dword [BASE+8] |.elif SSE | cvttsd2si RA, qword [BASE+8] |.else | fld qword [BASE+8] | fistp ARG3 | mov RA, ARG3 |.endif | mov RC, TMP2 | cmp RB, RC // len < end? (unsigned compare) | jb >5 |2: | test RA, RA // start <= 0? | jle >7 |3: | mov STR:RB, TMP3 | sub RC, RA // start > end? | jl ->fff_emptystr | lea RB, [STR:RB+RA+#STR-1] | add RC, 1 |4: |.if X64 | mov TMP3, RC |.else | mov ARG3, RC |.endif | mov RD, RB | jmp ->fff_newstr | |5: // Negative end or overflow. | jl >6 | lea RC, [RC+RB+1] // end = end+(len+1) | jmp <2 |6: // Overflow. | mov RC, RB // end = len | jmp <2 | |7: // Negative start or underflow. | je >8 | add RA, RB // start = start+(len+1) | add RA, 1 | jg <3 // start > 0? |8: // Underflow. | mov RA, 1 // start = 1 | jmp <3 | |->fff_emptystr: // Range underflow. | xor RC, RC // Zero length. Any ptr in RB is ok. | jmp <4 | |.ffunc string_rep // Only handle the 1-char case inline. | ffgccheck | cmp NARGS:RD, 2+1; jne ->fff_fallback // Exactly 2 arguments. | cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback | cmp dword [BASE+12], LJ_TISNUM | mov STR:RB, [BASE] |.if DUALNUM | jne ->fff_fallback | mov RC, dword [BASE+8] |.elif SSE | jae ->fff_fallback | cvttsd2si RC, qword [BASE+8] |.else | jae ->fff_fallback | fld qword [BASE+8] | fistp TMP2 | mov RC, TMP2 |.endif | test RC, RC | jle ->fff_emptystr // Count <= 0? (or non-int) | cmp dword STR:RB->len, 1 | jb ->fff_emptystr // Zero length string? | jne ->fff_fallback_2 // Fallback for > 1-char strings. | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_2 | movzx RA, byte STR:RB[1] | mov RB, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] |.if X64 | mov TMP3, RC |.else | mov ARG3, RC |.endif |1: // Fill buffer with char. Yes, this is suboptimal code (do you care?). | mov [RB], RAL | add RB, 1 | sub RC, 1 | jnz <1 | mov RD, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] | jmp ->fff_newstr | |.ffunc_1 string_reverse | ffgccheck | cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback | mov STR:RB, [BASE] | mov RC, STR:RB->len | test RC, RC | jz ->fff_emptystr // Zero length string? | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1 | add RB, #STR | mov TMP2, PC // Need another temp register. |.if X64 | mov TMP3, RC |.else | mov ARG3, RC |.endif | mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] |1: | movzx RA, byte [RB] | add RB, 1 | sub RC, 1 | mov [PC+RC], RAL | jnz <1 | mov RD, PC | mov PC, TMP2 | jmp ->fff_newstr | |.macro ffstring_case, name, lo, hi | .ffunc_1 name | ffgccheck | cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback | mov STR:RB, [BASE] | mov RC, STR:RB->len | cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1 | add RB, #STR | mov TMP2, PC // Need another temp register. |.if X64 | mov TMP3, RC |.else | mov ARG3, RC |.endif | mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] | jmp >3 |1: // ASCII case conversion. Yes, this is suboptimal code (do you care?). | movzx RA, byte [RB+RC] | cmp RA, lo | jb >2 | cmp RA, hi | ja >2 | xor RA, 0x20 |2: | mov [PC+RC], RAL |3: | sub RC, 1 | jns <1 | mov RD, PC | mov PC, TMP2 | jmp ->fff_newstr |.endmacro | |ffstring_case string_lower, 0x41, 0x5a |ffstring_case string_upper, 0x61, 0x7a | |//-- Table library ------------------------------------------------------ | |.ffunc_1 table_getn | cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback | mov RB, BASE // Save BASE. | mov TAB:FCARG1, [BASE] | call extern lj_tab_len@4 // LJ_FASTCALL (GCtab *t) | // Length of table returned in eax (RD). | mov BASE, RB // Restore BASE. |.if DUALNUM | mov RB, RD; jmp ->fff_resi |.elif SSE | cvtsi2sd xmm0, RD; jmp ->fff_resxmm0 |.else | mov ARG1, RD; fild ARG1; jmp ->fff_resn |.endif | |//-- Bit library -------------------------------------------------------- | |.define TOBIT_BIAS, 0x59c00000 // 2^52 + 2^51 (float, not double!). | |.macro .ffunc_bit, name, kind | .ffunc_1 name |.if kind == 2 |.if SSE | sseconst_tobit xmm1, RBa |.else | mov TMP1, TOBIT_BIAS |.endif |.endif | cmp dword [BASE+4], LJ_TISNUM |.if DUALNUM | jne >1 | mov RB, dword [BASE] |.if kind > 0 | jmp >2 |.else | jmp ->fff_resbit |.endif |1: | ja ->fff_fallback |.else | jae ->fff_fallback |.endif |.if SSE | movsd xmm0, qword [BASE] |.if kind < 2 | sseconst_tobit xmm1, RBa |.endif | addsd xmm0, xmm1 | movd RB, xmm0 |.else | fld qword [BASE] |.if kind < 2 | mov TMP1, TOBIT_BIAS |.endif | fadd TMP1 | fstp FPARG1 |.if kind > 0 | mov RB, ARG1 |.endif |.endif |2: |.endmacro | |.ffunc_bit bit_tobit, 0 |.if DUALNUM or SSE |.if not SSE | mov RB, ARG1 |.endif | jmp ->fff_resbit |.else | fild ARG1 | jmp ->fff_resn |.endif | |.macro .ffunc_bit_op, name, ins | .ffunc_bit name, 2 | mov TMP2, NARGS:RD // Save for fallback. | lea RD, [BASE+NARGS:RD*8-16] |1: | cmp RD, BASE | jbe ->fff_resbit | cmp dword [RD+4], LJ_TISNUM |.if DUALNUM | jne >2 | ins RB, dword [RD] | sub RD, 8 | jmp <1 |2: | ja ->fff_fallback_bit_op |.else | jae ->fff_fallback_bit_op |.endif |.if SSE | movsd xmm0, qword [RD] | addsd xmm0, xmm1 | movd RA, xmm0 | ins RB, RA |.else | fld qword [RD] | fadd TMP1 | fstp FPARG1 | ins RB, ARG1 |.endif | sub RD, 8 | jmp <1 |.endmacro | |.ffunc_bit_op bit_band, and |.ffunc_bit_op bit_bor, or |.ffunc_bit_op bit_bxor, xor | |.ffunc_bit bit_bswap, 1 | bswap RB | jmp ->fff_resbit | |.ffunc_bit bit_bnot, 1 | not RB |.if DUALNUM | jmp ->fff_resbit |.elif SSE |->fff_resbit: | cvtsi2sd xmm0, RB | jmp ->fff_resxmm0 |.else |->fff_resbit: | mov ARG1, RB | fild ARG1 | jmp ->fff_resn |.endif | |->fff_fallback_bit_op: | mov NARGS:RD, TMP2 // Restore for fallback | jmp ->fff_fallback | |.macro .ffunc_bit_sh, name, ins |.if DUALNUM | .ffunc_bit name, 1 | // Note: no inline conversion from number for 2nd argument! | cmp dword [BASE+12], LJ_TISNUM; jne ->fff_fallback | mov RA, dword [BASE+8] |.elif SSE | .ffunc_nnsse name | sseconst_tobit xmm2, RBa | addsd xmm0, xmm2 | addsd xmm1, xmm2 | movd RB, xmm0 | movd RA, xmm1 |.else | .ffunc_nn name | mov TMP1, TOBIT_BIAS | fadd TMP1 | fstp FPARG3 | fadd TMP1 | fstp FPARG1 | mov RA, ARG3 | mov RB, ARG1 |.endif | ins RB, cl // Assumes RA is ecx. | jmp ->fff_resbit |.endmacro | |.ffunc_bit_sh bit_lshift, shl |.ffunc_bit_sh bit_rshift, shr |.ffunc_bit_sh bit_arshift, sar |.ffunc_bit_sh bit_rol, rol |.ffunc_bit_sh bit_ror, ror | |//----------------------------------------------------------------------- | |->fff_fallback_2: | mov NARGS:RD, 1+2 // Other args are ignored, anyway. | jmp ->fff_fallback |->fff_fallback_1: | mov NARGS:RD, 1+1 // Other args are ignored, anyway. |->fff_fallback: // Call fast function fallback handler. | // BASE = new base, RD = nargs+1 | mov L:RB, SAVE_L | mov PC, [BASE-4] // Fallback may overwrite PC. | mov SAVE_PC, PC // Redundant (but a defined value). | mov L:RB->base, BASE | lea RD, [BASE+NARGS:RD*8-8] | lea RA, [RD+8*LUA_MINSTACK] // Ensure enough space for handler. | mov L:RB->top, RD | mov CFUNC:RD, [BASE-8] | cmp RA, L:RB->maxstack | ja >5 // Need to grow stack. |.if X64 | mov CARG1d, L:RB |.else | mov ARG1, L:RB |.endif | call aword CFUNC:RD->f // (lua_State *L) | mov BASE, L:RB->base | // Either throws an error, or recovers and returns -1, 0 or nresults+1. | test RD, RD; jg ->fff_res // Returned nresults+1? |1: | mov RA, L:RB->top | sub RA, BASE | shr RA, 3 | test RD, RD | lea NARGS:RD, [RA+1] | mov LFUNC:RB, [BASE-8] | jne ->vm_call_tail // Returned -1? | ins_callt // Returned 0: retry fast path. | |// Reconstruct previous base for vmeta_call during tailcall. |->vm_call_tail: | mov RA, BASE | test PC, FRAME_TYPE | jnz >3 | movzx RB, PC_RA | not RBa // Note: ~RB = -(RB+1) | lea BASE, [BASE+RB*8] // base = base - (RB+1)*8 | jmp ->vm_call_dispatch // Resolve again for tailcall. |3: | mov RB, PC | and RB, -8 | sub BASE, RB | jmp ->vm_call_dispatch // Resolve again for tailcall. | |5: // Grow stack for fallback handler. | mov FCARG2, LUA_MINSTACK | mov FCARG1, L:RB | call extern lj_state_growstack@8 // (lua_State *L, int n) | mov BASE, L:RB->base | xor RD, RD // Simulate a return 0. | jmp <1 // Dumb retry (goes through ff first). | |->fff_gcstep: // Call GC step function. | // BASE = new base, RD = nargs+1 | pop RBa // Must keep stack at same level. | mov TMPa, RBa // Save return address | mov L:RB, SAVE_L | mov SAVE_PC, PC // Redundant (but a defined value). | mov L:RB->base, BASE | lea RD, [BASE+NARGS:RD*8-8] | mov FCARG1, L:RB | mov L:RB->top, RD | call extern lj_gc_step@4 // (lua_State *L) | mov BASE, L:RB->base | mov RD, L:RB->top | sub RD, BASE | shr RD, 3 | add NARGS:RD, 1 | mov RBa, TMPa | push RBa // Restore return address. | ret | |//----------------------------------------------------------------------- |//-- Special dispatch targets ------------------------------------------- |//----------------------------------------------------------------------- | |->vm_record: // Dispatch target for recording phase. |.if JIT | movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] | test RDL, HOOK_VMEVENT // No recording while in vmevent. | jnz >5 | // Decrement the hookcount for consistency, but always do the call. | test RDL, HOOK_ACTIVE | jnz >1 | test RDL, LUA_MASKLINE|LUA_MASKCOUNT | jz >1 | dec dword [DISPATCH+DISPATCH_GL(hookcount)] | jmp >1 |.endif | |->vm_rethook: // Dispatch target for return hooks. | movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] | test RDL, HOOK_ACTIVE // Hook already active? | jnz >5 | jmp >1 | |->vm_inshook: // Dispatch target for instr/line hooks. | movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] | test RDL, HOOK_ACTIVE // Hook already active? | jnz >5 | | test RDL, LUA_MASKLINE|LUA_MASKCOUNT | jz >5 | dec dword [DISPATCH+DISPATCH_GL(hookcount)] | jz >1 | test RDL, LUA_MASKLINE | jz >5 |1: | mov L:RB, SAVE_L | mov L:RB->base, BASE | mov FCARG2, PC // Caveat: FCARG2 == BASE | mov FCARG1, L:RB | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. | call extern lj_dispatch_ins@8 // (lua_State *L, BCIns *pc) |3: | mov BASE, L:RB->base |4: | movzx RA, PC_RA |5: | movzx OP, PC_OP | movzx RD, PC_RD |.if X64 | jmp aword [DISPATCH+OP*8+GG_DISP2STATIC] // Re-dispatch to static ins. |.else | jmp aword [DISPATCH+OP*4+GG_DISP2STATIC] // Re-dispatch to static ins. |.endif | |->cont_hook: // Continue from hook yield. | add PC, 4 | mov RA, [RB-24] | mov MULTRES, RA // Restore MULTRES for *M ins. | jmp <4 | |->vm_hotloop: // Hot loop counter underflow. |.if JIT | mov LFUNC:RB, [BASE-8] // Same as curr_topL(L). | mov RB, LFUNC:RB->pc | movzx RD, byte [RB+PC2PROTO(framesize)] | lea RD, [BASE+RD*8] | mov L:RB, SAVE_L | mov L:RB->base, BASE | mov L:RB->top, RD | mov FCARG2, PC | lea FCARG1, [DISPATCH+GG_DISP2J] | mov aword [DISPATCH+DISPATCH_J(L)], L:RBa | mov SAVE_PC, PC | call extern lj_trace_hot@8 // (jit_State *J, const BCIns *pc) | jmp <3 |.endif | |->vm_callhook: // Dispatch target for call hooks. | mov SAVE_PC, PC |.if JIT | jmp >1 |.endif | |->vm_hotcall: // Hot call counter underflow. |.if JIT | mov SAVE_PC, PC | or PC, 1 // Marker for hot call. |1: |.endif | lea RD, [BASE+NARGS:RD*8-8] | mov L:RB, SAVE_L | mov L:RB->base, BASE | mov L:RB->top, RD | mov FCARG2, PC | mov FCARG1, L:RB | call extern lj_dispatch_call@8 // (lua_State *L, const BCIns *pc) | // ASMFunction returned in eax/rax (RDa). | mov SAVE_PC, 0 // Invalidate for subsequent line hook. |.if JIT | and PC, -2 |.endif | mov BASE, L:RB->base | mov RAa, RDa | mov RD, L:RB->top | sub RD, BASE | mov RBa, RAa | movzx RA, PC_RA | shr RD, 3 | add NARGS:RD, 1 | jmp RBa | |//----------------------------------------------------------------------- |//-- Trace exit handler ------------------------------------------------- |//----------------------------------------------------------------------- | |// Called from an exit stub with the exit number on the stack. |// The 16 bit exit number is stored with two (sign-extended) push imm8. |->vm_exit_handler: |.if JIT |.if X64 | push r13; push r12 | push r11; push r10; push r9; push r8 | push rdi; push rsi; push rbp; lea rbp, [rsp+88]; push rbp | push rbx; push rdx; push rcx; push rax | movzx RC, byte [rbp-8] // Reconstruct exit number. | mov RCH, byte [rbp-16] | mov [rbp-8], r15; mov [rbp-16], r14 |.else | push ebp; lea ebp, [esp+12]; push ebp | push ebx; push edx; push ecx; push eax | movzx RC, byte [ebp-4] // Reconstruct exit number. | mov RCH, byte [ebp-8] | mov [ebp-4], edi; mov [ebp-8], esi |.endif | // Caveat: DISPATCH is ebx. | mov DISPATCH, [ebp] | mov RA, [DISPATCH+DISPATCH_GL(vmstate)] // Get trace number. | set_vmstate EXIT | mov [DISPATCH+DISPATCH_J(exitno)], RC | mov [DISPATCH+DISPATCH_J(parent)], RA |.if X64 |.if X64WIN | sub rsp, 16*8+4*8 // Room for SSE regs + save area. |.else | sub rsp, 16*8 // Room for SSE regs. |.endif | add rbp, -128 | movsd qword [rbp-8], xmm15; movsd qword [rbp-16], xmm14 | movsd qword [rbp-24], xmm13; movsd qword [rbp-32], xmm12 | movsd qword [rbp-40], xmm11; movsd qword [rbp-48], xmm10 | movsd qword [rbp-56], xmm9; movsd qword [rbp-64], xmm8 | movsd qword [rbp-72], xmm7; movsd qword [rbp-80], xmm6 | movsd qword [rbp-88], xmm5; movsd qword [rbp-96], xmm4 | movsd qword [rbp-104], xmm3; movsd qword [rbp-112], xmm2 | movsd qword [rbp-120], xmm1; movsd qword [rbp-128], xmm0 |.else | sub esp, 8*8+16 // Room for SSE regs + args. | movsd qword [ebp-40], xmm7; movsd qword [ebp-48], xmm6 | movsd qword [ebp-56], xmm5; movsd qword [ebp-64], xmm4 | movsd qword [ebp-72], xmm3; movsd qword [ebp-80], xmm2 | movsd qword [ebp-88], xmm1; movsd qword [ebp-96], xmm0 |.endif | // Caveat: RB is ebp. | mov L:RB, [DISPATCH+DISPATCH_GL(jit_L)] | mov BASE, [DISPATCH+DISPATCH_GL(jit_base)] | mov aword [DISPATCH+DISPATCH_J(L)], L:RBa | mov dword [DISPATCH+DISPATCH_GL(jit_L)], 0 | mov L:RB->base, BASE |.if X64WIN | lea CARG2, [rsp+4*8] |.elif X64 | mov CARG2, rsp |.else | lea FCARG2, [esp+16] |.endif | lea FCARG1, [DISPATCH+GG_DISP2J] | call extern lj_trace_exit@8 // (jit_State *J, ExitState *ex) | // MULTRES or negated error code returned in eax (RD). | mov RAa, L:RB->cframe | and RAa, CFRAME_RAWMASK |.if X64WIN | // Reposition stack later. |.elif X64 | mov rsp, RAa // Reposition stack to C frame. |.else | mov esp, RAa // Reposition stack to C frame. |.endif | mov [RAa+CFRAME_OFS_L], L:RB // Set SAVE_L (on-trace resume/yield). | mov BASE, L:RB->base | mov PC, [RAa+CFRAME_OFS_PC] // Get SAVE_PC. |.if X64 | jmp >1 |.endif |.endif |->vm_exit_interp: | // RD = MULTRES or negated error code, BASE, PC and DISPATCH set. |.if JIT |.if X64 | // Restore additional callee-save registers only used in compiled code. |.if X64WIN | lea RAa, [rsp+9*16+4*8] |1: | movdqa xmm15, [RAa-9*16] | movdqa xmm14, [RAa-8*16] | movdqa xmm13, [RAa-7*16] | movdqa xmm12, [RAa-6*16] | movdqa xmm11, [RAa-5*16] | movdqa xmm10, [RAa-4*16] | movdqa xmm9, [RAa-3*16] | movdqa xmm8, [RAa-2*16] | movdqa xmm7, [RAa-1*16] | mov rsp, RAa // Reposition stack to C frame. | movdqa xmm6, [RAa] | mov r15, CSAVE_3 | mov r14, CSAVE_4 |.else | add rsp, 16 // Reposition stack to C frame. |1: |.endif | mov r13, TMPa | mov r12, TMPQ |.endif | test RD, RD; js >3 // Check for error from exit. | mov MULTRES, RD | mov LFUNC:KBASE, [BASE-8] | mov KBASE, LFUNC:KBASE->pc | mov KBASE, [KBASE+PC2PROTO(k)] | mov dword [DISPATCH+DISPATCH_GL(jit_L)], 0 | set_vmstate INTERP | // Modified copy of ins_next which handles function header dispatch, too. | mov RC, [PC] | movzx RA, RCH | movzx OP, RCL | add PC, 4 | shr RC, 16 | cmp OP, BC_FUNCF // Function header? | jb >2 | mov RC, MULTRES // RC/RD holds nres+1. |2: |.if X64 | jmp aword [DISPATCH+OP*8] |.else | jmp aword [DISPATCH+OP*4] |.endif | |3: // Rethrow error from the right C frame. | neg RD | mov FCARG1, L:RB | mov FCARG2, RD | call extern lj_err_throw@8 // (lua_State *L, int errcode) |.endif | |//----------------------------------------------------------------------- |//-- Math helper functions ---------------------------------------------- |//----------------------------------------------------------------------- | |// FP value rounding. Called by math.floor/math.ceil fast functions |// and from JIT code. | |// x87 variant: Arg/ret on x87 stack. No int/xmm registers modified. |.macro vm_round_x87, mode1, mode2 | fnstcw word [esp+4] // Caveat: overwrites ARG1 and ARG2. | mov [esp+8], eax | mov ax, mode1 | or ax, [esp+4] |.if mode2 ~= 0xffff | and ax, mode2 |.endif | mov [esp+6], ax | fldcw word [esp+6] | frndint | fldcw word [esp+4] | mov eax, [esp+8] | ret |.endmacro | |// SSE variant: arg/ret is xmm0. xmm0-xmm3 and RD (eax) modified. |.macro vm_round_sse, mode | sseconst_abs xmm2, RDa | sseconst_2p52 xmm3, RDa | movaps xmm1, xmm0 | andpd xmm1, xmm2 // |x| | ucomisd xmm3, xmm1 // No truncation if 2^52 <= |x|. | jbe >1 | andnpd xmm2, xmm0 // Isolate sign bit. |.if mode == 2 // trunc(x)? | movaps xmm0, xmm1 | addsd xmm1, xmm3 // (|x| + 2^52) - 2^52 | subsd xmm1, xmm3 | sseconst_1 xmm3, RDa | cmpsd xmm0, xmm1, 1 // |x| < result? | andpd xmm0, xmm3 | subsd xmm1, xmm0 // If yes, subtract -1. | orpd xmm1, xmm2 // Merge sign bit back in. |.else | addsd xmm1, xmm3 // (|x| + 2^52) - 2^52 | subsd xmm1, xmm3 | orpd xmm1, xmm2 // Merge sign bit back in. | .if mode == 1 // ceil(x)? | sseconst_m1 xmm2, RDa // Must subtract -1 to preserve -0. | cmpsd xmm0, xmm1, 6 // x > result? | .else // floor(x)? | sseconst_1 xmm2, RDa | cmpsd xmm0, xmm1, 1 // x < result? | .endif | andpd xmm0, xmm2 | subsd xmm1, xmm0 // If yes, subtract +-1. |.endif | movaps xmm0, xmm1 |1: | ret |.endmacro | |.macro vm_round, name, ssemode, mode1, mode2 |->name: |.if not SSE | vm_round_x87 mode1, mode2 |.endif |->name .. _sse: | vm_round_sse ssemode |.endmacro | | vm_round vm_floor, 0, 0x0400, 0xf7ff | vm_round vm_ceil, 1, 0x0800, 0xfbff | vm_round vm_trunc, 2, 0x0c00, 0xffff | |// FP modulo x%y. Called by BC_MOD* and vm_arith. |->vm_mod: |.if SSE |// Args in xmm0/xmm1, return value in xmm0. |// Caveat: xmm0-xmm5 and RC (eax) modified! | movaps xmm5, xmm0 | divsd xmm0, xmm1 | sseconst_abs xmm2, RDa | sseconst_2p52 xmm3, RDa | movaps xmm4, xmm0 | andpd xmm4, xmm2 // |x/y| | ucomisd xmm3, xmm4 // No truncation if 2^52 <= |x/y|. | jbe >1 | andnpd xmm2, xmm0 // Isolate sign bit. | addsd xmm4, xmm3 // (|x/y| + 2^52) - 2^52 | subsd xmm4, xmm3 | orpd xmm4, xmm2 // Merge sign bit back in. | sseconst_1 xmm2, RDa | cmpsd xmm0, xmm4, 1 // x/y < result? | andpd xmm0, xmm2 | subsd xmm4, xmm0 // If yes, subtract 1.0. | movaps xmm0, xmm5 | mulsd xmm1, xmm4 | subsd xmm0, xmm1 | ret |1: | mulsd xmm1, xmm0 | movaps xmm0, xmm5 | subsd xmm0, xmm1 | ret |.else |// Args/ret on x87 stack (y on top). No xmm registers modified. |// Caveat: needs 3 slots on x87 stack! RC (eax) modified! | fld st1 | fdiv st1 | fnstcw word [esp+4] | mov ax, 0x0400 | or ax, [esp+4] | and ax, 0xf7ff | mov [esp+6], ax | fldcw word [esp+6] | frndint | fldcw word [esp+4] | fmulp st1 | fsubp st1 | ret |.endif | |// FP log2(x). Called by math.log(x, base). |->vm_log2: |.if X64WIN | movsd qword [rsp+8], xmm0 // Use scratch area. | fld1 | fld qword [rsp+8] | fyl2x | fstp qword [rsp+8] | movsd xmm0, qword [rsp+8] |.elif X64 | movsd qword [rsp-8], xmm0 // Use red zone. | fld1 | fld qword [rsp-8] | fyl2x | fstp qword [rsp-8] | movsd xmm0, qword [rsp-8] |.else | fld1 | fld qword [esp+4] | fyl2x |.endif | ret | |// FP exponentiation e^x and 2^x. Called by math.exp fast function and |// from JIT code. Arg/ret on x87 stack. No int/xmm regs modified. |// Caveat: needs 3 slots on x87 stack! |->vm_exp_x87: | fldl2e; fmulp st1 // e^x ==> 2^(x*log2(e)) |->vm_exp2_x87: | .if X64WIN | .define expscratch, dword [rsp+8] // Use scratch area. | .elif X64 | .define expscratch, dword [rsp-8] // Use red zone. | .else | .define expscratch, dword [esp+4] // Needs 4 byte scratch area. | .endif | fst expscratch // Caveat: overwrites ARG1. | cmp expscratch, 0x7f800000; je >1 // Special case: e^+Inf = +Inf | cmp expscratch, 0xff800000; je >2 // Special case: e^-Inf = 0 |->vm_exp2raw: // Entry point for vm_pow. Without +-Inf check. | fdup; frndint; fsub st1, st0; fxch // Split into frac/int part. | f2xm1; fld1; faddp st1; fscale; fpop1 // ==> (2^frac-1 +1) << int |1: | ret |2: | fpop; fldz; ret | |// Generic power function x^y. Called by BC_POW, math.pow fast function, |// and vm_arith. |// Args/ret on x87 stack (y on top). RC (eax) modified. |// Caveat: needs 3 slots on x87 stack! |->vm_pow: |.if not SSE | fist dword [esp+4] // Store/reload int before comparison. | fild dword [esp+4] // Integral exponent used in vm_powi. | fucomip st1 | jnz >8 // Branch for FP exponents. | jp >9 // Branch for NaN exponent. | fpop // Pop y and fallthrough to vm_powi. | |// FP/int power function x^i. Arg1/ret on x87 stack. |// Arg2 (int) on C stack. RC (eax) modified. |// Caveat: needs 2 slots on x87 stack! | mov eax, [esp+4] | cmp eax, 1; jle >6 // i<=1? | // Now 1 < (unsigned)i <= 0x80000000. |1: // Handle leading zeros. | test eax, 1; jnz >2 | fmul st0 | shr eax, 1 | jmp <1 |2: | shr eax, 1; jz >5 | fdup |3: // Handle trailing bits. | fmul st0 | shr eax, 1; jz >4 | jnc <3 | fmul st1, st0 | jmp <3 |4: | fmulp st1 |5: | ret |6: | je <5 // x^1 ==> x | jb >7 | fld1; fdivrp st1 | neg eax | cmp eax, 1; je <5 // x^-1 ==> 1/x | jmp <1 // x^-i ==> (1/x)^i |7: | fpop; fld1 // x^0 ==> 1 | ret | |8: // FP/FP power function x^y. | fst dword [esp+4] | fxch | fst dword [esp+8] | mov eax, [esp+4]; shl eax, 1 | cmp eax, 0xff000000; je >2 // x^+-Inf? | mov eax, [esp+8]; shl eax, 1; je >4 // +-0^y? | cmp eax, 0xff000000; je >4 // +-Inf^y? | fyl2x | jmp ->vm_exp2raw | |9: // Handle x^NaN. | fld1 | fucomip st2 | je >1 // 1^NaN ==> 1 | fxch // x^NaN ==> NaN |1: | fpop | ret | |2: // Handle x^+-Inf. | fabs | fld1 | fucomip st1 | je >3 // +-1^+-Inf ==> 1 | fpop; fabs; fldz; mov eax, 0; setc al | ror eax, 1; xor eax, [esp+4]; jns >3 // |x|<>1, x^+-Inf ==> +Inf/0 | fxch |3: | fpop1; fabs | ret | |4: // Handle +-0^y or +-Inf^y. | cmp dword [esp+4], 0; jge <3 // y >= 0, x^y ==> |x| | fpop; fpop | test eax, eax; jz >5 // y < 0, +-0^y ==> +Inf | fldz // y < 0, +-Inf^y ==> 0 | ret |5: | mov dword [esp+4], 0x7f800000 // Return +Inf. | fld dword [esp+4] | ret |.endif | |// Args in xmm0/xmm1. Ret in xmm0. xmm0-xmm2 and RC (eax) modified. |// Needs 16 byte scratch area for x86. Also called from JIT code. |->vm_pow_sse: | cvtsd2si eax, xmm1 | cvtsi2sd xmm2, eax | ucomisd xmm1, xmm2 | jnz >8 // Branch for FP exponents. | jp >9 // Branch for NaN exponent. | // Fallthrough to vm_powi_sse. | |// Args in xmm0/eax. Ret in xmm0. xmm0-xmm1 and eax modified. |->vm_powi_sse: | cmp eax, 1; jle >6 // i<=1? | // Now 1 < (unsigned)i <= 0x80000000. |1: // Handle leading zeros. | test eax, 1; jnz >2 | mulsd xmm0, xmm0 | shr eax, 1 | jmp <1 |2: | shr eax, 1; jz >5 | movaps xmm1, xmm0 |3: // Handle trailing bits. | mulsd xmm0, xmm0 | shr eax, 1; jz >4 | jnc <3 | mulsd xmm1, xmm0 | jmp <3 |4: | mulsd xmm0, xmm1 |5: | ret |6: | je <5 // x^1 ==> x | jb >7 // x^0 ==> 1 | neg eax | call <1 | sseconst_1 xmm1, RDa | divsd xmm1, xmm0 | movaps xmm0, xmm1 | ret |7: | sseconst_1 xmm0, RDa | ret | |8: // FP/FP power function x^y. |.if X64 | movd rax, xmm1; shl rax, 1 | rol rax, 12; cmp rax, 0xffe; je >2 // x^+-Inf? | movd rax, xmm0; shl rax, 1; je >4 // +-0^y? | rol rax, 12; cmp rax, 0xffe; je >5 // +-Inf^y? | .if X64WIN | movsd qword [rsp+16], xmm1 // Use scratch area. | movsd qword [rsp+8], xmm0 | fld qword [rsp+16] | fld qword [rsp+8] | .else | movsd qword [rsp-16], xmm1 // Use red zone. | movsd qword [rsp-8], xmm0 | fld qword [rsp-16] | fld qword [rsp-8] | .endif |.else | movsd qword [esp+12], xmm1 // Needs 16 byte scratch area. | movsd qword [esp+4], xmm0 | cmp dword [esp+12], 0; jne >1 | mov eax, [esp+16]; shl eax, 1 | cmp eax, 0xffe00000; je >2 // x^+-Inf? |1: | cmp dword [esp+4], 0; jne >1 | mov eax, [esp+8]; shl eax, 1; je >4 // +-0^y? | cmp eax, 0xffe00000; je >5 // +-Inf^y? |1: | fld qword [esp+12] | fld qword [esp+4] |.endif | fyl2x // y*log2(x) | fdup; frndint; fsub st1, st0; fxch // Split into frac/int part. | f2xm1; fld1; faddp st1; fscale; fpop1 // ==> (2^frac-1 +1) << int |.if X64WIN | fstp qword [rsp+8] // Use scratch area. | movsd xmm0, qword [rsp+8] |.elif X64 | fstp qword [rsp-8] // Use red zone. | movsd xmm0, qword [rsp-8] |.else | fstp qword [esp+4] // Needs 8 byte scratch area. | movsd xmm0, qword [esp+4] |.endif | ret | |9: // Handle x^NaN. | sseconst_1 xmm2, RDa | ucomisd xmm0, xmm2; je >1 // 1^NaN ==> 1 | movaps xmm0, xmm1 // x^NaN ==> NaN |1: | ret | |2: // Handle x^+-Inf. | sseconst_abs xmm2, RDa | andpd xmm0, xmm2 // |x| | sseconst_1 xmm2, RDa | ucomisd xmm0, xmm2; je <1 // +-1^+-Inf ==> 1 | movmskpd eax, xmm1 | xorps xmm0, xmm0 | mov ah, al; setc al; xor al, ah; jne <1 // |x|<>1, x^+-Inf ==> +Inf/0 |3: | sseconst_hi xmm0, RDa, 7ff00000 // +Inf | ret | |4: // Handle +-0^y. | movmskpd eax, xmm1; test eax, eax; jnz <3 // y < 0, +-0^y ==> +Inf | xorps xmm0, xmm0 // y >= 0, +-0^y ==> 0 | ret | |5: // Handle +-Inf^y. | movmskpd eax, xmm1; test eax, eax; jz <3 // y >= 0, +-Inf^y ==> +Inf | xorps xmm0, xmm0 // y < 0, +-Inf^y ==> 0 | ret | |// Callable from C: double lj_vm_foldfpm(double x, int fpm) |// Computes fpm(x) for extended math functions. ORDER FPM. |->vm_foldfpm: |.if JIT |.if X64 | .if X64WIN | .define fpmop, CARG2d | .else | .define fpmop, CARG1d | .endif | cmp fpmop, 1; jb ->vm_floor; je ->vm_ceil | cmp fpmop, 3; jb ->vm_trunc; ja >2 | sqrtsd xmm0, xmm0; ret |2: | .if X64WIN | movsd qword [rsp+8], xmm0 // Use scratch area. | fld qword [rsp+8] | .else | movsd qword [rsp-8], xmm0 // Use red zone. | fld qword [rsp-8] | .endif | cmp fpmop, 5; ja >2 | .if X64WIN; pop rax; .endif | je >1 | call ->vm_exp_x87 | .if X64WIN; push rax; .endif | jmp >7 |1: | call ->vm_exp2_x87 | .if X64WIN; push rax; .endif | jmp >7 |2: ; cmp fpmop, 7; je >1; ja >2 | fldln2; fxch; fyl2x; jmp >7 |1: ; fld1; fxch; fyl2x; jmp >7 |2: ; cmp fpmop, 9; je >1; ja >2 | fldlg2; fxch; fyl2x; jmp >7 |1: ; fsin; jmp >7 |2: ; cmp fpmop, 11; je >1; ja >9 | fcos; jmp >7 |1: ; fptan; fpop |7: | .if X64WIN | fstp qword [rsp+8] // Use scratch area. | movsd xmm0, qword [rsp+8] | .else | fstp qword [rsp-8] // Use red zone. | movsd xmm0, qword [rsp-8] | .endif | ret |.else // x86 calling convention. | .define fpmop, eax |.if SSE | mov fpmop, [esp+12] | movsd xmm0, qword [esp+4] | cmp fpmop, 1; je >1; ja >2 | call ->vm_floor; jmp >7 |1: ; call ->vm_ceil; jmp >7 |2: ; cmp fpmop, 3; je >1; ja >2 | call ->vm_trunc; jmp >7 |1: | sqrtsd xmm0, xmm0 |7: | movsd qword [esp+4], xmm0 // Overwrite callee-owned args. | fld qword [esp+4] | ret |2: ; fld qword [esp+4] | cmp fpmop, 5; jb ->vm_exp_x87; je ->vm_exp2_x87 |2: ; cmp fpmop, 7; je >1; ja >2 | fldln2; fxch; fyl2x; ret |1: ; fld1; fxch; fyl2x; ret |2: ; cmp fpmop, 9; je >1; ja >2 | fldlg2; fxch; fyl2x; ret |1: ; fsin; ret |2: ; cmp fpmop, 11; je >1; ja >9 | fcos; ret |1: ; fptan; fpop; ret |.else | mov fpmop, [esp+12] | fld qword [esp+4] | cmp fpmop, 1; jb ->vm_floor; je ->vm_ceil | cmp fpmop, 3; jb ->vm_trunc; ja >2 | fsqrt; ret |2: ; cmp fpmop, 5; jb ->vm_exp_x87; je ->vm_exp2_x87 | cmp fpmop, 7; je >1; ja >2 | fldln2; fxch; fyl2x; ret |1: ; fld1; fxch; fyl2x; ret |2: ; cmp fpmop, 9; je >1; ja >2 | fldlg2; fxch; fyl2x; ret |1: ; fsin; ret |2: ; cmp fpmop, 11; je >1; ja >9 | fcos; ret |1: ; fptan; fpop; ret |.endif |.endif |9: ; int3 // Bad fpm. |.endif | |// Callable from C: double lj_vm_foldarith(double x, double y, int op) |// Compute x op y for basic arithmetic operators (+ - * / % ^ and unary -) |// and basic math functions. ORDER ARITH |->vm_foldarith: |.if X64 | | .if X64WIN | .define foldop, CARG3d | .else | .define foldop, CARG1d | .endif | cmp foldop, 1; je >1; ja >2 | addsd xmm0, xmm1; ret |1: ; subsd xmm0, xmm1; ret |2: ; cmp foldop, 3; je >1; ja >2 | mulsd xmm0, xmm1; ret |1: ; divsd xmm0, xmm1; ret |2: ; cmp foldop, 5; jb ->vm_mod; je ->vm_pow | cmp foldop, 7; je >1; ja >2 | sseconst_sign xmm1, RDa; xorps xmm0, xmm1; ret |1: ; sseconst_abs xmm1, RDa; andps xmm0, xmm1; ret |2: ; cmp foldop, 9; ja >2 |.if X64WIN | movsd qword [rsp+8], xmm0 // Use scratch area. | movsd qword [rsp+16], xmm1 | fld qword [rsp+8] | fld qword [rsp+16] |.else | movsd qword [rsp-8], xmm0 // Use red zone. | movsd qword [rsp-16], xmm1 | fld qword [rsp-8] | fld qword [rsp-16] |.endif | je >1 | fpatan |7: |.if X64WIN | fstp qword [rsp+8] // Use scratch area. | movsd xmm0, qword [rsp+8] |.else | fstp qword [rsp-8] // Use red zone. | movsd xmm0, qword [rsp-8] |.endif | ret |1: ; fxch; fscale; fpop1; jmp <7 |2: ; cmp foldop, 11; je >1; ja >9 | minsd xmm0, xmm1; ret |1: ; maxsd xmm0, xmm1; ret |9: ; int3 // Bad op. | |.elif SSE // x86 calling convention with SSE ops. | | .define foldop, eax | mov foldop, [esp+20] | movsd xmm0, qword [esp+4] | movsd xmm1, qword [esp+12] | cmp foldop, 1; je >1; ja >2 | addsd xmm0, xmm1 |7: | movsd qword [esp+4], xmm0 // Overwrite callee-owned args. | fld qword [esp+4] | ret |1: ; subsd xmm0, xmm1; jmp <7 |2: ; cmp foldop, 3; je >1; ja >2 | mulsd xmm0, xmm1; jmp <7 |1: ; divsd xmm0, xmm1; jmp <7 |2: ; cmp foldop, 5 | je >1; ja >2 | call ->vm_mod; jmp <7 |1: ; pop edx; call ->vm_pow; push edx; jmp <7 // Writes to scratch area. |2: ; cmp foldop, 7; je >1; ja >2 | sseconst_sign xmm1, RDa; xorps xmm0, xmm1; jmp <7 |1: ; sseconst_abs xmm1, RDa; andps xmm0, xmm1; jmp <7 |2: ; cmp foldop, 9; ja >2 | fld qword [esp+4] // Reload from stack | fld qword [esp+12] | je >1 | fpatan; ret |1: ; fxch; fscale; fpop1; ret |2: ; cmp foldop, 11; je >1; ja >9 | minsd xmm0, xmm1; jmp <7 |1: ; maxsd xmm0, xmm1; jmp <7 |9: ; int3 // Bad op. | |.else // x86 calling convention with x87 ops. | | mov eax, [esp+20] | fld qword [esp+4] | fld qword [esp+12] | cmp eax, 1; je >1; ja >2 | faddp st1; ret |1: ; fsubp st1; ret |2: ; cmp eax, 3; je >1; ja >2 | fmulp st1; ret |1: ; fdivp st1; ret |2: ; cmp eax, 5; jb ->vm_mod; je ->vm_pow | cmp eax, 7; je >1; ja >2 | fpop; fchs; ret |1: ; fpop; fabs; ret |2: ; cmp eax, 9; je >1; ja >2 | fpatan; ret |1: ; fxch; fscale; fpop1; ret |2: ; cmp eax, 11; je >1; ja >9 | fucomi st1; fcmovnbe st1; fpop1; ret |1: ; fucomi st1; fcmovbe st1; fpop1; ret |9: ; int3 // Bad op. | |.endif | |//----------------------------------------------------------------------- |//-- Miscellaneous functions -------------------------------------------- |//----------------------------------------------------------------------- | |// int lj_vm_cpuid(uint32_t f, uint32_t res[4]) |->vm_cpuid: |.if X64 | mov eax, CARG1d | .if X64WIN; push rsi; mov rsi, CARG2; .endif | push rbx | cpuid | mov [rsi], eax | mov [rsi+4], ebx | mov [rsi+8], ecx | mov [rsi+12], edx | pop rbx | .if X64WIN; pop rsi; .endif | ret |.else | pushfd | pop edx | mov ecx, edx | xor edx, 0x00200000 // Toggle ID bit in flags. | push edx | popfd | pushfd | pop edx | xor eax, eax // Zero means no features supported. | cmp ecx, edx | jz >1 // No ID toggle means no CPUID support. | mov eax, [esp+4] // Argument 1 is function number. | push edi | push ebx | cpuid | mov edi, [esp+16] // Argument 2 is result area. | mov [edi], eax | mov [edi+4], ebx | mov [edi+8], ecx | mov [edi+12], edx | pop ebx | pop edi |1: | ret |.endif | |//----------------------------------------------------------------------- |//-- Assertions --------------------------------------------------------- |//----------------------------------------------------------------------- | |->assert_bad_for_arg_type: #ifdef LUA_USE_ASSERT | int3 #endif | int3 | |//----------------------------------------------------------------------- |//-- FFI helper functions ----------------------------------------------- |//----------------------------------------------------------------------- | |// Handler for callback functions. Callback slot number in ah/al. |->vm_ffi_callback: |.if FFI |.type CTSTATE, CTState, PC |.if not X64 | sub esp, 16 // Leave room for SAVE_ERRF etc. |.endif | saveregs_ // ebp/rbp already saved. ebp now holds global_State *. | lea DISPATCH, [ebp+GG_G2DISP] | mov CTSTATE, GL:ebp->ctype_state | movzx eax, ax | mov CTSTATE->cb.slot, eax |.if X64 | mov CTSTATE->cb.gpr[0], CARG1 | mov CTSTATE->cb.gpr[1], CARG2 | mov CTSTATE->cb.gpr[2], CARG3 | mov CTSTATE->cb.gpr[3], CARG4 | movsd qword CTSTATE->cb.fpr[0], xmm0 | movsd qword CTSTATE->cb.fpr[1], xmm1 | movsd qword CTSTATE->cb.fpr[2], xmm2 | movsd qword CTSTATE->cb.fpr[3], xmm3 |.if X64WIN | lea rax, [rsp+CFRAME_SIZE+4*8] |.else | lea rax, [rsp+CFRAME_SIZE] | mov CTSTATE->cb.gpr[4], CARG5 | mov CTSTATE->cb.gpr[5], CARG6 | movsd qword CTSTATE->cb.fpr[4], xmm4 | movsd qword CTSTATE->cb.fpr[5], xmm5 | movsd qword CTSTATE->cb.fpr[6], xmm6 | movsd qword CTSTATE->cb.fpr[7], xmm7 |.endif | mov CTSTATE->cb.stack, rax | mov CARG2, rsp |.else | lea eax, [esp+CFRAME_SIZE+16] | mov CTSTATE->cb.gpr[0], FCARG1 | mov CTSTATE->cb.gpr[1], FCARG2 | mov CTSTATE->cb.stack, eax | mov FCARG1, [esp+CFRAME_SIZE+12] // Move around misplaced retaddr/ebp. | mov FCARG2, [esp+CFRAME_SIZE+8] | mov SAVE_RET, FCARG1 | mov SAVE_R4, FCARG2 | mov FCARG2, esp |.endif | mov SAVE_PC, CTSTATE // Any value outside of bytecode is ok. | mov FCARG1, CTSTATE | call extern lj_ccallback_enter@8 // (CTState *cts, void *cf) | // lua_State * returned in eax (RD). | set_vmstate INTERP | mov BASE, L:RD->base | mov RD, L:RD->top | sub RD, BASE | mov LFUNC:RB, [BASE-8] | shr RD, 3 | add RD, 1 | ins_callt |.endif | |->cont_ffi_callback: // Return from FFI callback. |.if FFI | mov L:RA, SAVE_L | mov CTSTATE, [DISPATCH+DISPATCH_GL(ctype_state)] | mov aword CTSTATE->L, L:RAa | mov L:RA->base, BASE | mov L:RA->top, RB | mov FCARG1, CTSTATE | mov FCARG2, RC | call extern lj_ccallback_leave@8 // (CTState *cts, TValue *o) |.if X64 | mov rax, CTSTATE->cb.gpr[0] | movsd xmm0, qword CTSTATE->cb.fpr[0] | jmp ->vm_leave_unw |.else | mov L:RB, SAVE_L | mov eax, CTSTATE->cb.gpr[0] | mov edx, CTSTATE->cb.gpr[1] | cmp dword CTSTATE->cb.gpr[2], 1 | jb >7 | je >6 | fld qword CTSTATE->cb.fpr[0].d | jmp >7 |6: | fld dword CTSTATE->cb.fpr[0].f |7: | mov ecx, L:RB->top | movzx ecx, word [ecx+6] // Get stack adjustment and copy up. | mov SAVE_L, ecx // Must be one slot above SAVE_RET | restoreregs | pop ecx // Move return addr from SAVE_RET. | add esp, [esp] // Adjust stack. | add esp, 16 | push ecx | ret |.endif |.endif | |->vm_ffi_call@4: // Call C function via FFI. | // Caveat: needs special frame unwinding, see below. |.if FFI |.if X64 | .type CCSTATE, CCallState, rbx | push rbp; mov rbp, rsp; push rbx; mov CCSTATE, CARG1 |.else | .type CCSTATE, CCallState, ebx | push ebp; mov ebp, esp; push ebx; mov CCSTATE, FCARG1 |.endif | | // Readjust stack. |.if X64 | mov eax, CCSTATE->spadj | sub rsp, rax |.else | sub esp, CCSTATE->spadj |.if WIN | mov CCSTATE->spadj, esp |.endif |.endif | | // Copy stack slots. | movzx ecx, byte CCSTATE->nsp | sub ecx, 1 | js >2 |1: |.if X64 | mov rax, [CCSTATE+rcx*8+offsetof(CCallState, stack)] | mov [rsp+rcx*8+CCALL_SPS_EXTRA*8], rax |.else | mov eax, [CCSTATE+ecx*4+offsetof(CCallState, stack)] | mov [esp+ecx*4], eax |.endif | sub ecx, 1 | jns <1 |2: | |.if X64 | movzx eax, byte CCSTATE->nfpr | mov CARG1, CCSTATE->gpr[0] | mov CARG2, CCSTATE->gpr[1] | mov CARG3, CCSTATE->gpr[2] | mov CARG4, CCSTATE->gpr[3] |.if not X64WIN | mov CARG5, CCSTATE->gpr[4] | mov CARG6, CCSTATE->gpr[5] |.endif | test eax, eax; jz >5 | movaps xmm0, CCSTATE->fpr[0] | movaps xmm1, CCSTATE->fpr[1] | movaps xmm2, CCSTATE->fpr[2] | movaps xmm3, CCSTATE->fpr[3] |.if not X64WIN | cmp eax, 4; jbe >5 | movaps xmm4, CCSTATE->fpr[4] | movaps xmm5, CCSTATE->fpr[5] | movaps xmm6, CCSTATE->fpr[6] | movaps xmm7, CCSTATE->fpr[7] |.endif |5: |.else | mov FCARG1, CCSTATE->gpr[0] | mov FCARG2, CCSTATE->gpr[1] |.endif | | call aword CCSTATE->func | |.if X64 | mov CCSTATE->gpr[0], rax | movaps CCSTATE->fpr[0], xmm0 |.if not X64WIN | mov CCSTATE->gpr[1], rdx | movaps CCSTATE->fpr[1], xmm1 |.endif |.else | mov CCSTATE->gpr[0], eax | mov CCSTATE->gpr[1], edx | cmp byte CCSTATE->resx87, 1 | jb >7 | je >6 | fstp qword CCSTATE->fpr[0].d[0] | jmp >7 |6: | fstp dword CCSTATE->fpr[0].f[0] |7: |.if WIN | sub CCSTATE->spadj, esp |.endif |.endif | |.if X64 | mov rbx, [rbp-8]; leave; ret |.else | mov ebx, [ebp-4]; leave; ret |.endif |.endif |// Note: vm_ffi_call must be the last function in this object file! | |//----------------------------------------------------------------------- } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; |// Note: aligning all instructions does not pay off. |=>defop: switch (op) { /* -- Comparison ops ---------------------------------------------------- */ /* Remember: all ops branch for a true comparison, fall through otherwise. */ |.macro jmp_comp, lt, ge, le, gt, target ||switch (op) { ||case BC_ISLT: | lt target ||break; ||case BC_ISGE: | ge target ||break; ||case BC_ISLE: | le target ||break; ||case BC_ISGT: | gt target ||break; ||default: break; /* Shut up GCC. */ ||} |.endmacro case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | // RA = src1, RD = src2, JMP with RD = target | ins_AD |.if DUALNUM | checkint RA, >7 | checkint RD, >8 | mov RB, dword [BASE+RA*8] | add PC, 4 | cmp RB, dword [BASE+RD*8] | jmp_comp jge, jl, jg, jle, >9 |6: | movzx RD, PC_RD | branchPC RD |9: | ins_next | |7: // RA is not an integer. | ja ->vmeta_comp | // RA is a number. | cmp dword [BASE+RD*8+4], LJ_TISNUM; jb >1; jne ->vmeta_comp | // RA is a number, RD is an integer. |.if SSE | cvtsi2sd xmm0, dword [BASE+RD*8] | jmp >2 |.else | fld qword [BASE+RA*8] | fild dword [BASE+RD*8] | jmp >3 |.endif | |8: // RA is an integer, RD is not an integer. | ja ->vmeta_comp | // RA is an integer, RD is a number. |.if SSE | cvtsi2sd xmm1, dword [BASE+RA*8] | movsd xmm0, qword [BASE+RD*8] | add PC, 4 | ucomisd xmm0, xmm1 | jmp_comp jbe, ja, jb, jae, <9 | jmp <6 |.else | fild dword [BASE+RA*8] | jmp >2 |.endif |.else | checknum RA, ->vmeta_comp | checknum RD, ->vmeta_comp |.endif |.if SSE |1: | movsd xmm0, qword [BASE+RD*8] |2: | add PC, 4 | ucomisd xmm0, qword [BASE+RA*8] |3: |.else |1: | fld qword [BASE+RA*8] // Reverse order, i.e like cmp D, A. |2: | fld qword [BASE+RD*8] |3: | add PC, 4 | fcomparepp |.endif | // Unordered: all of ZF CF PF set, ordered: PF clear. | // To preserve NaN semantics GE/GT branch on unordered, but LT/LE don't. |.if DUALNUM | jmp_comp jbe, ja, jb, jae, <9 | jmp <6 |.else | jmp_comp jbe, ja, jb, jae, >1 | movzx RD, PC_RD | branchPC RD |1: | ins_next |.endif break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; | ins_AD // RA = src1, RD = src2, JMP with RD = target | mov RB, [BASE+RD*8+4] | add PC, 4 |.if DUALNUM | cmp RB, LJ_TISNUM; jne >7 | checkint RA, >8 | mov RB, dword [BASE+RD*8] | cmp RB, dword [BASE+RA*8] if (vk) { | jne >9 } else { | je >9 } | movzx RD, PC_RD | branchPC RD |9: | ins_next | |7: // RD is not an integer. | ja >5 | // RD is a number. | cmp dword [BASE+RA*8+4], LJ_TISNUM; jb >1; jne >5 | // RD is a number, RA is an integer. |.if SSE | cvtsi2sd xmm0, dword [BASE+RA*8] |.else | fild dword [BASE+RA*8] |.endif | jmp >2 | |8: // RD is an integer, RA is not an integer. | ja >5 | // RD is an integer, RA is a number. |.if SSE | cvtsi2sd xmm0, dword [BASE+RD*8] | ucomisd xmm0, qword [BASE+RA*8] |.else | fild dword [BASE+RD*8] | fld qword [BASE+RA*8] |.endif | jmp >4 | |.else | cmp RB, LJ_TISNUM; jae >5 | checknum RA, >5 |.endif |.if SSE |1: | movsd xmm0, qword [BASE+RA*8] |2: | ucomisd xmm0, qword [BASE+RD*8] |4: |.else |1: | fld qword [BASE+RA*8] |2: | fld qword [BASE+RD*8] |4: | fcomparepp |.endif iseqne_fp: if (vk) { | jp >2 // Unordered means not equal. | jne >2 } else { | jp >2 // Unordered means not equal. | je >1 } iseqne_end: if (vk) { |1: // EQ: Branch to the target. | movzx RD, PC_RD | branchPC RD |2: // NE: Fallthrough to next instruction. |.if not FFI |3: |.endif } else { |.if not FFI |3: |.endif |2: // NE: Branch to the target. | movzx RD, PC_RD | branchPC RD |1: // EQ: Fallthrough to next instruction. } if (LJ_DUALNUM && (op == BC_ISEQV || op == BC_ISNEV || op == BC_ISEQN || op == BC_ISNEN)) { | jmp <9 } else { | ins_next } | if (op == BC_ISEQV || op == BC_ISNEV) { |5: // Either or both types are not numbers. |.if FFI | cmp RB, LJ_TCDATA; je ->vmeta_equal_cd | checktp RA, LJ_TCDATA; je ->vmeta_equal_cd |.endif | checktp RA, RB // Compare types. | jne <2 // Not the same type? | cmp RB, LJ_TISPRI | jae <1 // Same type and primitive type? | | // Same types and not a primitive type. Compare GCobj or pvalue. | mov RA, [BASE+RA*8] | mov RD, [BASE+RD*8] | cmp RA, RD | je <1 // Same GCobjs or pvalues? | cmp RB, LJ_TISTABUD | ja <2 // Different objects and not table/ud? |.if X64 | cmp RB, LJ_TUDATA // And not 64 bit lightuserdata. | jb <2 |.endif | | // Different tables or userdatas. Need to check __eq metamethod. | // Field metatable must be at same offset for GCtab and GCudata! | mov TAB:RB, TAB:RA->metatable | test TAB:RB, TAB:RB | jz <2 // No metatable? | test byte TAB:RB->nomm, 1<vmeta_equal // Handle __eq metamethod. } else { |.if FFI |3: | cmp RB, LJ_TCDATA if (LJ_DUALNUM && vk) { | jne <9 } else { | jne <2 } | jmp ->vmeta_equal_cd |.endif } break; case BC_ISEQS: case BC_ISNES: vk = op == BC_ISEQS; | ins_AND // RA = src, RD = str const, JMP with RD = target | mov RB, [BASE+RA*8+4] | add PC, 4 | cmp RB, LJ_TSTR; jne >3 | mov RA, [BASE+RA*8] | cmp RA, [KBASE+RD*4] iseqne_test: if (vk) { | jne >2 } else { | je >1 } goto iseqne_end; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; | ins_AD // RA = src, RD = num const, JMP with RD = target | mov RB, [BASE+RA*8+4] | add PC, 4 |.if DUALNUM | cmp RB, LJ_TISNUM; jne >7 | cmp dword [KBASE+RD*8+4], LJ_TISNUM; jne >8 | mov RB, dword [KBASE+RD*8] | cmp RB, dword [BASE+RA*8] if (vk) { | jne >9 } else { | je >9 } | movzx RD, PC_RD | branchPC RD |9: | ins_next | |7: // RA is not an integer. | ja >3 | // RA is a number. | cmp dword [KBASE+RD*8+4], LJ_TISNUM; jb >1 | // RA is a number, RD is an integer. |.if SSE | cvtsi2sd xmm0, dword [KBASE+RD*8] |.else | fild dword [KBASE+RD*8] |.endif | jmp >2 | |8: // RA is an integer, RD is a number. |.if SSE | cvtsi2sd xmm0, dword [BASE+RA*8] | ucomisd xmm0, qword [KBASE+RD*8] |.else | fild dword [BASE+RA*8] | fld qword [KBASE+RD*8] |.endif | jmp >4 |.else | cmp RB, LJ_TISNUM; jae >3 |.endif |.if SSE |1: | movsd xmm0, qword [KBASE+RD*8] |2: | ucomisd xmm0, qword [BASE+RA*8] |4: |.else |1: | fld qword [KBASE+RD*8] |2: | fld qword [BASE+RA*8] |4: | fcomparepp |.endif goto iseqne_fp; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; | ins_AND // RA = src, RD = primitive type (~), JMP with RD = target | mov RB, [BASE+RA*8+4] | add PC, 4 | cmp RB, RD if (!LJ_HASFFI) goto iseqne_test; if (vk) { | jne >3 | movzx RD, PC_RD | branchPC RD |2: | ins_next |3: | cmp RB, LJ_TCDATA; jne <2 | jmp ->vmeta_equal_cd } else { | je >2 | cmp RB, LJ_TCDATA; je ->vmeta_equal_cd | movzx RD, PC_RD | branchPC RD |2: | ins_next } break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | ins_AD // RA = dst or unused, RD = src, JMP with RD = target | mov RB, [BASE+RD*8+4] | add PC, 4 | cmp RB, LJ_TISTRUECOND if (op == BC_IST || op == BC_ISTC) { | jae >1 } else { | jb >1 } if (op == BC_ISTC || op == BC_ISFC) { | mov [BASE+RA*8+4], RB | mov RB, [BASE+RD*8] | mov [BASE+RA*8], RB } | movzx RD, PC_RD | branchPC RD |1: // Fallthrough to the next instruction. | ins_next break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: | ins_AD // RA = dst, RD = src |.if X64 | mov RBa, [BASE+RD*8] | mov [BASE+RA*8], RBa |.else | mov RB, [BASE+RD*8+4] | mov RD, [BASE+RD*8] | mov [BASE+RA*8+4], RB | mov [BASE+RA*8], RD |.endif | ins_next_ break; case BC_NOT: | ins_AD // RA = dst, RD = src | xor RB, RB | checktp RD, LJ_TISTRUECOND | adc RB, LJ_TTRUE | mov [BASE+RA*8+4], RB | ins_next break; case BC_UNM: | ins_AD // RA = dst, RD = src |.if DUALNUM | checkint RD, >5 | mov RB, [BASE+RD*8] | neg RB | jo >4 | mov dword [BASE+RA*8+4], LJ_TISNUM | mov dword [BASE+RA*8], RB |9: | ins_next |4: | mov dword [BASE+RA*8+4], 0x41e00000 // 2^31. | mov dword [BASE+RA*8], 0 | jmp <9 |5: | ja ->vmeta_unm |.else | checknum RD, ->vmeta_unm |.endif |.if SSE | movsd xmm0, qword [BASE+RD*8] | sseconst_sign xmm1, RDa | xorps xmm0, xmm1 | movsd qword [BASE+RA*8], xmm0 |.else | fld qword [BASE+RD*8] | fchs | fstp qword [BASE+RA*8] |.endif |.if DUALNUM | jmp <9 |.else | ins_next |.endif break; case BC_LEN: | ins_AD // RA = dst, RD = src | checkstr RD, >2 | mov STR:RD, [BASE+RD*8] |.if DUALNUM | mov RD, dword STR:RD->len |1: | mov dword [BASE+RA*8+4], LJ_TISNUM | mov dword [BASE+RA*8], RD |.elif SSE | xorps xmm0, xmm0 | cvtsi2sd xmm0, dword STR:RD->len |1: | movsd qword [BASE+RA*8], xmm0 |.else | fild dword STR:RD->len |1: | fstp qword [BASE+RA*8] |.endif | ins_next |2: | checktab RD, ->vmeta_len | mov TAB:FCARG1, [BASE+RD*8] #if LJ_52 | mov TAB:RB, TAB:FCARG1->metatable | cmp TAB:RB, 0 | jnz >9 |3: #endif |->BC_LEN_Z: | mov RB, BASE // Save BASE. | call extern lj_tab_len@4 // (GCtab *t) | // Length of table returned in eax (RD). |.if DUALNUM | // Nothing to do. |.elif SSE | cvtsi2sd xmm0, RD |.else | mov ARG1, RD | fild ARG1 |.endif | mov BASE, RB // Restore BASE. | movzx RA, PC_RA | jmp <1 #if LJ_52 |9: // Check for __len. | test byte TAB:RB->nomm, 1<vmeta_len // 'no __len' flag NOT set: check. #endif break; /* -- Binary ops -------------------------------------------------------- */ |.macro ins_arithpre, x87ins, sseins, ssereg | ins_ABC ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); ||switch (vk) { ||case 0: | checknum RB, ->vmeta_arith_vn | .if DUALNUM | cmp dword [KBASE+RC*8+4], LJ_TISNUM; jae ->vmeta_arith_vn | .endif | .if SSE | movsd xmm0, qword [BASE+RB*8] | sseins ssereg, qword [KBASE+RC*8] | .else | fld qword [BASE+RB*8] | x87ins qword [KBASE+RC*8] | .endif || break; ||case 1: | checknum RB, ->vmeta_arith_nv | .if DUALNUM | cmp dword [KBASE+RC*8+4], LJ_TISNUM; jae ->vmeta_arith_nv | .endif | .if SSE | movsd xmm0, qword [KBASE+RC*8] | sseins ssereg, qword [BASE+RB*8] | .else | fld qword [KBASE+RC*8] | x87ins qword [BASE+RB*8] | .endif || break; ||default: | checknum RB, ->vmeta_arith_vv | checknum RC, ->vmeta_arith_vv | .if SSE | movsd xmm0, qword [BASE+RB*8] | sseins ssereg, qword [BASE+RC*8] | .else | fld qword [BASE+RB*8] | x87ins qword [BASE+RC*8] | .endif || break; ||} |.endmacro | |.macro ins_arithdn, intins | ins_ABC ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); ||switch (vk) { ||case 0: | checkint RB, ->vmeta_arith_vn | cmp dword [KBASE+RC*8+4], LJ_TISNUM; jne ->vmeta_arith_vn | mov RB, [BASE+RB*8] | intins RB, [KBASE+RC*8]; jo ->vmeta_arith_vno || break; ||case 1: | checkint RB, ->vmeta_arith_nv | cmp dword [KBASE+RC*8+4], LJ_TISNUM; jne ->vmeta_arith_nv | mov RC, [KBASE+RC*8] | intins RC, [BASE+RB*8]; jo ->vmeta_arith_nvo || break; ||default: | checkint RB, ->vmeta_arith_vv | checkint RC, ->vmeta_arith_vv | mov RB, [BASE+RB*8] | intins RB, [BASE+RC*8]; jo ->vmeta_arith_vvo || break; ||} | mov dword [BASE+RA*8+4], LJ_TISNUM ||if (vk == 1) { | mov dword [BASE+RA*8], RC ||} else { | mov dword [BASE+RA*8], RB ||} | ins_next |.endmacro | |.macro ins_arithpost |.if SSE | movsd qword [BASE+RA*8], xmm0 |.else | fstp qword [BASE+RA*8] |.endif |.endmacro | |.macro ins_arith, x87ins, sseins | ins_arithpre x87ins, sseins, xmm0 | ins_arithpost | ins_next |.endmacro | |.macro ins_arith, intins, x87ins, sseins |.if DUALNUM | ins_arithdn intins |.else | ins_arith, x87ins, sseins |.endif |.endmacro | // RA = dst, RB = src1 or num const, RC = src2 or num const case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | ins_arith add, fadd, addsd break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | ins_arith sub, fsub, subsd break; case BC_MULVN: case BC_MULNV: case BC_MULVV: | ins_arith imul, fmul, mulsd break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | ins_arith fdiv, divsd break; case BC_MODVN: | ins_arithpre fld, movsd, xmm1 |->BC_MODVN_Z: | call ->vm_mod | ins_arithpost | ins_next break; case BC_MODNV: case BC_MODVV: | ins_arithpre fld, movsd, xmm1 | jmp ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. break; case BC_POW: | ins_arithpre fld, movsd, xmm1 | call ->vm_pow | ins_arithpost | ins_next break; case BC_CAT: | ins_ABC // RA = dst, RB = src_start, RC = src_end |.if X64 | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE | lea CARG2d, [BASE+RC*8] | mov CARG3d, RC | sub CARG3d, RB |->BC_CAT_Z: | mov L:RB, L:CARG1d |.else | lea RA, [BASE+RC*8] | sub RC, RB | mov ARG2, RA | mov ARG3, RC |->BC_CAT_Z: | mov L:RB, SAVE_L | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | call extern lj_meta_cat // (lua_State *L, TValue *top, int left) | // NULL (finished) or TValue * (metamethod) returned in eax (RC). | mov BASE, L:RB->base | test RC, RC | jnz ->vmeta_binop | movzx RB, PC_RB // Copy result to Stk[RA] from Stk[RB]. | movzx RA, PC_RA |.if X64 | mov RCa, [BASE+RB*8] | mov [BASE+RA*8], RCa |.else | mov RC, [BASE+RB*8+4] | mov RB, [BASE+RB*8] | mov [BASE+RA*8+4], RC | mov [BASE+RA*8], RB |.endif | ins_next break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: | ins_AND // RA = dst, RD = str const (~) | mov RD, [KBASE+RD*4] | mov dword [BASE+RA*8+4], LJ_TSTR | mov [BASE+RA*8], RD | ins_next break; case BC_KCDATA: |.if FFI | ins_AND // RA = dst, RD = cdata const (~) | mov RD, [KBASE+RD*4] | mov dword [BASE+RA*8+4], LJ_TCDATA | mov [BASE+RA*8], RD | ins_next |.endif break; case BC_KSHORT: | ins_AD // RA = dst, RD = signed int16 literal |.if DUALNUM | movsx RD, RDW | mov dword [BASE+RA*8+4], LJ_TISNUM | mov dword [BASE+RA*8], RD |.elif SSE | movsx RD, RDW // Sign-extend literal. | cvtsi2sd xmm0, RD | movsd qword [BASE+RA*8], xmm0 |.else | fild PC_RD // Refetch signed RD from instruction. | fstp qword [BASE+RA*8] |.endif | ins_next break; case BC_KNUM: | ins_AD // RA = dst, RD = num const |.if SSE | movsd xmm0, qword [KBASE+RD*8] | movsd qword [BASE+RA*8], xmm0 |.else | fld qword [KBASE+RD*8] | fstp qword [BASE+RA*8] |.endif | ins_next break; case BC_KPRI: | ins_AND // RA = dst, RD = primitive type (~) | mov [BASE+RA*8+4], RD | ins_next break; case BC_KNIL: | ins_AD // RA = dst_start, RD = dst_end | lea RA, [BASE+RA*8+12] | lea RD, [BASE+RD*8+4] | mov RB, LJ_TNIL | mov [RA-8], RB // Sets minimum 2 slots. |1: | mov [RA], RB | add RA, 8 | cmp RA, RD | jbe <1 | ins_next break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: | ins_AD // RA = dst, RD = upvalue # | mov LFUNC:RB, [BASE-8] | mov UPVAL:RB, [LFUNC:RB+RD*4+offsetof(GCfuncL, uvptr)] | mov RB, UPVAL:RB->v |.if X64 | mov RDa, [RB] | mov [BASE+RA*8], RDa |.else | mov RD, [RB+4] | mov RB, [RB] | mov [BASE+RA*8+4], RD | mov [BASE+RA*8], RB |.endif | ins_next break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) | ins_AD // RA = upvalue #, RD = src | mov LFUNC:RB, [BASE-8] | mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] | cmp byte UPVAL:RB->closed, 0 | mov RB, UPVAL:RB->v | mov RA, [BASE+RD*8] | mov RD, [BASE+RD*8+4] | mov [RB], RA | mov [RB+4], RD | jz >1 | // Check barrier for closed upvalue. | test byte [RB+TV2MARKOFS], LJ_GC_BLACK // isblack(uv) | jnz >2 |1: | ins_next | |2: // Upvalue is black. Check if new value is collectable and white. | sub RD, LJ_TISGCV | cmp RD, LJ_TISNUM - LJ_TISGCV // tvisgcv(v) | jbe <1 | test byte GCOBJ:RA->gch.marked, LJ_GC_WHITES // iswhite(v) | jz <1 | // Crossed a write barrier. Move the barrier forward. |.if X64 and not X64WIN | mov FCARG2, RB | mov RB, BASE // Save BASE. |.else | xchg FCARG2, RB // Save BASE (FCARG2 == BASE). |.endif | lea GL:FCARG1, [DISPATCH+GG_DISP2G] | call extern lj_gc_barrieruv@8 // (global_State *g, TValue *tv) | mov BASE, RB // Restore BASE. | jmp <1 break; #undef TV2MARKOFS case BC_USETS: | ins_AND // RA = upvalue #, RD = str const (~) | mov LFUNC:RB, [BASE-8] | mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] | mov GCOBJ:RA, [KBASE+RD*4] | mov RD, UPVAL:RB->v | mov [RD], GCOBJ:RA | mov dword [RD+4], LJ_TSTR | test byte UPVAL:RB->marked, LJ_GC_BLACK // isblack(uv) | jnz >2 |1: | ins_next | |2: // Check if string is white and ensure upvalue is closed. | test byte GCOBJ:RA->gch.marked, LJ_GC_WHITES // iswhite(str) | jz <1 | cmp byte UPVAL:RB->closed, 0 | jz <1 | // Crossed a write barrier. Move the barrier forward. | mov RB, BASE // Save BASE (FCARG2 == BASE). | mov FCARG2, RD | lea GL:FCARG1, [DISPATCH+GG_DISP2G] | call extern lj_gc_barrieruv@8 // (global_State *g, TValue *tv) | mov BASE, RB // Restore BASE. | jmp <1 break; case BC_USETN: | ins_AD // RA = upvalue #, RD = num const | mov LFUNC:RB, [BASE-8] |.if SSE | movsd xmm0, qword [KBASE+RD*8] |.else | fld qword [KBASE+RD*8] |.endif | mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] | mov RA, UPVAL:RB->v |.if SSE | movsd qword [RA], xmm0 |.else | fstp qword [RA] |.endif | ins_next break; case BC_USETP: | ins_AND // RA = upvalue #, RD = primitive type (~) | mov LFUNC:RB, [BASE-8] | mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] | mov RA, UPVAL:RB->v | mov [RA+4], RD | ins_next break; case BC_UCLO: | ins_AD // RA = level, RD = target | branchPC RD // Do this first to free RD. | mov L:RB, SAVE_L | cmp dword L:RB->openupval, 0 | je >1 | mov L:RB->base, BASE | lea FCARG2, [BASE+RA*8] // Caveat: FCARG2 == BASE | mov L:FCARG1, L:RB // Caveat: FCARG1 == RA | call extern lj_func_closeuv@8 // (lua_State *L, TValue *level) | mov BASE, L:RB->base |1: | ins_next break; case BC_FNEW: | ins_AND // RA = dst, RD = proto const (~) (holding function prototype) |.if X64 | mov L:RB, SAVE_L | mov L:RB->base, BASE // Caveat: CARG2d/CARG3d may be BASE. | mov CARG3d, [BASE-8] | mov CARG2d, [KBASE+RD*4] // Fetch GCproto *. | mov CARG1d, L:RB |.else | mov LFUNC:RA, [BASE-8] | mov PROTO:RD, [KBASE+RD*4] // Fetch GCproto *. | mov L:RB, SAVE_L | mov ARG3, LFUNC:RA | mov ARG2, PROTO:RD | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | // (lua_State *L, GCproto *pt, GCfuncL *parent) | call extern lj_func_newL_gc | // GCfuncL * returned in eax (RC). | mov BASE, L:RB->base | movzx RA, PC_RA | mov [BASE+RA*8], LFUNC:RC | mov dword [BASE+RA*8+4], LJ_TFUNC | ins_next break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: | ins_AD // RA = dst, RD = hbits|asize | mov L:RB, SAVE_L | mov L:RB->base, BASE | mov RA, [DISPATCH+DISPATCH_GL(gc.total)] | cmp RA, [DISPATCH+DISPATCH_GL(gc.threshold)] | mov SAVE_PC, PC | jae >5 |1: |.if X64 | mov CARG3d, RD | and RD, 0x7ff | shr CARG3d, 11 |.else | mov RA, RD | and RD, 0x7ff | shr RA, 11 | mov ARG3, RA |.endif | cmp RD, 0x7ff | je >3 |2: |.if X64 | mov L:CARG1d, L:RB | mov CARG2d, RD |.else | mov ARG1, L:RB | mov ARG2, RD |.endif | call extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits) | // Table * returned in eax (RC). | mov BASE, L:RB->base | movzx RA, PC_RA | mov [BASE+RA*8], TAB:RC | mov dword [BASE+RA*8+4], LJ_TTAB | ins_next |3: // Turn 0x7ff into 0x801. | mov RD, 0x801 | jmp <2 |5: | mov L:FCARG1, L:RB | call extern lj_gc_step_fixtop@4 // (lua_State *L) | movzx RD, PC_RD | jmp <1 break; case BC_TDUP: | ins_AND // RA = dst, RD = table const (~) (holding template table) | mov L:RB, SAVE_L | mov RA, [DISPATCH+DISPATCH_GL(gc.total)] | mov SAVE_PC, PC | cmp RA, [DISPATCH+DISPATCH_GL(gc.threshold)] | mov L:RB->base, BASE | jae >3 |2: | mov TAB:FCARG2, [KBASE+RD*4] // Caveat: FCARG2 == BASE | mov L:FCARG1, L:RB // Caveat: FCARG1 == RA | call extern lj_tab_dup@8 // (lua_State *L, Table *kt) | // Table * returned in eax (RC). | mov BASE, L:RB->base | movzx RA, PC_RA | mov [BASE+RA*8], TAB:RC | mov dword [BASE+RA*8+4], LJ_TTAB | ins_next |3: | mov L:FCARG1, L:RB | call extern lj_gc_step_fixtop@4 // (lua_State *L) | movzx RD, PC_RD // Need to reload RD. | not RDa | jmp <2 break; case BC_GGET: | ins_AND // RA = dst, RD = str const (~) | mov LFUNC:RB, [BASE-8] | mov TAB:RB, LFUNC:RB->env | mov STR:RC, [KBASE+RD*4] | jmp ->BC_TGETS_Z break; case BC_GSET: | ins_AND // RA = src, RD = str const (~) | mov LFUNC:RB, [BASE-8] | mov TAB:RB, LFUNC:RB->env | mov STR:RC, [KBASE+RD*4] | jmp ->BC_TSETS_Z break; case BC_TGETV: | ins_ABC // RA = dst, RB = table, RC = key | checktab RB, ->vmeta_tgetv | mov TAB:RB, [BASE+RB*8] | | // Integer key? |.if DUALNUM | checkint RC, >5 | mov RC, dword [BASE+RC*8] |.else | // Convert number to int and back and compare. | checknum RC, >5 |.if SSE | movsd xmm0, qword [BASE+RC*8] | cvtsd2si RC, xmm0 | cvtsi2sd xmm1, RC | ucomisd xmm0, xmm1 |.else | fld qword [BASE+RC*8] | fist ARG1 | fild ARG1 | fcomparepp | mov RC, ARG1 |.endif | jne ->vmeta_tgetv // Generic numeric key? Use fallback. |.endif | cmp RC, TAB:RB->asize // Takes care of unordered, too. | jae ->vmeta_tgetv // Not in array part? Use fallback. | shl RC, 3 | add RC, TAB:RB->array | cmp dword [RC+4], LJ_TNIL // Avoid overwriting RB in fastpath. | je >2 | // Get array slot. |.if X64 | mov RBa, [RC] | mov [BASE+RA*8], RBa |.else | mov RB, [RC] | mov RC, [RC+4] | mov [BASE+RA*8], RB | mov [BASE+RA*8+4], RC |.endif |1: | ins_next | |2: // Check for __index if table value is nil. | cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. | jz >3 | mov TAB:RA, TAB:RB->metatable | test byte TAB:RA->nomm, 1<vmeta_tgetv // 'no __index' flag NOT set: check. | movzx RA, PC_RA // Restore RA. |3: | mov dword [BASE+RA*8+4], LJ_TNIL | jmp <1 | |5: // String key? | checkstr RC, ->vmeta_tgetv | mov STR:RC, [BASE+RC*8] | jmp ->BC_TGETS_Z break; case BC_TGETS: | ins_ABC // RA = dst, RB = table, RC = str const (~) | not RCa | mov STR:RC, [KBASE+RC*4] | checktab RB, ->vmeta_tgets | mov TAB:RB, [BASE+RB*8] |->BC_TGETS_Z: // RB = GCtab *, RC = GCstr *, refetches PC_RA. | mov RA, TAB:RB->hmask | and RA, STR:RC->hash | imul RA, #NODE | add NODE:RA, TAB:RB->node |1: | cmp dword NODE:RA->key.it, LJ_TSTR | jne >4 | cmp dword NODE:RA->key.gcr, STR:RC | jne >4 | // Ok, key found. Assumes: offsetof(Node, val) == 0 | cmp dword [RA+4], LJ_TNIL // Avoid overwriting RB in fastpath. | je >5 // Key found, but nil value? | movzx RC, PC_RA | // Get node value. |.if X64 | mov RBa, [RA] | mov [BASE+RC*8], RBa |.else | mov RB, [RA] | mov RA, [RA+4] | mov [BASE+RC*8], RB | mov [BASE+RC*8+4], RA |.endif |2: | ins_next | |3: | movzx RC, PC_RA | mov dword [BASE+RC*8+4], LJ_TNIL | jmp <2 | |4: // Follow hash chain. | mov NODE:RA, NODE:RA->next | test NODE:RA, NODE:RA | jnz <1 | // End of hash chain: key not found, nil result. | |5: // Check for __index if table value is nil. | mov TAB:RA, TAB:RB->metatable | test TAB:RA, TAB:RA | jz <3 // No metatable: done. | test byte TAB:RA->nomm, 1<vmeta_tgets // Caveat: preserve STR:RC. break; case BC_TGETB: | ins_ABC // RA = dst, RB = table, RC = byte literal | checktab RB, ->vmeta_tgetb | mov TAB:RB, [BASE+RB*8] | cmp RC, TAB:RB->asize | jae ->vmeta_tgetb | shl RC, 3 | add RC, TAB:RB->array | cmp dword [RC+4], LJ_TNIL // Avoid overwriting RB in fastpath. | je >2 | // Get array slot. |.if X64 | mov RBa, [RC] | mov [BASE+RA*8], RBa |.else | mov RB, [RC] | mov RC, [RC+4] | mov [BASE+RA*8], RB | mov [BASE+RA*8+4], RC |.endif |1: | ins_next | |2: // Check for __index if table value is nil. | cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. | jz >3 | mov TAB:RA, TAB:RB->metatable | test byte TAB:RA->nomm, 1<vmeta_tgetb // 'no __index' flag NOT set: check. | movzx RA, PC_RA // Restore RA. |3: | mov dword [BASE+RA*8+4], LJ_TNIL | jmp <1 break; case BC_TSETV: | ins_ABC // RA = src, RB = table, RC = key | checktab RB, ->vmeta_tsetv | mov TAB:RB, [BASE+RB*8] | | // Integer key? |.if DUALNUM | checkint RC, >5 | mov RC, dword [BASE+RC*8] |.else | // Convert number to int and back and compare. | checknum RC, >5 |.if SSE | movsd xmm0, qword [BASE+RC*8] | cvtsd2si RC, xmm0 | cvtsi2sd xmm1, RC | ucomisd xmm0, xmm1 |.else | fld qword [BASE+RC*8] | fist ARG1 | fild ARG1 | fcomparepp | mov RC, ARG1 |.endif | jne ->vmeta_tsetv // Generic numeric key? Use fallback. |.endif | cmp RC, TAB:RB->asize // Takes care of unordered, too. | jae ->vmeta_tsetv | shl RC, 3 | add RC, TAB:RB->array | cmp dword [RC+4], LJ_TNIL | je >3 // Previous value is nil? |1: | test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) | jnz >7 |2: // Set array slot. |.if X64 | mov RBa, [BASE+RA*8] | mov [RC], RBa |.else | mov RB, [BASE+RA*8+4] | mov RA, [BASE+RA*8] | mov [RC+4], RB | mov [RC], RA |.endif | ins_next | |3: // Check for __newindex if previous value is nil. | cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. | jz <1 | mov TAB:RA, TAB:RB->metatable | test byte TAB:RA->nomm, 1<vmeta_tsetv // 'no __newindex' flag NOT set: check. | movzx RA, PC_RA // Restore RA. | jmp <1 | |5: // String key? | checkstr RC, ->vmeta_tsetv | mov STR:RC, [BASE+RC*8] | jmp ->BC_TSETS_Z | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, RA | movzx RA, PC_RA // Restore RA. | jmp <2 break; case BC_TSETS: | ins_ABC // RA = src, RB = table, RC = str const (~) | not RCa | mov STR:RC, [KBASE+RC*4] | checktab RB, ->vmeta_tsets | mov TAB:RB, [BASE+RB*8] |->BC_TSETS_Z: // RB = GCtab *, RC = GCstr *, refetches PC_RA. | mov RA, TAB:RB->hmask | and RA, STR:RC->hash | imul RA, #NODE | mov byte TAB:RB->nomm, 0 // Clear metamethod cache. | add NODE:RA, TAB:RB->node |1: | cmp dword NODE:RA->key.it, LJ_TSTR | jne >5 | cmp dword NODE:RA->key.gcr, STR:RC | jne >5 | // Ok, key found. Assumes: offsetof(Node, val) == 0 | cmp dword [RA+4], LJ_TNIL | je >4 // Previous value is nil? |2: | test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) | jnz >7 |3: // Set node value. | movzx RC, PC_RA |.if X64 | mov RBa, [BASE+RC*8] | mov [RA], RBa |.else | mov RB, [BASE+RC*8+4] | mov RC, [BASE+RC*8] | mov [RA+4], RB | mov [RA], RC |.endif | ins_next | |4: // Check for __newindex if previous value is nil. | cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. | jz <2 | mov TMP1, RA // Save RA. | mov TAB:RA, TAB:RB->metatable | test byte TAB:RA->nomm, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. | mov RA, TMP1 // Restore RA. | jmp <2 | |5: // Follow hash chain. | mov NODE:RA, NODE:RA->next | test NODE:RA, NODE:RA | jnz <1 | // End of hash chain: key not found, add a new one. | | // But check for __newindex first. | mov TAB:RA, TAB:RB->metatable | test TAB:RA, TAB:RA | jz >6 // No metatable: continue. | test byte TAB:RA->nomm, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. |6: | mov TMP1, STR:RC | mov TMP2, LJ_TSTR | mov TMP3, TAB:RB // Save TAB:RB for us. |.if X64 | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE | lea CARG3, TMP1 | mov CARG2d, TAB:RB | mov L:RB, L:CARG1d |.else | lea RC, TMP1 // Store temp. TValue in TMP1/TMP2. | mov ARG2, TAB:RB | mov L:RB, SAVE_L | mov ARG3, RC | mov ARG1, L:RB | mov L:RB->base, BASE |.endif | mov SAVE_PC, PC | call extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k) | // Handles write barrier for the new key. TValue * returned in eax (RC). | mov BASE, L:RB->base | mov TAB:RB, TMP3 // Need TAB:RB for barrier. | mov RA, eax | jmp <2 // Must check write barrier for value. | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, RC // Destroys STR:RC. | jmp <3 break; case BC_TSETB: | ins_ABC // RA = src, RB = table, RC = byte literal | checktab RB, ->vmeta_tsetb | mov TAB:RB, [BASE+RB*8] | cmp RC, TAB:RB->asize | jae ->vmeta_tsetb | shl RC, 3 | add RC, TAB:RB->array | cmp dword [RC+4], LJ_TNIL | je >3 // Previous value is nil? |1: | test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) | jnz >7 |2: // Set array slot. |.if X64 | mov RAa, [BASE+RA*8] | mov [RC], RAa |.else | mov RB, [BASE+RA*8+4] | mov RA, [BASE+RA*8] | mov [RC+4], RB | mov [RC], RA |.endif | ins_next | |3: // Check for __newindex if previous value is nil. | cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. | jz <1 | mov TAB:RA, TAB:RB->metatable | test byte TAB:RA->nomm, 1<vmeta_tsetb // 'no __newindex' flag NOT set: check. | movzx RA, PC_RA // Restore RA. | jmp <1 | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, RA | movzx RA, PC_RA // Restore RA. | jmp <2 break; case BC_TSETM: | ins_AD // RA = base (table at base-1), RD = num const (start index) | mov TMP1, KBASE // Need one more free register. | mov KBASE, dword [KBASE+RD*8] // Integer constant is in lo-word. |1: | lea RA, [BASE+RA*8] | mov TAB:RB, [RA-8] // Guaranteed to be a table. | test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) | jnz >7 |2: | mov RD, MULTRES | sub RD, 1 | jz >4 // Nothing to copy? | add RD, KBASE // Compute needed size. | cmp RD, TAB:RB->asize | ja >5 // Doesn't fit into array part? | sub RD, KBASE | shl KBASE, 3 | add KBASE, TAB:RB->array |3: // Copy result slots to table. |.if X64 | mov RBa, [RA] | add RA, 8 | mov [KBASE], RBa |.else | mov RB, [RA] | mov [KBASE], RB | mov RB, [RA+4] | add RA, 8 | mov [KBASE+4], RB |.endif | add KBASE, 8 | sub RD, 1 | jnz <3 |4: | mov KBASE, TMP1 | ins_next | |5: // Need to resize array part. |.if X64 | mov L:CARG1d, SAVE_L | mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE. | mov CARG2d, TAB:RB | mov CARG3d, RD | mov L:RB, L:CARG1d |.else | mov ARG2, TAB:RB | mov L:RB, SAVE_L | mov L:RB->base, BASE | mov ARG3, RD | mov ARG1, L:RB |.endif | mov SAVE_PC, PC | call extern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize) | mov BASE, L:RB->base | movzx RA, PC_RA // Restore RA. | jmp <1 // Retry. | |7: // Possible table write barrier for any value. Skip valiswhite check. | barrierback TAB:RB, RD | jmp <2 break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: | ins_A_C // RA = base, (RB = nresults+1,) RC = nargs+1 | extra_nargs if (op == BC_CALLM) { | add NARGS:RD, MULTRES } | cmp dword [BASE+RA*8+4], LJ_TFUNC | mov LFUNC:RB, [BASE+RA*8] | jne ->vmeta_call_ra | lea BASE, [BASE+RA*8+8] | ins_call break; case BC_CALLMT: | ins_AD // RA = base, RD = extra_nargs | add NARGS:RD, MULTRES | // Fall through. Assumes BC_CALLT follows and ins_AD is a no-op. break; case BC_CALLT: | ins_AD // RA = base, RD = nargs+1 | lea RA, [BASE+RA*8+8] | mov KBASE, BASE // Use KBASE for move + vmeta_call hint. | mov LFUNC:RB, [RA-8] | cmp dword [RA-4], LJ_TFUNC | jne ->vmeta_call |->BC_CALLT_Z: | mov PC, [BASE-4] | test PC, FRAME_TYPE | jnz >7 |1: | mov [BASE-8], LFUNC:RB // Copy function down, reloaded below. | mov MULTRES, NARGS:RD | sub NARGS:RD, 1 | jz >3 |2: // Move args down. |.if X64 | mov RBa, [RA] | add RA, 8 | mov [KBASE], RBa |.else | mov RB, [RA] | mov [KBASE], RB | mov RB, [RA+4] | add RA, 8 | mov [KBASE+4], RB |.endif | add KBASE, 8 | sub NARGS:RD, 1 | jnz <2 | | mov LFUNC:RB, [BASE-8] |3: | mov NARGS:RD, MULTRES | cmp byte LFUNC:RB->ffid, 1 // (> FF_C) Calling a fast function? | ja >5 |4: | ins_callt | |5: // Tailcall to a fast function. | test PC, FRAME_TYPE // Lua frame below? | jnz <4 | movzx RA, PC_RA | not RAa | lea RA, [BASE+RA*8] | mov LFUNC:KBASE, [RA-8] // Need to prepare KBASE. | mov KBASE, LFUNC:KBASE->pc | mov KBASE, [KBASE+PC2PROTO(k)] | jmp <4 | |7: // Tailcall from a vararg function. | sub PC, FRAME_VARG | test PC, FRAME_TYPEP | jnz >8 // Vararg frame below? | sub BASE, PC // Need to relocate BASE/KBASE down. | mov KBASE, BASE | mov PC, [BASE-4] | jmp <1 |8: | add PC, FRAME_VARG | jmp <1 break; case BC_ITERC: | ins_A // RA = base, (RB = nresults+1,) RC = nargs+1 (2+1) | lea RA, [BASE+RA*8+8] // fb = base+1 |.if X64 | mov RBa, [RA-24] // Copy state. fb[0] = fb[-3]. | mov RCa, [RA-16] // Copy control var. fb[1] = fb[-2]. | mov [RA], RBa | mov [RA+8], RCa |.else | mov RB, [RA-24] // Copy state. fb[0] = fb[-3]. | mov RC, [RA-20] | mov [RA], RB | mov [RA+4], RC | mov RB, [RA-16] // Copy control var. fb[1] = fb[-2]. | mov RC, [RA-12] | mov [RA+8], RB | mov [RA+12], RC |.endif | mov LFUNC:RB, [RA-32] // Copy callable. fb[-1] = fb[-4] | mov RC, [RA-28] | mov [RA-8], LFUNC:RB | mov [RA-4], RC | cmp RC, LJ_TFUNC // Handle like a regular 2-arg call. | mov NARGS:RD, 2+1 | jne ->vmeta_call | mov BASE, RA | ins_call break; case BC_ITERN: | ins_A // RA = base, (RB = nresults+1, RC = nargs+1 (2+1)) |.if JIT | // NYI: add hotloop, record BC_ITERN. |.endif | mov TMP1, KBASE // Need two more free registers. | mov TMP2, DISPATCH | mov TAB:RB, [BASE+RA*8-16] | mov RC, [BASE+RA*8-8] // Get index from control var. | mov DISPATCH, TAB:RB->asize | add PC, 4 | mov KBASE, TAB:RB->array |1: // Traverse array part. | cmp RC, DISPATCH; jae >5 // Index points after array part? | cmp dword [KBASE+RC*8+4], LJ_TNIL; je >4 |.if DUALNUM | mov dword [BASE+RA*8+4], LJ_TISNUM | mov dword [BASE+RA*8], RC |.elif SSE | cvtsi2sd xmm0, RC |.else | fild dword [BASE+RA*8-8] |.endif | // Copy array slot to returned value. |.if X64 | mov RBa, [KBASE+RC*8] | mov [BASE+RA*8+8], RBa |.else | mov RB, [KBASE+RC*8+4] | mov [BASE+RA*8+12], RB | mov RB, [KBASE+RC*8] | mov [BASE+RA*8+8], RB |.endif | add RC, 1 | // Return array index as a numeric key. |.if DUALNUM | // See above. |.elif SSE | movsd qword [BASE+RA*8], xmm0 |.else | fstp qword [BASE+RA*8] |.endif | mov [BASE+RA*8-8], RC // Update control var. |2: | movzx RD, PC_RD // Get target from ITERL. | branchPC RD |3: | mov DISPATCH, TMP2 | mov KBASE, TMP1 | ins_next | |4: // Skip holes in array part. | add RC, 1 |.if not (DUALNUM or SSE) | mov [BASE+RA*8-8], RC |.endif | jmp <1 | |5: // Traverse hash part. | sub RC, DISPATCH |6: | cmp RC, TAB:RB->hmask; ja <3 // End of iteration? Branch to ITERL+1. | imul KBASE, RC, #NODE | add NODE:KBASE, TAB:RB->node | cmp dword NODE:KBASE->val.it, LJ_TNIL; je >7 | lea DISPATCH, [RC+DISPATCH+1] | // Copy key and value from hash slot. |.if X64 | mov RBa, NODE:KBASE->key | mov RCa, NODE:KBASE->val | mov [BASE+RA*8], RBa | mov [BASE+RA*8+8], RCa |.else | mov RB, NODE:KBASE->key.gcr | mov RC, NODE:KBASE->key.it | mov [BASE+RA*8], RB | mov [BASE+RA*8+4], RC | mov RB, NODE:KBASE->val.gcr | mov RC, NODE:KBASE->val.it | mov [BASE+RA*8+8], RB | mov [BASE+RA*8+12], RC |.endif | mov [BASE+RA*8-8], DISPATCH | jmp <2 | |7: // Skip holes in hash part. | add RC, 1 | jmp <6 break; case BC_ISNEXT: | ins_AD // RA = base, RD = target (points to ITERN) | cmp dword [BASE+RA*8-20], LJ_TFUNC; jne >5 | mov CFUNC:RB, [BASE+RA*8-24] | cmp dword [BASE+RA*8-12], LJ_TTAB; jne >5 | cmp dword [BASE+RA*8-4], LJ_TNIL; jne >5 | cmp byte CFUNC:RB->ffid, FF_next_N; jne >5 | branchPC RD | mov dword [BASE+RA*8-8], 0 // Initialize control var. | mov dword [BASE+RA*8-4], 0xfffe7fff |1: | ins_next |5: // Despecialize bytecode if any of the checks fail. | mov PC_OP, BC_JMP | branchPC RD | mov byte [PC], BC_ITERC | jmp <1 break; case BC_VARG: | ins_ABC // RA = base, RB = nresults+1, RC = numparams | mov TMP1, KBASE // Need one more free register. | lea KBASE, [BASE+RC*8+(8+FRAME_VARG)] | lea RA, [BASE+RA*8] | sub KBASE, [BASE-4] | // Note: KBASE may now be even _above_ BASE if nargs was < numparams. | test RB, RB | jz >5 // Copy all varargs? | lea RB, [RA+RB*8-8] | cmp KBASE, BASE // No vararg slots? | jnb >2 |1: // Copy vararg slots to destination slots. |.if X64 | mov RCa, [KBASE-8] | add KBASE, 8 | mov [RA], RCa |.else | mov RC, [KBASE-8] | mov [RA], RC | mov RC, [KBASE-4] | add KBASE, 8 | mov [RA+4], RC |.endif | add RA, 8 | cmp RA, RB // All destination slots filled? | jnb >3 | cmp KBASE, BASE // No more vararg slots? | jb <1 |2: // Fill up remainder with nil. | mov dword [RA+4], LJ_TNIL | add RA, 8 | cmp RA, RB | jb <2 |3: | mov KBASE, TMP1 | ins_next | |5: // Copy all varargs. | mov MULTRES, 1 // MULTRES = 0+1 | mov RC, BASE | sub RC, KBASE | jbe <3 // No vararg slots? | mov RB, RC | shr RB, 3 | add RB, 1 | mov MULTRES, RB // MULTRES = #varargs+1 | mov L:RB, SAVE_L | add RC, RA | cmp RC, L:RB->maxstack | ja >7 // Need to grow stack? |6: // Copy all vararg slots. |.if X64 | mov RCa, [KBASE-8] | add KBASE, 8 | mov [RA], RCa |.else | mov RC, [KBASE-8] | mov [RA], RC | mov RC, [KBASE-4] | add KBASE, 8 | mov [RA+4], RC |.endif | add RA, 8 | cmp KBASE, BASE // No more vararg slots? | jb <6 | jmp <3 | |7: // Grow stack for varargs. | mov L:RB->base, BASE | mov L:RB->top, RA | mov SAVE_PC, PC | sub KBASE, BASE // Need delta, because BASE may change. | mov FCARG2, MULTRES | sub FCARG2, 1 | mov FCARG1, L:RB | call extern lj_state_growstack@8 // (lua_State *L, int n) | mov BASE, L:RB->base | mov RA, L:RB->top | add KBASE, BASE | jmp <6 break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: | ins_AD // RA = results, RD = extra_nresults | add RD, MULTRES // MULTRES >=1, so RD >=1. | // Fall through. Assumes BC_RET follows and ins_AD is a no-op. break; case BC_RET: case BC_RET0: case BC_RET1: | ins_AD // RA = results, RD = nresults+1 if (op != BC_RET0) { | shl RA, 3 } |1: | mov PC, [BASE-4] | mov MULTRES, RD // Save nresults+1. | test PC, FRAME_TYPE // Check frame type marker. | jnz >7 // Not returning to a fixarg Lua func? switch (op) { case BC_RET: |->BC_RET_Z: | mov KBASE, BASE // Use KBASE for result move. | sub RD, 1 | jz >3 |2: // Move results down. |.if X64 | mov RBa, [KBASE+RA] | mov [KBASE-8], RBa |.else | mov RB, [KBASE+RA] | mov [KBASE-8], RB | mov RB, [KBASE+RA+4] | mov [KBASE-4], RB |.endif | add KBASE, 8 | sub RD, 1 | jnz <2 |3: | mov RD, MULTRES // Note: MULTRES may be >255. | movzx RB, PC_RB // So cannot compare with RDL! |5: | cmp RB, RD // More results expected? | ja >6 break; case BC_RET1: |.if X64 | mov RBa, [BASE+RA] | mov [BASE-8], RBa |.else | mov RB, [BASE+RA+4] | mov [BASE-4], RB | mov RB, [BASE+RA] | mov [BASE-8], RB |.endif /* fallthrough */ case BC_RET0: |5: | cmp PC_RB, RDL // More results expected? | ja >6 default: break; } | movzx RA, PC_RA | not RAa // Note: ~RA = -(RA+1) | lea BASE, [BASE+RA*8] // base = base - (RA+1)*8 | mov LFUNC:KBASE, [BASE-8] | mov KBASE, LFUNC:KBASE->pc | mov KBASE, [KBASE+PC2PROTO(k)] | ins_next | |6: // Fill up results with nil. if (op == BC_RET) { | mov dword [KBASE-4], LJ_TNIL // Note: relies on shifted base. | add KBASE, 8 } else { | mov dword [BASE+RD*8-12], LJ_TNIL } | add RD, 1 | jmp <5 | |7: // Non-standard return case. | lea RB, [PC-FRAME_VARG] | test RB, FRAME_TYPEP | jnz ->vm_return | // Return from vararg function: relocate BASE down and RA up. | sub BASE, RB if (op != BC_RET0) { | add RA, RB } | jmp <1 break; /* -- Loops and branches ------------------------------------------------ */ |.define FOR_IDX, [RA]; .define FOR_TIDX, dword [RA+4] |.define FOR_STOP, [RA+8]; .define FOR_TSTOP, dword [RA+12] |.define FOR_STEP, [RA+16]; .define FOR_TSTEP, dword [RA+20] |.define FOR_EXT, [RA+24]; .define FOR_TEXT, dword [RA+28] case BC_FORL: |.if JIT | hotloop RB |.endif | // Fall through. Assumes BC_IFORL follows and ins_AJ is a no-op. break; case BC_JFORI: case BC_JFORL: #if !LJ_HASJIT break; #endif case BC_FORI: case BC_IFORL: vk = (op == BC_IFORL || op == BC_JFORL); | ins_AJ // RA = base, RD = target (after end of loop or start of loop) | lea RA, [BASE+RA*8] if (LJ_DUALNUM) { | cmp FOR_TIDX, LJ_TISNUM; jne >9 if (!vk) { | cmp FOR_TSTOP, LJ_TISNUM; jne ->vmeta_for | cmp FOR_TSTEP, LJ_TISNUM; jne ->vmeta_for | mov RB, dword FOR_IDX | cmp dword FOR_STEP, 0; jl >5 } else { #ifdef LUA_USE_ASSERT | cmp FOR_TSTOP, LJ_TISNUM; jne ->assert_bad_for_arg_type | cmp FOR_TSTEP, LJ_TISNUM; jne ->assert_bad_for_arg_type #endif | mov RB, dword FOR_STEP | test RB, RB; js >5 | add RB, dword FOR_IDX; jo >1 | mov dword FOR_IDX, RB } | cmp RB, dword FOR_STOP | mov FOR_TEXT, LJ_TISNUM | mov dword FOR_EXT, RB if (op == BC_FORI) { | jle >7 |1: |6: | branchPC RD } else if (op == BC_JFORI) { | branchPC RD | movzx RD, PC_RD | jle =>BC_JLOOP |1: |6: } else if (op == BC_IFORL) { | jg >7 |6: | branchPC RD |1: } else { | jle =>BC_JLOOP |1: |6: } |7: | ins_next | |5: // Invert check for negative step. if (vk) { | add RB, dword FOR_IDX; jo <1 | mov dword FOR_IDX, RB } | cmp RB, dword FOR_STOP | mov FOR_TEXT, LJ_TISNUM | mov dword FOR_EXT, RB if (op == BC_FORI) { | jge <7 } else if (op == BC_JFORI) { | branchPC RD | movzx RD, PC_RD | jge =>BC_JLOOP } else if (op == BC_IFORL) { | jl <7 } else { | jge =>BC_JLOOP } | jmp <6 |9: // Fallback to FP variant. } else if (!vk) { | cmp FOR_TIDX, LJ_TISNUM } if (!vk) { | jae ->vmeta_for | cmp FOR_TSTOP, LJ_TISNUM; jae ->vmeta_for } else { #ifdef LUA_USE_ASSERT | cmp FOR_TSTOP, LJ_TISNUM; jae ->assert_bad_for_arg_type | cmp FOR_TSTEP, LJ_TISNUM; jae ->assert_bad_for_arg_type #endif } | mov RB, FOR_TSTEP // Load type/hiword of for step. if (!vk) { | cmp RB, LJ_TISNUM; jae ->vmeta_for } |.if SSE | movsd xmm0, qword FOR_IDX | movsd xmm1, qword FOR_STOP if (vk) { | addsd xmm0, qword FOR_STEP | movsd qword FOR_IDX, xmm0 | test RB, RB; js >3 } else { | jl >3 } | ucomisd xmm1, xmm0 |1: | movsd qword FOR_EXT, xmm0 |.else | fld qword FOR_STOP | fld qword FOR_IDX if (vk) { | fadd qword FOR_STEP // nidx = idx + step | fst qword FOR_IDX | fst qword FOR_EXT | test RB, RB; js >1 } else { | fst qword FOR_EXT | jl >1 } | fxch // Swap lim/(n)idx if step non-negative. |1: | fcomparepp |.endif if (op == BC_FORI) { |.if DUALNUM | jnb <7 |.else | jnb >2 | branchPC RD |.endif } else if (op == BC_JFORI) { | branchPC RD | movzx RD, PC_RD | jnb =>BC_JLOOP } else if (op == BC_IFORL) { |.if DUALNUM | jb <7 |.else | jb >2 | branchPC RD |.endif } else { | jnb =>BC_JLOOP } |.if DUALNUM | jmp <6 |.else |2: | ins_next |.endif |.if SSE |3: // Invert comparison if step is negative. | ucomisd xmm0, xmm1 | jmp <1 |.endif break; case BC_ITERL: |.if JIT | hotloop RB |.endif | // Fall through. Assumes BC_IITERL follows and ins_AJ is a no-op. break; case BC_JITERL: #if !LJ_HASJIT break; #endif case BC_IITERL: | ins_AJ // RA = base, RD = target | lea RA, [BASE+RA*8] | mov RB, [RA+4] | cmp RB, LJ_TNIL; je >1 // Stop if iterator returned nil. if (op == BC_JITERL) { | mov [RA-4], RB | mov RB, [RA] | mov [RA-8], RB | jmp =>BC_JLOOP } else { | branchPC RD // Otherwise save control var + branch. | mov RD, [RA] | mov [RA-4], RB | mov [RA-8], RD } |1: | ins_next break; case BC_LOOP: | ins_A // RA = base, RD = target (loop extent) | // Note: RA/RD is only used by trace recorder to determine scope/extent | // This opcode does NOT jump, it's only purpose is to detect a hot loop. |.if JIT | hotloop RB |.endif | // Fall through. Assumes BC_ILOOP follows and ins_A is a no-op. break; case BC_ILOOP: | ins_A // RA = base, RD = target (loop extent) | ins_next break; case BC_JLOOP: |.if JIT | ins_AD // RA = base (ignored), RD = traceno | mov RA, [DISPATCH+DISPATCH_J(trace)] | mov TRACE:RD, [RA+RD*4] | mov RDa, TRACE:RD->mcode | mov L:RB, SAVE_L | mov [DISPATCH+DISPATCH_GL(jit_base)], BASE | mov [DISPATCH+DISPATCH_GL(jit_L)], L:RB | // Save additional callee-save registers only used in compiled code. |.if X64WIN | mov TMPQ, r12 | mov TMPa, r13 | mov CSAVE_4, r14 | mov CSAVE_3, r15 | mov RAa, rsp | sub rsp, 9*16+4*8 | movdqa [RAa], xmm6 | movdqa [RAa-1*16], xmm7 | movdqa [RAa-2*16], xmm8 | movdqa [RAa-3*16], xmm9 | movdqa [RAa-4*16], xmm10 | movdqa [RAa-5*16], xmm11 | movdqa [RAa-6*16], xmm12 | movdqa [RAa-7*16], xmm13 | movdqa [RAa-8*16], xmm14 | movdqa [RAa-9*16], xmm15 |.elif X64 | mov TMPQ, r12 | mov TMPa, r13 | sub rsp, 16 |.endif | jmp RDa |.endif break; case BC_JMP: | ins_AJ // RA = unused, RD = target | branchPC RD | ins_next break; /* -- Function headers -------------------------------------------------- */ /* ** Reminder: A function may be called with func/args above L->maxstack, ** i.e. occupying EXTRA_STACK slots. And vmeta_call may add one extra slot, ** too. This means all FUNC* ops (including fast functions) must check ** for stack overflow _before_ adding more slots! */ case BC_FUNCF: |.if JIT | hotcall RB |.endif case BC_FUNCV: /* NYI: compiled vararg functions. */ | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow and ins_AD is a no-op. break; case BC_JFUNCF: #if !LJ_HASJIT break; #endif case BC_IFUNCF: | ins_AD // BASE = new base, RA = framesize, RD = nargs+1 | mov KBASE, [PC-4+PC2PROTO(k)] | mov L:RB, SAVE_L | lea RA, [BASE+RA*8] // Top of frame. | cmp RA, L:RB->maxstack | ja ->vm_growstack_f | movzx RA, byte [PC-4+PC2PROTO(numparams)] | cmp NARGS:RD, RA // Check for missing parameters. | jbe >3 |2: if (op == BC_JFUNCF) { | movzx RD, PC_RD | jmp =>BC_JLOOP } else { | ins_next } | |3: // Clear missing parameters. | mov dword [BASE+NARGS:RD*8-4], LJ_TNIL | add NARGS:RD, 1 | cmp NARGS:RD, RA | jbe <3 | jmp <2 break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif | int3 // NYI: compiled vararg functions break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: | ins_AD // BASE = new base, RA = framesize, RD = nargs+1 | lea RB, [NARGS:RD*8+FRAME_VARG] | lea RD, [BASE+NARGS:RD*8] | mov LFUNC:KBASE, [BASE-8] | mov [RD-4], RB // Store delta + FRAME_VARG. | mov [RD-8], LFUNC:KBASE // Store copy of LFUNC. | mov L:RB, SAVE_L | lea RA, [RD+RA*8] | cmp RA, L:RB->maxstack | ja ->vm_growstack_v // Need to grow stack. | mov RA, BASE | mov BASE, RD | movzx RB, byte [PC-4+PC2PROTO(numparams)] | test RB, RB | jz >2 |1: // Copy fixarg slots up to new frame. | add RA, 8 | cmp RA, BASE | jnb >3 // Less args than parameters? | mov KBASE, [RA-8] | mov [RD], KBASE | mov KBASE, [RA-4] | mov [RD+4], KBASE | add RD, 8 | mov dword [RA-4], LJ_TNIL // Clear old fixarg slot (help the GC). | sub RB, 1 | jnz <1 |2: if (op == BC_JFUNCV) { | movzx RD, PC_RD | jmp =>BC_JLOOP } else { | mov KBASE, [PC-4+PC2PROTO(k)] | ins_next } | |3: // Clear missing parameters. | mov dword [RD+4], LJ_TNIL | add RD, 8 | sub RB, 1 | jnz <3 | jmp <2 break; case BC_FUNCC: case BC_FUNCCW: | ins_AD // BASE = new base, RA = ins RA|RD (unused), RD = nargs+1 | mov CFUNC:RB, [BASE-8] | mov KBASEa, CFUNC:RB->f | mov L:RB, SAVE_L | lea RD, [BASE+NARGS:RD*8-8] | mov L:RB->base, BASE | lea RA, [RD+8*LUA_MINSTACK] | cmp RA, L:RB->maxstack | mov L:RB->top, RD if (op == BC_FUNCC) { |.if X64 | mov CARG1d, L:RB // Caveat: CARG1d may be RA. |.else | mov ARG1, L:RB |.endif } else { |.if X64 | mov CARG2, KBASEa | mov CARG1d, L:RB // Caveat: CARG1d may be RA. |.else | mov ARG2, KBASEa | mov ARG1, L:RB |.endif } | ja ->vm_growstack_c // Need to grow stack. | set_vmstate C if (op == BC_FUNCC) { | call KBASEa // (lua_State *L) } else { | // (lua_State *L, lua_CFunction f) | call aword [DISPATCH+DISPATCH_GL(wrapf)] } | set_vmstate INTERP | // nresults returned in eax (RD). | mov BASE, L:RB->base | lea RA, [BASE+RD*8] | neg RA | add RA, L:RB->top // RA = (L->top-(L->base+nresults))*8 | mov PC, [BASE-4] // Fetch PC of caller. | jmp ->vm_returnc break; /* ---------------------------------------------------------------------- */ default: fprintf(stderr, "Error: undefined opcode BC_%s\n", bc_names[op]); exit(2); break; } } static int build_backend(BuildCtx *ctx) { int op; dasm_growpc(Dst, BC__MAX); build_subroutines(ctx); |.code_op for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op); return BC__MAX; } /* Emit pseudo frame-info for all assembler functions. */ static void emit_asm_debug(BuildCtx *ctx) { int fcofs = (int)((uint8_t *)ctx->glob[GLOB_vm_ffi_call] - ctx->code); #if LJ_64 #define SZPTR "8" #define BSZPTR "3" #define REG_SP "0x7" #define REG_RA "0x10" #else #define SZPTR "4" #define BSZPTR "2" #define REG_SP "0x4" #define REG_RA "0x8" #endif switch (ctx->mode) { case BUILD_elfasm: fprintf(ctx->fp, "\t.section .debug_frame,\"\",@progbits\n"); fprintf(ctx->fp, ".Lframe0:\n" "\t.long .LECIE0-.LSCIE0\n" ".LSCIE0:\n" "\t.long 0xffffffff\n" "\t.byte 0x1\n" "\t.string \"\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n" "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n" "\t.align " SZPTR "\n" ".LECIE0:\n\n"); fprintf(ctx->fp, ".LSFDE0:\n" "\t.long .LEFDE0-.LASFDE0\n" ".LASFDE0:\n" "\t.long .Lframe0\n" #if LJ_64 "\t.quad .Lbegin\n" "\t.quad %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ "\t.byte 0x8f\n\t.uleb128 0x4\n" /* offset r15 */ "\t.byte 0x8e\n\t.uleb128 0x5\n" /* offset r14 */ #else "\t.long .Lbegin\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */ "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0x87\n\t.uleb128 0x3\n" /* offset edi */ "\t.byte 0x86\n\t.uleb128 0x4\n" /* offset esi */ "\t.byte 0x83\n\t.uleb128 0x5\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE0:\n\n", fcofs, CFRAME_SIZE); #if LJ_HASFFI fprintf(ctx->fp, ".LSFDE1:\n" "\t.long .LEFDE1-.LASFDE1\n" ".LASFDE1:\n" "\t.long .Lframe0\n" #if LJ_64 "\t.quad lj_vm_ffi_call\n" "\t.quad %d\n" "\t.byte 0xe\n\t.uleb128 16\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ #else "\t.long lj_vm_ffi_call\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 8\n" /* def_cfa_offset */ "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0xd\n\t.uleb128 0x5\n" /* def_cfa_register ebp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE1:\n\n", (int)ctx->codesz - fcofs); #endif #if (defined(__sun__) && defined(__svr4__)) #if LJ_64 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@unwind\n"); #else fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n"); #endif #else fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); #endif fprintf(ctx->fp, ".Lframe1:\n" "\t.long .LECIE1-.LSCIE1\n" ".LSCIE1:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.string \"zPR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.uleb128 6\n" /* augmentation length */ "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.long lj_err_unwind_dwarf-.\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n" "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n" "\t.align " SZPTR "\n" ".LECIE1:\n\n"); fprintf(ctx->fp, ".LSFDE2:\n" "\t.long .LEFDE2-.LASFDE2\n" ".LASFDE2:\n" "\t.long .LASFDE2-.Lframe1\n" "\t.long .Lbegin-.\n" "\t.long %d\n" "\t.uleb128 0\n" /* augmentation length */ "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */ #if LJ_64 "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ "\t.byte 0x8f\n\t.uleb128 0x4\n" /* offset r15 */ "\t.byte 0x8e\n\t.uleb128 0x5\n" /* offset r14 */ #else "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0x87\n\t.uleb128 0x3\n" /* offset edi */ "\t.byte 0x86\n\t.uleb128 0x4\n" /* offset esi */ "\t.byte 0x83\n\t.uleb128 0x5\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE2:\n\n", fcofs, CFRAME_SIZE); #if LJ_HASFFI fprintf(ctx->fp, ".Lframe2:\n" "\t.long .LECIE2-.LSCIE2\n" ".LSCIE2:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.string \"zR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.uleb128 1\n" /* augmentation length */ "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n" "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n" "\t.align " SZPTR "\n" ".LECIE2:\n\n"); fprintf(ctx->fp, ".LSFDE3:\n" "\t.long .LEFDE3-.LASFDE3\n" ".LASFDE3:\n" "\t.long .LASFDE3-.Lframe2\n" "\t.long lj_vm_ffi_call-.\n" "\t.long %d\n" "\t.uleb128 0\n" /* augmentation length */ #if LJ_64 "\t.byte 0xe\n\t.uleb128 16\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ #else "\t.byte 0xe\n\t.uleb128 8\n" /* def_cfa_offset */ "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0xd\n\t.uleb128 0x5\n" /* def_cfa_register ebp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE3:\n\n", (int)ctx->codesz - fcofs); #endif break; /* Mental note: never let Apple design an assembler. ** Or a linker. Or a plastic case. But I digress. */ case BUILD_machasm: { #if LJ_HASFFI int fcsize = 0; #endif int i; fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n"); fprintf(ctx->fp, "EH_frame1:\n" "\t.set L$set$x,LECIEX-LSCIEX\n" "\t.long L$set$x\n" "LSCIEX:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.ascii \"zPR\\0\"\n" "\t.byte 0x1\n" "\t.byte 128-" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.byte 6\n" /* augmentation length */ "\t.byte 0x9b\n" /* indirect|pcrel|sdata4 */ #if LJ_64 "\t.long _lj_err_unwind_dwarf+4@GOTPCREL\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte " REG_SP "\n\t.byte " SZPTR "\n" #else "\t.long L_lj_err_unwind_dwarf$non_lazy_ptr-.\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte 0x5\n\t.byte 0x4\n" /* esp=5 on 32 bit MACH-O. */ #endif "\t.byte 0x80+" REG_RA "\n\t.byte 0x1\n" "\t.align " BSZPTR "\n" "LECIEX:\n\n"); for (i = 0; i < ctx->nsym; i++) { const char *name = ctx->sym[i].name; int32_t size = ctx->sym[i+1].ofs - ctx->sym[i].ofs; if (size == 0) continue; #if LJ_HASFFI if (!strcmp(name, "_lj_vm_ffi_call")) { fcsize = size; continue; } #endif fprintf(ctx->fp, "%s.eh:\n" "LSFDE%d:\n" "\t.set L$set$%d,LEFDE%d-LASFDE%d\n" "\t.long L$set$%d\n" "LASFDE%d:\n" "\t.long LASFDE%d-EH_frame1\n" "\t.long %s-.\n" "\t.long %d\n" "\t.byte 0\n" /* augmentation length */ "\t.byte 0xe\n\t.byte %d\n" /* def_cfa_offset */ #if LJ_64 "\t.byte 0x86\n\t.byte 0x2\n" /* offset rbp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset rbx */ "\t.byte 0x8f\n\t.byte 0x4\n" /* offset r15 */ "\t.byte 0x8e\n\t.byte 0x5\n" /* offset r14 */ #else "\t.byte 0x84\n\t.byte 0x2\n" /* offset ebp (4 for MACH-O)*/ "\t.byte 0x87\n\t.byte 0x3\n" /* offset edi */ "\t.byte 0x86\n\t.byte 0x4\n" /* offset esi */ "\t.byte 0x83\n\t.byte 0x5\n" /* offset ebx */ #endif "\t.align " BSZPTR "\n" "LEFDE%d:\n\n", name, i, i, i, i, i, i, i, name, size, CFRAME_SIZE, i); } #if LJ_HASFFI if (fcsize) { fprintf(ctx->fp, "EH_frame2:\n" "\t.set L$set$y,LECIEY-LSCIEY\n" "\t.long L$set$y\n" "LSCIEY:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.ascii \"zR\\0\"\n" "\t.byte 0x1\n" "\t.byte 128-" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.byte 1\n" /* augmentation length */ #if LJ_64 "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte " REG_SP "\n\t.byte " SZPTR "\n" #else "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte 0x5\n\t.byte 0x4\n" /* esp=5 on 32 bit MACH. */ #endif "\t.byte 0x80+" REG_RA "\n\t.byte 0x1\n" "\t.align " BSZPTR "\n" "LECIEY:\n\n"); fprintf(ctx->fp, "_lj_vm_ffi_call.eh:\n" "LSFDEY:\n" "\t.set L$set$yy,LEFDEY-LASFDEY\n" "\t.long L$set$yy\n" "LASFDEY:\n" "\t.long LASFDEY-EH_frame2\n" "\t.long _lj_vm_ffi_call-.\n" "\t.long %d\n" "\t.byte 0\n" /* augmentation length */ #if LJ_64 "\t.byte 0xe\n\t.byte 16\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.byte 0x2\n" /* offset rbp */ "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset rbx */ #else "\t.byte 0xe\n\t.byte 8\n" /* def_cfa_offset */ "\t.byte 0x84\n\t.byte 0x2\n" /* offset ebp (4 for MACH-O)*/ "\t.byte 0xd\n\t.uleb128 0x4\n" /* def_cfa_register ebp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset ebx */ #endif "\t.align " BSZPTR "\n" "LEFDEY:\n\n", fcsize); } #endif #if LJ_64 fprintf(ctx->fp, "\t.subsections_via_symbols\n"); #else fprintf(ctx->fp, "\t.non_lazy_symbol_pointer\n" "L_lj_err_unwind_dwarf$non_lazy_ptr:\n" ".indirect_symbol _lj_err_unwind_dwarf\n" ".long 0\n"); #endif } break; default: /* Difficult for other modes. */ break; } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ffrecord.h0000664000000000000000000000117512202141143023012 0ustar rootroot/* ** Fast function call recorder. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_FFRECORD_H #define _LJ_FFRECORD_H #include "lj_obj.h" #include "lj_jit.h" #if LJ_HASJIT /* Data used by handlers to record a fast function. */ typedef struct RecordFFData { TValue *argv; /* Runtime argument values. */ ptrdiff_t nres; /* Number of returned results (defaults to 1). */ uint32_t data; /* Per-ffid auxiliary data (opcode, literal etc.). */ } RecordFFData; LJ_FUNC int32_t lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv); LJ_FUNC void lj_ffrecord_func(jit_State *J); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_state.o0000664000000000000000000002051012213333050022343 0ustar rootrootELF>@@ UHSHHHhC$C8-HhH8K HHHKHK@{u@"sKI(@uH9r)@HH9uH[]UHAWAVAUATSHIAw$_8EnAG L)HS9t<B AD$$HL)EJ AL$ D9sDA9uEl$8IT$IT$AD$(Ht2xt"xtIPHuAD$I9uH[A\A]A^A_]UHAUATSHI_w$HDk0M9t{ tHHSHH3)S H{SSdHsX)S H{SAU8HAu$)S H{S{ htHCH=u H{HsH{hH[A\A]]UHSHHHH[]UHATSHDgHHC,HSǂx uPC@(tHHHHH AD$ AD$$L[A\]Á8v"G$HWH)HUH]ËG8=w(9v!ZvWH9tUH]UHSHHG8=v Ɓv(9s =FHB{8v hHH[]UH]UHH]LeLmLuH IIhLAHHzAH9oIH߾ht H{@g@t fH@t HɸH@t H@t fH@tCCaCHC@CCh!ƃƃLsPLkXHCHǃǃǃHHǃǃCi[pHCpCtC`hǃǃHCHtHlA CALH]LeLmLuUHAVAUATSDgA$I݋s$HLA$ ADŽ$TLA A$CHC0C$HHCHCLuAtLA|$DuH[A\A]A^]UHATSI@H@@@@8@$H@0@(AD$CAD$,C,LH~CuH[A\]UHATSHI􋇔H9uv$LA|$(tAT$8HAt$$)S H{Sk @H{@LS[A\]lj_obj.hlj_state.c(up)->gch.gct == ~(~5u)g->strnum == 0!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(MSize)((((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32))-oldst)==L->stacksize-5-1((GCobj *)(uintptr_t)(g->gc.root).gcptr32) == ((GCobj *)(L))g->gc.total == sizeof(GG_State)((((GCobj *)(L1)))->gch.marked & (0x01 | 0x02))L != (&((GCobj *)(uintptr_t)(g->mainthref).gcptr32)->th)((GCobj *)(uintptr_t)(L->openupval).gcptr32) == ((void *)0)resizestacksetgcVclose_statelj_state_newlj_state_freeGCC: (Debian 4.7.3-4) 4.7.3zRx  AC E (@AC M $lAC I  %AC E[  AC C -]C K 4eC J  gAC E] <AC K $\AC T $AC G  AC Cz  AC C .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @@h &,12;@2OL :W0 ` u p 8     0< Ua z% ,  "->Shs-4g"4ERg\p'lj_state.cstack_init__PRETTY_FUNCTION__.3380resizestack__PRETTY_FUNCTION__.5146close_state__PRETTY_FUNCTION__.5187cpfinalizecpluaopen__PRETTY_FUNCTION__.5211__PRETTY_FUNCTION__.5216lj_mem_realloc__assert_faillj_func_closeuvlj_gc_freealllj_trace_freestatelj_ctype_freestatelj_alloc_flj_alloc_destroylj_gc_finalize_cdatalj_gc_finalize_udatalj_tab_newlj_str_resizelj_meta_initlj_lex_initlj_err_strlj_trace_initstatelj_state_relimitstacklj_state_shrinkstacklj_state_growstacklj_err_throwlj_err_msglj_state_growstack1lj_state_newstatelj_dispatch_initlj_vm_cpcalllua_closelj_gc_separateudatalj_dispatch_updatelj_state_newlj_mem_newgcolj_state_freey      (c m  r w        , w     #V  ` e jw !"#$8(x)', .-/0 - /72     ,    ,   P Dp@`g'tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_gdbjit.o0000664000000000000000000000163512213333057022504 0ustar rootrootELF>@@ GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.comment.note.GNU-stack@!@'@,0@5]]E  lj_gdbjit.ctarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_carith.c0000664000000000000000000002334612202141143022471 0ustar rootroot/* ** C data arithmetic. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_tab.h" #include "lj_meta.h" #include "lj_ctype.h" #include "lj_cconv.h" #include "lj_cdata.h" #include "lj_carith.h" /* -- C data arithmetic --------------------------------------------------- */ /* Binary operands of an operator converted to ctypes. */ typedef struct CDArith { uint8_t *p[2]; CType *ct[2]; } CDArith; /* Check arguments for arithmetic metamethods. */ static int carith_checkarg(lua_State *L, CTState *cts, CDArith *ca) { TValue *o = L->base; int ok = 1; MSize i; if (o+1 >= L->top) lj_err_argt(L, 1, LUA_TCDATA); for (i = 0; i < 2; i++, o++) { if (tviscdata(o)) { GCcdata *cd = cdataV(o); CTypeID id = (CTypeID)cd->ctypeid; CType *ct = ctype_raw(cts, id); uint8_t *p = (uint8_t *)cdataptr(cd); if (ctype_isptr(ct->info)) { p = (uint8_t *)cdata_getptr(p, ct->size); if (ctype_isref(ct->info)) ct = ctype_rawchild(cts, ct); } else if (ctype_isfunc(ct->info)) { p = (uint8_t *)*(void **)p; ct = ctype_get(cts, lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR)); } if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); ca->ct[i] = ct; ca->p[i] = p; } else if (tvisint(o)) { ca->ct[i] = ctype_get(cts, CTID_INT32); ca->p[i] = (uint8_t *)&o->i; } else if (tvisnum(o)) { ca->ct[i] = ctype_get(cts, CTID_DOUBLE); ca->p[i] = (uint8_t *)&o->n; } else if (tvisnil(o)) { ca->ct[i] = ctype_get(cts, CTID_P_VOID); ca->p[i] = (uint8_t *)0; } else if (tvisstr(o)) { TValue *o2 = i == 0 ? o+1 : o-1; CType *ct = ctype_raw(cts, cdataV(o2)->ctypeid); ca->ct[i] = NULL; ca->p[i] = NULL; ok = 0; if (ctype_isenum(ct->info)) { CTSize ofs; CType *cct = lj_ctype_getfield(cts, ct, strV(o), &ofs); if (cct && ctype_isconstval(cct->info)) { ca->ct[i] = ctype_child(cts, cct); ca->p[i] = (uint8_t *)&cct->size; /* Assumes ct does not grow. */ ok = 1; } else { ca->ct[1-i] = ct; /* Use enum to improve error message. */ ca->p[1-i] = NULL; break; } } } else { ca->ct[i] = NULL; ca->p[i] = NULL; ok = 0; } } return ok; } /* Pointer arithmetic. */ static int carith_ptr(lua_State *L, CTState *cts, CDArith *ca, MMS mm) { CType *ctp = ca->ct[0]; uint8_t *pp = ca->p[0]; ptrdiff_t idx; CTSize sz; CTypeID id; GCcdata *cd; if (ctype_isptr(ctp->info) || ctype_isrefarray(ctp->info)) { if ((mm == MM_sub || mm == MM_eq || mm == MM_lt || mm == MM_le) && (ctype_isptr(ca->ct[1]->info) || ctype_isrefarray(ca->ct[1]->info))) { uint8_t *pp2 = ca->p[1]; if (mm == MM_eq) { /* Pointer equality. Incompatible pointers are ok. */ setboolV(L->top-1, (pp == pp2)); return 1; } if (!lj_cconv_compatptr(cts, ctp, ca->ct[1], CCF_IGNQUAL)) return 0; if (mm == MM_sub) { /* Pointer difference. */ intptr_t diff; sz = lj_ctype_size(cts, ctype_cid(ctp->info)); /* Element size. */ if (sz == 0 || sz == CTSIZE_INVALID) return 0; diff = ((intptr_t)pp - (intptr_t)pp2) / (int32_t)sz; /* All valid pointer differences on x64 are in (-2^47, +2^47), ** which fits into a double without loss of precision. */ setintptrV(L->top-1, (int32_t)diff); return 1; } else if (mm == MM_lt) { /* Pointer comparison (unsigned). */ setboolV(L->top-1, ((uintptr_t)pp < (uintptr_t)pp2)); return 1; } else { lua_assert(mm == MM_le); setboolV(L->top-1, ((uintptr_t)pp <= (uintptr_t)pp2)); return 1; } } if (!((mm == MM_add || mm == MM_sub) && ctype_isnum(ca->ct[1]->info))) return 0; lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ca->ct[1], (uint8_t *)&idx, ca->p[1], 0); if (mm == MM_sub) idx = -idx; } else if (mm == MM_add && ctype_isnum(ctp->info) && (ctype_isptr(ca->ct[1]->info) || ctype_isrefarray(ca->ct[1]->info))) { /* Swap pointer and index. */ ctp = ca->ct[1]; pp = ca->p[1]; lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ca->ct[0], (uint8_t *)&idx, ca->p[0], 0); } else { return 0; } sz = lj_ctype_size(cts, ctype_cid(ctp->info)); /* Element size. */ if (sz == CTSIZE_INVALID) return 0; pp += idx*(int32_t)sz; /* Compute pointer + index. */ id = lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|ctype_cid(ctp->info)), CTSIZE_PTR); cd = lj_cdata_new(cts, id, CTSIZE_PTR); *(uint8_t **)cdataptr(cd) = pp; setcdataV(L, L->top-1, cd); lj_gc_check(L); return 1; } /* 64 bit integer arithmetic. */ static int carith_int64(lua_State *L, CTState *cts, CDArith *ca, MMS mm) { if (ctype_isnum(ca->ct[0]->info) && ca->ct[0]->size <= 8 && ctype_isnum(ca->ct[1]->info) && ca->ct[1]->size <= 8) { CTypeID id = (((ca->ct[0]->info & CTF_UNSIGNED) && ca->ct[0]->size == 8) || ((ca->ct[1]->info & CTF_UNSIGNED) && ca->ct[1]->size == 8)) ? CTID_UINT64 : CTID_INT64; CType *ct = ctype_get(cts, id); GCcdata *cd; uint64_t u0, u1, *up; lj_cconv_ct_ct(cts, ct, ca->ct[0], (uint8_t *)&u0, ca->p[0], 0); if (mm != MM_unm) lj_cconv_ct_ct(cts, ct, ca->ct[1], (uint8_t *)&u1, ca->p[1], 0); switch (mm) { case MM_eq: setboolV(L->top-1, (u0 == u1)); return 1; case MM_lt: setboolV(L->top-1, id == CTID_INT64 ? ((int64_t)u0 < (int64_t)u1) : (u0 < u1)); return 1; case MM_le: setboolV(L->top-1, id == CTID_INT64 ? ((int64_t)u0 <= (int64_t)u1) : (u0 <= u1)); return 1; default: break; } cd = lj_cdata_new(cts, id, 8); up = (uint64_t *)cdataptr(cd); setcdataV(L, L->top-1, cd); switch (mm) { case MM_add: *up = u0 + u1; break; case MM_sub: *up = u0 - u1; break; case MM_mul: *up = u0 * u1; break; case MM_div: if (id == CTID_INT64) *up = (uint64_t)lj_carith_divi64((int64_t)u0, (int64_t)u1); else *up = lj_carith_divu64(u0, u1); break; case MM_mod: if (id == CTID_INT64) *up = (uint64_t)lj_carith_modi64((int64_t)u0, (int64_t)u1); else *up = lj_carith_modu64(u0, u1); break; case MM_pow: if (id == CTID_INT64) *up = (uint64_t)lj_carith_powi64((int64_t)u0, (int64_t)u1); else *up = lj_carith_powu64(u0, u1); break; case MM_unm: *up = (uint64_t)-(int64_t)u0; break; default: lua_assert(0); break; } lj_gc_check(L); return 1; } return 0; } /* Handle ctype arithmetic metamethods. */ static int lj_carith_meta(lua_State *L, CTState *cts, CDArith *ca, MMS mm) { cTValue *tv = NULL; if (tviscdata(L->base)) { CTypeID id = cdataV(L->base)->ctypeid; CType *ct = ctype_raw(cts, id); if (ctype_isptr(ct->info)) id = ctype_cid(ct->info); tv = lj_ctype_meta(cts, id, mm); } if (!tv && L->base+1 < L->top && tviscdata(L->base+1)) { CTypeID id = cdataV(L->base+1)->ctypeid; CType *ct = ctype_raw(cts, id); if (ctype_isptr(ct->info)) id = ctype_cid(ct->info); tv = lj_ctype_meta(cts, id, mm); } if (!tv) { const char *repr[2]; int i, isenum = -1, isstr = -1; if (mm == MM_eq) { /* Equality checks never raise an error. */ setboolV(L->top-1, 0); return 1; } for (i = 0; i < 2; i++) { if (ca->ct[i] && tviscdata(L->base+i)) { if (ctype_isenum(ca->ct[i]->info)) isenum = i; repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL)); } else { if (tvisstr(&L->base[i])) isstr = i; repr[i] = lj_typename(&L->base[i]); } } if ((isenum ^ isstr) == 1) lj_err_callerv(L, LJ_ERR_FFI_BADCONV, repr[isstr], repr[isenum]); lj_err_callerv(L, mm == MM_len ? LJ_ERR_FFI_BADLEN : mm == MM_concat ? LJ_ERR_FFI_BADCONCAT : mm < MM_add ? LJ_ERR_FFI_BADCOMP : LJ_ERR_FFI_BADARITH, repr[0], repr[1]); } return lj_meta_tailcall(L, tv); } /* Arithmetic operators for cdata. */ int lj_carith_op(lua_State *L, MMS mm) { CTState *cts = ctype_cts(L); CDArith ca; if (carith_checkarg(L, cts, &ca)) { if (carith_int64(L, cts, &ca, mm) || carith_ptr(L, cts, &ca, mm)) { copyTV(L, &G(L)->tmptv2, L->top-1); /* Remember for trace recorder. */ return 1; } } return lj_carith_meta(L, cts, &ca, mm); } /* -- 64 bit integer arithmetic helpers ----------------------------------- */ #if LJ_32 && LJ_HASJIT /* Signed/unsigned 64 bit multiplication. */ int64_t lj_carith_mul64(int64_t a, int64_t b) { return a * b; } #endif /* Unsigned 64 bit division. */ uint64_t lj_carith_divu64(uint64_t a, uint64_t b) { if (b == 0) return U64x(80000000,00000000); return a / b; } /* Signed 64 bit division. */ int64_t lj_carith_divi64(int64_t a, int64_t b) { if (b == 0 || (a == (int64_t)U64x(80000000,00000000) && b == -1)) return U64x(80000000,00000000); return a / b; } /* Unsigned 64 bit modulo. */ uint64_t lj_carith_modu64(uint64_t a, uint64_t b) { if (b == 0) return U64x(80000000,00000000); return a % b; } /* Signed 64 bit modulo. */ int64_t lj_carith_modi64(int64_t a, int64_t b) { if (b == 0) return U64x(80000000,00000000); if (a == (int64_t)U64x(80000000,00000000) && b == -1) return 0; return a % b; } /* Unsigned 64 bit x^k. */ uint64_t lj_carith_powu64(uint64_t x, uint64_t k) { uint64_t y; if (k == 0) return 1; for (; (k & 1) == 0; k >>= 1) x *= x; y = x; if ((k >>= 1) != 0) { for (;;) { x *= x; if (k == 1) break; if (k & 1) y *= x; k >>= 1; } y *= x; } return y; } /* Signed 64 bit x^k. */ int64_t lj_carith_powi64(int64_t x, int64_t k) { if (k == 0) return 1; if (k < 0) { if (x == 0) return U64x(7fffffff,ffffffff); else if (x == 1) return 1; else if (x == -1) return (k & 1) ? -1 : 1; else return 0; } return (int64_t)lj_carith_powu64((uint64_t)x, (uint64_t)k); } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_dispatch.o0000664000000000000000000002334012213333063023032 0ustar rootrootELF>@@ UHH]LeLmHI_LMuT`UHGHW$H)HEԋG H+GH= H`LAueH]LeLmUHtf%HuN%]UHAWAVAUATSHIF%^HHIAH(HAUHH9sAUD$A|$u=DLL[A|$tDLLSHuH[A\A]A^A_]UHHH HHH=uհHHHH=uHPHHHhH`HHxHHHHLJ,[LJ0[P]pHH>u]UH勗Tf0 HH=u]HD ATЃA  уA Ⱦ@ ރA <ЃA E8UHAUATSDD<uH5H HHLDI2HHHLDIHHHDD1AAH LHL渨t  H H@tfHH@tHHHt tD$fD$HtAHǂ Hǂ Hǂ Hǂ DHEȸH HH=uAHH H8At.Hǂ Hǂ Hǂ Hǂ 8HH HH HH HH AtNAu)HHXHH=u%HDŽXHH=0uAuLXLpAtAuH[A\A]]UHH]LeLmLuH Aԋ_DꃣT@t AD$t@u    Hu8HGPuRHHH?HcH)HP-~HcHGHT)HcHGH yDqI@zD2AtDLHADLHHt_~HcHGHT HcHGHJu]HH#Hǃ\8ǃ[' yzH]LeLmLuUH]UHtHu H ˆT]UHGH]UHG]UHG]UHH]LeLmLuL}H`HIIƋEHC@xtDxIWHUHC0HPUDcDhHAE<0u AЃ?t?w hookmask & 0x10)(o)->gch.gct == ~(~7u)((fn)->c.ffid == 0)L->top - L->base == delta(uintptr_t)(intptr_t)(i) >= (uintptr_t)-(intptr_t)(pt)->sizekgcsetptmode_alllj_dispatch_inscallhooklj_dispatch_callGCC: (Debian 4.7.3-4) 4.7.3zRx $AC S D'AC b (dAC M AC  )AC d ,IkC EBBA $@AC T' (AC A HSAC N hAC K AC N AC J (XAC X; ,RAC M@ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @\ h& , 12 j@2@TPO#\0!e>z@ u%P `P 8V 1';Ib{    u)%I8FSap@'-SX *8 RIlj_dispatch.ccallhook__PRETTY_FUNCTION__.5447setptmodesetptmode_all__PRETTY_FUNCTION__.5397__PRETTY_FUNCTION__.5466__PRETTY_FUNCTION__.5496lj_state_growstack__assert_faillj_trace_reenableprotolj_trace_flushprotolj_dispatch_initlj_vm_asm_beginlj_bc_ofslj_dispatch_init_hotcountlj_dispatch_updatelj_vm_rethooklj_vm_recordlj_vm_inshooklj_vm_callhookluaJIT_setmodelj_err_callerlj_trace_flushalllj_trace_flushluaJIT_version_2_0_2lua_sethooklua_gethooklua_gethookmasklua_gethookcountlj_dispatch_ins__errno_locationlj_trace_inslj_debug_linelj_dispatch_calllj_trace_hotp  2 < A Fq {  %   %, 3: AG NU ]d   |         % w ~   3 A!~k"u)   <  *  P w + +" )   -  P D *[ e j Po   7 (U08@HPX`hpxy Hhu,'L-l tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_asm.h0000664000000000000000000000054412202141143021777 0ustar rootroot/* ** IR assembler (SSA IR -> machine code). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_ASM_H #define _LJ_ASM_H #include "lj_jit.h" #if LJ_HASJIT LJ_FUNC void lj_asm_trace(jit_State *J, GCtrace *T); LJ_FUNC void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vm.s0000664000000000000000000025741412213333063021674 0ustar rootroot .file "buildvm_x86.dasc" .text .p2align 4 .globl lj_vm_asm_begin .hidden lj_vm_asm_begin .type lj_vm_asm_begin, @object .size lj_vm_asm_begin, 0 lj_vm_asm_begin: .Lbegin: .globl lj_BC_ISLT .hidden lj_BC_ISLT .type lj_BC_ISLT, @function .size lj_BC_ISLT, 72 lj_BC_ISLT: .byte 129,124,202,4,255,255,254,255,15,131,68,29,0,0,129,124 .byte 194,4,255,255,254,255,15,131,54,29,0,0,242,15,16,4 .byte 194,131,195,4,102,15,46,4,202,118,11,15,183,67,254,141 .byte 156,131,0,0,254,255,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238 .globl lj_BC_ISGE .hidden lj_BC_ISGE .type lj_BC_ISGE, @function .size lj_BC_ISGE, 72 lj_BC_ISGE: .byte 129,124,202,4,255,255,254,255,15,131,252,28,0,0,129,124 .byte 194,4,255,255,254,255,15,131,238,28,0,0,242,15,16,4 .byte 194,131,195,4,102,15,46,4,202,119,11,15,183,67,254,141 .byte 156,131,0,0,254,255,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238 .globl lj_BC_ISLE .hidden lj_BC_ISLE .type lj_BC_ISLE, @function .size lj_BC_ISLE, 72 lj_BC_ISLE: .byte 129,124,202,4,255,255,254,255,15,131,180,28,0,0,129,124 .byte 194,4,255,255,254,255,15,131,166,28,0,0,242,15,16,4 .byte 194,131,195,4,102,15,46,4,202,114,11,15,183,67,254,141 .byte 156,131,0,0,254,255,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238 .globl lj_BC_ISGT .hidden lj_BC_ISGT .type lj_BC_ISGT, @function .size lj_BC_ISGT, 72 lj_BC_ISGT: .byte 129,124,202,4,255,255,254,255,15,131,108,28,0,0,129,124 .byte 194,4,255,255,254,255,15,131,94,28,0,0,242,15,16,4 .byte 194,131,195,4,102,15,46,4,202,115,11,15,183,67,254,141 .byte 156,131,0,0,254,255,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238 .globl lj_BC_ISEQV .hidden lj_BC_ISEQV .type lj_BC_ISEQV, @function .size lj_BC_ISEQV, 139 lj_BC_ISEQV: .byte 139,108,194,4,131,195,4,129,253,255,255,254,255,115,53,129 .byte 124,202,4,255,255,254,255,115,43,242,15,16,4,202,102,15 .byte 46,4,194,122,13,117,11,15,183,67,254,141,156,131,0,0 .byte 254,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238,131,253,245,15,132,93,28,0,0,131,124,202 .byte 4,245,15,132,82,28,0,0,57,108,202,4,117,212,131,253 .byte 253,115,196,139,12,202,139,4,194,57,193,116,186,131,253,244 .byte 119,192,131,253,243,114,187,139,105,16,133,237,116,180,246,69 .byte 6,16,117,174,49,237,233,2,28,0,0 .globl lj_BC_ISNEV .hidden lj_BC_ISNEV .type lj_BC_ISNEV, @function .size lj_BC_ISNEV, 142 lj_BC_ISNEV: .byte 139,108,194,4,131,195,4,129,253,255,255,254,255,115,53,129 .byte 124,202,4,255,255,254,255,115,43,242,15,16,4,202,102,15 .byte 46,4,194,122,2,116,11,15,183,67,254,141,156,131,0,0 .byte 254,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238,131,253,245,15,132,210,27,0,0,131,124,202 .byte 4,245,15,132,199,27,0,0,57,108,202,4,117,201,131,253 .byte 253,115,207,139,12,202,139,4,194,57,193,116,197,131,253,244 .byte 119,181,131,253,243,114,176,139,105,16,133,237,116,169,246,69 .byte 6,16,117,163,189,1,0,0,0,233,116,27,0,0 .globl lj_BC_ISEQS .hidden lj_BC_ISEQS .type lj_BC_ISEQS, @function .size lj_BC_ISEQS, 63 lj_BC_ISEQS: .byte 72,247,208,139,108,202,4,131,195,4,131,253,251,117,38,139 .byte 12,202,65,59,12,135,117,11,15,183,67,254,141,156,131,0 .byte 0,254,255,139,3,15,182,204,15,182,232,131,195,4,193,232 .byte 16,65,255,36,238,131,253,245,117,233,233,82,27,0,0 .globl lj_BC_ISNES .hidden lj_BC_ISNES .type lj_BC_ISNES, @function .size lj_BC_ISNES, 63 lj_BC_ISNES: .byte 72,247,208,139,108,202,4,131,195,4,131,253,251,117,38,139 .byte 12,202,65,59,12,135,116,11,15,183,67,254,141,156,131,0 .byte 0,254,255,139,3,15,182,204,15,182,232,131,195,4,193,232 .byte 16,65,255,36,238,131,253,245,117,222,233,19,27,0,0 .globl lj_BC_ISEQN .hidden lj_BC_ISEQN .type lj_BC_ISEQN, @function .size lj_BC_ISEQN, 69 lj_BC_ISEQN: .byte 139,108,202,4,131,195,4,129,253,255,255,254,255,115,44,242 .byte 65,15,16,4,199,102,15,46,4,202,122,13,117,11,15,183 .byte 67,254,141,156,131,0,0,254,255,139,3,15,182,204,15,182 .byte 232,131,195,4,193,232,16,65,255,36,238,131,253,245,117,233 .byte 233,206,26,0,0 .globl lj_BC_ISNEN .hidden lj_BC_ISNEN .type lj_BC_ISNEN, @function .size lj_BC_ISNEN, 69 lj_BC_ISNEN: .byte 139,108,202,4,131,195,4,129,253,255,255,254,255,115,44,242 .byte 65,15,16,4,199,102,15,46,4,202,122,2,116,11,15,183 .byte 67,254,141,156,131,0,0,254,255,139,3,15,182,204,15,182 .byte 232,131,195,4,193,232,16,65,255,36,238,131,253,245,117,222 .byte 233,137,26,0,0 .globl lj_BC_ISEQP .hidden lj_BC_ISEQP .type lj_BC_ISEQP, @function .size lj_BC_ISEQP, 53 lj_BC_ISEQP: .byte 72,247,208,139,108,202,4,131,195,4,57,197,117,29,15,183 .byte 67,254,141,156,131,0,0,254,255,139,3,15,182,204,15,182 .byte 232,131,195,4,193,232,16,65,255,36,238,131,253,245,117,233 .byte 233,84,26,0,0 .globl lj_BC_ISNEP .hidden lj_BC_ISNEP .type lj_BC_ISNEP, @function .size lj_BC_ISNEP, 52 lj_BC_ISNEP: .byte 72,247,208,139,108,202,4,131,195,4,57,197,116,20,131,253 .byte 245,15,132,61,26,0,0,15,183,67,254,141,156,131,0,0 .byte 254,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238 .globl lj_BC_ISTC .hidden lj_BC_ISTC .type lj_BC_ISTC, @function .size lj_BC_ISTC, 51 lj_BC_ISTC: .byte 139,108,194,4,131,195,4,131,253,254,115,21,137,108,202,4 .byte 139,44,194,137,44,202,15,183,67,254,141,156,131,0,0,254 .byte 255,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238 .globl lj_BC_ISFC .hidden lj_BC_ISFC .type lj_BC_ISFC, @function .size lj_BC_ISFC, 51 lj_BC_ISFC: .byte 139,108,194,4,131,195,4,131,253,254,114,21,137,108,202,4 .byte 139,44,194,137,44,202,15,183,67,254,141,156,131,0,0,254 .byte 255,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238 .globl lj_BC_IST .hidden lj_BC_IST .type lj_BC_IST, @function .size lj_BC_IST, 41 lj_BC_IST: .byte 139,108,194,4,131,195,4,131,253,254,115,11,15,183,67,254 .byte 141,156,131,0,0,254,255,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,65,255,36,238 .globl lj_BC_ISF .hidden lj_BC_ISF .type lj_BC_ISF, @function .size lj_BC_ISF, 41 lj_BC_ISF: .byte 139,108,194,4,131,195,4,131,253,254,114,11,15,183,67,254 .byte 141,156,131,0,0,254,255,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,65,255,36,238 .globl lj_BC_MOV .hidden lj_BC_MOV .type lj_BC_MOV, @function .size lj_BC_MOV, 26 lj_BC_MOV: .byte 72,139,44,194,72,137,44,202,139,3,15,182,204,15,182,232 .byte 131,195,4,193,232,16,65,255,36,238 .globl lj_BC_NOT .hidden lj_BC_NOT .type lj_BC_NOT, @function .size lj_BC_NOT, 32 lj_BC_NOT: .byte 49,237,131,124,194,4,254,131,213,253,137,108,202,4,139,3 .byte 15,182,204,15,182,232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_UNM .hidden lj_BC_UNM .type lj_BC_UNM, @function .size lj_BC_UNM, 60 lj_BC_UNM: .byte 129,124,194,4,255,255,254,255,15,131,74,25,0,0,242,15 .byte 16,4,194,72,184,0,0,0,0,0,0,0,128,102,72,15 .byte 110,200,15,87,193,242,15,17,4,202,139,3,15,182,204,15 .byte 182,232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_LEN .hidden lj_BC_LEN .type lj_BC_LEN, @function .size lj_BC_LEN, 74 lj_BC_LEN: .byte 131,124,194,4,251,117,34,139,4,194,15,87,192,242,15,42 .byte 64,12,242,15,17,4,202,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,65,255,36,238,131,124,194,4,244,15,133 .byte 52,25,0,0,139,60,194,137,213,232 .long lj_tab_len-.-4 .byte 242,15,42,192,137,234,15,182,75,253,235,200 .globl lj_BC_ADDVN .hidden lj_BC_ADDVN .type lj_BC_ADDVN, @function .size lj_BC_ADDVN, 54 lj_BC_ADDVN: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 174,24,0,0,242,15,16,4,234,242,65,15,88,4,199,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_SUBVN .hidden lj_BC_SUBVN .type lj_BC_SUBVN, @function .size lj_BC_SUBVN, 54 lj_BC_SUBVN: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 120,24,0,0,242,15,16,4,234,242,65,15,92,4,199,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_MULVN .hidden lj_BC_MULVN .type lj_BC_MULVN, @function .size lj_BC_MULVN, 54 lj_BC_MULVN: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 66,24,0,0,242,15,16,4,234,242,65,15,89,4,199,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_DIVVN .hidden lj_BC_DIVVN .type lj_BC_DIVVN, @function .size lj_BC_DIVVN, 54 lj_BC_DIVVN: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 12,24,0,0,242,15,16,4,234,242,65,15,94,4,199,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_MODVN .hidden lj_BC_MODVN .type lj_BC_MODVN, @function .size lj_BC_MODVN, 59 lj_BC_MODVN: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 214,23,0,0,242,15,16,4,234,242,65,15,16,12,199,232 .byte 239,46,0,0,242,15,17,4,202,139,3,15,182,204,15,182 .byte 232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_ADDNV .hidden lj_BC_ADDNV .type lj_BC_ADDNV, @function .size lj_BC_ADDNV, 54 lj_BC_ADDNV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 161,23,0,0,242,65,15,16,4,199,242,15,88,4,234,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_SUBNV .hidden lj_BC_SUBNV .type lj_BC_SUBNV, @function .size lj_BC_SUBNV, 54 lj_BC_SUBNV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 107,23,0,0,242,65,15,16,4,199,242,15,92,4,234,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_MULNV .hidden lj_BC_MULNV .type lj_BC_MULNV, @function .size lj_BC_MULNV, 54 lj_BC_MULNV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 53,23,0,0,242,65,15,16,4,199,242,15,89,4,234,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_DIVNV .hidden lj_BC_DIVNV .type lj_BC_DIVNV, @function .size lj_BC_DIVNV, 54 lj_BC_DIVNV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 255,22,0,0,242,65,15,16,4,199,242,15,94,4,234,242 .byte 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_MODNV .hidden lj_BC_MODNV .type lj_BC_MODNV, @function .size lj_BC_MODNV, 36 lj_BC_MODNV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 201,22,0,0,242,65,15,16,4,199,242,15,16,12,234,233 .byte 232,254,255,255 .globl lj_BC_ADDVV .hidden lj_BC_ADDVV .type lj_BC_ADDVV, @function .size lj_BC_ADDVV, 67 lj_BC_ADDVV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 182,22,0,0,129,124,194,4,255,255,254,255,15,131,168,22 .byte 0,0,242,15,16,4,234,242,15,88,4,194,242,15,17,4 .byte 202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238 .globl lj_BC_SUBVV .hidden lj_BC_SUBVV .type lj_BC_SUBVV, @function .size lj_BC_SUBVV, 67 lj_BC_SUBVV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 115,22,0,0,129,124,194,4,255,255,254,255,15,131,101,22 .byte 0,0,242,15,16,4,234,242,15,92,4,194,242,15,17,4 .byte 202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238 .globl lj_BC_MULVV .hidden lj_BC_MULVV .type lj_BC_MULVV, @function .size lj_BC_MULVV, 67 lj_BC_MULVV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 48,22,0,0,129,124,194,4,255,255,254,255,15,131,34,22 .byte 0,0,242,15,16,4,234,242,15,89,4,194,242,15,17,4 .byte 202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238 .globl lj_BC_DIVVV .hidden lj_BC_DIVVV .type lj_BC_DIVVV, @function .size lj_BC_DIVVV, 67 lj_BC_DIVVV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 237,21,0,0,129,124,194,4,255,255,254,255,15,131,223,21 .byte 0,0,242,15,16,4,234,242,15,94,4,194,242,15,17,4 .byte 202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238 .globl lj_BC_MODVV .hidden lj_BC_MODVV .type lj_BC_MODVV, @function .size lj_BC_MODVV, 49 lj_BC_MODVV: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 170,21,0,0,129,124,194,4,255,255,254,255,15,131,156,21 .byte 0,0,242,15,16,4,234,242,15,16,12,194,233,171,253,255 .byte 255 .globl lj_BC_POW .hidden lj_BC_POW .type lj_BC_POW, @function .size lj_BC_POW, 72 lj_BC_POW: .byte 15,182,236,15,182,192,129,124,234,4,255,255,254,255,15,131 .byte 121,21,0,0,129,124,194,4,255,255,254,255,15,131,107,21 .byte 0,0,242,15,16,4,234,242,15,16,12,194,232,49,45,0 .byte 0,242,15,17,4,202,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238 .globl lj_BC_CAT .hidden lj_BC_CAT .type lj_BC_CAT, @function .size lj_BC_CAT, 76 lj_BC_CAT: .byte 15,182,236,15,182,192,139,124,36,24,137,87,16,141,52,194 .byte 137,194,41,234,137,253,137,92,36,28,232 .long lj_meta_cat-.-4 .byte 139,85,16,133,192,15,133,76,21,0,0,15,182,107,255,15 .byte 182,75,253,72,139,4,234,72,137,4,202,139,3,15,182,204 .byte 15,182,232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_KSTR .hidden lj_BC_KSTR .type lj_BC_KSTR, @function .size lj_BC_KSTR, 36 lj_BC_KSTR: .byte 72,247,208,65,139,4,135,199,68,202,4,251,255,255,255,137 .byte 4,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238 .globl lj_BC_KCDATA .hidden lj_BC_KCDATA .type lj_BC_KCDATA, @function .size lj_BC_KCDATA, 36 lj_BC_KCDATA: .byte 72,247,208,65,139,4,135,199,68,202,4,245,255,255,255,137 .byte 4,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238 .globl lj_BC_KSHORT .hidden lj_BC_KSHORT .type lj_BC_KSHORT, @function .size lj_BC_KSHORT, 30 lj_BC_KSHORT: .byte 15,191,192,242,15,42,192,242,15,17,4,202,139,3,15,182 .byte 204,15,182,232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_KNUM .hidden lj_BC_KNUM .type lj_BC_KNUM, @function .size lj_BC_KNUM, 29 lj_BC_KNUM: .byte 242,65,15,16,4,199,242,15,17,4,202,139,3,15,182,204 .byte 15,182,232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_KPRI .hidden lj_BC_KPRI .type lj_BC_KPRI, @function .size lj_BC_KPRI, 25 lj_BC_KPRI: .byte 72,247,208,137,68,202,4,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,65,255,36,238 .globl lj_BC_KNIL .hidden lj_BC_KNIL .type lj_BC_KNIL, @function .size lj_BC_KNIL, 43 lj_BC_KNIL: .byte 141,76,202,12,141,68,194,4,189,255,255,255,255,137,105,248 .byte 137,41,131,193,8,57,193,118,247,139,3,15,182,204,15,182 .byte 232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_UGET .hidden lj_BC_UGET .type lj_BC_UGET, @function .size lj_BC_UGET, 36 lj_BC_UGET: .byte 139,106,248,139,108,133,20,139,109,16,72,139,69,0,72,137 .byte 4,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238 .globl lj_BC_USETV .hidden lj_BC_USETV .type lj_BC_USETV, @function .size lj_BC_USETV, 90 lj_BC_USETV: .byte 139,106,248,139,108,141,20,128,125,6,0,139,109,16,139,12 .byte 194,139,68,194,4,137,77,0,137,69,4,116,6,246,69,252 .byte 4,117,18,139,3,15,182,204,15,182,232,131,195,4,193,232 .byte 16,65,255,36,238,131,232,252,129,248,3,0,255,255,118,227 .byte 246,65,4,3,116,221,137,238,137,213,65,141,190,80,244,255 .byte 255,232 .long lj_gc_barrieruv-.-4 .byte 137,234,235,201 .globl lj_BC_USETS .hidden lj_BC_USETS .type lj_BC_USETS, @function .size lj_BC_USETS, 82 lj_BC_USETS: .byte 72,247,208,139,106,248,139,108,141,20,65,139,12,135,139,69 .byte 16,137,8,199,64,4,251,255,255,255,246,69,4,4,117,18 .byte 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,255 .byte 36,238,246,65,4,3,116,232,128,125,6,0,116,226,137,213 .byte 137,198,65,141,190,80,244,255,255,232 .long lj_gc_barrieruv-.-4 .byte 137,234,235,206 .globl lj_BC_USETN .hidden lj_BC_USETN .type lj_BC_USETN, @function .size lj_BC_USETN, 38 lj_BC_USETN: .byte 139,106,248,242,65,15,16,4,199,139,108,141,20,139,77,16 .byte 242,15,17,1,139,3,15,182,204,15,182,232,131,195,4,193 .byte 232,16,65,255,36,238 .globl lj_BC_USETP .hidden lj_BC_USETP .type lj_BC_USETP, @function .size lj_BC_USETP, 34 lj_BC_USETP: .byte 72,247,208,139,106,248,139,108,141,20,139,77,16,137,65,4 .byte 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,255 .byte 36,238 .globl lj_BC_UCLO .hidden lj_BC_UCLO .type lj_BC_UCLO, @function .size lj_BC_UCLO, 51 lj_BC_UCLO: .byte 141,156,131,0,0,254,255,139,108,36,24,131,125,40,0,116 .byte 16,137,85,16,141,52,202,137,239,232 .long lj_func_closeuv-.-4 .byte 139,85,16,139,3,15,182,204,15,182,232,131,195,4,193,232 .byte 16,65,255,36,238 .globl lj_BC_FNEW .hidden lj_BC_FNEW .type lj_BC_FNEW, @function .size lj_BC_FNEW, 64 lj_BC_FNEW: .byte 72,247,208,139,108,36,24,137,85,16,139,82,248,65,139,52 .byte 135,137,239,137,92,36,28,232 .long lj_func_newL_gc-.-4 .byte 139,85,16,15,182,75,253,137,4,202,199,68,202,4,247,255 .byte 255,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238 .globl lj_BC_TNEW .hidden lj_BC_TNEW .type lj_BC_TNEW, @function .size lj_BC_TNEW, 109 lj_BC_TNEW: .byte 139,108,36,24,137,85,16,65,139,142,112,244,255,255,65,59 .byte 142,116,244,255,255,137,92,36,28,115,69,137,194,37,255,7 .byte 0,0,193,234,11,61,255,7,0,0,116,45,137,239,137,198 .byte 232 .long lj_tab_new-.-4 .byte 139,85,16,15,182,75,253,137,4,202,199,68,202,4,244,255 .byte 255,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238,184,1,8,0,0,235,204,137,239,232 .long lj_gc_step_fixtop-.-4 .byte 15,183,67,254,235,174 .globl lj_BC_TDUP .hidden lj_BC_TDUP .type lj_BC_TDUP, @function .size lj_BC_TDUP, 93 lj_BC_TDUP: .byte 72,247,208,139,108,36,24,65,139,142,112,244,255,255,137,92 .byte 36,28,65,59,142,116,244,255,255,137,85,16,115,47,65,139 .byte 52,135,137,239,232 .long lj_tab_dup-.-4 .byte 139,85,16,15,182,75,253,137,4,202,199,68,202,4,244,255 .byte 255,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16 .byte 65,255,36,238,137,239,232 .long lj_gc_step_fixtop-.-4 .byte 15,183,67,254,72,247,208,235,193 .globl lj_BC_GGET .hidden lj_BC_GGET .type lj_BC_GGET, @function .size lj_BC_GGET, 18 lj_BC_GGET: .byte 72,247,208,139,106,248,139,109,8,65,139,4,135,233,193,0 .byte 0,0 .globl lj_BC_GSET .hidden lj_BC_GSET .type lj_BC_GSET, @function .size lj_BC_GSET, 18 lj_BC_GSET: .byte 72,247,208,139,106,248,139,109,8,65,139,4,135,233,59,2 .byte 0,0 .globl lj_BC_TGETV .hidden lj_BC_TGETV .type lj_BC_TGETV, @function .size lj_BC_TGETV, 148 lj_BC_TGETV: .byte 15,182,236,15,182,192,131,124,234,4,244,15,133,245,15,0 .byte 0,139,44,234,129,124,194,4,255,255,254,255,115,102,242,15 .byte 16,4,194,242,15,45,192,242,15,42,200,102,15,46,193,15 .byte 133,209,15,0,0,59,69,24,15,131,200,15,0,0,193,224 .byte 3,3,69,8,131,120,4,255,116,25,72,139,40,72,137,44 .byte 202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238,131,125,16,0,116,17,139,77,16,246,65,6,1 .byte 15,132,144,15,0,0,15,182,75,253,199,68,202,4,255,255 .byte 255,255,235,205,131,124,194,4,251,15,133,119,15,0,0,139 .byte 4,194,235,27 .globl lj_BC_TGETS .hidden lj_BC_TGETS .type lj_BC_TGETS, @function .size lj_BC_TGETS, 124 lj_BC_TGETS: .byte 15,182,236,15,182,192,72,247,208,65,139,4,135,131,124,234 .byte 4,244,15,133,30,15,0,0,139,44,234,139,77,28,35,72 .byte 8,107,201,24,3,77,20,131,121,12,251,117,54,57,65,8 .byte 117,49,131,121,4,255,116,50,15,182,67,253,72,139,41,72 .byte 137,44,194,139,3,15,182,204,15,182,232,131,195,4,193,232 .byte 16,65,255,36,238,15,182,67,253,199,68,194,4,255,255,255 .byte 255,235,224,139,73,16,133,201,117,189,139,77,16,133,201,116 .byte 228,246,65,6,1,117,222,233,186,14,0,0 .globl lj_BC_TGETB .hidden lj_BC_TGETB .type lj_BC_TGETB, @function .size lj_BC_TGETB, 99 lj_BC_TGETB: .byte 15,182,236,15,182,192,131,124,234,4,244,15,133,210,14,0 .byte 0,139,44,234,59,69,24,15,131,198,14,0,0,193,224,3 .byte 3,69,8,131,120,4,255,116,25,72,139,40,72,137,44,202 .byte 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,255 .byte 36,238,131,125,16,0,116,17,139,77,16,246,65,6,1,15 .byte 132,142,14,0,0,15,182,75,253,199,68,202,4,255,255,255 .byte 255,235,205 .globl lj_BC_TSETV .hidden lj_BC_TSETV .type lj_BC_TSETV, @function .size lj_BC_TSETV, 173 lj_BC_TSETV: .byte 15,182,236,15,182,192,131,124,234,4,244,15,133,31,15,0 .byte 0,139,44,234,129,124,194,4,255,255,254,255,115,100,242,15 .byte 16,4,194,242,15,45,192,242,15,42,200,102,15,46,193,15 .byte 133,251,14,0,0,59,69,24,15,131,242,14,0,0,193,224 .byte 3,3,69,8,131,120,4,255,116,31,246,69,4,4,117,66 .byte 72,139,44,202,72,137,40,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,65,255,36,238,131,125,16,0,116,219,139 .byte 77,16,246,65,6,2,15,132,180,14,0,0,15,182,75,253 .byte 235,200,131,124,194,4,251,15,133,163,14,0,0,139,4,194 .byte 235,54,128,101,4,251,65,139,142,140,244,255,255,65,137,174 .byte 140,244,255,255,137,77,12,15,182,75,253,235,163 .globl lj_BC_TSETS .hidden lj_BC_TSETS .type lj_BC_TSETS, @function .size lj_BC_TSETS, 229 lj_BC_TSETS: .byte 15,182,236,15,182,192,72,247,208,65,139,4,135,131,124,234 .byte 4,244,15,133,47,14,0,0,139,44,234,139,77,28,35,72 .byte 8,107,201,24,198,69,6,0,3,77,20,131,121,12,251,117 .byte 77,57,65,8,117,72,131,121,4,255,116,39,246,69,4,4 .byte 15,133,133,0,0,0,15,182,67,253,72,139,44,194,72,137 .byte 41,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238,131,125,16,0,116,211,137,12,36,139,77,16,246 .byte 65,6,2,15,132,206,13,0,0,139,12,36,235,190,139,73 .byte 16,133,201,117,166,139,77,16,133,201,116,10,246,65,6,2 .byte 15,132,177,13,0,0,137,4,36,199,68,36,4,251,255,255 .byte 255,137,108,36,8,139,124,36,24,137,87,16,72,141,20,36 .byte 137,238,137,253,137,92,36,28,232 .long lj_tab_newkey-.-4 .byte 139,85,16,139,108,36,8,137,193,233,113,255,255,255,128,101 .byte 4,251,65,139,134,140,244,255,255,65,137,174,140,244,255,255 .byte 137,69,12,233,97,255,255,255 .globl lj_BC_TSETB .hidden lj_BC_TSETB .type lj_BC_TSETB, @function .size lj_BC_TSETB, 124 lj_BC_TSETB: .byte 15,182,236,15,182,192,131,124,234,4,244,15,133,122,13,0 .byte 0,139,44,234,59,69,24,15,131,110,13,0,0,193,224,3 .byte 3,69,8,131,120,4,255,116,31,246,69,4,4,117,50,72 .byte 139,12,202,72,137,8,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238,131,125,16,0,116,219,139,77 .byte 16,246,65,6,2,15,132,48,13,0,0,15,182,75,253,235 .byte 200,128,101,4,251,65,139,142,140,244,255,255,65,137,174,140 .byte 244,255,255,137,77,12,15,182,75,253,235,179 .globl lj_BC_TSETM .hidden lj_BC_TSETM .type lj_BC_TSETM, @function .size lj_BC_TSETM, 142 lj_BC_TSETM: .byte 68,137,60,36,69,139,60,199,141,12,202,139,105,248,246,69 .byte 4,4,117,99,139,68,36,4,131,232,1,116,37,68,1,248 .byte 59,69,24,119,51,68,41,248,65,193,231,3,68,3,125,8 .byte 72,139,41,131,193,8,73,137,47,65,131,199,8,131,232,1 .byte 117,238,68,139,60,36,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238,139,124,36,24,137,87,16,137 .byte 238,137,194,137,253,137,92,36,28,232 .long lj_tab_reasize-.-4 .byte 139,85,16,15,182,75,253,235,145,128,101,4,251,65,139,134 .byte 140,244,255,255,65,137,174,140,244,255,255,137,69,12,235,134 .globl lj_BC_CALLM .hidden lj_BC_CALLM .type lj_BC_CALLM, @function .size lj_BC_CALLM, 46 lj_BC_CALLM: .byte 15,182,192,3,68,36,4,131,124,202,4,247,139,44,202,15 .byte 133,244,13,0,0,141,84,202,8,137,90,252,139,93,16,139 .byte 11,15,182,233,15,182,205,131,195,4,65,255,36,238 .globl lj_BC_CALL .hidden lj_BC_CALL .type lj_BC_CALL, @function .size lj_BC_CALL, 42 lj_BC_CALL: .byte 15,182,192,131,124,202,4,247,139,44,202,15,133,202,13,0 .byte 0,141,84,202,8,137,90,252,139,93,16,139,11,15,182,233 .byte 15,182,205,131,195,4,65,255,36,238 .globl lj_BC_CALLMT .hidden lj_BC_CALLMT .type lj_BC_CALLMT, @function .size lj_BC_CALLMT, 4 lj_BC_CALLMT: .byte 3,68,36,4 .globl lj_BC_CALLT .hidden lj_BC_CALLT .type lj_BC_CALLT, @function .size lj_BC_CALLT, 150 lj_BC_CALLT: .byte 141,76,202,8,65,137,215,139,105,248,131,121,252,247,15,133 .byte 157,13,0,0,139,90,252,247,195,3,0,0,0,117,93,137 .byte 106,248,137,68,36,4,131,232,1,116,21,72,139,41,131,193 .byte 8,73,137,47,65,131,199,8,131,232,1,117,238,139,106,248 .byte 139,68,36,4,128,125,6,1,119,18,139,93,16,139,11,15 .byte 182,233,15,182,205,131,195,4,65,255,36,238,247,195,3,0 .byte 0,0,117,230,15,182,75,253,72,247,209,141,12,202,68,139 .byte 121,248,69,139,127,16,69,139,127,208,235,206,131,235,3,247 .byte 195,7,0,0,0,117,10,41,218,65,137,215,139,90,252,235 .byte 142,131,195,3,235,137 .globl lj_BC_ITERC .hidden lj_BC_ITERC .type lj_BC_ITERC, @function .size lj_BC_ITERC, 68 lj_BC_ITERC: .byte 141,76,202,8,72,139,105,232,72,139,65,240,72,137,41,72 .byte 137,65,8,139,105,224,139,65,228,137,105,248,137,65,252,131 .byte 248,247,184,3,0,0,0,15,133,238,12,0,0,137,202,137 .byte 90,252,139,93,16,139,11,15,182,233,15,182,205,131,195,4 .byte 65,255,36,238 .globl lj_BC_ITERN .hidden lj_BC_ITERN .type lj_BC_ITERN, @function .size lj_BC_ITERN, 165 lj_BC_ITERN: .byte 68,137,60,36,68,137,116,36,4,139,108,202,240,139,68,202 .byte 248,68,139,117,24,131,195,4,68,139,125,8,68,57,240,115 .byte 76,65,131,124,199,4,255,116,63,242,15,42,192,73,139,44 .byte 199,72,137,108,202,8,131,192,1,242,15,17,4,202,137,68 .byte 202,248,15,183,67,254,141,156,131,0,0,254,255,68,139,116 .byte 36,4,68,139,60,36,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238,131,192,1,235,175,68,41,240 .byte 59,69,28,119,216,68,107,248,24,68,3,125,20,65,131,127 .byte 4,255,116,28,70,141,116,48,1,73,139,111,8,73,139,7 .byte 72,137,44,202,72,137,68,202,8,68,137,116,202,248,235,162 .byte 131,192,1,235,203 .globl lj_BC_VARG .hidden lj_BC_VARG .type lj_BC_VARG, @function .size lj_BC_VARG, 191 lj_BC_VARG: .byte 15,182,236,15,182,192,68,137,60,36,68,141,124,194,11,141 .byte 12,202,68,43,122,252,133,237,116,68,141,108,233,248,65,57 .byte 215,115,23,73,139,71,248,65,131,199,8,72,137,1,131,193 .byte 8,57,233,115,19,65,57,215,114,233,199,65,4,255,255,255 .byte 255,131,193,8,57,233,114,242,68,139,60,36,139,3,15,182 .byte 204,15,182,232,131,195,4,193,232,16,65,255,36,238,199,68 .byte 36,4,1,0,0,0,137,208,68,41,248,118,219,137,197,193 .byte 237,3,131,197,1,137,108,36,4,139,108,36,24,1,200,59 .byte 69,32,119,21,73,139,71,248,65,131,199,8,72,137,1,131 .byte 193,8,65,57,215,114,237,235,175,137,85,16,137,77,24,137 .byte 92,36,28,65,41,215,139,116,36,4,131,238,1,137,239,232 .long lj_state_growstack-.-4 .byte 139,85,16,139,77,24,65,1,215,235,197 .globl lj_BC_ISNEXT .hidden lj_BC_ISNEXT .type lj_BC_ISNEXT, @function .size lj_BC_ISNEXT, 88 lj_BC_ISNEXT: .byte 131,124,202,236,247,117,65,139,108,202,232,131,124,202,244,244 .byte 117,54,131,124,202,252,255,117,47,128,125,6,4,117,41,141 .byte 156,131,0,0,254,255,199,68,202,248,0,0,0,0,199,68 .byte 202,252,255,127,254,255,139,3,15,182,204,15,182,232,131,195 .byte 4,193,232,16,65,255,36,238,198,67,252,84,141,156,131,0 .byte 0,254,255,198,3,65,235,222 .globl lj_BC_RETM .hidden lj_BC_RETM .type lj_BC_RETM, @function .size lj_BC_RETM, 4 lj_BC_RETM: .byte 3,68,36,4 .globl lj_BC_RET .hidden lj_BC_RET .type lj_BC_RET, @function .size lj_BC_RET, 136 lj_BC_RET: .byte 193,225,3,139,90,252,137,68,36,4,247,195,3,0,0,0 .byte 117,94,65,137,215,131,232,1,116,17,73,139,44,15,73,137 .byte 111,248,65,131,199,8,131,232,1,117,239,139,68,36,4,15 .byte 182,107,255,57,197,119,40,15,182,75,253,72,247,209,141,20 .byte 202,68,139,122,248,69,139,127,16,69,139,127,208,139,3,15 .byte 182,204,15,182,232,131,195,4,193,232,16,65,255,36,238,65 .byte 199,71,252,255,255,255,255,65,131,199,8,131,192,1,235,195 .byte 141,107,253,247,197,7,0,0,0,15,133,36,5,0,0,41 .byte 234,1,233,233,123,255,255,255 .globl lj_BC_RET0 .hidden lj_BC_RET0 .type lj_BC_RET0, @function .size lj_BC_RET0, 92 lj_BC_RET0: .byte 139,90,252,137,68,36,4,247,195,3,0,0,0,117,58,56 .byte 67,255,119,40,15,182,75,253,72,247,209,141,20,202,68,139 .byte 122,248,69,139,127,16,69,139,127,208,139,3,15,182,204,15 .byte 182,232,131,195,4,193,232,16,65,255,36,238,199,68,194,244 .byte 255,255,255,255,131,192,1,235,198,141,107,253,247,197,7,0 .byte 0,0,15,133,195,4,0,0,41,234,235,164 .globl lj_BC_RET1 .hidden lj_BC_RET1 .type lj_BC_RET1, @function .size lj_BC_RET1, 105 lj_BC_RET1: .byte 193,225,3,139,90,252,137,68,36,4,247,195,3,0,0,0 .byte 117,66,72,139,44,10,72,137,106,248,56,67,255,119,40,15 .byte 182,75,253,72,247,209,141,20,202,68,139,122,248,69,139,127 .byte 16,69,139,127,208,139,3,15,182,204,15,182,232,131,195,4 .byte 193,232,16,65,255,36,238,199,68,194,244,255,255,255,255,131 .byte 192,1,235,198,141,107,253,247,197,7,0,0,0,15,133,92 .byte 4,0,0,41,234,1,233,235,154 .globl lj_BC_FORI .hidden lj_BC_FORI .type lj_BC_FORI, @function .size lj_BC_FORI, 97 lj_BC_FORI: .byte 141,12,202,129,121,4,255,255,254,255,15,131,11,10,0,0 .byte 129,121,12,255,255,254,255,15,131,254,9,0,0,139,105,20 .byte 129,253,255,255,254,255,15,131,239,9,0,0,242,15,16,1 .byte 242,15,16,73,8,124,36,102,15,46,200,242,15,17,65,24 .byte 115,7,141,156,131,0,0,254,255,139,3,15,182,204,15,182 .byte 232,131,195,4,193,232,16,65,255,36,238,102,15,46,193,235 .byte 218 .globl lj_BC_JFORI .hidden lj_BC_JFORI .type lj_BC_JFORI, @function .size lj_BC_JFORI, 105 lj_BC_JFORI: .byte 141,12,202,129,121,4,255,255,254,255,15,131,170,9,0,0 .byte 129,121,12,255,255,254,255,15,131,157,9,0,0,139,105,20 .byte 129,253,255,255,254,255,15,131,142,9,0,0,242,15,16,1 .byte 242,15,16,73,8,124,44,102,15,46,200,242,15,17,65,24 .byte 141,156,131,0,0,254,255,15,183,67,254,15,131,118,1,0 .byte 0,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65 .byte 255,36,238,102,15,46,193,235,210 .globl lj_BC_FORL .hidden lj_BC_FORL .type lj_BC_FORL, @function .size lj_BC_FORL, 20 lj_BC_FORL: .byte 137,221,209,237,131,229,126,102,65,131,108,46,128,2,15,130 .byte 184,28,0,0 .globl lj_BC_IFORL .hidden lj_BC_IFORL .type lj_BC_IFORL, @function .size lj_BC_IFORL, 96 lj_BC_IFORL: .byte 141,12,202,129,121,12,255,255,254,255,15,131,219,34,0,0 .byte 129,121,20,255,255,254,255,15,131,206,34,0,0,139,105,20 .byte 242,15,16,1,242,15,16,73,8,242,15,88,65,16,242,15 .byte 17,1,133,237,120,36,102,15,46,200,242,15,17,65,24,114 .byte 7,141,156,131,0,0,254,255,139,3,15,182,204,15,182,232 .byte 131,195,4,193,232,16,65,255,36,238,102,15,46,193,235,218 .globl lj_BC_JFORL .hidden lj_BC_JFORL .type lj_BC_JFORL, @function .size lj_BC_JFORL, 93 lj_BC_JFORL: .byte 141,12,202,129,121,12,255,255,254,255,15,131,123,34,0,0 .byte 129,121,20,255,255,254,255,15,131,110,34,0,0,139,105,20 .byte 242,15,16,1,242,15,16,73,8,242,15,88,65,16,242,15 .byte 17,1,133,237,120,33,102,15,46,200,242,15,17,65,24,15 .byte 131,165,0,0,0,139,3,15,182,204,15,182,232,131,195,4 .byte 193,232,16,65,255,36,238,102,15,46,193,235,221 .globl lj_BC_ITERL .hidden lj_BC_ITERL .type lj_BC_ITERL, @function .size lj_BC_ITERL, 20 lj_BC_ITERL: .byte 137,221,209,237,131,229,126,102,65,131,108,46,128,2,15,130 .byte 231,27,0,0 .globl lj_BC_IITERL .hidden lj_BC_IITERL .type lj_BC_IITERL, @function .size lj_BC_IITERL, 44 lj_BC_IITERL: .byte 141,12,202,139,105,4,131,253,255,116,15,141,156,131,0,0 .byte 254,255,139,1,137,105,252,137,65,248,139,3,15,182,204,15 .byte 182,232,131,195,4,193,232,16,65,255,36,238 .globl lj_BC_JITERL .hidden lj_BC_JITERL .type lj_BC_JITERL, @function .size lj_BC_JITERL, 39 lj_BC_JITERL: .byte 141,12,202,139,105,4,131,253,255,116,10,137,105,252,139,41 .byte 137,105,248,235,56,139,3,15,182,204,15,182,232,131,195,4 .byte 193,232,16,65,255,36,238 .globl lj_BC_LOOP .hidden lj_BC_LOOP .type lj_BC_LOOP, @function .size lj_BC_LOOP, 20 lj_BC_LOOP: .byte 137,221,209,237,131,229,126,102,65,131,108,46,128,2,15,130 .byte 128,27,0,0 .globl lj_BC_ILOOP .hidden lj_BC_ILOOP .type lj_BC_ILOOP, @function .size lj_BC_ILOOP, 18 lj_BC_ILOOP: .byte 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,255 .byte 36,238 .globl lj_BC_JLOOP .hidden lj_BC_JLOOP .type lj_BC_JLOOP, @function .size lj_BC_JLOOP, 47 lj_BC_JLOOP: .byte 65,139,142,24,247,255,255,139,4,129,72,139,64,64,139,108 .byte 36,24,65,137,150,72,245,255,255,65,137,174,68,245,255,255 .byte 76,137,36,36,76,137,108,36,8,72,131,236,16,255,224 .globl lj_BC_JMP .hidden lj_BC_JMP .type lj_BC_JMP, @function .size lj_BC_JMP, 25 lj_BC_JMP: .byte 141,156,131,0,0,254,255,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,65,255,36,238 .globl lj_BC_FUNCF .hidden lj_BC_FUNCF .type lj_BC_FUNCF, @function .size lj_BC_FUNCF, 20 lj_BC_FUNCF: .byte 137,221,209,237,131,229,126,102,65,131,108,46,128,1,15,130 .byte 74,27,0,0 .globl lj_BC_IFUNCF .hidden lj_BC_IFUNCF .type lj_BC_IFUNCF, @function .size lj_BC_IFUNCF, 63 lj_BC_IFUNCF: .byte 68,139,123,204,139,108,36,24,141,12,202,59,77,32,15,135 .byte 209,2,0,0,15,182,75,194,57,200,118,18,139,3,15,182 .byte 204,15,182,232,131,195,4,193,232,16,65,255,36,238,199,68 .byte 194,252,255,255,255,255,131,192,1,57,200,118,241,235,221 .globl lj_BC_JFUNCF .hidden lj_BC_JFUNCF .type lj_BC_JFUNCF, @function .size lj_BC_JFUNCF, 54 lj_BC_JFUNCF: .byte 68,139,123,204,139,108,36,24,141,12,202,59,77,32,15,135 .byte 146,2,0,0,15,182,75,194,57,200,118,9,15,183,67,254 .byte 233,64,255,255,255,199,68,194,252,255,255,255,255,131,192,1 .byte 57,200,118,241,235,230 .globl lj_BC_FUNCV .hidden lj_BC_FUNCV .type lj_BC_FUNCV, @function .size lj_BC_FUNCV, 0 lj_BC_FUNCV: .globl lj_BC_IFUNCV .hidden lj_BC_IFUNCV .type lj_BC_IFUNCV, @function .size lj_BC_IFUNCV, 125 lj_BC_IFUNCV: .byte 141,44,197,3,0,0,0,141,4,194,68,139,122,248,137,104 .byte 252,68,137,120,248,139,108,36,24,141,12,200,59,77,32,15 .byte 135,70,2,0,0,137,209,137,194,15,182,107,194,133,237,116 .byte 37,131,193,8,57,209,115,52,68,139,121,248,68,137,56,68 .byte 139,121,252,68,137,120,4,131,192,8,199,65,252,255,255,255 .byte 255,131,237,1,117,219,68,139,123,204,139,3,15,182,204,15 .byte 182,232,131,195,4,193,232,16,65,255,36,238,199,64,4,255 .byte 255,255,255,131,192,8,131,237,1,117,241,235,217 .globl lj_BC_JFUNCV .hidden lj_BC_JFUNCV .type lj_BC_JFUNCV, @function .size lj_BC_JFUNCV, 1 lj_BC_JFUNCV: .byte 204 .globl lj_BC_FUNCC .hidden lj_BC_FUNCC .type lj_BC_FUNCC, @function .size lj_BC_FUNCC, 79 lj_BC_FUNCC: .byte 139,106,248,76,139,125,24,139,108,36,24,141,68,194,248,137 .byte 85,16,141,136,160,0,0,0,59,77,32,137,69,24,137,239 .byte 15,135,192,1,0,0,65,199,134,56,245,255,255,254,255,255 .byte 255,65,255,215,65,199,134,56,245,255,255,255,255,255,255,139 .byte 85,16,141,12,194,247,217,3,77,24,139,90,252,235,119 .globl lj_BC_FUNCCW .hidden lj_BC_FUNCCW .type lj_BC_FUNCCW, @function .size lj_BC_FUNCCW, 86 lj_BC_FUNCCW: .byte 139,106,248,76,139,125,24,139,108,36,24,141,68,194,248,137 .byte 85,16,141,136,160,0,0,0,59,77,32,137,69,24,76,137 .byte 254,137,239,15,135,110,1,0,0,65,199,134,56,245,255,255 .byte 254,255,255,255,65,255,150,40,245,255,255,65,199,134,56,245 .byte 255,255,255,255,255,255,139,85,16,141,12,194,247,217,3,77 .byte 24,139,90,252,235,33 .globl lj_vm_returnp .hidden lj_vm_returnp .type lj_vm_returnp, @function .size lj_vm_returnp, 33 lj_vm_returnp: .byte 247,195,4,0,0,0,15,132,216,2,0,0,131,227,248,41 .byte 218,72,141,76,25,248,139,90,252,199,68,10,4,253,255,255 .byte 255 .globl lj_vm_returnc .hidden lj_vm_returnc .type lj_vm_returnc, @function .size lj_vm_returnc, 25 lj_vm_returnc: .byte 131,192,1,15,132,167,0,0,0,137,68,36,4,247,195,3 .byte 0,0,0,15,132,111,250,255,255 .globl lj_vm_return .hidden lj_vm_return .type lj_vm_return, @function .size lj_vm_return, 75 lj_vm_return: .byte 131,243,1,247,195,3,0,0,0,117,187,65,199,134,56,245 .byte 255,255,254,255,255,255,131,227,248,41,211,247,219,131,232,1 .byte 116,16,72,139,44,10,72,137,106,248,131,194,8,131,232,1 .byte 117,240,139,108,36,24,137,93,16,139,68,36,4,139,76,36 .byte 16,57,193,117,28,131,234,8,137,85,24 .globl lj_vm_leave_cp .hidden lj_vm_leave_cp .type lj_vm_leave_cp, @function .size lj_vm_leave_cp, 11 lj_vm_leave_cp: .byte 72,139,76,36,32,72,137,77,48,49,192 .globl lj_vm_leave_unw .hidden lj_vm_leave_unw .type lj_vm_leave_unw, @function .size lj_vm_leave_unw, 65 lj_vm_leave_unw: .byte 72,131,196,40,65,94,65,95,91,93,195,114,20,59,85,32 .byte 119,26,199,66,252,255,255,255,255,131,194,8,131,192,1,235 .byte 202,133,201,116,202,41,193,141,20,202,235,195,137,85,24,137 .byte 68,36,4,137,206,137,239,232 .long lj_state_growstack-.-4 .byte 139,85,24,235,162 .globl lj_vm_unwind_yield .hidden lj_vm_unwind_yield .type lj_vm_unwind_yield, @function .size lj_vm_unwind_yield, 4 lj_vm_unwind_yield: .byte 176,1,235,5 .globl lj_vm_unwind_c .hidden lj_vm_unwind_c .type lj_vm_unwind_c, @function .size lj_vm_unwind_c, 5 lj_vm_unwind_c: .byte 137,240,72,137,252 .globl lj_vm_unwind_c_eh .hidden lj_vm_unwind_c_eh .type lj_vm_unwind_c_eh, @function .size lj_vm_unwind_c_eh, 19 lj_vm_unwind_c_eh: .byte 139,108,36,24,139,109,8,199,133,232,0,0,0,254,255,255 .byte 255,235,163 .globl lj_vm_unwind_rethrow .hidden lj_vm_unwind_rethrow .type lj_vm_unwind_rethrow, @function .size lj_vm_unwind_rethrow, 21 lj_vm_unwind_rethrow: .byte 139,124,36,24,137,198,72,131,196,40,65,94,65,95,91,93 .byte 233 .long lj_err_throw-.-4 .globl lj_vm_unwind_ff .hidden lj_vm_unwind_ff .type lj_vm_unwind_ff, @function .size lj_vm_unwind_ff, 7 lj_vm_unwind_ff: .byte 72,131,231,252,72,137,252 .globl lj_vm_unwind_ff_eh .hidden lj_vm_unwind_ff_eh .type lj_vm_unwind_ff_eh, @function .size lj_vm_unwind_ff_eh, 56 lj_vm_unwind_ff_eh: .byte 139,108,36,24,72,199,193,248,255,255,255,184,2,0,0,0 .byte 139,85,16,68,139,117,8,65,129,198,176,11,0,0,139,90 .byte 252,199,66,252,254,255,255,255,65,199,134,56,245,255,255,255 .byte 255,255,255,233,224,254,255,255 .globl lj_vm_growstack_c .hidden lj_vm_growstack_c .type lj_vm_growstack_c, @function .size lj_vm_growstack_c, 7 lj_vm_growstack_c: .byte 190,20,0,0,0,235,28 .globl lj_vm_growstack_v .hidden lj_vm_growstack_v .type lj_vm_growstack_v, @function .size lj_vm_growstack_v, 5 lj_vm_growstack_v: .byte 131,232,8,235,4 .globl lj_vm_growstack_f .hidden lj_vm_growstack_f .type lj_vm_growstack_f, @function .size lj_vm_growstack_f, 65 lj_vm_growstack_f: .byte 141,68,194,248,15,182,75,195,131,195,4,137,85,16,137,69 .byte 24,137,92,36,28,137,206,137,239,232 .long lj_state_growstack-.-4 .byte 139,85,16,139,69,24,139,106,248,41,208,193,232,3,131,192 .byte 1,139,93,16,139,11,15,182,233,15,182,205,131,195,4,65 .byte 255,36,238 .globl lj_vm_resume .hidden lj_vm_resume .type lj_vm_resume, @function .size lj_vm_resume, 125 lj_vm_resume: .byte 85,83,65,87,65,86,72,131,236,40,137,253,137,124,36,24 .byte 137,241,187,5,0,0,0,49,192,76,141,124,36,1,68,139 .byte 117,8,65,129,198,176,11,0,0,76,137,125,48,137,68,36 .byte 28,72,137,68,36,32,137,68,36,16,137,68,36,20,56,69 .byte 7,15,132,130,0,0,0,65,199,134,56,245,255,255,255,255 .byte 255,255,136,69,7,139,85,16,139,69,24,41,200,193,232,3 .byte 131,192,1,41,209,139,90,252,137,68,36,4,247,195,3,0 .byte 0,0,15,132,163,248,255,255,233,47,254,255,255 .globl lj_vm_pcall .hidden lj_vm_pcall .type lj_vm_pcall, @function .size lj_vm_pcall, 21 lj_vm_pcall: .byte 85,83,65,87,65,86,72,131,236,40,187,5,0,0,0,137 .byte 76,36,20,235,15 .globl lj_vm_call .hidden lj_vm_call .type lj_vm_call, @function .size lj_vm_call, 84 lj_vm_call: .byte 85,83,65,87,65,86,72,131,236,40,187,1,0,0,0,137 .byte 84,36,16,137,253,137,124,36,24,137,241,76,139,125,48,76 .byte 137,124,36,32,137,108,36,28,72,137,101,48,68,139,117,8 .byte 65,129,198,176,11,0,0,65,199,134,56,245,255,255,255,255 .byte 255,255,139,85,16,1,203,41,211,139,69,24,41,200,193,232 .byte 3,131,192,1 .globl lj_vm_call_dispatch .hidden lj_vm_call_dispatch .type lj_vm_call_dispatch, @function .size lj_vm_call_dispatch, 13 lj_vm_call_dispatch: .byte 139,105,248,131,121,252,247,15,133,45,3,0,0 .globl lj_vm_call_dispatch_f .hidden lj_vm_call_dispatch_f .type lj_vm_call_dispatch_f, @function .size lj_vm_call_dispatch_f, 23 lj_vm_call_dispatch_f: .byte 137,202,137,90,252,139,93,16,139,11,15,182,233,15,182,205 .byte 131,195,4,65,255,36,238 .globl lj_vm_cpcall .hidden lj_vm_cpcall .type lj_vm_cpcall, @function .size lj_vm_cpcall, 76 lj_vm_cpcall: .byte 85,83,65,87,65,86,72,131,236,40,137,253,137,124,36,24 .byte 137,108,36,28,68,139,125,36,68,43,125,24,199,68,36,20 .byte 0,0,0,0,68,137,124,36,16,76,139,125,48,76,137,124 .byte 36,32,72,137,101,48,255,209,133,192,15,132,173,253,255,255 .byte 137,193,187,5,0,0,0,233,104,255,255,255 .globl lj_cont_dispatch .hidden lj_cont_dispatch .type lj_cont_dispatch, @function .size lj_cont_dispatch, 74 lj_cont_dispatch: .byte 1,209,131,227,248,137,213,41,218,199,68,193,252,255,255,255 .byte 255,137,200,139,93,244,72,99,77,240,131,249,1,118,24,76 .byte 141,61,70,228,255,255,76,1,249,68,139,122,248,69,139,127 .byte 16,69,139,127,208,255,225,15,132,65,29,0,0,41,213,193 .byte 237,3,141,69,255,233,101,21,0,0 .globl lj_cont_cat .hidden lj_cont_cat .type lj_cont_cat, @function .size lj_cont_cat, 46 lj_cont_cat: .byte 15,182,75,255,131,237,16,141,12,202,41,233,15,132,132,0 .byte 0,0,247,217,193,233,3,139,124,36,24,137,87,16,137,202 .byte 72,139,8,72,137,77,0,137,238,233,190,236,255,255 .globl lj_vmeta_tgets .hidden lj_vmeta_tgets .type lj_vmeta_tgets, @function .size lj_vmeta_tgets, 41 lj_vmeta_tgets: .byte 137,4,36,199,68,36,4,251,255,255,255,72,141,4,36,128 .byte 123,252,52,117,46,65,141,142,240,244,255,255,137,41,199,65 .byte 4,244,255,255,255,137,205,235,33 .globl lj_vmeta_tgetb .hidden lj_vmeta_tgetb .type lj_vmeta_tgetb, @function .size lj_vmeta_tgetb, 19 lj_vmeta_tgetb: .byte 15,182,67,254,242,15,42,192,242,15,17,4,36,72,141,4 .byte 36,235,7 .globl lj_vmeta_tgetv .hidden lj_vmeta_tgetv .type lj_vmeta_tgetv, @function .size lj_vmeta_tgetv, 44 lj_vmeta_tgetv: .byte 15,182,67,254,141,4,194,15,182,107,255,141,44,234,139,124 .byte 36,24,137,87,16,137,238,72,137,194,137,253,137,92,36,28 .byte 232 .long lj_meta_tget-.-4 .byte 139,85,16,133,192,116,29 .globl lj_cont_ra .hidden lj_cont_ra .type lj_cont_ra, @function .size lj_cont_ra, 53 lj_cont_ra: .byte 15,182,75,253,72,139,40,72,137,44,202,139,3,15,182,204 .byte 15,182,232,131,195,4,193,232,16,65,255,36,238,139,77,24 .byte 137,89,244,141,89,2,41,211,139,105,248,184,3,0,0,0 .byte 233,136,254,255,255 .globl lj_vmeta_tsets .hidden lj_vmeta_tsets .type lj_vmeta_tsets, @function .size lj_vmeta_tsets, 41 lj_vmeta_tsets: .byte 137,4,36,199,68,36,4,251,255,255,255,72,141,4,36,128 .byte 123,252,53,117,46,65,141,142,240,244,255,255,137,41,199,65 .byte 4,244,255,255,255,137,205,235,33 .globl lj_vmeta_tsetb .hidden lj_vmeta_tsetb .type lj_vmeta_tsetb, @function .size lj_vmeta_tsetb, 19 lj_vmeta_tsetb: .byte 15,182,67,254,242,15,42,192,242,15,17,4,36,72,141,4 .byte 36,235,7 .globl lj_vmeta_tsetv .hidden lj_vmeta_tsetv .type lj_vmeta_tsetv, @function .size lj_vmeta_tsetv, 55 lj_vmeta_tsetv: .byte 15,182,67,254,141,4,194,15,182,107,255,141,44,234,139,124 .byte 36,24,137,87,16,137,238,72,137,194,137,253,137,92,36,28 .byte 232 .long lj_meta_tset-.-4 .byte 139,85,16,133,192,116,29,15,182,75,253,72,139,44,202,72 .byte 137,40 .globl lj_cont_nop .hidden lj_cont_nop .type lj_cont_nop, @function .size lj_cont_nop, 54 lj_cont_nop: .byte 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,255 .byte 36,238,139,77,24,137,89,244,15,182,67,253,72,139,44,194 .byte 72,137,105,16,141,89,2,41,211,139,105,248,184,4,0,0 .byte 0,233,223,253,255,255 .globl lj_vmeta_comp .hidden lj_vmeta_comp .type lj_vmeta_comp, @function .size lj_vmeta_comp, 74 lj_vmeta_comp: .byte 139,108,36,24,137,85,16,141,52,202,141,20,194,137,239,15 .byte 182,75,252,137,92,36,28,232 .long lj_meta_comp-.-4 .byte 139,85,16,131,248,1,15,135,178,0,0,0,141,91,4,114 .byte 11,15,183,67,254,141,156,131,0,0,254,255,139,3,15,182 .byte 204,15,182,232,131,195,4,193,232,16,65,255,36,238 .globl lj_cont_condt .hidden lj_cont_condt .type lj_cont_condt, @function .size lj_cont_condt, 11 lj_cont_condt: .byte 131,195,4,131,120,4,254,114,218,235,227 .globl lj_cont_condf .hidden lj_cont_condf .type lj_cont_condf, @function .size lj_cont_condf, 6 lj_cont_condf: .byte 131,120,4,254,235,205 .globl lj_vmeta_equal .hidden lj_vmeta_equal .type lj_vmeta_equal, @function .size lj_vmeta_equal, 29 lj_vmeta_equal: .byte 131,235,4,137,206,137,233,139,108,36,24,137,85,16,137,194 .byte 137,239,137,92,36,28,232 .long lj_meta_equal-.-4 .byte 235,164 .globl lj_vmeta_equal_cd .hidden lj_vmeta_equal_cd .type lj_vmeta_equal_cd, @function .size lj_vmeta_equal_cd, 26 lj_vmeta_equal_cd: .byte 131,235,4,139,108,36,24,137,85,16,137,239,139,115,252,137 .byte 92,36,28,232 .long lj_meta_equal_cd-.-4 .byte 235,138 .globl lj_vmeta_arith_vno .hidden lj_vmeta_arith_vno .type lj_vmeta_arith_vno, @function .size lj_vmeta_arith_vno, 0 lj_vmeta_arith_vno: .globl lj_vmeta_arith_vn .hidden lj_vmeta_arith_vn .type lj_vmeta_arith_vn, @function .size lj_vmeta_arith_vn, 6 lj_vmeta_arith_vn: .byte 65,141,4,199,235,20 .globl lj_vmeta_arith_nvo .hidden lj_vmeta_arith_nvo .type lj_vmeta_arith_nvo, @function .size lj_vmeta_arith_nvo, 0 lj_vmeta_arith_nvo: .globl lj_vmeta_arith_nv .hidden lj_vmeta_arith_nv .type lj_vmeta_arith_nv, @function .size lj_vmeta_arith_nv, 10 lj_vmeta_arith_nv: .byte 65,141,4,199,141,44,234,149,235,13 .globl lj_vmeta_unm .hidden lj_vmeta_unm .type lj_vmeta_unm, @function .size lj_vmeta_unm, 7 lj_vmeta_unm: .byte 141,4,194,137,197,235,6 .globl lj_vmeta_arith_vvo .hidden lj_vmeta_arith_vvo .type lj_vmeta_arith_vvo, @function .size lj_vmeta_arith_vvo, 0 lj_vmeta_arith_vvo: .globl lj_vmeta_arith_vv .hidden lj_vmeta_arith_vv .type lj_vmeta_arith_vv, @function .size lj_vmeta_arith_vv, 49 lj_vmeta_arith_vv: .byte 141,4,194,141,44,234,141,12,202,68,15,182,67,252,137,206 .byte 137,193,139,124,36,24,137,87,16,137,234,137,253,137,92,36 .byte 28,232 .long lj_meta_arith-.-4 .byte 139,85,16,133,192,15,132,240,254,255,255 .globl lj_vmeta_binop .hidden lj_vmeta_binop .type lj_vmeta_binop, @function .size lj_vmeta_binop, 20 lj_vmeta_binop: .byte 137,193,41,208,137,89,244,141,88,2,184,3,0,0,0,233 .byte 228,252,255,255 .globl lj_vmeta_len .hidden lj_vmeta_len .type lj_vmeta_len, @function .size lj_vmeta_len, 26 lj_vmeta_len: .byte 139,108,36,24,137,85,16,141,52,194,137,239,137,92,36,28 .byte 232 .long lj_meta_len-.-4 .byte 139,85,16,235,210 .globl lj_vmeta_call_ra .hidden lj_vmeta_call_ra .type lj_vmeta_call_ra, @function .size lj_vmeta_call_ra, 4 lj_vmeta_call_ra: .byte 141,76,202,8 .globl lj_vmeta_call .hidden lj_vmeta_call .type lj_vmeta_call, @function .size lj_vmeta_call, 81 lj_vmeta_call: .byte 137,76,36,4,137,4,36,131,233,8,139,108,36,24,137,85 .byte 16,137,206,141,20,193,137,239,137,92,36,28,232 .long lj_meta_call-.-4 .byte 139,85,16,139,76,36,4,139,4,36,139,105,248,131,192,1 .byte 65,57,215,15,132,41,242,255,255,137,202,137,90,252,139,93 .byte 16,139,11,15,182,233,15,182,205,131,195,4,65,255,36,238 .globl lj_vmeta_for .hidden lj_vmeta_for .type lj_vmeta_for, @function .size lj_vmeta_for, 43 lj_vmeta_for: .byte 139,108,36,24,137,85,16,137,206,137,239,137,92,36,28,232 .long lj_meta_for-.-4 .byte 139,85,16,139,67,252,15,182,204,15,182,232,193,232,16,65 .byte 255,164,238,216,4,0,0 .globl lj_ff_assert .hidden lj_ff_assert .type lj_ff_assert, @function .size lj_ff_assert, 67 lj_ff_assert: .byte 131,248,2,15,130,9,18,0,0,139,106,4,131,253,254,15 .byte 131,253,17,0,0,139,90,252,137,68,36,4,137,106,252,139 .byte 42,137,106,248,131,232,2,116,17,137,209,131,193,8,72,139 .byte 41,72,137,105,248,131,232,1,117,241,139,68,36,4,233,86 .byte 6,0,0 .globl lj_ff_type .hidden lj_ff_type .type lj_ff_type, @function .size lj_ff_type, 66 lj_ff_type: .byte 131,248,2,15,130,198,17,0,0,139,106,4,137,233,193,249 .byte 15,131,249,254,116,37,184,13,0,0,0,247,213,57,232,15 .byte 71,197,139,106,248,139,68,197,32,139,90,252,199,66,252,251 .byte 255,255,255,137,66,248,233,18,6,0,0,184,3,0,0,0 .byte 235,224 .globl lj_ff_getmetatable .hidden lj_ff_getmetatable .type lj_ff_getmetatable, @function .size lj_ff_getmetatable, 162 lj_ff_getmetatable: .byte 131,248,2,15,130,132,17,0,0,139,106,4,139,90,252,131 .byte 253,244,117,97,139,42,139,109,16,133,237,199,66,252,255,255 .byte 255,255,15,132,227,5,0,0,65,139,134,148,245,255,255,199 .byte 66,252,244,255,255,255,137,106,248,139,77,28,35,72,8,107 .byte 201,24,3,77,20,131,121,12,251,117,5,57,65,8,116,12 .byte 139,73,16,133,201,117,238,233,175,5,0,0,139,105,4,131 .byte 253,255,15,132,163,5,0,0,139,1,137,106,252,137,66,248 .byte 233,150,5,0,0,131,253,243,116,154,131,253,242,119,20,129 .byte 253,255,255,254,255,118,7,189,252,255,255,255,235,5,189,242 .byte 255,255,255,247,213,65,139,172,174,168,245,255,255,233,119,255 .byte 255,255 .globl lj_ff_setmetatable .hidden lj_ff_setmetatable .type lj_ff_setmetatable, @function .size lj_ff_setmetatable, 92 lj_ff_setmetatable: .byte 131,248,3,15,130,226,16,0,0,131,122,4,244,15,133,216 .byte 16,0,0,139,42,131,125,16,0,15,133,204,16,0,0,131 .byte 122,12,244,15,133,194,16,0,0,139,66,8,137,69,16,139 .byte 90,252,199,66,252,244,255,255,255,137,106,248,246,69,4,4 .byte 116,21,128,101,4,251,65,139,134,140,244,255,255,65,137,174 .byte 140,244,255,255,137,69,12,233,13,5,0,0 .globl lj_ff_rawget .hidden lj_ff_rawget .type lj_ff_rawget, @function .size lj_ff_rawget, 52 lj_ff_rawget: .byte 131,248,3,15,130,134,16,0,0,131,122,4,244,15,133,124 .byte 16,0,0,137,213,139,50,141,82,8,139,124,36,24,232 .long lj_tab_get-.-4 .byte 137,234,72,139,40,139,90,252,72,137,106,248,233,217,4,0 .byte 0 .globl lj_ff_tonumber .hidden lj_ff_tonumber .type lj_ff_tonumber, @function .size lj_ff_tonumber, 31 lj_ff_tonumber: .byte 131,248,2,15,133,82,16,0,0,129,122,4,255,255,254,255 .byte 15,131,69,16,0,0,242,15,16,2,233,178,4,0,0 .globl lj_ff_tostring .hidden lj_ff_tostring .type lj_ff_tostring, @function .size lj_ff_tostring, 108 lj_ff_tostring: .byte 131,248,2,15,130,51,16,0,0,139,90,252,131,122,4,251 .byte 117,17,139,2,199,66,252,251,255,255,255,137,66,248,233,151 .byte 4,0,0,129,122,4,255,255,254,255,15,135,12,16,0,0 .byte 65,131,190,220,245,255,255,0,15,133,254,15,0,0,65,139 .byte 174,112,244,255,255,65,59,174,116,244,255,255,114,5,232,120 .byte 16,0,0,139,108,36,24,137,85,16,137,92,36,28,137,214 .byte 137,239,232 .long lj_str_fromnum-.-4 .byte 139,85,16,235,168 .globl lj_ff_next .hidden lj_ff_next .type lj_ff_next, @function .size lj_ff_next, 72 lj_ff_next: .byte 131,248,2,15,130,199,15,0,0,116,71,131,122,4,244,15 .byte 133,187,15,0,0,139,108,36,24,137,85,16,137,85,24,139 .byte 90,252,139,50,141,82,8,137,239,137,92,36,28,232 .long lj_tab_next-.-4 .byte 139,85,16,133,192,116,34,72,139,106,8,72,139,66,16,72 .byte 137,106,248,72,137,2 .globl lj_fff_res2 .hidden lj_fff_res2 .type lj_fff_res2, @function .size lj_fff_res2, 31 lj_fff_res2: .byte 184,3,0,0,0,233,1,4,0,0,199,66,12,255,255,255 .byte 255,235,176,199,66,252,255,255,255,255,233,231,3,0,0 .globl lj_ff_pairs .hidden lj_ff_pairs .type lj_ff_pairs, @function .size lj_ff_pairs, 57 lj_ff_pairs: .byte 131,248,2,15,130,96,15,0,0,139,42,131,122,4,244,15 .byte 133,84,15,0,0,139,106,248,139,69,32,139,90,252,199,66 .byte 252,247,255,255,255,137,66,248,199,66,12,255,255,255,255,184 .byte 4,0,0,0,233,179,3,0,0 .globl lj_ff_ipairs_aux .hidden lj_ff_ipairs_aux .type lj_ff_ipairs_aux, @function .size lj_ff_ipairs_aux, 121 lj_ff_ipairs_aux: .byte 131,248,2,15,130,39,15,0,0,131,122,4,244,15,133,29 .byte 15,0,0,129,122,12,255,255,254,255,15,131,16,15,0,0 .byte 139,90,252,242,15,16,66,8,72,189,0,0,0,0,0,0 .byte 240,63,102,72,15,110,205,242,15,88,193,242,15,45,192,242 .byte 15,17,66,248,139,42,59,69,24,115,23,193,224,3,3,69 .byte 8,131,120,4,255,116,34,72,139,40,72,137,42,233,70,255 .byte 255,255,131,125,28,0,116,17,137,239,137,213,137,198,232 .long lj_tab_getinth-.-4 .byte 137,234,133,192,117,216 .globl lj_fff_res0 .hidden lj_fff_res0 .type lj_fff_res0, @function .size lj_fff_res0, 10 lj_fff_res0: .byte 184,1,0,0,0,233,48,3,0,0 .globl lj_ff_ipairs .hidden lj_ff_ipairs .type lj_ff_ipairs, @function .size lj_ff_ipairs, 58 lj_ff_ipairs: .byte 131,248,2,15,130,164,14,0,0,139,42,131,122,4,244,15 .byte 133,152,14,0,0,139,106,248,139,69,32,139,90,252,199,66 .byte 252,247,255,255,255,137,66,248,15,87,192,242,15,17,66,8 .byte 184,4,0,0,0,233,246,2,0,0 .globl lj_ff_pcall .hidden lj_ff_pcall .type lj_ff_pcall, @function .size lj_ff_pcall, 41 lj_ff_pcall: .byte 131,248,2,15,130,106,14,0,0,141,74,8,131,232,1,187 .byte 14,0,0,0,65,15,182,174,225,244,255,255,193,237,4,131 .byte 229,1,1,235,233,130,248,255,255 .globl lj_ff_xpcall .hidden lj_ff_xpcall .type lj_ff_xpcall, @function .size lj_ff_xpcall, 55 lj_ff_xpcall: .byte 131,248,3,15,130,65,14,0,0,131,122,12,247,15,133,55 .byte 14,0,0,139,106,4,137,106,12,199,66,4,247,255,255,255 .byte 139,42,139,90,8,137,106,8,137,26,141,74,16,131,232,2 .byte 187,22,0,0,0,235,180 .globl lj_ff_coroutine_resume .hidden lj_ff_coroutine_resume .type lj_ff_coroutine_resume, @function .size lj_ff_coroutine_resume, 303 lj_ff_coroutine_resume: .byte 131,248,2,15,130,10,14,0,0,139,42,139,90,252,137,92 .byte 36,28,137,44,36,131,122,4,249,15,133,244,13,0,0,72 .byte 131,125,48,0,15,133,233,13,0,0,128,125,7,1,15,135 .byte 223,13,0,0,139,77,24,116,9,59,77,16,15,132,209,13 .byte 0,0,141,92,193,240,59,93,32,15,135,196,13,0,0,137 .byte 93,24,139,108,36,24,137,85,16,131,194,8,137,85,24,141 .byte 108,194,232,72,41,221,57,203,116,15,72,139,4,43,72,137 .byte 67,248,131,235,8,57,203,117,241,137,206,139,60,36,232,226 .byte 246,255,255,65,199,134,56,245,255,255,255,255,255,255,139,108 .byte 36,24,139,28,36,139,85,16,131,248,1,119,90,139,75,16 .byte 68,139,123,24,137,75,24,68,137,251,41,203,116,31,141,4 .byte 26,193,235,3,59,69,32,119,91,137,213,72,41,205,72,139 .byte 1,72,137,4,41,131,193,8,68,57,249,117,241,141,67,2 .byte 199,66,252,253,255,255,255,139,92,36,28,137,68,36,4,72 .byte 199,193,248,255,255,255,247,195,3,0,0,0,15,132,142,239 .byte 255,255,233,26,245,255,255,199,66,252,254,255,255,255,139,75 .byte 24,131,233,8,137,75,24,72,139,1,72,137,2,184,3,0 .byte 0,0,235,195,139,12,36,68,137,121,24,137,222,137,239,232 .long lj_state_growstack-.-4 .byte 139,28,36,139,85,16,233,110,255,255,255 .globl lj_ff_coroutine_wrap_aux .hidden lj_ff_coroutine_wrap_aux .type lj_ff_coroutine_wrap_aux, @function .size lj_ff_coroutine_wrap_aux, 250 lj_ff_coroutine_wrap_aux: .byte 139,106,248,139,109,32,139,90,252,137,92,36,28,137,44,36 .byte 72,131,125,48,0,15,133,201,12,0,0,128,125,7,1,15 .byte 135,191,12,0,0,139,77,24,116,9,59,77,16,15,132,177 .byte 12,0,0,141,92,193,248,59,93,32,15,135,164,12,0,0 .byte 137,93,24,139,108,36,24,137,85,16,137,85,24,141,108,194 .byte 240,72,41,221,57,203,116,15,72,139,4,43,72,137,67,248 .byte 131,235,8,57,203,117,241,137,206,139,60,36,232,197,245,255 .byte 255,65,199,134,56,245,255,255,255,255,255,255,139,108,36,24 .byte 139,28,36,139,85,16,131,248,1,119,78,139,75,16,68,139 .byte 123,24,137,75,24,68,137,251,41,203,116,31,141,4,26,193 .byte 235,3,59,69,32,119,59,137,213,72,41,205,72,139,1,72 .byte 137,4,41,131,193,8,68,57,249,117,241,141,67,1,139,92 .byte 36,28,137,68,36,4,49,201,247,195,3,0,0,0,15,132 .byte 125,238,255,255,233,9,244,255,255,137,222,137,239,232 .long lj_ffh_coroutine_wrap_err-.-4 .byte 139,12,36,68,137,121,24,137,222,137,239,232 .long lj_state_growstack-.-4 .byte 139,28,36,139,85,16,235,145 .globl lj_ff_coroutine_yield .hidden lj_ff_coroutine_yield .type lj_ff_coroutine_yield, @function .size lj_ff_coroutine_yield, 44 lj_ff_coroutine_yield: .byte 139,108,36,24,72,247,69,48,1,0,0,0,15,132,216,11 .byte 0,0,137,85,16,141,68,194,248,137,69,24,49,192,72,137 .byte 69,48,176,1,136,69,7,233,18,244,255,255 .globl lj_fff_resi .hidden lj_fff_resi .type lj_fff_resi, @function .size lj_fff_resi, 0 lj_fff_resi: .globl lj_fff_resn .hidden lj_fff_resn .type lj_fff_resn, @function .size lj_fff_resn, 8 lj_fff_resn: .byte 139,90,252,221,90,248,235,52 .globl lj_ff_math_abs .hidden lj_ff_math_abs .type lj_ff_math_abs, @function .size lj_ff_math_abs, 44 lj_ff_math_abs: .byte 131,248,2,15,130,173,11,0,0,129,122,4,255,255,254,255 .byte 15,131,160,11,0,0,242,15,16,2,72,184,255,255,255,255 .byte 255,255,255,127,102,72,15,110,200,15,84,193 .globl lj_fff_resxmm0 .hidden lj_fff_resxmm0 .type lj_fff_resxmm0, @function .size lj_fff_resxmm0, 8 lj_fff_resxmm0: .byte 139,90,252,242,15,17,66,248 .globl lj_fff_res1 .hidden lj_fff_res1 .type lj_fff_res1, @function .size lj_fff_res1, 5 lj_fff_res1: .byte 184,2,0,0,0 .globl lj_fff_res .hidden lj_fff_res .type lj_fff_res, @function .size lj_fff_res, 4 lj_fff_res: .byte 137,68,36,4 .globl lj_fff_res_ .hidden lj_fff_res_ .type lj_fff_res_, @function .size lj_fff_res_, 66 lj_fff_res_: .byte 247,195,3,0,0,0,117,46,56,67,255,119,28,15,182,75 .byte 253,72,247,209,141,20,202,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,65,255,36,238,199,68,194,244,255,255,255 .byte 255,131,192,1,235,210,72,199,193,248,255,255,255,233,53,243 .byte 255,255 .globl lj_ff_math_floor .hidden lj_ff_math_floor .type lj_ff_math_floor, @function .size lj_ff_math_floor, 24 lj_ff_math_floor: .byte 129,122,4,255,255,254,255,15,131,42,11,0,0,242,15,16 .byte 2,232,46,14,0,0,235,149 .globl lj_ff_math_ceil .hidden lj_ff_math_ceil .type lj_ff_math_ceil, @function .size lj_ff_math_ceil, 27 lj_ff_math_ceil: .byte 129,122,4,255,255,254,255,15,131,18,11,0,0,242,15,16 .byte 2,232,113,14,0,0,233,122,255,255,255 .globl lj_ff_math_sqrt .hidden lj_ff_math_sqrt .type lj_ff_math_sqrt, @function .size lj_ff_math_sqrt, 31 lj_ff_math_sqrt: .byte 131,248,2,15,130,251,10,0,0,129,122,4,255,255,254,255 .byte 15,131,238,10,0,0,242,15,81,2,233,91,255,255,255 .globl lj_ff_math_log .hidden lj_ff_math_log .type lj_ff_math_log, @function .size lj_ff_math_log, 33 lj_ff_math_log: .byte 131,248,2,15,133,220,10,0,0,129,122,4,255,255,254,255 .byte 15,131,207,10,0,0,217,237,221,2,217,241,233,6,255,255 .byte 255 .globl lj_ff_math_log10 .hidden lj_ff_math_log10 .type lj_ff_math_log10, @function .size lj_ff_math_log10, 33 lj_ff_math_log10: .byte 131,248,2,15,130,187,10,0,0,129,122,4,255,255,254,255 .byte 15,131,174,10,0,0,217,236,221,2,217,241,233,229,254,255 .byte 255 .globl lj_ff_math_exp .hidden lj_ff_math_exp .type lj_ff_math_exp, @function .size lj_ff_math_exp, 34 lj_ff_math_exp: .byte 131,248,2,15,130,154,10,0,0,129,122,4,255,255,254,255 .byte 15,131,141,10,0,0,221,2,232,54,15,0,0,233,195,254 .byte 255,255 .globl lj_ff_math_sin .hidden lj_ff_math_sin .type lj_ff_math_sin, @function .size lj_ff_math_sin, 31 lj_ff_math_sin: .byte 131,248,2,15,130,120,10,0,0,129,122,4,255,255,254,255 .byte 15,131,107,10,0,0,221,2,217,254,233,164,254,255,255 .globl lj_ff_math_cos .hidden lj_ff_math_cos .type lj_ff_math_cos, @function .size lj_ff_math_cos, 31 lj_ff_math_cos: .byte 131,248,2,15,130,89,10,0,0,129,122,4,255,255,254,255 .byte 15,131,76,10,0,0,221,2,217,255,233,133,254,255,255 .globl lj_ff_math_tan .hidden lj_ff_math_tan .type lj_ff_math_tan, @function .size lj_ff_math_tan, 33 lj_ff_math_tan: .byte 131,248,2,15,130,58,10,0,0,129,122,4,255,255,254,255 .byte 15,131,45,10,0,0,221,2,217,242,221,216,233,100,254,255 .byte 255 .globl lj_ff_math_asin .hidden lj_ff_math_asin .type lj_ff_math_asin, @function .size lj_ff_math_asin, 41 lj_ff_math_asin: .byte 131,248,2,15,130,25,10,0,0,129,122,4,255,255,254,255 .byte 15,131,12,10,0,0,221,2,217,192,216,200,217,232,222,225 .byte 217,250,217,243,233,59,254,255,255 .globl lj_ff_math_acos .hidden lj_ff_math_acos .type lj_ff_math_acos, @function .size lj_ff_math_acos, 43 lj_ff_math_acos: .byte 131,248,2,15,130,240,9,0,0,129,122,4,255,255,254,255 .byte 15,131,227,9,0,0,221,2,217,192,216,200,217,232,222,225 .byte 217,250,217,201,217,243,233,16,254,255,255 .globl lj_ff_math_atan .hidden lj_ff_math_atan .type lj_ff_math_atan, @function .size lj_ff_math_atan, 33 lj_ff_math_atan: .byte 131,248,2,15,130,197,9,0,0,129,122,4,255,255,254,255 .byte 15,131,184,9,0,0,221,2,217,232,217,243,233,239,253,255 .byte 255 .globl lj_ff_math_sinh .hidden lj_ff_math_sinh .type lj_ff_math_sinh, @function .size lj_ff_math_sinh, 40 lj_ff_math_sinh: .byte 131,248,2,15,130,164,9,0,0,129,122,4,255,255,254,255 .byte 15,131,151,9,0,0,242,15,16,2,137,213,232 .long lj_vm_sinh-.-4 .byte 137,234,233,251,253,255,255 .globl lj_ff_math_cosh .hidden lj_ff_math_cosh .type lj_ff_math_cosh, @function .size lj_ff_math_cosh, 40 lj_ff_math_cosh: .byte 131,248,2,15,130,124,9,0,0,129,122,4,255,255,254,255 .byte 15,131,111,9,0,0,242,15,16,2,137,213,232 .long lj_vm_cosh-.-4 .byte 137,234,233,211,253,255,255 .globl lj_ff_math_tanh .hidden lj_ff_math_tanh .type lj_ff_math_tanh, @function .size lj_ff_math_tanh, 40 lj_ff_math_tanh: .byte 131,248,2,15,130,84,9,0,0,129,122,4,255,255,254,255 .byte 15,131,71,9,0,0,242,15,16,2,137,213,232 .long lj_vm_tanh-.-4 .byte 137,234,233,171,253,255,255 .globl lj_ff_math_deg .hidden lj_ff_math_deg .type lj_ff_math_deg, @function .size lj_ff_math_deg, 0 lj_ff_math_deg: .globl lj_ff_math_rad .hidden lj_ff_math_rad .type lj_ff_math_rad, @function .size lj_ff_math_rad, 39 lj_ff_math_rad: .byte 131,248,2,15,130,44,9,0,0,129,122,4,255,255,254,255 .byte 15,131,31,9,0,0,242,15,16,2,139,106,248,242,15,89 .byte 69,32,233,132,253,255,255 .globl lj_ff_math_atan2 .hidden lj_ff_math_atan2 .type lj_ff_math_atan2, @function .size lj_ff_math_atan2, 47 lj_ff_math_atan2: .byte 131,248,3,15,130,5,9,0,0,129,122,4,255,255,254,255 .byte 15,131,248,8,0,0,129,122,12,255,255,254,255,15,131,235 .byte 8,0,0,221,2,221,66,8,217,243,233,33,253,255,255 .globl lj_ff_math_ldexp .hidden lj_ff_math_ldexp .type lj_ff_math_ldexp, @function .size lj_ff_math_ldexp, 49 lj_ff_math_ldexp: .byte 131,248,3,15,130,214,8,0,0,129,122,4,255,255,254,255 .byte 15,131,201,8,0,0,129,122,12,255,255,254,255,15,131,188 .byte 8,0,0,221,66,8,221,2,217,253,221,217,233,240,252,255 .byte 255 .globl lj_ff_math_frexp .hidden lj_ff_math_frexp .type lj_ff_math_frexp, @function .size lj_ff_math_frexp, 148 lj_ff_math_frexp: .byte 131,248,2,15,130,165,8,0,0,139,106,4,129,253,255,255 .byte 254,255,15,131,150,8,0,0,139,90,252,139,2,137,106,252 .byte 137,66,248,209,229,129,253,0,0,224,255,115,58,9,232,116 .byte 54,184,254,3,0,0,129,253,0,0,32,0,114,46,193,237 .byte 21,41,197,242,15,42,197,139,106,252,129,229,255,255,15,128 .byte 129,205,0,0,224,63,137,106,252,242,15,17,2,184,3,0 .byte 0,0,233,202,252,255,255,15,87,192,235,237,242,15,16,2 .byte 72,189,0,0,0,0,0,0,80,67,102,72,15,110,205,242 .byte 15,89,193,242,15,17,66,248,139,106,252,184,52,4,0,0 .byte 209,229,235,170 .globl lj_ff_math_modf .hidden lj_ff_math_modf .type lj_ff_math_modf, @function .size lj_ff_math_modf, 99 lj_ff_math_modf: .byte 131,248,2,15,130,17,8,0,0,129,122,4,255,255,254,255 .byte 15,131,4,8,0,0,242,15,16,2,139,106,4,139,90,252 .byte 209,229,129,253,0,0,224,255,116,52,15,40,224,232,171,11 .byte 0,0,242,15,92,224,242,15,17,66,248,242,15,17,34,139 .byte 66,252,139,106,4,49,232,120,10,184,3,0,0,0,233,74 .byte 252,255,255,129,245,0,0,0,128,137,106,4,235,235,15,87 .byte 228,235,211 .globl lj_ff_math_fmod .hidden lj_ff_math_fmod .type lj_ff_math_fmod, @function .size lj_ff_math_fmod, 54 lj_ff_math_fmod: .byte 131,248,3,15,130,174,7,0,0,129,122,4,255,255,254,255 .byte 15,131,161,7,0,0,129,122,12,255,255,254,255,15,131,148 .byte 7,0,0,221,66,8,221,2,217,248,223,224,158,122,249,221 .byte 217,233,195,251,255,255 .globl lj_ff_math_pow .hidden lj_ff_math_pow .type lj_ff_math_pow, @function .size lj_ff_math_pow, 54 lj_ff_math_pow: .byte 131,248,3,15,130,120,7,0,0,129,122,4,255,255,254,255 .byte 15,131,107,7,0,0,129,122,12,255,255,254,255,15,131,94 .byte 7,0,0,242,15,16,2,242,15,16,74,8,232,52,12,0 .byte 0,233,193,251,255,255 .globl lj_ff_math_min .hidden lj_ff_math_min .type lj_ff_math_min, @function .size lj_ff_math_min, 59 lj_ff_math_min: .byte 185,2,0,0,0,129,122,4,255,255,254,255,15,131,57,7 .byte 0,0,242,15,16,2,57,193,15,131,163,251,255,255,129,124 .byte 202,252,255,255,254,255,15,131,31,7,0,0,242,15,16,76 .byte 202,248,242,15,93,193,131,193,1,235,219 .globl lj_ff_math_max .hidden lj_ff_math_max .type lj_ff_math_max, @function .size lj_ff_math_max, 59 lj_ff_math_max: .byte 185,2,0,0,0,129,122,4,255,255,254,255,15,131,254,6 .byte 0,0,242,15,16,2,57,193,15,131,104,251,255,255,129,124 .byte 202,252,255,255,254,255,15,131,228,6,0,0,242,15,16,76 .byte 202,248,242,15,95,193,131,193,1,235,219 .globl lj_ff_string_len .hidden lj_ff_string_len .type lj_ff_string_len, @function .size lj_ff_string_len, 31 lj_ff_string_len: .byte 131,248,2,15,130,204,6,0,0,131,122,4,251,15,133,194 .byte 6,0,0,139,42,242,15,42,69,12,233,44,251,255,255 .globl lj_ff_string_byte .hidden lj_ff_string_byte .type lj_ff_string_byte, @function .size lj_ff_string_byte, 47 lj_ff_string_byte: .byte 131,248,2,15,133,173,6,0,0,131,122,4,251,15,133,163 .byte 6,0,0,139,42,139,90,252,131,125,12,1,15,130,221,247 .byte 255,255,15,182,109,16,242,15,42,197,233,253,250,255,255 .globl lj_ff_string_char .hidden lj_ff_string_char .type lj_ff_string_char, @function .size lj_ff_string_char, 76 lj_ff_string_char: .byte 65,139,174,112,244,255,255,65,59,174,116,244,255,255,114,5 .byte 232,1,7,0,0,131,248,2,15,133,105,6,0,0,129,122 .byte 4,255,255,254,255,15,131,92,6,0,0,242,15,44,42,129 .byte 253,255,0,0,0,15,135,76,6,0,0,137,108,36,4,199 .byte 68,36,8,1,0,0,0,72,141,68,36,4 .globl lj_fff_newstr .hidden lj_fff_newstr .type lj_fff_newstr, @function .size lj_fff_newstr, 46 lj_fff_newstr: .byte 139,108,36,24,137,85,16,139,84,36,8,72,137,198,137,239 .byte 137,92,36,28,232 .long lj_str_new-.-4 .byte 139,85,16,139,90,252,199,66,252,251,255,255,255,137,66,248 .byte 233,139,250,255,255 .globl lj_ff_string_sub .hidden lj_ff_string_sub .type lj_ff_string_sub, @function .size lj_ff_string_sub, 165 lj_ff_string_sub: .byte 65,139,174,112,244,255,255,65,59,174,116,244,255,255,114,5 .byte 232,135,6,0,0,199,68,36,4,255,255,255,255,131,248,3 .byte 15,130,231,5,0,0,118,22,129,122,20,255,255,254,255,15 .byte 131,216,5,0,0,242,15,44,106,16,137,108,36,4,131,122 .byte 4,251,15,133,197,5,0,0,129,122,12,255,255,254,255,15 .byte 131,184,5,0,0,139,42,137,108,36,8,139,109,12,242,15 .byte 44,74,8,139,68,36,4,57,197,114,30,133,201,126,38,139 .byte 108,36,8,41,200,124,46,141,108,13,15,131,192,1,137,68 .byte 36,8,137,232,233,73,255,255,255,124,6,141,68,40,1,235 .byte 218,137,232,235,214,116,7,1,233,131,193,1,127,209,185,1 .byte 0,0,0,235,202 .globl lj_fff_emptystr .hidden lj_fff_emptystr .type lj_fff_emptystr, @function .size lj_fff_emptystr, 4 lj_fff_emptystr: .byte 49,192,235,213 .globl lj_ff_string_rep .hidden lj_ff_string_rep .type lj_ff_string_rep, @function .size lj_ff_string_rep, 127 lj_ff_string_rep: .byte 65,139,174,112,244,255,255,65,59,174,116,244,255,255,114,5 .byte 232,222,5,0,0,131,248,3,15,133,70,5,0,0,131,122 .byte 4,251,15,133,60,5,0,0,129,122,12,255,255,254,255,139 .byte 42,15,131,45,5,0,0,242,15,44,66,8,133,192,126,188 .byte 131,125,12,1,114,182,15,133,12,5,0,0,65,57,134,180 .byte 244,255,255,15,130,255,4,0,0,15,182,77,16,65,139,174 .byte 168,244,255,255,137,68,36,8,136,77,0,131,197,1,131,232 .byte 1,117,245,65,139,134,168,244,255,255,233,170,254,255,255 .globl lj_ff_string_reverse .hidden lj_ff_string_reverse .type lj_ff_string_reverse, @function .size lj_ff_string_reverse, 110 lj_ff_string_reverse: .byte 131,248,2,15,130,220,4,0,0,65,139,174,112,244,255,255 .byte 65,59,174,116,244,255,255,114,5,232,86,5,0,0,131,122 .byte 4,251,15,133,189,4,0,0,139,42,139,69,12,133,192,15 .byte 132,72,255,255,255,65,57,134,180,244,255,255,15,130,158,4 .byte 0,0,131,197,16,137,92,36,4,137,68,36,8,65,139,158 .byte 168,244,255,255,15,182,77,0,131,197,1,131,232,1,136,12 .byte 3,117,241,137,216,139,92,36,4,233,60,254,255,255 .globl lj_ff_string_lower .hidden lj_ff_string_lower .type lj_ff_string_lower, @function .size lj_ff_string_lower, 115 lj_ff_string_lower: .byte 131,248,2,15,130,110,4,0,0,65,139,174,112,244,255,255 .byte 65,59,174,116,244,255,255,114,5,232,232,4,0,0,131,122 .byte 4,251,15,133,79,4,0,0,139,42,139,69,12,65,57,134 .byte 180,244,255,255,15,130,56,4,0,0,131,197,16,137,92,36 .byte 4,137,68,36,8,65,139,158,168,244,255,255,235,21,15,182 .byte 76,5,0,131,249,65,114,8,131,249,90,119,3,131,241,32 .byte 136,12,3,131,232,1,121,230,137,216,139,92,36,4,233,201 .byte 253,255,255 .globl lj_ff_string_upper .hidden lj_ff_string_upper .type lj_ff_string_upper, @function .size lj_ff_string_upper, 115 lj_ff_string_upper: .byte 131,248,2,15,130,251,3,0,0,65,139,174,112,244,255,255 .byte 65,59,174,116,244,255,255,114,5,232,117,4,0,0,131,122 .byte 4,251,15,133,220,3,0,0,139,42,139,69,12,65,57,134 .byte 180,244,255,255,15,130,197,3,0,0,131,197,16,137,92,36 .byte 4,137,68,36,8,65,139,158,168,244,255,255,235,21,15,182 .byte 76,5,0,131,249,97,114,8,131,249,122,119,3,131,241,32 .byte 136,12,3,131,232,1,121,230,137,216,139,92,36,4,233,86 .byte 253,255,255 .globl lj_ff_table_getn .hidden lj_ff_table_getn .type lj_ff_table_getn, @function .size lj_ff_table_getn, 39 lj_ff_table_getn: .byte 131,248,2,15,130,136,3,0,0,131,122,4,244,15,133,126 .byte 3,0,0,137,213,139,58,232 .long lj_tab_len-.-4 .byte 137,234,242,15,42,192,233,224,247,255,255 .globl lj_ff_bit_tobit .hidden lj_ff_bit_tobit .type lj_ff_bit_tobit, @function .size lj_ff_bit_tobit, 54 lj_ff_bit_tobit: .byte 131,248,2,15,130,97,3,0,0,129,122,4,255,255,254,255 .byte 15,131,84,3,0,0,242,15,16,2,72,189,0,0,0,0 .byte 0,0,56,67,102,72,15,110,205,242,15,88,193,102,15,126 .byte 197,233,139,1,0,0 .globl lj_ff_bit_band .hidden lj_ff_bit_band .type lj_ff_bit_band, @function .size lj_ff_bit_band, 97 lj_ff_bit_band: .byte 131,248,2,15,130,43,3,0,0,72,189,0,0,0,0,0 .byte 0,56,67,102,72,15,110,205,129,122,4,255,255,254,255,15 .byte 131,15,3,0,0,242,15,16,2,242,15,88,193,102,15,126 .byte 197,137,68,36,4,141,68,194,240,57,208,15,134,74,1,0 .byte 0,129,120,4,255,255,254,255,15,131,70,1,0,0,242,15 .byte 16,0,242,15,88,193,102,15,126,193,33,205,131,232,8,235 .byte 216 .globl lj_ff_bit_bor .hidden lj_ff_bit_bor .type lj_ff_bit_bor, @function .size lj_ff_bit_bor, 97 lj_ff_bit_bor: .byte 131,248,2,15,130,202,2,0,0,72,189,0,0,0,0,0 .byte 0,56,67,102,72,15,110,205,129,122,4,255,255,254,255,15 .byte 131,174,2,0,0,242,15,16,2,242,15,88,193,102,15,126 .byte 197,137,68,36,4,141,68,194,240,57,208,15,134,233,0,0 .byte 0,129,120,4,255,255,254,255,15,131,229,0,0,0,242,15 .byte 16,0,242,15,88,193,102,15,126,193,9,205,131,232,8,235 .byte 216 .globl lj_ff_bit_bxor .hidden lj_ff_bit_bxor .type lj_ff_bit_bxor, @function .size lj_ff_bit_bxor, 97 lj_ff_bit_bxor: .byte 131,248,2,15,130,105,2,0,0,72,189,0,0,0,0,0 .byte 0,56,67,102,72,15,110,205,129,122,4,255,255,254,255,15 .byte 131,77,2,0,0,242,15,16,2,242,15,88,193,102,15,126 .byte 197,137,68,36,4,141,68,194,240,57,208,15,134,136,0,0 .byte 0,129,120,4,255,255,254,255,15,131,132,0,0,0,242,15 .byte 16,0,242,15,88,193,102,15,126,193,49,205,131,232,8,235 .byte 216 .globl lj_ff_bit_bswap .hidden lj_ff_bit_bswap .type lj_ff_bit_bswap, @function .size lj_ff_bit_bswap, 53 lj_ff_bit_bswap: .byte 131,248,2,15,130,8,2,0,0,129,122,4,255,255,254,255 .byte 15,131,251,1,0,0,242,15,16,2,72,189,0,0,0,0 .byte 0,0,56,67,102,72,15,110,205,242,15,88,193,102,15,126 .byte 197,15,205,235,51 .globl lj_ff_bit_bnot .hidden lj_ff_bit_bnot .type lj_ff_bit_bnot, @function .size lj_ff_bit_bnot, 51 lj_ff_bit_bnot: .byte 131,248,2,15,130,211,1,0,0,129,122,4,255,255,254,255 .byte 15,131,198,1,0,0,242,15,16,2,72,189,0,0,0,0 .byte 0,0,56,67,102,72,15,110,205,242,15,88,193,102,15,126 .byte 197,247,213 .globl lj_fff_resbit .hidden lj_fff_resbit .type lj_fff_resbit, @function .size lj_fff_resbit, 9 lj_fff_resbit: .byte 242,15,42,197,233,22,246,255,255 .globl lj_fff_fallback_bit_op .hidden lj_fff_fallback_bit_op .type lj_fff_fallback_bit_op, @function .size lj_fff_fallback_bit_op, 9 lj_fff_fallback_bit_op: .byte 139,68,36,4,233,151,1,0,0 .globl lj_ff_bit_lshift .hidden lj_ff_bit_lshift .type lj_ff_bit_lshift, @function .size lj_ff_bit_lshift, 79 lj_ff_bit_lshift: .byte 131,248,3,15,130,142,1,0,0,129,122,4,255,255,254,255 .byte 15,131,129,1,0,0,129,122,12,255,255,254,255,15,131,116 .byte 1,0,0,242,15,16,2,242,15,16,74,8,72,189,0,0 .byte 0,0,0,0,56,67,102,72,15,110,213,242,15,88,194,242 .byte 15,88,202,102,15,126,197,102,15,126,201,211,229,235,159 .globl lj_ff_bit_rshift .hidden lj_ff_bit_rshift .type lj_ff_bit_rshift, @function .size lj_ff_bit_rshift, 82 lj_ff_bit_rshift: .byte 131,248,3,15,130,63,1,0,0,129,122,4,255,255,254,255 .byte 15,131,50,1,0,0,129,122,12,255,255,254,255,15,131,37 .byte 1,0,0,242,15,16,2,242,15,16,74,8,72,189,0,0 .byte 0,0,0,0,56,67,102,72,15,110,213,242,15,88,194,242 .byte 15,88,202,102,15,126,197,102,15,126,201,211,237,233,77,255 .byte 255,255 .globl lj_ff_bit_arshift .hidden lj_ff_bit_arshift .type lj_ff_bit_arshift, @function .size lj_ff_bit_arshift, 82 lj_ff_bit_arshift: .byte 131,248,3,15,130,237,0,0,0,129,122,4,255,255,254,255 .byte 15,131,224,0,0,0,129,122,12,255,255,254,255,15,131,211 .byte 0,0,0,242,15,16,2,242,15,16,74,8,72,189,0,0 .byte 0,0,0,0,56,67,102,72,15,110,213,242,15,88,194,242 .byte 15,88,202,102,15,126,197,102,15,126,201,211,253,233,251,254 .byte 255,255 .globl lj_ff_bit_rol .hidden lj_ff_bit_rol .type lj_ff_bit_rol, @function .size lj_ff_bit_rol, 82 lj_ff_bit_rol: .byte 131,248,3,15,130,155,0,0,0,129,122,4,255,255,254,255 .byte 15,131,142,0,0,0,129,122,12,255,255,254,255,15,131,129 .byte 0,0,0,242,15,16,2,242,15,16,74,8,72,189,0,0 .byte 0,0,0,0,56,67,102,72,15,110,213,242,15,88,194,242 .byte 15,88,202,102,15,126,197,102,15,126,201,211,197,233,169,254 .byte 255,255 .globl lj_ff_bit_ror .hidden lj_ff_bit_ror .type lj_ff_bit_ror, @function .size lj_ff_bit_ror, 70 lj_ff_bit_ror: .byte 131,248,3,114,77,129,122,4,255,255,254,255,115,68,129,122 .byte 12,255,255,254,255,115,59,242,15,16,2,242,15,16,74,8 .byte 72,189,0,0,0,0,0,0,56,67,102,72,15,110,213,242 .byte 15,88,194,242,15,88,202,102,15,126,197,102,15,126,201,211 .byte 205,233,99,254,255,255 .globl lj_fff_fallback_2 .hidden lj_fff_fallback_2 .type lj_fff_fallback_2, @function .size lj_fff_fallback_2, 7 lj_fff_fallback_2: .byte 184,3,0,0,0,235,5 .globl lj_fff_fallback_1 .hidden lj_fff_fallback_1 .type lj_fff_fallback_1, @function .size lj_fff_fallback_1, 5 lj_fff_fallback_1: .byte 184,2,0,0,0 .globl lj_fff_fallback .hidden lj_fff_fallback .type lj_fff_fallback, @function .size lj_fff_fallback, 87 lj_fff_fallback: .byte 139,108,36,24,139,90,252,137,92,36,28,137,85,16,141,68 .byte 194,248,141,136,160,0,0,0,137,69,24,139,66,248,59,77 .byte 32,119,89,137,239,255,80,24,139,85,16,133,192,15,143,80 .byte 244,255,255,139,77,24,41,209,193,233,3,133,192,141,65,1 .byte 139,106,248,117,18,139,93,16,139,11,15,182,233,15,182,205 .byte 131,195,4,65,255,36,238 .globl lj_vm_call_tail .hidden lj_vm_call_tail .type lj_vm_call_tail, @function .size lj_vm_call_tail, 56 lj_vm_call_tail: .byte 137,209,247,195,3,0,0,0,117,15,15,182,107,253,72,247 .byte 213,141,20,234,233,200,233,255,255,137,221,131,229,248,41,234 .byte 233,188,233,255,255,190,20,0,0,0,137,239,232 .long lj_state_growstack-.-4 .byte 139,85,16,49,192,235,164 .globl lj_fff_gcstep .hidden lj_fff_gcstep .type lj_fff_gcstep, @function .size lj_fff_gcstep, 52 lj_fff_gcstep: .byte 93,72,137,108,36,8,139,108,36,24,137,92,36,28,137,85 .byte 16,141,68,194,248,137,239,137,69,24,232 .long lj_gc_step-.-4 .byte 139,85,16,139,69,24,41,208,193,232,3,131,192,1,72,139 .byte 108,36,8,85,195 .globl lj_vm_record .hidden lj_vm_record .type lj_vm_record, @function .size lj_vm_record, 29 lj_vm_record: .byte 65,15,182,134,225,244,255,255,168,32,117,83,168,16,117,56 .byte 168,12,116,52,65,255,142,24,245,255,255,235,43 .globl lj_vm_rethook .hidden lj_vm_rethook .type lj_vm_rethook, @function .size lj_vm_rethook, 14 lj_vm_rethook: .byte 65,15,182,134,225,244,255,255,168,16,117,54,235,29 .globl lj_vm_inshook .hidden lj_vm_inshook .type lj_vm_inshook, @function .size lj_vm_inshook, 68 lj_vm_inshook: .byte 65,15,182,134,225,244,255,255,168,16,117,40,168,12,116,36 .byte 65,255,142,24,245,255,255,116,4,168,4,116,23,139,108,36 .byte 24,137,85,16,137,222,137,239,232 .long lj_dispatch_ins-.-4 .byte 139,85,16,15,182,75,253,15,182,107,252,15,183,67,254,65 .byte 255,164,238,216,4,0,0 .globl lj_cont_hook .hidden lj_cont_hook .type lj_cont_hook, @function .size lj_cont_hook, 12 lj_cont_hook: .byte 131,195,4,139,77,232,137,76,36,4,235,224 .globl lj_vm_hotloop .hidden lj_vm_hotloop .type lj_vm_hotloop, @function .size lj_vm_hotloop, 50 lj_vm_hotloop: .byte 139,106,248,139,109,16,15,182,69,199,141,4,194,139,108,36 .byte 24,137,85,16,137,69,24,137,222,65,141,190,232,245,255,255 .byte 73,137,174,72,246,255,255,137,92,36,28,232 .long lj_trace_hot-.-4 .byte 235,171 .globl lj_vm_callhook .hidden lj_vm_callhook .type lj_vm_callhook, @function .size lj_vm_callhook, 6 lj_vm_callhook: .byte 137,92,36,28,235,7 .globl lj_vm_hotcall .hidden lj_vm_hotcall .type lj_vm_hotcall, @function .size lj_vm_hotcall, 67 lj_vm_hotcall: .byte 137,92,36,28,131,203,1,141,68,194,248,139,108,36,24,137 .byte 85,16,137,69,24,137,222,137,239,232 .long lj_dispatch_call-.-4 .byte 199,68,36,28,0,0,0,0,131,227,254,139,85,16,72,137 .byte 193,139,69,24,41,208,72,137,205,15,182,75,253,193,232,3 .byte 131,192,1,255,229 .globl lj_vm_exit_handler .hidden lj_vm_exit_handler .type lj_vm_exit_handler, @function .size lj_vm_exit_handler, 247 lj_vm_exit_handler: .byte 65,85,65,84,65,83,65,82,65,81,65,80,87,86,85,72 .byte 141,108,36,88,85,83,82,81,80,15,182,69,248,138,101,240 .byte 76,137,125,248,76,137,117,240,68,139,117,0,65,139,142,56 .byte 245,255,255,65,199,134,56,245,255,255,252,255,255,255,65,137 .byte 134,60,255,255,255,65,137,142,56,255,255,255,72,129,236,128 .byte 0,0,0,72,131,197,128,242,68,15,17,125,248,242,68,15 .byte 17,117,240,242,68,15,17,109,232,242,68,15,17,101,224,242 .byte 68,15,17,93,216,242,68,15,17,85,208,242,68,15,17,77 .byte 200,242,68,15,17,69,192,242,15,17,125,184,242,15,17,117 .byte 176,242,15,17,109,168,242,15,17,101,160,242,15,17,93,152 .byte 242,15,17,85,144,242,15,17,77,136,242,15,17,69,128,65 .byte 139,174,68,245,255,255,65,139,150,72,245,255,255,73,137,174 .byte 72,246,255,255,65,199,134,68,245,255,255,0,0,0,0,137 .byte 85,16,72,137,230,65,141,190,232,245,255,255,232 .long lj_trace_exit-.-4 .byte 72,139,77,48,72,131,225,252,72,137,204,137,105,24,139,85 .byte 16,139,89,28,235,4 .globl lj_vm_exit_interp .hidden lj_vm_exit_interp .type lj_vm_exit_interp, @function .size lj_vm_exit_interp, 93 lj_vm_exit_interp: .byte 72,131,196,16,76,139,108,36,8,76,139,36,36,133,192,120 .byte 65,137,68,36,4,68,139,122,248,69,139,127,16,69,139,127 .byte 208,65,199,134,68,245,255,255,0,0,0,0,65,199,134,56 .byte 245,255,255,255,255,255,255,139,3,15,182,204,15,182,232,131 .byte 195,4,193,232,16,131,253,85,114,4,139,68,36,4,65,255 .byte 36,238,247,216,137,239,137,198,232 .long lj_err_throw-.-4 .globl lj_vm_floor .hidden lj_vm_floor .type lj_vm_floor, @function .size lj_vm_floor, 0 lj_vm_floor: .globl lj_vm_floor_sse .hidden lj_vm_floor_sse .type lj_vm_floor_sse, @function .size lj_vm_floor_sse, 91 lj_vm_floor_sse: .byte 72,184,255,255,255,255,255,255,255,127,102,72,15,110,208,72 .byte 184,0,0,0,0,0,0,48,67,102,72,15,110,216,15,40 .byte 200,102,15,84,202,102,15,46,217,118,47,102,15,85,208,242 .byte 15,88,203,242,15,92,203,102,15,86,202,72,184,0,0,0 .byte 0,0,0,240,63,102,72,15,110,208,242,15,194,193,1,102 .byte 15,84,194,242,15,92,200,15,40,193,195 .globl lj_vm_ceil .hidden lj_vm_ceil .type lj_vm_ceil, @function .size lj_vm_ceil, 0 lj_vm_ceil: .globl lj_vm_ceil_sse .hidden lj_vm_ceil_sse .type lj_vm_ceil_sse, @function .size lj_vm_ceil_sse, 91 lj_vm_ceil_sse: .byte 72,184,255,255,255,255,255,255,255,127,102,72,15,110,208,72 .byte 184,0,0,0,0,0,0,48,67,102,72,15,110,216,15,40 .byte 200,102,15,84,202,102,15,46,217,118,47,102,15,85,208,242 .byte 15,88,203,242,15,92,203,102,15,86,202,72,184,0,0,0 .byte 0,0,0,240,191,102,72,15,110,208,242,15,194,193,6,102 .byte 15,84,194,242,15,92,200,15,40,193,195 .globl lj_vm_trunc .hidden lj_vm_trunc .type lj_vm_trunc, @function .size lj_vm_trunc, 0 lj_vm_trunc: .globl lj_vm_trunc_sse .hidden lj_vm_trunc_sse .type lj_vm_trunc_sse, @function .size lj_vm_trunc_sse, 94 lj_vm_trunc_sse: .byte 72,184,255,255,255,255,255,255,255,127,102,72,15,110,208,72 .byte 184,0,0,0,0,0,0,48,67,102,72,15,110,216,15,40 .byte 200,102,15,84,202,102,15,46,217,118,50,102,15,85,208,15 .byte 40,193,242,15,88,203,242,15,92,203,72,184,0,0,0,0 .byte 0,0,240,63,102,72,15,110,216,242,15,194,193,1,102,15 .byte 84,195,242,15,92,200,102,15,86,202,15,40,193,195 .globl lj_vm_mod .hidden lj_vm_mod .type lj_vm_mod, @function .size lj_vm_mod, 118 lj_vm_mod: .byte 15,40,232,242,15,94,193,72,184,255,255,255,255,255,255,255 .byte 127,102,72,15,110,208,72,184,0,0,0,0,0,0,48,67 .byte 102,72,15,110,216,15,40,224,102,15,84,226,102,15,46,220 .byte 118,56,102,15,85,208,242,15,88,227,242,15,92,227,102,15 .byte 86,226,72,184,0,0,0,0,0,0,240,63,102,72,15,110 .byte 208,242,15,194,196,1,102,15,84,194,242,15,92,224,15,40 .byte 197,242,15,89,204,242,15,92,193,195,242,15,89,200,15,40 .byte 197,242,15,92,193,195 .globl lj_vm_log2 .hidden lj_vm_log2 .type lj_vm_log2, @function .size lj_vm_log2, 25 lj_vm_log2: .byte 242,15,17,68,36,248,217,232,221,68,36,248,217,241,221,92 .byte 36,248,242,15,16,68,36,248,195 .globl lj_vm_exp_x87 .hidden lj_vm_exp_x87 .type lj_vm_exp_x87, @function .size lj_vm_exp_x87, 4 lj_vm_exp_x87: .byte 217,234,222,201 .globl lj_vm_exp2_x87 .hidden lj_vm_exp2_x87 .type lj_vm_exp2_x87, @function .size lj_vm_exp2_x87, 24 lj_vm_exp2_x87: .byte 217,84,36,248,129,124,36,248,0,0,128,127,116,28,129,124 .byte 36,248,0,0,128,255,116,19 .globl lj_vm_exp2raw .hidden lj_vm_exp2raw .type lj_vm_exp2raw, @function .size lj_vm_exp2raw, 24 lj_vm_exp2raw: .byte 217,192,217,252,220,233,217,201,217,240,217,232,222,193,217,253 .byte 221,217,195,221,216,217,238,195 .globl lj_vm_pow .hidden lj_vm_pow .type lj_vm_pow, @function .size lj_vm_pow, 0 lj_vm_pow: .globl lj_vm_pow_sse .hidden lj_vm_pow_sse .type lj_vm_pow_sse, @function .size lj_vm_pow_sse, 24 lj_vm_pow_sse: .byte 242,15,45,193,242,15,42,208,102,15,46,202,15,133,104,0 .byte 0,0,15,138,199,0,0,0 .globl lj_vm_powi_sse .hidden lj_vm_powi_sse .type lj_vm_powi_sse, @function .size lj_vm_powi_sse, 320 lj_vm_powi_sse: .byte 131,248,1,126,43,169,1,0,0,0,117,8,242,15,89,192 .byte 209,232,235,241,209,232,116,23,15,40,200,242,15,89,192,209 .byte 232,116,8,115,246,242,15,89,200,235,240,242,15,89,193,195 .byte 116,253,114,30,247,216,232,202,255,255,255,72,184,0,0,0 .byte 0,0,0,240,63,102,72,15,110,200,242,15,94,200,15,40 .byte 193,195,72,184,0,0,0,0,0,0,240,63,102,72,15,110 .byte 192,195,102,72,15,126,200,72,209,224,72,193,192,12,72,61 .byte 254,15,0,0,116,106,102,72,15,126,192,72,209,224,15,132 .byte 164,0,0,0,72,193,192,12,72,61,254,15,0,0,15,132 .byte 160,0,0,0,242,15,17,76,36,240,242,15,17,68,36,248 .byte 221,68,36,240,221,68,36,248,217,241,217,192,217,252,220,233 .byte 217,201,217,240,217,232,222,193,217,253,221,217,221,92,36,248 .byte 242,15,16,68,36,248,195,72,184,0,0,0,0,0,0,240 .byte 63,102,72,15,110,208,102,15,46,194,116,3,15,40,193,195 .byte 72,184,255,255,255,255,255,255,255,127,102,72,15,110,208,102 .byte 15,84,194,72,184,0,0,0,0,0,0,240,63,102,72,15 .byte 110,208,102,15,46,194,116,215,102,15,80,193,15,87,192,136 .byte 196,15,146,208,48,224,117,199,72,184,0,0,0,0,0,0 .byte 240,127,102,72,15,110,192,195,102,15,80,193,133,192,117,232 .byte 15,87,192,195,102,15,80,193,133,192,116,220,15,87,192,195 .globl lj_vm_foldfpm .hidden lj_vm_foldfpm .type lj_vm_foldfpm, @function .size lj_vm_foldfpm, 131 lj_vm_foldfpm: .byte 131,255,1,15,130,200,252,255,255,15,132,29,253,255,255,131 .byte 255,3,15,130,111,253,255,255,119,5,242,15,81,192,195,242 .byte 15,17,68,36,248,221,68,36,248,131,255,5,119,16,116,7 .byte 232,63,254,255,255,235,64,232,60,254,255,255,235,57,131,255 .byte 7,116,10,119,16,217,237,217,201,217,241,235,42,217,232,217 .byte 201,217,241,235,34,131,255,9,116,10,119,12,217,236,217,201 .byte 217,241,235,19,217,254,235,15,131,255,11,116,6,119,19,217 .byte 255,235,4,217,242,221,216,221,92,36,248,242,15,16,68,36 .byte 248,195,204 .globl lj_vm_foldarith .hidden lj_vm_foldarith .type lj_vm_foldarith, @function .size lj_vm_foldarith, 160 lj_vm_foldarith: .byte 131,255,1,116,7,119,10,242,15,88,193,195,242,15,92,193 .byte 195,131,255,3,116,7,119,10,242,15,89,193,195,242,15,94 .byte 193,195,131,255,5,15,130,55,253,255,255,15,132,244,253,255 .byte 255,131,255,7,116,21,119,38,72,184,0,0,0,0,0,0 .byte 0,128,102,72,15,110,200,15,87,193,195,72,184,255,255,255 .byte 255,255,255,255,127,102,72,15,110,200,15,84,193,195,131,255 .byte 9,119,43,242,15,17,68,36,248,242,15,17,76,36,240,221 .byte 68,36,248,221,68,36,240,116,13,217,243,221,92,36,248,242 .byte 15,16,68,36,248,195,217,201,217,253,221,217,235,237,131,255 .byte 11,116,7,119,10,242,15,93,193,195,242,15,95,193,195,204 .globl lj_vm_cpuid .hidden lj_vm_cpuid .type lj_vm_cpuid, @function .size lj_vm_cpuid, 18 lj_vm_cpuid: .byte 137,248,83,15,162,137,6,137,94,4,137,78,8,137,86,12 .byte 91,195 .globl lj_assert_bad_for_arg_type .hidden lj_assert_bad_for_arg_type .type lj_assert_bad_for_arg_type, @function .size lj_assert_bad_for_arg_type, 2 lj_assert_bad_for_arg_type: .byte 204,204 .globl lj_vm_ffi_callback .hidden lj_vm_ffi_callback .type lj_vm_ffi_callback, @function .size lj_vm_ffi_callback, 179 lj_vm_ffi_callback: .byte 83,65,87,65,86,72,131,236,40,68,141,181,176,11,0,0 .byte 139,157,252,0,0,0,15,183,192,137,131,208,0,0,0,72 .byte 137,123,112,72,137,115,120,72,137,147,128,0,0,0,72,137 .byte 139,136,0,0,0,242,15,17,67,48,242,15,17,75,56,242 .byte 15,17,83,64,242,15,17,91,72,72,141,68,36,80,76,137 .byte 131,144,0,0,0,76,137,139,152,0,0,0,242,15,17,99 .byte 80,242,15,17,107,88,242,15,17,115,96,242,15,17,123,104 .byte 72,137,131,176,0,0,0,72,137,230,137,92,36,28,137,223 .byte 232 .long lj_ccallback_enter-.-4 .byte 65,199,134,56,245,255,255,255,255,255,255,139,80,16,139,64 .byte 24,41,208,139,106,248,193,232,3,131,192,1,139,93,16,139 .byte 11,15,182,233,15,182,205,131,195,4,65,255,36,238 .globl lj_cont_ffi_callback .hidden lj_cont_ffi_callback .type lj_cont_ffi_callback, @function .size lj_cont_ffi_callback, 44 lj_cont_ffi_callback: .byte 139,76,36,24,65,139,158,76,245,255,255,72,137,75,16,137 .byte 81,16,137,105,24,137,223,137,198,232 .long lj_ccallback_leave-.-4 .byte 72,139,67,112,242,15,16,67,48,233,2,224,255,255 .globl lj_vm_ffi_call .hidden lj_vm_ffi_call .type lj_vm_ffi_call, @function .size lj_vm_ffi_call, 160 lj_vm_ffi_call: .byte 85,72,137,229,83,72,137,251,139,67,8,72,41,196,15,182 .byte 75,12,131,233,1,120,17,72,139,132,203,192,0,0,0,72 .byte 137,4,204,131,233,1,121,239,15,182,67,15,72,139,187,144 .byte 0,0,0,72,139,179,152,0,0,0,72,139,147,160,0,0 .byte 0,72,139,139,168,0,0,0,76,139,131,176,0,0,0,76 .byte 139,139,184,0,0,0,133,192,116,40,15,40,67,16,15,40 .byte 75,32,15,40,83,48,15,40,91,64,131,248,4,118,19,15 .byte 40,99,80,15,40,107,96,15,40,115,112,15,40,187,128,0 .byte 0,0,255,19,72,137,131,144,0,0,0,15,41,67,16,72 .byte 137,147,152,0,0,0,15,41,75,32,72,139,93,248,201,195 .section .note.GNU-stack,"",@progbits .ident "DynASM 1.3.0" .section .debug_frame,"",@progbits .Lframe0: .long .LECIE0-.LSCIE0 .LSCIE0: .long 0xffffffff .byte 0x1 .string "" .uleb128 0x1 .sleb128 -8 .byte 0x10 .byte 0xc .uleb128 0x7 .uleb128 8 .byte 0x80+0x10 .uleb128 0x1 .align 8 .LECIE0: .LSFDE0: .long .LEFDE0-.LASFDE0 .LASFDE0: .long .Lframe0 .quad .Lbegin .quad 14654 .byte 0xe .uleb128 80 .byte 0x86 .uleb128 0x2 .byte 0x83 .uleb128 0x3 .byte 0x8f .uleb128 0x4 .byte 0x8e .uleb128 0x5 .align 8 .LEFDE0: .LSFDE1: .long .LEFDE1-.LASFDE1 .LASFDE1: .long .Lframe0 .quad lj_vm_ffi_call .quad 160 .byte 0xe .uleb128 16 .byte 0x86 .uleb128 0x2 .byte 0xd .uleb128 0x6 .byte 0x83 .uleb128 0x3 .align 8 .LEFDE1: .section .eh_frame,"a",@progbits .Lframe1: .long .LECIE1-.LSCIE1 .LSCIE1: .long 0 .byte 0x1 .string "zPR" .uleb128 0x1 .sleb128 -8 .byte 0x10 .uleb128 6 .byte 0x1b .long lj_err_unwind_dwarf-. .byte 0x1b .byte 0xc .uleb128 0x7 .uleb128 8 .byte 0x80+0x10 .uleb128 0x1 .align 8 .LECIE1: .LSFDE2: .long .LEFDE2-.LASFDE2 .LASFDE2: .long .LASFDE2-.Lframe1 .long .Lbegin-. .long 14654 .uleb128 0 .byte 0xe .uleb128 80 .byte 0x86 .uleb128 0x2 .byte 0x83 .uleb128 0x3 .byte 0x8f .uleb128 0x4 .byte 0x8e .uleb128 0x5 .align 8 .LEFDE2: .Lframe2: .long .LECIE2-.LSCIE2 .LSCIE2: .long 0 .byte 0x1 .string "zR" .uleb128 0x1 .sleb128 -8 .byte 0x10 .uleb128 1 .byte 0x1b .byte 0xc .uleb128 0x7 .uleb128 8 .byte 0x80+0x10 .uleb128 0x1 .align 8 .LECIE2: .LSFDE3: .long .LEFDE3-.LASFDE3 .LASFDE3: .long .LASFDE3-.Lframe2 .long lj_vm_ffi_call-. .long 160 .uleb128 0 .byte 0xe .uleb128 16 .byte 0x86 .uleb128 0x2 .byte 0xd .uleb128 0x6 .byte 0x83 .uleb128 0x3 .align 8 .LEFDE3: tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_dispatch.c0000664000000000000000000003534312202141143023016 0ustar rootroot/* ** Instruction dispatch handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_dispatch_c #define LUA_CORE #include "lj_obj.h" #include "lj_err.h" #include "lj_func.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_meta.h" #include "lj_debug.h" #include "lj_state.h" #include "lj_frame.h" #include "lj_bc.h" #include "lj_ff.h" #if LJ_HASJIT #include "lj_jit.h" #endif #if LJ_HASFFI #include "lj_ccallback.h" #endif #include "lj_trace.h" #include "lj_dispatch.h" #include "lj_vm.h" #include "luajit.h" /* Bump GG_NUM_ASMFF in lj_dispatch.h as needed. Ugly. */ LJ_STATIC_ASSERT(GG_NUM_ASMFF == FF_NUM_ASMFUNC); /* -- Dispatch table management ------------------------------------------- */ #if LJ_TARGET_MIPS #include LJ_FUNCA_NORET void LJ_FASTCALL lj_ffh_coroutine_wrap_err(lua_State *L, lua_State *co); #define GOTFUNC(name) (ASMFunction)name, static const ASMFunction dispatch_got[] = { GOTDEF(GOTFUNC) }; #undef GOTFUNC #endif /* Initialize instruction dispatch table and hot counters. */ void lj_dispatch_init(GG_State *GG) { uint32_t i; ASMFunction *disp = GG->dispatch; for (i = 0; i < GG_LEN_SDISP; i++) disp[GG_LEN_DDISP+i] = disp[i] = makeasmfunc(lj_bc_ofs[i]); for (i = GG_LEN_SDISP; i < GG_LEN_DDISP; i++) disp[i] = makeasmfunc(lj_bc_ofs[i]); /* The JIT engine is off by default. luaopen_jit() turns it on. */ disp[BC_FORL] = disp[BC_IFORL]; disp[BC_ITERL] = disp[BC_IITERL]; disp[BC_LOOP] = disp[BC_ILOOP]; disp[BC_FUNCF] = disp[BC_IFUNCF]; disp[BC_FUNCV] = disp[BC_IFUNCV]; GG->g.bc_cfunc_ext = GG->g.bc_cfunc_int = BCINS_AD(BC_FUNCC, LUA_MINSTACK, 0); for (i = 0; i < GG_NUM_ASMFF; i++) GG->bcff[i] = BCINS_AD(BC__MAX+i, 0, 0); #if LJ_TARGET_MIPS memcpy(GG->got, dispatch_got, LJ_GOT__MAX*4); #endif } #if LJ_HASJIT /* Initialize hotcount table. */ void lj_dispatch_init_hotcount(global_State *g) { int32_t hotloop = G2J(g)->param[JIT_P_hotloop]; HotCount start = (HotCount)(hotloop*HOTCOUNT_LOOP - 1); HotCount *hotcount = G2GG(g)->hotcount; uint32_t i; for (i = 0; i < HOTCOUNT_SIZE; i++) hotcount[i] = start; } #endif /* Internal dispatch mode bits. */ #define DISPMODE_JIT 0x01 /* JIT compiler on. */ #define DISPMODE_REC 0x02 /* Recording active. */ #define DISPMODE_INS 0x04 /* Override instruction dispatch. */ #define DISPMODE_CALL 0x08 /* Override call dispatch. */ #define DISPMODE_RET 0x10 /* Override return dispatch. */ /* Update dispatch table depending on various flags. */ void lj_dispatch_update(global_State *g) { uint8_t oldmode = g->dispatchmode; uint8_t mode = 0; #if LJ_HASJIT mode |= (G2J(g)->flags & JIT_F_ON) ? DISPMODE_JIT : 0; mode |= G2J(g)->state != LJ_TRACE_IDLE ? (DISPMODE_REC|DISPMODE_INS|DISPMODE_CALL) : 0; #endif mode |= (g->hookmask & (LUA_MASKLINE|LUA_MASKCOUNT)) ? DISPMODE_INS : 0; mode |= (g->hookmask & LUA_MASKCALL) ? DISPMODE_CALL : 0; mode |= (g->hookmask & LUA_MASKRET) ? DISPMODE_RET : 0; if (oldmode != mode) { /* Mode changed? */ ASMFunction *disp = G2GG(g)->dispatch; ASMFunction f_forl, f_iterl, f_loop, f_funcf, f_funcv; g->dispatchmode = mode; /* Hotcount if JIT is on, but not while recording. */ if ((mode & (DISPMODE_JIT|DISPMODE_REC)) == DISPMODE_JIT) { f_forl = makeasmfunc(lj_bc_ofs[BC_FORL]); f_iterl = makeasmfunc(lj_bc_ofs[BC_ITERL]); f_loop = makeasmfunc(lj_bc_ofs[BC_LOOP]); f_funcf = makeasmfunc(lj_bc_ofs[BC_FUNCF]); f_funcv = makeasmfunc(lj_bc_ofs[BC_FUNCV]); } else { /* Otherwise use the non-hotcounting instructions. */ f_forl = disp[GG_LEN_DDISP+BC_IFORL]; f_iterl = disp[GG_LEN_DDISP+BC_IITERL]; f_loop = disp[GG_LEN_DDISP+BC_ILOOP]; f_funcf = makeasmfunc(lj_bc_ofs[BC_IFUNCF]); f_funcv = makeasmfunc(lj_bc_ofs[BC_IFUNCV]); } /* Init static counting instruction dispatch first (may be copied below). */ disp[GG_LEN_DDISP+BC_FORL] = f_forl; disp[GG_LEN_DDISP+BC_ITERL] = f_iterl; disp[GG_LEN_DDISP+BC_LOOP] = f_loop; /* Set dynamic instruction dispatch. */ if ((oldmode ^ mode) & (DISPMODE_REC|DISPMODE_INS)) { /* Need to update the whole table. */ if (!(mode & (DISPMODE_REC|DISPMODE_INS))) { /* No ins dispatch? */ /* Copy static dispatch table to dynamic dispatch table. */ memcpy(&disp[0], &disp[GG_LEN_DDISP], GG_LEN_SDISP*sizeof(ASMFunction)); /* Overwrite with dynamic return dispatch. */ if ((mode & DISPMODE_RET)) { disp[BC_RETM] = lj_vm_rethook; disp[BC_RET] = lj_vm_rethook; disp[BC_RET0] = lj_vm_rethook; disp[BC_RET1] = lj_vm_rethook; } } else { /* The recording dispatch also checks for hooks. */ ASMFunction f = (mode & DISPMODE_REC) ? lj_vm_record : lj_vm_inshook; uint32_t i; for (i = 0; i < GG_LEN_SDISP; i++) disp[i] = f; } } else if (!(mode & (DISPMODE_REC|DISPMODE_INS))) { /* Otherwise set dynamic counting ins. */ disp[BC_FORL] = f_forl; disp[BC_ITERL] = f_iterl; disp[BC_LOOP] = f_loop; /* Set dynamic return dispatch. */ if ((mode & DISPMODE_RET)) { disp[BC_RETM] = lj_vm_rethook; disp[BC_RET] = lj_vm_rethook; disp[BC_RET0] = lj_vm_rethook; disp[BC_RET1] = lj_vm_rethook; } else { disp[BC_RETM] = disp[GG_LEN_DDISP+BC_RETM]; disp[BC_RET] = disp[GG_LEN_DDISP+BC_RET]; disp[BC_RET0] = disp[GG_LEN_DDISP+BC_RET0]; disp[BC_RET1] = disp[GG_LEN_DDISP+BC_RET1]; } } /* Set dynamic call dispatch. */ if ((oldmode ^ mode) & DISPMODE_CALL) { /* Update the whole table? */ uint32_t i; if ((mode & DISPMODE_CALL) == 0) { /* No call hooks? */ for (i = GG_LEN_SDISP; i < GG_LEN_DDISP; i++) disp[i] = makeasmfunc(lj_bc_ofs[i]); } else { for (i = GG_LEN_SDISP; i < GG_LEN_DDISP; i++) disp[i] = lj_vm_callhook; } } if (!(mode & DISPMODE_CALL)) { /* Overwrite dynamic counting ins. */ disp[BC_FUNCF] = f_funcf; disp[BC_FUNCV] = f_funcv; } #if LJ_HASJIT /* Reset hotcounts for JIT off to on transition. */ if ((mode & DISPMODE_JIT) && !(oldmode & DISPMODE_JIT)) lj_dispatch_init_hotcount(g); #endif } } /* -- JIT mode setting ---------------------------------------------------- */ #if LJ_HASJIT /* Set JIT mode for a single prototype. */ static void setptmode(global_State *g, GCproto *pt, int mode) { if ((mode & LUAJIT_MODE_ON)) { /* (Re-)enable JIT compilation. */ pt->flags &= ~PROTO_NOJIT; lj_trace_reenableproto(pt); /* Unpatch all ILOOP etc. bytecodes. */ } else { /* Flush and/or disable JIT compilation. */ if (!(mode & LUAJIT_MODE_FLUSH)) pt->flags |= PROTO_NOJIT; lj_trace_flushproto(g, pt); /* Flush all traces of prototype. */ } } /* Recursively set the JIT mode for all children of a prototype. */ static void setptmode_all(global_State *g, GCproto *pt, int mode) { ptrdiff_t i; if (!(pt->flags & PROTO_CHILD)) return; for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) { GCobj *o = proto_kgc(pt, i); if (o->gch.gct == ~LJ_TPROTO) { setptmode(g, gco2pt(o), mode); setptmode_all(g, gco2pt(o), mode); } } } #endif /* Public API function: control the JIT engine. */ int luaJIT_setmode(lua_State *L, int idx, int mode) { global_State *g = G(L); int mm = mode & LUAJIT_MODE_MASK; lj_trace_abort(g); /* Abort recording on any state change. */ /* Avoid pulling the rug from under our own feet. */ if ((g->hookmask & HOOK_GC)) lj_err_caller(L, LJ_ERR_NOGCMM); switch (mm) { #if LJ_HASJIT case LUAJIT_MODE_ENGINE: if ((mode & LUAJIT_MODE_FLUSH)) { lj_trace_flushall(L); } else { if (!(mode & LUAJIT_MODE_ON)) G2J(g)->flags &= ~(uint32_t)JIT_F_ON; #if LJ_TARGET_X86ORX64 else if ((G2J(g)->flags & JIT_F_SSE2)) G2J(g)->flags |= (uint32_t)JIT_F_ON; else return 0; /* Don't turn on JIT compiler without SSE2 support. */ #else else G2J(g)->flags |= (uint32_t)JIT_F_ON; #endif lj_dispatch_update(g); } break; case LUAJIT_MODE_FUNC: case LUAJIT_MODE_ALLFUNC: case LUAJIT_MODE_ALLSUBFUNC: { cTValue *tv = idx == 0 ? frame_prev(L->base-1) : idx > 0 ? L->base + (idx-1) : L->top + idx; GCproto *pt; if ((idx == 0 || tvisfunc(tv)) && isluafunc(&gcval(tv)->fn)) pt = funcproto(&gcval(tv)->fn); /* Cannot use funcV() for frame slot. */ else if (tvisproto(tv)) pt = protoV(tv); else return 0; /* Failed. */ if (mm != LUAJIT_MODE_ALLSUBFUNC) setptmode(g, pt, mode); if (mm != LUAJIT_MODE_FUNC) setptmode_all(g, pt, mode); break; } case LUAJIT_MODE_TRACE: if (!(mode & LUAJIT_MODE_FLUSH)) return 0; /* Failed. */ lj_trace_flush(G2J(g), idx); break; #else case LUAJIT_MODE_ENGINE: case LUAJIT_MODE_FUNC: case LUAJIT_MODE_ALLFUNC: case LUAJIT_MODE_ALLSUBFUNC: UNUSED(idx); if ((mode & LUAJIT_MODE_ON)) return 0; /* Failed. */ break; #endif case LUAJIT_MODE_WRAPCFUNC: if ((mode & LUAJIT_MODE_ON)) { if (idx != 0) { cTValue *tv = idx > 0 ? L->base + (idx-1) : L->top + idx; if (tvislightud(tv)) g->wrapf = (lua_CFunction)lightudV(tv); else return 0; /* Failed. */ } else { return 0; /* Failed. */ } g->bc_cfunc_ext = BCINS_AD(BC_FUNCCW, 0, 0); } else { g->bc_cfunc_ext = BCINS_AD(BC_FUNCC, 0, 0); } break; default: return 0; /* Failed. */ } return 1; /* OK. */ } /* Enforce (dynamic) linker error for version mismatches. See luajit.c. */ LUA_API void LUAJIT_VERSION_SYM(void) { } /* -- Hooks --------------------------------------------------------------- */ /* This function can be called asynchronously (e.g. during a signal). */ LUA_API int lua_sethook(lua_State *L, lua_Hook func, int mask, int count) { global_State *g = G(L); mask &= HOOK_EVENTMASK; if (func == NULL || mask == 0) { mask = 0; func = NULL; } /* Consistency. */ g->hookf = func; g->hookcount = g->hookcstart = (int32_t)count; g->hookmask = (uint8_t)((g->hookmask & ~HOOK_EVENTMASK) | mask); lj_trace_abort(g); /* Abort recording on any hook change. */ lj_dispatch_update(g); return 1; } LUA_API lua_Hook lua_gethook(lua_State *L) { return G(L)->hookf; } LUA_API int lua_gethookmask(lua_State *L) { return G(L)->hookmask & HOOK_EVENTMASK; } LUA_API int lua_gethookcount(lua_State *L) { return (int)G(L)->hookcstart; } /* Call a hook. */ static void callhook(lua_State *L, int event, BCLine line) { global_State *g = G(L); lua_Hook hookf = g->hookf; if (hookf && !hook_active(g)) { lua_Debug ar; lj_trace_abort(g); /* Abort recording on any hook call. */ ar.event = event; ar.currentline = line; /* Top frame, nextframe = NULL. */ ar.i_ci = (int)((L->base-1) - tvref(L->stack)); lj_state_checkstack(L, 1+LUA_MINSTACK); hook_enter(g); hookf(L, &ar); lua_assert(hook_active(g)); hook_leave(g); } } /* -- Dispatch callbacks -------------------------------------------------- */ /* Calculate number of used stack slots in the current frame. */ static BCReg cur_topslot(GCproto *pt, const BCIns *pc, uint32_t nres) { BCIns ins = pc[-1]; if (bc_op(ins) == BC_UCLO) ins = pc[bc_j(ins)]; switch (bc_op(ins)) { case BC_CALLM: case BC_CALLMT: return bc_a(ins) + bc_c(ins) + nres-1+1; case BC_RETM: return bc_a(ins) + bc_d(ins) + nres-1; case BC_TSETM: return bc_a(ins) + nres-1; default: return pt->framesize; } } /* Instruction dispatch. Used by instr/line/return hooks or when recording. */ void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc) { ERRNO_SAVE GCfunc *fn = curr_func(L); GCproto *pt = funcproto(fn); void *cf = cframe_raw(L->cframe); const BCIns *oldpc = cframe_pc(cf); global_State *g = G(L); BCReg slots; setcframe_pc(cf, pc); slots = cur_topslot(pt, pc, cframe_multres_n(cf)); L->top = L->base + slots; /* Fix top. */ #if LJ_HASJIT { jit_State *J = G2J(g); if (J->state != LJ_TRACE_IDLE) { #ifdef LUA_USE_ASSERT ptrdiff_t delta = L->top - L->base; #endif J->L = L; lj_trace_ins(J, pc-1); /* The interpreter bytecode PC is offset by 1. */ lua_assert(L->top - L->base == delta); } } #endif if ((g->hookmask & LUA_MASKCOUNT) && g->hookcount == 0) { g->hookcount = g->hookcstart; callhook(L, LUA_HOOKCOUNT, -1); L->top = L->base + slots; /* Fix top again. */ } if ((g->hookmask & LUA_MASKLINE)) { BCPos npc = proto_bcpos(pt, pc) - 1; BCPos opc = proto_bcpos(pt, oldpc) - 1; BCLine line = lj_debug_line(pt, npc); if (pc <= oldpc || opc >= pt->sizebc || line != lj_debug_line(pt, opc)) { callhook(L, LUA_HOOKLINE, line); L->top = L->base + slots; /* Fix top again. */ } } if ((g->hookmask & LUA_MASKRET) && bc_isret(bc_op(pc[-1]))) callhook(L, LUA_HOOKRET, -1); ERRNO_RESTORE } /* Initialize call. Ensure stack space and return # of missing parameters. */ static int call_init(lua_State *L, GCfunc *fn) { if (isluafunc(fn)) { GCproto *pt = funcproto(fn); int numparams = pt->numparams; int gotparams = (int)(L->top - L->base); int need = pt->framesize; if ((pt->flags & PROTO_VARARG)) need += 1+gotparams; lj_state_checkstack(L, (MSize)need); numparams -= gotparams; return numparams >= 0 ? numparams : 0; } else { lj_state_checkstack(L, LUA_MINSTACK); return 0; } } /* Call dispatch. Used by call hooks, hot calls or when recording. */ ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc) { ERRNO_SAVE GCfunc *fn = curr_func(L); BCOp op; global_State *g = G(L); #if LJ_HASJIT jit_State *J = G2J(g); #endif int missing = call_init(L, fn); #if LJ_HASJIT J->L = L; if ((uintptr_t)pc & 1) { /* Marker for hot call. */ #ifdef LUA_USE_ASSERT ptrdiff_t delta = L->top - L->base; #endif pc = (const BCIns *)((uintptr_t)pc & ~(uintptr_t)1); lj_trace_hot(J, pc); lua_assert(L->top - L->base == delta); goto out; } else if (J->state != LJ_TRACE_IDLE && !(g->hookmask & (HOOK_GC|HOOK_VMEVENT))) { #ifdef LUA_USE_ASSERT ptrdiff_t delta = L->top - L->base; #endif /* Record the FUNC* bytecodes, too. */ lj_trace_ins(J, pc-1); /* The interpreter bytecode PC is offset by 1. */ lua_assert(L->top - L->base == delta); } #endif if ((g->hookmask & LUA_MASKCALL)) { int i; for (i = 0; i < missing; i++) /* Add missing parameters. */ setnilV(L->top++); callhook(L, LUA_HOOKCALL, -1); /* Preserve modifications of missing parameters by lua_setlocal(). */ while (missing-- > 0 && tvisnil(L->top - 1)) L->top--; } #if LJ_HASJIT out: #endif op = bc_op(pc[-1]); /* Get FUNC* op. */ #if LJ_HASJIT /* Use the non-hotcounting variants if JIT is off or while recording. */ if ((!(J->flags & JIT_F_ON) || J->state != LJ_TRACE_IDLE) && (op == BC_FUNCF || op == BC_FUNCV)) op = (BCOp)((int)op+(int)BC_IFUNCF-(int)BC_FUNCF); #endif ERRNO_RESTORE return makeasmfunc(lj_bc_ofs[op]); /* Return static dispatch target. */ } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ffrecord.c0000664000000000000000000006632012202141143023010 0ustar rootroot/* ** Fast function call recorder. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_ffrecord_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_frame.h" #include "lj_bc.h" #include "lj_ff.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_ircall.h" #include "lj_iropt.h" #include "lj_trace.h" #include "lj_record.h" #include "lj_ffrecord.h" #include "lj_crecord.h" #include "lj_dispatch.h" #include "lj_vm.h" #include "lj_strscan.h" /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) /* -- Fast function recording handlers ------------------------------------ */ /* Conventions for fast function call handlers: ** ** The argument slots start at J->base[0]. All of them are guaranteed to be ** valid and type-specialized references. J->base[J->maxslot] is set to 0 ** as a sentinel. The runtime argument values start at rd->argv[0]. ** ** In general fast functions should check for presence of all of their ** arguments and for the correct argument types. Some simplifications ** are allowed if the interpreter throws instead. But even if recording ** is aborted, the generated IR must be consistent (no zero-refs). ** ** The number of results in rd->nres is set to 1. Handlers that return ** a different number of results need to override it. A negative value ** prevents return processing (e.g. for pending calls). ** ** Results need to be stored starting at J->base[0]. Return processing ** moves them to the right slots later. ** ** The per-ffid auxiliary data is the value of the 2nd part of the ** LJLIB_REC() annotation. This allows handling similar functionality ** in a common handler. */ /* Type of handler to record a fast function. */ typedef void (LJ_FASTCALL *RecordFunc)(jit_State *J, RecordFFData *rd); /* Get runtime value of int argument. */ static int32_t argv2int(jit_State *J, TValue *o) { if (!lj_strscan_numberobj(o)) lj_trace_err(J, LJ_TRERR_BADTYPE); return tvisint(o) ? intV(o) : lj_num2int(numV(o)); } /* Get runtime value of string argument. */ static GCstr *argv2str(jit_State *J, TValue *o) { if (LJ_LIKELY(tvisstr(o))) { return strV(o); } else { GCstr *s; if (!tvisnumber(o)) lj_trace_err(J, LJ_TRERR_BADTYPE); if (tvisint(o)) s = lj_str_fromint(J->L, intV(o)); else s = lj_str_fromnum(J->L, &o->n); setstrV(J->L, o, s); return s; } } /* Return number of results wanted by caller. */ static ptrdiff_t results_wanted(jit_State *J) { TValue *frame = J->L->base-1; if (frame_islua(frame)) return (ptrdiff_t)bc_b(frame_pc(frame)[-1]) - 1; else return -1; } /* Throw error for unsupported variant of fast function. */ LJ_NORET static void recff_nyiu(jit_State *J) { setfuncV(J->L, &J->errinfo, J->fn); lj_trace_err_info(J, LJ_TRERR_NYIFFU); } /* Fallback handler for all fast functions that are not recorded (yet). */ static void LJ_FASTCALL recff_nyi(jit_State *J, RecordFFData *rd) { setfuncV(J->L, &J->errinfo, J->fn); lj_trace_err_info(J, LJ_TRERR_NYIFF); UNUSED(rd); } /* C functions can have arbitrary side-effects and are not recorded (yet). */ static void LJ_FASTCALL recff_c(jit_State *J, RecordFFData *rd) { setfuncV(J->L, &J->errinfo, J->fn); lj_trace_err_info(J, LJ_TRERR_NYICF); UNUSED(rd); } /* -- Base library fast functions ----------------------------------------- */ static void LJ_FASTCALL recff_assert(jit_State *J, RecordFFData *rd) { /* Arguments already specialized. The interpreter throws for nil/false. */ rd->nres = J->maxslot; /* Pass through all arguments. */ } static void LJ_FASTCALL recff_type(jit_State *J, RecordFFData *rd) { /* Arguments already specialized. Result is a constant string. Neat, huh? */ uint32_t t; if (tvisnumber(&rd->argv[0])) t = ~LJ_TNUMX; else if (LJ_64 && tvislightud(&rd->argv[0])) t = ~LJ_TLIGHTUD; else t = ~itype(&rd->argv[0]); J->base[0] = lj_ir_kstr(J, strV(&J->fn->c.upvalue[t])); UNUSED(rd); } static void LJ_FASTCALL recff_getmetatable(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; if (tr) { RecordIndex ix; ix.tab = tr; copyTV(J->L, &ix.tabv, &rd->argv[0]); if (lj_record_mm_lookup(J, &ix, MM_metatable)) J->base[0] = ix.mobj; else J->base[0] = ix.mt; } /* else: Interpreter will throw. */ } static void LJ_FASTCALL recff_setmetatable(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; TRef mt = J->base[1]; if (tref_istab(tr) && (tref_istab(mt) || (mt && tref_isnil(mt)))) { TRef fref, mtref; RecordIndex ix; ix.tab = tr; copyTV(J->L, &ix.tabv, &rd->argv[0]); lj_record_mm_lookup(J, &ix, MM_metatable); /* Guard for no __metatable. */ fref = emitir(IRT(IR_FREF, IRT_P32), tr, IRFL_TAB_META); mtref = tref_isnil(mt) ? lj_ir_knull(J, IRT_TAB) : mt; emitir(IRT(IR_FSTORE, IRT_TAB), fref, mtref); if (!tref_isnil(mt)) emitir(IRT(IR_TBAR, IRT_TAB), tr, 0); J->base[0] = tr; J->needsnap = 1; } /* else: Interpreter will throw. */ } static void LJ_FASTCALL recff_rawget(jit_State *J, RecordFFData *rd) { RecordIndex ix; ix.tab = J->base[0]; ix.key = J->base[1]; if (tref_istab(ix.tab) && ix.key) { ix.val = 0; ix.idxchain = 0; settabV(J->L, &ix.tabv, tabV(&rd->argv[0])); copyTV(J->L, &ix.keyv, &rd->argv[1]); J->base[0] = lj_record_idx(J, &ix); } /* else: Interpreter will throw. */ } static void LJ_FASTCALL recff_rawset(jit_State *J, RecordFFData *rd) { RecordIndex ix; ix.tab = J->base[0]; ix.key = J->base[1]; ix.val = J->base[2]; if (tref_istab(ix.tab) && ix.key && ix.val) { ix.idxchain = 0; settabV(J->L, &ix.tabv, tabV(&rd->argv[0])); copyTV(J->L, &ix.keyv, &rd->argv[1]); copyTV(J->L, &ix.valv, &rd->argv[2]); lj_record_idx(J, &ix); /* Pass through table at J->base[0] as result. */ } /* else: Interpreter will throw. */ } static void LJ_FASTCALL recff_rawequal(jit_State *J, RecordFFData *rd) { TRef tra = J->base[0]; TRef trb = J->base[1]; if (tra && trb) { int diff = lj_record_objcmp(J, tra, trb, &rd->argv[0], &rd->argv[1]); J->base[0] = diff ? TREF_FALSE : TREF_TRUE; } /* else: Interpreter will throw. */ } #if LJ_52 static void LJ_FASTCALL recff_rawlen(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; if (tref_isstr(tr)) J->base[0] = emitir(IRTI(IR_FLOAD), tr, IRFL_STR_LEN); else if (tref_istab(tr)) J->base[0] = lj_ir_call(J, IRCALL_lj_tab_len, tr); /* else: Interpreter will throw. */ UNUSED(rd); } #endif /* Determine mode of select() call. */ int32_t lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv) { if (tref_isstr(tr) && *strVdata(tv) == '#') { /* select('#', ...) */ if (strV(tv)->len == 1) { emitir(IRTG(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv))); } else { TRef trptr = emitir(IRT(IR_STRREF, IRT_P32), tr, lj_ir_kint(J, 0)); TRef trchar = emitir(IRT(IR_XLOAD, IRT_U8), trptr, IRXLOAD_READONLY); emitir(IRTG(IR_EQ, IRT_INT), trchar, lj_ir_kint(J, '#')); } return 0; } else { /* select(n, ...) */ int32_t start = argv2int(J, tv); if (start == 0) lj_trace_err(J, LJ_TRERR_BADTYPE); /* A bit misleading. */ return start; } } static void LJ_FASTCALL recff_select(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; if (tr) { ptrdiff_t start = lj_ffrecord_select_mode(J, tr, &rd->argv[0]); if (start == 0) { /* select('#', ...) */ J->base[0] = lj_ir_kint(J, J->maxslot - 1); } else if (tref_isk(tr)) { /* select(k, ...) */ ptrdiff_t n = (ptrdiff_t)J->maxslot; if (start < 0) start += n; else if (start > n) start = n; rd->nres = n - start; if (start >= 1) { ptrdiff_t i; for (i = 0; i < n - start; i++) J->base[i] = J->base[start+i]; } /* else: Interpreter will throw. */ } else { recff_nyiu(J); } } /* else: Interpreter will throw. */ } static void LJ_FASTCALL recff_tonumber(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; TRef base = J->base[1]; if (tr && !tref_isnil(base)) { base = lj_opt_narrow_toint(J, base); if (!tref_isk(base) || IR(tref_ref(base))->i != 10) recff_nyiu(J); } if (tref_isnumber_str(tr)) { if (tref_isstr(tr)) { TValue tmp; if (!lj_strscan_num(strV(&rd->argv[0]), &tmp)) recff_nyiu(J); /* Would need an inverted STRTO for this case. */ tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0); } #if LJ_HASFFI } else if (tref_iscdata(tr)) { lj_crecord_tonumber(J, rd); return; #endif } else { tr = TREF_NIL; } J->base[0] = tr; UNUSED(rd); } static TValue *recff_metacall_cp(lua_State *L, lua_CFunction dummy, void *ud) { jit_State *J = (jit_State *)ud; lj_record_tailcall(J, 0, 1); UNUSED(L); UNUSED(dummy); return NULL; } static int recff_metacall(jit_State *J, RecordFFData *rd, MMS mm) { RecordIndex ix; ix.tab = J->base[0]; copyTV(J->L, &ix.tabv, &rd->argv[0]); if (lj_record_mm_lookup(J, &ix, mm)) { /* Has metamethod? */ int errcode; TValue argv0; /* Temporarily insert metamethod below object. */ J->base[1] = J->base[0]; J->base[0] = ix.mobj; copyTV(J->L, &argv0, &rd->argv[0]); copyTV(J->L, &rd->argv[1], &rd->argv[0]); copyTV(J->L, &rd->argv[0], &ix.mobjv); /* Need to protect lj_record_tailcall because it may throw. */ errcode = lj_vm_cpcall(J->L, NULL, J, recff_metacall_cp); /* Always undo Lua stack changes to avoid confusing the interpreter. */ copyTV(J->L, &rd->argv[0], &argv0); if (errcode) lj_err_throw(J->L, errcode); /* Propagate errors. */ rd->nres = -1; /* Pending call. */ return 1; /* Tailcalled to metamethod. */ } return 0; } static void LJ_FASTCALL recff_tostring(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; if (tref_isstr(tr)) { /* Ignore __tostring in the string base metatable. */ /* Pass on result in J->base[0]. */ } else if (!recff_metacall(J, rd, MM_tostring)) { if (tref_isnumber(tr)) { J->base[0] = emitir(IRT(IR_TOSTR, IRT_STR), tr, 0); } else if (tref_ispri(tr)) { J->base[0] = lj_ir_kstr(J, strV(&J->fn->c.upvalue[tref_type(tr)])); } else { recff_nyiu(J); } } } static void LJ_FASTCALL recff_ipairs_aux(jit_State *J, RecordFFData *rd) { RecordIndex ix; ix.tab = J->base[0]; if (tref_istab(ix.tab)) { if (!tvisnumber(&rd->argv[1])) /* No support for string coercion. */ lj_trace_err(J, LJ_TRERR_BADTYPE); setintV(&ix.keyv, numberVint(&rd->argv[1])+1); settabV(J->L, &ix.tabv, tabV(&rd->argv[0])); ix.val = 0; ix.idxchain = 0; ix.key = lj_opt_narrow_toint(J, J->base[1]); J->base[0] = ix.key = emitir(IRTI(IR_ADD), ix.key, lj_ir_kint(J, 1)); J->base[1] = lj_record_idx(J, &ix); rd->nres = tref_isnil(J->base[1]) ? 0 : 2; } /* else: Interpreter will throw. */ } static void LJ_FASTCALL recff_ipairs(jit_State *J, RecordFFData *rd) { if (!(LJ_52 && recff_metacall(J, rd, MM_ipairs))) { TRef tab = J->base[0]; if (tref_istab(tab)) { J->base[0] = lj_ir_kfunc(J, funcV(&J->fn->c.upvalue[0])); J->base[1] = tab; J->base[2] = lj_ir_kint(J, 0); rd->nres = 3; } /* else: Interpreter will throw. */ } } static void LJ_FASTCALL recff_pcall(jit_State *J, RecordFFData *rd) { if (J->maxslot >= 1) { lj_record_call(J, 0, J->maxslot - 1); rd->nres = -1; /* Pending call. */ } /* else: Interpreter will throw. */ } static TValue *recff_xpcall_cp(lua_State *L, lua_CFunction dummy, void *ud) { jit_State *J = (jit_State *)ud; lj_record_call(J, 1, J->maxslot - 2); UNUSED(L); UNUSED(dummy); return NULL; } static void LJ_FASTCALL recff_xpcall(jit_State *J, RecordFFData *rd) { if (J->maxslot >= 2) { TValue argv0, argv1; TRef tmp; int errcode; /* Swap function and traceback. */ tmp = J->base[0]; J->base[0] = J->base[1]; J->base[1] = tmp; copyTV(J->L, &argv0, &rd->argv[0]); copyTV(J->L, &argv1, &rd->argv[1]); copyTV(J->L, &rd->argv[0], &argv1); copyTV(J->L, &rd->argv[1], &argv0); /* Need to protect lj_record_call because it may throw. */ errcode = lj_vm_cpcall(J->L, NULL, J, recff_xpcall_cp); /* Always undo Lua stack swap to avoid confusing the interpreter. */ copyTV(J->L, &rd->argv[0], &argv0); copyTV(J->L, &rd->argv[1], &argv1); if (errcode) lj_err_throw(J->L, errcode); /* Propagate errors. */ rd->nres = -1; /* Pending call. */ } /* else: Interpreter will throw. */ } /* -- Math library fast functions ----------------------------------------- */ static void LJ_FASTCALL recff_math_abs(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonum(J, J->base[0]); J->base[0] = emitir(IRTN(IR_ABS), tr, lj_ir_knum_abs(J)); UNUSED(rd); } /* Record rounding functions math.floor and math.ceil. */ static void LJ_FASTCALL recff_math_round(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; if (!tref_isinteger(tr)) { /* Pass through integers unmodified. */ tr = emitir(IRTN(IR_FPMATH), lj_ir_tonum(J, tr), rd->data); /* Result is integral (or NaN/Inf), but may not fit an int32_t. */ if (LJ_DUALNUM) { /* Try to narrow using a guarded conversion to int. */ lua_Number n = lj_vm_foldfpm(numberVnum(&rd->argv[0]), rd->data); if (n == (lua_Number)lj_num2int(n)) tr = emitir(IRTGI(IR_CONV), tr, IRCONV_INT_NUM|IRCONV_CHECK); } J->base[0] = tr; } } /* Record unary math.* functions, mapped to IR_FPMATH opcode. */ static void LJ_FASTCALL recff_math_unary(jit_State *J, RecordFFData *rd) { J->base[0] = emitir(IRTN(IR_FPMATH), lj_ir_tonum(J, J->base[0]), rd->data); } /* Record math.log. */ static void LJ_FASTCALL recff_math_log(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonum(J, J->base[0]); if (J->base[1]) { #ifdef LUAJIT_NO_LOG2 uint32_t fpm = IRFPM_LOG; #else uint32_t fpm = IRFPM_LOG2; #endif TRef trb = lj_ir_tonum(J, J->base[1]); tr = emitir(IRTN(IR_FPMATH), tr, fpm); trb = emitir(IRTN(IR_FPMATH), trb, fpm); trb = emitir(IRTN(IR_DIV), lj_ir_knum_one(J), trb); tr = emitir(IRTN(IR_MUL), tr, trb); } else { tr = emitir(IRTN(IR_FPMATH), tr, IRFPM_LOG); } J->base[0] = tr; UNUSED(rd); } /* Record math.atan2. */ static void LJ_FASTCALL recff_math_atan2(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonum(J, J->base[0]); TRef tr2 = lj_ir_tonum(J, J->base[1]); J->base[0] = emitir(IRTN(IR_ATAN2), tr, tr2); UNUSED(rd); } /* Record math.ldexp. */ static void LJ_FASTCALL recff_math_ldexp(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonum(J, J->base[0]); #if LJ_TARGET_X86ORX64 TRef tr2 = lj_ir_tonum(J, J->base[1]); #else TRef tr2 = lj_opt_narrow_toint(J, J->base[1]); #endif J->base[0] = emitir(IRTN(IR_LDEXP), tr, tr2); UNUSED(rd); } /* Record math.asin, math.acos, math.atan. */ static void LJ_FASTCALL recff_math_atrig(jit_State *J, RecordFFData *rd) { TRef y = lj_ir_tonum(J, J->base[0]); TRef x = lj_ir_knum_one(J); uint32_t ffid = rd->data; if (ffid != FF_math_atan) { TRef tmp = emitir(IRTN(IR_MUL), y, y); tmp = emitir(IRTN(IR_SUB), x, tmp); tmp = emitir(IRTN(IR_FPMATH), tmp, IRFPM_SQRT); if (ffid == FF_math_asin) { x = tmp; } else { x = y; y = tmp; } } J->base[0] = emitir(IRTN(IR_ATAN2), y, x); } static void LJ_FASTCALL recff_math_htrig(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonum(J, J->base[0]); J->base[0] = emitir(IRTN(IR_CALLN), tr, rd->data); } static void LJ_FASTCALL recff_math_modf(jit_State *J, RecordFFData *rd) { TRef tr = J->base[0]; if (tref_isinteger(tr)) { J->base[0] = tr; J->base[1] = lj_ir_kint(J, 0); } else { TRef trt; tr = lj_ir_tonum(J, tr); trt = emitir(IRTN(IR_FPMATH), tr, IRFPM_TRUNC); J->base[0] = trt; J->base[1] = emitir(IRTN(IR_SUB), tr, trt); } rd->nres = 2; } static void LJ_FASTCALL recff_math_degrad(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonum(J, J->base[0]); TRef trm = lj_ir_knum(J, numV(&J->fn->c.upvalue[0])); J->base[0] = emitir(IRTN(IR_MUL), tr, trm); UNUSED(rd); } static void LJ_FASTCALL recff_math_pow(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonum(J, J->base[0]); if (!tref_isnumber_str(J->base[1])) lj_trace_err(J, LJ_TRERR_BADTYPE); J->base[0] = lj_opt_narrow_pow(J, tr, J->base[1], &rd->argv[1]); UNUSED(rd); } static void LJ_FASTCALL recff_math_minmax(jit_State *J, RecordFFData *rd) { TRef tr = lj_ir_tonumber(J, J->base[0]); uint32_t op = rd->data; BCReg i; for (i = 1; J->base[i] != 0; i++) { TRef tr2 = lj_ir_tonumber(J, J->base[i]); IRType t = IRT_INT; if (!(tref_isinteger(tr) && tref_isinteger(tr2))) { if (tref_isinteger(tr)) tr = emitir(IRTN(IR_CONV), tr, IRCONV_NUM_INT); if (tref_isinteger(tr2)) tr2 = emitir(IRTN(IR_CONV), tr2, IRCONV_NUM_INT); t = IRT_NUM; } tr = emitir(IRT(op, t), tr, tr2); } J->base[0] = tr; } static void LJ_FASTCALL recff_math_random(jit_State *J, RecordFFData *rd) { GCudata *ud = udataV(&J->fn->c.upvalue[0]); TRef tr, one; lj_ir_kgc(J, obj2gco(ud), IRT_UDATA); /* Prevent collection. */ tr = lj_ir_call(J, IRCALL_lj_math_random_step, lj_ir_kptr(J, uddata(ud))); one = lj_ir_knum_one(J); tr = emitir(IRTN(IR_SUB), tr, one); if (J->base[0]) { TRef tr1 = lj_ir_tonum(J, J->base[0]); if (J->base[1]) { /* d = floor(d*(r2-r1+1.0)) + r1 */ TRef tr2 = lj_ir_tonum(J, J->base[1]); tr2 = emitir(IRTN(IR_SUB), tr2, tr1); tr2 = emitir(IRTN(IR_ADD), tr2, one); tr = emitir(IRTN(IR_MUL), tr, tr2); tr = emitir(IRTN(IR_FPMATH), tr, IRFPM_FLOOR); tr = emitir(IRTN(IR_ADD), tr, tr1); } else { /* d = floor(d*r1) + 1.0 */ tr = emitir(IRTN(IR_MUL), tr, tr1); tr = emitir(IRTN(IR_FPMATH), tr, IRFPM_FLOOR); tr = emitir(IRTN(IR_ADD), tr, one); } } J->base[0] = tr; UNUSED(rd); } /* -- Bit library fast functions ------------------------------------------ */ /* Record unary bit.tobit, bit.bnot, bit.bswap. */ static void LJ_FASTCALL recff_bit_unary(jit_State *J, RecordFFData *rd) { TRef tr = lj_opt_narrow_tobit(J, J->base[0]); J->base[0] = (rd->data == IR_TOBIT) ? tr : emitir(IRTI(rd->data), tr, 0); } /* Record N-ary bit.band, bit.bor, bit.bxor. */ static void LJ_FASTCALL recff_bit_nary(jit_State *J, RecordFFData *rd) { TRef tr = lj_opt_narrow_tobit(J, J->base[0]); uint32_t op = rd->data; BCReg i; for (i = 1; J->base[i] != 0; i++) tr = emitir(IRTI(op), tr, lj_opt_narrow_tobit(J, J->base[i])); J->base[0] = tr; } /* Record bit shifts. */ static void LJ_FASTCALL recff_bit_shift(jit_State *J, RecordFFData *rd) { TRef tr = lj_opt_narrow_tobit(J, J->base[0]); TRef tsh = lj_opt_narrow_tobit(J, J->base[1]); IROp op = (IROp)rd->data; if (!(op < IR_BROL ? LJ_TARGET_MASKSHIFT : LJ_TARGET_MASKROT) && !tref_isk(tsh)) tsh = emitir(IRTI(IR_BAND), tsh, lj_ir_kint(J, 31)); #ifdef LJ_TARGET_UNIFYROT if (op == (LJ_TARGET_UNIFYROT == 1 ? IR_BROR : IR_BROL)) { op = LJ_TARGET_UNIFYROT == 1 ? IR_BROL : IR_BROR; tsh = emitir(IRTI(IR_NEG), tsh, tsh); } #endif J->base[0] = emitir(IRTI(op), tr, tsh); } /* -- String library fast functions --------------------------------------- */ static void LJ_FASTCALL recff_string_len(jit_State *J, RecordFFData *rd) { J->base[0] = emitir(IRTI(IR_FLOAD), lj_ir_tostr(J, J->base[0]), IRFL_STR_LEN); UNUSED(rd); } /* Handle string.byte (rd->data = 0) and string.sub (rd->data = 1). */ static void LJ_FASTCALL recff_string_range(jit_State *J, RecordFFData *rd) { TRef trstr = lj_ir_tostr(J, J->base[0]); TRef trlen = emitir(IRTI(IR_FLOAD), trstr, IRFL_STR_LEN); TRef tr0 = lj_ir_kint(J, 0); TRef trstart, trend; GCstr *str = argv2str(J, &rd->argv[0]); int32_t start, end; if (rd->data) { /* string.sub(str, start [,end]) */ start = argv2int(J, &rd->argv[1]); trstart = lj_opt_narrow_toint(J, J->base[1]); trend = J->base[2]; if (tref_isnil(trend)) { trend = lj_ir_kint(J, -1); end = -1; } else { trend = lj_opt_narrow_toint(J, trend); end = argv2int(J, &rd->argv[2]); } } else { /* string.byte(str, [,start [,end]]) */ if (!tref_isnil(J->base[1])) { start = argv2int(J, &rd->argv[1]); trstart = lj_opt_narrow_toint(J, J->base[1]); trend = J->base[2]; if (tref_isnil(trend)) { trend = trstart; end = start; } else { trend = lj_opt_narrow_toint(J, trend); end = argv2int(J, &rd->argv[2]); } } else { trend = trstart = lj_ir_kint(J, 1); end = start = 1; } } if (end < 0) { emitir(IRTGI(IR_LT), trend, tr0); trend = emitir(IRTI(IR_ADD), emitir(IRTI(IR_ADD), trlen, trend), lj_ir_kint(J, 1)); end = end+(int32_t)str->len+1; } else if ((MSize)end <= str->len) { emitir(IRTGI(IR_ULE), trend, trlen); } else { emitir(IRTGI(IR_GT), trend, trlen); end = (int32_t)str->len; trend = trlen; } if (start < 0) { emitir(IRTGI(IR_LT), trstart, tr0); trstart = emitir(IRTI(IR_ADD), trlen, trstart); start = start+(int32_t)str->len; emitir(start < 0 ? IRTGI(IR_LT) : IRTGI(IR_GE), trstart, tr0); if (start < 0) { trstart = tr0; start = 0; } } else { if (start == 0) { emitir(IRTGI(IR_EQ), trstart, tr0); trstart = tr0; } else { trstart = emitir(IRTI(IR_ADD), trstart, lj_ir_kint(J, -1)); emitir(IRTGI(IR_GE), trstart, tr0); start--; } } if (rd->data) { /* Return string.sub result. */ if (end - start >= 0) { /* Also handle empty range here, to avoid extra traces. */ TRef trptr, trslen = emitir(IRTI(IR_SUB), trend, trstart); emitir(IRTGI(IR_GE), trslen, tr0); trptr = emitir(IRT(IR_STRREF, IRT_P32), trstr, trstart); J->base[0] = emitir(IRT(IR_SNEW, IRT_STR), trptr, trslen); } else { /* Range underflow: return empty string. */ emitir(IRTGI(IR_LT), trend, trstart); J->base[0] = lj_ir_kstr(J, lj_str_new(J->L, strdata(str), 0)); } } else { /* Return string.byte result(s). */ ptrdiff_t i, len = end - start; if (len > 0) { TRef trslen = emitir(IRTI(IR_SUB), trend, trstart); emitir(IRTGI(IR_EQ), trslen, lj_ir_kint(J, (int32_t)len)); if (J->baseslot + len > LJ_MAX_JSLOTS) lj_trace_err_info(J, LJ_TRERR_STACKOV); rd->nres = len; for (i = 0; i < len; i++) { TRef tmp = emitir(IRTI(IR_ADD), trstart, lj_ir_kint(J, (int32_t)i)); tmp = emitir(IRT(IR_STRREF, IRT_P32), trstr, tmp); J->base[i] = emitir(IRT(IR_XLOAD, IRT_U8), tmp, IRXLOAD_READONLY); } } else { /* Empty range or range underflow: return no results. */ emitir(IRTGI(IR_LE), trend, trstart); rd->nres = 0; } } } /* -- Table library fast functions ---------------------------------------- */ static void LJ_FASTCALL recff_table_getn(jit_State *J, RecordFFData *rd) { if (tref_istab(J->base[0])) J->base[0] = lj_ir_call(J, IRCALL_lj_tab_len, J->base[0]); /* else: Interpreter will throw. */ UNUSED(rd); } static void LJ_FASTCALL recff_table_remove(jit_State *J, RecordFFData *rd) { TRef tab = J->base[0]; rd->nres = 0; if (tref_istab(tab)) { if (tref_isnil(J->base[1])) { /* Simple pop: t[#t] = nil */ TRef trlen = lj_ir_call(J, IRCALL_lj_tab_len, tab); GCtab *t = tabV(&rd->argv[0]); MSize len = lj_tab_len(t); emitir(IRTGI(len ? IR_NE : IR_EQ), trlen, lj_ir_kint(J, 0)); if (len) { RecordIndex ix; ix.tab = tab; ix.key = trlen; settabV(J->L, &ix.tabv, t); setintV(&ix.keyv, len); ix.idxchain = 0; if (results_wanted(J) != 0) { /* Specialize load only if needed. */ ix.val = 0; J->base[0] = lj_record_idx(J, &ix); /* Load previous value. */ rd->nres = 1; /* Assumes ix.key/ix.tab is not modified for raw lj_record_idx(). */ } ix.val = TREF_NIL; lj_record_idx(J, &ix); /* Remove value. */ } } else { /* Complex case: remove in the middle. */ recff_nyiu(J); } } /* else: Interpreter will throw. */ } static void LJ_FASTCALL recff_table_insert(jit_State *J, RecordFFData *rd) { RecordIndex ix; ix.tab = J->base[0]; ix.val = J->base[1]; rd->nres = 0; if (tref_istab(ix.tab) && ix.val) { if (!J->base[2]) { /* Simple push: t[#t+1] = v */ TRef trlen = lj_ir_call(J, IRCALL_lj_tab_len, ix.tab); GCtab *t = tabV(&rd->argv[0]); ix.key = emitir(IRTI(IR_ADD), trlen, lj_ir_kint(J, 1)); settabV(J->L, &ix.tabv, t); setintV(&ix.keyv, lj_tab_len(t) + 1); ix.idxchain = 0; lj_record_idx(J, &ix); /* Set new value. */ } else { /* Complex case: insert in the middle. */ recff_nyiu(J); } } /* else: Interpreter will throw. */ } /* -- I/O library fast functions ------------------------------------------ */ /* Get FILE* for I/O function. Any I/O error aborts recording, so there's ** no need to encode the alternate cases for any of the guards. */ static TRef recff_io_fp(jit_State *J, TRef *udp, int32_t id) { TRef tr, ud, fp; if (id) { /* io.func() */ tr = lj_ir_kptr(J, &J2G(J)->gcroot[id]); ud = emitir(IRT(IR_XLOAD, IRT_UDATA), tr, 0); } else { /* fp:method() */ ud = J->base[0]; if (!tref_isudata(ud)) lj_trace_err(J, LJ_TRERR_BADTYPE); tr = emitir(IRT(IR_FLOAD, IRT_U8), ud, IRFL_UDATA_UDTYPE); emitir(IRTGI(IR_EQ), tr, lj_ir_kint(J, UDTYPE_IO_FILE)); } *udp = ud; fp = emitir(IRT(IR_FLOAD, IRT_PTR), ud, IRFL_UDATA_FILE); emitir(IRTG(IR_NE, IRT_PTR), fp, lj_ir_knull(J, IRT_PTR)); return fp; } static void LJ_FASTCALL recff_io_write(jit_State *J, RecordFFData *rd) { TRef ud, fp = recff_io_fp(J, &ud, rd->data); TRef zero = lj_ir_kint(J, 0); TRef one = lj_ir_kint(J, 1); ptrdiff_t i = rd->data == 0 ? 1 : 0; for (; J->base[i]; i++) { TRef str = lj_ir_tostr(J, J->base[i]); TRef buf = emitir(IRT(IR_STRREF, IRT_P32), str, zero); TRef len = emitir(IRTI(IR_FLOAD), str, IRFL_STR_LEN); if (tref_isk(len) && IR(tref_ref(len))->i == 1) { TRef tr = emitir(IRT(IR_XLOAD, IRT_U8), buf, IRXLOAD_READONLY); tr = lj_ir_call(J, IRCALL_fputc, tr, fp); if (results_wanted(J) != 0) /* Check result only if not ignored. */ emitir(IRTGI(IR_NE), tr, lj_ir_kint(J, -1)); } else { TRef tr = lj_ir_call(J, IRCALL_fwrite, buf, one, len, fp); if (results_wanted(J) != 0) /* Check result only if not ignored. */ emitir(IRTGI(IR_EQ), tr, len); } } J->base[0] = LJ_52 ? ud : TREF_TRUE; } static void LJ_FASTCALL recff_io_flush(jit_State *J, RecordFFData *rd) { TRef ud, fp = recff_io_fp(J, &ud, rd->data); TRef tr = lj_ir_call(J, IRCALL_fflush, fp); if (results_wanted(J) != 0) /* Check result only if not ignored. */ emitir(IRTGI(IR_EQ), tr, lj_ir_kint(J, 0)); J->base[0] = TREF_TRUE; } /* -- Record calls to fast functions -------------------------------------- */ #include "lj_recdef.h" static uint32_t recdef_lookup(GCfunc *fn) { if (fn->c.ffid < sizeof(recff_idmap)/sizeof(recff_idmap[0])) return recff_idmap[fn->c.ffid]; else return 0; } /* Record entry to a fast function or C function. */ void lj_ffrecord_func(jit_State *J) { RecordFFData rd; uint32_t m = recdef_lookup(J->fn); rd.data = m & 0xff; rd.nres = 1; /* Default is one result. */ rd.argv = J->L->base; J->base[J->maxslot] = 0; /* Mark end of arguments. */ (recff_func[m >> 8])(J, &rd); /* Call recff_* handler. */ if (rd.nres >= 0) { if (J->postproc == LJ_POST_NONE) J->postproc = LJ_POST_FFRETRY; lj_record_ret(J, 0, rd.nres); } } #undef IR #undef emitir #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_narrow.o0000664000000000000000000003361012213333055023427 0ustar rootrootELF>@@ UHLϰI@fA9puD@A9r A1AtHHuθ]UHD8 DLǰAAD8 fApfAP AH ]UHH]LeLmLuH HAAH?HGL,AEPˀv<7C%=usA)HtD`YAAcOHCH9CsEAuDHpAuDH`HCAU AD HHCHCD HHCH]LeLmLuUH,*ȸf.zt] t1UH~vl]fUHAWAVAUATSHIAL/IuL4EFAUAFfG%=wRA6THGAHHGA|$ }ID$HID$_AAD$u;H,H*f.IT$BHIT$, 9*f.ID$pHID$A@AE@9sgH9uR@Vt2HA3L$u;AD"HEAA9|ID$HID$QP9rA(AAT$%= u EOÉẺLGHtIT$@HIT$A|$ u:n"uL Ht%IT$@BHIT$AAcaMl$M;l$sUA6DL~EAvDLkEA;D$$IT$ANA L$ ˉHIT$AMl$ID$HID$  A>fH[A\A]A^A_]UHH]LeLmLuL}HPIUȉMDLwDMfAfEvfALA$ILfuYL;xspAD$fALJUfAfALJ LAD$LKfuYL9wtuHcsHLsHLA$IL;szIT$H u:L9uAT$fxIO с@y  fDžAL$AT$ffAfAfALAD$LLfEtALLH9HI9tHh[A\A]A^A_]UHvu fLJUffLJn"fHOHrDFAwMDBfExBEF A@x1@փ fffD]UHSHH%=u fLJXffLJƉ%=u#fǃUffǃnH/v Hs7HH[]UHATSI%=u"fLJXfA$fLJÉ%=u9H8CLfADŽ$VfA$fA$L1v Ls6L[A\]UHv%=u fLJUffLJ 7z]UHH]LeLmLuL}H@HAAHMMEΉ%=uRfLJXffLJAHEȃxt HEȋ8HD%=uPfǃXfDfǃHAAtA?LAF؃DDA~AvJAHEȁxvJHExt2AF % ffDfDHD%=t%fǃUfDfǃHAD%=t%fǃUfDfǃHAAAfDfDfDHH]LeLmLuL}UHH]LeLmH HAIՉ%=uMfLJXffLJAA}t A}LDA}vBA,E=t/Hfǃ6ffDH]fǃUfDfǃHAHHHfǃ.fDfHH]LeLmUHH]LeLmLuH HAAĨyu9Hu H DwtDwcI$HtZHAfǃ fDfHfǃ,fDfDHDHADHADfǃ+fDfDHfǃ4ffǃHfǃ*ffDHfǃ)fDfHH]LeLmLuUHH]LeLmLuH0HAAI̓yu9Hu HA}vEMmLmE<lfEx]AHCHЀxtHxx2LmED,AA5AAADvYD%=u%fǃXfDfǃHAfǃUfDfǃn2HAEtcfEy]Hfǃ(fDfHAžHfǃfDfHfǃ-fDfDHA5fEx@AHCHЀxt[H?H9DHAfxcHCHЀxt^f.z)u'fǃ4fDfǃHAyfǃ4fDfǃHfǃ*ffDHfǃ4ffǃHAAHCHDH]LeLmLuUHH]LeLmLuH H~wDn Aw DvAvuI?HsL&HsL AvJCAvJf(XKf.rf. f. <҃H]LeLmLulj_opt_narrow.c(((o)->it) < 0xfffeffffu)sp >= nc->stack+1next < lastsp >= nc->stack+2sp == nc->stack+1(((vb)->it) == (~4u))(((vc)->it) == (~4u))lj_obj.h(((vc)->it) < 0xfffeffffu)((((((tr))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM)))((&J->cur.ir[(((IRRef1)(rb)))]))->o == IR_KNUM((&J->cur.ir[(((IRRef1)(rc)))]))->o == IR_KNUM(((&tv[FORL_IDX])->it) <= 0xfffeffffu) && (((&tv[FORL_STOP])->it) <= 0xfffeffffu) && (((&tv[FORL_STEP])->it) <= 0xfffeffffu)narrow_conv_emitlj_opt_narrow_indexlj_opt_narrow_cindexlj_opt_narrow_arithnumberVnumlj_opt_narrow_unmnumberVintlj_opt_narrow_powlj_opt_narrow_forlnarrow_forl?AGCC: (Debian 4.7.3-4) 4.7.3zRx BAC } <5AC p $\AC T  AC [ (DJC m F A (AC M (UAC X8 ((AC P TAC   tAC E  AC C lAC g (eAC XH $WAC PB $0AC Tv $X8AC T (6AC T .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @(P &X,X12X@2-OPW0 d0Pmmp}5  ! %B B5/wG] P}D\ uU @`t / Ha  z )  7 .= lR\ efuW86lj_opt_narrow.cnarrow_bpc_getnarrow_bpc_setnarrow_stripov_backpropnumisintnarrow_forl__PRETTY_FUNCTION__.4579narrow_conv_backpropnarrow_stripov__PRETTY_FUNCTION__.4498__PRETTY_FUNCTION__.4524__PRETTY_FUNCTION__.4537__PRETTY_FUNCTION__.4549__PRETTY_FUNCTION__.3444__PRETTY_FUNCTION__.4555__PRETTY_FUNCTION__.3440__PRETTY_FUNCTION__.4570__PRETTY_FUNCTION__.4584.LC13.LC15.LC16.LC17__assert_faillj_opt_foldlj_opt_narrow_convertlj_ir_emitlj_ir_kint64lj_ir_kintlj_opt_narrow_indexlj_opt_narrow_tointlj_trace_errlj_opt_narrow_tobitlj_ir_knum_u64lj_opt_narrow_cindexlj_opt_narrow_arithlj_strscan_numlj_vm_foldarithlj_opt_narrow_unmlj_ir_k64lj_opt_narrow_modlj_ir_tonumlj_opt_narrow_powlj_opt_narrow_forl   !" "$   *! "A K P <U!n%&   H!G "  Z !   !( " " " " )m " + " ) @   !E " " ` l ! . "' `1 6 ; !F . t  ! t  ! /"H"|"""  $ )!5.Y c h m!&""1"H.Y)&""330"Q"q"".)   !B L Q PV!""&8"H&h""   P!3    !H"o""" ( - 2! t  ! t  ! @B`w]},)X x 7  \ 4\tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_debug.o0000664000000000000000000003772012213333050022324 0ustar rootrootELF>"@@ UHF<t<t9~ Hu"HG0HH@H9BuJLG0HGIHH9s8HσuIH H)uM@ IHcH)H9rI@ HHHLEAHFAEv_AH)H*#VHH)H;Bw]UHH Hv(ȃ2AA!AD H@xH]UHAWAVAUATSHG>ujHGxtDhHHUHBHHEHEEEFBt%uHuN$H HMȅHHUF H9w HtH9vHED(A}UIT$8HUIL$HMc.ffid == 0)(*vararg)(*temporary)pc <= pt->sizebcidx < pt->sizeuvlocalglobalmethodfieldupvaluemetamethodpc < pt->sizebc%s:%d: %s%s%s:%d%p:%d"%s":%dlj_obj.hLuamain(((func)->it) == (~8u))offset != 0fn->c.gct == ~(~8u)=[C]C%s stack traceback: ...Snlf(((L1->top-1)->it) == (~8u)) [builtin#%d]: %s:%d: in function '%s' in main chunk at %p in function <%s:%d>fn->c.gct == ~(~8u) || fn->c.gct == ~(~6u)bc_isret(((BCOp)((ins[-1])&0xff)))(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc", "lj_debug.c", 270, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((pt)->k).ptr32)[(~(ptrdiff_t)((BCReg)((ins)>>16)))]).gcptr32))))->gch.gct == ~(~4u)(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc", "lj_debug.c", 273, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((pt)->k).ptr32)[(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff)))]).gcptr32))))->gch.gct == ~(~4u)!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))frame <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)) && (!nextframe || nextframe <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(for index)(for limit)(for step)(for generator)(for state)(for control)lj_debug_uvnamelj_debug_slotnamelj_debug_funcnamedebug_framepcdebug_framelinecopyTVdebug_localnamelj_debug_getinfosetgcVluaL_tracebackGCC: (Debian 4.7.3-4) 4.7.3zRx DAC ? <CAC ~ (\AC M (AC Xd AC  bAC ]  oAC Ee LLC Y (8ajC S ^ A (d AC M $7AC I)  AC C $AC Tx $AC T  ,AC E  PAC E} (tAC M AC K $cAC PN (XAC PC .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @. &,12@2WOW0`up= ("h& H+ D3DCFTcd}oP` #<  UcrubFLa 7J 6   -A N _jy cpXlj_debug.cdebug_framepc__PRETTY_FUNCTION__.4592debug_read_uleb128debug_varnamedebug_localname__PRETTY_FUNCTION__.4654debug_frameline__PRETTY_FUNCTION__.4613__PRETTY_FUNCTION__.4660__PRETTY_FUNCTION__.4686__PRETTY_FUNCTION__.4703__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.4767__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4811__assert_faillj_debug_framelj_debug_linelj_debug_uvnamelj_debug_uvnamevlj_debug_slotnamelj_bc_modelj_debug_funcnamelj_debug_shortnamestrncpystrcpylj_debug_addloclj_str_pushflj_debug_pushloclua_getlocallj_state_growstack1lua_setlocallj_debug_getinfolj_tab_newlj_tab_setinthlua_getinfolua_getstackluaL_tracebacklua_pushfstringlua_pushlstringlua_concat   %  0' .     1 L V [  ` )     # ( 6-4V P` e Hj G G6 YN  `  X  `   , _M `W \ Pas `}   m f s         & {j # $ #! $~ "  &  & B O &a n &  &  &( 2 7 h< X )  h I S X ]       1 ; @ E"    ! G   0"L)t,    "-h r w 0|)+/ 1  2/  2(/? #G.W a f (k E1 U1 [1 _1 q2. ;1L Y1{3/3 @D`cuF<hJ 6  0 T x  ptarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_dce.c0000664000000000000000000000364112202141143022630 0ustar rootroot/* ** DCE: Dead Code Elimination. Pre-LOOP only -- ASM already performs DCE. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_opt_dce_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Scan through all snapshots and mark all referenced instructions. */ static void dce_marksnap(jit_State *J) { SnapNo i, nsnap = J->cur.nsnap; for (i = 0; i < nsnap; i++) { SnapShot *snap = &J->cur.snap[i]; SnapEntry *map = &J->cur.snapmap[snap->mapofs]; MSize n, nent = snap->nent; for (n = 0; n < nent; n++) { IRRef ref = snap_ref(map[n]); if (ref >= REF_FIRST) irt_setmark(IR(ref)->t); } } } /* Backwards propagate marks. Replace unused instructions with NOPs. */ static void dce_propagate(jit_State *J) { IRRef1 *pchain[IR__MAX]; IRRef ins; uint32_t i; for (i = 0; i < IR__MAX; i++) pchain[i] = &J->chain[i]; for (ins = J->cur.nins-1; ins >= REF_FIRST; ins--) { IRIns *ir = IR(ins); if (irt_ismarked(ir->t)) { irt_clearmark(ir->t); pchain[ir->o] = &ir->prev; } else if (!ir_sideeff(ir)) { *pchain[ir->o] = ir->prev; /* Reroute original instruction chain. */ ir->t.irt = IRT_NIL; ir->o = IR_NOP; /* Replace instruction with NOP. */ ir->op1 = ir->op2 = 0; ir->prev = 0; continue; } if (ir->op1 >= REF_FIRST) irt_setmark(IR(ir->op1)->t); if (ir->op2 >= REF_FIRST) irt_setmark(IR(ir->op2)->t); } } /* Dead Code Elimination. ** ** First backpropagate marks for all used instructions. Then replace ** the unused ones with a NOP. Note that compressing the IR to eliminate ** the NOPs does not pay off. */ void lj_opt_dce(jit_State *J) { if ((J->flags & JIT_F_OPT_DCE)) { dce_marksnap(J); dce_propagate(J); } } #undef IR #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vmevent.h0000664000000000000000000000304312202141143022700 0ustar rootroot/* ** VM event handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_VMEVENT_H #define _LJ_VMEVENT_H #include "lj_obj.h" /* Registry key for VM event handler table. */ #define LJ_VMEVENTS_REGKEY "_VMEVENTS" #define LJ_VMEVENTS_HSIZE 4 #define VMEVENT_MASK(ev) ((uint8_t)1 << ((int)(ev) & 7)) #define VMEVENT_HASH(ev) ((int)(ev) & ~7) #define VMEVENT_HASHIDX(h) ((int)(h) << 3) #define VMEVENT_NOCACHE 255 #define VMEVENT_DEF(name, hash) \ LJ_VMEVENT_##name##_, \ LJ_VMEVENT_##name = ((LJ_VMEVENT_##name##_) & 7)|((hash) << 3) /* VM event IDs. */ typedef enum { VMEVENT_DEF(BC, 0x00003883), VMEVENT_DEF(TRACE, 0xb2d91467), VMEVENT_DEF(RECORD, 0x9284bf4f), VMEVENT_DEF(TEXIT, 0xb29df2b0), LJ_VMEVENT__MAX } VMEvent; #ifdef LUAJIT_DISABLE_VMEVENT #define lj_vmevent_send(L, ev, args) UNUSED(L) #define lj_vmevent_send_(L, ev, args, post) UNUSED(L) #else #define lj_vmevent_send(L, ev, args) \ if (G(L)->vmevmask & VMEVENT_MASK(LJ_VMEVENT_##ev)) { \ ptrdiff_t argbase = lj_vmevent_prepare(L, LJ_VMEVENT_##ev); \ if (argbase) { \ args \ lj_vmevent_call(L, argbase); \ } \ } #define lj_vmevent_send_(L, ev, args, post) \ if (G(L)->vmevmask & VMEVENT_MASK(LJ_VMEVENT_##ev)) { \ ptrdiff_t argbase = lj_vmevent_prepare(L, LJ_VMEVENT_##ev); \ if (argbase) { \ args \ lj_vmevent_call(L, argbase); \ post \ } \ } LJ_FUNC ptrdiff_t lj_vmevent_prepare(lua_State *L, VMEvent ev); LJ_FUNC void lj_vmevent_call(lua_State *L, ptrdiff_t argbase); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_strscan.c0000664000000000000000000003600112202141143022664 0ustar rootroot/* ** String scanning. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include #define lj_strscan_c #define LUA_CORE #include "lj_obj.h" #include "lj_char.h" #include "lj_strscan.h" /* -- Scanning numbers ---------------------------------------------------- */ /* ** Rationale for the builtin string to number conversion library: ** ** It removes a dependency on libc's strtod(), which is a true portability ** nightmare. Mainly due to the plethora of supported OS and toolchain ** combinations. Sadly, the various implementations ** a) are often buggy, incomplete (no hex floats) and/or imprecise, ** b) sometimes crash or hang on certain inputs, ** c) return non-standard NaNs that need to be filtered out, and ** d) fail if the locale-specific decimal separator is not a dot, ** which can only be fixed with atrocious workarounds. ** ** Also, most of the strtod() implementations are hopelessly bloated, ** which is not just an I-cache hog, but a problem for static linkage ** on embedded systems, too. ** ** OTOH the builtin conversion function is very compact. Even though it ** does a lot more, like parsing long longs, octal or imaginary numbers ** and returning the result in different formats: ** a) It needs less than 3 KB (!) of machine code (on x64 with -Os), ** b) it doesn't perform any dynamic allocation and, ** c) it needs only around 600 bytes of stack space. ** ** The builtin function is faster than strtod() for typical inputs, e.g. ** "123", "1.5" or "1e6". Arguably, it's slower for very large exponents, ** which are not very common (this could be fixed, if needed). ** ** And most importantly, the builtin function is equally precise on all ** platforms. It correctly converts and rounds any input to a double. ** If this is not the case, please send a bug report -- but PLEASE verify ** that the implementation you're comparing to is not the culprit! ** ** The implementation quickly pre-scans the entire string first and ** handles simple integers on-the-fly. Otherwise, it dispatches to the ** base-specific parser. Hex and octal is straightforward. ** ** Decimal to binary conversion uses a fixed-length circular buffer in ** base 100. Some simple cases are handled directly. For other cases, the ** number in the buffer is up-scaled or down-scaled until the integer part ** is in the proper range. Then the integer part is rounded and converted ** to a double which is finally rescaled to the result. Denormals need ** special treatment to prevent incorrect 'double rounding'. */ /* Definitions for circular decimal digit buffer (base 100 = 2 digits/byte). */ #define STRSCAN_DIG 1024 #define STRSCAN_MAXDIG 800 /* 772 + extra are sufficient. */ #define STRSCAN_DDIG (STRSCAN_DIG/2) #define STRSCAN_DMASK (STRSCAN_DDIG-1) /* Helpers for circular buffer. */ #define DNEXT(a) (((a)+1) & STRSCAN_DMASK) #define DPREV(a) (((a)-1) & STRSCAN_DMASK) #define DLEN(lo, hi) ((int32_t)(((lo)-(hi)) & STRSCAN_DMASK)) #define casecmp(c, k) (((c) | 0x20) == k) /* Final conversion to double. */ static void strscan_double(uint64_t x, TValue *o, int32_t ex2, int32_t neg) { double n; /* Avoid double rounding for denormals. */ if (LJ_UNLIKELY(ex2 <= -1075 && x != 0)) { /* NYI: all of this generates way too much code on 32 bit CPUs. */ #if defined(__GNUC__) && LJ_64 int32_t b = (int32_t)(__builtin_clzll(x)^63); #else int32_t b = (x>>32) ? 32+(int32_t)lj_fls((uint32_t)(x>>32)) : (int32_t)lj_fls((uint32_t)x); #endif if ((int32_t)b + ex2 <= -1023 && (int32_t)b + ex2 >= -1075) { uint64_t rb = (uint64_t)1 << (-1075-ex2); if ((x & rb) && ((x & (rb+rb+rb-1)))) x += rb+rb; x = (x & ~(rb+rb-1)); } } /* Convert to double using a signed int64_t conversion, then rescale. */ lua_assert((int64_t)x >= 0); n = (double)(int64_t)x; if (neg) n = -n; if (ex2) n = ldexp(n, ex2); o->n = n; } /* Parse hexadecimal number. */ static StrScanFmt strscan_hex(const uint8_t *p, TValue *o, StrScanFmt fmt, uint32_t opt, int32_t ex2, int32_t neg, uint32_t dig) { uint64_t x = 0; uint32_t i; /* Scan hex digits. */ for (i = dig > 16 ? 16 : dig ; i; i--, p++) { uint32_t d = (*p != '.' ? *p : *++p); if (d > '9') d += 9; x = (x << 4) + (d & 15); } /* Summarize rounding-effect of excess digits. */ for (i = 16; i < dig; i++, p++) x |= ((*p != '.' ? *p : *++p) != '0'), ex2 += 4; /* Format-specific handling. */ switch (fmt) { case STRSCAN_INT: if (!(opt & STRSCAN_OPT_TONUM) && x < 0x80000000u+neg) { o->i = neg ? -(int32_t)x : (int32_t)x; return STRSCAN_INT; /* Fast path for 32 bit integers. */ } if (!(opt & STRSCAN_OPT_C)) { fmt = STRSCAN_NUM; break; } /* fallthrough */ case STRSCAN_U32: if (dig > 8) return STRSCAN_ERROR; o->i = neg ? -(int32_t)x : (int32_t)x; return STRSCAN_U32; case STRSCAN_I64: case STRSCAN_U64: if (dig > 16) return STRSCAN_ERROR; o->u64 = neg ? (uint64_t)-(int64_t)x : x; return fmt; default: break; } /* Reduce range then convert to double. */ if ((x & U64x(c0000000,0000000))) { x = (x >> 2) | (x & 3); ex2 += 2; } strscan_double(x, o, ex2, neg); return fmt; } /* Parse octal number. */ static StrScanFmt strscan_oct(const uint8_t *p, TValue *o, StrScanFmt fmt, int32_t neg, uint32_t dig) { uint64_t x = 0; /* Scan octal digits. */ if (dig > 22 || (dig == 22 && *p > '1')) return STRSCAN_ERROR; while (dig-- > 0) { if (!(*p >= '0' && *p <= '7')) return STRSCAN_ERROR; x = (x << 3) + (*p++ & 7); } /* Format-specific handling. */ switch (fmt) { case STRSCAN_INT: if (x >= 0x80000000u+neg) fmt = STRSCAN_U32; /* fallthrough */ case STRSCAN_U32: if ((x >> 32)) return STRSCAN_ERROR; o->i = neg ? -(int32_t)x : (int32_t)x; break; default: case STRSCAN_I64: case STRSCAN_U64: o->u64 = neg ? (uint64_t)-(int64_t)x : x; break; } return fmt; } /* Parse decimal number. */ static StrScanFmt strscan_dec(const uint8_t *p, TValue *o, StrScanFmt fmt, uint32_t opt, int32_t ex10, int32_t neg, uint32_t dig) { uint8_t xi[STRSCAN_DDIG], *xip = xi; if (dig) { uint32_t i = dig; if (i > STRSCAN_MAXDIG) { ex10 += (int32_t)(i - STRSCAN_MAXDIG); i = STRSCAN_MAXDIG; } /* Scan unaligned leading digit. */ if (((ex10^i) & 1)) *xip++ = ((*p != '.' ? *p : *++p) & 15), i--, p++; /* Scan aligned double-digits. */ for ( ; i > 1; i -= 2) { uint32_t d = 10 * ((*p != '.' ? *p : *++p) & 15); p++; *xip++ = d + ((*p != '.' ? *p : *++p) & 15); p++; } /* Scan and realign trailing digit. */ if (i) *xip++ = 10 * ((*p != '.' ? *p : *++p) & 15), ex10--, p++; /* Summarize rounding-effect of excess digits. */ if (dig > STRSCAN_MAXDIG) { do { if ((*p != '.' ? *p : *++p) != '0') { xip[-1] |= 1; break; } p++; } while (--dig > STRSCAN_MAXDIG); dig = STRSCAN_MAXDIG; } else { /* Simplify exponent. */ while (ex10 > 0 && dig <= 18) *xip++ = 0, ex10 -= 2, dig += 2; } } else { /* Only got zeros. */ ex10 = 0; xi[0] = 0; } /* Fast path for numbers in integer format (but handles e.g. 1e6, too). */ if (dig <= 20 && ex10 == 0) { uint8_t *xis; uint64_t x = xi[0]; double n; for (xis = xi+1; xis < xip; xis++) x = x * 100 + *xis; if (!(dig == 20 && (xi[0] > 18 || (int64_t)x >= 0))) { /* No overflow? */ /* Format-specific handling. */ switch (fmt) { case STRSCAN_INT: if (!(opt & STRSCAN_OPT_TONUM) && x < 0x80000000u+neg) { o->i = neg ? -(int32_t)x : (int32_t)x; return STRSCAN_INT; /* Fast path for 32 bit integers. */ } if (!(opt & STRSCAN_OPT_C)) { fmt = STRSCAN_NUM; goto plainnumber; } /* fallthrough */ case STRSCAN_U32: if ((x >> 32) != 0) return STRSCAN_ERROR; o->i = neg ? -(int32_t)x : (int32_t)x; return STRSCAN_U32; case STRSCAN_I64: case STRSCAN_U64: o->u64 = neg ? (uint64_t)-(int64_t)x : x; return fmt; default: plainnumber: /* Fast path for plain numbers < 2^63. */ if ((int64_t)x < 0) break; n = (double)(int64_t)x; if (neg) n = -n; o->n = n; return fmt; } } } /* Slow non-integer path. */ if (fmt == STRSCAN_INT) { if ((opt & STRSCAN_OPT_C)) return STRSCAN_ERROR; fmt = STRSCAN_NUM; } else if (fmt > STRSCAN_INT) { return STRSCAN_ERROR; } { uint32_t hi = 0, lo = (uint32_t)(xip-xi); int32_t ex2 = 0, idig = (int32_t)lo + (ex10 >> 1); lua_assert(lo > 0 && (ex10 & 1) == 0); /* Handle simple overflow/underflow. */ if (idig > 310/2) { if (neg) setminfV(o); else setpinfV(o); return fmt; } else if (idig < -326/2) { o->n = neg ? -0.0 : 0.0; return fmt; } /* Scale up until we have at least 17 or 18 integer part digits. */ while (idig < 9 && idig < DLEN(lo, hi)) { uint32_t i, cy = 0; ex2 -= 6; for (i = DPREV(lo); ; i = DPREV(i)) { uint32_t d = (xi[i] << 6) + cy; cy = (((d >> 2) * 5243) >> 17); d = d - cy * 100; /* Div/mod 100. */ xi[i] = (uint8_t)d; if (i == hi) break; if (d == 0 && i == DPREV(lo)) lo = i; } if (cy) { hi = DPREV(hi); if (xi[DPREV(lo)] == 0) lo = DPREV(lo); else if (hi == lo) { lo = DPREV(lo); xi[DPREV(lo)] |= xi[lo]; } xi[hi] = (uint8_t)cy; idig++; } } /* Scale down until no more than 17 or 18 integer part digits remain. */ while (idig > 9) { uint32_t i, cy = 0; ex2 += 6; for (i = hi; i != lo; i = DNEXT(i)) { cy += xi[i]; xi[i] = (cy >> 6); cy = 100 * (cy & 0x3f); if (xi[i] == 0 && i == hi) hi = DNEXT(hi), idig--; } while (cy) { if (hi == lo) { xi[DPREV(lo)] |= 1; break; } xi[lo] = (cy >> 6); lo = DNEXT(lo); cy = 100 * (cy & 0x3f); } } /* Collect integer part digits and convert to rescaled double. */ { uint64_t x = xi[hi]; uint32_t i; for (i = DNEXT(hi); --idig > 0 && i != lo; i = DNEXT(i)) x = x * 100 + xi[i]; if (i == lo) { while (--idig >= 0) x = x * 100; } else { /* Gather round bit from remaining digits. */ x <<= 1; ex2--; do { if (xi[i]) { x |= 1; break; } i = DNEXT(i); } while (i != lo); } strscan_double(x, o, ex2, neg); } } return fmt; } /* Scan string containing a number. Returns format. Returns value in o. */ StrScanFmt lj_strscan_scan(const uint8_t *p, TValue *o, uint32_t opt) { int32_t neg = 0; /* Remove leading space, parse sign and non-numbers. */ if (LJ_UNLIKELY(!lj_char_isdigit(*p))) { while (lj_char_isspace(*p)) p++; if (*p == '+' || *p == '-') neg = (*p++ == '-'); if (LJ_UNLIKELY(*p >= 'A')) { /* Parse "inf", "infinity" or "nan". */ TValue tmp; setnanV(&tmp); if (casecmp(p[0],'i') && casecmp(p[1],'n') && casecmp(p[2],'f')) { if (neg) setminfV(&tmp); else setpinfV(&tmp); p += 3; if (casecmp(p[0],'i') && casecmp(p[1],'n') && casecmp(p[2],'i') && casecmp(p[3],'t') && casecmp(p[4],'y')) p += 5; } else if (casecmp(p[0],'n') && casecmp(p[1],'a') && casecmp(p[2],'n')) { p += 3; } while (lj_char_isspace(*p)) p++; if (*p) return STRSCAN_ERROR; o->u64 = tmp.u64; return STRSCAN_NUM; } } /* Parse regular number. */ { StrScanFmt fmt = STRSCAN_INT; int cmask = LJ_CHAR_DIGIT; int base = (opt & STRSCAN_OPT_C) && *p == '0' ? 0 : 10; const uint8_t *sp, *dp = NULL; uint32_t dig = 0, hasdig = 0, x = 0; int32_t ex = 0; /* Determine base and skip leading zeros. */ if (LJ_UNLIKELY(*p <= '0')) { if (*p == '0' && casecmp(p[1], 'x')) base = 16, cmask = LJ_CHAR_XDIGIT, p += 2; for ( ; ; p++) { if (*p == '0') { hasdig = 1; } else if (*p == '.') { if (dp) return STRSCAN_ERROR; dp = p; } else { break; } } } /* Preliminary digit and decimal point scan. */ for (sp = p; ; p++) { if (LJ_LIKELY(lj_char_isa(*p, cmask))) { x = x * 10 + (*p & 15); /* For fast path below. */ dig++; } else if (*p == '.') { if (dp) return STRSCAN_ERROR; dp = p; } else { break; } } if (!(hasdig | dig)) return STRSCAN_ERROR; /* Handle decimal point. */ if (dp) { fmt = STRSCAN_NUM; if (dig) { ex = (int32_t)(dp-(p-1)); dp = p-1; while (ex < 0 && *dp-- == '0') ex++, dig--; /* Skip trailing zeros. */ if (base == 16) ex *= 4; } } /* Parse exponent. */ if (casecmp(*p, (uint32_t)(base == 16 ? 'p' : 'e'))) { uint32_t xx; int negx = 0; fmt = STRSCAN_NUM; p++; if (*p == '+' || *p == '-') negx = (*p++ == '-'); if (!lj_char_isdigit(*p)) return STRSCAN_ERROR; xx = (*p++ & 15); while (lj_char_isdigit(*p)) { if (xx < 65536) xx = xx * 10 + (*p & 15); p++; } ex += negx ? -(int32_t)xx : (int32_t)xx; } /* Parse suffix. */ if (*p) { /* I (IMAG), U (U32), LL (I64), ULL/LLU (U64), L (long), UL/LU (ulong). */ /* NYI: f (float). Not needed until cp_number() handles non-integers. */ if (casecmp(*p, 'i')) { if (!(opt & STRSCAN_OPT_IMAG)) return STRSCAN_ERROR; p++; fmt = STRSCAN_IMAG; } else if (fmt == STRSCAN_INT) { if (casecmp(*p, 'u')) p++, fmt = STRSCAN_U32; if (casecmp(*p, 'l')) { p++; if (casecmp(*p, 'l')) p++, fmt += STRSCAN_I64 - STRSCAN_INT; else if (!(opt & STRSCAN_OPT_C)) return STRSCAN_ERROR; else if (sizeof(long) == 8) fmt += STRSCAN_I64 - STRSCAN_INT; } if (casecmp(*p, 'u') && (fmt == STRSCAN_INT || fmt == STRSCAN_I64)) p++, fmt += STRSCAN_U32 - STRSCAN_INT; if ((fmt == STRSCAN_U32 && !(opt & STRSCAN_OPT_C)) || (fmt >= STRSCAN_I64 && !(opt & STRSCAN_OPT_LL))) return STRSCAN_ERROR; } while (lj_char_isspace(*p)) p++; if (*p) return STRSCAN_ERROR; } /* Fast path for decimal 32 bit integers. */ if (fmt == STRSCAN_INT && base == 10 && (dig < 10 || (dig == 10 && *sp <= '2' && x < 0x80000000u+neg))) { int32_t y = neg ? -(int32_t)x : (int32_t)x; if ((opt & STRSCAN_OPT_TONUM)) { o->n = (double)y; return STRSCAN_NUM; } else { o->i = y; return STRSCAN_INT; } } /* Dispatch to base-specific parser. */ if (base == 0 && !(fmt == STRSCAN_NUM || fmt == STRSCAN_IMAG)) return strscan_oct(sp, o, fmt, neg, dig); if (base == 16) fmt = strscan_hex(sp, o, fmt, opt, ex, neg, dig); else fmt = strscan_dec(sp, o, fmt, opt, ex, neg, dig); /* Try to convert number to integer, if requested. */ if (fmt == STRSCAN_NUM && (opt & STRSCAN_OPT_TOINT)) { double n = o->n; int32_t i = lj_num2int(n); if (n == (lua_Number)i) { o->i = i; return STRSCAN_INT; } } return fmt; } } int LJ_FASTCALL lj_strscan_num(GCstr *str, TValue *o) { StrScanFmt fmt = lj_strscan_scan((const uint8_t *)strdata(str), o, STRSCAN_OPT_TONUM); lua_assert(fmt == STRSCAN_ERROR || fmt == STRSCAN_NUM); return (fmt != STRSCAN_ERROR); } #if LJ_DUALNUM int LJ_FASTCALL lj_strscan_number(GCstr *str, TValue *o) { StrScanFmt fmt = lj_strscan_scan((const uint8_t *)strdata(str), o, STRSCAN_OPT_TOINT); lua_assert(fmt == STRSCAN_ERROR || fmt == STRSCAN_NUM || fmt == STRSCAN_INT); if (fmt == STRSCAN_INT) setitype(o, LJ_TISNUM); return (fmt != STRSCAN_ERROR); } #endif #undef DNEXT #undef DPREV #undef DLEN tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_err.o0000664000000000000000000004124012213333063022022 0ustar rootrootELF>&@@UHATSHIHCHPI9sXH@I$H PvHHwHwUHSHHHGHHx@u@HHH)XAAAuFxt8HcHH)x\@w$HzH{HKxHC0HxHʹHHUHAUATSHHAIHEHwHHUA$''wHSH+SHEdHt3xhu-Au'H5HLHUH߸H(H5HMHMDH߸HHUHSHHHPHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8HcH5H(HHHUHHcH5UHATSHHAHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8HcH5H(HHDHUHHcHUHATSHAy HcHGH HcHGHDH H;Cs+@ =vЃEȉH H5HH߸HDHPUHHcHUHWHH]UHUHUHUHSHHHUUtHcH H¾HH[]UHSHHHPHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8H(HHHlj_obj.hlj_err.ccf != ((void *)0)0%s:%d: %s?!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))not enough memoryerror in error handlingC++ exceptionstring length overflowuserdata length overflowstack overflowstack overflow (%s)table overflowtable index is NaNtable index is nilinvalid key to 'next'attempt to call a %s valueattempt to %s %s '%s' (a %s value)attempt to %s a %s valueattempt to compare %s with %sattempt to compare two %s valuesloop in gettableloop in settablecallindexperform arithmetic onconcatenateget length ofcalling '%s' on bad self (%s)bad argument #%d to '%s' (%s)%s expected, got %sinvalid valuevalue expectedcoroutine expectednil or table expectedLua function expectedfunction or level expectedstring/function/table expectedboolean or proxy expected'for' initial value must be a number'for' limit must be a number'for' step must be a numberno calling environmentattempt to yield across C-call boundarybad light userdata pointerbad action while in __gc metamethodassertion failed!cannot change a protected metatabletoo many results to unpackreader function must return a string'tostring' must return a string to 'print'index out of rangebase out of rangelevel out of rangeinvalid levelinvalid optioninvalid option '%s'invalid format'setfenv' cannot change environment of given objectcannot resume running coroutinecannot resume dead coroutinecannot resume non-suspended coroutinewrong number of arguments to 'insert'invalid value (%s) at index %d in table for 'concat'invalid order function for sortingattempt to use a closed filestandard file is closedunable to generate a unique filenamefield '%s' missing in date tableunable to dump given functionstring slice too longmissing '[' after '%f' in patterninvalid pattern capturemalformed pattern (ends with '%')malformed pattern (missing ']')unbalanced patternpattern too complexinvalid capture indextoo many capturesunfinished captureinvalid option '%%%c' to 'format'invalid format (repeated flags)invalid format (width or precision too long)invalid replacement value (a %s)name conflict for module '%s'JIT compiler disabled, CPU does not support SSE2unknown or malformed optimization flag '%s'attempt to load chunk with wrong mode%s near '%s'lexical element too longchunk has too many lineschunk has too many syntax levelsmalformed numberunfinished long stringunfinished long commentunfinished stringinvalid escape sequenceinvalid long string delimiter'%s' expectedcontrol structure too longfunction or expression too complexchunk has more than %d local variablesmain function has more than %d %sfunction at line %d has more than %d %s'%s' expected (to close '%s' at line %d)function too long for return fixup or '...' expectedambiguous syntax (function call x new statement)function arguments expectedunexpected symbolcannot use '...' outside a vararg functionsyntax error'=' or 'in' expectedno loop to breakundefined label '%s'duplicate label '%s' jumps into the scope of local '%s'cannot load incompatible bytecodecannot load malformed bytecodeinvalid C typesize of C type is unknown or too largebad storage classdeclaration specifier expectedundeclared or implicit tag '%s'attempt to redefine '%s'wrong number of type parameterstoo many initializers for '%s'cannot convert '%s' to '%s'attempt to get length of '%s'attempt to concatenate '%s' and '%s'attempt to perform arithmetic on '%s' and '%s'attempt to compare '%s' with '%s''%s' is not callablewrong number of arguments for function call'%s' has no member named '%s''%s' cannot be indexed'%s' cannot be indexed with '%s''%s' has no '%s' metamethodattempt to write to constant locationmissing declaration for symbol '%s'bad callbacktoo many callbacksNYI: packed bit fieldsNYI: cannot call this C function (yet)setgcVcopyTVfinderrfuncGCC: (Debian 4.7.3-4) 4.7.3zRx  AC C|  @AC C  d}AC E3AC n ,OC X AC ElAC C AC H(AC  DAC MhAC IrAC iAC AC EAC IAC HAC 4AC JTAC pAC CAC AC R  AC  AC  AC  ?AC Eu @AC H.symtab.strtab.shstrtab.rela.text.rela.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.tbss.comment.note.GNU-stack.rela.eh_frame @`4 +&>1623E2(WYuT>a" g0"p" "X@ x%*x 1` b/: E[^i w     }3 "I6E]k~l *7o EVhZ rt i5  - @      - ;?FU lj_err.cunwindstack__PRETTY_FUNCTION__.3429err_unwindstatic_uex__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.5021err_msgverr_argmsglj_func_closeuv__assert_faillj_state_relimitstackexitlj_err_throw_GLOBAL_OFFSET_TABLE__Unwind_RaiseExceptionlj_err_strlj_err_allmsglj_str_newlj_err_unwind_dwarf_Unwind_GetCFA_Unwind_DeleteException_Unwind_SetGRlj_vm_unwind_ff_ehlj_vm_unwind_c_eh_Unwind_SetIPlj_vm_unwind_rethrowlj_err_memlj_vm_unwind_clj_err_runlj_vm_calllj_str_pushvflj_debug_addloclj_err_msglj_err_lexlj_debug_shortnamelj_str_pushflj_err_optypelj_obj_itypenamelj_debug_slotnamelj_err_complj_err_optype_calllj_err_callermsglj_debug_funcnamelj_err_callervlj_err_callerlj_err_argvlj_err_arglj_err_argtypelj_obj_typenamelj_err_argtlua_atpaniclua_errorluaL_argerrorluaL_typerrorluaL_wherelj_debug_frameluaL_errorW ba f k{    #C [& + 00j ! " #$! %$-'7l [v { 0 i   + @  [  0+m bw |  b  )*+( .  *+ &8 /D ^ /k  1  26 1d@  1 1 11 0 + ( 0 66 Q /] { / 5  *) 57 < 5  * $<U 1\p/ <;(;C 2+*5  "  (u08@/HFPJXT`/h`px DhI,Hlo Z  5   - 8@ X t $D tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bcwrite.o0000664000000000000000000001505012213333052022667 0ustar rootrootELF>@@ UHGALЉGt A H9w]UHGLv‰ɀA wA4G]UHATSIW w9s9rI|$I4$I$A\$ [A\]UHH]LeLmLuH HIAՋG ;G  AD$uAE4$En EeDC;C v DH_DH!IvDH=wdEt2A$,*f.zuCH CHqCH CA4$HAt$HDwjSH3ЈSFVH]LeLmLuUHAWAVAUATSH8HHuF%t6DvDfIM~%AA4$~uHIIM9CHuV$FPP';S v p"HCH Huv%@u@"u@4PSH H}w@4PSH w@4PSH w$@4CwHZHEpHKHuvuH6E{0uIHuF4~ )ljEH}tHEp,HHUr0HHuDvEnDcL#BHDHHuF%u f~&HCxH@EAKLA$ƒOtLt JtRu A$kPt MtSu\At$AD$t;rH@8A$AT$AD$II9cHuV$ҋvHHuFVHH)IօHDHEE&AD$<uAt$ A<u#HuF%uh< u.AD$ tM tUt]< tMA2A%AA AC;C vHDHAv8A|$tAT$ It$HVA-A|$ tAD$Et-AT$Hx|t |u HHuEAL$At%At$HR|AՃ9suHDH}t.E|$EȃIDHEȺLHIL;}uEAD$H@AD$L$A|$t(It$HLHAtfIEt[A|$ tAt$HAt$ HAuAt$HAt$HIL;u.HuDnDvMCtC;C vHEA~v& A|$v"AOtA$D,A*f.z>uit) >= (~2u))(pt->flags & 0x01)id == CTID_COMPLEX_DOUBLEo->gch.gct == ~(~11u)(o)->gch.gct == ~(~4u)(o)->gch.gct == ~(~11u)(o)->gch.gct == ~(~10u)(((o)->it) < 0xfffeffffu)ctx->sb.n == 5(rd)>0 && (MSize)(rd)sizetracebcwrite_protobcwrite_bytecodebcwrite_kgcbcwrite_ktabkbcwrite_knumGCC: (Debian 4.7.3-4) 4.7.3zRx -AC h <3AC n  \;AC Cs $FAC T- (SAC MA $AC I  $vAC El .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @ `  & , 12 @2 #O HW0X `u ux p  p H--3,`;;FI-bSp! ; 4   M vlj_bcwrite.cbcwrite_blockbcwrite_uleb128bcwrite_resizebcwrite_ktabk__PRETTY_FUNCTION__.4967bcwrite_proto__PRETTY_FUNCTION__.5041__PRETTY_FUNCTION__.5007__PRETTY_FUNCTION__.5021__PRETTY_FUNCTION__.5054cpwriterlj_mem_realloc__assert_faillj_bcwritelj_vm_cpcall -       !  " !  5 !   O !  e !  | !   ;     P  4  @-``4 M tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_state.c0000664000000000000000000002116412202141143022333 0ustar rootroot/* ** State and stack handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_state_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_func.h" #include "lj_meta.h" #include "lj_state.h" #include "lj_frame.h" #if LJ_HASFFI #include "lj_ctype.h" #endif #include "lj_trace.h" #include "lj_dispatch.h" #include "lj_vm.h" #include "lj_lex.h" #include "lj_alloc.h" /* -- Stack handling ------------------------------------------------------ */ /* Stack sizes. */ #define LJ_STACK_MIN LUA_MINSTACK /* Min. stack size. */ #define LJ_STACK_MAX LUAI_MAXSTACK /* Max. stack size. */ #define LJ_STACK_START (2*LJ_STACK_MIN) /* Starting stack size. */ #define LJ_STACK_MAXEX (LJ_STACK_MAX + 1 + LJ_STACK_EXTRA) /* Explanation of LJ_STACK_EXTRA: ** ** Calls to metamethods store their arguments beyond the current top ** without checking for the stack limit. This avoids stack resizes which ** would invalidate passed TValue pointers. The stack check is performed ** later by the function header. This can safely resize the stack or raise ** an error. Thus we need some extra slots beyond the current stack limit. ** ** Most metamethods need 4 slots above top (cont, mobj, arg1, arg2) plus ** one extra slot if mobj is not a function. Only lj_meta_tset needs 5 ** slots above top, but then mobj is always a function. So we can get by ** with 5 extra slots. */ /* Resize stack slots and adjust pointers in state. */ static void resizestack(lua_State *L, MSize n) { TValue *st, *oldst = tvref(L->stack); ptrdiff_t delta; MSize oldsize = L->stacksize; MSize realsize = n + 1 + LJ_STACK_EXTRA; GCobj *up; lua_assert((MSize)(tvref(L->maxstack)-oldst)==L->stacksize-LJ_STACK_EXTRA-1); st = (TValue *)lj_mem_realloc(L, tvref(L->stack), (MSize)(L->stacksize*sizeof(TValue)), (MSize)(realsize*sizeof(TValue))); setmref(L->stack, st); delta = (char *)st - (char *)oldst; setmref(L->maxstack, st + n); while (oldsize < realsize) /* Clear new slots. */ setnilV(st + oldsize++); L->stacksize = realsize; L->base = (TValue *)((char *)L->base + delta); L->top = (TValue *)((char *)L->top + delta); for (up = gcref(L->openupval); up != NULL; up = gcnext(up)) setmref(gco2uv(up)->v, (TValue *)((char *)uvval(gco2uv(up)) + delta)); if (obj2gco(L) == gcref(G(L)->jit_L)) setmref(G(L)->jit_base, mref(G(L)->jit_base, char) + delta); } /* Relimit stack after error, in case the limit was overdrawn. */ void lj_state_relimitstack(lua_State *L) { if (L->stacksize > LJ_STACK_MAXEX && L->top-tvref(L->stack) < LJ_STACK_MAX-1) resizestack(L, LJ_STACK_MAX); } /* Try to shrink the stack (called from GC). */ void lj_state_shrinkstack(lua_State *L, MSize used) { if (L->stacksize > LJ_STACK_MAXEX) return; /* Avoid stack shrinking while handling stack overflow. */ if (4*used < L->stacksize && 2*(LJ_STACK_START+LJ_STACK_EXTRA) < L->stacksize && obj2gco(L) != gcref(G(L)->jit_L)) /* Don't shrink stack of live trace. */ resizestack(L, L->stacksize >> 1); } /* Try to grow stack. */ void LJ_FASTCALL lj_state_growstack(lua_State *L, MSize need) { MSize n; if (L->stacksize > LJ_STACK_MAXEX) /* Overflow while handling overflow? */ lj_err_throw(L, LUA_ERRERR); n = L->stacksize + need; if (n > LJ_STACK_MAX) { n += 2*LUA_MINSTACK; } else if (n < 2*L->stacksize) { n = 2*L->stacksize; if (n >= LJ_STACK_MAX) n = LJ_STACK_MAX; } resizestack(L, n); if (L->stacksize > LJ_STACK_MAXEX) lj_err_msg(L, LJ_ERR_STKOV); } void LJ_FASTCALL lj_state_growstack1(lua_State *L) { lj_state_growstack(L, 1); } /* Allocate basic stack for new state. */ static void stack_init(lua_State *L1, lua_State *L) { TValue *stend, *st = lj_mem_newvec(L, LJ_STACK_START+LJ_STACK_EXTRA, TValue); setmref(L1->stack, st); L1->stacksize = LJ_STACK_START + LJ_STACK_EXTRA; stend = st + L1->stacksize; setmref(L1->maxstack, stend - LJ_STACK_EXTRA - 1); L1->base = L1->top = st+1; setthreadV(L1, st, L1); /* Needed for curr_funcisL() on empty stack. */ while (st < stend) /* Clear new slots. */ setnilV(st++); } /* -- State handling ------------------------------------------------------ */ /* Open parts that may cause memory-allocation errors. */ static TValue *cpluaopen(lua_State *L, lua_CFunction dummy, void *ud) { global_State *g = G(L); UNUSED(dummy); UNUSED(ud); stack_init(L, L); /* NOBARRIER: State initialization, all objects are white. */ setgcref(L->env, obj2gco(lj_tab_new(L, 0, LJ_MIN_GLOBAL))); settabV(L, registry(L), lj_tab_new(L, 0, LJ_MIN_REGISTRY)); lj_str_resize(L, LJ_MIN_STRTAB-1); lj_meta_init(L); lj_lex_init(L); fixstring(lj_err_str(L, LJ_ERR_ERRMEM)); /* Preallocate memory error msg. */ g->gc.threshold = 4*g->gc.total; lj_trace_initstate(g); return NULL; } static void close_state(lua_State *L) { global_State *g = G(L); lj_func_closeuv(L, tvref(L->stack)); lj_gc_freeall(g); lua_assert(gcref(g->gc.root) == obj2gco(L)); lua_assert(g->strnum == 0); lj_trace_freestate(g); #if LJ_HASFFI lj_ctype_freestate(g); #endif lj_mem_freevec(g, g->strhash, g->strmask+1, GCRef); lj_str_freebuf(g, &g->tmpbuf); lj_mem_freevec(g, tvref(L->stack), L->stacksize, TValue); lua_assert(g->gc.total == sizeof(GG_State)); #ifndef LUAJIT_USE_SYSMALLOC if (g->allocf == lj_alloc_f) lj_alloc_destroy(g->allocd); else #endif g->allocf(g->allocd, G2GG(g), sizeof(GG_State), 0); } #if LJ_64 lua_State *lj_state_newstate(lua_Alloc f, void *ud) #else LUA_API lua_State *lua_newstate(lua_Alloc f, void *ud) #endif { GG_State *GG = (GG_State *)f(ud, NULL, 0, sizeof(GG_State)); lua_State *L = &GG->L; global_State *g = &GG->g; if (GG == NULL || !checkptr32(GG)) return NULL; memset(GG, 0, sizeof(GG_State)); L->gct = ~LJ_TTHREAD; L->marked = LJ_GC_WHITE0 | LJ_GC_FIXED | LJ_GC_SFIXED; /* Prevent free. */ L->dummy_ffid = FF_C; setmref(L->glref, g); g->gc.currentwhite = LJ_GC_WHITE0 | LJ_GC_FIXED; g->strempty.marked = LJ_GC_WHITE0; g->strempty.gct = ~LJ_TSTR; g->allocf = f; g->allocd = ud; setgcref(g->mainthref, obj2gco(L)); setgcref(g->uvhead.prev, obj2gco(&g->uvhead)); setgcref(g->uvhead.next, obj2gco(&g->uvhead)); g->strmask = ~(MSize)0; setnilV(registry(L)); setnilV(&g->nilnode.val); setnilV(&g->nilnode.key); setmref(g->nilnode.freetop, &g->nilnode); lj_str_initbuf(&g->tmpbuf); g->gc.state = GCSpause; setgcref(g->gc.root, obj2gco(L)); setmref(g->gc.sweep, &g->gc.root); g->gc.total = sizeof(GG_State); g->gc.pause = LUAI_GCPAUSE; g->gc.stepmul = LUAI_GCMUL; lj_dispatch_init((GG_State *)L); L->status = LUA_ERRERR+1; /* Avoid touching the stack upon memory error. */ if (lj_vm_cpcall(L, NULL, NULL, cpluaopen) != 0) { /* Memory allocation error: free partial state. */ close_state(L); return NULL; } L->status = 0; return L; } static TValue *cpfinalize(lua_State *L, lua_CFunction dummy, void *ud) { UNUSED(dummy); UNUSED(ud); lj_gc_finalize_cdata(L); lj_gc_finalize_udata(L); /* Frame pop omitted. */ return NULL; } LUA_API void lua_close(lua_State *L) { global_State *g = G(L); int i; L = mainthread(g); /* Only the main thread can be closed. */ lj_func_closeuv(L, tvref(L->stack)); lj_gc_separateudata(g, 1); /* Separate udata which have GC metamethods. */ #if LJ_HASJIT G2J(g)->flags &= ~JIT_F_ON; G2J(g)->state = LJ_TRACE_IDLE; lj_dispatch_update(g); #endif for (i = 0;;) { hook_enter(g); L->status = 0; L->cframe = NULL; L->base = L->top = tvref(L->stack) + 1; if (lj_vm_cpcall(L, NULL, NULL, cpfinalize) == 0) { if (++i >= 10) break; lj_gc_separateudata(g, 1); /* Separate udata again. */ if (gcref(g->gc.mmudata) == NULL) /* Until nothing is left to do. */ break; } } close_state(L); } lua_State *lj_state_new(lua_State *L) { lua_State *L1 = lj_mem_newobj(L, lua_State); L1->gct = ~LJ_TTHREAD; L1->dummy_ffid = FF_C; L1->status = 0; L1->stacksize = 0; setmref(L1->stack, NULL); L1->cframe = NULL; /* NOBARRIER: The lua_State is new (marked white). */ setgcrefnull(L1->openupval); setmrefr(L1->glref, L->glref); setgcrefr(L1->env, L->env); stack_init(L1, L); /* init stack */ lua_assert(iswhite(obj2gco(L1))); return L1; } void LJ_FASTCALL lj_state_free(global_State *g, lua_State *L) { lua_assert(L != mainthread(g)); lj_func_closeuv(L, tvref(L->stack)); lua_assert(gcref(L->openupval) == NULL); lj_mem_freevec(g, tvref(L->stack), L->stacksize, TValue); lj_mem_freet(g, L); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vm.h0000664000000000000000000000661212202141143021643 0ustar rootroot/* ** Assembler VM interface definitions. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_VM_H #define _LJ_VM_H #include "lj_obj.h" /* Entry points for ASM parts of VM. */ LJ_ASMF void lj_vm_call(lua_State *L, TValue *base, int nres1); LJ_ASMF int lj_vm_pcall(lua_State *L, TValue *base, int nres1, ptrdiff_t ef); typedef TValue *(*lua_CPFunction)(lua_State *L, lua_CFunction func, void *ud); LJ_ASMF int lj_vm_cpcall(lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp); LJ_ASMF int lj_vm_resume(lua_State *L, TValue *base, int nres1, ptrdiff_t ef); LJ_ASMF_NORET void LJ_FASTCALL lj_vm_unwind_c(void *cframe, int errcode); LJ_ASMF_NORET void LJ_FASTCALL lj_vm_unwind_ff(void *cframe); LJ_ASMF void lj_vm_unwind_c_eh(void); LJ_ASMF void lj_vm_unwind_ff_eh(void); #if LJ_TARGET_X86ORX64 LJ_ASMF void lj_vm_unwind_rethrow(void); #endif /* Miscellaneous functions. */ #if LJ_TARGET_X86ORX64 LJ_ASMF int lj_vm_cpuid(uint32_t f, uint32_t res[4]); #endif #if LJ_TARGET_PPC void lj_vm_cachesync(void *start, void *end); #endif LJ_ASMF double lj_vm_foldarith(double x, double y, int op); #if LJ_HASJIT LJ_ASMF double lj_vm_foldfpm(double x, int op); #endif #if !LJ_ARCH_HASFPU /* Declared in lj_obj.h: LJ_ASMF int32_t lj_vm_tobit(double x); */ #endif /* Dispatch targets for recording and hooks. */ LJ_ASMF void lj_vm_record(void); LJ_ASMF void lj_vm_inshook(void); LJ_ASMF void lj_vm_rethook(void); LJ_ASMF void lj_vm_callhook(void); /* Trace exit handling. */ LJ_ASMF void lj_vm_exit_handler(void); LJ_ASMF void lj_vm_exit_interp(void); /* Internal math helper functions. */ #if LJ_TARGET_X86ORX64 || LJ_TARGET_PPC #define lj_vm_floor floor #define lj_vm_ceil ceil #else LJ_ASMF double lj_vm_floor(double); LJ_ASMF double lj_vm_ceil(double); #if LJ_TARGET_ARM LJ_ASMF double lj_vm_floor_sf(double); LJ_ASMF double lj_vm_ceil_sf(double); #endif #endif #if defined(LUAJIT_NO_LOG2) || LJ_TARGET_X86ORX64 LJ_ASMF double lj_vm_log2(double); #else #define lj_vm_log2 log2 #endif #if LJ_HASJIT #if LJ_TARGET_X86ORX64 LJ_ASMF void lj_vm_floor_sse(void); LJ_ASMF void lj_vm_ceil_sse(void); LJ_ASMF void lj_vm_trunc_sse(void); LJ_ASMF void lj_vm_exp_x87(void); LJ_ASMF void lj_vm_exp2_x87(void); LJ_ASMF void lj_vm_pow_sse(void); LJ_ASMF void lj_vm_powi_sse(void); #else #if LJ_TARGET_PPC #define lj_vm_trunc trunc #else LJ_ASMF double lj_vm_trunc(double); #if LJ_TARGET_ARM LJ_ASMF double lj_vm_trunc_sf(double); #endif #endif LJ_ASMF double lj_vm_powi(double, int32_t); #ifdef LUAJIT_NO_EXP2 LJ_ASMF double lj_vm_exp2(double); #else #define lj_vm_exp2 exp2 #endif #endif LJ_ASMF int32_t LJ_FASTCALL lj_vm_modi(int32_t, int32_t); #if LJ_HASFFI LJ_ASMF int lj_vm_errno(void); #endif #endif /* Continuations for metamethods. */ LJ_ASMF void lj_cont_cat(void); /* Continue with concatenation. */ LJ_ASMF void lj_cont_ra(void); /* Store result in RA from instruction. */ LJ_ASMF void lj_cont_nop(void); /* Do nothing, just continue execution. */ LJ_ASMF void lj_cont_condt(void); /* Branch if result is true. */ LJ_ASMF void lj_cont_condf(void); /* Branch if result is false. */ LJ_ASMF void lj_cont_hook(void); /* Continue from hook yield. */ enum { LJ_CONT_TAILCALL, LJ_CONT_FFI_CALLBACK }; /* Special continuations. */ /* Start of the ASM code. */ LJ_ASMF char lj_vm_asm_begin[]; /* Bytecode offsets are relative to lj_vm_asm_begin. */ #define makeasmfunc(ofs) ((ASMFunction)(lj_vm_asm_begin + (ofs))) #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_target.h0000664000000000000000000001350112202141143022502 0ustar rootroot/* ** Definitions for target CPU. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_TARGET_H #define _LJ_TARGET_H #include "lj_def.h" #include "lj_arch.h" /* -- Registers and spill slots ------------------------------------------- */ /* Register type (uint8_t in ir->r). */ typedef uint32_t Reg; /* The hi-bit is NOT set for an allocated register. This means the value ** can be directly used without masking. The hi-bit is set for a register ** allocation hint or for RID_INIT, RID_SINK or RID_SUNK. */ #define RID_NONE 0x80 #define RID_MASK 0x7f #define RID_INIT (RID_NONE|RID_MASK) #define RID_SINK (RID_INIT-1) #define RID_SUNK (RID_INIT-2) #define ra_noreg(r) ((r) & RID_NONE) #define ra_hasreg(r) (!((r) & RID_NONE)) /* The ra_hashint() macro assumes a previous test for ra_noreg(). */ #define ra_hashint(r) ((r) < RID_SUNK) #define ra_gethint(r) ((Reg)((r) & RID_MASK)) #define ra_sethint(rr, r) rr = (uint8_t)((r)|RID_NONE) #define ra_samehint(r1, r2) (ra_gethint((r1)^(r2)) == 0) /* Spill slot 0 means no spill slot has been allocated. */ #define SPS_NONE 0 #define ra_hasspill(s) ((s) != SPS_NONE) /* Combined register and spill slot (uint16_t in ir->prev). */ typedef uint32_t RegSP; #define REGSP(r, s) ((r) + ((s) << 8)) #define REGSP_HINT(r) ((r)|RID_NONE) #define REGSP_INIT REGSP(RID_INIT, 0) #define regsp_reg(rs) ((rs) & 255) #define regsp_spill(rs) ((rs) >> 8) #define regsp_used(rs) \ (((rs) & ~REGSP(RID_MASK, 0)) != REGSP(RID_NONE, 0)) /* -- Register sets ------------------------------------------------------- */ /* Bitset for registers. 32 registers suffice for most architectures. ** Note that one set holds bits for both GPRs and FPRs. */ #if LJ_TARGET_PPC || LJ_TARGET_MIPS typedef uint64_t RegSet; #else typedef uint32_t RegSet; #endif #define RID2RSET(r) (((RegSet)1) << (r)) #define RSET_EMPTY ((RegSet)0) #define RSET_RANGE(lo, hi) ((RID2RSET((hi)-(lo))-1) << (lo)) #define rset_test(rs, r) ((int)((rs) >> (r)) & 1) #define rset_set(rs, r) (rs |= RID2RSET(r)) #define rset_clear(rs, r) (rs &= ~RID2RSET(r)) #define rset_exclude(rs, r) (rs & ~RID2RSET(r)) #if LJ_TARGET_PPC || LJ_TARGET_MIPS #define rset_picktop(rs) ((Reg)(__builtin_clzll(rs)^63)) #define rset_pickbot(rs) ((Reg)__builtin_ctzll(rs)) #else #define rset_picktop(rs) ((Reg)lj_fls(rs)) #define rset_pickbot(rs) ((Reg)lj_ffs(rs)) #endif /* -- Register allocation cost -------------------------------------------- */ /* The register allocation heuristic keeps track of the cost for allocating ** a specific register: ** ** A free register (obviously) has a cost of 0 and a 1-bit in the free mask. ** ** An already allocated register has the (non-zero) IR reference in the lowest ** bits and the result of a blended cost-model in the higher bits. ** ** The allocator first checks the free mask for a hit. Otherwise an (unrolled) ** linear search for the minimum cost is used. The search doesn't need to ** keep track of the position of the minimum, which makes it very fast. ** The lowest bits of the minimum cost show the desired IR reference whose ** register is the one to evict. ** ** Without the cost-model this degenerates to the standard heuristics for ** (reverse) linear-scan register allocation. Since code generation is done ** in reverse, a live interval extends from the last use to the first def. ** For an SSA IR the IR reference is the first (and only) def and thus ** trivially marks the end of the interval. The LSRA heuristics says to pick ** the register whose live interval has the furthest extent, i.e. the lowest ** IR reference in our case. ** ** A cost-model should take into account other factors, like spill-cost and ** restore- or rematerialization-cost, which depend on the kind of instruction. ** E.g. constants have zero spill costs, variant instructions have higher ** costs than invariants and PHIs should preferably never be spilled. ** ** Here's a first cut at simple, but effective blended cost-model for R-LSRA: ** - Due to careful design of the IR, constants already have lower IR ** references than invariants and invariants have lower IR references ** than variants. ** - The cost in the upper 16 bits is the sum of the IR reference and a ** weighted score. The score currently only takes into account whether ** the IRT_ISPHI bit is set in the instruction type. ** - The PHI weight is the minimum distance (in IR instructions) a PHI ** reference has to be further apart from a non-PHI reference to be spilled. ** - It should be a power of two (for speed) and must be between 2 and 32768. ** Good values for the PHI weight seem to be between 40 and 150. ** - Further study is required. */ #define REGCOST_PHI_WEIGHT 64 /* Cost for allocating a specific register. */ typedef uint32_t RegCost; /* Note: assumes 16 bit IRRef1. */ #define REGCOST(cost, ref) ((RegCost)(ref) + ((RegCost)(cost) << 16)) #define regcost_ref(rc) ((IRRef1)(rc)) #define REGCOST_T(t) \ ((RegCost)((t)&IRT_ISPHI) * (((RegCost)(REGCOST_PHI_WEIGHT)<<16)/IRT_ISPHI)) #define REGCOST_REF_T(ref, t) (REGCOST((ref), (ref)) + REGCOST_T((t))) /* -- Target-specific definitions ----------------------------------------- */ #if LJ_TARGET_X86ORX64 #include "lj_target_x86.h" #elif LJ_TARGET_ARM #include "lj_target_arm.h" #elif LJ_TARGET_PPC #include "lj_target_ppc.h" #elif LJ_TARGET_MIPS #include "lj_target_mips.h" #else #error "Missing include for target CPU" #endif #ifdef EXITSTUBS_PER_GROUP /* Return the address of an exit stub. */ static LJ_AINLINE char *exitstub_addr_(char **group, uint32_t exitno) { lua_assert(group[exitno / EXITSTUBS_PER_GROUP] != NULL); return (char *)group[exitno / EXITSTUBS_PER_GROUP] + EXITSTUB_SPACING*(exitno % EXITSTUBS_PER_GROUP); } /* Avoid dependence on lj_jit.h if only including lj_target.h. */ #define exitstub_addr(J, exitno) \ ((MCode *)exitstub_addr_((char **)((J)->exitstubgroup), (exitno))) #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bc.h0000664000000000000000000002003712202141143021602 0ustar rootroot/* ** Bytecode instruction format. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_BC_H #define _LJ_BC_H #include "lj_def.h" #include "lj_arch.h" /* Bytecode instruction format, 32 bit wide, fields of 8 or 16 bit: ** ** +----+----+----+----+ ** | B | C | A | OP | Format ABC ** +----+----+----+----+ ** | D | A | OP | Format AD ** +-------------------- ** MSB LSB ** ** In-memory instructions are always stored in host byte order. */ /* Operand ranges and related constants. */ #define BCMAX_A 0xff #define BCMAX_B 0xff #define BCMAX_C 0xff #define BCMAX_D 0xffff #define BCBIAS_J 0x8000 #define NO_REG BCMAX_A #define NO_JMP (~(BCPos)0) /* Macros to get instruction fields. */ #define bc_op(i) ((BCOp)((i)&0xff)) #define bc_a(i) ((BCReg)(((i)>>8)&0xff)) #define bc_b(i) ((BCReg)((i)>>24)) #define bc_c(i) ((BCReg)(((i)>>16)&0xff)) #define bc_d(i) ((BCReg)((i)>>16)) #define bc_j(i) ((ptrdiff_t)bc_d(i)-BCBIAS_J) /* Macros to set instruction fields. */ #define setbc_byte(p, x, ofs) \ ((uint8_t *)(p))[LJ_ENDIAN_SELECT(ofs, 3-ofs)] = (uint8_t)(x) #define setbc_op(p, x) setbc_byte(p, (x), 0) #define setbc_a(p, x) setbc_byte(p, (x), 1) #define setbc_b(p, x) setbc_byte(p, (x), 3) #define setbc_c(p, x) setbc_byte(p, (x), 2) #define setbc_d(p, x) \ ((uint16_t *)(p))[LJ_ENDIAN_SELECT(1, 0)] = (uint16_t)(x) #define setbc_j(p, x) setbc_d(p, (BCPos)((int32_t)(x)+BCBIAS_J)) /* Macros to compose instructions. */ #define BCINS_ABC(o, a, b, c) \ (((BCIns)(o))|((BCIns)(a)<<8)|((BCIns)(b)<<24)|((BCIns)(c)<<16)) #define BCINS_AD(o, a, d) \ (((BCIns)(o))|((BCIns)(a)<<8)|((BCIns)(d)<<16)) #define BCINS_AJ(o, a, j) BCINS_AD(o, a, (BCPos)((int32_t)(j)+BCBIAS_J)) /* Bytecode instruction definition. Order matters, see below. ** ** (name, filler, Amode, Bmode, Cmode or Dmode, metamethod) ** ** The opcode name suffixes specify the type for RB/RC or RD: ** V = variable slot ** S = string const ** N = number const ** P = primitive type (~itype) ** B = unsigned byte literal ** M = multiple args/results */ #define BCDEF(_) \ /* Comparison ops. ORDER OPR. */ \ _(ISLT, var, ___, var, lt) \ _(ISGE, var, ___, var, lt) \ _(ISLE, var, ___, var, le) \ _(ISGT, var, ___, var, le) \ \ _(ISEQV, var, ___, var, eq) \ _(ISNEV, var, ___, var, eq) \ _(ISEQS, var, ___, str, eq) \ _(ISNES, var, ___, str, eq) \ _(ISEQN, var, ___, num, eq) \ _(ISNEN, var, ___, num, eq) \ _(ISEQP, var, ___, pri, eq) \ _(ISNEP, var, ___, pri, eq) \ \ /* Unary test and copy ops. */ \ _(ISTC, dst, ___, var, ___) \ _(ISFC, dst, ___, var, ___) \ _(IST, ___, ___, var, ___) \ _(ISF, ___, ___, var, ___) \ \ /* Unary ops. */ \ _(MOV, dst, ___, var, ___) \ _(NOT, dst, ___, var, ___) \ _(UNM, dst, ___, var, unm) \ _(LEN, dst, ___, var, len) \ \ /* Binary ops. ORDER OPR. VV last, POW must be next. */ \ _(ADDVN, dst, var, num, add) \ _(SUBVN, dst, var, num, sub) \ _(MULVN, dst, var, num, mul) \ _(DIVVN, dst, var, num, div) \ _(MODVN, dst, var, num, mod) \ \ _(ADDNV, dst, var, num, add) \ _(SUBNV, dst, var, num, sub) \ _(MULNV, dst, var, num, mul) \ _(DIVNV, dst, var, num, div) \ _(MODNV, dst, var, num, mod) \ \ _(ADDVV, dst, var, var, add) \ _(SUBVV, dst, var, var, sub) \ _(MULVV, dst, var, var, mul) \ _(DIVVV, dst, var, var, div) \ _(MODVV, dst, var, var, mod) \ \ _(POW, dst, var, var, pow) \ _(CAT, dst, rbase, rbase, concat) \ \ /* Constant ops. */ \ _(KSTR, dst, ___, str, ___) \ _(KCDATA, dst, ___, cdata, ___) \ _(KSHORT, dst, ___, lits, ___) \ _(KNUM, dst, ___, num, ___) \ _(KPRI, dst, ___, pri, ___) \ _(KNIL, base, ___, base, ___) \ \ /* Upvalue and function ops. */ \ _(UGET, dst, ___, uv, ___) \ _(USETV, uv, ___, var, ___) \ _(USETS, uv, ___, str, ___) \ _(USETN, uv, ___, num, ___) \ _(USETP, uv, ___, pri, ___) \ _(UCLO, rbase, ___, jump, ___) \ _(FNEW, dst, ___, func, gc) \ \ /* Table ops. */ \ _(TNEW, dst, ___, lit, gc) \ _(TDUP, dst, ___, tab, gc) \ _(GGET, dst, ___, str, index) \ _(GSET, var, ___, str, newindex) \ _(TGETV, dst, var, var, index) \ _(TGETS, dst, var, str, index) \ _(TGETB, dst, var, lit, index) \ _(TSETV, var, var, var, newindex) \ _(TSETS, var, var, str, newindex) \ _(TSETB, var, var, lit, newindex) \ _(TSETM, base, ___, num, newindex) \ \ /* Calls and vararg handling. T = tail call. */ \ _(CALLM, base, lit, lit, call) \ _(CALL, base, lit, lit, call) \ _(CALLMT, base, ___, lit, call) \ _(CALLT, base, ___, lit, call) \ _(ITERC, base, lit, lit, call) \ _(ITERN, base, lit, lit, call) \ _(VARG, base, lit, lit, ___) \ _(ISNEXT, base, ___, jump, ___) \ \ /* Returns. */ \ _(RETM, base, ___, lit, ___) \ _(RET, rbase, ___, lit, ___) \ _(RET0, rbase, ___, lit, ___) \ _(RET1, rbase, ___, lit, ___) \ \ /* Loops and branches. I/J = interp/JIT, I/C/L = init/call/loop. */ \ _(FORI, base, ___, jump, ___) \ _(JFORI, base, ___, jump, ___) \ \ _(FORL, base, ___, jump, ___) \ _(IFORL, base, ___, jump, ___) \ _(JFORL, base, ___, lit, ___) \ \ _(ITERL, base, ___, jump, ___) \ _(IITERL, base, ___, jump, ___) \ _(JITERL, base, ___, lit, ___) \ \ _(LOOP, rbase, ___, jump, ___) \ _(ILOOP, rbase, ___, jump, ___) \ _(JLOOP, rbase, ___, lit, ___) \ \ _(JMP, rbase, ___, jump, ___) \ \ /* Function headers. I/J = interp/JIT, F/V/C = fixarg/vararg/C func. */ \ _(FUNCF, rbase, ___, ___, ___) \ _(IFUNCF, rbase, ___, ___, ___) \ _(JFUNCF, rbase, ___, lit, ___) \ _(FUNCV, rbase, ___, ___, ___) \ _(IFUNCV, rbase, ___, ___, ___) \ _(JFUNCV, rbase, ___, lit, ___) \ _(FUNCC, rbase, ___, ___, ___) \ _(FUNCCW, rbase, ___, ___, ___) /* Bytecode opcode numbers. */ typedef enum { #define BCENUM(name, ma, mb, mc, mt) BC_##name, BCDEF(BCENUM) #undef BCENUM BC__MAX } BCOp; LJ_STATIC_ASSERT((int)BC_ISEQV+1 == (int)BC_ISNEV); LJ_STATIC_ASSERT(((int)BC_ISEQV^1) == (int)BC_ISNEV); LJ_STATIC_ASSERT(((int)BC_ISEQS^1) == (int)BC_ISNES); LJ_STATIC_ASSERT(((int)BC_ISEQN^1) == (int)BC_ISNEN); LJ_STATIC_ASSERT(((int)BC_ISEQP^1) == (int)BC_ISNEP); LJ_STATIC_ASSERT(((int)BC_ISLT^1) == (int)BC_ISGE); LJ_STATIC_ASSERT(((int)BC_ISLE^1) == (int)BC_ISGT); LJ_STATIC_ASSERT(((int)BC_ISLT^3) == (int)BC_ISGT); LJ_STATIC_ASSERT((int)BC_IST-(int)BC_ISTC == (int)BC_ISF-(int)BC_ISFC); LJ_STATIC_ASSERT((int)BC_CALLT-(int)BC_CALL == (int)BC_CALLMT-(int)BC_CALLM); LJ_STATIC_ASSERT((int)BC_CALLMT + 1 == (int)BC_CALLT); LJ_STATIC_ASSERT((int)BC_RETM + 1 == (int)BC_RET); LJ_STATIC_ASSERT((int)BC_FORL + 1 == (int)BC_IFORL); LJ_STATIC_ASSERT((int)BC_FORL + 2 == (int)BC_JFORL); LJ_STATIC_ASSERT((int)BC_ITERL + 1 == (int)BC_IITERL); LJ_STATIC_ASSERT((int)BC_ITERL + 2 == (int)BC_JITERL); LJ_STATIC_ASSERT((int)BC_LOOP + 1 == (int)BC_ILOOP); LJ_STATIC_ASSERT((int)BC_LOOP + 2 == (int)BC_JLOOP); LJ_STATIC_ASSERT((int)BC_FUNCF + 1 == (int)BC_IFUNCF); LJ_STATIC_ASSERT((int)BC_FUNCF + 2 == (int)BC_JFUNCF); LJ_STATIC_ASSERT((int)BC_FUNCV + 1 == (int)BC_IFUNCV); LJ_STATIC_ASSERT((int)BC_FUNCV + 2 == (int)BC_JFUNCV); /* This solves a circular dependency problem, change as needed. */ #define FF_next_N 4 /* Stack slots used by FORI/FORL, relative to operand A. */ enum { FORL_IDX, FORL_STOP, FORL_STEP, FORL_EXT }; /* Bytecode operand modes. ORDER BCMode */ typedef enum { BCMnone, BCMdst, BCMbase, BCMvar, BCMrbase, BCMuv, /* Mode A must be <= 7 */ BCMlit, BCMlits, BCMpri, BCMnum, BCMstr, BCMtab, BCMfunc, BCMjump, BCMcdata, BCM_max } BCMode; #define BCM___ BCMnone #define bcmode_a(op) ((BCMode)(lj_bc_mode[op] & 7)) #define bcmode_b(op) ((BCMode)((lj_bc_mode[op]>>3) & 15)) #define bcmode_c(op) ((BCMode)((lj_bc_mode[op]>>7) & 15)) #define bcmode_d(op) bcmode_c(op) #define bcmode_hasd(op) ((lj_bc_mode[op] & (15<<3)) == (BCMnone<<3)) #define bcmode_mm(op) ((MMS)(lj_bc_mode[op]>>11)) #define BCMODE(name, ma, mb, mc, mm) \ (BCM##ma|(BCM##mb<<3)|(BCM##mc<<7)|(MM_##mm<<11)), #define BCMODE_FF 0 static LJ_AINLINE int bc_isret(BCOp op) { return (op == BC_RETM || op == BC_RET || op == BC_RET0 || op == BC_RET1); } LJ_DATA const uint16_t lj_bc_mode[]; LJ_DATA const uint16_t lj_bc_ofs[]; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_bit.c0000664000000000000000000000350212202141143022126 0ustar rootroot/* ** Bit manipulation library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lib_bit_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_err.h" #include "lj_str.h" #include "lj_lib.h" /* ------------------------------------------------------------------------ */ #define LJLIB_MODULE_bit LJLIB_ASM(bit_tobit) LJLIB_REC(bit_unary IR_TOBIT) { lj_lib_checknumber(L, 1); return FFH_RETRY; } LJLIB_ASM_(bit_bnot) LJLIB_REC(bit_unary IR_BNOT) LJLIB_ASM_(bit_bswap) LJLIB_REC(bit_unary IR_BSWAP) LJLIB_ASM(bit_lshift) LJLIB_REC(bit_shift IR_BSHL) { lj_lib_checknumber(L, 1); lj_lib_checkbit(L, 2); return FFH_RETRY; } LJLIB_ASM_(bit_rshift) LJLIB_REC(bit_shift IR_BSHR) LJLIB_ASM_(bit_arshift) LJLIB_REC(bit_shift IR_BSAR) LJLIB_ASM_(bit_rol) LJLIB_REC(bit_shift IR_BROL) LJLIB_ASM_(bit_ror) LJLIB_REC(bit_shift IR_BROR) LJLIB_ASM(bit_band) LJLIB_REC(bit_nary IR_BAND) { int i = 0; do { lj_lib_checknumber(L, ++i); } while (L->base+i < L->top); return FFH_RETRY; } LJLIB_ASM_(bit_bor) LJLIB_REC(bit_nary IR_BOR) LJLIB_ASM_(bit_bxor) LJLIB_REC(bit_nary IR_BXOR) /* ------------------------------------------------------------------------ */ LJLIB_CF(bit_tohex) { uint32_t b = (uint32_t)lj_lib_checkbit(L, 1); int32_t i, n = L->base+1 >= L->top ? 8 : lj_lib_checkbit(L, 2); const char *hexdigits = "0123456789abcdef"; char buf[8]; if (n < 0) { n = -n; hexdigits = "0123456789ABCDEF"; } if (n > 8) n = 8; for (i = n; --i >= 0; ) { buf[i] = hexdigits[b & 15]; b >>= 4; } lua_pushlstring(L, buf, (size_t)n); return 1; } /* ------------------------------------------------------------------------ */ #include "lj_libdef.h" LUALIB_API int luaopen_bit(lua_State *L) { LJ_LIB_REG(L, LUA_BITLIBNAME, bit); return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_os.c0000664000000000000000000001423212202141143021773 0ustar rootroot/* ** OS library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #include #include #include #define lib_os_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_err.h" #include "lj_lib.h" #if LJ_TARGET_POSIX #include #else #include #endif /* ------------------------------------------------------------------------ */ #define LJLIB_MODULE_os LJLIB_CF(os_execute) { #if LJ_TARGET_CONSOLE #if LJ_52 errno = ENOSYS; return luaL_fileresult(L, 0, NULL); #else lua_pushinteger(L, -1); return 1; #endif #else const char *cmd = luaL_optstring(L, 1, NULL); int stat = system(cmd); #if LJ_52 if (cmd) return luaL_execresult(L, stat); setboolV(L->top++, 1); #else setintV(L->top++, stat); #endif return 1; #endif } LJLIB_CF(os_remove) { const char *filename = luaL_checkstring(L, 1); return luaL_fileresult(L, remove(filename) == 0, filename); } LJLIB_CF(os_rename) { const char *fromname = luaL_checkstring(L, 1); const char *toname = luaL_checkstring(L, 2); return luaL_fileresult(L, rename(fromname, toname) == 0, fromname); } LJLIB_CF(os_tmpname) { #if LJ_TARGET_PS3 lj_err_caller(L, LJ_ERR_OSUNIQF); return 0; #else #if LJ_TARGET_POSIX char buf[15+1]; int fp; strcpy(buf, "/tmp/lua_XXXXXX"); fp = mkstemp(buf); if (fp != -1) close(fp); else lj_err_caller(L, LJ_ERR_OSUNIQF); #else char buf[L_tmpnam]; if (tmpnam(buf) == NULL) lj_err_caller(L, LJ_ERR_OSUNIQF); #endif lua_pushstring(L, buf); return 1; #endif } LJLIB_CF(os_getenv) { #if LJ_TARGET_CONSOLE lua_pushnil(L); #else lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */ #endif return 1; } LJLIB_CF(os_exit) { int status; if (L->base < L->top && tvisbool(L->base)) status = boolV(L->base) ? EXIT_SUCCESS : EXIT_FAILURE; else status = lj_lib_optint(L, 1, EXIT_SUCCESS); if (L->base+1 < L->top && tvistruecond(L->base+1)) lua_close(L); exit(status); return 0; /* Unreachable. */ } LJLIB_CF(os_clock) { setnumV(L->top++, ((lua_Number)clock())*(1.0/(lua_Number)CLOCKS_PER_SEC)); return 1; } /* ------------------------------------------------------------------------ */ static void setfield(lua_State *L, const char *key, int value) { lua_pushinteger(L, value); lua_setfield(L, -2, key); } static void setboolfield(lua_State *L, const char *key, int value) { if (value < 0) /* undefined? */ return; /* does not set field */ lua_pushboolean(L, value); lua_setfield(L, -2, key); } static int getboolfield(lua_State *L, const char *key) { int res; lua_getfield(L, -1, key); res = lua_isnil(L, -1) ? -1 : lua_toboolean(L, -1); lua_pop(L, 1); return res; } static int getfield(lua_State *L, const char *key, int d) { int res; lua_getfield(L, -1, key); if (lua_isnumber(L, -1)) { res = (int)lua_tointeger(L, -1); } else { if (d < 0) lj_err_callerv(L, LJ_ERR_OSDATEF, key); res = d; } lua_pop(L, 1); return res; } LJLIB_CF(os_date) { const char *s = luaL_optstring(L, 1, "%c"); time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL)); struct tm *stm; #if LJ_TARGET_POSIX struct tm rtm; #endif if (*s == '!') { /* UTC? */ s++; /* Skip '!' */ #if LJ_TARGET_POSIX stm = gmtime_r(&t, &rtm); #else stm = gmtime(&t); #endif } else { #if LJ_TARGET_POSIX stm = localtime_r(&t, &rtm); #else stm = localtime(&t); #endif } if (stm == NULL) { /* Invalid date? */ setnilV(L->top-1); } else if (strcmp(s, "*t") == 0) { lua_createtable(L, 0, 9); /* 9 = number of fields */ setfield(L, "sec", stm->tm_sec); setfield(L, "min", stm->tm_min); setfield(L, "hour", stm->tm_hour); setfield(L, "day", stm->tm_mday); setfield(L, "month", stm->tm_mon+1); setfield(L, "year", stm->tm_year+1900); setfield(L, "wday", stm->tm_wday+1); setfield(L, "yday", stm->tm_yday+1); setboolfield(L, "isdst", stm->tm_isdst); } else { char cc[3]; luaL_Buffer b; cc[0] = '%'; cc[2] = '\0'; luaL_buffinit(L, &b); for (; *s; s++) { if (*s != '%' || *(s + 1) == '\0') { /* No conversion specifier? */ luaL_addchar(&b, *s); } else { size_t reslen; char buff[200]; /* Should be big enough for any conversion result. */ cc[1] = *(++s); reslen = strftime(buff, sizeof(buff), cc, stm); luaL_addlstring(&b, buff, reslen); } } luaL_pushresult(&b); } return 1; } LJLIB_CF(os_time) { time_t t; if (lua_isnoneornil(L, 1)) { /* called without args? */ t = time(NULL); /* get current time */ } else { struct tm ts; luaL_checktype(L, 1, LUA_TTABLE); lua_settop(L, 1); /* make sure table is at the top */ ts.tm_sec = getfield(L, "sec", 0); ts.tm_min = getfield(L, "min", 0); ts.tm_hour = getfield(L, "hour", 12); ts.tm_mday = getfield(L, "day", -1); ts.tm_mon = getfield(L, "month", -1) - 1; ts.tm_year = getfield(L, "year", -1) - 1900; ts.tm_isdst = getboolfield(L, "isdst"); t = mktime(&ts); } if (t == (time_t)(-1)) lua_pushnil(L); else lua_pushnumber(L, (lua_Number)t); return 1; } LJLIB_CF(os_difftime) { lua_pushnumber(L, difftime((time_t)(luaL_checknumber(L, 1)), (time_t)(luaL_optnumber(L, 2, (lua_Number)0)))); return 1; } /* ------------------------------------------------------------------------ */ LJLIB_CF(os_setlocale) { GCstr *s = lj_lib_optstr(L, 1); const char *str = s ? strdata(s) : NULL; int opt = lj_lib_checkopt(L, 2, 6, "\5ctype\7numeric\4time\7collate\10monetary\1\377\3all"); if (opt == 0) opt = LC_CTYPE; else if (opt == 1) opt = LC_NUMERIC; else if (opt == 2) opt = LC_TIME; else if (opt == 3) opt = LC_COLLATE; else if (opt == 4) opt = LC_MONETARY; else if (opt == 6) opt = LC_ALL; lua_pushstring(L, setlocale(opt, str)); return 1; } /* ------------------------------------------------------------------------ */ #include "lj_libdef.h" LUALIB_API int luaopen_os(lua_State *L) { LJ_LIB_REG(L, LUA_OSLIBNAME, os); return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_udata.o0000664000000000000000000000310012213333050022315 0ustar rootrootELF>@@ UHH]LeLmH IIՍNAL$Q(P@ @X @DhH]LeLmUHHV H)W HP]GCC: (Debian 4.7.3-4) 4.7.3zRx $sAC P^ DAC Z .symtab.strtab.shstrtab.rela.text.data.bss.comment.note.GNU-stack.rela.eh_frame @ &,10:O`J0 XY  6 s(slj_udata.clj_udata_newlj_mem_realloclj_udata_free* Hstarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_obj.o0000664000000000000000000000601012213333047022002 0ustar rootrootELF>8@@ UHWF9u&9|w`=w`vJ=vJf.zt ]lj_obj.h(((o)->it) < 0xfffeffffu)nilbooleanuserdatastringupvalthreadprotofunctiontracecdatatablenumberno valuenumberVnumGCC: (Debian 4.7.3-4) 4.7.3zRx AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @ &,12}E @ p M0kVk8f  uh  `_    #0>pO`lj_obj.c__PRETTY_FUNCTION__.3444lj_obj_equal__assert_faillj_obj_itypenamelj_obj_typenameL V [  ` p z    #''/ 8(?0E8L@RH[PaXg`/hmt#'/m8gR/ELa tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ccall.h0000664000000000000000000001003512202141143022271 0ustar rootroot/* ** FFI C call handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CCALL_H #define _LJ_CCALL_H #include "lj_obj.h" #include "lj_ctype.h" #if LJ_HASFFI /* -- C calling conventions ----------------------------------------------- */ #if LJ_TARGET_X86ORX64 #if LJ_TARGET_X86 #define CCALL_NARG_GPR 2 /* For fastcall arguments. */ #define CCALL_NARG_FPR 0 #define CCALL_NRET_GPR 2 #define CCALL_NRET_FPR 1 /* For FP results on x87 stack. */ #define CCALL_ALIGN_STACKARG 0 /* Don't align argument on stack. */ #elif LJ_ABI_WIN #define CCALL_NARG_GPR 4 #define CCALL_NARG_FPR 4 #define CCALL_NRET_GPR 1 #define CCALL_NRET_FPR 1 #define CCALL_SPS_EXTRA 4 #else #define CCALL_NARG_GPR 6 #define CCALL_NARG_FPR 8 #define CCALL_NRET_GPR 2 #define CCALL_NRET_FPR 2 #define CCALL_VECTOR_REG 1 /* Pass vectors in registers. */ #endif #define CCALL_SPS_FREE 1 #define CCALL_ALIGN_CALLSTATE 16 typedef LJ_ALIGN(16) union FPRArg { double d[2]; float f[4]; uint8_t b[16]; uint16_t s[8]; int i[4]; int64_t l[2]; } FPRArg; typedef intptr_t GPRArg; #elif LJ_TARGET_ARM #define CCALL_NARG_GPR 4 #define CCALL_NRET_GPR 2 /* For softfp double. */ #if LJ_ABI_SOFTFP #define CCALL_NARG_FPR 0 #define CCALL_NRET_FPR 0 #else #define CCALL_NARG_FPR 8 #define CCALL_NRET_FPR 4 #endif #define CCALL_SPS_FREE 0 typedef intptr_t GPRArg; typedef union FPRArg { double d; float f[2]; } FPRArg; #elif LJ_TARGET_PPC #define CCALL_NARG_GPR 8 #define CCALL_NARG_FPR 8 #define CCALL_NRET_GPR 4 /* For complex double. */ #define CCALL_NRET_FPR 1 #define CCALL_SPS_EXTRA 4 #define CCALL_SPS_FREE 0 typedef intptr_t GPRArg; typedef double FPRArg; #elif LJ_TARGET_PPCSPE #define CCALL_NARG_GPR 8 #define CCALL_NARG_FPR 0 #define CCALL_NRET_GPR 4 /* For softfp complex double. */ #define CCALL_NRET_FPR 0 #define CCALL_SPS_FREE 0 /* NYI */ typedef intptr_t GPRArg; #elif LJ_TARGET_MIPS #define CCALL_NARG_GPR 4 #define CCALL_NARG_FPR 2 #define CCALL_NRET_GPR 2 #define CCALL_NRET_FPR 2 #define CCALL_SPS_EXTRA 7 #define CCALL_SPS_FREE 1 typedef intptr_t GPRArg; typedef union FPRArg { double d; struct { LJ_ENDIAN_LOHI(float f; , float g;) }; } FPRArg; #else #error "Missing calling convention definitions for this architecture" #endif #ifndef CCALL_SPS_EXTRA #define CCALL_SPS_EXTRA 0 #endif #ifndef CCALL_VECTOR_REG #define CCALL_VECTOR_REG 0 #endif #ifndef CCALL_ALIGN_STACKARG #define CCALL_ALIGN_STACKARG 1 #endif #ifndef CCALL_ALIGN_CALLSTATE #define CCALL_ALIGN_CALLSTATE 8 #endif #define CCALL_NUM_GPR \ (CCALL_NARG_GPR > CCALL_NRET_GPR ? CCALL_NARG_GPR : CCALL_NRET_GPR) #define CCALL_NUM_FPR \ (CCALL_NARG_FPR > CCALL_NRET_FPR ? CCALL_NARG_FPR : CCALL_NRET_FPR) /* Check against constants in lj_ctype.h. */ LJ_STATIC_ASSERT(CCALL_NUM_GPR <= CCALL_MAX_GPR); LJ_STATIC_ASSERT(CCALL_NUM_FPR <= CCALL_MAX_FPR); #define CCALL_MAXSTACK 32 /* -- C call state -------------------------------------------------------- */ typedef LJ_ALIGN(CCALL_ALIGN_CALLSTATE) struct CCallState { void (*func)(void); /* Pointer to called function. */ uint32_t spadj; /* Stack pointer adjustment. */ uint8_t nsp; /* Number of stack slots. */ uint8_t retref; /* Return value by reference. */ #if LJ_TARGET_X64 uint8_t ngpr; /* Number of arguments in GPRs. */ uint8_t nfpr; /* Number of arguments in FPRs. */ #elif LJ_TARGET_X86 uint8_t resx87; /* Result on x87 stack: 1:float, 2:double. */ #elif LJ_TARGET_PPC uint8_t nfpr; /* Number of arguments in FPRs. */ #endif #if LJ_32 int32_t align1; #endif #if CCALL_NUM_FPR FPRArg fpr[CCALL_NUM_FPR]; /* Arguments/results in FPRs. */ #endif GPRArg gpr[CCALL_NUM_GPR]; /* Arguments/results in GPRs. */ GPRArg stack[CCALL_MAXSTACK]; /* Stack slots. */ } CCallState; /* -- C call handling ----------------------------------------------------- */ /* Really belongs to lj_vm.h. */ LJ_ASMF void LJ_FASTCALL lj_vm_ffi_call(CCallState *cc); LJ_FUNC CTypeID lj_ccall_ctid_vararg(CTState *cts, cTValue *o); LJ_FUNC int lj_ccall_func(lua_State *L, GCcdata *cd); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_api.o0000664000000000000000000015053012213333052022004 0ustar rootrootELF>pd@@ UHHG@xu@G,]UH~AHcHGHDH;GGxlt%Hh|DtHGHcHH+WHH9~'HcH=uUOHW,ǁz uJWR(uGHHGPzuzu1uQOHRǁz uJWR(t^)B9)HHD &Gxlt8Hh]UH~:HcHGHDH;GrgGxltAHh?tHGHcHH+WHH9~CHcH]UHH]LeLmH HIIlH¾HLhHKAxuPC@(tLH/Ht fHHCHI L`HC0@HCHPHSHH]LeLmUHG]ø@QHWHH+OHHcHH@.~#O H)щHH9UH]UHH]LeHHIuLwHH]LeUHAUATSHIIH9HcHGH+GHH9~iWFH9tjV H+VHH9 LIUHcID$H4It$HaHHH HII)H yvAB<DGD9uAL$I(@tyIUH[A\A]]UHHGH+GH]UHATSHO HGHcH)HH9~|LcIJ H{H9v9H9rH)H)HHC@HHCHSLH9rFHS@HGHcHH+WHH9~HcHDHG[A\]UHSHHSzltHhH9ugHHPH Jv;Hq9uISR(tHHSH9rHHSH[]UHSHH5SzltHhH9uHSH9sWHJH H qv;2~9uvKI(@tHH9rHSHHH Jv:H9uPC@(tH[]UHATSHHGHWHH)HAu*xt@G,Guor~t 'xt@FHGPPBF~SzltHhH9uHSHRHH Jv:H9uPC@(tA}-HCPvPBtHCpFt{Hk[A\]UHSHHHSHHH Hv:J9uRC@(tHCHHCS H9rHH[]UHSHHPv{teKyltHhH9tAH!ZHHu*t%H[]UHH]LeLmH HAAD9tDDHH]LeLmUHH]LeHHGxltASHhH9u'DHH]LeUHHcH]UHH¸zu x]UHHHvu8Hu҉UH]P ]UH;@t]UHH]LeLmH HAIDHSzltHhI9tHƸH9tLH]LeLmUHH]LeLmH HA}IDHoHAL$wl@=wbvJA$=vJf.z;Jv=CxltHhI9H9uHI9$A4$9ttwvw҉HHvCHPHSHHHCHPHSx H]LeLmUHH]LeLmH HAIDHSzlt(HhI9H9AT$wcHwXvJA$vJf.UHLHHvODAD9uIAA@(tyIy_HHwAHH-HFAF ~HFHH+WVHGHG>IA0AA]UHSHHH0u(w"HcHHGH)Hƹ|HCHC/HHSBxuPC@(tHSHHSK H9r HH[]UHH]LeHI_$C$uQC STS S$g[C SC %I C )9¸FC$ LuC$9C sCTST CHSHH]LeUHGHtHPHH@]UHGHPHp]lj_api.clj_obj.h(1) <= (L->top - L->base)(((L->top-1)->it) == (~11u))(((o)->it) < 0xfffeffffu)(((&tmp)->it) < 0xfffeffffu)(n) <= (L->top - L->base)lj_gc.h(((t)->it) == (~11u))(uint32_t)n < fn->l.nupvalues(2) <= (L->top - L->base)(((o)->it) == (~11u))(((o)->it) == (~12u))(((f)->it) == (~8u))(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))idx != 0 && -idx <= L->top - L->base!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))fn->c.gct == ~(~8u) && !((fn)->c.ffid == 0)(n) <= (from->top - from->base)(((global_State *)(void *)(uintptr_t)(from->glref).ptr32)) == (((global_State *)(void *)(uintptr_t)(to->glref).ptr32))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))idx <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)) - L->base-(idx+1) <= (L->top - L->base)(p) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 141, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(p) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 149, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 170, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))tt != 0 || (((o)->it) == (~0u))((((o2)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))((((GCobj *)(fn)))->gch.marked & (0x01 | 0x02))((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->registrytv))->it) == (~11u))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 733, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 748, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 814, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(((index2adr(L, idx))->it) == (~8u))(((index2adr(L, idx1))->it) == (~8u))(((index2adr(L, idx2))->it) == (~8u))((fn1)->c.ffid == 0) && (uint32_t)n1 < fn1->l.nupvalues((fn2)->c.ffid == 0) && (uint32_t)n2 < fn2->l.nupvalues(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 892, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 912, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(((index2adr(L, idx))->it) == (~11u))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 957, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 995, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))L->status == 0 || L->status == 5(nargs+1) <= (L->top - L->base)(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 1049, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))lua_xmovecopyTVlua_settoplua_removestkindex2adrlua_insertlua_replaceindex2adrsetgcVlua_typeluaL_checkanylua_rawequalnumberVnumlua_equallua_lessthanlua_tonumberluaL_checknumberluaL_optnumberlua_tointegerluaL_checkintegerluaL_optintegerlua_pushcclosureluaL_newmetatablelj_gc_barrierbacklua_concatlua_gettablelua_getfieldlua_rawgetlua_rawgetiluaL_getmetafieldlua_getfenvlua_nextlua_upvalueidlua_upvaluejoinluaL_checkudatalua_settablelua_setfieldlua_rawsetlua_rawsetilua_setmetatablelua_setfenvlua_setupvaluelua_calllua_pcalllua_cpcallGCC: (Debian 4.7.3-4) 4.7.3zRx AC V <AC  \AC ~ $|AC P  AC E (`HC L F A  9AC Lh $AC I  <AC M  \AC C  AC E   AC E  AC C  AC Ez  AC E  4CAC Pn  XcAC LR |AC O %AC ` ;AC v "AC ] &AC a $AC Pm $DAC P $l8AC P# AC   AC L $AC P oAC j  AC Lu $DAC P lAC P $AC P $AC P $#AC T  (AC M  0AC L T2AC m t:AC u AC V UAC P +`C F CxC F -bC F $4AC P  \AC C  IAC Pt  AC J $kAC I] 1fC F IAC D $0AC P $XAC I  AC Eu  AC C  AC C  rAC Cj  AC E $4tAC If  \AC E  AC C  AC E  AC C  kAC Ea   rAC Cj  4 AC G $X AC P ( 1AC X $ AC T  gAC E] $ AC I $ aAC TH $H gAC IY $p AC Tg  "AC E $ (AC I  tAC o ( @AC X#  0 bAC CZ $T AC P | AC    AC E  AC L  AC T  AC L .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @= C& >, >12 >1@2@?TTO\0WeWzW u` cph< zm   8Q^g wr~@ JQ \ t   -F _ x    '@@PYpr     ! : Sl 0@ M Z e  4M f     @ J`9 *5 @L[r i}  C cA U %z ; " & ,9 CQ\,8ivdKo@ #.?FRa]h 2x=:wU+CU-(I%&k7E1GvI]mx  K!r"  #t  %( 3 %? N &_ Y'q  C(k )r   *  * c+1 ,  U-g  .$ 0a/ : 1gF U `3f x  5" 7( *8t 8@  9b  @: :    <% 2 = <D Q =_ =lj_api.cgetcurrenvindex2adr__PRETTY_FUNCTION__.4872__PRETTY_FUNCTION__.3380stkindex2adr__PRETTY_FUNCTION__.4881cpcall__PRETTY_FUNCTION__.4905__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.4916__PRETTY_FUNCTION__.4924__PRETTY_FUNCTION__.4934__PRETTY_FUNCTION__.4942__PRETTY_FUNCTION__.4954__PRETTY_FUNCTION__.4966__PRETTY_FUNCTION__.5001__PRETTY_FUNCTION__.3444__PRETTY_FUNCTION__.5009__PRETTY_FUNCTION__.5018__PRETTY_FUNCTION__.5026__PRETTY_FUNCTION__.5033__PRETTY_FUNCTION__.5041__PRETTY_FUNCTION__.5049__PRETTY_FUNCTION__.5057__PRETTY_FUNCTION__.5066__PRETTY_FUNCTION__.5188__PRETTY_FUNCTION__.5211__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.5230__PRETTY_FUNCTION__.5240__PRETTY_FUNCTION__.5249__PRETTY_FUNCTION__.5255__PRETTY_FUNCTION__.5263__PRETTY_FUNCTION__.5277__PRETTY_FUNCTION__.5283__PRETTY_FUNCTION__.5290__PRETTY_FUNCTION__.5304__PRETTY_FUNCTION__.5313__PRETTY_FUNCTION__.5322__PRETTY_FUNCTION__.5330__PRETTY_FUNCTION__.5339__PRETTY_FUNCTION__.5345__PRETTY_FUNCTION__.5354__PRETTY_FUNCTION__.5364__PRETTY_FUNCTION__.5371__PRETTY_FUNCTION__.5380__PRETTY_FUNCTION__.5386__PRETTY_FUNCTION__.5397__PRETTY_FUNCTION__.5413__assert_faillj_func_newClj_err_msglua_statuslua_checkstacklj_state_growstackluaL_checkstacklj_err_callervlua_xmovelua_gettoplua_settoplua_removelua_insertlua_replacelj_gc_barrierflua_pushvaluelj_state_growstack1lua_typeluaL_checktypelj_err_argtluaL_checkanylj_err_arglua_typenamelj_obj_typenamelua_iscfunctionlua_isnumberlj_strscan_numlua_isstringlua_isuserdatalua_rawequallj_obj_equallua_equallj_meta_equallj_vm_calllua_lessthanlj_meta_complua_tonumberluaL_checknumberluaL_optnumberlua_tointegerluaL_checkintegerluaL_optintegerlua_tobooleanlua_tolstringlj_gc_steplj_str_fromnumberluaL_checklstringluaL_optlstringluaL_checkoptionstrcmplj_err_argvlua_objlenlj_tab_lenlua_tocfunctionlua_touserdatalua_tothreadlua_topointerlua_pushnillua_pushnumberlua_pushintegerlua_pushlstringlj_str_newlua_pushstringlua_pushvfstringlj_str_pushvflua_pushfstringlua_pushcclosurelua_pushbooleanlua_pushlightuserdatalua_createtablelj_tab_newluaL_newmetatablelj_tab_setstrlua_pushthreadlua_newthreadlj_state_newlua_newuserdatalj_udata_newlua_concatlj_meta_catlua_gettablelj_meta_tgetlua_getfieldlua_rawgetlj_tab_getlua_rawgetilj_tab_getinthlua_getmetatableluaL_getmetafieldlj_tab_getstrlua_getfenvlua_nextlj_tab_nextlua_getupvaluelj_debug_uvnamevlua_upvalueidlua_upvaluejoinluaL_checkudatalj_err_argtypelua_settablelj_meta_tsetlua_setfieldlua_rawsetlj_tab_setlua_rawsetilj_tab_setinthlua_setmetatablelj_trace_flushalllj_err_callerlua_setfenvlua_setupvaluelua_calllua_pcalllj_vm_pcalllua_cpcalllj_vm_cpcallluaL_callmetalua_yieldlj_cont_hooklj_vm_asm_beginlj_err_throwlua_resumelj_vm_resumelj_err_strlua_gclj_gc_fullgclua_getallocflua_setallocfC 8M R W< 8  `< 8    <7 8A F K< 8   < 8  < 8g " '<Q 8g[ ` `e<= 8   <>A@C 8@  % *<: 8@D I N<jA 8J   x<: 8QD I N<zA 8Q  < 8\  <' 8\1 6 ;<u 8J   x< 8t  < 8t  `<= 8JG  L xQ< 8J   x< 8  < 8   ,<8>C 8M R ,W<J 8  < 8  < 8J$  ) x. <d J 8J  x < L+ 85 : ? <n 8x }  < M O 8   <3 QO S V4 8> C H <f Z 8  I < 8   I <E 8O T Y < 8    < \ ]c 8m r w< 8   I< 8   I<_.] 8   I<V 8  c< 8#  ( I-<CVWOe 8o t cy< 8   I<V O 8" ' c,<}V 8  c<VO 8  # c(<VO 8@  c<8hQi 8   <h1i_ 8i  n s<O2hKiz 8   <OgO mNnpi 8   < LNL{Lhy 8   <LShvy 8   <Lh|h|h 8P $ )<?= 8J   x< 8   < 8P  X<6LoL>LhI 8S  X ]<yL 8p  <y= 8G  L Q< 8   < 8  < 8  P <O 8JY  ^ xc< 8   <L h" W 8a  f k < L h >  ! 8!  ! !!<=!Lm! 8w! |! !<!!]%" 8J/"  4" x9"<" 8"  " "<"L" 8" " "<" 8#  #  #<!#?#]# 8J#  # x#<# 8# # #<# 8# $  $<*$yT$ 8^$  c$ h$<w$$]$ 8J$  $ x$<%L8% 8B% G% L%<^%% 8J%  % x%<% 8% % %<&E& 8JO&  T& xY&<&L ' 8'  ' !'<B'Lg''y' 8' ' ,'<' ( 8J(  ( x (<^( 8h( m( r(<( 8( ( ( (<( 8(  ( (<) 8')  ,) 1)<h) 8r)  w) |)<)L) 8) ) )<) *LC** 8J*  * x*<*L* 8* + x +<&+ 80+ 5+ :+<+ 8 + +  +<+ 8 + +  +<, 8 , ",  ',<;, 8 E, J, (O,<z,J,y, 80, - -<-?-x- 8@- - -<- 8@- - -<- 8@- - `-<-!. 8J+.  0. x5.<. 8J.  . x.<.]. 8M. . .</ 8M/ / /<*/ 8M4/ 9/ >/<a/y/ 8/  / /</0 8J 0  0 x0<[0 8Je0  j0 xo0<0]0 8Z0 0 0<0 8Z1  1 1<!1[1 8Je1  j1 xo1<1 81 1 1<1 81 1 P 1<2 8e%2 *2 /2<P2 8eZ2 _2 d2<22 8J2  2 x2<2 8 3 3 3<%3 8/3 43 P 93<3 83 3 3<3 83 3 3<3 83 3 (3<4 84 4 ,4<T4 8^4 c4 h4<4 84 4 4<4 84 4 P 4<5 85 !5 &5<?5JI5[56 8 6 6 6<%6 8/6 46 96<G6 8Q6 V6 x[6<f6 8p6 u6 ,z6<6 86 6 6<6J,7 867 ;7 @7<Q77 8J7  7 x7<7 87 7 7<8J;8 8E8 J8 O8<o8 8y8 ~8 (8<8]8 88 8 8<9 89 #9 ((9<C9 8M9 R9 W9<f9 8p9 u9 Hz9<99 8:  : :<: r:[:: 8J:  : x:<:]z; 8J;  ; x;<; ; ;;>E<\<< 8<  < <<<L< 82=l=h< =1=== E=(O=0=8= @`r@J@`r  8 \ A U z    H p,dK$H@p4aX x=wU8`(%Ev4\  K!"8#` %%&Y'C( )8  *\ * c+ , U- .$ 0L 1t `3 5 7 *8 84 9X @: : < < = =tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_debug.c0000664000000000000000000002243712202141143022446 0ustar rootroot/* ** Debug library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lib_debug_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_lib.h" /* ------------------------------------------------------------------------ */ #define LJLIB_MODULE_debug LJLIB_CF(debug_getregistry) { copyTV(L, L->top++, registry(L)); return 1; } LJLIB_CF(debug_getmetatable) { lj_lib_checkany(L, 1); if (!lua_getmetatable(L, 1)) { setnilV(L->top-1); } return 1; } LJLIB_CF(debug_setmetatable) { lj_lib_checktabornil(L, 2); L->top = L->base+2; lua_setmetatable(L, 1); #if !LJ_52 setboolV(L->top-1, 1); #endif return 1; } LJLIB_CF(debug_getfenv) { lj_lib_checkany(L, 1); lua_getfenv(L, 1); return 1; } LJLIB_CF(debug_setfenv) { lj_lib_checktab(L, 2); L->top = L->base+2; if (!lua_setfenv(L, 1)) lj_err_caller(L, LJ_ERR_SETFENV); return 1; } /* ------------------------------------------------------------------------ */ static void settabss(lua_State *L, const char *i, const char *v) { lua_pushstring(L, v); lua_setfield(L, -2, i); } static void settabsi(lua_State *L, const char *i, int v) { lua_pushinteger(L, v); lua_setfield(L, -2, i); } static void settabsb(lua_State *L, const char *i, int v) { lua_pushboolean(L, v); lua_setfield(L, -2, i); } static lua_State *getthread(lua_State *L, int *arg) { if (L->base < L->top && tvisthread(L->base)) { *arg = 1; return threadV(L->base); } else { *arg = 0; return L; } } static void treatstackoption(lua_State *L, lua_State *L1, const char *fname) { if (L == L1) { lua_pushvalue(L, -2); lua_remove(L, -3); } else lua_xmove(L1, L, 1); lua_setfield(L, -2, fname); } LJLIB_CF(debug_getinfo) { lj_Debug ar; int arg, opt_f = 0, opt_L = 0; lua_State *L1 = getthread(L, &arg); const char *options = luaL_optstring(L, arg+2, "flnSu"); if (lua_isnumber(L, arg+1)) { if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), (lua_Debug *)&ar)) { setnilV(L->top-1); return 1; } } else if (L->base+arg < L->top && tvisfunc(L->base+arg)) { options = lua_pushfstring(L, ">%s", options); setfuncV(L1, L1->top++, funcV(L->base+arg)); } else { lj_err_arg(L, arg+1, LJ_ERR_NOFUNCL); } if (!lj_debug_getinfo(L1, options, &ar, 1)) lj_err_arg(L, arg+2, LJ_ERR_INVOPT); lua_createtable(L, 0, 16); /* Create result table. */ for (; *options; options++) { switch (*options) { case 'S': settabss(L, "source", ar.source); settabss(L, "short_src", ar.short_src); settabsi(L, "linedefined", ar.linedefined); settabsi(L, "lastlinedefined", ar.lastlinedefined); settabss(L, "what", ar.what); break; case 'l': settabsi(L, "currentline", ar.currentline); break; case 'u': settabsi(L, "nups", ar.nups); settabsi(L, "nparams", ar.nparams); settabsb(L, "isvararg", ar.isvararg); break; case 'n': settabss(L, "name", ar.name); settabss(L, "namewhat", ar.namewhat); break; case 'f': opt_f = 1; break; case 'L': opt_L = 1; break; default: break; } } if (opt_L) treatstackoption(L, L1, "activelines"); if (opt_f) treatstackoption(L, L1, "func"); return 1; /* Return result table. */ } LJLIB_CF(debug_getlocal) { int arg; lua_State *L1 = getthread(L, &arg); lua_Debug ar; const char *name; int slot = lj_lib_checkint(L, arg+2); if (tvisfunc(L->base+arg)) { L->top = L->base+arg+1; lua_pushstring(L, lua_getlocal(L, NULL, slot)); return 1; } if (!lua_getstack(L1, lj_lib_checkint(L, arg+1), &ar)) lj_err_arg(L, arg+1, LJ_ERR_LVLRNG); name = lua_getlocal(L1, &ar, slot); if (name) { lua_xmove(L1, L, 1); lua_pushstring(L, name); lua_pushvalue(L, -2); return 2; } else { setnilV(L->top-1); return 1; } } LJLIB_CF(debug_setlocal) { int arg; lua_State *L1 = getthread(L, &arg); lua_Debug ar; TValue *tv; if (!lua_getstack(L1, lj_lib_checkint(L, arg+1), &ar)) lj_err_arg(L, arg+1, LJ_ERR_LVLRNG); tv = lj_lib_checkany(L, arg+3); copyTV(L1, L1->top++, tv); lua_pushstring(L, lua_setlocal(L1, &ar, lj_lib_checkint(L, arg+2))); return 1; } static int debug_getupvalue(lua_State *L, int get) { int32_t n = lj_lib_checkint(L, 2); const char *name; lj_lib_checkfunc(L, 1); name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n); if (name) { lua_pushstring(L, name); if (!get) return 1; copyTV(L, L->top, L->top-2); L->top++; return 2; } return 0; } LJLIB_CF(debug_getupvalue) { return debug_getupvalue(L, 1); } LJLIB_CF(debug_setupvalue) { lj_lib_checkany(L, 3); return debug_getupvalue(L, 0); } LJLIB_CF(debug_upvalueid) { GCfunc *fn = lj_lib_checkfunc(L, 1); int32_t n = lj_lib_checkint(L, 2) - 1; if ((uint32_t)n >= fn->l.nupvalues) lj_err_arg(L, 2, LJ_ERR_IDXRNG); setlightudV(L->top-1, isluafunc(fn) ? (void *)gcref(fn->l.uvptr[n]) : (void *)&fn->c.upvalue[n]); return 1; } LJLIB_CF(debug_upvaluejoin) { GCfunc *fn[2]; GCRef *p[2]; int i; for (i = 0; i < 2; i++) { int32_t n; fn[i] = lj_lib_checkfunc(L, 2*i+1); if (!isluafunc(fn[i])) lj_err_arg(L, 2*i+1, LJ_ERR_NOLFUNC); n = lj_lib_checkint(L, 2*i+2) - 1; if ((uint32_t)n >= fn[i]->l.nupvalues) lj_err_arg(L, 2*i+2, LJ_ERR_IDXRNG); p[i] = &fn[i]->l.uvptr[n]; } setgcrefr(*p[0], *p[1]); lj_gc_objbarrier(L, fn[0], gcref(*p[1])); return 0; } #if LJ_52 LJLIB_CF(debug_getuservalue) { TValue *o = L->base; if (o < L->top && tvisudata(o)) settabV(L, o, tabref(udataV(o)->env)); else setnilV(o); L->top = o+1; return 1; } LJLIB_CF(debug_setuservalue) { TValue *o = L->base; if (!(o < L->top && tvisudata(o))) lj_err_argt(L, 1, LUA_TUSERDATA); if (!(o+1 < L->top && tvistab(o+1))) lj_err_argt(L, 2, LUA_TTABLE); L->top = o+2; lua_setfenv(L, 1); return 1; } #endif /* ------------------------------------------------------------------------ */ static const char KEY_HOOK = 'h'; static void hookf(lua_State *L, lua_Debug *ar) { static const char *const hooknames[] = {"call", "return", "line", "count", "tail return"}; lua_pushlightuserdata(L, (void *)&KEY_HOOK); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_isfunction(L, -1)) { lua_pushstring(L, hooknames[(int)ar->event]); if (ar->currentline >= 0) lua_pushinteger(L, ar->currentline); else lua_pushnil(L); lua_call(L, 2, 0); } } static int makemask(const char *smask, int count) { int mask = 0; if (strchr(smask, 'c')) mask |= LUA_MASKCALL; if (strchr(smask, 'r')) mask |= LUA_MASKRET; if (strchr(smask, 'l')) mask |= LUA_MASKLINE; if (count > 0) mask |= LUA_MASKCOUNT; return mask; } static char *unmakemask(int mask, char *smask) { int i = 0; if (mask & LUA_MASKCALL) smask[i++] = 'c'; if (mask & LUA_MASKRET) smask[i++] = 'r'; if (mask & LUA_MASKLINE) smask[i++] = 'l'; smask[i] = '\0'; return smask; } LJLIB_CF(debug_sethook) { int arg, mask, count; lua_Hook func; (void)getthread(L, &arg); if (lua_isnoneornil(L, arg+1)) { lua_settop(L, arg+1); func = NULL; mask = 0; count = 0; /* turn off hooks */ } else { const char *smask = luaL_checkstring(L, arg+2); luaL_checktype(L, arg+1, LUA_TFUNCTION); count = luaL_optint(L, arg+3, 0); func = hookf; mask = makemask(smask, count); } lua_pushlightuserdata(L, (void *)&KEY_HOOK); lua_pushvalue(L, arg+1); lua_rawset(L, LUA_REGISTRYINDEX); lua_sethook(L, func, mask, count); return 0; } LJLIB_CF(debug_gethook) { char buff[5]; int mask = lua_gethookmask(L); lua_Hook hook = lua_gethook(L); if (hook != NULL && hook != hookf) { /* external hook? */ lua_pushliteral(L, "external hook"); } else { lua_pushlightuserdata(L, (void *)&KEY_HOOK); lua_rawget(L, LUA_REGISTRYINDEX); /* get hook */ } lua_pushstring(L, unmakemask(mask, buff)); lua_pushinteger(L, lua_gethookcount(L)); return 3; } /* ------------------------------------------------------------------------ */ LJLIB_CF(debug_debug) { for (;;) { char buffer[250]; fputs("lua_debug> ", stderr); if (fgets(buffer, sizeof(buffer), stdin) == 0 || strcmp(buffer, "cont\n") == 0) return 0; if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || lua_pcall(L, 0, 0, 0)) { fputs(lua_tostring(L, -1), stderr); fputs("\n", stderr); } lua_settop(L, 0); /* remove eventual returns */ } } /* ------------------------------------------------------------------------ */ #define LEVELS1 12 /* size of the first part of the stack */ #define LEVELS2 10 /* size of the second part of the stack */ LJLIB_CF(debug_traceback) { int arg; lua_State *L1 = getthread(L, &arg); const char *msg = lua_tostring(L, arg+1); if (msg == NULL && L->top > L->base+arg) L->top = L->base+arg+1; else luaL_traceback(L, L1, msg, lj_lib_optint(L, arg+2, (L == L1))); return 1; } /* ------------------------------------------------------------------------ */ #include "lj_libdef.h" LUALIB_API int luaopen_debug(lua_State *L) { LJ_LIB_REG(L, LUA_DBLIBNAME, debug); return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/xedkbuild.bat0000664000000000000000000000607712231715321023042 0ustar rootroot@rem Script to build LuaJIT with the Xbox 360 SDK. @rem Donated to the public domain. @rem @rem Open a "Visual Studio .NET Command Prompt" (32 bit host compiler) @rem Then cd to this directory and run this script. @if not defined INCLUDE goto :FAIL @if not defined XEDK goto :FAIL @setlocal @rem ---- Host compiler ---- @set LJCOMPILE=cl /nologo /c /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE @set LJLINK=link /nologo @set LJMT=mt /nologo @set DASMDIR=..\dynasm @set DASM=%DASMDIR%\dynasm.lua @set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c %LJCOMPILE% host\minilua.c @if errorlevel 1 goto :BAD %LJLINK% /out:minilua.exe minilua.obj @if errorlevel 1 goto :BAD if exist minilua.exe.manifest^ %LJMT% -manifest minilua.exe.manifest -outputresource:minilua.exe @rem Error out for 64 bit host compiler @minilua @if errorlevel 8 goto :FAIL @set DASMFLAGS=-D GPR64 -D FRAME32 -D PPE -D SQRT -D DUALNUM minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_ppc.dasc @if errorlevel 1 goto :BAD %LJCOMPILE% /I "." /I %DASMDIR% /D_XBOX_VER=200 /DLUAJIT_TARGET=LUAJIT_ARCH_PPC host\buildvm*.c @if errorlevel 1 goto :BAD %LJLINK% /out:buildvm.exe buildvm*.obj @if errorlevel 1 goto :BAD if exist buildvm.exe.manifest^ %LJMT% -manifest buildvm.exe.manifest -outputresource:buildvm.exe buildvm -m peobj -o lj_vm.obj @if errorlevel 1 goto :BAD buildvm -m bcdef -o lj_bcdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m ffdef -o lj_ffdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m libdef -o lj_libdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m recdef -o lj_recdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m vmdef -o jit\vmdef.lua %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m folddef -o lj_folddef.h lj_opt_fold.c @if errorlevel 1 goto :BAD @rem ---- Cross compiler ---- @set "LJCOMPILE=%XEDK%\bin\win32\cl /nologo /c /MT /O2 /W3 /GF /Gm- /GR- /GS- /Gy /openmp- /D_CRT_SECURE_NO_DEPRECATE /DNDEBUG /D_XBOX /D_LIB /DLUAJIT_USE_SYSMALLOC" @set "LJLIB=%XEDK%\bin\win32\lib /nologo" @set "INCLUDE=%XEDK%\include\xbox" @if "%1" neq "debug" goto :NODEBUG @shift @set "LJCOMPILE=%LJCOMPILE% /Zi" :NODEBUG @if "%1"=="amalg" goto :AMALG %LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c @if errorlevel 1 goto :BAD %LJLIB% /OUT:luajit20.lib lj_*.obj lib_*.obj @if errorlevel 1 goto :BAD @goto :NOAMALG :AMALG %LJCOMPILE% /DLUA_BUILD_AS_DLL ljamalg.c @if errorlevel 1 goto :BAD %LJLIB% /OUT:luajit20.lib ljamalg.obj lj_vm.obj @if errorlevel 1 goto :BAD :NOAMALG @del *.obj *.manifest minilua.exe buildvm.exe @echo. @echo === Successfully built LuaJIT for Xbox 360 === @goto :END :BAD @echo. @echo ******************************************************* @echo *** Build FAILED -- Please check the error messages *** @echo ******************************************************* @goto :END :FAIL @echo To run this script you must open a "Visual Studio .NET Command Prompt" @echo (32 bit host compiler). The Xbox 360 SDK must be installed, too. :END tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_package.c0000664000000000000000000004300512202141143022745 0ustar rootroot/* ** Package library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2012 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lib_package_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_err.h" #include "lj_lib.h" /* ------------------------------------------------------------------------ */ /* Error codes for ll_loadfunc. */ #define PACKAGE_ERR_LIB 1 #define PACKAGE_ERR_FUNC 2 #define PACKAGE_ERR_LOAD 3 /* Redefined in platform specific part. */ #define PACKAGE_LIB_FAIL "open" #define setprogdir(L) ((void)0) /* Symbol name prefixes. */ #define SYMPREFIX_CF "luaopen_%s" #define SYMPREFIX_BC "luaJIT_BC_%s" #if LJ_TARGET_DLOPEN #include static void ll_unloadlib(void *lib) { dlclose(lib); } static void *ll_load(lua_State *L, const char *path, int gl) { void *lib = dlopen(path, RTLD_NOW | (gl ? RTLD_GLOBAL : RTLD_LOCAL)); if (lib == NULL) lua_pushstring(L, dlerror()); return lib; } static lua_CFunction ll_sym(lua_State *L, void *lib, const char *sym) { lua_CFunction f = (lua_CFunction)dlsym(lib, sym); if (f == NULL) lua_pushstring(L, dlerror()); return f; } static const char *ll_bcsym(void *lib, const char *sym) { #if defined(RTLD_DEFAULT) if (lib == NULL) lib = RTLD_DEFAULT; #elif LJ_TARGET_OSX || LJ_TARGET_BSD if (lib == NULL) lib = (void *)(intptr_t)-2; #endif return (const char *)dlsym(lib, sym); } #elif LJ_TARGET_WINDOWS #define WIN32_LEAN_AND_MEAN #ifndef WINVER #define WINVER 0x0500 #endif #include #ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2 BOOL WINAPI GetModuleHandleExA(DWORD, LPCSTR, HMODULE*); #endif #undef setprogdir static void setprogdir(lua_State *L) { char buff[MAX_PATH + 1]; char *lb; DWORD nsize = sizeof(buff); DWORD n = GetModuleFileNameA(NULL, buff, nsize); if (n == 0 || n == nsize || (lb = strrchr(buff, '\\')) == NULL) { luaL_error(L, "unable to get ModuleFileName"); } else { *lb = '\0'; luaL_gsub(L, lua_tostring(L, -1), LUA_EXECDIR, buff); lua_remove(L, -2); /* remove original string */ } } static void pusherror(lua_State *L) { DWORD error = GetLastError(); char buffer[128]; if (FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error, 0, buffer, sizeof(buffer), NULL)) lua_pushstring(L, buffer); else lua_pushfstring(L, "system error %d\n", error); } static void ll_unloadlib(void *lib) { FreeLibrary((HINSTANCE)lib); } static void *ll_load(lua_State *L, const char *path, int gl) { HINSTANCE lib = LoadLibraryA(path); if (lib == NULL) pusherror(L); UNUSED(gl); return lib; } static lua_CFunction ll_sym(lua_State *L, void *lib, const char *sym) { lua_CFunction f = (lua_CFunction)GetProcAddress((HINSTANCE)lib, sym); if (f == NULL) pusherror(L); return f; } static const char *ll_bcsym(void *lib, const char *sym) { if (lib) { return (const char *)GetProcAddress((HINSTANCE)lib, sym); } else { HINSTANCE h = GetModuleHandleA(NULL); const char *p = (const char *)GetProcAddress(h, sym); if (p == NULL && GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS|GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (const char *)ll_bcsym, &h)) p = (const char *)GetProcAddress(h, sym); return p; } } #else #undef PACKAGE_LIB_FAIL #define PACKAGE_LIB_FAIL "absent" #define DLMSG "dynamic libraries not enabled; no support for target OS" static void ll_unloadlib(void *lib) { UNUSED(lib); } static void *ll_load(lua_State *L, const char *path, int gl) { UNUSED(path); UNUSED(gl); lua_pushliteral(L, DLMSG); return NULL; } static lua_CFunction ll_sym(lua_State *L, void *lib, const char *sym) { UNUSED(lib); UNUSED(sym); lua_pushliteral(L, DLMSG); return NULL; } static const char *ll_bcsym(void *lib, const char *sym) { UNUSED(lib); UNUSED(sym); return NULL; } #endif /* ------------------------------------------------------------------------ */ static void **ll_register(lua_State *L, const char *path) { void **plib; lua_pushfstring(L, "LOADLIB: %s", path); lua_gettable(L, LUA_REGISTRYINDEX); /* check library in registry? */ if (!lua_isnil(L, -1)) { /* is there an entry? */ plib = (void **)lua_touserdata(L, -1); } else { /* no entry yet; create one */ lua_pop(L, 1); plib = (void **)lua_newuserdata(L, sizeof(void *)); *plib = NULL; luaL_getmetatable(L, "_LOADLIB"); lua_setmetatable(L, -2); lua_pushfstring(L, "LOADLIB: %s", path); lua_pushvalue(L, -2); lua_settable(L, LUA_REGISTRYINDEX); } return plib; } static const char *mksymname(lua_State *L, const char *modname, const char *prefix) { const char *funcname; const char *mark = strchr(modname, *LUA_IGMARK); if (mark) modname = mark + 1; funcname = luaL_gsub(L, modname, ".", "_"); funcname = lua_pushfstring(L, prefix, funcname); lua_remove(L, -2); /* remove 'gsub' result */ return funcname; } static int ll_loadfunc(lua_State *L, const char *path, const char *name, int r) { void **reg = ll_register(L, path); if (*reg == NULL) *reg = ll_load(L, path, (*name == '*')); if (*reg == NULL) { return PACKAGE_ERR_LIB; /* Unable to load library. */ } else if (*name == '*') { /* Only load library into global namespace. */ lua_pushboolean(L, 1); return 0; } else { const char *sym = r ? name : mksymname(L, name, SYMPREFIX_CF); lua_CFunction f = ll_sym(L, *reg, sym); if (f) { lua_pushcfunction(L, f); return 0; } if (!r) { const char *bcdata = ll_bcsym(*reg, mksymname(L, name, SYMPREFIX_BC)); lua_pop(L, 1); if (bcdata) { if (luaL_loadbuffer(L, bcdata, ~(size_t)0, name) != 0) return PACKAGE_ERR_LOAD; return 0; } } return PACKAGE_ERR_FUNC; /* Unable to find function. */ } } static int lj_cf_package_loadlib(lua_State *L) { const char *path = luaL_checkstring(L, 1); const char *init = luaL_checkstring(L, 2); int st = ll_loadfunc(L, path, init, 1); if (st == 0) { /* no errors? */ return 1; /* return the loaded function */ } else { /* error; error message is on stack top */ lua_pushnil(L); lua_insert(L, -2); lua_pushstring(L, (st == PACKAGE_ERR_LIB) ? PACKAGE_LIB_FAIL : "init"); return 3; /* return nil, error message, and where */ } } static int lj_cf_package_unloadlib(lua_State *L) { void **lib = (void **)luaL_checkudata(L, 1, "_LOADLIB"); if (*lib) ll_unloadlib(*lib); *lib = NULL; /* mark library as closed */ return 0; } /* ------------------------------------------------------------------------ */ static int readable(const char *filename) { FILE *f = fopen(filename, "r"); /* try to open file */ if (f == NULL) return 0; /* open failed */ fclose(f); return 1; } static const char *pushnexttemplate(lua_State *L, const char *path) { const char *l; while (*path == *LUA_PATHSEP) path++; /* skip separators */ if (*path == '\0') return NULL; /* no more templates */ l = strchr(path, *LUA_PATHSEP); /* find next separator */ if (l == NULL) l = path + strlen(path); lua_pushlstring(L, path, (size_t)(l - path)); /* template */ return l; } static const char *searchpath (lua_State *L, const char *name, const char *path, const char *sep, const char *dirsep) { luaL_Buffer msg; /* to build error message */ luaL_buffinit(L, &msg); if (*sep != '\0') /* non-empty separator? */ name = luaL_gsub(L, name, sep, dirsep); /* replace it by 'dirsep' */ while ((path = pushnexttemplate(L, path)) != NULL) { const char *filename = luaL_gsub(L, lua_tostring(L, -1), LUA_PATH_MARK, name); lua_remove(L, -2); /* remove path template */ if (readable(filename)) /* does file exist and is readable? */ return filename; /* return that file name */ lua_pushfstring(L, "\n\tno file " LUA_QS, filename); lua_remove(L, -2); /* remove file name */ luaL_addvalue(&msg); /* concatenate error msg. entry */ } luaL_pushresult(&msg); /* create error message */ return NULL; /* not found */ } static int lj_cf_package_searchpath(lua_State *L) { const char *f = searchpath(L, luaL_checkstring(L, 1), luaL_checkstring(L, 2), luaL_optstring(L, 3, "."), luaL_optstring(L, 4, LUA_DIRSEP)); if (f != NULL) { return 1; } else { /* error message is on top of the stack */ lua_pushnil(L); lua_insert(L, -2); return 2; /* return nil + error message */ } } static const char *findfile(lua_State *L, const char *name, const char *pname) { const char *path; lua_getfield(L, LUA_ENVIRONINDEX, pname); path = lua_tostring(L, -1); if (path == NULL) luaL_error(L, LUA_QL("package.%s") " must be a string", pname); return searchpath(L, name, path, ".", LUA_DIRSEP); } static void loaderror(lua_State *L, const char *filename) { luaL_error(L, "error loading module " LUA_QS " from file " LUA_QS ":\n\t%s", lua_tostring(L, 1), filename, lua_tostring(L, -1)); } static int lj_cf_package_loader_lua(lua_State *L) { const char *filename; const char *name = luaL_checkstring(L, 1); filename = findfile(L, name, "path"); if (filename == NULL) return 1; /* library not found in this path */ if (luaL_loadfile(L, filename) != 0) loaderror(L, filename); return 1; /* library loaded successfully */ } static int lj_cf_package_loader_c(lua_State *L) { const char *name = luaL_checkstring(L, 1); const char *filename = findfile(L, name, "cpath"); if (filename == NULL) return 1; /* library not found in this path */ if (ll_loadfunc(L, filename, name, 0) != 0) loaderror(L, filename); return 1; /* library loaded successfully */ } static int lj_cf_package_loader_croot(lua_State *L) { const char *filename; const char *name = luaL_checkstring(L, 1); const char *p = strchr(name, '.'); int st; if (p == NULL) return 0; /* is root */ lua_pushlstring(L, name, (size_t)(p - name)); filename = findfile(L, lua_tostring(L, -1), "cpath"); if (filename == NULL) return 1; /* root not found */ if ((st = ll_loadfunc(L, filename, name, 0)) != 0) { if (st != PACKAGE_ERR_FUNC) loaderror(L, filename); /* real error */ lua_pushfstring(L, "\n\tno module " LUA_QS " in file " LUA_QS, name, filename); return 1; /* function not found */ } return 1; } static int lj_cf_package_loader_preload(lua_State *L) { const char *name = luaL_checkstring(L, 1); lua_getfield(L, LUA_ENVIRONINDEX, "preload"); if (!lua_istable(L, -1)) luaL_error(L, LUA_QL("package.preload") " must be a table"); lua_getfield(L, -1, name); if (lua_isnil(L, -1)) { /* Not found? */ const char *bcname = mksymname(L, name, SYMPREFIX_BC); const char *bcdata = ll_bcsym(NULL, bcname); if (bcdata == NULL || luaL_loadbuffer(L, bcdata, ~(size_t)0, name) != 0) lua_pushfstring(L, "\n\tno field package.preload['%s']", name); } return 1; } /* ------------------------------------------------------------------------ */ static const int sentinel_ = 0; #define sentinel ((void *)&sentinel_) static int lj_cf_package_require(lua_State *L) { const char *name = luaL_checkstring(L, 1); int i; lua_settop(L, 1); /* _LOADED table will be at index 2 */ lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); lua_getfield(L, 2, name); if (lua_toboolean(L, -1)) { /* is it there? */ if (lua_touserdata(L, -1) == sentinel) /* check loops */ luaL_error(L, "loop or previous error loading module " LUA_QS, name); return 1; /* package is already loaded */ } /* else must load it; iterate over available loaders */ lua_getfield(L, LUA_ENVIRONINDEX, "loaders"); if (!lua_istable(L, -1)) luaL_error(L, LUA_QL("package.loaders") " must be a table"); lua_pushliteral(L, ""); /* error message accumulator */ for (i = 1; ; i++) { lua_rawgeti(L, -2, i); /* get a loader */ if (lua_isnil(L, -1)) luaL_error(L, "module " LUA_QS " not found:%s", name, lua_tostring(L, -2)); lua_pushstring(L, name); lua_call(L, 1, 1); /* call it */ if (lua_isfunction(L, -1)) /* did it find module? */ break; /* module loaded successfully */ else if (lua_isstring(L, -1)) /* loader returned error message? */ lua_concat(L, 2); /* accumulate it */ else lua_pop(L, 1); } lua_pushlightuserdata(L, sentinel); lua_setfield(L, 2, name); /* _LOADED[name] = sentinel */ lua_pushstring(L, name); /* pass name as argument to module */ lua_call(L, 1, 1); /* run loaded module */ if (!lua_isnil(L, -1)) /* non-nil return? */ lua_setfield(L, 2, name); /* _LOADED[name] = returned value */ lua_getfield(L, 2, name); if (lua_touserdata(L, -1) == sentinel) { /* module did not set a value? */ lua_pushboolean(L, 1); /* use true as result */ lua_pushvalue(L, -1); /* extra copy to be returned */ lua_setfield(L, 2, name); /* _LOADED[name] = true */ } lj_lib_checkfpu(L); return 1; } /* ------------------------------------------------------------------------ */ static void setfenv(lua_State *L) { lua_Debug ar; if (lua_getstack(L, 1, &ar) == 0 || lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ lua_iscfunction(L, -1)) luaL_error(L, LUA_QL("module") " not called from a Lua function"); lua_pushvalue(L, -2); lua_setfenv(L, -2); lua_pop(L, 1); } static void dooptions(lua_State *L, int n) { int i; for (i = 2; i <= n; i++) { lua_pushvalue(L, i); /* get option (a function) */ lua_pushvalue(L, -2); /* module */ lua_call(L, 1, 0); } } static void modinit(lua_State *L, const char *modname) { const char *dot; lua_pushvalue(L, -1); lua_setfield(L, -2, "_M"); /* module._M = module */ lua_pushstring(L, modname); lua_setfield(L, -2, "_NAME"); dot = strrchr(modname, '.'); /* look for last dot in module name */ if (dot == NULL) dot = modname; else dot++; /* set _PACKAGE as package name (full module name minus last part) */ lua_pushlstring(L, modname, (size_t)(dot - modname)); lua_setfield(L, -2, "_PACKAGE"); } static int lj_cf_package_module(lua_State *L) { const char *modname = luaL_checkstring(L, 1); int loaded = lua_gettop(L) + 1; /* index of _LOADED table */ lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); lua_getfield(L, loaded, modname); /* get _LOADED[modname] */ if (!lua_istable(L, -1)) { /* not found? */ lua_pop(L, 1); /* remove previous result */ /* try global variable (and create one if it does not exist) */ if (luaL_findtable(L, LUA_GLOBALSINDEX, modname, 1) != NULL) lj_err_callerv(L, LJ_ERR_BADMODN, modname); lua_pushvalue(L, -1); lua_setfield(L, loaded, modname); /* _LOADED[modname] = new table */ } /* check whether table already has a _NAME field */ lua_getfield(L, -1, "_NAME"); if (!lua_isnil(L, -1)) { /* is table an initialized module? */ lua_pop(L, 1); } else { /* no; initialize it */ lua_pop(L, 1); modinit(L, modname); } lua_pushvalue(L, -1); setfenv(L); dooptions(L, loaded - 1); return 0; } static int lj_cf_package_seeall(lua_State *L) { luaL_checktype(L, 1, LUA_TTABLE); if (!lua_getmetatable(L, 1)) { lua_createtable(L, 0, 1); /* create new metatable */ lua_pushvalue(L, -1); lua_setmetatable(L, 1); } lua_pushvalue(L, LUA_GLOBALSINDEX); lua_setfield(L, -2, "__index"); /* mt.__index = _G */ return 0; } /* ------------------------------------------------------------------------ */ #define AUXMARK "\1" static void setpath(lua_State *L, const char *fieldname, const char *envname, const char *def, int noenv) { #if LJ_TARGET_CONSOLE const char *path = NULL; UNUSED(envname); #else const char *path = getenv(envname); #endif if (path == NULL || noenv) { lua_pushstring(L, def); } else { path = luaL_gsub(L, path, LUA_PATHSEP LUA_PATHSEP, LUA_PATHSEP AUXMARK LUA_PATHSEP); luaL_gsub(L, path, AUXMARK, def); lua_remove(L, -2); } setprogdir(L); lua_setfield(L, -2, fieldname); } static const luaL_Reg package_lib[] = { { "loadlib", lj_cf_package_loadlib }, { "searchpath", lj_cf_package_searchpath }, { "seeall", lj_cf_package_seeall }, { NULL, NULL } }; static const luaL_Reg package_global[] = { { "module", lj_cf_package_module }, { "require", lj_cf_package_require }, { NULL, NULL } }; static const lua_CFunction package_loaders[] = { lj_cf_package_loader_preload, lj_cf_package_loader_lua, lj_cf_package_loader_c, lj_cf_package_loader_croot, NULL }; LUALIB_API int luaopen_package(lua_State *L) { int i; int noenv; luaL_newmetatable(L, "_LOADLIB"); lj_lib_pushcf(L, lj_cf_package_unloadlib, 1); lua_setfield(L, -2, "__gc"); luaL_register(L, LUA_LOADLIBNAME, package_lib); lua_pushvalue(L, -1); lua_replace(L, LUA_ENVIRONINDEX); lua_createtable(L, sizeof(package_loaders)/sizeof(package_loaders[0])-1, 0); for (i = 0; package_loaders[i] != NULL; i++) { lj_lib_pushcf(L, package_loaders[i], 1); lua_rawseti(L, -2, i+1); } lua_setfield(L, -2, "loaders"); lua_getfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); noenv = lua_toboolean(L, -1); lua_pop(L, 1); setpath(L, "path", LUA_PATH, LUA_PATH_DEFAULT, noenv); setpath(L, "cpath", LUA_CPATH, LUA_CPATH_DEFAULT, noenv); lua_pushliteral(L, LUA_PATH_CONFIG); lua_setfield(L, -2, "config"); luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 16); lua_setfield(L, -2, "loaded"); luaL_findtable(L, LUA_REGISTRYINDEX, "_PRELOAD", 4); lua_setfield(L, -2, "preload"); lua_pushvalue(L, LUA_GLOBALSINDEX); luaL_register(L, NULL, package_global); lua_pop(L, 1); return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_gc.o0000664000000000000000000005723012213333050021625 0ustar rootrootELF>h3@@ UHt;rH9uPtPW8P G8]UHWJv5u `#Huu tȃ]UHAWAVAUATSHIIAD(A{uHs(LCƒDtCAU(!Ɖу@t u ЈCIVAU(uA@tAAE0H9uAE0CHLAAHt E-LH[A\A]A^A_]UHATSHNV@ tI(@t9S us t<sSHtFtLt{ t?sFL@uktASBHv32V9tBFtL{tKKE t@t; t)t$ɃvGAD$8C A\$8[A\]UHAUATSHIHL3HtFtLNHL9uH[A\A]]UHAUATSHIf~PI^w,ID$HЀxu0FtLuAD$Rft LAD$Vft LAD$Xft LAt$0FtLH[A\A]]UHAWAVAUATSH(H}Do8AUAEt.AEAE HMA8 lA} tf2A]HC HH}HE HHxHE"kuMvuM KEDEHuӋU~AE EAEHMA@AE Di@jEEugAEt_L$AUHڋBHv42V9tFt H}HL9uEuEE}UUȉH@M$A|$AD$ u}u?Pv7At$V9tFt H};}uCAD$Pv6A4$V9tFt H}A9-}~AeAUAEH@HDH>A}tf8LAuFt H}A}tAA}uuAEHpHA8Mv@t H}-A}ADtFt H}ACA9rUDD$Pv9Dt V9tFt H}ACA9rA}uAEHAEH A}tf=MAE(`A]HHylHH)HAD$HH9sAL$4Ft'H9sH}HuAE&ft H}AE mA}tfAHUBgch.gct == ~(~12u)(o)->gch.gct == ~(~5u)(o)->gch.gct == ~(~11u)!(((&n->key)->it) == (~0u))(o)->gch.gct == ~(~8u)(o)->gch.gct == ~(~7u)(o)->gch.gct == ~(~6u)(o)->gch.gct == ~(~9u)lj_obj.h(o)->gch.gct == ~(~10u)o->gch.gct != ~(~11u)(t->marked & (0x08 | 0x10))old >= g->gc.total0(traceno)>0 && (MSize)(traceno)<(&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->sizetracetraceno != (&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->cur.traceno!((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) || (o->gch.marked & 0x20)((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) || ow == 0x40((o)->gch.marked & (0x01 | 0x02)) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))!(((((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~(((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->it) == (((GCobj *)(uintptr_t)(((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->gcr).gcptr32))->gch.gct)gct == ~(~8u) || gct == ~(~11u) || gct == ~(~6u) || gct == ~(~7u)(!((o)->gch.marked & (0x04|(0x01 | 0x02))))!(((((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~(((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->it) == (((GCobj *)(uintptr_t)(((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->gcr).gcptr32))->gch.gct)!((((&n->key)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&n->key)->it) == (((GCobj *)(uintptr_t)((&n->key)->gcr).gcptr32))->gch.gct)!((((&n->val)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&n->val)->it) == (((GCobj *)(uintptr_t)((&n->val)->gcr).gcptr32))->gch.gct)fn->l.nupvalues <= (((((fn)->c.ffid == 0)) ? (void) (0) : __assert_fail ("((fn)->c.ffid == 0)", "lj_gc.c", 207, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)((fn)->l.pc).ptr32)-sizeof(GCproto))))->sizeuv!((((&fn->c.upvalue[i])->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&fn->c.upvalue[i])->it) == (((GCobj *)(uintptr_t)((&fn->c.upvalue[i])->gcr).gcptr32))->gch.gct)(uintptr_t)(intptr_t)(i) >= (uintptr_t)-(intptr_t)(pt)->sizekgc!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct)!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((GCobj *)(uintptr_t)(g->jit_L).gcptr32) == ((void *)0)((o)->gch.marked & 0x04) && ((v)->gch.marked & (0x01 | 0x02)) && !((v)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause((((tv)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(osz == 0) == (p == ((void *)0))(nsz == 0) == (p == ((void *)0))((uintptr_t)(p) == (uint32_t)(uintptr_t)(p))!((((&g->registrytv)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&g->registrytv)->it) == (((GCobj *)(uintptr_t)((&g->registrytv)->gcr).gcptr32))->gch.gct)(&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->next).gcptr32)->uv))->prev).gcptr32)->uv) == uv && (&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->prev).gcptr32)->uv))->next).gcptr32)->uv) == uv!((((GCobj *)((&((GCobj *)(uintptr_t)(g->mainthref).gcptr32)->th))))->gch.marked & (0x01 | 0x02))g->gc.state == GCSfinalize || g->gc.state == GCSpause(((GCobj *)(uintptr_t)(g->jit_L).gcptr32))->gch.gct == ~(~6u)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)((uintptr_t)(o) == (uint32_t)(uintptr_t)(o))lj_gc_separateudatagc_finalizesetgcVcopyTVgc_sweepgc_onestepgc_mark_startgc_markpropagatemarkgc_traverse_tabgc_traverse_funcgc_traverse_protogc_marktracegc_traverse_threadatomicgc_mark_uvgc_clearweaklj_gc_step_jitlj_gc_fullgclj_gc_barrierflj_gc_barrieruvlj_gc_closeuvlj_mem_realloclj_mem_newgcoGCC: (Debian 4.7.3-4) 4.7.3zRx sAC n <KAC F (\ AC M  AC Cw  GAC Iy $AC I (AC M  $7AC Co $H>AC T% $pAC I (AC M -AC Ec $AC K $ VAC IH 4AC  (TRLC m T A AC  LC F $AC T (hAC MV $AC I $<AC G $dAC I 'AC b $AC Pl $=AC Cu .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @C&P,P12P/@2UT, OZh\0.e.z.u(\p 2h7h/ > sB /sK; D^ ]HiqJGF0P6 7HD >ZWsP D 0.h9Rj kcu      2>KVvjn-VR "w1+'CRQ=]ixlj_gc.cgc_marktrace__PRETTY_FUNCTION__.5187gc_maycleargc_sweep__PRETTY_FUNCTION__.5266gc_freefuncgc_mark__PRETTY_FUNCTION__.5103gc_mark_gcrootgc_traverse_tracepropagatemark__PRETTY_FUNCTION__.5238__PRETTY_FUNCTION__.5152__PRETTY_FUNCTION__.5174__PRETTY_FUNCTION__.5203__PRETTY_FUNCTION__.5226gc_propagate_graygc_call_finalizer__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.3380gc_finalize__PRETTY_FUNCTION__.5312__PRETTY_FUNCTION__.5139__PRETTY_FUNCTION__.5400__PRETTY_FUNCTION__.5405__PRETTY_FUNCTION__.5411__PRETTY_FUNCTION__.5423gc_onestep__PRETTY_FUNCTION__.5116__PRETTY_FUNCTION__.5121__PRETTY_FUNCTION__.5348__PRETTY_FUNCTION__.5279__PRETTY_FUNCTION__.5358__PRETTY_FUNCTION__.5392__PRETTY_FUNCTION__.5380__PRETTY_FUNCTION__.5430__assert_faillj_meta_cachelj_state_shrinkstacklj_vm_pcalllj_err_throwlj_tab_setlj_gc_separateudatalj_gc_finalize_udatalj_gc_finalize_cdatalj_gc_freealllj_gc_barrierflj_gc_barrieruvlj_gc_closeuvlj_gc_barriertracelj_mem_realloclj_err_memlj_str_resizelj_gc_fullgclj_gc_steplj_gc_step_jitlj_gc_step_fixtoplj_mem_newgcolj_mem_growlj_str_freelj_func_freeuvlj_state_freelj_func_freeprotolj_func_freelj_trace_freelj_cdata_freelj_tab_freelj_udata_free #B  %/A #BK P xU/& #^0 5 :/d #^n s Hx/ # #   /# #- 2 7/^ #h m r/ #   / #  /  #* / 4/n #x } `/ #  7/0 #  /3 #= B OG/i #s x }/ #  H/ #' , k1/w #  / #   /e #n s x/ #0  h/ #0  h// #8 = B / #P   / 1 #   / #W  ( / #P$ ) X . /F 2l 3 #D   / #D   /F #PP U X Z /r 4 #W  ( / #D' , 1/Q0 #0  /0  #0  /: #WD I (N/ #   /* #4 9  >/I #S X ]/ #   / #W$ ) (./t9 #   / #   /7>@ #J O ( T/` #j o P t/ #& #0 5  :/ #j   / #j( - 2/v #c   /5P #uZ _ 7d/r #u|  / #  /?6=f #p u z/ #  -/s #}  `/ #  / #  /ALA> #  (/=c{ (FGHIJKLMN @s`JF( LD t vn8X@hw+Rtarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_jit.o0000664000000000000000000004506012213333065022167 0ustar rootrootELF>"@@UHAWAVAUATSHHH}GH@HWH+WHUtHHEA"f``IHEH-HEDH}PJЀ x0t1t2gEHMʁ HU{LpE-uLpE|LuEnhxo^x-MtECIt$HLu0A<u)}tHMD AHED!MdEA$Hu#A$Hu.AALuIt$HLudA<=u]HUHLPЀ w!TPHp@ vupIcHMAu H}MdAA=it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))CMOVSSE2SSE3SSE4.1P4AMDK8ATOM(uintptr_t)(idx) < (pt)->sizekn!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(uintptr_t)(intptr_t)(idx) >= (uintptr_t)-(intptr_t)(pt)->sizekgclib_jit.clen != 0lj_target.hlj_obj.h(((L->top-1)->it) == (~11u))ninsnklinknexitlinktypeop < BC__MAXlinedefinedlastlinedefinedstackslotsparamsbytecodesgcconstsnconstsupvaluescurrentlineisvarargchildrensourceloc(((L->base)->it) == (~8u))ffidaddr_VMEVENTS(((L->top-2)->it) == (~11u))Linuxx64LuaJIT 2.0.2jitjit.utiljit.optnonerootlooptail-recursionup-recursiondown-recursioninterpreterreturn> onoffflushstatusattachosarchversion_numversion> funcinfofuncbcfunck funcuvname traceinfotraceirtracek tracesnaptracemc traceexitstub ircalladdr>startexitstub_addr_lj_cf_jit_attachsetgcVlj_cf_jit_util_tracesnaplj_cf_jit_util_traceinfolj_cf_jit_util_funckcopyTVlj_cf_jit_util_funcbclj_cf_jit_util_funcinfojitopt_paramd8 @pGCC: (Debian 4.7.3-4) 4.7.3zRx (AC M HFAC E|  hwAC Em  JAC E@  AC C  AC C $AC G  uAC Cm (DAC X $pAC P $eAC PP $[AC IM JAC E $AC T  0|AC Ct  TAC C $xAC G $'AC G  AC C  PAC EF AC K 0AC K  PAC E .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.8.rodata.str1.1.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @,3&l,l12p@22T OEX\i0rpH( x!P&X5 .M  8FRwoJu5?K@ eW [p@ JJ + |@U `53Mf'wAPAQ`(G Xi x 2<   D  JZbp!1<JXhya.:lib_jit.clj_cf_jit_opt_start__PRETTY_FUNCTION__.6048lj_cf_jit_util_ircalladdrlj_cf_jit_util_traceexitstub__PRETTY_FUNCTION__.5669jit_checktracelj_cf_jit_util_traceirlj_cf_jit_util_tracemc__PRETTY_FUNCTION__.3991flagbits_to_stringslj_cf_jit_statuslj_cf_jit_util_tracesnap__PRETTY_FUNCTION__.5998lj_cf_jit_util_traceksetintfieldlj_cf_jit_util_traceinfo__PRETTY_FUNCTION__.5973jit_trlinknamecheck_Lprotolj_cf_jit_util_funcuvnamelj_cf_jit_util_funck__PRETTY_FUNCTION__.5954__PRETTY_FUNCTION__.4040lj_cf_jit_util_funcbc__PRETTY_FUNCTION__.5948lj_cf_jit_util_funcinfo__PRETTY_FUNCTION__.5938lj_cf_jit_attach__PRETTY_FUNCTION__.5914setjitmodelj_cf_jit_flushlj_cf_jit_offlj_cf_jit_onlj_lib_cf_jitlj_lib_init_jitlj_lib_cf_jit_utillj_lib_init_jit_utillj_lib_cf_jit_optlj_lib_init_jit_optjit_param_default.LC10lj_lib_checkstrstrncmp__assert_faillj_dispatch_init_hotcountlj_err_callervlj_lib_checkintlj_ir_callinfolj_ir_modelj_str_newlua_createtablelj_tab_setinthlj_ir_kvaluelj_tab_setstrlua_setfieldlj_err_argtlj_debug_uvnamelj_bc_modelj_lib_optintlj_debug_linelua_pushbooleanlj_debug_pushloclj_lib_checkfunclj_lib_optstrluaL_findtablelua_pushvaluelua_rawsetilj_tab_setlua_nextluaJIT_setmodelj_err_callerluaopen_jitlua_pushlstringlua_pushintegerlj_lib_registerlj_vm_cpuidlj_dispatch_update{5J6 /   7 06@8 9: ;:? /F K P7::% <=$ /. 3 87= /  7Y p :>$ /. 3 (87i??? ?3g:@ @| = A > /  ( 7 E% J; MQ Rj / = /   7 X B? C{ : D D = /   7K :v /@  0 7 /U  P 7 /@   7b /l q v 7 : /`  a 7 EeFz> /  (7 n z    0 F cGj H BH B /   7 "B0I5 BBV /` e j7> /  (7   =A .J>KK XLMN /   7O+PQRC:"Qs 5xT ;TU ?T /` / LV /  / PV / /x YVWW///////X`QhApx 3( 0+ 8J @ HP?X`hpafkp (08 Ll$Ht?@   J 4+ X |3AA4QTatarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_record.o0000664000000000000000000020521012213333066022512 0ustar rootrootELF>@@UHG]UH9vHGh]UHH]LeHHAEfffMcHBH]LeUHAȃ AAu#tuAAEAADY]UHH]LeLmH HLcHG`H@BD=v]tZAAfA EfffLJAwDD)HB9f EfffǃHH]LeLmHxt@UH僿t:]HHЋuUHt1DBBHGhHT HHGhÃHGhUHSHHfu-HG @;Gu fLJ fLJfLJHH[]UHHGxp@%t @=v 9vH9w鉷]UHATSILJ@wfWRGP9u*u@GTftfGRA$A$thAwIIT$HʀzEuBu1fADŽ$UfA$fADŽ$LAuLAƄ$AƄ$[A\]UH僿P H9H u1u!u WPf~tRH9tǰH9u*ǶffǴvy HH@uktt W)ƒwy G4t0Gy]UH僿P u tCLJHH H9Ghu uWP ]UHH]LeLmLuL}H0HA􋇈%=DHwDHƀx(u#xfx+DDH DAADAA< 9/@"D @uxEt!H{`0H)HGHDxvBMc,HLH9Eu @ ,@ fǃ(ffDH%AEfǃ fDfHE t> ftHSHcIyCfǃ fDfDH fǃ fDfHH]LeLmLuL}L_xMS@LFM9yUHATSHADDfu94If%9fLEaٸA/M9s+A)%A)%AH]LeLmLuL}UHH]LeLmLuL}HPHIIՉMȋAĉHW`HRHHUHHUHD4EtDEE}t HuEAT$A0MLHEAT$A0MLHEH}H|AIvUAUAE UfAUUfAUDMDEċM‹uHDLHfAEEu>  UDHoAƃ}u:L}LÈ(ffDEfHAAAT$HD4fEuADH]LeLmLuL}UHAUATSHHHG`H@HytQDjEEHHJH BA9vHA9wAD$H[A\A]]UHNAtLWHG HD@HcHG(LƉ4Ƈ;s]UHAWAVAUATSHHHIUAH`HWL$HL4}t}Af9< uMD ʉM@ MB Ҁ(fffHAAF HUHoEȉEUĉULA%E=uLHELuHEHMHM9uuDH$HUv)t)u'fǃXffǃHHM}u?HUvffǃUffǃn2HHM=HUt'fǃUffǃHHMHEHEH}AAF AFEI|$*AEFM‹uHA|$ vJAD$EA|$vJA $MA|$vJAD$E}tMXMI|$ct;Ef.EEXXEEf.EAEAMf.MEXXEMf.AEAHAMUʀ ffEfHEuDAEIHChcADILkhNEEAGIEHChA_DAEIHCh>ƃDHH[A\A]A^A_]UHSHHHG`HPHBRDBDHWxR%DɃ~@PuRHH) HcH)ЋRI9׃uHChH;H uL;$HHChDEuSPHfbSPHSO9 }Gt6HHShHimNA90?fS HH[]UHSHHHH[]UHH]LeLmLuL}H@IALHAEEDf ẼGẺEDPF9Etou3}u-fALJUfAfALJLú:uh}ubfALJUfEfALJLAċUUAf ʀ fAfAfELADH]LeLmLuL}UHNAv#v\ѸEFw :Qw-t щ )6]UHAWAVAUATSHHAAHGpDdkAA|$yAT$BBZRBЋdH9tq9rHHuK%t9w( %ft9wHHHtƒyP f,fEyUHCxx%_w`HspHEfǃfDfHHÚPD}At$HyAAD$I>1)1)A A|$AT$HC`p$H9rxp H9sp҉H+PH4HxV)Eu"HcHHHcHD,;fǃfA$fADŽ$LþLfADŽ$JfA$fA$L1H([A\A]A^A_]UHH]LeLmLuL}HHIA֋N0%= uK~t)DhfLJ CffLJEA= ~t,DzDjExAu1AT$0fǃffHUfLJCffLJ |DHfǃ|ffHEBhLHPtt HHs`HIL$Jv=AL$y9uIVR(tPt!w A 0HAD$@Ml$ AD$<VfLJ CffLJ EhN#vtэQDhMuAD$<=  LHEAD$AD$< HUfǃffHH]LeLmLuL}UHAWAVAUATSHhI|IAHG`H@JHpILMHx0IB< u|LLHII9}AEIM`HpHHEH Pv;Ur9uRA@(t HuLtE%=t LIM~LATAHuEAHEHpAHpztoHp0~FL`x_vzfADžCfAfADžL|IT$@LfADž|fAfALLLA2LAfADžfAfALAE&EHh[A\A]A^A_]UHATSHAHC`H@@ƒu9y H)HH)AHHEJ4H;~ H[A\]UHH]LeHHAAD$HHADH]LeUHATSHIHEHH Hs`HvHAt$@1At$8qAt$4qH{`IL$H H qv=2DFD9uvOI(@tH{`IL$HJH qv>rDFD9uvOI(@tH{`IL$HJH qv;Rr9uJWR(tH[A\]UHH]LeLmLuH IHAAC8 u]C0IL$`HCHH Pr9uRA@(C4 tC0IL$`HCHH Pv:r9uRA@(tDHLDHLcH]LeLmLuUHAWAVAUATSHIHA׾JẺI$L4IT$`HRL,‹C0AFC4AFIL$`HIEH PvAu8fAdžUfEfAdžLAL諸D au.Au(fAdžUfAfAdžLAULND AuA(DD D}vJM}vJEAAuq}vJM}vJDE*AA}tu}t}DDDDDLAǾLúEEIN`HUHUH Bv;Ep9uPA@(tHEHHD AAEADHuLu(IV`HMH0H A0p9uHB@(tE[MIH9MEfAdž CfAfAdžLUfAdžfAfALucMIH9MEfAdž CfAfAdž LUfAdžfAfALMMHMHMHv;Mq9uIB@(tDHuLt:LH0U(Lu HuLMEEEUUEIF`HUHUH JvAuAA~A9u~pv(@tH}H}H wv>uDFD9u~pv(@tHuHuv;Mq9uQ@@(t ʀD fAfEfAL D1IvhL跾0EAA t%= uDHuLfD xA t A L臲HMHLEDLtA t1A t((1IvhLxoEEIN`HUHUH Bv;Ep9uPA@(tHuLDmIV`HMH0H Af0p9uHB@(tE-MIH9MEfAdž CfAfAdžLUfAdžfAfALucMIH9MEfAdž CfAfAdž LUfAdžfAfALMMHMHMHv;Mq9uIB@(tHuL[LEH0UDL:DHuL&(8¸EHFA;Aہ%=u+fAdžCfAfAdžL= uھLd`IN`HUH0H Bv>0p9uPA@(tH0LL貹IH Iv`HvH֋p1MF`HHH:H wv>2DND9u~Apv(@tYMF`H}HzH wv?rDND9u~Apv(@tABLLv%=uHUL]IN`HUHUH Bv;Ep9uPA@(tHuL9]DmIF`HUHUH JvAuAA~A9u~pv(@tH}H}H wv>uDFD9u~pv(@tHuHuv;Mq9uQ@@(tADA݉ f DvD%=uAv%=u#DHLEHMDLHuLDA݉DvD%=u6v%=uHMDLMHuL5DvD%=u@v%=u"DLHMډLHuL,E;AWILDIAD9sA;`CAQHIVxJHH9svR4 L LQDL=IFp@IN`EEx uPA@(tL|fAdž CfAfAdžLEEdHuLP*ELEEdHuL % =DfAdžNfAfALHIVxJHH9sR4~ t LfAdžOfAfAdžLVIEN,AwuLLAEIAWL,AwuL$AEIAWL,AwuLAEIV`HBJHpH0H Nv:y9uIRR(tIv`HHHHH Qv;Pz9uJVR(tIN`HPHPH rv;@p9uPA@(tHDL IF`HXH+XHD)HDL IF`HXH+XHD)HDLx EIIFx@IF`H@@+HcH(tAH(HI(IuAAIDLAH9~ C'AM DHHIIIIL H9}CtA1I<uHHL9uH fAdžEfAdžfAdžLDFDEAMH('L;(H(INH8CtLfAdžfAfALbaseslot == 1J->base[ra] != 0lj_obj.h(((o)->it) < 0xfffeffffu)lj_ctype.hid > 0 && id < cts->topval == 0J->baseslot > 1J->baseslot > cbase+10J->baseslot >= 1ix->idxchain != 0(((&ix->mobjv)->it) == (~8u))(((&ix->tabv)->it) == (~11u))hasmm!hasmm(((&ix->tabv)->it) == (~12u))(((functv)->it) == (~8u))nslots < 250((ir))->o == IR_KGC(J->slot[s+1] & 0x00010000)lj_obj_equal(tv, &tvk)J->framedepth == depthop1 == 0op1 >= nki < REF_BIASop2 == 0op2 >= nkir->prev >= nk(((tv)->it) < 0xfffeffffu)((((&ix.keyv))->it) == (~4u))((((&ix.valv))->it) == (~4u))J->base[dst+i] != 0(pt->flags & 0x02)(((IRType)((J->scev.t).irt & IRT_TYPE)) == IRT_INT) && ir->o == IR_SLOAD(uintptr_t)(((BCReg)((ins)>>16))) < (J->pt)->sizekn((BCOp)((*fori)&0xff)) == BC_FORI || ((BCOp)((*fori)&0xff)) == BC_JFORI(((&((GCobj *)(uintptr_t)((J->L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)((((((((tr[i])))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM))) || ((((((tr[i]))) & (IRT_TYPE<<24)) == ((IRT_STR)<<24))))(((&(((GCobj *)(uintptr_t)((frame - (cbase+1))->fr.func).gcptr32))->fn))->c.ffid == 0)((&J->cur.ir[(ptref)]))->o == IR_KGCcont == lj_cont_condf || cont == lj_cont_condt!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))((&J->cur.ir[(((IRRef1)(xref)))]))->o == IR_KPTR || ((&J->cur.ir[(((IRRef1)(xref)))]))->o == IR_KKPTR(((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC(((((((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC", "lj_record.c", 1147, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(((IRRef1)(key)))])))->gcr).gcptr32))))->gch.gct == ~(~4u)((((mo)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(((((ix->key)) & (IRT_TYPE<<24)) == ((IRT_CDATA)<<24)))J->baseslot >= 1 && J->baseslot < 250J->baseslot == 1 || (J->slot[J->baseslot-1] & 0x00010000)ref >= J->cur.nk && ref < J->cur.nins((IRType)(ir->t).irt) == ((IRType)((tr)>>24))(((((tr)) & (IRT_TYPE<<24)) == ((IRT_FUNC)<<24)))((((GCobj *)(uintptr_t)((tv)->fr.func).gcptr32)))->gch.gct == ~(~8u)((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)fn == ((((((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)) ? (void) (0) : __assert_fail ("((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail (\"((ir))->o == IR_KGC\", \"lj_record.c\", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)", "lj_record.c", 102, __PRETTY_FUNCTION__)), (&((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->fn)))s > delta ? (J->slot[s-delta] & 0x00010000) : (s == delta)(ir)->o == IR_KPTR || (ir)->o == IR_KKPTR((((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR) ? (void) (0) : __assert_fail ("(ir)->o == IR_KPTR || (ir)->o == IR_KKPTR", "lj_record.c", 106, __PRETTY_FUNCTION__)), (((void *)(void *)(uintptr_t)((ir)->ptr).ptr32))) == ((void *)(void *)(uintptr_t)(tv->gcr).gcptr32)((((((tr))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM)))itype2irt(tv) == ((IRType)(((tr)>>24) & IRT_TYPE))(((tv)->it) < 0xfffeffffu) && ((tv)->n != (tv)->n)nk <= REF_BIAS && nins >= REF_BIAS && nins < 65536i >= REF_BIAS ? op1 < i : op1 > ii >= REF_BIAS ? op2 < i : op2 > ii >= REF_BIAS ? ir->prev < i : ir->prev > iir->o == IR_NOP || (&J->cur.ir[(ir->prev)])->o == ir->o(uintptr_t)(rc) < (J->pt)->sizekn(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc", "lj_record.c", 1738, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((J->pt)->k).ptr32)[(~(ptrdiff_t)rc)]).gcptr32))))->gch.gct == ~(~4u)(((((uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc", "lj_record.c", 1946, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((J->pt)->k).ptr32)[(~(ptrdiff_t)rc)]).gcptr32))))->gch.gct == ~(~11u)((((J->L->base-1)->fr.tp.ftsz) & (3|4)) == FRAME_VARG)((BCOp)((pc[(ptrdiff_t)rc-0x8000])&0xff)) == BC_JFORL(rc)>0 && (MSize)(rc)sizetrace(lnk)>0 && (MSize)(lnk)sizetrace(J->parent)>0 && (MSize)(J->parent)sizetrace(J->cur.root)>0 && (MSize)(J->cur.root)sizetrace((BCOp)((pc[-1])&0xff)) == BC_ITERC((BCOp)((pc[-1])&0xff)) == BC_JMPcopyTVrec_call_setuplj_record_retcheck_downrec_unrolllj_record_mm_lookupsetgcVlj_record_idxrec_mm_preprec_idx_keynumberVintrec_idx_abcnommstrlj_record_insnumberVnumrec_check_slotsrec_check_irrec_mm_comp_cdatarec_upvaluectype_checkgetcurrfrec_vargrec_forrec_for_loopfind_kinitrec_iterlrec_func_jitrec_func_vararglj_record_setuprec_setup_rootP@GCC: (Debian 4.7.3-4) 4.7.3zRx AC I <AC Y  \ZAC LI OAC J $AC P MRC w WC Y  OAC EE ,`AC [  LAC C p$AC  `AC [ (AC X 8VC Gn F XBA $cAC TJ (@AC X (lAC X $AC I bAC ] (UAC MC  2AC E( 0%AC E[ (PEAC X( |AC | (:AC M( (AC Mn (AC M ( AC [ (L[AC MI  xAC C  MAC L|  gAC C_ $HAC T/ ( AC M (8..AC P. $dAC C .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @o (S&8p,8p128pt@2rT?OH \Ћi0؋r(` X E ? (,Z/O9?MH ak sO`" $0`< 1  )^ BD cK Y f   >bU2'%:  1Jc |% H 4[!u7g18HC\$:iPp    0   1  7BP\iuLE$2<LJRYdp| z/(7M%1{6D+<..R_jw Yj0lj_record.crec_for_directionrec_loopsloadtfori_loadsloadgetcurrf__PRETTY_FUNCTION__.5591rec_iterl__PRETTY_FUNCTION__.5728rec_comp_preprec_func_setuprec_stoprec_loop_interprec_loop_jitrec_idx_abc__PRETTY_FUNCTION__.5928__PRETTY_FUNCTION__.3440find_kinit__PRETTY_FUNCTION__.5644__PRETTY_FUNCTION__.3444fori_argrec_for_checkrec_for_loop__PRETTY_FUNCTION__.5703rec_mm_prep__PRETTY_FUNCTION__.5838rec_comp_fixuprec_for__PRETTY_FUNCTION__.5719check_call_unrollrec_func_luarec_upvalue__PRETTY_FUNCTION__.4285__PRETTY_FUNCTION__.6001__PRETTY_FUNCTION__.5812__PRETTY_FUNCTION__.5792__PRETTY_FUNCTION__.5964__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5935__PRETTY_FUNCTION__.5951__PRETTY_FUNCTION__.5850rec_call_setup__PRETTY_FUNCTION__.5775rec_mm_callcomprec_mm_comp_cdata__PRETTY_FUNCTION__.5916rec_mm_arith__PRETTY_FUNCTION__.6135__PRETTY_FUNCTION__.5564__PRETTY_FUNCTION__.5538__PRETTY_FUNCTION__.6059__PRETTY_FUNCTION__.6045__PRETTY_FUNCTION__.6033__PRETTY_FUNCTION__.6282__PRETTY_FUNCTION__.6266.LC74lj_ir_emit__assert_faillj_snap_addlj_trace_errlj_opt_foldlj_bc_modelj_ir_kintlj_ir_knum_u64lj_opt_narrow_forllj_vm_asm_beginlj_ir_kptr_lj_snap_shrinklj_meta_forlj_trace_flushlj_record_objcmplj_obj_equallj_record_constifylj_ir_knumintlj_ir_kgclj_record_retmemmovememsetlj_cont_ralj_cont_noplj_cont_catlj_cont_condflj_cont_condtlj_snap_purgelj_record_idxlj_record_mm_lookuplj_record_calllj_tab_getlj_opt_narrow_indexlj_ir_kslotlj_tab_getstrlj_opt_fwd_wasnonnillj_ir_knulllj_record_tailcalllj_record_inslj_ir_kvaluelj_ir_modelj_ir_numcmplj_ir_strcmplj_ir_calllj_opt_narrow_unmlj_opt_narrow_arithlj_opt_narrow_modlj_ir_tonumlj_opt_narrow_powlj_trace_err_infolj_ffrecord_funclj_ffrecord_select_modelj_record_setuplj_snap_replayjE;EE 7  F 7  #FEGHHIG@HH H*HCHH 7<R W \F 71 . 7FIIXIzI JNKhL{ 7  PF 71 . 7FK 7^ . 7 F L K L0 Iv K I K I I I` In K K8 M 7  FP I 7  F N OP*IbQM 7   FI`II 7^ .  7F, 7^6 .; 7@F[ 7^e .j 7oFGRIRHwTI0IlIV W 7 Q \F 7 Q \F< 7F K tPFqWIUII-I}III9IH$ 7. 3 }8F0H@ 7J O }TF 7  FL 7V [ `FHM 7W \ aFHWOI  7  F=YZZy NH [ \ ] 7# ( - F4 ^= _D 7N S 0X Fe Hs 7} F ` G! 7  ! ! !F+!bHN> 7pX> ]> Pb>Fy> 7p> > x>F> 7p> > I>F> 7p? ?  ?F-? 7p7? 4'TLL $z/P 4|{6(7u78$:<+<hYjtarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_jit.h0000664000000000000000000003561112202141143022010 0ustar rootroot/* ** Common definitions for the JIT compiler. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_JIT_H #define _LJ_JIT_H #include "lj_obj.h" #include "lj_ir.h" /* JIT engine flags. */ #define JIT_F_ON 0x00000001 /* CPU-specific JIT engine flags. */ #if LJ_TARGET_X86ORX64 #define JIT_F_CMOV 0x00000010 #define JIT_F_SSE2 0x00000020 #define JIT_F_SSE3 0x00000040 #define JIT_F_SSE4_1 0x00000080 #define JIT_F_P4 0x00000100 #define JIT_F_PREFER_IMUL 0x00000200 #define JIT_F_SPLIT_XMM 0x00000400 #define JIT_F_LEA_AGU 0x00000800 /* Names for the CPU-specific flags. Must match the order above. */ #define JIT_F_CPU_FIRST JIT_F_CMOV #define JIT_F_CPUSTRING "\4CMOV\4SSE2\4SSE3\6SSE4.1\2P4\3AMD\2K8\4ATOM" #elif LJ_TARGET_ARM #define JIT_F_ARMV6_ 0x00000010 #define JIT_F_ARMV6T2_ 0x00000020 #define JIT_F_ARMV7 0x00000040 #define JIT_F_VFPV2 0x00000080 #define JIT_F_VFPV3 0x00000100 #define JIT_F_ARMV6 (JIT_F_ARMV6_|JIT_F_ARMV6T2_|JIT_F_ARMV7) #define JIT_F_ARMV6T2 (JIT_F_ARMV6T2_|JIT_F_ARMV7) #define JIT_F_VFP (JIT_F_VFPV2|JIT_F_VFPV3) /* Names for the CPU-specific flags. Must match the order above. */ #define JIT_F_CPU_FIRST JIT_F_ARMV6_ #define JIT_F_CPUSTRING "\5ARMv6\7ARMv6T2\5ARMv7\5VFPv2\5VFPv3" #elif LJ_TARGET_PPC #define JIT_F_SQRT 0x00000010 #define JIT_F_ROUND 0x00000020 /* Names for the CPU-specific flags. Must match the order above. */ #define JIT_F_CPU_FIRST JIT_F_SQRT #define JIT_F_CPUSTRING "\4SQRT\5ROUND" #elif LJ_TARGET_MIPS #define JIT_F_MIPS32R2 0x00000010 /* Names for the CPU-specific flags. Must match the order above. */ #define JIT_F_CPU_FIRST JIT_F_MIPS32R2 #define JIT_F_CPUSTRING "\010MIPS32R2" #else #define JIT_F_CPU_FIRST 0 #define JIT_F_CPUSTRING "" #endif /* Optimization flags. */ #define JIT_F_OPT_MASK 0x0fff0000 #define JIT_F_OPT_FOLD 0x00010000 #define JIT_F_OPT_CSE 0x00020000 #define JIT_F_OPT_DCE 0x00040000 #define JIT_F_OPT_FWD 0x00080000 #define JIT_F_OPT_DSE 0x00100000 #define JIT_F_OPT_NARROW 0x00200000 #define JIT_F_OPT_LOOP 0x00400000 #define JIT_F_OPT_ABC 0x00800000 #define JIT_F_OPT_SINK 0x01000000 #define JIT_F_OPT_FUSE 0x02000000 /* Optimizations names for -O. Must match the order above. */ #define JIT_F_OPT_FIRST JIT_F_OPT_FOLD #define JIT_F_OPTSTRING \ "\4fold\3cse\3dce\3fwd\3dse\6narrow\4loop\3abc\4sink\4fuse" /* Optimization levels set a fixed combination of flags. */ #define JIT_F_OPT_0 0 #define JIT_F_OPT_1 (JIT_F_OPT_FOLD|JIT_F_OPT_CSE|JIT_F_OPT_DCE) #define JIT_F_OPT_2 (JIT_F_OPT_1|JIT_F_OPT_NARROW|JIT_F_OPT_LOOP) #define JIT_F_OPT_3 (JIT_F_OPT_2|\ JIT_F_OPT_FWD|JIT_F_OPT_DSE|JIT_F_OPT_ABC|JIT_F_OPT_SINK|JIT_F_OPT_FUSE) #define JIT_F_OPT_DEFAULT JIT_F_OPT_3 #if LJ_TARGET_WINDOWS || LJ_64 /* See: http://blogs.msdn.com/oldnewthing/archive/2003/10/08/55239.aspx */ #define JIT_P_sizemcode_DEFAULT 64 #else /* Could go as low as 4K, but the mmap() overhead would be rather high. */ #define JIT_P_sizemcode_DEFAULT 32 #endif /* Optimization parameters and their defaults. Length is a char in octal! */ #define JIT_PARAMDEF(_) \ _(\010, maxtrace, 1000) /* Max. # of traces in cache. */ \ _(\011, maxrecord, 4000) /* Max. # of recorded IR instructions. */ \ _(\012, maxirconst, 500) /* Max. # of IR constants of a trace. */ \ _(\007, maxside, 100) /* Max. # of side traces of a root trace. */ \ _(\007, maxsnap, 500) /* Max. # of snapshots for a trace. */ \ \ _(\007, hotloop, 56) /* # of iter. to detect a hot loop/call. */ \ _(\007, hotexit, 10) /* # of taken exits to start a side trace. */ \ _(\007, tryside, 4) /* # of attempts to compile a side trace. */ \ \ _(\012, instunroll, 4) /* Max. unroll for instable loops. */ \ _(\012, loopunroll, 15) /* Max. unroll for loop ops in side traces. */ \ _(\012, callunroll, 3) /* Max. unroll for recursive calls. */ \ _(\011, recunroll, 2) /* Min. unroll for true recursion. */ \ \ /* Size of each machine code area (in KBytes). */ \ _(\011, sizemcode, JIT_P_sizemcode_DEFAULT) \ /* Max. total size of all machine code areas (in KBytes). */ \ _(\010, maxmcode, 512) \ /* End of list. */ enum { #define JIT_PARAMENUM(len, name, value) JIT_P_##name, JIT_PARAMDEF(JIT_PARAMENUM) #undef JIT_PARAMENUM JIT_P__MAX }; #define JIT_PARAMSTR(len, name, value) #len #name #define JIT_P_STRING JIT_PARAMDEF(JIT_PARAMSTR) /* Trace compiler state. */ typedef enum { LJ_TRACE_IDLE, /* Trace compiler idle. */ LJ_TRACE_ACTIVE = 0x10, LJ_TRACE_RECORD, /* Bytecode recording active. */ LJ_TRACE_START, /* New trace started. */ LJ_TRACE_END, /* End of trace. */ LJ_TRACE_ASM, /* Assemble trace. */ LJ_TRACE_ERR /* Trace aborted with error. */ } TraceState; /* Post-processing action. */ typedef enum { LJ_POST_NONE, /* No action. */ LJ_POST_FIXCOMP, /* Fixup comparison and emit pending guard. */ LJ_POST_FIXGUARD, /* Fixup and emit pending guard. */ LJ_POST_FIXGUARDSNAP, /* Fixup and emit pending guard and snapshot. */ LJ_POST_FIXBOOL, /* Fixup boolean result. */ LJ_POST_FIXCONST, /* Fixup constant results. */ LJ_POST_FFRETRY /* Suppress recording of retried fast functions. */ } PostProc; /* Machine code type. */ #if LJ_TARGET_X86ORX64 typedef uint8_t MCode; #else typedef uint32_t MCode; #endif /* Stack snapshot header. */ typedef struct SnapShot { uint16_t mapofs; /* Offset into snapshot map. */ IRRef1 ref; /* First IR ref for this snapshot. */ uint8_t nslots; /* Number of valid slots. */ uint8_t topslot; /* Maximum frame extent. */ uint8_t nent; /* Number of compressed entries. */ uint8_t count; /* Count of taken exits for this snapshot. */ } SnapShot; #define SNAPCOUNT_DONE 255 /* Already compiled and linked a side trace. */ /* Compressed snapshot entry. */ typedef uint32_t SnapEntry; #define SNAP_FRAME 0x010000 /* Frame slot. */ #define SNAP_CONT 0x020000 /* Continuation slot. */ #define SNAP_NORESTORE 0x040000 /* No need to restore slot. */ #define SNAP_SOFTFPNUM 0x080000 /* Soft-float number. */ LJ_STATIC_ASSERT(SNAP_FRAME == TREF_FRAME); LJ_STATIC_ASSERT(SNAP_CONT == TREF_CONT); #define SNAP(slot, flags, ref) (((SnapEntry)(slot) << 24) + (flags) + (ref)) #define SNAP_TR(slot, tr) \ (((SnapEntry)(slot) << 24) + ((tr) & (TREF_CONT|TREF_FRAME|TREF_REFMASK))) #define SNAP_MKPC(pc) ((SnapEntry)u32ptr(pc)) #define SNAP_MKFTSZ(ftsz) ((SnapEntry)(ftsz)) #define snap_ref(sn) ((sn) & 0xffff) #define snap_slot(sn) ((BCReg)((sn) >> 24)) #define snap_isframe(sn) ((sn) & SNAP_FRAME) #define snap_pc(sn) ((const BCIns *)(uintptr_t)(sn)) #define snap_setref(sn, ref) (((sn) & (0xffff0000&~SNAP_NORESTORE)) | (ref)) /* Snapshot and exit numbers. */ typedef uint32_t SnapNo; typedef uint32_t ExitNo; /* Trace number. */ typedef uint32_t TraceNo; /* Used to pass around trace numbers. */ typedef uint16_t TraceNo1; /* Stored trace number. */ /* Type of link. ORDER LJ_TRLINK */ typedef enum { LJ_TRLINK_NONE, /* Incomplete trace. No link, yet. */ LJ_TRLINK_ROOT, /* Link to other root trace. */ LJ_TRLINK_LOOP, /* Loop to same trace. */ LJ_TRLINK_TAILREC, /* Tail-recursion. */ LJ_TRLINK_UPREC, /* Up-recursion. */ LJ_TRLINK_DOWNREC, /* Down-recursion. */ LJ_TRLINK_INTERP, /* Fallback to interpreter. */ LJ_TRLINK_RETURN /* Return to interpreter. */ } TraceLink; /* Trace object. */ typedef struct GCtrace { GCHeader; uint8_t topslot; /* Top stack slot already checked to be allocated. */ uint8_t linktype; /* Type of link. */ IRRef nins; /* Next IR instruction. Biased with REF_BIAS. */ GCRef gclist; IRIns *ir; /* IR instructions/constants. Biased with REF_BIAS. */ IRRef nk; /* Lowest IR constant. Biased with REF_BIAS. */ uint16_t nsnap; /* Number of snapshots. */ uint16_t nsnapmap; /* Number of snapshot map elements. */ SnapShot *snap; /* Snapshot array. */ SnapEntry *snapmap; /* Snapshot map. */ GCRef startpt; /* Starting prototype. */ MRef startpc; /* Bytecode PC of starting instruction. */ BCIns startins; /* Original bytecode of starting instruction. */ MSize szmcode; /* Size of machine code. */ MCode *mcode; /* Start of machine code. */ MSize mcloop; /* Offset of loop start in machine code. */ uint16_t nchild; /* Number of child traces (root trace only). */ uint16_t spadjust; /* Stack pointer adjustment (offset in bytes). */ TraceNo1 traceno; /* Trace number. */ TraceNo1 link; /* Linked trace (or self for loops). */ TraceNo1 root; /* Root trace of side trace (or 0 for root traces). */ TraceNo1 nextroot; /* Next root trace for same prototype. */ TraceNo1 nextside; /* Next side trace of same root trace. */ uint8_t sinktags; /* Trace has SINK tags. */ uint8_t unused1; #ifdef LUAJIT_USE_GDBJIT void *gdbjit_entry; /* GDB JIT entry. */ #endif } GCtrace; #define gco2trace(o) check_exp((o)->gch.gct == ~LJ_TTRACE, (GCtrace *)(o)) #define traceref(J, n) \ check_exp((n)>0 && (MSize)(n)sizetrace, (GCtrace *)gcref(J->trace[(n)])) LJ_STATIC_ASSERT(offsetof(GChead, gclist) == offsetof(GCtrace, gclist)); static LJ_AINLINE MSize snap_nextofs(GCtrace *T, SnapShot *snap) { if (snap+1 == &T->snap[T->nsnap]) return T->nsnapmap; else return (snap+1)->mapofs; } /* Round-robin penalty cache for bytecodes leading to aborted traces. */ typedef struct HotPenalty { MRef pc; /* Starting bytecode PC. */ uint16_t val; /* Penalty value, i.e. hotcount start. */ uint16_t reason; /* Abort reason (really TraceErr). */ } HotPenalty; #define PENALTY_SLOTS 64 /* Penalty cache slot. Must be a power of 2. */ #define PENALTY_MIN (36*2) /* Minimum penalty value. */ #define PENALTY_MAX 60000 /* Maximum penalty value. */ #define PENALTY_RNDBITS 4 /* # of random bits to add to penalty value. */ /* Round-robin backpropagation cache for narrowing conversions. */ typedef struct BPropEntry { IRRef1 key; /* Key: original reference. */ IRRef1 val; /* Value: reference after conversion. */ IRRef mode; /* Mode for this entry (currently IRCONV_*). */ } BPropEntry; /* Number of slots for the backpropagation cache. Must be a power of 2. */ #define BPROP_SLOTS 16 /* Scalar evolution analysis cache. */ typedef struct ScEvEntry { IRRef1 idx; /* Index reference. */ IRRef1 start; /* Constant start reference. */ IRRef1 stop; /* Constant stop reference. */ IRRef1 step; /* Constant step reference. */ IRType1 t; /* Scalar type. */ uint8_t dir; /* Direction. 1: +, 0: -. */ } ScEvEntry; /* 128 bit SIMD constants. */ enum { LJ_KSIMD_ABS, LJ_KSIMD_NEG, LJ_KSIMD__MAX }; /* Get 16 byte aligned pointer to SIMD constant. */ #define LJ_KSIMD(J, n) \ ((TValue *)(((intptr_t)&J->ksimd[2*(n)] + 15) & ~(intptr_t)15)) /* Set/reset flag to activate the SPLIT pass for the current trace. */ #if LJ_SOFTFP || (LJ_32 && LJ_HASFFI) #define lj_needsplit(J) (J->needsplit = 1) #define lj_resetsplit(J) (J->needsplit = 0) #else #define lj_needsplit(J) UNUSED(J) #define lj_resetsplit(J) UNUSED(J) #endif /* Fold state is used to fold instructions on-the-fly. */ typedef struct FoldState { IRIns ins; /* Currently emitted instruction. */ IRIns left; /* Instruction referenced by left operand. */ IRIns right; /* Instruction referenced by right operand. */ } FoldState; /* JIT compiler state. */ typedef struct jit_State { GCtrace cur; /* Current trace. */ lua_State *L; /* Current Lua state. */ const BCIns *pc; /* Current PC. */ GCfunc *fn; /* Current function. */ GCproto *pt; /* Current prototype. */ TRef *base; /* Current frame base, points into J->slots. */ uint32_t flags; /* JIT engine flags. */ BCReg maxslot; /* Relative to baseslot. */ BCReg baseslot; /* Current frame base, offset into J->slots. */ uint8_t mergesnap; /* Allowed to merge with next snapshot. */ uint8_t needsnap; /* Need snapshot before recording next bytecode. */ IRType1 guardemit; /* Accumulated IRT_GUARD for emitted instructions. */ uint8_t bcskip; /* Number of bytecode instructions to skip. */ FoldState fold; /* Fold state. */ const BCIns *bc_min; /* Start of allowed bytecode range for root trace. */ MSize bc_extent; /* Extent of the range. */ TraceState state; /* Trace compiler state. */ int32_t instunroll; /* Unroll counter for instable loops. */ int32_t loopunroll; /* Unroll counter for loop ops in side traces. */ int32_t tailcalled; /* Number of successive tailcalls. */ int32_t framedepth; /* Current frame depth. */ int32_t retdepth; /* Return frame depth (count of RETF). */ MRef k64; /* Pointer to chained array of 64 bit constants. */ TValue ksimd[LJ_KSIMD__MAX*2+1]; /* 16 byte aligned SIMD constants. */ IRIns *irbuf; /* Temp. IR instruction buffer. Biased with REF_BIAS. */ IRRef irtoplim; /* Upper limit of instuction buffer (biased). */ IRRef irbotlim; /* Lower limit of instuction buffer (biased). */ IRRef loopref; /* Last loop reference or ref of final LOOP (or 0). */ MSize sizesnap; /* Size of temp. snapshot buffer. */ SnapShot *snapbuf; /* Temp. snapshot buffer. */ SnapEntry *snapmapbuf; /* Temp. snapshot map buffer. */ MSize sizesnapmap; /* Size of temp. snapshot map buffer. */ PostProc postproc; /* Required post-processing after execution. */ #if LJ_SOFTFP || (LJ_32 && LJ_HASFFI) int needsplit; /* Need SPLIT pass. */ #endif GCRef *trace; /* Array of traces. */ TraceNo freetrace; /* Start of scan for next free trace. */ MSize sizetrace; /* Size of trace array. */ IRRef1 chain[IR__MAX]; /* IR instruction skip-list chain anchors. */ TRef slot[LJ_MAX_JSLOTS+LJ_STACK_EXTRA]; /* Stack slot map. */ int32_t param[JIT_P__MAX]; /* JIT engine parameters. */ MCode *exitstubgroup[LJ_MAX_EXITSTUBGR]; /* Exit stub group addresses. */ HotPenalty penalty[PENALTY_SLOTS]; /* Penalty slots. */ uint32_t penaltyslot; /* Round-robin index into penalty slots. */ uint32_t prngstate; /* PRNG state. */ BPropEntry bpropcache[BPROP_SLOTS]; /* Backpropagation cache slots. */ uint32_t bpropslot; /* Round-robin index into bpropcache slots. */ ScEvEntry scev; /* Scalar evolution analysis cache slots. */ const BCIns *startpc; /* Bytecode PC of starting instruction. */ TraceNo parent; /* Parent of current side trace (0 for root traces). */ ExitNo exitno; /* Exit number in parent of current side trace. */ BCIns *patchpc; /* PC for pending re-patch. */ BCIns patchins; /* Instruction for pending re-patch. */ int mcprot; /* Protection of current mcode area. */ MCode *mcarea; /* Base of current mcode area. */ MCode *mctop; /* Top of current mcode area. */ MCode *mcbot; /* Bottom of current mcode area. */ size_t szmcarea; /* Size of current mcode area. */ size_t szallmcarea; /* Total size of all allocated mcode areas. */ TValue errinfo; /* Additional info element for trace errors. */ } #if LJ_TARGET_ARM LJ_ALIGN(16) /* For DISPATCH-relative addresses in assembler part. */ #endif jit_State; /* Trivial PRNG e.g. used for penalty randomization. */ static LJ_AINLINE uint32_t LJ_PRNG_BITS(jit_State *J, int bits) { /* Yes, this LCG is very weak, but that doesn't matter for our use case. */ J->prngstate = J->prngstate * 1103515245 + 12345; return J->prngstate >> (32-bits); } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cdata.o0000664000000000000000000003225012213333060022304 0ustar rootrootELF>@@ UHAUATSHII"I<$t At$9rHHuKt9w' t9wHHHtÃwyt+I|$@ A;\$rfXLhH[A\A]]UHH]LeLmLuL}H0IAAAϻvB +I|$DJHTHH!LALH)H~'fAPfAXEhID$P0QD@0@(ȀAA fDqLH]LeLmLuL}UHIFt2W( ЃFGDHt0wD6wDFЋL t DAD9rHLɋuK%tA9w' %tA9wHHLɋtøwA tvHHPA)R IzAR FFVH))G HAR]UHSHHGHr ~]E{ uH(S!tVt\AA!AtTH)tuUVP 0 && id < cts->toplj_cdata.hlj_cdata.c(char *)cd - p < 65536lj_obj.hlj_gc.hct->size == 8sz == 8s->size == 8d->size == 8(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz((((ct->info)) >> 28) <= CT_HASSIZE) || ((((ct->info)) >> 28) == CT_FUNC) || ((((ct->info)) >> 28) == CT_EXTERN)!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))!(((ct->info) & (0xf0000000u|0x00800000u)) == (((CTInfo)(CT_PTR) << 28) + (0x00800000u)))(((ctt->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) && ctt->size <= 4((((s->info) >> 28) >> 1) == (CT_PTR >> 1)) || ((((s->info)) >> 28) == CT_FIELD)((((d->info) >> 28) >> 1) == (CT_PTR >> 1)) || ((((d->info)) >> 28) == CT_FIELD)((((d->info)) >> 28) <= CT_HASSIZE) && !((((d->info)) >> 28) == CT_VOID)ctype_checkctype_childlj_cdata_newlj_cdata_newvlj_cdata_freesetgcVlj_gc_barrierbacklj_cdata_indexcdata_getptrlj_cdata_getcdata_getconstlj_cdata_setGCC: (Debian 4.7.3-4) 4.7.3zRx $AC I  (DAC X pKAC F  AC E (AC M|  AC E $BAC E8 .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @(! &,,,12,@2OW07`TuX(p4  ]  % >%W3pAPb q ~    8HXftKE$ $ B1@Nlj_cdata.c__PRETTY_FUNCTION__.4054__PRETTY_FUNCTION__.4215__PRETTY_FUNCTION__.4273__PRETTY_FUNCTION__.4281__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.4300__PRETTY_FUNCTION__.4063__PRETTY_FUNCTION__.4201__PRETTY_FUNCTION__.4321__PRETTY_FUNCTION__.4329__PRETTY_FUNCTION__.4341lj_cdata_newreflj_ctype_intern__assert_faillj_mem_newgcolj_cdata_newvlj_mem_realloclj_cdata_freelj_cdata_setfinlj_tab_setlj_cdata_indexlj_ctype_sizelj_cconv_ct_ctlj_ctype_getfieldqlj_cdata_getlj_cconv_tv_bflj_cconv_tv_ctlj_cdata_setlj_cconv_bf_tvlj_err_callerlj_cconv_ct_tv7 A F  K      #     f % . 9a k p  u     3 . @ A P  P Y  P Y H ] g l  q b . a        Y  c h m     b . !@ qJ #O oT         ? I N  Sy    "#}           $ ) 9 C H  M  #         A qK #P oU d n s  x       . X# d %~ ~ .       ~ . w   $  ) c m r  w  & (  .      # ( > H M  R ~  .          %  / 4 9L V [  `  . x)* HtE$  tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ccallback.o0000664000000000000000000002263012213333061023131 0ustar rootrootELF>@@ UHH+HwAN;:iҌ)R9E]HHtUH]UHAWAVAUATSH(IHGHEH_Hut{|H}HMHQHJHuHNBxuPF@(tHHtH}пTH}HG0HF ~FFHw0H_I$HUE$E;$DI$PЅM4$A;T$rHIE>I|$(D;os IcՋGHDxtI|$(D;os McGJD"HUAAHUAAD{SHCHHuH+NK HFHFMuI|$|zuH}HG0RHPHUȋB H+BH= HHEHHA^^I<$ED$D9s#AAE'I<$ED$A9wHH tHދt t u%tD9rHHHtV%=uEЃw#UMD0E$Aw EODpADH}LALiLL[HEHHH([A\A]A^A_]UHAWAVAUATSHIH_LkHCHCH9w@xu@HS0HHDBHC@M$t A|$9rAIMAuJ%t9w& %t9wIIMAtÃto%IT$pM|$0=LEAHLLLAu6AVw-tuAAAuAAAHC0H@ HC0HkLkADŽ$H[A\A]A^A_]Ë UHAWAVAUATSHHIՃ~6t t uL tK9rHL΋tILσ6t t ut9wHHDAAtAGEPAvAtE ~ 9v A9wHH teHt t u%t9wHHttt+x(AA!FMM)ILDA9s)DfA 0 && id < cts->topp - page <= (4096 * 1)lj_gc.h!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((((MSize)(((int32_t)slot)) < (MSize)((cts->miscmap))->asize) ? (&(((TValue *)(void *)(uintptr_t)(((cts->miscmap))->array).ptr32))[(((int32_t)slot))]) : lj_tab_getinth((cts->miscmap), ((int32_t)slot))))->it) == (~8u))((((ctf->info)) >> 28) == CT_FIELD)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpauselj_ccallback_entersetgcVctype_checkcallback_conv_argsctype_childlj_gc_barrierbackcallback_checkfunccallback_mcode_initGCC: (Debian 4.7.3-4) 4.7.3zRx \AC W <MC K (\AC M ({AC Mi LOC M F UBBBBA .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @f 0 & , 12 k@2 FO`W0`!u(p %x (h ()B [0tC pP  \\ y .9>M[n}X{lj_ccallback.c__PRETTY_FUNCTION__.5433__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4214__PRETTY_FUNCTION__.5409__PRETTY_FUNCTION__.4223__PRETTY_FUNCTION__.5463__PRETTY_FUNCTION__.5336__PRETTY_FUNCTION__.3350lj_ccallback_ptr2slotlj_ccallback_mcode_freemunmaplj_ccallback_enter__assert_faillj_err_strexitlj_tab_getinthlj_err_callerlj_state_growstacklj_cconv_tv_ctlj_ccallback_leavelj_cconv_ct_tvlj_ccallback_newmmap64lj_vm_ffi_callbacklj_mcode_syncmprotectlj_mem_growmemsetlj_tab_setinthr       7  ) 4 0   (.  )$ 4)J 0T Y ^| C ) 0  ) 4.  ) 4  )  4_ C# )( 0-D N )S 4X C ) 0  ) 47 A )F 4Kl pv {  C ) 0  ) 4! "q z  L  # $ % &) 'Y c  h m  P c   P c   @\`yXtarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_loop.o0000664000000000000000000001371012213333055023067 0ustar rootrootELF> @@ UHAWAVAUATSHI֋B!@v1@J?v LfMPR11˃w!փu:!փw+fAdžUfAfAdžL%Eu0w+fAdžUfAfAdžn2L% LH(fBD9IVH*=tlzUuf9it) < 0xfffeffffu)*psentinel == J->cur.snapmap[J->cur.snap[0].nent]J->cur.nsnapmap <= J->sizesnapmapnumberVintloop_unrollGCC: (Debian 4.7.3-4) 4.7.3zRx (K AC P6 (HtAC T[ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @  & , 12 1@28 ZO W0 ` u pp0 8 xp K  3   L[fxK tlj_opt_loop.ccploop_opt__PRETTY_FUNCTION__.4911__PRETTY_FUNCTION__.3440lj_str_needbuflj_ir_emitlj_snap_grow_buf_lj_snap_grow_map___assert_faillj_ir_modelj_opt_foldlj_trace_errlj_opt_looplj_vm_cpcalllj_ir_rollbacklj_err_throw3o     [D|   8 y     C   LK tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_io.o0000664000000000000000000004327012213333065022011 0ustar rootrootELF>@@ UHSHHxuxtHC@HHC-HxtH HH[]UHSHHHSztHRBHKIIJH@H[]UHH]LeLmLuH HILhHjILLI$Hu48HLH߸H¾HLH]LeLmLuUHSHHHGH;Gu@HHGHCxH,@HCHPHSxt@HSBx uPC@(t_S@z uRC@(tHSH+SHHH[]UHH]LeLmLuH HIIվHKytDaAD$HSJw RAT$L0@LHLH]LeLmLuËGH@HuUHUHAWAVAUATSHIHuUEA AwHXDLIAID)HULHt?LHHэ\ ]̅tCA< u+]AT$C$9DC돉LLIWHJIOBxuAWHB(tB$9B rLEH[A\A]A^A_]UHAWAVAUATSH8IHuUH_H+_H)HuHuLE]0sLDuA]]EANHcID$HЋB~x*tqL@@@auH>@@GtqHG@HHGI$H[A\]UHH]LeLmLuH HHGD`A|$$tEl$ Et$AI}u HGEt6W H)DHH9DMcIH{It$(LLsIuHAI}t2HCxtpHHHCxuAE tIuHIADH]LeLmLuUHHGH;GsxuxtH]UHSHHH8u HH[]UHATSHIHOHGH9s`ItXuHCHHCHKHCPw@BPSBHHHK@z uRC@(t[A\]UH%]UH$]UHSHHHSH+SHHH[]UHSHHH0HtH[]UHSHHHGH9Gs ^H GHHAH[]UH]UHSHHH8tPt HHH[]UHSHH%H@@HH[]UHSHHH8@@HH[]UHAVAUATSIHcHGHH;_ICu.;Dw tmEHLLI9@@I=w&t>L@@HI+t$HLHI9\$rL[A\A]A^]UHSHH%THHH[]UHSHHrH0HH[]UHH]LeHH/IHI$Hu HH]LeUHH]LeLmLuH HL`HLpHLDHILLHIEHuLHH]LeLmLuUHH]LeLmLuH HLhHLpHLDH"I@LLHI$HuLHH]LeLmLuUHSHHHHtH߸ HH[]UHH]LeLmH H}L HAź HHcDL@@HH]LeLmUHATSHL HHKHqH9sv*QwH,q#tHLtHLHSH*B[A\]UHATSHHCHPHH Jv:H9uPC@(tHCHHDcH5HA$DcH5HA$H5Hy[A\]fileclosed filelib_io.c(((L->top-1)->it) == (~12u))%s: %sr(((L->top)->it) == (~12u))lj_obj.htoo many arguments%lf(iof->type & 3) == 2cannot close standard file(((L->top-2)->it) == (~4u))FILE*w%.14gfile (%p)file (closed)fulllinenosetcurendiostdinstdoutstderr!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((L->top-3)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(((&fn->c.upvalue[0])->it) == (~12u))((((L->top-1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))d> closereadwriteflushseeksetvbuflines__gc __tostring__indexcopyTVm> openpopentmpfileclosereadwriteflushinputoutputlinestypelj_cf_io_linessetgcVio_file_iterio_file_closeio_file_newio_std_getsetio_std_newGCC: (Debian 4.7.3-4) 4.7.3zRx  rAC Eh  @bAC EX $dAC T{  !AC E $AC T #TC J (AC M ($AC M P-AC Ec  pAC C $.AC T 1AC l +AC Ea  AC C  AC P @AC P `6AC El (AC E^ <AC Er  AC F 9AC Eo <AC Er  7AC Em $@AC G h-AC Ec (AC E^  HAC Lw $AC Tv $AC T  KAC EA $@AC Pn  hAC C $AC C .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @1&\,\12\@2T OA\0NekzpuC  ! 7 +r rrb$ =Jh!Yxr' . @#czV- 3U 1> +H Vo   6 ( <I T 9 < 7 & -5(K+H\sjyKp`HI XJ   0@P^nv &6<LU\csz )1:CN^dklib_io.clj_cf_io_typeio_file_new__PRETTY_FUNCTION__.4743io_file_openlj_cf_io_lines__PRETTY_FUNCTION__.4912__PRETTY_FUNCTION__.3993io_file_iterio_std_new__PRETTY_FUNCTION__.4927io_stdfileio_file_readlineio_file_readlj_cf_io_readio_file_close__PRETTY_FUNCTION__.4756__PRETTY_FUNCTION__.4823io_tofilepio_tofileio_std_getset__PRETTY_FUNCTION__.4901lj_cf_io_outputlj_cf_io_inputlj_cf_io_method_lineslj_cf_io_method_readlj_cf_io_method_closelj_cf_io_closelj_cf_io_method___gclj_cf_io_flushlj_cf_io_method_flushio_file_writelj_cf_io_writelj_cf_io_method_writelj_cf_io_tmpfilelj_cf_io_openlj_cf_io_popenlj_cf_io_method___tostringlj_cf_io_method_setvbuflj_cf_io_method_seeklj_lib_cf_io_methodlj_lib_init_io_method__PRETTY_FUNCTION__.4042lj_lib_cf_iolj_lib_init_iolj_lib_checkanylua_pushlstringlua_newuserdata__assert_faillj_lib_checkstrfopen64__errno_locationstrerrorlj_str_pushfluaL_argerrorlua_pushcclosurelua_setfieldlj_err_callerlj_str_needbuffgetslj_str_newlj_gc_stepclearerrluaL_checkstacklj_err_arg__isoc99_fscanffreadlj_lib_checkint_IO_getcungetcferrorluaL_fileresultfclosepcloselj_state_growstackmemcpylj_err_callermsglj_err_argtypefflushfwritefprintflj_err_argttmpfile64lj_lib_optstrpopenlua_pushfstringlj_lib_checkoptlj_lib_optintsetvbuffseeko64ftello64luaopen_iolj_lib_registerstdinstdoutstderr7F N8Z b89 3  :;< ='>2 7??O@ > 3x  @: 3 [ :L 3V [[ `:q ' yA9 3  : 3  (:'B]CDE F@ 3J [O T:dGH dI#J4 wBKDL FB 3L [Q V:jGJMDLF 3$ [) .:>GWNdO 3 [ :JPQ=PRS 3  {:  8 QS 3] b `g : C T U P 3   : Vr | W C 3   :c 3m [r w :  > ' A X Q X QP Yq ~ Z [ QG\eQ;] ><Q#;4]@ >`Xk^Q _ 8  `4aGb^Q `[cQd* 3`/ 39fv 3 [ : B 3  3 f  g h i` h px p T  s(0+8I @VH P X ` hhp Drhh@c(zTVt' U   $ D d   I T  $ D l +s Dlptarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_sink.c0000664000000000000000000001562412202141143023045 0ustar rootroot/* ** SINK: Allocation Sinking and Store Sinking. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_opt_sink_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" #include "lj_target.h" /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Check whether the store ref points to an eligible allocation. */ static IRIns *sink_checkalloc(jit_State *J, IRIns *irs) { IRIns *ir = IR(irs->op1); if (!irref_isk(ir->op2)) return NULL; /* Non-constant key. */ if (ir->o == IR_HREFK || ir->o == IR_AREF) ir = IR(ir->op1); else if (!(ir->o == IR_HREF || ir->o == IR_NEWREF || ir->o == IR_FREF || ir->o == IR_ADD)) return NULL; /* Unhandled reference type (for XSTORE). */ ir = IR(ir->op1); if (!(ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW)) return NULL; /* Not an allocation. */ return ir; /* Return allocation. */ } /* Recursively check whether a value depends on a PHI. */ static int sink_phidep(jit_State *J, IRRef ref) { IRIns *ir = IR(ref); if (irt_isphi(ir->t)) return 1; if (ir->op1 >= REF_FIRST && sink_phidep(J, ir->op1)) return 1; if (ir->op2 >= REF_FIRST && sink_phidep(J, ir->op2)) return 1; return 0; } /* Check whether a value is a sinkable PHI or loop-invariant. */ static int sink_checkphi(jit_State *J, IRIns *ira, IRRef ref) { if (ref >= REF_FIRST) { IRIns *ir = IR(ref); if (irt_isphi(ir->t) || (ir->o == IR_CONV && ir->op2 == IRCONV_NUM_INT && irt_isphi(IR(ir->op1)->t))) { ira->prev++; return 1; /* Sinkable PHI. */ } /* Otherwise the value must be loop-invariant. */ return ref < J->loopref && !sink_phidep(J, ref); } return 1; /* Constant (non-PHI). */ } /* Mark non-sinkable allocations using single-pass backward propagation. ** ** Roots for the marking process are: ** - Some PHIs or snapshots (see below). ** - Non-PHI, non-constant values stored to PHI allocations. ** - All guards. ** - Any remaining loads not eliminated by store-to-load forwarding. ** - Stores with non-constant keys. ** - All stored values. */ static void sink_mark_ins(jit_State *J) { IRIns *ir, *irlast = IR(J->cur.nins-1); for (ir = irlast ; ; ir--) { switch (ir->o) { case IR_BASE: return; /* Finished. */ case IR_CALLL: /* IRCALL_lj_tab_len */ case IR_ALOAD: case IR_HLOAD: case IR_XLOAD: case IR_TBAR: irt_setmark(IR(ir->op1)->t); /* Mark ref for remaining loads. */ break; case IR_FLOAD: if (irt_ismarked(ir->t) || ir->op2 == IRFL_TAB_META) irt_setmark(IR(ir->op1)->t); /* Mark table for remaining loads. */ break; case IR_ASTORE: case IR_HSTORE: case IR_FSTORE: case IR_XSTORE: { IRIns *ira = sink_checkalloc(J, ir); if (!ira || (irt_isphi(ira->t) && !sink_checkphi(J, ira, ir->op2))) irt_setmark(IR(ir->op1)->t); /* Mark ineligible ref. */ irt_setmark(IR(ir->op2)->t); /* Mark stored value. */ break; } #if LJ_HASFFI case IR_CNEWI: if (irt_isphi(ir->t) && (!sink_checkphi(J, ir, ir->op2) || (LJ_32 && ir+1 < irlast && (ir+1)->o == IR_HIOP && !sink_checkphi(J, ir, (ir+1)->op2)))) irt_setmark(ir->t); /* Mark ineligible allocation. */ /* fallthrough */ #endif case IR_USTORE: irt_setmark(IR(ir->op2)->t); /* Mark stored value. */ break; #if LJ_HASFFI case IR_CALLXS: #endif case IR_CALLS: irt_setmark(IR(ir->op1)->t); /* Mark (potentially) stored values. */ break; case IR_PHI: { IRIns *irl = IR(ir->op1), *irr = IR(ir->op2); irl->prev = irr->prev = 0; /* Clear PHI value counts. */ if (irl->o == irr->o && (irl->o == IR_TNEW || irl->o == IR_TDUP || (LJ_HASFFI && (irl->o == IR_CNEW || irl->o == IR_CNEWI)))) break; irt_setmark(irl->t); irt_setmark(irr->t); break; } default: if (irt_ismarked(ir->t) || irt_isguard(ir->t)) { /* Propagate mark. */ if (ir->op1 >= REF_FIRST) irt_setmark(IR(ir->op1)->t); if (ir->op2 >= REF_FIRST) irt_setmark(IR(ir->op2)->t); } break; } } } /* Mark all instructions referenced by a snapshot. */ static void sink_mark_snap(jit_State *J, SnapShot *snap) { SnapEntry *map = &J->cur.snapmap[snap->mapofs]; MSize n, nent = snap->nent; for (n = 0; n < nent; n++) { IRRef ref = snap_ref(map[n]); if (!irref_isk(ref)) irt_setmark(IR(ref)->t); } } /* Iteratively remark PHI refs with differing marks or PHI value counts. */ static void sink_remark_phi(jit_State *J) { IRIns *ir; int remark; do { remark = 0; for (ir = IR(J->cur.nins-1); ir->o == IR_PHI; ir--) { IRIns *irl = IR(ir->op1), *irr = IR(ir->op2); if (((irl->t.irt ^ irr->t.irt) & IRT_MARK)) remark = 1; else if (irl->prev == irr->prev) continue; irt_setmark(IR(ir->op1)->t); irt_setmark(IR(ir->op2)->t); } } while (remark); } /* Sweep instructions and tag sunken allocations and stores. */ static void sink_sweep_ins(jit_State *J) { IRIns *ir, *irfirst = IR(J->cur.nk); for (ir = IR(J->cur.nins-1) ; ir >= irfirst; ir--) { switch (ir->o) { case IR_ASTORE: case IR_HSTORE: case IR_FSTORE: case IR_XSTORE: { IRIns *ira = sink_checkalloc(J, ir); if (ira && !irt_ismarked(ira->t)) { int delta = (int)(ir - ira); ir->prev = REGSP(RID_SINK, delta > 255 ? 255 : delta); } else { ir->prev = REGSP_INIT; } break; } case IR_NEWREF: if (!irt_ismarked(IR(ir->op1)->t)) { ir->prev = REGSP(RID_SINK, 0); } else { irt_clearmark(ir->t); ir->prev = REGSP_INIT; } break; #if LJ_HASFFI case IR_CNEW: case IR_CNEWI: #endif case IR_TNEW: case IR_TDUP: if (!irt_ismarked(ir->t)) { ir->t.irt &= ~IRT_GUARD; ir->prev = REGSP(RID_SINK, 0); J->cur.sinktags = 1; /* Signal present SINK tags to assembler. */ } else { irt_clearmark(ir->t); ir->prev = REGSP_INIT; } break; case IR_PHI: { IRIns *ira = IR(ir->op2); if (!irt_ismarked(ira->t) && (ira->o == IR_TNEW || ira->o == IR_TDUP || (LJ_HASFFI && (ira->o == IR_CNEW || ira->o == IR_CNEWI)))) { ir->prev = REGSP(RID_SINK, 0); } else { ir->prev = REGSP_INIT; } break; } default: irt_clearmark(ir->t); ir->prev = REGSP_INIT; break; } } } /* Allocation sinking and store sinking. ** ** 1. Mark all non-sinkable allocations. ** 2. Then sink all remaining allocations and the related stores. */ void lj_opt_sink(jit_State *J) { const uint32_t need = (JIT_F_OPT_SINK|JIT_F_OPT_FWD| JIT_F_OPT_DCE|JIT_F_OPT_CSE|JIT_F_OPT_FOLD); if ((J->flags & need) == need && (J->chain[IR_TNEW] || J->chain[IR_TDUP] || (LJ_HASFFI && (J->chain[IR_CNEW] || J->chain[IR_CNEWI])))) { if (!J->loopref) sink_mark_snap(J, &J->cur.snap[J->cur.nsnap-1]); sink_mark_ins(J); if (J->loopref) sink_remark_phi(J); sink_sweep_ins(J); } } #undef IR #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_io.c0000664000000000000000000003242512202141143021765 0ustar rootroot/* ** I/O library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2011 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #include #include #define lib_io_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_state.h" #include "lj_ff.h" #include "lj_lib.h" /* Userdata payload for I/O file. */ typedef struct IOFileUD { FILE *fp; /* File handle. */ uint32_t type; /* File type. */ } IOFileUD; #define IOFILE_TYPE_FILE 0 /* Regular file. */ #define IOFILE_TYPE_PIPE 1 /* Pipe. */ #define IOFILE_TYPE_STDF 2 /* Standard file handle. */ #define IOFILE_TYPE_MASK 3 #define IOFILE_FLAG_CLOSE 4 /* Close after io.lines() iterator. */ #define IOSTDF_UD(L, id) (&gcref(G(L)->gcroot[(id)])->ud) #define IOSTDF_IOF(L, id) ((IOFileUD *)uddata(IOSTDF_UD(L, (id)))) /* -- Open/close helpers -------------------------------------------------- */ static IOFileUD *io_tofilep(lua_State *L) { if (!(L->base < L->top && tvisudata(L->base) && udataV(L->base)->udtype == UDTYPE_IO_FILE)) lj_err_argtype(L, 1, "FILE*"); return (IOFileUD *)uddata(udataV(L->base)); } static IOFileUD *io_tofile(lua_State *L) { IOFileUD *iof = io_tofilep(L); if (iof->fp == NULL) lj_err_caller(L, LJ_ERR_IOCLFL); return iof; } static FILE *io_stdfile(lua_State *L, ptrdiff_t id) { IOFileUD *iof = IOSTDF_IOF(L, id); if (iof->fp == NULL) lj_err_caller(L, LJ_ERR_IOSTDCL); return iof->fp; } static IOFileUD *io_file_new(lua_State *L) { IOFileUD *iof = (IOFileUD *)lua_newuserdata(L, sizeof(IOFileUD)); GCudata *ud = udataV(L->top-1); ud->udtype = UDTYPE_IO_FILE; /* NOBARRIER: The GCudata is new (marked white). */ setgcrefr(ud->metatable, curr_func(L)->c.env); iof->fp = NULL; iof->type = IOFILE_TYPE_FILE; return iof; } static IOFileUD *io_file_open(lua_State *L, const char *mode) { const char *fname = strdata(lj_lib_checkstr(L, 1)); IOFileUD *iof = io_file_new(L); iof->fp = fopen(fname, mode); if (iof->fp == NULL) luaL_argerror(L, 1, lj_str_pushf(L, "%s: %s", fname, strerror(errno))); return iof; } static int io_file_close(lua_State *L, IOFileUD *iof) { int ok; if ((iof->type & IOFILE_TYPE_MASK) == IOFILE_TYPE_FILE) { ok = (fclose(iof->fp) == 0); } else if ((iof->type & IOFILE_TYPE_MASK) == IOFILE_TYPE_PIPE) { int stat = -1; #if LJ_TARGET_POSIX stat = pclose(iof->fp); #elif LJ_TARGET_WINDOWS stat = _pclose(iof->fp); #else lua_assert(0); return 0; #endif #if LJ_52 iof->fp = NULL; return luaL_execresult(L, stat); #else ok = (stat != -1); #endif } else { lua_assert((iof->type & IOFILE_TYPE_MASK) == IOFILE_TYPE_STDF); setnilV(L->top++); lua_pushliteral(L, "cannot close standard file"); return 2; } iof->fp = NULL; return luaL_fileresult(L, ok, NULL); } /* -- Read/write helpers -------------------------------------------------- */ static int io_file_readnum(lua_State *L, FILE *fp) { lua_Number d; if (fscanf(fp, LUA_NUMBER_SCAN, &d) == 1) { if (LJ_DUALNUM) { int32_t i = lj_num2int(d); if (d == (lua_Number)i && !tvismzero((cTValue *)&d)) { setintV(L->top++, i); return 1; } } setnumV(L->top++, d); return 1; } else { setnilV(L->top++); return 0; } } static int io_file_readline(lua_State *L, FILE *fp, MSize chop) { MSize m = LUAL_BUFFERSIZE, n = 0, ok = 0; char *buf; for (;;) { buf = lj_str_needbuf(L, &G(L)->tmpbuf, m); if (fgets(buf+n, m-n, fp) == NULL) break; n += (MSize)strlen(buf+n); ok |= n; if (n && buf[n-1] == '\n') { n -= chop; break; } if (n >= m - 64) m += m; } setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n)); lj_gc_check(L); return (int)ok; } static void io_file_readall(lua_State *L, FILE *fp) { MSize m, n; for (m = LUAL_BUFFERSIZE, n = 0; ; m += m) { char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, m); n += (MSize)fread(buf+n, 1, m-n, fp); if (n != m) { setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n)); lj_gc_check(L); return; } } } static int io_file_readlen(lua_State *L, FILE *fp, MSize m) { if (m) { char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, m); MSize n = (MSize)fread(buf, 1, m, fp); setstrV(L, L->top++, lj_str_new(L, buf, (size_t)n)); lj_gc_check(L); return (n > 0 || m == 0); } else { int c = getc(fp); ungetc(c, fp); setstrV(L, L->top++, &G(L)->strempty); return (c != EOF); } } static int io_file_read(lua_State *L, FILE *fp, int start) { int ok, n, nargs = (int)(L->top - L->base) - start; clearerr(fp); if (nargs == 0) { ok = io_file_readline(L, fp, 1); n = start+1; /* Return 1 result. */ } else { /* The results plus the buffers go on top of the args. */ luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments"); ok = 1; for (n = start; nargs-- && ok; n++) { if (tvisstr(L->base+n)) { const char *p = strVdata(L->base+n); if (p[0] != '*') lj_err_arg(L, n+1, LJ_ERR_INVOPT); if (p[1] == 'n') ok = io_file_readnum(L, fp); else if ((p[1] & ~0x20) == 'L') ok = io_file_readline(L, fp, (p[1] == 'l')); else if (p[1] == 'a') io_file_readall(L, fp); else lj_err_arg(L, n+1, LJ_ERR_INVFMT); } else if (tvisnumber(L->base+n)) { ok = io_file_readlen(L, fp, (MSize)lj_lib_checkint(L, n+1)); } else { lj_err_arg(L, n+1, LJ_ERR_INVOPT); } } } if (ferror(fp)) return luaL_fileresult(L, 0, NULL); if (!ok) setnilV(L->top-1); /* Replace last result with nil. */ return n - start; } static int io_file_write(lua_State *L, FILE *fp, int start) { cTValue *tv; int status = 1; for (tv = L->base+start; tv < L->top; tv++) { if (tvisstr(tv)) { MSize len = strV(tv)->len; status = status && (fwrite(strVdata(tv), 1, len, fp) == len); } else if (tvisint(tv)) { char buf[LJ_STR_INTBUF]; char *p = lj_str_bufint(buf, intV(tv)); size_t len = (size_t)(buf+LJ_STR_INTBUF-p); status = status && (fwrite(p, 1, len, fp) == len); } else if (tvisnum(tv)) { status = status && (fprintf(fp, LUA_NUMBER_FMT, numV(tv)) > 0); } else { lj_err_argt(L, (int)(tv - L->base) + 1, LUA_TSTRING); } } if (LJ_52 && status) { L->top = L->base+1; if (start == 0) setudataV(L, L->base, IOSTDF_UD(L, GCROOT_IO_OUTPUT)); return 1; } return luaL_fileresult(L, status, NULL); } static int io_file_iter(lua_State *L) { GCfunc *fn = curr_func(L); IOFileUD *iof = uddata(udataV(&fn->c.upvalue[0])); int n = fn->c.nupvalues - 1; if (iof->fp == NULL) lj_err_caller(L, LJ_ERR_IOCLFL); L->top = L->base; if (n) { /* Copy upvalues with options to stack. */ if (n > LUAI_MAXCSTACK) lj_err_caller(L, LJ_ERR_STKOV); lj_state_checkstack(L, (MSize)n); memcpy(L->top, &fn->c.upvalue[1], n*sizeof(TValue)); L->top += n; } n = io_file_read(L, iof->fp, 0); if (ferror(iof->fp)) lj_err_callermsg(L, strVdata(L->top-2)); if (tvisnil(L->base) && (iof->type & IOFILE_FLAG_CLOSE)) { io_file_close(L, iof); /* Return values are ignored. */ return 0; } return n; } /* -- I/O file methods ---------------------------------------------------- */ #define LJLIB_MODULE_io_method LJLIB_CF(io_method_close) { IOFileUD *iof = L->base < L->top ? io_tofile(L) : IOSTDF_IOF(L, GCROOT_IO_OUTPUT); return io_file_close(L, iof); } LJLIB_CF(io_method_read) { return io_file_read(L, io_tofile(L)->fp, 1); } LJLIB_CF(io_method_write) LJLIB_REC(io_write 0) { return io_file_write(L, io_tofile(L)->fp, 1); } LJLIB_CF(io_method_flush) LJLIB_REC(io_flush 0) { return luaL_fileresult(L, fflush(io_tofile(L)->fp) == 0, NULL); } LJLIB_CF(io_method_seek) { FILE *fp = io_tofile(L)->fp; int opt = lj_lib_checkopt(L, 2, 1, "\3set\3cur\3end"); int64_t ofs = 0; cTValue *o; int res; if (opt == 0) opt = SEEK_SET; else if (opt == 1) opt = SEEK_CUR; else if (opt == 2) opt = SEEK_END; o = L->base+2; if (o < L->top) { if (tvisint(o)) ofs = (int64_t)intV(o); else if (tvisnum(o)) ofs = (int64_t)numV(o); else if (!tvisnil(o)) lj_err_argt(L, 3, LUA_TNUMBER); } #if LJ_TARGET_POSIX res = fseeko(fp, ofs, opt); #elif _MSC_VER >= 1400 res = _fseeki64(fp, ofs, opt); #elif defined(__MINGW32__) res = fseeko64(fp, ofs, opt); #else res = fseek(fp, (long)ofs, opt); #endif if (res) return luaL_fileresult(L, 0, NULL); #if LJ_TARGET_POSIX ofs = ftello(fp); #elif _MSC_VER >= 1400 ofs = _ftelli64(fp); #elif defined(__MINGW32__) ofs = ftello64(fp); #else ofs = (int64_t)ftell(fp); #endif setint64V(L->top-1, ofs); return 1; } LJLIB_CF(io_method_setvbuf) { FILE *fp = io_tofile(L)->fp; int opt = lj_lib_checkopt(L, 2, -1, "\4full\4line\2no"); size_t sz = (size_t)lj_lib_optint(L, 3, LUAL_BUFFERSIZE); if (opt == 0) opt = _IOFBF; else if (opt == 1) opt = _IOLBF; else if (opt == 2) opt = _IONBF; return luaL_fileresult(L, setvbuf(fp, NULL, opt, sz) == 0, NULL); } LJLIB_CF(io_method_lines) { io_tofile(L); lua_pushcclosure(L, io_file_iter, (int)(L->top - L->base)); return 1; } LJLIB_CF(io_method___gc) { IOFileUD *iof = io_tofilep(L); if (iof->fp != NULL && (iof->type & IOFILE_TYPE_MASK) != IOFILE_TYPE_STDF) io_file_close(L, iof); return 0; } LJLIB_CF(io_method___tostring) { IOFileUD *iof = io_tofilep(L); if (iof->fp != NULL) lua_pushfstring(L, "file (%p)", iof->fp); else lua_pushliteral(L, "file (closed)"); return 1; } LJLIB_PUSH(top-1) LJLIB_SET(__index) #include "lj_libdef.h" /* -- I/O library functions ----------------------------------------------- */ #define LJLIB_MODULE_io LJLIB_PUSH(top-2) LJLIB_SET(!) /* Set environment. */ LJLIB_CF(io_open) { const char *fname = strdata(lj_lib_checkstr(L, 1)); GCstr *s = lj_lib_optstr(L, 2); const char *mode = s ? strdata(s) : "r"; IOFileUD *iof = io_file_new(L); iof->fp = fopen(fname, mode); return iof->fp != NULL ? 1 : luaL_fileresult(L, 0, fname); } LJLIB_CF(io_popen) { #if LJ_TARGET_POSIX || LJ_TARGET_WINDOWS const char *fname = strdata(lj_lib_checkstr(L, 1)); GCstr *s = lj_lib_optstr(L, 2); const char *mode = s ? strdata(s) : "r"; IOFileUD *iof = io_file_new(L); iof->type = IOFILE_TYPE_PIPE; #if LJ_TARGET_POSIX fflush(NULL); iof->fp = popen(fname, mode); #else iof->fp = _popen(fname, mode); #endif return iof->fp != NULL ? 1 : luaL_fileresult(L, 0, fname); #else return luaL_error(L, LUA_QL("popen") " not supported"); #endif } LJLIB_CF(io_tmpfile) { IOFileUD *iof = io_file_new(L); #if LJ_TARGET_PS3 iof->fp = NULL; errno = ENOSYS; #else iof->fp = tmpfile(); #endif return iof->fp != NULL ? 1 : luaL_fileresult(L, 0, NULL); } LJLIB_CF(io_close) { return lj_cf_io_method_close(L); } LJLIB_CF(io_read) { return io_file_read(L, io_stdfile(L, GCROOT_IO_INPUT), 0); } LJLIB_CF(io_write) LJLIB_REC(io_write GCROOT_IO_OUTPUT) { return io_file_write(L, io_stdfile(L, GCROOT_IO_OUTPUT), 0); } LJLIB_CF(io_flush) LJLIB_REC(io_flush GCROOT_IO_OUTPUT) { return luaL_fileresult(L, fflush(io_stdfile(L, GCROOT_IO_OUTPUT)) == 0, NULL); } static int io_std_getset(lua_State *L, ptrdiff_t id, const char *mode) { if (L->base < L->top && !tvisnil(L->base)) { if (tvisudata(L->base)) { io_tofile(L); L->top = L->base+1; } else { io_file_open(L, mode); } /* NOBARRIER: The standard I/O handles are GC roots. */ setgcref(G(L)->gcroot[id], gcV(L->top-1)); } else { setudataV(L, L->top++, IOSTDF_UD(L, id)); } return 1; } LJLIB_CF(io_input) { return io_std_getset(L, GCROOT_IO_INPUT, "r"); } LJLIB_CF(io_output) { return io_std_getset(L, GCROOT_IO_OUTPUT, "w"); } LJLIB_CF(io_lines) { if (L->base == L->top) setnilV(L->top++); if (!tvisnil(L->base)) { /* io.lines(fname) */ IOFileUD *iof = io_file_open(L, "r"); iof->type = IOFILE_TYPE_FILE|IOFILE_FLAG_CLOSE; L->top--; setudataV(L, L->base, udataV(L->top)); } else { /* io.lines() iterates over stdin. */ setudataV(L, L->base, IOSTDF_UD(L, GCROOT_IO_INPUT)); } lua_pushcclosure(L, io_file_iter, (int)(L->top - L->base)); return 1; } LJLIB_CF(io_type) { cTValue *o = lj_lib_checkany(L, 1); if (!(tvisudata(o) && udataV(o)->udtype == UDTYPE_IO_FILE)) setnilV(L->top++); else if (((IOFileUD *)uddata(udataV(o)))->fp != NULL) lua_pushliteral(L, "file"); else lua_pushliteral(L, "closed file"); return 1; } #include "lj_libdef.h" /* ------------------------------------------------------------------------ */ static GCobj *io_std_new(lua_State *L, FILE *fp, const char *name) { IOFileUD *iof = (IOFileUD *)lua_newuserdata(L, sizeof(IOFileUD)); GCudata *ud = udataV(L->top-1); ud->udtype = UDTYPE_IO_FILE; /* NOBARRIER: The GCudata is new (marked white). */ setgcref(ud->metatable, gcV(L->top-3)); iof->fp = fp; iof->type = IOFILE_TYPE_STDF; lua_setfield(L, -2, name); return obj2gco(ud); } LUALIB_API int luaopen_io(lua_State *L) { LJ_LIB_REG(L, NULL, io_method); copyTV(L, L->top, L->top-1); L->top++; lua_setfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE); LJ_LIB_REG(L, LUA_IOLIBNAME, io); setgcref(G(L)->gcroot[GCROOT_IO_INPUT], io_std_new(L, stdin, "stdin")); setgcref(G(L)->gcroot[GCROOT_IO_OUTPUT], io_std_new(L, stdout, "stdout")); io_std_new(L, stderr, "stderr"); return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_parse.c0000664000000000000000000023476212231715321022346 0ustar rootroot/* ** Lua parser (source code -> bytecode). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_parse_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_func.h" #include "lj_state.h" #include "lj_bc.h" #if LJ_HASFFI #include "lj_ctype.h" #endif #include "lj_lex.h" #include "lj_parse.h" #include "lj_vm.h" #include "lj_vmevent.h" /* -- Parser structures and definitions ----------------------------------- */ /* Expression kinds. */ typedef enum { /* Constant expressions must be first and in this order: */ VKNIL, VKFALSE, VKTRUE, VKSTR, /* sval = string value */ VKNUM, /* nval = number value */ VKLAST = VKNUM, VKCDATA, /* nval = cdata value, not treated as a constant expression */ /* Non-constant expressions follow: */ VLOCAL, /* info = local register, aux = vstack index */ VUPVAL, /* info = upvalue index, aux = vstack index */ VGLOBAL, /* sval = string value */ VINDEXED, /* info = table register, aux = index reg/byte/string const */ VJMP, /* info = instruction PC */ VRELOCABLE, /* info = instruction PC */ VNONRELOC, /* info = result register */ VCALL, /* info = instruction PC, aux = base */ VVOID } ExpKind; /* Expression descriptor. */ typedef struct ExpDesc { union { struct { uint32_t info; /* Primary info. */ uint32_t aux; /* Secondary info. */ } s; TValue nval; /* Number value. */ GCstr *sval; /* String value. */ } u; ExpKind k; BCPos t; /* True condition jump list. */ BCPos f; /* False condition jump list. */ } ExpDesc; /* Macros for expressions. */ #define expr_hasjump(e) ((e)->t != (e)->f) #define expr_isk(e) ((e)->k <= VKLAST) #define expr_isk_nojump(e) (expr_isk(e) && !expr_hasjump(e)) #define expr_isnumk(e) ((e)->k == VKNUM) #define expr_isnumk_nojump(e) (expr_isnumk(e) && !expr_hasjump(e)) #define expr_isstrk(e) ((e)->k == VKSTR) #define expr_numtv(e) check_exp(expr_isnumk((e)), &(e)->u.nval) #define expr_numberV(e) numberVnum(expr_numtv((e))) /* Initialize expression. */ static LJ_AINLINE void expr_init(ExpDesc *e, ExpKind k, uint32_t info) { e->k = k; e->u.s.info = info; e->f = e->t = NO_JMP; } /* Check number constant for +-0. */ static int expr_numiszero(ExpDesc *e) { TValue *o = expr_numtv(e); return tvisint(o) ? (intV(o) == 0) : tviszero(o); } /* Per-function linked list of scope blocks. */ typedef struct FuncScope { struct FuncScope *prev; /* Link to outer scope. */ MSize vstart; /* Start of block-local variables. */ uint8_t nactvar; /* Number of active vars outside the scope. */ uint8_t flags; /* Scope flags. */ } FuncScope; #define FSCOPE_LOOP 0x01 /* Scope is a (breakable) loop. */ #define FSCOPE_BREAK 0x02 /* Break used in scope. */ #define FSCOPE_GOLA 0x04 /* Goto or label used in scope. */ #define FSCOPE_UPVAL 0x08 /* Upvalue in scope. */ #define FSCOPE_NOCLOSE 0x10 /* Do not close upvalues. */ #define NAME_BREAK ((GCstr *)(uintptr_t)1) /* Index into variable stack. */ typedef uint16_t VarIndex; #define LJ_MAX_VSTACK (65536 - LJ_MAX_UPVAL) /* Variable/goto/label info. */ #define VSTACK_VAR_RW 0x01 /* R/W variable. */ #define VSTACK_GOTO 0x02 /* Pending goto. */ #define VSTACK_LABEL 0x04 /* Label. */ /* Per-function state. */ typedef struct FuncState { GCtab *kt; /* Hash table for constants. */ LexState *ls; /* Lexer state. */ lua_State *L; /* Lua state. */ FuncScope *bl; /* Current scope. */ struct FuncState *prev; /* Enclosing function. */ BCPos pc; /* Next bytecode position. */ BCPos lasttarget; /* Bytecode position of last jump target. */ BCPos jpc; /* Pending jump list to next bytecode. */ BCReg freereg; /* First free register. */ BCReg nactvar; /* Number of active local variables. */ BCReg nkn, nkgc; /* Number of lua_Number/GCobj constants */ BCLine linedefined; /* First line of the function definition. */ BCInsLine *bcbase; /* Base of bytecode stack. */ BCPos bclim; /* Limit of bytecode stack. */ MSize vbase; /* Base of variable stack for this function. */ uint8_t flags; /* Prototype flags. */ uint8_t numparams; /* Number of parameters. */ uint8_t framesize; /* Fixed frame size. */ uint8_t nuv; /* Number of upvalues */ VarIndex varmap[LJ_MAX_LOCVAR]; /* Map from register to variable idx. */ VarIndex uvmap[LJ_MAX_UPVAL]; /* Map from upvalue to variable idx. */ VarIndex uvtmp[LJ_MAX_UPVAL]; /* Temporary upvalue map. */ } FuncState; /* Binary and unary operators. ORDER OPR */ typedef enum BinOpr { OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, /* ORDER ARITH */ OPR_CONCAT, OPR_NE, OPR_EQ, OPR_LT, OPR_GE, OPR_LE, OPR_GT, OPR_AND, OPR_OR, OPR_NOBINOPR } BinOpr; LJ_STATIC_ASSERT((int)BC_ISGE-(int)BC_ISLT == (int)OPR_GE-(int)OPR_LT); LJ_STATIC_ASSERT((int)BC_ISLE-(int)BC_ISLT == (int)OPR_LE-(int)OPR_LT); LJ_STATIC_ASSERT((int)BC_ISGT-(int)BC_ISLT == (int)OPR_GT-(int)OPR_LT); LJ_STATIC_ASSERT((int)BC_SUBVV-(int)BC_ADDVV == (int)OPR_SUB-(int)OPR_ADD); LJ_STATIC_ASSERT((int)BC_MULVV-(int)BC_ADDVV == (int)OPR_MUL-(int)OPR_ADD); LJ_STATIC_ASSERT((int)BC_DIVVV-(int)BC_ADDVV == (int)OPR_DIV-(int)OPR_ADD); LJ_STATIC_ASSERT((int)BC_MODVV-(int)BC_ADDVV == (int)OPR_MOD-(int)OPR_ADD); /* -- Error handling ------------------------------------------------------ */ LJ_NORET LJ_NOINLINE static void err_syntax(LexState *ls, ErrMsg em) { lj_lex_error(ls, ls->token, em); } LJ_NORET LJ_NOINLINE static void err_token(LexState *ls, LexToken token) { lj_lex_error(ls, ls->token, LJ_ERR_XTOKEN, lj_lex_token2str(ls, token)); } LJ_NORET static void err_limit(FuncState *fs, uint32_t limit, const char *what) { if (fs->linedefined == 0) lj_lex_error(fs->ls, 0, LJ_ERR_XLIMM, limit, what); else lj_lex_error(fs->ls, 0, LJ_ERR_XLIMF, fs->linedefined, limit, what); } #define checklimit(fs, v, l, m) if ((v) >= (l)) err_limit(fs, l, m) #define checklimitgt(fs, v, l, m) if ((v) > (l)) err_limit(fs, l, m) #define checkcond(ls, c, em) { if (!(c)) err_syntax(ls, em); } /* -- Management of constants --------------------------------------------- */ /* Return bytecode encoding for primitive constant. */ #define const_pri(e) check_exp((e)->k <= VKTRUE, (e)->k) #define tvhaskslot(o) ((o)->u32.hi == 0) #define tvkslot(o) ((o)->u32.lo) /* Add a number constant. */ static BCReg const_num(FuncState *fs, ExpDesc *e) { lua_State *L = fs->L; TValue *o; lua_assert(expr_isnumk(e)); o = lj_tab_set(L, fs->kt, &e->u.nval); if (tvhaskslot(o)) return tvkslot(o); o->u64 = fs->nkn; return fs->nkn++; } /* Add a GC object constant. */ static BCReg const_gc(FuncState *fs, GCobj *gc, uint32_t itype) { lua_State *L = fs->L; TValue key, *o; setgcV(L, &key, gc, itype); /* NOBARRIER: the key is new or kept alive. */ o = lj_tab_set(L, fs->kt, &key); if (tvhaskslot(o)) return tvkslot(o); o->u64 = fs->nkgc; return fs->nkgc++; } /* Add a string constant. */ static BCReg const_str(FuncState *fs, ExpDesc *e) { lua_assert(expr_isstrk(e) || e->k == VGLOBAL); return const_gc(fs, obj2gco(e->u.sval), LJ_TSTR); } /* Anchor string constant to avoid GC. */ GCstr *lj_parse_keepstr(LexState *ls, const char *str, size_t len) { /* NOBARRIER: the key is new or kept alive. */ lua_State *L = ls->L; GCstr *s = lj_str_new(L, str, len); TValue *tv = lj_tab_setstr(L, ls->fs->kt, s); if (tvisnil(tv)) setboolV(tv, 1); lj_gc_check(L); return s; } #if LJ_HASFFI /* Anchor cdata to avoid GC. */ void lj_parse_keepcdata(LexState *ls, TValue *tv, GCcdata *cd) { /* NOBARRIER: the key is new or kept alive. */ lua_State *L = ls->L; setcdataV(L, tv, cd); setboolV(lj_tab_set(L, ls->fs->kt, tv), 1); } #endif /* -- Jump list handling -------------------------------------------------- */ /* Get next element in jump list. */ static BCPos jmp_next(FuncState *fs, BCPos pc) { ptrdiff_t delta = bc_j(fs->bcbase[pc].ins); if ((BCPos)delta == NO_JMP) return NO_JMP; else return (BCPos)(((ptrdiff_t)pc+1)+delta); } /* Check if any of the instructions on the jump list produce no value. */ static int jmp_novalue(FuncState *fs, BCPos list) { for (; list != NO_JMP; list = jmp_next(fs, list)) { BCIns p = fs->bcbase[list >= 1 ? list-1 : list].ins; if (!(bc_op(p) == BC_ISTC || bc_op(p) == BC_ISFC || bc_a(p) == NO_REG)) return 1; } return 0; } /* Patch register of test instructions. */ static int jmp_patchtestreg(FuncState *fs, BCPos pc, BCReg reg) { BCInsLine *ilp = &fs->bcbase[pc >= 1 ? pc-1 : pc]; BCOp op = bc_op(ilp->ins); if (op == BC_ISTC || op == BC_ISFC) { if (reg != NO_REG && reg != bc_d(ilp->ins)) { setbc_a(&ilp->ins, reg); } else { /* Nothing to store or already in the right register. */ setbc_op(&ilp->ins, op+(BC_IST-BC_ISTC)); setbc_a(&ilp->ins, 0); } } else if (bc_a(ilp->ins) == NO_REG) { if (reg == NO_REG) { ilp->ins = BCINS_AJ(BC_JMP, bc_a(fs->bcbase[pc].ins), 0); } else { setbc_a(&ilp->ins, reg); if (reg >= bc_a(ilp[1].ins)) setbc_a(&ilp[1].ins, reg+1); } } else { return 0; /* Cannot patch other instructions. */ } return 1; } /* Drop values for all instructions on jump list. */ static void jmp_dropval(FuncState *fs, BCPos list) { for (; list != NO_JMP; list = jmp_next(fs, list)) jmp_patchtestreg(fs, list, NO_REG); } /* Patch jump instruction to target. */ static void jmp_patchins(FuncState *fs, BCPos pc, BCPos dest) { BCIns *jmp = &fs->bcbase[pc].ins; BCPos offset = dest-(pc+1)+BCBIAS_J; lua_assert(dest != NO_JMP); if (offset > BCMAX_D) err_syntax(fs->ls, LJ_ERR_XJUMP); setbc_d(jmp, offset); } /* Append to jump list. */ static void jmp_append(FuncState *fs, BCPos *l1, BCPos l2) { if (l2 == NO_JMP) { return; } else if (*l1 == NO_JMP) { *l1 = l2; } else { BCPos list = *l1; BCPos next; while ((next = jmp_next(fs, list)) != NO_JMP) /* Find last element. */ list = next; jmp_patchins(fs, list, l2); } } /* Patch jump list and preserve produced values. */ static void jmp_patchval(FuncState *fs, BCPos list, BCPos vtarget, BCReg reg, BCPos dtarget) { while (list != NO_JMP) { BCPos next = jmp_next(fs, list); if (jmp_patchtestreg(fs, list, reg)) jmp_patchins(fs, list, vtarget); /* Jump to target with value. */ else jmp_patchins(fs, list, dtarget); /* Jump to default target. */ list = next; } } /* Jump to following instruction. Append to list of pending jumps. */ static void jmp_tohere(FuncState *fs, BCPos list) { fs->lasttarget = fs->pc; jmp_append(fs, &fs->jpc, list); } /* Patch jump list to target. */ static void jmp_patch(FuncState *fs, BCPos list, BCPos target) { if (target == fs->pc) { jmp_tohere(fs, list); } else { lua_assert(target < fs->pc); jmp_patchval(fs, list, target, NO_REG, target); } } /* -- Bytecode register allocator ----------------------------------------- */ /* Bump frame size. */ static void bcreg_bump(FuncState *fs, BCReg n) { BCReg sz = fs->freereg + n; if (sz > fs->framesize) { if (sz >= LJ_MAX_SLOTS) err_syntax(fs->ls, LJ_ERR_XSLOTS); fs->framesize = (uint8_t)sz; } } /* Reserve registers. */ static void bcreg_reserve(FuncState *fs, BCReg n) { bcreg_bump(fs, n); fs->freereg += n; } /* Free register. */ static void bcreg_free(FuncState *fs, BCReg reg) { if (reg >= fs->nactvar) { fs->freereg--; lua_assert(reg == fs->freereg); } } /* Free register for expression. */ static void expr_free(FuncState *fs, ExpDesc *e) { if (e->k == VNONRELOC) bcreg_free(fs, e->u.s.info); } /* -- Bytecode emitter ---------------------------------------------------- */ /* Emit bytecode instruction. */ static BCPos bcemit_INS(FuncState *fs, BCIns ins) { BCPos pc = fs->pc; LexState *ls = fs->ls; jmp_patchval(fs, fs->jpc, pc, NO_REG, pc); fs->jpc = NO_JMP; if (LJ_UNLIKELY(pc >= fs->bclim)) { ptrdiff_t base = fs->bcbase - ls->bcstack; checklimit(fs, ls->sizebcstack, LJ_MAX_BCINS, "bytecode instructions"); lj_mem_growvec(fs->L, ls->bcstack, ls->sizebcstack, LJ_MAX_BCINS,BCInsLine); fs->bclim = (BCPos)(ls->sizebcstack - base); fs->bcbase = ls->bcstack + base; } fs->bcbase[pc].ins = ins; fs->bcbase[pc].line = ls->lastline; fs->pc = pc+1; return pc; } #define bcemit_ABC(fs, o, a, b, c) bcemit_INS(fs, BCINS_ABC(o, a, b, c)) #define bcemit_AD(fs, o, a, d) bcemit_INS(fs, BCINS_AD(o, a, d)) #define bcemit_AJ(fs, o, a, j) bcemit_INS(fs, BCINS_AJ(o, a, j)) #define bcptr(fs, e) (&(fs)->bcbase[(e)->u.s.info].ins) /* -- Bytecode emitter for expressions ------------------------------------ */ /* Discharge non-constant expression to any register. */ static void expr_discharge(FuncState *fs, ExpDesc *e) { BCIns ins; if (e->k == VUPVAL) { ins = BCINS_AD(BC_UGET, 0, e->u.s.info); } else if (e->k == VGLOBAL) { ins = BCINS_AD(BC_GGET, 0, const_str(fs, e)); } else if (e->k == VINDEXED) { BCReg rc = e->u.s.aux; if ((int32_t)rc < 0) { ins = BCINS_ABC(BC_TGETS, 0, e->u.s.info, ~rc); } else if (rc > BCMAX_C) { ins = BCINS_ABC(BC_TGETB, 0, e->u.s.info, rc-(BCMAX_C+1)); } else { bcreg_free(fs, rc); ins = BCINS_ABC(BC_TGETV, 0, e->u.s.info, rc); } bcreg_free(fs, e->u.s.info); } else if (e->k == VCALL) { e->u.s.info = e->u.s.aux; e->k = VNONRELOC; return; } else if (e->k == VLOCAL) { e->k = VNONRELOC; return; } else { return; } e->u.s.info = bcemit_INS(fs, ins); e->k = VRELOCABLE; } /* Emit bytecode to set a range of registers to nil. */ static void bcemit_nil(FuncState *fs, BCReg from, BCReg n) { if (fs->pc > fs->lasttarget) { /* No jumps to current position? */ BCIns *ip = &fs->bcbase[fs->pc-1].ins; BCReg pto, pfrom = bc_a(*ip); switch (bc_op(*ip)) { /* Try to merge with the previous instruction. */ case BC_KPRI: if (bc_d(*ip) != ~LJ_TNIL) break; if (from == pfrom) { if (n == 1) return; } else if (from == pfrom+1) { from = pfrom; n++; } else { break; } *ip = BCINS_AD(BC_KNIL, from, from+n-1); /* Replace KPRI. */ return; case BC_KNIL: pto = bc_d(*ip); if (pfrom <= from && from <= pto+1) { /* Can we connect both ranges? */ if (from+n-1 > pto) setbc_d(ip, from+n-1); /* Patch previous instruction range. */ return; } break; default: break; } } /* Emit new instruction or replace old instruction. */ bcemit_INS(fs, n == 1 ? BCINS_AD(BC_KPRI, from, VKNIL) : BCINS_AD(BC_KNIL, from, from+n-1)); } /* Discharge an expression to a specific register. Ignore branches. */ static void expr_toreg_nobranch(FuncState *fs, ExpDesc *e, BCReg reg) { BCIns ins; expr_discharge(fs, e); if (e->k == VKSTR) { ins = BCINS_AD(BC_KSTR, reg, const_str(fs, e)); } else if (e->k == VKNUM) { #if LJ_DUALNUM cTValue *tv = expr_numtv(e); if (tvisint(tv) && checki16(intV(tv))) ins = BCINS_AD(BC_KSHORT, reg, (BCReg)(uint16_t)intV(tv)); else #else lua_Number n = expr_numberV(e); int32_t k = lj_num2int(n); if (checki16(k) && n == (lua_Number)k) ins = BCINS_AD(BC_KSHORT, reg, (BCReg)(uint16_t)k); else #endif ins = BCINS_AD(BC_KNUM, reg, const_num(fs, e)); #if LJ_HASFFI } else if (e->k == VKCDATA) { fs->flags |= PROTO_FFI; ins = BCINS_AD(BC_KCDATA, reg, const_gc(fs, obj2gco(cdataV(&e->u.nval)), LJ_TCDATA)); #endif } else if (e->k == VRELOCABLE) { setbc_a(bcptr(fs, e), reg); goto noins; } else if (e->k == VNONRELOC) { if (reg == e->u.s.info) goto noins; ins = BCINS_AD(BC_MOV, reg, e->u.s.info); } else if (e->k == VKNIL) { bcemit_nil(fs, reg, 1); goto noins; } else if (e->k <= VKTRUE) { ins = BCINS_AD(BC_KPRI, reg, const_pri(e)); } else { lua_assert(e->k == VVOID || e->k == VJMP); return; } bcemit_INS(fs, ins); noins: e->u.s.info = reg; e->k = VNONRELOC; } /* Forward declaration. */ static BCPos bcemit_jmp(FuncState *fs); /* Discharge an expression to a specific register. */ static void expr_toreg(FuncState *fs, ExpDesc *e, BCReg reg) { expr_toreg_nobranch(fs, e, reg); if (e->k == VJMP) jmp_append(fs, &e->t, e->u.s.info); /* Add it to the true jump list. */ if (expr_hasjump(e)) { /* Discharge expression with branches. */ BCPos jend, jfalse = NO_JMP, jtrue = NO_JMP; if (jmp_novalue(fs, e->t) || jmp_novalue(fs, e->f)) { BCPos jval = (e->k == VJMP) ? NO_JMP : bcemit_jmp(fs); jfalse = bcemit_AD(fs, BC_KPRI, reg, VKFALSE); bcemit_AJ(fs, BC_JMP, fs->freereg, 1); jtrue = bcemit_AD(fs, BC_KPRI, reg, VKTRUE); jmp_tohere(fs, jval); } jend = fs->pc; fs->lasttarget = jend; jmp_patchval(fs, e->f, jend, reg, jfalse); jmp_patchval(fs, e->t, jend, reg, jtrue); } e->f = e->t = NO_JMP; e->u.s.info = reg; e->k = VNONRELOC; } /* Discharge an expression to the next free register. */ static void expr_tonextreg(FuncState *fs, ExpDesc *e) { expr_discharge(fs, e); expr_free(fs, e); bcreg_reserve(fs, 1); expr_toreg(fs, e, fs->freereg - 1); } /* Discharge an expression to any register. */ static BCReg expr_toanyreg(FuncState *fs, ExpDesc *e) { expr_discharge(fs, e); if (e->k == VNONRELOC) { if (!expr_hasjump(e)) return e->u.s.info; /* Already in a register. */ if (e->u.s.info >= fs->nactvar) { expr_toreg(fs, e, e->u.s.info); /* Discharge to temp. register. */ return e->u.s.info; } } expr_tonextreg(fs, e); /* Discharge to next register. */ return e->u.s.info; } /* Partially discharge expression to a value. */ static void expr_toval(FuncState *fs, ExpDesc *e) { if (expr_hasjump(e)) expr_toanyreg(fs, e); else expr_discharge(fs, e); } /* Emit store for LHS expression. */ static void bcemit_store(FuncState *fs, ExpDesc *var, ExpDesc *e) { BCIns ins; if (var->k == VLOCAL) { fs->ls->vstack[var->u.s.aux].info |= VSTACK_VAR_RW; expr_free(fs, e); expr_toreg(fs, e, var->u.s.info); return; } else if (var->k == VUPVAL) { fs->ls->vstack[var->u.s.aux].info |= VSTACK_VAR_RW; expr_toval(fs, e); if (e->k <= VKTRUE) ins = BCINS_AD(BC_USETP, var->u.s.info, const_pri(e)); else if (e->k == VKSTR) ins = BCINS_AD(BC_USETS, var->u.s.info, const_str(fs, e)); else if (e->k == VKNUM) ins = BCINS_AD(BC_USETN, var->u.s.info, const_num(fs, e)); else ins = BCINS_AD(BC_USETV, var->u.s.info, expr_toanyreg(fs, e)); } else if (var->k == VGLOBAL) { BCReg ra = expr_toanyreg(fs, e); ins = BCINS_AD(BC_GSET, ra, const_str(fs, var)); } else { BCReg ra, rc; lua_assert(var->k == VINDEXED); ra = expr_toanyreg(fs, e); rc = var->u.s.aux; if ((int32_t)rc < 0) { ins = BCINS_ABC(BC_TSETS, ra, var->u.s.info, ~rc); } else if (rc > BCMAX_C) { ins = BCINS_ABC(BC_TSETB, ra, var->u.s.info, rc-(BCMAX_C+1)); } else { /* Free late alloced key reg to avoid assert on free of value reg. */ /* This can only happen when called from expr_table(). */ lua_assert(e->k != VNONRELOC || ra < fs->nactvar || rc < ra || (bcreg_free(fs, rc),1)); ins = BCINS_ABC(BC_TSETV, ra, var->u.s.info, rc); } } bcemit_INS(fs, ins); expr_free(fs, e); } /* Emit method lookup expression. */ static void bcemit_method(FuncState *fs, ExpDesc *e, ExpDesc *key) { BCReg idx, func, obj = expr_toanyreg(fs, e); expr_free(fs, e); func = fs->freereg; bcemit_AD(fs, BC_MOV, func+1, obj); /* Copy object to first argument. */ lua_assert(expr_isstrk(key)); idx = const_str(fs, key); if (idx <= BCMAX_C) { bcreg_reserve(fs, 2); bcemit_ABC(fs, BC_TGETS, func, obj, idx); } else { bcreg_reserve(fs, 3); bcemit_AD(fs, BC_KSTR, func+2, idx); bcemit_ABC(fs, BC_TGETV, func, obj, func+2); fs->freereg--; } e->u.s.info = func; e->k = VNONRELOC; } /* -- Bytecode emitter for branches --------------------------------------- */ /* Emit unconditional branch. */ static BCPos bcemit_jmp(FuncState *fs) { BCPos jpc = fs->jpc; BCPos j = fs->pc - 1; BCIns *ip = &fs->bcbase[j].ins; fs->jpc = NO_JMP; if ((int32_t)j >= (int32_t)fs->lasttarget && bc_op(*ip) == BC_UCLO) setbc_j(ip, NO_JMP); else j = bcemit_AJ(fs, BC_JMP, fs->freereg, NO_JMP); jmp_append(fs, &j, jpc); return j; } /* Invert branch condition of bytecode instruction. */ static void invertcond(FuncState *fs, ExpDesc *e) { BCIns *ip = &fs->bcbase[e->u.s.info - 1].ins; setbc_op(ip, bc_op(*ip)^1); } /* Emit conditional branch. */ static BCPos bcemit_branch(FuncState *fs, ExpDesc *e, int cond) { BCPos pc; if (e->k == VRELOCABLE) { BCIns *ip = bcptr(fs, e); if (bc_op(*ip) == BC_NOT) { *ip = BCINS_AD(cond ? BC_ISF : BC_IST, 0, bc_d(*ip)); return bcemit_jmp(fs); } } if (e->k != VNONRELOC) { bcreg_reserve(fs, 1); expr_toreg_nobranch(fs, e, fs->freereg-1); } bcemit_AD(fs, cond ? BC_ISTC : BC_ISFC, NO_REG, e->u.s.info); pc = bcemit_jmp(fs); expr_free(fs, e); return pc; } /* Emit branch on true condition. */ static void bcemit_branch_t(FuncState *fs, ExpDesc *e) { BCPos pc; expr_discharge(fs, e); if (e->k == VKSTR || e->k == VKNUM || e->k == VKTRUE) pc = NO_JMP; /* Never jump. */ else if (e->k == VJMP) invertcond(fs, e), pc = e->u.s.info; else if (e->k == VKFALSE || e->k == VKNIL) expr_toreg_nobranch(fs, e, NO_REG), pc = bcemit_jmp(fs); else pc = bcemit_branch(fs, e, 0); jmp_append(fs, &e->f, pc); jmp_tohere(fs, e->t); e->t = NO_JMP; } /* Emit branch on false condition. */ static void bcemit_branch_f(FuncState *fs, ExpDesc *e) { BCPos pc; expr_discharge(fs, e); if (e->k == VKNIL || e->k == VKFALSE) pc = NO_JMP; /* Never jump. */ else if (e->k == VJMP) pc = e->u.s.info; else if (e->k == VKSTR || e->k == VKNUM || e->k == VKTRUE) expr_toreg_nobranch(fs, e, NO_REG), pc = bcemit_jmp(fs); else pc = bcemit_branch(fs, e, 1); jmp_append(fs, &e->t, pc); jmp_tohere(fs, e->f); e->f = NO_JMP; } /* -- Bytecode emitter for operators -------------------------------------- */ /* Try constant-folding of arithmetic operators. */ static int foldarith(BinOpr opr, ExpDesc *e1, ExpDesc *e2) { TValue o; lua_Number n; if (!expr_isnumk_nojump(e1) || !expr_isnumk_nojump(e2)) return 0; n = lj_vm_foldarith(expr_numberV(e1), expr_numberV(e2), (int)opr-OPR_ADD); setnumV(&o, n); if (tvisnan(&o) || tvismzero(&o)) return 0; /* Avoid NaN and -0 as consts. */ if (LJ_DUALNUM) { int32_t k = lj_num2int(n); if ((lua_Number)k == n) { setintV(&e1->u.nval, k); return 1; } } setnumV(&e1->u.nval, n); return 1; } /* Emit arithmetic operator. */ static void bcemit_arith(FuncState *fs, BinOpr opr, ExpDesc *e1, ExpDesc *e2) { BCReg rb, rc, t; uint32_t op; if (foldarith(opr, e1, e2)) return; if (opr == OPR_POW) { op = BC_POW; rc = expr_toanyreg(fs, e2); rb = expr_toanyreg(fs, e1); } else { op = opr-OPR_ADD+BC_ADDVV; /* Must discharge 2nd operand first since VINDEXED might free regs. */ expr_toval(fs, e2); if (expr_isnumk(e2) && (rc = const_num(fs, e2)) <= BCMAX_C) op -= BC_ADDVV-BC_ADDVN; else rc = expr_toanyreg(fs, e2); /* 1st operand discharged by bcemit_binop_left, but need KNUM/KSHORT. */ lua_assert(expr_isnumk(e1) || e1->k == VNONRELOC); expr_toval(fs, e1); /* Avoid two consts to satisfy bytecode constraints. */ if (expr_isnumk(e1) && !expr_isnumk(e2) && (t = const_num(fs, e1)) <= BCMAX_B) { rb = rc; rc = t; op -= BC_ADDVV-BC_ADDNV; } else { rb = expr_toanyreg(fs, e1); } } /* Using expr_free might cause asserts if the order is wrong. */ if (e1->k == VNONRELOC && e1->u.s.info >= fs->nactvar) fs->freereg--; if (e2->k == VNONRELOC && e2->u.s.info >= fs->nactvar) fs->freereg--; e1->u.s.info = bcemit_ABC(fs, op, 0, rb, rc); e1->k = VRELOCABLE; } /* Emit comparison operator. */ static void bcemit_comp(FuncState *fs, BinOpr opr, ExpDesc *e1, ExpDesc *e2) { ExpDesc *eret = e1; BCIns ins; expr_toval(fs, e1); if (opr == OPR_EQ || opr == OPR_NE) { BCOp op = opr == OPR_EQ ? BC_ISEQV : BC_ISNEV; BCReg ra; if (expr_isk(e1)) { e1 = e2; e2 = eret; } /* Need constant in 2nd arg. */ ra = expr_toanyreg(fs, e1); /* First arg must be in a reg. */ expr_toval(fs, e2); switch (e2->k) { case VKNIL: case VKFALSE: case VKTRUE: ins = BCINS_AD(op+(BC_ISEQP-BC_ISEQV), ra, const_pri(e2)); break; case VKSTR: ins = BCINS_AD(op+(BC_ISEQS-BC_ISEQV), ra, const_str(fs, e2)); break; case VKNUM: ins = BCINS_AD(op+(BC_ISEQN-BC_ISEQV), ra, const_num(fs, e2)); break; default: ins = BCINS_AD(op, ra, expr_toanyreg(fs, e2)); break; } } else { uint32_t op = opr-OPR_LT+BC_ISLT; BCReg ra, rd; if ((op-BC_ISLT) & 1) { /* GT -> LT, GE -> LE */ e1 = e2; e2 = eret; /* Swap operands. */ op = ((op-BC_ISLT)^3)+BC_ISLT; expr_toval(fs, e1); } rd = expr_toanyreg(fs, e2); ra = expr_toanyreg(fs, e1); ins = BCINS_AD(op, ra, rd); } /* Using expr_free might cause asserts if the order is wrong. */ if (e1->k == VNONRELOC && e1->u.s.info >= fs->nactvar) fs->freereg--; if (e2->k == VNONRELOC && e2->u.s.info >= fs->nactvar) fs->freereg--; bcemit_INS(fs, ins); eret->u.s.info = bcemit_jmp(fs); eret->k = VJMP; } /* Fixup left side of binary operator. */ static void bcemit_binop_left(FuncState *fs, BinOpr op, ExpDesc *e) { if (op == OPR_AND) { bcemit_branch_t(fs, e); } else if (op == OPR_OR) { bcemit_branch_f(fs, e); } else if (op == OPR_CONCAT) { expr_tonextreg(fs, e); } else if (op == OPR_EQ || op == OPR_NE) { if (!expr_isk_nojump(e)) expr_toanyreg(fs, e); } else { if (!expr_isnumk_nojump(e)) expr_toanyreg(fs, e); } } /* Emit binary operator. */ static void bcemit_binop(FuncState *fs, BinOpr op, ExpDesc *e1, ExpDesc *e2) { if (op <= OPR_POW) { bcemit_arith(fs, op, e1, e2); } else if (op == OPR_AND) { lua_assert(e1->t == NO_JMP); /* List must be closed. */ expr_discharge(fs, e2); jmp_append(fs, &e2->f, e1->f); *e1 = *e2; } else if (op == OPR_OR) { lua_assert(e1->f == NO_JMP); /* List must be closed. */ expr_discharge(fs, e2); jmp_append(fs, &e2->t, e1->t); *e1 = *e2; } else if (op == OPR_CONCAT) { expr_toval(fs, e2); if (e2->k == VRELOCABLE && bc_op(*bcptr(fs, e2)) == BC_CAT) { lua_assert(e1->u.s.info == bc_b(*bcptr(fs, e2))-1); expr_free(fs, e1); setbc_b(bcptr(fs, e2), e1->u.s.info); e1->u.s.info = e2->u.s.info; } else { expr_tonextreg(fs, e2); expr_free(fs, e2); expr_free(fs, e1); e1->u.s.info = bcemit_ABC(fs, BC_CAT, 0, e1->u.s.info, e2->u.s.info); } e1->k = VRELOCABLE; } else { lua_assert(op == OPR_NE || op == OPR_EQ || op == OPR_LT || op == OPR_GE || op == OPR_LE || op == OPR_GT); bcemit_comp(fs, op, e1, e2); } } /* Emit unary operator. */ static void bcemit_unop(FuncState *fs, BCOp op, ExpDesc *e) { if (op == BC_NOT) { /* Swap true and false lists. */ { BCPos temp = e->f; e->f = e->t; e->t = temp; } jmp_dropval(fs, e->f); jmp_dropval(fs, e->t); expr_discharge(fs, e); if (e->k == VKNIL || e->k == VKFALSE) { e->k = VKTRUE; return; } else if (expr_isk(e) || (LJ_HASFFI && e->k == VKCDATA)) { e->k = VKFALSE; return; } else if (e->k == VJMP) { invertcond(fs, e); return; } else if (e->k == VRELOCABLE) { bcreg_reserve(fs, 1); setbc_a(bcptr(fs, e), fs->freereg-1); e->u.s.info = fs->freereg-1; e->k = VNONRELOC; } else { lua_assert(e->k == VNONRELOC); } } else { lua_assert(op == BC_UNM || op == BC_LEN); if (op == BC_UNM && !expr_hasjump(e)) { /* Constant-fold negations. */ #if LJ_HASFFI if (e->k == VKCDATA) { /* Fold in-place since cdata is not interned. */ GCcdata *cd = cdataV(&e->u.nval); int64_t *p = (int64_t *)cdataptr(cd); if (cd->ctypeid == CTID_COMPLEX_DOUBLE) p[1] ^= (int64_t)U64x(80000000,00000000); else *p = -*p; return; } else #endif if (expr_isnumk(e) && !expr_numiszero(e)) { /* Avoid folding to -0. */ TValue *o = expr_numtv(e); if (tvisint(o)) { int32_t k = intV(o); if (k == -k) setnumV(o, -(lua_Number)k); else setintV(o, -k); return; } else { o->u64 ^= U64x(80000000,00000000); return; } } } expr_toanyreg(fs, e); } expr_free(fs, e); e->u.s.info = bcemit_AD(fs, op, 0, e->u.s.info); e->k = VRELOCABLE; } /* -- Lexer support ------------------------------------------------------- */ /* Check and consume optional token. */ static int lex_opt(LexState *ls, LexToken tok) { if (ls->token == tok) { lj_lex_next(ls); return 1; } return 0; } /* Check and consume token. */ static void lex_check(LexState *ls, LexToken tok) { if (ls->token != tok) err_token(ls, tok); lj_lex_next(ls); } /* Check for matching token. */ static void lex_match(LexState *ls, LexToken what, LexToken who, BCLine line) { if (!lex_opt(ls, what)) { if (line == ls->linenumber) { err_token(ls, what); } else { const char *swhat = lj_lex_token2str(ls, what); const char *swho = lj_lex_token2str(ls, who); lj_lex_error(ls, ls->token, LJ_ERR_XMATCH, swhat, swho, line); } } } /* Check for string token. */ static GCstr *lex_str(LexState *ls) { GCstr *s; if (ls->token != TK_name && (LJ_52 || ls->token != TK_goto)) err_token(ls, TK_name); s = strV(&ls->tokenval); lj_lex_next(ls); return s; } /* -- Variable handling --------------------------------------------------- */ #define var_get(ls, fs, i) ((ls)->vstack[(fs)->varmap[(i)]]) /* Define a new local variable. */ static void var_new(LexState *ls, BCReg n, GCstr *name) { FuncState *fs = ls->fs; MSize vtop = ls->vtop; checklimit(fs, fs->nactvar+n, LJ_MAX_LOCVAR, "local variables"); if (LJ_UNLIKELY(vtop >= ls->sizevstack)) { if (ls->sizevstack >= LJ_MAX_VSTACK) lj_lex_error(ls, 0, LJ_ERR_XLIMC, LJ_MAX_VSTACK); lj_mem_growvec(ls->L, ls->vstack, ls->sizevstack, LJ_MAX_VSTACK, VarInfo); } lua_assert((uintptr_t)name < VARNAME__MAX || lj_tab_getstr(fs->kt, name) != NULL); /* NOBARRIER: name is anchored in fs->kt and ls->vstack is not a GCobj. */ setgcref(ls->vstack[vtop].name, obj2gco(name)); fs->varmap[fs->nactvar+n] = (uint16_t)vtop; ls->vtop = vtop+1; } #define var_new_lit(ls, n, v) \ var_new(ls, (n), lj_parse_keepstr(ls, "" v, sizeof(v)-1)) #define var_new_fixed(ls, n, vn) \ var_new(ls, (n), (GCstr *)(uintptr_t)(vn)) /* Add local variables. */ static void var_add(LexState *ls, BCReg nvars) { FuncState *fs = ls->fs; BCReg nactvar = fs->nactvar; while (nvars--) { VarInfo *v = &var_get(ls, fs, nactvar); v->startpc = fs->pc; v->slot = nactvar++; v->info = 0; } fs->nactvar = nactvar; } /* Remove local variables. */ static void var_remove(LexState *ls, BCReg tolevel) { FuncState *fs = ls->fs; while (fs->nactvar > tolevel) var_get(ls, fs, --fs->nactvar).endpc = fs->pc; } /* Lookup local variable name. */ static BCReg var_lookup_local(FuncState *fs, GCstr *n) { int i; for (i = fs->nactvar-1; i >= 0; i--) { if (n == strref(var_get(fs->ls, fs, i).name)) return (BCReg)i; } return (BCReg)-1; /* Not found. */ } /* Lookup or add upvalue index. */ static MSize var_lookup_uv(FuncState *fs, MSize vidx, ExpDesc *e) { MSize i, n = fs->nuv; for (i = 0; i < n; i++) if (fs->uvmap[i] == vidx) return i; /* Already exists. */ /* Otherwise create a new one. */ checklimit(fs, fs->nuv, LJ_MAX_UPVAL, "upvalues"); lua_assert(e->k == VLOCAL || e->k == VUPVAL); fs->uvmap[n] = (uint16_t)vidx; fs->uvtmp[n] = (uint16_t)(e->k == VLOCAL ? vidx : LJ_MAX_VSTACK+e->u.s.info); fs->nuv = n+1; return n; } /* Forward declaration. */ static void fscope_uvmark(FuncState *fs, BCReg level); /* Recursively lookup variables in enclosing functions. */ static MSize var_lookup_(FuncState *fs, GCstr *name, ExpDesc *e, int first) { if (fs) { BCReg reg = var_lookup_local(fs, name); if ((int32_t)reg >= 0) { /* Local in this function? */ expr_init(e, VLOCAL, reg); if (!first) fscope_uvmark(fs, reg); /* Scope now has an upvalue. */ return (MSize)(e->u.s.aux = (uint32_t)fs->varmap[reg]); } else { MSize vidx = var_lookup_(fs->prev, name, e, 0); /* Var in outer func? */ if ((int32_t)vidx >= 0) { /* Yes, make it an upvalue here. */ e->u.s.info = (uint8_t)var_lookup_uv(fs, vidx, e); e->k = VUPVAL; return vidx; } } } else { /* Not found in any function, must be a global. */ expr_init(e, VGLOBAL, 0); e->u.sval = name; } return (MSize)-1; /* Global. */ } /* Lookup variable name. */ #define var_lookup(ls, e) \ var_lookup_((ls)->fs, lex_str(ls), (e), 1) /* -- Goto an label handling ---------------------------------------------- */ /* Add a new goto or label. */ static MSize gola_new(LexState *ls, GCstr *name, uint8_t info, BCPos pc) { FuncState *fs = ls->fs; MSize vtop = ls->vtop; if (LJ_UNLIKELY(vtop >= ls->sizevstack)) { if (ls->sizevstack >= LJ_MAX_VSTACK) lj_lex_error(ls, 0, LJ_ERR_XLIMC, LJ_MAX_VSTACK); lj_mem_growvec(ls->L, ls->vstack, ls->sizevstack, LJ_MAX_VSTACK, VarInfo); } lua_assert(name == NAME_BREAK || lj_tab_getstr(fs->kt, name) != NULL); /* NOBARRIER: name is anchored in fs->kt and ls->vstack is not a GCobj. */ setgcref(ls->vstack[vtop].name, obj2gco(name)); ls->vstack[vtop].startpc = pc; ls->vstack[vtop].slot = (uint8_t)fs->nactvar; ls->vstack[vtop].info = info; ls->vtop = vtop+1; return vtop; } #define gola_isgoto(v) ((v)->info & VSTACK_GOTO) #define gola_islabel(v) ((v)->info & VSTACK_LABEL) #define gola_isgotolabel(v) ((v)->info & (VSTACK_GOTO|VSTACK_LABEL)) /* Patch goto to jump to label. */ static void gola_patch(LexState *ls, VarInfo *vg, VarInfo *vl) { FuncState *fs = ls->fs; BCPos pc = vg->startpc; setgcrefnull(vg->name); /* Invalidate pending goto. */ setbc_a(&fs->bcbase[pc].ins, vl->slot); jmp_patch(fs, pc, vl->startpc); } /* Patch goto to close upvalues. */ static void gola_close(LexState *ls, VarInfo *vg) { FuncState *fs = ls->fs; BCPos pc = vg->startpc; BCIns *ip = &fs->bcbase[pc].ins; lua_assert(gola_isgoto(vg)); lua_assert(bc_op(*ip) == BC_JMP || bc_op(*ip) == BC_UCLO); setbc_a(ip, vg->slot); if (bc_op(*ip) == BC_JMP) { BCPos next = jmp_next(fs, pc); if (next != NO_JMP) jmp_patch(fs, next, pc); /* Jump to UCLO. */ setbc_op(ip, BC_UCLO); /* Turn into UCLO. */ setbc_j(ip, NO_JMP); } } /* Resolve pending forward gotos for label. */ static void gola_resolve(LexState *ls, FuncScope *bl, MSize idx) { VarInfo *vg = ls->vstack + bl->vstart; VarInfo *vl = ls->vstack + idx; for (; vg < vl; vg++) if (gcrefeq(vg->name, vl->name) && gola_isgoto(vg)) { if (vg->slot < vl->slot) { GCstr *name = strref(var_get(ls, ls->fs, vg->slot).name); lua_assert((uintptr_t)name >= VARNAME__MAX); ls->linenumber = ls->fs->bcbase[vg->startpc].line; lua_assert(strref(vg->name) != NAME_BREAK); lj_lex_error(ls, 0, LJ_ERR_XGSCOPE, strdata(strref(vg->name)), strdata(name)); } gola_patch(ls, vg, vl); } } /* Fixup remaining gotos and labels for scope. */ static void gola_fixup(LexState *ls, FuncScope *bl) { VarInfo *v = ls->vstack + bl->vstart; VarInfo *ve = ls->vstack + ls->vtop; for (; v < ve; v++) { GCstr *name = strref(v->name); if (name != NULL) { /* Only consider remaining valid gotos/labels. */ if (gola_islabel(v)) { VarInfo *vg; setgcrefnull(v->name); /* Invalidate label that goes out of scope. */ for (vg = v+1; vg < ve; vg++) /* Resolve pending backward gotos. */ if (strref(vg->name) == name && gola_isgoto(vg)) { if ((bl->flags&FSCOPE_UPVAL) && vg->slot > v->slot) gola_close(ls, vg); gola_patch(ls, vg, v); } } else if (gola_isgoto(v)) { if (bl->prev) { /* Propagate goto or break to outer scope. */ bl->prev->flags |= name == NAME_BREAK ? FSCOPE_BREAK : FSCOPE_GOLA; v->slot = bl->nactvar; if ((bl->flags & FSCOPE_UPVAL)) gola_close(ls, v); } else { /* No outer scope: undefined goto label or no loop. */ ls->linenumber = ls->fs->bcbase[v->startpc].line; if (name == NAME_BREAK) lj_lex_error(ls, 0, LJ_ERR_XBREAK); else lj_lex_error(ls, 0, LJ_ERR_XLUNDEF, strdata(name)); } } } } } /* Find existing label. */ static VarInfo *gola_findlabel(LexState *ls, GCstr *name) { VarInfo *v = ls->vstack + ls->fs->bl->vstart; VarInfo *ve = ls->vstack + ls->vtop; for (; v < ve; v++) if (strref(v->name) == name && gola_islabel(v)) return v; return NULL; } /* -- Scope handling ------------------------------------------------------ */ /* Begin a scope. */ static void fscope_begin(FuncState *fs, FuncScope *bl, int flags) { bl->nactvar = (uint8_t)fs->nactvar; bl->flags = flags; bl->vstart = fs->ls->vtop; bl->prev = fs->bl; fs->bl = bl; lua_assert(fs->freereg == fs->nactvar); } /* End a scope. */ static void fscope_end(FuncState *fs) { FuncScope *bl = fs->bl; LexState *ls = fs->ls; fs->bl = bl->prev; var_remove(ls, bl->nactvar); fs->freereg = fs->nactvar; lua_assert(bl->nactvar == fs->nactvar); if ((bl->flags & (FSCOPE_UPVAL|FSCOPE_NOCLOSE)) == FSCOPE_UPVAL) bcemit_AJ(fs, BC_UCLO, bl->nactvar, 0); if ((bl->flags & FSCOPE_BREAK)) { if ((bl->flags & FSCOPE_LOOP)) { MSize idx = gola_new(ls, NAME_BREAK, VSTACK_LABEL, fs->pc); ls->vtop = idx; /* Drop break label immediately. */ gola_resolve(ls, bl, idx); return; } /* else: need the fixup step to propagate the breaks. */ } else if (!(bl->flags & FSCOPE_GOLA)) { return; } gola_fixup(ls, bl); } /* Mark scope as having an upvalue. */ static void fscope_uvmark(FuncState *fs, BCReg level) { FuncScope *bl; for (bl = fs->bl; bl && bl->nactvar > level; bl = bl->prev) ; if (bl) bl->flags |= FSCOPE_UPVAL; } /* -- Function state management ------------------------------------------- */ /* Fixup bytecode for prototype. */ static void fs_fixup_bc(FuncState *fs, GCproto *pt, BCIns *bc, MSize n) { BCInsLine *base = fs->bcbase; MSize i; pt->sizebc = n; bc[0] = BCINS_AD((fs->flags & PROTO_VARARG) ? BC_FUNCV : BC_FUNCF, fs->framesize, 0); for (i = 1; i < n; i++) bc[i] = base[i].ins; } /* Fixup upvalues for child prototype, step #2. */ static void fs_fixup_uv2(FuncState *fs, GCproto *pt) { VarInfo *vstack = fs->ls->vstack; uint16_t *uv = proto_uv(pt); MSize i, n = pt->sizeuv; for (i = 0; i < n; i++) { VarIndex vidx = uv[i]; if (vidx >= LJ_MAX_VSTACK) uv[i] = vidx - LJ_MAX_VSTACK; else if ((vstack[vidx].info & VSTACK_VAR_RW)) uv[i] = vstack[vidx].slot | PROTO_UV_LOCAL; else uv[i] = vstack[vidx].slot | PROTO_UV_LOCAL | PROTO_UV_IMMUTABLE; } } /* Fixup constants for prototype. */ static void fs_fixup_k(FuncState *fs, GCproto *pt, void *kptr) { GCtab *kt; TValue *array; Node *node; MSize i, hmask; checklimitgt(fs, fs->nkn, BCMAX_D+1, "constants"); checklimitgt(fs, fs->nkgc, BCMAX_D+1, "constants"); setmref(pt->k, kptr); pt->sizekn = fs->nkn; pt->sizekgc = fs->nkgc; kt = fs->kt; array = tvref(kt->array); for (i = 0; i < kt->asize; i++) if (tvhaskslot(&array[i])) { TValue *tv = &((TValue *)kptr)[tvkslot(&array[i])]; if (LJ_DUALNUM) setintV(tv, (int32_t)i); else setnumV(tv, (lua_Number)i); } node = noderef(kt->node); hmask = kt->hmask; for (i = 0; i <= hmask; i++) { Node *n = &node[i]; if (tvhaskslot(&n->val)) { ptrdiff_t kidx = (ptrdiff_t)tvkslot(&n->val); lua_assert(!tvisint(&n->key)); if (tvisnum(&n->key)) { TValue *tv = &((TValue *)kptr)[kidx]; if (LJ_DUALNUM) { lua_Number nn = numV(&n->key); int32_t k = lj_num2int(nn); lua_assert(!tvismzero(&n->key)); if ((lua_Number)k == nn) setintV(tv, k); else *tv = n->key; } else { *tv = n->key; } } else { GCobj *o = gcV(&n->key); setgcref(((GCRef *)kptr)[~kidx], o); lj_gc_objbarrier(fs->L, pt, o); if (tvisproto(&n->key)) fs_fixup_uv2(fs, gco2pt(o)); } } } } /* Fixup upvalues for prototype, step #1. */ static void fs_fixup_uv1(FuncState *fs, GCproto *pt, uint16_t *uv) { setmref(pt->uv, uv); pt->sizeuv = fs->nuv; memcpy(uv, fs->uvtmp, fs->nuv*sizeof(VarIndex)); } #ifndef LUAJIT_DISABLE_DEBUGINFO /* Prepare lineinfo for prototype. */ static size_t fs_prep_line(FuncState *fs, BCLine numline) { return (fs->pc-1) << (numline < 256 ? 0 : numline < 65536 ? 1 : 2); } /* Fixup lineinfo for prototype. */ static void fs_fixup_line(FuncState *fs, GCproto *pt, void *lineinfo, BCLine numline) { BCInsLine *base = fs->bcbase + 1; BCLine first = fs->linedefined; MSize i = 0, n = fs->pc-1; pt->firstline = fs->linedefined; pt->numline = numline; setmref(pt->lineinfo, lineinfo); if (LJ_LIKELY(numline < 256)) { uint8_t *li = (uint8_t *)lineinfo; do { BCLine delta = base[i].line - first; lua_assert(delta >= 0 && delta < 256); li[i] = (uint8_t)delta; } while (++i < n); } else if (LJ_LIKELY(numline < 65536)) { uint16_t *li = (uint16_t *)lineinfo; do { BCLine delta = base[i].line - first; lua_assert(delta >= 0 && delta < 65536); li[i] = (uint16_t)delta; } while (++i < n); } else { uint32_t *li = (uint32_t *)lineinfo; do { BCLine delta = base[i].line - first; lua_assert(delta >= 0); li[i] = (uint32_t)delta; } while (++i < n); } } /* Resize buffer if needed. */ static LJ_NOINLINE void fs_buf_resize(LexState *ls, MSize len) { MSize sz = ls->sb.sz * 2; while (ls->sb.n + len > sz) sz = sz * 2; lj_str_resizebuf(ls->L, &ls->sb, sz); } static LJ_AINLINE void fs_buf_need(LexState *ls, MSize len) { if (LJ_UNLIKELY(ls->sb.n + len > ls->sb.sz)) fs_buf_resize(ls, len); } /* Add string to buffer. */ static void fs_buf_str(LexState *ls, const char *str, MSize len) { char *p = ls->sb.buf + ls->sb.n; MSize i; ls->sb.n += len; for (i = 0; i < len; i++) p[i] = str[i]; } /* Add ULEB128 value to buffer. */ static void fs_buf_uleb128(LexState *ls, uint32_t v) { MSize n = ls->sb.n; uint8_t *p = (uint8_t *)ls->sb.buf; for (; v >= 0x80; v >>= 7) p[n++] = (uint8_t)((v & 0x7f) | 0x80); p[n++] = (uint8_t)v; ls->sb.n = n; } /* Prepare variable info for prototype. */ static size_t fs_prep_var(LexState *ls, FuncState *fs, size_t *ofsvar) { VarInfo *vs =ls->vstack, *ve; MSize i, n; BCPos lastpc; lj_str_resetbuf(&ls->sb); /* Copy to temp. string buffer. */ /* Store upvalue names. */ for (i = 0, n = fs->nuv; i < n; i++) { GCstr *s = strref(vs[fs->uvmap[i]].name); MSize len = s->len+1; fs_buf_need(ls, len); fs_buf_str(ls, strdata(s), len); } *ofsvar = ls->sb.n; lastpc = 0; /* Store local variable names and compressed ranges. */ for (ve = vs + ls->vtop, vs += fs->vbase; vs < ve; vs++) { if (!gola_isgotolabel(vs)) { GCstr *s = strref(vs->name); BCPos startpc; if ((uintptr_t)s < VARNAME__MAX) { fs_buf_need(ls, 1 + 2*5); ls->sb.buf[ls->sb.n++] = (uint8_t)(uintptr_t)s; } else { MSize len = s->len+1; fs_buf_need(ls, len + 2*5); fs_buf_str(ls, strdata(s), len); } startpc = vs->startpc; fs_buf_uleb128(ls, startpc-lastpc); fs_buf_uleb128(ls, vs->endpc-startpc); lastpc = startpc; } } fs_buf_need(ls, 1); ls->sb.buf[ls->sb.n++] = '\0'; /* Terminator for varinfo. */ return ls->sb.n; } /* Fixup variable info for prototype. */ static void fs_fixup_var(LexState *ls, GCproto *pt, uint8_t *p, size_t ofsvar) { setmref(pt->uvinfo, p); setmref(pt->varinfo, (char *)p + ofsvar); memcpy(p, ls->sb.buf, ls->sb.n); /* Copy from temp. string buffer. */ } #else /* Initialize with empty debug info, if disabled. */ #define fs_prep_line(fs, numline) (UNUSED(numline), 0) #define fs_fixup_line(fs, pt, li, numline) \ pt->firstline = pt->numline = 0, setmref((pt)->lineinfo, NULL) #define fs_prep_var(ls, fs, ofsvar) (UNUSED(ofsvar), 0) #define fs_fixup_var(ls, pt, p, ofsvar) \ setmref((pt)->uvinfo, NULL), setmref((pt)->varinfo, NULL) #endif /* Check if bytecode op returns. */ static int bcopisret(BCOp op) { switch (op) { case BC_CALLMT: case BC_CALLT: case BC_RETM: case BC_RET: case BC_RET0: case BC_RET1: return 1; default: return 0; } } /* Fixup return instruction for prototype. */ static void fs_fixup_ret(FuncState *fs) { BCPos lastpc = fs->pc; if (lastpc <= fs->lasttarget || !bcopisret(bc_op(fs->bcbase[lastpc-1].ins))) { if ((fs->bl->flags & FSCOPE_UPVAL)) bcemit_AJ(fs, BC_UCLO, 0, 0); bcemit_AD(fs, BC_RET0, 0, 1); /* Need final return. */ } fs->bl->flags |= FSCOPE_NOCLOSE; /* Handled above. */ fscope_end(fs); lua_assert(fs->bl == NULL); /* May need to fixup returns encoded before first function was created. */ if (fs->flags & PROTO_FIXUP_RETURN) { BCPos pc; for (pc = 1; pc < lastpc; pc++) { BCIns ins = fs->bcbase[pc].ins; BCPos offset; switch (bc_op(ins)) { case BC_CALLMT: case BC_CALLT: case BC_RETM: case BC_RET: case BC_RET0: case BC_RET1: offset = bcemit_INS(fs, ins); /* Copy original instruction. */ fs->bcbase[offset].line = fs->bcbase[pc].line; offset = offset-(pc+1)+BCBIAS_J; if (offset > BCMAX_D) err_syntax(fs->ls, LJ_ERR_XFIXUP); /* Replace with UCLO plus branch. */ fs->bcbase[pc].ins = BCINS_AD(BC_UCLO, 0, offset); break; case BC_UCLO: return; /* We're done. */ default: break; } } } } /* Finish a FuncState and return the new prototype. */ static GCproto *fs_finish(LexState *ls, BCLine line) { lua_State *L = ls->L; FuncState *fs = ls->fs; BCLine numline = line - fs->linedefined; size_t sizept, ofsk, ofsuv, ofsli, ofsdbg, ofsvar; GCproto *pt; /* Apply final fixups. */ fs_fixup_ret(fs); /* Calculate total size of prototype including all colocated arrays. */ sizept = sizeof(GCproto) + fs->pc*sizeof(BCIns) + fs->nkgc*sizeof(GCRef); sizept = (sizept + sizeof(TValue)-1) & ~(sizeof(TValue)-1); ofsk = sizept; sizept += fs->nkn*sizeof(TValue); ofsuv = sizept; sizept += ((fs->nuv+1)&~1)*2; ofsli = sizept; sizept += fs_prep_line(fs, numline); ofsdbg = sizept; sizept += fs_prep_var(ls, fs, &ofsvar); /* Allocate prototype and initialize its fields. */ pt = (GCproto *)lj_mem_newgco(L, (MSize)sizept); pt->gct = ~LJ_TPROTO; pt->sizept = (MSize)sizept; pt->trace = 0; pt->flags = (uint8_t)(fs->flags & ~(PROTO_HAS_RETURN|PROTO_FIXUP_RETURN)); pt->numparams = fs->numparams; pt->framesize = fs->framesize; setgcref(pt->chunkname, obj2gco(ls->chunkname)); /* Close potentially uninitialized gap between bc and kgc. */ *(uint32_t *)((char *)pt + ofsk - sizeof(GCRef)*(fs->nkgc+1)) = 0; fs_fixup_bc(fs, pt, (BCIns *)((char *)pt + sizeof(GCproto)), fs->pc); fs_fixup_k(fs, pt, (void *)((char *)pt + ofsk)); fs_fixup_uv1(fs, pt, (uint16_t *)((char *)pt + ofsuv)); fs_fixup_line(fs, pt, (void *)((char *)pt + ofsli), numline); fs_fixup_var(ls, pt, (uint8_t *)((char *)pt + ofsdbg), ofsvar); lj_vmevent_send(L, BC, setprotoV(L, L->top++, pt); ); L->top--; /* Pop table of constants. */ ls->vtop = fs->vbase; /* Reset variable stack. */ ls->fs = fs->prev; lua_assert(ls->fs != NULL || ls->token == TK_eof); return pt; } /* Initialize a new FuncState. */ static void fs_init(LexState *ls, FuncState *fs) { lua_State *L = ls->L; fs->prev = ls->fs; ls->fs = fs; /* Append to list. */ fs->ls = ls; fs->vbase = ls->vtop; fs->L = L; fs->pc = 0; fs->lasttarget = 0; fs->jpc = NO_JMP; fs->freereg = 0; fs->nkgc = 0; fs->nkn = 0; fs->nactvar = 0; fs->nuv = 0; fs->bl = NULL; fs->flags = 0; fs->framesize = 1; /* Minimum frame size. */ fs->kt = lj_tab_new(L, 0, 0); /* Anchor table of constants in stack to avoid being collected. */ settabV(L, L->top, fs->kt); incr_top(L); } /* -- Expressions --------------------------------------------------------- */ /* Forward declaration. */ static void expr(LexState *ls, ExpDesc *v); /* Return string expression. */ static void expr_str(LexState *ls, ExpDesc *e) { expr_init(e, VKSTR, 0); e->u.sval = lex_str(ls); } /* Return index expression. */ static void expr_index(FuncState *fs, ExpDesc *t, ExpDesc *e) { /* Already called: expr_toval(fs, e). */ t->k = VINDEXED; if (expr_isnumk(e)) { #if LJ_DUALNUM if (tvisint(expr_numtv(e))) { int32_t k = intV(expr_numtv(e)); if (checku8(k)) { t->u.s.aux = BCMAX_C+1+(uint32_t)k; /* 256..511: const byte key */ return; } } #else lua_Number n = expr_numberV(e); int32_t k = lj_num2int(n); if (checku8(k) && n == (lua_Number)k) { t->u.s.aux = BCMAX_C+1+(uint32_t)k; /* 256..511: const byte key */ return; } #endif } else if (expr_isstrk(e)) { BCReg idx = const_str(fs, e); if (idx <= BCMAX_C) { t->u.s.aux = ~idx; /* -256..-1: const string key */ return; } } t->u.s.aux = expr_toanyreg(fs, e); /* 0..255: register */ } /* Parse index expression with named field. */ static void expr_field(LexState *ls, ExpDesc *v) { FuncState *fs = ls->fs; ExpDesc key; expr_toanyreg(fs, v); lj_lex_next(ls); /* Skip dot or colon. */ expr_str(ls, &key); expr_index(fs, v, &key); } /* Parse index expression with brackets. */ static void expr_bracket(LexState *ls, ExpDesc *v) { lj_lex_next(ls); /* Skip '['. */ expr(ls, v); expr_toval(ls->fs, v); lex_check(ls, ']'); } /* Get value of constant expression. */ static void expr_kvalue(TValue *v, ExpDesc *e) { if (e->k <= VKTRUE) { setitype(v, ~(uint32_t)e->k); } else if (e->k == VKSTR) { setgcref(v->gcr, obj2gco(e->u.sval)); setitype(v, LJ_TSTR); } else { lua_assert(tvisnumber(expr_numtv(e))); *v = *expr_numtv(e); } } /* Parse table constructor expression. */ static void expr_table(LexState *ls, ExpDesc *e) { FuncState *fs = ls->fs; BCLine line = ls->linenumber; GCtab *t = NULL; int vcall = 0, needarr = 0, fixt = 0; uint32_t narr = 1; /* First array index. */ uint32_t nhash = 0; /* Number of hash entries. */ BCReg freg = fs->freereg; BCPos pc = bcemit_AD(fs, BC_TNEW, freg, 0); expr_init(e, VNONRELOC, freg); bcreg_reserve(fs, 1); freg++; lex_check(ls, '{'); while (ls->token != '}') { ExpDesc key, val; vcall = 0; if (ls->token == '[') { expr_bracket(ls, &key); /* Already calls expr_toval. */ if (!expr_isk(&key)) expr_index(fs, e, &key); if (expr_isnumk(&key) && expr_numiszero(&key)) needarr = 1; else nhash++; lex_check(ls, '='); } else if ((ls->token == TK_name || (!LJ_52 && ls->token == TK_goto)) && lj_lex_lookahead(ls) == '=') { expr_str(ls, &key); lex_check(ls, '='); nhash++; } else { expr_init(&key, VKNUM, 0); setintV(&key.u.nval, (int)narr); narr++; needarr = vcall = 1; } expr(ls, &val); if (expr_isk(&key) && key.k != VKNIL && (key.k == VKSTR || expr_isk_nojump(&val))) { TValue k, *v; if (!t) { /* Create template table on demand. */ BCReg kidx; t = lj_tab_new(fs->L, needarr ? narr : 0, hsize2hbits(nhash)); kidx = const_gc(fs, obj2gco(t), LJ_TTAB); fs->bcbase[pc].ins = BCINS_AD(BC_TDUP, freg-1, kidx); } vcall = 0; expr_kvalue(&k, &key); v = lj_tab_set(fs->L, t, &k); lj_gc_anybarriert(fs->L, t); if (expr_isk_nojump(&val)) { /* Add const key/value to template table. */ expr_kvalue(v, &val); } else { /* Otherwise create dummy string key (avoids lj_tab_newkey). */ settabV(fs->L, v, t); /* Preserve key with table itself as value. */ fixt = 1; /* Fix this later, after all resizes. */ goto nonconst; } } else { nonconst: if (val.k != VCALL) { expr_toanyreg(fs, &val); vcall = 0; } if (expr_isk(&key)) expr_index(fs, e, &key); bcemit_store(fs, e, &val); } fs->freereg = freg; if (!lex_opt(ls, ',') && !lex_opt(ls, ';')) break; } lex_match(ls, '}', '{', line); if (vcall) { BCInsLine *ilp = &fs->bcbase[fs->pc-1]; ExpDesc en; lua_assert(bc_a(ilp->ins) == freg && bc_op(ilp->ins) == (narr > 256 ? BC_TSETV : BC_TSETB)); expr_init(&en, VKNUM, 0); en.u.nval.u32.lo = narr-1; en.u.nval.u32.hi = 0x43300000; /* Biased integer to avoid denormals. */ if (narr > 256) { fs->pc--; ilp--; } ilp->ins = BCINS_AD(BC_TSETM, freg, const_num(fs, &en)); setbc_b(&ilp[-1].ins, 0); } if (pc == fs->pc-1) { /* Make expr relocable if possible. */ e->u.s.info = pc; fs->freereg--; e->k = VRELOCABLE; } else { e->k = VNONRELOC; /* May have been changed by expr_index. */ } if (!t) { /* Construct TNEW RD: hhhhhaaaaaaaaaaa. */ BCIns *ip = &fs->bcbase[pc].ins; if (!needarr) narr = 0; else if (narr < 3) narr = 3; else if (narr > 0x7ff) narr = 0x7ff; setbc_d(ip, narr|(hsize2hbits(nhash)<<11)); } else { if (needarr && t->asize < narr) lj_tab_reasize(fs->L, t, narr-1); if (fixt) { /* Fix value for dummy keys in template table. */ Node *node = noderef(t->node); uint32_t i, hmask = t->hmask; for (i = 0; i <= hmask; i++) { Node *n = &node[i]; if (tvistab(&n->val)) { lua_assert(tabV(&n->val) == t); setnilV(&n->val); /* Turn value into nil. */ } } } lj_gc_check(fs->L); } } /* Parse function parameters. */ static BCReg parse_params(LexState *ls, int needself) { FuncState *fs = ls->fs; BCReg nparams = 0; lex_check(ls, '('); if (needself) var_new_lit(ls, nparams++, "self"); if (ls->token != ')') { do { if (ls->token == TK_name || (!LJ_52 && ls->token == TK_goto)) { var_new(ls, nparams++, lex_str(ls)); } else if (ls->token == TK_dots) { lj_lex_next(ls); fs->flags |= PROTO_VARARG; break; } else { err_syntax(ls, LJ_ERR_XPARAM); } } while (lex_opt(ls, ',')); } var_add(ls, nparams); lua_assert(fs->nactvar == nparams); bcreg_reserve(fs, nparams); lex_check(ls, ')'); return nparams; } /* Forward declaration. */ static void parse_chunk(LexState *ls); /* Parse body of a function. */ static void parse_body(LexState *ls, ExpDesc *e, int needself, BCLine line) { FuncState fs, *pfs = ls->fs; FuncScope bl; GCproto *pt; ptrdiff_t oldbase = pfs->bcbase - ls->bcstack; fs_init(ls, &fs); fscope_begin(&fs, &bl, 0); fs.linedefined = line; fs.numparams = (uint8_t)parse_params(ls, needself); fs.bcbase = pfs->bcbase + pfs->pc; fs.bclim = pfs->bclim - pfs->pc; bcemit_AD(&fs, BC_FUNCF, 0, 0); /* Placeholder. */ parse_chunk(ls); if (ls->token != TK_end) lex_match(ls, TK_end, TK_function, line); pt = fs_finish(ls, (ls->lastline = ls->linenumber)); pfs->bcbase = ls->bcstack + oldbase; /* May have been reallocated. */ pfs->bclim = (BCPos)(ls->sizebcstack - oldbase); /* Store new prototype in the constant array of the parent. */ expr_init(e, VRELOCABLE, bcemit_AD(pfs, BC_FNEW, 0, const_gc(pfs, obj2gco(pt), LJ_TPROTO))); #if LJ_HASFFI pfs->flags |= (fs.flags & PROTO_FFI); #endif if (!(pfs->flags & PROTO_CHILD)) { if (pfs->flags & PROTO_HAS_RETURN) pfs->flags |= PROTO_FIXUP_RETURN; pfs->flags |= PROTO_CHILD; } lj_lex_next(ls); } /* Parse expression list. Last expression is left open. */ static BCReg expr_list(LexState *ls, ExpDesc *v) { BCReg n = 1; expr(ls, v); while (lex_opt(ls, ',')) { expr_tonextreg(ls->fs, v); expr(ls, v); n++; } return n; } /* Parse function argument list. */ static void parse_args(LexState *ls, ExpDesc *e) { FuncState *fs = ls->fs; ExpDesc args; BCIns ins; BCReg base; BCLine line = ls->linenumber; if (ls->token == '(') { #if !LJ_52 if (line != ls->lastline) err_syntax(ls, LJ_ERR_XAMBIG); #endif lj_lex_next(ls); if (ls->token == ')') { /* f(). */ args.k = VVOID; } else { expr_list(ls, &args); if (args.k == VCALL) /* f(a, b, g()) or f(a, b, ...). */ setbc_b(bcptr(fs, &args), 0); /* Pass on multiple results. */ } lex_match(ls, ')', '(', line); } else if (ls->token == '{') { expr_table(ls, &args); } else if (ls->token == TK_string) { expr_init(&args, VKSTR, 0); args.u.sval = strV(&ls->tokenval); lj_lex_next(ls); } else { err_syntax(ls, LJ_ERR_XFUNARG); return; /* Silence compiler. */ } lua_assert(e->k == VNONRELOC); base = e->u.s.info; /* Base register for call. */ if (args.k == VCALL) { ins = BCINS_ABC(BC_CALLM, base, 2, args.u.s.aux - base - 1); } else { if (args.k != VVOID) expr_tonextreg(fs, &args); ins = BCINS_ABC(BC_CALL, base, 2, fs->freereg - base); } expr_init(e, VCALL, bcemit_INS(fs, ins)); e->u.s.aux = base; fs->bcbase[fs->pc - 1].line = line; fs->freereg = base+1; /* Leave one result by default. */ } /* Parse primary expression. */ static void expr_primary(LexState *ls, ExpDesc *v) { FuncState *fs = ls->fs; /* Parse prefix expression. */ if (ls->token == '(') { BCLine line = ls->linenumber; lj_lex_next(ls); expr(ls, v); lex_match(ls, ')', '(', line); expr_discharge(ls->fs, v); } else if (ls->token == TK_name || (!LJ_52 && ls->token == TK_goto)) { var_lookup(ls, v); } else { err_syntax(ls, LJ_ERR_XSYMBOL); } for (;;) { /* Parse multiple expression suffixes. */ if (ls->token == '.') { expr_field(ls, v); } else if (ls->token == '[') { ExpDesc key; expr_toanyreg(fs, v); expr_bracket(ls, &key); expr_index(fs, v, &key); } else if (ls->token == ':') { ExpDesc key; lj_lex_next(ls); expr_str(ls, &key); bcemit_method(fs, v, &key); parse_args(ls, v); } else if (ls->token == '(' || ls->token == TK_string || ls->token == '{') { expr_tonextreg(fs, v); parse_args(ls, v); } else { break; } } } /* Parse simple expression. */ static void expr_simple(LexState *ls, ExpDesc *v) { switch (ls->token) { case TK_number: expr_init(v, (LJ_HASFFI && tviscdata(&ls->tokenval)) ? VKCDATA : VKNUM, 0); copyTV(ls->L, &v->u.nval, &ls->tokenval); break; case TK_string: expr_init(v, VKSTR, 0); v->u.sval = strV(&ls->tokenval); break; case TK_nil: expr_init(v, VKNIL, 0); break; case TK_true: expr_init(v, VKTRUE, 0); break; case TK_false: expr_init(v, VKFALSE, 0); break; case TK_dots: { /* Vararg. */ FuncState *fs = ls->fs; BCReg base; checkcond(ls, fs->flags & PROTO_VARARG, LJ_ERR_XDOTS); bcreg_reserve(fs, 1); base = fs->freereg-1; expr_init(v, VCALL, bcemit_ABC(fs, BC_VARG, base, 2, fs->numparams)); v->u.s.aux = base; break; } case '{': /* Table constructor. */ expr_table(ls, v); return; case TK_function: lj_lex_next(ls); parse_body(ls, v, 0, ls->linenumber); return; default: expr_primary(ls, v); return; } lj_lex_next(ls); } /* Manage syntactic levels to avoid blowing up the stack. */ static void synlevel_begin(LexState *ls) { if (++ls->level >= LJ_MAX_XLEVEL) lj_lex_error(ls, 0, LJ_ERR_XLEVELS); } #define synlevel_end(ls) ((ls)->level--) /* Convert token to binary operator. */ static BinOpr token2binop(LexToken tok) { switch (tok) { case '+': return OPR_ADD; case '-': return OPR_SUB; case '*': return OPR_MUL; case '/': return OPR_DIV; case '%': return OPR_MOD; case '^': return OPR_POW; case TK_concat: return OPR_CONCAT; case TK_ne: return OPR_NE; case TK_eq: return OPR_EQ; case '<': return OPR_LT; case TK_le: return OPR_LE; case '>': return OPR_GT; case TK_ge: return OPR_GE; case TK_and: return OPR_AND; case TK_or: return OPR_OR; default: return OPR_NOBINOPR; } } /* Priorities for each binary operator. ORDER OPR. */ static const struct { uint8_t left; /* Left priority. */ uint8_t right; /* Right priority. */ } priority[] = { {6,6}, {6,6}, {7,7}, {7,7}, {7,7}, /* ADD SUB MUL DIV MOD */ {10,9}, {5,4}, /* POW CONCAT (right associative) */ {3,3}, {3,3}, /* EQ NE */ {3,3}, {3,3}, {3,3}, {3,3}, /* LT GE GT LE */ {2,2}, {1,1} /* AND OR */ }; #define UNARY_PRIORITY 8 /* Priority for unary operators. */ /* Forward declaration. */ static BinOpr expr_binop(LexState *ls, ExpDesc *v, uint32_t limit); /* Parse unary expression. */ static void expr_unop(LexState *ls, ExpDesc *v) { BCOp op; if (ls->token == TK_not) { op = BC_NOT; } else if (ls->token == '-') { op = BC_UNM; } else if (ls->token == '#') { op = BC_LEN; } else { expr_simple(ls, v); return; } lj_lex_next(ls); expr_binop(ls, v, UNARY_PRIORITY); bcemit_unop(ls->fs, op, v); } /* Parse binary expressions with priority higher than the limit. */ static BinOpr expr_binop(LexState *ls, ExpDesc *v, uint32_t limit) { BinOpr op; synlevel_begin(ls); expr_unop(ls, v); op = token2binop(ls->token); while (op != OPR_NOBINOPR && priority[op].left > limit) { ExpDesc v2; BinOpr nextop; lj_lex_next(ls); bcemit_binop_left(ls->fs, op, v); /* Parse binary expression with higher priority. */ nextop = expr_binop(ls, &v2, priority[op].right); bcemit_binop(ls->fs, op, v, &v2); op = nextop; } synlevel_end(ls); return op; /* Return unconsumed binary operator (if any). */ } /* Parse expression. */ static void expr(LexState *ls, ExpDesc *v) { expr_binop(ls, v, 0); /* Priority 0: parse whole expression. */ } /* Assign expression to the next register. */ static void expr_next(LexState *ls) { ExpDesc e; expr(ls, &e); expr_tonextreg(ls->fs, &e); } /* Parse conditional expression. */ static BCPos expr_cond(LexState *ls) { ExpDesc v; expr(ls, &v); if (v.k == VKNIL) v.k = VKFALSE; bcemit_branch_t(ls->fs, &v); return v.f; } /* -- Assignments --------------------------------------------------------- */ /* List of LHS variables. */ typedef struct LHSVarList { ExpDesc v; /* LHS variable. */ struct LHSVarList *prev; /* Link to previous LHS variable. */ } LHSVarList; /* Eliminate write-after-read hazards for local variable assignment. */ static void assign_hazard(LexState *ls, LHSVarList *lh, const ExpDesc *v) { FuncState *fs = ls->fs; BCReg reg = v->u.s.info; /* Check against this variable. */ BCReg tmp = fs->freereg; /* Rename to this temp. register (if needed). */ int hazard = 0; for (; lh; lh = lh->prev) { if (lh->v.k == VINDEXED) { if (lh->v.u.s.info == reg) { /* t[i], t = 1, 2 */ hazard = 1; lh->v.u.s.info = tmp; } if (lh->v.u.s.aux == reg) { /* t[i], i = 1, 2 */ hazard = 1; lh->v.u.s.aux = tmp; } } } if (hazard) { bcemit_AD(fs, BC_MOV, tmp, reg); /* Rename conflicting variable. */ bcreg_reserve(fs, 1); } } /* Adjust LHS/RHS of an assignment. */ static void assign_adjust(LexState *ls, BCReg nvars, BCReg nexps, ExpDesc *e) { FuncState *fs = ls->fs; int32_t extra = (int32_t)nvars - (int32_t)nexps; if (e->k == VCALL) { extra++; /* Compensate for the VCALL itself. */ if (extra < 0) extra = 0; setbc_b(bcptr(fs, e), extra+1); /* Fixup call results. */ if (extra > 1) bcreg_reserve(fs, (BCReg)extra-1); } else { if (e->k != VVOID) expr_tonextreg(fs, e); /* Close last expression. */ if (extra > 0) { /* Leftover LHS are set to nil. */ BCReg reg = fs->freereg; bcreg_reserve(fs, (BCReg)extra); bcemit_nil(fs, reg, (BCReg)extra); } } } /* Recursively parse assignment statement. */ static void parse_assignment(LexState *ls, LHSVarList *lh, BCReg nvars) { ExpDesc e; checkcond(ls, VLOCAL <= lh->v.k && lh->v.k <= VINDEXED, LJ_ERR_XSYNTAX); if (lex_opt(ls, ',')) { /* Collect LHS list and recurse upwards. */ LHSVarList vl; vl.prev = lh; expr_primary(ls, &vl.v); if (vl.v.k == VLOCAL) assign_hazard(ls, lh, &vl.v); checklimit(ls->fs, ls->level + nvars, LJ_MAX_XLEVEL, "variable names"); parse_assignment(ls, &vl, nvars+1); } else { /* Parse RHS. */ BCReg nexps; lex_check(ls, '='); nexps = expr_list(ls, &e); if (nexps == nvars) { if (e.k == VCALL) { if (bc_op(*bcptr(ls->fs, &e)) == BC_VARG) { /* Vararg assignment. */ ls->fs->freereg--; e.k = VRELOCABLE; } else { /* Multiple call results. */ e.u.s.info = e.u.s.aux; /* Base of call is not relocatable. */ e.k = VNONRELOC; } } bcemit_store(ls->fs, &lh->v, &e); return; } assign_adjust(ls, nvars, nexps, &e); if (nexps > nvars) ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */ } /* Assign RHS to LHS and recurse downwards. */ expr_init(&e, VNONRELOC, ls->fs->freereg-1); bcemit_store(ls->fs, &lh->v, &e); } /* Parse call statement or assignment. */ static void parse_call_assign(LexState *ls) { FuncState *fs = ls->fs; LHSVarList vl; expr_primary(ls, &vl.v); if (vl.v.k == VCALL) { /* Function call statement. */ setbc_b(bcptr(fs, &vl.v), 1); /* No results. */ } else { /* Start of an assignment. */ vl.prev = NULL; parse_assignment(ls, &vl, 1); } } /* Parse 'local' statement. */ static void parse_local(LexState *ls) { if (lex_opt(ls, TK_function)) { /* Local function declaration. */ ExpDesc v, b; FuncState *fs = ls->fs; var_new(ls, 0, lex_str(ls)); expr_init(&v, VLOCAL, fs->freereg); v.u.s.aux = fs->varmap[fs->freereg]; bcreg_reserve(fs, 1); var_add(ls, 1); parse_body(ls, &b, 0, ls->linenumber); /* bcemit_store(fs, &v, &b) without setting VSTACK_VAR_RW. */ expr_free(fs, &b); expr_toreg(fs, &b, v.u.s.info); /* The upvalue is in scope, but the local is only valid after the store. */ var_get(ls, fs, fs->nactvar - 1).startpc = fs->pc; } else { /* Local variable declaration. */ ExpDesc e; BCReg nexps, nvars = 0; do { /* Collect LHS. */ var_new(ls, nvars++, lex_str(ls)); } while (lex_opt(ls, ',')); if (lex_opt(ls, '=')) { /* Optional RHS. */ nexps = expr_list(ls, &e); } else { /* Or implicitly set to nil. */ e.k = VVOID; nexps = 0; } assign_adjust(ls, nvars, nexps, &e); var_add(ls, nvars); } } /* Parse 'function' statement. */ static void parse_func(LexState *ls, BCLine line) { FuncState *fs; ExpDesc v, b; int needself = 0; lj_lex_next(ls); /* Skip 'function'. */ /* Parse function name. */ var_lookup(ls, &v); while (ls->token == '.') /* Multiple dot-separated fields. */ expr_field(ls, &v); if (ls->token == ':') { /* Optional colon to signify method call. */ needself = 1; expr_field(ls, &v); } parse_body(ls, &b, needself, line); fs = ls->fs; bcemit_store(fs, &v, &b); fs->bcbase[fs->pc - 1].line = line; /* Set line for the store. */ } /* -- Control transfer statements ----------------------------------------- */ /* Check for end of block. */ static int endofblock(LexToken token) { switch (token) { case TK_else: case TK_elseif: case TK_end: case TK_until: case TK_eof: return 1; default: return 0; } } /* Parse 'return' statement. */ static void parse_return(LexState *ls) { BCIns ins; FuncState *fs = ls->fs; lj_lex_next(ls); /* Skip 'return'. */ fs->flags |= PROTO_HAS_RETURN; if (endofblock(ls->token) || ls->token == ';') { /* Bare return. */ ins = BCINS_AD(BC_RET0, 0, 1); } else { /* Return with one or more values. */ ExpDesc e; /* Receives the _last_ expression in the list. */ BCReg nret = expr_list(ls, &e); if (nret == 1) { /* Return one result. */ if (e.k == VCALL) { /* Check for tail call. */ BCIns *ip = bcptr(fs, &e); /* It doesn't pay off to add BC_VARGT just for 'return ...'. */ if (bc_op(*ip) == BC_VARG) goto notailcall; fs->pc--; ins = BCINS_AD(bc_op(*ip)-BC_CALL+BC_CALLT, bc_a(*ip), bc_c(*ip)); } else { /* Can return the result from any register. */ ins = BCINS_AD(BC_RET1, expr_toanyreg(fs, &e), 2); } } else { if (e.k == VCALL) { /* Append all results from a call. */ notailcall: setbc_b(bcptr(fs, &e), 0); ins = BCINS_AD(BC_RETM, fs->nactvar, e.u.s.aux - fs->nactvar); } else { expr_tonextreg(fs, &e); /* Force contiguous registers. */ ins = BCINS_AD(BC_RET, fs->nactvar, nret+1); } } } if (fs->flags & PROTO_CHILD) bcemit_AJ(fs, BC_UCLO, 0, 0); /* May need to close upvalues first. */ bcemit_INS(fs, ins); } /* Parse 'break' statement. */ static void parse_break(LexState *ls) { ls->fs->bl->flags |= FSCOPE_BREAK; gola_new(ls, NAME_BREAK, VSTACK_GOTO, bcemit_jmp(ls->fs)); } /* Parse 'goto' statement. */ static void parse_goto(LexState *ls) { FuncState *fs = ls->fs; GCstr *name = lex_str(ls); VarInfo *vl = gola_findlabel(ls, name); if (vl) /* Treat backwards goto within same scope like a loop. */ bcemit_AJ(fs, BC_LOOP, vl->slot, -1); /* No BC range check. */ fs->bl->flags |= FSCOPE_GOLA; gola_new(ls, name, VSTACK_GOTO, bcemit_jmp(fs)); } /* Parse label. */ static void parse_label(LexState *ls) { FuncState *fs = ls->fs; GCstr *name; MSize idx; fs->lasttarget = fs->pc; fs->bl->flags |= FSCOPE_GOLA; lj_lex_next(ls); /* Skip '::'. */ name = lex_str(ls); if (gola_findlabel(ls, name)) lj_lex_error(ls, 0, LJ_ERR_XLDUP, strdata(name)); idx = gola_new(ls, name, VSTACK_LABEL, fs->pc); lex_check(ls, TK_label); /* Recursively parse trailing statements: labels and ';' (Lua 5.2 only). */ for (;;) { if (ls->token == TK_label) { synlevel_begin(ls); parse_label(ls); synlevel_end(ls); } else if (LJ_52 && ls->token == ';') { lj_lex_next(ls); } else { break; } } /* Trailing label is considered to be outside of scope. */ if (endofblock(ls->token) && ls->token != TK_until) ls->vstack[idx].slot = fs->bl->nactvar; gola_resolve(ls, fs->bl, idx); } /* -- Blocks, loops and conditional statements ---------------------------- */ /* Parse a block. */ static void parse_block(LexState *ls) { FuncState *fs = ls->fs; FuncScope bl; fscope_begin(fs, &bl, 0); parse_chunk(ls); fscope_end(fs); } /* Parse 'while' statement. */ static void parse_while(LexState *ls, BCLine line) { FuncState *fs = ls->fs; BCPos start, loop, condexit; FuncScope bl; lj_lex_next(ls); /* Skip 'while'. */ start = fs->lasttarget = fs->pc; condexit = expr_cond(ls); fscope_begin(fs, &bl, FSCOPE_LOOP); lex_check(ls, TK_do); loop = bcemit_AD(fs, BC_LOOP, fs->nactvar, 0); parse_block(ls); jmp_patch(fs, bcemit_jmp(fs), start); lex_match(ls, TK_end, TK_while, line); fscope_end(fs); jmp_tohere(fs, condexit); jmp_patchins(fs, loop, fs->pc); } /* Parse 'repeat' statement. */ static void parse_repeat(LexState *ls, BCLine line) { FuncState *fs = ls->fs; BCPos loop = fs->lasttarget = fs->pc; BCPos condexit; FuncScope bl1, bl2; fscope_begin(fs, &bl1, FSCOPE_LOOP); /* Breakable loop scope. */ fscope_begin(fs, &bl2, 0); /* Inner scope. */ lj_lex_next(ls); /* Skip 'repeat'. */ bcemit_AD(fs, BC_LOOP, fs->nactvar, 0); parse_chunk(ls); lex_match(ls, TK_until, TK_repeat, line); condexit = expr_cond(ls); /* Parse condition (still inside inner scope). */ if (!(bl2.flags & FSCOPE_UPVAL)) { /* No upvalues? Just end inner scope. */ fscope_end(fs); } else { /* Otherwise generate: cond: UCLO+JMP out, !cond: UCLO+JMP loop. */ parse_break(ls); /* Break from loop and close upvalues. */ jmp_tohere(fs, condexit); fscope_end(fs); /* End inner scope and close upvalues. */ condexit = bcemit_jmp(fs); } jmp_patch(fs, condexit, loop); /* Jump backwards if !cond. */ jmp_patchins(fs, loop, fs->pc); fscope_end(fs); /* End loop scope. */ } /* Parse numeric 'for'. */ static void parse_for_num(LexState *ls, GCstr *varname, BCLine line) { FuncState *fs = ls->fs; BCReg base = fs->freereg; FuncScope bl; BCPos loop, loopend; /* Hidden control variables. */ var_new_fixed(ls, FORL_IDX, VARNAME_FOR_IDX); var_new_fixed(ls, FORL_STOP, VARNAME_FOR_STOP); var_new_fixed(ls, FORL_STEP, VARNAME_FOR_STEP); /* Visible copy of index variable. */ var_new(ls, FORL_EXT, varname); lex_check(ls, '='); expr_next(ls); lex_check(ls, ','); expr_next(ls); if (lex_opt(ls, ',')) { expr_next(ls); } else { bcemit_AD(fs, BC_KSHORT, fs->freereg, 1); /* Default step is 1. */ bcreg_reserve(fs, 1); } var_add(ls, 3); /* Hidden control variables. */ lex_check(ls, TK_do); loop = bcemit_AJ(fs, BC_FORI, base, NO_JMP); fscope_begin(fs, &bl, 0); /* Scope for visible variables. */ var_add(ls, 1); bcreg_reserve(fs, 1); parse_block(ls); fscope_end(fs); /* Perform loop inversion. Loop control instructions are at the end. */ loopend = bcemit_AJ(fs, BC_FORL, base, NO_JMP); fs->bcbase[loopend].line = line; /* Fix line for control ins. */ jmp_patchins(fs, loopend, loop+1); jmp_patchins(fs, loop, fs->pc); } /* Try to predict whether the iterator is next() and specialize the bytecode. ** Detecting next() and pairs() by name is simplistic, but quite effective. ** The interpreter backs off if the check for the closure fails at runtime. */ static int predict_next(LexState *ls, FuncState *fs, BCPos pc) { BCIns ins = fs->bcbase[pc].ins; GCstr *name; cTValue *o; switch (bc_op(ins)) { case BC_MOV: name = gco2str(gcref(var_get(ls, fs, bc_d(ins)).name)); break; case BC_UGET: name = gco2str(gcref(ls->vstack[fs->uvmap[bc_d(ins)]].name)); break; case BC_GGET: /* There's no inverse index (yet), so lookup the strings. */ o = lj_tab_getstr(fs->kt, lj_str_newlit(ls->L, "pairs")); if (o && tvhaskslot(o) && tvkslot(o) == bc_d(ins)) return 1; o = lj_tab_getstr(fs->kt, lj_str_newlit(ls->L, "next")); if (o && tvhaskslot(o) && tvkslot(o) == bc_d(ins)) return 1; return 0; default: return 0; } return (name->len == 5 && !strcmp(strdata(name), "pairs")) || (name->len == 4 && !strcmp(strdata(name), "next")); } /* Parse 'for' iterator. */ static void parse_for_iter(LexState *ls, GCstr *indexname) { FuncState *fs = ls->fs; ExpDesc e; BCReg nvars = 0; BCLine line; BCReg base = fs->freereg + 3; BCPos loop, loopend, exprpc = fs->pc; FuncScope bl; int isnext; /* Hidden control variables. */ var_new_fixed(ls, nvars++, VARNAME_FOR_GEN); var_new_fixed(ls, nvars++, VARNAME_FOR_STATE); var_new_fixed(ls, nvars++, VARNAME_FOR_CTL); /* Visible variables returned from iterator. */ var_new(ls, nvars++, indexname); while (lex_opt(ls, ',')) var_new(ls, nvars++, lex_str(ls)); lex_check(ls, TK_in); line = ls->linenumber; assign_adjust(ls, 3, expr_list(ls, &e), &e); bcreg_bump(fs, 3); /* The iterator needs another 3 slots (func + 2 args). */ isnext = (nvars <= 5 && predict_next(ls, fs, exprpc)); var_add(ls, 3); /* Hidden control variables. */ lex_check(ls, TK_do); loop = bcemit_AJ(fs, isnext ? BC_ISNEXT : BC_JMP, base, NO_JMP); fscope_begin(fs, &bl, 0); /* Scope for visible variables. */ var_add(ls, nvars-3); bcreg_reserve(fs, nvars-3); parse_block(ls); fscope_end(fs); /* Perform loop inversion. Loop control instructions are at the end. */ jmp_patchins(fs, loop, fs->pc); bcemit_ABC(fs, isnext ? BC_ITERN : BC_ITERC, base, nvars-3+1, 2+1); loopend = bcemit_AJ(fs, BC_ITERL, base, NO_JMP); fs->bcbase[loopend-1].line = line; /* Fix line for control ins. */ fs->bcbase[loopend].line = line; jmp_patchins(fs, loopend, loop+1); } /* Parse 'for' statement. */ static void parse_for(LexState *ls, BCLine line) { FuncState *fs = ls->fs; GCstr *varname; FuncScope bl; fscope_begin(fs, &bl, FSCOPE_LOOP); lj_lex_next(ls); /* Skip 'for'. */ varname = lex_str(ls); /* Get first variable name. */ if (ls->token == '=') parse_for_num(ls, varname, line); else if (ls->token == ',' || ls->token == TK_in) parse_for_iter(ls, varname); else err_syntax(ls, LJ_ERR_XFOR); lex_match(ls, TK_end, TK_for, line); fscope_end(fs); /* Resolve break list. */ } /* Parse condition and 'then' block. */ static BCPos parse_then(LexState *ls) { BCPos condexit; lj_lex_next(ls); /* Skip 'if' or 'elseif'. */ condexit = expr_cond(ls); lex_check(ls, TK_then); parse_block(ls); return condexit; } /* Parse 'if' statement. */ static void parse_if(LexState *ls, BCLine line) { FuncState *fs = ls->fs; BCPos flist; BCPos escapelist = NO_JMP; flist = parse_then(ls); while (ls->token == TK_elseif) { /* Parse multiple 'elseif' blocks. */ jmp_append(fs, &escapelist, bcemit_jmp(fs)); jmp_tohere(fs, flist); flist = parse_then(ls); } if (ls->token == TK_else) { /* Parse optional 'else' block. */ jmp_append(fs, &escapelist, bcemit_jmp(fs)); jmp_tohere(fs, flist); lj_lex_next(ls); /* Skip 'else'. */ parse_block(ls); } else { jmp_append(fs, &escapelist, flist); } jmp_tohere(fs, escapelist); lex_match(ls, TK_end, TK_if, line); } /* -- Parse statements ---------------------------------------------------- */ /* Parse a statement. Returns 1 if it must be the last one in a chunk. */ static int parse_stmt(LexState *ls) { BCLine line = ls->linenumber; switch (ls->token) { case TK_if: parse_if(ls, line); break; case TK_while: parse_while(ls, line); break; case TK_do: lj_lex_next(ls); parse_block(ls); lex_match(ls, TK_end, TK_do, line); break; case TK_for: parse_for(ls, line); break; case TK_repeat: parse_repeat(ls, line); break; case TK_function: parse_func(ls, line); break; case TK_local: lj_lex_next(ls); parse_local(ls); break; case TK_return: parse_return(ls); return 1; /* Must be last. */ case TK_break: lj_lex_next(ls); parse_break(ls); return !LJ_52; /* Must be last in Lua 5.1. */ #if LJ_52 case ';': lj_lex_next(ls); break; #endif case TK_label: parse_label(ls); break; case TK_goto: if (LJ_52 || lj_lex_lookahead(ls) == TK_name) { lj_lex_next(ls); parse_goto(ls); break; } /* else: fallthrough */ default: parse_call_assign(ls); break; } return 0; } /* A chunk is a list of statements optionally separated by semicolons. */ static void parse_chunk(LexState *ls) { int islast = 0; synlevel_begin(ls); while (!islast && !endofblock(ls->token)) { islast = parse_stmt(ls); lex_opt(ls, ';'); lua_assert(ls->fs->framesize >= ls->fs->freereg && ls->fs->freereg >= ls->fs->nactvar); ls->fs->freereg = ls->fs->nactvar; /* Free registers after each stmt. */ } synlevel_end(ls); } /* Entry point of bytecode parser. */ GCproto *lj_parse(LexState *ls) { FuncState fs; FuncScope bl; GCproto *pt; lua_State *L = ls->L; #ifdef LUAJIT_DISABLE_DEBUGINFO ls->chunkname = lj_str_newlit(L, "="); #else ls->chunkname = lj_str_newz(L, ls->chunkarg); #endif setstrV(L, L->top, ls->chunkname); /* Anchor chunkname string. */ incr_top(L); ls->level = 0; fs_init(ls, &fs); fs.linedefined = 0; fs.numparams = 0; fs.bcbase = NULL; fs.bclim = 0; fs.flags |= PROTO_VARARG; /* Main chunk is always a vararg func. */ fscope_begin(&fs, &bl, 0); bcemit_AD(&fs, BC_FUNCV, 0, 0); /* Placeholder. */ lj_lex_next(ls); /* Read-ahead first token. */ parse_chunk(ls); if (ls->token != TK_eof) err_token(ls, TK_eof); pt = fs_finish(ls, ls->linenumber); L->top--; /* Drop chunkname. */ lua_assert(fs.prev == NULL); lua_assert(ls->fs == NULL); lua_assert(pt->sizeuv == 0); return pt; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/.gitignore0000664000000000000000000000011212202141143022340 0ustar rootrootluajit lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h lj_vm.s tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_tab.o0000664000000000000000000003007012213333050021773 0ustar rootrootELF>@@ UHFuWG#AH@Ht=w%3)1ЋO)#GH@HHPwW)#GH@H'I>1)1ЋO)#GH@H]UHwB,Ёw2*f.z#u!~ BH]UHH]LeLmLuH IAA֍FwA4 H@ @D`H@ CCDcCAEHhC| H@ @@@@@@AEHhCEt7Av LB LCDcEtQAv LDAƍ @LDHRHЉPCADsHH]LeLmLuUHHptDH9wpt.xH IH AA A9s]UH2DND9uvAMI(@tHH9u`MUvGAFUAVBD9uEAv LD [LHRHЉPAFA^uMHRHBB B9sAEHhAFAFU9UE~AVLuDuM$A|$t\HuLI$HH Jv;H9uPAE@(tA9wLuA~MULLAF}D}LuDuH@M$A|$t_IT$HuLI$HH Jv;H9uPAE@(tA9sAEUHRH)P HxLP$AFUAVUuEXH([A\A]A^A_]UHFtȃ]]UHAVAUATSIIHӋRw,ȉ;Ns *f.ztg9t^HLtII~HtAD$I)IAiƫAD$&EvMú{u LAL$9HAt$|2tt H|2te*AD$HHCH P4SJ9uRAE@(9r)AL$9At$HRHփzHRHփzHBHH Hv; q9uIAE@(tHHCH PvcSJ9uRAE@(tG9D! [A\A]A^]UHAWAVAUATSI_v;wC|u.J|ED)ƒwDpAAEfA}uQC$E=v;AAD9v IcAEH DLHtxuEt$rAD9v IcAEH DLHtBxu:G<4AD9v IcAEH DLHtxEDEEEDD)wD[A\A]A^A_]lj_tab.clj_obj.hlj_gc.h(((&n->val)->it) == (~0u))t->hmask != 0kt->asize == t->asize && kt->hmask == t->hmask!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))freenode >= nodebase && freenode <= nodebase+t->hmask+1freenode != &(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))clearhpartlj_tab_dupcopyTVlj_tab_getlj_tab_newkeylj_gc_barrierbacksetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <VAC Q $\QAC T8 _AC Z jAC e $aAC IS  AC C UAC P 0-AC h $PAC I $xAC T (AC Pz yhC L ]AC X ( AC Ms 8 AC [ $XUAC GI (6AC I( .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @% & , 12 C@2PO`YW0`up.  # VQ" ;T m( @R   >_ja%3:hF UUa-cn{[ y< ]4 >U6lj_tab.chashkeycountintnewtab__PRETTY_FUNCTION__.3904__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.4044__PRETTY_FUNCTION__.4062resizetab__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3865lj_mem_newgcolj_err_msglj_mem_realloclj_tab_newlj_tab_new1lj_tab_dup__assert_failmemcpylj_tab_freelj_tab_getinthlj_tab_getstrlj_tab_getlj_obj_equallj_tab_setlj_tab_setstrlj_tab_setinthlj_tab_newkeylj_tab_reasizelj_tab_nextlj_tab_len] M  W \ a    0 "4 > C `H$%"& (   # () . 3 1 @; @ HE W @a f k  (    R"  ' , 5 & &  e o  t 0y    " , 1 56%    0)k#    0"] g  l 0q    0? I  N 0S3e @`>h 4aT|[4 <  <\>tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_asm_arm.h0000664000000000000000000022325412231715321022652 0ustar rootroot/* ** ARM IR assembler (SSA IR -> machine code). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Register allocator extensions --------------------------------------- */ /* Allocate a register with a hint. */ static Reg ra_hintalloc(ASMState *as, IRRef ref, Reg hint, RegSet allow) { Reg r = IR(ref)->r; if (ra_noreg(r)) { if (!ra_hashint(r) && !iscrossref(as, ref)) ra_sethint(IR(ref)->r, hint); /* Propagate register hint. */ r = ra_allocref(as, ref, allow); } ra_noweak(as, r); return r; } /* Allocate a scratch register pair. */ static Reg ra_scratchpair(ASMState *as, RegSet allow) { RegSet pick1 = as->freeset & allow; RegSet pick2 = pick1 & (pick1 >> 1) & RSET_GPREVEN; Reg r; if (pick2) { r = rset_picktop(pick2); } else { RegSet pick = pick1 & (allow >> 1) & RSET_GPREVEN; if (pick) { r = rset_picktop(pick); ra_restore(as, regcost_ref(as->cost[r+1])); } else { pick = pick1 & (allow << 1) & RSET_GPRODD; if (pick) { r = ra_restore(as, regcost_ref(as->cost[rset_picktop(pick)-1])); } else { r = ra_evict(as, allow & (allow >> 1) & RSET_GPREVEN); ra_restore(as, regcost_ref(as->cost[r+1])); } } } lua_assert(rset_test(RSET_GPREVEN, r)); ra_modified(as, r); ra_modified(as, r+1); RA_DBGX((as, "scratchpair $r $r", r, r+1)); return r; } #if !LJ_SOFTFP /* Allocate two source registers for three-operand instructions. */ static Reg ra_alloc2(ASMState *as, IRIns *ir, RegSet allow) { IRIns *irl = IR(ir->op1), *irr = IR(ir->op2); Reg left = irl->r, right = irr->r; if (ra_hasreg(left)) { ra_noweak(as, left); if (ra_noreg(right)) right = ra_allocref(as, ir->op2, rset_exclude(allow, left)); else ra_noweak(as, right); } else if (ra_hasreg(right)) { ra_noweak(as, right); left = ra_allocref(as, ir->op1, rset_exclude(allow, right)); } else if (ra_hashint(right)) { right = ra_allocref(as, ir->op2, allow); left = ra_alloc1(as, ir->op1, rset_exclude(allow, right)); } else { left = ra_allocref(as, ir->op1, allow); right = ra_alloc1(as, ir->op2, rset_exclude(allow, left)); } return left | (right << 8); } #endif /* -- Guard handling ------------------------------------------------------ */ /* Generate an exit stub group at the bottom of the reserved MCode memory. */ static MCode *asm_exitstub_gen(ASMState *as, ExitNo group) { MCode *mxp = as->mcbot; int i; if (mxp + 4*4+4*EXITSTUBS_PER_GROUP >= as->mctop) asm_mclimit(as); /* str lr, [sp]; bl ->vm_exit_handler; .long DISPATCH_address, group. */ *mxp++ = ARMI_STR|ARMI_LS_P|ARMI_LS_U|ARMF_D(RID_LR)|ARMF_N(RID_SP); *mxp = ARMI_BL|((((MCode *)(void *)lj_vm_exit_handler-mxp)-2)&0x00ffffffu); mxp++; *mxp++ = (MCode)i32ptr(J2GG(as->J)->dispatch); /* DISPATCH address */ *mxp++ = group*EXITSTUBS_PER_GROUP; for (i = 0; i < EXITSTUBS_PER_GROUP; i++) *mxp++ = ARMI_B|((-6-i)&0x00ffffffu); lj_mcode_sync(as->mcbot, mxp); lj_mcode_commitbot(as->J, mxp); as->mcbot = mxp; as->mclim = as->mcbot + MCLIM_REDZONE; return mxp - EXITSTUBS_PER_GROUP; } /* Setup all needed exit stubs. */ static void asm_exitstub_setup(ASMState *as, ExitNo nexits) { ExitNo i; if (nexits >= EXITSTUBS_PER_GROUP*LJ_MAX_EXITSTUBGR) lj_trace_err(as->J, LJ_TRERR_SNAPOV); for (i = 0; i < (nexits+EXITSTUBS_PER_GROUP-1)/EXITSTUBS_PER_GROUP; i++) if (as->J->exitstubgroup[i] == NULL) as->J->exitstubgroup[i] = asm_exitstub_gen(as, i); } /* Emit conditional branch to exit for guard. */ static void asm_guardcc(ASMState *as, ARMCC cc) { MCode *target = exitstub_addr(as->J, as->snapno); MCode *p = as->mcp; if (LJ_UNLIKELY(p == as->invmcp)) { as->loopinv = 1; *p = ARMI_BL | ((target-p-2) & 0x00ffffffu); emit_branch(as, ARMF_CC(ARMI_B, cc^1), p+1); return; } emit_branch(as, ARMF_CC(ARMI_BL, cc), target); } /* -- Operand fusion ------------------------------------------------------ */ /* Limit linear search to this distance. Avoids O(n^2) behavior. */ #define CONFLICT_SEARCH_LIM 31 /* Check if there's no conflicting instruction between curins and ref. */ static int noconflict(ASMState *as, IRRef ref, IROp conflict) { IRIns *ir = as->ir; IRRef i = as->curins; if (i > ref + CONFLICT_SEARCH_LIM) return 0; /* Give up, ref is too far away. */ while (--i > ref) if (ir[i].o == conflict) return 0; /* Conflict found. */ return 1; /* Ok, no conflict. */ } /* Fuse the array base of colocated arrays. */ static int32_t asm_fuseabase(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); if (ir->o == IR_TNEW && ir->op1 <= LJ_MAX_COLOSIZE && !neverfuse(as) && noconflict(as, ref, IR_NEWREF)) return (int32_t)sizeof(GCtab); return 0; } /* Fuse array/hash/upvalue reference into register+offset operand. */ static Reg asm_fuseahuref(ASMState *as, IRRef ref, int32_t *ofsp, RegSet allow, int lim) { IRIns *ir = IR(ref); if (ra_noreg(ir->r)) { if (ir->o == IR_AREF) { if (mayfuse(as, ref)) { if (irref_isk(ir->op2)) { IRRef tab = IR(ir->op1)->op1; int32_t ofs = asm_fuseabase(as, tab); IRRef refa = ofs ? tab : ir->op1; ofs += 8*IR(ir->op2)->i; if (ofs > -lim && ofs < lim) { *ofsp = ofs; return ra_alloc1(as, refa, allow); } } } } else if (ir->o == IR_HREFK) { if (mayfuse(as, ref)) { int32_t ofs = (int32_t)(IR(ir->op2)->op2 * sizeof(Node)); if (ofs < lim) { *ofsp = ofs; return ra_alloc1(as, ir->op1, allow); } } } else if (ir->o == IR_UREFC) { if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); int32_t ofs = i32ptr(&gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.tv); *ofsp = (ofs & 255); /* Mask out less bits to allow LDRD. */ return ra_allock(as, (ofs & ~255), allow); } } } *ofsp = 0; return ra_alloc1(as, ref, allow); } /* Fuse m operand into arithmetic/logic instructions. */ static uint32_t asm_fuseopm(ASMState *as, ARMIns ai, IRRef ref, RegSet allow) { IRIns *ir = IR(ref); if (ra_hasreg(ir->r)) { ra_noweak(as, ir->r); return ARMF_M(ir->r); } else if (irref_isk(ref)) { uint32_t k = emit_isk12(ai, ir->i); if (k) return k; } else if (mayfuse(as, ref)) { if (ir->o >= IR_BSHL && ir->o <= IR_BROR) { Reg m = ra_alloc1(as, ir->op1, allow); ARMShift sh = ir->o == IR_BSHL ? ARMSH_LSL : ir->o == IR_BSHR ? ARMSH_LSR : ir->o == IR_BSAR ? ARMSH_ASR : ARMSH_ROR; if (irref_isk(ir->op2)) { return m | ARMF_SH(sh, (IR(ir->op2)->i & 31)); } else { Reg s = ra_alloc1(as, ir->op2, rset_exclude(allow, m)); return m | ARMF_RSH(sh, s); } } else if (ir->o == IR_ADD && ir->op1 == ir->op2) { Reg m = ra_alloc1(as, ir->op1, allow); return m | ARMF_SH(ARMSH_LSL, 1); } } return ra_allocref(as, ref, allow); } /* Fuse shifts into loads/stores. Only bother with BSHL 2 => lsl #2. */ static IRRef asm_fuselsl2(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); if (ra_noreg(ir->r) && mayfuse(as, ref) && ir->o == IR_BSHL && irref_isk(ir->op2) && IR(ir->op2)->i == 2) return ir->op1; return 0; /* No fusion. */ } /* Fuse XLOAD/XSTORE reference into load/store operand. */ static void asm_fusexref(ASMState *as, ARMIns ai, Reg rd, IRRef ref, RegSet allow, int32_t ofs) { IRIns *ir = IR(ref); Reg base; if (ra_noreg(ir->r) && canfuse(as, ir)) { int32_t lim = (!LJ_SOFTFP && (ai & 0x08000000)) ? 1024 : (ai & 0x04000000) ? 4096 : 256; if (ir->o == IR_ADD) { int32_t ofs2; if (irref_isk(ir->op2) && (ofs2 = ofs + IR(ir->op2)->i) > -lim && ofs2 < lim && (!(!LJ_SOFTFP && (ai & 0x08000000)) || !(ofs2 & 3))) { ofs = ofs2; ref = ir->op1; } else if (ofs == 0 && !(!LJ_SOFTFP && (ai & 0x08000000))) { IRRef lref = ir->op1, rref = ir->op2; Reg rn, rm; if ((ai & 0x04000000)) { IRRef sref = asm_fuselsl2(as, rref); if (sref) { rref = sref; ai |= ARMF_SH(ARMSH_LSL, 2); } else if ((sref = asm_fuselsl2(as, lref)) != 0) { lref = rref; rref = sref; ai |= ARMF_SH(ARMSH_LSL, 2); } } rn = ra_alloc1(as, lref, allow); rm = ra_alloc1(as, rref, rset_exclude(allow, rn)); if ((ai & 0x04000000)) ai |= ARMI_LS_R; emit_dnm(as, ai|ARMI_LS_P|ARMI_LS_U, rd, rn, rm); return; } } else if (ir->o == IR_STRREF && !(!LJ_SOFTFP && (ai & 0x08000000))) { lua_assert(ofs == 0); ofs = (int32_t)sizeof(GCstr); if (irref_isk(ir->op2)) { ofs += IR(ir->op2)->i; ref = ir->op1; } else if (irref_isk(ir->op1)) { ofs += IR(ir->op1)->i; ref = ir->op2; } else { /* NYI: Fuse ADD with constant. */ Reg rn = ra_alloc1(as, ir->op1, allow); uint32_t m = asm_fuseopm(as, 0, ir->op2, rset_exclude(allow, rn)); if ((ai & 0x04000000)) emit_lso(as, ai, rd, rd, ofs); else emit_lsox(as, ai, rd, rd, ofs); emit_dn(as, ARMI_ADD^m, rd, rn); return; } if (ofs <= -lim || ofs >= lim) { Reg rn = ra_alloc1(as, ref, allow); Reg rm = ra_allock(as, ofs, rset_exclude(allow, rn)); if ((ai & 0x04000000)) ai |= ARMI_LS_R; emit_dnm(as, ai|ARMI_LS_P|ARMI_LS_U, rd, rn, rm); return; } } } base = ra_alloc1(as, ref, allow); #if !LJ_SOFTFP if ((ai & 0x08000000)) emit_vlso(as, ai, rd, base, ofs); else #endif if ((ai & 0x04000000)) emit_lso(as, ai, rd, base, ofs); else emit_lsox(as, ai, rd, base, ofs); } #if !LJ_SOFTFP /* Fuse to multiply-add/sub instruction. */ static int asm_fusemadd(ASMState *as, IRIns *ir, ARMIns ai, ARMIns air) { IRRef lref = ir->op1, rref = ir->op2; IRIns *irm; if (lref != rref && ((mayfuse(as, lref) && (irm = IR(lref), irm->o == IR_MUL) && ra_noreg(irm->r)) || (mayfuse(as, rref) && (irm = IR(rref), irm->o == IR_MUL) && (rref = lref, ai = air, ra_noreg(irm->r))))) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg add = ra_hintalloc(as, rref, dest, RSET_FPR); Reg right, left = ra_alloc2(as, irm, rset_exclude(rset_exclude(RSET_FPR, dest), add)); right = (left >> 8); left &= 255; emit_dnm(as, ai, (dest & 15), (left & 15), (right & 15)); if (dest != add) emit_dm(as, ARMI_VMOV_D, (dest & 15), (add & 15)); return 1; } return 0; } #endif /* -- Calls --------------------------------------------------------------- */ /* Generate a call to a C function. */ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) { uint32_t n, nargs = CCI_NARGS(ci); int32_t ofs = 0; #if LJ_SOFTFP Reg gpr = REGARG_FIRSTGPR; #else Reg gpr, fpr = REGARG_FIRSTFPR, fprodd = 0; #endif if ((void *)ci->func) emit_call(as, (void *)ci->func); #if !LJ_SOFTFP for (gpr = REGARG_FIRSTGPR; gpr <= REGARG_LASTGPR; gpr++) as->cost[gpr] = REGCOST(~0u, ASMREF_L); gpr = REGARG_FIRSTGPR; #endif for (n = 0; n < nargs; n++) { /* Setup args. */ IRRef ref = args[n]; IRIns *ir = IR(ref); #if !LJ_SOFTFP if (ref && irt_isfp(ir->t)) { RegSet of = as->freeset; Reg src; if (!LJ_ABI_SOFTFP && !(ci->flags & CCI_VARARG)) { if (irt_isnum(ir->t)) { if (fpr <= REGARG_LASTFPR) { ra_leftov(as, fpr, ref); fpr++; continue; } } else if (fprodd) { /* Ick. */ src = ra_alloc1(as, ref, RSET_FPR); emit_dm(as, ARMI_VMOV_S, (fprodd & 15), (src & 15) | 0x00400000); fprodd = 0; continue; } else if (fpr <= REGARG_LASTFPR) { ra_leftov(as, fpr, ref); fprodd = fpr++; continue; } /* Workaround to protect argument GPRs from being used for remat. */ as->freeset &= ~RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1); src = ra_alloc1(as, ref, RSET_FPR); /* May alloc GPR to remat FPR. */ as->freeset |= (of & RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1)); fprodd = 0; goto stackfp; } /* Workaround to protect argument GPRs from being used for remat. */ as->freeset &= ~RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1); src = ra_alloc1(as, ref, RSET_FPR); /* May alloc GPR to remat FPR. */ as->freeset |= (of & RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1)); if (irt_isnum(ir->t)) gpr = (gpr+1) & ~1u; if (gpr <= REGARG_LASTGPR) { lua_assert(rset_test(as->freeset, gpr)); /* Must have been evicted. */ if (irt_isnum(ir->t)) { lua_assert(rset_test(as->freeset, gpr+1)); /* Ditto. */ emit_dnm(as, ARMI_VMOV_RR_D, gpr, gpr+1, (src & 15)); gpr += 2; } else { emit_dn(as, ARMI_VMOV_R_S, gpr, (src & 15)); gpr++; } } else { stackfp: if (irt_isnum(ir->t)) ofs = (ofs + 4) & ~4; emit_spstore(as, ir, src, ofs); ofs += irt_isnum(ir->t) ? 8 : 4; } } else #endif { if (gpr <= REGARG_LASTGPR) { lua_assert(rset_test(as->freeset, gpr)); /* Must have been evicted. */ if (ref) ra_leftov(as, gpr, ref); gpr++; } else { if (ref) { Reg r = ra_alloc1(as, ref, RSET_GPR); emit_spstore(as, ir, r, ofs); } ofs += 4; } } } } /* Setup result reg/sp for call. Evict scratch regs. */ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) { RegSet drop = RSET_SCRATCH; int hiop = ((ir+1)->o == IR_HIOP); if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ if (hiop && ra_hasreg((ir+1)->r)) rset_clear(drop, (ir+1)->r); /* Dest reg handled below. */ ra_evictset(as, drop); /* Evictions must be performed first. */ if (ra_used(ir)) { lua_assert(!irt_ispri(ir->t)); if (!LJ_SOFTFP && irt_isfp(ir->t)) { if (LJ_ABI_SOFTFP || (ci->flags & (CCI_CASTU64|CCI_VARARG))) { Reg dest = (ra_dest(as, ir, RSET_FPR) & 15); if (irt_isnum(ir->t)) emit_dnm(as, ARMI_VMOV_D_RR, RID_RETLO, RID_RETHI, dest); else emit_dn(as, ARMI_VMOV_S_R, RID_RET, dest); } else { ra_destreg(as, ir, RID_FPRET); } } else if (hiop) { ra_destpair(as, ir); } else { ra_destreg(as, ir, RID_RET); } } UNUSED(ci); } static void asm_call(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX]; const CCallInfo *ci = &lj_ir_callinfo[ir->op2]; asm_collectargs(as, ir, ci, args); asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } static void asm_callx(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX*2]; CCallInfo ci; IRRef func; IRIns *irf; ci.flags = asm_callx_flags(as, ir); asm_collectargs(as, ir, &ci, args); asm_setupresult(as, ir, &ci); func = ir->op2; irf = IR(func); if (irf->o == IR_CARG) { func = irf->op1; irf = IR(func); } if (irref_isk(func)) { /* Call to constant address. */ ci.func = (ASMFunction)(void *)(irf->i); } else { /* Need a non-argument register for indirect calls. */ Reg freg = ra_alloc1(as, func, RSET_RANGE(RID_R4, RID_R12+1)); emit_m(as, ARMI_BLXr, freg); ci.func = (ASMFunction)(void *)0; } asm_gencall(as, &ci, args); } /* -- Returns ------------------------------------------------------------- */ /* Return to lower frame. Guard that it goes to the right spot. */ static void asm_retf(ASMState *as, IRIns *ir) { Reg base = ra_alloc1(as, REF_BASE, RSET_GPR); void *pc = ir_kptr(IR(ir->op2)); int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); as->topslot -= (BCReg)delta; if ((int32_t)as->topslot < 0) as->topslot = 0; /* Need to force a spill on REF_BASE now to update the stack slot. */ emit_lso(as, ARMI_STR, base, RID_SP, ra_spill(as, IR(REF_BASE))); emit_setgl(as, base, jit_base); emit_addptr(as, base, -8*delta); asm_guardcc(as, CC_NE); emit_nm(as, ARMI_CMP, RID_TMP, ra_allock(as, i32ptr(pc), rset_exclude(RSET_GPR, base))); emit_lso(as, ARMI_LDR, RID_TMP, base, -4); } /* -- Type conversions ---------------------------------------------------- */ #if !LJ_SOFTFP static void asm_tointg(ASMState *as, IRIns *ir, Reg left) { Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, left)); Reg dest = ra_dest(as, ir, RSET_GPR); asm_guardcc(as, CC_NE); emit_d(as, ARMI_VMRS, 0); emit_dm(as, ARMI_VCMP_D, (tmp & 15), (left & 15)); emit_dm(as, ARMI_VCVT_F64_S32, (tmp & 15), (tmp & 15)); emit_dn(as, ARMI_VMOV_R_S, dest, (tmp & 15)); emit_dm(as, ARMI_VCVT_S32_F64, (tmp & 15), (left & 15)); } static void asm_tobit(ASMState *as, IRIns *ir) { RegSet allow = RSET_FPR; Reg left = ra_alloc1(as, ir->op1, allow); Reg right = ra_alloc1(as, ir->op2, rset_clear(allow, left)); Reg tmp = ra_scratch(as, rset_clear(allow, right)); Reg dest = ra_dest(as, ir, RSET_GPR); emit_dn(as, ARMI_VMOV_R_S, dest, (tmp & 15)); emit_dnm(as, ARMI_VADD_D, (tmp & 15), (left & 15), (right & 15)); } #endif static void asm_conv(ASMState *as, IRIns *ir) { IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); #if !LJ_SOFTFP int stfp = (st == IRT_NUM || st == IRT_FLOAT); #endif IRRef lref = ir->op1; /* 64 bit integer conversions are handled by SPLIT. */ lua_assert(!irt_isint64(ir->t) && !(st == IRT_I64 || st == IRT_U64)); #if LJ_SOFTFP /* FP conversions are handled by SPLIT. */ lua_assert(!irt_isfp(ir->t) && !(st == IRT_NUM || st == IRT_FLOAT)); /* Can't check for same types: SPLIT uses CONV int.int + BXOR for sfp NEG. */ #else lua_assert(irt_type(ir->t) != st); if (irt_isfp(ir->t)) { Reg dest = ra_dest(as, ir, RSET_FPR); if (stfp) { /* FP to FP conversion. */ emit_dm(as, st == IRT_NUM ? ARMI_VCVT_F32_F64 : ARMI_VCVT_F64_F32, (dest & 15), (ra_alloc1(as, lref, RSET_FPR) & 15)); } else { /* Integer to FP conversion. */ Reg left = ra_alloc1(as, lref, RSET_GPR); ARMIns ai = irt_isfloat(ir->t) ? (st == IRT_INT ? ARMI_VCVT_F32_S32 : ARMI_VCVT_F32_U32) : (st == IRT_INT ? ARMI_VCVT_F64_S32 : ARMI_VCVT_F64_U32); emit_dm(as, ai, (dest & 15), (dest & 15)); emit_dn(as, ARMI_VMOV_S_R, left, (dest & 15)); } } else if (stfp) { /* FP to integer conversion. */ if (irt_isguard(ir->t)) { /* Checked conversions are only supported from number to int. */ lua_assert(irt_isint(ir->t) && st == IRT_NUM); asm_tointg(as, ir, ra_alloc1(as, lref, RSET_FPR)); } else { Reg left = ra_alloc1(as, lref, RSET_FPR); Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, left)); Reg dest = ra_dest(as, ir, RSET_GPR); ARMIns ai; emit_dn(as, ARMI_VMOV_R_S, dest, (tmp & 15)); ai = irt_isint(ir->t) ? (st == IRT_NUM ? ARMI_VCVT_S32_F64 : ARMI_VCVT_S32_F32) : (st == IRT_NUM ? ARMI_VCVT_U32_F64 : ARMI_VCVT_U32_F32); emit_dm(as, ai, (tmp & 15), (left & 15)); } } else #endif { Reg dest = ra_dest(as, ir, RSET_GPR); if (st >= IRT_I8 && st <= IRT_U16) { /* Extend to 32 bit integer. */ Reg left = ra_alloc1(as, lref, RSET_GPR); lua_assert(irt_isint(ir->t) || irt_isu32(ir->t)); if ((as->flags & JIT_F_ARMV6)) { ARMIns ai = st == IRT_I8 ? ARMI_SXTB : st == IRT_U8 ? ARMI_UXTB : st == IRT_I16 ? ARMI_SXTH : ARMI_UXTH; emit_dm(as, ai, dest, left); } else if (st == IRT_U8) { emit_dn(as, ARMI_AND|ARMI_K12|255, dest, left); } else { uint32_t shift = st == IRT_I8 ? 24 : 16; ARMShift sh = st == IRT_U16 ? ARMSH_LSR : ARMSH_ASR; emit_dm(as, ARMI_MOV|ARMF_SH(sh, shift), dest, RID_TMP); emit_dm(as, ARMI_MOV|ARMF_SH(ARMSH_LSL, shift), RID_TMP, left); } } else { /* Handle 32/32 bit no-op (cast). */ ra_leftov(as, dest, lref); /* Do nothing, but may need to move regs. */ } } } #if !LJ_SOFTFP && LJ_HASFFI static void asm_conv64(ASMState *as, IRIns *ir) { IRType st = (IRType)((ir-1)->op2 & IRCONV_SRCMASK); IRType dt = (((ir-1)->op2 & IRCONV_DSTMASK) >> IRCONV_DSH); IRCallID id; CCallInfo ci; IRRef args[2]; args[0] = (ir-1)->op1; args[1] = ir->op1; if (st == IRT_NUM || st == IRT_FLOAT) { id = IRCALL_fp64_d2l + ((st == IRT_FLOAT) ? 2 : 0) + (dt - IRT_I64); ir--; } else { id = IRCALL_fp64_l2d + ((dt == IRT_FLOAT) ? 2 : 0) + (st - IRT_I64); } ci = lj_ir_callinfo[id]; #if !LJ_ABI_SOFTFP ci.flags |= CCI_VARARG; /* These calls don't use the hard-float ABI! */ #endif asm_setupresult(as, ir, &ci); asm_gencall(as, &ci, args); } #endif static void asm_strto(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_strscan_num]; IRRef args[2]; Reg rlo = 0, rhi = 0, tmp; int destused = ra_used(ir); int32_t ofs = 0; ra_evictset(as, RSET_SCRATCH); #if LJ_SOFTFP if (destused) { if (ra_hasspill(ir->s) && ra_hasspill((ir+1)->s) && (ir->s & 1) == 0 && ir->s + 1 == (ir+1)->s) { int i; for (i = 0; i < 2; i++) { Reg r = (ir+i)->r; if (ra_hasreg(r)) { ra_free(as, r); ra_modified(as, r); emit_spload(as, ir+i, r, sps_scale((ir+i)->s)); } } ofs = sps_scale(ir->s); destused = 0; } else { rhi = ra_dest(as, ir+1, RSET_GPR); rlo = ra_dest(as, ir, rset_exclude(RSET_GPR, rhi)); } } asm_guardcc(as, CC_EQ); if (destused) { emit_lso(as, ARMI_LDR, rhi, RID_SP, 4); emit_lso(as, ARMI_LDR, rlo, RID_SP, 0); } #else UNUSED(rhi); if (destused) { if (ra_hasspill(ir->s)) { ofs = sps_scale(ir->s); destused = 0; if (ra_hasreg(ir->r)) { ra_free(as, ir->r); ra_modified(as, ir->r); emit_spload(as, ir, ir->r, ofs); } } else { rlo = ra_dest(as, ir, RSET_FPR); } } asm_guardcc(as, CC_EQ); if (destused) emit_vlso(as, ARMI_VLDR_D, rlo, RID_SP, 0); #endif emit_n(as, ARMI_CMP|ARMI_K12|0, RID_RET); /* Test return status. */ args[0] = ir->op1; /* GCstr *str */ args[1] = ASMREF_TMP1; /* TValue *n */ asm_gencall(as, ci, args); tmp = ra_releasetmp(as, ASMREF_TMP1); if (ofs == 0) emit_dm(as, ARMI_MOV, tmp, RID_SP); else emit_opk(as, ARMI_ADD, tmp, RID_SP, ofs, RSET_GPR); } /* Get pointer to TValue. */ static void asm_tvptr(ASMState *as, Reg dest, IRRef ref) { IRIns *ir = IR(ref); if (irt_isnum(ir->t)) { if (irref_isk(ref)) { /* Use the number constant itself as a TValue. */ ra_allockreg(as, i32ptr(ir_knum(ir)), dest); } else { #if LJ_SOFTFP lua_assert(0); #else /* Otherwise force a spill and use the spill slot. */ emit_opk(as, ARMI_ADD, dest, RID_SP, ra_spill(as, ir), RSET_GPR); #endif } } else { /* Otherwise use [sp] and [sp+4] to hold the TValue. */ RegSet allow = rset_exclude(RSET_GPR, dest); Reg type; emit_dm(as, ARMI_MOV, dest, RID_SP); if (!irt_ispri(ir->t)) { Reg src = ra_alloc1(as, ref, allow); emit_lso(as, ARMI_STR, src, RID_SP, 0); } if ((ir+1)->o == IR_HIOP) type = ra_alloc1(as, ref+1, allow); else type = ra_allock(as, irt_toitype(ir->t), allow); emit_lso(as, ARMI_STR, type, RID_SP, 4); } } static void asm_tostr(ASMState *as, IRIns *ir) { IRRef args[2]; args[0] = ASMREF_L; as->gcsteps++; if (irt_isnum(IR(ir->op1)->t) || (ir+1)->o == IR_HIOP) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromnum]; args[1] = ASMREF_TMP1; /* const lua_Number * */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op1); } else { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromint]; args[1] = ir->op1; /* int32_t k */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); } } /* -- Memory references --------------------------------------------------- */ static void asm_aref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg idx, base; if (irref_isk(ir->op2)) { IRRef tab = IR(ir->op1)->op1; int32_t ofs = asm_fuseabase(as, tab); IRRef refa = ofs ? tab : ir->op1; uint32_t k = emit_isk12(ARMI_ADD, ofs + 8*IR(ir->op2)->i); if (k) { base = ra_alloc1(as, refa, RSET_GPR); emit_dn(as, ARMI_ADD^k, dest, base); return; } } base = ra_alloc1(as, ir->op1, RSET_GPR); idx = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, base)); emit_dnm(as, ARMI_ADD|ARMF_SH(ARMSH_LSL, 3), dest, base, idx); } /* Inlined hash lookup. Specialized for key type and for const keys. ** The equivalent C code is: ** Node *n = hashkey(t, key); ** do { ** if (lj_obj_equal(&n->key, key)) return &n->val; ** } while ((n = nextnode(n))); ** return niltv(L); */ static void asm_href(ASMState *as, IRIns *ir, IROp merge) { RegSet allow = RSET_GPR; int destused = ra_used(ir); Reg dest = ra_dest(as, ir, allow); Reg tab = ra_alloc1(as, ir->op1, rset_clear(allow, dest)); Reg key = 0, keyhi = 0, keynumhi = RID_NONE, tmp = RID_TMP; IRRef refkey = ir->op2; IRIns *irkey = IR(refkey); IRType1 kt = irkey->t; int32_t k = 0, khi = emit_isk12(ARMI_CMP, irt_toitype(kt)); uint32_t khash; MCLabel l_end, l_loop; rset_clear(allow, tab); if (!irref_isk(refkey) || irt_isstr(kt)) { #if LJ_SOFTFP key = ra_alloc1(as, refkey, allow); rset_clear(allow, key); if (irkey[1].o == IR_HIOP) { if (ra_hasreg((irkey+1)->r)) { keynumhi = (irkey+1)->r; keyhi = RID_TMP; ra_noweak(as, keynumhi); } else { keyhi = keynumhi = ra_allocref(as, refkey+1, allow); } rset_clear(allow, keynumhi); khi = 0; } #else if (irt_isnum(kt)) { key = ra_scratch(as, allow); rset_clear(allow, key); keyhi = keynumhi = ra_scratch(as, allow); rset_clear(allow, keyhi); khi = 0; } else { key = ra_alloc1(as, refkey, allow); rset_clear(allow, key); } #endif } else if (irt_isnum(kt)) { int32_t val = (int32_t)ir_knum(irkey)->u32.lo; k = emit_isk12(ARMI_CMP, val); if (!k) { key = ra_allock(as, val, allow); rset_clear(allow, key); } val = (int32_t)ir_knum(irkey)->u32.hi; khi = emit_isk12(ARMI_CMP, val); if (!khi) { keyhi = ra_allock(as, val, allow); rset_clear(allow, keyhi); } } else if (!irt_ispri(kt)) { k = emit_isk12(ARMI_CMP, irkey->i); if (!k) { key = ra_alloc1(as, refkey, allow); rset_clear(allow, key); } } if (!irt_ispri(kt)) tmp = ra_scratchpair(as, allow); /* Key not found in chain: jump to exit (if merged) or load niltv. */ l_end = emit_label(as); as->invmcp = NULL; if (merge == IR_NE) asm_guardcc(as, CC_AL); else if (destused) emit_loada(as, dest, niltvg(J2G(as->J))); /* Follow hash chain until the end. */ l_loop = --as->mcp; emit_n(as, ARMI_CMP|ARMI_K12|0, dest); emit_lso(as, ARMI_LDR, dest, dest, (int32_t)offsetof(Node, next)); /* Type and value comparison. */ if (merge == IR_EQ) asm_guardcc(as, CC_EQ); else emit_branch(as, ARMF_CC(ARMI_B, CC_EQ), l_end); if (!irt_ispri(kt)) { emit_nm(as, ARMF_CC(ARMI_CMP, CC_EQ)^k, tmp, key); emit_nm(as, ARMI_CMP^khi, tmp+1, keyhi); emit_lsox(as, ARMI_LDRD, tmp, dest, (int32_t)offsetof(Node, key)); } else { emit_n(as, ARMI_CMP^khi, tmp); emit_lso(as, ARMI_LDR, tmp, dest, (int32_t)offsetof(Node, key.it)); } *l_loop = ARMF_CC(ARMI_B, CC_NE) | ((as->mcp-l_loop-2) & 0x00ffffffu); /* Load main position relative to tab->node into dest. */ khash = irref_isk(refkey) ? ir_khash(irkey) : 1; if (khash == 0) { emit_lso(as, ARMI_LDR, dest, tab, (int32_t)offsetof(GCtab, node)); } else { emit_dnm(as, ARMI_ADD|ARMF_SH(ARMSH_LSL, 3), dest, dest, tmp); emit_dnm(as, ARMI_ADD|ARMF_SH(ARMSH_LSL, 1), tmp, tmp, tmp); if (irt_isstr(kt)) { /* Fetch of str->hash is cheaper than ra_allock. */ emit_dnm(as, ARMI_AND, tmp, tmp+1, RID_TMP); emit_lso(as, ARMI_LDR, dest, tab, (int32_t)offsetof(GCtab, node)); emit_lso(as, ARMI_LDR, tmp+1, key, (int32_t)offsetof(GCstr, hash)); emit_lso(as, ARMI_LDR, RID_TMP, tab, (int32_t)offsetof(GCtab, hmask)); } else if (irref_isk(refkey)) { emit_opk(as, ARMI_AND, tmp, RID_TMP, (int32_t)khash, rset_exclude(rset_exclude(RSET_GPR, tab), dest)); emit_lso(as, ARMI_LDR, dest, tab, (int32_t)offsetof(GCtab, node)); emit_lso(as, ARMI_LDR, RID_TMP, tab, (int32_t)offsetof(GCtab, hmask)); } else { /* Must match with hash*() in lj_tab.c. */ if (ra_hasreg(keynumhi)) { /* Canonicalize +-0.0 to 0.0. */ if (keyhi == RID_TMP) emit_dm(as, ARMF_CC(ARMI_MOV, CC_NE), keyhi, keynumhi); emit_d(as, ARMF_CC(ARMI_MOV, CC_EQ)|ARMI_K12|0, keyhi); } emit_dnm(as, ARMI_AND, tmp, tmp, RID_TMP); emit_dnm(as, ARMI_SUB|ARMF_SH(ARMSH_ROR, 32-HASH_ROT3), tmp, tmp, tmp+1); emit_lso(as, ARMI_LDR, dest, tab, (int32_t)offsetof(GCtab, node)); emit_dnm(as, ARMI_EOR|ARMF_SH(ARMSH_ROR, 32-((HASH_ROT2+HASH_ROT1)&31)), tmp, tmp+1, tmp); emit_lso(as, ARMI_LDR, RID_TMP, tab, (int32_t)offsetof(GCtab, hmask)); emit_dnm(as, ARMI_SUB|ARMF_SH(ARMSH_ROR, 32-HASH_ROT1), tmp+1, tmp+1, tmp); if (ra_hasreg(keynumhi)) { emit_dnm(as, ARMI_EOR, tmp+1, tmp, key); emit_dnm(as, ARMI_ORR|ARMI_S, RID_TMP, tmp, key); /* Test for +-0.0. */ emit_dnm(as, ARMI_ADD, tmp, keynumhi, keynumhi); #if !LJ_SOFTFP emit_dnm(as, ARMI_VMOV_RR_D, key, keynumhi, (ra_alloc1(as, refkey, RSET_FPR) & 15)); #endif } else { emit_dnm(as, ARMI_EOR, tmp+1, tmp, key); emit_opk(as, ARMI_ADD, tmp, key, (int32_t)HASH_BIAS, rset_exclude(rset_exclude(RSET_GPR, tab), key)); } } } } static void asm_hrefk(ASMState *as, IRIns *ir) { IRIns *kslot = IR(ir->op2); IRIns *irkey = IR(kslot->op1); int32_t ofs = (int32_t)(kslot->op2 * sizeof(Node)); int32_t kofs = ofs + (int32_t)offsetof(Node, key); Reg dest = (ra_used(ir) || ofs > 4095) ? ra_dest(as, ir, RSET_GPR) : RID_NONE; Reg node = ra_alloc1(as, ir->op1, RSET_GPR); Reg key = RID_NONE, type = RID_TMP, idx = node; RegSet allow = rset_exclude(RSET_GPR, node); lua_assert(ofs % sizeof(Node) == 0); if (ofs > 4095) { idx = dest; rset_clear(allow, dest); kofs = (int32_t)offsetof(Node, key); } else if (ra_hasreg(dest)) { emit_opk(as, ARMI_ADD, dest, node, ofs, allow); } asm_guardcc(as, CC_NE); if (!irt_ispri(irkey->t)) { RegSet even = (as->freeset & allow); even = even & (even >> 1) & RSET_GPREVEN; if (even) { key = ra_scratch(as, even); if (rset_test(as->freeset, key+1)) { type = key+1; ra_modified(as, type); } } else { key = ra_scratch(as, allow); } rset_clear(allow, key); } rset_clear(allow, type); if (irt_isnum(irkey->t)) { emit_opk(as, ARMF_CC(ARMI_CMP, CC_EQ), 0, type, (int32_t)ir_knum(irkey)->u32.hi, allow); emit_opk(as, ARMI_CMP, 0, key, (int32_t)ir_knum(irkey)->u32.lo, allow); } else { if (ra_hasreg(key)) emit_opk(as, ARMF_CC(ARMI_CMP, CC_EQ), 0, key, irkey->i, allow); emit_n(as, ARMI_CMN|ARMI_K12|-irt_toitype(irkey->t), type); } emit_lso(as, ARMI_LDR, type, idx, kofs+4); if (ra_hasreg(key)) emit_lso(as, ARMI_LDR, key, idx, kofs); if (ofs > 4095) emit_opk(as, ARMI_ADD, dest, node, ofs, RSET_GPR); } static void asm_newref(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey]; IRRef args[3]; if (ir->r == RID_SINK) return; args[0] = ASMREF_L; /* lua_State *L */ args[1] = ir->op1; /* GCtab *t */ args[2] = ASMREF_TMP1; /* cTValue *key */ asm_setupresult(as, ir, ci); /* TValue * */ asm_gencall(as, ci, args); asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op2); } static void asm_uref(ASMState *as, IRIns *ir) { /* NYI: Check that UREFO is still open and not aliasing a slot. */ Reg dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); MRef *v = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.v; emit_lsptr(as, ARMI_LDR, dest, v); } else { Reg uv = ra_scratch(as, RSET_GPR); Reg func = ra_alloc1(as, ir->op1, RSET_GPR); if (ir->o == IR_UREFC) { asm_guardcc(as, CC_NE); emit_n(as, ARMI_CMP|ARMI_K12|1, RID_TMP); emit_opk(as, ARMI_ADD, dest, uv, (int32_t)offsetof(GCupval, tv), RSET_GPR); emit_lso(as, ARMI_LDRB, RID_TMP, uv, (int32_t)offsetof(GCupval, closed)); } else { emit_lso(as, ARMI_LDR, dest, uv, (int32_t)offsetof(GCupval, v)); } emit_lso(as, ARMI_LDR, uv, func, (int32_t)offsetof(GCfuncL, uvptr) + 4*(int32_t)(ir->op2 >> 8)); } } static void asm_fref(ASMState *as, IRIns *ir) { UNUSED(as); UNUSED(ir); lua_assert(!ra_used(ir)); } static void asm_strref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); IRRef ref = ir->op2, refk = ir->op1; Reg r; if (irref_isk(ref)) { IRRef tmp = refk; refk = ref; ref = tmp; } else if (!irref_isk(refk)) { uint32_t k, m = ARMI_K12|sizeof(GCstr); Reg right, left = ra_alloc1(as, ir->op1, RSET_GPR); IRIns *irr = IR(ir->op2); if (ra_hasreg(irr->r)) { ra_noweak(as, irr->r); right = irr->r; } else if (mayfuse(as, irr->op2) && irr->o == IR_ADD && irref_isk(irr->op2) && (k = emit_isk12(ARMI_ADD, (int32_t)sizeof(GCstr) + IR(irr->op2)->i))) { m = k; right = ra_alloc1(as, irr->op1, rset_exclude(RSET_GPR, left)); } else { right = ra_allocref(as, ir->op2, rset_exclude(RSET_GPR, left)); } emit_dn(as, ARMI_ADD^m, dest, dest); emit_dnm(as, ARMI_ADD, dest, left, right); return; } r = ra_alloc1(as, ref, RSET_GPR); emit_opk(as, ARMI_ADD, dest, r, sizeof(GCstr) + IR(refk)->i, rset_exclude(RSET_GPR, r)); } /* -- Loads and stores ---------------------------------------------------- */ static ARMIns asm_fxloadins(IRIns *ir) { switch (irt_type(ir->t)) { case IRT_I8: return ARMI_LDRSB; case IRT_U8: return ARMI_LDRB; case IRT_I16: return ARMI_LDRSH; case IRT_U16: return ARMI_LDRH; case IRT_NUM: lua_assert(!LJ_SOFTFP); return ARMI_VLDR_D; case IRT_FLOAT: if (!LJ_SOFTFP) return ARMI_VLDR_S; default: return ARMI_LDR; } } static ARMIns asm_fxstoreins(IRIns *ir) { switch (irt_type(ir->t)) { case IRT_I8: case IRT_U8: return ARMI_STRB; case IRT_I16: case IRT_U16: return ARMI_STRH; case IRT_NUM: lua_assert(!LJ_SOFTFP); return ARMI_VSTR_D; case IRT_FLOAT: if (!LJ_SOFTFP) return ARMI_VSTR_S; default: return ARMI_STR; } } static void asm_fload(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg idx = ra_alloc1(as, ir->op1, RSET_GPR); ARMIns ai = asm_fxloadins(ir); int32_t ofs; if (ir->op2 == IRFL_TAB_ARRAY) { ofs = asm_fuseabase(as, ir->op1); if (ofs) { /* Turn the t->array load into an add for colocated arrays. */ emit_dn(as, ARMI_ADD|ARMI_K12|ofs, dest, idx); return; } } ofs = field_ofs[ir->op2]; if ((ai & 0x04000000)) emit_lso(as, ai, dest, idx, ofs); else emit_lsox(as, ai, dest, idx, ofs); } static void asm_fstore(ASMState *as, IRIns *ir) { if (ir->r != RID_SINK) { Reg src = ra_alloc1(as, ir->op2, RSET_GPR); IRIns *irf = IR(ir->op1); Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src)); int32_t ofs = field_ofs[irf->op2]; ARMIns ai = asm_fxstoreins(ir); if ((ai & 0x04000000)) emit_lso(as, ai, src, idx, ofs); else emit_lsox(as, ai, src, idx, ofs); } } static void asm_xload(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, (!LJ_SOFTFP && irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR); lua_assert(!(ir->op2 & IRXLOAD_UNALIGNED)); asm_fusexref(as, asm_fxloadins(ir), dest, ir->op1, RSET_GPR, 0); } static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs) { if (ir->r != RID_SINK) { Reg src = ra_alloc1(as, ir->op2, (!LJ_SOFTFP && irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR); asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1, rset_exclude(RSET_GPR, src), ofs); } } static void asm_ahuvload(ASMState *as, IRIns *ir) { int hiop = (LJ_SOFTFP && (ir+1)->o == IR_HIOP); IRType t = hiop ? IRT_NUM : irt_type(ir->t); Reg dest = RID_NONE, type = RID_NONE, idx; RegSet allow = RSET_GPR; int32_t ofs = 0; if (hiop && ra_used(ir+1)) { type = ra_dest(as, ir+1, allow); rset_clear(allow, type); } if (ra_used(ir)) { lua_assert((LJ_SOFTFP ? 0 : irt_isnum(ir->t)) || irt_isint(ir->t) || irt_isaddr(ir->t)); dest = ra_dest(as, ir, (!LJ_SOFTFP && t == IRT_NUM) ? RSET_FPR : allow); rset_clear(allow, dest); } idx = asm_fuseahuref(as, ir->op1, &ofs, allow, (!LJ_SOFTFP && t == IRT_NUM) ? 1024 : 4096); if (!hiop || type == RID_NONE) { rset_clear(allow, idx); if (ofs < 256 && ra_hasreg(dest) && (dest & 1) == 0 && rset_test((as->freeset & allow), dest+1)) { type = dest+1; ra_modified(as, type); } else { type = RID_TMP; } } asm_guardcc(as, t == IRT_NUM ? CC_HS : CC_NE); emit_n(as, ARMI_CMN|ARMI_K12|-irt_toitype_(t), type); if (ra_hasreg(dest)) { #if !LJ_SOFTFP if (t == IRT_NUM) emit_vlso(as, ARMI_VLDR_D, dest, idx, ofs); else #endif emit_lso(as, ARMI_LDR, dest, idx, ofs); } emit_lso(as, ARMI_LDR, type, idx, ofs+4); } static void asm_ahustore(ASMState *as, IRIns *ir) { if (ir->r != RID_SINK) { RegSet allow = RSET_GPR; Reg idx, src = RID_NONE, type = RID_NONE; int32_t ofs = 0; #if !LJ_SOFTFP if (irt_isnum(ir->t)) { src = ra_alloc1(as, ir->op2, RSET_FPR); idx = asm_fuseahuref(as, ir->op1, &ofs, allow, 1024); emit_vlso(as, ARMI_VSTR_D, src, idx, ofs); } else #endif { int hiop = (LJ_SOFTFP && (ir+1)->o == IR_HIOP); if (!irt_ispri(ir->t)) { src = ra_alloc1(as, ir->op2, allow); rset_clear(allow, src); } if (hiop) type = ra_alloc1(as, (ir+1)->op2, allow); else type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); idx = asm_fuseahuref(as, ir->op1, &ofs, rset_exclude(allow, type), 4096); if (ra_hasreg(src)) emit_lso(as, ARMI_STR, src, idx, ofs); emit_lso(as, ARMI_STR, type, idx, ofs+4); } } } static void asm_sload(ASMState *as, IRIns *ir) { int32_t ofs = 8*((int32_t)ir->op1-1) + ((ir->op2 & IRSLOAD_FRAME) ? 4 : 0); int hiop = (LJ_SOFTFP && (ir+1)->o == IR_HIOP); IRType t = hiop ? IRT_NUM : irt_type(ir->t); Reg dest = RID_NONE, type = RID_NONE, base; RegSet allow = RSET_GPR; lua_assert(!(ir->op2 & IRSLOAD_PARENT)); /* Handled by asm_head_side(). */ lua_assert(irt_isguard(ir->t) || !(ir->op2 & IRSLOAD_TYPECHECK)); #if LJ_SOFTFP lua_assert(!(ir->op2 & IRSLOAD_CONVERT)); /* Handled by LJ_SOFTFP SPLIT. */ if (hiop && ra_used(ir+1)) { type = ra_dest(as, ir+1, allow); rset_clear(allow, type); } #else if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(ir->t) && t == IRT_INT) { dest = ra_scratch(as, RSET_FPR); asm_tointg(as, ir, dest); t = IRT_NUM; /* Continue with a regular number type check. */ } else #endif if (ra_used(ir)) { Reg tmp = RID_NONE; if ((ir->op2 & IRSLOAD_CONVERT)) tmp = ra_scratch(as, t == IRT_INT ? RSET_FPR : RSET_GPR); lua_assert((LJ_SOFTFP ? 0 : irt_isnum(ir->t)) || irt_isint(ir->t) || irt_isaddr(ir->t)); dest = ra_dest(as, ir, (!LJ_SOFTFP && t == IRT_NUM) ? RSET_FPR : allow); rset_clear(allow, dest); base = ra_alloc1(as, REF_BASE, allow); if ((ir->op2 & IRSLOAD_CONVERT)) { if (t == IRT_INT) { emit_dn(as, ARMI_VMOV_R_S, dest, (tmp & 15)); emit_dm(as, ARMI_VCVT_S32_F64, (tmp & 15), (tmp & 15)); t = IRT_NUM; /* Check for original type. */ } else { emit_dm(as, ARMI_VCVT_F64_S32, (dest & 15), (dest & 15)); emit_dn(as, ARMI_VMOV_S_R, tmp, (dest & 15)); t = IRT_INT; /* Check for original type. */ } dest = tmp; } goto dotypecheck; } base = ra_alloc1(as, REF_BASE, allow); dotypecheck: rset_clear(allow, base); if ((ir->op2 & IRSLOAD_TYPECHECK)) { if (ra_noreg(type)) { if (ofs < 256 && ra_hasreg(dest) && (dest & 1) == 0 && rset_test((as->freeset & allow), dest+1)) { type = dest+1; ra_modified(as, type); } else { type = RID_TMP; } } asm_guardcc(as, t == IRT_NUM ? CC_HS : CC_NE); emit_n(as, ARMI_CMN|ARMI_K12|-irt_toitype_(t), type); } if (ra_hasreg(dest)) { #if !LJ_SOFTFP if (t == IRT_NUM) { if (ofs < 1024) { emit_vlso(as, ARMI_VLDR_D, dest, base, ofs); } else { if (ra_hasreg(type)) emit_lso(as, ARMI_LDR, type, base, ofs+4); emit_vlso(as, ARMI_VLDR_D, dest, RID_TMP, 0); emit_opk(as, ARMI_ADD, RID_TMP, base, ofs, allow); return; } } else #endif emit_lso(as, ARMI_LDR, dest, base, ofs); } if (ra_hasreg(type)) emit_lso(as, ARMI_LDR, type, base, ofs+4); } /* -- Allocations --------------------------------------------------------- */ #if LJ_HASFFI static void asm_cnew(ASMState *as, IRIns *ir) { CTState *cts = ctype_ctsG(J2G(as->J)); CTypeID ctypeid = (CTypeID)IR(ir->op1)->i; CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ? lj_ctype_size(cts, ctypeid) : (CTSize)IR(ir->op2)->i; const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco]; IRRef args[2]; RegSet allow = (RSET_GPR & ~RSET_SCRATCH); RegSet drop = RSET_SCRATCH; lua_assert(sz != CTSIZE_INVALID); args[0] = ASMREF_L; /* lua_State *L */ args[1] = ASMREF_TMP1; /* MSize size */ as->gcsteps++; if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ ra_evictset(as, drop); if (ra_used(ir)) ra_destreg(as, ir, RID_RET); /* GCcdata * */ /* Initialize immutable cdata object. */ if (ir->o == IR_CNEWI) { int32_t ofs = sizeof(GCcdata); lua_assert(sz == 4 || sz == 8); if (sz == 8) { ofs += 4; ir++; lua_assert(ir->o == IR_HIOP); } for (;;) { Reg r = ra_alloc1(as, ir->op2, allow); emit_lso(as, ARMI_STR, r, RID_RET, ofs); rset_clear(allow, r); if (ofs == sizeof(GCcdata)) break; ofs -= 4; ir--; } } /* Initialize gct and ctypeid. lj_mem_newgco() already sets marked. */ { uint32_t k = emit_isk12(ARMI_MOV, ctypeid); Reg r = k ? RID_R1 : ra_allock(as, ctypeid, allow); emit_lso(as, ARMI_STRB, RID_TMP, RID_RET, offsetof(GCcdata, gct)); emit_lsox(as, ARMI_STRH, r, RID_RET, offsetof(GCcdata, ctypeid)); emit_d(as, ARMI_MOV|ARMI_K12|~LJ_TCDATA, RID_TMP); if (k) emit_d(as, ARMI_MOV^k, RID_R1); } asm_gencall(as, ci, args); ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)), ra_releasetmp(as, ASMREF_TMP1)); } #else #define asm_cnew(as, ir) ((void)0) #endif /* -- Write barriers ------------------------------------------------------ */ static void asm_tbar(ASMState *as, IRIns *ir) { Reg tab = ra_alloc1(as, ir->op1, RSET_GPR); Reg link = ra_scratch(as, rset_exclude(RSET_GPR, tab)); Reg gr = ra_allock(as, i32ptr(J2G(as->J)), rset_exclude(rset_exclude(RSET_GPR, tab), link)); Reg mark = RID_TMP; MCLabel l_end = emit_label(as); emit_lso(as, ARMI_STR, link, tab, (int32_t)offsetof(GCtab, gclist)); emit_lso(as, ARMI_STRB, mark, tab, (int32_t)offsetof(GCtab, marked)); emit_lso(as, ARMI_STR, tab, gr, (int32_t)offsetof(global_State, gc.grayagain)); emit_dn(as, ARMI_BIC|ARMI_K12|LJ_GC_BLACK, mark, mark); emit_lso(as, ARMI_LDR, link, gr, (int32_t)offsetof(global_State, gc.grayagain)); emit_branch(as, ARMF_CC(ARMI_B, CC_EQ), l_end); emit_n(as, ARMI_TST|ARMI_K12|LJ_GC_BLACK, mark); emit_lso(as, ARMI_LDRB, mark, tab, (int32_t)offsetof(GCtab, marked)); } static void asm_obar(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_barrieruv]; IRRef args[2]; MCLabel l_end; Reg obj, val, tmp; /* No need for other object barriers (yet). */ lua_assert(IR(ir->op1)->o == IR_UREFC); ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ir->op1; /* TValue *tv */ asm_gencall(as, ci, args); if ((l_end[-1] >> 28) == CC_AL) l_end[-1] = ARMF_CC(l_end[-1], CC_NE); else emit_branch(as, ARMF_CC(ARMI_B, CC_EQ), l_end); ra_allockreg(as, i32ptr(J2G(as->J)), ra_releasetmp(as, ASMREF_TMP1)); obj = IR(ir->op1)->r; tmp = ra_scratch(as, rset_exclude(RSET_GPR, obj)); emit_n(as, ARMF_CC(ARMI_TST, CC_NE)|ARMI_K12|LJ_GC_BLACK, tmp); emit_n(as, ARMI_TST|ARMI_K12|LJ_GC_WHITES, RID_TMP); val = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, obj)); emit_lso(as, ARMI_LDRB, tmp, obj, (int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)); emit_lso(as, ARMI_LDRB, RID_TMP, val, (int32_t)offsetof(GChead, marked)); } /* -- Arithmetic and logic operations ------------------------------------- */ #if !LJ_SOFTFP static void asm_fparith(ASMState *as, IRIns *ir, ARMIns ai) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = (left >> 8); left &= 255; emit_dnm(as, ai, (dest & 15), (left & 15), (right & 15)); } static void asm_fpunary(ASMState *as, IRIns *ir, ARMIns ai) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg left = ra_hintalloc(as, ir->op1, dest, RSET_FPR); emit_dm(as, ai, (dest & 15), (left & 15)); } static int asm_fpjoin_pow(ASMState *as, IRIns *ir) { IRIns *irp = IR(ir->op1); if (irp == ir-1 && irp->o == IR_MUL && !ra_used(irp)) { IRIns *irpp = IR(irp->op1); if (irpp == ir-2 && irpp->o == IR_FPMATH && irpp->op2 == IRFPM_LOG2 && !ra_used(irpp)) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_pow]; IRRef args[2]; args[0] = irpp->op1; args[1] = irp->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); return 1; } } return 0; } #endif static int asm_swapops(ASMState *as, IRRef lref, IRRef rref) { IRIns *ir; if (irref_isk(rref)) return 0; /* Don't swap constants to the left. */ if (irref_isk(lref)) return 1; /* But swap constants to the right. */ ir = IR(rref); if ((ir->o >= IR_BSHL && ir->o <= IR_BROR) || (ir->o == IR_ADD && ir->op1 == ir->op2)) return 0; /* Don't swap fusable operands to the left. */ ir = IR(lref); if ((ir->o >= IR_BSHL && ir->o <= IR_BROR) || (ir->o == IR_ADD && ir->op1 == ir->op2)) return 1; /* But swap fusable operands to the right. */ return 0; /* Otherwise don't swap. */ } static void asm_intop(ASMState *as, IRIns *ir, ARMIns ai) { IRRef lref = ir->op1, rref = ir->op2; Reg left, dest = ra_dest(as, ir, RSET_GPR); uint32_t m; if (asm_swapops(as, lref, rref)) { IRRef tmp = lref; lref = rref; rref = tmp; if ((ai & ~ARMI_S) == ARMI_SUB || (ai & ~ARMI_S) == ARMI_SBC) ai ^= (ARMI_SUB^ARMI_RSB); } left = ra_hintalloc(as, lref, dest, RSET_GPR); m = asm_fuseopm(as, ai, rref, rset_exclude(RSET_GPR, left)); if (irt_isguard(ir->t)) { /* For IR_ADDOV etc. */ asm_guardcc(as, CC_VS); ai |= ARMI_S; } emit_dn(as, ai^m, dest, left); } static void asm_intop_s(ASMState *as, IRIns *ir, ARMIns ai) { if (as->flagmcp == as->mcp) { /* Drop cmp r, #0. */ as->flagmcp = NULL; as->mcp++; ai |= ARMI_S; } asm_intop(as, ir, ai); } static void asm_bitop(ASMState *as, IRIns *ir, ARMIns ai) { if (as->flagmcp == as->mcp) { /* Try to drop cmp r, #0. */ uint32_t cc = (as->mcp[1] >> 28); as->flagmcp = NULL; if (cc <= CC_NE) { as->mcp++; ai |= ARMI_S; } else if (cc == CC_GE) { *++as->mcp ^= ((CC_GE^CC_PL) << 28); ai |= ARMI_S; } else if (cc == CC_LT) { *++as->mcp ^= ((CC_LT^CC_MI) << 28); ai |= ARMI_S; } /* else: other conds don't work with bit ops. */ } if (ir->op2 == 0) { Reg dest = ra_dest(as, ir, RSET_GPR); uint32_t m = asm_fuseopm(as, ai, ir->op1, RSET_GPR); emit_d(as, ai^m, dest); } else { /* NYI: Turn BAND !k12 into uxtb, uxth or bfc or shl+shr. */ asm_intop(as, ir, ai); } } static void asm_intneg(ASMState *as, IRIns *ir, ARMIns ai) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); emit_dn(as, ai|ARMI_K12|0, dest, left); } /* NYI: use add/shift for MUL(OV) with constants. FOLD only does 2^k. */ static void asm_intmul(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, rset_exclude(RSET_GPR, dest)); Reg right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); Reg tmp = RID_NONE; /* ARMv5 restriction: dest != left and dest_hi != left. */ if (dest == left && left != right) { left = right; right = dest; } if (irt_isguard(ir->t)) { /* IR_MULOV */ if (!(as->flags & JIT_F_ARMV6) && dest == left) tmp = left = ra_scratch(as, rset_exclude(RSET_GPR, left)); asm_guardcc(as, CC_NE); emit_nm(as, ARMI_TEQ|ARMF_SH(ARMSH_ASR, 31), RID_TMP, dest); emit_dnm(as, ARMI_SMULL|ARMF_S(right), dest, RID_TMP, left); } else { if (!(as->flags & JIT_F_ARMV6) && dest == left) tmp = left = RID_TMP; emit_nm(as, ARMI_MUL|ARMF_S(right), dest, left); } /* Only need this for the dest == left == right case. */ if (ra_hasreg(tmp)) emit_dm(as, ARMI_MOV, tmp, right); } static void asm_add(ASMState *as, IRIns *ir) { #if !LJ_SOFTFP if (irt_isnum(ir->t)) { if (!asm_fusemadd(as, ir, ARMI_VMLA_D, ARMI_VMLA_D)) asm_fparith(as, ir, ARMI_VADD_D); return; } #endif asm_intop_s(as, ir, ARMI_ADD); } static void asm_sub(ASMState *as, IRIns *ir) { #if !LJ_SOFTFP if (irt_isnum(ir->t)) { if (!asm_fusemadd(as, ir, ARMI_VNMLS_D, ARMI_VMLS_D)) asm_fparith(as, ir, ARMI_VSUB_D); return; } #endif asm_intop_s(as, ir, ARMI_SUB); } static void asm_mul(ASMState *as, IRIns *ir) { #if !LJ_SOFTFP if (irt_isnum(ir->t)) { asm_fparith(as, ir, ARMI_VMUL_D); return; } #endif asm_intmul(as, ir); } static void asm_neg(ASMState *as, IRIns *ir) { #if !LJ_SOFTFP if (irt_isnum(ir->t)) { asm_fpunary(as, ir, ARMI_VNEG_D); return; } #endif asm_intneg(as, ir, ARMI_RSB); } static void asm_callid(ASMState *as, IRIns *ir, IRCallID id) { const CCallInfo *ci = &lj_ir_callinfo[id]; IRRef args[2]; args[0] = ir->op1; args[1] = ir->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } #if !LJ_SOFTFP static void asm_callround(ASMState *as, IRIns *ir, int id) { /* The modified regs must match with the *.dasc implementation. */ RegSet drop = RID2RSET(RID_R0)|RID2RSET(RID_R1)|RID2RSET(RID_R2)| RID2RSET(RID_R3)|RID2RSET(RID_R12); RegSet of; Reg dest, src; ra_evictset(as, drop); dest = ra_dest(as, ir, RSET_FPR); emit_dnm(as, ARMI_VMOV_D_RR, RID_RETLO, RID_RETHI, (dest & 15)); emit_call(as, id == IRFPM_FLOOR ? (void *)lj_vm_floor_sf : id == IRFPM_CEIL ? (void *)lj_vm_ceil_sf : (void *)lj_vm_trunc_sf); /* Workaround to protect argument GPRs from being used for remat. */ of = as->freeset; as->freeset &= ~RSET_RANGE(RID_R0, RID_R1+1); as->cost[RID_R0] = as->cost[RID_R1] = REGCOST(~0u, ASMREF_L); src = ra_alloc1(as, ir->op1, RSET_FPR); /* May alloc GPR to remat FPR. */ as->freeset |= (of & RSET_RANGE(RID_R0, RID_R1+1)); emit_dnm(as, ARMI_VMOV_RR_D, RID_R0, RID_R1, (src & 15)); } #endif static void asm_bitswap(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, RSET_GPR); if ((as->flags & JIT_F_ARMV6)) { emit_dm(as, ARMI_REV, dest, left); } else { Reg tmp2 = dest; if (tmp2 == left) tmp2 = ra_scratch(as, rset_exclude(rset_exclude(RSET_GPR, dest), left)); emit_dnm(as, ARMI_EOR|ARMF_SH(ARMSH_LSR, 8), dest, tmp2, RID_TMP); emit_dm(as, ARMI_MOV|ARMF_SH(ARMSH_ROR, 8), tmp2, left); emit_dn(as, ARMI_BIC|ARMI_K12|256*8|255, RID_TMP, RID_TMP); emit_dnm(as, ARMI_EOR|ARMF_SH(ARMSH_ROR, 16), RID_TMP, left, left); } } static void asm_bitshift(ASMState *as, IRIns *ir, ARMShift sh) { if (irref_isk(ir->op2)) { /* Constant shifts. */ /* NYI: Turn SHL+SHR or BAND+SHR into uxtb, uxth or ubfx. */ /* NYI: Turn SHL+ASR into sxtb, sxth or sbfx. */ Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, RSET_GPR); int32_t shift = (IR(ir->op2)->i & 31); emit_dm(as, ARMI_MOV|ARMF_SH(sh, shift), dest, left); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, RSET_GPR); Reg right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_dm(as, ARMI_MOV|ARMF_RSH(sh, right), dest, left); } } static void asm_intmin_max(ASMState *as, IRIns *ir, int cc) { uint32_t kcmp = 0, kmov = 0; Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); Reg right = 0; if (irref_isk(ir->op2)) { kcmp = emit_isk12(ARMI_CMP, IR(ir->op2)->i); if (kcmp) kmov = emit_isk12(ARMI_MOV, IR(ir->op2)->i); } if (!kmov) { kcmp = 0; right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); } if (kmov || dest != right) { emit_dm(as, ARMF_CC(ARMI_MOV, cc)^kmov, dest, right); cc ^= 1; /* Must use opposite conditions for paired moves. */ } else { cc ^= (CC_LT^CC_GT); /* Otherwise may swap CC_LT <-> CC_GT. */ } if (dest != left) emit_dm(as, ARMF_CC(ARMI_MOV, cc), dest, left); emit_nm(as, ARMI_CMP^kcmp, left, right); } #if LJ_SOFTFP static void asm_sfpmin_max(ASMState *as, IRIns *ir, int cc) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_softfp_cmp]; RegSet drop = RSET_SCRATCH; Reg r; IRRef args[4]; args[0] = ir->op1; args[1] = (ir+1)->op1; args[2] = ir->op2; args[3] = (ir+1)->op2; /* __aeabi_cdcmple preserves r0-r3. */ if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); if (ra_hasreg((ir+1)->r)) rset_clear(drop, (ir+1)->r); if (!rset_test(as->freeset, RID_R2) && regcost_ref(as->cost[RID_R2]) == args[2]) rset_clear(drop, RID_R2); if (!rset_test(as->freeset, RID_R3) && regcost_ref(as->cost[RID_R3]) == args[3]) rset_clear(drop, RID_R3); ra_evictset(as, drop); ra_destpair(as, ir); emit_dm(as, ARMF_CC(ARMI_MOV, cc), RID_RETHI, RID_R3); emit_dm(as, ARMF_CC(ARMI_MOV, cc), RID_RETLO, RID_R2); emit_call(as, (void *)ci->func); for (r = RID_R0; r <= RID_R3; r++) ra_leftov(as, r, args[r-RID_R0]); } #else static void asm_fpmin_max(ASMState *as, IRIns *ir, int cc) { Reg dest = (ra_dest(as, ir, RSET_FPR) & 15); Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = ((left >> 8) & 15); left &= 15; if (dest != left) emit_dm(as, ARMF_CC(ARMI_VMOV_D, cc^1), dest, left); if (dest != right) emit_dm(as, ARMF_CC(ARMI_VMOV_D, cc), dest, right); emit_d(as, ARMI_VMRS, 0); emit_dm(as, ARMI_VCMP_D, left, right); } #endif static void asm_min_max(ASMState *as, IRIns *ir, int cc, int fcc) { #if LJ_SOFTFP UNUSED(fcc); #else if (irt_isnum(ir->t)) asm_fpmin_max(as, ir, fcc); else #endif asm_intmin_max(as, ir, cc); } /* -- Comparisons --------------------------------------------------------- */ /* Map of comparisons to flags. ORDER IR. */ static const uint8_t asm_compmap[IR_ABC+1] = { /* op FP swp int cc FP cc */ /* LT */ CC_GE + (CC_HS << 4), /* GE x */ CC_LT + (CC_HI << 4), /* LE */ CC_GT + (CC_HI << 4), /* GT x */ CC_LE + (CC_HS << 4), /* ULT x */ CC_HS + (CC_LS << 4), /* UGE */ CC_LO + (CC_LO << 4), /* ULE x */ CC_HI + (CC_LO << 4), /* UGT */ CC_LS + (CC_LS << 4), /* EQ */ CC_NE + (CC_NE << 4), /* NE */ CC_EQ + (CC_EQ << 4), /* ABC */ CC_LS + (CC_LS << 4) /* Same as UGT. */ }; #if LJ_SOFTFP /* FP comparisons. */ static void asm_sfpcomp(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_softfp_cmp]; RegSet drop = RSET_SCRATCH; Reg r; IRRef args[4]; int swp = (((ir->o ^ (ir->o >> 2)) & ~(ir->o >> 3) & 1) << 1); args[swp^0] = ir->op1; args[swp^1] = (ir+1)->op1; args[swp^2] = ir->op2; args[swp^3] = (ir+1)->op2; /* __aeabi_cdcmple preserves r0-r3. This helps to reduce spills. */ for (r = RID_R0; r <= RID_R3; r++) if (!rset_test(as->freeset, r) && regcost_ref(as->cost[r]) == args[r-RID_R0]) rset_clear(drop, r); ra_evictset(as, drop); asm_guardcc(as, (asm_compmap[ir->o] >> 4)); emit_call(as, (void *)ci->func); for (r = RID_R0; r <= RID_R3; r++) ra_leftov(as, r, args[r-RID_R0]); } #else /* FP comparisons. */ static void asm_fpcomp(ASMState *as, IRIns *ir) { Reg left, right; ARMIns ai; int swp = ((ir->o ^ (ir->o >> 2)) & ~(ir->o >> 3) & 1); if (!swp && irref_isk(ir->op2) && ir_knum(IR(ir->op2))->u64 == 0) { left = (ra_alloc1(as, ir->op1, RSET_FPR) & 15); right = 0; ai = ARMI_VCMPZ_D; } else { left = ra_alloc2(as, ir, RSET_FPR); if (swp) { right = (left & 15); left = ((left >> 8) & 15); } else { right = ((left >> 8) & 15); left &= 15; } ai = ARMI_VCMP_D; } asm_guardcc(as, (asm_compmap[ir->o] >> 4)); emit_d(as, ARMI_VMRS, 0); emit_dm(as, ai, left, right); } #endif /* Integer comparisons. */ static void asm_intcomp(ASMState *as, IRIns *ir) { ARMCC cc = (asm_compmap[ir->o] & 15); IRRef lref = ir->op1, rref = ir->op2; Reg left; uint32_t m; int cmpprev0 = 0; lua_assert(irt_isint(ir->t) || irt_isu32(ir->t) || irt_isaddr(ir->t)); if (asm_swapops(as, lref, rref)) { Reg tmp = lref; lref = rref; rref = tmp; if (cc >= CC_GE) cc ^= 7; /* LT <-> GT, LE <-> GE */ else if (cc > CC_NE) cc ^= 11; /* LO <-> HI, LS <-> HS */ } if (irref_isk(rref) && IR(rref)->i == 0) { IRIns *irl = IR(lref); cmpprev0 = (irl+1 == ir); /* Combine comp(BAND(left, right), 0) into tst left, right. */ if (cmpprev0 && irl->o == IR_BAND && !ra_used(irl)) { IRRef blref = irl->op1, brref = irl->op2; uint32_t m2 = 0; Reg bleft; if (asm_swapops(as, blref, brref)) { Reg tmp = blref; blref = brref; brref = tmp; } if (irref_isk(brref)) { m2 = emit_isk12(ARMI_AND, IR(brref)->i); if ((m2 & (ARMI_AND^ARMI_BIC))) goto notst; /* Not beneficial if we miss a constant operand. */ } if (cc == CC_GE) cc = CC_PL; else if (cc == CC_LT) cc = CC_MI; else if (cc > CC_NE) goto notst; /* Other conds don't work with tst. */ bleft = ra_alloc1(as, blref, RSET_GPR); if (!m2) m2 = asm_fuseopm(as, 0, brref, rset_exclude(RSET_GPR, bleft)); asm_guardcc(as, cc); emit_n(as, ARMI_TST^m2, bleft); return; } } notst: left = ra_alloc1(as, lref, RSET_GPR); m = asm_fuseopm(as, ARMI_CMP, rref, rset_exclude(RSET_GPR, left)); asm_guardcc(as, cc); emit_n(as, ARMI_CMP^m, left); /* Signed comparison with zero and referencing previous ins? */ if (cmpprev0 && (cc <= CC_NE || cc >= CC_GE)) as->flagmcp = as->mcp; /* Allow elimination of the compare. */ } #if LJ_HASFFI /* 64 bit integer comparisons. */ static void asm_int64comp(ASMState *as, IRIns *ir) { int signedcomp = (ir->o <= IR_GT); ARMCC cclo, cchi; Reg leftlo, lefthi; uint32_t mlo, mhi; RegSet allow = RSET_GPR, oldfree; /* Always use unsigned comparison for loword. */ cclo = asm_compmap[ir->o + (signedcomp ? 4 : 0)] & 15; leftlo = ra_alloc1(as, ir->op1, allow); oldfree = as->freeset; mlo = asm_fuseopm(as, ARMI_CMP, ir->op2, rset_clear(allow, leftlo)); allow &= ~(oldfree & ~as->freeset); /* Update for allocs of asm_fuseopm. */ /* Use signed or unsigned comparison for hiword. */ cchi = asm_compmap[ir->o] & 15; lefthi = ra_alloc1(as, (ir+1)->op1, allow); mhi = asm_fuseopm(as, ARMI_CMP, (ir+1)->op2, rset_clear(allow, lefthi)); /* All register allocations must be performed _before_ this point. */ if (signedcomp) { MCLabel l_around = emit_label(as); asm_guardcc(as, cclo); emit_n(as, ARMI_CMP^mlo, leftlo); emit_branch(as, ARMF_CC(ARMI_B, CC_NE), l_around); if (cchi == CC_GE || cchi == CC_LE) cchi ^= 6; /* GE -> GT, LE -> LT */ asm_guardcc(as, cchi); } else { asm_guardcc(as, cclo); emit_n(as, ARMF_CC(ARMI_CMP, CC_EQ)^mlo, leftlo); } emit_n(as, ARMI_CMP^mhi, lefthi); } #endif /* -- Support for 64 bit ops in 32 bit mode ------------------------------- */ /* Hiword op of a split 64 bit op. Previous op must be the loword op. */ static void asm_hiop(ASMState *as, IRIns *ir) { #if LJ_HASFFI || LJ_SOFTFP /* HIOP is marked as a store because it needs its own DCE logic. */ int uselo = ra_used(ir-1), usehi = ra_used(ir); /* Loword/hiword used? */ if (LJ_UNLIKELY(!(as->flags & JIT_F_OPT_DCE))) uselo = usehi = 1; if ((ir-1)->o <= IR_NE) { /* 64 bit integer or FP comparisons. ORDER IR. */ as->curins--; /* Always skip the loword comparison. */ #if LJ_SOFTFP if (!irt_isint(ir->t)) { asm_sfpcomp(as, ir-1); return; } #endif #if LJ_HASFFI asm_int64comp(as, ir-1); #endif return; #if LJ_SOFTFP } else if ((ir-1)->o == IR_MIN || (ir-1)->o == IR_MAX) { as->curins--; /* Always skip the loword min/max. */ if (uselo || usehi) asm_sfpmin_max(as, ir-1, (ir-1)->o == IR_MIN ? CC_HI : CC_LO); return; #elif LJ_HASFFI } else if ((ir-1)->o == IR_CONV) { as->curins--; /* Always skip the CONV. */ if (usehi || uselo) asm_conv64(as, ir); return; #endif } else if ((ir-1)->o == IR_XSTORE) { if ((ir-1)->r != RID_SINK) asm_xstore(as, ir, 4); return; } if (!usehi) return; /* Skip unused hiword op for all remaining ops. */ switch ((ir-1)->o) { #if LJ_HASFFI case IR_ADD: as->curins--; asm_intop(as, ir, ARMI_ADC); asm_intop(as, ir-1, ARMI_ADD|ARMI_S); break; case IR_SUB: as->curins--; asm_intop(as, ir, ARMI_SBC); asm_intop(as, ir-1, ARMI_SUB|ARMI_S); break; case IR_NEG: as->curins--; asm_intneg(as, ir, ARMI_RSC); asm_intneg(as, ir-1, ARMI_RSB|ARMI_S); break; #endif #if LJ_SOFTFP case IR_SLOAD: case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: case IR_STRTO: if (!uselo) ra_allocref(as, ir->op1, RSET_GPR); /* Mark lo op as used. */ break; #endif case IR_CALLN: case IR_CALLS: case IR_CALLXS: if (!uselo) ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ break; #if LJ_SOFTFP case IR_ASTORE: case IR_HSTORE: case IR_USTORE: case IR_TOSTR: #endif case IR_CNEWI: /* Nothing to do here. Handled by lo op itself. */ break; default: lua_assert(0); break; } #else UNUSED(as); UNUSED(ir); lua_assert(0); #endif } /* -- Stack handling ------------------------------------------------------ */ /* Check Lua stack size for overflow. Use exit handler as fallback. */ static void asm_stack_check(ASMState *as, BCReg topslot, IRIns *irp, RegSet allow, ExitNo exitno) { Reg pbase; uint32_t k; if (irp) { if (!ra_hasspill(irp->s)) { pbase = irp->r; lua_assert(ra_hasreg(pbase)); } else if (allow) { pbase = rset_pickbot(allow); } else { pbase = RID_RET; emit_lso(as, ARMI_LDR, RID_RET, RID_SP, 0); /* Restore temp. register. */ } } else { pbase = RID_BASE; } emit_branch(as, ARMF_CC(ARMI_BL, CC_LS), exitstub_addr(as->J, exitno)); k = emit_isk12(0, (int32_t)(8*topslot)); lua_assert(k); emit_n(as, ARMI_CMP^k, RID_TMP); emit_dnm(as, ARMI_SUB, RID_TMP, RID_TMP, pbase); emit_lso(as, ARMI_LDR, RID_TMP, RID_TMP, (int32_t)offsetof(lua_State, maxstack)); if (irp) { /* Must not spill arbitrary registers in head of side trace. */ int32_t i = i32ptr(&J2G(as->J)->jit_L); if (ra_hasspill(irp->s)) emit_lso(as, ARMI_LDR, pbase, RID_SP, sps_scale(irp->s)); emit_lso(as, ARMI_LDR, RID_TMP, RID_TMP, (i & 4095)); if (ra_hasspill(irp->s) && !allow) emit_lso(as, ARMI_STR, RID_RET, RID_SP, 0); /* Save temp. register. */ emit_loadi(as, RID_TMP, (i & ~4095)); } else { emit_getgl(as, RID_TMP, jit_L); } } /* Restore Lua stack from on-trace state. */ static void asm_stack_restore(ASMState *as, SnapShot *snap) { SnapEntry *map = &as->T->snapmap[snap->mapofs]; SnapEntry *flinks = &as->T->snapmap[snap_nextofs(as->T, snap)-1]; MSize n, nent = snap->nent; /* Store the value of all modified slots to the Lua stack. */ for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; BCReg s = snap_slot(sn); int32_t ofs = 8*((int32_t)s-1); IRRef ref = snap_ref(sn); IRIns *ir = IR(ref); if ((sn & SNAP_NORESTORE)) continue; if (irt_isnum(ir->t)) { #if LJ_SOFTFP RegSet odd = rset_exclude(RSET_GPRODD, RID_BASE); Reg tmp; lua_assert(irref_isk(ref)); /* LJ_SOFTFP: must be a number constant. */ tmp = ra_allock(as, (int32_t)ir_knum(ir)->u32.lo, rset_exclude(RSET_GPREVEN, RID_BASE)); emit_lso(as, ARMI_STR, tmp, RID_BASE, ofs); if (rset_test(as->freeset, tmp+1)) odd = RID2RSET(tmp+1); tmp = ra_allock(as, (int32_t)ir_knum(ir)->u32.hi, odd); emit_lso(as, ARMI_STR, tmp, RID_BASE, ofs+4); #else Reg src = ra_alloc1(as, ref, RSET_FPR); emit_vlso(as, ARMI_VSTR_D, src, RID_BASE, ofs); #endif } else { RegSet odd = rset_exclude(RSET_GPRODD, RID_BASE); Reg type; lua_assert(irt_ispri(ir->t) || irt_isaddr(ir->t) || irt_isinteger(ir->t)); if (!irt_ispri(ir->t)) { Reg src = ra_alloc1(as, ref, rset_exclude(RSET_GPREVEN, RID_BASE)); emit_lso(as, ARMI_STR, src, RID_BASE, ofs); if (rset_test(as->freeset, src+1)) odd = RID2RSET(src+1); } if ((sn & (SNAP_CONT|SNAP_FRAME))) { if (s == 0) continue; /* Do not overwrite link to previous frame. */ type = ra_allock(as, (int32_t)(*flinks--), odd); #if LJ_SOFTFP } else if ((sn & SNAP_SOFTFPNUM)) { type = ra_alloc1(as, ref+1, rset_exclude(RSET_GPRODD, RID_BASE)); #endif } else { type = ra_allock(as, (int32_t)irt_toitype(ir->t), odd); } emit_lso(as, ARMI_STR, type, RID_BASE, ofs+4); } checkmclim(as); } lua_assert(map + nent == flinks); } /* -- GC handling --------------------------------------------------------- */ /* Check GC threshold and do one or more GC steps. */ static void asm_gc_check(ASMState *as) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_step_jit]; IRRef args[2]; MCLabel l_end; Reg tmp1, tmp2; ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); /* Exit trace if in GCSatomic or GCSfinalize. Avoids syncing GC objects. */ asm_guardcc(as, CC_NE); /* Assumes asm_snap_prep() already done. */ emit_n(as, ARMI_CMP|ARMI_K12|0, RID_RET); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ASMREF_TMP2; /* MSize steps */ asm_gencall(as, ci, args); tmp1 = ra_releasetmp(as, ASMREF_TMP1); tmp2 = ra_releasetmp(as, ASMREF_TMP2); emit_loadi(as, tmp2, as->gcsteps); /* Jump around GC step if GC total < GC threshold. */ emit_branch(as, ARMF_CC(ARMI_B, CC_LS), l_end); emit_nm(as, ARMI_CMP, RID_TMP, tmp2); emit_lso(as, ARMI_LDR, tmp2, tmp1, (int32_t)offsetof(global_State, gc.threshold)); emit_lso(as, ARMI_LDR, RID_TMP, tmp1, (int32_t)offsetof(global_State, gc.total)); ra_allockreg(as, i32ptr(J2G(as->J)), tmp1); as->gcsteps = 0; checkmclim(as); } /* -- Loop handling ------------------------------------------------------- */ /* Fixup the loop branch. */ static void asm_loop_fixup(ASMState *as) { MCode *p = as->mctop; MCode *target = as->mcp; if (as->loopinv) { /* Inverted loop branch? */ /* asm_guardcc already inverted the bcc and patched the final bl. */ p[-2] |= ((uint32_t)(target-p) & 0x00ffffffu); } else { p[-1] = ARMI_B | ((uint32_t)((target-p)-1) & 0x00ffffffu); } } /* -- Head of trace ------------------------------------------------------- */ /* Reload L register from g->jit_L. */ static void asm_head_lreg(ASMState *as) { IRIns *ir = IR(ASMREF_L); if (ra_used(ir)) { Reg r = ra_dest(as, ir, RSET_GPR); emit_getgl(as, r, jit_L); ra_evictk(as); } } /* Coalesce BASE register for a root trace. */ static void asm_head_root_base(ASMState *as) { IRIns *ir; asm_head_lreg(as); ir = IR(REF_BASE); if (ra_hasreg(ir->r) && rset_test(as->modset, ir->r)) ra_spill(as, ir); ra_destreg(as, ir, RID_BASE); } /* Coalesce BASE register for a side trace. */ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow) { IRIns *ir; asm_head_lreg(as); ir = IR(REF_BASE); if (ra_hasreg(ir->r) && rset_test(as->modset, ir->r)) ra_spill(as, ir); if (ra_hasspill(irp->s)) { rset_clear(allow, ra_dest(as, ir, allow)); } else { Reg r = irp->r; lua_assert(ra_hasreg(r)); rset_clear(allow, r); if (r != ir->r && !rset_test(as->freeset, r)) ra_restore(as, regcost_ref(as->cost[r])); ra_destreg(as, ir, r); } return allow; } /* -- Tail of trace ------------------------------------------------------- */ /* Fixup the tail code. */ static void asm_tail_fixup(ASMState *as, TraceNo lnk) { MCode *p = as->mctop; MCode *target; int32_t spadj = as->T->spadjust; if (spadj == 0) { as->mctop = --p; } else { /* Patch stack adjustment. */ uint32_t k = emit_isk12(ARMI_ADD, spadj); lua_assert(k); p[-2] = (ARMI_ADD^k) | ARMF_D(RID_SP) | ARMF_N(RID_SP); } /* Patch exit branch. */ target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp; p[-1] = ARMI_B|(((target-p)-1)&0x00ffffffu); } /* Prepare tail of code. */ static void asm_tail_prep(ASMState *as) { MCode *p = as->mctop - 1; /* Leave room for exit branch. */ if (as->loopref) { as->invmcp = as->mcp = p; } else { as->mcp = p-1; /* Leave room for stack pointer adjustment. */ as->invmcp = NULL; } *p = 0; /* Prevent load/store merging. */ } /* -- Instruction dispatch ------------------------------------------------ */ /* Assemble a single instruction. */ static void asm_ir(ASMState *as, IRIns *ir) { switch ((IROp)ir->o) { /* Miscellaneous ops. */ case IR_LOOP: asm_loop(as); break; case IR_NOP: case IR_XBAR: lua_assert(!ra_used(ir)); break; case IR_USE: ra_alloc1(as, ir->op1, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); break; case IR_PHI: asm_phi(as, ir); break; case IR_HIOP: asm_hiop(as, ir); break; case IR_GCSTEP: asm_gcstep(as, ir); break; /* Guarded assertions. */ case IR_EQ: case IR_NE: if ((ir-1)->o == IR_HREF && ir->op1 == as->curins-1) { as->curins--; asm_href(as, ir-1, (IROp)ir->o); break; } /* fallthrough */ case IR_LT: case IR_GE: case IR_LE: case IR_GT: case IR_ULT: case IR_UGE: case IR_ULE: case IR_UGT: case IR_ABC: #if !LJ_SOFTFP if (irt_isnum(ir->t)) { asm_fpcomp(as, ir); break; } #endif asm_intcomp(as, ir); break; case IR_RETF: asm_retf(as, ir); break; /* Bit ops. */ case IR_BNOT: asm_bitop(as, ir, ARMI_MVN); break; case IR_BSWAP: asm_bitswap(as, ir); break; case IR_BAND: asm_bitop(as, ir, ARMI_AND); break; case IR_BOR: asm_bitop(as, ir, ARMI_ORR); break; case IR_BXOR: asm_bitop(as, ir, ARMI_EOR); break; case IR_BSHL: asm_bitshift(as, ir, ARMSH_LSL); break; case IR_BSHR: asm_bitshift(as, ir, ARMSH_LSR); break; case IR_BSAR: asm_bitshift(as, ir, ARMSH_ASR); break; case IR_BROR: asm_bitshift(as, ir, ARMSH_ROR); break; case IR_BROL: lua_assert(0); break; /* Arithmetic ops. */ case IR_ADD: case IR_ADDOV: asm_add(as, ir); break; case IR_SUB: case IR_SUBOV: asm_sub(as, ir); break; case IR_MUL: case IR_MULOV: asm_mul(as, ir); break; case IR_MOD: asm_callid(as, ir, IRCALL_lj_vm_modi); break; case IR_NEG: asm_neg(as, ir); break; #if LJ_SOFTFP case IR_DIV: case IR_POW: case IR_ABS: case IR_ATAN2: case IR_LDEXP: case IR_FPMATH: case IR_TOBIT: lua_assert(0); /* Unused for LJ_SOFTFP. */ break; #else case IR_DIV: asm_fparith(as, ir, ARMI_VDIV_D); break; case IR_POW: asm_callid(as, ir, IRCALL_lj_vm_powi); break; case IR_ABS: asm_fpunary(as, ir, ARMI_VABS_D); break; case IR_ATAN2: asm_callid(as, ir, IRCALL_atan2); break; case IR_LDEXP: asm_callid(as, ir, IRCALL_ldexp); break; case IR_FPMATH: if (ir->op2 == IRFPM_EXP2 && asm_fpjoin_pow(as, ir)) break; if (ir->op2 <= IRFPM_TRUNC) asm_callround(as, ir, ir->op2); else if (ir->op2 == IRFPM_SQRT) asm_fpunary(as, ir, ARMI_VSQRT_D); else asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2); break; case IR_TOBIT: asm_tobit(as, ir); break; #endif case IR_MIN: asm_min_max(as, ir, CC_GT, CC_HI); break; case IR_MAX: asm_min_max(as, ir, CC_LT, CC_LO); break; /* Memory references. */ case IR_AREF: asm_aref(as, ir); break; case IR_HREF: asm_href(as, ir, 0); break; case IR_HREFK: asm_hrefk(as, ir); break; case IR_NEWREF: asm_newref(as, ir); break; case IR_UREFO: case IR_UREFC: asm_uref(as, ir); break; case IR_FREF: asm_fref(as, ir); break; case IR_STRREF: asm_strref(as, ir); break; /* Loads and stores. */ case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: asm_ahuvload(as, ir); break; case IR_FLOAD: asm_fload(as, ir); break; case IR_XLOAD: asm_xload(as, ir); break; case IR_SLOAD: asm_sload(as, ir); break; case IR_ASTORE: case IR_HSTORE: case IR_USTORE: asm_ahustore(as, ir); break; case IR_FSTORE: asm_fstore(as, ir); break; case IR_XSTORE: asm_xstore(as, ir, 0); break; /* Allocations. */ case IR_SNEW: case IR_XSNEW: asm_snew(as, ir); break; case IR_TNEW: asm_tnew(as, ir); break; case IR_TDUP: asm_tdup(as, ir); break; case IR_CNEW: case IR_CNEWI: asm_cnew(as, ir); break; /* Write barriers. */ case IR_TBAR: asm_tbar(as, ir); break; case IR_OBAR: asm_obar(as, ir); break; /* Type conversions. */ case IR_CONV: asm_conv(as, ir); break; case IR_TOSTR: asm_tostr(as, ir); break; case IR_STRTO: asm_strto(as, ir); break; /* Calls. */ case IR_CALLN: case IR_CALLL: case IR_CALLS: asm_call(as, ir); break; case IR_CALLXS: asm_callx(as, ir); break; case IR_CARG: break; default: setintV(&as->J->errinfo, ir->o); lj_trace_err_info(as->J, LJ_TRERR_NYIIR); break; } } /* -- Trace setup --------------------------------------------------------- */ /* Ensure there are enough stack slots for call arguments. */ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) { IRRef args[CCI_NARGS_MAX*2]; uint32_t i, nargs = (int)CCI_NARGS(ci); int nslots = 0, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR, fprodd = 0; asm_collectargs(as, ir, ci, args); for (i = 0; i < nargs; i++) { if (!LJ_SOFTFP && args[i] && irt_isfp(IR(args[i])->t)) { if (!LJ_ABI_SOFTFP && !(ci->flags & CCI_VARARG)) { if (irt_isnum(IR(args[i])->t)) { if (nfpr > 0) nfpr--; else fprodd = 0, nslots = (nslots + 3) & ~1; } else { if (fprodd) fprodd--; else if (nfpr > 0) fprodd = 1, nfpr--; else nslots++; } } else if (irt_isnum(IR(args[i])->t)) { ngpr &= ~1; if (ngpr > 0) ngpr -= 2; else nslots += 2; } else { if (ngpr > 0) ngpr--; else nslots++; } } else { if (ngpr > 0) ngpr--; else nslots++; } } if (nslots > as->evenspill) /* Leave room for args in stack slots. */ as->evenspill = nslots; return REGSP_HINT(RID_RET); } static void asm_setup_target(ASMState *as) { /* May need extra exit for asm_stack_check on side traces. */ asm_exitstub_setup(as, as->T->nsnap + (as->parent ? 1 : 0)); } /* -- Trace patching ------------------------------------------------------ */ /* Patch exit jumps of existing machine code to a new target. */ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target) { MCode *p = T->mcode; MCode *pe = (MCode *)((char *)p + T->szmcode); MCode *cstart = NULL, *cend = p; MCode *mcarea = lj_mcode_patch(J, p, 0); MCode *px = exitstub_addr(J, exitno) - 2; for (; p < pe; p++) { /* Look for bl_cc exitstub, replace with b_cc target. */ uint32_t ins = *p; if ((ins & 0x0f000000u) == 0x0b000000u && ins < 0xf0000000u && ((ins ^ (px-p)) & 0x00ffffffu) == 0) { *p = (ins & 0xfe000000u) | (((target-p)-2) & 0x00ffffffu); cend = p+1; if (!cstart) cstart = p; } } lua_assert(cstart != NULL); lj_mcode_sync(cstart, cend); lj_mcode_patch(J, mcarea, 1); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_crecord.o0000664000000000000000000014022012213333065022653 0ustar rootrootELF>f@@ UHLGI4teDNfExZ~@5t@@(t:@6uDEKȀxu H HcH@6uH) H EKȀxu]UHH]LeLmH %= uf~t?HDffLJCffLJADHfǃfDfHDH]LeLmUHH]LeLmH H%= t zt4D"fLJCffLJ AAt$HfǃfDfHLH]LeLmUHu4H%t;GrHHH֋u;tVtkD@ \N wNDJBu~* 4uVt D@ ]UHAWAVAUATSH(HfAHGD$EqAMDdAtAt t uI7%tA;GrHHItL VDE`EIAwA9sA%IAwD9wEIIEeAE A} LHt t ut9rHHHtHL ADHHHAM BAV4u5wWHHHHw BA t/AE&AAAAADžDž6Dž DžDžA"Aw0DHLLljGAʍ A9sA9wAEHHADžDžH7HAfǃ (DfDfHHQDfffǃHHF DnDAE9v E9EIHIAEfǃ (DfDfHAU AMKfffHAE9wDADž DžHDE9tmfǃTfǃfǃHHDDH߸fǃTfǃfǃHH([A\A]A^A_]UHAWAVAUATSHHHIUALEDdPwIHHE :ʁuHUHHHM w(@@AHE u$AHE HExtgHUxAfLJCfDfLJ AǾHfǃfDfHfǃ CfDfǃ HAHE fǃ (fDfHAHE sHMytfqHEHEAHMHLIǺHuHfǃfDfHM A  I%tA;FrH|twu̅HUHAAI%z%=0u fǃ (fDfHAHE* HUG@IHMt ANM9rIIL}AEEuWE%t;Er*E%t9EwIIL}AUUtHMytHEHEHHELL E}%CffDfǃ HAA%=  HUHRHUAt t uI%tAN9rIIIAtu0%t9wIIILLEEw/ECffDfǃHA Ewj}u5E%t9EwIIL}ECffDfǃHAHfǃ (fDfHAAu[} tUEDffDfǃHA)A9FwAIIAEu5I%tA;FrIIIDdLL`ELLREAMMAGEAME7?HA?;9sA9wEMfEy zfǃUfDfǃpHAŋFuefEx%fǃUfDfǃHAHHfǃ*fDfHADHfǃ*fDfHAA7Hfǃ (fDfHAWKfffDHIM9uADDEH߸fǃTfǃfǃH'LAIOd'AA=H]LeLmLuL}UHH]LeLmHHA%=ztID*LfǃfDfHHC`HEdHED`ILmLmHEEHpu HED;`s H| WHPfu DHH]LeLmUHAWAVAUATSHXHHuUDdHŰuLI7}t AO9MrADeIIA$uO%t9w*@ %t9wIIIA$t‹ẼwAuDv HuHAD;AẼƒHuLILH 4H tH HfǃQfDfLHA$fǃPfDfǃHEHUHxt'xu!HuH6HHLLhA$A$t t uM/%tA;GrHIMAEtAEEHEAEu }uCHAHUHUEAMML}DHHfǃ (uffHADHtHuHH HMAE(At"AEEuHELEMDLHDuD9uWL}^Ed$EFM/AOA9sEEE%M/AOA9rEIMEeAE AfWEA} ?Lt t uM7%t9rHIALttHUH MtHuHHHEE.tHEHEHEHUHUEAuHHfǃ (MffHLEMLH t HE`Hfǃ (uffHAHHtHuLIDLH)HEHLEDLHhuLHt[H‹uHKHH'HHUHEdyHX[A\A]A^A_]UHH]LeLmLuL}H@HIUAϋdHEHAEuDA EDDffDfǃHAAtA u0fǃUfDAfDHAAA_AHfǃ fDfǃ,AFtu7AADfDfDfǃHAD0tu+HC`HUHBuā"H}EAA4uEuAuHfǃPffǃHAADeADAfDfDfǃHEELHfǃ (fDfHfDffǃHEHEfǃ (fDfHDeAKfDfEfHIvHfǃ (fDfHfDfUfHE;HuHfǃQffDHADH]LeLmLuL}UHAWAVAUATSHHIHuHEHEHuHEEd@IMtAu9rHHˋuK%t9w( %t9fwHHHˋtƒ{@@<%= uit t u%t9wHHHˋtCfAMfAfAdž LHEHUȉLUEIDxDDLANj{t2LfAdž fEfALAD#DLEHUDLANjuLfAdž*fEfALAfAdž (fAEfALED%= HUHx t@@IMtAu9rDIIA$uL%t9w' %t9wIIIA$tLLTEEAD$u1ECfAfEfAdžLAu.ECfAfEfAdžLA[LfAdž (fEfALUDfAfAfAdžLAA|$qA$bfAdžUfEfAdž LA6=HMHx tD`HEfxUHL{IMtAu9rHHHˋuL%t9w)%t9wHHHˋt<AHMLHLHEHLLfAdžfEfALHED D HEpycIUAtE;erDHt&IH*EHuLGIL1 u L t1AEHEA}%=4uzA|$ urAD$HWv8HEAAMIFEMgIuAwH DH萷AVLgIuAwH0DOAĉ¾CH߸EfǃMfDEfLHA$H]LeLmLuL}UHH]LeLmLuL}H@HDdHD`DxEIAIEuD%=&DHEMEgI6xwHHKEMEIgI6HEȃxwH DHAEtIMHDHuHO\H@fǃCffǃHAƾHfǃ(fDfHIEADuH蚯H]LeLmLuL}UHAWAVAUATSH(HDdHUDh@EEIEHEx&@gItA~9rHH΋uM%t9w*%t9@wHHH΋tug6t t ut9wHH΋tH)HHULUM$gI7A~wHMH萳AI $HDLHAŃ}tI $HULHHID$DEDDH1H([A\A]A^A_]UHATSHH uQHhHAľHfǃQffDLHA$VHGpHO` LJ xuPA@(t[A\]UHH]LeHHIHH0Hp u)I$HHuǃ,HH]LeUHSHHH%=upHxt>0HfǃffHǃ,H H[]UHATSHIHH0AT$u,d%= HH@%=t HI$x tQpHHRfǃffHID$ǃ,H@@[A\]UHH]LeHHIHH0觨I$HH0H脿H]LeUHH]LeLmH IIdHxtcpHu2Ht;SrHHЋt4Hu@@w8uu+H3{ wHƐ)H3{wHI$ME L藮I$H]LeLmlj_crecord.c(((o)->it) == (~10u))lj_ctype.hid > 0 && id < cts->top(len & (step-1)) == 0(((sval)->it) == (~12u))(((sval)->it) == (~4u))(((sval)->it) == (~10u))lj_cconv.hidx < 8(((o)->it) == (~4u))(((tv)->it) == (~10u))lj_obj.h(((((tr)) & (IRT_TYPE<<24)) == ((IRT_CDATA)<<24))) && cd->ctypeid == CTID_CTYPEID((((ct->info)) >> 28) == CT_ARRAY) || ((((ct->info)) >> 28) == CT_STRUCT)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))ctype_child(cts, cct)->size == 4(((&rd->argv[1])->it) == (~10u))(((&rd->argv[1])->it) == (~4u))((((fct->info)) >> 28) == CT_FIELD)((((ctf->info)) >> 28) == CT_FIELD)(((&rd->argv[i])->it) == (~4u))(((&rd->argv[0])->it) == (~12u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&rd->argv[0])->it) == (~4u))(((&rd->argv[0])->it) == (~10u))ctype_checkctype_childrecff_cdata_indexargv2cdatacrec_constructorcrec_index_metacrec_ct_tvcconv_idxcrec_copycrec_call_argsrecff_cdata_arithrecff_clib_indexargv2ctypesetgcVrecff_ffi_abirecff_ffi_xoflj_crecord_tonumberGCC: (Debian 4.7.3-4) 4.7.3zRx AC | $<AC P $dAC P AC  (AC P (lAC MZ >AC y $$]AC TD (LsAC [S $x AC S (AC M (vAC XY ( AC M ($ AC P (PAC M (|wAC XZ  >AC Lm 7AC Em (7AC X (AC X (D6AC M$  pAC C  zAC Li  AC E  AC C  JAC Ly $$YAC PD .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @YXw@&]%zs/ : S^#vi `1   JXdo|*:' Laoz1 <`LwO>P7LP70Q?"S6NXU_q'VzVCWYXJXYlj_crecord.ccrec_reassoc_ofscrec_constructor__PRETTY_FUNCTION__.5641argv2cdata__PRETTY_FUNCTION__.5634crec_ct2irt__PRETTY_FUNCTION__.4231crec_copy__PRETTY_FUNCTION__.5723__PRETTY_FUNCTION__.4240crec_ct_tv__PRETTY_FUNCTION__.5850__PRETTY_FUNCTION__.4415crec_tointcrec_finalizercrec_fillargv2ctype__PRETTY_FUNCTION__.5648crec_alloccrec_tv_ct__PRETTY_FUNCTION__.5894__PRETTY_FUNCTION__.5876__PRETTY_FUNCTION__.5971__PRETTY_FUNCTION__.6072__PRETTY_FUNCTION__.6085__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.6148__PRETTY_FUNCTION__.6155__PRETTY_FUNCTION__.6167__assert_faillj_opt_foldlj_ir_kintlj_trace_errlj_ir_type_sizelj_ir_kint64lj_ir_calllj_ir_kptr_lj_ctype_getfieldqlj_ir_kgclj_ir_knum_u64lj_opt_narrow_tointlj_cparselj_ctype_infolj_cconv_multi_initlj_ctype_metalj_ctype_internrecff_cdata_indexlj_opt_narrow_cindexlj_ctype_sizelj_tab_getlj_record_constifyrecff_cdata_calllj_ccall_ctid_vararglj_snap_addrecff_cdata_arithrecff_clib_indexlj_ctype_getnamelj_tab_getstrrecff_ffi_newrecff_ffi_errnorecff_ffi_stringrecff_ffi_copyrecff_ffi_fillrecff_ffi_typeoflj_trace_err_inforecff_ffi_istyperecff_ffi_abirecff_ffi_xoflj_ctype_rawrefrecff_ffi_gclj_crecord_tonumber @  ()*)R+] 2g l  q()*)  # . (  * / X4(Y  c #h m(  # .( ,   F(* 4 #9 .>(   # (  # .(-)){))):.]) *2 /b pl q \v ( ) * ) ) -= )} p  u ( 0 1 )  #! .& (8 pB G  L (c * + - )  # . (V ` #e .j ( p   ( );  E #J O (f p #u .z (  # . ( ): D #I .N()-))   # .(B L #Q .V( {  (  {  !(5 W2q-*)*)c)y3))=))))l)-)2)3)E-e))))).-N)m))*+  # .(H.X*~)1)*)1!).*N)]+T))-)*)-;)a).)# - 2 7(G1g)4+&5= G #L .Q(  # .(+*c/v*-))6G  Q #V [(p z # .(+ -) )z *  # .!(S!  ]! #b! g!(z! ! #! .!(!+!*)"-L")t"+"-")"*#7 $)@$)p$*$)%8E%*f%)%)%-%)%)&-(&)U&)a&-&)&)&+&*&)Z' d' #i' .n'(' ' #' .'((  ( #!( &((6( @( #E( .J((()(:(-))/);Q)-s)))))  ) ) H)() * # * .*(G* Q* #V* .[*(*) +)+-=+)f+)+)+  + + p+(, !, #&, .+,(c, m, #r, .w,(,0,1,)/- 9- #>- .C-(s-2-*-+-  - - -(.1A.).  . #. .(. . #. ..(/70/+N/1/</=/+/ `/ / p0(01@0)R0+g0-0)0 0 #0 .0(0)#1 -1 #21 .71(n2 x2 #}2 .2(2 2 #2 .2()3  33 #83 =3(M3 W3 #\3 .a3(3)3  3 #3 4(4 4 ##4 .(4(4<4+4+5*B5)5 5 #5 .5( 6+_6 i6 #n6 .s6(6 6 6 6(6+6?6 7 # 7 .7(C7 M7 #R7 .W7(7+7)48)8)8)29+9@9*X:*z:):);)<;)l; v; #{; .;(; ; #; .;(;7<1J<+6= @= #E= .J=(= = #= .=(= > # > .>(p>)>  > #> >(> > #> .>(;?)w?)? ? #? .?(?)@8@ '@ #,@ .1@(L@-n@)@ @ #@ .@(@).A/CA MA #RA .WA(~A A #A .A(A A #A .A(3B =B #BB .GB(~B B B B(B0B1B)C  $C #)C .C(FC PC #UC .ZC(nC*LE)E)FF)VF*xF)G;CG)QG*sG)G)mH;H)H)H-I)LI)fI8pI*I)fJ pJ #uJ .zJ(J J #J .J(J7FK PK #UK .ZK(K K #K .K(K7K1-L+L L L L(L L L pM("MC1MDlM1M)M M #M .M(N2,N*QN [N `N eN(N N #N .N(N N #N .N(O-$O/O O O O(O1O+0P+?P.P P #P .P(P Q #Q . Q(7Q.eQ)Q R # R .R(BR LR #QR .VR(R)R*R)S S #S .S(S S #S .S(/T  9T #>T CT(TT ^T #cT .hT(T5T T #T .T((U*U*U*U)V  V V (V(VKV V V PV(V1W)8W+wWOW+W+W W W pW(W1"X)X X X pX(XOY Y #Y .$Y(wY Y #Y .Y(Y Y #Y .Y(99 (08@HPX`hIpIx xx (08@H|PX`hpx @h's(Pz|#'(1T<`LOPLPQH"StXU'VVCWYX(Xtarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vmevent.c0000664000000000000000000000275312202141143022702 0ustar rootroot/* ** VM event handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include #define lj_vmevent_c #define LUA_CORE #include "lj_obj.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_state.h" #include "lj_dispatch.h" #include "lj_vm.h" #include "lj_vmevent.h" ptrdiff_t lj_vmevent_prepare(lua_State *L, VMEvent ev) { global_State *g = G(L); GCstr *s = lj_str_newlit(L, LJ_VMEVENTS_REGKEY); cTValue *tv = lj_tab_getstr(tabV(registry(L)), s); if (tvistab(tv)) { int hash = VMEVENT_HASH(ev); tv = lj_tab_getint(tabV(tv), hash); if (tv && tvisfunc(tv)) { lj_state_checkstack(L, LUA_MINSTACK); setfuncV(L, L->top++, funcV(tv)); return savestack(L, L->top); } } g->vmevmask &= ~VMEVENT_MASK(ev); /* No handler: cache this fact. */ return 0; } void lj_vmevent_call(lua_State *L, ptrdiff_t argbase) { global_State *g = G(L); uint8_t oldmask = g->vmevmask; uint8_t oldh = hook_save(g); int status; g->vmevmask = 0; /* Disable all events. */ hook_vmevent(g); status = lj_vm_pcall(L, restorestack(L, argbase), 0+1, 0); if (LJ_UNLIKELY(status)) { /* Really shouldn't use stderr here, but where else to complain? */ L->top--; fputs("VM handler failed: ", stderr); fputs(tvisstr(L->top) ? strVdata(L->top) : "?", stderr); fputc('\n', stderr); } hook_restore(g, oldh); if (g->vmevmask != VMEVENT_NOCACHE) g->vmevmask = oldmask; /* Restore event mask, but not if not modified. */ } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_alloc.h0000664000000000000000000000051212202141143022304 0ustar rootroot/* ** Bundled memory allocator. ** Donated to the public domain. */ #ifndef _LJ_ALLOC_H #define _LJ_ALLOC_H #include "lj_def.h" #ifndef LUAJIT_USE_SYSMALLOC LJ_FUNC void *lj_alloc_create(void); LJ_FUNC void lj_alloc_destroy(void *msp); LJ_FUNC void *lj_alloc_f(void *msp, void *ptr, size_t osize, size_t nsize); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_init.o0000664000000000000000000000675012213333061022343 0ustar rootrootELF>@@ UHAUATSHHAHI4$HHIIt$Hu9HI$DHIIt$Hu־H*HAAH[A\A]]_PRELOADpackagetableioosstringmathdebugbitjitffiGCC: (Debian 4.7.3-4) 4.7.3zRx $AC I .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @  &,12<E@ @  M0 V=k@@f  u       '5BSbkxlib_init.clj_lib_loadlj_lib_preloadluaL_openlibsluaopen_baselua_pushcclosurelua_pushstringlua_calllua_setfieldlua_settopluaL_findtableluaopen_ffiluaopen_packageluaopen_tableluaopen_ioluaopen_osluaopen_stringluaopen_mathluaopen_debugluaopen_bitluaopen_jit  $0B_n       (08@HPX`%hp*x048 tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cconv.c0000664000000000000000000005744012202141143022331 0ustar rootroot/* ** C type conversions. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_err.h" #include "lj_tab.h" #include "lj_ctype.h" #include "lj_cdata.h" #include "lj_cconv.h" #include "lj_ccallback.h" /* -- Conversion errors --------------------------------------------------- */ /* Bad conversion. */ LJ_NORET static void cconv_err_conv(CTState *cts, CType *d, CType *s, CTInfo flags) { const char *dst = strdata(lj_ctype_repr(cts->L, ctype_typeid(cts, d), NULL)); const char *src; if ((flags & CCF_FROMTV)) src = lj_obj_typename[1+(ctype_isnum(s->info) ? LUA_TNUMBER : ctype_isarray(s->info) ? LUA_TSTRING : LUA_TNIL)]; else src = strdata(lj_ctype_repr(cts->L, ctype_typeid(cts, s), NULL)); if (CCF_GETARG(flags)) lj_err_argv(cts->L, CCF_GETARG(flags), LJ_ERR_FFI_BADCONV, src, dst); else lj_err_callerv(cts->L, LJ_ERR_FFI_BADCONV, src, dst); } /* Bad conversion from TValue. */ LJ_NORET static void cconv_err_convtv(CTState *cts, CType *d, TValue *o, CTInfo flags) { const char *dst = strdata(lj_ctype_repr(cts->L, ctype_typeid(cts, d), NULL)); const char *src = lj_typename(o); if (CCF_GETARG(flags)) lj_err_argv(cts->L, CCF_GETARG(flags), LJ_ERR_FFI_BADCONV, src, dst); else lj_err_callerv(cts->L, LJ_ERR_FFI_BADCONV, src, dst); } /* Initializer overflow. */ LJ_NORET static void cconv_err_initov(CTState *cts, CType *d) { const char *dst = strdata(lj_ctype_repr(cts->L, ctype_typeid(cts, d), NULL)); lj_err_callerv(cts->L, LJ_ERR_FFI_INITOV, dst); } /* -- C type compatibility checks ----------------------------------------- */ /* Get raw type and qualifiers for a child type. Resolves enums, too. */ static CType *cconv_childqual(CTState *cts, CType *ct, CTInfo *qual) { ct = ctype_child(cts, ct); for (;;) { if (ctype_isattrib(ct->info)) { if (ctype_attrib(ct->info) == CTA_QUAL) *qual |= ct->size; } else if (!ctype_isenum(ct->info)) { break; } ct = ctype_child(cts, ct); } *qual |= (ct->info & CTF_QUAL); return ct; } /* Check for compatible types when converting to a pointer. ** Note: these checks are more relaxed than what C99 mandates. */ int lj_cconv_compatptr(CTState *cts, CType *d, CType *s, CTInfo flags) { if (!((flags & CCF_CAST) || d == s)) { CTInfo dqual = 0, squal = 0; d = cconv_childqual(cts, d, &dqual); if (!ctype_isstruct(s->info)) s = cconv_childqual(cts, s, &squal); if ((flags & CCF_SAME)) { if (dqual != squal) return 0; /* Different qualifiers. */ } else if (!(flags & CCF_IGNQUAL)) { if ((dqual & squal) != squal) return 0; /* Discarded qualifiers. */ if (ctype_isvoid(d->info) || ctype_isvoid(s->info)) return 1; /* Converting to/from void * is always ok. */ } if (ctype_type(d->info) != ctype_type(s->info) || d->size != s->size) return 0; /* Different type or different size. */ if (ctype_isnum(d->info)) { if (((d->info ^ s->info) & (CTF_BOOL|CTF_FP))) return 0; /* Different numeric types. */ } else if (ctype_ispointer(d->info)) { /* Check child types for compatibility. */ return lj_cconv_compatptr(cts, d, s, flags|CCF_SAME); } else if (ctype_isstruct(d->info)) { if (d != s) return 0; /* Must be exact same type for struct/union. */ } else if (ctype_isfunc(d->info)) { /* NYI: structural equality of functions. */ } } return 1; /* Types are compatible. */ } /* -- C type to C type conversion ----------------------------------------- */ /* Convert C type to C type. Caveat: expects to get the raw CType! ** ** Note: This is only used by the interpreter and not optimized at all. ** The JIT compiler will do a much better job specializing for each case. */ void lj_cconv_ct_ct(CTState *cts, CType *d, CType *s, uint8_t *dp, uint8_t *sp, CTInfo flags) { CTSize dsize = d->size, ssize = s->size; CTInfo dinfo = d->info, sinfo = s->info; void *tmpptr; lua_assert(!ctype_isenum(dinfo) && !ctype_isenum(sinfo)); lua_assert(!ctype_isattrib(dinfo) && !ctype_isattrib(sinfo)); if (ctype_type(dinfo) > CT_MAYCONVERT || ctype_type(sinfo) > CT_MAYCONVERT) goto err_conv; /* Some basic sanity checks. */ lua_assert(!ctype_isnum(dinfo) || dsize > 0); lua_assert(!ctype_isnum(sinfo) || ssize > 0); lua_assert(!ctype_isbool(dinfo) || dsize == 1 || dsize == 4); lua_assert(!ctype_isbool(sinfo) || ssize == 1 || ssize == 4); lua_assert(!ctype_isinteger(dinfo) || (1u< ssize) { /* Zero-extend or sign-extend LSB. */ #if LJ_LE uint8_t fill = (!(sinfo & CTF_UNSIGNED) && (sp[ssize-1]&0x80)) ? 0xff : 0; memcpy(dp, sp, ssize); memset(dp + ssize, fill, dsize-ssize); #else uint8_t fill = (!(sinfo & CTF_UNSIGNED) && (sp[0]&0x80)) ? 0xff : 0; memset(dp, fill, dsize-ssize); memcpy(dp + (dsize-ssize), sp, ssize); #endif } else { /* Copy LSB. */ #if LJ_LE memcpy(dp, sp, dsize); #else memcpy(dp, sp + (ssize-dsize), dsize); #endif } break; case CCX(I, F): { double n; /* Always convert via double. */ conv_I_F: /* Convert source to double. */ if (ssize == sizeof(double)) n = *(double *)sp; else if (ssize == sizeof(float)) n = (double)*(float *)sp; else goto err_conv; /* NYI: long double. */ /* Then convert double to integer. */ /* The conversion must exactly match the semantics of JIT-compiled code! */ if (dsize < 4 || (dsize == 4 && !(dinfo & CTF_UNSIGNED))) { int32_t i = (int32_t)n; if (dsize == 4) *(int32_t *)dp = i; else if (dsize == 2) *(int16_t *)dp = (int16_t)i; else *(int8_t *)dp = (int8_t)i; } else if (dsize == 4) { *(uint32_t *)dp = (uint32_t)n; } else if (dsize == 8) { if (!(dinfo & CTF_UNSIGNED)) *(int64_t *)dp = (int64_t)n; else *(uint64_t *)dp = lj_num2u64(n); } else { goto err_conv; /* NYI: conversion to >64 bit integers. */ } break; } case CCX(I, C): s = ctype_child(cts, s); sinfo = s->info; ssize = s->size; goto conv_I_F; /* Just convert re. */ case CCX(I, P): if (!(flags & CCF_CAST)) goto err_conv; sinfo = CTINFO(CT_NUM, CTF_UNSIGNED); goto conv_I_I; case CCX(I, A): if (!(flags & CCF_CAST)) goto err_conv; sinfo = CTINFO(CT_NUM, CTF_UNSIGNED); ssize = CTSIZE_PTR; tmpptr = sp; sp = (uint8_t *)&tmpptr; goto conv_I_I; /* Destination is a floating-point number. */ case CCX(F, B): case CCX(F, I): { double n; /* Always convert via double. */ conv_F_I: /* First convert source to double. */ /* The conversion must exactly match the semantics of JIT-compiled code! */ if (ssize < 4 || (ssize == 4 && !(sinfo & CTF_UNSIGNED))) { int32_t i; if (ssize == 4) { i = *(int32_t *)sp; } else if (!(sinfo & CTF_UNSIGNED)) { if (ssize == 2) i = *(int16_t *)sp; else i = *(int8_t *)sp; } else { if (ssize == 2) i = *(uint16_t *)sp; else i = *(uint8_t *)sp; } n = (double)i; } else if (ssize == 4) { n = (double)*(uint32_t *)sp; } else if (ssize == 8) { if (!(sinfo & CTF_UNSIGNED)) n = (double)*(int64_t *)sp; else n = (double)*(uint64_t *)sp; } else { goto err_conv; /* NYI: conversion from >64 bit integers. */ } /* Convert double to destination. */ if (dsize == sizeof(double)) *(double *)dp = n; else if (dsize == sizeof(float)) *(float *)dp = (float)n; else goto err_conv; /* NYI: long double. */ break; } case CCX(F, F): { double n; /* Always convert via double. */ conv_F_F: if (ssize == dsize) goto copyval; /* Convert source to double. */ if (ssize == sizeof(double)) n = *(double *)sp; else if (ssize == sizeof(float)) n = (double)*(float *)sp; else goto err_conv; /* NYI: long double. */ /* Convert double to destination. */ if (dsize == sizeof(double)) *(double *)dp = n; else if (dsize == sizeof(float)) *(float *)dp = (float)n; else goto err_conv; /* NYI: long double. */ break; } case CCX(F, C): s = ctype_child(cts, s); sinfo = s->info; ssize = s->size; goto conv_F_F; /* Ignore im, and convert from re. */ /* Destination is a complex number. */ case CCX(C, I): d = ctype_child(cts, d); dinfo = d->info; dsize = d->size; memset(dp + dsize, 0, dsize); /* Clear im. */ goto conv_F_I; /* Convert to re. */ case CCX(C, F): d = ctype_child(cts, d); dinfo = d->info; dsize = d->size; memset(dp + dsize, 0, dsize); /* Clear im. */ goto conv_F_F; /* Convert to re. */ case CCX(C, C): if (dsize != ssize) { /* Different types: convert re/im separately. */ CType *dc = ctype_child(cts, d); CType *sc = ctype_child(cts, s); lj_cconv_ct_ct(cts, dc, sc, dp, sp, flags); lj_cconv_ct_ct(cts, dc, sc, dp + dc->size, sp + sc->size, flags); return; } goto copyval; /* Otherwise this is easy. */ /* Destination is a vector. */ case CCX(V, I): case CCX(V, F): case CCX(V, C): { CType *dc = ctype_child(cts, d); CTSize esize; /* First convert the scalar to the first element. */ lj_cconv_ct_ct(cts, dc, s, dp, sp, flags); /* Then replicate it to the other elements (splat). */ for (sp = dp, esize = dc->size; dsize > esize; dsize -= esize) { dp += esize; memcpy(dp, sp, esize); } break; } case CCX(V, V): /* Copy same-sized vectors, even for different lengths/element-types. */ if (dsize != ssize) goto err_conv; goto copyval; /* Destination is a pointer. */ case CCX(P, I): if (!(flags & CCF_CAST)) goto err_conv; dinfo = CTINFO(CT_NUM, CTF_UNSIGNED); goto conv_I_I; case CCX(P, F): if (!(flags & CCF_CAST) || !(flags & CCF_FROMTV)) goto err_conv; /* The signed conversion is cheaper. x64 really has 47 bit pointers. */ dinfo = CTINFO(CT_NUM, (LJ_64 && dsize == 8) ? 0 : CTF_UNSIGNED); goto conv_I_F; case CCX(P, P): if (!lj_cconv_compatptr(cts, d, s, flags)) goto err_conv; cdata_setptr(dp, dsize, cdata_getptr(sp, ssize)); break; case CCX(P, A): case CCX(P, S): if (!lj_cconv_compatptr(cts, d, s, flags)) goto err_conv; cdata_setptr(dp, dsize, sp); break; /* Destination is an array. */ case CCX(A, A): if ((flags & CCF_CAST) || (d->info & CTF_VLA) || dsize != ssize || d->size == CTSIZE_INVALID || !lj_cconv_compatptr(cts, d, s, flags)) goto err_conv; goto copyval; /* Destination is a struct/union. */ case CCX(S, S): if ((flags & CCF_CAST) || (d->info & CTF_VLA) || d != s) goto err_conv; /* Must be exact same type. */ copyval: /* Copy value. */ lua_assert(dsize == ssize); memcpy(dp, sp, dsize); break; default: err_conv: cconv_err_conv(cts, d, s, flags); } } /* -- C type to TValue conversion ----------------------------------------- */ /* Convert C type to TValue. Caveat: expects to get the raw CType! */ int lj_cconv_tv_ct(CTState *cts, CType *s, CTypeID sid, TValue *o, uint8_t *sp) { CTInfo sinfo = s->info; if (ctype_isnum(sinfo)) { if (!ctype_isbool(sinfo)) { if (ctype_isinteger(sinfo) && s->size > 4) goto copyval; if (LJ_DUALNUM && ctype_isinteger(sinfo)) { int32_t i; lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT32), s, (uint8_t *)&i, sp, 0); if ((sinfo & CTF_UNSIGNED) && i < 0) setnumV(o, (lua_Number)(uint32_t)i); else setintV(o, i); } else { lj_cconv_ct_ct(cts, ctype_get(cts, CTID_DOUBLE), s, (uint8_t *)&o->n, sp, 0); /* Numbers are NOT canonicalized here! Beware of uninitialized data. */ lua_assert(tvisnum(o)); } } else { uint32_t b = s->size == 1 ? (*sp != 0) : (*(int *)sp != 0); setboolV(o, b); setboolV(&cts->g->tmptv2, b); /* Remember for trace recorder. */ } return 0; } else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) { /* Create reference. */ setcdataV(cts->L, o, lj_cdata_newref(cts, sp, sid)); return 1; /* Need GC step. */ } else { GCcdata *cd; CTSize sz; copyval: /* Copy value. */ sz = s->size; lua_assert(sz != CTSIZE_INVALID); /* Attributes are stripped, qualifiers are kept (but mostly ignored). */ cd = lj_cdata_new(cts, ctype_typeid(cts, s), sz); setcdataV(cts->L, o, cd); memcpy(cdataptr(cd), sp, sz); return 1; /* Need GC step. */ } } /* Convert bitfield to TValue. */ int lj_cconv_tv_bf(CTState *cts, CType *s, TValue *o, uint8_t *sp) { CTInfo info = s->info; CTSize pos, bsz; uint32_t val; lua_assert(ctype_isbitfield(info)); /* NYI: packed bitfields may cause misaligned reads. */ switch (ctype_bitcsz(info)) { case 4: val = *(uint32_t *)sp; break; case 2: val = *(uint16_t *)sp; break; case 1: val = *(uint8_t *)sp; break; default: lua_assert(0); val = 0; break; } /* Check if a packed bitfield crosses a container boundary. */ pos = ctype_bitpos(info); bsz = ctype_bitbsz(info); lua_assert(pos < 8*ctype_bitcsz(info)); lua_assert(bsz > 0 && bsz <= 8*ctype_bitcsz(info)); if (pos + bsz > 8*ctype_bitcsz(info)) lj_err_caller(cts->L, LJ_ERR_FFI_NYIPACKBIT); if (!(info & CTF_BOOL)) { CTSize shift = 32 - bsz; if (!(info & CTF_UNSIGNED)) { setintV(o, (int32_t)(val << (shift-pos)) >> shift); } else { val = (val << (shift-pos)) >> shift; if (!LJ_DUALNUM || (int32_t)val < 0) setnumV(o, (lua_Number)(uint32_t)val); else setintV(o, (int32_t)val); } } else { lua_assert(bsz == 1); setboolV(o, (val >> pos) & 1); } return 0; /* No GC step needed. */ } /* -- TValue to C type conversion ----------------------------------------- */ /* Convert table to array. */ static void cconv_array_tab(CTState *cts, CType *d, uint8_t *dp, GCtab *t, CTInfo flags) { int32_t i; CType *dc = ctype_rawchild(cts, d); /* Array element type. */ CTSize size = d->size, esize = dc->size, ofs = 0; for (i = 0; ; i++) { TValue *tv = (TValue *)lj_tab_getint(t, i); if (!tv || tvisnil(tv)) { if (i == 0) continue; /* Try again for 1-based tables. */ break; /* Stop at first nil. */ } if (ofs >= size) cconv_err_initov(cts, d); lj_cconv_ct_tv(cts, dc, dp + ofs, tv, flags); ofs += esize; } if (size != CTSIZE_INVALID) { /* Only fill up arrays with known size. */ if (ofs == esize) { /* Replicate a single element. */ for (; ofs < size; ofs += esize) memcpy(dp + ofs, dp, esize); } else { /* Otherwise fill the remainder with zero. */ memset(dp + ofs, 0, size - ofs); } } } /* Convert table to sub-struct/union. */ static void cconv_substruct_tab(CTState *cts, CType *d, uint8_t *dp, GCtab *t, int32_t *ip, CTInfo flags) { CTypeID id = d->sib; while (id) { CType *df = ctype_get(cts, id); id = df->sib; if (ctype_isfield(df->info) || ctype_isbitfield(df->info)) { TValue *tv; int32_t i = *ip, iz = i; if (!gcref(df->name)) continue; /* Ignore unnamed fields. */ if (i >= 0) { retry: tv = (TValue *)lj_tab_getint(t, i); if (!tv || tvisnil(tv)) { if (i == 0) { i = 1; goto retry; } /* 1-based tables. */ if (iz == 0) { *ip = i = -1; goto tryname; } /* Init named fields. */ break; /* Stop at first nil. */ } *ip = i + 1; } else { tryname: tv = (TValue *)lj_tab_getstr(t, gco2str(gcref(df->name))); if (!tv || tvisnil(tv)) continue; } if (ctype_isfield(df->info)) lj_cconv_ct_tv(cts, ctype_rawchild(cts, df), dp+df->size, tv, flags); else lj_cconv_bf_tv(cts, df, dp+df->size, tv); if ((d->info & CTF_UNION)) break; } else if (ctype_isxattrib(df->info, CTA_SUBTYPE)) { cconv_substruct_tab(cts, ctype_rawchild(cts, df), dp+df->size, t, ip, flags); } /* Ignore all other entries in the chain. */ } } /* Convert table to struct/union. */ static void cconv_struct_tab(CTState *cts, CType *d, uint8_t *dp, GCtab *t, CTInfo flags) { int32_t i = 0; memset(dp, 0, d->size); /* Much simpler to clear the struct first. */ cconv_substruct_tab(cts, d, dp, t, &i, flags); } /* Convert TValue to C type. Caveat: expects to get the raw CType! */ void lj_cconv_ct_tv(CTState *cts, CType *d, uint8_t *dp, TValue *o, CTInfo flags) { CTypeID sid = CTID_P_VOID; CType *s; void *tmpptr; uint8_t tmpbool, *sp = (uint8_t *)&tmpptr; if (LJ_LIKELY(tvisint(o))) { sp = (uint8_t *)&o->i; sid = CTID_INT32; flags |= CCF_FROMTV; } else if (LJ_LIKELY(tvisnum(o))) { sp = (uint8_t *)&o->n; sid = CTID_DOUBLE; flags |= CCF_FROMTV; } else if (tviscdata(o)) { sp = cdataptr(cdataV(o)); sid = cdataV(o)->ctypeid; s = ctype_get(cts, sid); if (ctype_isref(s->info)) { /* Resolve reference for value. */ lua_assert(s->size == CTSIZE_PTR); sp = *(void **)sp; sid = ctype_cid(s->info); } s = ctype_raw(cts, sid); if (ctype_isfunc(s->info)) { sid = lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|sid), CTSIZE_PTR); } else { if (ctype_isenum(s->info)) s = ctype_child(cts, s); goto doconv; } } else if (tvisstr(o)) { GCstr *str = strV(o); if (ctype_isenum(d->info)) { /* Match string against enum constant. */ CTSize ofs; CType *cct = lj_ctype_getfield(cts, d, str, &ofs); if (!cct || !ctype_isconstval(cct->info)) goto err_conv; lua_assert(d->size == 4); sp = (uint8_t *)&cct->size; sid = ctype_cid(cct->info); } else if (ctype_isrefarray(d->info)) { /* Copy string to array. */ CType *dc = ctype_rawchild(cts, d); CTSize sz = str->len+1; if (!ctype_isinteger(dc->info) || dc->size != 1) goto err_conv; if (d->size != 0 && d->size < sz) sz = d->size; memcpy(dp, strdata(str), sz); return; } else { /* Otherwise pass it as a const char[]. */ sp = (uint8_t *)strdata(str); sid = CTID_A_CCHAR; flags |= CCF_FROMTV; } } else if (tvistab(o)) { if (ctype_isarray(d->info)) { cconv_array_tab(cts, d, dp, tabV(o), flags); return; } else if (ctype_isstruct(d->info)) { cconv_struct_tab(cts, d, dp, tabV(o), flags); return; } else { goto err_conv; } } else if (tvisbool(o)) { tmpbool = boolV(o); sp = &tmpbool; sid = CTID_BOOL; } else if (tvisnil(o)) { tmpptr = (void *)0; flags |= CCF_FROMTV; } else if (tvisudata(o)) { GCudata *ud = udataV(o); tmpptr = uddata(ud); if (ud->udtype == UDTYPE_IO_FILE) tmpptr = *(void **)tmpptr; } else if (tvislightud(o)) { tmpptr = lightudV(o); } else if (tvisfunc(o)) { void *p = lj_ccallback_new(cts, d, funcV(o)); if (p) { *(void **)dp = p; return; } goto err_conv; } else { err_conv: cconv_err_convtv(cts, d, o, flags); } s = ctype_get(cts, sid); doconv: if (ctype_isenum(d->info)) d = ctype_child(cts, d); lj_cconv_ct_ct(cts, d, s, dp, sp, flags); } /* Convert TValue to bitfield. */ void lj_cconv_bf_tv(CTState *cts, CType *d, uint8_t *dp, TValue *o) { CTInfo info = d->info; CTSize pos, bsz; uint32_t val, mask; lua_assert(ctype_isbitfield(info)); if ((info & CTF_BOOL)) { uint8_t tmpbool; lua_assert(ctype_bitbsz(info) == 1); lj_cconv_ct_tv(cts, ctype_get(cts, CTID_BOOL), &tmpbool, o, 0); val = tmpbool; } else { CTypeID did = (info & CTF_UNSIGNED) ? CTID_UINT32 : CTID_INT32; lj_cconv_ct_tv(cts, ctype_get(cts, did), (uint8_t *)&val, o, 0); } pos = ctype_bitpos(info); bsz = ctype_bitbsz(info); lua_assert(pos < 8*ctype_bitcsz(info)); lua_assert(bsz > 0 && bsz <= 8*ctype_bitcsz(info)); /* Check if a packed bitfield crosses a container boundary. */ if (pos + bsz > 8*ctype_bitcsz(info)) lj_err_caller(cts->L, LJ_ERR_FFI_NYIPACKBIT); mask = ((1u << bsz) - 1u) << pos; val = (val << pos) & mask; /* NYI: packed bitfields may cause misaligned reads/writes. */ switch (ctype_bitcsz(info)) { case 4: *(uint32_t *)dp = (*(uint32_t *)dp & ~mask) | (uint32_t)val; break; case 2: *(uint16_t *)dp = (*(uint16_t *)dp & ~mask) | (uint16_t)val; break; case 1: *(uint8_t *)dp = (*(uint8_t *)dp & ~mask) | (uint8_t)val; break; default: lua_assert(0); break; } } /* -- Initialize C type with TValues -------------------------------------- */ /* Initialize an array with TValues. */ static void cconv_array_init(CTState *cts, CType *d, CTSize sz, uint8_t *dp, TValue *o, MSize len) { CType *dc = ctype_rawchild(cts, d); /* Array element type. */ CTSize ofs, esize = dc->size; MSize i; if (len*esize > sz) cconv_err_initov(cts, d); for (i = 0, ofs = 0; i < len; i++, ofs += esize) lj_cconv_ct_tv(cts, dc, dp + ofs, o + i, 0); if (ofs == esize) { /* Replicate a single element. */ for (; ofs < sz; ofs += esize) memcpy(dp + ofs, dp, esize); } else { /* Otherwise fill the remainder with zero. */ memset(dp + ofs, 0, sz - ofs); } } /* Initialize a sub-struct/union with TValues. */ static void cconv_substruct_init(CTState *cts, CType *d, uint8_t *dp, TValue *o, MSize len, MSize *ip) { CTypeID id = d->sib; while (id) { CType *df = ctype_get(cts, id); id = df->sib; if (ctype_isfield(df->info) || ctype_isbitfield(df->info)) { MSize i = *ip; if (!gcref(df->name)) continue; /* Ignore unnamed fields. */ if (i >= len) break; *ip = i + 1; if (ctype_isfield(df->info)) lj_cconv_ct_tv(cts, ctype_rawchild(cts, df), dp+df->size, o + i, 0); else lj_cconv_bf_tv(cts, df, dp+df->size, o + i); if ((d->info & CTF_UNION)) break; } else if (ctype_isxattrib(df->info, CTA_SUBTYPE)) { cconv_substruct_init(cts, ctype_rawchild(cts, df), dp+df->size, o, len, ip); } /* Ignore all other entries in the chain. */ } } /* Initialize a struct/union with TValues. */ static void cconv_struct_init(CTState *cts, CType *d, CTSize sz, uint8_t *dp, TValue *o, MSize len) { MSize i = 0; memset(dp, 0, sz); /* Much simpler to clear the struct first. */ cconv_substruct_init(cts, d, dp, o, len, &i); if (i < len) cconv_err_initov(cts, d); } /* Check whether to use a multi-value initializer. ** This is true if an aggregate is to be initialized with a value. ** Valarrays are treated as values here so ct_tv handles (V|C, I|F). */ int lj_cconv_multi_init(CTState *cts, CType *d, TValue *o) { if (!(ctype_isrefarray(d->info) || ctype_isstruct(d->info))) return 0; /* Destination is not an aggregate. */ if (tvistab(o) || (tvisstr(o) && !ctype_isstruct(d->info))) return 0; /* Initializer is not a value. */ if (tviscdata(o) && lj_ctype_rawref(cts, cdataV(o)->ctypeid) == d) return 0; /* Source and destination are identical aggregates. */ return 1; /* Otherwise the initializer is a value. */ } /* Initialize C type with TValues. Caveat: expects to get the raw CType! */ void lj_cconv_ct_init(CTState *cts, CType *d, CTSize sz, uint8_t *dp, TValue *o, MSize len) { if (len == 0) memset(dp, 0, sz); else if (len == 1 && !lj_cconv_multi_init(cts, d, o)) lj_cconv_ct_tv(cts, d, dp, o, 0); else if (ctype_isarray(d->info)) /* Also handles valarray init with len>1. */ cconv_array_init(cts, d, sz, dp, o, len); else if (ctype_isstruct(d->info)) cconv_struct_init(cts, d, sz, dp, o, len); else cconv_err_initov(cts, d); } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_tab.c0000664000000000000000000004321712231715321021773 0ustar rootroot/* ** Table handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_tab_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_tab.h" /* -- Object hashing ------------------------------------------------------ */ /* Hash values are masked with the table hash mask and used as an index. */ static LJ_AINLINE Node *hashmask(const GCtab *t, uint32_t hash) { Node *n = noderef(t->node); return &n[hash & t->hmask]; } /* String hashes are precomputed when they are interned. */ #define hashstr(t, s) hashmask(t, (s)->hash) #define hashlohi(t, lo, hi) hashmask((t), hashrot((lo), (hi))) #define hashnum(t, o) hashlohi((t), (o)->u32.lo, ((o)->u32.hi << 1)) #define hashptr(t, p) hashlohi((t), u32ptr(p), u32ptr(p) + HASH_BIAS) #define hashgcref(t, r) hashlohi((t), gcrefu(r), gcrefu(r) + HASH_BIAS) /* Hash an arbitrary key and return its anchor position in the hash table. */ static Node *hashkey(const GCtab *t, cTValue *key) { lua_assert(!tvisint(key)); if (tvisstr(key)) return hashstr(t, strV(key)); else if (tvisnum(key)) return hashnum(t, key); else if (tvisbool(key)) return hashmask(t, boolV(key)); else return hashgcref(t, key->gcr); /* Only hash 32 bits of lightuserdata on a 64 bit CPU. Good enough? */ } /* -- Table creation and destruction -------------------------------------- */ /* Create new hash part for table. */ static LJ_AINLINE void newhpart(lua_State *L, GCtab *t, uint32_t hbits) { uint32_t hsize; Node *node; lua_assert(hbits != 0); if (hbits > LJ_MAX_HBITS) lj_err_msg(L, LJ_ERR_TABOV); hsize = 1u << hbits; node = lj_mem_newvec(L, hsize, Node); setmref(node->freetop, &node[hsize]); setmref(t->node, node); t->hmask = hsize-1; } /* ** Q: Why all of these copies of t->hmask, t->node etc. to local variables? ** A: Because alias analysis for C is _really_ tough. ** Even state-of-the-art C compilers won't produce good code without this. */ /* Clear hash part of table. */ static LJ_AINLINE void clearhpart(GCtab *t) { uint32_t i, hmask = t->hmask; Node *node = noderef(t->node); lua_assert(t->hmask != 0); for (i = 0; i <= hmask; i++) { Node *n = &node[i]; setmref(n->next, NULL); setnilV(&n->key); setnilV(&n->val); } } /* Clear array part of table. */ static LJ_AINLINE void clearapart(GCtab *t) { uint32_t i, asize = t->asize; TValue *array = tvref(t->array); for (i = 0; i < asize; i++) setnilV(&array[i]); } /* Create a new table. Note: the slots are not initialized (yet). */ static GCtab *newtab(lua_State *L, uint32_t asize, uint32_t hbits) { GCtab *t; /* First try to colocate the array part. */ if (LJ_MAX_COLOSIZE != 0 && asize > 0 && asize <= LJ_MAX_COLOSIZE) { lua_assert((sizeof(GCtab) & 7) == 0); t = (GCtab *)lj_mem_newgco(L, sizetabcolo(asize)); t->gct = ~LJ_TTAB; t->nomm = (uint8_t)~0; t->colo = (int8_t)asize; setmref(t->array, (TValue *)((char *)t + sizeof(GCtab))); setgcrefnull(t->metatable); t->asize = asize; t->hmask = 0; setmref(t->node, &G(L)->nilnode); } else { /* Otherwise separately allocate the array part. */ t = lj_mem_newobj(L, GCtab); t->gct = ~LJ_TTAB; t->nomm = (uint8_t)~0; t->colo = 0; setmref(t->array, NULL); setgcrefnull(t->metatable); t->asize = 0; /* In case the array allocation fails. */ t->hmask = 0; setmref(t->node, &G(L)->nilnode); if (asize > 0) { if (asize > LJ_MAX_ASIZE) lj_err_msg(L, LJ_ERR_TABOV); setmref(t->array, lj_mem_newvec(L, asize, TValue)); t->asize = asize; } } if (hbits) newhpart(L, t, hbits); return t; } /* Create a new table. ** ** IMPORTANT NOTE: The API differs from lua_createtable()! ** ** The array size is non-inclusive. E.g. asize=128 creates array slots ** for 0..127, but not for 128. If you need slots 1..128, pass asize=129 ** (slot 0 is wasted in this case). ** ** The hash size is given in hash bits. hbits=0 means no hash part. ** hbits=1 creates 2 hash slots, hbits=2 creates 4 hash slots and so on. */ GCtab *lj_tab_new(lua_State *L, uint32_t asize, uint32_t hbits) { GCtab *t = newtab(L, asize, hbits); clearapart(t); if (t->hmask > 0) clearhpart(t); return t; } #if LJ_HASJIT GCtab * LJ_FASTCALL lj_tab_new1(lua_State *L, uint32_t ahsize) { GCtab *t = newtab(L, ahsize & 0xffffff, ahsize >> 24); clearapart(t); if (t->hmask > 0) clearhpart(t); return t; } #endif /* Duplicate a table. */ GCtab * LJ_FASTCALL lj_tab_dup(lua_State *L, const GCtab *kt) { GCtab *t; uint32_t asize, hmask; t = newtab(L, kt->asize, kt->hmask > 0 ? lj_fls(kt->hmask)+1 : 0); lua_assert(kt->asize == t->asize && kt->hmask == t->hmask); t->nomm = 0; /* Keys with metamethod names may be present. */ asize = kt->asize; if (asize > 0) { TValue *array = tvref(t->array); TValue *karray = tvref(kt->array); if (asize < 64) { /* An inlined loop beats memcpy for < 512 bytes. */ uint32_t i; for (i = 0; i < asize; i++) copyTV(L, &array[i], &karray[i]); } else { memcpy(array, karray, asize*sizeof(TValue)); } } hmask = kt->hmask; if (hmask > 0) { uint32_t i; Node *node = noderef(t->node); Node *knode = noderef(kt->node); ptrdiff_t d = (char *)node - (char *)knode; setmref(node->freetop, (Node *)((char *)noderef(knode->freetop) + d)); for (i = 0; i <= hmask; i++) { Node *kn = &knode[i]; Node *n = &node[i]; Node *next = nextnode(kn); /* Don't use copyTV here, since it asserts on a copy of a dead key. */ n->val = kn->val; n->key = kn->key; setmref(n->next, next == NULL? next : (Node *)((char *)next + d)); } } return t; } /* Free a table. */ void LJ_FASTCALL lj_tab_free(global_State *g, GCtab *t) { if (t->hmask > 0) lj_mem_freevec(g, noderef(t->node), t->hmask+1, Node); if (t->asize > 0 && LJ_MAX_COLOSIZE != 0 && t->colo <= 0) lj_mem_freevec(g, tvref(t->array), t->asize, TValue); if (LJ_MAX_COLOSIZE != 0 && t->colo) lj_mem_free(g, t, sizetabcolo((uint32_t)t->colo & 0x7f)); else lj_mem_freet(g, t); } /* -- Table resizing ------------------------------------------------------ */ /* Resize a table to fit the new array/hash part sizes. */ static void resizetab(lua_State *L, GCtab *t, uint32_t asize, uint32_t hbits) { Node *oldnode = noderef(t->node); uint32_t oldasize = t->asize; uint32_t oldhmask = t->hmask; if (asize > oldasize) { /* Array part grows? */ TValue *array; uint32_t i; if (asize > LJ_MAX_ASIZE) lj_err_msg(L, LJ_ERR_TABOV); if (LJ_MAX_COLOSIZE != 0 && t->colo > 0) { /* A colocated array must be separated and copied. */ TValue *oarray = tvref(t->array); array = lj_mem_newvec(L, asize, TValue); t->colo = (int8_t)(t->colo | 0x80); /* Mark as separated (colo < 0). */ for (i = 0; i < oldasize; i++) copyTV(L, &array[i], &oarray[i]); } else { array = (TValue *)lj_mem_realloc(L, tvref(t->array), oldasize*sizeof(TValue), asize*sizeof(TValue)); } setmref(t->array, array); t->asize = asize; for (i = oldasize; i < asize; i++) /* Clear newly allocated slots. */ setnilV(&array[i]); } /* Create new (empty) hash part. */ if (hbits) { newhpart(L, t, hbits); clearhpart(t); } else { global_State *g = G(L); setmref(t->node, &g->nilnode); t->hmask = 0; } if (asize < oldasize) { /* Array part shrinks? */ TValue *array = tvref(t->array); uint32_t i; t->asize = asize; /* Note: This 'shrinks' even colocated arrays. */ for (i = asize; i < oldasize; i++) /* Reinsert old array values. */ if (!tvisnil(&array[i])) copyTV(L, lj_tab_setinth(L, t, (int32_t)i), &array[i]); /* Physically shrink only separated arrays. */ if (LJ_MAX_COLOSIZE != 0 && t->colo <= 0) setmref(t->array, lj_mem_realloc(L, array, oldasize*sizeof(TValue), asize*sizeof(TValue))); } if (oldhmask > 0) { /* Reinsert pairs from old hash part. */ global_State *g; uint32_t i; for (i = 0; i <= oldhmask; i++) { Node *n = &oldnode[i]; if (!tvisnil(&n->val)) copyTV(L, lj_tab_set(L, t, &n->key), &n->val); } g = G(L); lj_mem_freevec(g, oldnode, oldhmask+1, Node); } } static uint32_t countint(cTValue *key, uint32_t *bins) { lua_assert(!tvisint(key)); if (tvisnum(key)) { lua_Number nk = numV(key); int32_t k = lj_num2int(nk); if ((uint32_t)k < LJ_MAX_ASIZE && nk == (lua_Number)k) { bins[(k > 2 ? lj_fls((uint32_t)(k-1)) : 0)]++; return 1; } } return 0; } static uint32_t countarray(const GCtab *t, uint32_t *bins) { uint32_t na, b, i; if (t->asize == 0) return 0; for (na = i = b = 0; b < LJ_MAX_ABITS; b++) { uint32_t n, top = 2u << b; TValue *array; if (top >= t->asize) { top = t->asize-1; if (i > top) break; } array = tvref(t->array); for (n = 0; i <= top; i++) if (!tvisnil(&array[i])) n++; bins[b] += n; na += n; } return na; } static uint32_t counthash(const GCtab *t, uint32_t *bins, uint32_t *narray) { uint32_t total, na, i, hmask = t->hmask; Node *node = noderef(t->node); for (total = na = 0, i = 0; i <= hmask; i++) { Node *n = &node[i]; if (!tvisnil(&n->val)) { na += countint(&n->key, bins); total++; } } *narray += na; return total; } static uint32_t bestasize(uint32_t bins[], uint32_t *narray) { uint32_t b, sum, na = 0, sz = 0, nn = *narray; for (b = 0, sum = 0; 2*nn > (1u< 0 && 2*(sum += bins[b]) > (1u<hmask > 0 ? lj_fls(t->hmask)+1 : 0); } /* -- Table getters ------------------------------------------------------- */ cTValue * LJ_FASTCALL lj_tab_getinth(GCtab *t, int32_t key) { TValue k; Node *n; k.n = (lua_Number)key; n = hashnum(t, &k); do { if (tvisnum(&n->key) && n->key.n == k.n) return &n->val; } while ((n = nextnode(n))); return NULL; } cTValue *lj_tab_getstr(GCtab *t, GCstr *key) { Node *n = hashstr(t, key); do { if (tvisstr(&n->key) && strV(&n->key) == key) return &n->val; } while ((n = nextnode(n))); return NULL; } cTValue *lj_tab_get(lua_State *L, GCtab *t, cTValue *key) { if (tvisstr(key)) { cTValue *tv = lj_tab_getstr(t, strV(key)); if (tv) return tv; } else if (tvisint(key)) { cTValue *tv = lj_tab_getint(t, intV(key)); if (tv) return tv; } else if (tvisnum(key)) { lua_Number nk = numV(key); int32_t k = lj_num2int(nk); if (nk == (lua_Number)k) { cTValue *tv = lj_tab_getint(t, k); if (tv) return tv; } else { goto genlookup; /* Else use the generic lookup. */ } } else if (!tvisnil(key)) { Node *n; genlookup: n = hashkey(t, key); do { if (lj_obj_equal(&n->key, key)) return &n->val; } while ((n = nextnode(n))); } return niltv(L); } /* -- Table setters ------------------------------------------------------- */ /* Insert new key. Use Brent's variation to optimize the chain length. */ TValue *lj_tab_newkey(lua_State *L, GCtab *t, cTValue *key) { Node *n = hashkey(t, key); if (!tvisnil(&n->val) || t->hmask == 0) { Node *nodebase = noderef(t->node); Node *collide, *freenode = noderef(nodebase->freetop); lua_assert(freenode >= nodebase && freenode <= nodebase+t->hmask+1); do { if (freenode == nodebase) { /* No free node found? */ rehashtab(L, t, key); /* Rehash table. */ return lj_tab_set(L, t, key); /* Retry key insertion. */ } } while (!tvisnil(&(--freenode)->key)); setmref(nodebase->freetop, freenode); lua_assert(freenode != &G(L)->nilnode); collide = hashkey(t, &n->key); if (collide != n) { /* Colliding node not the main node? */ while (noderef(collide->next) != n) /* Find predecessor. */ collide = nextnode(collide); setmref(collide->next, freenode); /* Relink chain. */ /* Copy colliding node into free node and free main node. */ freenode->val = n->val; freenode->key = n->key; freenode->next = n->next; setmref(n->next, NULL); setnilV(&n->val); /* Rechain pseudo-resurrected string keys with colliding hashes. */ while (nextnode(freenode)) { Node *nn = nextnode(freenode); if (tvisstr(&nn->key) && !tvisnil(&nn->val) && hashstr(t, strV(&nn->key)) == n) { freenode->next = nn->next; nn->next = n->next; setmref(n->next, nn); } else { freenode = nn; } } } else { /* Otherwise use free node. */ setmrefr(freenode->next, n->next); /* Insert into chain. */ setmref(n->next, freenode); n = freenode; } } n->key.u64 = key->u64; if (LJ_UNLIKELY(tvismzero(&n->key))) n->key.u64 = 0; lj_gc_anybarriert(L, t); lua_assert(tvisnil(&n->val)); return &n->val; } TValue *lj_tab_setinth(lua_State *L, GCtab *t, int32_t key) { TValue k; Node *n; k.n = (lua_Number)key; n = hashnum(t, &k); do { if (tvisnum(&n->key) && n->key.n == k.n) return &n->val; } while ((n = nextnode(n))); return lj_tab_newkey(L, t, &k); } TValue *lj_tab_setstr(lua_State *L, GCtab *t, GCstr *key) { TValue k; Node *n = hashstr(t, key); do { if (tvisstr(&n->key) && strV(&n->key) == key) return &n->val; } while ((n = nextnode(n))); setstrV(L, &k, key); return lj_tab_newkey(L, t, &k); } TValue *lj_tab_set(lua_State *L, GCtab *t, cTValue *key) { Node *n; t->nomm = 0; /* Invalidate negative metamethod cache. */ if (tvisstr(key)) { return lj_tab_setstr(L, t, strV(key)); } else if (tvisint(key)) { return lj_tab_setint(L, t, intV(key)); } else if (tvisnum(key)) { lua_Number nk = numV(key); int32_t k = lj_num2int(nk); if (nk == (lua_Number)k) return lj_tab_setint(L, t, k); if (tvisnan(key)) lj_err_msg(L, LJ_ERR_NANIDX); /* Else use the generic lookup. */ } else if (tvisnil(key)) { lj_err_msg(L, LJ_ERR_NILIDX); } n = hashkey(t, key); do { if (lj_obj_equal(&n->key, key)) return &n->val; } while ((n = nextnode(n))); return lj_tab_newkey(L, t, key); } /* -- Table traversal ----------------------------------------------------- */ /* Get the traversal index of a key. */ static uint32_t keyindex(lua_State *L, GCtab *t, cTValue *key) { TValue tmp; if (tvisint(key)) { int32_t k = intV(key); if ((uint32_t)k < t->asize) return (uint32_t)k; /* Array key indexes: [0..t->asize-1] */ setnumV(&tmp, (lua_Number)k); key = &tmp; } else if (tvisnum(key)) { lua_Number nk = numV(key); int32_t k = lj_num2int(nk); if ((uint32_t)k < t->asize && nk == (lua_Number)k) return (uint32_t)k; /* Array key indexes: [0..t->asize-1] */ } if (!tvisnil(key)) { Node *n = hashkey(t, key); do { if (lj_obj_equal(&n->key, key)) return t->asize + (uint32_t)(n - noderef(t->node)); /* Hash key indexes: [t->asize..t->asize+t->nmask] */ } while ((n = nextnode(n))); if (key->u32.hi == 0xfffe7fff) /* ITERN was despecialized while running. */ return key->u32.lo - 1; lj_err_msg(L, LJ_ERR_NEXTIDX); return 0; /* unreachable */ } return ~0u; /* A nil key starts the traversal. */ } /* Advance to the next step in a table traversal. */ int lj_tab_next(lua_State *L, GCtab *t, TValue *key) { uint32_t i = keyindex(L, t, key); /* Find predecessor key index. */ for (i++; i < t->asize; i++) /* First traverse the array keys. */ if (!tvisnil(arrayslot(t, i))) { setintV(key, i); copyTV(L, key+1, arrayslot(t, i)); return 1; } for (i -= t->asize; i <= t->hmask; i++) { /* Then traverse the hash keys. */ Node *n = &noderef(t->node)[i]; if (!tvisnil(&n->val)) { copyTV(L, key, &n->key); copyTV(L, key+1, &n->val); return 1; } } return 0; /* End of traversal. */ } /* -- Table length calculation -------------------------------------------- */ static MSize unbound_search(GCtab *t, MSize j) { cTValue *tv; MSize i = j; /* i is zero or a present index */ j++; /* find `i' and `j' such that i is present and j is not */ while ((tv = lj_tab_getint(t, (int32_t)j)) && !tvisnil(tv)) { i = j; j *= 2; if (j > (MSize)(INT_MAX-2)) { /* overflow? */ /* table was built with bad purposes: resort to linear search */ i = 1; while ((tv = lj_tab_getint(t, (int32_t)i)) && !tvisnil(tv)) i++; return i - 1; } } /* now do a binary search between them */ while (j - i > 1) { MSize m = (i+j)/2; cTValue *tvb = lj_tab_getint(t, (int32_t)m); if (tvb && !tvisnil(tvb)) i = m; else j = m; } return i; } /* ** Try to find a boundary in table `t'. A `boundary' is an integer index ** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil). */ MSize LJ_FASTCALL lj_tab_len(GCtab *t) { MSize j = (MSize)t->asize; if (j > 1 && tvisnil(arrayslot(t, j-1))) { MSize i = 1; while (j - i > 1) { MSize m = (i+j)/2; if (tvisnil(arrayslot(t, m-1))) j = m; else i = m; } return i-1; } if (j) j--; if (t->hmask <= 0) return j; return unbound_search(t, j); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ffdef.h0000664000000000000000000000757512213333063022312 0ustar rootroot/* This is a generated file. DO NOT EDIT! */ FFDEF(assert) FFDEF(type) FFDEF(next) FFDEF(pairs) FFDEF(ipairs_aux) FFDEF(ipairs) FFDEF(getmetatable) FFDEF(setmetatable) FFDEF(getfenv) FFDEF(setfenv) FFDEF(rawget) FFDEF(rawset) FFDEF(rawequal) FFDEF(unpack) FFDEF(select) FFDEF(tonumber) FFDEF(tostring) FFDEF(error) FFDEF(pcall) FFDEF(xpcall) FFDEF(loadfile) FFDEF(load) FFDEF(loadstring) FFDEF(dofile) FFDEF(gcinfo) FFDEF(collectgarbage) FFDEF(newproxy) FFDEF(print) FFDEF(coroutine_status) FFDEF(coroutine_running) FFDEF(coroutine_create) FFDEF(coroutine_yield) FFDEF(coroutine_resume) FFDEF(coroutine_wrap_aux) FFDEF(coroutine_wrap) FFDEF(math_abs) FFDEF(math_floor) FFDEF(math_ceil) FFDEF(math_sqrt) FFDEF(math_log10) FFDEF(math_exp) FFDEF(math_sin) FFDEF(math_cos) FFDEF(math_tan) FFDEF(math_asin) FFDEF(math_acos) FFDEF(math_atan) FFDEF(math_sinh) FFDEF(math_cosh) FFDEF(math_tanh) FFDEF(math_frexp) FFDEF(math_modf) FFDEF(math_log) FFDEF(math_deg) FFDEF(math_rad) FFDEF(math_atan2) FFDEF(math_pow) FFDEF(math_fmod) FFDEF(math_ldexp) FFDEF(math_min) FFDEF(math_max) FFDEF(math_random) FFDEF(math_randomseed) FFDEF(bit_tobit) FFDEF(bit_bnot) FFDEF(bit_bswap) FFDEF(bit_lshift) FFDEF(bit_rshift) FFDEF(bit_arshift) FFDEF(bit_rol) FFDEF(bit_ror) FFDEF(bit_band) FFDEF(bit_bor) FFDEF(bit_bxor) FFDEF(bit_tohex) FFDEF(string_len) FFDEF(string_byte) FFDEF(string_char) FFDEF(string_sub) FFDEF(string_rep) FFDEF(string_reverse) FFDEF(string_lower) FFDEF(string_upper) FFDEF(string_dump) FFDEF(string_find) FFDEF(string_match) FFDEF(string_gmatch_aux) FFDEF(string_gmatch) FFDEF(string_gsub) FFDEF(string_format) FFDEF(table_foreachi) FFDEF(table_foreach) FFDEF(table_getn) FFDEF(table_maxn) FFDEF(table_insert) FFDEF(table_remove) FFDEF(table_concat) FFDEF(table_sort) FFDEF(io_method_close) FFDEF(io_method_read) FFDEF(io_method_write) FFDEF(io_method_flush) FFDEF(io_method_seek) FFDEF(io_method_setvbuf) FFDEF(io_method_lines) FFDEF(io_method___gc) FFDEF(io_method___tostring) FFDEF(io_open) FFDEF(io_popen) FFDEF(io_tmpfile) FFDEF(io_close) FFDEF(io_read) FFDEF(io_write) FFDEF(io_flush) FFDEF(io_input) FFDEF(io_output) FFDEF(io_lines) FFDEF(io_type) FFDEF(os_execute) FFDEF(os_remove) FFDEF(os_rename) FFDEF(os_tmpname) FFDEF(os_getenv) FFDEF(os_exit) FFDEF(os_clock) FFDEF(os_date) FFDEF(os_time) FFDEF(os_difftime) FFDEF(os_setlocale) FFDEF(debug_getregistry) FFDEF(debug_getmetatable) FFDEF(debug_setmetatable) FFDEF(debug_getfenv) FFDEF(debug_setfenv) FFDEF(debug_getinfo) FFDEF(debug_getlocal) FFDEF(debug_setlocal) FFDEF(debug_getupvalue) FFDEF(debug_setupvalue) FFDEF(debug_upvalueid) FFDEF(debug_upvaluejoin) FFDEF(debug_sethook) FFDEF(debug_gethook) FFDEF(debug_debug) FFDEF(debug_traceback) FFDEF(jit_on) FFDEF(jit_off) FFDEF(jit_flush) FFDEF(jit_status) FFDEF(jit_attach) FFDEF(jit_util_funcinfo) FFDEF(jit_util_funcbc) FFDEF(jit_util_funck) FFDEF(jit_util_funcuvname) FFDEF(jit_util_traceinfo) FFDEF(jit_util_traceir) FFDEF(jit_util_tracek) FFDEF(jit_util_tracesnap) FFDEF(jit_util_tracemc) FFDEF(jit_util_traceexitstub) FFDEF(jit_util_ircalladdr) FFDEF(jit_opt_start) FFDEF(ffi_meta___index) FFDEF(ffi_meta___newindex) FFDEF(ffi_meta___eq) FFDEF(ffi_meta___len) FFDEF(ffi_meta___lt) FFDEF(ffi_meta___le) FFDEF(ffi_meta___concat) FFDEF(ffi_meta___call) FFDEF(ffi_meta___add) FFDEF(ffi_meta___sub) FFDEF(ffi_meta___mul) FFDEF(ffi_meta___div) FFDEF(ffi_meta___mod) FFDEF(ffi_meta___pow) FFDEF(ffi_meta___unm) FFDEF(ffi_meta___tostring) FFDEF(ffi_meta___pairs) FFDEF(ffi_meta___ipairs) FFDEF(ffi_clib___index) FFDEF(ffi_clib___newindex) FFDEF(ffi_clib___gc) FFDEF(ffi_callback_free) FFDEF(ffi_callback_set) FFDEF(ffi_cdef) FFDEF(ffi_new) FFDEF(ffi_cast) FFDEF(ffi_typeof) FFDEF(ffi_istype) FFDEF(ffi_sizeof) FFDEF(ffi_alignof) FFDEF(ffi_offsetof) FFDEF(ffi_errno) FFDEF(ffi_string) FFDEF(ffi_copy) FFDEF(ffi_fill) FFDEF(ffi_abi) FFDEF(ffi_metatype) FFDEF(ffi_gc) FFDEF(ffi_load) #undef FFDEF #ifndef FF_NUM_ASMFUNC #define FF_NUM_ASMFUNC 62 #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_mem.c0000664000000000000000000007405012231715321022664 0ustar rootroot/* ** Memory access optimizations. ** AA: Alias Analysis using high-level semantic disambiguation. ** FWD: Load Forwarding (L2L) + Store Forwarding (S2L). ** DSE: Dead-Store Elimination. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_opt_mem_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_tab.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) #define fins (&J->fold.ins) #define fleft (&J->fold.left) #define fright (&J->fold.right) /* ** Caveat #1: return value is not always a TRef -- only use with tref_ref(). ** Caveat #2: FWD relies on active CSE for xREF operands -- see lj_opt_fold(). */ /* Return values from alias analysis. */ typedef enum { ALIAS_NO, /* The two refs CANNOT alias (exact). */ ALIAS_MAY, /* The two refs MAY alias (inexact). */ ALIAS_MUST /* The two refs MUST alias (exact). */ } AliasRet; /* -- ALOAD/HLOAD forwarding and ASTORE/HSTORE elimination ---------------- */ /* Simplified escape analysis: check for intervening stores. */ static AliasRet aa_escape(jit_State *J, IRIns *ir, IRIns *stop) { IRRef ref = (IRRef)(ir - J->cur.ir); /* The ref that might be stored. */ for (ir++; ir < stop; ir++) if (ir->op2 == ref && (ir->o == IR_ASTORE || ir->o == IR_HSTORE || ir->o == IR_USTORE || ir->o == IR_FSTORE)) return ALIAS_MAY; /* Reference was stored and might alias. */ return ALIAS_NO; /* Reference was not stored. */ } /* Alias analysis for two different table references. */ static AliasRet aa_table(jit_State *J, IRRef ta, IRRef tb) { IRIns *taba = IR(ta), *tabb = IR(tb); int newa, newb; lua_assert(ta != tb); lua_assert(irt_istab(taba->t) && irt_istab(tabb->t)); /* Disambiguate new allocations. */ newa = (taba->o == IR_TNEW || taba->o == IR_TDUP); newb = (tabb->o == IR_TNEW || tabb->o == IR_TDUP); if (newa && newb) return ALIAS_NO; /* Two different allocations never alias. */ if (newb) { /* At least one allocation? */ IRIns *tmp = taba; taba = tabb; tabb = tmp; } else if (!newa) { return ALIAS_MAY; /* Anything else: we just don't know. */ } return aa_escape(J, taba, tabb); } /* Alias analysis for array and hash access using key-based disambiguation. */ static AliasRet aa_ahref(jit_State *J, IRIns *refa, IRIns *refb) { IRRef ka = refa->op2; IRRef kb = refb->op2; IRIns *keya, *keyb; IRRef ta, tb; if (refa == refb) return ALIAS_MUST; /* Shortcut for same refs. */ keya = IR(ka); if (keya->o == IR_KSLOT) { ka = keya->op1; keya = IR(ka); } keyb = IR(kb); if (keyb->o == IR_KSLOT) { kb = keyb->op1; keyb = IR(kb); } ta = (refa->o==IR_HREFK || refa->o==IR_AREF) ? IR(refa->op1)->op1 : refa->op1; tb = (refb->o==IR_HREFK || refb->o==IR_AREF) ? IR(refb->op1)->op1 : refb->op1; if (ka == kb) { /* Same key. Check for same table with different ref (NEWREF vs. HREF). */ if (ta == tb) return ALIAS_MUST; /* Same key, same table. */ else return aa_table(J, ta, tb); /* Same key, possibly different table. */ } if (irref_isk(ka) && irref_isk(kb)) return ALIAS_NO; /* Different constant keys. */ if (refa->o == IR_AREF) { /* Disambiguate array references based on index arithmetic. */ int32_t ofsa = 0, ofsb = 0; IRRef basea = ka, baseb = kb; lua_assert(refb->o == IR_AREF); /* Gather base and offset from t[base] or t[base+-ofs]. */ if (keya->o == IR_ADD && irref_isk(keya->op2)) { basea = keya->op1; ofsa = IR(keya->op2)->i; if (basea == kb && ofsa != 0) return ALIAS_NO; /* t[base+-ofs] vs. t[base]. */ } if (keyb->o == IR_ADD && irref_isk(keyb->op2)) { baseb = keyb->op1; ofsb = IR(keyb->op2)->i; if (ka == baseb && ofsb != 0) return ALIAS_NO; /* t[base] vs. t[base+-ofs]. */ } if (basea == baseb && ofsa != ofsb) return ALIAS_NO; /* t[base+-o1] vs. t[base+-o2] and o1 != o2. */ } else { /* Disambiguate hash references based on the type of their keys. */ lua_assert((refa->o==IR_HREF || refa->o==IR_HREFK || refa->o==IR_NEWREF) && (refb->o==IR_HREF || refb->o==IR_HREFK || refb->o==IR_NEWREF)); if (!irt_sametype(keya->t, keyb->t)) return ALIAS_NO; /* Different key types. */ } if (ta == tb) return ALIAS_MAY; /* Same table, cannot disambiguate keys. */ else return aa_table(J, ta, tb); /* Try to disambiguate tables. */ } /* Array and hash load forwarding. */ static TRef fwd_ahload(jit_State *J, IRRef xref) { IRIns *xr = IR(xref); IRRef lim = xref; /* Search limit. */ IRRef ref; /* Search for conflicting stores. */ ref = J->chain[fins->o+IRDELTA_L2S]; while (ref > xref) { IRIns *store = IR(ref); switch (aa_ahref(J, xr, IR(store->op1))) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: lim = ref; goto cselim; /* Limit search for load. */ case ALIAS_MUST: return store->op2; /* Store forwarding. */ } ref = store->prev; } /* No conflicting store (yet): const-fold loads from allocations. */ { IRIns *ir = (xr->o == IR_HREFK || xr->o == IR_AREF) ? IR(xr->op1) : xr; IRRef tab = ir->op1; ir = IR(tab); if (ir->o == IR_TNEW || (ir->o == IR_TDUP && irref_isk(xr->op2))) { /* A NEWREF with a number key may end up pointing to the array part. ** But it's referenced from HSTORE and not found in the ASTORE chain. ** For now simply consider this a conflict without forwarding anything. */ if (xr->o == IR_AREF) { IRRef ref2 = J->chain[IR_NEWREF]; while (ref2 > tab) { IRIns *newref = IR(ref2); if (irt_isnum(IR(newref->op2)->t)) goto cselim; ref2 = newref->prev; } } /* NEWREF inhibits CSE for HREF, and dependent FLOADs from HREFK/AREF. ** But the above search for conflicting stores was limited by xref. ** So continue searching, limited by the TNEW/TDUP. Store forwarding ** is ok, too. A conflict does NOT limit the search for a matching load. */ while (ref > tab) { IRIns *store = IR(ref); switch (aa_ahref(J, xr, IR(store->op1))) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: goto cselim; /* Conflicting store. */ case ALIAS_MUST: return store->op2; /* Store forwarding. */ } ref = store->prev; } lua_assert(ir->o != IR_TNEW || irt_isnil(fins->t)); if (irt_ispri(fins->t)) { return TREF_PRI(irt_type(fins->t)); } else if (irt_isnum(fins->t) || (LJ_DUALNUM && irt_isint(fins->t)) || irt_isstr(fins->t)) { TValue keyv; cTValue *tv; IRIns *key = IR(xr->op2); if (key->o == IR_KSLOT) key = IR(key->op1); lj_ir_kvalue(J->L, &keyv, key); tv = lj_tab_get(J->L, ir_ktab(IR(ir->op1)), &keyv); lua_assert(itype2irt(tv) == irt_type(fins->t)); if (irt_isnum(fins->t)) return lj_ir_knum_u64(J, tv->u64); else if (LJ_DUALNUM && irt_isint(fins->t)) return lj_ir_kint(J, intV(tv)); else return lj_ir_kstr(J, strV(tv)); } /* Othwerwise: don't intern as a constant. */ } } cselim: /* Try to find a matching load. Below the conflicting store, if any. */ ref = J->chain[fins->o]; while (ref > lim) { IRIns *load = IR(ref); if (load->op1 == xref) return ref; /* Load forwarding. */ ref = load->prev; } return 0; /* Conflict or no match. */ } /* Reassociate ALOAD across PHIs to handle t[i-1] forwarding case. */ static TRef fwd_aload_reassoc(jit_State *J) { IRIns *irx = IR(fins->op1); IRIns *key = IR(irx->op2); if (key->o == IR_ADD && irref_isk(key->op2)) { IRIns *add2 = IR(key->op1); if (add2->o == IR_ADD && irref_isk(add2->op2) && IR(key->op2)->i == -IR(add2->op2)->i) { IRRef ref = J->chain[IR_AREF]; IRRef lim = add2->op1; if (irx->op1 > lim) lim = irx->op1; while (ref > lim) { IRIns *ir = IR(ref); if (ir->op1 == irx->op1 && ir->op2 == add2->op1) return fwd_ahload(J, ref); ref = ir->prev; } } } return 0; } /* ALOAD forwarding. */ TRef LJ_FASTCALL lj_opt_fwd_aload(jit_State *J) { IRRef ref; if ((ref = fwd_ahload(J, fins->op1)) || (ref = fwd_aload_reassoc(J))) return ref; return EMITFOLD; } /* HLOAD forwarding. */ TRef LJ_FASTCALL lj_opt_fwd_hload(jit_State *J) { IRRef ref = fwd_ahload(J, fins->op1); if (ref) return ref; return EMITFOLD; } /* HREFK forwarding. */ TRef LJ_FASTCALL lj_opt_fwd_hrefk(jit_State *J) { IRRef tab = fleft->op1; IRRef ref = J->chain[IR_NEWREF]; while (ref > tab) { IRIns *newref = IR(ref); if (tab == newref->op1) { if (fright->op1 == newref->op2) return ref; /* Forward from NEWREF. */ else goto docse; } else if (aa_table(J, tab, newref->op1) != ALIAS_NO) { goto docse; } ref = newref->prev; } /* No conflicting NEWREF: key location unchanged for HREFK of TDUP. */ if (IR(tab)->o == IR_TDUP) fins->t.irt &= ~IRT_GUARD; /* Drop HREFK guard. */ docse: return CSEFOLD; } /* Check whether HREF of TNEW/TDUP can be folded to niltv. */ int LJ_FASTCALL lj_opt_fwd_href_nokey(jit_State *J) { IRRef lim = fins->op1; /* Search limit. */ IRRef ref; /* The key for an ASTORE may end up in the hash part after a NEWREF. */ if (irt_isnum(fright->t) && J->chain[IR_NEWREF] > lim) { ref = J->chain[IR_ASTORE]; while (ref > lim) { if (ref < J->chain[IR_NEWREF]) return 0; /* Conflict. */ ref = IR(ref)->prev; } } /* Search for conflicting stores. */ ref = J->chain[IR_HSTORE]; while (ref > lim) { IRIns *store = IR(ref); if (aa_ahref(J, fins, IR(store->op1)) != ALIAS_NO) return 0; /* Conflict. */ ref = store->prev; } return 1; /* No conflict. Can fold to niltv. */ } /* Check whether there's no aliasing NEWREF for the left operand. */ int LJ_FASTCALL lj_opt_fwd_tptr(jit_State *J, IRRef lim) { IRRef ta = fins->op1; IRRef ref = J->chain[IR_NEWREF]; while (ref > lim) { IRIns *newref = IR(ref); if (ta == newref->op1 || aa_table(J, ta, newref->op1) != ALIAS_NO) return 0; /* Conflict. */ ref = newref->prev; } return 1; /* No conflict. Can safely FOLD/CSE. */ } /* ASTORE/HSTORE elimination. */ TRef LJ_FASTCALL lj_opt_dse_ahstore(jit_State *J) { IRRef xref = fins->op1; /* xREF reference. */ IRRef val = fins->op2; /* Stored value reference. */ IRIns *xr = IR(xref); IRRef1 *refp = &J->chain[fins->o]; IRRef ref = *refp; while (ref > xref) { /* Search for redundant or conflicting stores. */ IRIns *store = IR(ref); switch (aa_ahref(J, xr, IR(store->op1))) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: /* Store to MAYBE the same location. */ if (store->op2 != val) /* Conflict if the value is different. */ goto doemit; break; /* Otherwise continue searching. */ case ALIAS_MUST: /* Store to the same location. */ if (store->op2 == val) /* Same value: drop the new store. */ return DROPFOLD; /* Different value: try to eliminate the redundant store. */ if (ref > J->chain[IR_LOOP]) { /* Quick check to avoid crossing LOOP. */ IRIns *ir; /* Check for any intervening guards (includes conflicting loads). */ for (ir = IR(J->cur.nins-1); ir > store; ir--) if (irt_isguard(ir->t) || ir->o == IR_CALLL) goto doemit; /* No elimination possible. */ /* Remove redundant store from chain and replace with NOP. */ *refp = store->prev; store->o = IR_NOP; store->t.irt = IRT_NIL; store->op1 = store->op2 = 0; store->prev = 0; /* Now emit the new store instead. */ } goto doemit; } ref = *(refp = &store->prev); } doemit: return EMITFOLD; /* Otherwise we have a conflict or simply no match. */ } /* -- ULOAD forwarding ---------------------------------------------------- */ /* The current alias analysis for upvalues is very simplistic. It only ** disambiguates between the unique upvalues of the same function. ** This is good enough for now, since most upvalues are read-only. ** ** A more precise analysis would be feasible with the help of the parser: ** generate a unique key for every upvalue, even across all prototypes. ** Lacking a realistic use-case, it's unclear whether this is beneficial. */ static AliasRet aa_uref(IRIns *refa, IRIns *refb) { if (refa->o != refb->o) return ALIAS_NO; /* Different UREFx type. */ if (refa->op1 == refb->op1) { /* Same function. */ if (refa->op2 == refb->op2) return ALIAS_MUST; /* Same function, same upvalue idx. */ else return ALIAS_NO; /* Same function, different upvalue idx. */ } else { /* Different functions, check disambiguation hash values. */ if (((refa->op2 ^ refb->op2) & 0xff)) return ALIAS_NO; /* Upvalues with different hash values cannot alias. */ else return ALIAS_MAY; /* No conclusion can be drawn for same hash value. */ } } /* ULOAD forwarding. */ TRef LJ_FASTCALL lj_opt_fwd_uload(jit_State *J) { IRRef uref = fins->op1; IRRef lim = REF_BASE; /* Search limit. */ IRIns *xr = IR(uref); IRRef ref; /* Search for conflicting stores. */ ref = J->chain[IR_USTORE]; while (ref > lim) { IRIns *store = IR(ref); switch (aa_uref(xr, IR(store->op1))) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: lim = ref; goto cselim; /* Limit search for load. */ case ALIAS_MUST: return store->op2; /* Store forwarding. */ } ref = store->prev; } cselim: /* Try to find a matching load. Below the conflicting store, if any. */ ref = J->chain[IR_ULOAD]; while (ref > lim) { IRIns *ir = IR(ref); if (ir->op1 == uref || (IR(ir->op1)->op12 == IR(uref)->op12 && IR(ir->op1)->o == IR(uref)->o)) return ref; /* Match for identical or equal UREFx (non-CSEable UREFO). */ ref = ir->prev; } return lj_ir_emit(J); } /* USTORE elimination. */ TRef LJ_FASTCALL lj_opt_dse_ustore(jit_State *J) { IRRef xref = fins->op1; /* xREF reference. */ IRRef val = fins->op2; /* Stored value reference. */ IRIns *xr = IR(xref); IRRef1 *refp = &J->chain[IR_USTORE]; IRRef ref = *refp; while (ref > xref) { /* Search for redundant or conflicting stores. */ IRIns *store = IR(ref); switch (aa_uref(xr, IR(store->op1))) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: /* Store to MAYBE the same location. */ if (store->op2 != val) /* Conflict if the value is different. */ goto doemit; break; /* Otherwise continue searching. */ case ALIAS_MUST: /* Store to the same location. */ if (store->op2 == val) /* Same value: drop the new store. */ return DROPFOLD; /* Different value: try to eliminate the redundant store. */ if (ref > J->chain[IR_LOOP]) { /* Quick check to avoid crossing LOOP. */ IRIns *ir; /* Check for any intervening guards (includes conflicting loads). */ for (ir = IR(J->cur.nins-1); ir > store; ir--) if (irt_isguard(ir->t)) goto doemit; /* No elimination possible. */ /* Remove redundant store from chain and replace with NOP. */ *refp = store->prev; store->o = IR_NOP; store->t.irt = IRT_NIL; store->op1 = store->op2 = 0; store->prev = 0; if (ref+1 < J->cur.nins && store[1].o == IR_OBAR && store[1].op1 == xref) { IRRef1 *bp = &J->chain[IR_OBAR]; IRIns *obar; for (obar = IR(*bp); *bp > ref+1; obar = IR(*bp)) bp = &obar->prev; /* Remove OBAR, too. */ *bp = obar->prev; obar->o = IR_NOP; obar->t.irt = IRT_NIL; obar->op1 = obar->op2 = 0; obar->prev = 0; } /* Now emit the new store instead. */ } goto doemit; } ref = *(refp = &store->prev); } doemit: return EMITFOLD; /* Otherwise we have a conflict or simply no match. */ } /* -- FLOAD forwarding and FSTORE elimination ----------------------------- */ /* Alias analysis for field access. ** Field loads are cheap and field stores are rare. ** Simple disambiguation based on field types is good enough. */ static AliasRet aa_fref(jit_State *J, IRIns *refa, IRIns *refb) { if (refa->op2 != refb->op2) return ALIAS_NO; /* Different fields. */ if (refa->op1 == refb->op1) return ALIAS_MUST; /* Same field, same object. */ else if (refa->op2 >= IRFL_TAB_META && refa->op2 <= IRFL_TAB_NOMM) return aa_table(J, refa->op1, refb->op1); /* Disambiguate tables. */ else return ALIAS_MAY; /* Same field, possibly different object. */ } /* Only the loads for mutable fields end up here (see FOLD). */ TRef LJ_FASTCALL lj_opt_fwd_fload(jit_State *J) { IRRef oref = fins->op1; /* Object reference. */ IRRef fid = fins->op2; /* Field ID. */ IRRef lim = oref; /* Search limit. */ IRRef ref; /* Search for conflicting stores. */ ref = J->chain[IR_FSTORE]; while (ref > oref) { IRIns *store = IR(ref); switch (aa_fref(J, fins, IR(store->op1))) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: lim = ref; goto cselim; /* Limit search for load. */ case ALIAS_MUST: return store->op2; /* Store forwarding. */ } ref = store->prev; } /* No conflicting store: const-fold field loads from allocations. */ if (fid == IRFL_TAB_META) { IRIns *ir = IR(oref); if (ir->o == IR_TNEW || ir->o == IR_TDUP) return lj_ir_knull(J, IRT_TAB); } cselim: /* Try to find a matching load. Below the conflicting store, if any. */ return lj_opt_cselim(J, lim); } /* FSTORE elimination. */ TRef LJ_FASTCALL lj_opt_dse_fstore(jit_State *J) { IRRef fref = fins->op1; /* FREF reference. */ IRRef val = fins->op2; /* Stored value reference. */ IRIns *xr = IR(fref); IRRef1 *refp = &J->chain[IR_FSTORE]; IRRef ref = *refp; while (ref > fref) { /* Search for redundant or conflicting stores. */ IRIns *store = IR(ref); switch (aa_fref(J, xr, IR(store->op1))) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: if (store->op2 != val) /* Conflict if the value is different. */ goto doemit; break; /* Otherwise continue searching. */ case ALIAS_MUST: if (store->op2 == val) /* Same value: drop the new store. */ return DROPFOLD; /* Different value: try to eliminate the redundant store. */ if (ref > J->chain[IR_LOOP]) { /* Quick check to avoid crossing LOOP. */ IRIns *ir; /* Check for any intervening guards or conflicting loads. */ for (ir = IR(J->cur.nins-1); ir > store; ir--) if (irt_isguard(ir->t) || (ir->o == IR_FLOAD && ir->op2 == xr->op2)) goto doemit; /* No elimination possible. */ /* Remove redundant store from chain and replace with NOP. */ *refp = store->prev; store->o = IR_NOP; store->t.irt = IRT_NIL; store->op1 = store->op2 = 0; store->prev = 0; /* Now emit the new store instead. */ } goto doemit; } ref = *(refp = &store->prev); } doemit: return EMITFOLD; /* Otherwise we have a conflict or simply no match. */ } /* -- XLOAD forwarding and XSTORE elimination ----------------------------- */ /* Find cdata allocation for a reference (if any). */ static IRIns *aa_findcnew(jit_State *J, IRIns *ir) { while (ir->o == IR_ADD) { if (!irref_isk(ir->op1)) { IRIns *ir1 = aa_findcnew(J, IR(ir->op1)); /* Left-recursion. */ if (ir1) return ir1; } if (irref_isk(ir->op2)) return NULL; ir = IR(ir->op2); /* Flatten right-recursion. */ } return ir->o == IR_CNEW ? ir : NULL; } /* Alias analysis for two cdata allocations. */ static AliasRet aa_cnew(jit_State *J, IRIns *refa, IRIns *refb) { IRIns *cnewa = aa_findcnew(J, refa); IRIns *cnewb = aa_findcnew(J, refb); if (cnewa == cnewb) return ALIAS_MAY; /* Same allocation or neither is an allocation. */ if (cnewa && cnewb) return ALIAS_NO; /* Two different allocations never alias. */ if (cnewb) { cnewa = cnewb; refb = refa; } return aa_escape(J, cnewa, refb); } /* Alias analysis for XLOAD/XSTORE. */ static AliasRet aa_xref(jit_State *J, IRIns *refa, IRIns *xa, IRIns *xb) { ptrdiff_t ofsa = 0, ofsb = 0; IRIns *refb = IR(xb->op1); IRIns *basea = refa, *baseb = refb; if (refa == refb && irt_sametype(xa->t, xb->t)) return ALIAS_MUST; /* Shortcut for same refs with identical type. */ /* Offset-based disambiguation. */ if (refa->o == IR_ADD && irref_isk(refa->op2)) { IRIns *irk = IR(refa->op2); basea = IR(refa->op1); ofsa = (LJ_64 && irk->o == IR_KINT64) ? (ptrdiff_t)ir_k64(irk)->u64 : (ptrdiff_t)irk->i; if (basea == refb && ofsa != 0) return ALIAS_NO; /* base+-ofs vs. base. */ } if (refb->o == IR_ADD && irref_isk(refb->op2)) { IRIns *irk = IR(refb->op2); baseb = IR(refb->op1); ofsb = (LJ_64 && irk->o == IR_KINT64) ? (ptrdiff_t)ir_k64(irk)->u64 : (ptrdiff_t)irk->i; if (refa == baseb && ofsb != 0) return ALIAS_NO; /* base vs. base+-ofs. */ } /* This implements (very) strict aliasing rules. ** Different types do NOT alias, except for differences in signedness. ** Type punning through unions is allowed (but forces a reload). */ if (basea == baseb) { ptrdiff_t sza = irt_size(xa->t), szb = irt_size(xb->t); if (ofsa == ofsb) { if (sza == szb && irt_isfp(xa->t) == irt_isfp(xb->t)) return ALIAS_MUST; /* Same-sized, same-kind. May need to convert. */ } else if (ofsa + sza <= ofsb || ofsb + szb <= ofsa) { return ALIAS_NO; /* Non-overlapping base+-o1 vs. base+-o2. */ } /* NYI: extract, extend or reinterpret bits (int <-> fp). */ return ALIAS_MAY; /* Overlapping or type punning: force reload. */ } if (!irt_sametype(xa->t, xb->t) && !(irt_typerange(xa->t, IRT_I8, IRT_U64) && ((xa->t.irt - IRT_I8) ^ (xb->t.irt - IRT_I8)) == 1)) return ALIAS_NO; /* NYI: structural disambiguation. */ return aa_cnew(J, basea, baseb); /* Try to disambiguate allocations. */ } /* Return CSEd reference or 0. Caveat: swaps lower ref to the right! */ static IRRef reassoc_trycse(jit_State *J, IROp op, IRRef op1, IRRef op2) { IRRef ref = J->chain[op]; IRRef lim = op1; if (op2 > lim) { lim = op2; op2 = op1; op1 = lim; } while (ref > lim) { IRIns *ir = IR(ref); if (ir->op1 == op1 && ir->op2 == op2) return ref; ref = ir->prev; } return 0; } /* Reassociate index references. */ static IRRef reassoc_xref(jit_State *J, IRIns *ir) { ptrdiff_t ofs = 0; if (ir->o == IR_ADD && irref_isk(ir->op2)) { /* Get constant offset. */ IRIns *irk = IR(ir->op2); ofs = (LJ_64 && irk->o == IR_KINT64) ? (ptrdiff_t)ir_k64(irk)->u64 : (ptrdiff_t)irk->i; ir = IR(ir->op1); } if (ir->o == IR_ADD) { /* Add of base + index. */ /* Index ref > base ref for loop-carried dependences. Only check op1. */ IRIns *ir2, *ir1 = IR(ir->op1); int32_t shift = 0; IRRef idxref; /* Determine index shifts. Don't bother with IR_MUL here. */ if (ir1->o == IR_BSHL && irref_isk(ir1->op2)) shift = IR(ir1->op2)->i; else if (ir1->o == IR_ADD && ir1->op1 == ir1->op2) shift = 1; else ir1 = ir; ir2 = IR(ir1->op1); /* A non-reassociated add. Must be a loop-carried dependence. */ if (ir2->o == IR_ADD && irt_isint(ir2->t) && irref_isk(ir2->op2)) ofs += (ptrdiff_t)IR(ir2->op2)->i << shift; else return 0; idxref = ir2->op1; /* Try to CSE the reassociated chain. Give up if not found. */ if (ir1 != ir && !(idxref = reassoc_trycse(J, ir1->o, idxref, ir1->o == IR_BSHL ? ir1->op2 : idxref))) return 0; if (!(idxref = reassoc_trycse(J, IR_ADD, idxref, ir->op2))) return 0; if (ofs != 0) { IRRef refk = tref_ref(lj_ir_kintp(J, ofs)); if (!(idxref = reassoc_trycse(J, IR_ADD, idxref, refk))) return 0; } return idxref; /* Success, found a reassociated index reference. Phew. */ } return 0; /* Failure. */ } /* XLOAD forwarding. */ TRef LJ_FASTCALL lj_opt_fwd_xload(jit_State *J) { IRRef xref = fins->op1; IRIns *xr = IR(xref); IRRef lim = xref; /* Search limit. */ IRRef ref; if ((fins->op2 & IRXLOAD_READONLY)) goto cselim; if ((fins->op2 & IRXLOAD_VOLATILE)) goto doemit; /* Search for conflicting stores. */ ref = J->chain[IR_XSTORE]; retry: if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS]; if (J->chain[IR_XBAR] > lim) lim = J->chain[IR_XBAR]; while (ref > lim) { IRIns *store = IR(ref); switch (aa_xref(J, xr, fins, store)) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: lim = ref; goto cselim; /* Limit search for load. */ case ALIAS_MUST: /* Emit conversion if the loaded type doesn't match the forwarded type. */ if (!irt_sametype(fins->t, IR(store->op2)->t)) { IRType st = irt_type(fins->t); if (st == IRT_I8 || st == IRT_I16) { /* Trunc + sign-extend. */ st |= IRCONV_SEXT; } else if (st == IRT_U8 || st == IRT_U16) { /* Trunc + zero-extend. */ } else if (st == IRT_INT) { st = irt_type(IR(store->op2)->t); /* Needs dummy CONV.int.*. */ } else { /* I64/U64 are boxed, U32 is hidden behind a CONV.num.u32. */ goto store_fwd; } fins->ot = IRTI(IR_CONV); fins->op1 = store->op2; fins->op2 = (IRT_INT<<5)|st; return RETRYFOLD; } store_fwd: return store->op2; /* Store forwarding. */ } ref = store->prev; } cselim: /* Try to find a matching load. Below the conflicting store, if any. */ ref = J->chain[IR_XLOAD]; while (ref > lim) { /* CSE for XLOAD depends on the type, but not on the IRXLOAD_* flags. */ if (IR(ref)->op1 == xref && irt_sametype(IR(ref)->t, fins->t)) return ref; ref = IR(ref)->prev; } /* Reassociate XLOAD across PHIs to handle a[i-1] forwarding case. */ if (!(fins->op2 & IRXLOAD_READONLY) && J->chain[IR_LOOP] && xref == fins->op1 && (xref = reassoc_xref(J, xr)) != 0) { ref = J->chain[IR_XSTORE]; while (ref > lim) /* Skip stores that have already been checked. */ ref = IR(ref)->prev; lim = xref; xr = IR(xref); goto retry; /* Retry with the reassociated reference. */ } doemit: return EMITFOLD; } /* XSTORE elimination. */ TRef LJ_FASTCALL lj_opt_dse_xstore(jit_State *J) { IRRef xref = fins->op1; IRIns *xr = IR(xref); IRRef lim = xref; /* Search limit. */ IRRef val = fins->op2; /* Stored value reference. */ IRRef1 *refp = &J->chain[IR_XSTORE]; IRRef ref = *refp; if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS]; if (J->chain[IR_XBAR] > lim) lim = J->chain[IR_XBAR]; while (ref > lim) { /* Search for redundant or conflicting stores. */ IRIns *store = IR(ref); switch (aa_xref(J, xr, fins, store)) { case ALIAS_NO: break; /* Continue searching. */ case ALIAS_MAY: if (store->op2 != val) /* Conflict if the value is different. */ goto doemit; break; /* Otherwise continue searching. */ case ALIAS_MUST: if (store->op2 == val) /* Same value: drop the new store. */ return DROPFOLD; /* Different value: try to eliminate the redundant store. */ if (ref > J->chain[IR_LOOP]) { /* Quick check to avoid crossing LOOP. */ IRIns *ir; /* Check for any intervening guards or any XLOADs (no AA performed). */ for (ir = IR(J->cur.nins-1); ir > store; ir--) if (irt_isguard(ir->t) || ir->o == IR_XLOAD) goto doemit; /* No elimination possible. */ /* Remove redundant store from chain and replace with NOP. */ *refp = store->prev; store->o = IR_NOP; store->t.irt = IRT_NIL; store->op1 = store->op2 = 0; store->prev = 0; /* Now emit the new store instead. */ } goto doemit; } ref = *(refp = &store->prev); } doemit: return EMITFOLD; /* Otherwise we have a conflict or simply no match. */ } /* -- Forwarding of lj_tab_len -------------------------------------------- */ /* This is rather simplistic right now, but better than nothing. */ TRef LJ_FASTCALL lj_opt_fwd_tab_len(jit_State *J) { IRRef tab = fins->op1; /* Table reference. */ IRRef lim = tab; /* Search limit. */ IRRef ref; /* Any ASTORE is a conflict and limits the search. */ if (J->chain[IR_ASTORE] > lim) lim = J->chain[IR_ASTORE]; /* Search for conflicting HSTORE with numeric key. */ ref = J->chain[IR_HSTORE]; while (ref > lim) { IRIns *store = IR(ref); IRIns *href = IR(store->op1); IRIns *key = IR(href->op2); if (irt_isnum(key->o == IR_KSLOT ? IR(key->op1)->t : key->t)) { lim = ref; /* Conflicting store found, limits search for TLEN. */ break; } ref = store->prev; } /* Try to find a matching load. Below the conflicting store, if any. */ return lj_opt_cselim(J, lim); } /* -- ASTORE/HSTORE previous type analysis -------------------------------- */ /* Check whether the previous value for a table store is non-nil. ** This can be derived either from a previous store or from a previous ** load (because all loads from tables perform a type check). ** ** The result of the analysis can be used to avoid the metatable check ** and the guard against HREF returning niltv. Both of these are cheap, ** so let's not spend too much effort on the analysis. ** ** A result of 1 is exact: previous value CANNOT be nil. ** A result of 0 is inexact: previous value MAY be nil. */ int lj_opt_fwd_wasnonnil(jit_State *J, IROpT loadop, IRRef xref) { /* First check stores. */ IRRef ref = J->chain[loadop+IRDELTA_L2S]; while (ref > xref) { IRIns *store = IR(ref); if (store->op1 == xref) { /* Same xREF. */ /* A nil store MAY alias, but a non-nil store MUST alias. */ return !irt_isnil(store->t); } else if (irt_isnil(store->t)) { /* Must check any nil store. */ IRRef skref = IR(store->op1)->op2; IRRef xkref = IR(xref)->op2; /* Same key type MAY alias. Need ALOAD check due to multiple int types. */ if (loadop == IR_ALOAD || irt_sametype(IR(skref)->t, IR(xkref)->t)) { if (skref == xkref || !irref_isk(skref) || !irref_isk(xkref)) return 0; /* A nil store with same const key or var key MAY alias. */ /* Different const keys CANNOT alias. */ } /* Different key types CANNOT alias. */ } /* Other non-nil stores MAY alias. */ ref = store->prev; } /* Check loads since nothing could be derived from stores. */ ref = J->chain[loadop]; while (ref > xref) { IRIns *load = IR(ref); if (load->op1 == xref) { /* Same xREF. */ /* A nil load MAY alias, but a non-nil load MUST alias. */ return !irt_isnil(load->t); } /* Other non-nil loads MAY alias. */ ref = load->prev; } return 0; /* Nothing derived at all, previous value MAY be nil. */ } /* ------------------------------------------------------------------------ */ #undef IR #undef fins #undef fleft #undef fright #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_target_ppc.h0000664000000000000000000001653512202141143023356 0ustar rootroot/* ** Definitions for PPC CPUs. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_TARGET_PPC_H #define _LJ_TARGET_PPC_H /* -- Registers IDs ------------------------------------------------------- */ #define GPRDEF(_) \ _(R0) _(SP) _(SYS1) _(R3) _(R4) _(R5) _(R6) _(R7) \ _(R8) _(R9) _(R10) _(R11) _(R12) _(SYS2) _(R14) _(R15) \ _(R16) _(R17) _(R18) _(R19) _(R20) _(R21) _(R22) _(R23) \ _(R24) _(R25) _(R26) _(R27) _(R28) _(R29) _(R30) _(R31) #define FPRDEF(_) \ _(F0) _(F1) _(F2) _(F3) _(F4) _(F5) _(F6) _(F7) \ _(F8) _(F9) _(F10) _(F11) _(F12) _(F13) _(F14) _(F15) \ _(F16) _(F17) _(F18) _(F19) _(F20) _(F21) _(F22) _(F23) \ _(F24) _(F25) _(F26) _(F27) _(F28) _(F29) _(F30) _(F31) #define VRIDDEF(_) #define RIDENUM(name) RID_##name, enum { GPRDEF(RIDENUM) /* General-purpose registers (GPRs). */ FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */ RID_MAX, RID_TMP = RID_R0, /* Calling conventions. */ RID_RET = RID_R3, RID_RETHI = RID_R3, RID_RETLO = RID_R4, RID_FPRET = RID_F1, /* These definitions must match with the *.dasc file(s): */ RID_BASE = RID_R14, /* Interpreter BASE. */ RID_LPC = RID_R16, /* Interpreter PC. */ RID_DISPATCH = RID_R17, /* Interpreter DISPATCH table. */ RID_LREG = RID_R18, /* Interpreter L. */ RID_JGL = RID_R31, /* On-trace: global_State + 32768. */ /* Register ranges [min, max) and number of registers. */ RID_MIN_GPR = RID_R0, RID_MAX_GPR = RID_R31+1, RID_MIN_FPR = RID_F0, RID_MAX_FPR = RID_F31+1, RID_NUM_GPR = RID_MAX_GPR - RID_MIN_GPR, RID_NUM_FPR = RID_MAX_FPR - RID_MIN_FPR }; #define RID_NUM_KREF RID_NUM_GPR #define RID_MIN_KREF RID_R0 /* -- Register sets ------------------------------------------------------- */ /* Make use of all registers, except TMP, SP, SYS1, SYS2 and JGL. */ #define RSET_FIXED \ (RID2RSET(RID_TMP)|RID2RSET(RID_SP)|RID2RSET(RID_SYS1)|\ RID2RSET(RID_SYS2)|RID2RSET(RID_JGL)) #define RSET_GPR (RSET_RANGE(RID_MIN_GPR, RID_MAX_GPR) - RSET_FIXED) #define RSET_FPR RSET_RANGE(RID_MIN_FPR, RID_MAX_FPR) #define RSET_ALL (RSET_GPR|RSET_FPR) #define RSET_INIT RSET_ALL #define RSET_SCRATCH_GPR (RSET_RANGE(RID_R3, RID_R12+1)) #define RSET_SCRATCH_FPR (RSET_RANGE(RID_F0, RID_F13+1)) #define RSET_SCRATCH (RSET_SCRATCH_GPR|RSET_SCRATCH_FPR) #define REGARG_FIRSTGPR RID_R3 #define REGARG_LASTGPR RID_R10 #define REGARG_NUMGPR 8 #define REGARG_FIRSTFPR RID_F1 #define REGARG_LASTFPR RID_F8 #define REGARG_NUMFPR 8 /* -- Spill slots --------------------------------------------------------- */ /* Spill slots are 32 bit wide. An even/odd pair is used for FPRs. ** ** SPS_FIXED: Available fixed spill slots in interpreter frame. ** This definition must match with the *.dasc file(s). ** ** SPS_FIRST: First spill slot for general use. ** [sp+12] tmplo word \ ** [sp+ 8] tmphi word / tmp dword, parameter area for callee ** [sp+ 4] tmpw, LR of callee ** [sp+ 0] stack chain */ #define SPS_FIXED 7 #define SPS_FIRST 4 /* Stack offsets for temporary slots. Used for FP<->int conversions etc. */ #define SPOFS_TMPW 4 #define SPOFS_TMP 8 #define SPOFS_TMPHI 8 #define SPOFS_TMPLO 12 #define sps_scale(slot) (4 * (int32_t)(slot)) #define sps_align(slot) (((slot) - SPS_FIXED + 3) & ~3) /* -- Exit state ---------------------------------------------------------- */ /* This definition must match with the *.dasc file(s). */ typedef struct { lua_Number fpr[RID_NUM_FPR]; /* Floating-point registers. */ int32_t gpr[RID_NUM_GPR]; /* General-purpose registers. */ int32_t spill[256]; /* Spill slots. */ } ExitState; /* Highest exit + 1 indicates stack check. */ #define EXITSTATE_CHECKEXIT 1 /* Return the address of a per-trace exit stub. */ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno) { while (*p == 0x60000000) p++; /* Skip PPCI_NOP. */ return p + 3 + exitno; } /* Avoid dependence on lj_jit.h if only including lj_target.h. */ #define exitstub_trace_addr(T, exitno) \ exitstub_trace_addr_((MCode *)((char *)(T)->mcode + (T)->szmcode), (exitno)) /* -- Instructions -------------------------------------------------------- */ /* Instruction fields. */ #define PPCF_CC(cc) ((((cc) & 3) << 16) | (((cc) & 4) << 22)) #define PPCF_T(r) ((r) << 21) #define PPCF_A(r) ((r) << 16) #define PPCF_B(r) ((r) << 11) #define PPCF_C(r) ((r) << 6) #define PPCF_MB(n) ((n) << 6) #define PPCF_ME(n) ((n) << 1) #define PPCF_Y 0x00200000 #define PPCF_DOT 0x00000001 typedef enum PPCIns { /* Integer instructions. */ PPCI_MR = 0x7c000378, PPCI_NOP = 0x60000000, PPCI_LI = 0x38000000, PPCI_LIS = 0x3c000000, PPCI_ADD = 0x7c000214, PPCI_ADDC = 0x7c000014, PPCI_ADDO = 0x7c000614, PPCI_ADDE = 0x7c000114, PPCI_ADDZE = 0x7c000194, PPCI_ADDME = 0x7c0001d4, PPCI_ADDI = 0x38000000, PPCI_ADDIS = 0x3c000000, PPCI_ADDIC = 0x30000000, PPCI_ADDICDOT = 0x34000000, PPCI_SUBF = 0x7c000050, PPCI_SUBFC = 0x7c000010, PPCI_SUBFO = 0x7c000450, PPCI_SUBFE = 0x7c000110, PPCI_SUBFZE = 0x7c000190, PPCI_SUBFME = 0x7c0001d0, PPCI_SUBFIC = 0x20000000, PPCI_NEG = 0x7c0000d0, PPCI_AND = 0x7c000038, PPCI_ANDC = 0x7c000078, PPCI_NAND = 0x7c0003b8, PPCI_ANDIDOT = 0x70000000, PPCI_ANDISDOT = 0x74000000, PPCI_OR = 0x7c000378, PPCI_NOR = 0x7c0000f8, PPCI_ORI = 0x60000000, PPCI_ORIS = 0x64000000, PPCI_XOR = 0x7c000278, PPCI_EQV = 0x7c000238, PPCI_XORI = 0x68000000, PPCI_XORIS = 0x6c000000, PPCI_CMPW = 0x7c000000, PPCI_CMPLW = 0x7c000040, PPCI_CMPWI = 0x2c000000, PPCI_CMPLWI = 0x28000000, PPCI_MULLW = 0x7c0001d6, PPCI_MULLI = 0x1c000000, PPCI_MULLWO = 0x7c0005d6, PPCI_EXTSB = 0x7c000774, PPCI_EXTSH = 0x7c000734, PPCI_SLW = 0x7c000030, PPCI_SRW = 0x7c000430, PPCI_SRAW = 0x7c000630, PPCI_SRAWI = 0x7c000670, PPCI_RLWNM = 0x5c000000, PPCI_RLWINM = 0x54000000, PPCI_RLWIMI = 0x50000000, PPCI_B = 0x48000000, PPCI_BL = 0x48000001, PPCI_BC = 0x40800000, PPCI_BCL = 0x40800001, PPCI_BCTR = 0x4e800420, PPCI_BCTRL = 0x4e800421, PPCI_CRANDC = 0x4c000102, PPCI_CRXOR = 0x4c000182, PPCI_CRAND = 0x4c000202, PPCI_CREQV = 0x4c000242, PPCI_CRORC = 0x4c000342, PPCI_CROR = 0x4c000382, PPCI_MFLR = 0x7c0802a6, PPCI_MTCTR = 0x7c0903a6, PPCI_MCRXR = 0x7c000400, /* Load/store instructions. */ PPCI_LWZ = 0x80000000, PPCI_LBZ = 0x88000000, PPCI_STW = 0x90000000, PPCI_STB = 0x98000000, PPCI_LHZ = 0xa0000000, PPCI_LHA = 0xa8000000, PPCI_STH = 0xb0000000, PPCI_STWU = 0x94000000, PPCI_LFS = 0xc0000000, PPCI_LFD = 0xc8000000, PPCI_STFS = 0xd0000000, PPCI_STFD = 0xd8000000, PPCI_LWZX = 0x7c00002e, PPCI_LBZX = 0x7c0000ae, PPCI_STWX = 0x7c00012e, PPCI_STBX = 0x7c0001ae, PPCI_LHZX = 0x7c00022e, PPCI_LHAX = 0x7c0002ae, PPCI_STHX = 0x7c00032e, PPCI_LWBRX = 0x7c00042c, PPCI_STWBRX = 0x7c00052c, PPCI_LFSX = 0x7c00042e, PPCI_LFDX = 0x7c0004ae, PPCI_STFSX = 0x7c00052e, PPCI_STFDX = 0x7c0005ae, /* FP instructions. */ PPCI_FMR = 0xfc000090, PPCI_FNEG = 0xfc000050, PPCI_FABS = 0xfc000210, PPCI_FRSP = 0xfc000018, PPCI_FCTIWZ = 0xfc00001e, PPCI_FADD = 0xfc00002a, PPCI_FSUB = 0xfc000028, PPCI_FMUL = 0xfc000032, PPCI_FDIV = 0xfc000024, PPCI_FSQRT = 0xfc00002c, PPCI_FMADD = 0xfc00003a, PPCI_FMSUB = 0xfc000038, PPCI_FNMSUB = 0xfc00003c, PPCI_FCMPU = 0xfc000000, PPCI_FSEL = 0xfc00002e, } PPCIns; typedef enum PPCCC { CC_GE, CC_LE, CC_NE, CC_NS, CC_LT, CC_GT, CC_EQ, CC_SO } PPCCC; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cconv.o0000664000000000000000000006231012213333061022341 0ustar rootrootELF>H.@@UHt t uHt;OrHHȋu#@uDH tut'U uHt;OrHHn ]UHSHHH+7HHHPH{ UHH]LeLmLuH0A̸HH9IEEHU{IƋtHUHL_HAtU9U.Au(M܉#Uظ9uzAtmtcA 9uKsA9vuBu 1 u4-uDHLLu L9uH]LeLmLuUHAWAVAUATSH8H}IIHMLEDM^DjD"t Du}tu~C : u@uuEuu#ttDu%AtAtu'˿9tA AͿD9 $DDu7M9u2D9thHuH}LH}H+7HHHXEt+AtHH H}L+7LHHHPutHMHyIHѺ HEHxHپ  0 && id < cts->toplj_cconv.clj_cconv.hidx < 8lj_cdata.hsz == 8dsize == ssize(((o)->it) < 0xfffeffffu)lj_obj.hsz != 0xffffffffu0bsz == 1(((info) >> 8) & 127) == 1s->size == 8d->size == 4!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))!((((dinfo)) >> 28) == CT_ENUM) && !((((sinfo)) >> 28) == CT_ENUM)!((((dinfo)) >> 28) == CT_ATTRIB) && !((((sinfo)) >> 28) == CT_ATTRIB)!((((dinfo)) >> 28) == CT_NUM) || dsize > 0!((((sinfo)) >> 28) == CT_NUM) || ssize > 0!(((dinfo) & (0xf0000000u|0x08000000u)) == (((CTInfo)(CT_NUM) << 28) + (0x08000000u))) || dsize == 1 || dsize == 4!(((sinfo) & (0xf0000000u|0x08000000u)) == (((CTInfo)(CT_NUM) << 28) + (0x08000000u))) || ssize == 1 || ssize == 4!(((dinfo) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) || (1u<<((uint32_t)(__builtin_clz(dsize)^31))) == dsize!(((sinfo) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) || (1u<<((uint32_t)(__builtin_clz(ssize)^31))) == ssize!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz((((info)) >> 28) == CT_BITFIELD)pos < 8*(((info) >> 16) & 127)bsz > 0 && bsz <= 8*(((info) >> 16) & 127)(((GCobj *)(uintptr_t)(df->name).gcptr32))->gch.gct == ~(~4u)ctype_childctype_checklj_cconv_ct_ctcconv_idxcdata_getptrcdata_setptrlj_cconv_tv_ctsetgcVlj_cdata_newlj_cconv_tv_bflj_cconv_ct_tvcconv_substruct_tablj_cconv_bf_tvCGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <5AC E$X*AC T ( AC M (AC M ]AC X $AC I ( AC M (LAC Xh (x AC M  tAC Ej (AC X .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @":"&T",T"12T"@20#T(O]\+i0+r++c  -2( 7  5  N5_x' 1 > KZa n'@dTm}      6*`  "'7E ]Tbiq t lj_cconv.ccconv_childqual__PRETTY_FUNCTION__.4024__PRETTY_FUNCTION__.4015cconv_err_initov__PRETTY_FUNCTION__.4281__PRETTY_FUNCTION__.4169__PRETTY_FUNCTION__.4103__PRETTY_FUNCTION__.4109__PRETTY_FUNCTION__.4346__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4117__PRETTY_FUNCTION__.4360__PRETTY_FUNCTION__.4446cconv_substruct_tab__PRETTY_FUNCTION__.4403__PRETTY_FUNCTION__.4425cconv_substruct_init.LC16__assert_faillj_ctype_reprlj_err_callervlj_cconv_compatptrlj_cconv_ct_ctmemcpymemsetlj_obj_typenamelj_err_argvlj_cconv_tv_ctlj_cdata_newreflj_mem_newgcolj_cconv_tv_bflj_err_callerlj_cconv_bf_tvlj_cconv_ct_tvlj_tab_getinthlj_tab_getstrlj_ctype_internlj_ctype_getfieldqlj_ccallback_newlj_obj_itypenamelj_cconv_multi_initlj_ctype_rawreflj_cconv_ct_init % * /D N S  X       2 4!  # x  #    # " , #1 86U _ #d hi  #   # X  #   ' . 9 K 'U .Z 9_t {#$#Ni                   ) .  3 T $m w |       $     ( -  2 R \ a f y     " "     ) .  3 W " # ! 1 A L : >D AI LN l ! > A L  !  # T ' #H { %  &  v    " K # c*(_ Zi }n s K #          F aP AU Zg)v     Z } # n' #, 1d nn #s x n #  n # 8+8 nB #G L  #   #     -G Q V  [s-  #   # 8+A K #P U    *.k u #z h/       .-E,       v     } #     . 8 =  Bu0    1 } #  %U _ d i~    #8 B G L` j o  t.-A#l$$T2y 3&     / 9 >  Cc"    e o t y    -,  * / 4E O T  Y5F $` 4| -        M!-!#!$!$x0 0 (0 00 80 @GHGPX`0 hp x0 55x0 0 0 0 0 ]  0 0 0 0 0     (0 00 80 @0 H P X0 `0 h p^ x^ 0 0 0 0 0 0  0 0 0 0 0 0 0 0  @\6`" i$dP | tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_gdbjit.h0000664000000000000000000000072012202141143022456 0ustar rootroot/* ** Client for the GDB JIT API. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_GDBJIT_H #define _LJ_GDBJIT_H #include "lj_obj.h" #include "lj_jit.h" #if LJ_HASJIT && defined(LUAJIT_USE_GDBJIT) LJ_FUNC void lj_gdbjit_addtrace(jit_State *J, GCtrace *T); LJ_FUNC void lj_gdbjit_deltrace(jit_State *J, GCtrace *T); #else #define lj_gdbjit_addtrace(J, T) UNUSED(T) #define lj_gdbjit_deltrace(J, T) UNUSED(T) #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_str.o0000664000000000000000000001730012213333047022044 0ustar rootrootELF>@@ UHH]LeLmH HAԋF V9vD,DH6HDk CH D$CH]LeLmUHAVAUATSIIẢFV 9v9v9wI6IA^ AFIDAFEtAt@4HA9w[A\A]A^]UHG DV A9AEFEt\DGNA9uADDLA9t1AȉD)ʃ| AA9tA9 A9wD)]UHAVAUATSDoA})DvB IDHHA}tVIEHt@zt$ HʀytP #BI02HuȃuAUHIuA)U I}AUA]Me[A\A]A^]UHAWAVAUATSH(H}Hv 8IAHEDpv-6ALAD11Љ)AL<3t#6AD1ЉA 1ȉ) I1Ɖ )1)1)ȉẺA#NIAKD<%H=vH:{H"{t!{t~HD9k uxH{Eu2ы4A34 tD)|> u1A9wS!AN(@ SHUm{tH]D9k u=HsLLu*S!AN(H@SHuAMH}HAF(CCDk ẺCCH{LLBD;EA#FIIAV ANBAF H9vt H}HH([A\A]A^A_]UHHo V H)W HP]ËFwUHHG tnGaGnÅxiGnGf-GiGnGf]UH1)H AHA)0хuHyH@-H]UHSH(HH}HHuHH([]UHSHHH}HUH H)HHH[]UH]UHH]LeHIӋV 9s F؉H6I$A\$ I$H]LeUHAWAVAUATSHHIII׋GHEIIXHHHHQLLHE@`HEH HE%LHHWHL)LLLYCgch.gct == ~(~4u)(o)->gch.gct == ~(~4u)len > 0%.14g(null)NULLlj_obj.h(((L->top - 1)->it) == (~4u))0123456789abcdef!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))lj_str_resizelj_str_newstr_fastcmpsetgcVlj_str_pushvfGCC: (Debian 4.7.3-4) 4.7.3zRx $_AC PJ $DtAC Gh l{AC v $AC G (AC M #AC ^ (rOC W G A ,KAC F L+AC Ea l2AC Eh  AC F  HAC Lw (AC M AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @  & , 12 @2 'O :W0 ` u ppP  `  __t2 K d%},  {N8# r|K'+62E$ W/Hfwt{3 lj_str.caddcharaddstr__PRETTY_FUNCTION__.4312__PRETTY_FUNCTION__.4333__PRETTY_FUNCTION__.4299__PRETTY_FUNCTION__.3812__PRETTY_FUNCTION__.4425lj_mem_realloclj_str_cmplj_str_resizememset__assert_faillj_str_newlj_err_msgmemcmpmemcpylj_str_freelj_str_bufnumsprintflj_str_bufintlj_str_fromnumlj_str_fromintlj_str_fromnumberlj_str_needbuflj_str_pushvfstrchrlj_state_growstack1lj_str_pushf4    \> H M  Ri s x 7}    d! ?+)\"$o ER L x~  % Q  % ,  Z  # H_pN8 0|Pp$/w3 tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_lib.c0000664000000000000000000001420312202141143021755 0ustar rootroot/* ** Library function support. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_lib_c #define LUA_CORE #include "lauxlib.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_func.h" #include "lj_bc.h" #include "lj_dispatch.h" #include "lj_vm.h" #include "lj_strscan.h" #include "lj_lib.h" /* -- Library initialization ---------------------------------------------- */ static GCtab *lib_create_table(lua_State *L, const char *libname, int hsize) { if (libname) { luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 16); lua_getfield(L, -1, libname); if (!tvistab(L->top-1)) { L->top--; if (luaL_findtable(L, LUA_GLOBALSINDEX, libname, hsize) != NULL) lj_err_callerv(L, LJ_ERR_BADMODN, libname); settabV(L, L->top, tabV(L->top-1)); L->top++; lua_setfield(L, -3, libname); /* _LOADED[libname] = new table */ } L->top--; settabV(L, L->top-1, tabV(L->top)); } else { lua_createtable(L, 0, hsize); } return tabV(L->top-1); } void lj_lib_register(lua_State *L, const char *libname, const uint8_t *p, const lua_CFunction *cf) { GCtab *env = tabref(L->env); GCfunc *ofn = NULL; int ffid = *p++; BCIns *bcff = &L2GG(L)->bcff[*p++]; GCtab *tab = lib_create_table(L, libname, *p++); ptrdiff_t tpos = L->top - L->base; /* Avoid barriers further down. */ lj_gc_anybarriert(L, tab); tab->nomm = 0; for (;;) { uint32_t tag = *p++; MSize len = tag & LIBINIT_LENMASK; tag &= LIBINIT_TAGMASK; if (tag != LIBINIT_STRING) { const char *name; MSize nuv = (MSize)(L->top - L->base - tpos); GCfunc *fn = lj_func_newC(L, nuv, env); if (nuv) { L->top = L->base + tpos; memcpy(fn->c.upvalue, L->top, sizeof(TValue)*nuv); } fn->c.ffid = (uint8_t)(ffid++); name = (const char *)p; p += len; if (tag == LIBINIT_CF) setmref(fn->c.pc, &G(L)->bc_cfunc_int); else setmref(fn->c.pc, bcff++); if (tag == LIBINIT_ASM_) fn->c.f = ofn->c.f; /* Copy handler from previous function. */ else fn->c.f = *cf++; /* Get cf or handler from C function table. */ if (len) { /* NOBARRIER: See above for common barrier. */ setfuncV(L, lj_tab_setstr(L, tab, lj_str_new(L, name, len)), fn); } ofn = fn; } else { switch (tag | len) { case LIBINIT_SET: L->top -= 2; if (tvisstr(L->top+1) && strV(L->top+1)->len == 0) env = tabV(L->top); else /* NOBARRIER: See above for common barrier. */ copyTV(L, lj_tab_set(L, tab, L->top+1), L->top); break; case LIBINIT_NUMBER: memcpy(&L->top->n, p, sizeof(double)); L->top++; p += sizeof(double); break; case LIBINIT_COPY: copyTV(L, L->top, L->top - *p++); L->top++; break; case LIBINIT_LASTCL: setfuncV(L, L->top++, ofn); break; case LIBINIT_FFID: ffid++; break; case LIBINIT_END: return; default: setstrV(L, L->top++, lj_str_new(L, (const char *)p, len)); p += len; break; } } } } /* -- Type checks --------------------------------------------------------- */ TValue *lj_lib_checkany(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (o >= L->top) lj_err_arg(L, narg, LJ_ERR_NOVAL); return o; } GCstr *lj_lib_checkstr(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (o < L->top) { if (LJ_LIKELY(tvisstr(o))) { return strV(o); } else if (tvisnumber(o)) { GCstr *s = lj_str_fromnumber(L, o); setstrV(L, o, s); return s; } } lj_err_argt(L, narg, LUA_TSTRING); return NULL; /* unreachable */ } GCstr *lj_lib_optstr(lua_State *L, int narg) { TValue *o = L->base + narg-1; return (o < L->top && !tvisnil(o)) ? lj_lib_checkstr(L, narg) : NULL; } #if LJ_DUALNUM void lj_lib_checknumber(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (!(o < L->top && lj_strscan_numberobj(o))) lj_err_argt(L, narg, LUA_TNUMBER); } #endif lua_Number lj_lib_checknum(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (!(o < L->top && (tvisnumber(o) || (tvisstr(o) && lj_strscan_num(strV(o), o))))) lj_err_argt(L, narg, LUA_TNUMBER); if (LJ_UNLIKELY(tvisint(o))) { lua_Number n = (lua_Number)intV(o); setnumV(o, n); return n; } else { return numV(o); } } int32_t lj_lib_checkint(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (!(o < L->top && lj_strscan_numberobj(o))) lj_err_argt(L, narg, LUA_TNUMBER); if (LJ_LIKELY(tvisint(o))) { return intV(o); } else { int32_t i = lj_num2int(numV(o)); if (LJ_DUALNUM) setintV(o, i); return i; } } int32_t lj_lib_optint(lua_State *L, int narg, int32_t def) { TValue *o = L->base + narg-1; return (o < L->top && !tvisnil(o)) ? lj_lib_checkint(L, narg) : def; } int32_t lj_lib_checkbit(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (!(o < L->top && lj_strscan_numberobj(o))) lj_err_argt(L, narg, LUA_TNUMBER); if (LJ_LIKELY(tvisint(o))) { return intV(o); } else { int32_t i = lj_num2bit(numV(o)); if (LJ_DUALNUM) setintV(o, i); return i; } } GCfunc *lj_lib_checkfunc(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (!(o < L->top && tvisfunc(o))) lj_err_argt(L, narg, LUA_TFUNCTION); return funcV(o); } GCtab *lj_lib_checktab(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (!(o < L->top && tvistab(o))) lj_err_argt(L, narg, LUA_TTABLE); return tabV(o); } GCtab *lj_lib_checktabornil(lua_State *L, int narg) { TValue *o = L->base + narg-1; if (o < L->top) { if (tvistab(o)) return tabV(o); else if (tvisnil(o)) return NULL; } lj_err_arg(L, narg, LJ_ERR_NOTABN); return NULL; /* unreachable */ } int lj_lib_checkopt(lua_State *L, int narg, int def, const char *lst) { GCstr *s = def >= 0 ? lj_lib_optstr(L, narg) : lj_lib_checkstr(L, narg); if (s) { const char *opt = strdata(s); MSize len = s->len; int i; for (i = 0; *(const uint8_t *)lst; i++) { if (*(const uint8_t *)lst == len && memcmp(opt, lst+1, len) == 0) return i; lst += 1+*(const uint8_t *)lst; } lj_err_argv(L, narg, LJ_ERR_INVOPTM, opt); } return def; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bc.o0000664000000000000000000000325612213333063021623 0ustar rootrootELF> @@ 1199!!%%$$$$)T\dltT\dltQYaiqy!B    2K2KKK2K2K2H 9xAv9b|"X5k 1t=n & J h G  T  0 B R bGQC,CG+^r/CoW  Z!!!?"_ ] y""%"$6%%%%(&I&k&&&&&'?'g''>((&'''k)5) ())-/.U///H00-.z.*6*e**+,u,,[-GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rodata.comment.note.GNU-stack@!@'@,@v 40=M   6@6lj_bc.clj_bc_modelj_bc_ofstarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_recdef.h0000664000000000000000000000507412213333063022460 0ustar rootroot/* This is a generated file. DO NOT EDIT! */ static const uint16_t recff_idmap[] = { 0, 0x0100, 0x0200, 0x0300, 0, 0, 0x0400, 0x0500, 0x0600, 0x0700, 0, 0, 0x0800, 0x0900, 0x0a00, 0, 0x0b00, 0x0c00, 0x0d00, 0, 0x0e00, 0x0f00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1000, 0x1100+(IRFPM_FLOOR), 0x1100+(IRFPM_CEIL), 0x1200+(IRFPM_SQRT), 0x1200+(IRFPM_LOG10), 0x1200+(IRFPM_EXP), 0x1200+(IRFPM_SIN), 0x1200+(IRFPM_COS), 0x1200+(IRFPM_TAN), 0x1300+(FF_math_asin), 0x1300+(FF_math_acos), 0x1300+(FF_math_atan), 0x1400+(IRCALL_sinh), 0x1400+(IRCALL_cosh), 0x1400+(IRCALL_tanh), 0, 0x1500, 0x1600, 0x1700, 0x1700, 0x1800, 0x1900, 0, 0x1a00, 0x1b00+(IR_MIN), 0x1b00+(IR_MAX), 0x1c00, 0, 0x1d00+(IR_TOBIT), 0x1d00+(IR_BNOT), 0x1d00+(IR_BSWAP), 0x1e00+(IR_BSHL), 0x1e00+(IR_BSHR), 0x1e00+(IR_BSAR), 0x1e00+(IR_BROL), 0x1e00+(IR_BROR), 0x1f00+(IR_BAND), 0x1f00+(IR_BOR), 0x1f00+(IR_BXOR), 0, 0x2000, 0x2100+(0), 0, 0x2100+(1), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2200, 0, 0x2300, 0x2400, 0, 0, 0, 0, 0x2500+(0), 0x2600+(0), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2500+(GCROOT_IO_OUTPUT), 0x2600+(GCROOT_IO_OUTPUT), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2700+(0), 0x2700+(1), 0x2800+(MM_eq), 0x2800+(MM_len), 0x2800+(MM_lt), 0x2800+(MM_le), 0x2800+(MM_concat), 0x2900, 0x2800+(MM_add), 0x2800+(MM_sub), 0x2800+(MM_mul), 0x2800+(MM_div), 0x2800+(MM_mod), 0x2800+(MM_pow), 0x2800+(MM_unm), 0, 0, 0, 0x2a00+(1), 0x2a00+(0), 0, 0, 0, 0, 0x2b00, 0x2b00, 0x2c00, 0x2d00, 0x2e00+(FF_ffi_sizeof), 0x2e00+(FF_ffi_alignof), 0x2e00+(FF_ffi_offsetof), 0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0, 0x3400 }; static const RecordFunc recff_func[] = { recff_nyi, recff_c, recff_assert, recff_type, recff_ipairs_aux, recff_ipairs, recff_getmetatable, recff_setmetatable, recff_rawget, recff_rawset, recff_rawequal, recff_select, recff_tonumber, recff_tostring, recff_pcall, recff_xpcall, recff_math_abs, recff_math_round, recff_math_unary, recff_math_atrig, recff_math_htrig, recff_math_modf, recff_math_log, recff_math_degrad, recff_math_atan2, recff_math_pow, recff_math_ldexp, recff_math_minmax, recff_math_random, recff_bit_unary, recff_bit_shift, recff_bit_nary, recff_string_len, recff_string_range, recff_table_getn, recff_table_insert, recff_table_remove, recff_io_write, recff_io_flush, recff_cdata_index, recff_cdata_arith, recff_cdata_call, recff_clib_index, recff_ffi_new, recff_ffi_typeof, recff_ffi_istype, recff_ffi_xof, recff_ffi_errno, recff_ffi_string, recff_ffi_copy, recff_ffi_fill, recff_ffi_abi, recff_ffi_gc }; tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_meta.c0000664000000000000000000003415612202141143022146 0ustar rootroot/* ** Metamethod handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_meta_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_meta.h" #include "lj_frame.h" #include "lj_bc.h" #include "lj_vm.h" #include "lj_strscan.h" /* -- Metamethod handling ------------------------------------------------- */ /* String interning of metamethod names for fast indexing. */ void lj_meta_init(lua_State *L) { #define MMNAME(name) "__" #name const char *metanames = MMDEF(MMNAME); #undef MMNAME global_State *g = G(L); const char *p, *q; uint32_t mm; for (mm = 0, p = metanames; *p; mm++, p = q) { GCstr *s; for (q = p+2; *q && *q != '_'; q++) ; s = lj_str_new(L, p, (size_t)(q-p)); /* NOBARRIER: g->gcroot[] is a GC root. */ setgcref(g->gcroot[GCROOT_MMNAME+mm], obj2gco(s)); } } /* Negative caching of a few fast metamethods. See the lj_meta_fast() macro. */ cTValue *lj_meta_cache(GCtab *mt, MMS mm, GCstr *name) { cTValue *mo = lj_tab_getstr(mt, name); lua_assert(mm <= MM_FAST); if (!mo || tvisnil(mo)) { /* No metamethod? */ mt->nomm |= (uint8_t)(1u<metatable); else if (tvisudata(o)) mt = tabref(udataV(o)->metatable); else mt = tabref(basemt_obj(G(L), o)); if (mt) { cTValue *mo = lj_tab_getstr(mt, mmname_str(G(L), mm)); if (mo) return mo; } return niltv(L); } #if LJ_HASFFI /* Tailcall from C function. */ int lj_meta_tailcall(lua_State *L, cTValue *tv) { TValue *base = L->base; TValue *top = L->top; const BCIns *pc = frame_pc(base-1); /* Preserve old PC from frame. */ copyTV(L, base-1, tv); /* Replace frame with new object. */ top->u32.lo = LJ_CONT_TAILCALL; setframe_pc(top, pc); setframe_gc(top+1, obj2gco(L)); /* Dummy frame object. */ setframe_ftsz(top+1, (int)((char *)(top+2) - (char *)base) + FRAME_CONT); L->base = L->top = top+2; /* ** before: [old_mo|PC] [... ...] ** ^base ^top ** after: [new_mo|itype] [... ...] [NULL|PC] [dummy|delta] ** ^base/top ** tailcall: [new_mo|PC] [... ...] ** ^base ^top */ return 0; } #endif /* Setup call to metamethod to be run by Assembler VM. */ static TValue *mmcall(lua_State *L, ASMFunction cont, cTValue *mo, cTValue *a, cTValue *b) { /* ** |-- framesize -> top top+1 top+2 top+3 ** before: [func slots ...] ** mm setup: [func slots ...] [cont|?] [mo|tmtype] [a] [b] ** in asm: [func slots ...] [cont|PC] [mo|delta] [a] [b] ** ^-- func base ^-- mm base ** after mm: [func slots ...] [result] ** ^-- copy to base[PC_RA] --/ for lj_cont_ra ** istruecond + branch for lj_cont_cond* ** ignore for lj_cont_nop ** next PC: [func slots ...] */ TValue *top = L->top; if (curr_funcisL(L)) top = curr_topL(L); setcont(top, cont); /* Assembler VM stores PC in upper word. */ copyTV(L, top+1, mo); /* Store metamethod and two arguments. */ copyTV(L, top+2, a); copyTV(L, top+3, b); return top+2; /* Return new base. */ } /* -- C helpers for some instructions, called from assembler VM ----------- */ /* Helper for TGET*. __index chain and metamethod. */ cTValue *lj_meta_tget(lua_State *L, cTValue *o, cTValue *k) { int loop; for (loop = 0; loop < LJ_MAX_IDXCHAIN; loop++) { cTValue *mo; if (LJ_LIKELY(tvistab(o))) { GCtab *t = tabV(o); cTValue *tv = lj_tab_get(L, t, k); if (!tvisnil(tv) || !(mo = lj_meta_fast(L, tabref(t->metatable), MM_index))) return tv; } else if (tvisnil(mo = lj_meta_lookup(L, o, MM_index))) { lj_err_optype(L, o, LJ_ERR_OPINDEX); return NULL; /* unreachable */ } if (tvisfunc(mo)) { L->top = mmcall(L, lj_cont_ra, mo, o, k); return NULL; /* Trigger metamethod call. */ } o = mo; } lj_err_msg(L, LJ_ERR_GETLOOP); return NULL; /* unreachable */ } /* Helper for TSET*. __newindex chain and metamethod. */ TValue *lj_meta_tset(lua_State *L, cTValue *o, cTValue *k) { TValue tmp; int loop; for (loop = 0; loop < LJ_MAX_IDXCHAIN; loop++) { cTValue *mo; if (LJ_LIKELY(tvistab(o))) { GCtab *t = tabV(o); cTValue *tv = lj_tab_get(L, t, k); if (LJ_LIKELY(!tvisnil(tv))) { t->nomm = 0; /* Invalidate negative metamethod cache. */ lj_gc_anybarriert(L, t); return (TValue *)tv; } else if (!(mo = lj_meta_fast(L, tabref(t->metatable), MM_newindex))) { t->nomm = 0; /* Invalidate negative metamethod cache. */ lj_gc_anybarriert(L, t); if (tv != niltv(L)) return (TValue *)tv; if (tvisnil(k)) lj_err_msg(L, LJ_ERR_NILIDX); else if (tvisint(k)) { setnumV(&tmp, (lua_Number)intV(k)); k = &tmp; } else if (tvisnum(k) && tvisnan(k)) lj_err_msg(L, LJ_ERR_NANIDX); return lj_tab_newkey(L, t, k); } } else if (tvisnil(mo = lj_meta_lookup(L, o, MM_newindex))) { lj_err_optype(L, o, LJ_ERR_OPINDEX); return NULL; /* unreachable */ } if (tvisfunc(mo)) { L->top = mmcall(L, lj_cont_nop, mo, o, k); /* L->top+2 = v filled in by caller. */ return NULL; /* Trigger metamethod call. */ } copyTV(L, &tmp, mo); o = &tmp; } lj_err_msg(L, LJ_ERR_SETLOOP); return NULL; /* unreachable */ } static cTValue *str2num(cTValue *o, TValue *n) { if (tvisnum(o)) return o; else if (tvisint(o)) return (setnumV(n, (lua_Number)intV(o)), n); else if (tvisstr(o) && lj_strscan_num(strV(o), n)) return n; else return NULL; } /* Helper for arithmetic instructions. Coercion, metamethod. */ TValue *lj_meta_arith(lua_State *L, TValue *ra, cTValue *rb, cTValue *rc, BCReg op) { MMS mm = bcmode_mm(op); TValue tempb, tempc; cTValue *b, *c; if ((b = str2num(rb, &tempb)) != NULL && (c = str2num(rc, &tempc)) != NULL) { /* Try coercion first. */ setnumV(ra, lj_vm_foldarith(numV(b), numV(c), (int)mm-MM_add)); return NULL; } else { cTValue *mo = lj_meta_lookup(L, rb, mm); if (tvisnil(mo)) { mo = lj_meta_lookup(L, rc, mm); if (tvisnil(mo)) { if (str2num(rb, &tempb) == NULL) rc = rb; lj_err_optype(L, rc, LJ_ERR_OPARITH); return NULL; /* unreachable */ } } return mmcall(L, lj_cont_ra, mo, rb, rc); } } /* In-place coercion of a number to a string. */ static LJ_AINLINE int tostring(lua_State *L, TValue *o) { if (tvisstr(o)) { return 1; } else if (tvisnumber(o)) { setstrV(L, o, lj_str_fromnumber(L, o)); return 1; } else { return 0; } } /* Helper for CAT. Coercion, iterative concat, __concat metamethod. */ TValue *lj_meta_cat(lua_State *L, TValue *top, int left) { int fromc = 0; if (left < 0) { left = -left; fromc = 1; } do { int n = 1; if (!(tvisstr(top-1) || tvisnumber(top-1)) || !tostring(L, top)) { cTValue *mo = lj_meta_lookup(L, top-1, MM_concat); if (tvisnil(mo)) { mo = lj_meta_lookup(L, top, MM_concat); if (tvisnil(mo)) { if (tvisstr(top-1) || tvisnumber(top-1)) top++; lj_err_optype(L, top-1, LJ_ERR_OPCAT); return NULL; /* unreachable */ } } /* One of the top two elements is not a string, call __cat metamethod: ** ** before: [...][CAT stack .........................] ** top-1 top top+1 top+2 ** pick two: [...][CAT stack ...] [o1] [o2] ** setup mm: [...][CAT stack ...] [cont|?] [mo|tmtype] [o1] [o2] ** in asm: [...][CAT stack ...] [cont|PC] [mo|delta] [o1] [o2] ** ^-- func base ^-- mm base ** after mm: [...][CAT stack ...] <--push-- [result] ** next step: [...][CAT stack .............] */ copyTV(L, top+2, top); /* Careful with the order of stack copies! */ copyTV(L, top+1, top-1); copyTV(L, top, mo); setcont(top-1, lj_cont_cat); return top+1; /* Trigger metamethod call. */ } else if (strV(top)->len == 0) { /* Shortcut. */ (void)tostring(L, top-1); } else { /* Pick as many strings as possible from the top and concatenate them: ** ** before: [...][CAT stack ...........................] ** pick str: [...][CAT stack ...] [...... strings ......] ** concat: [...][CAT stack ...] [result] ** next step: [...][CAT stack ............] */ MSize tlen = strV(top)->len; char *buffer; int i; for (n = 1; n <= left && tostring(L, top-n); n++) { MSize len = strV(top-n)->len; if (len >= LJ_MAX_STR - tlen) lj_err_msg(L, LJ_ERR_STROV); tlen += len; } buffer = lj_str_needbuf(L, &G(L)->tmpbuf, tlen); n--; tlen = 0; for (i = n; i >= 0; i--) { MSize len = strV(top-i)->len; memcpy(buffer + tlen, strVdata(top-i), len); tlen += len; } setstrV(L, top-n, lj_str_new(L, buffer, tlen)); } left -= n; top -= n; } while (left >= 1); if (LJ_UNLIKELY(G(L)->gc.total >= G(L)->gc.threshold)) { if (!fromc) L->top = curr_topL(L); lj_gc_step(L); } return NULL; } /* Helper for LEN. __len metamethod. */ TValue * LJ_FASTCALL lj_meta_len(lua_State *L, cTValue *o) { cTValue *mo = lj_meta_lookup(L, o, MM_len); if (tvisnil(mo)) { if (LJ_52 && tvistab(o)) tabref(tabV(o)->metatable)->nomm |= (uint8_t)(1u<gch.metatable), MM_eq); if (mo) { TValue *top; uint32_t it; if (tabref(o1->gch.metatable) != tabref(o2->gch.metatable)) { cTValue *mo2 = lj_meta_fast(L, tabref(o2->gch.metatable), MM_eq); if (mo2 == NULL || !lj_obj_equal(mo, mo2)) return (TValue *)(intptr_t)ne; } top = curr_top(L); setcont(top, ne ? lj_cont_condf : lj_cont_condt); copyTV(L, top+1, mo); it = ~(uint32_t)o1->gch.gct; setgcV(L, top+2, o1, it); setgcV(L, top+3, o2, it); return top+2; /* Trigger metamethod call. */ } return (TValue *)(intptr_t)ne; } #if LJ_HASFFI TValue * LJ_FASTCALL lj_meta_equal_cd(lua_State *L, BCIns ins) { ASMFunction cont = (bc_op(ins) & 1) ? lj_cont_condf : lj_cont_condt; int op = (int)bc_op(ins) & ~1; TValue tv; cTValue *mo, *o2, *o1 = &L->base[bc_a(ins)]; cTValue *o1mm = o1; if (op == BC_ISEQV) { o2 = &L->base[bc_d(ins)]; if (!tviscdata(o1mm)) o1mm = o2; } else if (op == BC_ISEQS) { setstrV(L, &tv, gco2str(proto_kgc(curr_proto(L), ~(ptrdiff_t)bc_d(ins)))); o2 = &tv; } else if (op == BC_ISEQN) { o2 = &mref(curr_proto(L)->k, cTValue)[bc_d(ins)]; } else { lua_assert(op == BC_ISEQP); setitype(&tv, ~bc_d(ins)); o2 = &tv; } mo = lj_meta_lookup(L, o1mm, MM_eq); if (LJ_LIKELY(!tvisnil(mo))) return mmcall(L, cont, mo, o1, o2); else return (TValue *)(intptr_t)(bc_op(ins) & 1); } #endif /* Helper for ordered comparisons. String compare, __lt/__le metamethods. */ TValue *lj_meta_comp(lua_State *L, cTValue *o1, cTValue *o2, int op) { if (LJ_HASFFI && (tviscdata(o1) || tviscdata(o2))) { ASMFunction cont = (op & 1) ? lj_cont_condf : lj_cont_condt; MMS mm = (op & 2) ? MM_le : MM_lt; cTValue *mo = lj_meta_lookup(L, tviscdata(o1) ? o1 : o2, mm); if (LJ_UNLIKELY(tvisnil(mo))) goto err; return mmcall(L, cont, mo, o1, o2); } else if (LJ_52 || itype(o1) == itype(o2)) { /* Never called with two numbers. */ if (tvisstr(o1) && tvisstr(o2)) { int32_t res = lj_str_cmp(strV(o1), strV(o2)); return (TValue *)(intptr_t)(((op&2) ? res <= 0 : res < 0) ^ (op&1)); } else { trymt: while (1) { ASMFunction cont = (op & 1) ? lj_cont_condf : lj_cont_condt; MMS mm = (op & 2) ? MM_le : MM_lt; cTValue *mo = lj_meta_lookup(L, o1, mm); #if LJ_52 if (tvisnil(mo) && tvisnil((mo = lj_meta_lookup(L, o2, mm)))) #else cTValue *mo2 = lj_meta_lookup(L, o2, mm); if (tvisnil(mo) || !lj_obj_equal(mo, mo2)) #endif { if (op & 2) { /* MM_le not found: retry with MM_lt. */ cTValue *ot = o1; o1 = o2; o2 = ot; /* Swap operands. */ op ^= 3; /* Use LT and flip condition. */ continue; } goto err; } return mmcall(L, cont, mo, o1, o2); } } } else if (tvisbool(o1) && tvisbool(o2)) { goto trymt; } else { err: lj_err_comp(L, o1, o2); return NULL; } } /* Helper for calls. __call metamethod. */ void lj_meta_call(lua_State *L, TValue *func, TValue *top) { cTValue *mo = lj_meta_lookup(L, func, MM_call); TValue *p; if (!tvisfunc(mo)) lj_err_optype_call(L, func); for (p = top; p > func; p--) copyTV(L, p, p-1); copyTV(L, func, mo); } /* Helper for FORI. Coercion. */ void LJ_FASTCALL lj_meta_for(lua_State *L, TValue *o) { if (!lj_strscan_numberobj(o)) lj_err_msg(L, LJ_ERR_FORINIT); if (!lj_strscan_numberobj(o+1)) lj_err_msg(L, LJ_ERR_FORLIM); if (!lj_strscan_numberobj(o+2)) lj_err_msg(L, LJ_ERR_FORSTEP); if (LJ_DUALNUM) { /* Ensure all slots are integers or all slots are numbers. */ int32_t k[3]; int nint = 0; ptrdiff_t i; for (i = 0; i <= 2; i++) { if (tvisint(o+i)) { k[i] = intV(o+i); nint++; } else { k[i] = lj_num2int(numV(o+i)); nint += ((lua_Number)k[i] == numV(o+i)); } } if (nint == 3) { /* Narrow to integers. */ setintV(o, k[0]); setintV(o+1, k[1]); setintV(o+2, k[2]); } else if (nint != 0) { /* Widen to numbers. */ if (tvisint(o)) setnumV(o, (lua_Number)intV(o)); if (tvisint(o+1)) setnumV(o+1, (lua_Number)intV(o+1)); if (tvisint(o+2)) setnumV(o+2, (lua_Number)intV(o+2)); } } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bcdef.h0000664000000000000000000000336412213333063022273 0ustar rootroot/* This is a generated file. DO NOT EDIT! */ LJ_DATADEF const uint16_t lj_bc_ofs[] = { 0, 72, 144, 216, 288, 427, 569, 632, 695, 764, 833, 886, 938, 989, 1040, 1081, 1122, 1148, 1180, 1240, 1314, 1368, 1422, 1476, 1530, 1589, 1643, 1697, 1751, 1805, 1841, 1908, 1975, 2042, 2109, 2158, 2230, 2306, 2342, 2378, 2408, 2437, 2462, 2505, 2541, 2631, 2713, 2751, 2785, 2836, 2900, 3009, 3102, 3120, 3138, 3286, 3410, 3509, 3682, 3911, 4035, 4177, 4223, 4265, 4269, 4419, 4487, 4652, 4843, 4931, 4935, 5071, 5163, 5268, 5365, 5470, 5490, 5586, 5679, 5699, 5743, 5782, 5802, 5820, 5867, 5892, 5912, 5975, 6029, 6029, 6154, 6155, 6234, 7898, 7965, 8476, 8579, 8636, 8767, 8031, 8193, 8285, 8337, 8368, 8825, 8866, 9474, 8921, 9224, 9526, 9653, 9677, 9704, 9768, 9801, 9835, 9866, 9897, 9930, 9971, 10014, 10047, 10087, 10127, 10302, 10450, 9735, 10167, 10167, 10206, 10603, 10549, 10253, 10657, 10716, 11650, 12048, 11995, 12117, 12196, 12278, 12360, 12442, 11704, 11801, 11898, 10775, 10806, 10853, 10975, 11144, 11271, 11381, 11496, 11611 }; LJ_DATADEF const uint16_t lj_bc_mode[] = { BCDEF(BCMODE) BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF, BCMODE_FF }; tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_base.o0000664000000000000000000006330012213333064022307 0ustar rootrootELF>H*@@UHGP HGHHHO*]UH>UHSHHHH0uGf<wujHGH9Gu`tHHC@HHSBxuPC@(t1HsH+sHH[]UHHG@x$tlp ]UHHGH9Gvxt60]UHSHHHGH;GsxtHHSztKHHHqHpAzuRC@(tH[]UHSHHBHHCxtE@@#SHPHCxt@SHlPH[]UHSHHtHC@HHCH[]UHHGH9Gvxt6H9t;Pt9u5HPH$HH9w H;PHD ]UHAWAVAUATSH8HHGLgI)I@x$tMp ,Htfxt`HSHJHKHH H qr9uJSR(HC@x$t@ HSHJHKBxuPC@(tHHCHAxuxAEMjAHCJ4Et7FuLh@ HE=wH}HELmHSHHBH Hv;RJ9uRC@(tHCHPHH Jv:H9uPC@(tHCHHUHIHu HHkMtH5 H HULIM9H5 H8[A\A]A^A_]UHATSHHHHu;HHHH_Ht/HHAľHEuHHH[A\]UHATSHAĺHAuHCSR H*Y/DHAuHS)J HS*HC[A\]UHSHHHSBHSHHSHpHHDHtHHHCH+CHH[]UHubHcHGHTzu[HGxtjpVBt%FtHG@]UHH]LeLmLuH HIľHIHCH;Cs`@=vuQHIƾHMEMLDID$INMHEAV IvHOHHMEMLDIL$MHDȺHƺHH]LeLmLuUH]UHATSHIԺHSHCHHHKHHH Jv:H9uPC@(tHHKHAHCAuI$z=vuaHSHIHJ Hv;R J9uRC@(tLH H[A\]UHH]LeLmH HIľHIžHIUMHDIt$MHDHHH]LeLmUHSHHHH[]UHATSHAľHHt*E~%DHHHH[A\]UHH]LeLmH IAHDHLSulxtkHI\$IT$HHBH HRJ9uRAD$@(tLID$@x$t]@ CCxuPAD$@(tAuC HC H]LeLmUH]UH{]UHATSHIH@HCLHPtVHKHHABzAH9uPC@([AD$=wLHv7HSRHcȃ|$t@HD u$A$PvҾH߸RHAT$ v҃EHHH߸HCxtG@HSBBxuPC@(t' [A\]UHAUATSHH Aă yHIċ@=vukA<$Lt[HSI$HBH HRJ9uRC@(A|$CDI]A|$t A$pLu4IMtA;UrHHȋt%=4HSHIuA}wHALLHLhAD$"vYHDHuLHUI9tZ tHHU Huu,HSHxH*HHH H*XB HC@H[A\A]]UHATSIHWHGHH)H~!xux#u*B4Ly9OÅFL)É[A\]UHSHHHHHHCHH[]UHSHHHH[]UHSHHHH[]UH]UHAWAVAUATSHIIźLID$HPI9T$vxtLA LAA9EA)AE~DLu LA;]s HcAEH LHt\IT$HJIL$HHH HvQJ9uRAD$@(t.ID$@HID$CA9^ADH[A\A]A^A_]UHH]LeHHIľHH[HL)‰SH]LeUHH]LeLmH0HIHCH;CsxtBHE܅u Dk,HU܉HHu~HD A|$t HEl$AEtAD$t{LLHCHPHSD @A|$uAT$C@(tH]LeLmUHSHHHGH;Gsxt:HEHUHHu~HxuPS,HCHHHK@z uRC@(tH[]UHAUATSHHIľHIHsHxt HEl$MtzAEtsAD$tiS!J(@tTJ)tuUAD$Bbase)->it) == (~8u))lj_lib.h(((L->top-1)->it) == (~8u))runningsuspendeddeadnormal=(load)too many nested functionsfunction: builtin#%d%s: %p(((L->top-1)->it) == (~4u))(((o)->it) == (~10u))lj_ctype.hid > 0 && id < cts->toplj_gc.h_GLua 5.1kv__modecoroutine!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~6u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~4u))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))stoprestartcollectcountstepsetpause setstepmul((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~8u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(-(int32_t)((o)->it))-1]))->it) == (~4u))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpausecopyTVsetgcVFassertnilbooleanuserdatastringupvalthreadprotofunctiontracecdatatable numbertypeDnextEpairs@FipairsgetmetatableLsetmetatablegetfenvsetfenvFrawgetrawsetrawequalunpackselectHtonumbernilfalsetrueHtostringerrorEpcallxpcallloadfileload loadstringdofilegcinfocollectgarbagenewproxytostringprint_VERSION statusrunningcreateEyieldFresumewraplj_lib_pushcclj_cf_coroutine_wraplj_ffh_coroutine_wrap_auxlj_cf_printload_auxlj_ffh_tostringlj_ffh_tonumberctype_checklj_gc_barrierbackffh_pairslj_cf_coroutine_createP?GCC: (Debian 4.7.3-4) 4.7.3zRx (AC c <AC  XAC E |9AC t 1AC l  AC E  AC E 4AC Ej $}AC x (DAC M  pAC C  AC C  yAC Eo |AC w $AC T $ AC F  D,AC C$ $hAC Pm /AC Ee  qAC Ci $gAC PR AC K AC K  <AC C $`^AC IP  zAC Cr  QAC EG /AC Ee /AC Ee AC P (0XAC MF  \UAC LD $AC P  AC E $,AC I AAC EAC $,AC I .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @XhC&,12,@2T  OH`\8$i0@$r]$`$P0c ). B ; ((06;T9n(1Y4.}EPQ jG@yM|&  ,   / q&2 g0r I W d t0^@P zqQ//  5X"U1?M,a`zA Y0`-     )7HWft (9DUesz '2=L^n| &5J[ulib_base.clj_cf_gcinfolj_ffh_coroutine_yieldffh_resume__PRETTY_FUNCTION__.3991lj_ffh_coroutine_wrap_aux__PRETTY_FUNCTION__.6046lj_ffh_coroutine_resumelj_cf_coroutine_create__PRETTY_FUNCTION__.6029lj_cf_coroutine_wrap__PRETTY_FUNCTION__.5842__PRETTY_FUNCTION__.6063lj_cf_coroutine_runninglj_cf_coroutine_statuslj_cf_print__PRETTY_FUNCTION__.6003__PRETTY_FUNCTION__.4040lj_cf_newproxylj_cf_collectgarbagelj_cf_dofileload_aux__PRETTY_FUNCTION__.5957lj_cf_loadreader_funclj_cf_loadstringlj_cf_loadfilelj_ffh_pcalllj_cf_errorffh_pairs__PRETTY_FUNCTION__.5867lj_ffh_ipairslj_ffh_pairslj_ffh_tostring__PRETTY_FUNCTION__.5943lj_ffh_tonumber__PRETTY_FUNCTION__.5929__PRETTY_FUNCTION__.4805lj_cf_selectlj_cf_rawsetlj_ffh_rawgetlj_ffh_ipairs_auxlj_ffh_nextlj_cf_unpacklj_cf_rawequallj_cf_setfenvlj_cf_getfenvlj_ffh_setmetatable__PRETTY_FUNCTION__.3961lj_ffh_assertlj_lib_cf_baselj_lib_init_baselj_lib_cf_coroutinelj_lib_init_coroutine.LC14lj_err_callerlj_err_str__assert_faillj_state_growstacklj_err_arglj_err_argtlua_newthreadlua_pushcclosurelua_pushthreadlua_pushstringlj_tab_getstrlua_gettablelj_str_bufnumlua_calllua_tolstringstdout_IO_putcfwritelua_settoplua_newuserdatalua_tobooleanlua_typelua_createtablelua_pushvaluelua_pushbooleanlua_rawsetlua_getmetatablelua_rawgetlua_setmetatablelj_lib_checkoptlj_lib_optintlua_gclj_lib_optstrluaL_loadfilelua_errorlj_gc_barrierflj_lib_checkstrluaL_loadbufferxlj_lib_checkfunclua_loadxluaL_checkstackluaL_loadfilexlj_lib_checkanylua_isstringluaL_wherelua_concatlj_meta_lookuplj_str_fromnumberlua_pushfstringlua_topointerlj_obj_itypenamelj_strscan_numlj_ctype_rawreflj_cconv_ct_tvstrtoullj_char_bitslj_lib_checkintlj_lib_checktablj_tab_lenlua_checkstacklj_tab_getinthlj_obj_equallj_debug_framelj_lib_checktabornillj_err_callermsglj_ffh_coroutine_wrap_errlj_err_runluaopen_baselj_str_newlj_tab_setstrlua_pushlstringlj_tab_newlj_lib_register2BsBC <  DE <    (DGFGH <   D <  D %I4 <> /C 8HDk <u  z 8DJF f k) f. \9 T@ \EK} <   DL <   D <&  + 0Dh <r w |DMN< <F K PD <  DOPBQRQS%Q/RWTdUqVWXYZ[\]VTF%\2^K Z_o`@abc!d3Ow <&   8Debb# f3 Tc gt h T r  i z jD <N S X Dj O <   D P B- b= bM Tq k l h ` T m n Y! o) dR lc p <   D G <r   P DD <N S X D l p. <8 = BDYq{ <0   D rs t r$ <0.  3 8Di <s x }D`lu6 <@ E JDq <@{   Dv <P  D <P  D4wFffFux y yAzdF{ll[{l{z*{O{d`z|}B~7 <A F KDll{z=TFlBe <  D`.EF <  D{pB1 <`; @ (EDW <`a f kD <  Dlb Bd <n s xD    <  !D+ 3E <  D   <   D <  < %  -2 <7 <`< "D   q5     (0@8G@PY(( @(\6(Y(HPtG@M( H l   2   @ dq 45`0tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/libluajit.a0000664000000000000000000414615612213333066022531 0ustar rootroot! / 1378727478 0 0 0 12854 ` 2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2z2zvvvvvvvvvvvvvvvJJJJJJJJJJJJJJJJJJJJJJJJD&IIPlPlPl\\\\\\\\\\\\{{{{{{{{{{{{{{       ddtttttttttttttttOOOOOOOOqqqqqqqqqqq  |||||((DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDˬ>>>>>>>>>>>>>>pppvvvvvvvvvvѰ00000000WWWWWWWWWaaaaaaaaaaaaaaa " " T T T T T T T T T T T T T T T f f f f f f f J J J J J J J J /N /N ^ ^ ^ ^ ^  ` ` ` ` ` ` ` ` ` ` ` ` ն ն<<Uaz&:=.az4Jlj_vm_asm_beginlj_BC_ISLTlj_BC_ISGElj_BC_ISLElj_BC_ISGTlj_BC_ISEQVlj_BC_ISNEVlj_BC_ISEQSlj_BC_ISNESlj_BC_ISEQNlj_BC_ISNENlj_BC_ISEQPlj_BC_ISNEPlj_BC_ISTClj_BC_ISFClj_BC_ISTlj_BC_ISFlj_BC_MOVlj_BC_NOTlj_BC_UNMlj_BC_LENlj_BC_ADDVNlj_BC_SUBVNlj_BC_MULVNlj_BC_DIVVNlj_BC_MODVNlj_BC_ADDNVlj_BC_SUBNVlj_BC_MULNVlj_BC_DIVNVlj_BC_MODNVlj_BC_ADDVVlj_BC_SUBVVlj_BC_MULVVlj_BC_DIVVVlj_BC_MODVVlj_BC_POWlj_BC_CATlj_BC_KSTRlj_BC_KCDATAlj_BC_KSHORTlj_BC_KNUMlj_BC_KPRIlj_BC_KNILlj_BC_UGETlj_BC_USETVlj_BC_USETSlj_BC_USETNlj_BC_USETPlj_BC_UCLOlj_BC_FNEWlj_BC_TNEWlj_BC_TDUPlj_BC_GGETlj_BC_GSETlj_BC_TGETVlj_BC_TGETSlj_BC_TGETBlj_BC_TSETVlj_BC_TSETSlj_BC_TSETBlj_BC_TSETMlj_BC_CALLMlj_BC_CALLlj_BC_CALLMTlj_BC_CALLTlj_BC_ITERClj_BC_ITERNlj_BC_VARGlj_BC_ISNEXTlj_BC_RETMlj_BC_RETlj_BC_RET0lj_BC_RET1lj_BC_FORIlj_BC_JFORIlj_BC_FORLlj_BC_IFORLlj_BC_JFORLlj_BC_ITERLlj_BC_IITERLlj_BC_JITERLlj_BC_LOOPlj_BC_ILOOPlj_BC_JLOOPlj_BC_JMPlj_BC_FUNCFlj_BC_IFUNCFlj_BC_JFUNCFlj_BC_FUNCVlj_BC_IFUNCVlj_BC_JFUNCVlj_BC_FUNCClj_BC_FUNCCWlj_vm_returnplj_vm_returnclj_vm_returnlj_vm_leave_cplj_vm_leave_unwlj_vm_unwind_yieldlj_vm_unwind_clj_vm_unwind_c_ehlj_vm_unwind_rethrowlj_vm_unwind_fflj_vm_unwind_ff_ehlj_vm_growstack_clj_vm_growstack_vlj_vm_growstack_flj_vm_resumelj_vm_pcalllj_vm_calllj_vm_call_dispatchlj_vm_call_dispatch_flj_vm_cpcalllj_cont_dispatchlj_cont_catlj_vmeta_tgetslj_vmeta_tgetblj_vmeta_tgetvlj_cont_ralj_vmeta_tsetslj_vmeta_tsetblj_vmeta_tsetvlj_cont_noplj_vmeta_complj_cont_condtlj_cont_condflj_vmeta_equallj_vmeta_equal_cdlj_vmeta_arith_vnolj_vmeta_arith_vnlj_vmeta_arith_nvolj_vmeta_arith_nvlj_vmeta_unmlj_vmeta_arith_vvolj_vmeta_arith_vvlj_vmeta_binoplj_vmeta_lenlj_vmeta_call_ralj_vmeta_calllj_vmeta_forlj_ff_assertlj_ff_typelj_ff_getmetatablelj_ff_setmetatablelj_ff_rawgetlj_ff_tonumberlj_ff_tostringlj_ff_nextlj_fff_res2lj_ff_pairslj_ff_ipairs_auxlj_fff_res0lj_ff_ipairslj_ff_pcalllj_ff_xpcalllj_ff_coroutine_resumelj_ff_coroutine_wrap_auxlj_ff_coroutine_yieldlj_fff_resilj_fff_resnlj_ff_math_abslj_fff_resxmm0lj_fff_res1lj_fff_reslj_fff_res_lj_ff_math_floorlj_ff_math_ceillj_ff_math_sqrtlj_ff_math_loglj_ff_math_log10lj_ff_math_explj_ff_math_sinlj_ff_math_coslj_ff_math_tanlj_ff_math_asinlj_ff_math_acoslj_ff_math_atanlj_ff_math_sinhlj_ff_math_coshlj_ff_math_tanhlj_ff_math_deglj_ff_math_radlj_ff_math_atan2lj_ff_math_ldexplj_ff_math_frexplj_ff_math_modflj_ff_math_fmodlj_ff_math_powlj_ff_math_minlj_ff_math_maxlj_ff_string_lenlj_ff_string_bytelj_ff_string_charlj_fff_newstrlj_ff_string_sublj_fff_emptystrlj_ff_string_replj_ff_string_reverselj_ff_string_lowerlj_ff_string_upperlj_ff_table_getnlj_ff_bit_tobitlj_ff_bit_bandlj_ff_bit_borlj_ff_bit_bxorlj_ff_bit_bswaplj_ff_bit_bnotlj_fff_resbitlj_fff_fallback_bit_oplj_ff_bit_lshiftlj_ff_bit_rshiftlj_ff_bit_arshiftlj_ff_bit_rollj_ff_bit_rorlj_fff_fallback_2lj_fff_fallback_1lj_fff_fallbacklj_vm_call_taillj_fff_gcsteplj_vm_recordlj_vm_rethooklj_vm_inshooklj_cont_hooklj_vm_hotlooplj_vm_callhooklj_vm_hotcalllj_vm_exit_handlerlj_vm_exit_interplj_vm_floorlj_vm_floor_sselj_vm_ceillj_vm_ceil_sselj_vm_trunclj_vm_trunc_sselj_vm_modlj_vm_log2lj_vm_exp_x87lj_vm_exp2_x87lj_vm_exp2rawlj_vm_powlj_vm_pow_sselj_vm_powi_sselj_vm_foldfpmlj_vm_foldarithlj_vm_cpuidlj_assert_bad_for_arg_typelj_vm_ffi_callbacklj_cont_ffi_callbacklj_vm_ffi_calllj_gc_separateudatalj_gc_finalize_udatalj_gc_finalize_cdatalj_gc_freealllj_gc_barrierflj_gc_barrieruvlj_gc_closeuvlj_gc_barriertracelj_mem_realloclj_gc_fullgclj_gc_steplj_gc_step_jitlj_gc_step_fixtoplj_mem_newgcolj_mem_growlj_err_throwlj_err_strlj_err_allmsglj_err_unwind_dwarflj_err_memlj_err_runlj_err_msglj_err_lexlj_err_optypelj_err_complj_err_optype_calllj_err_callermsglj_err_callervlj_err_callerlj_err_argvlj_err_arglj_err_argtypelj_err_argtlua_atpaniclua_errorluaL_argerrorluaL_typerrorluaL_whereluaL_errorlj_char_bitslj_bc_modelj_bc_ofslj_obj_equallj_obj_itypenamelj_obj_typenamelj_str_cmplj_str_resizelj_str_newlj_str_freelj_str_bufnumlj_str_bufintlj_str_fromnumlj_str_fromintlj_str_fromnumberlj_str_needbuflj_str_pushvflj_str_pushflj_tab_newlj_tab_new1lj_tab_duplj_tab_freelj_tab_getinthlj_tab_getstrlj_tab_getlj_tab_setlj_tab_setstrlj_tab_setinthlj_tab_newkeylj_tab_reasizelj_tab_nextlj_tab_lenlj_func_freeprotolj_func_freeuvlj_func_closeuvlj_func_newClj_func_newL_emptylj_func_newL_gclj_func_freelj_udata_newlj_udata_freelj_meta_initlj_meta_cachelj_meta_lookuplj_meta_tailcalllj_meta_tgetlj_meta_tsetlj_meta_arithlj_meta_catlj_meta_lenlj_meta_equallj_meta_equal_cdlj_meta_complj_meta_calllj_meta_forlj_debug_framelj_debug_linelj_debug_uvnamelj_debug_uvnamevlj_debug_slotnamelj_debug_funcnamelj_debug_shortnamelj_debug_addloclj_debug_pushloclua_getlocallua_setlocallj_debug_getinfolua_getinfolua_getstackluaL_tracebacklj_state_relimitstacklj_state_shrinkstacklj_state_growstacklj_state_growstack1lj_state_newstatelua_closelj_state_newlj_state_freelj_dispatch_initlj_dispatch_init_hotcountlj_dispatch_updateluaJIT_setmodeluaJIT_version_2_0_2lua_sethooklua_gethooklua_gethookmasklua_gethookcountlj_dispatch_inslj_dispatch_calllj_vmevent_preparelj_vmevent_calllj_vm_sinhlj_vm_coshlj_vm_tanhlj_vm_modilj_vm_errnolj_strscan_scanlj_strscan_numlua_statuslua_checkstackluaL_checkstacklua_xmovelua_gettoplua_settoplua_removelua_insertlua_replacelua_pushvaluelua_typeluaL_checktypeluaL_checkanylua_typenamelua_iscfunctionlua_isnumberlua_isstringlua_isuserdatalua_rawequallua_equallua_lessthanlua_tonumberluaL_checknumberluaL_optnumberlua_tointegerluaL_checkintegerluaL_optintegerlua_tobooleanlua_tolstringluaL_checklstringluaL_optlstringluaL_checkoptionlua_objlenlua_tocfunctionlua_touserdatalua_tothreadlua_topointerlua_pushnillua_pushnumberlua_pushintegerlua_pushlstringlua_pushstringlua_pushvfstringlua_pushfstringlua_pushcclosurelua_pushbooleanlua_pushlightuserdatalua_createtableluaL_newmetatablelua_pushthreadlua_newthreadlua_newuserdatalua_concatlua_gettablelua_getfieldlua_rawgetlua_rawgetilua_getmetatableluaL_getmetafieldlua_getfenvlua_nextlua_getupvaluelua_upvalueidlua_upvaluejoinluaL_checkudatalua_settablelua_setfieldlua_rawsetlua_rawsetilua_setmetatablelua_setfenvlua_setupvaluelua_calllua_pcalllua_cpcallluaL_callmetalua_yieldlua_resumelua_gclua_getallocflua_setallocflj_lex_cleanuplj_lex_token2strlj_lex_errorlj_lex_setuplj_lex_lookaheadlj_lex_nextlj_lex_initlj_parse_keepstrlj_parse_keepcdatalj_parselj_bcreadlj_bcwritelua_loadxlua_loadluaL_loadfilexluaL_loadfileluaL_loadbufferxluaL_loadbufferluaL_loadstringlua_dumplj_ir_growtoplj_ir_emitlj_ir_calllj_ir_callinfolj_ir_kintlj_ir_k64_freealllj_ir_k64_findlj_ir_k64lj_ir_knum_u64lj_ir_kint64lj_ir_knumintlj_ir_kgclj_ir_kptr_lj_ir_knulllj_ir_kslotlj_ir_kvaluelj_ir_tonumberlj_ir_tonumlj_ir_tostrlj_ir_numcmplj_ir_strcmplj_ir_rollbacklj_ir_type_sizelj_ir_modelj_opt_fwd_aloadlj_opt_fwd_hloadlj_opt_fwd_hrefklj_opt_fwd_href_nokeylj_opt_fwd_tptrlj_opt_dse_ahstorelj_opt_fwd_uloadlj_opt_dse_ustorelj_opt_fwd_floadlj_opt_dse_fstorelj_opt_fwd_xloadlj_opt_dse_xstorelj_opt_fwd_tab_lenlj_opt_fwd_wasnonnillj_opt_cselj_opt_foldlj_opt_cselimlj_opt_narrow_convertlj_opt_narrow_indexlj_opt_narrow_tointlj_opt_narrow_tobitlj_opt_narrow_cindexlj_opt_narrow_arithlj_opt_narrow_unmlj_opt_narrow_modlj_opt_narrow_powlj_opt_narrow_forllj_opt_dcelj_opt_looplj_opt_sinklj_mcode_synclj_mcode_freelj_mcode_reservelj_mcode_commitlj_mcode_abortlj_mcode_patchlj_mcode_limiterrlj_snap_grow_buf_lj_snap_grow_map_lj_snap_addlj_snap_purgelj_snap_shrinklj_snap_regspmaplj_snap_replaylj_snap_restorelj_record_objcmplj_record_constifylj_record_retlj_record_idxlj_record_mm_lookuplj_record_calllj_record_tailcalllj_record_inslj_record_setuprecff_cdata_indexrecff_cdata_callrecff_cdata_arithrecff_clib_indexrecff_ffi_newrecff_ffi_errnorecff_ffi_stringrecff_ffi_copyrecff_ffi_fillrecff_ffi_typeofrecff_ffi_istyperecff_ffi_abirecff_ffi_xofrecff_ffi_gclj_crecord_tonumberlj_ffrecord_select_modelj_ffrecord_funclj_asm_patchexitlj_asm_tracelj_trace_errlj_trace_err_infolj_trace_freelj_trace_reenableprotolj_trace_flushlj_trace_flushprotolj_trace_flushalllj_trace_initstatelj_trace_freestatelj_trace_inslj_trace_hotlj_trace_exitlj_ctype_newlj_ctype_internlj_ctype_addnamelj_ctype_getnamelj_ctype_getfieldqlj_ctype_rawreflj_ctype_sizelj_ctype_vlsizelj_ctype_infolj_ctype_metalj_ctype_reprlj_ctype_repr_int64lj_ctype_repr_complexlj_ctype_initlj_ctype_freestatelj_cdata_newreflj_cdata_newvlj_cdata_freelj_cdata_setfinlj_cdata_indexlj_cdata_getlj_cdata_setlj_cconv_compatptrlj_cconv_ct_ctlj_cconv_tv_ctlj_cconv_tv_bflj_cconv_bf_tvlj_cconv_ct_tvlj_cconv_multi_initlj_cconv_ct_initlj_ccall_ctid_vararglj_ccall_funclj_ccallback_ptr2slotlj_ccallback_mcode_freelj_ccallback_enterlj_ccallback_leavelj_ccallback_newlj_carith_divu64lj_carith_divi64lj_carith_modu64lj_carith_modi64lj_carith_powu64lj_carith_powi64lj_carith_oplj_clib_indexlj_clib_loadlj_clib_unloadlj_clib_defaultlj_cparselj_lib_registerlj_lib_checkanylj_lib_checkstrlj_lib_optstrlj_lib_checknumlj_lib_checkintlj_lib_optintlj_lib_checkbitlj_lib_checkfunclj_lib_checktablj_lib_checktabornillj_lib_checkoptlj_alloc_createlj_alloc_destroylj_alloc_fluaL_fileresultluaL_execresultluaL_findtableluaL_openlibluaL_registerluaL_prepbufferluaL_addlstringluaL_addstringluaL_pushresultluaL_addvalueluaL_buffinitluaL_gsubluaL_refluaL_unrefluaL_newstatelua_newstatelj_ffh_coroutine_wrap_errluaopen_baselj_math_random_stepluaopen_mathluaopen_bitluaopen_stringluaopen_tableluaopen_ioluaopen_osluaopen_packageluaopen_debugluaopen_jitluaopen_ffiluaL_openlibslj_vm.o/ 1378727475 1000 1000 100664 28608 ` ELF>x;@@ |D|6ƒf.v CA$||ƒf.w CA$||ƒf.r CA$|l|^ƒf.s CA$ls5|s+f.z u CA$]|R9luԃsċ ʋ9twritEu1ls5|s+f.zt CA$|9luɃsϋ ʋ9tŃwritEutHЋlu& A; u CA$uRHЋlu& A; t CA$uls,Af.z u CA$uls,Af.zt CA$uHЋl9uCA$uTHЋl9t=CA$lsl,‰,CA$lrl,‰,CA$ls CA$lr CA$H,H,ʋA$1|lA$|JHfHnWʋA$|u"W*@ ʋA$|4<‰*K|AXʋA$|xA\ʋA$|BAYʋA$| A^ʋA$|A .ʋA$|AXʋA$|kA\ʋA$|5AYʋA$|A^ʋA$|A ||XʋA$|s|e\ʋA$|0|"YʋA$||^ʋA$|| |y|k 1-ʋA$|$W4‰)\$ULkKHHʋA$HADʋA$HADʋA$*ʋA$AʋA$HЉDA$L Di)9vA$jlmHEHʋA$jl}m ‹DMEtEuA$vAt݉APHЋjlA E@EuA$At}tՉAP΋jANjlMA$HЋjlMAA$l$}(tU4ʉUA$HЋl$URA4\$UKDA$l$UApA;t\$sE% =t-UKDA$̉CHЋl$Ap\$A;tUs/A4UKDA$CHHЋjmAHЋjmA;|,|sf-*f.;EExtH(H,ʋA$}tMAKD̓|wHA|,M#HkMy u69Au1yt2CH)H,‹A$CDIuMtAu|,;EExtH(H,ʋA$}tMAKD|,|sd-*f.;EExtEuBH,H(A$}tۋMAKȃ|6eAAM KHA|/,M#HkEMy uM9AuHyt'ECH,H)A$}tӉ $MA $뾋IuMt A $D$l$|$WH$\$Ul$qeAAE a|z ,;En ExtEu2H HA$}tۋMA0 KȀeAAM KD<$E<Ǎ ʋiEucD$t%D;Ew3D)AD}H)I/AuD<$A$|$W‰\$UK둀eAAE D$|, TZ] ̓A$|, TZ] ̓A$D$LA׋iy Zu]jD$tH)I/AujD$}w] ̓A$uKHэ DyEE΃u )A׋Z뎃뉍LHiHAH)HAiAiA ʉZ] ̓A$D<$Dt$lDDuD}D9sLA|t?*I,HlʉDCDt$D<$A$D);EwDkD}AtFt0IoIH,HDDt뢃D<$D| D+ztDlA9sIGAH9sA9rA9rD<$A$D$D)vۉl$l$;E wIGAHA9r믉UM\$A)׋t$UMAŃ|uAl|u6|u/}u)DDA$CTAD$ZD$u^A׃tI,IoAuD$k9w(KHэDzEEЋA$AGAÍk$){ZD$u:8Cw(KHэDzEEЋA$Dƍk)ZD$uBH, Hj8Cw(KHэDzEEЋA$Dƍk\)뚍 ʁy y  i I|$f.AsA$f.ڍ ʁy y  i I|,f.ACvA$f.҉~fAl. ʁy "y"iIXAx$f.ArA$f.ڍ ʁy {"yn"iIXAx!f.AA$f.݉~fAl. ʋitiAA$ ʋit i)i8A$~fAl.A$AH@@l$AHADL$$Ll$HA$~fAl.JD{̋l$ ;M K9vA$D9vD{̋l$ ;M K9v C@D9v,DzhDxl$ ;M Fщk…t%9s4DyD8DyDxAuD{̋A$@űjL}l$DU;M EAdž8AAdž8U MZwjL}l$DU;M ELnAdž8A(Adž8U MZ!)HLZD D$ouAdž8)ۃtH, Hjul$]D$L$9uUHL$ HM01H(A^A_[]r;U wBʅt)ÉUD$ΉU뢰Hl$mDž룋|$H(A^A_[]HHl$HUDuAư ZBAdž8DKÃUE\$ΉUEj)] ̓A$USAWAVH(|$1L|$DuAư L}0D$HD$ D$D$8EAdž8EUE))ыZD$/USAWAVH(L$USAWAVH(T$|$L}0L|$ l$He0DuAư Adž8U)ӋE)iy-ʉZ] ̓A$USAWAVH(|$l$D}$D+}D$D|$L}0L|$ He0хhу)Dȋ]HcMvL=FLDzEEA)EeK )|$WHHM$D$H${4u.A)A!C*$H$Ck,|$WH‰\$UtKH(H,ʋA$MYY)Ӌi$D$H${5u.A)A!C*$H$Ck,|$WH‰\$UtKH,H(A$MYCH,HiY)Ӌil$U4ʍ‰K\$U[r CA$xrx̓Ήl$U‰\$뤃l$Us\$AAǍ, ‰, DCΉ|$W\$U)ЉYXl$U4‰\$UҍLL$$l$U΍\$UL$$iA9)ʉZ] ̓A$l$UΉ\$UCA jZD$j*jtуH)HiuD$Vjt% 9GŋjD ZBBjZua*mBABjM#HkMy u9At IuijBtwvAwz*}z BEZBjEteAAE z|Ջ2R|$H(ZHjRzE3ZzuBBz AApA;trxl$U\$։U먃tGzl$UUZ2R\$Ut"HjHBHjHB B`*zTjE ZBBB 'zz ZBH?fHnX-B*;EsExt"H(H*F}tՉuظ0*zjE ZBBWBjJAAz 7jj B*ZjJ봃 *Z\$,$z H}0 } Mt ;M \;]  ]l$UUlH)9tH+HC9u΋<$Adž8l$$UwZKD{KD)t;E w[H)HH)D9uCB\$D$HBKKHHË $Dyމ$Unjm Z\$,$H}0 } Mt ;M \;]  ]l$UUlH)9tH+HC9u΋<$Adž8l$$UwNKD{KD)t;E w;H)HH)D9uC\$D$1} މ $Dyމ$U둋l$HE0 UDE1HE0EZZ4 z HfHnTZBD$u.8CwKHэʋA$DH5z* .땁z qz z Q[ z  z  z 6x zk Y zL : z- d z ; z  z  z | zo T zG , z jYE  zz B!zz BjZjBs: t6 r.)*ŋj?jWHPCfHnYBj4몃zjZt4( \B"Bj1x JjWӃzz Bzxzkz ^J4 z99|L]۹z9h|L_ۃz**E ,z*Z} m*ApA;triz\,*Ll$D$HD$l$UT$HƉ\$UZBBApA;trD$vz,jl$zz *l$m ,JD$9r~&l$)|.l D$I|D(ډtѹ1ApA;trFz<z *-,B~} r A9MAD$MuAApA;trVz*E HA9\$D$AM u؋\$<nApA;trzO*E A98\$D$ALArZw y؋\$ApA;truz*E A9\$D$ALarzw y؋\$Vz~Ջ:*azTH8CfHnXf~+H8CfHńzXf~ʼnD$D9JxFXf~!̓؃H8CfHńzXf~ʼnD$D9xXf~ ̓؃iH8CfHńzMXf~ʼnD$D9xXf~1̓؃zH8CfHnXf~3zH8CfHnXf~*D$zz tJH8CfHnXXf~f~럃?z2z %JH8CfHnXXf~f~Mzz JH8CfHnXXf~f~zz JH8CfHnXXf~f~rMzsDz s;JH8CfHnXXf~f~cl$Z\$UDEB;M wYPUPM)Aju] ̓A$ukHՍ݃)U1]Hl$l$\$UDEUE)Hl$UA uSu8 t4A+Au6Au( t$Attl$UމUKkCAML$jmEǍ‹l$UEAIH\$뫉\$\$Dl$UEމD$UHE)HKAUATASARAQAPWVUHl$XUSRQPEeL}LuDuA8Adž8A9P zPRx $>9PzRx  .symtab.strtab.shstrtab.rela.text.data.bss.note.GNU-stack.comment.rela.debug_frame.rela.eh_frame @9jP & :, :1 :A0 :O0:`Jo` a:x\xoH ;k>  Z "H-HH8HCHN Zf9?rx?~EEA5v433)9)b| <J "6X6#6/6;;G56Sk6_6k6w $1CtCCC=1nHL $& $J h   +% $0 Z<LG RX &d "p 3{ @T m ] 0 B  |R c *b6DG|P\kQ.w*CD,XCG\+i ai ^+r`7]C/OC,\o'it/?W6}  OZV! K$5 3@ACVew8A>} T$ *1@HLMJ^.j )y5H,t5)76RJ ,;I[l 1,@Z/^Q=J+WcCpB{_ \] 4  l!Hd! !9 !y& 5 5" A ?":N y")Z "7g "/~ $  %, .% .% 6%, b% j% o% s%B %1 %A %Q &!` (&!q I&" k& & &! &) &+ '! ?'(  g'(  '(# . '= ''L '/]  (1n >( (c 5)6 k)6 ); ); * 6*/ e*L *.  *+ +; +L ,na u,st ,s [-' -6 -a .a z.a .5 /3 C/  L/  U/O) /R: /RL H0RZ 0Fh 0z 0 0W C18 {14  1 1 1D  2 *22&\25b2CCT2gu3]33[T4T4[44^ 5v555 55#515@@(7N7^K8j]8_89,>9buildvm_x86.dasclj_vm_asm_beginlj_BC_ISLTlj_BC_ISGElj_BC_ISLElj_BC_ISGTlj_BC_ISEQVlj_BC_ISNEVlj_BC_ISEQSlj_BC_ISNESlj_BC_ISEQNlj_BC_ISNENlj_BC_ISEQPlj_BC_ISNEPlj_BC_ISTClj_BC_ISFClj_BC_ISTlj_BC_ISFlj_BC_MOVlj_BC_NOTlj_BC_UNMlj_BC_LENlj_tab_lenlj_BC_ADDVNlj_BC_SUBVNlj_BC_MULVNlj_BC_DIVVNlj_BC_MODVNlj_BC_ADDNVlj_BC_SUBNVlj_BC_MULNVlj_BC_DIVNVlj_BC_MODNVlj_BC_ADDVVlj_BC_SUBVVlj_BC_MULVVlj_BC_DIVVVlj_BC_MODVVlj_BC_POWlj_BC_CATlj_meta_catlj_BC_KSTRlj_BC_KCDATAlj_BC_KSHORTlj_BC_KNUMlj_BC_KPRIlj_BC_KNILlj_BC_UGETlj_BC_USETVlj_gc_barrieruvlj_BC_USETSlj_BC_USETNlj_BC_USETPlj_BC_UCLOlj_func_closeuvlj_BC_FNEWlj_func_newL_gclj_BC_TNEWlj_tab_newlj_gc_step_fixtoplj_BC_TDUPlj_tab_duplj_BC_GGETlj_BC_GSETlj_BC_TGETVlj_BC_TGETSlj_BC_TGETBlj_BC_TSETVlj_BC_TSETSlj_tab_newkeylj_BC_TSETBlj_BC_TSETMlj_tab_reasizelj_BC_CALLMlj_BC_CALLlj_BC_CALLMTlj_BC_CALLTlj_BC_ITERClj_BC_ITERNlj_BC_VARGlj_state_growstacklj_BC_ISNEXTlj_BC_RETMlj_BC_RETlj_BC_RET0lj_BC_RET1lj_BC_FORIlj_BC_JFORIlj_BC_FORLlj_BC_IFORLlj_BC_JFORLlj_BC_ITERLlj_BC_IITERLlj_BC_JITERLlj_BC_LOOPlj_BC_ILOOPlj_BC_JLOOPlj_BC_JMPlj_BC_FUNCFlj_BC_IFUNCFlj_BC_JFUNCFlj_BC_FUNCVlj_BC_IFUNCVlj_BC_JFUNCVlj_BC_FUNCClj_BC_FUNCCWlj_vm_returnplj_vm_returnclj_vm_returnlj_vm_leave_cplj_vm_leave_unwlj_vm_unwind_yieldlj_vm_unwind_clj_vm_unwind_c_ehlj_vm_unwind_rethrowlj_err_throwlj_vm_unwind_fflj_vm_unwind_ff_ehlj_vm_growstack_clj_vm_growstack_vlj_vm_growstack_flj_vm_resumelj_vm_pcalllj_vm_calllj_vm_call_dispatchlj_vm_call_dispatch_flj_vm_cpcalllj_cont_dispatchlj_cont_catlj_vmeta_tgetslj_vmeta_tgetblj_vmeta_tgetvlj_meta_tgetlj_cont_ralj_vmeta_tsetslj_vmeta_tsetblj_vmeta_tsetvlj_meta_tsetlj_cont_noplj_vmeta_complj_meta_complj_cont_condtlj_cont_condflj_vmeta_equallj_meta_equallj_vmeta_equal_cdlj_meta_equal_cdlj_vmeta_arith_vnolj_vmeta_arith_vnlj_vmeta_arith_nvolj_vmeta_arith_nvlj_vmeta_unmlj_vmeta_arith_vvolj_vmeta_arith_vvlj_meta_arithlj_vmeta_binoplj_vmeta_lenlj_meta_lenlj_vmeta_call_ralj_vmeta_calllj_meta_calllj_vmeta_forlj_meta_forlj_ff_assertlj_ff_typelj_ff_getmetatablelj_ff_setmetatablelj_ff_rawgetlj_tab_getlj_ff_tonumberlj_ff_tostringlj_str_fromnumlj_ff_nextlj_tab_nextlj_fff_res2lj_ff_pairslj_ff_ipairs_auxlj_tab_getinthlj_fff_res0lj_ff_ipairslj_ff_pcalllj_ff_xpcalllj_ff_coroutine_resumelj_ff_coroutine_wrap_auxlj_ffh_coroutine_wrap_errlj_ff_coroutine_yieldlj_fff_resilj_fff_resnlj_ff_math_abslj_fff_resxmm0lj_fff_res1lj_fff_reslj_fff_res_lj_ff_math_floorlj_ff_math_ceillj_ff_math_sqrtlj_ff_math_loglj_ff_math_log10lj_ff_math_explj_ff_math_sinlj_ff_math_coslj_ff_math_tanlj_ff_math_asinlj_ff_math_acoslj_ff_math_atanlj_ff_math_sinhlj_vm_sinhlj_ff_math_coshlj_vm_coshlj_ff_math_tanhlj_vm_tanhlj_ff_math_deglj_ff_math_radlj_ff_math_atan2lj_ff_math_ldexplj_ff_math_frexplj_ff_math_modflj_ff_math_fmodlj_ff_math_powlj_ff_math_minlj_ff_math_maxlj_ff_string_lenlj_ff_string_bytelj_ff_string_charlj_fff_newstrlj_str_newlj_ff_string_sublj_fff_emptystrlj_ff_string_replj_ff_string_reverselj_ff_string_lowerlj_ff_string_upperlj_ff_table_getnlj_ff_bit_tobitlj_ff_bit_bandlj_ff_bit_borlj_ff_bit_bxorlj_ff_bit_bswaplj_ff_bit_bnotlj_fff_resbitlj_fff_fallback_bit_oplj_ff_bit_lshiftlj_ff_bit_rshiftlj_ff_bit_arshiftlj_ff_bit_rollj_ff_bit_rorlj_fff_fallback_2lj_fff_fallback_1lj_fff_fallbacklj_vm_call_taillj_fff_gcsteplj_gc_steplj_vm_recordlj_vm_rethooklj_vm_inshooklj_dispatch_inslj_cont_hooklj_vm_hotlooplj_trace_hotlj_vm_callhooklj_vm_hotcalllj_dispatch_calllj_vm_exit_handlerlj_trace_exitlj_vm_exit_interplj_vm_floorlj_vm_floor_sselj_vm_ceillj_vm_ceil_sselj_vm_trunclj_vm_trunc_sselj_vm_modlj_vm_log2lj_vm_exp_x87lj_vm_exp2_x87lj_vm_exp2rawlj_vm_powlj_vm_pow_sselj_vm_powi_sselj_vm_foldfpmlj_vm_foldarithlj_vm_cpuidlj_assert_bad_for_arg_typelj_vm_ffi_callbacklj_ccallback_enterlj_cont_ffi_callbacklj_ccallback_leavelj_vm_ffi_calllj_err_unwind_dwarf0? 9 9 >, @ B C E CM-PXxX{XijQ{| !J!+"#X$$X\'''*s-p1X12V2 |2 33{8$,9&  D H'((`'lj_gc.o/ 1378727464 1000 1000 100664 24216 ` ELF>h3@@ UHt;rH9uPtPW8P G8]UHWJv5u `#Huu tȃ]UHAWAVAUATSHIIAD(A{uHs(LCƒDtCAU(!Ɖу@t u ЈCIVAU(uA@tAAE0H9uAE0CHLAAHt E-LH[A\A]A^A_]UHATSHNV@ tI(@t9S us t<sSHtFtLt{ t?sFL@uktASBHv32V9tBFtL{tKKE t@t; t)t$ɃvGAD$8C A\$8[A\]UHAUATSHIHL3HtFtLNHL9uH[A\A]]UHAUATSHIf~PI^w,ID$HЀxu0FtLuAD$Rft LAD$Vft LAD$Xft LAt$0FtLH[A\A]]UHAWAVAUATSH(H}Do8AUAEt.AEAE HMA8 lA} tf2A]HC HH}HE HHxHE"kuMvuM KEDEHuӋU~AE EAEHMA@AE Di@jEEugAEt_L$AUHڋBHv42V9tFt H}HL9uEuEE}UUȉH@M$A|$AD$ u}u?Pv7At$V9tFt H};}uCAD$Pv6A4$V9tFt H}A9-}~AeAUAEH@HDH>A}tf8LAuFt H}A}tAA}uuAEHpHA8Mv@t H}-A}ADtFt H}ACA9rUDD$Pv9Dt V9tFt H}ACA9rA}uAEHAEH A}tf=MAE(`A]HHylHH)HAD$HH9sAL$4Ft'H9sH}HuAE&ft H}AE mA}tfAHUBgch.gct == ~(~12u)(o)->gch.gct == ~(~5u)(o)->gch.gct == ~(~11u)!(((&n->key)->it) == (~0u))(o)->gch.gct == ~(~8u)(o)->gch.gct == ~(~7u)(o)->gch.gct == ~(~6u)(o)->gch.gct == ~(~9u)lj_obj.h(o)->gch.gct == ~(~10u)o->gch.gct != ~(~11u)(t->marked & (0x08 | 0x10))old >= g->gc.total0(traceno)>0 && (MSize)(traceno)<(&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->sizetracetraceno != (&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->cur.traceno!((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) || (o->gch.marked & 0x20)((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) || ow == 0x40((o)->gch.marked & (0x01 | 0x02)) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))!(((((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~(((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->it) == (((GCobj *)(uintptr_t)(((((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)))->gcr).gcptr32))->gch.gct)gct == ~(~8u) || gct == ~(~11u) || gct == ~(~6u) || gct == ~(~7u)(!((o)->gch.marked & (0x04|(0x01 | 0x02))))!(((((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~(((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->it) == (((GCobj *)(uintptr_t)(((&(((TValue *)(void *)(uintptr_t)((t)->array).ptr32))[(i)]))->gcr).gcptr32))->gch.gct)!((((&n->key)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&n->key)->it) == (((GCobj *)(uintptr_t)((&n->key)->gcr).gcptr32))->gch.gct)!((((&n->val)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&n->val)->it) == (((GCobj *)(uintptr_t)((&n->val)->gcr).gcptr32))->gch.gct)fn->l.nupvalues <= (((((fn)->c.ffid == 0)) ? (void) (0) : __assert_fail ("((fn)->c.ffid == 0)", "lj_gc.c", 207, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)((fn)->l.pc).ptr32)-sizeof(GCproto))))->sizeuv!((((&fn->c.upvalue[i])->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&fn->c.upvalue[i])->it) == (((GCobj *)(uintptr_t)((&fn->c.upvalue[i])->gcr).gcptr32))->gch.gct)(uintptr_t)(intptr_t)(i) >= (uintptr_t)-(intptr_t)(pt)->sizekgc!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct)!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((GCobj *)(uintptr_t)(g->jit_L).gcptr32) == ((void *)0)((o)->gch.marked & 0x04) && ((v)->gch.marked & (0x01 | 0x02)) && !((v)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause((((tv)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(osz == 0) == (p == ((void *)0))(nsz == 0) == (p == ((void *)0))((uintptr_t)(p) == (uint32_t)(uintptr_t)(p))!((((&g->registrytv)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || (~((&g->registrytv)->it) == (((GCobj *)(uintptr_t)((&g->registrytv)->gcr).gcptr32))->gch.gct)(&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->next).gcptr32)->uv))->prev).gcptr32)->uv) == uv && (&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->prev).gcptr32)->uv))->next).gcptr32)->uv) == uv!((((GCobj *)((&((GCobj *)(uintptr_t)(g->mainthref).gcptr32)->th))))->gch.marked & (0x01 | 0x02))g->gc.state == GCSfinalize || g->gc.state == GCSpause(((GCobj *)(uintptr_t)(g->jit_L).gcptr32))->gch.gct == ~(~6u)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)((uintptr_t)(o) == (uint32_t)(uintptr_t)(o))lj_gc_separateudatagc_finalizesetgcVcopyTVgc_sweepgc_onestepgc_mark_startgc_markpropagatemarkgc_traverse_tabgc_traverse_funcgc_traverse_protogc_marktracegc_traverse_threadatomicgc_mark_uvgc_clearweaklj_gc_step_jitlj_gc_fullgclj_gc_barrierflj_gc_barrieruvlj_gc_closeuvlj_mem_realloclj_mem_newgcoGCC: (Debian 4.7.3-4) 4.7.3zRx sAC n <KAC F (\ AC M  AC Cw  GAC Iy $AC I (AC M  $7AC Co $H>AC T% $pAC I (AC M -AC Ec $AC K $ VAC IH 4AC  (TRLC m T A AC  LC F $AC T (hAC MV $AC I $<AC G $dAC I 'AC b $AC Pl $=AC Cu .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @C&P,P12P/@2UT, OZh\0.e.z.u(\p 2h7h/ > sB /sK; D^ ]HiqJGF0P6 7HD >ZWsP D 0.h9Rj kcu      2>KVvjn-VR "w1+'CRQ=]ixlj_gc.cgc_marktrace__PRETTY_FUNCTION__.5187gc_maycleargc_sweep__PRETTY_FUNCTION__.5266gc_freefuncgc_mark__PRETTY_FUNCTION__.5103gc_mark_gcrootgc_traverse_tracepropagatemark__PRETTY_FUNCTION__.5238__PRETTY_FUNCTION__.5152__PRETTY_FUNCTION__.5174__PRETTY_FUNCTION__.5203__PRETTY_FUNCTION__.5226gc_propagate_graygc_call_finalizer__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.3380gc_finalize__PRETTY_FUNCTION__.5312__PRETTY_FUNCTION__.5139__PRETTY_FUNCTION__.5400__PRETTY_FUNCTION__.5405__PRETTY_FUNCTION__.5411__PRETTY_FUNCTION__.5423gc_onestep__PRETTY_FUNCTION__.5116__PRETTY_FUNCTION__.5121__PRETTY_FUNCTION__.5348__PRETTY_FUNCTION__.5279__PRETTY_FUNCTION__.5358__PRETTY_FUNCTION__.5392__PRETTY_FUNCTION__.5380__PRETTY_FUNCTION__.5430__assert_faillj_meta_cachelj_state_shrinkstacklj_vm_pcalllj_err_throwlj_tab_setlj_gc_separateudatalj_gc_finalize_udatalj_gc_finalize_cdatalj_gc_freealllj_gc_barrierflj_gc_barrieruvlj_gc_closeuvlj_gc_barriertracelj_mem_realloclj_err_memlj_str_resizelj_gc_fullgclj_gc_steplj_gc_step_jitlj_gc_step_fixtoplj_mem_newgcolj_mem_growlj_str_freelj_func_freeuvlj_state_freelj_func_freeprotolj_func_freelj_trace_freelj_cdata_freelj_tab_freelj_udata_free #B  %/A #BK P xU/& #^0 5 :/d #^n s Hx/ # #   /# #- 2 7/^ #h m r/ #   / #  /  #* / 4/n #x } `/ #  7/0 #  /3 #= B OG/i #s x }/ #  H/ #' , k1/w #  / #   /e #n s x/ #0  h/ #0  h// #8 = B / #P   / 1 #   / #W  ( / #P$ ) X . /F 2l 3 #D   / #D   /F #PP U X Z /r 4 #W  ( / #D' , 1/Q0 #0  /0  #0  /: #WD I (N/ #   /* #4 9  >/I #S X ]/ #   / #W$ ) (./t9 #   / #   /7>@ #J O ( T/` #j o P t/ #& #0 5  :/ #j   / #j( - 2/v #c   /5P #uZ _ 7d/r #u|  / #  /?6=f #p u z/ #  -/s #}  `/ #  / #  /ALA> #  (/=c{ (FGHIJKLMN @s`JF( LD t vn8X@hw+Rlj_err.o/ 1378727475 1000 1000 100664 17056 ` ELF>&@@UHATSHIHCHPI9sXH@I$H PvHHwHwUHSHHHGHHx@u@HHH)XAAAuFxt8HcHH)x\@w$HzH{HKxHC0HxHʹHHUHAUATSHHAIHEHwHHUA$''wHSH+SHEdHt3xhu-Au'H5HLHUH߸H(H5HMHMDH߸HHUHSHHHPHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8HcH5H(HHHUHHcH5UHATSHHAHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8HcH5H(HHDHUHHcHUHATSHAy HcHGH HcHGHDH H;Cs+@ =vЃEȉH H5HH߸HDHPUHHcHUHWHH]UHUHUHUHSHHHUUtHcH H¾HH[]UHSHHHPHXL`Lht#)p)M)U)])e)m)u)}Dž(Dž,0HEH0H@H8H(HHHlj_obj.hlj_err.ccf != ((void *)0)0%s:%d: %s?!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))not enough memoryerror in error handlingC++ exceptionstring length overflowuserdata length overflowstack overflowstack overflow (%s)table overflowtable index is NaNtable index is nilinvalid key to 'next'attempt to call a %s valueattempt to %s %s '%s' (a %s value)attempt to %s a %s valueattempt to compare %s with %sattempt to compare two %s valuesloop in gettableloop in settablecallindexperform arithmetic onconcatenateget length ofcalling '%s' on bad self (%s)bad argument #%d to '%s' (%s)%s expected, got %sinvalid valuevalue expectedcoroutine expectednil or table expectedLua function expectedfunction or level expectedstring/function/table expectedboolean or proxy expected'for' initial value must be a number'for' limit must be a number'for' step must be a numberno calling environmentattempt to yield across C-call boundarybad light userdata pointerbad action while in __gc metamethodassertion failed!cannot change a protected metatabletoo many results to unpackreader function must return a string'tostring' must return a string to 'print'index out of rangebase out of rangelevel out of rangeinvalid levelinvalid optioninvalid option '%s'invalid format'setfenv' cannot change environment of given objectcannot resume running coroutinecannot resume dead coroutinecannot resume non-suspended coroutinewrong number of arguments to 'insert'invalid value (%s) at index %d in table for 'concat'invalid order function for sortingattempt to use a closed filestandard file is closedunable to generate a unique filenamefield '%s' missing in date tableunable to dump given functionstring slice too longmissing '[' after '%f' in patterninvalid pattern capturemalformed pattern (ends with '%')malformed pattern (missing ']')unbalanced patternpattern too complexinvalid capture indextoo many capturesunfinished captureinvalid option '%%%c' to 'format'invalid format (repeated flags)invalid format (width or precision too long)invalid replacement value (a %s)name conflict for module '%s'JIT compiler disabled, CPU does not support SSE2unknown or malformed optimization flag '%s'attempt to load chunk with wrong mode%s near '%s'lexical element too longchunk has too many lineschunk has too many syntax levelsmalformed numberunfinished long stringunfinished long commentunfinished stringinvalid escape sequenceinvalid long string delimiter'%s' expectedcontrol structure too longfunction or expression too complexchunk has more than %d local variablesmain function has more than %d %sfunction at line %d has more than %d %s'%s' expected (to close '%s' at line %d)function too long for return fixup or '...' expectedambiguous syntax (function call x new statement)function arguments expectedunexpected symbolcannot use '...' outside a vararg functionsyntax error'=' or 'in' expectedno loop to breakundefined label '%s'duplicate label '%s' jumps into the scope of local '%s'cannot load incompatible bytecodecannot load malformed bytecodeinvalid C typesize of C type is unknown or too largebad storage classdeclaration specifier expectedundeclared or implicit tag '%s'attempt to redefine '%s'wrong number of type parameterstoo many initializers for '%s'cannot convert '%s' to '%s'attempt to get length of '%s'attempt to concatenate '%s' and '%s'attempt to perform arithmetic on '%s' and '%s'attempt to compare '%s' with '%s''%s' is not callablewrong number of arguments for function call'%s' has no member named '%s''%s' cannot be indexed'%s' cannot be indexed with '%s''%s' has no '%s' metamethodattempt to write to constant locationmissing declaration for symbol '%s'bad callbacktoo many callbacksNYI: packed bit fieldsNYI: cannot call this C function (yet)setgcVcopyTVfinderrfuncGCC: (Debian 4.7.3-4) 4.7.3zRx  AC C|  @AC C  d}AC E3AC n ,OC X AC ElAC C AC H(AC  DAC MhAC IrAC iAC AC EAC IAC HAC 4AC JTAC pAC CAC AC R  AC  AC  AC  ?AC Eu @AC H.symtab.strtab.shstrtab.rela.text.rela.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.tbss.comment.note.GNU-stack.rela.eh_frame @`4 +&>1623E2(WYuT>a" g0"p" "X@ x%*x 1` b/: E[^i w     }3 "I6E]k~l *7o EVhZ rt i5  - @      - ;?FU lj_err.cunwindstack__PRETTY_FUNCTION__.3429err_unwindstatic_uex__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.5021err_msgverr_argmsglj_func_closeuv__assert_faillj_state_relimitstackexitlj_err_throw_GLOBAL_OFFSET_TABLE__Unwind_RaiseExceptionlj_err_strlj_err_allmsglj_str_newlj_err_unwind_dwarf_Unwind_GetCFA_Unwind_DeleteException_Unwind_SetGRlj_vm_unwind_ff_ehlj_vm_unwind_c_eh_Unwind_SetIPlj_vm_unwind_rethrowlj_err_memlj_vm_unwind_clj_err_runlj_vm_calllj_str_pushvflj_debug_addloclj_err_msglj_err_lexlj_debug_shortnamelj_str_pushflj_err_optypelj_obj_itypenamelj_debug_slotnamelj_err_complj_err_optype_calllj_err_callermsglj_debug_funcnamelj_err_callervlj_err_callerlj_err_argvlj_err_arglj_err_argtypelj_obj_typenamelj_err_argtlua_atpaniclua_errorluaL_argerrorluaL_typerrorluaL_wherelj_debug_frameluaL_errorW ba f k{    #C [& + 00j ! " #$! %$-'7l [v { 0 i   + @  [  0+m bw |  b  )*+( .  *+ &8 /D ^ /k  1  26 1d@  1 1 11 0 + ( 0 66 Q /] { / 5  *) 57 < 5  * $<U 1\p/ <;(;C 2+*5  "  (u08@/HFPJXT`/h`px DhI,Hlo Z  5   - 8@ X t $D lj_char.o/ 1378727463 1000 1000 100664 1312 ` ELF>@@ GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rodata.comment.note.GNU-stack@!@'@,@ 40A=^^M0   lj_char.clj_char_bitslj_bc.o/ 1378727475 1000 1000 100664 1710 ` ELF> @@ 1199!!%%$$$$)T\dltT\dltQYaiqy!B    2K2KKK2K2K2H 9xAv9b|"X5k 1t=n & J h G  T  0 B R bGQC,CG+^r/CoW  Z!!!?"_ ] y""%"$6%%%%(&I&k&&&&&'?'g''>((&'''k)5) ())-/.U///H00-.z.*6*e**+,u,,[-GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rodata.comment.note.GNU-stack@!@'@,@v 40=M   6@6lj_bc.clj_bc_modelj_bc_ofslj_obj.o/ 1378727463 1000 1000 100664 3080 ` ELF>8@@ UHWF9u&9|w`=w`vJ=vJf.zt ]lj_obj.h(((o)->it) < 0xfffeffffu)nilbooleanuserdatastringupvalthreadprotofunctiontracecdatatablenumberno valuenumberVnumGCC: (Debian 4.7.3-4) 4.7.3zRx AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @ &,12}E @ p M0kVk8f  uh  `_    #0>pO`lj_obj.c__PRETTY_FUNCTION__.3444lj_obj_equal__assert_faillj_obj_itypenamelj_obj_typenameL V [  ` p z    #''/ 8(?0E8L@RH[PaXg`/hmt#'/m8gR/ELa lj_str.o/ 1378727463 1000 1000 100664 7872 ` ELF>@@ UHH]LeLmH HAԋF V9vD,DH6HDk CH D$CH]LeLmUHAVAUATSIIẢFV 9v9v9wI6IA^ AFIDAFEtAt@4HA9w[A\A]A^]UHG DV A9AEFEt\DGNA9uADDLA9t1AȉD)ʃ| AA9tA9 A9wD)]UHAVAUATSDoA})DvB IDHHA}tVIEHt@zt$ HʀytP #BI02HuȃuAUHIuA)U I}AUA]Me[A\A]A^]UHAWAVAUATSH(H}Hv 8IAHEDpv-6ALAD11Љ)AL<3t#6AD1ЉA 1ȉ) I1Ɖ )1)1)ȉẺA#NIAKD<%H=vH:{H"{t!{t~HD9k uxH{Eu2ы4A34 tD)|> u1A9wS!AN(@ SHUm{tH]D9k u=HsLLu*S!AN(H@SHuAMH}HAF(CCDk ẺCCH{LLBD;EA#FIIAV ANBAF H9vt H}HH([A\A]A^A_]UHHo V H)W HP]ËFwUHHG tnGaGnÅxiGnGf-GiGnGf]UH1)H AHA)0хuHyH@-H]UHSH(HH}HHuHH([]UHSHHH}HUH H)HHH[]UH]UHH]LeHIӋV 9s F؉H6I$A\$ I$H]LeUHAWAVAUATSHHIII׋GHEIIXHHHHQLLHE@`HEH HE%LHHWHL)LLLYCgch.gct == ~(~4u)(o)->gch.gct == ~(~4u)len > 0%.14g(null)NULLlj_obj.h(((L->top - 1)->it) == (~4u))0123456789abcdef!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))lj_str_resizelj_str_newstr_fastcmpsetgcVlj_str_pushvfGCC: (Debian 4.7.3-4) 4.7.3zRx $_AC PJ $DtAC Gh l{AC v $AC G (AC M #AC ^ (rOC W G A ,KAC F L+AC Ea l2AC Eh  AC F  HAC Lw (AC M AC  .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @  & , 12 @2 'O :W0 ` u ppP  `  __t2 K d%},  {N8# r|K'+62E$ W/Hfwt{3 lj_str.caddcharaddstr__PRETTY_FUNCTION__.4312__PRETTY_FUNCTION__.4333__PRETTY_FUNCTION__.4299__PRETTY_FUNCTION__.3812__PRETTY_FUNCTION__.4425lj_mem_realloclj_str_cmplj_str_resizememset__assert_faillj_str_newlj_err_msgmemcmpmemcpylj_str_freelj_str_bufnumsprintflj_str_bufintlj_str_fromnumlj_str_fromintlj_str_fromnumberlj_str_needbuflj_str_pushvfstrchrlj_state_growstack1lj_str_pushf4    \> H M  Ri s x 7}    d! ?+)\"$o ER L x~  % Q  % ,  Z  # H_pN8 0|Pp$/w3 lj_tab.o/ 1378727464 1000 1000 100664 12344 ` ELF>@@ UHFuWG#AH@Ht=w%3)1ЋO)#GH@HHPwW)#GH@H'I>1)1ЋO)#GH@H]UHwB,Ёw2*f.z#u!~ BH]UHH]LeLmLuH IAA֍FwA4 H@ @D`H@ CCDcCAEHhC| H@ @@@@@@AEHhCEt7Av LB LCDcEtQAv LDAƍ @LDHRHЉPCADsHH]LeLmLuUHHptDH9wpt.xH IH AA A9s]UH2DND9uvAMI(@tHH9u`MUvGAFUAVBD9uEAv LD [LHRHЉPAFA^uMHRHBB B9sAEHhAFAFU9UE~AVLuDuM$A|$t\HuLI$HH Jv;H9uPAE@(tA9wLuA~MULLAF}D}LuDuH@M$A|$t_IT$HuLI$HH Jv;H9uPAE@(tA9sAEUHRH)P HxLP$AFUAVUuEXH([A\A]A^A_]UHFtȃ]]UHAVAUATSIIHӋRw,ȉ;Ns *f.ztg9t^HLtII~HtAD$I)IAiƫAD$&EvMú{u LAL$9HAt$|2tt H|2te*AD$HHCH P4SJ9uRAE@(9r)AL$9At$HRHփzHRHփzHBHH Hv; q9uIAE@(tHHCH PvcSJ9uRAE@(tG9D! [A\A]A^]UHAWAVAUATSI_v;wC|u.J|ED)ƒwDpAAEfA}uQC$E=v;AAD9v IcAEH DLHtxuEt$rAD9v IcAEH DLHtBxu:G<4AD9v IcAEH DLHtxEDEEEDD)wD[A\A]A^A_]lj_tab.clj_obj.hlj_gc.h(((&n->val)->it) == (~0u))t->hmask != 0kt->asize == t->asize && kt->hmask == t->hmask!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))freenode >= nodebase && freenode <= nodebase+t->hmask+1freenode != &(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))clearhpartlj_tab_dupcopyTVlj_tab_getlj_tab_newkeylj_gc_barrierbacksetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <VAC Q $\QAC T8 _AC Z jAC e $aAC IS  AC C UAC P 0-AC h $PAC I $xAC T (AC Pz yhC L ]AC X ( AC Ms 8 AC [ $XUAC GI (6AC I( .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @% & , 12 C@2PO`YW0`up.  # VQ" ;T m( @R   >_ja%3:hF UUa-cn{[ y< ]4 >U6lj_tab.chashkeycountintnewtab__PRETTY_FUNCTION__.3904__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.4044__PRETTY_FUNCTION__.4062resizetab__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3865lj_mem_newgcolj_err_msglj_mem_realloclj_tab_newlj_tab_new1lj_tab_dup__assert_failmemcpylj_tab_freelj_tab_getinthlj_tab_getstrlj_tab_getlj_obj_equallj_tab_setlj_tab_setstrlj_tab_setinthlj_tab_newkeylj_tab_reasizelj_tab_nextlj_tab_len] M  W \ a    0 "4 > C `H$%"& (   # () . 3 1 @; @ HE W @a f k  (    R"  ' , 5 & &  e o  t 0y    " , 1 56%    0)k#    0"] g  l 0q    0? I  N 0S3e @`>h 4aT|[4 <  <\>lj_func.o/ 1378727464 1000 1000 100664 5384 ` ELF> @@ UHATSHIF$4@@@HS@PD`S%  )ʈS%[A\]UHW BH9u H΋v H9tJP @P ]UHHV )W HP]UHH]LeHHI~uH|k H{LSH]LeUHAVAUATSIIDohCu{u HSH9uWAD$(SAE(t HLHHLA\$(Ht+{tUCL9c[A\A]A^]UHH]LeLmH HAIՍ4 @@D`SHPDhH]LeLmUHAWAVAUATSHIIIAD$$EtPL|L@@@ HPPAT$D1PAD]HL9uEAELH[A\A]A^A_]UHAWAVAUATSHHIHuHUGP$9P rHEPHuL$HEHUR$UIWHUHDHEAL}HUȋBF4(fEAHUHHEDxII(P(HzBH9zu"HJH9tH9u\H0zu HJH9u+H9u*HJ!Aw(@JIԋHt+zt*BH9tH}AW(P@@XA$A$IPAP ҉BAP RH9u PR H9t@EDPAHUD3rDp EHUBDHUBDjIL;m;EHUBHHH[A\A]A^A_]UHH~u V V )P HxP]lj_func.c(&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->next).gcptr32)->uv))->prev).gcptr32)->uv) == uv && (&((GCobj *)(uintptr_t)(((&((GCobj *)(uintptr_t)((uv)->prev).gcptr32)->uv))->next).gcptr32)->uv) == uv!((o)->gch.marked & 0x04) && !uv->closed && (((TValue *)(void *)(uintptr_t)((uv)->v).ptr32)) != &uv->tv(((GCobj *)(uintptr_t)(L->openupval).gcptr32))->gch.gct == ~(~5u)!p->closed && (((TValue *)(void *)(uintptr_t)((p)->v).ptr32)) != &p->tv(((GCobj *)(uintptr_t)(*pp).gcptr32))->gch.gct == ~(~5u)lj_func_closeuvunlinkuvfunc_finduvGCC: (Debian 4.7.3-4) 4.7.3zRx  MAC CE @CAC ~ `AC X  FAC Lu $AC G  TAC P (AC M (YAC MG  H8AC s .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @.H &p,p12p @2 O%W0`uhp0 @    " MMC 7P   iwFTY8lj_func.cfunc_newLunlinkuv__PRETTY_FUNCTION__.4268__PRETTY_FUNCTION__.4291__PRETTY_FUNCTION__.4277lj_mem_newgco__assert_faillj_func_freeprotolj_func_freeuvlj_func_closeuvlj_gc_closeuvlj_func_newClj_func_newL_emptylj_func_newL_gclj_gc_step_fixtoplj_mem_realloclj_func_freej t y ~  * / 4Yn   @I       {    DMd Llj_udata.o/ 1378727464 1000 1000 100664 1600 ` ELF>@@ UHH]LeLmH IIՍNAL$Q(P@ @X @DhH]LeLmUHHV H)W HP]GCC: (Debian 4.7.3-4) 4.7.3zRx $sAC P^ DAC Z .symtab.strtab.shstrtab.rela.text.data.bss.comment.note.GNU-stack.rela.eh_frame @ &,10:O`J0 XY  6 s(slj_udata.clj_udata_newlj_mem_realloclj_udata_free* Hslj_meta.o/ 1378727464 1000 1000 100664 18264 ` ELF>p%@@ UHHGLOEQAzu AB@IHH0HHPH rv>pDND9uvWR(@tHHPH Jv;Hq9uIWR(tIHPH Jv;Hq9uIWR(tH]ËG=v*u UHSHH?HE HHH[]UHAVAUATSIDwAH^F<_ttH<_tuHH)LDAAHހ;u[A\A]A^]UHH]LeHHAHAv/HtxuDCH]LeUHSHHFux5ux)w#=vtЍHɋHtKҋHu&CxltFHhH[]UHHWHGDBHHJH qv>rDND9uvOI(@tD@xHHHH)HP HOHO]UHAWAVAUATSHIHHUAd{uRD#HULLIƃxA|$HGAGHu(iHLxuHLxu#LEHH¾LIGAHALlLLH[A\A]A^A_]UHH]LeLmLuL}HPIIIEdA|$A$H]LHLIŃxtzCCHAV!J(@tTJ)tuUCBJ9uRHMA@(tH-HCHCAFE=IvH}AFAFxuPHuF@(} !8H}AŃ9]}|HcHMI)AD$ =wULH}A$AD$xuPHMA@(HEpHXDHIǃ]xvHcEHLH)ƒzu'2Dn D]A5HcHLH)yt)1Dn DDLHEyADLH}HcUHLH)։FxuPHMA@(t)EEu)uHcHI)ƃ}HUBH$9H rO}u9HBPzt3RRHHuHFH}]VHEpHXDHIErADh E+A$@ D)9H([A\A]A^A_]UHATSHIxuLHDCAxltDIhLH¾H*[A\]UHH]LeLmLuL}H0IHA΋~HGIAD$IHhA}CH9]Ht/Gu)AD$HHt LuIcSIT$Bxu @@HID$EtH HHIHPH Jv=Hq9uIAT$R(tK҉XPrs9u{At$v(@tlAMAT$R(tH7Ic2IT$BxDhPAU9tDhPH]LeLmLuL}UHH]LeLmLuL}H@HAAALE%HOL$uLu LC =v"uHs{u LC=v"uHs{u LH]Lelj_obj.hlj_meta.cmm <= MM_FASTlj_gc.h(((c)->it) < 0xfffeffffu)(((b)->it) < 0xfffeffffu)(((top-i)->it) == (~4u))op == BC_ISEQP!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))__index__newindex__gc__mode__eq__len__lt__le__concat__call__add__sub__mul__div__mod__pow__unm__metatable__tostring__new__pairs__ipairs(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail (\"(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)\", \"lj_meta.c\", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->sizekgc", "lj_meta.c", 363, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)(((((((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)) ? (void) (0) : __assert_fail ("(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)", "lj_meta.c", 363, __PRETTY_FUNCTION__)), ((GCproto *)(((char *)(void *)(uintptr_t)(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->l.pc).ptr32)-sizeof(GCproto))))))->k).ptr32)[(~(ptrdiff_t)((BCReg)((ins)>>16)))]).gcptr32))))->gch.gct == ~(~4u)lj_meta_cachelj_meta_lookupcopyTVlj_meta_tsetlj_gc_barrierbacklj_meta_arithsetgcVlj_meta_catlj_meta_lenlj_meta_equal_cdGCC: (Debian 4.7.3-4) 4.7.3zRx  AC  0<BPC EW I HA $pjAC G^  dAC LS  AC E AC  (AC M (,AC X (XCAC X& (AC M  mAC Ce (AC X (AC X (,AC Mn $XAC I  AC L .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @1 &,12@2 O!W01"`N"uP"pE $0) .  + B3Le@~$ R`g s   $2AbjNYdgu0XLC!W-?KZaln mx P=lj_meta.cmmcall__PRETTY_FUNCTION__.3429str2num__PRETTY_FUNCTION__.4245__PRETTY_FUNCTION__.4252__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.4292__PRETTY_FUNCTION__.4314__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4328__PRETTY_FUNCTION__.4347__PRETTY_FUNCTION__.4370lj_vm_asm_begin__assert_faillj_strscan_numlj_meta_initlj_str_newlj_meta_cachelj_tab_getstrlj_meta_lookuplj_meta_tailcalllj_meta_tgetlj_tab_getlj_err_optypelj_cont_ralj_err_msglj_meta_tsetlj_tab_newkeylj_cont_noplj_meta_arithlj_bc_modelj_vm_foldarithlj_meta_catlj_str_fromnumberlj_cont_catlj_str_needbufmemcpylj_gc_steplj_meta_lenlj_meta_equallj_obj_equallj_cont_condflj_cont_condtlj_meta_equal_cdlj_meta_complj_str_cmplj_err_complj_meta_calllj_err_optype_calllj_meta_for& f p u z       >{ 0            %!" #6$! @ !  @ ! ;z @ !  @ !  $    $*$9&Qg"} '   $E ) R   ) R   C*&"4 #, `   - X "        9 C H M R -X  , `    $2 ,g `q v {  . g  ]  /' b `l q v  g    0 .  " s    #*fv3 4  5     S `] b g `   4 5s }       0     `   2 <  A F^ h  m vr 4  5+j8 4 53=9l;    $ ) .ev$$$ @ tb0X0L\Wn  0\P=lj_debug.o/ 1378727464 1000 1000 100664 16336 ` ELF>"@@ UHF<t<t9~ Hu"HG0HH@H9BuJLG0HGIHH9s8HσuIH H)uM@ IHcH)H9rI@ HHHLEAHFAEv_AH)H*#VHH)H;Bw]UHH Hv(ȃ2AA!AD H@xH]UHAWAVAUATSHG>ujHGxtDhHHUHBHHEHEEEFBt%uHuN$H HMȅHHUF H9w HtH9vHED(A}UIT$8HUIL$HMc.ffid == 0)(*vararg)(*temporary)pc <= pt->sizebcidx < pt->sizeuvlocalglobalmethodfieldupvaluemetamethodpc < pt->sizebc%s:%d: %s%s%s:%d%p:%d"%s":%dlj_obj.hLuamain(((func)->it) == (~8u))offset != 0fn->c.gct == ~(~8u)=[C]C%s stack traceback: ...Snlf(((L1->top-1)->it) == (~8u)) [builtin#%d]: %s:%d: in function '%s' in main chunk at %p in function <%s:%d>fn->c.gct == ~(~8u) || fn->c.gct == ~(~6u)bc_isret(((BCOp)((ins[-1])&0xff)))(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)((ins)>>16))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc", "lj_debug.c", 270, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((pt)->k).ptr32)[(~(ptrdiff_t)((BCReg)((ins)>>16)))]).gcptr32))))->gch.gct == ~(~4u)(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff))) >= (uintptr_t)-(intptr_t)(pt)->sizekgc", "lj_debug.c", 273, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((pt)->k).ptr32)[(~(ptrdiff_t)((BCReg)(((ins)>>16)&0xff)))]).gcptr32))))->gch.gct == ~(~4u)!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))frame <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)) && (!nextframe || nextframe <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(for index)(for limit)(for step)(for generator)(for state)(for control)lj_debug_uvnamelj_debug_slotnamelj_debug_funcnamedebug_framepcdebug_framelinecopyTVdebug_localnamelj_debug_getinfosetgcVluaL_tracebackGCC: (Debian 4.7.3-4) 4.7.3zRx DAC ? <CAC ~ (\AC M (AC Xd AC  bAC ]  oAC Ee LLC Y (8ajC S ^ A (d AC M $7AC I)  AC C $AC Tx $AC T  ,AC E  PAC E} (tAC M AC K $cAC PN (XAC PC .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @. &,12@2WOW0`up= ("h& H+ D3DCFTcd}oP` #<  UcrubFLa 7J 6   -A N _jy cpXlj_debug.cdebug_framepc__PRETTY_FUNCTION__.4592debug_read_uleb128debug_varnamedebug_localname__PRETTY_FUNCTION__.4654debug_frameline__PRETTY_FUNCTION__.4613__PRETTY_FUNCTION__.4660__PRETTY_FUNCTION__.4686__PRETTY_FUNCTION__.4703__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.4767__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4811__assert_faillj_debug_framelj_debug_linelj_debug_uvnamelj_debug_uvnamevlj_debug_slotnamelj_bc_modelj_debug_funcnamelj_debug_shortnamestrncpystrcpylj_debug_addloclj_str_pushflj_debug_pushloclua_getlocallj_state_growstack1lua_setlocallj_debug_getinfolj_tab_newlj_tab_setinthlua_getinfolua_getstackluaL_tracebacklua_pushfstringlua_pushlstringlua_concat   %  0' .     1 L V [  ` )     # ( 6-4V P` e Hj G G6 YN  `  X  `   , _M `W \ Pas `}   m f s         & {j # $ #! $~ "  &  & B O &a n &  &  &( 2 7 h< X )  h I S X ]       1 ; @ E"    ! G   0"L)t,    "-h r w 0|)+/ 1  2/  2(/? #G.W a f (k E1 U1 [1 _1 q2. ;1L Y1{3/3 @D`cuF<hJ 6  0 T x  plj_state.o/ 1378727464 1000 1000 100664 8520 ` ELF>@@ UHSHHHhC$C8-HhH8K HHHKHK@{u@"sKI(@uH9r)@HH9uH[]UHAWAVAUATSHIAw$_8EnAG L)HS9t<B AD$$HL)EJ AL$ D9sDA9uEl$8IT$IT$AD$(Ht2xt"xtIPHuAD$I9uH[A\A]A^A_]UHAUATSHI_w$HDk0M9t{ tHHSHH3)S H{SSdHsX)S H{SAU8HAu$)S H{S{ htHCH=u H{HsH{hH[A\A]]UHSHHHH[]UHATSHDgHHC,HSǂx uPC@(tHHHHH AD$ AD$$L[A\]Á8v"G$HWH)HUH]ËG8=w(9v!ZvWH9tUH]UHSHHG8=v Ɓv(9s =FHB{8v hHH[]UH]UHH]LeLmLuH IIhLAHHzAH9oIH߾ht H{@g@t fH@t HɸH@t H@t fH@tCCaCHC@CCh!ƃƃLsPLkXHCHǃǃǃHHǃǃCi[pHCpCtC`hǃǃHCHtHlA CALH]LeLmLuUHAVAUATSDgA$I݋s$HLA$ ADŽ$TLA A$CHC0C$HHCHCLuAtLA|$DuH[A\A]A^]UHATSI@H@@@@8@$H@0@(AD$CAD$,C,LH~CuH[A\]UHATSHI􋇔H9uv$LA|$(tAT$8HAt$$)S H{Sk @H{@LS[A\]lj_obj.hlj_state.c(up)->gch.gct == ~(~5u)g->strnum == 0!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(MSize)((((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32))-oldst)==L->stacksize-5-1((GCobj *)(uintptr_t)(g->gc.root).gcptr32) == ((GCobj *)(L))g->gc.total == sizeof(GG_State)((((GCobj *)(L1)))->gch.marked & (0x01 | 0x02))L != (&((GCobj *)(uintptr_t)(g->mainthref).gcptr32)->th)((GCobj *)(uintptr_t)(L->openupval).gcptr32) == ((void *)0)resizestacksetgcVclose_statelj_state_newlj_state_freeGCC: (Debian 4.7.3-4) 4.7.3zRx  AC E (@AC M $lAC I  %AC E[  AC C -]C K 4eC J  gAC E] <AC K $\AC T $AC G  AC Cz  AC C .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @@h &,12;@2OL :W0 ` u p 8     0< Ua z% ,  "->Shs-4g"4ERg\p'lj_state.cstack_init__PRETTY_FUNCTION__.3380resizestack__PRETTY_FUNCTION__.5146close_state__PRETTY_FUNCTION__.5187cpfinalizecpluaopen__PRETTY_FUNCTION__.5211__PRETTY_FUNCTION__.5216lj_mem_realloc__assert_faillj_func_closeuvlj_gc_freealllj_trace_freestatelj_ctype_freestatelj_alloc_flj_alloc_destroylj_gc_finalize_cdatalj_gc_finalize_udatalj_tab_newlj_str_resizelj_meta_initlj_lex_initlj_err_strlj_trace_initstatelj_state_relimitstacklj_state_shrinkstacklj_state_growstacklj_err_throwlj_err_msglj_state_growstack1lj_state_newstatelj_dispatch_initlj_vm_cpcalllua_closelj_gc_separateudatalj_dispatch_updatelj_state_newlj_mem_newgcolj_state_freey      (c m  r w        , w     #V  ` e jw !"#$8(x)', .-/0 - /72     ,    ,   P Dp@`g'lj_dispatch.o/ 1378727475 1000 1000 100664 9952 ` ELF>@@ UHH]LeLmHI_LMuT`UHGHW$H)HEԋG H+GH= H`LAueH]LeLmUHtf%HuN%]UHAWAVAUATSHIF%^HHIAH(HAUHH9sAUD$A|$u=DLL[A|$tDLLSHuH[A\A]A^A_]UHHH HHH=uհHHHH=uHPHHHhH`HHxHHHHLJ,[LJ0[P]pHH>u]UH勗Tf0 HH=u]HD ATЃA  уA Ⱦ@ ރA <ЃA E8UHAUATSDD<uH5H HHLDI2HHHLDIHHHDD1AAH LHL渨t  H H@tfHH@tHHHt tD$fD$HtAHǂ Hǂ Hǂ Hǂ DHEȸH HH=uAHH H8At.Hǂ Hǂ Hǂ Hǂ 8HH HH HH HH AtNAu)HHXHH=u%HDŽXHH=0uAuLXLpAtAuH[A\A]]UHH]LeLmLuH Aԋ_DꃣT@t AD$t@u    Hu8HGPuRHHH?HcH)HP-~HcHGHT)HcHGH yDqI@zD2AtDLHADLHHt_~HcHGHT HcHGHJu]HH#Hǃ\8ǃ[' yzH]LeLmLuUH]UHtHu H ˆT]UHGH]UHG]UHG]UHH]LeLmLuL}H`HIIƋEHC@xtDxIWHUHC0HPUDcDhHAE<0u AЃ?t?w hookmask & 0x10)(o)->gch.gct == ~(~7u)((fn)->c.ffid == 0)L->top - L->base == delta(uintptr_t)(intptr_t)(i) >= (uintptr_t)-(intptr_t)(pt)->sizekgcsetptmode_alllj_dispatch_inscallhooklj_dispatch_callGCC: (Debian 4.7.3-4) 4.7.3zRx $AC S D'AC b (dAC M AC  )AC d ,IkC EBBA $@AC T' (AC A HSAC N hAC K AC N AC J (XAC X; ,RAC M@ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @\ h& , 12 j@2@TPO#\0!e>z@ u%P `P 8V 1';Ib{    u)%I8FSap@'-SX *8 RIlj_dispatch.ccallhook__PRETTY_FUNCTION__.5447setptmodesetptmode_all__PRETTY_FUNCTION__.5397__PRETTY_FUNCTION__.5466__PRETTY_FUNCTION__.5496lj_state_growstack__assert_faillj_trace_reenableprotolj_trace_flushprotolj_dispatch_initlj_vm_asm_beginlj_bc_ofslj_dispatch_init_hotcountlj_dispatch_updatelj_vm_rethooklj_vm_recordlj_vm_inshooklj_vm_callhookluaJIT_setmodelj_err_callerlj_trace_flushalllj_trace_flushluaJIT_version_2_0_2lua_sethooklua_gethooklua_gethookmasklua_gethookcountlj_dispatch_ins__errno_locationlj_trace_inslj_debug_linelj_dispatch_calllj_trace_hotp  2 < A Fq {  %   %, 3: AG NU ]d   |         % w ~   3 A!~k"u)   <  *  P w + +" )   -  P D *[ e j Po   7 (U08@HPX`hpxy Hhu,'L-l lj_vmevent.o/ 1378727464 1000 1000 100664 3872 ` ELF>@@ UHH]LeLmLuH HADg StHxD8;ws HcGL4IMA~C H+CH=-HA~tAHSHJHKBxuPC@(tS$HCH)DA $H]LeLmLuUHH]LeLmLuH I_DAA!ƃ0G$HƹtTIl$H H5ID$xu8HH5 A DtDH]LeLmLu_VMEVENTSlj_vmevent.c(((tv)->it) == (~8u))lj_obj.h?VM handler failed: ((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->registrytv))->it) == (~11u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))lj_vmevent_preparesetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx $eAC TL $DAC T .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @N p &,12L@2OpW0`uhp0 P X   '  @eS^lzelj_vmevent.c__PRETTY_FUNCTION__.4737__PRETTY_FUNCTION__.3812lj_vmevent_preparelj_str_new__assert_faillj_tab_getstrlj_tab_getinthlj_state_growstacklj_vmevent_calllj_vm_pcallstderrfwritefputsfputc( -> H  M R`    -" `' 8 6  Helj_vmmath.o/ 1378727464 1000 1000 100664 2416 ` ELF>0@@ UH]UH]UH]ÅuUHD1)AAD1D)Ѕt 1)ʅH1ƉڅHUH]lj_vmmath.cb != 0lj_vm_modiGCC: (Debian 4.7.3-4) 4.7.3zRx  AC F < AC F \ AC F |]EC Y  AC H .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.comment.note.GNU-stack.rela.eh_frame @8 &,12@ H0Qfax p     & 16 AF QV!]ao~ {lj_vmmath.c__PRETTY_FUNCTION__.4856lj_vm_sinhsinhlj_vm_coshcoshlj_vm_tanhtanhlj_vm_modi__assert_faillj_vm_errno__errno_location * 4 9  > @ `!~lj_strscan.o/ 1378727465 1000 1000 100664 6880 ` ELF>@@UHSHHȁ}KHtFHύ 34w6)ѾHHHtH46LD1I!HMHEHHH!Hy`H*Džt  fWtH[]UHAWAVAUATSHӉUQAՁ vEA DD1t*<.t GHAHLLDMRDA.t AEk ODk HD_A.t LgA LgD_AEEII|$wIEAEMAt0<.t A AHACA AAIAHǁ vE<.t<0 0Ht AJ =Hʁ u.AIAwEƅLAEDAHHkdDLHL9rHuAHtBwurwkRuAH9vEE‰4t5II  EE‰HEHEH>HxH*Et  fWutHLH)ADEtAt ~#EHHHDHI]WEt$AzAFAADi{DkdE)FD9t!EuEBAA9EDρ멅t^AAAzAFEtE9uDGAFDEBA ADD)%9EAEBljB?kduE9u E`AAAE9uE?E9uAABE&DAADAA?kdu \ADAD$%HkdAFL%Ʌ~D9u D9u Hkdy%HAS tH %D9uD H[A\A]A^A_]UHAWAVAUATSH(IAOtHu<-t A<+uDH@ iW HnW fEHHHDHWO iueO nu^O iuWO tuPO HyHE?Hnu0W au$W nuHH HHHtHuqI$fAEAt ?0*<0wm <0u.G H([A\A]A^A_]UHHv]lj_strscan.c(int64_t)x >= 0lo > 0 && (ex10 & 1) == 0fmt == STRSCAN_ERROR || fmt == STRSCAN_NUMstrscan_doublestrscan_declj_strscan_numGCC: (Debian 4.7.3-4) 4.7.3zRx  AC E (@fAC PQ (lAC M  :AC u .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.rodata.cst16.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @=&,127@2+O*We r0({EH` X 86fB [   ty  ~:lj_strscan.cstrscan_double__PRETTY_FUNCTION__.4534strscan_dec__PRETTY_FUNCTION__.4614__PRETTY_FUNCTION__.4689.LC2.LC3__assert_failldexplj_strscan_scanlj_char_bitslj_strscan_numg q v  {p z  0 N Z m H T q     % * / Dplj_api.o/ 1378727466 1000 1000 100664 53592 ` ELF>pd@@ UHHG@xu@G,]UH~AHcHGHDH;GGxlt%Hh|DtHGHcHH+WHH9~'HcH=uUOHW,ǁz uJWR(uGHHGPzuzu1uQOHRǁz uJWR(t^)B9)HHD &Gxlt8Hh]UH~:HcHGHDH;GrgGxltAHh?tHGHcHH+WHH9~CHcH]UHH]LeLmH HIIlH¾HLhHKAxuPC@(tLH/Ht fHHCHI L`HC0@HCHPHSHH]LeLmUHG]ø@QHWHH+OHHcHH@.~#O H)щHH9UH]UHH]LeHHIuLwHH]LeUHAUATSHIIH9HcHGH+GHH9~iWFH9tjV H+VHH9 LIUHcID$H4It$HaHHH HII)H yvAB<DGD9uAL$I(@tyIUH[A\A]]UHHGH+GH]UHATSHO HGHcH)HH9~|LcIJ H{H9v9H9rH)H)HHC@HHCHSLH9rFHS@HGHcHH+WHH9~HcHDHG[A\]UHSHHSzltHhH9ugHHPH Jv;Hq9uISR(tHHSH9rHHSH[]UHSHH5SzltHhH9uHSH9sWHJH H qv;2~9uvKI(@tHH9rHSHHH Jv:H9uPC@(tH[]UHATSHHGHWHH)HAu*xt@G,Guor~t 'xt@FHGPPBF~SzltHhH9uHSHRHH Jv:H9uPC@(tA}-HCPvPBtHCpFt{Hk[A\]UHSHHHSHHH Hv:J9uRC@(tHCHHCS H9rHH[]UHSHHPv{teKyltHhH9tAH!ZHHu*t%H[]UHH]LeLmH HAAD9tDDHH]LeLmUHH]LeHHGxltASHhH9u'DHH]LeUHHcH]UHH¸zu x]UHHHvu8Hu҉UH]P ]UH;@t]UHH]LeLmH HAIDHSzltHhI9tHƸH9tLH]LeLmUHH]LeLmH HA}IDHoHAL$wl@=wbvJA$=vJf.z;Jv=CxltHhI9H9uHI9$A4$9ttwvw҉HHvCHPHSHHHCHPHSx H]LeLmUHH]LeLmH HAIDHSzlt(HhI9H9AT$wcHwXvJA$vJf.UHLHHvODAD9uIAA@(tyIy_HHwAHH-HFAF ~HFHH+WVHGHG>IA0AA]UHSHHH0u(w"HcHHGH)Hƹ|HCHC/HHSBxuPC@(tHSHHSK H9r HH[]UHH]LeHI_$C$uQC STS S$g[C SC %I C )9¸FC$ LuC$9C sCTST CHSHH]LeUHGHtHPHH@]UHGHPHp]lj_api.clj_obj.h(1) <= (L->top - L->base)(((L->top-1)->it) == (~11u))(((o)->it) < 0xfffeffffu)(((&tmp)->it) < 0xfffeffffu)(n) <= (L->top - L->base)lj_gc.h(((t)->it) == (~11u))(uint32_t)n < fn->l.nupvalues(2) <= (L->top - L->base)(((o)->it) == (~11u))(((o)->it) == (~12u))(((f)->it) == (~8u))(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))idx != 0 && -idx <= L->top - L->base!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))fn->c.gct == ~(~8u) && !((fn)->c.ffid == 0)(n) <= (from->top - from->base)(((global_State *)(void *)(uintptr_t)(from->glref).ptr32)) == (((global_State *)(void *)(uintptr_t)(to->glref).ptr32))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))idx <= (((TValue *)(void *)(uintptr_t)(L->maxstack).ptr32)) - L->base-(idx+1) <= (L->top - L->base)(p) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 141, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(p) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 149, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 170, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))tt != 0 || (((o)->it) == (~0u))((((o2)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))((((GCobj *)(fn)))->gch.marked & (0x01 | 0x02))((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->registrytv))->it) == (~11u))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 733, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 748, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 814, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(((index2adr(L, idx))->it) == (~8u))(((index2adr(L, idx1))->it) == (~8u))(((index2adr(L, idx2))->it) == (~8u))((fn1)->c.ffid == 0) && (uint32_t)n1 < fn1->l.nupvalues((fn2)->c.ffid == 0) && (uint32_t)n2 < fn2->l.nupvalues(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 892, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(t) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 912, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(((index2adr(L, idx))->it) == (~11u))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 957, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 995, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))L->status == 0 || L->status == 5(nargs+1) <= (L->top - L->base)(o) != ((((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val)->it) == (~0u))", "lj_api.c", 1049, __PRETTY_FUNCTION__)), (&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->nilnode.val))lua_xmovecopyTVlua_settoplua_removestkindex2adrlua_insertlua_replaceindex2adrsetgcVlua_typeluaL_checkanylua_rawequalnumberVnumlua_equallua_lessthanlua_tonumberluaL_checknumberluaL_optnumberlua_tointegerluaL_checkintegerluaL_optintegerlua_pushcclosureluaL_newmetatablelj_gc_barrierbacklua_concatlua_gettablelua_getfieldlua_rawgetlua_rawgetiluaL_getmetafieldlua_getfenvlua_nextlua_upvalueidlua_upvaluejoinluaL_checkudatalua_settablelua_setfieldlua_rawsetlua_rawsetilua_setmetatablelua_setfenvlua_setupvaluelua_calllua_pcalllua_cpcallGCC: (Debian 4.7.3-4) 4.7.3zRx AC V <AC  \AC ~ $|AC P  AC E (`HC L F A  9AC Lh $AC I  <AC M  \AC C  AC E   AC E  AC C  AC Ez  AC E  4CAC Pn  XcAC LR |AC O %AC ` ;AC v "AC ] &AC a $AC Pm $DAC P $l8AC P# AC   AC L $AC P oAC j  AC Lu $DAC P lAC P $AC P $AC P $#AC T  (AC M  0AC L T2AC m t:AC u AC V UAC P +`C F CxC F -bC F $4AC P  \AC C  IAC Pt  AC J $kAC I] 1fC F IAC D $0AC P $XAC I  AC Eu  AC C  AC C  rAC Cj  AC E $4tAC If  \AC E  AC C  AC E  AC C  kAC Ea   rAC Cj  4 AC G $X AC P ( 1AC X $ AC T  gAC E] $ AC I $ aAC TH $H gAC IY $p AC Tg  "AC E $ (AC I  tAC o ( @AC X#  0 bAC CZ $T AC P | AC    AC E  AC L  AC T  AC L .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @= C& >, >12 >1@2@?TTO\0WeWzW u` cph< zm   8Q^g wr~@ JQ \ t   -F _ x    '@@PYpr     ! : Sl 0@ M Z e  4M f     @ J`9 *5 @L[r i}  C cA U %z ; " & ,9 CQ\,8ivdKo@ #.?FRa]h 2x=:wU+CU-(I%&k7E1GvI]mx  K!r"  #t  %( 3 %? N &_ Y'q  C(k )r   *  * c+1 ,  U-g  .$ 0a/ : 1gF U `3f x  5" 7( *8t 8@  9b  @: :    <% 2 = <D Q =_ =lj_api.cgetcurrenvindex2adr__PRETTY_FUNCTION__.4872__PRETTY_FUNCTION__.3380stkindex2adr__PRETTY_FUNCTION__.4881cpcall__PRETTY_FUNCTION__.4905__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.4916__PRETTY_FUNCTION__.4924__PRETTY_FUNCTION__.4934__PRETTY_FUNCTION__.4942__PRETTY_FUNCTION__.4954__PRETTY_FUNCTION__.4966__PRETTY_FUNCTION__.5001__PRETTY_FUNCTION__.3444__PRETTY_FUNCTION__.5009__PRETTY_FUNCTION__.5018__PRETTY_FUNCTION__.5026__PRETTY_FUNCTION__.5033__PRETTY_FUNCTION__.5041__PRETTY_FUNCTION__.5049__PRETTY_FUNCTION__.5057__PRETTY_FUNCTION__.5066__PRETTY_FUNCTION__.5188__PRETTY_FUNCTION__.5211__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.5230__PRETTY_FUNCTION__.5240__PRETTY_FUNCTION__.5249__PRETTY_FUNCTION__.5255__PRETTY_FUNCTION__.5263__PRETTY_FUNCTION__.5277__PRETTY_FUNCTION__.5283__PRETTY_FUNCTION__.5290__PRETTY_FUNCTION__.5304__PRETTY_FUNCTION__.5313__PRETTY_FUNCTION__.5322__PRETTY_FUNCTION__.5330__PRETTY_FUNCTION__.5339__PRETTY_FUNCTION__.5345__PRETTY_FUNCTION__.5354__PRETTY_FUNCTION__.5364__PRETTY_FUNCTION__.5371__PRETTY_FUNCTION__.5380__PRETTY_FUNCTION__.5386__PRETTY_FUNCTION__.5397__PRETTY_FUNCTION__.5413__assert_faillj_func_newClj_err_msglua_statuslua_checkstacklj_state_growstackluaL_checkstacklj_err_callervlua_xmovelua_gettoplua_settoplua_removelua_insertlua_replacelj_gc_barrierflua_pushvaluelj_state_growstack1lua_typeluaL_checktypelj_err_argtluaL_checkanylj_err_arglua_typenamelj_obj_typenamelua_iscfunctionlua_isnumberlj_strscan_numlua_isstringlua_isuserdatalua_rawequallj_obj_equallua_equallj_meta_equallj_vm_calllua_lessthanlj_meta_complua_tonumberluaL_checknumberluaL_optnumberlua_tointegerluaL_checkintegerluaL_optintegerlua_tobooleanlua_tolstringlj_gc_steplj_str_fromnumberluaL_checklstringluaL_optlstringluaL_checkoptionstrcmplj_err_argvlua_objlenlj_tab_lenlua_tocfunctionlua_touserdatalua_tothreadlua_topointerlua_pushnillua_pushnumberlua_pushintegerlua_pushlstringlj_str_newlua_pushstringlua_pushvfstringlj_str_pushvflua_pushfstringlua_pushcclosurelua_pushbooleanlua_pushlightuserdatalua_createtablelj_tab_newluaL_newmetatablelj_tab_setstrlua_pushthreadlua_newthreadlj_state_newlua_newuserdatalj_udata_newlua_concatlj_meta_catlua_gettablelj_meta_tgetlua_getfieldlua_rawgetlj_tab_getlua_rawgetilj_tab_getinthlua_getmetatableluaL_getmetafieldlj_tab_getstrlua_getfenvlua_nextlj_tab_nextlua_getupvaluelj_debug_uvnamevlua_upvalueidlua_upvaluejoinluaL_checkudatalj_err_argtypelua_settablelj_meta_tsetlua_setfieldlua_rawsetlj_tab_setlua_rawsetilj_tab_setinthlua_setmetatablelj_trace_flushalllj_err_callerlua_setfenvlua_setupvaluelua_calllua_pcalllj_vm_pcalllua_cpcalllj_vm_cpcallluaL_callmetalua_yieldlj_cont_hooklj_vm_asm_beginlj_err_throwlua_resumelj_vm_resumelj_err_strlua_gclj_gc_fullgclua_getallocflua_setallocfC 8M R W< 8  `< 8    <7 8A F K< 8   < 8  < 8g " '<Q 8g[ ` `e<= 8   <>A@C 8@  % *<: 8@D I N<jA 8J   x<: 8QD I N<zA 8Q  < 8\  <' 8\1 6 ;<u 8J   x< 8t  < 8t  `<= 8JG  L xQ< 8J   x< 8  < 8   ,<8>C 8M R ,W<J 8  < 8  < 8J$  ) x. <d J 8J  x < L+ 85 : ? <n 8x }  < M O 8   <3 QO S V4 8> C H <f Z 8  I < 8   I <E 8O T Y < 8    < \ ]c 8m r w< 8   I< 8   I<_.] 8   I<V 8  c< 8#  ( I-<CVWOe 8o t cy< 8   I<V O 8" ' c,<}V 8  c<VO 8  # c(<VO 8@  c<8hQi 8   <h1i_ 8i  n s<O2hKiz 8   <OgO mNnpi 8   < LNL{Lhy 8   <LShvy 8   <Lh|h|h 8P $ )<?= 8J   x< 8   < 8P  X<6LoL>LhI 8S  X ]<yL 8p  <y= 8G  L Q< 8   < 8  < 8  P <O 8JY  ^ xc< 8   <L h" W 8a  f k < L h >  ! 8!  ! !!<=!Lm! 8w! |! !<!!]%" 8J/"  4" x9"<" 8"  " "<"L" 8" " "<" 8#  #  #<!#?#]# 8J#  # x#<# 8# # #<# 8# $  $<*$yT$ 8^$  c$ h$<w$$]$ 8J$  $ x$<%L8% 8B% G% L%<^%% 8J%  % x%<% 8% % %<&E& 8JO&  T& xY&<&L ' 8'  ' !'<B'Lg''y' 8' ' ,'<' ( 8J(  ( x (<^( 8h( m( r(<( 8( ( ( (<( 8(  ( (<) 8')  ,) 1)<h) 8r)  w) |)<)L) 8) ) )<) *LC** 8J*  * x*<*L* 8* + x +<&+ 80+ 5+ :+<+ 8 + +  +<+ 8 + +  +<, 8 , ",  ',<;, 8 E, J, (O,<z,J,y, 80, - -<-?-x- 8@- - -<- 8@- - -<- 8@- - `-<-!. 8J+.  0. x5.<. 8J.  . x.<.]. 8M. . .</ 8M/ / /<*/ 8M4/ 9/ >/<a/y/ 8/  / /</0 8J 0  0 x0<[0 8Je0  j0 xo0<0]0 8Z0 0 0<0 8Z1  1 1<!1[1 8Je1  j1 xo1<1 81 1 1<1 81 1 P 1<2 8e%2 *2 /2<P2 8eZ2 _2 d2<22 8J2  2 x2<2 8 3 3 3<%3 8/3 43 P 93<3 83 3 3<3 83 3 3<3 83 3 (3<4 84 4 ,4<T4 8^4 c4 h4<4 84 4 4<4 84 4 P 4<5 85 !5 &5<?5JI5[56 8 6 6 6<%6 8/6 46 96<G6 8Q6 V6 x[6<f6 8p6 u6 ,z6<6 86 6 6<6J,7 867 ;7 @7<Q77 8J7  7 x7<7 87 7 7<8J;8 8E8 J8 O8<o8 8y8 ~8 (8<8]8 88 8 8<9 89 #9 ((9<C9 8M9 R9 W9<f9 8p9 u9 Hz9<99 8:  : :<: r:[:: 8J:  : x:<:]z; 8J;  ; x;<; ; ;;>E<\<< 8<  < <<<L< 82=l=h< =1=== E=(O=0=8= @`r@J@`r  8 \ A U z    H p,dK$H@p4aX x=wU8`(%Ev4\  K!"8#` %%&Y'C( )8  *\ * c+ , U- .$ 0L 1t `3 5 7 *8 84 9X @: : < < = =lj_lex.o/ 1378727465 1000 1000 100664 21472 ` ELF>%@@ UHSHHHwPHHUSHHHt HEHtC,HS0HHS0 H[]UHATSI_HH)S H{SA$HIt$x)S H{SAT$DIt$8)S H{S[A\]Á~HcHUHHcuHH]UHATSHHHXL`Lht#)p)M)U)])e)m)u)}AԺtCw-S@B;CDvHg HK8C@HS8 HHDž(Dž,0HEH0H@H8KXHs`H{L(EUHH]LeLmH HWD?vAD$Hw8HDHC8DcDS@D,S@H]LeLmUHAUATSHHDo A]tA[tS@B;CDv DH? HK8D,C@C,PS,tHC00HHC0 H Ɖs =u^AS@B;CDv H HK8@4C@S,BC,tHC00HHC0 HƉs A=tADA9DEDH[A\A]]UHATSHDg A tA tNC,PS,tHS0HHS0H+C t u.D9t)C,PS,tHS0HHS0HC CXCX=~s$H߸[A\]UHATSIHH{HF,HF0HFxdždžHdždžF(!FXF\VDHv8 HC8CD C,PS,tHS0HHS0HC =uVS,HK09yHAHC0BC,tAHHK0HC { #uUC,PS,tHS0HHS0HC  t uH{ { u~tz LIT$HJIL$BxuPAD$@(tL [A\]UHAUATSHHIAՋw W@B;GDv HO8@4G@C,PS,tHS0HHS0HkC t uHs    ]!I҃ !H߸HmD9us S@B;CDv H HK8@4C@C,PS,tHS0HHS0HC M)S@B;CDv H HK8 C@HMC@MtPK@Q;SDv H> HC8@4S@C,PS,tHS0HHS0H C C,PS,tHS0HHS0HC ACD-S@)DHs8HHKA$AD$xuPA@(tH[A\A]]UHAWAVAUATSHHD Icu]IAeA0W@B;GDv 0 HO80G@C,PS,tHS0HHS0HC xeApDEQS@B;CDv DH HK8D$C@C,PS,tHS0HHS0HiC EDc IcĀxA.tA+tA-u A E9tS@B;CDvH HK8C@H{8LAăLk@vAtsAEuAE$M}I)LAE$IM}AuNL@ f@H@A~v|A@-AAEA L@ fD`IHPHLHH߸H[A\A]A^A_]UHH]LeLmLuH HIG@Dc IctLH-AW s S@B;CDv Hr HK8@4C@C,PS,tHS0HHS0H?C HxS@Hs8HHSAEAExuHRR(t@A D AD$C $HC,PS,tHS0HHS0HsC C,PS,tHS0HHS0HEC - C,PS,tHS0HHS0HC [t C E it) < 0xfffeffffu)ls->lookahead == TK_eofandbreakdoelseelseifendfalseforfunctiongotoifinlocalnilnotorrepeatreturnthentrueuntilwhile.....==>=<=~=::(ls->current == '\n' || ls->current == '\r')!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((lj_char_bits+1)[((ls->current))] & 0x08)fmt == STRSCAN_I64 || fmt == STRSCAN_U64 || fmt == STRSCAN_IMAGsetgcVinclinenumberskip_seplex_numberlj_lex_lookaheadGCC: (Debian 4.7.3-4) 4.7.3zRx  VAC EL  @mAC Ce dX[C y AC J$rAC P] $ AC I  AC C  AC C $<aAC IS (dAC Mw $ AC T AAC Ew CAC Ey (_AC IQ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @0&,12 @2TP O7\00#eM#zP# uRP p%)  . V@r'p 0 I|Wp7a !    VmX #.=K:XcpA#Cf_lj_lex.cfillbuftokennamessave_growskip_sep__PRETTY_FUNCTION__.4404inclinenumber__PRETTY_FUNCTION__.4384__PRETTY_FUNCTION__.3380read_long_stringlex_number__PRETTY_FUNCTION__.4392llex__PRETTY_FUNCTION__.4509lj_lex_cleanuplj_lex_token2strlj_char_bitslj_str_pushflj_lex_errorlj_err_lexlj_mem_realloc__assert_faillj_lex_setuplj_err_strlj_err_throwlj_parse_keepstrlj_strscan_scanluaopen_ffilj_mem_newgcolj_parse_keepcdatalj_lex_lookaheadlj_lex_nextlj_lex_initlj_str_new @    0G        1!  *  0"D#u  * 0     X  $' 1  6 ; [ %y &   3  & ' P   #  * 0 V  e| 6   ]   l#  * 0z     N  @+ (08@HPg XZ `g hg pZ xg  (08@HPX`hp xi7  (08@HPX`hpx  (08@HPX`hpxXXX X(X0X8X@XHXPXX$`XhXp$xXXXXXXXXXXXXXXXXXXXXg X(X0X8X@gHXPXXX`XhXpXxXXXXXXXXXXXXXXXXXXXXX X(X0X8X@XHXPXXX`XhXpXxXXXXXXXXXXXXXXgXXXXb X(X0X8@XHXPXXX`XhXpXxXXXXXXX@fHjPpXs`xhpx     ( 0 8 @  DVhp|:@7h! #flj_parse.o/ 1378727468 1000 1000 100664 45680 ` ELF> n@@ UHHGHD9L2E]ÃtMUHATSHLgHtFHAЃ v =uHƃuȸ ø[A\]UHLGHtNHLDOAw*t9t Q[@9AJu:uA% T׈Qq 9r@y ]UHATSIt L@LÃu[A\]UHHGH4]UHHA8t(DTQ\HHWxq(rB B D9u܉A8]UHHWxHH@@HHЋHHH9sH9u@ uHH9w]UHG@ALG8ЉG@t A H9w]UHG@LG8v‰ɀA wA4G@]UH协wHH u]ø9w$uUH]ËG8F V HGFHGHHwG89G4tUH9w8w*G4G49tUHÃ~ u UH6]ÃtUH[HHUHFwЉGYuHGFt~vHH]UHATSHLgHHF H7H~FTLfF(F,F0F4F@F<F8F[HFFXFZLHIT$Bx uPAD$@(tID$HID$AT$ H9rL[A\]UHw$UHHGHH ֍2u:=vH fA]UHAWAVAUATSHIAADẼtCLADL,tDL` ỦLQDAuH[A\A]A^A_]UHAUATSHAՃt,IuÉL>uDLH[A\A]]UHG(G,Hw0]UHG(9u09fDwkAй]UHH?FDB HOHDDR]UHH]LeLmH L'DnDID$HHF u0tTtF C;Tu&DLt DL0fCH]LeLmw4GZ9vvUHH @wZUHH]LeHHADc4H]LeUHODuHIЉ HIA UHH]LeLmLuL}H0HADg(Low0ED9C0D;cProIL{HI)IAvHEIH{AIAD)CPIJHCHDHSHD4AM\HSHLAD$C(DH]LeLmLuL}UHSHG(;G,v}HOHLAȃ)t*u_<uS9u uDhC9u<މ*T AF9wH9wL9s0TfAP%u)*D \H[]UHATSHHDg0G(EHWHG0;G,|H€80uf@s4THEDHuHEH[A\]UHATSHIHdG8x}HWHzxHcTS\HH9ujHcDDS\IFL9Py;HCHt!P 9+HHt P 9rDs\AD$<H{ LTDC[At/9H 1H9t|9uA;v<HAT$vG‰fKA|$tA$7H AD$A$AD$ AD$[A\]Ë=vUHUHAUATSHIHGx^HHAIIL9A$9C C A:D$ IUDB\HIExHwKHRHTAUXHufHJL@ LLHLHI9=H[A\A]]UHSHHHuUBv8F9uVG@(tHUH3xuS@HC@PS@H[]UHFttH6G]UHH]LeLmLuH IHFuD.AA+uAAA4 ujDvEyD.AA7AAE >AvD.AA8AAE DD+AAE A63L! uFF "uF DL4C H]LeLmLuUHSHHH~tHH3xuSHuzDHHSxD,HSxD|HSxAN8L HSxMψL AD$DH]LeLmLuL}UHAWAVAUATSH(HHwHuHGHEHHG~ HUHP89s'HuHNxP8p(TP\HtP89rًC8C4HuV 9tHuv u0HHuF t8t{tfxuHH1PiHXcAu!H$uHH1=AHLtAHL3D LQC AE$^^J--*+%p/sI=ti===t@=Ek=tL=|U=* A^AVANAFA>A6A .A &A A A AAD9EHUHHUHK HMHEH HELMuA u2HLHuLAMe{ 1AHLKv? u6wHLL%HLHuLEsLCHuL#AMe{Au>HL7HuLAMeHuLF}  AT$Uw"{w K9K HL{u C9C HL{S9S }M9MD}vJM{vJf.1HfօxHxH97HuLEHLE#AL$MHuL}u HuLoE=w ADeHuLhECt"HL{u&}t HL=w mEU HL{ u AW89rAo4} uAO89MrAo4U uLC wHuLnSHuLkHEHHEHCHEHC|HuLS HuLHEHHEHCHEHCuUID$H<$uC9tHLMUID$H LE=HuLHuL HL3E ƃ$LC }vHL}AE{v H]Le IHUHUHuL ELLZAD$tFr _vAu ƋU UE ‰ULL: uUE ‰ULLP u{E EELLH uZA DeH]LeEtuLLuIHMHMLLEHuLU uHEx u AW89rAo4A|$ uAO8A9 $rAo4LLQC At'ED;EwA ELHL>MeCs sC Ls LHLCAADHuLAM}A\DALHLMeCA9C LHLbMeAADHh[A\A]A^A_]UH+]UHSH(HHu}uEHuH;EH([]UHH]LeHHILHLH;.]HH]LeUHAWAVAUATSHHHxL'OXTEl$4EAD2Lw\Hx@ D(@ @LADt{HlC$}u\HH`DžhADžlDžpAA3DX[u`HuH}vHUHxL,}u H}.u h Džp=HAv= t=u5H=u(HuH=HhA3EEEA*EADžpAHuHEPt}U9UMumhthth҃pAEI|$IǺHLIT$H XH` HuH}I|$HULAWtnIL$I!q(@tTq)@t@uUAWQAE4D) LC C CDcAU(IEHDtAEe4H]LeLmLuL}UHAWAVAUATSH8HIL/G$(u6DwXLHD()H@LH;5= t=uH2LHH; C$.u LH[u(LLHuHHULL뾃:HߐHuHLLJELLEu4AvE L}tHuLA=w/LsD7E AD LQLDAFE%AD LD6E ƋE LnAm4E4$AD$ LHW= t (t{uLLYLH+kH8[A\A]A^A_]UHH]LeLmLuH`HIFv % Aվ,LeHuHw}ubL3UAv4MtSLx u;u0;PupH@Huمt  փL^LD=vH;AUHuH=HLHuHAA9uA} u*HMHPHfreereg == fs->nactvarreg == fs->freereg(((e))->k == VKNUM)lj_obj.hdest != (~(BCPos)0)target < fs->pc((vg)->info & 0x02)bytecode instructionsupvalues((e)->k == VKNUM)(((o)->it) < 0xfffeffffu)e->k == VVOID || e->k == VJMPvar->k == VINDEXEDlocal variablesbl->nactvar == fs->nactvarfs->bl == ((void *)0)constants(o)->gch.gct == ~(~7u)delta >= 0 && delta < 256delta >= 0 && delta < 65536delta >= 0selffs->nactvar == nparamse->k == VNONRELOCe1->t == (~(BCPos)0)e1->f == (~(BCPos)0)(e2)->k <= VKTRUElj_gc.h((key)->k == VKSTR)variable namespairsnextfs.prev == ((void *)0)ls->fs == ((void *)0)pt->sizeuv == 0(((((((((e))->k == VKNUM)) ? (void) (0) : __assert_fail ("(((e))->k == VKNUM)", "lj_parse.c", 1720, __PRETTY_FUNCTION__)), (&(e)->u.nval)))->it) <= 0xfffeffffu)!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((BCOp)((*ip)&0xff)) == BC_JMP || ((BCOp)((*ip)&0xff)) == BC_UCLOe->k == VLOCAL || e->k == VUPVAL(uintptr_t)name >= VARNAME__MAX(&((GCobj *)(uintptr_t)((vg->name)).gcptr32)->str) != ((GCstr *)(uintptr_t)1)((e)->k == VKSTR) || e->k == VGLOBAL(((&e->u.nval)->it) == (~10u))(uintptr_t)name < VARNAME__MAX || lj_tab_getstr(fs->kt, name) != ((void *)0)name == ((GCstr *)(uintptr_t)1) || lj_tab_getstr(fs->kt, name) != ((void *)0)(((&ls->tokenval)->it) == (~4u))((((&n->key)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))ls->fs != ((void *)0) || ls->token == TK_eof!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((e1)->k == VKNUM) || e1->k == VNONRELOCe1->u.s.info == ((BCReg)((*(&(fs)->bcbase[(e2)->u.s.info].ins))>>24))-1op == OPR_NE || op == OPR_EQ || op == OPR_LT || op == OPR_GE || op == OPR_LE || op == OPR_GT((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause((BCReg)(((ilp->ins)>>8)&0xff)) == freg && ((BCOp)((ilp->ins)&0xff)) == (narr > 256 ? BC_TSETV : BC_TSETB)((((((&n->val)->it) == (~11u))) ? (void) (0) : __assert_fail ("(((&n->val)->it) == (~11u))", "lj_parse.c", 1824, __PRETTY_FUNCTION__)), (&(((GCobj *)(uintptr_t)((&n->val)->gcr).gcptr32))->tab)) == t(((GCobj *)(uintptr_t)(((ls)->vstack[(fs)->varmap[(((BCReg)((ins)>>16)))]]).name).gcptr32))->gch.gct == ~(~4u)(((GCobj *)(uintptr_t)(ls->vstack[fs->uvmap[((BCReg)((ins)>>16))]].name).gcptr32))->gch.gct == ~(~4u)ls->fs->framesize >= ls->fs->freereg && ls->fs->freereg >= ls->fs->nactvarsetgcVlj_parsefscope_beginjmp_patchinsparse_chunk copyTVexpr_simplelj_gc_barrierbackexpr_tableconst_strbcreg_freeexpr_numiszerolex_strexpr_kvalueexpr_toreg_nobranchnumberVnumbcemit_storeconst_numparse_paramsvar_newvar_lookup_uvbcemit_methodparse_argsbcemit_unopbcemit_binopbcemit_arithbcemit_compjmp_patchfscope_endgola_newgola_resolvegola_closepredict_nextfs_finishfs_fixup_retfs_fixup_kfs_fixup_lineGCC: (Debian 4.7.3-4) 4.7.3zRx %AC ` 8<bFC CF F FBA xAC   6AC Cn AC N ;AC v OAC J .AC i <4AC o \.AC i |KC K HjC Y 1SC Y GC H 0GC Y nAC i  <AC C `AC |PAC K (wAC Me  LAC I~ AC R  DAC  ,,AC g $LAC P t+TC N  )AC LX @AC (AC X  AC E  $pAC Gd  HAC C l0WC T $AC I  AC Ex 9AC t $AC T  ZAC EP $DAC T (l;AC X  NAC L} $AC Pt  \AC LK AC U $(AC P $PAC P  xAC C (AC X (AC X (AC X ( oAC M] L:AC Ep l)AC E UAC EK 6AC El $VAC PA AC P $AC G $<AC Tn  d=AC Cu (AC M $iAC PT (AC Pq ( AC M 4 AC K T 8AC En  t HAC Lw ( hAC PS $ YAC IK ( AC X ( 1AC M $D AC T l (AC E^ ( I AC P4  AAC Lp  EAC Lt  _AC Z  AC J .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @WSp &S,S12S@2(V+ T`_O\07beTbzXb@ u P m r | l %%b!2'6>]Ip;QO`.k(4z\.H 1 20 bn .6OZPg wLDd :,f +=)f@#.Q p9 E ^ 0m z  N 9}  Z  7;BNQ_\mx! */y 2on .::)DULeY6nVyv=   '  9uCI E) P>iE 6hd?12  K > X [6 k686H#`<r US=Y_=j' AMC(PEPA       %3>R_kv&i 0APDQ_cQlj_parse.cjmp_nextjmp_novaluejmp_patchtestregjmp_dropvalinvertcondvar_addgola_findlabelfs_buf_strfs_buf_uleb128endofblocklex_optfscope_begin__PRETTY_FUNCTION__.5175bcreg_free__PRETTY_FUNCTION__.4859expr_freeexpr_numiszero__PRETTY_FUNCTION__.4669expr_kvalue__PRETTY_FUNCTION__.5409fs_init__PRETTY_FUNCTION__.3380err_syntaxjmp_patchins__PRETTY_FUNCTION__.4814jmp_patchvaljmp_appendjmp_toherejmp_patch__PRETTY_FUNCTION__.4845gola_patchgola_close__PRETTY_FUNCTION__.5133bcreg_bumpbcreg_reserveerr_limitbcemit_INSbcemit_nilbcemit_jmpvar_lookup___PRETTY_FUNCTION__.5098synlevel_begingola_resolve__PRETTY_FUNCTION__.5143const_gcconst_str__PRETTY_FUNCTION__.4765expr_dischargeconst_num__PRETTY_FUNCTION__.4752expr_toreg_nobranch__PRETTY_FUNCTION__.3444__PRETTY_FUNCTION__.4896expr_toregexpr_tonextregassign_adjustexpr_toanyregexpr_tovalexpr_indexbcemit_branchbcemit_branch_tbcemit_store__PRETTY_FUNCTION__.4928var_new__PRETTY_FUNCTION__.5061gola_new__PRETTY_FUNCTION__.5118fscope_end__PRETTY_FUNCTION__.5181parse_breakerr_tokenlex_str__PRETTY_FUNCTION__.5053expr_strexpr_fieldlex_checkparse_labellex_matchfs_buf_resizefs_finish__PRETTY_FUNCTION__.5342__PRETTY_FUNCTION__.5230__PRETTY_FUNCTION__.5259__PRETTY_FUNCTION__.5373parse_body__PRETTY_FUNCTION__.5452parse_chunkexpr_binop__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5501expr_tableexpr_primary__PRETTY_FUNCTION__.5028priority__PRETTY_FUNCTION__.4988__PRETTY_FUNCTION__.5021__PRETTY_FUNCTION__.5002exprexpr_condexpr_bracket__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.5435expr_listparse_args__PRETTY_FUNCTION__.5483__PRETTY_FUNCTION__.4940parse_assignmentexpr_nextparse_thenparse_block__PRETTY_FUNCTION__.5706__PRETTY_FUNCTION__.5788__PRETTY_FUNCTION__.5799lj_lex_next__assert_faillj_tab_newlj_state_growstack1lj_lex_errorlj_mem_growlj_tab_setlj_tab_getstrlj_lex_token2strlj_mem_realloclj_mem_newgcolj_gc_barrierfmemcpylj_vmevent_preparelj_vmevent_calllj_parse_keepstrlj_str_newlj_tab_setstrlj_gc_steplj_vm_foldarithlj_lex_lookaheadlj_tab_reasizelj_parse_keepcdatalj_parse| s   } s  &}= sG L 9Q} s  9} s  }L~ s M } s  V} sd " j'} s  z} s  } 8  s    } @ sJ O @T }p sy ~ ` }  s M  }* ` s}j o t } s  }B sL MQ V} s  }X sb g l}W sa Mf k}Y sc h m}d   s  } sy  H} sn  }i/ s9 > C}K||||S4B`I sS X 5]}!" K" K# s# # #}#$ s$ $ U$}$ % s% % l %}O% sY% ^% c%}% s% % %}%%)& s3& M8& =&}I&{& s& & &}&&&' '(|S( s]( b( g(}~)|* s>* M* (*}* sE* * *}+|,|, s2, , ,}, s2, , ,}p. s .|U0 s_0 Md0 i0}|0 s0 M0 0}0M1 sKW1 \1 Xa1}1 s>1 2  2}E2 s>O2 T2 Y2}2 s>2 2 2}63 s>@3 E3 J3}3 sX3 3 3}5 s B5|5 s!5|6|6|B89~h99 s`9 9 09}9 s`9 9 9}6: s@: ME: J:}I; srS; X; ];}<< sr< < @<}<=|u> s'> > >}>|> s'> > >}?|A@|@ s@ @ @}fB 3C sCD|D|OE|E|YH scH hH mH}H sH H xH}H BHHH HHI@I BlI HuJ|K|K|L| N|8NGN|O s O O #O}Q|tQ s~Q MQ Q}QQ R sR MR  R}@RR|R sR S M S}S sS #S d(S}3S s=S BS zGS}NKENN N(N0{E8K@4NHCPNXK`NhNpNxBJLNNNDNNNNNN!N @%|']p @(`\2 b@d0:Pfx=f(Q L p   N  $Hp ,!T|*/$2PpY@hv&' )8 [6X k6x 6 6 S= = d?H Ap MC uC P P DQ$ Qlj_bcread.o/ 1378727467 1000 1000 100664 9936 ` ELF>@@ HG0W,9sUHu)W,HHw0UHSHHW0 HvKȃ w,uw,2H@xO,uO,HW0H[]UHH]LeLmH HIIvcDhDHHDH{HSA$AD$xuHB@(twuH*A$EuHA$HAD$%vAD$H]LeLmUHH]LeHIӉ"HLH]LeUHATSIWD9s&9wIt$8I|$ID$8A\$D[A\]UHSHH_HWh<t<=t<@u HHcH H߸HUHAWAVAUATSHAu;Hw Aփ y HZC,tdK@t=Hs0H{8L AIM9tC9tDHK,Hs0H{8HC8HC0C,C@HsPH{HUSHIHt HEHuEt HC SS@t;D<E9DACHUC@HC8HMHLD{@D{,HC8HC0C,Lc0D9k,H[A\A]A^A_]UHAWAVAUATSHxIHGHE tHUHB+B$G\G@, w ;AV,uJAN,IF00HxI~0@Ly uJAN,pHxI~0@J? uAV,PHIF0 L4AAt,I^CuC$LkI)HC$ILkAt.IvhHHHHHI~IF`;LA;F,vLL[I~HIF`AF,t"IV0:uAF,HIV0wLLn >= (len)ls->n > 0lj_obj.htp <= BCDUMP_KTAB_TRUE(binary)%s: %slen != 0ls->current == 0x1b!(((&key)->it) == (~0u))(((L->top)->it) == (~7u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))ls->p + ls->n == ls->sb.buf + ls->sb.nlj_bcreadsetgcVbcread_bytebcread_uleb128bcread_fillbcread_membcread_kgcbcread_ktabbcread_ktabkbcread_uleb128_33GCC: (Debian 4.7.3-4) 4.7.3zRx 7LC Y  <AC E $`AC P  3AC Lb  <AC Ct TAC E(`AC MN (8 AC M& .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @ &`,`12`@2OO`W0`u@p& @ p 78 17@Yf Z 3<1T`,   N 0C Ip  bp{8 lj_bcread.cbcread_mem__PRETTY_FUNCTION__.4562bcread_uleb128__PRETTY_FUNCTION__.4578bcread_ktabk__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4621bcread_blockbcread_resizebcread_errorbcread_fill__PRETTY_FUNCTION__.4543__PRETTY_FUNCTION__.4722__PRETTY_FUNCTION__.4571__PRETTY_FUNCTION__.4635__PRETTY_FUNCTION__.4654__PRETTY_FUNCTION__.4587__assert_faillj_str_newmemcpylj_mem_realloclj_err_allmsglj_str_pushflj_err_throwmemmovelj_bcreadluaopen_ffilj_mem_newgcolj_tab_newlj_tab_setlj_state_growstack1 8   $t ~      >  H %M R Z  .X Eb g Nt!" ,  U ,   (#   ^S Z _ d      :%r' 1 6 ;a h m r      &D  ' N  r  (\ & C   l ps x }  p   [  e %j o  )     @7d1lj_bcwrite.o/ 1378727466 1000 1000 100664 6696 ` ELF>@@ UHGALЉGt A H9w]UHGLv‰ɀA wA4G]UHATSIW w9s9rI|$I4$I$A\$ [A\]UHH]LeLmLuH HIAՋG ;G  AD$uAE4$En EeDC;C v DH_DH!IvDH=wdEt2A$,*f.zuCH CHqCH CA4$HAt$HDwjSH3ЈSFVH]LeLmLuUHAWAVAUATSH8HHuF%t6DvDfIM~%AA4$~uHIIM9CHuV$FPP';S v p"HCH Huv%@u@"u@4PSH H}w@4PSH w@4PSH w$@4CwHZHEpHKHuvuH6E{0uIHuF4~ )ljEH}tHEp,HHUr0HHuDvEnDcL#BHDHHuF%u f~&HCxH@EAKLA$ƒOtLt JtRu A$kPt MtSu\At$AD$t;rH@8A$AT$AD$II9cHuV$ҋvHHuFVHH)IօHDHEE&AD$<uAt$ A<u#HuF%uh< u.AD$ tM tUt]< tMA2A%AA AC;C vHDHAv8A|$tAT$ It$HVA-A|$ tAD$Et-AT$Hx|t |u HHuEAL$At%At$HR|AՃ9suHDH}t.E|$EȃIDHEȺLHIL;}uEAD$H@AD$L$A|$t(It$HLHAtfIEt[A|$ tAt$HAt$ HAuAt$HAt$HIL;u.HuDnDvMCtC;C vHEA~v& A|$v"AOtA$D,A*f.z>uit) >= (~2u))(pt->flags & 0x01)id == CTID_COMPLEX_DOUBLEo->gch.gct == ~(~11u)(o)->gch.gct == ~(~4u)(o)->gch.gct == ~(~11u)(o)->gch.gct == ~(~10u)(((o)->it) < 0xfffeffffu)ctx->sb.n == 5(rd)>0 && (MSize)(rd)sizetracebcwrite_protobcwrite_bytecodebcwrite_kgcbcwrite_ktabkbcwrite_knumGCC: (Debian 4.7.3-4) 4.7.3zRx -AC h <3AC n  \;AC Cs $FAC T- (SAC MA $AC I  $vAC El .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @ `  & , 12 @2 #O HW0X `u ux p  p H--3,`;;FI-bSp! ; 4   M vlj_bcwrite.cbcwrite_blockbcwrite_uleb128bcwrite_resizebcwrite_ktabk__PRETTY_FUNCTION__.4967bcwrite_proto__PRETTY_FUNCTION__.5041__PRETTY_FUNCTION__.5007__PRETTY_FUNCTION__.5021__PRETTY_FUNCTION__.5054cpwriterlj_mem_realloc__assert_faillj_bcwritelj_vm_cpcall -       !  " !  5 !   O !  e !  | !   ;     P  4  @-``4 M lj_load.o/ 1378727467 1000 1000 100664 6976 ` ELF>@ @@ UHHFHtHHFH]UHH]LeLmH IIH>u+I\$I $ HIEHHDHH]LeLmUHAUATSHHIHG0@HAI|$pHtxbHuckHHSHJHKBxuPC@(tHEt LLS,HHHSHJHKBxuPC@(tH[A\A]]UHATSHHHuHUHɸHDHMLEHEEHPAHPHSB$9B rHDHĠ[A\]UHA]UHH]LeLmLuH0 HIIHLHHu/8HLH߸AbLH߸IMHHHAH?HHIйHAHunHCHPHSHPHPH Jv;@H9uPC@(tHoHk8HH߸Atop > L->base!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))setgcVcopyTVlua_dumpGCC: (Debian 4.7.3-4) 4.7.3zRx $AC _ $<gAC PR $d)AC I  AC Jw AC L $AC W AC K  AC [ 8AC L X,AC g  xZAC U .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @8 &@,@12@Z@2SOW0 `'u(p8  h h $$g%).G`   y%~:#K2:KTdkqx7G gx,Zlj_load.creader_stringreader_filecpparser__PRETTY_FUNCTION__.3969__PRETTY_FUNCTION__.4018__PRETTY_FUNCTION__.4915.LC6feoffreadlj_lex_setupstrchrlj_err_str__assert_faillj_err_throwlj_bcreadlj_parselj_func_newL_emptylua_loadxlj_vm_cpcalllj_lex_cleanuplj_gc_steplua_loadluaL_loadfilexfopen64__errno_locationstrerrorlua_pushfstringferrorstdinfcloseluaL_loadfileluaL_loadbufferxluaL_loadbufferluaL_loadstringlua_dumplj_bcwriteBf    %2?IW      'Ey  "#$ % !% $&' %) $.=&   ((#$  ,%#$ , %(A!\ ar*+  ? I. @$h:K7G<g\x|lj_ir.o/ 1378727467 1000 1000 100664 15560 ` ELF>@@ UHAWAVAUATSHH HL4ʋAA)u[;Gt\WEAAt9vHA)HDIcur.nk == J->irbotlim(&cir[ref])->o == IR_KGCir->o != IR_KSLOTlj_ir.h!1 || t != IRT_LIGHTUDt <= IRT_NUMlj_obj.h(ir)->o == IR_KINT640(&cir[ref])->o == IR_KNUM || (&cir[ref])->o == IR_KINT64((uintptr_t)(tv) == (uint32_t)(uintptr_t)(tv))!((o)->gch.marked & ((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g)->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))(void *)(intptr_t)((int32_t)(intptr_t)(void *)(ptr)) == ptr(((((IRRef1)((key)))) < REF_BIAS)) && slot == (IRRef)(IRRef1)slot!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))$Y[ Y!Y!Y! [! [[ Z![ [![&[ YYYY[[[YYYYYYYYYYYYYYYYYYYYYYYYYYY Y Y YYYYY Y YYYYYYYYYYY!YZ [ [[Y䏎DD%, lj_ir_growbotlj_ir_k64lj_ir_kgclj_ir_kptr_lj_ir_kslotlj_ir_kvalueirt_toitype_setgcVlj_ir_numcmplj_ir_strcmpGCC: (Debian 4.7.3-4) 4.7.3zRx (eAC MS  HAC C  lAC Cx $AC K  $AC I  FAC C~ $AC I (,#AC M X(AC E^ x(AC E^ DAC  $AC G $AC G $AC I $0AC I $X AC P SSC { {SC c QSC y C Y  fAC E\ $3AC n .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @x, &<,<12<@2T4 O 6\0ez@u: 8  p( e0 I b {    '    '6eDOZiu=F{#((D22 {  S-: {FU QR _`flw3 !,16;AHO`q0`_lj_ir.clj_ir_growbot__PRETTY_FUNCTION__.6488__PRETTY_FUNCTION__.6562__PRETTY_FUNCTION__.6594__PRETTY_FUNCTION__.6607__PRETTY_FUNCTION__.6632__PRETTY_FUNCTION__.6642__PRETTY_FUNCTION__.5232__PRETTY_FUNCTION__.4866__PRETTY_FUNCTION__.6682__PRETTY_FUNCTION__.6694__assert_failmemmovelj_mem_realloclj_ir_growtoplj_ir_emitlj_ir_calllj_ir_callinfolj_opt_foldlj_ir_kintlj_ir_k64_freealllj_ir_k64_findlj_ir_k64lj_ir_knum_u64lj_ir_kint64lj_ir_knumintlj_ir_kgclj_ir_kptr_lj_ir_knulllj_ir_kslotlj_ir_kvaluelj_mem_newgcolj_ir_tonumberlj_trace_errlj_ir_tonumlj_ir_tostrlj_ir_numcmplj_ir_strcmplj_str_cmplj_ir_rollbacklj_str_newlj_strscan_numlj_str_fromintlj_str_fromnumlj_tab_new1lj_tab_duplj_tab_newkeylj_tab_lenlj_gc_step_jitlj_gc_barrieruvlj_math_random_steplj_vm_modisinhcoshtanhfputcfwritefflushlj_carith_divi64lj_carith_divu64lj_carith_modi64lj_carith_modu64lj_carith_powi64lj_carith_powu64lj_cdata_setfinstrlenmemcpymemsetlj_vm_errnolj_ir_type_sizelj_ir_mode6 @ E JT ^ c h S#R   N X ] @b ! !,"` j o pt   ,S ] b g   H    E    W _   W v 5 ? WD _I S ] Wb vg      *    H R W \ a k p u   , B N , ,  @F P U Zl1 '    (   ( 0 8 @ H P X `h p+x6  13456789 :0;@<P*`=p>?@ABCD`EpFGHIJKLMNO Lep=0{\|22 4 \{   U  `(lj_opt_mem.o/ 1378727468 1000 1000 100664 12832 ` ELF>P @@ UHHH+OHHH9s#F9u FG<vHH9w ]UHV8Wu*f9uGf;FFf3G]UHATSIHF<(u>fyIT$H4LHu/Cfy!IT$HC<(t9u~9tF9r]UHH]LeLmLuH HHLL9uA2BAI~(uEFfx4HDN,πxuHHcHtAM9u xIMAAx(uKEHfEx7EN EN$AyuA9LMcMtAL9uMAM9RIL9u;AH9ȃ Ѓ 0<EAHAI9LH9AEBQ1t&Awg҃1ЃuTLHILHI9t0Ht AMu#IDMELHHAADH]LeLmLuUHHGH AN9u:A< u A@< t;AN<A@N<@w u$@u u HLILH]Nf;Ju(6f9tfwUH]DFBH9UHH]LeLmH HOEN EAyuE EEN DNDAzuADLFXȀw 646ZDcAw E9u9*b Aw A<88teEĻAy(u/AAfxE!E9ut EĻEAAz(u/ABfxE*D E9uEt pEAD9tGE9u=V9<w9vxAJA2Iu9tJ øH]LeLmUHAWAVAUATSH8IAH_HHEEHDG@D9s=DLEH€x(HHfɋ ʉMI9tF<#uNH…t}AO(HAątdHcEMHHLt"HD(HAąt/DE9sHCEFtE9rDHCL<HAHLEH([A\A]A^A_]UHAWAVAUATSH(IDLwAIHEEHHUDED9DCA9DBE9HHEDIHHUHuLt@C;ES;UA$bA9vrAD$IH9s%xx[xDuSxxMxDftEHH9rCHUfC CfCffCHCHEDkE9-LH([A\A]A^A_]UH9B9v@HGLALH Ȁyu  LIt AP9w]UHATSDACHG@9LGIDA9u$IDA9u@AO@uHELAJf@tEA\C2\uEAwoA9tjwi@9zMcB_@9sNHwH9uH9u @%@9r۸ [A\]lj_opt_mem.cta != tbrefb->o == IR_AREF(((tv)->it) == (~4u))(((IRType)((taba->t).irt & IRT_TYPE)) == IRT_TAB) && (((IRType)((tabb->t).irt & IRT_TYPE)) == IRT_TAB)(refa->o==IR_HREF || refa->o==IR_HREFK || refa->o==IR_NEWREF) && (refb->o==IR_HREF || refb->o==IR_HREFK || refb->o==IR_NEWREF)ir->o != IR_TNEW || (((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE)) == IRT_NIL)(((&J->cur.ir[(ir->op1)])))->o == IR_KGC(((((((&J->cur.ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(ir->op1)])))->o == IR_KGC", "lj_opt_mem.c", 192, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)itype2irt(tv) == ((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE))fwd_ahloadaa_ahrefaa_tableGCC: (Debian 4.7.3-4) 4.7.3zRx IAC D <>AC y  \jAC Cb KAC F $AC T AC  9hC L <SC P F R (HjAC MX  tAC E +AC Ea (AC M (AC M (AC M (<:AC M( (hAC X (AC X (AC X (<AC M* (]AC MK (DgAC MU piAC d  .AC C& .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @*( &,12?@28OW0`u p/( $ (<II> j,K;<CTL e9m:v %j    Q +/| @K, a q : tC<Z]gi'.lj_opt_mem.caa_escapeaa_urefaa_findcnewreassoc_trycseaa_xrefaa_table__PRETTY_FUNCTION__.4124aa_frefaa_ahref__PRETTY_FUNCTION__.4141fwd_ahload__PRETTY_FUNCTION__.4173lj_ir_type_size__assert_faillj_ir_kvaluelj_tab_getlj_ir_knum_u64lj_ir_kgclj_opt_fwd_aloadlj_ir_emitlj_opt_fwd_hloadlj_opt_fwd_hrefklj_opt_cselj_opt_fwd_href_nokeylj_opt_fwd_tptrlj_opt_dse_ahstorelj_opt_fwd_uloadlj_opt_cselimlj_opt_dse_ustorelj_opt_fwd_floadlj_ir_knulllj_opt_dse_fstorelj_opt_fwd_xloadlj_ir_kint64lj_opt_dse_xstorelj_opt_fwd_tab_lenlj_opt_fwd_wasnonnil= K n x }      % * /    h    : D I 8N[ e j ho|   h   ) F q  ! Z&))&G:, & @I`<T :L%x Q | ,  @ l tCZHtlj_opt_fold.o/ 1378727478 1000 1000 100664 66976 ` ELF>@@UH]UH勇Љ]UH僿]UHt u!ff]UH勗ftftʁfEʉ]UH倿 f91]UHfw]UH]UH@uf]UH@u]UH@u(Ƈ)ff]UH@uƇ)f]UH@uƇ(f]UH@u*@u!ff]UH@ufu y]UH9u]UH@u@fuffLJ fu]UH@uRʃw=f%9u  ff]UH@uf u]UHw]UHu]UH勗u 2u $uƇ5f]UHu LJ]UH<t>@u5f9u f;E]UH<t'@uf9u]UH<@@f9u#ffmf9uffEDfD9uff"fD9uff]UHHW@uLH4ʀ~u?B`҃?#9uf]UHf;tf;u]UH@u.f9u f;E]UHf;tf;u]UHf;tf;u]UHtfbЃ]UHf9sff]UHf9u <t]UHf9u)t61Ѓ!f9sff]f;uUH]UHf;bЃ]UHt ]UHt ]UHt@u]UHtbT9vIHwH9u0Bfx'ȸDD9}&fBB9r]UHfHWH4¸~(FfxfD¸DudTDA9C9s6Hf;ufD;@t+@9r! ]UHtkDfAAD"9s>LGE҉I29u!rffA9u@"r@D9} B9r]UHAVAUATSIDtMDG@9B9s6It$H9u H9uDrADyR9rEt$E;$rLAFAD$DID$HEIŠClfPfG4lA$PA$A$PD[A\A]A^]UHSHHf9bv%Huu ftHH[]UHSHHB`҃?!u su%#uƇ(fI9tHf/'u!ƃ&ى!HfH[]UHSHH<tt@ukf9u&ff2f;u$ffH[]UHSHH<tD@u;f9u+ffH[]UHSHHu Ƈ(fH[]UHSHHtf9Vv5H+uH[]UHtXtx t@]UHtWtxt@ ]UHWDAG@tlztlDLAyu umHwH fH ΀ytq ytqDBBLytrI9u0ABHH):HH1HH!)HH !HH1]]<u Hc-<vUHHHHw<u Hc-<vUHHHu<u Hc-<vUHgHHuøHuƇfLJ<u Hc-<vUHZHHuøHu<u Hc-<vUHMHHuøHuUHSHHuf~&ruƇ fH[]ÀtUHH:u<u .<tUHH8¸tƇ.f@Du¾3¾(u'fxHOHc4¾< 9ukE t > @ D tUHt(HOHcHֺHøøøøw2<tUHÀtUH'fWf.z uøUHutH,]ÀtUHu%,y *f.zu,øÀtUHHUHHtJXEE<vUHH8UH<vH<vHwf$H9ЃeH9[H9QH9ЃEH9Ѓ9H9/H9%H9Ѓ]UH勇 wj$9h9[9N9A9Ѓ69-9$9ЃB]UHH*EHuUHHH*EHuUHSHH@ubfta fWEHufH[]UHSHH@ubft2 fWEHufH[]UHHt|HHx H*EHHH H*XEHuUHHtvH*EHuNwDUH$H2+22222 H2 @]UH<v$Hi]UHtvtx tB`s Hp@]UHf9u1B`s LJ]UHSHHHW@HʀzB`?#2#9}6J݀wuLJ6*!ƀ%DfHfH[]UHSHHHGH иyut<vH6H8hHƸ@u"fHfH[]øf9u?<t*B`sUHLJø]UHSHHtH0Hu Ƈ(HfH[]UHutf.sH,\H,HH1]UHutH,0]UHtHc ]UH<vH0H]UH<vH0?#<wG$HOHHHAHHHH -HHHH ]UHSHH<vkH0<vkH8HHH[]UHH]LeHILu LÉH]LeUHSHHtotfHCHЀxtx t@ H[]UHSHHtotfHCHЀxtx t@ H[]UHSHHt0t H[]UHSHHt&tH[]UHATSHHHH`HutHCHЀxt0~ tH{`HUIHI9uEHt4tLHH[A\]UHSHHt8tHHH[]UHF<v0t2H@]UH倿ttL< z t BȋdLtv9rHAuE%t9w& %t9wHAtȃt*t&t!t4t %=8uLʾ Lʾ]UH倿txt;P vHcHT]UHSHH5**,*f.zu H[]UHSHHt*EHuHH[]UHSHHtt(EHuHH[]UH $7){u!o i1c[SKى ;ى +9N"9M]UHH]LeH HHGH QE(tFEMf.zu @ffEHuHfbuXD!DTA9u 0@u"fHfH]LeUHH]LeHHHGL$иA|$uWA<$A;$u 0@u"fHfH]LeUHSHHHGH иyu)1A¸;uH[]UHSHHH[]UHSHHu 'VuƇ#fH[]UH倿tH0HuHwj]ËuLJø~ UH<]@uBfbu>UH倿Uu$fud ø]UHSHHtCf.zu f.z2u0ƃ.HHHf<*f.ƃ(f}fEHUHHu`HH4qwHƃ*)H4HH!H Hf <+tH[]UHSHHttHut/}vfHuH‰H[]UHSHHH`HHH[]øuUHH]UHSHHtH`HHH[]UHSHHffHOHxt 8t Hрxt 0~t  H[]UHSHHHc<vH`HHH[]UH<vH0H]UHSHH<vtH8<vtH0<u-<+u HE<,u H7H-<+u H<,u HfHHH[]UH勇ȉ]UHHt t]UHSHHtEHuHH[]UHAVAUATSIu`u  t.A`@uEtLf%=t#A`<`u L~AQAAAF9rIvHr HIA9wIFHDhAHI D,فD )A) iғ)։Ɓ9t9uL%u$u L} ÁlvIVTTuAL5u Lt[A\A]A^]UHH]LeLmLuL}H0HtDA|$tEl$ <t@tAqDDHWAƀ|?t"Au0DfǃffH"fȸD9,1E#AtAADD DffDfHAIT$HCH4HAAu0Hfǃ fDfHAfDfDAAϓfDWPIBfǃDfDfǃHAIT$HCH4H;AH]LeLmLuL}UHH]LeHHHW@uaH ʀyuT9AfHfDHffǃ H]LeUHH]LeLmLuL}H@HDDDD@ucfLJUfEfǃUfDfDHAAE fDUffH]LeLmLuL}UHSHHtf.zSuQƇUffLJfH?Hfƃ1H[]UHAVAUATSHDDEEuH?AFA<A$=#Ey5H?fǃ+ffDHAAAu/Afǃ*ffHAAAtAAfǃ*ffHAAtYAt$fǃ*fDfDHAAfǃ*ffHAAAufǃ*fDfDHAAD[A\A]A^]UHH]LeHH@fxu }HCHD"z?tB@u@Bfǃ(fHffDfǃ?H]LeUHG@DD9v'LGI9 u I9 tR9r]lj_opt_fold.c0k != 0(o)->gch.gct == ~(~10u)lj_ctype.hid > 0 && id < cts->top(((&n)->it) < 0xfffeffffu)ref == DROPFOLDir->o == IR_STRREFJ->slot[(&J->fold.ins)->op1] != 0(((&J->fold.left)))->o == IR_KGC(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 2015, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~10u)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 1996, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 1900, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~8u)(((GCobj *)(uintptr_t)(fn->l.uvptr[((&J->fold.ins)->op2 >> 8)]).gcptr32))->gch.gct == ~(~5u)(((&J->cur.ir[(ir->op1)])))->o == IR_KGC(((((((&J->cur.ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(ir->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1905, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)(((GCobj *)(uintptr_t)(fn2->l.uvptr[(ir->op2 >> 8)]).gcptr32))->gch.gct == ~(~5u)((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))(((((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR) ? (void) (0) : __assert_fail ("((&J->fold.left))->o == IR_KPTR || ((&J->fold.left))->o == IR_KKPTR", "lj_opt_fold.c", 1875, __PRETTY_FUNCTION__)), (((void *)(void *)(uintptr_t)(((&J->fold.left))->ptr).ptr32))) == ((((((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))) ? (void) (0) : __assert_fail ("(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))", "lj_opt_fold.c", 1875, __PRETTY_FUNCTION__)), (&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val))((&J->fold.left))->o == IR_KNUM || ((&J->fold.left))->o == IR_KINT64((&J->fold.right))->o == IR_KNUM || ((&J->fold.right))->o == IR_KINT64((&J->fold.right))->o == IR_KINT64((&J->fold.left))->o == IR_KINT64(((IRType)((J->scev.t).irt & IRT_TYPE)) == IRT_INT)(((IRType)(((&J->fold.left)->t).irt & IRT_TYPE)) == IRT_NUM)((&J->fold.right))->o == IR_KNUM((&J->fold.ins)->op2 & 0x0400)((&J->fold.left))->o == IR_KNUM(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 2026, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~10u)(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1976, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1968, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 1936, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)((&J->fold.left))->o == IR_KGC(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 494, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(MSize)(&J->fold.right)->i <= str->len(&J->fold.ins)->o != IR_CONV || ((&J->fold.ins)->op2&0xf000) != (0<<12)(((((((&J->fold.left)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.left)))->o == IR_KGC", "lj_opt_fold.c", 711, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.left)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((((((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op1)])))->o == IR_KGC", "lj_opt_fold.c", 523, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op1)])))->gcr).gcptr32))))->gch.gct == ~(~4u)(((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC(((((((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[((&J->fold.left)->op2)])))->o == IR_KGC", "lj_opt_fold.c", 524, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[((&J->fold.left)->op2)])))->gcr).gcptr32))))->gch.gct == ~(~4u)(((&J->fold.right)))->o == IR_KGC(((((((&J->fold.right)))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->fold.right)))->o == IR_KGC", "lj_opt_fold.c", 1810, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->fold.right)))->gcr).gcptr32))))->gch.gct == ~(~4u)(((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE)) == IRT_STR)(&J->cur.ir[(strref)])->o == IR_STRREFL[pN p )H[pJ {pF sLZ)SQ@]sHYDg*pZ @\iY jh+V.lpEVnn"B^NaX lZATA(RSX \PlCkX CX>\|U=XBQ[HYS1pX d_lZpT yq^-rpP oEu{\~k*ZkDAV5mNR2T^pD \(_xsp@ ekrZfb[7Ti?0mT>D]dPtSFlOWUhluAKWdoQhZX*l qGW{X lnl`P\.CUX l DEl X Ak.S3X P/X<fb@_Cp*dc \~.V6Ap Ja^,\*puV<8wplj_opt_foldfold_xload_kptrfold_fwd_sloadfold_fload_cdata_int64_kgcfold_fload_cdata_typeid_kgcfold_fload_str_len_kgcfold_fload_tab_tdup_hmaskfold_fload_tab_tdup_asizefold_fwd_href_tdupfold_fwd_href_tnewfold_cse_ureffold_kfold_hload_kkptrfold_merge_eqne_snew_kgcfold_reassoc_minmax_kkfold_intopfold_reassoc_intarith_k64kfold_int64arithfold_simplify_shift2_kifold_simplify_shift1_kifold_simplify_bxor_kfold_simplify_bor_kfold_simplify_band_kfold_simplify_intmod_kfold_simplify_intmul_k64fold_simplify_intsub_k64fold_simplify_intadd_k64fold_simplify_intsub_kleftfold_narrow_convertfold_simplify_conv_sextfold_simplify_tobit_convfold_simplify_numpow_kxfold_simplify_nummuldiv_negkfold_simplify_nummuldiv_kfold_simplify_numsub_negkfold_simplify_numsub_kfold_kfold_strtofold_kfold_tostr_knumfold_kfold_conv_knum_u64_numfold_kfold_conv_knum_i64_numfold_kfold_conv_knum_u32_numfold_kfold_conv_knum_int_numfold_kfold_conv_kint64_int_i64fold_kfold_conv_kint64_num_u64fold_kfold_conv_kint64_num_i64fold_kfold_tobitfold_kfold_add_kptrfold_kfold_add_kgcctype_checkfold_kfold_strcmpfold_kfold_strref_snewfold_kfold_strreffold_kfold_snew_kptrfold_kfold_int64comp0fold_kfold_int64compfold_kfold_bswap64fold_kfold_bnot64fold_kfold_int64shiftfold_kfold_int64arith2fold_kfold_int64arithfold_kfold_intcompfold_kfold_numcompfold_kfold_numpowfold_kfold_fpmathfold_kfold_numarith8CC?@GCC: (Debian 4.7.3-4) 4.7.3zRx  AC F <AC T \AC M |=AC x CAC ~ )AC d AC W  AC H 'AC b <AC V \<AC w |.AC i .AC i >AC y 2AC m 0AC k TAC O <fAC a \+AC f |$AC _ AC V KAC F  AC [ WAC R @AC { <AC  \kAC f |+AC f BAC } 'AC b 'AC b )AC d .AC i <;AC v \cAC ^ |UC F AC V AC X AC X +AC f vAC q <AC  \AC z $|AC G FAC E|  AC E  AC E  jAC E` 0@AC Ev  P_AC EU tlAC g kAC f qAC l AC z _AC Z Y\C Y 4T\C Y Tm\C Y tb\C Y b\C Y  dAC EZ @JC Y j\C Y C Y 8KfC Y XFJC Y x`AC [ tJC Y ;JC Y QAC L ;OC Y  AC  8 AC  X AC [ x #AC ^  AC Ey  AC Ey  iAC d  EAC @  ZUC @ @ ?AC z ` AC   LAC G  AC E  AC E ( VnC L V A   gAC E] 8 AC  X ZAC U x (AC c  >AC y  AC   AC E  ?AC Ln  AC E  D AC E  h SAC EI  IAC E  AC G  YAC EO  gAC b  cAC ^ 4 AC ~  T TAC EJ  x bAC EX  AC E  AC   >AC L-  AC L  (VAC EL L6AC El lHAC E~ PAC K /dC F (YTC t L A  OAC EE  AC E @2AC Eh `&OC R  TAC EJ  AC E  `AC EV >AC y  AC E 0AC T PpAC k  p\AC ER $=AC G1 (AC Xf  AC L ( AC X  8AC E $\AC G  AC L  ]AC X .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.rodata.cst16.comment.note.GNU-stack.rela.eh_frame @:3&$;,$;12$;@2;TPT OP\8m(i`mw0pmmm  Xx   0$D6=ZsCs) '/J<. .&>E 2`R0{Tf<+g$K .WQh@uk+BZ'').$;4:cCQh+<vu  F2  / jR @i0 _x l  k@fq4MV_^wYTbmb41bI bdy@@7j)KB [Fr0``t;/?Q@Y;oW w# 4 `M g  i   E  NZ ? % @ Y qLh {  ` (V ~g    + mZH @a (z > @ - `   i ?  / `H ?!b { !S )"I r"  t#Y  #g  4 4$cG @` S y %  &T n&b  & @['F 7(>M0fQ)~)V7*6m*H*P`+/ 4+Y6+OPi,zy-2-&-T%.`/`.Gh/>Z s/00p1\  P`p 83Qj.667@389      # ) / 5  ;F Q_jx(7AP[fwn1= :]*;L_plj_opt_fold.cfold_kfold_ldexpfold_kfold_bnotfold_kfold_intcomp0fold_kfold_add_krightfold_kfold_conv_kint_extfold_kfold_kreffold_shortcut_roundfold_shortcut_leftfold_shortcut_dropleftfold_shortcut_leftleftfold_simplify_numadd_negxfold_simplify_numadd_xnegfold_simplify_numsub_xnegfold_simplify_nummuldiv_negnegfold_shortcut_conv_num_intfold_simplify_conv_int_numfold_simplify_conv_i64_numfold_simplify_conv_int_i64fold_simplify_conv_flt_numfold_simplify_floor_convfold_simplify_intadd_kfold_simplify_intmul_kfold_simplify_intmod_kleftfold_simplify_intsubadd_leftcancelfold_simplify_intsubsub_rightcancelfold_simplify_intsubaddadd_cancelfold_simplify_shift_andkfold_reassoc_dupfold_reassoc_bxorfold_reassoc_minmax_leftfold_reassoc_minmax_rightfold_abc_invarfold_comm_swapfold_comm_equalfold_comm_compfold_comm_dupfold_barrier_tnew_tdupfold_fload_cdata_ptr_int64_cnewfold_fload_cdata_typeid_cnewfold_fload_str_len_snewfold_abc_kfold_abc_fwdfold_cse_convfold_barrier_tabfold_simplify_shift_ikfold_simplify_intsubadd_rightcancelfold_simplify_intsubsub_leftcancelfold_simplify_intsub_kfold_fwd_sload__PRETTY_FUNCTION__.6498fold_fload_cdata_typeid_kgc__PRETTY_FUNCTION__.6482fold_fload_str_len_kgc__PRETTY_FUNCTION__.6475fold_cse_uref__PRETTY_FUNCTION__.6438fold_kfold_hload_kkptr__PRETTY_FUNCTION__.6432kfold_int64arith__PRETTY_FUNCTION__.5948fold_simplify_shift2_ki__PRETTY_FUNCTION__.6313fold_simplify_shift1_ki__PRETTY_FUNCTION__.6308fold_simplify_bxor_k__PRETTY_FUNCTION__.6292fold_simplify_bor_k__PRETTY_FUNCTION__.6287fold_simplify_band_k__PRETTY_FUNCTION__.6282fold_simplify_intmod_k__PRETTY_FUNCTION__.6256fold_simplify_intadd_k64__PRETTY_FUNCTION__.6235fold_simplify_intsub_kleft__PRETTY_FUNCTION__.6231fold_simplify_conv_sext__PRETTY_FUNCTION__.6195fold_simplify_tobit_conv__PRETTY_FUNCTION__.6184fold_simplify_numsub_k__PRETTY_FUNCTION__.6126fold_kfold_conv_knum_u32_num__PRETTY_FUNCTION__.6079fold_kfold_conv_knum_int_num__PRETTY_FUNCTION__.6074fold_kfold_conv_kint64_int_i64__PRETTY_FUNCTION__.6069fold_kfold_tobit__PRETTY_FUNCTION__.6044fold_kfold_int64comp0__PRETTY_FUNCTION__.5998fold_kfold_int64comp__PRETTY_FUNCTION__.5984fold_kfold_intcomp__PRETTY_FUNCTION__.5931fold_kfold_conv_kint_numfold_kfold_conv_kintu32_numfold_simplify_nummuldiv_negk__PRETTY_FUNCTION__.6144fold_simplify_numsub_negk__PRETTY_FUNCTION__.6130fold_kfold_conv_kint64_num_u64__PRETTY_FUNCTION__.6065fold_kfold_conv_kint64_num_i64__PRETTY_FUNCTION__.6061kfold_xloadfold_xload_kptr__PRETTY_FUNCTION__.6503fold_fload_cdata_int64_kgc__PRETTY_FUNCTION__.6487fold_comm_bxorfold_reassoc_shiftfold_reassoc_intarith_k64__PRETTY_FUNCTION__.6333fold_simplify_intsubfold_simplify_intsub_k64__PRETTY_FUNCTION__.6240fold_kfold_conv_knum_u64_num__PRETTY_FUNCTION__.6087fold_kfold_conv_knum_i64_num__PRETTY_FUNCTION__.6083fold_kfold_conv_kint_i64fold_kfold_bnot64__PRETTY_FUNCTION__.5975fold_kfold_int64shift__PRETTY_FUNCTION__.5963fold_kfold_int64arith__PRETTY_FUNCTION__.5952fold_fload_tab_ahfold_fload_tab_tdup_hmask__PRETTY_FUNCTION__.6467fold_fload_tab_tdup_asize__PRETTY_FUNCTION__.6463fold_fload_tab_tnew_hmaskfold_fload_tab_tnew_asizefold_fwd_href_tdup__PRETTY_FUNCTION__.6453fold_fwd_href_tnew__PRETTY_FUNCTION__.6448fold_kfold_add_kptr__PRETTY_FUNCTION__.6035fold_kfold_add_kgc__PRETTY_FUNCTION__.6028__PRETTY_FUNCTION__.5632fold_kfold_strref__PRETTY_FUNCTION__.6011fold_kfold_intovarithfold_kfold_numpow__PRETTY_FUNCTION__.5872fold_kfold_numarith__PRETTY_FUNCTION__.5856kfold_intop__PRETTY_FUNCTION__.5901fold_reassoc_minmax_k__PRETTY_FUNCTION__.6351fold_reassoc_intarith_kfold_simplify_andk_shiftkfold_kfold_intarithsimplify_intmul_kfold_simplify_intmul_k64__PRETTY_FUNCTION__.6251fold_simplify_intmul_k32fold_narrow_convert__PRETTY_FUNCTION__.6218fold_simplify_nummuldiv_k__PRETTY_FUNCTION__.6138fold_kfold_strto__PRETTY_FUNCTION__.6099fold_kfold_tostr_kintfold_kfold_snew_emptyfold_kfold_tostr_knum__PRETTY_FUNCTION__.6091fold_kfold_strcmp__PRETTY_FUNCTION__.6022fold_kfold_snew_kptr__PRETTY_FUNCTION__.6003fold_kfold_bswap64__PRETTY_FUNCTION__.5979fold_kfold_int64arith2__PRETTY_FUNCTION__.5957fold_kfold_bswapfold_kfold_numcomp__PRETTY_FUNCTION__.5878fold_kfold_fpmath__PRETTY_FUNCTION__.5866fold_hashfold_func__PRETTY_FUNCTION__.6519fold_merge_eqne_snew_kgc__PRETTY_FUNCTION__.6422fold_simplify_shiftk_andkfold_simplify_conv_narrowfold_simplify_numpow_kx__PRETTY_FUNCTION__.6164fold_simplify_numpow_xkfold_kfold_strref_snew__PRETTY_FUNCTION__.6017.LC25.LC26.LC28.LC40.LC41.LC42lj_ir_emitlj_opt_cselj_ir_growtoplj_ir_kint__assert_faillj_ir_knum_u64lj_ir_kint64lj_opt_fwd_tptrlj_ir_kvaluelj_tab_getlj_opt_fwd_href_nokeylj_ir_kptr_lj_vm_foldarithlj_vm_modilj_opt_narrow_convertlj_ir_k64lj_strscan_numlj_str_fromintlj_ir_kgclj_str_fromnumlj_str_cmplj_str_newlj_carith_divi64lj_carith_modi64lj_carith_powi64lj_carith_divu64lj_carith_modu64lj_carith_powu64lj_ir_numcmplj_vm_foldfpmlj_opt_foldlj_ir_modelj_trace_errlj_opt_cselimlj_opt_fwd_aloadlj_opt_fwd_hloadlj_opt_fwd_uloadlj_opt_fwd_tab_lenlj_opt_fwd_hrefklj_opt_fwd_floadlj_opt_fwd_xloadlj_opt_dse_ahstorelj_opt_dse_ustorelj_opt_dse_fstorelj_opt_dse_xstore   '   ; h   F W p Bz 5 6  B  5 6(  B  5 6P  B@ 5! 6(&7 B@A 5F 68K B 5 6( B 5 6  B 5 6+ B5 5: 6h?L BV 5[ 6`u B 5 6 B 5 6  B 5 68 7 BA 5F 6Kg B B 5 5 B 5 6X. B8 5= 6XB B 5 6 B 5 6Q B [ 5` 6e B@ 5 5 B 5 6W Ba 5f 6 kT B^ 5c 68 h B  5 6p  B 5 6 > B`H 5M 6 R` B`j 5o 6 t B 5 6  B 5! 6 &Q B[ 5` 6 es B 5 6 B 5 6X B 5 6"B BX B 5 5 B= BG 5L 5Qq B` 5 6 J BT 5Y 6 ^p B 5 6  B% 5* 6 /Hl Bt B 5 6 B 5  6(# B- 52 6 7TPp B` 5 6_ B 5 6 B  5 6  B  5$ 6 );Pg{ B@ 5 6  B@ 5 6  B@  5 6X'@ B`J 5O 6XT~ B8 B` 5 5 B 5 6 1 B; 5@ 6XE ^ }     B` 5 6 ! B`! 5! 68 !\!z! B! 5! 6 !! B! 5! 6` !!F""" B" 5" 68"" B" 5" 6 "" B" 5" 6 ##*#<# BF# 5K# 68P#`### B# 5# 68### B # 5# 6#$ B $ 5$ 6$.$B$ B@L$ 5Q$ 6V$j$ B@t$ 5y$ 6~$$ B@$ 5$ 5$$ BS$ 5/$ 5:$% BS(% 5/-% 5:2%%%% B% 5% 6(%% B% 5% 6%% B% 5% 6&&A&& B& 5& 6 &&&& B@& 5& 6 &' B@' 5!' 6 &'?'P'p' B`'' BF( 5( 5 (a( B0k( 5p( 6 u(((7))** B`* 5* 6**`+ Bj+ 5o+ 6t+y++ B+ 5+ 6 +++,,,,, B, 5- 6(-- B!- 5&- 6(+-4-K- BT- 5Y- 5R^-j----- B- 5- 6 - ..c. B`m. 5r. 6 w.. B`. 5. 6.. B`. 5. 68.. B`. 5. 6p..*/ B4/ 59/ 6>/M/]/{/ B / 5/ 6X/// B/ 5/ 6X// B/ 50 60,0:0D0Y0g0s0~00 B0 50 6 00 B0 50 6 0 1(1 B 21 571 6 <1R1c11 11 1 2 22 B2 B3 B`3g3{33 B3 53 5m33 B3 53 633 B4 5 4 64(4 B24 574 6<4w4 B4 54 6444B5s55566*7N77 B@7 57 6 7778d8888$9T9z99: B": 5': 5},:S:: (08@kHqPyXF`Rh\pfxr~(1<<1pz (08@HPX`'h'p'x'''''t'|'''''''''''`&hp1xn&07*& 0$/-h//-%9%.4$ #(60?8W@wHsPX `hpx0m-y-,/J+38 7( 0R8@H<PXg`h6pu x4+ 7~+*( h 1b2 (08.6@)HQ)PX`hp(xZ<:q3ft#r")" !(?!0 8i @ HP X`hpx0   @ `$6s @/`J R @`<g h@`Z @`: <@`u   2   4 T0 x  fV8Xbx17<\|0? < \ W| w     $ ND d  q   ( ~< \ m|   -  i $  H ?!l ! )" r" t# # 4$8 %X &| n& & [' (Q),)P7*pm**+4++ ,Dy-d--%./h//40T0t1n13.66<7`389:lj_opt_narrow.o/1378727469 1000 1000 100664 14216 ` ELF>@@ UHLϰI@fA9puD@A9r A1AtHHuθ]UHD8 DLǰAAD8 fApfAP AH ]UHH]LeLmLuH HAAH?HGL,AEPˀv<7C%=usA)HtD`YAAcOHCH9CsEAuDHpAuDH`HCAU AD HHCHCD HHCH]LeLmLuUH,*ȸf.zt] t1UH~vl]fUHAWAVAUATSHIAL/IuL4EFAUAFfG%=wRA6THGAHHGA|$ }ID$HID$_AAD$u;H,H*f.IT$BHIT$, 9*f.ID$pHID$A@AE@9sgH9uR@Vt2HA3L$u;AD"HEAA9|ID$HID$QP9rA(AAT$%= u EOÉẺLGHtIT$@HIT$A|$ u:n"uL Ht%IT$@BHIT$AAcaMl$M;l$sUA6DL~EAvDLkEA;D$$IT$ANA L$ ˉHIT$AMl$ID$HID$  A>fH[A\A]A^A_]UHH]LeLmLuL}HPIUȉMDLwDMfAfEvfALA$ILfuYL;xspAD$fALJUfAfALJ LAD$LKfuYL9wtuHcsHLsHLA$IL;szIT$H u:L9uAT$fxIO с@y  fDžAL$AT$ffAfAfALAD$LLfEtALLH9HI9tHh[A\A]A^A_]UHvu fLJUffLJn"fHOHrDFAwMDBfExBEF A@x1@փ fffD]UHSHH%=u fLJXffLJƉ%=u#fǃUffǃnH/v Hs7HH[]UHATSI%=u"fLJXfA$fLJÉ%=u9H8CLfADŽ$VfA$fA$L1v Ls6L[A\]UHv%=u fLJUffLJ 7z]UHH]LeLmLuL}H@HAAHMMEΉ%=uRfLJXffLJAHEȃxt HEȋ8HD%=uPfǃXfDfǃHAAtA?LAF؃DDA~AvJAHEȁxvJHExt2AF % ffDfDHD%=t%fǃUfDfǃHAD%=t%fǃUfDfǃHAAAfDfDfDHH]LeLmLuL}UHH]LeLmH HAIՉ%=uMfLJXffLJAA}t A}LDA}vBA,E=t/Hfǃ6ffDH]fǃUfDfǃHAHHHfǃ.fDfHH]LeLmUHH]LeLmLuH HAAĨyu9Hu H DwtDwcI$HtZHAfǃ fDfHfǃ,fDfDHDHADHADfǃ+fDfDHfǃ4ffǃHfǃ*ffDHfǃ)fDfHH]LeLmLuUHH]LeLmLuH0HAAI̓yu9Hu HA}vEMmLmE<lfEx]AHCHЀxtHxx2LmED,AA5AAADvYD%=u%fǃXfDfǃHAfǃUfDfǃn2HAEtcfEy]Hfǃ(fDfHAžHfǃfDfHfǃ-fDfDHA5fEx@AHCHЀxt[H?H9DHAfxcHCHЀxt^f.z)u'fǃ4fDfǃHAyfǃ4fDfǃHfǃ*ffDHfǃ4ffǃHAAHCHDH]LeLmLuUHH]LeLmLuH H~wDn Aw DvAvuI?HsL&HsL AvJCAvJf(XKf.rf. f. <҃H]LeLmLulj_opt_narrow.c(((o)->it) < 0xfffeffffu)sp >= nc->stack+1next < lastsp >= nc->stack+2sp == nc->stack+1(((vb)->it) == (~4u))(((vc)->it) == (~4u))lj_obj.h(((vc)->it) < 0xfffeffffu)((((((tr))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM)))((&J->cur.ir[(((IRRef1)(rb)))]))->o == IR_KNUM((&J->cur.ir[(((IRRef1)(rc)))]))->o == IR_KNUM(((&tv[FORL_IDX])->it) <= 0xfffeffffu) && (((&tv[FORL_STOP])->it) <= 0xfffeffffu) && (((&tv[FORL_STEP])->it) <= 0xfffeffffu)narrow_conv_emitlj_opt_narrow_indexlj_opt_narrow_cindexlj_opt_narrow_arithnumberVnumlj_opt_narrow_unmnumberVintlj_opt_narrow_powlj_opt_narrow_forlnarrow_forl?AGCC: (Debian 4.7.3-4) 4.7.3zRx BAC } <5AC p $\AC T  AC [ (DJC m F A (AC M (UAC X8 ((AC P TAC   tAC E  AC C lAC g (eAC XH $WAC PB $0AC Tv $X8AC T (6AC T .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @(P &X,X12X@2-OPW0 d0Pmmp}5  ! %B B5/wG] P}D\ uU @`t / Ha  z )  7 .= lR\ efuW86lj_opt_narrow.cnarrow_bpc_getnarrow_bpc_setnarrow_stripov_backpropnumisintnarrow_forl__PRETTY_FUNCTION__.4579narrow_conv_backpropnarrow_stripov__PRETTY_FUNCTION__.4498__PRETTY_FUNCTION__.4524__PRETTY_FUNCTION__.4537__PRETTY_FUNCTION__.4549__PRETTY_FUNCTION__.3444__PRETTY_FUNCTION__.4555__PRETTY_FUNCTION__.3440__PRETTY_FUNCTION__.4570__PRETTY_FUNCTION__.4584.LC13.LC15.LC16.LC17__assert_faillj_opt_foldlj_opt_narrow_convertlj_ir_emitlj_ir_kint64lj_ir_kintlj_opt_narrow_indexlj_opt_narrow_tointlj_trace_errlj_opt_narrow_tobitlj_ir_knum_u64lj_opt_narrow_cindexlj_opt_narrow_arithlj_strscan_numlj_vm_foldarithlj_opt_narrow_unmlj_ir_k64lj_opt_narrow_modlj_ir_tonumlj_opt_narrow_powlj_opt_narrow_forl   !" "$   *! "A K P <U!n%&   H!G "  Z !   !( " " " " )m " + " ) @   !E " " ` l ! . "' `1 6 ; !F . t  ! t  ! /"H"|"""  $ )!5.Y c h m!&""1"H.Y)&""330"Q"q"".)   !B L Q PV!""&8"H&h""   P!3    !H"o""" ( - 2! t  ! t  ! @B`w]},)X x 7  \ 4\lj_opt_dce.o/ 1378727469 1000 1000 100664 1800 ` ELF>@@ UHHxHW@HHH^uWHGHH t߈HHHpHJpLcED!_-HcHpf1@@ f@ff@,fv HwL @f=v HOL PUHtfGtYLAHG LHW(Lpt%Av HOL H9wIM9u]GCC: (Debian 4.7.3-4) 4.7.3zRx AC  <uAC p .symtab.strtab.shstrtab.rela.text.data.bss.comment.note.GNU-stack.rela.eh_frame @e &,10:OXJ0  Y  2'ulj_opt_dce.cdce_propagatelj_ir_modelj_opt_dcet @lj_opt_loop.o/ 1378727469 1000 1000 100664 6088 ` ELF> @@ UHAWAVAUATSHI֋B!@v1@J?v LfMPR11˃w!փu:!փw+fAdžUfAfAdžL%Eu0w+fAdžUfAfAdžn2L% LH(fBD9IVH*=tlzUuf9it) < 0xfffeffffu)*psentinel == J->cur.snapmap[J->cur.snap[0].nent]J->cur.nsnapmap <= J->sizesnapmapnumberVintloop_unrollGCC: (Debian 4.7.3-4) 4.7.3zRx (K AC P6 (HtAC T[ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @  & , 12 1@28 ZO W0 ` u pp0 8 xp K  3   L[fxK tlj_opt_loop.ccploop_opt__PRETTY_FUNCTION__.4911__PRETTY_FUNCTION__.3440lj_str_needbuflj_ir_emitlj_snap_grow_buf_lj_snap_grow_map___assert_faillj_ir_modelj_opt_foldlj_trace_errlj_opt_looplj_vm_cpcalllj_ir_rollbacklj_err_throw3o     [D|   8 y     C   LK lj_opt_split.o/ 1378727469 1000 1000 100664 928 ` ELF>@@ GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.comment.note.GNU-stack@!@'@,0@5]]E lj_opt_split.clj_opt_sink.o/ 1378727469 1000 1000 100664 7640 ` ELF> @@ UHHHfzxFJA<w HA<v>t (u!HPNHC]UHH]LeHIHGHC@u@3fv¸u#sfvLH]LeøvTHOH@@uxUufxuD@t fFø;sUH6]UHAVAUATSH%=u }uDSHC HDHS(H<pt$v HKL H9wSHCL$AD$ $LHHt.@ u(LH)HH=AOffAD$fAD$A$HCD u fAD$Ad$fAD$sAD$ uAD$fAD$CZSAD$fAD$AAT$HCH@ u@N<w fAD$fAD$Ad$fAD$IM9[A\A]A^]GCC: (Debian 4.7.3-4) 4.7.3zRx cAC ^  <rAC La `cNC P (AC G .symtab.strtab.shstrtab.rela.text.data.bss.rela.rodata.comment.note.GNU-stack.rela.eh_frame @0 &8,868x1h >0 G \ Wx` x f`8  Eccr+c 98lj_opt_sink.csink_checkallocsink_phidepsink_checkphilj_opt_sink  ; (08@HPX`hpx (08@HPX`hpx#### p(08@HPX`hpx (08@HPX`hpxB (08@HPXo`ohopo @cd8lj_mcode.o/ 1378727469 1000 1000 100664 4144 ` ELF>@@ UHHH]UHAWAVAUATSH(IHh HEHc(H HHfHELuI)H}LDA IHH+UHUHMHHMIFL9AA"HLHuMLHHH9wntjHMHH?vHMH)H?wJIh I ADžd HIp HPIx HUHIh HXI htHHLAimNA90AAAxAEIH?wALuALH([A\A]A^A_]UH]UHH]LeHHA9d tH Hh DDd H]LeUH]UHATSIHh HLJh HLJ HtHHVLHHu[A\]UHH]LeHHIHh uu 1@@ UHWHGHЀzu*J9w  IIL Hzt]UHDGAHOJ<u!DA9uDGA9wGHt]UHtDDA9u" H9u%HLL9uи]UHJA<vJt Ku.HOHP8wHHH9]UHH]LeLmLuL}H`IUHMM͋]DHGL$AD$Aw3AD$<w A$ L\E$$LeHE,IHUDHt D‹utAI AL$B`AHUHEtbuA|$Uu fA|$tE$$MHMULLA*EAE%w IǀIǍSv#tt+uAE3u HIE%uAEfAESvǃuH]LeLmLuL}UHH]LeLmLuL}HPH}II։MDHFHD{CAwH`HHuMLDHtDʋuLAAǍHwA*HEIAuHHUHAuHHMHAweAHMuvHUB tM{Uuf{tlD HMH $MMLLH}U%AA׍JwA*ƀHEAuAHUsAuIƀHMHZAvIƀHMufvHEPH]LeLmLuL}UHF<w_$V)Y6PV6C5'x]UHH]LeLmH IDDHFL,Aw LL>kAE=tWI҉DIAtLLuADHUD;AD$N<vE $E;NrLEMLLH}EL$E;NrLEMLLH}EA|$Q"Ml$L9m H]H]A}uqAEu EEEJ49u&DvH4L+DLA LAAT$8Ew@A$HuHFHP@fA|fAfALAT$fAfAfELADKLEMHUHuLuvSHuHFHЀxUufxt!DLEMHUHuLfALJUfAfALJLSfAfEfAL6{Tu0HEȀxPu&fALJTfALJfALJLHI9DuLmAD9uAIIHMQ)AL}fALJfALJfALJLc%DD AAEAIIHuV)ALHh[A\A]A^A_]UHAWAVAUATSHIHuT EP t;<rH0D4IV EHHhHHPXˉMIF(HPH HMHHAvHH9uAV HPWHHXuL@HEHEHH8H@IW`HxHJ0HHH@HPHxHFHPWH ЋV H9rzPzt(RRHHxHQHPw@xt)@@)HxHxHBHHHM@E}!HEHuHHpH}HEUHML$DIVDL,A}bH}D9uxHD9uvHUHI$H PmA$J9u RHxA@(?HpHunfxtDKHEH$LEMHULL }tEHUBR@HzuHI`HuI`HUHuDKH$LEMHULLHI9TL$$LEMHULLzt2E}tHXHHXAD$ID$HxHFHE}9}H8H9XtLH@< w/H t HPBHMHHxHFCHxHGPztTRRHHxHBH@H[A\A]A^A_]lj_snap.clj_ir.h!1 || t != IRT_LIGHTUDt <= IRT_NUM0(o)->gch.gct == ~(~5u)op == BC_CATn < snap->nents != 0lj_obj.hlj_ctype.hid > 0 && id < cts->toplj_cdata.hsz == 4 || sz == 8irk->op2 == IRFL_TAB_META(((&tmp)->it) == (~11u))map + nent == flinkssz == 8 && ir->o == IR_CONV && ir->op2 == ((IRT_NUM<<5)|IRT_INT)sz == 1 || sz == 2 || sz == 4 || sz == 8!((uint32_t)((IRType)((t).irt & IRT_TYPE)) <= IRT_TRUE)ir->o == IR_CONV && ir->op2 == ((IRT_NUM<<5)|IRT_INT)pc >= ((BCIns *)((char *)(J->pt) + sizeof(GCproto))) && pc < ((BCIns *)((char *)(J->pt) + sizeof(GCproto))) + J->pt->sizebc(((&(((GCobj *)(uintptr_t)((frame)->fr.func).gcptr32))->fn))->c.ffid == 0)!((((frame)->fr.tp.ftsz) & 3) == FRAME_C)f == (MSize)(1 + J->framedepth)(((rs) & ~((0x7f) + ((0) << 8))) != ((0x80) + ((0) << 8)))ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW || ir->o == IR_CNEWIirc->o == IR_CONV && irc->op2 == ((IRT_NUM<<5)|IRT_INT)(J->parent)>0 && (MSize)(J->parent)sizetrace(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))irs->o == IR_XSTORE && T->ir[irs->op1].o == IR_ADDiro->o == IR_KINT || iro->o == IR_KINT64p >= (uint8_t *)((void *)((cd)+1)) && p + szs <= (uint8_t *)((void *)((cd)+1)) + sz((&T->ir[ir->op1]))->o == IR_KGC((((((&T->ir[ir->op1]))->o == IR_KGC) ? (void) (0) : __assert_fail ("((&T->ir[ir->op1]))->o == IR_KGC", "lj_snap.c", 757, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((&T->ir[ir->op1]))->gcr).gcptr32))))->gch.gct == ~(~11u)irs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTOREsnapshot_framelinkssnap_usedeflj_snap_regspmaplj_snap_replaysnap_replay_constlj_snap_restorecopyTVsnap_unsinkctype_checklj_cdata_newsetgcVsnap_restoredatasnap_restorevalirt_toitype_GCC: (Debian 4.7.3-4) 4.7.3zRx IAC D <?AC z \SAC N |NAC I (AC X (AC Xc AC  $AC P $<OAC GC  dOAC EE  XAC CP (VAC MD  ]AC JN (AC P (('AC M (T8AC M& ( AC P .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @#?@&#,#12#@2$T-OPS\0.e.z.uU X15" ;_ II?,S7NH)YPrp O '@Yr # / <    )5AHS Oer~m X V]x'8 "0>ITlj_snap.csnap_renamefiltersnap_renamerefsnap_dedupsnap_sunk_store2snap_restoredata__PRETTY_FUNCTION__.5327snap_restoreval__PRETTY_FUNCTION__.5311__PRETTY_FUNCTION__.3906snap_replay_const__PRETTY_FUNCTION__.5196snap_prefsnap_usedef__PRETTY_FUNCTION__.5066__PRETTY_FUNCTION__.5039__PRETTY_FUNCTION__.5185__PRETTY_FUNCTION__.5248__PRETTY_FUNCTION__.5367__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5337__PRETTY_FUNCTION__.4866__PRETTY_FUNCTION__.4968__PRETTY_FUNCTION__.3380__assert_faillj_ir_kvaluelj_ir_kintlj_ir_kgclj_ir_k64lj_ir_kptr_lj_opt_foldmemsetlj_bc_modelj_snap_grow_buf_lj_trace_errlj_mem_growlj_snap_grow_map_lj_mem_realloclj_snap_addlj_ir_emitlj_snap_purgelj_snap_shrinklj_snap_regspmaplj_snap_replaylj_ir_kslotlj_snap_restorelj_state_growstacklj_ctype_sizelj_mem_newgcolj_tab_newlj_tab_duplj_tab_set* P4 9 >" P  H"d# p   x"- 7 < A"K U Z )_" p  "> G L Q"[ e j )o" $%&&'    6"()* 4 9 8>"   " * @    O"  ": ,W - /H 1q + .  h "    h"m w | "   "    \"}   "   k"1   H", 6 ; @"i((p6((= G L Q"(((@0p10 ) . 3"/ 9 > C"r |  "8  r X"   H" 9) #3 {8 ="s #} { " /  ": # { "N <X r] b"   "k u z "   ("   X! "e ;   "   " < <! r ! !"! ! ! !"! ! ! !"! " " "";"#L"=" " # #"b# l# q# v#" (08@HPm X`m hm pm xm m  h @I`)@h m  x,Xlj_record.o/ 1378727478 1000 1000 100664 68232 ` ELF>@@UHG]UH9vHGh]UHH]LeHHAEfffMcHBH]LeUHAȃ AAu#tuAAEAADY]UHH]LeLmH HLcHG`H@BD=v]tZAAfA EfffLJAwDD)HB9f EfffǃHH]LeLmHxt@UH僿t:]HHЋuUHt1DBBHGhHT HHGhÃHGhUHSHHfu-HG @;Gu fLJ fLJfLJHH[]UHHGxp@%t @=v 9vH9w鉷]UHATSILJ@wfWRGP9u*u@GTftfGRA$A$thAwIIT$HʀzEuBu1fADŽ$UfA$fADŽ$LAuLAƄ$AƄ$[A\]UH僿P H9H u1u!u WPf~tRH9tǰH9u*ǶffǴvy HH@uktt W)ƒwy G4t0Gy]UH僿P u tCLJHH H9Ghu uWP ]UHH]LeLmLuL}H0HA􋇈%=DHwDHƀx(u#xfx+DDH DAADAA< 9/@"D @uxEt!H{`0H)HGHDxvBMc,HLH9Eu @ ,@ fǃ(ffDH%AEfǃ fDfHE t> ftHSHcIyCfǃ fDfDH fǃ fDfHH]LeLmLuL}L_xMS@LFM9yUHATSHADDfu94If%9fLEaٸA/M9s+A)%A)%AH]LeLmLuL}UHH]LeLmLuL}HPHIIՉMȋAĉHW`HRHHUHHUHD4EtDEE}t HuEAT$A0MLHEAT$A0MLHEH}H|AIvUAUAE UfAUUfAUDMDEċM‹uHDLHfAEEu>  UDHoAƃ}u:L}LÈ(ffDEfHAAAT$HD4fEuADH]LeLmLuL}UHAUATSHHHG`H@HytQDjEEHHJH BA9vHA9wAD$H[A\A]]UHNAtLWHG HD@HcHG(LƉ4Ƈ;s]UHAWAVAUATSHHHIUAH`HWL$HL4}t}Af9< uMD ʉM@ MB Ҁ(fffHAAF HUHoEȉEUĉULA%E=uLHELuHEHMHM9uuDH$HUv)t)u'fǃXffǃHHM}u?HUvffǃUffǃn2HHM=HUt'fǃUffǃHHMHEHEH}AAF AFEI|$*AEFM‹uHA|$ vJAD$EA|$vJA $MA|$vJAD$E}tMXMI|$ct;Ef.EEXXEEf.EAEAMf.MEXXEMf.AEAHAMUʀ ffEfHEuDAEIHChcADILkhNEEAGIEHChA_DAEIHCh>ƃDHH[A\A]A^A_]UHSHHHG`HPHBRDBDHWxR%DɃ~@PuRHH) HcH)ЋRI9׃uHChH;H uL;$HHChDEuSPHfbSPHSO9 }Gt6HHShHimNA90?fS HH[]UHSHHHH[]UHH]LeLmLuL}H@IALHAEEDf ẼGẺEDPF9Etou3}u-fALJUfAfALJLú:uh}ubfALJUfEfALJLAċUUAf ʀ fAfAfELADH]LeLmLuL}UHNAv#v\ѸEFw :Qw-t щ )6]UHAWAVAUATSHHAAHGpDdkAA|$yAT$BBZRBЋdH9tq9rHHuK%t9w( %ft9wHHHtƒyP f,fEyUHCxx%_w`HspHEfǃfDfHHÚPD}At$HyAAD$I>1)1)A A|$AT$HC`p$H9rxp H9sp҉H+PH4HxV)Eu"HcHHHcHD,;fǃfA$fADŽ$LþLfADŽ$JfA$fA$L1H([A\A]A^A_]UHH]LeLmLuL}HHIA֋N0%= uK~t)DhfLJ CffLJEA= ~t,DzDjExAu1AT$0fǃffHUfLJCffLJ |DHfǃ|ffHEBhLHPtt HHs`HIL$Jv=AL$y9uIVR(tPt!w A 0HAD$@Ml$ AD$<VfLJ CffLJ EhN#vtэQDhMuAD$<=  LHEAD$AD$< HUfǃffHH]LeLmLuL}UHAWAVAUATSHhI|IAHG`H@JHpILMHx0IB< u|LLHII9}AEIM`HpHHEH Pv;Ur9uRA@(t HuLtE%=t LIM~LATAHuEAHEHpAHpztoHp0~FL`x_vzfADžCfAfADžL|IT$@LfADž|fAfALLLA2LAfADžfAfALAE&EHh[A\A]A^A_]UHATSHAHC`H@@ƒu9y H)HH)AHHEJ4H;~ H[A\]UHH]LeHHAAD$HHADH]LeUHATSHIHEHH Hs`HvHAt$@1At$8qAt$4qH{`IL$H H qv=2DFD9uvOI(@tH{`IL$HJH qv>rDFD9uvOI(@tH{`IL$HJH qv;Rr9uJWR(tH[A\]UHH]LeLmLuH IHAAC8 u]C0IL$`HCHH Pr9uRA@(C4 tC0IL$`HCHH Pv:r9uRA@(tDHLDHLcH]LeLmLuUHAWAVAUATSHIHA׾JẺI$L4IT$`HRL,‹C0AFC4AFIL$`HIEH PvAu8fAdžUfEfAdžLAL諸D au.Au(fAdžUfAfAdžLAULND AuA(DD D}vJM}vJEAAuq}vJM}vJDE*AA}tu}t}DDDDDLAǾLúEEIN`HUHUH Bv;Ep9uPA@(tHEHHD AAEADHuLu(IV`HMH0H A0p9uHB@(tE[MIH9MEfAdž CfAfAdžLUfAdžfAfALucMIH9MEfAdž CfAfAdž LUfAdžfAfALMMHMHMHv;Mq9uIB@(tDHuLt:LH0U(Lu HuLMEEEUUEIF`HUHUH JvAuAA~A9u~pv(@tH}H}H wv>uDFD9u~pv(@tHuHuv;Mq9uQ@@(t ʀD fAfEfAL D1IvhL跾0EAA t%= uDHuLfD xA t A L臲HMHLEDLtA t1A t((1IvhLxoEEIN`HUHUH Bv;Ep9uPA@(tHuLDmIV`HMH0H Af0p9uHB@(tE-MIH9MEfAdž CfAfAdžLUfAdžfAfALucMIH9MEfAdž CfAfAdž LUfAdžfAfALMMHMHMHv;Mq9uIB@(tHuL[LEH0UDL:DHuL&(8¸EHFA;Aہ%=u+fAdžCfAfAdžL= uھLd`IN`HUH0H Bv>0p9uPA@(tH0LL貹IH Iv`HvH֋p1MF`HHH:H wv>2DND9u~Apv(@tYMF`H}HzH wv?rDND9u~Apv(@tABLLv%=uHUL]IN`HUHUH Bv;Ep9uPA@(tHuL9]DmIF`HUHUH JvAuAA~A9u~pv(@tH}H}H wv>uDFD9u~pv(@tHuHuv;Mq9uQ@@(tADA݉ f DvD%=uAv%=u#DHLEHMDLHuLDA݉DvD%=u6v%=uHMDLMHuL5DvD%=u@v%=u"DLHMډLHuL,E;AWILDIAD9sA;`CAQHIVxJHH9svR4 L LQDL=IFp@IN`EEx uPA@(tL|fAdž CfAfAdžLEEdHuLP*ELEEdHuL % =DfAdžNfAfALHIVxJHH9sR4~ t LfAdžOfAfAdžLVIEN,AwuLLAEIAWL,AwuL$AEIAWL,AwuLAEIV`HBJHpH0H Nv:y9uIRR(tIv`HHHHH Qv;Pz9uJVR(tIN`HPHPH rv;@p9uPA@(tHDL IF`HXH+XHD)HDL IF`HXH+XHD)HDLx EIIFx@IF`H@@+HcH(tAH(HI(IuAAIDLAH9~ C'AM DHHIIIIL H9}CtA1I<uHHL9uH fAdžEfAdžfAdžLDFDEAMH('L;(H(INH8CtLfAdžfAfALbaseslot == 1J->base[ra] != 0lj_obj.h(((o)->it) < 0xfffeffffu)lj_ctype.hid > 0 && id < cts->topval == 0J->baseslot > 1J->baseslot > cbase+10J->baseslot >= 1ix->idxchain != 0(((&ix->mobjv)->it) == (~8u))(((&ix->tabv)->it) == (~11u))hasmm!hasmm(((&ix->tabv)->it) == (~12u))(((functv)->it) == (~8u))nslots < 250((ir))->o == IR_KGC(J->slot[s+1] & 0x00010000)lj_obj_equal(tv, &tvk)J->framedepth == depthop1 == 0op1 >= nki < REF_BIASop2 == 0op2 >= nkir->prev >= nk(((tv)->it) < 0xfffeffffu)((((&ix.keyv))->it) == (~4u))((((&ix.valv))->it) == (~4u))J->base[dst+i] != 0(pt->flags & 0x02)(((IRType)((J->scev.t).irt & IRT_TYPE)) == IRT_INT) && ir->o == IR_SLOAD(uintptr_t)(((BCReg)((ins)>>16))) < (J->pt)->sizekn((BCOp)((*fori)&0xff)) == BC_FORI || ((BCOp)((*fori)&0xff)) == BC_JFORI(((&((GCobj *)(uintptr_t)((J->L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)((((((((tr[i])))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM))) || ((((((tr[i]))) & (IRT_TYPE<<24)) == ((IRT_STR)<<24))))(((&(((GCobj *)(uintptr_t)((frame - (cbase+1))->fr.func).gcptr32))->fn))->c.ffid == 0)((&J->cur.ir[(ptref)]))->o == IR_KGCcont == lj_cont_condf || cont == lj_cont_condt!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))((&J->cur.ir[(((IRRef1)(xref)))]))->o == IR_KPTR || ((&J->cur.ir[(((IRRef1)(xref)))]))->o == IR_KKPTR(((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC(((((((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(((IRRef1)(key)))])))->o == IR_KGC", "lj_record.c", 1147, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(((IRRef1)(key)))])))->gcr).gcptr32))))->gch.gct == ~(~4u)((((mo)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(((((ix->key)) & (IRT_TYPE<<24)) == ((IRT_CDATA)<<24)))J->baseslot >= 1 && J->baseslot < 250J->baseslot == 1 || (J->slot[J->baseslot-1] & 0x00010000)ref >= J->cur.nk && ref < J->cur.nins((IRType)(ir->t).irt) == ((IRType)((tr)>>24))(((((tr)) & (IRT_TYPE<<24)) == ((IRT_FUNC)<<24)))((((GCobj *)(uintptr_t)((tv)->fr.func).gcptr32)))->gch.gct == ~(~8u)((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)fn == ((((((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)) ? (void) (0) : __assert_fail ("((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail (\"((ir))->o == IR_KGC\", \"lj_record.c\", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~8u)", "lj_record.c", 102, __PRETTY_FUNCTION__)), (&((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_record.c", 102, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->fn)))s > delta ? (J->slot[s-delta] & 0x00010000) : (s == delta)(ir)->o == IR_KPTR || (ir)->o == IR_KKPTR((((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR) ? (void) (0) : __assert_fail ("(ir)->o == IR_KPTR || (ir)->o == IR_KKPTR", "lj_record.c", 106, __PRETTY_FUNCTION__)), (((void *)(void *)(uintptr_t)((ir)->ptr).ptr32))) == ((void *)(void *)(uintptr_t)(tv->gcr).gcptr32)((((((tr))>>24) & IRT_TYPE) - (TRef)(IRT_NUM) <= (TRef)(IRT_INT-IRT_NUM)))itype2irt(tv) == ((IRType)(((tr)>>24) & IRT_TYPE))(((tv)->it) < 0xfffeffffu) && ((tv)->n != (tv)->n)nk <= REF_BIAS && nins >= REF_BIAS && nins < 65536i >= REF_BIAS ? op1 < i : op1 > ii >= REF_BIAS ? op2 < i : op2 > ii >= REF_BIAS ? ir->prev < i : ir->prev > iir->o == IR_NOP || (&J->cur.ir[(ir->prev)])->o == ir->o(uintptr_t)(rc) < (J->pt)->sizekn(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc(((((uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc", "lj_record.c", 1738, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((J->pt)->k).ptr32)[(~(ptrdiff_t)rc)]).gcptr32))))->gch.gct == ~(~4u)(((((uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc) ? (void) (0) : __assert_fail ("(uintptr_t)(intptr_t)(~(ptrdiff_t)rc) >= (uintptr_t)-(intptr_t)(J->pt)->sizekgc", "lj_record.c", 1946, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((GCRef *)(void *)(uintptr_t)((J->pt)->k).ptr32)[(~(ptrdiff_t)rc)]).gcptr32))))->gch.gct == ~(~11u)((((J->L->base-1)->fr.tp.ftsz) & (3|4)) == FRAME_VARG)((BCOp)((pc[(ptrdiff_t)rc-0x8000])&0xff)) == BC_JFORL(rc)>0 && (MSize)(rc)sizetrace(lnk)>0 && (MSize)(lnk)sizetrace(J->parent)>0 && (MSize)(J->parent)sizetrace(J->cur.root)>0 && (MSize)(J->cur.root)sizetrace((BCOp)((pc[-1])&0xff)) == BC_ITERC((BCOp)((pc[-1])&0xff)) == BC_JMPcopyTVrec_call_setuplj_record_retcheck_downrec_unrolllj_record_mm_lookupsetgcVlj_record_idxrec_mm_preprec_idx_keynumberVintrec_idx_abcnommstrlj_record_insnumberVnumrec_check_slotsrec_check_irrec_mm_comp_cdatarec_upvaluectype_checkgetcurrfrec_vargrec_forrec_for_loopfind_kinitrec_iterlrec_func_jitrec_func_vararglj_record_setuprec_setup_rootP@GCC: (Debian 4.7.3-4) 4.7.3zRx AC I <AC Y  \ZAC LI OAC J $AC P MRC w WC Y  OAC EE ,`AC [  LAC C p$AC  `AC [ (AC X 8VC Gn F XBA $cAC TJ (@AC X (lAC X $AC I bAC ] (UAC MC  2AC E( 0%AC E[ (PEAC X( |AC | (:AC M( (AC Mn (AC M ( AC [ (L[AC MI  xAC C  MAC L|  gAC C_ $HAC T/ ( AC M (8..AC P. $dAC C .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @o (S&8p,8p128pt@2rT?OH \Ћi0؋r(` X E ? (,Z/O9?MH ak sO`" $0`< 1  )^ BD cK Y f   >bU2'%:  1Jc |% H 4[!u7g18HC\$:iPp    0   1  7BP\iuLE$2<LJRYdp| z/(7M%1{6D+<..R_jw Yj0lj_record.crec_for_directionrec_loopsloadtfori_loadsloadgetcurrf__PRETTY_FUNCTION__.5591rec_iterl__PRETTY_FUNCTION__.5728rec_comp_preprec_func_setuprec_stoprec_loop_interprec_loop_jitrec_idx_abc__PRETTY_FUNCTION__.5928__PRETTY_FUNCTION__.3440find_kinit__PRETTY_FUNCTION__.5644__PRETTY_FUNCTION__.3444fori_argrec_for_checkrec_for_loop__PRETTY_FUNCTION__.5703rec_mm_prep__PRETTY_FUNCTION__.5838rec_comp_fixuprec_for__PRETTY_FUNCTION__.5719check_call_unrollrec_func_luarec_upvalue__PRETTY_FUNCTION__.4285__PRETTY_FUNCTION__.6001__PRETTY_FUNCTION__.5812__PRETTY_FUNCTION__.5792__PRETTY_FUNCTION__.5964__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5935__PRETTY_FUNCTION__.5951__PRETTY_FUNCTION__.5850rec_call_setup__PRETTY_FUNCTION__.5775rec_mm_callcomprec_mm_comp_cdata__PRETTY_FUNCTION__.5916rec_mm_arith__PRETTY_FUNCTION__.6135__PRETTY_FUNCTION__.5564__PRETTY_FUNCTION__.5538__PRETTY_FUNCTION__.6059__PRETTY_FUNCTION__.6045__PRETTY_FUNCTION__.6033__PRETTY_FUNCTION__.6282__PRETTY_FUNCTION__.6266.LC74lj_ir_emit__assert_faillj_snap_addlj_trace_errlj_opt_foldlj_bc_modelj_ir_kintlj_ir_knum_u64lj_opt_narrow_forllj_vm_asm_beginlj_ir_kptr_lj_snap_shrinklj_meta_forlj_trace_flushlj_record_objcmplj_obj_equallj_record_constifylj_ir_knumintlj_ir_kgclj_record_retmemmovememsetlj_cont_ralj_cont_noplj_cont_catlj_cont_condflj_cont_condtlj_snap_purgelj_record_idxlj_record_mm_lookuplj_record_calllj_tab_getlj_opt_narrow_indexlj_ir_kslotlj_tab_getstrlj_opt_fwd_wasnonnillj_ir_knulllj_record_tailcalllj_record_inslj_ir_kvaluelj_ir_modelj_ir_numcmplj_ir_strcmplj_ir_calllj_opt_narrow_unmlj_opt_narrow_arithlj_opt_narrow_modlj_ir_tonumlj_opt_narrow_powlj_trace_err_infolj_ffrecord_funclj_ffrecord_select_modelj_record_setuplj_snap_replayjE;EE 7  F 7  #FEGHHIG@HH H*HCHH 7<R W \F 71 . 7FIIXIzI JNKhL{ 7  PF 71 . 7FK 7^ . 7 F L K L0 Iv K I K I I I` In K K8 M 7  FP I 7  F N OP*IbQM 7   FI`II 7^ .  7F, 7^6 .; 7@F[ 7^e .j 7oFGRIRHwTI0IlIV W 7 Q \F 7 Q \F< 7F K tPFqWIUII-I}III9IH$ 7. 3 }8F0H@ 7J O }TF 7  FL 7V [ `FHM 7W \ aFHWOI  7  F=YZZy NH [ \ ] 7# ( - F4 ^= _D 7N S 0X Fe Hs 7} F ` G! 7  ! ! !F+!bHN> 7pX> ]> Pb>Fy> 7p> > x>F> 7p> > I>F> 7p? ?  ?F-? 7p7? 4'TLL $z/P 4|{6(7u78$:<+<hYjlj_crecord.o/ 1378727477 1000 1000 100664 49296 ` ELF>f@@ UHLGI4teDNfExZ~@5t@@(t:@6uDEKȀxu H HcH@6uH) H EKȀxu]UHH]LeLmH %= uf~t?HDffLJCffLJADHfǃfDfHDH]LeLmUHH]LeLmH H%= t zt4D"fLJCffLJ AAt$HfǃfDfHLH]LeLmUHu4H%t;GrHHH֋u;tVtkD@ \N wNDJBu~* 4uVt D@ ]UHAWAVAUATSH(HfAHGD$EqAMDdAtAt t uI7%tA;GrHHItL VDE`EIAwA9sA%IAwD9wEIIEeAE A} LHt t ut9rHHHtHL ADHHHAM BAV4u5wWHHHHw BA t/AE&AAAAADžDž6Dž DžDžA"Aw0DHLLljGAʍ A9sA9wAEHHADžDžH7HAfǃ (DfDfHHQDfffǃHHF DnDAE9v E9EIHIAEfǃ (DfDfHAU AMKfffHAE9wDADž DžHDE9tmfǃTfǃfǃHHDDH߸fǃTfǃfǃHH([A\A]A^A_]UHAWAVAUATSHHHIUALEDdPwIHHE :ʁuHUHHHM w(@@AHE u$AHE HExtgHUxAfLJCfDfLJ AǾHfǃfDfHfǃ CfDfǃ HAHE fǃ (fDfHAHE sHMytfqHEHEAHMHLIǺHuHfǃfDfHM A  I%tA;FrH|twu̅HUHAAI%z%=0u fǃ (fDfHAHE* HUG@IHMt ANM9rIIL}AEEuWE%t;Er*E%t9EwIIL}AUUtHMytHEHEHHELL E}%CffDfǃ HAA%=  HUHRHUAt t uI%tAN9rIIIAtu0%t9wIIILLEEw/ECffDfǃHA Ewj}u5E%t9EwIIL}ECffDfǃHAHfǃ (fDfHAAu[} tUEDffDfǃHA)A9FwAIIAEu5I%tA;FrIIIDdLL`ELLREAMMAGEAME7?HA?;9sA9wEMfEy zfǃUfDfǃpHAŋFuefEx%fǃUfDfǃHAHHfǃ*fDfHADHfǃ*fDfHAA7Hfǃ (fDfHAWKfffDHIM9uADDEH߸fǃTfǃfǃH'LAIOd'AA=H]LeLmLuL}UHH]LeLmHHA%=ztID*LfǃfDfHHC`HEdHED`ILmLmHEEHpu HED;`s H| WHPfu DHH]LeLmUHAWAVAUATSHXHHuUDdHŰuLI7}t AO9MrADeIIA$uO%t9w*@ %t9wIIIA$t‹ẼwAuDv HuHAD;AẼƒHuLILH 4H tH HfǃQfDfLHA$fǃPfDfǃHEHUHxt'xu!HuH6HHLLhA$A$t t uM/%tA;GrHIMAEtAEEHEAEu }uCHAHUHUEAMML}DHHfǃ (uffHADHtHuHH HMAE(At"AEEuHELEMDLHDuD9uWL}^Ed$EFM/AOA9sEEE%M/AOA9rEIMEeAE AfWEA} ?Lt t uM7%t9rHIALttHUH MtHuHHHEE.tHEHEHEHUHUEAuHHfǃ (MffHLEMLH t HE`Hfǃ (uffHAHHtHuLIDLH)HEHLEDLHhuLHt[H‹uHKHH'HHUHEdyHX[A\A]A^A_]UHH]LeLmLuL}H@HIUAϋdHEHAEuDA EDDffDfǃHAAtA u0fǃUfDAfDHAAA_AHfǃ fDfǃ,AFtu7AADfDfDfǃHAD0tu+HC`HUHBuā"H}EAA4uEuAuHfǃPffǃHAADeADAfDfDfǃHEELHfǃ (fDfHfDffǃHEHEfǃ (fDfHDeAKfDfEfHIvHfǃ (fDfHfDfUfHE;HuHfǃQffDHADH]LeLmLuL}UHAWAVAUATSHHIHuHEHEHuHEEd@IMtAu9rHHˋuK%t9w( %t9fwHHHˋtƒ{@@<%= uit t u%t9wHHHˋtCfAMfAfAdž LHEHUȉLUEIDxDDLANj{t2LfAdž fEfALAD#DLEHUDLANjuLfAdž*fEfALAfAdž (fAEfALED%= HUHx t@@IMtAu9rDIIA$uL%t9w' %t9wIIIA$tLLTEEAD$u1ECfAfEfAdžLAu.ECfAfEfAdžLA[LfAdž (fEfALUDfAfAfAdžLAA|$qA$bfAdžUfEfAdž LA6=HMHx tD`HEfxUHL{IMtAu9rHHHˋuL%t9w)%t9wHHHˋt<AHMLHLHEHLLfAdžfEfALHED D HEpycIUAtE;erDHt&IH*EHuLGIL1 u L t1AEHEA}%=4uzA|$ urAD$HWv8HEAAMIFEMgIuAwH DH萷AVLgIuAwH0DOAĉ¾CH߸EfǃMfDEfLHA$H]LeLmLuL}UHH]LeLmLuL}H@HDdHD`DxEIAIEuD%=&DHEMEgI6xwHHKEMEIgI6HEȃxwH DHAEtIMHDHuHO\H@fǃCffǃHAƾHfǃ(fDfHIEADuH蚯H]LeLmLuL}UHAWAVAUATSH(HDdHUDh@EEIEHEx&@gItA~9rHH΋uM%t9w*%t9@wHHH΋tug6t t ut9wHH΋tH)HHULUM$gI7A~wHMH萳AI $HDLHAŃ}tI $HULHHID$DEDDH1H([A\A]A^A_]UHATSHH uQHhHAľHfǃQffDLHA$VHGpHO` LJ xuPA@(t[A\]UHH]LeHHIHH0Hp u)I$HHuǃ,HH]LeUHSHHH%=upHxt>0HfǃffHǃ,H H[]UHATSHIHH0AT$u,d%= HH@%=t HI$x tQpHHRfǃffHID$ǃ,H@@[A\]UHH]LeHHIHH0觨I$HH0H脿H]LeUHH]LeLmH IIdHxtcpHu2Ht;SrHHЋt4Hu@@w8uu+H3{ wHƐ)H3{wHI$ME L藮I$H]LeLmlj_crecord.c(((o)->it) == (~10u))lj_ctype.hid > 0 && id < cts->top(len & (step-1)) == 0(((sval)->it) == (~12u))(((sval)->it) == (~4u))(((sval)->it) == (~10u))lj_cconv.hidx < 8(((o)->it) == (~4u))(((tv)->it) == (~10u))lj_obj.h(((((tr)) & (IRT_TYPE<<24)) == ((IRT_CDATA)<<24))) && cd->ctypeid == CTID_CTYPEID((((ct->info)) >> 28) == CT_ARRAY) || ((((ct->info)) >> 28) == CT_STRUCT)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))ctype_child(cts, cct)->size == 4(((&rd->argv[1])->it) == (~10u))(((&rd->argv[1])->it) == (~4u))((((fct->info)) >> 28) == CT_FIELD)((((ctf->info)) >> 28) == CT_FIELD)(((&rd->argv[i])->it) == (~4u))(((&rd->argv[0])->it) == (~12u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&rd->argv[0])->it) == (~4u))(((&rd->argv[0])->it) == (~10u))ctype_checkctype_childrecff_cdata_indexargv2cdatacrec_constructorcrec_index_metacrec_ct_tvcconv_idxcrec_copycrec_call_argsrecff_cdata_arithrecff_clib_indexargv2ctypesetgcVrecff_ffi_abirecff_ffi_xoflj_crecord_tonumberGCC: (Debian 4.7.3-4) 4.7.3zRx AC | $<AC P $dAC P AC  (AC P (lAC MZ >AC y $$]AC TD (LsAC [S $x AC S (AC M (vAC XY ( AC M ($ AC P (PAC M (|wAC XZ  >AC Lm 7AC Em (7AC X (AC X (D6AC M$  pAC C  zAC Li  AC E  AC C  JAC Ly $$YAC PD .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @YXw@&]%zs/ : S^#vi `1   JXdo|*:' Laoz1 <`LwO>P7LP70Q?"S6NXU_q'VzVCWYXJXYlj_crecord.ccrec_reassoc_ofscrec_constructor__PRETTY_FUNCTION__.5641argv2cdata__PRETTY_FUNCTION__.5634crec_ct2irt__PRETTY_FUNCTION__.4231crec_copy__PRETTY_FUNCTION__.5723__PRETTY_FUNCTION__.4240crec_ct_tv__PRETTY_FUNCTION__.5850__PRETTY_FUNCTION__.4415crec_tointcrec_finalizercrec_fillargv2ctype__PRETTY_FUNCTION__.5648crec_alloccrec_tv_ct__PRETTY_FUNCTION__.5894__PRETTY_FUNCTION__.5876__PRETTY_FUNCTION__.5971__PRETTY_FUNCTION__.6072__PRETTY_FUNCTION__.6085__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.6148__PRETTY_FUNCTION__.6155__PRETTY_FUNCTION__.6167__assert_faillj_opt_foldlj_ir_kintlj_trace_errlj_ir_type_sizelj_ir_kint64lj_ir_calllj_ir_kptr_lj_ctype_getfieldqlj_ir_kgclj_ir_knum_u64lj_opt_narrow_tointlj_cparselj_ctype_infolj_cconv_multi_initlj_ctype_metalj_ctype_internrecff_cdata_indexlj_opt_narrow_cindexlj_ctype_sizelj_tab_getlj_record_constifyrecff_cdata_calllj_ccall_ctid_vararglj_snap_addrecff_cdata_arithrecff_clib_indexlj_ctype_getnamelj_tab_getstrrecff_ffi_newrecff_ffi_errnorecff_ffi_stringrecff_ffi_copyrecff_ffi_fillrecff_ffi_typeoflj_trace_err_inforecff_ffi_istyperecff_ffi_abirecff_ffi_xoflj_ctype_rawrefrecff_ffi_gclj_crecord_tonumber @  ()*)R+] 2g l  q()*)  # . (  * / X4(Y  c #h m(  # .( ,   F(* 4 #9 .>(   # (  # .(-)){))):.]) *2 /b pl q \v ( ) * ) ) -= )} p  u ( 0 1 )  #! .& (8 pB G  L (c * + - )  # . (V ` #e .j ( p   ( );  E #J O (f p #u .z (  # . ( ): D #I .N()-))   # .(B L #Q .V( {  (  {  !(5 W2q-*)*)c)y3))=))))l)-)2)3)E-e))))).-N)m))*+  # .(H.X*~)1)*)1!).*N)]+T))-)*)-;)a).)# - 2 7(G1g)4+&5= G #L .Q(  # .(+*c/v*-))6G  Q #V [(p z # .(+ -) )z *  # .!(S!  ]! #b! g!(z! ! #! .!(!+!*)"-L")t"+"-")"*#7 $)@$)p$*$)%8E%*f%)%)%-%)%)&-(&)U&)a&-&)&)&+&*&)Z' d' #i' .n'(' ' #' .'((  ( #!( &((6( @( #E( .J((()(:(-))/);Q)-s)))))  ) ) H)() * # * .*(G* Q* #V* .[*(*) +)+-=+)f+)+)+  + + p+(, !, #&, .+,(c, m, #r, .w,(,0,1,)/- 9- #>- .C-(s-2-*-+-  - - -(.1A.).  . #. .(. . #. ..(/70/+N/1/</=/+/ `/ / p0(01@0)R0+g0-0)0 0 #0 .0(0)#1 -1 #21 .71(n2 x2 #}2 .2(2 2 #2 .2()3  33 #83 =3(M3 W3 #\3 .a3(3)3  3 #3 4(4 4 ##4 .(4(4<4+4+5*B5)5 5 #5 .5( 6+_6 i6 #n6 .s6(6 6 6 6(6+6?6 7 # 7 .7(C7 M7 #R7 .W7(7+7)48)8)8)29+9@9*X:*z:):);)<;)l; v; #{; .;(; ; #; .;(;7<1J<+6= @= #E= .J=(= = #= .=(= > # > .>(p>)>  > #> >(> > #> .>(;?)w?)? ? #? .?(?)@8@ '@ #,@ .1@(L@-n@)@ @ #@ .@(@).A/CA MA #RA .WA(~A A #A .A(A A #A .A(3B =B #BB .GB(~B B B B(B0B1B)C  $C #)C .C(FC PC #UC .ZC(nC*LE)E)FF)VF*xF)G;CG)QG*sG)G)mH;H)H)H-I)LI)fI8pI*I)fJ pJ #uJ .zJ(J J #J .J(J7FK PK #UK .ZK(K K #K .K(K7K1-L+L L L L(L L L pM("MC1MDlM1M)M M #M .M(N2,N*QN [N `N eN(N N #N .N(N N #N .N(O-$O/O O O O(O1O+0P+?P.P P #P .P(P Q #Q . Q(7Q.eQ)Q R # R .R(BR LR #QR .VR(R)R*R)S S #S .S(S S #S .S(/T  9T #>T CT(TT ^T #cT .hT(T5T T #T .T((U*U*U*U)V  V V (V(VKV V V PV(V1W)8W+wWOW+W+W W W pW(W1"X)X X X pX(XOY Y #Y .$Y(wY Y #Y .Y(Y Y #Y .Y(99 (08@HPX`hIpIx xx (08@H|PX`hpx @h's(Pz|#'(1T<`LOPLPQH"StXU'VVCWYX(Xlj_ffrecord.o/ 1378727476 1000 1000 100664 32248 ` ELF><@@ UHHG`H@@u @@HH]UH勿H~]UHSHH%= uH[]UHH]LeLmLuH HIt;HcHhfǃ DffǃHArHD D%= t fLJCfDfLJ AƾHfǃfDfHEefǃ CfDfǃ HAľ Hfǃ fDfHDH]LeLmLuUHATSHHVHu¾H߸AHHt-HfǃfDfHHH[A\]UHAWAVAUATSH(HIVHu"EHAǾHEA|$AEHB4YIIAHDfǃ?fDfDHAfǃCfDfǃHAfHC<uxfǃDfDfǃHM¾H߸AHHtHfǃ fDfHPDMEMDH߸AHRHt!fǃfDfDHHB4(IH([A\A]A^A_]UHH]LeHHH0fǃCffǃLHA$H]LeUHHPHUHM@E ( EHxtHO`UEz urQR(@tHPHUH rv>uDFD9uvQR(@tH@HEH Pv;Ur9uRA@(tHuUHSHXHEЋSU%= EEHxtHO`UEz urQR(@tH@HEH Pv;Ur9uRA@(tHuHX[]UHHGpHW` LJ xuHB@(tUHH]LeLmLuL}HHIHD HFD%= {H@D|IExtD0LAǾH%|EAV@@(tA*EEHHt&ELHuHA$IEEHuHoMfǃ ffHDe|EHC`DuEA~ ->fǃffHH]LeLmLuL}UHH]LeLmHpHIHU@EHFс HxAI$ztD"Hfǃ(fDfHEHC`DeEA|$ uAT$@@(tL*EEHuHH]LeLmUHHGpHW` LJ xuHB@(t UHHGpHW` LJ xuHB@(tUHH]LeLmHpHHE%= >IHH v vB,H*ExtfHw`EEx uHF@(tEErELHUfǃ(ffHEAELHuHAEH@%HHЃID$H]LeLmUHH]LeLmLuH HLEeD%= ucHGpx$ttIp AEHD`LHAD$IFH]LeLmLuUHSHHP v҃EHHWp|$tt H[]UHH]LeHHF=v Iu >u L{vF,H]LeUHAWAVAUATSH(HIH0%AfǃCffǃHEHEM,$AEu EmLmr=v HH{`LHEHC`UAUAEHUzuRU@@(tA|$txI4$HHAHpHEHpuHEAHEI4$HH1AH@tcI4$HH AHpHEHpEEĉEtDHEI4$HHA$HEĉEAAEUȉUfǃfEfHHEfǃ(UfEfHfǃ(fUfHEHEDp AhHED;p w)fǃUfEfH5fǃUfEfHHEDp EEEypUĉUEfEfǃffHfǃ(EfUfHE%HUDj 4Eu/fǃEfUfHẺEZHfǃ(UffHEfǃfEfHAA|$E9Defǃ)UffDHDfǃfDEfHfǃ?fDfDHfǃLffDLHA$fǃUfEfHLHuHH{`HHA$E)EMcMEfEfǃ)UffHEDHfǃUffHLH=~ HMt$ADHfǃ(UffHfǃ?fDfHfǃDffǃHN,HAEIM9ufǃEfUfHID$\fǃfEfHẺEA_fǃfUfH7H([A\A]A^A_]UHAVAUATSHIH0AEt$HptMAAAHfDfDfHAAHD4uD([A\A]A^]UHH]LeLmH HIH0AHpHAUffDfLHA$H]LeLmUHH]LeLmH HIH0LAUVt%fffǃHA$H]LeLmUHH]LeLmLuH HHGpx$t8D` LIT$H¾ H߸AH?HAfǃ)fDfHAH07HAHpHAfǃ)ffDHfǃ(ffDHfǃ*fDfHfǃ4ffǃHfǃ(ffDHAefǃ*fDfDHfǃ4ffǃHfǃ(ffDHAHD H]LeLmLuUHH]LeHHH0AHpHfǃ1fDfLHA$H]LeUHH]LeHHH0AHpHfǃ0fDfLHA$H]LeUHATSHH0HSpz$vAHr Hfǃ*fDfLHA$[A\]UHH]LeLmH HH0AHpHAfǃ4fDfǃHAfǃ4fDfǃHAH?Hfǃ+ffDHfǃ*fDfH"fǃ4fDfǃHHH]LeLmUHH]LeLmH HILA4$wAD$`Dfǃ4fDfǃHHfǃ)fDfLHAD$IEH]LeLmUHH]LeHHIH0AT$fǃYffLHA$H]LeUHH]LeLmLuH HIH0AH?HAEvA0tsAfǃ*ffHfǃ)fDfHfǃ4ffǃHAA.tEAfǃ0fDfDLHA$H]LeLmLuUHH]LeHHDfH0fǃ4ffDLHA$H]LeUHH]LeHHHv5Dffǃ4ffDHHH]LeUHAWAVAUATSHHIH0AE}HpAAHADwBDvlfǃUfDfǃHAĸ@Dw*fǃUfDfǃHAŸD ffDfDHAAHD4$D H[A\A]A^A_]UHH]LeLmH HIH0LAT$vсt HIMHHA$H]LeLmUHATSHH0AHHHfǃ/fDfLHA$[A\]UHH]LeLmLuL}H@HIHHHPHHO`UDhAUvAuEA~A9u~qv(@tpuDp EFDEAD׉DFD9u AD"NDAE@(AE_vA@(@tI$HK`ủpDh EADEAAGA9uAWA@(AwQR(@tI$HK`uȉrDr }v=ArA9urQR(@tt H{`ID$DEDDpDEDDpF9H{`HھI$M̉ Dj:H{`HھI$HK`ủ2DjAW9UH]LeLmLuL}UHH׋]Ët'UHSHHHCH[]UHH]LeLmLuL}HĀHHD(D%=IDmHO`HHHEH Pv;Ur9uRA@(tHuH/HPHUI$HK`D8DhEuADDz9uAD"By(ARA@(tI$Hs`HEHH Hv:J9uRF@(tH{`HھI$HK`D:DjAv@EAAWA9uAwQR(@tt H{`ID$fǃWfDfǃLHA$wFLHSp|$tWt HA$FHHHPH8HxB9QaDPt=H]LeLmLuL}UHH]LeLmLuL}HHHD DhD%= MEAA tE1E(DeHK`HHHEH Pv;Ur9uRA@(tHuHAf~fǃ>ffǃHAEu@ Hfǃ JfDfHHD ƃJfǃ JffDHfǃ R~ffǃHH]LeLmLuL}UHSHXHHEHO`HHHEH Pv;Ur9uRA@(tHuHtHU HU܉HX[]UHH׺]UHH]LeLmH0IIHpt fxIT$< tLv%=uy%=IExt8HuuLlfADŽ$XfA$fADŽ$L= uLLI$H]LeLmUHSHHH8Pt-t)HLAHH%H[]UHH]LeHHA%=zt2~#~ u4fǃfDfHfǃ?fDfHfǃDffǃHAľ#HfǃfDfHHHsu HH]LeUHH]LeLmH HHD EIHDHHuLHA$_fExQHyHH9HOH)I}H~6H~1HH44HHH9uHH]LeLmUHSH(HHGpPw ЉUHEHS`HRHUЋHHuHHUHx ,u ǃ,HH([]lj_ffrecord.clj_obj.h(((o)->it) < 0xfffeffffu)(((tv)->it) == (~4u))(((&rd->argv[0])->it) == (~11u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((&J->fn->c.upvalue[0])->it) == (~8u))(((&J->fn->c.upvalue[t])->it) == (~4u))(((&J->fn->c.upvalue[0])->it) == (~12u))(((&J->fn->c.upvalue[0])->it) < 0xfffeffffu)(((&J->fn->c.upvalue[((IRType)(((tr)>>24) & IRT_TYPE))])->it) == (~4u))(((&rd->argv[0])->it) == (~4u))lj_ffrecord_select_modeargv2intrecff_table_removesetgcVrecff_table_insertrecff_math_randomrecff_math_degradcopyTVrecff_tostringrecff_tonumberrecff_rawsetrecff_rawgetrecff_ipairsnumberVintrecff_ipairs_auxrecff_type    ./023V#$%&' !" !!"#$%&%%%&''((((() ( ( ( ((((**++,-.../01234GCC: (Debian 4.7.3-4) 4.7.3zRx (AC c <AC K \8AC En $|:AC T!  AC Gu (AC M  WAC LF \AC W  8 AC E \XAC (xAC [ $LAC P7 ZAC ZAC $AC Pj $,AC T  TvAC El  xmAC L\ (AC M $AC G $~AC Pi $oAC PZ $@AC T  hkAC LZ  kAC LZ  }AC Cu $AC P $AC P  $^AC LM $HAC T  p[AC LJ  kAC LZ (6AC M$ $AC Pp  cAC C[ (0AC X \!AC \  |3KC E]A (AC X (AC [  AC E AC X $<#AC P  dPAC EF  5AC L$ $AC P $AC E .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @,8S`!&,,,12,G@2 -T0t Ot\045eQ5zX5uyh P<@@ J L((+88<p:HW+fWwW\ b  X,L?X; Z` Zj { n   v  m  ,;k~Ko[Xm0okkE}P^[%Rk66HWxcfs"!"3#q(i &'(#x)P&?6+LX@   cnz +6JYet*5,.<N`q lj_ffrecord.cresults_wantedrecff_assertrecff_table_getnrecff_io_fprecff_io_flushrecff_io_writerecff_string_lenrecff_rawset__PRETTY_FUNCTION__.5320__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3429recff_rawget__PRETTY_FUNCTION__.5314recff_nyiurecff_table_remove__PRETTY_FUNCTION__.5551recff_table_insert__PRETTY_FUNCTION__.5561recff_crecff_nyirecff_ipairs_aux__PRETTY_FUNCTION__.3440__PRETTY_FUNCTION__.5381recff_ipairs__PRETTY_FUNCTION__.5387recff_type__PRETTY_FUNCTION__.5293argv2int__PRETTY_FUNCTION__.5262recff_string_rangerecff_bit_naryrecff_bit_shiftrecff_bit_unaryrecff_math_random__PRETTY_FUNCTION__.5488recff_math_ldexprecff_math_atan2recff_math_degrad__PRETTY_FUNCTION__.5465recff_math_logrecff_math_modfrecff_math_htrigrecff_math_atrigrecff_math_unaryrecff_math_roundrecff_math_minmaxrecff_math_powrecff_math_absrecff_xpcallrecff_xpcall_cprecff_pcallrecff_tostringrecff_metacall_cp__PRETTY_FUNCTION__.5375recff_setmetatablerecff_getmetatablerecff_tonumber__PRETTY_FUNCTION__.5355recff_rawequal__PRETTY_FUNCTION__.5333recff_selectrecff_idmaprecff_funclj_ir_calllj_ir_kptr_lj_opt_foldlj_trace_errlj_ir_kintlj_ir_knulllj_ir_tostr__assert_faillj_record_idxlj_trace_err_infolj_tab_lenlj_opt_narrow_tointlj_ir_kgclj_strscan_numlj_str_fromnumlj_str_newlj_opt_narrow_tobitlj_ir_knum_u64lj_ir_tonumlj_ir_tonumberlj_opt_narrow_powlj_ir_k64lj_err_throwlj_vm_cpcalllj_record_calllj_record_mm_lookuplj_record_tailcalllj_crecord_tonumberlj_record_objcmplj_ffrecord_select_modelj_ffrecord_funclj_record_retrecff_cdata_indexrecff_cdata_arithrecff_cdata_callrecff_clib_indexrecff_ffi_newrecff_ffi_typeofrecff_ffi_istyperecff_ffi_xofrecff_ffi_errnorecff_ffi_stringrecff_ffi_copyrecff_ffi_fillrecff_ffi_abirecff_ffi_gccJKLM LN;LaLqOLJNLZNjNPLL*LAJ^N~LJLPEL F  Q F  (QA FbK P PUQ Fb  PQR F  QC FM R (WQ Fb  PQR F  (QSJ F  QTN F  ( QERdRLL[ Jm Fw | Q N L F  ( Q T" Rs F}  ( Q S F  ( Q S9 MF FP U Z Qv F Q F  ( Q U N L8 R F  Q V N] Fg l q Q V W M F  QPELUNMX F  (QU0NFUUUN+L8NbLLLL1LXLLNLL?LgLLLLY VRL`NLSNLL&LcLLLZ$ZCLZZL ZBL~ F0  QVKJ[L \=\dLLLLL L,LLL\\L\ \3LY\k FPu z Q[L\\%LJL_[LLLN%\KL{L\L \5[eLLLL\@L\L] ]ULLL\PMb^\_Ld Fbn s Px Q Fb  P Q Fb! ! P !Q^! Fbh! m! Pr!Q! Fb! ! P!Q! Fb! ! P!Q"`I" "V"aq" "~"a"b"b# Fb# # P#Q#c$$ Fb.$ 3$ P8$QR$ Fb\$ a$ Pf$Q$ Fb$ $ P$Q$ q($a% Fb% !% P&%Q5%`l%L% Fi% % 0%Q%V& Fb& & P&Q&c'L/'OO'L'L'L#( Fb-( 2( P7(QH(c(d(U!) Fx+) 0) x5)Q@)Ws)L)e)f0* F:* ?* 1D*Q`*V*L*N*L*L*N+L(+Mj+g+N%, Fd, F@,i@ H; P(X ` hn p'x &W)6+(#"xREo X(0k8@H P8X`h+pxjklmnopqrstuvw @(`8p+W<`|;   0n X |  kDXloE(LtRx4`""# &' q(@(h)*6+,lj_asm.o/ 1378727474 1000 1000 100664 88784 ` ELF>@@ UH勗~ ]UHLDFD9v'FID@A9t#uDA9t@9t9rԸ ]HH)HcH9tUHtPƀ@p@HHUHft-HHрz]uHрz]tHNH ʀy]uWIHdH9t;QrHҁ V ]HvUHQUHBЃ@vt HBvi6HH4~]t/6HH4~]tAAVDfDAEBuf=E‰H|]u]UHAUATSHHIIHAutbAAt*HT wE~AA ~AH9wAD9}DAD$@H[A\A]]UH HH)HH9tUHWPp@pHHUHw4HHxt HHcH9u ]HDVL EAExUHDVAtcfy^AH yyKD2FAtA9v$9v AA@t#ED9v A@tA@<UHHHJxzt| B]FutFB`sP.t LJPP~UHHFUH勗HH0HuH|HHH;(uOLJHAH)HcH9ttQH8t HDH;]UHHH+HHUHAWAVAUATSHIwD~AEuDHMI0@MII9wLWAjAFIFV zH@jPH@8uAF~jA~AƆAƆDAƆ$AƆIH AAƆIH)HcH9ttAIHx IIIM0D9H[A\A]A^A_]UHHLJLJLJLJH@HǾ@tƂ@HA@?@t fH@t HɸH@t H@t fH@tHH=u]UHHAAAAGDD@pLLAAAAL @@t3 @u HfufHPHHH]ÅuUH3b8HPHP@HP@@tHP@pH]ÉH9u UHqHcH9u8HB@BB@@rHHHHPHPH@pH H]UHH]LeHHIHHH)HcH9t&`LH*H@HHH]LeUHȃw+NB`فʉ$]UHHuUEuAAAu,A EE9uDHH@A@D@H@AAAAu!@$H@D@@%HAAAGAAED@pLLAAAAL @@t3 @u HfufHPHHH]UHAAD9u*HHFHDFD%HDFHDAAȉD]UHAHHHi]UHAȃw+NB`%¹26F<u%f]UHAȃw+NB`%¹ F<D]UHN]UHL9uI@AHI@AHAAEDD@AAD ƉHT @HH@t HH PH]Åt/UHtAЉщ3]UHHA oDAʁu8HtHAo@%H@A#DEuAE!AAu) EE9uDHH@A@DHH@AAD"DG AAEDHAAGDD@DDƉpEHMcLAAAAAGL @DɃ@t3 Au HfufHPHHHAAu@$H@AAGAAED@pLLAAAEL @HA@t2D @u HfufHHPH]UH9u(HLFLN#HNHс ]UHH]LeLmLuH IAAHHCC%DCADcPHcHD@@t6AD u LAAfufHCSHIH]LeLmLuUHHH:uW?$f]UHSHHLAHلxAxtD A@AHuAM u$A@HHھgut;A4$AT$HD@ƃA $fHȀxtxtAT$|HƃƃDA<vtHǃƃ[A\]UHH]LeLmLuH HIjAAUHHPvD0EnAD)H‰HHDHABDH1HLADHH]LeLmLuUHH]LeLmLuL}H0I~HF<u=vWAA4$HI DH<uMvAźA4$HD HgTLDnfE,AAǺA4$HAǀu DHiEKPvUAT$ vHBH HHAD$uvЉBH H"6 H]LeLmLuL}UHAUATSHHE~IFPvvvHUOu;C@ҁsLA A{Ju I$H4L 3L_AŀSB<w8$Awp"B`sA?ҍB v/v'(f  DLCЍJw3I$HPI$U܈P L=uB`r)<t%<t! v7I$U܉PI$KB`ځ LH[A\A]]UHH]LeLmLuL}H0HAAՉHL$AL$xFEt!AD$RƃLH@ƃ )AD$<uff!EuBHA<$Aƃƃ ;hDAEECAEH]LeLmLuL}UHH]LeLmH HINDx >Aw##sD HAEl$A|$tDLHDH]LeLmUHH]LeLmLuH HIAAAD,A9t<DrD DLH|H]LeLmLuUHH]LeLmH HIAźLHHH#HH9t DHA9tDHH]LeLmUHH]LeLmH HIAźLH DH%H]LeLmUHH]LeLmH HIAźLHuDH>A9u!uDH DHH]LeLmUHH]LeLmH IHF@ҁ Aŀ{CuHL3L3CHwB$~A$%f^WB`sA?P v/v'  DLXH]LeLmUHH]LeLmLuL}H0HIHFHL4@D,@A~y A~tLHAA4$HDAIcHHHHHRHH9t]AǀuXEt;E9uuDDH0EDDHE9tDDHHAF<DƁHOAljEED;HAFЍJvtn<u(A~tpAHqufvII A~trA>nL DHqutHHBHAFuvЈBEE DH+H]LeLmLuL}UHH]LeLmLuL}H0HIAA $fxqHH ȀytxtAT$LHDH-HAA4$HAA|$=uYADDH%HHHPH@ADHADDHAD$DDDHH]LeLmLuL}UHH]LeLmH HAՀ~y~uAHbAEDƁHAžHHHPH@DHHHPH@/DHDDHAUDH]LeLmUHAUATSHHIFЃv&t! vU<uMLHAŨA4$HD H6A|$yA|$th<DLHAA4$HnAv%f DHA4$H#AD$<@@t6HAD$< vSvlH@H H#sHHBHAD$uvЈB HH[A\A]]UHH]LeLmLuH HIAԾfAźLH-Aƾ HHDDf.HDD*HuDDWHDD,H~H]LeLmLuUHH]LeLmLuL}H@HVffЃD|DvtIDExtAE!Au utvyrAulL[AʼnHLUL[EA$%fEMDLqAcAuLHLèLځELj{y {AHLEȺLEAŃ  AAGt-*DEM̋ULlgA$%fEM̋UL;6EM̋UȾL#nLECOAALA v]EAAvI$@I$EGM̺LI$HPI$EAuAvADpEGM̺LYHLEȺLEC:bLr CqH]LeLmLuL}UHH]LeLmLuH H6$AľƁHALA D¾H0HH\DHHH\DHHHPH@ADHLHLHHPH@ADHH]LeLmLuUHH]LeLmLuH HAD4D4AEIHLVA8unDrroADD AA D!D!DH9HB|(u\HfǀfDfHHHRHHDdHDH]LeLmLuUHH]LeLmH !t+IA!eD!DLcH]LeLmUHH]LeLmLuH HAA։HL$AD$ȄAwsAD$<u&A$H:t uSDH<uA$H<vA$mvD;r D AD$AҁDHg!A9t;AD$@t%DS@D9u DHDLH#H]LeLmLuUHH]LeLmLuL}H@HIUFDHL4A.AAL$B`ƒ?A#2u ځUDH HHJHBAL$B`ځUDH]AŃu$HAʼnH"EvEyDHAEAt HAL$B`ځUDHD!AtDHA$DHH]LeLmLuL}UHH]LeLmLuH HIAֺAAL$B`߁B7HA$DHfH]LeLmLuUHH]LeLmLuL}H@HIUD>FЉUHDtED!fAED;}̉AE9LHt DD}̉E̺DfuHDDuHDDHSAD;}uH]LeLmLuL}UHH]LeLmLuL}H@HIU̺AE4$At$wDAƺDHrAAL$B`ځDu@HYAL$B`ځDD;H+DDHH]LeLmLuL}UHH]LeLmLuL}HPHIAUFȉMEH0H;u HLJ0:HHHT HHLD!LHAƋE9EEDfHŰuHPuSLHt EUUEAL$B`DuHhAEA|$y HAttAŀu9AL$B`ځDAADHAL$B`ځDAMHAŀu3AL$B`ځDDHAL$B`uHsU9uHHqHQkHQHiAL$B`ځDH4UDH$LHAƋE9EuH]LeLmLuL}UHH]LeLmLuL}H0HI`AA4$H|yHAHAźDfAt$H{ADDf~HDDXH A$DHH]LeLmLuL}UHAWAVAUATSHIDEAEAEADAF@IHC tb{t\IAfǂffIIHRIHDlIDcDDAAE!UH[A\A]A^A_]UHH]LeLmLuL}HPIFfEȉÃCAƃ A AƉECAEfEENʃ9uI O0EEt@uLAăZZDDUL'D9esEEȃfuuLiAMuLAǃuYIIHCHUľXLHھ LDDLEu }t UAD$<**DDL@AMĉʾWL賿vEyButuSLL.'Aǃu!AD$f%fEAA,AD$f%fEAA,AD$<UI|yuLALAIHED EDDL蟾u+IHHDXLX$IHDXL2HUȾ LDUľL'DUDLUDLmuLAD$<DDLͽAD$B`r<tD DLXCAAD$vuA#uADغuLDLeB`sUÃ}uAD$uUL'uL_ځcL\Ã}t#uL$ھL'ULB`H]LeLmLuL}UHAWAVAUATSHHA DAfAA!AED4HDDAAE!HHB@H9vdqHH0D@@-$DH=H;sHƸHECDAE!AED4H DDAAE!HHB@H9vdqHH0D@@-$DH=H;sHHECH[A\A]A^A_]UHH]LeLmLuH IHIՋB%fKx !LKy {CЃ wyDsAAE tWx2ѸA $A $fnL芹Et[EL蕻?HL6-<w;HLH]LeLmLuUHAVAUATSHHDAAAED4HHHB@H9vdqHH0D@@-$DH=H;sH͵HDDAAE!:DAAAED4HHHB@H9vdqHH0D@@-$DH=H;sHHDDAAE!:H[A\A]A^]UHAWAVAUATSH8HIIDnH6HthHEAD$ tHHPHUHPH@EYMAOlLmEALjAA4$HL,AEЃ w}Uă}uUDAEĉUăw8w0A}uAUHHAUH衶‹rAMx(!AMLH萷Hi< u!wHUAUDEHsA,HEHEAHHB@H9vdqHH0D@@-$DH=H;sHHIL;eEH}t EăHUH8[A\A]A^A_]UHATSHHIHHA$EEHUHEd$AHEHH[A\]UHH]LeH HAIIUVUL6HULH9H]LeUHH]LeLmH0I~HEEEHUоHH AA|$HL$AD$<uofxIAE  fA|$@yfA|DyHHD1AD)AA1A)EuAMDHYAMDH;t.HHPH@DDkHߝHHPH@DH话HDu @H@@t@@pTP@DDL@DHH@tHHD PH}t1DDH轡AMDH1Au7AMD#H AMDHAMD#H֞DD+H虜HHPH@ DHnDD3H[HHPH@DH0DD+HHHPH@DHDD3HߛAulDDHƛHHPH@ DH蛛DDH舛UDf~HoFMDHZAI>MDHkHEHH[A\A]A^A_]UHAWAVAUATSH(ItIDŽ$(IDŽ$0ADŽ$A$t ADŽ$E$EEEAI$AT@DtED9A$A4D t' EE^D ELL$I$HB@I9$vgA$qI$H0D@@-$DH=I;$sLI$EDL#I$HB@I9$vgA$qI$H0D@@-$DH=I;$sLfI$A!,}UA$UȋuLUȋuLI$HB@I9$vgA$qI$H0D@@-$DH=I;$sLxI$0A$fA$A $!ADDA4L譡DDAAD!I$HB@I9$vgA$qI$H0D@@-$DH=I;$sL苔I$H9s9Cu;u H H9w$ HH9u f=uAHcCHH9u5HCLH)HHcH9ttCHHH9wI}@AuHHP CHHPʹHHPļ C<uWHHPk HHPMR THHP貫9 C<u]HHP莫 HHPo C<u_HHPQ HHP2 A <4DsEAuFHHP.A3HP茎DQHP1x\ AHHPѓA3HP/HHVHA DvD: HPwHP:t H@HHPH@fKx DցHP͵HHP踓EtAHDHPsHP7AHLDFF-$DH=H;s HP?fHL~-HPH@ @ HPHPzHPRHXHH@HHAAAD sƀH9u AEAQx(s#AAHPg%HHHPoAD$ADžDžDHHCHD;<r EH0BH@@H)HcH9ttAAHhHH9wHQHH9uHhHhH+HG 0 && id < cts->toplj_asm.cn <= 32*2ir->o == IR_CARGlj_asm_x86.h0delta == (int8_t)delta((irr->r) & 0x80)lj_target.h(!((r) & 0x80))allow != ((RegSet)0)((ir->r) & 0x80)ir->o == IR_STRREFir->o == IR_AREFirb->op2 == IRFL_TAB_ARRAYlj_ir.h!1 || t != IRT_LIGHTUDt <= IRT_NUMofs % sizeof(Node) == 0(irkey)->o == IR_KNUM(irkey)->o == IR_KGC!(ir->op2 & 0x01)sz != 0xffffffffusz == 4 || sz == 8((ir))->o == IR_KGC(ir)->o == IR_KNUM(ir)->o == IR_KGC((intptr_t)target & 15) == 0target - p >= -128p < pemap + nent == flinks(uintptr_t)p < (uintptr_t)0x80000000(&as->ir[(ir->op1)])->o != IR_CARG(!((r) & 0x80)) && !((ir->s) != 0)group[exitno / 32] != ((void *)0)(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NIL)ir->o == IR_KINT || ir->o == IR_KGC || ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL0 || (ref >= as->T->nk && ref < as->T->nins)ir->o == IR_FLOAD || ir->o == IR_FREF(((&as->ir[(ir->op1)])))->o == IR_KGC(((((((&as->ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&as->ir[(ir->op1)])))->o == IR_KGC", "lj_asm_x86.h", 186, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&as->ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)ir->o == IR_HREF || ir->o == IR_NEWREF || ir->o == IR_UREFO || ir->o == IR_KKPTR((&as->ir[(ir->op2)]))->o == IR_KPTR || ((&as->ir[(ir->op2)]))->o == IR_KKPTR(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))))(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))((((1u<> ((IRType)((ir->t).irt & IRT_TYPE))) & 1) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))((int)((as->freeset) >> (r)) & 1)(((IRType)((irkey->t).irt & IRT_TYPE)) == IRT_NUM) || (((uint32_t)(((irkey->t)).irt & IRT_TYPE) - (uint32_t)(IRT_STR) <= (uint32_t)(IRT_UDATA-IRT_STR)))!(((IRType)((irkey->t).irt & IRT_TYPE)) == IRT_NIL)(((((((&as->ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&as->ir[(ir->op1)])))->o == IR_KGC", "lj_asm_x86.h", 1212, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&as->ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NUM) || ((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT))(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NUM)((t).irt & IRT_GUARD) || !(ir->op2 & 0x04)0 || !(((IRType)((t).irt & IRT_TYPE)) == IRT_INT) || (ir->op2 & (0x08|0x02))(((IRType)((t).irt & IRT_TYPE)) == IRT_NUM) || (((IRType)((t).irt & IRT_TYPE)) == IRT_INT) || (((uint32_t)(((t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))(((uint32_t)(((t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))) || (((IRType)((t).irt & IRT_TYPE)) == IRT_NUM)(down < RID_MAX_GPR) == (up < RID_MAX_GPR)!((int)((as->freeset) >> (down)) & 1) && ((int)((as->freeset) >> (up)) & 1)((IRType)((ir->t).irt & IRT_TYPE)) != st(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) && st == IRT_NUM(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32)RED ZONE OVERFLOW: %p IR %04d %02d %04d %04d !((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE)!((((IRType)((ir->t).irt & IRT_TYPE)) == IRT_FLOAT) && ((ref) < REF_BIAS))ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEWirs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTORE || irs->o == IR_XSTORE(((&((&((GG_State *)((char *)(as->J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))(((uint32_t)(((kt)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))!(((IRType)((kt).irt & IRT_TYPE)) == IRT_NIL)((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_asm.c", 997, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~4u)!(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NIL)(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_STR) <= (uint32_t)(IRT_UDATA-IRT_STR)))(J->parent)>0 && (MSize)(J->parent)sizetrace(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))J->sizetrace((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))))!((!(((ir)->r) & 0x80)) || (((ir)->s) != 0))((((1u<> ((IRType)((ir->t).irt & IRT_TYPE))) & 1) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U8)ir->o == IR_EQ || ir->o == IR_NE(&as->ir[(ir->op1)])->o == IR_UREFC((&as->ir[(ir->op2)]))->o == IR_KGC(ir->o == IR_SLOAD && (ir->op2 & 0x01)) || ((!1) && ir->o == IR_HIOP) || ir->o == IR_PVAL(lnk)>0 && (MSize)(lnk)J->sizetraceexitstub_addr_jmprellj_asm_patchexitlj_asm_tracecheckmclimptr2addrctype_checkasm_collectargsasm_tail_linkra_allocrefra_rematkra_evictra_restoreasm_stack_restoreirt_toitype_asm_ir=o, on 3"rwfrU%D4frra_renameasm_loop_fixupasm_hiopasm_compemit_sjccasm_fuseloadasm_fusefref  asm_fusestrrefasm_fuseahurefasm_fusearefasm_fuseabaseasm_retfra_leftasm_setupresultra_destregasm_gencallasm_swapopsasm_fpmathasm_hrefir_khashasm_hrefkasm_newrefra_releasetmpasm_urefasm_ahuvloadasm_fxloadasm_sloadasm_ahustoreasm_fxstoreasm_cnewasm_obarasm_convasm_snap_alloc1asm_head_sideasm_tail_fixupGCC: (Debian 4.7.3-4) 4.7.3zRx  AC [ <iAC d \LSC Y |AC  )JC Y AC  $AC L AC  ITC Y @GAC B `aC Y TAC O eC Q AC  %AC (AC Mt (AC  HAC  (hREC P x A (HC I q A  mAC L\ \AC W AC  $rAC m D,AC g doAC j YAC T AC M AC  5EC k AC  $rAC m $DAC T lEAC @  %AC E $AC P ^AC Y (AC X $$#AC T  L>AC Et  lAC E{ $AC P $AC T (rAC XU  bAC CZ $0AC T (X/AC X $=AC I/ (AC X 1AC l  AC E ( KC G I A H'AC E] (hVAC X9 $AC P $AC Tn $AC P $ ZAC PE $4AC P $\+AC P (AC X (AC Xc $AC P $ 'AC I $, AC T (T AC X $ $AC T  $ XAC T?  SAC P~ $ XAC T? ( AC X $H ~AC Te (p AC X ( AC X ( AC X ( AC X ( AC M (L tAC XW (x AC M $ -AC T $ AC K ( AC M  AC G  D OAC L~ $h AC P  IAC E  xAC Gl  BAC Ex  AC G $ jAC SR  @ AC J (d RAC M@ $ AC K  oAC Ee $ AC P  $hAC G\ (,E AC M3 (X AC M (AC M (1AC Pr1 .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @ap(A&,12Q@2)T0O>\0-eJzPupQ`  ( h    i&L/WHX q)z kO Ia G , ETSUl"uHQ%vM R & m \  r \ , o& Y3P ;b D 5P2Y:rdmiEx%  ^ # > -x FPj_xU<r b  / 4 M:"=Y rw$k 8'1i'e( ('(V** )++Z ,,+!y :-D@ ]0fc Z2h3'l 5Y6 [:$;X6 <S *=X(A>NX@~Z@fArBvEKF/Gt L~ N-OQ  6xT@UOLcUWJ pRWIyWxXBUXYj|YwZR \s^o^ bhhcE ". ;7 Tm ]@v`q  X  # 1  J c    |            Ey - ; z1H V g x         lj_asm.casm_stack_adjustnoconflictemit_jcc__PRETTY_FUNCTION__.5779asm_callx_flags__PRETTY_FUNCTION__.3893ptr2addr__PRETTY_FUNCTION__.5671asm_collectargs__PRETTY_FUNCTION__.6023asm_setup_call_slotsasm_hiop__PRETTY_FUNCTION__.6769emit_sjcc__PRETTY_FUNCTION__.5764asm_isk32asm_swapops__PRETTY_FUNCTION__.6659ra_releasetmp__PRETTY_FUNCTION__.5844ra_spillasm_guardcc__PRETTY_FUNCTION__.5170asm_mclimitasm_exitstub_setupra_setupemit_rremit_loadiemit_loadu64emit_call_emit_movrremit_rmroemit_gmroiemit_movmroiemit_sploademit_spstorera_saveemit_griemit_addptremit_mrmemit_gmrmiemit_rmaemit_loadnra_rematk__PRETTY_FUNCTION__.5832ra_restore__PRETTY_FUNCTION__.5852ra_evict__PRETTY_FUNCTION__.5864asm_stack_checkra_allocref__PRETTY_FUNCTION__.5911ra_alloc1asm_fusefref__PRETTY_FUNCTION__.6242field_ofsasm_fusestrref__PRETTY_FUNCTION__.6249asm_fusexrefasm_fusearef__PRETTY_FUNCTION__.6222__PRETTY_FUNCTION__.6215asm_fuseahuref__PRETTY_FUNCTION__.6234asm_retf__PRETTY_FUNCTION__.6349asm_ahustore__PRETTY_FUNCTION__.6539__PRETTY_FUNCTION__.4181asm_fxstore__PRETTY_FUNCTION__.6513asm_fuseload__PRETTY_FUNCTION__.6270asm_fuseloadmasm_x87loadra_pickra_scratchasm_phira_destra_destreg__PRETTY_FUNCTION__.5940asm_arefasm_frefasm_strrefasm_fxload__PRETTY_FUNCTION__.6494asm_hrefk__PRETTY_FUNCTION__.6448asm_uref__PRETTY_FUNCTION__.6466asm_load_lightud64asm_ahuvload__PRETTY_FUNCTION__.6526asm_tointgasm_sload__PRETTY_FUNCTION__.6547asm_tbarra_rename__PRETTY_FUNCTION__.5927asm_phi_breakra_left__PRETTY_FUNCTION__.5949asm_bitshiftasm_neg_notasm_fparithasm_min_maxasm_intarithasm_tobitasm_phi_fixupasm_conv__PRETTY_FUNCTION__.6373ra_evictset__PRETTY_FUNCTION__.5649asm_setupresult__PRETTY_FUNCTION__.6318ra_evictkasm_gencall__PRETTY_FUNCTION__.6305asm_strtoasm_arith64asm_newref__PRETTY_FUNCTION__.6458asm_snewasm_tnewasm_tdupasm_tostrasm_callasm_callxasm_cnew__PRETTY_FUNCTION__.6561asm_gc_checkasm_gcstepasm_snap_alloc1__PRETTY_FUNCTION__.5969asm_snap_prepasm_href__PRETTY_FUNCTION__.6438__PRETTY_FUNCTION__.6046asm_loop__PRETTY_FUNCTION__.6811__PRETTY_FUNCTION__.6960__PRETTY_FUNCTION__.7106__PRETTY_FUNCTION__.7034__PRETTY_FUNCTION__.6794__PRETTY_FUNCTION__.6854asm_compmap__PRETTY_FUNCTION__.6751__PRETTY_FUNCTION__.6627__PRETTY_FUNCTION__.6582__PRETTY_FUNCTION__.6982__PRETTY_FUNCTION__.6834__assert_faillj_ir_modelj_trace_errlj_mcode_limiterrlj_vm_exit_handlerlj_ir_emitlj_ir_k64_findstderrfprintflj_ir_callinfolj_ctype_sizelj_asm_patchexitlj_mcode_patchlj_mcode_synclj_asm_tracelj_ir_growtoplj_mcode_reservelj_snap_regspmaplj_vm_floor_sselj_vm_ceil_sselj_vm_trunc_sselj_vm_pow_sselj_vm_exp_x87lj_vm_exp2_x87lj_vm_powi_sselj_trace_err_infolj_vm_exit_interp MW  K MU &Z 1_ M   M I R" M, I1 \6 M I (p MOz m z Ma  |= MG mL Qb  MU I P MH  x MW # (r  MW   M I PW Ma If k M I   M* I/ 4 M I  M I 8C MHM R xW M I  Mx m  h M M m b Ml mq v M m  e Mo mt y M m  M m ] Mg ml qV! M`! me! Xj!! M! &! .!! M! &! E!# M.# M8# m=# zB#r# M|# m# (#$ M$ m!$ &$% Mk)% m.% 3%;))* M* I* H*7- M- My- m- (-. M@. m. R.n/ M@x/ m}/ p// M@/ m/ j// M/ &/ .// M/ &/ E// M@0 m 0 080 M@B0 mG0 L0p0 Mz0 &0 .00 M0 &0 E0(1 Mc21 m71 <1I1 McS1 mX1 H]13 Ml3 m3 @34 Ml4 m4 X 425 M<5 &A5 .F5P5 MZ5 &_5 Ed56 M6 m6 66 M6 m6 66 M7 m7  7@8 MJ8 mO8 h T8&9 M09 m59 0 :99 M9 &9 .99 M9 &9 E9; M6; I; ;< M6< I< <<= M= I= =FG MG mG 8 GwH/I M9I m>I h CI=JcJ`K MjK moK tKLM  SM]MbM M~lM IqM zvM"N  )N3N8N M~BN IGN zLNsO M}O mO H OEP  LPVP[P M~eP IjP zoP(Q  /Q9Q>Q M~HQ IMQ zRQR M R mR HR-S M 7S mw ICw zHww M@w mw w x M@x mx " xMx M@Wx m\x "ax y MWy y yoyy MHy y xyy MWz  z z M~H IM zR M m <.   M~ˇ IЇ zՇ M- M7 m< xA M  MX' m, 1z MX m ( ؘ Mݘ 6 M#@ mE zJO M#Y m^ zc= , M6 m; P@w  M% m* x/^ϟ  ֟ M~ I z M I /  6@E M~O IT zYƤ  ͤפܤ M~ I zI  PZ_ M~i In zs:  AKP M~Z I_ zdçe  lv{ M~ I z M m  ' 7 MWA F K-#F#F#F# F#(F#0F#8F#@F#HF#P&#X#`#h#p#x#l-L---;-E-Ѐ (08@PHPPPXP`Phpxe (ր0ր8ր@HրPXր`hpxeeeeeeրe~ (08@HPX`hspxBB EtBBBBBBBBBB/H _(x08@ÐHܐPX`h"pexԚӔ)f{ƛڛ*>RR R(f0f8z@RHPX`hpxʜޜܞ   1bܘnn n(0"8<@˙ @ `k$Dd"Qv,LlM  &   ( H\ h  P b  2(:Hpi(PpjU<4\ :"w$8'i' e(L(l(**)++8,`,-0Z2 h30 5X Y6 [: ; < *= >L X@t @ A B vE$ KFP /G| L N O Q$ xTH Ul cU RW W X UX YD |Yh wZ \ s^ ^b0hc\mEyzlj_trace.o/ 1378727472 1000 1000 100664 21752 ` ELF>,@@UHV0f~TuHuDF8AN4TDEAMA wEB$AEt D;<rEH0BH9tDF:H8JtIQt&Nt!EvDNtAEJPuyt;<rL0A H9tD!UtDB&NPf9u FVfB&fD<D9rH0HtXBVftOf9tA9w3f9u FVfBV0A9wBVfu]UHSHHHG0@HrH:HCH[]UHLJ HW`HBHHHJ*H`UHHW`HBHHHJ*H`UHHVPft#;sNPHNV+VHL VHJH)P HxP]UHG%tGWG%@VuG@Uv/HGDHtHHOt LtRuHH9u]Åt*;<s"H04Htf~Tu UH ]UHAUATSHIF&ft[H;r& ;r LH4LAD$&fuH[A\A]]UHAWAVAUATSHH}DwI@A@^MAAMeM~|D9w/DIIA;r! IIIB Hf{Tu HLfCPIB MfAdž(AdžIHǺtAƆIf@t fH@t HɸHt Ht fHtLIHǺtAƆI @t fH@t HɸHt Ht fHtHEȋP9ȖH}HøHH}HMHQHJHuHNBxuPF@(tHH}M#H[A\A]A^A_]UHAVAUATSIHGx@%t^P uDHWh Nt(Kt#QtUtn ID$xH%ADŽ$8LJ8D<AviI$0<u?-uBI$0<uCA$8E$<A$8A9wA$v =fFD9v^I$<I$0I|$`AI$0E9$<v DI$0AE;$<rA$8u?A$@tyI|$`ADŽ$wI$0D$L`At A$I|$_@t fH@t HɸHt Ht fHtfA\$PAD$AD$I$ID$I$ID$ I$ ID$(AƄ$AƄ$AƄ$AƄ$ADŽ$,ID$xAD$0Ml$`AEH9ȖLIH/LIUHJIMBxuPAE@(tIEHPIU*ID$pIUHJIMBxuPAE@(tID$xH@IT$hH)HIEHHIM*A$P t0IUHJIM*A$T IEHHIM*LLLD<D9d[A\A]A^]UHAWAVAUATSH(IHHhHE$ǃHjH} HX Ht%u` HǃX ƃǃPAEz%LHLLKPIUHrIu*HSpIMHqIuAzuJAUR(tHSxHtH@HKhH)HIUHrIu*IUHrIu*HLLLHo HX Ht` HǃX ǃ@tgSPf9SRu]uMǃPHHt"fCRCCǃbHǃǃPHHs4K8ы{0DsPBK$ƄJfDvP&fSVfDp&0HC PD ЃSҋP tf{TuHK@T ;<rH04HP t;<rH0T H@ DCTft ;<rH0f@LPXfSXfDpXHs@Hǃ,DkD+kISCHPIL`H{`ILx`HI$HCID$HCID$HCID$HC ID$ HC(ID$(HC0ID$0HC8ID$8HC@ID$@HCHID$HHCPID$PHCXID$XA$DAD$AD$ CHLH)IL$SHCH4LLMMl$ SHHs LCI|I|$(SHHs(fCPAT$PH0D$LhAt$PLLc`AD$9ȖLIHLIT$HJIL$BxuPAD$@(tID$HPIT$EA*LLǃPǃLIEHPIUfWHX Ht` HǃX Lc`ǃ,HID$PwEvBD,pAuHID$ǃYAP C8E{4DC0H9tH H9uCӴimNA90J`v:EgAH%TH@uP?‰ӰHHfTfDtHH?fC CPfEDEIT$HUAL$$MfCRCAD$K9ȖLHEH1LIT$HJIL$BxuPAD$@(tID$HPIT$U*HC`HPHHsh9BHurHu@HH)HH)‹xuIT$HJIL$BxuHAT$R(txt@H)HID$HPIT$*EHMH)AT$$ID$HpIt$HTHH Jv<H9uPAD$@(tID$HPIT$H HH Jv<H9uPAD$@(tHuLUH0D;8sD8fCPIl$A uxH{xuHChPvEt9ǃP ǃT ǃH?AuLǃPǃHh H([A\A]A^A_]UHHHHHHPHǏHHHHG]UHATSHLH~bH9tHH~9w5H<t5HH9|LLHH)S H{SHH)S H{S)HHH4)S H{SHH)S H{S[A\]UHSHHHwhHG`H@@HGpxuPH@HSx ǃH{`HھuH[]UHH]LeLmLuH HIID0D? fC u3`u*ǃP ǃT ǃIuHE4$H]LeLmLuUHAWAVAUATSH8IIID8I\$`A$P t A;$<rI$0Ht@A9$T rLeLuHUHtC HHEHC H+CH= 8HA$P HCHHHK*A$T HCHHHK*HCHPHSHCHPHSHSI*HHSHH=uڰHHSAHSf.{H HCHH=uHuHLuHC0HHEDpCP)tu@HA$P t A;$<rI$0H@ A$T A$`u]HPtNPA;$|;A$tADŽ$LLAit) < 0xfffeffffu)abort((fn)->c.ffid == 0)J->pt != ((void *)0)J->state == LJ_TRACE_IDLET->root == 0 && pt != ((void *)0)(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace((((((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace) ? (void) (0) : __assert_fail ("(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace", "lj_trace.c", 190, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(((BCReg)((*pc)>>16)))]).gcptr32))) == T((BCOp)((*pc)&0xff)) == BC_JFORIop == BC_ITERL || op == BC_LOOP || bc_isret(op)((((((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace) ? (void) (0) : __assert_fail ("(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace", "lj_trace.c", 205, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(((BCReg)((*pc)>>16)))]).gcptr32))) == T(pt->trace)>0 && (MSize)(pt->trace)sizetrace(T2->nextroot)>0 && (MSize)(T2->nextroot)sizetrace(pt->trace)>0 && (MSize)(pt->trace)<(&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->sizetrace(i)>0 && (MSize)(i)sizetrace!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((BCOp)((*J->pc)&0xff)) == BC_FORL || ((BCOp)((*J->pc)&0xff)) == BC_ITERL || ((BCOp)((*J->pc)&0xff)) == BC_LOOP || ((BCOp)((*J->pc)&0xff)) == BC_FUNCF(J->freetrace)>0 && (MSize)(J->freetrace)sizetrace((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g)->hookmask & 0x40) == 0J->parent != 0 && J->cur.root != 0(J->parent)>0 && (MSize)(J->parent)sizetrace(J->cur.root)>0 && (MSize)(J->cur.root)sizetrace!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))bc_isret(((BCOp)((*J->pc)&0xff)))i == (ptrdiff_t)J->cur.traceno || ((((i)>0 && (MSize)(i)sizetrace) ? (void) (0) : __assert_fail ("(i)>0 && (MSize)(i)sizetrace", "lj_trace.c", 309, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(i)]).gcptr32))) == ((void *)0)T != ((void *)0) && J->exitno < T->nsnaptrace_flushroottrace_unpatchlj_trace_flushprotolj_trace_flushallsetgcVlj_trace_freestatetrace_starttrace_findfreetrace_stopnumberVinttrace_abortcopyTVtrace_downreclj_trace_exittrace_hotside0@GCC: (Debian 4.7.3-4) 4.7.3zRx AC ~ <3AC Ei \4AC x*AC _AC Z UAC P 0eC F $AC Iq (AC M $HGAC G; (p4 AC M" >AC y  $AC C  bAC EX $AC T| ,,AC M .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @x;& , 12 @2 T'OxP\)i0)r))XxS ,0  p7 5N3\ u@R$Gs k 4   # <Un`     4* _sU.0=Qwcq -<CVe>x$bclj_trace.ctrace_flushroot__PRETTY_FUNCTION__.5326__PRETTY_FUNCTION__.5314trace_exit_cp__PRETTY_FUNCTION__.5341__PRETTY_FUNCTION__.5351__PRETTY_FUNCTION__.3380trace_start__PRETTY_FUNCTION__.5391__PRETTY_FUNCTION__.5277trace_state__PRETTY_FUNCTION__.5411__PRETTY_FUNCTION__.3440__PRETTY_FUNCTION__.5433__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5418__PRETTY_FUNCTION__.5366__PRETTY_FUNCTION__.5510__PRETTY_FUNCTION__.5475.LC34__assert_faillj_snap_restorelj_trace_errlj_err_throwlj_trace_err_infolj_trace_freelj_trace_reenableprotolj_trace_flushlj_trace_flushprotolj_trace_flushalllj_mcode_freelj_vmevent_preparelj_str_newlj_vmevent_calllj_mem_growlj_record_setuplj_dispatch_updatelj_record_inslj_opt_dcelj_opt_looplj_opt_sinklj_asm_tracelj_asm_patchexitlj_mcode_commitlj_mem_reallocmemcpylj_gc_barriertracelj_mcode_abortlj_trace_initstatelj_trace_freestatelj_ir_k64_freealllj_trace_inslj_vm_cpcalllj_trace_hot__errno_locationlj_trace_exitlj_state_growstacklj_gc_step  # ( \ s }  (   p        % / 4  9 c m r (w             8 Z d i pn !##- 7 < A  @  ( *t+ ), R / P -c sm r xw     j. s  H ) + 8" ,X Rb /g Pl  R / P  ? -G / X 0 + R / P  - 1i 2q 3 4 5 Q [ ` e |    6         = G L >Q ]78V9r99:+ @,7 RA /F PK q-0;  / E  `+w _, R / P r R| / P    e  ( /- H2 ~  / H -   y    x X)x0 `! & (+ = `G L Q b*j>G k T@B?B6 @ E J o y ~    @+D>-E ) . 3     ?   ( ` (08@HPX ` h p x%%%<< <<<<<<? @`|s wL$tk c0lj_gdbjit.o/ 1378727471 1000 1000 100664 925 ` ELF>@@ GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.comment.note.GNU-stack@!@'@,0@5]]E  lj_gdbjit.c lj_ctype.o/ 1378727472 1000 1000 100664 16432 ` ELF>P!@@ UHLHL)I9s G$5 t A@ M@G I)Bt A uL]UHHHW(H9w G$ HPH@p]UHHHG3AH9s G$)HA)ƃ0@1օuHG ]UHHGH(H9r G$ @0HHG]UHH]LeHIttLH]LeUHH]LeLmLuH HIAI̋v t/~tV Hk- t HCL+(LHHC LHHHQLHDHH]LeLmLuUHH]LeLmH HDgHHuID;c r-Av HS AH3HAD$CDHHIUBfBfB B DH]LeLmUHAWAVAUATSHIAAՉ1)AAA1A)ADGHHttcIAV9r89rHHD9 u D9hX uA^A;^ r,v IV AI6ICAFHID$IDlIfDEIhCL~IfL ID fC\~H[A\A]A^A_]UHN I>1)1)ȃHhLGfN fTG]UHDI>D1AD)AA1AADD)ȃGtZLDWD9r D9rAIMEH L9uEADsLA@ uHH]UHAWAVAUATSHIIIHMMAI}t EED9rEIIAD$ I9uAD$HMȉEA$t t u%tA9wHHHuyu ^t t u%tA9wHHHtMHMLLHtMtA AT$HMIEd$fEnALH[A\A]A^A_]UHLt9rHLYt t ut9wHHLtÉ΁ t]UHLt9rHLuM%t9w*%t9@wHHLtwA]UHAFDFtaLDOD9s D9rHLЋAAA D@utD9rHL֋uN%tD9r*%tD9rHHL֋t%=0t)t t uH7%t;GrHHƋtv+ҋFHJHF]UHLt DGD9rHLϸt{u.΁u GauYuUw Hu AAD ȃvBtO 7tD9rHHLB]UHATSHLt9rAԉHL0Ɓt9rHLtĉ tuI%t9rHAuHsHH{( H{(Ht5xu*8HCEBHtxHD[A\]UHAWAVAUATSHXIAH֋WHHHHHDžDžHtV HHHHEtD;hrEIIDžDžHHHA$E|$L$tH\t]AuH3AuH HAu>uH HfAwTAuH?H'tqH YHB4HVHtuH HH HXHEȋLHzAuHLH:e%D DEDt&H A HAuH*HDžDžDž%=0vDžt,(Hn)HDž[HAHA$t t uH%t;ArHLt DHHH H;v Dž`H)ǃ0@9ׅuHH HHH9rHt?H]Ht7AuHHHtDHHO|Džt,(H|)HDž(H)HHL t;XrHIFuLHHH)LHX[A\A]A^A_]UHH ELELtEUAHMAHMHyHAIHHIHHHH)ƃ0@1HHuHEtH@-HUH)HUHATSHpIuEFEZEFZEHuH}HÃ}y Ef.{ D+HH|HuHÀ|aIiLˆDHSHuLHp[A\]UHAWAVAUATSHH}IǹH}HLAt AI@t fH@t HɸHt Ht fHtIAG AG_IGHE@IGAAAAES fCt uFLHHHMHHLH}H C LuDHLLlj_ctype.hid > 0 && id < cts->topunionstructbooldoublefloatlong doublecharunsigned charintshortunsigned_tvoidctypeenum__ptr32complex)))__attribute__((vector_size(0?(((GCobj *)(uintptr_t)(ct->name).gcptr32))->gch.gct == ~(~4u)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))(((ct->info) & (0xf0000000u|0x00100000u)) == (((CTInfo)(CT_ARRAY) << 28) + (0x00100000u)))((((ct->info)) >> 28) <= CT_HASSIZE)((((info)) >> 28) <= CT_HASSIZE) || ((((info)) >> 28) == CT_FUNC)va_list__builtin_va_list__gnuc_va_listptrdiff_tsize_twchar_tint8_tint16_tint32_tint64_tuint8_tuint16_tuint32_tuint64_tintptr_tuintptr_tvoid_Boolboolcharint__int8__int16__int32__int64floatdoublelongshort_Complexcomplex__complex__complex__signed__signed__signed__unsignedconst__const__const__volatile__volatile__volatile__restrict__restrict__restrict__inline__inline__inline__typedefexternstaticautoregister__extension____attribute__attribute__asm__asm__asm____declspec__cdecl__thiscall__fastcall__stdcall__ptr32__ptr64structunionenumsizeof__alignof__alignof__lj_ctype_newlj_ctype_internctype_checkctype_childlj_ctype_vlsizelj_ctype_infoctype_reprctype_preptype@B C   4@4      2 Pppp p p ppp p ppp p p p p  !! !##"""$%%% % &&!'()*++GCC: (Debian 4.7.3-4) 4.7.3zRx SAC N <&AC a \JAC E |*AC e  PAC L $AC T $AC P (EAC M3 <5AC p \AC  (|AC M AC  AC  AC  AC   (#AC C (LAC P xAC   AC G (AC M  |AC Ct .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @7,&x,x12x@2XT O`=\0ezu8>  P% * SS&&yJ4*?PN=])v     %@   7ER]iEy58V  # #.B?Xft|lj_ctype.cctype_prepstrctype_prepcctype_prepnumctype_appcctype_prepqualctype_preptype__PRETTY_FUNCTION__.4318__PRETTY_FUNCTION__.4163__PRETTY_FUNCTION__.4171__PRETTY_FUNCTION__.4054__PRETTY_FUNCTION__.4063__PRETTY_FUNCTION__.4240__PRETTY_FUNCTION__.4249__PRETTY_FUNCTION__.4339lj_ctype_typeinfo__assert_faillj_ctype_newlj_err_msglj_mem_growlj_ctype_internlj_ctype_addnamelj_ctype_getnamelj_ctype_getfieldqlj_ctype_rawreflj_ctype_sizelj_ctype_vlsizelj_ctype_infolj_ctype_metalj_tab_getstrlj_tab_getinthlj_ctype_reprlj_str_newlj_ctype_repr_int64lj_ctype_repr_complexlj_str_bufnumlj_ctype_initlj_mem_realloclj_ctype_freestatelj_ccallback_mcode_free ' q ){  ) 3 8 =Yp % * /8 B !G ,L  ! ,  !$ ,)  ! @  ! ,  ! @  % !* ,/`!  ! ,  ! @  !# ,(i s !x ,}  ! ,/ 9 !> ,Cx  ! ,  ! ,    1 ; !@ @E Y c !h ,m       ! , Y c h @m   ! ,   ! ,   ! , W a !f ,k  ' ( 'i s !x ,}   Q V+ ]F co o t ) q  D J  k ; E !J @Oc m !r ,wK ]a |   ! & +G Q !V ,[| **9*--*/*/ @ H**C1 0 k(08@ @S`y=@`8V  , P |?lj_cdata.o/ 1378727472 1000 1000 100664 13480 ` ELF>@@ UHAUATSHII"I<$t At$9rHHuKt9w' t9wHHHtÃwyt+I|$@ A;\$rfXLhH[A\A]]UHH]LeLmLuL}H0IAAAϻvB +I|$DJHTHH!LALH)H~'fAPfAXEhID$P0QD@0@(ȀAA fDqLH]LeLmLuL}UHIFt2W( ЃFGDHt0wD6wDFЋL t DAD9rHLɋuK%tA9w' %tA9wHHLɋtøwA tvHHPA)R IzAR FFVH))G HAR]UHSHHGHr ~]E{ uH(S!tVt\AA!AtTH)tuUVP 0 && id < cts->toplj_cdata.hlj_cdata.c(char *)cd - p < 65536lj_obj.hlj_gc.hct->size == 8sz == 8s->size == 8d->size == 8(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz((((ct->info)) >> 28) <= CT_HASSIZE) || ((((ct->info)) >> 28) == CT_FUNC) || ((((ct->info)) >> 28) == CT_EXTERN)!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))!(((ct->info) & (0xf0000000u|0x00800000u)) == (((CTInfo)(CT_PTR) << 28) + (0x00800000u)))(((ctt->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) && ctt->size <= 4((((s->info) >> 28) >> 1) == (CT_PTR >> 1)) || ((((s->info)) >> 28) == CT_FIELD)((((d->info) >> 28) >> 1) == (CT_PTR >> 1)) || ((((d->info)) >> 28) == CT_FIELD)((((d->info)) >> 28) <= CT_HASSIZE) && !((((d->info)) >> 28) == CT_VOID)ctype_checkctype_childlj_cdata_newlj_cdata_newvlj_cdata_freesetgcVlj_gc_barrierbacklj_cdata_indexcdata_getptrlj_cdata_getcdata_getconstlj_cdata_setGCC: (Debian 4.7.3-4) 4.7.3zRx $AC I  (DAC X pKAC F  AC E (AC M|  AC E $BAC E8 .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @(! &,,,12,@2OW07`TuX(p4  ]  % >%W3pAPb q ~    8HXftKE$ $ B1@Nlj_cdata.c__PRETTY_FUNCTION__.4054__PRETTY_FUNCTION__.4215__PRETTY_FUNCTION__.4273__PRETTY_FUNCTION__.4281__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.4300__PRETTY_FUNCTION__.4063__PRETTY_FUNCTION__.4201__PRETTY_FUNCTION__.4321__PRETTY_FUNCTION__.4329__PRETTY_FUNCTION__.4341lj_cdata_newreflj_ctype_intern__assert_faillj_mem_newgcolj_cdata_newvlj_mem_realloclj_cdata_freelj_cdata_setfinlj_tab_setlj_cdata_indexlj_ctype_sizelj_cconv_ct_ctlj_ctype_getfieldqlj_cdata_getlj_cconv_tv_bflj_cconv_tv_ctlj_cdata_setlj_cconv_bf_tvlj_err_callerlj_cconv_ct_tv7 A F  K      #     f % . 9a k p  u     3 . @ A P  P Y  P Y H ] g l  q b . a        Y  c h m     b . !@ qJ #O oT         ? I N  Sy    "#}           $ ) 9 C H  M  #         A qK #P oU d n s  x       . X# d %~ ~ .       ~ . w   $  ) c m r  w  & (  .      # ( > H M  R ~  .          %  / 4 9L V [  `  . x)* HtE$  lj_cconv.o/ 1378727473 1000 1000 100664 25800 ` ELF>H.@@UHt t uHt;OrHHȋu#@uDH tut'U uHt;OrHHn ]UHSHHH+7HHHPH{ UHH]LeLmLuH0A̸HH9IEEHU{IƋtHUHL_HAtU9U.Au(M܉#Uظ9uzAtmtcA 9uKsA9vuBu 1 u4-uDHLLu L9uH]LeLmLuUHAWAVAUATSH8H}IIHMLEDM^DjD"t Du}tu~C : u@uuEuu#ttDu%AtAtu'˿9tA AͿD9 $DDu7M9u2D9thHuH}LH}H+7HHHXEt+AtHH H}L+7LHHHPutHMHyIHѺ HEHxHپ  0 && id < cts->toplj_cconv.clj_cconv.hidx < 8lj_cdata.hsz == 8dsize == ssize(((o)->it) < 0xfffeffffu)lj_obj.hsz != 0xffffffffu0bsz == 1(((info) >> 8) & 127) == 1s->size == 8d->size == 4!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))!((((dinfo)) >> 28) == CT_ENUM) && !((((sinfo)) >> 28) == CT_ENUM)!((((dinfo)) >> 28) == CT_ATTRIB) && !((((sinfo)) >> 28) == CT_ATTRIB)!((((dinfo)) >> 28) == CT_NUM) || dsize > 0!((((sinfo)) >> 28) == CT_NUM) || ssize > 0!(((dinfo) & (0xf0000000u|0x08000000u)) == (((CTInfo)(CT_NUM) << 28) + (0x08000000u))) || dsize == 1 || dsize == 4!(((sinfo) & (0xf0000000u|0x08000000u)) == (((CTInfo)(CT_NUM) << 28) + (0x08000000u))) || ssize == 1 || ssize == 4!(((dinfo) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) || (1u<<((uint32_t)(__builtin_clz(dsize)^31))) == dsize!(((sinfo) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) || (1u<<((uint32_t)(__builtin_clz(ssize)^31))) == ssize!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz((((info)) >> 28) == CT_BITFIELD)pos < 8*(((info) >> 16) & 127)bsz > 0 && bsz <= 8*(((info) >> 16) & 127)(((GCobj *)(uintptr_t)(df->name).gcptr32))->gch.gct == ~(~4u)ctype_childctype_checklj_cconv_ct_ctcconv_idxcdata_getptrcdata_setptrlj_cconv_tv_ctsetgcVlj_cdata_newlj_cconv_tv_bflj_cconv_ct_tvcconv_substruct_tablj_cconv_bf_tvCGCC: (Debian 4.7.3-4) 4.7.3zRx AC  <5AC E$X*AC T ( AC M (AC M ]AC X $AC I ( AC M (LAC Xh (x AC M  tAC Ej (AC X .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @":"&T",T"12T"@20#T(O]\+i0+r++c  -2( 7  5  N5_x' 1 > KZa n'@dTm}      6*`  "'7E ]Tbiq t lj_cconv.ccconv_childqual__PRETTY_FUNCTION__.4024__PRETTY_FUNCTION__.4015cconv_err_initov__PRETTY_FUNCTION__.4281__PRETTY_FUNCTION__.4169__PRETTY_FUNCTION__.4103__PRETTY_FUNCTION__.4109__PRETTY_FUNCTION__.4346__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4117__PRETTY_FUNCTION__.4360__PRETTY_FUNCTION__.4446cconv_substruct_tab__PRETTY_FUNCTION__.4403__PRETTY_FUNCTION__.4425cconv_substruct_init.LC16__assert_faillj_ctype_reprlj_err_callervlj_cconv_compatptrlj_cconv_ct_ctmemcpymemsetlj_obj_typenamelj_err_argvlj_cconv_tv_ctlj_cdata_newreflj_mem_newgcolj_cconv_tv_bflj_err_callerlj_cconv_bf_tvlj_cconv_ct_tvlj_tab_getinthlj_tab_getstrlj_ctype_internlj_ctype_getfieldqlj_ccallback_newlj_obj_itypenamelj_cconv_multi_initlj_ctype_rawreflj_cconv_ct_init % * /D N S  X       2 4!  # x  #    # " , #1 86U _ #d hi  #   # X  #   ' . 9 K 'U .Z 9_t {#$#Ni                   ) .  3 T $m w |       $     ( -  2 R \ a f y     " "     ) .  3 W " # ! 1 A L : >D AI LN l ! > A L  !  # T ' #H { %  &  v    " K # c*(_ Zi }n s K #          F aP AU Zg)v     Z } # n' #, 1d nn #s x n #  n # 8+8 nB #G L  #   #     -G Q V  [s-  #   # 8+A K #P U    *.k u #z h/       .-E,       v     } #     . 8 =  Bu0    1 } #  %U _ d i~    #8 B G L` j o  t.-A#l$$T2y 3&     / 9 >  Cc"    e o t y    -,  * / 4E O T  Y5F $` 4| -        M!-!#!$!$x0 0 (0 00 80 @GHGPX`0 hp x0 55x0 0 0 0 0 ]  0 0 0 0 0     (0 00 80 @0 H P X0 `0 h p^ x^ 0 0 0 0 0 0  0 0 0 0 0 0 0 0  @\6`" i$dP | lj_ccall.o/ 1378727473 1000 1000 100664 11920 ` ELF>@@ UHAVAUATSH~IIAnM$t A|$9rHLDK u|Hދt t u%t9wHHLƋtLL uLAuwHދt t u%t9wHHLƋtLLg[fAFA IVF[A\A]A^]UHAWAVAUATSHIIA΋Ht t uIU%tA;ErIIILA$tAD$Eȋvu̅DLLL6]ȉD)9Ewqu LQa%=vV!ʺEƒwLA  IOH[A\A]A^A_]UHVPHt;GrHHʋ20u Ztu  4u&zDt]UHAWAVAUATSH8HGDIFItA9rIIIA$uL%t9w' %t9wIIIA$tƒ ED$A$t t u%t9wIIIA$tA$^ AuF#AtHFHHH@HHHHHHHHHLt t uI?%tAw9rHHHt8u Ct Dž%=4tDžDCE4$EtA9rDHHuJ%t9w' %t9rHHHtøwBA9t+ApII@ E;wrfDpHHBHPHHQD(@A} uAUA@(tu`DžDžHHLtƅILDž$ƅDžƅDžAD$DEtaIAwA9sHHȋt4?A9rHHȋu @DEuHH@HHH9DžDžDžDLI܃tkIA;OrHHP t%-H u HLLI7tAO9rHHuL%t9w)%t9wHHHtDkuA8uAAhDžDžHHLNHDžHDžDALHHLtu,tDsHHHH LHH͠utHH͠*t%HHHH ˆHH%=4A$DIIHI։Dw LՠDžxDžv)-!‰D vHLDALLHLu5Sw-tuAAAuAAAAuauXHHHHI9u6H(HHfW(IL9%DLDžDžEt Hw DžLI+ALJHAt6HH HIw(HH@IHˋt t u%tA;GrHHHˋt'HHBxtCD`IDžDžHHLNsut4H H$HH tHHHtHHHHHLA4utHHAxtJ@{uH HPAH HPH0HPAt"HL 8LEL %=0uXHH@HHHLAA ALAEP$9P rLAA$Aʃ4  DžDž DžAAD:AAADžDH8[A\A]A^A_]lj_ctype.hid > 0 && id < cts->toplj_ccall.clj_cdata.hsz == 8lj_obj.h!(rcl[i] & 4)(((L->top-1)->it) == (~10u))!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((((ct->info)) >> 28) <= CT_HASSIZE)(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((ctf->info)) >> 28) == CT_FIELD)!((((ctr->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_ARRAY) << 28) + (0))) || ((((ctr->info)) >> 28) == CT_STRUCT))ctype_checkctype_childcdata_getptrlj_cdata_newsetgcVccall_set_argsccall_classify_ctccall_struct_regccall_get_resultsGCC: (Debian 4.7.3-4) 4.7.3zRx $AC G (DYAC MG pAC  (AC P .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @ h &,12u@2XO W0`up0.` 0  " ; TYfP % 29p  #"8HVdrlj_ccall.cccall_classify_struct__PRETTY_FUNCTION__.4054__PRETTY_FUNCTION__.4063ccall_classify_ct__PRETTY_FUNCTION__.5000__PRETTY_FUNCTION__.4201__PRETTY_FUNCTION__.4215__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.5088__PRETTY_FUNCTION__.5019__PRETTY_FUNCTION__.5106__assert_faillj_ccall_ctid_vararglj_ctype_internlj_ccall_funclj_mem_newgcolj_err_callerlj_cconv_ct_tvmemcpylj_vm_ffi_calllj_tab_setlj_cconv_tv_ctlj_gc_step@ J O  T       <  F K P` j o  t     !7 A F  K P # xY c h  mA K P  U             ] g .l 9q                & %0 .5 :GY c h  m 2 A     " , 1  6 ^ 9h #m r             1 p; #@ JE   #         g q #v X{N  # X$ . #3 08Z ! Ht"lj_ccallback.o/ 1378727473 1000 1000 100664 9624 ` ELF>@@ UHH+HwAN;:iҌ)R9E]HHtUH]UHAWAVAUATSH(IHGHEH_Hut{|H}HMHQHJHuHNBxuPF@(tHHtH}пTH}HG0HF ~FFHw0H_I$HUE$E;$DI$PЅM4$A;T$rHIE>I|$(D;os IcՋGHDxtI|$(D;os McGJD"HUAAHUAAD{SHCHHuH+NK HFHFMuI|$|zuH}HG0RHPHUȋB H+BH= HHEHHA^^I<$ED$D9s#AAE'I<$ED$A9wHH tHދt t u%tD9rHHHtV%=uEЃw#UMD0E$Aw EODpADH}LALiLL[HEHHH([A\A]A^A_]UHAWAVAUATSHIH_LkHCHCH9w@xu@HS0HHDBHC@M$t A|$9rAIMAuJ%t9w& %t9wIIMAtÃto%IT$pM|$0=LEAHLLLAu6AVw-tuAAAuAAAHC0H@ HC0HkLkADŽ$H[A\A]A^A_]Ë UHAWAVAUATSHHIՃ~6t t uL tK9rHL΋tILσ6t t ut9wHHDAAtAGEPAvAtE ~ 9v A9wHH teHt t u%t9wHHttt+x(AA!FMM)ILDA9s)DfA 0 && id < cts->topp - page <= (4096 * 1)lj_gc.h!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((((MSize)(((int32_t)slot)) < (MSize)((cts->miscmap))->asize) ? (&(((TValue *)(void *)(uintptr_t)(((cts->miscmap))->array).ptr32))[(((int32_t)slot))]) : lj_tab_getinth((cts->miscmap), ((int32_t)slot))))->it) == (~8u))((((ctf->info)) >> 28) == CT_FIELD)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpauselj_ccallback_entersetgcVctype_checkcallback_conv_argsctype_childlj_gc_barrierbackcallback_checkfunccallback_mcode_initGCC: (Debian 4.7.3-4) 4.7.3zRx \AC W <MC K (\AC M ({AC Mi LOC M F UBBBBA .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @f 0 & , 12 k@2 FO`W0`!u(p %x (h ()B [0tC pP  \\ y .9>M[n}X{lj_ccallback.c__PRETTY_FUNCTION__.5433__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4214__PRETTY_FUNCTION__.5409__PRETTY_FUNCTION__.4223__PRETTY_FUNCTION__.5463__PRETTY_FUNCTION__.5336__PRETTY_FUNCTION__.3350lj_ccallback_ptr2slotlj_ccallback_mcode_freemunmaplj_ccallback_enter__assert_faillj_err_strexitlj_tab_getinthlj_err_callerlj_state_growstacklj_cconv_tv_ctlj_ccallback_leavelj_cconv_ct_tvlj_ccallback_newmmap64lj_vm_ffi_callbacklj_mcode_syncmprotectlj_mem_growmemsetlj_tab_setinthr       7  ) 4 0   (.  )$ 4)J 0T Y ^| C ) 0  ) 4.  ) 4  )  4_ C# )( 0-D N )S 4X C ) 0  ) 47 A )F 4Kl pv {  C ) 0  ) 4! "q z  L  # $ % &) 'Y c  h m  P c   P c   @\`yXlj_carith.o/ 1378727473 1000 1000 100664 12664 ` ELF>@@ UHHHt HH]UHHt$HuHH9tHHH?HH H]UHHHt HHH]UHHt)HuHH9tHHH?H HH]UHHt@@u HH@tHHt%HHt@tHHHHuH]øHtIHy2HHt5Ht(Hu$HHHUH]@UHAWAVAUATSHhIuGDILgID$H9Gw LmEAD$ E $AAI?t EGD9rHHuK%tA9w' %tA9wHHHtÃJu EILx)tMILx%= t t u%tA9wHHHt_t ILxMMILx LItA;GrHH‹u2I%tA;GrHHIUHxIE=w6IAwHIEMeu:IAwHIEIEwYID$IT$}HEƒxt?@I7tAO9rHHHk %t9w*@ %t9wHHHt A$AHMHLHtX uLItA;WrHHHxHHHA'+EH\ IEIEEII} H]u K LeA4$ A|$~ t A tA tAEA IE9owDHHUHHxALEHMHHL}ALEHMLHxL}t-}tY}IVHEH9EB'IVA uHMH9M HEH9EBIVA uHMH9MHEH9EЃBI?AwA9rHUHuI%t9w& %t9wHHHtăwzt+IH@ E;orfDhIFX@{ uSAF@(tE $HEHEHCHEH+EHCHEHEHCA uHuH}HCHuH}HC~A uHuH}HCeHuH}HCRA uHuH}HC9HuH}HC&HEHHCAFP$9P L0} AŃ}tEuUHUȋ t0HMHMtIVI9B HLFEt=3LP*IvL+eHcLLH?H*F}uIVL;eB}t{IVL9eЃBbE HUȋLEI7A wHưAHMLEH]} 7/LmAEt%=0 HEHEI7A wHưAMHMHLLeL3LHHEI3 LI?tAw9rHHuHt9w' t9wHHtƃwxt+I@ A;_rfXL`IVBBx uAVHB(tJ$9J rLIFAVH@HH HJ9uRAF@(@ItA9rHuG%t9w) %t9wHt%DULHHIFHPI9Vx @@I?tAO9rHuE%t9r' %t9wHt%DULHH AE}uIF@zHDHt9IV|u.DDI+HHLHHDݠ>IFDt =vt DẢHHDݠHHoDD1u"McJLMcJT堾 LHMHU }tf }t} /. LLyrkLxIEIEZLe<%IFxIFxLeHh[A\A]A^A_]lj_ctype.hid > 0 && id < cts->toplj_cdata.hsz == 8lj_carith.c(((o2)->it) == (~10u))lj_obj.h0mm == MM_le!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))copyTVcarith_checkargctype_checkctype_childcdata_getptrlj_cdata_newsetgcVcarith_int64carith_ptrGCC: (Debian 4.7.3-4) 4.7.3zRx  AC [ <EAC @ \#AC ^ |AAC | PAC K (YBC G F A (TAC MB .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @ 0&,12p@2x TO(0\01eNzPu0 ` 4 P &h ?\ X@qu   8     Ee#!A2PCYTrTam{#lj_carith.c__PRETTY_FUNCTION__.4069__PRETTY_FUNCTION__.4216__PRETTY_FUNCTION__.4078__PRETTY_FUNCTION__.4303__PRETTY_FUNCTION__.4230__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4355__PRETTY_FUNCTION__.4328__PRETTY_FUNCTION__.3429lj_carith_divu64lj_carith_divi64lj_carith_modu64lj_carith_modi64lj_carith_powu64lj_carith_powi64lj_carith_oplj_err_argt__assert_faillj_ctype_internlj_ctype_getfieldqlj_cconv_ct_ctlj_mem_newgcolj_gc_steplj_cconv_compatptrlj_ctype_sizelj_ctype_metalj_ctype_reprlj_obj_itypenamelj_err_callervlj_meta_tailcall_ P   9 PC H  M h # . \   P    Xj Pt y  ~ P    P   * P4 9  >{ @ 6 B P    P    Ho Py ~  j Pt y  ~ P    P    u  # x% 7 PA F  K  Y   ! 4 M ` x 6 b  !6 "N # 6 d  P    1  P     #  P !  & Z Pd i  n  u # x   P     Y # 3 ! 8 Y   P    P    ;$ P    P   $s% &'0'8(  (> 0j @ `erlj_clib.o/ 1378727473 1000 1000 100664 7480 ` ELF> @@ UHH]LeLmH HIIH¾HHH@La ADiHSHrHs By uISR(tH]LeLmUHSHHHHUHSHHH8tH8uX(HHtMH8 tHt)tHHt<)uHHH)HH H[]UHH]LeLmLuL}HPIIIHvHÃxAD$DMg@LHuLEuIUXLHEȋ ItA;WrHHыuyvNtPyH**@@ftiItA;WrHHȋu&@ Hpxt=IuI>IHEȋ ttZMuLmI?Aw9urUHHuJ%t9r' %t9wHHHtăwzt+I@ UA;WrUfPLhCx uPAD$@(tHH]LeLmLuL}UHH]LeLmLuL}H@HIALzEAA/LHu[.LHuLHIHkA?luAiuAbtLH߸IHkDLIH*H8/:HHHH+HHHxIHH¾HHH8t6HHIHLHHutHHILMt,A@LIHuHHHLHL0LLH]LeLmLuL}UHSHHH?HtHH[]UH1H]lj_obj.hGROUPINPUTlj_ctype.hid > 0 && id < cts->toplj_clib.clj_cdata.h%s.solib%sr/* GNU ld script!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((ctt->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) && ctt->size <= 4(((GCobj *)(uintptr_t)(ctf->name).gcptr32))->gch.gct == ~(~4u)((((ct->info)) >> 28) == CT_FUNC) || ((((ct->info)) >> 28) == CT_EXTERN)(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == szctype_checklj_clib_indexlj_cdata_newsetgcVclib_extsymGCC: (Debian 4.7.3-4) 4.7.3zRx $AC P DAC E `AC E (AC X (%AC [ 'AC E] AC M .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @(h &,12l@2dO :W0& `C uH p `  x '-9H a z.    k *9?Mz%Zgnv|'lj_clib.cclib_new__PRETTY_FUNCTION__.3380clib_error_clib_check_lds__PRETTY_FUNCTION__.4061__PRETTY_FUNCTION__.4810__PRETTY_FUNCTION__.4799__PRETTY_FUNCTION__.4222lj_tab_newlj_udata_new__assert_faildlerrorlj_err_callermsgstrchrlj_str_newlj_clib_indexlj_tab_setstrlj_ctype_getnamelj_err_callervdlsymlj_mem_newgcolj_clib_loadlj_str_pushfdlopenfopen64fgetsfcloselj_clib_unloaddlcloselj_clib_default%8 '     N    :  D 8I (N     . 8    8# (F P U  Z      B (     I 'S X ] M!  S!+"<Y{ Y#$ [$!%>"Kay%%' Hdkzlj_cparse.o/ 1378727474 1000 1000 100664 36224 ` ELF> S@@ UHHW  t u 9tHHW GX]UHWv&uHGt $]UHGGPHHfD G4G,G8G0HGHG ]HG  t tHHHO H t u 9tHHG GXHW HHW \u UH]UH ~-~HcH8HcuH8H8]UHAVAUATSHHHHLPLXt&)`)p)U)])e)m)u)}AՅ=t uV{0u#{4u$HpHC($C0S0B;C4vHH HK(C0Ls( HILc8DžDž0HEH H0H(McH5LHLMt!H5HƑLHLKX~H¾LHLLc8DžDž0HEH H0H(McH5LHLUHSHHsHy H߸UHUHH]LeLmH HW4?v AD$Hw(H8DHC(Dc4S0D,S0H]LeLmËcvUHHjHHH1QfAA WHHHr fq fB PUHSHHCH[]UHH]LeLmLuH HHWHR@H t;rrAIIEeEuD$pcS,HGc,D%=uD!G,AH3DfDHnADfDHCHHfD?DDAUHHfTs,D DHc,H]LeLmLuUHAUATSHHG0D#Ics3S0B;C4v H{ HK(@4C0HS HHS \uHtHxS0B;C4vH+ HK(C0H{(Huu C +u C Cd uH߸EЉCA7 3S0B;C4v H HK(@4C0HS HHS \uHHxS0Hs(H{8HCK`HsH{@HC HC% ADDA|$D$HHS HHS \BH 5HS HHS \Hu1 fH߸\'HC 03HHC \u Hƃnn4bbtVa@effKtDt_t rEvtTx1 H߸ p f \ R H>AHct0 AAHS HHS \uHHuAS0B;C4v HGHK(@4C0HcDnHS HHS \uH$HtUFlHS HHS \uHHt%FlHS HHS \uHAS0B;C4v HTHK(@4C0ES0B;C4v H^ HK(@4C0HS HHS \uHW3A9kHS HHS \uH.A"uS0Hs(H{8HCfA[{0t 'HHC(CC A,HS HHS \uH*HS HHS \uH*uOHS HHS \uHs/u'HS HHS \HLt;*t t uH;qL;/gHS HHS \uH  ;u HS HHS \uH|HS HHS \HAHS HHS \uHj&HS HHS \ZH?AHS HHS \uH=^HS HHS \HA1HS HHS \uH= HS HHS \HAHS HHS \uHn=u-HS HHS \zHGA;<HS HHS \LHA WHS HHS \uH=u-HS HHS \HA ;>HS HHS \HA HS HHS \uHb>HS HHS \H7A }HS HHS \uHHSHHcȀx$u% H߸Ht H{8H;Wr HHBHCHBu#HSC HC@HHCA=w9=vB,CC AtH+WHHBfuBC vC nHS HHS \uXHNAFA>A6A.A&AA A A A DcDH[A\A]]ø9wuUH]UH9wt]UHAWAVAUATSH(IIEEAHHLD'WU_ DEt@IW@H EAtD;jrDHHȋM@EE:Eu)ېHHLIG@H0HA9rDHuG%t9w) %t9wHtɃt%=0? LnHHLuX uf}I@HuEDeHUD"HUȋMJHUMfJAE*uND%=uU U=uUE ‰UCt%I@UAEtfAAV,Ut4At tu!AGуA ԉE}3E9E&I@UDAŸME}FEDA9CE8 EIG@H0HA9rDHuG%t9w)%t9wHt%= u L"D%= AHHLt HHLX ufufE%= u LE%=t}u Ln}t"UEHH=v LIEE%D9v AA ċE%A tEDeI@UDAŋUUDH([A\A]A^A_]UHSHHHG@H+0HHxHH H߸UHAVAUATSH HG\G\~ YIuHGH+tLHj-HtLHAF~HtLH[A"!Hgt%LH7A>AAF (H1tUHEt,H\$Aľ)H$LHEfLHj)H*Ht@LHAvH{@t HH9AAF5&Hzt,LHJAv H{@AF*H=tLH)+HtLH)suUHS uBAHCAF* uC AHCAFuQC AC AFHSLu2HCD` HCD` H/=tAE&AF H߸[HEtcHuHAvH{@Iċt$H{@uIċt LH]HA C= t .AvH{@IŁ{ u)0t LH:H{@IH4{t HAEu3A}t,HSH{@AHMLIHt  u?HC@LH+0HHxHSHHLB H߸` uAT$AHA$AFsk\H [A\A]A^]UHAUATSH(HIAxEEA D$?HjtNHuH :HhHuHA<$tEEA$E9ECEAD$덾H t9HuHBA<$u }A$AD$ CHt9HuHA<$t }A$AD$ |HwtHuHEA $^HItHuHEA1$&HtHuHREA!$Ht0HuH$EA9$A$AD$ .Ht0HuHEA9$A$AD$ <HktQHuHA|$ u} uEA9$A$EA9$A$AD$ >H tQHuH@A|$ u} uEA9$A$EA9$A$AD$ )HtQHuHA|$ u} uEA9$A$EA9$A$AD$ HEtQHuH|A|$ u} uEA9$A$EA9$A$AD$ e Ht HuHMA$$7 Ht1 HuHA|$ u MA<$MA,$+Hst0 HuHEA$EA;D$AD$-H2t HuHiEA)$뽾*HtHuHA$EA$뒾/HtnHuHEA;D$vAD$MtA|$ u0A<$uu HA$A$A$A$%H]tnHuH,EA;D$vAD$MtA|$ u0A<$uu HuA$A$tA$A$`H([A\A]]UHATSHIAD$HS@H2tJ9rHuH%t9w*@ %t9wHtɩt H[A\]UHSHHHu0Ey H^H[]UHH]LeLmH HDo`G`8(HADk`)HDH]LeLmUHSHH(u ЅE‹K, ЉC,H[]UHAUATSHHIC-$AL$,AL$,H(H(H=LkHAE=GBth=GBw= X= )tO= M=1ct+=1cw = dd=,\t+=VPLHAL$,t(H_{HSHBz_u HJz_HD8Vu(H0Pr@ vH ҍLJHDwo$! @ 0 && id < cts->toplj_obj.h(((o)->it) < 0xfffeffffu)type parameterid == 0((((info)) >> 28) == CT_VOID)%s%s(((cp->L->top)->it) == (~4u))sz != 0cp->p != ((void *)0)cp->depth == 0||&&==!=<=>=<<>>->cpcparsercp_initcp_tok2strnumberVintctype_childctype_checkcp_decl_multicp_decl_speccp_decl_asmcp_struct_namecp_decl_intern((((cinfo)) >> 28) == CT_STRUCT) || ((((cinfo)) >> 28) == CT_ENUM)(((GCobj *)(uintptr_t)(ct->name).gcptr32))->gch.gct == ~(~4u)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((GCobj *)(uintptr_t)(ct->name).gcptr32) == ((void *)0)GCC: (Debian 4.7.3-4) 4.7.3zRx 'AC b <?AC z \>AC y |\QC F zAC u  AC N)AC EAC $hAC PS @XHC N `AC EQ $aAC TH $M AC I? KC K AC P (oAC M] <@AC E$XmAC K] $AC I  AC C 0AC Ef $YAC PD FAC E| $4 AC I $\AC P  3AC Ck (LAC M: (AC P (AC M (,<AC P' $XAC G{  RAC HE  aAC HT (AC P  AC E  $AC P (@ AC L .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.rodata.str1.8.comment.note.GNU-stack.rela.eh_frame @Cb&C,C12CFE@E @8xM2K8\0Me-Mz0Mhux R Wh; ^ ''?&f>4\>zI bplzv~h@)iX>YaG M 0 "7o %@3mAJ;RR'3`AoS{'  0!Yk!F! n %z 'L)*/78Ea ^5<k;az;; S@    ,:KZjuB  lj_cparse.ccp_newlinecp_istypedeclcp_decl_resetcp_get_bscp_tok2str__PRETTY_FUNCTION__.4414ctoknamescp_errmsgcp_save_growcp_err_tokencp_errcp_addcp_pushcp_push_type__PRETTY_FUNCTION__.4001cp_next__PRETTY_FUNCTION__.3440cp_optcp_checkcp_decl_intern__PRETTY_FUNCTION__.4716cp_err_badidxcp_expr_unarycp_decl_abstractcp_expr_commacp_expr_sizeofcp_expr_subcp_expr_kintcp_expr_ksizecp_decl_sizeattrcp_decl_aligncp_decl_attributes__PRETTY_FUNCTION__.4767cp_struct_name__PRETTY_FUNCTION__.4848cp_decl_constinitcp_decl_structcp_decl_speccp_declarator__PRETTY_FUNCTION__.4935cp_decl_funccp_decl_singlecp_decl_multi__PRETTY_FUNCTION__.4010__PRETTY_FUNCTION__.4997cpcparser__PRETTY_FUNCTION__.4579__PRETTY_FUNCTION__.5014__assert_faillj_char_bitslj_str_pushflj_err_allmsglj_str_pushvflj_err_callermsglj_mem_realloclj_strscan_scanlj_str_newlj_ctype_getnamelj_err_argtypelj_ctype_newlj_ctype_internlj_ctype_reprlj_ctype_rawreflj_ctype_getfieldqlj_ctype_addnamelj_ctype_infolj_cparselj_vm_cpcall    !;: E <S !]=j $t=>?>= -=@(>:?A G ; F;  <4 <pB <C.Di H < <S < < < C < 0' ^, g1;b gE   ; G ; F;   ;f Gp ;u Fz; G ; F;+FG   ;RG G ; F; G  ; F;U _ d i;GHTIGIIEIwIJH 0V G` ;e Fj ; G ; F ;! -# $ $=$ n$ $ $;W& za& f& Hk&;&F&K'F=' zG' L' HQ';' G' ;' F';9( GC( ;H( FM(;(F) G) ;) F*;9*FR* G\* ;a* Ff*;* G* ;* F*;, G, ;, F,;, G, ;, F,;- G - ;- F-;]- Gg- ;l- Fq-;-L22FO2 GY2 ;^2 Fc2;2K3 G3 ;3 F3;73 GA3 ;F3 FK3;4 a4 4 4;M6 GW6 ;\6 Fa6;6 G6 ;6 F6;6G7G07FS7 G]7 ;b7 Fg7;> ;> ;#> (>;<> GF> ;K> FP>;>F> G? ;? F ?;1? S:? ?? D?;s?F?F? G? ;? F?;C@K AA&A 0A 5A :A;A A A A;JBLB @BN: (0i8@HPX`hpxumuum (08@HuP X`hxpx $  ( 0p 8 @HPX`hpx (08@HPX`hpx ( 08@9HPX` hpx!!%%%%%%%%f$!%%%?#### T#(#0#8#@#H#P#XM#`#h1#p#x8#F#    % + . 1 4 7 : = @  C @'`fz@i~Dd>Y"7@\S'  !k!8!`%'')/05\8J;;;@ADBlj_lib.o/ 1378727474 1000 1000 100664 10104 ` ELF>@@UHAWAVAUATSHHIHHMG,HE MȋGJH0HMDjLbHMHھLIFxHIFDHھLHtHھLIFxt"P@z uRAF@(tIFHھLIFHPIVxt'PP@z uRAF@(t&DIVzt+BHEI+VHHUHtiAvAA!~(AtT~)@t@uUHNtop-1)->it) == (~11u))lj_obj.h(((L->top)->it) == (~11u))lj_gc.h(((o)->it) < 0xfffeffffu)!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))lj_gc_barrierbacksetgcVlj_lib_registercopyTVlib_create_tablelj_lib_checknumlj_lib_checkintlj_lib_checkbit8CGCC: (Debian 4.7.3-4) 4.7.3zRx (AC M H"SC J  hAC L (1YC G L A $AC Px $AC Px &[C F $(AC P P*AC e p*AC e 8AC s (AC M .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @ Px & , 12 t@2 T O%\Pi0XruxX&  P( s p#B<0UPn`    !.>KR]kv"1E& *+*;8P! `glj_lib.c__PRETTY_FUNCTION__.5286__PRETTY_FUNCTION__.3967__PRETTY_FUNCTION__.3937__PRETTY_FUNCTION__.5305__PRETTY_FUNCTION__.4016__PRETTY_FUNCTION__.5336__PRETTY_FUNCTION__.5343__PRETTY_FUNCTION__.5356.LC11lj_lib_registerluaL_findtablelua_getfieldlj_err_callerv__assert_faillua_setfieldlua_createtablelj_func_newCmemcpylj_str_newlj_tab_setstrlj_tab_setlj_lib_checkanylj_err_arglj_lib_checkstrlj_str_fromnumberlj_err_argtlj_lib_optstrlj_lib_checknumlj_strscan_numlj_lib_checkintlj_lib_optintlj_lib_checkbitlj_lib_checkfunclj_lib_checktablj_lib_checktabornillj_lib_checkoptmemcmplj_err_argvS ]m p   B  . )@ pJ O 7T B .  p   0  R (( 02 R7 <Xg B .   P  7 Y `c .h m ` . 7 BA .F Kj B . "-$X Bb .g ly%#( % % * Z/(%   Z)9(M%[ e j Zow%% "D &R # 0 1q O( LlE ,Tt! lj_alloc.o/ 1378727474 1000 1000 100664 10312 ` ELF>@@ UHHHHH9w HPH9r H@Hu]UHHNt HHȃHH)Hw HWHHHFHD@HG( ]UHAWAVAUATSHHH}HHHHELXMHEHEM&M~MnHEID$t HHÃLHCWHHEHHKDI9w H9~H@Hu'H}I}LMHUȉ OMtM)eHSL)Hs HH IM*Hs(H9sHC(L9Cu HCHCH{HHHWHHHHHw(IpIPH9u!HVHrMH0IPI9tIHHQHJ?Ip(IP(HuIp IP Hu#HHHJ(Hz(uHJ Hz uHMtgIH8L;HuHHHu&AH8!S;M;A uIQ IQ(Ht&LJ0IH HtHJ HQ0IH(HtHJ(HQ0HHHWHH9{u HCHIHHHHWHHHHw;HD HDu щ HHPHxHzHWHGmHHt!@wҍJHH҉HHw8HG(HG SAAAu%D ‰SHHH|HDHG0HHHHHt H9)HHHHHrHH9t-II?HIpH4HuIJHtOHHt HHڃI)IMHHHHHHPJD( JD(HML@II9IƋEAAbLIŋUAH_lI$HI$PI9ZHH@HtHHHI9u@KD=I9$Hu2BHxHH9sLHxLIT$It$ LeHRH(H9uH؃LHq@t HHHH4HH)H)HHXI;T$ uI|$I|$It$ HH~I;T$u#I|$I|$It$HHHVH<>HJIILHHw,LJLBM9uAAE!$MAMHLZ0HJH9tLBIHLA?LJ(HJ(HuLJ HJ Hu#IMLA(Hy(uLA Hy uIMtjLB8K;Hu!KHHu)J8AAE!D$;I;S uIK IK(Ht&LY0LB MtLA IH0LB(MtLA(IH0LLHbHHHVH<>HHHwCHT ITA<$AADAu A $HHJHrHqHNHVHHAt"AwҍJIIA҉ILF8HF(HF AT$ADAAu'D AT$IHKtKTHV0HvHvKHIt I9D)IILLLBIL9t-II?HMANMuIJ4HV0HvHvHJHqHrHNHVHF0HKH؃HUHDHEHEH H9EHMHCMHMII IWLLHuHF#I$HHFI$PHFI$XHF M$HM$PHHI$XIF IFMvH9EwLEL9ELH+EHHUHHbHHHuHNHHHHwCHD IDA$u A $HHPLEL@LBIPI@ HHt!@wҍJHH҉HHUHr8HB(HB AT$AAAu+D AT$HHLEMDIDI@0M@M@IHHt H9)HHHJHH9t1HH?HHNH HuHHEHHP0H@H@ HBHMHHHJHAHQHA0ID$H9v2HH)IL$ID$ HIT$ HHJHHXHI$@AHI$HAHLHH@{HIt$ HH9H L*LzIEIt$ HuLHHPHUHH7HָH([A\A]A^A_]UHH]LeLmLuL}HPIHIHLvHFII Iv IT$HHKHHBI9rLH)LH=#HHMH6HHUI)LuIƋEHUIt HUH}UAHtK .I9O u?LIOH9s3H)I4HH HSHHHFIw IOLHtLw_LL8IHtLCuHCHHHHI)M9LIFHLHLALH]LeLmLuL}UHATSHD AAbID#HH@t HHƃLH^Hߺht FH{g@t fH@t HɸHt Ht fHtHFkLXHdž`HF@HT HTHRHRHH uHFHHtI)IH H[A\]UHAUATSHHHHt%IH;HsH[E,$E,$HuH[A\A]]UHHuHuH@H ]GCC: (Debian 4.7.3-4) 4.7.3zRx 'AC b <GAC B (\$AC M 4JC MBBBBA (AC M (<AC X  EAC C=  <IAC I{  `-AC h .symtab.strtab.shstrtab.rela.text.data.bss.comment.note.GNU-stack.rela.eh_frame @% &,10:OJp' Y"  $ ''G%n$=K [<l}E+It-lj_alloc.csegment_holdinginit_toprelease_unused_segmentslj_alloc_freelj_alloc_malloclj_alloc_realloc__errno_locationmunmapmremapmmap64memcpylj_alloc_createlj_alloc_destroylj_alloc_f(N p fbE\ @'`n @+dtlib_aux.o/ 1378727474 1000 1000 100664 9328 ` ELF> @@ UHSHHH -H۸HDH5HH5)H5 H=H[]UHH]LeHHLgHL)tHLL#CH]LeUHAVAUATSI~[LwLIĻLAU)ك I9v Iă9ՉLAE)؃AE[A\A]A^]UHH]LeLmH HtHG@HHGID(HC@HHCMt"DHLH߸DH¾H߸HCHPHSA*CTH]LeLmUHH]LeLmH HAAAAE<~$HG@HHGOELDDEuHG@HHGHG@HHGHEHCHPHSA*H]LeLmUHAWAVAUATSHHIA.LIHuLHHMd MM)LLHHHuRHA<$.AE׾HLLHHH!HtH#HMl$A<$.ALH[A\A]A^A_]UHAWAVAUATSHIIIAHH:tHлHH8uLLLLtVLLLHtLLLLLLDLEA޸D)EI?uEKQXhs~I' (3l@M\it(Q)8+c&4@zK[# 7iyZ &lib_aux.cpanicemptybufferadjuststacklua_tolstringstderrfwritefputsfputcfflushlua_pushlstringlua_objlenlua_concatluaL_fileresult__errno_locationstrerrorlua_pushfstringluaL_execresultluaL_findtablelua_pushvaluestrchrlua_rawgetlua_typelua_settoplua_createtablelua_settablelua_removeluaL_openliblua_getfieldlj_err_callervlua_setfieldlua_insertlua_pushcclosureluaL_registerluaL_prepbufferluaL_addlstringluaL_addstringluaL_pushresultluaL_addvaluememcpyluaL_buffinitluaL_gsubstrstrluaL_reflua_gettoplua_rawgetilua_tointegerlua_rawsetiluaL_unreflua_pushintegerluaL_newstatelj_alloc_createlj_alloc_flj_state_newstatelua_newstate - 2: EMT^eov{/   `  e P]j{ !" #h u% &'#(+B)P's $+2,Q 0 (N1e,t-3-. 5  56B7R e6u88568 : 8( <5 =: >M a p 0u  DhI 8Xx8c$Px# Z lib_base.o/ 1378727476 1000 1000 100664 26304 ` ELF>H*@@UHGP HGHHHO*]UH>UHSHHHH0uGf<wujHGH9Gu`tHHC@HHSBxuPC@(t1HsH+sHH[]UHHG@x$tlp ]UHHGH9Gvxt60]UHSHHHGH;GsxtHHSztKHHHqHpAzuRC@(tH[]UHSHHBHHCxtE@@#SHPHCxt@SHlPH[]UHSHHtHC@HHCH[]UHHGH9Gvxt6H9t;Pt9u5HPH$HH9w H;PHD ]UHAWAVAUATSH8HHGLgI)I@x$tMp ,Htfxt`HSHJHKHH H qr9uJSR(HC@x$t@ HSHJHKBxuPC@(tHHCHAxuxAEMjAHCJ4Et7FuLh@ HE=wH}HELmHSHHBH Hv;RJ9uRC@(tHCHPHH Jv:H9uPC@(tHCHHUHIHu HHkMtH5 H HULIM9H5 H8[A\A]A^A_]UHATSHHHHu;HHHH_Ht/HHAľHEuHHH[A\]UHATSHAĺHAuHCSR H*Y/DHAuHS)J HS*HC[A\]UHSHHHSBHSHHSHpHHDHtHHHCH+CHH[]UHubHcHGHTzu[HGxtjpVBt%FtHG@]UHH]LeLmLuH HIľHIHCH;Cs`@=vuQHIƾHMEMLDID$INMHEAV IvHOHHMEMLDIL$MHDȺHƺHH]LeLmLuUH]UHATSHIԺHSHCHHHKHHH Jv:H9uPC@(tHHKHAHCAuI$z=vuaHSHIHJ Hv;R J9uRC@(tLH H[A\]UHH]LeLmH HIľHIžHIUMHDIt$MHDHHH]LeLmUHSHHHH[]UHATSHAľHHt*E~%DHHHH[A\]UHH]LeLmH IAHDHLSulxtkHI\$IT$HHBH HRJ9uRAD$@(tLID$@x$t]@ CCxuPAD$@(tAuC HC H]LeLmUH]UH{]UHATSHIH@HCLHPtVHKHHABzAH9uPC@([AD$=wLHv7HSRHcȃ|$t@HD u$A$PvҾH߸RHAT$ v҃EHHH߸HCxtG@HSBBxuPC@(t' [A\]UHAUATSHH Aă yHIċ@=vukA<$Lt[HSI$HBH HRJ9uRC@(A|$CDI]A|$t A$pLu4IMtA;UrHHȋt%=4HSHIuA}wHALLHLhAD$"vYHDHuLHUI9tZ tHHU Huu,HSHxH*HHH H*XB HC@H[A\A]]UHATSIHWHGHH)H~!xux#u*B4Ly9OÅFL)É[A\]UHSHHHHHHCHH[]UHSHHHH[]UHSHHHH[]UH]UHAWAVAUATSHIIźLID$HPI9T$vxtLA LAA9EA)AE~DLu LA;]s HcAEH LHt\IT$HJIL$HHH HvQJ9uRAD$@(t.ID$@HID$CA9^ADH[A\A]A^A_]UHH]LeHHIľHH[HL)‰SH]LeUHH]LeLmH0HIHCH;CsxtBHE܅u Dk,HU܉HHu~HD A|$t HEl$AEtAD$t{LLHCHPHSD @A|$uAT$C@(tH]LeLmUHSHHHGH;Gsxt:HEHUHHu~HxuPS,HCHHHK@z uRC@(tH[]UHAUATSHHIľHIHsHxt HEl$MtzAEtsAD$tiS!J(@tTJ)tuUAD$Bbase)->it) == (~8u))lj_lib.h(((L->top-1)->it) == (~8u))runningsuspendeddeadnormal=(load)too many nested functionsfunction: builtin#%d%s: %p(((L->top-1)->it) == (~4u))(((o)->it) == (~10u))lj_ctype.hid > 0 && id < cts->toplj_gc.h_GLua 5.1kv__modecoroutine!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~6u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~4u))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))stoprestartcollectcountstepsetpause setstepmul((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~8u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(-(int32_t)((o)->it))-1]))->it) == (~4u))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpausecopyTVsetgcVFassertnilbooleanuserdatastringupvalthreadprotofunctiontracecdatatable numbertypeDnextEpairs@FipairsgetmetatableLsetmetatablegetfenvsetfenvFrawgetrawsetrawequalunpackselectHtonumbernilfalsetrueHtostringerrorEpcallxpcallloadfileload loadstringdofilegcinfocollectgarbagenewproxytostringprint_VERSION statusrunningcreateEyieldFresumewraplj_lib_pushcclj_cf_coroutine_wraplj_ffh_coroutine_wrap_auxlj_cf_printload_auxlj_ffh_tostringlj_ffh_tonumberctype_checklj_gc_barrierbackffh_pairslj_cf_coroutine_createP?GCC: (Debian 4.7.3-4) 4.7.3zRx (AC c <AC  XAC E |9AC t 1AC l  AC E  AC E 4AC Ej $}AC x (DAC M  pAC C  AC C  yAC Eo |AC w $AC T $ AC F  D,AC C$ $hAC Pm /AC Ee  qAC Ci $gAC PR AC K AC K  <AC C $`^AC IP  zAC Cr  QAC EG /AC Ee /AC Ee AC P (0XAC MF  \UAC LD $AC P  AC E $,AC I AAC EAC $,AC I .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @XhC&,12,@2T  OH`\8$i0@$r]$`$P0c ). B ; ((06;T9n(1Y4.}EPQ jG@yM|&  ,   / q&2 g0r I W d t0^@P zqQ//  5X"U1?M,a`zA Y0`-     )7HWft (9DUesz '2=L^n| &5J[ulib_base.clj_cf_gcinfolj_ffh_coroutine_yieldffh_resume__PRETTY_FUNCTION__.3991lj_ffh_coroutine_wrap_aux__PRETTY_FUNCTION__.6046lj_ffh_coroutine_resumelj_cf_coroutine_create__PRETTY_FUNCTION__.6029lj_cf_coroutine_wrap__PRETTY_FUNCTION__.5842__PRETTY_FUNCTION__.6063lj_cf_coroutine_runninglj_cf_coroutine_statuslj_cf_print__PRETTY_FUNCTION__.6003__PRETTY_FUNCTION__.4040lj_cf_newproxylj_cf_collectgarbagelj_cf_dofileload_aux__PRETTY_FUNCTION__.5957lj_cf_loadreader_funclj_cf_loadstringlj_cf_loadfilelj_ffh_pcalllj_cf_errorffh_pairs__PRETTY_FUNCTION__.5867lj_ffh_ipairslj_ffh_pairslj_ffh_tostring__PRETTY_FUNCTION__.5943lj_ffh_tonumber__PRETTY_FUNCTION__.5929__PRETTY_FUNCTION__.4805lj_cf_selectlj_cf_rawsetlj_ffh_rawgetlj_ffh_ipairs_auxlj_ffh_nextlj_cf_unpacklj_cf_rawequallj_cf_setfenvlj_cf_getfenvlj_ffh_setmetatable__PRETTY_FUNCTION__.3961lj_ffh_assertlj_lib_cf_baselj_lib_init_baselj_lib_cf_coroutinelj_lib_init_coroutine.LC14lj_err_callerlj_err_str__assert_faillj_state_growstacklj_err_arglj_err_argtlua_newthreadlua_pushcclosurelua_pushthreadlua_pushstringlj_tab_getstrlua_gettablelj_str_bufnumlua_calllua_tolstringstdout_IO_putcfwritelua_settoplua_newuserdatalua_tobooleanlua_typelua_createtablelua_pushvaluelua_pushbooleanlua_rawsetlua_getmetatablelua_rawgetlua_setmetatablelj_lib_checkoptlj_lib_optintlua_gclj_lib_optstrluaL_loadfilelua_errorlj_gc_barrierflj_lib_checkstrluaL_loadbufferxlj_lib_checkfunclua_loadxluaL_checkstackluaL_loadfilexlj_lib_checkanylua_isstringluaL_wherelua_concatlj_meta_lookuplj_str_fromnumberlua_pushfstringlua_topointerlj_obj_itypenamelj_strscan_numlj_ctype_rawreflj_cconv_ct_tvstrtoullj_char_bitslj_lib_checkintlj_lib_checktablj_tab_lenlua_checkstacklj_tab_getinthlj_obj_equallj_debug_framelj_lib_checktabornillj_err_callermsglj_ffh_coroutine_wrap_errlj_err_runluaopen_baselj_str_newlj_tab_setstrlua_pushlstringlj_tab_newlj_lib_register2BsBC <  DE <    (DGFGH <   D <  D %I4 <> /C 8HDk <u  z 8DJF f k) f. \9 T@ \EK} <   DL <   D <&  + 0Dh <r w |DMN< <F K PD <  DOPBQRQS%Q/RWTdUqVWXYZ[\]VTF%\2^K Z_o`@abc!d3Ow <&   8Debb# f3 Tc gt h T r  i z jD <N S X Dj O <   D P B- b= bM Tq k l h ` T m n Y! o) dR lc p <   D G <r   P DD <N S X D l p. <8 = BDYq{ <0   D rs t r$ <0.  3 8Di <s x }D`lu6 <@ E JDq <@{   Dv <P  D <P  D4wFffFux y yAzdF{ll[{l{z*{O{d`z|}B~7 <A F KDll{z=TFlBe <  D`.EF <  D{pB1 <`; @ (EDW <`a f kD <  Dlb Bd <n s xD    <  !D+ 3E <  D   <   D <  < %  -2 <7 <`< "D   q5     (0@8G@PY(( @(\6(Y(HPtG@M( H l   2   @ dq 45`0lib_math.o/ 1378727475 1000 1000 100664 6176 ` ELF> @@UHATSILHcID$HI9D$w[A\]UHSHHHH[]UHSHHHH[]UH]UH]UHH]LeLmH0HELeHSHH9SvZHELmLeEELmEHC ^f(YE@H]LeLmUHHHHH1H-HHH1HHGHHH1HHHH1H1HOHGHHH1H0H%HHHH1HH1HGHWHHH1H'HHHHH1HWH1HHH!H?H ]UHATSHI A DYXfEHuEHUH9sH7IHH uAD$  LuH[A\]UHSHHWRz$tZ HH+H[]UHH]LeLmH@HHGLgI)I@x$t@ Lhx8u fWLLHEE\EE~dHEAuEYEXE.H\EXYEXEEHCEHHCH]LeLmUHSHH(@ HHHH[]lib_math.cmathfmodmod((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~12u))%CabsfloorceilDsqrtlog10expsincostanasinacosatansinhcoshtanhfrexpmodfClogcܥL@deg9RFߑ?radEatan2powfmodEldexpCminmax-DT! @pihugerandom randomseedlj_cf_math_randomseedlj_cf_math_random?-DT! @iW @GCC: (Debian 4.7.3-4) 4.7.3zRx  9AC Cq @/AC Ee `/AC Ee AC P AC P $AC P AC   AC G  ,TAC EJ $PAC P  xdAC EZ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @}&,12@2aT`R OX\i0r `   99/.h/@Qaq(}T  @@     !f5CIdVfvlib_math.clj_ffh_math_minlj_ffh_math_ldexplj_ffh_math_atan2lj_ffh_math_sqrtlj_ffh_math_abslj_ffh_math_lograndom_initlj_cf_math_randomseed__PRETTY_FUNCTION__.5323lj_cf_math_random__PRETTY_FUNCTION__.5314lj_lib_cf_mathlj_lib_init_math.LC0.LC1.LC2lj_lib_checknumlj_vm_log2lj_math_random_step__assert_failfloorluaopen_mathlua_newuserdatalj_lib_registerlua_getfieldlua_setfieldKXz1=JR    9 @C H Mn  +"7 < A I#N [$` m%h9  D9dhf (0T |lib_bit.o/ 1378727476 1000 1000 100664 3120 ` ELF>@@ UHATSHIID$HI9D$v3Ly ؿNЉуy,HcHރ47@tuHcHuLH[A\]UHATSILHcID$HI9D$w[A\]UHSHHHH[]UH]UH]0123456789abcdef0123456789ABCDEFbitA* EtobitbnotbswapFlshiftrshiftarshiftrolrorDbandborbxortohexGCC: (Debian 4.7.3-4) 4.7.3zRx  AC G  @9AC Cq d/AC Ee AC P AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @B P &,12&E @X ` M0@V]k`f x  uX P  9+/=N` \G  l|#lib_bit.clj_cf_bit_tohexlj_ffh_bit_bandlj_ffh_bit_lshiftlj_ffh_bit_tobitlj_lib_cf_bitlj_lib_init_bitlj_lib_checkbitlua_pushlstringlj_lib_checknumluaopen_bitlj_lib_register3> E c ( `- 2 "7`hpx Dh#lib_string.o/ 1378727477 1000 1000 100664 26480 ` ELF>P0@@UH%@uKHtHc"@ u0&zu Zu 9]UHAVAUATSAIA~^u_HAVF<%uH^vD]t7E~-uHVI9vA9|FA9~"H D9uHHH^L9rAD[A\A]A^]UH.t+[t%uvH< 9]UH]UHH]UHHF%t[uc~uHHFGHV~^HDuHHH%uHPxHHDHȀ8]uH]UHHHHHD 0fl@t  ]UHAWAVAUATSH"HPHGH+GH0L`Dp MHHPM9 Dž\HpHH@LI A<$%t7L9r HHA$HHI A|$%u8L9r HHAT$HHI \\90}H\HPM|$Ed$LEu HD#EtAHuHL)HvHPEA$<H<H;.u'SHCHHDt!HtHPƅp%IM)IT$LH@BƄ%rLcB<78$\HPHpHHpU\HPHc\HPHAHDxv H,HpHHp\HPHc\HPHFHDPy(vH,Tvf.sH,\H,HH1HpH\HP`d=H`H;`   Ƅp<@<.tHpH.t@~Hps@HHpHHpH\HPHË@ HL{L9r HH"HHHXHHDHHA؃\t "t u/L9r HH\HHL9r HH\HHcwAWt&L9r HHc vIi X)L9r HHX0HH0L9r HHHHIL;HL9r HH"HH:\HPH¾HPHHc\LAE LpA]0LHL@ LHH9wgDžDžLHHHt(D)H9AU0HHH HH9sH [A\A]A^]UHSHHHHCHPHSH@HHCxtE@@XSHPH[]UHAWAVAUATSHXIHUȾHHULILeȺLHITHHHHIHx HEH9HGLuLHHEL}LIHI)L9HHI)AEIL-I]HHHt;I)M@ILLIHuMu @ML+It$LLHuLAA}^uIAHLHHHEHHDžDžLHHIHt]t@H+HsLLH+LH7HHH#HCH;s E\LHX[A\A]A^A_]UHV]UHF]UHH]LeLmH@ HIHCHPAH;Ss x AEHSHHA|$u$At$H@EHHt NHHH]LeLmUHSHHP sHXHH[]UHAVAUATSIHWH+WHAՋwHXIE~9L%9tLHcALA9}IcLLIT$BBxuPAD$@(t[A\A]A^]UHAWAVAUATSH(IIǾLAľLIAG EAUHUEYIEHUHꀉP@HEȀuAE@(]Mt@HcAF HH=~ 8LIcHHUH~28LIcHcEHHUH~ 8LH}/HuHXULIMtmAV H)UA~_}~!AL H9UHDA^ ޅ~AL H9SHDHUHzXA_ AA~DCIH4@1HH9ALEHEHpXHULIUBBxuPAE@(tH([A\A]A^A_]UHSHHHHHS*BH[]UHAVAUATSHID` HAʼn¾H…BD HECD%DHEDND9DNE9zAE)A@v lHS H+SDHH9 DHMcKt.E~+HLC*AHHA9AD$[A\A]A^]UHAUATSHHHHHIċCDhHSztDjLHD(@A} uAUC@(tAD$H[A\A]]-+ #0lib_string.c(((o)->it) < 0xfffeffffu)%po < L->toplj_obj.hnilfalsetruefunction: builtin#%d%s: %p(((L->top)->it) == (~4u))too many captureslj_lib.h(((L->top-1)->it) == (~8u))^$*+?.([%-stringgmatchgfind(((L->top-1)->it) == (~11u))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(2)-1]))->it) == (~4u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~4u))M5ClenDbyteDcharCsubCrepGreverselowerupperdumpfindmatchgmatchgsubformatluaopen_stringsetgcVnum2intfrmnum2uintfrmmeta_tostringcopyTV`l@ hlj_lib_pushcclj_cf_string_gmatch_auxCGCC: (Debian 4.7.3-4) 4.7.3zRx eAC ` $<AC G d>AC y AC P AC N zAC u 0AC k (L AC P7 (00AC M  \XAC EN (AC M AC  (AC M (tAC P_ $$ AC N  LAC E (pAC P AC K AC K $AC S 4AC Ej $$AC G (LSAC MA  xNAC ED $AC G $AC I .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @"D&","12"@2#T ' OZP \+i0+r++ep /4 1 h>e@ *e<>H8ZMe`zn0x L     V 0X(s8 FtX  pp-`Ueu'4[#&S5y NG Z`k R~     "2:JXft +=FVao}"0C!Rbo|lib_string.cmatch_classmatch_class_mapmatchbracketclasssinglematchlj_ffh_string_lenwriter_bufclassendaddintlenlj_cf_string_format__PRETTY_FUNCTION__.5303__PRETTY_FUNCTION__.5309__PRETTY_FUNCTION__.5316__PRETTY_FUNCTION__.4040__PRETTY_FUNCTION__.3991matchstart_capturemax_expandpush_onecapturepush_captureslj_cf_string_gsublj_cf_string_gmatch_aux__PRETTY_FUNCTION__.5215lj_cf_string_gmatch__PRETTY_FUNCTION__.4932str_find_auxlj_cf_string_matchlj_cf_string_findlj_cf_string_dumplj_ffh_string_reverselj_ffh_string_charlj_ffh_string_replj_ffh_string_sublj_ffh_string_bytelj_lib_cf_stringlj_lib_init_string__PRETTY_FUNCTION__.5365.LC3lj_char_bitslj_lib_checkstrluaL_addlstringlj_err_callerluaL_buffinitluaL_prepbufferlj_obj_typenameluaL_argerrorstrchrstrncpylj_lib_checkintsprintflj_lib_checknum__assert_faillj_str_bufnumlua_topointerlj_str_pushfluaL_addvaluelj_meta_lookuplua_calllj_str_fromnumberlj_str_newlj_obj_itypenamelj_err_callervluaL_pushresultmemcmplua_pushlstringlua_pushintegerluaL_checkstackluaL_checklstringlua_typeluaL_optintegerlj_err_arglua_tolstringlua_pushvaluelua_gettablelua_tobooleanlua_settoplua_isstringlua_typenamelua_pushcclosurestrpbrkmemchrlua_pushnillj_lib_checkfunclj_bcwritelj_str_needbuflj_lib_optstrlj_lib_optintlj_state_growstackluaopen_stringlj_lib_registerlua_getfieldlua_setfieldlj_tab_newlj_tab_setstr @& 1B2U344=2[566(7:8e j94 1 1 1 1 14:D V;p<=   >< =7 A F K>_ i n s>//<=?~<<2696\ 1x6 166,6f6@ -AB    0> Cu  ;  >  ;  > D}  ;  > E D F H F N F2 SC AW @ G h A    o > 92 < ;A 0F >R Bp < H 3 D; I 4 _44&4 14J4K44LK< DMn xM MNNOPwQ5)OoR6 1 6D3oBSDTUVKW/O9XNHZB63ILB pL Q XV>j pt y ~>?2L2j  rY `  >NNP[Ud lZJ[8LGLLL:\]5 M^4I92K__;QF   ; 0>@2P;``  ; 0>44=4[_ FM W ;\ 0a > 2 ; a 2 a!aS!4q!b! !  ! !d! !e! "f"g4" >" C" H">]"h" " ;" 0">v v v (v 08v @v Hv Pv Xv `v hv pv xv v v v v v v v v v v v v v v v v Hy (08v @yHv Pv Xv `v hv pxv v v v p########### #(#0#8#@#H#P#X#`#h#p#x#############|##  8 [y &'ueU-  @eh8M` 4V `s ( P-tUeu'([P&|y  !lib_table.o/ 1378727476 1000 1000 100664 11480 ` ELF>@@ UH]UHH]LeLmH HAAվtWHAt$HAuHHHAľHDDHADH]LeLmUHH]LeHHAԉDHH]LeUHAWAVAUATSHAU9IADLUľLDLtUDLZ LDuE)A&EDЉھLDLDLVtDLKDLUľLDLtUĉL LA~ھLLEăE¾LULQ]D}&U9U| LDLẺEȋUȃU̾LDLXuD9 LDLAھLDL u;]}MLULU̾LŰuLkUD)E+E9|ڋuLLDUDzuȃEċUȉUĉEȋULZD;}xH[A\A]A^A_]UHATSHHAľHHCx t HDH[A\]UHAWAVAUATSH8 IIƾLIHtDh ALID$HPI9T$vxtLA LAHLA9DHILA߉ھLID$@=vAt< tЃEȉHD{LHD9t$EtHHHcHH8 [A\A]A^A_]UHSHHHPHx&|t|t*HHufWfWpPHRH HAHHHit) < 0xfffeffffu)lj_gc.htable!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause\=foreachiforeachDgetnmaxninsertremoveconcatsortcopyTVlj_gc_barrierbacknumberVnumsetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx AC P $<AC P  d<AC Lk (AC M  ]AC CU ({AC Pf  AC E ((AC M (TeAC MS (AC M  $AC Ix AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @& ( &h ,h 12h 1@2 T O*\0Teqzxu+  h(  )<.6]G{Zk ^ee   @@.9   @PYgp~#2@P`n} lib_table.clj_ffh_table_getnsort_compset2auxsortlj_cf_table_sortlj_cf_table_concatlj_cf_table_maxn__PRETTY_FUNCTION__.4055lj_cf_table_foreachi__PRETTY_FUNCTION__.3991__PRETTY_FUNCTION__.4040lj_cf_table_removelj_cf_table_insert__PRETTY_FUNCTION__.3961lj_cf_table_foreachlj_lib_cf_tablelj_lib_init_tablelj_lib_checktablua_typelua_pushvaluelua_calllua_tobooleanlua_settoplua_lessthanlua_rawsetilua_rawgetilj_err_callerlj_tab_lenlj_lib_checkfunclj_lib_optstrlj_lib_optintlj_lib_checkintluaL_buffinitlj_obj_itypenamelj_err_callervluaL_addvalueluaL_addlstringluaL_pushresult__assert_faillj_tab_getinthlj_tab_setinthlj_tab_nextluaopen_tablelj_lib_register 8IVbt !"##)$9$j!$$!$!2$?W$%!$%!$!,$<$&!'.>(d)*&+$ ,0-<.`/q0 # ( -1x'&    1A2   (1%&:)]$23   ( 1? 3  & % * 3 2P Z _ (d 1 3  ( 1 % #* X/ 1A K #P U 1  '   ( 1S ] b (g 1   1  4 @  + 6@^H PX`e hpx @h,^Xe   lib_io.o/ 1378727477 1000 1000 100664 18104 ` ELF>@@ UHSHHxuxtHC@HHC-HxtH HH[]UHSHHHSztHRBHKIIJH@H[]UHH]LeLmLuH HILhHjILLI$Hu48HLH߸H¾HLH]LeLmLuUHSHHHGH;Gu@HHGHCxH,@HCHPHSxt@HSBx uPC@(t_S@z uRC@(tHSH+SHHH[]UHH]LeLmLuH HIIվHKytDaAD$HSJw RAT$L0@LHLH]LeLmLuËGH@HuUHUHAWAVAUATSHIHuUEA AwHXDLIAID)HULHt?LHHэ\ ]̅tCA< u+]AT$C$9DC돉LLIWHJIOBxuAWHB(tB$9B rLEH[A\A]A^A_]UHAWAVAUATSH8IHuUH_H+_H)HuHuLE]0sLDuA]]EANHcID$HЋB~x*tqL@@@auH>@@GtqHG@HHGI$H[A\]UHH]LeLmLuH HHGD`A|$$tEl$ Et$AI}u HGEt6W H)DHH9DMcIH{It$(LLsIuHAI}t2HCxtpHHHCxuAE tIuHIADH]LeLmLuUHHGH;GsxuxtH]UHSHHH8u HH[]UHATSHIHOHGH9s`ItXuHCHHCHKHCPw@BPSBHHHK@z uRC@(t[A\]UH%]UH$]UHSHHHSH+SHHH[]UHSHHH0HtH[]UHSHHHGH9Gs ^H GHHAH[]UH]UHSHHH8tPt HHH[]UHSHH%H@@HH[]UHSHHH8@@HH[]UHAVAUATSIHcHGHH;_ICu.;Dw tmEHLLI9@@I=w&t>L@@HI+t$HLHI9\$rL[A\A]A^]UHSHH%THHH[]UHSHHrH0HH[]UHH]LeHH/IHI$Hu HH]LeUHH]LeLmLuH HL`HLpHLDHILLHIEHuLHH]LeLmLuUHH]LeLmLuH HLhHLpHLDH"I@LLHI$HuLHH]LeLmLuUHSHHHHtH߸ HH[]UHH]LeLmH H}L HAź HHcDL@@HH]LeLmUHATSHL HHKHqH9sv*QwH,q#tHLtHLHSH*B[A\]UHATSHHCHPHH Jv:H9uPC@(tHCHHDcH5HA$DcH5HA$H5Hy[A\]fileclosed filelib_io.c(((L->top-1)->it) == (~12u))%s: %sr(((L->top)->it) == (~12u))lj_obj.htoo many arguments%lf(iof->type & 3) == 2cannot close standard file(((L->top-2)->it) == (~4u))FILE*w%.14gfile (%p)file (closed)fulllinenosetcurendiostdinstdoutstderr!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((L->top-3)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))(((&fn->c.upvalue[0])->it) == (~12u))((((L->top-1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))d> closereadwriteflushseeksetvbuflines__gc __tostring__indexcopyTVm> openpopentmpfileclosereadwriteflushinputoutputlinestypelj_cf_io_linessetgcVio_file_iterio_file_closeio_file_newio_std_getsetio_std_newGCC: (Debian 4.7.3-4) 4.7.3zRx  rAC Eh  @bAC EX $dAC T{  !AC E $AC T #TC J (AC M ($AC M P-AC Ec  pAC C $.AC T 1AC l +AC Ea  AC C  AC P @AC P `6AC El (AC E^ <AC Er  AC F 9AC Eo <AC Er  7AC Em $@AC G h-AC Ec (AC E^  HAC Lw $AC Tv $AC T  KAC EA $@AC Pn  hAC C $AC C .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @1&\,\12\@2T OA\0NekzpuC  ! 7 +r rrb$ =Jh!Yxr' . @#czV- 3U 1> +H Vo   6 ( <I T 9 < 7 & -5(K+H\sjyKp`HI XJ   0@P^nv &6<LU\csz )1:CN^dklib_io.clj_cf_io_typeio_file_new__PRETTY_FUNCTION__.4743io_file_openlj_cf_io_lines__PRETTY_FUNCTION__.4912__PRETTY_FUNCTION__.3993io_file_iterio_std_new__PRETTY_FUNCTION__.4927io_stdfileio_file_readlineio_file_readlj_cf_io_readio_file_close__PRETTY_FUNCTION__.4756__PRETTY_FUNCTION__.4823io_tofilepio_tofileio_std_getset__PRETTY_FUNCTION__.4901lj_cf_io_outputlj_cf_io_inputlj_cf_io_method_lineslj_cf_io_method_readlj_cf_io_method_closelj_cf_io_closelj_cf_io_method___gclj_cf_io_flushlj_cf_io_method_flushio_file_writelj_cf_io_writelj_cf_io_method_writelj_cf_io_tmpfilelj_cf_io_openlj_cf_io_popenlj_cf_io_method___tostringlj_cf_io_method_setvbuflj_cf_io_method_seeklj_lib_cf_io_methodlj_lib_init_io_method__PRETTY_FUNCTION__.4042lj_lib_cf_iolj_lib_init_iolj_lib_checkanylua_pushlstringlua_newuserdata__assert_faillj_lib_checkstrfopen64__errno_locationstrerrorlj_str_pushfluaL_argerrorlua_pushcclosurelua_setfieldlj_err_callerlj_str_needbuffgetslj_str_newlj_gc_stepclearerrluaL_checkstacklj_err_arg__isoc99_fscanffreadlj_lib_checkint_IO_getcungetcferrorluaL_fileresultfclosepcloselj_state_growstackmemcpylj_err_callermsglj_err_argtypefflushfwritefprintflj_err_argttmpfile64lj_lib_optstrpopenlua_pushfstringlj_lib_checkoptlj_lib_optintsetvbuffseeko64ftello64luaopen_iolj_lib_registerstdinstdoutstderr7F N8Z b89 3  :;< ='>2 7??O@ > 3x  @: 3 [ :L 3V [[ `:q ' yA9 3  : 3  (:'B]CDE F@ 3J [O T:dGH dI#J4 wBKDL FB 3L [Q V:jGJMDLF 3$ [) .:>GWNdO 3 [ :JPQ=PRS 3  {:  8 QS 3] b `g : C T U P 3   : Vr | W C 3   :c 3m [r w :  > ' A X Q X QP Yq ~ Z [ QG\eQ;] ><Q#;4]@ >`Xk^Q _ 8  `4aGb^Q `[cQd* 3`/ 39fv 3 [ : B 3  3 f  g h i` h px p T  s(0+8I @VH P X ` hhp Drhh@c(zTVt' U   $ D d   I T  $ D l +s Dlplib_os.o/ 1378727477 1000 1000 100664 9232 ` ELF> @@UHATSHL`HLDHLHH[A\]UHSHHfWEHH,uH,HH[]UHH]LeLmH HIAHHtHAEyL-H߸HDH]LeLmUHATSH@HHHHEH E HEHEHEH-lEĺHHAtDHAľHDeH}Hu H H*HH@[A\]UHH]LeHHIHcLHH]LeUHAVAUATSH@!IHþL LH,HE؀;!uHHuH}IHuH}IMuID$@;*{t{ LALAVLAVLAV LAVLAVlLAVLwAVLcAv LLƅ%ƅHLLI %uCu1L9r HHHHI;LcLHHHHHI\$AT$tHH@![A\A]A^]UHH]LeHHLgH*YA$ILcH]LeUHATSHHGH;Gs@Pw AEHAHSHBH9Cvz wHDUHSHHHHHH[]UHSHHH/tmp/luaHEH_XXXXXXHEH}u HHuHH[]UHATSHIĺHHL@@LH[A\]UHH]LeHHIH@@LHH]LeUHSHHHHSHJHK*H[]UH]ctypenumerictimecollatemonetaryallsecminhourdaymonthyearisdst%cwdayydayosx> executeremoverenametmpnamegetenvexitclockdatetimedifftime setlocaleư>GCC: (Debian 4.7.3-4) 4.7.3zRx  ZAC CR  @PAC EF $dAC Pp  LAC G@  8AC Lg $sAC N`  FAC Lu  eAC C@:AC Ep  `bAC EX  SAC CK  LAC L{ HAC E~ AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.8.rodata.str1.1.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @s&,12+@22T  O!\i0r "P     ZZP/8/LF{8Os]&Fllez: bmSL H`XQ     %4EN]jw /?M]fvTlib_os.clj_cf_os_setlocalelj_cf_os_difftimegetfieldlj_cf_os_timesetfieldlj_cf_os_datelj_cf_os_clocklj_cf_os_exitlj_cf_os_getenvlj_cf_os_tmpnamelj_cf_os_renamelj_cf_os_removelj_cf_os_executelj_lib_cf_oslj_lib_init_os.LC12lj_lib_optstrlj_lib_checkoptsetlocalelua_pushstringluaL_optnumberluaL_checknumberdifftimelua_pushnumberlua_getfieldlua_isnumberlua_tointegerlj_err_callervlua_settoplua_typetimeluaL_checktypelua_tobooleanmktimelua_pushnillua_pushintegerlua_setfieldluaL_optlstringgmtime_rlocaltime_rlua_createtablelua_pushbooleanluaL_buffinitluaL_prepbufferstrftimeluaL_addlstringluaL_pushresultclocklj_lib_optintlua_closeexitluaL_checklstringgetenvmkstemp64lj_err_callercloserenameluaL_fileresultremovesystemluaopen_oslj_lib_register% 7ALp !"#$%& '(C)Q*h+u(        $)/,?(L-Z.i#/0 "1)*!$263~4       %  *(5- :0\6789 :>;K<=>?@8AJBQC]??DE?FE(10GY `^ c /hI` hpmx l&/Z DZh/{&$lDd m Tlib_package.o/ 1378727474 1000 1000 100664 17616 ` ELF>@@ UHH]LeLmH HIIźHMLH¾H߸H]LeLmUHAVAUATSHIžHHLHHt3HH=LH߸HHtH߸HAADDHHu(DHHLH߸LHHHt4HtH DHAVHLHLHHHtLHLHHH=u*HHLH[A\A]A^]UHAVAUATSHĀHIHADpHLDHHtWHLHHtLH߸HLDHHHtHHHHLHH.LHPHIDL)LHHHH`Ht)H`HtHtH߸HHHA~=AADHDHHAE9}ϸH[A\A]A^]UHH]LeLmH IHIվ-HHPHHEڹHLHLLHþLHH]LeLmUHAWAVAUATSH8 IHHIMHA}tzLLHLH\LHHLHþLHHHIA<;u H<;ttB;HIHutHLDHLl LH)HLM?HJHھLDLHLaHH)HLHH8 [A\A]A^A_]UHH]LeLmLuH HIIվHIHuLH߸ALLHH]LeLmLuUH]UHH]LeLmLuL}H0HIIAHHHtHIrHHIHHHLH߸HHI<$uCA}*DLIHHHM<$MA}*uHLEuHHI<$HuxHHEu~LHHI<$UIľHMtHLHLHЃ' HH I$$H]LeLmLuL}UHH]LeLmH HIľ.HHHL)LHHHHIſHtILHHQt-t LHLLH߸H]LeLmUHH]LeLmH HIźHHBIHt"LHHt LHH]LeLmUHATSHIĺHHtH߸LHHuPLHyHƿHtLHHHtLH߸[A\]UHATSHHHIHtHHt LH[A\]UHSHHHu,HHHHHH[]UHH]LeLmLuH HIƹHIźHIĺHMLLHHNHuHHH]LeLmLuUHATSHIĺHHLHAĸEt4HHAHDH[A\]UHH]LeLmLuH HIIEHHtEt LH5HHLHHHLHH]LeLmLuUHSHHH8HtHH[]UHAUATSHHHHCxtE@@SHPHHHHHAAHHCxtE@@SHPAT$DHIJ4HuHHHAľHEHEH HHHHHHHHHH[A\A]]error loading module '%s' from file '%s': %sloop or previous error loading module '%s''package.loaders' must be a table'module' not called from a Lua function'package.preload' must be a table no field package.preload['%s']./?.lua;/usr/local/share/luajit-2.0.2/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so_LOADEDloadersmodule '%s' not found:%s_NAME_M_PACKAGEf_.?r no file '%s''package.%s' must be a string/LOADLIB: %s_LOADLIBluaopen_%sluaJIT_BC_%scpath no module '%s' in file '%s'preloadpath__indexopeninit;;;;lj_lib.h(((L->top-1)->it) == (~8u))__gcpackageLUA_NOENVLUA_PATHLUA_CPATH/ ; ? ! -configloaded_PRELOADloadlibsearchpathseeallmodulerequirelj_lib_pushccGCC: (Debian 4.7.3-4) 4.7.3zRx $gAC PR $DIAC G= $lNAC K> $~AC Pi (AC Pv $AC Tl  AC F (0AC X $\AC P $vAC Pa  AC C  UAC CM  AC Ey $AC T  @AC C $dAC T ;AC Eq $PAC IB .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.8.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @H*&T,T12X@2 T OAP\0tezu C h! %ggI/9NN~X|cl u  v  U$  f - 5;Mf @r`(0    %.;F\iy'/6FTZgw*1AIPYkylib_package.cloaderrorlj_cf_package_requiresentinel_lj_cf_package_modulemksymnamesearchpathfindfilell_bcsymll_loadfunclj_cf_package_loader_crootlj_cf_package_loader_clj_cf_package_loader_preloadlj_cf_package_loader_lualj_cf_package_seealllj_cf_package_searchpathlj_cf_package_loadlibsetpathlj_cf_package_unloadlib__PRETTY_FUNCTION__.4442package_libpackage_loaderspackage_globallua_tolstringluaL_errorluaL_checklstringlua_settoplua_getfieldlua_tobooleanlua_touserdatalua_typelua_pushlstringlua_rawgetilua_pushstringlua_calllua_isstringlua_concatlua_pushlightuserdatalua_setfieldlua_pushbooleanlua_pushvaluelua_gettopluaL_findtablelj_err_callervstrrchrlua_getstacklua_getinfolua_iscfunctionlua_setfenvstrchrluaL_gsublua_pushfstringlua_removeluaL_buffinitfopen64fcloseluaL_pushresultluaL_addvaluedlsymlua_gettablelua_newuserdatalua_setmetatablelua_settabledlopendlerrorluaL_loadbufferlua_pushcclosureluaL_loadfileluaL_checktypelua_getmetatablelua_createtableluaL_optlstringlua_pushnillua_insertgetenvluaL_checkudatadlcloseluaopen_packageluaL_newmetatable__assert_failluaL_registerlua_replacelua_rawseti%!:!H U"#$ %%&'  0" %( `,"6 >)X*e(y! "+,(-.$ /0+.,;(O0_%l'r 120#3 %% ($34M5Z2h0m *z%($$2 00+ *06 ) 30+2?7O <W8h9q ~"2:$22,$;4 >9 @D<W=g>?<! B< > D@'A\;)B F=>C).%@!P U]"c sh @D u=E(' $F& 3%@GH uU=b2oHIJ+1 D J + C $b K L # ; ) ! f s = #  # , %9 (C P "` %m (v  K  = #  M; NH O^ Pk 2x G 2  0 s Q @ Q # #< RI S{ # # R S   +T*+1 6 A<I T<a>q0 UV X L    Y& 308  = EZR2_[qP|  L   Y\ ` 0   %&($0 5 *: J pO 3T f =n)s G0 4 N0 U4 02 Z$ ^(f 0f8 @qH$ ` h p x xg Hgp|4`    $  Df h lib_debug.o/ 1378727477 1000 1000 100664 17112 ` ELF>(@@ UHWHGHHHOHHH Jv:H9uPG@(t]HGH;Gs7xu1HGxtUH\8HUHH]LeLmH0HHuIŋu܃HIHuHCHcUH H9Kv HDHC'L9ҋu܃HLLHH]LeLmUHAWAVAUATSHIHAIH HHHHL8HLHHQHLuLt5L-LLHH5 L#H[A\A]A^A_]UHATSHHAHHtH=t HHHAtEcAt HcDrAt HcDlHcDHuHHHcHH[A\]UHH]LeHHIHHuDIc$H4HAt$(x HcHHHH]LeUHH]LeLmLuL}H@HHuũH%ũHAAAũHIŋũHũHAƾcLHAEErLAHEElLDHDEDEDOAHũHHDDLHH]LeLmLuL}UHATSHIľHAT$9rFHA|$u HALHIL HCHH HP[A\]UHATSH HIHExuBHAT$9s[HIDHEоHIĀxt_HHAT$9rFHHIDHHUЉ PBtHuFt{H [A\]UHH]LeLmH HAAžHEtDHDHHtmHHEtdHCHPHH Jv:H9uPC@(tHC H]LeLmUHSHHHH[]UH]UHATSHĀHHuIċuHHpLuukHuHIT$HJIL$HHH Hv<J9uRAD$@(tuHHpLHHH[A\]UHAUATSHHHuIċu܃HAHKuHcƃ|u.HDHCDHHHHH`Luu܃kHDH`LIHt/HLLHHHC@HĈ[A\A]]UHH]LeHHIHcLHH]LeUHH]LeHHIHLHH]LeUHH]LeHHHIH9uHH HLHH]LeUHAWAVAUATSHIHLIŋLLHËLLt;LLHPLID$@_LHcID$HI;D$xHھLHHcLID$HЃxt{IUHJIMBxuPAE@(t)ruLHPHLuLLLGAAL<)$HpLHULuUL-ULHhLAxLz|LUȾLuLL8HXLH`LAAHEtLLEtLLHĘ[A\A]A^A_]UHSHHHCHHCHu HH[]UHSHHHH[]UHSHHHCHHCHHC@H[]UHSHHHu HC@H[]UH]lj_obj.hlib_debug.c(((L->base)->it) == (~6u))lua_debug> cont =(debug command)external hookflnSu>%ssourceshort_srclinedefinedlastlinedefinedwhatcurrentlinenupsnparamsisvarargnamenamewhatactivelinesfuncdebugcallreturnlinecounttail return!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((L->base+arg)->it) == (~8u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))> getregistry getmetatable setmetatablegetfenvsetfenvgetinfogetlocalsetlocal getupvalue setupvalue upvalueid upvaluejoinsethookgethookdebug tracebackgetthreadhcopyTVlj_cf_debug_getinfosetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx jAC e <KaC Y $\AC P (AC P   AC G  AC L| (RAC X5  $zAC Cr  HAC G $lAC P *AC E` AC K  AC G $ AC L  8AC Lg  D8AC Lg  haAC LP ( AC P  LAC EB /AC Ee FAC E| >AC Et <AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @},&,12@2wT@ O:\0+eHzHXu@( (x ) &p j%>jKH awJi*(R zhO*%y<Q{ f 8o 8x aU _ L / F >)9`   KYgu+<LUaj| 0=JWany0AR^`lib_debug.clj_cf_debug_getregistry__PRETTY_FUNCTION__.4040getthread__PRETTY_FUNCTION__.4550lj_cf_debug_tracebacklj_cf_debug_debuglj_cf_debug_gethookhookfKEY_HOOKhooknames.4624lj_cf_debug_sethooklj_cf_debug_upvalueidlj_cf_debug_upvaluejoindebug_getupvaluelj_cf_debug_setupvaluelj_cf_debug_getupvaluelj_cf_debug_setlocallj_cf_debug_getlocalsettabsisettabsstreatstackoptionlj_cf_debug_getinfo__PRETTY_FUNCTION__.4565__PRETTY_FUNCTION__.3991lj_cf_debug_setfenvlj_cf_debug_getfenvlj_cf_debug_setmetatablelj_cf_debug_getmetatablelj_lib_cf_debuglj_lib_init_debug__assert_faillua_tolstringlj_lib_optintluaL_tracebackstderrfwritestdinfgetsluaL_loadbufferlua_pcallfputsfputclua_settoplua_gethookmasklua_gethooklua_pushlstringlua_pushlightuserdatalua_rawgetlua_pushstringlua_gethookcountlua_pushintegerlua_typelua_pushnillua_callluaL_checklstringluaL_checktypeluaL_optintegerstrchrlua_pushvaluelua_rawsetlua_sethooklj_lib_checkfunclj_lib_checkintlj_err_arglj_gc_barrierflua_getupvaluelua_setupvaluelj_lib_checkanylua_getstacklua_setlocallua_getlocallua_xmovelua_setfieldlua_removeluaL_optlstringlua_isnumberlua_tointegerlua_pushfstringlj_debug_getinfolua_createtablelua_pushbooleanlj_lib_checktablua_setfenvlj_err_callerlua_getfenvlj_lib_checktabornillua_setmetatablelua_getmetatableluaopen_debuglj_lib_registerK U Z _)   )*#+3,x- 0./0 < B12- *+32-<4I5x67 * S8 9:; <=A F9S:`>q y;=?@>5%A;BNC^DyDD * 9EFGH)IHJHIHJI+JVKIHLM;    %)aNIOJN+ 5 : ?)MI^Pi;IQ;I O J+ QC RN ;[ E = S ; S E( T7 RG S a U V W O g! X? I  N 0S )   P ) J Y J Z * k; rK |[ o     [  S  $ 9 q \ ] ^ N _ `a2N?bc h `m rd     ( 0 8" @ H P X ` h p x                      ( 0 8 @ H    _ (U 0{8@yHOP X`hipJx @j`Ji*( LphOy{$ H l U _    @^lib_jit.o/ 1378727477 1000 1000 100664 18992 ` ELF>"@@UHAWAVAUATSHHH}GH@HWH+WHUtHHEA"f``IHEH-HEDH}PJЀ x0t1t2gEHMʁ HU{LpE-uLpE|LuEnhxo^x-MtECIt$HLu0A<u)}tHMD AHED!MdEA$Hu#A$Hu.AALuIt$HLudA<=u]HUHLPЀ w!TPHp@ vupIcHMAu H}MdAA=it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))CMOVSSE2SSE3SSE4.1P4AMDK8ATOM(uintptr_t)(idx) < (pt)->sizekn!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(uintptr_t)(intptr_t)(idx) >= (uintptr_t)-(intptr_t)(pt)->sizekgclib_jit.clen != 0lj_target.hlj_obj.h(((L->top-1)->it) == (~11u))ninsnklinknexitlinktypeop < BC__MAXlinedefinedlastlinedefinedstackslotsparamsbytecodesgcconstsnconstsupvaluescurrentlineisvarargchildrensourceloc(((L->base)->it) == (~8u))ffidaddr_VMEVENTS(((L->top-2)->it) == (~11u))Linuxx64LuaJIT 2.0.2jitjit.utiljit.optnonerootlooptail-recursionup-recursiondown-recursioninterpreterreturn> onoffflushstatusattachosarchversion_numversion> funcinfofuncbcfunck funcuvname traceinfotraceirtracek tracesnaptracemc traceexitstub ircalladdr>startexitstub_addr_lj_cf_jit_attachsetgcVlj_cf_jit_util_tracesnaplj_cf_jit_util_traceinfolj_cf_jit_util_funckcopyTVlj_cf_jit_util_funcbclj_cf_jit_util_funcinfojitopt_paramd8 @pGCC: (Debian 4.7.3-4) 4.7.3zRx (AC M HFAC E|  hwAC Em  JAC E@  AC C  AC C $AC G  uAC Cm (DAC X $pAC P $eAC PP $[AC IM JAC E $AC T  0|AC Ct  TAC C $xAC G $'AC G  AC C  PAC EF AC K 0AC K  PAC E .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.8.rodata.str1.1.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @,3&l,l12p@22T OEX\i0rpH( x!P&X5 .M  8FRwoJu5?K@ eW [p@ JJ + |@U `53Mf'wAPAQ`(G Xi x 2<   D  JZbp!1<JXhya.:lib_jit.clj_cf_jit_opt_start__PRETTY_FUNCTION__.6048lj_cf_jit_util_ircalladdrlj_cf_jit_util_traceexitstub__PRETTY_FUNCTION__.5669jit_checktracelj_cf_jit_util_traceirlj_cf_jit_util_tracemc__PRETTY_FUNCTION__.3991flagbits_to_stringslj_cf_jit_statuslj_cf_jit_util_tracesnap__PRETTY_FUNCTION__.5998lj_cf_jit_util_traceksetintfieldlj_cf_jit_util_traceinfo__PRETTY_FUNCTION__.5973jit_trlinknamecheck_Lprotolj_cf_jit_util_funcuvnamelj_cf_jit_util_funck__PRETTY_FUNCTION__.5954__PRETTY_FUNCTION__.4040lj_cf_jit_util_funcbc__PRETTY_FUNCTION__.5948lj_cf_jit_util_funcinfo__PRETTY_FUNCTION__.5938lj_cf_jit_attach__PRETTY_FUNCTION__.5914setjitmodelj_cf_jit_flushlj_cf_jit_offlj_cf_jit_onlj_lib_cf_jitlj_lib_init_jitlj_lib_cf_jit_utillj_lib_init_jit_utillj_lib_cf_jit_optlj_lib_init_jit_optjit_param_default.LC10lj_lib_checkstrstrncmp__assert_faillj_dispatch_init_hotcountlj_err_callervlj_lib_checkintlj_ir_callinfolj_ir_modelj_str_newlua_createtablelj_tab_setinthlj_ir_kvaluelj_tab_setstrlua_setfieldlj_err_argtlj_debug_uvnamelj_bc_modelj_lib_optintlj_debug_linelua_pushbooleanlj_debug_pushloclj_lib_checkfunclj_lib_optstrluaL_findtablelua_pushvaluelua_rawsetilj_tab_setlua_nextluaJIT_setmodelj_err_callerluaopen_jitlua_pushlstringlua_pushintegerlj_lib_registerlj_vm_cpuidlj_dispatch_update{5J6 /   7 06@8 9: ;:? /F K P7::% <=$ /. 3 87= /  7Y p :>$ /. 3 (87i??? ?3g:@ @| = A > /  ( 7 E% J; MQ Rj / = /   7 X B? C{ : D D = /   7K :v /@  0 7 /U  P 7 /@   7b /l q v 7 : /`  a 7 EeFz> /  (7 n z    0 F cGj H BH B /   7 "B0I5 BBV /` e j7> /  (7   =A .J>KK XLMN /   7O+PQRC:"Qs 5xT ;TU ?T /` / LV /  / PV / /x YVWW///////X`QhApx 3( 0+ 8J @ HP?X`hpafkp (08 Ll$Ht?@   J 4+ X |3AA4QTalib_ffi.o/ 1378727478 1000 1000 100664 35336 ` ELF>;@@ UHSHH@=St%=Sw =f0:u=Xt=c>tHS)ȉBSH[]UHSHHHsHVH9Sv ~ ɋVrHHH[]UHHcHGHDH;Gsxt ]UHAVAUATSHIžHIƋCHXL` AUH0tH9rHuHt9w)t9fwHtƃv 0t HA|$HSLHIHH Jv:H9uPC@(tAD$tiS!J(@tTJ)tuUAD$BuJ%t9w' %t9wHHHtľLHEHIEt LHEȃxHUȋ@A9pwsI $A|$A9rIAuJ%t9w& %t9wIIIAtøwAG9t+I|$I@ E;t$rfDpHPAHMHLHED8@A uAEAOP(tP$9P r)LHEȃx}sI $H[A\A]A^A_]UHH]LeLmH HIĺHIHSz uHBH9Cw B@  HLLH]LeLmUHH]LeLmLuL}H@HGDI|$ILpL;ssSHLcI4$A|$wH ALHULZI4$A|$wH0AHHULH}ȸHHLyLsLHuHAEAExuSHB(tB$9B rHH]LeLmLuL}UHH]LeLmH HID(HCH9CvH,A$HCHPHSA*H]LeLmUHH]LeLmLuH0HGDI|$LAƾHIDLHƋ~AHMLLHt^HS*EB0 tK uFHSHJHK*HCHHHK* H]LeLmLuUHATSHHGDI|$LEHULHS*BH[A\]UHH]LeLmH HGDI|$LfHSzu zyBWLIŋ%=uHLL _w AEu HC@ HS*BH]LeLmUHH]LeLmLuH HGDI|$LAžHx*BDfuDrDLIDLHI9A}DD9uKJA9MuBuLLD1u}t t uI$%tA;D$rHH‹tI9HS)ȉBSH]LeLmLuUHAWAVAUATSH(IGDI}LAIutAM9rHHEHHuM%t9w*%@t9wHHHtHUDLAID$A4HHELHL‰Ẽ LHHEDIEEEE9rH}HNjuMtD9r( tA9wHHHNjt¸wG9t+rI}I@ E;urfDpADDLIHEDx@A uAWAD$@(tML$L+MIOILEUHL?DI}(H(x8HG AD$HHMm A}HUHLLHHH Jv<H9uPAD$@(tAUtiAD$!H(@tTH)tuUAUP70)DHL`HsN mLH]LeLmLuUHH]LeLmH0HGDI|$EHGLhL;osxt HHP0LEHMLDEAt+At 2HHLH4LHUHLH]LeLmUHATSHHGDI|$EHGHPH;Wsxt H0LEHMLEtHLHAHSHHMHL¸tCP$9P rHH[A\]UHAVAUATSHIźHHIE(HCHHHK@z uRC@(tHIHCHPHSD @A|$ uAL$C@(tEd$HIƺHHLHD0@A~uAVC@(tAD$Me HSHCxtD@HHHCxtHD`IUHIu(HD @A|$ uAT$C@(tHCHPHSxtJpHHHHHSt5HHxD LkHHLHIUHH Jv:H9uPC@(tAD$tiS!J(@tTJ)tuUAD$B 0 && id < cts->toplj_obj.hlj_gc.hC typelj_cdata.hlib_ffi.c(((tv)->it) == (~10u))ctype<%s>cdata<%s>: %pcdata<%s>: %dsz == 8K__mode(((L->top-1)->it) == (~11u))Linuxx64_LOADEDffi!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->registrytv))->it) == (~11u))setgcV>__index __newindex__eq__len__lt__le__concat__call__add__sub__mul__div__mod__pow__unm __tostring__pairs__ipairsffi__metatableluaopen_ffi>__index __newindex__gc>freeset__index>cdefnewcasttypeofistypesizeofalignofoffsetoferrnostringcopyfillabimetatypegcloadCosarchlj_cf_ffi_clib___newindexctype_checkctype_childcdata_getptrcopyTVlj_cf_ffi_clib___indexlj_gc_barrierbacklj_cdata_newffi_register_moduleGCC: (Debian 4.7.3-4) 4.7.3zRx  mAC Ec  @PAC EF d*AC e $AC G  AC E  AC Ev (AC M $ AC It H{AC v huAC p $}AC Ph (AC M $AC Pu (pAC XS $0eAC PP $X AC T  iAC G] $AC P $AC T (FAC M4 ( 4AC M" L(AC E^ lAC K 2YC O ZAC U  VAC EL  AC E $AC G <AC K \AC K $|AC G AC W  AC F  AC F  AC F $ AC F D AC F d AC F  AC F  AC F  AC F  AC F  AC F $ AC F $DJAC G> $l0AC T $AC P  AC G (AC G .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @d+U,&+,+12+@2x, T0 Oȁ\0D4ea4zh4up p;? N Lo mmP(*7D ]?vp S{uC }, ;o J p[iek ~iD& F4-(Ue2-Z<VVoGP&2 !! *! ?! T! i" ~ " " !" ," 7" B" M" X"J'#06%P&gz P `   7GT`p~(9I\jz *8GXnV' #1AQalib_ffi.clj_cf_ffi_abilj_cf_ffi_loadffi_checkcdatalj_cf_ffi_gc__PRETTY_FUNCTION__.4721__PRETTY_FUNCTION__.4042__PRETTY_FUNCTION__.3963ffi_checkctypelj_cf_ffi_cdeflj_cf_ffi_metatype__PRETTY_FUNCTION__.3993__PRETTY_FUNCTION__.4853lj_cf_ffi_typeofffi_checkptrffi_checkintlj_cf_ffi_filllj_cf_ffi_castlj_cf_ffi_copylj_cf_ffi_stringlj_cf_ffi_errnolj_cf_ffi_offsetoflj_cf_ffi_alignoflj_cf_ffi_sizeoflj_cf_ffi_istype__PRETTY_FUNCTION__.4730lj_cf_ffi_newffi_callback_setlj_cf_ffi_callback_setlj_cf_ffi_callback_freelj_cf_ffi_clib___gcffi_clib_indexlj_cf_ffi_clib___newindex__PRETTY_FUNCTION__.5468lj_cf_ffi_clib___index__PRETTY_FUNCTION__.5456ffi_pairslj_cf_ffi_meta___ipairslj_cf_ffi_meta___pairslj_cf_ffi_meta___tostring__PRETTY_FUNCTION__.4839ffi_arithlj_cf_ffi_meta___unmlj_cf_ffi_meta___powlj_cf_ffi_meta___modlj_cf_ffi_meta___divlj_cf_ffi_meta___mullj_cf_ffi_meta___sublj_cf_ffi_meta___addlj_cf_ffi_meta___concatlj_cf_ffi_meta___lelj_cf_ffi_meta___ltlj_cf_ffi_meta___lenlj_cf_ffi_meta___eqlj_cf_ffi_meta___callffi_index_metalj_cf_ffi_meta___newindexlj_cf_ffi_meta___indexlj_lib_cf_ffi_metalj_lib_init_ffi_meta__PRETTY_FUNCTION__.5644lj_lib_cf_ffi_cliblj_lib_init_ffi_cliblj_lib_cf_ffi_callbacklj_lib_init_ffi_callbacklj_lib_cf_ffilj_lib_init_ffi__PRETTY_FUNCTION__.5638lj_lib_checkstrlj_clib_loadlj_err_argtlj_lib_checkany__assert_faillj_err_arglj_tab_setlj_err_argtypelj_cparselj_err_throwlj_gc_steplj_lib_checktablj_tab_setinthlj_err_callerlj_mem_newgcolj_cconv_ct_tvmemsetmemcpylj_str_new__errno_locationlj_ctype_rawreflj_ctype_getfieldqlj_ctype_infolj_ctype_vlsizelj_cconv_compatptrlj_cdata_newvlj_cconv_ct_initlj_tab_getinthlj_meta_cachelj_ccallback_ptr2slotlj_lib_checkfunclj_clib_unloadlj_clib_indexlj_cconv_tv_ctlj_ctype_metalj_ctype_reprlj_err_callervlj_meta_tailcalllj_ctype_repr_complexlj_ctype_repr_int64lj_str_pushflj_carith_oplj_ccall_funclj_obj_itypenamelj_meta_tgetlj_meta_tsetlj_cdata_indexlj_cdata_setlj_cdata_getluaopen_ffilj_ctype_initlj_tab_newlj_tab_setstrlj_lib_registerlj_clib_defaultlua_pushlstringlj_tab_getstrNNOP Q: JD I  NR J   RST% J?/ #4 9R^ Jph ,m 0rR Jp , R 4U6VDWjSNVWXAYX Jb g  lRSZ[ J  # R1 Jp; ,@ 0ERW Jpa ,f kR J   R J   R J ;$ )R7\F JP U  ZR J # RX J   #R_ Ji n  sR J ; R\ J   R J% #* /R?XS J   R] S J %  * R: ] ^ J    RN JX ]  b R Q S J   R7 JA F  K R{ J ;  R \ J   R ] J #! & R6 X _- Q[ Je j  o R ] J   R ] `& J0 #5 :RJXaNbTcdbeHQvbbf J&) . 83RJ JT Y  ^R J   RG JQ V  [RdeS J   RM JW \  aR J ; R\ J   Rg' J1 #6 ;R^hzijT J?) #. 3RZ Jpd ,i 0nR Jp , RX? JI N  SR J   Rk#ZZ Jd #i nR Jp , 0R Jp , R[?lmPPn2 J< FA PFRf Jp u  zR J&  8R J   R([7]v JP F PR J   R J   R3 J= B  GRloX J? # R( J2 7  <Rn Jx }  RpqrsY g J   R J   R. J&8 = 8BRT J^ c  hRt J # R u9 JC #H M R_ qs  J2 ;  R J&  8 R J   !R2! qM!p]!se! qu!q!v!X!w"x" J" "  "R# J# #  "#RO#p_#sw#q#r#p#q$$r=$ql$ y$r$z$ J?$ #% %R%{Q% J?[% #`% e%Ru%s%q!&P7&|W&[~&}&P&|'~='Xe'z'' J' #' 'R'( J#( #(( -(R<( D(`Q( Y(`g(( J( #( (R( J( J (( JP( F( (R( J) J`)) J) J%)4) JP>) FC) H)R`)) J) #) )R) JP) F) )R)) )) )* J* J** %*`6* J@* FE* J*RX*|* *`** J?* #* *R+ Jp+ ,+ 0+R*+ Jp4+ ,9+ >+R&%M"B"7","!"X"" ""! !(!0!8&@HGeU- Di o C m Dmh$LSlC  o  4i\D$P-pUeG@`&!!!!(!H"h ""!","7"B"(M"HX"p#%&V'lib_init.o/ 1378727473 1000 1000 100664 3560 ` ELF>@@ UHAUATSHHAHI4$HHIIt$Hu9HI$DHIIt$Hu־H*HAAH[A\A]]_PRELOADpackagetableioosstringmathdebugbitjitffiGCC: (Debian 4.7.3-4) 4.7.3zRx $AC I .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rela.rodata.comment.note.GNU-stack.rela.eh_frame @  &,12<E@ @  M0 V=k@@f  u       '5BSbkxlib_init.clj_lib_loadlj_lib_preloadluaL_openlibsluaopen_baselua_pushcclosurelua_pushstringlua_calllua_setfieldlua_settopluaL_findtableluaopen_ffiluaopen_packageluaopen_tableluaopen_ioluaopen_osluaopen_stringluaopen_mathluaopen_debugluaopen_bitluaopen_jit  $0B_n       (08@HPX`%hp*x048 tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cdata.h0000664000000000000000000000403712202141143022274 0ustar rootroot/* ** C data management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CDATA_H #define _LJ_CDATA_H #include "lj_obj.h" #include "lj_gc.h" #include "lj_ctype.h" #if LJ_HASFFI /* Get C data pointer. */ static LJ_AINLINE void *cdata_getptr(void *p, CTSize sz) { if (LJ_64 && sz == 4) { /* Support 32 bit pointers on 64 bit targets. */ return ((void *)(uintptr_t)*(uint32_t *)p); } else { lua_assert(sz == CTSIZE_PTR); return *(void **)p; } } /* Set C data pointer. */ static LJ_AINLINE void cdata_setptr(void *p, CTSize sz, const void *v) { if (LJ_64 && sz == 4) { /* Support 32 bit pointers on 64 bit targets. */ *(uint32_t *)p = (uint32_t)(uintptr_t)v; } else { lua_assert(sz == CTSIZE_PTR); *(void **)p = (void *)v; } } /* Allocate fixed-size C data object. */ static LJ_AINLINE GCcdata *lj_cdata_new(CTState *cts, CTypeID id, CTSize sz) { GCcdata *cd; #ifdef LUA_USE_ASSERT CType *ct = ctype_raw(cts, id); lua_assert((ctype_hassize(ct->info) ? ct->size : CTSIZE_PTR) == sz); #endif cd = (GCcdata *)lj_mem_newgco(cts->L, sizeof(GCcdata) + sz); cd->gct = ~LJ_TCDATA; cd->ctypeid = ctype_check(cts, id); return cd; } /* Variant which works without a valid CTState. */ static LJ_AINLINE GCcdata *lj_cdata_new_(lua_State *L, CTypeID id, CTSize sz) { GCcdata *cd = (GCcdata *)lj_mem_newgco(L, sizeof(GCcdata) + sz); cd->gct = ~LJ_TCDATA; cd->ctypeid = id; return cd; } LJ_FUNC GCcdata *lj_cdata_newref(CTState *cts, const void *pp, CTypeID id); LJ_FUNC GCcdata *lj_cdata_newv(CTState *cts, CTypeID id, CTSize sz, CTSize align); LJ_FUNC void LJ_FASTCALL lj_cdata_free(global_State *g, GCcdata *cd); LJ_FUNCA TValue * LJ_FASTCALL lj_cdata_setfin(lua_State *L, GCcdata *cd); LJ_FUNC CType *lj_cdata_index(CTState *cts, GCcdata *cd, cTValue *key, uint8_t **pp, CTInfo *qual); LJ_FUNC int lj_cdata_get(CTState *cts, CType *s, TValue *o, uint8_t *sp); LJ_FUNC void lj_cdata_set(CTState *cts, CType *d, uint8_t *dp, TValue *o, CTInfo qual); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_crecord.h0000664000000000000000000000255012202141143022637 0ustar rootroot/* ** Trace recorder for C data operations. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CRECORD_H #define _LJ_CRECORD_H #include "lj_obj.h" #include "lj_jit.h" #include "lj_ffrecord.h" #if LJ_HASJIT && LJ_HASFFI LJ_FUNC void LJ_FASTCALL recff_cdata_index(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_cdata_call(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_clib_index(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_new(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_errno(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_string(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_copy(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_fill(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_typeof(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_istype(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_abi(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_xof(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL recff_ffi_gc(jit_State *J, RecordFFData *rd); LJ_FUNC void LJ_FASTCALL lj_crecord_tonumber(jit_State *J, RecordFFData *rd); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_split.o0000664000000000000000000000164012213333055023250 0ustar rootrootELF>@@ GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.comment.note.GNU-stack@!@'@,0@5]]E lj_opt_split.ctarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_emit_ppc.h0000664000000000000000000001552712202141143023026 0ustar rootroot/* ** PPC instruction emitter. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Emit basic instructions --------------------------------------------- */ static void emit_tab(ASMState *as, PPCIns pi, Reg rt, Reg ra, Reg rb) { *--as->mcp = pi | PPCF_T(rt) | PPCF_A(ra) | PPCF_B(rb); } #define emit_asb(as, pi, ra, rs, rb) emit_tab(as, (pi), (rs), (ra), (rb)) #define emit_as(as, pi, ra, rs) emit_tab(as, (pi), (rs), (ra), 0) #define emit_ab(as, pi, ra, rb) emit_tab(as, (pi), 0, (ra), (rb)) static void emit_tai(ASMState *as, PPCIns pi, Reg rt, Reg ra, int32_t i) { *--as->mcp = pi | PPCF_T(rt) | PPCF_A(ra) | (i & 0xffff); } #define emit_ti(as, pi, rt, i) emit_tai(as, (pi), (rt), 0, (i)) #define emit_ai(as, pi, ra, i) emit_tai(as, (pi), 0, (ra), (i)) #define emit_asi(as, pi, ra, rs, i) emit_tai(as, (pi), (rs), (ra), (i)) #define emit_fab(as, pi, rf, ra, rb) \ emit_tab(as, (pi), (rf)&31, (ra)&31, (rb)&31) #define emit_fb(as, pi, rf, rb) emit_tab(as, (pi), (rf)&31, 0, (rb)&31) #define emit_fac(as, pi, rf, ra, rc) \ emit_tab(as, (pi) | PPCF_C((rc) & 31), (rf)&31, (ra)&31, 0) #define emit_facb(as, pi, rf, ra, rc, rb) \ emit_tab(as, (pi) | PPCF_C((rc) & 31), (rf)&31, (ra)&31, (rb)&31) #define emit_fai(as, pi, rf, ra, i) emit_tai(as, (pi), (rf)&31, (ra), (i)) static void emit_rot(ASMState *as, PPCIns pi, Reg ra, Reg rs, int32_t n, int32_t b, int32_t e) { *--as->mcp = pi | PPCF_T(rs) | PPCF_A(ra) | PPCF_B(n) | PPCF_MB(b) | PPCF_ME(e); } static void emit_slwi(ASMState *as, Reg ra, Reg rs, int32_t n) { lua_assert(n >= 0 && n < 32); emit_rot(as, PPCI_RLWINM, ra, rs, n, 0, 31-n); } static void emit_rotlwi(ASMState *as, Reg ra, Reg rs, int32_t n) { lua_assert(n >= 0 && n < 32); emit_rot(as, PPCI_RLWINM, ra, rs, n, 0, 31); } /* -- Emit loads/stores --------------------------------------------------- */ /* Prefer rematerialization of BASE/L from global_State over spills. */ #define emit_canremat(ref) ((ref) <= REF_BASE) /* Try to find a one step delta relative to another constant. */ static int emit_kdelta1(ASMState *as, Reg t, int32_t i) { RegSet work = ~as->freeset & RSET_GPR; while (work) { Reg r = rset_picktop(work); IRRef ref = regcost_ref(as->cost[r]); lua_assert(r != t); if (ref < ASMREF_L) { int32_t delta = i - (ra_iskref(ref) ? ra_krefk(as, ref) : IR(ref)->i); if (checki16(delta)) { emit_tai(as, PPCI_ADDI, t, r, delta); return 1; } } rset_clear(work, r); } return 0; /* Failed. */ } /* Load a 32 bit constant into a GPR. */ static void emit_loadi(ASMState *as, Reg r, int32_t i) { if (checki16(i)) { emit_ti(as, PPCI_LI, r, i); } else { if ((i & 0xffff)) { int32_t jgl = i32ptr(J2G(as->J)); if ((uint32_t)(i-jgl) < 65536) { emit_tai(as, PPCI_ADDI, r, RID_JGL, i-jgl-32768); return; } else if (emit_kdelta1(as, r, i)) { return; } emit_asi(as, PPCI_ORI, r, r, i); } emit_ti(as, PPCI_LIS, r, (i >> 16)); } } #define emit_loada(as, r, addr) emit_loadi(as, (r), i32ptr((addr))) static Reg ra_allock(ASMState *as, int32_t k, RegSet allow); /* Get/set from constant pointer. */ static void emit_lsptr(ASMState *as, PPCIns pi, Reg r, void *p, RegSet allow) { int32_t jgl = i32ptr(J2G(as->J)); int32_t i = i32ptr(p); Reg base; if ((uint32_t)(i-jgl) < 65536) { i = i-jgl-32768; base = RID_JGL; } else { base = ra_allock(as, i-(int16_t)i, allow); } emit_tai(as, pi, r, base, i); } #define emit_loadn(as, r, tv) \ emit_lsptr(as, PPCI_LFD, ((r) & 31), (void *)(tv), RSET_GPR) /* Get/set global_State fields. */ static void emit_lsglptr(ASMState *as, PPCIns pi, Reg r, int32_t ofs) { emit_tai(as, pi, r, RID_JGL, ofs-32768); } #define emit_getgl(as, r, field) \ emit_lsglptr(as, PPCI_LWZ, (r), (int32_t)offsetof(global_State, field)) #define emit_setgl(as, r, field) \ emit_lsglptr(as, PPCI_STW, (r), (int32_t)offsetof(global_State, field)) /* Trace number is determined from per-trace exit stubs. */ #define emit_setvmstate(as, i) UNUSED(i) /* -- Emit control-flow instructions -------------------------------------- */ /* Label for internal jumps. */ typedef MCode *MCLabel; /* Return label pointing to current PC. */ #define emit_label(as) ((as)->mcp) static void emit_condbranch(ASMState *as, PPCIns pi, PPCCC cc, MCode *target) { MCode *p = --as->mcp; ptrdiff_t delta = (char *)target - (char *)p; lua_assert(((delta + 0x8000) >> 16) == 0); pi ^= (delta & 0x8000) * (PPCF_Y/0x8000); *p = pi | PPCF_CC(cc) | ((uint32_t)delta & 0xffffu); } static void emit_jmp(ASMState *as, MCode *target) { MCode *p = --as->mcp; ptrdiff_t delta = (char *)target - (char *)p; *p = PPCI_B | (delta & 0x03fffffcu); } static void emit_call(ASMState *as, void *target) { MCode *p = --as->mcp; ptrdiff_t delta = (char *)target - (char *)p; if ((((delta>>2) + 0x00800000) >> 24) == 0) { *p = PPCI_BL | (delta & 0x03fffffcu); } else { /* Target out of range: need indirect call. Don't use arg reg. */ RegSet allow = RSET_GPR & ~RSET_RANGE(RID_R0, REGARG_LASTGPR+1); Reg r = ra_allock(as, i32ptr(target), allow); *p = PPCI_BCTRL; p[-1] = PPCI_MTCTR | PPCF_T(r); as->mcp = p-1; } } /* -- Emit generic operations --------------------------------------------- */ #define emit_mr(as, dst, src) \ emit_asb(as, PPCI_MR, (dst), (src), (src)) /* Generic move between two regs. */ static void emit_movrr(ASMState *as, IRIns *ir, Reg dst, Reg src) { UNUSED(ir); if (dst < RID_MAX_GPR) emit_mr(as, dst, src); else emit_fb(as, PPCI_FMR, dst, src); } /* Generic load of register from stack slot. */ static void emit_spload(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { if (r < RID_MAX_GPR) emit_tai(as, PPCI_LWZ, r, RID_SP, ofs); else emit_fai(as, irt_isnum(ir->t) ? PPCI_LFD : PPCI_LFS, r, RID_SP, ofs); } /* Generic store of register to stack slot. */ static void emit_spstore(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { if (r < RID_MAX_GPR) emit_tai(as, PPCI_STW, r, RID_SP, ofs); else emit_fai(as, irt_isnum(ir->t) ? PPCI_STFD : PPCI_STFS, r, RID_SP, ofs); } /* Emit a compare (for equality) with a constant operand. */ static void emit_cmpi(ASMState *as, Reg r, int32_t k) { if (checki16(k)) { emit_ai(as, PPCI_CMPWI, r, k); } else if (checku16(k)) { emit_ai(as, PPCI_CMPLWI, r, k); } else { emit_ai(as, PPCI_CMPLWI, RID_TMP, k); emit_asi(as, PPCI_XORIS, RID_TMP, r, (k >> 16)); } } /* Add offset to pointer. */ static void emit_addptr(ASMState *as, Reg r, int32_t ofs) { if (ofs) { emit_tai(as, PPCI_ADDI, r, r, ofs); if (!checki16(ofs)) emit_tai(as, PPCI_ADDIS, r, r, (ofs + 32768) >> 16); } } static void emit_spsub(ASMState *as, int32_t ofs) { if (ofs) { emit_tai(as, PPCI_STWU, RID_TMP, RID_SP, -ofs); emit_tai(as, PPCI_ADDI, RID_TMP, RID_SP, CFRAME_SIZE + (as->parent ? as->parent->spadjust : 0)); } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_tab.h0000664000000000000000000000450212231715321021772 0ustar rootroot/* ** Table handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_TAB_H #define _LJ_TAB_H #include "lj_obj.h" /* Hash constants. Tuned using a brute force search. */ #define HASH_BIAS (-0x04c11db7) #define HASH_ROT1 14 #define HASH_ROT2 5 #define HASH_ROT3 13 /* Scramble the bits of numbers and pointers. */ static LJ_AINLINE uint32_t hashrot(uint32_t lo, uint32_t hi) { #if LJ_TARGET_X86ORX64 /* Prefer variant that compiles well for a 2-operand CPU. */ lo ^= hi; hi = lj_rol(hi, HASH_ROT1); lo -= hi; hi = lj_rol(hi, HASH_ROT2); hi ^= lo; hi -= lj_rol(lo, HASH_ROT3); #else lo ^= hi; lo = lo - lj_rol(hi, HASH_ROT1); hi = lo ^ lj_rol(hi, HASH_ROT1 + HASH_ROT2); hi = hi - lj_rol(lo, HASH_ROT3); #endif return hi; } #define hsize2hbits(s) ((s) ? ((s)==1 ? 1 : 1+lj_fls((uint32_t)((s)-1))) : 0) LJ_FUNCA GCtab *lj_tab_new(lua_State *L, uint32_t asize, uint32_t hbits); #if LJ_HASJIT LJ_FUNC GCtab * LJ_FASTCALL lj_tab_new1(lua_State *L, uint32_t ahsize); #endif LJ_FUNCA GCtab * LJ_FASTCALL lj_tab_dup(lua_State *L, const GCtab *kt); LJ_FUNC void LJ_FASTCALL lj_tab_free(global_State *g, GCtab *t); #if LJ_HASFFI LJ_FUNC void lj_tab_rehash(lua_State *L, GCtab *t); #endif LJ_FUNCA void lj_tab_reasize(lua_State *L, GCtab *t, uint32_t nasize); /* Caveat: all getters except lj_tab_get() can return NULL! */ LJ_FUNCA cTValue * LJ_FASTCALL lj_tab_getinth(GCtab *t, int32_t key); LJ_FUNC cTValue *lj_tab_getstr(GCtab *t, GCstr *key); LJ_FUNCA cTValue *lj_tab_get(lua_State *L, GCtab *t, cTValue *key); /* Caveat: all setters require a write barrier for the stored value. */ LJ_FUNCA TValue *lj_tab_newkey(lua_State *L, GCtab *t, cTValue *key); LJ_FUNC TValue *lj_tab_setinth(lua_State *L, GCtab *t, int32_t key); LJ_FUNC TValue *lj_tab_setstr(lua_State *L, GCtab *t, GCstr *key); LJ_FUNC TValue *lj_tab_set(lua_State *L, GCtab *t, cTValue *key); #define inarray(t, key) ((MSize)(key) < (MSize)(t)->asize) #define arrayslot(t, i) (&tvref((t)->array)[(i)]) #define lj_tab_getint(t, key) \ (inarray((t), (key)) ? arrayslot((t), (key)) : lj_tab_getinth((t), (key))) #define lj_tab_setint(L, t, key) \ (inarray((t), (key)) ? arrayslot((t), (key)) : lj_tab_setinth(L, (t), (key))) LJ_FUNCA int lj_tab_next(lua_State *L, GCtab *t, TValue *key); LJ_FUNCA MSize LJ_FASTCALL lj_tab_len(GCtab *t); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_obj.h0000664000000000000000000007345412231715321022012 0ustar rootroot/* ** LuaJIT VM tags, values and objects. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #ifndef _LJ_OBJ_H #define _LJ_OBJ_H #include "lua.h" #include "lj_def.h" #include "lj_arch.h" /* -- Memory references (32 bit address space) ---------------------------- */ /* Memory size. */ typedef uint32_t MSize; /* Memory reference */ typedef struct MRef { uint32_t ptr32; /* Pseudo 32 bit pointer. */ } MRef; #define mref(r, t) ((t *)(void *)(uintptr_t)(r).ptr32) #define setmref(r, p) ((r).ptr32 = (uint32_t)(uintptr_t)(void *)(p)) #define setmrefr(r, v) ((r).ptr32 = (v).ptr32) /* -- GC object references (32 bit address space) ------------------------- */ /* GCobj reference */ typedef struct GCRef { uint32_t gcptr32; /* Pseudo 32 bit pointer. */ } GCRef; /* Common GC header for all collectable objects. */ #define GCHeader GCRef nextgc; uint8_t marked; uint8_t gct /* This occupies 6 bytes, so use the next 2 bytes for non-32 bit fields. */ #define gcref(r) ((GCobj *)(uintptr_t)(r).gcptr32) #define gcrefp(r, t) ((t *)(void *)(uintptr_t)(r).gcptr32) #define gcrefu(r) ((r).gcptr32) #define gcrefi(r) ((int32_t)(r).gcptr32) #define gcrefeq(r1, r2) ((r1).gcptr32 == (r2).gcptr32) #define gcnext(gc) (gcref((gc)->gch.nextgc)) #define setgcref(r, gc) ((r).gcptr32 = (uint32_t)(uintptr_t)&(gc)->gch) #define setgcrefi(r, i) ((r).gcptr32 = (uint32_t)(i)) #define setgcrefp(r, p) ((r).gcptr32 = (uint32_t)(uintptr_t)(p)) #define setgcrefnull(r) ((r).gcptr32 = 0) #define setgcrefr(r, v) ((r).gcptr32 = (v).gcptr32) /* IMPORTANT NOTE: ** ** All uses of the setgcref* macros MUST be accompanied with a write barrier. ** ** This is to ensure the integrity of the incremental GC. The invariant ** to preserve is that a black object never points to a white object. ** I.e. never store a white object into a field of a black object. ** ** It's ok to LEAVE OUT the write barrier ONLY in the following cases: ** - The source is not a GC object (NULL). ** - The target is a GC root. I.e. everything in global_State. ** - The target is a lua_State field (threads are never black). ** - The target is a stack slot, see setgcV et al. ** - The target is an open upvalue, i.e. pointing to a stack slot. ** - The target is a newly created object (i.e. marked white). But make ** sure nothing invokes the GC inbetween. ** - The target and the source are the same object (self-reference). ** - The target already contains the object (e.g. moving elements around). ** ** The most common case is a store to a stack slot. All other cases where ** a barrier has been omitted are annotated with a NOBARRIER comment. ** ** The same logic applies for stores to table slots (array part or hash ** part). ALL uses of lj_tab_set* require a barrier for the stored value ** *and* the stored key, based on the above rules. In practice this means ** a barrier is needed if *either* of the key or value are a GC object. ** ** It's ok to LEAVE OUT the write barrier in the following special cases: ** - The stored value is nil. The key doesn't matter because it's either ** not resurrected or lj_tab_newkey() will take care of the key barrier. ** - The key doesn't matter if the *previously* stored value is guaranteed ** to be non-nil (because the key is kept alive in the table). ** - The key doesn't matter if it's guaranteed not to be part of the table, ** since lj_tab_newkey() takes care of the key barrier. This applies ** trivially to new tables, but watch out for resurrected keys. Storing ** a nil value leaves the key in the table! ** ** In case of doubt use lj_gc_anybarriert() as it's rather cheap. It's used ** by the interpreter for all table stores. ** ** Note: In contrast to Lua's GC, LuaJIT's GC does *not* specially mark ** dead keys in tables. The reference is left in, but it's guaranteed to ** be never dereferenced as long as the value is nil. It's ok if the key is ** freed or if any object subsequently gets the same address. ** ** Not destroying dead keys helps to keep key hash slots stable. This avoids ** specialization back-off for HREFK when a value flips between nil and ** non-nil and the GC gets in the way. It also allows safely hoisting ** HREF/HREFK across GC steps. Dead keys are only removed if a table is ** resized (i.e. by NEWREF) and xREF must not be CSEd across a resize. ** ** The trade-off is that a write barrier for tables must take the key into ** account, too. Implicitly resurrecting the key by storing a non-nil value ** may invalidate the incremental GC invariant. */ /* -- Common type definitions --------------------------------------------- */ /* Types for handling bytecodes. Need this here, details in lj_bc.h. */ typedef uint32_t BCIns; /* Bytecode instruction. */ typedef uint32_t BCPos; /* Bytecode position. */ typedef uint32_t BCReg; /* Bytecode register. */ typedef int32_t BCLine; /* Bytecode line number. */ /* Internal assembler functions. Never call these directly from C. */ typedef void (*ASMFunction)(void); /* Resizable string buffer. Need this here, details in lj_str.h. */ typedef struct SBuf { char *buf; /* String buffer base. */ MSize n; /* String buffer length. */ MSize sz; /* String buffer size. */ } SBuf; /* -- Tags and values ----------------------------------------------------- */ /* Frame link. */ typedef union { int32_t ftsz; /* Frame type and size of previous frame. */ MRef pcr; /* Overlaps PC for Lua frames. */ } FrameLink; /* Tagged value. */ typedef LJ_ALIGN(8) union TValue { uint64_t u64; /* 64 bit pattern overlaps number. */ lua_Number n; /* Number object overlaps split tag/value object. */ struct { LJ_ENDIAN_LOHI( union { GCRef gcr; /* GCobj reference (if any). */ int32_t i; /* Integer value. */ }; , uint32_t it; /* Internal object tag. Must overlap MSW of number. */ ) }; struct { LJ_ENDIAN_LOHI( GCRef func; /* Function for next frame (or dummy L). */ , FrameLink tp; /* Link to previous frame. */ ) } fr; struct { LJ_ENDIAN_LOHI( uint32_t lo; /* Lower 32 bits of number. */ , uint32_t hi; /* Upper 32 bits of number. */ ) } u32; } TValue; typedef const TValue cTValue; #define tvref(r) (mref(r, TValue)) /* More external and GCobj tags for internal objects. */ #define LAST_TT LUA_TTHREAD #define LUA_TPROTO (LAST_TT+1) #define LUA_TCDATA (LAST_TT+2) /* Internal object tags. ** ** Internal tags overlap the MSW of a number object (must be a double). ** Interpreted as a double these are special NaNs. The FPU only generates ** one type of NaN (0xfff8_0000_0000_0000). So MSWs > 0xfff80000 are available ** for use as internal tags. Small negative numbers are used to shorten the ** encoding of type comparisons (reg/mem against sign-ext. 8 bit immediate). ** ** ---MSW---.---LSW--- ** primitive types | itype | | ** lightuserdata | itype | void * | (32 bit platforms) ** lightuserdata |ffff| void * | (64 bit platforms, 47 bit pointers) ** GC objects | itype | GCRef | ** int (LJ_DUALNUM)| itype | int | ** number -------double------ ** ** ORDER LJ_T ** Primitive types nil/false/true must be first, lightuserdata next. ** GC objects are at the end, table/userdata must be lowest. ** Also check lj_ir.h for similar ordering constraints. */ #define LJ_TNIL (~0u) #define LJ_TFALSE (~1u) #define LJ_TTRUE (~2u) #define LJ_TLIGHTUD (~3u) #define LJ_TSTR (~4u) #define LJ_TUPVAL (~5u) #define LJ_TTHREAD (~6u) #define LJ_TPROTO (~7u) #define LJ_TFUNC (~8u) #define LJ_TTRACE (~9u) #define LJ_TCDATA (~10u) #define LJ_TTAB (~11u) #define LJ_TUDATA (~12u) /* This is just the canonical number type used in some places. */ #define LJ_TNUMX (~13u) /* Integers have itype == LJ_TISNUM doubles have itype < LJ_TISNUM */ #if LJ_64 #define LJ_TISNUM 0xfffeffffu #else #define LJ_TISNUM LJ_TNUMX #endif #define LJ_TISTRUECOND LJ_TFALSE #define LJ_TISPRI LJ_TTRUE #define LJ_TISGCV (LJ_TSTR+1) #define LJ_TISTABUD LJ_TTAB /* -- String object ------------------------------------------------------- */ /* String object header. String payload follows. */ typedef struct GCstr { GCHeader; uint8_t reserved; /* Used by lexer for fast lookup of reserved words. */ uint8_t unused; MSize hash; /* Hash of string. */ MSize len; /* Size of string. */ } GCstr; #define strref(r) (&gcref((r))->str) #define strdata(s) ((const char *)((s)+1)) #define strdatawr(s) ((char *)((s)+1)) #define strVdata(o) strdata(strV(o)) #define sizestring(s) (sizeof(struct GCstr)+(s)->len+1) /* -- Userdata object ----------------------------------------------------- */ /* Userdata object. Payload follows. */ typedef struct GCudata { GCHeader; uint8_t udtype; /* Userdata type. */ uint8_t unused2; GCRef env; /* Should be at same offset in GCfunc. */ MSize len; /* Size of payload. */ GCRef metatable; /* Must be at same offset in GCtab. */ uint32_t align1; /* To force 8 byte alignment of the payload. */ } GCudata; /* Userdata types. */ enum { UDTYPE_USERDATA, /* Regular userdata. */ UDTYPE_IO_FILE, /* I/O library FILE. */ UDTYPE_FFI_CLIB, /* FFI C library namespace. */ UDTYPE__MAX }; #define uddata(u) ((void *)((u)+1)) #define sizeudata(u) (sizeof(struct GCudata)+(u)->len) /* -- C data object ------------------------------------------------------- */ /* C data object. Payload follows. */ typedef struct GCcdata { GCHeader; uint16_t ctypeid; /* C type ID. */ } GCcdata; /* Prepended to variable-sized or realigned C data objects. */ typedef struct GCcdataVar { uint16_t offset; /* Offset to allocated memory (relative to GCcdata). */ uint16_t extra; /* Extra space allocated (incl. GCcdata + GCcdatav). */ MSize len; /* Size of payload. */ } GCcdataVar; #define cdataptr(cd) ((void *)((cd)+1)) #define cdataisv(cd) ((cd)->marked & 0x80) #define cdatav(cd) ((GCcdataVar *)((char *)(cd) - sizeof(GCcdataVar))) #define cdatavlen(cd) check_exp(cdataisv(cd), cdatav(cd)->len) #define sizecdatav(cd) (cdatavlen(cd) + cdatav(cd)->extra) #define memcdatav(cd) ((void *)((char *)(cd) - cdatav(cd)->offset)) /* -- Prototype object ---------------------------------------------------- */ #define SCALE_NUM_GCO ((int32_t)sizeof(lua_Number)/sizeof(GCRef)) #define round_nkgc(n) (((n) + SCALE_NUM_GCO-1) & ~(SCALE_NUM_GCO-1)) typedef struct GCproto { GCHeader; uint8_t numparams; /* Number of parameters. */ uint8_t framesize; /* Fixed frame size. */ MSize sizebc; /* Number of bytecode instructions. */ GCRef gclist; MRef k; /* Split constant array (points to the middle). */ MRef uv; /* Upvalue list. local slot|0x8000 or parent uv idx. */ MSize sizekgc; /* Number of collectable constants. */ MSize sizekn; /* Number of lua_Number constants. */ MSize sizept; /* Total size including colocated arrays. */ uint8_t sizeuv; /* Number of upvalues. */ uint8_t flags; /* Miscellaneous flags (see below). */ uint16_t trace; /* Anchor for chain of root traces. */ /* ------ The following fields are for debugging/tracebacks only ------ */ GCRef chunkname; /* Name of the chunk this function was defined in. */ BCLine firstline; /* First line of the function definition. */ BCLine numline; /* Number of lines for the function definition. */ MRef lineinfo; /* Compressed map from bytecode ins. to source line. */ MRef uvinfo; /* Upvalue names. */ MRef varinfo; /* Names and compressed extents of local variables. */ } GCproto; /* Flags for prototype. */ #define PROTO_CHILD 0x01 /* Has child prototypes. */ #define PROTO_VARARG 0x02 /* Vararg function. */ #define PROTO_FFI 0x04 /* Uses BC_KCDATA for FFI datatypes. */ #define PROTO_NOJIT 0x08 /* JIT disabled for this function. */ #define PROTO_ILOOP 0x10 /* Patched bytecode with ILOOP etc. */ /* Only used during parsing. */ #define PROTO_HAS_RETURN 0x20 /* Already emitted a return. */ #define PROTO_FIXUP_RETURN 0x40 /* Need to fixup emitted returns. */ /* Top bits used for counting created closures. */ #define PROTO_CLCOUNT 0x20 /* Base of saturating 3 bit counter. */ #define PROTO_CLC_BITS 3 #define PROTO_CLC_POLY (3*PROTO_CLCOUNT) /* Polymorphic threshold. */ #define PROTO_UV_LOCAL 0x8000 /* Upvalue for local slot. */ #define PROTO_UV_IMMUTABLE 0x4000 /* Immutable upvalue. */ #define proto_kgc(pt, idx) \ check_exp((uintptr_t)(intptr_t)(idx) >= (uintptr_t)-(intptr_t)(pt)->sizekgc, \ gcref(mref((pt)->k, GCRef)[(idx)])) #define proto_knumtv(pt, idx) \ check_exp((uintptr_t)(idx) < (pt)->sizekn, &mref((pt)->k, TValue)[(idx)]) #define proto_bc(pt) ((BCIns *)((char *)(pt) + sizeof(GCproto))) #define proto_bcpos(pt, pc) ((BCPos)((pc) - proto_bc(pt))) #define proto_uv(pt) (mref((pt)->uv, uint16_t)) #define proto_chunkname(pt) (strref((pt)->chunkname)) #define proto_chunknamestr(pt) (strdata(proto_chunkname((pt)))) #define proto_lineinfo(pt) (mref((pt)->lineinfo, const void)) #define proto_uvinfo(pt) (mref((pt)->uvinfo, const uint8_t)) #define proto_varinfo(pt) (mref((pt)->varinfo, const uint8_t)) /* -- Upvalue object ------------------------------------------------------ */ typedef struct GCupval { GCHeader; uint8_t closed; /* Set if closed (i.e. uv->v == &uv->u.value). */ uint8_t immutable; /* Immutable value. */ union { TValue tv; /* If closed: the value itself. */ struct { /* If open: double linked list, anchored at thread. */ GCRef prev; GCRef next; }; }; MRef v; /* Points to stack slot (open) or above (closed). */ uint32_t dhash; /* Disambiguation hash: dh1 != dh2 => cannot alias. */ } GCupval; #define uvprev(uv_) (&gcref((uv_)->prev)->uv) #define uvnext(uv_) (&gcref((uv_)->next)->uv) #define uvval(uv_) (mref((uv_)->v, TValue)) /* -- Function object (closures) ------------------------------------------ */ /* Common header for functions. env should be at same offset in GCudata. */ #define GCfuncHeader \ GCHeader; uint8_t ffid; uint8_t nupvalues; \ GCRef env; GCRef gclist; MRef pc typedef struct GCfuncC { GCfuncHeader; lua_CFunction f; /* C function to be called. */ TValue upvalue[1]; /* Array of upvalues (TValue). */ } GCfuncC; typedef struct GCfuncL { GCfuncHeader; GCRef uvptr[1]; /* Array of _pointers_ to upvalue objects (GCupval). */ } GCfuncL; typedef union GCfunc { GCfuncC c; GCfuncL l; } GCfunc; #define FF_LUA 0 #define FF_C 1 #define isluafunc(fn) ((fn)->c.ffid == FF_LUA) #define iscfunc(fn) ((fn)->c.ffid == FF_C) #define isffunc(fn) ((fn)->c.ffid > FF_C) #define funcproto(fn) \ check_exp(isluafunc(fn), (GCproto *)(mref((fn)->l.pc, char)-sizeof(GCproto))) #define sizeCfunc(n) (sizeof(GCfuncC)-sizeof(TValue)+sizeof(TValue)*(n)) #define sizeLfunc(n) (sizeof(GCfuncL)-sizeof(GCRef)+sizeof(GCRef)*(n)) /* -- Table object -------------------------------------------------------- */ /* Hash node. */ typedef struct Node { TValue val; /* Value object. Must be first field. */ TValue key; /* Key object. */ MRef next; /* Hash chain. */ MRef freetop; /* Top of free elements (stored in t->node[0]). */ } Node; LJ_STATIC_ASSERT(offsetof(Node, val) == 0); typedef struct GCtab { GCHeader; uint8_t nomm; /* Negative cache for fast metamethods. */ int8_t colo; /* Array colocation. */ MRef array; /* Array part. */ GCRef gclist; GCRef metatable; /* Must be at same offset in GCudata. */ MRef node; /* Hash part. */ uint32_t asize; /* Size of array part (keys [0, asize-1]). */ uint32_t hmask; /* Hash part mask (size of hash part - 1). */ } GCtab; #define sizetabcolo(n) ((n)*sizeof(TValue) + sizeof(GCtab)) #define tabref(r) (&gcref((r))->tab) #define noderef(r) (mref((r), Node)) #define nextnode(n) (mref((n)->next, Node)) /* -- State objects ------------------------------------------------------- */ /* VM states. */ enum { LJ_VMST_INTERP, /* Interpreter. */ LJ_VMST_C, /* C function. */ LJ_VMST_GC, /* Garbage collector. */ LJ_VMST_EXIT, /* Trace exit handler. */ LJ_VMST_RECORD, /* Trace recorder. */ LJ_VMST_OPT, /* Optimizer. */ LJ_VMST_ASM, /* Assembler. */ LJ_VMST__MAX }; #define setvmstate(g, st) ((g)->vmstate = ~LJ_VMST_##st) /* Metamethods. ORDER MM */ #ifdef LJ_HASFFI #define MMDEF_FFI(_) _(new) #else #define MMDEF_FFI(_) #endif #if LJ_52 || LJ_HASFFI #define MMDEF_PAIRS(_) _(pairs) _(ipairs) #else #define MMDEF_PAIRS(_) #define MM_pairs 255 #define MM_ipairs 255 #endif #define MMDEF(_) \ _(index) _(newindex) _(gc) _(mode) _(eq) _(len) \ /* Only the above (fast) metamethods are negative cached (max. 8). */ \ _(lt) _(le) _(concat) _(call) \ /* The following must be in ORDER ARITH. */ \ _(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \ /* The following are used in the standard libraries. */ \ _(metatable) _(tostring) MMDEF_FFI(_) MMDEF_PAIRS(_) typedef enum { #define MMENUM(name) MM_##name, MMDEF(MMENUM) #undef MMENUM MM__MAX, MM____ = MM__MAX, MM_FAST = MM_len } MMS; /* GC root IDs. */ typedef enum { GCROOT_MMNAME, /* Metamethod names. */ GCROOT_MMNAME_LAST = GCROOT_MMNAME + MM__MAX-1, GCROOT_BASEMT, /* Metatables for base types. */ GCROOT_BASEMT_NUM = GCROOT_BASEMT + ~LJ_TNUMX, GCROOT_IO_INPUT, /* Userdata for default I/O input file. */ GCROOT_IO_OUTPUT, /* Userdata for default I/O output file. */ GCROOT_MAX } GCRootID; #define basemt_it(g, it) ((g)->gcroot[GCROOT_BASEMT+~(it)]) #define basemt_obj(g, o) ((g)->gcroot[GCROOT_BASEMT+itypemap(o)]) #define mmname_str(g, mm) (strref((g)->gcroot[GCROOT_MMNAME+(mm)])) typedef struct GCState { MSize total; /* Memory currently allocated. */ MSize threshold; /* Memory threshold. */ uint8_t currentwhite; /* Current white color. */ uint8_t state; /* GC state. */ uint8_t nocdatafin; /* No cdata finalizer called. */ uint8_t unused2; MSize sweepstr; /* Sweep position in string table. */ GCRef root; /* List of all collectable objects. */ MRef sweep; /* Sweep position in root list. */ GCRef gray; /* List of gray objects. */ GCRef grayagain; /* List of objects for atomic traversal. */ GCRef weak; /* List of weak tables (to be cleared). */ GCRef mmudata; /* List of userdata (to be finalized). */ MSize stepmul; /* Incremental GC step granularity. */ MSize debt; /* Debt (how much GC is behind schedule). */ MSize estimate; /* Estimate of memory actually in use. */ MSize pause; /* Pause between successive GC cycles. */ } GCState; /* Global state, shared by all threads of a Lua universe. */ typedef struct global_State { GCRef *strhash; /* String hash table (hash chain anchors). */ MSize strmask; /* String hash mask (size of hash table - 1). */ MSize strnum; /* Number of strings in hash table. */ lua_Alloc allocf; /* Memory allocator. */ void *allocd; /* Memory allocator data. */ GCState gc; /* Garbage collector. */ SBuf tmpbuf; /* Temporary buffer for string concatenation. */ Node nilnode; /* Fallback 1-element hash part (nil key and value). */ GCstr strempty; /* Empty string. */ uint8_t stremptyz; /* Zero terminator of empty string. */ uint8_t hookmask; /* Hook mask. */ uint8_t dispatchmode; /* Dispatch mode. */ uint8_t vmevmask; /* VM event mask. */ GCRef mainthref; /* Link to main thread. */ TValue registrytv; /* Anchor for registry. */ TValue tmptv, tmptv2; /* Temporary TValues. */ GCupval uvhead; /* Head of double-linked list of all open upvalues. */ int32_t hookcount; /* Instruction hook countdown. */ int32_t hookcstart; /* Start count for instruction hook counter. */ lua_Hook hookf; /* Hook function. */ lua_CFunction wrapf; /* Wrapper for C function calls. */ lua_CFunction panic; /* Called as a last resort for errors. */ volatile int32_t vmstate; /* VM state or current JIT code trace number. */ BCIns bc_cfunc_int; /* Bytecode for internal C function calls. */ BCIns bc_cfunc_ext; /* Bytecode for external C function calls. */ GCRef jit_L; /* Current JIT code lua_State or NULL. */ MRef jit_base; /* Current JIT code L->base. */ MRef ctype_state; /* Pointer to C type state. */ GCRef gcroot[GCROOT_MAX]; /* GC roots. */ } global_State; #define mainthread(g) (&gcref(g->mainthref)->th) #define niltv(L) \ check_exp(tvisnil(&G(L)->nilnode.val), &G(L)->nilnode.val) #define niltvg(g) \ check_exp(tvisnil(&(g)->nilnode.val), &(g)->nilnode.val) /* Hook management. Hook event masks are defined in lua.h. */ #define HOOK_EVENTMASK 0x0f #define HOOK_ACTIVE 0x10 #define HOOK_ACTIVE_SHIFT 4 #define HOOK_VMEVENT 0x20 #define HOOK_GC 0x40 #define hook_active(g) ((g)->hookmask & HOOK_ACTIVE) #define hook_enter(g) ((g)->hookmask |= HOOK_ACTIVE) #define hook_entergc(g) ((g)->hookmask |= (HOOK_ACTIVE|HOOK_GC)) #define hook_vmevent(g) ((g)->hookmask |= (HOOK_ACTIVE|HOOK_VMEVENT)) #define hook_leave(g) ((g)->hookmask &= ~HOOK_ACTIVE) #define hook_save(g) ((g)->hookmask & ~HOOK_EVENTMASK) #define hook_restore(g, h) \ ((g)->hookmask = ((g)->hookmask & HOOK_EVENTMASK) | (h)) /* Per-thread state object. */ struct lua_State { GCHeader; uint8_t dummy_ffid; /* Fake FF_C for curr_funcisL() on dummy frames. */ uint8_t status; /* Thread status. */ MRef glref; /* Link to global state. */ GCRef gclist; /* GC chain. */ TValue *base; /* Base of currently executing function. */ TValue *top; /* First free slot in the stack. */ MRef maxstack; /* Last free slot in the stack. */ MRef stack; /* Stack base. */ GCRef openupval; /* List of open upvalues in the stack. */ GCRef env; /* Thread environment (table of globals). */ void *cframe; /* End of C stack frame chain. */ MSize stacksize; /* True stack size (incl. LJ_STACK_EXTRA). */ }; #define G(L) (mref(L->glref, global_State)) #define registry(L) (&G(L)->registrytv) /* Macros to access the currently executing (Lua) function. */ #define curr_func(L) (&gcref((L->base-1)->fr.func)->fn) #define curr_funcisL(L) (isluafunc(curr_func(L))) #define curr_proto(L) (funcproto(curr_func(L))) #define curr_topL(L) (L->base + curr_proto(L)->framesize) #define curr_top(L) (curr_funcisL(L) ? curr_topL(L) : L->top) /* -- GC object definition and conversions -------------------------------- */ /* GC header for generic access to common fields of GC objects. */ typedef struct GChead { GCHeader; uint8_t unused1; uint8_t unused2; GCRef env; GCRef gclist; GCRef metatable; } GChead; /* The env field SHOULD be at the same offset for all GC objects. */ LJ_STATIC_ASSERT(offsetof(GChead, env) == offsetof(GCfuncL, env)); LJ_STATIC_ASSERT(offsetof(GChead, env) == offsetof(GCudata, env)); /* The metatable field MUST be at the same offset for all GC objects. */ LJ_STATIC_ASSERT(offsetof(GChead, metatable) == offsetof(GCtab, metatable)); LJ_STATIC_ASSERT(offsetof(GChead, metatable) == offsetof(GCudata, metatable)); /* The gclist field MUST be at the same offset for all GC objects. */ LJ_STATIC_ASSERT(offsetof(GChead, gclist) == offsetof(lua_State, gclist)); LJ_STATIC_ASSERT(offsetof(GChead, gclist) == offsetof(GCproto, gclist)); LJ_STATIC_ASSERT(offsetof(GChead, gclist) == offsetof(GCfuncL, gclist)); LJ_STATIC_ASSERT(offsetof(GChead, gclist) == offsetof(GCtab, gclist)); typedef union GCobj { GChead gch; GCstr str; GCupval uv; lua_State th; GCproto pt; GCfunc fn; GCcdata cd; GCtab tab; GCudata ud; } GCobj; /* Macros to convert a GCobj pointer into a specific value. */ #define gco2str(o) check_exp((o)->gch.gct == ~LJ_TSTR, &(o)->str) #define gco2uv(o) check_exp((o)->gch.gct == ~LJ_TUPVAL, &(o)->uv) #define gco2th(o) check_exp((o)->gch.gct == ~LJ_TTHREAD, &(o)->th) #define gco2pt(o) check_exp((o)->gch.gct == ~LJ_TPROTO, &(o)->pt) #define gco2func(o) check_exp((o)->gch.gct == ~LJ_TFUNC, &(o)->fn) #define gco2cd(o) check_exp((o)->gch.gct == ~LJ_TCDATA, &(o)->cd) #define gco2tab(o) check_exp((o)->gch.gct == ~LJ_TTAB, &(o)->tab) #define gco2ud(o) check_exp((o)->gch.gct == ~LJ_TUDATA, &(o)->ud) /* Macro to convert any collectable object into a GCobj pointer. */ #define obj2gco(v) ((GCobj *)(v)) /* -- TValue getters/setters ---------------------------------------------- */ #ifdef LUA_USE_ASSERT #include "lj_gc.h" #endif /* Macros to test types. */ #define itype(o) ((o)->it) #define tvisnil(o) (itype(o) == LJ_TNIL) #define tvisfalse(o) (itype(o) == LJ_TFALSE) #define tvistrue(o) (itype(o) == LJ_TTRUE) #define tvisbool(o) (tvisfalse(o) || tvistrue(o)) #if LJ_64 #define tvislightud(o) (((int32_t)itype(o) >> 15) == -2) #else #define tvislightud(o) (itype(o) == LJ_TLIGHTUD) #endif #define tvisstr(o) (itype(o) == LJ_TSTR) #define tvisfunc(o) (itype(o) == LJ_TFUNC) #define tvisthread(o) (itype(o) == LJ_TTHREAD) #define tvisproto(o) (itype(o) == LJ_TPROTO) #define tviscdata(o) (itype(o) == LJ_TCDATA) #define tvistab(o) (itype(o) == LJ_TTAB) #define tvisudata(o) (itype(o) == LJ_TUDATA) #define tvisnumber(o) (itype(o) <= LJ_TISNUM) #define tvisint(o) (LJ_DUALNUM && itype(o) == LJ_TISNUM) #define tvisnum(o) (itype(o) < LJ_TISNUM) #define tvistruecond(o) (itype(o) < LJ_TISTRUECOND) #define tvispri(o) (itype(o) >= LJ_TISPRI) #define tvistabud(o) (itype(o) <= LJ_TISTABUD) /* && !tvisnum() */ #define tvisgcv(o) ((itype(o) - LJ_TISGCV) > (LJ_TNUMX - LJ_TISGCV)) /* Special macros to test numbers for NaN, +0, -0, +1 and raw equality. */ #define tvisnan(o) ((o)->n != (o)->n) #if LJ_64 #define tviszero(o) (((o)->u64 << 1) == 0) #else #define tviszero(o) (((o)->u32.lo | ((o)->u32.hi << 1)) == 0) #endif #define tvispzero(o) ((o)->u64 == 0) #define tvismzero(o) ((o)->u64 == U64x(80000000,00000000)) #define tvispone(o) ((o)->u64 == U64x(3ff00000,00000000)) #define rawnumequal(o1, o2) ((o1)->u64 == (o2)->u64) /* Macros to convert type ids. */ #if LJ_64 #define itypemap(o) \ (tvisnumber(o) ? ~LJ_TNUMX : tvislightud(o) ? ~LJ_TLIGHTUD : ~itype(o)) #else #define itypemap(o) (tvisnumber(o) ? ~LJ_TNUMX : ~itype(o)) #endif /* Macros to get tagged values. */ #define gcval(o) (gcref((o)->gcr)) #define boolV(o) check_exp(tvisbool(o), (LJ_TFALSE - (o)->it)) #if LJ_64 #define lightudV(o) \ check_exp(tvislightud(o), (void *)((o)->u64 & U64x(00007fff,ffffffff))) #else #define lightudV(o) check_exp(tvislightud(o), gcrefp((o)->gcr, void)) #endif #define gcV(o) check_exp(tvisgcv(o), gcval(o)) #define strV(o) check_exp(tvisstr(o), &gcval(o)->str) #define funcV(o) check_exp(tvisfunc(o), &gcval(o)->fn) #define threadV(o) check_exp(tvisthread(o), &gcval(o)->th) #define protoV(o) check_exp(tvisproto(o), &gcval(o)->pt) #define cdataV(o) check_exp(tviscdata(o), &gcval(o)->cd) #define tabV(o) check_exp(tvistab(o), &gcval(o)->tab) #define udataV(o) check_exp(tvisudata(o), &gcval(o)->ud) #define numV(o) check_exp(tvisnum(o), (o)->n) #define intV(o) check_exp(tvisint(o), (int32_t)(o)->i) /* Macros to set tagged values. */ #define setitype(o, i) ((o)->it = (i)) #define setnilV(o) ((o)->it = LJ_TNIL) #define setboolV(o, x) ((o)->it = LJ_TFALSE-(uint32_t)(x)) static LJ_AINLINE void setlightudV(TValue *o, void *p) { #if LJ_64 o->u64 = (uint64_t)p | (((uint64_t)0xffff) << 48); #else setgcrefp(o->gcr, p); setitype(o, LJ_TLIGHTUD); #endif } #if LJ_64 #define checklightudptr(L, p) \ (((uint64_t)(p) >> 47) ? (lj_err_msg(L, LJ_ERR_BADLU), NULL) : (p)) #define setcont(o, f) \ ((o)->u64 = (uint64_t)(void *)(f) - (uint64_t)lj_vm_asm_begin) #else #define checklightudptr(L, p) (p) #define setcont(o, f) setlightudV((o), (void *)(f)) #endif #define tvchecklive(L, o) \ UNUSED(L), lua_assert(!tvisgcv(o) || \ ((~itype(o) == gcval(o)->gch.gct) && !isdead(G(L), gcval(o)))) static LJ_AINLINE void setgcV(lua_State *L, TValue *o, GCobj *v, uint32_t itype) { setgcref(o->gcr, v); setitype(o, itype); tvchecklive(L, o); } #define define_setV(name, type, tag) \ static LJ_AINLINE void name(lua_State *L, TValue *o, type *v) \ { \ setgcV(L, o, obj2gco(v), tag); \ } define_setV(setstrV, GCstr, LJ_TSTR) define_setV(setthreadV, lua_State, LJ_TTHREAD) define_setV(setprotoV, GCproto, LJ_TPROTO) define_setV(setfuncV, GCfunc, LJ_TFUNC) define_setV(setcdataV, GCcdata, LJ_TCDATA) define_setV(settabV, GCtab, LJ_TTAB) define_setV(setudataV, GCudata, LJ_TUDATA) #define setnumV(o, x) ((o)->n = (x)) #define setnanV(o) ((o)->u64 = U64x(fff80000,00000000)) #define setpinfV(o) ((o)->u64 = U64x(7ff00000,00000000)) #define setminfV(o) ((o)->u64 = U64x(fff00000,00000000)) static LJ_AINLINE void setintV(TValue *o, int32_t i) { #if LJ_DUALNUM o->i = (uint32_t)i; setitype(o, LJ_TISNUM); #else o->n = (lua_Number)i; #endif } static LJ_AINLINE void setint64V(TValue *o, int64_t i) { if (LJ_DUALNUM && LJ_LIKELY(i == (int64_t)(int32_t)i)) setintV(o, (int32_t)i); else setnumV(o, (lua_Number)i); } #if LJ_64 #define setintptrV(o, i) setint64V((o), (i)) #else #define setintptrV(o, i) setintV((o), (i)) #endif /* Copy tagged values. */ static LJ_AINLINE void copyTV(lua_State *L, TValue *o1, const TValue *o2) { *o1 = *o2; tvchecklive(L, o1); } /* -- Number to integer conversion ---------------------------------------- */ #if LJ_SOFTFP LJ_ASMF int32_t lj_vm_tobit(double x); #endif static LJ_AINLINE int32_t lj_num2bit(lua_Number n) { #if LJ_SOFTFP return lj_vm_tobit(n); #else TValue o; o.n = n + 6755399441055744.0; /* 2^52 + 2^51 */ return (int32_t)o.u32.lo; #endif } #if LJ_TARGET_X86 && !defined(__SSE2__) #define lj_num2int(n) lj_num2bit((n)) #else #define lj_num2int(n) ((int32_t)(n)) #endif static LJ_AINLINE uint64_t lj_num2u64(lua_Number n) { #ifdef _MSC_VER if (n >= 9223372036854775808.0) /* They think it's a feature. */ return (uint64_t)(int64_t)(n - 18446744073709551616.0); else #endif return (uint64_t)n; } static LJ_AINLINE int32_t numberVint(cTValue *o) { if (LJ_LIKELY(tvisint(o))) return intV(o); else return lj_num2int(numV(o)); } static LJ_AINLINE lua_Number numberVnum(cTValue *o) { if (LJ_UNLIKELY(tvisint(o))) return (lua_Number)intV(o); else return numV(o); } /* -- Miscellaneous object handling --------------------------------------- */ /* Names and maps for internal and external object tags. */ LJ_DATA const char *const lj_obj_typename[1+LUA_TCDATA+1]; LJ_DATA const char *const lj_obj_itypename[~LJ_TNUMX+1]; #define lj_typename(o) (lj_obj_itypename[itypemap(o)]) /* Compare two objects without calling metamethods. */ LJ_FUNC int lj_obj_equal(cTValue *o1, cTValue *o2); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_carith.o0000664000000000000000000003057012213333061022506 0ustar rootrootELF>@@ UHHHt HH]UHHt$HuHH9tHHH?HH H]UHHHt HHH]UHHt)HuHH9tHHH?H HH]UHHt@@u HH@tHHt%HHt@tHHHHuH]øHtIHy2HHt5Ht(Hu$HHHUH]@UHAWAVAUATSHhIuGDILgID$H9Gw LmEAD$ E $AAI?t EGD9rHHuK%tA9w' %tA9wHHHtÃJu EILx)tMILx%= t t u%tA9wHHHt_t ILxMMILx LItA;GrHH‹u2I%tA;GrHHIUHxIE=w6IAwHIEMeu:IAwHIEIEwYID$IT$}HEƒxt?@I7tAO9rHHHk %t9w*@ %t9wHHHt A$AHMHLHtX uLItA;WrHHHxHHHA'+EH\ IEIEEII} H]u K LeA4$ A|$~ t A tA tAEA IE9owDHHUHHxALEHMHHL}ALEHMLHxL}t-}tY}IVHEH9EB'IVA uHMH9M HEH9EBIVA uHMH9MHEH9EЃBI?AwA9rHUHuI%t9w& %t9wHHHtăwzt+IH@ E;orfDhIFX@{ uSAF@(tE $HEHEHCHEH+EHCHEHEHCA uHuH}HCHuH}HC~A uHuH}HCeHuH}HCRA uHuH}HC9HuH}HC&HEHHCAFP$9P L0} AŃ}tEuUHUȋ t0HMHMtIVI9B HLFEt=3LP*IvL+eHcLLH?H*F}uIVL;eB}t{IVL9eЃBbE HUȋLEI7A wHưAHMLEH]} 7/LmAEt%=0 HEHEI7A wHưAMHMHLLeL3LHHEI3 LI?tAw9rHHuHt9w' t9wHHtƃwxt+I@ A;_rfXL`IVBBx uAVHB(tJ$9J rLIFAVH@HH HJ9uRAF@(@ItA9rHuG%t9w) %t9wHt%DULHHIFHPI9Vx @@I?tAO9rHuE%t9r' %t9wHt%DULHH AE}uIF@zHDHt9IV|u.DDI+HHLHHDݠ>IFDt =vt DẢHHDݠHHoDD1u"McJLMcJT堾 LHMHU }tf }t} /. LLyrkLxIEIEZLe<%IFxIFxLeHh[A\A]A^A_]lj_ctype.hid > 0 && id < cts->toplj_cdata.hsz == 8lj_carith.c(((o2)->it) == (~10u))lj_obj.h0mm == MM_le!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))copyTVcarith_checkargctype_checkctype_childcdata_getptrlj_cdata_newsetgcVcarith_int64carith_ptrGCC: (Debian 4.7.3-4) 4.7.3zRx  AC [ <EAC @ \#AC ^ |AAC | PAC K (YBC G F A (TAC MB .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @ 0&,12p@2x TO(0\01eNzPu0 ` 4 P &h ?\ X@qu   8     Ee#!A2PCYTrTam{#lj_carith.c__PRETTY_FUNCTION__.4069__PRETTY_FUNCTION__.4216__PRETTY_FUNCTION__.4078__PRETTY_FUNCTION__.4303__PRETTY_FUNCTION__.4230__PRETTY_FUNCTION__.3380__PRETTY_FUNCTION__.4355__PRETTY_FUNCTION__.4328__PRETTY_FUNCTION__.3429lj_carith_divu64lj_carith_divi64lj_carith_modu64lj_carith_modi64lj_carith_powu64lj_carith_powi64lj_carith_oplj_err_argt__assert_faillj_ctype_internlj_ctype_getfieldqlj_cconv_ct_ctlj_mem_newgcolj_gc_steplj_cconv_compatptrlj_ctype_sizelj_ctype_metalj_ctype_reprlj_obj_itypenamelj_err_callervlj_meta_tailcall_ P   9 PC H  M h # . \   P    Xj Pt y  ~ P    P   * P4 9  >{ @ 6 B P    P    Ho Py ~  j Pt y  ~ P    P    u  # x% 7 PA F  K  Y   ! 4 M ` x 6 b  !6 "N # 6 d  P    1  P     #  P !  & Z Pd i  n  u # x   P     Y # 3 ! 8 Y   P    P    ;$ P    P   $s% &'0'8(  (> 0j @ `ertarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_asm.c0000664000000000000000000016000712202141143021773 0ustar rootroot/* ** IR assembler (SSA IR -> machine code). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_asm_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_gc.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_frame.h" #if LJ_HASFFI #include "lj_ctype.h" #endif #include "lj_ir.h" #include "lj_jit.h" #include "lj_ircall.h" #include "lj_iropt.h" #include "lj_mcode.h" #include "lj_iropt.h" #include "lj_trace.h" #include "lj_snap.h" #include "lj_asm.h" #include "lj_dispatch.h" #include "lj_vm.h" #include "lj_target.h" #ifdef LUA_USE_ASSERT #include #endif /* -- Assembler state and common macros ----------------------------------- */ /* Assembler state. */ typedef struct ASMState { RegCost cost[RID_MAX]; /* Reference and blended allocation cost for regs. */ MCode *mcp; /* Current MCode pointer (grows down). */ MCode *mclim; /* Lower limit for MCode memory + red zone. */ #ifdef LUA_USE_ASSERT MCode *mcp_prev; /* Red zone overflow check. */ #endif IRIns *ir; /* Copy of pointer to IR instructions/constants. */ jit_State *J; /* JIT compiler state. */ #if LJ_TARGET_X86ORX64 x86ModRM mrm; /* Fused x86 address operand. */ #endif RegSet freeset; /* Set of free registers. */ RegSet modset; /* Set of registers modified inside the loop. */ RegSet weakset; /* Set of weakly referenced registers. */ RegSet phiset; /* Set of PHI registers. */ uint32_t flags; /* Copy of JIT compiler flags. */ int loopinv; /* Loop branch inversion (0:no, 1:yes, 2:yes+CC_P). */ int32_t evenspill; /* Next even spill slot. */ int32_t oddspill; /* Next odd spill slot (or 0). */ IRRef curins; /* Reference of current instruction. */ IRRef stopins; /* Stop assembly before hitting this instruction. */ IRRef orignins; /* Original T->nins. */ IRRef snapref; /* Current snapshot is active after this reference. */ IRRef snaprename; /* Rename highwater mark for snapshot check. */ SnapNo snapno; /* Current snapshot number. */ SnapNo loopsnapno; /* Loop snapshot number. */ IRRef fuseref; /* Fusion limit (loopref, 0 or FUSE_DISABLED). */ IRRef sectref; /* Section base reference (loopref or 0). */ IRRef loopref; /* Reference of LOOP instruction (or 0). */ BCReg topslot; /* Number of slots for stack check (unless 0). */ int32_t gcsteps; /* Accumulated number of GC steps (per section). */ GCtrace *T; /* Trace to assemble. */ GCtrace *parent; /* Parent trace (or NULL). */ MCode *mcbot; /* Bottom of reserved MCode. */ MCode *mctop; /* Top of generated MCode. */ MCode *mcloop; /* Pointer to loop MCode (or NULL). */ MCode *invmcp; /* Points to invertible loop branch (or NULL). */ MCode *flagmcp; /* Pending opportunity to merge flag setting ins. */ MCode *realign; /* Realign loop if not NULL. */ #ifdef RID_NUM_KREF int32_t krefk[RID_NUM_KREF]; #endif IRRef1 phireg[RID_MAX]; /* PHI register references. */ uint16_t parentmap[LJ_MAX_JSLOTS]; /* Parent instruction to RegSP map. */ } ASMState; #define IR(ref) (&as->ir[(ref)]) #define ASMREF_TMP1 REF_TRUE /* Temp. register. */ #define ASMREF_TMP2 REF_FALSE /* Temp. register. */ #define ASMREF_L REF_NIL /* Stores register for L. */ /* Check for variant to invariant references. */ #define iscrossref(as, ref) ((ref) < as->sectref) /* Inhibit memory op fusion from variant to invariant references. */ #define FUSE_DISABLED (~(IRRef)0) #define mayfuse(as, ref) ((ref) > as->fuseref) #define neverfuse(as) (as->fuseref == FUSE_DISABLED) #define canfuse(as, ir) (!neverfuse(as) && !irt_isphi((ir)->t)) #define opisfusableload(o) \ ((o) == IR_ALOAD || (o) == IR_HLOAD || (o) == IR_ULOAD || \ (o) == IR_FLOAD || (o) == IR_XLOAD || (o) == IR_SLOAD || (o) == IR_VLOAD) /* Sparse limit checks using a red zone before the actual limit. */ #define MCLIM_REDZONE 64 static LJ_NORET LJ_NOINLINE void asm_mclimit(ASMState *as) { lj_mcode_limiterr(as->J, (size_t)(as->mctop - as->mcp + 4*MCLIM_REDZONE)); } static LJ_AINLINE void checkmclim(ASMState *as) { #ifdef LUA_USE_ASSERT if (as->mcp + MCLIM_REDZONE < as->mcp_prev) { IRIns *ir = IR(as->curins+1); fprintf(stderr, "RED ZONE OVERFLOW: %p IR %04d %02d %04d %04d\n", as->mcp, as->curins+1-REF_BIAS, ir->o, ir->op1-REF_BIAS, ir->op2-REF_BIAS); lua_assert(0); } #endif if (LJ_UNLIKELY(as->mcp < as->mclim)) asm_mclimit(as); #ifdef LUA_USE_ASSERT as->mcp_prev = as->mcp; #endif } #ifdef RID_NUM_KREF #define ra_iskref(ref) ((ref) < RID_NUM_KREF) #define ra_krefreg(ref) ((Reg)(RID_MIN_KREF + (Reg)(ref))) #define ra_krefk(as, ref) (as->krefk[(ref)]) static LJ_AINLINE void ra_setkref(ASMState *as, Reg r, int32_t k) { IRRef ref = (IRRef)(r - RID_MIN_KREF); as->krefk[ref] = k; as->cost[r] = REGCOST(ref, ref); } #else #define ra_iskref(ref) 0 #define ra_krefreg(ref) RID_MIN_GPR #define ra_krefk(as, ref) 0 #endif /* Arch-specific field offsets. */ static const uint8_t field_ofs[IRFL__MAX+1] = { #define FLOFS(name, ofs) (uint8_t)(ofs), IRFLDEF(FLOFS) #undef FLOFS 0 }; /* -- Target-specific instruction emitter --------------------------------- */ #if LJ_TARGET_X86ORX64 #include "lj_emit_x86.h" #elif LJ_TARGET_ARM #include "lj_emit_arm.h" #elif LJ_TARGET_PPC #include "lj_emit_ppc.h" #elif LJ_TARGET_MIPS #include "lj_emit_mips.h" #else #error "Missing instruction emitter for target CPU" #endif /* -- Register allocator debugging ---------------------------------------- */ /* #define LUAJIT_DEBUG_RA */ #ifdef LUAJIT_DEBUG_RA #include #include #define RIDNAME(name) #name, static const char *const ra_regname[] = { GPRDEF(RIDNAME) FPRDEF(RIDNAME) VRIDDEF(RIDNAME) NULL }; #undef RIDNAME static char ra_dbg_buf[65536]; static char *ra_dbg_p; static char *ra_dbg_merge; static MCode *ra_dbg_mcp; static void ra_dstart(void) { ra_dbg_p = ra_dbg_buf; ra_dbg_merge = NULL; ra_dbg_mcp = NULL; } static void ra_dflush(void) { fwrite(ra_dbg_buf, 1, (size_t)(ra_dbg_p-ra_dbg_buf), stdout); ra_dstart(); } static void ra_dprintf(ASMState *as, const char *fmt, ...) { char *p; va_list argp; va_start(argp, fmt); p = ra_dbg_mcp == as->mcp ? ra_dbg_merge : ra_dbg_p; ra_dbg_mcp = NULL; p += sprintf(p, "%08x \e[36m%04d ", (uintptr_t)as->mcp, as->curins-REF_BIAS); for (;;) { const char *e = strchr(fmt, '$'); if (e == NULL) break; memcpy(p, fmt, (size_t)(e-fmt)); p += e-fmt; if (e[1] == 'r') { Reg r = va_arg(argp, Reg) & RID_MASK; if (r <= RID_MAX) { const char *q; for (q = ra_regname[r]; *q; q++) *p++ = *q >= 'A' && *q <= 'Z' ? *q + 0x20 : *q; } else { *p++ = '?'; lua_assert(0); } } else if (e[1] == 'f' || e[1] == 'i') { IRRef ref; if (e[1] == 'f') ref = va_arg(argp, IRRef); else ref = va_arg(argp, IRIns *) - as->ir; if (ref >= REF_BIAS) p += sprintf(p, "%04d", ref - REF_BIAS); else p += sprintf(p, "K%03d", REF_BIAS - ref); } else if (e[1] == 's') { uint32_t slot = va_arg(argp, uint32_t); p += sprintf(p, "[sp+0x%x]", sps_scale(slot)); } else if (e[1] == 'x') { p += sprintf(p, "%08x", va_arg(argp, int32_t)); } else { lua_assert(0); } fmt = e+2; } va_end(argp); while (*fmt) *p++ = *fmt++; *p++ = '\e'; *p++ = '['; *p++ = 'm'; *p++ = '\n'; if (p > ra_dbg_buf+sizeof(ra_dbg_buf)-256) { fwrite(ra_dbg_buf, 1, (size_t)(p-ra_dbg_buf), stdout); p = ra_dbg_buf; } ra_dbg_p = p; } #define RA_DBG_START() ra_dstart() #define RA_DBG_FLUSH() ra_dflush() #define RA_DBG_REF() \ do { char *_p = ra_dbg_p; ra_dprintf(as, ""); \ ra_dbg_merge = _p; ra_dbg_mcp = as->mcp; } while (0) #define RA_DBGX(x) ra_dprintf x #else #define RA_DBG_START() ((void)0) #define RA_DBG_FLUSH() ((void)0) #define RA_DBG_REF() ((void)0) #define RA_DBGX(x) ((void)0) #endif /* -- Register allocator -------------------------------------------------- */ #define ra_free(as, r) rset_set(as->freeset, (r)) #define ra_modified(as, r) rset_set(as->modset, (r)) #define ra_weak(as, r) rset_set(as->weakset, (r)) #define ra_noweak(as, r) rset_clear(as->weakset, (r)) #define ra_used(ir) (ra_hasreg((ir)->r) || ra_hasspill((ir)->s)) /* Setup register allocator. */ static void ra_setup(ASMState *as) { Reg r; /* Initially all regs (except the stack pointer) are free for use. */ as->freeset = RSET_INIT; as->modset = RSET_EMPTY; as->weakset = RSET_EMPTY; as->phiset = RSET_EMPTY; memset(as->phireg, 0, sizeof(as->phireg)); for (r = RID_MIN_GPR; r < RID_MAX; r++) as->cost[r] = REGCOST(~0u, 0u); } /* Rematerialize constants. */ static Reg ra_rematk(ASMState *as, IRRef ref) { IRIns *ir; Reg r; if (ra_iskref(ref)) { r = ra_krefreg(ref); lua_assert(!rset_test(as->freeset, r)); ra_free(as, r); ra_modified(as, r); emit_loadi(as, r, ra_krefk(as, ref)); return r; } ir = IR(ref); r = ir->r; lua_assert(ra_hasreg(r) && !ra_hasspill(ir->s)); ra_free(as, r); ra_modified(as, r); ir->r = RID_INIT; /* Do not keep any hint. */ RA_DBGX((as, "remat $i $r", ir, r)); #if !LJ_SOFTFP if (ir->o == IR_KNUM) { emit_loadn(as, r, ir_knum(ir)); } else #endif if (emit_canremat(REF_BASE) && ir->o == IR_BASE) { ra_sethint(ir->r, RID_BASE); /* Restore BASE register hint. */ emit_getgl(as, r, jit_base); } else if (emit_canremat(ASMREF_L) && ir->o == IR_KPRI) { lua_assert(irt_isnil(ir->t)); /* REF_NIL stores ASMREF_L register. */ emit_getgl(as, r, jit_L); #if LJ_64 } else if (ir->o == IR_KINT64) { emit_loadu64(as, r, ir_kint64(ir)->u64); #endif } else { lua_assert(ir->o == IR_KINT || ir->o == IR_KGC || ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL); emit_loadi(as, r, ir->i); } return r; } /* Force a spill. Allocate a new spill slot if needed. */ static int32_t ra_spill(ASMState *as, IRIns *ir) { int32_t slot = ir->s; if (!ra_hasspill(slot)) { if (irt_is64(ir->t)) { slot = as->evenspill; as->evenspill += 2; } else if (as->oddspill) { slot = as->oddspill; as->oddspill = 0; } else { slot = as->evenspill; as->oddspill = slot+1; as->evenspill += 2; } if (as->evenspill > 256) lj_trace_err(as->J, LJ_TRERR_SPILLOV); ir->s = (uint8_t)slot; } return sps_scale(slot); } /* Release the temporarily allocated register in ASMREF_TMP1/ASMREF_TMP2. */ static Reg ra_releasetmp(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); Reg r = ir->r; lua_assert(ra_hasreg(r) && !ra_hasspill(ir->s)); ra_free(as, r); ra_modified(as, r); ir->r = RID_INIT; return r; } /* Restore a register (marked as free). Rematerialize or force a spill. */ static Reg ra_restore(ASMState *as, IRRef ref) { if (emit_canremat(ref)) { return ra_rematk(as, ref); } else { IRIns *ir = IR(ref); int32_t ofs = ra_spill(as, ir); /* Force a spill slot. */ Reg r = ir->r; lua_assert(ra_hasreg(r)); ra_sethint(ir->r, r); /* Keep hint. */ ra_free(as, r); if (!rset_test(as->weakset, r)) { /* Only restore non-weak references. */ ra_modified(as, r); RA_DBGX((as, "restore $i $r", ir, r)); emit_spload(as, ir, r, ofs); } return r; } } /* Save a register to a spill slot. */ static void ra_save(ASMState *as, IRIns *ir, Reg r) { RA_DBGX((as, "save $i $r", ir, r)); emit_spstore(as, ir, r, sps_scale(ir->s)); } #define MINCOST(name) \ if (rset_test(RSET_ALL, RID_##name) && \ LJ_LIKELY(allow&RID2RSET(RID_##name)) && as->cost[RID_##name] < cost) \ cost = as->cost[RID_##name]; /* Evict the register with the lowest cost, forcing a restore. */ static Reg ra_evict(ASMState *as, RegSet allow) { IRRef ref; RegCost cost = ~(RegCost)0; lua_assert(allow != RSET_EMPTY); if (RID_NUM_FPR == 0 || allow < RID2RSET(RID_MAX_GPR)) { GPRDEF(MINCOST) } else { FPRDEF(MINCOST) } ref = regcost_ref(cost); lua_assert(ra_iskref(ref) || (ref >= as->T->nk && ref < as->T->nins)); /* Preferably pick any weak ref instead of a non-weak, non-const ref. */ if (!irref_isk(ref) && (as->weakset & allow)) { IRIns *ir = IR(ref); if (!rset_test(as->weakset, ir->r)) ref = regcost_ref(as->cost[rset_pickbot((as->weakset & allow))]); } return ra_restore(as, ref); } /* Pick any register (marked as free). Evict on-demand. */ static Reg ra_pick(ASMState *as, RegSet allow) { RegSet pick = as->freeset & allow; if (!pick) return ra_evict(as, allow); else return rset_picktop(pick); } /* Get a scratch register (marked as free). */ static Reg ra_scratch(ASMState *as, RegSet allow) { Reg r = ra_pick(as, allow); ra_modified(as, r); RA_DBGX((as, "scratch $r", r)); return r; } /* Evict all registers from a set (if not free). */ static void ra_evictset(ASMState *as, RegSet drop) { RegSet work; as->modset |= drop; #if !LJ_SOFTFP work = (drop & ~as->freeset) & RSET_FPR; while (work) { Reg r = rset_pickbot(work); ra_restore(as, regcost_ref(as->cost[r])); rset_clear(work, r); checkmclim(as); } #endif work = (drop & ~as->freeset); while (work) { Reg r = rset_pickbot(work); ra_restore(as, regcost_ref(as->cost[r])); rset_clear(work, r); checkmclim(as); } } /* Evict (rematerialize) all registers allocated to constants. */ static void ra_evictk(ASMState *as) { RegSet work; #if !LJ_SOFTFP work = ~as->freeset & RSET_FPR; while (work) { Reg r = rset_pickbot(work); IRRef ref = regcost_ref(as->cost[r]); if (emit_canremat(ref) && irref_isk(ref)) { ra_rematk(as, ref); checkmclim(as); } rset_clear(work, r); } #endif work = ~as->freeset & RSET_GPR; while (work) { Reg r = rset_pickbot(work); IRRef ref = regcost_ref(as->cost[r]); if (emit_canremat(ref) && irref_isk(ref)) { ra_rematk(as, ref); checkmclim(as); } rset_clear(work, r); } } #ifdef RID_NUM_KREF /* Allocate a register for a constant. */ static Reg ra_allock(ASMState *as, int32_t k, RegSet allow) { /* First try to find a register which already holds the same constant. */ RegSet pick, work = ~as->freeset & RSET_GPR; Reg r; while (work) { IRRef ref; r = rset_pickbot(work); ref = regcost_ref(as->cost[r]); if (ref < ASMREF_L && k == (ra_iskref(ref) ? ra_krefk(as, ref) : IR(ref)->i)) return r; rset_clear(work, r); } pick = as->freeset & allow; if (pick) { /* Constants should preferably get unmodified registers. */ if ((pick & ~as->modset)) pick &= ~as->modset; r = rset_pickbot(pick); /* Reduce conflicts with inverse allocation. */ } else { r = ra_evict(as, allow); } RA_DBGX((as, "allock $x $r", k, r)); ra_setkref(as, r, k); rset_clear(as->freeset, r); ra_noweak(as, r); return r; } /* Allocate a specific register for a constant. */ static void ra_allockreg(ASMState *as, int32_t k, Reg r) { Reg kr = ra_allock(as, k, RID2RSET(r)); if (kr != r) { IRIns irdummy; irdummy.t.irt = IRT_INT; ra_scratch(as, RID2RSET(r)); emit_movrr(as, &irdummy, r, kr); } } #else #define ra_allockreg(as, k, r) emit_loadi(as, (r), (k)) #endif /* Allocate a register for ref from the allowed set of registers. ** Note: this function assumes the ref does NOT have a register yet! ** Picks an optimal register, sets the cost and marks the register as non-free. */ static Reg ra_allocref(ASMState *as, IRRef ref, RegSet allow) { IRIns *ir = IR(ref); RegSet pick = as->freeset & allow; Reg r; lua_assert(ra_noreg(ir->r)); if (pick) { /* First check register hint from propagation or PHI. */ if (ra_hashint(ir->r)) { r = ra_gethint(ir->r); if (rset_test(pick, r)) /* Use hint register if possible. */ goto found; /* Rematerialization is cheaper than missing a hint. */ if (rset_test(allow, r) && emit_canremat(regcost_ref(as->cost[r]))) { ra_rematk(as, regcost_ref(as->cost[r])); goto found; } RA_DBGX((as, "hintmiss $f $r", ref, r)); } /* Invariants should preferably get unmodified registers. */ if (ref < as->loopref && !irt_isphi(ir->t)) { if ((pick & ~as->modset)) pick &= ~as->modset; r = rset_pickbot(pick); /* Reduce conflicts with inverse allocation. */ } else { /* We've got plenty of regs, so get callee-save regs if possible. */ if (RID_NUM_GPR > 8 && (pick & ~RSET_SCRATCH)) pick &= ~RSET_SCRATCH; r = rset_picktop(pick); } } else { r = ra_evict(as, allow); } found: RA_DBGX((as, "alloc $f $r", ref, r)); ir->r = (uint8_t)r; rset_clear(as->freeset, r); ra_noweak(as, r); as->cost[r] = REGCOST_REF_T(ref, irt_t(ir->t)); return r; } /* Allocate a register on-demand. */ static Reg ra_alloc1(ASMState *as, IRRef ref, RegSet allow) { Reg r = IR(ref)->r; /* Note: allow is ignored if the register is already allocated. */ if (ra_noreg(r)) r = ra_allocref(as, ref, allow); ra_noweak(as, r); return r; } /* Rename register allocation and emit move. */ static void ra_rename(ASMState *as, Reg down, Reg up) { IRRef ren, ref = regcost_ref(as->cost[up] = as->cost[down]); IRIns *ir = IR(ref); ir->r = (uint8_t)up; as->cost[down] = 0; lua_assert((down < RID_MAX_GPR) == (up < RID_MAX_GPR)); lua_assert(!rset_test(as->freeset, down) && rset_test(as->freeset, up)); ra_free(as, down); /* 'down' is free ... */ ra_modified(as, down); rset_clear(as->freeset, up); /* ... and 'up' is now allocated. */ ra_noweak(as, up); RA_DBGX((as, "rename $f $r $r", regcost_ref(as->cost[up]), down, up)); emit_movrr(as, ir, down, up); /* Backwards codegen needs inverse move. */ if (!ra_hasspill(IR(ref)->s)) { /* Add the rename to the IR. */ lj_ir_set(as->J, IRT(IR_RENAME, IRT_NIL), ref, as->snapno); ren = tref_ref(lj_ir_emit(as->J)); as->ir = as->T->ir; /* The IR may have been reallocated. */ IR(ren)->r = (uint8_t)down; IR(ren)->s = SPS_NONE; } } /* Pick a destination register (marked as free). ** Caveat: allow is ignored if there's already a destination register. ** Use ra_destreg() to get a specific register. */ static Reg ra_dest(ASMState *as, IRIns *ir, RegSet allow) { Reg dest = ir->r; if (ra_hasreg(dest)) { ra_free(as, dest); ra_modified(as, dest); } else { if (ra_hashint(dest) && rset_test((as->freeset&allow), ra_gethint(dest))) { dest = ra_gethint(dest); ra_modified(as, dest); RA_DBGX((as, "dest $r", dest)); } else { dest = ra_scratch(as, allow); } ir->r = dest; } if (LJ_UNLIKELY(ra_hasspill(ir->s))) ra_save(as, ir, dest); return dest; } /* Force a specific destination register (marked as free). */ static void ra_destreg(ASMState *as, IRIns *ir, Reg r) { Reg dest = ra_dest(as, ir, RID2RSET(r)); if (dest != r) { lua_assert(rset_test(as->freeset, r)); ra_modified(as, r); emit_movrr(as, ir, dest, r); } } #if LJ_TARGET_X86ORX64 /* Propagate dest register to left reference. Emit moves as needed. ** This is a required fixup step for all 2-operand machine instructions. */ static void ra_left(ASMState *as, Reg dest, IRRef lref) { IRIns *ir = IR(lref); Reg left = ir->r; if (ra_noreg(left)) { if (irref_isk(lref)) { if (ir->o == IR_KNUM) { cTValue *tv = ir_knum(ir); /* FP remat needs a load except for +0. Still better than eviction. */ if (tvispzero(tv) || !(as->freeset & RSET_FPR)) { emit_loadn(as, dest, tv); return; } #if LJ_64 } else if (ir->o == IR_KINT64) { emit_loadu64(as, dest, ir_kint64(ir)->u64); return; #endif } else { lua_assert(ir->o == IR_KINT || ir->o == IR_KGC || ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL); emit_loadi(as, dest, ir->i); return; } } if (!ra_hashint(left) && !iscrossref(as, lref)) ra_sethint(ir->r, dest); /* Propagate register hint. */ left = ra_allocref(as, lref, dest < RID_MAX_GPR ? RSET_GPR : RSET_FPR); } ra_noweak(as, left); /* Move needed for true 3-operand instruction: y=a+b ==> y=a; y+=b. */ if (dest != left) { /* Use register renaming if dest is the PHI reg. */ if (irt_isphi(ir->t) && as->phireg[dest] == lref) { ra_modified(as, left); ra_rename(as, left, dest); } else { emit_movrr(as, ir, dest, left); } } } #else /* Similar to ra_left, except we override any hints. */ static void ra_leftov(ASMState *as, Reg dest, IRRef lref) { IRIns *ir = IR(lref); Reg left = ir->r; if (ra_noreg(left)) { ra_sethint(ir->r, dest); /* Propagate register hint. */ left = ra_allocref(as, lref, (LJ_SOFTFP || dest < RID_MAX_GPR) ? RSET_GPR : RSET_FPR); } ra_noweak(as, left); if (dest != left) { /* Use register renaming if dest is the PHI reg. */ if (irt_isphi(ir->t) && as->phireg[dest] == lref) { ra_modified(as, left); ra_rename(as, left, dest); } else { emit_movrr(as, ir, dest, left); } } } #endif #if !LJ_64 /* Force a RID_RETLO/RID_RETHI destination register pair (marked as free). */ static void ra_destpair(ASMState *as, IRIns *ir) { Reg destlo = ir->r, desthi = (ir+1)->r; /* First spill unrelated refs blocking the destination registers. */ if (!rset_test(as->freeset, RID_RETLO) && destlo != RID_RETLO && desthi != RID_RETLO) ra_restore(as, regcost_ref(as->cost[RID_RETLO])); if (!rset_test(as->freeset, RID_RETHI) && destlo != RID_RETHI && desthi != RID_RETHI) ra_restore(as, regcost_ref(as->cost[RID_RETHI])); /* Next free the destination registers (if any). */ if (ra_hasreg(destlo)) { ra_free(as, destlo); ra_modified(as, destlo); } else { destlo = RID_RETLO; } if (ra_hasreg(desthi)) { ra_free(as, desthi); ra_modified(as, desthi); } else { desthi = RID_RETHI; } /* Check for conflicts and shuffle the registers as needed. */ if (destlo == RID_RETHI) { if (desthi == RID_RETLO) { #if LJ_TARGET_X86 *--as->mcp = XI_XCHGa + RID_RETHI; #else emit_movrr(as, ir, RID_RETHI, RID_TMP); emit_movrr(as, ir, RID_RETLO, RID_RETHI); emit_movrr(as, ir, RID_TMP, RID_RETLO); #endif } else { emit_movrr(as, ir, RID_RETHI, RID_RETLO); if (desthi != RID_RETHI) emit_movrr(as, ir, desthi, RID_RETHI); } } else if (desthi == RID_RETLO) { emit_movrr(as, ir, RID_RETLO, RID_RETHI); if (destlo != RID_RETLO) emit_movrr(as, ir, destlo, RID_RETLO); } else { if (desthi != RID_RETHI) emit_movrr(as, ir, desthi, RID_RETHI); if (destlo != RID_RETLO) emit_movrr(as, ir, destlo, RID_RETLO); } /* Restore spill slots (if any). */ if (ra_hasspill((ir+1)->s)) ra_save(as, ir+1, RID_RETHI); if (ra_hasspill(ir->s)) ra_save(as, ir, RID_RETLO); } #endif /* -- Snapshot handling --------- ----------------------------------------- */ /* Can we rematerialize a KNUM instead of forcing a spill? */ static int asm_snap_canremat(ASMState *as) { Reg r; for (r = RID_MIN_FPR; r < RID_MAX_FPR; r++) if (irref_isk(regcost_ref(as->cost[r]))) return 1; return 0; } /* Check whether a sunk store corresponds to an allocation. */ static int asm_sunk_store(ASMState *as, IRIns *ira, IRIns *irs) { if (irs->s == 255) { if (irs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTORE || irs->o == IR_XSTORE) { IRIns *irk = IR(irs->op1); if (irk->o == IR_AREF || irk->o == IR_HREFK) irk = IR(irk->op1); return (IR(irk->op1) == ira); } return 0; } else { return (ira + irs->s == irs); /* Quick check. */ } } /* Allocate register or spill slot for a ref that escapes to a snapshot. */ static void asm_snap_alloc1(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); if (!irref_isk(ref) && (!(ra_used(ir) || ir->r == RID_SUNK))) { if (ir->r == RID_SINK) { ir->r = RID_SUNK; #if LJ_HASFFI if (ir->o == IR_CNEWI) { /* Allocate CNEWI value. */ asm_snap_alloc1(as, ir->op2); if (LJ_32 && (ir+1)->o == IR_HIOP) asm_snap_alloc1(as, (ir+1)->op2); } else #endif { /* Allocate stored values for TNEW, TDUP and CNEW. */ IRIns *irs; lua_assert(ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW); for (irs = IR(as->snapref-1); irs > ir; irs--) if (irs->r == RID_SINK && asm_sunk_store(as, ir, irs)) { lua_assert(irs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTORE || irs->o == IR_XSTORE); asm_snap_alloc1(as, irs->op2); if (LJ_32 && (irs+1)->o == IR_HIOP) asm_snap_alloc1(as, (irs+1)->op2); } } } else { RegSet allow; if (ir->o == IR_CONV && ir->op2 == IRCONV_NUM_INT) { IRIns *irc; for (irc = IR(as->curins); irc > ir; irc--) if ((irc->op1 == ref || irc->op2 == ref) && !(irc->r == RID_SINK || irc->r == RID_SUNK)) goto nosink; /* Don't sink conversion if result is used. */ asm_snap_alloc1(as, ir->op1); return; } nosink: allow = (!LJ_SOFTFP && irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR; if ((as->freeset & allow) || (allow == RSET_FPR && asm_snap_canremat(as))) { /* Get a weak register if we have a free one or can rematerialize. */ Reg r = ra_allocref(as, ref, allow); /* Allocate a register. */ if (!irt_isphi(ir->t)) ra_weak(as, r); /* But mark it as weakly referenced. */ checkmclim(as); RA_DBGX((as, "snapreg $f $r", ref, ir->r)); } else { ra_spill(as, ir); /* Otherwise force a spill slot. */ RA_DBGX((as, "snapspill $f $s", ref, ir->s)); } } } } /* Allocate refs escaping to a snapshot. */ static void asm_snap_alloc(ASMState *as) { SnapShot *snap = &as->T->snap[as->snapno]; SnapEntry *map = &as->T->snapmap[snap->mapofs]; MSize n, nent = snap->nent; for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; IRRef ref = snap_ref(sn); if (!irref_isk(ref)) { asm_snap_alloc1(as, ref); if (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM)) { lua_assert(irt_type(IR(ref+1)->t) == IRT_SOFTFP); asm_snap_alloc1(as, ref+1); } } } } /* All guards for a snapshot use the same exitno. This is currently the ** same as the snapshot number. Since the exact origin of the exit cannot ** be determined, all guards for the same snapshot must exit with the same ** RegSP mapping. ** A renamed ref which has been used in a prior guard for the same snapshot ** would cause an inconsistency. The easy way out is to force a spill slot. */ static int asm_snap_checkrename(ASMState *as, IRRef ren) { SnapShot *snap = &as->T->snap[as->snapno]; SnapEntry *map = &as->T->snapmap[snap->mapofs]; MSize n, nent = snap->nent; for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; IRRef ref = snap_ref(sn); if (ref == ren || (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM) && ++ref == ren)) { IRIns *ir = IR(ref); ra_spill(as, ir); /* Register renamed, so force a spill slot. */ RA_DBGX((as, "snaprensp $f $s", ref, ir->s)); return 1; /* Found. */ } } return 0; /* Not found. */ } /* Prepare snapshot for next guard instruction. */ static void asm_snap_prep(ASMState *as) { if (as->curins < as->snapref) { do { if (as->snapno == 0) return; /* Called by sunk stores before snap #0. */ as->snapno--; as->snapref = as->T->snap[as->snapno].ref; } while (as->curins < as->snapref); asm_snap_alloc(as); as->snaprename = as->T->nins; } else { /* Process any renames above the highwater mark. */ for (; as->snaprename < as->T->nins; as->snaprename++) { IRIns *ir = IR(as->snaprename); if (asm_snap_checkrename(as, ir->op1)) ir->op2 = REF_BIAS-1; /* Kill rename. */ } } } /* -- Miscellaneous helpers ----------------------------------------------- */ /* Collect arguments from CALL* and CARG instructions. */ static void asm_collectargs(ASMState *as, IRIns *ir, const CCallInfo *ci, IRRef *args) { uint32_t n = CCI_NARGS(ci); lua_assert(n <= CCI_NARGS_MAX*2); /* Account for split args. */ if ((ci->flags & CCI_L)) { *args++ = ASMREF_L; n--; } while (n-- > 1) { ir = IR(ir->op1); lua_assert(ir->o == IR_CARG); args[n] = ir->op2 == REF_NIL ? 0 : ir->op2; } args[0] = ir->op1 == REF_NIL ? 0 : ir->op1; lua_assert(IR(ir->op1)->o != IR_CARG); } /* Reconstruct CCallInfo flags for CALLX*. */ static uint32_t asm_callx_flags(ASMState *as, IRIns *ir) { uint32_t nargs = 0; if (ir->op1 != REF_NIL) { /* Count number of arguments first. */ IRIns *ira = IR(ir->op1); nargs++; while (ira->o == IR_CARG) { nargs++; ira = IR(ira->op1); } } #if LJ_HASFFI if (IR(ir->op2)->o == IR_CARG) { /* Copy calling convention info. */ CTypeID id = (CTypeID)IR(IR(ir->op2)->op2)->i; CType *ct = ctype_get(ctype_ctsG(J2G(as->J)), id); nargs |= ((ct->info & CTF_VARARG) ? CCI_VARARG : 0); #if LJ_TARGET_X86 nargs |= (ctype_cconv(ct->info) << CCI_CC_SHIFT); #endif } #endif return (nargs | (ir->t.irt << CCI_OTSHIFT)); } /* Calculate stack adjustment. */ static int32_t asm_stack_adjust(ASMState *as) { if (as->evenspill <= SPS_FIXED) return 0; return sps_scale(sps_align(as->evenspill)); } /* Must match with hash*() in lj_tab.c. */ static uint32_t ir_khash(IRIns *ir) { uint32_t lo, hi; if (irt_isstr(ir->t)) { return ir_kstr(ir)->hash; } else if (irt_isnum(ir->t)) { lo = ir_knum(ir)->u32.lo; hi = ir_knum(ir)->u32.hi << 1; } else if (irt_ispri(ir->t)) { lua_assert(!irt_isnil(ir->t)); return irt_type(ir->t)-IRT_FALSE; } else { lua_assert(irt_isgcv(ir->t)); lo = u32ptr(ir_kgc(ir)); hi = lo + HASH_BIAS; } return hashrot(lo, hi); } /* -- Allocations --------------------------------------------------------- */ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args); static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci); static void asm_snew(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_new]; IRRef args[3]; args[0] = ASMREF_L; /* lua_State *L */ args[1] = ir->op1; /* const char *str */ args[2] = ir->op2; /* size_t len */ as->gcsteps++; asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); } static void asm_tnew(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_new1]; IRRef args[2]; args[0] = ASMREF_L; /* lua_State *L */ args[1] = ASMREF_TMP1; /* uint32_t ahsize */ as->gcsteps++; asm_setupresult(as, ir, ci); /* GCtab * */ asm_gencall(as, ci, args); ra_allockreg(as, ir->op1 | (ir->op2 << 24), ra_releasetmp(as, ASMREF_TMP1)); } static void asm_tdup(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_dup]; IRRef args[2]; args[0] = ASMREF_L; /* lua_State *L */ args[1] = ir->op1; /* const GCtab *kt */ as->gcsteps++; asm_setupresult(as, ir, ci); /* GCtab * */ asm_gencall(as, ci, args); } static void asm_gc_check(ASMState *as); /* Explicit GC step. */ static void asm_gcstep(ASMState *as, IRIns *ir) { IRIns *ira; for (ira = IR(as->stopins+1); ira < ir; ira++) if ((ira->o == IR_TNEW || ira->o == IR_TDUP || (LJ_HASFFI && (ira->o == IR_CNEW || ira->o == IR_CNEWI))) && ra_used(ira)) as->gcsteps++; if (as->gcsteps) asm_gc_check(as); as->gcsteps = 0x80000000; /* Prevent implicit GC check further up. */ } /* -- PHI and loop handling ----------------------------------------------- */ /* Break a PHI cycle by renaming to a free register (evict if needed). */ static void asm_phi_break(ASMState *as, RegSet blocked, RegSet blockedby, RegSet allow) { RegSet candidates = blocked & allow; if (candidates) { /* If this register file has candidates. */ /* Note: the set for ra_pick cannot be empty, since each register file ** has some registers never allocated to PHIs. */ Reg down, up = ra_pick(as, ~blocked & allow); /* Get a free register. */ if (candidates & ~blockedby) /* Optimize shifts, else it's a cycle. */ candidates = candidates & ~blockedby; down = rset_picktop(candidates); /* Pick candidate PHI register. */ ra_rename(as, down, up); /* And rename it to the free register. */ } } /* PHI register shuffling. ** ** The allocator tries hard to preserve PHI register assignments across ** the loop body. Most of the time this loop does nothing, since there ** are no register mismatches. ** ** If a register mismatch is detected and ... ** - the register is currently free: rename it. ** - the register is blocked by an invariant: restore/remat and rename it. ** - Otherwise the register is used by another PHI, so mark it as blocked. ** ** The renames are order-sensitive, so just retry the loop if a register ** is marked as blocked, but has been freed in the meantime. A cycle is ** detected if all of the blocked registers are allocated. To break the ** cycle rename one of them to a free register and retry. ** ** Note that PHI spill slots are kept in sync and don't need to be shuffled. */ static void asm_phi_shuffle(ASMState *as) { RegSet work; /* Find and resolve PHI register mismatches. */ for (;;) { RegSet blocked = RSET_EMPTY; RegSet blockedby = RSET_EMPTY; RegSet phiset = as->phiset; while (phiset) { /* Check all left PHI operand registers. */ Reg r = rset_pickbot(phiset); IRIns *irl = IR(as->phireg[r]); Reg left = irl->r; if (r != left) { /* Mismatch? */ if (!rset_test(as->freeset, r)) { /* PHI register blocked? */ IRRef ref = regcost_ref(as->cost[r]); /* Blocked by other PHI (w/reg)? */ if (!ra_iskref(ref) && irt_ismarked(IR(ref)->t)) { rset_set(blocked, r); if (ra_hasreg(left)) rset_set(blockedby, left); left = RID_NONE; } else { /* Otherwise grab register from invariant. */ ra_restore(as, ref); checkmclim(as); } } if (ra_hasreg(left)) { ra_rename(as, left, r); checkmclim(as); } } rset_clear(phiset, r); } if (!blocked) break; /* Finished. */ if (!(as->freeset & blocked)) { /* Break cycles if none are free. */ asm_phi_break(as, blocked, blockedby, RSET_GPR); if (!LJ_SOFTFP) asm_phi_break(as, blocked, blockedby, RSET_FPR); checkmclim(as); } /* Else retry some more renames. */ } /* Restore/remat invariants whose registers are modified inside the loop. */ #if !LJ_SOFTFP work = as->modset & ~(as->freeset | as->phiset) & RSET_FPR; while (work) { Reg r = rset_pickbot(work); ra_restore(as, regcost_ref(as->cost[r])); rset_clear(work, r); checkmclim(as); } #endif work = as->modset & ~(as->freeset | as->phiset); while (work) { Reg r = rset_pickbot(work); ra_restore(as, regcost_ref(as->cost[r])); rset_clear(work, r); checkmclim(as); } /* Allocate and save all unsaved PHI regs and clear marks. */ work = as->phiset; while (work) { Reg r = rset_picktop(work); IRRef lref = as->phireg[r]; IRIns *ir = IR(lref); if (ra_hasspill(ir->s)) { /* Left PHI gained a spill slot? */ irt_clearmark(ir->t); /* Handled here, so clear marker now. */ ra_alloc1(as, lref, RID2RSET(r)); ra_save(as, ir, r); /* Save to spill slot inside the loop. */ checkmclim(as); } rset_clear(work, r); } } /* Copy unsynced left/right PHI spill slots. Rarely needed. */ static void asm_phi_copyspill(ASMState *as) { int need = 0; IRIns *ir; for (ir = IR(as->orignins-1); ir->o == IR_PHI; ir--) if (ra_hasspill(ir->s) && ra_hasspill(IR(ir->op1)->s)) need |= irt_isfp(ir->t) ? 2 : 1; /* Unsynced spill slot? */ if ((need & 1)) { /* Copy integer spill slots. */ #if !LJ_TARGET_X86ORX64 Reg r = RID_TMP; #else Reg r = RID_RET; if ((as->freeset & RSET_GPR)) r = rset_pickbot((as->freeset & RSET_GPR)); else emit_spload(as, IR(regcost_ref(as->cost[r])), r, SPOFS_TMP); #endif for (ir = IR(as->orignins-1); ir->o == IR_PHI; ir--) { if (ra_hasspill(ir->s)) { IRIns *irl = IR(ir->op1); if (ra_hasspill(irl->s) && !irt_isfp(ir->t)) { emit_spstore(as, irl, r, sps_scale(irl->s)); emit_spload(as, ir, r, sps_scale(ir->s)); checkmclim(as); } } } #if LJ_TARGET_X86ORX64 if (!rset_test(as->freeset, r)) emit_spstore(as, IR(regcost_ref(as->cost[r])), r, SPOFS_TMP); #endif } #if !LJ_SOFTFP if ((need & 2)) { /* Copy FP spill slots. */ #if LJ_TARGET_X86 Reg r = RID_XMM0; #else Reg r = RID_FPRET; #endif if ((as->freeset & RSET_FPR)) r = rset_pickbot((as->freeset & RSET_FPR)); if (!rset_test(as->freeset, r)) emit_spload(as, IR(regcost_ref(as->cost[r])), r, SPOFS_TMP); for (ir = IR(as->orignins-1); ir->o == IR_PHI; ir--) { if (ra_hasspill(ir->s)) { IRIns *irl = IR(ir->op1); if (ra_hasspill(irl->s) && irt_isfp(ir->t)) { emit_spstore(as, irl, r, sps_scale(irl->s)); emit_spload(as, ir, r, sps_scale(ir->s)); checkmclim(as); } } } if (!rset_test(as->freeset, r)) emit_spstore(as, IR(regcost_ref(as->cost[r])), r, SPOFS_TMP); } #endif } /* Emit renames for left PHIs which are only spilled outside the loop. */ static void asm_phi_fixup(ASMState *as) { RegSet work = as->phiset; while (work) { Reg r = rset_picktop(work); IRRef lref = as->phireg[r]; IRIns *ir = IR(lref); /* Left PHI gained a spill slot before the loop? */ if (irt_ismarked(ir->t) && ra_hasspill(ir->s)) { IRRef ren; lj_ir_set(as->J, IRT(IR_RENAME, IRT_NIL), lref, as->loopsnapno); ren = tref_ref(lj_ir_emit(as->J)); as->ir = as->T->ir; /* The IR may have been reallocated. */ IR(ren)->r = (uint8_t)r; IR(ren)->s = SPS_NONE; } irt_clearmark(ir->t); /* Always clear marker. */ rset_clear(work, r); } } /* Setup right PHI reference. */ static void asm_phi(ASMState *as, IRIns *ir) { RegSet allow = ((!LJ_SOFTFP && irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR) & ~as->phiset; RegSet afree = (as->freeset & allow); IRIns *irl = IR(ir->op1); IRIns *irr = IR(ir->op2); if (ir->r == RID_SINK) /* Sink PHI. */ return; /* Spill slot shuffling is not implemented yet (but rarely needed). */ if (ra_hasspill(irl->s) || ra_hasspill(irr->s)) lj_trace_err(as->J, LJ_TRERR_NYIPHI); /* Leave at least one register free for non-PHIs (and PHI cycle breaking). */ if ((afree & (afree-1))) { /* Two or more free registers? */ Reg r; if (ra_noreg(irr->r)) { /* Get a register for the right PHI. */ r = ra_allocref(as, ir->op2, allow); } else { /* Duplicate right PHI, need a copy (rare). */ r = ra_scratch(as, allow); emit_movrr(as, irr, r, irr->r); } ir->r = (uint8_t)r; rset_set(as->phiset, r); as->phireg[r] = (IRRef1)ir->op1; irt_setmark(irl->t); /* Marks left PHIs _with_ register. */ if (ra_noreg(irl->r)) ra_sethint(irl->r, r); /* Set register hint for left PHI. */ } else { /* Otherwise allocate a spill slot. */ /* This is overly restrictive, but it triggers only on synthetic code. */ if (ra_hasreg(irl->r) || ra_hasreg(irr->r)) lj_trace_err(as->J, LJ_TRERR_NYIPHI); ra_spill(as, ir); irr->s = ir->s; /* Set right PHI spill slot. Sync left slot later. */ } } static void asm_loop_fixup(ASMState *as); /* Middle part of a loop. */ static void asm_loop(ASMState *as) { MCode *mcspill; /* LOOP is a guard, so the snapno is up to date. */ as->loopsnapno = as->snapno; if (as->gcsteps) asm_gc_check(as); /* LOOP marks the transition from the variant to the invariant part. */ as->flagmcp = as->invmcp = NULL; as->sectref = 0; if (!neverfuse(as)) as->fuseref = 0; asm_phi_shuffle(as); mcspill = as->mcp; asm_phi_copyspill(as); asm_loop_fixup(as); as->mcloop = as->mcp; RA_DBGX((as, "===== LOOP =====")); if (!as->realign) RA_DBG_FLUSH(); if (as->mcp != mcspill) emit_jmp(as, mcspill); } /* -- Target-specific assembler ------------------------------------------- */ #if LJ_TARGET_X86ORX64 #include "lj_asm_x86.h" #elif LJ_TARGET_ARM #include "lj_asm_arm.h" #elif LJ_TARGET_PPC #include "lj_asm_ppc.h" #elif LJ_TARGET_MIPS #include "lj_asm_mips.h" #else #error "Missing assembler for target CPU" #endif /* -- Head of trace ------------------------------------------------------- */ /* Head of a root trace. */ static void asm_head_root(ASMState *as) { int32_t spadj; asm_head_root_base(as); emit_setvmstate(as, (int32_t)as->T->traceno); spadj = asm_stack_adjust(as); as->T->spadjust = (uint16_t)spadj; emit_spsub(as, spadj); /* Root traces assume a checked stack for the starting proto. */ as->T->topslot = gcref(as->T->startpt)->pt.framesize; } /* Head of a side trace. ** ** The current simplistic algorithm requires that all slots inherited ** from the parent are live in a register between pass 2 and pass 3. This ** avoids the complexity of stack slot shuffling. But of course this may ** overflow the register set in some cases and cause the dreaded error: ** "NYI: register coalescing too complex". A refined algorithm is needed. */ static void asm_head_side(ASMState *as) { IRRef1 sloadins[RID_MAX]; RegSet allow = RSET_ALL; /* Inverse of all coalesced registers. */ RegSet live = RSET_EMPTY; /* Live parent registers. */ IRIns *irp = &as->parent->ir[REF_BASE]; /* Parent base. */ int32_t spadj, spdelta; int pass2 = 0; int pass3 = 0; IRRef i; allow = asm_head_side_base(as, irp, allow); /* Scan all parent SLOADs and collect register dependencies. */ for (i = as->stopins; i > REF_BASE; i--) { IRIns *ir = IR(i); RegSP rs; lua_assert((ir->o == IR_SLOAD && (ir->op2 & IRSLOAD_PARENT)) || (LJ_SOFTFP && ir->o == IR_HIOP) || ir->o == IR_PVAL); rs = as->parentmap[i - REF_FIRST]; if (ra_hasreg(ir->r)) { rset_clear(allow, ir->r); if (ra_hasspill(ir->s)) { ra_save(as, ir, ir->r); checkmclim(as); } } else if (ra_hasspill(ir->s)) { irt_setmark(ir->t); pass2 = 1; } if (ir->r == rs) { /* Coalesce matching registers right now. */ ra_free(as, ir->r); } else if (ra_hasspill(regsp_spill(rs))) { if (ra_hasreg(ir->r)) pass3 = 1; } else if (ra_used(ir)) { sloadins[rs] = (IRRef1)i; rset_set(live, rs); /* Block live parent register. */ } } /* Calculate stack frame adjustment. */ spadj = asm_stack_adjust(as); spdelta = spadj - (int32_t)as->parent->spadjust; if (spdelta < 0) { /* Don't shrink the stack frame. */ spadj = (int32_t)as->parent->spadjust; spdelta = 0; } as->T->spadjust = (uint16_t)spadj; /* Reload spilled target registers. */ if (pass2) { for (i = as->stopins; i > REF_BASE; i--) { IRIns *ir = IR(i); if (irt_ismarked(ir->t)) { RegSet mask; Reg r; RegSP rs; irt_clearmark(ir->t); rs = as->parentmap[i - REF_FIRST]; if (!ra_hasspill(regsp_spill(rs))) ra_sethint(ir->r, rs); /* Hint may be gone, set it again. */ else if (sps_scale(regsp_spill(rs))+spdelta == sps_scale(ir->s)) continue; /* Same spill slot, do nothing. */ mask = ((!LJ_SOFTFP && irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR) & allow; if (mask == RSET_EMPTY) lj_trace_err(as->J, LJ_TRERR_NYICOAL); r = ra_allocref(as, i, mask); ra_save(as, ir, r); rset_clear(allow, r); if (r == rs) { /* Coalesce matching registers right now. */ ra_free(as, r); rset_clear(live, r); } else if (ra_hasspill(regsp_spill(rs))) { pass3 = 1; } checkmclim(as); } } } /* Store trace number and adjust stack frame relative to the parent. */ emit_setvmstate(as, (int32_t)as->T->traceno); emit_spsub(as, spdelta); #if !LJ_TARGET_X86ORX64 /* Restore BASE register from parent spill slot. */ if (ra_hasspill(irp->s)) emit_spload(as, IR(REF_BASE), IR(REF_BASE)->r, sps_scale(irp->s)); #endif /* Restore target registers from parent spill slots. */ if (pass3) { RegSet work = ~as->freeset & RSET_ALL; while (work) { Reg r = rset_pickbot(work); IRRef ref = regcost_ref(as->cost[r]); RegSP rs = as->parentmap[ref - REF_FIRST]; rset_clear(work, r); if (ra_hasspill(regsp_spill(rs))) { int32_t ofs = sps_scale(regsp_spill(rs)); ra_free(as, r); emit_spload(as, IR(ref), r, ofs); checkmclim(as); } } } /* Shuffle registers to match up target regs with parent regs. */ for (;;) { RegSet work; /* Repeatedly coalesce free live registers by moving to their target. */ while ((work = as->freeset & live) != RSET_EMPTY) { Reg rp = rset_pickbot(work); IRIns *ir = IR(sloadins[rp]); rset_clear(live, rp); rset_clear(allow, rp); ra_free(as, ir->r); emit_movrr(as, ir, ir->r, rp); checkmclim(as); } /* We're done if no live registers remain. */ if (live == RSET_EMPTY) break; /* Break cycles by renaming one target to a temp. register. */ if (live & RSET_GPR) { RegSet tmpset = as->freeset & ~live & allow & RSET_GPR; if (tmpset == RSET_EMPTY) lj_trace_err(as->J, LJ_TRERR_NYICOAL); ra_rename(as, rset_pickbot(live & RSET_GPR), rset_pickbot(tmpset)); } if (!LJ_SOFTFP && (live & RSET_FPR)) { RegSet tmpset = as->freeset & ~live & allow & RSET_FPR; if (tmpset == RSET_EMPTY) lj_trace_err(as->J, LJ_TRERR_NYICOAL); ra_rename(as, rset_pickbot(live & RSET_FPR), rset_pickbot(tmpset)); } checkmclim(as); /* Continue with coalescing to fix up the broken cycle(s). */ } /* Inherit top stack slot already checked by parent trace. */ as->T->topslot = as->parent->topslot; if (as->topslot > as->T->topslot) { /* Need to check for higher slot? */ #ifdef EXITSTATE_CHECKEXIT /* Highest exit + 1 indicates stack check. */ ExitNo exitno = as->T->nsnap; #else /* Reuse the parent exit in the context of the parent trace. */ ExitNo exitno = as->J->exitno; #endif as->T->topslot = (uint8_t)as->topslot; /* Remember for child traces. */ asm_stack_check(as, as->topslot, irp, allow & RSET_GPR, exitno); } } /* -- Tail of trace ------------------------------------------------------- */ /* Get base slot for a snapshot. */ static BCReg asm_baseslot(ASMState *as, SnapShot *snap, int *gotframe) { SnapEntry *map = &as->T->snapmap[snap->mapofs]; MSize n; for (n = snap->nent; n > 0; n--) { SnapEntry sn = map[n-1]; if ((sn & SNAP_FRAME)) { *gotframe = 1; return snap_slot(sn); } } return 0; } /* Link to another trace. */ static void asm_tail_link(ASMState *as) { SnapNo snapno = as->T->nsnap-1; /* Last snapshot. */ SnapShot *snap = &as->T->snap[snapno]; int gotframe = 0; BCReg baseslot = asm_baseslot(as, snap, &gotframe); as->topslot = snap->topslot; checkmclim(as); ra_allocref(as, REF_BASE, RID2RSET(RID_BASE)); if (as->T->link == 0) { /* Setup fixed registers for exit to interpreter. */ const BCIns *pc = snap_pc(as->T->snapmap[snap->mapofs + snap->nent]); int32_t mres; if (bc_op(*pc) == BC_JLOOP) { /* NYI: find a better way to do this. */ BCIns *retpc = &traceref(as->J, bc_d(*pc))->startins; if (bc_isret(bc_op(*retpc))) pc = retpc; } ra_allockreg(as, i32ptr(J2GG(as->J)->dispatch), RID_DISPATCH); ra_allockreg(as, i32ptr(pc), RID_LPC); mres = (int32_t)(snap->nslots - baseslot); switch (bc_op(*pc)) { case BC_CALLM: case BC_CALLMT: mres -= (int32_t)(1 + bc_a(*pc) + bc_c(*pc)); break; case BC_RETM: mres -= (int32_t)(bc_a(*pc) + bc_d(*pc)); break; case BC_TSETM: mres -= (int32_t)bc_a(*pc); break; default: if (bc_op(*pc) < BC_FUNCF) mres = 0; break; } ra_allockreg(as, mres, RID_RET); /* Return MULTRES or 0. */ } else if (baseslot) { /* Save modified BASE for linking to trace with higher start frame. */ emit_setgl(as, RID_BASE, jit_base); } emit_addptr(as, RID_BASE, 8*(int32_t)baseslot); /* Sync the interpreter state with the on-trace state. */ asm_stack_restore(as, snap); /* Root traces that add frames need to check the stack at the end. */ if (!as->parent && gotframe) asm_stack_check(as, as->topslot, NULL, as->freeset & RSET_GPR, snapno); } /* -- Trace setup --------------------------------------------------------- */ /* Clear reg/sp for all instructions and add register hints. */ static void asm_setup_regsp(ASMState *as) { GCtrace *T = as->T; int sink = T->sinktags; IRRef nins = T->nins; IRIns *ir, *lastir; int inloop; #if LJ_TARGET_ARM uint32_t rload = 0xa6402a64; #endif ra_setup(as); /* Clear reg/sp for constants. */ for (ir = IR(T->nk), lastir = IR(REF_BASE); ir < lastir; ir++) ir->prev = REGSP_INIT; /* REF_BASE is used for implicit references to the BASE register. */ lastir->prev = REGSP_HINT(RID_BASE); ir = IR(nins-1); if (ir->o == IR_RENAME) { do { ir--; nins--; } while (ir->o == IR_RENAME); T->nins = nins; /* Remove any renames left over from ASM restart. */ } as->snaprename = nins; as->snapref = nins; as->snapno = T->nsnap; as->stopins = REF_BASE; as->orignins = nins; as->curins = nins; /* Setup register hints for parent link instructions. */ ir = IR(REF_FIRST); if (as->parent) { uint16_t *p; lastir = lj_snap_regspmap(as->parent, as->J->exitno, ir); if (lastir - ir > LJ_MAX_JSLOTS) lj_trace_err(as->J, LJ_TRERR_NYICOAL); as->stopins = (IRRef)((lastir-1) - as->ir); for (p = as->parentmap; ir < lastir; ir++) { RegSP rs = ir->prev; *p++ = (uint16_t)rs; /* Copy original parent RegSP to parentmap. */ if (!ra_hasspill(regsp_spill(rs))) ir->prev = (uint16_t)REGSP_HINT(regsp_reg(rs)); else ir->prev = REGSP_INIT; } } inloop = 0; as->evenspill = SPS_FIRST; for (lastir = IR(nins); ir < lastir; ir++) { if (sink) { if (ir->r == RID_SINK) continue; if (ir->r == RID_SUNK) { /* Revert after ASM restart. */ ir->r = RID_SINK; continue; } } switch (ir->o) { case IR_LOOP: inloop = 1; break; #if LJ_TARGET_ARM case IR_SLOAD: if (!((ir->op2 & IRSLOAD_TYPECHECK) || (ir+1)->o == IR_HIOP)) break; /* fallthrough */ case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: if (!LJ_SOFTFP && irt_isnum(ir->t)) break; ir->prev = (uint16_t)REGSP_HINT((rload & 15)); rload = lj_ror(rload, 4); continue; #endif case IR_CALLXS: { CCallInfo ci; ci.flags = asm_callx_flags(as, ir); ir->prev = asm_setup_call_slots(as, ir, &ci); if (inloop) as->modset |= RSET_SCRATCH; continue; } case IR_CALLN: case IR_CALLL: case IR_CALLS: { const CCallInfo *ci = &lj_ir_callinfo[ir->op2]; ir->prev = asm_setup_call_slots(as, ir, ci); if (inloop) as->modset |= (ci->flags & CCI_NOFPRCLOBBER) ? (RSET_SCRATCH & ~RSET_FPR) : RSET_SCRATCH; continue; } #if LJ_SOFTFP || (LJ_32 && LJ_HASFFI) case IR_HIOP: switch ((ir-1)->o) { #if LJ_SOFTFP && LJ_TARGET_ARM case IR_SLOAD: case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: if (ra_hashint((ir-1)->r)) { ir->prev = (ir-1)->prev + 1; continue; } break; #endif #if !LJ_SOFTFP && LJ_NEED_FP64 case IR_CONV: if (irt_isfp((ir-1)->t)) { ir->prev = REGSP_HINT(RID_FPRET); continue; } /* fallthrough */ #endif case IR_CALLN: case IR_CALLXS: #if LJ_SOFTFP case IR_MIN: case IR_MAX: #endif (ir-1)->prev = REGSP_HINT(RID_RETLO); ir->prev = REGSP_HINT(RID_RETHI); continue; default: break; } break; #endif #if LJ_SOFTFP case IR_MIN: case IR_MAX: if ((ir+1)->o != IR_HIOP) break; /* fallthrough */ #endif /* C calls evict all scratch regs and return results in RID_RET. */ case IR_SNEW: case IR_XSNEW: case IR_NEWREF: if (REGARG_NUMGPR < 3 && as->evenspill < 3) as->evenspill = 3; /* lj_str_new and lj_tab_newkey need 3 args. */ case IR_TNEW: case IR_TDUP: case IR_CNEW: case IR_CNEWI: case IR_TOSTR: ir->prev = REGSP_HINT(RID_RET); if (inloop) as->modset = RSET_SCRATCH; continue; case IR_STRTO: case IR_OBAR: if (inloop) as->modset = RSET_SCRATCH; break; #if !LJ_TARGET_X86ORX64 && !LJ_SOFTFP case IR_ATAN2: case IR_LDEXP: #endif case IR_POW: if (!LJ_SOFTFP && irt_isnum(ir->t)) { #if LJ_TARGET_X86ORX64 ir->prev = REGSP_HINT(RID_XMM0); if (inloop) as->modset |= RSET_RANGE(RID_XMM0, RID_XMM1+1)|RID2RSET(RID_EAX); #else ir->prev = REGSP_HINT(RID_FPRET); if (inloop) as->modset |= RSET_SCRATCH; #endif continue; } /* fallthrough for integer POW */ case IR_DIV: case IR_MOD: if (!irt_isnum(ir->t)) { ir->prev = REGSP_HINT(RID_RET); if (inloop) as->modset |= (RSET_SCRATCH & RSET_GPR); continue; } break; case IR_FPMATH: #if LJ_TARGET_X86ORX64 if (ir->op2 == IRFPM_EXP2) { /* May be joined to lj_vm_pow_sse. */ ir->prev = REGSP_HINT(RID_XMM0); #if !LJ_64 if (as->evenspill < 4) /* Leave room for 16 byte scratch area. */ as->evenspill = 4; #endif if (inloop) as->modset |= RSET_RANGE(RID_XMM0, RID_XMM2+1)|RID2RSET(RID_EAX); continue; } else if (ir->op2 <= IRFPM_TRUNC && !(as->flags & JIT_F_SSE4_1)) { ir->prev = REGSP_HINT(RID_XMM0); if (inloop) as->modset |= RSET_RANGE(RID_XMM0, RID_XMM3+1)|RID2RSET(RID_EAX); continue; } break; #else ir->prev = REGSP_HINT(RID_FPRET); if (inloop) as->modset |= RSET_SCRATCH; continue; #endif #if LJ_TARGET_X86ORX64 /* Non-constant shift counts need to be in RID_ECX on x86/x64. */ case IR_BSHL: case IR_BSHR: case IR_BSAR: case IR_BROL: case IR_BROR: if (!irref_isk(ir->op2) && !ra_hashint(IR(ir->op2)->r)) { IR(ir->op2)->r = REGSP_HINT(RID_ECX); if (inloop) rset_set(as->modset, RID_ECX); } break; #endif /* Do not propagate hints across type conversions or loads. */ case IR_TOBIT: case IR_XLOAD: #if !LJ_TARGET_ARM case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: #endif break; case IR_CONV: if (irt_isfp(ir->t) || (ir->op2 & IRCONV_SRCMASK) == IRT_NUM || (ir->op2 & IRCONV_SRCMASK) == IRT_FLOAT) break; /* fallthrough */ default: /* Propagate hints across likely 'op reg, imm' or 'op reg'. */ if (irref_isk(ir->op2) && !irref_isk(ir->op1) && ra_hashint(regsp_reg(IR(ir->op1)->prev))) { ir->prev = IR(ir->op1)->prev; continue; } break; } ir->prev = REGSP_INIT; } if ((as->evenspill & 1)) as->oddspill = as->evenspill++; else as->oddspill = 0; } /* -- Assembler core ------------------------------------------------------ */ /* Assemble a trace. */ void lj_asm_trace(jit_State *J, GCtrace *T) { ASMState as_; ASMState *as = &as_; MCode *origtop; /* Ensure an initialized instruction beyond the last one for HIOP checks. */ J->cur.nins = lj_ir_nextins(J); J->cur.ir[J->cur.nins].o = IR_NOP; /* Setup initial state. Copy some fields to reduce indirections. */ as->J = J; as->T = T; as->ir = T->ir; as->flags = J->flags; as->loopref = J->loopref; as->realign = NULL; as->loopinv = 0; as->parent = J->parent ? traceref(J, J->parent) : NULL; /* Reserve MCode memory. */ as->mctop = origtop = lj_mcode_reserve(J, &as->mcbot); as->mcp = as->mctop; as->mclim = as->mcbot + MCLIM_REDZONE; asm_setup_target(as); do { as->mcp = as->mctop; #ifdef LUA_USE_ASSERT as->mcp_prev = as->mcp; #endif as->curins = T->nins; RA_DBG_START(); RA_DBGX((as, "===== STOP =====")); /* General trace setup. Emit tail of trace. */ asm_tail_prep(as); as->mcloop = NULL; as->flagmcp = NULL; as->topslot = 0; as->gcsteps = 0; as->sectref = as->loopref; as->fuseref = (as->flags & JIT_F_OPT_FUSE) ? as->loopref : FUSE_DISABLED; asm_setup_regsp(as); if (!as->loopref) asm_tail_link(as); /* Assemble a trace in linear backwards order. */ for (as->curins--; as->curins > as->stopins; as->curins--) { IRIns *ir = IR(as->curins); lua_assert(!(LJ_32 && irt_isint64(ir->t))); /* Handled by SPLIT. */ if (!ra_used(ir) && !ir_sideeff(ir) && (as->flags & JIT_F_OPT_DCE)) continue; /* Dead-code elimination can be soooo easy. */ if (irt_isguard(ir->t)) asm_snap_prep(as); RA_DBG_REF(); checkmclim(as); asm_ir(as, ir); } } while (as->realign); /* Retry in case the MCode needs to be realigned. */ /* Emit head of trace. */ RA_DBG_REF(); checkmclim(as); if (as->gcsteps > 0) { as->curins = as->T->snap[0].ref; asm_snap_prep(as); /* The GC check is a guard. */ asm_gc_check(as); } ra_evictk(as); if (as->parent) asm_head_side(as); else asm_head_root(as); asm_phi_fixup(as); RA_DBGX((as, "===== START ====")); RA_DBG_FLUSH(); if (as->freeset != RSET_ALL) lj_trace_err(as->J, LJ_TRERR_BADRA); /* Ouch! Should never happen. */ /* Set trace entry point before fixing up tail to allow link to self. */ T->mcode = as->mcp; T->mcloop = as->mcloop ? (MSize)((char *)as->mcloop - (char *)as->mcp) : 0; if (!as->loopref) asm_tail_fixup(as, T->link); /* Note: this may change as->mctop! */ T->szmcode = (MSize)((char *)as->mctop - (char *)as->mcp); lj_mcode_sync(T->mcode, origtop); } #undef IR #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_trace.h0000664000000000000000000000274112202141143022316 0ustar rootroot/* ** Trace management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_TRACE_H #define _LJ_TRACE_H #include "lj_obj.h" #if LJ_HASJIT #include "lj_jit.h" #include "lj_dispatch.h" /* Trace errors. */ typedef enum { #define TREDEF(name, msg) LJ_TRERR_##name, #include "lj_traceerr.h" LJ_TRERR__MAX } TraceError; LJ_FUNC_NORET void lj_trace_err(jit_State *J, TraceError e); LJ_FUNC_NORET void lj_trace_err_info(jit_State *J, TraceError e); /* Trace management. */ LJ_FUNC void LJ_FASTCALL lj_trace_free(global_State *g, GCtrace *T); LJ_FUNC void lj_trace_reenableproto(GCproto *pt); LJ_FUNC void lj_trace_flushproto(global_State *g, GCproto *pt); LJ_FUNC void lj_trace_flush(jit_State *J, TraceNo traceno); LJ_FUNC int lj_trace_flushall(lua_State *L); LJ_FUNC void lj_trace_initstate(global_State *g); LJ_FUNC void lj_trace_freestate(global_State *g); /* Event handling. */ LJ_FUNC void lj_trace_ins(jit_State *J, const BCIns *pc); LJ_FUNCA void LJ_FASTCALL lj_trace_hot(jit_State *J, const BCIns *pc); LJ_FUNCA int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr); /* Signal asynchronous abort of trace or end of trace. */ #define lj_trace_abort(g) (G2J(g)->state &= ~LJ_TRACE_ACTIVE) #define lj_trace_end(J) (J->state = LJ_TRACE_END) #else #define lj_trace_flushall(L) (UNUSED(L), 0) #define lj_trace_initstate(g) UNUSED(g) #define lj_trace_freestate(g) UNUSED(g) #define lj_trace_abort(g) UNUSED(g) #define lj_trace_end(J) UNUSED(J) #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_snap.h0000664000000000000000000000163112202141143022156 0ustar rootroot/* ** Snapshot handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_SNAP_H #define _LJ_SNAP_H #include "lj_obj.h" #include "lj_jit.h" #if LJ_HASJIT LJ_FUNC void lj_snap_add(jit_State *J); LJ_FUNC void lj_snap_purge(jit_State *J); LJ_FUNC void lj_snap_shrink(jit_State *J); LJ_FUNC IRIns *lj_snap_regspmap(GCtrace *T, SnapNo snapno, IRIns *ir); LJ_FUNC void lj_snap_replay(jit_State *J, GCtrace *T); LJ_FUNC const BCIns *lj_snap_restore(jit_State *J, void *exptr); LJ_FUNC void lj_snap_grow_buf_(jit_State *J, MSize need); LJ_FUNC void lj_snap_grow_map_(jit_State *J, MSize need); static LJ_AINLINE void lj_snap_grow_buf(jit_State *J, MSize need) { if (LJ_UNLIKELY(need > J->sizesnap)) lj_snap_grow_buf_(J, need); } static LJ_AINLINE void lj_snap_grow_map(jit_State *J, MSize need) { if (LJ_UNLIKELY(need > J->sizesnapmap)) lj_snap_grow_map_(J, need); } #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_gdbjit.c0000664000000000000000000005200212202141143022451 0ustar rootroot/* ** Client for the GDB JIT API. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_gdbjit_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_gc.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_frame.h" #include "lj_jit.h" #include "lj_dispatch.h" /* This is not compiled in by default. ** Enable with -DLUAJIT_USE_GDBJIT in the Makefile and recompile everything. */ #ifdef LUAJIT_USE_GDBJIT /* The GDB JIT API allows JIT compilers to pass debug information about ** JIT-compiled code back to GDB. You need at least GDB 7.0 or higher ** to see it in action. ** ** This is a passive API, so it works even when not running under GDB ** or when attaching to an already running process. Alas, this implies ** enabling it always has a non-negligible overhead -- do not use in ** release mode! ** ** The LuaJIT GDB JIT client is rather minimal at the moment. It gives ** each trace a symbol name and adds a source location and frame unwind ** information. Obviously LuaJIT itself and any embedding C application ** should be compiled with debug symbols, too (see the Makefile). ** ** Traces are named TRACE_1, TRACE_2, ... these correspond to the trace ** numbers from -jv or -jdump. Use "break TRACE_1" or "tbreak TRACE_1" etc. ** to set breakpoints on specific traces (even ahead of their creation). ** ** The source location for each trace allows listing the corresponding ** source lines with the GDB command "list" (but only if the Lua source ** has been loaded from a file). Currently this is always set to the ** location where the trace has been started. ** ** Frame unwind information can be inspected with the GDB command ** "info frame". This also allows proper backtraces across JIT-compiled ** code with the GDB command "bt". ** ** You probably want to add the following settings to a .gdbinit file ** (or add them to ~/.gdbinit): ** set disassembly-flavor intel ** set breakpoint pending on ** ** Here's a sample GDB session: ** ------------------------------------------------------------------------ $ cat >x.lua for outer=1,100 do for inner=1,100 do end end ^D $ luajit -jv x.lua [TRACE 1 x.lua:2] [TRACE 2 (1/3) x.lua:1 -> 1] $ gdb --quiet --args luajit x.lua (gdb) tbreak TRACE_1 Function "TRACE_1" not defined. Temporary breakpoint 1 (TRACE_1) pending. (gdb) run Starting program: luajit x.lua Temporary breakpoint 1, TRACE_1 () at x.lua:2 2 for inner=1,100 do end (gdb) list 1 for outer=1,100 do 2 for inner=1,100 do end 3 end (gdb) bt #0 TRACE_1 () at x.lua:2 #1 0x08053690 in lua_pcall [...] [...] #7 0x0806ff90 in main [...] (gdb) disass TRACE_1 Dump of assembler code for function TRACE_1: 0xf7fd9fba : mov DWORD PTR ds:0xf7e0e2a0,0x1 0xf7fd9fc4 : movsd xmm7,QWORD PTR [edx+0x20] [...] 0xf7fd9ff8 : jmp 0xf7fd2014 End of assembler dump. (gdb) tbreak TRACE_2 Function "TRACE_2" not defined. Temporary breakpoint 2 (TRACE_2) pending. (gdb) cont Continuing. Temporary breakpoint 2, TRACE_2 () at x.lua:1 1 for outer=1,100 do (gdb) info frame Stack level 0, frame at 0xffffd7c0: eip = 0xf7fd9f60 in TRACE_2 (x.lua:1); saved eip 0x8053690 called by frame at 0xffffd7e0 source language unknown. Arglist at 0xffffd78c, args: Locals at 0xffffd78c, Previous frame's sp is 0xffffd7c0 Saved registers: ebx at 0xffffd7ac, ebp at 0xffffd7b8, esi at 0xffffd7b0, edi at 0xffffd7b4, eip at 0xffffd7bc (gdb) ** ------------------------------------------------------------------------ */ /* -- GDB JIT API --------------------------------------------------------- */ /* GDB JIT actions. */ enum { GDBJIT_NOACTION = 0, GDBJIT_REGISTER, GDBJIT_UNREGISTER }; /* GDB JIT entry. */ typedef struct GDBJITentry { struct GDBJITentry *next_entry; struct GDBJITentry *prev_entry; const char *symfile_addr; uint64_t symfile_size; } GDBJITentry; /* GDB JIT descriptor. */ typedef struct GDBJITdesc { uint32_t version; uint32_t action_flag; GDBJITentry *relevant_entry; GDBJITentry *first_entry; } GDBJITdesc; GDBJITdesc __jit_debug_descriptor = { 1, GDBJIT_NOACTION, NULL, NULL }; /* GDB sets a breakpoint at this function. */ void LJ_NOINLINE __jit_debug_register_code() { __asm__ __volatile__(""); }; /* -- In-memory ELF object definitions ------------------------------------ */ /* ELF definitions. */ typedef struct ELFheader { uint8_t emagic[4]; uint8_t eclass; uint8_t eendian; uint8_t eversion; uint8_t eosabi; uint8_t eabiversion; uint8_t epad[7]; uint16_t type; uint16_t machine; uint32_t version; uintptr_t entry; uintptr_t phofs; uintptr_t shofs; uint32_t flags; uint16_t ehsize; uint16_t phentsize; uint16_t phnum; uint16_t shentsize; uint16_t shnum; uint16_t shstridx; } ELFheader; typedef struct ELFsectheader { uint32_t name; uint32_t type; uintptr_t flags; uintptr_t addr; uintptr_t ofs; uintptr_t size; uint32_t link; uint32_t info; uintptr_t align; uintptr_t entsize; } ELFsectheader; #define ELFSECT_IDX_ABS 0xfff1 enum { ELFSECT_TYPE_PROGBITS = 1, ELFSECT_TYPE_SYMTAB = 2, ELFSECT_TYPE_STRTAB = 3, ELFSECT_TYPE_NOBITS = 8 }; #define ELFSECT_FLAGS_WRITE 1 #define ELFSECT_FLAGS_ALLOC 2 #define ELFSECT_FLAGS_EXEC 4 typedef struct ELFsymbol { #if LJ_64 uint32_t name; uint8_t info; uint8_t other; uint16_t sectidx; uintptr_t value; uint64_t size; #else uint32_t name; uintptr_t value; uint32_t size; uint8_t info; uint8_t other; uint16_t sectidx; #endif } ELFsymbol; enum { ELFSYM_TYPE_FUNC = 2, ELFSYM_TYPE_FILE = 4, ELFSYM_BIND_LOCAL = 0 << 4, ELFSYM_BIND_GLOBAL = 1 << 4, }; /* DWARF definitions. */ #define DW_CIE_VERSION 1 enum { DW_CFA_nop = 0x0, DW_CFA_offset_extended = 0x5, DW_CFA_def_cfa = 0xc, DW_CFA_def_cfa_offset = 0xe, DW_CFA_offset_extended_sf = 0x11, DW_CFA_advance_loc = 0x40, DW_CFA_offset = 0x80 }; enum { DW_EH_PE_udata4 = 3, DW_EH_PE_textrel = 0x20 }; enum { DW_TAG_compile_unit = 0x11 }; enum { DW_children_no = 0, DW_children_yes = 1 }; enum { DW_AT_name = 0x03, DW_AT_stmt_list = 0x10, DW_AT_low_pc = 0x11, DW_AT_high_pc = 0x12 }; enum { DW_FORM_addr = 0x01, DW_FORM_data4 = 0x06, DW_FORM_string = 0x08 }; enum { DW_LNS_extended_op = 0, DW_LNS_copy = 1, DW_LNS_advance_pc = 2, DW_LNS_advance_line = 3 }; enum { DW_LNE_end_sequence = 1, DW_LNE_set_address = 2 }; enum { #if LJ_TARGET_X86 DW_REG_AX, DW_REG_CX, DW_REG_DX, DW_REG_BX, DW_REG_SP, DW_REG_BP, DW_REG_SI, DW_REG_DI, DW_REG_RA, #elif LJ_TARGET_X64 /* Yes, the order is strange, but correct. */ DW_REG_AX, DW_REG_DX, DW_REG_CX, DW_REG_BX, DW_REG_SI, DW_REG_DI, DW_REG_BP, DW_REG_SP, DW_REG_8, DW_REG_9, DW_REG_10, DW_REG_11, DW_REG_12, DW_REG_13, DW_REG_14, DW_REG_15, DW_REG_RA, #elif LJ_TARGET_ARM DW_REG_SP = 13, DW_REG_RA = 14, #elif LJ_TARGET_PPC DW_REG_SP = 1, DW_REG_RA = 65, DW_REG_CR = 70, #elif LJ_TARGET_MIPS DW_REG_SP = 29, DW_REG_RA = 31, #else #error "Unsupported target architecture" #endif }; /* Minimal list of sections for the in-memory ELF object. */ enum { GDBJIT_SECT_NULL, GDBJIT_SECT_text, GDBJIT_SECT_eh_frame, GDBJIT_SECT_shstrtab, GDBJIT_SECT_strtab, GDBJIT_SECT_symtab, GDBJIT_SECT_debug_info, GDBJIT_SECT_debug_abbrev, GDBJIT_SECT_debug_line, GDBJIT_SECT__MAX }; enum { GDBJIT_SYM_UNDEF, GDBJIT_SYM_FILE, GDBJIT_SYM_FUNC, GDBJIT_SYM__MAX }; /* In-memory ELF object. */ typedef struct GDBJITobj { ELFheader hdr; /* ELF header. */ ELFsectheader sect[GDBJIT_SECT__MAX]; /* ELF sections. */ ELFsymbol sym[GDBJIT_SYM__MAX]; /* ELF symbol table. */ uint8_t space[4096]; /* Space for various section data. */ } GDBJITobj; /* Combined structure for GDB JIT entry and ELF object. */ typedef struct GDBJITentryobj { GDBJITentry entry; size_t sz; GDBJITobj obj; } GDBJITentryobj; /* Template for in-memory ELF header. */ static const ELFheader elfhdr_template = { .emagic = { 0x7f, 'E', 'L', 'F' }, .eclass = LJ_64 ? 2 : 1, .eendian = LJ_ENDIAN_SELECT(1, 2), .eversion = 1, #if LJ_TARGET_LINUX .eosabi = 0, /* Nope, it's not 3. */ #elif defined(__FreeBSD__) .eosabi = 9, #elif defined(__NetBSD__) .eosabi = 2, #elif defined(__OpenBSD__) .eosabi = 12, #elif (defined(__sun__) && defined(__svr4__)) .eosabi = 6, #else .eosabi = 0, #endif .eabiversion = 0, .epad = { 0, 0, 0, 0, 0, 0, 0 }, .type = 1, #if LJ_TARGET_X86 .machine = 3, #elif LJ_TARGET_X64 .machine = 62, #elif LJ_TARGET_ARM .machine = 40, #elif LJ_TARGET_PPC .machine = 20, #elif LJ_TARGET_MIPS .machine = 8, #else #error "Unsupported target architecture" #endif .version = 1, .entry = 0, .phofs = 0, .shofs = offsetof(GDBJITobj, sect), .flags = 0, .ehsize = sizeof(ELFheader), .phentsize = 0, .phnum = 0, .shentsize = sizeof(ELFsectheader), .shnum = GDBJIT_SECT__MAX, .shstridx = GDBJIT_SECT_shstrtab }; /* -- In-memory ELF object generation ------------------------------------- */ /* Context for generating the ELF object for the GDB JIT API. */ typedef struct GDBJITctx { uint8_t *p; /* Pointer to next address in obj.space. */ uint8_t *startp; /* Pointer to start address in obj.space. */ GCtrace *T; /* Generate symbols for this trace. */ uintptr_t mcaddr; /* Machine code address. */ MSize szmcode; /* Size of machine code. */ MSize spadjp; /* Stack adjustment for parent trace or interpreter. */ MSize spadj; /* Stack adjustment for trace itself. */ BCLine lineno; /* Starting line number. */ const char *filename; /* Starting file name. */ size_t objsize; /* Final size of ELF object. */ GDBJITobj obj; /* In-memory ELF object. */ } GDBJITctx; /* Add a zero-terminated string. */ static uint32_t gdbjit_strz(GDBJITctx *ctx, const char *str) { uint8_t *p = ctx->p; uint32_t ofs = (uint32_t)(p - ctx->startp); do { *p++ = (uint8_t)*str; } while (*str++); ctx->p = p; return ofs; } /* Append a decimal number. */ static void gdbjit_catnum(GDBJITctx *ctx, uint32_t n) { if (n >= 10) { uint32_t m = n / 10; n = n % 10; gdbjit_catnum(ctx, m); } *ctx->p++ = '0' + n; } /* Add a ULEB128 value. */ static void gdbjit_uleb128(GDBJITctx *ctx, uint32_t v) { uint8_t *p = ctx->p; for (; v >= 0x80; v >>= 7) *p++ = (uint8_t)((v & 0x7f) | 0x80); *p++ = (uint8_t)v; ctx->p = p; } /* Add a SLEB128 value. */ static void gdbjit_sleb128(GDBJITctx *ctx, int32_t v) { uint8_t *p = ctx->p; for (; (uint32_t)(v+0x40) >= 0x80; v >>= 7) *p++ = (uint8_t)((v & 0x7f) | 0x80); *p++ = (uint8_t)(v & 0x7f); ctx->p = p; } /* Shortcuts to generate DWARF structures. */ #define DB(x) (*p++ = (x)) #define DI8(x) (*(int8_t *)p = (x), p++) #define DU16(x) (*(uint16_t *)p = (x), p += 2) #define DU32(x) (*(uint32_t *)p = (x), p += 4) #define DADDR(x) (*(uintptr_t *)p = (x), p += sizeof(uintptr_t)) #define DUV(x) (ctx->p = p, gdbjit_uleb128(ctx, (x)), p = ctx->p) #define DSV(x) (ctx->p = p, gdbjit_sleb128(ctx, (x)), p = ctx->p) #define DSTR(str) (ctx->p = p, gdbjit_strz(ctx, (str)), p = ctx->p) #define DALIGNNOP(s) while ((uintptr_t)p & ((s)-1)) *p++ = DW_CFA_nop #define DSECT(name, stmt) \ { uint32_t *szp_##name = (uint32_t *)p; p += 4; stmt \ *szp_##name = (uint32_t)((p-(uint8_t *)szp_##name)-4); } \ /* Initialize ELF section headers. */ static void LJ_FASTCALL gdbjit_secthdr(GDBJITctx *ctx) { ELFsectheader *sect; *ctx->p++ = '\0'; /* Empty string at start of string table. */ #define SECTDEF(id, tp, al) \ sect = &ctx->obj.sect[GDBJIT_SECT_##id]; \ sect->name = gdbjit_strz(ctx, "." #id); \ sect->type = ELFSECT_TYPE_##tp; \ sect->align = (al) SECTDEF(text, NOBITS, 16); sect->flags = ELFSECT_FLAGS_ALLOC|ELFSECT_FLAGS_EXEC; sect->addr = ctx->mcaddr; sect->ofs = 0; sect->size = ctx->szmcode; SECTDEF(eh_frame, PROGBITS, sizeof(uintptr_t)); sect->flags = ELFSECT_FLAGS_ALLOC; SECTDEF(shstrtab, STRTAB, 1); SECTDEF(strtab, STRTAB, 1); SECTDEF(symtab, SYMTAB, sizeof(uintptr_t)); sect->ofs = offsetof(GDBJITobj, sym); sect->size = sizeof(ctx->obj.sym); sect->link = GDBJIT_SECT_strtab; sect->entsize = sizeof(ELFsymbol); sect->info = GDBJIT_SYM_FUNC; SECTDEF(debug_info, PROGBITS, 1); SECTDEF(debug_abbrev, PROGBITS, 1); SECTDEF(debug_line, PROGBITS, 1); #undef SECTDEF } /* Initialize symbol table. */ static void LJ_FASTCALL gdbjit_symtab(GDBJITctx *ctx) { ELFsymbol *sym; *ctx->p++ = '\0'; /* Empty string at start of string table. */ sym = &ctx->obj.sym[GDBJIT_SYM_FILE]; sym->name = gdbjit_strz(ctx, "JIT mcode"); sym->sectidx = ELFSECT_IDX_ABS; sym->info = ELFSYM_TYPE_FILE|ELFSYM_BIND_LOCAL; sym = &ctx->obj.sym[GDBJIT_SYM_FUNC]; sym->name = gdbjit_strz(ctx, "TRACE_"); ctx->p--; gdbjit_catnum(ctx, ctx->T->traceno); *ctx->p++ = '\0'; sym->sectidx = GDBJIT_SECT_text; sym->value = 0; sym->size = ctx->szmcode; sym->info = ELFSYM_TYPE_FUNC|ELFSYM_BIND_GLOBAL; } /* Initialize .eh_frame section. */ static void LJ_FASTCALL gdbjit_ehframe(GDBJITctx *ctx) { uint8_t *p = ctx->p; uint8_t *framep = p; /* Emit DWARF EH CIE. */ DSECT(CIE, DU32(0); /* Offset to CIE itself. */ DB(DW_CIE_VERSION); DSTR("zR"); /* Augmentation. */ DUV(1); /* Code alignment factor. */ DSV(-(int32_t)sizeof(uintptr_t)); /* Data alignment factor. */ DB(DW_REG_RA); /* Return address register. */ DB(1); DB(DW_EH_PE_textrel|DW_EH_PE_udata4); /* Augmentation data. */ DB(DW_CFA_def_cfa); DUV(DW_REG_SP); DUV(sizeof(uintptr_t)); #if LJ_TARGET_PPC DB(DW_CFA_offset_extended_sf); DB(DW_REG_RA); DSV(-1); #else DB(DW_CFA_offset|DW_REG_RA); DUV(1); #endif DALIGNNOP(sizeof(uintptr_t)); ) /* Emit DWARF EH FDE. */ DSECT(FDE, DU32((uint32_t)(p-framep)); /* Offset to CIE. */ DU32(0); /* Machine code offset relative to .text. */ DU32(ctx->szmcode); /* Machine code length. */ DB(0); /* Augmentation data. */ /* Registers saved in CFRAME. */ #if LJ_TARGET_X86 DB(DW_CFA_offset|DW_REG_BP); DUV(2); DB(DW_CFA_offset|DW_REG_DI); DUV(3); DB(DW_CFA_offset|DW_REG_SI); DUV(4); DB(DW_CFA_offset|DW_REG_BX); DUV(5); #elif LJ_TARGET_X64 DB(DW_CFA_offset|DW_REG_BP); DUV(2); DB(DW_CFA_offset|DW_REG_BX); DUV(3); DB(DW_CFA_offset|DW_REG_15); DUV(4); DB(DW_CFA_offset|DW_REG_14); DUV(5); /* Extra registers saved for JIT-compiled code. */ DB(DW_CFA_offset|DW_REG_13); DUV(9); DB(DW_CFA_offset|DW_REG_12); DUV(10); #elif LJ_TARGET_ARM { int i; for (i = 11; i >= 4; i--) { DB(DW_CFA_offset|i); DUV(2+(11-i)); } } #elif LJ_TARGET_PPC { int i; DB(DW_CFA_offset_extended); DB(DW_REG_CR); DUV(55); for (i = 14; i <= 31; i++) { DB(DW_CFA_offset|i); DUV(37+(31-i)); DB(DW_CFA_offset|32|i); DUV(2+2*(31-i)); } } #elif LJ_TARGET_MIPS { int i; DB(DW_CFA_offset|30); DUV(2); for (i = 23; i >= 16; i--) { DB(DW_CFA_offset|i); DUV(26-i); } for (i = 30; i >= 20; i -= 2) { DB(DW_CFA_offset|32|i); DUV(42-i); } } #else #error "Unsupported target architecture" #endif if (ctx->spadjp != ctx->spadj) { /* Parent/interpreter stack frame size. */ DB(DW_CFA_def_cfa_offset); DUV(ctx->spadjp); DB(DW_CFA_advance_loc|1); /* Only an approximation. */ } DB(DW_CFA_def_cfa_offset); DUV(ctx->spadj); /* Trace stack frame size. */ DALIGNNOP(sizeof(uintptr_t)); ) ctx->p = p; } /* Initialize .debug_info section. */ static void LJ_FASTCALL gdbjit_debuginfo(GDBJITctx *ctx) { uint8_t *p = ctx->p; DSECT(info, DU16(2); /* DWARF version. */ DU32(0); /* Abbrev offset. */ DB(sizeof(uintptr_t)); /* Pointer size. */ DUV(1); /* Abbrev #1: DW_TAG_compile_unit. */ DSTR(ctx->filename); /* DW_AT_name. */ DADDR(ctx->mcaddr); /* DW_AT_low_pc. */ DADDR(ctx->mcaddr + ctx->szmcode); /* DW_AT_high_pc. */ DU32(0); /* DW_AT_stmt_list. */ ) ctx->p = p; } /* Initialize .debug_abbrev section. */ static void LJ_FASTCALL gdbjit_debugabbrev(GDBJITctx *ctx) { uint8_t *p = ctx->p; /* Abbrev #1: DW_TAG_compile_unit. */ DUV(1); DUV(DW_TAG_compile_unit); DB(DW_children_no); DUV(DW_AT_name); DUV(DW_FORM_string); DUV(DW_AT_low_pc); DUV(DW_FORM_addr); DUV(DW_AT_high_pc); DUV(DW_FORM_addr); DUV(DW_AT_stmt_list); DUV(DW_FORM_data4); DB(0); DB(0); ctx->p = p; } #define DLNE(op, s) (DB(DW_LNS_extended_op), DUV(1+(s)), DB((op))) /* Initialize .debug_line section. */ static void LJ_FASTCALL gdbjit_debugline(GDBJITctx *ctx) { uint8_t *p = ctx->p; DSECT(line, DU16(2); /* DWARF version. */ DSECT(header, DB(1); /* Minimum instruction length. */ DB(1); /* is_stmt. */ DI8(0); /* Line base for special opcodes. */ DB(2); /* Line range for special opcodes. */ DB(3+1); /* Opcode base at DW_LNS_advance_line+1. */ DB(0); DB(1); DB(1); /* Standard opcode lengths. */ /* Directory table. */ DB(0); /* File name table. */ DSTR(ctx->filename); DUV(0); DUV(0); DUV(0); DB(0); ) DLNE(DW_LNE_set_address, sizeof(uintptr_t)); DADDR(ctx->mcaddr); if (ctx->lineno) { DB(DW_LNS_advance_line); DSV(ctx->lineno-1); } DB(DW_LNS_copy); DB(DW_LNS_advance_pc); DUV(ctx->szmcode); DLNE(DW_LNE_end_sequence, 0); ) ctx->p = p; } #undef DLNE /* Undef shortcuts. */ #undef DB #undef DI8 #undef DU16 #undef DU32 #undef DADDR #undef DUV #undef DSV #undef DSTR #undef DALIGNNOP #undef DSECT /* Type of a section initializer callback. */ typedef void (LJ_FASTCALL *GDBJITinitf)(GDBJITctx *ctx); /* Call section initializer and set the section offset and size. */ static void gdbjit_initsect(GDBJITctx *ctx, int sect, GDBJITinitf initf) { ctx->startp = ctx->p; ctx->obj.sect[sect].ofs = (uintptr_t)((char *)ctx->p - (char *)&ctx->obj); initf(ctx); ctx->obj.sect[sect].size = (uintptr_t)(ctx->p - ctx->startp); } #define SECTALIGN(p, a) \ ((p) = (uint8_t *)(((uintptr_t)(p) + ((a)-1)) & ~(uintptr_t)((a)-1))) /* Build in-memory ELF object. */ static void gdbjit_buildobj(GDBJITctx *ctx) { GDBJITobj *obj = &ctx->obj; /* Fill in ELF header and clear structures. */ memcpy(&obj->hdr, &elfhdr_template, sizeof(ELFheader)); memset(&obj->sect, 0, sizeof(ELFsectheader)*GDBJIT_SECT__MAX); memset(&obj->sym, 0, sizeof(ELFsymbol)*GDBJIT_SYM__MAX); /* Initialize sections. */ ctx->p = obj->space; gdbjit_initsect(ctx, GDBJIT_SECT_shstrtab, gdbjit_secthdr); gdbjit_initsect(ctx, GDBJIT_SECT_strtab, gdbjit_symtab); gdbjit_initsect(ctx, GDBJIT_SECT_debug_info, gdbjit_debuginfo); gdbjit_initsect(ctx, GDBJIT_SECT_debug_abbrev, gdbjit_debugabbrev); gdbjit_initsect(ctx, GDBJIT_SECT_debug_line, gdbjit_debugline); SECTALIGN(ctx->p, sizeof(uintptr_t)); gdbjit_initsect(ctx, GDBJIT_SECT_eh_frame, gdbjit_ehframe); ctx->objsize = (size_t)((char *)ctx->p - (char *)obj); lua_assert(ctx->objsize < sizeof(GDBJITobj)); } #undef SECTALIGN /* -- Interface to GDB JIT API -------------------------------------------- */ /* Add new entry to GDB JIT symbol chain. */ static void gdbjit_newentry(lua_State *L, GDBJITctx *ctx) { /* Allocate memory for GDB JIT entry and ELF object. */ MSize sz = (MSize)(sizeof(GDBJITentryobj) - sizeof(GDBJITobj) + ctx->objsize); GDBJITentryobj *eo = lj_mem_newt(L, sz, GDBJITentryobj); memcpy(&eo->obj, &ctx->obj, ctx->objsize); /* Copy ELF object. */ eo->sz = sz; ctx->T->gdbjit_entry = (void *)eo; /* Link new entry to chain and register it. */ eo->entry.prev_entry = NULL; eo->entry.next_entry = __jit_debug_descriptor.first_entry; if (eo->entry.next_entry) eo->entry.next_entry->prev_entry = &eo->entry; eo->entry.symfile_addr = (const char *)&eo->obj; eo->entry.symfile_size = ctx->objsize; __jit_debug_descriptor.first_entry = &eo->entry; __jit_debug_descriptor.relevant_entry = &eo->entry; __jit_debug_descriptor.action_flag = GDBJIT_REGISTER; __jit_debug_register_code(); } /* Add debug info for newly compiled trace and notify GDB. */ void lj_gdbjit_addtrace(jit_State *J, GCtrace *T) { GDBJITctx ctx; GCproto *pt = &gcref(T->startpt)->pt; TraceNo parent = T->ir[REF_BASE].op1; const BCIns *startpc = mref(T->startpc, const BCIns); ctx.T = T; ctx.mcaddr = (uintptr_t)T->mcode; ctx.szmcode = T->szmcode; ctx.spadjp = CFRAME_SIZE_JIT + (MSize)(parent ? traceref(J, parent)->spadjust : 0); ctx.spadj = CFRAME_SIZE_JIT + T->spadjust; lua_assert(startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc); ctx.lineno = lj_debug_line(pt, proto_bcpos(pt, startpc)); ctx.filename = proto_chunknamestr(pt); if (*ctx.filename == '@' || *ctx.filename == '=') ctx.filename++; else ctx.filename = "(string)"; gdbjit_buildobj(&ctx); gdbjit_newentry(J->L, &ctx); } /* Delete debug info for trace and notify GDB. */ void lj_gdbjit_deltrace(jit_State *J, GCtrace *T) { GDBJITentryobj *eo = (GDBJITentryobj *)T->gdbjit_entry; if (eo) { if (eo->entry.prev_entry) eo->entry.prev_entry->next_entry = eo->entry.next_entry; else __jit_debug_descriptor.first_entry = eo->entry.next_entry; if (eo->entry.next_entry) eo->entry.next_entry->prev_entry = eo->entry.prev_entry; __jit_debug_descriptor.relevant_entry = &eo->entry; __jit_debug_descriptor.action_flag = GDBJIT_UNREGISTER; __jit_debug_register_code(); lj_mem_free(J2G(J), eo, eo->sz); } } #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_cparse.h0000664000000000000000000000421312202141143022471 0ustar rootroot/* ** C declaration parser. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CPARSE_H #define _LJ_CPARSE_H #include "lj_obj.h" #include "lj_ctype.h" #if LJ_HASFFI /* C parser limits. */ #define CPARSE_MAX_BUF 32768 /* Max. token buffer size. */ #define CPARSE_MAX_DECLSTACK 100 /* Max. declaration stack depth. */ #define CPARSE_MAX_DECLDEPTH 20 /* Max. recursive declaration depth. */ #define CPARSE_MAX_PACKSTACK 7 /* Max. pack pragma stack depth. */ /* Flags for C parser mode. */ #define CPARSE_MODE_MULTI 1 /* Process multiple declarations. */ #define CPARSE_MODE_ABSTRACT 2 /* Accept abstract declarators. */ #define CPARSE_MODE_DIRECT 4 /* Accept direct declarators. */ #define CPARSE_MODE_FIELD 8 /* Accept field width in bits, too. */ #define CPARSE_MODE_NOIMPLICIT 16 /* Reject implicit declarations. */ #define CPARSE_MODE_SKIP 32 /* Skip definitions, ignore errors. */ typedef int CPChar; /* C parser character. Unsigned ext. from char. */ typedef int CPToken; /* C parser token. */ /* C parser internal value representation. */ typedef struct CPValue { union { int32_t i32; /* Value for CTID_INT32. */ uint32_t u32; /* Value for CTID_UINT32. */ }; CTypeID id; /* C Type ID of the value. */ } CPValue; /* C parser state. */ typedef struct CPState { CPChar c; /* Current character. */ CPToken tok; /* Current token. */ CPValue val; /* Token value. */ GCstr *str; /* Interned string of identifier/keyword. */ CType *ct; /* C type table entry. */ const char *p; /* Current position in input buffer. */ SBuf sb; /* String buffer for tokens. */ lua_State *L; /* Lua state. */ CTState *cts; /* C type state. */ TValue *param; /* C type parameters. */ const char *srcname; /* Current source name. */ BCLine linenumber; /* Input line counter. */ int depth; /* Recursive declaration depth. */ uint32_t tmask; /* Type mask for next identifier. */ uint32_t mode; /* C parser mode. */ uint8_t packstack[CPARSE_MAX_PACKSTACK]; /* Stack for pack pragmas. */ uint8_t curpack; /* Current position in pack pragma stack. */ } CPState; LJ_FUNC int lj_cparse(CPState *cp); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/Makefile.dep0000664000000000000000000003267112202141143022576 0ustar rootrootlib_aux.o: lib_aux.c lua.h luaconf.h lauxlib.h lj_obj.h lj_def.h \ lj_arch.h lj_err.h lj_errmsg.h lj_state.h lj_trace.h lj_jit.h lj_ir.h \ lj_dispatch.h lj_bc.h lj_traceerr.h lj_lib.h lj_alloc.h lib_base.o: lib_base.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_debug.h lj_str.h \ lj_tab.h lj_meta.h lj_state.h lj_ctype.h lj_cconv.h lj_bc.h lj_ff.h \ lj_ffdef.h lj_dispatch.h lj_jit.h lj_ir.h lj_char.h lj_strscan.h \ lj_lib.h lj_libdef.h lib_bit.o: lib_bit.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ lj_arch.h lj_err.h lj_errmsg.h lj_str.h lj_lib.h lj_libdef.h lib_debug.o: lib_debug.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_debug.h lj_lib.h \ lj_libdef.h lib_ffi.o: lib_ffi.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_meta.h \ lj_ctype.h lj_cparse.h lj_cdata.h lj_cconv.h lj_carith.h lj_ccall.h \ lj_ccallback.h lj_clib.h lj_ff.h lj_ffdef.h lj_lib.h lj_libdef.h lib_init.o: lib_init.c lua.h luaconf.h lauxlib.h lualib.h lj_arch.h lib_io.o: lib_io.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ lj_arch.h lj_err.h lj_errmsg.h lj_str.h lj_state.h lj_ff.h lj_ffdef.h \ lj_lib.h lj_libdef.h lib_jit.o: lib_jit.c lua.h luaconf.h lauxlib.h lualib.h lj_arch.h \ lj_obj.h lj_def.h lj_err.h lj_errmsg.h lj_debug.h lj_str.h lj_tab.h \ lj_bc.h lj_ir.h lj_jit.h lj_ircall.h lj_iropt.h lj_target.h \ lj_target_*.h lj_dispatch.h lj_vm.h lj_vmevent.h lj_lib.h luajit.h \ lj_libdef.h lib_math.o: lib_math.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ lj_def.h lj_arch.h lj_lib.h lj_vm.h lj_libdef.h lib_os.o: lib_os.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h lj_def.h \ lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lj_libdef.h lib_package.o: lib_package.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ lj_def.h lj_arch.h lj_err.h lj_errmsg.h lj_lib.h lib_string.o: lib_string.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h \ lj_meta.h lj_state.h lj_ff.h lj_ffdef.h lj_bcdump.h lj_lex.h lj_char.h \ lj_lib.h lj_libdef.h lib_table.o: lib_table.c lua.h luaconf.h lauxlib.h lualib.h lj_obj.h \ lj_def.h lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_tab.h lj_lib.h \ lj_libdef.h lj_alloc.o: lj_alloc.c lj_def.h lua.h luaconf.h lj_arch.h lj_alloc.h lj_api.o: lj_api.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_err.h lj_errmsg.h lj_debug.h lj_str.h lj_tab.h lj_func.h lj_udata.h \ lj_meta.h lj_state.h lj_bc.h lj_frame.h lj_trace.h lj_jit.h lj_ir.h \ lj_dispatch.h lj_traceerr.h lj_vm.h lj_strscan.h lj_asm.o: lj_asm.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_str.h lj_tab.h lj_frame.h lj_bc.h lj_ctype.h lj_ir.h lj_jit.h \ lj_ircall.h lj_iropt.h lj_mcode.h lj_trace.h lj_dispatch.h lj_traceerr.h \ lj_snap.h lj_asm.h lj_vm.h lj_target.h lj_target_*.h lj_emit_*.h \ lj_asm_*.h lj_bc.o: lj_bc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_bc.h \ lj_bcdef.h lj_bcread.o: lj_bcread.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_bc.h lj_ctype.h \ lj_cdata.h lualib.h lj_lex.h lj_bcdump.h lj_state.h lj_bcwrite.o: lj_bcwrite.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_str.h lj_bc.h lj_ctype.h lj_dispatch.h lj_jit.h lj_ir.h \ lj_bcdump.h lj_lex.h lj_err.h lj_errmsg.h lj_vm.h lj_carith.o: lj_carith.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_tab.h lj_meta.h lj_ctype.h lj_cconv.h \ lj_cdata.h lj_carith.h lj_ccall.o: lj_ccall.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_ctype.h lj_cconv.h \ lj_cdata.h lj_ccall.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_bc.h \ lj_traceerr.h lj_ccallback.o: lj_ccallback.c lj_obj.h lua.h luaconf.h lj_def.h \ lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_tab.h lj_state.h lj_frame.h \ lj_bc.h lj_ctype.h lj_cconv.h lj_ccall.h lj_ccallback.h lj_target.h \ lj_target_*.h lj_mcode.h lj_jit.h lj_ir.h lj_trace.h lj_dispatch.h \ lj_traceerr.h lj_vm.h lj_cconv.o: lj_cconv.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_err.h lj_errmsg.h lj_tab.h lj_ctype.h lj_gc.h lj_cdata.h lj_cconv.h \ lj_ccallback.h lj_cdata.o: lj_cdata.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_ctype.h lj_cconv.h \ lj_cdata.h lj_char.o: lj_char.c lj_char.h lj_def.h lua.h luaconf.h lj_clib.o: lj_clib.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_err.h lj_errmsg.h lj_tab.h lj_str.h lj_udata.h lj_ctype.h lj_cconv.h \ lj_cdata.h lj_clib.h lj_cparse.o: lj_cparse.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_ctype.h lj_cparse.h lj_frame.h \ lj_bc.h lj_vm.h lj_char.h lj_strscan.h lj_crecord.o: lj_crecord.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_frame.h lj_bc.h lj_ctype.h \ lj_gc.h lj_cdata.h lj_cparse.h lj_cconv.h lj_clib.h lj_ccall.h lj_ff.h \ lj_ffdef.h lj_ir.h lj_jit.h lj_ircall.h lj_iropt.h lj_trace.h \ lj_dispatch.h lj_traceerr.h lj_record.h lj_ffrecord.h lj_snap.h \ lj_crecord.h lj_ctype.o: lj_ctype.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_ctype.h lj_ccallback.h lj_debug.o: lj_debug.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_err.h lj_errmsg.h lj_debug.h lj_str.h lj_tab.h lj_state.h lj_frame.h \ lj_bc.h lj_jit.h lj_ir.h lj_dispatch.o: lj_dispatch.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_err.h lj_errmsg.h lj_func.h lj_str.h lj_tab.h lj_meta.h lj_debug.h \ lj_state.h lj_frame.h lj_bc.h lj_ff.h lj_ffdef.h lj_jit.h lj_ir.h \ lj_ccallback.h lj_ctype.h lj_gc.h lj_trace.h lj_dispatch.h lj_traceerr.h \ lj_vm.h luajit.h lj_err.o: lj_err.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_err.h \ lj_errmsg.h lj_debug.h lj_str.h lj_func.h lj_state.h lj_frame.h lj_bc.h \ lj_ff.h lj_ffdef.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h \ lj_traceerr.h lj_vm.h lj_ffrecord.o: lj_ffrecord.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_frame.h lj_bc.h lj_ff.h \ lj_ffdef.h lj_ir.h lj_jit.h lj_ircall.h lj_iropt.h lj_trace.h \ lj_dispatch.h lj_traceerr.h lj_record.h lj_ffrecord.h lj_crecord.h \ lj_vm.h lj_strscan.h lj_recdef.h lj_func.o: lj_func.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_func.h lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_bc.h \ lj_traceerr.h lj_vm.h lj_gc.o: lj_gc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_udata.h lj_meta.h \ lj_state.h lj_frame.h lj_bc.h lj_ctype.h lj_cdata.h lj_trace.h lj_jit.h \ lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h lj_gdbjit.o: lj_gdbjit.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_debug.h lj_frame.h lj_bc.h lj_jit.h \ lj_ir.h lj_dispatch.h lj_ir.o: lj_ir.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_str.h lj_tab.h lj_ir.h lj_jit.h lj_ircall.h lj_iropt.h lj_trace.h \ lj_dispatch.h lj_bc.h lj_traceerr.h lj_ctype.h lj_cdata.h lj_carith.h \ lj_vm.h lj_strscan.h lj_lib.h lj_lex.o: lj_lex.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_ctype.h lj_cdata.h lualib.h \ lj_state.h lj_lex.h lj_parse.h lj_char.h lj_strscan.h lj_lib.o: lj_lib.c lauxlib.h lua.h luaconf.h lj_obj.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_bc.h \ lj_dispatch.h lj_jit.h lj_ir.h lj_vm.h lj_strscan.h lj_lib.h lj_load.o: lj_load.c lua.h luaconf.h lauxlib.h lj_obj.h lj_def.h \ lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_func.h lj_frame.h \ lj_bc.h lj_vm.h lj_lex.h lj_bcdump.h lj_parse.h lj_mcode.o: lj_mcode.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_jit.h lj_ir.h lj_mcode.h lj_trace.h lj_dispatch.h lj_bc.h \ lj_traceerr.h lj_vm.h lj_meta.o: lj_meta.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_meta.h lj_frame.h lj_bc.h \ lj_vm.h lj_strscan.h lj_obj.o: lj_obj.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_opt_dce.o: lj_opt_dce.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_ir.h lj_jit.h lj_iropt.h lj_opt_fold.o: lj_opt_fold.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_str.h lj_tab.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h lj_dispatch.h \ lj_bc.h lj_traceerr.h lj_ctype.h lj_gc.h lj_carith.h lj_vm.h \ lj_strscan.h lj_folddef.h lj_opt_loop.o: lj_opt_loop.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_err.h lj_errmsg.h lj_str.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h \ lj_dispatch.h lj_bc.h lj_traceerr.h lj_snap.h lj_vm.h lj_opt_mem.o: lj_opt_mem.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_tab.h lj_ir.h lj_jit.h lj_iropt.h lj_opt_narrow.o: lj_opt_narrow.c lj_obj.h lua.h luaconf.h lj_def.h \ lj_arch.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h lj_trace.h lj_dispatch.h \ lj_traceerr.h lj_vm.h lj_strscan.h lj_opt_sink.o: lj_opt_sink.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_ir.h lj_jit.h lj_iropt.h lj_target.h lj_target_*.h lj_opt_split.o: lj_opt_split.c lj_obj.h lua.h luaconf.h lj_def.h \ lj_arch.h lj_err.h lj_errmsg.h lj_str.h lj_ir.h lj_jit.h lj_ircall.h \ lj_iropt.h lj_vm.h lj_parse.o: lj_parse.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_debug.h lj_str.h lj_tab.h lj_func.h \ lj_state.h lj_bc.h lj_ctype.h lj_lex.h lj_parse.h lj_vm.h lj_vmevent.h lj_record.o: lj_record.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_meta.h lj_frame.h lj_bc.h \ lj_ctype.h lj_gc.h lj_ff.h lj_ffdef.h lj_ir.h lj_jit.h lj_ircall.h \ lj_iropt.h lj_trace.h lj_dispatch.h lj_traceerr.h lj_record.h \ lj_ffrecord.h lj_snap.h lj_vm.h lj_snap.o: lj_snap.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_tab.h lj_state.h lj_frame.h lj_bc.h lj_ir.h lj_jit.h lj_iropt.h \ lj_trace.h lj_dispatch.h lj_traceerr.h lj_snap.h lj_target.h \ lj_target_*.h lj_ctype.h lj_cdata.h lj_state.o: lj_state.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h lj_meta.h \ lj_state.h lj_frame.h lj_bc.h lj_ctype.h lj_trace.h lj_jit.h lj_ir.h \ lj_dispatch.h lj_traceerr.h lj_vm.h lj_lex.h lj_alloc.h lj_str.o: lj_str.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_err.h lj_errmsg.h lj_str.h lj_state.h lj_char.h lj_strscan.o: lj_strscan.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_char.h lj_strscan.h lj_tab.o: lj_tab.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \ lj_err.h lj_errmsg.h lj_tab.h lj_trace.o: lj_trace.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_err.h lj_errmsg.h lj_debug.h lj_str.h lj_frame.h lj_bc.h \ lj_state.h lj_ir.h lj_jit.h lj_iropt.h lj_mcode.h lj_trace.h \ lj_dispatch.h lj_traceerr.h lj_snap.h lj_gdbjit.h lj_record.h lj_asm.h \ lj_vm.h lj_vmevent.h lj_target.h lj_target_*.h lj_udata.o: lj_udata.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_gc.h lj_udata.h lj_vmevent.o: lj_vmevent.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_str.h lj_tab.h lj_state.h lj_dispatch.h lj_bc.h lj_jit.h lj_ir.h \ lj_vm.h lj_vmevent.h lj_vmmath.o: lj_vmmath.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h \ lj_ir.h lj_vm.h ljamalg.o: ljamalg.c lua.h luaconf.h lauxlib.h lj_gc.c lj_obj.h lj_def.h \ lj_arch.h lj_gc.h lj_err.h lj_errmsg.h lj_str.h lj_tab.h lj_func.h \ lj_udata.h lj_meta.h lj_state.h lj_frame.h lj_bc.h lj_ctype.h lj_cdata.h \ lj_trace.h lj_jit.h lj_ir.h lj_dispatch.h lj_traceerr.h lj_vm.h lj_err.c \ lj_debug.h lj_ff.h lj_ffdef.h lj_char.c lj_char.h lj_bc.c lj_bcdef.h \ lj_obj.c lj_str.c lj_tab.c lj_func.c lj_udata.c lj_meta.c lj_strscan.h \ lj_debug.c lj_state.c lj_lex.h lj_alloc.h lj_dispatch.c lj_ccallback.h \ luajit.h lj_vmevent.c lj_vmevent.h lj_vmmath.c lj_strscan.c lj_api.c \ lj_lex.c lualib.h lj_parse.h lj_parse.c lj_bcread.c lj_bcdump.h \ lj_bcwrite.c lj_load.c lj_ctype.c lj_cdata.c lj_cconv.h lj_cconv.c \ lj_ccall.c lj_ccall.h lj_ccallback.c lj_target.h lj_target_*.h \ lj_mcode.h lj_carith.c lj_carith.h lj_clib.c lj_clib.h lj_cparse.c \ lj_cparse.h lj_lib.c lj_lib.h lj_ir.c lj_ircall.h lj_iropt.h \ lj_opt_mem.c lj_opt_fold.c lj_folddef.h lj_opt_narrow.c lj_opt_dce.c \ lj_opt_loop.c lj_snap.h lj_opt_split.c lj_opt_sink.c lj_mcode.c \ lj_snap.c lj_record.c lj_record.h lj_ffrecord.h lj_crecord.c \ lj_crecord.h lj_ffrecord.c lj_recdef.h lj_asm.c lj_asm.h lj_emit_*.h \ lj_asm_*.h lj_trace.c lj_gdbjit.h lj_gdbjit.c lj_alloc.c lib_aux.c \ lib_base.c lj_libdef.h lib_math.c lib_string.c lib_table.c lib_io.c \ lib_os.c lib_package.c lib_debug.c lib_bit.c lib_jit.c lib_ffi.c \ lib_init.c luajit.o: luajit.c lua.h luaconf.h lauxlib.h lualib.h luajit.h lj_arch.h host/buildvm.o: host/buildvm.c host/buildvm.h lj_def.h lua.h luaconf.h \ lj_arch.h lj_obj.h lj_def.h lj_arch.h lj_gc.h lj_obj.h lj_bc.h lj_ir.h \ lj_ircall.h lj_ir.h lj_jit.h lj_frame.h lj_bc.h lj_dispatch.h lj_ctype.h \ lj_gc.h lj_ccall.h lj_ctype.h luajit.h \ host/buildvm_arch.h lj_traceerr.h host/buildvm_asm.o: host/buildvm_asm.c host/buildvm.h lj_def.h lua.h luaconf.h \ lj_arch.h lj_bc.h lj_def.h lj_arch.h host/buildvm_fold.o: host/buildvm_fold.c host/buildvm.h lj_def.h lua.h \ luaconf.h lj_arch.h lj_obj.h lj_def.h lj_arch.h lj_ir.h lj_obj.h host/buildvm_lib.o: host/buildvm_lib.c host/buildvm.h lj_def.h lua.h luaconf.h \ lj_arch.h lj_obj.h lj_def.h lj_arch.h lj_lib.h lj_obj.h host/buildvm_peobj.o: host/buildvm_peobj.c host/buildvm.h lj_def.h lua.h \ luaconf.h lj_arch.h lj_bc.h lj_def.h lj_arch.h host/minilua.o: host/minilua.c tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_asm.o0000664000000000000000000025532012213333062022017 0ustar rootrootELF>@@ UH勗~ ]UHLDFD9v'FID@A9t#uDA9t@9t9rԸ ]HH)HcH9tUHtPƀ@p@HHUHft-HHрz]uHрz]tHNH ʀy]uWIHdH9t;QrHҁ V ]HvUHQUHBЃ@vt HBvi6HH4~]t/6HH4~]tAAVDfDAEBuf=E‰H|]u]UHAUATSHHIIHAutbAAt*HT wE~AA ~AH9wAD9}DAD$@H[A\A]]UH HH)HH9tUHWPp@pHHUHw4HHxt HHcH9u ]HDVL EAExUHDVAtcfy^AH yyKD2FAtA9v$9v AA@t#ED9v A@tA@<UHHHJxzt| B]FutFB`sP.t LJPP~UHHFUH勗HH0HuH|HHH;(uOLJHAH)HcH9ttQH8t HDH;]UHHH+HHUHAWAVAUATSHIwD~AEuDHMI0@MII9wLWAjAFIFV zH@jPH@8uAF~jA~AƆAƆDAƆ$AƆIH AAƆIH)HcH9ttAIHx IIIM0D9H[A\A]A^A_]UHHLJLJLJLJH@HǾ@tƂ@HA@?@t fH@t HɸH@t H@t fH@tHH=u]UHHAAAAGDD@pLLAAAAL @@t3 @u HfufHPHHH]ÅuUH3b8HPHP@HP@@tHP@pH]ÉH9u UHqHcH9u8HB@BB@@rHHHHPHPH@pH H]UHH]LeHHIHHH)HcH9t&`LH*H@HHH]LeUHȃw+NB`فʉ$]UHHuUEuAAAu,A EE9uDHH@A@D@H@AAAAu!@$H@D@@%HAAAGAAED@pLLAAAAL @@t3 @u HfufHPHHH]UHAAD9u*HHFHDFD%HDFHDAAȉD]UHAHHHi]UHAȃw+NB`%¹26F<u%f]UHAȃw+NB`%¹ F<D]UHN]UHL9uI@AHI@AHAAEDD@AAD ƉHT @HH@t HH PH]Åt/UHtAЉщ3]UHHA oDAʁu8HtHAo@%H@A#DEuAE!AAu) EE9uDHH@A@DHH@AAD"DG AAEDHAAGDD@DDƉpEHMcLAAAAAGL @DɃ@t3 Au HfufHPHHHAAu@$H@AAGAAED@pLLAAAEL @HA@t2D @u HfufHHPH]UH9u(HLFLN#HNHс ]UHH]LeLmLuH IAAHHCC%DCADcPHcHD@@t6AD u LAAfufHCSHIH]LeLmLuUHHH:uW?$f]UHSHHLAHلxAxtD A@AHuAM u$A@HHھgut;A4$AT$HD@ƃA $fHȀxtxtAT$|HƃƃDA<vtHǃƃ[A\]UHH]LeLmLuH HIjAAUHHPvD0EnAD)H‰HHDHABDH1HLADHH]LeLmLuUHH]LeLmLuL}H0I~HF<u=vWAA4$HI DH<uMvAźA4$HD HgTLDnfE,AAǺA4$HAǀu DHiEKPvUAT$ vHBH HHAD$uvЉBH H"6 H]LeLmLuL}UHAUATSHHE~IFPvvvHUOu;C@ҁsLA A{Ju I$H4L 3L_AŀSB<w8$Awp"B`sA?ҍB v/v'(f  DLCЍJw3I$HPI$U܈P L=uB`r)<t%<t! v7I$U܉PI$KB`ځ LH[A\A]]UHH]LeLmLuL}H0HAAՉHL$AL$xFEt!AD$RƃLH@ƃ )AD$<uff!EuBHA<$Aƃƃ ;hDAEECAEH]LeLmLuL}UHH]LeLmH HINDx >Aw##sD HAEl$A|$tDLHDH]LeLmUHH]LeLmLuH HIAAAD,A9t<DrD DLH|H]LeLmLuUHH]LeLmH HIAźLHHH#HH9t DHA9tDHH]LeLmUHH]LeLmH HIAźLH DH%H]LeLmUHH]LeLmH HIAźLHuDH>A9u!uDH DHH]LeLmUHH]LeLmH IHF@ҁ Aŀ{CuHL3L3CHwB$~A$%f^WB`sA?P v/v'  DLXH]LeLmUHH]LeLmLuL}H0HIHFHL4@D,@A~y A~tLHAA4$HDAIcHHHHHRHH9t]AǀuXEt;E9uuDDH0EDDHE9tDDHHAF<DƁHOAljEED;HAFЍJvtn<u(A~tpAHqufvII A~trA>nL DHqutHHBHAFuvЈBEE DH+H]LeLmLuL}UHH]LeLmLuL}H0HIAA $fxqHH ȀytxtAT$LHDH-HAA4$HAA|$=uYADDH%HHHPH@ADHADDHAD$DDDHH]LeLmLuL}UHH]LeLmH HAՀ~y~uAHbAEDƁHAžHHHPH@DHHHPH@/DHDDHAUDH]LeLmUHAUATSHHIFЃv&t! vU<uMLHAŨA4$HD H6A|$yA|$th<DLHAA4$HnAv%f DHA4$H#AD$<@@t6HAD$< vSvlH@H H#sHHBHAD$uvЈB HH[A\A]]UHH]LeLmLuH HIAԾfAźLH-Aƾ HHDDf.HDD*HuDDWHDD,H~H]LeLmLuUHH]LeLmLuL}H@HVffЃD|DvtIDExtAE!Au utvyrAulL[AʼnHLUL[EA$%fEMDLqAcAuLHLèLځELj{y {AHLEȺLEAŃ  AAGt-*DEM̋ULlgA$%fEM̋UL;6EM̋UȾL#nLECOAALA v]EAAvI$@I$EGM̺LI$HPI$EAuAvADpEGM̺LYHLEȺLEC:bLr CqH]LeLmLuL}UHH]LeLmLuH H6$AľƁHALA D¾H0HH\DHHH\DHHHPH@ADHLHLHHPH@ADHH]LeLmLuUHH]LeLmLuH HAD4D4AEIHLVA8unDrroADD AA D!D!DH9HB|(u\HfǀfDfHHHRHHDdHDH]LeLmLuUHH]LeLmH !t+IA!eD!DLcH]LeLmUHH]LeLmLuH HAA։HL$AD$ȄAwsAD$<u&A$H:t uSDH<uA$H<vA$mvD;r D AD$AҁDHg!A9t;AD$@t%DS@D9u DHDLH#H]LeLmLuUHH]LeLmLuL}H@HIUFDHL4A.AAL$B`ƒ?A#2u ځUDH HHJHBAL$B`ځUDH]AŃu$HAʼnH"EvEyDHAEAt HAL$B`ځUDHD!AtDHA$DHH]LeLmLuL}UHH]LeLmLuH HIAֺAAL$B`߁B7HA$DHfH]LeLmLuUHH]LeLmLuL}H@HIUD>FЉUHDtED!fAED;}̉AE9LHt DD}̉E̺DfuHDDuHDDHSAD;}uH]LeLmLuL}UHH]LeLmLuL}H@HIU̺AE4$At$wDAƺDHrAAL$B`ځDu@HYAL$B`ځDD;H+DDHH]LeLmLuL}UHH]LeLmLuL}HPHIAUFȉMEH0H;u HLJ0:HHHT HHLD!LHAƋE9EEDfHŰuHPuSLHt EUUEAL$B`DuHhAEA|$y HAttAŀu9AL$B`ځDAADHAL$B`ځDAMHAŀu3AL$B`ځDDHAL$B`uHsU9uHHqHQkHQHiAL$B`ځDH4UDH$LHAƋE9EuH]LeLmLuL}UHH]LeLmLuL}H0HI`AA4$H|yHAHAźDfAt$H{ADDf~HDDXH A$DHH]LeLmLuL}UHAWAVAUATSHIDEAEAEADAF@IHC tb{t\IAfǂffIIHRIHDlIDcDDAAE!UH[A\A]A^A_]UHH]LeLmLuL}HPIFfEȉÃCAƃ A AƉECAEfEENʃ9uI O0EEt@uLAăZZDDUL'D9esEEȃfuuLiAMuLAǃuYIIHCHUľXLHھ LDDLEu }t UAD$<**DDL@AMĉʾWL賿vEyButuSLL.'Aǃu!AD$f%fEAA,AD$f%fEAA,AD$<UI|yuLALAIHED EDDL蟾u+IHHDXLX$IHDXL2HUȾ LDUľL'DUDLUDLmuLAD$<DDLͽAD$B`r<tD DLXCAAD$vuA#uADغuLDLeB`sUÃ}uAD$uUL'uL_ځcL\Ã}t#uL$ھL'ULB`H]LeLmLuL}UHAWAVAUATSHHA DAfAA!AED4HDDAAE!HHB@H9vdqHH0D@@-$DH=H;sHƸHECDAE!AED4H DDAAE!HHB@H9vdqHH0D@@-$DH=H;sHHECH[A\A]A^A_]UHH]LeLmLuH IHIՋB%fKx !LKy {CЃ wyDsAAE tWx2ѸA $A $fnL芹Et[EL蕻?HL6-<w;HLH]LeLmLuUHAVAUATSHHDAAAED4HHHB@H9vdqHH0D@@-$DH=H;sH͵HDDAAE!:DAAAED4HHHB@H9vdqHH0D@@-$DH=H;sHHDDAAE!:H[A\A]A^]UHAWAVAUATSH8HIIDnH6HthHEAD$ tHHPHUHPH@EYMAOlLmEALjAA4$HL,AEЃ w}Uă}uUDAEĉUăw8w0A}uAUHHAUH衶‹rAMx(!AMLH萷Hi< u!wHUAUDEHsA,HEHEAHHB@H9vdqHH0D@@-$DH=H;sHHIL;eEH}t EăHUH8[A\A]A^A_]UHATSHHIHHA$EEHUHEd$AHEHH[A\]UHH]LeH HAIIUVUL6HULH9H]LeUHH]LeLmH0I~HEEEHUоHH AA|$HL$AD$<uofxIAE  fA|$@yfA|DyHHD1AD)AA1A)EuAMDHYAMDH;t.HHPH@DDkHߝHHPH@DH话HDu @H@@t@@pTP@DDL@DHH@tHHD PH}t1DDH轡AMDH1Au7AMD#H AMDHAMD#H֞DD+H虜HHPH@ DHnDD3H[HHPH@DH0DD+HHHPH@DHDD3HߛAulDDHƛHHPH@ DH蛛DDH舛UDf~HoFMDHZAI>MDHkHEHH[A\A]A^A_]UHAWAVAUATSH(ItIDŽ$(IDŽ$0ADŽ$A$t ADŽ$E$EEEAI$AT@DtED9A$A4D t' EE^D ELL$I$HB@I9$vgA$qI$H0D@@-$DH=I;$sLI$EDL#I$HB@I9$vgA$qI$H0D@@-$DH=I;$sLfI$A!,}UA$UȋuLUȋuLI$HB@I9$vgA$qI$H0D@@-$DH=I;$sLxI$0A$fA$A $!ADDA4L譡DDAAD!I$HB@I9$vgA$qI$H0D@@-$DH=I;$sL苔I$H9s9Cu;u H H9w$ HH9u f=uAHcCHH9u5HCLH)HHcH9ttCHHH9wI}@AuHHP CHHPʹHHPļ C<uWHHPk HHPMR THHP貫9 C<u]HHP莫 HHPo C<u_HHPQ HHP2 A <4DsEAuFHHP.A3HP茎DQHP1x\ AHHPѓA3HP/HHVHA DvD: HPwHP:t H@HHPH@fKx DցHP͵HHP踓EtAHDHPsHP7AHLDFF-$DH=H;s HP?fHL~-HPH@ @ HPHPzHPRHXHH@HHAAAD sƀH9u AEAQx(s#AAHPg%HHHPoAD$ADžDžDHHCHD;<r EH0BH@@H)HcH9ttAAHhHH9wHQHH9uHhHhH+HG 0 && id < cts->toplj_asm.cn <= 32*2ir->o == IR_CARGlj_asm_x86.h0delta == (int8_t)delta((irr->r) & 0x80)lj_target.h(!((r) & 0x80))allow != ((RegSet)0)((ir->r) & 0x80)ir->o == IR_STRREFir->o == IR_AREFirb->op2 == IRFL_TAB_ARRAYlj_ir.h!1 || t != IRT_LIGHTUDt <= IRT_NUMofs % sizeof(Node) == 0(irkey)->o == IR_KNUM(irkey)->o == IR_KGC!(ir->op2 & 0x01)sz != 0xffffffffusz == 4 || sz == 8((ir))->o == IR_KGC(ir)->o == IR_KNUM(ir)->o == IR_KGC((intptr_t)target & 15) == 0target - p >= -128p < pemap + nent == flinks(uintptr_t)p < (uintptr_t)0x80000000(&as->ir[(ir->op1)])->o != IR_CARG(!((r) & 0x80)) && !((ir->s) != 0)group[exitno / 32] != ((void *)0)(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NIL)ir->o == IR_KINT || ir->o == IR_KGC || ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL0 || (ref >= as->T->nk && ref < as->T->nins)ir->o == IR_FLOAD || ir->o == IR_FREF(((&as->ir[(ir->op1)])))->o == IR_KGC(((((((&as->ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&as->ir[(ir->op1)])))->o == IR_KGC", "lj_asm_x86.h", 186, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&as->ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)ir->o == IR_HREF || ir->o == IR_NEWREF || ir->o == IR_UREFO || ir->o == IR_KKPTR((&as->ir[(ir->op2)]))->o == IR_KPTR || ((&as->ir[(ir->op2)]))->o == IR_KKPTR(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))))(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))((((1u<> ((IRType)((ir->t).irt & IRT_TYPE))) & 1) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))((int)((as->freeset) >> (r)) & 1)(((IRType)((irkey->t).irt & IRT_TYPE)) == IRT_NUM) || (((uint32_t)(((irkey->t)).irt & IRT_TYPE) - (uint32_t)(IRT_STR) <= (uint32_t)(IRT_UDATA-IRT_STR)))!(((IRType)((irkey->t).irt & IRT_TYPE)) == IRT_NIL)(((((((&as->ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&as->ir[(ir->op1)])))->o == IR_KGC", "lj_asm_x86.h", 1212, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&as->ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~8u)(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NUM) || ((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT))(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NUM)((t).irt & IRT_GUARD) || !(ir->op2 & 0x04)0 || !(((IRType)((t).irt & IRT_TYPE)) == IRT_INT) || (ir->op2 & (0x08|0x02))(((IRType)((t).irt & IRT_TYPE)) == IRT_NUM) || (((IRType)((t).irt & IRT_TYPE)) == IRT_INT) || (((uint32_t)(((t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))(((uint32_t)(((t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))) || (((IRType)((t).irt & IRT_TYPE)) == IRT_NUM)(down < RID_MAX_GPR) == (up < RID_MAX_GPR)!((int)((as->freeset) >> (down)) & 1) && ((int)((as->freeset) >> (up)) & 1)((IRType)((ir->t).irt & IRT_TYPE)) != st(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) && st == IRT_NUM(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32)RED ZONE OVERFLOW: %p IR %04d %02d %04d %04d !((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE)!((((IRType)((ir->t).irt & IRT_TYPE)) == IRT_FLOAT) && ((ref) < REF_BIAS))ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEWirs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTORE || irs->o == IR_XSTORE(((&((&((GG_State *)((char *)(as->J) - ((int)__builtin_offsetof (GG_State, J))))->g))->nilnode.val)->it) == (~0u))(((uint32_t)(((kt)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD)))!(((IRType)((kt).irt & IRT_TYPE)) == IRT_NIL)((((((ir))->o == IR_KGC) ? (void) (0) : __assert_fail ("((ir))->o == IR_KGC", "lj_asm.c", 997, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((ir))->gcr).gcptr32))))->gch.gct == ~(~4u)!(((IRType)((ir->t).irt & IRT_TYPE)) == IRT_NIL)(((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_STR) <= (uint32_t)(IRT_UDATA-IRT_STR)))(J->parent)>0 && (MSize)(J->parent)sizetrace(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))J->sizetrace((uint32_t)((IRType)((ir->t).irt & IRT_TYPE)) <= IRT_TRUE) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (0 && (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_I8) <= (uint32_t)(IRT_INT-IRT_I8))))!((!(((ir)->r) & 0x80)) || (((ir)->s) != 0))((((1u<> ((IRType)((ir->t).irt & IRT_TYPE))) & 1) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_INT) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U32) || (((uint32_t)(((ir->t)).irt & IRT_TYPE) - (uint32_t)(IRT_LIGHTUD) <= (uint32_t)(IRT_UDATA-IRT_LIGHTUD))) || (((IRType)((ir->t).irt & IRT_TYPE)) == IRT_U8)ir->o == IR_EQ || ir->o == IR_NE(&as->ir[(ir->op1)])->o == IR_UREFC((&as->ir[(ir->op2)]))->o == IR_KGC(ir->o == IR_SLOAD && (ir->op2 & 0x01)) || ((!1) && ir->o == IR_HIOP) || ir->o == IR_PVAL(lnk)>0 && (MSize)(lnk)J->sizetraceexitstub_addr_jmprellj_asm_patchexitlj_asm_tracecheckmclimptr2addrctype_checkasm_collectargsasm_tail_linkra_allocrefra_rematkra_evictra_restoreasm_stack_restoreirt_toitype_asm_ir=o, on 3"rwfrU%D4frra_renameasm_loop_fixupasm_hiopasm_compemit_sjccasm_fuseloadasm_fusefref  asm_fusestrrefasm_fuseahurefasm_fusearefasm_fuseabaseasm_retfra_leftasm_setupresultra_destregasm_gencallasm_swapopsasm_fpmathasm_hrefir_khashasm_hrefkasm_newrefra_releasetmpasm_urefasm_ahuvloadasm_fxloadasm_sloadasm_ahustoreasm_fxstoreasm_cnewasm_obarasm_convasm_snap_alloc1asm_head_sideasm_tail_fixupGCC: (Debian 4.7.3-4) 4.7.3zRx  AC [ <iAC d \LSC Y |AC  )JC Y AC  $AC L AC  ITC Y @GAC B `aC Y TAC O eC Q AC  %AC (AC Mt (AC  HAC  (hREC P x A (HC I q A  mAC L\ \AC W AC  $rAC m D,AC g doAC j YAC T AC M AC  5EC k AC  $rAC m $DAC T lEAC @  %AC E $AC P ^AC Y (AC X $$#AC T  L>AC Et  lAC E{ $AC P $AC T (rAC XU  bAC CZ $0AC T (X/AC X $=AC I/ (AC X 1AC l  AC E ( KC G I A H'AC E] (hVAC X9 $AC P $AC Tn $AC P $ ZAC PE $4AC P $\+AC P (AC X (AC Xc $AC P $ 'AC I $, AC T (T AC X $ $AC T  $ XAC T?  SAC P~ $ XAC T? ( AC X $H ~AC Te (p AC X ( AC X ( AC X ( AC X ( AC M (L tAC XW (x AC M $ -AC T $ AC K ( AC M  AC G  D OAC L~ $h AC P  IAC E  xAC Gl  BAC Ex  AC G $ jAC SR  @ AC J (d RAC M@ $ AC K  oAC Ee $ AC P  $hAC G\ (,E AC M3 (X AC M (AC M (1AC Pr1 .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @ap(A&,12Q@2)T0O>\0-eJzPupQ`  ( h    i&L/WHX q)z kO Ia G , ETSUl"uHQ%vM R & m \  r \ , o& Y3P ;b D 5P2Y:rdmiEx%  ^ # > -x FPj_xU<r b  / 4 M:"=Y rw$k 8'1i'e( ('(V** )++Z ,,+!y :-D@ ]0fc Z2h3'l 5Y6 [:$;X6 <S *=X(A>NX@~Z@fArBvEKF/Gt L~ N-OQ  6xT@UOLcUWJ pRWIyWxXBUXYj|YwZR \s^o^ bhhcE ". ;7 Tm ]@v`q  X  # 1  J c    |            Ey - ; z1H V g x         lj_asm.casm_stack_adjustnoconflictemit_jcc__PRETTY_FUNCTION__.5779asm_callx_flags__PRETTY_FUNCTION__.3893ptr2addr__PRETTY_FUNCTION__.5671asm_collectargs__PRETTY_FUNCTION__.6023asm_setup_call_slotsasm_hiop__PRETTY_FUNCTION__.6769emit_sjcc__PRETTY_FUNCTION__.5764asm_isk32asm_swapops__PRETTY_FUNCTION__.6659ra_releasetmp__PRETTY_FUNCTION__.5844ra_spillasm_guardcc__PRETTY_FUNCTION__.5170asm_mclimitasm_exitstub_setupra_setupemit_rremit_loadiemit_loadu64emit_call_emit_movrremit_rmroemit_gmroiemit_movmroiemit_sploademit_spstorera_saveemit_griemit_addptremit_mrmemit_gmrmiemit_rmaemit_loadnra_rematk__PRETTY_FUNCTION__.5832ra_restore__PRETTY_FUNCTION__.5852ra_evict__PRETTY_FUNCTION__.5864asm_stack_checkra_allocref__PRETTY_FUNCTION__.5911ra_alloc1asm_fusefref__PRETTY_FUNCTION__.6242field_ofsasm_fusestrref__PRETTY_FUNCTION__.6249asm_fusexrefasm_fusearef__PRETTY_FUNCTION__.6222__PRETTY_FUNCTION__.6215asm_fuseahuref__PRETTY_FUNCTION__.6234asm_retf__PRETTY_FUNCTION__.6349asm_ahustore__PRETTY_FUNCTION__.6539__PRETTY_FUNCTION__.4181asm_fxstore__PRETTY_FUNCTION__.6513asm_fuseload__PRETTY_FUNCTION__.6270asm_fuseloadmasm_x87loadra_pickra_scratchasm_phira_destra_destreg__PRETTY_FUNCTION__.5940asm_arefasm_frefasm_strrefasm_fxload__PRETTY_FUNCTION__.6494asm_hrefk__PRETTY_FUNCTION__.6448asm_uref__PRETTY_FUNCTION__.6466asm_load_lightud64asm_ahuvload__PRETTY_FUNCTION__.6526asm_tointgasm_sload__PRETTY_FUNCTION__.6547asm_tbarra_rename__PRETTY_FUNCTION__.5927asm_phi_breakra_left__PRETTY_FUNCTION__.5949asm_bitshiftasm_neg_notasm_fparithasm_min_maxasm_intarithasm_tobitasm_phi_fixupasm_conv__PRETTY_FUNCTION__.6373ra_evictset__PRETTY_FUNCTION__.5649asm_setupresult__PRETTY_FUNCTION__.6318ra_evictkasm_gencall__PRETTY_FUNCTION__.6305asm_strtoasm_arith64asm_newref__PRETTY_FUNCTION__.6458asm_snewasm_tnewasm_tdupasm_tostrasm_callasm_callxasm_cnew__PRETTY_FUNCTION__.6561asm_gc_checkasm_gcstepasm_snap_alloc1__PRETTY_FUNCTION__.5969asm_snap_prepasm_href__PRETTY_FUNCTION__.6438__PRETTY_FUNCTION__.6046asm_loop__PRETTY_FUNCTION__.6811__PRETTY_FUNCTION__.6960__PRETTY_FUNCTION__.7106__PRETTY_FUNCTION__.7034__PRETTY_FUNCTION__.6794__PRETTY_FUNCTION__.6854asm_compmap__PRETTY_FUNCTION__.6751__PRETTY_FUNCTION__.6627__PRETTY_FUNCTION__.6582__PRETTY_FUNCTION__.6982__PRETTY_FUNCTION__.6834__assert_faillj_ir_modelj_trace_errlj_mcode_limiterrlj_vm_exit_handlerlj_ir_emitlj_ir_k64_findstderrfprintflj_ir_callinfolj_ctype_sizelj_asm_patchexitlj_mcode_patchlj_mcode_synclj_asm_tracelj_ir_growtoplj_mcode_reservelj_snap_regspmaplj_vm_floor_sselj_vm_ceil_sselj_vm_trunc_sselj_vm_pow_sselj_vm_exp_x87lj_vm_exp2_x87lj_vm_powi_sselj_trace_err_infolj_vm_exit_interp MW  K MU &Z 1_ M   M I R" M, I1 \6 M I (p MOz m z Ma  |= MG mL Qb  MU I P MH  x MW # (r  MW   M I PW Ma If k M I   M* I/ 4 M I  M I 8C MHM R xW M I  Mx m  h M M m b Ml mq v M m  e Mo mt y M m  M m ] Mg ml qV! M`! me! Xj!! M! &! .!! M! &! E!# M.# M8# m=# zB#r# M|# m# (#$ M$ m!$ &$% Mk)% m.% 3%;))* M* I* H*7- M- My- m- (-. M@. m. R.n/ M@x/ m}/ p// M@/ m/ j// M/ &/ .// M/ &/ E// M@0 m 0 080 M@B0 mG0 L0p0 Mz0 &0 .00 M0 &0 E0(1 Mc21 m71 <1I1 McS1 mX1 H]13 Ml3 m3 @34 Ml4 m4 X 425 M<5 &A5 .F5P5 MZ5 &_5 Ed56 M6 m6 66 M6 m6 66 M7 m7  7@8 MJ8 mO8 h T8&9 M09 m59 0 :99 M9 &9 .99 M9 &9 E9; M6; I; ;< M6< I< <<= M= I= =FG MG mG 8 GwH/I M9I m>I h CI=JcJ`K MjK moK tKLM  SM]MbM M~lM IqM zvM"N  )N3N8N M~BN IGN zLNsO M}O mO H OEP  LPVP[P M~eP IjP zoP(Q  /Q9Q>Q M~HQ IMQ zRQR M R mR HR-S M 7S mw ICw zHww M@w mw w x M@x mx " xMx M@Wx m\x "ax y MWy y yoyy MHy y xyy MWz  z z M~H IM zR M m <.   M~ˇ IЇ zՇ M- M7 m< xA M  MX' m, 1z MX m ( ؘ Mݘ 6 M#@ mE zJO M#Y m^ zc= , M6 m; P@w  M% m* x/^ϟ  ֟ M~ I z M I /  6@E M~O IT zYƤ  ͤפܤ M~ I zI  PZ_ M~i In zs:  AKP M~Z I_ zdçe  lv{ M~ I z M m  ' 7 MWA F K-#F#F#F# F#(F#0F#8F#@F#HF#P&#X#`#h#p#x#l-L---;-E-Ѐ (08@PHPPPXP`Phpxe (ր0ր8ր@HրPXր`hpxeeeeeeրe~ (08@HPX`hspxBB EtBBBBBBBBBB/H _(x08@ÐHܐPX`h"pexԚӔ)f{ƛڛ*>RR R(f0f8z@RHPX`hpxʜޜܞ   1bܘnn n(0"8<@˙ @ `k$Dd"Qv,LlM  &   ( H\ h  P b  2(:Hpi(PpjU<4\ :"w$8'i' e(L(l(**)++8,`,-0Z2 h30 5X Y6 [: ; < *= >L X@t @ A B vE$ KFP /G| L N O Q$ xTH Ul cU RW W X UX YD |Yh wZ \ s^ ^b0hc\mEyztarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_parse.h0000664000000000000000000000064112202141143022327 0ustar rootroot/* ** Lua parser (source code -> bytecode). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_PARSE_H #define _LJ_PARSE_H #include "lj_obj.h" #include "lj_lex.h" LJ_FUNC GCproto *lj_parse(LexState *ls); LJ_FUNC GCstr *lj_parse_keepstr(LexState *ls, const char *str, size_t l); #if LJ_HASFFI LJ_FUNC void lj_parse_keepcdata(LexState *ls, TValue *tv, GCcdata *cd); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_loop.c0000664000000000000000000003564312202141143023055 0ustar rootroot/* ** LOOP: Loop Optimizations. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_opt_loop_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_err.h" #include "lj_str.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" #include "lj_trace.h" #include "lj_snap.h" #include "lj_vm.h" /* Loop optimization: ** ** Traditional Loop-Invariant Code Motion (LICM) splits the instructions ** of a loop into invariant and variant instructions. The invariant ** instructions are hoisted out of the loop and only the variant ** instructions remain inside the loop body. ** ** Unfortunately LICM is mostly useless for compiling dynamic languages. ** The IR has many guards and most of the subsequent instructions are ** control-dependent on them. The first non-hoistable guard would ** effectively prevent hoisting of all subsequent instructions. ** ** That's why we use a special form of unrolling using copy-substitution, ** combined with redundancy elimination: ** ** The recorded instruction stream is re-emitted to the compiler pipeline ** with substituted operands. The substitution table is filled with the ** refs returned by re-emitting each instruction. This can be done ** on-the-fly, because the IR is in strict SSA form, where every ref is ** defined before its use. ** ** This aproach generates two code sections, separated by the LOOP ** instruction: ** ** 1. The recorded instructions form a kind of pre-roll for the loop. It ** contains a mix of invariant and variant instructions and performs ** exactly one loop iteration (but not necessarily the 1st iteration). ** ** 2. The loop body contains only the variant instructions and performs ** all remaining loop iterations. ** ** On first sight that looks like a waste of space, because the variant ** instructions are present twice. But the key insight is that the ** pre-roll honors the control-dependencies for *both* the pre-roll itself ** *and* the loop body! ** ** It also means one doesn't have to explicitly model control-dependencies ** (which, BTW, wouldn't help LICM much). And it's much easier to ** integrate sparse snapshotting with this approach. ** ** One of the nicest aspects of this approach is that all of the ** optimizations of the compiler pipeline (FOLD, CSE, FWD, etc.) can be ** reused with only minor restrictions (e.g. one should not fold ** instructions across loop-carried dependencies). ** ** But in general all optimizations can be applied which only need to look ** backwards into the generated instruction stream. At any point in time ** during the copy-substitution process this contains both a static loop ** iteration (the pre-roll) and a dynamic one (from the to-be-copied ** instruction up to the end of the partial loop body). ** ** Since control-dependencies are implicitly kept, CSE also applies to all ** kinds of guards. The major advantage is that all invariant guards can ** be hoisted, too. ** ** Load/store forwarding works across loop iterations, too. This is ** important if loop-carried dependencies are kept in upvalues or tables. ** E.g. 'self.idx = self.idx + 1' deep down in some OO-style method may ** become a forwarded loop-recurrence after inlining. ** ** Since the IR is in SSA form, loop-carried dependencies have to be ** modeled with PHI instructions. The potential candidates for PHIs are ** collected on-the-fly during copy-substitution. After eliminating the ** redundant ones, PHI instructions are emitted *below* the loop body. ** ** Note that this departure from traditional SSA form doesn't change the ** semantics of the PHI instructions themselves. But it greatly simplifies ** on-the-fly generation of the IR and the machine code. */ /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) /* Emit raw IR without passing through optimizations. */ #define emitir_raw(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_ir_emit(J)) /* -- PHI elimination ----------------------------------------------------- */ /* Emit or eliminate collected PHIs. */ static void loop_emit_phi(jit_State *J, IRRef1 *subst, IRRef1 *phi, IRRef nphi, SnapNo onsnap) { int passx = 0; IRRef i, nslots; IRRef invar = J->chain[IR_LOOP]; /* Pass #1: mark redundant and potentially redundant PHIs. */ for (i = 0; i < nphi; i++) { IRRef lref = phi[i]; IRRef rref = subst[lref]; if (lref == rref || rref == REF_DROP) { /* Invariants are redundant. */ irt_setmark(IR(lref)->t); } else if (!(IR(rref)->op1 == lref || IR(rref)->op2 == lref)) { /* Quick check for simple recurrences failed, need pass2. */ irt_setmark(IR(lref)->t); passx = 1; } } /* Pass #2: traverse variant part and clear marks of non-redundant PHIs. */ if (passx) { SnapNo s; for (i = J->cur.nins-1; i > invar; i--) { IRIns *ir = IR(i); if (!irref_isk(ir->op2)) irt_clearmark(IR(ir->op2)->t); if (!irref_isk(ir->op1)) { irt_clearmark(IR(ir->op1)->t); if (ir->op1 < invar && ir->o >= IR_CALLN && ir->o <= IR_CARG) { /* ORDER IR */ ir = IR(ir->op1); while (ir->o == IR_CARG) { if (!irref_isk(ir->op2)) irt_clearmark(IR(ir->op2)->t); if (irref_isk(ir->op1)) break; ir = IR(ir->op1); irt_clearmark(ir->t); } } } } for (s = J->cur.nsnap-1; s >= onsnap; s--) { SnapShot *snap = &J->cur.snap[s]; SnapEntry *map = &J->cur.snapmap[snap->mapofs]; MSize n, nent = snap->nent; for (n = 0; n < nent; n++) { IRRef ref = snap_ref(map[n]); if (!irref_isk(ref)) irt_clearmark(IR(ref)->t); } } } /* Pass #3: add PHIs for variant slots without a corresponding SLOAD. */ nslots = J->baseslot+J->maxslot; for (i = 1; i < nslots; i++) { IRRef ref = tref_ref(J->slot[i]); while (!irref_isk(ref) && ref != subst[ref]) { IRIns *ir = IR(ref); irt_clearmark(ir->t); /* Unmark potential uses, too. */ if (irt_isphi(ir->t) || irt_ispri(ir->t)) break; irt_setphi(ir->t); if (nphi >= LJ_MAX_PHI) lj_trace_err(J, LJ_TRERR_PHIOV); phi[nphi++] = (IRRef1)ref; ref = subst[ref]; if (ref > invar) break; } } /* Pass #4: propagate non-redundant PHIs. */ while (passx) { passx = 0; for (i = 0; i < nphi; i++) { IRRef lref = phi[i]; IRIns *ir = IR(lref); if (!irt_ismarked(ir->t)) { /* Propagate only from unmarked PHIs. */ IRRef rref = subst[lref]; if (lref == rref) { /* Mark redundant PHI. */ irt_setmark(ir->t); } else { IRIns *irr = IR(rref); if (irt_ismarked(irr->t)) { /* Right ref points to other PHI? */ irt_clearmark(irr->t); /* Mark that PHI as non-redundant. */ passx = 1; /* Retry. */ } } } } } /* Pass #5: emit PHI instructions or eliminate PHIs. */ for (i = 0; i < nphi; i++) { IRRef lref = phi[i]; IRIns *ir = IR(lref); if (!irt_ismarked(ir->t)) { /* Emit PHI if not marked. */ IRRef rref = subst[lref]; if (rref > invar) irt_setphi(IR(rref)->t); emitir_raw(IRT(IR_PHI, irt_type(ir->t)), lref, rref); } else { /* Otherwise eliminate PHI. */ irt_clearmark(ir->t); irt_clearphi(ir->t); } } } /* -- Loop unrolling using copy-substitution ------------------------------ */ /* Copy-substitute snapshot. */ static void loop_subst_snap(jit_State *J, SnapShot *osnap, SnapEntry *loopmap, IRRef1 *subst) { SnapEntry *nmap, *omap = &J->cur.snapmap[osnap->mapofs]; SnapEntry *nextmap = &J->cur.snapmap[snap_nextofs(&J->cur, osnap)]; MSize nmapofs; MSize on, ln, nn, onent = osnap->nent; BCReg nslots = osnap->nslots; SnapShot *snap = &J->cur.snap[J->cur.nsnap]; if (irt_isguard(J->guardemit)) { /* Guard inbetween? */ nmapofs = J->cur.nsnapmap; J->cur.nsnap++; /* Add new snapshot. */ } else { /* Otherwise overwrite previous snapshot. */ snap--; nmapofs = snap->mapofs; } J->guardemit.irt = 0; /* Setup new snapshot. */ snap->mapofs = (uint16_t)nmapofs; snap->ref = (IRRef1)J->cur.nins; snap->nslots = nslots; snap->topslot = osnap->topslot; snap->count = 0; nmap = &J->cur.snapmap[nmapofs]; /* Substitute snapshot slots. */ on = ln = nn = 0; while (on < onent) { SnapEntry osn = omap[on], lsn = loopmap[ln]; if (snap_slot(lsn) < snap_slot(osn)) { /* Copy slot from loop map. */ nmap[nn++] = lsn; ln++; } else { /* Copy substituted slot from snapshot map. */ if (snap_slot(lsn) == snap_slot(osn)) ln++; /* Shadowed loop slot. */ if (!irref_isk(snap_ref(osn))) osn = snap_setref(osn, subst[snap_ref(osn)]); nmap[nn++] = osn; on++; } } while (snap_slot(loopmap[ln]) < nslots) /* Copy remaining loop slots. */ nmap[nn++] = loopmap[ln++]; snap->nent = (uint8_t)nn; omap += onent; nmap += nn; while (omap < nextmap) /* Copy PC + frame links. */ *nmap++ = *omap++; J->cur.nsnapmap = (uint16_t)(nmap - J->cur.snapmap); } /* Unroll loop. */ static void loop_unroll(jit_State *J) { IRRef1 phi[LJ_MAX_PHI]; uint32_t nphi = 0; IRRef1 *subst; SnapNo onsnap; SnapShot *osnap, *loopsnap; SnapEntry *loopmap, *psentinel; IRRef ins, invar; /* Use temp buffer for substitution table. ** Only non-constant refs in [REF_BIAS,invar) are valid indexes. ** Caveat: don't call into the VM or run the GC or the buffer may be gone. */ invar = J->cur.nins; subst = (IRRef1 *)lj_str_needbuf(J->L, &G(J->L)->tmpbuf, (invar-REF_BIAS)*sizeof(IRRef1)) - REF_BIAS; subst[REF_BASE] = REF_BASE; /* LOOP separates the pre-roll from the loop body. */ emitir_raw(IRTG(IR_LOOP, IRT_NIL), 0, 0); /* Grow snapshot buffer and map for copy-substituted snapshots. ** Need up to twice the number of snapshots minus #0 and loop snapshot. ** Need up to twice the number of entries plus fallback substitutions ** from the loop snapshot entries for each new snapshot. ** Caveat: both calls may reallocate J->cur.snap and J->cur.snapmap! */ onsnap = J->cur.nsnap; lj_snap_grow_buf(J, 2*onsnap-2); lj_snap_grow_map(J, J->cur.nsnapmap*2+(onsnap-2)*J->cur.snap[onsnap-1].nent); /* The loop snapshot is used for fallback substitutions. */ loopsnap = &J->cur.snap[onsnap-1]; loopmap = &J->cur.snapmap[loopsnap->mapofs]; /* The PC of snapshot #0 and the loop snapshot must match. */ psentinel = &loopmap[loopsnap->nent]; lua_assert(*psentinel == J->cur.snapmap[J->cur.snap[0].nent]); *psentinel = SNAP(255, 0, 0); /* Replace PC with temporary sentinel. */ /* Start substitution with snapshot #1 (#0 is empty for root traces). */ osnap = &J->cur.snap[1]; /* Copy and substitute all recorded instructions and snapshots. */ for (ins = REF_FIRST; ins < invar; ins++) { IRIns *ir; IRRef op1, op2; if (ins >= osnap->ref) /* Instruction belongs to next snapshot? */ loop_subst_snap(J, osnap++, loopmap, subst); /* Copy-substitute it. */ /* Substitute instruction operands. */ ir = IR(ins); op1 = ir->op1; if (!irref_isk(op1)) op1 = subst[op1]; op2 = ir->op2; if (!irref_isk(op2)) op2 = subst[op2]; if (irm_kind(lj_ir_mode[ir->o]) == IRM_N && op1 == ir->op1 && op2 == ir->op2) { /* Regular invariant ins? */ subst[ins] = (IRRef1)ins; /* Shortcut. */ } else { /* Re-emit substituted instruction to the FOLD/CSE/etc. pipeline. */ IRType1 t = ir->t; /* Get this first, since emitir may invalidate ir. */ IRRef ref = tref_ref(emitir(ir->ot & ~IRT_ISPHI, op1, op2)); subst[ins] = (IRRef1)ref; if (ref != ins) { IRIns *irr = IR(ref); if (ref < invar) { /* Loop-carried dependency? */ /* Potential PHI? */ if (!irref_isk(ref) && !irt_isphi(irr->t) && !irt_ispri(irr->t)) { irt_setphi(irr->t); if (nphi >= LJ_MAX_PHI) lj_trace_err(J, LJ_TRERR_PHIOV); phi[nphi++] = (IRRef1)ref; } /* Check all loop-carried dependencies for type instability. */ if (!irt_sametype(t, irr->t)) { if (irt_isinteger(t) && irt_isinteger(irr->t)) continue; else if (irt_isnum(t) && irt_isinteger(irr->t)) /* Fix int->num. */ ref = tref_ref(emitir(IRTN(IR_CONV), ref, IRCONV_NUM_INT)); else if (irt_isnum(irr->t) && irt_isinteger(t)) /* Fix num->int. */ ref = tref_ref(emitir(IRTGI(IR_CONV), ref, IRCONV_INT_NUM|IRCONV_CHECK)); else lj_trace_err(J, LJ_TRERR_TYPEINS); subst[ins] = (IRRef1)ref; irr = IR(ref); goto phiconv; } } else if (ref != REF_DROP && irr->o == IR_CONV && ref > invar && irr->op1 < invar) { /* May need an extra PHI for a CONV. */ ref = irr->op1; irr = IR(ref); phiconv: if (ref < invar && !irref_isk(ref) && !irt_isphi(irr->t)) { irt_setphi(irr->t); if (nphi >= LJ_MAX_PHI) lj_trace_err(J, LJ_TRERR_PHIOV); phi[nphi++] = (IRRef1)ref; } } } } } if (!irt_isguard(J->guardemit)) /* Drop redundant snapshot. */ J->cur.nsnapmap = (uint16_t)J->cur.snap[--J->cur.nsnap].mapofs; lua_assert(J->cur.nsnapmap <= J->sizesnapmap); *psentinel = J->cur.snapmap[J->cur.snap[0].nent]; /* Restore PC. */ loop_emit_phi(J, subst, phi, nphi, onsnap); } /* Undo any partial changes made by the loop optimization. */ static void loop_undo(jit_State *J, IRRef ins, SnapNo nsnap, MSize nsnapmap) { ptrdiff_t i; SnapShot *snap = &J->cur.snap[nsnap-1]; SnapEntry *map = J->cur.snapmap; map[snap->mapofs + snap->nent] = map[J->cur.snap[0].nent]; /* Restore PC. */ J->cur.nsnapmap = (uint16_t)nsnapmap; J->cur.nsnap = nsnap; J->guardemit.irt = 0; lj_ir_rollback(J, ins); for (i = 0; i < BPROP_SLOTS; i++) { /* Remove backprop. cache entries. */ BPropEntry *bp = &J->bpropcache[i]; if (bp->val >= ins) bp->key = 0; } for (ins--; ins >= REF_FIRST; ins--) { /* Remove flags. */ IRIns *ir = IR(ins); irt_clearphi(ir->t); irt_clearmark(ir->t); } } /* Protected callback for loop optimization. */ static TValue *cploop_opt(lua_State *L, lua_CFunction dummy, void *ud) { UNUSED(L); UNUSED(dummy); loop_unroll((jit_State *)ud); return NULL; } /* Loop optimization. */ int lj_opt_loop(jit_State *J) { IRRef nins = J->cur.nins; SnapNo nsnap = J->cur.nsnap; MSize nsnapmap = J->cur.nsnapmap; int errcode = lj_vm_cpcall(J->L, NULL, J, cploop_opt); if (LJ_UNLIKELY(errcode)) { lua_State *L = J->L; if (errcode == LUA_ERRRUN && tvisnumber(L->top-1)) { /* Trace error? */ int32_t e = numberVint(L->top-1); switch ((TraceError)e) { case LJ_TRERR_TYPEINS: /* Type instability. */ case LJ_TRERR_GFAIL: /* Guard would always fail. */ /* Unrolling via recording fixes many cases, e.g. a flipped boolean. */ if (--J->instunroll < 0) /* But do not unroll forever. */ break; L->top--; /* Remove error object. */ loop_undo(J, nins, nsnap, nsnapmap); return 1; /* Loop optimization failed, continue recording. */ default: break; } } lj_err_throw(L, errcode); /* Propagate all other errors. */ } return 0; /* Loop optimization is ok. */ } #undef IR #undef emitir #undef emitir_raw #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bcread.c0000664000000000000000000003214412202141143022433 0ustar rootroot/* ** Bytecode reader. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_bcread_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_bc.h" #if LJ_HASFFI #include "lj_ctype.h" #include "lj_cdata.h" #include "lualib.h" #endif #include "lj_lex.h" #include "lj_bcdump.h" #include "lj_state.h" /* Reuse some lexer fields for our own purposes. */ #define bcread_flags(ls) ls->level #define bcread_swap(ls) \ ((bcread_flags(ls) & BCDUMP_F_BE) != LJ_BE*BCDUMP_F_BE) #define bcread_oldtop(L, ls) restorestack(L, ls->lastline) #define bcread_savetop(L, ls, top) \ ls->lastline = (BCLine)savestack(L, (top)) /* -- Input buffer handling ----------------------------------------------- */ /* Throw reader error. */ static LJ_NOINLINE void bcread_error(LexState *ls, ErrMsg em) { lua_State *L = ls->L; const char *name = ls->chunkarg; if (*name == BCDUMP_HEAD1) name = "(binary)"; else if (*name == '@' || *name == '=') name++; lj_str_pushf(L, "%s: %s", name, err2msg(em)); lj_err_throw(L, LUA_ERRSYNTAX); } /* Resize input buffer. */ static void bcread_resize(LexState *ls, MSize len) { if (ls->sb.sz < len) { MSize sz = ls->sb.sz * 2; while (len > sz) sz = sz * 2; lj_str_resizebuf(ls->L, &ls->sb, sz); /* Caveat: this may change ls->sb.buf which may affect ls->p. */ } } /* Refill buffer if needed. */ static LJ_NOINLINE void bcread_fill(LexState *ls, MSize len, int need) { lua_assert(len != 0); if (len > LJ_MAX_MEM || ls->current < 0) bcread_error(ls, LJ_ERR_BCBAD); do { const char *buf; size_t size; if (ls->n) { /* Copy remainder to buffer. */ if (ls->sb.n) { /* Move down in buffer. */ lua_assert(ls->p + ls->n == ls->sb.buf + ls->sb.n); if (ls->n != ls->sb.n) memmove(ls->sb.buf, ls->p, ls->n); } else { /* Copy from buffer provided by reader. */ bcread_resize(ls, len); memcpy(ls->sb.buf, ls->p, ls->n); } ls->p = ls->sb.buf; } ls->sb.n = ls->n; buf = ls->rfunc(ls->L, ls->rdata, &size); /* Get more data from reader. */ if (buf == NULL || size == 0) { /* EOF? */ if (need) bcread_error(ls, LJ_ERR_BCBAD); ls->current = -1; /* Only bad if we get called again. */ break; } if (ls->sb.n) { /* Append to buffer. */ MSize n = ls->sb.n + (MSize)size; bcread_resize(ls, n < len ? len : n); memcpy(ls->sb.buf + ls->sb.n, buf, size); ls->n = ls->sb.n = n; ls->p = ls->sb.buf; } else { /* Return buffer provided by reader. */ ls->n = (MSize)size; ls->p = buf; } } while (ls->n < len); } /* Need a certain number of bytes. */ static LJ_AINLINE void bcread_need(LexState *ls, MSize len) { if (LJ_UNLIKELY(ls->n < len)) bcread_fill(ls, len, 1); } /* Want to read up to a certain number of bytes, but may need less. */ static LJ_AINLINE void bcread_want(LexState *ls, MSize len) { if (LJ_UNLIKELY(ls->n < len)) bcread_fill(ls, len, 0); } #define bcread_dec(ls) check_exp(ls->n > 0, ls->n--) #define bcread_consume(ls, len) check_exp(ls->n >= (len), ls->n -= (len)) /* Return memory block from buffer. */ static uint8_t *bcread_mem(LexState *ls, MSize len) { uint8_t *p = (uint8_t *)ls->p; bcread_consume(ls, len); ls->p = (char *)p + len; return p; } /* Copy memory block from buffer. */ static void bcread_block(LexState *ls, void *q, MSize len) { memcpy(q, bcread_mem(ls, len), len); } /* Read byte from buffer. */ static LJ_AINLINE uint32_t bcread_byte(LexState *ls) { bcread_dec(ls); return (uint32_t)(uint8_t)*ls->p++; } /* Read ULEB128 value from buffer. */ static uint32_t bcread_uleb128(LexState *ls) { const uint8_t *p = (const uint8_t *)ls->p; uint32_t v = *p++; if (LJ_UNLIKELY(v >= 0x80)) { int sh = 0; v &= 0x7f; do { v |= ((*p & 0x7f) << (sh += 7)); bcread_dec(ls); } while (*p++ >= 0x80); } bcread_dec(ls); ls->p = (char *)p; return v; } /* Read top 32 bits of 33 bit ULEB128 value from buffer. */ static uint32_t bcread_uleb128_33(LexState *ls) { const uint8_t *p = (const uint8_t *)ls->p; uint32_t v = (*p++ >> 1); if (LJ_UNLIKELY(v >= 0x40)) { int sh = -1; v &= 0x3f; do { v |= ((*p & 0x7f) << (sh += 7)); bcread_dec(ls); } while (*p++ >= 0x80); } bcread_dec(ls); ls->p = (char *)p; return v; } /* -- Bytecode reader ----------------------------------------------------- */ /* Read debug info of a prototype. */ static void bcread_dbg(LexState *ls, GCproto *pt, MSize sizedbg) { void *lineinfo = (void *)proto_lineinfo(pt); bcread_block(ls, lineinfo, sizedbg); /* Swap lineinfo if the endianess differs. */ if (bcread_swap(ls) && pt->numline >= 256) { MSize i, n = pt->sizebc-1; if (pt->numline < 65536) { uint16_t *p = (uint16_t *)lineinfo; for (i = 0; i < n; i++) p[i] = (uint16_t)((p[i] >> 8)|(p[i] << 8)); } else { uint32_t *p = (uint32_t *)lineinfo; for (i = 0; i < n; i++) p[i] = lj_bswap(p[i]); } } } /* Find pointer to varinfo. */ static const void *bcread_varinfo(GCproto *pt) { const uint8_t *p = proto_uvinfo(pt); MSize n = pt->sizeuv; if (n) while (*p++ || --n) ; return p; } /* Read a single constant key/value of a template table. */ static void bcread_ktabk(LexState *ls, TValue *o) { MSize tp = bcread_uleb128(ls); if (tp >= BCDUMP_KTAB_STR) { MSize len = tp - BCDUMP_KTAB_STR; const char *p = (const char *)bcread_mem(ls, len); setstrV(ls->L, o, lj_str_new(ls->L, p, len)); } else if (tp == BCDUMP_KTAB_INT) { setintV(o, (int32_t)bcread_uleb128(ls)); } else if (tp == BCDUMP_KTAB_NUM) { o->u32.lo = bcread_uleb128(ls); o->u32.hi = bcread_uleb128(ls); } else { lua_assert(tp <= BCDUMP_KTAB_TRUE); setitype(o, ~tp); } } /* Read a template table. */ static GCtab *bcread_ktab(LexState *ls) { MSize narray = bcread_uleb128(ls); MSize nhash = bcread_uleb128(ls); GCtab *t = lj_tab_new(ls->L, narray, hsize2hbits(nhash)); if (narray) { /* Read array entries. */ MSize i; TValue *o = tvref(t->array); for (i = 0; i < narray; i++, o++) bcread_ktabk(ls, o); } if (nhash) { /* Read hash entries. */ MSize i; for (i = 0; i < nhash; i++) { TValue key; bcread_ktabk(ls, &key); lua_assert(!tvisnil(&key)); bcread_ktabk(ls, lj_tab_set(ls->L, t, &key)); } } return t; } /* Read GC constants of a prototype. */ static void bcread_kgc(LexState *ls, GCproto *pt, MSize sizekgc) { MSize i; GCRef *kr = mref(pt->k, GCRef) - (ptrdiff_t)sizekgc; for (i = 0; i < sizekgc; i++, kr++) { MSize tp = bcread_uleb128(ls); if (tp >= BCDUMP_KGC_STR) { MSize len = tp - BCDUMP_KGC_STR; const char *p = (const char *)bcread_mem(ls, len); setgcref(*kr, obj2gco(lj_str_new(ls->L, p, len))); } else if (tp == BCDUMP_KGC_TAB) { setgcref(*kr, obj2gco(bcread_ktab(ls))); #if LJ_HASFFI } else if (tp != BCDUMP_KGC_CHILD) { CTypeID id = tp == BCDUMP_KGC_COMPLEX ? CTID_COMPLEX_DOUBLE : tp == BCDUMP_KGC_I64 ? CTID_INT64 : CTID_UINT64; CTSize sz = tp == BCDUMP_KGC_COMPLEX ? 16 : 8; GCcdata *cd = lj_cdata_new_(ls->L, id, sz); TValue *p = (TValue *)cdataptr(cd); setgcref(*kr, obj2gco(cd)); p[0].u32.lo = bcread_uleb128(ls); p[0].u32.hi = bcread_uleb128(ls); if (tp == BCDUMP_KGC_COMPLEX) { p[1].u32.lo = bcread_uleb128(ls); p[1].u32.hi = bcread_uleb128(ls); } #endif } else { lua_State *L = ls->L; lua_assert(tp == BCDUMP_KGC_CHILD); if (L->top <= bcread_oldtop(L, ls)) /* Stack underflow? */ bcread_error(ls, LJ_ERR_BCBAD); L->top--; setgcref(*kr, obj2gco(protoV(L->top))); } } } /* Read number constants of a prototype. */ static void bcread_knum(LexState *ls, GCproto *pt, MSize sizekn) { MSize i; TValue *o = mref(pt->k, TValue); for (i = 0; i < sizekn; i++, o++) { int isnum = (ls->p[0] & 1); uint32_t lo = bcread_uleb128_33(ls); if (isnum) { o->u32.lo = lo; o->u32.hi = bcread_uleb128(ls); } else { setintV(o, lo); } } } /* Read bytecode instructions. */ static void bcread_bytecode(LexState *ls, GCproto *pt, MSize sizebc) { BCIns *bc = proto_bc(pt); bc[0] = BCINS_AD((pt->flags & PROTO_VARARG) ? BC_FUNCV : BC_FUNCF, pt->framesize, 0); bcread_block(ls, bc+1, (sizebc-1)*(MSize)sizeof(BCIns)); /* Swap bytecode instructions if the endianess differs. */ if (bcread_swap(ls)) { MSize i; for (i = 1; i < sizebc; i++) bc[i] = lj_bswap(bc[i]); } } /* Read upvalue refs. */ static void bcread_uv(LexState *ls, GCproto *pt, MSize sizeuv) { if (sizeuv) { uint16_t *uv = proto_uv(pt); bcread_block(ls, uv, sizeuv*2); /* Swap upvalue refs if the endianess differs. */ if (bcread_swap(ls)) { MSize i; for (i = 0; i < sizeuv; i++) uv[i] = (uint16_t)((uv[i] >> 8)|(uv[i] << 8)); } } } /* Read a prototype. */ static GCproto *bcread_proto(LexState *ls) { GCproto *pt; MSize framesize, numparams, flags, sizeuv, sizekgc, sizekn, sizebc, sizept; MSize ofsk, ofsuv, ofsdbg; MSize sizedbg = 0; BCLine firstline = 0, numline = 0; MSize len, startn; /* Read length. */ if (ls->n > 0 && ls->p[0] == 0) { /* Shortcut EOF. */ ls->n--; ls->p++; return NULL; } bcread_want(ls, 5); len = bcread_uleb128(ls); if (!len) return NULL; /* EOF */ bcread_need(ls, len); startn = ls->n; /* Read prototype header. */ flags = bcread_byte(ls); numparams = bcread_byte(ls); framesize = bcread_byte(ls); sizeuv = bcread_byte(ls); sizekgc = bcread_uleb128(ls); sizekn = bcread_uleb128(ls); sizebc = bcread_uleb128(ls) + 1; if (!(bcread_flags(ls) & BCDUMP_F_STRIP)) { sizedbg = bcread_uleb128(ls); if (sizedbg) { firstline = bcread_uleb128(ls); numline = bcread_uleb128(ls); } } /* Calculate total size of prototype including all colocated arrays. */ sizept = (MSize)sizeof(GCproto) + sizebc*(MSize)sizeof(BCIns) + sizekgc*(MSize)sizeof(GCRef); sizept = (sizept + (MSize)sizeof(TValue)-1) & ~((MSize)sizeof(TValue)-1); ofsk = sizept; sizept += sizekn*(MSize)sizeof(TValue); ofsuv = sizept; sizept += ((sizeuv+1)&~1)*2; ofsdbg = sizept; sizept += sizedbg; /* Allocate prototype object and initialize its fields. */ pt = (GCproto *)lj_mem_newgco(ls->L, (MSize)sizept); pt->gct = ~LJ_TPROTO; pt->numparams = (uint8_t)numparams; pt->framesize = (uint8_t)framesize; pt->sizebc = sizebc; setmref(pt->k, (char *)pt + ofsk); setmref(pt->uv, (char *)pt + ofsuv); pt->sizekgc = 0; /* Set to zero until fully initialized. */ pt->sizekn = sizekn; pt->sizept = sizept; pt->sizeuv = (uint8_t)sizeuv; pt->flags = (uint8_t)flags; pt->trace = 0; setgcref(pt->chunkname, obj2gco(ls->chunkname)); /* Close potentially uninitialized gap between bc and kgc. */ *(uint32_t *)((char *)pt + ofsk - sizeof(GCRef)*(sizekgc+1)) = 0; /* Read bytecode instructions and upvalue refs. */ bcread_bytecode(ls, pt, sizebc); bcread_uv(ls, pt, sizeuv); /* Read constants. */ bcread_kgc(ls, pt, sizekgc); pt->sizekgc = sizekgc; bcread_knum(ls, pt, sizekn); /* Read and initialize debug info. */ pt->firstline = firstline; pt->numline = numline; if (sizedbg) { MSize sizeli = (sizebc-1) << (numline < 256 ? 0 : numline < 65536 ? 1 : 2); setmref(pt->lineinfo, (char *)pt + ofsdbg); setmref(pt->uvinfo, (char *)pt + ofsdbg + sizeli); bcread_dbg(ls, pt, sizedbg); setmref(pt->varinfo, bcread_varinfo(pt)); } else { setmref(pt->lineinfo, NULL); setmref(pt->uvinfo, NULL); setmref(pt->varinfo, NULL); } if (len != startn - ls->n) bcread_error(ls, LJ_ERR_BCBAD); return pt; } /* Read and check header of bytecode dump. */ static int bcread_header(LexState *ls) { uint32_t flags; bcread_want(ls, 3+5+5); if (bcread_byte(ls) != BCDUMP_HEAD2 || bcread_byte(ls) != BCDUMP_HEAD3 || bcread_byte(ls) != BCDUMP_VERSION) return 0; bcread_flags(ls) = flags = bcread_uleb128(ls); if ((flags & ~(BCDUMP_F_KNOWN)) != 0) return 0; if ((flags & BCDUMP_F_FFI)) { #if LJ_HASFFI lua_State *L = ls->L; if (!ctype_ctsG(G(L))) { ptrdiff_t oldtop = savestack(L, L->top); luaopen_ffi(L); /* Load FFI library on-demand. */ L->top = restorestack(L, oldtop); } #else return 0; #endif } if ((flags & BCDUMP_F_STRIP)) { ls->chunkname = lj_str_newz(ls->L, ls->chunkarg); } else { MSize len = bcread_uleb128(ls); bcread_need(ls, len); ls->chunkname = lj_str_new(ls->L, (const char *)bcread_mem(ls, len), len); } return 1; /* Ok. */ } /* Read a bytecode dump. */ GCproto *lj_bcread(LexState *ls) { lua_State *L = ls->L; lua_assert(ls->current == BCDUMP_HEAD1); bcread_savetop(L, ls, L->top); lj_str_resetbuf(&ls->sb); /* Check for a valid bytecode dump header. */ if (!bcread_header(ls)) bcread_error(ls, LJ_ERR_BCFMT); for (;;) { /* Process all prototypes in the bytecode dump. */ GCproto *pt = bcread_proto(ls); if (!pt) break; setprotoV(L, L->top, pt); incr_top(L); } if ((int32_t)ls->n > 0 || L->top-1 != bcread_oldtop(L, ls)) bcread_error(ls, LJ_ERR_BCBAD); /* Pop off last prototype. */ L->top--; return protoV(L->top); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_carith.h0000664000000000000000000000124212202141143022465 0ustar rootroot/* ** C data arithmetic. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CARITH_H #define _LJ_CARITH_H #include "lj_obj.h" #if LJ_HASFFI LJ_FUNC int lj_carith_op(lua_State *L, MMS mm); #if LJ_32 && LJ_HASJIT LJ_FUNC int64_t lj_carith_mul64(int64_t x, int64_t k); #endif LJ_FUNC uint64_t lj_carith_divu64(uint64_t a, uint64_t b); LJ_FUNC int64_t lj_carith_divi64(int64_t a, int64_t b); LJ_FUNC uint64_t lj_carith_modu64(uint64_t a, uint64_t b); LJ_FUNC int64_t lj_carith_modi64(int64_t a, int64_t b); LJ_FUNC uint64_t lj_carith_powu64(uint64_t x, uint64_t k); LJ_FUNC int64_t lj_carith_powi64(int64_t x, int64_t k); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_split.c0000664000000000000000000005537312202141143023241 0ustar rootroot/* ** SPLIT: Split 64 bit IR instructions into 32 bit IR instructions. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_opt_split_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT && (LJ_SOFTFP || (LJ_32 && LJ_HASFFI)) #include "lj_err.h" #include "lj_str.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_ircall.h" #include "lj_iropt.h" #include "lj_vm.h" /* SPLIT pass: ** ** This pass splits up 64 bit IR instructions into multiple 32 bit IR ** instructions. It's only active for soft-float targets or for 32 bit CPUs ** which lack native 64 bit integer operations (the FFI is currently the ** only emitter for 64 bit integer instructions). ** ** Splitting the IR in a separate pass keeps each 32 bit IR assembler ** backend simple. Only a small amount of extra functionality needs to be ** implemented. This is much easier than adding support for allocating ** register pairs to each backend (believe me, I tried). A few simple, but ** important optimizations can be performed by the SPLIT pass, which would ** be tedious to do in the backend. ** ** The basic idea is to replace each 64 bit IR instruction with its 32 bit ** equivalent plus an extra HIOP instruction. The splitted IR is not passed ** through FOLD or any other optimizations, so each HIOP is guaranteed to ** immediately follow it's counterpart. The actual functionality of HIOP is ** inferred from the previous instruction. ** ** The operands of HIOP hold the hiword input references. The output of HIOP ** is the hiword output reference, which is also used to hold the hiword ** register or spill slot information. The register allocator treats this ** instruction independently of any other instruction, which improves code ** quality compared to using fixed register pairs. ** ** It's easier to split up some instructions into two regular 32 bit ** instructions. E.g. XLOAD is split up into two XLOADs with two different ** addresses. Obviously 64 bit constants need to be split up into two 32 bit ** constants, too. Some hiword instructions can be entirely omitted, e.g. ** when zero-extending a 32 bit value to 64 bits. 64 bit arguments for calls ** are split up into two 32 bit arguments each. ** ** On soft-float targets, floating-point instructions are directly converted ** to soft-float calls by the SPLIT pass (except for comparisons and MIN/MAX). ** HIOP for number results has the type IRT_SOFTFP ("sfp" in -jdump). ** ** Here's the IR and x64 machine code for 'x.b = x.a + 1' for a struct with ** two int64_t fields: ** ** 0100 p32 ADD base +8 ** 0101 i64 XLOAD 0100 ** 0102 i64 ADD 0101 +1 ** 0103 p32 ADD base +16 ** 0104 i64 XSTORE 0103 0102 ** ** mov rax, [esi+0x8] ** add rax, +0x01 ** mov [esi+0x10], rax ** ** Here's the transformed IR and the x86 machine code after the SPLIT pass: ** ** 0100 p32 ADD base +8 ** 0101 int XLOAD 0100 ** 0102 p32 ADD base +12 ** 0103 int XLOAD 0102 ** 0104 int ADD 0101 +1 ** 0105 int HIOP 0103 +0 ** 0106 p32 ADD base +16 ** 0107 int XSTORE 0106 0104 ** 0108 int HIOP 0106 0105 ** ** mov eax, [esi+0x8] ** mov ecx, [esi+0xc] ** add eax, +0x01 ** adc ecx, +0x00 ** mov [esi+0x10], eax ** mov [esi+0x14], ecx ** ** You may notice the reassociated hiword address computation, which is ** later fused into the mov operands by the assembler. */ /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Directly emit the transformed IR without updating chains etc. */ static IRRef split_emit(jit_State *J, uint16_t ot, IRRef1 op1, IRRef1 op2) { IRRef nref = lj_ir_nextins(J); IRIns *ir = IR(nref); ir->ot = ot; ir->op1 = op1; ir->op2 = op2; return nref; } #if LJ_SOFTFP /* Emit a (checked) number to integer conversion. */ static IRRef split_num2int(jit_State *J, IRRef lo, IRRef hi, int check) { IRRef tmp, res; #if LJ_LE tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), lo, hi); #else tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), hi, lo); #endif res = split_emit(J, IRTI(IR_CALLN), tmp, IRCALL_softfp_d2i); if (check) { tmp = split_emit(J, IRTI(IR_CALLN), res, IRCALL_softfp_i2d); split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), tmp, tmp); split_emit(J, IRTGI(IR_EQ), tmp, lo); split_emit(J, IRTG(IR_HIOP, IRT_SOFTFP), tmp+1, hi); } return res; } /* Emit a CALLN with one split 64 bit argument. */ static IRRef split_call_l(jit_State *J, IRRef1 *hisubst, IRIns *oir, IRIns *ir, IRCallID id) { IRRef tmp, op1 = ir->op1; J->cur.nins--; #if LJ_LE tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), oir[op1].prev, hisubst[op1]); #else tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), hisubst[op1], oir[op1].prev); #endif ir->prev = tmp = split_emit(J, IRTI(IR_CALLN), tmp, id); return split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), tmp, tmp); } /* Emit a CALLN with one split 64 bit argument and a 32 bit argument. */ static IRRef split_call_li(jit_State *J, IRRef1 *hisubst, IRIns *oir, IRIns *ir, IRCallID id) { IRRef tmp, op1 = ir->op1, op2 = ir->op2; J->cur.nins--; #if LJ_LE tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), oir[op1].prev, hisubst[op1]); #else tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), hisubst[op1], oir[op1].prev); #endif tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), tmp, oir[op2].prev); ir->prev = tmp = split_emit(J, IRTI(IR_CALLN), tmp, id); return split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), tmp, tmp); } #endif /* Emit a CALLN with two split 64 bit arguments. */ static IRRef split_call_ll(jit_State *J, IRRef1 *hisubst, IRIns *oir, IRIns *ir, IRCallID id) { IRRef tmp, op1 = ir->op1, op2 = ir->op2; J->cur.nins--; #if LJ_LE tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), oir[op1].prev, hisubst[op1]); tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), tmp, oir[op2].prev); tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), tmp, hisubst[op2]); #else tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), hisubst[op1], oir[op1].prev); tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), tmp, hisubst[op2]); tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), tmp, oir[op2].prev); #endif ir->prev = tmp = split_emit(J, IRTI(IR_CALLN), tmp, id); return split_emit(J, IRT(IR_HIOP, (LJ_SOFTFP && irt_isnum(ir->t)) ? IRT_SOFTFP : IRT_INT), tmp, tmp); } /* Get a pointer to the other 32 bit word (LE: hiword, BE: loword). */ static IRRef split_ptr(jit_State *J, IRIns *oir, IRRef ref) { IRRef nref = oir[ref].prev; IRIns *ir = IR(nref); int32_t ofs = 4; if (ir->o == IR_KPTR) return lj_ir_kptr(J, (char *)ir_kptr(ir) + ofs); if (ir->o == IR_ADD && irref_isk(ir->op2) && !irt_isphi(oir[ref].t)) { /* Reassociate address. */ ofs += IR(ir->op2)->i; nref = ir->op1; if (ofs == 0) return nref; } return split_emit(J, IRTI(IR_ADD), nref, lj_ir_kint(J, ofs)); } /* Substitute references of a snapshot. */ static void split_subst_snap(jit_State *J, SnapShot *snap, IRIns *oir) { SnapEntry *map = &J->cur.snapmap[snap->mapofs]; MSize n, nent = snap->nent; for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; IRIns *ir = &oir[snap_ref(sn)]; if (!(LJ_SOFTFP && (sn & SNAP_SOFTFPNUM) && irref_isk(snap_ref(sn)))) map[n] = ((sn & 0xffff0000) | ir->prev); } } /* Transform the old IR to the new IR. */ static void split_ir(jit_State *J) { IRRef nins = J->cur.nins, nk = J->cur.nk; MSize irlen = nins - nk; MSize need = (irlen+1)*(sizeof(IRIns) + sizeof(IRRef1)); IRIns *oir = (IRIns *)lj_str_needbuf(J->L, &G(J->L)->tmpbuf, need); IRRef1 *hisubst; IRRef ref, snref; SnapShot *snap; /* Copy old IR to buffer. */ memcpy(oir, IR(nk), irlen*sizeof(IRIns)); /* Bias hiword substitution table and old IR. Loword kept in field prev. */ hisubst = (IRRef1 *)&oir[irlen] - nk; oir -= nk; /* Remove all IR instructions, but retain IR constants. */ J->cur.nins = REF_FIRST; J->loopref = 0; /* Process constants and fixed references. */ for (ref = nk; ref <= REF_BASE; ref++) { IRIns *ir = &oir[ref]; if ((LJ_SOFTFP && ir->o == IR_KNUM) || ir->o == IR_KINT64) { /* Split up 64 bit constant. */ TValue tv = *ir_k64(ir); ir->prev = lj_ir_kint(J, (int32_t)tv.u32.lo); hisubst[ref] = lj_ir_kint(J, (int32_t)tv.u32.hi); } else { ir->prev = ref; /* Identity substitution for loword. */ hisubst[ref] = 0; } } /* Process old IR instructions. */ snap = J->cur.snap; snref = snap->ref; for (ref = REF_FIRST; ref < nins; ref++) { IRIns *ir = &oir[ref]; IRRef nref = lj_ir_nextins(J); IRIns *nir = IR(nref); IRRef hi = 0; if (ref >= snref) { snap->ref = nref; split_subst_snap(J, snap++, oir); snref = snap < &J->cur.snap[J->cur.nsnap] ? snap->ref : ~(IRRef)0; } /* Copy-substitute old instruction to new instruction. */ nir->op1 = ir->op1 < nk ? ir->op1 : oir[ir->op1].prev; nir->op2 = ir->op2 < nk ? ir->op2 : oir[ir->op2].prev; ir->prev = nref; /* Loword substitution. */ nir->o = ir->o; nir->t.irt = ir->t.irt & ~(IRT_MARK|IRT_ISPHI); hisubst[ref] = 0; /* Split 64 bit instructions. */ #if LJ_SOFTFP if (irt_isnum(ir->t)) { nir->t.irt = IRT_INT | (nir->t.irt & IRT_GUARD); /* Turn into INT op. */ /* Note: hi ref = lo ref + 1! Required for SNAP_SOFTFPNUM logic. */ switch (ir->o) { case IR_ADD: hi = split_call_ll(J, hisubst, oir, ir, IRCALL_softfp_add); break; case IR_SUB: hi = split_call_ll(J, hisubst, oir, ir, IRCALL_softfp_sub); break; case IR_MUL: hi = split_call_ll(J, hisubst, oir, ir, IRCALL_softfp_mul); break; case IR_DIV: hi = split_call_ll(J, hisubst, oir, ir, IRCALL_softfp_div); break; case IR_POW: hi = split_call_li(J, hisubst, oir, ir, IRCALL_lj_vm_powi); break; case IR_FPMATH: /* Try to rejoin pow from EXP2, MUL and LOG2. */ if (nir->op2 == IRFPM_EXP2 && nir->op1 > J->loopref) { IRIns *irp = IR(nir->op1); if (irp->o == IR_CALLN && irp->op2 == IRCALL_softfp_mul) { IRIns *irm4 = IR(irp->op1); IRIns *irm3 = IR(irm4->op1); IRIns *irm12 = IR(irm3->op1); IRIns *irl1 = IR(irm12->op1); if (irm12->op1 > J->loopref && irl1->o == IR_CALLN && irl1->op2 == IRCALL_lj_vm_log2) { IRRef tmp = irl1->op1; /* Recycle first two args from LOG2. */ IRRef arg3 = irm3->op2, arg4 = irm4->op2; J->cur.nins--; tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), tmp, arg3); tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), tmp, arg4); ir->prev = tmp = split_emit(J, IRTI(IR_CALLN), tmp, IRCALL_pow); hi = split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), tmp, tmp); break; } } } hi = split_call_l(J, hisubst, oir, ir, IRCALL_lj_vm_floor + ir->op2); break; case IR_ATAN2: hi = split_call_ll(J, hisubst, oir, ir, IRCALL_atan2); break; case IR_LDEXP: hi = split_call_li(J, hisubst, oir, ir, IRCALL_ldexp); break; case IR_NEG: case IR_ABS: nir->o = IR_CONV; /* Pass through loword. */ nir->op2 = (IRT_INT << 5) | IRT_INT; hi = split_emit(J, IRT(ir->o == IR_NEG ? IR_BXOR : IR_BAND, IRT_SOFTFP), hisubst[ir->op1], hisubst[ir->op2]); break; case IR_SLOAD: if ((nir->op2 & IRSLOAD_CONVERT)) { /* Convert from int to number. */ nir->op2 &= ~IRSLOAD_CONVERT; ir->prev = nref = split_emit(J, IRTI(IR_CALLN), nref, IRCALL_softfp_i2d); hi = split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nref, nref); break; } /* fallthrough */ case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: case IR_STRTO: hi = split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nref, nref); break; case IR_XLOAD: { IRIns inslo = *nir; /* Save/undo the emit of the lo XLOAD. */ J->cur.nins--; hi = split_ptr(J, oir, ir->op1); /* Insert the hiref ADD. */ nref = lj_ir_nextins(J); nir = IR(nref); *nir = inslo; /* Re-emit lo XLOAD immediately before hi XLOAD. */ hi = split_emit(J, IRT(IR_XLOAD, IRT_SOFTFP), hi, ir->op2); #if LJ_LE ir->prev = nref; #else ir->prev = hi; hi = nref; #endif break; } case IR_ASTORE: case IR_HSTORE: case IR_USTORE: case IR_XSTORE: split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nir->op1, hisubst[ir->op2]); break; case IR_CONV: { /* Conversion to number. Others handled below. */ IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); UNUSED(st); #if LJ_32 && LJ_HASFFI if (st == IRT_I64 || st == IRT_U64) { hi = split_call_l(J, hisubst, oir, ir, st == IRT_I64 ? IRCALL_fp64_l2d : IRCALL_fp64_ul2d); break; } #endif lua_assert(st == IRT_INT || (LJ_32 && LJ_HASFFI && (st == IRT_U32 || st == IRT_FLOAT))); nir->o = IR_CALLN; #if LJ_32 && LJ_HASFFI nir->op2 = st == IRT_INT ? IRCALL_softfp_i2d : st == IRT_FLOAT ? IRCALL_softfp_f2d : IRCALL_softfp_ui2d; #else nir->op2 = IRCALL_softfp_i2d; #endif hi = split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nref, nref); break; } case IR_CALLN: case IR_CALLL: case IR_CALLS: case IR_CALLXS: goto split_call; case IR_PHI: if (nir->op1 == nir->op2) J->cur.nins--; /* Drop useless PHIs. */ if (hisubst[ir->op1] != hisubst[ir->op2]) split_emit(J, IRT(IR_PHI, IRT_SOFTFP), hisubst[ir->op1], hisubst[ir->op2]); break; case IR_HIOP: J->cur.nins--; /* Drop joining HIOP. */ ir->prev = nir->op1; hi = nir->op2; break; default: lua_assert(ir->o <= IR_NE || ir->o == IR_MIN || ir->o == IR_MAX); hi = split_emit(J, IRTG(IR_HIOP, IRT_SOFTFP), hisubst[ir->op1], hisubst[ir->op2]); break; } } else #endif #if LJ_32 && LJ_HASFFI if (irt_isint64(ir->t)) { IRRef hiref = hisubst[ir->op1]; nir->t.irt = IRT_INT | (nir->t.irt & IRT_GUARD); /* Turn into INT op. */ switch (ir->o) { case IR_ADD: case IR_SUB: /* Use plain op for hiword if loword cannot produce a carry/borrow. */ if (irref_isk(nir->op2) && IR(nir->op2)->i == 0) { ir->prev = nir->op1; /* Pass through loword. */ nir->op1 = hiref; nir->op2 = hisubst[ir->op2]; hi = nref; break; } /* fallthrough */ case IR_NEG: hi = split_emit(J, IRTI(IR_HIOP), hiref, hisubst[ir->op2]); break; case IR_MUL: hi = split_call_ll(J, hisubst, oir, ir, IRCALL_lj_carith_mul64); break; case IR_DIV: hi = split_call_ll(J, hisubst, oir, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_divi64 : IRCALL_lj_carith_divu64); break; case IR_MOD: hi = split_call_ll(J, hisubst, oir, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 : IRCALL_lj_carith_modu64); break; case IR_POW: hi = split_call_ll(J, hisubst, oir, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 : IRCALL_lj_carith_powu64); break; case IR_FLOAD: lua_assert(ir->op2 == IRFL_CDATA_INT64); hi = split_emit(J, IRTI(IR_FLOAD), nir->op1, IRFL_CDATA_INT64_4); #if LJ_BE ir->prev = hi; hi = nref; #endif break; case IR_XLOAD: hi = split_emit(J, IRTI(IR_XLOAD), split_ptr(J, oir, ir->op1), ir->op2); #if LJ_BE ir->prev = hi; hi = nref; #endif break; case IR_XSTORE: split_emit(J, IRTI(IR_HIOP), nir->op1, hisubst[ir->op2]); break; case IR_CONV: { /* Conversion to 64 bit integer. Others handled below. */ IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); #if LJ_SOFTFP if (st == IRT_NUM) { /* NUM to 64 bit int conv. */ hi = split_call_l(J, hisubst, oir, ir, irt_isi64(ir->t) ? IRCALL_fp64_d2l : IRCALL_fp64_d2ul); } else if (st == IRT_FLOAT) { /* FLOAT to 64 bit int conv. */ nir->o = IR_CALLN; nir->op2 = irt_isi64(ir->t) ? IRCALL_fp64_f2l : IRCALL_fp64_f2ul; hi = split_emit(J, IRTI(IR_HIOP), nref, nref); } #else if (st == IRT_NUM || st == IRT_FLOAT) { /* FP to 64 bit int conv. */ hi = split_emit(J, IRTI(IR_HIOP), nir->op1, nref); } #endif else if (st == IRT_I64 || st == IRT_U64) { /* 64/64 bit cast. */ /* Drop cast, since assembler doesn't care. */ goto fwdlo; } else if ((ir->op2 & IRCONV_SEXT)) { /* Sign-extend to 64 bit. */ IRRef k31 = lj_ir_kint(J, 31); nir = IR(nref); /* May have been reallocated. */ ir->prev = nir->op1; /* Pass through loword. */ nir->o = IR_BSAR; /* hi = bsar(lo, 31). */ nir->op2 = k31; hi = nref; } else { /* Zero-extend to 64 bit. */ hi = lj_ir_kint(J, 0); goto fwdlo; } break; } case IR_CALLXS: goto split_call; case IR_PHI: { IRRef hiref2; if ((irref_isk(nir->op1) && irref_isk(nir->op2)) || nir->op1 == nir->op2) J->cur.nins--; /* Drop useless PHIs. */ hiref2 = hisubst[ir->op2]; if (!((irref_isk(hiref) && irref_isk(hiref2)) || hiref == hiref2)) split_emit(J, IRTI(IR_PHI), hiref, hiref2); break; } case IR_HIOP: J->cur.nins--; /* Drop joining HIOP. */ ir->prev = nir->op1; hi = nir->op2; break; default: lua_assert(ir->o <= IR_NE); /* Comparisons. */ split_emit(J, IRTGI(IR_HIOP), hiref, hisubst[ir->op2]); break; } } else #endif #if LJ_SOFTFP if (ir->o == IR_SLOAD) { if ((nir->op2 & IRSLOAD_CONVERT)) { /* Convert from number to int. */ nir->op2 &= ~IRSLOAD_CONVERT; if (!(nir->op2 & IRSLOAD_TYPECHECK)) nir->t.irt = IRT_INT; /* Drop guard. */ split_emit(J, IRT(IR_HIOP, IRT_SOFTFP), nref, nref); ir->prev = split_num2int(J, nref, nref+1, irt_isguard(ir->t)); } } else if (ir->o == IR_TOBIT) { IRRef tmp, op1 = ir->op1; J->cur.nins--; #if LJ_LE tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), oir[op1].prev, hisubst[op1]); #else tmp = split_emit(J, IRT(IR_CARG, IRT_NIL), hisubst[op1], oir[op1].prev); #endif ir->prev = split_emit(J, IRTI(IR_CALLN), tmp, IRCALL_lj_vm_tobit); } else if (ir->o == IR_TOSTR) { if (hisubst[ir->op1]) { if (irref_isk(ir->op1)) nir->op1 = ir->op1; else split_emit(J, IRT(IR_HIOP, IRT_NIL), hisubst[ir->op1], nref); } } else if (ir->o == IR_HREF || ir->o == IR_NEWREF) { if (irref_isk(ir->op2) && hisubst[ir->op2]) nir->op2 = ir->op2; } else #endif if (ir->o == IR_CONV) { /* See above, too. */ IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); #if LJ_32 && LJ_HASFFI if (st == IRT_I64 || st == IRT_U64) { /* Conversion from 64 bit int. */ #if LJ_SOFTFP if (irt_isfloat(ir->t)) { split_call_l(J, hisubst, oir, ir, st == IRT_I64 ? IRCALL_fp64_l2f : IRCALL_fp64_ul2f); J->cur.nins--; /* Drop unused HIOP. */ } #else if (irt_isfp(ir->t)) { /* 64 bit integer to FP conversion. */ ir->prev = split_emit(J, IRT(IR_HIOP, irt_type(ir->t)), hisubst[ir->op1], nref); } #endif else { /* Truncate to lower 32 bits. */ fwdlo: ir->prev = nir->op1; /* Forward loword. */ /* Replace with NOP to avoid messing up the snapshot logic. */ nir->ot = IRT(IR_NOP, IRT_NIL); nir->op1 = nir->op2 = 0; } } #endif #if LJ_SOFTFP && LJ_32 && LJ_HASFFI else if (irt_isfloat(ir->t)) { if (st == IRT_NUM) { split_call_l(J, hisubst, oir, ir, IRCALL_softfp_d2f); J->cur.nins--; /* Drop unused HIOP. */ } else { nir->o = IR_CALLN; nir->op2 = st == IRT_INT ? IRCALL_softfp_i2f : IRCALL_softfp_ui2f; } } else if (st == IRT_FLOAT) { nir->o = IR_CALLN; nir->op2 = irt_isint(ir->t) ? IRCALL_softfp_f2i : IRCALL_softfp_f2ui; } else #endif #if LJ_SOFTFP if (st == IRT_NUM || (LJ_32 && LJ_HASFFI && st == IRT_FLOAT)) { if (irt_isguard(ir->t)) { lua_assert(st == IRT_NUM && irt_isint(ir->t)); J->cur.nins--; ir->prev = split_num2int(J, nir->op1, hisubst[ir->op1], 1); } else { split_call_l(J, hisubst, oir, ir, #if LJ_32 && LJ_HASFFI st == IRT_NUM ? (irt_isint(ir->t) ? IRCALL_softfp_d2i : IRCALL_softfp_d2ui) : (irt_isint(ir->t) ? IRCALL_softfp_f2i : IRCALL_softfp_f2ui) #else IRCALL_softfp_d2i #endif ); J->cur.nins--; /* Drop unused HIOP. */ } } #endif } else if (ir->o == IR_CALLXS) { IRRef hiref; split_call: hiref = hisubst[ir->op1]; if (hiref) { IROpT ot = nir->ot; IRRef op2 = nir->op2; nir->ot = IRT(IR_CARG, IRT_NIL); #if LJ_LE nir->op2 = hiref; #else nir->op2 = nir->op1; nir->op1 = hiref; #endif ir->prev = nref = split_emit(J, ot, nref, op2); } if (LJ_SOFTFP ? irt_is64(ir->t) : irt_isint64(ir->t)) hi = split_emit(J, IRT(IR_HIOP, (LJ_SOFTFP && irt_isnum(ir->t)) ? IRT_SOFTFP : IRT_INT), nref, nref); } else if (ir->o == IR_CARG) { IRRef hiref = hisubst[ir->op1]; if (hiref) { IRRef op2 = nir->op2; #if LJ_LE nir->op2 = hiref; #else nir->op2 = nir->op1; nir->op1 = hiref; #endif ir->prev = nref = split_emit(J, IRT(IR_CARG, IRT_NIL), nref, op2); nir = IR(nref); } hiref = hisubst[ir->op2]; if (hiref) { #if !LJ_TARGET_X86 int carg = 0; IRIns *cir; for (cir = IR(nir->op1); cir->o == IR_CARG; cir = IR(cir->op1)) carg++; if ((carg & 1) == 0) { /* Align 64 bit arguments. */ IRRef op2 = nir->op2; nir->op2 = REF_NIL; nref = split_emit(J, IRT(IR_CARG, IRT_NIL), nref, op2); nir = IR(nref); } #endif #if LJ_BE { IRRef tmp = nir->op2; nir->op2 = hiref; hiref = tmp; } #endif ir->prev = split_emit(J, IRT(IR_CARG, IRT_NIL), nref, hiref); } } else if (ir->o == IR_CNEWI) { if (hisubst[ir->op2]) split_emit(J, IRT(IR_HIOP, IRT_NIL), nref, hisubst[ir->op2]); } else if (ir->o == IR_LOOP) { J->loopref = nref; /* Needed by assembler. */ } hisubst[ref] = hi; /* Store hiword substitution. */ } if (snref == nins) { /* Substitution for last snapshot. */ snap->ref = J->cur.nins; split_subst_snap(J, snap, oir); } /* Add PHI marks. */ for (ref = J->cur.nins-1; ref >= REF_FIRST; ref--) { IRIns *ir = IR(ref); if (ir->o != IR_PHI) break; if (!irref_isk(ir->op1)) irt_setphi(IR(ir->op1)->t); if (ir->op2 > J->loopref) irt_setphi(IR(ir->op2)->t); } } /* Protected callback for split pass. */ static TValue *cpsplit(lua_State *L, lua_CFunction dummy, void *ud) { jit_State *J = (jit_State *)ud; split_ir(J); UNUSED(L); UNUSED(dummy); return NULL; } #if defined(LUA_USE_ASSERT) || LJ_SOFTFP /* Slow, but sure way to check whether a SPLIT pass is needed. */ static int split_needsplit(jit_State *J) { IRIns *ir, *irend; IRRef ref; for (ir = IR(REF_FIRST), irend = IR(J->cur.nins); ir < irend; ir++) if (LJ_SOFTFP ? irt_is64orfp(ir->t) : irt_isint64(ir->t)) return 1; if (LJ_SOFTFP) { for (ref = J->chain[IR_SLOAD]; ref; ref = IR(ref)->prev) if ((IR(ref)->op2 & IRSLOAD_CONVERT)) return 1; if (J->chain[IR_TOBIT]) return 1; } for (ref = J->chain[IR_CONV]; ref; ref = IR(ref)->prev) { IRType st = (IR(ref)->op2 & IRCONV_SRCMASK); if ((LJ_SOFTFP && (st == IRT_NUM || st == IRT_FLOAT)) || st == IRT_I64 || st == IRT_U64) return 1; } return 0; /* Nope. */ } #endif /* SPLIT pass. */ void lj_opt_split(jit_State *J) { #if LJ_SOFTFP if (!J->needsplit) J->needsplit = split_needsplit(J); #else lua_assert(J->needsplit >= split_needsplit(J)); /* Verify flag. */ #endif if (J->needsplit) { int errcode = lj_vm_cpcall(J->L, NULL, J, cpsplit); if (errcode) { /* Completely reset the trace to avoid inconsistent dump on abort. */ J->cur.nins = J->cur.nk = REF_BASE; J->cur.nsnap = 0; lj_err_throw(J->L, errcode); /* Propagate errors. */ } } } #undef IR #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_err.h0000664000000000000000000000273012202141143022006 0ustar rootroot/* ** Error handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_ERR_H #define _LJ_ERR_H #include #include "lj_obj.h" typedef enum { #define ERRDEF(name, msg) \ LJ_ERR_##name, LJ_ERR_##name##_ = LJ_ERR_##name + sizeof(msg)-1, #include "lj_errmsg.h" LJ_ERR__MAX } ErrMsg; LJ_DATA const char *lj_err_allmsg; #define err2msg(em) (lj_err_allmsg+(int)(em)) LJ_FUNC GCstr *lj_err_str(lua_State *L, ErrMsg em); LJ_FUNCA_NORET void LJ_FASTCALL lj_err_throw(lua_State *L, int errcode); LJ_FUNC_NORET void lj_err_mem(lua_State *L); LJ_FUNC_NORET void lj_err_run(lua_State *L); LJ_FUNC_NORET void lj_err_msg(lua_State *L, ErrMsg em); LJ_FUNC_NORET void lj_err_lex(lua_State *L, GCstr *src, const char *tok, BCLine line, ErrMsg em, va_list argp); LJ_FUNC_NORET void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm); LJ_FUNC_NORET void lj_err_comp(lua_State *L, cTValue *o1, cTValue *o2); LJ_FUNC_NORET void lj_err_optype_call(lua_State *L, TValue *o); LJ_FUNC_NORET void lj_err_callermsg(lua_State *L, const char *msg); LJ_FUNC_NORET void lj_err_callerv(lua_State *L, ErrMsg em, ...); LJ_FUNC_NORET void lj_err_caller(lua_State *L, ErrMsg em); LJ_FUNC_NORET void lj_err_arg(lua_State *L, int narg, ErrMsg em); LJ_FUNC_NORET void lj_err_argv(lua_State *L, int narg, ErrMsg em, ...); LJ_FUNC_NORET void lj_err_argtype(lua_State *L, int narg, const char *xname); LJ_FUNC_NORET void lj_err_argt(lua_State *L, int narg, int tt); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_gc.h0000664000000000000000000001146112202141143021610 0ustar rootroot/* ** Garbage collector. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_GC_H #define _LJ_GC_H #include "lj_obj.h" /* Garbage collector states. Order matters. */ enum { GCSpause, GCSpropagate, GCSatomic, GCSsweepstring, GCSsweep, GCSfinalize }; /* Bitmasks for marked field of GCobj. */ #define LJ_GC_WHITE0 0x01 #define LJ_GC_WHITE1 0x02 #define LJ_GC_BLACK 0x04 #define LJ_GC_FINALIZED 0x08 #define LJ_GC_WEAKKEY 0x08 #define LJ_GC_WEAKVAL 0x10 #define LJ_GC_CDATA_FIN 0x10 #define LJ_GC_FIXED 0x20 #define LJ_GC_SFIXED 0x40 #define LJ_GC_WHITES (LJ_GC_WHITE0 | LJ_GC_WHITE1) #define LJ_GC_COLORS (LJ_GC_WHITES | LJ_GC_BLACK) #define LJ_GC_WEAK (LJ_GC_WEAKKEY | LJ_GC_WEAKVAL) /* Macros to test and set GCobj colors. */ #define iswhite(x) ((x)->gch.marked & LJ_GC_WHITES) #define isblack(x) ((x)->gch.marked & LJ_GC_BLACK) #define isgray(x) (!((x)->gch.marked & (LJ_GC_BLACK|LJ_GC_WHITES))) #define tviswhite(x) (tvisgcv(x) && iswhite(gcV(x))) #define otherwhite(g) (g->gc.currentwhite ^ LJ_GC_WHITES) #define isdead(g, v) ((v)->gch.marked & otherwhite(g) & LJ_GC_WHITES) #define curwhite(g) ((g)->gc.currentwhite & LJ_GC_WHITES) #define newwhite(g, x) (obj2gco(x)->gch.marked = (uint8_t)curwhite(g)) #define makewhite(g, x) \ ((x)->gch.marked = ((x)->gch.marked & (uint8_t)~LJ_GC_COLORS) | curwhite(g)) #define flipwhite(x) ((x)->gch.marked ^= LJ_GC_WHITES) #define black2gray(x) ((x)->gch.marked &= (uint8_t)~LJ_GC_BLACK) #define fixstring(s) ((s)->marked |= LJ_GC_FIXED) #define markfinalized(x) ((x)->gch.marked |= LJ_GC_FINALIZED) /* Collector. */ LJ_FUNC size_t lj_gc_separateudata(global_State *g, int all); LJ_FUNC void lj_gc_finalize_udata(lua_State *L); #if LJ_HASFFI LJ_FUNC void lj_gc_finalize_cdata(lua_State *L); #else #define lj_gc_finalize_cdata(L) UNUSED(L) #endif LJ_FUNC void lj_gc_freeall(global_State *g); LJ_FUNCA int LJ_FASTCALL lj_gc_step(lua_State *L); LJ_FUNCA void LJ_FASTCALL lj_gc_step_fixtop(lua_State *L); #if LJ_HASJIT LJ_FUNC int LJ_FASTCALL lj_gc_step_jit(global_State *g, MSize steps); #endif LJ_FUNC void lj_gc_fullgc(lua_State *L); /* GC check: drive collector forward if the GC threshold has been reached. */ #define lj_gc_check(L) \ { if (LJ_UNLIKELY(G(L)->gc.total >= G(L)->gc.threshold)) \ lj_gc_step(L); } #define lj_gc_check_fixtop(L) \ { if (LJ_UNLIKELY(G(L)->gc.total >= G(L)->gc.threshold)) \ lj_gc_step_fixtop(L); } /* Write barriers. */ LJ_FUNC void lj_gc_barrierf(global_State *g, GCobj *o, GCobj *v); LJ_FUNCA void LJ_FASTCALL lj_gc_barrieruv(global_State *g, TValue *tv); LJ_FUNC void lj_gc_closeuv(global_State *g, GCupval *uv); #if LJ_HASJIT LJ_FUNC void lj_gc_barriertrace(global_State *g, uint32_t traceno); #endif /* Move the GC propagation frontier back for tables (make it gray again). */ static LJ_AINLINE void lj_gc_barrierback(global_State *g, GCtab *t) { GCobj *o = obj2gco(t); lua_assert(isblack(o) && !isdead(g, o)); lua_assert(g->gc.state != GCSfinalize && g->gc.state != GCSpause); black2gray(o); setgcrefr(t->gclist, g->gc.grayagain); setgcref(g->gc.grayagain, o); } /* Barrier for stores to table objects. TValue and GCobj variant. */ #define lj_gc_anybarriert(L, t) \ { if (LJ_UNLIKELY(isblack(obj2gco(t)))) lj_gc_barrierback(G(L), (t)); } #define lj_gc_barriert(L, t, tv) \ { if (tviswhite(tv) && isblack(obj2gco(t))) \ lj_gc_barrierback(G(L), (t)); } #define lj_gc_objbarriert(L, t, o) \ { if (iswhite(obj2gco(o)) && isblack(obj2gco(t))) \ lj_gc_barrierback(G(L), (t)); } /* Barrier for stores to any other object. TValue and GCobj variant. */ #define lj_gc_barrier(L, p, tv) \ { if (tviswhite(tv) && isblack(obj2gco(p))) \ lj_gc_barrierf(G(L), obj2gco(p), gcV(tv)); } #define lj_gc_objbarrier(L, p, o) \ { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \ lj_gc_barrierf(G(L), obj2gco(p), obj2gco(o)); } /* Allocator. */ LJ_FUNC void *lj_mem_realloc(lua_State *L, void *p, MSize osz, MSize nsz); LJ_FUNC void * LJ_FASTCALL lj_mem_newgco(lua_State *L, MSize size); LJ_FUNC void *lj_mem_grow(lua_State *L, void *p, MSize *szp, MSize lim, MSize esz); #define lj_mem_new(L, s) lj_mem_realloc(L, NULL, 0, (s)) static LJ_AINLINE void lj_mem_free(global_State *g, void *p, size_t osize) { g->gc.total -= (MSize)osize; g->allocf(g->allocd, p, osize, 0); } #define lj_mem_newvec(L, n, t) ((t *)lj_mem_new(L, (MSize)((n)*sizeof(t)))) #define lj_mem_reallocvec(L, p, on, n, t) \ ((p) = (t *)lj_mem_realloc(L, p, (on)*sizeof(t), (MSize)((n)*sizeof(t)))) #define lj_mem_growvec(L, p, n, m, t) \ ((p) = (t *)lj_mem_grow(L, (p), &(n), (m), (MSize)sizeof(t))) #define lj_mem_freevec(g, p, n, t) lj_mem_free(g, (p), (n)*sizeof(t)) #define lj_mem_newobj(L, t) ((t *)lj_mem_newgco(L, sizeof(t))) #define lj_mem_newt(L, s, t) ((t *)lj_mem_new(L, (s))) #define lj_mem_freet(g, p) lj_mem_free(g, (p), sizeof(*(p))) #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_str.c0000664000000000000000000002277012202141143022027 0ustar rootroot/* ** String handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #include #define lj_str_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_state.h" #include "lj_char.h" /* -- String interning ---------------------------------------------------- */ /* Ordered compare of strings. Assumes string data is 4-byte aligned. */ int32_t LJ_FASTCALL lj_str_cmp(GCstr *a, GCstr *b) { MSize i, n = a->len > b->len ? b->len : a->len; for (i = 0; i < n; i += 4) { /* Note: innocuous access up to end of string + 3. */ uint32_t va = *(const uint32_t *)(strdata(a)+i); uint32_t vb = *(const uint32_t *)(strdata(b)+i); if (va != vb) { #if LJ_LE va = lj_bswap(va); vb = lj_bswap(vb); #endif i -= n; if ((int32_t)i >= -3) { va >>= 32+(i<<3); vb >>= 32+(i<<3); if (va == vb) break; } return va < vb ? -1 : 1; } } return (int32_t)(a->len - b->len); } /* Fast string data comparison. Caveat: unaligned access to 1st string! */ static LJ_AINLINE int str_fastcmp(const char *a, const char *b, MSize len) { MSize i = 0; lua_assert(len > 0); lua_assert((((uintptr_t)a+len-1) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4); do { /* Note: innocuous access up to end of string + 3. */ uint32_t v = lj_getu32(a+i) ^ *(const uint32_t *)(b+i); if (v) { i -= len; #if LJ_LE return (int32_t)i >= -3 ? (v << (32+(i<<3))) : 1; #else return (int32_t)i >= -3 ? (v >> (32+(i<<3))) : 1; #endif } i += 4; } while (i < len); return 0; } /* Resize the string hash table (grow and shrink). */ void lj_str_resize(lua_State *L, MSize newmask) { global_State *g = G(L); GCRef *newhash; MSize i; if (g->gc.state == GCSsweepstring || newmask >= LJ_MAX_STRTAB-1) return; /* No resizing during GC traversal or if already too big. */ newhash = lj_mem_newvec(L, newmask+1, GCRef); memset(newhash, 0, (newmask+1)*sizeof(GCRef)); for (i = g->strmask; i != ~(MSize)0; i--) { /* Rehash old table. */ GCobj *p = gcref(g->strhash[i]); while (p) { /* Follow each hash chain and reinsert all strings. */ MSize h = gco2str(p)->hash & newmask; GCobj *next = gcnext(p); /* NOBARRIER: The string table is a GC root. */ setgcrefr(p->gch.nextgc, newhash[h]); setgcref(newhash[h], p); p = next; } } lj_mem_freevec(g, g->strhash, g->strmask+1, GCRef); g->strmask = newmask; g->strhash = newhash; } /* Intern a string and return string object. */ GCstr *lj_str_new(lua_State *L, const char *str, size_t lenx) { global_State *g; GCstr *s; GCobj *o; MSize len = (MSize)lenx; MSize a, b, h = len; if (lenx >= LJ_MAX_STR) lj_err_msg(L, LJ_ERR_STROV); g = G(L); /* Compute string hash. Constants taken from lookup3 hash by Bob Jenkins. */ if (len >= 4) { /* Caveat: unaligned access! */ a = lj_getu32(str); h ^= lj_getu32(str+len-4); b = lj_getu32(str+(len>>1)-2); h ^= b; h -= lj_rol(b, 14); b += lj_getu32(str+(len>>2)-1); } else if (len > 0) { a = *(const uint8_t *)str; h ^= *(const uint8_t *)(str+len-1); b = *(const uint8_t *)(str+(len>>1)); h ^= b; h -= lj_rol(b, 14); } else { return &g->strempty; } a ^= h; a -= lj_rol(h, 11); b ^= a; b -= lj_rol(a, 25); h ^= b; h -= lj_rol(b, 16); /* Check if the string has already been interned. */ o = gcref(g->strhash[h & g->strmask]); if (LJ_LIKELY((((uintptr_t)str+len-1) & (LJ_PAGESIZE-1)) <= LJ_PAGESIZE-4)) { while (o != NULL) { GCstr *sx = gco2str(o); if (sx->len == len && str_fastcmp(str, strdata(sx), len) == 0) { /* Resurrect if dead. Can only happen with fixstring() (keywords). */ if (isdead(g, o)) flipwhite(o); return sx; /* Return existing string. */ } o = gcnext(o); } } else { /* Slow path: end of string is too close to a page boundary. */ while (o != NULL) { GCstr *sx = gco2str(o); if (sx->len == len && memcmp(str, strdata(sx), len) == 0) { /* Resurrect if dead. Can only happen with fixstring() (keywords). */ if (isdead(g, o)) flipwhite(o); return sx; /* Return existing string. */ } o = gcnext(o); } } /* Nope, create a new string. */ s = lj_mem_newt(L, sizeof(GCstr)+len+1, GCstr); newwhite(g, s); s->gct = ~LJ_TSTR; s->len = len; s->hash = h; s->reserved = 0; memcpy(strdatawr(s), str, len); strdatawr(s)[len] = '\0'; /* Zero-terminate string. */ /* Add it to string hash table. */ h &= g->strmask; s->nextgc = g->strhash[h]; /* NOBARRIER: The string table is a GC root. */ setgcref(g->strhash[h], obj2gco(s)); if (g->strnum++ > g->strmask) /* Allow a 100% load factor. */ lj_str_resize(L, (g->strmask<<1)+1); /* Grow string table. */ return s; /* Return newly interned string. */ } void LJ_FASTCALL lj_str_free(global_State *g, GCstr *s) { g->strnum--; lj_mem_free(g, s, sizestring(s)); } /* -- Type conversions ---------------------------------------------------- */ /* Print number to buffer. Canonicalizes non-finite values. */ size_t LJ_FASTCALL lj_str_bufnum(char *s, cTValue *o) { if (LJ_LIKELY((o->u32.hi << 1) < 0xffe00000)) { /* Finite? */ lua_Number n = o->n; #if __BIONIC__ if (tvismzero(o)) { s[0] = '-'; s[1] = '0'; return 2; } #endif return (size_t)lua_number2str(s, n); } else if (((o->u32.hi & 0x000fffff) | o->u32.lo) != 0) { s[0] = 'n'; s[1] = 'a'; s[2] = 'n'; return 3; } else if ((o->u32.hi & 0x80000000) == 0) { s[0] = 'i'; s[1] = 'n'; s[2] = 'f'; return 3; } else { s[0] = '-'; s[1] = 'i'; s[2] = 'n'; s[3] = 'f'; return 4; } } /* Print integer to buffer. Returns pointer to start. */ char * LJ_FASTCALL lj_str_bufint(char *p, int32_t k) { uint32_t u = (uint32_t)(k < 0 ? -k : k); p += 1+10; do { *--p = (char)('0' + u % 10); } while (u /= 10); if (k < 0) *--p = '-'; return p; } /* Convert number to string. */ GCstr * LJ_FASTCALL lj_str_fromnum(lua_State *L, const lua_Number *np) { char buf[LJ_STR_NUMBUF]; size_t len = lj_str_bufnum(buf, (TValue *)np); return lj_str_new(L, buf, len); } /* Convert integer to string. */ GCstr * LJ_FASTCALL lj_str_fromint(lua_State *L, int32_t k) { char s[1+10]; char *p = lj_str_bufint(s, k); return lj_str_new(L, p, (size_t)(s+sizeof(s)-p)); } GCstr * LJ_FASTCALL lj_str_fromnumber(lua_State *L, cTValue *o) { return tvisint(o) ? lj_str_fromint(L, intV(o)) : lj_str_fromnum(L, &o->n); } /* -- String formatting --------------------------------------------------- */ static void addstr(lua_State *L, SBuf *sb, const char *str, MSize len) { char *p; MSize i; if (sb->n + len > sb->sz) { MSize sz = sb->sz * 2; while (sb->n + len > sz) sz = sz * 2; lj_str_resizebuf(L, sb, sz); } p = sb->buf + sb->n; sb->n += len; for (i = 0; i < len; i++) p[i] = str[i]; } static void addchar(lua_State *L, SBuf *sb, int c) { if (sb->n + 1 > sb->sz) { MSize sz = sb->sz * 2; lj_str_resizebuf(L, sb, sz); } sb->buf[sb->n++] = (char)c; } /* Push formatted message as a string object to Lua stack. va_list variant. */ const char *lj_str_pushvf(lua_State *L, const char *fmt, va_list argp) { SBuf *sb = &G(L)->tmpbuf; lj_str_needbuf(L, sb, (MSize)strlen(fmt)); lj_str_resetbuf(sb); for (;;) { const char *e = strchr(fmt, '%'); if (e == NULL) break; addstr(L, sb, fmt, (MSize)(e-fmt)); /* This function only handles %s, %c, %d, %f and %p formats. */ switch (e[1]) { case 's': { const char *s = va_arg(argp, char *); if (s == NULL) s = "(null)"; addstr(L, sb, s, (MSize)strlen(s)); break; } case 'c': addchar(L, sb, va_arg(argp, int)); break; case 'd': { char buf[LJ_STR_INTBUF]; char *p = lj_str_bufint(buf, va_arg(argp, int32_t)); addstr(L, sb, p, (MSize)(buf+LJ_STR_INTBUF-p)); break; } case 'f': { char buf[LJ_STR_NUMBUF]; TValue tv; MSize len; tv.n = (lua_Number)(va_arg(argp, LUAI_UACNUMBER)); len = (MSize)lj_str_bufnum(buf, &tv); addstr(L, sb, buf, len); break; } case 'p': { #define FMTP_CHARS (2*sizeof(ptrdiff_t)) char buf[2+FMTP_CHARS]; ptrdiff_t p = (ptrdiff_t)(va_arg(argp, void *)); ptrdiff_t i, lasti = 2+FMTP_CHARS; if (p == 0) { addstr(L, sb, "NULL", 4); break; } #if LJ_64 /* Shorten output for 64 bit pointers. */ lasti = 2+2*4+((p >> 32) ? 2+2*(lj_fls((uint32_t)(p >> 32))>>3) : 0); #endif buf[0] = '0'; buf[1] = 'x'; for (i = lasti-1; i >= 2; i--, p >>= 4) buf[i] = "0123456789abcdef"[(p & 15)]; addstr(L, sb, buf, (MSize)lasti); break; } case '%': addchar(L, sb, '%'); break; default: addchar(L, sb, '%'); addchar(L, sb, e[1]); break; } fmt = e+2; } addstr(L, sb, fmt, (MSize)strlen(fmt)); setstrV(L, L->top, lj_str_new(L, sb->buf, sb->n)); incr_top(L); return strVdata(L->top - 1); } /* Push formatted message as a string object to Lua stack. Vararg variant. */ const char *lj_str_pushf(lua_State *L, const char *fmt, ...) { const char *msg; va_list argp; va_start(argp, fmt); msg = lj_str_pushvf(L, fmt, argp); va_end(argp); return msg; } /* -- Buffer handling ----------------------------------------------------- */ char *lj_str_needbuf(lua_State *L, SBuf *sb, MSize sz) { if (sz > sb->sz) { if (sz < LJ_MIN_SBUF) sz = LJ_MIN_SBUF; lj_str_resizebuf(L, sb, sz); } return sb->buf; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ctype.o0000664000000000000000000004006012213333060022352 0ustar rootrootELF>P!@@ UHLHL)I9s G$5 t A@ M@G I)Bt A uL]UHHHW(H9w G$ HPH@p]UHHHG3AH9s G$)HA)ƃ0@1օuHG ]UHHGH(H9r G$ @0HHG]UHH]LeHIttLH]LeUHH]LeLmLuH HIAI̋v t/~tV Hk- t HCL+(LHHC LHHHQLHDHH]LeLmLuUHH]LeLmH HDgHHuID;c r-Av HS AH3HAD$CDHHIUBfBfB B DH]LeLmUHAWAVAUATSHIAAՉ1)AAA1A)ADGHHttcIAV9r89rHHD9 u D9hX uA^A;^ r,v IV AI6ICAFHID$IDlIfDEIhCL~IfL ID fC\~H[A\A]A^A_]UHN I>1)1)ȃHhLGfN fTG]UHDI>D1AD)AA1AADD)ȃGtZLDWD9r D9rAIMEH L9uEADsLA@ uHH]UHAWAVAUATSHIIIHMMAI}t EED9rEIIAD$ I9uAD$HMȉEA$t t u%tA9wHHHuyu ^t t u%tA9wHHHtMHMLLHtMtA AT$HMIEd$fEnALH[A\A]A^A_]UHLt9rHLYt t ut9wHHLtÉ΁ t]UHLt9rHLuM%t9w*%t9@wHHLtwA]UHAFDFtaLDOD9s D9rHLЋAAA D@utD9rHL֋uN%tD9r*%tD9rHHL֋t%=0t)t t uH7%t;GrHHƋtv+ҋFHJHF]UHLt DGD9rHLϸt{u.΁u GauYuUw Hu AAD ȃvBtO 7tD9rHHLB]UHATSHLt9rAԉHL0Ɓt9rHLtĉ tuI%t9rHAuHsHH{( H{(Ht5xu*8HCEBHtxHD[A\]UHAWAVAUATSHXIAH֋WHHHHHDžDžHtV HHHHEtD;hrEIIDžDžHHHA$E|$L$tH\t]AuH3AuH HAu>uH HfAwTAuH?H'tqH YHB4HVHtuH HH HXHEȋLHzAuHLH:e%D DEDt&H A HAuH*HDžDžDž%=0vDžt,(Hn)HDž[HAHA$t t uH%t;ArHLt DHHH H;v Dž`H)ǃ0@9ׅuHH HHH9rHt?H]Ht7AuHHHtDHHO|Džt,(H|)HDž(H)HHL t;XrHIFuLHHH)LHX[A\A]A^A_]UHH ELELtEUAHMAHMHyHAIHHIHHHH)ƃ0@1HHuHEtH@-HUH)HUHATSHpIuEFEZEFZEHuH}HÃ}y Ef.{ D+HH|HuHÀ|aIiLˆDHSHuLHp[A\]UHAWAVAUATSHH}IǹH}HLAt AI@t fH@t HɸHt Ht fHtIAG AG_IGHE@IGAAAAES fCt uFLHHHMHHLH}H C LuDHLLlj_ctype.hid > 0 && id < cts->topunionstructbooldoublefloatlong doublecharunsigned charintshortunsigned_tvoidctypeenum__ptr32complex)))__attribute__((vector_size(0?(((GCobj *)(uintptr_t)(ct->name).gcptr32))->gch.gct == ~(~4u)!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))(((ct->info) & (0xf0000000u|0x00100000u)) == (((CTInfo)(CT_ARRAY) << 28) + (0x00100000u)))((((ct->info)) >> 28) <= CT_HASSIZE)((((info)) >> 28) <= CT_HASSIZE) || ((((info)) >> 28) == CT_FUNC)va_list__builtin_va_list__gnuc_va_listptrdiff_tsize_twchar_tint8_tint16_tint32_tint64_tuint8_tuint16_tuint32_tuint64_tintptr_tuintptr_tvoid_Boolboolcharint__int8__int16__int32__int64floatdoublelongshort_Complexcomplex__complex__complex__signed__signed__signed__unsignedconst__const__const__volatile__volatile__volatile__restrict__restrict__restrict__inline__inline__inline__typedefexternstaticautoregister__extension____attribute__attribute__asm__asm__asm____declspec__cdecl__thiscall__fastcall__stdcall__ptr32__ptr64structunionenumsizeof__alignof__alignof__lj_ctype_newlj_ctype_internctype_checkctype_childlj_ctype_vlsizelj_ctype_infoctype_reprctype_preptype@B C   4@4      2 Pppp p p ppp p ppp p p p p  !! !##"""$%%% % &&!'()*++GCC: (Debian 4.7.3-4) 4.7.3zRx SAC N <&AC a \JAC E |*AC e  PAC L $AC T $AC P (EAC M3 <5AC p \AC  (|AC M AC  AC  AC  AC   (#AC C (LAC P xAC   AC G (AC M  |AC Ct .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @7,&x,x12x@2XT O`=\0ezu8>  P% * SS&&yJ4*?PN=])v     %@   7ER]iEy58V  # #.B?Xft|lj_ctype.cctype_prepstrctype_prepcctype_prepnumctype_appcctype_prepqualctype_preptype__PRETTY_FUNCTION__.4318__PRETTY_FUNCTION__.4163__PRETTY_FUNCTION__.4171__PRETTY_FUNCTION__.4054__PRETTY_FUNCTION__.4063__PRETTY_FUNCTION__.4240__PRETTY_FUNCTION__.4249__PRETTY_FUNCTION__.4339lj_ctype_typeinfo__assert_faillj_ctype_newlj_err_msglj_mem_growlj_ctype_internlj_ctype_addnamelj_ctype_getnamelj_ctype_getfieldqlj_ctype_rawreflj_ctype_sizelj_ctype_vlsizelj_ctype_infolj_ctype_metalj_tab_getstrlj_tab_getinthlj_ctype_reprlj_str_newlj_ctype_repr_int64lj_ctype_repr_complexlj_str_bufnumlj_ctype_initlj_mem_realloclj_ctype_freestatelj_ccallback_mcode_free ' q ){  ) 3 8 =Yp % * /8 B !G ,L  ! ,  !$ ,)  ! @  ! ,  ! @  % !* ,/`!  ! ,  ! @  !# ,(i s !x ,}  ! ,/ 9 !> ,Cx  ! ,  ! ,    1 ; !@ @E Y c !h ,m       ! , Y c h @m   ! ,   ! ,   ! , W a !f ,k  ' ( 'i s !x ,}   Q V+ ]F co o t ) q  D J  k ; E !J @Oc m !r ,wK ]a |   ! & +G Q !V ,[| **9*--*/*/ @ H**C1 0 k(08@ @S`y=@`8V  , P |?tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_mcode.o0000664000000000000000000001006012213333055022316 0ustar rootrootELF>@@ UHHH]UHAWAVAUATSH(IHh HEHc(H HHfHELuI)H}LDA IHH+UHUHMHHMIFL9AA"HLHuMLHHH9wntjHMHH?vHMH)H?wJIh I ADžd HIp HPIx HUHIh HXI htHHLAimNA90AAAxAEIH?wALuALH([A\A]A^A_]UH]UHH]LeHHA9d tH Hh DDd H]LeUH]UHATSIHh HLJh HLJ HtHHVLHHu[A\]UHH]LeHHIHh uu  machine code). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Register allocator extensions --------------------------------------- */ /* Allocate a register with a hint. */ static Reg ra_hintalloc(ASMState *as, IRRef ref, Reg hint, RegSet allow) { Reg r = IR(ref)->r; if (ra_noreg(r)) { if (!ra_hashint(r) && !iscrossref(as, ref)) ra_sethint(IR(ref)->r, hint); /* Propagate register hint. */ r = ra_allocref(as, ref, allow); } ra_noweak(as, r); return r; } /* Allocate a register or RID_ZERO. */ static Reg ra_alloc1z(ASMState *as, IRRef ref, RegSet allow) { Reg r = IR(ref)->r; if (ra_noreg(r)) { if (!(allow & RSET_FPR) && irref_isk(ref) && IR(ref)->i == 0) return RID_ZERO; r = ra_allocref(as, ref, allow); } else { ra_noweak(as, r); } return r; } /* Allocate two source registers for three-operand instructions. */ static Reg ra_alloc2(ASMState *as, IRIns *ir, RegSet allow) { IRIns *irl = IR(ir->op1), *irr = IR(ir->op2); Reg left = irl->r, right = irr->r; if (ra_hasreg(left)) { ra_noweak(as, left); if (ra_noreg(right)) right = ra_alloc1z(as, ir->op2, rset_exclude(allow, left)); else ra_noweak(as, right); } else if (ra_hasreg(right)) { ra_noweak(as, right); left = ra_alloc1z(as, ir->op1, rset_exclude(allow, right)); } else if (ra_hashint(right)) { right = ra_alloc1z(as, ir->op2, allow); left = ra_alloc1z(as, ir->op1, rset_exclude(allow, right)); } else { left = ra_alloc1z(as, ir->op1, allow); right = ra_alloc1z(as, ir->op2, rset_exclude(allow, left)); } return left | (right << 8); } /* -- Guard handling ------------------------------------------------------ */ /* Need some spare long-range jump slots, for out-of-range branches. */ #define MIPS_SPAREJUMP 4 /* Setup spare long-range jump slots per mcarea. */ static void asm_sparejump_setup(ASMState *as) { MCode *mxp = as->mcbot; /* Assumes sizeof(MCLink) == 8. */ if (((uintptr_t)mxp & (LJ_PAGESIZE-1)) == 8) { lua_assert(MIPSI_NOP == 0); memset(mxp+2, 0, MIPS_SPAREJUMP*8); mxp += MIPS_SPAREJUMP*2; lua_assert(mxp < as->mctop); lj_mcode_sync(as->mcbot, mxp); lj_mcode_commitbot(as->J, mxp); as->mcbot = mxp; as->mclim = as->mcbot + MCLIM_REDZONE; } } /* Setup exit stub after the end of each trace. */ static void asm_exitstub_setup(ASMState *as) { MCode *mxp = as->mctop; /* sw TMP, 0(sp); j ->vm_exit_handler; li TMP, traceno */ *--mxp = MIPSI_LI|MIPSF_T(RID_TMP)|as->T->traceno; *--mxp = MIPSI_J|((((uintptr_t)(void *)lj_vm_exit_handler)>>2)&0x03ffffffu); lua_assert(((uintptr_t)mxp ^ (uintptr_t)(void *)lj_vm_exit_handler)>>28 == 0); *--mxp = MIPSI_SW|MIPSF_T(RID_TMP)|MIPSF_S(RID_SP)|0; as->mctop = mxp; } /* Keep this in-sync with exitstub_trace_addr(). */ #define asm_exitstub_addr(as) ((as)->mctop) /* Emit conditional branch to exit for guard. */ static void asm_guard(ASMState *as, MIPSIns mi, Reg rs, Reg rt) { MCode *target = asm_exitstub_addr(as); MCode *p = as->mcp; if (LJ_UNLIKELY(p == as->invmcp)) { as->invmcp = NULL; as->loopinv = 1; as->mcp = p+1; mi = mi ^ ((mi>>28) == 1 ? 0x04000000u : 0x00010000u); /* Invert cond. */ target = p; /* Patch target later in asm_loop_fixup. */ } emit_ti(as, MIPSI_LI, RID_TMP, as->snapno); emit_branch(as, mi, rs, rt, target); } /* -- Operand fusion ------------------------------------------------------ */ /* Limit linear search to this distance. Avoids O(n^2) behavior. */ #define CONFLICT_SEARCH_LIM 31 /* Check if there's no conflicting instruction between curins and ref. */ static int noconflict(ASMState *as, IRRef ref, IROp conflict) { IRIns *ir = as->ir; IRRef i = as->curins; if (i > ref + CONFLICT_SEARCH_LIM) return 0; /* Give up, ref is too far away. */ while (--i > ref) if (ir[i].o == conflict) return 0; /* Conflict found. */ return 1; /* Ok, no conflict. */ } /* Fuse the array base of colocated arrays. */ static int32_t asm_fuseabase(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); if (ir->o == IR_TNEW && ir->op1 <= LJ_MAX_COLOSIZE && !neverfuse(as) && noconflict(as, ref, IR_NEWREF)) return (int32_t)sizeof(GCtab); return 0; } /* Fuse array/hash/upvalue reference into register+offset operand. */ static Reg asm_fuseahuref(ASMState *as, IRRef ref, int32_t *ofsp, RegSet allow) { IRIns *ir = IR(ref); if (ra_noreg(ir->r)) { if (ir->o == IR_AREF) { if (mayfuse(as, ref)) { if (irref_isk(ir->op2)) { IRRef tab = IR(ir->op1)->op1; int32_t ofs = asm_fuseabase(as, tab); IRRef refa = ofs ? tab : ir->op1; ofs += 8*IR(ir->op2)->i; if (checki16(ofs)) { *ofsp = ofs; return ra_alloc1(as, refa, allow); } } } } else if (ir->o == IR_HREFK) { if (mayfuse(as, ref)) { int32_t ofs = (int32_t)(IR(ir->op2)->op2 * sizeof(Node)); if (checki16(ofs)) { *ofsp = ofs; return ra_alloc1(as, ir->op1, allow); } } } else if (ir->o == IR_UREFC) { if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); int32_t ofs = i32ptr(&gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.tv); int32_t jgl = (intptr_t)J2G(as->J); if ((uint32_t)(ofs-jgl) < 65536) { *ofsp = ofs-jgl-32768; return RID_JGL; } else { *ofsp = (int16_t)ofs; return ra_allock(as, ofs-(int16_t)ofs, allow); } } } } *ofsp = 0; return ra_alloc1(as, ref, allow); } /* Fuse XLOAD/XSTORE reference into load/store operand. */ static void asm_fusexref(ASMState *as, MIPSIns mi, Reg rt, IRRef ref, RegSet allow, int32_t ofs) { IRIns *ir = IR(ref); Reg base; if (ra_noreg(ir->r) && canfuse(as, ir)) { if (ir->o == IR_ADD) { int32_t ofs2; if (irref_isk(ir->op2) && (ofs2 = ofs + IR(ir->op2)->i, checki16(ofs2))) { ref = ir->op1; ofs = ofs2; } } else if (ir->o == IR_STRREF) { int32_t ofs2 = 65536; lua_assert(ofs == 0); ofs = (int32_t)sizeof(GCstr); if (irref_isk(ir->op2)) { ofs2 = ofs + IR(ir->op2)->i; ref = ir->op1; } else if (irref_isk(ir->op1)) { ofs2 = ofs + IR(ir->op1)->i; ref = ir->op2; } if (!checki16(ofs2)) { /* NYI: Fuse ADD with constant. */ Reg right, left = ra_alloc2(as, ir, allow); right = (left >> 8); left &= 255; emit_hsi(as, mi, rt, RID_TMP, ofs); emit_dst(as, MIPSI_ADDU, RID_TMP, left, right); return; } ofs = ofs2; } } base = ra_alloc1(as, ref, allow); emit_hsi(as, mi, rt, base, ofs); } /* -- Calls --------------------------------------------------------------- */ /* Generate a call to a C function. */ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) { uint32_t n, nargs = CCI_NARGS(ci); int32_t ofs = 16; Reg gpr, fpr = REGARG_FIRSTFPR; if ((void *)ci->func) emit_call(as, (void *)ci->func); for (gpr = REGARG_FIRSTGPR; gpr <= REGARG_LASTGPR; gpr++) as->cost[gpr] = REGCOST(~0u, ASMREF_L); gpr = REGARG_FIRSTGPR; for (n = 0; n < nargs; n++) { /* Setup args. */ IRRef ref = args[n]; if (ref) { IRIns *ir = IR(ref); if (irt_isfp(ir->t) && fpr <= REGARG_LASTFPR && !(ci->flags & CCI_VARARG)) { lua_assert(rset_test(as->freeset, fpr)); /* Already evicted. */ ra_leftov(as, fpr, ref); fpr += 2; gpr += irt_isnum(ir->t) ? 2 : 1; } else { fpr = REGARG_LASTFPR+1; if (irt_isnum(ir->t)) gpr = (gpr+1) & ~1; if (gpr <= REGARG_LASTGPR) { lua_assert(rset_test(as->freeset, gpr)); /* Already evicted. */ if (irt_isfp(ir->t)) { RegSet of = as->freeset; Reg r; /* Workaround to protect argument GPRs from being used for remat. */ as->freeset &= ~RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1); r = ra_alloc1(as, ref, RSET_FPR); as->freeset |= (of & RSET_RANGE(REGARG_FIRSTGPR, REGARG_LASTGPR+1)); if (irt_isnum(ir->t)) { emit_tg(as, MIPSI_MFC1, gpr+(LJ_BE?0:1), r+1); emit_tg(as, MIPSI_MFC1, gpr+(LJ_BE?1:0), r); lua_assert(rset_test(as->freeset, gpr+1)); /* Already evicted. */ gpr += 2; } else if (irt_isfloat(ir->t)) { emit_tg(as, MIPSI_MFC1, gpr, r); gpr++; } } else { ra_leftov(as, gpr, ref); gpr++; } } else { Reg r = ra_alloc1z(as, ref, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); if (irt_isnum(ir->t)) ofs = (ofs + 4) & ~4; emit_spstore(as, ir, r, ofs); ofs += irt_isnum(ir->t) ? 8 : 4; } } } else { fpr = REGARG_LASTFPR+1; if (gpr <= REGARG_LASTGPR) gpr++; else ofs += 4; } checkmclim(as); } } /* Setup result reg/sp for call. Evict scratch regs. */ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) { RegSet drop = RSET_SCRATCH; int hiop = ((ir+1)->o == IR_HIOP); if ((ci->flags & CCI_NOFPRCLOBBER)) drop &= ~RSET_FPR; if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ if (hiop && ra_hasreg((ir+1)->r)) rset_clear(drop, (ir+1)->r); /* Dest reg handled below. */ ra_evictset(as, drop); /* Evictions must be performed first. */ if (ra_used(ir)) { lua_assert(!irt_ispri(ir->t)); if (irt_isfp(ir->t)) { if ((ci->flags & CCI_CASTU64)) { int32_t ofs = sps_scale(ir->s); Reg dest = ir->r; if (ra_hasreg(dest)) { ra_free(as, dest); ra_modified(as, dest); emit_tg(as, MIPSI_MTC1, RID_RETHI, dest+1); emit_tg(as, MIPSI_MTC1, RID_RETLO, dest); } if (ofs) { emit_tsi(as, MIPSI_SW, RID_RETLO, RID_SP, ofs+(LJ_BE?4:0)); emit_tsi(as, MIPSI_SW, RID_RETHI, RID_SP, ofs+(LJ_BE?0:4)); } } else { ra_destreg(as, ir, RID_FPRET); } } else if (hiop) { ra_destpair(as, ir); } else { ra_destreg(as, ir, RID_RET); } } } static void asm_call(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX]; const CCallInfo *ci = &lj_ir_callinfo[ir->op2]; asm_collectargs(as, ir, ci, args); asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } static void asm_callx(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX*2]; CCallInfo ci; IRRef func; IRIns *irf; ci.flags = asm_callx_flags(as, ir); asm_collectargs(as, ir, &ci, args); asm_setupresult(as, ir, &ci); func = ir->op2; irf = IR(func); if (irf->o == IR_CARG) { func = irf->op1; irf = IR(func); } if (irref_isk(func)) { /* Call to constant address. */ ci.func = (ASMFunction)(void *)(irf->i); } else { /* Need specific register for indirect calls. */ Reg r = ra_alloc1(as, func, RID2RSET(RID_CFUNCADDR)); MCode *p = as->mcp; if (r == RID_CFUNCADDR) *--p = MIPSI_NOP; else *--p = MIPSI_MOVE | MIPSF_D(RID_CFUNCADDR) | MIPSF_S(r); *--p = MIPSI_JALR | MIPSF_S(r); as->mcp = p; ci.func = (ASMFunction)(void *)0; } asm_gencall(as, &ci, args); } static void asm_callid(ASMState *as, IRIns *ir, IRCallID id) { const CCallInfo *ci = &lj_ir_callinfo[id]; IRRef args[2]; args[0] = ir->op1; args[1] = ir->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } static void asm_callround(ASMState *as, IRIns *ir, IRCallID id) { /* The modified regs must match with the *.dasc implementation. */ RegSet drop = RID2RSET(RID_R1)|RID2RSET(RID_R12)|RID2RSET(RID_FPRET)| RID2RSET(RID_F2)|RID2RSET(RID_F4)|RID2RSET(REGARG_FIRSTFPR); if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); ra_evictset(as, drop); ra_destreg(as, ir, RID_FPRET); emit_call(as, (void *)lj_ir_callinfo[id].func); ra_leftov(as, REGARG_FIRSTFPR, ir->op1); } /* -- Returns ------------------------------------------------------------- */ /* Return to lower frame. Guard that it goes to the right spot. */ static void asm_retf(ASMState *as, IRIns *ir) { Reg base = ra_alloc1(as, REF_BASE, RSET_GPR); void *pc = ir_kptr(IR(ir->op2)); int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); as->topslot -= (BCReg)delta; if ((int32_t)as->topslot < 0) as->topslot = 0; emit_setgl(as, base, jit_base); emit_addptr(as, base, -8*delta); asm_guard(as, MIPSI_BNE, RID_TMP, ra_allock(as, i32ptr(pc), rset_exclude(RSET_GPR, base))); emit_tsi(as, MIPSI_LW, RID_TMP, base, -8); } /* -- Type conversions ---------------------------------------------------- */ static void asm_tointg(ASMState *as, IRIns *ir, Reg left) { Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, left)); Reg dest = ra_dest(as, ir, RSET_GPR); asm_guard(as, MIPSI_BC1F, 0, 0); emit_fgh(as, MIPSI_C_EQ_D, 0, tmp, left); emit_fg(as, MIPSI_CVT_D_W, tmp, tmp); emit_tg(as, MIPSI_MFC1, dest, tmp); emit_fg(as, MIPSI_CVT_W_D, tmp, left); } static void asm_tobit(ASMState *as, IRIns *ir) { RegSet allow = RSET_FPR; Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, allow); Reg right = ra_alloc1(as, ir->op2, rset_clear(allow, left)); Reg tmp = ra_scratch(as, rset_clear(allow, right)); emit_tg(as, MIPSI_MFC1, dest, tmp); emit_fgh(as, MIPSI_ADD_D, tmp, left, right); } static void asm_conv(ASMState *as, IRIns *ir) { IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); int stfp = (st == IRT_NUM || st == IRT_FLOAT); IRRef lref = ir->op1; lua_assert(irt_type(ir->t) != st); lua_assert(!(irt_isint64(ir->t) || (st == IRT_I64 || st == IRT_U64))); /* Handled by SPLIT. */ if (irt_isfp(ir->t)) { Reg dest = ra_dest(as, ir, RSET_FPR); if (stfp) { /* FP to FP conversion. */ emit_fg(as, st == IRT_NUM ? MIPSI_CVT_S_D : MIPSI_CVT_D_S, dest, ra_alloc1(as, lref, RSET_FPR)); } else if (st == IRT_U32) { /* U32 to FP conversion. */ /* y = (x ^ 0x8000000) + 2147483648.0 */ Reg left = ra_alloc1(as, lref, RSET_GPR); Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, dest)); emit_fgh(as, irt_isfloat(ir->t) ? MIPSI_ADD_S : MIPSI_ADD_D, dest, dest, tmp); emit_fg(as, irt_isfloat(ir->t) ? MIPSI_CVT_S_W : MIPSI_CVT_D_W, dest, dest); if (irt_isfloat(ir->t)) emit_lsptr(as, MIPSI_LWC1, (tmp & 31), (void *)lj_ir_k64_find(as->J, U64x(4f000000,4f000000)), RSET_GPR); else emit_lsptr(as, MIPSI_LDC1, (tmp & 31), (void *)lj_ir_k64_find(as->J, U64x(41e00000,00000000)), RSET_GPR); emit_tg(as, MIPSI_MTC1, RID_TMP, dest); emit_dst(as, MIPSI_XOR, RID_TMP, RID_TMP, left); emit_ti(as, MIPSI_LUI, RID_TMP, 0x8000); } else { /* Integer to FP conversion. */ Reg left = ra_alloc1(as, lref, RSET_GPR); emit_fg(as, irt_isfloat(ir->t) ? MIPSI_CVT_S_W : MIPSI_CVT_D_W, dest, dest); emit_tg(as, MIPSI_MTC1, left, dest); } } else if (stfp) { /* FP to integer conversion. */ if (irt_isguard(ir->t)) { /* Checked conversions are only supported from number to int. */ lua_assert(irt_isint(ir->t) && st == IRT_NUM); asm_tointg(as, ir, ra_alloc1(as, lref, RSET_FPR)); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, lref, RSET_FPR); Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, left)); if (irt_isu32(ir->t)) { /* y = (int)floor(x - 2147483648.0) ^ 0x80000000 */ emit_dst(as, MIPSI_XOR, dest, dest, RID_TMP); emit_ti(as, MIPSI_LUI, RID_TMP, 0x8000); emit_tg(as, MIPSI_MFC1, dest, tmp); emit_fg(as, st == IRT_FLOAT ? MIPSI_FLOOR_W_S : MIPSI_FLOOR_W_D, tmp, tmp); emit_fgh(as, st == IRT_FLOAT ? MIPSI_SUB_S : MIPSI_SUB_D, tmp, left, tmp); if (st == IRT_FLOAT) emit_lsptr(as, MIPSI_LWC1, (tmp & 31), (void *)lj_ir_k64_find(as->J, U64x(4f000000,4f000000)), RSET_GPR); else emit_lsptr(as, MIPSI_LDC1, (tmp & 31), (void *)lj_ir_k64_find(as->J, U64x(41e00000,00000000)), RSET_GPR); } else { emit_tg(as, MIPSI_MFC1, dest, tmp); emit_fg(as, st == IRT_FLOAT ? MIPSI_TRUNC_W_S : MIPSI_TRUNC_W_D, tmp, left); } } } else { Reg dest = ra_dest(as, ir, RSET_GPR); if (st >= IRT_I8 && st <= IRT_U16) { /* Extend to 32 bit integer. */ Reg left = ra_alloc1(as, ir->op1, RSET_GPR); lua_assert(irt_isint(ir->t) || irt_isu32(ir->t)); if ((ir->op2 & IRCONV_SEXT)) { if ((as->flags & JIT_F_MIPS32R2)) { emit_dst(as, st == IRT_I8 ? MIPSI_SEB : MIPSI_SEH, dest, 0, left); } else { uint32_t shift = st == IRT_I8 ? 24 : 16; emit_dta(as, MIPSI_SRA, dest, dest, shift); emit_dta(as, MIPSI_SLL, dest, left, shift); } } else { emit_tsi(as, MIPSI_ANDI, dest, left, (int32_t)(st == IRT_U8 ? 0xff : 0xffff)); } } else { /* 32/64 bit integer conversions. */ /* Only need to handle 32/32 bit no-op (cast) on 32 bit archs. */ ra_leftov(as, dest, lref); /* Do nothing, but may need to move regs. */ } } } #if LJ_HASFFI static void asm_conv64(ASMState *as, IRIns *ir) { IRType st = (IRType)((ir-1)->op2 & IRCONV_SRCMASK); IRType dt = (((ir-1)->op2 & IRCONV_DSTMASK) >> IRCONV_DSH); IRCallID id; const CCallInfo *ci; IRRef args[2]; args[LJ_BE?0:1] = ir->op1; args[LJ_BE?1:0] = (ir-1)->op1; if (st == IRT_NUM || st == IRT_FLOAT) { id = IRCALL_fp64_d2l + ((st == IRT_FLOAT) ? 2 : 0) + (dt - IRT_I64); ir--; } else { id = IRCALL_fp64_l2d + ((dt == IRT_FLOAT) ? 2 : 0) + (st - IRT_I64); } ci = &lj_ir_callinfo[id]; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } #endif static void asm_strto(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_strscan_num]; IRRef args[2]; RegSet drop = RSET_SCRATCH; if (ra_hasreg(ir->r)) rset_set(drop, ir->r); /* Spill dest reg (if any). */ ra_evictset(as, drop); asm_guard(as, MIPSI_BEQ, RID_RET, RID_ZERO); /* Test return status. */ args[0] = ir->op1; /* GCstr *str */ args[1] = ASMREF_TMP1; /* TValue *n */ asm_gencall(as, ci, args); /* Store the result to the spill slot or temp slots. */ emit_tsi(as, MIPSI_ADDIU, ra_releasetmp(as, ASMREF_TMP1), RID_SP, sps_scale(ir->s)); } /* Get pointer to TValue. */ static void asm_tvptr(ASMState *as, Reg dest, IRRef ref) { IRIns *ir = IR(ref); if (irt_isnum(ir->t)) { if (irref_isk(ref)) /* Use the number constant itself as a TValue. */ ra_allockreg(as, i32ptr(ir_knum(ir)), dest); else /* Otherwise force a spill and use the spill slot. */ emit_tsi(as, MIPSI_ADDIU, dest, RID_SP, ra_spill(as, ir)); } else { /* Otherwise use g->tmptv to hold the TValue. */ RegSet allow = rset_exclude(RSET_GPR, dest); Reg type; emit_tsi(as, MIPSI_ADDIU, dest, RID_JGL, offsetof(global_State, tmptv)-32768); if (!irt_ispri(ir->t)) { Reg src = ra_alloc1(as, ref, allow); emit_setgl(as, src, tmptv.gcr); } type = ra_allock(as, irt_toitype(ir->t), allow); emit_setgl(as, type, tmptv.it); } } static void asm_tostr(ASMState *as, IRIns *ir) { IRRef args[2]; args[0] = ASMREF_L; as->gcsteps++; if (irt_isnum(IR(ir->op1)->t) || (ir+1)->o == IR_HIOP) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromnum]; args[1] = ASMREF_TMP1; /* const lua_Number * */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op1); } else { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromint]; args[1] = ir->op1; /* int32_t k */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); } } /* -- Memory references --------------------------------------------------- */ static void asm_aref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg idx, base; if (irref_isk(ir->op2)) { IRRef tab = IR(ir->op1)->op1; int32_t ofs = asm_fuseabase(as, tab); IRRef refa = ofs ? tab : ir->op1; ofs += 8*IR(ir->op2)->i; if (checki16(ofs)) { base = ra_alloc1(as, refa, RSET_GPR); emit_tsi(as, MIPSI_ADDIU, dest, base, ofs); return; } } base = ra_alloc1(as, ir->op1, RSET_GPR); idx = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, base)); emit_dst(as, MIPSI_ADDU, dest, RID_TMP, base); emit_dta(as, MIPSI_SLL, RID_TMP, idx, 3); } /* Inlined hash lookup. Specialized for key type and for const keys. ** The equivalent C code is: ** Node *n = hashkey(t, key); ** do { ** if (lj_obj_equal(&n->key, key)) return &n->val; ** } while ((n = nextnode(n))); ** return niltv(L); */ static void asm_href(ASMState *as, IRIns *ir) { RegSet allow = RSET_GPR; int destused = ra_used(ir); Reg dest = ra_dest(as, ir, allow); Reg tab = ra_alloc1(as, ir->op1, rset_clear(allow, dest)); Reg key = RID_NONE, type = RID_NONE, tmpnum = RID_NONE, tmp1 = RID_TMP, tmp2; IRRef refkey = ir->op2; IRIns *irkey = IR(refkey); IRType1 kt = irkey->t; uint32_t khash; MCLabel l_end, l_loop, l_next; rset_clear(allow, tab); if (irt_isnum(kt)) { key = ra_alloc1(as, refkey, RSET_FPR); tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key)); } else if (!irt_ispri(kt)) { key = ra_alloc1(as, refkey, allow); rset_clear(allow, key); type = ra_allock(as, irt_toitype(irkey->t), allow); rset_clear(allow, type); } tmp2 = ra_scratch(as, allow); rset_clear(allow, tmp2); /* Key not found in chain: load niltv. */ l_end = emit_label(as); if (destused) emit_loada(as, dest, niltvg(J2G(as->J))); else *--as->mcp = MIPSI_NOP; /* Follow hash chain until the end. */ emit_move(as, dest, tmp1); l_loop = --as->mcp; emit_tsi(as, MIPSI_LW, tmp1, dest, (int32_t)offsetof(Node, next)); l_next = emit_label(as); /* Type and value comparison. */ if (irt_isnum(kt)) { emit_branch(as, MIPSI_BC1T, 0, 0, l_end); emit_fgh(as, MIPSI_C_EQ_D, 0, tmpnum, key); emit_tg(as, MIPSI_MFC1, tmp1, key+1); emit_branch(as, MIPSI_BEQ, tmp1, RID_ZERO, l_next); emit_tsi(as, MIPSI_SLTIU, tmp1, tmp1, (int32_t)LJ_TISNUM); emit_hsi(as, MIPSI_LDC1, tmpnum, dest, (int32_t)offsetof(Node, key.n)); } else { if (irt_ispri(kt)) { emit_branch(as, MIPSI_BEQ, tmp1, type, l_end); } else { emit_branch(as, MIPSI_BEQ, tmp2, key, l_end); emit_tsi(as, MIPSI_LW, tmp2, dest, (int32_t)offsetof(Node, key.gcr)); emit_branch(as, MIPSI_BNE, tmp1, type, l_next); } } emit_tsi(as, MIPSI_LW, tmp1, dest, (int32_t)offsetof(Node, key.it)); *l_loop = MIPSI_BNE | MIPSF_S(tmp1) | ((as->mcp-l_loop-1) & 0xffffu); /* Load main position relative to tab->node into dest. */ khash = irref_isk(refkey) ? ir_khash(irkey) : 1; if (khash == 0) { emit_tsi(as, MIPSI_LW, dest, tab, (int32_t)offsetof(GCtab, node)); } else { Reg tmphash = tmp1; if (irref_isk(refkey)) tmphash = ra_allock(as, khash, allow); emit_dst(as, MIPSI_ADDU, dest, dest, tmp1); lua_assert(sizeof(Node) == 24); emit_dst(as, MIPSI_SUBU, tmp1, tmp2, tmp1); emit_dta(as, MIPSI_SLL, tmp1, tmp1, 3); emit_dta(as, MIPSI_SLL, tmp2, tmp1, 5); emit_dst(as, MIPSI_AND, tmp1, tmp2, tmphash); emit_tsi(as, MIPSI_LW, dest, tab, (int32_t)offsetof(GCtab, node)); emit_tsi(as, MIPSI_LW, tmp2, tab, (int32_t)offsetof(GCtab, hmask)); if (irref_isk(refkey)) { /* Nothing to do. */ } else if (irt_isstr(kt)) { emit_tsi(as, MIPSI_LW, tmp1, key, (int32_t)offsetof(GCstr, hash)); } else { /* Must match with hash*() in lj_tab.c. */ emit_dst(as, MIPSI_SUBU, tmp1, tmp1, tmp2); emit_rotr(as, tmp2, tmp2, dest, (-HASH_ROT3)&31); emit_dst(as, MIPSI_XOR, tmp1, tmp1, tmp2); emit_rotr(as, tmp1, tmp1, dest, (-HASH_ROT2-HASH_ROT1)&31); emit_dst(as, MIPSI_SUBU, tmp2, tmp2, dest); if (irt_isnum(kt)) { emit_dst(as, MIPSI_XOR, tmp2, tmp2, tmp1); if ((as->flags & JIT_F_MIPS32R2)) { emit_dta(as, MIPSI_ROTR, dest, tmp1, (-HASH_ROT1)&31); } else { emit_dst(as, MIPSI_OR, dest, dest, tmp1); emit_dta(as, MIPSI_SLL, tmp1, tmp1, HASH_ROT1); emit_dta(as, MIPSI_SRL, dest, tmp1, (-HASH_ROT1)&31); } emit_dst(as, MIPSI_ADDU, tmp1, tmp1, tmp1); emit_tg(as, MIPSI_MFC1, tmp2, key); emit_tg(as, MIPSI_MFC1, tmp1, key+1); } else { emit_dst(as, MIPSI_XOR, tmp2, key, tmp1); emit_rotr(as, dest, tmp1, tmp2, (-HASH_ROT1)&31); emit_dst(as, MIPSI_ADDU, tmp1, key, ra_allock(as, HASH_BIAS, allow)); } } } } static void asm_hrefk(ASMState *as, IRIns *ir) { IRIns *kslot = IR(ir->op2); IRIns *irkey = IR(kslot->op1); int32_t ofs = (int32_t)(kslot->op2 * sizeof(Node)); int32_t kofs = ofs + (int32_t)offsetof(Node, key); Reg dest = (ra_used(ir)||ofs > 32736) ? ra_dest(as, ir, RSET_GPR) : RID_NONE; Reg node = ra_alloc1(as, ir->op1, RSET_GPR); Reg key = RID_NONE, type = RID_TMP, idx = node; RegSet allow = rset_exclude(RSET_GPR, node); int32_t lo, hi; lua_assert(ofs % sizeof(Node) == 0); if (ofs > 32736) { idx = dest; rset_clear(allow, dest); kofs = (int32_t)offsetof(Node, key); } else if (ra_hasreg(dest)) { emit_tsi(as, MIPSI_ADDIU, dest, node, ofs); } if (!irt_ispri(irkey->t)) { key = ra_scratch(as, allow); rset_clear(allow, key); } if (irt_isnum(irkey->t)) { lo = (int32_t)ir_knum(irkey)->u32.lo; hi = (int32_t)ir_knum(irkey)->u32.hi; } else { lo = irkey->i; hi = irt_toitype(irkey->t); if (!ra_hasreg(key)) goto nolo; } asm_guard(as, MIPSI_BNE, key, lo ? ra_allock(as, lo, allow) : RID_ZERO); nolo: asm_guard(as, MIPSI_BNE, type, hi ? ra_allock(as, hi, allow) : RID_ZERO); if (ra_hasreg(key)) emit_tsi(as, MIPSI_LW, key, idx, kofs+(LJ_BE?4:0)); emit_tsi(as, MIPSI_LW, type, idx, kofs+(LJ_BE?0:4)); if (ofs > 32736) emit_tsi(as, MIPSI_ADDU, dest, node, ra_allock(as, ofs, allow)); } static void asm_newref(ASMState *as, IRIns *ir) { if (ir->r != RID_SINK) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey]; IRRef args[3]; args[0] = ASMREF_L; /* lua_State *L */ args[1] = ir->op1; /* GCtab *t */ args[2] = ASMREF_TMP1; /* cTValue *key */ asm_setupresult(as, ir, ci); /* TValue * */ asm_gencall(as, ci, args); asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op2); } } static void asm_uref(ASMState *as, IRIns *ir) { /* NYI: Check that UREFO is still open and not aliasing a slot. */ Reg dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); MRef *v = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.v; emit_lsptr(as, MIPSI_LW, dest, v, RSET_GPR); } else { Reg uv = ra_scratch(as, RSET_GPR); Reg func = ra_alloc1(as, ir->op1, RSET_GPR); if (ir->o == IR_UREFC) { asm_guard(as, MIPSI_BEQ, RID_TMP, RID_ZERO); emit_tsi(as, MIPSI_ADDIU, dest, uv, (int32_t)offsetof(GCupval, tv)); emit_tsi(as, MIPSI_LBU, RID_TMP, uv, (int32_t)offsetof(GCupval, closed)); } else { emit_tsi(as, MIPSI_LW, dest, uv, (int32_t)offsetof(GCupval, v)); } emit_tsi(as, MIPSI_LW, uv, func, (int32_t)offsetof(GCfuncL, uvptr) + 4*(int32_t)(ir->op2 >> 8)); } } static void asm_fref(ASMState *as, IRIns *ir) { UNUSED(as); UNUSED(ir); lua_assert(!ra_used(ir)); } static void asm_strref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); IRRef ref = ir->op2, refk = ir->op1; int32_t ofs = (int32_t)sizeof(GCstr); Reg r; if (irref_isk(ref)) { IRRef tmp = refk; refk = ref; ref = tmp; } else if (!irref_isk(refk)) { Reg right, left = ra_alloc1(as, ir->op1, RSET_GPR); IRIns *irr = IR(ir->op2); if (ra_hasreg(irr->r)) { ra_noweak(as, irr->r); right = irr->r; } else if (mayfuse(as, irr->op2) && irr->o == IR_ADD && irref_isk(irr->op2) && checki16(ofs + IR(irr->op2)->i)) { ofs += IR(irr->op2)->i; right = ra_alloc1(as, irr->op1, rset_exclude(RSET_GPR, left)); } else { right = ra_allocref(as, ir->op2, rset_exclude(RSET_GPR, left)); } emit_tsi(as, MIPSI_ADDIU, dest, dest, ofs); emit_dst(as, MIPSI_ADDU, dest, left, right); return; } r = ra_alloc1(as, ref, RSET_GPR); ofs += IR(refk)->i; if (checki16(ofs)) emit_tsi(as, MIPSI_ADDIU, dest, r, ofs); else emit_dst(as, MIPSI_ADDU, dest, r, ra_allock(as, ofs, rset_exclude(RSET_GPR, r))); } /* -- Loads and stores ---------------------------------------------------- */ static MIPSIns asm_fxloadins(IRIns *ir) { switch (irt_type(ir->t)) { case IRT_I8: return MIPSI_LB; case IRT_U8: return MIPSI_LBU; case IRT_I16: return MIPSI_LH; case IRT_U16: return MIPSI_LHU; case IRT_NUM: return MIPSI_LDC1; case IRT_FLOAT: return MIPSI_LWC1; default: return MIPSI_LW; } } static MIPSIns asm_fxstoreins(IRIns *ir) { switch (irt_type(ir->t)) { case IRT_I8: case IRT_U8: return MIPSI_SB; case IRT_I16: case IRT_U16: return MIPSI_SH; case IRT_NUM: return MIPSI_SDC1; case IRT_FLOAT: return MIPSI_SWC1; default: return MIPSI_SW; } } static void asm_fload(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg idx = ra_alloc1(as, ir->op1, RSET_GPR); MIPSIns mi = asm_fxloadins(ir); int32_t ofs; if (ir->op2 == IRFL_TAB_ARRAY) { ofs = asm_fuseabase(as, ir->op1); if (ofs) { /* Turn the t->array load into an add for colocated arrays. */ emit_tsi(as, MIPSI_ADDIU, dest, idx, ofs); return; } } ofs = field_ofs[ir->op2]; lua_assert(!irt_isfp(ir->t)); emit_tsi(as, mi, dest, idx, ofs); } static void asm_fstore(ASMState *as, IRIns *ir) { if (ir->r != RID_SINK) { Reg src = ra_alloc1z(as, ir->op2, RSET_GPR); IRIns *irf = IR(ir->op1); Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src)); int32_t ofs = field_ofs[irf->op2]; MIPSIns mi = asm_fxstoreins(ir); lua_assert(!irt_isfp(ir->t)); emit_tsi(as, mi, src, idx, ofs); } } static void asm_xload(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); lua_assert(!(ir->op2 & IRXLOAD_UNALIGNED)); asm_fusexref(as, asm_fxloadins(ir), dest, ir->op1, RSET_GPR, 0); } static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs) { if (ir->r != RID_SINK) { Reg src = ra_alloc1z(as, ir->op2, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1, rset_exclude(RSET_GPR, src), ofs); } } static void asm_ahuvload(ASMState *as, IRIns *ir) { IRType1 t = ir->t; Reg dest = RID_NONE, type = RID_TMP, idx; RegSet allow = RSET_GPR; int32_t ofs = 0; if (ra_used(ir)) { lua_assert(irt_isnum(t) || irt_isint(t) || irt_isaddr(t)); dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : RSET_GPR); rset_clear(allow, dest); } idx = asm_fuseahuref(as, ir->op1, &ofs, allow); rset_clear(allow, idx); if (irt_isnum(t)) { asm_guard(as, MIPSI_BEQ, type, RID_ZERO); emit_tsi(as, MIPSI_SLTIU, type, type, (int32_t)LJ_TISNUM); if (ra_hasreg(dest)) emit_hsi(as, MIPSI_LDC1, dest, idx, ofs); } else { asm_guard(as, MIPSI_BNE, type, ra_allock(as, irt_toitype(t), allow)); if (ra_hasreg(dest)) emit_tsi(as, MIPSI_LW, dest, idx, ofs+(LJ_BE?4:0)); } emit_tsi(as, MIPSI_LW, type, idx, ofs+(LJ_BE?0:4)); } static void asm_ahustore(ASMState *as, IRIns *ir) { RegSet allow = RSET_GPR; Reg idx, src = RID_NONE, type = RID_NONE; int32_t ofs = 0; if (ir->r == RID_SINK) return; if (irt_isnum(ir->t)) { src = ra_alloc1(as, ir->op2, RSET_FPR); } else { if (!irt_ispri(ir->t)) { src = ra_alloc1(as, ir->op2, allow); rset_clear(allow, src); } type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); rset_clear(allow, type); } idx = asm_fuseahuref(as, ir->op1, &ofs, allow); if (irt_isnum(ir->t)) { emit_hsi(as, MIPSI_SDC1, src, idx, ofs); } else { if (ra_hasreg(src)) emit_tsi(as, MIPSI_SW, src, idx, ofs+(LJ_BE?4:0)); emit_tsi(as, MIPSI_SW, type, idx, ofs+(LJ_BE?0:4)); } } static void asm_sload(ASMState *as, IRIns *ir) { int32_t ofs = 8*((int32_t)ir->op1-1) + ((ir->op2 & IRSLOAD_FRAME) ? 4 : 0); IRType1 t = ir->t; Reg dest = RID_NONE, type = RID_NONE, base; RegSet allow = RSET_GPR; lua_assert(!(ir->op2 & IRSLOAD_PARENT)); /* Handled by asm_head_side(). */ lua_assert(irt_isguard(t) || !(ir->op2 & IRSLOAD_TYPECHECK)); lua_assert(!irt_isint(t) || (ir->op2 & (IRSLOAD_CONVERT|IRSLOAD_FRAME))); if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(t) && irt_isint(t)) { dest = ra_scratch(as, RSET_FPR); asm_tointg(as, ir, dest); t.irt = IRT_NUM; /* Continue with a regular number type check. */ } else if (ra_used(ir)) { lua_assert(irt_isnum(t) || irt_isint(t) || irt_isaddr(t)); dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : RSET_GPR); rset_clear(allow, dest); base = ra_alloc1(as, REF_BASE, allow); rset_clear(allow, base); if ((ir->op2 & IRSLOAD_CONVERT)) { if (irt_isint(t)) { Reg tmp = ra_scratch(as, RSET_FPR); emit_tg(as, MIPSI_MFC1, dest, tmp); emit_fg(as, MIPSI_CVT_W_D, tmp, tmp); dest = tmp; t.irt = IRT_NUM; /* Check for original type. */ } else { Reg tmp = ra_scratch(as, RSET_GPR); emit_fg(as, MIPSI_CVT_D_W, dest, dest); emit_tg(as, MIPSI_MTC1, tmp, dest); dest = tmp; t.irt = IRT_INT; /* Check for original type. */ } } goto dotypecheck; } base = ra_alloc1(as, REF_BASE, allow); rset_clear(allow, base); dotypecheck: if (irt_isnum(t)) { if ((ir->op2 & IRSLOAD_TYPECHECK)) { asm_guard(as, MIPSI_BEQ, RID_TMP, RID_ZERO); emit_tsi(as, MIPSI_SLTIU, RID_TMP, RID_TMP, (int32_t)LJ_TISNUM); type = RID_TMP; } if (ra_hasreg(dest)) emit_hsi(as, MIPSI_LDC1, dest, base, ofs); } else { if ((ir->op2 & IRSLOAD_TYPECHECK)) { Reg ktype = ra_allock(as, irt_toitype(t), allow); asm_guard(as, MIPSI_BNE, RID_TMP, ktype); type = RID_TMP; } if (ra_hasreg(dest)) emit_tsi(as, MIPSI_LW, dest, base, ofs ^ (LJ_BE?4:0)); } if (ra_hasreg(type)) emit_tsi(as, MIPSI_LW, type, base, ofs ^ (LJ_BE?0:4)); } /* -- Allocations --------------------------------------------------------- */ #if LJ_HASFFI static void asm_cnew(ASMState *as, IRIns *ir) { CTState *cts = ctype_ctsG(J2G(as->J)); CTypeID ctypeid = (CTypeID)IR(ir->op1)->i; CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ? lj_ctype_size(cts, ctypeid) : (CTSize)IR(ir->op2)->i; const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco]; IRRef args[2]; RegSet allow = (RSET_GPR & ~RSET_SCRATCH); RegSet drop = RSET_SCRATCH; lua_assert(sz != CTSIZE_INVALID); args[0] = ASMREF_L; /* lua_State *L */ args[1] = ASMREF_TMP1; /* MSize size */ as->gcsteps++; if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ ra_evictset(as, drop); if (ra_used(ir)) ra_destreg(as, ir, RID_RET); /* GCcdata * */ /* Initialize immutable cdata object. */ if (ir->o == IR_CNEWI) { int32_t ofs = sizeof(GCcdata); lua_assert(sz == 4 || sz == 8); if (sz == 8) { ofs += 4; lua_assert((ir+1)->o == IR_HIOP); if (LJ_LE) ir++; } for (;;) { Reg r = ra_alloc1z(as, ir->op2, allow); emit_tsi(as, MIPSI_SW, r, RID_RET, ofs); rset_clear(allow, r); if (ofs == sizeof(GCcdata)) break; ofs -= 4; if (LJ_BE) ir++; else ir--; } } /* Initialize gct and ctypeid. lj_mem_newgco() already sets marked. */ emit_tsi(as, MIPSI_SB, RID_RET+1, RID_RET, offsetof(GCcdata, gct)); emit_tsi(as, MIPSI_SH, RID_TMP, RID_RET, offsetof(GCcdata, ctypeid)); emit_ti(as, MIPSI_LI, RID_RET+1, ~LJ_TCDATA); emit_ti(as, MIPSI_LI, RID_TMP, ctypeid); /* Lower 16 bit used. Sign-ext ok. */ asm_gencall(as, ci, args); ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)), ra_releasetmp(as, ASMREF_TMP1)); } #else #define asm_cnew(as, ir) ((void)0) #endif /* -- Write barriers ------------------------------------------------------ */ static void asm_tbar(ASMState *as, IRIns *ir) { Reg tab = ra_alloc1(as, ir->op1, RSET_GPR); Reg mark = ra_scratch(as, rset_exclude(RSET_GPR, tab)); Reg link = RID_TMP; MCLabel l_end = emit_label(as); emit_tsi(as, MIPSI_SW, link, tab, (int32_t)offsetof(GCtab, gclist)); emit_tsi(as, MIPSI_SB, mark, tab, (int32_t)offsetof(GCtab, marked)); emit_setgl(as, tab, gc.grayagain); emit_getgl(as, link, gc.grayagain); emit_dst(as, MIPSI_XOR, mark, mark, RID_TMP); /* Clear black bit. */ emit_branch(as, MIPSI_BEQ, RID_TMP, RID_ZERO, l_end); emit_tsi(as, MIPSI_ANDI, RID_TMP, mark, LJ_GC_BLACK); emit_tsi(as, MIPSI_LBU, mark, tab, (int32_t)offsetof(GCtab, marked)); } static void asm_obar(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_barrieruv]; IRRef args[2]; MCLabel l_end; Reg obj, val, tmp; /* No need for other object barriers (yet). */ lua_assert(IR(ir->op1)->o == IR_UREFC); ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ir->op1; /* TValue *tv */ asm_gencall(as, ci, args); emit_tsi(as, MIPSI_ADDIU, ra_releasetmp(as, ASMREF_TMP1), RID_JGL, -32768); obj = IR(ir->op1)->r; tmp = ra_scratch(as, rset_exclude(RSET_GPR, obj)); emit_branch(as, MIPSI_BEQ, RID_TMP, RID_ZERO, l_end); emit_tsi(as, MIPSI_ANDI, tmp, tmp, LJ_GC_BLACK); emit_branch(as, MIPSI_BEQ, RID_TMP, RID_ZERO, l_end); emit_tsi(as, MIPSI_ANDI, RID_TMP, RID_TMP, LJ_GC_WHITES); val = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, obj)); emit_tsi(as, MIPSI_LBU, tmp, obj, (int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)); emit_tsi(as, MIPSI_LBU, RID_TMP, val, (int32_t)offsetof(GChead, marked)); } /* -- Arithmetic and logic operations ------------------------------------- */ static void asm_fparith(ASMState *as, IRIns *ir, MIPSIns mi) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = (left >> 8); left &= 255; emit_fgh(as, mi, dest, left, right); } static void asm_fpunary(ASMState *as, IRIns *ir, MIPSIns mi) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg left = ra_hintalloc(as, ir->op1, dest, RSET_FPR); emit_fg(as, mi, dest, left); } static int asm_fpjoin_pow(ASMState *as, IRIns *ir) { IRIns *irp = IR(ir->op1); if (irp == ir-1 && irp->o == IR_MUL && !ra_used(irp)) { IRIns *irpp = IR(irp->op1); if (irpp == ir-2 && irpp->o == IR_FPMATH && irpp->op2 == IRFPM_LOG2 && !ra_used(irpp)) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_pow]; IRRef args[2]; args[0] = irpp->op1; args[1] = irp->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); return 1; } } return 0; } static void asm_add(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { asm_fparith(as, ir, MIPSI_ADD_D); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (checki16(k)) { emit_tsi(as, MIPSI_ADDIU, dest, left, k); return; } } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_dst(as, MIPSI_ADDU, dest, left, right); } } static void asm_sub(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { asm_fparith(as, ir, MIPSI_SUB_D); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; emit_dst(as, MIPSI_SUBU, dest, left, right); } } static void asm_mul(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { asm_fparith(as, ir, MIPSI_MUL_D); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; emit_dst(as, MIPSI_MUL, dest, left, right); } } static void asm_neg(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { asm_fpunary(as, ir, MIPSI_NEG_D); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); emit_dst(as, MIPSI_SUBU, dest, RID_ZERO, left); } } static void asm_arithov(ASMState *as, IRIns *ir) { Reg right, left, tmp, dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op2)) { int k = IR(ir->op2)->i; if (ir->o == IR_SUBOV) k = -k; if (checki16(k)) { /* (dest < left) == (k >= 0 ? 1 : 0) */ left = ra_alloc1(as, ir->op1, RSET_GPR); asm_guard(as, k >= 0 ? MIPSI_BNE : MIPSI_BEQ, RID_TMP, RID_ZERO); emit_dst(as, MIPSI_SLT, RID_TMP, dest, dest == left ? RID_TMP : left); emit_tsi(as, MIPSI_ADDIU, dest, left, k); if (dest == left) emit_move(as, RID_TMP, left); return; } } left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; tmp = ra_scratch(as, rset_exclude(rset_exclude(rset_exclude(RSET_GPR, left), right), dest)); asm_guard(as, MIPSI_BLTZ, RID_TMP, 0); emit_dst(as, MIPSI_AND, RID_TMP, RID_TMP, tmp); if (ir->o == IR_ADDOV) { /* ((dest^left) & (dest^right)) < 0 */ emit_dst(as, MIPSI_XOR, RID_TMP, dest, dest == right ? RID_TMP : right); } else { /* ((dest^left) & (dest^~right)) < 0 */ emit_dst(as, MIPSI_XOR, RID_TMP, RID_TMP, dest); emit_dst(as, MIPSI_NOR, RID_TMP, dest == right ? RID_TMP : right, RID_ZERO); } emit_dst(as, MIPSI_XOR, tmp, dest, dest == left ? RID_TMP : left); emit_dst(as, ir->o == IR_ADDOV ? MIPSI_ADDU : MIPSI_SUBU, dest, left, right); if (dest == left || dest == right) emit_move(as, RID_TMP, dest == left ? left : right); } static void asm_mulov(ASMState *as, IRIns *ir) { #if LJ_DUALNUM #error "NYI: MULOV" #else UNUSED(as); UNUSED(ir); lua_assert(0); /* Unused in single-number mode. */ #endif } #if LJ_HASFFI static void asm_add64(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_alloc1(as, ir->op1, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (k == 0) { emit_dst(as, MIPSI_ADDU, dest, left, RID_TMP); goto loarith; } else if (checki16(k)) { emit_dst(as, MIPSI_ADDU, dest, dest, RID_TMP); emit_tsi(as, MIPSI_ADDIU, dest, left, k); goto loarith; } } emit_dst(as, MIPSI_ADDU, dest, dest, RID_TMP); right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_dst(as, MIPSI_ADDU, dest, left, right); loarith: ir--; dest = ra_dest(as, ir, RSET_GPR); left = ra_alloc1(as, ir->op1, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (k == 0) { if (dest != left) emit_move(as, dest, left); return; } else if (checki16(k)) { if (dest == left) { Reg tmp = ra_scratch(as, rset_exclude(RSET_GPR, left)); emit_move(as, dest, tmp); dest = tmp; } emit_dst(as, MIPSI_SLTU, RID_TMP, dest, left); emit_tsi(as, MIPSI_ADDIU, dest, left, k); return; } } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); if (dest == left && dest == right) { Reg tmp = ra_scratch(as, rset_exclude(rset_exclude(RSET_GPR, left), right)); emit_move(as, dest, tmp); dest = tmp; } emit_dst(as, MIPSI_SLTU, RID_TMP, dest, dest == left ? right : left); emit_dst(as, MIPSI_ADDU, dest, left, right); } static void asm_sub64(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; emit_dst(as, MIPSI_SUBU, dest, dest, RID_TMP); emit_dst(as, MIPSI_SUBU, dest, left, right); ir--; dest = ra_dest(as, ir, RSET_GPR); left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; if (dest == left) { Reg tmp = ra_scratch(as, rset_exclude(rset_exclude(RSET_GPR, left), right)); emit_move(as, dest, tmp); dest = tmp; } emit_dst(as, MIPSI_SLTU, RID_TMP, left, dest); emit_dst(as, MIPSI_SUBU, dest, left, right); } static void asm_neg64(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, RSET_GPR); emit_dst(as, MIPSI_SUBU, dest, dest, RID_TMP); emit_dst(as, MIPSI_SUBU, dest, RID_ZERO, left); ir--; dest = ra_dest(as, ir, RSET_GPR); left = ra_alloc1(as, ir->op1, RSET_GPR); emit_dst(as, MIPSI_SLTU, RID_TMP, RID_ZERO, dest); emit_dst(as, MIPSI_SUBU, dest, RID_ZERO, left); } #endif static void asm_bitnot(ASMState *as, IRIns *ir) { Reg left, right, dest = ra_dest(as, ir, RSET_GPR); IRIns *irl = IR(ir->op1); if (mayfuse(as, ir->op1) && irl->o == IR_BOR) { left = ra_alloc2(as, irl, RSET_GPR); right = (left >> 8); left &= 255; } else { left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); right = RID_ZERO; } emit_dst(as, MIPSI_NOR, dest, left, right); } static void asm_bitswap(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, RSET_GPR); if ((as->flags & JIT_F_MIPS32R2)) { emit_dta(as, MIPSI_ROTR, dest, RID_TMP, 16); emit_dst(as, MIPSI_WSBH, RID_TMP, 0, left); } else { Reg tmp = ra_scratch(as, rset_exclude(rset_exclude(RSET_GPR, left), dest)); emit_dst(as, MIPSI_OR, dest, dest, tmp); emit_dst(as, MIPSI_OR, dest, dest, RID_TMP); emit_tsi(as, MIPSI_ANDI, dest, dest, 0xff00); emit_dta(as, MIPSI_SLL, RID_TMP, RID_TMP, 8); emit_dta(as, MIPSI_SRL, dest, left, 8); emit_tsi(as, MIPSI_ANDI, RID_TMP, left, 0xff00); emit_dst(as, MIPSI_OR, tmp, tmp, RID_TMP); emit_dta(as, MIPSI_SRL, tmp, left, 24); emit_dta(as, MIPSI_SLL, RID_TMP, left, 24); } } static void asm_bitop(ASMState *as, IRIns *ir, MIPSIns mi, MIPSIns mik) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (checku16(k)) { emit_tsi(as, mik, dest, left, k); return; } } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_dst(as, mi, dest, left, right); } static void asm_bitshift(ASMState *as, IRIns *ir, MIPSIns mi, MIPSIns mik) { Reg dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op2)) { /* Constant shifts. */ uint32_t shift = (uint32_t)(IR(ir->op2)->i & 31); emit_dta(as, mik, dest, ra_hintalloc(as, ir->op1, dest, RSET_GPR), shift); } else { Reg right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; emit_dst(as, mi, dest, right, left); /* Shift amount is in rs. */ } } static void asm_bitror(ASMState *as, IRIns *ir) { if ((as->flags & JIT_F_MIPS32R2)) { asm_bitshift(as, ir, MIPSI_ROTRV, MIPSI_ROTR); } else { Reg dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op2)) { /* Constant shifts. */ uint32_t shift = (uint32_t)(IR(ir->op2)->i & 31); Reg left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); emit_rotr(as, dest, left, RID_TMP, shift); } else { Reg right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; emit_dst(as, MIPSI_OR, dest, dest, RID_TMP); emit_dst(as, MIPSI_SRLV, dest, right, left); emit_dst(as, MIPSI_SLLV, RID_TMP, RID_TMP, left); emit_dst(as, MIPSI_SUBU, RID_TMP, ra_allock(as, 32, RSET_GPR), right); } } } static void asm_min_max(ASMState *as, IRIns *ir, int ismax) { if (irt_isnum(ir->t)) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = (left >> 8); left &= 255; if (dest == left) { emit_fg(as, MIPSI_MOVT_D, dest, right); } else { emit_fg(as, MIPSI_MOVF_D, dest, left); if (dest != right) emit_fg(as, MIPSI_MOV_D, dest, right); } emit_fgh(as, MIPSI_C_OLT_D, 0, ismax ? left : right, ismax ? right : left); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; if (dest == left) { emit_dst(as, MIPSI_MOVN, dest, right, RID_TMP); } else { emit_dst(as, MIPSI_MOVZ, dest, left, RID_TMP); if (dest != right) emit_move(as, dest, right); } emit_dst(as, MIPSI_SLT, RID_TMP, ismax ? left : right, ismax ? right : left); } } /* -- Comparisons --------------------------------------------------------- */ static void asm_comp(ASMState *as, IRIns *ir) { /* ORDER IR: LT GE LE GT ULT UGE ULE UGT. */ IROp op = ir->o; if (irt_isnum(ir->t)) { Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = (left >> 8); left &= 255; asm_guard(as, (op&1) ? MIPSI_BC1T : MIPSI_BC1F, 0, 0); emit_fgh(as, MIPSI_C_OLT_D + ((op&3) ^ ((op>>2)&1)), 0, left, right); } else { Reg right, left = ra_alloc1(as, ir->op1, RSET_GPR); if (op == IR_ABC) op = IR_UGT; if ((op&4) == 0 && irref_isk(ir->op2) && IR(ir->op2)->i == 0) { MIPSIns mi = (op&2) ? ((op&1) ? MIPSI_BLEZ : MIPSI_BGTZ) : ((op&1) ? MIPSI_BLTZ : MIPSI_BGEZ); asm_guard(as, mi, left, 0); } else { if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if ((op&2)) k++; if (checki16(k)) { asm_guard(as, (op&1) ? MIPSI_BNE : MIPSI_BEQ, RID_TMP, RID_ZERO); emit_tsi(as, (op&4) ? MIPSI_SLTIU : MIPSI_SLTI, RID_TMP, left, k); return; } } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); asm_guard(as, ((op^(op>>1))&1) ? MIPSI_BNE : MIPSI_BEQ, RID_TMP, RID_ZERO); emit_dst(as, (op&4) ? MIPSI_SLTU : MIPSI_SLT, RID_TMP, (op&2) ? right : left, (op&2) ? left : right); } } } static void asm_compeq(ASMState *as, IRIns *ir) { Reg right, left = ra_alloc2(as, ir, irt_isnum(ir->t) ? RSET_FPR : RSET_GPR); right = (left >> 8); left &= 255; if (irt_isnum(ir->t)) { asm_guard(as, (ir->o & 1) ? MIPSI_BC1T : MIPSI_BC1F, 0, 0); emit_fgh(as, MIPSI_C_EQ_D, 0, left, right); } else { asm_guard(as, (ir->o & 1) ? MIPSI_BEQ : MIPSI_BNE, left, right); } } #if LJ_HASFFI /* 64 bit integer comparisons. */ static void asm_comp64(ASMState *as, IRIns *ir) { /* ORDER IR: LT GE LE GT ULT UGE ULE UGT. */ IROp op = (ir-1)->o; MCLabel l_end; Reg rightlo, leftlo, righthi, lefthi = ra_alloc2(as, ir, RSET_GPR); righthi = (lefthi >> 8); lefthi &= 255; leftlo = ra_alloc2(as, ir-1, rset_exclude(rset_exclude(RSET_GPR, lefthi), righthi)); rightlo = (leftlo >> 8); leftlo &= 255; asm_guard(as, ((op^(op>>1))&1) ? MIPSI_BNE : MIPSI_BEQ, RID_TMP, RID_ZERO); l_end = emit_label(as); if (lefthi != righthi) emit_dst(as, (op&4) ? MIPSI_SLTU : MIPSI_SLT, RID_TMP, (op&2) ? righthi : lefthi, (op&2) ? lefthi : righthi); emit_dst(as, MIPSI_SLTU, RID_TMP, (op&2) ? rightlo : leftlo, (op&2) ? leftlo : rightlo); if (lefthi != righthi) emit_branch(as, MIPSI_BEQ, lefthi, righthi, l_end); } static void asm_comp64eq(ASMState *as, IRIns *ir) { Reg tmp, right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; asm_guard(as, ((ir-1)->o & 1) ? MIPSI_BEQ : MIPSI_BNE, RID_TMP, RID_ZERO); tmp = ra_scratch(as, rset_exclude(rset_exclude(RSET_GPR, left), right)); emit_dst(as, MIPSI_OR, RID_TMP, RID_TMP, tmp); emit_dst(as, MIPSI_XOR, tmp, left, right); left = ra_alloc2(as, ir-1, RSET_GPR); right = (left >> 8); left &= 255; emit_dst(as, MIPSI_XOR, RID_TMP, left, right); } #endif /* -- Support for 64 bit ops in 32 bit mode ------------------------------- */ /* Hiword op of a split 64 bit op. Previous op must be the loword op. */ static void asm_hiop(ASMState *as, IRIns *ir) { #if LJ_HASFFI /* HIOP is marked as a store because it needs its own DCE logic. */ int uselo = ra_used(ir-1), usehi = ra_used(ir); /* Loword/hiword used? */ if (LJ_UNLIKELY(!(as->flags & JIT_F_OPT_DCE))) uselo = usehi = 1; if ((ir-1)->o == IR_CONV) { /* Conversions to/from 64 bit. */ as->curins--; /* Always skip the CONV. */ if (usehi || uselo) asm_conv64(as, ir); return; } else if ((ir-1)->o < IR_EQ) { /* 64 bit integer comparisons. ORDER IR. */ as->curins--; /* Always skip the loword comparison. */ asm_comp64(as, ir); return; } else if ((ir-1)->o <= IR_NE) { /* 64 bit integer comparisons. ORDER IR. */ as->curins--; /* Always skip the loword comparison. */ asm_comp64eq(as, ir); return; } else if ((ir-1)->o == IR_XSTORE) { as->curins--; /* Handle both stores here. */ if ((ir-1)->r != RID_SINK) { asm_xstore(as, ir, LJ_LE ? 4 : 0); asm_xstore(as, ir-1, LJ_LE ? 0 : 4); } return; } if (!usehi) return; /* Skip unused hiword op for all remaining ops. */ switch ((ir-1)->o) { case IR_ADD: as->curins--; asm_add64(as, ir); break; case IR_SUB: as->curins--; asm_sub64(as, ir); break; case IR_NEG: as->curins--; asm_neg64(as, ir); break; case IR_CALLN: case IR_CALLXS: if (!uselo) ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ break; case IR_CNEWI: /* Nothing to do here. Handled by lo op itself. */ break; default: lua_assert(0); break; } #else UNUSED(as); UNUSED(ir); lua_assert(0); /* Unused without FFI. */ #endif } /* -- Stack handling ------------------------------------------------------ */ /* Check Lua stack size for overflow. Use exit handler as fallback. */ static void asm_stack_check(ASMState *as, BCReg topslot, IRIns *irp, RegSet allow, ExitNo exitno) { /* Try to get an unused temp. register, otherwise spill/restore RID_RET*. */ Reg tmp, pbase = irp ? (ra_hasreg(irp->r) ? irp->r : RID_TMP) : RID_BASE; ExitNo oldsnap = as->snapno; rset_clear(allow, pbase); tmp = allow ? rset_pickbot(allow) : (pbase == RID_RETHI ? RID_RETLO : RID_RETHI); as->snapno = exitno; asm_guard(as, MIPSI_BNE, RID_TMP, RID_ZERO); as->snapno = oldsnap; if (allow == RSET_EMPTY) /* Restore temp. register. */ emit_tsi(as, MIPSI_LW, tmp, RID_SP, 0); else ra_modified(as, tmp); emit_tsi(as, MIPSI_SLTIU, RID_TMP, RID_TMP, (int32_t)(8*topslot)); emit_dst(as, MIPSI_SUBU, RID_TMP, tmp, pbase); emit_tsi(as, MIPSI_LW, tmp, tmp, offsetof(lua_State, maxstack)); if (pbase == RID_TMP) emit_getgl(as, RID_TMP, jit_base); emit_getgl(as, tmp, jit_L); if (allow == RSET_EMPTY) /* Spill temp. register. */ emit_tsi(as, MIPSI_SW, tmp, RID_SP, 0); } /* Restore Lua stack from on-trace state. */ static void asm_stack_restore(ASMState *as, SnapShot *snap) { SnapEntry *map = &as->T->snapmap[snap->mapofs]; SnapEntry *flinks = &as->T->snapmap[snap_nextofs(as->T, snap)-1]; MSize n, nent = snap->nent; /* Store the value of all modified slots to the Lua stack. */ for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; BCReg s = snap_slot(sn); int32_t ofs = 8*((int32_t)s-1); IRRef ref = snap_ref(sn); IRIns *ir = IR(ref); if ((sn & SNAP_NORESTORE)) continue; if (irt_isnum(ir->t)) { Reg src = ra_alloc1(as, ref, RSET_FPR); emit_hsi(as, MIPSI_SDC1, src, RID_BASE, ofs); } else { Reg type; RegSet allow = rset_exclude(RSET_GPR, RID_BASE); lua_assert(irt_ispri(ir->t) || irt_isaddr(ir->t) || irt_isinteger(ir->t)); if (!irt_ispri(ir->t)) { Reg src = ra_alloc1(as, ref, allow); rset_clear(allow, src); emit_tsi(as, MIPSI_SW, src, RID_BASE, ofs+(LJ_BE?4:0)); } if ((sn & (SNAP_CONT|SNAP_FRAME))) { if (s == 0) continue; /* Do not overwrite link to previous frame. */ type = ra_allock(as, (int32_t)(*flinks--), allow); } else { type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); } emit_tsi(as, MIPSI_SW, type, RID_BASE, ofs+(LJ_BE?0:4)); } checkmclim(as); } lua_assert(map + nent == flinks); } /* -- GC handling --------------------------------------------------------- */ /* Check GC threshold and do one or more GC steps. */ static void asm_gc_check(ASMState *as) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_step_jit]; IRRef args[2]; MCLabel l_end; Reg tmp; ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); /* Exit trace if in GCSatomic or GCSfinalize. Avoids syncing GC objects. */ /* Assumes asm_snap_prep() already done. */ asm_guard(as, MIPSI_BNE, RID_RET, RID_ZERO); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ASMREF_TMP2; /* MSize steps */ asm_gencall(as, ci, args); emit_tsi(as, MIPSI_ADDIU, ra_releasetmp(as, ASMREF_TMP1), RID_JGL, -32768); tmp = ra_releasetmp(as, ASMREF_TMP2); emit_loadi(as, tmp, as->gcsteps); /* Jump around GC step if GC total < GC threshold. */ emit_branch(as, MIPSI_BNE, RID_TMP, RID_ZERO, l_end); emit_dst(as, MIPSI_SLTU, RID_TMP, RID_TMP, tmp); emit_getgl(as, tmp, gc.threshold); emit_getgl(as, RID_TMP, gc.total); as->gcsteps = 0; checkmclim(as); } /* -- Loop handling ------------------------------------------------------- */ /* Fixup the loop branch. */ static void asm_loop_fixup(ASMState *as) { MCode *p = as->mctop; MCode *target = as->mcp; p[-1] = MIPSI_NOP; if (as->loopinv) { /* Inverted loop branch? */ /* asm_guard already inverted the cond branch. Only patch the target. */ p[-3] |= ((target-p+2) & 0x0000ffffu); } else { p[-2] = MIPSI_J|(((uintptr_t)target>>2)&0x03ffffffu); } } /* -- Head of trace ------------------------------------------------------- */ /* Coalesce BASE register for a root trace. */ static void asm_head_root_base(ASMState *as) { IRIns *ir = IR(REF_BASE); Reg r = ir->r; if (as->loopinv) as->mctop--; if (ra_hasreg(r)) { ra_free(as, r); if (rset_test(as->modset, r)) ir->r = RID_INIT; /* No inheritance for modified BASE register. */ if (r != RID_BASE) emit_move(as, r, RID_BASE); } } /* Coalesce BASE register for a side trace. */ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow) { IRIns *ir = IR(REF_BASE); Reg r = ir->r; if (as->loopinv) as->mctop--; if (ra_hasreg(r)) { ra_free(as, r); if (rset_test(as->modset, r)) ir->r = RID_INIT; /* No inheritance for modified BASE register. */ if (irp->r == r) { rset_clear(allow, r); /* Mark same BASE register as coalesced. */ } else if (ra_hasreg(irp->r) && rset_test(as->freeset, irp->r)) { rset_clear(allow, irp->r); emit_move(as, r, irp->r); /* Move from coalesced parent reg. */ } else { emit_getgl(as, r, jit_base); /* Otherwise reload BASE. */ } } return allow; } /* -- Tail of trace ------------------------------------------------------- */ /* Fixup the tail code. */ static void asm_tail_fixup(ASMState *as, TraceNo lnk) { MCode *target = lnk ? traceref(as->J,lnk)->mcode : (MCode *)lj_vm_exit_interp; int32_t spadj = as->T->spadjust; MCode *p = as->mctop-1; *p = spadj ? (MIPSI_ADDIU|MIPSF_T(RID_SP)|MIPSF_S(RID_SP)|spadj) : MIPSI_NOP; p[-1] = MIPSI_J|(((uintptr_t)target>>2)&0x03ffffffu); } /* Prepare tail of code. */ static void asm_tail_prep(ASMState *as) { as->mcp = as->mctop-2; /* Leave room for branch plus nop or stack adj. */ as->invmcp = as->loopref ? as->mcp : NULL; } /* -- Instruction dispatch ------------------------------------------------ */ /* Assemble a single instruction. */ static void asm_ir(ASMState *as, IRIns *ir) { switch ((IROp)ir->o) { /* Miscellaneous ops. */ case IR_LOOP: asm_loop(as); break; case IR_NOP: case IR_XBAR: lua_assert(!ra_used(ir)); break; case IR_USE: ra_alloc1(as, ir->op1, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); break; case IR_PHI: asm_phi(as, ir); break; case IR_HIOP: asm_hiop(as, ir); break; case IR_GCSTEP: asm_gcstep(as, ir); break; /* Guarded assertions. */ case IR_EQ: case IR_NE: asm_compeq(as, ir); break; case IR_LT: case IR_GE: case IR_LE: case IR_GT: case IR_ULT: case IR_UGE: case IR_ULE: case IR_UGT: case IR_ABC: asm_comp(as, ir); break; case IR_RETF: asm_retf(as, ir); break; /* Bit ops. */ case IR_BNOT: asm_bitnot(as, ir); break; case IR_BSWAP: asm_bitswap(as, ir); break; case IR_BAND: asm_bitop(as, ir, MIPSI_AND, MIPSI_ANDI); break; case IR_BOR: asm_bitop(as, ir, MIPSI_OR, MIPSI_ORI); break; case IR_BXOR: asm_bitop(as, ir, MIPSI_XOR, MIPSI_XORI); break; case IR_BSHL: asm_bitshift(as, ir, MIPSI_SLLV, MIPSI_SLL); break; case IR_BSHR: asm_bitshift(as, ir, MIPSI_SRLV, MIPSI_SRL); break; case IR_BSAR: asm_bitshift(as, ir, MIPSI_SRAV, MIPSI_SRA); break; case IR_BROL: lua_assert(0); break; case IR_BROR: asm_bitror(as, ir); break; /* Arithmetic ops. */ case IR_ADD: asm_add(as, ir); break; case IR_SUB: asm_sub(as, ir); break; case IR_MUL: asm_mul(as, ir); break; case IR_DIV: asm_fparith(as, ir, MIPSI_DIV_D); break; case IR_MOD: asm_callid(as, ir, IRCALL_lj_vm_modi); break; case IR_POW: asm_callid(as, ir, IRCALL_lj_vm_powi); break; case IR_NEG: asm_neg(as, ir); break; case IR_ABS: asm_fpunary(as, ir, MIPSI_ABS_D); break; case IR_ATAN2: asm_callid(as, ir, IRCALL_atan2); break; case IR_LDEXP: asm_callid(as, ir, IRCALL_ldexp); break; case IR_MIN: asm_min_max(as, ir, 0); break; case IR_MAX: asm_min_max(as, ir, 1); break; case IR_FPMATH: if (ir->op2 == IRFPM_EXP2 && asm_fpjoin_pow(as, ir)) break; if (ir->op2 <= IRFPM_TRUNC) asm_callround(as, ir, IRCALL_lj_vm_floor + ir->op2); else if (ir->op2 == IRFPM_SQRT) asm_fpunary(as, ir, MIPSI_SQRT_D); else asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2); break; /* Overflow-checking arithmetic ops. */ case IR_ADDOV: asm_arithov(as, ir); break; case IR_SUBOV: asm_arithov(as, ir); break; case IR_MULOV: asm_mulov(as, ir); break; /* Memory references. */ case IR_AREF: asm_aref(as, ir); break; case IR_HREF: asm_href(as, ir); break; case IR_HREFK: asm_hrefk(as, ir); break; case IR_NEWREF: asm_newref(as, ir); break; case IR_UREFO: case IR_UREFC: asm_uref(as, ir); break; case IR_FREF: asm_fref(as, ir); break; case IR_STRREF: asm_strref(as, ir); break; /* Loads and stores. */ case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: asm_ahuvload(as, ir); break; case IR_FLOAD: asm_fload(as, ir); break; case IR_XLOAD: asm_xload(as, ir); break; case IR_SLOAD: asm_sload(as, ir); break; case IR_ASTORE: case IR_HSTORE: case IR_USTORE: asm_ahustore(as, ir); break; case IR_FSTORE: asm_fstore(as, ir); break; case IR_XSTORE: asm_xstore(as, ir, 0); break; /* Allocations. */ case IR_SNEW: case IR_XSNEW: asm_snew(as, ir); break; case IR_TNEW: asm_tnew(as, ir); break; case IR_TDUP: asm_tdup(as, ir); break; case IR_CNEW: case IR_CNEWI: asm_cnew(as, ir); break; /* Write barriers. */ case IR_TBAR: asm_tbar(as, ir); break; case IR_OBAR: asm_obar(as, ir); break; /* Type conversions. */ case IR_CONV: asm_conv(as, ir); break; case IR_TOBIT: asm_tobit(as, ir); break; case IR_TOSTR: asm_tostr(as, ir); break; case IR_STRTO: asm_strto(as, ir); break; /* Calls. */ case IR_CALLN: case IR_CALLL: case IR_CALLS: asm_call(as, ir); break; case IR_CALLXS: asm_callx(as, ir); break; case IR_CARG: break; default: setintV(&as->J->errinfo, ir->o); lj_trace_err_info(as->J, LJ_TRERR_NYIIR); break; } } /* -- Trace setup --------------------------------------------------------- */ /* Ensure there are enough stack slots for call arguments. */ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) { IRRef args[CCI_NARGS_MAX*2]; uint32_t i, nargs = (int)CCI_NARGS(ci); int nslots = 4, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; asm_collectargs(as, ir, ci, args); for (i = 0; i < nargs; i++) { if (args[i] && irt_isfp(IR(args[i])->t) && nfpr > 0 && !(ci->flags & CCI_VARARG)) { nfpr--; ngpr -= irt_isnum(IR(args[i])->t) ? 2 : 1; } else if (args[i] && irt_isnum(IR(args[i])->t)) { nfpr = 0; ngpr = ngpr & ~1; if (ngpr > 0) ngpr -= 2; else nslots = (nslots+3) & ~1; } else { nfpr = 0; if (ngpr > 0) ngpr--; else nslots++; } } if (nslots > as->evenspill) /* Leave room for args in stack slots. */ as->evenspill = nslots; return irt_isfp(ir->t) ? REGSP_HINT(RID_FPRET) : REGSP_HINT(RID_RET); } static void asm_setup_target(ASMState *as) { asm_sparejump_setup(as); asm_exitstub_setup(as); } /* -- Trace patching ------------------------------------------------------ */ /* Patch exit jumps of existing machine code to a new target. */ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target) { MCode *p = T->mcode; MCode *pe = (MCode *)((char *)p + T->szmcode); MCode *px = exitstub_trace_addr(T, exitno); MCode *cstart = NULL, *cstop = NULL; MCode *mcarea = lj_mcode_patch(J, p, 0); MCode exitload = MIPSI_LI | MIPSF_T(RID_TMP) | exitno; MCode tjump = MIPSI_J|(((uintptr_t)target>>2)&0x03ffffffu); for (p++; p < pe; p++) { if (*p == exitload) { /* Look for load of exit number. */ if (((p[-1] ^ (px-p)) & 0xffffu) == 0) { /* Look for exitstub branch. */ ptrdiff_t delta = target - p; if (((delta + 0x8000) >> 16) == 0) { /* Patch in-range branch. */ patchbranch: p[-1] = (p[-1] & 0xffff0000u) | (delta & 0xffffu); *p = MIPSI_NOP; /* Replace the load of the exit number. */ cstop = p; if (!cstart) cstart = p-1; } else { /* Branch out of range. Use spare jump slot in mcarea. */ int i; for (i = 2; i < 2+MIPS_SPAREJUMP*2; i += 2) { if (mcarea[i] == tjump) { delta = mcarea+i - p; goto patchbranch; } else if (mcarea[i] == MIPSI_NOP) { mcarea[i] = tjump; cstart = mcarea+i; delta = mcarea+i - p; goto patchbranch; } } /* Ignore jump slot overflow. Child trace is simply not attached. */ } } else if (p+1 == pe) { /* Patch NOP after code for inverted loop branch. Use of J is ok. */ lua_assert(p[1] == MIPSI_NOP); p[1] = tjump; *p = MIPSI_NOP; /* Replace the load of the exit number. */ cstop = p+2; if (!cstart) cstart = p+1; } } } if (cstart) lj_mcode_sync(cstart, cstop); lj_mcode_patch(J, mcarea, 1); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_table.o0000664000000000000000000002633012213333064022466 0ustar rootrootELF>@@ UH]UHH]LeLmH HAAվtWHAt$HAuHHHAľHDDHADH]LeLmUHH]LeHHAԉDHH]LeUHAWAVAUATSHAU9IADLUľLDLtUDLZ LDuE)A&EDЉھLDLDLVtDLKDLUľLDLtUĉL LA~ھLLEăE¾LULQ]D}&U9U| LDLẺEȋUȃU̾LDLXuD9 LDLAھLDL u;]}MLULU̾LŰuLkUD)E+E9|ڋuLLDUDzuȃEċUȉUĉEȋULZD;}xH[A\A]A^A_]UHATSHHAľHHCx t HDH[A\]UHAWAVAUATSH8 IIƾLIHtDh ALID$HPI9T$vxtLA LAHLA9DHILA߉ھLID$@=vAt< tЃEȉHD{LHD9t$EtHHHcHH8 [A\A]A^A_]UHSHHHPHx&|t|t*HHufWfWpPHRH HAHHHit) < 0xfffeffffu)lj_gc.htable!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause\=foreachiforeachDgetnmaxninsertremoveconcatsortcopyTVlj_gc_barrierbacknumberVnumsetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx AC P $<AC P  d<AC Lk (AC M  ]AC CU ({AC Pf  AC E ((AC M (TeAC MS (AC M  $AC Ix AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @& ( &h ,h 12h 1@2 T O*\0Teqzxu+  h(  )<.6]G{Zk ^ee   @@.9   @PYgp~#2@P`n} lib_table.clj_ffh_table_getnsort_compset2auxsortlj_cf_table_sortlj_cf_table_concatlj_cf_table_maxn__PRETTY_FUNCTION__.4055lj_cf_table_foreachi__PRETTY_FUNCTION__.3991__PRETTY_FUNCTION__.4040lj_cf_table_removelj_cf_table_insert__PRETTY_FUNCTION__.3961lj_cf_table_foreachlj_lib_cf_tablelj_lib_init_tablelj_lib_checktablua_typelua_pushvaluelua_calllua_tobooleanlua_settoplua_lessthanlua_rawsetilua_rawgetilj_err_callerlj_tab_lenlj_lib_checkfunclj_lib_optstrlj_lib_optintlj_lib_checkintluaL_buffinitlj_obj_itypenamelj_err_callervluaL_addvalueluaL_addlstringluaL_pushresult__assert_faillj_tab_getinthlj_tab_setinthlj_tab_nextluaopen_tablelj_lib_register 8IVbt !"##)$9$j!$$!$!2$?W$%!$%!$!,$<$&!'.>(d)*&+$ ,0-<.`/q0 # ( -1x'&    1A2   (1%&:)]$23   ( 1? 3  & % * 3 2P Z _ (d 1 3  ( 1 % #* X/ 1A K #P U 1  '   ( 1S ] b (g 1   1  4 @  + 6@^H PX`e hpx @h,^Xe   tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vmevent.o0000664000000000000000000000744012213333050022716 0ustar rootrootELF>@@ UHH]LeLmLuH HADg StHxD8;ws HcGL4IMA~C H+CH=-HA~tAHSHJHKBxuPC@(tS$HCH)DA $H]LeLmLuUHH]LeLmLuH I_DAA!ƃ0G$HƹtTIl$H H5ID$xu8HH5 A DtDH]LeLmLu_VMEVENTSlj_vmevent.c(((tv)->it) == (~8u))lj_obj.h?VM handler failed: ((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->registrytv))->it) == (~11u))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))lj_vmevent_preparesetgcVGCC: (Debian 4.7.3-4) 4.7.3zRx $eAC TL $DAC T .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @N p &,12L@2OpW0`uhp0 P X   '  @eS^lzelj_vmevent.c__PRETTY_FUNCTION__.4737__PRETTY_FUNCTION__.3812lj_vmevent_preparelj_str_new__assert_faillj_tab_getstrlj_tab_getinthlj_state_growstacklj_vmevent_calllj_vm_pcallstderrfwritefputsfputc( -> H  M R`    -" `' 8 6  Hetarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ircall.h0000664000000000000000000002121512202141143022463 0ustar rootroot/* ** IR CALL* instruction definitions. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_IRCALL_H #define _LJ_IRCALL_H #include "lj_obj.h" #include "lj_ir.h" #include "lj_jit.h" /* C call info for CALL* instructions. */ typedef struct CCallInfo { ASMFunction func; /* Function pointer. */ uint32_t flags; /* Number of arguments and flags. */ } CCallInfo; #define CCI_NARGS(ci) ((ci)->flags & 0xff) /* Extract # of args. */ #define CCI_NARGS_MAX 32 /* Max. # of args. */ #define CCI_OTSHIFT 16 #define CCI_OPTYPE(ci) ((ci)->flags >> CCI_OTSHIFT) /* Get op/type. */ #define CCI_OPSHIFT 24 #define CCI_OP(ci) ((ci)->flags >> CCI_OPSHIFT) /* Get op. */ #define CCI_CALL_N (IR_CALLN << CCI_OPSHIFT) #define CCI_CALL_L (IR_CALLL << CCI_OPSHIFT) #define CCI_CALL_S (IR_CALLS << CCI_OPSHIFT) #define CCI_CALL_FN (CCI_CALL_N|CCI_CC_FASTCALL) #define CCI_CALL_FL (CCI_CALL_L|CCI_CC_FASTCALL) #define CCI_CALL_FS (CCI_CALL_S|CCI_CC_FASTCALL) /* C call info flags. */ #define CCI_L 0x0100 /* Implicit L arg. */ #define CCI_CASTU64 0x0200 /* Cast u64 result to number. */ #define CCI_NOFPRCLOBBER 0x0400 /* Does not clobber any FPRs. */ #define CCI_VARARG 0x0800 /* Vararg function. */ #define CCI_CC_MASK 0x3000 /* Calling convention mask. */ #define CCI_CC_SHIFT 12 /* ORDER CC */ #define CCI_CC_CDECL 0x0000 /* Default cdecl calling convention. */ #define CCI_CC_THISCALL 0x1000 /* Thiscall calling convention. */ #define CCI_CC_FASTCALL 0x2000 /* Fastcall calling convention. */ #define CCI_CC_STDCALL 0x3000 /* Stdcall calling convention. */ /* Helpers for conditional function definitions. */ #define IRCALLCOND_ANY(x) x #if LJ_TARGET_X86ORX64 #define IRCALLCOND_FPMATH(x) NULL #else #define IRCALLCOND_FPMATH(x) x #endif #if LJ_SOFTFP #define IRCALLCOND_SOFTFP(x) x #if LJ_HASFFI #define IRCALLCOND_SOFTFP_FFI(x) x #else #define IRCALLCOND_SOFTFP_FFI(x) NULL #endif #else #define IRCALLCOND_SOFTFP(x) NULL #define IRCALLCOND_SOFTFP_FFI(x) NULL #endif #define LJ_NEED_FP64 (LJ_TARGET_ARM || LJ_TARGET_PPC || LJ_TARGET_MIPS) #if LJ_HASFFI && (LJ_SOFTFP || LJ_NEED_FP64) #define IRCALLCOND_FP64_FFI(x) x #else #define IRCALLCOND_FP64_FFI(x) NULL #endif #if LJ_HASFFI #define IRCALLCOND_FFI(x) x #if LJ_32 #define IRCALLCOND_FFI32(x) x #else #define IRCALLCOND_FFI32(x) NULL #endif #else #define IRCALLCOND_FFI(x) NULL #define IRCALLCOND_FFI32(x) NULL #endif #if LJ_SOFTFP #define ARG1_FP 2 /* Treat as 2 32 bit arguments. */ #else #define ARG1_FP 1 #endif #if LJ_32 #define ARG2_64 4 /* Treat as 4 32 bit arguments. */ #else #define ARG2_64 2 #endif /* Function definitions for CALL* instructions. */ #define IRCALLDEF(_) \ _(ANY, lj_str_cmp, 2, FN, INT, CCI_NOFPRCLOBBER) \ _(ANY, lj_str_new, 3, S, STR, CCI_L) \ _(ANY, lj_strscan_num, 2, FN, INT, 0) \ _(ANY, lj_str_fromint, 2, FN, STR, CCI_L) \ _(ANY, lj_str_fromnum, 2, FN, STR, CCI_L) \ _(ANY, lj_tab_new1, 2, FS, TAB, CCI_L) \ _(ANY, lj_tab_dup, 2, FS, TAB, CCI_L) \ _(ANY, lj_tab_newkey, 3, S, P32, CCI_L) \ _(ANY, lj_tab_len, 1, FL, INT, 0) \ _(ANY, lj_gc_step_jit, 2, FS, NIL, CCI_L) \ _(ANY, lj_gc_barrieruv, 2, FS, NIL, 0) \ _(ANY, lj_mem_newgco, 2, FS, P32, CCI_L) \ _(ANY, lj_math_random_step, 1, FS, NUM, CCI_CASTU64|CCI_NOFPRCLOBBER) \ _(ANY, lj_vm_modi, 2, FN, INT, 0) \ _(ANY, sinh, ARG1_FP, N, NUM, 0) \ _(ANY, cosh, ARG1_FP, N, NUM, 0) \ _(ANY, tanh, ARG1_FP, N, NUM, 0) \ _(ANY, fputc, 2, S, INT, 0) \ _(ANY, fwrite, 4, S, INT, 0) \ _(ANY, fflush, 1, S, INT, 0) \ /* ORDER FPM */ \ _(FPMATH, lj_vm_floor, ARG1_FP, N, NUM, 0) \ _(FPMATH, lj_vm_ceil, ARG1_FP, N, NUM, 0) \ _(FPMATH, lj_vm_trunc, ARG1_FP, N, NUM, 0) \ _(FPMATH, sqrt, ARG1_FP, N, NUM, 0) \ _(FPMATH, exp, ARG1_FP, N, NUM, 0) \ _(FPMATH, lj_vm_exp2, ARG1_FP, N, NUM, 0) \ _(FPMATH, log, ARG1_FP, N, NUM, 0) \ _(FPMATH, lj_vm_log2, ARG1_FP, N, NUM, 0) \ _(FPMATH, log10, ARG1_FP, N, NUM, 0) \ _(FPMATH, sin, ARG1_FP, N, NUM, 0) \ _(FPMATH, cos, ARG1_FP, N, NUM, 0) \ _(FPMATH, tan, ARG1_FP, N, NUM, 0) \ _(FPMATH, lj_vm_powi, ARG1_FP+1, N, NUM, 0) \ _(FPMATH, pow, ARG1_FP*2, N, NUM, 0) \ _(FPMATH, atan2, ARG1_FP*2, N, NUM, 0) \ _(FPMATH, ldexp, ARG1_FP+1, N, NUM, 0) \ _(SOFTFP, lj_vm_tobit, 2, N, INT, 0) \ _(SOFTFP, softfp_add, 4, N, NUM, 0) \ _(SOFTFP, softfp_sub, 4, N, NUM, 0) \ _(SOFTFP, softfp_mul, 4, N, NUM, 0) \ _(SOFTFP, softfp_div, 4, N, NUM, 0) \ _(SOFTFP, softfp_cmp, 4, N, NIL, 0) \ _(SOFTFP, softfp_i2d, 1, N, NUM, 0) \ _(SOFTFP, softfp_d2i, 2, N, INT, 0) \ _(SOFTFP_FFI, softfp_ui2d, 1, N, NUM, 0) \ _(SOFTFP_FFI, softfp_f2d, 1, N, NUM, 0) \ _(SOFTFP_FFI, softfp_d2ui, 2, N, INT, 0) \ _(SOFTFP_FFI, softfp_d2f, 2, N, FLOAT, 0) \ _(SOFTFP_FFI, softfp_i2f, 1, N, FLOAT, 0) \ _(SOFTFP_FFI, softfp_ui2f, 1, N, FLOAT, 0) \ _(SOFTFP_FFI, softfp_f2i, 1, N, INT, 0) \ _(SOFTFP_FFI, softfp_f2ui, 1, N, INT, 0) \ _(FP64_FFI, fp64_l2d, 2, N, NUM, 0) \ _(FP64_FFI, fp64_ul2d, 2, N, NUM, 0) \ _(FP64_FFI, fp64_l2f, 2, N, FLOAT, 0) \ _(FP64_FFI, fp64_ul2f, 2, N, FLOAT, 0) \ _(FP64_FFI, fp64_d2l, ARG1_FP, N, I64, 0) \ _(FP64_FFI, fp64_d2ul, ARG1_FP, N, U64, 0) \ _(FP64_FFI, fp64_f2l, 1, N, I64, 0) \ _(FP64_FFI, fp64_f2ul, 1, N, U64, 0) \ _(FFI, lj_carith_divi64, ARG2_64, N, I64, CCI_NOFPRCLOBBER) \ _(FFI, lj_carith_divu64, ARG2_64, N, U64, CCI_NOFPRCLOBBER) \ _(FFI, lj_carith_modi64, ARG2_64, N, I64, CCI_NOFPRCLOBBER) \ _(FFI, lj_carith_modu64, ARG2_64, N, U64, CCI_NOFPRCLOBBER) \ _(FFI, lj_carith_powi64, ARG2_64, N, I64, CCI_NOFPRCLOBBER) \ _(FFI, lj_carith_powu64, ARG2_64, N, U64, CCI_NOFPRCLOBBER) \ _(FFI, lj_cdata_setfin, 2, FN, P32, CCI_L) \ _(FFI, strlen, 1, L, INTP, 0) \ _(FFI, memcpy, 3, S, PTR, 0) \ _(FFI, memset, 3, S, PTR, 0) \ _(FFI, lj_vm_errno, 0, S, INT, CCI_NOFPRCLOBBER) \ _(FFI32, lj_carith_mul64, ARG2_64, N, I64, CCI_NOFPRCLOBBER) \ /* End of list. */ typedef enum { #define IRCALLENUM(cond, name, nargs, kind, type, flags) IRCALL_##name, IRCALLDEF(IRCALLENUM) #undef IRCALLENUM IRCALL__MAX } IRCallID; LJ_FUNC TRef lj_ir_call(jit_State *J, IRCallID id, ...); LJ_DATA const CCallInfo lj_ir_callinfo[IRCALL__MAX+1]; /* Soft-float declarations. */ #if LJ_SOFTFP #if LJ_TARGET_ARM #define softfp_add __aeabi_dadd #define softfp_sub __aeabi_dsub #define softfp_mul __aeabi_dmul #define softfp_div __aeabi_ddiv #define softfp_cmp __aeabi_cdcmple #define softfp_i2d __aeabi_i2d #define softfp_d2i __aeabi_d2iz #define softfp_ui2d __aeabi_ui2d #define softfp_f2d __aeabi_f2d #define softfp_d2ui __aeabi_d2uiz #define softfp_d2f __aeabi_d2f #define softfp_i2f __aeabi_i2f #define softfp_ui2f __aeabi_ui2f #define softfp_f2i __aeabi_f2iz #define softfp_f2ui __aeabi_f2uiz #define fp64_l2d __aeabi_l2d #define fp64_ul2d __aeabi_ul2d #define fp64_l2f __aeabi_l2f #define fp64_ul2f __aeabi_ul2f #if LJ_TARGET_IOS #define fp64_d2l __fixdfdi #define fp64_d2ul __fixunsdfdi #define fp64_f2l __fixsfdi #define fp64_f2ul __fixunssfdi #else #define fp64_d2l __aeabi_d2lz #define fp64_d2ul __aeabi_d2ulz #define fp64_f2l __aeabi_f2lz #define fp64_f2ul __aeabi_f2ulz #endif #else #error "Missing soft-float definitions for target architecture" #endif extern double softfp_add(double a, double b); extern double softfp_sub(double a, double b); extern double softfp_mul(double a, double b); extern double softfp_div(double a, double b); extern void softfp_cmp(double a, double b); extern double softfp_i2d(int32_t a); extern int32_t softfp_d2i(double a); #if LJ_HASFFI extern double softfp_ui2d(uint32_t a); extern double softfp_f2d(float a); extern uint32_t softfp_d2ui(double a); extern float softfp_d2f(double a); extern float softfp_i2f(int32_t a); extern float softfp_ui2f(uint32_t a); extern int32_t softfp_f2i(float a); extern uint32_t softfp_f2ui(float a); #endif #endif #if LJ_HASFFI && LJ_NEED_FP64 && !(LJ_TARGET_ARM && LJ_SOFTFP) #ifdef __GNUC__ #define fp64_l2d __floatdidf #define fp64_ul2d __floatundidf #define fp64_l2f __floatdisf #define fp64_ul2f __floatundisf #define fp64_d2l __fixdfdi #define fp64_d2ul __fixunsdfdi #define fp64_f2l __fixsfdi #define fp64_f2ul __fixunssfdi #else #error "Missing fp64 helper definitions for this compiler" #endif #endif #if LJ_HASFFI && (LJ_SOFTFP || LJ_NEED_FP64) extern double fp64_l2d(int64_t a); extern double fp64_ul2d(uint64_t a); extern float fp64_l2f(int64_t a); extern float fp64_ul2f(uint64_t a); extern int64_t fp64_d2l(double a); extern uint64_t fp64_d2ul(double a); extern int64_t fp64_f2l(float a); extern uint64_t fp64_f2ul(float a); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_asm_ppc.h0000664000000000000000000021206012202141143022637 0ustar rootroot/* ** PPC IR assembler (SSA IR -> machine code). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Register allocator extensions --------------------------------------- */ /* Allocate a register with a hint. */ static Reg ra_hintalloc(ASMState *as, IRRef ref, Reg hint, RegSet allow) { Reg r = IR(ref)->r; if (ra_noreg(r)) { if (!ra_hashint(r) && !iscrossref(as, ref)) ra_sethint(IR(ref)->r, hint); /* Propagate register hint. */ r = ra_allocref(as, ref, allow); } ra_noweak(as, r); return r; } /* Allocate two source registers for three-operand instructions. */ static Reg ra_alloc2(ASMState *as, IRIns *ir, RegSet allow) { IRIns *irl = IR(ir->op1), *irr = IR(ir->op2); Reg left = irl->r, right = irr->r; if (ra_hasreg(left)) { ra_noweak(as, left); if (ra_noreg(right)) right = ra_allocref(as, ir->op2, rset_exclude(allow, left)); else ra_noweak(as, right); } else if (ra_hasreg(right)) { ra_noweak(as, right); left = ra_allocref(as, ir->op1, rset_exclude(allow, right)); } else if (ra_hashint(right)) { right = ra_allocref(as, ir->op2, allow); left = ra_alloc1(as, ir->op1, rset_exclude(allow, right)); } else { left = ra_allocref(as, ir->op1, allow); right = ra_alloc1(as, ir->op2, rset_exclude(allow, left)); } return left | (right << 8); } /* -- Guard handling ------------------------------------------------------ */ /* Setup exit stubs after the end of each trace. */ static void asm_exitstub_setup(ASMState *as, ExitNo nexits) { ExitNo i; MCode *mxp = as->mctop; /* 1: mflr r0; bl ->vm_exit_handler; li r0, traceno; bl <1; bl <1; ... */ for (i = nexits-1; (int32_t)i >= 0; i--) *--mxp = PPCI_BL|(((-3-i)&0x00ffffffu)<<2); *--mxp = PPCI_LI|PPCF_T(RID_TMP)|as->T->traceno; /* Read by exit handler. */ mxp--; *mxp = PPCI_BL|((((MCode *)(void *)lj_vm_exit_handler-mxp)&0x00ffffffu)<<2); *--mxp = PPCI_MFLR|PPCF_T(RID_TMP); as->mctop = mxp; } static MCode *asm_exitstub_addr(ASMState *as, ExitNo exitno) { /* Keep this in-sync with exitstub_trace_addr(). */ return as->mctop + exitno + 3; } /* Emit conditional branch to exit for guard. */ static void asm_guardcc(ASMState *as, PPCCC cc) { MCode *target = asm_exitstub_addr(as, as->snapno); MCode *p = as->mcp; if (LJ_UNLIKELY(p == as->invmcp)) { as->loopinv = 1; *p = PPCI_B | (((target-p) & 0x00ffffffu) << 2); emit_condbranch(as, PPCI_BC, cc^4, p); return; } emit_condbranch(as, PPCI_BC, cc, target); } /* -- Operand fusion ------------------------------------------------------ */ /* Limit linear search to this distance. Avoids O(n^2) behavior. */ #define CONFLICT_SEARCH_LIM 31 /* Check if there's no conflicting instruction between curins and ref. */ static int noconflict(ASMState *as, IRRef ref, IROp conflict) { IRIns *ir = as->ir; IRRef i = as->curins; if (i > ref + CONFLICT_SEARCH_LIM) return 0; /* Give up, ref is too far away. */ while (--i > ref) if (ir[i].o == conflict) return 0; /* Conflict found. */ return 1; /* Ok, no conflict. */ } /* Fuse the array base of colocated arrays. */ static int32_t asm_fuseabase(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); if (ir->o == IR_TNEW && ir->op1 <= LJ_MAX_COLOSIZE && !neverfuse(as) && noconflict(as, ref, IR_NEWREF)) return (int32_t)sizeof(GCtab); return 0; } /* Indicates load/store indexed is ok. */ #define AHUREF_LSX ((int32_t)0x80000000) /* Fuse array/hash/upvalue reference into register+offset operand. */ static Reg asm_fuseahuref(ASMState *as, IRRef ref, int32_t *ofsp, RegSet allow) { IRIns *ir = IR(ref); if (ra_noreg(ir->r)) { if (ir->o == IR_AREF) { if (mayfuse(as, ref)) { if (irref_isk(ir->op2)) { IRRef tab = IR(ir->op1)->op1; int32_t ofs = asm_fuseabase(as, tab); IRRef refa = ofs ? tab : ir->op1; ofs += 8*IR(ir->op2)->i; if (checki16(ofs)) { *ofsp = ofs; return ra_alloc1(as, refa, allow); } } if (*ofsp == AHUREF_LSX) { Reg base = ra_alloc1(as, ir->op1, allow); Reg idx = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, base)); return base | (idx << 8); } } } else if (ir->o == IR_HREFK) { if (mayfuse(as, ref)) { int32_t ofs = (int32_t)(IR(ir->op2)->op2 * sizeof(Node)); if (checki16(ofs)) { *ofsp = ofs; return ra_alloc1(as, ir->op1, allow); } } } else if (ir->o == IR_UREFC) { if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); int32_t ofs = i32ptr(&gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.tv); int32_t jgl = (intptr_t)J2G(as->J); if ((uint32_t)(ofs-jgl) < 65536) { *ofsp = ofs-jgl-32768; return RID_JGL; } else { *ofsp = (int16_t)ofs; return ra_allock(as, ofs-(int16_t)ofs, allow); } } } } *ofsp = 0; return ra_alloc1(as, ref, allow); } /* Fuse XLOAD/XSTORE reference into load/store operand. */ static void asm_fusexref(ASMState *as, PPCIns pi, Reg rt, IRRef ref, RegSet allow, int32_t ofs) { IRIns *ir = IR(ref); Reg base; if (ra_noreg(ir->r) && canfuse(as, ir)) { if (ir->o == IR_ADD) { int32_t ofs2; if (irref_isk(ir->op2) && (ofs2 = ofs + IR(ir->op2)->i, checki16(ofs2))) { ofs = ofs2; ref = ir->op1; } else if (ofs == 0) { Reg right, left = ra_alloc2(as, ir, allow); right = (left >> 8); left &= 255; emit_fab(as, PPCI_LWZX | ((pi >> 20) & 0x780), rt, left, right); return; } } else if (ir->o == IR_STRREF) { lua_assert(ofs == 0); ofs = (int32_t)sizeof(GCstr); if (irref_isk(ir->op2)) { ofs += IR(ir->op2)->i; ref = ir->op1; } else if (irref_isk(ir->op1)) { ofs += IR(ir->op1)->i; ref = ir->op2; } else { /* NYI: Fuse ADD with constant. */ Reg tmp, right, left = ra_alloc2(as, ir, allow); right = (left >> 8); left &= 255; tmp = ra_scratch(as, rset_exclude(rset_exclude(allow, left), right)); emit_fai(as, pi, rt, tmp, ofs); emit_tab(as, PPCI_ADD, tmp, left, right); return; } if (!checki16(ofs)) { Reg left = ra_alloc1(as, ref, allow); Reg right = ra_allock(as, ofs, rset_exclude(allow, left)); emit_fab(as, PPCI_LWZX | ((pi >> 20) & 0x780), rt, left, right); return; } } } base = ra_alloc1(as, ref, allow); emit_fai(as, pi, rt, base, ofs); } /* Fuse XLOAD/XSTORE reference into indexed-only load/store operand. */ static void asm_fusexrefx(ASMState *as, PPCIns pi, Reg rt, IRRef ref, RegSet allow) { IRIns *ira = IR(ref); Reg right, left; if (canfuse(as, ira) && ira->o == IR_ADD && ra_noreg(ira->r)) { left = ra_alloc2(as, ira, allow); right = (left >> 8); left &= 255; } else { right = ra_alloc1(as, ref, allow); left = RID_R0; } emit_tab(as, pi, rt, left, right); } /* Fuse to multiply-add/sub instruction. */ static int asm_fusemadd(ASMState *as, IRIns *ir, PPCIns pi, PPCIns pir) { IRRef lref = ir->op1, rref = ir->op2; IRIns *irm; if (lref != rref && ((mayfuse(as, lref) && (irm = IR(lref), irm->o == IR_MUL) && ra_noreg(irm->r)) || (mayfuse(as, rref) && (irm = IR(rref), irm->o == IR_MUL) && (rref = lref, pi = pir, ra_noreg(irm->r))))) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg add = ra_alloc1(as, rref, RSET_FPR); Reg right, left = ra_alloc2(as, irm, rset_exclude(RSET_FPR, add)); right = (left >> 8); left &= 255; emit_facb(as, pi, dest, left, right, add); return 1; } return 0; } /* -- Calls --------------------------------------------------------------- */ /* Generate a call to a C function. */ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) { uint32_t n, nargs = CCI_NARGS(ci); int32_t ofs = 8; Reg gpr = REGARG_FIRSTGPR, fpr = REGARG_FIRSTFPR; if ((void *)ci->func) emit_call(as, (void *)ci->func); for (n = 0; n < nargs; n++) { /* Setup args. */ IRRef ref = args[n]; if (ref) { IRIns *ir = IR(ref); if (irt_isfp(ir->t)) { if (fpr <= REGARG_LASTFPR) { lua_assert(rset_test(as->freeset, fpr)); /* Already evicted. */ ra_leftov(as, fpr, ref); fpr++; } else { Reg r = ra_alloc1(as, ref, RSET_FPR); if (irt_isnum(ir->t)) ofs = (ofs + 4) & ~4; emit_spstore(as, ir, r, ofs); ofs += irt_isnum(ir->t) ? 8 : 4; } } else { if (gpr <= REGARG_LASTGPR) { lua_assert(rset_test(as->freeset, gpr)); /* Already evicted. */ ra_leftov(as, gpr, ref); gpr++; } else { Reg r = ra_alloc1(as, ref, RSET_GPR); emit_spstore(as, ir, r, ofs); ofs += 4; } } } else { if (gpr <= REGARG_LASTGPR) gpr++; else ofs += 4; } checkmclim(as); } if ((ci->flags & CCI_VARARG)) /* Vararg calls need to know about FPR use. */ emit_tab(as, fpr == REGARG_FIRSTFPR ? PPCI_CRXOR : PPCI_CREQV, 6, 6, 6); } /* Setup result reg/sp for call. Evict scratch regs. */ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) { RegSet drop = RSET_SCRATCH; int hiop = ((ir+1)->o == IR_HIOP); if ((ci->flags & CCI_NOFPRCLOBBER)) drop &= ~RSET_FPR; if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ if (hiop && ra_hasreg((ir+1)->r)) rset_clear(drop, (ir+1)->r); /* Dest reg handled below. */ ra_evictset(as, drop); /* Evictions must be performed first. */ if (ra_used(ir)) { lua_assert(!irt_ispri(ir->t)); if (irt_isfp(ir->t)) { if ((ci->flags & CCI_CASTU64)) { /* Use spill slot or temp slots. */ int32_t ofs = ir->s ? sps_scale(ir->s) : SPOFS_TMP; Reg dest = ir->r; if (ra_hasreg(dest)) { ra_free(as, dest); ra_modified(as, dest); emit_fai(as, PPCI_LFD, dest, RID_SP, ofs); } emit_tai(as, PPCI_STW, RID_RETHI, RID_SP, ofs); emit_tai(as, PPCI_STW, RID_RETLO, RID_SP, ofs+4); } else { ra_destreg(as, ir, RID_FPRET); } } else if (hiop) { ra_destpair(as, ir); } else { ra_destreg(as, ir, RID_RET); } } } static void asm_call(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX]; const CCallInfo *ci = &lj_ir_callinfo[ir->op2]; asm_collectargs(as, ir, ci, args); asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } static void asm_callx(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX*2]; CCallInfo ci; IRRef func; IRIns *irf; ci.flags = asm_callx_flags(as, ir); asm_collectargs(as, ir, &ci, args); asm_setupresult(as, ir, &ci); func = ir->op2; irf = IR(func); if (irf->o == IR_CARG) { func = irf->op1; irf = IR(func); } if (irref_isk(func)) { /* Call to constant address. */ ci.func = (ASMFunction)(void *)(irf->i); } else { /* Need a non-argument register for indirect calls. */ RegSet allow = RSET_GPR & ~RSET_RANGE(RID_R0, REGARG_LASTGPR+1); Reg freg = ra_alloc1(as, func, allow); *--as->mcp = PPCI_BCTRL; *--as->mcp = PPCI_MTCTR | PPCF_T(freg); ci.func = (ASMFunction)(void *)0; } asm_gencall(as, &ci, args); } static void asm_callid(ASMState *as, IRIns *ir, IRCallID id) { const CCallInfo *ci = &lj_ir_callinfo[id]; IRRef args[2]; args[0] = ir->op1; args[1] = ir->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } /* -- Returns ------------------------------------------------------------- */ /* Return to lower frame. Guard that it goes to the right spot. */ static void asm_retf(ASMState *as, IRIns *ir) { Reg base = ra_alloc1(as, REF_BASE, RSET_GPR); void *pc = ir_kptr(IR(ir->op2)); int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); as->topslot -= (BCReg)delta; if ((int32_t)as->topslot < 0) as->topslot = 0; emit_setgl(as, base, jit_base); emit_addptr(as, base, -8*delta); asm_guardcc(as, CC_NE); emit_ab(as, PPCI_CMPW, RID_TMP, ra_allock(as, i32ptr(pc), rset_exclude(RSET_GPR, base))); emit_tai(as, PPCI_LWZ, RID_TMP, base, -8); } /* -- Type conversions ---------------------------------------------------- */ static void asm_tointg(ASMState *as, IRIns *ir, Reg left) { RegSet allow = RSET_FPR; Reg tmp = ra_scratch(as, rset_clear(allow, left)); Reg fbias = ra_scratch(as, rset_clear(allow, tmp)); Reg dest = ra_dest(as, ir, RSET_GPR); Reg hibias = ra_allock(as, 0x43300000, rset_exclude(RSET_GPR, dest)); asm_guardcc(as, CC_NE); emit_fab(as, PPCI_FCMPU, 0, tmp, left); emit_fab(as, PPCI_FSUB, tmp, tmp, fbias); emit_fai(as, PPCI_LFD, tmp, RID_SP, SPOFS_TMP); emit_tai(as, PPCI_STW, RID_TMP, RID_SP, SPOFS_TMPLO); emit_tai(as, PPCI_STW, hibias, RID_SP, SPOFS_TMPHI); emit_asi(as, PPCI_XORIS, RID_TMP, dest, 0x8000); emit_tai(as, PPCI_LWZ, dest, RID_SP, SPOFS_TMPLO); emit_lsptr(as, PPCI_LFS, (fbias & 31), (void *)lj_ir_k64_find(as->J, U64x(59800004,59800000)), RSET_GPR); emit_fai(as, PPCI_STFD, tmp, RID_SP, SPOFS_TMP); emit_fb(as, PPCI_FCTIWZ, tmp, left); } static void asm_tobit(ASMState *as, IRIns *ir) { RegSet allow = RSET_FPR; Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, allow); Reg right = ra_alloc1(as, ir->op2, rset_clear(allow, left)); Reg tmp = ra_scratch(as, rset_clear(allow, right)); emit_tai(as, PPCI_LWZ, dest, RID_SP, SPOFS_TMPLO); emit_fai(as, PPCI_STFD, tmp, RID_SP, SPOFS_TMP); emit_fab(as, PPCI_FADD, tmp, left, right); } static void asm_conv(ASMState *as, IRIns *ir) { IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); int stfp = (st == IRT_NUM || st == IRT_FLOAT); IRRef lref = ir->op1; lua_assert(irt_type(ir->t) != st); lua_assert(!(irt_isint64(ir->t) || (st == IRT_I64 || st == IRT_U64))); /* Handled by SPLIT. */ if (irt_isfp(ir->t)) { Reg dest = ra_dest(as, ir, RSET_FPR); if (stfp) { /* FP to FP conversion. */ if (st == IRT_NUM) /* double -> float conversion. */ emit_fb(as, PPCI_FRSP, dest, ra_alloc1(as, lref, RSET_FPR)); else /* float -> double conversion is a no-op on PPC. */ ra_leftov(as, dest, lref); /* Do nothing, but may need to move regs. */ } else { /* Integer to FP conversion. */ /* IRT_INT: Flip hibit, bias with 2^52, subtract 2^52+2^31. */ /* IRT_U32: Bias with 2^52, subtract 2^52. */ RegSet allow = RSET_GPR; Reg left = ra_alloc1(as, lref, allow); Reg hibias = ra_allock(as, 0x43300000, rset_clear(allow, left)); Reg fbias = ra_scratch(as, rset_exclude(RSET_FPR, dest)); const float *kbias; if (irt_isfloat(ir->t)) emit_fb(as, PPCI_FRSP, dest, dest); emit_fab(as, PPCI_FSUB, dest, dest, fbias); emit_fai(as, PPCI_LFD, dest, RID_SP, SPOFS_TMP); kbias = (const float *)lj_ir_k64_find(as->J, U64x(59800004,59800000)); if (st == IRT_U32) kbias++; emit_lsptr(as, PPCI_LFS, (fbias & 31), (void *)kbias, rset_clear(allow, hibias)); emit_tai(as, PPCI_STW, st == IRT_U32 ? left : RID_TMP, RID_SP, SPOFS_TMPLO); emit_tai(as, PPCI_STW, hibias, RID_SP, SPOFS_TMPHI); if (st != IRT_U32) emit_asi(as, PPCI_XORIS, RID_TMP, left, 0x8000); } } else if (stfp) { /* FP to integer conversion. */ if (irt_isguard(ir->t)) { /* Checked conversions are only supported from number to int. */ lua_assert(irt_isint(ir->t) && st == IRT_NUM); asm_tointg(as, ir, ra_alloc1(as, lref, RSET_FPR)); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, lref, RSET_FPR); Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, left)); if (irt_isu32(ir->t)) { /* Convert both x and x-2^31 to int and merge results. */ Reg tmpi = ra_scratch(as, rset_exclude(RSET_GPR, dest)); emit_asb(as, PPCI_OR, dest, dest, tmpi); /* Select with mask idiom. */ emit_asb(as, PPCI_AND, tmpi, tmpi, RID_TMP); emit_asb(as, PPCI_ANDC, dest, dest, RID_TMP); emit_tai(as, PPCI_LWZ, tmpi, RID_SP, SPOFS_TMPLO); /* tmp = (int)(x) */ emit_tai(as, PPCI_ADDIS, dest, dest, 0x8000); /* dest += 2^31 */ emit_asb(as, PPCI_SRAWI, RID_TMP, dest, 31); /* mask = -(dest < 0) */ emit_fai(as, PPCI_STFD, tmp, RID_SP, SPOFS_TMP); emit_tai(as, PPCI_LWZ, dest, RID_SP, SPOFS_TMPLO); /* dest = (int)(x-2^31) */ emit_fb(as, PPCI_FCTIWZ, tmp, left); emit_fai(as, PPCI_STFD, tmp, RID_SP, SPOFS_TMP); emit_fb(as, PPCI_FCTIWZ, tmp, tmp); emit_fab(as, PPCI_FSUB, tmp, left, tmp); emit_lsptr(as, PPCI_LFS, (tmp & 31), (void *)lj_ir_k64_find(as->J, U64x(4f000000,00000000)), RSET_GPR); } else { emit_tai(as, PPCI_LWZ, dest, RID_SP, SPOFS_TMPLO); emit_fai(as, PPCI_STFD, tmp, RID_SP, SPOFS_TMP); emit_fb(as, PPCI_FCTIWZ, tmp, left); } } } else { Reg dest = ra_dest(as, ir, RSET_GPR); if (st >= IRT_I8 && st <= IRT_U16) { /* Extend to 32 bit integer. */ Reg left = ra_alloc1(as, ir->op1, RSET_GPR); lua_assert(irt_isint(ir->t) || irt_isu32(ir->t)); if ((ir->op2 & IRCONV_SEXT)) emit_as(as, st == IRT_I8 ? PPCI_EXTSB : PPCI_EXTSH, dest, left); else emit_rot(as, PPCI_RLWINM, dest, left, 0, st == IRT_U8 ? 24 : 16, 31); } else { /* 32/64 bit integer conversions. */ /* Only need to handle 32/32 bit no-op (cast) on 32 bit archs. */ ra_leftov(as, dest, lref); /* Do nothing, but may need to move regs. */ } } } #if LJ_HASFFI static void asm_conv64(ASMState *as, IRIns *ir) { IRType st = (IRType)((ir-1)->op2 & IRCONV_SRCMASK); IRType dt = (((ir-1)->op2 & IRCONV_DSTMASK) >> IRCONV_DSH); IRCallID id; const CCallInfo *ci; IRRef args[2]; args[0] = ir->op1; args[1] = (ir-1)->op1; if (st == IRT_NUM || st == IRT_FLOAT) { id = IRCALL_fp64_d2l + ((st == IRT_FLOAT) ? 2 : 0) + (dt - IRT_I64); ir--; } else { id = IRCALL_fp64_l2d + ((dt == IRT_FLOAT) ? 2 : 0) + (st - IRT_I64); } ci = &lj_ir_callinfo[id]; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } #endif static void asm_strto(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_strscan_num]; IRRef args[2]; int32_t ofs; RegSet drop = RSET_SCRATCH; if (ra_hasreg(ir->r)) rset_set(drop, ir->r); /* Spill dest reg (if any). */ ra_evictset(as, drop); asm_guardcc(as, CC_EQ); emit_ai(as, PPCI_CMPWI, RID_RET, 0); /* Test return status. */ args[0] = ir->op1; /* GCstr *str */ args[1] = ASMREF_TMP1; /* TValue *n */ asm_gencall(as, ci, args); /* Store the result to the spill slot or temp slots. */ ofs = ir->s ? sps_scale(ir->s) : SPOFS_TMP; emit_tai(as, PPCI_ADDI, ra_releasetmp(as, ASMREF_TMP1), RID_SP, ofs); } /* Get pointer to TValue. */ static void asm_tvptr(ASMState *as, Reg dest, IRRef ref) { IRIns *ir = IR(ref); if (irt_isnum(ir->t)) { if (irref_isk(ref)) /* Use the number constant itself as a TValue. */ ra_allockreg(as, i32ptr(ir_knum(ir)), dest); else /* Otherwise force a spill and use the spill slot. */ emit_tai(as, PPCI_ADDI, dest, RID_SP, ra_spill(as, ir)); } else { /* Otherwise use g->tmptv to hold the TValue. */ RegSet allow = rset_exclude(RSET_GPR, dest); Reg type; emit_tai(as, PPCI_ADDI, dest, RID_JGL, offsetof(global_State, tmptv)-32768); if (!irt_ispri(ir->t)) { Reg src = ra_alloc1(as, ref, allow); emit_setgl(as, src, tmptv.gcr); } type = ra_allock(as, irt_toitype(ir->t), allow); emit_setgl(as, type, tmptv.it); } } static void asm_tostr(ASMState *as, IRIns *ir) { IRRef args[2]; args[0] = ASMREF_L; as->gcsteps++; if (irt_isnum(IR(ir->op1)->t) || (ir+1)->o == IR_HIOP) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromnum]; args[1] = ASMREF_TMP1; /* const lua_Number * */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op1); } else { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromint]; args[1] = ir->op1; /* int32_t k */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); } } /* -- Memory references --------------------------------------------------- */ static void asm_aref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg idx, base; if (irref_isk(ir->op2)) { IRRef tab = IR(ir->op1)->op1; int32_t ofs = asm_fuseabase(as, tab); IRRef refa = ofs ? tab : ir->op1; ofs += 8*IR(ir->op2)->i; if (checki16(ofs)) { base = ra_alloc1(as, refa, RSET_GPR); emit_tai(as, PPCI_ADDI, dest, base, ofs); return; } } base = ra_alloc1(as, ir->op1, RSET_GPR); idx = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, base)); emit_tab(as, PPCI_ADD, dest, RID_TMP, base); emit_slwi(as, RID_TMP, idx, 3); } /* Inlined hash lookup. Specialized for key type and for const keys. ** The equivalent C code is: ** Node *n = hashkey(t, key); ** do { ** if (lj_obj_equal(&n->key, key)) return &n->val; ** } while ((n = nextnode(n))); ** return niltv(L); */ static void asm_href(ASMState *as, IRIns *ir, IROp merge) { RegSet allow = RSET_GPR; int destused = ra_used(ir); Reg dest = ra_dest(as, ir, allow); Reg tab = ra_alloc1(as, ir->op1, rset_clear(allow, dest)); Reg key = RID_NONE, tmp1 = RID_TMP, tmp2; Reg tisnum = RID_NONE, tmpnum = RID_NONE; IRRef refkey = ir->op2; IRIns *irkey = IR(refkey); IRType1 kt = irkey->t; uint32_t khash; MCLabel l_end, l_loop, l_next; rset_clear(allow, tab); if (irt_isnum(kt)) { key = ra_alloc1(as, refkey, RSET_FPR); tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key)); tisnum = ra_allock(as, (int32_t)LJ_TISNUM, allow); rset_clear(allow, tisnum); } else if (!irt_ispri(kt)) { key = ra_alloc1(as, refkey, allow); rset_clear(allow, key); } tmp2 = ra_scratch(as, allow); rset_clear(allow, tmp2); /* Key not found in chain: jump to exit (if merged) or load niltv. */ l_end = emit_label(as); as->invmcp = NULL; if (merge == IR_NE) asm_guardcc(as, CC_EQ); else if (destused) emit_loada(as, dest, niltvg(J2G(as->J))); /* Follow hash chain until the end. */ l_loop = --as->mcp; emit_ai(as, PPCI_CMPWI, dest, 0); emit_tai(as, PPCI_LWZ, dest, dest, (int32_t)offsetof(Node, next)); l_next = emit_label(as); /* Type and value comparison. */ if (merge == IR_EQ) asm_guardcc(as, CC_EQ); else emit_condbranch(as, PPCI_BC|PPCF_Y, CC_EQ, l_end); if (irt_isnum(kt)) { emit_fab(as, PPCI_FCMPU, 0, tmpnum, key); emit_condbranch(as, PPCI_BC, CC_GE, l_next); emit_ab(as, PPCI_CMPLW, tmp1, tisnum); emit_fai(as, PPCI_LFD, tmpnum, dest, (int32_t)offsetof(Node, key.n)); } else { if (!irt_ispri(kt)) { emit_ab(as, PPCI_CMPW, tmp2, key); emit_condbranch(as, PPCI_BC, CC_NE, l_next); } emit_ai(as, PPCI_CMPWI, tmp1, irt_toitype(irkey->t)); if (!irt_ispri(kt)) emit_tai(as, PPCI_LWZ, tmp2, dest, (int32_t)offsetof(Node, key.gcr)); } emit_tai(as, PPCI_LWZ, tmp1, dest, (int32_t)offsetof(Node, key.it)); *l_loop = PPCI_BC | PPCF_Y | PPCF_CC(CC_NE) | (((char *)as->mcp-(char *)l_loop) & 0xffffu); /* Load main position relative to tab->node into dest. */ khash = irref_isk(refkey) ? ir_khash(irkey) : 1; if (khash == 0) { emit_tai(as, PPCI_LWZ, dest, tab, (int32_t)offsetof(GCtab, node)); } else { Reg tmphash = tmp1; if (irref_isk(refkey)) tmphash = ra_allock(as, khash, allow); emit_tab(as, PPCI_ADD, dest, dest, tmp1); emit_tai(as, PPCI_MULLI, tmp1, tmp1, sizeof(Node)); emit_asb(as, PPCI_AND, tmp1, tmp2, tmphash); emit_tai(as, PPCI_LWZ, dest, tab, (int32_t)offsetof(GCtab, node)); emit_tai(as, PPCI_LWZ, tmp2, tab, (int32_t)offsetof(GCtab, hmask)); if (irref_isk(refkey)) { /* Nothing to do. */ } else if (irt_isstr(kt)) { emit_tai(as, PPCI_LWZ, tmp1, key, (int32_t)offsetof(GCstr, hash)); } else { /* Must match with hash*() in lj_tab.c. */ emit_tab(as, PPCI_SUBF, tmp1, tmp2, tmp1); emit_rotlwi(as, tmp2, tmp2, HASH_ROT3); emit_asb(as, PPCI_XOR, tmp1, tmp1, tmp2); emit_rotlwi(as, tmp1, tmp1, (HASH_ROT2+HASH_ROT1)&31); emit_tab(as, PPCI_SUBF, tmp2, dest, tmp2); if (irt_isnum(kt)) { int32_t ofs = ra_spill(as, irkey); emit_asb(as, PPCI_XOR, tmp2, tmp2, tmp1); emit_rotlwi(as, dest, tmp1, HASH_ROT1); emit_tab(as, PPCI_ADD, tmp1, tmp1, tmp1); emit_tai(as, PPCI_LWZ, tmp2, RID_SP, ofs+4); emit_tai(as, PPCI_LWZ, tmp1, RID_SP, ofs); } else { emit_asb(as, PPCI_XOR, tmp2, key, tmp1); emit_rotlwi(as, dest, tmp1, HASH_ROT1); emit_tai(as, PPCI_ADDI, tmp1, tmp2, HASH_BIAS); emit_tai(as, PPCI_ADDIS, tmp2, key, (HASH_BIAS + 32768)>>16); } } } } static void asm_hrefk(ASMState *as, IRIns *ir) { IRIns *kslot = IR(ir->op2); IRIns *irkey = IR(kslot->op1); int32_t ofs = (int32_t)(kslot->op2 * sizeof(Node)); int32_t kofs = ofs + (int32_t)offsetof(Node, key); Reg dest = (ra_used(ir)||ofs > 32736) ? ra_dest(as, ir, RSET_GPR) : RID_NONE; Reg node = ra_alloc1(as, ir->op1, RSET_GPR); Reg key = RID_NONE, type = RID_TMP, idx = node; RegSet allow = rset_exclude(RSET_GPR, node); lua_assert(ofs % sizeof(Node) == 0); if (ofs > 32736) { idx = dest; rset_clear(allow, dest); kofs = (int32_t)offsetof(Node, key); } else if (ra_hasreg(dest)) { emit_tai(as, PPCI_ADDI, dest, node, ofs); } asm_guardcc(as, CC_NE); if (!irt_ispri(irkey->t)) { key = ra_scratch(as, allow); rset_clear(allow, key); } rset_clear(allow, type); if (irt_isnum(irkey->t)) { emit_cmpi(as, key, (int32_t)ir_knum(irkey)->u32.lo); asm_guardcc(as, CC_NE); emit_cmpi(as, type, (int32_t)ir_knum(irkey)->u32.hi); } else { if (ra_hasreg(key)) { emit_cmpi(as, key, irkey->i); /* May use RID_TMP, i.e. type. */ asm_guardcc(as, CC_NE); } emit_ai(as, PPCI_CMPWI, type, irt_toitype(irkey->t)); } if (ra_hasreg(key)) emit_tai(as, PPCI_LWZ, key, idx, kofs+4); emit_tai(as, PPCI_LWZ, type, idx, kofs); if (ofs > 32736) { emit_tai(as, PPCI_ADDIS, dest, dest, (ofs + 32768) >> 16); emit_tai(as, PPCI_ADDI, dest, node, ofs); } } static void asm_newref(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey]; IRRef args[3]; if (ir->r == RID_SINK) return; args[0] = ASMREF_L; /* lua_State *L */ args[1] = ir->op1; /* GCtab *t */ args[2] = ASMREF_TMP1; /* cTValue *key */ asm_setupresult(as, ir, ci); /* TValue * */ asm_gencall(as, ci, args); asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op2); } static void asm_uref(ASMState *as, IRIns *ir) { /* NYI: Check that UREFO is still open and not aliasing a slot. */ Reg dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); MRef *v = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.v; emit_lsptr(as, PPCI_LWZ, dest, v, RSET_GPR); } else { Reg uv = ra_scratch(as, RSET_GPR); Reg func = ra_alloc1(as, ir->op1, RSET_GPR); if (ir->o == IR_UREFC) { asm_guardcc(as, CC_NE); emit_ai(as, PPCI_CMPWI, RID_TMP, 1); emit_tai(as, PPCI_ADDI, dest, uv, (int32_t)offsetof(GCupval, tv)); emit_tai(as, PPCI_LBZ, RID_TMP, uv, (int32_t)offsetof(GCupval, closed)); } else { emit_tai(as, PPCI_LWZ, dest, uv, (int32_t)offsetof(GCupval, v)); } emit_tai(as, PPCI_LWZ, uv, func, (int32_t)offsetof(GCfuncL, uvptr) + 4*(int32_t)(ir->op2 >> 8)); } } static void asm_fref(ASMState *as, IRIns *ir) { UNUSED(as); UNUSED(ir); lua_assert(!ra_used(ir)); } static void asm_strref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); IRRef ref = ir->op2, refk = ir->op1; int32_t ofs = (int32_t)sizeof(GCstr); Reg r; if (irref_isk(ref)) { IRRef tmp = refk; refk = ref; ref = tmp; } else if (!irref_isk(refk)) { Reg right, left = ra_alloc1(as, ir->op1, RSET_GPR); IRIns *irr = IR(ir->op2); if (ra_hasreg(irr->r)) { ra_noweak(as, irr->r); right = irr->r; } else if (mayfuse(as, irr->op2) && irr->o == IR_ADD && irref_isk(irr->op2) && checki16(ofs + IR(irr->op2)->i)) { ofs += IR(irr->op2)->i; right = ra_alloc1(as, irr->op1, rset_exclude(RSET_GPR, left)); } else { right = ra_allocref(as, ir->op2, rset_exclude(RSET_GPR, left)); } emit_tai(as, PPCI_ADDI, dest, dest, ofs); emit_tab(as, PPCI_ADD, dest, left, right); return; } r = ra_alloc1(as, ref, RSET_GPR); ofs += IR(refk)->i; if (checki16(ofs)) emit_tai(as, PPCI_ADDI, dest, r, ofs); else emit_tab(as, PPCI_ADD, dest, r, ra_allock(as, ofs, rset_exclude(RSET_GPR, r))); } /* -- Loads and stores ---------------------------------------------------- */ static PPCIns asm_fxloadins(IRIns *ir) { switch (irt_type(ir->t)) { case IRT_I8: return PPCI_LBZ; /* Needs sign-extension. */ case IRT_U8: return PPCI_LBZ; case IRT_I16: return PPCI_LHA; case IRT_U16: return PPCI_LHZ; case IRT_NUM: return PPCI_LFD; case IRT_FLOAT: return PPCI_LFS; default: return PPCI_LWZ; } } static PPCIns asm_fxstoreins(IRIns *ir) { switch (irt_type(ir->t)) { case IRT_I8: case IRT_U8: return PPCI_STB; case IRT_I16: case IRT_U16: return PPCI_STH; case IRT_NUM: return PPCI_STFD; case IRT_FLOAT: return PPCI_STFS; default: return PPCI_STW; } } static void asm_fload(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg idx = ra_alloc1(as, ir->op1, RSET_GPR); PPCIns pi = asm_fxloadins(ir); int32_t ofs; if (ir->op2 == IRFL_TAB_ARRAY) { ofs = asm_fuseabase(as, ir->op1); if (ofs) { /* Turn the t->array load into an add for colocated arrays. */ emit_tai(as, PPCI_ADDI, dest, idx, ofs); return; } } ofs = field_ofs[ir->op2]; lua_assert(!irt_isi8(ir->t)); emit_tai(as, pi, dest, idx, ofs); } static void asm_fstore(ASMState *as, IRIns *ir) { if (ir->r != RID_SINK) { Reg src = ra_alloc1(as, ir->op2, RSET_GPR); IRIns *irf = IR(ir->op1); Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src)); int32_t ofs = field_ofs[irf->op2]; PPCIns pi = asm_fxstoreins(ir); emit_tai(as, pi, src, idx, ofs); } } static void asm_xload(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); lua_assert(!(ir->op2 & IRXLOAD_UNALIGNED)); if (irt_isi8(ir->t)) emit_as(as, PPCI_EXTSB, dest, dest); asm_fusexref(as, asm_fxloadins(ir), dest, ir->op1, RSET_GPR, 0); } static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs) { IRIns *irb; if (ir->r == RID_SINK) return; if (ofs == 0 && mayfuse(as, ir->op2) && (irb = IR(ir->op2))->o == IR_BSWAP && ra_noreg(irb->r) && (irt_isint(ir->t) || irt_isu32(ir->t))) { /* Fuse BSWAP with XSTORE to stwbrx. */ Reg src = ra_alloc1(as, irb->op1, RSET_GPR); asm_fusexrefx(as, PPCI_STWBRX, src, ir->op1, rset_exclude(RSET_GPR, src)); } else { Reg src = ra_alloc1(as, ir->op2, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1, rset_exclude(RSET_GPR, src), ofs); } } static void asm_ahuvload(ASMState *as, IRIns *ir) { IRType1 t = ir->t; Reg dest = RID_NONE, type = RID_TMP, tmp = RID_TMP, idx; RegSet allow = RSET_GPR; int32_t ofs = AHUREF_LSX; if (ra_used(ir)) { lua_assert(irt_isnum(t) || irt_isint(t) || irt_isaddr(t)); if (!irt_isnum(t)) ofs = 0; dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : RSET_GPR); rset_clear(allow, dest); } idx = asm_fuseahuref(as, ir->op1, &ofs, allow); if (irt_isnum(t)) { Reg tisnum = ra_allock(as, (int32_t)LJ_TISNUM, rset_exclude(allow, idx)); asm_guardcc(as, CC_GE); emit_ab(as, PPCI_CMPLW, type, tisnum); if (ra_hasreg(dest)) { if (ofs == AHUREF_LSX) { tmp = ra_scratch(as, rset_exclude(rset_exclude(RSET_GPR, (idx&255)), (idx>>8))); emit_fab(as, PPCI_LFDX, dest, (idx&255), tmp); } else { emit_fai(as, PPCI_LFD, dest, idx, ofs); } } } else { asm_guardcc(as, CC_NE); emit_ai(as, PPCI_CMPWI, type, irt_toitype(t)); if (ra_hasreg(dest)) emit_tai(as, PPCI_LWZ, dest, idx, ofs+4); } if (ofs == AHUREF_LSX) { emit_tab(as, PPCI_LWZX, type, (idx&255), tmp); emit_slwi(as, tmp, (idx>>8), 3); } else { emit_tai(as, PPCI_LWZ, type, idx, ofs); } } static void asm_ahustore(ASMState *as, IRIns *ir) { RegSet allow = RSET_GPR; Reg idx, src = RID_NONE, type = RID_NONE; int32_t ofs = AHUREF_LSX; if (ir->r == RID_SINK) return; if (irt_isnum(ir->t)) { src = ra_alloc1(as, ir->op2, RSET_FPR); } else { if (!irt_ispri(ir->t)) { src = ra_alloc1(as, ir->op2, allow); rset_clear(allow, src); ofs = 0; } type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); rset_clear(allow, type); } idx = asm_fuseahuref(as, ir->op1, &ofs, allow); if (irt_isnum(ir->t)) { if (ofs == AHUREF_LSX) { emit_fab(as, PPCI_STFDX, src, (idx&255), RID_TMP); emit_slwi(as, RID_TMP, (idx>>8), 3); } else { emit_fai(as, PPCI_STFD, src, idx, ofs); } } else { if (ra_hasreg(src)) emit_tai(as, PPCI_STW, src, idx, ofs+4); if (ofs == AHUREF_LSX) { emit_tab(as, PPCI_STWX, type, (idx&255), RID_TMP); emit_slwi(as, RID_TMP, (idx>>8), 3); } else { emit_tai(as, PPCI_STW, type, idx, ofs); } } } static void asm_sload(ASMState *as, IRIns *ir) { int32_t ofs = 8*((int32_t)ir->op1-1) + ((ir->op2 & IRSLOAD_FRAME) ? 0 : 4); IRType1 t = ir->t; Reg dest = RID_NONE, type = RID_NONE, base; RegSet allow = RSET_GPR; lua_assert(!(ir->op2 & IRSLOAD_PARENT)); /* Handled by asm_head_side(). */ lua_assert(irt_isguard(t) || !(ir->op2 & IRSLOAD_TYPECHECK)); lua_assert(LJ_DUALNUM || !irt_isint(t) || (ir->op2 & (IRSLOAD_CONVERT|IRSLOAD_FRAME))); if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(t) && irt_isint(t)) { dest = ra_scratch(as, RSET_FPR); asm_tointg(as, ir, dest); t.irt = IRT_NUM; /* Continue with a regular number type check. */ } else if (ra_used(ir)) { lua_assert(irt_isnum(t) || irt_isint(t) || irt_isaddr(t)); dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : RSET_GPR); rset_clear(allow, dest); base = ra_alloc1(as, REF_BASE, allow); rset_clear(allow, base); if ((ir->op2 & IRSLOAD_CONVERT)) { if (irt_isint(t)) { emit_tai(as, PPCI_LWZ, dest, RID_SP, SPOFS_TMPLO); dest = ra_scratch(as, RSET_FPR); emit_fai(as, PPCI_STFD, dest, RID_SP, SPOFS_TMP); emit_fb(as, PPCI_FCTIWZ, dest, dest); t.irt = IRT_NUM; /* Check for original type. */ } else { Reg tmp = ra_scratch(as, allow); Reg hibias = ra_allock(as, 0x43300000, rset_clear(allow, tmp)); Reg fbias = ra_scratch(as, rset_exclude(RSET_FPR, dest)); emit_fab(as, PPCI_FSUB, dest, dest, fbias); emit_fai(as, PPCI_LFD, dest, RID_SP, SPOFS_TMP); emit_lsptr(as, PPCI_LFS, (fbias & 31), (void *)lj_ir_k64_find(as->J, U64x(59800004,59800000)), rset_clear(allow, hibias)); emit_tai(as, PPCI_STW, tmp, RID_SP, SPOFS_TMPLO); emit_tai(as, PPCI_STW, hibias, RID_SP, SPOFS_TMPHI); emit_asi(as, PPCI_XORIS, tmp, tmp, 0x8000); dest = tmp; t.irt = IRT_INT; /* Check for original type. */ } } goto dotypecheck; } base = ra_alloc1(as, REF_BASE, allow); rset_clear(allow, base); dotypecheck: if (irt_isnum(t)) { if ((ir->op2 & IRSLOAD_TYPECHECK)) { Reg tisnum = ra_allock(as, (int32_t)LJ_TISNUM, allow); asm_guardcc(as, CC_GE); emit_ab(as, PPCI_CMPLW, RID_TMP, tisnum); type = RID_TMP; } if (ra_hasreg(dest)) emit_fai(as, PPCI_LFD, dest, base, ofs-4); } else { if ((ir->op2 & IRSLOAD_TYPECHECK)) { asm_guardcc(as, CC_NE); emit_ai(as, PPCI_CMPWI, RID_TMP, irt_toitype(t)); type = RID_TMP; } if (ra_hasreg(dest)) emit_tai(as, PPCI_LWZ, dest, base, ofs); } if (ra_hasreg(type)) emit_tai(as, PPCI_LWZ, type, base, ofs-4); } /* -- Allocations --------------------------------------------------------- */ #if LJ_HASFFI static void asm_cnew(ASMState *as, IRIns *ir) { CTState *cts = ctype_ctsG(J2G(as->J)); CTypeID ctypeid = (CTypeID)IR(ir->op1)->i; CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ? lj_ctype_size(cts, ctypeid) : (CTSize)IR(ir->op2)->i; const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco]; IRRef args[2]; RegSet allow = (RSET_GPR & ~RSET_SCRATCH); RegSet drop = RSET_SCRATCH; lua_assert(sz != CTSIZE_INVALID); args[0] = ASMREF_L; /* lua_State *L */ args[1] = ASMREF_TMP1; /* MSize size */ as->gcsteps++; if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ ra_evictset(as, drop); if (ra_used(ir)) ra_destreg(as, ir, RID_RET); /* GCcdata * */ /* Initialize immutable cdata object. */ if (ir->o == IR_CNEWI) { int32_t ofs = sizeof(GCcdata); lua_assert(sz == 4 || sz == 8); if (sz == 8) { ofs += 4; lua_assert((ir+1)->o == IR_HIOP); } for (;;) { Reg r = ra_alloc1(as, ir->op2, allow); emit_tai(as, PPCI_STW, r, RID_RET, ofs); rset_clear(allow, r); if (ofs == sizeof(GCcdata)) break; ofs -= 4; ir++; } } /* Initialize gct and ctypeid. lj_mem_newgco() already sets marked. */ emit_tai(as, PPCI_STB, RID_RET+1, RID_RET, offsetof(GCcdata, gct)); emit_tai(as, PPCI_STH, RID_TMP, RID_RET, offsetof(GCcdata, ctypeid)); emit_ti(as, PPCI_LI, RID_RET+1, ~LJ_TCDATA); emit_ti(as, PPCI_LI, RID_TMP, ctypeid); /* Lower 16 bit used. Sign-ext ok. */ asm_gencall(as, ci, args); ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)), ra_releasetmp(as, ASMREF_TMP1)); } #else #define asm_cnew(as, ir) ((void)0) #endif /* -- Write barriers ------------------------------------------------------ */ static void asm_tbar(ASMState *as, IRIns *ir) { Reg tab = ra_alloc1(as, ir->op1, RSET_GPR); Reg mark = ra_scratch(as, rset_exclude(RSET_GPR, tab)); Reg link = RID_TMP; MCLabel l_end = emit_label(as); emit_tai(as, PPCI_STW, link, tab, (int32_t)offsetof(GCtab, gclist)); emit_tai(as, PPCI_STB, mark, tab, (int32_t)offsetof(GCtab, marked)); emit_setgl(as, tab, gc.grayagain); lua_assert(LJ_GC_BLACK == 0x04); emit_rot(as, PPCI_RLWINM, mark, mark, 0, 30, 28); /* Clear black bit. */ emit_getgl(as, link, gc.grayagain); emit_condbranch(as, PPCI_BC|PPCF_Y, CC_EQ, l_end); emit_asi(as, PPCI_ANDIDOT, RID_TMP, mark, LJ_GC_BLACK); emit_tai(as, PPCI_LBZ, mark, tab, (int32_t)offsetof(GCtab, marked)); } static void asm_obar(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_barrieruv]; IRRef args[2]; MCLabel l_end; Reg obj, val, tmp; /* No need for other object barriers (yet). */ lua_assert(IR(ir->op1)->o == IR_UREFC); ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ir->op1; /* TValue *tv */ asm_gencall(as, ci, args); emit_tai(as, PPCI_ADDI, ra_releasetmp(as, ASMREF_TMP1), RID_JGL, -32768); obj = IR(ir->op1)->r; tmp = ra_scratch(as, rset_exclude(RSET_GPR, obj)); emit_condbranch(as, PPCI_BC|PPCF_Y, CC_EQ, l_end); emit_asi(as, PPCI_ANDIDOT, tmp, tmp, LJ_GC_BLACK); emit_condbranch(as, PPCI_BC, CC_EQ, l_end); emit_asi(as, PPCI_ANDIDOT, RID_TMP, RID_TMP, LJ_GC_WHITES); val = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, obj)); emit_tai(as, PPCI_LBZ, tmp, obj, (int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)); emit_tai(as, PPCI_LBZ, RID_TMP, val, (int32_t)offsetof(GChead, marked)); } /* -- Arithmetic and logic operations ------------------------------------- */ static void asm_fparith(ASMState *as, IRIns *ir, PPCIns pi) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = (left >> 8); left &= 255; if (pi == PPCI_FMUL) emit_fac(as, pi, dest, left, right); else emit_fab(as, pi, dest, left, right); } static void asm_fpunary(ASMState *as, IRIns *ir, PPCIns pi) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg left = ra_hintalloc(as, ir->op1, dest, RSET_FPR); emit_fb(as, pi, dest, left); } static int asm_fpjoin_pow(ASMState *as, IRIns *ir) { IRIns *irp = IR(ir->op1); if (irp == ir-1 && irp->o == IR_MUL && !ra_used(irp)) { IRIns *irpp = IR(irp->op1); if (irpp == ir-2 && irpp->o == IR_FPMATH && irpp->op2 == IRFPM_LOG2 && !ra_used(irpp)) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_pow]; IRRef args[2]; args[0] = irpp->op1; args[1] = irp->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); return 1; } } return 0; } static void asm_add(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { if (!asm_fusemadd(as, ir, PPCI_FMADD, PPCI_FMADD)) asm_fparith(as, ir, PPCI_FADD); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); PPCIns pi; if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (checki16(k)) { pi = PPCI_ADDI; /* May fail due to spills/restores above, but simplifies the logic. */ if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; pi = PPCI_ADDICDOT; } emit_tai(as, pi, dest, left, k); return; } else if ((k & 0xffff) == 0) { emit_tai(as, PPCI_ADDIS, dest, left, (k >> 16)); return; } else if (!as->sectref) { emit_tai(as, PPCI_ADDIS, dest, dest, (k + 32768) >> 16); emit_tai(as, PPCI_ADDI, dest, left, k); return; } } pi = PPCI_ADD; /* May fail due to spills/restores above, but simplifies the logic. */ if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; pi |= PPCF_DOT; } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_tab(as, pi, dest, left, right); } } static void asm_sub(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { if (!asm_fusemadd(as, ir, PPCI_FMSUB, PPCI_FNMSUB)) asm_fparith(as, ir, PPCI_FSUB); } else { PPCIns pi = PPCI_SUBF; Reg dest = ra_dest(as, ir, RSET_GPR); Reg left, right; if (irref_isk(ir->op1)) { int32_t k = IR(ir->op1)->i; if (checki16(k)) { right = ra_alloc1(as, ir->op2, RSET_GPR); emit_tai(as, PPCI_SUBFIC, dest, right, k); return; } } /* May fail due to spills/restores above, but simplifies the logic. */ if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; pi |= PPCF_DOT; } left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_tab(as, pi, dest, right, left); /* Subtract right _from_ left. */ } } static void asm_mul(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { asm_fparith(as, ir, PPCI_FMUL); } else { PPCIns pi = PPCI_MULLW; Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (checki16(k)) { emit_tai(as, PPCI_MULLI, dest, left, k); return; } } /* May fail due to spills/restores above, but simplifies the logic. */ if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; pi |= PPCF_DOT; } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_tab(as, pi, dest, left, right); } } static void asm_neg(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) { asm_fpunary(as, ir, PPCI_FNEG); } else { Reg dest, left; PPCIns pi = PPCI_NEG; if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; pi |= PPCF_DOT; } dest = ra_dest(as, ir, RSET_GPR); left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); emit_tab(as, pi, dest, left, 0); } } static void asm_arithov(ASMState *as, IRIns *ir, PPCIns pi) { Reg dest, left, right; if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; } asm_guardcc(as, CC_SO); dest = ra_dest(as, ir, RSET_GPR); left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; if (pi == PPCI_SUBFO) { Reg tmp = left; left = right; right = tmp; } emit_tab(as, pi|PPCF_DOT, dest, left, right); } #if LJ_HASFFI static void asm_add64(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_alloc1(as, ir->op1, RSET_GPR); PPCIns pi = PPCI_ADDE; if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (k == 0) pi = PPCI_ADDZE; else if (k == -1) pi = PPCI_ADDME; else goto needright; right = 0; } else { needright: right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); } emit_tab(as, pi, dest, left, right); ir--; dest = ra_dest(as, ir, RSET_GPR); left = ra_alloc1(as, ir->op1, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (checki16(k)) { emit_tai(as, PPCI_ADDIC, dest, left, k); return; } } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_tab(as, PPCI_ADDC, dest, left, right); } static void asm_sub64(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left, right = ra_alloc1(as, ir->op2, RSET_GPR); PPCIns pi = PPCI_SUBFE; if (irref_isk(ir->op1)) { int32_t k = IR(ir->op1)->i; if (k == 0) pi = PPCI_SUBFZE; else if (k == -1) pi = PPCI_SUBFME; else goto needleft; left = 0; } else { needleft: left = ra_alloc1(as, ir->op1, rset_exclude(RSET_GPR, right)); } emit_tab(as, pi, dest, right, left); /* Subtract right _from_ left. */ ir--; dest = ra_dest(as, ir, RSET_GPR); right = ra_alloc1(as, ir->op2, RSET_GPR); if (irref_isk(ir->op1)) { int32_t k = IR(ir->op1)->i; if (checki16(k)) { emit_tai(as, PPCI_SUBFIC, dest, right, k); return; } } left = ra_alloc1(as, ir->op1, rset_exclude(RSET_GPR, right)); emit_tab(as, PPCI_SUBFC, dest, right, left); } static void asm_neg64(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg left = ra_alloc1(as, ir->op1, RSET_GPR); emit_tab(as, PPCI_SUBFZE, dest, left, 0); ir--; dest = ra_dest(as, ir, RSET_GPR); left = ra_alloc1(as, ir->op1, RSET_GPR); emit_tai(as, PPCI_SUBFIC, dest, left, 0); } #endif static void asm_bitnot(ASMState *as, IRIns *ir) { Reg dest, left, right; PPCIns pi = PPCI_NOR; if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; pi |= PPCF_DOT; } dest = ra_dest(as, ir, RSET_GPR); if (mayfuse(as, ir->op1)) { IRIns *irl = IR(ir->op1); if (irl->o == IR_BAND) pi ^= (PPCI_NOR ^ PPCI_NAND); else if (irl->o == IR_BXOR) pi ^= (PPCI_NOR ^ PPCI_EQV); else if (irl->o != IR_BOR) goto nofuse; left = ra_hintalloc(as, irl->op1, dest, RSET_GPR); right = ra_alloc1(as, irl->op2, rset_exclude(RSET_GPR, left)); } else { nofuse: left = right = ra_hintalloc(as, ir->op1, dest, RSET_GPR); } emit_asb(as, pi, dest, left, right); } static void asm_bitswap(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); IRIns *irx; if (mayfuse(as, ir->op1) && (irx = IR(ir->op1))->o == IR_XLOAD && ra_noreg(irx->r) && (irt_isint(irx->t) || irt_isu32(irx->t))) { /* Fuse BSWAP with XLOAD to lwbrx. */ asm_fusexrefx(as, PPCI_LWBRX, dest, irx->op1, RSET_GPR); } else { Reg left = ra_alloc1(as, ir->op1, RSET_GPR); Reg tmp = dest; if (tmp == left) { tmp = RID_TMP; emit_mr(as, dest, RID_TMP); } emit_rot(as, PPCI_RLWIMI, tmp, left, 24, 16, 23); emit_rot(as, PPCI_RLWIMI, tmp, left, 24, 0, 7); emit_rotlwi(as, tmp, left, 8); } } static void asm_bitop(ASMState *as, IRIns *ir, PPCIns pi, PPCIns pik) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg right, left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; Reg tmp = left; if ((checku16(k) || (k & 0xffff) == 0) || (tmp = dest, !as->sectref)) { if (!checku16(k)) { emit_asi(as, pik ^ (PPCI_ORI ^ PPCI_ORIS), dest, tmp, (k >> 16)); if ((k & 0xffff) == 0) return; } emit_asi(as, pik, dest, left, k); return; } } /* May fail due to spills/restores above, but simplifies the logic. */ if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; pi |= PPCF_DOT; } right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_asb(as, pi, dest, left, right); } /* Fuse BAND with contiguous bitmask and a shift to rlwinm. */ static void asm_fuseandsh(ASMState *as, PPCIns pi, int32_t mask, IRRef ref) { IRIns *ir; Reg left; if (mayfuse(as, ref) && (ir = IR(ref), ra_noreg(ir->r)) && irref_isk(ir->op2) && ir->o >= IR_BSHL && ir->o <= IR_BROR) { int32_t sh = (IR(ir->op2)->i & 31); switch (ir->o) { case IR_BSHL: if ((mask & ((1u<>sh))) goto nofuse; sh = ((32-sh)&31); break; case IR_BROL: break; default: goto nofuse; } left = ra_alloc1(as, ir->op1, RSET_GPR); *--as->mcp = pi | PPCF_T(left) | PPCF_B(sh); return; } nofuse: left = ra_alloc1(as, ref, RSET_GPR); *--as->mcp = pi | PPCF_T(left); } static void asm_bitand(ASMState *as, IRIns *ir) { Reg dest, left, right; IRRef lref = ir->op1; PPCIns dot = 0; IRRef op2; if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; dot = PPCF_DOT; } dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op2)) { int32_t k = IR(ir->op2)->i; if (k) { /* First check for a contiguous bitmask as used by rlwinm. */ uint32_t s1 = lj_ffs((uint32_t)k); uint32_t k1 = ((uint32_t)k >> s1); if ((k1 & (k1+1)) == 0) { asm_fuseandsh(as, PPCI_RLWINM|dot | PPCF_A(dest) | PPCF_MB(31-lj_fls((uint32_t)k)) | PPCF_ME(31-s1), k, lref); return; } if (~(uint32_t)k) { uint32_t s2 = lj_ffs(~(uint32_t)k); uint32_t k2 = (~(uint32_t)k >> s2); if ((k2 & (k2+1)) == 0) { asm_fuseandsh(as, PPCI_RLWINM|dot | PPCF_A(dest) | PPCF_MB(32-s2) | PPCF_ME(30-lj_fls(~(uint32_t)k)), k, lref); return; } } } if (checku16(k)) { left = ra_alloc1(as, lref, RSET_GPR); emit_asi(as, PPCI_ANDIDOT, dest, left, k); return; } else if ((k & 0xffff) == 0) { left = ra_alloc1(as, lref, RSET_GPR); emit_asi(as, PPCI_ANDISDOT, dest, left, (k >> 16)); return; } } op2 = ir->op2; if (mayfuse(as, op2) && IR(op2)->o == IR_BNOT && ra_noreg(IR(op2)->r)) { dot ^= (PPCI_AND ^ PPCI_ANDC); op2 = IR(op2)->op1; } left = ra_hintalloc(as, lref, dest, RSET_GPR); right = ra_alloc1(as, op2, rset_exclude(RSET_GPR, left)); emit_asb(as, PPCI_AND ^ dot, dest, left, right); } static void asm_bitshift(ASMState *as, IRIns *ir, PPCIns pi, PPCIns pik) { Reg dest, left; Reg dot = 0; if (as->flagmcp == as->mcp) { as->flagmcp = NULL; as->mcp++; dot = PPCF_DOT; } dest = ra_dest(as, ir, RSET_GPR); left = ra_alloc1(as, ir->op1, RSET_GPR); if (irref_isk(ir->op2)) { /* Constant shifts. */ int32_t shift = (IR(ir->op2)->i & 31); if (pik == 0) /* SLWI */ emit_rot(as, PPCI_RLWINM|dot, dest, left, shift, 0, 31-shift); else if (pik == 1) /* SRWI */ emit_rot(as, PPCI_RLWINM|dot, dest, left, (32-shift)&31, shift, 31); else emit_asb(as, pik|dot, dest, left, shift); } else { Reg right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); emit_asb(as, pi|dot, dest, left, right); } } static void asm_min_max(ASMState *as, IRIns *ir, int ismax) { if (irt_isnum(ir->t)) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg tmp = dest; Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = (left >> 8); left &= 255; if (tmp == left || tmp == right) tmp = ra_scratch(as, rset_exclude(rset_exclude(rset_exclude(RSET_FPR, dest), left), right)); emit_facb(as, PPCI_FSEL, dest, tmp, ismax ? left : right, ismax ? right : left); emit_fab(as, PPCI_FSUB, tmp, left, right); } else { Reg dest = ra_dest(as, ir, RSET_GPR); Reg tmp1 = RID_TMP, tmp2 = dest; Reg right, left = ra_alloc2(as, ir, RSET_GPR); right = (left >> 8); left &= 255; if (tmp2 == left || tmp2 == right) tmp2 = ra_scratch(as, rset_exclude(rset_exclude(rset_exclude(RSET_GPR, dest), left), right)); emit_tab(as, PPCI_ADD, dest, tmp2, right); emit_asb(as, ismax ? PPCI_ANDC : PPCI_AND, tmp2, tmp2, tmp1); emit_tab(as, PPCI_SUBFE, tmp1, tmp1, tmp1); emit_tab(as, PPCI_SUBFC, tmp2, tmp2, tmp1); emit_asi(as, PPCI_XORIS, tmp2, right, 0x8000); emit_asi(as, PPCI_XORIS, tmp1, left, 0x8000); } } /* -- Comparisons --------------------------------------------------------- */ #define CC_UNSIGNED 0x08 /* Unsigned integer comparison. */ #define CC_TWO 0x80 /* Check two flags for FP comparison. */ /* Map of comparisons to flags. ORDER IR. */ static const uint8_t asm_compmap[IR_ABC+1] = { /* op int cc FP cc */ /* LT */ CC_GE + (CC_GE<<4), /* GE */ CC_LT + (CC_LE<<4) + CC_TWO, /* LE */ CC_GT + (CC_GE<<4) + CC_TWO, /* GT */ CC_LE + (CC_LE<<4), /* ULT */ CC_GE + CC_UNSIGNED + (CC_GT<<4) + CC_TWO, /* UGE */ CC_LT + CC_UNSIGNED + (CC_LT<<4), /* ULE */ CC_GT + CC_UNSIGNED + (CC_GT<<4), /* UGT */ CC_LE + CC_UNSIGNED + (CC_LT<<4) + CC_TWO, /* EQ */ CC_NE + (CC_NE<<4), /* NE */ CC_EQ + (CC_EQ<<4), /* ABC */ CC_LE + CC_UNSIGNED + (CC_LT<<4) + CC_TWO /* Same as UGT. */ }; static void asm_intcomp_(ASMState *as, IRRef lref, IRRef rref, Reg cr, PPCCC cc) { Reg right, left = ra_alloc1(as, lref, RSET_GPR); if (irref_isk(rref)) { int32_t k = IR(rref)->i; if ((cc & CC_UNSIGNED) == 0) { /* Signed comparison with constant. */ if (checki16(k)) { emit_tai(as, PPCI_CMPWI, cr, left, k); /* Signed comparison with zero and referencing previous ins? */ if (k == 0 && lref == as->curins-1) as->flagmcp = as->mcp; /* Allow elimination of the compare. */ return; } else if ((cc & 3) == (CC_EQ & 3)) { /* Use CMPLWI for EQ or NE. */ if (checku16(k)) { emit_tai(as, PPCI_CMPLWI, cr, left, k); return; } else if (!as->sectref && ra_noreg(IR(rref)->r)) { emit_tai(as, PPCI_CMPLWI, cr, RID_TMP, k); emit_asi(as, PPCI_XORIS, RID_TMP, left, (k >> 16)); return; } } } else { /* Unsigned comparison with constant. */ if (checku16(k)) { emit_tai(as, PPCI_CMPLWI, cr, left, k); return; } } } right = ra_alloc1(as, rref, rset_exclude(RSET_GPR, left)); emit_tab(as, (cc & CC_UNSIGNED) ? PPCI_CMPLW : PPCI_CMPW, cr, left, right); } static void asm_comp(ASMState *as, IRIns *ir) { PPCCC cc = asm_compmap[ir->o]; if (irt_isnum(ir->t)) { Reg right, left = ra_alloc2(as, ir, RSET_FPR); right = (left >> 8); left &= 255; asm_guardcc(as, (cc >> 4)); if ((cc & CC_TWO)) emit_tab(as, PPCI_CROR, ((cc>>4)&3), ((cc>>4)&3), (CC_EQ&3)); emit_fab(as, PPCI_FCMPU, 0, left, right); } else { IRRef lref = ir->op1, rref = ir->op2; if (irref_isk(lref) && !irref_isk(rref)) { /* Swap constants to the right (only for ABC). */ IRRef tmp = lref; lref = rref; rref = tmp; if ((cc & 2) == 0) cc ^= 1; /* LT <-> GT, LE <-> GE */ } asm_guardcc(as, cc); asm_intcomp_(as, lref, rref, 0, cc); } } #if LJ_HASFFI /* 64 bit integer comparisons. */ static void asm_comp64(ASMState *as, IRIns *ir) { PPCCC cc = asm_compmap[(ir-1)->o]; if ((cc&3) == (CC_EQ&3)) { asm_guardcc(as, cc); emit_tab(as, (cc&4) ? PPCI_CRAND : PPCI_CROR, (CC_EQ&3), (CC_EQ&3), 4+(CC_EQ&3)); } else { asm_guardcc(as, CC_EQ); emit_tab(as, PPCI_CROR, (CC_EQ&3), (CC_EQ&3), ((cc^~(cc>>2))&1)); emit_tab(as, (cc&4) ? PPCI_CRAND : PPCI_CRANDC, (CC_EQ&3), (CC_EQ&3), 4+(cc&3)); } /* Loword comparison sets cr1 and is unsigned, except for equality. */ asm_intcomp_(as, (ir-1)->op1, (ir-1)->op2, 4, cc | ((cc&3) == (CC_EQ&3) ? 0 : CC_UNSIGNED)); /* Hiword comparison sets cr0. */ asm_intcomp_(as, ir->op1, ir->op2, 0, cc); as->flagmcp = NULL; /* Doesn't work here. */ } #endif /* -- Support for 64 bit ops in 32 bit mode ------------------------------- */ /* Hiword op of a split 64 bit op. Previous op must be the loword op. */ static void asm_hiop(ASMState *as, IRIns *ir) { #if LJ_HASFFI /* HIOP is marked as a store because it needs its own DCE logic. */ int uselo = ra_used(ir-1), usehi = ra_used(ir); /* Loword/hiword used? */ if (LJ_UNLIKELY(!(as->flags & JIT_F_OPT_DCE))) uselo = usehi = 1; if ((ir-1)->o == IR_CONV) { /* Conversions to/from 64 bit. */ as->curins--; /* Always skip the CONV. */ if (usehi || uselo) asm_conv64(as, ir); return; } else if ((ir-1)->o <= IR_NE) { /* 64 bit integer comparisons. ORDER IR. */ as->curins--; /* Always skip the loword comparison. */ asm_comp64(as, ir); return; } else if ((ir-1)->o == IR_XSTORE) { as->curins--; /* Handle both stores here. */ if ((ir-1)->r != RID_SINK) { asm_xstore(as, ir, 0); asm_xstore(as, ir-1, 4); } return; } if (!usehi) return; /* Skip unused hiword op for all remaining ops. */ switch ((ir-1)->o) { case IR_ADD: as->curins--; asm_add64(as, ir); break; case IR_SUB: as->curins--; asm_sub64(as, ir); break; case IR_NEG: as->curins--; asm_neg64(as, ir); break; case IR_CALLN: case IR_CALLXS: if (!uselo) ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ break; case IR_CNEWI: /* Nothing to do here. Handled by lo op itself. */ break; default: lua_assert(0); break; } #else UNUSED(as); UNUSED(ir); lua_assert(0); /* Unused without FFI. */ #endif } /* -- Stack handling ------------------------------------------------------ */ /* Check Lua stack size for overflow. Use exit handler as fallback. */ static void asm_stack_check(ASMState *as, BCReg topslot, IRIns *irp, RegSet allow, ExitNo exitno) { /* Try to get an unused temp. register, otherwise spill/restore RID_RET*. */ Reg tmp, pbase = irp ? (ra_hasreg(irp->r) ? irp->r : RID_TMP) : RID_BASE; rset_clear(allow, pbase); tmp = allow ? rset_pickbot(allow) : (pbase == RID_RETHI ? RID_RETLO : RID_RETHI); emit_condbranch(as, PPCI_BC, CC_LT, asm_exitstub_addr(as, exitno)); if (allow == RSET_EMPTY) /* Restore temp. register. */ emit_tai(as, PPCI_LWZ, tmp, RID_SP, SPOFS_TMPW); else ra_modified(as, tmp); emit_ai(as, PPCI_CMPLWI, RID_TMP, (int32_t)(8*topslot)); emit_tab(as, PPCI_SUBF, RID_TMP, pbase, tmp); emit_tai(as, PPCI_LWZ, tmp, tmp, offsetof(lua_State, maxstack)); if (pbase == RID_TMP) emit_getgl(as, RID_TMP, jit_base); emit_getgl(as, tmp, jit_L); if (allow == RSET_EMPTY) /* Spill temp. register. */ emit_tai(as, PPCI_STW, tmp, RID_SP, SPOFS_TMPW); } /* Restore Lua stack from on-trace state. */ static void asm_stack_restore(ASMState *as, SnapShot *snap) { SnapEntry *map = &as->T->snapmap[snap->mapofs]; SnapEntry *flinks = &as->T->snapmap[snap_nextofs(as->T, snap)-1]; MSize n, nent = snap->nent; /* Store the value of all modified slots to the Lua stack. */ for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; BCReg s = snap_slot(sn); int32_t ofs = 8*((int32_t)s-1); IRRef ref = snap_ref(sn); IRIns *ir = IR(ref); if ((sn & SNAP_NORESTORE)) continue; if (irt_isnum(ir->t)) { Reg src = ra_alloc1(as, ref, RSET_FPR); emit_fai(as, PPCI_STFD, src, RID_BASE, ofs); } else { Reg type; RegSet allow = rset_exclude(RSET_GPR, RID_BASE); lua_assert(irt_ispri(ir->t) || irt_isaddr(ir->t) || irt_isinteger(ir->t)); if (!irt_ispri(ir->t)) { Reg src = ra_alloc1(as, ref, allow); rset_clear(allow, src); emit_tai(as, PPCI_STW, src, RID_BASE, ofs+4); } if ((sn & (SNAP_CONT|SNAP_FRAME))) { if (s == 0) continue; /* Do not overwrite link to previous frame. */ type = ra_allock(as, (int32_t)(*flinks--), allow); } else { type = ra_allock(as, (int32_t)irt_toitype(ir->t), allow); } emit_tai(as, PPCI_STW, type, RID_BASE, ofs); } checkmclim(as); } lua_assert(map + nent == flinks); } /* -- GC handling --------------------------------------------------------- */ /* Check GC threshold and do one or more GC steps. */ static void asm_gc_check(ASMState *as) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_step_jit]; IRRef args[2]; MCLabel l_end; Reg tmp; ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); /* Exit trace if in GCSatomic or GCSfinalize. Avoids syncing GC objects. */ asm_guardcc(as, CC_NE); /* Assumes asm_snap_prep() already done. */ emit_ai(as, PPCI_CMPWI, RID_RET, 0); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ASMREF_TMP2; /* MSize steps */ asm_gencall(as, ci, args); emit_tai(as, PPCI_ADDI, ra_releasetmp(as, ASMREF_TMP1), RID_JGL, -32768); tmp = ra_releasetmp(as, ASMREF_TMP2); emit_loadi(as, tmp, as->gcsteps); /* Jump around GC step if GC total < GC threshold. */ emit_condbranch(as, PPCI_BC|PPCF_Y, CC_LT, l_end); emit_ab(as, PPCI_CMPLW, RID_TMP, tmp); emit_getgl(as, tmp, gc.threshold); emit_getgl(as, RID_TMP, gc.total); as->gcsteps = 0; checkmclim(as); } /* -- Loop handling ------------------------------------------------------- */ /* Fixup the loop branch. */ static void asm_loop_fixup(ASMState *as) { MCode *p = as->mctop; MCode *target = as->mcp; if (as->loopinv) { /* Inverted loop branch? */ /* asm_guardcc already inverted the cond branch and patched the final b. */ p[-2] = (p[-2] & (0xffff0000u & ~PPCF_Y)) | (((target-p+2) & 0x3fffu) << 2); } else { p[-1] = PPCI_B|(((target-p+1)&0x00ffffffu)<<2); } } /* -- Head of trace ------------------------------------------------------- */ /* Coalesce BASE register for a root trace. */ static void asm_head_root_base(ASMState *as) { IRIns *ir = IR(REF_BASE); Reg r = ir->r; if (ra_hasreg(r)) { ra_free(as, r); if (rset_test(as->modset, r)) ir->r = RID_INIT; /* No inheritance for modified BASE register. */ if (r != RID_BASE) emit_mr(as, r, RID_BASE); } } /* Coalesce BASE register for a side trace. */ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow) { IRIns *ir = IR(REF_BASE); Reg r = ir->r; if (ra_hasreg(r)) { ra_free(as, r); if (rset_test(as->modset, r)) ir->r = RID_INIT; /* No inheritance for modified BASE register. */ if (irp->r == r) { rset_clear(allow, r); /* Mark same BASE register as coalesced. */ } else if (ra_hasreg(irp->r) && rset_test(as->freeset, irp->r)) { rset_clear(allow, irp->r); emit_mr(as, r, irp->r); /* Move from coalesced parent reg. */ } else { emit_getgl(as, r, jit_base); /* Otherwise reload BASE. */ } } return allow; } /* -- Tail of trace ------------------------------------------------------- */ /* Fixup the tail code. */ static void asm_tail_fixup(ASMState *as, TraceNo lnk) { MCode *p = as->mctop; MCode *target; int32_t spadj = as->T->spadjust; if (spadj == 0) { *--p = PPCI_NOP; *--p = PPCI_NOP; as->mctop = p; } else { /* Patch stack adjustment. */ lua_assert(checki16(CFRAME_SIZE+spadj)); p[-3] = PPCI_ADDI | PPCF_T(RID_TMP) | PPCF_A(RID_SP) | (CFRAME_SIZE+spadj); p[-2] = PPCI_STWU | PPCF_T(RID_TMP) | PPCF_A(RID_SP) | spadj; } /* Patch exit branch. */ target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp; p[-1] = PPCI_B|(((target-p+1)&0x00ffffffu)<<2); } /* Prepare tail of code. */ static void asm_tail_prep(ASMState *as) { MCode *p = as->mctop - 1; /* Leave room for exit branch. */ if (as->loopref) { as->invmcp = as->mcp = p; } else { as->mcp = p-2; /* Leave room for stack pointer adjustment. */ as->invmcp = NULL; } } /* -- Instruction dispatch ------------------------------------------------ */ /* Assemble a single instruction. */ static void asm_ir(ASMState *as, IRIns *ir) { switch ((IROp)ir->o) { /* Miscellaneous ops. */ case IR_LOOP: asm_loop(as); break; case IR_NOP: case IR_XBAR: lua_assert(!ra_used(ir)); break; case IR_USE: ra_alloc1(as, ir->op1, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); break; case IR_PHI: asm_phi(as, ir); break; case IR_HIOP: asm_hiop(as, ir); break; case IR_GCSTEP: asm_gcstep(as, ir); break; /* Guarded assertions. */ case IR_EQ: case IR_NE: if ((ir-1)->o == IR_HREF && ir->op1 == as->curins-1) { as->curins--; asm_href(as, ir-1, (IROp)ir->o); break; } /* fallthrough */ case IR_LT: case IR_GE: case IR_LE: case IR_GT: case IR_ULT: case IR_UGE: case IR_ULE: case IR_UGT: case IR_ABC: asm_comp(as, ir); break; case IR_RETF: asm_retf(as, ir); break; /* Bit ops. */ case IR_BNOT: asm_bitnot(as, ir); break; case IR_BSWAP: asm_bitswap(as, ir); break; case IR_BAND: asm_bitand(as, ir); break; case IR_BOR: asm_bitop(as, ir, PPCI_OR, PPCI_ORI); break; case IR_BXOR: asm_bitop(as, ir, PPCI_XOR, PPCI_XORI); break; case IR_BSHL: asm_bitshift(as, ir, PPCI_SLW, 0); break; case IR_BSHR: asm_bitshift(as, ir, PPCI_SRW, 1); break; case IR_BSAR: asm_bitshift(as, ir, PPCI_SRAW, PPCI_SRAWI); break; case IR_BROL: asm_bitshift(as, ir, PPCI_RLWNM|PPCF_MB(0)|PPCF_ME(31), PPCI_RLWINM|PPCF_MB(0)|PPCF_ME(31)); break; case IR_BROR: lua_assert(0); break; /* Arithmetic ops. */ case IR_ADD: asm_add(as, ir); break; case IR_SUB: asm_sub(as, ir); break; case IR_MUL: asm_mul(as, ir); break; case IR_DIV: asm_fparith(as, ir, PPCI_FDIV); break; case IR_MOD: asm_callid(as, ir, IRCALL_lj_vm_modi); break; case IR_POW: asm_callid(as, ir, IRCALL_lj_vm_powi); break; case IR_NEG: asm_neg(as, ir); break; case IR_ABS: asm_fpunary(as, ir, PPCI_FABS); break; case IR_ATAN2: asm_callid(as, ir, IRCALL_atan2); break; case IR_LDEXP: asm_callid(as, ir, IRCALL_ldexp); break; case IR_MIN: asm_min_max(as, ir, 0); break; case IR_MAX: asm_min_max(as, ir, 1); break; case IR_FPMATH: if (ir->op2 == IRFPM_EXP2 && asm_fpjoin_pow(as, ir)) break; if (ir->op2 == IRFPM_SQRT && (as->flags & JIT_F_SQRT)) asm_fpunary(as, ir, PPCI_FSQRT); else asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2); break; /* Overflow-checking arithmetic ops. */ case IR_ADDOV: asm_arithov(as, ir, PPCI_ADDO); break; case IR_SUBOV: asm_arithov(as, ir, PPCI_SUBFO); break; case IR_MULOV: asm_arithov(as, ir, PPCI_MULLWO); break; /* Memory references. */ case IR_AREF: asm_aref(as, ir); break; case IR_HREF: asm_href(as, ir, 0); break; case IR_HREFK: asm_hrefk(as, ir); break; case IR_NEWREF: asm_newref(as, ir); break; case IR_UREFO: case IR_UREFC: asm_uref(as, ir); break; case IR_FREF: asm_fref(as, ir); break; case IR_STRREF: asm_strref(as, ir); break; /* Loads and stores. */ case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: asm_ahuvload(as, ir); break; case IR_FLOAD: asm_fload(as, ir); break; case IR_XLOAD: asm_xload(as, ir); break; case IR_SLOAD: asm_sload(as, ir); break; case IR_ASTORE: case IR_HSTORE: case IR_USTORE: asm_ahustore(as, ir); break; case IR_FSTORE: asm_fstore(as, ir); break; case IR_XSTORE: asm_xstore(as, ir, 0); break; /* Allocations. */ case IR_SNEW: case IR_XSNEW: asm_snew(as, ir); break; case IR_TNEW: asm_tnew(as, ir); break; case IR_TDUP: asm_tdup(as, ir); break; case IR_CNEW: case IR_CNEWI: asm_cnew(as, ir); break; /* Write barriers. */ case IR_TBAR: asm_tbar(as, ir); break; case IR_OBAR: asm_obar(as, ir); break; /* Type conversions. */ case IR_CONV: asm_conv(as, ir); break; case IR_TOBIT: asm_tobit(as, ir); break; case IR_TOSTR: asm_tostr(as, ir); break; case IR_STRTO: asm_strto(as, ir); break; /* Calls. */ case IR_CALLN: case IR_CALLL: case IR_CALLS: asm_call(as, ir); break; case IR_CALLXS: asm_callx(as, ir); break; case IR_CARG: break; default: setintV(&as->J->errinfo, ir->o); lj_trace_err_info(as->J, LJ_TRERR_NYIIR); break; } } /* -- Trace setup --------------------------------------------------------- */ /* Ensure there are enough stack slots for call arguments. */ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) { IRRef args[CCI_NARGS_MAX*2]; uint32_t i, nargs = (int)CCI_NARGS(ci); int nslots = 2, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; asm_collectargs(as, ir, ci, args); for (i = 0; i < nargs; i++) if (args[i] && irt_isfp(IR(args[i])->t)) { if (nfpr > 0) nfpr--; else nslots = (nslots+3) & ~1; } else { if (ngpr > 0) ngpr--; else nslots++; } if (nslots > as->evenspill) /* Leave room for args in stack slots. */ as->evenspill = nslots; return irt_isfp(ir->t) ? REGSP_HINT(RID_FPRET) : REGSP_HINT(RID_RET); } static void asm_setup_target(ASMState *as) { asm_exitstub_setup(as, as->T->nsnap + (as->parent ? 1 : 0)); } /* -- Trace patching ------------------------------------------------------ */ /* Patch exit jumps of existing machine code to a new target. */ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target) { MCode *p = T->mcode; MCode *pe = (MCode *)((char *)p + T->szmcode); MCode *px = exitstub_trace_addr(T, exitno); MCode *cstart = NULL; MCode *mcarea = lj_mcode_patch(J, p, 0); int clearso = 0; for (; p < pe; p++) { /* Look for exitstub branch, try to replace with branch to target. */ uint32_t ins = *p; if ((ins & 0xfc000000u) == 0x40000000u && ((ins ^ ((char *)px-(char *)p)) & 0xffffu) == 0) { ptrdiff_t delta = (char *)target - (char *)p; if (((ins >> 16) & 3) == (CC_SO&3)) { clearso = sizeof(MCode); delta -= sizeof(MCode); } /* Many, but not all short-range branches can be patched directly. */ if (((delta + 0x8000) >> 16) == 0) { *p = (ins & 0xffdf0000u) | ((uint32_t)delta & 0xffffu) | ((delta & 0x8000) * (PPCF_Y/0x8000)); if (!cstart) cstart = p; } } else if ((ins & 0xfc000000u) == PPCI_B && ((ins ^ ((char *)px-(char *)p)) & 0x03ffffffu) == 0) { ptrdiff_t delta = (char *)target - (char *)p; lua_assert(((delta + 0x02000000) >> 26) == 0); *p = PPCI_B | ((uint32_t)delta & 0x03ffffffu); if (!cstart) cstart = p; } } { /* Always patch long-range branch in exit stub itself. */ ptrdiff_t delta = (char *)target - (char *)px - clearso; lua_assert(((delta + 0x02000000) >> 26) == 0); *px = PPCI_B | ((uint32_t)delta & 0x03ffffffu); } if (!cstart) cstart = px; lj_mcode_sync(cstart, px+1); if (clearso) { /* Extend the current trace. Ugly workaround. */ MCode *pp = J->cur.mcode; J->cur.szmcode += sizeof(MCode); *--pp = PPCI_MCRXR; /* Clear SO flag. */ J->cur.mcode = pp; lj_mcode_sync(pp, pp+1); } lj_mcode_patch(J, mcarea, 1); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_meta.h0000664000000000000000000000265712202141143022154 0ustar rootroot/* ** Metamethod handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_META_H #define _LJ_META_H #include "lj_obj.h" /* Metamethod handling */ LJ_FUNC void lj_meta_init(lua_State *L); LJ_FUNC cTValue *lj_meta_cache(GCtab *mt, MMS mm, GCstr *name); LJ_FUNC cTValue *lj_meta_lookup(lua_State *L, cTValue *o, MMS mm); #if LJ_HASFFI LJ_FUNC int lj_meta_tailcall(lua_State *L, cTValue *tv); #endif #define lj_meta_fastg(g, mt, mm) \ ((mt) == NULL ? NULL : ((mt)->nomm & (1u<<(mm))) ? NULL : \ lj_meta_cache(mt, mm, mmname_str(g, mm))) #define lj_meta_fast(L, mt, mm) lj_meta_fastg(G(L), mt, mm) /* C helpers for some instructions, called from assembler VM. */ LJ_FUNCA cTValue *lj_meta_tget(lua_State *L, cTValue *o, cTValue *k); LJ_FUNCA TValue *lj_meta_tset(lua_State *L, cTValue *o, cTValue *k); LJ_FUNCA TValue *lj_meta_arith(lua_State *L, TValue *ra, cTValue *rb, cTValue *rc, BCReg op); LJ_FUNCA TValue *lj_meta_cat(lua_State *L, TValue *top, int left); LJ_FUNCA TValue * LJ_FASTCALL lj_meta_len(lua_State *L, cTValue *o); LJ_FUNCA TValue *lj_meta_equal(lua_State *L, GCobj *o1, GCobj *o2, int ne); LJ_FUNCA TValue * LJ_FASTCALL lj_meta_equal_cd(lua_State *L, BCIns ins); LJ_FUNCA TValue *lj_meta_comp(lua_State *L, cTValue *o1, cTValue *o2, int op); LJ_FUNCA void lj_meta_call(lua_State *L, TValue *func, TValue *top); LJ_FUNCA void LJ_FASTCALL lj_meta_for(lua_State *L, TValue *o); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_clib.h0000664000000000000000000000136212202141143022127 0ustar rootroot/* ** FFI C library loader. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CLIB_H #define _LJ_CLIB_H #include "lj_obj.h" #if LJ_HASFFI /* Namespace for C library indexing. */ #define CLNS_INDEX ((1u<env. */ } CLibrary; LJ_FUNC TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name); LJ_FUNC void lj_clib_load(lua_State *L, GCtab *mt, GCstr *name, int global); LJ_FUNC void lj_clib_unload(CLibrary *cl); LJ_FUNC void lj_clib_default(lua_State *L, GCtab *mt); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_def.h0000664000000000000000000002404512202141143021757 0ustar rootroot/* ** LuaJIT common internal definitions. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_DEF_H #define _LJ_DEF_H #include "lua.h" #if defined(_MSC_VER) /* MSVC is stuck in the last century and doesn't have C99's stdint.h. */ typedef __int8 int8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #ifdef _WIN64 typedef __int64 intptr_t; typedef unsigned __int64 uintptr_t; #else typedef __int32 intptr_t; typedef unsigned __int32 uintptr_t; #endif #elif defined(__symbian__) /* Cough. */ typedef signed char int8_t; typedef short int int16_t; typedef int int32_t; typedef long long int64_t; typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; typedef int intptr_t; typedef unsigned int uintptr_t; #else #include #endif /* Needed everywhere. */ #include #include /* Various VM limits. */ #define LJ_MAX_MEM 0x7fffff00 /* Max. total memory allocation. */ #define LJ_MAX_ALLOC LJ_MAX_MEM /* Max. individual allocation length. */ #define LJ_MAX_STR LJ_MAX_MEM /* Max. string length. */ #define LJ_MAX_UDATA LJ_MAX_MEM /* Max. userdata length. */ #define LJ_MAX_STRTAB (1<<26) /* Max. string table size. */ #define LJ_MAX_HBITS 26 /* Max. hash bits. */ #define LJ_MAX_ABITS 28 /* Max. bits of array key. */ #define LJ_MAX_ASIZE ((1<<(LJ_MAX_ABITS-1))+1) /* Max. array part size. */ #define LJ_MAX_COLOSIZE 16 /* Max. elems for colocated array. */ #define LJ_MAX_LINE LJ_MAX_MEM /* Max. source code line number. */ #define LJ_MAX_XLEVEL 200 /* Max. syntactic nesting level. */ #define LJ_MAX_BCINS (1<<26) /* Max. # of bytecode instructions. */ #define LJ_MAX_SLOTS 250 /* Max. # of slots in a Lua func. */ #define LJ_MAX_LOCVAR 200 /* Max. # of local variables. */ #define LJ_MAX_UPVAL 60 /* Max. # of upvalues. */ #define LJ_MAX_IDXCHAIN 100 /* __index/__newindex chain limit. */ #define LJ_STACK_EXTRA 5 /* Extra stack space (metamethods). */ #define LJ_NUM_CBPAGE 1 /* Number of FFI callback pages. */ /* Minimum table/buffer sizes. */ #define LJ_MIN_GLOBAL 6 /* Min. global table size (hbits). */ #define LJ_MIN_REGISTRY 2 /* Min. registry size (hbits). */ #define LJ_MIN_STRTAB 256 /* Min. string table size (pow2). */ #define LJ_MIN_SBUF 32 /* Min. string buffer length. */ #define LJ_MIN_VECSZ 8 /* Min. size for growable vectors. */ #define LJ_MIN_IRSZ 32 /* Min. size for growable IR. */ #define LJ_MIN_K64SZ 16 /* Min. size for chained K64Array. */ /* JIT compiler limits. */ #define LJ_MAX_JSLOTS 250 /* Max. # of stack slots for a trace. */ #define LJ_MAX_PHI 64 /* Max. # of PHIs for a loop. */ #define LJ_MAX_EXITSTUBGR 16 /* Max. # of exit stub groups. */ /* Various macros. */ #ifndef UNUSED #define UNUSED(x) ((void)(x)) /* to avoid warnings */ #endif #define U64x(hi, lo) (((uint64_t)0x##hi << 32) + (uint64_t)0x##lo) #define i32ptr(p) ((int32_t)(intptr_t)(void *)(p)) #define u32ptr(p) ((uint32_t)(intptr_t)(void *)(p)) #define checki8(x) ((x) == (int32_t)(int8_t)(x)) #define checku8(x) ((x) == (int32_t)(uint8_t)(x)) #define checki16(x) ((x) == (int32_t)(int16_t)(x)) #define checku16(x) ((x) == (int32_t)(uint16_t)(x)) #define checki32(x) ((x) == (int32_t)(x)) #define checku32(x) ((x) == (uint32_t)(x)) #define checkptr32(x) ((uintptr_t)(x) == (uint32_t)(uintptr_t)(x)) /* Every half-decent C compiler transforms this into a rotate instruction. */ #define lj_rol(x, n) (((x)<<(n)) | ((x)>>(-(int)(n)&(8*sizeof(x)-1)))) #define lj_ror(x, n) (((x)<<(-(int)(n)&(8*sizeof(x)-1))) | ((x)>>(n))) /* A really naive Bloom filter. But sufficient for our needs. */ typedef uintptr_t BloomFilter; #define BLOOM_MASK (8*sizeof(BloomFilter) - 1) #define bloombit(x) ((uintptr_t)1 << ((x) & BLOOM_MASK)) #define bloomset(b, x) ((b) |= bloombit((x))) #define bloomtest(b, x) ((b) & bloombit((x))) #if defined(__GNUC__) #define LJ_NORET __attribute__((noreturn)) #define LJ_ALIGN(n) __attribute__((aligned(n))) #define LJ_INLINE inline #define LJ_AINLINE inline __attribute__((always_inline)) #define LJ_NOINLINE __attribute__((noinline)) #if defined(__ELF__) || defined(__MACH__) #if !((defined(__sun__) && defined(__svr4__)) || defined(__CELLOS_LV2__)) #define LJ_NOAPI extern __attribute__((visibility("hidden"))) #endif #endif /* Note: it's only beneficial to use fastcall on x86 and then only for up to ** two non-FP args. The amalgamated compile covers all LJ_FUNC cases. Only ** indirect calls and related tail-called C functions are marked as fastcall. */ #if defined(__i386__) #define LJ_FASTCALL __attribute__((fastcall)) #endif #define LJ_LIKELY(x) __builtin_expect(!!(x), 1) #define LJ_UNLIKELY(x) __builtin_expect(!!(x), 0) #define lj_ffs(x) ((uint32_t)__builtin_ctz(x)) /* Don't ask ... */ #if defined(__INTEL_COMPILER) && (defined(__i386__) || defined(__x86_64__)) static LJ_AINLINE uint32_t lj_fls(uint32_t x) { uint32_t r; __asm__("bsrl %1, %0" : "=r" (r) : "rm" (x) : "cc"); return r; } #else #define lj_fls(x) ((uint32_t)(__builtin_clz(x)^31)) #endif #if defined(__arm__) static LJ_AINLINE uint32_t lj_bswap(uint32_t x) { uint32_t r; #if __ARM_ARCH_6__ || __ARM_ARCH_6J__ || __ARM_ARCH_6T2__ || __ARM_ARCH_6Z__ ||\ __ARM_ARCH_6ZK__ || __ARM_ARCH_7__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ __asm__("rev %0, %1" : "=r" (r) : "r" (x)); return r; #else #ifdef __thumb__ r = x ^ lj_ror(x, 16); #else __asm__("eor %0, %1, %1, ror #16" : "=r" (r) : "r" (x)); #endif return ((r & 0xff00ffffu) >> 8) ^ lj_ror(x, 8); #endif } static LJ_AINLINE uint64_t lj_bswap64(uint64_t x) { return ((uint64_t)lj_bswap((uint32_t)x)<<32) | lj_bswap((uint32_t)(x>>32)); } #elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) static LJ_AINLINE uint32_t lj_bswap(uint32_t x) { return (uint32_t)__builtin_bswap32((int32_t)x); } static LJ_AINLINE uint64_t lj_bswap64(uint64_t x) { return (uint64_t)__builtin_bswap64((int64_t)x); } #elif defined(__i386__) || defined(__x86_64__) static LJ_AINLINE uint32_t lj_bswap(uint32_t x) { uint32_t r; __asm__("bswap %0" : "=r" (r) : "0" (x)); return r; } #if defined(__i386__) static LJ_AINLINE uint64_t lj_bswap64(uint64_t x) { return ((uint64_t)lj_bswap((uint32_t)x)<<32) | lj_bswap((uint32_t)(x>>32)); } #else static LJ_AINLINE uint64_t lj_bswap64(uint64_t x) { uint64_t r; __asm__("bswap %0" : "=r" (r) : "0" (x)); return r; } #endif #else static LJ_AINLINE uint32_t lj_bswap(uint32_t x) { return (x << 24) | ((x & 0xff00) << 8) | ((x >> 8) & 0xff00) | (x >> 24); } static LJ_AINLINE uint64_t lj_bswap64(uint64_t x) { return (uint64_t)lj_bswap((uint32_t)(x >> 32)) | ((uint64_t)lj_bswap((uint32_t)x) << 32); } #endif typedef union __attribute__((packed)) Unaligned16 { uint16_t u; uint8_t b[2]; } Unaligned16; typedef union __attribute__((packed)) Unaligned32 { uint32_t u; uint8_t b[4]; } Unaligned32; /* Unaligned load of uint16_t. */ static LJ_AINLINE uint16_t lj_getu16(const void *p) { return ((const Unaligned16 *)p)->u; } /* Unaligned load of uint32_t. */ static LJ_AINLINE uint32_t lj_getu32(const void *p) { return ((const Unaligned32 *)p)->u; } #elif defined(_MSC_VER) #define LJ_NORET __declspec(noreturn) #define LJ_ALIGN(n) __declspec(align(n)) #define LJ_INLINE __inline #define LJ_AINLINE __forceinline #define LJ_NOINLINE __declspec(noinline) #if defined(_M_IX86) #define LJ_FASTCALL __fastcall #endif #ifdef _M_PPC unsigned int _CountLeadingZeros(long); #pragma intrinsic(_CountLeadingZeros) static LJ_AINLINE uint32_t lj_fls(uint32_t x) { return _CountLeadingZeros(x) ^ 31; } #else unsigned char _BitScanForward(uint32_t *, unsigned long); unsigned char _BitScanReverse(uint32_t *, unsigned long); #pragma intrinsic(_BitScanForward) #pragma intrinsic(_BitScanReverse) static LJ_AINLINE uint32_t lj_ffs(uint32_t x) { uint32_t r; _BitScanForward(&r, x); return r; } static LJ_AINLINE uint32_t lj_fls(uint32_t x) { uint32_t r; _BitScanReverse(&r, x); return r; } #endif unsigned long _byteswap_ulong(unsigned long); uint64_t _byteswap_uint64(uint64_t); #define lj_bswap(x) (_byteswap_ulong((x))) #define lj_bswap64(x) (_byteswap_uint64((x))) #if defined(_M_PPC) && defined(LUAJIT_NO_UNALIGNED) /* ** Replacement for unaligned loads on Xbox 360. Disabled by default since it's ** usually more costly than the occasional stall when crossing a cache-line. */ static LJ_AINLINE uint16_t lj_getu16(const void *v) { const uint8_t *p = (const uint8_t *)v; return (uint16_t)((p[0]<<8) | p[1]); } static LJ_AINLINE uint32_t lj_getu32(const void *v) { const uint8_t *p = (const uint8_t *)v; return (uint32_t)((p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3]); } #else /* Unaligned loads are generally ok on x86/x64. */ #define lj_getu16(p) (*(uint16_t *)(p)) #define lj_getu32(p) (*(uint32_t *)(p)) #endif #else #error "missing defines for your compiler" #endif /* Optional defines. */ #ifndef LJ_FASTCALL #define LJ_FASTCALL #endif #ifndef LJ_NORET #define LJ_NORET #endif #ifndef LJ_NOAPI #define LJ_NOAPI extern #endif #ifndef LJ_LIKELY #define LJ_LIKELY(x) (x) #define LJ_UNLIKELY(x) (x) #endif /* Attributes for internal functions. */ #define LJ_DATA LJ_NOAPI #define LJ_DATADEF #define LJ_ASMF LJ_NOAPI #define LJ_FUNCA LJ_NOAPI #if defined(ljamalg_c) #define LJ_FUNC static #else #define LJ_FUNC LJ_NOAPI #endif #define LJ_FUNC_NORET LJ_FUNC LJ_NORET #define LJ_FUNCA_NORET LJ_FUNCA LJ_NORET #define LJ_ASMF_NORET LJ_ASMF LJ_NORET /* Runtime assertions. */ #ifdef lua_assert #define check_exp(c, e) (lua_assert(c), (e)) #define api_check(l, e) lua_assert(e) #else #define lua_assert(c) ((void)0) #define check_exp(c, e) (e) #define api_check luai_apicheck #endif /* Static assertions. */ #define LJ_ASSERT_NAME2(name, line) name ## line #define LJ_ASSERT_NAME(line) LJ_ASSERT_NAME2(lj_assert_, line) #ifdef __COUNTER__ #define LJ_STATIC_ASSERT(cond) \ extern void LJ_ASSERT_NAME(__COUNTER__)(int STATIC_ASSERTION_FAILED[(cond)?1:-1]) #else #define LJ_STATIC_ASSERT(cond) \ extern void LJ_ASSERT_NAME(__LINE__)(int STATIC_ASSERTION_FAILED[(cond)?1:-1]) #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vmmath.c0000664000000000000000000000621412202141143022506 0ustar rootroot/* ** Math helper functions for assembler VM. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_vmmath_c #define LUA_CORE #include #include #include "lj_obj.h" #include "lj_ir.h" #include "lj_vm.h" /* -- Helper functions for generated machine code ------------------------- */ #if LJ_TARGET_X86ORX64 /* Wrapper functions to avoid linker issues on OSX. */ LJ_FUNCA double lj_vm_sinh(double x) { return sinh(x); } LJ_FUNCA double lj_vm_cosh(double x) { return cosh(x); } LJ_FUNCA double lj_vm_tanh(double x) { return tanh(x); } #endif #if !LJ_TARGET_X86ORX64 double lj_vm_foldarith(double x, double y, int op) { switch (op) { case IR_ADD - IR_ADD: return x+y; break; case IR_SUB - IR_ADD: return x-y; break; case IR_MUL - IR_ADD: return x*y; break; case IR_DIV - IR_ADD: return x/y; break; case IR_MOD - IR_ADD: return x-lj_vm_floor(x/y)*y; break; case IR_POW - IR_ADD: return pow(x, y); break; case IR_NEG - IR_ADD: return -x; break; case IR_ABS - IR_ADD: return fabs(x); break; #if LJ_HASJIT case IR_ATAN2 - IR_ADD: return atan2(x, y); break; case IR_LDEXP - IR_ADD: return ldexp(x, (int)y); break; case IR_MIN - IR_ADD: return x > y ? y : x; break; case IR_MAX - IR_ADD: return x < y ? y : x; break; #endif default: return x; } } #endif #if LJ_HASJIT #ifdef LUAJIT_NO_LOG2 double lj_vm_log2(double a) { return log(a) * 1.4426950408889634074; } #endif #ifdef LUAJIT_NO_EXP2 double lj_vm_exp2(double a) { return exp(a * 0.6931471805599453); } #endif #if !(LJ_TARGET_ARM || LJ_TARGET_PPC) int32_t LJ_FASTCALL lj_vm_modi(int32_t a, int32_t b) { uint32_t y, ua, ub; lua_assert(b != 0); /* This must be checked before using this function. */ ua = a < 0 ? (uint32_t)-a : (uint32_t)a; ub = b < 0 ? (uint32_t)-b : (uint32_t)b; y = ua % ub; if (y != 0 && (a^b) < 0) y = y - ub; if (((int32_t)y^b) < 0) y = (uint32_t)-(int32_t)y; return (int32_t)y; } #endif #if !LJ_TARGET_X86ORX64 /* Unsigned x^k. */ static double lj_vm_powui(double x, uint32_t k) { double y; lua_assert(k != 0); for (; (k & 1) == 0; k >>= 1) x *= x; y = x; if ((k >>= 1) != 0) { for (;;) { x *= x; if (k == 1) break; if (k & 1) y *= x; k >>= 1; } y *= x; } return y; } /* Signed x^k. */ double lj_vm_powi(double x, int32_t k) { if (k > 1) return lj_vm_powui(x, (uint32_t)k); else if (k == 1) return x; else if (k == 0) return 1.0; else return 1.0 / lj_vm_powui(x, (uint32_t)-k); } /* Computes fpm(x) for extended math functions. */ double lj_vm_foldfpm(double x, int fpm) { switch (fpm) { case IRFPM_FLOOR: return lj_vm_floor(x); case IRFPM_CEIL: return lj_vm_ceil(x); case IRFPM_TRUNC: return lj_vm_trunc(x); case IRFPM_SQRT: return sqrt(x); case IRFPM_EXP: return exp(x); case IRFPM_EXP2: return lj_vm_exp2(x); case IRFPM_LOG: return log(x); case IRFPM_LOG2: return lj_vm_log2(x); case IRFPM_LOG10: return log10(x); case IRFPM_SIN: return sin(x); case IRFPM_COS: return cos(x); case IRFPM_TAN: return tan(x); default: lua_assert(0); } return 0; } #endif #if LJ_HASFFI int lj_vm_errno(void) { return errno; } #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_ffi.o0000664000000000000000000010501012213333066022136 0ustar rootrootELF>;@@ UHSHH@=St%=Sw =f0:u=Xt=c>tHS)ȉBSH[]UHSHHHsHVH9Sv ~ ɋVrHHH[]UHHcHGHDH;Gsxt ]UHAVAUATSHIžHIƋCHXL` AUH0tH9rHuHt9w)t9fwHtƃv 0t HA|$HSLHIHH Jv:H9uPC@(tAD$tiS!J(@tTJ)tuUAD$BuJ%t9w' %t9wHHHtľLHEHIEt LHEȃxHUȋ@A9pwsI $A|$A9rIAuJ%t9w& %t9wIIIAtøwAG9t+I|$I@ E;t$rfDpHPAHMHLHED8@A uAEAOP(tP$9P r)LHEȃx}sI $H[A\A]A^A_]UHH]LeLmH HIĺHIHSz uHBH9Cw B@  HLLH]LeLmUHH]LeLmLuL}H@HGDI|$ILpL;ssSHLcI4$A|$wH ALHULZI4$A|$wH0AHHULH}ȸHHLyLsLHuHAEAExuSHB(tB$9B rHH]LeLmLuL}UHH]LeLmH HID(HCH9CvH,A$HCHPHSA*H]LeLmUHH]LeLmLuH0HGDI|$LAƾHIDLHƋ~AHMLLHt^HS*EB0 tK uFHSHJHK*HCHHHK* H]LeLmLuUHATSHHGDI|$LEHULHS*BH[A\]UHH]LeLmH HGDI|$LfHSzu zyBWLIŋ%=uHLL _w AEu HC@ HS*BH]LeLmUHH]LeLmLuH HGDI|$LAžHx*BDfuDrDLIDLHI9A}DD9uKJA9MuBuLLD1u}t t uI$%tA;D$rHH‹tI9HS)ȉBSH]LeLmLuUHAWAVAUATSH(IGDI}LAIutAM9rHHEHHuM%t9w*%@t9wHHHtHUDLAID$A4HHELHL‰Ẽ LHHEDIEEEE9rH}HNjuMtD9r( tA9wHHHNjt¸wG9t+rI}I@ E;urfDpADDLIHEDx@A uAWAD$@(tML$L+MIOILEUHL?DI}(H(x8HG AD$HHMm A}HUHLLHHH Jv<H9uPAD$@(tAUtiAD$!H(@tTH)tuUAUP70)DHL`HsN mLH]LeLmLuUHH]LeLmH0HGDI|$EHGLhL;osxt HHP0LEHMLDEAt+At 2HHLH4LHUHLH]LeLmUHATSHHGDI|$EHGHPH;Wsxt H0LEHMLEtHLHAHSHHMHL¸tCP$9P rHH[A\]UHAVAUATSHIźHHIE(HCHHHK@z uRC@(tHIHCHPHSD @A|$ uAL$C@(tEd$HIƺHHLHD0@A~uAVC@(tAD$Me HSHCxtD@HHHCxtHD`IUHIu(HD @A|$ uAT$C@(tHCHPHSxtJpHHHHHSt5HHxD LkHHLHIUHH Jv:H9uPC@(tAD$tiS!J(@tTJ)tuUAD$B 0 && id < cts->toplj_obj.hlj_gc.hC typelj_cdata.hlib_ffi.c(((tv)->it) == (~10u))ctype<%s>cdata<%s>: %pcdata<%s>: %dsz == 8K__mode(((L->top-1)->it) == (~11u))Linuxx64_LOADEDffi!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!(((((ct->info)) >> 28) == CT_VOID) || ((((ct->info)) >> 28) == CT_STRUCT) || ((((ct->info)) >> 28) == CT_BITFIELD))((((&(((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->registrytv))->it) == (~11u))setgcV>__index __newindex__eq__len__lt__le__concat__call__add__sub__mul__div__mod__pow__unm __tostring__pairs__ipairsffi__metatableluaopen_ffi>__index __newindex__gc>freeset__index>cdefnewcasttypeofistypesizeofalignofoffsetoferrnostringcopyfillabimetatypegcloadCosarchlj_cf_ffi_clib___newindexctype_checkctype_childcdata_getptrcopyTVlj_cf_ffi_clib___indexlj_gc_barrierbacklj_cdata_newffi_register_moduleGCC: (Debian 4.7.3-4) 4.7.3zRx  mAC Ec  @PAC EF d*AC e $AC G  AC E  AC Ev (AC M $ AC It H{AC v huAC p $}AC Ph (AC M $AC Pu (pAC XS $0eAC PP $X AC T  iAC G] $AC P $AC T (FAC M4 ( 4AC M" L(AC E^ lAC K 2YC O ZAC U  VAC EL  AC E $AC G <AC K \AC K $|AC G AC W  AC F  AC F  AC F $ AC F D AC F d AC F  AC F  AC F  AC F  AC F  AC F $ AC F $DJAC G> $l0AC T $AC P  AC G (AC G .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @d+U,&+,+12+@2x, T0 Oȁ\0D4ea4zh4up p;? N Lo mmP(*7D ]?vp S{uC }, ;o J p[iek ~iD& F4-(Ue2-Z<VVoGP&2 !! *! ?! T! i" ~ " " !" ," 7" B" M" X"J'#06%P&gz P `   7GT`p~(9I\jz *8GXnV' #1AQalib_ffi.clj_cf_ffi_abilj_cf_ffi_loadffi_checkcdatalj_cf_ffi_gc__PRETTY_FUNCTION__.4721__PRETTY_FUNCTION__.4042__PRETTY_FUNCTION__.3963ffi_checkctypelj_cf_ffi_cdeflj_cf_ffi_metatype__PRETTY_FUNCTION__.3993__PRETTY_FUNCTION__.4853lj_cf_ffi_typeofffi_checkptrffi_checkintlj_cf_ffi_filllj_cf_ffi_castlj_cf_ffi_copylj_cf_ffi_stringlj_cf_ffi_errnolj_cf_ffi_offsetoflj_cf_ffi_alignoflj_cf_ffi_sizeoflj_cf_ffi_istype__PRETTY_FUNCTION__.4730lj_cf_ffi_newffi_callback_setlj_cf_ffi_callback_setlj_cf_ffi_callback_freelj_cf_ffi_clib___gcffi_clib_indexlj_cf_ffi_clib___newindex__PRETTY_FUNCTION__.5468lj_cf_ffi_clib___index__PRETTY_FUNCTION__.5456ffi_pairslj_cf_ffi_meta___ipairslj_cf_ffi_meta___pairslj_cf_ffi_meta___tostring__PRETTY_FUNCTION__.4839ffi_arithlj_cf_ffi_meta___unmlj_cf_ffi_meta___powlj_cf_ffi_meta___modlj_cf_ffi_meta___divlj_cf_ffi_meta___mullj_cf_ffi_meta___sublj_cf_ffi_meta___addlj_cf_ffi_meta___concatlj_cf_ffi_meta___lelj_cf_ffi_meta___ltlj_cf_ffi_meta___lenlj_cf_ffi_meta___eqlj_cf_ffi_meta___callffi_index_metalj_cf_ffi_meta___newindexlj_cf_ffi_meta___indexlj_lib_cf_ffi_metalj_lib_init_ffi_meta__PRETTY_FUNCTION__.5644lj_lib_cf_ffi_cliblj_lib_init_ffi_cliblj_lib_cf_ffi_callbacklj_lib_init_ffi_callbacklj_lib_cf_ffilj_lib_init_ffi__PRETTY_FUNCTION__.5638lj_lib_checkstrlj_clib_loadlj_err_argtlj_lib_checkany__assert_faillj_err_arglj_tab_setlj_err_argtypelj_cparselj_err_throwlj_gc_steplj_lib_checktablj_tab_setinthlj_err_callerlj_mem_newgcolj_cconv_ct_tvmemsetmemcpylj_str_new__errno_locationlj_ctype_rawreflj_ctype_getfieldqlj_ctype_infolj_ctype_vlsizelj_cconv_compatptrlj_cdata_newvlj_cconv_ct_initlj_tab_getinthlj_meta_cachelj_ccallback_ptr2slotlj_lib_checkfunclj_clib_unloadlj_clib_indexlj_cconv_tv_ctlj_ctype_metalj_ctype_reprlj_err_callervlj_meta_tailcalllj_ctype_repr_complexlj_ctype_repr_int64lj_str_pushflj_carith_oplj_ccall_funclj_obj_itypenamelj_meta_tgetlj_meta_tsetlj_cdata_indexlj_cdata_setlj_cdata_getluaopen_ffilj_ctype_initlj_tab_newlj_tab_setstrlj_lib_registerlj_clib_defaultlua_pushlstringlj_tab_getstrNNOP Q: JD I  NR J   RST% J?/ #4 9R^ Jph ,m 0rR Jp , R 4U6VDWjSNVWXAYX Jb g  lRSZ[ J  # R1 Jp; ,@ 0ERW Jpa ,f kR J   R J   R J ;$ )R7\F JP U  ZR J # RX J   #R_ Ji n  sR J ; R\ J   R J% #* /R?XS J   R] S J %  * R: ] ^ J    RN JX ]  b R Q S J   R7 JA F  K R{ J ;  R \ J   R ] J #! & R6 X _- Q[ Je j  o R ] J   R ] `& J0 #5 :RJXaNbTcdbeHQvbbf J&) . 83RJ JT Y  ^R J   RG JQ V  [RdeS J   RM JW \  aR J ; R\ J   Rg' J1 #6 ;R^hzijT J?) #. 3RZ Jpd ,i 0nR Jp , RX? JI N  SR J   Rk#ZZ Jd #i nR Jp , 0R Jp , R[?lmPPn2 J< FA PFRf Jp u  zR J&  8R J   R([7]v JP F PR J   R J   R3 J= B  GRloX J? # R( J2 7  <Rn Jx }  RpqrsY g J   R J   R. J&8 = 8BRT J^ c  hRt J # R u9 JC #H M R_ qs  J2 ;  R J&  8 R J   !R2! qM!p]!se! qu!q!v!X!w"x" J" "  "R# J# #  "#RO#p_#sw#q#r#p#q$$r=$ql$ y$r$z$ J?$ #% %R%{Q% J?[% #`% e%Ru%s%q!&P7&|W&[~&}&P&|'~='Xe'z'' J' #' 'R'( J#( #(( -(R<( D(`Q( Y(`g(( J( #( (R( J( J (( JP( F( (R( J) J`)) J) J%)4) JP>) FC) H)R`)) J) #) )R) JP) F) )R)) )) )* J* J** %*`6* J@* FE* J*RX*|* *`** J?* #* *R+ Jp+ ,+ 0+R*+ Jp4+ ,9+ >+R&%M"B"7","!"X"" ""! !(!0!8&@HGeU- Di o C m Dmh$LSlC  o  4i\D$P-pUeG@`&!!!!(!H"h ""!","7"B"(M"HX"p#%&V'tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj.supp0000664000000000000000000000057712202141143021705 0ustar rootroot# Valgrind suppression file for LuaJIT 2.0. { Optimized string compare Memcheck:Addr4 fun:lj_str_cmp } { Optimized string compare Memcheck:Addr1 fun:lj_str_cmp } { Optimized string compare Memcheck:Addr4 fun:lj_str_new } { Optimized string compare Memcheck:Addr1 fun:lj_str_new } { Optimized string compare Memcheck:Cond fun:lj_str_new } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_target_mips.h0000664000000000000000000001641612202141143023542 0ustar rootroot/* ** Definitions for MIPS CPUs. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_TARGET_MIPS_H #define _LJ_TARGET_MIPS_H /* -- Registers IDs ------------------------------------------------------- */ #define GPRDEF(_) \ _(R0) _(R1) _(R2) _(R3) _(R4) _(R5) _(R6) _(R7) \ _(R8) _(R9) _(R10) _(R11) _(R12) _(R13) _(R14) _(R15) \ _(R16) _(R17) _(R18) _(R19) _(R20) _(R21) _(R22) _(R23) \ _(R24) _(R25) _(SYS1) _(SYS2) _(R28) _(SP) _(R30) _(RA) #define FPRDEF(_) \ _(F0) _(F1) _(F2) _(F3) _(F4) _(F5) _(F6) _(F7) \ _(F8) _(F9) _(F10) _(F11) _(F12) _(F13) _(F14) _(F15) \ _(F16) _(F17) _(F18) _(F19) _(F20) _(F21) _(F22) _(F23) \ _(F24) _(F25) _(F26) _(F27) _(F28) _(F29) _(F30) _(F31) #define VRIDDEF(_) #define RIDENUM(name) RID_##name, enum { GPRDEF(RIDENUM) /* General-purpose registers (GPRs). */ FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */ RID_MAX, RID_ZERO = RID_R0, RID_TMP = RID_RA, /* Calling conventions. */ RID_RET = RID_R2, #if LJ_LE RID_RETHI = RID_R3, RID_RETLO = RID_R2, #else RID_RETHI = RID_R2, RID_RETLO = RID_R3, #endif RID_FPRET = RID_F0, RID_CFUNCADDR = RID_R25, /* These definitions must match with the *.dasc file(s): */ RID_BASE = RID_R16, /* Interpreter BASE. */ RID_LPC = RID_R18, /* Interpreter PC. */ RID_DISPATCH = RID_R19, /* Interpreter DISPATCH table. */ RID_LREG = RID_R20, /* Interpreter L. */ RID_JGL = RID_R30, /* On-trace: global_State + 32768. */ /* Register ranges [min, max) and number of registers. */ RID_MIN_GPR = RID_R0, RID_MAX_GPR = RID_RA+1, RID_MIN_FPR = RID_F0, RID_MAX_FPR = RID_F31+1, RID_NUM_GPR = RID_MAX_GPR - RID_MIN_GPR, RID_NUM_FPR = RID_MAX_FPR - RID_MIN_FPR /* Only even regs are used. */ }; #define RID_NUM_KREF RID_NUM_GPR #define RID_MIN_KREF RID_R0 /* -- Register sets ------------------------------------------------------- */ /* Make use of all registers, except ZERO, TMP, SP, SYS1, SYS2 and JGL. */ #define RSET_FIXED \ (RID2RSET(RID_ZERO)|RID2RSET(RID_TMP)|RID2RSET(RID_SP)|\ RID2RSET(RID_SYS1)|RID2RSET(RID_SYS2)|RID2RSET(RID_JGL)) #define RSET_GPR (RSET_RANGE(RID_MIN_GPR, RID_MAX_GPR) - RSET_FIXED) #define RSET_FPR \ (RID2RSET(RID_F0)|RID2RSET(RID_F2)|RID2RSET(RID_F4)|RID2RSET(RID_F6)|\ RID2RSET(RID_F8)|RID2RSET(RID_F10)|RID2RSET(RID_F12)|RID2RSET(RID_F14)|\ RID2RSET(RID_F16)|RID2RSET(RID_F18)|RID2RSET(RID_F20)|RID2RSET(RID_F22)|\ RID2RSET(RID_F24)|RID2RSET(RID_F26)|RID2RSET(RID_F28)|RID2RSET(RID_F30)) #define RSET_ALL (RSET_GPR|RSET_FPR) #define RSET_INIT RSET_ALL #define RSET_SCRATCH_GPR \ (RSET_RANGE(RID_R1, RID_R15+1)|\ RID2RSET(RID_R24)|RID2RSET(RID_R25)|RID2RSET(RID_R28)) #define RSET_SCRATCH_FPR \ (RID2RSET(RID_F0)|RID2RSET(RID_F2)|RID2RSET(RID_F4)|RID2RSET(RID_F6)|\ RID2RSET(RID_F8)|RID2RSET(RID_F10)|RID2RSET(RID_F12)|RID2RSET(RID_F14)|\ RID2RSET(RID_F16)|RID2RSET(RID_F18)) #define RSET_SCRATCH (RSET_SCRATCH_GPR|RSET_SCRATCH_FPR) #define REGARG_FIRSTGPR RID_R4 #define REGARG_LASTGPR RID_R7 #define REGARG_NUMGPR 4 #define REGARG_FIRSTFPR RID_F12 #define REGARG_LASTFPR RID_F14 #define REGARG_NUMFPR 2 /* -- Spill slots --------------------------------------------------------- */ /* Spill slots are 32 bit wide. An even/odd pair is used for FPRs. ** ** SPS_FIXED: Available fixed spill slots in interpreter frame. ** This definition must match with the *.dasc file(s). ** ** SPS_FIRST: First spill slot for general use. */ #define SPS_FIXED 5 #define SPS_FIRST 4 #define SPOFS_TMP 0 #define sps_scale(slot) (4 * (int32_t)(slot)) #define sps_align(slot) (((slot) - SPS_FIXED + 1) & ~1) /* -- Exit state ---------------------------------------------------------- */ /* This definition must match with the *.dasc file(s). */ typedef struct { lua_Number fpr[RID_NUM_FPR]; /* Floating-point registers. */ int32_t gpr[RID_NUM_GPR]; /* General-purpose registers. */ int32_t spill[256]; /* Spill slots. */ } ExitState; /* Highest exit + 1 indicates stack check. */ #define EXITSTATE_CHECKEXIT 1 /* Return the address of a per-trace exit stub. */ static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p) { while (*p == 0x00000000) p++; /* Skip MIPSI_NOP. */ return p; } /* Avoid dependence on lj_jit.h if only including lj_target.h. */ #define exitstub_trace_addr(T, exitno) \ exitstub_trace_addr_((MCode *)((char *)(T)->mcode + (T)->szmcode)) /* -- Instructions -------------------------------------------------------- */ /* Instruction fields. */ #define MIPSF_S(r) ((r) << 21) #define MIPSF_T(r) ((r) << 16) #define MIPSF_D(r) ((r) << 11) #define MIPSF_R(r) ((r) << 21) #define MIPSF_H(r) ((r) << 16) #define MIPSF_G(r) ((r) << 11) #define MIPSF_F(r) ((r) << 6) #define MIPSF_A(n) ((n) << 6) #define MIPSF_M(n) ((n) << 11) typedef enum MIPSIns { /* Integer instructions. */ MIPSI_MOVE = 0x00000021, MIPSI_NOP = 0x00000000, MIPSI_LI = 0x24000000, MIPSI_LU = 0x34000000, MIPSI_LUI = 0x3c000000, MIPSI_ADDIU = 0x24000000, MIPSI_ANDI = 0x30000000, MIPSI_ORI = 0x34000000, MIPSI_XORI = 0x38000000, MIPSI_SLTI = 0x28000000, MIPSI_SLTIU = 0x2c000000, MIPSI_ADDU = 0x00000021, MIPSI_SUBU = 0x00000023, MIPSI_MUL = 0x70000002, MIPSI_AND = 0x00000024, MIPSI_OR = 0x00000025, MIPSI_XOR = 0x00000026, MIPSI_NOR = 0x00000027, MIPSI_SLT = 0x0000002a, MIPSI_SLTU = 0x0000002b, MIPSI_MOVZ = 0x0000000a, MIPSI_MOVN = 0x0000000b, MIPSI_SLL = 0x00000000, MIPSI_SRL = 0x00000002, MIPSI_SRA = 0x00000003, MIPSI_ROTR = 0x00200002, /* MIPS32R2 */ MIPSI_SLLV = 0x00000004, MIPSI_SRLV = 0x00000006, MIPSI_SRAV = 0x00000007, MIPSI_ROTRV = 0x00000046, /* MIPS32R2 */ MIPSI_SEB = 0x7c000420, /* MIPS32R2 */ MIPSI_SEH = 0x7c000620, /* MIPS32R2 */ MIPSI_WSBH = 0x7c0000a0, /* MIPS32R2 */ MIPSI_B = 0x10000000, MIPSI_J = 0x08000000, MIPSI_JAL = 0x0c000000, MIPSI_JR = 0x00000008, MIPSI_JALR = 0x0000f809, MIPSI_BEQ = 0x10000000, MIPSI_BNE = 0x14000000, MIPSI_BLEZ = 0x18000000, MIPSI_BGTZ = 0x1c000000, MIPSI_BLTZ = 0x04000000, MIPSI_BGEZ = 0x04010000, /* Load/store instructions. */ MIPSI_LW = 0x8c000000, MIPSI_SW = 0xac000000, MIPSI_LB = 0x80000000, MIPSI_SB = 0xa0000000, MIPSI_LH = 0x84000000, MIPSI_SH = 0xa4000000, MIPSI_LBU = 0x90000000, MIPSI_LHU = 0x94000000, MIPSI_LWC1 = 0xc4000000, MIPSI_SWC1 = 0xe4000000, MIPSI_LDC1 = 0xd4000000, MIPSI_SDC1 = 0xf4000000, /* FP instructions. */ MIPSI_MOV_S = 0x46000006, MIPSI_MOV_D = 0x46200006, MIPSI_MOVT_D = 0x46210011, MIPSI_MOVF_D = 0x46200011, MIPSI_ABS_D = 0x46200005, MIPSI_NEG_D = 0x46200007, MIPSI_ADD_D = 0x46200000, MIPSI_SUB_D = 0x46200001, MIPSI_MUL_D = 0x46200002, MIPSI_DIV_D = 0x46200003, MIPSI_SQRT_D = 0x46200004, MIPSI_ADD_S = 0x46000000, MIPSI_SUB_S = 0x46000001, MIPSI_CVT_D_S = 0x46000021, MIPSI_CVT_W_S = 0x46000024, MIPSI_CVT_S_D = 0x46200020, MIPSI_CVT_W_D = 0x46200024, MIPSI_CVT_S_W = 0x46800020, MIPSI_CVT_D_W = 0x46800021, MIPSI_TRUNC_W_S = 0x4600000d, MIPSI_TRUNC_W_D = 0x4620000d, MIPSI_FLOOR_W_S = 0x4600000f, MIPSI_FLOOR_W_D = 0x4620000f, MIPSI_MFC1 = 0x44000000, MIPSI_MTC1 = 0x44800000, MIPSI_BC1F = 0x45000000, MIPSI_BC1T = 0x45010000, MIPSI_C_EQ_D = 0x46200032, MIPSI_C_OLT_D = 0x46200034, MIPSI_C_ULT_D = 0x46200035, MIPSI_C_OLE_D = 0x46200036, MIPSI_C_ULE_D = 0x46200037, } MIPSIns; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ir.h0000664000000000000000000004232512202141143021634 0ustar rootroot/* ** SSA IR (Intermediate Representation) format. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_IR_H #define _LJ_IR_H #include "lj_obj.h" /* -- IR instructions ----------------------------------------------------- */ /* IR instruction definition. Order matters, see below. ORDER IR */ #define IRDEF(_) \ /* Guarded assertions. */ \ /* Must be properly aligned to flip opposites (^1) and (un)ordered (^4). */ \ _(LT, N , ref, ref) \ _(GE, N , ref, ref) \ _(LE, N , ref, ref) \ _(GT, N , ref, ref) \ \ _(ULT, N , ref, ref) \ _(UGE, N , ref, ref) \ _(ULE, N , ref, ref) \ _(UGT, N , ref, ref) \ \ _(EQ, C , ref, ref) \ _(NE, C , ref, ref) \ \ _(ABC, N , ref, ref) \ _(RETF, S , ref, ref) \ \ /* Miscellaneous ops. */ \ _(NOP, N , ___, ___) \ _(BASE, N , lit, lit) \ _(PVAL, N , lit, ___) \ _(GCSTEP, S , ___, ___) \ _(HIOP, S , ref, ref) \ _(LOOP, S , ___, ___) \ _(USE, S , ref, ___) \ _(PHI, S , ref, ref) \ _(RENAME, S , ref, lit) \ \ /* Constants. */ \ _(KPRI, N , ___, ___) \ _(KINT, N , cst, ___) \ _(KGC, N , cst, ___) \ _(KPTR, N , cst, ___) \ _(KKPTR, N , cst, ___) \ _(KNULL, N , cst, ___) \ _(KNUM, N , cst, ___) \ _(KINT64, N , cst, ___) \ _(KSLOT, N , ref, lit) \ \ /* Bit ops. */ \ _(BNOT, N , ref, ___) \ _(BSWAP, N , ref, ___) \ _(BAND, C , ref, ref) \ _(BOR, C , ref, ref) \ _(BXOR, C , ref, ref) \ _(BSHL, N , ref, ref) \ _(BSHR, N , ref, ref) \ _(BSAR, N , ref, ref) \ _(BROL, N , ref, ref) \ _(BROR, N , ref, ref) \ \ /* Arithmetic ops. ORDER ARITH */ \ _(ADD, C , ref, ref) \ _(SUB, N , ref, ref) \ _(MUL, C , ref, ref) \ _(DIV, N , ref, ref) \ _(MOD, N , ref, ref) \ _(POW, N , ref, ref) \ _(NEG, N , ref, ref) \ \ _(ABS, N , ref, ref) \ _(ATAN2, N , ref, ref) \ _(LDEXP, N , ref, ref) \ _(MIN, C , ref, ref) \ _(MAX, C , ref, ref) \ _(FPMATH, N , ref, lit) \ \ /* Overflow-checking arithmetic ops. */ \ _(ADDOV, CW, ref, ref) \ _(SUBOV, NW, ref, ref) \ _(MULOV, CW, ref, ref) \ \ /* Memory ops. A = array, H = hash, U = upvalue, F = field, S = stack. */ \ \ /* Memory references. */ \ _(AREF, R , ref, ref) \ _(HREFK, R , ref, ref) \ _(HREF, L , ref, ref) \ _(NEWREF, S , ref, ref) \ _(UREFO, LW, ref, lit) \ _(UREFC, LW, ref, lit) \ _(FREF, R , ref, lit) \ _(STRREF, N , ref, ref) \ \ /* Loads and Stores. These must be in the same order. */ \ _(ALOAD, L , ref, ___) \ _(HLOAD, L , ref, ___) \ _(ULOAD, L , ref, ___) \ _(FLOAD, L , ref, lit) \ _(XLOAD, L , ref, lit) \ _(SLOAD, L , lit, lit) \ _(VLOAD, L , ref, ___) \ \ _(ASTORE, S , ref, ref) \ _(HSTORE, S , ref, ref) \ _(USTORE, S , ref, ref) \ _(FSTORE, S , ref, ref) \ _(XSTORE, S , ref, ref) \ \ /* Allocations. */ \ _(SNEW, N , ref, ref) /* CSE is ok, not marked as A. */ \ _(XSNEW, A , ref, ref) \ _(TNEW, AW, lit, lit) \ _(TDUP, AW, ref, ___) \ _(CNEW, AW, ref, ref) \ _(CNEWI, NW, ref, ref) /* CSE is ok, not marked as A. */ \ \ /* Barriers. */ \ _(TBAR, S , ref, ___) \ _(OBAR, S , ref, ref) \ _(XBAR, S , ___, ___) \ \ /* Type conversions. */ \ _(CONV, NW, ref, lit) \ _(TOBIT, N , ref, ref) \ _(TOSTR, N , ref, ___) \ _(STRTO, N , ref, ___) \ \ /* Calls. */ \ _(CALLN, N , ref, lit) \ _(CALLL, L , ref, lit) \ _(CALLS, S , ref, lit) \ _(CALLXS, S , ref, ref) \ _(CARG, N , ref, ref) \ \ /* End of list. */ /* IR opcodes (max. 256). */ typedef enum { #define IRENUM(name, m, m1, m2) IR_##name, IRDEF(IRENUM) #undef IRENUM IR__MAX } IROp; /* Stored opcode. */ typedef uint8_t IROp1; LJ_STATIC_ASSERT(((int)IR_EQ^1) == (int)IR_NE); LJ_STATIC_ASSERT(((int)IR_LT^1) == (int)IR_GE); LJ_STATIC_ASSERT(((int)IR_LE^1) == (int)IR_GT); LJ_STATIC_ASSERT(((int)IR_LT^3) == (int)IR_GT); LJ_STATIC_ASSERT(((int)IR_LT^4) == (int)IR_ULT); /* Delta between xLOAD and xSTORE. */ #define IRDELTA_L2S ((int)IR_ASTORE - (int)IR_ALOAD) LJ_STATIC_ASSERT((int)IR_HLOAD + IRDELTA_L2S == (int)IR_HSTORE); LJ_STATIC_ASSERT((int)IR_ULOAD + IRDELTA_L2S == (int)IR_USTORE); LJ_STATIC_ASSERT((int)IR_FLOAD + IRDELTA_L2S == (int)IR_FSTORE); LJ_STATIC_ASSERT((int)IR_XLOAD + IRDELTA_L2S == (int)IR_XSTORE); /* -- Named IR literals --------------------------------------------------- */ /* FPMATH sub-functions. ORDER FPM. */ #define IRFPMDEF(_) \ _(FLOOR) _(CEIL) _(TRUNC) /* Must be first and in this order. */ \ _(SQRT) _(EXP) _(EXP2) _(LOG) _(LOG2) _(LOG10) \ _(SIN) _(COS) _(TAN) \ _(OTHER) typedef enum { #define FPMENUM(name) IRFPM_##name, IRFPMDEF(FPMENUM) #undef FPMENUM IRFPM__MAX } IRFPMathOp; /* FLOAD fields. */ #define IRFLDEF(_) \ _(STR_LEN, offsetof(GCstr, len)) \ _(FUNC_ENV, offsetof(GCfunc, l.env)) \ _(FUNC_PC, offsetof(GCfunc, l.pc)) \ _(TAB_META, offsetof(GCtab, metatable)) \ _(TAB_ARRAY, offsetof(GCtab, array)) \ _(TAB_NODE, offsetof(GCtab, node)) \ _(TAB_ASIZE, offsetof(GCtab, asize)) \ _(TAB_HMASK, offsetof(GCtab, hmask)) \ _(TAB_NOMM, offsetof(GCtab, nomm)) \ _(UDATA_META, offsetof(GCudata, metatable)) \ _(UDATA_UDTYPE, offsetof(GCudata, udtype)) \ _(UDATA_FILE, sizeof(GCudata)) \ _(CDATA_CTYPEID, offsetof(GCcdata, ctypeid)) \ _(CDATA_PTR, sizeof(GCcdata)) \ _(CDATA_INT, sizeof(GCcdata)) \ _(CDATA_INT64, sizeof(GCcdata)) \ _(CDATA_INT64_4, sizeof(GCcdata) + 4) typedef enum { #define FLENUM(name, ofs) IRFL_##name, IRFLDEF(FLENUM) #undef FLENUM IRFL__MAX } IRFieldID; /* SLOAD mode bits, stored in op2. */ #define IRSLOAD_PARENT 0x01 /* Coalesce with parent trace. */ #define IRSLOAD_FRAME 0x02 /* Load hiword of frame. */ #define IRSLOAD_TYPECHECK 0x04 /* Needs type check. */ #define IRSLOAD_CONVERT 0x08 /* Number to integer conversion. */ #define IRSLOAD_READONLY 0x10 /* Read-only, omit slot store. */ #define IRSLOAD_INHERIT 0x20 /* Inherited by exits/side traces. */ /* XLOAD mode, stored in op2. */ #define IRXLOAD_READONLY 1 /* Load from read-only data. */ #define IRXLOAD_VOLATILE 2 /* Load from volatile data. */ #define IRXLOAD_UNALIGNED 4 /* Unaligned load. */ /* CONV mode, stored in op2. */ #define IRCONV_SRCMASK 0x001f /* Source IRType. */ #define IRCONV_DSTMASK 0x03e0 /* Dest. IRType (also in ir->t). */ #define IRCONV_DSH 5 #define IRCONV_NUM_INT ((IRT_NUM<>2)&3)) #define irm_iscomm(m) ((m) & IRM_C) #define irm_kind(m) ((m) & IRM_S) #define IRMODE(name, m, m1, m2) (((IRM##m1)|((IRM##m2)<<2)|(IRM_##m))^IRM_W), LJ_DATA const uint8_t lj_ir_mode[IR__MAX+1]; /* -- IR instruction types ------------------------------------------------ */ /* Map of itypes to non-negative numbers. ORDER LJ_T. ** LJ_TUPVAL/LJ_TTRACE never appear in a TValue. Use these itypes for ** IRT_P32 and IRT_P64, which never escape the IR. ** The various integers are only used in the IR and can only escape to ** a TValue after implicit or explicit conversion. Their types must be ** contiguous and next to IRT_NUM (see the typerange macros below). */ #define IRTDEF(_) \ _(NIL, 4) _(FALSE, 4) _(TRUE, 4) _(LIGHTUD, LJ_64 ? 8 : 4) _(STR, 4) \ _(P32, 4) _(THREAD, 4) _(PROTO, 4) _(FUNC, 4) _(P64, 8) _(CDATA, 4) \ _(TAB, 4) _(UDATA, 4) \ _(FLOAT, 4) _(NUM, 8) _(I8, 1) _(U8, 1) _(I16, 2) _(U16, 2) \ _(INT, 4) _(U32, 4) _(I64, 8) _(U64, 8) \ _(SOFTFP, 4) /* There is room for 9 more types. */ /* IR result type and flags (8 bit). */ typedef enum { #define IRTENUM(name, size) IRT_##name, IRTDEF(IRTENUM) #undef IRTENUM IRT__MAX, /* Native pointer type and the corresponding integer type. */ IRT_PTR = LJ_64 ? IRT_P64 : IRT_P32, IRT_INTP = LJ_64 ? IRT_I64 : IRT_INT, IRT_UINTP = LJ_64 ? IRT_U64 : IRT_U32, /* Additional flags. */ IRT_MARK = 0x20, /* Marker for misc. purposes. */ IRT_ISPHI = 0x40, /* Instruction is left or right PHI operand. */ IRT_GUARD = 0x80, /* Instruction is a guard. */ /* Masks. */ IRT_TYPE = 0x1f, IRT_T = 0xff } IRType; #define irtype_ispri(irt) ((uint32_t)(irt) <= IRT_TRUE) /* Stored IRType. */ typedef struct IRType1 { uint8_t irt; } IRType1; #define IRT(o, t) ((uint32_t)(((o)<<8) | (t))) #define IRTI(o) (IRT((o), IRT_INT)) #define IRTN(o) (IRT((o), IRT_NUM)) #define IRTG(o, t) (IRT((o), IRT_GUARD|(t))) #define IRTGI(o) (IRT((o), IRT_GUARD|IRT_INT)) #define irt_t(t) ((IRType)(t).irt) #define irt_type(t) ((IRType)((t).irt & IRT_TYPE)) #define irt_sametype(t1, t2) ((((t1).irt ^ (t2).irt) & IRT_TYPE) == 0) #define irt_typerange(t, first, last) \ ((uint32_t)((t).irt & IRT_TYPE) - (uint32_t)(first) <= (uint32_t)(last-first)) #define irt_isnil(t) (irt_type(t) == IRT_NIL) #define irt_ispri(t) ((uint32_t)irt_type(t) <= IRT_TRUE) #define irt_islightud(t) (irt_type(t) == IRT_LIGHTUD) #define irt_isstr(t) (irt_type(t) == IRT_STR) #define irt_istab(t) (irt_type(t) == IRT_TAB) #define irt_iscdata(t) (irt_type(t) == IRT_CDATA) #define irt_isfloat(t) (irt_type(t) == IRT_FLOAT) #define irt_isnum(t) (irt_type(t) == IRT_NUM) #define irt_isint(t) (irt_type(t) == IRT_INT) #define irt_isi8(t) (irt_type(t) == IRT_I8) #define irt_isu8(t) (irt_type(t) == IRT_U8) #define irt_isi16(t) (irt_type(t) == IRT_I16) #define irt_isu16(t) (irt_type(t) == IRT_U16) #define irt_isu32(t) (irt_type(t) == IRT_U32) #define irt_isi64(t) (irt_type(t) == IRT_I64) #define irt_isu64(t) (irt_type(t) == IRT_U64) #define irt_isfp(t) (irt_isnum(t) || irt_isfloat(t)) #define irt_isinteger(t) (irt_typerange((t), IRT_I8, IRT_INT)) #define irt_isgcv(t) (irt_typerange((t), IRT_STR, IRT_UDATA)) #define irt_isaddr(t) (irt_typerange((t), IRT_LIGHTUD, IRT_UDATA)) #define irt_isint64(t) (irt_typerange((t), IRT_I64, IRT_U64)) #if LJ_64 #define IRT_IS64 \ ((1u<> irt_type(t)) & 1) #define irt_is64orfp(t) (((IRT_IS64|(1u<>irt_type(t)) & 1) #define irt_size(t) (lj_ir_type_size[irt_t((t))]) LJ_DATA const uint8_t lj_ir_type_size[]; static LJ_AINLINE IRType itype2irt(const TValue *tv) { if (tvisint(tv)) return IRT_INT; else if (tvisnum(tv)) return IRT_NUM; #if LJ_64 else if (tvislightud(tv)) return IRT_LIGHTUD; #endif else return (IRType)~itype(tv); } static LJ_AINLINE uint32_t irt_toitype_(IRType t) { lua_assert(!LJ_64 || t != IRT_LIGHTUD); if (LJ_DUALNUM && t > IRT_NUM) { return LJ_TISNUM; } else { lua_assert(t <= IRT_NUM); return ~(uint32_t)t; } } #define irt_toitype(t) irt_toitype_(irt_type((t))) #define irt_isguard(t) ((t).irt & IRT_GUARD) #define irt_ismarked(t) ((t).irt & IRT_MARK) #define irt_setmark(t) ((t).irt |= IRT_MARK) #define irt_clearmark(t) ((t).irt &= ~IRT_MARK) #define irt_isphi(t) ((t).irt & IRT_ISPHI) #define irt_setphi(t) ((t).irt |= IRT_ISPHI) #define irt_clearphi(t) ((t).irt &= ~IRT_ISPHI) /* Stored combined IR opcode and type. */ typedef uint16_t IROpT; /* -- IR references ------------------------------------------------------- */ /* IR references. */ typedef uint16_t IRRef1; /* One stored reference. */ typedef uint32_t IRRef2; /* Two stored references. */ typedef uint32_t IRRef; /* Used to pass around references. */ /* Fixed references. */ enum { REF_BIAS = 0x8000, REF_TRUE = REF_BIAS-3, REF_FALSE = REF_BIAS-2, REF_NIL = REF_BIAS-1, /* \--- Constants grow downwards. */ REF_BASE = REF_BIAS, /* /--- IR grows upwards. */ REF_FIRST = REF_BIAS+1, REF_DROP = 0xffff }; /* Note: IRMlit operands must be < REF_BIAS, too! ** This allows for fast and uniform manipulation of all operands ** without looking up the operand mode in lj_ir_mode: ** - CSE calculates the maximum reference of two operands. ** This must work with mixed reference/literal operands, too. ** - DCE marking only checks for operand >= REF_BIAS. ** - LOOP needs to substitute reference operands. ** Constant references and literals must not be modified. */ #define IRREF2(lo, hi) ((IRRef2)(lo) | ((IRRef2)(hi) << 16)) #define irref_isk(ref) ((ref) < REF_BIAS) /* Tagged IR references (32 bit). ** ** +-------+-------+---------------+ ** | irt | flags | ref | ** +-------+-------+---------------+ ** ** The tag holds a copy of the IRType and speeds up IR type checks. */ typedef uint32_t TRef; #define TREF_REFMASK 0x0000ffff #define TREF_FRAME 0x00010000 #define TREF_CONT 0x00020000 #define TREF(ref, t) ((TRef)((ref) + ((t)<<24))) #define tref_ref(tr) ((IRRef1)(tr)) #define tref_t(tr) ((IRType)((tr)>>24)) #define tref_type(tr) ((IRType)(((tr)>>24) & IRT_TYPE)) #define tref_typerange(tr, first, last) \ ((((tr)>>24) & IRT_TYPE) - (TRef)(first) <= (TRef)(last-first)) #define tref_istype(tr, t) (((tr) & (IRT_TYPE<<24)) == ((t)<<24)) #define tref_isnil(tr) (tref_istype((tr), IRT_NIL)) #define tref_isfalse(tr) (tref_istype((tr), IRT_FALSE)) #define tref_istrue(tr) (tref_istype((tr), IRT_TRUE)) #define tref_isstr(tr) (tref_istype((tr), IRT_STR)) #define tref_isfunc(tr) (tref_istype((tr), IRT_FUNC)) #define tref_iscdata(tr) (tref_istype((tr), IRT_CDATA)) #define tref_istab(tr) (tref_istype((tr), IRT_TAB)) #define tref_isudata(tr) (tref_istype((tr), IRT_UDATA)) #define tref_isnum(tr) (tref_istype((tr), IRT_NUM)) #define tref_isint(tr) (tref_istype((tr), IRT_INT)) #define tref_isbool(tr) (tref_typerange((tr), IRT_FALSE, IRT_TRUE)) #define tref_ispri(tr) (tref_typerange((tr), IRT_NIL, IRT_TRUE)) #define tref_istruecond(tr) (!tref_typerange((tr), IRT_NIL, IRT_FALSE)) #define tref_isinteger(tr) (tref_typerange((tr), IRT_I8, IRT_INT)) #define tref_isnumber(tr) (tref_typerange((tr), IRT_NUM, IRT_INT)) #define tref_isnumber_str(tr) (tref_isnumber((tr)) || tref_isstr((tr))) #define tref_isgcv(tr) (tref_typerange((tr), IRT_STR, IRT_UDATA)) #define tref_isk(tr) (irref_isk(tref_ref((tr)))) #define tref_isk2(tr1, tr2) (irref_isk(tref_ref((tr1) | (tr2)))) #define TREF_PRI(t) (TREF(REF_NIL-(t), (t))) #define TREF_NIL (TREF_PRI(IRT_NIL)) #define TREF_FALSE (TREF_PRI(IRT_FALSE)) #define TREF_TRUE (TREF_PRI(IRT_TRUE)) /* -- IR format ----------------------------------------------------------- */ /* IR instruction format (64 bit). ** ** 16 16 8 8 8 8 ** +-------+-------+---+---+---+---+ ** | op1 | op2 | t | o | r | s | ** +-------+-------+---+---+---+---+ ** | op12/i/gco | ot | prev | (alternative fields in union) ** +---------------+-------+-------+ ** 32 16 16 ** ** prev is only valid prior to register allocation and then reused for r + s. */ typedef union IRIns { struct { LJ_ENDIAN_LOHI( IRRef1 op1; /* IR operand 1. */ , IRRef1 op2; /* IR operand 2. */ ) IROpT ot; /* IR opcode and type (overlaps t and o). */ IRRef1 prev; /* Previous ins in same chain (overlaps r and s). */ }; struct { IRRef2 op12; /* IR operand 1 and 2 (overlaps op1 and op2). */ LJ_ENDIAN_LOHI( IRType1 t; /* IR type. */ , IROp1 o; /* IR opcode. */ ) LJ_ENDIAN_LOHI( uint8_t r; /* Register allocation (overlaps prev). */ , uint8_t s; /* Spill slot allocation (overlaps prev). */ ) }; int32_t i; /* 32 bit signed integer literal (overlaps op12). */ GCRef gcr; /* GCobj constant (overlaps op12). */ MRef ptr; /* Pointer constant (overlaps op12). */ } IRIns; #define ir_kgc(ir) check_exp((ir)->o == IR_KGC, gcref((ir)->gcr)) #define ir_kstr(ir) (gco2str(ir_kgc((ir)))) #define ir_ktab(ir) (gco2tab(ir_kgc((ir)))) #define ir_kfunc(ir) (gco2func(ir_kgc((ir)))) #define ir_kcdata(ir) (gco2cd(ir_kgc((ir)))) #define ir_knum(ir) check_exp((ir)->o == IR_KNUM, mref((ir)->ptr, cTValue)) #define ir_kint64(ir) check_exp((ir)->o == IR_KINT64, mref((ir)->ptr,cTValue)) #define ir_k64(ir) \ check_exp((ir)->o == IR_KNUM || (ir)->o == IR_KINT64, mref((ir)->ptr,cTValue)) #define ir_kptr(ir) \ check_exp((ir)->o == IR_KPTR || (ir)->o == IR_KKPTR, mref((ir)->ptr, void)) /* A store or any other op with a non-weak guard has a side-effect. */ static LJ_AINLINE int ir_sideeff(IRIns *ir) { return (((ir->t.irt | ~IRT_GUARD) & lj_ir_mode[ir->o]) >= IRM_S); } LJ_STATIC_ASSERT((int)IRT_GUARD == (int)IRM_W); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_init.c0000664000000000000000000000251312202141143022314 0ustar rootroot/* ** Library initialization. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major parts taken verbatim from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lib_init_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_arch.h" static const luaL_Reg lj_lib_load[] = { { "", luaopen_base }, { LUA_LOADLIBNAME, luaopen_package }, { LUA_TABLIBNAME, luaopen_table }, { LUA_IOLIBNAME, luaopen_io }, { LUA_OSLIBNAME, luaopen_os }, { LUA_STRLIBNAME, luaopen_string }, { LUA_MATHLIBNAME, luaopen_math }, { LUA_DBLIBNAME, luaopen_debug }, { LUA_BITLIBNAME, luaopen_bit }, { LUA_JITLIBNAME, luaopen_jit }, { NULL, NULL } }; static const luaL_Reg lj_lib_preload[] = { #if LJ_HASFFI { LUA_FFILIBNAME, luaopen_ffi }, #endif { NULL, NULL } }; LUALIB_API void luaL_openlibs(lua_State *L) { const luaL_Reg *lib; for (lib = lj_lib_load; lib->func; lib++) { lua_pushcfunction(L, lib->func); lua_pushstring(L, lib->name); lua_call(L, 1, 0); } luaL_findtable(L, LUA_REGISTRYINDEX, "_PRELOAD", sizeof(lj_lib_preload)/sizeof(lj_lib_preload[0])-1); for (lib = lj_lib_preload; lib->func; lib++) { lua_pushcfunction(L, lib->func); lua_setfield(L, -2, lib->name); } lua_pop(L, 1); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bc.c0000664000000000000000000000040512202141143021572 0ustar rootroot/* ** Bytecode instruction modes. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_bc_c #define LUA_CORE #include "lj_obj.h" #include "lj_bc.h" /* Bytecode offsets and bytecode instruction modes. */ #include "lj_bcdef.h" tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_string.o0000664000000000000000000006356012213333065022714 0ustar rootrootELF>P0@@UH%@uKHtHc"@ u0&zu Zu 9]UHAVAUATSAIA~^u_HAVF<%uH^vD]t7E~-uHVI9vA9|FA9~"H D9uHHH^L9rAD[A\A]A^]UH.t+[t%uvH< 9]UH]UHH]UHHF%t[uc~uHHFGHV~^HDuHHH%uHPxHHDHȀ8]uH]UHHHHHD 0fl@t  ]UHAWAVAUATSH"HPHGH+GH0L`Dp MHHPM9 Dž\HpHH@LI A<$%t7L9r HHA$HHI A|$%u8L9r HHAT$HHI \\90}H\HPM|$Ed$LEu HD#EtAHuHL)HvHPEA$<H<H;.u'SHCHHDt!HtHPƅp%IM)IT$LH@BƄ%rLcB<78$\HPHpHHpU\HPHc\HPHAHDxv H,HpHHp\HPHc\HPHFHDPy(vH,Tvf.sH,\H,HH1HpH\HP`d=H`H;`   Ƅp<@<.tHpH.t@~Hps@HHpHHpH\HPHË@ HL{L9r HH"HHHXHHDHHA؃\t "t u/L9r HH\HHL9r HH\HHcwAWt&L9r HHc vIi X)L9r HHX0HH0L9r HHHHIL;HL9r HH"HH:\HPH¾HPHHc\LAE LpA]0LHL@ LHH9wgDžDžLHHHt(D)H9AU0HHH HH9sH [A\A]A^]UHSHHHHCHPHSH@HHCxtE@@XSHPH[]UHAWAVAUATSHXIHUȾHHULILeȺLHITHHHHIHx HEH9HGLuLHHEL}LIHI)L9HHI)AEIL-I]HHHt;I)M@ILLIHuMu @ML+It$LLHuLAA}^uIAHLHHHEHHDžDžLHHIHt]t@H+HsLLH+LH7HHH#HCH;s E\LHX[A\A]A^A_]UHV]UHF]UHH]LeLmH@ HIHCHPAH;Ss x AEHSHHA|$u$At$H@EHHt NHHH]LeLmUHSHHP sHXHH[]UHAVAUATSIHWH+WHAՋwHXIE~9L%9tLHcALA9}IcLLIT$BBxuPAD$@(t[A\A]A^]UHAWAVAUATSH(IIǾLAľLIAG EAUHUEYIEHUHꀉP@HEȀuAE@(]Mt@HcAF HH=~ 8LIcHHUH~28LIcHcEHHUH~ 8LH}/HuHXULIMtmAV H)UA~_}~!AL H9UHDA^ ޅ~AL H9SHDHUHzXA_ AA~DCIH4@1HH9ALEHEHpXHULIUBBxuPAE@(tH([A\A]A^A_]UHSHHHHHS*BH[]UHAVAUATSHID` HAʼn¾H…BD HECD%DHEDND9DNE9zAE)A@v lHS H+SDHH9 DHMcKt.E~+HLC*AHHA9AD$[A\A]A^]UHAUATSHHHHHIċCDhHSztDjLHD(@A} uAUC@(tAD$H[A\A]]-+ #0lib_string.c(((o)->it) < 0xfffeffffu)%po < L->toplj_obj.hnilfalsetruefunction: builtin#%d%s: %p(((L->top)->it) == (~4u))too many captureslj_lib.h(((L->top-1)->it) == (~8u))^$*+?.([%-stringgmatchgfind(((L->top-1)->it) == (~11u))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(2)-1]))->it) == (~4u))((((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn.c.upvalue[(1)-1]))->it) == (~4u))M5ClenDbyteDcharCsubCrepGreverselowerupperdumpfindmatchgmatchgsubformatluaopen_stringsetgcVnum2intfrmnum2uintfrmmeta_tostringcopyTV`l@ hlj_lib_pushcclj_cf_string_gmatch_auxCGCC: (Debian 4.7.3-4) 4.7.3zRx eAC ` $<AC G d>AC y AC P AC N zAC u 0AC k (L AC P7 (00AC M  \XAC EN (AC M AC  (AC M (tAC P_ $$ AC N  LAC E (pAC P AC K AC K $AC S 4AC Ej $$AC G (LSAC MA  xNAC ED $AC G $AC I .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @"D&","12"@2#T ' OZP \+i0+r++ep /4 1 h>e@ *e<>H8ZMe`zn0x L     V 0X(s8 FtX  pp-`Ueu'4[#&S5y NG Z`k R~     "2:JXft +=FVao}"0C!Rbo|lib_string.cmatch_classmatch_class_mapmatchbracketclasssinglematchlj_ffh_string_lenwriter_bufclassendaddintlenlj_cf_string_format__PRETTY_FUNCTION__.5303__PRETTY_FUNCTION__.5309__PRETTY_FUNCTION__.5316__PRETTY_FUNCTION__.4040__PRETTY_FUNCTION__.3991matchstart_capturemax_expandpush_onecapturepush_captureslj_cf_string_gsublj_cf_string_gmatch_aux__PRETTY_FUNCTION__.5215lj_cf_string_gmatch__PRETTY_FUNCTION__.4932str_find_auxlj_cf_string_matchlj_cf_string_findlj_cf_string_dumplj_ffh_string_reverselj_ffh_string_charlj_ffh_string_replj_ffh_string_sublj_ffh_string_bytelj_lib_cf_stringlj_lib_init_string__PRETTY_FUNCTION__.5365.LC3lj_char_bitslj_lib_checkstrluaL_addlstringlj_err_callerluaL_buffinitluaL_prepbufferlj_obj_typenameluaL_argerrorstrchrstrncpylj_lib_checkintsprintflj_lib_checknum__assert_faillj_str_bufnumlua_topointerlj_str_pushfluaL_addvaluelj_meta_lookuplua_calllj_str_fromnumberlj_str_newlj_obj_itypenamelj_err_callervluaL_pushresultmemcmplua_pushlstringlua_pushintegerluaL_checkstackluaL_checklstringlua_typeluaL_optintegerlj_err_arglua_tolstringlua_pushvaluelua_gettablelua_tobooleanlua_settoplua_isstringlua_typenamelua_pushcclosurestrpbrkmemchrlua_pushnillj_lib_checkfunclj_bcwritelj_str_needbuflj_lib_optstrlj_lib_optintlj_state_growstackluaopen_stringlj_lib_registerlua_getfieldlua_setfieldlj_tab_newlj_tab_setstr @& 1B2U344=2[566(7:8e j94 1 1 1 1 14:D V;p<=   >< =7 A F K>_ i n s>//<=?~<<2696\ 1x6 166,6f6@ -AB    0> Cu  ;  >  ;  > D}  ;  > E D F H F N F2 SC AW @ G h A    o > 92 < ;A 0F >R Bp < H 3 D; I 4 _44&4 14J4K44LK< DMn xM MNNOPwQ5)OoR6 1 6D3oBSDTUVKW/O9XNHZB63ILB pL Q XV>j pt y ~>?2L2j  rY `  >NNP[Ud lZJ[8LGLLL:\]5 M^4I92K__;QF   ; 0>@2P;``  ; 0>44=4[_ FM W ;\ 0a > 2 ; a 2 a!aS!4q!b! !  ! !d! !e! "f"g4" >" C" H">]"h" " ;" 0">v v v (v 08v @v Hv Pv Xv `v hv pv xv v v v v v v v v v v v v v v v v Hy (08v @yHv Pv Xv `v hv pxv v v v p########### #(#0#8#@#H#P#X#`#h#p#x#############|##  8 [y &'ueU-  @eh8M` 4V `s ( P-tUeu'([P&|y  !tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_snap.o0000664000000000000000000005326012213333057022203 0ustar rootrootELF>1@@ UHWHGHЀzu*J9w  IIL Hzt]UHDGAHOJ<u!DA9uDGA9wGHt]UHtDDA9u" H9u%HLL9uи]UHJA<vJt Ku.HOHP8wHHH9]UHH]LeLmLuL}H`IUHMM͋]DHGL$AD$Aw3AD$<w A$ L\E$$LeHE,IHUDHt D‹utAI AL$B`AHUHEtbuA|$Uu fA|$tE$$MHMULLA*EAE%w IǀIǍSv#tt+uAE3u HIE%uAEfAESvǃuH]LeLmLuL}UHH]LeLmLuL}HPH}II։MDHFHD{CAwH`HHuMLDHtDʋuLAAǍHwA*HEIAuHHUHAuHHMHAweAHMuvHUB tM{Uuf{tlD HMH $MMLLH}U%AA׍JwA*ƀHEAuAHUsAuIƀHMHZAvIƀHMufvHEPH]LeLmLuL}UHF<w_$V)Y6PV6C5'x]UHH]LeLmH IDDHFL,Aw LL>kAE=tWI҉DIAtLLuADHUD;AD$N<vE $E;NrLEMLLH}EL$E;NrLEMLLH}EA|$Q"Ml$L9m H]H]A}uqAEu EEEJ49u&DvH4L+DLA LAAT$8Ew@A$HuHFHP@fA|fAfALAT$fAfAfELADKLEMHUHuLuvSHuHFHЀxUufxt!DLEMHUHuLfALJUfAfALJLSfAfEfAL6{Tu0HEȀxPu&fALJTfALJfALJLHI9DuLmAD9uAIIHMQ)AL}fALJfALJfALJLc%DD AAEAIIHuV)ALHh[A\A]A^A_]UHAWAVAUATSHIHuT EP t;<rH0D4IV EHHhHHPXˉMIF(HPH HMHHAvHH9uAV HPWHHXuL@HEHEHH8H@IW`HxHJ0HHH@HPHxHFHPWH ЋV H9rzPzt(RRHHxHQHPw@xt)@@)HxHxHBHHHM@E}!HEHuHHpH}HEUHML$DIVDL,A}bH}D9uxHD9uvHUHI$H PmA$J9u RHxA@(?HpHunfxtDKHEH$LEMHULL }tEHUBR@HzuHI`HuI`HUHuDKH$LEMHULLHI9TL$$LEMHULLzt2E}tHXHHXAD$ID$HxHFHE}9}H8H9XtLH@< w/H t HPBHMHHxHFCHxHGPztTRRHHxHBH@H[A\A]A^A_]lj_snap.clj_ir.h!1 || t != IRT_LIGHTUDt <= IRT_NUM0(o)->gch.gct == ~(~5u)op == BC_CATn < snap->nents != 0lj_obj.hlj_ctype.hid > 0 && id < cts->toplj_cdata.hsz == 4 || sz == 8irk->op2 == IRFL_TAB_META(((&tmp)->it) == (~11u))map + nent == flinkssz == 8 && ir->o == IR_CONV && ir->op2 == ((IRT_NUM<<5)|IRT_INT)sz == 1 || sz == 2 || sz == 4 || sz == 8!((uint32_t)((IRType)((t).irt & IRT_TYPE)) <= IRT_TRUE)ir->o == IR_CONV && ir->op2 == ((IRT_NUM<<5)|IRT_INT)pc >= ((BCIns *)((char *)(J->pt) + sizeof(GCproto))) && pc < ((BCIns *)((char *)(J->pt) + sizeof(GCproto))) + J->pt->sizebc(((&(((GCobj *)(uintptr_t)((frame)->fr.func).gcptr32))->fn))->c.ffid == 0)!((((frame)->fr.tp.ftsz) & 3) == FRAME_C)f == (MSize)(1 + J->framedepth)(((rs) & ~((0x7f) + ((0) << 8))) != ((0x80) + ((0) << 8)))ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW || ir->o == IR_CNEWIirc->o == IR_CONV && irc->op2 == ((IRT_NUM<<5)|IRT_INT)(J->parent)>0 && (MSize)(J->parent)sizetrace(((&((GCobj *)(uintptr_t)((L->base-1)->fr.func).gcptr32)->fn))->c.ffid == 0)!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == sz!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))irs->o == IR_XSTORE && T->ir[irs->op1].o == IR_ADDiro->o == IR_KINT || iro->o == IR_KINT64p >= (uint8_t *)((void *)((cd)+1)) && p + szs <= (uint8_t *)((void *)((cd)+1)) + sz((&T->ir[ir->op1]))->o == IR_KGC((((((&T->ir[ir->op1]))->o == IR_KGC) ? (void) (0) : __assert_fail ("((&T->ir[ir->op1]))->o == IR_KGC", "lj_snap.c", 757, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)(((&T->ir[ir->op1]))->gcr).gcptr32))))->gch.gct == ~(~11u)irs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTOREsnapshot_framelinkssnap_usedeflj_snap_regspmaplj_snap_replaysnap_replay_constlj_snap_restorecopyTVsnap_unsinkctype_checklj_cdata_newsetgcVsnap_restoredatasnap_restorevalirt_toitype_GCC: (Debian 4.7.3-4) 4.7.3zRx IAC D <?AC z \SAC N |NAC I (AC X (AC Xc AC  $AC P $<OAC GC  dOAC EE  XAC CP (VAC MD  ]AC JN (AC P (('AC M (T8AC M& ( AC P .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @#?@&#,#12#@2$T-OPS\0.e.z.uU X15" ;_ II?,S7NH)YPrp O '@Yr # / <    )5AHS Oer~m X V]x'8 "0>ITlj_snap.csnap_renamefiltersnap_renamerefsnap_dedupsnap_sunk_store2snap_restoredata__PRETTY_FUNCTION__.5327snap_restoreval__PRETTY_FUNCTION__.5311__PRETTY_FUNCTION__.3906snap_replay_const__PRETTY_FUNCTION__.5196snap_prefsnap_usedef__PRETTY_FUNCTION__.5066__PRETTY_FUNCTION__.5039__PRETTY_FUNCTION__.5185__PRETTY_FUNCTION__.5248__PRETTY_FUNCTION__.5367__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5337__PRETTY_FUNCTION__.4866__PRETTY_FUNCTION__.4968__PRETTY_FUNCTION__.3380__assert_faillj_ir_kvaluelj_ir_kintlj_ir_kgclj_ir_k64lj_ir_kptr_lj_opt_foldmemsetlj_bc_modelj_snap_grow_buf_lj_trace_errlj_mem_growlj_snap_grow_map_lj_mem_realloclj_snap_addlj_ir_emitlj_snap_purgelj_snap_shrinklj_snap_regspmaplj_snap_replaylj_ir_kslotlj_snap_restorelj_state_growstacklj_ctype_sizelj_mem_newgcolj_tab_newlj_tab_duplj_tab_set* P4 9 >" P  H"d# p   x"- 7 < A"K U Z )_" p  "> G L Q"[ e j )o" $%&&'    6"()* 4 9 8>"   " * @    O"  ": ,W - /H 1q + .  h "    h"m w | "   "    \"}   "   k"1   H", 6 ; @"i((p6((= G L Q"(((@0p10 ) . 3"/ 9 > C"r |  "8  r X"   H" 9) #3 {8 ="s #} { " /  ": # { "N <X r] b"   "k u z "   ("   X! "e ;   "   " < <! r ! !"! ! ! !"! ! ! !"! " " "";"#L"=" " # #"b# l# q# v#" (08@HPm X`m hm pm xm m  h @I`)@h m  x,Xtarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/luajit.h0000664000000000000000000000501512202141143022020 0ustar rootroot/* ** LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/ ** ** Copyright (C) 2005-2013 Mike Pall. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the ** "Software"), to deal in the Software without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Software, and to ** permit persons to whom the Software is furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be ** included in all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** ** [ MIT license: http://www.opensource.org/licenses/mit-license.php ] */ #ifndef _LUAJIT_H #define _LUAJIT_H #include "lua.h" #define LUAJIT_VERSION "LuaJIT 2.0.2" #define LUAJIT_VERSION_NUM 20002 /* Version 2.0.2 = 02.00.02. */ #define LUAJIT_VERSION_SYM luaJIT_version_2_0_2 #define LUAJIT_COPYRIGHT "Copyright (C) 2005-2013 Mike Pall" #define LUAJIT_URL "http://luajit.org/" /* Modes for luaJIT_setmode. */ #define LUAJIT_MODE_MASK 0x00ff enum { LUAJIT_MODE_ENGINE, /* Set mode for whole JIT engine. */ LUAJIT_MODE_DEBUG, /* Set debug mode (idx = level). */ LUAJIT_MODE_FUNC, /* Change mode for a function. */ LUAJIT_MODE_ALLFUNC, /* Recurse into subroutine protos. */ LUAJIT_MODE_ALLSUBFUNC, /* Change only the subroutines. */ LUAJIT_MODE_TRACE, /* Flush a compiled trace. */ LUAJIT_MODE_WRAPCFUNC = 0x10, /* Set wrapper mode for C function calls. */ LUAJIT_MODE_MAX }; /* Flags or'ed in to the mode. */ #define LUAJIT_MODE_OFF 0x0000 /* Turn feature off. */ #define LUAJIT_MODE_ON 0x0100 /* Turn feature on. */ #define LUAJIT_MODE_FLUSH 0x0200 /* Flush JIT-compiled code. */ /* LuaJIT public C API. */ /* Control the JIT engine. */ LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); /* Enforce (dynamic) linker error for version mismatches. Call from main. */ LUA_API void LUAJIT_VERSION_SYM(void); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lua.hpp0000664000000000000000000000020712202141143021647 0ustar rootroot// C++ wrapper for LuaJIT header files. extern "C" { #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "luajit.h" } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_mcode.c0000664000000000000000000002236712202141143022310 0ustar rootroot/* ** Machine code management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_mcode_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_gc.h" #include "lj_jit.h" #include "lj_mcode.h" #include "lj_trace.h" #include "lj_dispatch.h" #endif #if LJ_HASJIT || LJ_HASFFI #include "lj_vm.h" #endif /* -- OS-specific functions ----------------------------------------------- */ #if LJ_HASJIT || LJ_HASFFI /* Define this if you want to run LuaJIT with Valgrind. */ #ifdef LUAJIT_USE_VALGRIND #include #endif #if LJ_TARGET_IOS void sys_icache_invalidate(void *start, size_t len); #endif /* Synchronize data/instruction cache. */ void lj_mcode_sync(void *start, void *end) { #ifdef LUAJIT_USE_VALGRIND VALGRIND_DISCARD_TRANSLATIONS(start, (char *)end-(char *)start); #endif #if LJ_TARGET_X86ORX64 UNUSED(start); UNUSED(end); #elif LJ_TARGET_IOS sys_icache_invalidate(start, (char *)end-(char *)start); #elif LJ_TARGET_PPC lj_vm_cachesync(start, end); #elif defined(__GNUC__) __clear_cache(start, end); #else #error "Missing builtin to flush instruction cache" #endif } #endif #if LJ_HASJIT #if LJ_TARGET_WINDOWS #define WIN32_LEAN_AND_MEAN #include #define MCPROT_RW PAGE_READWRITE #define MCPROT_RX PAGE_EXECUTE_READ #define MCPROT_RWX PAGE_EXECUTE_READWRITE static void *mcode_alloc_at(jit_State *J, uintptr_t hint, size_t sz, DWORD prot) { void *p = VirtualAlloc((void *)hint, sz, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, prot); if (!p && !hint) lj_trace_err(J, LJ_TRERR_MCODEAL); return p; } static void mcode_free(jit_State *J, void *p, size_t sz) { UNUSED(J); UNUSED(sz); VirtualFree(p, 0, MEM_RELEASE); } static void mcode_setprot(void *p, size_t sz, DWORD prot) { DWORD oprot; VirtualProtect(p, sz, prot, &oprot); } #elif LJ_TARGET_POSIX #include #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON #endif #define MCPROT_RW (PROT_READ|PROT_WRITE) #define MCPROT_RX (PROT_READ|PROT_EXEC) #define MCPROT_RWX (PROT_READ|PROT_WRITE|PROT_EXEC) static void *mcode_alloc_at(jit_State *J, uintptr_t hint, size_t sz, int prot) { void *p = mmap((void *)hint, sz, prot, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { if (!hint) lj_trace_err(J, LJ_TRERR_MCODEAL); p = NULL; } return p; } static void mcode_free(jit_State *J, void *p, size_t sz) { UNUSED(J); munmap(p, sz); } static void mcode_setprot(void *p, size_t sz, int prot) { mprotect(p, sz, prot); } #elif LJ_64 #error "Missing OS support for explicit placement of executable memory" #else /* Fallback allocator. This will fail if memory is not executable by default. */ #define LUAJIT_UNPROTECT_MCODE #define MCPROT_RW 0 #define MCPROT_RX 0 #define MCPROT_RWX 0 static void *mcode_alloc_at(jit_State *J, uintptr_t hint, size_t sz, int prot) { UNUSED(hint); UNUSED(prot); return lj_mem_new(J->L, sz); } static void mcode_free(jit_State *J, void *p, size_t sz) { lj_mem_free(J2G(J), p, sz); } #define mcode_setprot(p, sz, prot) UNUSED(p) #endif /* -- MCode area protection ----------------------------------------------- */ /* Define this ONLY if the page protection twiddling becomes a bottleneck. */ #ifdef LUAJIT_UNPROTECT_MCODE /* It's generally considered to be a potential security risk to have ** pages with simultaneous write *and* execute access in a process. ** ** Do not even think about using this mode for server processes or ** apps handling untrusted external data (such as a browser). ** ** The security risk is not in LuaJIT itself -- but if an adversary finds ** any *other* flaw in your C application logic, then any RWX memory page ** simplifies writing an exploit considerably. */ #define MCPROT_GEN MCPROT_RWX #define MCPROT_RUN MCPROT_RWX static void mcode_protect(jit_State *J, int prot) { UNUSED(J); UNUSED(prot); } #else /* This is the default behaviour and much safer: ** ** Most of the time the memory pages holding machine code are executable, ** but NONE of them is writable. ** ** The current memory area is marked read-write (but NOT executable) only ** during the short time window while the assembler generates machine code. */ #define MCPROT_GEN MCPROT_RW #define MCPROT_RUN MCPROT_RX /* Change protection of MCode area. */ static void mcode_protect(jit_State *J, int prot) { if (J->mcprot != prot) { mcode_setprot(J->mcarea, J->szmcarea, prot); J->mcprot = prot; } } #endif /* -- MCode area allocation ----------------------------------------------- */ #if LJ_TARGET_X64 #define mcode_validptr(p) ((p) && (uintptr_t)(p) < (uintptr_t)1<<47) #else #define mcode_validptr(p) ((p) && (uintptr_t)(p) < 0xffff0000) #endif #ifdef LJ_TARGET_JUMPRANGE /* Get memory within relative jump distance of our code in 64 bit mode. */ static void *mcode_alloc(jit_State *J, size_t sz) { /* Target an address in the static assembler code (64K aligned). ** Try addresses within a distance of target-range/2+1MB..target+range/2-1MB. ** Use half the jump range so every address in the range can reach any other. */ #if LJ_TARGET_MIPS /* Use the middle of the 256MB-aligned region. */ uintptr_t target = ((uintptr_t)(void *)lj_vm_exit_handler & 0xf0000000u) + 0x08000000u; #else uintptr_t target = (uintptr_t)(void *)lj_vm_exit_handler & ~(uintptr_t)0xffff; #endif const uintptr_t range = (1u << (LJ_TARGET_JUMPRANGE-1)) - (1u << 21); /* First try a contiguous area below the last one. */ uintptr_t hint = J->mcarea ? (uintptr_t)J->mcarea - sz : 0; int i; for (i = 0; i < 32; i++) { /* 32 attempts ought to be enough ... */ if (mcode_validptr(hint)) { void *p = mcode_alloc_at(J, hint, sz, MCPROT_GEN); if (mcode_validptr(p) && ((uintptr_t)p + sz - target < range || target - (uintptr_t)p < range)) return p; if (p) mcode_free(J, p, sz); /* Free badly placed area. */ } /* Next try probing pseudo-random addresses. */ do { hint = (0x78fb ^ LJ_PRNG_BITS(J, 15)) << 16; /* 64K aligned. */ } while (!(hint + sz < range)); hint = target + hint - (range>>1); } lj_trace_err(J, LJ_TRERR_MCODEAL); /* Give up. OS probably ignores hints? */ return NULL; } #else /* All memory addresses are reachable by relative jumps. */ #define mcode_alloc(J, sz) mcode_alloc_at((J), 0, (sz), MCPROT_GEN) #endif /* -- MCode area management ----------------------------------------------- */ /* Linked list of MCode areas. */ typedef struct MCLink { MCode *next; /* Next area. */ size_t size; /* Size of current area. */ } MCLink; /* Allocate a new MCode area. */ static void mcode_allocarea(jit_State *J) { MCode *oldarea = J->mcarea; size_t sz = (size_t)J->param[JIT_P_sizemcode] << 10; sz = (sz + LJ_PAGESIZE-1) & ~(size_t)(LJ_PAGESIZE - 1); J->mcarea = (MCode *)mcode_alloc(J, sz); J->szmcarea = sz; J->mcprot = MCPROT_GEN; J->mctop = (MCode *)((char *)J->mcarea + J->szmcarea); J->mcbot = (MCode *)((char *)J->mcarea + sizeof(MCLink)); ((MCLink *)J->mcarea)->next = oldarea; ((MCLink *)J->mcarea)->size = sz; J->szallmcarea += sz; } /* Free all MCode areas. */ void lj_mcode_free(jit_State *J) { MCode *mc = J->mcarea; J->mcarea = NULL; J->szallmcarea = 0; while (mc) { MCode *next = ((MCLink *)mc)->next; mcode_free(J, mc, ((MCLink *)mc)->size); mc = next; } } /* -- MCode transactions -------------------------------------------------- */ /* Reserve the remainder of the current MCode area. */ MCode *lj_mcode_reserve(jit_State *J, MCode **lim) { if (!J->mcarea) mcode_allocarea(J); else mcode_protect(J, MCPROT_GEN); *lim = J->mcbot; return J->mctop; } /* Commit the top part of the current MCode area. */ void lj_mcode_commit(jit_State *J, MCode *top) { J->mctop = top; mcode_protect(J, MCPROT_RUN); } /* Abort the reservation. */ void lj_mcode_abort(jit_State *J) { mcode_protect(J, MCPROT_RUN); } /* Set/reset protection to allow patching of MCode areas. */ MCode *lj_mcode_patch(jit_State *J, MCode *ptr, int finish) { #ifdef LUAJIT_UNPROTECT_MCODE UNUSED(J); UNUSED(ptr); UNUSED(finish); return NULL; #else if (finish) { if (J->mcarea == ptr) mcode_protect(J, MCPROT_RUN); else mcode_setprot(ptr, ((MCLink *)ptr)->size, MCPROT_RUN); return NULL; } else { MCode *mc = J->mcarea; /* Try current area first to use the protection cache. */ if (ptr >= mc && ptr < (MCode *)((char *)mc + J->szmcarea)) { mcode_protect(J, MCPROT_GEN); return mc; } /* Otherwise search through the list of MCode areas. */ for (;;) { mc = ((MCLink *)mc)->next; lua_assert(mc != NULL); if (ptr >= mc && ptr < (MCode *)((char *)mc + ((MCLink *)mc)->size)) { mcode_setprot(mc, ((MCLink *)mc)->size, MCPROT_GEN); return mc; } } } #endif } /* Limit of MCode reservation reached. */ void lj_mcode_limiterr(jit_State *J, size_t need) { size_t sizemcode, maxmcode; lj_mcode_abort(J); sizemcode = (size_t)J->param[JIT_P_sizemcode] << 10; sizemcode = (sizemcode + LJ_PAGESIZE-1) & ~(size_t)(LJ_PAGESIZE - 1); maxmcode = (size_t)J->param[JIT_P_maxmcode] << 10; if ((size_t)need > sizemcode) lj_trace_err(J, LJ_TRERR_MCODEOV); /* Too long for any area. */ if (J->szallmcarea + sizemcode > maxmcode) lj_trace_err(J, LJ_TRERR_MCODEAL); mcode_allocarea(J); lj_trace_err(J, LJ_TRERR_MCODELM); /* Retry with new area. */ } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_target_arm.h0000664000000000000000000001611312202141143023343 0ustar rootroot/* ** Definitions for ARM CPUs. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_TARGET_ARM_H #define _LJ_TARGET_ARM_H /* -- Registers IDs ------------------------------------------------------- */ #define GPRDEF(_) \ _(R0) _(R1) _(R2) _(R3) _(R4) _(R5) _(R6) _(R7) \ _(R8) _(R9) _(R10) _(R11) _(R12) _(SP) _(LR) _(PC) #if LJ_SOFTFP #define FPRDEF(_) #else #define FPRDEF(_) \ _(D0) _(D1) _(D2) _(D3) _(D4) _(D5) _(D6) _(D7) \ _(D8) _(D9) _(D10) _(D11) _(D12) _(D13) _(D14) _(D15) #endif #define VRIDDEF(_) #define RIDENUM(name) RID_##name, enum { GPRDEF(RIDENUM) /* General-purpose registers (GPRs). */ FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */ RID_MAX, RID_TMP = RID_LR, /* Calling conventions. */ RID_RET = RID_R0, RID_RETLO = RID_R0, RID_RETHI = RID_R1, #if LJ_SOFTFP RID_FPRET = RID_R0, #else RID_FPRET = RID_D0, #endif /* These definitions must match with the *.dasc file(s): */ RID_BASE = RID_R9, /* Interpreter BASE. */ RID_LPC = RID_R6, /* Interpreter PC. */ RID_DISPATCH = RID_R7, /* Interpreter DISPATCH table. */ RID_LREG = RID_R8, /* Interpreter L. */ /* Register ranges [min, max) and number of registers. */ RID_MIN_GPR = RID_R0, RID_MAX_GPR = RID_PC+1, RID_MIN_FPR = RID_MAX_GPR, #if LJ_SOFTFP RID_MAX_FPR = RID_MIN_FPR, #else RID_MAX_FPR = RID_D15+1, #endif RID_NUM_GPR = RID_MAX_GPR - RID_MIN_GPR, RID_NUM_FPR = RID_MAX_FPR - RID_MIN_FPR }; #define RID_NUM_KREF RID_NUM_GPR #define RID_MIN_KREF RID_R0 /* -- Register sets ------------------------------------------------------- */ /* Make use of all registers, except sp, lr and pc. */ #define RSET_GPR (RSET_RANGE(RID_MIN_GPR, RID_R12+1)) #define RSET_GPREVEN \ (RID2RSET(RID_R0)|RID2RSET(RID_R2)|RID2RSET(RID_R4)|RID2RSET(RID_R6)| \ RID2RSET(RID_R8)|RID2RSET(RID_R10)) #define RSET_GPRODD \ (RID2RSET(RID_R1)|RID2RSET(RID_R3)|RID2RSET(RID_R5)|RID2RSET(RID_R7)| \ RID2RSET(RID_R9)|RID2RSET(RID_R11)) #if LJ_SOFTFP #define RSET_FPR 0 #else #define RSET_FPR (RSET_RANGE(RID_MIN_FPR, RID_MAX_FPR)) #endif #define RSET_ALL (RSET_GPR|RSET_FPR) #define RSET_INIT RSET_ALL /* ABI-specific register sets. lr is an implicit scratch register. */ #define RSET_SCRATCH_GPR_ (RSET_RANGE(RID_R0, RID_R3+1)|RID2RSET(RID_R12)) #ifdef __APPLE__ #define RSET_SCRATCH_GPR (RSET_SCRATCH_GPR_|RID2RSET(RID_R9)) #else #define RSET_SCRATCH_GPR RSET_SCRATCH_GPR_ #endif #if LJ_SOFTFP #define RSET_SCRATCH_FPR 0 #else #define RSET_SCRATCH_FPR (RSET_RANGE(RID_D0, RID_D7+1)) #endif #define RSET_SCRATCH (RSET_SCRATCH_GPR|RSET_SCRATCH_FPR) #define REGARG_FIRSTGPR RID_R0 #define REGARG_LASTGPR RID_R3 #define REGARG_NUMGPR 4 #if LJ_ABI_SOFTFP #define REGARG_FIRSTFPR 0 #define REGARG_LASTFPR 0 #define REGARG_NUMFPR 0 #else #define REGARG_FIRSTFPR RID_D0 #define REGARG_LASTFPR RID_D7 #define REGARG_NUMFPR 8 #endif /* -- Spill slots --------------------------------------------------------- */ /* Spill slots are 32 bit wide. An even/odd pair is used for FPRs. ** ** SPS_FIXED: Available fixed spill slots in interpreter frame. ** This definition must match with the *.dasc file(s). ** ** SPS_FIRST: First spill slot for general use. Reserve min. two 32 bit slots. */ #define SPS_FIXED 2 #define SPS_FIRST 2 #define SPOFS_TMP 0 #define sps_scale(slot) (4 * (int32_t)(slot)) #define sps_align(slot) (((slot) - SPS_FIXED + 1) & ~1) /* -- Exit state ---------------------------------------------------------- */ /* This definition must match with the *.dasc file(s). */ typedef struct { #if !LJ_SOFTFP lua_Number fpr[RID_NUM_FPR]; /* Floating-point registers. */ #endif int32_t gpr[RID_NUM_GPR]; /* General-purpose registers. */ int32_t spill[256]; /* Spill slots. */ } ExitState; /* PC after instruction that caused an exit. Used to find the trace number. */ #define EXITSTATE_PCREG RID_PC /* Highest exit + 1 indicates stack check. */ #define EXITSTATE_CHECKEXIT 1 #define EXITSTUB_SPACING 4 #define EXITSTUBS_PER_GROUP 32 /* -- Instructions -------------------------------------------------------- */ /* Instruction fields. */ #define ARMF_CC(ai, cc) (((ai) ^ ARMI_CCAL) | ((cc) << 28)) #define ARMF_N(r) ((r) << 16) #define ARMF_D(r) ((r) << 12) #define ARMF_S(r) ((r) << 8) #define ARMF_M(r) (r) #define ARMF_SH(sh, n) (((sh) << 5) | ((n) << 7)) #define ARMF_RSH(sh, r) (0x10 | ((sh) << 5) | ARMF_S(r)) typedef enum ARMIns { ARMI_CCAL = 0xe0000000, ARMI_S = 0x000100000, ARMI_K12 = 0x02000000, ARMI_KNEG = 0x00200000, ARMI_LS_W = 0x00200000, ARMI_LS_U = 0x00800000, ARMI_LS_P = 0x01000000, ARMI_LS_R = 0x02000000, ARMI_LSX_I = 0x00400000, ARMI_AND = 0xe0000000, ARMI_EOR = 0xe0200000, ARMI_SUB = 0xe0400000, ARMI_RSB = 0xe0600000, ARMI_ADD = 0xe0800000, ARMI_ADC = 0xe0a00000, ARMI_SBC = 0xe0c00000, ARMI_RSC = 0xe0e00000, ARMI_TST = 0xe1100000, ARMI_TEQ = 0xe1300000, ARMI_CMP = 0xe1500000, ARMI_CMN = 0xe1700000, ARMI_ORR = 0xe1800000, ARMI_MOV = 0xe1a00000, ARMI_BIC = 0xe1c00000, ARMI_MVN = 0xe1e00000, ARMI_NOP = 0xe1a00000, ARMI_MUL = 0xe0000090, ARMI_SMULL = 0xe0c00090, ARMI_LDR = 0xe4100000, ARMI_LDRB = 0xe4500000, ARMI_LDRH = 0xe01000b0, ARMI_LDRSB = 0xe01000d0, ARMI_LDRSH = 0xe01000f0, ARMI_LDRD = 0xe00000d0, ARMI_STR = 0xe4000000, ARMI_STRB = 0xe4400000, ARMI_STRH = 0xe00000b0, ARMI_STRD = 0xe00000f0, ARMI_PUSH = 0xe92d0000, ARMI_B = 0xea000000, ARMI_BL = 0xeb000000, ARMI_BLX = 0xfa000000, ARMI_BLXr = 0xe12fff30, /* ARMv6 */ ARMI_REV = 0xe6bf0f30, ARMI_SXTB = 0xe6af0070, ARMI_SXTH = 0xe6bf0070, ARMI_UXTB = 0xe6ef0070, ARMI_UXTH = 0xe6ff0070, /* ARMv6T2 */ ARMI_MOVW = 0xe3000000, ARMI_MOVT = 0xe3400000, /* VFP */ ARMI_VMOV_D = 0xeeb00b40, ARMI_VMOV_S = 0xeeb00a40, ARMI_VMOVI_D = 0xeeb00b00, ARMI_VMOV_R_S = 0xee100a10, ARMI_VMOV_S_R = 0xee000a10, ARMI_VMOV_RR_D = 0xec500b10, ARMI_VMOV_D_RR = 0xec400b10, ARMI_VADD_D = 0xee300b00, ARMI_VSUB_D = 0xee300b40, ARMI_VMUL_D = 0xee200b00, ARMI_VMLA_D = 0xee000b00, ARMI_VMLS_D = 0xee000b40, ARMI_VNMLS_D = 0xee100b00, ARMI_VDIV_D = 0xee800b00, ARMI_VABS_D = 0xeeb00bc0, ARMI_VNEG_D = 0xeeb10b40, ARMI_VSQRT_D = 0xeeb10bc0, ARMI_VCMP_D = 0xeeb40b40, ARMI_VCMPZ_D = 0xeeb50b40, ARMI_VMRS = 0xeef1fa10, ARMI_VCVT_S32_F32 = 0xeebd0ac0, ARMI_VCVT_S32_F64 = 0xeebd0bc0, ARMI_VCVT_U32_F32 = 0xeebc0ac0, ARMI_VCVT_U32_F64 = 0xeebc0bc0, ARMI_VCVTR_S32_F32 = 0xeebd0a40, ARMI_VCVTR_S32_F64 = 0xeebd0b40, ARMI_VCVTR_U32_F32 = 0xeebc0a40, ARMI_VCVTR_U32_F64 = 0xeebc0b40, ARMI_VCVT_F32_S32 = 0xeeb80ac0, ARMI_VCVT_F64_S32 = 0xeeb80bc0, ARMI_VCVT_F32_U32 = 0xeeb80a40, ARMI_VCVT_F64_U32 = 0xeeb80b40, ARMI_VCVT_F32_F64 = 0xeeb70bc0, ARMI_VCVT_F64_F32 = 0xeeb70ac0, ARMI_VLDR_S = 0xed100a00, ARMI_VLDR_D = 0xed100b00, ARMI_VSTR_S = 0xed000a00, ARMI_VSTR_D = 0xed000b00, } ARMIns; typedef enum ARMShift { ARMSH_LSL, ARMSH_LSR, ARMSH_ASR, ARMSH_ROR } ARMShift; /* ARM condition codes. */ typedef enum ARMCC { CC_EQ, CC_NE, CC_CS, CC_CC, CC_MI, CC_PL, CC_VS, CC_VC, CC_HI, CC_LS, CC_GE, CC_LT, CC_GT, CC_LE, CC_AL, CC_HS = CC_CS, CC_LO = CC_CC } ARMCC; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_parse.o0000664000000000000000000013116012213333054022345 0ustar rootrootELF> n@@ UHHGHD9L2E]ÃtMUHATSHLgHtFHAЃ v =uHƃuȸ ø[A\]UHLGHtNHLDOAw*t9t Q[@9AJu:uA% T׈Qq 9r@y ]UHATSIt L@LÃu[A\]UHHGH4]UHHA8t(DTQ\HHWxq(rB B D9u܉A8]UHHWxHH@@HHЋHHH9sH9u@ uHH9w]UHG@ALG8ЉG@t A H9w]UHG@LG8v‰ɀA wA4G@]UH协wHH u]ø9w$uUH]ËG8F V HGFHGHHwG89G4tUH9w8w*G4G49tUHÃ~ u UH6]ÃtUH[HHUHFwЉGYuHGFt~vHH]UHATSHLgHHF H7H~FTLfF(F,F0F4F@F<F8F[HFFXFZLHIT$Bx uPAD$@(tID$HID$AT$ H9rL[A\]UHw$UHHGHH ֍2u:=vH fA]UHAWAVAUATSHIAADẼtCLADL,tDL` ỦLQDAuH[A\A]A^A_]UHAUATSHAՃt,IuÉL>uDLH[A\A]]UHG(G,Hw0]UHG(9u09fDwkAй]UHH?FDB HOHDDR]UHH]LeLmH L'DnDID$HHF u0tTtF C;Tu&DLt DL0fCH]LeLmw4GZ9vvUHH @wZUHH]LeHHADc4H]LeUHODuHIЉ HIA UHH]LeLmLuL}H0HADg(Low0ED9C0D;cProIL{HI)IAvHEIH{AIAD)CPIJHCHDHSHD4AM\HSHLAD$C(DH]LeLmLuL}UHSHG(;G,v}HOHLAȃ)t*u_<uS9u uDhC9u<މ*T AF9wH9wL9s0TfAP%u)*D \H[]UHATSHHDg0G(EHWHG0;G,|H€80uf@s4THEDHuHEH[A\]UHATSHIHdG8x}HWHzxHcTS\HH9ujHcDDS\IFL9Py;HCHt!P 9+HHt P 9rDs\AD$<H{ LTDC[At/9H 1H9t|9uA;v<HAT$vG‰fKA|$tA$7H AD$A$AD$ AD$[A\]Ë=vUHUHAUATSHIHGx^HHAIIL9A$9C C A:D$ IUDB\HIExHwKHRHTAUXHufHJL@ LLHLHI9=H[A\A]]UHSHHHuUBv8F9uVG@(tHUH3xuS@HC@PS@H[]UHFttH6G]UHH]LeLmLuH IHFuD.AA+uAAA4 ujDvEyD.AA7AAE >AvD.AA8AAE DD+AAE A63L! uFF "uF DL4C H]LeLmLuUHSHHH~tHH3xuSHuzDHHSxD,HSxD|HSxAN8L HSxMψL AD$DH]LeLmLuL}UHAWAVAUATSH(HHwHuHGHEHHG~ HUHP89s'HuHNxP8p(TP\HtP89rًC8C4HuV 9tHuv u0HHuF t8t{tfxuHH1PiHXcAu!H$uHH1=AHLtAHL3D LQC AE$^^J--*+%p/sI=ti===t@=Ek=tL=|U=* A^AVANAFA>A6A .A &A A A AAD9EHUHHUHK HMHEH HELMuA u2HLHuLAMe{ 1AHLKv? u6wHLL%HLHuLEsLCHuL#AMe{Au>HL7HuLAMeHuLF}  AT$Uw"{w K9K HL{u C9C HL{S9S }M9MD}vJM{vJf.1HfօxHxH97HuLEHLE#AL$MHuL}u HuLoE=w ADeHuLhECt"HL{u&}t HL=w mEU HL{ u AW89rAo4} uAO89MrAo4U uLC wHuLnSHuLkHEHHEHCHEHC|HuLS HuLHEHHEHCHEHCuUID$H<$uC9tHLMUID$H LE=HuLHuL HL3E ƃ$LC }vHL}AE{v H]Le IHUHUHuL ELLZAD$tFr _vAu ƋU UE ‰ULL: uUE ‰ULLP u{E EELLH uZA DeH]LeEtuLLuIHMHMLLEHuLU uHEx u AW89rAo4A|$ uAO8A9 $rAo4LLQC At'ED;EwA ELHL>MeCs sC Ls LHLCAADHuLAM}A\DALHLMeCA9C LHLbMeAADHh[A\A]A^A_]UH+]UHSH(HHu}uEHuH;EH([]UHH]LeHHILHLH;.]HH]LeUHAWAVAUATSHHHxL'OXTEl$4EAD2Lw\Hx@ D(@ @LADt{HlC$}u\HH`DžhADžlDžpAA3DX[u`HuH}vHUHxL,}u H}.u h Džp=HAv= t=u5H=u(HuH=HhA3EEEA*EADžpAHuHEPt}U9UMumhthth҃pAEI|$IǺHLIT$H XH` HuH}I|$HULAWtnIL$I!q(@tTq)@t@uUAWQAE4D) LC C CDcAU(IEHDtAEe4H]LeLmLuL}UHAWAVAUATSH8HIL/G$(u6DwXLHD()H@LH;5= t=uH2LHH; C$.u LH[u(LLHuHHULL뾃:HߐHuHLLJELLEu4AvE L}tHuLA=w/LsD7E AD LQLDAFE%AD LD6E ƋE LnAm4E4$AD$ LHW= t (t{uLLYLH+kH8[A\A]A^A_]UHH]LeLmLuH`HIFv % Aվ,LeHuHw}ubL3UAv4MtSLx u;u0;PupH@Huمt  փL^LD=vH;AUHuH=HLHuHAA9uA} u*HMHPHfreereg == fs->nactvarreg == fs->freereg(((e))->k == VKNUM)lj_obj.hdest != (~(BCPos)0)target < fs->pc((vg)->info & 0x02)bytecode instructionsupvalues((e)->k == VKNUM)(((o)->it) < 0xfffeffffu)e->k == VVOID || e->k == VJMPvar->k == VINDEXEDlocal variablesbl->nactvar == fs->nactvarfs->bl == ((void *)0)constants(o)->gch.gct == ~(~7u)delta >= 0 && delta < 256delta >= 0 && delta < 65536delta >= 0selffs->nactvar == nparamse->k == VNONRELOCe1->t == (~(BCPos)0)e1->f == (~(BCPos)0)(e2)->k <= VKTRUElj_gc.h((key)->k == VKSTR)variable namespairsnextfs.prev == ((void *)0)ls->fs == ((void *)0)pt->sizeuv == 0(((((((((e))->k == VKNUM)) ? (void) (0) : __assert_fail ("(((e))->k == VKNUM)", "lj_parse.c", 1720, __PRETTY_FUNCTION__)), (&(e)->u.nval)))->it) <= 0xfffeffffu)!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((BCOp)((*ip)&0xff)) == BC_JMP || ((BCOp)((*ip)&0xff)) == BC_UCLOe->k == VLOCAL || e->k == VUPVAL(uintptr_t)name >= VARNAME__MAX(&((GCobj *)(uintptr_t)((vg->name)).gcptr32)->str) != ((GCstr *)(uintptr_t)1)((e)->k == VKSTR) || e->k == VGLOBAL(((&e->u.nval)->it) == (~10u))(uintptr_t)name < VARNAME__MAX || lj_tab_getstr(fs->kt, name) != ((void *)0)name == ((GCstr *)(uintptr_t)1) || lj_tab_getstr(fs->kt, name) != ((void *)0)(((&ls->tokenval)->it) == (~4u))((((&n->key)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1)))ls->fs != ((void *)0) || ls->token == TK_eof!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((e1)->k == VKNUM) || e1->k == VNONRELOCe1->u.s.info == ((BCReg)((*(&(fs)->bcbase[(e2)->u.s.info].ins))>>24))-1op == OPR_NE || op == OPR_EQ || op == OPR_LT || op == OPR_GE || op == OPR_LE || op == OPR_GT((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause((BCReg)(((ilp->ins)>>8)&0xff)) == freg && ((BCOp)((ilp->ins)&0xff)) == (narr > 256 ? BC_TSETV : BC_TSETB)((((((&n->val)->it) == (~11u))) ? (void) (0) : __assert_fail ("(((&n->val)->it) == (~11u))", "lj_parse.c", 1824, __PRETTY_FUNCTION__)), (&(((GCobj *)(uintptr_t)((&n->val)->gcr).gcptr32))->tab)) == t(((GCobj *)(uintptr_t)(((ls)->vstack[(fs)->varmap[(((BCReg)((ins)>>16)))]]).name).gcptr32))->gch.gct == ~(~4u)(((GCobj *)(uintptr_t)(ls->vstack[fs->uvmap[((BCReg)((ins)>>16))]].name).gcptr32))->gch.gct == ~(~4u)ls->fs->framesize >= ls->fs->freereg && ls->fs->freereg >= ls->fs->nactvarsetgcVlj_parsefscope_beginjmp_patchinsparse_chunk copyTVexpr_simplelj_gc_barrierbackexpr_tableconst_strbcreg_freeexpr_numiszerolex_strexpr_kvalueexpr_toreg_nobranchnumberVnumbcemit_storeconst_numparse_paramsvar_newvar_lookup_uvbcemit_methodparse_argsbcemit_unopbcemit_binopbcemit_arithbcemit_compjmp_patchfscope_endgola_newgola_resolvegola_closepredict_nextfs_finishfs_fixup_retfs_fixup_kfs_fixup_lineGCC: (Debian 4.7.3-4) 4.7.3zRx %AC ` 8<bFC CF F FBA xAC   6AC Cn AC N ;AC v OAC J .AC i <4AC o \.AC i |KC K HjC Y 1SC Y GC H 0GC Y nAC i  <AC C `AC |PAC K (wAC Me  LAC I~ AC R  DAC  ,,AC g $LAC P t+TC N  )AC LX @AC (AC X  AC E  $pAC Gd  HAC C l0WC T $AC I  AC Ex 9AC t $AC T  ZAC EP $DAC T (l;AC X  NAC L} $AC Pt  \AC LK AC U $(AC P $PAC P  xAC C (AC X (AC X (AC X ( oAC M] L:AC Ep l)AC E UAC EK 6AC El $VAC PA AC P $AC G $<AC Tn  d=AC Cu (AC M $iAC PT (AC Pq ( AC M 4 AC K T 8AC En  t HAC Lw ( hAC PS $ YAC IK ( AC X ( 1AC M $D AC T l (AC E^ ( I AC P4  AAC Lp  EAC Lt  _AC Z  AC J .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @WSp &S,S12S@2(V+ T`_O\07beTbzXb@ u P m r | l %%b!2'6>]Ip;QO`.k(4z\.H 1 20 bn .6OZPg wLDd :,f +=)f@#.Q p9 E ^ 0m z  N 9}  Z  7;BNQ_\mx! */y 2on .::)DULeY6nVyv=   '  9uCI E) P>iE 6hd?12  K > X [6 k686H#`<r US=Y_=j' AMC(PEPA       %3>R_kv&i 0APDQ_cQlj_parse.cjmp_nextjmp_novaluejmp_patchtestregjmp_dropvalinvertcondvar_addgola_findlabelfs_buf_strfs_buf_uleb128endofblocklex_optfscope_begin__PRETTY_FUNCTION__.5175bcreg_free__PRETTY_FUNCTION__.4859expr_freeexpr_numiszero__PRETTY_FUNCTION__.4669expr_kvalue__PRETTY_FUNCTION__.5409fs_init__PRETTY_FUNCTION__.3380err_syntaxjmp_patchins__PRETTY_FUNCTION__.4814jmp_patchvaljmp_appendjmp_toherejmp_patch__PRETTY_FUNCTION__.4845gola_patchgola_close__PRETTY_FUNCTION__.5133bcreg_bumpbcreg_reserveerr_limitbcemit_INSbcemit_nilbcemit_jmpvar_lookup___PRETTY_FUNCTION__.5098synlevel_begingola_resolve__PRETTY_FUNCTION__.5143const_gcconst_str__PRETTY_FUNCTION__.4765expr_dischargeconst_num__PRETTY_FUNCTION__.4752expr_toreg_nobranch__PRETTY_FUNCTION__.3444__PRETTY_FUNCTION__.4896expr_toregexpr_tonextregassign_adjustexpr_toanyregexpr_tovalexpr_indexbcemit_branchbcemit_branch_tbcemit_store__PRETTY_FUNCTION__.4928var_new__PRETTY_FUNCTION__.5061gola_new__PRETTY_FUNCTION__.5118fscope_end__PRETTY_FUNCTION__.5181parse_breakerr_tokenlex_str__PRETTY_FUNCTION__.5053expr_strexpr_fieldlex_checkparse_labellex_matchfs_buf_resizefs_finish__PRETTY_FUNCTION__.5342__PRETTY_FUNCTION__.5230__PRETTY_FUNCTION__.5259__PRETTY_FUNCTION__.5373parse_body__PRETTY_FUNCTION__.5452parse_chunkexpr_binop__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5501expr_tableexpr_primary__PRETTY_FUNCTION__.5028priority__PRETTY_FUNCTION__.4988__PRETTY_FUNCTION__.5021__PRETTY_FUNCTION__.5002exprexpr_condexpr_bracket__PRETTY_FUNCTION__.3350__PRETTY_FUNCTION__.5435expr_listparse_args__PRETTY_FUNCTION__.5483__PRETTY_FUNCTION__.4940parse_assignmentexpr_nextparse_thenparse_block__PRETTY_FUNCTION__.5706__PRETTY_FUNCTION__.5788__PRETTY_FUNCTION__.5799lj_lex_next__assert_faillj_tab_newlj_state_growstack1lj_lex_errorlj_mem_growlj_tab_setlj_tab_getstrlj_lex_token2strlj_mem_realloclj_mem_newgcolj_gc_barrierfmemcpylj_vmevent_preparelj_vmevent_calllj_parse_keepstrlj_str_newlj_tab_setstrlj_gc_steplj_vm_foldarithlj_lex_lookaheadlj_tab_reasizelj_parse_keepcdatalj_parse| s   } s  &}= sG L 9Q} s  9} s  }L~ s M } s  V} sd " j'} s  z} s  } 8  s    } @ sJ O @T }p sy ~ ` }  s M  }* ` s}j o t } s  }B sL MQ V} s  }X sb g l}W sa Mf k}Y sc h m}d   s  } sy  H} sn  }i/ s9 > C}K||||S4B`I sS X 5]}!" K" K# s# # #}#$ s$ $ U$}$ % s% % l %}O% sY% ^% c%}% s% % %}%%)& s3& M8& =&}I&{& s& & &}&&&' '(|S( s]( b( g(}~)|* s>* M* (*}* sE* * *}+|,|, s2, , ,}, s2, , ,}p. s .|U0 s_0 Md0 i0}|0 s0 M0 0}0M1 sKW1 \1 Xa1}1 s>1 2  2}E2 s>O2 T2 Y2}2 s>2 2 2}63 s>@3 E3 J3}3 sX3 3 3}5 s B5|5 s!5|6|6|B89~h99 s`9 9 09}9 s`9 9 9}6: s@: ME: J:}I; srS; X; ];}<< sr< < @<}<=|u> s'> > >}>|> s'> > >}?|A@|@ s@ @ @}fB 3C sCD|D|OE|E|YH scH hH mH}H sH H xH}H BHHH HHI@I BlI HuJ|K|K|L| N|8NGN|O s O O #O}Q|tQ s~Q MQ Q}QQ R sR MR  R}@RR|R sR S M S}S sS #S d(S}3S s=S BS zGS}NKENN N(N0{E8K@4NHCPNXK`NhNpNxBJLNNNDNNNNNN!N @%|']p @(`\2 b@d0:Pfx=f(Q L p   N  $Hp ,!T|*/$2PpY@hv&' )8 [6X k6x 6 6 S= = d?H Ap MC uC P P DQ$ Qtarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/Makefile0000664000000000000000000005244512231715321022037 0ustar rootroot############################################################################## # LuaJIT Makefile. Requires GNU Make. # # Please read doc/install.html before changing any variables! # # Suitable for POSIX platforms (Linux, *BSD, OSX etc.). # Also works with MinGW and Cygwin on Windows. # Please check msvcbuild.bat for building with MSVC on Windows. # # Copyright (C) 2005-2012 Mike Pall. See Copyright Notice in luajit.h ############################################################################## MAJVER= 2 MINVER= 0 RELVER= 2 ABIVER= 5.1 NODOTABIVER= 51 ############################################################################## ############################# COMPILER OPTIONS ############################# ############################################################################## # These options mainly affect the speed of the JIT compiler itself, not the # speed of the JIT-compiled code. Turn any of the optional settings on by # removing the '#' in front of them. Make sure you force a full recompile # with "make clean", followed by "make" if you change any options. # # LuaJIT builds as a native 32 or 64 bit binary by default. CC= gcc # # Use this if you want to force a 32 bit build on a 64 bit multilib OS. #CC= gcc -m32 # # Since the assembler part does NOT maintain a frame pointer, it's pointless # to slow down the C part by not omitting it. Debugging, tracebacks and # unwinding are not affected -- the assembler part has frame unwind # information and GCC emits it where needed (x64) or with -g (see CCDEBUG). CCOPT= -O2 -fomit-frame-pointer # Use this if you want to generate a smaller binary (but it's slower): #CCOPT= -Os -fomit-frame-pointer # Note: it's no longer recommended to use -O3 with GCC 4.x. # The I-Cache bloat usually outweighs the benefits from aggressive inlining. # # Target-specific compiler options: # # x86 only: it's recommended to compile at least for i686. Better yet, # compile for an architecture that has SSE2, too (-msse -msse2). # # x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute # the binaries to a different machine you could also use: -march=native # CCOPT_x86= -march=i686 CCOPT_x64= CCOPT_arm= CCOPT_ppc= CCOPT_ppcspe= CCOPT_mips= # CCDEBUG= # Uncomment the next line to generate debug information: #CCDEBUG= -g # CCWARN= -Wall # Uncomment the next line to enable more warnings: #CCWARN+= -Wextra -Wdeclaration-after-statement -Wredundant-decls -Wshadow -Wpointer-arith # ############################################################################## ############################################################################## ################################ BUILD MODE ################################ ############################################################################## # The default build mode is mixed mode on POSIX. On Windows this is the same # as dynamic mode. # # Mixed mode creates a static + dynamic library and a statically linked luajit. BUILDMODE= mixed # # Static mode creates a static library and a statically linked luajit. #BUILDMODE= static # # Dynamic mode creates a dynamic library and a dynamically linked luajit. # Note: this executable will only run when the library is installed! #BUILDMODE= dynamic # ############################################################################## ############################################################################## ################################# FEATURES ################################# ############################################################################## # Enable/disable these features as needed, but make sure you force a full # recompile with "make clean", followed by "make". XCFLAGS= # # Permanently disable the FFI extension to reduce the size of the LuaJIT # executable. But please consider that the FFI library is compiled-in, # but NOT loaded by default. It only allocates any memory, if you actually # make use of it. #XCFLAGS+= -DLUAJIT_DISABLE_FFI # # Features from Lua 5.2 that are unlikely to break existing code are # enabled by default. Some other features that *might* break some existing # code (e.g. __pairs or os.execute() return values) can be enabled here. # Note: this does not provide full compatibility with Lua 5.2 at this time. #XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT # # Disable the JIT compiler, i.e. turn LuaJIT into a pure interpreter. #XCFLAGS+= -DLUAJIT_DISABLE_JIT # # Some architectures (e.g. PPC) can use either single-number (1) or # dual-number (2) mode. Uncomment one of these lines to override the # default mode. Please see LJ_ARCH_NUMMODE in lj_arch.h for details. #XCFLAGS+= -DLUAJIT_NUMMODE=1 #XCFLAGS+= -DLUAJIT_NUMMODE=2 # ############################################################################## ############################################################################## ############################ DEBUGGING SUPPORT ############################# ############################################################################## # Enable these options as needed, but make sure you force a full recompile # with "make clean", followed by "make". # Note that most of these are NOT suitable for benchmarking or release mode! # # Use the system provided memory allocator (realloc) instead of the # bundled memory allocator. This is slower, but sometimes helpful for # debugging. It's helpful for Valgrind's memcheck tool, too. This option # cannot be enabled on x64, since the built-in allocator is mandatory. #XCFLAGS+= -DLUAJIT_USE_SYSMALLOC # # This define is required to run LuaJIT under Valgrind. The Valgrind # header files must be installed. You should enable debug information, too. # Use --suppressions=lj.supp to avoid some false positives. #XCFLAGS+= -DLUAJIT_USE_VALGRIND # # This is the client for the GDB JIT API. GDB 7.0 or higher is required # to make use of it. See lj_gdbjit.c for details. Enabling this causes # a non-negligible overhead, even when not running under GDB. #XCFLAGS+= -DLUAJIT_USE_GDBJIT # # Turn on assertions for the Lua/C API to debug problems with lua_* calls. # This is rather slow -- use only while developing C libraries/embeddings. #XCFLAGS+= -DLUA_USE_APICHECK # # Turn on assertions for the whole LuaJIT VM. This significantly slows down # everything. Use only if you suspect a problem with LuaJIT itself. #XCFLAGS+= -DLUA_USE_ASSERT # ############################################################################## # You probably don't need to change anything below this line! ############################################################################## ############################################################################## # Flags and options for host and target. ############################################################################## # You can override the following variables at the make command line: # CC HOST_CC STATIC_CC DYNAMIC_CC # CFLAGS HOST_CFLAGS TARGET_CFLAGS # LDFLAGS HOST_LDFLAGS TARGET_LDFLAGS TARGET_SHLDFLAGS # LIBS HOST_LIBS TARGET_LIBS # CROSS HOST_SYS TARGET_SYS TARGET_FLAGS # # Cross-compilation examples: # make HOST_CC="gcc -m32" CROSS=i586-mingw32msvc- TARGET_SYS=Windows # make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- CCOPTIONS= $(CCDEBUG) $(CCOPT) $(CCWARN) $(XCFLAGS) $(CFLAGS) LDOPTIONS= $(CCDEBUG) $(LDFLAGS) HOST_CC= $(CC) HOST_RM= rm -f # If left blank, minilua is built and used. You can supply an installed # copy of (plain) Lua 5.1 or 5.2, plus Lua BitOp. E.g. with: HOST_LUA=lua HOST_LUA= HOST_XCFLAGS= -I. HOST_XLDFLAGS= HOST_XLIBS= HOST_ACFLAGS= $(CCOPTIONS) $(HOST_XCFLAGS) $(TARGET_ARCH) $(HOST_CFLAGS) HOST_ALDFLAGS= $(LDOPTIONS) $(HOST_XLDFLAGS) $(HOST_LDFLAGS) HOST_ALIBS= $(HOST_XLIBS) $(LIBS) $(HOST_LIBS) STATIC_CC = $(CROSS)$(CC) DYNAMIC_CC = $(CROSS)$(CC) -fPIC TARGET_CC= $(STATIC_CC) TARGET_STCC= $(STATIC_CC) TARGET_DYNCC= $(DYNAMIC_CC) TARGET_LD= $(CROSS)$(CC) TARGET_AR= $(CROSS)ar rcus TARGET_STRIP= $(CROSS)strip TARGET_LIBPATH= $(or $(PREFIX),/usr/local)/$(or $(MULTILIB),lib) TARGET_SONAME= libluajit-$(ABIVER).so.$(MAJVER) TARGET_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).dylib TARGET_DYLIBPATH= $(TARGET_LIBPATH)/$(TARGET_DYLIBNAME) TARGET_DLLNAME= lua$(NODOTABIVER).dll TARGET_XSHLDFLAGS= -shared -fPIC -Wl,-soname,$(TARGET_SONAME) TARGET_DYNXLDOPTS= TARGET_LFSFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE TARGET_XCFLAGS= $(TARGET_LFSFLAGS) -U_FORTIFY_SOURCE TARGET_XLDFLAGS= TARGET_XLIBS= -lm TARGET_TCFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS) TARGET_ACFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS) TARGET_ALDFLAGS= $(LDOPTIONS) $(TARGET_XLDFLAGS) $(TARGET_FLAGS) $(TARGET_LDFLAGS) TARGET_ASHLDFLAGS= $(LDOPTIONS) $(TARGET_XSHLDFLAGS) $(TARGET_FLAGS) $(TARGET_SHLDFLAGS) TARGET_ALIBS= $(TARGET_XLIBS) $(LIBS) $(TARGET_LIBS) TARGET_TESTARCH=$(shell $(TARGET_CC) $(TARGET_TCFLAGS) -E lj_arch.h -dM) ifneq (,$(findstring LJ_TARGET_X64 ,$(TARGET_TESTARCH))) TARGET_LJARCH= x64 else ifneq (,$(findstring LJ_TARGET_X86 ,$(TARGET_TESTARCH))) TARGET_LJARCH= x86 else ifneq (,$(findstring LJ_TARGET_ARM ,$(TARGET_TESTARCH))) TARGET_LJARCH= arm else ifneq (,$(findstring LJ_TARGET_PPC ,$(TARGET_TESTARCH))) TARGET_LJARCH= ppc else ifneq (,$(findstring LJ_TARGET_PPCSPE ,$(TARGET_TESTARCH))) TARGET_LJARCH= ppcspe else ifneq (,$(findstring LJ_TARGET_MIPS ,$(TARGET_TESTARCH))) ifneq (,$(findstring MIPSEL ,$(TARGET_TESTARCH))) TARGET_ARCH= -D__MIPSEL__=1 endif TARGET_LJARCH= mips else $(error Unsupported target architecture) endif endif endif endif endif endif ifneq (,$(findstring LJ_TARGET_PS3 1,$(TARGET_TESTARCH))) TARGET_SYS= PS3 TARGET_ARCH+= -D__CELLOS_LV2__ TARGET_XCFLAGS+= -DLUAJIT_USE_SYSMALLOC endif ifneq (,$(findstring LJ_NO_UNWIND 1,$(TARGET_TESTARCH))) TARGET_ARCH+= -DLUAJIT_NO_UNWIND endif TARGET_XCFLAGS+= $(CCOPT_$(TARGET_LJARCH)) TARGET_ARCH+= $(patsubst %,-DLUAJIT_TARGET=LUAJIT_ARCH_%,$(TARGET_LJARCH)) ifneq (,$(PREFIX)) ifneq (/usr/local,$(PREFIX)) TARGET_XCFLAGS+= -DLUA_ROOT=\"$(PREFIX)\" ifneq (/usr,$(PREFIX)) TARGET_DYNXLDOPTS= -Wl,-rpath,$(TARGET_LIBPATH) endif endif endif ifneq (,$(MULTILIB)) TARGET_XCFLAGS+= -DLUA_MULTILIB=\"$(MULTILIB)\" endif ifneq (,$(LMULTILIB)) TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\" endif ############################################################################## # System detection. ############################################################################## ifeq (Windows,$(findstring Windows,$(OS))$(MSYSTEM)$(TERM)) HOST_SYS= Windows HOST_RM= del else HOST_SYS:= $(shell uname -s) ifneq (,$(findstring MINGW,$(HOST_SYS))) HOST_SYS= Windows HOST_MSYS= mingw endif ifneq (,$(findstring CYGWIN,$(HOST_SYS))) HOST_SYS= Windows HOST_MSYS= cygwin endif endif TARGET_SYS?= $(HOST_SYS) ifeq (Windows,$(TARGET_SYS)) TARGET_STRIP+= --strip-unneeded TARGET_XSHLDFLAGS= -shared TARGET_DYNXLDOPTS= else ifeq (Darwin,$(TARGET_SYS)) ifeq (,$(MACOSX_DEPLOYMENT_TARGET)) export MACOSX_DEPLOYMENT_TARGET=10.4 endif TARGET_STRIP+= -x TARGET_AR+= 2>/dev/null TARGET_XCFLAGS+= -fno-stack-protector TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC TARGET_DYNXLDOPTS= TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER) ifeq (x64,$(TARGET_LJARCH)) TARGET_XLDFLAGS+= -pagezero_size 10000 -image_base 100000000 TARGET_XSHLDFLAGS+= -image_base 7fff04c4a000 endif else ifeq (iOS,$(TARGET_SYS)) TARGET_STRIP+= -x TARGET_AR+= 2>/dev/null TARGET_XCFLAGS+= -fno-stack-protector TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC TARGET_DYNXLDOPTS= TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER) else ifneq (,$(findstring stack-protector,$(shell $(TARGET_CC) -dumpspecs))) TARGET_XCFLAGS+= -fno-stack-protector endif ifneq (SunOS,$(TARGET_SYS)) ifneq (PS3,$(TARGET_SYS)) TARGET_XLDFLAGS+= -Wl,-E endif endif ifeq (Linux,$(TARGET_SYS)) TARGET_XLIBS+= -ldl endif ifeq (GNU/kFreeBSD,$(TARGET_SYS)) TARGET_XLIBS+= -ldl endif endif endif endif ifneq ($(HOST_SYS),$(TARGET_SYS)) ifeq (Windows,$(TARGET_SYS)) HOST_XCFLAGS+= -malign-double -DLUAJIT_OS=LUAJIT_OS_WINDOWS else ifeq (Linux,$(TARGET_SYS)) HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_LINUX else ifeq (Darwin,$(TARGET_SYS)) HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX else ifeq (iOS,$(TARGET_SYS)) HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX else HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OTHER endif endif endif endif endif ifneq (,$(CCDEBUG)) TARGET_STRIP= @: endif ############################################################################## # Files and pathnames. ############################################################################## MINILUA_O= host/minilua.o MINILUA_LIBS= -lm MINILUA_T= host/minilua MINILUA_X= $(MINILUA_T) ifeq (,$(HOST_LUA)) HOST_LUA= $(MINILUA_X) DASM_DEP= $(MINILUA_T) endif DASM_DIR= ../dynasm DASM= $(HOST_LUA) $(DASM_DIR)/dynasm.lua DASM_XFLAGS= DASM_AFLAGS= DASM_ARCH= $(TARGET_LJARCH) ifneq (,$(findstring LJ_ARCH_BITS 64,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D P64 endif ifneq (,$(findstring LJ_HASJIT 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D JIT endif ifneq (,$(findstring LJ_HASFFI 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D FFI endif ifneq (,$(findstring LJ_DUALNUM 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D DUALNUM endif ifneq (,$(findstring LJ_ARCH_HASFPU 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D FPU TARGET_ARCH+= -DLJ_ARCH_HASFPU=1 else TARGET_ARCH+= -DLJ_ARCH_HASFPU=0 endif ifeq (,$(findstring LJ_ABI_SOFTFP 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D HFABI TARGET_ARCH+= -DLJ_ABI_SOFTFP=0 else TARGET_ARCH+= -DLJ_ABI_SOFTFP=1 endif DASM_AFLAGS+= -D VER=$(subst LJ_ARCH_VERSION_,,$(filter LJ_ARCH_VERSION_%,$(subst LJ_ARCH_VERSION ,LJ_ARCH_VERSION_,$(TARGET_TESTARCH)))) ifeq (Windows,$(TARGET_SYS)) DASM_AFLAGS+= -D WIN endif ifeq (x86,$(TARGET_LJARCH)) ifneq (,$(findstring __SSE2__ 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D SSE endif else ifeq (x64,$(TARGET_LJARCH)) DASM_ARCH= x86 else ifeq (arm,$(TARGET_LJARCH)) ifeq (iOS,$(TARGET_SYS)) DASM_AFLAGS+= -D IOS endif else ifeq (ppc,$(TARGET_LJARCH)) ifneq (,$(findstring LJ_ARCH_SQRT 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D SQRT endif ifneq (,$(findstring LJ_ARCH_ROUND 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D ROUND endif ifneq (,$(findstring LJ_ARCH_PPC64 1,$(TARGET_TESTARCH))) DASM_AFLAGS+= -D GPR64 endif ifeq (PS3,$(TARGET_SYS)) DASM_AFLAGS+= -D PPE -D TOC endif endif endif endif endif DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS) DASM_DASC= vm_$(DASM_ARCH).dasc BUILDVM_O= host/buildvm.o host/buildvm_asm.o host/buildvm_peobj.o \ host/buildvm_lib.o host/buildvm_fold.o BUILDVM_T= host/buildvm BUILDVM_X= $(BUILDVM_T) HOST_O= $(MINILUA_O) $(BUILDVM_O) HOST_T= $(MINILUA_T) $(BUILDVM_T) LJVM_S= lj_vm.s LJVM_O= lj_vm.o LJVM_BOUT= $(LJVM_S) LJVM_MODE= elfasm LJLIB_O= lib_base.o lib_math.o lib_bit.o lib_string.o lib_table.o \ lib_io.o lib_os.o lib_package.o lib_debug.o lib_jit.o lib_ffi.o LJLIB_C= $(LJLIB_O:.o=.c) LJCORE_O= lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o \ lj_str.o lj_tab.o lj_func.o lj_udata.o lj_meta.o lj_debug.o \ lj_state.o lj_dispatch.o lj_vmevent.o lj_vmmath.o lj_strscan.o \ lj_api.o lj_lex.o lj_parse.o lj_bcread.o lj_bcwrite.o lj_load.o \ lj_ir.o lj_opt_mem.o lj_opt_fold.o lj_opt_narrow.o \ lj_opt_dce.o lj_opt_loop.o lj_opt_split.o lj_opt_sink.o \ lj_mcode.o lj_snap.o lj_record.o lj_crecord.o lj_ffrecord.o \ lj_asm.o lj_trace.o lj_gdbjit.o \ lj_ctype.o lj_cdata.o lj_cconv.o lj_ccall.o lj_ccallback.o \ lj_carith.o lj_clib.o lj_cparse.o \ lj_lib.o lj_alloc.o lib_aux.o \ $(LJLIB_O) lib_init.o LJVMCORE_O= $(LJVM_O) $(LJCORE_O) LJVMCORE_DYNO= $(LJVMCORE_O:.o=_dyn.o) LIB_VMDEF= jit/vmdef.lua LIB_VMDEFP= $(LIB_VMDEF) LUAJIT_O= luajit.o LUAJIT_A= libluajit.a LUAJIT_SO= libluajit.so LUAJIT_T= luajit ALL_T= $(LUAJIT_T) $(LUAJIT_A) $(LUAJIT_SO) $(HOST_T) ALL_HDRGEN= lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h \ host/buildvm_arch.h ALL_GEN= $(LJVM_S) $(ALL_HDRGEN) $(LIB_VMDEFP) WIN_RM= *.obj *.lib *.exp *.dll *.exe *.manifest *.pdb *.ilk ALL_RM= $(ALL_T) $(ALL_GEN) *.o host/*.o $(WIN_RM) ############################################################################## # Build mode handling. ############################################################################## # Mixed mode defaults. TARGET_O= $(LUAJIT_A) TARGET_T= $(LUAJIT_T) $(LUAJIT_SO) TARGET_DEP= $(LIB_VMDEF) $(LUAJIT_SO) ifeq (Windows,$(TARGET_SYS)) TARGET_DYNCC= $(STATIC_CC) LJVM_MODE= peobj LJVM_BOUT= $(LJVM_O) LUAJIT_T= luajit.exe ifeq (cygwin,$(HOST_MSYS)) LUAJIT_SO= cyg$(TARGET_DLLNAME) else LUAJIT_SO= $(TARGET_DLLNAME) endif # Mixed mode is not supported on Windows. And static mode doesn't work well. # C modules cannot be loaded, because they bind to lua51.dll. ifneq (static,$(BUILDMODE)) BUILDMODE= dynamic TARGET_XCFLAGS+= -DLUA_BUILD_AS_DLL endif endif ifeq (Darwin,$(TARGET_SYS)) LJVM_MODE= machasm endif ifeq (iOS,$(TARGET_SYS)) LJVM_MODE= machasm endif ifeq (SunOS,$(TARGET_SYS)) BUILDMODE= static endif ifeq (PS3,$(TARGET_SYS)) BUILDMODE= static endif ifeq (Windows,$(HOST_SYS)) MINILUA_T= host/minilua.exe BUILDVM_T= host/buildvm.exe ifeq (,$(HOST_MSYS)) MINILUA_X= host\minilua BUILDVM_X= host\buildvm ALL_RM:= $(subst /,\,$(ALL_RM)) endif endif ifeq (static,$(BUILDMODE)) TARGET_DYNCC= @: TARGET_T= $(LUAJIT_T) TARGET_DEP= $(LIB_VMDEF) else ifeq (dynamic,$(BUILDMODE)) ifneq (Windows,$(TARGET_SYS)) TARGET_CC= $(DYNAMIC_CC) endif TARGET_DYNCC= @: LJVMCORE_DYNO= $(LJVMCORE_O) TARGET_O= $(LUAJIT_SO) TARGET_XLDFLAGS+= $(TARGET_DYNXLDOPTS) else ifeq (Darwin,$(TARGET_SYS)) TARGET_DYNCC= @: LJVMCORE_DYNO= $(LJVMCORE_O) endif ifeq (iOS,$(TARGET_SYS)) TARGET_DYNCC= @: LJVMCORE_DYNO= $(LJVMCORE_O) endif endif endif Q= @ E= @echo #Q= #E= @: ############################################################################## # Make targets. ############################################################################## default all: $(TARGET_T) amalg: @grep "^[+|]" ljamalg.c $(MAKE) all "LJCORE_O=ljamalg.o" clean: $(HOST_RM) $(ALL_RM) depend: @for file in $(ALL_HDRGEN); do \ test -f $$file || touch $$file; \ done @$(HOST_CC) $(HOST_ACFLAGS) -MM *.c host/*.c | \ sed -e "s| [^ ]*/dasm_\S*\.h||g" \ -e "s|^\([^l ]\)|host/\1|" \ -e "s| lj_target_\S*\.h| lj_target_*.h|g" \ -e "s| lj_emit_\S*\.h| lj_emit_*.h|g" \ -e "s| lj_asm_\S*\.h| lj_asm_*.h|g" >Makefile.dep @for file in $(ALL_HDRGEN); do \ test -s $$file || $(HOST_RM) $$file; \ done .PHONY: default all amalg clean depend ############################################################################## # Rules for generated files. ############################################################################## $(MINILUA_T): $(MINILUA_O) $(E) "HOSTLINK $@" $(Q)$(HOST_CC) $(HOST_ALDFLAGS) -o $@ $(MINILUA_O) $(MINILUA_LIBS) $(HOST_ALIBS) host/buildvm_arch.h: $(DASM_DASC) $(DASM_DEP) $(E) "DYNASM $@" $(Q)$(DASM) $(DASM_FLAGS) -o $@ $(DASM_DASC) host/buildvm.o: $(DASM_DIR)/dasm_*.h $(BUILDVM_T): $(BUILDVM_O) $(E) "HOSTLINK $@" $(Q)$(HOST_CC) $(HOST_ALDFLAGS) -o $@ $(BUILDVM_O) $(HOST_ALIBS) $(LJVM_BOUT): $(BUILDVM_T) $(E) "BUILDVM $@" $(Q)$(BUILDVM_X) -m $(LJVM_MODE) -o $@ lj_bcdef.h: $(BUILDVM_T) $(LJLIB_C) $(E) "BUILDVM $@" $(Q)$(BUILDVM_X) -m bcdef -o $@ $(LJLIB_C) lj_ffdef.h: $(BUILDVM_T) $(LJLIB_C) $(E) "BUILDVM $@" $(Q)$(BUILDVM_X) -m ffdef -o $@ $(LJLIB_C) lj_libdef.h: $(BUILDVM_T) $(LJLIB_C) $(E) "BUILDVM $@" $(Q)$(BUILDVM_X) -m libdef -o $@ $(LJLIB_C) lj_recdef.h: $(BUILDVM_T) $(LJLIB_C) $(E) "BUILDVM $@" $(Q)$(BUILDVM_X) -m recdef -o $@ $(LJLIB_C) $(LIB_VMDEF): $(BUILDVM_T) $(LJLIB_C) $(E) "BUILDVM $@" $(Q)$(BUILDVM_X) -m vmdef -o $(LIB_VMDEFP) $(LJLIB_C) lj_folddef.h: $(BUILDVM_T) lj_opt_fold.c $(E) "BUILDVM $@" $(Q)$(BUILDVM_X) -m folddef -o $@ lj_opt_fold.c ############################################################################## # Object file rules. ############################################################################## %.o: %.c $(E) "CC $@" $(Q)$(TARGET_DYNCC) $(TARGET_ACFLAGS) -c -o $(@:.o=_dyn.o) $< $(Q)$(TARGET_CC) $(TARGET_ACFLAGS) -c -o $@ $< %.o: %.s $(E) "ASM $@" $(Q)$(TARGET_DYNCC) $(TARGET_ACFLAGS) -c -o $(@:.o=_dyn.o) $< $(Q)$(TARGET_CC) $(TARGET_ACFLAGS) -c -o $@ $< $(LUAJIT_O): $(E) "CC $@" $(Q)$(TARGET_STCC) $(TARGET_ACFLAGS) -c -o $@ $< $(HOST_O): %.o: %.c $(E) "HOSTCC $@" $(Q)$(HOST_CC) $(HOST_ACFLAGS) -c -o $@ $< include Makefile.dep ############################################################################## # Target file rules. ############################################################################## $(LUAJIT_A): $(LJVMCORE_O) $(E) "AR $@" $(Q)$(TARGET_AR) $@ $(LJVMCORE_O) # The dependency on _O, but linking with _DYNO is intentional. $(LUAJIT_SO): $(LJVMCORE_O) $(E) "DYNLINK $@" $(Q)$(TARGET_LD) $(TARGET_ASHLDFLAGS) -o $@ $(LJVMCORE_DYNO) $(TARGET_ALIBS) $(Q)$(TARGET_STRIP) $@ $(LUAJIT_T): $(TARGET_O) $(LUAJIT_O) $(TARGET_DEP) $(E) "LINK $@" $(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) $(TARGET_O) $(TARGET_ALIBS) $(Q)$(TARGET_STRIP) $@ $(E) "OK Successfully built LuaJIT" ############################################################################## tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_frame.h0000664000000000000000000001326312202141143022313 0ustar rootroot/* ** Stack frames. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_FRAME_H #define _LJ_FRAME_H #include "lj_obj.h" #include "lj_bc.h" /* -- Lua stack frame ----------------------------------------------------- */ /* Frame type markers in callee function slot (callee base-1). */ enum { FRAME_LUA, FRAME_C, FRAME_CONT, FRAME_VARG, FRAME_LUAP, FRAME_CP, FRAME_PCALL, FRAME_PCALLH }; #define FRAME_TYPE 3 #define FRAME_P 4 #define FRAME_TYPEP (FRAME_TYPE|FRAME_P) /* Macros to access and modify Lua frames. */ #define frame_gc(f) (gcref((f)->fr.func)) #define frame_func(f) (&frame_gc(f)->fn) #define frame_ftsz(f) ((f)->fr.tp.ftsz) #define frame_type(f) (frame_ftsz(f) & FRAME_TYPE) #define frame_typep(f) (frame_ftsz(f) & FRAME_TYPEP) #define frame_islua(f) (frame_type(f) == FRAME_LUA) #define frame_isc(f) (frame_type(f) == FRAME_C) #define frame_iscont(f) (frame_typep(f) == FRAME_CONT) #define frame_isvarg(f) (frame_typep(f) == FRAME_VARG) #define frame_ispcall(f) ((frame_ftsz(f) & 6) == FRAME_PCALL) #define frame_pc(f) (mref((f)->fr.tp.pcr, const BCIns)) #define frame_contpc(f) (frame_pc((f)-1)) #if LJ_64 #define frame_contf(f) \ ((ASMFunction)(void *)((intptr_t)lj_vm_asm_begin + \ (intptr_t)(int32_t)((f)-1)->u32.lo)) #else #define frame_contf(f) ((ASMFunction)gcrefp(((f)-1)->gcr, void)) #endif #define frame_delta(f) (frame_ftsz(f) >> 3) #define frame_sized(f) (frame_ftsz(f) & ~FRAME_TYPEP) #define frame_prevl(f) ((f) - (1+bc_a(frame_pc(f)[-1]))) #define frame_prevd(f) ((TValue *)((char *)(f) - frame_sized(f))) #define frame_prev(f) (frame_islua(f)?frame_prevl(f):frame_prevd(f)) /* Note: this macro does not skip over FRAME_VARG. */ #define setframe_pc(f, pc) (setmref((f)->fr.tp.pcr, (pc))) #define setframe_ftsz(f, sz) ((f)->fr.tp.ftsz = (sz)) #define setframe_gc(f, p) (setgcref((f)->fr.func, (p))) /* -- C stack frame ------------------------------------------------------- */ /* Macros to access and modify the C stack frame chain. */ /* These definitions must match with the arch-specific *.dasc files. */ #if LJ_TARGET_X86 #define CFRAME_OFS_ERRF (15*4) #define CFRAME_OFS_NRES (14*4) #define CFRAME_OFS_PREV (13*4) #define CFRAME_OFS_L (12*4) #define CFRAME_OFS_PC (6*4) #define CFRAME_OFS_MULTRES (5*4) #define CFRAME_SIZE (12*4) #define CFRAME_SHIFT_MULTRES 0 #elif LJ_TARGET_X64 #if LJ_ABI_WIN #define CFRAME_OFS_PREV (13*8) #define CFRAME_OFS_PC (25*4) #define CFRAME_OFS_L (24*4) #define CFRAME_OFS_ERRF (23*4) #define CFRAME_OFS_NRES (22*4) #define CFRAME_OFS_MULTRES (21*4) #define CFRAME_SIZE (10*8) #define CFRAME_SIZE_JIT (CFRAME_SIZE + 9*16 + 4*8) #define CFRAME_SHIFT_MULTRES 0 #else #define CFRAME_OFS_PREV (4*8) #define CFRAME_OFS_PC (7*4) #define CFRAME_OFS_L (6*4) #define CFRAME_OFS_ERRF (5*4) #define CFRAME_OFS_NRES (4*4) #define CFRAME_OFS_MULTRES (1*4) #define CFRAME_SIZE (10*8) #define CFRAME_SIZE_JIT (CFRAME_SIZE + 16) #define CFRAME_SHIFT_MULTRES 0 #endif #elif LJ_TARGET_ARM #define CFRAME_OFS_ERRF 24 #define CFRAME_OFS_NRES 20 #define CFRAME_OFS_PREV 16 #define CFRAME_OFS_L 12 #define CFRAME_OFS_PC 8 #define CFRAME_OFS_MULTRES 4 #if LJ_ARCH_HASFPU #define CFRAME_SIZE 128 #else #define CFRAME_SIZE 64 #endif #define CFRAME_SHIFT_MULTRES 3 #elif LJ_TARGET_PPC #if LJ_TARGET_XBOX360 #define CFRAME_OFS_ERRF 424 #define CFRAME_OFS_NRES 420 #define CFRAME_OFS_PREV 400 #define CFRAME_OFS_L 416 #define CFRAME_OFS_PC 412 #define CFRAME_OFS_MULTRES 408 #define CFRAME_SIZE 384 #define CFRAME_SHIFT_MULTRES 3 #elif LJ_ARCH_PPC64 #define CFRAME_OFS_ERRF 472 #define CFRAME_OFS_NRES 468 #define CFRAME_OFS_PREV 448 #define CFRAME_OFS_L 464 #define CFRAME_OFS_PC 460 #define CFRAME_OFS_MULTRES 456 #define CFRAME_SIZE 400 #define CFRAME_SHIFT_MULTRES 3 #else #define CFRAME_OFS_ERRF 48 #define CFRAME_OFS_NRES 44 #define CFRAME_OFS_PREV 40 #define CFRAME_OFS_L 36 #define CFRAME_OFS_PC 32 #define CFRAME_OFS_MULTRES 28 #define CFRAME_SIZE 272 #define CFRAME_SHIFT_MULTRES 3 #endif #elif LJ_TARGET_PPCSPE #define CFRAME_OFS_ERRF 28 #define CFRAME_OFS_NRES 24 #define CFRAME_OFS_PREV 20 #define CFRAME_OFS_L 16 #define CFRAME_OFS_PC 12 #define CFRAME_OFS_MULTRES 8 #define CFRAME_SIZE 184 #define CFRAME_SHIFT_MULTRES 3 #elif LJ_TARGET_MIPS #define CFRAME_OFS_ERRF 124 #define CFRAME_OFS_NRES 120 #define CFRAME_OFS_PREV 116 #define CFRAME_OFS_L 112 #define CFRAME_OFS_PC 20 #define CFRAME_OFS_MULTRES 16 #define CFRAME_SIZE 112 #define CFRAME_SHIFT_MULTRES 3 #else #error "Missing CFRAME_* definitions for this architecture" #endif #ifndef CFRAME_SIZE_JIT #define CFRAME_SIZE_JIT CFRAME_SIZE #endif #define CFRAME_RESUME 1 #define CFRAME_UNWIND_FF 2 /* Only used in unwinder. */ #define CFRAME_RAWMASK (~(intptr_t)(CFRAME_RESUME|CFRAME_UNWIND_FF)) #define cframe_errfunc(cf) (*(int32_t *)(((char *)(cf))+CFRAME_OFS_ERRF)) #define cframe_nres(cf) (*(int32_t *)(((char *)(cf))+CFRAME_OFS_NRES)) #define cframe_prev(cf) (*(void **)(((char *)(cf))+CFRAME_OFS_PREV)) #define cframe_multres(cf) (*(uint32_t *)(((char *)(cf))+CFRAME_OFS_MULTRES)) #define cframe_multres_n(cf) (cframe_multres((cf)) >> CFRAME_SHIFT_MULTRES) #define cframe_L(cf) \ (&gcref(*(GCRef *)(((char *)(cf))+CFRAME_OFS_L))->th) #define cframe_pc(cf) \ (mref(*(MRef *)(((char *)(cf))+CFRAME_OFS_PC), const BCIns)) #define setcframe_L(cf, L) \ (setmref(*(MRef *)(((char *)(cf))+CFRAME_OFS_L), (L))) #define setcframe_pc(cf, pc) \ (setmref(*(MRef *)(((char *)(cf))+CFRAME_OFS_PC), (pc))) #define cframe_canyield(cf) ((intptr_t)(cf) & CFRAME_RESUME) #define cframe_unwind_ff(cf) ((intptr_t)(cf) & CFRAME_UNWIND_FF) #define cframe_raw(cf) ((void *)((intptr_t)(cf) & CFRAME_RAWMASK)) #define cframe_Lpc(L) cframe_pc(cframe_raw(L->cframe)) #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ccallback.h0000664000000000000000000000116712202141143023120 0ustar rootroot/* ** FFI C callback handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CCALLBACK_H #define _LJ_CCALLBACK_H #include "lj_obj.h" #include "lj_ctype.h" #if LJ_HASFFI /* Really belongs to lj_vm.h. */ LJ_ASMF void lj_vm_ffi_callback(void); LJ_FUNC MSize lj_ccallback_ptr2slot(CTState *cts, void *p); LJ_FUNCA lua_State * LJ_FASTCALL lj_ccallback_enter(CTState *cts, void *cf); LJ_FUNCA void LJ_FASTCALL lj_ccallback_leave(CTState *cts, TValue *o); LJ_FUNC void *lj_ccallback_new(CTState *cts, CType *ct, GCfunc *fn); LJ_FUNC void lj_ccallback_mcode_free(CTState *cts); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_mcode.h0000664000000000000000000000126312202141143022305 0ustar rootroot/* ** Machine code management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_MCODE_H #define _LJ_MCODE_H #include "lj_obj.h" #if LJ_HASJIT || LJ_HASFFI LJ_FUNC void lj_mcode_sync(void *start, void *end); #endif #if LJ_HASJIT #include "lj_jit.h" LJ_FUNC void lj_mcode_free(jit_State *J); LJ_FUNC MCode *lj_mcode_reserve(jit_State *J, MCode **lim); LJ_FUNC void lj_mcode_commit(jit_State *J, MCode *m); LJ_FUNC void lj_mcode_abort(jit_State *J); LJ_FUNC MCode *lj_mcode_patch(jit_State *J, MCode *ptr, int finish); LJ_FUNC_NORET void lj_mcode_limiterr(jit_State *J, size_t need); #define lj_mcode_commitbot(J, m) (J->mcbot = (m)) #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_os.o0000664000000000000000000002202012213333065022011 0ustar rootrootELF> @@UHATSHL`HLDHLHH[A\]UHSHHfWEHH,uH,HH[]UHH]LeLmH HIAHHtHAEyL-H߸HDH]LeLmUHATSH@HHHHEH E HEHEHEH-lEĺHHAtDHAľHDeH}Hu H H*HH@[A\]UHH]LeHHIHcLHH]LeUHAVAUATSH@!IHþL LH,HE؀;!uHHuH}IHuH}IMuID$@;*{t{ LALAVLAVLAV LAVLAVlLAVLwAVLcAv LLƅ%ƅHLLI %uCu1L9r HHHHI;LcLHHHHHI\$AT$tHH@![A\A]A^]UHH]LeHHLgH*YA$ILcH]LeUHATSHHGH;Gs@Pw AEHAHSHBH9Cvz wHDUHSHHHHHH[]UHSHHH/tmp/luaHEH_XXXXXXHEH}u HHuHH[]UHATSHIĺHHL@@LH[A\]UHH]LeHHIH@@LHH]LeUHSHHHHSHJHK*H[]UH]ctypenumerictimecollatemonetaryallsecminhourdaymonthyearisdst%cwdayydayosx> executeremoverenametmpnamegetenvexitclockdatetimedifftime setlocaleư>GCC: (Debian 4.7.3-4) 4.7.3zRx  ZAC CR  @PAC EF $dAC Pp  LAC G@  8AC Lg $sAC N`  FAC Lu  eAC C@:AC Ep  `bAC EX  SAC CK  LAC L{ HAC E~ AC Z .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.8.rodata.str1.1.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @s&,12+@22T  O!\i0r "P     ZZP/8/LF{8Os]&Fllez: bmSL H`XQ     %4EN]jw /?M]fvTlib_os.clj_cf_os_setlocalelj_cf_os_difftimegetfieldlj_cf_os_timesetfieldlj_cf_os_datelj_cf_os_clocklj_cf_os_exitlj_cf_os_getenvlj_cf_os_tmpnamelj_cf_os_renamelj_cf_os_removelj_cf_os_executelj_lib_cf_oslj_lib_init_os.LC12lj_lib_optstrlj_lib_checkoptsetlocalelua_pushstringluaL_optnumberluaL_checknumberdifftimelua_pushnumberlua_getfieldlua_isnumberlua_tointegerlj_err_callervlua_settoplua_typetimeluaL_checktypelua_tobooleanmktimelua_pushnillua_pushintegerlua_setfieldluaL_optlstringgmtime_rlocaltime_rlua_createtablelua_pushbooleanluaL_buffinitluaL_prepbufferstrftimeluaL_addlstringluaL_pushresultclocklj_lib_optintlua_closeexitluaL_checklstringgetenvmkstemp64lj_err_callercloserenameluaL_fileresultremovesystemluaopen_oslj_lib_register% 7ALp !"#$%& '(C)Q*h+u(        $)/,?(L-Z.i#/0 "1)*!$263~4       %  *(5- :0\6789 :>;K<=>?@8AJBQC]??DE?FE(10GY `^ c /hI` hpmx l&/Z DZh/{&$lDd m Ttarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_table.c0000664000000000000000000001674712202141143022456 0ustar rootroot/* ** Table library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lib_table_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_tab.h" #include "lj_lib.h" /* ------------------------------------------------------------------------ */ #define LJLIB_MODULE_table LJLIB_CF(table_foreachi) { GCtab *t = lj_lib_checktab(L, 1); GCfunc *func = lj_lib_checkfunc(L, 2); MSize i, n = lj_tab_len(t); for (i = 1; i <= n; i++) { cTValue *val; setfuncV(L, L->top, func); setintV(L->top+1, i); val = lj_tab_getint(t, (int32_t)i); if (val) { copyTV(L, L->top+2, val); } else { setnilV(L->top+2); } L->top += 3; lua_call(L, 2, 1); if (!tvisnil(L->top-1)) return 1; L->top--; } return 0; } LJLIB_CF(table_foreach) { GCtab *t = lj_lib_checktab(L, 1); GCfunc *func = lj_lib_checkfunc(L, 2); L->top = L->base+3; setnilV(L->top-1); while (lj_tab_next(L, t, L->top-1)) { copyTV(L, L->top+2, L->top); copyTV(L, L->top+1, L->top-1); setfuncV(L, L->top, func); L->top += 3; lua_call(L, 2, 1); if (!tvisnil(L->top-1)) return 1; L->top--; } return 0; } LJLIB_ASM(table_getn) LJLIB_REC(.) { lj_lib_checktab(L, 1); return FFH_UNREACHABLE; } LJLIB_CF(table_maxn) { GCtab *t = lj_lib_checktab(L, 1); TValue *array = tvref(t->array); Node *node; lua_Number m = 0; ptrdiff_t i; for (i = (ptrdiff_t)t->asize - 1; i >= 0; i--) if (!tvisnil(&array[i])) { m = (lua_Number)(int32_t)i; break; } node = noderef(t->node); for (i = (ptrdiff_t)t->hmask; i >= 0; i--) if (!tvisnil(&node[i].val) && tvisnumber(&node[i].key)) { lua_Number n = numberVnum(&node[i].key); if (n > m) m = n; } setnumV(L->top-1, m); return 1; } LJLIB_CF(table_insert) LJLIB_REC(.) { GCtab *t = lj_lib_checktab(L, 1); int32_t n, i = (int32_t)lj_tab_len(t) + 1; int nargs = (int)((char *)L->top - (char *)L->base); if (nargs != 2*sizeof(TValue)) { if (nargs != 3*sizeof(TValue)) lj_err_caller(L, LJ_ERR_TABINS); /* NOBARRIER: This just moves existing elements around. */ for (n = lj_lib_checkint(L, 2); i > n; i--) { /* The set may invalidate the get pointer, so need to do it first! */ TValue *dst = lj_tab_setint(L, t, i); cTValue *src = lj_tab_getint(t, i-1); if (src) { copyTV(L, dst, src); } else { setnilV(dst); } } i = n; } { TValue *dst = lj_tab_setint(L, t, i); copyTV(L, dst, L->top-1); /* Set new value. */ lj_gc_barriert(L, t, dst); } return 0; } LJLIB_CF(table_remove) LJLIB_REC(.) { GCtab *t = lj_lib_checktab(L, 1); int32_t e = (int32_t)lj_tab_len(t); int32_t pos = lj_lib_optint(L, 2, e); if (!(1 <= pos && pos <= e)) /* Nothing to remove? */ return 0; lua_rawgeti(L, 1, pos); /* Get previous value. */ /* NOBARRIER: This just moves existing elements around. */ for (; pos < e; pos++) { cTValue *src = lj_tab_getint(t, pos+1); TValue *dst = lj_tab_setint(L, t, pos); if (src) { copyTV(L, dst, src); } else { setnilV(dst); } } setnilV(lj_tab_setint(L, t, e)); /* Remove (last) value. */ return 1; /* Return previous value. */ } LJLIB_CF(table_concat) { luaL_Buffer b; GCtab *t = lj_lib_checktab(L, 1); GCstr *sep = lj_lib_optstr(L, 2); MSize seplen = sep ? sep->len : 0; int32_t i = lj_lib_optint(L, 3, 1); int32_t e = (L->base+3 < L->top && !tvisnil(L->base+3)) ? lj_lib_checkint(L, 4) : (int32_t)lj_tab_len(t); luaL_buffinit(L, &b); if (i <= e) { for (;;) { cTValue *o; lua_rawgeti(L, 1, i); o = L->top-1; if (!(tvisstr(o) || tvisnumber(o))) lj_err_callerv(L, LJ_ERR_TABCAT, lj_typename(o), i); luaL_addvalue(&b); if (i++ == e) break; if (seplen) luaL_addlstring(&b, strdata(sep), seplen); } } luaL_pushresult(&b); return 1; } /* ------------------------------------------------------------------------ */ static void set2(lua_State *L, int i, int j) { lua_rawseti(L, 1, i); lua_rawseti(L, 1, j); } static int sort_comp(lua_State *L, int a, int b) { if (!lua_isnil(L, 2)) { /* function? */ int res; lua_pushvalue(L, 2); lua_pushvalue(L, a-1); /* -1 to compensate function */ lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ lua_call(L, 2, 1); res = lua_toboolean(L, -1); lua_pop(L, 1); return res; } else { /* a < b? */ return lua_lessthan(L, a, b); } } static void auxsort(lua_State *L, int l, int u) { while (l < u) { /* for tail recursion */ int i, j; /* sort elements a[l], a[(l+u)/2] and a[u] */ lua_rawgeti(L, 1, l); lua_rawgeti(L, 1, u); if (sort_comp(L, -1, -2)) /* a[u] < a[l]? */ set2(L, l, u); /* swap a[l] - a[u] */ else lua_pop(L, 2); if (u-l == 1) break; /* only 2 elements */ i = (l+u)/2; lua_rawgeti(L, 1, i); lua_rawgeti(L, 1, l); if (sort_comp(L, -2, -1)) { /* a[i]= P */ while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) { if (i>=u) lj_err_caller(L, LJ_ERR_TABSORT); lua_pop(L, 1); /* remove a[i] */ } /* repeat --j until a[j] <= P */ while (lua_rawgeti(L, 1, --j), sort_comp(L, -3, -1)) { if (j<=l) lj_err_caller(L, LJ_ERR_TABSORT); lua_pop(L, 1); /* remove a[j] */ } if (jbase+1)) lj_lib_checkfunc(L, 2); auxsort(L, 1, n); return 0; } #if LJ_52 LJLIB_PUSH("n") LJLIB_CF(table_pack) { TValue *array, *base = L->base; MSize i, n = (uint32_t)(L->top - base); GCtab *t = lj_tab_new(L, n ? n+1 : 0, 1); /* NOBARRIER: The table is new (marked white). */ setintV(lj_tab_setstr(L, t, strV(lj_lib_upvalue(L, 1))), (int32_t)n); for (array = tvref(t->array) + 1, i = 0; i < n; i++) copyTV(L, &array[i], &base[i]); settabV(L, base, t); L->top = base+1; lj_gc_check(L); return 1; } #endif /* ------------------------------------------------------------------------ */ #include "lj_libdef.h" LUALIB_API int luaopen_table(lua_State *L) { LJ_LIB_REG(L, LUA_TABLIBNAME, table); #if LJ_52 lua_getglobal(L, "unpack"); lua_setfield(L, -2, "unpack"); #endif return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_string.c0000664000000000000000000006074412202141143022671 0ustar rootroot/* ** String library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #include #define lib_string_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_meta.h" #include "lj_state.h" #include "lj_ff.h" #include "lj_bcdump.h" #include "lj_char.h" #include "lj_lib.h" /* ------------------------------------------------------------------------ */ #define LJLIB_MODULE_string LJLIB_ASM(string_len) LJLIB_REC(.) { lj_lib_checkstr(L, 1); return FFH_RETRY; } LJLIB_ASM(string_byte) LJLIB_REC(string_range 0) { GCstr *s = lj_lib_checkstr(L, 1); int32_t len = (int32_t)s->len; int32_t start = lj_lib_optint(L, 2, 1); int32_t stop = lj_lib_optint(L, 3, start); int32_t n, i; const unsigned char *p; if (stop < 0) stop += len+1; if (start < 0) start += len+1; if (start <= 0) start = 1; if (stop > len) stop = len; if (start > stop) return FFH_RES(0); /* Empty interval: return no results. */ start--; n = stop - start; if ((uint32_t)n > LUAI_MAXCSTACK) lj_err_caller(L, LJ_ERR_STRSLC); lj_state_checkstack(L, (MSize)n); p = (const unsigned char *)strdata(s) + start; for (i = 0; i < n; i++) setintV(L->base + i-1, p[i]); return FFH_RES(n); } LJLIB_ASM(string_char) { int i, nargs = (int)(L->top - L->base); char *buf = lj_str_needbuf(L, &G(L)->tmpbuf, (size_t)nargs); for (i = 1; i <= nargs; i++) { int32_t k = lj_lib_checkint(L, i); if (!checku8(k)) lj_err_arg(L, i, LJ_ERR_BADVAL); buf[i-1] = (char)k; } setstrV(L, L->base-1, lj_str_new(L, buf, (size_t)nargs)); return FFH_RES(1); } LJLIB_ASM(string_sub) LJLIB_REC(string_range 1) { lj_lib_checkstr(L, 1); lj_lib_checkint(L, 2); setintV(L->base+2, lj_lib_optint(L, 3, -1)); return FFH_RETRY; } LJLIB_ASM(string_rep) { GCstr *s = lj_lib_checkstr(L, 1); int32_t k = lj_lib_checkint(L, 2); GCstr *sep = lj_lib_optstr(L, 3); int32_t len = (int32_t)s->len; global_State *g = G(L); int64_t tlen; const char *src; char *buf; if (k <= 0) { empty: setstrV(L, L->base-1, &g->strempty); return FFH_RES(1); } if (sep) { tlen = (int64_t)len + sep->len; if (tlen > LJ_MAX_STR) lj_err_caller(L, LJ_ERR_STROV); tlen *= k; if (tlen > LJ_MAX_STR) lj_err_caller(L, LJ_ERR_STROV); } else { tlen = (int64_t)k * len; if (tlen > LJ_MAX_STR) lj_err_caller(L, LJ_ERR_STROV); } if (tlen == 0) goto empty; buf = lj_str_needbuf(L, &g->tmpbuf, (MSize)tlen); src = strdata(s); if (sep) { tlen -= sep->len; /* Ignore trailing separator. */ if (k > 1) { /* Paste one string and one separator. */ int32_t i; i = 0; while (i < len) *buf++ = src[i++]; src = strdata(sep); len = sep->len; i = 0; while (i < len) *buf++ = src[i++]; src = g->tmpbuf.buf; len += s->len; k--; /* Now copy that k-1 times. */ } } do { int32_t i = 0; do { *buf++ = src[i++]; } while (i < len); } while (--k > 0); setstrV(L, L->base-1, lj_str_new(L, g->tmpbuf.buf, (size_t)tlen)); return FFH_RES(1); } LJLIB_ASM(string_reverse) { GCstr *s = lj_lib_checkstr(L, 1); lj_str_needbuf(L, &G(L)->tmpbuf, s->len); return FFH_RETRY; } LJLIB_ASM_(string_lower) LJLIB_ASM_(string_upper) /* ------------------------------------------------------------------------ */ static int writer_buf(lua_State *L, const void *p, size_t size, void *b) { luaL_addlstring((luaL_Buffer *)b, (const char *)p, size); UNUSED(L); return 0; } LJLIB_CF(string_dump) { GCfunc *fn = lj_lib_checkfunc(L, 1); int strip = L->base+1 < L->top && tvistruecond(L->base+1); luaL_Buffer b; L->top = L->base+1; luaL_buffinit(L, &b); if (!isluafunc(fn) || lj_bcwrite(L, funcproto(fn), writer_buf, &b, strip)) lj_err_caller(L, LJ_ERR_STRDUMP); luaL_pushresult(&b); return 1; } /* ------------------------------------------------------------------------ */ /* macro to `unsign' a character */ #define uchar(c) ((unsigned char)(c)) #define CAP_UNFINISHED (-1) #define CAP_POSITION (-2) typedef struct MatchState { const char *src_init; /* init of source string */ const char *src_end; /* end (`\0') of source string */ lua_State *L; int level; /* total number of captures (finished or unfinished) */ int depth; struct { const char *init; ptrdiff_t len; } capture[LUA_MAXCAPTURES]; } MatchState; #define L_ESC '%' #define SPECIALS "^$*+?.([%-" static int check_capture(MatchState *ms, int l) { l -= '1'; if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED) lj_err_caller(ms->L, LJ_ERR_STRCAPI); return l; } static int capture_to_close(MatchState *ms) { int level = ms->level; for (level--; level>=0; level--) if (ms->capture[level].len == CAP_UNFINISHED) return level; lj_err_caller(ms->L, LJ_ERR_STRPATC); return 0; /* unreachable */ } static const char *classend(MatchState *ms, const char *p) { switch (*p++) { case L_ESC: if (*p == '\0') lj_err_caller(ms->L, LJ_ERR_STRPATE); return p+1; case '[': if (*p == '^') p++; do { /* look for a `]' */ if (*p == '\0') lj_err_caller(ms->L, LJ_ERR_STRPATM); if (*(p++) == L_ESC && *p != '\0') p++; /* skip escapes (e.g. `%]') */ } while (*p != ']'); return p+1; default: return p; } } static const unsigned char match_class_map[32] = { 0,LJ_CHAR_ALPHA,0,LJ_CHAR_CNTRL,LJ_CHAR_DIGIT,0,0,LJ_CHAR_GRAPH,0,0,0,0, LJ_CHAR_LOWER,0,0,0,LJ_CHAR_PUNCT,0,0,LJ_CHAR_SPACE,0, LJ_CHAR_UPPER,0,LJ_CHAR_ALNUM,LJ_CHAR_XDIGIT,0,0,0,0,0,0,0 }; static int match_class(int c, int cl) { if ((cl & 0xc0) == 0x40) { int t = match_class_map[(cl&0x1f)]; if (t) { t = lj_char_isa(c, t); return (cl & 0x20) ? t : !t; } if (cl == 'z') return c == 0; if (cl == 'Z') return c != 0; } return (cl == c); } static int matchbracketclass(int c, const char *p, const char *ec) { int sig = 1; if (*(p+1) == '^') { sig = 0; p++; /* skip the `^' */ } while (++p < ec) { if (*p == L_ESC) { p++; if (match_class(c, uchar(*p))) return sig; } else if ((*(p+1) == '-') && (p+2 < ec)) { p+=2; if (uchar(*(p-2)) <= c && c <= uchar(*p)) return sig; } else if (uchar(*p) == c) return sig; } return !sig; } static int singlematch(int c, const char *p, const char *ep) { switch (*p) { case '.': return 1; /* matches any char */ case L_ESC: return match_class(c, uchar(*(p+1))); case '[': return matchbracketclass(c, p, ep-1); default: return (uchar(*p) == c); } } static const char *match(MatchState *ms, const char *s, const char *p); static const char *matchbalance(MatchState *ms, const char *s, const char *p) { if (*p == 0 || *(p+1) == 0) lj_err_caller(ms->L, LJ_ERR_STRPATU); if (*s != *p) { return NULL; } else { int b = *p; int e = *(p+1); int cont = 1; while (++s < ms->src_end) { if (*s == e) { if (--cont == 0) return s+1; } else if (*s == b) { cont++; } } } return NULL; /* string ends out of balance */ } static const char *max_expand(MatchState *ms, const char *s, const char *p, const char *ep) { ptrdiff_t i = 0; /* counts maximum expand for item */ while ((s+i)src_end && singlematch(uchar(*(s+i)), p, ep)) i++; /* keeps trying to match with the maximum repetitions */ while (i>=0) { const char *res = match(ms, (s+i), ep+1); if (res) return res; i--; /* else didn't match; reduce 1 repetition to try again */ } return NULL; } static const char *min_expand(MatchState *ms, const char *s, const char *p, const char *ep) { for (;;) { const char *res = match(ms, s, ep+1); if (res != NULL) return res; else if (ssrc_end && singlematch(uchar(*s), p, ep)) s++; /* try with one more repetition */ else return NULL; } } static const char *start_capture(MatchState *ms, const char *s, const char *p, int what) { const char *res; int level = ms->level; if (level >= LUA_MAXCAPTURES) lj_err_caller(ms->L, LJ_ERR_STRCAPN); ms->capture[level].init = s; ms->capture[level].len = what; ms->level = level+1; if ((res=match(ms, s, p)) == NULL) /* match failed? */ ms->level--; /* undo capture */ return res; } static const char *end_capture(MatchState *ms, const char *s, const char *p) { int l = capture_to_close(ms); const char *res; ms->capture[l].len = s - ms->capture[l].init; /* close capture */ if ((res = match(ms, s, p)) == NULL) /* match failed? */ ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ return res; } static const char *match_capture(MatchState *ms, const char *s, int l) { size_t len; l = check_capture(ms, l); len = (size_t)ms->capture[l].len; if ((size_t)(ms->src_end-s) >= len && memcmp(ms->capture[l].init, s, len) == 0) return s+len; else return NULL; } static const char *match(MatchState *ms, const char *s, const char *p) { if (++ms->depth > LJ_MAX_XLEVEL) lj_err_caller(ms->L, LJ_ERR_STRPATX); init: /* using goto's to optimize tail recursion */ switch (*p) { case '(': /* start capture */ if (*(p+1) == ')') /* position capture? */ s = start_capture(ms, s, p+2, CAP_POSITION); else s = start_capture(ms, s, p+1, CAP_UNFINISHED); break; case ')': /* end capture */ s = end_capture(ms, s, p+1); break; case L_ESC: switch (*(p+1)) { case 'b': /* balanced string? */ s = matchbalance(ms, s, p+2); if (s == NULL) break; p+=4; goto init; /* else s = match(ms, s, p+4); */ case 'f': { /* frontier? */ const char *ep; char previous; p += 2; if (*p != '[') lj_err_caller(ms->L, LJ_ERR_STRPATB); ep = classend(ms, p); /* points to what is next */ previous = (s == ms->src_init) ? '\0' : *(s-1); if (matchbracketclass(uchar(previous), p, ep-1) || !matchbracketclass(uchar(*s), p, ep-1)) { s = NULL; break; } p=ep; goto init; /* else s = match(ms, s, ep); */ } default: if (lj_char_isdigit(uchar(*(p+1)))) { /* capture results (%0-%9)? */ s = match_capture(ms, s, uchar(*(p+1))); if (s == NULL) break; p+=2; goto init; /* else s = match(ms, s, p+2) */ } goto dflt; /* case default */ } break; case '\0': /* end of pattern */ break; /* match succeeded */ case '$': /* is the `$' the last char in pattern? */ if (*(p+1) != '\0') goto dflt; if (s != ms->src_end) s = NULL; /* check end of string */ break; default: dflt: { /* it is a pattern item */ const char *ep = classend(ms, p); /* points to what is next */ int m = ssrc_end && singlematch(uchar(*s), p, ep); switch (*ep) { case '?': { /* optional */ const char *res; if (m && ((res=match(ms, s+1, ep+1)) != NULL)) { s = res; break; } p=ep+1; goto init; /* else s = match(ms, s, ep+1); */ } case '*': /* 0 or more repetitions */ s = max_expand(ms, s, p, ep); break; case '+': /* 1 or more repetitions */ s = (m ? max_expand(ms, s+1, p, ep) : NULL); break; case '-': /* 0 or more repetitions (minimum) */ s = min_expand(ms, s, p, ep); break; default: if (m) { s++; p=ep; goto init; } /* else s = match(ms, s+1, ep); */ s = NULL; break; } break; } } ms->depth--; return s; } static const char *lmemfind(const char *s1, size_t l1, const char *s2, size_t l2) { if (l2 == 0) { return s1; /* empty strings are everywhere */ } else if (l2 > l1) { return NULL; /* avoids a negative `l1' */ } else { const char *init; /* to search for a `*s2' inside `s1' */ l2--; /* 1st char will be checked by `memchr' */ l1 = l1-l2; /* `s2' cannot be found after that */ while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) { init++; /* 1st char is already checked */ if (memcmp(init, s2+1, l2) == 0) { return init-1; } else { /* correct `l1' and `s1' to try again */ l1 -= (size_t)(init-s1); s1 = init; } } return NULL; /* not found */ } } static void push_onecapture(MatchState *ms, int i, const char *s, const char *e) { if (i >= ms->level) { if (i == 0) /* ms->level == 0, too */ lua_pushlstring(ms->L, s, (size_t)(e - s)); /* add whole match */ else lj_err_caller(ms->L, LJ_ERR_STRCAPI); } else { ptrdiff_t l = ms->capture[i].len; if (l == CAP_UNFINISHED) lj_err_caller(ms->L, LJ_ERR_STRCAPU); if (l == CAP_POSITION) lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1); else lua_pushlstring(ms->L, ms->capture[i].init, (size_t)l); } } static int push_captures(MatchState *ms, const char *s, const char *e) { int i; int nlevels = (ms->level == 0 && s) ? 1 : ms->level; luaL_checkstack(ms->L, nlevels, "too many captures"); for (i = 0; i < nlevels; i++) push_onecapture(ms, i, s, e); return nlevels; /* number of strings pushed */ } static ptrdiff_t posrelat(ptrdiff_t pos, size_t len) { /* relative string position: negative means back from end */ if (pos < 0) pos += (ptrdiff_t)len + 1; return (pos >= 0) ? pos : 0; } static int str_find_aux(lua_State *L, int find) { size_t l1, l2; const char *s = luaL_checklstring(L, 1, &l1); const char *p = luaL_checklstring(L, 2, &l2); ptrdiff_t init = posrelat(luaL_optinteger(L, 3, 1), l1) - 1; if (init < 0) { init = 0; } else if ((size_t)(init) > l1) { #if LJ_52 setnilV(L->top-1); return 1; #else init = (ptrdiff_t)l1; #endif } if (find && (lua_toboolean(L, 4) || /* explicit request? */ strpbrk(p, SPECIALS) == NULL)) { /* or no special characters? */ /* do a plain search */ const char *s2 = lmemfind(s+init, l1-(size_t)init, p, l2); if (s2) { lua_pushinteger(L, s2-s+1); lua_pushinteger(L, s2-s+(ptrdiff_t)l2); return 2; } } else { MatchState ms; int anchor = (*p == '^') ? (p++, 1) : 0; const char *s1=s+init; ms.L = L; ms.src_init = s; ms.src_end = s+l1; do { const char *res; ms.level = ms.depth = 0; if ((res=match(&ms, s1, p)) != NULL) { if (find) { lua_pushinteger(L, s1-s+1); /* start */ lua_pushinteger(L, res-s); /* end */ return push_captures(&ms, NULL, 0) + 2; } else { return push_captures(&ms, s1, res); } } } while (s1++ < ms.src_end && !anchor); } lua_pushnil(L); /* not found */ return 1; } LJLIB_CF(string_find) { return str_find_aux(L, 1); } LJLIB_CF(string_match) { return str_find_aux(L, 0); } LJLIB_NOREG LJLIB_CF(string_gmatch_aux) { const char *p = strVdata(lj_lib_upvalue(L, 2)); GCstr *str = strV(lj_lib_upvalue(L, 1)); const char *s = strdata(str); TValue *tvpos = lj_lib_upvalue(L, 3); const char *src = s + tvpos->u32.lo; MatchState ms; ms.L = L; ms.src_init = s; ms.src_end = s + str->len; for (; src <= ms.src_end; src++) { const char *e; ms.level = ms.depth = 0; if ((e = match(&ms, src, p)) != NULL) { int32_t pos = (int32_t)(e - s); if (e == src) pos++; /* Ensure progress for empty match. */ tvpos->u32.lo = (uint32_t)pos; return push_captures(&ms, src, e); } } return 0; /* not found */ } LJLIB_CF(string_gmatch) { lj_lib_checkstr(L, 1); lj_lib_checkstr(L, 2); L->top = L->base+3; (L->top-1)->u64 = 0; lj_lib_pushcc(L, lj_cf_string_gmatch_aux, FF_string_gmatch_aux, 3); return 1; } static void add_s(MatchState *ms, luaL_Buffer *b, const char *s, const char *e) { size_t l, i; const char *news = lua_tolstring(ms->L, 3, &l); for (i = 0; i < l; i++) { if (news[i] != L_ESC) { luaL_addchar(b, news[i]); } else { i++; /* skip ESC */ if (!lj_char_isdigit(uchar(news[i]))) { luaL_addchar(b, news[i]); } else if (news[i] == '0') { luaL_addlstring(b, s, (size_t)(e - s)); } else { push_onecapture(ms, news[i] - '1', s, e); luaL_addvalue(b); /* add capture to accumulated result */ } } } } static void add_value(MatchState *ms, luaL_Buffer *b, const char *s, const char *e) { lua_State *L = ms->L; switch (lua_type(L, 3)) { case LUA_TNUMBER: case LUA_TSTRING: { add_s(ms, b, s, e); return; } case LUA_TFUNCTION: { int n; lua_pushvalue(L, 3); n = push_captures(ms, s, e); lua_call(L, n, 1); break; } case LUA_TTABLE: { push_onecapture(ms, 0, s, e); lua_gettable(L, 3); break; } } if (!lua_toboolean(L, -1)) { /* nil or false? */ lua_pop(L, 1); lua_pushlstring(L, s, (size_t)(e - s)); /* keep original text */ } else if (!lua_isstring(L, -1)) { lj_err_callerv(L, LJ_ERR_STRGSRV, luaL_typename(L, -1)); } luaL_addvalue(b); /* add result to accumulator */ } LJLIB_CF(string_gsub) { size_t srcl; const char *src = luaL_checklstring(L, 1, &srcl); const char *p = luaL_checkstring(L, 2); int tr = lua_type(L, 3); int max_s = luaL_optint(L, 4, (int)(srcl+1)); int anchor = (*p == '^') ? (p++, 1) : 0; int n = 0; MatchState ms; luaL_Buffer b; if (!(tr == LUA_TNUMBER || tr == LUA_TSTRING || tr == LUA_TFUNCTION || tr == LUA_TTABLE)) lj_err_arg(L, 3, LJ_ERR_NOSFT); luaL_buffinit(L, &b); ms.L = L; ms.src_init = src; ms.src_end = src+srcl; while (n < max_s) { const char *e; ms.level = ms.depth = 0; e = match(&ms, src, p); if (e) { n++; add_value(&ms, &b, src, e); } if (e && e>src) /* non empty match? */ src = e; /* skip it */ else if (src < ms.src_end) luaL_addchar(&b, *src++); else break; if (anchor) break; } luaL_addlstring(&b, src, (size_t)(ms.src_end-src)); luaL_pushresult(&b); lua_pushinteger(L, n); /* number of substitutions */ return 2; } /* ------------------------------------------------------------------------ */ /* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */ #define MAX_FMTITEM 512 /* valid flags in a format specification */ #define FMT_FLAGS "-+ #0" /* ** maximum size of each format specification (such as '%-099.99d') ** (+10 accounts for %99.99x plus margin of error) */ #define MAX_FMTSPEC (sizeof(FMT_FLAGS) + sizeof(LUA_INTFRMLEN) + 10) static void addquoted(lua_State *L, luaL_Buffer *b, int arg) { GCstr *str = lj_lib_checkstr(L, arg); int32_t len = (int32_t)str->len; const char *s = strdata(str); luaL_addchar(b, '"'); while (len--) { uint32_t c = uchar(*s); if (c == '"' || c == '\\' || c == '\n') { luaL_addchar(b, '\\'); } else if (lj_char_iscntrl(c)) { /* This can only be 0-31 or 127. */ uint32_t d; luaL_addchar(b, '\\'); if (c >= 100 || lj_char_isdigit(uchar(s[1]))) { luaL_addchar(b, '0'+(c >= 100)); if (c >= 100) c -= 100; goto tens; } else if (c >= 10) { tens: d = (c * 205) >> 11; c -= d * 10; luaL_addchar(b, '0'+d); } c += '0'; } luaL_addchar(b, c); s++; } luaL_addchar(b, '"'); } static const char *scanformat(lua_State *L, const char *strfrmt, char *form) { const char *p = strfrmt; while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL) p++; /* skip flags */ if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) lj_err_caller(L, LJ_ERR_STRFMTR); if (lj_char_isdigit(uchar(*p))) p++; /* skip width */ if (lj_char_isdigit(uchar(*p))) p++; /* (2 digits at most) */ if (*p == '.') { p++; if (lj_char_isdigit(uchar(*p))) p++; /* skip precision */ if (lj_char_isdigit(uchar(*p))) p++; /* (2 digits at most) */ } if (lj_char_isdigit(uchar(*p))) lj_err_caller(L, LJ_ERR_STRFMTW); *(form++) = '%'; strncpy(form, strfrmt, (size_t)(p - strfrmt + 1)); form += p - strfrmt + 1; *form = '\0'; return p; } static void addintlen(char *form) { size_t l = strlen(form); char spec = form[l - 1]; strcpy(form + l - 1, LUA_INTFRMLEN); form[l + sizeof(LUA_INTFRMLEN) - 2] = spec; form[l + sizeof(LUA_INTFRMLEN) - 1] = '\0'; } static unsigned LUA_INTFRM_T num2intfrm(lua_State *L, int arg) { if (sizeof(LUA_INTFRM_T) == 4) { return (LUA_INTFRM_T)lj_lib_checkbit(L, arg); } else { cTValue *o; lj_lib_checknumber(L, arg); o = L->base+arg-1; if (tvisint(o)) return (LUA_INTFRM_T)intV(o); else return (LUA_INTFRM_T)numV(o); } } static unsigned LUA_INTFRM_T num2uintfrm(lua_State *L, int arg) { if (sizeof(LUA_INTFRM_T) == 4) { return (unsigned LUA_INTFRM_T)lj_lib_checkbit(L, arg); } else { cTValue *o; lj_lib_checknumber(L, arg); o = L->base+arg-1; if (tvisint(o)) return (unsigned LUA_INTFRM_T)intV(o); else if ((int32_t)o->u32.hi < 0) return (unsigned LUA_INTFRM_T)(LUA_INTFRM_T)numV(o); else return (unsigned LUA_INTFRM_T)numV(o); } } static GCstr *meta_tostring(lua_State *L, int arg) { TValue *o = L->base+arg-1; cTValue *mo; lua_assert(o < L->top); /* Caller already checks for existence. */ if (LJ_LIKELY(tvisstr(o))) return strV(o); if (!tvisnil(mo = lj_meta_lookup(L, o, MM_tostring))) { copyTV(L, L->top++, mo); copyTV(L, L->top++, o); lua_call(L, 1, 1); L->top--; if (tvisstr(L->top)) return strV(L->top); o = L->base+arg-1; copyTV(L, o, L->top); } if (tvisnumber(o)) { return lj_str_fromnumber(L, o); } else if (tvisnil(o)) { return lj_str_newlit(L, "nil"); } else if (tvisfalse(o)) { return lj_str_newlit(L, "false"); } else if (tvistrue(o)) { return lj_str_newlit(L, "true"); } else { if (tvisfunc(o) && isffunc(funcV(o))) lj_str_pushf(L, "function: builtin#%d", funcV(o)->c.ffid); else lj_str_pushf(L, "%s: %p", lj_typename(o), lua_topointer(L, arg)); L->top--; return strV(L->top); } } LJLIB_CF(string_format) { int arg = 1, top = (int)(L->top - L->base); GCstr *fmt = lj_lib_checkstr(L, arg); const char *strfrmt = strdata(fmt); const char *strfrmt_end = strfrmt + fmt->len; luaL_Buffer b; luaL_buffinit(L, &b); while (strfrmt < strfrmt_end) { if (*strfrmt != L_ESC) { luaL_addchar(&b, *strfrmt++); } else if (*++strfrmt == L_ESC) { luaL_addchar(&b, *strfrmt++); /* %% */ } else { /* format item */ char form[MAX_FMTSPEC]; /* to store the format (`%...') */ char buff[MAX_FMTITEM]; /* to store the formatted item */ if (++arg > top) luaL_argerror(L, arg, lj_obj_typename[0]); strfrmt = scanformat(L, strfrmt, form); switch (*strfrmt++) { case 'c': sprintf(buff, form, lj_lib_checkint(L, arg)); break; case 'd': case 'i': addintlen(form); sprintf(buff, form, num2intfrm(L, arg)); break; case 'o': case 'u': case 'x': case 'X': addintlen(form); sprintf(buff, form, num2uintfrm(L, arg)); break; case 'e': case 'E': case 'f': case 'g': case 'G': case 'a': case 'A': { TValue tv; tv.n = lj_lib_checknum(L, arg); if (LJ_UNLIKELY((tv.u32.hi << 1) >= 0xffe00000)) { /* Canonicalize output of non-finite values. */ char *p, nbuf[LJ_STR_NUMBUF]; size_t len = lj_str_bufnum(nbuf, &tv); if (strfrmt[-1] < 'a') { nbuf[len-3] = nbuf[len-3] - 0x20; nbuf[len-2] = nbuf[len-2] - 0x20; nbuf[len-1] = nbuf[len-1] - 0x20; } nbuf[len] = '\0'; for (p = form; *p < 'A' && *p != '.'; p++) ; *p++ = 's'; *p = '\0'; sprintf(buff, form, nbuf); break; } sprintf(buff, form, (double)tv.n); break; } case 'q': addquoted(L, &b, arg); continue; case 'p': lj_str_pushf(L, "%p", lua_topointer(L, arg)); luaL_addvalue(&b); continue; case 's': { GCstr *str = meta_tostring(L, arg); if (!strchr(form, '.') && str->len >= 100) { /* no precision and string is too long to be formatted; keep original string */ setstrV(L, L->top++, str); luaL_addvalue(&b); continue; } sprintf(buff, form, strdata(str)); break; } default: lj_err_callerv(L, LJ_ERR_STRFMTO, *(strfrmt -1)); break; } luaL_addlstring(&b, buff, strlen(buff)); } } luaL_pushresult(&b); return 1; } /* ------------------------------------------------------------------------ */ #include "lj_libdef.h" LUALIB_API int luaopen_string(lua_State *L) { GCtab *mt; global_State *g; LJ_LIB_REG(L, LUA_STRLIBNAME, string); #if defined(LUA_COMPAT_GFIND) && !LJ_52 lua_getfield(L, -1, "gmatch"); lua_setfield(L, -2, "gfind"); #endif mt = lj_tab_new(L, 0, 1); /* NOBARRIER: basemt is a GC root. */ g = G(L); setgcref(basemt_it(g, LJ_TSTR), obj2gco(mt)); settabV(L, lj_tab_setstr(L, mt, mmname_str(g, MM_index)), tabV(L->top-1)); mt->nomm = (uint8_t)(~(1u<> 26) & 15u); /* Dispatch bits. */ lua_assert(ctype_type(info) <= CT_MAYCONVERT); #if LJ_64 idx = ((U64x(f436fff5,fff7f021) >> 4*idx) & 15u); #else idx = (((idx < 8 ? 0xfff7f021u : 0xf436fff5) >> 4*(idx & 7u)) & 15u); #endif lua_assert(idx < 8); return idx; } #define cconv_idx2(dinfo, sinfo) \ ((cconv_idx((dinfo)) << 3) + cconv_idx((sinfo))) #define CCX(dst, src) ((CCX_##dst << 3) + CCX_##src) /* Conversion flags. */ #define CCF_CAST 0x00000001u #define CCF_FROMTV 0x00000002u #define CCF_SAME 0x00000004u #define CCF_IGNQUAL 0x00000008u #define CCF_ARG_SHIFT 8 #define CCF_ARG(n) ((n) << CCF_ARG_SHIFT) #define CCF_GETARG(f) ((f) >> CCF_ARG_SHIFT) LJ_FUNC int lj_cconv_compatptr(CTState *cts, CType *d, CType *s, CTInfo flags); LJ_FUNC void lj_cconv_ct_ct(CTState *cts, CType *d, CType *s, uint8_t *dp, uint8_t *sp, CTInfo flags); LJ_FUNC int lj_cconv_tv_ct(CTState *cts, CType *s, CTypeID sid, TValue *o, uint8_t *sp); LJ_FUNC int lj_cconv_tv_bf(CTState *cts, CType *s, TValue *o, uint8_t *sp); LJ_FUNC void lj_cconv_ct_tv(CTState *cts, CType *d, uint8_t *dp, TValue *o, CTInfo flags); LJ_FUNC void lj_cconv_bf_tv(CTState *cts, CType *d, uint8_t *dp, TValue *o); LJ_FUNC int lj_cconv_multi_init(CTState *cts, CType *d, TValue *o); LJ_FUNC void lj_cconv_ct_init(CTState *cts, CType *d, CTSize sz, uint8_t *dp, TValue *o, MSize len); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_record.h0000664000000000000000000000305212202141143022472 0ustar rootroot/* ** Trace recorder (bytecode -> SSA IR). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_RECORD_H #define _LJ_RECORD_H #include "lj_obj.h" #include "lj_jit.h" #if LJ_HASJIT /* Context for recording an indexed load/store. */ typedef struct RecordIndex { TValue tabv; /* Runtime value of table (or indexed object). */ TValue keyv; /* Runtime value of key. */ TValue valv; /* Runtime value of stored value. */ TValue mobjv; /* Runtime value of metamethod object. */ GCtab *mtv; /* Runtime value of metatable object. */ cTValue *oldv; /* Runtime value of previously stored value. */ TRef tab; /* Table (or indexed object) reference. */ TRef key; /* Key reference. */ TRef val; /* Value reference for a store or 0 for a load. */ TRef mt; /* Metatable reference. */ TRef mobj; /* Metamethod object reference. */ int idxchain; /* Index indirections left or 0 for raw lookup. */ } RecordIndex; LJ_FUNC int lj_record_objcmp(jit_State *J, TRef a, TRef b, cTValue *av, cTValue *bv); LJ_FUNC TRef lj_record_constify(jit_State *J, cTValue *o); LJ_FUNC void lj_record_call(jit_State *J, BCReg func, ptrdiff_t nargs); LJ_FUNC void lj_record_tailcall(jit_State *J, BCReg func, ptrdiff_t nargs); LJ_FUNC void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults); LJ_FUNC int lj_record_mm_lookup(jit_State *J, RecordIndex *ix, MMS mm); LJ_FUNC TRef lj_record_idx(jit_State *J, RecordIndex *ix); LJ_FUNC void lj_record_ins(jit_State *J); LJ_FUNC void lj_record_setup(jit_State *J); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/0000775000000000000000000000000012231715321021342 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm_arch.h0000664000000000000000000102316512213333062024160 0ustar rootroot/* ** This file has been pre-processed with DynASM. ** http://luajit.org/dynasm.html ** DynASM version 1.3.0, DynASM x64 version 1.3.0 ** DO NOT EDIT! The original file is in "vm_x86.dasc". */ #if DASM_VERSION != 10300 #error "Version mismatch between DynASM and included encoding engine" #endif # 1 "vm_x86.dasc" //|// Low-level VM code for x86 CPUs. //|// Bytecode interpreter, fast functions and helper functions. //|// Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h //| //|.if P64 //|.arch x64 //|.else //|.arch x86 //|.endif //|.section code_op, code_sub #define DASM_SECTION_CODE_OP 0 #define DASM_SECTION_CODE_SUB 1 #define DASM_MAXSECTION 2 # 11 "vm_x86.dasc" //| //|.actionlist build_actionlist static const unsigned char build_actionlist[14361] = { 254,1,248,10,252,247,195,237,15,132,244,11,131,227,252,248,41,218,72,141, 76,25,252,248,139,90,252,252,199,68,10,4,237,248,12,131,192,1,15,132,244, 13,137,68,36,4,252,247,195,237,15,132,244,14,248,15,129,252,243,239,252,247, 195,237,15,133,244,10,65,199,134,233,237,131,227,252,248,41,211,252,247,219, 131,232,1,15,132,244,248,248,1,255,72,139,44,10,72,137,106,252,248,131,194, 8,131,232,1,15,133,244,1,248,2,139,108,36,24,137,157,233,248,3,139,68,36, 4,139,76,36,16,248,4,57,193,15,133,244,252,248,5,131,252,234,8,137,149,233, 248,16,72,139,76,36,32,72,137,141,233,49,192,248,17,72,131,196,40,65,94,65, 95,91,93,195,248,6,15,130,244,253,59,149,233,15,135,244,254,199,66,252,252, 237,255,131,194,8,131,192,1,252,233,244,4,248,7,133,201,15,132,244,5,41,193, 141,20,202,252,233,244,5,248,8,137,149,233,137,68,36,4,137,206,137,252,239, 232,251,1,0,139,149,233,252,233,244,3,248,13,176,235,252,233,244,18,248,19, 137,252,240,72,137,252,252,248,18,139,108,36,24,139,173,233,199,133,233,237, 255,252,233,244,17,248,20,139,124,36,24,137,198,72,131,196,40,65,94,65,95, 91,93,252,233,251,1,1,248,21,72,129,231,239,72,137,252,252,248,22,139,108, 36,24,72,199,193,252,248,252,255,252,255,252,255,184,237,139,149,233,68,139, 181,233,65,129,198,239,139,90,252,252,199,66,252,252,237,65,199,134,233,237, 252,233,244,12,248,23,190,237,252,233,244,248,248,24,255,131,232,8,252,233, 244,247,248,25,141,68,194,252,248,248,1,15,182,139,233,131,195,4,137,149, 233,137,133,233,137,92,36,28,137,206,248,2,137,252,239,232,251,1,0,139,149, 233,139,133,233,139,106,252,248,41,208,193,232,3,131,192,1,139,157,233,139, 11,15,182,252,233,15,182,205,131,195,4,65,252,255,36,252,238,248,26,85,83, 65,87,65,86,72,131,252,236,40,137,252,253,137,124,36,24,137,252,241,187,237, 49,192,76,141,188,253,36,233,68,139,181,233,65,129,198,239,76,137,189,233, 137,68,36,28,72,137,68,36,32,137,68,36,16,137,68,36,20,56,133,233,15,132, 244,249,255,65,199,134,233,237,136,133,233,139,149,233,139,133,233,41,200, 193,232,3,131,192,1,41,209,139,90,252,252,137,68,36,4,252,247,195,237,15, 132,244,14,252,233,244,15,248,27,85,83,65,87,65,86,72,131,252,236,40,187, 237,137,76,36,20,252,233,244,247,248,28,85,83,65,87,65,86,72,131,252,236, 40,187,237,248,1,137,84,36,16,137,252,253,137,124,36,24,137,252,241,76,139, 189,233,76,137,124,36,32,137,108,36,28,72,137,165,233,248,2,255,68,139,181, 233,65,129,198,239,248,3,65,199,134,233,237,139,149,233,1,203,41,211,139, 133,233,41,200,193,232,3,131,192,1,248,29,139,105,252,248,129,121,253,252, 252,239,15,133,244,30,248,31,137,202,137,90,252,252,139,157,233,139,11,15, 182,252,233,15,182,205,131,195,4,65,252,255,36,252,238,248,32,85,83,65,87, 65,86,72,131,252,236,40,137,252,253,137,124,36,24,137,108,36,28,68,139,189, 233,68,43,189,233,199,68,36,20,0,0,0,0,68,137,124,36,16,76,139,189,233,76, 137,124,36,32,72,137,165,233,252,255,209,133,192,15,132,244,16,255,137,193, 187,237,252,233,244,2,248,11,1,209,131,227,252,248,137,213,41,218,199,68, 193,252,252,237,137,200,139,93,252,244,72,99,77,252,240,131,252,249,1,15, 134,244,247,76,141,61,245,76,1,252,249,68,139,122,252,248,69,139,191,233, 69,139,191,233,252,255,225,248,1,15,132,244,33,41,213,193,252,237,3,141,69, 252,255,252,233,244,34,248,35,15,182,75,252,255,131,252,237,16,141,12,202, 41,252,233,15,132,244,36,252,247,217,193,252,233,3,139,124,36,24,137,151, 233,255,137,202,72,139,8,72,137,77,0,137,252,238,252,233,244,37,248,38,137, 4,36,199,68,36,4,237,72,141,4,36,128,123,252,252,235,15,133,244,247,65,141, 142,233,137,41,199,65,4,237,137,205,252,233,244,248,248,39,15,182,67,252, 254,252,242,15,42,192,252,242,15,17,4,36,72,141,4,36,252,233,244,247,248, 40,15,182,67,252,254,141,4,194,248,1,15,182,107,252,255,141,44,252,234,248, 2,139,124,36,24,137,151,233,137,252,238,72,137,194,137,252,253,137,92,36, 28,232,251,1,2,139,149,233,133,192,15,132,244,249,248,36,255,15,182,75,252, 253,72,139,40,72,137,44,202,139,3,15,182,204,15,182,232,131,195,4,193,232, 16,65,252,255,36,252,238,248,3,139,141,233,137,89,252,244,141,153,233,41, 211,139,105,252,248,184,237,252,233,244,31,248,41,137,4,36,199,68,36,4,237, 72,141,4,36,128,123,252,252,235,15,133,244,247,65,141,142,233,137,41,199, 65,4,237,137,205,252,233,244,248,248,42,15,182,67,252,254,252,242,15,42,192, 252,242,15,17,4,36,72,141,4,36,252,233,244,247,248,43,15,182,67,252,254,141, 4,194,248,1,255,15,182,107,252,255,141,44,252,234,248,2,139,124,36,24,137, 151,233,137,252,238,72,137,194,137,252,253,137,92,36,28,232,251,1,3,139,149, 233,133,192,15,132,244,249,15,182,75,252,253,72,139,44,202,72,137,40,248, 44,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238, 248,3,139,141,233,137,89,252,244,15,182,67,252,253,72,139,44,194,72,137,105, 16,141,153,233,41,211,139,105,252,248,184,237,252,233,244,31,248,45,139,108, 36,24,137,149,233,141,52,202,141,20,194,137,252,239,15,182,75,252,252,137, 92,36,28,232,251,1,4,248,3,139,149,233,131,252,248,1,15,135,244,46,248,4, 141,91,4,15,130,244,252,248,5,255,15,183,67,252,254,141,156,253,131,233,248, 6,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238, 248,47,131,195,4,129,120,253,4,239,15,130,244,5,252,233,244,6,248,48,129, 120,253,4,239,252,233,244,4,248,49,131,252,235,4,137,206,137,252,233,139, 108,36,24,137,149,233,137,194,137,252,239,137,92,36,28,232,251,1,5,252,233, 244,3,248,50,131,252,235,4,139,108,36,24,137,149,233,137,252,239,139,115, 252,252,137,92,36,28,232,251,1,6,252,233,244,3,248,51,248,52,255,65,141,4, 199,252,233,244,247,248,53,248,54,65,141,4,199,141,44,252,234,149,252,233, 244,248,248,55,141,4,194,137,197,252,233,244,248,248,56,248,57,141,4,194, 248,1,141,44,252,234,248,2,141,12,202,68,15,182,67,252,252,137,206,137,193, 139,124,36,24,137,151,233,137,252,234,137,252,253,137,92,36,28,232,251,1, 7,139,149,233,133,192,15,132,244,44,248,46,137,193,41,208,137,89,252,244, 141,152,233,184,237,255,252,233,244,29,248,58,139,108,36,24,137,149,233,141, 52,194,137,252,239,137,92,36,28,232,251,1,8,139,149,233,255,133,192,15,133, 244,46,15,183,67,252,254,139,60,194,252,233,244,59,255,252,233,244,46,255, 248,60,141,76,202,8,248,30,137,76,36,4,137,4,36,131,252,233,8,139,108,36, 24,137,149,233,137,206,141,20,193,137,252,239,137,92,36,28,232,251,1,9,139, 149,233,139,76,36,4,139,4,36,139,105,252,248,131,192,1,65,57,215,15,132,244, 61,137,202,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131, 195,4,65,252,255,36,252,238,248,62,139,108,36,24,137,149,233,137,206,137, 252,239,137,92,36,28,232,251,1,10,139,149,233,139,67,252,252,15,182,204,15, 182,232,193,232,16,65,252,255,164,253,252,238,233,248,63,129,252,248,239, 15,130,244,64,139,106,4,129,252,253,239,15,131,244,64,139,90,252,252,137, 68,36,4,137,106,252,252,139,42,137,106,252,248,131,232,2,15,132,244,248,255, 137,209,248,1,131,193,8,72,139,41,72,137,105,252,248,131,232,1,15,133,244, 1,248,2,139,68,36,4,252,233,244,65,248,66,129,252,248,239,15,130,244,64,139, 106,4,137,252,233,193,252,249,15,131,252,249,252,254,15,132,244,249,184,237, 252,247,213,57,232,15,71,197,248,2,139,106,252,248,139,132,253,197,233,139, 90,252,252,199,66,252,252,237,137,66,252,248,252,233,244,67,248,3,184,237, 255,252,233,244,2,248,68,129,252,248,239,15,130,244,64,139,106,4,139,90,252, 252,129,252,253,239,15,133,244,252,248,1,139,42,139,173,233,248,2,133,252, 237,199,66,252,252,237,15,132,244,67,65,139,134,233,199,66,252,252,237,137, 106,252,248,139,141,233,35,136,233,105,201,239,255,3,141,233,248,3,129,185, 233,239,15,133,244,250,57,129,233,15,132,244,251,248,4,139,137,233,133,201, 15,133,244,3,252,233,244,67,248,5,139,105,4,129,252,253,239,15,132,244,67, 139,1,137,106,252,252,137,66,252,248,252,233,244,67,248,6,255,129,252,253, 239,15,132,244,1,129,252,253,239,15,135,244,254,129,252,253,239,15,134,244, 253,189,237,252,233,244,254,248,7,189,237,248,8,252,247,213,65,139,172,253, 174,233,252,233,244,2,248,69,129,252,248,239,255,15,130,244,64,129,122,253, 4,239,15,133,244,64,139,42,131,189,233,0,15,133,244,64,129,122,253,12,239, 15,133,244,64,139,66,8,137,133,233,139,90,252,252,199,66,252,252,237,137, 106,252,248,252,246,133,233,235,15,132,244,247,128,165,233,235,65,139,134, 233,255,65,137,174,233,137,133,233,248,1,252,233,244,67,248,70,129,252,248, 239,15,130,244,64,129,122,253,4,239,15,133,244,64,137,213,139,50,141,82,8, 139,124,36,24,232,251,1,11,137,252,234,72,139,40,139,90,252,252,72,137,106, 252,248,252,233,244,67,248,71,129,252,248,239,15,133,244,64,129,122,253,4, 239,15,131,244,64,255,252,242,15,16,2,252,233,244,72,248,73,129,252,248,239, 15,130,244,64,139,90,252,252,129,122,253,4,239,15,133,244,249,139,2,248,2, 199,66,252,252,237,137,66,252,248,252,233,244,67,248,3,129,122,253,4,239, 15,135,244,64,65,131,190,233,0,15,133,244,64,255,65,139,174,233,65,59,174, 233,15,130,244,247,232,244,74,248,1,139,108,36,24,137,149,233,137,92,36,28, 137,214,137,252,239,232,251,1,12,139,149,233,252,233,244,2,248,75,129,252, 248,239,15,130,244,64,15,132,244,248,248,1,129,122,253,4,239,15,133,244,64, 255,139,108,36,24,137,149,233,137,149,233,139,90,252,252,139,50,141,82,8, 137,252,239,137,92,36,28,232,251,1,13,139,149,233,133,192,15,132,244,249, 72,139,106,8,72,139,66,16,72,137,106,252,248,72,137,2,248,76,184,237,252, 233,244,77,248,2,199,66,12,237,252,233,244,1,248,3,199,66,252,252,237,252, 233,244,67,248,78,129,252,248,239,15,130,244,64,255,139,42,129,122,253,4, 239,15,133,244,64,255,131,189,233,0,15,133,244,64,255,139,106,252,248,139, 133,233,139,90,252,252,199,66,252,252,237,137,66,252,248,199,66,12,237,184, 237,252,233,244,77,248,79,129,252,248,239,15,130,244,64,129,122,253,4,239, 15,133,244,64,129,122,253,12,239,15,131,244,64,139,90,252,252,252,242,15, 16,66,8,72,189,237,237,102,72,15,110,205,252,242,15,88,193,252,242,15,45, 192,252,242,15,17,66,252,248,139,42,59,133,233,15,131,244,248,255,193,224, 3,3,133,233,248,1,129,120,253,4,239,15,132,244,80,72,139,40,72,137,42,252, 233,244,76,248,2,131,189,233,0,15,132,244,80,137,252,239,137,213,137,198, 232,251,1,14,137,252,234,133,192,15,133,244,1,248,80,184,237,252,233,244, 77,248,81,129,252,248,239,15,130,244,64,255,139,106,252,248,139,133,233,139, 90,252,252,199,66,252,252,237,137,66,252,248,15,87,192,252,242,15,17,66,8, 184,237,252,233,244,77,248,82,129,252,248,239,15,130,244,64,141,74,8,131, 232,1,187,237,248,1,65,15,182,174,233,193,252,237,235,131,229,1,1,252,235, 252,233,244,29,248,83,129,252,248,239,15,130,244,64,129,122,253,12,239,255, 15,133,244,64,139,106,4,137,106,12,199,66,4,237,139,42,139,90,8,137,106,8, 137,26,141,74,16,131,232,2,187,237,252,233,244,1,248,84,129,252,248,239,15, 130,244,64,139,42,139,90,252,252,137,92,36,28,137,44,36,129,122,253,4,239, 15,133,244,64,72,131,189,233,0,15,133,244,64,128,189,233,235,15,135,244,64, 255,139,141,233,15,132,244,247,59,141,233,15,132,244,64,248,1,141,92,193, 252,240,59,157,233,15,135,244,64,137,157,233,139,108,36,24,137,149,233,131, 194,8,137,149,233,141,108,194,232,72,41,221,57,203,15,132,244,249,248,2,72, 139,4,43,72,137,67,252,248,131,252,235,8,57,203,15,133,244,2,248,3,137,206, 139,60,36,232,244,26,255,65,199,134,233,237,139,108,36,24,139,28,36,139,149, 233,129,252,248,239,15,135,244,254,248,4,139,139,233,68,139,187,233,137,139, 233,68,137,252,251,41,203,15,132,244,252,141,4,26,193,252,235,3,59,133,233, 15,135,244,255,137,213,72,41,205,248,5,72,139,1,72,137,4,41,131,193,8,68, 57,252,249,15,133,244,5,248,6,141,67,2,199,66,252,252,237,248,7,255,139,92, 36,28,137,68,36,4,72,199,193,252,248,252,255,252,255,252,255,252,247,195, 237,15,132,244,14,252,233,244,15,248,8,199,66,252,252,237,139,139,233,131, 252,233,8,137,139,233,72,139,1,72,137,2,184,237,252,233,244,7,248,9,139,12, 36,68,137,185,233,137,222,137,252,239,232,251,1,0,139,28,36,139,149,233,252, 233,244,4,248,85,139,106,252,248,139,173,233,139,90,252,252,137,92,36,28, 137,44,36,72,131,189,233,0,255,15,133,244,64,128,189,233,235,15,135,244,64, 139,141,233,15,132,244,247,59,141,233,15,132,244,64,248,1,141,92,193,252, 248,59,157,233,15,135,244,64,137,157,233,139,108,36,24,137,149,233,137,149, 233,141,108,194,252,240,72,41,221,57,203,15,132,244,249,248,2,255,72,139, 4,43,72,137,67,252,248,131,252,235,8,57,203,15,133,244,2,248,3,137,206,139, 60,36,232,244,26,65,199,134,233,237,139,108,36,24,139,28,36,139,149,233,129, 252,248,239,15,135,244,254,248,4,139,139,233,68,139,187,233,137,139,233,68, 137,252,251,41,203,15,132,244,252,141,4,26,193,252,235,3,59,133,233,15,135, 244,255,255,137,213,72,41,205,248,5,72,139,1,72,137,4,41,131,193,8,68,57, 252,249,15,133,244,5,248,6,141,67,1,248,7,139,92,36,28,137,68,36,4,49,201, 252,247,195,237,15,132,244,14,252,233,244,15,248,8,137,222,137,252,239,232, 251,1,15,248,9,139,12,36,68,137,185,233,137,222,137,252,239,232,251,1,0,139, 28,36,139,149,233,252,233,244,4,248,86,139,108,36,24,72,252,247,133,233,237, 15,132,244,64,255,137,149,233,141,68,194,252,248,137,133,233,49,192,72,137, 133,233,176,235,136,133,233,252,233,244,17,248,87,248,88,139,90,252,252,221, 90,252,248,252,233,244,67,248,89,129,252,248,239,15,130,244,64,129,122,253, 4,239,15,131,244,64,252,242,15,16,2,72,184,237,237,255,102,72,15,110,200, 15,84,193,248,72,139,90,252,252,252,242,15,17,66,252,248,248,67,184,237,248, 77,137,68,36,4,248,65,252,247,195,237,15,133,244,253,248,5,56,67,252,255, 15,135,244,252,15,182,75,252,253,72,252,247,209,141,20,202,139,3,15,182,204, 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,6,199,68,194,252, 244,237,131,192,1,252,233,244,5,248,7,72,199,193,252,248,252,255,252,255, 252,255,252,233,244,15,248,90,129,122,253,4,239,255,15,131,244,64,252,242, 15,16,2,232,244,91,252,233,244,72,248,92,129,122,253,4,239,15,131,244,64, 252,242,15,16,2,232,244,93,252,233,244,72,248,94,129,252,248,239,15,130,244, 64,129,122,253,4,239,15,131,244,64,255,252,242,15,81,2,252,233,244,72,248, 95,129,252,248,239,15,133,244,64,129,122,253,4,239,15,131,244,64,217,252, 237,221,2,217,252,241,252,233,244,88,248,96,129,252,248,239,15,130,244,64, 129,122,253,4,239,15,131,244,64,217,252,236,221,2,217,252,241,252,233,244, 88,248,97,255,129,252,248,239,15,130,244,64,129,122,253,4,239,15,131,244, 64,221,2,232,244,98,252,233,244,88,248,99,129,252,248,239,15,130,244,64,129, 122,253,4,239,15,131,244,64,221,2,217,252,254,252,233,244,88,248,100,255, 129,252,248,239,15,130,244,64,129,122,253,4,239,15,131,244,64,221,2,217,252, 255,252,233,244,88,248,101,129,252,248,239,15,130,244,64,129,122,253,4,239, 15,131,244,64,221,2,217,252,242,221,216,252,233,244,88,248,102,129,252,248, 239,15,130,244,64,255,129,122,253,4,239,15,131,244,64,221,2,217,192,216,200, 217,232,222,225,217,252,250,217,252,243,252,233,244,88,248,103,129,252,248, 239,15,130,244,64,129,122,253,4,239,15,131,244,64,221,2,217,192,216,200,217, 232,222,225,217,252,250,217,201,217,252,243,252,233,244,88,248,104,129,252, 248,239,15,130,244,64,129,122,253,4,239,15,131,244,64,255,221,2,217,232,217, 252,243,252,233,244,88,248,105,129,252,248,239,15,130,244,64,129,122,253, 4,239,15,131,244,64,252,242,15,16,2,137,213,232,251,1,16,137,252,234,252, 233,244,72,248,106,129,252,248,239,15,130,244,64,129,122,253,4,239,15,131, 244,64,252,242,15,16,2,137,213,232,251,1,17,137,252,234,252,233,244,72,248, 107,255,129,252,248,239,15,130,244,64,129,122,253,4,239,15,131,244,64,252, 242,15,16,2,137,213,232,251,1,18,137,252,234,252,233,244,72,248,108,248,109, 129,252,248,239,15,130,244,64,129,122,253,4,239,15,131,244,64,252,242,15, 16,2,139,106,252,248,252,242,15,89,133,233,252,233,244,72,248,110,255,129, 252,248,239,15,130,244,64,129,122,253,4,239,15,131,244,64,129,122,253,12, 239,15,131,244,64,221,2,221,66,8,217,252,243,252,233,244,88,248,111,129,252, 248,239,15,130,244,64,129,122,253,4,239,15,131,244,64,129,122,253,12,239, 15,131,244,64,255,221,66,8,221,2,217,252,253,221,217,252,233,244,88,248,112, 129,252,248,239,15,130,244,64,139,106,4,129,252,253,239,15,131,244,64,139, 90,252,252,139,2,137,106,252,252,137,66,252,248,209,229,129,252,253,0,0,224, 252,255,15,131,244,249,9,232,15,132,244,249,184,252,254,3,0,0,129,252,253, 0,0,32,0,15,130,244,250,248,1,193,252,237,21,41,197,252,242,15,42,197,139, 106,252,252,129,229,252,255,252,255,15,128,129,205,0,0,224,63,137,106,252, 252,248,2,252,242,15,17,2,184,237,252,233,244,77,248,3,255,15,87,192,252, 233,244,2,248,4,252,242,15,16,2,72,189,237,237,102,72,15,110,205,252,242, 15,89,193,252,242,15,17,66,252,248,139,106,252,252,184,52,4,0,0,209,229,252, 233,244,1,248,113,129,252,248,239,15,130,244,64,129,122,253,4,239,15,131, 244,64,252,242,15,16,2,139,106,4,139,90,252,252,209,229,129,252,253,0,0,224, 252,255,15,132,244,250,15,40,224,232,244,114,252,242,15,92,224,248,1,252, 242,15,17,66,252,248,252,242,15,17,34,139,66,252,252,139,106,4,49,232,15, 136,244,249,248,2,255,184,237,252,233,244,77,248,3,129,252,245,0,0,0,128, 137,106,4,252,233,244,2,248,4,15,87,228,252,233,244,1,248,115,129,252,248, 239,15,130,244,64,129,122,253,4,239,15,131,244,64,129,122,253,12,239,15,131, 244,64,221,66,8,221,2,248,1,255,217,252,248,223,224,158,15,138,244,1,221, 217,252,233,244,88,248,116,129,252,248,239,15,130,244,64,129,122,253,4,239, 15,131,244,64,129,122,253,12,239,15,131,244,64,252,242,15,16,2,252,242,15, 16,74,8,232,244,117,252,233,244,72,248,118,185,2,0,0,0,129,122,253,4,239, 255,15,131,244,64,252,242,15,16,2,248,5,57,193,15,131,244,72,129,124,253, 202,252,252,239,15,131,244,64,248,6,252,242,15,16,76,202,252,248,248,7,252, 242,15,93,193,131,193,1,252,233,244,5,248,119,185,2,0,0,0,129,122,253,4,239, 15,131,244,64,252,242,15,16,2,248,5,57,193,15,131,244,72,129,124,253,202, 252,252,239,255,15,131,244,64,248,6,252,242,15,16,76,202,252,248,248,7,252, 242,15,95,193,131,193,1,252,233,244,5,248,120,129,252,248,239,15,130,244, 64,129,122,253,4,239,15,133,244,64,139,42,252,242,15,42,133,233,252,233,244, 72,248,121,129,252,248,239,15,133,244,64,255,129,122,253,4,239,15,133,244, 64,139,42,139,90,252,252,131,189,233,1,15,130,244,80,15,182,173,233,252,242, 15,42,197,252,233,244,72,248,122,65,139,174,233,65,59,174,233,15,130,244, 247,232,244,74,248,1,129,252,248,239,15,133,244,64,255,129,122,253,4,239, 15,131,244,64,252,242,15,44,42,129,252,253,252,255,0,0,0,15,135,244,64,137, 108,36,4,199,68,36,8,1,0,0,0,72,141,68,36,4,248,123,139,108,36,24,137,149, 233,139,84,36,8,72,137,198,137,252,239,137,92,36,28,232,251,1,19,139,149, 233,139,90,252,252,199,66,252,252,237,137,66,252,248,252,233,244,67,248,124, 65,139,174,233,65,59,174,233,15,130,244,247,232,244,74,248,1,199,68,36,4, 252,255,252,255,252,255,252,255,129,252,248,239,255,15,130,244,64,15,134, 244,247,129,122,253,20,239,15,131,244,64,252,242,15,44,106,16,137,108,36, 4,248,1,129,122,253,4,239,15,133,244,64,129,122,253,12,239,15,131,244,64, 139,42,137,108,36,8,139,173,233,252,242,15,44,74,8,139,68,36,4,57,197,15, 130,244,251,248,2,133,201,15,142,244,253,248,3,255,139,108,36,8,41,200,15, 140,244,125,141,172,253,13,233,131,192,1,248,4,137,68,36,8,137,232,252,233, 244,123,248,5,15,140,244,252,141,68,40,1,252,233,244,2,248,6,137,232,252, 233,244,2,248,7,15,132,244,254,1,252,233,131,193,1,15,143,244,3,248,8,255, 185,1,0,0,0,252,233,244,3,248,125,49,192,252,233,244,4,248,126,65,139,174, 233,65,59,174,233,15,130,244,247,232,244,74,248,1,129,252,248,239,15,133, 244,64,129,122,253,4,239,15,133,244,64,129,122,253,12,239,255,139,42,15,131, 244,64,252,242,15,44,66,8,133,192,15,142,244,125,131,189,233,1,15,130,244, 125,15,133,244,127,65,57,134,233,15,130,244,127,15,182,141,233,65,139,174, 233,137,68,36,8,248,1,136,77,0,131,197,1,131,232,1,15,133,244,1,65,139,134, 233,252,233,244,123,248,128,255,129,252,248,239,15,130,244,64,65,139,174, 233,65,59,174,233,15,130,244,247,232,244,74,248,1,129,122,253,4,239,15,133, 244,64,139,42,139,133,233,133,192,15,132,244,125,65,57,134,233,15,130,244, 129,129,197,239,255,137,92,36,4,137,68,36,8,65,139,158,233,248,1,15,182,77, 0,131,197,1,131,232,1,136,12,3,15,133,244,1,137,216,139,92,36,4,252,233,244, 123,248,130,129,252,248,239,15,130,244,64,65,139,174,233,65,59,174,233,15, 130,244,247,232,244,74,248,1,129,122,253,4,239,15,133,244,64,255,139,42,139, 133,233,65,57,134,233,15,130,244,129,129,197,239,137,92,36,4,137,68,36,8, 65,139,158,233,252,233,244,249,248,1,15,182,76,5,0,131,252,249,65,15,130, 244,248,131,252,249,90,15,135,244,248,131,252,241,32,248,2,136,12,3,248,3, 131,232,1,15,137,244,1,137,216,139,92,36,4,252,233,244,123,248,131,255,129, 252,248,239,15,130,244,64,65,139,174,233,65,59,174,233,15,130,244,247,232, 244,74,248,1,129,122,253,4,239,15,133,244,64,139,42,139,133,233,65,57,134, 233,15,130,244,129,129,197,239,137,92,36,4,137,68,36,8,65,139,158,233,252, 233,244,249,248,1,255,15,182,76,5,0,131,252,249,97,15,130,244,248,131,252, 249,122,15,135,244,248,131,252,241,32,248,2,136,12,3,248,3,131,232,1,15,137, 244,1,137,216,139,92,36,4,252,233,244,123,248,132,129,252,248,239,15,130, 244,64,129,122,253,4,239,15,133,244,64,137,213,139,58,232,251,1,20,137,252, 234,252,242,15,42,192,252,233,244,72,248,133,255,129,252,248,239,15,130,244, 64,129,122,253,4,239,15,131,244,64,252,242,15,16,2,72,189,237,237,102,72, 15,110,205,252,242,15,88,193,102,15,126,197,248,2,252,233,244,134,248,135, 129,252,248,239,15,130,244,64,72,189,237,237,102,72,15,110,205,129,122,253, 4,239,15,131,244,64,255,252,242,15,16,2,252,242,15,88,193,102,15,126,197, 248,2,137,68,36,4,141,68,194,252,240,248,1,57,208,15,134,244,134,129,120, 253,4,239,15,131,244,136,252,242,15,16,0,252,242,15,88,193,102,15,126,193, 33,205,131,232,8,252,233,244,1,248,137,129,252,248,239,15,130,244,64,72,189, 237,237,102,72,15,110,205,129,122,253,4,239,15,131,244,64,252,242,15,16,2, 252,242,15,88,193,102,15,126,197,248,2,137,68,36,4,141,68,194,252,240,248, 1,255,57,208,15,134,244,134,129,120,253,4,239,15,131,244,136,252,242,15,16, 0,252,242,15,88,193,102,15,126,193,9,205,131,232,8,252,233,244,1,248,138, 129,252,248,239,15,130,244,64,72,189,237,237,102,72,15,110,205,129,122,253, 4,239,15,131,244,64,252,242,15,16,2,252,242,15,88,193,102,15,126,197,248, 2,137,68,36,4,141,68,194,252,240,248,1,57,208,15,134,244,134,255,129,120, 253,4,239,15,131,244,136,252,242,15,16,0,252,242,15,88,193,102,15,126,193, 49,205,131,232,8,252,233,244,1,248,139,129,252,248,239,15,130,244,64,129, 122,253,4,239,15,131,244,64,252,242,15,16,2,72,189,237,237,102,72,15,110, 205,252,242,15,88,193,102,15,126,197,248,2,15,205,252,233,244,134,248,140, 129,252,248,239,15,130,244,64,255,129,122,253,4,239,15,131,244,64,252,242, 15,16,2,72,189,237,237,102,72,15,110,205,252,242,15,88,193,102,15,126,197, 248,2,252,247,213,248,134,252,242,15,42,197,252,233,244,72,248,136,139,68, 36,4,252,233,244,64,248,141,129,252,248,239,15,130,244,64,129,122,253,4,239, 15,131,244,64,129,122,253,12,239,255,15,131,244,64,252,242,15,16,2,252,242, 15,16,74,8,72,189,237,237,102,72,15,110,213,252,242,15,88,194,252,242,15, 88,202,102,15,126,197,102,15,126,201,211,229,252,233,244,134,248,142,129, 252,248,239,15,130,244,64,129,122,253,4,239,15,131,244,64,129,122,253,12, 239,15,131,244,64,252,242,15,16,2,252,242,15,16,74,8,72,189,237,237,102,72, 15,110,213,252,242,15,88,194,252,242,15,88,202,102,15,126,197,102,15,126, 201,211,252,237,252,233,244,134,248,143,255,129,252,248,239,15,130,244,64, 129,122,253,4,239,15,131,244,64,129,122,253,12,239,15,131,244,64,252,242, 15,16,2,252,242,15,16,74,8,72,189,237,237,102,72,15,110,213,252,242,15,88, 194,252,242,15,88,202,102,15,126,197,102,15,126,201,211,252,253,252,233,244, 134,248,144,129,252,248,239,15,130,244,64,129,122,253,4,239,15,131,244,64, 255,129,122,253,12,239,15,131,244,64,252,242,15,16,2,252,242,15,16,74,8,72, 189,237,237,102,72,15,110,213,252,242,15,88,194,252,242,15,88,202,102,15, 126,197,102,15,126,201,211,197,252,233,244,134,248,145,129,252,248,239,15, 130,244,64,129,122,253,4,239,15,131,244,64,129,122,253,12,239,15,131,244, 64,252,242,15,16,2,252,242,15,16,74,8,72,189,237,237,102,72,15,110,213,252, 242,15,88,194,252,242,15,88,202,102,15,126,197,102,15,126,201,211,205,252, 233,244,134,248,127,255,184,237,252,233,244,64,248,129,184,237,248,64,139, 108,36,24,139,90,252,252,137,92,36,28,137,149,233,141,68,194,252,248,141, 136,233,137,133,233,139,66,252,248,59,141,233,15,135,244,251,137,252,239, 252,255,144,233,139,149,233,133,192,15,143,244,77,248,1,139,141,233,41,209, 193,252,233,3,133,192,141,65,1,139,106,252,248,15,133,244,34,255,139,157, 233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,255,36,252,238,248, 34,137,209,252,247,195,237,15,133,244,249,15,182,107,252,253,72,252,247,213, 141,20,252,234,252,233,244,29,248,3,137,221,131,229,252,248,41,252,234,252, 233,244,29,248,5,190,237,137,252,239,232,251,1,0,139,149,233,49,192,252,233, 244,1,248,74,93,72,137,108,36,8,139,108,36,24,137,92,36,28,137,149,233,141, 68,194,252,248,137,252,239,137,133,233,232,251,1,21,139,149,233,139,133,233, 255,41,208,193,232,3,131,192,1,72,139,108,36,8,85,195,248,146,65,15,182,134, 233,168,235,15,133,244,251,168,235,15,133,244,247,168,235,15,132,244,247, 65,252,255,142,233,252,233,244,247,248,147,65,15,182,134,233,168,235,15,133, 244,251,252,233,244,247,248,148,255,65,15,182,134,233,168,235,15,133,244, 251,168,235,15,132,244,251,65,252,255,142,233,15,132,244,247,168,235,15,132, 244,251,248,1,139,108,36,24,137,149,233,137,222,137,252,239,232,251,1,22, 248,3,139,149,233,248,4,15,182,75,252,253,248,5,15,182,107,252,252,15,183, 67,252,254,65,252,255,164,253,252,238,233,248,149,255,131,195,4,139,77,232, 137,76,36,4,252,233,244,4,248,150,139,106,252,248,139,173,233,15,182,133, 233,141,4,194,139,108,36,24,137,149,233,137,133,233,137,222,65,141,190,233, 73,137,174,233,137,92,36,28,232,251,1,23,252,233,244,3,248,151,137,92,36, 28,252,233,244,247,248,152,137,92,36,28,131,203,1,248,1,141,68,194,252,248, 139,108,36,24,137,149,233,137,133,233,137,222,137,252,239,232,251,1,24,199, 68,36,28,0,0,0,0,131,227,252,254,139,149,233,72,137,193,139,133,233,255,41, 208,72,137,205,15,182,75,252,253,193,232,3,131,192,1,252,255,229,248,153, 65,85,65,84,65,83,65,82,65,81,65,80,87,86,85,72,141,108,36,88,85,83,82,81, 80,15,182,69,252,248,138,101,252,240,76,137,125,252,248,76,137,117,252,240, 68,139,117,0,65,139,142,233,65,199,134,233,237,65,137,134,233,65,137,142, 233,72,129,252,236,239,72,131,197,128,252,242,68,15,17,125,252,248,252,242, 68,15,17,117,252,240,252,242,68,15,17,109,232,252,242,68,15,17,101,224,252, 242,68,15,17,93,216,252,242,68,15,17,85,208,252,242,68,15,17,77,200,252,242, 68,15,17,69,192,252,242,15,17,125,184,252,242,15,17,117,176,252,242,15,17, 109,168,252,242,15,17,101,160,252,242,15,17,93,152,252,242,15,17,85,144,252, 242,15,17,77,136,252,242,15,17,69,128,65,139,174,233,65,139,150,233,73,137, 174,233,65,199,134,233,0,0,0,0,137,149,233,72,137,230,65,141,190,233,232, 251,1,25,72,139,141,233,72,129,225,239,72,137,204,137,169,233,139,149,233, 139,153,233,252,233,244,247,248,154,255,72,131,196,16,248,1,76,139,108,36, 8,76,139,36,36,133,192,15,136,244,249,137,68,36,4,68,139,122,252,248,69,139, 191,233,69,139,191,233,65,199,134,233,0,0,0,0,65,199,134,233,237,139,3,15, 182,204,15,182,232,131,195,4,193,232,16,129,252,253,239,15,130,244,248,139, 68,36,4,248,2,65,252,255,36,252,238,248,3,252,247,216,137,252,239,137,198, 232,251,1,1,248,91,248,155,72,184,237,237,102,72,15,110,208,72,184,237,237, 102,72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,255, 102,15,85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237, 237,102,72,15,110,208,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200, 15,40,193,248,1,195,248,93,248,156,72,184,237,237,102,72,15,110,208,72,184, 237,237,102,72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244, 247,102,15,85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184, 237,237,102,72,15,110,208,252,242,15,194,193,6,102,15,84,194,252,242,15,92, 200,15,40,193,248,1,195,248,114,248,157,72,184,237,237,102,72,15,110,208, 72,184,237,237,255,102,72,15,110,216,15,40,200,102,15,84,202,102,15,46,217, 15,134,244,247,102,15,85,208,15,40,193,252,242,15,88,203,252,242,15,92,203, 72,184,237,237,102,72,15,110,216,252,242,15,194,193,1,102,15,84,195,252,242, 15,92,200,102,15,86,202,15,40,193,248,1,195,248,158,15,40,232,252,242,15, 94,193,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216, 15,40,224,102,15,84,226,102,15,46,220,15,134,244,247,102,15,85,208,252,242, 15,88,227,252,242,15,92,227,102,15,86,226,72,184,237,237,102,72,15,110,208, 252,242,15,194,196,1,102,15,84,194,252,242,15,92,224,15,40,197,252,242,15, 89,204,252,242,15,92,193,195,248,1,252,242,15,89,200,15,40,197,252,242,15, 92,193,195,248,159,252,242,15,17,68,36,252,248,217,232,221,68,36,252,248, 217,252,241,221,92,36,252,248,252,242,15,16,68,36,252,248,195,248,98,217, 252,234,222,201,248,160,217,84,36,252,248,129,124,36,252,248,0,0,128,127, 15,132,244,247,255,129,124,36,252,248,0,0,128,252,255,15,132,244,248,248, 161,217,192,217,252,252,220,252,233,217,201,217,252,240,217,232,222,193,217, 252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,248,117,248,162,252, 242,15,45,193,252,242,15,42,208,102,15,46,202,15,133,244,254,15,138,244,255, 248,163,131,252,248,1,15,142,244,252,248,1,169,1,0,0,0,15,133,244,248,252, 242,15,89,192,209,232,252,233,244,1,248,2,255,209,232,15,132,244,251,15,40, 200,248,3,252,242,15,89,192,209,232,15,132,244,250,15,131,244,3,252,242,15, 89,200,252,233,244,3,248,4,252,242,15,89,193,248,5,195,248,6,15,132,244,5, 15,130,244,253,252,247,216,232,244,1,72,184,237,237,255,102,72,15,110,200, 252,242,15,94,200,15,40,193,195,248,7,72,184,237,237,102,72,15,110,192,195, 248,8,102,72,15,126,200,72,209,224,72,193,192,12,72,61,252,254,15,0,0,15, 132,244,248,102,72,15,126,192,72,209,224,15,132,244,250,72,193,192,12,72, 61,252,254,15,0,0,15,132,244,251,252,242,15,17,76,36,252,240,252,242,15,17, 68,36,252,248,221,68,36,252,240,221,68,36,252,248,217,252,241,217,192,217, 252,252,220,252,233,217,201,217,252,240,217,232,222,193,217,252,253,221,217, 221,92,36,252,248,252,242,15,16,68,36,252,248,195,248,9,72,184,237,237,102, 72,15,110,208,102,15,46,194,15,132,244,247,15,40,193,248,1,195,248,2,72,184, 237,237,102,72,15,110,208,102,15,84,194,72,184,237,237,255,102,72,15,110, 208,102,15,46,194,15,132,244,1,102,15,80,193,15,87,192,136,196,15,146,208, 48,224,15,133,244,1,248,3,72,184,237,237,102,72,15,110,192,195,248,4,102, 15,80,193,133,192,15,133,244,3,15,87,192,195,248,5,102,15,80,193,133,192, 15,132,244,3,15,87,192,195,248,164,131,252,255,1,15,130,244,91,15,132,244, 93,131,252,255,3,15,130,244,114,255,15,135,244,248,252,242,15,81,192,195, 248,2,252,242,15,17,68,36,252,248,221,68,36,252,248,131,252,255,5,15,135, 244,248,15,132,244,247,232,244,98,252,233,244,253,248,1,232,244,160,252,233, 244,253,248,2,131,252,255,7,15,132,244,247,15,135,244,248,255,217,252,237, 217,201,217,252,241,252,233,244,253,248,1,217,232,217,201,217,252,241,252, 233,244,253,248,2,131,252,255,9,15,132,244,247,15,135,244,248,217,252,236, 217,201,217,252,241,252,233,244,253,248,1,217,252,254,252,233,244,253,248, 2,131,252,255,11,15,132,244,247,15,135,244,255,255,217,252,255,252,233,244, 253,248,1,217,252,242,221,216,248,7,221,92,36,252,248,252,242,15,16,68,36, 252,248,195,248,9,204,248,165,131,252,255,1,15,132,244,247,15,135,244,248, 252,242,15,88,193,195,248,1,252,242,15,92,193,195,248,2,131,252,255,3,15, 132,244,247,15,135,244,248,252,242,15,89,193,195,248,1,252,242,15,94,193, 195,248,2,131,252,255,5,15,130,244,158,255,15,132,244,117,131,252,255,7,15, 132,244,247,15,135,244,248,72,184,237,237,102,72,15,110,200,15,87,193,195, 248,1,72,184,237,237,102,72,15,110,200,15,84,193,195,248,2,131,252,255,9, 15,135,244,248,252,242,15,17,68,36,252,248,252,242,15,17,76,36,252,240,221, 68,36,252,248,221,68,36,252,240,15,132,244,247,217,252,243,248,7,221,92,36, 252,248,252,242,15,16,68,36,252,248,195,248,1,217,201,217,252,253,221,217, 252,233,244,7,248,2,255,131,252,255,11,15,132,244,247,15,135,244,255,252, 242,15,93,193,195,248,1,252,242,15,95,193,195,248,9,204,248,166,137,252,248, 83,15,162,137,6,137,94,4,137,78,8,137,86,12,91,195,248,167,255,204,255,204, 248,168,83,65,87,65,86,72,131,252,236,40,68,141,181,233,139,157,233,15,183, 192,137,131,233,72,137,187,233,72,137,179,233,72,137,147,233,72,137,139,233, 252,242,15,17,131,233,252,242,15,17,139,233,252,242,15,17,147,233,252,242, 15,17,155,233,72,141,132,253,36,233,76,137,131,233,76,137,139,233,252,242, 15,17,163,233,252,242,15,17,171,233,252,242,15,17,179,233,252,242,15,17,187, 233,72,137,131,233,255,72,137,230,137,92,36,28,137,223,232,251,1,26,65,199, 134,233,237,139,144,233,139,128,233,41,208,139,106,252,248,193,232,3,131, 192,1,139,157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,255,36, 252,238,248,33,139,76,36,24,65,139,158,233,72,137,139,233,137,145,233,137, 169,233,137,223,137,198,232,251,1,27,72,139,131,233,252,242,15,16,131,233, 252,233,244,17,248,169,85,72,137,229,83,72,137,252,251,139,131,233,72,41, 196,15,182,139,233,131,252,233,1,15,136,244,248,248,1,255,72,139,132,253, 203,233,72,137,132,253,204,233,131,252,233,1,15,137,244,1,248,2,15,182,131, 233,72,139,187,233,72,139,179,233,72,139,147,233,72,139,139,233,76,139,131, 233,76,139,139,233,133,192,15,132,244,251,15,40,131,233,15,40,139,233,15, 40,147,233,15,40,155,233,131,252,248,4,15,134,244,251,255,15,40,163,233,15, 40,171,233,15,40,179,233,15,40,187,233,248,5,252,255,147,233,72,137,131,233, 15,41,131,233,72,137,147,233,15,41,139,233,72,139,93,252,248,201,195,255, 129,124,253,202,4,239,15,131,244,45,129,124,253,194,4,239,15,131,244,45,248, 1,252,242,15,16,4,194,248,2,131,195,4,102,15,46,4,202,248,3,255,15,135,244, 247,255,15,130,244,247,255,15,131,244,247,255,15,183,67,252,254,141,156,253, 131,233,248,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255, 36,252,238,255,139,108,194,4,131,195,4,255,129,252,253,239,15,131,244,251, 129,124,253,202,4,239,15,131,244,251,248,1,252,242,15,16,4,202,248,2,102, 15,46,4,194,248,4,255,15,138,244,248,15,133,244,248,255,15,138,244,248,15, 132,244,247,255,248,1,15,183,67,252,254,141,156,253,131,233,248,2,255,248, 2,15,183,67,252,254,141,156,253,131,233,248,1,255,252,233,244,9,255,248,5, 129,252,253,239,15,132,244,50,129,124,253,202,4,239,15,132,244,50,57,108, 202,4,15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193, 15,132,244,1,129,252,253,239,15,135,244,2,129,252,253,239,15,130,244,2,255, 139,169,233,133,252,237,15,132,244,2,252,246,133,233,235,15,133,244,2,255, 49,252,237,255,189,1,0,0,0,255,252,233,244,49,255,248,3,129,252,253,239,255, 15,133,244,9,255,252,233,244,50,255,72,252,247,208,139,108,202,4,131,195, 4,129,252,253,239,15,133,244,249,139,12,202,65,59,12,135,255,139,108,202, 4,131,195,4,255,129,252,253,239,15,131,244,249,248,1,252,242,65,15,16,4,199, 248,2,102,15,46,4,202,248,4,255,72,252,247,208,139,108,202,4,131,195,4,57, 197,255,15,133,244,249,15,183,67,252,254,141,156,253,131,233,248,2,139,3, 15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3,129, 252,253,239,15,133,244,2,252,233,244,50,255,15,132,244,248,129,252,253,239, 15,132,244,50,15,183,67,252,254,141,156,253,131,233,248,2,139,3,15,182,204, 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,139,108,194,4,131, 195,4,129,252,253,239,255,137,108,202,4,139,44,194,137,44,202,255,72,139, 44,194,72,137,44,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, 252,255,36,252,238,255,49,252,237,129,124,253,194,4,239,129,213,239,137,108, 202,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 238,255,129,124,253,194,4,239,15,131,244,55,252,242,15,16,4,194,72,184,237, 237,102,72,15,110,200,15,87,193,252,242,15,17,4,202,139,3,15,182,204,15,182, 232,131,195,4,193,232,16,65,252,255,36,252,238,255,129,124,253,194,4,239, 15,133,244,248,139,4,194,15,87,192,252,242,15,42,128,233,248,1,252,242,15, 17,4,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 238,248,2,129,124,253,194,4,239,15,133,244,58,139,60,194,255,139,175,233, 131,252,253,0,15,133,244,255,248,3,255,248,59,137,213,232,251,1,20,252,242, 15,42,192,137,252,234,15,182,75,252,253,252,233,244,1,255,248,9,252,246,133, 233,235,15,133,244,3,252,233,244,58,255,15,182,252,236,15,182,192,255,129, 124,253,252,234,4,239,15,131,244,52,252,242,15,16,4,252,234,252,242,65,15, 88,4,199,255,129,124,253,252,234,4,239,15,131,244,54,252,242,65,15,16,4,199, 252,242,15,88,4,252,234,255,129,124,253,252,234,4,239,15,131,244,57,129,124, 253,194,4,239,15,131,244,57,252,242,15,16,4,252,234,252,242,15,88,4,194,255, 129,124,253,252,234,4,239,15,131,244,52,252,242,15,16,4,252,234,252,242,65, 15,92,4,199,255,129,124,253,252,234,4,239,15,131,244,54,252,242,65,15,16, 4,199,252,242,15,92,4,252,234,255,129,124,253,252,234,4,239,15,131,244,57, 129,124,253,194,4,239,15,131,244,57,252,242,15,16,4,252,234,252,242,15,92, 4,194,255,129,124,253,252,234,4,239,15,131,244,52,252,242,15,16,4,252,234, 252,242,65,15,89,4,199,255,129,124,253,252,234,4,239,15,131,244,54,252,242, 65,15,16,4,199,252,242,15,89,4,252,234,255,129,124,253,252,234,4,239,15,131, 244,57,129,124,253,194,4,239,15,131,244,57,252,242,15,16,4,252,234,252,242, 15,89,4,194,255,129,124,253,252,234,4,239,15,131,244,52,252,242,15,16,4,252, 234,252,242,65,15,94,4,199,255,129,124,253,252,234,4,239,15,131,244,54,252, 242,65,15,16,4,199,252,242,15,94,4,252,234,255,129,124,253,252,234,4,239, 15,131,244,57,129,124,253,194,4,239,15,131,244,57,252,242,15,16,4,252,234, 252,242,15,94,4,194,255,129,124,253,252,234,4,239,15,131,244,52,252,242,15, 16,4,252,234,252,242,65,15,16,12,199,255,129,124,253,252,234,4,239,15,131, 244,54,252,242,65,15,16,4,199,252,242,15,16,12,252,234,255,129,124,253,252, 234,4,239,15,131,244,57,129,124,253,194,4,239,15,131,244,57,252,242,15,16, 4,252,234,252,242,15,16,12,194,255,248,170,232,244,158,252,242,15,17,4,202, 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255, 252,233,244,170,255,232,244,117,252,242,15,17,4,202,139,3,15,182,204,15,182, 232,131,195,4,193,232,16,65,252,255,36,252,238,255,15,182,252,236,15,182, 192,139,124,36,24,137,151,233,141,52,194,137,194,41,252,234,248,37,137,252, 253,137,92,36,28,232,251,1,28,139,149,233,133,192,15,133,244,46,15,182,107, 252,255,15,182,75,252,253,72,139,4,252,234,72,137,4,202,139,3,15,182,204, 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,252,247,208, 65,139,4,135,199,68,202,4,237,137,4,202,139,3,15,182,204,15,182,232,131,195, 4,193,232,16,65,252,255,36,252,238,255,15,191,192,252,242,15,42,192,252,242, 15,17,4,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36, 252,238,255,252,242,65,15,16,4,199,252,242,15,17,4,202,139,3,15,182,204,15, 182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,252,247,208,137, 68,202,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, 238,255,141,76,202,12,141,68,194,4,189,237,137,105,252,248,248,1,137,41,131, 193,8,57,193,15,134,244,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16, 65,252,255,36,252,238,255,139,106,252,248,139,172,253,133,233,139,173,233, 72,139,69,0,72,137,4,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16, 65,252,255,36,252,238,255,139,106,252,248,139,172,253,141,233,128,189,233, 0,139,173,233,139,12,194,139,68,194,4,137,77,0,137,69,4,15,132,244,247,252, 246,133,233,235,15,133,244,248,248,1,139,3,15,182,204,15,182,232,131,195, 4,193,232,16,65,252,255,36,252,238,248,2,129,232,239,129,252,248,239,15,134, 244,1,252,246,129,233,235,15,132,244,1,137,252,238,137,213,65,141,190,233, 255,232,251,1,29,137,252,234,252,233,244,1,255,72,252,247,208,139,106,252, 248,139,172,253,141,233,65,139,12,135,139,133,233,137,8,199,64,4,237,252, 246,133,233,235,15,133,244,248,248,1,139,3,15,182,204,15,182,232,131,195, 4,193,232,16,65,252,255,36,252,238,248,2,252,246,129,233,235,15,132,244,1, 128,189,233,0,15,132,244,1,137,213,137,198,65,141,190,233,232,251,1,29,137, 252,234,252,233,244,1,255,139,106,252,248,252,242,65,15,16,4,199,139,172, 253,141,233,139,141,233,252,242,15,17,1,139,3,15,182,204,15,182,232,131,195, 4,193,232,16,65,252,255,36,252,238,255,72,252,247,208,139,106,252,248,139, 172,253,141,233,139,141,233,137,65,4,139,3,15,182,204,15,182,232,131,195, 4,193,232,16,65,252,255,36,252,238,255,141,156,253,131,233,139,108,36,24, 131,189,233,0,15,132,244,247,137,149,233,141,52,202,137,252,239,232,251,1, 30,139,149,233,248,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, 252,255,36,252,238,255,72,252,247,208,139,108,36,24,137,149,233,139,82,252, 248,65,139,52,135,137,252,239,137,92,36,28,232,251,1,31,139,149,233,15,182, 75,252,253,137,4,202,199,68,202,4,237,139,3,15,182,204,15,182,232,131,195, 4,193,232,16,65,252,255,36,252,238,255,139,108,36,24,137,149,233,65,139,142, 233,65,59,142,233,137,92,36,28,15,131,244,251,248,1,137,194,37,252,255,7, 0,0,193,252,234,11,61,252,255,7,0,0,15,132,244,249,248,2,137,252,239,137, 198,232,251,1,32,139,149,233,15,182,75,252,253,137,4,202,199,68,202,4,237, 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248, 3,184,1,8,0,0,252,233,244,2,248,5,137,252,239,232,251,1,33,15,183,67,252, 254,252,233,244,1,255,72,252,247,208,139,108,36,24,65,139,142,233,137,92, 36,28,65,59,142,233,137,149,233,15,131,244,249,248,2,65,139,52,135,137,252, 239,232,251,1,34,139,149,233,15,182,75,252,253,137,4,202,199,68,202,4,237, 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248, 3,137,252,239,232,251,1,33,15,183,67,252,254,72,252,247,208,252,233,244,2, 255,72,252,247,208,139,106,252,248,139,173,233,65,139,4,135,252,233,244,171, 255,72,252,247,208,139,106,252,248,139,173,233,65,139,4,135,252,233,244,172, 255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,40,139, 44,252,234,129,124,253,194,4,239,15,131,244,251,252,242,15,16,4,194,252,242, 15,45,192,252,242,15,42,200,102,15,46,193,15,133,244,40,59,133,233,15,131, 244,40,193,224,3,3,133,233,129,120,253,4,239,15,132,244,248,72,139,40,72, 137,44,202,248,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 255,36,252,238,248,2,131,189,233,0,15,132,244,249,255,139,141,233,252,246, 129,233,235,15,132,244,40,15,182,75,252,253,248,3,199,68,202,4,237,252,233, 244,1,248,5,129,124,253,194,4,239,15,133,244,40,139,4,194,252,233,244,171, 255,15,182,252,236,15,182,192,72,252,247,208,65,139,4,135,129,124,253,252, 234,4,239,15,133,244,38,139,44,252,234,248,171,139,141,233,35,136,233,105, 201,239,3,141,233,248,1,129,185,233,239,15,133,244,250,57,129,233,15,133, 244,250,129,121,253,4,239,15,132,244,251,15,182,67,252,253,72,139,41,72,137, 44,194,248,2,255,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 255,36,252,238,248,3,15,182,67,252,253,199,68,194,4,237,252,233,244,2,248, 4,139,137,233,133,201,15,133,244,1,248,5,139,141,233,133,201,15,132,244,3, 252,246,129,233,235,15,133,244,3,252,233,244,38,255,15,182,252,236,15,182, 192,129,124,253,252,234,4,239,15,133,244,39,139,44,252,234,59,133,233,15, 131,244,39,193,224,3,3,133,233,129,120,253,4,239,15,132,244,248,72,139,40, 72,137,44,202,248,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 255,36,252,238,248,2,131,189,233,0,15,132,244,249,139,141,233,252,246,129, 233,235,15,132,244,39,255,15,182,75,252,253,248,3,199,68,202,4,237,252,233, 244,1,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244, 43,139,44,252,234,129,124,253,194,4,239,15,131,244,251,252,242,15,16,4,194, 252,242,15,45,192,252,242,15,42,200,102,15,46,193,15,133,244,43,59,133,233, 15,131,244,43,193,224,3,3,133,233,129,120,253,4,239,15,132,244,249,248,1, 252,246,133,233,235,15,133,244,253,248,2,255,72,139,44,202,72,137,40,139, 3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3, 131,189,233,0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,43, 15,182,75,252,253,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244,43, 139,4,194,252,233,244,172,248,7,128,165,233,235,255,65,139,142,233,65,137, 174,233,137,141,233,15,182,75,252,253,252,233,244,2,255,15,182,252,236,15, 182,192,72,252,247,208,65,139,4,135,129,124,253,252,234,4,239,15,133,244, 41,139,44,252,234,248,172,139,141,233,35,136,233,105,201,239,198,133,233, 0,3,141,233,248,1,129,185,233,239,15,133,244,251,57,129,233,15,133,244,251, 129,121,253,4,239,15,132,244,250,248,2,255,252,246,133,233,235,15,133,244, 253,248,3,15,182,67,252,253,72,139,44,194,72,137,41,139,3,15,182,204,15,182, 232,131,195,4,193,232,16,65,252,255,36,252,238,248,4,131,189,233,0,15,132, 244,2,137,12,36,139,141,233,252,246,129,233,235,15,132,244,41,139,12,36,252, 233,244,2,248,5,139,137,233,133,201,15,133,244,1,255,139,141,233,133,201, 15,132,244,252,252,246,129,233,235,15,132,244,41,248,6,137,4,36,199,68,36, 4,237,137,108,36,8,139,124,36,24,137,151,233,72,141,20,36,137,252,238,137, 252,253,137,92,36,28,232,251,1,35,139,149,233,139,108,36,8,137,193,252,233, 244,2,248,7,128,165,233,235,65,139,134,233,65,137,174,233,137,133,233,252, 233,244,3,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133, 244,42,139,44,252,234,59,133,233,15,131,244,42,193,224,3,3,133,233,129,120, 253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133,244,253,248,2,72, 139,12,202,72,137,8,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, 255,36,252,238,248,3,131,189,233,0,15,132,244,1,255,139,141,233,252,246,129, 233,235,15,132,244,42,15,182,75,252,253,252,233,244,1,248,7,128,165,233,235, 65,139,142,233,65,137,174,233,137,141,233,15,182,75,252,253,252,233,244,2, 255,68,137,60,36,69,139,60,199,248,1,141,12,202,139,105,252,248,252,246,133, 233,235,15,133,244,253,248,2,139,68,36,4,131,232,1,15,132,244,250,68,1,252, 248,59,133,233,15,135,244,251,68,41,252,248,65,193,231,3,68,3,189,233,248, 3,72,139,41,131,193,8,73,137,47,65,131,199,8,131,232,1,15,133,244,3,248,4, 68,139,60,36,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255, 36,252,238,248,5,139,124,36,24,137,151,233,137,252,238,137,194,137,252,253, 137,92,36,28,232,251,1,36,139,149,233,15,182,75,252,253,252,233,244,1,248, 7,255,128,165,233,235,65,139,134,233,65,137,174,233,137,133,233,252,233,244, 2,255,3,68,36,4,255,129,124,253,202,4,239,139,44,202,15,133,244,60,141,84, 202,8,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131,195, 4,65,252,255,36,252,238,255,141,76,202,8,65,137,215,139,105,252,248,129,121, 253,252,252,239,15,133,244,30,248,61,139,90,252,252,252,247,195,237,15,133, 244,253,248,1,137,106,252,248,137,68,36,4,131,232,1,15,132,244,249,248,2, 72,139,41,131,193,8,73,137,47,65,131,199,8,131,232,1,15,133,244,2,139,106, 252,248,248,3,139,68,36,4,128,189,233,1,15,135,244,251,248,4,139,157,233, 139,11,15,182,252,233,15,182,205,131,195,4,65,252,255,36,252,238,248,5,255, 252,247,195,237,15,133,244,4,15,182,75,252,253,72,252,247,209,141,12,202, 68,139,121,252,248,69,139,191,233,69,139,191,233,252,233,244,4,248,7,129, 252,235,239,252,247,195,237,15,133,244,254,41,218,65,137,215,139,90,252,252, 252,233,244,1,248,8,129,195,239,252,233,244,1,255,141,76,202,8,72,139,105, 232,72,139,65,252,240,72,137,41,72,137,65,8,139,105,224,139,65,228,137,105, 252,248,137,65,252,252,129,252,248,239,184,237,15,133,244,30,137,202,137, 90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252, 255,36,252,238,255,68,137,60,36,68,137,116,36,4,139,108,202,252,240,139,68, 202,252,248,68,139,181,233,131,195,4,68,139,189,233,248,1,68,57,252,240,15, 131,244,251,65,129,124,253,199,4,239,15,132,244,250,252,242,15,42,192,73, 139,44,199,72,137,108,202,8,131,192,1,252,242,15,17,4,202,137,68,202,252, 248,248,2,15,183,67,252,254,141,156,253,131,233,248,3,68,139,116,36,4,68, 139,60,36,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36, 252,238,248,4,131,192,1,252,233,244,1,248,5,68,41,252,240,248,6,59,133,233, 15,135,244,3,68,105,252,248,239,255,68,3,189,233,65,129,191,233,239,15,132, 244,253,70,141,116,48,1,73,139,175,233,73,139,135,233,72,137,44,202,72,137, 68,202,8,68,137,116,202,252,248,252,233,244,2,248,7,131,192,1,252,233,244, 6,255,129,124,253,202,252,236,239,15,133,244,251,139,108,202,232,129,124, 253,202,252,244,239,15,133,244,251,129,124,253,202,252,252,239,15,133,244, 251,128,189,233,235,15,133,244,251,141,156,253,131,233,199,68,202,252,248, 0,0,0,0,199,68,202,252,252,252,255,127,252,254,252,255,248,1,139,3,15,182, 204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,5,198,67,252, 252,235,141,156,253,131,233,198,3,235,252,233,244,1,255,15,182,252,236,15, 182,192,68,137,60,36,68,141,188,253,194,233,141,12,202,68,43,122,252,252, 133,252,237,15,132,244,251,141,108,252,233,252,248,65,57,215,15,131,244,248, 248,1,73,139,71,252,248,65,131,199,8,72,137,1,131,193,8,57,252,233,15,131, 244,249,65,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,233,15, 130,244,2,248,3,68,139,60,36,139,3,15,182,204,15,182,232,131,195,4,193,232, 16,65,252,255,36,252,238,248,5,199,68,36,4,1,0,0,0,137,208,68,41,252,248, 15,134,244,3,137,197,193,252,237,3,131,197,1,137,108,36,4,139,108,36,24,1, 200,59,133,233,15,135,244,253,248,6,255,73,139,71,252,248,65,131,199,8,72, 137,1,131,193,8,65,57,215,15,130,244,6,252,233,244,3,248,7,137,149,233,137, 141,233,137,92,36,28,65,41,215,139,116,36,4,131,252,238,1,137,252,239,232, 251,1,0,139,149,233,139,141,233,65,1,215,252,233,244,6,255,193,225,3,255, 248,1,139,90,252,252,137,68,36,4,252,247,195,237,15,133,244,253,255,248,14, 65,137,215,131,232,1,15,132,244,249,248,2,73,139,44,15,73,137,111,252,248, 65,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,4,15,182,107,252,255, 248,5,57,197,15,135,244,252,255,72,139,44,10,72,137,106,252,248,255,248,5, 56,67,252,255,15,135,244,252,255,15,182,75,252,253,72,252,247,209,141,20, 202,68,139,122,252,248,69,139,191,233,69,139,191,233,139,3,15,182,204,15, 182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,6,255,65,199,71,252, 252,237,65,131,199,8,255,199,68,194,252,244,237,255,131,192,1,252,233,244, 5,248,7,141,171,233,252,247,197,237,15,133,244,15,41,252,234,255,1,252,233, 255,137,221,209,252,237,129,229,239,102,65,129,172,253,46,233,238,15,130, 244,150,255,141,12,202,255,129,121,253,4,239,15,133,244,255,255,129,121,253, 12,239,15,133,244,62,129,121,253,20,239,15,133,244,62,139,41,131,121,16,0, 15,140,244,251,255,129,121,253,12,239,15,133,244,167,129,121,253,20,239,15, 133,244,167,255,139,105,16,133,252,237,15,136,244,251,3,41,15,128,244,247, 137,41,255,59,105,8,199,65,28,237,137,105,24,255,15,142,244,253,248,1,248, 6,141,156,253,131,233,255,141,156,253,131,233,15,183,67,252,254,15,142,245, 248,1,248,6,255,15,143,244,253,248,6,141,156,253,131,233,248,1,255,248,7, 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248, 5,255,3,41,15,128,244,1,137,41,255,15,141,244,7,255,141,156,253,131,233,15, 183,67,252,254,15,141,245,255,15,140,244,7,255,252,233,244,6,248,9,255,129, 121,253,4,239,255,15,131,244,62,129,121,253,12,239,15,131,244,62,255,129, 121,253,12,239,15,131,244,167,129,121,253,20,239,15,131,244,167,255,139,105, 20,255,129,252,253,239,15,131,244,62,255,252,242,15,16,1,252,242,15,16,73, 8,255,252,242,15,88,65,16,252,242,15,17,1,133,252,237,15,136,244,249,255, 15,140,244,249,255,102,15,46,200,248,1,252,242,15,17,65,24,255,15,131,244, 248,141,156,253,131,233,255,141,156,253,131,233,15,183,67,252,254,15,131, 245,255,15,130,244,248,141,156,253,131,233,255,248,2,139,3,15,182,204,15, 182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3,102,15,46,193,252, 233,244,1,255,141,12,202,139,105,4,129,252,253,239,15,132,244,247,255,137, 105,252,252,139,41,137,105,252,248,252,233,245,255,141,156,253,131,233,139, 1,137,105,252,252,137,65,252,248,255,65,139,142,233,139,4,129,72,139,128, 233,139,108,36,24,65,137,150,233,65,137,174,233,76,137,36,36,76,137,108,36, 8,72,131,252,236,16,252,255,224,255,141,156,253,131,233,139,3,15,182,204, 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,137,221,209,252, 237,129,229,239,102,65,129,172,253,46,233,238,15,130,244,152,255,68,139,187, 233,139,108,36,24,141,12,202,59,141,233,15,135,244,25,15,182,139,233,57,200, 15,134,244,249,248,2,255,15,183,67,252,254,252,233,245,255,248,3,199,68,194, 252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255,141,44,197,237, 141,4,194,68,139,122,252,248,137,104,252,252,68,137,120,252,248,139,108,36, 24,141,12,200,59,141,233,15,135,244,24,137,209,137,194,15,182,171,233,133, 252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244,249,68,139,121,252, 248,68,137,56,68,139,121,252,252,68,137,120,4,131,192,8,199,65,252,252,237, 131,252,237,1,15,133,244,1,248,2,255,68,139,187,233,139,3,15,182,204,15,182, 232,131,195,4,193,232,16,65,252,255,36,252,238,255,248,3,199,64,4,237,131, 192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,252,248,76,139, 189,233,139,108,36,24,141,68,194,252,248,137,149,233,141,136,233,59,141,233, 137,133,233,255,137,252,239,255,76,137,252,254,137,252,239,255,15,135,244, 23,65,199,134,233,237,255,65,252,255,215,255,65,252,255,150,233,255,65,199, 134,233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,90,252,252,252, 233,244,12,255,254,0 }; # 13 "vm_x86.dasc" //|.globals GLOB_ enum { GLOB_vm_returnp, GLOB_cont_dispatch, GLOB_vm_returnc, GLOB_vm_unwind_yield, GLOB_BC_RET_Z, GLOB_vm_return, GLOB_vm_leave_cp, GLOB_vm_leave_unw, GLOB_vm_unwind_c_eh, GLOB_vm_unwind_c, GLOB_vm_unwind_rethrow, GLOB_vm_unwind_ff, GLOB_vm_unwind_ff_eh, GLOB_vm_growstack_c, GLOB_vm_growstack_v, GLOB_vm_growstack_f, GLOB_vm_resume, GLOB_vm_pcall, GLOB_vm_call, GLOB_vm_call_dispatch, GLOB_vmeta_call, GLOB_vm_call_dispatch_f, GLOB_vm_cpcall, GLOB_cont_ffi_callback, GLOB_vm_call_tail, GLOB_cont_cat, GLOB_cont_ra, GLOB_BC_CAT_Z, GLOB_vmeta_tgets, GLOB_vmeta_tgetb, GLOB_vmeta_tgetv, GLOB_vmeta_tsets, GLOB_vmeta_tsetb, GLOB_vmeta_tsetv, GLOB_cont_nop, GLOB_vmeta_comp, GLOB_vmeta_binop, GLOB_cont_condt, GLOB_cont_condf, GLOB_vmeta_equal, GLOB_vmeta_equal_cd, GLOB_vmeta_arith_vno, GLOB_vmeta_arith_vn, GLOB_vmeta_arith_nvo, GLOB_vmeta_arith_nv, GLOB_vmeta_unm, GLOB_vmeta_arith_vvo, GLOB_vmeta_arith_vv, GLOB_vmeta_len, GLOB_BC_LEN_Z, GLOB_vmeta_call_ra, GLOB_BC_CALLT_Z, GLOB_vmeta_for, GLOB_ff_assert, GLOB_fff_fallback, GLOB_fff_res_, GLOB_ff_type, GLOB_fff_res1, GLOB_ff_getmetatable, GLOB_ff_setmetatable, GLOB_ff_rawget, GLOB_ff_tonumber, GLOB_fff_resxmm0, GLOB_ff_tostring, GLOB_fff_gcstep, GLOB_ff_next, GLOB_fff_res2, GLOB_fff_res, GLOB_ff_pairs, GLOB_ff_ipairs_aux, GLOB_fff_res0, GLOB_ff_ipairs, GLOB_ff_pcall, GLOB_ff_xpcall, GLOB_ff_coroutine_resume, GLOB_ff_coroutine_wrap_aux, GLOB_ff_coroutine_yield, GLOB_fff_resi, GLOB_fff_resn, GLOB_ff_math_abs, GLOB_ff_math_floor, GLOB_vm_floor, GLOB_ff_math_ceil, GLOB_vm_ceil, GLOB_ff_math_sqrt, GLOB_ff_math_log, GLOB_ff_math_log10, GLOB_ff_math_exp, GLOB_vm_exp_x87, GLOB_ff_math_sin, GLOB_ff_math_cos, GLOB_ff_math_tan, GLOB_ff_math_asin, GLOB_ff_math_acos, GLOB_ff_math_atan, GLOB_ff_math_sinh, GLOB_ff_math_cosh, GLOB_ff_math_tanh, GLOB_ff_math_deg, GLOB_ff_math_rad, GLOB_ff_math_atan2, GLOB_ff_math_ldexp, GLOB_ff_math_frexp, GLOB_ff_math_modf, GLOB_vm_trunc, GLOB_ff_math_fmod, GLOB_ff_math_pow, GLOB_vm_pow, GLOB_ff_math_min, GLOB_ff_math_max, GLOB_ff_string_len, GLOB_ff_string_byte, GLOB_ff_string_char, GLOB_fff_newstr, GLOB_ff_string_sub, GLOB_fff_emptystr, GLOB_ff_string_rep, GLOB_fff_fallback_2, GLOB_ff_string_reverse, GLOB_fff_fallback_1, GLOB_ff_string_lower, GLOB_ff_string_upper, GLOB_ff_table_getn, GLOB_ff_bit_tobit, GLOB_fff_resbit, GLOB_ff_bit_band, GLOB_fff_fallback_bit_op, GLOB_ff_bit_bor, GLOB_ff_bit_bxor, GLOB_ff_bit_bswap, GLOB_ff_bit_bnot, GLOB_ff_bit_lshift, GLOB_ff_bit_rshift, GLOB_ff_bit_arshift, GLOB_ff_bit_rol, GLOB_ff_bit_ror, GLOB_vm_record, GLOB_vm_rethook, GLOB_vm_inshook, GLOB_cont_hook, GLOB_vm_hotloop, GLOB_vm_callhook, GLOB_vm_hotcall, GLOB_vm_exit_handler, GLOB_vm_exit_interp, GLOB_vm_floor_sse, GLOB_vm_ceil_sse, GLOB_vm_trunc_sse, GLOB_vm_mod, GLOB_vm_log2, GLOB_vm_exp2_x87, GLOB_vm_exp2raw, GLOB_vm_pow_sse, GLOB_vm_powi_sse, GLOB_vm_foldfpm, GLOB_vm_foldarith, GLOB_vm_cpuid, GLOB_assert_bad_for_arg_type, GLOB_vm_ffi_callback, GLOB_vm_ffi_call, GLOB_BC_MODVN_Z, GLOB_BC_TGETS_Z, GLOB_BC_TSETS_Z, GLOB__MAX }; # 14 "vm_x86.dasc" //|.globalnames globnames static const char *const globnames[] = { "vm_returnp", "cont_dispatch", "vm_returnc", "vm_unwind_yield", "BC_RET_Z", "vm_return", "vm_leave_cp", "vm_leave_unw", "vm_unwind_c_eh", "vm_unwind_c@8", "vm_unwind_rethrow", "vm_unwind_ff@4", "vm_unwind_ff_eh", "vm_growstack_c", "vm_growstack_v", "vm_growstack_f", "vm_resume", "vm_pcall", "vm_call", "vm_call_dispatch", "vmeta_call", "vm_call_dispatch_f", "vm_cpcall", "cont_ffi_callback", "vm_call_tail", "cont_cat", "cont_ra", "BC_CAT_Z", "vmeta_tgets", "vmeta_tgetb", "vmeta_tgetv", "vmeta_tsets", "vmeta_tsetb", "vmeta_tsetv", "cont_nop", "vmeta_comp", "vmeta_binop", "cont_condt", "cont_condf", "vmeta_equal", "vmeta_equal_cd", "vmeta_arith_vno", "vmeta_arith_vn", "vmeta_arith_nvo", "vmeta_arith_nv", "vmeta_unm", "vmeta_arith_vvo", "vmeta_arith_vv", "vmeta_len", "BC_LEN_Z", "vmeta_call_ra", "BC_CALLT_Z", "vmeta_for", "ff_assert", "fff_fallback", "fff_res_", "ff_type", "fff_res1", "ff_getmetatable", "ff_setmetatable", "ff_rawget", "ff_tonumber", "fff_resxmm0", "ff_tostring", "fff_gcstep", "ff_next", "fff_res2", "fff_res", "ff_pairs", "ff_ipairs_aux", "fff_res0", "ff_ipairs", "ff_pcall", "ff_xpcall", "ff_coroutine_resume", "ff_coroutine_wrap_aux", "ff_coroutine_yield", "fff_resi", "fff_resn", "ff_math_abs", "ff_math_floor", "vm_floor", "ff_math_ceil", "vm_ceil", "ff_math_sqrt", "ff_math_log", "ff_math_log10", "ff_math_exp", "vm_exp_x87", "ff_math_sin", "ff_math_cos", "ff_math_tan", "ff_math_asin", "ff_math_acos", "ff_math_atan", "ff_math_sinh", "ff_math_cosh", "ff_math_tanh", "ff_math_deg", "ff_math_rad", "ff_math_atan2", "ff_math_ldexp", "ff_math_frexp", "ff_math_modf", "vm_trunc", "ff_math_fmod", "ff_math_pow", "vm_pow", "ff_math_min", "ff_math_max", "ff_string_len", "ff_string_byte", "ff_string_char", "fff_newstr", "ff_string_sub", "fff_emptystr", "ff_string_rep", "fff_fallback_2", "ff_string_reverse", "fff_fallback_1", "ff_string_lower", "ff_string_upper", "ff_table_getn", "ff_bit_tobit", "fff_resbit", "ff_bit_band", "fff_fallback_bit_op", "ff_bit_bor", "ff_bit_bxor", "ff_bit_bswap", "ff_bit_bnot", "ff_bit_lshift", "ff_bit_rshift", "ff_bit_arshift", "ff_bit_rol", "ff_bit_ror", "vm_record", "vm_rethook", "vm_inshook", "cont_hook", "vm_hotloop", "vm_callhook", "vm_hotcall", "vm_exit_handler", "vm_exit_interp", "vm_floor_sse", "vm_ceil_sse", "vm_trunc_sse", "vm_mod", "vm_log2", "vm_exp2_x87", "vm_exp2raw", "vm_pow_sse", "vm_powi_sse", "vm_foldfpm", "vm_foldarith", "vm_cpuid", "assert_bad_for_arg_type", "vm_ffi_callback", "vm_ffi_call@4", "BC_MODVN_Z", "BC_TGETS_Z", "BC_TSETS_Z", (const char *)0 }; # 15 "vm_x86.dasc" //|.externnames extnames static const char *const extnames[] = { "lj_state_growstack@8", "lj_err_throw@8", "lj_meta_tget", "lj_meta_tset", "lj_meta_comp", "lj_meta_equal", "lj_meta_equal_cd@8", "lj_meta_arith", "lj_meta_len@8", "lj_meta_call", "lj_meta_for@8", "lj_tab_get", "lj_str_fromnum@8", "lj_tab_next", "lj_tab_getinth@8", "lj_ffh_coroutine_wrap_err@8", "lj_vm_sinh", "lj_vm_cosh", "lj_vm_tanh", "lj_str_new", "lj_tab_len@4", "lj_gc_step@4", "lj_dispatch_ins@8", "lj_trace_hot@8", "lj_dispatch_call@8", "lj_trace_exit@8", "lj_ccallback_enter@8", "lj_ccallback_leave@8", "lj_meta_cat", "lj_gc_barrieruv@8", "lj_func_closeuv@8", "lj_func_newL_gc", "lj_tab_new", "lj_gc_step_fixtop@4", "lj_tab_dup@8", "lj_tab_newkey", "lj_tab_reasize", (const char *)0 }; # 16 "vm_x86.dasc" //| //|//----------------------------------------------------------------------- //| //|.if P64 //|.define X64, 1 //|.define SSE, 1 //|.if WIN //|.define X64WIN, 1 //|.endif //|.endif //| //|// Fixed register assignments for the interpreter. //|// This is very fragile and has many dependencies. Caveat emptor. //|.define BASE, edx // Not C callee-save, refetched anyway. //|.if not X64 //|.define KBASE, edi // Must be C callee-save. //|.define KBASEa, KBASE //|.define PC, esi // Must be C callee-save. //|.define PCa, PC //|.define DISPATCH, ebx // Must be C callee-save. //|.elif X64WIN //|.define KBASE, edi // Must be C callee-save. //|.define KBASEa, rdi //|.define PC, esi // Must be C callee-save. //|.define PCa, rsi //|.define DISPATCH, ebx // Must be C callee-save. //|.else //|.define KBASE, r15d // Must be C callee-save. //|.define KBASEa, r15 //|.define PC, ebx // Must be C callee-save. //|.define PCa, rbx //|.define DISPATCH, r14d // Must be C callee-save. //|.endif //| //|.define RA, ecx //|.define RAH, ch //|.define RAL, cl //|.define RB, ebp // Must be ebp (C callee-save). //|.define RC, eax // Must be eax. //|.define RCW, ax //|.define RCH, ah //|.define RCL, al //|.define OP, RB //|.define RD, RC //|.define RDW, RCW //|.define RDL, RCL //|.if X64 //|.define RAa, rcx //|.define RBa, rbp //|.define RCa, rax //|.define RDa, rax //|.else //|.define RAa, RA //|.define RBa, RB //|.define RCa, RC //|.define RDa, RD //|.endif //| //|.if not X64 //|.define FCARG1, ecx // x86 fastcall arguments. //|.define FCARG2, edx //|.elif X64WIN //|.define CARG1, rcx // x64/WIN64 C call arguments. //|.define CARG2, rdx //|.define CARG3, r8 //|.define CARG4, r9 //|.define CARG1d, ecx //|.define CARG2d, edx //|.define CARG3d, r8d //|.define CARG4d, r9d //|.define FCARG1, CARG1d // Upwards compatible to x86 fastcall. //|.define FCARG2, CARG2d //|.else //|.define CARG1, rdi // x64/POSIX C call arguments. //|.define CARG2, rsi //|.define CARG3, rdx //|.define CARG4, rcx //|.define CARG5, r8 //|.define CARG6, r9 //|.define CARG1d, edi //|.define CARG2d, esi //|.define CARG3d, edx //|.define CARG4d, ecx //|.define CARG5d, r8d //|.define CARG6d, r9d //|.define FCARG1, CARG1d // Simulate x86 fastcall. //|.define FCARG2, CARG2d //|.endif //| //|// Type definitions. Some of these are only used for documentation. //|.type L, lua_State #define Dt1(_V) (int)(ptrdiff_t)&(((lua_State *)0)_V) # 107 "vm_x86.dasc" //|.type GL, global_State #define Dt2(_V) (int)(ptrdiff_t)&(((global_State *)0)_V) # 108 "vm_x86.dasc" //|.type TVALUE, TValue #define Dt3(_V) (int)(ptrdiff_t)&(((TValue *)0)_V) # 109 "vm_x86.dasc" //|.type GCOBJ, GCobj #define Dt4(_V) (int)(ptrdiff_t)&(((GCobj *)0)_V) # 110 "vm_x86.dasc" //|.type STR, GCstr #define Dt5(_V) (int)(ptrdiff_t)&(((GCstr *)0)_V) # 111 "vm_x86.dasc" //|.type TAB, GCtab #define Dt6(_V) (int)(ptrdiff_t)&(((GCtab *)0)_V) # 112 "vm_x86.dasc" //|.type LFUNC, GCfuncL #define Dt7(_V) (int)(ptrdiff_t)&(((GCfuncL *)0)_V) # 113 "vm_x86.dasc" //|.type CFUNC, GCfuncC #define Dt8(_V) (int)(ptrdiff_t)&(((GCfuncC *)0)_V) # 114 "vm_x86.dasc" //|.type PROTO, GCproto #define Dt9(_V) (int)(ptrdiff_t)&(((GCproto *)0)_V) # 115 "vm_x86.dasc" //|.type UPVAL, GCupval #define DtA(_V) (int)(ptrdiff_t)&(((GCupval *)0)_V) # 116 "vm_x86.dasc" //|.type NODE, Node #define DtB(_V) (int)(ptrdiff_t)&(((Node *)0)_V) # 117 "vm_x86.dasc" //|.type NARGS, int #define DtC(_V) (int)(ptrdiff_t)&(((int *)0)_V) # 118 "vm_x86.dasc" //|.type TRACE, GCtrace #define DtD(_V) (int)(ptrdiff_t)&(((GCtrace *)0)_V) # 119 "vm_x86.dasc" //| //|// Stack layout while in interpreter. Must match with lj_frame.h. //|//----------------------------------------------------------------------- //|.if not X64 // x86 stack layout. //| //|.define CFRAME_SPACE, aword*7 // Delta for esp (see <--). //|.macro saveregs_ //| push edi; push esi; push ebx //| sub esp, CFRAME_SPACE //|.endmacro //|.macro saveregs //| push ebp; saveregs_ //|.endmacro //|.macro restoreregs //| add esp, CFRAME_SPACE //| pop ebx; pop esi; pop edi; pop ebp //|.endmacro //| //|.define SAVE_ERRF, aword [esp+aword*15] // vm_pcall/vm_cpcall only. //|.define SAVE_NRES, aword [esp+aword*14] //|.define SAVE_CFRAME, aword [esp+aword*13] //|.define SAVE_L, aword [esp+aword*12] //|//----- 16 byte aligned, ^^^ arguments from C caller //|.define SAVE_RET, aword [esp+aword*11] //<-- esp entering interpreter. //|.define SAVE_R4, aword [esp+aword*10] //|.define SAVE_R3, aword [esp+aword*9] //|.define SAVE_R2, aword [esp+aword*8] //|//----- 16 byte aligned //|.define SAVE_R1, aword [esp+aword*7] //<-- esp after register saves. //|.define SAVE_PC, aword [esp+aword*6] //|.define TMP2, aword [esp+aword*5] //|.define TMP1, aword [esp+aword*4] //|//----- 16 byte aligned //|.define ARG4, aword [esp+aword*3] //|.define ARG3, aword [esp+aword*2] //|.define ARG2, aword [esp+aword*1] //|.define ARG1, aword [esp] //<-- esp while in interpreter. //|//----- 16 byte aligned, ^^^ arguments for C callee //| //|// FPARGx overlaps ARGx and ARG(x+1) on x86. //|.define FPARG3, qword [esp+qword*1] //|.define FPARG1, qword [esp] //|// TMPQ overlaps TMP1/TMP2. ARG5/MULTRES overlap TMP1/TMP2 (and TMPQ). //|.define TMPQ, qword [esp+aword*4] //|.define TMP3, ARG4 //|.define ARG5, TMP1 //|.define TMPa, TMP1 //|.define MULTRES, TMP2 //| //|// Arguments for vm_call and vm_pcall. //|.define INARG_BASE, SAVE_CFRAME // Overwritten by SAVE_CFRAME! //| //|// Arguments for vm_cpcall. //|.define INARG_CP_CALL, SAVE_ERRF //|.define INARG_CP_UD, SAVE_NRES //|.define INARG_CP_FUNC, SAVE_CFRAME //| //|//----------------------------------------------------------------------- //|.elif X64WIN // x64/Windows stack layout //| //|.define CFRAME_SPACE, aword*5 // Delta for rsp (see <--). //|.macro saveregs_ //| push rdi; push rsi; push rbx //| sub rsp, CFRAME_SPACE //|.endmacro //|.macro saveregs //| push rbp; saveregs_ //|.endmacro //|.macro restoreregs //| add rsp, CFRAME_SPACE //| pop rbx; pop rsi; pop rdi; pop rbp //|.endmacro //| //|.define SAVE_CFRAME, aword [rsp+aword*13] //|.define SAVE_PC, dword [rsp+dword*25] //|.define SAVE_L, dword [rsp+dword*24] //|.define SAVE_ERRF, dword [rsp+dword*23] //|.define SAVE_NRES, dword [rsp+dword*22] //|.define TMP2, dword [rsp+dword*21] //|.define TMP1, dword [rsp+dword*20] //|//----- 16 byte aligned, ^^^ 32 byte register save area, owned by interpreter //|.define SAVE_RET, aword [rsp+aword*9] //<-- rsp entering interpreter. //|.define SAVE_R4, aword [rsp+aword*8] //|.define SAVE_R3, aword [rsp+aword*7] //|.define SAVE_R2, aword [rsp+aword*6] //|.define SAVE_R1, aword [rsp+aword*5] //<-- rsp after register saves. //|.define ARG5, aword [rsp+aword*4] //|.define CSAVE_4, aword [rsp+aword*3] //|.define CSAVE_3, aword [rsp+aword*2] //|.define CSAVE_2, aword [rsp+aword*1] //|.define CSAVE_1, aword [rsp] //<-- rsp while in interpreter. //|//----- 16 byte aligned, ^^^ 32 byte register save area, owned by callee //| //|// TMPQ overlaps TMP1/TMP2. MULTRES overlaps TMP2 (and TMPQ). //|.define TMPQ, qword [rsp+aword*10] //|.define MULTRES, TMP2 //|.define TMPa, ARG5 //|.define ARG5d, dword [rsp+aword*4] //|.define TMP3, ARG5d //| //|//----------------------------------------------------------------------- //|.else // x64/POSIX stack layout //| //|.define CFRAME_SPACE, aword*5 // Delta for rsp (see <--). //|.macro saveregs_ //| push rbx; push r15; push r14 //| sub rsp, CFRAME_SPACE //|.endmacro //|.macro saveregs //| push rbp; saveregs_ //|.endmacro //|.macro restoreregs //| add rsp, CFRAME_SPACE //| pop r14; pop r15; pop rbx; pop rbp //|.endmacro //| //|//----- 16 byte aligned, //|.define SAVE_RET, aword [rsp+aword*9] //<-- rsp entering interpreter. //|.define SAVE_R4, aword [rsp+aword*8] //|.define SAVE_R3, aword [rsp+aword*7] //|.define SAVE_R2, aword [rsp+aword*6] //|.define SAVE_R1, aword [rsp+aword*5] //<-- rsp after register saves. //|.define SAVE_CFRAME, aword [rsp+aword*4] //|.define SAVE_PC, dword [rsp+dword*7] //|.define SAVE_L, dword [rsp+dword*6] //|.define SAVE_ERRF, dword [rsp+dword*5] //|.define SAVE_NRES, dword [rsp+dword*4] //|.define TMPa, aword [rsp+aword*1] //|.define TMP2, dword [rsp+dword*1] //|.define TMP1, dword [rsp] //<-- rsp while in interpreter. //|//----- 16 byte aligned //| //|// TMPQ overlaps TMP1/TMP2. MULTRES overlaps TMP2 (and TMPQ). //|.define TMPQ, qword [rsp] //|.define TMP3, dword [rsp+aword*1] //|.define MULTRES, TMP2 //| //|.endif //| //|//----------------------------------------------------------------------- //| //|// Instruction headers. //|.macro ins_A; .endmacro //|.macro ins_AD; .endmacro //|.macro ins_AJ; .endmacro //|.macro ins_ABC; movzx RB, RCH; movzx RC, RCL; .endmacro //|.macro ins_AB_; movzx RB, RCH; .endmacro //|.macro ins_A_C; movzx RC, RCL; .endmacro //|.macro ins_AND; not RDa; .endmacro //| //|// Instruction decode+dispatch. Carefully tuned (nope, lodsd is not faster). //|.macro ins_NEXT //| mov RC, [PC] //| movzx RA, RCH //| movzx OP, RCL //| add PC, 4 //| shr RC, 16 //|.if X64 //| jmp aword [DISPATCH+OP*8] //|.else //| jmp aword [DISPATCH+OP*4] //|.endif //|.endmacro //| //|// Instruction footer. //|.if 1 //| // Replicated dispatch. Less unpredictable branches, but higher I-Cache use. //| .define ins_next, ins_NEXT //| .define ins_next_, ins_NEXT //|.else //| // Common dispatch. Lower I-Cache use, only one (very) unpredictable branch. //| // Affects only certain kinds of benchmarks (and only with -j off). //| // Around 10%-30% slower on Core2, a lot more slower on P4. //| .macro ins_next //| jmp ->ins_next //| .endmacro //| .macro ins_next_ //| ->ins_next: //| ins_NEXT //| .endmacro //|.endif //| //|// Call decode and dispatch. //|.macro ins_callt //| // BASE = new base, RB = LFUNC, RD = nargs+1, [BASE-4] = PC //| mov PC, LFUNC:RB->pc //| mov RA, [PC] //| movzx OP, RAL //| movzx RA, RAH //| add PC, 4 //|.if X64 //| jmp aword [DISPATCH+OP*8] //|.else //| jmp aword [DISPATCH+OP*4] //|.endif //|.endmacro //| //|.macro ins_call //| // BASE = new base, RB = LFUNC, RD = nargs+1 //| mov [BASE-4], PC //| ins_callt //|.endmacro //| //|//----------------------------------------------------------------------- //| //|// Macros to test operand types. //|.macro checktp, reg, tp; cmp dword [BASE+reg*8+4], tp; .endmacro //|.macro checknum, reg, target; checktp reg, LJ_TISNUM; jae target; .endmacro //|.macro checkint, reg, target; checktp reg, LJ_TISNUM; jne target; .endmacro //|.macro checkstr, reg, target; checktp reg, LJ_TSTR; jne target; .endmacro //|.macro checktab, reg, target; checktp reg, LJ_TTAB; jne target; .endmacro //| //|// These operands must be used with movzx. //|.define PC_OP, byte [PC-4] //|.define PC_RA, byte [PC-3] //|.define PC_RB, byte [PC-1] //|.define PC_RC, byte [PC-2] //|.define PC_RD, word [PC-2] //| //|.macro branchPC, reg //| lea PC, [PC+reg*4-BCBIAS_J*4] //|.endmacro //| //|// Assumes DISPATCH is relative to GL. #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) //| #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) //| //|// Decrement hashed hotcount and trigger trace recorder if zero. //|.macro hotloop, reg //| mov reg, PC //| shr reg, 1 //| and reg, HOTCOUNT_PCMASK //| sub word [DISPATCH+reg+GG_DISP2HOT], HOTCOUNT_LOOP //| jb ->vm_hotloop //|.endmacro //| //|.macro hotcall, reg //| mov reg, PC //| shr reg, 1 //| and reg, HOTCOUNT_PCMASK //| sub word [DISPATCH+reg+GG_DISP2HOT], HOTCOUNT_CALL //| jb ->vm_hotcall //|.endmacro //| //|// Set current VM state. //|.macro set_vmstate, st //| mov dword [DISPATCH+DISPATCH_GL(vmstate)], ~LJ_VMST_..st //|.endmacro //| //|// x87 compares. //|.macro fcomparepp // Compare and pop st0 >< st1. //| fucomip st1 //| fpop //|.endmacro //| //|.macro fdup; fld st0; .endmacro //|.macro fpop1; fstp st1; .endmacro //| //|// Synthesize SSE FP constants. //|.macro sseconst_abs, reg, tmp // Synthesize abs mask. //|.if X64 //| mov64 tmp, U64x(7fffffff,ffffffff); movd reg, tmp //|.else //| pxor reg, reg; pcmpeqd reg, reg; psrlq reg, 1 //|.endif //|.endmacro //| //|.macro sseconst_hi, reg, tmp, val // Synthesize hi-32 bit const. //|.if X64 //| mov64 tmp, U64x(val,00000000); movd reg, tmp //|.else //| mov tmp, 0x .. val; movd reg, tmp; pshufd reg, reg, 0x51 //|.endif //|.endmacro //| //|.macro sseconst_sign, reg, tmp // Synthesize sign mask. //| sseconst_hi reg, tmp, 80000000 //|.endmacro //|.macro sseconst_1, reg, tmp // Synthesize 1.0. //| sseconst_hi reg, tmp, 3ff00000 //|.endmacro //|.macro sseconst_m1, reg, tmp // Synthesize -1.0. //| sseconst_hi reg, tmp, bff00000 //|.endmacro //|.macro sseconst_2p52, reg, tmp // Synthesize 2^52. //| sseconst_hi reg, tmp, 43300000 //|.endmacro //|.macro sseconst_tobit, reg, tmp // Synthesize 2^52 + 2^51. //| sseconst_hi reg, tmp, 43380000 //|.endmacro //| //|// Move table write barrier back. Overwrites reg. //|.macro barrierback, tab, reg //| and byte tab->marked, (uint8_t)~LJ_GC_BLACK // black2gray(tab) //| mov reg, [DISPATCH+DISPATCH_GL(gc.grayagain)] //| mov [DISPATCH+DISPATCH_GL(gc.grayagain)], tab //| mov tab->gclist, reg //|.endmacro //| //|//----------------------------------------------------------------------- /* Generate subroutines used by opcodes and other parts of the VM. */ /* The .code_sub section should be last to help static branch prediction. */ static void build_subroutines(BuildCtx *ctx) { //|.code_sub dasm_put(Dst, 0); # 427 "vm_x86.dasc" //| //|//----------------------------------------------------------------------- //|//-- Return handling ---------------------------------------------------- //|//----------------------------------------------------------------------- //| //|->vm_returnp: //| test PC, FRAME_P //| jz ->cont_dispatch //| //| // Return from pcall or xpcall fast func. //| and PC, -8 //| sub BASE, PC // Restore caller base. //| lea RAa, [RA+PC-8] // Rebase RA and prepend one result. //| mov PC, [BASE-4] // Fetch PC of previous frame. //| // Prepending may overwrite the pcall frame, so do it at the end. //| mov dword [BASE+RA+4], LJ_TTRUE // Prepend true to results. //| //|->vm_returnc: //| add RD, 1 // RD = nresults+1 //| jz ->vm_unwind_yield //| mov MULTRES, RD //| test PC, FRAME_TYPE //| jz ->BC_RET_Z // Handle regular return to Lua. //| //|->vm_return: //| // BASE = base, RA = resultofs, RD = nresults+1 (= MULTRES), PC = return //| xor PC, FRAME_C //| test PC, FRAME_TYPE //| jnz ->vm_returnp //| //| // Return to C. //| set_vmstate C //| and PC, -8 //| sub PC, BASE //| neg PC // Previous base = BASE - delta. //| //| sub RD, 1 //| jz >2 //|1: // Move results down. //|.if X64 //| mov RBa, [BASE+RA] dasm_put(Dst, 2, FRAME_P, LJ_TTRUE, FRAME_TYPE, FRAME_C, FRAME_TYPE, DISPATCH_GL(vmstate), ~LJ_VMST_C); # 468 "vm_x86.dasc" //| mov [BASE-8], RBa //|.else //| mov RB, [BASE+RA] //| mov [BASE-8], RB //| mov RB, [BASE+RA+4] //| mov [BASE-4], RB //|.endif //| add BASE, 8 //| sub RD, 1 //| jnz <1 //|2: //| mov L:RB, SAVE_L //| mov L:RB->base, PC //|3: //| mov RD, MULTRES //| mov RA, SAVE_NRES // RA = wanted nresults+1 //|4: //| cmp RA, RD //| jne >6 // More/less results wanted? //|5: //| sub BASE, 8 //| mov L:RB->top, BASE //| //|->vm_leave_cp: //| mov RAa, SAVE_CFRAME // Restore previous C frame. //| mov L:RB->cframe, RAa //| xor eax, eax // Ok return status for vm_pcall. //| //|->vm_leave_unw: //| restoreregs //| ret //| //|6: //| jb >7 // Less results wanted? //| // More results wanted. Check stack size and fill up results with nil. //| cmp BASE, L:RB->maxstack //| ja >8 //| mov dword [BASE-4], LJ_TNIL //| add BASE, 8 dasm_put(Dst, 92, Dt1(->base), Dt1(->top), Dt1(->cframe), Dt1(->maxstack), LJ_TNIL); # 507 "vm_x86.dasc" //| add RD, 1 //| jmp <4 //| //|7: // Less results wanted. //| test RA, RA //| jz <5 // But check for LUA_MULTRET+1. //| sub RA, RD // Negative result! //| lea BASE, [BASE+RA*8] // Correct top. //| jmp <5 //| //|8: // Corner case: need to grow stack for filling up results. //| // This can happen if: //| // - A C function grows the stack (a lot). //| // - The GC shrinks the stack in between. //| // - A return back from a lua_call() with (high) nresults adjustment. //| mov L:RB->top, BASE // Save current top held in BASE (yes). //| mov MULTRES, RD // Need to fill only remainder with nil. //| mov FCARG2, RA //| mov FCARG1, L:RB //| call extern lj_state_growstack@8 // (lua_State *L, int n) //| mov BASE, L:RB->top // Need the (realloced) L->top in BASE. //| jmp <3 //| //|->vm_unwind_yield: //| mov al, LUA_YIELD //| jmp ->vm_unwind_c_eh //| //|->vm_unwind_c@8: // Unwind C stack, return from vm_pcall. //| // (void *cframe, int errcode) //|.if X64 //| mov eax, CARG2d // Error return status for vm_pcall. //| mov rsp, CARG1 //|.else //| mov eax, FCARG2 // Error return status for vm_pcall. //| mov esp, FCARG1 //|.endif //|->vm_unwind_c_eh: // Landing pad for external unwinder. //| mov L:RB, SAVE_L //| mov GL:RB, L:RB->glref //| mov dword GL:RB->vmstate, ~LJ_VMST_C //| jmp ->vm_leave_unw dasm_put(Dst, 192, Dt1(->top), Dt1(->top), LUA_YIELD, Dt1(->glref), Dt2(->vmstate), ~LJ_VMST_C); # 548 "vm_x86.dasc" //| //|->vm_unwind_rethrow: //|.if X64 and not X64WIN //| mov FCARG1, SAVE_L //| mov FCARG2, eax //| restoreregs //| jmp extern lj_err_throw@8 // (lua_State *L, int errcode) //|.endif //| //|->vm_unwind_ff@4: // Unwind C stack, return from ff pcall. //| // (void *cframe) //|.if X64 //| and CARG1, CFRAME_RAWMASK //| mov rsp, CARG1 //|.else //| and FCARG1, CFRAME_RAWMASK //| mov esp, FCARG1 //|.endif //|->vm_unwind_ff_eh: // Landing pad for external unwinder. //| mov L:RB, SAVE_L //| mov RAa, -8 // Results start at BASE+RA = BASE-8. //| mov RD, 1+1 // Really 1+2 results, incr. later. //| mov BASE, L:RB->base //| mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. //| add DISPATCH, GG_G2DISP //| mov PC, [BASE-4] // Fetch PC of previous frame. //| mov dword [BASE-4], LJ_TFALSE // Prepend false to error message. //| set_vmstate INTERP //| jmp ->vm_returnc // Increments RD/MULTRES and returns. //| //|//----------------------------------------------------------------------- //|//-- Grow stack for calls ----------------------------------------------- //|//----------------------------------------------------------------------- //| //|->vm_growstack_c: // Grow stack for C function. //| mov FCARG2, LUA_MINSTACK //| jmp >2 //| //|->vm_growstack_v: // Grow stack for vararg Lua function. //| sub RD, 8 dasm_put(Dst, 275, CFRAME_RAWMASK, 1+1, Dt1(->base), Dt1(->glref), GG_G2DISP, LJ_TFALSE, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, LUA_MINSTACK); # 588 "vm_x86.dasc" //| jmp >1 //| //|->vm_growstack_f: // Grow stack for fixarg Lua function. //| // BASE = new base, RD = nargs+1, RB = L, PC = first PC //| lea RD, [BASE+NARGS:RD*8-8] //|1: //| movzx RA, byte [PC-4+PC2PROTO(framesize)] //| add PC, 4 // Must point after first instruction. //| mov L:RB->base, BASE //| mov L:RB->top, RD //| mov SAVE_PC, PC //| mov FCARG2, RA //|2: //| // RB = L, L->base = new base, L->top = top //| mov FCARG1, L:RB //| call extern lj_state_growstack@8 // (lua_State *L, int n) //| mov BASE, L:RB->base //| mov RD, L:RB->top //| mov LFUNC:RB, [BASE-8] //| sub RD, BASE //| shr RD, 3 //| add NARGS:RD, 1 //| // BASE = new base, RB = LFUNC, RD = nargs+1 //| ins_callt // Just retry the call. //| //|//----------------------------------------------------------------------- //|//-- Entry points into the assembler VM --------------------------------- //|//----------------------------------------------------------------------- //| //|->vm_resume: // Setup C frame and resume thread. //| // (lua_State *L, TValue *base, int nres1 = 0, ptrdiff_t ef = 0) //| saveregs //|.if X64 //| mov L:RB, CARG1d // Caveat: CARG1d may be RA. //| mov SAVE_L, CARG1d //| mov RA, CARG2d //|.else //| mov L:RB, SAVE_L //| mov RA, INARG_BASE // Caveat: overlaps SAVE_CFRAME! //|.endif //| mov PC, FRAME_CP //| xor RD, RD //| lea KBASEa, [esp+CFRAME_RESUME] //| mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. //| add DISPATCH, GG_G2DISP //| mov L:RB->cframe, KBASEa //| mov SAVE_PC, RD // Any value outside of bytecode is ok. //| mov SAVE_CFRAME, RDa //|.if X64 //| mov SAVE_NRES, RD //| mov SAVE_ERRF, RD //|.endif //| cmp byte L:RB->status, RDL //| je >3 // Initial resume (like a call). //| //| // Resume after yield (like a return). //| set_vmstate INTERP dasm_put(Dst, 371, -4+PC2PROTO(framesize), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top), Dt7(->pc), FRAME_CP, CFRAME_RESUME, Dt1(->glref), GG_G2DISP, Dt1(->cframe), Dt1(->status)); # 645 "vm_x86.dasc" //| mov byte L:RB->status, RDL //| mov BASE, L:RB->base //| mov RD, L:RB->top //| sub RD, RA //| shr RD, 3 //| add RD, 1 // RD = nresults+1 //| sub RA, BASE // RA = resultofs //| mov PC, [BASE-4] //| mov MULTRES, RD //| test PC, FRAME_TYPE //| jz ->BC_RET_Z //| jmp ->vm_return //| //|->vm_pcall: // Setup protected C frame and enter VM. //| // (lua_State *L, TValue *base, int nres1, ptrdiff_t ef) //| saveregs //| mov PC, FRAME_CP //|.if X64 //| mov SAVE_ERRF, CARG4d //|.endif //| jmp >1 //| //|->vm_call: // Setup C frame and enter VM. //| // (lua_State *L, TValue *base, int nres1) //| saveregs //| mov PC, FRAME_C //| //|1: // Entry point for vm_pcall above (PC = ftype). //|.if X64 //| mov SAVE_NRES, CARG3d //| mov L:RB, CARG1d // Caveat: CARG1d may be RA. //| mov SAVE_L, CARG1d //| mov RA, CARG2d //|.else //| mov L:RB, SAVE_L //| mov RA, INARG_BASE // Caveat: overlaps SAVE_CFRAME! //|.endif //| //| mov KBASEa, L:RB->cframe // Add our C frame to cframe chain. //| mov SAVE_CFRAME, KBASEa //| mov SAVE_PC, L:RB // Any value outside of bytecode is ok. //|.if X64 //| mov L:RB->cframe, rsp //|.else //| mov L:RB->cframe, esp //|.endif //| //|2: // Entry point for vm_cpcall below (RA = base, RB = L, PC = ftype). //| mov DISPATCH, L:RB->glref // Setup pointer to dispatch table. dasm_put(Dst, 524, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->status), Dt1(->base), Dt1(->top), FRAME_TYPE, FRAME_CP, FRAME_C, Dt1(->cframe), Dt1(->cframe)); # 694 "vm_x86.dasc" //| add DISPATCH, GG_G2DISP //| //|3: // Entry point for vm_resume above (RA = base, RB = L, PC = ftype). //| set_vmstate INTERP //| mov BASE, L:RB->base // BASE = old base (used in vmeta_call). //| add PC, RA //| sub PC, BASE // PC = frame delta + frame type //| //| mov RD, L:RB->top //| sub RD, RA //| shr NARGS:RD, 3 //| add NARGS:RD, 1 // RD = nargs+1 //| //|->vm_call_dispatch: //| mov LFUNC:RB, [RA-8] //| cmp dword [RA-4], LJ_TFUNC //| jne ->vmeta_call // Ensure KBASE defined and != BASE. //| //|->vm_call_dispatch_f: //| mov BASE, RA //| ins_call //| // BASE = new base, RB = func, RD = nargs+1, PC = caller PC //| //|->vm_cpcall: // Setup protected C frame, call C. //| // (lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp) //| saveregs //|.if X64 //| mov L:RB, CARG1d // Caveat: CARG1d may be RA. //| mov SAVE_L, CARG1d //|.else //| mov L:RB, SAVE_L //| // Caveat: INARG_CP_* and SAVE_CFRAME/SAVE_NRES/SAVE_ERRF overlap! //| mov RC, INARG_CP_UD // Get args before they are overwritten. //| mov RA, INARG_CP_FUNC //| mov BASE, INARG_CP_CALL //|.endif //| mov SAVE_PC, L:RB // Any value outside of bytecode is ok. //| //| mov KBASE, L:RB->stack // Compute -savestack(L, L->top). //| sub KBASE, L:RB->top //| mov SAVE_ERRF, 0 // No error function. //| mov SAVE_NRES, KBASE // Neg. delta means cframe w/o frame. //| // Handler may change cframe_nres(L->cframe) or cframe_errfunc(L->cframe). //| //|.if X64 //| mov KBASEa, L:RB->cframe // Add our C frame to cframe chain. //| mov SAVE_CFRAME, KBASEa //| mov L:RB->cframe, rsp //| //| call CARG4 // (lua_State *L, lua_CFunction func, void *ud) //|.else //| mov ARG3, RC // Have to copy args downwards. //| mov ARG2, RA //| mov ARG1, L:RB //| //| mov KBASE, L:RB->cframe // Add our C frame to cframe chain. //| mov SAVE_CFRAME, KBASE //| mov L:RB->cframe, esp //| //| call BASE // (lua_State *L, lua_CFunction func, void *ud) //|.endif //| // TValue * (new base) or NULL returned in eax (RC). //| test RC, RC //| jz ->vm_leave_cp // No base? Just remove C frame. //| mov RA, RC dasm_put(Dst, 642, Dt1(->glref), GG_G2DISP, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top), LJ_TFUNC, Dt7(->pc), Dt1(->stack), Dt1(->top), Dt1(->cframe), Dt1(->cframe)); # 759 "vm_x86.dasc" //| mov PC, FRAME_CP //| jmp <2 // Else continue with the call. //| //|//----------------------------------------------------------------------- //|//-- Metamethod handling ------------------------------------------------ //|//----------------------------------------------------------------------- //| //|//-- Continuation dispatch ---------------------------------------------- //| //|->cont_dispatch: //| // BASE = meta base, RA = resultofs, RD = nresults+1 (also in MULTRES) //| add RA, BASE //| and PC, -8 //| mov RB, BASE //| sub BASE, PC // Restore caller BASE. //| mov dword [RA+RD*8-4], LJ_TNIL // Ensure one valid arg. //| mov RC, RA // ... in [RC] //| mov PC, [RB-12] // Restore PC from [cont|PC]. //|.if X64 //| movsxd RAa, dword [RB-16] // May be negative on WIN64 with debug. //|.if FFI //| cmp RA, 1 //| jbe >1 //|.endif //| lea KBASEa, qword [=>0] //| add RAa, KBASEa //|.else //| mov RA, dword [RB-16] //|.if FFI //| cmp RA, 1 //| jbe >1 //|.endif //|.endif //| mov LFUNC:KBASE, [BASE-8] //| mov KBASE, LFUNC:KBASE->pc //| mov KBASE, [KBASE+PC2PROTO(k)] //| // BASE = base, RC = result, RB = meta base //| jmp RAa // Jump to continuation. //| //|.if FFI //|1: //| je ->cont_ffi_callback // cont = 1: return from FFI callback. //| // cont = 0: Tail call from C function. //| sub RB, BASE //| shr RB, 3 //| lea RD, [RB-1] //| jmp ->vm_call_tail //|.endif //| //|->cont_cat: // BASE = base, RC = result, RB = mbase //| movzx RA, PC_RB //| sub RB, 16 //| lea RA, [BASE+RA*8] //| sub RA, RB //| je ->cont_ra //| neg RA //| shr RA, 3 //|.if X64WIN //| mov CARG3d, RA //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE //| mov RCa, [RC] //| mov [RB], RCa //| mov CARG2d, RB //|.elif X64 //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE //| mov CARG3d, RA dasm_put(Dst, 788, FRAME_CP, LJ_TNIL, 0, Dt7(->pc), PC2PROTO(k), Dt1(->base)); # 827 "vm_x86.dasc" //| mov RAa, [RC] //| mov [RB], RAa //| mov CARG2d, RB //|.else //| mov ARG3, RA //| mov RA, [RC+4] //| mov RC, [RC] //| mov [RB+4], RA //| mov [RB], RC //| mov ARG2, RB //|.endif //| jmp ->BC_CAT_Z //| //|//-- Table indexing metamethods ----------------------------------------- //| //|->vmeta_tgets: //| mov TMP1, RC // RC = GCstr * //| mov TMP2, LJ_TSTR //| lea RCa, TMP1 // Store temp. TValue in TMP1/TMP2. //| cmp PC_OP, BC_GGET //| jne >1 //| lea RA, [DISPATCH+DISPATCH_GL(tmptv)] // Store fn->l.env in g->tmptv. //| mov [RA], TAB:RB // RB = GCtab * //| mov dword [RA+4], LJ_TTAB //| mov RB, RA //| jmp >2 //| //|->vmeta_tgetb: //| movzx RC, PC_RC //|.if DUALNUM //| mov TMP2, LJ_TISNUM //| mov TMP1, RC //|.elif SSE //| cvtsi2sd xmm0, RC //| movsd TMPQ, xmm0 //|.else //| mov ARG4, RC //| fild ARG4 //| fstp TMPQ //|.endif //| lea RCa, TMPQ // Store temp. TValue in TMPQ. //| jmp >1 //| //|->vmeta_tgetv: //| movzx RC, PC_RC // Reload TValue *k from RC. //| lea RC, [BASE+RC*8] //|1: //| movzx RB, PC_RB // Reload TValue *t from RB. //| lea RB, [BASE+RB*8] //|2: //|.if X64 //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE. //| mov CARG2d, RB //| mov CARG3, RCa // May be 64 bit ptr to stack. //| mov L:RB, L:CARG1d //|.else //| mov ARG2, RB //| mov L:RB, SAVE_L //| mov ARG3, RC //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| call extern lj_meta_tget // (lua_State *L, TValue *o, TValue *k) //| // TValue * (finished) or NULL (metamethod) returned in eax (RC). //| mov BASE, L:RB->base //| test RC, RC //| jz >3 //|->cont_ra: // BASE = base, RC = result //| movzx RA, PC_RA dasm_put(Dst, 913, LJ_TSTR, BC_GGET, DISPATCH_GL(tmptv), LJ_TTAB, Dt1(->base), Dt1(->base)); # 898 "vm_x86.dasc" //|.if X64 //| mov RBa, [RC] //| mov [BASE+RA*8], RBa //|.else //| mov RB, [RC+4] //| mov RC, [RC] //| mov [BASE+RA*8+4], RB //| mov [BASE+RA*8], RC //|.endif //| ins_next //| //|3: // Call __index metamethod. //| // BASE = base, L->top = new base, stack = cont/func/t/k //| mov RA, L:RB->top //| mov [RA-12], PC // [cont|PC] //| lea PC, [RA+FRAME_CONT] //| sub PC, BASE //| mov LFUNC:RB, [RA-8] // Guaranteed to be a function here. //| mov NARGS:RD, 2+1 // 2 args for func(t, k). //| jmp ->vm_call_dispatch_f //| //|//----------------------------------------------------------------------- //| //|->vmeta_tsets: //| mov TMP1, RC // RC = GCstr * //| mov TMP2, LJ_TSTR //| lea RCa, TMP1 // Store temp. TValue in TMP1/TMP2. //| cmp PC_OP, BC_GSET //| jne >1 //| lea RA, [DISPATCH+DISPATCH_GL(tmptv)] // Store fn->l.env in g->tmptv. //| mov [RA], TAB:RB // RB = GCtab * //| mov dword [RA+4], LJ_TTAB //| mov RB, RA //| jmp >2 //| //|->vmeta_tsetb: //| movzx RC, PC_RC //|.if DUALNUM //| mov TMP2, LJ_TISNUM //| mov TMP1, RC //|.elif SSE //| cvtsi2sd xmm0, RC //| movsd TMPQ, xmm0 //|.else //| mov ARG4, RC //| fild ARG4 //| fstp TMPQ //|.endif //| lea RCa, TMPQ // Store temp. TValue in TMPQ. //| jmp >1 //| //|->vmeta_tsetv: //| movzx RC, PC_RC // Reload TValue *k from RC. //| lea RC, [BASE+RC*8] //|1: //| movzx RB, PC_RB // Reload TValue *t from RB. dasm_put(Dst, 1053, Dt1(->top), FRAME_CONT, 2+1, LJ_TSTR, BC_GSET, DISPATCH_GL(tmptv), LJ_TTAB); # 954 "vm_x86.dasc" //| lea RB, [BASE+RB*8] //|2: //|.if X64 //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE. //| mov CARG2d, RB //| mov CARG3, RCa // May be 64 bit ptr to stack. //| mov L:RB, L:CARG1d //|.else //| mov ARG2, RB //| mov L:RB, SAVE_L //| mov ARG3, RC //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| call extern lj_meta_tset // (lua_State *L, TValue *o, TValue *k) //| // TValue * (finished) or NULL (metamethod) returned in eax (RC). //| mov BASE, L:RB->base //| test RC, RC //| jz >3 //| // NOBARRIER: lj_meta_tset ensures the table is not black. //| movzx RA, PC_RA //|.if X64 //| mov RBa, [BASE+RA*8] //| mov [RC], RBa //|.else //| mov RB, [BASE+RA*8+4] //| mov RA, [BASE+RA*8] //| mov [RC+4], RB //| mov [RC], RA //|.endif //|->cont_nop: // BASE = base, (RC = result) //| ins_next //| //|3: // Call __newindex metamethod. //| // BASE = base, L->top = new base, stack = cont/func/t/k/(v) //| mov RA, L:RB->top //| mov [RA-12], PC // [cont|PC] //| movzx RC, PC_RA //| // Copy value to third argument. //|.if X64 //| mov RBa, [BASE+RC*8] //| mov [RA+16], RBa //|.else //| mov RB, [BASE+RC*8+4] //| mov RC, [BASE+RC*8] //| mov [RA+20], RB //| mov [RA+16], RC //|.endif //| lea PC, [RA+FRAME_CONT] //| sub PC, BASE //| mov LFUNC:RB, [RA-8] // Guaranteed to be a function here. //| mov NARGS:RD, 3+1 // 3 args for func(t, k, v). //| jmp ->vm_call_dispatch_f //| //|//-- Comparison metamethods --------------------------------------------- //| //|->vmeta_comp: //|.if X64 //| mov L:RB, SAVE_L //| mov L:RB->base, BASE // Caveat: CARG2d/CARG3d == BASE. //|.if X64WIN //| lea CARG3d, [BASE+RD*8] //| lea CARG2d, [BASE+RA*8] //|.else //| lea CARG2d, [BASE+RA*8] //| lea CARG3d, [BASE+RD*8] //|.endif //| mov CARG1d, L:RB // Caveat: CARG1d/CARG4d == RA. //| movzx CARG4d, PC_OP //|.else //| movzx RB, PC_OP //| lea RD, [BASE+RD*8] //| lea RA, [BASE+RA*8] //| mov ARG4, RB //| mov L:RB, SAVE_L //| mov ARG3, RD //| mov ARG2, RA //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| call extern lj_meta_comp // (lua_State *L, TValue *o1, *o2, int op) //| // 0/1 or TValue * (metamethod) returned in eax (RC). //|3: //| mov BASE, L:RB->base //| cmp RC, 1 //| ja ->vmeta_binop //|4: //| lea PC, [PC+4] //| jb >6 //|5: //| movzx RD, PC_RD dasm_put(Dst, 1187, Dt1(->base), Dt1(->base), Dt1(->top), FRAME_CONT, 3+1, Dt1(->base), Dt1(->base)); # 1048 "vm_x86.dasc" //| branchPC RD //|6: //| ins_next //| //|->cont_condt: // BASE = base, RC = result //| add PC, 4 //| cmp dword [RC+4], LJ_TISTRUECOND // Branch if result is true. //| jb <5 //| jmp <6 //| //|->cont_condf: // BASE = base, RC = result //| cmp dword [RC+4], LJ_TISTRUECOND // Branch if result is false. //| jmp <4 //| //|->vmeta_equal: //| sub PC, 4 //|.if X64WIN //| mov CARG3d, RD //| mov CARG4d, RB //| mov L:RB, SAVE_L //| mov L:RB->base, BASE // Caveat: CARG2d == BASE. //| mov CARG2d, RA //| mov CARG1d, L:RB // Caveat: CARG1d == RA. //|.elif X64 //| mov CARG2d, RA //| mov CARG4d, RB // Caveat: CARG4d == RA. //| mov L:RB, SAVE_L //| mov L:RB->base, BASE // Caveat: CARG3d == BASE. //| mov CARG3d, RD //| mov CARG1d, L:RB //|.else //| mov ARG4, RB //| mov L:RB, SAVE_L //| mov ARG3, RD //| mov ARG2, RA //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| call extern lj_meta_equal // (lua_State *L, GCobj *o1, *o2, int ne) //| // 0/1 or TValue * (metamethod) returned in eax (RC). //| jmp <3 //| //|->vmeta_equal_cd: //|.if FFI //| sub PC, 4 //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| mov FCARG1, L:RB //| mov FCARG2, dword [PC-4] //| mov SAVE_PC, PC //| call extern lj_meta_equal_cd@8 // (lua_State *L, BCIns ins) //| // 0/1 or TValue * (metamethod) returned in eax (RC). //| jmp <3 //|.endif //| //|//-- Arithmetic metamethods --------------------------------------------- //| //|->vmeta_arith_vno: //|.if DUALNUM //| movzx RB, PC_RB //|.endif //|->vmeta_arith_vn: //| lea RC, [KBASE+RC*8] dasm_put(Dst, 1358, -BCBIAS_J*4, LJ_TISTRUECOND, LJ_TISTRUECOND, Dt1(->base), Dt1(->base)); # 1112 "vm_x86.dasc" //| jmp >1 //| //|->vmeta_arith_nvo: //|.if DUALNUM //| movzx RC, PC_RC //|.endif //|->vmeta_arith_nv: //| lea RC, [KBASE+RC*8] //| lea RB, [BASE+RB*8] //| xchg RB, RC //| jmp >2 //| //|->vmeta_unm: //| lea RC, [BASE+RD*8] //| mov RB, RC //| jmp >2 //| //|->vmeta_arith_vvo: //|.if DUALNUM //| movzx RB, PC_RB //|.endif //|->vmeta_arith_vv: //| lea RC, [BASE+RC*8] //|1: //| lea RB, [BASE+RB*8] //|2: //| lea RA, [BASE+RA*8] //|.if X64WIN //| mov CARG3d, RB //| mov CARG4d, RC //| movzx RC, PC_OP //| mov ARG5d, RC //| mov L:RB, SAVE_L //| mov L:RB->base, BASE // Caveat: CARG2d == BASE. //| mov CARG2d, RA //| mov CARG1d, L:RB // Caveat: CARG1d == RA. //|.elif X64 //| movzx CARG5d, PC_OP //| mov CARG2d, RA //| mov CARG4d, RC // Caveat: CARG4d == RA. //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE // Caveat: CARG3d == BASE. //| mov CARG3d, RB //| mov L:RB, L:CARG1d //|.else //| mov ARG3, RB //| mov L:RB, SAVE_L //| mov ARG4, RC //| movzx RC, PC_OP //| mov ARG2, RA //| mov ARG5, RC //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| call extern lj_meta_arith // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) //| // NULL (finished) or TValue * (metamethod) returned in eax (RC). //| mov BASE, L:RB->base //| test RC, RC //| jz ->cont_nop //| //| // Call metamethod for binary op. //|->vmeta_binop: //| // BASE = base, RC = new base, stack = cont/func/o1/o2 //| mov RA, RC //| sub RC, BASE //| mov [RA-12], PC // [cont|PC] //| lea PC, [RC+FRAME_CONT] //| mov NARGS:RD, 2+1 // 2 args for func(o1, o2). //| jmp ->vm_call_dispatch dasm_put(Dst, 1491, Dt1(->base), Dt1(->base), FRAME_CONT, 2+1); # 1182 "vm_x86.dasc" //| //|->vmeta_len: //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| lea FCARG2, [BASE+RD*8] // Caveat: FCARG2 == BASE //| mov L:FCARG1, L:RB //| mov SAVE_PC, PC //| call extern lj_meta_len@8 // (lua_State *L, TValue *o) //| // NULL (retry) or TValue * (metamethod) returned in eax (RC). //| mov BASE, L:RB->base dasm_put(Dst, 1601, Dt1(->base), Dt1(->base)); # 1192 "vm_x86.dasc" #if LJ_52 //| test RC, RC //| jne ->vmeta_binop // Binop call for compatibility. //| movzx RD, PC_RD //| mov TAB:FCARG1, [BASE+RD*8] //| jmp ->BC_LEN_Z dasm_put(Dst, 1632); # 1198 "vm_x86.dasc" #else //| jmp ->vmeta_binop // Binop call for compatibility. dasm_put(Dst, 1651); # 1200 "vm_x86.dasc" #endif //| //|//-- Call metamethod ---------------------------------------------------- //| //|->vmeta_call_ra: //| lea RA, [BASE+RA*8+8] //|->vmeta_call: // Resolve and call __call metamethod. //| // BASE = old base, RA = new base, RC = nargs+1, PC = return //| mov TMP2, RA // Save RA, RC for us. //| mov TMP1, NARGS:RD //| sub RA, 8 //|.if X64 //| mov L:RB, SAVE_L //| mov L:RB->base, BASE // Caveat: CARG2d/CARG3d may be BASE. //| mov CARG2d, RA //| lea CARG3d, [RA+NARGS:RD*8] //| mov CARG1d, L:RB // Caveat: CARG1d may be RA. //|.else //| lea RC, [RA+NARGS:RD*8] //| mov L:RB, SAVE_L //| mov ARG2, RA //| mov ARG3, RC //| mov ARG1, L:RB //| mov L:RB->base, BASE // This is the callers base! //|.endif //| mov SAVE_PC, PC //| call extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) //| mov BASE, L:RB->base //| mov RA, TMP2 //| mov NARGS:RD, TMP1 //| mov LFUNC:RB, [RA-8] //| add NARGS:RD, 1 //| // This is fragile. L->base must not move, KBASE must always be defined. //| cmp KBASE, BASE // Continue with CALLT if flag set. //| je ->BC_CALLT_Z //| mov BASE, RA //| ins_call // Otherwise call resolved metamethod. //| //|//-- Argument coercion for 'for' statement ------------------------------ //| //|->vmeta_for: //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| mov FCARG2, RA // Caveat: FCARG2 == BASE //| mov L:FCARG1, L:RB // Caveat: FCARG1 == RA //| mov SAVE_PC, PC //| call extern lj_meta_for@8 // (lua_State *L, TValue *base) //| mov BASE, L:RB->base //| mov RC, [PC-4] //| movzx RA, RCH //| movzx OP, RCL //| shr RC, 16 //|.if X64 //| jmp aword [DISPATCH+OP*8+GG_DISP2STATIC] // Retry FORI or JFORI. //|.else //| jmp aword [DISPATCH+OP*4+GG_DISP2STATIC] // Retry FORI or JFORI. //|.endif //| //|//----------------------------------------------------------------------- //|//-- Fast functions ----------------------------------------------------- //|//----------------------------------------------------------------------- //| //|.macro .ffunc, name //|->ff_ .. name: //|.endmacro //| //|.macro .ffunc_1, name //|->ff_ .. name: //| cmp NARGS:RD, 1+1; jb ->fff_fallback //|.endmacro //| //|.macro .ffunc_2, name //|->ff_ .. name: //| cmp NARGS:RD, 2+1; jb ->fff_fallback //|.endmacro //| //|.macro .ffunc_n, name //| .ffunc_1 name //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //| fld qword [BASE] //|.endmacro //| //|.macro .ffunc_n, name, op //| .ffunc_1 name //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //| op //| fld qword [BASE] //|.endmacro //| //|.macro .ffunc_nsse, name, op //| .ffunc_1 name //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //| op xmm0, qword [BASE] //|.endmacro //| //|.macro .ffunc_nsse, name //| .ffunc_nsse name, movsd //|.endmacro //| //|.macro .ffunc_nn, name //| .ffunc_2 name //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //| cmp dword [BASE+12], LJ_TISNUM; jae ->fff_fallback //| fld qword [BASE] //| fld qword [BASE+8] //|.endmacro //| //|.macro .ffunc_nnsse, name //| .ffunc_2 name //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //| cmp dword [BASE+12], LJ_TISNUM; jae ->fff_fallback //| movsd xmm0, qword [BASE] //| movsd xmm1, qword [BASE+8] //|.endmacro //| //|.macro .ffunc_nnr, name //| .ffunc_2 name //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //| cmp dword [BASE+12], LJ_TISNUM; jae ->fff_fallback //| fld qword [BASE+8] //| fld qword [BASE] //|.endmacro //| //|// Inlined GC threshold check. Caveat: uses label 1. //|.macro ffgccheck //| mov RB, [DISPATCH+DISPATCH_GL(gc.total)] //| cmp RB, [DISPATCH+DISPATCH_GL(gc.threshold)] //| jb >1 //| call ->fff_gcstep //|1: //|.endmacro //| //|//-- Base library: checks ----------------------------------------------- //| //|.ffunc_1 assert //| mov RB, [BASE+4] //| cmp RB, LJ_TISTRUECOND; jae ->fff_fallback //| mov PC, [BASE-4] //| mov MULTRES, RD //| mov [BASE-4], RB //| mov RB, [BASE] //| mov [BASE-8], RB //| sub RD, 2 //| jz >2 //| mov RA, BASE dasm_put(Dst, 1656, Dt1(->base), Dt1(->base), Dt7(->pc), Dt1(->base), Dt1(->base), GG_DISP2STATIC, 1+1, LJ_TISTRUECOND); # 1345 "vm_x86.dasc" //|1: //| add RA, 8 //|.if X64 //| mov RBa, [RA] //| mov [RA-8], RBa //|.else //| mov RB, [RA+4] //| mov [RA-4], RB //| mov RB, [RA] //| mov [RA-8], RB //|.endif //| sub RD, 1 //| jnz <1 //|2: //| mov RD, MULTRES //| jmp ->fff_res_ //| //|.ffunc_1 type //| mov RB, [BASE+4] //|.if X64 //| mov RA, RB //| sar RA, 15 //| cmp RA, -2 //| je >3 //|.endif //| mov RC, ~LJ_TNUMX //| not RB //| cmp RC, RB //| cmova RC, RB //|2: //| mov CFUNC:RB, [BASE-8] //| mov STR:RC, [CFUNC:RB+RC*8+((char *)(&((GCfuncC *)0)->upvalue))] //| mov PC, [BASE-4] //| mov dword [BASE-4], LJ_TSTR //| mov [BASE-8], STR:RC //| jmp ->fff_res1 //|.if X64 //|3: //| mov RC, ~LJ_TLIGHTUD //| jmp <2 dasm_put(Dst, 1842, 1+1, ~LJ_TNUMX, ((char *)(&((GCfuncC *)0)->upvalue)), LJ_TSTR, ~LJ_TLIGHTUD); # 1385 "vm_x86.dasc" //|.endif //| //|//-- Base library: getters and setters --------------------------------- //| //|.ffunc_1 getmetatable //| mov RB, [BASE+4] //| mov PC, [BASE-4] //| cmp RB, LJ_TTAB; jne >6 //|1: // Field metatable must be at same offset for GCtab and GCudata! //| mov TAB:RB, [BASE] //| mov TAB:RB, TAB:RB->metatable //|2: //| test TAB:RB, TAB:RB //| mov dword [BASE-4], LJ_TNIL //| jz ->fff_res1 //| mov STR:RC, [DISPATCH+DISPATCH_GL(gcroot)+4*(GCROOT_MMNAME+MM_metatable)] //| mov dword [BASE-4], LJ_TTAB // Store metatable as default result. //| mov [BASE-8], TAB:RB //| mov RA, TAB:RB->hmask //| and RA, STR:RC->hash //| imul RA, #NODE //| add NODE:RA, TAB:RB->node dasm_put(Dst, 1946, 1+1, LJ_TTAB, Dt6(->metatable), LJ_TNIL, DISPATCH_GL(gcroot)+4*(GCROOT_MMNAME+MM_metatable), LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node)); # 1407 "vm_x86.dasc" //|3: // Rearranged logic, because we expect _not_ to find the key. //| cmp dword NODE:RA->key.it, LJ_TSTR //| jne >4 //| cmp dword NODE:RA->key.gcr, STR:RC //| je >5 //|4: //| mov NODE:RA, NODE:RA->next //| test NODE:RA, NODE:RA //| jnz <3 //| jmp ->fff_res1 // Not found, keep default result. //|5: //| mov RB, [RA+4] //| cmp RB, LJ_TNIL; je ->fff_res1 // Ditto for nil value. //| mov RC, [RA] //| mov [BASE-4], RB // Return value of mt.__metatable. //| mov [BASE-8], RC //| jmp ->fff_res1 //| //|6: //| cmp RB, LJ_TUDATA; je <1 dasm_put(Dst, 2019, Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), DtB(->next), LJ_TNIL); # 1427 "vm_x86.dasc" //|.if X64 //| cmp RB, LJ_TNUMX; ja >8 //| cmp RB, LJ_TISNUM; jbe >7 //| mov RB, LJ_TLIGHTUD //| jmp >8 //|7: //|.else //| cmp RB, LJ_TISNUM; ja >8 //|.endif //| mov RB, LJ_TNUMX //|8: //| not RB //| mov TAB:RB, [DISPATCH+RB*4+DISPATCH_GL(gcroot[GCROOT_BASEMT])] //| jmp <2 //| //|.ffunc_2 setmetatable dasm_put(Dst, 2084, LJ_TUDATA, LJ_TNUMX, LJ_TISNUM, LJ_TLIGHTUD, LJ_TNUMX, DISPATCH_GL(gcroot[GCROOT_BASEMT]), 2+1); # 1443 "vm_x86.dasc" //| cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback //| // Fast path: no mt for table yet and not clearing the mt. //| mov TAB:RB, [BASE] //| cmp dword TAB:RB->metatable, 0; jne ->fff_fallback //| cmp dword [BASE+12], LJ_TTAB; jne ->fff_fallback //| mov TAB:RC, [BASE+8] //| mov TAB:RB->metatable, TAB:RC //| mov PC, [BASE-4] //| mov dword [BASE-4], LJ_TTAB // Return original table. //| mov [BASE-8], TAB:RB //| test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) //| jz >1 //| // Possible write barrier. Table is black, but skip iswhite(mt) check. //| barrierback TAB:RB, RC dasm_put(Dst, 2140, LJ_TTAB, Dt6(->metatable), LJ_TTAB, Dt6(->metatable), LJ_TTAB, Dt6(->marked), LJ_GC_BLACK, Dt6(->marked), (uint8_t)~LJ_GC_BLACK, DISPATCH_GL(gc.grayagain)); # 1457 "vm_x86.dasc" //|1: //| jmp ->fff_res1 //| //|.ffunc_2 rawget //| cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback //|.if X64WIN //| mov RB, BASE // Save BASE. //| lea CARG3d, [BASE+8] //| mov CARG2d, [BASE] // Caveat: CARG2d == BASE. //| mov CARG1d, SAVE_L //|.elif X64 //| mov RB, BASE // Save BASE. //| mov CARG2d, [BASE] //| lea CARG3d, [BASE+8] // Caveat: CARG3d == BASE. //| mov CARG1d, SAVE_L //|.else //| mov TAB:RD, [BASE] //| mov L:RB, SAVE_L //| mov ARG2, TAB:RD //| mov ARG1, L:RB //| mov RB, BASE // Save BASE. //| add BASE, 8 //| mov ARG3, BASE //|.endif //| call extern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) //| // cTValue * returned in eax (RD). //| mov BASE, RB // Restore BASE. //| // Copy table slot. //|.if X64 //| mov RBa, [RD] //| mov PC, [BASE-4] //| mov [BASE-8], RBa //|.else //| mov RB, [RD] //| mov RD, [RD+4] //| mov PC, [BASE-4] //| mov [BASE-8], RB //| mov [BASE-4], RD //|.endif //| jmp ->fff_res1 //| //|//-- Base library: conversions ------------------------------------------ //| //|.ffunc tonumber //| // Only handles the number case inline (without a base argument). //| cmp NARGS:RD, 1+1; jne ->fff_fallback // Exactly one argument. //| cmp dword [BASE+4], LJ_TISNUM //|.if DUALNUM //| jne >1 //| mov RB, dword [BASE]; jmp ->fff_resi //|1: //| ja ->fff_fallback //|.else //| jae ->fff_fallback //|.endif //|.if SSE //| movsd xmm0, qword [BASE]; jmp ->fff_resxmm0 dasm_put(Dst, 2209, DISPATCH_GL(gc.grayagain), Dt6(->gclist), 2+1, LJ_TTAB, 1+1, LJ_TISNUM); # 1514 "vm_x86.dasc" //|.else //| fld qword [BASE]; jmp ->fff_resn //|.endif //| //|.ffunc_1 tostring //| // Only handles the string or number case inline. //| mov PC, [BASE-4] //| cmp dword [BASE+4], LJ_TSTR; jne >3 //| // A __tostring method in the string base metatable is ignored. //| mov STR:RD, [BASE] //|2: //| mov dword [BASE-4], LJ_TSTR //| mov [BASE-8], STR:RD //| jmp ->fff_res1 //|3: // Handle numbers inline, unless a number base metatable is present. //| cmp dword [BASE+4], LJ_TISNUM; ja ->fff_fallback //| cmp dword [DISPATCH+DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM])], 0 //| jne ->fff_fallback //| ffgccheck // Caveat: uses label 1. dasm_put(Dst, 2295, 1+1, LJ_TSTR, LJ_TSTR, LJ_TISNUM, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM])); # 1533 "vm_x86.dasc" //| mov L:RB, SAVE_L //| mov L:RB->base, BASE // Add frame since C call can throw. //| mov SAVE_PC, PC // Redundant (but a defined value). //|.if X64 and not X64WIN //| mov FCARG2, BASE // Otherwise: FCARG2 == BASE //|.endif //| mov L:FCARG1, L:RB //|.if DUALNUM //| call extern lj_str_fromnumber@8 // (lua_State *L, cTValue *o) //|.else //| call extern lj_str_fromnum@8 // (lua_State *L, lua_Number *np) //|.endif //| // GCstr returned in eax (RD). //| mov BASE, L:RB->base //| jmp <2 //| //|//-- Base library: iterators ------------------------------------------- //| //|.ffunc_1 next //| je >2 // Missing 2nd arg? //|1: //| cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback //| mov L:RB, SAVE_L dasm_put(Dst, 2365, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), 1+1, LJ_TTAB); # 1556 "vm_x86.dasc" //| mov L:RB->base, BASE // Add frame since C call can throw. //| mov L:RB->top, BASE // Dummy frame length is ok. //| mov PC, [BASE-4] //|.if X64WIN //| lea CARG3d, [BASE+8] //| mov CARG2d, [BASE] // Caveat: CARG2d == BASE. //| mov CARG1d, L:RB //|.elif X64 //| mov CARG2d, [BASE] //| lea CARG3d, [BASE+8] // Caveat: CARG3d == BASE. //| mov CARG1d, L:RB //|.else //| mov TAB:RD, [BASE] //| mov ARG2, TAB:RD //| mov ARG1, L:RB //| add BASE, 8 //| mov ARG3, BASE //|.endif //| mov SAVE_PC, PC // Needed for ITERN fallback. //| call extern lj_tab_next // (lua_State *L, GCtab *t, TValue *key) //| // Flag returned in eax (RD). //| mov BASE, L:RB->base //| test RD, RD; jz >3 // End of traversal? //| // Copy key and value to results. //|.if X64 //| mov RBa, [BASE+8] //| mov RDa, [BASE+16] //| mov [BASE-8], RBa //| mov [BASE], RDa //|.else //| mov RB, [BASE+8] //| mov RD, [BASE+12] //| mov [BASE-8], RB //| mov [BASE-4], RD //| mov RB, [BASE+16] //| mov RD, [BASE+20] //| mov [BASE], RB //| mov [BASE+4], RD //|.endif //|->fff_res2: //| mov RD, 1+2 //| jmp ->fff_res //|2: // Set missing 2nd arg to nil. //| mov dword [BASE+12], LJ_TNIL //| jmp <1 //|3: // End of traversal: return nil. //| mov dword [BASE-4], LJ_TNIL //| jmp ->fff_res1 //| //|.ffunc_1 pairs //| mov TAB:RB, [BASE] dasm_put(Dst, 2435, Dt1(->base), Dt1(->top), Dt1(->base), 1+2, LJ_TNIL, LJ_TNIL, 1+1); # 1607 "vm_x86.dasc" //| cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback dasm_put(Dst, 2530, LJ_TTAB); # 1608 "vm_x86.dasc" #if LJ_52 //| cmp dword TAB:RB->metatable, 0; jne ->fff_fallback dasm_put(Dst, 2542, Dt6(->metatable)); # 1610 "vm_x86.dasc" #endif //| mov CFUNC:RB, [BASE-8] //| mov CFUNC:RD, CFUNC:RB->upvalue[0] //| mov PC, [BASE-4] //| mov dword [BASE-4], LJ_TFUNC //| mov [BASE-8], CFUNC:RD //| mov dword [BASE+12], LJ_TNIL //| mov RD, 1+3 //| jmp ->fff_res //| //|.ffunc_1 ipairs_aux //| cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback //| cmp dword [BASE+12], LJ_TISNUM //|.if DUALNUM //| jne ->fff_fallback //|.else //| jae ->fff_fallback //|.endif //| mov PC, [BASE-4] //|.if DUALNUM //| mov RD, dword [BASE+8] //| add RD, 1 //| mov dword [BASE-4], LJ_TISNUM //| mov dword [BASE-8], RD //|.elif SSE //| movsd xmm0, qword [BASE+8] //| sseconst_1 xmm1, RBa //| addsd xmm0, xmm1 //| cvtsd2si RD, xmm0 //| movsd qword [BASE-8], xmm0 //|.else //| fld qword [BASE+8] //| fld1 //| faddp st1 //| fist ARG1 //| fstp qword [BASE-8] //| mov RD, ARG1 //|.endif //| mov TAB:RB, [BASE] //| cmp RD, TAB:RB->asize; jae >2 // Not in array part? //| shl RD, 3 dasm_put(Dst, 2551, Dt8(->upvalue[0]), LJ_TFUNC, LJ_TNIL, 1+3, 1+1, LJ_TTAB, LJ_TISNUM, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), Dt6(->asize)); # 1651 "vm_x86.dasc" //| add RD, TAB:RB->array //|1: //| cmp dword [RD+4], LJ_TNIL; je ->fff_res0 //| // Copy array slot. //|.if X64 //| mov RBa, [RD] //| mov [BASE], RBa //|.else //| mov RB, [RD] //| mov RD, [RD+4] //| mov [BASE], RB //| mov [BASE+4], RD //|.endif //| jmp ->fff_res2 //|2: // Check for empty hash part first. Otherwise call C function. //| cmp dword TAB:RB->hmask, 0; je ->fff_res0 //| mov FCARG1, TAB:RB //| mov RB, BASE // Save BASE. //| mov FCARG2, RD // Caveat: FCARG2 == BASE //| call extern lj_tab_getinth@8 // (GCtab *t, int32_t key) //| // cTValue * or NULL returned in eax (RD). //| mov BASE, RB //| test RD, RD //| jnz <1 //|->fff_res0: //| mov RD, 1+0 //| jmp ->fff_res //| //|.ffunc_1 ipairs //| mov TAB:RB, [BASE] dasm_put(Dst, 2655, Dt6(->array), LJ_TNIL, Dt6(->hmask), 1+0, 1+1); # 1681 "vm_x86.dasc" //| cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback dasm_put(Dst, 2530, LJ_TTAB); # 1682 "vm_x86.dasc" #if LJ_52 //| cmp dword TAB:RB->metatable, 0; jne ->fff_fallback dasm_put(Dst, 2542, Dt6(->metatable)); # 1684 "vm_x86.dasc" #endif //| mov CFUNC:RB, [BASE-8] //| mov CFUNC:RD, CFUNC:RB->upvalue[0] //| mov PC, [BASE-4] //| mov dword [BASE-4], LJ_TFUNC //| mov [BASE-8], CFUNC:RD //|.if DUALNUM //| mov dword [BASE+12], LJ_TISNUM //| mov dword [BASE+8], 0 //|.elif SSE //| xorps xmm0, xmm0 //| movsd qword [BASE+8], xmm0 //|.else //| fldz //| fstp qword [BASE+8] //|.endif //| mov RD, 1+3 //| jmp ->fff_res //| //|//-- Base library: catch errors ---------------------------------------- //| //|.ffunc_1 pcall //| lea RA, [BASE+8] //| sub NARGS:RD, 1 //| mov PC, 8+FRAME_PCALL //|1: //| movzx RB, byte [DISPATCH+DISPATCH_GL(hookmask)] //| shr RB, HOOK_ACTIVE_SHIFT //| and RB, 1 //| add PC, RB // Remember active hook before pcall. //| jmp ->vm_call_dispatch //| //|.ffunc_2 xpcall //| cmp dword [BASE+12], LJ_TFUNC; jne ->fff_fallback dasm_put(Dst, 2731, Dt8(->upvalue[0]), LJ_TFUNC, 1+3, 1+1, 8+FRAME_PCALL, DISPATCH_GL(hookmask), HOOK_ACTIVE_SHIFT, 2+1, LJ_TFUNC); # 1718 "vm_x86.dasc" //| mov RB, [BASE+4] // Swap function and traceback. //| mov [BASE+12], RB //| mov dword [BASE+4], LJ_TFUNC //| mov LFUNC:RB, [BASE] //| mov PC, [BASE+8] //| mov [BASE+8], LFUNC:RB //| mov [BASE], PC //| lea RA, [BASE+16] //| sub NARGS:RD, 2 //| mov PC, 16+FRAME_PCALL //| jmp <1 //| //|//-- Coroutine library -------------------------------------------------- //| //|.macro coroutine_resume_wrap, resume //|.if resume //|.ffunc_1 coroutine_resume //| mov L:RB, [BASE] //|.else //|.ffunc coroutine_wrap_aux //| mov CFUNC:RB, [BASE-8] //| mov L:RB, CFUNC:RB->upvalue[0].gcr //|.endif //| mov PC, [BASE-4] //| mov SAVE_PC, PC //|.if X64 //| mov TMP1, L:RB //|.else //| mov ARG1, L:RB //|.endif //|.if resume //| cmp dword [BASE+4], LJ_TTHREAD; jne ->fff_fallback //|.endif //| cmp aword L:RB->cframe, 0; jne ->fff_fallback //| cmp byte L:RB->status, LUA_YIELD; ja ->fff_fallback //| mov RA, L:RB->top //| je >1 // Status != LUA_YIELD (i.e. 0)? //| cmp RA, L:RB->base // Check for presence of initial func. //| je ->fff_fallback //|1: //|.if resume //| lea PC, [RA+NARGS:RD*8-16] // Check stack space (-1-thread). //|.else //| lea PC, [RA+NARGS:RD*8-8] // Check stack space (-1). //|.endif //| cmp PC, L:RB->maxstack; ja ->fff_fallback //| mov L:RB->top, PC //| //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //|.if resume //| add BASE, 8 // Keep resumed thread in stack for GC. //|.endif //| mov L:RB->top, BASE //|.if resume //| lea RB, [BASE+NARGS:RD*8-24] // RB = end of source for stack move. //|.else //| lea RB, [BASE+NARGS:RD*8-16] // RB = end of source for stack move. //|.endif //| sub RBa, PCa // Relative to PC. //| //| cmp PC, RA //| je >3 //|2: // Move args to coroutine. //|.if X64 //| mov RCa, [PC+RB] //| mov [PC-8], RCa //|.else //| mov RC, [PC+RB+4] //| mov [PC-4], RC //| mov RC, [PC+RB] //| mov [PC-8], RC //|.endif //| sub PC, 8 //| cmp PC, RA //| jne <2 //|3: //|.if X64 //| mov CARG2d, RA //| mov CARG1d, TMP1 //|.else //| mov ARG2, RA //| xor RA, RA //| mov ARG4, RA //| mov ARG3, RA //|.endif //| call ->vm_resume // (lua_State *L, TValue *base, 0, 0) //| set_vmstate INTERP //| //| mov L:RB, SAVE_L //|.if X64 //| mov L:PC, TMP1 //|.else //| mov L:PC, ARG1 // The callee doesn't modify SAVE_L. //|.endif //| mov BASE, L:RB->base //| cmp eax, LUA_YIELD //| ja >8 //|4: //| mov RA, L:PC->base //| mov KBASE, L:PC->top //| mov L:PC->top, RA // Clear coroutine stack. //| mov PC, KBASE //| sub PC, RA //| je >6 // No results? //| lea RD, [BASE+PC] //| shr PC, 3 //| cmp RD, L:RB->maxstack //| ja >9 // Need to grow stack? //| //| mov RB, BASE //| sub RBa, RAa //|5: // Move results from coroutine. //|.if X64 //| mov RDa, [RA] //| mov [RA+RB], RDa //|.else //| mov RD, [RA] //| mov [RA+RB], RD //| mov RD, [RA+4] //| mov [RA+RB+4], RD //|.endif //| add RA, 8 //| cmp RA, KBASE //| jne <5 //|6: //|.if resume //| lea RD, [PC+2] // nresults+1 = 1 + true + results. //| mov dword [BASE-4], LJ_TTRUE // Prepend true to results. //|.else //| lea RD, [PC+1] // nresults+1 = 1 + results. //|.endif //|7: //| mov PC, SAVE_PC //| mov MULTRES, RD //|.if resume //| mov RAa, -8 //|.else //| xor RA, RA //|.endif //| test PC, FRAME_TYPE //| jz ->BC_RET_Z //| jmp ->vm_return //| //|8: // Coroutine returned with error (at co->top-1). //|.if resume //| mov dword [BASE-4], LJ_TFALSE // Prepend false to results. //| mov RA, L:PC->top //| sub RA, 8 //| mov L:PC->top, RA // Clear error from coroutine stack. //| // Copy error message. //|.if X64 //| mov RDa, [RA] //| mov [BASE], RDa //|.else //| mov RD, [RA] //| mov [BASE], RD //| mov RD, [RA+4] //| mov [BASE+4], RD //|.endif //| mov RD, 1+2 // nresults+1 = 1 + false + error. //| jmp <7 //|.else //| mov FCARG2, L:PC //| mov FCARG1, L:RB //| call extern lj_ffh_coroutine_wrap_err@8 // (lua_State *L, lua_State *co) //| // Error function does not return. //|.endif //| //|9: // Handle stack expansion on return from yield. //|.if X64 //| mov L:RA, TMP1 //|.else //| mov L:RA, ARG1 // The callee doesn't modify SAVE_L. //|.endif //| mov L:RA->top, KBASE // Undo coroutine stack clearing. //| mov FCARG2, PC //| mov FCARG1, L:RB //| call extern lj_state_growstack@8 // (lua_State *L, int n) //|.if X64 //| mov L:PC, TMP1 //|.else //| mov L:PC, ARG1 //|.endif //| mov BASE, L:RB->base //| jmp <4 // Retry the stack move. //|.endmacro //| //| coroutine_resume_wrap 1 // coroutine.resume dasm_put(Dst, 2821, LJ_TFUNC, 16+FRAME_PCALL, 1+1, LJ_TTHREAD, Dt1(->cframe), Dt1(->status), LUA_YIELD); dasm_put(Dst, 2907, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); dasm_put(Dst, 2996, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack), LJ_TTRUE); # 1907 "vm_x86.dasc" //| coroutine_resume_wrap 0 // coroutine.wrap dasm_put(Dst, 3093, FRAME_TYPE, LJ_TFALSE, Dt1(->top), Dt1(->top), 1+2, Dt1(->top), Dt1(->base), Dt8(->upvalue[0].gcr), Dt1(->cframe)); dasm_put(Dst, 3207, Dt1(->status), LUA_YIELD, Dt1(->top), Dt1(->base), Dt1(->maxstack), Dt1(->top), Dt1(->base), Dt1(->top)); dasm_put(Dst, 3277, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), LUA_YIELD, Dt1(->base), Dt1(->top), Dt1(->top), Dt1(->maxstack)); # 1908 "vm_x86.dasc" //| //|.ffunc coroutine_yield //| mov L:RB, SAVE_L //| test aword L:RB->cframe, CFRAME_RESUME //| jz ->fff_fallback //| mov L:RB->base, BASE dasm_put(Dst, 3366, FRAME_TYPE, Dt1(->top), Dt1(->base), Dt1(->cframe), CFRAME_RESUME); # 1914 "vm_x86.dasc" //| lea RD, [BASE+NARGS:RD*8-8] //| mov L:RB->top, RD //| xor RD, RD //| mov aword L:RB->cframe, RDa //| mov al, LUA_YIELD //| mov byte L:RB->status, al //| jmp ->vm_leave_unw //| //|//-- Math library ------------------------------------------------------- //| //|.if not DUALNUM //|->fff_resi: // Dummy. //|.endif //| //|.if SSE //|->fff_resn: //| mov PC, [BASE-4] //| fstp qword [BASE-8] //| jmp ->fff_res1 //|.endif //| //| .ffunc_1 math_abs //|.if DUALNUM //| cmp dword [BASE+4], LJ_TISNUM; jne >2 //| mov RB, dword [BASE] //| cmp RB, 0; jns ->fff_resi //| neg RB; js >1 //|->fff_resbit: //|->fff_resi: //| mov PC, [BASE-4] //| mov dword [BASE-4], LJ_TISNUM //| mov dword [BASE-8], RB //| jmp ->fff_res1 //|1: //| mov PC, [BASE-4] //| mov dword [BASE-4], 0x41e00000 // 2^31. //| mov dword [BASE-8], 0 //| jmp ->fff_res1 //|2: //| ja ->fff_fallback //|.else //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //|.endif //| //|.if SSE //| movsd xmm0, qword [BASE] //| sseconst_abs xmm1, RDa dasm_put(Dst, 3476, Dt1(->base), Dt1(->top), Dt1(->cframe), LUA_YIELD, Dt1(->status), 1+1, LJ_TISNUM, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); # 1961 "vm_x86.dasc" //| andps xmm0, xmm1 //|->fff_resxmm0: //| mov PC, [BASE-4] //| movsd qword [BASE-8], xmm0 //| // fallthrough //|.else //| fld qword [BASE] //| fabs //| // fallthrough //|->fff_resxmm0: // Dummy. //|->fff_resn: //| mov PC, [BASE-4] //| fstp qword [BASE-8] //|.endif //| //|->fff_res1: //| mov RD, 1+1 //|->fff_res: //| mov MULTRES, RD //|->fff_res_: //| test PC, FRAME_TYPE //| jnz >7 //|5: //| cmp PC_RB, RDL // More results expected? //| ja >6 //| // Adjust BASE. KBASE is assumed to be set for the calling frame. //| movzx RA, PC_RA //| not RAa // Note: ~RA = -(RA+1) //| lea BASE, [BASE+RA*8] // base = base - (RA+1)*8 //| ins_next //| //|6: // Fill up results with nil. //| mov dword [BASE+RD*8-12], LJ_TNIL //| add RD, 1 //| jmp <5 //| //|7: // Non-standard return case. //| mov RAa, -8 // Results start at BASE+RA = BASE-8. //| jmp ->vm_return //| //|.macro math_round, func //| .ffunc math_ .. func //|.if DUALNUM //| cmp dword [BASE+4], LJ_TISNUM; jne >1 //| mov RB, dword [BASE]; jmp ->fff_resi //|1: //| ja ->fff_fallback //|.else //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //|.endif //|.if SSE //| movsd xmm0, qword [BASE] //| call ->vm_ .. func //| .if DUALNUM //| cvtsd2si RB, xmm0 //| cmp RB, 0x80000000 //| jne ->fff_resi //| cvtsi2sd xmm1, RB //| ucomisd xmm0, xmm1 //| jp ->fff_resxmm0 //| je ->fff_resi //| .endif //| jmp ->fff_resxmm0 //|.else //| fld qword [BASE] //| call ->vm_ .. func //| .if DUALNUM //| fist ARG1 //| mov RB, ARG1 //| cmp RB, 0x80000000; jne >2 //| fdup //| fild ARG1 //| fcomparepp //| jp ->fff_resn //| jne ->fff_resn //|2: //| fpop //| jmp ->fff_resi //| .else //| jmp ->fff_resn //| .endif //|.endif //|.endmacro //| //| math_round floor dasm_put(Dst, 3547, 1+1, FRAME_TYPE, LJ_TNIL, LJ_TISNUM); # 2046 "vm_x86.dasc" //| math_round ceil //| //|.if SSE //|.ffunc_nsse math_sqrt, sqrtsd; jmp ->fff_resxmm0 dasm_put(Dst, 3670, LJ_TISNUM, 1+1, LJ_TISNUM); # 2050 "vm_x86.dasc" //|.else //|.ffunc_n math_sqrt; fsqrt; jmp ->fff_resn //|.endif //| //|.ffunc math_log //| cmp NARGS:RD, 1+1; jne ->fff_fallback // Exactly one argument. //| cmp dword [BASE+4], LJ_TISNUM; jae ->fff_fallback //| fldln2; fld qword [BASE]; fyl2x; jmp ->fff_resn //| //|.ffunc_n math_log10, fldlg2; fyl2x; jmp ->fff_resn //|.ffunc_n math_exp; call ->vm_exp_x87; jmp ->fff_resn dasm_put(Dst, 3729, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); # 2061 "vm_x86.dasc" //| //|.ffunc_n math_sin; fsin; jmp ->fff_resn //|.ffunc_n math_cos; fcos; jmp ->fff_resn dasm_put(Dst, 3803, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); # 2064 "vm_x86.dasc" //|.ffunc_n math_tan; fptan; fpop; jmp ->fff_resn //| //|.ffunc_n math_asin dasm_put(Dst, 3860, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1); # 2067 "vm_x86.dasc" //| fdup; fmul st0; fld1; fsubrp st1; fsqrt; fpatan //| jmp ->fff_resn //|.ffunc_n math_acos //| fdup; fmul st0; fld1; fsubrp st1; fsqrt; fxch; fpatan //| jmp ->fff_resn //|.ffunc_n math_atan; fld1; fpatan; jmp ->fff_resn dasm_put(Dst, 3927, LJ_TISNUM, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); # 2073 "vm_x86.dasc" //| //|.macro math_extern, func //|.if SSE //| .ffunc_nsse math_ .. func //| .if not X64 //| movsd FPARG1, xmm0 //| .endif //|.else //| .ffunc_n math_ .. func //| fstp FPARG1 //|.endif //| mov RB, BASE //| call extern lj_vm_ .. func //| mov BASE, RB //| .if X64 //| jmp ->fff_resxmm0 //| .else //| jmp ->fff_resn //| .endif //|.endmacro //| //| math_extern sinh //| math_extern cosh //| math_extern tanh dasm_put(Dst, 4017, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM); # 2097 "vm_x86.dasc" //| //|->ff_math_deg: //|.if SSE //|.ffunc_nsse math_rad //| mov CFUNC:RB, [BASE-8] //| mulsd xmm0, qword CFUNC:RB->upvalue[0] //| jmp ->fff_resxmm0 //|.else //|.ffunc_n math_rad //| mov CFUNC:RB, [BASE-8] //| fmul qword CFUNC:RB->upvalue[0] //| jmp ->fff_resn //|.endif //| //|.ffunc_nn math_atan2; fpatan; jmp ->fff_resn dasm_put(Dst, 4105, 1+1, LJ_TISNUM, 1+1, LJ_TISNUM, Dt8(->upvalue[0])); # 2112 "vm_x86.dasc" //|.ffunc_nnr math_ldexp; fscale; fpop1; jmp ->fff_resn dasm_put(Dst, 4183, 2+1, LJ_TISNUM, LJ_TISNUM, 2+1, LJ_TISNUM, LJ_TISNUM); # 2113 "vm_x86.dasc" //| //|.ffunc_1 math_frexp //| mov RB, [BASE+4] //| cmp RB, LJ_TISNUM; jae ->fff_fallback //| mov PC, [BASE-4] //| mov RC, [BASE] //| mov [BASE-4], RB; mov [BASE-8], RC //| shl RB, 1; cmp RB, 0xffe00000; jae >3 //| or RC, RB; jz >3 //| mov RC, 1022 //| cmp RB, 0x00200000; jb >4 //|1: //| shr RB, 21; sub RB, RC // Extract and unbias exponent. //|.if SSE //| cvtsi2sd xmm0, RB //|.else //| mov TMP1, RB; fild TMP1 //|.endif //| mov RB, [BASE-4] //| and RB, 0x800fffff // Mask off exponent. //| or RB, 0x3fe00000 // Put mantissa in range [0.5,1) or 0. //| mov [BASE-4], RB //|2: //|.if SSE //| movsd qword [BASE], xmm0 //|.else //| fstp qword [BASE] //|.endif //| mov RD, 1+2 //| jmp ->fff_res //|3: // Return +-0, +-Inf, NaN unmodified and an exponent of 0. //|.if SSE //| xorps xmm0, xmm0; jmp <2 dasm_put(Dst, 4250, 1+1, LJ_TISNUM, 1+2); # 2146 "vm_x86.dasc" //|.else //| fldz; jmp <2 //|.endif //|4: // Handle denormals by multiplying with 2^54 and adjusting the bias. //|.if SSE //| movsd xmm0, qword [BASE] //| sseconst_hi xmm1, RBa, 43500000 // 2^54. //| mulsd xmm0, xmm1 //| movsd qword [BASE-8], xmm0 //|.else //| fld qword [BASE] //| mov TMP1, 0x5a800000; fmul TMP1 // x = x*2^54 //| fstp qword [BASE-8] //|.endif //| mov RB, [BASE-4]; mov RC, 1076; shl RB, 1; jmp <1 //| //|.if SSE //|.ffunc_nsse math_modf //|.else //|.ffunc_n math_modf //|.endif //| mov RB, [BASE+4] //| mov PC, [BASE-4] //| shl RB, 1; cmp RB, 0xffe00000; je >4 // +-Inf? //|.if SSE //| movaps xmm4, xmm0 //| call ->vm_trunc //| subsd xmm4, xmm0 //|1: //| movsd qword [BASE-8], xmm0 //| movsd qword [BASE], xmm4 //|.else //| fdup //| call ->vm_trunc //| fsub st1, st0 //|1: //| fstp qword [BASE-8] //| fstp qword [BASE] //|.endif //| mov RC, [BASE-4]; mov RB, [BASE+4] //| xor RC, RB; js >3 // Need to adjust sign? //|2: //| mov RD, 1+2 dasm_put(Dst, 4387, (unsigned int)(U64x(43500000,00000000)), (unsigned int)((U64x(43500000,00000000))>>32), 1+1, LJ_TISNUM); # 2189 "vm_x86.dasc" //| jmp ->fff_res //|3: //| xor RB, 0x80000000; mov [BASE+4], RB // Flip sign of fraction. //| jmp <2 //|4: //|.if SSE //| xorps xmm4, xmm4; jmp <1 // Return +-Inf and +-0. //|.else //| fldz; fxch; jmp <1 // Return +-Inf and +-0. //|.endif //| //|.ffunc_nnr math_fmod //|1: ; fprem; fnstsw ax; sahf; jp <1 dasm_put(Dst, 4523, 1+2, 2+1, LJ_TISNUM, LJ_TISNUM); # 2202 "vm_x86.dasc" //| fpop1 //| jmp ->fff_resn //| //|.if SSE //|.ffunc_nnsse math_pow; call ->vm_pow; jmp ->fff_resxmm0 //|.else //|.ffunc_nn math_pow; call ->vm_pow; jmp ->fff_resn //|.endif //| //|.macro math_minmax, name, cmovop, fcmovop, sseop //| .ffunc name //| mov RA, 2 //| cmp dword [BASE+4], LJ_TISNUM //|.if DUALNUM //| jne >4 //| mov RB, dword [BASE] //|1: // Handle integers. //| cmp RA, RD; jae ->fff_resi //| cmp dword [BASE+RA*8-4], LJ_TISNUM; jne >3 //| cmp RB, dword [BASE+RA*8-8] //| cmovop RB, dword [BASE+RA*8-8] //| add RA, 1 //| jmp <1 //|3: //| ja ->fff_fallback //| // Convert intermediate result to number and continue below. //|.if SSE //| cvtsi2sd xmm0, RB //|.else //| mov TMP1, RB //| fild TMP1 //|.endif //| jmp >6 //|4: //| ja ->fff_fallback //|.else //| jae ->fff_fallback //|.endif //| //|.if SSE //| movsd xmm0, qword [BASE] //|5: // Handle numbers or integers. //| cmp RA, RD; jae ->fff_resxmm0 //| cmp dword [BASE+RA*8-4], LJ_TISNUM //|.if DUALNUM //| jb >6 //| ja ->fff_fallback //| cvtsi2sd xmm1, dword [BASE+RA*8-8] //| jmp >7 //|.else //| jae ->fff_fallback //|.endif //|6: //| movsd xmm1, qword [BASE+RA*8-8] //|7: //| sseop xmm0, xmm1 //| add RA, 1 //| jmp <5 //|.else //| fld qword [BASE] //|5: // Handle numbers or integers. //| cmp RA, RD; jae ->fff_resn //| cmp dword [BASE+RA*8-4], LJ_TISNUM //|.if DUALNUM //| jb >6 //| ja >9 //| fild dword [BASE+RA*8-8] //| jmp >7 //|.else //| jae >9 //|.endif //|6: //| fld qword [BASE+RA*8-8] //|7: //| fucomi st1; fcmovop st1; fpop1 //| add RA, 1 //| jmp <5 //|.endif //|.endmacro //| //| math_minmax math_min, cmovg, fcmovnbe, minsd dasm_put(Dst, 4590, 2+1, LJ_TISNUM, LJ_TISNUM, LJ_TISNUM); # 2283 "vm_x86.dasc" //| math_minmax math_max, cmovl, fcmovbe, maxsd dasm_put(Dst, 4665, LJ_TISNUM, LJ_TISNUM, LJ_TISNUM); # 2284 "vm_x86.dasc" //|.if not SSE //|9: //| fpop; jmp ->fff_fallback //|.endif //| //|//-- String library ----------------------------------------------------- //| //|.ffunc_1 string_len //| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback //| mov STR:RB, [BASE] //|.if DUALNUM //| mov RB, dword STR:RB->len; jmp ->fff_resi //|.elif SSE //| cvtsi2sd xmm0, dword STR:RB->len; jmp ->fff_resxmm0 //|.else //| fild dword STR:RB->len; jmp ->fff_resn //|.endif //| //|.ffunc string_byte // Only handle the 1-arg case here. //| cmp NARGS:RD, 1+1; jne ->fff_fallback //| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback dasm_put(Dst, 4754, 1+1, LJ_TSTR, Dt5(->len), 1+1); # 2305 "vm_x86.dasc" //| mov STR:RB, [BASE] //| mov PC, [BASE-4] //| cmp dword STR:RB->len, 1 //| jb ->fff_res0 // Return no results for empty string. //| movzx RB, byte STR:RB[1] //|.if DUALNUM //| jmp ->fff_resi //|.elif SSE //| cvtsi2sd xmm0, RB; jmp ->fff_resxmm0 //|.else //| mov TMP1, RB; fild TMP1; jmp ->fff_resn //|.endif //| //|.ffunc string_char // Only handle the 1-arg case here. //| ffgccheck //| cmp NARGS:RD, 1+1; jne ->fff_fallback // *Exactly* 1 arg. //| cmp dword [BASE+4], LJ_TISNUM dasm_put(Dst, 4824, LJ_TSTR, Dt5(->len), Dt5([1]), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+1); # 2322 "vm_x86.dasc" //|.if DUALNUM //| jne ->fff_fallback //| mov RB, dword [BASE] //| cmp RB, 255; ja ->fff_fallback //| mov TMP2, RB //|.elif SSE //| jae ->fff_fallback //| cvttsd2si RB, qword [BASE] //| cmp RB, 255; ja ->fff_fallback //| mov TMP2, RB //|.else //| jae ->fff_fallback //| fld qword [BASE] //| fistp TMP2 //| cmp TMP2, 255; ja ->fff_fallback //|.endif //|.if X64 //| mov TMP3, 1 //|.else //| mov ARG3, 1 //|.endif //| lea RDa, TMP2 // Points to stack. Little-endian. //|->fff_newstr: //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //|.if X64 //| mov CARG3d, TMP3 // Zero-extended to size_t. //| mov CARG2, RDa // May be 64 bit ptr to stack. //| mov CARG1d, L:RB //|.else //| mov ARG2, RD //| mov ARG1, L:RB //|.endif //| mov SAVE_PC, PC //| call extern lj_str_new // (lua_State *L, char *str, size_t l) //| // GCstr * returned in eax (RD). //| mov BASE, L:RB->base //| mov PC, [BASE-4] //| mov dword [BASE-4], LJ_TSTR //| mov [BASE-8], STR:RD //| jmp ->fff_res1 //| //|.ffunc string_sub //| ffgccheck //| mov TMP2, -1 //| cmp NARGS:RD, 1+2; jb ->fff_fallback dasm_put(Dst, 4888, LJ_TISNUM, Dt1(->base), Dt1(->base), LJ_TSTR, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 1+2); # 2368 "vm_x86.dasc" //| jna >1 //| cmp dword [BASE+20], LJ_TISNUM //|.if DUALNUM //| jne ->fff_fallback //| mov RB, dword [BASE+16] //| mov TMP2, RB //|.elif SSE //| jae ->fff_fallback //| cvttsd2si RB, qword [BASE+16] //| mov TMP2, RB //|.else //| jae ->fff_fallback //| fld qword [BASE+16] //| fistp TMP2 //|.endif //|1: //| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback //| cmp dword [BASE+12], LJ_TISNUM //|.if DUALNUM //| jne ->fff_fallback //|.else //| jae ->fff_fallback //|.endif //| mov STR:RB, [BASE] //| mov TMP3, STR:RB //| mov RB, STR:RB->len //|.if DUALNUM //| mov RA, dword [BASE+8] //|.elif SSE //| cvttsd2si RA, qword [BASE+8] //|.else //| fld qword [BASE+8] //| fistp ARG3 //| mov RA, ARG3 //|.endif //| mov RC, TMP2 //| cmp RB, RC // len < end? (unsigned compare) //| jb >5 //|2: //| test RA, RA // start <= 0? //| jle >7 //|3: //| mov STR:RB, TMP3 dasm_put(Dst, 5014, LJ_TISNUM, LJ_TSTR, LJ_TISNUM, Dt5(->len)); # 2411 "vm_x86.dasc" //| sub RC, RA // start > end? //| jl ->fff_emptystr //| lea RB, [STR:RB+RA+#STR-1] //| add RC, 1 //|4: //|.if X64 //| mov TMP3, RC //|.else //| mov ARG3, RC //|.endif //| mov RD, RB //| jmp ->fff_newstr //| //|5: // Negative end or overflow. //| jl >6 //| lea RC, [RC+RB+1] // end = end+(len+1) //| jmp <2 //|6: // Overflow. //| mov RC, RB // end = len //| jmp <2 //| //|7: // Negative start or underflow. //| je >8 //| add RA, RB // start = start+(len+1) //| add RA, 1 //| jg <3 // start > 0? //|8: // Underflow. //| mov RA, 1 // start = 1 dasm_put(Dst, 5097, sizeof(GCstr)-1); # 2439 "vm_x86.dasc" //| jmp <3 //| //|->fff_emptystr: // Range underflow. //| xor RC, RC // Zero length. Any ptr in RB is ok. //| jmp <4 //| //|.ffunc string_rep // Only handle the 1-char case inline. //| ffgccheck //| cmp NARGS:RD, 2+1; jne ->fff_fallback // Exactly 2 arguments. //| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback //| cmp dword [BASE+12], LJ_TISNUM //| mov STR:RB, [BASE] dasm_put(Dst, 5168, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), 2+1, LJ_TSTR, LJ_TISNUM); # 2451 "vm_x86.dasc" //|.if DUALNUM //| jne ->fff_fallback //| mov RC, dword [BASE+8] //|.elif SSE //| jae ->fff_fallback //| cvttsd2si RC, qword [BASE+8] //|.else //| jae ->fff_fallback //| fld qword [BASE+8] //| fistp TMP2 //| mov RC, TMP2 //|.endif //| test RC, RC //| jle ->fff_emptystr // Count <= 0? (or non-int) //| cmp dword STR:RB->len, 1 //| jb ->fff_emptystr // Zero length string? //| jne ->fff_fallback_2 // Fallback for > 1-char strings. //| cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_2 //| movzx RA, byte STR:RB[1] //| mov RB, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] //|.if X64 //| mov TMP3, RC //|.else //| mov ARG3, RC //|.endif //|1: // Fill buffer with char. Yes, this is suboptimal code (do you care?). //| mov [RB], RAL //| add RB, 1 //| sub RC, 1 //| jnz <1 //| mov RD, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] //| jmp ->fff_newstr //| //|.ffunc_1 string_reverse dasm_put(Dst, 5227, Dt5(->len), DISPATCH_GL(tmpbuf.sz), Dt5([1]), DISPATCH_GL(tmpbuf.buf), DISPATCH_GL(tmpbuf.buf)); # 2485 "vm_x86.dasc" //| ffgccheck //| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback //| mov STR:RB, [BASE] //| mov RC, STR:RB->len //| test RC, RC //| jz ->fff_emptystr // Zero length string? //| cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1 //| add RB, #STR //| mov TMP2, PC // Need another temp register. dasm_put(Dst, 5303, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr)); # 2494 "vm_x86.dasc" //|.if X64 //| mov TMP3, RC //|.else //| mov ARG3, RC //|.endif //| mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] //|1: //| movzx RA, byte [RB] //| add RB, 1 //| sub RC, 1 //| mov [PC+RC], RAL //| jnz <1 //| mov RD, PC //| mov PC, TMP2 //| jmp ->fff_newstr //| //|.macro ffstring_case, name, lo, hi //| .ffunc_1 name //| ffgccheck //| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback //| mov STR:RB, [BASE] //| mov RC, STR:RB->len //| cmp [DISPATCH+DISPATCH_GL(tmpbuf.sz)], RC; jb ->fff_fallback_1 //| add RB, #STR //| mov TMP2, PC // Need another temp register. //|.if X64 //| mov TMP3, RC //|.else //| mov ARG3, RC //|.endif //| mov PC, [DISPATCH+DISPATCH_GL(tmpbuf.buf)] //| jmp >3 //|1: // ASCII case conversion. Yes, this is suboptimal code (do you care?). //| movzx RA, byte [RB+RC] //| cmp RA, lo //| jb >2 //| cmp RA, hi //| ja >2 //| xor RA, 0x20 //|2: //| mov [PC+RC], RAL //|3: //| sub RC, 1 //| jns <1 //| mov RD, PC //| mov PC, TMP2 //| jmp ->fff_newstr //|.endmacro //| //|ffstring_case string_lower, 0x41, 0x5a dasm_put(Dst, 5360, DISPATCH_GL(tmpbuf.buf), 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR); # 2544 "vm_x86.dasc" //|ffstring_case string_upper, 0x61, 0x7a dasm_put(Dst, 5438, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); dasm_put(Dst, 5524, 1+1, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), LJ_TSTR, Dt5(->len), DISPATCH_GL(tmpbuf.sz), sizeof(GCstr), DISPATCH_GL(tmpbuf.buf)); # 2545 "vm_x86.dasc" //| //|//-- Table library ------------------------------------------------------ //| //|.ffunc_1 table_getn //| cmp dword [BASE+4], LJ_TTAB; jne ->fff_fallback //| mov RB, BASE // Save BASE. //| mov TAB:FCARG1, [BASE] //| call extern lj_tab_len@4 // LJ_FASTCALL (GCtab *t) //| // Length of table returned in eax (RD). //| mov BASE, RB // Restore BASE. //|.if DUALNUM //| mov RB, RD; jmp ->fff_resi //|.elif SSE //| cvtsi2sd xmm0, RD; jmp ->fff_resxmm0 //|.else //| mov ARG1, RD; fild ARG1; jmp ->fff_resn //|.endif //| //|//-- Bit library -------------------------------------------------------- //| //|.define TOBIT_BIAS, 0x59c00000 // 2^52 + 2^51 (float, not double!). //| //|.macro .ffunc_bit, name, kind //| .ffunc_1 name //|.if kind == 2 //|.if SSE //| sseconst_tobit xmm1, RBa //|.else //| mov TMP1, TOBIT_BIAS //|.endif //|.endif //| cmp dword [BASE+4], LJ_TISNUM //|.if DUALNUM //| jne >1 //| mov RB, dword [BASE] //|.if kind > 0 //| jmp >2 //|.else //| jmp ->fff_resbit //|.endif //|1: //| ja ->fff_fallback //|.else //| jae ->fff_fallback //|.endif //|.if SSE //| movsd xmm0, qword [BASE] //|.if kind < 2 //| sseconst_tobit xmm1, RBa //|.endif //| addsd xmm0, xmm1 //| movd RB, xmm0 //|.else //| fld qword [BASE] //|.if kind < 2 //| mov TMP1, TOBIT_BIAS //|.endif //| fadd TMP1 //| fstp FPARG1 //|.if kind > 0 //| mov RB, ARG1 //|.endif //|.endif //|2: //|.endmacro //| //|.ffunc_bit bit_tobit, 0 dasm_put(Dst, 5593, 1+1, LJ_TTAB); # 2612 "vm_x86.dasc" //|.if DUALNUM or SSE //|.if not SSE //| mov RB, ARG1 //|.endif //| jmp ->fff_resbit //|.else //| fild ARG1 //| jmp ->fff_resn //|.endif //| //|.macro .ffunc_bit_op, name, ins //| .ffunc_bit name, 2 //| mov TMP2, NARGS:RD // Save for fallback. //| lea RD, [BASE+NARGS:RD*8-16] //|1: //| cmp RD, BASE //| jbe ->fff_resbit //| cmp dword [RD+4], LJ_TISNUM //|.if DUALNUM //| jne >2 //| ins RB, dword [RD] //| sub RD, 8 //| jmp <1 //|2: //| ja ->fff_fallback_bit_op //|.else //| jae ->fff_fallback_bit_op //|.endif //|.if SSE //| movsd xmm0, qword [RD] //| addsd xmm0, xmm1 //| movd RA, xmm0 //| ins RB, RA //|.else //| fld qword [RD] //| fadd TMP1 //| fstp FPARG1 //| ins RB, ARG1 //|.endif //| sub RD, 8 //| jmp <1 //|.endmacro //| //|.ffunc_bit_op bit_band, and dasm_put(Dst, 5684, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), 1+1, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), LJ_TISNUM); # 2656 "vm_x86.dasc" //|.ffunc_bit_op bit_bor, or dasm_put(Dst, 5759, LJ_TISNUM, 1+1, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), LJ_TISNUM); # 2657 "vm_x86.dasc" //|.ffunc_bit_op bit_bxor, xor dasm_put(Dst, 5880, LJ_TISNUM, 1+1, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), LJ_TISNUM); # 2658 "vm_x86.dasc" //| //|.ffunc_bit bit_bswap, 1 //| bswap RB //| jmp ->fff_resbit //| //|.ffunc_bit bit_bnot, 1 dasm_put(Dst, 5980, LJ_TISNUM, 1+1, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), 1+1); # 2664 "vm_x86.dasc" //| not RB //|.if DUALNUM //| jmp ->fff_resbit //|.elif SSE //|->fff_resbit: //| cvtsi2sd xmm0, RB //| jmp ->fff_resxmm0 //|.else //|->fff_resbit: //| mov ARG1, RB //| fild ARG1 //| jmp ->fff_resn //|.endif //| //|->fff_fallback_bit_op: //| mov NARGS:RD, TMP2 // Restore for fallback //| jmp ->fff_fallback //| //|.macro .ffunc_bit_sh, name, ins //|.if DUALNUM //| .ffunc_bit name, 1 //| // Note: no inline conversion from number for 2nd argument! //| cmp dword [BASE+12], LJ_TISNUM; jne ->fff_fallback //| mov RA, dword [BASE+8] //|.elif SSE //| .ffunc_nnsse name //| sseconst_tobit xmm2, RBa //| addsd xmm0, xmm2 //| addsd xmm1, xmm2 //| movd RB, xmm0 //| movd RA, xmm1 //|.else //| .ffunc_nn name //| mov TMP1, TOBIT_BIAS //| fadd TMP1 //| fstp FPARG3 //| fadd TMP1 //| fstp FPARG1 //| mov RA, ARG3 //| mov RB, ARG1 //|.endif //| ins RB, cl // Assumes RA is ecx. //| jmp ->fff_resbit //|.endmacro //| //|.ffunc_bit_sh bit_lshift, shl dasm_put(Dst, 6073, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), 2+1, LJ_TISNUM, LJ_TISNUM); # 2710 "vm_x86.dasc" //|.ffunc_bit_sh bit_rshift, shr //|.ffunc_bit_sh bit_arshift, sar dasm_put(Dst, 6156, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); # 2712 "vm_x86.dasc" //|.ffunc_bit_sh bit_rol, rol dasm_put(Dst, 6280, 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), 2+1, LJ_TISNUM); # 2713 "vm_x86.dasc" //|.ffunc_bit_sh bit_ror, ror //| //|//----------------------------------------------------------------------- //| //|->fff_fallback_2: //| mov NARGS:RD, 1+2 // Other args are ignored, anyway. dasm_put(Dst, 6371, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32), 2+1, LJ_TISNUM, LJ_TISNUM, (unsigned int)(U64x(43380000,00000000)), (unsigned int)((U64x(43380000,00000000))>>32)); # 2719 "vm_x86.dasc" //| jmp ->fff_fallback //|->fff_fallback_1: //| mov NARGS:RD, 1+1 // Other args are ignored, anyway. //|->fff_fallback: // Call fast function fallback handler. //| // BASE = new base, RD = nargs+1 //| mov L:RB, SAVE_L //| mov PC, [BASE-4] // Fallback may overwrite PC. //| mov SAVE_PC, PC // Redundant (but a defined value). //| mov L:RB->base, BASE //| lea RD, [BASE+NARGS:RD*8-8] //| lea RA, [RD+8*LUA_MINSTACK] // Ensure enough space for handler. //| mov L:RB->top, RD //| mov CFUNC:RD, [BASE-8] //| cmp RA, L:RB->maxstack //| ja >5 // Need to grow stack. //|.if X64 //| mov CARG1d, L:RB //|.else //| mov ARG1, L:RB //|.endif //| call aword CFUNC:RD->f // (lua_State *L) //| mov BASE, L:RB->base //| // Either throws an error, or recovers and returns -1, 0 or nresults+1. //| test RD, RD; jg ->fff_res // Returned nresults+1? //|1: //| mov RA, L:RB->top //| sub RA, BASE //| shr RA, 3 //| test RD, RD //| lea NARGS:RD, [RA+1] //| mov LFUNC:RB, [BASE-8] //| jne ->vm_call_tail // Returned -1? //| ins_callt // Returned 0: retry fast path. dasm_put(Dst, 6499, 1+2, 1+1, Dt1(->base), 8*LUA_MINSTACK, Dt1(->top), Dt1(->maxstack), Dt8(->f), Dt1(->base), Dt1(->top)); # 2752 "vm_x86.dasc" //| //|// Reconstruct previous base for vmeta_call during tailcall. //|->vm_call_tail: //| mov RA, BASE //| test PC, FRAME_TYPE //| jnz >3 //| movzx RB, PC_RA //| not RBa // Note: ~RB = -(RB+1) //| lea BASE, [BASE+RB*8] // base = base - (RB+1)*8 //| jmp ->vm_call_dispatch // Resolve again for tailcall. //|3: //| mov RB, PC //| and RB, -8 //| sub BASE, RB //| jmp ->vm_call_dispatch // Resolve again for tailcall. //| //|5: // Grow stack for fallback handler. //| mov FCARG2, LUA_MINSTACK //| mov FCARG1, L:RB //| call extern lj_state_growstack@8 // (lua_State *L, int n) //| mov BASE, L:RB->base //| xor RD, RD // Simulate a return 0. //| jmp <1 // Dumb retry (goes through ff first). //| //|->fff_gcstep: // Call GC step function. //| // BASE = new base, RD = nargs+1 //| pop RBa // Must keep stack at same level. //| mov TMPa, RBa // Save return address //| mov L:RB, SAVE_L //| mov SAVE_PC, PC // Redundant (but a defined value). //| mov L:RB->base, BASE //| lea RD, [BASE+NARGS:RD*8-8] //| mov FCARG1, L:RB //| mov L:RB->top, RD //| call extern lj_gc_step@4 // (lua_State *L) //| mov BASE, L:RB->base //| mov RD, L:RB->top //| sub RD, BASE dasm_put(Dst, 6589, Dt7(->pc), FRAME_TYPE, LUA_MINSTACK, Dt1(->base), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); # 2790 "vm_x86.dasc" //| shr RD, 3 //| add NARGS:RD, 1 //| mov RBa, TMPa //| push RBa // Restore return address. //| ret //| //|//----------------------------------------------------------------------- //|//-- Special dispatch targets ------------------------------------------- //|//----------------------------------------------------------------------- //| //|->vm_record: // Dispatch target for recording phase. //|.if JIT //| movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] //| test RDL, HOOK_VMEVENT // No recording while in vmevent. //| jnz >5 //| // Decrement the hookcount for consistency, but always do the call. //| test RDL, HOOK_ACTIVE //| jnz >1 //| test RDL, LUA_MASKLINE|LUA_MASKCOUNT //| jz >1 //| dec dword [DISPATCH+DISPATCH_GL(hookcount)] //| jmp >1 //|.endif //| //|->vm_rethook: // Dispatch target for return hooks. //| movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] //| test RDL, HOOK_ACTIVE // Hook already active? //| jnz >5 //| jmp >1 //| //|->vm_inshook: // Dispatch target for instr/line hooks. //| movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] dasm_put(Dst, 6715, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), DISPATCH_GL(hookmask), HOOK_ACTIVE); # 2822 "vm_x86.dasc" //| test RDL, HOOK_ACTIVE // Hook already active? //| jnz >5 //| //| test RDL, LUA_MASKLINE|LUA_MASKCOUNT //| jz >5 //| dec dword [DISPATCH+DISPATCH_GL(hookcount)] //| jz >1 //| test RDL, LUA_MASKLINE //| jz >5 //|1: //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| mov FCARG2, PC // Caveat: FCARG2 == BASE //| mov FCARG1, L:RB //| // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. //| call extern lj_dispatch_ins@8 // (lua_State *L, BCIns *pc) //|3: //| mov BASE, L:RB->base //|4: //| movzx RA, PC_RA //|5: //| movzx OP, PC_OP //| movzx RD, PC_RD //|.if X64 //| jmp aword [DISPATCH+OP*8+GG_DISP2STATIC] // Re-dispatch to static ins. //|.else //| jmp aword [DISPATCH+OP*4+GG_DISP2STATIC] // Re-dispatch to static ins. //|.endif //| //|->cont_hook: // Continue from hook yield. //| add PC, 4 dasm_put(Dst, 6784, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base), GG_DISP2STATIC); # 2853 "vm_x86.dasc" //| mov RA, [RB-24] //| mov MULTRES, RA // Restore MULTRES for *M ins. //| jmp <4 //| //|->vm_hotloop: // Hot loop counter underflow. //|.if JIT //| mov LFUNC:RB, [BASE-8] // Same as curr_topL(L). //| mov RB, LFUNC:RB->pc //| movzx RD, byte [RB+PC2PROTO(framesize)] //| lea RD, [BASE+RD*8] //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| mov L:RB->top, RD //| mov FCARG2, PC //| lea FCARG1, [DISPATCH+GG_DISP2J] //| mov aword [DISPATCH+DISPATCH_J(L)], L:RBa //| mov SAVE_PC, PC //| call extern lj_trace_hot@8 // (jit_State *J, const BCIns *pc) //| jmp <3 //|.endif //| //|->vm_callhook: // Dispatch target for call hooks. //| mov SAVE_PC, PC //|.if JIT //| jmp >1 //|.endif //| //|->vm_hotcall: // Hot call counter underflow. //|.if JIT //| mov SAVE_PC, PC //| or PC, 1 // Marker for hot call. //|1: //|.endif //| lea RD, [BASE+NARGS:RD*8-8] //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| mov L:RB->top, RD //| mov FCARG2, PC //| mov FCARG1, L:RB //| call extern lj_dispatch_call@8 // (lua_State *L, const BCIns *pc) //| // ASMFunction returned in eax/rax (RDa). //| mov SAVE_PC, 0 // Invalidate for subsequent line hook. //|.if JIT //| and PC, -2 //|.endif //| mov BASE, L:RB->base //| mov RAa, RDa //| mov RD, L:RB->top //| sub RD, BASE dasm_put(Dst, 6869, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); # 2902 "vm_x86.dasc" //| mov RBa, RAa //| movzx RA, PC_RA //| shr RD, 3 //| add NARGS:RD, 1 //| jmp RBa //| //|//----------------------------------------------------------------------- //|//-- Trace exit handler ------------------------------------------------- //|//----------------------------------------------------------------------- //| //|// Called from an exit stub with the exit number on the stack. //|// The 16 bit exit number is stored with two (sign-extended) push imm8. //|->vm_exit_handler: //|.if JIT //|.if X64 //| push r13; push r12 //| push r11; push r10; push r9; push r8 //| push rdi; push rsi; push rbp; lea rbp, [rsp+88]; push rbp //| push rbx; push rdx; push rcx; push rax //| movzx RC, byte [rbp-8] // Reconstruct exit number. //| mov RCH, byte [rbp-16] //| mov [rbp-8], r15; mov [rbp-16], r14 //|.else //| push ebp; lea ebp, [esp+12]; push ebp //| push ebx; push edx; push ecx; push eax //| movzx RC, byte [ebp-4] // Reconstruct exit number. //| mov RCH, byte [ebp-8] //| mov [ebp-4], edi; mov [ebp-8], esi //|.endif //| // Caveat: DISPATCH is ebx. //| mov DISPATCH, [ebp] //| mov RA, [DISPATCH+DISPATCH_GL(vmstate)] // Get trace number. //| set_vmstate EXIT //| mov [DISPATCH+DISPATCH_J(exitno)], RC //| mov [DISPATCH+DISPATCH_J(parent)], RA //|.if X64 //|.if X64WIN //| sub rsp, 16*8+4*8 // Room for SSE regs + save area. //|.else //| sub rsp, 16*8 // Room for SSE regs. //|.endif //| add rbp, -128 //| movsd qword [rbp-8], xmm15; movsd qword [rbp-16], xmm14 //| movsd qword [rbp-24], xmm13; movsd qword [rbp-32], xmm12 //| movsd qword [rbp-40], xmm11; movsd qword [rbp-48], xmm10 //| movsd qword [rbp-56], xmm9; movsd qword [rbp-64], xmm8 //| movsd qword [rbp-72], xmm7; movsd qword [rbp-80], xmm6 //| movsd qword [rbp-88], xmm5; movsd qword [rbp-96], xmm4 //| movsd qword [rbp-104], xmm3; movsd qword [rbp-112], xmm2 //| movsd qword [rbp-120], xmm1; movsd qword [rbp-128], xmm0 //|.else //| sub esp, 8*8+16 // Room for SSE regs + args. //| movsd qword [ebp-40], xmm7; movsd qword [ebp-48], xmm6 //| movsd qword [ebp-56], xmm5; movsd qword [ebp-64], xmm4 //| movsd qword [ebp-72], xmm3; movsd qword [ebp-80], xmm2 //| movsd qword [ebp-88], xmm1; movsd qword [ebp-96], xmm0 //|.endif //| // Caveat: RB is ebp. //| mov L:RB, [DISPATCH+DISPATCH_GL(jit_L)] //| mov BASE, [DISPATCH+DISPATCH_GL(jit_base)] //| mov aword [DISPATCH+DISPATCH_J(L)], L:RBa //| mov dword [DISPATCH+DISPATCH_GL(jit_L)], 0 //| mov L:RB->base, BASE //|.if X64WIN //| lea CARG2, [rsp+4*8] //|.elif X64 //| mov CARG2, rsp //|.else //| lea FCARG2, [esp+16] //|.endif //| lea FCARG1, [DISPATCH+GG_DISP2J] //| call extern lj_trace_exit@8 // (jit_State *J, ExitState *ex) //| // MULTRES or negated error code returned in eax (RD). //| mov RAa, L:RB->cframe //| and RAa, CFRAME_RAWMASK //|.if X64WIN //| // Reposition stack later. //|.elif X64 //| mov rsp, RAa // Reposition stack to C frame. //|.else //| mov esp, RAa // Reposition stack to C frame. //|.endif //| mov [RAa+CFRAME_OFS_L], L:RB // Set SAVE_L (on-trace resume/yield). //| mov BASE, L:RB->base //| mov PC, [RAa+CFRAME_OFS_PC] // Get SAVE_PC. //|.if X64 //| jmp >1 //|.endif //|.endif //|->vm_exit_interp: //| // RD = MULTRES or negated error code, BASE, PC and DISPATCH set. //|.if JIT //|.if X64 //| // Restore additional callee-save registers only used in compiled code. //|.if X64WIN //| lea RAa, [rsp+9*16+4*8] //|1: //| movdqa xmm15, [RAa-9*16] //| movdqa xmm14, [RAa-8*16] //| movdqa xmm13, [RAa-7*16] //| movdqa xmm12, [RAa-6*16] //| movdqa xmm11, [RAa-5*16] //| movdqa xmm10, [RAa-4*16] //| movdqa xmm9, [RAa-3*16] //| movdqa xmm8, [RAa-2*16] //| movdqa xmm7, [RAa-1*16] //| mov rsp, RAa // Reposition stack to C frame. //| movdqa xmm6, [RAa] //| mov r15, CSAVE_3 //| mov r14, CSAVE_4 //|.else //| add rsp, 16 // Reposition stack to C frame. dasm_put(Dst, 6998, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 16*8, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), DISPATCH_GL(jit_L), Dt1(->base), GG_DISP2J, Dt1(->cframe), CFRAME_RAWMASK, CFRAME_OFS_L, Dt1(->base), CFRAME_OFS_PC); # 3014 "vm_x86.dasc" //|1: //|.endif //| mov r13, TMPa //| mov r12, TMPQ //|.endif //| test RD, RD; js >3 // Check for error from exit. //| mov MULTRES, RD //| mov LFUNC:KBASE, [BASE-8] //| mov KBASE, LFUNC:KBASE->pc //| mov KBASE, [KBASE+PC2PROTO(k)] //| mov dword [DISPATCH+DISPATCH_GL(jit_L)], 0 //| set_vmstate INTERP //| // Modified copy of ins_next which handles function header dispatch, too. //| mov RC, [PC] //| movzx RA, RCH //| movzx OP, RCL //| add PC, 4 //| shr RC, 16 //| cmp OP, BC_FUNCF // Function header? //| jb >2 //| mov RC, MULTRES // RC/RD holds nres+1. //|2: //|.if X64 //| jmp aword [DISPATCH+OP*8] //|.else //| jmp aword [DISPATCH+OP*4] //|.endif //| //|3: // Rethrow error from the right C frame. //| neg RD //| mov FCARG1, L:RB //| mov FCARG2, RD //| call extern lj_err_throw@8 // (lua_State *L, int errcode) //|.endif //| //|//----------------------------------------------------------------------- //|//-- Math helper functions ---------------------------------------------- //|//----------------------------------------------------------------------- //| //|// FP value rounding. Called by math.floor/math.ceil fast functions //|// and from JIT code. //| //|// x87 variant: Arg/ret on x87 stack. No int/xmm registers modified. //|.macro vm_round_x87, mode1, mode2 //| fnstcw word [esp+4] // Caveat: overwrites ARG1 and ARG2. //| mov [esp+8], eax //| mov ax, mode1 //| or ax, [esp+4] //|.if mode2 ~= 0xffff //| and ax, mode2 //|.endif //| mov [esp+6], ax //| fldcw word [esp+6] //| frndint //| fldcw word [esp+4] //| mov eax, [esp+8] //| ret //|.endmacro //| //|// SSE variant: arg/ret is xmm0. xmm0-xmm3 and RD (eax) modified. //|.macro vm_round_sse, mode //| sseconst_abs xmm2, RDa //| sseconst_2p52 xmm3, RDa //| movaps xmm1, xmm0 //| andpd xmm1, xmm2 // |x| //| ucomisd xmm3, xmm1 // No truncation if 2^52 <= |x|. //| jbe >1 //| andnpd xmm2, xmm0 // Isolate sign bit. //|.if mode == 2 // trunc(x)? //| movaps xmm0, xmm1 //| addsd xmm1, xmm3 // (|x| + 2^52) - 2^52 //| subsd xmm1, xmm3 //| sseconst_1 xmm3, RDa //| cmpsd xmm0, xmm1, 1 // |x| < result? //| andpd xmm0, xmm3 //| subsd xmm1, xmm0 // If yes, subtract -1. //| orpd xmm1, xmm2 // Merge sign bit back in. //|.else //| addsd xmm1, xmm3 // (|x| + 2^52) - 2^52 //| subsd xmm1, xmm3 //| orpd xmm1, xmm2 // Merge sign bit back in. //| .if mode == 1 // ceil(x)? //| sseconst_m1 xmm2, RDa // Must subtract -1 to preserve -0. //| cmpsd xmm0, xmm1, 6 // x > result? //| .else // floor(x)? //| sseconst_1 xmm2, RDa //| cmpsd xmm0, xmm1, 1 // x < result? //| .endif //| andpd xmm0, xmm2 //| subsd xmm1, xmm0 // If yes, subtract +-1. //|.endif //| movaps xmm0, xmm1 //|1: //| ret //|.endmacro //| //|.macro vm_round, name, ssemode, mode1, mode2 //|->name: //|.if not SSE //| vm_round_x87 mode1, mode2 //|.endif //|->name .. _sse: //| vm_round_sse ssemode //|.endmacro //| //| vm_round vm_floor, 0, 0x0400, 0xf7ff dasm_put(Dst, 7260, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, BC_FUNCF, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32)); # 3120 "vm_x86.dasc" //| vm_round vm_ceil, 1, 0x0800, 0xfbff //| vm_round vm_trunc, 2, 0x0c00, 0xffff dasm_put(Dst, 7397, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32)); # 3122 "vm_x86.dasc" //| //|// FP modulo x%y. Called by BC_MOD* and vm_arith. //|->vm_mod: //|.if SSE //|// Args in xmm0/xmm1, return value in xmm0. //|// Caveat: xmm0-xmm5 and RC (eax) modified! //| movaps xmm5, xmm0 //| divsd xmm0, xmm1 //| sseconst_abs xmm2, RDa //| sseconst_2p52 xmm3, RDa //| movaps xmm4, xmm0 //| andpd xmm4, xmm2 // |x/y| //| ucomisd xmm3, xmm4 // No truncation if 2^52 <= |x/y|. //| jbe >1 //| andnpd xmm2, xmm0 // Isolate sign bit. //| addsd xmm4, xmm3 // (|x/y| + 2^52) - 2^52 //| subsd xmm4, xmm3 //| orpd xmm4, xmm2 // Merge sign bit back in. //| sseconst_1 xmm2, RDa //| cmpsd xmm0, xmm4, 1 // x/y < result? //| andpd xmm0, xmm2 //| subsd xmm4, xmm0 // If yes, subtract 1.0. //| movaps xmm0, xmm5 //| mulsd xmm1, xmm4 //| subsd xmm0, xmm1 //| ret //|1: //| mulsd xmm1, xmm0 //| movaps xmm0, xmm5 //| subsd xmm0, xmm1 //| ret //|.else //|// Args/ret on x87 stack (y on top). No xmm registers modified. //|// Caveat: needs 3 slots on x87 stack! RC (eax) modified! //| fld st1 //| fdiv st1 //| fnstcw word [esp+4] //| mov ax, 0x0400 //| or ax, [esp+4] //| and ax, 0xf7ff //| mov [esp+6], ax //| fldcw word [esp+6] //| frndint //| fldcw word [esp+4] //| fmulp st1 //| fsubp st1 //| ret //|.endif //| //|// FP log2(x). Called by math.log(x, base). //|->vm_log2: //|.if X64WIN //| movsd qword [rsp+8], xmm0 // Use scratch area. //| fld1 //| fld qword [rsp+8] //| fyl2x //| fstp qword [rsp+8] //| movsd xmm0, qword [rsp+8] //|.elif X64 //| movsd qword [rsp-8], xmm0 // Use red zone. //| fld1 //| fld qword [rsp-8] //| fyl2x //| fstp qword [rsp-8] //| movsd xmm0, qword [rsp-8] //|.else //| fld1 //| fld qword [esp+4] //| fyl2x //|.endif //| ret //| //|// FP exponentiation e^x and 2^x. Called by math.exp fast function and //|// from JIT code. Arg/ret on x87 stack. No int/xmm regs modified. //|// Caveat: needs 3 slots on x87 stack! //|->vm_exp_x87: //| fldl2e; fmulp st1 // e^x ==> 2^(x*log2(e)) //|->vm_exp2_x87: //| .if X64WIN //| .define expscratch, dword [rsp+8] // Use scratch area. //| .elif X64 //| .define expscratch, dword [rsp-8] // Use red zone. //| .else //| .define expscratch, dword [esp+4] // Needs 4 byte scratch area. //| .endif //| fst expscratch // Caveat: overwrites ARG1. //| cmp expscratch, 0x7f800000; je >1 // Special case: e^+Inf = +Inf //| cmp expscratch, 0xff800000; je >2 // Special case: e^-Inf = 0 dasm_put(Dst, 7548, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); # 3210 "vm_x86.dasc" //|->vm_exp2raw: // Entry point for vm_pow. Without +-Inf check. //| fdup; frndint; fsub st1, st0; fxch // Split into frac/int part. //| f2xm1; fld1; faddp st1; fscale; fpop1 // ==> (2^frac-1 +1) << int //|1: //| ret //|2: //| fpop; fldz; ret //| //|// Generic power function x^y. Called by BC_POW, math.pow fast function, //|// and vm_arith. //|// Args/ret on x87 stack (y on top). RC (eax) modified. //|// Caveat: needs 3 slots on x87 stack! //|->vm_pow: //|.if not SSE //| fist dword [esp+4] // Store/reload int before comparison. //| fild dword [esp+4] // Integral exponent used in vm_powi. //| fucomip st1 //| jnz >8 // Branch for FP exponents. //| jp >9 // Branch for NaN exponent. //| fpop // Pop y and fallthrough to vm_powi. //| //|// FP/int power function x^i. Arg1/ret on x87 stack. //|// Arg2 (int) on C stack. RC (eax) modified. //|// Caveat: needs 2 slots on x87 stack! //| mov eax, [esp+4] //| cmp eax, 1; jle >6 // i<=1? //| // Now 1 < (unsigned)i <= 0x80000000. //|1: // Handle leading zeros. //| test eax, 1; jnz >2 //| fmul st0 //| shr eax, 1 //| jmp <1 //|2: //| shr eax, 1; jz >5 //| fdup //|3: // Handle trailing bits. //| fmul st0 //| shr eax, 1; jz >4 //| jnc <3 //| fmul st1, st0 //| jmp <3 //|4: //| fmulp st1 //|5: //| ret //|6: //| je <5 // x^1 ==> x //| jb >7 //| fld1; fdivrp st1 //| neg eax //| cmp eax, 1; je <5 // x^-1 ==> 1/x //| jmp <1 // x^-i ==> (1/x)^i //|7: //| fpop; fld1 // x^0 ==> 1 //| ret //| //|8: // FP/FP power function x^y. //| fst dword [esp+4] //| fxch //| fst dword [esp+8] //| mov eax, [esp+4]; shl eax, 1 //| cmp eax, 0xff000000; je >2 // x^+-Inf? //| mov eax, [esp+8]; shl eax, 1; je >4 // +-0^y? //| cmp eax, 0xff000000; je >4 // +-Inf^y? //| fyl2x //| jmp ->vm_exp2raw //| //|9: // Handle x^NaN. //| fld1 //| fucomip st2 //| je >1 // 1^NaN ==> 1 //| fxch // x^NaN ==> NaN //|1: //| fpop //| ret //| //|2: // Handle x^+-Inf. //| fabs //| fld1 //| fucomip st1 //| je >3 // +-1^+-Inf ==> 1 //| fpop; fabs; fldz; mov eax, 0; setc al //| ror eax, 1; xor eax, [esp+4]; jns >3 // |x|<>1, x^+-Inf ==> +Inf/0 //| fxch //|3: //| fpop1; fabs //| ret //| //|4: // Handle +-0^y or +-Inf^y. //| cmp dword [esp+4], 0; jge <3 // y >= 0, x^y ==> |x| //| fpop; fpop //| test eax, eax; jz >5 // y < 0, +-0^y ==> +Inf //| fldz // y < 0, +-Inf^y ==> 0 //| ret //|5: //| mov dword [esp+4], 0x7f800000 // Return +Inf. //| fld dword [esp+4] //| ret //|.endif //| //|// Args in xmm0/xmm1. Ret in xmm0. xmm0-xmm2 and RC (eax) modified. //|// Needs 16 byte scratch area for x86. Also called from JIT code. //|->vm_pow_sse: //| cvtsd2si eax, xmm1 //| cvtsi2sd xmm2, eax //| ucomisd xmm1, xmm2 //| jnz >8 // Branch for FP exponents. //| jp >9 // Branch for NaN exponent. //| // Fallthrough to vm_powi_sse. //| //|// Args in xmm0/eax. Ret in xmm0. xmm0-xmm1 and eax modified. //|->vm_powi_sse: //| cmp eax, 1; jle >6 // i<=1? //| // Now 1 < (unsigned)i <= 0x80000000. //|1: // Handle leading zeros. //| test eax, 1; jnz >2 //| mulsd xmm0, xmm0 //| shr eax, 1 //| jmp <1 //|2: //| shr eax, 1; jz >5 dasm_put(Dst, 7796); # 3331 "vm_x86.dasc" //| movaps xmm1, xmm0 //|3: // Handle trailing bits. //| mulsd xmm0, xmm0 //| shr eax, 1; jz >4 //| jnc <3 //| mulsd xmm1, xmm0 //| jmp <3 //|4: //| mulsd xmm0, xmm1 //|5: //| ret //|6: //| je <5 // x^1 ==> x //| jb >7 // x^0 ==> 1 //| neg eax //| call <1 //| sseconst_1 xmm1, RDa dasm_put(Dst, 7906, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); # 3348 "vm_x86.dasc" //| divsd xmm1, xmm0 //| movaps xmm0, xmm1 //| ret //|7: //| sseconst_1 xmm0, RDa //| ret //| //|8: // FP/FP power function x^y. //|.if X64 //| movd rax, xmm1; shl rax, 1 //| rol rax, 12; cmp rax, 0xffe; je >2 // x^+-Inf? //| movd rax, xmm0; shl rax, 1; je >4 // +-0^y? //| rol rax, 12; cmp rax, 0xffe; je >5 // +-Inf^y? //| .if X64WIN //| movsd qword [rsp+16], xmm1 // Use scratch area. //| movsd qword [rsp+8], xmm0 //| fld qword [rsp+16] //| fld qword [rsp+8] //| .else //| movsd qword [rsp-16], xmm1 // Use red zone. //| movsd qword [rsp-8], xmm0 //| fld qword [rsp-16] //| fld qword [rsp-8] //| .endif //|.else //| movsd qword [esp+12], xmm1 // Needs 16 byte scratch area. //| movsd qword [esp+4], xmm0 //| cmp dword [esp+12], 0; jne >1 //| mov eax, [esp+16]; shl eax, 1 //| cmp eax, 0xffe00000; je >2 // x^+-Inf? //|1: //| cmp dword [esp+4], 0; jne >1 //| mov eax, [esp+8]; shl eax, 1; je >4 // +-0^y? //| cmp eax, 0xffe00000; je >5 // +-Inf^y? //|1: //| fld qword [esp+12] //| fld qword [esp+4] //|.endif //| fyl2x // y*log2(x) //| fdup; frndint; fsub st1, st0; fxch // Split into frac/int part. //| f2xm1; fld1; faddp st1; fscale; fpop1 // ==> (2^frac-1 +1) << int //|.if X64WIN //| fstp qword [rsp+8] // Use scratch area. //| movsd xmm0, qword [rsp+8] //|.elif X64 //| fstp qword [rsp-8] // Use red zone. //| movsd xmm0, qword [rsp-8] //|.else //| fstp qword [esp+4] // Needs 8 byte scratch area. //| movsd xmm0, qword [esp+4] //|.endif //| ret //| //|9: // Handle x^NaN. //| sseconst_1 xmm2, RDa //| ucomisd xmm0, xmm2; je >1 // 1^NaN ==> 1 //| movaps xmm0, xmm1 // x^NaN ==> NaN //|1: //| ret //| //|2: // Handle x^+-Inf. //| sseconst_abs xmm2, RDa //| andpd xmm0, xmm2 // |x| //| sseconst_1 xmm2, RDa dasm_put(Dst, 7972, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); # 3412 "vm_x86.dasc" //| ucomisd xmm0, xmm2; je <1 // +-1^+-Inf ==> 1 //| movmskpd eax, xmm1 //| xorps xmm0, xmm0 //| mov ah, al; setc al; xor al, ah; jne <1 // |x|<>1, x^+-Inf ==> +Inf/0 //|3: //| sseconst_hi xmm0, RDa, 7ff00000 // +Inf //| ret //| //|4: // Handle +-0^y. //| movmskpd eax, xmm1; test eax, eax; jnz <3 // y < 0, +-0^y ==> +Inf //| xorps xmm0, xmm0 // y >= 0, +-0^y ==> 0 //| ret //| //|5: // Handle +-Inf^y. //| movmskpd eax, xmm1; test eax, eax; jz <3 // y >= 0, +-Inf^y ==> +Inf //| xorps xmm0, xmm0 // y < 0, +-Inf^y ==> 0 //| ret //| //|// Callable from C: double lj_vm_foldfpm(double x, int fpm) //|// Computes fpm(x) for extended math functions. ORDER FPM. //|->vm_foldfpm: //|.if JIT //|.if X64 //| .if X64WIN //| .define fpmop, CARG2d //| .else //| .define fpmop, CARG1d //| .endif //| cmp fpmop, 1; jb ->vm_floor; je ->vm_ceil //| cmp fpmop, 3; jb ->vm_trunc; ja >2 dasm_put(Dst, 8160, (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); # 3442 "vm_x86.dasc" //| sqrtsd xmm0, xmm0; ret //|2: //| .if X64WIN //| movsd qword [rsp+8], xmm0 // Use scratch area. //| fld qword [rsp+8] //| .else //| movsd qword [rsp-8], xmm0 // Use red zone. //| fld qword [rsp-8] //| .endif //| cmp fpmop, 5; ja >2 //| .if X64WIN; pop rax; .endif //| je >1 //| call ->vm_exp_x87 //| .if X64WIN; push rax; .endif //| jmp >7 //|1: //| call ->vm_exp2_x87 //| .if X64WIN; push rax; .endif //| jmp >7 //|2: ; cmp fpmop, 7; je >1; ja >2 //| fldln2; fxch; fyl2x; jmp >7 dasm_put(Dst, 8258); # 3463 "vm_x86.dasc" //|1: ; fld1; fxch; fyl2x; jmp >7 //|2: ; cmp fpmop, 9; je >1; ja >2 //| fldlg2; fxch; fyl2x; jmp >7 //|1: ; fsin; jmp >7 //|2: ; cmp fpmop, 11; je >1; ja >9 //| fcos; jmp >7 dasm_put(Dst, 8326); # 3469 "vm_x86.dasc" //|1: ; fptan; fpop //|7: //| .if X64WIN //| fstp qword [rsp+8] // Use scratch area. //| movsd xmm0, qword [rsp+8] //| .else //| fstp qword [rsp-8] // Use red zone. //| movsd xmm0, qword [rsp-8] //| .endif //| ret //|.else // x86 calling convention. //| .define fpmop, eax //|.if SSE //| mov fpmop, [esp+12] //| movsd xmm0, qword [esp+4] //| cmp fpmop, 1; je >1; ja >2 //| call ->vm_floor; jmp >7 //|1: ; call ->vm_ceil; jmp >7 //|2: ; cmp fpmop, 3; je >1; ja >2 //| call ->vm_trunc; jmp >7 //|1: //| sqrtsd xmm0, xmm0 //|7: //| movsd qword [esp+4], xmm0 // Overwrite callee-owned args. //| fld qword [esp+4] //| ret //|2: ; fld qword [esp+4] //| cmp fpmop, 5; jb ->vm_exp_x87; je ->vm_exp2_x87 //|2: ; cmp fpmop, 7; je >1; ja >2 //| fldln2; fxch; fyl2x; ret //|1: ; fld1; fxch; fyl2x; ret //|2: ; cmp fpmop, 9; je >1; ja >2 //| fldlg2; fxch; fyl2x; ret //|1: ; fsin; ret //|2: ; cmp fpmop, 11; je >1; ja >9 //| fcos; ret //|1: ; fptan; fpop; ret //|.else //| mov fpmop, [esp+12] //| fld qword [esp+4] //| cmp fpmop, 1; jb ->vm_floor; je ->vm_ceil //| cmp fpmop, 3; jb ->vm_trunc; ja >2 //| fsqrt; ret //|2: ; cmp fpmop, 5; jb ->vm_exp_x87; je ->vm_exp2_x87 //| cmp fpmop, 7; je >1; ja >2 //| fldln2; fxch; fyl2x; ret //|1: ; fld1; fxch; fyl2x; ret //|2: ; cmp fpmop, 9; je >1; ja >2 //| fldlg2; fxch; fyl2x; ret //|1: ; fsin; ret //|2: ; cmp fpmop, 11; je >1; ja >9 //| fcos; ret //|1: ; fptan; fpop; ret //|.endif //|.endif //|9: ; int3 // Bad fpm. //|.endif //| //|// Callable from C: double lj_vm_foldarith(double x, double y, int op) //|// Compute x op y for basic arithmetic operators (+ - * / % ^ and unary -) //|// and basic math functions. ORDER ARITH //|->vm_foldarith: //|.if X64 //| //| .if X64WIN //| .define foldop, CARG3d //| .else //| .define foldop, CARG1d //| .endif //| cmp foldop, 1; je >1; ja >2 //| addsd xmm0, xmm1; ret //|1: ; subsd xmm0, xmm1; ret //|2: ; cmp foldop, 3; je >1; ja >2 //| mulsd xmm0, xmm1; ret //|1: ; divsd xmm0, xmm1; ret //|2: ; cmp foldop, 5; jb ->vm_mod; je ->vm_pow dasm_put(Dst, 8401); # 3545 "vm_x86.dasc" //| cmp foldop, 7; je >1; ja >2 //| sseconst_sign xmm1, RDa; xorps xmm0, xmm1; ret //|1: ; sseconst_abs xmm1, RDa; andps xmm0, xmm1; ret //|2: ; cmp foldop, 9; ja >2 //|.if X64WIN //| movsd qword [rsp+8], xmm0 // Use scratch area. //| movsd qword [rsp+16], xmm1 //| fld qword [rsp+8] //| fld qword [rsp+16] //|.else //| movsd qword [rsp-8], xmm0 // Use red zone. //| movsd qword [rsp-16], xmm1 //| fld qword [rsp-8] //| fld qword [rsp-16] //|.endif //| je >1 //| fpatan //|7: //|.if X64WIN //| fstp qword [rsp+8] // Use scratch area. //| movsd xmm0, qword [rsp+8] //|.else //| fstp qword [rsp-8] // Use red zone. //| movsd xmm0, qword [rsp-8] //|.endif //| ret //|1: ; fxch; fscale; fpop1; jmp <7 //|2: ; cmp foldop, 11; je >1; ja >9 dasm_put(Dst, 8501, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); # 3573 "vm_x86.dasc" //| minsd xmm0, xmm1; ret //|1: ; maxsd xmm0, xmm1; ret //|9: ; int3 // Bad op. //| //|.elif SSE // x86 calling convention with SSE ops. //| //| .define foldop, eax //| mov foldop, [esp+20] //| movsd xmm0, qword [esp+4] //| movsd xmm1, qword [esp+12] //| cmp foldop, 1; je >1; ja >2 //| addsd xmm0, xmm1 //|7: //| movsd qword [esp+4], xmm0 // Overwrite callee-owned args. //| fld qword [esp+4] //| ret //|1: ; subsd xmm0, xmm1; jmp <7 //|2: ; cmp foldop, 3; je >1; ja >2 //| mulsd xmm0, xmm1; jmp <7 //|1: ; divsd xmm0, xmm1; jmp <7 //|2: ; cmp foldop, 5 //| je >1; ja >2 //| call ->vm_mod; jmp <7 //|1: ; pop edx; call ->vm_pow; push edx; jmp <7 // Writes to scratch area. //|2: ; cmp foldop, 7; je >1; ja >2 //| sseconst_sign xmm1, RDa; xorps xmm0, xmm1; jmp <7 //|1: ; sseconst_abs xmm1, RDa; andps xmm0, xmm1; jmp <7 //|2: ; cmp foldop, 9; ja >2 //| fld qword [esp+4] // Reload from stack //| fld qword [esp+12] //| je >1 //| fpatan; ret //|1: ; fxch; fscale; fpop1; ret //|2: ; cmp foldop, 11; je >1; ja >9 //| minsd xmm0, xmm1; jmp <7 //|1: ; maxsd xmm0, xmm1; jmp <7 //|9: ; int3 // Bad op. //| //|.else // x86 calling convention with x87 ops. //| //| mov eax, [esp+20] //| fld qword [esp+4] //| fld qword [esp+12] //| cmp eax, 1; je >1; ja >2 //| faddp st1; ret //|1: ; fsubp st1; ret //|2: ; cmp eax, 3; je >1; ja >2 //| fmulp st1; ret //|1: ; fdivp st1; ret //|2: ; cmp eax, 5; jb ->vm_mod; je ->vm_pow //| cmp eax, 7; je >1; ja >2 //| fpop; fchs; ret //|1: ; fpop; fabs; ret //|2: ; cmp eax, 9; je >1; ja >2 //| fpatan; ret //|1: ; fxch; fscale; fpop1; ret //|2: ; cmp eax, 11; je >1; ja >9 //| fucomi st1; fcmovnbe st1; fpop1; ret //|1: ; fucomi st1; fcmovbe st1; fpop1; ret //|9: ; int3 // Bad op. //| //|.endif //| //|//----------------------------------------------------------------------- //|//-- Miscellaneous functions -------------------------------------------- //|//----------------------------------------------------------------------- //| //|// int lj_vm_cpuid(uint32_t f, uint32_t res[4]) //|->vm_cpuid: //|.if X64 //| mov eax, CARG1d //| .if X64WIN; push rsi; mov rsi, CARG2; .endif //| push rbx //| cpuid //| mov [rsi], eax //| mov [rsi+4], ebx //| mov [rsi+8], ecx //| mov [rsi+12], edx //| pop rbx //| .if X64WIN; pop rsi; .endif //| ret //|.else //| pushfd //| pop edx //| mov ecx, edx //| xor edx, 0x00200000 // Toggle ID bit in flags. //| push edx //| popfd //| pushfd //| pop edx //| xor eax, eax // Zero means no features supported. //| cmp ecx, edx //| jz >1 // No ID toggle means no CPUID support. //| mov eax, [esp+4] // Argument 1 is function number. //| push edi //| push ebx //| cpuid //| mov edi, [esp+16] // Argument 2 is result area. //| mov [edi], eax //| mov [edi+4], ebx //| mov [edi+8], ecx //| mov [edi+12], edx //| pop ebx //| pop edi //|1: //| ret //|.endif //| //|//----------------------------------------------------------------------- //|//-- Assertions --------------------------------------------------------- //|//----------------------------------------------------------------------- //| //|->assert_bad_for_arg_type: dasm_put(Dst, 8620); # 3686 "vm_x86.dasc" #ifdef LUA_USE_ASSERT //| int3 dasm_put(Dst, 8673); # 3688 "vm_x86.dasc" #endif //| int3 //| //|//----------------------------------------------------------------------- //|//-- FFI helper functions ----------------------------------------------- //|//----------------------------------------------------------------------- //| //|// Handler for callback functions. Callback slot number in ah/al. //|->vm_ffi_callback: //|.if FFI //|.type CTSTATE, CTState, PC #define DtE(_V) (int)(ptrdiff_t)&(((CTState *)0)_V) # 3699 "vm_x86.dasc" //|.if not X64 //| sub esp, 16 // Leave room for SAVE_ERRF etc. //|.endif //| saveregs_ // ebp/rbp already saved. ebp now holds global_State *. //| lea DISPATCH, [ebp+GG_G2DISP] //| mov CTSTATE, GL:ebp->ctype_state //| movzx eax, ax //| mov CTSTATE->cb.slot, eax //|.if X64 //| mov CTSTATE->cb.gpr[0], CARG1 //| mov CTSTATE->cb.gpr[1], CARG2 //| mov CTSTATE->cb.gpr[2], CARG3 //| mov CTSTATE->cb.gpr[3], CARG4 //| movsd qword CTSTATE->cb.fpr[0], xmm0 //| movsd qword CTSTATE->cb.fpr[1], xmm1 //| movsd qword CTSTATE->cb.fpr[2], xmm2 //| movsd qword CTSTATE->cb.fpr[3], xmm3 //|.if X64WIN //| lea rax, [rsp+CFRAME_SIZE+4*8] //|.else //| lea rax, [rsp+CFRAME_SIZE] //| mov CTSTATE->cb.gpr[4], CARG5 //| mov CTSTATE->cb.gpr[5], CARG6 //| movsd qword CTSTATE->cb.fpr[4], xmm4 //| movsd qword CTSTATE->cb.fpr[5], xmm5 //| movsd qword CTSTATE->cb.fpr[6], xmm6 //| movsd qword CTSTATE->cb.fpr[7], xmm7 //|.endif //| mov CTSTATE->cb.stack, rax //| mov CARG2, rsp dasm_put(Dst, 8675, GG_G2DISP, Dt2(->ctype_state), DtE(->cb.slot), DtE(->cb.gpr[0]), DtE(->cb.gpr[1]), DtE(->cb.gpr[2]), DtE(->cb.gpr[3]), DtE(->cb.fpr[0]), DtE(->cb.fpr[1]), DtE(->cb.fpr[2]), DtE(->cb.fpr[3]), CFRAME_SIZE, DtE(->cb.gpr[4]), DtE(->cb.gpr[5]), DtE(->cb.fpr[4]), DtE(->cb.fpr[5]), DtE(->cb.fpr[6]), DtE(->cb.fpr[7]), DtE(->cb.stack)); # 3729 "vm_x86.dasc" //|.else //| lea eax, [esp+CFRAME_SIZE+16] //| mov CTSTATE->cb.gpr[0], FCARG1 //| mov CTSTATE->cb.gpr[1], FCARG2 //| mov CTSTATE->cb.stack, eax //| mov FCARG1, [esp+CFRAME_SIZE+12] // Move around misplaced retaddr/ebp. //| mov FCARG2, [esp+CFRAME_SIZE+8] //| mov SAVE_RET, FCARG1 //| mov SAVE_R4, FCARG2 //| mov FCARG2, esp //|.endif //| mov SAVE_PC, CTSTATE // Any value outside of bytecode is ok. //| mov FCARG1, CTSTATE //| call extern lj_ccallback_enter@8 // (CTState *cts, void *cf) //| // lua_State * returned in eax (RD). //| set_vmstate INTERP //| mov BASE, L:RD->base //| mov RD, L:RD->top //| sub RD, BASE //| mov LFUNC:RB, [BASE-8] //| shr RD, 3 //| add RD, 1 //| ins_callt //|.endif //| //|->cont_ffi_callback: // Return from FFI callback. //|.if FFI //| mov L:RA, SAVE_L //| mov CTSTATE, [DISPATCH+DISPATCH_GL(ctype_state)] //| mov aword CTSTATE->L, L:RAa //| mov L:RA->base, BASE //| mov L:RA->top, RB //| mov FCARG1, CTSTATE //| mov FCARG2, RC //| call extern lj_ccallback_leave@8 // (CTState *cts, TValue *o) //|.if X64 //| mov rax, CTSTATE->cb.gpr[0] //| movsd xmm0, qword CTSTATE->cb.fpr[0] //| jmp ->vm_leave_unw //|.else //| mov L:RB, SAVE_L //| mov eax, CTSTATE->cb.gpr[0] //| mov edx, CTSTATE->cb.gpr[1] //| cmp dword CTSTATE->cb.gpr[2], 1 //| jb >7 //| je >6 //| fld qword CTSTATE->cb.fpr[0].d //| jmp >7 //|6: //| fld dword CTSTATE->cb.fpr[0].f //|7: //| mov ecx, L:RB->top //| movzx ecx, word [ecx+6] // Get stack adjustment and copy up. //| mov SAVE_L, ecx // Must be one slot above SAVE_RET //| restoreregs //| pop ecx // Move return addr from SAVE_RET. //| add esp, [esp] // Adjust stack. //| add esp, 16 //| push ecx //| ret //|.endif //|.endif //| //|->vm_ffi_call@4: // Call C function via FFI. //| // Caveat: needs special frame unwinding, see below. //|.if FFI //|.if X64 //| .type CCSTATE, CCallState, rbx #define DtF(_V) (int)(ptrdiff_t)&(((CCallState *)0)_V) # 3797 "vm_x86.dasc" //| push rbp; mov rbp, rsp; push rbx; mov CCSTATE, CARG1 //|.else //| .type CCSTATE, CCallState, ebx //| push ebp; mov ebp, esp; push ebx; mov CCSTATE, FCARG1 //|.endif //| //| // Readjust stack. //|.if X64 //| mov eax, CCSTATE->spadj //| sub rsp, rax //|.else //| sub esp, CCSTATE->spadj //|.if WIN //| mov CCSTATE->spadj, esp //|.endif //|.endif //| //| // Copy stack slots. //| movzx ecx, byte CCSTATE->nsp //| sub ecx, 1 //| js >2 //|1: //|.if X64 //| mov rax, [CCSTATE+rcx*8+offsetof(CCallState, stack)] dasm_put(Dst, 8784, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top), Dt7(->pc), DISPATCH_GL(ctype_state), DtE(->L), Dt1(->base), Dt1(->top), DtE(->cb.gpr[0]), DtE(->cb.fpr[0]), DtF(->spadj), DtF(->nsp)); # 3821 "vm_x86.dasc" //| mov [rsp+rcx*8+CCALL_SPS_EXTRA*8], rax //|.else //| mov eax, [CCSTATE+ecx*4+offsetof(CCallState, stack)] //| mov [esp+ecx*4], eax //|.endif //| sub ecx, 1 //| jns <1 //|2: //| //|.if X64 //| movzx eax, byte CCSTATE->nfpr //| mov CARG1, CCSTATE->gpr[0] //| mov CARG2, CCSTATE->gpr[1] //| mov CARG3, CCSTATE->gpr[2] //| mov CARG4, CCSTATE->gpr[3] //|.if not X64WIN //| mov CARG5, CCSTATE->gpr[4] //| mov CARG6, CCSTATE->gpr[5] //|.endif //| test eax, eax; jz >5 //| movaps xmm0, CCSTATE->fpr[0] //| movaps xmm1, CCSTATE->fpr[1] //| movaps xmm2, CCSTATE->fpr[2] //| movaps xmm3, CCSTATE->fpr[3] //|.if not X64WIN //| cmp eax, 4; jbe >5 //| movaps xmm4, CCSTATE->fpr[4] dasm_put(Dst, 8915, offsetof(CCallState, stack), CCALL_SPS_EXTRA*8, DtF(->nfpr), DtF(->gpr[0]), DtF(->gpr[1]), DtF(->gpr[2]), DtF(->gpr[3]), DtF(->gpr[4]), DtF(->gpr[5]), DtF(->fpr[0]), DtF(->fpr[1]), DtF(->fpr[2]), DtF(->fpr[3])); # 3848 "vm_x86.dasc" //| movaps xmm5, CCSTATE->fpr[5] //| movaps xmm6, CCSTATE->fpr[6] //| movaps xmm7, CCSTATE->fpr[7] //|.endif //|5: //|.else //| mov FCARG1, CCSTATE->gpr[0] //| mov FCARG2, CCSTATE->gpr[1] //|.endif //| //| call aword CCSTATE->func //| //|.if X64 //| mov CCSTATE->gpr[0], rax //| movaps CCSTATE->fpr[0], xmm0 //|.if not X64WIN //| mov CCSTATE->gpr[1], rdx //| movaps CCSTATE->fpr[1], xmm1 //|.endif //|.else //| mov CCSTATE->gpr[0], eax //| mov CCSTATE->gpr[1], edx //| cmp byte CCSTATE->resx87, 1 //| jb >7 //| je >6 //| fstp qword CCSTATE->fpr[0].d[0] //| jmp >7 //|6: //| fstp dword CCSTATE->fpr[0].f[0] //|7: //|.if WIN //| sub CCSTATE->spadj, esp //|.endif //|.endif //| //|.if X64 //| mov rbx, [rbp-8]; leave; ret //|.else //| mov ebx, [ebp-4]; leave; ret //|.endif //|.endif //|// Note: vm_ffi_call must be the last function in this object file! //| //|//----------------------------------------------------------------------- dasm_put(Dst, 8996, DtF(->fpr[4]), DtF(->fpr[5]), DtF(->fpr[6]), DtF(->fpr[7]), DtF(->func), DtF(->gpr[0]), DtF(->fpr[0]), DtF(->gpr[1]), DtF(->fpr[1])); # 3892 "vm_x86.dasc" } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; //|// Note: aligning all instructions does not pay off. //|=>defop: dasm_put(Dst, 522, defop); # 3900 "vm_x86.dasc" switch (op) { /* -- Comparison ops ---------------------------------------------------- */ /* Remember: all ops branch for a true comparison, fall through otherwise. */ //|.macro jmp_comp, lt, ge, le, gt, target //||switch (op) { //||case BC_ISLT: //| lt target //||break; //||case BC_ISGE: //| ge target //||break; //||case BC_ISLE: //| le target //||break; //||case BC_ISGT: //| gt target //||break; //||default: break; /* Shut up GCC. */ //||} //|.endmacro case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: //| // RA = src1, RD = src2, JMP with RD = target //| ins_AD //|.if DUALNUM //| checkint RA, >7 //| checkint RD, >8 //| mov RB, dword [BASE+RA*8] //| add PC, 4 //| cmp RB, dword [BASE+RD*8] //| jmp_comp jge, jl, jg, jle, >9 //|6: //| movzx RD, PC_RD //| branchPC RD //|9: //| ins_next //| //|7: // RA is not an integer. //| ja ->vmeta_comp //| // RA is a number. //| cmp dword [BASE+RD*8+4], LJ_TISNUM; jb >1; jne ->vmeta_comp //| // RA is a number, RD is an integer. //|.if SSE //| cvtsi2sd xmm0, dword [BASE+RD*8] //| jmp >2 //|.else //| fld qword [BASE+RA*8] //| fild dword [BASE+RD*8] //| jmp >3 //|.endif //| //|8: // RA is an integer, RD is not an integer. //| ja ->vmeta_comp //| // RA is an integer, RD is a number. //|.if SSE //| cvtsi2sd xmm1, dword [BASE+RA*8] //| movsd xmm0, qword [BASE+RD*8] //| add PC, 4 //| ucomisd xmm0, xmm1 //| jmp_comp jbe, ja, jb, jae, <9 //| jmp <6 //|.else //| fild dword [BASE+RA*8] //| jmp >2 //|.endif //|.else //| checknum RA, ->vmeta_comp //| checknum RD, ->vmeta_comp //|.endif //|.if SSE //|1: //| movsd xmm0, qword [BASE+RD*8] //|2: //| add PC, 4 //| ucomisd xmm0, qword [BASE+RA*8] //|3: //|.else //|1: //| fld qword [BASE+RA*8] // Reverse order, i.e like cmp D, A. //|2: //| fld qword [BASE+RD*8] //|3: //| add PC, 4 //| fcomparepp //|.endif //| // Unordered: all of ZF CF PF set, ordered: PF clear. //| // To preserve NaN semantics GE/GT branch on unordered, but LT/LE don't. //|.if DUALNUM //| jmp_comp jbe, ja, jb, jae, <9 //| jmp <6 //|.else //| jmp_comp jbe, ja, jb, jae, >1 dasm_put(Dst, 9042, LJ_TISNUM, LJ_TISNUM); switch (op) { case BC_ISLT: dasm_put(Dst, 7392); break; case BC_ISGE: dasm_put(Dst, 9083); break; case BC_ISLE: dasm_put(Dst, 9088); break; case BC_ISGT: dasm_put(Dst, 9093); break; default: break; /* Shut up GCC. */ } # 3996 "vm_x86.dasc" //| movzx RD, PC_RD //| branchPC RD //|1: //| ins_next //|.endif dasm_put(Dst, 9098, -BCBIAS_J*4); # 4001 "vm_x86.dasc" break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; //| ins_AD // RA = src1, RD = src2, JMP with RD = target //| mov RB, [BASE+RD*8+4] //| add PC, 4 //|.if DUALNUM //| cmp RB, LJ_TISNUM; jne >7 //| checkint RA, >8 //| mov RB, dword [BASE+RD*8] //| cmp RB, dword [BASE+RA*8] dasm_put(Dst, 9131); # 4013 "vm_x86.dasc" if (vk) { //| jne >9 } else { //| je >9 } //| movzx RD, PC_RD //| branchPC RD //|9: //| ins_next //| //|7: // RD is not an integer. //| ja >5 //| // RD is a number. //| cmp dword [BASE+RA*8+4], LJ_TISNUM; jb >1; jne >5 //| // RD is a number, RA is an integer. //|.if SSE //| cvtsi2sd xmm0, dword [BASE+RA*8] //|.else //| fild dword [BASE+RA*8] //|.endif //| jmp >2 //| //|8: // RD is an integer, RA is not an integer. //| ja >5 //| // RD is an integer, RA is a number. //|.if SSE //| cvtsi2sd xmm0, dword [BASE+RD*8] //| ucomisd xmm0, qword [BASE+RA*8] //|.else //| fild dword [BASE+RD*8] //| fld qword [BASE+RA*8] //|.endif //| jmp >4 //| //|.else //| cmp RB, LJ_TISNUM; jae >5 //| checknum RA, >5 //|.endif //|.if SSE //|1: //| movsd xmm0, qword [BASE+RA*8] //|2: //| ucomisd xmm0, qword [BASE+RD*8] //|4: //|.else //|1: //| fld qword [BASE+RA*8] //|2: //| fld qword [BASE+RD*8] //|4: //| fcomparepp //|.endif dasm_put(Dst, 9139, LJ_TISNUM, LJ_TISNUM); # 4065 "vm_x86.dasc" iseqne_fp: if (vk) { //| jp >2 // Unordered means not equal. //| jne >2 dasm_put(Dst, 9175); # 4069 "vm_x86.dasc" } else { //| jp >2 // Unordered means not equal. //| je >1 dasm_put(Dst, 9184); # 4072 "vm_x86.dasc" } iseqne_end: if (vk) { //|1: // EQ: Branch to the target. //| movzx RD, PC_RD //| branchPC RD //|2: // NE: Fallthrough to next instruction. //|.if not FFI //|3: //|.endif dasm_put(Dst, 9193, -BCBIAS_J*4); # 4082 "vm_x86.dasc" } else { //|.if not FFI //|3: //|.endif //|2: // NE: Branch to the target. //| movzx RD, PC_RD //| branchPC RD //|1: // EQ: Fallthrough to next instruction. dasm_put(Dst, 9208, -BCBIAS_J*4); # 4090 "vm_x86.dasc" } if (LJ_DUALNUM && (op == BC_ISEQV || op == BC_ISNEV || op == BC_ISEQN || op == BC_ISNEN)) { //| jmp <9 dasm_put(Dst, 9223); # 4094 "vm_x86.dasc" } else { //| ins_next dasm_put(Dst, 9110); # 4096 "vm_x86.dasc" } //| if (op == BC_ISEQV || op == BC_ISNEV) { //|5: // Either or both types are not numbers. //|.if FFI //| cmp RB, LJ_TCDATA; je ->vmeta_equal_cd //| checktp RA, LJ_TCDATA; je ->vmeta_equal_cd //|.endif //| checktp RA, RB // Compare types. //| jne <2 // Not the same type? //| cmp RB, LJ_TISPRI //| jae <1 // Same type and primitive type? //| //| // Same types and not a primitive type. Compare GCobj or pvalue. //| mov RA, [BASE+RA*8] //| mov RD, [BASE+RD*8] //| cmp RA, RD //| je <1 // Same GCobjs or pvalues? //| cmp RB, LJ_TISTABUD //| ja <2 // Different objects and not table/ud? //|.if X64 //| cmp RB, LJ_TUDATA // And not 64 bit lightuserdata. //| jb <2 //|.endif //| //| // Different tables or userdatas. Need to check __eq metamethod. //| // Field metatable must be at same offset for GCtab and GCudata! //| mov TAB:RB, TAB:RA->metatable dasm_put(Dst, 9228, LJ_TCDATA, LJ_TCDATA, LJ_TISPRI, LJ_TISTABUD, LJ_TUDATA); # 4124 "vm_x86.dasc" //| test TAB:RB, TAB:RB //| jz <2 // No metatable? //| test byte TAB:RB->nomm, 1<metatable), Dt6(->nomm), 1<vmeta_equal // Handle __eq metamethod. dasm_put(Dst, 9323); # 4134 "vm_x86.dasc" } else { //|.if FFI //|3: //| cmp RB, LJ_TCDATA dasm_put(Dst, 9328, LJ_TCDATA); # 4138 "vm_x86.dasc" if (LJ_DUALNUM && vk) { //| jne <9 dasm_put(Dst, 9335); # 4140 "vm_x86.dasc" } else { //| jne <2 dasm_put(Dst, 9308); # 4142 "vm_x86.dasc" } //| jmp ->vmeta_equal_cd //|.endif dasm_put(Dst, 9340); # 4145 "vm_x86.dasc" } break; case BC_ISEQS: case BC_ISNES: vk = op == BC_ISEQS; //| ins_AND // RA = src, RD = str const, JMP with RD = target //| mov RB, [BASE+RA*8+4] //| add PC, 4 //| cmp RB, LJ_TSTR; jne >3 //| mov RA, [BASE+RA*8] //| cmp RA, [KBASE+RD*4] dasm_put(Dst, 9345, LJ_TSTR); # 4155 "vm_x86.dasc" iseqne_test: if (vk) { //| jne >2 dasm_put(Dst, 9179); # 4158 "vm_x86.dasc" } else { //| je >1 dasm_put(Dst, 7791); # 4160 "vm_x86.dasc" } goto iseqne_end; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; //| ins_AD // RA = src, RD = num const, JMP with RD = target //| mov RB, [BASE+RA*8+4] //| add PC, 4 //|.if DUALNUM //| cmp RB, LJ_TISNUM; jne >7 //| cmp dword [KBASE+RD*8+4], LJ_TISNUM; jne >8 //| mov RB, dword [KBASE+RD*8] //| cmp RB, dword [BASE+RA*8] dasm_put(Dst, 9372); # 4172 "vm_x86.dasc" if (vk) { //| jne >9 } else { //| je >9 } //| movzx RD, PC_RD //| branchPC RD //|9: //| ins_next //| //|7: // RA is not an integer. //| ja >3 //| // RA is a number. //| cmp dword [KBASE+RD*8+4], LJ_TISNUM; jb >1 //| // RA is a number, RD is an integer. //|.if SSE //| cvtsi2sd xmm0, dword [KBASE+RD*8] //|.else //| fild dword [KBASE+RD*8] //|.endif //| jmp >2 //| //|8: // RA is an integer, RD is a number. //|.if SSE //| cvtsi2sd xmm0, dword [BASE+RA*8] //| ucomisd xmm0, qword [KBASE+RD*8] //|.else //| fild dword [BASE+RA*8] //| fld qword [KBASE+RD*8] //|.endif //| jmp >4 //|.else //| cmp RB, LJ_TISNUM; jae >3 //|.endif //|.if SSE //|1: //| movsd xmm0, qword [KBASE+RD*8] //|2: //| ucomisd xmm0, qword [BASE+RA*8] //|4: //|.else //|1: //| fld qword [KBASE+RD*8] //|2: //| fld qword [BASE+RA*8] //|4: //| fcomparepp //|.endif dasm_put(Dst, 9380, LJ_TISNUM); # 4220 "vm_x86.dasc" goto iseqne_fp; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; //| ins_AND // RA = src, RD = primitive type (~), JMP with RD = target //| mov RB, [BASE+RA*8+4] //| add PC, 4 //| cmp RB, RD dasm_put(Dst, 9407); # 4227 "vm_x86.dasc" if (!LJ_HASFFI) goto iseqne_test; if (vk) { //| jne >3 //| movzx RD, PC_RD //| branchPC RD //|2: //| ins_next //|3: //| cmp RB, LJ_TCDATA; jne <2 //| jmp ->vmeta_equal_cd dasm_put(Dst, 9421, -BCBIAS_J*4, LJ_TCDATA); # 4237 "vm_x86.dasc" } else { //| je >2 //| cmp RB, LJ_TCDATA; je ->vmeta_equal_cd //| movzx RD, PC_RD //| branchPC RD //|2: //| ins_next dasm_put(Dst, 9472, LJ_TCDATA, -BCBIAS_J*4); # 4244 "vm_x86.dasc" } break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: //| ins_AD // RA = dst or unused, RD = src, JMP with RD = target //| mov RB, [BASE+RD*8+4] //| add PC, 4 //| cmp RB, LJ_TISTRUECOND dasm_put(Dst, 9517, LJ_TISTRUECOND); # 4254 "vm_x86.dasc" if (op == BC_IST || op == BC_ISTC) { //| jae >1 dasm_put(Dst, 9093); # 4256 "vm_x86.dasc" } else { //| jb >1 dasm_put(Dst, 9088); # 4258 "vm_x86.dasc" } if (op == BC_ISTC || op == BC_ISFC) { //| mov [BASE+RA*8+4], RB //| mov RB, [BASE+RD*8] //| mov [BASE+RA*8], RB dasm_put(Dst, 9529); # 4263 "vm_x86.dasc" } //| movzx RD, PC_RD //| branchPC RD //|1: // Fallthrough to the next instruction. //| ins_next dasm_put(Dst, 9098, -BCBIAS_J*4); # 4268 "vm_x86.dasc" break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: //| ins_AD // RA = dst, RD = src //|.if X64 //| mov RBa, [BASE+RD*8] //| mov [BASE+RA*8], RBa //|.else //| mov RB, [BASE+RD*8+4] //| mov RD, [BASE+RD*8] //| mov [BASE+RA*8+4], RB //| mov [BASE+RA*8], RD //|.endif //| ins_next_ dasm_put(Dst, 9540); # 4284 "vm_x86.dasc" break; case BC_NOT: //| ins_AD // RA = dst, RD = src //| xor RB, RB //| checktp RD, LJ_TISTRUECOND //| adc RB, LJ_TTRUE //| mov [BASE+RA*8+4], RB //| ins_next dasm_put(Dst, 9569, LJ_TISTRUECOND, LJ_TTRUE); # 4292 "vm_x86.dasc" break; case BC_UNM: //| ins_AD // RA = dst, RD = src //|.if DUALNUM //| checkint RD, >5 //| mov RB, [BASE+RD*8] //| neg RB //| jo >4 //| mov dword [BASE+RA*8+4], LJ_TISNUM //| mov dword [BASE+RA*8], RB //|9: //| ins_next //|4: //| mov dword [BASE+RA*8+4], 0x41e00000 // 2^31. //| mov dword [BASE+RA*8], 0 //| jmp <9 //|5: //| ja ->vmeta_unm //|.else //| checknum RD, ->vmeta_unm //|.endif //|.if SSE //| movsd xmm0, qword [BASE+RD*8] //| sseconst_sign xmm1, RDa //| xorps xmm0, xmm1 //| movsd qword [BASE+RA*8], xmm0 //|.else //| fld qword [BASE+RD*8] //| fchs //| fstp qword [BASE+RA*8] //|.endif //|.if DUALNUM //| jmp <9 //|.else //| ins_next //|.endif dasm_put(Dst, 9606, LJ_TISNUM, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); # 4328 "vm_x86.dasc" break; case BC_LEN: //| ins_AD // RA = dst, RD = src //| checkstr RD, >2 //| mov STR:RD, [BASE+RD*8] //|.if DUALNUM //| mov RD, dword STR:RD->len //|1: //| mov dword [BASE+RA*8+4], LJ_TISNUM //| mov dword [BASE+RA*8], RD //|.elif SSE //| xorps xmm0, xmm0 //| cvtsi2sd xmm0, dword STR:RD->len //|1: //| movsd qword [BASE+RA*8], xmm0 //|.else //| fild dword STR:RD->len //|1: //| fstp qword [BASE+RA*8] //|.endif //| ins_next //|2: //| checktab RD, ->vmeta_len //| mov TAB:FCARG1, [BASE+RD*8] dasm_put(Dst, 9661, LJ_TSTR, Dt5(->len), LJ_TTAB); # 4352 "vm_x86.dasc" #if LJ_52 //| mov TAB:RB, TAB:FCARG1->metatable //| cmp TAB:RB, 0 //| jnz >9 //|3: dasm_put(Dst, 9727, Dt6(->metatable)); # 4357 "vm_x86.dasc" #endif //|->BC_LEN_Z: //| mov RB, BASE // Save BASE. //| call extern lj_tab_len@4 // (GCtab *t) //| // Length of table returned in eax (RD). //|.if DUALNUM //| // Nothing to do. //|.elif SSE //| cvtsi2sd xmm0, RD //|.else //| mov ARG1, RD //| fild ARG1 //|.endif //| mov BASE, RB // Restore BASE. //| movzx RA, PC_RA //| jmp <1 dasm_put(Dst, 9741); # 4373 "vm_x86.dasc" #if LJ_52 //|9: // Check for __len. //| test byte TAB:RB->nomm, 1<vmeta_len // 'no __len' flag NOT set: check. dasm_put(Dst, 9767, Dt6(->nomm), 1<vmeta_arith_vn //| .if DUALNUM //| cmp dword [KBASE+RC*8+4], LJ_TISNUM; jae ->vmeta_arith_vn //| .endif //| .if SSE //| movsd xmm0, qword [BASE+RB*8] //| sseins ssereg, qword [KBASE+RC*8] //| .else //| fld qword [BASE+RB*8] //| x87ins qword [KBASE+RC*8] //| .endif //|| break; //||case 1: //| checknum RB, ->vmeta_arith_nv //| .if DUALNUM //| cmp dword [KBASE+RC*8+4], LJ_TISNUM; jae ->vmeta_arith_nv //| .endif //| .if SSE //| movsd xmm0, qword [KBASE+RC*8] //| sseins ssereg, qword [BASE+RB*8] //| .else //| fld qword [KBASE+RC*8] //| x87ins qword [BASE+RB*8] //| .endif //|| break; //||default: //| checknum RB, ->vmeta_arith_vv //| checknum RC, ->vmeta_arith_vv //| .if SSE //| movsd xmm0, qword [BASE+RB*8] //| sseins ssereg, qword [BASE+RC*8] //| .else //| fld qword [BASE+RB*8] //| x87ins qword [BASE+RC*8] //| .endif //|| break; //||} //|.endmacro //| //|.macro ins_arithdn, intins //| ins_ABC //||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); //||switch (vk) { //||case 0: //| checkint RB, ->vmeta_arith_vn //| cmp dword [KBASE+RC*8+4], LJ_TISNUM; jne ->vmeta_arith_vn //| mov RB, [BASE+RB*8] //| intins RB, [KBASE+RC*8]; jo ->vmeta_arith_vno //|| break; //||case 1: //| checkint RB, ->vmeta_arith_nv //| cmp dword [KBASE+RC*8+4], LJ_TISNUM; jne ->vmeta_arith_nv //| mov RC, [KBASE+RC*8] //| intins RC, [BASE+RB*8]; jo ->vmeta_arith_nvo //|| break; //||default: //| checkint RB, ->vmeta_arith_vv //| checkint RC, ->vmeta_arith_vv //| mov RB, [BASE+RB*8] //| intins RB, [BASE+RC*8]; jo ->vmeta_arith_vvo //|| break; //||} //| mov dword [BASE+RA*8+4], LJ_TISNUM //||if (vk == 1) { //| mov dword [BASE+RA*8], RC //||} else { //| mov dword [BASE+RA*8], RB //||} //| ins_next //|.endmacro //| //|.macro ins_arithpost //|.if SSE //| movsd qword [BASE+RA*8], xmm0 //|.else //| fstp qword [BASE+RA*8] //|.endif //|.endmacro //| //|.macro ins_arith, x87ins, sseins //| ins_arithpre x87ins, sseins, xmm0 //| ins_arithpost //| ins_next //|.endmacro //| //|.macro ins_arith, intins, x87ins, sseins //|.if DUALNUM //| ins_arithdn intins //|.else //| ins_arith, x87ins, sseins //|.endif //|.endmacro //| // RA = dst, RB = src1 or num const, RC = src2 or num const case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: //| ins_arith add, fadd, addsd dasm_put(Dst, 9783); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: dasm_put(Dst, 9791, LJ_TISNUM); break; case 1: dasm_put(Dst, 9817, LJ_TISNUM); break; default: dasm_put(Dst, 9843, LJ_TISNUM, LJ_TISNUM); break; } dasm_put(Dst, 9634); # 4484 "vm_x86.dasc" break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: //| ins_arith sub, fsub, subsd dasm_put(Dst, 9783); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: dasm_put(Dst, 9878, LJ_TISNUM); break; case 1: dasm_put(Dst, 9904, LJ_TISNUM); break; default: dasm_put(Dst, 9930, LJ_TISNUM, LJ_TISNUM); break; } dasm_put(Dst, 9634); # 4487 "vm_x86.dasc" break; case BC_MULVN: case BC_MULNV: case BC_MULVV: //| ins_arith imul, fmul, mulsd dasm_put(Dst, 9783); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: dasm_put(Dst, 9965, LJ_TISNUM); break; case 1: dasm_put(Dst, 9991, LJ_TISNUM); break; default: dasm_put(Dst, 10017, LJ_TISNUM, LJ_TISNUM); break; } dasm_put(Dst, 9634); # 4490 "vm_x86.dasc" break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: //| ins_arith fdiv, divsd dasm_put(Dst, 9783); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: dasm_put(Dst, 10052, LJ_TISNUM); break; case 1: dasm_put(Dst, 10078, LJ_TISNUM); break; default: dasm_put(Dst, 10104, LJ_TISNUM, LJ_TISNUM); break; } dasm_put(Dst, 9634); # 4493 "vm_x86.dasc" break; case BC_MODVN: //| ins_arithpre fld, movsd, xmm1 dasm_put(Dst, 9783); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: dasm_put(Dst, 10139, LJ_TISNUM); break; case 1: dasm_put(Dst, 10165, LJ_TISNUM); break; default: dasm_put(Dst, 10191, LJ_TISNUM, LJ_TISNUM); break; } # 4496 "vm_x86.dasc" //|->BC_MODVN_Z: //| call ->vm_mod //| ins_arithpost //| ins_next dasm_put(Dst, 10226); # 4500 "vm_x86.dasc" break; case BC_MODNV: case BC_MODVV: //| ins_arithpre fld, movsd, xmm1 dasm_put(Dst, 9783); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: dasm_put(Dst, 10139, LJ_TISNUM); break; case 1: dasm_put(Dst, 10165, LJ_TISNUM); break; default: dasm_put(Dst, 10191, LJ_TISNUM, LJ_TISNUM); break; } # 4503 "vm_x86.dasc" //| jmp ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. dasm_put(Dst, 10258); # 4504 "vm_x86.dasc" break; case BC_POW: //| ins_arithpre fld, movsd, xmm1 dasm_put(Dst, 9783); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: dasm_put(Dst, 10139, LJ_TISNUM); break; case 1: dasm_put(Dst, 10165, LJ_TISNUM); break; default: dasm_put(Dst, 10191, LJ_TISNUM, LJ_TISNUM); break; } # 4507 "vm_x86.dasc" //| call ->vm_pow //| ins_arithpost //| ins_next dasm_put(Dst, 10263); # 4510 "vm_x86.dasc" break; case BC_CAT: //| ins_ABC // RA = dst, RB = src_start, RC = src_end //|.if X64 //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE //| lea CARG2d, [BASE+RC*8] //| mov CARG3d, RC //| sub CARG3d, RB //|->BC_CAT_Z: //| mov L:RB, L:CARG1d //|.else //| lea RA, [BASE+RC*8] //| sub RC, RB //| mov ARG2, RA //| mov ARG3, RC //|->BC_CAT_Z: //| mov L:RB, SAVE_L //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| call extern lj_meta_cat // (lua_State *L, TValue *top, int left) //| // NULL (finished) or TValue * (metamethod) returned in eax (RC). //| mov BASE, L:RB->base //| test RC, RC //| jnz ->vmeta_binop //| movzx RB, PC_RB // Copy result to Stk[RA] from Stk[RB]. //| movzx RA, PC_RA //|.if X64 //| mov RCa, [BASE+RB*8] //| mov [BASE+RA*8], RCa //|.else //| mov RC, [BASE+RB*8+4] //| mov RB, [BASE+RB*8] //| mov [BASE+RA*8+4], RC //| mov [BASE+RA*8], RB //|.endif //| ins_next dasm_put(Dst, 10293, Dt1(->base), Dt1(->base)); # 4550 "vm_x86.dasc" break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: //| ins_AND // RA = dst, RD = str const (~) //| mov RD, [KBASE+RD*4] //| mov dword [BASE+RA*8+4], LJ_TSTR //| mov [BASE+RA*8], RD //| ins_next dasm_put(Dst, 10377, LJ_TSTR); # 4560 "vm_x86.dasc" break; case BC_KCDATA: //|.if FFI //| ins_AND // RA = dst, RD = cdata const (~) //| mov RD, [KBASE+RD*4] //| mov dword [BASE+RA*8+4], LJ_TCDATA //| mov [BASE+RA*8], RD //| ins_next //|.endif dasm_put(Dst, 10377, LJ_TCDATA); # 4569 "vm_x86.dasc" break; case BC_KSHORT: //| ins_AD // RA = dst, RD = signed int16 literal //|.if DUALNUM //| movsx RD, RDW //| mov dword [BASE+RA*8+4], LJ_TISNUM //| mov dword [BASE+RA*8], RD //|.elif SSE //| movsx RD, RDW // Sign-extend literal. //| cvtsi2sd xmm0, RD //| movsd qword [BASE+RA*8], xmm0 //|.else //| fild PC_RD // Refetch signed RD from instruction. //| fstp qword [BASE+RA*8] //|.endif //| ins_next dasm_put(Dst, 10414); # 4585 "vm_x86.dasc" break; case BC_KNUM: //| ins_AD // RA = dst, RD = num const //|.if SSE //| movsd xmm0, qword [KBASE+RD*8] //| movsd qword [BASE+RA*8], xmm0 //|.else //| fld qword [KBASE+RD*8] //| fstp qword [BASE+RA*8] //|.endif //| ins_next dasm_put(Dst, 10449); # 4596 "vm_x86.dasc" break; case BC_KPRI: //| ins_AND // RA = dst, RD = primitive type (~) //| mov [BASE+RA*8+4], RD //| ins_next dasm_put(Dst, 10483); # 4601 "vm_x86.dasc" break; case BC_KNIL: //| ins_AD // RA = dst_start, RD = dst_end //| lea RA, [BASE+RA*8+12] //| lea RD, [BASE+RD*8+4] //| mov RB, LJ_TNIL //| mov [RA-8], RB // Sets minimum 2 slots. //|1: //| mov [RA], RB //| add RA, 8 //| cmp RA, RD //| jbe <1 //| ins_next dasm_put(Dst, 10512, LJ_TNIL); # 4614 "vm_x86.dasc" break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: //| ins_AD // RA = dst, RD = upvalue # //| mov LFUNC:RB, [BASE-8] //| mov UPVAL:RB, [LFUNC:RB+RD*4+offsetof(GCfuncL, uvptr)] //| mov RB, UPVAL:RB->v //|.if X64 //| mov RDa, [RB] //| mov [BASE+RA*8], RDa //|.else //| mov RD, [RB+4] //| mov RB, [RB] //| mov [BASE+RA*8+4], RD //| mov [BASE+RA*8], RB //|.endif //| ins_next dasm_put(Dst, 10560, offsetof(GCfuncL, uvptr), DtA(->v)); # 4633 "vm_x86.dasc" break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) //| ins_AD // RA = upvalue #, RD = src //| mov LFUNC:RB, [BASE-8] //| mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] //| cmp byte UPVAL:RB->closed, 0 //| mov RB, UPVAL:RB->v //| mov RA, [BASE+RD*8] //| mov RD, [BASE+RD*8+4] //| mov [RB], RA //| mov [RB+4], RD //| jz >1 //| // Check barrier for closed upvalue. //| test byte [RB+TV2MARKOFS], LJ_GC_BLACK // isblack(uv) //| jnz >2 //|1: //| ins_next //| //|2: // Upvalue is black. Check if new value is collectable and white. //| sub RD, LJ_TISGCV //| cmp RD, LJ_TISNUM - LJ_TISGCV // tvisgcv(v) //| jbe <1 //| test byte GCOBJ:RA->gch.marked, LJ_GC_WHITES // iswhite(v) //| jz <1 //| // Crossed a write barrier. Move the barrier forward. //|.if X64 and not X64WIN //| mov FCARG2, RB //| mov RB, BASE // Save BASE. //|.else //| xchg FCARG2, RB // Save BASE (FCARG2 == BASE). //|.endif //| lea GL:FCARG1, [DISPATCH+GG_DISP2G] //| call extern lj_gc_barrieruv@8 // (global_State *g, TValue *tv) dasm_put(Dst, 10601, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); # 4668 "vm_x86.dasc" //| mov BASE, RB // Restore BASE. //| jmp <1 dasm_put(Dst, 10697); # 4670 "vm_x86.dasc" break; #undef TV2MARKOFS case BC_USETS: //| ins_AND // RA = upvalue #, RD = str const (~) //| mov LFUNC:RB, [BASE-8] //| mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] //| mov GCOBJ:RA, [KBASE+RD*4] //| mov RD, UPVAL:RB->v //| mov [RD], GCOBJ:RA //| mov dword [RD+4], LJ_TSTR //| test byte UPVAL:RB->marked, LJ_GC_BLACK // isblack(uv) //| jnz >2 //|1: //| ins_next //| //|2: // Check if string is white and ensure upvalue is closed. //| test byte GCOBJ:RA->gch.marked, LJ_GC_WHITES // iswhite(str) //| jz <1 //| cmp byte UPVAL:RB->closed, 0 //| jz <1 //| // Crossed a write barrier. Move the barrier forward. //| mov RB, BASE // Save BASE (FCARG2 == BASE). //| mov FCARG2, RD //| lea GL:FCARG1, [DISPATCH+GG_DISP2G] //| call extern lj_gc_barrieruv@8 // (global_State *g, TValue *tv) //| mov BASE, RB // Restore BASE. //| jmp <1 dasm_put(Dst, 10709, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); # 4697 "vm_x86.dasc" break; case BC_USETN: //| ins_AD // RA = upvalue #, RD = num const //| mov LFUNC:RB, [BASE-8] //|.if SSE //| movsd xmm0, qword [KBASE+RD*8] //|.else //| fld qword [KBASE+RD*8] //|.endif //| mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] //| mov RA, UPVAL:RB->v //|.if SSE //| movsd qword [RA], xmm0 //|.else //| fstp qword [RA] //|.endif //| ins_next dasm_put(Dst, 10805, offsetof(GCfuncL, uvptr), DtA(->v)); # 4714 "vm_x86.dasc" break; case BC_USETP: //| ins_AND // RA = upvalue #, RD = primitive type (~) //| mov LFUNC:RB, [BASE-8] //| mov UPVAL:RB, [LFUNC:RB+RA*4+offsetof(GCfuncL, uvptr)] //| mov RA, UPVAL:RB->v //| mov [RA+4], RD //| ins_next dasm_put(Dst, 10850, offsetof(GCfuncL, uvptr), DtA(->v)); # 4722 "vm_x86.dasc" break; case BC_UCLO: //| ins_AD // RA = level, RD = target //| branchPC RD // Do this first to free RD. //| mov L:RB, SAVE_L //| cmp dword L:RB->openupval, 0 //| je >1 //| mov L:RB->base, BASE //| lea FCARG2, [BASE+RA*8] // Caveat: FCARG2 == BASE //| mov L:FCARG1, L:RB // Caveat: FCARG1 == RA //| call extern lj_func_closeuv@8 // (lua_State *L, TValue *level) //| mov BASE, L:RB->base //|1: //| ins_next dasm_put(Dst, 10890, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); # 4736 "vm_x86.dasc" break; case BC_FNEW: //| ins_AND // RA = dst, RD = proto const (~) (holding function prototype) //|.if X64 //| mov L:RB, SAVE_L //| mov L:RB->base, BASE // Caveat: CARG2d/CARG3d may be BASE. //| mov CARG3d, [BASE-8] //| mov CARG2d, [KBASE+RD*4] // Fetch GCproto *. //| mov CARG1d, L:RB //|.else //| mov LFUNC:RA, [BASE-8] //| mov PROTO:RD, [KBASE+RD*4] // Fetch GCproto *. //| mov L:RB, SAVE_L //| mov ARG3, LFUNC:RA //| mov ARG2, PROTO:RD //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| // (lua_State *L, GCproto *pt, GCfuncL *parent) //| call extern lj_func_newL_gc //| // GCfuncL * returned in eax (RC). //| mov BASE, L:RB->base //| movzx RA, PC_RA //| mov [BASE+RA*8], LFUNC:RC //| mov dword [BASE+RA*8+4], LJ_TFUNC //| ins_next dasm_put(Dst, 10946, Dt1(->base), Dt1(->base), LJ_TFUNC); # 4764 "vm_x86.dasc" break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: //| ins_AD // RA = dst, RD = hbits|asize //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| mov RA, [DISPATCH+DISPATCH_GL(gc.total)] //| cmp RA, [DISPATCH+DISPATCH_GL(gc.threshold)] //| mov SAVE_PC, PC //| jae >5 //|1: //|.if X64 //| mov CARG3d, RD //| and RD, 0x7ff //| shr CARG3d, 11 //|.else //| mov RA, RD //| and RD, 0x7ff //| shr RA, 11 //| mov ARG3, RA //|.endif //| cmp RD, 0x7ff //| je >3 //|2: //|.if X64 //| mov L:CARG1d, L:RB //| mov CARG2d, RD //|.else //| mov ARG1, L:RB //| mov ARG2, RD //|.endif //| call extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits) //| // Table * returned in eax (RC). //| mov BASE, L:RB->base //| movzx RA, PC_RA //| mov [BASE+RA*8], TAB:RC //| mov dword [BASE+RA*8+4], LJ_TTAB //| ins_next //|3: // Turn 0x7ff into 0x801. //| mov RD, 0x801 //| jmp <2 //|5: //| mov L:FCARG1, L:RB //| call extern lj_gc_step_fixtop@4 // (lua_State *L) //| movzx RD, PC_RD //| jmp <1 dasm_put(Dst, 11013, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); # 4812 "vm_x86.dasc" break; case BC_TDUP: //| ins_AND // RA = dst, RD = table const (~) (holding template table) //| mov L:RB, SAVE_L //| mov RA, [DISPATCH+DISPATCH_GL(gc.total)] //| mov SAVE_PC, PC //| cmp RA, [DISPATCH+DISPATCH_GL(gc.threshold)] //| mov L:RB->base, BASE //| jae >3 //|2: //| mov TAB:FCARG2, [KBASE+RD*4] // Caveat: FCARG2 == BASE //| mov L:FCARG1, L:RB // Caveat: FCARG1 == RA //| call extern lj_tab_dup@8 // (lua_State *L, Table *kt) //| // Table * returned in eax (RC). //| mov BASE, L:RB->base //| movzx RA, PC_RA //| mov [BASE+RA*8], TAB:RC //| mov dword [BASE+RA*8+4], LJ_TTAB //| ins_next //|3: //| mov L:FCARG1, L:RB //| call extern lj_gc_step_fixtop@4 // (lua_State *L) //| movzx RD, PC_RD // Need to reload RD. //| not RDa //| jmp <2 dasm_put(Dst, 11137, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); # 4837 "vm_x86.dasc" break; case BC_GGET: //| ins_AND // RA = dst, RD = str const (~) //| mov LFUNC:RB, [BASE-8] //| mov TAB:RB, LFUNC:RB->env //| mov STR:RC, [KBASE+RD*4] //| jmp ->BC_TGETS_Z dasm_put(Dst, 11236, Dt7(->env)); # 4845 "vm_x86.dasc" break; case BC_GSET: //| ins_AND // RA = src, RD = str const (~) //| mov LFUNC:RB, [BASE-8] //| mov TAB:RB, LFUNC:RB->env //| mov STR:RC, [KBASE+RD*4] //| jmp ->BC_TSETS_Z dasm_put(Dst, 11256, Dt7(->env)); # 4852 "vm_x86.dasc" break; case BC_TGETV: //| ins_ABC // RA = dst, RB = table, RC = key //| checktab RB, ->vmeta_tgetv //| mov TAB:RB, [BASE+RB*8] //| //| // Integer key? //|.if DUALNUM //| checkint RC, >5 //| mov RC, dword [BASE+RC*8] //|.else //| // Convert number to int and back and compare. //| checknum RC, >5 //|.if SSE //| movsd xmm0, qword [BASE+RC*8] //| cvtsd2si RC, xmm0 //| cvtsi2sd xmm1, RC //| ucomisd xmm0, xmm1 //|.else //| fld qword [BASE+RC*8] //| fist ARG1 //| fild ARG1 //| fcomparepp //| mov RC, ARG1 //|.endif //| jne ->vmeta_tgetv // Generic numeric key? Use fallback. //|.endif //| cmp RC, TAB:RB->asize // Takes care of unordered, too. //| jae ->vmeta_tgetv // Not in array part? Use fallback. //| shl RC, 3 //| add RC, TAB:RB->array //| cmp dword [RC+4], LJ_TNIL // Avoid overwriting RB in fastpath. //| je >2 //| // Get array slot. //|.if X64 //| mov RBa, [RC] //| mov [BASE+RA*8], RBa //|.else //| mov RB, [RC] //| mov RC, [RC+4] //| mov [BASE+RA*8], RB //| mov [BASE+RA*8+4], RC //|.endif //|1: //| ins_next //| //|2: // Check for __index if table value is nil. //| cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. //| jz >3 //| mov TAB:RA, TAB:RB->metatable dasm_put(Dst, 11276, LJ_TTAB, LJ_TISNUM, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable)); # 4903 "vm_x86.dasc" //| test byte TAB:RA->nomm, 1<vmeta_tgetv // 'no __index' flag NOT set: check. //| movzx RA, PC_RA // Restore RA. //|3: //| mov dword [BASE+RA*8+4], LJ_TNIL //| jmp <1 //| //|5: // String key? //| checkstr RC, ->vmeta_tgetv //| mov STR:RC, [BASE+RC*8] //| jmp ->BC_TGETS_Z dasm_put(Dst, 11394, Dt6(->metatable), Dt6(->nomm), 1<vmeta_tgets //| mov TAB:RB, [BASE+RB*8] //|->BC_TGETS_Z: // RB = GCtab *, RC = GCstr *, refetches PC_RA. //| mov RA, TAB:RB->hmask //| and RA, STR:RC->hash //| imul RA, #NODE //| add NODE:RA, TAB:RB->node //|1: //| cmp dword NODE:RA->key.it, LJ_TSTR //| jne >4 //| cmp dword NODE:RA->key.gcr, STR:RC //| jne >4 //| // Ok, key found. Assumes: offsetof(Node, val) == 0 //| cmp dword [RA+4], LJ_TNIL // Avoid overwriting RB in fastpath. //| je >5 // Key found, but nil value? //| movzx RC, PC_RA //| // Get node value. //|.if X64 //| mov RBa, [RA] //| mov [BASE+RC*8], RBa //|.else //| mov RB, [RA] //| mov RA, [RA+4] //| mov [BASE+RC*8], RB //| mov [BASE+RC*8+4], RA //|.endif //|2: //| ins_next dasm_put(Dst, 11442, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); # 4947 "vm_x86.dasc" //| //|3: //| movzx RC, PC_RA //| mov dword [BASE+RC*8+4], LJ_TNIL //| jmp <2 //| //|4: // Follow hash chain. //| mov NODE:RA, NODE:RA->next //| test NODE:RA, NODE:RA //| jnz <1 //| // End of hash chain: key not found, nil result. //| //|5: // Check for __index if table value is nil. //| mov TAB:RA, TAB:RB->metatable //| test TAB:RA, TAB:RA //| jz <3 // No metatable: done. //| test byte TAB:RA->nomm, 1<vmeta_tgets // Caveat: preserve STR:RC. dasm_put(Dst, 11527, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<vmeta_tgetb //| mov TAB:RB, [BASE+RB*8] //| cmp RC, TAB:RB->asize //| jae ->vmeta_tgetb //| shl RC, 3 //| add RC, TAB:RB->array //| cmp dword [RC+4], LJ_TNIL // Avoid overwriting RB in fastpath. //| je >2 //| // Get array slot. //|.if X64 //| mov RBa, [RC] //| mov [BASE+RA*8], RBa //|.else //| mov RB, [RC] //| mov RC, [RC+4] //| mov [BASE+RA*8], RB //| mov [BASE+RA*8+4], RC //|.endif //|1: //| ins_next //| //|2: // Check for __index if table value is nil. //| cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. //| jz >3 //| mov TAB:RA, TAB:RB->metatable //| test byte TAB:RA->nomm, 1<vmeta_tgetb // 'no __index' flag NOT set: check. //| movzx RA, PC_RA // Restore RA. dasm_put(Dst, 11599, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<vmeta_tsetv //| mov TAB:RB, [BASE+RB*8] //| //| // Integer key? //|.if DUALNUM //| checkint RC, >5 //| mov RC, dword [BASE+RC*8] //|.else //| // Convert number to int and back and compare. //| checknum RC, >5 //|.if SSE //| movsd xmm0, qword [BASE+RC*8] //| cvtsd2si RC, xmm0 //| cvtsi2sd xmm1, RC //| ucomisd xmm0, xmm1 //|.else //| fld qword [BASE+RC*8] //| fist ARG1 //| fild ARG1 //| fcomparepp //| mov RC, ARG1 //|.endif //| jne ->vmeta_tsetv // Generic numeric key? Use fallback. //|.endif //| cmp RC, TAB:RB->asize // Takes care of unordered, too. //| jae ->vmeta_tsetv //| shl RC, 3 //| add RC, TAB:RB->array //| cmp dword [RC+4], LJ_TNIL //| je >3 // Previous value is nil? //|1: //| test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) //| jnz >7 //|2: // Set array slot. //|.if X64 //| mov RBa, [BASE+RA*8] dasm_put(Dst, 11712, LJ_TTAB, LJ_TISNUM, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK); # 5040 "vm_x86.dasc" //| mov [RC], RBa //|.else //| mov RB, [BASE+RA*8+4] //| mov RA, [BASE+RA*8] //| mov [RC+4], RB //| mov [RC], RA //|.endif //| ins_next //| //|3: // Check for __newindex if previous value is nil. //| cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. //| jz <1 //| mov TAB:RA, TAB:RB->metatable //| test byte TAB:RA->nomm, 1<vmeta_tsetv // 'no __newindex' flag NOT set: check. //| movzx RA, PC_RA // Restore RA. //| jmp <1 //| //|5: // String key? //| checkstr RC, ->vmeta_tsetv //| mov STR:RC, [BASE+RC*8] //| jmp ->BC_TSETS_Z //| //|7: // Possible table write barrier for the value. Skip valiswhite check. //| barrierback TAB:RB, RA dasm_put(Dst, 11804, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<marked), (uint8_t)~LJ_GC_BLACK); # 5065 "vm_x86.dasc" //| movzx RA, PC_RA // Restore RA. //| jmp <2 dasm_put(Dst, 11888, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); # 5067 "vm_x86.dasc" break; case BC_TSETS: //| ins_ABC // RA = src, RB = table, RC = str const (~) //| not RCa //| mov STR:RC, [KBASE+RC*4] //| checktab RB, ->vmeta_tsets //| mov TAB:RB, [BASE+RB*8] //|->BC_TSETS_Z: // RB = GCtab *, RC = GCstr *, refetches PC_RA. //| mov RA, TAB:RB->hmask //| and RA, STR:RC->hash //| imul RA, #NODE //| mov byte TAB:RB->nomm, 0 // Clear metamethod cache. //| add NODE:RA, TAB:RB->node //|1: //| cmp dword NODE:RA->key.it, LJ_TSTR //| jne >5 //| cmp dword NODE:RA->key.gcr, STR:RC //| jne >5 //| // Ok, key found. Assumes: offsetof(Node, val) == 0 //| cmp dword [RA+4], LJ_TNIL //| je >4 // Previous value is nil? //|2: //| test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) dasm_put(Dst, 11909, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); # 5090 "vm_x86.dasc" //| jnz >7 //|3: // Set node value. //| movzx RC, PC_RA //|.if X64 //| mov RBa, [BASE+RC*8] //| mov [RA], RBa //|.else //| mov RB, [BASE+RC*8+4] //| mov RC, [BASE+RC*8] //| mov [RA+4], RB //| mov [RA], RC //|.endif //| ins_next //| //|4: // Check for __newindex if previous value is nil. //| cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. //| jz <2 //| mov TMP1, RA // Save RA. //| mov TAB:RA, TAB:RB->metatable //| test byte TAB:RA->nomm, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. //| mov RA, TMP1 // Restore RA. //| jmp <2 //| //|5: // Follow hash chain. //| mov NODE:RA, NODE:RA->next //| test NODE:RA, NODE:RA //| jnz <1 //| // End of hash chain: key not found, add a new one. //| //| // But check for __newindex first. //| mov TAB:RA, TAB:RB->metatable dasm_put(Dst, 11986, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); # 5122 "vm_x86.dasc" //| test TAB:RA, TAB:RA //| jz >6 // No metatable: continue. //| test byte TAB:RA->nomm, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. //|6: //| mov TMP1, STR:RC //| mov TMP2, LJ_TSTR //| mov TMP3, TAB:RB // Save TAB:RB for us. //|.if X64 //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE //| lea CARG3, TMP1 //| mov CARG2d, TAB:RB //| mov L:RB, L:CARG1d //|.else //| lea RC, TMP1 // Store temp. TValue in TMP1/TMP2. //| mov ARG2, TAB:RB //| mov L:RB, SAVE_L //| mov ARG3, RC //| mov ARG1, L:RB //| mov L:RB->base, BASE //|.endif //| mov SAVE_PC, PC //| call extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k) //| // Handles write barrier for the new key. TValue * returned in eax (RC). //| mov BASE, L:RB->base //| mov TAB:RB, TMP3 // Need TAB:RB for barrier. //| mov RA, eax //| jmp <2 // Must check write barrier for value. //| //|7: // Possible table write barrier for the value. Skip valiswhite check. //| barrierback TAB:RB, RC // Destroys STR:RC. //| jmp <3 dasm_put(Dst, 12073, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), (uint8_t)~LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); # 5155 "vm_x86.dasc" break; case BC_TSETB: //| ins_ABC // RA = src, RB = table, RC = byte literal //| checktab RB, ->vmeta_tsetb //| mov TAB:RB, [BASE+RB*8] //| cmp RC, TAB:RB->asize //| jae ->vmeta_tsetb //| shl RC, 3 //| add RC, TAB:RB->array //| cmp dword [RC+4], LJ_TNIL //| je >3 // Previous value is nil? //|1: //| test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) //| jnz >7 //|2: // Set array slot. //|.if X64 //| mov RAa, [BASE+RA*8] //| mov [RC], RAa //|.else //| mov RB, [BASE+RA*8+4] //| mov RA, [BASE+RA*8] //| mov [RC+4], RB //| mov [RC], RA //|.endif //| ins_next //| //|3: // Check for __newindex if previous value is nil. //| cmp dword TAB:RB->metatable, 0 // Shouldn't overwrite RA for fastpath. //| jz <1 //| mov TAB:RA, TAB:RB->metatable dasm_put(Dst, 12165, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); # 5185 "vm_x86.dasc" //| test byte TAB:RA->nomm, 1<vmeta_tsetb // 'no __newindex' flag NOT set: check. //| movzx RA, PC_RA // Restore RA. //| jmp <1 //| //|7: // Possible table write barrier for the value. Skip valiswhite check. //| barrierback TAB:RB, RA //| movzx RA, PC_RA // Restore RA. //| jmp <2 dasm_put(Dst, 12260, Dt6(->metatable), Dt6(->nomm), 1<marked), (uint8_t)~LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); # 5194 "vm_x86.dasc" break; case BC_TSETM: //| ins_AD // RA = base (table at base-1), RD = num const (start index) //| mov TMP1, KBASE // Need one more free register. //| mov KBASE, dword [KBASE+RD*8] // Integer constant is in lo-word. //|1: //| lea RA, [BASE+RA*8] //| mov TAB:RB, [RA-8] // Guaranteed to be a table. //| test byte TAB:RB->marked, LJ_GC_BLACK // isblack(table) //| jnz >7 //|2: //| mov RD, MULTRES //| sub RD, 1 //| jz >4 // Nothing to copy? //| add RD, KBASE // Compute needed size. //| cmp RD, TAB:RB->asize //| ja >5 // Doesn't fit into array part? //| sub RD, KBASE //| shl KBASE, 3 //| add KBASE, TAB:RB->array //|3: // Copy result slots to table. //|.if X64 //| mov RBa, [RA] //| add RA, 8 //| mov [KBASE], RBa //|.else //| mov RB, [RA] //| mov [KBASE], RB //| mov RB, [RA+4] //| add RA, 8 //| mov [KBASE+4], RB //|.endif //| add KBASE, 8 //| sub RD, 1 //| jnz <3 //|4: //| mov KBASE, TMP1 //| ins_next //| //|5: // Need to resize array part. //|.if X64 //| mov L:CARG1d, SAVE_L //| mov L:CARG1d->base, BASE // Caveat: CARG2d/CARG3d may be BASE. //| mov CARG2d, TAB:RB //| mov CARG3d, RD //| mov L:RB, L:CARG1d //|.else //| mov ARG2, TAB:RB //| mov L:RB, SAVE_L //| mov L:RB->base, BASE //| mov ARG3, RD //| mov ARG1, L:RB //|.endif //| mov SAVE_PC, PC //| call extern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize) //| mov BASE, L:RB->base //| movzx RA, PC_RA // Restore RA. //| jmp <1 // Retry. //| //|7: // Possible table write barrier for any value. Skip valiswhite check. //| barrierback TAB:RB, RD dasm_put(Dst, 12308, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base)); # 5256 "vm_x86.dasc" //| jmp <2 dasm_put(Dst, 12458, Dt6(->marked), (uint8_t)~LJ_GC_BLACK, DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); # 5257 "vm_x86.dasc" break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: //| ins_A_C // RA = base, (RB = nresults+1,) RC = nargs+1 | extra_nargs dasm_put(Dst, 9787); # 5263 "vm_x86.dasc" if (op == BC_CALLM) { //| add NARGS:RD, MULTRES dasm_put(Dst, 12478); # 5265 "vm_x86.dasc" } //| cmp dword [BASE+RA*8+4], LJ_TFUNC //| mov LFUNC:RB, [BASE+RA*8] //| jne ->vmeta_call_ra //| lea BASE, [BASE+RA*8+8] //| ins_call dasm_put(Dst, 12483, LJ_TFUNC, Dt7(->pc)); # 5271 "vm_x86.dasc" break; case BC_CALLMT: //| ins_AD // RA = base, RD = extra_nargs //| add NARGS:RD, MULTRES //| // Fall through. Assumes BC_CALLT follows and ins_AD is a no-op. dasm_put(Dst, 12478); # 5277 "vm_x86.dasc" break; case BC_CALLT: //| ins_AD // RA = base, RD = nargs+1 //| lea RA, [BASE+RA*8+8] //| mov KBASE, BASE // Use KBASE for move + vmeta_call hint. //| mov LFUNC:RB, [RA-8] //| cmp dword [RA-4], LJ_TFUNC //| jne ->vmeta_call //|->BC_CALLT_Z: //| mov PC, [BASE-4] //| test PC, FRAME_TYPE //| jnz >7 //|1: //| mov [BASE-8], LFUNC:RB // Copy function down, reloaded below. //| mov MULTRES, NARGS:RD //| sub NARGS:RD, 1 //| jz >3 //|2: // Move args down. //|.if X64 //| mov RBa, [RA] //| add RA, 8 //| mov [KBASE], RBa //|.else //| mov RB, [RA] //| mov [KBASE], RB //| mov RB, [RA+4] //| add RA, 8 //| mov [KBASE+4], RB //|.endif //| add KBASE, 8 //| sub NARGS:RD, 1 //| jnz <2 //| //| mov LFUNC:RB, [BASE-8] //|3: //| mov NARGS:RD, MULTRES //| cmp byte LFUNC:RB->ffid, 1 // (> FF_C) Calling a fast function? //| ja >5 //|4: //| ins_callt //| //|5: // Tailcall to a fast function. //| test PC, FRAME_TYPE // Lua frame below? dasm_put(Dst, 12526, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); # 5320 "vm_x86.dasc" //| jnz <4 //| movzx RA, PC_RA //| not RAa //| lea RA, [BASE+RA*8] //| mov LFUNC:KBASE, [RA-8] // Need to prepare KBASE. //| mov KBASE, LFUNC:KBASE->pc //| mov KBASE, [KBASE+PC2PROTO(k)] //| jmp <4 //| //|7: // Tailcall from a vararg function. //| sub PC, FRAME_VARG //| test PC, FRAME_TYPEP //| jnz >8 // Vararg frame below? //| sub BASE, PC // Need to relocate BASE/KBASE down. //| mov KBASE, BASE //| mov PC, [BASE-4] //| jmp <1 //|8: //| add PC, FRAME_VARG //| jmp <1 dasm_put(Dst, 12644, FRAME_TYPE, Dt7(->pc), PC2PROTO(k), FRAME_VARG, FRAME_TYPEP, FRAME_VARG); # 5340 "vm_x86.dasc" break; case BC_ITERC: //| ins_A // RA = base, (RB = nresults+1,) RC = nargs+1 (2+1) //| lea RA, [BASE+RA*8+8] // fb = base+1 //|.if X64 //| mov RBa, [RA-24] // Copy state. fb[0] = fb[-3]. //| mov RCa, [RA-16] // Copy control var. fb[1] = fb[-2]. //| mov [RA], RBa //| mov [RA+8], RCa //|.else //| mov RB, [RA-24] // Copy state. fb[0] = fb[-3]. //| mov RC, [RA-20] //| mov [RA], RB //| mov [RA+4], RC //| mov RB, [RA-16] // Copy control var. fb[1] = fb[-2]. //| mov RC, [RA-12] //| mov [RA+8], RB //| mov [RA+12], RC //|.endif //| mov LFUNC:RB, [RA-32] // Copy callable. fb[-1] = fb[-4] //| mov RC, [RA-28] //| mov [RA-8], LFUNC:RB //| mov [RA-4], RC //| cmp RC, LJ_TFUNC // Handle like a regular 2-arg call. //| mov NARGS:RD, 2+1 //| jne ->vmeta_call //| mov BASE, RA //| ins_call dasm_put(Dst, 12718, LJ_TFUNC, 2+1, Dt7(->pc)); # 5369 "vm_x86.dasc" break; case BC_ITERN: //| ins_A // RA = base, (RB = nresults+1, RC = nargs+1 (2+1)) //|.if JIT //| // NYI: add hotloop, record BC_ITERN. //|.endif //| mov TMP1, KBASE // Need two more free registers. //| mov TMP2, DISPATCH //| mov TAB:RB, [BASE+RA*8-16] //| mov RC, [BASE+RA*8-8] // Get index from control var. //| mov DISPATCH, TAB:RB->asize //| add PC, 4 //| mov KBASE, TAB:RB->array //|1: // Traverse array part. //| cmp RC, DISPATCH; jae >5 // Index points after array part? //| cmp dword [KBASE+RC*8+4], LJ_TNIL; je >4 //|.if DUALNUM //| mov dword [BASE+RA*8+4], LJ_TISNUM //| mov dword [BASE+RA*8], RC //|.elif SSE //| cvtsi2sd xmm0, RC //|.else //| fild dword [BASE+RA*8-8] //|.endif //| // Copy array slot to returned value. //|.if X64 //| mov RBa, [KBASE+RC*8] //| mov [BASE+RA*8+8], RBa //|.else //| mov RB, [KBASE+RC*8+4] //| mov [BASE+RA*8+12], RB //| mov RB, [KBASE+RC*8] //| mov [BASE+RA*8+8], RB //|.endif //| add RC, 1 //| // Return array index as a numeric key. //|.if DUALNUM //| // See above. //|.elif SSE //| movsd qword [BASE+RA*8], xmm0 //|.else //| fstp qword [BASE+RA*8] //|.endif //| mov [BASE+RA*8-8], RC // Update control var. //|2: //| movzx RD, PC_RD // Get target from ITERL. //| branchPC RD //|3: //| mov DISPATCH, TMP2 //| mov KBASE, TMP1 //| ins_next //| //|4: // Skip holes in array part. //| add RC, 1 //|.if not (DUALNUM or SSE) //| mov [BASE+RA*8-8], RC //|.endif //| jmp <1 //| //|5: // Traverse hash part. //| sub RC, DISPATCH //|6: //| cmp RC, TAB:RB->hmask; ja <3 // End of iteration? Branch to ITERL+1. //| imul KBASE, RC, #NODE //| add NODE:KBASE, TAB:RB->node dasm_put(Dst, 12790, Dt6(->asize), Dt6(->array), LJ_TNIL, -BCBIAS_J*4, Dt6(->hmask), sizeof(Node)); # 5435 "vm_x86.dasc" //| cmp dword NODE:KBASE->val.it, LJ_TNIL; je >7 //| lea DISPATCH, [RC+DISPATCH+1] //| // Copy key and value from hash slot. //|.if X64 //| mov RBa, NODE:KBASE->key //| mov RCa, NODE:KBASE->val //| mov [BASE+RA*8], RBa //| mov [BASE+RA*8+8], RCa //|.else //| mov RB, NODE:KBASE->key.gcr //| mov RC, NODE:KBASE->key.it //| mov [BASE+RA*8], RB //| mov [BASE+RA*8+4], RC //| mov RB, NODE:KBASE->val.gcr //| mov RC, NODE:KBASE->val.it //| mov [BASE+RA*8+8], RB //| mov [BASE+RA*8+12], RC //|.endif //| mov [BASE+RA*8-8], DISPATCH //| jmp <2 //| //|7: // Skip holes in hash part. //| add RC, 1 //| jmp <6 dasm_put(Dst, 12942, Dt6(->node), DtB(->val.it), LJ_TNIL, DtB(->key), DtB(->val)); # 5459 "vm_x86.dasc" break; case BC_ISNEXT: //| ins_AD // RA = base, RD = target (points to ITERN) //| cmp dword [BASE+RA*8-20], LJ_TFUNC; jne >5 //| mov CFUNC:RB, [BASE+RA*8-24] //| cmp dword [BASE+RA*8-12], LJ_TTAB; jne >5 //| cmp dword [BASE+RA*8-4], LJ_TNIL; jne >5 //| cmp byte CFUNC:RB->ffid, FF_next_N; jne >5 //| branchPC RD //| mov dword [BASE+RA*8-8], 0 // Initialize control var. //| mov dword [BASE+RA*8-4], 0xfffe7fff //|1: //| ins_next //|5: // Despecialize bytecode if any of the checks fail. //| mov PC_OP, BC_JMP //| branchPC RD //| mov byte [PC], BC_ITERC //| jmp <1 dasm_put(Dst, 12997, LJ_TFUNC, LJ_TTAB, LJ_TNIL, Dt8(->ffid), FF_next_N, -BCBIAS_J*4, BC_JMP, -BCBIAS_J*4, BC_ITERC); # 5478 "vm_x86.dasc" break; case BC_VARG: //| ins_ABC // RA = base, RB = nresults+1, RC = numparams //| mov TMP1, KBASE // Need one more free register. //| lea KBASE, [BASE+RC*8+(8+FRAME_VARG)] //| lea RA, [BASE+RA*8] //| sub KBASE, [BASE-4] //| // Note: KBASE may now be even _above_ BASE if nargs was < numparams. //| test RB, RB //| jz >5 // Copy all varargs? //| lea RB, [RA+RB*8-8] //| cmp KBASE, BASE // No vararg slots? //| jnb >2 //|1: // Copy vararg slots to destination slots. //|.if X64 //| mov RCa, [KBASE-8] //| add KBASE, 8 //| mov [RA], RCa //|.else //| mov RC, [KBASE-8] //| mov [RA], RC //| mov RC, [KBASE-4] //| add KBASE, 8 //| mov [RA+4], RC //|.endif //| add RA, 8 //| cmp RA, RB // All destination slots filled? //| jnb >3 //| cmp KBASE, BASE // No more vararg slots? //| jb <1 //|2: // Fill up remainder with nil. //| mov dword [RA+4], LJ_TNIL //| add RA, 8 //| cmp RA, RB //| jb <2 //|3: //| mov KBASE, TMP1 //| ins_next //| //|5: // Copy all varargs. //| mov MULTRES, 1 // MULTRES = 0+1 //| mov RC, BASE //| sub RC, KBASE //| jbe <3 // No vararg slots? //| mov RB, RC //| shr RB, 3 //| add RB, 1 //| mov MULTRES, RB // MULTRES = #varargs+1 //| mov L:RB, SAVE_L //| add RC, RA //| cmp RC, L:RB->maxstack //| ja >7 // Need to grow stack? //|6: // Copy all vararg slots. //|.if X64 //| mov RCa, [KBASE-8] dasm_put(Dst, 13110, (8+FRAME_VARG), LJ_TNIL, Dt1(->maxstack)); # 5534 "vm_x86.dasc" //| add KBASE, 8 //| mov [RA], RCa //|.else //| mov RC, [KBASE-8] //| mov [RA], RC //| mov RC, [KBASE-4] //| add KBASE, 8 //| mov [RA+4], RC //|.endif //| add RA, 8 //| cmp KBASE, BASE // No more vararg slots? //| jb <6 //| jmp <3 //| //|7: // Grow stack for varargs. //| mov L:RB->base, BASE //| mov L:RB->top, RA //| mov SAVE_PC, PC //| sub KBASE, BASE // Need delta, because BASE may change. //| mov FCARG2, MULTRES //| sub FCARG2, 1 //| mov FCARG1, L:RB //| call extern lj_state_growstack@8 // (lua_State *L, int n) //| mov BASE, L:RB->base //| mov RA, L:RB->top //| add KBASE, BASE //| jmp <6 dasm_put(Dst, 13277, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); # 5561 "vm_x86.dasc" break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: //| ins_AD // RA = results, RD = extra_nresults //| add RD, MULTRES // MULTRES >=1, so RD >=1. //| // Fall through. Assumes BC_RET follows and ins_AD is a no-op. dasm_put(Dst, 12478); # 5569 "vm_x86.dasc" break; case BC_RET: case BC_RET0: case BC_RET1: //| ins_AD // RA = results, RD = nresults+1 if (op != BC_RET0) { //| shl RA, 3 dasm_put(Dst, 13347); # 5575 "vm_x86.dasc" } //|1: //| mov PC, [BASE-4] //| mov MULTRES, RD // Save nresults+1. //| test PC, FRAME_TYPE // Check frame type marker. //| jnz >7 // Not returning to a fixarg Lua func? dasm_put(Dst, 13351, FRAME_TYPE); # 5581 "vm_x86.dasc" switch (op) { case BC_RET: //|->BC_RET_Z: //| mov KBASE, BASE // Use KBASE for result move. //| sub RD, 1 //| jz >3 //|2: // Move results down. //|.if X64 //| mov RBa, [KBASE+RA] //| mov [KBASE-8], RBa //|.else //| mov RB, [KBASE+RA] //| mov [KBASE-8], RB //| mov RB, [KBASE+RA+4] //| mov [KBASE-4], RB //|.endif //| add KBASE, 8 //| sub RD, 1 //| jnz <2 //|3: //| mov RD, MULTRES // Note: MULTRES may be >255. //| movzx RB, PC_RB // So cannot compare with RDL! //|5: //| cmp RB, RD // More results expected? //| ja >6 dasm_put(Dst, 13370); # 5606 "vm_x86.dasc" break; case BC_RET1: //|.if X64 //| mov RBa, [BASE+RA] //| mov [BASE-8], RBa //|.else //| mov RB, [BASE+RA+4] //| mov [BASE-4], RB //| mov RB, [BASE+RA] //| mov [BASE-8], RB //|.endif dasm_put(Dst, 13424); # 5617 "vm_x86.dasc" /* fallthrough */ case BC_RET0: //|5: //| cmp PC_RB, RDL // More results expected? //| ja >6 dasm_put(Dst, 13434); # 5622 "vm_x86.dasc" default: break; } //| movzx RA, PC_RA //| not RAa // Note: ~RA = -(RA+1) //| lea BASE, [BASE+RA*8] // base = base - (RA+1)*8 //| mov LFUNC:KBASE, [BASE-8] //| mov KBASE, LFUNC:KBASE->pc //| mov KBASE, [KBASE+PC2PROTO(k)] //| ins_next //| //|6: // Fill up results with nil. dasm_put(Dst, 13445, Dt7(->pc), PC2PROTO(k)); # 5634 "vm_x86.dasc" if (op == BC_RET) { //| mov dword [KBASE-4], LJ_TNIL // Note: relies on shifted base. //| add KBASE, 8 dasm_put(Dst, 13493, LJ_TNIL); # 5637 "vm_x86.dasc" } else { //| mov dword [BASE+RD*8-12], LJ_TNIL dasm_put(Dst, 13504, LJ_TNIL); # 5639 "vm_x86.dasc" } //| add RD, 1 //| jmp <5 //| //|7: // Non-standard return case. //| lea RB, [PC-FRAME_VARG] //| test RB, FRAME_TYPEP //| jnz ->vm_return //| // Return from vararg function: relocate BASE down and RA up. //| sub BASE, RB dasm_put(Dst, 13511, -FRAME_VARG, FRAME_TYPEP); # 5649 "vm_x86.dasc" if (op != BC_RET0) { //| add RA, RB dasm_put(Dst, 13535); # 5651 "vm_x86.dasc" } //| jmp <1 dasm_put(Dst, 9762); # 5653 "vm_x86.dasc" break; /* -- Loops and branches ------------------------------------------------ */ //|.define FOR_IDX, [RA]; .define FOR_TIDX, dword [RA+4] //|.define FOR_STOP, [RA+8]; .define FOR_TSTOP, dword [RA+12] //|.define FOR_STEP, [RA+16]; .define FOR_TSTEP, dword [RA+20] //|.define FOR_EXT, [RA+24]; .define FOR_TEXT, dword [RA+28] case BC_FORL: //|.if JIT //| hotloop RB //|.endif //| // Fall through. Assumes BC_IFORL follows and ins_AJ is a no-op. dasm_put(Dst, 13539, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_LOOP); # 5667 "vm_x86.dasc" break; case BC_JFORI: case BC_JFORL: #if !LJ_HASJIT break; #endif case BC_FORI: case BC_IFORL: vk = (op == BC_IFORL || op == BC_JFORL); //| ins_AJ // RA = base, RD = target (after end of loop or start of loop) //| lea RA, [BASE+RA*8] dasm_put(Dst, 13560); # 5679 "vm_x86.dasc" if (LJ_DUALNUM) { //| cmp FOR_TIDX, LJ_TISNUM; jne >9 dasm_put(Dst, 13564, LJ_TISNUM); # 5681 "vm_x86.dasc" if (!vk) { //| cmp FOR_TSTOP, LJ_TISNUM; jne ->vmeta_for //| cmp FOR_TSTEP, LJ_TISNUM; jne ->vmeta_for //| mov RB, dword FOR_IDX //| cmp dword FOR_STEP, 0; jl >5 dasm_put(Dst, 13574, LJ_TISNUM, LJ_TISNUM); # 5686 "vm_x86.dasc" } else { #ifdef LUA_USE_ASSERT //| cmp FOR_TSTOP, LJ_TISNUM; jne ->assert_bad_for_arg_type //| cmp FOR_TSTEP, LJ_TISNUM; jne ->assert_bad_for_arg_type dasm_put(Dst, 13603, LJ_TISNUM, LJ_TISNUM); # 5690 "vm_x86.dasc" #endif //| mov RB, dword FOR_STEP //| test RB, RB; js >5 //| add RB, dword FOR_IDX; jo >1 //| mov dword FOR_IDX, RB dasm_put(Dst, 13622); # 5695 "vm_x86.dasc" } //| cmp RB, dword FOR_STOP //| mov FOR_TEXT, LJ_TISNUM //| mov dword FOR_EXT, RB dasm_put(Dst, 13641, LJ_TISNUM); # 5699 "vm_x86.dasc" if (op == BC_FORI) { //| jle >7 //|1: //|6: //| branchPC RD dasm_put(Dst, 13652, -BCBIAS_J*4); # 5704 "vm_x86.dasc" } else if (op == BC_JFORI) { //| branchPC RD //| movzx RD, PC_RD //| jle =>BC_JLOOP //|1: //|6: dasm_put(Dst, 13666, -BCBIAS_J*4, BC_JLOOP); # 5710 "vm_x86.dasc" } else if (op == BC_IFORL) { //| jg >7 //|6: //| branchPC RD //|1: dasm_put(Dst, 13684, -BCBIAS_J*4); # 5715 "vm_x86.dasc" } else { //| jle =>BC_JLOOP //|1: //|6: dasm_put(Dst, 13676, BC_JLOOP); # 5719 "vm_x86.dasc" } //|7: //| ins_next //| //|5: // Invert check for negative step. dasm_put(Dst, 13698); # 5724 "vm_x86.dasc" if (vk) { //| add RB, dword FOR_IDX; jo <1 //| mov dword FOR_IDX, RB dasm_put(Dst, 13723); # 5727 "vm_x86.dasc" } //| cmp RB, dword FOR_STOP //| mov FOR_TEXT, LJ_TISNUM //| mov dword FOR_EXT, RB dasm_put(Dst, 13641, LJ_TISNUM); # 5731 "vm_x86.dasc" if (op == BC_FORI) { //| jge <7 dasm_put(Dst, 13732); # 5733 "vm_x86.dasc" } else if (op == BC_JFORI) { //| branchPC RD //| movzx RD, PC_RD //| jge =>BC_JLOOP dasm_put(Dst, 13737, -BCBIAS_J*4, BC_JLOOP); # 5737 "vm_x86.dasc" } else if (op == BC_IFORL) { //| jl <7 dasm_put(Dst, 13751); # 5739 "vm_x86.dasc" } else { //| jge =>BC_JLOOP dasm_put(Dst, 13747, BC_JLOOP); # 5741 "vm_x86.dasc" } //| jmp <6 //|9: // Fallback to FP variant. dasm_put(Dst, 13756); # 5744 "vm_x86.dasc" } else if (!vk) { //| cmp FOR_TIDX, LJ_TISNUM dasm_put(Dst, 13763, LJ_TISNUM); # 5746 "vm_x86.dasc" } if (!vk) { //| jae ->vmeta_for //| cmp FOR_TSTOP, LJ_TISNUM; jae ->vmeta_for dasm_put(Dst, 13769, LJ_TISNUM); # 5750 "vm_x86.dasc" } else { #ifdef LUA_USE_ASSERT //| cmp FOR_TSTOP, LJ_TISNUM; jae ->assert_bad_for_arg_type //| cmp FOR_TSTEP, LJ_TISNUM; jae ->assert_bad_for_arg_type dasm_put(Dst, 13783, LJ_TISNUM, LJ_TISNUM); # 5754 "vm_x86.dasc" #endif } //| mov RB, FOR_TSTEP // Load type/hiword of for step. dasm_put(Dst, 13802); # 5757 "vm_x86.dasc" if (!vk) { //| cmp RB, LJ_TISNUM; jae ->vmeta_for dasm_put(Dst, 13806, LJ_TISNUM); # 5759 "vm_x86.dasc" } //|.if SSE //| movsd xmm0, qword FOR_IDX //| movsd xmm1, qword FOR_STOP dasm_put(Dst, 13815); # 5763 "vm_x86.dasc" if (vk) { //| addsd xmm0, qword FOR_STEP //| movsd qword FOR_IDX, xmm0 //| test RB, RB; js >3 dasm_put(Dst, 13827); # 5767 "vm_x86.dasc" } else { //| jl >3 dasm_put(Dst, 13846); # 5769 "vm_x86.dasc" } //| ucomisd xmm1, xmm0 //|1: //| movsd qword FOR_EXT, xmm0 //|.else //| fld qword FOR_STOP //| fld qword FOR_IDX dasm_put(Dst, 13851); # 5776 "vm_x86.dasc" if (vk) { //| fadd qword FOR_STEP // nidx = idx + step //| fst qword FOR_IDX //| fst qword FOR_EXT //| test RB, RB; js >1 } else { //| fst qword FOR_EXT //| jl >1 } //| fxch // Swap lim/(n)idx if step non-negative. //|1: //| fcomparepp //|.endif if (op == BC_FORI) { //|.if DUALNUM //| jnb <7 //|.else //| jnb >2 //| branchPC RD //|.endif dasm_put(Dst, 13864, -BCBIAS_J*4); # 5796 "vm_x86.dasc" } else if (op == BC_JFORI) { //| branchPC RD //| movzx RD, PC_RD //| jnb =>BC_JLOOP dasm_put(Dst, 13874, -BCBIAS_J*4, BC_JLOOP); # 5800 "vm_x86.dasc" } else if (op == BC_IFORL) { //|.if DUALNUM //| jb <7 //|.else //| jb >2 //| branchPC RD //|.endif dasm_put(Dst, 13888, -BCBIAS_J*4); # 5807 "vm_x86.dasc" } else { //| jnb =>BC_JLOOP dasm_put(Dst, 13884, BC_JLOOP); # 5809 "vm_x86.dasc" } //|.if DUALNUM //| jmp <6 //|.else //|2: //| ins_next //|.endif //|.if SSE //|3: // Invert comparison if step is negative. //| ucomisd xmm0, xmm1 //| jmp <1 //|.endif dasm_put(Dst, 13898); # 5821 "vm_x86.dasc" break; case BC_ITERL: //|.if JIT //| hotloop RB //|.endif //| // Fall through. Assumes BC_IITERL follows and ins_AJ is a no-op. dasm_put(Dst, 13539, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_LOOP); # 5828 "vm_x86.dasc" break; case BC_JITERL: #if !LJ_HASJIT break; #endif case BC_IITERL: //| ins_AJ // RA = base, RD = target //| lea RA, [BASE+RA*8] //| mov RB, [RA+4] //| cmp RB, LJ_TNIL; je >1 // Stop if iterator returned nil. dasm_put(Dst, 13931, LJ_TNIL); # 5839 "vm_x86.dasc" if (op == BC_JITERL) { //| mov [RA-4], RB //| mov RB, [RA] //| mov [RA-8], RB //| jmp =>BC_JLOOP dasm_put(Dst, 13946, BC_JLOOP); # 5844 "vm_x86.dasc" } else { //| branchPC RD // Otherwise save control var + branch. //| mov RD, [RA] //| mov [RA-4], RB //| mov [RA-8], RD dasm_put(Dst, 13960, -BCBIAS_J*4); # 5849 "vm_x86.dasc" } //|1: //| ins_next dasm_put(Dst, 9108); # 5852 "vm_x86.dasc" break; case BC_LOOP: //| ins_A // RA = base, RD = target (loop extent) //| // Note: RA/RD is only used by trace recorder to determine scope/extent //| // This opcode does NOT jump, it's only purpose is to detect a hot loop. //|.if JIT //| hotloop RB //|.endif //| // Fall through. Assumes BC_ILOOP follows and ins_A is a no-op. dasm_put(Dst, 13539, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_LOOP); # 5862 "vm_x86.dasc" break; case BC_ILOOP: //| ins_A // RA = base, RD = target (loop extent) //| ins_next dasm_put(Dst, 9110); # 5867 "vm_x86.dasc" break; case BC_JLOOP: //|.if JIT //| ins_AD // RA = base (ignored), RD = traceno //| mov RA, [DISPATCH+DISPATCH_J(trace)] //| mov TRACE:RD, [RA+RD*4] //| mov RDa, TRACE:RD->mcode //| mov L:RB, SAVE_L //| mov [DISPATCH+DISPATCH_GL(jit_base)], BASE //| mov [DISPATCH+DISPATCH_GL(jit_L)], L:RB //| // Save additional callee-save registers only used in compiled code. //|.if X64WIN //| mov TMPQ, r12 //| mov TMPa, r13 //| mov CSAVE_4, r14 //| mov CSAVE_3, r15 //| mov RAa, rsp //| sub rsp, 9*16+4*8 //| movdqa [RAa], xmm6 //| movdqa [RAa-1*16], xmm7 //| movdqa [RAa-2*16], xmm8 //| movdqa [RAa-3*16], xmm9 //| movdqa [RAa-4*16], xmm10 //| movdqa [RAa-5*16], xmm11 //| movdqa [RAa-6*16], xmm12 //| movdqa [RAa-7*16], xmm13 //| movdqa [RAa-8*16], xmm14 //| movdqa [RAa-9*16], xmm15 //|.elif X64 //| mov TMPQ, r12 //| mov TMPa, r13 //| sub rsp, 16 //|.endif //| jmp RDa //|.endif dasm_put(Dst, 13976, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); # 5903 "vm_x86.dasc" break; case BC_JMP: //| ins_AJ // RA = unused, RD = target //| branchPC RD //| ins_next dasm_put(Dst, 14017, -BCBIAS_J*4); # 5909 "vm_x86.dasc" break; /* -- Function headers -------------------------------------------------- */ /* ** Reminder: A function may be called with func/args above L->maxstack, ** i.e. occupying EXTRA_STACK slots. And vmeta_call may add one extra slot, ** too. This means all FUNC* ops (including fast functions) must check ** for stack overflow _before_ adding more slots! */ case BC_FUNCF: //|.if JIT //| hotcall RB //|.endif dasm_put(Dst, 14043, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_CALL); # 5924 "vm_x86.dasc" case BC_FUNCV: /* NYI: compiled vararg functions. */ //| // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow and ins_AD is a no-op. break; case BC_JFUNCF: #if !LJ_HASJIT break; #endif case BC_IFUNCF: //| ins_AD // BASE = new base, RA = framesize, RD = nargs+1 //| mov KBASE, [PC-4+PC2PROTO(k)] //| mov L:RB, SAVE_L //| lea RA, [BASE+RA*8] // Top of frame. //| cmp RA, L:RB->maxstack //| ja ->vm_growstack_f //| movzx RA, byte [PC-4+PC2PROTO(numparams)] //| cmp NARGS:RD, RA // Check for missing parameters. //| jbe >3 //|2: dasm_put(Dst, 14064, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); # 5943 "vm_x86.dasc" if (op == BC_JFUNCF) { //| movzx RD, PC_RD //| jmp =>BC_JLOOP dasm_put(Dst, 14095, BC_JLOOP); # 5946 "vm_x86.dasc" } else { //| ins_next dasm_put(Dst, 9110); # 5948 "vm_x86.dasc" } //| //|3: // Clear missing parameters. //| mov dword [BASE+NARGS:RD*8-4], LJ_TNIL //| add NARGS:RD, 1 //| cmp NARGS:RD, RA //| jbe <3 //| jmp <2 dasm_put(Dst, 14104, LJ_TNIL); # 5956 "vm_x86.dasc" break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif //| int3 // NYI: compiled vararg functions dasm_put(Dst, 8673); # 5963 "vm_x86.dasc" break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: //| ins_AD // BASE = new base, RA = framesize, RD = nargs+1 //| lea RB, [NARGS:RD*8+FRAME_VARG] //| lea RD, [BASE+NARGS:RD*8] //| mov LFUNC:KBASE, [BASE-8] //| mov [RD-4], RB // Store delta + FRAME_VARG. //| mov [RD-8], LFUNC:KBASE // Store copy of LFUNC. //| mov L:RB, SAVE_L //| lea RA, [RD+RA*8] //| cmp RA, L:RB->maxstack //| ja ->vm_growstack_v // Need to grow stack. //| mov RA, BASE //| mov BASE, RD //| movzx RB, byte [PC-4+PC2PROTO(numparams)] //| test RB, RB //| jz >2 //|1: // Copy fixarg slots up to new frame. //| add RA, 8 //| cmp RA, BASE //| jnb >3 // Less args than parameters? //| mov KBASE, [RA-8] //| mov [RD], KBASE //| mov KBASE, [RA-4] //| mov [RD+4], KBASE //| add RD, 8 //| mov dword [RA-4], LJ_TNIL // Clear old fixarg slot (help the GC). //| sub RB, 1 //| jnz <1 //|2: dasm_put(Dst, 14126, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); # 5994 "vm_x86.dasc" if (op == BC_JFUNCV) { //| movzx RD, PC_RD //| jmp =>BC_JLOOP dasm_put(Dst, 14095, BC_JLOOP); # 5997 "vm_x86.dasc" } else { //| mov KBASE, [PC-4+PC2PROTO(k)] //| ins_next dasm_put(Dst, 14223, -4+PC2PROTO(k)); # 6000 "vm_x86.dasc" } //| //|3: // Clear missing parameters. //| mov dword [RD+4], LJ_TNIL //| add RD, 8 //| sub RB, 1 //| jnz <3 //| jmp <2 dasm_put(Dst, 14248, LJ_TNIL); # 6008 "vm_x86.dasc" break; case BC_FUNCC: case BC_FUNCCW: //| ins_AD // BASE = new base, RA = ins RA|RD (unused), RD = nargs+1 //| mov CFUNC:RB, [BASE-8] //| mov KBASEa, CFUNC:RB->f //| mov L:RB, SAVE_L //| lea RD, [BASE+NARGS:RD*8-8] //| mov L:RB->base, BASE //| lea RA, [RD+8*LUA_MINSTACK] //| cmp RA, L:RB->maxstack //| mov L:RB->top, RD dasm_put(Dst, 14270, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); # 6021 "vm_x86.dasc" if (op == BC_FUNCC) { //|.if X64 //| mov CARG1d, L:RB // Caveat: CARG1d may be RA. //|.else //| mov ARG1, L:RB //|.endif dasm_put(Dst, 14300); # 6027 "vm_x86.dasc" } else { //|.if X64 //| mov CARG2, KBASEa //| mov CARG1d, L:RB // Caveat: CARG1d may be RA. //|.else //| mov ARG2, KBASEa //| mov ARG1, L:RB //|.endif dasm_put(Dst, 14304); # 6035 "vm_x86.dasc" } //| ja ->vm_growstack_c // Need to grow stack. //| set_vmstate C dasm_put(Dst, 14312, DISPATCH_GL(vmstate), ~LJ_VMST_C); # 6038 "vm_x86.dasc" if (op == BC_FUNCC) { //| call KBASEa // (lua_State *L) dasm_put(Dst, 14322); # 6040 "vm_x86.dasc" } else { //| // (lua_State *L, lua_CFunction f) //| call aword [DISPATCH+DISPATCH_GL(wrapf)] dasm_put(Dst, 14327, DISPATCH_GL(wrapf)); # 6043 "vm_x86.dasc" } //| set_vmstate INTERP //| // nresults returned in eax (RD). //| mov BASE, L:RB->base //| lea RA, [BASE+RD*8] //| neg RA //| add RA, L:RB->top // RA = (L->top-(L->base+nresults))*8 //| mov PC, [BASE-4] // Fetch PC of caller. //| jmp ->vm_returnc dasm_put(Dst, 14333, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); # 6052 "vm_x86.dasc" break; /* ---------------------------------------------------------------------- */ default: fprintf(stderr, "Error: undefined opcode BC_%s\n", bc_names[op]); exit(2); break; } } static int build_backend(BuildCtx *ctx) { int op; dasm_growpc(Dst, BC__MAX); build_subroutines(ctx); //|.code_op dasm_put(Dst, 14359); # 6069 "vm_x86.dasc" for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op); return BC__MAX; } /* Emit pseudo frame-info for all assembler functions. */ static void emit_asm_debug(BuildCtx *ctx) { int fcofs = (int)((uint8_t *)ctx->glob[GLOB_vm_ffi_call] - ctx->code); #if LJ_64 #define SZPTR "8" #define BSZPTR "3" #define REG_SP "0x7" #define REG_RA "0x10" #else #define SZPTR "4" #define BSZPTR "2" #define REG_SP "0x4" #define REG_RA "0x8" #endif switch (ctx->mode) { case BUILD_elfasm: fprintf(ctx->fp, "\t.section .debug_frame,\"\",@progbits\n"); fprintf(ctx->fp, ".Lframe0:\n" "\t.long .LECIE0-.LSCIE0\n" ".LSCIE0:\n" "\t.long 0xffffffff\n" "\t.byte 0x1\n" "\t.string \"\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n" "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n" "\t.align " SZPTR "\n" ".LECIE0:\n\n"); fprintf(ctx->fp, ".LSFDE0:\n" "\t.long .LEFDE0-.LASFDE0\n" ".LASFDE0:\n" "\t.long .Lframe0\n" #if LJ_64 "\t.quad .Lbegin\n" "\t.quad %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ "\t.byte 0x8f\n\t.uleb128 0x4\n" /* offset r15 */ "\t.byte 0x8e\n\t.uleb128 0x5\n" /* offset r14 */ #else "\t.long .Lbegin\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */ "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0x87\n\t.uleb128 0x3\n" /* offset edi */ "\t.byte 0x86\n\t.uleb128 0x4\n" /* offset esi */ "\t.byte 0x83\n\t.uleb128 0x5\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE0:\n\n", fcofs, CFRAME_SIZE); #if LJ_HASFFI fprintf(ctx->fp, ".LSFDE1:\n" "\t.long .LEFDE1-.LASFDE1\n" ".LASFDE1:\n" "\t.long .Lframe0\n" #if LJ_64 "\t.quad lj_vm_ffi_call\n" "\t.quad %d\n" "\t.byte 0xe\n\t.uleb128 16\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ #else "\t.long lj_vm_ffi_call\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 8\n" /* def_cfa_offset */ "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0xd\n\t.uleb128 0x5\n" /* def_cfa_register ebp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE1:\n\n", (int)ctx->codesz - fcofs); #endif #if (defined(__sun__) && defined(__svr4__)) #if LJ_64 fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@unwind\n"); #else fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n"); #endif #else fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); #endif fprintf(ctx->fp, ".Lframe1:\n" "\t.long .LECIE1-.LSCIE1\n" ".LSCIE1:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.string \"zPR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.uleb128 6\n" /* augmentation length */ "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.long lj_err_unwind_dwarf-.\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n" "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n" "\t.align " SZPTR "\n" ".LECIE1:\n\n"); fprintf(ctx->fp, ".LSFDE2:\n" "\t.long .LEFDE2-.LASFDE2\n" ".LASFDE2:\n" "\t.long .LASFDE2-.Lframe1\n" "\t.long .Lbegin-.\n" "\t.long %d\n" "\t.uleb128 0\n" /* augmentation length */ "\t.byte 0xe\n\t.uleb128 %d\n" /* def_cfa_offset */ #if LJ_64 "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ "\t.byte 0x8f\n\t.uleb128 0x4\n" /* offset r15 */ "\t.byte 0x8e\n\t.uleb128 0x5\n" /* offset r14 */ #else "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0x87\n\t.uleb128 0x3\n" /* offset edi */ "\t.byte 0x86\n\t.uleb128 0x4\n" /* offset esi */ "\t.byte 0x83\n\t.uleb128 0x5\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE2:\n\n", fcofs, CFRAME_SIZE); #if LJ_HASFFI fprintf(ctx->fp, ".Lframe2:\n" "\t.long .LECIE2-.LSCIE2\n" ".LSCIE2:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.string \"zR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.uleb128 1\n" /* augmentation length */ "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.uleb128 " REG_SP "\n\t.uleb128 " SZPTR "\n" "\t.byte 0x80+" REG_RA "\n\t.uleb128 0x1\n" "\t.align " SZPTR "\n" ".LECIE2:\n\n"); fprintf(ctx->fp, ".LSFDE3:\n" "\t.long .LEFDE3-.LASFDE3\n" ".LASFDE3:\n" "\t.long .LASFDE3-.Lframe2\n" "\t.long lj_vm_ffi_call-.\n" "\t.long %d\n" "\t.uleb128 0\n" /* augmentation length */ #if LJ_64 "\t.byte 0xe\n\t.uleb128 16\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.uleb128 0x2\n" /* offset rbp */ "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset rbx */ #else "\t.byte 0xe\n\t.uleb128 8\n" /* def_cfa_offset */ "\t.byte 0x85\n\t.uleb128 0x2\n" /* offset ebp */ "\t.byte 0xd\n\t.uleb128 0x5\n" /* def_cfa_register ebp */ "\t.byte 0x83\n\t.uleb128 0x3\n" /* offset ebx */ #endif "\t.align " SZPTR "\n" ".LEFDE3:\n\n", (int)ctx->codesz - fcofs); #endif break; /* Mental note: never let Apple design an assembler. ** Or a linker. Or a plastic case. But I digress. */ case BUILD_machasm: { #if LJ_HASFFI int fcsize = 0; #endif int i; fprintf(ctx->fp, "\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support\n"); fprintf(ctx->fp, "EH_frame1:\n" "\t.set L$set$x,LECIEX-LSCIEX\n" "\t.long L$set$x\n" "LSCIEX:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.ascii \"zPR\\0\"\n" "\t.byte 0x1\n" "\t.byte 128-" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.byte 6\n" /* augmentation length */ "\t.byte 0x9b\n" /* indirect|pcrel|sdata4 */ #if LJ_64 "\t.long _lj_err_unwind_dwarf+4@GOTPCREL\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte " REG_SP "\n\t.byte " SZPTR "\n" #else "\t.long L_lj_err_unwind_dwarf$non_lazy_ptr-.\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte 0x5\n\t.byte 0x4\n" /* esp=5 on 32 bit MACH-O. */ #endif "\t.byte 0x80+" REG_RA "\n\t.byte 0x1\n" "\t.align " BSZPTR "\n" "LECIEX:\n\n"); for (i = 0; i < ctx->nsym; i++) { const char *name = ctx->sym[i].name; int32_t size = ctx->sym[i+1].ofs - ctx->sym[i].ofs; if (size == 0) continue; #if LJ_HASFFI if (!strcmp(name, "_lj_vm_ffi_call")) { fcsize = size; continue; } #endif fprintf(ctx->fp, "%s.eh:\n" "LSFDE%d:\n" "\t.set L$set$%d,LEFDE%d-LASFDE%d\n" "\t.long L$set$%d\n" "LASFDE%d:\n" "\t.long LASFDE%d-EH_frame1\n" "\t.long %s-.\n" "\t.long %d\n" "\t.byte 0\n" /* augmentation length */ "\t.byte 0xe\n\t.byte %d\n" /* def_cfa_offset */ #if LJ_64 "\t.byte 0x86\n\t.byte 0x2\n" /* offset rbp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset rbx */ "\t.byte 0x8f\n\t.byte 0x4\n" /* offset r15 */ "\t.byte 0x8e\n\t.byte 0x5\n" /* offset r14 */ #else "\t.byte 0x84\n\t.byte 0x2\n" /* offset ebp (4 for MACH-O)*/ "\t.byte 0x87\n\t.byte 0x3\n" /* offset edi */ "\t.byte 0x86\n\t.byte 0x4\n" /* offset esi */ "\t.byte 0x83\n\t.byte 0x5\n" /* offset ebx */ #endif "\t.align " BSZPTR "\n" "LEFDE%d:\n\n", name, i, i, i, i, i, i, i, name, size, CFRAME_SIZE, i); } #if LJ_HASFFI if (fcsize) { fprintf(ctx->fp, "EH_frame2:\n" "\t.set L$set$y,LECIEY-LSCIEY\n" "\t.long L$set$y\n" "LSCIEY:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.ascii \"zR\\0\"\n" "\t.byte 0x1\n" "\t.byte 128-" SZPTR "\n" "\t.byte " REG_RA "\n" "\t.byte 1\n" /* augmentation length */ #if LJ_64 "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte " REG_SP "\n\t.byte " SZPTR "\n" #else "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.byte 0x5\n\t.byte 0x4\n" /* esp=5 on 32 bit MACH. */ #endif "\t.byte 0x80+" REG_RA "\n\t.byte 0x1\n" "\t.align " BSZPTR "\n" "LECIEY:\n\n"); fprintf(ctx->fp, "_lj_vm_ffi_call.eh:\n" "LSFDEY:\n" "\t.set L$set$yy,LEFDEY-LASFDEY\n" "\t.long L$set$yy\n" "LASFDEY:\n" "\t.long LASFDEY-EH_frame2\n" "\t.long _lj_vm_ffi_call-.\n" "\t.long %d\n" "\t.byte 0\n" /* augmentation length */ #if LJ_64 "\t.byte 0xe\n\t.byte 16\n" /* def_cfa_offset */ "\t.byte 0x86\n\t.byte 0x2\n" /* offset rbp */ "\t.byte 0xd\n\t.uleb128 0x6\n" /* def_cfa_register rbp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset rbx */ #else "\t.byte 0xe\n\t.byte 8\n" /* def_cfa_offset */ "\t.byte 0x84\n\t.byte 0x2\n" /* offset ebp (4 for MACH-O)*/ "\t.byte 0xd\n\t.uleb128 0x4\n" /* def_cfa_register ebp */ "\t.byte 0x83\n\t.byte 0x3\n" /* offset ebx */ #endif "\t.align " BSZPTR "\n" "LEFDEY:\n\n", fcsize); } #endif #if LJ_64 fprintf(ctx->fp, "\t.subsections_via_symbols\n"); #else fprintf(ctx->fp, "\t.non_lazy_symbol_pointer\n" "L_lj_err_unwind_dwarf$non_lazy_ptr:\n" ".indirect_symbol _lj_err_unwind_dwarf\n" ".long 0\n"); #endif } break; default: /* Difficult for other modes. */ break; } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm_lib.o0000664000000000000000000003435012213333047024020 0ustar rootrootELF>`@@ H\$Hl$Ld$Ll$H(HAHHHYt3L-L9v'B|-_uLHu Jl-ILH9v#HH=HHTHv%H A D L`HHLLHH\$Hl$Ld$Ll$ H(ÃuBHH>!u ~uHHHHHÃH\$Hl$H(HHHHэQ<"u0tHcHD8"cH~Fu0< wlHt$HHD$8+HHP Hv%H @H H8uGHHBH=v%H H~xH8u_H-HEH=v%H EH{ EHH-(HٺH=H\$Hl$ H(AWAVAUATUSHI^I9}4IMP9|̉A<$.LD LHD$Ht HHD$=tAIALHtuHLDHH˃;u LHHHHr%H LHH|$tI}HL$I}H[]A\A]A^A_AVAUATUSIIӅtAFuLH==uGHHBH=v%H HtMtIN۸HEI~L=t AL~uI~L^uSLHHHAHOv#LH=L u\I}AUt4=t+IE_u.Ht1HH@uI~LAF<~dInxL$HD8fu=xfu7x_u1HxLu!IFPHI+V(I~1HL9uLH=[]A\A]A^ËATUSHPIuHOIL$I|$$H=v[UHcH<$HǾÃJ~ I|$H$HH9-wI|$HHP[]A\USHHHHH}HٺH}HٺH}HٺH߸HHHH HOvHھH=H޿H[]AWAVAUATUSHIGPwHO. uHOAuIO1IG HHIG HUHD$H$A;-u{uHHD$IHHD$Hu28HHھH=}Ld$|$#P|$iE|$f: H4$8t?|$#u8D$ L R$    "!0 : R \  et y"!  %    "!%   *  #- 7!kq 1"  &  '7  U  ^m r"|!( 5  E   H !% / 9  BQ V"`!j  `" P X c   _ j 6 x=G Q!Y  ^({;  A  u ', |6 I N U_ i!ov " " @          ()< F Z n x   # *   *     "  A $ O V [  e !m @ r ( @ "  " p "   E +Q Y ,h -o .z    !    F /Y ^ {  0 *     ! *" 1? /R 2 + "    ; " ? " @ "& E+ "1 K TP "h `m " ? " p "   o   ?"z (0@HP`hpK] 4Tl]KHp} tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/minilua0000775000000000000000000035146412213333061022740 0ustar rootrootELF>@@(@8@@@@@@@@@@ aap aa@@DDPtdpApAApAAl l Qtd/lib64/ld-linux-x86-64.so.2GNU GNUQV4W#=%p- -.)fUa9}5 hnQjYu' x6 &d.aJ <aaJalibm.so.6_ITM_deregisterTMCloneTable__gmon_start___Jv_RegisterClasses_ITM_registerTMCloneTablefloorpowlibc.so.6fflushexitsprintffopenstrncpyreallocstdinmemchrstrpbrkstrtodfeoffgetsungetc__errno_locationmemcmpclearerrlongjmp_setjmpstdout__isoc99_fscanfmemcpyfclosestrtoulstrcatremove__ctype_b_locstderrfreopenstrncatfwritefreadstrchrfprintf__ctype_toupper_loc__ctype_tolower_loc_IO_getcstrerror__libc_start_mainferrorstrcollfreeGLIBC_2.2.5GLIBC_2.14GLIBC_2.7GLIBC_2.3 ui nii ui ii aa-a.a/aaaaȅaЅa؅aa a a a a aaa a(a0a8a@aHaPaXa`ahapaxaaaaa a!a#a$a%a&Ȇa'Іa(؆a*a+a,HH]w!HtkH5Rw!%Tw!@%Rw!h%Jw!h%Bw!h%:w!h%2w!h%*w!h%"w!h%w!hp%w!h`% w!h P%w!h @%v!h 0%v!h %v!h %v!h%v!h%v!h%v!h%v!h%v!h%v!h%v!h%v!h%v!hp%v!h`%v!hP%v!h@%zv!h0%rv!h %jv!h%bv!h%Zv!h%Rv!h %Jv!h!%Bv!h"%:v!h#%2v!h$%*v!h%%"v!h&%v!h'p%v!h(`1I^HHPTI!AHp AHA7aUH-aHHw]øHt]aaUH-aHHHH?HHHu]úHt]a=u!uUH~]~u!@H=q!tHtUaH]{vvwwà Ét øvw-AËW;VuWt.tG9t'u/f.zt*Ë9HH9HH9HG HWHPHGHW HP HO(HAHG(HQA LALGHIHO0tbH;ws!HHLFLBDFDBu;DA /H9wwDHAHuEIILHWf.-zuHG fD$HD$HH O HHHHHHHG HËFtl <tu O HH#B HHHG HO H#HHHG HËO HHHHHHHG HËO HHHHHHHG Høu,*f.ztSHH?wbHD[ÍF;G8sHcHHHGH*$_xu$f.@ztH@ HuP,AHO H#F HHHG HЃxuH9ptH@ HuP,AH\$Hl$HHHxuC H$Hl$HËFtu HHHHHHHO HHP,AHtHG H(H5USHVtt P,At]-H6N,*f.zu D.HjHH{HtHH[ HuP,A[]AUATUSIG8Åt@HwPH|t, QHH2zED)ƒw|kI|$ ,Au2lD-=w LxuC uvË u  HHcVH@%FÃu%HHcVH@H Ëv}΁?҃@ HHcW0H@(tGG7WHG0@pJt'H0H8PJ)HcPHHW0JuHG0PJ9}.HHI0PJx0PH| PJ9FVGJF F HG(HHw(ÍwHHuH\$Hl$Ld$Ll$Lt$H(HHAF IIHG H(HJHHtgL9tbMtJAD$ DrEIF DH(DLHHt*HHD HH$Hl$Ld$Ll$Lt$ H(Å~HcHHHGH;GP,AHCÁ| HcHHGÁt!tHGxu5HG HHG(H@HH@HLJHHG(H@H)J P,A9)HHHHDHG(H;GPuHGxH@HH@HGH+GHÅx7HGHcHHWHH9s@HHGHWHH9wHWHcHHHGSHLHHKI9s'LHH)H:J|DBFDHHKH9rHHK[SHHSH9sHJH JJHH9rHSH HRP[SHFHSHH @BHC[*H=P,At@øÃt HcH`,Aø3AH\$Hl$Ld$HHAHDHHP,AtH=P,AtHHN H$Hl$Ld$HHtu 8҉]Pt u HH(HøHG@HGHG@HGHGH*@HGHG҉@HGSHHsHH8HSHHJ@B[H\$Hl$HHH8HSHH @BHCH$Hl$HSHiPtu HH@HH@HC HcHHtHSHBHC[SH HKytHQHtuL%HHQHtMB tGH0F t>H4HHQHt(B t"H0F tH\HC HcHHk[SHzPtt'uZHHKHIHJUHHKHIHJDHHKHIHJxǂ)H0F tHHkHSHRB uɸ[H~HFHFHFHtHHFHøøtSHjH[HHD7HHHHIUSHHHHt$EHD$H9HLDHHL9u L9L9tHHI)HI)븸H[]A\A]A^A_H\$Hl$Ld$HIHHՋF;BtMGuf.2uH2H;) X+uHHLMH$Hl$Ld$HAWAVAUATUSHXIHG`fG`f=v'f=u3Auf=v HLW:D$4MMo0IG(H@HHD$IGHD$HT$HB H@HD$ L,$L,$A]IEH$l$HcIILd$M؃?%w$p!AHcHHD$HI$@AD$L,$HcHHD$ HI$@AD$L,$uA$AD$ILD,$JHcHHD$@HI9vL,$"HcHT$HD(H@HI$@AD$L,$HT$HBHD$@D$HH$IG0HcHHT$ LHt$@LaIIWHT$L,$H$IG0tHHHT$ %HHHT$HcHHt$LLIIWHT$L,$GHT$HBHD$@D$HH$IG0HcHHT$ LHt$@L_IWHT$L,$HcHD$Ht(HFI$HAT$PL,$A|$I$B F L#L,$H$IW0tHHHL$ %HHHL$tHHT$ HcHHT$LL^IGHD$L,$)Bʼn6L:I$AD$H$IW0IG HPpH9PxrLaIGHD$L,$HcHHt$HID$FAD$H$IW0tHHT$ HځHHT$LLGIGHD$L,$VtHHHT$ HHHHT$tHHL$ HفHHL$zu&yu XA$AD$L,$H$IG0ALLE(IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zu&yu \A$AD$L,$1H$IG0ALL'IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zu&yu YA$AD$L,$H$IG0ALL&IWHT$L,$^tHHHT$ HHHHT$tHHL$ HفHHL$zu&yu ^A$AD$L,$H$IG0ALLM&IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zuKyuED$ L$(^YD$(L$\A $AD$L,$H$IG0A LL%IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zu+yu% A$AD$L,$gH$IG0A LL$IWHT$L,$<HcHHT$zu$fWA$AD$L,$H$IG0A HLLl$IWHT$L,$HcHHL$Qtu 9A$AD$L,$HcHH\$Ct)udH;*A$AD$L,$THH@HxH*HHH H*XA$AD$L,$H$IG0A LP,AHL u3AHL#IWHT$L,$ځH$IG0)L$IG HPpH9PxrL[IGHD$HcHHD$Ld$MHI$@AD$L,$[HcH$LDtIILd$ HIILd$tHH\$ HH\$H$IG0AD$;C$Š"AA$f.zA9$HI9$I$HH9HRHpL54I$HH9tiHRHpLHI9$FHt|$ uA}~IuF tHEuA}~IuF tHAAuD |$ tc HcS8HHK (HH<IHCHG8HsF t{ tR{ AIcHHA|~IcHHItF tHMAAD$ A9|CHs F tH*{ t+AIcIt(F tHAAD$ A9|ۀ{ tC @(HpC H(_IHHG8HG@HH_@c ~HsxF tHsHCPHK(H9wIHPI9LBH(H9vILc@L9v$A|$~I4$F tHHIM;frM9wAD$IM9vHK(HSPHk@C\= NVH)Hi 9~~HCXI)IB9}Z~HHcSXHHcC\HH¸,IHChHG8HC@Ht` {L~4AIcHID$x~H0F tHWAE;l$L|҃{H~$HcIT$8HHtb A;D$H|{X~0AIcID$ H4HtF tHAE;l$X|֋S\~)HcHIT$0HHtb AT$\9|HcHcCLHHcKHHcCXHHcsPHcCTHDHHHHAD$ H[]A\A]A^A_USHHH8tHHH{8uHH[]HGX9| 4aXHUSHHHH+o@HGH2H0RPHGHHPQPHGIHP APP(HG8H+GH0 HsHF0HCHHs@HHCHPHSHPH@FH[]H\$Hl$Ld$Ll$Lt$H(HHIIEDxuDLHwxtMHHLHH$Hl$Ld$Ll$Lt$ H(H\$Hl$Ld$Ll$Lt$H(HIIẢHAxt\DLHHH舾At9HsMLHHcHSBAtAu :AEDH$Hl$Ld$Ll$Lt$ H(USHHHoHHHHQHHEEHC8H+CH HHCH[]H\$Hl$H@jHHWHH+OHHcHH@D~;HG8H)H‰HH9=HU(HcHH]H9Zs HZH\$Hl$HHHcFH `,ALG(IM@L9sH9u H9t HL9ra4AHH\$Hl$Ld$Ll$Lt$L|$HxIHIIEHt$0H:HHHt$ L!H$L$AA!EB$#A$XD$EE$\D$EE$YD$EE$^D$EE$^D$YD$ $\MEyL$$xEE[ $fWEEAFLC㺐4ALH|$LdIFL`MtAI^]A~2IvH|$IELhHL)I9r4AH|$MHD9t!I݃{tHH|$uHT$HZ HShL9s>Iv ID$HwA HsXLH|$ H|$HCXLchH[XH\$~:AHcHLH)H2LnH|$LHLǶMuAHcHI)LHt$H|$IAF)AD$AH([]A\A]A^A_AWAVAUATUSH8HII־;AA%LeHH(L{HL)LHXIAGHC8H+CH HJHSHBHCE>uHGILhHHGH$ Btt=HHHGPHH$H@L(Mt%ALAHU8HT$u{OAHE;AHE;AHEb5AE(E0E4HE g5AH}8<g5A蟴E,fL虝AH'L<)$P#AA} t HE t5AE0E4HEy5A8IE H@@HHE IE @`E0IU RdU4Y5A^5AHEHEHu <H|$?H<$t H4$L诧E("AE E,HE;AHEAH)ID$@AID$L(@ID$8I+D$H LID$LLVHMtA} tID$@bLHIE Lp(xT~0HcAHL@IE ;XT|ID$H(@ID$8I+D$H LID$,fL蟛HLL艛H8DH[]A\A]A^A_AWAVAUATUSHIHIHL$Ad}uXH]LH/Iƃxu,H{Ht#G uIE H(qHHu=IHT$HAFBfHL腡HÃxu6AHL{uMHHHt$LHAN{5ALzH[]A\A]A^A_H\$Hl$Ld$H(HHIHHHHQHHIH$D$HKHLHHCH\$Hl$Ld$ H(SH蜩Pt!t3uGHSHH@HB;HSHH@HB$HHCHJxHP HC@HC5AHHxuHx tHP H[HHcFH`,AHcRH `,AQ8PuH¾=AH¾5AHUSHHuiHGPH9G(u5AnHPB t=F t7H-HCx~#HPB tHC(H@H0F tHHkTHSHJHRP|پHHC(H@H0HCH@HFHCx`H[]H\$Hl$Ld$Ll$Lt$L|$H8IIII̋DD9|DD9|LθN؍KHcHIH9wHcIIcUILLMLA]H\$Hl$Ld$Ll$ Lt$(L|$0H8AVAUATUSIILw HHwLI,$]Lxu ,A*D$@@AD$@;EL~%HULHuA5AALHE;]L}HcHHE@9]LIcD$@HHEIUHAUPA}~IUB tE t HLޠAD$@PAT$@[]A\A]A^H$D$HHHHH4$D$HHHSHH0H¾H[H\$Hl$Ld$Ll$Lt$L|$H8ILg0El$JAAE=~5ALII,$]\AD$H9}EHU\Hu0H8A5AA`HE0;]\}HcHHE0H;]\|ID$HHHE0L0AF tE tI8LH莟AD$HPfAT$HMcfClH\$Hl$Ld$Ll$ Lt$(L|$0H8H\$Hl$Ld$Ll$H(HAAH/W0w8AйnC8C0;EP~&HUPHuH{ A5AAgHEHcS0HED,C0;ET~&HUTHu(H{ A5AA*HE(HcS0HE(D$C0PS0H\$Hl$Ld$Ll$ H(HHWR HH\$Hl$H(Ho8G8D$ Ht$ HD$ H\$Hl$ H(HHWR  AD HH\$Hl$HHH$Š$A |NAC YNC tHS<HHH\$Hl$HH\$Hl$Ld$Ll$H(HAAĜEDHH\$Hl$Ld$Ll$ H(H\$Hl$Ld$Ll$Lt$L|$H8HHA1; uSHsHssDkD9H菜uDH耜AEtQA; t HAŹDHAǹDHADH+HśAŋsEDH]sEDDHICCDc H\$Hl$Ld$Ll$ Lt$(L|$0H8H\$Hl$HHHHH聜HS<HHH\$Hl$HH\$Hl$Ld$HHo0)ӋPw*H؉HH~;sH.t HHQ~De u;HHcVH@Ѓ?u#o0EAE.HHBHH諙KEHcH$Hl$Ld$HUSHHHw s5u. DuHH詙SHHHsHsH+CH[]H\$Hl$Ld$Ll$Lt$L|$HHHt$ AHMHALHyALH讘HH裘Eu|$ t DEAAEDDt$ HFEE H\$Hl$ Ld$(Ll$0Lt$8L|$@HHH\$Hl$HHHo(HEHG(u H} tU A#HCJC{ttS A#HHjHsHy 6AH[]H\$Hl$Ld$HHrQ)DbDAE"K$A"7HCPDHkAH]KHF~^HD؀;uI|$H>AHC;%uHS{HHDHÀ;]uHHH$Hl$Ld$HH\$Hl$HHH追uHC6AHRH\$Hl$HH\$Hl$Ld$HHAߊH'H(Hu!AMcJ1AW6AH߸HH$Hl$Ld$HH\$Hl$HHHoHH)tHHH+CH\$Hl$HSHtH,HC[AUATUSHHHt5HIL L9+rHHA$HHIHuH[]A\A]SHAsH{1C[H\$Hl$Ld$HH9w0uHHH)HHr6AmHcHHLdIuH6A'Iu!HcHHH4/H+7HHHcHHH{LH4+xH$Hl$Ld$HAVAUATUSIII֋ouHu1NH6A3HLLL9|/H6AQH6A5[]A\A]A^SHڇ6AH[HIHu谇 HHHHQLHATUSHHHG HPpH9PxrH_IHvH2HM(H螧HHC @ B BHj HBLbHC HHHHC HHHCH@HCHB([]A\H\$Hl$HH9HH6AHHćHH\$Hl$HH\$Hl$Ld$Ll$H(HIIL(~H:HHH݇LHH\$Hl$Ld$Ll$ H(H\$Hl$Ld$H(HLg8L}HHE0HhHH~yH=P,AuH$D$HHLxu$@ID$ HPpH9PxrLHH\$Hl$Ld$ H(ATUSHHAԋ7HS@HHHH HtHS@HJHHJ H{@O~ t uHd3    ]H6A6AHEHqHD9u3HHS@HHHH HtHS@HJHHJ H{@}H HHH=HCHH@,Ht@HbHK@HHPHHtHS@HJHHJ H{@)}HS@HHHH HtHS@HJHHJ H{@|HCHAC$HcHHH)HMcH0LHHE[]A\AUATUSHILg8Ho0H]'HM0ȃxHcHHcSPHHsL舣LHCE0CPM0ȃxHcHHcSTHHs(LOLáHC(E0CTM@ȃxHcHHcSLHHsLL芡HCE@CLMDȃxHcHHcSXHHs LݢLQHC EDCXMHxHHHcS\HHs0L衢LHC0EHC\KpHHcSHHHs8LpHC8CpCHHEIE0Ht"AE-wIuHVHLIl$ H[]A\A]AWAVAUATUSHHIAHG HPpH9PxrHIA]8HcɺHϡIĺHHyAD$ M|$El$ Mt$ IcHH)EEt.HcHHHMHHLHHBABuHEL @HEH[]A\A]A^A_H\$Hl$HHH@HH\$Hl$HH\$Hl$Ld$HHHIԺHLHHHLH$Hl$Ld$HH\$Hl$Ld$Ll$H(HAAHG HPpH9PxrHkDDHiHEEHCH\$Hl$Ld$Ll$ H(H\$Hl$HHHnHH5AHH\$Hl$HAWAVAUATUSHHIAW~I.LlHHuLLHIl IM)LLHHqH~umH}}.AE־HLLHH}H{HSHJH HHHk !H}tH|!H|Le}.ALH[]A\A]A^A_AUATUSHHIHHH:tHAAHH8uA6AHhLHH|tWH{DLH&HtL7AHVHr|LHeH{H|H;t/AHsHxHDH HH;u׾H:{H[]A\A]SH0A9AH;AHH{H}HzH{#7AHHz[H0A+7A$HSH6AdHM{u>HPzHHz6AHHz#7AH1AH}@HHV1A.7AH[{@H:AH5+ H17AH5 H87AH5 HH]y?7AHA@HCH|H$y[H@2A8AHSHyE7AH2AE7AHgH7AHP7AHy@@Y7AH@R@Z7AHHH)yHX{`7AHc7AH@H3j7AH[H\$Hl$Ld$HHAHvxtDHHNuHtIHE?HC HPpH9PxrHDHvHt HHRHUHHH$Hl$Ld$HHQH¾h>AH= 8gHUSHHHoHT$HH;HT$HH)H H9rH-gHD$HHv%Ht HPwCH H[]H\$Hl$Ld$HHIվxHwu.HTwHawH¾>AH߸LH$Hl$Ld$HSHHG HxPtHcHC HxPu[H\$Hl$HHHcHHHw~uHSHC(H;PrHPH\$Hl$HHVH6]~HH\$Hl$Ld$HHAվovtUH>vAt$H1vuH&vH@HvžH,uEDH:tIĉH-tIP,AtH=P,AtHLH}H$Hl$Ld$HAWAVAUATUSHAT$9HADHvT$HvDHtT$DH HWtDl$E)ACD$DھHvDHzvDH^tDHMDHsT$H;vDHtT$Hn HsAھHuHLtD$D$ ¾HuT$ H\$ Dt$)D;|$~>AHDH)sD|$D|$ADHouDHSu%D9}>AHDHrAھHuDHuD9}PHrT$ HtDHtDt$ HDD)D$D)9|DHDT$Drt$D$T$T$D$T$H=D;t$XH[]A\A]A^A_H\$Hl$Ld$HHIHcluLs7AHUyH\;AH7AHt$8u!uLHT$7AH߸ -H|$u HD$7AMHL$꾰7AH߸H$H$L$HĘH\$Hl$Ld$HHIqHqHL7AH߸H‰HH$Hl$Ld$HH\$Hl$Ld$H(HCvXWfD$Ld$f.<zuHHvu 4AHEDH\$Hl$Ld$ H(USHH}þHqt1H\7Ayؿ7ANЉуy-7AHcIAFD4uHcHHH[]SH  *HRq[H\$Hl$HHžH~*HqH\$Hl$HH\$Hl$HH?žH0*HpH\$Hl$HH\$Hl$HHžH*HupH\$Hl$HH\$Hl$HHžH*H'pH\$Hl$HH\$Hl$HHUžHF*HoH\$Hl$HATUSILmÃ~L1Ńu*Lo[]A\ATUSILcmÃ~L Ńu*L7o[]A\ATUSIyLmÃ~L^!Ńu*Ln[]A\SH0*Hn[SH *Hn[H\$Hl$HHmH‰HqH\$Hl$HH\$Hl$Ld$HHAZHHuDHHH$Hl$Ld$HSHHHkHm9@H[H\$Hl$Ld$Ll$H(HAHIl/Mt;HtH߸HHHIMLDHHHH\$Hl$Ld$Ll$ H(H\$Hl$Ld$HHA4qHHuDHpuDHXHH$Hl$Ld$HH\$Hl$Ld$HHAHk~DHuHHH$Hl$Ld$HH\$Hl$Ld$Ll$Lt$L|$HHHHT$IH\$HiHHnIH\$H¾HFHHnMLNHT$H9HGAI9cD)DrEIcLH9|8AH8ADHE~%K'Od'AMsHkHL9uDH\$Hl$ Ld$(Ll$0Lt$8L|$@HHH|uZUSHH]HžH>iHKjt(~"HeHiHHH[]H\$Hl$Ld$Ll$H8HHT$SIH\$HkHH4mHLl$HHLH mHH۸HNHT$H9HNH9H)HItH(;AHH\$Hl$ Ld$(Ll$0H8ATUSH HH$ HžHAHHlA\$E~H$ HHuH;H []A\H\$Hl$H(H6mD$f.<zuHHmuHD$H\$Hl$ H(H\$Hl$Ld$HHAhD9t DHfH$Hl$Ld$HUSHHHҌź;A(HHg~H_HfHH[]AUATUSHILJAHcоLQD9_~[¾LhA9~(]ھLuhL2A9LgDLH[]A\A]AUATUSHHiH蘋D`HetcuJH4AD9DMA9~EA\$ھHgDH}AA9|?AHEDHLH[]A\A]AWAVAUATUSH8 HHL$;AIźHHIAƾHeH莊AH;AHt$HhE9~3DHt$HHT$LH|$A9G44E)E9uDHt$HH|$H8 []A\A]A^A_H\$Hl$Ld$Ll$Lt$H(HHAƾHdH蜉AHIAAE9|hEE)AE~DHiu8AH߸A3DHeAnE9~HeEA9DH$Hl$Ld$Ll$Lt$ H(AVAUATUSHHbHaLcMt$H(A|$LW~ ;E8pLHVII}LEUuA} u$A~~II9EuL+m IAiE8'Mm Mu58AH߸蚁M89}UHuHcH|t<HcH|t,*AD$AD$HUHI$BAD$9|)M HH9}oHu HcHHHHzt?HcHHHHzt&HBID$BAD$H} HI$GAD$ 9| HCHkHc[]A\A]A^SHHaHaHb[USHHźHHcHbHcHaЃH[]SH7H=aH0aHZb[H\$Hl$Ld$Ll$H(HAIaHHtDDHbt5LHHatH_LDHHH\$Hl$Ld$Ll$ H(H\$Hl$HH6A?HH8uK8AHHH\$Hl$HSHH>[SH`uHaHdH|[SH6AH8tHY[AWAVAUATUSHx"H|$^D$H$h"H|$2HIL$h"H$PH|$bL9AHD$1HD$H$h";%t9H9$Pr H$PhH$PHH$PH{%u:H9$Pr H$P)H$PSHH$PHCAD9t$}3ADH|$LksL@uH3@t@h8AMHuHL)Hv(?AH|$!NHDPtSDPuHH;.u*SPfHKHfHDDPt"HDPtH?AH|$D$0%IM)IWLH|$KBD<2HB<3$%ADH|$,Ht$0H|$PMH|$0bDH|$H,Ht$0H|$PqMH|$0bDH|$f.~sH,\ ~H,HH1Ht$0H|$PM=DH|$bHt$0H|$PLHT$(DH|$aIH9$Pr H$PH$P"HH$PHD$(HPHT$(H AE< < <  <"t<\H9$Pr H$PfH$P\HH$PH9r H$P=H$PAUHH$Pdn8AH$P$Kq8AH$P 2H9$Pr H$PH$PAUHH$PIHD$(HPHT$(HH9$Pr H$PH$P"HH$PHT$(DH|$Iž.H|$0IHu$H|$(cvDH|$ZH$P^LHt$0H|$PJҾx?AH|$zGH|$PHHHQHt$PH$PI96H$PHx"[]A\A]A^A_AVAUATUSH IXYAHL]E~UL$ LH9tv8AL/L94$rH.H$@*HH$A9}H|H []A\A]A^H\$Hl$HHYu8AHH\$Hl$HUSHHH>ZHź6AHfHt'H[tHtYu HZ-H}u \8AHc8AHH[]SHHXHXHH[SHpHHWHY[SHHYu.8AH~H¾.4AH߸H'W[fAUATUSHH #IĉŃ u<HH\H\HXHCIAA"v8AHHt$L]GHL;l$tTGH HHT$HT$ Dp uu+HxH*HHH H*XH XHXH[]A\A]USHHVźHtt8AHHrXtY8AHHWHVuHUHU?AH߸H_UHZXH[]USHHH VuHUxHŅy8AHHHsOu8AHH7AH訥HUu?AH5HQUHQZtMHZf.vz6u4HCH@HCHTHWKH5Sxu"Hx t@AH߸H}WtָHĈ[]H\$Hl$Ld$HHSHH-U HoTHH'THkUH\RIHkHUH0H艞HUHUPHSz~HB@ tI4$F tHMHk ]HUt-H UH[TžHRu9AHH=UHUH$Hl$Ld$HHH|$Ht$HT$DŽ$HHD$ HD$ HHHBuHt$H|$HT$HD$ HT$H$HH\$Hl$Ld$Ll$Lt$L|$HHHIDw`HG(H$HGPHD$DoeLL0ŅtML{@LHXxLHkvfDs`H$H+D$HCPHC(HHSH@HC0DkeHrLH\$Hl$ Ld$(Ll$0Lt$8L|$@HHUSHhHHɸ7AHDH|$PHt$@HT$HHD$0HD$8HD$0H$HL$ HD$HD$HOH+O@LHAŹHT$Ht$HrHh[]USH(HHT$HŹH¾HH,$HT$HT$HH#@HHTH([]H\$Hl$Ld$H(HAAtOIL+C@McILHHKH $l$H+K@Hũ@HuHKHS(H;JrHJH\$Hl$Ld$ H(SHH|OpHJ@@HQHOH@O[HHHu >H?HAUATUSH( HH$ IHH&SH$ tHL$ L9,$rHH,$=AHUHH,$HH9$ wH"H( []A\A]USH󍖀w?HcHa$`'A?HcH,hfy?HcH,h_?HcH,hfC?HcH,hf'?HcH,hz?HcH,hf a>HcH,hfH>HcH,h1>HcH,hf@@ 9@@>HcHDXu @@H[]AUATUSHAHA~^u]HATN%uH^vDat4B~-uHFH9vA9|VA9~"H D9uHHH^H9rADH[]A\A]H.t.[t%uvH= 9HAWAVAUATUSHIHIIHWII)HH9r.HHDL9u Hx58LLauIHtLLHuHyH[]A\A]A^A_H\$Hl$Ld$Ll$Lt$L|$H8IHHՀ})E$0(A})uHUHLyHHUHL]HLmAl$x0HcHHI|u1HcHHI|tuI|$9AHcHHLHH+HPLHLHH$HcHHID DmAbtAf}t}uI|$49A DD:E}It$'S@8uuHu&A8HHCH9rлyHsLm}[tI|$8@A荿LLYHI9$t{Lu@LL;LL{@:AHDPAŃ1xA;D$}HcHHI|uI|$r6AHcHHMlIT$H)I9kHHHLHI<8QL`HZ}uID$H9ػHD;HLBIźI;\$s;HHAE<+t^<+ <*7<-tn@0uHT$(HH|$@?$@1LHH$` 蓺H|$@HH;\$85HBLHH$` "H;LHH$` ,H@HSHHHHeHBu HFALH)HH =H@Bu,HBHBH¾@AH߸虶H|$@I9w5H9$h vML9|$@r H|$@HD$@UHHD$@HL|$ uT$ 9T$$RD$ H$h H)HH|$@譸H|$@Hct$ H|$bBHĘ"[]A\A]A^A_AVAUATUSH0IHT$&IƺLILl$ Lt$LHD$HD$LEIH;\$wkD$(LHH|$HHt9HL)H9HLALHHH|$HH9\$sH0[]A\A]A^AUATUSH( HH$ IHH`CH$ tHL$ L9,$rH$H,$@0AHUHH,$HH9$ wH\H( []A\A]H\$Hl$Ld$Ll$H(HHH-At-D EuH@8H>@D/HH\9AH߸YIcH9@H\$Hl$Ld$Ll$ H(H\$Hl$Ld$Ll$H(HAI,(EtH?ZH?Mt!.HL\9AH߸ð.H¾.4AH߸襰HcH?H\$Hl$Ld$Ll$ H(SH6AHH [H\$Hl$Ld$HHI,8>.HL\9AH߸HH‰HH$Hl$Ld$HH\$Hl$Ld$Ll$H(HI+8-IźHHHMLR9AH߸胯H<H\$Hl$Ld$Ll$ H(AWAVAUATUSH(IHt$A<DxIAA,L<u/EtbLA[4AH|$+AE8HT$L?Et$HL$HT$H,H;D$AEHL9yADLRH([]A\A]A^A_SH譲HH[SHHH[AVAUATUSH IHH3?IAHHH H*Hu HUL`H6HLDHHt HA| tH $H$H H []A\A]A^H\$Hl$Ld$HH Hu8L(AL(H.AAEHLHADHIHt8*t9ADHAE9YHhocHS@HHHH HtHS@HJHHJ H{@ ,-HS@HHHH HtHS@HJHHJ H{@+[t  u>HߐErHSHHBxɉ¾HHCHH@HS@HHHH HtHS@HJHHJ H{@>+ \ SuHHqxLHq9AHcmHS@HHHH HtHS@HJHHJ H{@*=HS@HHHH HtHS@HJHHJ H{@s*HS@HHHH HtHS@HJHHJ H{@6*=KHS@HHHH HtHS@HJHHJ H{@)HS@HHHH HtHS@HJHHJ H{@)=HS@HHHH HtHS@HJHHJ H{@)HS@HHHH HtHS@HJHHJ H{@D)=YHS@HHHH HtHS@HJHHJ H{@)HnHS@HHHH HtHS@HJHHJ H{@( t5 P t\=$9AHk9AHjHS@HHHH HtHC@HPD*HHP H{@<(AD+AbAb0A A AA teAauyVArt6ArAftAnu\Att&AvuN( 0 &    HmHjfIIcHD$ ADPuCDH\mHS@HHHH HtHS@HJHHJ H{@#'CDtPHS@HHHH HtHS@HJHHJ H{@&l$ t HIDBuA~9AH3iDHlHlHS@HHHH HtHS@HJHHJ H{@[&;HWlHS@HHHH HtHS@HJHHJ H{@&39XHlHS@HHHH HtHS@HJHHJ H{@%HCHHPHH0HH苦I$.HkHS@HHHH HtHS@HJHHJ H{@n%+LLLLAMAL~AEAE AEAuAuAELcAuLWLLȃHL$ LL蛇s= = $== {-== =a=t ="LCAEHSLHb{LXLAL*H{0HPru @AH_PrA%c}¾L7LH2HKLHLHHC^^L--*+%p<>f/H=ti===t@=nk=tL=|U=S A^AVANAFA>A6A .A &A A A AADp3AA9IEHD$HT$4HT$HD$0HD$HPHk0AD$)ALHHt$ HLs0LH{AEt) tu AULH%Ht$H_AuH9_AEHt$ HLs0LHKHt$ HLs0LouLHy LHlDq3AHt$ HLs0AaEB$`*AHt$ LzAUHt$L:^HD$ IEHD$(IEHD$0IEHt$ LmzAUHt$L]HD$ IEHD$(IEHD$0IEHt$ L|$ uZIHcT$(H@?uCLLIHcT$(H@HAU ʉAE D$(AElHt$ L}HL$ LL蔂EHL$ L Lz+HL$ L L`HL$ LLFHL$ LL,HL$ LLHL$ LLLD$ LL豀LD$ LL蒀nLD$ LLvRLD$ LLZ6LD$ LL>LD$ LL"t Ap3AD9H7A/A*0&AAHC8fh`DHH[]A\A]A^A_HHSH HH<$u$H{0H~D$H [H\$Hl$HHHHHH{0H|]H*H\$Hl$HH\$Hl$Ld$Ll$Lt$HhHIH_0Dk<u'~ ~:AH]Ht$ Ht$ OAD$ =HHt$ H]|AHHHHD|AID$PD HvDkk :AH蟍HHkLH kAEl$HDHHjE,H4uѾ HDkHt$@HHL$@¾HqH<$WQAL$ADt$ H :AH+OHLYuLc0LL AźHt$ LHt$@LHH]HmHŀ|$MuLtH{0DmP1HxH{0#PLtLkH{0D:PLt1HlHt$ HC.uHt$ HQC.t:uHt$ H2Ht$@H9H{0HT$@Ht$ vH{0 H HSHk0HHHhU<H|$ HOH KHt$@HHT$@Ht$ HuU0HMEJHEHHA0PDeHiHH;h,HDuӾ=HutHt$@H` D$@HL$@DHnDH |Hk0HDcDU A;Ht$@HAċD$@ wFHt$@HN|$@ u!AuHEHcT$HH@HuJABAuHt$@Hn+Ht$@HmuJA ADHpHH7urHk0LH|$H u HEHcT$PH@H?@VHD$@Ht$@H9DcD HC8fh`4;HHC0PJP<۾;HHC0PJPm HD$DH;AH߸xo8AHMHD$HuD ;AHAH|$#u)$H|$ uH|$HHT$;AHHD$HuD;AH1A&H|$Ctu$Ht$6H贌HHAH肳AH|$AFHt$HqHHAH?AH|$AHt H|$Et DH0Dr;AH[ASDH[FHt$nHHHAH躲AH|$ADH []A\A]A^SHȗHHH[H\$Hl$Ld$HHIԃ>tH;A)@e)@)@)@)@3*@*@*@>+@+@,@,@,-@-@|.@$/@/@0@1@F1@ 2@2@2@54@4@5@:6@6@ 7@8@8@8@9@i:@t;@;@K=@3@23@C3@3@3@~3@3@U3@J@I@;I@&J@I@H@pI@U@V@#V@?V@[V@V@V@3r@-r@-r@-r@-r@-r@-r@q@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@-r@3r@-r@-r@-r@-r@-r@q@-r@r@-r@-r@-r@-r@-r@-r@r@{@{@{@{@/|@/|@/|@*|@*|@}@|@}@}@5}@J}@}@}@}@}@}@k}@}@݄@@@@@@@@@@S@ߎ@ʐ@@ґ@o@@o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o@o@o@@@@@@@@@@@@-@@@@@@6@)@R@l@)@)@)@)@)@)@)@@)@)@)@@)@)@@)@@)@@@)@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?@@%@/@%@/@/@@@@@9@F@F@qAqAqAqAqAqAIAAAAAAA@@AA A'AAA[ADAAuAAAAAAAA A A A A A AeA A AA A A AAA A A AQ A;A@$;A@);AB@.;A@2;A@7;A\@?;A@>;A@F;Ar@^:A$@J;Aۯ@P;A<@B5AV;A^;A 4A9A8Ag;A^;Ap;Aw;A};A#7A;A;Ac7A;A;A;A;A;A;A;A;A;A;A;A;A;A*;A6A;A;A;A;A;A;Ag;A;A[5A;AB5A%;A/;A or '...' expected=stdin@%srbreopenargError: %s tobitbnotbandborbxorlshiftarshiftrolbswaptohexbooleanuserdatafunctionthreadprotoupval__newindex__gc__eq__add__sub__mul__div__mod__pow__unm__len__lt__le__concat__calldoelseelseifendfalseforlocalrepeatreturnthentrueuntilwhile...==>=<=~=bytecharfindgmatchgsublowerrepupperexitremoveflushinputoutputtypewriteinsertsortassertloadfileloadstringnextpcallrawgetsetfenvsetmetatabletonumber'for' initial value must be a numbermemory allocation error: block too bigfunction or expression too complexchunk has too many syntax levelsmain function has more than %d %sfunction at line %d has more than %d %sattempt to compare two %s valuesmalformed pattern (ends with '%%')malformed pattern (missing ']')PANIC: unprotected error in call to Lua API (%s) invalid value (%s) at index %d in table for 'concat'invalid order function for sortingwrong number of arguments to 'insert'invalid format (repeated flags)invalid format (width or precision too long)invalid option '%%%c' to 'format'cannot change a protected metatableno function environment for tail call at level %d'setfenv' cannot change environment of given objectmissing '[' after '%%f' in patternstring/function/table expectedinvalid replacement value (a %s)'%s' expected (to close '%s' at line %d)cannot use '...' outside a vararg functionambiguous syntax (function call x new statement)8CC?;l lp ` 9 R0 H 4` x * Z ' x @ x m @`.xK$x(@+h6^n(@XpA,\(Hh+= 8P.hIuA T8rPpgG(r@p<(rPxoO@H* 0 X t hHp  p-A(M@h="D0rHh,x   !*!0s!P@$V%%'8o)x),,A.X.x/230 3P >4p 4 j5 36 7!A70!a7H!7h!8!r9!9!9!:": "Z;8"`">"?#s? #?8#o@`#@#@#@#TA#A$B($BH$Dp$E$JF$F$I%$I0%J%_K%qL%)Q&QH&lRh&R&WS&S&T'5U8'qUX'Ux'+V'FV'V'V(W0( Xp(-X(eX(Y(gY(Y)Z8)m\h)*^)_)K_*_0*`P*j`p*a*b+sc +c8+dX+ep+f+f+f+fg+g, h0,UhP,ihh,Ai,l,l,\m-m8-kn`-n-o-Po-o-o.:p .pP.p.q.Aq.bq.q/q0/00>cP>p>>>!>d?P?x??O?@X@ @N@@A\XAxAAABzRx *zRx 34L'df|Q&0AnQ\t,<D@NqdQ$|X{AAwA4BBA A( ABBH?N DBBB B(A0A80A(B BBB\mE,t6BAA nAB1NJTDa x$\TAD MAD\t~%)$GAACAdAb$/AAkA,DS\6(tF>:5W?~!*$]0,\D\ tK,GAES:Axm A^mlk4eiS UT$l$,AjENv$_A]D1AdA'J[!$"AAD0AA,UQD nF IAD.D i\-D ht0D k+,*CAAD :AAD=BBB B(A0A8D@n8A0A(B BBB |S qL< BBB B(A0A8D8A0A(B BBB$ AAD AA$ [[? MDX RS q 9iN, AAD L _cX0J4l BBA A(D0(A ABBL LkBBB B(A0A8DPR8A0A(B BBB gN  vN@g4 .N T JN {4t BBA A(D0(A ABB4 gsBBA A(D0b(A ABB VN GL vBBB B(A0A8D@]8A0A(B BBB<T BBB A(A0(A BBB$ _AAD VAA4 BBA A(D0(A ABBL \BBB B(A0A8DPC8A0A(B BBB$D 8AAD oAAl !D\$ AAD AA$ ]0m$ {]0$ _AAD VAA$EN DLDG$\bL3BBB B(A0A8D`8A0A(B BBBLoBBB B(A0A8Dp8A0A(B BBB$GDEzN k$dBAA Dp D$AAD AAMiNDsBBB B(A0A8D@Z8A0A(B BBB,,=BAA uAB\5N f|"D] .ZN"*N [,xVS ,"BAA AB4*YOLNAd*A|IEIAGLBBB B(A0A8D@8A0A(B BBB$]0,X0LL BBB B(A0A8D@8A0A(B BBB< BBA A(D0(A ABB S xL[ BBB B(A0A8G8A0A(B BBBL `S0LLl GBBB B(A0A8DP.8A0A(B BBBX0pJ=N nLg BBB B(A0A8DP8A0A(B BBBDL"BBB B(A0A8DP8A0A(B BBB{S0g*AUDP$AAD AA$b@<<SBBB A(A0(A BBB|!D \  D [!A_$b@X0!D\,UN0FL(DcdN DS CN t#VX0}$Y6b@$gQN BDS |dcN TKDX$QAAD@AAAUDYAQS $<t|AAD sAA$dbP[mN ^$bP} S $7!{AAD rAA!S ~<<!5BBB A(A0%(A BBB|#DNL#BBB B(A0A8Dp8A0A(B BBBX%S0k$%]0L,&BBB B(A0A8D`8A0A(B BBB,| +AAGAA+N 4+|BBA A(D0k(A ABB@,oX0V$$,]ADVA,L,AAGAA|k-S -<N m.qS ]b.IN z.AY4.RBBA A(D0A(A ABBT.A\t.S <K/BBB A(A0x(A BBB/"A`/8Ds, /BAA AB<10VN G\g0X0u|0S0,P1BAA AB<2BBA A(D0(A ABBD z4BBB B(A0A8D@8A0A(B BBBT5CN tt35\S Ho5oX0V5TN EL5@BBB B(A0A8D@'8A0A(B BBB<$68BBA A(D0'(A ABBd7AK8DXP8dAb9DX9Ax:S  :6Dq$, ;AAD0{AAT n;S kt ;$Ab ;LN } ;DO ;S L <BBB B(A0A8DP8A0A(B BBB?V\!?bS N|!<@pS0\$!@AAD0AA!AIAG!,ANN "ZANN $"ANN D"ANN d"ANN ,"BLBAA DAB,".BLBAA DAB,"JBLBAA DAB#fB#Aa4#iB!A_T#jB6N gt#BLS x#BXAV#BX0p#MC[S G#CIS u$$C(bP<$DD$T$DpAAD gAA|$DX@4$E|BAA G@l AAB$E\N0M$2FES q$%WFAAD {AA4<%FBBA A(D0(A ABB4t%-GBBA A(D0(A ABBL%GBBB B(A0A8G@8A0A(B BBB$%hH ]0<$&JIBBB A(A0(A BBBd&J<Az$&JbAAD YAA&0KAA&QKX0&KMN ~ 'K"A`,'L7AuL'L(AfLl' LeBBB B(A0A8GEI8A0A(B BBBD'5QBBB A(A0G@0A(A BBB(Q;N l$$(QAAD AAL( R7Aul(7RAA(XRYAU<(RBBA A(D@(A ABB$(iSAAD AA,)TtAAGhAAD)WUcS Od)VzGr$)VbP,)WAADAA$)XbAAD@YAA*?XS0w$*XTARD*X%D`<\*XBBA A(G@(A ABB,*IYaAAD XAA4*zZBBA A(D0(A ABB+ZDDD+[BBB B(A0A8D@v8A0A(B BBB$d+I[Nb@+L+o__BBB B(A0A8GC8A0A(B BBB+~aDN+yaDN$ ,ta]0xL4,aBBB B(A0A8GE8A0A(B BBBD,eBBB A(A0G0A(A BBB<,AfBBA A(G@(A ABB -fX0,-)gX0L-g.All-gqS ]-hX0iD-~hBBB B(A0A8D`8A0A(B BBB-i A^.iAYD4.iBBB A(A0G@0A(A BBB|.iS <.4jBBA A(G@x(A ABBL.j+BBB B(A0A8D`8A0A(B BBB,/[l A^L/[lAY$l/Vl]0/mDS/mDS/mX0~/wmS 0 n/Am$0n*AhD0%nYN Jd0^nzN k<0n9BBA A(D0((A ABB$0oP bP- 0x:Ax 1x9N j,1 y6N gL1"y^S Jl1`yZS@F1yAQ1yNN1yX0{D1zABBB A(A0D`,0A(A BBBL,2|MBBB B(A0A8D48A0A(B BBB|2DN23AD0lA2 LN }$27]p2ON @,3HBAA @AB$L31C]P%<t3LBBA A(DPx(A ABB$3Xp39N@jL37xBBB B(A0A8D_8A0A(B BBB,L4_YAAGMAA<|4BBB A(A0(A BBBL4+BBB B(A0A8Gc8A0A(B BBB 5ZDN0u,5~FN w$L5bP`Dt5EBBB A(A0G@-0A(A BBB5/Am5 S p<5oBBA A(D0(A ABB$<6 Jf@Xd6@@n @ !Aaao`@@@  aH @ @` ox @oo @aV@f@v@@@@@@@@@@@&@6@F@V@f@v@@@@@@@@@@@&@6@F@V@f@v@@@@@@@GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment@#@ 1<@<$Do`@`0N @V@^o @ `kox @x pz @ `H @H   @ @@@@$!A!  !A !P pAApAl LAL6aaaaaa`aa 00- ؼ\@@<@`@@@ @x @ @ H @ @ @@ @!A !ApAALAaaaaaaaa a @. @@A @Wafa @a @3 @ @'-A C@f @  @ S@Q! @. t@&9 @0B @QNP,A^ @<j W@@u @Q @{ c@,A( 8@ G@ @ @E "@6 X@1 @ @  @a @x& @T0 @: @H @%P +@)_3A&l T@Gw @d @/ .@ D@ S@S @( @ @ @5 '@? f@! @* @ @ Y@$ t@ / @K: @GE  @:P M @ ^ m @g @t`,AX @ @i !@$ :!@$ ^!@ o!@ !@ !@ !@, !@E  *"@_ "@. #@: #@H #@M #@'V $@_ "$@j $@Ux ,%@. Z%@- %@0 %@+ %@C %'@ '@ u@U cS@ 1(@ >@[ A@ b@ s@) @7 f@@ @J _U@P R@[ U@Lj $W@3v =R@ OF@ jn@G n@` 'G@s A@c R@! G>@ WY@ \@ =@@  Z@@ @@9, oD@= "B@I C@kV E@vd vE@o F@J~ G@V G@v fJ@ 1K@_ K@ L@\ Q@8 T@_ }T@ \@z.A  ]@ `@ ]@ 0 ]@> `^@MF ^@sS _@=_ ]_@5p _@" _@. _@* `@ :a@ a@* b@N `b@* b@ b@I e@ mg@.A 8i@! j@* kk@1 o@= :p@=B wp@ N wt@{[ t@e v@q v@ w@ x@! x@  x@! x@ z@ z@! {@U X{@( {@ >|@  |@  }@C  ~@V*  i~@62  @QC  @Q  @ca  @n  @z  ߁@  @  @  '@  Ă@|  @@  @m  h@  e@  ?@{  @  L@5  @  P@  ό@  @.  N@9  ܓ@|E  X@oU  ǔ@]`  $@k  @t  @<  @q 1A  R@I  @  @R  @  &@  @  {@"  @8  ՙ@  @V!  ך@/  e@>  @O  ݝ@Z  @k  x@Cu  @  @\  @o  @T  ڡ@@  @8  R@ 0A  @ 0A0  @d 1Ap  }@Y 1A  @.  d@ @2AP(  @5 2A@  @bJ  @AV  @`  R@<k  @cy  @  @6  R@  ֨@  U@$  y@L  ũ@  ٩@  @  @  j@b  ̮@p  <@  ۯ@I  $@N  r@N  @N  @N  \@N  @L"  @L&  B@L+  @#0  @!6  Ҳ@6@  @LR  T@XY  9@d  @t  5@[  @I  ٴ@(  @  @p  @  b@|  ޷@\  :@E  @  @  @  u@  x@   1@ ҿ@M" @"* A@73 x@(9 @eD @M @;[ @c @7m @Ay @Y Q@ i@ ;@t @z @ a@ A @b W@ @T  6@% [@ @a' Z@9 @DE 2@P @NV @d @_q n@{ @ *@ !@ @ i@ K@q @ >@ &@  F@ a@ @ p@+ @  @ @  @ @ @& o@/ $@/8 S@*@ @zK P@9X @P ] @:g @9u L@6 @^ @Z :@ M@ k@ @A AO A @@M A Ap3A A A3 AL IAH AC ]A  A9! G Ax' AF7 zAD= AE AYQ AE_ Ad A/r+Ay/A`Aaaaaa !A =Rf a aa a%!A+?Teza  ,a9Ob !Aq p A a @ a A0C Wla   @/Hacrtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entryminilua.cluaO_int2fbluaO_fb2intluaO_log2log_2.4911luaO_rawequalObjunlinkupvalluaD_poscallhashnummainpositionarrayindexcountintluaH_getnumluaO_nilobject_luaH_getstrluaT_gettmluaT_gettmbyobjluaH_getluaH_getndummynode_removeentryreallymarkobjectluaC_separateudataisclearedmarkmtluaC_barrierfluaC_barrierbackluaC_linkcurrentlinelua_getstackluaZ_fillisnumeralluaK_getlabelgetjumpgetjumpcontrolluaP_opmodesneed_valuepatchtestregremovevaluesfreeregfreeexpluaK_setoneretinvertjumpluaK_fixlineinit_expadjustlocalvarsremovevarsenterblockblock_followget_compTMindex2adrgetcurrenvlua_gettoplua_settoplua_removelua_insertlua_pushvaluelua_typelua_typenameluaT_typenameslua_isstringlua_rawequallua_tobooleanlua_touserdatalua_pushnillua_pushnumberlua_pushintegerlua_pushbooleanlua_rawgetlua_rawgetilua_getmetatablelua_setmetatablelua_setfenvluaL_buffinitgetSload_auxposrelatluaO_str2dluaV_tonumberlua_tonumberlua_isnumberlua_tointegeraddintlenluaO_chunkidl_strcmpluaV_lessthanluaG_ordererrorcall_orderTMluaD_callluaG_runerrorluaD_throwluaD_precallluaV_gettableluaV_settableluaH_newluaC_stepArithcall_binTMluaG_typeerrorluaV_concatcallTMresluaF_closeresizeluaH_setnumluaF_newLclosureluaM_realloc_luaD_growstackluaG_errormsgluaO_pushvfstringluaO_pushfstringluaM_toobigluaD_reallocCIrestore_stack_limitluaD_seterrorobjluaS_resizeluaS_newlstrluaV_tostringlua_objlenluaF_freeupvalfreestacksweeplistclose_statesetarrayvectorluaD_reallocstackpropagatemarkpropagateallpushstrlua_checkstackluaX_token2strluaX_tokensluaX_lexerrorsaveluaX_syntaxerrorinclinenumberfixjumppatchlistauxluaK_concatluaK_patchtohereluaK_patchlistluaK_checkstackluaK_reserveregsluaK_setreturnsskip_sepenterlevelerrorlimiterror_expectedcheckgrowCIsetnodevectorf_luaopenluaT_eventname.4994open_funcluaH_setnewkeylua_rawsetiset2lua_getinfolua_getfieldaux_closelua_replaceluaM_growaux_addkluaK_numberKluaK_stringKcodestringnew_localvarluaK_codeluaK_codeABxluaK_jumpluaK_codeABCluaK_dischargevarsluaK_nildischarge2regdischarge2anyregcode_labelexp2regluaK_exp2nextregadjust_assignluaK_exp2anyregluaK_exp2valluaK_exp2RKluaK_indexedluaK_retcondjumpjumponcondluaK_goiftruecodecompleaveblockcodearithluaK_storevarbreakstatluaK_setlistsinglevarauxlua_errorlua_setfieldGCTMlua_pushfstringlua_concatadjuststacklua_pushlstringluaL_whereluaL_errorclassendluaL_checkstackgetiofilefnamesemptybufferluaL_prepbufferluaL_addlstringluaL_pushresultpush_onecapturepush_capturesio_nocloselua_pushstringlua_newuserdatanewfilecreatestdfileluaX_newstringread_long_stringclose_funclua_pushcclosureaux_linesio_readlineauxopenlua_createtablenewfenvluaL_findtableluaL_registerluaopen_stringstrlibluaopen_ossyslibluaopen_ioflibio_fcloseiolibio_pcloseluaopen_tabletab_funcsluaopen_basebase_funcsipairsauxluaB_ipairsluaB_nextluaB_pairsluaB_newproxylua_tolstringpanicluaL_addvalueaddfieldcallallgcTMlua_callf_callsort_compauxsortluaL_argerrorluaL_typerrorbargtohexbswaprorrolarshiftrshiftlshiftbxorborbandbnottobittag_errorluaL_checklstringgmatchgmatch_auxluaL_optlstringluaL_checkintegerluaL_optintegerstr_byteos_exitluaB_errorstr_substr_repluaL_checknumberluaL_checktypesorttremovetinserttconcatluaB_unpackluaL_checkudatatofilef_linesio_closeio_gcstr_formatstr_charluaL_checkanyio_typeluaB_typeluaB_rawgetluaB_assertluaB_tonumberluaB_setmetatableluaB_setfenvluaD_rawrunprotectedluaD_pcalllua_loadf_parserluaB_loadstringlua_pcallluaB_pcalll_allocstr_uppermatch_classmatchbracketclasssinglematchmax_expandmatchstart_capturestr_find_auxstr_matchstr_findstr_gsubstr_loweros_removepushresultfileerrorerrfileg_writeio_writef_writeread_lineread_charsg_readio_readf_readg_iofileio_outputio_inputio_openio_linesio_flushf_flushcheck_nextread_numeralllexluaX_nextstr_checknamechecknamesinglevarfieldchecknexttestnextcheck_matchconstructorlistfieldrecfieldsubexprbodyprimaryexppriorityexprcondyindexexplist1funcargsassignmentexp1chunktest_then_blockblockforbodyluaY_parserluaL_loadfilegetFluaB_loadfilebitliblualibs__FRAME_END____JCR_END____init_array_end_DYNAMIC__init_array_start_GLOBAL_OFFSET_TABLE___libc_csu_fini__ctype_toupper_loc@@GLIBC_2.3free@@GLIBC_2.2.5__errno_location@@GLIBC_2.2.5strncpy@@GLIBC_2.2.5remove@@GLIBC_2.2.5_ITM_deregisterTMCloneTablestdout@@GLIBC_2.2.5data_start__isoc99_fscanf@@GLIBC_2.7ferror@@GLIBC_2.2.5fread@@GLIBC_2.2.5stdin@@GLIBC_2.2.5strtod@@GLIBC_2.2.5_edatafclose@@GLIBC_2.2.5_finistrchr@@GLIBC_2.2.5freopen@@GLIBC_2.2.5pow@@GLIBC_2.2.5strncat@@GLIBC_2.2.5memchr@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5memcmp@@GLIBC_2.2.5fgets@@GLIBC_2.2.5_setjmp@@GLIBC_2.2.5__data_startfprintf@@GLIBC_2.2.5feof@@GLIBC_2.2.5__gmon_start____dso_handleclearerr@@GLIBC_2.2.5memcpy@@GLIBC_2.14_IO_stdin_used__libc_csu_initfflush@@GLIBC_2.2.5_IO_getc@@GLIBC_2.2.5ungetc@@GLIBC_2.2.5_end_startstrcoll@@GLIBC_2.2.5strpbrk@@GLIBC_2.2.5realloc@@GLIBC_2.2.5__bss_startmainlongjmp@@GLIBC_2.2.5fopen@@GLIBC_2.2.5_Jv_RegisterClassesstrtoul@@GLIBC_2.2.5floor@@GLIBC_2.2.5strcat@@GLIBC_2.2.5sprintf@@GLIBC_2.2.5exit@@GLIBC_2.2.5fwrite@@GLIBC_2.2.5__TMC_END___ITM_registerTMCloneTablestrerror@@GLIBC_2.2.5_init__ctype_tolower_loc@@GLIBC_2.3__ctype_b_loc@@GLIBC_2.3stderr@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm_fold.c0000664000000000000000000001451112202141143024147 0ustar rootroot/* ** LuaJIT VM builder: IR folding hash table generator. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "buildvm.h" #include "lj_obj.h" #include "lj_ir.h" /* Context for the folding hash table generator. */ static int lineno; static int funcidx; static uint32_t foldkeys[BUILD_MAX_FOLD]; static uint32_t nkeys; /* Try to fill the hash table with keys using the hash parameters. */ static int tryhash(uint32_t *htab, uint32_t sz, uint32_t r, int dorol) { uint32_t i; if (dorol && ((r & 31) == 0 || (r>>5) == 0)) return 0; /* Avoid zero rotates. */ memset(htab, 0xff, (sz+1)*sizeof(uint32_t)); for (i = 0; i < nkeys; i++) { uint32_t key = foldkeys[i]; uint32_t k = key & 0xffffff; uint32_t h = (dorol ? lj_rol(lj_rol(k, r>>5) - k, r&31) : (((k << (r>>5)) - k) << (r&31))) % sz; if (htab[h] != 0xffffffff) { /* Collision on primary slot. */ if (htab[h+1] != 0xffffffff) { /* Collision on secondary slot. */ /* Try to move the colliding key, if possible. */ if (h < sz-1 && htab[h+2] == 0xffffffff) { uint32_t k2 = htab[h+1] & 0xffffff; uint32_t h2 = (dorol ? lj_rol(lj_rol(k2, r>>5) - k2, r&31) : (((k2 << (r>>5)) - k2) << (r&31))) % sz; if (h2 != h+1) return 0; /* Cannot resolve collision. */ htab[h+2] = htab[h+1]; /* Move colliding key to secondary slot. */ } else { return 0; /* Collision. */ } } htab[h+1] = key; } else { htab[h] = key; } } return 1; /* Success, all keys could be stored. */ } /* Print the generated hash table. */ static void printhash(BuildCtx *ctx, uint32_t *htab, uint32_t sz) { uint32_t i; fprintf(ctx->fp, "static const uint32_t fold_hash[%d] = {\n0x%08x", sz+1, htab[0]); for (i = 1; i < sz+1; i++) fprintf(ctx->fp, ",\n0x%08x", htab[i]); fprintf(ctx->fp, "\n};\n\n"); } /* Exhaustive search for the shortest semi-perfect hash table. */ static void makehash(BuildCtx *ctx) { uint32_t htab[BUILD_MAX_FOLD*2+1]; uint32_t sz, r; /* Search for the smallest hash table with an odd size. */ for (sz = (nkeys|1); sz < BUILD_MAX_FOLD*2; sz += 2) { /* First try all shift hash combinations. */ for (r = 0; r < 32*32; r++) { if (tryhash(htab, sz, r, 0)) { printhash(ctx, htab, sz); fprintf(ctx->fp, "#define fold_hashkey(k)\t(((((k)<<%u)-(k))<<%u)%%%u)\n\n", r>>5, r&31, sz); return; } } /* Then try all rotate hash combinations. */ for (r = 0; r < 32*32; r++) { if (tryhash(htab, sz, r, 1)) { printhash(ctx, htab, sz); fprintf(ctx->fp, "#define fold_hashkey(k)\t(lj_rol(lj_rol((k),%u)-(k),%u)%%%u)\n\n", r>>5, r&31, sz); return; } } } fprintf(stderr, "Error: search for perfect hash failed\n"); exit(1); } /* Parse one token of a fold rule. */ static uint32_t nexttoken(char **pp, int allowlit, int allowany) { char *p = *pp; if (p) { uint32_t i; char *q = strchr(p, ' '); if (q) *q++ = '\0'; *pp = q; if (allowlit && !strncmp(p, "IRFPM_", 6)) { for (i = 0; irfpm_names[i]; i++) if (!strcmp(irfpm_names[i], p+6)) return i; } else if (allowlit && !strncmp(p, "IRFL_", 5)) { for (i = 0; irfield_names[i]; i++) if (!strcmp(irfield_names[i], p+5)) return i; } else if (allowlit && !strncmp(p, "IRCALL_", 7)) { for (i = 0; ircall_names[i]; i++) if (!strcmp(ircall_names[i], p+7)) return i; } else if (allowlit && !strncmp(p, "IRCONV_", 7)) { for (i = 0; irt_names[i]; i++) { const char *r = strchr(p+7, '_'); if (r && !strncmp(irt_names[i], p+7, r-(p+7))) { uint32_t j; for (j = 0; irt_names[j]; j++) if (!strcmp(irt_names[j], r+1)) return (i << 5) + j; } } } else if (allowlit && *p >= '0' && *p <= '9') { for (i = 0; *p >= '0' && *p <= '9'; p++) i = i*10 + (*p - '0'); if (*p == '\0') return i; } else if (allowany && !strcmp("any", p)) { return allowany; } else { for (i = 0; ir_names[i]; i++) if (!strcmp(ir_names[i], p)) return i; } fprintf(stderr, "Error: bad fold definition token \"%s\" at line %d\n", p, lineno); exit(1); } return 0; } /* Parse a fold rule. */ static void foldrule(char *p) { uint32_t op = nexttoken(&p, 0, 0); uint32_t left = nexttoken(&p, 0, 0x7f); uint32_t right = nexttoken(&p, 1, 0x3ff); uint32_t key = (funcidx << 24) | (op << 17) | (left << 10) | right; uint32_t i; if (nkeys >= BUILD_MAX_FOLD) { fprintf(stderr, "Error: too many fold rules, increase BUILD_MAX_FOLD.\n"); exit(1); } /* Simple insertion sort to detect duplicates. */ for (i = nkeys; i > 0; i--) { if ((foldkeys[i-1]&0xffffff) < (key & 0xffffff)) break; if ((foldkeys[i-1]&0xffffff) == (key & 0xffffff)) { fprintf(stderr, "Error: duplicate fold definition at line %d\n", lineno); exit(1); } foldkeys[i] = foldkeys[i-1]; } foldkeys[i] = key; nkeys++; } /* Emit C source code for IR folding hash table. */ void emit_fold(BuildCtx *ctx) { char buf[256]; /* We don't care about analyzing lines longer than that. */ const char *fname = ctx->args[0]; FILE *fp; if (fname == NULL) { fprintf(stderr, "Error: missing input filename\n"); exit(1); } if (fname[0] == '-' && fname[1] == '\0') { fp = stdin; } else { fp = fopen(fname, "r"); if (!fp) { fprintf(stderr, "Error: cannot open input file '%s': %s\n", fname, strerror(errno)); exit(1); } } fprintf(ctx->fp, "/* This is a generated file. DO NOT EDIT! */\n\n"); fprintf(ctx->fp, "static const FoldFunc fold_func[] = {\n"); lineno = 0; funcidx = 0; nkeys = 0; while (fgets(buf, sizeof(buf), fp) != NULL) { lineno++; /* The prefix must be at the start of a line, otherwise it's ignored. */ if (!strncmp(buf, FOLDDEF_PREFIX, sizeof(FOLDDEF_PREFIX)-1)) { char *p = buf+sizeof(FOLDDEF_PREFIX)-1; char *q = strchr(p, ')'); if (p[0] == '(' && q) { p++; *q = '\0'; foldrule(p); } else if ((p[0] == 'F' || p[0] == 'X') && p[1] == '(' && q) { p += 2; *q = '\0'; if (funcidx) fprintf(ctx->fp, ",\n"); if (p[-2] == 'X') fprintf(ctx->fp, " %s", p); else fprintf(ctx->fp, " fold_%s", p); funcidx++; } else { buf[strlen(buf)-1] = '\0'; fprintf(stderr, "Error: unknown fold definition tag %s%s at line %d\n", FOLDDEF_PREFIX, p, lineno); exit(1); } } } fclose(fp); fprintf(ctx->fp, "\n};\n\n"); makehash(ctx); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm.c0000664000000000000000000003121012202141143023136 0ustar rootroot/* ** LuaJIT VM builder. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** This is a tool to build the hand-tuned assembler code required for ** LuaJIT's bytecode interpreter. It supports a variety of output formats ** to feed different toolchains (see usage() below). ** ** This tool is not particularly optimized because it's only used while ** _building_ LuaJIT. There's no point in distributing or installing it. ** Only the object code generated by this tool is linked into LuaJIT. ** ** Caveat: some memory is not free'd, error handling is lazy. ** It's a one-shot tool -- any effort fixing this would be wasted. */ #include "buildvm.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_bc.h" #include "lj_ir.h" #include "lj_ircall.h" #include "lj_frame.h" #include "lj_dispatch.h" #if LJ_HASFFI #include "lj_ctype.h" #include "lj_ccall.h" #endif #include "luajit.h" #if defined(_WIN32) #include #include #endif /* ------------------------------------------------------------------------ */ /* DynASM glue definitions. */ #define Dst ctx #define Dst_DECL BuildCtx *ctx #define Dst_REF (ctx->D) #define DASM_CHECKS 1 #include "../dynasm/dasm_proto.h" /* Glue macros for DynASM. */ static int collect_reloc(BuildCtx *ctx, uint8_t *addr, int idx, int type); #define DASM_EXTERN(ctx, addr, idx, type) \ collect_reloc(ctx, addr, idx, type) /* ------------------------------------------------------------------------ */ /* Avoid trouble if cross-compiling for an x86 target. Speed doesn't matter. */ #define DASM_ALIGNED_WRITES 1 /* Embed architecture-specific DynASM encoder. */ #if LJ_TARGET_X86ORX64 #include "../dynasm/dasm_x86.h" #elif LJ_TARGET_ARM #include "../dynasm/dasm_arm.h" #elif LJ_TARGET_PPC #include "../dynasm/dasm_ppc.h" #elif LJ_TARGET_PPCSPE #include "../dynasm/dasm_ppc.h" #elif LJ_TARGET_MIPS #include "../dynasm/dasm_mips.h" #else #error "No support for this architecture (yet)" #endif /* Embed generated architecture-specific backend. */ #include "buildvm_arch.h" /* ------------------------------------------------------------------------ */ void owrite(BuildCtx *ctx, const void *ptr, size_t sz) { if (fwrite(ptr, 1, sz, ctx->fp) != sz) { fprintf(stderr, "Error: cannot write to output file: %s\n", strerror(errno)); exit(1); } } /* ------------------------------------------------------------------------ */ /* Emit code as raw bytes. Only used for DynASM debugging. */ static void emit_raw(BuildCtx *ctx) { owrite(ctx, ctx->code, ctx->codesz); } /* -- Build machine code -------------------------------------------------- */ static const char *sym_decorate(BuildCtx *ctx, const char *prefix, const char *suffix) { char name[256]; char *p; #if LJ_64 const char *symprefix = ctx->mode == BUILD_machasm ? "_" : ""; #elif LJ_TARGET_XBOX360 const char *symprefix = ""; #else const char *symprefix = ctx->mode != BUILD_elfasm ? "_" : ""; #endif sprintf(name, "%s%s%s", symprefix, prefix, suffix); p = strchr(name, '@'); if (p) { #if LJ_TARGET_X86ORX64 if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj)) name[0] = '@'; else *p = '\0'; #elif (LJ_TARGET_PPC || LJ_TARGET_PPCSPE) && !LJ_TARGET_CONSOLE /* Keep @plt. */ #else *p = '\0'; #endif } p = (char *)malloc(strlen(name)+1); /* MSVC doesn't like strdup. */ strcpy(p, name); return p; } #define NRELOCSYM (sizeof(extnames)/sizeof(extnames[0])-1) static int relocmap[NRELOCSYM]; /* Collect external relocations. */ static int collect_reloc(BuildCtx *ctx, uint8_t *addr, int idx, int type) { if (ctx->nreloc >= BUILD_MAX_RELOC) { fprintf(stderr, "Error: too many relocations, increase BUILD_MAX_RELOC.\n"); exit(1); } if (relocmap[idx] < 0) { relocmap[idx] = ctx->nrelocsym; ctx->relocsym[ctx->nrelocsym] = sym_decorate(ctx, "", extnames[idx]); ctx->nrelocsym++; } ctx->reloc[ctx->nreloc].ofs = (int32_t)(addr - ctx->code); ctx->reloc[ctx->nreloc].sym = relocmap[idx]; ctx->reloc[ctx->nreloc].type = type; ctx->nreloc++; #if LJ_TARGET_XBOX360 return (int)(ctx->code - addr) + 4; /* Encode symbol offset of .text. */ #else return 0; /* Encode symbol offset of 0. */ #endif } /* Naive insertion sort. Performance doesn't matter here. */ static void sym_insert(BuildCtx *ctx, int32_t ofs, const char *prefix, const char *suffix) { ptrdiff_t i = ctx->nsym++; while (i > 0) { if (ctx->sym[i-1].ofs <= ofs) break; ctx->sym[i] = ctx->sym[i-1]; i--; } ctx->sym[i].ofs = ofs; ctx->sym[i].name = sym_decorate(ctx, prefix, suffix); } /* Build the machine code. */ static int build_code(BuildCtx *ctx) { int status; int i; /* Initialize DynASM structures. */ ctx->nglob = GLOB__MAX; ctx->glob = (void **)malloc(ctx->nglob*sizeof(void *)); memset(ctx->glob, 0, ctx->nglob*sizeof(void *)); ctx->nreloc = 0; ctx->globnames = globnames; ctx->relocsym = (const char **)malloc(NRELOCSYM*sizeof(const char *)); ctx->nrelocsym = 0; for (i = 0; i < (int)NRELOCSYM; i++) relocmap[i] = -1; ctx->dasm_ident = DASM_IDENT; ctx->dasm_arch = DASM_ARCH; dasm_init(Dst, DASM_MAXSECTION); dasm_setupglobal(Dst, ctx->glob, ctx->nglob); dasm_setup(Dst, build_actionlist); /* Call arch-specific backend to emit the code. */ ctx->npc = build_backend(ctx); /* Finalize the code. */ (void)dasm_checkstep(Dst, -1); if ((status = dasm_link(Dst, &ctx->codesz))) return status; ctx->code = (uint8_t *)malloc(ctx->codesz); if ((status = dasm_encode(Dst, (void *)ctx->code))) return status; /* Allocate symbol table and bytecode offsets. */ ctx->beginsym = sym_decorate(ctx, "", LABEL_PREFIX "vm_asm_begin"); ctx->sym = (BuildSym *)malloc((ctx->npc+ctx->nglob+1)*sizeof(BuildSym)); ctx->nsym = 0; ctx->bc_ofs = (int32_t *)malloc(ctx->npc*sizeof(int32_t)); /* Collect the opcodes (PC labels). */ for (i = 0; i < ctx->npc; i++) { int32_t ofs = dasm_getpclabel(Dst, i); if (ofs < 0) return 0x22000000|i; ctx->bc_ofs[i] = ofs; if ((LJ_HASJIT || !(i == BC_JFORI || i == BC_JFORL || i == BC_JITERL || i == BC_JLOOP || i == BC_IFORL || i == BC_IITERL || i == BC_ILOOP)) && (LJ_HASFFI || i != BC_KCDATA)) sym_insert(ctx, ofs, LABEL_PREFIX_BC, bc_names[i]); } /* Collect the globals (named labels). */ for (i = 0; i < ctx->nglob; i++) { const char *gl = globnames[i]; int len = (int)strlen(gl); if (!ctx->glob[i]) { fprintf(stderr, "Error: undefined global %s\n", gl); exit(2); } /* Skip the _Z symbols. */ if (!(len >= 2 && gl[len-2] == '_' && gl[len-1] == 'Z')) sym_insert(ctx, (int32_t)((uint8_t *)(ctx->glob[i]) - ctx->code), LABEL_PREFIX, globnames[i]); } /* Close the address range. */ sym_insert(ctx, (int32_t)ctx->codesz, "", ""); ctx->nsym--; dasm_free(Dst); return 0; } /* -- Generate VM enums --------------------------------------------------- */ const char *const bc_names[] = { #define BCNAME(name, ma, mb, mc, mt) #name, BCDEF(BCNAME) #undef BCNAME NULL }; const char *const ir_names[] = { #define IRNAME(name, m, m1, m2) #name, IRDEF(IRNAME) #undef IRNAME NULL }; const char *const irt_names[] = { #define IRTNAME(name, size) #name, IRTDEF(IRTNAME) #undef IRTNAME NULL }; const char *const irfpm_names[] = { #define FPMNAME(name) #name, IRFPMDEF(FPMNAME) #undef FPMNAME NULL }; const char *const irfield_names[] = { #define FLNAME(name, ofs) #name, IRFLDEF(FLNAME) #undef FLNAME NULL }; const char *const ircall_names[] = { #define IRCALLNAME(cond, name, nargs, kind, type, flags) #name, IRCALLDEF(IRCALLNAME) #undef IRCALLNAME NULL }; static const char *const trace_errors[] = { #define TREDEF(name, msg) msg, #include "lj_traceerr.h" NULL }; static const char *lower(char *buf, const char *s) { char *p = buf; while (*s) { *p++ = (*s >= 'A' && *s <= 'Z') ? *s+0x20 : *s; s++; } *p = '\0'; return buf; } /* Emit C source code for bytecode-related definitions. */ static void emit_bcdef(BuildCtx *ctx) { int i; fprintf(ctx->fp, "/* This is a generated file. DO NOT EDIT! */\n\n"); fprintf(ctx->fp, "LJ_DATADEF const uint16_t lj_bc_ofs[] = {\n"); for (i = 0; i < ctx->npc; i++) { if (i != 0) fprintf(ctx->fp, ",\n"); fprintf(ctx->fp, "%d", ctx->bc_ofs[i]); } } /* Emit VM definitions as Lua code for debug modules. */ static void emit_vmdef(BuildCtx *ctx) { char buf[80]; int i; fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n"); fprintf(ctx->fp, "module(...)\n\n"); fprintf(ctx->fp, "bcnames = \""); for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]); fprintf(ctx->fp, "\"\n\n"); fprintf(ctx->fp, "irnames = \""); for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]); fprintf(ctx->fp, "\"\n\n"); fprintf(ctx->fp, "irfpm = { [0]="); for (i = 0; irfpm_names[i]; i++) fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i])); fprintf(ctx->fp, "}\n\n"); fprintf(ctx->fp, "irfield = { [0]="); for (i = 0; irfield_names[i]; i++) { char *p; lower(buf, irfield_names[i]); p = strchr(buf, '_'); if (p) *p = '.'; fprintf(ctx->fp, "\"%s\", ", buf); } fprintf(ctx->fp, "}\n\n"); fprintf(ctx->fp, "ircall = {\n[0]="); for (i = 0; ircall_names[i]; i++) fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]); fprintf(ctx->fp, "}\n\n"); fprintf(ctx->fp, "traceerr = {\n[0]="); for (i = 0; trace_errors[i]; i++) fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]); fprintf(ctx->fp, "}\n\n"); } /* -- Argument parsing ---------------------------------------------------- */ /* Build mode names. */ static const char *const modenames[] = { #define BUILDNAME(name) #name, BUILDDEF(BUILDNAME) #undef BUILDNAME NULL }; /* Print usage information and exit. */ static void usage(void) { int i; fprintf(stderr, LUAJIT_VERSION " VM builder.\n"); fprintf(stderr, LUAJIT_COPYRIGHT ", " LUAJIT_URL "\n"); fprintf(stderr, "Target architecture: " LJ_ARCH_NAME "\n\n"); fprintf(stderr, "Usage: buildvm -m mode [-o outfile] [infiles...]\n\n"); fprintf(stderr, "Available modes:\n"); for (i = 0; i < BUILD__MAX; i++) fprintf(stderr, " %s\n", modenames[i]); exit(1); } /* Parse the output mode name. */ static BuildMode parsemode(const char *mode) { int i; for (i = 0; modenames[i]; i++) if (!strcmp(mode, modenames[i])) return (BuildMode)i; usage(); return (BuildMode)-1; } /* Parse arguments. */ static void parseargs(BuildCtx *ctx, char **argv) { const char *a; int i; ctx->mode = (BuildMode)-1; ctx->outname = "-"; for (i = 1; (a = argv[i]) != NULL; i++) { if (a[0] != '-') break; switch (a[1]) { case '-': if (a[2]) goto err; i++; goto ok; case '\0': goto ok; case 'm': i++; if (a[2] || argv[i] == NULL) goto err; ctx->mode = parsemode(argv[i]); break; case 'o': i++; if (a[2] || argv[i] == NULL) goto err; ctx->outname = argv[i]; break; default: err: usage(); break; } } ok: ctx->args = argv+i; if (ctx->mode == (BuildMode)-1) goto err; } int main(int argc, char **argv) { BuildCtx ctx_; BuildCtx *ctx = &ctx_; int status, binmode; if (sizeof(void *) != 4*LJ_32+8*LJ_64) { fprintf(stderr,"Error: pointer size mismatch in cross-build.\n"); fprintf(stderr,"Try: make HOST_CC=\"gcc -m32\" CROSS=...\n\n"); return 1; } UNUSED(argc); parseargs(ctx, argv); if ((status = build_code(ctx))) { fprintf(stderr,"Error: DASM error %08x\n", status); return 1; } switch (ctx->mode) { case BUILD_peobj: case BUILD_raw: binmode = 1; break; default: binmode = 0; break; } if (ctx->outname[0] == '-' && ctx->outname[1] == '\0') { ctx->fp = stdout; #if defined(_WIN32) if (binmode) _setmode(_fileno(stdout), _O_BINARY); /* Yuck. */ #endif } else if (!(ctx->fp = fopen(ctx->outname, binmode ? "wb" : "w"))) { fprintf(stderr, "Error: cannot open output file '%s': %s\n", ctx->outname, strerror(errno)); exit(1); } switch (ctx->mode) { case BUILD_elfasm: case BUILD_coffasm: case BUILD_machasm: emit_asm(ctx); emit_asm_debug(ctx); break; case BUILD_peobj: emit_peobj(ctx); break; case BUILD_raw: emit_raw(ctx); break; case BUILD_bcdef: emit_bcdef(ctx); emit_lib(ctx); break; case BUILD_vmdef: emit_vmdef(ctx); emit_lib(ctx); break; case BUILD_ffdef: case BUILD_libdef: case BUILD_recdef: emit_lib(ctx); break; case BUILD_folddef: emit_fold(ctx); break; default: break; } fflush(ctx->fp); if (ferror(ctx->fp)) { fprintf(stderr, "Error: cannot write to output file: %s\n", strerror(errno)); exit(1); } fclose(ctx->fp); return 0; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm0000775000000000000000000022570712213333063022746 0ustar rootrootELF> @@ @8@@@@@@@@@@     a ad   a a@@DDPtdAADDQtd/lib64/ld-linux-x86-64.so.2GNU GNUWW}읟2 )fUa9D!Z5n|h aL>-(u aT a a__gmon_start__libc.so.6fflushstrcpyexitsprintf_IO_putcfopenstrncmpreallocstdinstrtodstrtolfgetsmemsetstrstrstrcspn__errno_locationstdoutfputcmemcpyfclosemallocstderrfwritestrchrfprintfstrcmpstrerror__libc_start_mainferrorfreeGLIBC_2.14GLIBC_2.2.5ui   a a a a a a a a a a a a a a a  a  a  a a( a0 a8 a@ aH aP aX a` ah ap ax a a aHHe!HtH5Z!%\!@%Z!h%R!h%J!h%B!h%:!h%2!h%*!h%"!hp%!h`%!h P% !h @%!h 0%!h %!h %!h%!h%!h%!h%!h%!h%!h%!h%!h%!hp%!h`%!hP%!h@%!h01I^HHPTI@H@H-@ aUH- aHHw]øHt] a aUH- aHHHH?HHHu]úHt] a=!uUH~] @H= tHtU aH]{vHt&HDBDJ AAFшHHuHUSHH l Ă@H Q 6@@mH 6 ނ@RH  2x@7H @@@H @H= YHH9u޿SHHIЃ,@߃@HDо@H@HHtHHHH#HHHHH[USHHHD_@IcAKO@H~RLOXIL@IMA;p}:LPILOXIOIA9p~IMMMM@MAHuHHOXtHoXHHHEH[]ATUSIHFHHHxHt:HvHH9wHEI$HubI$H(H@H@H@ H@(H@0XH~:H@XHcHHHHPH@`@lH(9u[]A\USHH/}H~#HcHH|XHt>9]HH} Ht(H}HtHH[]USHH/HPHu0H] HH9sIcDT$ DAD$L$L\$ HD$0HD$(MA HAHAHHAHKH/wLT$0L҃LM@McBA< w$Š@u*DȃuDKDȃHAuctXHAWtUHH>L;d$D$$t$$A9wHHMw@L9DH8[]A\A]A^A_HHH;P(s1HP yډHcH HcHDPÅøHxLu~HPz~xHxH׃?~!HLH uЃxLuH$D$HD$D$$ AAtpH$H$fD$D$8CD$$A8CA4H$$A8CAH$$A8CAH$D$$8CAAD¾\H$xD$$AA8CH$?&H$&H$(<&H$ ʾ&H$%H$7&H$tu>&H$<'H$dʾ!'H$D%H$-.7&H$tu>D'H$<^'H$ʾx'H$%H$7&H$ktu>'H$6<'H$ʾ'H$'H$7&H$tu>'H$<'H$rʾ'H$R(H$;<7&H$tu>'H$<'H$ʾ'H$(H$5(H$op(H$NO(H$-.(H$(H$(H$)H$@)H$D$(PD$ D$D$D$$AAi)H$1)H$D$ PD$D$D$$AA)H$5*H$b*H$uvAA(*H$CDA*H$$AAtp+H$ $AAtp+H$ +H$ +H$cd D$$AA ,H$"$AA,H$ D$ D$D$D$ $AA,H$$AA-H$ab D$D$D$$AAO-H$-H$ D$D$$AA-H$D$D$$AA.H$gA ʾp.H$CD D$(D$ D$D$ D$$AA.H$D$D$$AA.H$D$0 D$(D$ D$D$D$$AA)/H$:; D$D$$AA/H$D$ D$D$$AA/H$ D$$AA0H$d$ AEȹ0H$34 ;&H$=u0H$0H$0H$AA0H$D$$AAd1H$PQA1H$$%HD$$AA1H$$AA2H$D$ AD$D$TD$$AA2H$UVA 63H$)AA3H$0H$G7#4H$'4H$Gt[Ht?Fuh:4H$y4H$XUp4H$?z4H$(4H$AFu?4H$4H$C4H$4H$AGt4H$h"&H$QRA~4H$%&4H$ C5H$5H$5H$5H$5H${6H$d6H$MAIu(6H$+iAJu#S26H$@ALu@6H$S<6H$J6H$A~4H$}~k6H$\PuSz6H$;6H$#H$A~4H$#H$ADAH@6H$6H$klA~6H$?@A 6H$WuS7H$#H$7H$!H$AA .7H$o7H$S7H$78$A A7H$[uQ7H$87H$7H$調T7H$葿87H$p(7H$TAA87H$'+AJ倳@@@H=8 辸D]DŽ$]H$H$H$H$螸H$HH$tC@߃@H$H$@$$ HcH@H$(DŽ$HcH!H$8JH$wy "(H$8H ݀@S@H$úH;$|IH @HLHэAH$ H4Hu Z@H= +豷~H|_u|ZtH+$HѺv@H$&H9$ t߃@Hʋ$H$$H$U$H$?-u;"¾z@H= s+uH H$Y@l@HE譶H$Hu7K8ԶHH$`@H=} 艶$ $$Ű@H$; H$ HH$$tH)H$$@!H$@Pھ@H$G$)ھ@H$'H$"X@諵H$ @菵Pھ@H$ѴH$@U$)ھx@H$蕴H$Lh@H$@AH$(HcHHHH(HHLAD+ht]@HtI\$8D$0PDl$(Hl$ \$\$\$$AA؉Hء@H$óE;$fEt6H$@-Dأ@H$sH$@QH$* ?H$H$H$H$.@袳H$*@膳HtH$ @_HcH$8p@H$蚲;$|H${H$+@@H$ @H$ ˃@Ȳ@"@׃@H$HHSHu)׃@H$ޱHHSHuH$܃@XH$@< @'H$HH¾@H$nHHsHuH$@@H$@˱@JH$ײ_H$腰Ht.H$@H$ްHH3HuH$@@XH$ @<(@'@@H${HHSHu@H$RHHSHuH$@̰H$<H$- H$"H$DH$7t/8臰H¾@H=8 辯DH$_#H$ǵ0#H$覵A '4H$;ʾ5H$\5H$E5H$.6H$H$܃@PH$ "@4@L@H$@ H$.@h@@H []A\A]A^A_ÐH\$Hl$Ld$H8HHA̋GtOrHHt$T$H4$@A@LEIHH@语bHH@藭EtH}Hھ@|H}Hھ@fHHH@KH\$ Hl$(Ld$0H8AWAVAUATUSHHAօ~gIBLdHD)AAuH}@*H}@լAuHu QHL9uAtHu 4H[]A\A]A^A_AWAVAUATUSHHHH@jHK@Cvu4H{@+H{@HspH{tHK @}{@ZD$ HSXHcL$ HHHD`HHL L$D)H0Hj;kDHcH@T$;HcH@LEuE){A}IcUHC`L,IcHs(Dx9Hc!u ~uHH~ HHp k HÃH\$Hl$H(HHHHэQ<"u0tHcHD8"cH~Fu0< wlHt$HHD$8+H HP H-av%H ͠ @ϟ@H H @8uGHj HBH=-av%H g @胟iH/ ~x"@H8u_H- HEH=-av%H  @EH{ }EHH- (Hٺ'@@H= /赞H\$Hl$ H(AWAVAUATUSHI^I1 / 9}4IM.@l P  9|̉ A<$. .aLD LHD$Ht HHD$=ҟ tA aIALH>tuHLDHH˃;u  aLHHHH-ar%H n @芝pLHH|$tI}HL$2@賜I}B@蜜H[]A\A]A^A_AVAUATUSIIӅt AF uL@H= G͜= uGH HBH=-av%H @覜茜HR tMtIN @h ۸M@U@HEI~L\@蘛= t  A߃@L~uI~Lc@V^uSLHHHAHOv#L@H= 蛛L .a> u\I}AUt4=` t+IE-a_u.Ht1HH@uI~L@蝚AF<~dInxL$HD8fu=xfu7x_u1HxL9u!IFPHI+V(I~n@&1HL9uLs@0@H=w 胚, 2 []A\A]A^Ë ATUSHPIuHOz@CIL$@*I|$-a@X@l$H= av[ aUHcH<$HǾ@贙ÃJ~ I|$H @$HH9-b wI|$H⾣@HP[]A\USHHH     H aך H}Hٺ'@@pH}Hٺ'@@UH}Hٺ@@:H߸HHHH HOvHھ@H=v 臘H޿-a*H[]AWAVAUATUSHIGPwHO.@L uHO@-AuIO1@   IG HHIG HUHD$H$A;-u{uH HD$I@HsHD$Hu28蝗HHھ@H=K іW  }Ld$|$#P|$iE|$f: @ H4$8t?|$#u8D$@>@^?@@@l=@>@>@^?@@@l=@>@>@^?@@@PA@A@B@=B@^B@zB@B@B@B@B@qC@C@C@D@HD@tD@D@D@E@(E@E@*F@F@HG@QH@H@XI@XI@I@I@;J@gJ@6K@J@K@K@K@K@fM@fM@:M@fM@fM@N@O@O@O@O@O@O@ P@LP@LP@R@P@P@TQ@TQ@cU@cU@cU@W@X@"X@#[@#[@#[@X@2[@'@@@K@Z@i@x@@@@@@DŽ@Մ@@@@̒@@@@@@@)@P@+@6@6@B@g@s@@A@5@@@L@X@c@n@y@@@@@@@ȅ@Ӆ@ޅ@@@@ @@@'@0@:@C@M@^@o@@@@@Æ@ʆ@ц@؆@@@@@ @@ @)@3@=@F@Q@^@i@w@@@@@@@@ @@@ć@ɇ@χ@Ӈ@ׇ@ۇ@؊@@@@Ŋ@@@@@ @ʊ@@@@@@!@$@(@@,@0@4@8@L@@f@@?@C@G@K@O@R@U@Y@^@b@g@l@s@@x@|@@@@@@@@@@@@@@È@Lj@̈@ш@ֈ@ۈ@@@@@@@@@@@ @@@@ @&@,@2@7@=@B@I@O@U@Z@a@g@m@s@y@@@@@@@@@@@@@É@ɉ@Ή@Ӊ@؉@݉@@@@@@@@"@ @@@@"@(@.@4@:@@@F@L@Q@V@Z@^@@b@@f@l@r@x@~@@@@@@@@@@@@@Ċ@Ɋ@Њ@@@׊@܊@@@@@@@@@@@ @@@@%@+@1@7@=@B@I@O@U@[@`@g@l@p@u@{@z@@@@@@@@@@@@@@@@@Ƌ@̋@Ӌ@@@@@@,@?@M@[@h@v@@@@@ˌ@֌@@@@@@@@'@:@J@_@t@@@@@@Ӎ@@@@@@@j@@ @@@@%@-@8@F@Q@a@j@t@@@@@@ˎ@ێ@@@@@@#@4@?@R@\@n@{@@@@@@@ŏ@я@ݏ@@@@@@@.@>@M@]@l@v@@@@@@@ː@Ր@@@@@ @@&@2@>@J@U@]@f@n@w@@@@@@@Ց@@@@@ @@@!@.@:@H@T@_@k@w@@@@@@Ē@ђ@ݒ@@@@@"@ @-@9@@@L@X@f@u@@@@@@Ǔ@ٓ@@@@@#@.@:@N@Y@e@r@~@@@@@@ɔ@Ԕ@ߔ@@@@ @@*@7@C@P@9@W@c@n@y@@@@@@Ε@ܕ@@@  )HLZD   D$ Adž)ۃH, Hjl$D$L$9HL$ H1H(A^A_[];B)D$Ή Hl$Dž|$H(A^A_[]HHl$H틕DAZBAdž D鉅\$鋅j) ̓A$USAWAVH(|$1L$DALD$HD$ D$D$8Adž툅鋕鋅))ыZD$USAWAVH(L$USAWAVH(T$|$LL|$ l$HDAAdž틕)Ӌ)iyʉZ ̓A$ USAWAVH(|$l$DD+D$D|$LL|$ Hх у)Dȋ]HcML=LDzEE!)E"#K )$|$HHM%&$D$H${A)A'C*$H$(Ck,|$H‰\$$KH(H,ʋA$Y)Ӌi)$D$H${A)A*C*$H$+Ck,|$H‰\$KH,H(,A$YCH,Hi)Ӌi-l$4ʍ‰K\$.[CA$/x0x1Ήl$‰\$2l$s\$34A56AǍ,7‰89, DCΉ|$\$,.)ЉY:l$4‰\$.C<;.l$Ή\$ CA?@j@ZD$j*jH)HiD$AB@j9GjZBBCD@jZ*BCABj#i9CiCjBCAE@z@*@z @BZBjAA鉅CF@z@Ջ2R|$ H(ZHjCG@z@HI@ZzBBCz@A@AA;Jl$\$։ K@z@l$鉕Z2R\$ HjHBHjHLMB BCN@*z@@jZBBB MO@z@z @ZBHfHnX-B*;xPH(H*LPՉPMQ@jZBBWBMR@JAS@z @jj B*ZjJT@*Z\$,$z@H@@;@\;@l$lH)9H+HC9΋<$Adžl$$D鉋D);H)HH)D9CB\$D$HB틋HH $Dމ$UjZ\$,$H@@;@\;@l$鉕lH)9H+HC9΋<$Adžl$$D鉋D);H)HH)D9C\$D$1މ $Dމ$Vl$H@D1H눅WXZZCY@z@HfHnTHZBCMD$A8CKHэʋA$DHZz@[H\z@]H^@z@QH_@z@X`@z@Xa@z@bXc@z@Xd@z@Xe@z@Xf@z@Xg@z@Xh@z@Xi@z@Hj@z@Hk@z@Hlm@z@jYHn@z@z @BXo@z@z @BXp@j@ZjB  )*ŋj?jMWHfHnYBj4q@z@jZ(r\B"Bj1MjWs@z@z @BXt@z@z @JuHvz@9H|@L]wz@9H|@L_x@z@**Hy@z@*ZP*HzAA;J@z@,*@l$D$HD${l$T$HƉ\$ZBBC|AA;JD$@z@,jl$z@z @*l$,JD$9l$)} D${D(}1~AA;J@z@z *@,B}}A9AD$MA{@AA;Jz@*}A9\$D$AM ؋\${@AA;Jz@*A9\$D$ALAZ  ؋\${@AA;Jz@*A9\$D$ALaz  ؋\${@z@Ջ:*H@z@HfHnXf~@HfHńz@Xf~D$D9xXf~!̓@HfHńz@Xf~D$D9xXf~ ̓@HfHńz@Xf~D$D9xXf~1̓@z@HfHnXf~@z@HfHnXf~*HD$@@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@@l$Z\$D鉅B;鋕M)Aj" ̓A$"kHՍ݃)1J]Hl$l$\$D鋅)Hl$UAAAAAl$މKkCAML$j‹l$鉅AI\$\$\$Dl$鉅މD$H)HKAUATASARAQAPWVUHl$XUSRQPEeL}LuDuAAdžAAHHŀD}DuDmDeD]DUDMDE}ume]UMEAAIAdžHAHHH̉鋕鋙HLl$L$$D$DzEEAdžAdžD$A$؉[HfHnHfHn(fTf.fUX\fVHfHnfT\(]HfHnHfHn(fTf.fUX\fVHfHnfT\(rHfHnHfHn(fTf.fU(X\HfHnfT\fV((^HfHnHfHn(fTf.fUX\fVHfHnfT\(Y\Y(\D$D$\$D$bT$|$|$u-*f.Y(YYYHfHn^(HfHnfH~HH H=fH~HH H=L$D$D$D$\$D$ HfHnf.(HfHnfTHfHnf.fPW0HfHnfPWfPW[]rQD$D$b  \$D$ X\Y^uHfHnWHfHnT D$L$D$D$\$D$ ]_ S^NV [SAWAVH(D鋝HHHHH$LLHH\$Adž틐鋀)Ћj ̓A$!L$AH鉑鉩߉HUHSHH)HHHHHHLL((((((((H)H)H]|-|-f.CA$l|f.CC 2|29l ʋ911 2HЋl A; lAf.HЋl9CA$22CA$ll,‰,H,H,ʋA$1|lA$|7HfHnWʋA$|W*ʋA$|:<;*K :|4AX|6AX|9|9X|4A\|6A\|9|9\|4AY|6AY|9|9Y|4A^|6A^|9|9^|4A |6A |9|9 ʋA$uʋA$|$4‰)%\$.kKHHʋA$HADʋA$*ʋA$AʋA$HЉDA$L Di)9A$j鋭HEHʋA$j逽 ‹DMEA$AHЋjA @A$ՉAjANj鋍A$HЋj鋍AA$l$4ʉA$HЋl$RA4\$KDA$l$AA;\$% = KDA$!CHЋl$A\$A;鉕A4"KDA$!CHHЋjAHЋjA|(,|-*f.(;(xH(H,A$(KD|(HA|&,#i9yCH)H,A$CD&|',;'xH(H,A$'KD|+,|-*f.+;+xH,H(A$+K|+AA鉍KHA|),#iƅ9yCH,H)A$ $) $)$D$l$|$H$\$#l$AA鉅|*,;*xH HA$*KAA鉍KD<$E< ʋiD$D;D)ADH)I/AD<$A$|$‰\$$KAA鉅D$|,y>)yy yi));iAiCA$))C y>y >y yi>IXAf.ACA$f. ʋii)iiAAHl$AAL$$Ll$HA$fA.Dl$ ;9CD9,DzhDxl$ ;щ9DyD8DyDxADA$@jLl$D鍈;鉅LAdžAAAdž틕 Z @@ @@.@:@K@f@@@@ɖ@@@@p@"@=@W@j@@@@@@ɗ@ח@@@ @$@@0@X@x@object .globl %s .private_extern %s %s: .byte %d,%djmp .file "buildvm_%s.dasc" .text .p2align %d .align %d .Lbegin: %s %s .long %s-.-4 .long %s .ident "%s" .cstring .ascii "%s\0" jojnojbjnbjzjnzjbejajsjnsjpejpojljgejlejg .globl %s .hidden %s .type %s, @%s .size %s, %d %s: .def %s; .scl 3; .type 32; .endef Error: unsupported opcode for %s symbol relocation. .section .note.GNU-stack,"",@progbits P@S@W@Z@^@a@e@i@l@o@s@w@{@~@@@@feat.00lj_err_unwind_win64Error: string too long: '%s' lastcltop-LJLIB_, 0, 0x%02x00+(%s), 0x%02x00lj_ffh_lj_cf_ %s%sFFDEF(%s) , %dlj_ff_ (lua_CFunction)0 }; lj_lib_init_%d,%s%d }; #endif #ifdef %sMODULE_%s #undef %sMODULE_%s lj_lib_cf_MODULE_ffnames = { [0]="Lua", "C", #if LJ_52 #undef FFDEF BCDEF(BCMODE) BCMODE_FF, BCMODE_FF }; , recff_%s CF(ASM(ASM_(REC(PUSH(SET(NOREGUVNOREGError: output buffer overflow Error: bad value for %sPUSH(%s) Error: no module for function definition %s Error: function name too long: '%s' Error: undefined fast function %s%s static const uint8_t %s%s[] = { static const lua_CFunction %s%s[] = { Error: module name too long: '%s' static const uint16_t recff_idmap[] = { 0, 0x0100Error: cannot open input file '%s': %s Error: unknown library definition tag %s%s #ifndef FF_NUM_ASMFUNC #define FF_NUM_ASMFUNC %d #endif LJ_DATADEF const uint16_t lj_bc_mode[] = { static const RecordFunc recff_func[] = { recff_nyi, recff_c@\@fr@a@"@n@e@"@n@@j@"@n@p@"@+m@u@"@=k@{@"@j@@i@@i@static const uint32_t fold_hash[%d] = { 0x%08xError: bad fold definition token "%s" at line %d #define fold_hashkey(k) (((((k)<<%u)-(k))<<%u)%%%u) #define fold_hashkey(k) (lj_rol(lj_rol((k),%u)-(k),%u)%%%u) Error: search for perfect hash failed Error: missing input filename static const FoldFunc fold_func[] = { Error: too many fold rules, increase BUILD_MAX_FOLD. Error: duplicate fold definition at line %d Error: unknown fold definition tag %s%s at line %d , 0x%08xIRFPM_IRFL_IRCALL_IRCONV_LJFOLD %s fold_%s;@' \t  n  \Dl_4|hS\l}]^a$bLc|Ti[igjjl4'npqr$twtwz|L}zRx  *zRx  74 AAD $T }AGsA$| AAD AA,f BAA AB$ ]AAD TAA$E dAAD [AA,$ rBAA jABT kAiLteBBB B(A0A8DL8A0A(B BBBD#BBB B(A0A8o0A(B BBBL ^BBB B(A0A8Dpm8A0A(B BBB\JtONALL}=BBB B(A0A8G=8A0A(B BBB XS@DXBBB B(A0A8D@8A0A(B BBBLdCYBBB B(A0A8DP8A0A(B BBB$\7bp,]OAD`AAD ^BBB A(A0G0A(A BBBTclwc X0cdJJ~dX0LcfBBB B(A0A8DPo8A0A(B BBB<gBBB A(A0(A BBB4TjPAA Dp AAB$jAAD AALkBBB B(A0A8G8A0A(B BBB4oBBA A(D0v(A ABBL<GpBBB B(A0A8DP8A0A(B BBBLrBBB B(A0A8D`8A0A(B BBB4HtBAA G AABL%uBBB B(A0A8G8A0A(B BBB$dxJf@Xy @ @ @ @ a ao`@@@   a@ @` o@oo@ aV @f @v @ @ @ @ @ @ @ @ @ @ @& @6 @F @V @f @v @ @ @ @ @ @ @ @ @ @GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment@#@ 1<@<$Do`@`0N @V@^o@@ko@0z @ `@  @ @ @@  @ v@ @} ADA a  a  a  a  a  a  a  a b 0  H\ `$g@@<@`@@@@@ @ @ @ @ @  @@@AA a a a a a a a a  a @ @. p @A @W af a @ a @7 7 @@` @} w@ a@0 @  @@8`@ *8 ]@G ^@V`@_o Tb@7~X a` a c@ i@ a i@ -a-aP-a a  j@J =k@ +m@ a a  .aP) n@5 a? aH gq@Y fr@g @@w x@ x@.a d{@.a.a@ (}@.a A a a a a a& @6@?Q @Ja  a @e  a@ @r a-A@J aQe E@dv@| ]s@  a*> @H] l @Hy a @@ @k @  %d@ @]na#  @*? ^@H aT -@=Y @pex  n@ =~@ a  @N @* @0D >@S acrtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6109__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entrybuildvm.clowerusagemodenamessym_decoratesym_insertrelocmapextnamesglobnamesbuild_actionlisttrace_errorsbuildvm_asm.cemit_asm_labelemit_asm_bytesjccnamesbuildvm_peobj.cemit_peobj_symstrtabstrtabofsemit_peobj_sym_sectbuildvm_lib.clibdef_regfuncregfunclibdef_namemodnamelenmodnameoptrobuflibdef_setlibdef_pushlibdef_recffidrecffidfuncnamelibdef_funcffasmfuncmodstatelibdef_endmodulelibdef_modulelibdef_handlersbuildvm_fold.cprinthashnexttokenlinenotryhashnkeysfoldkeysmakehashfuncidx__FRAME_END____JCR_END____init_array_end_DYNAMIC__init_array_start_GLOBAL_OFFSET_TABLE___libc_csu_finibc_namesfree@@GLIBC_2.2.5dasm_getpclabel__errno_location@@GLIBC_2.2.5strncmp@@GLIBC_2.2.5_ITM_deregisterTMCloneTablestdout@@GLIBC_2.2.5dasm_putdata_startstrcpy@@GLIBC_2.2.5irfield_namesferror@@GLIBC_2.2.5dasm_growpcstdin@@GLIBC_2.2.5strtod@@GLIBC_2.2.5ir_names_edatafclose@@GLIBC_2.2.5dasm_setupglobal_finistrchr@@GLIBC_2.2.5_IO_putc@@GLIBC_2.2.5memset@@GLIBC_2.2.5fputc@@GLIBC_2.2.5emit_libstrcspn@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5fgets@@GLIBC_2.2.5__data_startstrcmp@@GLIBC_2.2.5dasm_linkfprintf@@GLIBC_2.2.5__gmon_start__ircall_namesstrtol@@GLIBC_2.2.5__dso_handledasm_initmemcpy@@GLIBC_2.14_IO_stdin_useddasm_setup__libc_csu_initmalloc@@GLIBC_2.2.5fflush@@GLIBC_2.2.5emit_peobjdasm_free_end_startrealloc@@GLIBC_2.2.5emit_asm__bss_startmainirfpm_namesfopen@@GLIBC_2.2.5_Jv_RegisterClassesdasm_encodeemit_foldsprintf@@GLIBC_2.2.5exit@@GLIBC_2.2.5fwrite@@GLIBC_2.2.5__TMC_END___ITM_registerTMCloneTablestrerror@@GLIBC_2.2.5owriteirt_names_initstrstr@@GLIBC_2.2.5dasm_checkstepstderr@@GLIBC_2.2.5tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/minilua.c0000664000000000000000000052441112202141143023144 0ustar rootroot/* This is a heavily customized and minimized copy of Lua 5.1.5. */ /* It's only used to build LuaJIT. It does NOT have all standard functions! */ /****************************************************************************** * Copyright (C) 1994-2012 Lua.org, PUC-Rio. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ #ifdef _MSC_VER typedef unsigned __int64 U64; #else typedef unsigned long long U64; #endif #include #include #include #include #include #include #include #include #include #include #include typedef enum{ TM_INDEX, TM_NEWINDEX, TM_GC, TM_MODE, TM_EQ, TM_ADD, TM_SUB, TM_MUL, TM_DIV, TM_MOD, TM_POW, TM_UNM, TM_LEN, TM_LT, TM_LE, TM_CONCAT, TM_CALL, TM_N }TMS; enum OpMode{iABC,iABx,iAsBx}; typedef enum{ OP_MOVE, OP_LOADK, OP_LOADBOOL, OP_LOADNIL, OP_GETUPVAL, OP_GETGLOBAL, OP_GETTABLE, OP_SETGLOBAL, OP_SETUPVAL, OP_SETTABLE, OP_NEWTABLE, OP_SELF, OP_ADD, OP_SUB, OP_MUL, OP_DIV, OP_MOD, OP_POW, OP_UNM, OP_NOT, OP_LEN, OP_CONCAT, OP_JMP, OP_EQ, OP_LT, OP_LE, OP_TEST, OP_TESTSET, OP_CALL, OP_TAILCALL, OP_RETURN, OP_FORLOOP, OP_FORPREP, OP_TFORLOOP, OP_SETLIST, OP_CLOSE, OP_CLOSURE, OP_VARARG }OpCode; enum OpArgMask{ OpArgN, OpArgU, OpArgR, OpArgK }; typedef enum{ VVOID, VNIL, VTRUE, VFALSE, VK, VKNUM, VLOCAL, VUPVAL, VGLOBAL, VINDEXED, VJMP, VRELOCABLE, VNONRELOC, VCALL, VVARARG }expkind; enum RESERVED{ TK_AND=257,TK_BREAK, TK_DO,TK_ELSE,TK_ELSEIF,TK_END,TK_FALSE,TK_FOR,TK_FUNCTION, TK_IF,TK_IN,TK_LOCAL,TK_NIL,TK_NOT,TK_OR,TK_REPEAT, TK_RETURN,TK_THEN,TK_TRUE,TK_UNTIL,TK_WHILE, TK_CONCAT,TK_DOTS,TK_EQ,TK_GE,TK_LE,TK_NE,TK_NUMBER, TK_NAME,TK_STRING,TK_EOS }; typedef enum BinOpr{ OPR_ADD,OPR_SUB,OPR_MUL,OPR_DIV,OPR_MOD,OPR_POW, OPR_CONCAT, OPR_NE,OPR_EQ, OPR_LT,OPR_LE,OPR_GT,OPR_GE, OPR_AND,OPR_OR, OPR_NOBINOPR }BinOpr; typedef enum UnOpr{OPR_MINUS,OPR_NOT,OPR_LEN,OPR_NOUNOPR}UnOpr; #define LUA_QL(x)"'"x"'" #define luai_apicheck(L,o){(void)L;} #define lua_number2str(s,n)sprintf((s),"%.14g",(n)) #define lua_str2number(s,p)strtod((s),(p)) #define luai_numadd(a,b)((a)+(b)) #define luai_numsub(a,b)((a)-(b)) #define luai_nummul(a,b)((a)*(b)) #define luai_numdiv(a,b)((a)/(b)) #define luai_nummod(a,b)((a)-floor((a)/(b))*(b)) #define luai_numpow(a,b)(pow(a,b)) #define luai_numunm(a)(-(a)) #define luai_numeq(a,b)((a)==(b)) #define luai_numlt(a,b)((a)<(b)) #define luai_numle(a,b)((a)<=(b)) #define luai_numisnan(a)(!luai_numeq((a),(a))) #define lua_number2int(i,d)((i)=(int)(d)) #define lua_number2integer(i,d)((i)=(lua_Integer)(d)) #define LUAI_THROW(L,c)longjmp((c)->b,1) #define LUAI_TRY(L,c,a)if(setjmp((c)->b)==0){a} #define lua_pclose(L,file)((void)((void)L,file),0) #define lua_upvalueindex(i)((-10002)-(i)) typedef struct lua_State lua_State; typedef int(*lua_CFunction)(lua_State*L); typedef const char*(*lua_Reader)(lua_State*L,void*ud,size_t*sz); typedef void*(*lua_Alloc)(void*ud,void*ptr,size_t osize,size_t nsize); typedef double lua_Number; typedef ptrdiff_t lua_Integer; static void lua_settop(lua_State*L,int idx); static int lua_type(lua_State*L,int idx); static const char* lua_tolstring(lua_State*L,int idx,size_t*len); static size_t lua_objlen(lua_State*L,int idx); static void lua_pushlstring(lua_State*L,const char*s,size_t l); static void lua_pushcclosure(lua_State*L,lua_CFunction fn,int n); static void lua_createtable(lua_State*L,int narr,int nrec); static void lua_setfield(lua_State*L,int idx,const char*k); #define lua_pop(L,n)lua_settop(L,-(n)-1) #define lua_newtable(L)lua_createtable(L,0,0) #define lua_pushcfunction(L,f)lua_pushcclosure(L,(f),0) #define lua_strlen(L,i)lua_objlen(L,(i)) #define lua_isfunction(L,n)(lua_type(L,(n))==6) #define lua_istable(L,n)(lua_type(L,(n))==5) #define lua_isnil(L,n)(lua_type(L,(n))==0) #define lua_isboolean(L,n)(lua_type(L,(n))==1) #define lua_isnone(L,n)(lua_type(L,(n))==(-1)) #define lua_isnoneornil(L,n)(lua_type(L,(n))<=0) #define lua_pushliteral(L,s)lua_pushlstring(L,""s,(sizeof(s)/sizeof(char))-1) #define lua_setglobal(L,s)lua_setfield(L,(-10002),(s)) #define lua_tostring(L,i)lua_tolstring(L,(i),NULL) typedef struct lua_Debug lua_Debug; typedef void(*lua_Hook)(lua_State*L,lua_Debug*ar); struct lua_Debug{ int event; const char*name; const char*namewhat; const char*what; const char*source; int currentline; int nups; int linedefined; int lastlinedefined; char short_src[60]; int i_ci; }; typedef unsigned int lu_int32; typedef size_t lu_mem; typedef ptrdiff_t l_mem; typedef unsigned char lu_byte; #define IntPoint(p)((unsigned int)(lu_mem)(p)) typedef union{double u;void*s;long l;}L_Umaxalign; typedef double l_uacNumber; #define check_exp(c,e)(e) #define UNUSED(x)((void)(x)) #define cast(t,exp)((t)(exp)) #define cast_byte(i)cast(lu_byte,(i)) #define cast_num(i)cast(lua_Number,(i)) #define cast_int(i)cast(int,(i)) typedef lu_int32 Instruction; #define condhardstacktests(x)((void)0) typedef union GCObject GCObject; typedef struct GCheader{ GCObject*next;lu_byte tt;lu_byte marked; }GCheader; typedef union{ GCObject*gc; void*p; lua_Number n; int b; }Value; typedef struct lua_TValue{ Value value;int tt; }TValue; #define ttisnil(o)(ttype(o)==0) #define ttisnumber(o)(ttype(o)==3) #define ttisstring(o)(ttype(o)==4) #define ttistable(o)(ttype(o)==5) #define ttisfunction(o)(ttype(o)==6) #define ttisboolean(o)(ttype(o)==1) #define ttisuserdata(o)(ttype(o)==7) #define ttisthread(o)(ttype(o)==8) #define ttislightuserdata(o)(ttype(o)==2) #define ttype(o)((o)->tt) #define gcvalue(o)check_exp(iscollectable(o),(o)->value.gc) #define pvalue(o)check_exp(ttislightuserdata(o),(o)->value.p) #define nvalue(o)check_exp(ttisnumber(o),(o)->value.n) #define rawtsvalue(o)check_exp(ttisstring(o),&(o)->value.gc->ts) #define tsvalue(o)(&rawtsvalue(o)->tsv) #define rawuvalue(o)check_exp(ttisuserdata(o),&(o)->value.gc->u) #define uvalue(o)(&rawuvalue(o)->uv) #define clvalue(o)check_exp(ttisfunction(o),&(o)->value.gc->cl) #define hvalue(o)check_exp(ttistable(o),&(o)->value.gc->h) #define bvalue(o)check_exp(ttisboolean(o),(o)->value.b) #define thvalue(o)check_exp(ttisthread(o),&(o)->value.gc->th) #define l_isfalse(o)(ttisnil(o)||(ttisboolean(o)&&bvalue(o)==0)) #define checkconsistency(obj) #define checkliveness(g,obj) #define setnilvalue(obj)((obj)->tt=0) #define setnvalue(obj,x){TValue*i_o=(obj);i_o->value.n=(x);i_o->tt=3;} #define setbvalue(obj,x){TValue*i_o=(obj);i_o->value.b=(x);i_o->tt=1;} #define setsvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=4;checkliveness(G(L),i_o);} #define setuvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=7;checkliveness(G(L),i_o);} #define setthvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=8;checkliveness(G(L),i_o);} #define setclvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=6;checkliveness(G(L),i_o);} #define sethvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=5;checkliveness(G(L),i_o);} #define setptvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=(8+1);checkliveness(G(L),i_o);} #define setobj(L,obj1,obj2){const TValue*o2=(obj2);TValue*o1=(obj1);o1->value=o2->value;o1->tt=o2->tt;checkliveness(G(L),o1);} #define setttype(obj,tt)(ttype(obj)=(tt)) #define iscollectable(o)(ttype(o)>=4) typedef TValue*StkId; typedef union TString{ L_Umaxalign dummy; struct{ GCObject*next;lu_byte tt;lu_byte marked; lu_byte reserved; unsigned int hash; size_t len; }tsv; }TString; #define getstr(ts)cast(const char*,(ts)+1) #define svalue(o)getstr(rawtsvalue(o)) typedef union Udata{ L_Umaxalign dummy; struct{ GCObject*next;lu_byte tt;lu_byte marked; struct Table*metatable; struct Table*env; size_t len; }uv; }Udata; typedef struct Proto{ GCObject*next;lu_byte tt;lu_byte marked; TValue*k; Instruction*code; struct Proto**p; int*lineinfo; struct LocVar*locvars; TString**upvalues; TString*source; int sizeupvalues; int sizek; int sizecode; int sizelineinfo; int sizep; int sizelocvars; int linedefined; int lastlinedefined; GCObject*gclist; lu_byte nups; lu_byte numparams; lu_byte is_vararg; lu_byte maxstacksize; }Proto; typedef struct LocVar{ TString*varname; int startpc; int endpc; }LocVar; typedef struct UpVal{ GCObject*next;lu_byte tt;lu_byte marked; TValue*v; union{ TValue value; struct{ struct UpVal*prev; struct UpVal*next; }l; }u; }UpVal; typedef struct CClosure{ GCObject*next;lu_byte tt;lu_byte marked;lu_byte isC;lu_byte nupvalues;GCObject*gclist;struct Table*env; lua_CFunction f; TValue upvalue[1]; }CClosure; typedef struct LClosure{ GCObject*next;lu_byte tt;lu_byte marked;lu_byte isC;lu_byte nupvalues;GCObject*gclist;struct Table*env; struct Proto*p; UpVal*upvals[1]; }LClosure; typedef union Closure{ CClosure c; LClosure l; }Closure; #define iscfunction(o)(ttype(o)==6&&clvalue(o)->c.isC) typedef union TKey{ struct{ Value value;int tt; struct Node*next; }nk; TValue tvk; }TKey; typedef struct Node{ TValue i_val; TKey i_key; }Node; typedef struct Table{ GCObject*next;lu_byte tt;lu_byte marked; lu_byte flags; lu_byte lsizenode; struct Table*metatable; TValue*array; Node*node; Node*lastfree; GCObject*gclist; int sizearray; }Table; #define lmod(s,size)(check_exp((size&(size-1))==0,(cast(int,(s)&((size)-1))))) #define twoto(x)((size_t)1<<(x)) #define sizenode(t)(twoto((t)->lsizenode)) static const TValue luaO_nilobject_; #define ceillog2(x)(luaO_log2((x)-1)+1) static int luaO_log2(unsigned int x); #define gfasttm(g,et,e)((et)==NULL?NULL:((et)->flags&(1u<<(e)))?NULL:luaT_gettm(et,e,(g)->tmname[e])) #define fasttm(l,et,e)gfasttm(G(l),et,e) static const TValue*luaT_gettm(Table*events,TMS event,TString*ename); #define luaM_reallocv(L,b,on,n,e)((cast(size_t,(n)+1)<=((size_t)(~(size_t)0)-2)/(e))?luaM_realloc_(L,(b),(on)*(e),(n)*(e)):luaM_toobig(L)) #define luaM_freemem(L,b,s)luaM_realloc_(L,(b),(s),0) #define luaM_free(L,b)luaM_realloc_(L,(b),sizeof(*(b)),0) #define luaM_freearray(L,b,n,t)luaM_reallocv(L,(b),n,0,sizeof(t)) #define luaM_malloc(L,t)luaM_realloc_(L,NULL,0,(t)) #define luaM_new(L,t)cast(t*,luaM_malloc(L,sizeof(t))) #define luaM_newvector(L,n,t)cast(t*,luaM_reallocv(L,NULL,0,n,sizeof(t))) #define luaM_growvector(L,v,nelems,size,t,limit,e)if((nelems)+1>(size))((v)=cast(t*,luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) #define luaM_reallocvector(L,v,oldn,n,t)((v)=cast(t*,luaM_reallocv(L,v,oldn,n,sizeof(t)))) static void*luaM_realloc_(lua_State*L,void*block,size_t oldsize, size_t size); static void*luaM_toobig(lua_State*L); static void*luaM_growaux_(lua_State*L,void*block,int*size, size_t size_elem,int limit, const char*errormsg); typedef struct Zio ZIO; #define char2int(c)cast(int,cast(unsigned char,(c))) #define zgetc(z)(((z)->n--)>0?char2int(*(z)->p++):luaZ_fill(z)) typedef struct Mbuffer{ char*buffer; size_t n; size_t buffsize; }Mbuffer; #define luaZ_initbuffer(L,buff)((buff)->buffer=NULL,(buff)->buffsize=0) #define luaZ_buffer(buff)((buff)->buffer) #define luaZ_sizebuffer(buff)((buff)->buffsize) #define luaZ_bufflen(buff)((buff)->n) #define luaZ_resetbuffer(buff)((buff)->n=0) #define luaZ_resizebuffer(L,buff,size)(luaM_reallocvector(L,(buff)->buffer,(buff)->buffsize,size,char),(buff)->buffsize=size) #define luaZ_freebuffer(L,buff)luaZ_resizebuffer(L,buff,0) struct Zio{ size_t n; const char*p; lua_Reader reader; void*data; lua_State*L; }; static int luaZ_fill(ZIO*z); struct lua_longjmp; #define gt(L)(&L->l_gt) #define registry(L)(&G(L)->l_registry) typedef struct stringtable{ GCObject**hash; lu_int32 nuse; int size; }stringtable; typedef struct CallInfo{ StkId base; StkId func; StkId top; const Instruction*savedpc; int nresults; int tailcalls; }CallInfo; #define curr_func(L)(clvalue(L->ci->func)) #define ci_func(ci)(clvalue((ci)->func)) #define f_isLua(ci)(!ci_func(ci)->c.isC) #define isLua(ci)(ttisfunction((ci)->func)&&f_isLua(ci)) typedef struct global_State{ stringtable strt; lua_Alloc frealloc; void*ud; lu_byte currentwhite; lu_byte gcstate; int sweepstrgc; GCObject*rootgc; GCObject**sweepgc; GCObject*gray; GCObject*grayagain; GCObject*weak; GCObject*tmudata; Mbuffer buff; lu_mem GCthreshold; lu_mem totalbytes; lu_mem estimate; lu_mem gcdept; int gcpause; int gcstepmul; lua_CFunction panic; TValue l_registry; struct lua_State*mainthread; UpVal uvhead; struct Table*mt[(8+1)]; TString*tmname[TM_N]; }global_State; struct lua_State{ GCObject*next;lu_byte tt;lu_byte marked; lu_byte status; StkId top; StkId base; global_State*l_G; CallInfo*ci; const Instruction*savedpc; StkId stack_last; StkId stack; CallInfo*end_ci; CallInfo*base_ci; int stacksize; int size_ci; unsigned short nCcalls; unsigned short baseCcalls; lu_byte hookmask; lu_byte allowhook; int basehookcount; int hookcount; lua_Hook hook; TValue l_gt; TValue env; GCObject*openupval; GCObject*gclist; struct lua_longjmp*errorJmp; ptrdiff_t errfunc; }; #define G(L)(L->l_G) union GCObject{ GCheader gch; union TString ts; union Udata u; union Closure cl; struct Table h; struct Proto p; struct UpVal uv; struct lua_State th; }; #define rawgco2ts(o)check_exp((o)->gch.tt==4,&((o)->ts)) #define gco2ts(o)(&rawgco2ts(o)->tsv) #define rawgco2u(o)check_exp((o)->gch.tt==7,&((o)->u)) #define gco2u(o)(&rawgco2u(o)->uv) #define gco2cl(o)check_exp((o)->gch.tt==6,&((o)->cl)) #define gco2h(o)check_exp((o)->gch.tt==5,&((o)->h)) #define gco2p(o)check_exp((o)->gch.tt==(8+1),&((o)->p)) #define gco2uv(o)check_exp((o)->gch.tt==(8+2),&((o)->uv)) #define ngcotouv(o)check_exp((o)==NULL||(o)->gch.tt==(8+2),&((o)->uv)) #define gco2th(o)check_exp((o)->gch.tt==8,&((o)->th)) #define obj2gco(v)(cast(GCObject*,(v))) static void luaE_freethread(lua_State*L,lua_State*L1); #define pcRel(pc,p)(cast(int,(pc)-(p)->code)-1) #define getline_(f,pc)(((f)->lineinfo)?(f)->lineinfo[pc]:0) #define resethookcount(L)(L->hookcount=L->basehookcount) static void luaG_typeerror(lua_State*L,const TValue*o, const char*opname); static void luaG_runerror(lua_State*L,const char*fmt,...); #define luaD_checkstack(L,n)if((char*)L->stack_last-(char*)L->top<=(n)*(int)sizeof(TValue))luaD_growstack(L,n);else condhardstacktests(luaD_reallocstack(L,L->stacksize-5-1)); #define incr_top(L){luaD_checkstack(L,1);L->top++;} #define savestack(L,p)((char*)(p)-(char*)L->stack) #define restorestack(L,n)((TValue*)((char*)L->stack+(n))) #define saveci(L,p)((char*)(p)-(char*)L->base_ci) #define restoreci(L,n)((CallInfo*)((char*)L->base_ci+(n))) typedef void(*Pfunc)(lua_State*L,void*ud); static int luaD_poscall(lua_State*L,StkId firstResult); static void luaD_reallocCI(lua_State*L,int newsize); static void luaD_reallocstack(lua_State*L,int newsize); static void luaD_growstack(lua_State*L,int n); static void luaD_throw(lua_State*L,int errcode); static void*luaM_growaux_(lua_State*L,void*block,int*size,size_t size_elems, int limit,const char*errormsg){ void*newblock; int newsize; if(*size>=limit/2){ if(*size>=limit) luaG_runerror(L,errormsg); newsize=limit; } else{ newsize=(*size)*2; if(newsize<4) newsize=4; } newblock=luaM_reallocv(L,block,*size,newsize,size_elems); *size=newsize; return newblock; } static void*luaM_toobig(lua_State*L){ luaG_runerror(L,"memory allocation error: block too big"); return NULL; } static void*luaM_realloc_(lua_State*L,void*block,size_t osize,size_t nsize){ global_State*g=G(L); block=(*g->frealloc)(g->ud,block,osize,nsize); if(block==NULL&&nsize>0) luaD_throw(L,4); g->totalbytes=(g->totalbytes-osize)+nsize; return block; } #define resetbits(x,m)((x)&=cast(lu_byte,~(m))) #define setbits(x,m)((x)|=(m)) #define testbits(x,m)((x)&(m)) #define bitmask(b)(1<<(b)) #define bit2mask(b1,b2)(bitmask(b1)|bitmask(b2)) #define l_setbit(x,b)setbits(x,bitmask(b)) #define resetbit(x,b)resetbits(x,bitmask(b)) #define testbit(x,b)testbits(x,bitmask(b)) #define set2bits(x,b1,b2)setbits(x,(bit2mask(b1,b2))) #define reset2bits(x,b1,b2)resetbits(x,(bit2mask(b1,b2))) #define test2bits(x,b1,b2)testbits(x,(bit2mask(b1,b2))) #define iswhite(x)test2bits((x)->gch.marked,0,1) #define isblack(x)testbit((x)->gch.marked,2) #define isgray(x)(!isblack(x)&&!iswhite(x)) #define otherwhite(g)(g->currentwhite^bit2mask(0,1)) #define isdead(g,v)((v)->gch.marked&otherwhite(g)&bit2mask(0,1)) #define changewhite(x)((x)->gch.marked^=bit2mask(0,1)) #define gray2black(x)l_setbit((x)->gch.marked,2) #define valiswhite(x)(iscollectable(x)&&iswhite(gcvalue(x))) #define luaC_white(g)cast(lu_byte,(g)->currentwhite&bit2mask(0,1)) #define luaC_checkGC(L){condhardstacktests(luaD_reallocstack(L,L->stacksize-5-1));if(G(L)->totalbytes>=G(L)->GCthreshold)luaC_step(L);} #define luaC_barrier(L,p,v){if(valiswhite(v)&&isblack(obj2gco(p)))luaC_barrierf(L,obj2gco(p),gcvalue(v));} #define luaC_barriert(L,t,v){if(valiswhite(v)&&isblack(obj2gco(t)))luaC_barrierback(L,t);} #define luaC_objbarrier(L,p,o){if(iswhite(obj2gco(o))&&isblack(obj2gco(p)))luaC_barrierf(L,obj2gco(p),obj2gco(o));} #define luaC_objbarriert(L,t,o){if(iswhite(obj2gco(o))&&isblack(obj2gco(t)))luaC_barrierback(L,t);} static void luaC_step(lua_State*L); static void luaC_link(lua_State*L,GCObject*o,lu_byte tt); static void luaC_linkupval(lua_State*L,UpVal*uv); static void luaC_barrierf(lua_State*L,GCObject*o,GCObject*v); static void luaC_barrierback(lua_State*L,Table*t); #define sizestring(s)(sizeof(union TString)+((s)->len+1)*sizeof(char)) #define sizeudata(u)(sizeof(union Udata)+(u)->len) #define luaS_new(L,s)(luaS_newlstr(L,s,strlen(s))) #define luaS_newliteral(L,s)(luaS_newlstr(L,""s,(sizeof(s)/sizeof(char))-1)) #define luaS_fix(s)l_setbit((s)->tsv.marked,5) static TString*luaS_newlstr(lua_State*L,const char*str,size_t l); #define tostring(L,o)((ttype(o)==4)||(luaV_tostring(L,o))) #define tonumber(o,n)(ttype(o)==3||(((o)=luaV_tonumber(o,n))!=NULL)) #define equalobj(L,o1,o2)(ttype(o1)==ttype(o2)&&luaV_equalval(L,o1,o2)) static int luaV_equalval(lua_State*L,const TValue*t1,const TValue*t2); static const TValue*luaV_tonumber(const TValue*obj,TValue*n); static int luaV_tostring(lua_State*L,StkId obj); static void luaV_execute(lua_State*L,int nexeccalls); static void luaV_concat(lua_State*L,int total,int last); static const TValue luaO_nilobject_={{NULL},0}; static int luaO_int2fb(unsigned int x){ int e=0; while(x>=16){ x=(x+1)>>1; e++; } if(x<8)return x; else return((e+1)<<3)|(cast_int(x)-8); } static int luaO_fb2int(int x){ int e=(x>>3)&31; if(e==0)return x; else return((x&7)+8)<<(e-1); } static int luaO_log2(unsigned int x){ static const lu_byte log_2[256]={ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 }; int l=-1; while(x>=256){l+=8;x>>=8;} return l+log_2[x]; } static int luaO_rawequalObj(const TValue*t1,const TValue*t2){ if(ttype(t1)!=ttype(t2))return 0; else switch(ttype(t1)){ case 0: return 1; case 3: return luai_numeq(nvalue(t1),nvalue(t2)); case 1: return bvalue(t1)==bvalue(t2); case 2: return pvalue(t1)==pvalue(t2); default: return gcvalue(t1)==gcvalue(t2); } } static int luaO_str2d(const char*s,lua_Number*result){ char*endptr; *result=lua_str2number(s,&endptr); if(endptr==s)return 0; if(*endptr=='x'||*endptr=='X') *result=cast_num(strtoul(s,&endptr,16)); if(*endptr=='\0')return 1; while(isspace(cast(unsigned char,*endptr)))endptr++; if(*endptr!='\0')return 0; return 1; } static void pushstr(lua_State*L,const char*str){ setsvalue(L,L->top,luaS_new(L,str)); incr_top(L); } static const char*luaO_pushvfstring(lua_State*L,const char*fmt,va_list argp){ int n=1; pushstr(L,""); for(;;){ const char*e=strchr(fmt,'%'); if(e==NULL)break; setsvalue(L,L->top,luaS_newlstr(L,fmt,e-fmt)); incr_top(L); switch(*(e+1)){ case's':{ const char*s=va_arg(argp,char*); if(s==NULL)s="(null)"; pushstr(L,s); break; } case'c':{ char buff[2]; buff[0]=cast(char,va_arg(argp,int)); buff[1]='\0'; pushstr(L,buff); break; } case'd':{ setnvalue(L->top,cast_num(va_arg(argp,int))); incr_top(L); break; } case'f':{ setnvalue(L->top,cast_num(va_arg(argp,l_uacNumber))); incr_top(L); break; } case'p':{ char buff[4*sizeof(void*)+8]; sprintf(buff,"%p",va_arg(argp,void*)); pushstr(L,buff); break; } case'%':{ pushstr(L,"%"); break; } default:{ char buff[3]; buff[0]='%'; buff[1]=*(e+1); buff[2]='\0'; pushstr(L,buff); break; } } n+=2; fmt=e+2; } pushstr(L,fmt); luaV_concat(L,n+1,cast_int(L->top-L->base)-1); L->top-=n; return svalue(L->top-1); } static const char*luaO_pushfstring(lua_State*L,const char*fmt,...){ const char*msg; va_list argp; va_start(argp,fmt); msg=luaO_pushvfstring(L,fmt,argp); va_end(argp); return msg; } static void luaO_chunkid(char*out,const char*source,size_t bufflen){ if(*source=='='){ strncpy(out,source+1,bufflen); out[bufflen-1]='\0'; } else{ if(*source=='@'){ size_t l; source++; bufflen-=sizeof(" '...' "); l=strlen(source); strcpy(out,""); if(l>bufflen){ source+=(l-bufflen); strcat(out,"..."); } strcat(out,source); } else{ size_t len=strcspn(source,"\n\r"); bufflen-=sizeof(" [string \"...\"] "); if(len>bufflen)len=bufflen; strcpy(out,"[string \""); if(source[len]!='\0'){ strncat(out,source,len); strcat(out,"..."); } else strcat(out,source); strcat(out,"\"]"); } } } #define gnode(t,i)(&(t)->node[i]) #define gkey(n)(&(n)->i_key.nk) #define gval(n)(&(n)->i_val) #define gnext(n)((n)->i_key.nk.next) #define key2tval(n)(&(n)->i_key.tvk) static TValue*luaH_setnum(lua_State*L,Table*t,int key); static const TValue*luaH_getstr(Table*t,TString*key); static TValue*luaH_set(lua_State*L,Table*t,const TValue*key); static const char*const luaT_typenames[]={ "nil","boolean","userdata","number", "string","table","function","userdata","thread", "proto","upval" }; static void luaT_init(lua_State*L){ static const char*const luaT_eventname[]={ "__index","__newindex", "__gc","__mode","__eq", "__add","__sub","__mul","__div","__mod", "__pow","__unm","__len","__lt","__le", "__concat","__call" }; int i; for(i=0;itmname[i]=luaS_new(L,luaT_eventname[i]); luaS_fix(G(L)->tmname[i]); } } static const TValue*luaT_gettm(Table*events,TMS event,TString*ename){ const TValue*tm=luaH_getstr(events,ename); if(ttisnil(tm)){ events->flags|=cast_byte(1u<metatable; break; case 7: mt=uvalue(o)->metatable; break; default: mt=G(L)->mt[ttype(o)]; } return(mt?luaH_getstr(mt,G(L)->tmname[event]):(&luaO_nilobject_)); } #define sizeCclosure(n)(cast(int,sizeof(CClosure))+cast(int,sizeof(TValue)*((n)-1))) #define sizeLclosure(n)(cast(int,sizeof(LClosure))+cast(int,sizeof(TValue*)*((n)-1))) static Closure*luaF_newCclosure(lua_State*L,int nelems,Table*e){ Closure*c=cast(Closure*,luaM_malloc(L,sizeCclosure(nelems))); luaC_link(L,obj2gco(c),6); c->c.isC=1; c->c.env=e; c->c.nupvalues=cast_byte(nelems); return c; } static Closure*luaF_newLclosure(lua_State*L,int nelems,Table*e){ Closure*c=cast(Closure*,luaM_malloc(L,sizeLclosure(nelems))); luaC_link(L,obj2gco(c),6); c->l.isC=0; c->l.env=e; c->l.nupvalues=cast_byte(nelems); while(nelems--)c->l.upvals[nelems]=NULL; return c; } static UpVal*luaF_newupval(lua_State*L){ UpVal*uv=luaM_new(L,UpVal); luaC_link(L,obj2gco(uv),(8+2)); uv->v=&uv->u.value; setnilvalue(uv->v); return uv; } static UpVal*luaF_findupval(lua_State*L,StkId level){ global_State*g=G(L); GCObject**pp=&L->openupval; UpVal*p; UpVal*uv; while(*pp!=NULL&&(p=ngcotouv(*pp))->v>=level){ if(p->v==level){ if(isdead(g,obj2gco(p))) changewhite(obj2gco(p)); return p; } pp=&p->next; } uv=luaM_new(L,UpVal); uv->tt=(8+2); uv->marked=luaC_white(g); uv->v=level; uv->next=*pp; *pp=obj2gco(uv); uv->u.l.prev=&g->uvhead; uv->u.l.next=g->uvhead.u.l.next; uv->u.l.next->u.l.prev=uv; g->uvhead.u.l.next=uv; return uv; } static void unlinkupval(UpVal*uv){ uv->u.l.next->u.l.prev=uv->u.l.prev; uv->u.l.prev->u.l.next=uv->u.l.next; } static void luaF_freeupval(lua_State*L,UpVal*uv){ if(uv->v!=&uv->u.value) unlinkupval(uv); luaM_free(L,uv); } static void luaF_close(lua_State*L,StkId level){ UpVal*uv; global_State*g=G(L); while(L->openupval!=NULL&&(uv=ngcotouv(L->openupval))->v>=level){ GCObject*o=obj2gco(uv); L->openupval=uv->next; if(isdead(g,o)) luaF_freeupval(L,uv); else{ unlinkupval(uv); setobj(L,&uv->u.value,uv->v); uv->v=&uv->u.value; luaC_linkupval(L,uv); } } } static Proto*luaF_newproto(lua_State*L){ Proto*f=luaM_new(L,Proto); luaC_link(L,obj2gco(f),(8+1)); f->k=NULL; f->sizek=0; f->p=NULL; f->sizep=0; f->code=NULL; f->sizecode=0; f->sizelineinfo=0; f->sizeupvalues=0; f->nups=0; f->upvalues=NULL; f->numparams=0; f->is_vararg=0; f->maxstacksize=0; f->lineinfo=NULL; f->sizelocvars=0; f->locvars=NULL; f->linedefined=0; f->lastlinedefined=0; f->source=NULL; return f; } static void luaF_freeproto(lua_State*L,Proto*f){ luaM_freearray(L,f->code,f->sizecode,Instruction); luaM_freearray(L,f->p,f->sizep,Proto*); luaM_freearray(L,f->k,f->sizek,TValue); luaM_freearray(L,f->lineinfo,f->sizelineinfo,int); luaM_freearray(L,f->locvars,f->sizelocvars,struct LocVar); luaM_freearray(L,f->upvalues,f->sizeupvalues,TString*); luaM_free(L,f); } static void luaF_freeclosure(lua_State*L,Closure*c){ int size=(c->c.isC)?sizeCclosure(c->c.nupvalues): sizeLclosure(c->l.nupvalues); luaM_freemem(L,c,size); } #define MASK1(n,p)((~((~(Instruction)0)<>0)&MASK1(6,0))) #define SET_OPCODE(i,o)((i)=(((i)&MASK0(6,0))|((cast(Instruction,o)<<0)&MASK1(6,0)))) #define GETARG_A(i)(cast(int,((i)>>(0+6))&MASK1(8,0))) #define SETARG_A(i,u)((i)=(((i)&MASK0(8,(0+6)))|((cast(Instruction,u)<<(0+6))&MASK1(8,(0+6))))) #define GETARG_B(i)(cast(int,((i)>>(((0+6)+8)+9))&MASK1(9,0))) #define SETARG_B(i,b)((i)=(((i)&MASK0(9,(((0+6)+8)+9)))|((cast(Instruction,b)<<(((0+6)+8)+9))&MASK1(9,(((0+6)+8)+9))))) #define GETARG_C(i)(cast(int,((i)>>((0+6)+8))&MASK1(9,0))) #define SETARG_C(i,b)((i)=(((i)&MASK0(9,((0+6)+8)))|((cast(Instruction,b)<<((0+6)+8))&MASK1(9,((0+6)+8))))) #define GETARG_Bx(i)(cast(int,((i)>>((0+6)+8))&MASK1((9+9),0))) #define SETARG_Bx(i,b)((i)=(((i)&MASK0((9+9),((0+6)+8)))|((cast(Instruction,b)<<((0+6)+8))&MASK1((9+9),((0+6)+8))))) #define GETARG_sBx(i)(GETARG_Bx(i)-(((1<<(9+9))-1)>>1)) #define SETARG_sBx(i,b)SETARG_Bx((i),cast(unsigned int,(b)+(((1<<(9+9))-1)>>1))) #define CREATE_ABC(o,a,b,c)((cast(Instruction,o)<<0)|(cast(Instruction,a)<<(0+6))|(cast(Instruction,b)<<(((0+6)+8)+9))|(cast(Instruction,c)<<((0+6)+8))) #define CREATE_ABx(o,a,bc)((cast(Instruction,o)<<0)|(cast(Instruction,a)<<(0+6))|(cast(Instruction,bc)<<((0+6)+8))) #define ISK(x)((x)&(1<<(9-1))) #define INDEXK(r)((int)(r)&~(1<<(9-1))) #define RKASK(x)((x)|(1<<(9-1))) static const lu_byte luaP_opmodes[(cast(int,OP_VARARG)+1)]; #define getBMode(m)(cast(enum OpArgMask,(luaP_opmodes[m]>>4)&3)) #define getCMode(m)(cast(enum OpArgMask,(luaP_opmodes[m]>>2)&3)) #define testTMode(m)(luaP_opmodes[m]&(1<<7)) typedef struct expdesc{ expkind k; union{ struct{int info,aux;}s; lua_Number nval; }u; int t; int f; }expdesc; typedef struct upvaldesc{ lu_byte k; lu_byte info; }upvaldesc; struct BlockCnt; typedef struct FuncState{ Proto*f; Table*h; struct FuncState*prev; struct LexState*ls; struct lua_State*L; struct BlockCnt*bl; int pc; int lasttarget; int jpc; int freereg; int nk; int np; short nlocvars; lu_byte nactvar; upvaldesc upvalues[60]; unsigned short actvar[200]; }FuncState; static Proto*luaY_parser(lua_State*L,ZIO*z,Mbuffer*buff, const char*name); struct lua_longjmp{ struct lua_longjmp*previous; jmp_buf b; volatile int status; }; static void luaD_seterrorobj(lua_State*L,int errcode,StkId oldtop){ switch(errcode){ case 4:{ setsvalue(L,oldtop,luaS_newliteral(L,"not enough memory")); break; } case 5:{ setsvalue(L,oldtop,luaS_newliteral(L,"error in error handling")); break; } case 3: case 2:{ setobj(L,oldtop,L->top-1); break; } } L->top=oldtop+1; } static void restore_stack_limit(lua_State*L){ if(L->size_ci>20000){ int inuse=cast_int(L->ci-L->base_ci); if(inuse+1<20000) luaD_reallocCI(L,20000); } } static void resetstack(lua_State*L,int status){ L->ci=L->base_ci; L->base=L->ci->base; luaF_close(L,L->base); luaD_seterrorobj(L,status,L->base); L->nCcalls=L->baseCcalls; L->allowhook=1; restore_stack_limit(L); L->errfunc=0; L->errorJmp=NULL; } static void luaD_throw(lua_State*L,int errcode){ if(L->errorJmp){ L->errorJmp->status=errcode; LUAI_THROW(L,L->errorJmp); } else{ L->status=cast_byte(errcode); if(G(L)->panic){ resetstack(L,errcode); G(L)->panic(L); } exit(EXIT_FAILURE); } } static int luaD_rawrunprotected(lua_State*L,Pfunc f,void*ud){ struct lua_longjmp lj; lj.status=0; lj.previous=L->errorJmp; L->errorJmp=&lj; LUAI_TRY(L,&lj, (*f)(L,ud); ); L->errorJmp=lj.previous; return lj.status; } static void correctstack(lua_State*L,TValue*oldstack){ CallInfo*ci; GCObject*up; L->top=(L->top-oldstack)+L->stack; for(up=L->openupval;up!=NULL;up=up->gch.next) gco2uv(up)->v=(gco2uv(up)->v-oldstack)+L->stack; for(ci=L->base_ci;ci<=L->ci;ci++){ ci->top=(ci->top-oldstack)+L->stack; ci->base=(ci->base-oldstack)+L->stack; ci->func=(ci->func-oldstack)+L->stack; } L->base=(L->base-oldstack)+L->stack; } static void luaD_reallocstack(lua_State*L,int newsize){ TValue*oldstack=L->stack; int realsize=newsize+1+5; luaM_reallocvector(L,L->stack,L->stacksize,realsize,TValue); L->stacksize=realsize; L->stack_last=L->stack+newsize; correctstack(L,oldstack); } static void luaD_reallocCI(lua_State*L,int newsize){ CallInfo*oldci=L->base_ci; luaM_reallocvector(L,L->base_ci,L->size_ci,newsize,CallInfo); L->size_ci=newsize; L->ci=(L->ci-oldci)+L->base_ci; L->end_ci=L->base_ci+L->size_ci-1; } static void luaD_growstack(lua_State*L,int n){ if(n<=L->stacksize) luaD_reallocstack(L,2*L->stacksize); else luaD_reallocstack(L,L->stacksize+n); } static CallInfo*growCI(lua_State*L){ if(L->size_ci>20000) luaD_throw(L,5); else{ luaD_reallocCI(L,2*L->size_ci); if(L->size_ci>20000) luaG_runerror(L,"stack overflow"); } return++L->ci; } static StkId adjust_varargs(lua_State*L,Proto*p,int actual){ int i; int nfixargs=p->numparams; Table*htab=NULL; StkId base,fixed; for(;actualtop++); fixed=L->top-actual; base=L->top; for(i=0;itop++,fixed+i); setnilvalue(fixed+i); } if(htab){ sethvalue(L,L->top++,htab); } return base; } static StkId tryfuncTM(lua_State*L,StkId func){ const TValue*tm=luaT_gettmbyobj(L,func,TM_CALL); StkId p; ptrdiff_t funcr=savestack(L,func); if(!ttisfunction(tm)) luaG_typeerror(L,func,"call"); for(p=L->top;p>func;p--)setobj(L,p,p-1); incr_top(L); func=restorestack(L,funcr); setobj(L,func,tm); return func; } #define inc_ci(L)((L->ci==L->end_ci)?growCI(L):(condhardstacktests(luaD_reallocCI(L,L->size_ci)),++L->ci)) static int luaD_precall(lua_State*L,StkId func,int nresults){ LClosure*cl; ptrdiff_t funcr; if(!ttisfunction(func)) func=tryfuncTM(L,func); funcr=savestack(L,func); cl=&clvalue(func)->l; L->ci->savedpc=L->savedpc; if(!cl->isC){ CallInfo*ci; StkId st,base; Proto*p=cl->p; luaD_checkstack(L,p->maxstacksize); func=restorestack(L,funcr); if(!p->is_vararg){ base=func+1; if(L->top>base+p->numparams) L->top=base+p->numparams; } else{ int nargs=cast_int(L->top-func)-1; base=adjust_varargs(L,p,nargs); func=restorestack(L,funcr); } ci=inc_ci(L); ci->func=func; L->base=ci->base=base; ci->top=L->base+p->maxstacksize; L->savedpc=p->code; ci->tailcalls=0; ci->nresults=nresults; for(st=L->top;sttop;st++) setnilvalue(st); L->top=ci->top; return 0; } else{ CallInfo*ci; int n; luaD_checkstack(L,20); ci=inc_ci(L); ci->func=restorestack(L,funcr); L->base=ci->base=ci->func+1; ci->top=L->top+20; ci->nresults=nresults; n=(*curr_func(L)->c.f)(L); if(n<0) return 2; else{ luaD_poscall(L,L->top-n); return 1; } } } static int luaD_poscall(lua_State*L,StkId firstResult){ StkId res; int wanted,i; CallInfo*ci; ci=L->ci--; res=ci->func; wanted=ci->nresults; L->base=(ci-1)->base; L->savedpc=(ci-1)->savedpc; for(i=wanted;i!=0&&firstResulttop;i--) setobj(L,res++,firstResult++); while(i-->0) setnilvalue(res++); L->top=res; return(wanted-(-1)); } static void luaD_call(lua_State*L,StkId func,int nResults){ if(++L->nCcalls>=200){ if(L->nCcalls==200) luaG_runerror(L,"C stack overflow"); else if(L->nCcalls>=(200+(200>>3))) luaD_throw(L,5); } if(luaD_precall(L,func,nResults)==0) luaV_execute(L,1); L->nCcalls--; luaC_checkGC(L); } static int luaD_pcall(lua_State*L,Pfunc func,void*u, ptrdiff_t old_top,ptrdiff_t ef){ int status; unsigned short oldnCcalls=L->nCcalls; ptrdiff_t old_ci=saveci(L,L->ci); lu_byte old_allowhooks=L->allowhook; ptrdiff_t old_errfunc=L->errfunc; L->errfunc=ef; status=luaD_rawrunprotected(L,func,u); if(status!=0){ StkId oldtop=restorestack(L,old_top); luaF_close(L,oldtop); luaD_seterrorobj(L,status,oldtop); L->nCcalls=oldnCcalls; L->ci=restoreci(L,old_ci); L->base=L->ci->base; L->savedpc=L->ci->savedpc; L->allowhook=old_allowhooks; restore_stack_limit(L); } L->errfunc=old_errfunc; return status; } struct SParser{ ZIO*z; Mbuffer buff; const char*name; }; static void f_parser(lua_State*L,void*ud){ int i; Proto*tf; Closure*cl; struct SParser*p=cast(struct SParser*,ud); luaC_checkGC(L); tf=luaY_parser(L,p->z, &p->buff,p->name); cl=luaF_newLclosure(L,tf->nups,hvalue(gt(L))); cl->l.p=tf; for(i=0;inups;i++) cl->l.upvals[i]=luaF_newupval(L); setclvalue(L,L->top,cl); incr_top(L); } static int luaD_protectedparser(lua_State*L,ZIO*z,const char*name){ struct SParser p; int status; p.z=z;p.name=name; luaZ_initbuffer(L,&p.buff); status=luaD_pcall(L,f_parser,&p,savestack(L,L->top),L->errfunc); luaZ_freebuffer(L,&p.buff); return status; } static void luaS_resize(lua_State*L,int newsize){ GCObject**newhash; stringtable*tb; int i; if(G(L)->gcstate==2) return; newhash=luaM_newvector(L,newsize,GCObject*); tb=&G(L)->strt; for(i=0;isize;i++){ GCObject*p=tb->hash[i]; while(p){ GCObject*next=p->gch.next; unsigned int h=gco2ts(p)->hash; int h1=lmod(h,newsize); p->gch.next=newhash[h1]; newhash[h1]=p; p=next; } } luaM_freearray(L,tb->hash,tb->size,TString*); tb->size=newsize; tb->hash=newhash; } static TString*newlstr(lua_State*L,const char*str,size_t l, unsigned int h){ TString*ts; stringtable*tb; if(l+1>(((size_t)(~(size_t)0)-2)-sizeof(TString))/sizeof(char)) luaM_toobig(L); ts=cast(TString*,luaM_malloc(L,(l+1)*sizeof(char)+sizeof(TString))); ts->tsv.len=l; ts->tsv.hash=h; ts->tsv.marked=luaC_white(G(L)); ts->tsv.tt=4; ts->tsv.reserved=0; memcpy(ts+1,str,l*sizeof(char)); ((char*)(ts+1))[l]='\0'; tb=&G(L)->strt; h=lmod(h,tb->size); ts->tsv.next=tb->hash[h]; tb->hash[h]=obj2gco(ts); tb->nuse++; if(tb->nuse>cast(lu_int32,tb->size)&&tb->size<=(INT_MAX-2)/2) luaS_resize(L,tb->size*2); return ts; } static TString*luaS_newlstr(lua_State*L,const char*str,size_t l){ GCObject*o; unsigned int h=cast(unsigned int,l); size_t step=(l>>5)+1; size_t l1; for(l1=l;l1>=step;l1-=step) h=h^((h<<5)+(h>>2)+cast(unsigned char,str[l1-1])); for(o=G(L)->strt.hash[lmod(h,G(L)->strt.size)]; o!=NULL; o=o->gch.next){ TString*ts=rawgco2ts(o); if(ts->tsv.len==l&&(memcmp(str,getstr(ts),l)==0)){ if(isdead(G(L),o))changewhite(o); return ts; } } return newlstr(L,str,l,h); } static Udata*luaS_newudata(lua_State*L,size_t s,Table*e){ Udata*u; if(s>((size_t)(~(size_t)0)-2)-sizeof(Udata)) luaM_toobig(L); u=cast(Udata*,luaM_malloc(L,s+sizeof(Udata))); u->uv.marked=luaC_white(G(L)); u->uv.tt=7; u->uv.len=s; u->uv.metatable=NULL; u->uv.env=e; u->uv.next=G(L)->mainthread->next; G(L)->mainthread->next=obj2gco(u); return u; } #define hashpow2(t,n)(gnode(t,lmod((n),sizenode(t)))) #define hashstr(t,str)hashpow2(t,(str)->tsv.hash) #define hashboolean(t,p)hashpow2(t,p) #define hashmod(t,n)(gnode(t,((n)%((sizenode(t)-1)|1)))) #define hashpointer(t,p)hashmod(t,IntPoint(p)) static const Node dummynode_={ {{NULL},0}, {{{NULL},0,NULL}} }; static Node*hashnum(const Table*t,lua_Number n){ unsigned int a[cast_int(sizeof(lua_Number)/sizeof(int))]; int i; if(luai_numeq(n,0)) return gnode(t,0); memcpy(a,&n,sizeof(a)); for(i=1;isizearray) return i-1; else{ Node*n=mainposition(t,key); do{ if(luaO_rawequalObj(key2tval(n),key)|| (ttype(gkey(n))==(8+3)&&iscollectable(key)&& gcvalue(gkey(n))==gcvalue(key))){ i=cast_int(n-gnode(t,0)); return i+t->sizearray; } else n=gnext(n); }while(n); luaG_runerror(L,"invalid key to "LUA_QL("next")); return 0; } } static int luaH_next(lua_State*L,Table*t,StkId key){ int i=findindex(L,t,key); for(i++;isizearray;i++){ if(!ttisnil(&t->array[i])){ setnvalue(key,cast_num(i+1)); setobj(L,key+1,&t->array[i]); return 1; } } for(i-=t->sizearray;i<(int)sizenode(t);i++){ if(!ttisnil(gval(gnode(t,i)))){ setobj(L,key,key2tval(gnode(t,i))); setobj(L,key+1,gval(gnode(t,i))); return 1; } } return 0; } static int computesizes(int nums[],int*narray){ int i; int twotoi; int a=0; int na=0; int n=0; for(i=0,twotoi=1;twotoi/2<*narray;i++,twotoi*=2){ if(nums[i]>0){ a+=nums[i]; if(a>twotoi/2){ n=twotoi; na=a; } } if(a==*narray)break; } *narray=n; return na; } static int countint(const TValue*key,int*nums){ int k=arrayindex(key); if(0t->sizearray){ lim=t->sizearray; if(i>lim) break; } for(;i<=lim;i++){ if(!ttisnil(&t->array[i-1])) lc++; } nums[lg]+=lc; ause+=lc; } return ause; } static int numusehash(const Table*t,int*nums,int*pnasize){ int totaluse=0; int ause=0; int i=sizenode(t); while(i--){ Node*n=&t->node[i]; if(!ttisnil(gval(n))){ ause+=countint(key2tval(n),nums); totaluse++; } } *pnasize+=ause; return totaluse; } static void setarrayvector(lua_State*L,Table*t,int size){ int i; luaM_reallocvector(L,t->array,t->sizearray,size,TValue); for(i=t->sizearray;iarray[i]); t->sizearray=size; } static void setnodevector(lua_State*L,Table*t,int size){ int lsize; if(size==0){ t->node=cast(Node*,(&dummynode_)); lsize=0; } else{ int i; lsize=ceillog2(size); if(lsize>(32-2)) luaG_runerror(L,"table overflow"); size=twoto(lsize); t->node=luaM_newvector(L,size,Node); for(i=0;ilsizenode=cast_byte(lsize); t->lastfree=gnode(t,size); } static void resize(lua_State*L,Table*t,int nasize,int nhsize){ int i; int oldasize=t->sizearray; int oldhsize=t->lsizenode; Node*nold=t->node; if(nasize>oldasize) setarrayvector(L,t,nasize); setnodevector(L,t,nhsize); if(nasizesizearray=nasize; for(i=nasize;iarray[i])) setobj(L,luaH_setnum(L,t,i+1),&t->array[i]); } luaM_reallocvector(L,t->array,oldasize,nasize,TValue); } for(i=twoto(oldhsize)-1;i>=0;i--){ Node*old=nold+i; if(!ttisnil(gval(old))) setobj(L,luaH_set(L,t,key2tval(old)),gval(old)); } if(nold!=(&dummynode_)) luaM_freearray(L,nold,twoto(oldhsize),Node); } static void luaH_resizearray(lua_State*L,Table*t,int nasize){ int nsize=(t->node==(&dummynode_))?0:sizenode(t); resize(L,t,nasize,nsize); } static void rehash(lua_State*L,Table*t,const TValue*ek){ int nasize,na; int nums[(32-2)+1]; int i; int totaluse; for(i=0;i<=(32-2);i++)nums[i]=0; nasize=numusearray(t,nums); totaluse=nasize; totaluse+=numusehash(t,nums,&nasize); nasize+=countint(ek,nums); totaluse++; na=computesizes(nums,&nasize); resize(L,t,nasize,totaluse-na); } static Table*luaH_new(lua_State*L,int narray,int nhash){ Table*t=luaM_new(L,Table); luaC_link(L,obj2gco(t),5); t->metatable=NULL; t->flags=cast_byte(~0); t->array=NULL; t->sizearray=0; t->lsizenode=0; t->node=cast(Node*,(&dummynode_)); setarrayvector(L,t,narray); setnodevector(L,t,nhash); return t; } static void luaH_free(lua_State*L,Table*t){ if(t->node!=(&dummynode_)) luaM_freearray(L,t->node,sizenode(t),Node); luaM_freearray(L,t->array,t->sizearray,TValue); luaM_free(L,t); } static Node*getfreepos(Table*t){ while(t->lastfree-->t->node){ if(ttisnil(gkey(t->lastfree))) return t->lastfree; } return NULL; } static TValue*newkey(lua_State*L,Table*t,const TValue*key){ Node*mp=mainposition(t,key); if(!ttisnil(gval(mp))||mp==(&dummynode_)){ Node*othern; Node*n=getfreepos(t); if(n==NULL){ rehash(L,t,key); return luaH_set(L,t,key); } othern=mainposition(t,key2tval(mp)); if(othern!=mp){ while(gnext(othern)!=mp)othern=gnext(othern); gnext(othern)=n; *n=*mp; gnext(mp)=NULL; setnilvalue(gval(mp)); } else{ gnext(n)=gnext(mp); gnext(mp)=n; mp=n; } } gkey(mp)->value=key->value;gkey(mp)->tt=key->tt; luaC_barriert(L,t,key); return gval(mp); } static const TValue*luaH_getnum(Table*t,int key){ if(cast(unsigned int,key-1)sizearray)) return&t->array[key-1]; else{ lua_Number nk=cast_num(key); Node*n=hashnum(t,nk); do{ if(ttisnumber(gkey(n))&&luai_numeq(nvalue(gkey(n)),nk)) return gval(n); else n=gnext(n); }while(n); return(&luaO_nilobject_); } } static const TValue*luaH_getstr(Table*t,TString*key){ Node*n=hashstr(t,key); do{ if(ttisstring(gkey(n))&&rawtsvalue(gkey(n))==key) return gval(n); else n=gnext(n); }while(n); return(&luaO_nilobject_); } static const TValue*luaH_get(Table*t,const TValue*key){ switch(ttype(key)){ case 0:return(&luaO_nilobject_); case 4:return luaH_getstr(t,rawtsvalue(key)); case 3:{ int k; lua_Number n=nvalue(key); lua_number2int(k,n); if(luai_numeq(cast_num(k),nvalue(key))) return luaH_getnum(t,k); } default:{ Node*n=mainposition(t,key); do{ if(luaO_rawequalObj(key2tval(n),key)) return gval(n); else n=gnext(n); }while(n); return(&luaO_nilobject_); } } } static TValue*luaH_set(lua_State*L,Table*t,const TValue*key){ const TValue*p=luaH_get(t,key); t->flags=0; if(p!=(&luaO_nilobject_)) return cast(TValue*,p); else{ if(ttisnil(key))luaG_runerror(L,"table index is nil"); else if(ttisnumber(key)&&luai_numisnan(nvalue(key))) luaG_runerror(L,"table index is NaN"); return newkey(L,t,key); } } static TValue*luaH_setnum(lua_State*L,Table*t,int key){ const TValue*p=luaH_getnum(t,key); if(p!=(&luaO_nilobject_)) return cast(TValue*,p); else{ TValue k; setnvalue(&k,cast_num(key)); return newkey(L,t,&k); } } static TValue*luaH_setstr(lua_State*L,Table*t,TString*key){ const TValue*p=luaH_getstr(t,key); if(p!=(&luaO_nilobject_)) return cast(TValue*,p); else{ TValue k; setsvalue(L,&k,key); return newkey(L,t,&k); } } static int unbound_search(Table*t,unsigned int j){ unsigned int i=j; j++; while(!ttisnil(luaH_getnum(t,j))){ i=j; j*=2; if(j>cast(unsigned int,(INT_MAX-2))){ i=1; while(!ttisnil(luaH_getnum(t,i)))i++; return i-1; } } while(j-i>1){ unsigned int m=(i+j)/2; if(ttisnil(luaH_getnum(t,m)))j=m; else i=m; } return i; } static int luaH_getn(Table*t){ unsigned int j=t->sizearray; if(j>0&&ttisnil(&t->array[j-1])){ unsigned int i=0; while(j-i>1){ unsigned int m=(i+j)/2; if(ttisnil(&t->array[m-1]))j=m; else i=m; } return i; } else if(t->node==(&dummynode_)) return j; else return unbound_search(t,j); } #define makewhite(g,x)((x)->gch.marked=cast_byte(((x)->gch.marked&cast_byte(~(bitmask(2)|bit2mask(0,1))))|luaC_white(g))) #define white2gray(x)reset2bits((x)->gch.marked,0,1) #define black2gray(x)resetbit((x)->gch.marked,2) #define stringmark(s)reset2bits((s)->tsv.marked,0,1) #define isfinalized(u)testbit((u)->marked,3) #define markfinalized(u)l_setbit((u)->marked,3) #define markvalue(g,o){checkconsistency(o);if(iscollectable(o)&&iswhite(gcvalue(o)))reallymarkobject(g,gcvalue(o));} #define markobject(g,t){if(iswhite(obj2gco(t)))reallymarkobject(g,obj2gco(t));} #define setthreshold(g)(g->GCthreshold=(g->estimate/100)*g->gcpause) static void removeentry(Node*n){ if(iscollectable(gkey(n))) setttype(gkey(n),(8+3)); } static void reallymarkobject(global_State*g,GCObject*o){ white2gray(o); switch(o->gch.tt){ case 4:{ return; } case 7:{ Table*mt=gco2u(o)->metatable; gray2black(o); if(mt)markobject(g,mt); markobject(g,gco2u(o)->env); return; } case(8+2):{ UpVal*uv=gco2uv(o); markvalue(g,uv->v); if(uv->v==&uv->u.value) gray2black(o); return; } case 6:{ gco2cl(o)->c.gclist=g->gray; g->gray=o; break; } case 5:{ gco2h(o)->gclist=g->gray; g->gray=o; break; } case 8:{ gco2th(o)->gclist=g->gray; g->gray=o; break; } case(8+1):{ gco2p(o)->gclist=g->gray; g->gray=o; break; } default:; } } static void marktmu(global_State*g){ GCObject*u=g->tmudata; if(u){ do{ u=u->gch.next; makewhite(g,u); reallymarkobject(g,u); }while(u!=g->tmudata); } } static size_t luaC_separateudata(lua_State*L,int all){ global_State*g=G(L); size_t deadmem=0; GCObject**p=&g->mainthread->next; GCObject*curr; while((curr=*p)!=NULL){ if(!(iswhite(curr)||all)||isfinalized(gco2u(curr))) p=&curr->gch.next; else if(fasttm(L,gco2u(curr)->metatable,TM_GC)==NULL){ markfinalized(gco2u(curr)); p=&curr->gch.next; } else{ deadmem+=sizeudata(gco2u(curr)); markfinalized(gco2u(curr)); *p=curr->gch.next; if(g->tmudata==NULL) g->tmudata=curr->gch.next=curr; else{ curr->gch.next=g->tmudata->gch.next; g->tmudata->gch.next=curr; g->tmudata=curr; } } } return deadmem; } static int traversetable(global_State*g,Table*h){ int i; int weakkey=0; int weakvalue=0; const TValue*mode; if(h->metatable) markobject(g,h->metatable); mode=gfasttm(g,h->metatable,TM_MODE); if(mode&&ttisstring(mode)){ weakkey=(strchr(svalue(mode),'k')!=NULL); weakvalue=(strchr(svalue(mode),'v')!=NULL); if(weakkey||weakvalue){ h->marked&=~(bitmask(3)|bitmask(4)); h->marked|=cast_byte((weakkey<<3)| (weakvalue<<4)); h->gclist=g->weak; g->weak=obj2gco(h); } } if(weakkey&&weakvalue)return 1; if(!weakvalue){ i=h->sizearray; while(i--) markvalue(g,&h->array[i]); } i=sizenode(h); while(i--){ Node*n=gnode(h,i); if(ttisnil(gval(n))) removeentry(n); else{ if(!weakkey)markvalue(g,gkey(n)); if(!weakvalue)markvalue(g,gval(n)); } } return weakkey||weakvalue; } static void traverseproto(global_State*g,Proto*f){ int i; if(f->source)stringmark(f->source); for(i=0;isizek;i++) markvalue(g,&f->k[i]); for(i=0;isizeupvalues;i++){ if(f->upvalues[i]) stringmark(f->upvalues[i]); } for(i=0;isizep;i++){ if(f->p[i]) markobject(g,f->p[i]); } for(i=0;isizelocvars;i++){ if(f->locvars[i].varname) stringmark(f->locvars[i].varname); } } static void traverseclosure(global_State*g,Closure*cl){ markobject(g,cl->c.env); if(cl->c.isC){ int i; for(i=0;ic.nupvalues;i++) markvalue(g,&cl->c.upvalue[i]); } else{ int i; markobject(g,cl->l.p); for(i=0;il.nupvalues;i++) markobject(g,cl->l.upvals[i]); } } static void checkstacksizes(lua_State*L,StkId max){ int ci_used=cast_int(L->ci-L->base_ci); int s_used=cast_int(max-L->stack); if(L->size_ci>20000) return; if(4*ci_usedsize_ci&&2*8size_ci) luaD_reallocCI(L,L->size_ci/2); condhardstacktests(luaD_reallocCI(L,ci_used+1)); if(4*s_usedstacksize&& 2*((2*20)+5)stacksize) luaD_reallocstack(L,L->stacksize/2); condhardstacktests(luaD_reallocstack(L,s_used)); } static void traversestack(global_State*g,lua_State*l){ StkId o,lim; CallInfo*ci; markvalue(g,gt(l)); lim=l->top; for(ci=l->base_ci;ci<=l->ci;ci++){ if(limtop)lim=ci->top; } for(o=l->stack;otop;o++) markvalue(g,o); for(;o<=lim;o++) setnilvalue(o); checkstacksizes(l,lim); } static l_mem propagatemark(global_State*g){ GCObject*o=g->gray; gray2black(o); switch(o->gch.tt){ case 5:{ Table*h=gco2h(o); g->gray=h->gclist; if(traversetable(g,h)) black2gray(o); return sizeof(Table)+sizeof(TValue)*h->sizearray+ sizeof(Node)*sizenode(h); } case 6:{ Closure*cl=gco2cl(o); g->gray=cl->c.gclist; traverseclosure(g,cl); return(cl->c.isC)?sizeCclosure(cl->c.nupvalues): sizeLclosure(cl->l.nupvalues); } case 8:{ lua_State*th=gco2th(o); g->gray=th->gclist; th->gclist=g->grayagain; g->grayagain=o; black2gray(o); traversestack(g,th); return sizeof(lua_State)+sizeof(TValue)*th->stacksize+ sizeof(CallInfo)*th->size_ci; } case(8+1):{ Proto*p=gco2p(o); g->gray=p->gclist; traverseproto(g,p); return sizeof(Proto)+sizeof(Instruction)*p->sizecode+ sizeof(Proto*)*p->sizep+ sizeof(TValue)*p->sizek+ sizeof(int)*p->sizelineinfo+ sizeof(LocVar)*p->sizelocvars+ sizeof(TString*)*p->sizeupvalues; } default:return 0; } } static size_t propagateall(global_State*g){ size_t m=0; while(g->gray)m+=propagatemark(g); return m; } static int iscleared(const TValue*o,int iskey){ if(!iscollectable(o))return 0; if(ttisstring(o)){ stringmark(rawtsvalue(o)); return 0; } return iswhite(gcvalue(o))|| (ttisuserdata(o)&&(!iskey&&isfinalized(uvalue(o)))); } static void cleartable(GCObject*l){ while(l){ Table*h=gco2h(l); int i=h->sizearray; if(testbit(h->marked,4)){ while(i--){ TValue*o=&h->array[i]; if(iscleared(o,0)) setnilvalue(o); } } i=sizenode(h); while(i--){ Node*n=gnode(h,i); if(!ttisnil(gval(n))&& (iscleared(key2tval(n),1)||iscleared(gval(n),0))){ setnilvalue(gval(n)); removeentry(n); } } l=h->gclist; } } static void freeobj(lua_State*L,GCObject*o){ switch(o->gch.tt){ case(8+1):luaF_freeproto(L,gco2p(o));break; case 6:luaF_freeclosure(L,gco2cl(o));break; case(8+2):luaF_freeupval(L,gco2uv(o));break; case 5:luaH_free(L,gco2h(o));break; case 8:{ luaE_freethread(L,gco2th(o)); break; } case 4:{ G(L)->strt.nuse--; luaM_freemem(L,o,sizestring(gco2ts(o))); break; } case 7:{ luaM_freemem(L,o,sizeudata(gco2u(o))); break; } default:; } } #define sweepwholelist(L,p)sweeplist(L,p,((lu_mem)(~(lu_mem)0)-2)) static GCObject**sweeplist(lua_State*L,GCObject**p,lu_mem count){ GCObject*curr; global_State*g=G(L); int deadmask=otherwhite(g); while((curr=*p)!=NULL&&count-->0){ if(curr->gch.tt==8) sweepwholelist(L,&gco2th(curr)->openupval); if((curr->gch.marked^bit2mask(0,1))&deadmask){ makewhite(g,curr); p=&curr->gch.next; } else{ *p=curr->gch.next; if(curr==g->rootgc) g->rootgc=curr->gch.next; freeobj(L,curr); } } return p; } static void checkSizes(lua_State*L){ global_State*g=G(L); if(g->strt.nusestrt.size/4)&& g->strt.size>32*2) luaS_resize(L,g->strt.size/2); if(luaZ_sizebuffer(&g->buff)>32*2){ size_t newsize=luaZ_sizebuffer(&g->buff)/2; luaZ_resizebuffer(L,&g->buff,newsize); } } static void GCTM(lua_State*L){ global_State*g=G(L); GCObject*o=g->tmudata->gch.next; Udata*udata=rawgco2u(o); const TValue*tm; if(o==g->tmudata) g->tmudata=NULL; else g->tmudata->gch.next=udata->uv.next; udata->uv.next=g->mainthread->next; g->mainthread->next=o; makewhite(g,o); tm=fasttm(L,udata->uv.metatable,TM_GC); if(tm!=NULL){ lu_byte oldah=L->allowhook; lu_mem oldt=g->GCthreshold; L->allowhook=0; g->GCthreshold=2*g->totalbytes; setobj(L,L->top,tm); setuvalue(L,L->top+1,udata); L->top+=2; luaD_call(L,L->top-2,0); L->allowhook=oldah; g->GCthreshold=oldt; } } static void luaC_callGCTM(lua_State*L){ while(G(L)->tmudata) GCTM(L); } static void luaC_freeall(lua_State*L){ global_State*g=G(L); int i; g->currentwhite=bit2mask(0,1)|bitmask(6); sweepwholelist(L,&g->rootgc); for(i=0;istrt.size;i++) sweepwholelist(L,&g->strt.hash[i]); } static void markmt(global_State*g){ int i; for(i=0;i<(8+1);i++) if(g->mt[i])markobject(g,g->mt[i]); } static void markroot(lua_State*L){ global_State*g=G(L); g->gray=NULL; g->grayagain=NULL; g->weak=NULL; markobject(g,g->mainthread); markvalue(g,gt(g->mainthread)); markvalue(g,registry(L)); markmt(g); g->gcstate=1; } static void remarkupvals(global_State*g){ UpVal*uv; for(uv=g->uvhead.u.l.next;uv!=&g->uvhead;uv=uv->u.l.next){ if(isgray(obj2gco(uv))) markvalue(g,uv->v); } } static void atomic(lua_State*L){ global_State*g=G(L); size_t udsize; remarkupvals(g); propagateall(g); g->gray=g->weak; g->weak=NULL; markobject(g,L); markmt(g); propagateall(g); g->gray=g->grayagain; g->grayagain=NULL; propagateall(g); udsize=luaC_separateudata(L,0); marktmu(g); udsize+=propagateall(g); cleartable(g->weak); g->currentwhite=cast_byte(otherwhite(g)); g->sweepstrgc=0; g->sweepgc=&g->rootgc; g->gcstate=2; g->estimate=g->totalbytes-udsize; } static l_mem singlestep(lua_State*L){ global_State*g=G(L); switch(g->gcstate){ case 0:{ markroot(L); return 0; } case 1:{ if(g->gray) return propagatemark(g); else{ atomic(L); return 0; } } case 2:{ lu_mem old=g->totalbytes; sweepwholelist(L,&g->strt.hash[g->sweepstrgc++]); if(g->sweepstrgc>=g->strt.size) g->gcstate=3; g->estimate-=old-g->totalbytes; return 10; } case 3:{ lu_mem old=g->totalbytes; g->sweepgc=sweeplist(L,g->sweepgc,40); if(*g->sweepgc==NULL){ checkSizes(L); g->gcstate=4; } g->estimate-=old-g->totalbytes; return 40*10; } case 4:{ if(g->tmudata){ GCTM(L); if(g->estimate>100) g->estimate-=100; return 100; } else{ g->gcstate=0; g->gcdept=0; return 0; } } default:return 0; } } static void luaC_step(lua_State*L){ global_State*g=G(L); l_mem lim=(1024u/100)*g->gcstepmul; if(lim==0) lim=(((lu_mem)(~(lu_mem)0)-2)-1)/2; g->gcdept+=g->totalbytes-g->GCthreshold; do{ lim-=singlestep(L); if(g->gcstate==0) break; }while(lim>0); if(g->gcstate!=0){ if(g->gcdept<1024u) g->GCthreshold=g->totalbytes+1024u; else{ g->gcdept-=1024u; g->GCthreshold=g->totalbytes; } } else{ setthreshold(g); } } static void luaC_barrierf(lua_State*L,GCObject*o,GCObject*v){ global_State*g=G(L); if(g->gcstate==1) reallymarkobject(g,v); else makewhite(g,o); } static void luaC_barrierback(lua_State*L,Table*t){ global_State*g=G(L); GCObject*o=obj2gco(t); black2gray(o); t->gclist=g->grayagain; g->grayagain=o; } static void luaC_link(lua_State*L,GCObject*o,lu_byte tt){ global_State*g=G(L); o->gch.next=g->rootgc; g->rootgc=o; o->gch.marked=luaC_white(g); o->gch.tt=tt; } static void luaC_linkupval(lua_State*L,UpVal*uv){ global_State*g=G(L); GCObject*o=obj2gco(uv); o->gch.next=g->rootgc; g->rootgc=o; if(isgray(o)){ if(g->gcstate==1){ gray2black(o); luaC_barrier(L,uv,uv->v); } else{ makewhite(g,o); } } } typedef union{ lua_Number r; TString*ts; }SemInfo; typedef struct Token{ int token; SemInfo seminfo; }Token; typedef struct LexState{ int current; int linenumber; int lastline; Token t; Token lookahead; struct FuncState*fs; struct lua_State*L; ZIO*z; Mbuffer*buff; TString*source; char decpoint; }LexState; static void luaX_init(lua_State*L); static void luaX_lexerror(LexState*ls,const char*msg,int token); #define state_size(x)(sizeof(x)+0) #define fromstate(l)(cast(lu_byte*,(l))-0) #define tostate(l)(cast(lua_State*,cast(lu_byte*,l)+0)) typedef struct LG{ lua_State l; global_State g; }LG; static void stack_init(lua_State*L1,lua_State*L){ L1->base_ci=luaM_newvector(L,8,CallInfo); L1->ci=L1->base_ci; L1->size_ci=8; L1->end_ci=L1->base_ci+L1->size_ci-1; L1->stack=luaM_newvector(L,(2*20)+5,TValue); L1->stacksize=(2*20)+5; L1->top=L1->stack; L1->stack_last=L1->stack+(L1->stacksize-5)-1; L1->ci->func=L1->top; setnilvalue(L1->top++); L1->base=L1->ci->base=L1->top; L1->ci->top=L1->top+20; } static void freestack(lua_State*L,lua_State*L1){ luaM_freearray(L,L1->base_ci,L1->size_ci,CallInfo); luaM_freearray(L,L1->stack,L1->stacksize,TValue); } static void f_luaopen(lua_State*L,void*ud){ global_State*g=G(L); UNUSED(ud); stack_init(L,L); sethvalue(L,gt(L),luaH_new(L,0,2)); sethvalue(L,registry(L),luaH_new(L,0,2)); luaS_resize(L,32); luaT_init(L); luaX_init(L); luaS_fix(luaS_newliteral(L,"not enough memory")); g->GCthreshold=4*g->totalbytes; } static void preinit_state(lua_State*L,global_State*g){ G(L)=g; L->stack=NULL; L->stacksize=0; L->errorJmp=NULL; L->hook=NULL; L->hookmask=0; L->basehookcount=0; L->allowhook=1; resethookcount(L); L->openupval=NULL; L->size_ci=0; L->nCcalls=L->baseCcalls=0; L->status=0; L->base_ci=L->ci=NULL; L->savedpc=NULL; L->errfunc=0; setnilvalue(gt(L)); } static void close_state(lua_State*L){ global_State*g=G(L); luaF_close(L,L->stack); luaC_freeall(L); luaM_freearray(L,G(L)->strt.hash,G(L)->strt.size,TString*); luaZ_freebuffer(L,&g->buff); freestack(L,L); (*g->frealloc)(g->ud,fromstate(L),state_size(LG),0); } static void luaE_freethread(lua_State*L,lua_State*L1){ luaF_close(L1,L1->stack); freestack(L,L1); luaM_freemem(L,fromstate(L1),state_size(lua_State)); } static lua_State*lua_newstate(lua_Alloc f,void*ud){ int i; lua_State*L; global_State*g; void*l=(*f)(ud,NULL,0,state_size(LG)); if(l==NULL)return NULL; L=tostate(l); g=&((LG*)L)->g; L->next=NULL; L->tt=8; g->currentwhite=bit2mask(0,5); L->marked=luaC_white(g); set2bits(L->marked,5,6); preinit_state(L,g); g->frealloc=f; g->ud=ud; g->mainthread=L; g->uvhead.u.l.prev=&g->uvhead; g->uvhead.u.l.next=&g->uvhead; g->GCthreshold=0; g->strt.size=0; g->strt.nuse=0; g->strt.hash=NULL; setnilvalue(registry(L)); luaZ_initbuffer(L,&g->buff); g->panic=NULL; g->gcstate=0; g->rootgc=obj2gco(L); g->sweepstrgc=0; g->sweepgc=&g->rootgc; g->gray=NULL; g->grayagain=NULL; g->weak=NULL; g->tmudata=NULL; g->totalbytes=sizeof(LG); g->gcpause=200; g->gcstepmul=200; g->gcdept=0; for(i=0;i<(8+1);i++)g->mt[i]=NULL; if(luaD_rawrunprotected(L,f_luaopen,NULL)!=0){ close_state(L); L=NULL; } else {} return L; } static void callallgcTM(lua_State*L,void*ud){ UNUSED(ud); luaC_callGCTM(L); } static void lua_close(lua_State*L){ L=G(L)->mainthread; luaF_close(L,L->stack); luaC_separateudata(L,1); L->errfunc=0; do{ L->ci=L->base_ci; L->base=L->top=L->ci->base; L->nCcalls=L->baseCcalls=0; }while(luaD_rawrunprotected(L,callallgcTM,NULL)!=0); close_state(L); } #define getcode(fs,e)((fs)->f->code[(e)->u.s.info]) #define luaK_codeAsBx(fs,o,A,sBx)luaK_codeABx(fs,o,A,(sBx)+(((1<<(9+9))-1)>>1)) #define luaK_setmultret(fs,e)luaK_setreturns(fs,e,(-1)) static int luaK_codeABx(FuncState*fs,OpCode o,int A,unsigned int Bx); static int luaK_codeABC(FuncState*fs,OpCode o,int A,int B,int C); static void luaK_setreturns(FuncState*fs,expdesc*e,int nresults); static void luaK_patchtohere(FuncState*fs,int list); static void luaK_concat(FuncState*fs,int*l1,int l2); static int currentpc(lua_State*L,CallInfo*ci){ if(!isLua(ci))return-1; if(ci==L->ci) ci->savedpc=L->savedpc; return pcRel(ci->savedpc,ci_func(ci)->l.p); } static int currentline(lua_State*L,CallInfo*ci){ int pc=currentpc(L,ci); if(pc<0) return-1; else return getline_(ci_func(ci)->l.p,pc); } static int lua_getstack(lua_State*L,int level,lua_Debug*ar){ int status; CallInfo*ci; for(ci=L->ci;level>0&&ci>L->base_ci;ci--){ level--; if(f_isLua(ci)) level-=ci->tailcalls; } if(level==0&&ci>L->base_ci){ status=1; ar->i_ci=cast_int(ci-L->base_ci); } else if(level<0){ status=1; ar->i_ci=0; } else status=0; return status; } static Proto*getluaproto(CallInfo*ci){ return(isLua(ci)?ci_func(ci)->l.p:NULL); } static void funcinfo(lua_Debug*ar,Closure*cl){ if(cl->c.isC){ ar->source="=[C]"; ar->linedefined=-1; ar->lastlinedefined=-1; ar->what="C"; } else{ ar->source=getstr(cl->l.p->source); ar->linedefined=cl->l.p->linedefined; ar->lastlinedefined=cl->l.p->lastlinedefined; ar->what=(ar->linedefined==0)?"main":"Lua"; } luaO_chunkid(ar->short_src,ar->source,60); } static void info_tailcall(lua_Debug*ar){ ar->name=ar->namewhat=""; ar->what="tail"; ar->lastlinedefined=ar->linedefined=ar->currentline=-1; ar->source="=(tail call)"; luaO_chunkid(ar->short_src,ar->source,60); ar->nups=0; } static void collectvalidlines(lua_State*L,Closure*f){ if(f==NULL||f->c.isC){ setnilvalue(L->top); } else{ Table*t=luaH_new(L,0,0); int*lineinfo=f->l.p->lineinfo; int i; for(i=0;il.p->sizelineinfo;i++) setbvalue(luaH_setnum(L,t,lineinfo[i]),1); sethvalue(L,L->top,t); } incr_top(L); } static int auxgetinfo(lua_State*L,const char*what,lua_Debug*ar, Closure*f,CallInfo*ci){ int status=1; if(f==NULL){ info_tailcall(ar); return status; } for(;*what;what++){ switch(*what){ case'S':{ funcinfo(ar,f); break; } case'l':{ ar->currentline=(ci)?currentline(L,ci):-1; break; } case'u':{ ar->nups=f->c.nupvalues; break; } case'n':{ ar->namewhat=(ci)?NULL:NULL; if(ar->namewhat==NULL){ ar->namewhat=""; ar->name=NULL; } break; } case'L': case'f': break; default:status=0; } } return status; } static int lua_getinfo(lua_State*L,const char*what,lua_Debug*ar){ int status; Closure*f=NULL; CallInfo*ci=NULL; if(*what=='>'){ StkId func=L->top-1; luai_apicheck(L,ttisfunction(func)); what++; f=clvalue(func); L->top--; } else if(ar->i_ci!=0){ ci=L->base_ci+ar->i_ci; f=clvalue(ci->func); } status=auxgetinfo(L,what,ar,f,ci); if(strchr(what,'f')){ if(f==NULL)setnilvalue(L->top); else setclvalue(L,L->top,f); incr_top(L); } if(strchr(what,'L')) collectvalidlines(L,f); return status; } static int isinstack(CallInfo*ci,const TValue*o){ StkId p; for(p=ci->base;ptop;p++) if(o==p)return 1; return 0; } static void luaG_typeerror(lua_State*L,const TValue*o,const char*op){ const char*name=NULL; const char*t=luaT_typenames[ttype(o)]; const char*kind=(isinstack(L->ci,o))? NULL: NULL; if(kind) luaG_runerror(L,"attempt to %s %s "LUA_QL("%s")" (a %s value)", op,kind,name,t); else luaG_runerror(L,"attempt to %s a %s value",op,t); } static void luaG_concaterror(lua_State*L,StkId p1,StkId p2){ if(ttisstring(p1)||ttisnumber(p1))p1=p2; luaG_typeerror(L,p1,"concatenate"); } static void luaG_aritherror(lua_State*L,const TValue*p1,const TValue*p2){ TValue temp; if(luaV_tonumber(p1,&temp)==NULL) p2=p1; luaG_typeerror(L,p2,"perform arithmetic on"); } static int luaG_ordererror(lua_State*L,const TValue*p1,const TValue*p2){ const char*t1=luaT_typenames[ttype(p1)]; const char*t2=luaT_typenames[ttype(p2)]; if(t1[2]==t2[2]) luaG_runerror(L,"attempt to compare two %s values",t1); else luaG_runerror(L,"attempt to compare %s with %s",t1,t2); return 0; } static void addinfo(lua_State*L,const char*msg){ CallInfo*ci=L->ci; if(isLua(ci)){ char buff[60]; int line=currentline(L,ci); luaO_chunkid(buff,getstr(getluaproto(ci)->source),60); luaO_pushfstring(L,"%s:%d: %s",buff,line,msg); } } static void luaG_errormsg(lua_State*L){ if(L->errfunc!=0){ StkId errfunc=restorestack(L,L->errfunc); if(!ttisfunction(errfunc))luaD_throw(L,5); setobj(L,L->top,L->top-1); setobj(L,L->top-1,errfunc); incr_top(L); luaD_call(L,L->top-2,1); } luaD_throw(L,2); } static void luaG_runerror(lua_State*L,const char*fmt,...){ va_list argp; va_start(argp,fmt); addinfo(L,luaO_pushvfstring(L,fmt,argp)); va_end(argp); luaG_errormsg(L); } static int luaZ_fill(ZIO*z){ size_t size; lua_State*L=z->L; const char*buff; buff=z->reader(L,z->data,&size); if(buff==NULL||size==0)return(-1); z->n=size-1; z->p=buff; return char2int(*(z->p++)); } static void luaZ_init(lua_State*L,ZIO*z,lua_Reader reader,void*data){ z->L=L; z->reader=reader; z->data=data; z->n=0; z->p=NULL; } static char*luaZ_openspace(lua_State*L,Mbuffer*buff,size_t n){ if(n>buff->buffsize){ if(n<32)n=32; luaZ_resizebuffer(L,buff,n); } return buff->buffer; } #define opmode(t,a,b,c,m)(((t)<<7)|((a)<<6)|((b)<<4)|((c)<<2)|(m)) static const lu_byte luaP_opmodes[(cast(int,OP_VARARG)+1)]={ opmode(0,1,OpArgR,OpArgN,iABC) ,opmode(0,1,OpArgK,OpArgN,iABx) ,opmode(0,1,OpArgU,OpArgU,iABC) ,opmode(0,1,OpArgR,OpArgN,iABC) ,opmode(0,1,OpArgU,OpArgN,iABC) ,opmode(0,1,OpArgK,OpArgN,iABx) ,opmode(0,1,OpArgR,OpArgK,iABC) ,opmode(0,0,OpArgK,OpArgN,iABx) ,opmode(0,0,OpArgU,OpArgN,iABC) ,opmode(0,0,OpArgK,OpArgK,iABC) ,opmode(0,1,OpArgU,OpArgU,iABC) ,opmode(0,1,OpArgR,OpArgK,iABC) ,opmode(0,1,OpArgK,OpArgK,iABC) ,opmode(0,1,OpArgK,OpArgK,iABC) ,opmode(0,1,OpArgK,OpArgK,iABC) ,opmode(0,1,OpArgK,OpArgK,iABC) ,opmode(0,1,OpArgK,OpArgK,iABC) ,opmode(0,1,OpArgK,OpArgK,iABC) ,opmode(0,1,OpArgR,OpArgN,iABC) ,opmode(0,1,OpArgR,OpArgN,iABC) ,opmode(0,1,OpArgR,OpArgN,iABC) ,opmode(0,1,OpArgR,OpArgR,iABC) ,opmode(0,0,OpArgR,OpArgN,iAsBx) ,opmode(1,0,OpArgK,OpArgK,iABC) ,opmode(1,0,OpArgK,OpArgK,iABC) ,opmode(1,0,OpArgK,OpArgK,iABC) ,opmode(1,1,OpArgR,OpArgU,iABC) ,opmode(1,1,OpArgR,OpArgU,iABC) ,opmode(0,1,OpArgU,OpArgU,iABC) ,opmode(0,1,OpArgU,OpArgU,iABC) ,opmode(0,0,OpArgU,OpArgN,iABC) ,opmode(0,1,OpArgR,OpArgN,iAsBx) ,opmode(0,1,OpArgR,OpArgN,iAsBx) ,opmode(1,0,OpArgN,OpArgU,iABC) ,opmode(0,0,OpArgU,OpArgU,iABC) ,opmode(0,0,OpArgN,OpArgN,iABC) ,opmode(0,1,OpArgU,OpArgN,iABx) ,opmode(0,1,OpArgU,OpArgN,iABC) }; #define next(ls)(ls->current=zgetc(ls->z)) #define currIsNewline(ls)(ls->current=='\n'||ls->current=='\r') static const char*const luaX_tokens[]={ "and","break","do","else","elseif", "end","false","for","function","if", "in","local","nil","not","or","repeat", "return","then","true","until","while", "..","...","==",">=","<=","~=", "","","","", NULL }; #define save_and_next(ls)(save(ls,ls->current),next(ls)) static void save(LexState*ls,int c){ Mbuffer*b=ls->buff; if(b->n+1>b->buffsize){ size_t newsize; if(b->buffsize>=((size_t)(~(size_t)0)-2)/2) luaX_lexerror(ls,"lexical element too long",0); newsize=b->buffsize*2; luaZ_resizebuffer(ls->L,b,newsize); } b->buffer[b->n++]=cast(char,c); } static void luaX_init(lua_State*L){ int i; for(i=0;i<(cast(int,TK_WHILE-257+1));i++){ TString*ts=luaS_new(L,luaX_tokens[i]); luaS_fix(ts); ts->tsv.reserved=cast_byte(i+1); } } static const char*luaX_token2str(LexState*ls,int token){ if(token<257){ return(iscntrl(token))?luaO_pushfstring(ls->L,"char(%d)",token): luaO_pushfstring(ls->L,"%c",token); } else return luaX_tokens[token-257]; } static const char*txtToken(LexState*ls,int token){ switch(token){ case TK_NAME: case TK_STRING: case TK_NUMBER: save(ls,'\0'); return luaZ_buffer(ls->buff); default: return luaX_token2str(ls,token); } } static void luaX_lexerror(LexState*ls,const char*msg,int token){ char buff[80]; luaO_chunkid(buff,getstr(ls->source),80); msg=luaO_pushfstring(ls->L,"%s:%d: %s",buff,ls->linenumber,msg); if(token) luaO_pushfstring(ls->L,"%s near "LUA_QL("%s"),msg,txtToken(ls,token)); luaD_throw(ls->L,3); } static void luaX_syntaxerror(LexState*ls,const char*msg){ luaX_lexerror(ls,msg,ls->t.token); } static TString*luaX_newstring(LexState*ls,const char*str,size_t l){ lua_State*L=ls->L; TString*ts=luaS_newlstr(L,str,l); TValue*o=luaH_setstr(L,ls->fs->h,ts); if(ttisnil(o)){ setbvalue(o,1); luaC_checkGC(L); } return ts; } static void inclinenumber(LexState*ls){ int old=ls->current; next(ls); if(currIsNewline(ls)&&ls->current!=old) next(ls); if(++ls->linenumber>=(INT_MAX-2)) luaX_syntaxerror(ls,"chunk has too many lines"); } static void luaX_setinput(lua_State*L,LexState*ls,ZIO*z,TString*source){ ls->decpoint='.'; ls->L=L; ls->lookahead.token=TK_EOS; ls->z=z; ls->fs=NULL; ls->linenumber=1; ls->lastline=1; ls->source=source; luaZ_resizebuffer(ls->L,ls->buff,32); next(ls); } static int check_next(LexState*ls,const char*set){ if(!strchr(set,ls->current)) return 0; save_and_next(ls); return 1; } static void buffreplace(LexState*ls,char from,char to){ size_t n=luaZ_bufflen(ls->buff); char*p=luaZ_buffer(ls->buff); while(n--) if(p[n]==from)p[n]=to; } static void read_numeral(LexState*ls,SemInfo*seminfo){ do{ save_and_next(ls); }while(isdigit(ls->current)||ls->current=='.'); if(check_next(ls,"Ee")) check_next(ls,"+-"); while(isalnum(ls->current)||ls->current=='_') save_and_next(ls); save(ls,'\0'); buffreplace(ls,'.',ls->decpoint); if(!luaO_str2d(luaZ_buffer(ls->buff),&seminfo->r)) luaX_lexerror(ls,"malformed number",TK_NUMBER); } static int skip_sep(LexState*ls){ int count=0; int s=ls->current; save_and_next(ls); while(ls->current=='='){ save_and_next(ls); count++; } return(ls->current==s)?count:(-count)-1; } static void read_long_string(LexState*ls,SemInfo*seminfo,int sep){ int cont=0; (void)(cont); save_and_next(ls); if(currIsNewline(ls)) inclinenumber(ls); for(;;){ switch(ls->current){ case(-1): luaX_lexerror(ls,(seminfo)?"unfinished long string": "unfinished long comment",TK_EOS); break; case']':{ if(skip_sep(ls)==sep){ save_and_next(ls); goto endloop; } break; } case'\n': case'\r':{ save(ls,'\n'); inclinenumber(ls); if(!seminfo)luaZ_resetbuffer(ls->buff); break; } default:{ if(seminfo)save_and_next(ls); else next(ls); } } }endloop: if(seminfo) seminfo->ts=luaX_newstring(ls,luaZ_buffer(ls->buff)+(2+sep), luaZ_bufflen(ls->buff)-2*(2+sep)); } static void read_string(LexState*ls,int del,SemInfo*seminfo){ save_and_next(ls); while(ls->current!=del){ switch(ls->current){ case(-1): luaX_lexerror(ls,"unfinished string",TK_EOS); continue; case'\n': case'\r': luaX_lexerror(ls,"unfinished string",TK_STRING); continue; case'\\':{ int c; next(ls); switch(ls->current){ case'a':c='\a';break; case'b':c='\b';break; case'f':c='\f';break; case'n':c='\n';break; case'r':c='\r';break; case't':c='\t';break; case'v':c='\v';break; case'\n': case'\r':save(ls,'\n');inclinenumber(ls);continue; case(-1):continue; default:{ if(!isdigit(ls->current)) save_and_next(ls); else{ int i=0; c=0; do{ c=10*c+(ls->current-'0'); next(ls); }while(++i<3&&isdigit(ls->current)); if(c>UCHAR_MAX) luaX_lexerror(ls,"escape sequence too large",TK_STRING); save(ls,c); } continue; } } save(ls,c); next(ls); continue; } default: save_and_next(ls); } } save_and_next(ls); seminfo->ts=luaX_newstring(ls,luaZ_buffer(ls->buff)+1, luaZ_bufflen(ls->buff)-2); } static int llex(LexState*ls,SemInfo*seminfo){ luaZ_resetbuffer(ls->buff); for(;;){ switch(ls->current){ case'\n': case'\r':{ inclinenumber(ls); continue; } case'-':{ next(ls); if(ls->current!='-')return'-'; next(ls); if(ls->current=='['){ int sep=skip_sep(ls); luaZ_resetbuffer(ls->buff); if(sep>=0){ read_long_string(ls,NULL,sep); luaZ_resetbuffer(ls->buff); continue; } } while(!currIsNewline(ls)&&ls->current!=(-1)) next(ls); continue; } case'[':{ int sep=skip_sep(ls); if(sep>=0){ read_long_string(ls,seminfo,sep); return TK_STRING; } else if(sep==-1)return'['; else luaX_lexerror(ls,"invalid long string delimiter",TK_STRING); } case'=':{ next(ls); if(ls->current!='=')return'='; else{next(ls);return TK_EQ;} } case'<':{ next(ls); if(ls->current!='=')return'<'; else{next(ls);return TK_LE;} } case'>':{ next(ls); if(ls->current!='=')return'>'; else{next(ls);return TK_GE;} } case'~':{ next(ls); if(ls->current!='=')return'~'; else{next(ls);return TK_NE;} } case'"': case'\'':{ read_string(ls,ls->current,seminfo); return TK_STRING; } case'.':{ save_and_next(ls); if(check_next(ls,".")){ if(check_next(ls,".")) return TK_DOTS; else return TK_CONCAT; } else if(!isdigit(ls->current))return'.'; else{ read_numeral(ls,seminfo); return TK_NUMBER; } } case(-1):{ return TK_EOS; } default:{ if(isspace(ls->current)){ next(ls); continue; } else if(isdigit(ls->current)){ read_numeral(ls,seminfo); return TK_NUMBER; } else if(isalpha(ls->current)||ls->current=='_'){ TString*ts; do{ save_and_next(ls); }while(isalnum(ls->current)||ls->current=='_'); ts=luaX_newstring(ls,luaZ_buffer(ls->buff), luaZ_bufflen(ls->buff)); if(ts->tsv.reserved>0) return ts->tsv.reserved-1+257; else{ seminfo->ts=ts; return TK_NAME; } } else{ int c=ls->current; next(ls); return c; } } } } } static void luaX_next(LexState*ls){ ls->lastline=ls->linenumber; if(ls->lookahead.token!=TK_EOS){ ls->t=ls->lookahead; ls->lookahead.token=TK_EOS; } else ls->t.token=llex(ls,&ls->t.seminfo); } static void luaX_lookahead(LexState*ls){ ls->lookahead.token=llex(ls,&ls->lookahead.seminfo); } #define hasjumps(e)((e)->t!=(e)->f) static int isnumeral(expdesc*e){ return(e->k==VKNUM&&e->t==(-1)&&e->f==(-1)); } static void luaK_nil(FuncState*fs,int from,int n){ Instruction*previous; if(fs->pc>fs->lasttarget){ if(fs->pc==0){ if(from>=fs->nactvar) return; } else{ previous=&fs->f->code[fs->pc-1]; if(GET_OPCODE(*previous)==OP_LOADNIL){ int pfrom=GETARG_A(*previous); int pto=GETARG_B(*previous); if(pfrom<=from&&from<=pto+1){ if(from+n-1>pto) SETARG_B(*previous,from+n-1); return; } } } } luaK_codeABC(fs,OP_LOADNIL,from,from+n-1,0); } static int luaK_jump(FuncState*fs){ int jpc=fs->jpc; int j; fs->jpc=(-1); j=luaK_codeAsBx(fs,OP_JMP,0,(-1)); luaK_concat(fs,&j,jpc); return j; } static void luaK_ret(FuncState*fs,int first,int nret){ luaK_codeABC(fs,OP_RETURN,first,nret+1,0); } static int condjump(FuncState*fs,OpCode op,int A,int B,int C){ luaK_codeABC(fs,op,A,B,C); return luaK_jump(fs); } static void fixjump(FuncState*fs,int pc,int dest){ Instruction*jmp=&fs->f->code[pc]; int offset=dest-(pc+1); if(abs(offset)>(((1<<(9+9))-1)>>1)) luaX_syntaxerror(fs->ls,"control structure too long"); SETARG_sBx(*jmp,offset); } static int luaK_getlabel(FuncState*fs){ fs->lasttarget=fs->pc; return fs->pc; } static int getjump(FuncState*fs,int pc){ int offset=GETARG_sBx(fs->f->code[pc]); if(offset==(-1)) return(-1); else return(pc+1)+offset; } static Instruction*getjumpcontrol(FuncState*fs,int pc){ Instruction*pi=&fs->f->code[pc]; if(pc>=1&&testTMode(GET_OPCODE(*(pi-1)))) return pi-1; else return pi; } static int need_value(FuncState*fs,int list){ for(;list!=(-1);list=getjump(fs,list)){ Instruction i=*getjumpcontrol(fs,list); if(GET_OPCODE(i)!=OP_TESTSET)return 1; } return 0; } static int patchtestreg(FuncState*fs,int node,int reg){ Instruction*i=getjumpcontrol(fs,node); if(GET_OPCODE(*i)!=OP_TESTSET) return 0; if(reg!=((1<<8)-1)&®!=GETARG_B(*i)) SETARG_A(*i,reg); else *i=CREATE_ABC(OP_TEST,GETARG_B(*i),0,GETARG_C(*i)); return 1; } static void removevalues(FuncState*fs,int list){ for(;list!=(-1);list=getjump(fs,list)) patchtestreg(fs,list,((1<<8)-1)); } static void patchlistaux(FuncState*fs,int list,int vtarget,int reg, int dtarget){ while(list!=(-1)){ int next=getjump(fs,list); if(patchtestreg(fs,list,reg)) fixjump(fs,list,vtarget); else fixjump(fs,list,dtarget); list=next; } } static void dischargejpc(FuncState*fs){ patchlistaux(fs,fs->jpc,fs->pc,((1<<8)-1),fs->pc); fs->jpc=(-1); } static void luaK_patchlist(FuncState*fs,int list,int target){ if(target==fs->pc) luaK_patchtohere(fs,list); else{ patchlistaux(fs,list,target,((1<<8)-1),target); } } static void luaK_patchtohere(FuncState*fs,int list){ luaK_getlabel(fs); luaK_concat(fs,&fs->jpc,list); } static void luaK_concat(FuncState*fs,int*l1,int l2){ if(l2==(-1))return; else if(*l1==(-1)) *l1=l2; else{ int list=*l1; int next; while((next=getjump(fs,list))!=(-1)) list=next; fixjump(fs,list,l2); } } static void luaK_checkstack(FuncState*fs,int n){ int newstack=fs->freereg+n; if(newstack>fs->f->maxstacksize){ if(newstack>=250) luaX_syntaxerror(fs->ls,"function or expression too complex"); fs->f->maxstacksize=cast_byte(newstack); } } static void luaK_reserveregs(FuncState*fs,int n){ luaK_checkstack(fs,n); fs->freereg+=n; } static void freereg(FuncState*fs,int reg){ if(!ISK(reg)&®>=fs->nactvar){ fs->freereg--; } } static void freeexp(FuncState*fs,expdesc*e){ if(e->k==VNONRELOC) freereg(fs,e->u.s.info); } static int addk(FuncState*fs,TValue*k,TValue*v){ lua_State*L=fs->L; TValue*idx=luaH_set(L,fs->h,k); Proto*f=fs->f; int oldsize=f->sizek; if(ttisnumber(idx)){ return cast_int(nvalue(idx)); } else{ setnvalue(idx,cast_num(fs->nk)); luaM_growvector(L,f->k,fs->nk,f->sizek,TValue, ((1<<(9+9))-1),"constant table overflow"); while(oldsizesizek)setnilvalue(&f->k[oldsize++]); setobj(L,&f->k[fs->nk],v); luaC_barrier(L,f,v); return fs->nk++; } } static int luaK_stringK(FuncState*fs,TString*s){ TValue o; setsvalue(fs->L,&o,s); return addk(fs,&o,&o); } static int luaK_numberK(FuncState*fs,lua_Number r){ TValue o; setnvalue(&o,r); return addk(fs,&o,&o); } static int boolK(FuncState*fs,int b){ TValue o; setbvalue(&o,b); return addk(fs,&o,&o); } static int nilK(FuncState*fs){ TValue k,v; setnilvalue(&v); sethvalue(fs->L,&k,fs->h); return addk(fs,&k,&v); } static void luaK_setreturns(FuncState*fs,expdesc*e,int nresults){ if(e->k==VCALL){ SETARG_C(getcode(fs,e),nresults+1); } else if(e->k==VVARARG){ SETARG_B(getcode(fs,e),nresults+1); SETARG_A(getcode(fs,e),fs->freereg); luaK_reserveregs(fs,1); } } static void luaK_setoneret(FuncState*fs,expdesc*e){ if(e->k==VCALL){ e->k=VNONRELOC; e->u.s.info=GETARG_A(getcode(fs,e)); } else if(e->k==VVARARG){ SETARG_B(getcode(fs,e),2); e->k=VRELOCABLE; } } static void luaK_dischargevars(FuncState*fs,expdesc*e){ switch(e->k){ case VLOCAL:{ e->k=VNONRELOC; break; } case VUPVAL:{ e->u.s.info=luaK_codeABC(fs,OP_GETUPVAL,0,e->u.s.info,0); e->k=VRELOCABLE; break; } case VGLOBAL:{ e->u.s.info=luaK_codeABx(fs,OP_GETGLOBAL,0,e->u.s.info); e->k=VRELOCABLE; break; } case VINDEXED:{ freereg(fs,e->u.s.aux); freereg(fs,e->u.s.info); e->u.s.info=luaK_codeABC(fs,OP_GETTABLE,0,e->u.s.info,e->u.s.aux); e->k=VRELOCABLE; break; } case VVARARG: case VCALL:{ luaK_setoneret(fs,e); break; } default:break; } } static int code_label(FuncState*fs,int A,int b,int jump){ luaK_getlabel(fs); return luaK_codeABC(fs,OP_LOADBOOL,A,b,jump); } static void discharge2reg(FuncState*fs,expdesc*e,int reg){ luaK_dischargevars(fs,e); switch(e->k){ case VNIL:{ luaK_nil(fs,reg,1); break; } case VFALSE:case VTRUE:{ luaK_codeABC(fs,OP_LOADBOOL,reg,e->k==VTRUE,0); break; } case VK:{ luaK_codeABx(fs,OP_LOADK,reg,e->u.s.info); break; } case VKNUM:{ luaK_codeABx(fs,OP_LOADK,reg,luaK_numberK(fs,e->u.nval)); break; } case VRELOCABLE:{ Instruction*pc=&getcode(fs,e); SETARG_A(*pc,reg); break; } case VNONRELOC:{ if(reg!=e->u.s.info) luaK_codeABC(fs,OP_MOVE,reg,e->u.s.info,0); break; } default:{ return; } } e->u.s.info=reg; e->k=VNONRELOC; } static void discharge2anyreg(FuncState*fs,expdesc*e){ if(e->k!=VNONRELOC){ luaK_reserveregs(fs,1); discharge2reg(fs,e,fs->freereg-1); } } static void exp2reg(FuncState*fs,expdesc*e,int reg){ discharge2reg(fs,e,reg); if(e->k==VJMP) luaK_concat(fs,&e->t,e->u.s.info); if(hasjumps(e)){ int final; int p_f=(-1); int p_t=(-1); if(need_value(fs,e->t)||need_value(fs,e->f)){ int fj=(e->k==VJMP)?(-1):luaK_jump(fs); p_f=code_label(fs,reg,0,1); p_t=code_label(fs,reg,1,0); luaK_patchtohere(fs,fj); } final=luaK_getlabel(fs); patchlistaux(fs,e->f,final,reg,p_f); patchlistaux(fs,e->t,final,reg,p_t); } e->f=e->t=(-1); e->u.s.info=reg; e->k=VNONRELOC; } static void luaK_exp2nextreg(FuncState*fs,expdesc*e){ luaK_dischargevars(fs,e); freeexp(fs,e); luaK_reserveregs(fs,1); exp2reg(fs,e,fs->freereg-1); } static int luaK_exp2anyreg(FuncState*fs,expdesc*e){ luaK_dischargevars(fs,e); if(e->k==VNONRELOC){ if(!hasjumps(e))return e->u.s.info; if(e->u.s.info>=fs->nactvar){ exp2reg(fs,e,e->u.s.info); return e->u.s.info; } } luaK_exp2nextreg(fs,e); return e->u.s.info; } static void luaK_exp2val(FuncState*fs,expdesc*e){ if(hasjumps(e)) luaK_exp2anyreg(fs,e); else luaK_dischargevars(fs,e); } static int luaK_exp2RK(FuncState*fs,expdesc*e){ luaK_exp2val(fs,e); switch(e->k){ case VKNUM: case VTRUE: case VFALSE: case VNIL:{ if(fs->nk<=((1<<(9-1))-1)){ e->u.s.info=(e->k==VNIL)?nilK(fs): (e->k==VKNUM)?luaK_numberK(fs,e->u.nval): boolK(fs,(e->k==VTRUE)); e->k=VK; return RKASK(e->u.s.info); } else break; } case VK:{ if(e->u.s.info<=((1<<(9-1))-1)) return RKASK(e->u.s.info); else break; } default:break; } return luaK_exp2anyreg(fs,e); } static void luaK_storevar(FuncState*fs,expdesc*var,expdesc*ex){ switch(var->k){ case VLOCAL:{ freeexp(fs,ex); exp2reg(fs,ex,var->u.s.info); return; } case VUPVAL:{ int e=luaK_exp2anyreg(fs,ex); luaK_codeABC(fs,OP_SETUPVAL,e,var->u.s.info,0); break; } case VGLOBAL:{ int e=luaK_exp2anyreg(fs,ex); luaK_codeABx(fs,OP_SETGLOBAL,e,var->u.s.info); break; } case VINDEXED:{ int e=luaK_exp2RK(fs,ex); luaK_codeABC(fs,OP_SETTABLE,var->u.s.info,var->u.s.aux,e); break; } default:{ break; } } freeexp(fs,ex); } static void luaK_self(FuncState*fs,expdesc*e,expdesc*key){ int func; luaK_exp2anyreg(fs,e); freeexp(fs,e); func=fs->freereg; luaK_reserveregs(fs,2); luaK_codeABC(fs,OP_SELF,func,e->u.s.info,luaK_exp2RK(fs,key)); freeexp(fs,key); e->u.s.info=func; e->k=VNONRELOC; } static void invertjump(FuncState*fs,expdesc*e){ Instruction*pc=getjumpcontrol(fs,e->u.s.info); SETARG_A(*pc,!(GETARG_A(*pc))); } static int jumponcond(FuncState*fs,expdesc*e,int cond){ if(e->k==VRELOCABLE){ Instruction ie=getcode(fs,e); if(GET_OPCODE(ie)==OP_NOT){ fs->pc--; return condjump(fs,OP_TEST,GETARG_B(ie),0,!cond); } } discharge2anyreg(fs,e); freeexp(fs,e); return condjump(fs,OP_TESTSET,((1<<8)-1),e->u.s.info,cond); } static void luaK_goiftrue(FuncState*fs,expdesc*e){ int pc; luaK_dischargevars(fs,e); switch(e->k){ case VK:case VKNUM:case VTRUE:{ pc=(-1); break; } case VJMP:{ invertjump(fs,e); pc=e->u.s.info; break; } default:{ pc=jumponcond(fs,e,0); break; } } luaK_concat(fs,&e->f,pc); luaK_patchtohere(fs,e->t); e->t=(-1); } static void luaK_goiffalse(FuncState*fs,expdesc*e){ int pc; luaK_dischargevars(fs,e); switch(e->k){ case VNIL:case VFALSE:{ pc=(-1); break; } case VJMP:{ pc=e->u.s.info; break; } default:{ pc=jumponcond(fs,e,1); break; } } luaK_concat(fs,&e->t,pc); luaK_patchtohere(fs,e->f); e->f=(-1); } static void codenot(FuncState*fs,expdesc*e){ luaK_dischargevars(fs,e); switch(e->k){ case VNIL:case VFALSE:{ e->k=VTRUE; break; } case VK:case VKNUM:case VTRUE:{ e->k=VFALSE; break; } case VJMP:{ invertjump(fs,e); break; } case VRELOCABLE: case VNONRELOC:{ discharge2anyreg(fs,e); freeexp(fs,e); e->u.s.info=luaK_codeABC(fs,OP_NOT,0,e->u.s.info,0); e->k=VRELOCABLE; break; } default:{ break; } } {int temp=e->f;e->f=e->t;e->t=temp;} removevalues(fs,e->f); removevalues(fs,e->t); } static void luaK_indexed(FuncState*fs,expdesc*t,expdesc*k){ t->u.s.aux=luaK_exp2RK(fs,k); t->k=VINDEXED; } static int constfolding(OpCode op,expdesc*e1,expdesc*e2){ lua_Number v1,v2,r; if(!isnumeral(e1)||!isnumeral(e2))return 0; v1=e1->u.nval; v2=e2->u.nval; switch(op){ case OP_ADD:r=luai_numadd(v1,v2);break; case OP_SUB:r=luai_numsub(v1,v2);break; case OP_MUL:r=luai_nummul(v1,v2);break; case OP_DIV: if(v2==0)return 0; r=luai_numdiv(v1,v2);break; case OP_MOD: if(v2==0)return 0; r=luai_nummod(v1,v2);break; case OP_POW:r=luai_numpow(v1,v2);break; case OP_UNM:r=luai_numunm(v1);break; case OP_LEN:return 0; default:r=0;break; } if(luai_numisnan(r))return 0; e1->u.nval=r; return 1; } static void codearith(FuncState*fs,OpCode op,expdesc*e1,expdesc*e2){ if(constfolding(op,e1,e2)) return; else{ int o2=(op!=OP_UNM&&op!=OP_LEN)?luaK_exp2RK(fs,e2):0; int o1=luaK_exp2RK(fs,e1); if(o1>o2){ freeexp(fs,e1); freeexp(fs,e2); } else{ freeexp(fs,e2); freeexp(fs,e1); } e1->u.s.info=luaK_codeABC(fs,op,0,o1,o2); e1->k=VRELOCABLE; } } static void codecomp(FuncState*fs,OpCode op,int cond,expdesc*e1, expdesc*e2){ int o1=luaK_exp2RK(fs,e1); int o2=luaK_exp2RK(fs,e2); freeexp(fs,e2); freeexp(fs,e1); if(cond==0&&op!=OP_EQ){ int temp; temp=o1;o1=o2;o2=temp; cond=1; } e1->u.s.info=condjump(fs,op,cond,o1,o2); e1->k=VJMP; } static void luaK_prefix(FuncState*fs,UnOpr op,expdesc*e){ expdesc e2; e2.t=e2.f=(-1);e2.k=VKNUM;e2.u.nval=0; switch(op){ case OPR_MINUS:{ if(!isnumeral(e)) luaK_exp2anyreg(fs,e); codearith(fs,OP_UNM,e,&e2); break; } case OPR_NOT:codenot(fs,e);break; case OPR_LEN:{ luaK_exp2anyreg(fs,e); codearith(fs,OP_LEN,e,&e2); break; } default:; } } static void luaK_infix(FuncState*fs,BinOpr op,expdesc*v){ switch(op){ case OPR_AND:{ luaK_goiftrue(fs,v); break; } case OPR_OR:{ luaK_goiffalse(fs,v); break; } case OPR_CONCAT:{ luaK_exp2nextreg(fs,v); break; } case OPR_ADD:case OPR_SUB:case OPR_MUL:case OPR_DIV: case OPR_MOD:case OPR_POW:{ if(!isnumeral(v))luaK_exp2RK(fs,v); break; } default:{ luaK_exp2RK(fs,v); break; } } } static void luaK_posfix(FuncState*fs,BinOpr op,expdesc*e1,expdesc*e2){ switch(op){ case OPR_AND:{ luaK_dischargevars(fs,e2); luaK_concat(fs,&e2->f,e1->f); *e1=*e2; break; } case OPR_OR:{ luaK_dischargevars(fs,e2); luaK_concat(fs,&e2->t,e1->t); *e1=*e2; break; } case OPR_CONCAT:{ luaK_exp2val(fs,e2); if(e2->k==VRELOCABLE&&GET_OPCODE(getcode(fs,e2))==OP_CONCAT){ freeexp(fs,e1); SETARG_B(getcode(fs,e2),e1->u.s.info); e1->k=VRELOCABLE;e1->u.s.info=e2->u.s.info; } else{ luaK_exp2nextreg(fs,e2); codearith(fs,OP_CONCAT,e1,e2); } break; } case OPR_ADD:codearith(fs,OP_ADD,e1,e2);break; case OPR_SUB:codearith(fs,OP_SUB,e1,e2);break; case OPR_MUL:codearith(fs,OP_MUL,e1,e2);break; case OPR_DIV:codearith(fs,OP_DIV,e1,e2);break; case OPR_MOD:codearith(fs,OP_MOD,e1,e2);break; case OPR_POW:codearith(fs,OP_POW,e1,e2);break; case OPR_EQ:codecomp(fs,OP_EQ,1,e1,e2);break; case OPR_NE:codecomp(fs,OP_EQ,0,e1,e2);break; case OPR_LT:codecomp(fs,OP_LT,1,e1,e2);break; case OPR_LE:codecomp(fs,OP_LE,1,e1,e2);break; case OPR_GT:codecomp(fs,OP_LT,0,e1,e2);break; case OPR_GE:codecomp(fs,OP_LE,0,e1,e2);break; default:; } } static void luaK_fixline(FuncState*fs,int line){ fs->f->lineinfo[fs->pc-1]=line; } static int luaK_code(FuncState*fs,Instruction i,int line){ Proto*f=fs->f; dischargejpc(fs); luaM_growvector(fs->L,f->code,fs->pc,f->sizecode,Instruction, (INT_MAX-2),"code size overflow"); f->code[fs->pc]=i; luaM_growvector(fs->L,f->lineinfo,fs->pc,f->sizelineinfo,int, (INT_MAX-2),"code size overflow"); f->lineinfo[fs->pc]=line; return fs->pc++; } static int luaK_codeABC(FuncState*fs,OpCode o,int a,int b,int c){ return luaK_code(fs,CREATE_ABC(o,a,b,c),fs->ls->lastline); } static int luaK_codeABx(FuncState*fs,OpCode o,int a,unsigned int bc){ return luaK_code(fs,CREATE_ABx(o,a,bc),fs->ls->lastline); } static void luaK_setlist(FuncState*fs,int base,int nelems,int tostore){ int c=(nelems-1)/50+1; int b=(tostore==(-1))?0:tostore; if(c<=((1<<9)-1)) luaK_codeABC(fs,OP_SETLIST,base,b,c); else{ luaK_codeABC(fs,OP_SETLIST,base,b,0); luaK_code(fs,cast(Instruction,c),fs->ls->lastline); } fs->freereg=base+1; } #define hasmultret(k)((k)==VCALL||(k)==VVARARG) #define getlocvar(fs,i)((fs)->f->locvars[(fs)->actvar[i]]) #define luaY_checklimit(fs,v,l,m)if((v)>(l))errorlimit(fs,l,m) typedef struct BlockCnt{ struct BlockCnt*previous; int breaklist; lu_byte nactvar; lu_byte upval; lu_byte isbreakable; }BlockCnt; static void chunk(LexState*ls); static void expr(LexState*ls,expdesc*v); static void anchor_token(LexState*ls){ if(ls->t.token==TK_NAME||ls->t.token==TK_STRING){ TString*ts=ls->t.seminfo.ts; luaX_newstring(ls,getstr(ts),ts->tsv.len); } } static void error_expected(LexState*ls,int token){ luaX_syntaxerror(ls, luaO_pushfstring(ls->L,LUA_QL("%s")" expected",luaX_token2str(ls,token))); } static void errorlimit(FuncState*fs,int limit,const char*what){ const char*msg=(fs->f->linedefined==0)? luaO_pushfstring(fs->L,"main function has more than %d %s",limit,what): luaO_pushfstring(fs->L,"function at line %d has more than %d %s", fs->f->linedefined,limit,what); luaX_lexerror(fs->ls,msg,0); } static int testnext(LexState*ls,int c){ if(ls->t.token==c){ luaX_next(ls); return 1; } else return 0; } static void check(LexState*ls,int c){ if(ls->t.token!=c) error_expected(ls,c); } static void checknext(LexState*ls,int c){ check(ls,c); luaX_next(ls); } #define check_condition(ls,c,msg){if(!(c))luaX_syntaxerror(ls,msg);} static void check_match(LexState*ls,int what,int who,int where){ if(!testnext(ls,what)){ if(where==ls->linenumber) error_expected(ls,what); else{ luaX_syntaxerror(ls,luaO_pushfstring(ls->L, LUA_QL("%s")" expected (to close "LUA_QL("%s")" at line %d)", luaX_token2str(ls,what),luaX_token2str(ls,who),where)); } } } static TString*str_checkname(LexState*ls){ TString*ts; check(ls,TK_NAME); ts=ls->t.seminfo.ts; luaX_next(ls); return ts; } static void init_exp(expdesc*e,expkind k,int i){ e->f=e->t=(-1); e->k=k; e->u.s.info=i; } static void codestring(LexState*ls,expdesc*e,TString*s){ init_exp(e,VK,luaK_stringK(ls->fs,s)); } static void checkname(LexState*ls,expdesc*e){ codestring(ls,e,str_checkname(ls)); } static int registerlocalvar(LexState*ls,TString*varname){ FuncState*fs=ls->fs; Proto*f=fs->f; int oldsize=f->sizelocvars; luaM_growvector(ls->L,f->locvars,fs->nlocvars,f->sizelocvars, LocVar,SHRT_MAX,"too many local variables"); while(oldsizesizelocvars)f->locvars[oldsize++].varname=NULL; f->locvars[fs->nlocvars].varname=varname; luaC_objbarrier(ls->L,f,varname); return fs->nlocvars++; } #define new_localvarliteral(ls,v,n)new_localvar(ls,luaX_newstring(ls,""v,(sizeof(v)/sizeof(char))-1),n) static void new_localvar(LexState*ls,TString*name,int n){ FuncState*fs=ls->fs; luaY_checklimit(fs,fs->nactvar+n+1,200,"local variables"); fs->actvar[fs->nactvar+n]=cast(unsigned short,registerlocalvar(ls,name)); } static void adjustlocalvars(LexState*ls,int nvars){ FuncState*fs=ls->fs; fs->nactvar=cast_byte(fs->nactvar+nvars); for(;nvars;nvars--){ getlocvar(fs,fs->nactvar-nvars).startpc=fs->pc; } } static void removevars(LexState*ls,int tolevel){ FuncState*fs=ls->fs; while(fs->nactvar>tolevel) getlocvar(fs,--fs->nactvar).endpc=fs->pc; } static int indexupvalue(FuncState*fs,TString*name,expdesc*v){ int i; Proto*f=fs->f; int oldsize=f->sizeupvalues; for(i=0;inups;i++){ if(fs->upvalues[i].k==v->k&&fs->upvalues[i].info==v->u.s.info){ return i; } } luaY_checklimit(fs,f->nups+1,60,"upvalues"); luaM_growvector(fs->L,f->upvalues,f->nups,f->sizeupvalues, TString*,(INT_MAX-2),""); while(oldsizesizeupvalues)f->upvalues[oldsize++]=NULL; f->upvalues[f->nups]=name; luaC_objbarrier(fs->L,f,name); fs->upvalues[f->nups].k=cast_byte(v->k); fs->upvalues[f->nups].info=cast_byte(v->u.s.info); return f->nups++; } static int searchvar(FuncState*fs,TString*n){ int i; for(i=fs->nactvar-1;i>=0;i--){ if(n==getlocvar(fs,i).varname) return i; } return-1; } static void markupval(FuncState*fs,int level){ BlockCnt*bl=fs->bl; while(bl&&bl->nactvar>level)bl=bl->previous; if(bl)bl->upval=1; } static int singlevaraux(FuncState*fs,TString*n,expdesc*var,int base){ if(fs==NULL){ init_exp(var,VGLOBAL,((1<<8)-1)); return VGLOBAL; } else{ int v=searchvar(fs,n); if(v>=0){ init_exp(var,VLOCAL,v); if(!base) markupval(fs,v); return VLOCAL; } else{ if(singlevaraux(fs->prev,n,var,0)==VGLOBAL) return VGLOBAL; var->u.s.info=indexupvalue(fs,n,var); var->k=VUPVAL; return VUPVAL; } } } static void singlevar(LexState*ls,expdesc*var){ TString*varname=str_checkname(ls); FuncState*fs=ls->fs; if(singlevaraux(fs,varname,var,1)==VGLOBAL) var->u.s.info=luaK_stringK(fs,varname); } static void adjust_assign(LexState*ls,int nvars,int nexps,expdesc*e){ FuncState*fs=ls->fs; int extra=nvars-nexps; if(hasmultret(e->k)){ extra++; if(extra<0)extra=0; luaK_setreturns(fs,e,extra); if(extra>1)luaK_reserveregs(fs,extra-1); } else{ if(e->k!=VVOID)luaK_exp2nextreg(fs,e); if(extra>0){ int reg=fs->freereg; luaK_reserveregs(fs,extra); luaK_nil(fs,reg,extra); } } } static void enterlevel(LexState*ls){ if(++ls->L->nCcalls>200) luaX_lexerror(ls,"chunk has too many syntax levels",0); } #define leavelevel(ls)((ls)->L->nCcalls--) static void enterblock(FuncState*fs,BlockCnt*bl,lu_byte isbreakable){ bl->breaklist=(-1); bl->isbreakable=isbreakable; bl->nactvar=fs->nactvar; bl->upval=0; bl->previous=fs->bl; fs->bl=bl; } static void leaveblock(FuncState*fs){ BlockCnt*bl=fs->bl; fs->bl=bl->previous; removevars(fs->ls,bl->nactvar); if(bl->upval) luaK_codeABC(fs,OP_CLOSE,bl->nactvar,0,0); fs->freereg=fs->nactvar; luaK_patchtohere(fs,bl->breaklist); } static void pushclosure(LexState*ls,FuncState*func,expdesc*v){ FuncState*fs=ls->fs; Proto*f=fs->f; int oldsize=f->sizep; int i; luaM_growvector(ls->L,f->p,fs->np,f->sizep,Proto*, ((1<<(9+9))-1),"constant table overflow"); while(oldsizesizep)f->p[oldsize++]=NULL; f->p[fs->np++]=func->f; luaC_objbarrier(ls->L,f,func->f); init_exp(v,VRELOCABLE,luaK_codeABx(fs,OP_CLOSURE,0,fs->np-1)); for(i=0;if->nups;i++){ OpCode o=(func->upvalues[i].k==VLOCAL)?OP_MOVE:OP_GETUPVAL; luaK_codeABC(fs,o,0,func->upvalues[i].info,0); } } static void open_func(LexState*ls,FuncState*fs){ lua_State*L=ls->L; Proto*f=luaF_newproto(L); fs->f=f; fs->prev=ls->fs; fs->ls=ls; fs->L=L; ls->fs=fs; fs->pc=0; fs->lasttarget=-1; fs->jpc=(-1); fs->freereg=0; fs->nk=0; fs->np=0; fs->nlocvars=0; fs->nactvar=0; fs->bl=NULL; f->source=ls->source; f->maxstacksize=2; fs->h=luaH_new(L,0,0); sethvalue(L,L->top,fs->h); incr_top(L); setptvalue(L,L->top,f); incr_top(L); } static void close_func(LexState*ls){ lua_State*L=ls->L; FuncState*fs=ls->fs; Proto*f=fs->f; removevars(ls,0); luaK_ret(fs,0,0); luaM_reallocvector(L,f->code,f->sizecode,fs->pc,Instruction); f->sizecode=fs->pc; luaM_reallocvector(L,f->lineinfo,f->sizelineinfo,fs->pc,int); f->sizelineinfo=fs->pc; luaM_reallocvector(L,f->k,f->sizek,fs->nk,TValue); f->sizek=fs->nk; luaM_reallocvector(L,f->p,f->sizep,fs->np,Proto*); f->sizep=fs->np; luaM_reallocvector(L,f->locvars,f->sizelocvars,fs->nlocvars,LocVar); f->sizelocvars=fs->nlocvars; luaM_reallocvector(L,f->upvalues,f->sizeupvalues,f->nups,TString*); f->sizeupvalues=f->nups; ls->fs=fs->prev; if(fs)anchor_token(ls); L->top-=2; } static Proto*luaY_parser(lua_State*L,ZIO*z,Mbuffer*buff,const char*name){ struct LexState lexstate; struct FuncState funcstate; lexstate.buff=buff; luaX_setinput(L,&lexstate,z,luaS_new(L,name)); open_func(&lexstate,&funcstate); funcstate.f->is_vararg=2; luaX_next(&lexstate); chunk(&lexstate); check(&lexstate,TK_EOS); close_func(&lexstate); return funcstate.f; } static void field(LexState*ls,expdesc*v){ FuncState*fs=ls->fs; expdesc key; luaK_exp2anyreg(fs,v); luaX_next(ls); checkname(ls,&key); luaK_indexed(fs,v,&key); } static void yindex(LexState*ls,expdesc*v){ luaX_next(ls); expr(ls,v); luaK_exp2val(ls->fs,v); checknext(ls,']'); } struct ConsControl{ expdesc v; expdesc*t; int nh; int na; int tostore; }; static void recfield(LexState*ls,struct ConsControl*cc){ FuncState*fs=ls->fs; int reg=ls->fs->freereg; expdesc key,val; int rkkey; if(ls->t.token==TK_NAME){ luaY_checklimit(fs,cc->nh,(INT_MAX-2),"items in a constructor"); checkname(ls,&key); } else yindex(ls,&key); cc->nh++; checknext(ls,'='); rkkey=luaK_exp2RK(fs,&key); expr(ls,&val); luaK_codeABC(fs,OP_SETTABLE,cc->t->u.s.info,rkkey,luaK_exp2RK(fs,&val)); fs->freereg=reg; } static void closelistfield(FuncState*fs,struct ConsControl*cc){ if(cc->v.k==VVOID)return; luaK_exp2nextreg(fs,&cc->v); cc->v.k=VVOID; if(cc->tostore==50){ luaK_setlist(fs,cc->t->u.s.info,cc->na,cc->tostore); cc->tostore=0; } } static void lastlistfield(FuncState*fs,struct ConsControl*cc){ if(cc->tostore==0)return; if(hasmultret(cc->v.k)){ luaK_setmultret(fs,&cc->v); luaK_setlist(fs,cc->t->u.s.info,cc->na,(-1)); cc->na--; } else{ if(cc->v.k!=VVOID) luaK_exp2nextreg(fs,&cc->v); luaK_setlist(fs,cc->t->u.s.info,cc->na,cc->tostore); } } static void listfield(LexState*ls,struct ConsControl*cc){ expr(ls,&cc->v); luaY_checklimit(ls->fs,cc->na,(INT_MAX-2),"items in a constructor"); cc->na++; cc->tostore++; } static void constructor(LexState*ls,expdesc*t){ FuncState*fs=ls->fs; int line=ls->linenumber; int pc=luaK_codeABC(fs,OP_NEWTABLE,0,0,0); struct ConsControl cc; cc.na=cc.nh=cc.tostore=0; cc.t=t; init_exp(t,VRELOCABLE,pc); init_exp(&cc.v,VVOID,0); luaK_exp2nextreg(ls->fs,t); checknext(ls,'{'); do{ if(ls->t.token=='}')break; closelistfield(fs,&cc); switch(ls->t.token){ case TK_NAME:{ luaX_lookahead(ls); if(ls->lookahead.token!='=') listfield(ls,&cc); else recfield(ls,&cc); break; } case'[':{ recfield(ls,&cc); break; } default:{ listfield(ls,&cc); break; } } }while(testnext(ls,',')||testnext(ls,';')); check_match(ls,'}','{',line); lastlistfield(fs,&cc); SETARG_B(fs->f->code[pc],luaO_int2fb(cc.na)); SETARG_C(fs->f->code[pc],luaO_int2fb(cc.nh)); } static void parlist(LexState*ls){ FuncState*fs=ls->fs; Proto*f=fs->f; int nparams=0; f->is_vararg=0; if(ls->t.token!=')'){ do{ switch(ls->t.token){ case TK_NAME:{ new_localvar(ls,str_checkname(ls),nparams++); break; } case TK_DOTS:{ luaX_next(ls); f->is_vararg|=2; break; } default:luaX_syntaxerror(ls," or "LUA_QL("...")" expected"); } }while(!f->is_vararg&&testnext(ls,',')); } adjustlocalvars(ls,nparams); f->numparams=cast_byte(fs->nactvar-(f->is_vararg&1)); luaK_reserveregs(fs,fs->nactvar); } static void body(LexState*ls,expdesc*e,int needself,int line){ FuncState new_fs; open_func(ls,&new_fs); new_fs.f->linedefined=line; checknext(ls,'('); if(needself){ new_localvarliteral(ls,"self",0); adjustlocalvars(ls,1); } parlist(ls); checknext(ls,')'); chunk(ls); new_fs.f->lastlinedefined=ls->linenumber; check_match(ls,TK_END,TK_FUNCTION,line); close_func(ls); pushclosure(ls,&new_fs,e); } static int explist1(LexState*ls,expdesc*v){ int n=1; expr(ls,v); while(testnext(ls,',')){ luaK_exp2nextreg(ls->fs,v); expr(ls,v); n++; } return n; } static void funcargs(LexState*ls,expdesc*f){ FuncState*fs=ls->fs; expdesc args; int base,nparams; int line=ls->linenumber; switch(ls->t.token){ case'(':{ if(line!=ls->lastline) luaX_syntaxerror(ls,"ambiguous syntax (function call x new statement)"); luaX_next(ls); if(ls->t.token==')') args.k=VVOID; else{ explist1(ls,&args); luaK_setmultret(fs,&args); } check_match(ls,')','(',line); break; } case'{':{ constructor(ls,&args); break; } case TK_STRING:{ codestring(ls,&args,ls->t.seminfo.ts); luaX_next(ls); break; } default:{ luaX_syntaxerror(ls,"function arguments expected"); return; } } base=f->u.s.info; if(hasmultret(args.k)) nparams=(-1); else{ if(args.k!=VVOID) luaK_exp2nextreg(fs,&args); nparams=fs->freereg-(base+1); } init_exp(f,VCALL,luaK_codeABC(fs,OP_CALL,base,nparams+1,2)); luaK_fixline(fs,line); fs->freereg=base+1; } static void prefixexp(LexState*ls,expdesc*v){ switch(ls->t.token){ case'(':{ int line=ls->linenumber; luaX_next(ls); expr(ls,v); check_match(ls,')','(',line); luaK_dischargevars(ls->fs,v); return; } case TK_NAME:{ singlevar(ls,v); return; } default:{ luaX_syntaxerror(ls,"unexpected symbol"); return; } } } static void primaryexp(LexState*ls,expdesc*v){ FuncState*fs=ls->fs; prefixexp(ls,v); for(;;){ switch(ls->t.token){ case'.':{ field(ls,v); break; } case'[':{ expdesc key; luaK_exp2anyreg(fs,v); yindex(ls,&key); luaK_indexed(fs,v,&key); break; } case':':{ expdesc key; luaX_next(ls); checkname(ls,&key); luaK_self(fs,v,&key); funcargs(ls,v); break; } case'(':case TK_STRING:case'{':{ luaK_exp2nextreg(fs,v); funcargs(ls,v); break; } default:return; } } } static void simpleexp(LexState*ls,expdesc*v){ switch(ls->t.token){ case TK_NUMBER:{ init_exp(v,VKNUM,0); v->u.nval=ls->t.seminfo.r; break; } case TK_STRING:{ codestring(ls,v,ls->t.seminfo.ts); break; } case TK_NIL:{ init_exp(v,VNIL,0); break; } case TK_TRUE:{ init_exp(v,VTRUE,0); break; } case TK_FALSE:{ init_exp(v,VFALSE,0); break; } case TK_DOTS:{ FuncState*fs=ls->fs; check_condition(ls,fs->f->is_vararg, "cannot use "LUA_QL("...")" outside a vararg function"); fs->f->is_vararg&=~4; init_exp(v,VVARARG,luaK_codeABC(fs,OP_VARARG,0,1,0)); break; } case'{':{ constructor(ls,v); return; } case TK_FUNCTION:{ luaX_next(ls); body(ls,v,0,ls->linenumber); return; } default:{ primaryexp(ls,v); return; } } luaX_next(ls); } static UnOpr getunopr(int op){ switch(op){ case TK_NOT:return OPR_NOT; case'-':return OPR_MINUS; case'#':return OPR_LEN; default:return OPR_NOUNOPR; } } static BinOpr getbinopr(int op){ switch(op){ case'+':return OPR_ADD; case'-':return OPR_SUB; case'*':return OPR_MUL; case'/':return OPR_DIV; case'%':return OPR_MOD; case'^':return OPR_POW; case TK_CONCAT:return OPR_CONCAT; case TK_NE:return OPR_NE; case TK_EQ:return OPR_EQ; case'<':return OPR_LT; case TK_LE:return OPR_LE; case'>':return OPR_GT; case TK_GE:return OPR_GE; case TK_AND:return OPR_AND; case TK_OR:return OPR_OR; default:return OPR_NOBINOPR; } } static const struct{ lu_byte left; lu_byte right; }priority[]={ {6,6},{6,6},{7,7},{7,7},{7,7}, {10,9},{5,4}, {3,3},{3,3}, {3,3},{3,3},{3,3},{3,3}, {2,2},{1,1} }; static BinOpr subexpr(LexState*ls,expdesc*v,unsigned int limit){ BinOpr op; UnOpr uop; enterlevel(ls); uop=getunopr(ls->t.token); if(uop!=OPR_NOUNOPR){ luaX_next(ls); subexpr(ls,v,8); luaK_prefix(ls->fs,uop,v); } else simpleexp(ls,v); op=getbinopr(ls->t.token); while(op!=OPR_NOBINOPR&&priority[op].left>limit){ expdesc v2; BinOpr nextop; luaX_next(ls); luaK_infix(ls->fs,op,v); nextop=subexpr(ls,&v2,priority[op].right); luaK_posfix(ls->fs,op,v,&v2); op=nextop; } leavelevel(ls); return op; } static void expr(LexState*ls,expdesc*v){ subexpr(ls,v,0); } static int block_follow(int token){ switch(token){ case TK_ELSE:case TK_ELSEIF:case TK_END: case TK_UNTIL:case TK_EOS: return 1; default:return 0; } } static void block(LexState*ls){ FuncState*fs=ls->fs; BlockCnt bl; enterblock(fs,&bl,0); chunk(ls); leaveblock(fs); } struct LHS_assign{ struct LHS_assign*prev; expdesc v; }; static void check_conflict(LexState*ls,struct LHS_assign*lh,expdesc*v){ FuncState*fs=ls->fs; int extra=fs->freereg; int conflict=0; for(;lh;lh=lh->prev){ if(lh->v.k==VINDEXED){ if(lh->v.u.s.info==v->u.s.info){ conflict=1; lh->v.u.s.info=extra; } if(lh->v.u.s.aux==v->u.s.info){ conflict=1; lh->v.u.s.aux=extra; } } } if(conflict){ luaK_codeABC(fs,OP_MOVE,fs->freereg,v->u.s.info,0); luaK_reserveregs(fs,1); } } static void assignment(LexState*ls,struct LHS_assign*lh,int nvars){ expdesc e; check_condition(ls,VLOCAL<=lh->v.k&&lh->v.k<=VINDEXED, "syntax error"); if(testnext(ls,',')){ struct LHS_assign nv; nv.prev=lh; primaryexp(ls,&nv.v); if(nv.v.k==VLOCAL) check_conflict(ls,lh,&nv.v); luaY_checklimit(ls->fs,nvars,200-ls->L->nCcalls, "variables in assignment"); assignment(ls,&nv,nvars+1); } else{ int nexps; checknext(ls,'='); nexps=explist1(ls,&e); if(nexps!=nvars){ adjust_assign(ls,nvars,nexps,&e); if(nexps>nvars) ls->fs->freereg-=nexps-nvars; } else{ luaK_setoneret(ls->fs,&e); luaK_storevar(ls->fs,&lh->v,&e); return; } } init_exp(&e,VNONRELOC,ls->fs->freereg-1); luaK_storevar(ls->fs,&lh->v,&e); } static int cond(LexState*ls){ expdesc v; expr(ls,&v); if(v.k==VNIL)v.k=VFALSE; luaK_goiftrue(ls->fs,&v); return v.f; } static void breakstat(LexState*ls){ FuncState*fs=ls->fs; BlockCnt*bl=fs->bl; int upval=0; while(bl&&!bl->isbreakable){ upval|=bl->upval; bl=bl->previous; } if(!bl) luaX_syntaxerror(ls,"no loop to break"); if(upval) luaK_codeABC(fs,OP_CLOSE,bl->nactvar,0,0); luaK_concat(fs,&bl->breaklist,luaK_jump(fs)); } static void whilestat(LexState*ls,int line){ FuncState*fs=ls->fs; int whileinit; int condexit; BlockCnt bl; luaX_next(ls); whileinit=luaK_getlabel(fs); condexit=cond(ls); enterblock(fs,&bl,1); checknext(ls,TK_DO); block(ls); luaK_patchlist(fs,luaK_jump(fs),whileinit); check_match(ls,TK_END,TK_WHILE,line); leaveblock(fs); luaK_patchtohere(fs,condexit); } static void repeatstat(LexState*ls,int line){ int condexit; FuncState*fs=ls->fs; int repeat_init=luaK_getlabel(fs); BlockCnt bl1,bl2; enterblock(fs,&bl1,1); enterblock(fs,&bl2,0); luaX_next(ls); chunk(ls); check_match(ls,TK_UNTIL,TK_REPEAT,line); condexit=cond(ls); if(!bl2.upval){ leaveblock(fs); luaK_patchlist(ls->fs,condexit,repeat_init); } else{ breakstat(ls); luaK_patchtohere(ls->fs,condexit); leaveblock(fs); luaK_patchlist(ls->fs,luaK_jump(fs),repeat_init); } leaveblock(fs); } static int exp1(LexState*ls){ expdesc e; int k; expr(ls,&e); k=e.k; luaK_exp2nextreg(ls->fs,&e); return k; } static void forbody(LexState*ls,int base,int line,int nvars,int isnum){ BlockCnt bl; FuncState*fs=ls->fs; int prep,endfor; adjustlocalvars(ls,3); checknext(ls,TK_DO); prep=isnum?luaK_codeAsBx(fs,OP_FORPREP,base,(-1)):luaK_jump(fs); enterblock(fs,&bl,0); adjustlocalvars(ls,nvars); luaK_reserveregs(fs,nvars); block(ls); leaveblock(fs); luaK_patchtohere(fs,prep); endfor=(isnum)?luaK_codeAsBx(fs,OP_FORLOOP,base,(-1)): luaK_codeABC(fs,OP_TFORLOOP,base,0,nvars); luaK_fixline(fs,line); luaK_patchlist(fs,(isnum?endfor:luaK_jump(fs)),prep+1); } static void fornum(LexState*ls,TString*varname,int line){ FuncState*fs=ls->fs; int base=fs->freereg; new_localvarliteral(ls,"(for index)",0); new_localvarliteral(ls,"(for limit)",1); new_localvarliteral(ls,"(for step)",2); new_localvar(ls,varname,3); checknext(ls,'='); exp1(ls); checknext(ls,','); exp1(ls); if(testnext(ls,',')) exp1(ls); else{ luaK_codeABx(fs,OP_LOADK,fs->freereg,luaK_numberK(fs,1)); luaK_reserveregs(fs,1); } forbody(ls,base,line,1,1); } static void forlist(LexState*ls,TString*indexname){ FuncState*fs=ls->fs; expdesc e; int nvars=0; int line; int base=fs->freereg; new_localvarliteral(ls,"(for generator)",nvars++); new_localvarliteral(ls,"(for state)",nvars++); new_localvarliteral(ls,"(for control)",nvars++); new_localvar(ls,indexname,nvars++); while(testnext(ls,',')) new_localvar(ls,str_checkname(ls),nvars++); checknext(ls,TK_IN); line=ls->linenumber; adjust_assign(ls,3,explist1(ls,&e),&e); luaK_checkstack(fs,3); forbody(ls,base,line,nvars-3,0); } static void forstat(LexState*ls,int line){ FuncState*fs=ls->fs; TString*varname; BlockCnt bl; enterblock(fs,&bl,1); luaX_next(ls); varname=str_checkname(ls); switch(ls->t.token){ case'=':fornum(ls,varname,line);break; case',':case TK_IN:forlist(ls,varname);break; default:luaX_syntaxerror(ls,LUA_QL("=")" or "LUA_QL("in")" expected"); } check_match(ls,TK_END,TK_FOR,line); leaveblock(fs); } static int test_then_block(LexState*ls){ int condexit; luaX_next(ls); condexit=cond(ls); checknext(ls,TK_THEN); block(ls); return condexit; } static void ifstat(LexState*ls,int line){ FuncState*fs=ls->fs; int flist; int escapelist=(-1); flist=test_then_block(ls); while(ls->t.token==TK_ELSEIF){ luaK_concat(fs,&escapelist,luaK_jump(fs)); luaK_patchtohere(fs,flist); flist=test_then_block(ls); } if(ls->t.token==TK_ELSE){ luaK_concat(fs,&escapelist,luaK_jump(fs)); luaK_patchtohere(fs,flist); luaX_next(ls); block(ls); } else luaK_concat(fs,&escapelist,flist); luaK_patchtohere(fs,escapelist); check_match(ls,TK_END,TK_IF,line); } static void localfunc(LexState*ls){ expdesc v,b; FuncState*fs=ls->fs; new_localvar(ls,str_checkname(ls),0); init_exp(&v,VLOCAL,fs->freereg); luaK_reserveregs(fs,1); adjustlocalvars(ls,1); body(ls,&b,0,ls->linenumber); luaK_storevar(fs,&v,&b); getlocvar(fs,fs->nactvar-1).startpc=fs->pc; } static void localstat(LexState*ls){ int nvars=0; int nexps; expdesc e; do{ new_localvar(ls,str_checkname(ls),nvars++); }while(testnext(ls,',')); if(testnext(ls,'=')) nexps=explist1(ls,&e); else{ e.k=VVOID; nexps=0; } adjust_assign(ls,nvars,nexps,&e); adjustlocalvars(ls,nvars); } static int funcname(LexState*ls,expdesc*v){ int needself=0; singlevar(ls,v); while(ls->t.token=='.') field(ls,v); if(ls->t.token==':'){ needself=1; field(ls,v); } return needself; } static void funcstat(LexState*ls,int line){ int needself; expdesc v,b; luaX_next(ls); needself=funcname(ls,&v); body(ls,&b,needself,line); luaK_storevar(ls->fs,&v,&b); luaK_fixline(ls->fs,line); } static void exprstat(LexState*ls){ FuncState*fs=ls->fs; struct LHS_assign v; primaryexp(ls,&v.v); if(v.v.k==VCALL) SETARG_C(getcode(fs,&v.v),1); else{ v.prev=NULL; assignment(ls,&v,1); } } static void retstat(LexState*ls){ FuncState*fs=ls->fs; expdesc e; int first,nret; luaX_next(ls); if(block_follow(ls->t.token)||ls->t.token==';') first=nret=0; else{ nret=explist1(ls,&e); if(hasmultret(e.k)){ luaK_setmultret(fs,&e); if(e.k==VCALL&&nret==1){ SET_OPCODE(getcode(fs,&e),OP_TAILCALL); } first=fs->nactvar; nret=(-1); } else{ if(nret==1) first=luaK_exp2anyreg(fs,&e); else{ luaK_exp2nextreg(fs,&e); first=fs->nactvar; } } } luaK_ret(fs,first,nret); } static int statement(LexState*ls){ int line=ls->linenumber; switch(ls->t.token){ case TK_IF:{ ifstat(ls,line); return 0; } case TK_WHILE:{ whilestat(ls,line); return 0; } case TK_DO:{ luaX_next(ls); block(ls); check_match(ls,TK_END,TK_DO,line); return 0; } case TK_FOR:{ forstat(ls,line); return 0; } case TK_REPEAT:{ repeatstat(ls,line); return 0; } case TK_FUNCTION:{ funcstat(ls,line); return 0; } case TK_LOCAL:{ luaX_next(ls); if(testnext(ls,TK_FUNCTION)) localfunc(ls); else localstat(ls); return 0; } case TK_RETURN:{ retstat(ls); return 1; } case TK_BREAK:{ luaX_next(ls); breakstat(ls); return 1; } default:{ exprstat(ls); return 0; } } } static void chunk(LexState*ls){ int islast=0; enterlevel(ls); while(!islast&&!block_follow(ls->t.token)){ islast=statement(ls); testnext(ls,';'); ls->fs->freereg=ls->fs->nactvar; } leavelevel(ls); } static const TValue*luaV_tonumber(const TValue*obj,TValue*n){ lua_Number num; if(ttisnumber(obj))return obj; if(ttisstring(obj)&&luaO_str2d(svalue(obj),&num)){ setnvalue(n,num); return n; } else return NULL; } static int luaV_tostring(lua_State*L,StkId obj){ if(!ttisnumber(obj)) return 0; else{ char s[32]; lua_Number n=nvalue(obj); lua_number2str(s,n); setsvalue(L,obj,luaS_new(L,s)); return 1; } } static void callTMres(lua_State*L,StkId res,const TValue*f, const TValue*p1,const TValue*p2){ ptrdiff_t result=savestack(L,res); setobj(L,L->top,f); setobj(L,L->top+1,p1); setobj(L,L->top+2,p2); luaD_checkstack(L,3); L->top+=3; luaD_call(L,L->top-3,1); res=restorestack(L,result); L->top--; setobj(L,res,L->top); } static void callTM(lua_State*L,const TValue*f,const TValue*p1, const TValue*p2,const TValue*p3){ setobj(L,L->top,f); setobj(L,L->top+1,p1); setobj(L,L->top+2,p2); setobj(L,L->top+3,p3); luaD_checkstack(L,4); L->top+=4; luaD_call(L,L->top-4,0); } static void luaV_gettable(lua_State*L,const TValue*t,TValue*key,StkId val){ int loop; for(loop=0;loop<100;loop++){ const TValue*tm; if(ttistable(t)){ Table*h=hvalue(t); const TValue*res=luaH_get(h,key); if(!ttisnil(res)|| (tm=fasttm(L,h->metatable,TM_INDEX))==NULL){ setobj(L,val,res); return; } } else if(ttisnil(tm=luaT_gettmbyobj(L,t,TM_INDEX))) luaG_typeerror(L,t,"index"); if(ttisfunction(tm)){ callTMres(L,val,tm,t,key); return; } t=tm; } luaG_runerror(L,"loop in gettable"); } static void luaV_settable(lua_State*L,const TValue*t,TValue*key,StkId val){ int loop; TValue temp; for(loop=0;loop<100;loop++){ const TValue*tm; if(ttistable(t)){ Table*h=hvalue(t); TValue*oldval=luaH_set(L,h,key); if(!ttisnil(oldval)|| (tm=fasttm(L,h->metatable,TM_NEWINDEX))==NULL){ setobj(L,oldval,val); h->flags=0; luaC_barriert(L,h,val); return; } } else if(ttisnil(tm=luaT_gettmbyobj(L,t,TM_NEWINDEX))) luaG_typeerror(L,t,"index"); if(ttisfunction(tm)){ callTM(L,tm,t,key,val); return; } setobj(L,&temp,tm); t=&temp; } luaG_runerror(L,"loop in settable"); } static int call_binTM(lua_State*L,const TValue*p1,const TValue*p2, StkId res,TMS event){ const TValue*tm=luaT_gettmbyobj(L,p1,event); if(ttisnil(tm)) tm=luaT_gettmbyobj(L,p2,event); if(ttisnil(tm))return 0; callTMres(L,res,tm,p1,p2); return 1; } static const TValue*get_compTM(lua_State*L,Table*mt1,Table*mt2, TMS event){ const TValue*tm1=fasttm(L,mt1,event); const TValue*tm2; if(tm1==NULL)return NULL; if(mt1==mt2)return tm1; tm2=fasttm(L,mt2,event); if(tm2==NULL)return NULL; if(luaO_rawequalObj(tm1,tm2)) return tm1; return NULL; } static int call_orderTM(lua_State*L,const TValue*p1,const TValue*p2, TMS event){ const TValue*tm1=luaT_gettmbyobj(L,p1,event); const TValue*tm2; if(ttisnil(tm1))return-1; tm2=luaT_gettmbyobj(L,p2,event); if(!luaO_rawequalObj(tm1,tm2)) return-1; callTMres(L,L->top,tm1,p1,p2); return!l_isfalse(L->top); } static int l_strcmp(const TString*ls,const TString*rs){ const char*l=getstr(ls); size_t ll=ls->tsv.len; const char*r=getstr(rs); size_t lr=rs->tsv.len; for(;;){ int temp=strcoll(l,r); if(temp!=0)return temp; else{ size_t len=strlen(l); if(len==lr) return(len==ll)?0:1; else if(len==ll) return-1; len++; l+=len;ll-=len;r+=len;lr-=len; } } } static int luaV_lessthan(lua_State*L,const TValue*l,const TValue*r){ int res; if(ttype(l)!=ttype(r)) return luaG_ordererror(L,l,r); else if(ttisnumber(l)) return luai_numlt(nvalue(l),nvalue(r)); else if(ttisstring(l)) return l_strcmp(rawtsvalue(l),rawtsvalue(r))<0; else if((res=call_orderTM(L,l,r,TM_LT))!=-1) return res; return luaG_ordererror(L,l,r); } static int lessequal(lua_State*L,const TValue*l,const TValue*r){ int res; if(ttype(l)!=ttype(r)) return luaG_ordererror(L,l,r); else if(ttisnumber(l)) return luai_numle(nvalue(l),nvalue(r)); else if(ttisstring(l)) return l_strcmp(rawtsvalue(l),rawtsvalue(r))<=0; else if((res=call_orderTM(L,l,r,TM_LE))!=-1) return res; else if((res=call_orderTM(L,r,l,TM_LT))!=-1) return!res; return luaG_ordererror(L,l,r); } static int luaV_equalval(lua_State*L,const TValue*t1,const TValue*t2){ const TValue*tm; switch(ttype(t1)){ case 0:return 1; case 3:return luai_numeq(nvalue(t1),nvalue(t2)); case 1:return bvalue(t1)==bvalue(t2); case 2:return pvalue(t1)==pvalue(t2); case 7:{ if(uvalue(t1)==uvalue(t2))return 1; tm=get_compTM(L,uvalue(t1)->metatable,uvalue(t2)->metatable, TM_EQ); break; } case 5:{ if(hvalue(t1)==hvalue(t2))return 1; tm=get_compTM(L,hvalue(t1)->metatable,hvalue(t2)->metatable,TM_EQ); break; } default:return gcvalue(t1)==gcvalue(t2); } if(tm==NULL)return 0; callTMres(L,L->top,tm,t1,t2); return!l_isfalse(L->top); } static void luaV_concat(lua_State*L,int total,int last){ do{ StkId top=L->base+last+1; int n=2; if(!(ttisstring(top-2)||ttisnumber(top-2))||!tostring(L,top-1)){ if(!call_binTM(L,top-2,top-1,top-2,TM_CONCAT)) luaG_concaterror(L,top-2,top-1); }else if(tsvalue(top-1)->len==0) (void)tostring(L,top-2); else{ size_t tl=tsvalue(top-1)->len; char*buffer; int i; for(n=1;nlen; if(l>=((size_t)(~(size_t)0)-2)-tl)luaG_runerror(L,"string length overflow"); tl+=l; } buffer=luaZ_openspace(L,&G(L)->buff,tl); tl=0; for(i=n;i>0;i--){ size_t l=tsvalue(top-i)->len; memcpy(buffer+tl,svalue(top-i),l); tl+=l; } setsvalue(L,top-n,luaS_newlstr(L,buffer,tl)); } total-=n-1; last-=n-1; }while(total>1); } static void Arith(lua_State*L,StkId ra,const TValue*rb, const TValue*rc,TMS op){ TValue tempb,tempc; const TValue*b,*c; if((b=luaV_tonumber(rb,&tempb))!=NULL&& (c=luaV_tonumber(rc,&tempc))!=NULL){ lua_Number nb=nvalue(b),nc=nvalue(c); switch(op){ case TM_ADD:setnvalue(ra,luai_numadd(nb,nc));break; case TM_SUB:setnvalue(ra,luai_numsub(nb,nc));break; case TM_MUL:setnvalue(ra,luai_nummul(nb,nc));break; case TM_DIV:setnvalue(ra,luai_numdiv(nb,nc));break; case TM_MOD:setnvalue(ra,luai_nummod(nb,nc));break; case TM_POW:setnvalue(ra,luai_numpow(nb,nc));break; case TM_UNM:setnvalue(ra,luai_numunm(nb));break; default:break; } } else if(!call_binTM(L,rb,rc,ra,op)) luaG_aritherror(L,rb,rc); } #define runtime_check(L,c){if(!(c))break;} #define RA(i)(base+GETARG_A(i)) #define RB(i)check_exp(getBMode(GET_OPCODE(i))==OpArgR,base+GETARG_B(i)) #define RKB(i)check_exp(getBMode(GET_OPCODE(i))==OpArgK,ISK(GETARG_B(i))?k+INDEXK(GETARG_B(i)):base+GETARG_B(i)) #define RKC(i)check_exp(getCMode(GET_OPCODE(i))==OpArgK,ISK(GETARG_C(i))?k+INDEXK(GETARG_C(i)):base+GETARG_C(i)) #define KBx(i)check_exp(getBMode(GET_OPCODE(i))==OpArgK,k+GETARG_Bx(i)) #define dojump(L,pc,i){(pc)+=(i);} #define Protect(x){L->savedpc=pc;{x;};base=L->base;} #define arith_op(op,tm){TValue*rb=RKB(i);TValue*rc=RKC(i);if(ttisnumber(rb)&&ttisnumber(rc)){lua_Number nb=nvalue(rb),nc=nvalue(rc);setnvalue(ra,op(nb,nc));}else Protect(Arith(L,ra,rb,rc,tm));} static void luaV_execute(lua_State*L,int nexeccalls){ LClosure*cl; StkId base; TValue*k; const Instruction*pc; reentry: pc=L->savedpc; cl=&clvalue(L->ci->func)->l; base=L->base; k=cl->p->k; for(;;){ const Instruction i=*pc++; StkId ra; ra=RA(i); switch(GET_OPCODE(i)){ case OP_MOVE:{ setobj(L,ra,RB(i)); continue; } case OP_LOADK:{ setobj(L,ra,KBx(i)); continue; } case OP_LOADBOOL:{ setbvalue(ra,GETARG_B(i)); if(GETARG_C(i))pc++; continue; } case OP_LOADNIL:{ TValue*rb=RB(i); do{ setnilvalue(rb--); }while(rb>=ra); continue; } case OP_GETUPVAL:{ int b=GETARG_B(i); setobj(L,ra,cl->upvals[b]->v); continue; } case OP_GETGLOBAL:{ TValue g; TValue*rb=KBx(i); sethvalue(L,&g,cl->env); Protect(luaV_gettable(L,&g,rb,ra)); continue; } case OP_GETTABLE:{ Protect(luaV_gettable(L,RB(i),RKC(i),ra)); continue; } case OP_SETGLOBAL:{ TValue g; sethvalue(L,&g,cl->env); Protect(luaV_settable(L,&g,KBx(i),ra)); continue; } case OP_SETUPVAL:{ UpVal*uv=cl->upvals[GETARG_B(i)]; setobj(L,uv->v,ra); luaC_barrier(L,uv,ra); continue; } case OP_SETTABLE:{ Protect(luaV_settable(L,ra,RKB(i),RKC(i))); continue; } case OP_NEWTABLE:{ int b=GETARG_B(i); int c=GETARG_C(i); sethvalue(L,ra,luaH_new(L,luaO_fb2int(b),luaO_fb2int(c))); Protect(luaC_checkGC(L)); continue; } case OP_SELF:{ StkId rb=RB(i); setobj(L,ra+1,rb); Protect(luaV_gettable(L,rb,RKC(i),ra)); continue; } case OP_ADD:{ arith_op(luai_numadd,TM_ADD); continue; } case OP_SUB:{ arith_op(luai_numsub,TM_SUB); continue; } case OP_MUL:{ arith_op(luai_nummul,TM_MUL); continue; } case OP_DIV:{ arith_op(luai_numdiv,TM_DIV); continue; } case OP_MOD:{ arith_op(luai_nummod,TM_MOD); continue; } case OP_POW:{ arith_op(luai_numpow,TM_POW); continue; } case OP_UNM:{ TValue*rb=RB(i); if(ttisnumber(rb)){ lua_Number nb=nvalue(rb); setnvalue(ra,luai_numunm(nb)); } else{ Protect(Arith(L,ra,rb,rb,TM_UNM)); } continue; } case OP_NOT:{ int res=l_isfalse(RB(i)); setbvalue(ra,res); continue; } case OP_LEN:{ const TValue*rb=RB(i); switch(ttype(rb)){ case 5:{ setnvalue(ra,cast_num(luaH_getn(hvalue(rb)))); break; } case 4:{ setnvalue(ra,cast_num(tsvalue(rb)->len)); break; } default:{ Protect( if(!call_binTM(L,rb,(&luaO_nilobject_),ra,TM_LEN)) luaG_typeerror(L,rb,"get length of"); ) } } continue; } case OP_CONCAT:{ int b=GETARG_B(i); int c=GETARG_C(i); Protect(luaV_concat(L,c-b+1,c);luaC_checkGC(L)); setobj(L,RA(i),base+b); continue; } case OP_JMP:{ dojump(L,pc,GETARG_sBx(i)); continue; } case OP_EQ:{ TValue*rb=RKB(i); TValue*rc=RKC(i); Protect( if(equalobj(L,rb,rc)==GETARG_A(i)) dojump(L,pc,GETARG_sBx(*pc)); ) pc++; continue; } case OP_LT:{ Protect( if(luaV_lessthan(L,RKB(i),RKC(i))==GETARG_A(i)) dojump(L,pc,GETARG_sBx(*pc)); ) pc++; continue; } case OP_LE:{ Protect( if(lessequal(L,RKB(i),RKC(i))==GETARG_A(i)) dojump(L,pc,GETARG_sBx(*pc)); ) pc++; continue; } case OP_TEST:{ if(l_isfalse(ra)!=GETARG_C(i)) dojump(L,pc,GETARG_sBx(*pc)); pc++; continue; } case OP_TESTSET:{ TValue*rb=RB(i); if(l_isfalse(rb)!=GETARG_C(i)){ setobj(L,ra,rb); dojump(L,pc,GETARG_sBx(*pc)); } pc++; continue; } case OP_CALL:{ int b=GETARG_B(i); int nresults=GETARG_C(i)-1; if(b!=0)L->top=ra+b; L->savedpc=pc; switch(luaD_precall(L,ra,nresults)){ case 0:{ nexeccalls++; goto reentry; } case 1:{ if(nresults>=0)L->top=L->ci->top; base=L->base; continue; } default:{ return; } } } case OP_TAILCALL:{ int b=GETARG_B(i); if(b!=0)L->top=ra+b; L->savedpc=pc; switch(luaD_precall(L,ra,(-1))){ case 0:{ CallInfo*ci=L->ci-1; int aux; StkId func=ci->func; StkId pfunc=(ci+1)->func; if(L->openupval)luaF_close(L,ci->base); L->base=ci->base=ci->func+((ci+1)->base-pfunc); for(aux=0;pfunc+auxtop;aux++) setobj(L,func+aux,pfunc+aux); ci->top=L->top=func+aux; ci->savedpc=L->savedpc; ci->tailcalls++; L->ci--; goto reentry; } case 1:{ base=L->base; continue; } default:{ return; } } } case OP_RETURN:{ int b=GETARG_B(i); if(b!=0)L->top=ra+b-1; if(L->openupval)luaF_close(L,base); L->savedpc=pc; b=luaD_poscall(L,ra); if(--nexeccalls==0) return; else{ if(b)L->top=L->ci->top; goto reentry; } } case OP_FORLOOP:{ lua_Number step=nvalue(ra+2); lua_Number idx=luai_numadd(nvalue(ra),step); lua_Number limit=nvalue(ra+1); if(luai_numlt(0,step)?luai_numle(idx,limit) :luai_numle(limit,idx)){ dojump(L,pc,GETARG_sBx(i)); setnvalue(ra,idx); setnvalue(ra+3,idx); } continue; } case OP_FORPREP:{ const TValue*init=ra; const TValue*plimit=ra+1; const TValue*pstep=ra+2; L->savedpc=pc; if(!tonumber(init,ra)) luaG_runerror(L,LUA_QL("for")" initial value must be a number"); else if(!tonumber(plimit,ra+1)) luaG_runerror(L,LUA_QL("for")" limit must be a number"); else if(!tonumber(pstep,ra+2)) luaG_runerror(L,LUA_QL("for")" step must be a number"); setnvalue(ra,luai_numsub(nvalue(ra),nvalue(pstep))); dojump(L,pc,GETARG_sBx(i)); continue; } case OP_TFORLOOP:{ StkId cb=ra+3; setobj(L,cb+2,ra+2); setobj(L,cb+1,ra+1); setobj(L,cb,ra); L->top=cb+3; Protect(luaD_call(L,cb,GETARG_C(i))); L->top=L->ci->top; cb=RA(i)+3; if(!ttisnil(cb)){ setobj(L,cb-1,cb); dojump(L,pc,GETARG_sBx(*pc)); } pc++; continue; } case OP_SETLIST:{ int n=GETARG_B(i); int c=GETARG_C(i); int last; Table*h; if(n==0){ n=cast_int(L->top-ra)-1; L->top=L->ci->top; } if(c==0)c=cast_int(*pc++); runtime_check(L,ttistable(ra)); h=hvalue(ra); last=((c-1)*50)+n; if(last>h->sizearray) luaH_resizearray(L,h,last); for(;n>0;n--){ TValue*val=ra+n; setobj(L,luaH_setnum(L,h,last--),val); luaC_barriert(L,h,val); } continue; } case OP_CLOSE:{ luaF_close(L,ra); continue; } case OP_CLOSURE:{ Proto*p; Closure*ncl; int nup,j; p=cl->p->p[GETARG_Bx(i)]; nup=p->nups; ncl=luaF_newLclosure(L,nup,cl->env); ncl->l.p=p; for(j=0;jl.upvals[j]=cl->upvals[GETARG_B(*pc)]; else{ ncl->l.upvals[j]=luaF_findupval(L,base+GETARG_B(*pc)); } } setclvalue(L,ra,ncl); Protect(luaC_checkGC(L)); continue; } case OP_VARARG:{ int b=GETARG_B(i)-1; int j; CallInfo*ci=L->ci; int n=cast_int(ci->base-ci->func)-cl->p->numparams-1; if(b==(-1)){ Protect(luaD_checkstack(L,n)); ra=RA(i); b=n; L->top=ra+n; } for(j=0;jbase-n+j); } else{ setnilvalue(ra+j); } } continue; } } } } #define api_checknelems(L,n)luai_apicheck(L,(n)<=(L->top-L->base)) #define api_checkvalidindex(L,i)luai_apicheck(L,(i)!=(&luaO_nilobject_)) #define api_incr_top(L){luai_apicheck(L,L->topci->top);L->top++;} static TValue*index2adr(lua_State*L,int idx){ if(idx>0){ TValue*o=L->base+(idx-1); luai_apicheck(L,idx<=L->ci->top-L->base); if(o>=L->top)return cast(TValue*,(&luaO_nilobject_)); else return o; } else if(idx>(-10000)){ luai_apicheck(L,idx!=0&&-idx<=L->top-L->base); return L->top+idx; } else switch(idx){ case(-10000):return registry(L); case(-10001):{ Closure*func=curr_func(L); sethvalue(L,&L->env,func->c.env); return&L->env; } case(-10002):return gt(L); default:{ Closure*func=curr_func(L); idx=(-10002)-idx; return(idx<=func->c.nupvalues) ?&func->c.upvalue[idx-1] :cast(TValue*,(&luaO_nilobject_)); } } } static Table*getcurrenv(lua_State*L){ if(L->ci==L->base_ci) return hvalue(gt(L)); else{ Closure*func=curr_func(L); return func->c.env; } } static int lua_checkstack(lua_State*L,int size){ int res=1; if(size>8000||(L->top-L->base+size)>8000) res=0; else if(size>0){ luaD_checkstack(L,size); if(L->ci->toptop+size) L->ci->top=L->top+size; } return res; } static lua_CFunction lua_atpanic(lua_State*L,lua_CFunction panicf){ lua_CFunction old; old=G(L)->panic; G(L)->panic=panicf; return old; } static int lua_gettop(lua_State*L){ return cast_int(L->top-L->base); } static void lua_settop(lua_State*L,int idx){ if(idx>=0){ luai_apicheck(L,idx<=L->stack_last-L->base); while(L->topbase+idx) setnilvalue(L->top++); L->top=L->base+idx; } else{ luai_apicheck(L,-(idx+1)<=(L->top-L->base)); L->top+=idx+1; } } static void lua_remove(lua_State*L,int idx){ StkId p; p=index2adr(L,idx); api_checkvalidindex(L,p); while(++ptop)setobj(L,p-1,p); L->top--; } static void lua_insert(lua_State*L,int idx){ StkId p; StkId q; p=index2adr(L,idx); api_checkvalidindex(L,p); for(q=L->top;q>p;q--)setobj(L,q,q-1); setobj(L,p,L->top); } static void lua_replace(lua_State*L,int idx){ StkId o; if(idx==(-10001)&&L->ci==L->base_ci) luaG_runerror(L,"no calling environment"); api_checknelems(L,1); o=index2adr(L,idx); api_checkvalidindex(L,o); if(idx==(-10001)){ Closure*func=curr_func(L); luai_apicheck(L,ttistable(L->top-1)); func->c.env=hvalue(L->top-1); luaC_barrier(L,func,L->top-1); } else{ setobj(L,o,L->top-1); if(idx<(-10002)) luaC_barrier(L,curr_func(L),L->top-1); } L->top--; } static void lua_pushvalue(lua_State*L,int idx){ setobj(L,L->top,index2adr(L,idx)); api_incr_top(L); } static int lua_type(lua_State*L,int idx){ StkId o=index2adr(L,idx); return(o==(&luaO_nilobject_))?(-1):ttype(o); } static const char*lua_typename(lua_State*L,int t){ UNUSED(L); return(t==(-1))?"no value":luaT_typenames[t]; } static int lua_iscfunction(lua_State*L,int idx){ StkId o=index2adr(L,idx); return iscfunction(o); } static int lua_isnumber(lua_State*L,int idx){ TValue n; const TValue*o=index2adr(L,idx); return tonumber(o,&n); } static int lua_isstring(lua_State*L,int idx){ int t=lua_type(L,idx); return(t==4||t==3); } static int lua_rawequal(lua_State*L,int index1,int index2){ StkId o1=index2adr(L,index1); StkId o2=index2adr(L,index2); return(o1==(&luaO_nilobject_)||o2==(&luaO_nilobject_))?0 :luaO_rawequalObj(o1,o2); } static int lua_lessthan(lua_State*L,int index1,int index2){ StkId o1,o2; int i; o1=index2adr(L,index1); o2=index2adr(L,index2); i=(o1==(&luaO_nilobject_)||o2==(&luaO_nilobject_))?0 :luaV_lessthan(L,o1,o2); return i; } static lua_Number lua_tonumber(lua_State*L,int idx){ TValue n; const TValue*o=index2adr(L,idx); if(tonumber(o,&n)) return nvalue(o); else return 0; } static lua_Integer lua_tointeger(lua_State*L,int idx){ TValue n; const TValue*o=index2adr(L,idx); if(tonumber(o,&n)){ lua_Integer res; lua_Number num=nvalue(o); lua_number2integer(res,num); return res; } else return 0; } static int lua_toboolean(lua_State*L,int idx){ const TValue*o=index2adr(L,idx); return!l_isfalse(o); } static const char*lua_tolstring(lua_State*L,int idx,size_t*len){ StkId o=index2adr(L,idx); if(!ttisstring(o)){ if(!luaV_tostring(L,o)){ if(len!=NULL)*len=0; return NULL; } luaC_checkGC(L); o=index2adr(L,idx); } if(len!=NULL)*len=tsvalue(o)->len; return svalue(o); } static size_t lua_objlen(lua_State*L,int idx){ StkId o=index2adr(L,idx); switch(ttype(o)){ case 4:return tsvalue(o)->len; case 7:return uvalue(o)->len; case 5:return luaH_getn(hvalue(o)); case 3:{ size_t l; l=(luaV_tostring(L,o)?tsvalue(o)->len:0); return l; } default:return 0; } } static lua_CFunction lua_tocfunction(lua_State*L,int idx){ StkId o=index2adr(L,idx); return(!iscfunction(o))?NULL:clvalue(o)->c.f; } static void*lua_touserdata(lua_State*L,int idx){ StkId o=index2adr(L,idx); switch(ttype(o)){ case 7:return(rawuvalue(o)+1); case 2:return pvalue(o); default:return NULL; } } static void lua_pushnil(lua_State*L){ setnilvalue(L->top); api_incr_top(L); } static void lua_pushnumber(lua_State*L,lua_Number n){ setnvalue(L->top,n); api_incr_top(L); } static void lua_pushinteger(lua_State*L,lua_Integer n){ setnvalue(L->top,cast_num(n)); api_incr_top(L); } static void lua_pushlstring(lua_State*L,const char*s,size_t len){ luaC_checkGC(L); setsvalue(L,L->top,luaS_newlstr(L,s,len)); api_incr_top(L); } static void lua_pushstring(lua_State*L,const char*s){ if(s==NULL) lua_pushnil(L); else lua_pushlstring(L,s,strlen(s)); } static const char*lua_pushvfstring(lua_State*L,const char*fmt, va_list argp){ const char*ret; luaC_checkGC(L); ret=luaO_pushvfstring(L,fmt,argp); return ret; } static const char*lua_pushfstring(lua_State*L,const char*fmt,...){ const char*ret; va_list argp; luaC_checkGC(L); va_start(argp,fmt); ret=luaO_pushvfstring(L,fmt,argp); va_end(argp); return ret; } static void lua_pushcclosure(lua_State*L,lua_CFunction fn,int n){ Closure*cl; luaC_checkGC(L); api_checknelems(L,n); cl=luaF_newCclosure(L,n,getcurrenv(L)); cl->c.f=fn; L->top-=n; while(n--) setobj(L,&cl->c.upvalue[n],L->top+n); setclvalue(L,L->top,cl); api_incr_top(L); } static void lua_pushboolean(lua_State*L,int b){ setbvalue(L->top,(b!=0)); api_incr_top(L); } static int lua_pushthread(lua_State*L){ setthvalue(L,L->top,L); api_incr_top(L); return(G(L)->mainthread==L); } static void lua_gettable(lua_State*L,int idx){ StkId t; t=index2adr(L,idx); api_checkvalidindex(L,t); luaV_gettable(L,t,L->top-1,L->top-1); } static void lua_getfield(lua_State*L,int idx,const char*k){ StkId t; TValue key; t=index2adr(L,idx); api_checkvalidindex(L,t); setsvalue(L,&key,luaS_new(L,k)); luaV_gettable(L,t,&key,L->top); api_incr_top(L); } static void lua_rawget(lua_State*L,int idx){ StkId t; t=index2adr(L,idx); luai_apicheck(L,ttistable(t)); setobj(L,L->top-1,luaH_get(hvalue(t),L->top-1)); } static void lua_rawgeti(lua_State*L,int idx,int n){ StkId o; o=index2adr(L,idx); luai_apicheck(L,ttistable(o)); setobj(L,L->top,luaH_getnum(hvalue(o),n)); api_incr_top(L); } static void lua_createtable(lua_State*L,int narray,int nrec){ luaC_checkGC(L); sethvalue(L,L->top,luaH_new(L,narray,nrec)); api_incr_top(L); } static int lua_getmetatable(lua_State*L,int objindex){ const TValue*obj; Table*mt=NULL; int res; obj=index2adr(L,objindex); switch(ttype(obj)){ case 5: mt=hvalue(obj)->metatable; break; case 7: mt=uvalue(obj)->metatable; break; default: mt=G(L)->mt[ttype(obj)]; break; } if(mt==NULL) res=0; else{ sethvalue(L,L->top,mt); api_incr_top(L); res=1; } return res; } static void lua_getfenv(lua_State*L,int idx){ StkId o; o=index2adr(L,idx); api_checkvalidindex(L,o); switch(ttype(o)){ case 6: sethvalue(L,L->top,clvalue(o)->c.env); break; case 7: sethvalue(L,L->top,uvalue(o)->env); break; case 8: setobj(L,L->top,gt(thvalue(o))); break; default: setnilvalue(L->top); break; } api_incr_top(L); } static void lua_settable(lua_State*L,int idx){ StkId t; api_checknelems(L,2); t=index2adr(L,idx); api_checkvalidindex(L,t); luaV_settable(L,t,L->top-2,L->top-1); L->top-=2; } static void lua_setfield(lua_State*L,int idx,const char*k){ StkId t; TValue key; api_checknelems(L,1); t=index2adr(L,idx); api_checkvalidindex(L,t); setsvalue(L,&key,luaS_new(L,k)); luaV_settable(L,t,&key,L->top-1); L->top--; } static void lua_rawset(lua_State*L,int idx){ StkId t; api_checknelems(L,2); t=index2adr(L,idx); luai_apicheck(L,ttistable(t)); setobj(L,luaH_set(L,hvalue(t),L->top-2),L->top-1); luaC_barriert(L,hvalue(t),L->top-1); L->top-=2; } static void lua_rawseti(lua_State*L,int idx,int n){ StkId o; api_checknelems(L,1); o=index2adr(L,idx); luai_apicheck(L,ttistable(o)); setobj(L,luaH_setnum(L,hvalue(o),n),L->top-1); luaC_barriert(L,hvalue(o),L->top-1); L->top--; } static int lua_setmetatable(lua_State*L,int objindex){ TValue*obj; Table*mt; api_checknelems(L,1); obj=index2adr(L,objindex); api_checkvalidindex(L,obj); if(ttisnil(L->top-1)) mt=NULL; else{ luai_apicheck(L,ttistable(L->top-1)); mt=hvalue(L->top-1); } switch(ttype(obj)){ case 5:{ hvalue(obj)->metatable=mt; if(mt) luaC_objbarriert(L,hvalue(obj),mt); break; } case 7:{ uvalue(obj)->metatable=mt; if(mt) luaC_objbarrier(L,rawuvalue(obj),mt); break; } default:{ G(L)->mt[ttype(obj)]=mt; break; } } L->top--; return 1; } static int lua_setfenv(lua_State*L,int idx){ StkId o; int res=1; api_checknelems(L,1); o=index2adr(L,idx); api_checkvalidindex(L,o); luai_apicheck(L,ttistable(L->top-1)); switch(ttype(o)){ case 6: clvalue(o)->c.env=hvalue(L->top-1); break; case 7: uvalue(o)->env=hvalue(L->top-1); break; case 8: sethvalue(L,gt(thvalue(o)),hvalue(L->top-1)); break; default: res=0; break; } if(res)luaC_objbarrier(L,gcvalue(o),hvalue(L->top-1)); L->top--; return res; } #define adjustresults(L,nres){if(nres==(-1)&&L->top>=L->ci->top)L->ci->top=L->top;} #define checkresults(L,na,nr)luai_apicheck(L,(nr)==(-1)||(L->ci->top-L->top>=(nr)-(na))) static void lua_call(lua_State*L,int nargs,int nresults){ StkId func; api_checknelems(L,nargs+1); checkresults(L,nargs,nresults); func=L->top-(nargs+1); luaD_call(L,func,nresults); adjustresults(L,nresults); } struct CallS{ StkId func; int nresults; }; static void f_call(lua_State*L,void*ud){ struct CallS*c=cast(struct CallS*,ud); luaD_call(L,c->func,c->nresults); } static int lua_pcall(lua_State*L,int nargs,int nresults,int errfunc){ struct CallS c; int status; ptrdiff_t func; api_checknelems(L,nargs+1); checkresults(L,nargs,nresults); if(errfunc==0) func=0; else{ StkId o=index2adr(L,errfunc); api_checkvalidindex(L,o); func=savestack(L,o); } c.func=L->top-(nargs+1); c.nresults=nresults; status=luaD_pcall(L,f_call,&c,savestack(L,c.func),func); adjustresults(L,nresults); return status; } static int lua_load(lua_State*L,lua_Reader reader,void*data, const char*chunkname){ ZIO z; int status; if(!chunkname)chunkname="?"; luaZ_init(L,&z,reader,data); status=luaD_protectedparser(L,&z,chunkname); return status; } static int lua_error(lua_State*L){ api_checknelems(L,1); luaG_errormsg(L); return 0; } static int lua_next(lua_State*L,int idx){ StkId t; int more; t=index2adr(L,idx); luai_apicheck(L,ttistable(t)); more=luaH_next(L,hvalue(t),L->top-1); if(more){ api_incr_top(L); } else L->top-=1; return more; } static void lua_concat(lua_State*L,int n){ api_checknelems(L,n); if(n>=2){ luaC_checkGC(L); luaV_concat(L,n,cast_int(L->top-L->base)-1); L->top-=(n-1); } else if(n==0){ setsvalue(L,L->top,luaS_newlstr(L,"",0)); api_incr_top(L); } } static void*lua_newuserdata(lua_State*L,size_t size){ Udata*u; luaC_checkGC(L); u=luaS_newudata(L,size,getcurrenv(L)); setuvalue(L,L->top,u); api_incr_top(L); return u+1; } #define luaL_getn(L,i)((int)lua_objlen(L,i)) #define luaL_setn(L,i,j)((void)0) typedef struct luaL_Reg{ const char*name; lua_CFunction func; }luaL_Reg; static void luaI_openlib(lua_State*L,const char*libname, const luaL_Reg*l,int nup); static int luaL_argerror(lua_State*L,int numarg,const char*extramsg); static const char* luaL_checklstring(lua_State*L,int numArg, size_t*l); static const char* luaL_optlstring(lua_State*L,int numArg, const char*def,size_t*l); static lua_Integer luaL_checkinteger(lua_State*L,int numArg); static lua_Integer luaL_optinteger(lua_State*L,int nArg, lua_Integer def); static int luaL_error(lua_State*L,const char*fmt,...); static const char* luaL_findtable(lua_State*L,int idx, const char*fname,int szhint); #define luaL_argcheck(L,cond,numarg,extramsg)((void)((cond)||luaL_argerror(L,(numarg),(extramsg)))) #define luaL_checkstring(L,n)(luaL_checklstring(L,(n),NULL)) #define luaL_optstring(L,n,d)(luaL_optlstring(L,(n),(d),NULL)) #define luaL_checkint(L,n)((int)luaL_checkinteger(L,(n))) #define luaL_optint(L,n,d)((int)luaL_optinteger(L,(n),(d))) #define luaL_typename(L,i)lua_typename(L,lua_type(L,(i))) #define luaL_getmetatable(L,n)(lua_getfield(L,(-10000),(n))) #define luaL_opt(L,f,n,d)(lua_isnoneornil(L,(n))?(d):f(L,(n))) typedef struct luaL_Buffer{ char*p; int lvl; lua_State*L; char buffer[BUFSIZ]; }luaL_Buffer; #define luaL_addchar(B,c)((void)((B)->p<((B)->buffer+BUFSIZ)||luaL_prepbuffer(B)),(*(B)->p++=(char)(c))) #define luaL_addsize(B,n)((B)->p+=(n)) static char* luaL_prepbuffer(luaL_Buffer*B); static int luaL_argerror(lua_State*L,int narg,const char*extramsg){ lua_Debug ar; if(!lua_getstack(L,0,&ar)) return luaL_error(L,"bad argument #%d (%s)",narg,extramsg); lua_getinfo(L,"n",&ar); if(strcmp(ar.namewhat,"method")==0){ narg--; if(narg==0) return luaL_error(L,"calling "LUA_QL("%s")" on bad self (%s)", ar.name,extramsg); } if(ar.name==NULL) ar.name="?"; return luaL_error(L,"bad argument #%d to "LUA_QL("%s")" (%s)", narg,ar.name,extramsg); } static int luaL_typerror(lua_State*L,int narg,const char*tname){ const char*msg=lua_pushfstring(L,"%s expected, got %s", tname,luaL_typename(L,narg)); return luaL_argerror(L,narg,msg); } static void tag_error(lua_State*L,int narg,int tag){ luaL_typerror(L,narg,lua_typename(L,tag)); } static void luaL_where(lua_State*L,int level){ lua_Debug ar; if(lua_getstack(L,level,&ar)){ lua_getinfo(L,"Sl",&ar); if(ar.currentline>0){ lua_pushfstring(L,"%s:%d: ",ar.short_src,ar.currentline); return; } } lua_pushliteral(L,""); } static int luaL_error(lua_State*L,const char*fmt,...){ va_list argp; va_start(argp,fmt); luaL_where(L,1); lua_pushvfstring(L,fmt,argp); va_end(argp); lua_concat(L,2); return lua_error(L); } static int luaL_newmetatable(lua_State*L,const char*tname){ lua_getfield(L,(-10000),tname); if(!lua_isnil(L,-1)) return 0; lua_pop(L,1); lua_newtable(L); lua_pushvalue(L,-1); lua_setfield(L,(-10000),tname); return 1; } static void*luaL_checkudata(lua_State*L,int ud,const char*tname){ void*p=lua_touserdata(L,ud); if(p!=NULL){ if(lua_getmetatable(L,ud)){ lua_getfield(L,(-10000),tname); if(lua_rawequal(L,-1,-2)){ lua_pop(L,2); return p; } } } luaL_typerror(L,ud,tname); return NULL; } static void luaL_checkstack(lua_State*L,int space,const char*mes){ if(!lua_checkstack(L,space)) luaL_error(L,"stack overflow (%s)",mes); } static void luaL_checktype(lua_State*L,int narg,int t){ if(lua_type(L,narg)!=t) tag_error(L,narg,t); } static void luaL_checkany(lua_State*L,int narg){ if(lua_type(L,narg)==(-1)) luaL_argerror(L,narg,"value expected"); } static const char*luaL_checklstring(lua_State*L,int narg,size_t*len){ const char*s=lua_tolstring(L,narg,len); if(!s)tag_error(L,narg,4); return s; } static const char*luaL_optlstring(lua_State*L,int narg, const char*def,size_t*len){ if(lua_isnoneornil(L,narg)){ if(len) *len=(def?strlen(def):0); return def; } else return luaL_checklstring(L,narg,len); } static lua_Number luaL_checknumber(lua_State*L,int narg){ lua_Number d=lua_tonumber(L,narg); if(d==0&&!lua_isnumber(L,narg)) tag_error(L,narg,3); return d; } static lua_Integer luaL_checkinteger(lua_State*L,int narg){ lua_Integer d=lua_tointeger(L,narg); if(d==0&&!lua_isnumber(L,narg)) tag_error(L,narg,3); return d; } static lua_Integer luaL_optinteger(lua_State*L,int narg, lua_Integer def){ return luaL_opt(L,luaL_checkinteger,narg,def); } static int luaL_getmetafield(lua_State*L,int obj,const char*event){ if(!lua_getmetatable(L,obj)) return 0; lua_pushstring(L,event); lua_rawget(L,-2); if(lua_isnil(L,-1)){ lua_pop(L,2); return 0; } else{ lua_remove(L,-2); return 1; } } static void luaL_register(lua_State*L,const char*libname, const luaL_Reg*l){ luaI_openlib(L,libname,l,0); } static int libsize(const luaL_Reg*l){ int size=0; for(;l->name;l++)size++; return size; } static void luaI_openlib(lua_State*L,const char*libname, const luaL_Reg*l,int nup){ if(libname){ int size=libsize(l); luaL_findtable(L,(-10000),"_LOADED",1); lua_getfield(L,-1,libname); if(!lua_istable(L,-1)){ lua_pop(L,1); if(luaL_findtable(L,(-10002),libname,size)!=NULL) luaL_error(L,"name conflict for module "LUA_QL("%s"),libname); lua_pushvalue(L,-1); lua_setfield(L,-3,libname); } lua_remove(L,-2); lua_insert(L,-(nup+1)); } for(;l->name;l++){ int i; for(i=0;ifunc,nup); lua_setfield(L,-(nup+2),l->name); } lua_pop(L,nup); } static const char*luaL_findtable(lua_State*L,int idx, const char*fname,int szhint){ const char*e; lua_pushvalue(L,idx); do{ e=strchr(fname,'.'); if(e==NULL)e=fname+strlen(fname); lua_pushlstring(L,fname,e-fname); lua_rawget(L,-2); if(lua_isnil(L,-1)){ lua_pop(L,1); lua_createtable(L,0,(*e=='.'?1:szhint)); lua_pushlstring(L,fname,e-fname); lua_pushvalue(L,-2); lua_settable(L,-4); } else if(!lua_istable(L,-1)){ lua_pop(L,2); return fname; } lua_remove(L,-2); fname=e+1; }while(*e=='.'); return NULL; } #define bufflen(B)((B)->p-(B)->buffer) #define bufffree(B)((size_t)(BUFSIZ-bufflen(B))) static int emptybuffer(luaL_Buffer*B){ size_t l=bufflen(B); if(l==0)return 0; else{ lua_pushlstring(B->L,B->buffer,l); B->p=B->buffer; B->lvl++; return 1; } } static void adjuststack(luaL_Buffer*B){ if(B->lvl>1){ lua_State*L=B->L; int toget=1; size_t toplen=lua_strlen(L,-1); do{ size_t l=lua_strlen(L,-(toget+1)); if(B->lvl-toget+1>=(20/2)||toplen>l){ toplen+=l; toget++; } else break; }while(togetlvl); lua_concat(L,toget); B->lvl=B->lvl-toget+1; } } static char*luaL_prepbuffer(luaL_Buffer*B){ if(emptybuffer(B)) adjuststack(B); return B->buffer; } static void luaL_addlstring(luaL_Buffer*B,const char*s,size_t l){ while(l--) luaL_addchar(B,*s++); } static void luaL_pushresult(luaL_Buffer*B){ emptybuffer(B); lua_concat(B->L,B->lvl); B->lvl=1; } static void luaL_addvalue(luaL_Buffer*B){ lua_State*L=B->L; size_t vl; const char*s=lua_tolstring(L,-1,&vl); if(vl<=bufffree(B)){ memcpy(B->p,s,vl); B->p+=vl; lua_pop(L,1); } else{ if(emptybuffer(B)) lua_insert(L,-2); B->lvl++; adjuststack(B); } } static void luaL_buffinit(lua_State*L,luaL_Buffer*B){ B->L=L; B->p=B->buffer; B->lvl=0; } typedef struct LoadF{ int extraline; FILE*f; char buff[BUFSIZ]; }LoadF; static const char*getF(lua_State*L,void*ud,size_t*size){ LoadF*lf=(LoadF*)ud; (void)L; if(lf->extraline){ lf->extraline=0; *size=1; return"\n"; } if(feof(lf->f))return NULL; *size=fread(lf->buff,1,sizeof(lf->buff),lf->f); return(*size>0)?lf->buff:NULL; } static int errfile(lua_State*L,const char*what,int fnameindex){ const char*serr=strerror(errno); const char*filename=lua_tostring(L,fnameindex)+1; lua_pushfstring(L,"cannot %s %s: %s",what,filename,serr); lua_remove(L,fnameindex); return(5+1); } static int luaL_loadfile(lua_State*L,const char*filename){ LoadF lf; int status,readstatus; int c; int fnameindex=lua_gettop(L)+1; lf.extraline=0; if(filename==NULL){ lua_pushliteral(L,"=stdin"); lf.f=stdin; } else{ lua_pushfstring(L,"@%s",filename); lf.f=fopen(filename,"r"); if(lf.f==NULL)return errfile(L,"open",fnameindex); } c=getc(lf.f); if(c=='#'){ lf.extraline=1; while((c=getc(lf.f))!=EOF&&c!='\n'); if(c=='\n')c=getc(lf.f); } if(c=="\033Lua"[0]&&filename){ lf.f=freopen(filename,"rb",lf.f); if(lf.f==NULL)return errfile(L,"reopen",fnameindex); while((c=getc(lf.f))!=EOF&&c!="\033Lua"[0]); lf.extraline=0; } ungetc(c,lf.f); status=lua_load(L,getF,&lf,lua_tostring(L,-1)); readstatus=ferror(lf.f); if(filename)fclose(lf.f); if(readstatus){ lua_settop(L,fnameindex); return errfile(L,"read",fnameindex); } lua_remove(L,fnameindex); return status; } typedef struct LoadS{ const char*s; size_t size; }LoadS; static const char*getS(lua_State*L,void*ud,size_t*size){ LoadS*ls=(LoadS*)ud; (void)L; if(ls->size==0)return NULL; *size=ls->size; ls->size=0; return ls->s; } static int luaL_loadbuffer(lua_State*L,const char*buff,size_t size, const char*name){ LoadS ls; ls.s=buff; ls.size=size; return lua_load(L,getS,&ls,name); } static void*l_alloc(void*ud,void*ptr,size_t osize,size_t nsize){ (void)ud; (void)osize; if(nsize==0){ free(ptr); return NULL; } else return realloc(ptr,nsize); } static int panic(lua_State*L){ (void)L; fprintf(stderr,"PANIC: unprotected error in call to Lua API (%s)\n", lua_tostring(L,-1)); return 0; } static lua_State*luaL_newstate(void){ lua_State*L=lua_newstate(l_alloc,NULL); if(L)lua_atpanic(L,&panic); return L; } static int luaB_tonumber(lua_State*L){ int base=luaL_optint(L,2,10); if(base==10){ luaL_checkany(L,1); if(lua_isnumber(L,1)){ lua_pushnumber(L,lua_tonumber(L,1)); return 1; } } else{ const char*s1=luaL_checkstring(L,1); char*s2; unsigned long n; luaL_argcheck(L,2<=base&&base<=36,2,"base out of range"); n=strtoul(s1,&s2,base); if(s1!=s2){ while(isspace((unsigned char)(*s2)))s2++; if(*s2=='\0'){ lua_pushnumber(L,(lua_Number)n); return 1; } } } lua_pushnil(L); return 1; } static int luaB_error(lua_State*L){ int level=luaL_optint(L,2,1); lua_settop(L,1); if(lua_isstring(L,1)&&level>0){ luaL_where(L,level); lua_pushvalue(L,1); lua_concat(L,2); } return lua_error(L); } static int luaB_setmetatable(lua_State*L){ int t=lua_type(L,2); luaL_checktype(L,1,5); luaL_argcheck(L,t==0||t==5,2, "nil or table expected"); if(luaL_getmetafield(L,1,"__metatable")) luaL_error(L,"cannot change a protected metatable"); lua_settop(L,2); lua_setmetatable(L,1); return 1; } static void getfunc(lua_State*L,int opt){ if(lua_isfunction(L,1))lua_pushvalue(L,1); else{ lua_Debug ar; int level=opt?luaL_optint(L,1,1):luaL_checkint(L,1); luaL_argcheck(L,level>=0,1,"level must be non-negative"); if(lua_getstack(L,level,&ar)==0) luaL_argerror(L,1,"invalid level"); lua_getinfo(L,"f",&ar); if(lua_isnil(L,-1)) luaL_error(L,"no function environment for tail call at level %d", level); } } static int luaB_setfenv(lua_State*L){ luaL_checktype(L,2,5); getfunc(L,0); lua_pushvalue(L,2); if(lua_isnumber(L,1)&&lua_tonumber(L,1)==0){ lua_pushthread(L); lua_insert(L,-2); lua_setfenv(L,-2); return 0; } else if(lua_iscfunction(L,-2)||lua_setfenv(L,-2)==0) luaL_error(L, LUA_QL("setfenv")" cannot change environment of given object"); return 1; } static int luaB_rawget(lua_State*L){ luaL_checktype(L,1,5); luaL_checkany(L,2); lua_settop(L,2); lua_rawget(L,1); return 1; } static int luaB_type(lua_State*L){ luaL_checkany(L,1); lua_pushstring(L,luaL_typename(L,1)); return 1; } static int luaB_next(lua_State*L){ luaL_checktype(L,1,5); lua_settop(L,2); if(lua_next(L,1)) return 2; else{ lua_pushnil(L); return 1; } } static int luaB_pairs(lua_State*L){ luaL_checktype(L,1,5); lua_pushvalue(L,lua_upvalueindex(1)); lua_pushvalue(L,1); lua_pushnil(L); return 3; } static int ipairsaux(lua_State*L){ int i=luaL_checkint(L,2); luaL_checktype(L,1,5); i++; lua_pushinteger(L,i); lua_rawgeti(L,1,i); return(lua_isnil(L,-1))?0:2; } static int luaB_ipairs(lua_State*L){ luaL_checktype(L,1,5); lua_pushvalue(L,lua_upvalueindex(1)); lua_pushvalue(L,1); lua_pushinteger(L,0); return 3; } static int load_aux(lua_State*L,int status){ if(status==0) return 1; else{ lua_pushnil(L); lua_insert(L,-2); return 2; } } static int luaB_loadstring(lua_State*L){ size_t l; const char*s=luaL_checklstring(L,1,&l); const char*chunkname=luaL_optstring(L,2,s); return load_aux(L,luaL_loadbuffer(L,s,l,chunkname)); } static int luaB_loadfile(lua_State*L){ const char*fname=luaL_optstring(L,1,NULL); return load_aux(L,luaL_loadfile(L,fname)); } static int luaB_assert(lua_State*L){ luaL_checkany(L,1); if(!lua_toboolean(L,1)) return luaL_error(L,"%s",luaL_optstring(L,2,"assertion failed!")); return lua_gettop(L); } static int luaB_unpack(lua_State*L){ int i,e,n; luaL_checktype(L,1,5); i=luaL_optint(L,2,1); e=luaL_opt(L,luaL_checkint,3,luaL_getn(L,1)); if(i>e)return 0; n=e-i+1; if(n<=0||!lua_checkstack(L,n)) return luaL_error(L,"too many results to unpack"); lua_rawgeti(L,1,i); while(i++e)e=pos; for(i=e;i>pos;i--){ lua_rawgeti(L,1,i-1); lua_rawseti(L,1,i); } break; } default:{ return luaL_error(L,"wrong number of arguments to "LUA_QL("insert")); } } luaL_setn(L,1,e); lua_rawseti(L,1,pos); return 0; } static int tremove(lua_State*L){ int e=aux_getn(L,1); int pos=luaL_optint(L,2,e); if(!(1<=pos&&pos<=e)) return 0; luaL_setn(L,1,e-1); lua_rawgeti(L,1,pos); for(;posu)luaL_error(L,"invalid order function for sorting"); lua_pop(L,1); } while(lua_rawgeti(L,1,--j),sort_comp(L,-3,-1)){ if(j0); } l=strlen(p); if(l==0||p[l-1]!='\n') luaL_addsize(&b,l); else{ luaL_addsize(&b,l-1); luaL_pushresult(&b); return 1; } } } static int read_chars(lua_State*L,FILE*f,size_t n){ size_t rlen; size_t nr; luaL_Buffer b; luaL_buffinit(L,&b); rlen=BUFSIZ; do{ char*p=luaL_prepbuffer(&b); if(rlen>n)rlen=n; nr=fread(p,sizeof(char),rlen,f); luaL_addsize(&b,nr); n-=nr; }while(n>0&&nr==rlen); luaL_pushresult(&b); return(n==0||lua_objlen(L,-1)>0); } static int g_read(lua_State*L,FILE*f,int first){ int nargs=lua_gettop(L)-1; int success; int n; clearerr(f); if(nargs==0){ success=read_line(L,f); n=first+1; } else{ luaL_checkstack(L,nargs+20,"too many arguments"); success=1; for(n=first;nargs--&&success;n++){ if(lua_type(L,n)==3){ size_t l=(size_t)lua_tointeger(L,n); success=(l==0)?test_eof(L,f):read_chars(L,f,l); } else{ const char*p=lua_tostring(L,n); luaL_argcheck(L,p&&p[0]=='*',n,"invalid option"); switch(p[1]){ case'n': success=read_number(L,f); break; case'l': success=read_line(L,f); break; case'a': read_chars(L,f,~((size_t)0)); success=1; break; default: return luaL_argerror(L,n,"invalid format"); } } } } if(ferror(f)) return pushresult(L,0,NULL); if(!success){ lua_pop(L,1); lua_pushnil(L); } return n-first; } static int io_read(lua_State*L){ return g_read(L,getiofile(L,1),1); } static int f_read(lua_State*L){ return g_read(L,tofile(L),2); } static int io_readline(lua_State*L){ FILE*f=*(FILE**)lua_touserdata(L,lua_upvalueindex(1)); int sucess; if(f==NULL) luaL_error(L,"file is already closed"); sucess=read_line(L,f); if(ferror(f)) return luaL_error(L,"%s",strerror(errno)); if(sucess)return 1; else{ if(lua_toboolean(L,lua_upvalueindex(2))){ lua_settop(L,0); lua_pushvalue(L,lua_upvalueindex(1)); aux_close(L); } return 0; } } static int g_write(lua_State*L,FILE*f,int arg){ int nargs=lua_gettop(L)-1; int status=1; for(;nargs--;arg++){ if(lua_type(L,arg)==3){ status=status&& fprintf(f,"%.14g",lua_tonumber(L,arg))>0; } else{ size_t l; const char*s=luaL_checklstring(L,arg,&l); status=status&&(fwrite(s,sizeof(char),l,f)==l); } } return pushresult(L,status,NULL); } static int io_write(lua_State*L){ return g_write(L,getiofile(L,2),1); } static int f_write(lua_State*L){ return g_write(L,tofile(L),2); } static int io_flush(lua_State*L){ return pushresult(L,fflush(getiofile(L,2))==0,NULL); } static int f_flush(lua_State*L){ return pushresult(L,fflush(tofile(L))==0,NULL); } static const luaL_Reg iolib[]={ {"close",io_close}, {"flush",io_flush}, {"input",io_input}, {"lines",io_lines}, {"open",io_open}, {"output",io_output}, {"read",io_read}, {"type",io_type}, {"write",io_write}, {NULL,NULL} }; static const luaL_Reg flib[]={ {"close",io_close}, {"flush",f_flush}, {"lines",f_lines}, {"read",f_read}, {"write",f_write}, {"__gc",io_gc}, {NULL,NULL} }; static void createmeta(lua_State*L){ luaL_newmetatable(L,"FILE*"); lua_pushvalue(L,-1); lua_setfield(L,-2,"__index"); luaL_register(L,NULL,flib); } static void createstdfile(lua_State*L,FILE*f,int k,const char*fname){ *newfile(L)=f; if(k>0){ lua_pushvalue(L,-1); lua_rawseti(L,(-10001),k); } lua_pushvalue(L,-2); lua_setfenv(L,-2); lua_setfield(L,-3,fname); } static void newfenv(lua_State*L,lua_CFunction cls){ lua_createtable(L,0,1); lua_pushcfunction(L,cls); lua_setfield(L,-2,"__close"); } static int luaopen_io(lua_State*L){ createmeta(L); newfenv(L,io_fclose); lua_replace(L,(-10001)); luaL_register(L,"io",iolib); newfenv(L,io_noclose); createstdfile(L,stdin,1,"stdin"); createstdfile(L,stdout,2,"stdout"); createstdfile(L,stderr,0,"stderr"); lua_pop(L,1); lua_getfield(L,-1,"popen"); newfenv(L,io_pclose); lua_setfenv(L,-2); lua_pop(L,1); return 1; } static int os_pushresult(lua_State*L,int i,const char*filename){ int en=errno; if(i){ lua_pushboolean(L,1); return 1; } else{ lua_pushnil(L); lua_pushfstring(L,"%s: %s",filename,strerror(en)); lua_pushinteger(L,en); return 3; } } static int os_remove(lua_State*L){ const char*filename=luaL_checkstring(L,1); return os_pushresult(L,remove(filename)==0,filename); } static int os_exit(lua_State*L){ exit(luaL_optint(L,1,EXIT_SUCCESS)); } static const luaL_Reg syslib[]={ {"exit",os_exit}, {"remove",os_remove}, {NULL,NULL} }; static int luaopen_os(lua_State*L){ luaL_register(L,"os",syslib); return 1; } #define uchar(c)((unsigned char)(c)) static ptrdiff_t posrelat(ptrdiff_t pos,size_t len){ if(pos<0)pos+=(ptrdiff_t)len+1; return(pos>=0)?pos:0; } static int str_sub(lua_State*L){ size_t l; const char*s=luaL_checklstring(L,1,&l); ptrdiff_t start=posrelat(luaL_checkinteger(L,2),l); ptrdiff_t end=posrelat(luaL_optinteger(L,3,-1),l); if(start<1)start=1; if(end>(ptrdiff_t)l)end=(ptrdiff_t)l; if(start<=end) lua_pushlstring(L,s+start-1,end-start+1); else lua_pushliteral(L,""); return 1; } static int str_lower(lua_State*L){ size_t l; size_t i; luaL_Buffer b; const char*s=luaL_checklstring(L,1,&l); luaL_buffinit(L,&b); for(i=0;i0) luaL_addlstring(&b,s,l); luaL_pushresult(&b); return 1; } static int str_byte(lua_State*L){ size_t l; const char*s=luaL_checklstring(L,1,&l); ptrdiff_t posi=posrelat(luaL_optinteger(L,2,1),l); ptrdiff_t pose=posrelat(luaL_optinteger(L,3,posi),l); int n,i; if(posi<=0)posi=1; if((size_t)pose>l)pose=l; if(posi>pose)return 0; n=(int)(pose-posi+1); if(posi+n<=pose) luaL_error(L,"string slice too long"); luaL_checkstack(L,n,"string slice too long"); for(i=0;i=ms->level||ms->capture[l].len==(-1)) return luaL_error(ms->L,"invalid capture index"); return l; } static int capture_to_close(MatchState*ms){ int level=ms->level; for(level--;level>=0;level--) if(ms->capture[level].len==(-1))return level; return luaL_error(ms->L,"invalid pattern capture"); } static const char*classend(MatchState*ms,const char*p){ switch(*p++){ case'%':{ if(*p=='\0') luaL_error(ms->L,"malformed pattern (ends with "LUA_QL("%%")")"); return p+1; } case'[':{ if(*p=='^')p++; do{ if(*p=='\0') luaL_error(ms->L,"malformed pattern (missing "LUA_QL("]")")"); if(*(p++)=='%'&&*p!='\0') p++; }while(*p!=']'); return p+1; } default:{ return p; } } } static int match_class(int c,int cl){ int res; switch(tolower(cl)){ case'a':res=isalpha(c);break; case'c':res=iscntrl(c);break; case'd':res=isdigit(c);break; case'l':res=islower(c);break; case'p':res=ispunct(c);break; case's':res=isspace(c);break; case'u':res=isupper(c);break; case'w':res=isalnum(c);break; case'x':res=isxdigit(c);break; case'z':res=(c==0);break; default:return(cl==c); } return(islower(cl)?res:!res); } static int matchbracketclass(int c,const char*p,const char*ec){ int sig=1; if(*(p+1)=='^'){ sig=0; p++; } while(++pL,"unbalanced pattern"); if(*s!=*p)return NULL; else{ int b=*p; int e=*(p+1); int cont=1; while(++ssrc_end){ if(*s==e){ if(--cont==0)return s+1; } else if(*s==b)cont++; } } return NULL; } static const char*max_expand(MatchState*ms,const char*s, const char*p,const char*ep){ ptrdiff_t i=0; while((s+i)src_end&&singlematch(uchar(*(s+i)),p,ep)) i++; while(i>=0){ const char*res=match(ms,(s+i),ep+1); if(res)return res; i--; } return NULL; } static const char*min_expand(MatchState*ms,const char*s, const char*p,const char*ep){ for(;;){ const char*res=match(ms,s,ep+1); if(res!=NULL) return res; else if(ssrc_end&&singlematch(uchar(*s),p,ep)) s++; else return NULL; } } static const char*start_capture(MatchState*ms,const char*s, const char*p,int what){ const char*res; int level=ms->level; if(level>=32)luaL_error(ms->L,"too many captures"); ms->capture[level].init=s; ms->capture[level].len=what; ms->level=level+1; if((res=match(ms,s,p))==NULL) ms->level--; return res; } static const char*end_capture(MatchState*ms,const char*s, const char*p){ int l=capture_to_close(ms); const char*res; ms->capture[l].len=s-ms->capture[l].init; if((res=match(ms,s,p))==NULL) ms->capture[l].len=(-1); return res; } static const char*match_capture(MatchState*ms,const char*s,int l){ size_t len; l=check_capture(ms,l); len=ms->capture[l].len; if((size_t)(ms->src_end-s)>=len&& memcmp(ms->capture[l].init,s,len)==0) return s+len; else return NULL; } static const char*match(MatchState*ms,const char*s,const char*p){ init: switch(*p){ case'(':{ if(*(p+1)==')') return start_capture(ms,s,p+2,(-2)); else return start_capture(ms,s,p+1,(-1)); } case')':{ return end_capture(ms,s,p+1); } case'%':{ switch(*(p+1)){ case'b':{ s=matchbalance(ms,s,p+2); if(s==NULL)return NULL; p+=4;goto init; } case'f':{ const char*ep;char previous; p+=2; if(*p!='[') luaL_error(ms->L,"missing "LUA_QL("[")" after " LUA_QL("%%f")" in pattern"); ep=classend(ms,p); previous=(s==ms->src_init)?'\0':*(s-1); if(matchbracketclass(uchar(previous),p,ep-1)|| !matchbracketclass(uchar(*s),p,ep-1))return NULL; p=ep;goto init; } default:{ if(isdigit(uchar(*(p+1)))){ s=match_capture(ms,s,uchar(*(p+1))); if(s==NULL)return NULL; p+=2;goto init; } goto dflt; } } } case'\0':{ return s; } case'$':{ if(*(p+1)=='\0') return(s==ms->src_end)?s:NULL; else goto dflt; } default:dflt:{ const char*ep=classend(ms,p); int m=ssrc_end&&singlematch(uchar(*s),p,ep); switch(*ep){ case'?':{ const char*res; if(m&&((res=match(ms,s+1,ep+1))!=NULL)) return res; p=ep+1;goto init; } case'*':{ return max_expand(ms,s,p,ep); } case'+':{ return(m?max_expand(ms,s+1,p,ep):NULL); } case'-':{ return min_expand(ms,s,p,ep); } default:{ if(!m)return NULL; s++;p=ep;goto init; } } } } } static const char*lmemfind(const char*s1,size_t l1, const char*s2,size_t l2){ if(l2==0)return s1; else if(l2>l1)return NULL; else{ const char*init; l2--; l1=l1-l2; while(l1>0&&(init=(const char*)memchr(s1,*s2,l1))!=NULL){ init++; if(memcmp(init,s2+1,l2)==0) return init-1; else{ l1-=init-s1; s1=init; } } return NULL; } } static void push_onecapture(MatchState*ms,int i,const char*s, const char*e){ if(i>=ms->level){ if(i==0) lua_pushlstring(ms->L,s,e-s); else luaL_error(ms->L,"invalid capture index"); } else{ ptrdiff_t l=ms->capture[i].len; if(l==(-1))luaL_error(ms->L,"unfinished capture"); if(l==(-2)) lua_pushinteger(ms->L,ms->capture[i].init-ms->src_init+1); else lua_pushlstring(ms->L,ms->capture[i].init,l); } } static int push_captures(MatchState*ms,const char*s,const char*e){ int i; int nlevels=(ms->level==0&&s)?1:ms->level; luaL_checkstack(ms->L,nlevels,"too many captures"); for(i=0;il1)init=(ptrdiff_t)l1; if(find&&(lua_toboolean(L,4)|| strpbrk(p,"^$*+?.([%-")==NULL)){ const char*s2=lmemfind(s+init,l1-init,p,l2); if(s2){ lua_pushinteger(L,s2-s+1); lua_pushinteger(L,s2-s+l2); return 2; } } else{ MatchState ms; int anchor=(*p=='^')?(p++,1):0; const char*s1=s+init; ms.L=L; ms.src_init=s; ms.src_end=s+l1; do{ const char*res; ms.level=0; if((res=match(&ms,s1,p))!=NULL){ if(find){ lua_pushinteger(L,s1-s+1); lua_pushinteger(L,res-s); return push_captures(&ms,NULL,0)+2; } else return push_captures(&ms,s1,res); } }while(s1++L,3,&l); for(i=0;iL; switch(lua_type(L,3)){ case 3: case 4:{ add_s(ms,b,s,e); return; } case 6:{ int n; lua_pushvalue(L,3); n=push_captures(ms,s,e); lua_call(L,n,1); break; } case 5:{ push_onecapture(ms,0,s,e); lua_gettable(L,3); break; } } if(!lua_toboolean(L,-1)){ lua_pop(L,1); lua_pushlstring(L,s,e-s); } else if(!lua_isstring(L,-1)) luaL_error(L,"invalid replacement value (a %s)",luaL_typename(L,-1)); luaL_addvalue(b); } static int str_gsub(lua_State*L){ size_t srcl; const char*src=luaL_checklstring(L,1,&srcl); const char*p=luaL_checkstring(L,2); int tr=lua_type(L,3); int max_s=luaL_optint(L,4,srcl+1); int anchor=(*p=='^')?(p++,1):0; int n=0; MatchState ms; luaL_Buffer b; luaL_argcheck(L,tr==3||tr==4|| tr==6||tr==5,3, "string/function/table expected"); luaL_buffinit(L,&b); ms.L=L; ms.src_init=src; ms.src_end=src+srcl; while(nsrc) src=e; else if(src=sizeof("-+ #0")) luaL_error(L,"invalid format (repeated flags)"); if(isdigit(uchar(*p)))p++; if(isdigit(uchar(*p)))p++; if(*p=='.'){ p++; if(isdigit(uchar(*p)))p++; if(isdigit(uchar(*p)))p++; } if(isdigit(uchar(*p))) luaL_error(L,"invalid format (width or precision too long)"); *(form++)='%'; strncpy(form,strfrmt,p-strfrmt+1); form+=p-strfrmt+1; *form='\0'; return p; } static void addintlen(char*form){ size_t l=strlen(form); char spec=form[l-1]; strcpy(form+l-1,"l"); form[l+sizeof("l")-2]=spec; form[l+sizeof("l")-1]='\0'; } static int str_format(lua_State*L){ int top=lua_gettop(L); int arg=1; size_t sfl; const char*strfrmt=luaL_checklstring(L,arg,&sfl); const char*strfrmt_end=strfrmt+sfl; luaL_Buffer b; luaL_buffinit(L,&b); while(strfrmttop) luaL_argerror(L,arg,"no value"); strfrmt=scanformat(L,strfrmt,form); switch(*strfrmt++){ case'c':{ sprintf(buff,form,(int)luaL_checknumber(L,arg)); break; } case'd':case'i':{ addintlen(form); sprintf(buff,form,(long)luaL_checknumber(L,arg)); break; } case'o':case'u':case'x':case'X':{ addintlen(form); sprintf(buff,form,(unsigned long)luaL_checknumber(L,arg)); break; } case'e':case'E':case'f': case'g':case'G':{ sprintf(buff,form,(double)luaL_checknumber(L,arg)); break; } case'q':{ addquoted(L,&b,arg); continue; } case's':{ size_t l; const char*s=luaL_checklstring(L,arg,&l); if(!strchr(form,'.')&&l>=100){ lua_pushvalue(L,arg); luaL_addvalue(&b); continue; } else{ sprintf(buff,form,s); break; } } default:{ return luaL_error(L,"invalid option "LUA_QL("%%%c")" to " LUA_QL("format"),*(strfrmt-1)); } } luaL_addlstring(&b,buff,strlen(buff)); } } luaL_pushresult(&b); return 1; } static const luaL_Reg strlib[]={ {"byte",str_byte}, {"char",str_char}, {"find",str_find}, {"format",str_format}, {"gmatch",gmatch}, {"gsub",str_gsub}, {"lower",str_lower}, {"match",str_match}, {"rep",str_rep}, {"sub",str_sub}, {"upper",str_upper}, {NULL,NULL} }; static void createmetatable(lua_State*L){ lua_createtable(L,0,1); lua_pushliteral(L,""); lua_pushvalue(L,-2); lua_setmetatable(L,-2); lua_pop(L,1); lua_pushvalue(L,-2); lua_setfield(L,-2,"__index"); lua_pop(L,1); } static int luaopen_string(lua_State*L){ luaL_register(L,"string",strlib); createmetatable(L); return 1; } static const luaL_Reg lualibs[]={ {"",luaopen_base}, {"table",luaopen_table}, {"io",luaopen_io}, {"os",luaopen_os}, {"string",luaopen_string}, {NULL,NULL} }; static void luaL_openlibs(lua_State*L){ const luaL_Reg*lib=lualibs; for(;lib->func;lib++){ lua_pushcfunction(L,lib->func); lua_pushstring(L,lib->name); lua_call(L,1,0); } } typedef unsigned int UB; static UB barg(lua_State*L,int idx){ union{lua_Number n;U64 b;}bn; bn.n=lua_tonumber(L,idx)+6755399441055744.0; if(bn.n==0.0&&!lua_isnumber(L,idx))luaL_typerror(L,idx,"number"); return(UB)bn.b; } #define BRET(b)lua_pushnumber(L,(lua_Number)(int)(b));return 1; static int tobit(lua_State*L){ BRET(barg(L,1))} static int bnot(lua_State*L){ BRET(~barg(L,1))} static int band(lua_State*L){ int i;UB b=barg(L,1);for(i=lua_gettop(L);i>1;i--)b&=barg(L,i);BRET(b)} static int bor(lua_State*L){ int i;UB b=barg(L,1);for(i=lua_gettop(L);i>1;i--)b|=barg(L,i);BRET(b)} static int bxor(lua_State*L){ int i;UB b=barg(L,1);for(i=lua_gettop(L);i>1;i--)b^=barg(L,i);BRET(b)} static int lshift(lua_State*L){ UB b=barg(L,1),n=barg(L,2)&31;BRET(b<>n)} static int arshift(lua_State*L){ UB b=barg(L,1),n=barg(L,2)&31;BRET((int)b>>n)} static int rol(lua_State*L){ UB b=barg(L,1),n=barg(L,2)&31;BRET((b<>(32-n)))} static int ror(lua_State*L){ UB b=barg(L,1),n=barg(L,2)&31;BRET((b>>n)|(b<<(32-n)))} static int bswap(lua_State*L){ UB b=barg(L,1);b=(b>>24)|((b>>8)&0xff00)|((b&0xff00)<<8)|(b<<24);BRET(b)} static int tohex(lua_State*L){ UB b=barg(L,1); int n=lua_isnone(L,2)?8:(int)barg(L,2); const char*hexdigits="0123456789abcdef"; char buf[8]; int i; if(n<0){n=-n;hexdigits="0123456789ABCDEF";} if(n>8)n=8; for(i=(int)n;--i>=0;){buf[i]=hexdigits[b&15];b>>=4;} lua_pushlstring(L,buf,(size_t)n); return 1; } static const struct luaL_Reg bitlib[]={ {"tobit",tobit}, {"bnot",bnot}, {"band",band}, {"bor",bor}, {"bxor",bxor}, {"lshift",lshift}, {"rshift",rshift}, {"arshift",arshift}, {"rol",rol}, {"ror",ror}, {"bswap",bswap}, {"tohex",tohex}, {NULL,NULL} }; int main(int argc,char**argv){ lua_State*L=luaL_newstate(); int i; luaL_openlibs(L); luaL_register(L,"bit",bitlib); if(argc<2)return sizeof(void*); lua_createtable(L,0,1); lua_pushstring(L,argv[1]); lua_rawseti(L,-2,0); lua_setglobal(L,"arg"); if(luaL_loadfile(L,argv[1])) goto err; for(i=2;i"] = true, [""] = true, } local CUSTOM_MAIN = [[ typedef unsigned int UB; static UB barg(lua_State *L,int idx){ union{lua_Number n;U64 b;}bn; bn.n=lua_tonumber(L,idx)+6755399441055744.0; if (bn.n==0.0&&!lua_isnumber(L,idx))luaL_typerror(L,idx,"number"); return(UB)bn.b; } #define BRET(b) lua_pushnumber(L,(lua_Number)(int)(b));return 1; static int tobit(lua_State *L){ BRET(barg(L,1))} static int bnot(lua_State *L){ BRET(~barg(L,1))} static int band(lua_State *L){ int i;UB b=barg(L,1);for(i=lua_gettop(L);i>1;i--)b&=barg(L,i);BRET(b)} static int bor(lua_State *L){ int i;UB b=barg(L,1);for(i=lua_gettop(L);i>1;i--)b|=barg(L,i);BRET(b)} static int bxor(lua_State *L){ int i;UB b=barg(L,1);for(i=lua_gettop(L);i>1;i--)b^=barg(L,i);BRET(b)} static int lshift(lua_State *L){ UB b=barg(L,1),n=barg(L,2)&31;BRET(b<>n)} static int arshift(lua_State *L){ UB b=barg(L,1),n=barg(L,2)&31;BRET((int)b>>n)} static int rol(lua_State *L){ UB b=barg(L,1),n=barg(L,2)&31;BRET((b<>(32-n)))} static int ror(lua_State *L){ UB b=barg(L,1),n=barg(L,2)&31;BRET((b>>n)|(b<<(32-n)))} static int bswap(lua_State *L){ UB b=barg(L,1);b=(b>>24)|((b>>8)&0xff00)|((b&0xff00)<<8)|(b<<24);BRET(b)} static int tohex(lua_State *L){ UB b=barg(L,1); int n=lua_isnone(L,2)?8:(int)barg(L,2); const char *hexdigits="0123456789abcdef"; char buf[8]; int i; if(n<0){n=-n;hexdigits="0123456789ABCDEF";} if(n>8)n=8; for(i=(int)n;--i>=0;){buf[i]=hexdigits[b&15];b>>=4;} lua_pushlstring(L,buf,(size_t)n); return 1; } static const struct luaL_Reg bitlib[] = { {"tobit",tobit}, {"bnot",bnot}, {"band",band}, {"bor",bor}, {"bxor",bxor}, {"lshift",lshift}, {"rshift",rshift}, {"arshift",arshift}, {"rol",rol}, {"ror",ror}, {"bswap",bswap}, {"tohex",tohex}, {NULL,NULL} }; int main(int argc, char **argv){ lua_State *L = luaL_newstate(); int i; luaL_openlibs(L); luaL_register(L, "bit", bitlib); if (argc < 2) return sizeof(void *); lua_createtable(L, 0, 1); lua_pushstring(L, argv[1]); lua_rawseti(L, -2, 0); lua_setglobal(L, "arg"); if (luaL_loadfile(L, argv[1])) goto err; for (i = 2; i < argc; i++) lua_pushstring(L, argv[i]); if (lua_pcall(L, argc - 2, 0, 0)) { err: fprintf(stderr, "Error: %s\n", lua_tostring(L, -1)); return 1; } lua_close(L); return 0; } ]] local function read_sources() local t = {} for i, name in ipairs(LUA_FILES) do local fp = assert(io.open(LUA_SOURCE..name, "r")) t[i] = fp:read("*a") assert(fp:close()) end t[#t+1] = CUSTOM_MAIN return table.concat(t) end local includes = {} local function merge_includes(src) return gsub(src, '#include%s*"([^"]*)"%s*\n', function(name) if includes[name] then return "" end includes[name] = true local fp = assert(io.open(LUA_SOURCE..name, "r")) local src = fp:read("*a") assert(fp:close()) src = gsub(src, "#ifndef%s+%w+_h\n#define%s+%w+_h\n", "") src = gsub(src, "#endif%s*$", "") return merge_includes(src) end) end local function get_license(src) return match(src, "/%*+\n%* Copyright %(.-%*/\n") end local function fold_lines(src) return gsub(src, "\\\n", " ") end local strings = {} local function save_str(str) local n = #strings+1 strings[n] = str return "\1"..n.."\2" end local function save_strings(src) src = gsub(src, '"[^"\n]*"', save_str) return gsub(src, "'[^'\n]*'", save_str) end local function restore_strings(src) return gsub(src, "\1(%d+)\2", function(numstr) return strings[tonumber(numstr)] end) end local function def_istrue(def) return def == "INT_MAX > 2147483640L" or def == "LUAI_BITSINT >= 32" or def == "SIZE_Bx < LUAI_BITSINT-1" or def == "cast" or def == "defined(LUA_CORE)" or def == "MINSTRTABSIZE" or def == "LUA_MINBUFFER" or def == "HARDSTACKTESTS" or def == "UNUSED" end local head, defs = {[[ #ifdef _MSC_VER typedef unsigned __int64 U64; #else typedef unsigned long long U64; #endif ]]}, {} local function preprocess(src) local t = { match(src, "^(.-)#") } local lvl, on, oldon = 0, true, {} for pp, def, txt in string.gmatch(src, "#(%w+) *([^\n]*)\n([^#]*)") do if pp == "if" or pp == "ifdef" or pp == "ifndef" then lvl = lvl + 1 oldon[lvl] = on on = def_istrue(def) elseif pp == "else" then if oldon[lvl] then if on == false then on = true else on = false end end elseif pp == "elif" then if oldon[lvl] then on = def_istrue(def) end elseif pp == "endif" then on = oldon[lvl] lvl = lvl - 1 elseif on then if pp == "include" then if not head[def] and not REMOVE_EXTINC[def] then head[def] = true head[#head+1] = "#include "..def.."\n" end elseif pp == "define" then local k, sp, v = match(def, "([%w_]+)(%s*)(.*)") if k and not (sp == "" and sub(v, 1, 1) == "(") then defs[k] = gsub(v, "%a[%w_]*", function(tok) return defs[tok] or tok end) else t[#t+1] = "#define "..def.."\n" end elseif pp ~= "undef" then error("unexpected directive: "..pp.." "..def) end end if on then t[#t+1] = txt end end return gsub(table.concat(t), "%a[%w_]*", function(tok) return defs[tok] or tok end) end local function merge_header(src, license) local hdr = string.format([[ /* This is a heavily customized and minimized copy of Lua %s. */ /* It's only used to build LuaJIT. It does NOT have all standard functions! */ ]], LUA_VERSION) return hdr..license..table.concat(head)..src end local function strip_unused1(src) return gsub(src, '( {"?([%w_]+)"?,%s+%a[%w_]*},\n)', function(line, func) return REMOVE_LIB[func] and "" or line end) end local function strip_unused2(src) return gsub(src, "Symbolic Execution.-}=", "") end local function strip_unused3(src) src = gsub(src, "extern", "static") src = gsub(src, "\nstatic([^\n]-)%(([^)]*)%)%(", "\nstatic%1 %2(") src = gsub(src, "#define lua_assert[^\n]*\n", "") src = gsub(src, "lua_assert%b();?", "") src = gsub(src, "default:\n}", "default:;\n}") src = gsub(src, "lua_lock%b();", "") src = gsub(src, "lua_unlock%b();", "") src = gsub(src, "luai_threadyield%b();", "") src = gsub(src, "luai_userstateopen%b();", "{}") src = gsub(src, "luai_userstate%w+%b();", "") src = gsub(src, "%(%(c==.*luaY_parser%)", "luaY_parser") src = gsub(src, "trydecpoint%(ls,seminfo%)", "luaX_lexerror(ls,\"malformed number\",TK_NUMBER)") src = gsub(src, "int c=luaZ_lookahead%b();", "") src = gsub(src, "luaL_register%(L,[^,]*,co_funcs%);\nreturn 2;", "return 1;") src = gsub(src, "getfuncname%b():", "NULL:") src = gsub(src, "getobjname%b():", "NULL:") src = gsub(src, "if%([^\n]*hookmask[^\n]*%)\n[^\n]*\n", "") src = gsub(src, "if%([^\n]*hookmask[^\n]*%)%b{}\n", "") src = gsub(src, "if%([^\n]*hookmask[^\n]*&&\n[^\n]*%b{}\n", "") src = gsub(src, "(twoto%b()%()", "%1(size_t)") src = gsub(src, "iX @@ H\$Hl$Ld$H8HHA̋GtOrHHt$T$H4$ALEIHHbHHEtH}HھH}HھHHHH\$ Hl$(Ld$0H8AWAVAUATUSHHAօ~gIBLdHD)AAuH}*H}AuHu HL9uAtHu H[]A\A]A^A_AWAVAUATUSHHHHHKCvu4H{H{HspH{tHK {@ZD$ HSXHcL$ HHHD`HHL L$D)H0Hj;kDHcH@T$;HcH@LEuE){A}IcUHC`L,IcHs(Dx9HcGPW^cbuildvm_asm.cemit_asm_labelemit_asm_bytesjccnamesfprintf_IO_putcemit_asmfwritestderrexitfputcK Q  c m{  @  "% </= FG[x S m u  : ?, : hAKU[ Jc Oz    @ #1 ;I S    ! (08@HPX `hpx @tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm.o0000664000000000000000000024454012213333063023174 0ustar rootrootELF>P@@ Ht&HDBDJ AAFшHHuHUSHH H 6H H 2H HH=HH9u޿SHHIЃHDоH@HHtHHHHHHHHH[USHHHD_@IcAKO@H~RLOXIL@IMA;p}:LPILOXIOIA9p~IMMMM@MAHuHHOXtHoXHHHEH[]ATUSIHFHHHxHt:HvHH9wHI$HuI$H(H@H@H@ H@(H@0XH~:H@XHcHHHHPH@`@lH(9u[]A\USHH/}H~#HcHH|XHt9]HH} HtH}HtHH[]USHH/HPHu0H] HH9sIcDT$ DAD$L$L\$ HD$0HD$(MA HAHAHHAHKH/wLT$0L҃LM@McBA< w$u*DȃuDKDȃHAuctXHAWtUHH>L;d$D$$t$$A9wHHMw@L9DH8[]A\A]A^A_HHH;P(s1HP yډHcH HcHDPÅøHxLu~HPz~xHxH׃?~!HLH uЃxLuH$D$HD$D$$ AAtpH$H$D$D$8CD$$A8CA4H$$A8CAH$$A8CAH$D$$8CAAD¾\H$D$$AA8CH$D$8CD$$AA8C H$D$D$$8CAADH$D$8CD$D$$AA8CH$D$ D$D$D$ $AAcH$D$D$D$$AAH$D$D$$A A ;H$D$D$D$$AA H$D$(D$ D$D$D$H$AAH$D$`D$XD$PILD$HD$@0D$8D$0D$(DD$ HD$HD$DD$$8A<8ʾVH$D$(0CD$ D$D$D$U$A8AD\H$D$80CD$0D$(D$ D$D$D$0C$AA?H$D$?D$D$0C$AA?|H$tH$?H$D$?D$D$$A?A?$H$H$B H$ H$ H$AA5!H$!H$!H$D$pD$hhD$``D$XXD$PPD$HD$@D$8PD$0HD$(@D$ 8D$0D$D$$xApA !H$D$@ D$8D$00D$(pD$ D$D$D$L$AA8P"H$D$@@D$80D$0 D$(D$ D$D$D$$AA"H$D$ D$D$D$$AAp`P$#H$8H$A܉ھ H$\$ʾR#H$t+r t:udKH$I{#H$0#H$#H$#H$AE#H$ʾ#H$Et#H$!#H$!#H$AA$AAʾ $H$AM$H$Eta$H$e$H$k$H$p$H$\$H$|$H${AEE$H$Et#H$G oH$L AE$H$$H$$H$ u&$H$%H$i-%H$؃ u#H$#H$A Aw9%H$#H$D%H$a%H$A%H$cA %H$ &H$ 7&H$tu>?&H$&H$<&H$ʾ&H$%H$7&H$tu>&H$<'H$ʾ!'H$%H$.7&H$tu>D'H$<^'H$ʾx'H$%H$7&H$tu>'H$<'H$ʾ'H$'H$7&H$tu>'H$<'H$ʾ'H$(H$<7&H$tu>'H$<'H$ʾ'H$(H$5(H$p(H$O(H$.(H$(H$(H$)H$@)H$D$(PD$ D$D$D$$AAi)H$)H$D$ PD$D$D$$AA)H$5*H$b*H$vAA(*H$DA*H$$AAtp+H$ $AAtp+H$ +H$ +H$d D$$AA ,H$$AA,H$ D$ D$D$D$ $AA,H$$AA-H$b D$D$D$$AAO-H$-H$ D$D$$AA-H$D$D$$AA.H$A ʾp.H$D D$(D$ D$D$ D$$AA.H$D$D$$AA.H$D$0 D$(D$ D$D$D$$AA)/H$; D$D$$AA/H$D$ D$D$$AA/H$ D$$AA0H$$ AEȹ0H$4 ;&H$=u0H$0H$0H$AA0H$D$$AAd1H$QA1H$%HD$$AA1H$$AA2H$D$ AD$D$TD$$AA2H$VA 63H$AA3H$0H$G7#4H$'4H$Gt[Ht?Fuh:4H$4H$Up4H$z4H$4H$AFu?4H$4H$C4H$4H$AGt4H$"&H$RA~4H$&4H$C5H$5H$5H$5H$5H$6H$6H$AIu(6H$iAJu#S26H$@ALu@6H$S<6H$J6H$A~4H$~k6H$PuSz6H$6H$#H$A~4H$#H$ADAH@6H$6H$lA~6H$@A 6H$WuS7H$#H$7H$!H$AA .7H$7H$7H$8$A A7H$[uQ7H$87H$7H$T7H$87H$(7H$AA87H$+AJH=]DŽ$]H$H$H$H$H$HH$H$H$@$$ HcHH$(DŽ$HcHH$8JH$y "(H$8H H$úH;$|IHHLHэAH$ H4Hu H=~H|_u|ZtH+$HѺH$&H9$ tHʋ$H$$H$$H$?-u;"¾H=+uHH$YHEH$Hu78HH$H=$ $$H$H$ HH$$tH)H$$H$PھH$$)ھH$H$"H$ PھH$H$$)ھH$H$LH$AH$(HcHHHH(HHLAD+ht]HtI\$8D$0PDl$(Hl$ \$\$\$$AA؉HH$E;$fEt6H$DH$H$QH$?H$H$H$H$.H$*HtH$HcH$8H$;$|H${H$+H$ H$ H$HHSHu)H$HHSHuH$H$'H$HH¾H$HHsHuH$@H$JH$ײ_H$Ht.H$H$HH3HuH$@H$H$HHSHuH$HHSHuH$H$H$ H$H$H$t/8H¾H=H$_#H$0#H$A '4H$;ʾ5H$5H$5H$6H$H$H$ H$H$H []A\A]A^A_LuaJIT 2.0.2 VM builder. Target architecture: x64 Available modes: %s _%s%s%selfasmwbwISLTLTlj_str_cmp-DynASM 1.3.0x86lj_vm_asm_beginlj_BC_Error: undefined global %s lj_Error: DASM error %08x _lj_vm_ffi_call .subsections_via_symbols , %dmodule(...) bcnames = "%-6s" irfpm = { [0]="%s", } irfield = { [0]=ircall = { [0]="%s", irnames = "traceerr = { [0]=lj_str_newlj_strscan_numlj_str_fromintlj_str_fromnumlj_tab_new1lj_tab_duplj_tab_newkeylj_tab_lenlj_gc_step_jitlj_gc_barrieruvlj_mem_newgcolj_math_random_steplj_vm_modisinhcoshtanhfputcfwritefflushlj_vm_floorlj_vm_ceillj_vm_truncsqrtexplj_vm_exp2loglj_vm_log2log10sincostanlj_vm_powipowatan2ldexplj_vm_tobitsoftfp_addsoftfp_subsoftfp_mulsoftfp_divsoftfp_cmpsoftfp_i2dsoftfp_d2isoftfp_ui2dsoftfp_f2dsoftfp_d2uisoftfp_d2fsoftfp_i2fsoftfp_ui2fsoftfp_f2isoftfp_f2uifp64_l2dfp64_ul2dfp64_l2ffp64_ul2ffp64_d2lfp64_d2ulfp64_f2lfp64_f2ullj_carith_divi64lj_carith_divu64lj_carith_modi64lj_carith_modu64lj_carith_powi64lj_carith_powu64lj_cdata_setfinstrlenmemcpymemsetlj_vm_errnolj_carith_mul64STR_LENFUNC_ENVFUNC_PCTAB_METATAB_ARRAYTAB_NODETAB_ASIZETAB_HMASKTAB_NOMMUDATA_METAUDATA_UDTYPEUDATA_FILECDATA_CTYPEIDCDATA_PTRCDATA_INTCDATA_INT64CDATA_INT64_4FLOORCEILTRUNCSQRTEXPEXP2LOGLOG2LOG10SINCOSTANOTHERNILFALSETRUELIGHTUDSTRP32THREADPROTOFUNCP64CDATATABUDATAFLOATNUMI8U8I16U16INTU32I64U64SOFTFPGELEGTULTUGEULEUGTEQNEABCRETFNOPBASEPVALGCSTEPHIOPLOOPUSEPHIRENAMEKPRIKINTKGCKPTRKKPTRKNULLKNUMKINT64KSLOTBNOTBSWAPBANDBORBXORBSHLBSHRBSARBROLBRORADDSUBMULDIVMODPOWNEGABSATAN2LDEXPMINMAXFPMATHADDOVSUBOVMULOVAREFHREFKHREFNEWREFUREFOUREFCFREFSTRREFALOADHLOADULOADFLOADXLOADSLOADVLOADASTOREHSTOREUSTOREFSTOREXSTORESNEWXSNEWTNEWTDUPCNEWCNEWITBAROBARXBARCONVTOBITTOSTRSTRTOCALLNCALLLCALLSCALLXSCARGISGEISLEISGTISEQVISNEVISEQSISNESISEQNISNENISEQPISNEPISTCISFCISTISFMOVNOTUNMLENADDVNSUBVNMULVNDIVVNMODVNADDNVSUBNVMULNVDIVNVMODNVADDVVSUBVVMULVVDIVVVMODVVCATKSTRKCDATAKSHORTKNILUGETUSETVUSETSUSETNUSETPUCLOFNEWGGETGSETTGETVTGETSTGETBTSETVTSETSTSETBTSETMCALLMCALLCALLMTCALLTITERCITERNVARGISNEXTRETMRETRET0RET1FORIJFORIFORLIFORLJFORLITERLIITERLJITERLILOOPJLOOPJMPFUNCFIFUNCFJFUNCFFUNCVIFUNCVJFUNCVFUNCCFUNCCWlj_state_growstack@8lj_err_throw@8lj_meta_tgetlj_meta_tsetlj_meta_complj_meta_equallj_meta_equal_cd@8lj_meta_arithlj_meta_len@8lj_meta_calllj_meta_for@8lj_tab_getlj_str_fromnum@8lj_tab_nextlj_tab_getinth@8lj_ffh_coroutine_wrap_err@8lj_vm_sinhlj_vm_coshlj_vm_tanhlj_tab_len@4lj_gc_step@4lj_dispatch_ins@8lj_trace_hot@8lj_dispatch_call@8lj_trace_exit@8lj_ccallback_enter@8lj_ccallback_leave@8lj_meta_catlj_gc_barrieruv@8lj_func_closeuv@8lj_func_newL_gclj_tab_newlj_gc_step_fixtop@4lj_tab_dup@8lj_tab_reasizecoffasmmachasmpeobjrawbcdefffdeflibdefrecdefvmdeffolddefvm_returnpcont_dispatchvm_returncvm_unwind_yieldBC_RET_Zvm_returnvm_leave_cpvm_leave_unwvm_unwind_c_ehvm_unwind_c@8vm_unwind_rethrowvm_unwind_ff@4vm_unwind_ff_ehvm_growstack_cvm_growstack_vvm_growstack_fvm_resumevm_pcallvm_callvm_call_dispatchvmeta_callvm_call_dispatch_fvm_cpcallcont_ffi_callbackvm_call_tailcont_catcont_raBC_CAT_Zvmeta_tgetsvmeta_tgetbvmeta_tgetvvmeta_tsetsvmeta_tsetbvmeta_tsetvcont_nopvmeta_compvmeta_binopcont_condtcont_condfvmeta_equalvmeta_equal_cdvmeta_arith_vnovmeta_arith_vnvmeta_arith_nvovmeta_arith_nvvmeta_unmvmeta_arith_vvovmeta_arith_vvvmeta_lenBC_LEN_Zvmeta_call_raBC_CALLT_Zvmeta_forff_assertfff_fallbackfff_res_ff_typefff_res1ff_getmetatableff_setmetatableff_rawgetff_tonumberfff_resxmm0ff_tostringfff_gcstepff_nextfff_res2fff_resff_pairsff_ipairs_auxfff_res0ff_ipairsff_pcallff_xpcallff_coroutine_resumeff_coroutine_wrap_auxff_coroutine_yieldfff_resifff_resnff_math_absff_math_floorvm_floorff_math_ceilvm_ceilff_math_sqrtff_math_logff_math_log10ff_math_expvm_exp_x87ff_math_sinff_math_cosff_math_tanff_math_asinff_math_acosff_math_atanff_math_sinhff_math_coshff_math_tanhff_math_degff_math_radff_math_atan2ff_math_ldexpff_math_frexpff_math_modfvm_truncff_math_fmodff_math_powvm_powff_math_minff_math_maxff_string_lenff_string_byteff_string_charfff_newstrff_string_subfff_emptystrff_string_repfff_fallback_2ff_string_reversefff_fallback_1ff_string_lowerff_string_upperff_table_getnff_bit_tobitfff_resbitff_bit_bandfff_fallback_bit_opff_bit_borff_bit_bxorff_bit_bswapff_bit_bnotff_bit_lshiftff_bit_rshiftff_bit_arshiftff_bit_rolff_bit_rorvm_recordvm_rethookvm_inshookcont_hookvm_hotloopvm_callhookvm_hotcallvm_exit_handlervm_exit_interpvm_floor_ssevm_ceil_ssevm_trunc_ssevm_modvm_log2vm_exp2_x87vm_exp2rawvm_pow_ssevm_powi_ssevm_foldfpmvm_foldarithvm_cpuidassert_bad_for_arg_typevm_ffi_callbackvm_ffi_call@4BC_MODVN_ZBC_TGETS_ZBC_TSETS_Ztrace too longtrace too deeptoo many snapshotsblacklistedNYI: bytecode %dleaving loop in root traceinner loop in root traceloop unroll limit reachedbad argument typecall to JIT-disabled functioncall unroll limit reacheddown-recursion, restartingNYI: C function %pNYI: FastFunc %sNYI: return to lower framestore with nil or NaN keymissing metamethodlooping index lookupNYI: mixed sparse/dense tablesymbol not in cacheguard would always failtoo many PHIspersistent type instabilitymachine code too longhit mcode limit (retrying)too many spill slotsCopyright (C) 2005-2013 Mike Pall, http://luajit.org/ Usage: buildvm -m mode [-o outfile] [infiles...] Error: too many relocations, increase BUILD_MAX_RELOC. Error: cannot write to output file: %s error thrown or hook called during recordingError: undefined opcode BC_%s Error: cannot open output file '%s': %s .section .debug_frame,"",@progbits .Lframe0: .long .LECIE0-.LSCIE0 .LSCIE0: .long 0xffffffff .byte 0x1 .string "" .uleb128 0x1 .sleb128 -8 .byte 0x10 .byte 0xc .uleb128 0x7 .uleb128 8 .byte 0x80+0x10 .uleb128 0x1 .align 8 .LECIE0: .LSFDE0: .long .LEFDE0-.LASFDE0 .LASFDE0: .long .Lframe0 .quad .Lbegin .quad %d .byte 0xe .uleb128 %d .byte 0x86 .uleb128 0x2 .byte 0x83 .uleb128 0x3 .byte 0x8f .uleb128 0x4 .byte 0x8e .uleb128 0x5 .align 8 .LEFDE0: .LSFDE1: .long .LEFDE1-.LASFDE1 .LASFDE1: .long .Lframe0 .quad lj_vm_ffi_call .quad %d .byte 0xe .uleb128 16 .byte 0x86 .uleb128 0x2 .byte 0xd .uleb128 0x6 .byte 0x83 .uleb128 0x3 .align 8 .LEFDE1: .section .eh_frame,"a",@progbits .Lframe1: .long .LECIE1-.LSCIE1 .LSCIE1: .long 0 .byte 0x1 .string "zPR" .uleb128 0x1 .sleb128 -8 .byte 0x10 .uleb128 6 .byte 0x1b .long lj_err_unwind_dwarf-. .byte 0x1b .byte 0xc .uleb128 0x7 .uleb128 8 .byte 0x80+0x10 .uleb128 0x1 .align 8 .LECIE1: .LSFDE2: .long .LEFDE2-.LASFDE2 .LASFDE2: .long .LASFDE2-.Lframe1 .long .Lbegin-. .long %d .uleb128 0 .byte 0xe .uleb128 %d .byte 0x86 .uleb128 0x2 .byte 0x83 .uleb128 0x3 .byte 0x8f .uleb128 0x4 .byte 0x8e .uleb128 0x5 .align 8 .LEFDE2: .Lframe2: .long .LECIE2-.LSCIE2 .LSCIE2: .long 0 .byte 0x1 .string "zR" .uleb128 0x1 .sleb128 -8 .byte 0x10 .uleb128 1 .byte 0x1b .byte 0xc .uleb128 0x7 .uleb128 8 .byte 0x80+0x10 .uleb128 0x1 .align 8 .LECIE2: .LSFDE3: .long .LEFDE3-.LASFDE3 .LASFDE3: .long .LASFDE3-.Lframe2 .long lj_vm_ffi_call-. .long %d .uleb128 0 .byte 0xe .uleb128 16 .byte 0x86 .uleb128 0x2 .byte 0xd .uleb128 0x6 .byte 0x83 .uleb128 0x3 .align 8 .LEFDE3: .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support EH_frame1: .set L$set$x,LECIEX-LSCIEX .long L$set$x LSCIEX: .long 0 .byte 0x1 .ascii "zPR\0" .byte 0x1 .byte 128-8 .byte 0x10 .byte 6 .byte 0x9b .long _lj_err_unwind_dwarf+4@GOTPCREL .byte 0x1b .byte 0xc .byte 0x7 .byte 8 .byte 0x80+0x10 .byte 0x1 .align 3 LECIEX: %s.eh: LSFDE%d: .set L$set$%d,LEFDE%d-LASFDE%d .long L$set$%d LASFDE%d: .long LASFDE%d-EH_frame1 .long %s-. .long %d .byte 0 .byte 0xe .byte %d .byte 0x86 .byte 0x2 .byte 0x83 .byte 0x3 .byte 0x8f .byte 0x4 .byte 0x8e .byte 0x5 .align 3 LEFDE%d: EH_frame2: .set L$set$y,LECIEY-LSCIEY .long L$set$y LSCIEY: .long 0 .byte 0x1 .ascii "zR\0" .byte 0x1 .byte 128-8 .byte 0x10 .byte 1 .byte 0x1b .byte 0xc .byte 0x7 .byte 8 .byte 0x80+0x10 .byte 0x1 .align 3 LECIEY: _lj_vm_ffi_call.eh: LSFDEY: .set L$set$yy,LEFDEY-LASFDEY .long L$set$yy LASFDEY: .long LASFDEY-EH_frame2 .long _lj_vm_ffi_call-. .long %d .byte 0 .byte 0xe .byte 16 .byte 0x86 .byte 0x2 .byte 0xd .uleb128 0x6 .byte 0x83 .byte 0x3 .align 3 LEFDEY: /* This is a generated file. DO NOT EDIT! */ LJ_DATADEF const uint16_t lj_bc_ofs[] = { -- This is a generated file. DO NOT EDIT! NYI: unsupported variant of FastFunc %sNYI: unsupported C type conversionNYI: unsupported C function typefailed to allocate mcode memoryinconsistent register allocationNYI: cannot assemble IR instruction %dNYI: PHI shuffling too complexNYI: register coalescing too complex  )HLZD   D$ Adž)ۃH, Hjl$D$L$9HL$ H1H(A^A_[];B)D$Ή Hl$Dž|$H(A^A_[]HHl$H틕DAZBAdž D鉅\$鋅j) ̓A$USAWAVH(|$1L$DALD$HD$ D$D$8Adž툅鋕鋅))ыZD$USAWAVH(L$USAWAVH(T$|$LL|$ l$HDAAdž틕)Ӌ)iyʉZ ̓A$ USAWAVH(|$l$DD+D$D|$LL|$ Hх у)Dȋ]HcML=LDzEE!)E"#K )$|$HHM%&$D$H${A)A'C*$H$(Ck,|$H‰\$$KH(H,ʋA$Y)Ӌi)$D$H${A)A*C*$H$+Ck,|$H‰\$KH,H(,A$YCH,Hi)Ӌi-l$4ʍ‰K\$.[CA$/x0x1Ήl$‰\$2l$s\$34A56AǍ,7‰89, DCΉ|$\$,.)ЉY:l$4‰\$.C<;.l$Ή\$ CA?@j@ZD$j*jH)HiD$AB@j9GjZBBCD@jZ*BCABj#i9CiCjBCAE@z@*@z @BZBjAA鉅CF@z@Ջ2R|$ H(ZHjCG@z@HI@ZzBBCz@A@AA;Jl$\$։ K@z@l$鉕Z2R\$ HjHBHjHLMB BCN@*z@@jZBBB MO@z@z @ZBHfHnX-B*;xPH(H*LPՉPMQ@jZBBWBMR@JAS@z @jj B*ZjJT@*Z\$,$z@H@@;@\;@l$lH)9H+HC9΋<$Adžl$$D鉋D);H)HH)D9CB\$D$HB틋HH $Dމ$UjZ\$,$H@@;@\;@l$鉕lH)9H+HC9΋<$Adžl$$D鉋D);H)HH)D9C\$D$1މ $Dމ$Vl$H@D1H눅WXZZCY@z@HfHnTHZBCMD$A8CKHэʋA$DHZz@[H\z@]H^@z@QH_@z@X`@z@Xa@z@bXc@z@Xd@z@Xe@z@Xf@z@Xg@z@Xh@z@Xi@z@Hj@z@Hk@z@Hlm@z@jYHn@z@z @BXo@z@z @BXp@j@ZjB  )*ŋj?jMWHfHnYBj4q@z@jZ(r\B"Bj1MjWs@z@z @BXt@z@z @JuHvz@9H|@L]wz@9H|@L_x@z@**Hy@z@*ZP*HzAA;J@z@,*@l$D$HD${l$T$HƉ\$ZBBC|AA;JD$@z@,jl$z@z @*l$,JD$9l$)} D${D(}1~AA;J@z@z *@,B}}A9AD$MA{@AA;Jz@*}A9\$D$AM ؋\${@AA;Jz@*A9\$D$ALAZ  ؋\${@AA;Jz@*A9\$D$ALaz  ؋\${@z@Ջ:*H@z@HfHnXf~@HfHńz@Xf~D$D9xXf~!̓@HfHńz@Xf~D$D9xXf~ ̓@HfHńz@Xf~D$D9xXf~1̓@z@HfHnXf~@z@HfHnXf~*HD$@@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@z@z @JHfHnXXf~f~@@l$Z\$D鉅B;鋕M)Aj" ̓A$"kHՍ݃)1J]Hl$l$\$D鋅)Hl$UAAAAAl$މKkCAML$j‹l$鉅AI\$\$\$Dl$鉅މD$H)HKAUATASARAQAPWVUHl$XUSRQPEeL}LuDuAAdžAAHHŀD}DuDmDeD]DUDMDE}ume]UMEAAIAdžHAHHH̉鋕鋙HLl$L$$D$DzEEAdžAdžD$A$؉[HfHnHfHn(fTf.fUX\fVHfHnfT\(]HfHnHfHn(fTf.fUX\fVHfHnfT\(rHfHnHfHn(fTf.fU(X\HfHnfT\fV((^HfHnHfHn(fTf.fUX\fVHfHnfT\(Y\Y(\D$D$\$D$bT$|$|$u-*f.Y(YYYHfHn^(HfHnfH~HH H=fH~HH H=L$D$D$D$\$D$ HfHnf.(HfHnfTHfHnf.fPW0HfHnfPWfPW[]rQD$D$b  \$D$ X\Y^uHfHnWHfHnT D$L$D$D$\$D$ ]_ S^NV [SAWAVH(D鋝HHHHH$LLHH\$Adž틐鋀)Ћj ̓A$!L$AH鉑鉩߉HUHSHH)HHHHHHLL((((((((H)H)H]|-|-f.CA$l|f.CC 2|29l ʋ911 2HЋl A; lAf.HЋl9CA$22CA$ll,‰,H,H,ʋA$1|lA$|7HfHnWʋA$|W*ʋA$|:<;*K :|4AX|6AX|9|9X|4A\|6A\|9|9\|4AY|6AY|9|9Y|4A^|6A^|9|9^|4A |6A |9|9 ʋA$uʋA$|$4‰)%\$.kKHHʋA$HADʋA$*ʋA$AʋA$HЉDA$L Di)9A$j鋭HEHʋA$j逽 ‹DMEA$AHЋjA @A$ՉAjANj鋍A$HЋj鋍AA$l$4ʉA$HЋl$RA4\$KDA$l$AA;\$% = KDA$!CHЋl$A\$A;鉕A4"KDA$!CHHЋjAHЋjA|(,|-*f.(;(xH(H,A$(KD|(HA|&,#i9yCH)H,A$CD&|',;'xH(H,A$'KD|+,|-*f.+;+xH,H(A$+K|+AA鉍KHA|),#iƅ9yCH,H)A$ $) $)$D$l$|$H$\$#l$AA鉅|*,;*xH HA$*KAA鉍KD<$E< ʋiD$D;D)ADH)I/AD<$A$|$‰\$$KAA鉅D$|,y>)yy yi));iAiCA$))C y>y >y yi>IXAf.ACA$f. ʋii)iiAAHl$AAL$$Ll$HA$fA.Dl$ ;9CD9,DzhDxl$ ;щ9DyD8DyDxADA$@jLl$D鍈;鉅LAdžAAAdž틕 Z GCC: (Debian 4.7.3-4) 4.7.3zRx 70AAD P}AGsA$tAAD AA(BAA AB$]AAD TAA$dAAD [AA(rBAA jABDkAiH`eBBB B(A0A8DL8A0A(B BBB@BBB B(A0A8o0A(B BBBHBBB B(A0A8Dpm8A0A(B BBB<JPdNALH=BBB B(A0A8G=8A0A(B BBB.symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @P(/&TP,`P 12`P?@2f]TuO O@D\0ezuG P   77 `!}.w9B0K U8fN    sz]Edrke n J*>9N@QZ-=_f ov|pH  buildvm.clowerusagemodenamessym_decoratesym_insertrelocmapextnamesglobnamesbuild_actionlisttrace_errorsstderrfwritefprintfexitsprintfstrchrmallocstrcpydasm_initreallocdasm_freefreedasm_setupglobaldasm_growpcmemsetdasm_setupdasm_putdasm_linkdasm_encodedasm_getpclabeldasm_checkstepowrite__errno_locationstrerrormainstrcmpbc_namesstdoutfopenemit_asmemit_peobjemit_libirfpm_namesirfield_namesircall_namesemit_foldfflushferrorfcloseir_namesirt_names@O T[j ov  8 5  x G  M O P(5YgWj $ 2 : #@#W# h X  p p  + 0 Oy +,  'T v W.     x /!4 A$S"j%%%%t%%<%%% %d%%%%(%?%%%%P%%%*%\%%%%T%%%%<%x%% %l%%%@%m%%%%%L%w%%% %7 %a % % % %!%Y!%!%!%!%"%M"%"%"%"%#%h#%#%#% $%F$%$%$%%%l%%%%%%H&%&%3'%'%'%G(%^(%(%(%(%)%)%1)%^)%u)%)%0*%*%+%l+%+%+%+ (+%,% ,%9,%R,%n,%,%,%,%,%-%F-%m-%-%-%-%-%-%.%7.%S.%o.%.%.%.%.%/%;/%\/%u/%/%/%/%/% 0%L0%c0%0%0%0%0% 1%%1%Z1%x1%1%1%1%2%2%>2%U2%q2%2%2%2%2%3%L3%j3%3%3%3%3%4%04%G4%c4%4%4%4%4%5%45%U5%q5%5%5%5%5%Q6%h6%6%6% 7%?7%k7%7%7%7%8%`8%8%8%!9%r9%9%9%:%?:%:%:%H;%;%;%<%O<%k<%<%<%<%<%2=%^=%=%=%->%Y>%>%>%>%>% ?%*?%C?%Z?%{?%?%?%?%?%@%1@%]@%y@%@%@%@%@%A%A%5A%WA%A%A%A%A%B%&B%GB%eB%|B%B%B%B%C%CC%oC%C%C%C%C%D%/D%KD%D%D%D%D%D%E%.E%[E%hE /mE tE~EEE)E&EE'F F OH=P>X>`>h>pf@xf@:@f@f@ABBBBBB CLCLCECCTDTDcHcH cH(J0K8"K@#NH#NP#NXK`2Nk!5@EJOU\ c(o0z8@HPX`hpx$/;FR]ht (08@HPX`hpx ,=MT[bn~ (08@HP X`!/5:@EINRW]aei o s y ~ ( 0 8 @ H P X ` h p x          h        ( 0 8 @  H P X `  h %p *x . 2 9 > C G L R X ] d j o u z ~      ( 0 8 @ H P X ` h p x                 $ * 0 6 < B I( P0 W8 ^@ eH jP pX u` zh p x            c        ( 0 8 @ H  P X ` h p "x & * 0 6 < B H N T Z ` f l r x ~  X(908@HPX`hppxu      $ + 0 4 9 (> 0C 8I @N HT PZ X` `g h%pn xt z ~                - (; 0H 8V @a Hr P~ X ` h p x      * ? T ` r      W( 0 8 @ H P X ` h p   * 5 E N X d q             (# 06 8@ @R H_ Ph Xp `y h p x         "1APZjy (08@HPX`h px".9AJR[ir| (#0/8=@IHTP`Xl`xhpx+7>JVds (08@HPX`!h,p8xLWcp| (5A N(U0]8i@tHPX`hpxNNNN!N4N@NQNlOOOO O(O0O8O0 @O(HOCPO]XOp`OhOpOX xO OOOO OOO*O O OO8 47TxwEHd n @T>h-tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/.gitignore0000664000000000000000000000003712202141143023323 0ustar rootrootminilua buildvm buildvm_arch.h tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm_lib.c0000664000000000000000000002463612202141143024002 0ustar rootroot/* ** LuaJIT VM builder: library definition compiler. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "buildvm.h" #include "lj_obj.h" #include "lj_lib.h" /* Context for library definitions. */ static uint8_t obuf[8192]; static uint8_t *optr; static char modname[80]; static size_t modnamelen; static char funcname[80]; static int modstate, regfunc; static int ffid, recffid, ffasmfunc; enum { REGFUNC_OK, REGFUNC_NOREG, REGFUNC_NOREGUV }; static void libdef_name(const char *p, int kind) { size_t n = strlen(p); if (kind != LIBINIT_STRING) { if (n > modnamelen && p[modnamelen] == '_' && !strncmp(p, modname, modnamelen)) { p += modnamelen+1; n -= modnamelen+1; } } if (n > LIBINIT_MAXSTR) { fprintf(stderr, "Error: string too long: '%s'\n", p); exit(1); } if (optr+1+n+2 > obuf+sizeof(obuf)) { /* +2 for caller. */ fprintf(stderr, "Error: output buffer overflow\n"); exit(1); } *optr++ = (uint8_t)(n | kind); memcpy(optr, p, n); optr += n; } static void libdef_endmodule(BuildCtx *ctx) { if (modstate != 0) { char line[80]; const uint8_t *p; int n; if (modstate == 1) fprintf(ctx->fp, " (lua_CFunction)0"); fprintf(ctx->fp, "\n};\n"); fprintf(ctx->fp, "static const uint8_t %s%s[] = {\n", LABEL_PREFIX_LIBINIT, modname); line[0] = '\0'; for (n = 0, p = obuf; p < optr; p++) { n += sprintf(line+n, "%d,", *p); if (n >= 75) { fprintf(ctx->fp, "%s\n", line); n = 0; line[0] = '\0'; } } fprintf(ctx->fp, "%s%d\n};\n#endif\n\n", line, LIBINIT_END); } } static void libdef_module(BuildCtx *ctx, char *p, int arg) { UNUSED(arg); if (ctx->mode == BUILD_libdef) { libdef_endmodule(ctx); optr = obuf; *optr++ = (uint8_t)ffid; *optr++ = (uint8_t)ffasmfunc; *optr++ = 0; /* Hash table size. */ modstate = 1; fprintf(ctx->fp, "#ifdef %sMODULE_%s\n", LIBDEF_PREFIX, p); fprintf(ctx->fp, "#undef %sMODULE_%s\n", LIBDEF_PREFIX, p); fprintf(ctx->fp, "static const lua_CFunction %s%s[] = {\n", LABEL_PREFIX_LIBCF, p); } modnamelen = strlen(p); if (modnamelen > sizeof(modname)-1) { fprintf(stderr, "Error: module name too long: '%s'\n", p); exit(1); } strcpy(modname, p); } static int find_ffofs(BuildCtx *ctx, const char *name) { int i; for (i = 0; i < ctx->nglob; i++) { const char *gl = ctx->globnames[i]; if (gl[0] == 'f' && gl[1] == 'f' && gl[2] == '_' && !strcmp(gl+3, name)) { return (int)((uint8_t *)ctx->glob[i] - ctx->code); } } fprintf(stderr, "Error: undefined fast function %s%s\n", LABEL_PREFIX_FF, name); exit(1); } static void libdef_func(BuildCtx *ctx, char *p, int arg) { if (arg != LIBINIT_CF) ffasmfunc++; if (ctx->mode == BUILD_libdef) { if (modstate == 0) { fprintf(stderr, "Error: no module for function definition %s\n", p); exit(1); } if (regfunc == REGFUNC_NOREG) { if (optr+1 > obuf+sizeof(obuf)) { fprintf(stderr, "Error: output buffer overflow\n"); exit(1); } *optr++ = LIBINIT_FFID; } else { if (arg != LIBINIT_ASM_) { if (modstate != 1) fprintf(ctx->fp, ",\n"); modstate = 2; fprintf(ctx->fp, " %s%s", arg ? LABEL_PREFIX_FFH : LABEL_PREFIX_CF, p); } if (regfunc != REGFUNC_NOREGUV) obuf[2]++; /* Bump hash table size. */ libdef_name(regfunc == REGFUNC_NOREGUV ? "" : p, arg); } } else if (ctx->mode == BUILD_ffdef) { fprintf(ctx->fp, "FFDEF(%s)\n", p); } else if (ctx->mode == BUILD_recdef) { if (strlen(p) > sizeof(funcname)-1) { fprintf(stderr, "Error: function name too long: '%s'\n", p); exit(1); } strcpy(funcname, p); } else if (ctx->mode == BUILD_vmdef) { int i; for (i = 1; p[i] && modname[i-1]; i++) if (p[i] == '_') p[i] = '.'; fprintf(ctx->fp, "\"%s\",\n", p); } else if (ctx->mode == BUILD_bcdef) { if (arg != LIBINIT_CF) fprintf(ctx->fp, ",\n%d", find_ffofs(ctx, p)); } ffid++; regfunc = REGFUNC_OK; } static uint32_t find_rec(char *name) { char *p = (char *)obuf; uint32_t n; for (n = 2; *p; n++) { if (strcmp(p, name) == 0) return n; p += strlen(p)+1; } if (p+strlen(name)+1 >= (char *)obuf+sizeof(obuf)) { fprintf(stderr, "Error: output buffer overflow\n"); exit(1); } strcpy(p, name); return n; } static void libdef_rec(BuildCtx *ctx, char *p, int arg) { UNUSED(arg); if (ctx->mode == BUILD_recdef) { char *q; uint32_t n; for (; recffid+1 < ffid; recffid++) fprintf(ctx->fp, ",\n0"); recffid = ffid; if (*p == '.') p = funcname; q = strchr(p, ' '); if (q) *q++ = '\0'; n = find_rec(p); if (q) fprintf(ctx->fp, ",\n0x%02x00+(%s)", n, q); else fprintf(ctx->fp, ",\n0x%02x00", n); } } static void memcpy_endian(void *dst, void *src, size_t n) { union { uint8_t b; uint32_t u; } host_endian; host_endian.u = 1; if (host_endian.b == LJ_ENDIAN_SELECT(1, 0)) { memcpy(dst, src, n); } else { size_t i; for (i = 0; i < n; i++) ((uint8_t *)dst)[i] = ((uint8_t *)src)[n-i-1]; } } static void libdef_push(BuildCtx *ctx, char *p, int arg) { UNUSED(arg); if (ctx->mode == BUILD_libdef) { int len = (int)strlen(p); if (*p == '"') { if (len > 1 && p[len-1] == '"') { p[len-1] = '\0'; libdef_name(p+1, LIBINIT_STRING); return; } } else if (*p >= '0' && *p <= '9') { char *ep; double d = strtod(p, &ep); if (*ep == '\0') { if (optr+1+sizeof(double) > obuf+sizeof(obuf)) { fprintf(stderr, "Error: output buffer overflow\n"); exit(1); } *optr++ = LIBINIT_NUMBER; memcpy_endian(optr, &d, sizeof(double)); optr += sizeof(double); return; } } else if (!strcmp(p, "lastcl")) { if (optr+1 > obuf+sizeof(obuf)) { fprintf(stderr, "Error: output buffer overflow\n"); exit(1); } *optr++ = LIBINIT_LASTCL; return; } else if (len > 4 && !strncmp(p, "top-", 4)) { if (optr+2 > obuf+sizeof(obuf)) { fprintf(stderr, "Error: output buffer overflow\n"); exit(1); } *optr++ = LIBINIT_COPY; *optr++ = (uint8_t)atoi(p+4); return; } fprintf(stderr, "Error: bad value for %sPUSH(%s)\n", LIBDEF_PREFIX, p); exit(1); } } static void libdef_set(BuildCtx *ctx, char *p, int arg) { UNUSED(arg); if (ctx->mode == BUILD_libdef) { if (p[0] == '!' && p[1] == '\0') p[0] = '\0'; /* Set env. */ libdef_name(p, LIBINIT_STRING); *optr++ = LIBINIT_SET; obuf[2]++; /* Bump hash table size. */ } } static void libdef_regfunc(BuildCtx *ctx, char *p, int arg) { UNUSED(ctx); UNUSED(p); regfunc = arg; } typedef void (*LibDefFunc)(BuildCtx *ctx, char *p, int arg); typedef struct LibDefHandler { const char *suffix; const char *stop; const LibDefFunc func; const int arg; } LibDefHandler; static const LibDefHandler libdef_handlers[] = { { "MODULE_", " \t\r\n", libdef_module, 0 }, { "CF(", ")", libdef_func, LIBINIT_CF }, { "ASM(", ")", libdef_func, LIBINIT_ASM }, { "ASM_(", ")", libdef_func, LIBINIT_ASM_ }, { "REC(", ")", libdef_rec, 0 }, { "PUSH(", ")", libdef_push, 0 }, { "SET(", ")", libdef_set, 0 }, { "NOREGUV", NULL, libdef_regfunc, REGFUNC_NOREGUV }, { "NOREG", NULL, libdef_regfunc, REGFUNC_NOREG }, { NULL, NULL, (LibDefFunc)0, 0 } }; /* Emit C source code for library function definitions. */ void emit_lib(BuildCtx *ctx) { const char *fname; if (ctx->mode == BUILD_ffdef || ctx->mode == BUILD_libdef || ctx->mode == BUILD_recdef) fprintf(ctx->fp, "/* This is a generated file. DO NOT EDIT! */\n\n"); else if (ctx->mode == BUILD_vmdef) fprintf(ctx->fp, "ffnames = {\n[0]=\"Lua\",\n\"C\",\n"); if (ctx->mode == BUILD_recdef) fprintf(ctx->fp, "static const uint16_t recff_idmap[] = {\n0,\n0x0100"); recffid = ffid = FF_C+1; ffasmfunc = 0; while ((fname = *ctx->args++)) { char buf[256]; /* We don't care about analyzing lines longer than that. */ FILE *fp; if (fname[0] == '-' && fname[1] == '\0') { fp = stdin; } else { fp = fopen(fname, "r"); if (!fp) { fprintf(stderr, "Error: cannot open input file '%s': %s\n", fname, strerror(errno)); exit(1); } } modstate = 0; regfunc = REGFUNC_OK; while (fgets(buf, sizeof(buf), fp) != NULL) { char *p; /* Simplistic pre-processor. Only handles top-level #if/#endif. */ if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') { int ok = 1; if (!strcmp(buf, "#if LJ_52\n")) ok = LJ_52; else if (!strcmp(buf, "#if LJ_HASJIT\n")) ok = LJ_HASJIT; else if (!strcmp(buf, "#if LJ_HASFFI\n")) ok = LJ_HASFFI; if (!ok) { int lvl = 1; while (fgets(buf, sizeof(buf), fp) != NULL) { if (buf[0] == '#' && buf[1] == 'e' && buf[2] == 'n') { if (--lvl == 0) break; } else if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') { lvl++; } } continue; } } for (p = buf; (p = strstr(p, LIBDEF_PREFIX)) != NULL; ) { const LibDefHandler *ldh; p += sizeof(LIBDEF_PREFIX)-1; for (ldh = libdef_handlers; ldh->suffix != NULL; ldh++) { size_t n, len = strlen(ldh->suffix); if (!strncmp(p, ldh->suffix, len)) { p += len; n = ldh->stop ? strcspn(p, ldh->stop) : 0; if (!p[n]) break; p[n] = '\0'; ldh->func(ctx, p, ldh->arg); p += n+1; break; } } if (ldh->suffix == NULL) { buf[strlen(buf)-1] = '\0'; fprintf(stderr, "Error: unknown library definition tag %s%s\n", LIBDEF_PREFIX, p); exit(1); } } } fclose(fp); if (ctx->mode == BUILD_libdef) { libdef_endmodule(ctx); } } if (ctx->mode == BUILD_ffdef) { fprintf(ctx->fp, "\n#undef FFDEF\n\n"); fprintf(ctx->fp, "#ifndef FF_NUM_ASMFUNC\n#define FF_NUM_ASMFUNC %d\n#endif\n\n", ffasmfunc); } else if (ctx->mode == BUILD_vmdef) { fprintf(ctx->fp, "}\n\n"); } else if (ctx->mode == BUILD_bcdef) { int i; fprintf(ctx->fp, "\n};\n\n"); fprintf(ctx->fp, "LJ_DATADEF const uint16_t lj_bc_mode[] = {\n"); fprintf(ctx->fp, "BCDEF(BCMODE)\n"); for (i = ffasmfunc-1; i > 0; i--) fprintf(ctx->fp, "BCMODE_FF,\n"); fprintf(ctx->fp, "BCMODE_FF\n};\n\n"); } else if (ctx->mode == BUILD_recdef) { char *p = (char *)obuf; fprintf(ctx->fp, "\n};\n\n"); fprintf(ctx->fp, "static const RecordFunc recff_func[] = {\n" "recff_nyi,\n" "recff_c"); while (*p) { fprintf(ctx->fp, ",\nrecff_%s", p); p += strlen(p)+1; } fprintf(ctx->fp, "\n};\n\n"); } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm.h0000664000000000000000000000500112202141143023142 0ustar rootroot/* ** LuaJIT VM builder. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _BUILDVM_H #define _BUILDVM_H #include #include #include #include #include #include "lj_def.h" #include "lj_arch.h" /* Hardcoded limits. Increase as needed. */ #define BUILD_MAX_RELOC 200 /* Max. number of relocations. */ #define BUILD_MAX_FOLD 4096 /* Max. number of fold rules. */ /* Prefix for scanned library definitions. */ #define LIBDEF_PREFIX "LJLIB_" /* Prefix for scanned fold definitions. */ #define FOLDDEF_PREFIX "LJFOLD" /* Prefixes for generated labels. */ #define LABEL_PREFIX "lj_" #define LABEL_PREFIX_BC LABEL_PREFIX "BC_" #define LABEL_PREFIX_FF LABEL_PREFIX "ff_" #define LABEL_PREFIX_CF LABEL_PREFIX "cf_" #define LABEL_PREFIX_FFH LABEL_PREFIX "ffh_" #define LABEL_PREFIX_LIBCF LABEL_PREFIX "lib_cf_" #define LABEL_PREFIX_LIBINIT LABEL_PREFIX "lib_init_" /* Forward declaration. */ struct dasm_State; /* Build modes. */ #define BUILDDEF(_) \ _(elfasm) _(coffasm) _(machasm) _(peobj) _(raw) \ _(bcdef) _(ffdef) _(libdef) _(recdef) _(vmdef) \ _(folddef) typedef enum { #define BUILDENUM(name) BUILD_##name, BUILDDEF(BUILDENUM) #undef BUILDENUM BUILD__MAX } BuildMode; /* Code relocation. */ typedef struct BuildReloc { int32_t ofs; int sym; int type; } BuildReloc; typedef struct BuildSym { const char *name; int32_t ofs; } BuildSym; /* Build context structure. */ typedef struct BuildCtx { /* DynASM state pointer. Should be first member. */ struct dasm_State *D; /* Parsed command line. */ BuildMode mode; FILE *fp; const char *outname; char **args; /* Code and symbols generated by DynASM. */ uint8_t *code; size_t codesz; int npc, nglob, nsym, nreloc, nrelocsym; void **glob; BuildSym *sym; const char **relocsym; int32_t *bc_ofs; const char *beginsym; /* Strings generated by DynASM. */ const char *const *globnames; const char *dasm_ident; const char *dasm_arch; /* Relocations. */ BuildReloc reloc[BUILD_MAX_RELOC]; } BuildCtx; extern void owrite(BuildCtx *ctx, const void *ptr, size_t sz); extern void emit_asm(BuildCtx *ctx); extern void emit_peobj(BuildCtx *ctx); extern void emit_lib(BuildCtx *ctx); extern void emit_fold(BuildCtx *ctx); extern const char *const bc_names[]; extern const char *const ir_names[]; extern const char *const irt_names[]; extern const char *const irfpm_names[]; extern const char *const irfield_names[]; extern const char *const ircall_names[]; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm_peobj.o0000664000000000000000000001107012213333046024342 0ustar rootrootELF> @@ H\$Hl$Ld$Ll$Lt$L|$HhH<$AHHHHYH-Hu"HHHDHAEEHw)HH|$H)H|$H߾;D$HHD$D$HHHH\$DHHD|$AfDt$fDl$Dd$ D$!Ht$H<$H\$8Hl$@Ld$HLl$PLt$XL|$`HhH=USHHHHcHHHHD$ D$(fT$,fD$.D$0D$1Ht$ H$HD$D$C$C fD$HHHH[]AVAUATUSHHHl$0HHD$0.texD$4tD$DHC0D$@D$HSDfT$PPD$T P`D$X.pdafD$\taD$lD$hPT$pfD$xD$|@0@DŽ$.xdafDŽ$taPT$DŽ$ Pt$fDŽ$P~DŽ$@0@H.rdata$ZH$$HHщ$DŽ$@0@fDŽ$dfDŽ$DŽ$ʉ$fDŽ$fDŽ$DcHC@AD $H$HHHHS0Hs(H{D~VHcH@HHT$PT$xfD$ Ht$H9kDHcC@HHHCXh$l$D$ HH,$HC0D$D$ HHD$Al$l$fD$ Ht$HD$l$fD$ Ht$HD$El$Dl$fD$ Ht$HD$ l$fD$ Ht$HD$l$fD$ Ht$HD$Dl$fD$ Ht$HfD$fD$fD$BfD$0fD$`fD$pfD$PfD$fD$"fD$ fD$$fD$&fD$(fD$*fD$,0fD$.P Ht$H$AD$D$fD$ HHHHHHHHHAD$L4AHAAHHt$0HE~2HC`H4(AA DHHL9uӺHt$0HHt$0HAA DH;HspAAH{@~7HcHHCXPAA H0H9k@κHt$0HH5HuH-HH(HHH[]A\A]A^@feat.00lj_err_unwind_win64GCC: (Debian 4.7.3-4) 4.7.3zRx $7bp(DOAD`AA@pBBB A(A0G0A(A BBB.symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.comment.note.GNU-stack.rela.eh_frame @~xx &,12@0I^YH hX   l7 '17ELSZebuildvm_peobj.cemit_peobj_symstrtabstrtabofsemit_peobj_sym_sectmemcpymemsetowriteemit_peobjmallocDZf  :Yiy .X} +  9EMTbj H7ttarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm_fold.o0000664000000000000000000002052012213333046024167 0ustar rootrootELF>@@ AUATUSHHIAՍZHھv2AN,ATH}HL9uHMH[]A\A]AWAVAUATUSHIHHAվ HHtHI$EH8u@H=H-LcLBH<HuH8u@H=HLcLH<HuH8u@H=H{LcLH<HuKH8H= L{_LIL)HD$H=AMfMtGHT$Lu6H=Lu ADH<HuADH<Hu 8) strtabofs += len+1; return; } if (len <= 8) { memcpy(sym.n.name, name, len); memset(sym.n.name+len, 0, 8-len); } else { sym.n.nameref[0] = 0; sym.n.nameref[1] = (uint32_t)strtabofs; memcpy(strtab + strtabofs, name, len); strtab[strtabofs+len] = 0; strtabofs += len+1; } sym.value = value; sym.sect = (int16_t)(sect+1); /* 1-based section number. */ sym.type = (uint16_t)type; sym.scl = (uint8_t)scl; sym.naux = 0; owrite(ctx, &sym, PEOBJ_SYM_SIZE); } /* Emit PE object section symbol. */ static void emit_peobj_sym_sect(BuildCtx *ctx, PEsection *pesect, int sect) { PEsym sym; PEsymaux aux; if (!strtab) return; /* Pass 1: no output. */ memcpy(sym.n.name, pesect[sect].name, 8); sym.value = 0; sym.sect = (int16_t)(sect+1); /* 1-based section number. */ sym.type = PEOBJ_TYPE_NULL; sym.scl = PEOBJ_SCL_STATIC; sym.naux = 1; owrite(ctx, &sym, PEOBJ_SYM_SIZE); memset(&aux, 0, sizeof(PEsymaux)); aux.size = pesect[sect].size; aux.nreloc = pesect[sect].nreloc; owrite(ctx, &aux, PEOBJ_SYM_SIZE); } /* Emit Windows PE object file. */ void emit_peobj(BuildCtx *ctx) { PEheader pehdr; PEsection pesect[PEOBJ_NSECTIONS]; uint32_t sofs; int i, nrsym; union { uint8_t b; uint32_t u; } host_endian; sofs = sizeof(PEheader) + PEOBJ_NSECTIONS*sizeof(PEsection); /* Fill in PE sections. */ memset(&pesect, 0, PEOBJ_NSECTIONS*sizeof(PEsection)); memcpy(pesect[PEOBJ_SECT_TEXT].name, ".text", sizeof(".text")-1); pesect[PEOBJ_SECT_TEXT].ofs = sofs; sofs += (pesect[PEOBJ_SECT_TEXT].size = (uint32_t)ctx->codesz); pesect[PEOBJ_SECT_TEXT].relocofs = sofs; sofs += (pesect[PEOBJ_SECT_TEXT].nreloc = (uint16_t)ctx->nreloc) * PEOBJ_RELOC_SIZE; /* Flags: 60 = read+execute, 50 = align16, 20 = code. */ pesect[PEOBJ_SECT_TEXT].flags = PEOBJ_TEXT_FLAGS; #if LJ_TARGET_X64 memcpy(pesect[PEOBJ_SECT_PDATA].name, ".pdata", sizeof(".pdata")-1); pesect[PEOBJ_SECT_PDATA].ofs = sofs; sofs += (pesect[PEOBJ_SECT_PDATA].size = 6*4); pesect[PEOBJ_SECT_PDATA].relocofs = sofs; sofs += (pesect[PEOBJ_SECT_PDATA].nreloc = 6) * PEOBJ_RELOC_SIZE; /* Flags: 40 = read, 30 = align4, 40 = initialized data. */ pesect[PEOBJ_SECT_PDATA].flags = 0x40300040; memcpy(pesect[PEOBJ_SECT_XDATA].name, ".xdata", sizeof(".xdata")-1); pesect[PEOBJ_SECT_XDATA].ofs = sofs; sofs += (pesect[PEOBJ_SECT_XDATA].size = 8*2+4+6*2); /* See below. */ pesect[PEOBJ_SECT_XDATA].relocofs = sofs; sofs += (pesect[PEOBJ_SECT_XDATA].nreloc = 1) * PEOBJ_RELOC_SIZE; /* Flags: 40 = read, 30 = align4, 40 = initialized data. */ pesect[PEOBJ_SECT_XDATA].flags = 0x40300040; #endif memcpy(pesect[PEOBJ_SECT_RDATA_Z].name, ".rdata$Z", sizeof(".rdata$Z")-1); pesect[PEOBJ_SECT_RDATA_Z].ofs = sofs; sofs += (pesect[PEOBJ_SECT_RDATA_Z].size = (uint32_t)strlen(ctx->dasm_ident)+1); /* Flags: 40 = read, 30 = align4, 40 = initialized data. */ pesect[PEOBJ_SECT_RDATA_Z].flags = 0x40300040; /* Fill in PE header. */ pehdr.arch = PEOBJ_ARCH_TARGET; pehdr.nsects = PEOBJ_NSECTIONS; pehdr.time = 0; /* Timestamp is optional. */ pehdr.symtabofs = sofs; pehdr.opthdrsz = 0; pehdr.flags = 0; /* Compute the size of the symbol table: ** @feat.00 + nsections*2 ** + asm_start + nsym ** + nrsym */ nrsym = ctx->nrelocsym; pehdr.nsyms = 1+PEOBJ_NSECTIONS*2 + 1+ctx->nsym + nrsym; #if LJ_TARGET_X64 pehdr.nsyms += 1; /* Symbol for lj_err_unwind_win64. */ #endif /* Write PE object header and all sections. */ owrite(ctx, &pehdr, sizeof(PEheader)); owrite(ctx, &pesect, sizeof(PEsection)*PEOBJ_NSECTIONS); /* Write .text section. */ host_endian.u = 1; if (host_endian.b != LJ_ENDIAN_SELECT(1, 0)) { #if LJ_TARGET_PPC uint32_t *p = (uint32_t *)ctx->code; int n = (int)(ctx->codesz >> 2); for (i = 0; i < n; i++, p++) *p = lj_bswap(*p); /* Byteswap .text section. */ #else fprintf(stderr, "Error: different byte order for host and target\n"); exit(1); #endif } owrite(ctx, ctx->code, ctx->codesz); for (i = 0; i < ctx->nreloc; i++) { PEreloc reloc; reloc.vaddr = (uint32_t)ctx->reloc[i].ofs + PEOBJ_RELOC_OFS; reloc.symidx = 1+2+ctx->reloc[i].sym; /* Reloc syms are after .text sym. */ reloc.type = ctx->reloc[i].type ? PEOBJ_RELOC_REL32 : PEOBJ_RELOC_DIR32; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); } #if LJ_TARGET_X64 { /* Write .pdata section. */ uint32_t fcofs = (uint32_t)ctx->sym[ctx->nsym-1].ofs; uint32_t pdata[3]; /* Start of .text, end of .text and .xdata. */ PEreloc reloc; pdata[0] = 0; pdata[1] = fcofs; pdata[2] = 0; owrite(ctx, &pdata, sizeof(pdata)); pdata[0] = fcofs; pdata[1] = (uint32_t)ctx->codesz; pdata[2] = 20; owrite(ctx, &pdata, sizeof(pdata)); reloc.vaddr = 0; reloc.symidx = 1+2+nrsym+2+2+1; reloc.type = PEOBJ_RELOC_ADDR32NB; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); reloc.vaddr = 4; reloc.symidx = 1+2+nrsym+2+2+1; reloc.type = PEOBJ_RELOC_ADDR32NB; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); reloc.vaddr = 8; reloc.symidx = 1+2+nrsym+2; reloc.type = PEOBJ_RELOC_ADDR32NB; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); reloc.vaddr = 12; reloc.symidx = 1+2+nrsym+2+2+1; reloc.type = PEOBJ_RELOC_ADDR32NB; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); reloc.vaddr = 16; reloc.symidx = 1+2+nrsym+2+2+1; reloc.type = PEOBJ_RELOC_ADDR32NB; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); reloc.vaddr = 20; reloc.symidx = 1+2+nrsym+2; reloc.type = PEOBJ_RELOC_ADDR32NB; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); } { /* Write .xdata section. */ uint16_t xdata[8+2+6]; PEreloc reloc; xdata[0] = 0x01|0x08|0x10; /* Ver. 1, uhandler/ehandler, prolog size 0. */ xdata[1] = 0x0005; /* Number of unwind codes, no frame pointer. */ xdata[2] = 0x4200; /* Stack offset 4*8+8 = aword*5. */ xdata[3] = 0x3000; /* Push rbx. */ xdata[4] = 0x6000; /* Push rsi. */ xdata[5] = 0x7000; /* Push rdi. */ xdata[6] = 0x5000; /* Push rbp. */ xdata[7] = 0; /* Alignment. */ xdata[8] = xdata[9] = 0; /* Relocated address of exception handler. */ xdata[10] = 0x01; /* Ver. 1, no handler, prolog size 0. */ xdata[11] = 0x1504; /* Number of unwind codes, fp = rbp, fpofs = 16. */ xdata[12] = 0x0300; /* set_fpreg. */ xdata[13] = 0x0200; /* stack offset 0*8+8 = aword*1. */ xdata[14] = 0x3000; /* Push rbx. */ xdata[15] = 0x5000; /* Push rbp. */ owrite(ctx, &xdata, sizeof(xdata)); reloc.vaddr = 2*8; reloc.symidx = 1+2+nrsym+2+2; reloc.type = PEOBJ_RELOC_ADDR32NB; owrite(ctx, &reloc, PEOBJ_RELOC_SIZE); } #endif /* Write .rdata$Z section. */ owrite(ctx, ctx->dasm_ident, strlen(ctx->dasm_ident)+1); /* Write symbol table. */ strtab = NULL; /* 1st pass: collect string sizes. */ for (;;) { strtabofs = 4; /* Mark as SafeSEH compliant. */ emit_peobj_sym(ctx, "@feat.00", 1, PEOBJ_SECT_ABS, PEOBJ_TYPE_NULL, PEOBJ_SCL_STATIC); emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_TEXT); for (i = 0; i < nrsym; i++) emit_peobj_sym(ctx, ctx->relocsym[i], 0, PEOBJ_SECT_UNDEF, PEOBJ_TYPE_FUNC, PEOBJ_SCL_EXTERN); #if LJ_TARGET_X64 emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_PDATA); emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_XDATA); emit_peobj_sym(ctx, "lj_err_unwind_win64", 0, PEOBJ_SECT_UNDEF, PEOBJ_TYPE_FUNC, PEOBJ_SCL_EXTERN); #endif emit_peobj_sym(ctx, ctx->beginsym, 0, PEOBJ_SECT_TEXT, PEOBJ_TYPE_NULL, PEOBJ_SCL_EXTERN); for (i = 0; i < ctx->nsym; i++) emit_peobj_sym(ctx, ctx->sym[i].name, (uint32_t)ctx->sym[i].ofs, PEOBJ_SECT_TEXT, PEOBJ_TYPE_FUNC, PEOBJ_SCL_EXTERN); emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_RDATA_Z); if (strtab) break; /* 2nd pass: alloc strtab, write syms and copy strings. */ strtab = (char *)malloc(strtabofs); *(uint32_t *)strtab = (uint32_t)strtabofs; } /* Write string table. */ owrite(ctx, strtab, strtabofs); } #else void emit_peobj(BuildCtx *ctx) { UNUSED(ctx); fprintf(stderr, "Error: no PE object support for this target\n"); exit(1); } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/README0000664000000000000000000000030112202141143022205 0ustar rootrootThe files in this directory are only used during the build process of LuaJIT. For cross-compilation, they must be executed on the host, not on the target. These files should NOT be installed! tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/minilua.o0000664000000000000000000041707012213333055023171 0ustar rootrootELF>pc@@vwwà Ét øvwËW;VuWt.tG9t'u/f.zt*Ë9HH9HH9HG HWHPHGHW HP HO(HAHG(HQA LALGHIHO0tbH;ws!HHLFLBDFDBu;DA /H9wwDHAHuEIILHWf.zuHG fD$HD$HH O HHHHHHHG HËFtl <tu O HH#B HHHG HO H#HHHG HËO HHHHHHHG HËO HHHHHHHG Høu,*f.ztSHH?wbHD[ÍF;G8sHcHHHGH*$_xu$f.@ztH@ HuHO H#F HHHG HЃxuH9ptH@ HuH\$Hl$HHHxuC H$Hl$HËFtu HHHHHHHO HHHtHG H(H5USHVtt t]-H6N,*f.zu D.HjHH{HtHH[ Hu[]AUATUSIG8Åt@HwPH|t, QHH2zED)ƒw|kI|$ u2lD-=w LxuC uvË u  HHcVH@%FÃu%HHcVH@H Ëv}΁?҃@ HHcW0H@(tGG7WHG0@pJt'H0H8PJ)HcPHHW0JuHG0PJ9}.HHI0PJx0PH| PJ9FVGJF F HG(HHw(ÍwHHuH\$Hl$Ld$Ll$Lt$H(HHAF IIHG H(HJHHtgL9tbMtJAD$ DrEIF DH(DLHHt*HHD HH$Hl$Ld$Ll$Lt$ H(Å~HcHHHGH;GHCÁ| HcHHGÁt!tHGxu5HG HHG(H@HH@HLJHHG(H@H)J 9)HHHHDHG(H;GPuHGxH@HH@HGH+GHÅx7HGHcHHWHH9s@HHGHWHH9wHWHcHHHGSHLHHKI9s'LHH)H:J|DBFDHHKH9rHHK[SHHSH9sHJH JJHH9rHSH HRP[SHFHSHH @BHC[*H=t@øÃt HcHøH\$Hl$Ld$HHAHDHHtH=tHHN H$Hl$Ld$HHtu 8҉]Pt u HH(HøHG@HGHG@HGHGH*@HGHG҉@HGSHHsHH8HSHHJ@B[H\$Hl$HHH8HSHH @BHCH$Hl$HSHiPtu HH@HH@HC HcHHtHSHBHC[SH HKytHQHtuL%HHQHtMB tGH0F t>H4HHQHt(B t"H0F tH\HC HcHHk[SHzPtt'uZHHKHIHJUHHKHIHJDHHKHIHJxǂ)H0F tHHkHSHRB uɸ[H~HFHFHFHtHHFHøøtSHjH[HHD7HHHHIUSHHHHt$EHD$H9HLDHHL9u L9L9tHHI)HI)븸H[]A\A]A^A_H\$Hl$Ld$HIHHՋF;BtMGuf.2uH2H;) X+uHHLMH$Hl$Ld$HAWAVAUATUSHXIHG`fG`f=v'f=uuf=v HLW:D$4MMo0IG(H@HHD$IGHD$HT$HB H@HD$ L,$L,$A]IEH$l$HcIILd$M؃?%w$HcHHD$HI$@AD$L,$HcHHD$ HI$@AD$L,$uA$AD$ILD,$JHcHHD$@HI9vL,$"HcHT$HD(H@HI$@AD$L,$HT$HBHD$@D$HH$IG0HcHHT$ LHt$@LaIIWHT$L,$H$IG0tHHHT$ %HHHT$HcHHt$LLIIWHT$L,$GHT$HBHD$@D$HH$IG0HcHHT$ LHt$@L_IWHT$L,$HcHD$Ht(HFI$HAT$PL,$A|$I$B F L#L,$H$IW0tHHHL$ %HHHL$tHHT$ HcHHT$LL^IGHD$L,$)Bʼn6L:I$AD$H$IW0IG HPpH9PxrLaIGHD$L,$HcHHt$HID$FAD$H$IW0tHHT$ HځHHT$LLGIGHD$L,$VtHHHT$ HHHHT$tHHL$ HفHHL$zu&yu XA$AD$L,$H$IG0ALLE(IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zu&yu \A$AD$L,$1H$IG0ALL'IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zu&yu YA$AD$L,$H$IG0ALL&IWHT$L,$^tHHHT$ HHHHT$tHHL$ HفHHL$zu&yu ^A$AD$L,$H$IG0ALLM&IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zuKyuED$ L$(^YD$(L$\A $AD$L,$H$IG0A LL%IWHT$L,$tHHHT$ HHHHT$tHHL$ HفHHL$zu+yu% A$AD$L,$gH$IG0A LL$IWHT$L,$<HcHHT$zu$fWA$AD$L,$H$IG0A HLLl$IWHT$L,$HcHHL$Qtu 9A$AD$L,$HcHH\$Ct)udH;*A$AD$L,$THH@HxH*HHH H*XA$AD$L,$H$IG0A LHL uHL#IWHT$L,$ځH$IG0)L$IG HPpH9PxrL[IGHD$HcHHD$Ld$MHI$@AD$L,$[HcH$LDtIILd$ HIILd$tHH\$ HH\$H$IG0AD$;C$A$f.zA9$HI9$I$HH9HRHpL54I$HH9tiHRHpLHI9$FHt|$ uA}~IuF tHEuA}~IuF tHAAuD |$ tc HcS8HHK (HH<IHCHG8HsF t{ tR{ AIcHHA|~IcHHItF tHMAAD$ A9|CHs F tH*{ t+AIcIt(F tHAAD$ A9|ۀ{ tC @(HpC H(_IHHG8HG@HH_@c ~HsxF tHsHCPHK(H9wIHPI9LBH(H9vILc@L9v$A|$~I4$F tHHIM;frM9wAD$IM9vHK(HSPHk@C\= NVH)Hi 9~~HCXI)IB9}Z~HHcSXHHcC\HH¸,IHChHG8HC@Ht` {L~4AIcHID$x~H0F tHWAE;l$L|҃{H~$HcIT$8HHtb A;D$H|{X~0AIcID$ H4HtF tHAE;l$X|֋S\~)HcHIT$0HHtb AT$\9|HcHcCLHHcKHHcCXHHcsPHcCTHDHHHHAD$ H[]A\A]A^A_USHHH8tHHH{8uHH[]HGX9| 4aXHUSHHHH+o@HGH2H0RPHGHHPQPHGIHP APP(HG8H+GH0 HsHF0HCHHs@HHCHPHSHPH@FH[]H\$Hl$Ld$Ll$Lt$H(HHIIEDxuDLHwxtMHHLHH$Hl$Ld$Ll$Lt$ H(H\$Hl$Ld$Ll$Lt$H(HIIẢHAxt\DLHHH舾At9HsMLHHcHSBAtAu :AEDH$Hl$Ld$Ll$Lt$ H(USHHHoHHHHQHHEEHC8H+CH HHCH[]H\$Hl$H@jHHWHH+OHHcHH@D~;HG8H)H‰HH9=HU(HcHH]H9Zs HZH\$Hl$HHHcFH LG(IM@L9sH9u H9t HL9rHH\$Hl$Ld$Ll$Lt$L|$HxIHIIEHt$0H:HHHt$ L!H$L$AA!EB$$XD$EE$\D$EE$YD$EE$^D$EE$^D$YD$ $\MEyL$$EE[ $fWEEAFLCLH|$LdIFL`MtAI^]A~2IvH|$IELhHL)I9rH|$MHD9t!I݃{tHH|$uHT$HZ HShL9s>Iv ID$HwA HsXLH|$ H|$HCXLchH[XH\$~:AHcHLH)H2LnH|$LHLMuAHcHI)LHt$H|$IAF)AD$AH([]A\A]A^A_AWAVAUATUSH8HII־A%LHH(L{HL)LHXIAGHC8H+CH HJHSHBHCE>uHGILhHHGH$ Btt=HHHGPHH$H@L(Mt%ALAHU8HT$u{OAHEHEHEE(E0E4HE H}8<蟴E,fLAH'L<)$A} t HE E0E4HE8IE H@@HHE IE @`E0IU RdU4HEHEHu <H|$?H<$t H4$L诧E("AE E,HEHEAH)ID$@AID$L(@ID$8I+D$H LID$LLHMtA} tID$@bLHIE Lp(xT~0HcAHL@IE ;XT|ID$H(@ID$8I+D$H LID$,fLHLLH8DH[]A\A]A^A_AWAVAUATUSHIHIHL$Ad}uXH]LH/Iƃxu,H{Ht#G uIE H(qHHu=IHT$HAFBfHL腡HÃxuHL{uMHHHt$LHANLzH[]A\A]A^A_H\$Hl$Ld$H(HHIHHHHQHHIH$D$HKHLHHCH\$Hl$Ld$ H(SH蜩Pt!t3uGHSHH@HB;HSHH@HB$HHCHJxHP HC@HCHHxuHx tHP H[HHcFHHcRH Q8PuH¾H¾HUSHHuiHGPH9G(unHPB t=F t7H-HCx~#HPB tHC(H@H0F tHHkTHSHJHRP|پHHC(H@H0HCH@HFHCx`H[]H\$Hl$Ld$Ll$Lt$L|$H8IIII̋DD9|DD9|LθN؍KHcHIH9wHcIIcUILLMLA]H\$Hl$Ld$Ll$ Lt$(L|$0H8AVAUATUSIILw HHwLI,$]Lxu ,A*D$@@AD$@;EL~%HULHuAALHE;]L}HcHHE@9]LIcD$@HHEIUHAUPA}~IUB tE t HLޠAD$@PAT$@[]A\A]A^H$D$HHHHH4$D$HHHSHH0H¾H[H\$Hl$Ld$Ll$Lt$L|$H8ILg0El$JAAE=~LII,$]\AD$H9}EHU\Hu0H8AA`HE0;]\}HcHHE0H;]\|ID$HHHE0L0AF tE tI8LH莟AD$HPfAT$HMcfClH\$Hl$Ld$Ll$ Lt$(L|$0H8H\$Hl$Ld$Ll$H(HAAH/W0w8AйnC8C0;EP~&HUPHuH{ AAgHEHcS0HED,C0;ET~&HUTHu(H{ AA*HE(HcS0HE(D$C0PS0H\$Hl$Ld$Ll$ H(HHWR HH\$Hl$H(Ho8G8D$ Ht$ HD$ H\$Hl$ H(HHWR  AD HH\$Hl$HHH$ |NAC YNC tHS<HHH\$Hl$HH\$Hl$Ld$Ll$H(HAAĜEDHH\$Hl$Ld$Ll$ H(H\$Hl$Ld$Ll$Lt$L|$H8HHA1; uSHsHssDkD9H菜uDH耜AEtQA; t HAŹDHAǹDHADH+HśAŋsEDH]sEDDHICCDc H\$Hl$Ld$Ll$ Lt$(L|$0H8H\$Hl$HHHHH聜HS<HHH\$Hl$HH\$Hl$Ld$HHo0)ӋPw*H؉HH~;sH.t HHQ~De u;HHcVH@Ѓ?u#o0EAE.HHBHH諙KEHcH$Hl$Ld$HUSHHHw s5u. DuHH詙SHHHsHsH+CH[]H\$Hl$Ld$Ll$Lt$L|$HHHt$ AHMHALHyALH讘HH裘Eu|$ t DEAAEDDt$ HFEE H\$Hl$ Ld$(Ll$0Lt$8L|$@HHH\$Hl$HHHo(HEHG(u H} tU A#HCJC{ttS A#HHjHsHy H[]H\$Hl$Ld$HHrQ)DbDAE"K$A"7HCPDHkHPzHHzHHzHHHHVH[HH5HH5HH5HH]yHAHCH|H$y[HHSHyHHgHHyHHHH)yHX{HHH3H[H\$Hl$Ld$HHAHvxtDHHNuHtIHE?HC HPpH9PxrHDHvHt HHRHUHHH$Hl$Ld$HHQH¾H=HUSHHHoHT$HH;HT$HH)H H9rHHD$HHv%Ht HPwCH H[]H\$Hl$Ld$HHIվxHwu.HTwHawH¾H߸LH$Hl$Ld$HSHHG HxPtHcHC HxPu[H\$Hl$HHHcHHHw~uHSHC(H;PrHPH\$Hl$HHVH6]~HH\$Hl$Ld$HHAվovtUH>vAt$H1vuH&vH@HvžH,uEDH:tIĉH-tItH=tHLH}H$Hl$Ld$HAWAVAUATUSHAT$9HADHvT$HvDHtT$DH HWtDl$E)ACD$DھHvDHzvDH^tDHMDHsT$H;vDHtT$Hn HsAھHuHLtD$D$ ¾HuT$ H\$ Dt$)D;|$~HDH)sD|$D|$ADHouDHSu%D9}HDHrAھHuDHuD9}PHrT$ HtDHtDt$ HDD)D$D)9|DHDT$Drt$D$T$T$D$T$H=D;t$XH[]A\A]A^A_H\$Hl$Ld$HHIHcluLHUyHHHt$8u!uLHT$H߸ -H|$u HD$MHL$H߸H$H$L$HĘH\$Hl$Ld$HHIqHqHLH߸H‰HH$Hl$Ld$HH\$Hl$Ld$H(HCvXfD$Ld$f.zuHHvuHEDH\$Hl$Ld$ H(USHH}þHqt1H\yؿNЉуy-HcIAFD4uHcHHH[]SH  *HRq[H\$Hl$HHžH~*HqH\$Hl$HH\$Hl$HH?žH0*HpH\$Hl$HH\$Hl$HHžH*HupH\$Hl$HH\$Hl$HHžH*H'pH\$Hl$HH\$Hl$HHUžHF*HoH\$Hl$HATUSILmÃ~L1Ńu*Lo[]A\ATUSILcmÃ~L Ńu*L7o[]A\ATUSIyLmÃ~L^!Ńu*Ln[]A\SH0*Hn[SH *Hn[H\$Hl$HHmH‰HqH\$Hl$HH\$Hl$Ld$HHAZHHuDHHH$Hl$Ld$HSHHHkHmH[H\$Hl$Ld$Ll$H(HAHIl/Mt;HtH߸HHHIMLDHHHH\$Hl$Ld$Ll$ H(H\$Hl$Ld$HHA4qHHuDHpuDHXHH$Hl$Ld$HH\$Hl$Ld$HHAHk~DHuHHH$Hl$Ld$HH\$Hl$Ld$Ll$Lt$L|$HHHHT$IH\$HiHHnIH\$H¾HFHHnMLNHT$H9HGAI9cD)DrEIcLH9|HDHE~%K'Od'AMsHkHL9uDH\$Hl$ Ld$(Ll$0Lt$8L|$@HHH|USHH]HžH>iHKjt(~"HeHiHHH[]H\$Hl$Ld$Ll$H8HHT$SIH\$HkHH4mHLl$HHLH mHH۸HNHT$H9HNH9H)HItH(HH\$Hl$ Ld$(Ll$0H8ATUSH HH$ HžHAHHlA\$E~H$ HHuH;H []A\H\$Hl$H(H6mD$f.zuHHmuHD$H\$Hl$ H(H\$Hl$Ld$HHAhD9t DHfH$Hl$Ld$HUSHHHҌź(HHg~H_HfHH[]AUATUSHILJAHcоLQD9_~[¾LhA9~(]ھLuhL2A9LgDLH[]A\A]AUATUSHHiH蘋D`HetcuJH4AD9DMA9~EA\$ھHgDH}AA9|HEDHLH[]A\A]AWAVAUATUSH8 HHL$IźHHIAƾHeH莊AH;AHt$HhE9~3DHt$HHT$LH|$A9G44E)E9uDHt$HH|$H8 []A\A]A^A_H\$Hl$Ld$Ll$Lt$H(HHAƾHdH蜉AHIAAE9|hEE)AE~DHiuH߸A3DHeAnE9~HeEA9DH$Hl$Ld$Ll$Lt$ H(AVAUATUSHHbHaLcMt$H(A|$LW~ ;E8pLHVII}LEUuA} u$A~~II9EuL+m IAiE8'Mm MuH߸蚁M89}UHuHcH|t<HcH|t,*AD$AD$HUHI$BAD$9|)M HH9}oHu HcHHHHzt?HcHHHHzt&HBID$BAD$H} HI$GAD$ 9| HCHkHc[]A\A]A^SHHaHaHb[USHHźHHcHbHcHaЃH[]SH7H=aH0aHZb[H\$Hl$Ld$Ll$H(HAIaHHtDDHbt5LHHatH_LDHHH\$Hl$Ld$Ll$ H(H\$Hl$HH?HH8uHHH\$Hl$HSHH>[SH`uHaHdH|[SHH8tHY[AWAVAUATUSHx"H|$^D$H$h"H|$2HIL$h"H$PH|$bL9AHD$1HD$H$h";%t9H9$Pr H$PhH$PHH$PH{%u:H9$Pr H$P)H$PSHH$PHCAD9t$}DH|$LksL@uH3@t@HuHL)HvH|$!HDPtSDPuHH;.u*SPfHKHfHDDPt"HDPtH|$D$0%IM)IWLH|$BD<2HB<3$DH|$,Ht$0H|$PH|$0bDH|$H,Ht$0H|$PH|$0bDH|$f.sH,\H,HH1Ht$0H|$P=DH|$bHt$0H|$PHT$(DH|$aIH9$Pr H$PH$P"HH$PHD$(HPHT$(H AE< < <  <"t<\H9$Pr H$PfH$P\HH$PH9r H$P=H$PAUHH$PdH$P$KH$P 2H9$Pr H$PH$PAUHH$PIHD$(HPHT$(HH9$Pr H$PH$P"HH$PHT$(DH|$Iž.H|$0Hu$H|$(cvDH|$ZH$P^LHt$0H|$PҾH|$zGH|$PHHHQHt$PH$PI96H$PHx"[]A\A]A^A_AVAUATUSH IXYAHL]E~UL$ LH9tL/L94$rH.H$@*HH$A9}H|H []A\A]A^H\$Hl$HHYuHH\$Hl$HUSHHH>ZHźHfHt'H[tHtYu HZ-H}u HHH[]SHHXHXHH[SHpHHWHY[SHHYu.H~H¾H߸H'W[fAUATUSHH #IĉŃ u<HH\H\HXHCIAA"vHHt$LHL;l$tTH HHT$HT$ Dp uu+HxH*HHH H*XH XHXH[]A\A]USHHVźHttHHrXtYHHWHVuHUHUH߸H_UHZXH[]USHHH VuHUxHŅyHHHsOuHHH訥HUuH5HQUHQZtMHZf.z6u4HCH@HCHTHWKH5Sxu"Hx tH߸H}WtָHĈ[]H\$Hl$Ld$HHSHH-U HoTHH'THkUH\RIHkHUH0H艞HUHUPHSz~HB@ tI4$F tHMHk ]HUt-H UH[TžHRuHH=UHUH$Hl$Ld$HHH|$Ht$HT$DŽ$HHD$ HD$ HHHuHt$H|$HT$HD$ HT$H$HH\$Hl$Ld$Ll$Lt$L|$HHHIDw`HG(H$HGPHD$DoeLL0ŅtML{@LHXxLHkvfDs`H$H+D$HCPHC(HHSH@HC0DkeHrLH\$Hl$ Ld$(Ll$0Lt$8L|$@HHUSHhHHɸHDH|$PHt$@HT$HHD$0HD$8HD$0H$HL$ HD$HD$HOH+O@LHŹHT$Ht$HrHh[]USH(HHT$HŹH¾HH,$HT$HT$HHHHTH([]H\$Hl$Ld$H(HAAtOIL+C@McILHHKH $l$H+K@HHuHKHS(H;JrHJH\$Hl$Ld$ H(SHH|OpHJ@@HQHOH@O[HHHu HHAUATUSH( HH$ IHH&SH$ tHL$ L9,$rHH,$AHUHH,$HH9$ wH"H( []A\A]USH󍖀wHcHa$HcH,hfHcH,hHcH,hfHcH,hfHcH,hzHcH,hf aHcH,hfHHcH,h1HcH,hf@@ 9@@HcHDXu @@H[]AUATUSHAHA~^u]HATN%uH^vDat4B~-uHFH9vA9|VA9~"H D9uHHH^H9rADH[]A\A]H.t.[t%uvH= 9HAWAVAUATUSHIHIIHWII)HH9r.HHDL9u Hx58LLauIHtLLHuHyH[]A\A]A^A_H\$Hl$Ld$Ll$Lt$L|$H8IHHՀ})E$})uHUHLyHHUHL]HLmAl$x0HcHHI|u1HcHHI|tuI|$HcHHLHH+HPLHLHH$HcHHID DmAbtAf}t}uI|$ DD:E}It$'S@8uuHu&A8HHCH9rлyHsLm}[tI|$荿LLYHI9$t{Lu@LL;LL{@AHDPAŃ1xA;D$}HcHHI|uI|$HcHHMlIT$H)I9kHHHLHI<QL`HZ}uID$H9ػHD;HLBIźI;\$s;HHAE<+t^<+ <*7<-tn@0uHT$(HH|$@?$@1LHH$` 蓺H|$@HH;\$85HBLHH$` "H;LHH$` ,H@HSHHHHeHBu HFALH)HH =H@Bu,HBHBH¾H߸虶H|$@I9w5H9$h vML9|$@r H|$@HD$@UHHD$@HL|$ uT$ 9T$$RD$ H$h H)HH|$@譸H|$@Hct$ H|$bBHĘ"[]A\A]A^A_AVAUATUSH0IHT$&IƺLILl$ Lt$LHD$HD$LEIH;\$wkD$(LHH|$HHt9HL)H9HLALHHH|$HH9\$sH0[]A\A]A^AUATUSH( HH$ IHH`CH$ tHL$ L9,$rH$H,$AHUHH,$HH9$ wH\H( []A\A]H\$Hl$Ld$Ll$H(HHHAD EuH@8H>@DHHH߸YIcH9@H\$Hl$Ld$Ll$ H(H\$Hl$Ld$Ll$H(HAI(EtH?ZH?Mt!HLH߸ðH¾H߸襰HcH?H\$Hl$Ld$Ll$ H(SHHH [H\$Hl$Ld$HHI8HLH߸HH‰HH$Hl$Ld$HH\$Hl$Ld$Ll$H(HI8IźHHHMLH߸胯H<H\$Hl$Ld$Ll$ H(AWAVAUATUSH(IHt$A<DxIAA,L<u/EtbLAH|$AE8HT$L?Et$HL$HT$HH;D$AEHL9yADLRH([]A\A]A^A_SH譲HH[SHHH[AVAUATUSH IHH3?IAHHH HHu HUL`H6HLDHHt HA| tH $H$H H []A\A]A^H\$Hl$Ld$HH Hu8LALH.AAEHLHADHIHt8*tDHAE9YHhocHS@HHHH HtHS@HJHHJ H{@ ,-HS@HHHH HtHS@HJHHJ H{@+[t  u>HߐErHSHHBxɉ¾HHCHH@HS@HHHH HtHS@HJHHJ H{@>+ \ SuHHqxLHqHcmHS@HHHH HtHS@HJHHJ H{@*=HS@HHHH HtHS@HJHHJ H{@s*HS@HHHH HtHS@HJHHJ H{@6*=KHS@HHHH HtHS@HJHHJ H{@)HS@HHHH HtHS@HJHHJ H{@)=HS@HHHH HtHS@HJHHJ H{@)HS@HHHH HtHS@HJHHJ H{@D)=YHS@HHHH HtHS@HJHHJ H{@)HnHS@HHHH HtHS@HJHHJ H{@( t5 P t\=$HkHjHS@HHHH HtHC@HPD*HHP H{@<(AD+AbAb0A A AA teAauyVArt6ArAftAnu\Att&AvuN( 0 &    HmHjfIIcHD$ ADPuCDH\mHS@HHHH HtHS@HJHHJ H{@#'CDtPHS@HHHH HtHS@HJHHJ H{@&l$ t HIDBuA~H3iDHlHlHS@HHHH HtHS@HJHHJ H{@[&;HWlHS@HHHH HtHS@HJHHJ H{@&39XHlHS@HHHH HtHS@HJHHJ H{@%HCHHPHH0HH苦I$.HkHS@HHHH HtHS@HJHHJ H{@n%HtH^HcHDPHLH3IHcHP t8HS@HHHH HtHS@HJHHJ H{@$tLHpu _3HjHC@HHJHHtHC@HHHHH H{@a$‰HcIEHu_tHCHHPH0H P t ҍEI$:HS@HHHH HtHS@HJHHJ H{@#H\$Hl$ Ld$(Ll$0Lt$8L|$@HHSHGG tHG HGHG(HGG  Hw{C[H\$Hl$HH\kHkHHH\$Hl$HH\$Hl$HHHHHH^H\$Hl$HH\$Hl$Ld$HHHsIH[0HHH蒐uLHEH$Hl$Ld$HH\$Hl$Ld$H8HIHo0H{HHH4HLH蹉H\$ Hl$(Ld$0H8SHGjH[ø9wuHyHH\$Hl$Ld$Ll$H(HAAuOD9cu HiDHcIʼnHcH{8ELH¾3cHHdH\$Hl$Ld$Ll$ H(AVAUATUSH0HIHo0DwA H"AD$(D$ D$$Ld$¾ Ly#Hg#H{0L{HLc({}<$t:HH$|$(2u!HD$p2T$$HD$(DCA[t6Au:LHC =t HH %HH HH HH ,H I;H4D{}H|$(tb$Pw0HHueHD$pT$$H l$$'t HHلHD$pL$(T$$H܌IcHHEL`I܋|$$A$ A$HEHX|$ %? ЉH0[]A\A]A^AWAVAUATUSHHHIAfC-=t#ZHOLHLc0D$4D$0D$ HD$(tDrsL u LL蒄HL$ LLe=LLmA} wjAE$AEUAEKLLb >LLLLAMAL~AEAE AEAuAuAELcAuLWLLȃHL$ LL蛇s= = $== {-== =a=t ="LCAEHSLHb{LXLAL*H{0HPru H_PrA%c}¾L7LH2HKLHLHHC^^L--*+%p<>f/H=ti===t@=nk=tL=|U=S A^AVANAFA>A6A .A &A A A AADA9IEHD$HT$4HT$HD$0HD$HPHk0AD$LHHt$ HLs0LH{AEt) tu AULH%Ht$H_AuH9_AEHt$ HLs0LHKHt$ HLs0LouLHy LHlDHt$ HLs0AaEB$Ht$ LzAUHt$L:^HD$ IEHD$(IEHD$0IEHt$ LmzAUHt$L]HD$ IEHD$(IEHD$0IEHt$ L|$ uZIHcT$(H@?uCLLIHcT$(H@HAU ʉAE D$(AElHt$ L}HL$ LL蔂EHL$ L Lz+HL$ L L`HL$ LLFHL$ LL,HL$ LLHL$ LLLD$ LL豀LD$ LL蒀nLD$ LLvRLD$ LLZ6LD$ LL>LD$ LL"t AD9H7A/A*0&AAHC8fh`DHH[]A\A]A^A_HHSH HH<$u$H{0H~D$H [H\$Hl$HHHHHH{0H|]H*H\$Hl$HH\$Hl$Ld$Ll$Lt$HhHIH_0Dk<u'~ ~H]Ht$ Ht$ OAD$ =HHt$ H]|AHHHHD|AID$PD HvDkk H蟍HHkLH kAEl$HDHHjE,H4uѾ HDkHt$@HHL$@¾HqH<$WQAL$ADt$ H H+OHLYuLc0LL AźHt$ LHt$@LHH]HmHŀ|$MuLtH{0DmP1HxH{0#PLtLkH{0D:PLt1HlHt$ HC.uHt$ HQC.t:uHt$ H2Ht$@H9H{0HT$@Ht$ vH{0 H HSHk0HHHhU<H|$ HOH KHt$@HHT$@Ht$ HuU0HMEJHEHHA0PDeHiHH;h,HDuӾ=HutHt$@H` D$@HL$@DHnDH |Hk0HDcDU A;Ht$@HAċD$@ wFHt$@HN|$@ u!AuHEHcT$HH@HuJABAuHt$@Hn+Ht$@HmuJA ADHpHH7urHk0LH|$H u HEHcT$PH@H?@VHD$@Ht$@H9DcD HC8fh`4;HHC0PJP<۾;HHC0PJPtH or '...' expected=stdin@%sopenrbreopenread bitargError: %s tobitbnotbandborbxorlshiftrshiftarshiftrolrorbswaptohexnilbooleanuserdatafunctionthreadprotoupval__newindex__gc__eq__add__sub__mul__div__mod__pow__unm__len__lt__le__concat__callandbreakdoelseelseifendfalseforifinlocalnotorrepeatreturnthentrueuntilwhile.....==>=<=~=bytecharfindformatgmatchgsublowermatchrepsubupperexitremovecloseflushinputlinesoutputtypewriteconcatinsertsortasserterrorloadfileloadstringnextpcallrawgetsetfenvsetmetatabletonumberunpack'for' initial value must be a numbermemory allocation error: block too bigfunction or expression too complexchunk has too many syntax levelsmain function has more than %d %sfunction at line %d has more than %d %sattempt to compare two %s valuesmalformed pattern (ends with '%%')malformed pattern (missing ']')PANIC: unprotected error in call to Lua API (%s) invalid value (%s) at index %d in table for 'concat'invalid order function for sortingwrong number of arguments to 'insert'invalid format (repeated flags)invalid format (width or precision too long)invalid option '%%%c' to 'format'cannot change a protected metatableno function environment for tail call at level %d'setfenv' cannot change environment of given objectmissing '[' after '%%f' in patternstring/function/table expectedinvalid replacement value (a %s)'%s' expected (to close '%s' at line %d)cannot use '...' outside a vararg functionambiguous syntax (function call x new statement)8CC?GCC: (Debian 4.7.3-4) 4.7.3zRx 30D'XflQ&0AnQ\t<@Nq4Q H{AAwA0lBBA A( ABBN @BBB B(A0A80A(B BBBE((6BAA nABT1NJTDtaxTAD MA % ) 4GAACAXdAb t/AAkAS(5$?8!L* `]0 KGAE:Ax  A^(<PdiS U$$,AjENv4_A]PAlA'J[$AAD0AA(UQD nF IA4.D iL-D hd0D k|+(CAAD :AADBBB B(A0A8D@n8A0A(B BBBS qH$BBB B(A0A8D8A0A(B BBB$pAAD AA [[?DXS q9iN AAD , cX0J4L BBA A(D0(A ABBH kBBB B(A0A8DPR8A0A(B BBB N  vN@g N $ JN {4@ BBA A(D0(A ABB4x sBBA A(D0b(A ABB VN GH vBBB B(A0A8D@]8A0A(B BBB8 BBB A(A0(A BBB$T _AAD VAA4| BBA A(D0(A ABBH \BBB B(A0A8DPC8A0A(B BBB$ 8AAD oAA( !D\$@ AAD AA h ]0m ]0$ _AAD VAA N  LDG$ bH4 3BBB B(A0A8D`8A0A(B BBBH BBB B(A0A8Dp8A0A(B BBB G zN k BAA Dp( D$<AAD AAdMiND|sBBB B(A0A8D@Z8A0A(B BBB(=BAA uAB5N f "D]$.ZN<*N [XxVpS (BAA AB*YONA*AIEIAGH8BBB B(A0A8D@8A0A(B BBB ]0X0HBBB B(A0A8D@8A0A(B BBB8BBA A(D0(A ABBPS xHpBBB B(A0A8G8A0A(B BBB`S0LHGBBB B(A0A8DP.8A0A(B BBB(X0pH=N nHd BBB B(A0A8DP8A0A(B BBBDBBB B(A0A8DP8A0A(B BBB{S0gA4UDP$LAAD AA tb@8BBB A(A0(A BBB!D \ D [!A_ b@DX0d!D\|UN0F(DcN DS CN t VX0}$@6b@hQN BS |cN TDX$AAD@AAAUDY4AQPS $p|AAD sAA bPmN ^$bPS $ {AAD rAAHS ~8h5BBB A(A0%(A BBBDNHBBB B(A0A8Dp8A0A(B BBBS0k (]0HLBBB B(A0A8D`8A0A(B BBB(AAGAAN 4|BBA A(D0k(A ABBoX0V 8]ADVA(\AAGAAS <N mqS ]IN zAY4RBBA A(D0A(A ABBTA\pS 8BBB A(A0x(A BBB"A`8Ds(BAA AB,VN GHX0uhS0(BAA AB8BBA A(D0(A ABBDBBB B(A0A8D@8A0A(B BBB8CN tT\S HtoX0VTN EH@BBB B(A0A8D@'8A0A(B BBB88BBA A(D0'(A ABB8ATDXldAbDXAS 6Dq$AAD0{AAS k<$AbXLN }tDOS HBBB B(A0A8DP8A0A(B BBBVbS N8pS0\$XAAD0AAIAGNN NN NN NN  NN (( LBAA DAB(T LBAA DAB( LBAA DAB #Aa !A_ 6N g!LS x !XAV2f!' M2+1\/ i/w000 02`! bg) J 33#L'- 8sfIUbQjw&0Q K<@Q{ (hw L E&R6-1;LVabLxoTy / 6 %[ )`& G d/ /^ t  S (  " 5*W ?5 !@ *M X b m x K GC:}  XiF$j$.>,IEUZ_fwI'9RU\.-0+CU cU'A4a>-[LH/WQdarxT|CACCLTE3m@4\G:\`W5s/cL@!w,#G5>JFm.R.a/9u2R041k03v354J5V 6v8a9_9:\@8#NB_+B:JzI` UGKcNhK yKLMLsPM=M5M"M.N* |v5K xU zb zg ɀw ~  | o ] T + Մ< q ` I ˅ R 8 V* #8 "C ͇8R b Vj x  0   ʍ C A \ Go T  @ J8   ( 0/ 0d: p? YI O M.Y g Pq ~ ` b  A  < ߹c  L6   $ L     ) b7 p< lB  IH TNL NP NX >N_ Nf ڟLk &Lo rLt #y ! 6 8L X i ܡ e[ I  ( 1 Kp  | \ jE+ 0 38 @ H  T ad Mk O"s q7| ( Юe 5 Ѵ;  7 A (Y   kt Bz$H-%b=GTRf%Zd)apDbN?_ZQ{qnV v *5+< DKT^goxT/*z9P  :C9|6^Zj}/A*O OpM+#.07<3ALHyHQCZe>9jwxpFD4YE+  /@ ``           $*.6;BIQX^elt| $*18@E minilua.cluaO_int2fbluaO_fb2intluaO_log2log_2.4911luaO_rawequalObjunlinkupvalluaD_poscallhashnummainpositionarrayindexcountintluaH_getnumluaO_nilobject_luaH_getstrluaT_gettmluaT_gettmbyobjluaH_getluaH_getndummynode_removeentryreallymarkobjectluaC_separateudataisclearedmarkmtluaC_barrierfluaC_barrierbackluaC_linkcurrentlinelua_getstackluaZ_fillisnumeralluaK_getlabelgetjumpgetjumpcontrolluaP_opmodesneed_valuepatchtestregremovevaluesfreeregfreeexpluaK_setoneretinvertjumpluaK_fixlineinit_expadjustlocalvarsremovevarsenterblockblock_followget_compTMindex2adrgetcurrenvlua_gettoplua_settoplua_removelua_insertlua_pushvaluelua_typelua_typenameluaT_typenameslua_isstringlua_rawequallua_tobooleanlua_touserdatalua_pushnillua_pushnumberlua_pushintegerlua_pushbooleanlua_rawgetlua_rawgetilua_getmetatablelua_setmetatablelua_setfenvluaL_buffinitgetSload_auxposrelatluaO_str2dluaV_tonumberlua_tonumberlua_isnumberlua_tointegeraddintlenluaO_chunkidl_strcmpluaV_lessthanluaG_ordererrorcall_orderTMluaD_callluaG_runerrorluaD_throwluaD_precallluaV_gettableluaV_settableluaH_newluaC_stepArithcall_binTMluaG_typeerrorluaV_concatcallTMresluaF_closeresizeluaH_setnumluaF_newLclosureluaM_realloc_luaD_growstackluaG_errormsgluaO_pushvfstringluaO_pushfstringluaM_toobigluaD_reallocCIrestore_stack_limitluaD_seterrorobjluaS_resizeluaS_newlstrluaV_tostringlua_objlenluaF_freeupvalfreestacksweeplistclose_statesetarrayvectorluaD_reallocstackpropagatemarkpropagateallpushstrlua_checkstackluaX_token2strluaX_tokensluaX_lexerrorsaveluaX_syntaxerrorinclinenumberfixjumppatchlistauxluaK_concatluaK_patchtohereluaK_patchlistluaK_checkstackluaK_reserveregsluaK_setreturnsskip_sepenterlevelerrorlimiterror_expectedcheckgrowCIsetnodevectorf_luaopenluaT_eventname.4994open_funcluaH_setnewkeylua_rawsetiset2lua_getinfolua_getfieldaux_closelua_replaceluaM_growaux_addkluaK_numberKluaK_stringKcodestringnew_localvarluaK_codeluaK_codeABxluaK_jumpluaK_codeABCluaK_dischargevarsluaK_nildischarge2regdischarge2anyregcode_labelexp2regluaK_exp2nextregadjust_assignluaK_exp2anyregluaK_exp2valluaK_exp2RKluaK_indexedluaK_retcondjumpjumponcondluaK_goiftruecodecompleaveblockcodearithluaK_storevarbreakstatluaK_setlistsinglevarauxlua_errorlua_setfieldGCTMlua_pushfstringlua_concatadjuststacklua_pushlstringluaL_whereluaL_errorclassendluaL_checkstackgetiofilefnamesemptybufferluaL_prepbufferluaL_addlstringluaL_pushresultpush_onecapturepush_capturesio_nocloselua_pushstringlua_newuserdatanewfilecreatestdfileluaX_newstringread_long_stringclose_funclua_pushcclosureaux_linesio_readlineauxopenlua_createtablenewfenvluaL_findtableluaL_registerluaopen_stringstrlibluaopen_ossyslibluaopen_ioflibio_fcloseiolibio_pcloseluaopen_tabletab_funcsluaopen_basebase_funcsipairsauxluaB_ipairsluaB_nextluaB_pairsluaB_newproxylua_tolstringpanicluaL_addvalueaddfieldcallallgcTMlua_callf_callsort_compauxsortluaL_argerrorluaL_typerrorbargtohexbswaprorrolarshiftrshiftlshiftbxorborbandbnottobittag_errorluaL_checklstringgmatchgmatch_auxluaL_optlstringluaL_checkintegerluaL_optintegerstr_byteos_exitluaB_errorstr_substr_repluaL_checknumberluaL_checktypesorttremovetinserttconcatluaB_unpackluaL_checkudatatofilef_linesio_closeio_gcstr_formatstr_charluaL_checkanyio_typeluaB_typeluaB_rawgetluaB_assertluaB_tonumberluaB_setmetatableluaB_setfenvluaD_rawrunprotectedluaD_pcalllua_loadf_parserluaB_loadstringlua_pcallluaB_pcalll_allocstr_uppermatch_classmatchbracketclasssinglematchmax_expandmatchstart_capturestr_find_auxstr_matchstr_findstr_gsubstr_loweros_removepushresultfileerrorerrfileg_writeio_writef_writeread_lineread_charsg_readio_readf_readg_iofileio_outputio_inputio_openio_linesio_flushf_flushcheck_nextread_numeralllexluaX_nextstr_checknamechecknamesinglevarfieldchecknexttestnextcheck_matchconstructorlistfieldrecfieldsubexprbodyprimaryexppriorityexprcondyindexexplist1funcargsassignmentexp1chunktest_then_blockblockforbodyluaY_parserluaL_loadfilegetFluaB_loadfilebitliblualibs.LC0.LC3.LC98.LC110.LC163strtodstrtoul__ctype_b_locstrncpystrcatstrncatstrcollfloorpowlongjmpexitmemcmpmemcpysprintfstrchrstdinstdoutstderrfprintf_setjmpfreerealloc__ctype_toupper_loc__ctype_tolower_locstrpbrkmemchrremove__errno_locationstrerrorfwritefgetsferrorfreadclearerr_IO_getcungetc__isoc99_fscanffopenfflushfclosefreopenfeofmainl  B      +       y `  i       ?     d*( ? F 0   ?=! `&G' ^p' ?(' ?E)  ,. ?ar. ^(v//1C22 ?k2 ?}T3 ?a36 7  ;;OC  |C ?D DDD"E ?E ?YF ?%GG ?GwH ?I ?II ?JK ?K ?4K ` zK ?aK ?}L ?L ?,N ^P O ?G7P ^xZP ^qP ^P ?`P ?nOQ ?} T  /T ?aU  V  W ` ;W ?k ?  ?  ? T ?  ?$ l ?*( ?.0 ?68 ?q@ ?H ?P ??X ?6` ?Hh ?Op ?U ? ?[ ?f ? ?k ?p ?v ?| ? ? ? ? ?( ?0 ?8 ?@ ?` ?h ?p ?x ? ? ? ? ? ?? ? ? ? ?* ? ? ? ? ? ? ? ? ? ? ? ?" (?% 0?( 8?+ @?4 H?; P?D `?hp?x?0???J  ?O 5?T ?Y Ю?` ?g Z ?l (Q0?r 8@?x HP?| X`? h? 1? ? q? T? ? ??  ?(0? 8 @? HV`? h? ? q? ? O?? v?f? ?  ? (30? 8`? h(p? xK?  ? %? ? ? ? k? ? ? ?  43HL\spK8LphwL ,RXxL / 6 $[ 8 \ x/ ^ t     " (W < P d      C},@ThFj8ZTpI9R 8\PhU(atw,-m../ H/0 /P R0 41 2 03 3( 54D 4| W5 5  6 8X a9 9 : @, L@D m@l A A NB B CC C8 TE G >J JGK,K@KhLLPMMM(M@N\ , ڟX & r   !8$!@!ܡ`!e!! !1!K"$"X"t"j""3",#x####$ 8$aX$t$O$q$$Ю%5X%Ѵt% %%%(%,&T&k&߹&B&& '%4'T'p'f'')'((@(b((?(),)P)Z)i)Q*<*\*Mx*{**n+V+v8+|+A++$,@,\,,,,,,T -(-D-`--- -C-|.8.X.jt.}../.p0w01HP1+11141@2 \2+ |2 tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/host/buildvm_asm.c0000664000000000000000000002010712231715321024010 0ustar rootroot/* ** LuaJIT VM builder: Assembler source code emitter. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "buildvm.h" #include "lj_bc.h" /* ------------------------------------------------------------------------ */ #if LJ_TARGET_X86ORX64 /* Emit bytes piecewise as assembler text. */ static void emit_asm_bytes(BuildCtx *ctx, uint8_t *p, int n) { int i; for (i = 0; i < n; i++) { if ((i & 15) == 0) fprintf(ctx->fp, "\t.byte %d", p[i]); else fprintf(ctx->fp, ",%d", p[i]); if ((i & 15) == 15) putc('\n', ctx->fp); } if ((n & 15) != 0) putc('\n', ctx->fp); } /* Emit relocation */ static void emit_asm_reloc(BuildCtx *ctx, int type, const char *sym) { switch (ctx->mode) { case BUILD_elfasm: if (type) fprintf(ctx->fp, "\t.long %s-.-4\n", sym); else fprintf(ctx->fp, "\t.long %s\n", sym); break; case BUILD_coffasm: fprintf(ctx->fp, "\t.def %s; .scl 3; .type 32; .endef\n", sym); if (type) fprintf(ctx->fp, "\t.long %s-.-4\n", sym); else fprintf(ctx->fp, "\t.long %s\n", sym); break; default: /* BUILD_machasm for relative relocations handled below. */ fprintf(ctx->fp, "\t.long %s\n", sym); break; } } static const char *const jccnames[] = { "jo", "jno", "jb", "jnb", "jz", "jnz", "jbe", "ja", "js", "jns", "jpe", "jpo", "jl", "jge", "jle", "jg" }; /* Emit relocation for the incredibly stupid OSX assembler. */ static void emit_asm_reloc_mach(BuildCtx *ctx, uint8_t *cp, int n, const char *sym) { const char *opname = NULL; if (--n < 0) goto err; if (cp[n] == 0xe8) { opname = "call"; } else if (cp[n] == 0xe9) { opname = "jmp"; } else if (cp[n] >= 0x80 && cp[n] <= 0x8f && n > 0 && cp[n-1] == 0x0f) { opname = jccnames[cp[n]-0x80]; n--; } else { err: fprintf(stderr, "Error: unsupported opcode for %s symbol relocation.\n", sym); exit(1); } emit_asm_bytes(ctx, cp, n); fprintf(ctx->fp, "\t%s %s\n", opname, sym); } #else /* Emit words piecewise as assembler text. */ static void emit_asm_words(BuildCtx *ctx, uint8_t *p, int n) { int i; for (i = 0; i < n; i += 4) { if ((i & 15) == 0) fprintf(ctx->fp, "\t.long 0x%08x", *(uint32_t *)(p+i)); else fprintf(ctx->fp, ",0x%08x", *(uint32_t *)(p+i)); if ((i & 15) == 12) putc('\n', ctx->fp); } if ((n & 15) != 0) putc('\n', ctx->fp); } /* Emit relocation as part of an instruction. */ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n, const char *sym) { uint32_t ins; emit_asm_words(ctx, p, n-4); ins = *(uint32_t *)(p+n-4); #if LJ_TARGET_ARM if ((ins & 0xff000000u) == 0xfa000000u) { fprintf(ctx->fp, "\tblx %s\n", sym); } else if ((ins & 0x0e000000u) == 0x0a000000u) { fprintf(ctx->fp, "\t%s%.2s %s\n", (ins & 0x01000000u) ? "bl" : "b", &"eqnecsccmiplvsvchilsgeltgtle"[2*(ins >> 28)], sym); } else { fprintf(stderr, "Error: unsupported opcode %08x for %s symbol relocation.\n", ins, sym); exit(1); } #elif LJ_TARGET_PPC || LJ_TARGET_PPCSPE #if LJ_TARGET_PS3 #define TOCPREFIX "." #else #define TOCPREFIX "" #endif if ((ins >> 26) == 16) { fprintf(ctx->fp, "\t%s %d, %d, " TOCPREFIX "%s\n", (ins & 1) ? "bcl" : "bc", (ins >> 21) & 31, (ins >> 16) & 31, sym); } else if ((ins >> 26) == 18) { fprintf(ctx->fp, "\t%s " TOCPREFIX "%s\n", (ins & 1) ? "bl" : "b", sym); } else { fprintf(stderr, "Error: unsupported opcode %08x for %s symbol relocation.\n", ins, sym); exit(1); } #elif LJ_TARGET_MIPS fprintf(stderr, "Error: unsupported opcode %08x for %s symbol relocation.\n", ins, sym); exit(1); #else #error "missing relocation support for this architecture" #endif } #endif #if LJ_TARGET_ARM #define ELFASM_PX "%%" #else #define ELFASM_PX "@" #endif /* Emit an assembler label. */ static void emit_asm_label(BuildCtx *ctx, const char *name, int size, int isfunc) { switch (ctx->mode) { case BUILD_elfasm: #if LJ_TARGET_PS3 if (!strncmp(name, "lj_vm_", 6) && strcmp(name, ctx->beginsym) && !strstr(name, "hook")) { fprintf(ctx->fp, "\n\t.globl %s\n" "\t.section \".opd\",\"aw\"\n" "%s:\n" "\t.long .%s,.TOC.@tocbase32\n" "\t.size %s,8\n" "\t.previous\n" "\t.globl .%s\n" "\t.hidden .%s\n" "\t.type .%s, " ELFASM_PX "function\n" "\t.size .%s, %d\n" ".%s:\n", name, name, name, name, name, name, name, name, size, name); break; } #endif fprintf(ctx->fp, "\n\t.globl %s\n" "\t.hidden %s\n" "\t.type %s, " ELFASM_PX "%s\n" "\t.size %s, %d\n" "%s:\n", name, name, name, isfunc ? "function" : "object", name, size, name); break; case BUILD_coffasm: fprintf(ctx->fp, "\n\t.globl %s\n", name); if (isfunc) fprintf(ctx->fp, "\t.def %s; .scl 3; .type 32; .endef\n", name); fprintf(ctx->fp, "%s:\n", name); break; case BUILD_machasm: fprintf(ctx->fp, "\n\t.private_extern %s\n" "%s:\n", name, name); break; default: break; } } /* Emit alignment. */ static void emit_asm_align(BuildCtx *ctx, int bits) { switch (ctx->mode) { case BUILD_elfasm: case BUILD_coffasm: fprintf(ctx->fp, "\t.p2align %d\n", bits); break; case BUILD_machasm: fprintf(ctx->fp, "\t.align %d\n", bits); break; default: break; } } /* ------------------------------------------------------------------------ */ /* Emit assembler source code. */ void emit_asm(BuildCtx *ctx) { int i, rel; fprintf(ctx->fp, "\t.file \"buildvm_%s.dasc\"\n", ctx->dasm_arch); fprintf(ctx->fp, "\t.text\n"); emit_asm_align(ctx, 4); #if LJ_TARGET_PS3 emit_asm_label(ctx, ctx->beginsym, ctx->codesz, 0); #else emit_asm_label(ctx, ctx->beginsym, 0, 0); #endif if (ctx->mode != BUILD_machasm) fprintf(ctx->fp, ".Lbegin:\n"); #if LJ_TARGET_ARM && defined(__GNUC__) && !LJ_NO_UNWIND /* This should really be moved into buildvm_arm.dasc. */ fprintf(ctx->fp, ".fnstart\n" ".save {r4, r5, r6, r7, r8, r9, r10, r11, lr}\n" ".pad #28\n"); #endif #if LJ_TARGET_MIPS fprintf(ctx->fp, ".set nomips16\n.abicalls\n.set noreorder\n.set nomacro\n"); #endif for (i = rel = 0; i < ctx->nsym; i++) { int32_t ofs = ctx->sym[i].ofs; int32_t next = ctx->sym[i+1].ofs; #if LJ_TARGET_ARM && defined(__GNUC__) && !LJ_NO_UNWIND && LJ_HASFFI if (!strcmp(ctx->sym[i].name, "lj_vm_ffi_call")) fprintf(ctx->fp, ".globl lj_err_unwind_arm\n" ".personality lj_err_unwind_arm\n" ".fnend\n" ".fnstart\n" ".save {r4, r5, r11, lr}\n" ".setfp r11, sp\n"); #endif emit_asm_label(ctx, ctx->sym[i].name, next - ofs, 1); while (rel < ctx->nreloc && ctx->reloc[rel].ofs <= next) { BuildReloc *r = &ctx->reloc[rel]; int n = r->ofs - ofs; #if LJ_TARGET_X86ORX64 if (ctx->mode == BUILD_machasm && r->type != 0) { emit_asm_reloc_mach(ctx, ctx->code+ofs, n, ctx->relocsym[r->sym]); } else { emit_asm_bytes(ctx, ctx->code+ofs, n); emit_asm_reloc(ctx, r->type, ctx->relocsym[r->sym]); } ofs += n+4; #else emit_asm_wordreloc(ctx, ctx->code+ofs, n, ctx->relocsym[r->sym]); ofs += n; #endif rel++; } #if LJ_TARGET_X86ORX64 emit_asm_bytes(ctx, ctx->code+ofs, next-ofs); #else emit_asm_words(ctx, ctx->code+ofs, next-ofs); #endif } #if LJ_TARGET_ARM && defined(__GNUC__) && !LJ_NO_UNWIND fprintf(ctx->fp, #if !LJ_HASFFI ".globl lj_err_unwind_arm\n" ".personality lj_err_unwind_arm\n" #endif ".fnend\n"); #endif fprintf(ctx->fp, "\n"); switch (ctx->mode) { case BUILD_elfasm: #if !LJ_TARGET_PS3 fprintf(ctx->fp, "\t.section .note.GNU-stack,\"\"," ELFASM_PX "progbits\n"); #endif #if LJ_TARGET_PPCSPE /* Soft-float ABI + SPE. */ fprintf(ctx->fp, "\t.gnu_attribute 4, 2\n\t.gnu_attribute 8, 3\n"); #elif LJ_TARGET_PPC && !LJ_TARGET_PS3 /* Hard-float ABI. */ fprintf(ctx->fp, "\t.gnu_attribute 4, 1\n"); #endif /* fallthrough */ case BUILD_coffasm: fprintf(ctx->fp, "\t.ident \"%s\"\n", ctx->dasm_ident); break; case BUILD_machasm: fprintf(ctx->fp, "\t.cstring\n" "\t.ascii \"%s\\0\"\n", ctx->dasm_ident); break; default: break; } fprintf(ctx->fp, "\n"); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_bcwrite.c0000664000000000000000000002620412202141143022652 0ustar rootroot/* ** Bytecode writer. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_bcwrite_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_str.h" #include "lj_bc.h" #if LJ_HASFFI #include "lj_ctype.h" #endif #if LJ_HASJIT #include "lj_dispatch.h" #include "lj_jit.h" #endif #include "lj_bcdump.h" #include "lj_vm.h" /* Context for bytecode writer. */ typedef struct BCWriteCtx { SBuf sb; /* Output buffer. */ lua_State *L; /* Lua state. */ GCproto *pt; /* Root prototype. */ lua_Writer wfunc; /* Writer callback. */ void *wdata; /* Writer callback data. */ int strip; /* Strip debug info. */ int status; /* Status from writer callback. */ } BCWriteCtx; /* -- Output buffer handling ---------------------------------------------- */ /* Resize buffer if needed. */ static LJ_NOINLINE void bcwrite_resize(BCWriteCtx *ctx, MSize len) { MSize sz = ctx->sb.sz * 2; while (ctx->sb.n + len > sz) sz = sz * 2; lj_str_resizebuf(ctx->L, &ctx->sb, sz); } /* Need a certain amount of buffer space. */ static LJ_AINLINE void bcwrite_need(BCWriteCtx *ctx, MSize len) { if (LJ_UNLIKELY(ctx->sb.n + len > ctx->sb.sz)) bcwrite_resize(ctx, len); } /* Add memory block to buffer. */ static void bcwrite_block(BCWriteCtx *ctx, const void *p, MSize len) { uint8_t *q = (uint8_t *)(ctx->sb.buf + ctx->sb.n); MSize i; ctx->sb.n += len; for (i = 0; i < len; i++) q[i] = ((uint8_t *)p)[i]; } /* Add byte to buffer. */ static LJ_AINLINE void bcwrite_byte(BCWriteCtx *ctx, uint8_t b) { ctx->sb.buf[ctx->sb.n++] = b; } /* Add ULEB128 value to buffer. */ static void bcwrite_uleb128(BCWriteCtx *ctx, uint32_t v) { MSize n = ctx->sb.n; uint8_t *p = (uint8_t *)ctx->sb.buf; for (; v >= 0x80; v >>= 7) p[n++] = (uint8_t)((v & 0x7f) | 0x80); p[n++] = (uint8_t)v; ctx->sb.n = n; } /* -- Bytecode writer ----------------------------------------------------- */ /* Write a single constant key/value of a template table. */ static void bcwrite_ktabk(BCWriteCtx *ctx, cTValue *o, int narrow) { bcwrite_need(ctx, 1+10); if (tvisstr(o)) { const GCstr *str = strV(o); MSize len = str->len; bcwrite_need(ctx, 5+len); bcwrite_uleb128(ctx, BCDUMP_KTAB_STR+len); bcwrite_block(ctx, strdata(str), len); } else if (tvisint(o)) { bcwrite_byte(ctx, BCDUMP_KTAB_INT); bcwrite_uleb128(ctx, intV(o)); } else if (tvisnum(o)) { if (!LJ_DUALNUM && narrow) { /* Narrow number constants to integers. */ lua_Number num = numV(o); int32_t k = lj_num2int(num); if (num == (lua_Number)k) { /* -0 is never a constant. */ bcwrite_byte(ctx, BCDUMP_KTAB_INT); bcwrite_uleb128(ctx, k); return; } } bcwrite_byte(ctx, BCDUMP_KTAB_NUM); bcwrite_uleb128(ctx, o->u32.lo); bcwrite_uleb128(ctx, o->u32.hi); } else { lua_assert(tvispri(o)); bcwrite_byte(ctx, BCDUMP_KTAB_NIL+~itype(o)); } } /* Write a template table. */ static void bcwrite_ktab(BCWriteCtx *ctx, const GCtab *t) { MSize narray = 0, nhash = 0; if (t->asize > 0) { /* Determine max. length of array part. */ ptrdiff_t i; TValue *array = tvref(t->array); for (i = (ptrdiff_t)t->asize-1; i >= 0; i--) if (!tvisnil(&array[i])) break; narray = (MSize)(i+1); } if (t->hmask > 0) { /* Count number of used hash slots. */ MSize i, hmask = t->hmask; Node *node = noderef(t->node); for (i = 0; i <= hmask; i++) nhash += !tvisnil(&node[i].val); } /* Write number of array slots and hash slots. */ bcwrite_uleb128(ctx, narray); bcwrite_uleb128(ctx, nhash); if (narray) { /* Write array entries (may contain nil). */ MSize i; TValue *o = tvref(t->array); for (i = 0; i < narray; i++, o++) bcwrite_ktabk(ctx, o, 1); } if (nhash) { /* Write hash entries. */ MSize i = nhash; Node *node = noderef(t->node) + t->hmask; for (;; node--) if (!tvisnil(&node->val)) { bcwrite_ktabk(ctx, &node->key, 0); bcwrite_ktabk(ctx, &node->val, 1); if (--i == 0) break; } } } /* Write GC constants of a prototype. */ static void bcwrite_kgc(BCWriteCtx *ctx, GCproto *pt) { MSize i, sizekgc = pt->sizekgc; GCRef *kr = mref(pt->k, GCRef) - (ptrdiff_t)sizekgc; for (i = 0; i < sizekgc; i++, kr++) { GCobj *o = gcref(*kr); MSize tp, need = 1; /* Determine constant type and needed size. */ if (o->gch.gct == ~LJ_TSTR) { tp = BCDUMP_KGC_STR + gco2str(o)->len; need = 5+gco2str(o)->len; } else if (o->gch.gct == ~LJ_TPROTO) { lua_assert((pt->flags & PROTO_CHILD)); tp = BCDUMP_KGC_CHILD; #if LJ_HASFFI } else if (o->gch.gct == ~LJ_TCDATA) { CTypeID id = gco2cd(o)->ctypeid; need = 1+4*5; if (id == CTID_INT64) { tp = BCDUMP_KGC_I64; } else if (id == CTID_UINT64) { tp = BCDUMP_KGC_U64; } else { lua_assert(id == CTID_COMPLEX_DOUBLE); tp = BCDUMP_KGC_COMPLEX; } #endif } else { lua_assert(o->gch.gct == ~LJ_TTAB); tp = BCDUMP_KGC_TAB; need = 1+2*5; } /* Write constant type. */ bcwrite_need(ctx, need); bcwrite_uleb128(ctx, tp); /* Write constant data (if any). */ if (tp >= BCDUMP_KGC_STR) { bcwrite_block(ctx, strdata(gco2str(o)), gco2str(o)->len); } else if (tp == BCDUMP_KGC_TAB) { bcwrite_ktab(ctx, gco2tab(o)); #if LJ_HASFFI } else if (tp != BCDUMP_KGC_CHILD) { cTValue *p = (TValue *)cdataptr(gco2cd(o)); bcwrite_uleb128(ctx, p[0].u32.lo); bcwrite_uleb128(ctx, p[0].u32.hi); if (tp == BCDUMP_KGC_COMPLEX) { bcwrite_uleb128(ctx, p[1].u32.lo); bcwrite_uleb128(ctx, p[1].u32.hi); } #endif } } } /* Write number constants of a prototype. */ static void bcwrite_knum(BCWriteCtx *ctx, GCproto *pt) { MSize i, sizekn = pt->sizekn; cTValue *o = mref(pt->k, TValue); bcwrite_need(ctx, 10*sizekn); for (i = 0; i < sizekn; i++, o++) { int32_t k; if (tvisint(o)) { k = intV(o); goto save_int; } else { /* Write a 33 bit ULEB128 for the int (lsb=0) or loword (lsb=1). */ if (!LJ_DUALNUM) { /* Narrow number constants to integers. */ lua_Number num = numV(o); k = lj_num2int(num); if (num == (lua_Number)k) { /* -0 is never a constant. */ save_int: bcwrite_uleb128(ctx, 2*(uint32_t)k | ((uint32_t)k & 0x80000000u)); if (k < 0) { char *p = &ctx->sb.buf[ctx->sb.n-1]; *p = (*p & 7) | ((k>>27) & 0x18); } continue; } } bcwrite_uleb128(ctx, 1+(2*o->u32.lo | (o->u32.lo & 0x80000000u))); if (o->u32.lo >= 0x80000000u) { char *p = &ctx->sb.buf[ctx->sb.n-1]; *p = (*p & 7) | ((o->u32.lo>>27) & 0x18); } bcwrite_uleb128(ctx, o->u32.hi); } } } /* Write bytecode instructions. */ static void bcwrite_bytecode(BCWriteCtx *ctx, GCproto *pt) { MSize nbc = pt->sizebc-1; /* Omit the [JI]FUNC* header. */ #if LJ_HASJIT uint8_t *p = (uint8_t *)&ctx->sb.buf[ctx->sb.n]; #endif bcwrite_block(ctx, proto_bc(pt)+1, nbc*(MSize)sizeof(BCIns)); #if LJ_HASJIT /* Unpatch modified bytecode containing ILOOP/JLOOP etc. */ if ((pt->flags & PROTO_ILOOP) || pt->trace) { jit_State *J = L2J(ctx->L); MSize i; for (i = 0; i < nbc; i++, p += sizeof(BCIns)) { BCOp op = (BCOp)p[LJ_ENDIAN_SELECT(0, 3)]; if (op == BC_IFORL || op == BC_IITERL || op == BC_ILOOP || op == BC_JFORI) { p[LJ_ENDIAN_SELECT(0, 3)] = (uint8_t)(op-BC_IFORL+BC_FORL); } else if (op == BC_JFORL || op == BC_JITERL || op == BC_JLOOP) { BCReg rd = p[LJ_ENDIAN_SELECT(2, 1)] + (p[LJ_ENDIAN_SELECT(3, 0)] << 8); BCIns ins = traceref(J, rd)->startins; p[LJ_ENDIAN_SELECT(0, 3)] = (uint8_t)(op-BC_JFORL+BC_FORL); p[LJ_ENDIAN_SELECT(2, 1)] = bc_c(ins); p[LJ_ENDIAN_SELECT(3, 0)] = bc_b(ins); } } } #endif } /* Write prototype. */ static void bcwrite_proto(BCWriteCtx *ctx, GCproto *pt) { MSize sizedbg = 0; /* Recursively write children of prototype. */ if ((pt->flags & PROTO_CHILD)) { ptrdiff_t i, n = pt->sizekgc; GCRef *kr = mref(pt->k, GCRef) - 1; for (i = 0; i < n; i++, kr--) { GCobj *o = gcref(*kr); if (o->gch.gct == ~LJ_TPROTO) bcwrite_proto(ctx, gco2pt(o)); } } /* Start writing the prototype info to a buffer. */ lj_str_resetbuf(&ctx->sb); ctx->sb.n = 5; /* Leave room for final size. */ bcwrite_need(ctx, 4+6*5+(pt->sizebc-1)*(MSize)sizeof(BCIns)+pt->sizeuv*2); /* Write prototype header. */ bcwrite_byte(ctx, (pt->flags & (PROTO_CHILD|PROTO_VARARG|PROTO_FFI))); bcwrite_byte(ctx, pt->numparams); bcwrite_byte(ctx, pt->framesize); bcwrite_byte(ctx, pt->sizeuv); bcwrite_uleb128(ctx, pt->sizekgc); bcwrite_uleb128(ctx, pt->sizekn); bcwrite_uleb128(ctx, pt->sizebc-1); if (!ctx->strip) { if (proto_lineinfo(pt)) sizedbg = pt->sizept - (MSize)((char *)proto_lineinfo(pt) - (char *)pt); bcwrite_uleb128(ctx, sizedbg); if (sizedbg) { bcwrite_uleb128(ctx, pt->firstline); bcwrite_uleb128(ctx, pt->numline); } } /* Write bytecode instructions and upvalue refs. */ bcwrite_bytecode(ctx, pt); bcwrite_block(ctx, proto_uv(pt), pt->sizeuv*2); /* Write constants. */ bcwrite_kgc(ctx, pt); bcwrite_knum(ctx, pt); /* Write debug info, if not stripped. */ if (sizedbg) { bcwrite_need(ctx, sizedbg); bcwrite_block(ctx, proto_lineinfo(pt), sizedbg); } /* Pass buffer to writer function. */ if (ctx->status == 0) { MSize n = ctx->sb.n - 5; MSize nn = (lj_fls(n)+8)*9 >> 6; ctx->sb.n = 5 - nn; bcwrite_uleb128(ctx, n); /* Fill in final size. */ lua_assert(ctx->sb.n == 5); ctx->status = ctx->wfunc(ctx->L, ctx->sb.buf+5-nn, nn+n, ctx->wdata); } } /* Write header of bytecode dump. */ static void bcwrite_header(BCWriteCtx *ctx) { GCstr *chunkname = proto_chunkname(ctx->pt); const char *name = strdata(chunkname); MSize len = chunkname->len; lj_str_resetbuf(&ctx->sb); bcwrite_need(ctx, 5+5+len); bcwrite_byte(ctx, BCDUMP_HEAD1); bcwrite_byte(ctx, BCDUMP_HEAD2); bcwrite_byte(ctx, BCDUMP_HEAD3); bcwrite_byte(ctx, BCDUMP_VERSION); bcwrite_byte(ctx, (ctx->strip ? BCDUMP_F_STRIP : 0) + (LJ_BE ? BCDUMP_F_BE : 0) + ((ctx->pt->flags & PROTO_FFI) ? BCDUMP_F_FFI : 0)); if (!ctx->strip) { bcwrite_uleb128(ctx, len); bcwrite_block(ctx, name, len); } ctx->status = ctx->wfunc(ctx->L, ctx->sb.buf, ctx->sb.n, ctx->wdata); } /* Write footer of bytecode dump. */ static void bcwrite_footer(BCWriteCtx *ctx) { if (ctx->status == 0) { uint8_t zero = 0; ctx->status = ctx->wfunc(ctx->L, &zero, 1, ctx->wdata); } } /* Protected callback for bytecode writer. */ static TValue *cpwriter(lua_State *L, lua_CFunction dummy, void *ud) { BCWriteCtx *ctx = (BCWriteCtx *)ud; UNUSED(dummy); lj_str_resizebuf(L, &ctx->sb, 1024); /* Avoids resize for most prototypes. */ bcwrite_header(ctx); bcwrite_proto(ctx, ctx->pt); bcwrite_footer(ctx); return NULL; } /* Write bytecode for a prototype. */ int lj_bcwrite(lua_State *L, GCproto *pt, lua_Writer writer, void *data, int strip) { BCWriteCtx ctx; int status; ctx.L = L; ctx.pt = pt; ctx.wfunc = writer; ctx.wdata = data; ctx.strip = strip; ctx.status = 0; lj_str_initbuf(&ctx.sb); status = lj_vm_cpcall(L, NULL, &ctx, cpwriter); if (status == 0) status = ctx.status; lj_str_freebuf(G(ctx.L), &ctx.sb); return status; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_char.c0000664000000000000000000000367412202141143022136 0ustar rootroot/* ** Character types. ** Donated to the public domain. ** ** This is intended to replace the problematic libc single-byte NLS functions. ** These just don't make sense anymore with UTF-8 locales becoming the norm ** on POSIX systems. It never worked too well on Windows systems since hardly ** anyone bothered to call setlocale(). ** ** This table is hardcoded for ASCII. Identifiers include the characters ** 128-255, too. This allows for the use of all non-ASCII chars as identifiers ** in the lexer. This is a broad definition, but works well in practice ** for both UTF-8 locales and most single-byte locales (such as ISO-8859-*). ** ** If you really need proper character types for UTF-8 strings, please use ** an add-on library such as slnunicode: http://luaforge.net/projects/sln/ */ #define lj_char_c #define LUA_CORE #include "lj_char.h" LJ_DATADEF const uint8_t lj_char_bits[257] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 152,152,152,152,152,152,152,152,152,152, 4, 4, 4, 4, 4, 4, 4,176,176,176,176,176,176,160,160,160,160,160,160,160,160,160, 160,160,160,160,160,160,160,160,160,160,160, 4, 4, 4, 4,132, 4,208,208,208,208,208,208,192,192,192,192,192,192,192,192,192, 192,192,192,192,192,192,192,192,192,192,192, 4, 4, 4, 4, 1, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128 }; tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_obj.c0000664000000000000000000000167412202141143021771 0ustar rootroot/* ** Miscellaneous object handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_obj_c #define LUA_CORE #include "lj_obj.h" /* Object type names. */ LJ_DATADEF const char *const lj_obj_typename[] = { /* ORDER LUA_T */ "no value", "nil", "boolean", "userdata", "number", "string", "table", "function", "userdata", "thread", "proto", "cdata" }; LJ_DATADEF const char *const lj_obj_itypename[] = { /* ORDER LJ_T */ "nil", "boolean", "boolean", "userdata", "string", "upval", "thread", "proto", "function", "trace", "cdata", "table", "userdata", "number" }; /* Compare two objects without calling metamethods. */ int lj_obj_equal(cTValue *o1, cTValue *o2) { if (itype(o1) == itype(o2)) { if (tvispri(o1)) return 1; if (!tvisnum(o1)) return gcrefeq(o1->gcr, o2->gcr); } else if (!tvisnumber(o1) || !tvisnumber(o2)) { return 0; } return numberVnum(o1) == numberVnum(o2); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/luajit.c0000664000000000000000000003472212202141143022022 0ustar rootroot/* ** LuaJIT frontend. Runs commands, scripts, read-eval-print (REPL) etc. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #include #include #include #define luajit_c #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "luajit.h" #include "lj_arch.h" #if LJ_TARGET_POSIX #include #define lua_stdin_is_tty() isatty(0) #elif LJ_TARGET_WINDOWS #include #ifdef __BORLANDC__ #define lua_stdin_is_tty() isatty(_fileno(stdin)) #else #define lua_stdin_is_tty() _isatty(_fileno(stdin)) #endif #else #define lua_stdin_is_tty() 1 #endif #if !LJ_TARGET_CONSOLE #include #endif static lua_State *globalL = NULL; static const char *progname = LUA_PROGNAME; #if !LJ_TARGET_CONSOLE static void lstop(lua_State *L, lua_Debug *ar) { (void)ar; /* unused arg. */ lua_sethook(L, NULL, 0, 0); /* Avoid luaL_error -- a C hook doesn't add an extra frame. */ luaL_where(L, 0); lua_pushfstring(L, "%sinterrupted!", lua_tostring(L, -1)); lua_error(L); } static void laction(int i) { signal(i, SIG_DFL); /* if another SIGINT happens before lstop, terminate process (default action) */ lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); } #endif static void print_usage(void) { fprintf(stderr, "usage: %s [options]... [script [args]...].\n" "Available options are:\n" " -e chunk Execute string " LUA_QL("chunk") ".\n" " -l name Require library " LUA_QL("name") ".\n" " -b ... Save or list bytecode.\n" " -j cmd Perform LuaJIT control command.\n" " -O[opt] Control LuaJIT optimizations.\n" " -i Enter interactive mode after executing " LUA_QL("script") ".\n" " -v Show version information.\n" " -E Ignore environment variables.\n" " -- Stop handling options.\n" " - Execute stdin and stop handling options.\n" , progname); fflush(stderr); } static void l_message(const char *pname, const char *msg) { if (pname) fprintf(stderr, "%s: ", pname); fprintf(stderr, "%s\n", msg); fflush(stderr); } static int report(lua_State *L, int status) { if (status && !lua_isnil(L, -1)) { const char *msg = lua_tostring(L, -1); if (msg == NULL) msg = "(error object is not a string)"; l_message(progname, msg); lua_pop(L, 1); } return status; } static int traceback(lua_State *L) { if (!lua_isstring(L, 1)) { /* Non-string error object? Try metamethod. */ if (lua_isnoneornil(L, 1) || !luaL_callmeta(L, 1, "__tostring") || !lua_isstring(L, -1)) return 1; /* Return non-string error object. */ lua_remove(L, 1); /* Replace object by result of __tostring metamethod. */ } luaL_traceback(L, L, lua_tostring(L, 1), 1); return 1; } static int docall(lua_State *L, int narg, int clear) { int status; int base = lua_gettop(L) - narg; /* function index */ lua_pushcfunction(L, traceback); /* push traceback function */ lua_insert(L, base); /* put it under chunk and args */ #if !LJ_TARGET_CONSOLE signal(SIGINT, laction); #endif status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base); #if !LJ_TARGET_CONSOLE signal(SIGINT, SIG_DFL); #endif lua_remove(L, base); /* remove traceback function */ /* force a complete garbage collection in case of errors */ if (status != 0) lua_gc(L, LUA_GCCOLLECT, 0); return status; } static void print_version(void) { fputs(LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n", stdout); } static void print_jit_status(lua_State *L) { int n; const char *s; lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); lua_getfield(L, -1, "jit"); /* Get jit.* module table. */ lua_remove(L, -2); lua_getfield(L, -1, "status"); lua_remove(L, -2); n = lua_gettop(L); lua_call(L, 0, LUA_MULTRET); fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stdout); for (n++; (s = lua_tostring(L, n)); n++) { putc(' ', stdout); fputs(s, stdout); } putc('\n', stdout); } static int getargs(lua_State *L, char **argv, int n) { int narg; int i; int argc = 0; while (argv[argc]) argc++; /* count total number of arguments */ narg = argc - (n + 1); /* number of arguments to the script */ luaL_checkstack(L, narg + 3, "too many arguments to script"); for (i = n+1; i < argc; i++) lua_pushstring(L, argv[i]); lua_createtable(L, narg, n + 1); for (i = 0; i < argc; i++) { lua_pushstring(L, argv[i]); lua_rawseti(L, -2, i - n); } return narg; } static int dofile(lua_State *L, const char *name) { int status = luaL_loadfile(L, name) || docall(L, 0, 1); return report(L, status); } static int dostring(lua_State *L, const char *s, const char *name) { int status = luaL_loadbuffer(L, s, strlen(s), name) || docall(L, 0, 1); return report(L, status); } static int dolibrary(lua_State *L, const char *name) { lua_getglobal(L, "require"); lua_pushstring(L, name); return report(L, docall(L, 1, 1)); } static void write_prompt(lua_State *L, int firstline) { const char *p; lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2"); p = lua_tostring(L, -1); if (p == NULL) p = firstline ? LUA_PROMPT : LUA_PROMPT2; fputs(p, stdout); fflush(stdout); lua_pop(L, 1); /* remove global */ } static int incomplete(lua_State *L, int status) { if (status == LUA_ERRSYNTAX) { size_t lmsg; const char *msg = lua_tolstring(L, -1, &lmsg); const char *tp = msg + lmsg - (sizeof(LUA_QL("")) - 1); if (strstr(msg, LUA_QL("")) == tp) { lua_pop(L, 1); return 1; } } return 0; /* else... */ } static int pushline(lua_State *L, int firstline) { char buf[LUA_MAXINPUT]; write_prompt(L, firstline); if (fgets(buf, LUA_MAXINPUT, stdin)) { size_t len = strlen(buf); if (len > 0 && buf[len-1] == '\n') buf[len-1] = '\0'; if (firstline && buf[0] == '=') lua_pushfstring(L, "return %s", buf+1); else lua_pushstring(L, buf); return 1; } return 0; } static int loadline(lua_State *L) { int status; lua_settop(L, 0); if (!pushline(L, 1)) return -1; /* no input */ for (;;) { /* repeat until gets a complete line */ status = luaL_loadbuffer(L, lua_tostring(L, 1), lua_strlen(L, 1), "=stdin"); if (!incomplete(L, status)) break; /* cannot try to add lines? */ if (!pushline(L, 0)) /* no more input? */ return -1; lua_pushliteral(L, "\n"); /* add a new line... */ lua_insert(L, -2); /* ...between the two lines */ lua_concat(L, 3); /* join them */ } lua_remove(L, 1); /* remove line */ return status; } static void dotty(lua_State *L) { int status; const char *oldprogname = progname; progname = NULL; while ((status = loadline(L)) != -1) { if (status == 0) status = docall(L, 0, 0); report(L, status); if (status == 0 && lua_gettop(L) > 0) { /* any result to print? */ lua_getglobal(L, "print"); lua_insert(L, 1); if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0) l_message(progname, lua_pushfstring(L, "error calling " LUA_QL("print") " (%s)", lua_tostring(L, -1))); } } lua_settop(L, 0); /* clear stack */ fputs("\n", stdout); fflush(stdout); progname = oldprogname; } static int handle_script(lua_State *L, char **argv, int n) { int status; const char *fname; int narg = getargs(L, argv, n); /* collect arguments */ lua_setglobal(L, "arg"); fname = argv[n]; if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) fname = NULL; /* stdin */ status = luaL_loadfile(L, fname); lua_insert(L, -(narg+1)); if (status == 0) status = docall(L, narg, 0); else lua_pop(L, narg); return report(L, status); } /* Load add-on module. */ static int loadjitmodule(lua_State *L) { lua_getglobal(L, "require"); lua_pushliteral(L, "jit."); lua_pushvalue(L, -3); lua_concat(L, 2); if (lua_pcall(L, 1, 1, 0)) { const char *msg = lua_tostring(L, -1); if (msg && !strncmp(msg, "module ", 7)) { err: l_message(progname, "unknown luaJIT command or jit.* modules not installed"); return 1; } else { return report(L, 1); } } lua_getfield(L, -1, "start"); if (lua_isnil(L, -1)) goto err; lua_remove(L, -2); /* Drop module table. */ return 0; } /* Run command with options. */ static int runcmdopt(lua_State *L, const char *opt) { int narg = 0; if (opt && *opt) { for (;;) { /* Split arguments. */ const char *p = strchr(opt, ','); narg++; if (!p) break; if (p == opt) lua_pushnil(L); else lua_pushlstring(L, opt, (size_t)(p - opt)); opt = p + 1; } if (*opt) lua_pushstring(L, opt); else lua_pushnil(L); } return report(L, lua_pcall(L, narg, 0, 0)); } /* JIT engine control command: try jit library first or load add-on module. */ static int dojitcmd(lua_State *L, const char *cmd) { const char *opt = strchr(cmd, '='); lua_pushlstring(L, cmd, opt ? (size_t)(opt - cmd) : strlen(cmd)); lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); lua_getfield(L, -1, "jit"); /* Get jit.* module table. */ lua_remove(L, -2); lua_pushvalue(L, -2); lua_gettable(L, -2); /* Lookup library function. */ if (!lua_isfunction(L, -1)) { lua_pop(L, 2); /* Drop non-function and jit.* table, keep module name. */ if (loadjitmodule(L)) return 1; } else { lua_remove(L, -2); /* Drop jit.* table. */ } lua_remove(L, -2); /* Drop module name. */ return runcmdopt(L, opt ? opt+1 : opt); } /* Optimization flags. */ static int dojitopt(lua_State *L, const char *opt) { lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); lua_getfield(L, -1, "jit.opt"); /* Get jit.opt.* module table. */ lua_remove(L, -2); lua_getfield(L, -1, "start"); lua_remove(L, -2); return runcmdopt(L, opt); } /* Save or list bytecode. */ static int dobytecode(lua_State *L, char **argv) { int narg = 0; lua_pushliteral(L, "bcsave"); if (loadjitmodule(L)) return 1; if (argv[0][2]) { narg++; argv[0][1] = '-'; lua_pushstring(L, argv[0]+1); } for (argv++; *argv != NULL; narg++, argv++) lua_pushstring(L, *argv); return report(L, lua_pcall(L, narg, 0, 0)); } /* check that argument has no extra characters at the end */ #define notail(x) {if ((x)[2] != '\0') return -1;} #define FLAGS_INTERACTIVE 1 #define FLAGS_VERSION 2 #define FLAGS_EXEC 4 #define FLAGS_OPTION 8 #define FLAGS_NOENV 16 static int collectargs(char **argv, int *flags) { int i; for (i = 1; argv[i] != NULL; i++) { if (argv[i][0] != '-') /* Not an option? */ return i; switch (argv[i][1]) { /* Check option. */ case '-': notail(argv[i]); return (argv[i+1] != NULL ? i+1 : 0); case '\0': return i; case 'i': notail(argv[i]); *flags |= FLAGS_INTERACTIVE; /* fallthrough */ case 'v': notail(argv[i]); *flags |= FLAGS_VERSION; break; case 'e': *flags |= FLAGS_EXEC; case 'j': /* LuaJIT extension */ case 'l': *flags |= FLAGS_OPTION; if (argv[i][2] == '\0') { i++; if (argv[i] == NULL) return -1; } break; case 'O': break; /* LuaJIT extension */ case 'b': /* LuaJIT extension */ if (*flags) return -1; *flags |= FLAGS_EXEC; return 0; case 'E': *flags |= FLAGS_NOENV; break; default: return -1; /* invalid option */ } } return 0; } static int runargs(lua_State *L, char **argv, int n) { int i; for (i = 1; i < n; i++) { if (argv[i] == NULL) continue; lua_assert(argv[i][0] == '-'); switch (argv[i][1]) { /* option */ case 'e': { const char *chunk = argv[i] + 2; if (*chunk == '\0') chunk = argv[++i]; lua_assert(chunk != NULL); if (dostring(L, chunk, "=(command line)") != 0) return 1; break; } case 'l': { const char *filename = argv[i] + 2; if (*filename == '\0') filename = argv[++i]; lua_assert(filename != NULL); if (dolibrary(L, filename)) return 1; /* stop if file fails */ break; } case 'j': { /* LuaJIT extension */ const char *cmd = argv[i] + 2; if (*cmd == '\0') cmd = argv[++i]; lua_assert(cmd != NULL); if (dojitcmd(L, cmd)) return 1; break; } case 'O': /* LuaJIT extension */ if (dojitopt(L, argv[i] + 2)) return 1; break; case 'b': /* LuaJIT extension */ return dobytecode(L, argv+i); default: break; } } return 0; } static int handle_luainit(lua_State *L) { #if LJ_TARGET_CONSOLE const char *init = NULL; #else const char *init = getenv(LUA_INIT); #endif if (init == NULL) return 0; /* status OK */ else if (init[0] == '@') return dofile(L, init+1); else return dostring(L, init, "=" LUA_INIT); } static struct Smain { char **argv; int argc; int status; } smain; static int pmain(lua_State *L) { struct Smain *s = &smain; char **argv = s->argv; int script; int flags = 0; globalL = L; if (argv[0] && argv[0][0]) progname = argv[0]; LUAJIT_VERSION_SYM(); /* linker-enforced version check */ script = collectargs(argv, &flags); if (script < 0) { /* invalid args? */ print_usage(); s->status = 1; return 0; } if ((flags & FLAGS_NOENV)) { lua_pushboolean(L, 1); lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); } lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */ luaL_openlibs(L); /* open libraries */ lua_gc(L, LUA_GCRESTART, -1); if (!(flags & FLAGS_NOENV)) { s->status = handle_luainit(L); if (s->status != 0) return 0; } if ((flags & FLAGS_VERSION)) print_version(); s->status = runargs(L, argv, (script > 0) ? script : s->argc); if (s->status != 0) return 0; if (script) { s->status = handle_script(L, argv, script); if (s->status != 0) return 0; } if ((flags & FLAGS_INTERACTIVE)) { print_jit_status(L); dotty(L); } else if (script == 0 && !(flags & (FLAGS_EXEC|FLAGS_VERSION))) { if (lua_stdin_is_tty()) { print_version(); print_jit_status(L); dotty(L); } else { dofile(L, NULL); /* executes stdin as a file */ } } return 0; } int main(int argc, char **argv) { int status; lua_State *L = lua_open(); /* create state */ if (L == NULL) { l_message(argv[0], "cannot create state: not enough memory"); return EXIT_FAILURE; } smain.argc = argc; smain.argv = argv; status = lua_cpcall(L, pmain, NULL); report(L, status); lua_close(L); return (status || smain.status) ? EXIT_FAILURE : EXIT_SUCCESS; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ctype.h0000664000000000000000000004103512202141143022343 0ustar rootroot/* ** C type management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_CTYPE_H #define _LJ_CTYPE_H #include "lj_obj.h" #include "lj_gc.h" #if LJ_HASFFI /* -- C type definitions -------------------------------------------------- */ /* C type numbers. Highest 4 bits of C type info. ORDER CT. */ enum { /* Externally visible types. */ CT_NUM, /* Integer or floating-point numbers. */ CT_STRUCT, /* Struct or union. */ CT_PTR, /* Pointer or reference. */ CT_ARRAY, /* Array or complex type. */ CT_MAYCONVERT = CT_ARRAY, CT_VOID, /* Void type. */ CT_ENUM, /* Enumeration. */ CT_HASSIZE = CT_ENUM, /* Last type where ct->size holds the actual size. */ CT_FUNC, /* Function. */ CT_TYPEDEF, /* Typedef. */ CT_ATTRIB, /* Miscellaneous attributes. */ /* Internal element types. */ CT_FIELD, /* Struct/union field or function parameter. */ CT_BITFIELD, /* Struct/union bitfield. */ CT_CONSTVAL, /* Constant value. */ CT_EXTERN, /* External reference. */ CT_KW /* Keyword. */ }; LJ_STATIC_ASSERT(((int)CT_PTR & (int)CT_ARRAY) == CT_PTR); LJ_STATIC_ASSERT(((int)CT_STRUCT & (int)CT_ARRAY) == CT_STRUCT); /* ** ---------- info ------------ ** |type flags... A cid | size | sib | next | name | ** +----------------------------+--------+-------+-------+-------+-- ** |NUM BFvcUL.. A | size | | type | | ** |STRUCT ..vcU..V A | size | field | name? | name? | ** |PTR ..vcR... A cid | size | | type | | ** |ARRAY VCvc...V A cid | size | | type | | ** |VOID ..vc.... A | size | | type | | ** |ENUM A cid | size | const | name? | name? | ** |FUNC ....VS.. cc cid | nargs | field | name? | name? | ** |TYPEDEF cid | | | name | name | ** |ATTRIB attrnum cid | attr | sib? | type? | | ** |FIELD cid | offset | field | | name? | ** |BITFIELD B.vcU csz bsz pos | offset | field | | name? | ** |CONSTVAL c cid | value | const | name | name | ** |EXTERN cid | | sib? | name | name | ** |KW tok | size | | name | name | ** +----------------------------+--------+-------+-------+-------+-- ** ^^ ^^--- bits used for C type conversion dispatch */ /* C type info flags. TFFArrrr */ #define CTF_BOOL 0x08000000u /* Boolean: NUM, BITFIELD. */ #define CTF_FP 0x04000000u /* Floating-point: NUM. */ #define CTF_CONST 0x02000000u /* Const qualifier. */ #define CTF_VOLATILE 0x01000000u /* Volatile qualifier. */ #define CTF_UNSIGNED 0x00800000u /* Unsigned: NUM, BITFIELD. */ #define CTF_LONG 0x00400000u /* Long: NUM. */ #define CTF_VLA 0x00100000u /* Variable-length: ARRAY, STRUCT. */ #define CTF_REF 0x00800000u /* Reference: PTR. */ #define CTF_VECTOR 0x08000000u /* Vector: ARRAY. */ #define CTF_COMPLEX 0x04000000u /* Complex: ARRAY. */ #define CTF_UNION 0x00800000u /* Union: STRUCT. */ #define CTF_VARARG 0x00800000u /* Vararg: FUNC. */ #define CTF_SSEREGPARM 0x00400000u /* SSE register parameters: FUNC. */ #define CTF_QUAL (CTF_CONST|CTF_VOLATILE) #define CTF_ALIGN (CTMASK_ALIGN< 0 ? CTF_UNSIGNED : 0) /* Flags used in parser. .F.Ammvf cp->attr */ #define CTFP_ALIGNED 0x00000001u /* cp->attr + ALIGN */ #define CTFP_PACKED 0x00000002u /* cp->attr */ /* ...C...f cp->fattr */ #define CTFP_CCONV 0x00000001u /* cp->fattr + CCONV/[SSE]REGPARM */ /* C type info bitfields. */ #define CTMASK_CID 0x0000ffffu /* Max. 65536 type IDs. */ #define CTMASK_NUM 0xf0000000u /* Max. 16 type numbers. */ #define CTSHIFT_NUM 28 #define CTMASK_ALIGN 15 /* Max. alignment is 2^15. */ #define CTSHIFT_ALIGN 16 #define CTMASK_ATTRIB 255 /* Max. 256 attributes. */ #define CTSHIFT_ATTRIB 16 #define CTMASK_CCONV 3 /* Max. 4 calling conventions. */ #define CTSHIFT_CCONV 16 #define CTMASK_REGPARM 3 /* Max. 0-3 regparms. */ #define CTSHIFT_REGPARM 18 /* Bitfields only used in parser. */ #define CTMASK_VSIZEP 15 /* Max. vector size is 2^15. */ #define CTSHIFT_VSIZEP 4 #define CTMASK_MSIZEP 255 /* Max. type size (via mode) is 128. */ #define CTSHIFT_MSIZEP 8 /* Info bits for BITFIELD. Max. size of bitfield is 64 bits. */ #define CTBSZ_MAX 32 /* Max. size of bitfield is 32 bit. */ #define CTBSZ_FIELD 127 /* Temp. marker for regular field. */ #define CTMASK_BITPOS 127 #define CTMASK_BITBSZ 127 #define CTMASK_BITCSZ 127 #define CTSHIFT_BITPOS 0 #define CTSHIFT_BITBSZ 8 #define CTSHIFT_BITCSZ 16 #define CTF_INSERT(info, field, val) \ info = (info & ~(CTMASK_##field<> CTSHIFT_NUM) #define ctype_cid(info) ((CTypeID)((info) & CTMASK_CID)) #define ctype_align(info) (((info) >> CTSHIFT_ALIGN) & CTMASK_ALIGN) #define ctype_attrib(info) (((info) >> CTSHIFT_ATTRIB) & CTMASK_ATTRIB) #define ctype_bitpos(info) (((info) >> CTSHIFT_BITPOS) & CTMASK_BITPOS) #define ctype_bitbsz(info) (((info) >> CTSHIFT_BITBSZ) & CTMASK_BITBSZ) #define ctype_bitcsz(info) (((info) >> CTSHIFT_BITCSZ) & CTMASK_BITCSZ) #define ctype_vsizeP(info) (((info) >> CTSHIFT_VSIZEP) & CTMASK_VSIZEP) #define ctype_msizeP(info) (((info) >> CTSHIFT_MSIZEP) & CTMASK_MSIZEP) #define ctype_cconv(info) (((info) >> CTSHIFT_CCONV) & CTMASK_CCONV) /* Simple type checks. */ #define ctype_isnum(info) (ctype_type((info)) == CT_NUM) #define ctype_isvoid(info) (ctype_type((info)) == CT_VOID) #define ctype_isptr(info) (ctype_type((info)) == CT_PTR) #define ctype_isarray(info) (ctype_type((info)) == CT_ARRAY) #define ctype_isstruct(info) (ctype_type((info)) == CT_STRUCT) #define ctype_isfunc(info) (ctype_type((info)) == CT_FUNC) #define ctype_isenum(info) (ctype_type((info)) == CT_ENUM) #define ctype_istypedef(info) (ctype_type((info)) == CT_TYPEDEF) #define ctype_isattrib(info) (ctype_type((info)) == CT_ATTRIB) #define ctype_isfield(info) (ctype_type((info)) == CT_FIELD) #define ctype_isbitfield(info) (ctype_type((info)) == CT_BITFIELD) #define ctype_isconstval(info) (ctype_type((info)) == CT_CONSTVAL) #define ctype_isextern(info) (ctype_type((info)) == CT_EXTERN) #define ctype_hassize(info) (ctype_type((info)) <= CT_HASSIZE) /* Combined type and flag checks. */ #define ctype_isinteger(info) \ (((info) & (CTMASK_NUM|CTF_BOOL|CTF_FP)) == CTINFO(CT_NUM, 0)) #define ctype_isinteger_or_bool(info) \ (((info) & (CTMASK_NUM|CTF_FP)) == CTINFO(CT_NUM, 0)) #define ctype_isbool(info) \ (((info) & (CTMASK_NUM|CTF_BOOL)) == CTINFO(CT_NUM, CTF_BOOL)) #define ctype_isfp(info) \ (((info) & (CTMASK_NUM|CTF_FP)) == CTINFO(CT_NUM, CTF_FP)) #define ctype_ispointer(info) \ ((ctype_type(info) >> 1) == (CT_PTR >> 1)) /* Pointer or array. */ #define ctype_isref(info) \ (((info) & (CTMASK_NUM|CTF_REF)) == CTINFO(CT_PTR, CTF_REF)) #define ctype_isrefarray(info) \ (((info) & (CTMASK_NUM|CTF_VECTOR|CTF_COMPLEX)) == CTINFO(CT_ARRAY, 0)) #define ctype_isvector(info) \ (((info) & (CTMASK_NUM|CTF_VECTOR)) == CTINFO(CT_ARRAY, CTF_VECTOR)) #define ctype_iscomplex(info) \ (((info) & (CTMASK_NUM|CTF_COMPLEX)) == CTINFO(CT_ARRAY, CTF_COMPLEX)) #define ctype_isvltype(info) \ (((info) & ((CTMASK_NUM|CTF_VLA) - (2u<") _(STRING, "") \ _(INTEGER, "") _(EOF, "") \ _(OROR, "||") _(ANDAND, "&&") _(EQ, "==") _(NE, "!=") \ _(LE, "<=") _(GE, ">=") _(SHL, "<<") _(SHR, ">>") _(DEREF, "->") /* Simple declaration specifiers. */ #define CDSDEF(_) \ _(VOID) _(BOOL) _(CHAR) _(INT) _(FP) \ _(LONG) _(LONGLONG) _(SHORT) _(COMPLEX) _(SIGNED) _(UNSIGNED) \ _(CONST) _(VOLATILE) _(RESTRICT) _(INLINE) \ _(TYPEDEF) _(EXTERN) _(STATIC) _(AUTO) _(REGISTER) /* C keywords. */ #define CKWDEF(_) \ CDSDEF(_) _(EXTENSION) _(ASM) _(ATTRIBUTE) \ _(DECLSPEC) _(CCDECL) _(PTRSZ) \ _(STRUCT) _(UNION) _(ENUM) \ _(SIZEOF) _(ALIGNOF) /* C token numbers. */ enum { CTOK_OFS = 255, #define CTOKNUM(name, sym) CTOK_##name, #define CKWNUM(name) CTOK_##name, CTOKDEF(CTOKNUM) CKWDEF(CKWNUM) #undef CTOKNUM #undef CKWNUM CTOK_FIRSTDECL = CTOK_VOID, CTOK_FIRSTSCL = CTOK_TYPEDEF, CTOK_LASTDECLFLAG = CTOK_REGISTER, CTOK_LASTDECL = CTOK_ENUM }; /* Declaration specifier flags. */ enum { #define CDSFLAG(name) CDF_##name = (1u << (CTOK_##name - CTOK_FIRSTDECL)), CDSDEF(CDSFLAG) #undef CDSFLAG CDF__END }; #define CDF_SCL (CDF_TYPEDEF|CDF_EXTERN|CDF_STATIC|CDF_AUTO|CDF_REGISTER) /* -- C type management --------------------------------------------------- */ #define ctype_ctsG(g) (mref((g)->ctype_state, CTState)) /* Get C type state. */ static LJ_AINLINE CTState *ctype_cts(lua_State *L) { CTState *cts = ctype_ctsG(G(L)); cts->L = L; /* Save L for errors and allocations. */ return cts; } /* Save and restore state of C type table. */ #define LJ_CTYPE_SAVE(cts) CTState savects_ = *(cts) #define LJ_CTYPE_RESTORE(cts) \ ((cts)->top = savects_.top, \ memcpy((cts)->hash, savects_.hash, sizeof(savects_.hash))) /* Check C type ID for validity when assertions are enabled. */ static LJ_AINLINE CTypeID ctype_check(CTState *cts, CTypeID id) { lua_assert(id > 0 && id < cts->top); UNUSED(cts); return id; } /* Get C type for C type ID. */ static LJ_AINLINE CType *ctype_get(CTState *cts, CTypeID id) { return &cts->tab[ctype_check(cts, id)]; } /* Get C type ID for a C type. */ #define ctype_typeid(cts, ct) ((CTypeID)((ct) - (cts)->tab)) /* Get child C type. */ static LJ_AINLINE CType *ctype_child(CTState *cts, CType *ct) { lua_assert(!(ctype_isvoid(ct->info) || ctype_isstruct(ct->info) || ctype_isbitfield(ct->info))); /* These don't have children. */ return ctype_get(cts, ctype_cid(ct->info)); } /* Get raw type for a C type ID. */ static LJ_AINLINE CType *ctype_raw(CTState *cts, CTypeID id) { CType *ct = ctype_get(cts, id); while (ctype_isattrib(ct->info)) ct = ctype_child(cts, ct); return ct; } /* Get raw type of the child of a C type. */ static LJ_AINLINE CType *ctype_rawchild(CTState *cts, CType *ct) { do { ct = ctype_child(cts, ct); } while (ctype_isattrib(ct->info)); return ct; } /* Set the name of a C type table element. */ static LJ_AINLINE void ctype_setname(CType *ct, GCstr *s) { /* NOBARRIER: mark string as fixed -- the C type table is never collected. */ fixstring(s); setgcref(ct->name, obj2gco(s)); } LJ_FUNC CTypeID lj_ctype_new(CTState *cts, CType **ctp); LJ_FUNC CTypeID lj_ctype_intern(CTState *cts, CTInfo info, CTSize size); LJ_FUNC void lj_ctype_addname(CTState *cts, CType *ct, CTypeID id); LJ_FUNC CTypeID lj_ctype_getname(CTState *cts, CType **ctp, GCstr *name, uint32_t tmask); LJ_FUNC CType *lj_ctype_getfieldq(CTState *cts, CType *ct, GCstr *name, CTSize *ofs, CTInfo *qual); #define lj_ctype_getfield(cts, ct, name, ofs) \ lj_ctype_getfieldq((cts), (ct), (name), (ofs), NULL) LJ_FUNC CType *lj_ctype_rawref(CTState *cts, CTypeID id); LJ_FUNC CTSize lj_ctype_size(CTState *cts, CTypeID id); LJ_FUNC CTSize lj_ctype_vlsize(CTState *cts, CType *ct, CTSize nelem); LJ_FUNC CTInfo lj_ctype_info(CTState *cts, CTypeID id, CTSize *szp); LJ_FUNC cTValue *lj_ctype_meta(CTState *cts, CTypeID id, MMS mm); LJ_FUNC GCstr *lj_ctype_repr(lua_State *L, CTypeID id, GCstr *name); LJ_FUNC GCstr *lj_ctype_repr_int64(lua_State *L, uint64_t n, int isunsigned); LJ_FUNC GCstr *lj_ctype_repr_complex(lua_State *L, void *sp, CTSize size); LJ_FUNC CTState *lj_ctype_init(lua_State *L); LJ_FUNC void lj_ctype_freestate(global_State *g); #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_lib.o0000664000000000000000000002357012213333062022005 0ustar rootrootELF>@@UHAWAVAUATSHHIHHMG,HE MȋGJH0HMDjLbHMHھLIFxHIFDHھLHtHھLIFxt"P@z uRAF@(tIFHھLIFHPIVxt'PP@z uRAF@(t&DIVzt+BHEI+VHHUHtiAvAA!~(AtT~)@t@uUHNtop-1)->it) == (~11u))lj_obj.h(((L->top)->it) == (~11u))lj_gc.h(((o)->it) < 0xfffeffffu)!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((o)->gch.marked & 0x04) && !((o)->gch.marked & (g->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02))g->gc.state != GCSfinalize && g->gc.state != GCSpause!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))lj_gc_barrierbacksetgcVlj_lib_registercopyTVlib_create_tablelj_lib_checknumlj_lib_checkintlj_lib_checkbit8CGCC: (Debian 4.7.3-4) 4.7.3zRx (AC M H"SC J  hAC L (1YC G L A $AC Px $AC Px &[C F $(AC P P*AC e p*AC e 8AC s (AC M .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @ Px & , 12 t@2 T O%\Pi0XruxX&  P( s p#B<0UPn`    !.>KR]kv"1E& *+*;8P! `glj_lib.c__PRETTY_FUNCTION__.5286__PRETTY_FUNCTION__.3967__PRETTY_FUNCTION__.3937__PRETTY_FUNCTION__.5305__PRETTY_FUNCTION__.4016__PRETTY_FUNCTION__.5336__PRETTY_FUNCTION__.5343__PRETTY_FUNCTION__.5356.LC11lj_lib_registerluaL_findtablelua_getfieldlj_err_callerv__assert_faillua_setfieldlua_createtablelj_func_newCmemcpylj_str_newlj_tab_setstrlj_tab_setlj_lib_checkanylj_err_arglj_lib_checkstrlj_str_fromnumberlj_err_argtlj_lib_optstrlj_lib_checknumlj_strscan_numlj_lib_checkintlj_lib_optintlj_lib_checkbitlj_lib_checkfunclj_lib_checktablj_lib_checktabornillj_lib_checkoptmemcmplj_err_argvS ]m p   B  . )@ pJ O 7T B .  p   0  R (( 02 R7 <Xg B .   P  7 Y `c .h m ` . 7 BA .F Kj B . "-$X Bb .g ly%#( % % * Z/(%   Z)9(M%[ e j Zow%% "D &R # 0 1q O( LlE ,Tt! tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_snap.c0000664000000000000000000006625312231715321022173 0ustar rootroot/* ** Snapshot handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_snap_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_gc.h" #include "lj_tab.h" #include "lj_state.h" #include "lj_frame.h" #include "lj_bc.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" #include "lj_trace.h" #include "lj_snap.h" #include "lj_target.h" #if LJ_HASFFI #include "lj_ctype.h" #include "lj_cdata.h" #endif /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) /* Emit raw IR without passing through optimizations. */ #define emitir_raw(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_ir_emit(J)) /* -- Snapshot buffer allocation ------------------------------------------ */ /* Grow snapshot buffer. */ void lj_snap_grow_buf_(jit_State *J, MSize need) { MSize maxsnap = (MSize)J->param[JIT_P_maxsnap]; if (need > maxsnap) lj_trace_err(J, LJ_TRERR_SNAPOV); lj_mem_growvec(J->L, J->snapbuf, J->sizesnap, maxsnap, SnapShot); J->cur.snap = J->snapbuf; } /* Grow snapshot map buffer. */ void lj_snap_grow_map_(jit_State *J, MSize need) { if (need < 2*J->sizesnapmap) need = 2*J->sizesnapmap; else if (need < 64) need = 64; J->snapmapbuf = (SnapEntry *)lj_mem_realloc(J->L, J->snapmapbuf, J->sizesnapmap*sizeof(SnapEntry), need*sizeof(SnapEntry)); J->cur.snapmap = J->snapmapbuf; J->sizesnapmap = need; } /* -- Snapshot generation ------------------------------------------------- */ /* Add all modified slots to the snapshot. */ static MSize snapshot_slots(jit_State *J, SnapEntry *map, BCReg nslots) { IRRef retf = J->chain[IR_RETF]; /* Limits SLOAD restore elimination. */ BCReg s; MSize n = 0; for (s = 0; s < nslots; s++) { TRef tr = J->slot[s]; IRRef ref = tref_ref(tr); if (ref) { SnapEntry sn = SNAP_TR(s, tr); IRIns *ir = IR(ref); if (!(sn & (SNAP_CONT|SNAP_FRAME)) && ir->o == IR_SLOAD && ir->op1 == s && ref > retf) { /* No need to snapshot unmodified non-inherited slots. */ if (!(ir->op2 & IRSLOAD_INHERIT)) continue; /* No need to restore readonly slots and unmodified non-parent slots. */ if (!(LJ_DUALNUM && (ir->op2 & IRSLOAD_CONVERT)) && (ir->op2 & (IRSLOAD_READONLY|IRSLOAD_PARENT)) != IRSLOAD_PARENT) sn |= SNAP_NORESTORE; } if (LJ_SOFTFP && irt_isnum(ir->t)) sn |= SNAP_SOFTFPNUM; map[n++] = sn; } } return n; } /* Add frame links at the end of the snapshot. */ static BCReg snapshot_framelinks(jit_State *J, SnapEntry *map) { cTValue *frame = J->L->base - 1; cTValue *lim = J->L->base - J->baseslot; cTValue *ftop = frame + funcproto(frame_func(frame))->framesize; MSize f = 0; map[f++] = SNAP_MKPC(J->pc); /* The current PC is always the first entry. */ while (frame > lim) { /* Backwards traversal of all frames above base. */ if (frame_islua(frame)) { map[f++] = SNAP_MKPC(frame_pc(frame)); frame = frame_prevl(frame); if (frame + funcproto(frame_func(frame))->framesize > ftop) ftop = frame + funcproto(frame_func(frame))->framesize; } else if (frame_iscont(frame)) { map[f++] = SNAP_MKFTSZ(frame_ftsz(frame)); map[f++] = SNAP_MKPC(frame_contpc(frame)); frame = frame_prevd(frame); } else { lua_assert(!frame_isc(frame)); map[f++] = SNAP_MKFTSZ(frame_ftsz(frame)); frame = frame_prevd(frame); } } lua_assert(f == (MSize)(1 + J->framedepth)); return (BCReg)(ftop - lim); } /* Take a snapshot of the current stack. */ static void snapshot_stack(jit_State *J, SnapShot *snap, MSize nsnapmap) { BCReg nslots = J->baseslot + J->maxslot; MSize nent; SnapEntry *p; /* Conservative estimate. */ lj_snap_grow_map(J, nsnapmap + nslots + (MSize)J->framedepth+1); p = &J->cur.snapmap[nsnapmap]; nent = snapshot_slots(J, p, nslots); snap->topslot = (uint8_t)snapshot_framelinks(J, p + nent); snap->mapofs = (uint16_t)nsnapmap; snap->ref = (IRRef1)J->cur.nins; snap->nent = (uint8_t)nent; snap->nslots = (uint8_t)nslots; snap->count = 0; J->cur.nsnapmap = (uint16_t)(nsnapmap + nent + 1 + J->framedepth); } /* Add or merge a snapshot. */ void lj_snap_add(jit_State *J) { MSize nsnap = J->cur.nsnap; MSize nsnapmap = J->cur.nsnapmap; /* Merge if no ins. inbetween or if requested and no guard inbetween. */ if (J->mergesnap ? !irt_isguard(J->guardemit) : (nsnap > 0 && J->cur.snap[nsnap-1].ref == J->cur.nins)) { if (nsnap == 1) { /* But preserve snap #0 PC. */ emitir_raw(IRT(IR_NOP, IRT_NIL), 0, 0); goto nomerge; } nsnapmap = J->cur.snap[--nsnap].mapofs; } else { nomerge: lj_snap_grow_buf(J, nsnap+1); J->cur.nsnap = (uint16_t)(nsnap+1); } J->mergesnap = 0; J->guardemit.irt = 0; snapshot_stack(J, &J->cur.snap[nsnap], nsnapmap); } /* -- Snapshot modification ----------------------------------------------- */ #define SNAP_USEDEF_SLOTS (LJ_MAX_JSLOTS+LJ_STACK_EXTRA) /* Find unused slots with reaching-definitions bytecode data-flow analysis. */ static BCReg snap_usedef(jit_State *J, uint8_t *udf, const BCIns *pc, BCReg maxslot) { BCReg s; GCobj *o; if (maxslot == 0) return 0; #ifdef LUAJIT_USE_VALGRIND /* Avoid errors for harmless reads beyond maxslot. */ memset(udf, 1, SNAP_USEDEF_SLOTS); #else memset(udf, 1, maxslot); #endif /* Treat open upvalues as used. */ o = gcref(J->L->openupval); while (o) { if (uvval(gco2uv(o)) < J->L->base) break; udf[uvval(gco2uv(o)) - J->L->base] = 0; o = gcref(o->gch.nextgc); } #define USE_SLOT(s) udf[(s)] &= ~1 #define DEF_SLOT(s) udf[(s)] *= 3 /* Scan through following bytecode and check for uses/defs. */ lua_assert(pc >= proto_bc(J->pt) && pc < proto_bc(J->pt) + J->pt->sizebc); for (;;) { BCIns ins = *pc++; BCOp op = bc_op(ins); switch (bcmode_b(op)) { case BCMvar: USE_SLOT(bc_b(ins)); break; default: break; } switch (bcmode_c(op)) { case BCMvar: USE_SLOT(bc_c(ins)); break; case BCMrbase: lua_assert(op == BC_CAT); for (s = bc_b(ins); s <= bc_c(ins); s++) USE_SLOT(s); for (; s < maxslot; s++) DEF_SLOT(s); break; case BCMjump: handle_jump: { BCReg minslot = bc_a(ins); if (op >= BC_FORI && op <= BC_JFORL) minslot += FORL_EXT; else if (op >= BC_ITERL && op <= BC_JITERL) minslot += bc_b(pc[-2])-1; else if (op == BC_UCLO) { pc += bc_j(ins); break; } for (s = minslot; s < maxslot; s++) DEF_SLOT(s); return minslot < maxslot ? minslot : maxslot; } case BCMlit: if (op == BC_JFORL || op == BC_JITERL || op == BC_JLOOP) { goto handle_jump; } else if (bc_isret(op)) { BCReg top = op == BC_RETM ? maxslot : (bc_a(ins) + bc_d(ins)-1); for (s = 0; s < bc_a(ins); s++) DEF_SLOT(s); for (; s < top; s++) USE_SLOT(s); for (; s < maxslot; s++) DEF_SLOT(s); return 0; } break; case BCMfunc: return maxslot; /* NYI: will abort, anyway. */ default: break; } switch (bcmode_a(op)) { case BCMvar: USE_SLOT(bc_a(ins)); break; case BCMdst: if (!(op == BC_ISTC || op == BC_ISFC)) DEF_SLOT(bc_a(ins)); break; case BCMbase: if (op >= BC_CALLM && op <= BC_VARG) { BCReg top = (op == BC_CALLM || op == BC_CALLMT || bc_c(ins) == 0) ? maxslot : (bc_a(ins) + bc_c(ins)); s = bc_a(ins) - ((op == BC_ITERC || op == BC_ITERN) ? 3 : 0); for (; s < top; s++) USE_SLOT(s); for (; s < maxslot; s++) DEF_SLOT(s); if (op == BC_CALLT || op == BC_CALLMT) { for (s = 0; s < bc_a(ins); s++) DEF_SLOT(s); return 0; } } else if (op == BC_KNIL) { for (s = bc_a(ins); s <= bc_d(ins); s++) DEF_SLOT(s); } else if (op == BC_TSETM) { for (s = bc_a(ins)-1; s < maxslot; s++) USE_SLOT(s); } break; default: break; } lua_assert(pc >= proto_bc(J->pt) && pc < proto_bc(J->pt) + J->pt->sizebc); } #undef USE_SLOT #undef DEF_SLOT return 0; /* unreachable */ } /* Purge dead slots before the next snapshot. */ void lj_snap_purge(jit_State *J) { uint8_t udf[SNAP_USEDEF_SLOTS]; BCReg maxslot = J->maxslot; BCReg s = snap_usedef(J, udf, J->pc, maxslot); for (; s < maxslot; s++) if (udf[s] != 0) J->base[s] = 0; /* Purge dead slots. */ } /* Shrink last snapshot. */ void lj_snap_shrink(jit_State *J) { SnapShot *snap = &J->cur.snap[J->cur.nsnap-1]; SnapEntry *map = &J->cur.snapmap[snap->mapofs]; MSize n, m, nlim, nent = snap->nent; uint8_t udf[SNAP_USEDEF_SLOTS]; BCReg maxslot = J->maxslot; BCReg minslot = snap_usedef(J, udf, snap_pc(map[nent]), maxslot); BCReg baseslot = J->baseslot; maxslot += baseslot; minslot += baseslot; snap->nslots = (uint8_t)maxslot; for (n = m = 0; n < nent; n++) { /* Remove unused slots from snapshot. */ BCReg s = snap_slot(map[n]); if (s < minslot || (s < maxslot && udf[s-baseslot] == 0)) map[m++] = map[n]; /* Only copy used slots. */ } snap->nent = (uint8_t)m; nlim = J->cur.nsnapmap - snap->mapofs - 1; while (n <= nlim) map[m++] = map[n++]; /* Move PC + frame links down. */ J->cur.nsnapmap = (uint16_t)(snap->mapofs + m); /* Free up space in map. */ } /* -- Snapshot access ----------------------------------------------------- */ /* Initialize a Bloom Filter with all renamed refs. ** There are very few renames (often none), so the filter has ** very few bits set. This makes it suitable for negative filtering. */ static BloomFilter snap_renamefilter(GCtrace *T, SnapNo lim) { BloomFilter rfilt = 0; IRIns *ir; for (ir = &T->ir[T->nins-1]; ir->o == IR_RENAME; ir--) if (ir->op2 <= lim) bloomset(rfilt, ir->op1); return rfilt; } /* Process matching renames to find the original RegSP. */ static RegSP snap_renameref(GCtrace *T, SnapNo lim, IRRef ref, RegSP rs) { IRIns *ir; for (ir = &T->ir[T->nins-1]; ir->o == IR_RENAME; ir--) if (ir->op1 == ref && ir->op2 <= lim) rs = ir->prev; return rs; } /* Copy RegSP from parent snapshot to the parent links of the IR. */ IRIns *lj_snap_regspmap(GCtrace *T, SnapNo snapno, IRIns *ir) { SnapShot *snap = &T->snap[snapno]; SnapEntry *map = &T->snapmap[snap->mapofs]; BloomFilter rfilt = snap_renamefilter(T, snapno); MSize n = 0; IRRef ref = 0; for ( ; ; ir++) { uint32_t rs; if (ir->o == IR_SLOAD) { if (!(ir->op2 & IRSLOAD_PARENT)) break; for ( ; ; n++) { lua_assert(n < snap->nent); if (snap_slot(map[n]) == ir->op1) { ref = snap_ref(map[n++]); break; } } } else if (LJ_SOFTFP && ir->o == IR_HIOP) { ref++; } else if (ir->o == IR_PVAL) { ref = ir->op1 + REF_BIAS; } else { break; } rs = T->ir[ref].prev; if (bloomtest(rfilt, ref)) rs = snap_renameref(T, snapno, ref, rs); ir->prev = (uint16_t)rs; lua_assert(regsp_used(rs)); } return ir; } /* -- Snapshot replay ----------------------------------------------------- */ /* Replay constant from parent trace. */ static TRef snap_replay_const(jit_State *J, IRIns *ir) { /* Only have to deal with constants that can occur in stack slots. */ switch ((IROp)ir->o) { case IR_KPRI: return TREF_PRI(irt_type(ir->t)); case IR_KINT: return lj_ir_kint(J, ir->i); case IR_KGC: return lj_ir_kgc(J, ir_kgc(ir), irt_t(ir->t)); case IR_KNUM: return lj_ir_k64(J, IR_KNUM, ir_knum(ir)); case IR_KINT64: return lj_ir_k64(J, IR_KINT64, ir_kint64(ir)); case IR_KPTR: return lj_ir_kptr(J, ir_kptr(ir)); /* Continuation. */ default: lua_assert(0); return TREF_NIL; break; } } /* De-duplicate parent reference. */ static TRef snap_dedup(jit_State *J, SnapEntry *map, MSize nmax, IRRef ref) { MSize j; for (j = 0; j < nmax; j++) if (snap_ref(map[j]) == ref) return J->slot[snap_slot(map[j])] & ~(SNAP_CONT|SNAP_FRAME); return 0; } /* Emit parent reference with de-duplication. */ static TRef snap_pref(jit_State *J, GCtrace *T, SnapEntry *map, MSize nmax, BloomFilter seen, IRRef ref) { IRIns *ir = &T->ir[ref]; TRef tr; if (irref_isk(ref)) tr = snap_replay_const(J, ir); else if (!regsp_used(ir->prev)) tr = 0; else if (!bloomtest(seen, ref) || (tr = snap_dedup(J, map, nmax, ref)) == 0) tr = emitir(IRT(IR_PVAL, irt_type(ir->t)), ref - REF_BIAS, 0); return tr; } /* Check whether a sunk store corresponds to an allocation. Slow path. */ static int snap_sunk_store2(jit_State *J, IRIns *ira, IRIns *irs) { if (irs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTORE || irs->o == IR_XSTORE) { IRIns *irk = IR(irs->op1); if (irk->o == IR_AREF || irk->o == IR_HREFK) irk = IR(irk->op1); return (IR(irk->op1) == ira); } return 0; } /* Check whether a sunk store corresponds to an allocation. Fast path. */ static LJ_AINLINE int snap_sunk_store(jit_State *J, IRIns *ira, IRIns *irs) { if (irs->s != 255) return (ira + irs->s == irs); /* Fast check. */ return snap_sunk_store2(J, ira, irs); } /* Replay snapshot state to setup side trace. */ void lj_snap_replay(jit_State *J, GCtrace *T) { SnapShot *snap = &T->snap[J->exitno]; SnapEntry *map = &T->snapmap[snap->mapofs]; MSize n, nent = snap->nent; BloomFilter seen = 0; int pass23 = 0; J->framedepth = 0; /* Emit IR for slots inherited from parent snapshot. */ for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; BCReg s = snap_slot(sn); IRRef ref = snap_ref(sn); IRIns *ir = &T->ir[ref]; TRef tr; /* The bloom filter avoids O(nent^2) overhead for de-duping slots. */ if (bloomtest(seen, ref) && (tr = snap_dedup(J, map, n, ref)) != 0) goto setslot; bloomset(seen, ref); if (irref_isk(ref)) { tr = snap_replay_const(J, ir); } else if (!regsp_used(ir->prev)) { pass23 = 1; lua_assert(s != 0); tr = s; } else { IRType t = irt_type(ir->t); uint32_t mode = IRSLOAD_INHERIT|IRSLOAD_PARENT; if (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM)) t = IRT_NUM; if (ir->o == IR_SLOAD) mode |= (ir->op2 & IRSLOAD_READONLY); tr = emitir_raw(IRT(IR_SLOAD, t), s, mode); } setslot: J->slot[s] = tr | (sn&(SNAP_CONT|SNAP_FRAME)); /* Same as TREF_* flags. */ J->framedepth += ((sn & (SNAP_CONT|SNAP_FRAME)) && s); if ((sn & SNAP_FRAME)) J->baseslot = s+1; } if (pass23) { IRIns *irlast = &T->ir[snap->ref]; pass23 = 0; /* Emit dependent PVALs. */ for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; IRRef refp = snap_ref(sn); IRIns *ir = &T->ir[refp]; if (regsp_reg(ir->r) == RID_SUNK) { if (J->slot[snap_slot(sn)] != snap_slot(sn)) continue; pass23 = 1; lua_assert(ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW || ir->o == IR_CNEWI); if (ir->op1 >= T->nk) snap_pref(J, T, map, nent, seen, ir->op1); if (ir->op2 >= T->nk) snap_pref(J, T, map, nent, seen, ir->op2); if (LJ_HASFFI && ir->o == IR_CNEWI) { if (LJ_32 && refp+1 < T->nins && (ir+1)->o == IR_HIOP) snap_pref(J, T, map, nent, seen, (ir+1)->op2); } else { IRIns *irs; for (irs = ir+1; irs < irlast; irs++) if (irs->r == RID_SINK && snap_sunk_store(J, ir, irs)) { if (snap_pref(J, T, map, nent, seen, irs->op2) == 0) snap_pref(J, T, map, nent, seen, T->ir[irs->op2].op1); else if ((LJ_SOFTFP || (LJ_32 && LJ_HASFFI)) && irs+1 < irlast && (irs+1)->o == IR_HIOP) snap_pref(J, T, map, nent, seen, (irs+1)->op2); } } } else if (!irref_isk(refp) && !regsp_used(ir->prev)) { lua_assert(ir->o == IR_CONV && ir->op2 == IRCONV_NUM_INT); J->slot[snap_slot(sn)] = snap_pref(J, T, map, nent, seen, ir->op1); } } /* Replay sunk instructions. */ for (n = 0; pass23 && n < nent; n++) { SnapEntry sn = map[n]; IRRef refp = snap_ref(sn); IRIns *ir = &T->ir[refp]; if (regsp_reg(ir->r) == RID_SUNK) { TRef op1, op2; if (J->slot[snap_slot(sn)] != snap_slot(sn)) { /* De-dup allocs. */ J->slot[snap_slot(sn)] = J->slot[J->slot[snap_slot(sn)]]; continue; } op1 = ir->op1; if (op1 >= T->nk) op1 = snap_pref(J, T, map, nent, seen, op1); op2 = ir->op2; if (op2 >= T->nk) op2 = snap_pref(J, T, map, nent, seen, op2); if (LJ_HASFFI && ir->o == IR_CNEWI) { if (LJ_32 && refp+1 < T->nins && (ir+1)->o == IR_HIOP) { lj_needsplit(J); /* Emit joining HIOP. */ op2 = emitir_raw(IRT(IR_HIOP, IRT_I64), op2, snap_pref(J, T, map, nent, seen, (ir+1)->op2)); } J->slot[snap_slot(sn)] = emitir(ir->ot, op1, op2); } else { IRIns *irs; TRef tr = emitir(ir->ot, op1, op2); J->slot[snap_slot(sn)] = tr; for (irs = ir+1; irs < irlast; irs++) if (irs->r == RID_SINK && snap_sunk_store(J, ir, irs)) { IRIns *irr = &T->ir[irs->op1]; TRef val, key = irr->op2, tmp = tr; if (irr->o != IR_FREF) { IRIns *irk = &T->ir[key]; if (irr->o == IR_HREFK) key = lj_ir_kslot(J, snap_replay_const(J, &T->ir[irk->op1]), irk->op2); else key = snap_replay_const(J, irk); if (irr->o == IR_HREFK || irr->o == IR_AREF) { IRIns *irf = &T->ir[irr->op1]; tmp = emitir(irf->ot, tmp, irf->op2); } } tmp = emitir(irr->ot, tmp, key); val = snap_pref(J, T, map, nent, seen, irs->op2); if (val == 0) { IRIns *irc = &T->ir[irs->op2]; lua_assert(irc->o == IR_CONV && irc->op2 == IRCONV_NUM_INT); val = snap_pref(J, T, map, nent, seen, irc->op1); val = emitir(IRTN(IR_CONV), val, IRCONV_NUM_INT); } else if ((LJ_SOFTFP || (LJ_32 && LJ_HASFFI)) && irs+1 < irlast && (irs+1)->o == IR_HIOP) { IRType t = IRT_I64; if (LJ_SOFTFP && irt_type((irs+1)->t) == IRT_SOFTFP) t = IRT_NUM; lj_needsplit(J); if (irref_isk(irs->op2) && irref_isk((irs+1)->op2)) { uint64_t k = (uint32_t)T->ir[irs->op2].i + ((uint64_t)T->ir[(irs+1)->op2].i << 32); val = lj_ir_k64(J, t == IRT_I64 ? IR_KINT64 : IR_KNUM, lj_ir_k64_find(J, k)); } else { val = emitir_raw(IRT(IR_HIOP, t), val, snap_pref(J, T, map, nent, seen, (irs+1)->op2)); } tmp = emitir(IRT(irs->o, t), tmp, val); continue; } tmp = emitir(irs->ot, tmp, val); } else if (LJ_HASFFI && irs->o == IR_XBAR && ir->o == IR_CNEW) { emitir(IRT(IR_XBAR, IRT_NIL), 0, 0); } } } } } J->base = J->slot + J->baseslot; J->maxslot = snap->nslots - J->baseslot; lj_snap_add(J); if (pass23) /* Need explicit GC step _after_ initial snapshot. */ emitir_raw(IRTG(IR_GCSTEP, IRT_NIL), 0, 0); } /* -- Snapshot restore ---------------------------------------------------- */ static void snap_unsink(jit_State *J, GCtrace *T, ExitState *ex, SnapNo snapno, BloomFilter rfilt, IRIns *ir, TValue *o); /* Restore a value from the trace exit state. */ static void snap_restoreval(jit_State *J, GCtrace *T, ExitState *ex, SnapNo snapno, BloomFilter rfilt, IRRef ref, TValue *o) { IRIns *ir = &T->ir[ref]; IRType1 t = ir->t; RegSP rs = ir->prev; if (irref_isk(ref)) { /* Restore constant slot. */ lj_ir_kvalue(J->L, o, ir); return; } if (LJ_UNLIKELY(bloomtest(rfilt, ref))) rs = snap_renameref(T, snapno, ref, rs); if (ra_hasspill(regsp_spill(rs))) { /* Restore from spill slot. */ int32_t *sps = &ex->spill[regsp_spill(rs)]; if (irt_isinteger(t)) { setintV(o, *sps); #if !LJ_SOFTFP } else if (irt_isnum(t)) { o->u64 = *(uint64_t *)sps; #endif } else if (LJ_64 && irt_islightud(t)) { /* 64 bit lightuserdata which may escape already has the tag bits. */ o->u64 = *(uint64_t *)sps; } else { lua_assert(!irt_ispri(t)); /* PRI refs never have a spill slot. */ setgcrefi(o->gcr, *sps); setitype(o, irt_toitype(t)); } } else { /* Restore from register. */ Reg r = regsp_reg(rs); if (ra_noreg(r)) { lua_assert(ir->o == IR_CONV && ir->op2 == IRCONV_NUM_INT); snap_restoreval(J, T, ex, snapno, rfilt, ir->op1, o); if (LJ_DUALNUM) setnumV(o, (lua_Number)intV(o)); return; } else if (irt_isinteger(t)) { setintV(o, (int32_t)ex->gpr[r-RID_MIN_GPR]); #if !LJ_SOFTFP } else if (irt_isnum(t)) { setnumV(o, ex->fpr[r-RID_MIN_FPR]); #endif } else if (LJ_64 && irt_islightud(t)) { /* 64 bit lightuserdata which may escape already has the tag bits. */ o->u64 = ex->gpr[r-RID_MIN_GPR]; } else { if (!irt_ispri(t)) setgcrefi(o->gcr, ex->gpr[r-RID_MIN_GPR]); setitype(o, irt_toitype(t)); } } } #if LJ_HASFFI /* Restore raw data from the trace exit state. */ static void snap_restoredata(GCtrace *T, ExitState *ex, SnapNo snapno, BloomFilter rfilt, IRRef ref, void *dst, CTSize sz) { IRIns *ir = &T->ir[ref]; RegSP rs = ir->prev; int32_t *src; uint64_t tmp; if (irref_isk(ref)) { if (ir->o == IR_KNUM || ir->o == IR_KINT64) { src = mref(ir->ptr, int32_t); } else if (sz == 8) { tmp = (uint64_t)(uint32_t)ir->i; src = (int32_t *)&tmp; } else { src = &ir->i; } } else { if (LJ_UNLIKELY(bloomtest(rfilt, ref))) rs = snap_renameref(T, snapno, ref, rs); if (ra_hasspill(regsp_spill(rs))) { src = &ex->spill[regsp_spill(rs)]; if (sz == 8 && !irt_is64(ir->t)) { tmp = (uint64_t)(uint32_t)*src; src = (int32_t *)&tmp; } } else { Reg r = regsp_reg(rs); if (ra_noreg(r)) { /* Note: this assumes CNEWI is never used for SOFTFP split numbers. */ lua_assert(sz == 8 && ir->o == IR_CONV && ir->op2 == IRCONV_NUM_INT); snap_restoredata(T, ex, snapno, rfilt, ir->op1, dst, 4); *(lua_Number *)dst = (lua_Number)*(int32_t *)dst; return; } src = (int32_t *)&ex->gpr[r-RID_MIN_GPR]; #if !LJ_SOFTFP if (r >= RID_MAX_GPR) { src = (int32_t *)&ex->fpr[r-RID_MIN_FPR]; #if LJ_TARGET_PPC if (sz == 4) { /* PPC FPRs are always doubles. */ *(float *)dst = (float)*(double *)src; return; } #else if (LJ_BE && sz == 4) src++; #endif } #endif } } lua_assert(sz == 1 || sz == 2 || sz == 4 || sz == 8); if (sz == 4) *(int32_t *)dst = *src; else if (sz == 8) *(int64_t *)dst = *(int64_t *)src; else if (sz == 1) *(int8_t *)dst = (int8_t)*src; else *(int16_t *)dst = (int16_t)*src; } #endif /* Unsink allocation from the trace exit state. Unsink sunk stores. */ static void snap_unsink(jit_State *J, GCtrace *T, ExitState *ex, SnapNo snapno, BloomFilter rfilt, IRIns *ir, TValue *o) { lua_assert(ir->o == IR_TNEW || ir->o == IR_TDUP || ir->o == IR_CNEW || ir->o == IR_CNEWI); #if LJ_HASFFI if (ir->o == IR_CNEW || ir->o == IR_CNEWI) { CTState *cts = ctype_ctsG(J2G(J)); CTypeID id = (CTypeID)T->ir[ir->op1].i; CTSize sz = lj_ctype_size(cts, id); GCcdata *cd = lj_cdata_new(cts, id, sz); setcdataV(J->L, o, cd); if (ir->o == IR_CNEWI) { uint8_t *p = (uint8_t *)cdataptr(cd); lua_assert(sz == 4 || sz == 8); if (LJ_32 && sz == 8 && ir+1 < T->ir + T->nins && (ir+1)->o == IR_HIOP) { snap_restoredata(T, ex, snapno, rfilt, (ir+1)->op2, LJ_LE?p+4:p, 4); if (LJ_BE) p += 4; sz = 4; } snap_restoredata(T, ex, snapno, rfilt, ir->op2, p, sz); } else { IRIns *irs, *irlast = &T->ir[T->snap[snapno].ref]; for (irs = ir+1; irs < irlast; irs++) if (irs->r == RID_SINK && snap_sunk_store(J, ir, irs)) { IRIns *iro = &T->ir[T->ir[irs->op1].op2]; uint8_t *p = (uint8_t *)cd; CTSize szs; lua_assert(irs->o == IR_XSTORE && T->ir[irs->op1].o == IR_ADD); lua_assert(iro->o == IR_KINT || iro->o == IR_KINT64); if (irt_is64(irs->t)) szs = 8; else if (irt_isi8(irs->t) || irt_isu8(irs->t)) szs = 1; else if (irt_isi16(irs->t) || irt_isu16(irs->t)) szs = 2; else szs = 4; if (LJ_64 && iro->o == IR_KINT64) p += (int64_t)ir_k64(iro)->u64; else p += iro->i; lua_assert(p >= (uint8_t *)cdataptr(cd) && p + szs <= (uint8_t *)cdataptr(cd) + sz); if (LJ_32 && irs+1 < T->ir + T->nins && (irs+1)->o == IR_HIOP) { lua_assert(szs == 4); snap_restoredata(T, ex, snapno, rfilt, (irs+1)->op2, LJ_LE?p+4:p,4); if (LJ_BE) p += 4; } snap_restoredata(T, ex, snapno, rfilt, irs->op2, p, szs); } } } else #endif { IRIns *irs, *irlast; GCtab *t = ir->o == IR_TNEW ? lj_tab_new(J->L, ir->op1, ir->op2) : lj_tab_dup(J->L, ir_ktab(&T->ir[ir->op1])); settabV(J->L, o, t); irlast = &T->ir[T->snap[snapno].ref]; for (irs = ir+1; irs < irlast; irs++) if (irs->r == RID_SINK && snap_sunk_store(J, ir, irs)) { IRIns *irk = &T->ir[irs->op1]; TValue tmp, *val; lua_assert(irs->o == IR_ASTORE || irs->o == IR_HSTORE || irs->o == IR_FSTORE); if (irk->o == IR_FREF) { lua_assert(irk->op2 == IRFL_TAB_META); snap_restoreval(J, T, ex, snapno, rfilt, irs->op2, &tmp); /* NOBARRIER: The table is new (marked white). */ setgcref(t->metatable, obj2gco(tabV(&tmp))); } else { irk = &T->ir[irk->op2]; if (irk->o == IR_KSLOT) irk = &T->ir[irk->op1]; lj_ir_kvalue(J->L, &tmp, irk); val = lj_tab_set(J->L, t, &tmp); /* NOBARRIER: The table is new (marked white). */ snap_restoreval(J, T, ex, snapno, rfilt, irs->op2, val); if (LJ_SOFTFP && irs+1 < T->ir + T->nins && (irs+1)->o == IR_HIOP) { snap_restoreval(J, T, ex, snapno, rfilt, (irs+1)->op2, &tmp); val->u32.hi = tmp.u32.lo; } } } } } /* Restore interpreter state from exit state with the help of a snapshot. */ const BCIns *lj_snap_restore(jit_State *J, void *exptr) { ExitState *ex = (ExitState *)exptr; SnapNo snapno = J->exitno; /* For now, snapno == exitno. */ GCtrace *T = traceref(J, J->parent); SnapShot *snap = &T->snap[snapno]; MSize n, nent = snap->nent; SnapEntry *map = &T->snapmap[snap->mapofs]; SnapEntry *flinks = &T->snapmap[snap_nextofs(T, snap)-1]; int32_t ftsz0; TValue *frame; BloomFilter rfilt = snap_renamefilter(T, snapno); const BCIns *pc = snap_pc(map[nent]); lua_State *L = J->L; /* Set interpreter PC to the next PC to get correct error messages. */ setcframe_pc(cframe_raw(L->cframe), pc+1); /* Make sure the stack is big enough for the slots from the snapshot. */ if (LJ_UNLIKELY(L->base + snap->topslot >= tvref(L->maxstack))) { L->top = curr_topL(L); lj_state_growstack(L, snap->topslot - curr_proto(L)->framesize); } /* Fill stack slots with data from the registers and spill slots. */ frame = L->base-1; ftsz0 = frame_ftsz(frame); /* Preserve link to previous frame in slot #0. */ for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; if (!(sn & SNAP_NORESTORE)) { TValue *o = &frame[snap_slot(sn)]; IRRef ref = snap_ref(sn); IRIns *ir = &T->ir[ref]; if (ir->r == RID_SUNK) { MSize j; for (j = 0; j < n; j++) if (snap_ref(map[j]) == ref) { /* De-duplicate sunk allocations. */ copyTV(L, o, &frame[snap_slot(map[j])]); goto dupslot; } snap_unsink(J, T, ex, snapno, rfilt, ir, o); dupslot: continue; } snap_restoreval(J, T, ex, snapno, rfilt, ref, o); if (LJ_SOFTFP && (sn & SNAP_SOFTFPNUM) && tvisint(o)) { TValue tmp; snap_restoreval(J, T, ex, snapno, rfilt, ref+1, &tmp); o->u32.hi = tmp.u32.lo; } else if ((sn & (SNAP_CONT|SNAP_FRAME))) { /* Overwrite tag with frame link. */ o->fr.tp.ftsz = snap_slot(sn) != 0 ? (int32_t)*flinks-- : ftsz0; L->base = o+1; } } } lua_assert(map + nent == flinks); /* Compute current stack top. */ switch (bc_op(*pc)) { default: if (bc_op(*pc) < BC_FUNCF) { L->top = curr_topL(L); break; } /* fallthrough */ case BC_CALLM: case BC_CALLMT: case BC_RETM: case BC_TSETM: L->top = frame + snap->nslots; break; } return pc; } #undef IR #undef emitir_raw #undef emitir #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_lib.h0000664000000000000000000000703512202141143021767 0ustar rootroot/* ** Library function support. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_LIB_H #define _LJ_LIB_H #include "lj_obj.h" /* ** A fallback handler is called by the assembler VM if the fast path fails: ** ** - too few arguments: unrecoverable. ** - wrong argument type: recoverable, if coercion succeeds. ** - bad argument value: unrecoverable. ** - stack overflow: recoverable, if stack reallocation succeeds. ** - extra handling: recoverable. ** ** The unrecoverable cases throw an error with lj_err_arg(), lj_err_argtype(), ** lj_err_caller() or lj_err_callermsg(). ** The recoverable cases return 0 or the number of results + 1. ** The assembler VM retries the fast path only if 0 is returned. ** This time the fallback must not be called again or it gets stuck in a loop. */ /* Return values from fallback handler. */ #define FFH_RETRY 0 #define FFH_UNREACHABLE FFH_RETRY #define FFH_RES(n) ((n)+1) #define FFH_TAILCALL (-1) LJ_FUNC TValue *lj_lib_checkany(lua_State *L, int narg); LJ_FUNC GCstr *lj_lib_checkstr(lua_State *L, int narg); LJ_FUNC GCstr *lj_lib_optstr(lua_State *L, int narg); #if LJ_DUALNUM LJ_FUNC void lj_lib_checknumber(lua_State *L, int narg); #else #define lj_lib_checknumber(L, narg) lj_lib_checknum((L), (narg)) #endif LJ_FUNC lua_Number lj_lib_checknum(lua_State *L, int narg); LJ_FUNC int32_t lj_lib_checkint(lua_State *L, int narg); LJ_FUNC int32_t lj_lib_optint(lua_State *L, int narg, int32_t def); LJ_FUNC int32_t lj_lib_checkbit(lua_State *L, int narg); LJ_FUNC GCfunc *lj_lib_checkfunc(lua_State *L, int narg); LJ_FUNC GCtab *lj_lib_checktab(lua_State *L, int narg); LJ_FUNC GCtab *lj_lib_checktabornil(lua_State *L, int narg); LJ_FUNC int lj_lib_checkopt(lua_State *L, int narg, int def, const char *lst); /* Avoid including lj_frame.h. */ #define lj_lib_upvalue(L, n) \ (&gcref((L->base-1)->fr.func)->fn.c.upvalue[(n)-1]) #if LJ_TARGET_WINDOWS #define lj_lib_checkfpu(L) \ do { setnumV(L->top++, (lua_Number)1437217655); \ if (lua_tointeger(L, -1) != 1437217655) lj_err_caller(L, LJ_ERR_BADFPU); \ L->top--; } while (0) #else #define lj_lib_checkfpu(L) UNUSED(L) #endif /* Push internal function on the stack. */ static LJ_AINLINE void lj_lib_pushcc(lua_State *L, lua_CFunction f, int id, int n) { GCfunc *fn; lua_pushcclosure(L, f, n); fn = funcV(L->top-1); fn->c.ffid = (uint8_t)id; setmref(fn->c.pc, &G(L)->bc_cfunc_int); } #define lj_lib_pushcf(L, fn, id) (lj_lib_pushcc(L, (fn), (id), 0)) /* Library function declarations. Scanned by buildvm. */ #define LJLIB_CF(name) static int lj_cf_##name(lua_State *L) #define LJLIB_ASM(name) static int lj_ffh_##name(lua_State *L) #define LJLIB_ASM_(name) #define LJLIB_SET(name) #define LJLIB_PUSH(arg) #define LJLIB_REC(handler) #define LJLIB_NOREGUV #define LJLIB_NOREG #define LJ_LIB_REG(L, regname, name) \ lj_lib_register(L, regname, lj_lib_init_##name, lj_lib_cf_##name) LJ_FUNC void lj_lib_register(lua_State *L, const char *libname, const uint8_t *init, const lua_CFunction *cf); /* Library init data tags. */ #define LIBINIT_LENMASK 0x3f #define LIBINIT_TAGMASK 0xc0 #define LIBINIT_CF 0x00 #define LIBINIT_ASM 0x40 #define LIBINIT_ASM_ 0x80 #define LIBINIT_STRING 0xc0 #define LIBINIT_MAXSTR 0x39 #define LIBINIT_SET 0xfa #define LIBINIT_NUMBER 0xfb #define LIBINIT_COPY 0xfc #define LIBINIT_LASTCL 0xfd #define LIBINIT_FFID 0xfe #define LIBINIT_END 0xff /* Exported library functions. */ typedef struct RandomState RandomState; LJ_FUNC uint64_t LJ_FASTCALL lj_math_random_step(RandomState *rs); #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_alloc.c0000664000000000000000000011652612231715321022323 0ustar rootroot/* ** Bundled memory allocator. ** ** Beware: this is a HEAVILY CUSTOMIZED version of dlmalloc. ** The original bears the following remark: ** ** This is a version (aka dlmalloc) of malloc/free/realloc written by ** Doug Lea and released to the public domain, as explained at ** http://creativecommons.org/licenses/publicdomain. ** ** * Version pre-2.8.4 Wed Mar 29 19:46:29 2006 (dl at gee) ** ** No additional copyright is claimed over the customizations. ** Please do NOT bother the original author about this version here! ** ** If you want to use dlmalloc in another project, you should get ** the original from: ftp://gee.cs.oswego.edu/pub/misc/ ** For thread-safe derivatives, take a look at: ** - ptmalloc: http://www.malloc.de/ ** - nedmalloc: http://www.nedprod.com/programs/portable/nedmalloc/ */ #define lj_alloc_c #define LUA_CORE /* To get the mremap prototype. Must be defined before any system includes. */ #if defined(__linux__) && !defined(_GNU_SOURCE) #define _GNU_SOURCE #endif #include "lj_def.h" #include "lj_arch.h" #include "lj_alloc.h" #ifndef LUAJIT_USE_SYSMALLOC #define MAX_SIZE_T (~(size_t)0) #define MALLOC_ALIGNMENT ((size_t)8U) #define DEFAULT_GRANULARITY ((size_t)128U * (size_t)1024U) #define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) #define DEFAULT_MMAP_THRESHOLD ((size_t)128U * (size_t)1024U) #define MAX_RELEASE_CHECK_RATE 255 /* ------------------- size_t and alignment properties -------------------- */ /* The byte and bit size of a size_t */ #define SIZE_T_SIZE (sizeof(size_t)) #define SIZE_T_BITSIZE (sizeof(size_t) << 3) /* Some constants coerced to size_t */ /* Annoying but necessary to avoid errors on some platforms */ #define SIZE_T_ZERO ((size_t)0) #define SIZE_T_ONE ((size_t)1) #define SIZE_T_TWO ((size_t)2) #define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1) #define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2) #define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES) /* The bit mask value corresponding to MALLOC_ALIGNMENT */ #define CHUNK_ALIGN_MASK (MALLOC_ALIGNMENT - SIZE_T_ONE) /* the number of bytes to offset an address to align it */ #define align_offset(A)\ ((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\ ((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK)) /* -------------------------- MMAP support ------------------------------- */ #define MFAIL ((void *)(MAX_SIZE_T)) #define CMFAIL ((char *)(MFAIL)) /* defined for convenience */ #define IS_DIRECT_BIT (SIZE_T_ONE) #if LJ_TARGET_WINDOWS #define WIN32_LEAN_AND_MEAN #include #if LJ_64 /* Undocumented, but hey, that's what we all love so much about Windows. */ typedef long (*PNTAVM)(HANDLE handle, void **addr, ULONG zbits, size_t *size, ULONG alloctype, ULONG prot); static PNTAVM ntavm; /* Number of top bits of the lower 32 bits of an address that must be zero. ** Apparently 0 gives us full 64 bit addresses and 1 gives us the lower 2GB. */ #define NTAVM_ZEROBITS 1 static void INIT_MMAP(void) { ntavm = (PNTAVM)GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtAllocateVirtualMemory"); } /* Win64 32 bit MMAP via NtAllocateVirtualMemory. */ static LJ_AINLINE void *CALL_MMAP(size_t size) { DWORD olderr = GetLastError(); void *ptr = NULL; long st = ntavm(INVALID_HANDLE_VALUE, &ptr, NTAVM_ZEROBITS, &size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); SetLastError(olderr); return st == 0 ? ptr : MFAIL; } /* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ static LJ_AINLINE void *DIRECT_MMAP(size_t size) { DWORD olderr = GetLastError(); void *ptr = NULL; long st = ntavm(INVALID_HANDLE_VALUE, &ptr, NTAVM_ZEROBITS, &size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, PAGE_READWRITE); SetLastError(olderr); return st == 0 ? ptr : MFAIL; } #else #define INIT_MMAP() ((void)0) /* Win32 MMAP via VirtualAlloc */ static LJ_AINLINE void *CALL_MMAP(size_t size) { DWORD olderr = GetLastError(); void *ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); SetLastError(olderr); return ptr ? ptr : MFAIL; } /* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ static LJ_AINLINE void *DIRECT_MMAP(size_t size) { DWORD olderr = GetLastError(); void *ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, PAGE_READWRITE); SetLastError(olderr); return ptr ? ptr : MFAIL; } #endif /* This function supports releasing coalesed segments */ static LJ_AINLINE int CALL_MUNMAP(void *ptr, size_t size) { DWORD olderr = GetLastError(); MEMORY_BASIC_INFORMATION minfo; char *cptr = (char *)ptr; while (size) { if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0) return -1; if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr || minfo.State != MEM_COMMIT || minfo.RegionSize > size) return -1; if (VirtualFree(cptr, 0, MEM_RELEASE) == 0) return -1; cptr += minfo.RegionSize; size -= minfo.RegionSize; } SetLastError(olderr); return 0; } #else #include #include #define MMAP_PROT (PROT_READ|PROT_WRITE) #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) #define MAP_ANONYMOUS MAP_ANON #endif #define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS) #if LJ_64 /* 64 bit mode needs special support for allocating memory in the lower 2GB. */ #if defined(MAP_32BIT) /* Actually this only gives us max. 1GB in current Linux kernels. */ static LJ_AINLINE void *CALL_MMAP(size_t size) { int olderr = errno; void *ptr = mmap(NULL, size, MMAP_PROT, MAP_32BIT|MMAP_FLAGS, -1, 0); errno = olderr; return ptr; } #elif LJ_TARGET_OSX || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun__) /* OSX and FreeBSD mmap() use a naive first-fit linear search. ** That's perfect for us. Except that -pagezero_size must be set for OSX, ** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs ** to be reduced to 250MB on FreeBSD. */ #if LJ_TARGET_OSX #define MMAP_REGION_START ((uintptr_t)0x10000) #else #define MMAP_REGION_START ((uintptr_t)0x10000000) #endif #define MMAP_REGION_END ((uintptr_t)0x80000000) #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #endif static LJ_AINLINE void *CALL_MMAP(size_t size) { int olderr = errno; /* Hint for next allocation. Doesn't need to be thread-safe. */ static uintptr_t alloc_hint = MMAP_REGION_START; int retry = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) static int rlimit_modified = 0; if (LJ_UNLIKELY(rlimit_modified == 0)) { struct rlimit rlim; rlim.rlim_cur = rlim.rlim_max = MMAP_REGION_START; setrlimit(RLIMIT_DATA, &rlim); /* Ignore result. May fail below. */ rlimit_modified = 1; } #endif for (;;) { void *p = mmap((void *)alloc_hint, size, MMAP_PROT, MMAP_FLAGS, -1, 0); if ((uintptr_t)p >= MMAP_REGION_START && (uintptr_t)p + size < MMAP_REGION_END) { alloc_hint = (uintptr_t)p + size; errno = olderr; return p; } if (p != CMFAIL) munmap(p, size); #ifdef __sun__ alloc_hint += 0x1000000; /* Need near-exhaustive linear scan. */ if (alloc_hint + size < MMAP_REGION_END) continue; #endif if (retry) break; retry = 1; alloc_hint = MMAP_REGION_START; } errno = olderr; return CMFAIL; } #else #error "NYI: need an equivalent of MAP_32BIT for this 64 bit OS" #endif #else /* 32 bit mode is easy. */ static LJ_AINLINE void *CALL_MMAP(size_t size) { int olderr = errno; void *ptr = mmap(NULL, size, MMAP_PROT, MMAP_FLAGS, -1, 0); errno = olderr; return ptr; } #endif #define INIT_MMAP() ((void)0) #define DIRECT_MMAP(s) CALL_MMAP(s) static LJ_AINLINE int CALL_MUNMAP(void *ptr, size_t size) { int olderr = errno; int ret = munmap(ptr, size); errno = olderr; return ret; } #if LJ_TARGET_LINUX /* Need to define _GNU_SOURCE to get the mremap prototype. */ static LJ_AINLINE void *CALL_MREMAP_(void *ptr, size_t osz, size_t nsz, int flags) { int olderr = errno; ptr = mremap(ptr, osz, nsz, flags); errno = olderr; return ptr; } #define CALL_MREMAP(addr, osz, nsz, mv) CALL_MREMAP_((addr), (osz), (nsz), (mv)) #define CALL_MREMAP_NOMOVE 0 #define CALL_MREMAP_MAYMOVE 1 #if LJ_64 #define CALL_MREMAP_MV CALL_MREMAP_NOMOVE #else #define CALL_MREMAP_MV CALL_MREMAP_MAYMOVE #endif #endif #endif #ifndef CALL_MREMAP #define CALL_MREMAP(addr, osz, nsz, mv) ((void)osz, MFAIL) #endif /* ----------------------- Chunk representations ------------------------ */ struct malloc_chunk { size_t prev_foot; /* Size of previous chunk (if free). */ size_t head; /* Size and inuse bits. */ struct malloc_chunk *fd; /* double links -- used only if free. */ struct malloc_chunk *bk; }; typedef struct malloc_chunk mchunk; typedef struct malloc_chunk *mchunkptr; typedef struct malloc_chunk *sbinptr; /* The type of bins of chunks */ typedef size_t bindex_t; /* Described below */ typedef unsigned int binmap_t; /* Described below */ typedef unsigned int flag_t; /* The type of various bit flag sets */ /* ------------------- Chunks sizes and alignments ----------------------- */ #define MCHUNK_SIZE (sizeof(mchunk)) #define CHUNK_OVERHEAD (SIZE_T_SIZE) /* Direct chunks need a second word of overhead ... */ #define DIRECT_CHUNK_OVERHEAD (TWO_SIZE_T_SIZES) /* ... and additional padding for fake next-chunk at foot */ #define DIRECT_FOOT_PAD (FOUR_SIZE_T_SIZES) /* The smallest size we can malloc is an aligned minimal chunk */ #define MIN_CHUNK_SIZE\ ((MCHUNK_SIZE + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) /* conversion from malloc headers to user pointers, and back */ #define chunk2mem(p) ((void *)((char *)(p) + TWO_SIZE_T_SIZES)) #define mem2chunk(mem) ((mchunkptr)((char *)(mem) - TWO_SIZE_T_SIZES)) /* chunk associated with aligned address A */ #define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A))) /* Bounds on request (not chunk) sizes. */ #define MAX_REQUEST ((~MIN_CHUNK_SIZE+1) << 2) #define MIN_REQUEST (MIN_CHUNK_SIZE - CHUNK_OVERHEAD - SIZE_T_ONE) /* pad request bytes into a usable size */ #define pad_request(req) \ (((req) + CHUNK_OVERHEAD + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) /* pad request, checking for minimum (but not maximum) */ #define request2size(req) \ (((req) < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(req)) /* ------------------ Operations on head and foot fields ----------------- */ #define PINUSE_BIT (SIZE_T_ONE) #define CINUSE_BIT (SIZE_T_TWO) #define INUSE_BITS (PINUSE_BIT|CINUSE_BIT) /* Head value for fenceposts */ #define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE) /* extraction of fields from head words */ #define cinuse(p) ((p)->head & CINUSE_BIT) #define pinuse(p) ((p)->head & PINUSE_BIT) #define chunksize(p) ((p)->head & ~(INUSE_BITS)) #define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT) #define clear_cinuse(p) ((p)->head &= ~CINUSE_BIT) /* Treat space at ptr +/- offset as a chunk */ #define chunk_plus_offset(p, s) ((mchunkptr)(((char *)(p)) + (s))) #define chunk_minus_offset(p, s) ((mchunkptr)(((char *)(p)) - (s))) /* Ptr to next or previous physical malloc_chunk. */ #define next_chunk(p) ((mchunkptr)(((char *)(p)) + ((p)->head & ~INUSE_BITS))) #define prev_chunk(p) ((mchunkptr)(((char *)(p)) - ((p)->prev_foot) )) /* extract next chunk's pinuse bit */ #define next_pinuse(p) ((next_chunk(p)->head) & PINUSE_BIT) /* Get/set size at footer */ #define get_foot(p, s) (((mchunkptr)((char *)(p) + (s)))->prev_foot) #define set_foot(p, s) (((mchunkptr)((char *)(p) + (s)))->prev_foot = (s)) /* Set size, pinuse bit, and foot */ #define set_size_and_pinuse_of_free_chunk(p, s)\ ((p)->head = (s|PINUSE_BIT), set_foot(p, s)) /* Set size, pinuse bit, foot, and clear next pinuse */ #define set_free_with_pinuse(p, s, n)\ (clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s)) #define is_direct(p)\ (!((p)->head & PINUSE_BIT) && ((p)->prev_foot & IS_DIRECT_BIT)) /* Get the internal overhead associated with chunk p */ #define overhead_for(p)\ (is_direct(p)? DIRECT_CHUNK_OVERHEAD : CHUNK_OVERHEAD) /* ---------------------- Overlaid data structures ----------------------- */ struct malloc_tree_chunk { /* The first four fields must be compatible with malloc_chunk */ size_t prev_foot; size_t head; struct malloc_tree_chunk *fd; struct malloc_tree_chunk *bk; struct malloc_tree_chunk *child[2]; struct malloc_tree_chunk *parent; bindex_t index; }; typedef struct malloc_tree_chunk tchunk; typedef struct malloc_tree_chunk *tchunkptr; typedef struct malloc_tree_chunk *tbinptr; /* The type of bins of trees */ /* A little helper macro for trees */ #define leftmost_child(t) ((t)->child[0] != 0? (t)->child[0] : (t)->child[1]) /* ----------------------------- Segments -------------------------------- */ struct malloc_segment { char *base; /* base address */ size_t size; /* allocated size */ struct malloc_segment *next; /* ptr to next segment */ }; typedef struct malloc_segment msegment; typedef struct malloc_segment *msegmentptr; /* ---------------------------- malloc_state ----------------------------- */ /* Bin types, widths and sizes */ #define NSMALLBINS (32U) #define NTREEBINS (32U) #define SMALLBIN_SHIFT (3U) #define SMALLBIN_WIDTH (SIZE_T_ONE << SMALLBIN_SHIFT) #define TREEBIN_SHIFT (8U) #define MIN_LARGE_SIZE (SIZE_T_ONE << TREEBIN_SHIFT) #define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE) #define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD) struct malloc_state { binmap_t smallmap; binmap_t treemap; size_t dvsize; size_t topsize; mchunkptr dv; mchunkptr top; size_t trim_check; size_t release_checks; mchunkptr smallbins[(NSMALLBINS+1)*2]; tbinptr treebins[NTREEBINS]; msegment seg; }; typedef struct malloc_state *mstate; #define is_initialized(M) ((M)->top != 0) /* -------------------------- system alloc setup ------------------------- */ /* page-align a size */ #define page_align(S)\ (((S) + (LJ_PAGESIZE - SIZE_T_ONE)) & ~(LJ_PAGESIZE - SIZE_T_ONE)) /* granularity-align a size */ #define granularity_align(S)\ (((S) + (DEFAULT_GRANULARITY - SIZE_T_ONE))\ & ~(DEFAULT_GRANULARITY - SIZE_T_ONE)) #if LJ_TARGET_WINDOWS #define mmap_align(S) granularity_align(S) #else #define mmap_align(S) page_align(S) #endif /* True if segment S holds address A */ #define segment_holds(S, A)\ ((char *)(A) >= S->base && (char *)(A) < S->base + S->size) /* Return segment holding given address */ static msegmentptr segment_holding(mstate m, char *addr) { msegmentptr sp = &m->seg; for (;;) { if (addr >= sp->base && addr < sp->base + sp->size) return sp; if ((sp = sp->next) == 0) return 0; } } /* Return true if segment contains a segment link */ static int has_segment_link(mstate m, msegmentptr ss) { msegmentptr sp = &m->seg; for (;;) { if ((char *)sp >= ss->base && (char *)sp < ss->base + ss->size) return 1; if ((sp = sp->next) == 0) return 0; } } /* TOP_FOOT_SIZE is padding at the end of a segment, including space that may be needed to place segment records and fenceposts when new noncontiguous segments are added. */ #define TOP_FOOT_SIZE\ (align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE) /* ---------------------------- Indexing Bins ---------------------------- */ #define is_small(s) (((s) >> SMALLBIN_SHIFT) < NSMALLBINS) #define small_index(s) ((s) >> SMALLBIN_SHIFT) #define small_index2size(i) ((i) << SMALLBIN_SHIFT) #define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE)) /* addressing by index. See above about smallbin repositioning */ #define smallbin_at(M, i) ((sbinptr)((char *)&((M)->smallbins[(i)<<1]))) #define treebin_at(M,i) (&((M)->treebins[i])) /* assign tree index for size S to variable I */ #define compute_tree_index(S, I)\ {\ unsigned int X = (unsigned int)(S >> TREEBIN_SHIFT);\ if (X == 0) {\ I = 0;\ } else if (X > 0xFFFF) {\ I = NTREEBINS-1;\ } else {\ unsigned int K = lj_fls(X);\ I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\ }\ } /* Bit representing maximum resolved size in a treebin at i */ #define bit_for_tree_index(i) \ (i == NTREEBINS-1)? (SIZE_T_BITSIZE-1) : (((i) >> 1) + TREEBIN_SHIFT - 2) /* Shift placing maximum resolved bit in a treebin at i as sign bit */ #define leftshift_for_tree_index(i) \ ((i == NTREEBINS-1)? 0 : \ ((SIZE_T_BITSIZE-SIZE_T_ONE) - (((i) >> 1) + TREEBIN_SHIFT - 2))) /* The size of the smallest chunk held in bin with index i */ #define minsize_for_tree_index(i) \ ((SIZE_T_ONE << (((i) >> 1) + TREEBIN_SHIFT)) | \ (((size_t)((i) & SIZE_T_ONE)) << (((i) >> 1) + TREEBIN_SHIFT - 1))) /* ------------------------ Operations on bin maps ----------------------- */ /* bit corresponding to given index */ #define idx2bit(i) ((binmap_t)(1) << (i)) /* Mark/Clear bits with given index */ #define mark_smallmap(M,i) ((M)->smallmap |= idx2bit(i)) #define clear_smallmap(M,i) ((M)->smallmap &= ~idx2bit(i)) #define smallmap_is_marked(M,i) ((M)->smallmap & idx2bit(i)) #define mark_treemap(M,i) ((M)->treemap |= idx2bit(i)) #define clear_treemap(M,i) ((M)->treemap &= ~idx2bit(i)) #define treemap_is_marked(M,i) ((M)->treemap & idx2bit(i)) /* mask with all bits to left of least bit of x on */ #define left_bits(x) ((x<<1) | (~(x<<1)+1)) /* Set cinuse bit and pinuse bit of next chunk */ #define set_inuse(M,p,s)\ ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\ ((mchunkptr)(((char *)(p)) + (s)))->head |= PINUSE_BIT) /* Set cinuse and pinuse of this chunk and pinuse of next chunk */ #define set_inuse_and_pinuse(M,p,s)\ ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\ ((mchunkptr)(((char *)(p)) + (s)))->head |= PINUSE_BIT) /* Set size, cinuse and pinuse bit of this chunk */ #define set_size_and_pinuse_of_inuse_chunk(M, p, s)\ ((p)->head = (s|PINUSE_BIT|CINUSE_BIT)) /* ----------------------- Operations on smallbins ----------------------- */ /* Link a free chunk into a smallbin */ #define insert_small_chunk(M, P, S) {\ bindex_t I = small_index(S);\ mchunkptr B = smallbin_at(M, I);\ mchunkptr F = B;\ if (!smallmap_is_marked(M, I))\ mark_smallmap(M, I);\ else\ F = B->fd;\ B->fd = P;\ F->bk = P;\ P->fd = F;\ P->bk = B;\ } /* Unlink a chunk from a smallbin */ #define unlink_small_chunk(M, P, S) {\ mchunkptr F = P->fd;\ mchunkptr B = P->bk;\ bindex_t I = small_index(S);\ if (F == B) {\ clear_smallmap(M, I);\ } else {\ F->bk = B;\ B->fd = F;\ }\ } /* Unlink the first chunk from a smallbin */ #define unlink_first_small_chunk(M, B, P, I) {\ mchunkptr F = P->fd;\ if (B == F) {\ clear_smallmap(M, I);\ } else {\ B->fd = F;\ F->bk = B;\ }\ } /* Replace dv node, binning the old one */ /* Used only when dvsize known to be small */ #define replace_dv(M, P, S) {\ size_t DVS = M->dvsize;\ if (DVS != 0) {\ mchunkptr DV = M->dv;\ insert_small_chunk(M, DV, DVS);\ }\ M->dvsize = S;\ M->dv = P;\ } /* ------------------------- Operations on trees ------------------------- */ /* Insert chunk into tree */ #define insert_large_chunk(M, X, S) {\ tbinptr *H;\ bindex_t I;\ compute_tree_index(S, I);\ H = treebin_at(M, I);\ X->index = I;\ X->child[0] = X->child[1] = 0;\ if (!treemap_is_marked(M, I)) {\ mark_treemap(M, I);\ *H = X;\ X->parent = (tchunkptr)H;\ X->fd = X->bk = X;\ } else {\ tchunkptr T = *H;\ size_t K = S << leftshift_for_tree_index(I);\ for (;;) {\ if (chunksize(T) != S) {\ tchunkptr *C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\ K <<= 1;\ if (*C != 0) {\ T = *C;\ } else {\ *C = X;\ X->parent = T;\ X->fd = X->bk = X;\ break;\ }\ } else {\ tchunkptr F = T->fd;\ T->fd = F->bk = X;\ X->fd = F;\ X->bk = T;\ X->parent = 0;\ break;\ }\ }\ }\ } #define unlink_large_chunk(M, X) {\ tchunkptr XP = X->parent;\ tchunkptr R;\ if (X->bk != X) {\ tchunkptr F = X->fd;\ R = X->bk;\ F->bk = R;\ R->fd = F;\ } else {\ tchunkptr *RP;\ if (((R = *(RP = &(X->child[1]))) != 0) ||\ ((R = *(RP = &(X->child[0]))) != 0)) {\ tchunkptr *CP;\ while ((*(CP = &(R->child[1])) != 0) ||\ (*(CP = &(R->child[0])) != 0)) {\ R = *(RP = CP);\ }\ *RP = 0;\ }\ }\ if (XP != 0) {\ tbinptr *H = treebin_at(M, X->index);\ if (X == *H) {\ if ((*H = R) == 0) \ clear_treemap(M, X->index);\ } else {\ if (XP->child[0] == X) \ XP->child[0] = R;\ else \ XP->child[1] = R;\ }\ if (R != 0) {\ tchunkptr C0, C1;\ R->parent = XP;\ if ((C0 = X->child[0]) != 0) {\ R->child[0] = C0;\ C0->parent = R;\ }\ if ((C1 = X->child[1]) != 0) {\ R->child[1] = C1;\ C1->parent = R;\ }\ }\ }\ } /* Relays to large vs small bin operations */ #define insert_chunk(M, P, S)\ if (is_small(S)) { insert_small_chunk(M, P, S)\ } else { tchunkptr TP = (tchunkptr)(P); insert_large_chunk(M, TP, S); } #define unlink_chunk(M, P, S)\ if (is_small(S)) { unlink_small_chunk(M, P, S)\ } else { tchunkptr TP = (tchunkptr)(P); unlink_large_chunk(M, TP); } /* ----------------------- Direct-mmapping chunks ----------------------- */ static void *direct_alloc(size_t nb) { size_t mmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK); if (LJ_LIKELY(mmsize > nb)) { /* Check for wrap around 0 */ char *mm = (char *)(DIRECT_MMAP(mmsize)); if (mm != CMFAIL) { size_t offset = align_offset(chunk2mem(mm)); size_t psize = mmsize - offset - DIRECT_FOOT_PAD; mchunkptr p = (mchunkptr)(mm + offset); p->prev_foot = offset | IS_DIRECT_BIT; p->head = psize|CINUSE_BIT; chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD; chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0; return chunk2mem(p); } } return NULL; } static mchunkptr direct_resize(mchunkptr oldp, size_t nb) { size_t oldsize = chunksize(oldp); if (is_small(nb)) /* Can't shrink direct regions below small size */ return NULL; /* Keep old chunk if big enough but not too big */ if (oldsize >= nb + SIZE_T_SIZE && (oldsize - nb) <= (DEFAULT_GRANULARITY >> 1)) { return oldp; } else { size_t offset = oldp->prev_foot & ~IS_DIRECT_BIT; size_t oldmmsize = oldsize + offset + DIRECT_FOOT_PAD; size_t newmmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK); char *cp = (char *)CALL_MREMAP((char *)oldp - offset, oldmmsize, newmmsize, CALL_MREMAP_MV); if (cp != CMFAIL) { mchunkptr newp = (mchunkptr)(cp + offset); size_t psize = newmmsize - offset - DIRECT_FOOT_PAD; newp->head = psize|CINUSE_BIT; chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD; chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0; return newp; } } return NULL; } /* -------------------------- mspace management -------------------------- */ /* Initialize top chunk and its size */ static void init_top(mstate m, mchunkptr p, size_t psize) { /* Ensure alignment */ size_t offset = align_offset(chunk2mem(p)); p = (mchunkptr)((char *)p + offset); psize -= offset; m->top = p; m->topsize = psize; p->head = psize | PINUSE_BIT; /* set size of fake trailing chunk holding overhead space only once */ chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE; m->trim_check = DEFAULT_TRIM_THRESHOLD; /* reset on each update */ } /* Initialize bins for a new mstate that is otherwise zeroed out */ static void init_bins(mstate m) { /* Establish circular links for smallbins */ bindex_t i; for (i = 0; i < NSMALLBINS; i++) { sbinptr bin = smallbin_at(m,i); bin->fd = bin->bk = bin; } } /* Allocate chunk and prepend remainder with chunk in successor base. */ static void *prepend_alloc(mstate m, char *newbase, char *oldbase, size_t nb) { mchunkptr p = align_as_chunk(newbase); mchunkptr oldfirst = align_as_chunk(oldbase); size_t psize = (size_t)((char *)oldfirst - (char *)p); mchunkptr q = chunk_plus_offset(p, nb); size_t qsize = psize - nb; set_size_and_pinuse_of_inuse_chunk(m, p, nb); /* consolidate remainder with first chunk of old base */ if (oldfirst == m->top) { size_t tsize = m->topsize += qsize; m->top = q; q->head = tsize | PINUSE_BIT; } else if (oldfirst == m->dv) { size_t dsize = m->dvsize += qsize; m->dv = q; set_size_and_pinuse_of_free_chunk(q, dsize); } else { if (!cinuse(oldfirst)) { size_t nsize = chunksize(oldfirst); unlink_chunk(m, oldfirst, nsize); oldfirst = chunk_plus_offset(oldfirst, nsize); qsize += nsize; } set_free_with_pinuse(q, qsize, oldfirst); insert_chunk(m, q, qsize); } return chunk2mem(p); } /* Add a segment to hold a new noncontiguous region */ static void add_segment(mstate m, char *tbase, size_t tsize) { /* Determine locations and sizes of segment, fenceposts, old top */ char *old_top = (char *)m->top; msegmentptr oldsp = segment_holding(m, old_top); char *old_end = oldsp->base + oldsp->size; size_t ssize = pad_request(sizeof(struct malloc_segment)); char *rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK); size_t offset = align_offset(chunk2mem(rawsp)); char *asp = rawsp + offset; char *csp = (asp < (old_top + MIN_CHUNK_SIZE))? old_top : asp; mchunkptr sp = (mchunkptr)csp; msegmentptr ss = (msegmentptr)(chunk2mem(sp)); mchunkptr tnext = chunk_plus_offset(sp, ssize); mchunkptr p = tnext; /* reset top to new space */ init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); /* Set up segment record */ set_size_and_pinuse_of_inuse_chunk(m, sp, ssize); *ss = m->seg; /* Push current record */ m->seg.base = tbase; m->seg.size = tsize; m->seg.next = ss; /* Insert trailing fenceposts */ for (;;) { mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE); p->head = FENCEPOST_HEAD; if ((char *)(&(nextp->head)) < old_end) p = nextp; else break; } /* Insert the rest of old top into a bin as an ordinary free chunk */ if (csp != old_top) { mchunkptr q = (mchunkptr)old_top; size_t psize = (size_t)(csp - old_top); mchunkptr tn = chunk_plus_offset(q, psize); set_free_with_pinuse(q, psize, tn); insert_chunk(m, q, psize); } } /* -------------------------- System allocation -------------------------- */ static void *alloc_sys(mstate m, size_t nb) { char *tbase = CMFAIL; size_t tsize = 0; /* Directly map large chunks */ if (LJ_UNLIKELY(nb >= DEFAULT_MMAP_THRESHOLD)) { void *mem = direct_alloc(nb); if (mem != 0) return mem; } { size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE; size_t rsize = granularity_align(req); if (LJ_LIKELY(rsize > nb)) { /* Fail if wraps around zero */ char *mp = (char *)(CALL_MMAP(rsize)); if (mp != CMFAIL) { tbase = mp; tsize = rsize; } } } if (tbase != CMFAIL) { msegmentptr sp = &m->seg; /* Try to merge with an existing segment */ while (sp != 0 && tbase != sp->base + sp->size) sp = sp->next; if (sp != 0 && segment_holds(sp, m->top)) { /* append */ sp->size += tsize; init_top(m, m->top, m->topsize + tsize); } else { sp = &m->seg; while (sp != 0 && sp->base != tbase + tsize) sp = sp->next; if (sp != 0) { char *oldbase = sp->base; sp->base = tbase; sp->size += tsize; return prepend_alloc(m, tbase, oldbase, nb); } else { add_segment(m, tbase, tsize); } } if (nb < m->topsize) { /* Allocate from new or extended top space */ size_t rsize = m->topsize -= nb; mchunkptr p = m->top; mchunkptr r = m->top = chunk_plus_offset(p, nb); r->head = rsize | PINUSE_BIT; set_size_and_pinuse_of_inuse_chunk(m, p, nb); return chunk2mem(p); } } return NULL; } /* ----------------------- system deallocation -------------------------- */ /* Unmap and unlink any mmapped segments that don't contain used chunks */ static size_t release_unused_segments(mstate m) { size_t released = 0; size_t nsegs = 0; msegmentptr pred = &m->seg; msegmentptr sp = pred->next; while (sp != 0) { char *base = sp->base; size_t size = sp->size; msegmentptr next = sp->next; nsegs++; { mchunkptr p = align_as_chunk(base); size_t psize = chunksize(p); /* Can unmap if first chunk holds entire segment and not pinned */ if (!cinuse(p) && (char *)p + psize >= base + size - TOP_FOOT_SIZE) { tchunkptr tp = (tchunkptr)p; if (p == m->dv) { m->dv = 0; m->dvsize = 0; } else { unlink_large_chunk(m, tp); } if (CALL_MUNMAP(base, size) == 0) { released += size; /* unlink obsoleted record */ sp = pred; sp->next = next; } else { /* back out if cannot unmap */ insert_large_chunk(m, tp, psize); } } } pred = sp; sp = next; } /* Reset check counter */ m->release_checks = nsegs > MAX_RELEASE_CHECK_RATE ? nsegs : MAX_RELEASE_CHECK_RATE; return released; } static int alloc_trim(mstate m, size_t pad) { size_t released = 0; if (pad < MAX_REQUEST && is_initialized(m)) { pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */ if (m->topsize > pad) { /* Shrink top space in granularity-size units, keeping at least one */ size_t unit = DEFAULT_GRANULARITY; size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit - SIZE_T_ONE) * unit; msegmentptr sp = segment_holding(m, (char *)m->top); if (sp->size >= extra && !has_segment_link(m, sp)) { /* can't shrink if pinned */ size_t newsize = sp->size - extra; /* Prefer mremap, fall back to munmap */ if ((CALL_MREMAP(sp->base, sp->size, newsize, CALL_MREMAP_NOMOVE) != MFAIL) || (CALL_MUNMAP(sp->base + newsize, extra) == 0)) { released = extra; } } if (released != 0) { sp->size -= released; init_top(m, m->top, m->topsize - released); } } /* Unmap any unused mmapped segments */ released += release_unused_segments(m); /* On failure, disable autotrim to avoid repeated failed future calls */ if (released == 0 && m->topsize > m->trim_check) m->trim_check = MAX_SIZE_T; } return (released != 0)? 1 : 0; } /* ---------------------------- malloc support --------------------------- */ /* allocate a large request from the best fitting chunk in a treebin */ static void *tmalloc_large(mstate m, size_t nb) { tchunkptr v = 0; size_t rsize = ~nb+1; /* Unsigned negation */ tchunkptr t; bindex_t idx; compute_tree_index(nb, idx); if ((t = *treebin_at(m, idx)) != 0) { /* Traverse tree for this bin looking for node with size == nb */ size_t sizebits = nb << leftshift_for_tree_index(idx); tchunkptr rst = 0; /* The deepest untaken right subtree */ for (;;) { tchunkptr rt; size_t trem = chunksize(t) - nb; if (trem < rsize) { v = t; if ((rsize = trem) == 0) break; } rt = t->child[1]; t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]; if (rt != 0 && rt != t) rst = rt; if (t == 0) { t = rst; /* set t to least subtree holding sizes > nb */ break; } sizebits <<= 1; } } if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */ binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap; if (leftbits != 0) t = *treebin_at(m, lj_ffs(leftbits)); } while (t != 0) { /* find smallest of tree or subtree */ size_t trem = chunksize(t) - nb; if (trem < rsize) { rsize = trem; v = t; } t = leftmost_child(t); } /* If dv is a better fit, return NULL so malloc will use it */ if (v != 0 && rsize < (size_t)(m->dvsize - nb)) { mchunkptr r = chunk_plus_offset(v, nb); unlink_large_chunk(m, v); if (rsize < MIN_CHUNK_SIZE) { set_inuse_and_pinuse(m, v, (rsize + nb)); } else { set_size_and_pinuse_of_inuse_chunk(m, v, nb); set_size_and_pinuse_of_free_chunk(r, rsize); insert_chunk(m, r, rsize); } return chunk2mem(v); } return NULL; } /* allocate a small request from the best fitting chunk in a treebin */ static void *tmalloc_small(mstate m, size_t nb) { tchunkptr t, v; mchunkptr r; size_t rsize; bindex_t i = lj_ffs(m->treemap); v = t = *treebin_at(m, i); rsize = chunksize(t) - nb; while ((t = leftmost_child(t)) != 0) { size_t trem = chunksize(t) - nb; if (trem < rsize) { rsize = trem; v = t; } } r = chunk_plus_offset(v, nb); unlink_large_chunk(m, v); if (rsize < MIN_CHUNK_SIZE) { set_inuse_and_pinuse(m, v, (rsize + nb)); } else { set_size_and_pinuse_of_inuse_chunk(m, v, nb); set_size_and_pinuse_of_free_chunk(r, rsize); replace_dv(m, r, rsize); } return chunk2mem(v); } /* ----------------------------------------------------------------------- */ void *lj_alloc_create(void) { size_t tsize = DEFAULT_GRANULARITY; char *tbase; INIT_MMAP(); tbase = (char *)(CALL_MMAP(tsize)); if (tbase != CMFAIL) { size_t msize = pad_request(sizeof(struct malloc_state)); mchunkptr mn; mchunkptr msp = align_as_chunk(tbase); mstate m = (mstate)(chunk2mem(msp)); memset(m, 0, msize); msp->head = (msize|PINUSE_BIT|CINUSE_BIT); m->seg.base = tbase; m->seg.size = tsize; m->release_checks = MAX_RELEASE_CHECK_RATE; init_bins(m); mn = next_chunk(mem2chunk(m)); init_top(m, mn, (size_t)((tbase + tsize) - (char *)mn) - TOP_FOOT_SIZE); return m; } return NULL; } void lj_alloc_destroy(void *msp) { mstate ms = (mstate)msp; msegmentptr sp = &ms->seg; while (sp != 0) { char *base = sp->base; size_t size = sp->size; sp = sp->next; CALL_MUNMAP(base, size); } } static LJ_NOINLINE void *lj_alloc_malloc(void *msp, size_t nsize) { mstate ms = (mstate)msp; void *mem; size_t nb; if (nsize <= MAX_SMALL_REQUEST) { bindex_t idx; binmap_t smallbits; nb = (nsize < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(nsize); idx = small_index(nb); smallbits = ms->smallmap >> idx; if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ mchunkptr b, p; idx += ~smallbits & 1; /* Uses next bin if idx empty */ b = smallbin_at(ms, idx); p = b->fd; unlink_first_small_chunk(ms, b, p, idx); set_inuse_and_pinuse(ms, p, small_index2size(idx)); mem = chunk2mem(p); return mem; } else if (nb > ms->dvsize) { if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ mchunkptr b, p, r; size_t rsize; binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx)); bindex_t i = lj_ffs(leftbits); b = smallbin_at(ms, i); p = b->fd; unlink_first_small_chunk(ms, b, p, i); rsize = small_index2size(i) - nb; /* Fit here cannot be remainderless if 4byte sizes */ if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) { set_inuse_and_pinuse(ms, p, small_index2size(i)); } else { set_size_and_pinuse_of_inuse_chunk(ms, p, nb); r = chunk_plus_offset(p, nb); set_size_and_pinuse_of_free_chunk(r, rsize); replace_dv(ms, r, rsize); } mem = chunk2mem(p); return mem; } else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) { return mem; } } } else if (nsize >= MAX_REQUEST) { nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ } else { nb = pad_request(nsize); if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) { return mem; } } if (nb <= ms->dvsize) { size_t rsize = ms->dvsize - nb; mchunkptr p = ms->dv; if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ mchunkptr r = ms->dv = chunk_plus_offset(p, nb); ms->dvsize = rsize; set_size_and_pinuse_of_free_chunk(r, rsize); set_size_and_pinuse_of_inuse_chunk(ms, p, nb); } else { /* exhaust dv */ size_t dvs = ms->dvsize; ms->dvsize = 0; ms->dv = 0; set_inuse_and_pinuse(ms, p, dvs); } mem = chunk2mem(p); return mem; } else if (nb < ms->topsize) { /* Split top */ size_t rsize = ms->topsize -= nb; mchunkptr p = ms->top; mchunkptr r = ms->top = chunk_plus_offset(p, nb); r->head = rsize | PINUSE_BIT; set_size_and_pinuse_of_inuse_chunk(ms, p, nb); mem = chunk2mem(p); return mem; } return alloc_sys(ms, nb); } static LJ_NOINLINE void *lj_alloc_free(void *msp, void *ptr) { if (ptr != 0) { mchunkptr p = mem2chunk(ptr); mstate fm = (mstate)msp; size_t psize = chunksize(p); mchunkptr next = chunk_plus_offset(p, psize); if (!pinuse(p)) { size_t prevsize = p->prev_foot; if ((prevsize & IS_DIRECT_BIT) != 0) { prevsize &= ~IS_DIRECT_BIT; psize += prevsize + DIRECT_FOOT_PAD; CALL_MUNMAP((char *)p - prevsize, psize); return NULL; } else { mchunkptr prev = chunk_minus_offset(p, prevsize); psize += prevsize; p = prev; /* consolidate backward */ if (p != fm->dv) { unlink_chunk(fm, p, prevsize); } else if ((next->head & INUSE_BITS) == INUSE_BITS) { fm->dvsize = psize; set_free_with_pinuse(p, psize, next); return NULL; } } } if (!cinuse(next)) { /* consolidate forward */ if (next == fm->top) { size_t tsize = fm->topsize += psize; fm->top = p; p->head = tsize | PINUSE_BIT; if (p == fm->dv) { fm->dv = 0; fm->dvsize = 0; } if (tsize > fm->trim_check) alloc_trim(fm, 0); return NULL; } else if (next == fm->dv) { size_t dsize = fm->dvsize += psize; fm->dv = p; set_size_and_pinuse_of_free_chunk(p, dsize); return NULL; } else { size_t nsize = chunksize(next); psize += nsize; unlink_chunk(fm, next, nsize); set_size_and_pinuse_of_free_chunk(p, psize); if (p == fm->dv) { fm->dvsize = psize; return NULL; } } } else { set_free_with_pinuse(p, psize, next); } if (is_small(psize)) { insert_small_chunk(fm, p, psize); } else { tchunkptr tp = (tchunkptr)p; insert_large_chunk(fm, tp, psize); if (--fm->release_checks == 0) release_unused_segments(fm); } } return NULL; } static LJ_NOINLINE void *lj_alloc_realloc(void *msp, void *ptr, size_t nsize) { if (nsize >= MAX_REQUEST) { return NULL; } else { mstate m = (mstate)msp; mchunkptr oldp = mem2chunk(ptr); size_t oldsize = chunksize(oldp); mchunkptr next = chunk_plus_offset(oldp, oldsize); mchunkptr newp = 0; size_t nb = request2size(nsize); /* Try to either shrink or extend into top. Else malloc-copy-free */ if (is_direct(oldp)) { newp = direct_resize(oldp, nb); /* this may return NULL. */ } else if (oldsize >= nb) { /* already big enough */ size_t rsize = oldsize - nb; newp = oldp; if (rsize >= MIN_CHUNK_SIZE) { mchunkptr rem = chunk_plus_offset(newp, nb); set_inuse(m, newp, nb); set_inuse(m, rem, rsize); lj_alloc_free(m, chunk2mem(rem)); } } else if (next == m->top && oldsize + m->topsize > nb) { /* Expand into top */ size_t newsize = oldsize + m->topsize; size_t newtopsize = newsize - nb; mchunkptr newtop = chunk_plus_offset(oldp, nb); set_inuse(m, oldp, nb); newtop->head = newtopsize |PINUSE_BIT; m->top = newtop; m->topsize = newtopsize; newp = oldp; } if (newp != 0) { return chunk2mem(newp); } else { void *newmem = lj_alloc_malloc(m, nsize); if (newmem != 0) { size_t oc = oldsize - overhead_for(oldp); memcpy(newmem, ptr, oc < nsize ? oc : nsize); lj_alloc_free(m, ptr); } return newmem; } } } void *lj_alloc_f(void *msp, void *ptr, size_t osize, size_t nsize) { (void)osize; if (nsize == 0) { return lj_alloc_free(msp, ptr); } else if (ptr == NULL) { return lj_alloc_malloc(msp, nsize); } else { return lj_alloc_realloc(msp, ptr, nsize); } } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lua.h0000664000000000000000000002727412202141143021324 0ustar rootroot/* ** $Id: lua.h,v 1.218.1.5 2008/08/06 13:30:12 roberto Exp $ ** Lua - An Extensible Extension Language ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) ** See Copyright Notice at the end of this file */ #ifndef lua_h #define lua_h #include #include #include "luaconf.h" #define LUA_VERSION "Lua 5.1" #define LUA_RELEASE "Lua 5.1.4" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" /* mark for precompiled code (`Lua') */ #define LUA_SIGNATURE "\033Lua" /* option for multiple returns in `lua_pcall' and `lua_call' */ #define LUA_MULTRET (-1) /* ** pseudo-indices */ #define LUA_REGISTRYINDEX (-10000) #define LUA_ENVIRONINDEX (-10001) #define LUA_GLOBALSINDEX (-10002) #define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) /* thread status; 0 is OK */ #define LUA_YIELD 1 #define LUA_ERRRUN 2 #define LUA_ERRSYNTAX 3 #define LUA_ERRMEM 4 #define LUA_ERRERR 5 typedef struct lua_State lua_State; typedef int (*lua_CFunction) (lua_State *L); /* ** functions that read/write blocks when loading/dumping Lua chunks */ typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); /* ** prototype for memory-allocation functions */ typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); /* ** basic types */ #define LUA_TNONE (-1) #define LUA_TNIL 0 #define LUA_TBOOLEAN 1 #define LUA_TLIGHTUSERDATA 2 #define LUA_TNUMBER 3 #define LUA_TSTRING 4 #define LUA_TTABLE 5 #define LUA_TFUNCTION 6 #define LUA_TUSERDATA 7 #define LUA_TTHREAD 8 /* minimum Lua stack available to a C function */ #define LUA_MINSTACK 20 /* ** generic extra include file */ #if defined(LUA_USER_H) #include LUA_USER_H #endif /* type of numbers in Lua */ typedef LUA_NUMBER lua_Number; /* type for integer functions */ typedef LUA_INTEGER lua_Integer; /* ** state manipulation */ LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); LUA_API void (lua_close) (lua_State *L); LUA_API lua_State *(lua_newthread) (lua_State *L); LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); /* ** basic stack manipulation */ LUA_API int (lua_gettop) (lua_State *L); LUA_API void (lua_settop) (lua_State *L, int idx); LUA_API void (lua_pushvalue) (lua_State *L, int idx); LUA_API void (lua_remove) (lua_State *L, int idx); LUA_API void (lua_insert) (lua_State *L, int idx); LUA_API void (lua_replace) (lua_State *L, int idx); LUA_API int (lua_checkstack) (lua_State *L, int sz); LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); /* ** access functions (stack -> C) */ LUA_API int (lua_isnumber) (lua_State *L, int idx); LUA_API int (lua_isstring) (lua_State *L, int idx); LUA_API int (lua_iscfunction) (lua_State *L, int idx); LUA_API int (lua_isuserdata) (lua_State *L, int idx); LUA_API int (lua_type) (lua_State *L, int idx); LUA_API const char *(lua_typename) (lua_State *L, int tp); LUA_API int (lua_equal) (lua_State *L, int idx1, int idx2); LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2); LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx); LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx); LUA_API int (lua_toboolean) (lua_State *L, int idx); LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); LUA_API size_t (lua_objlen) (lua_State *L, int idx); LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); LUA_API void *(lua_touserdata) (lua_State *L, int idx); LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); LUA_API const void *(lua_topointer) (lua_State *L, int idx); /* ** push functions (C -> stack) */ LUA_API void (lua_pushnil) (lua_State *L); LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l); LUA_API void (lua_pushstring) (lua_State *L, const char *s); LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, va_list argp); LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...); LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); LUA_API void (lua_pushboolean) (lua_State *L, int b); LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p); LUA_API int (lua_pushthread) (lua_State *L); /* ** get functions (Lua -> stack) */ LUA_API void (lua_gettable) (lua_State *L, int idx); LUA_API void (lua_getfield) (lua_State *L, int idx, const char *k); LUA_API void (lua_rawget) (lua_State *L, int idx); LUA_API void (lua_rawgeti) (lua_State *L, int idx, int n); LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); LUA_API int (lua_getmetatable) (lua_State *L, int objindex); LUA_API void (lua_getfenv) (lua_State *L, int idx); /* ** set functions (stack -> Lua) */ LUA_API void (lua_settable) (lua_State *L, int idx); LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k); LUA_API void (lua_rawset) (lua_State *L, int idx); LUA_API void (lua_rawseti) (lua_State *L, int idx, int n); LUA_API int (lua_setmetatable) (lua_State *L, int objindex); LUA_API int (lua_setfenv) (lua_State *L, int idx); /* ** `load' and `call' functions (load and run Lua code) */ LUA_API void (lua_call) (lua_State *L, int nargs, int nresults); LUA_API int (lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc); LUA_API int (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud); LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, const char *chunkname); LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); /* ** coroutine functions */ LUA_API int (lua_yield) (lua_State *L, int nresults); LUA_API int (lua_resume) (lua_State *L, int narg); LUA_API int (lua_status) (lua_State *L); /* ** garbage-collection function and options */ #define LUA_GCSTOP 0 #define LUA_GCRESTART 1 #define LUA_GCCOLLECT 2 #define LUA_GCCOUNT 3 #define LUA_GCCOUNTB 4 #define LUA_GCSTEP 5 #define LUA_GCSETPAUSE 6 #define LUA_GCSETSTEPMUL 7 LUA_API int (lua_gc) (lua_State *L, int what, int data); /* ** miscellaneous functions */ LUA_API int (lua_error) (lua_State *L); LUA_API int (lua_next) (lua_State *L, int idx); LUA_API void (lua_concat) (lua_State *L, int n); LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); /* ** =============================================================== ** some useful macros ** =============================================================== */ #define lua_pop(L,n) lua_settop(L, -(n)-1) #define lua_newtable(L) lua_createtable(L, 0, 0) #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) #define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) #define lua_strlen(L,i) lua_objlen(L, (i)) #define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) #define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) #define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) #define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) #define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) #define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) #define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) #define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) #define lua_pushliteral(L, s) \ lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) #define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s)) #define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s)) #define lua_tostring(L,i) lua_tolstring(L, (i), NULL) /* ** compatibility macros and functions */ #define lua_open() luaL_newstate() #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) #define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) #define lua_Chunkreader lua_Reader #define lua_Chunkwriter lua_Writer /* hack */ LUA_API void lua_setlevel (lua_State *from, lua_State *to); /* ** {====================================================================== ** Debug API ** ======================================================================= */ /* ** Event codes */ #define LUA_HOOKCALL 0 #define LUA_HOOKRET 1 #define LUA_HOOKLINE 2 #define LUA_HOOKCOUNT 3 #define LUA_HOOKTAILRET 4 /* ** Event masks */ #define LUA_MASKCALL (1 << LUA_HOOKCALL) #define LUA_MASKRET (1 << LUA_HOOKRET) #define LUA_MASKLINE (1 << LUA_HOOKLINE) #define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) typedef struct lua_Debug lua_Debug; /* activation record */ /* Functions to be called by the debuger in specific events */ typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n); LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n); LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count); LUA_API lua_Hook lua_gethook (lua_State *L); LUA_API int lua_gethookmask (lua_State *L); LUA_API int lua_gethookcount (lua_State *L); /* From Lua 5.2. */ LUA_API void *lua_upvalueid (lua_State *L, int idx, int n); LUA_API void lua_upvaluejoin (lua_State *L, int idx1, int n1, int idx2, int n2); LUA_API int lua_loadx (lua_State *L, lua_Reader reader, void *dt, const char *chunkname, const char *mode); struct lua_Debug { int event; const char *name; /* (n) */ const char *namewhat; /* (n) `global', `local', `field', `method' */ const char *what; /* (S) `Lua', `C', `main', `tail' */ const char *source; /* (S) */ int currentline; /* (l) */ int nups; /* (u) number of upvalues */ int linedefined; /* (S) */ int lastlinedefined; /* (S) */ char short_src[LUA_IDSIZE]; /* (S) */ /* private part */ int i_ci; /* active function */ }; /* }====================================================================== */ /****************************************************************************** * Copyright (C) 1994-2008 Lua.org, PUC-Rio. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_emit_mips.h0000664000000000000000000001370712202141143023212 0ustar rootroot/* ** MIPS instruction emitter. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Emit basic instructions --------------------------------------------- */ static void emit_dst(ASMState *as, MIPSIns mi, Reg rd, Reg rs, Reg rt) { *--as->mcp = mi | MIPSF_D(rd) | MIPSF_S(rs) | MIPSF_T(rt); } static void emit_dta(ASMState *as, MIPSIns mi, Reg rd, Reg rt, uint32_t a) { *--as->mcp = mi | MIPSF_D(rd) | MIPSF_T(rt) | MIPSF_A(a); } #define emit_ds(as, mi, rd, rs) emit_dst(as, (mi), (rd), (rs), 0) #define emit_tg(as, mi, rt, rg) emit_dst(as, (mi), (rg)&31, 0, (rt)) static void emit_tsi(ASMState *as, MIPSIns mi, Reg rt, Reg rs, int32_t i) { *--as->mcp = mi | MIPSF_T(rt) | MIPSF_S(rs) | (i & 0xffff); } #define emit_ti(as, mi, rt, i) emit_tsi(as, (mi), (rt), 0, (i)) #define emit_hsi(as, mi, rh, rs, i) emit_tsi(as, (mi), (rh) & 31, (rs), (i)) static void emit_fgh(ASMState *as, MIPSIns mi, Reg rf, Reg rg, Reg rh) { *--as->mcp = mi | MIPSF_F(rf&31) | MIPSF_G(rg&31) | MIPSF_H(rh&31); } #define emit_fg(as, mi, rf, rg) emit_fgh(as, (mi), (rf), (rg), 0) static void emit_rotr(ASMState *as, Reg dest, Reg src, Reg tmp, uint32_t shift) { if ((as->flags & JIT_F_MIPS32R2)) { emit_dta(as, MIPSI_ROTR, dest, src, shift); } else { emit_dst(as, MIPSI_OR, dest, dest, tmp); emit_dta(as, MIPSI_SLL, dest, src, (-shift)&31); emit_dta(as, MIPSI_SRL, tmp, src, shift); } } /* -- Emit loads/stores --------------------------------------------------- */ /* Prefer rematerialization of BASE/L from global_State over spills. */ #define emit_canremat(ref) ((ref) <= REF_BASE) /* Try to find a one step delta relative to another constant. */ static int emit_kdelta1(ASMState *as, Reg t, int32_t i) { RegSet work = ~as->freeset & RSET_GPR; while (work) { Reg r = rset_picktop(work); IRRef ref = regcost_ref(as->cost[r]); lua_assert(r != t); if (ref < ASMREF_L) { int32_t delta = i - (ra_iskref(ref) ? ra_krefk(as, ref) : IR(ref)->i); if (checki16(delta)) { emit_tsi(as, MIPSI_ADDIU, t, r, delta); return 1; } } rset_clear(work, r); } return 0; /* Failed. */ } /* Load a 32 bit constant into a GPR. */ static void emit_loadi(ASMState *as, Reg r, int32_t i) { if (checki16(i)) { emit_ti(as, MIPSI_LI, r, i); } else { if ((i & 0xffff)) { int32_t jgl = i32ptr(J2G(as->J)); if ((uint32_t)(i-jgl) < 65536) { emit_tsi(as, MIPSI_ADDIU, r, RID_JGL, i-jgl-32768); return; } else if (emit_kdelta1(as, r, i)) { return; } else if ((i >> 16) == 0) { emit_tsi(as, MIPSI_ORI, r, RID_ZERO, i); return; } emit_tsi(as, MIPSI_ORI, r, r, i); } emit_ti(as, MIPSI_LUI, r, (i >> 16)); } } #define emit_loada(as, r, addr) emit_loadi(as, (r), i32ptr((addr))) static Reg ra_allock(ASMState *as, int32_t k, RegSet allow); static void ra_allockreg(ASMState *as, int32_t k, Reg r); /* Get/set from constant pointer. */ static void emit_lsptr(ASMState *as, MIPSIns mi, Reg r, void *p, RegSet allow) { int32_t jgl = i32ptr(J2G(as->J)); int32_t i = i32ptr(p); Reg base; if ((uint32_t)(i-jgl) < 65536) { i = i-jgl-32768; base = RID_JGL; } else { base = ra_allock(as, i-(int16_t)i, allow); } emit_tsi(as, mi, r, base, i); } #define emit_loadn(as, r, tv) \ emit_lsptr(as, MIPSI_LDC1, ((r) & 31), (void *)(tv), RSET_GPR) /* Get/set global_State fields. */ static void emit_lsglptr(ASMState *as, MIPSIns mi, Reg r, int32_t ofs) { emit_tsi(as, mi, r, RID_JGL, ofs-32768); } #define emit_getgl(as, r, field) \ emit_lsglptr(as, MIPSI_LW, (r), (int32_t)offsetof(global_State, field)) #define emit_setgl(as, r, field) \ emit_lsglptr(as, MIPSI_SW, (r), (int32_t)offsetof(global_State, field)) /* Trace number is determined from per-trace exit stubs. */ #define emit_setvmstate(as, i) UNUSED(i) /* -- Emit control-flow instructions -------------------------------------- */ /* Label for internal jumps. */ typedef MCode *MCLabel; /* Return label pointing to current PC. */ #define emit_label(as) ((as)->mcp) static void emit_branch(ASMState *as, MIPSIns mi, Reg rs, Reg rt, MCode *target) { MCode *p = as->mcp; ptrdiff_t delta = target - p; lua_assert(((delta + 0x8000) >> 16) == 0); *--p = mi | MIPSF_S(rs) | MIPSF_T(rt) | ((uint32_t)delta & 0xffffu); as->mcp = p; } static void emit_jmp(ASMState *as, MCode *target) { *--as->mcp = MIPSI_NOP; emit_branch(as, MIPSI_B, RID_ZERO, RID_ZERO, (target)); } static void emit_call(ASMState *as, void *target) { MCode *p = as->mcp; *--p = MIPSI_NOP; if ((((uintptr_t)target ^ (uintptr_t)p) >> 28) == 0) *--p = MIPSI_JAL | (((uintptr_t)target >>2) & 0x03ffffffu); else /* Target out of range: need indirect call. */ *--p = MIPSI_JALR | MIPSF_S(RID_CFUNCADDR); as->mcp = p; ra_allockreg(as, i32ptr(target), RID_CFUNCADDR); } /* -- Emit generic operations --------------------------------------------- */ #define emit_move(as, dst, src) \ emit_ds(as, MIPSI_MOVE, (dst), (src)) /* Generic move between two regs. */ static void emit_movrr(ASMState *as, IRIns *ir, Reg dst, Reg src) { if (dst < RID_MAX_GPR) emit_move(as, dst, src); else emit_fg(as, irt_isnum(ir->t) ? MIPSI_MOV_D : MIPSI_MOV_S, dst, src); } /* Generic load of register from stack slot. */ static void emit_spload(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { if (r < RID_MAX_GPR) emit_tsi(as, MIPSI_LW, r, RID_SP, ofs); else emit_tsi(as, irt_isnum(ir->t) ? MIPSI_LDC1 : MIPSI_LWC1, (r & 31), RID_SP, ofs); } /* Generic store of register to stack slot. */ static void emit_spstore(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { if (r < RID_MAX_GPR) emit_tsi(as, MIPSI_SW, r, RID_SP, ofs); else emit_tsi(as, irt_isnum(ir->t) ? MIPSI_SDC1 : MIPSI_SWC1, (r&31), RID_SP, ofs); } /* Add offset to pointer. */ static void emit_addptr(ASMState *as, Reg r, int32_t ofs) { if (ofs) { lua_assert(checki16(ofs)); emit_tsi(as, MIPSI_ADDIU, r, r, ofs); } } #define emit_spsub(as, ofs) emit_addptr(as, RID_SP, -(ofs)) tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_char.o0000664000000000000000000000244012213333047022150 0ustar rootrootELF>@@ GCC: (Debian 4.7.3-4) 4.7.3.symtab.strtab.shstrtab.text.data.bss.rodata.comment.note.GNU-stack@!@'@,@ 40A=^^M0   lj_char.clj_char_bitstarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_gc.c0000664000000000000000000006320312231715321021613 0ustar rootroot/* ** Garbage collector. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_gc_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_func.h" #include "lj_udata.h" #include "lj_meta.h" #include "lj_state.h" #include "lj_frame.h" #if LJ_HASFFI #include "lj_ctype.h" #include "lj_cdata.h" #endif #include "lj_trace.h" #include "lj_vm.h" #define GCSTEPSIZE 1024u #define GCSWEEPMAX 40 #define GCSWEEPCOST 10 #define GCFINALIZECOST 100 /* Macros to set GCobj colors and flags. */ #define white2gray(x) ((x)->gch.marked &= (uint8_t)~LJ_GC_WHITES) #define gray2black(x) ((x)->gch.marked |= LJ_GC_BLACK) #define isfinalized(u) ((u)->marked & LJ_GC_FINALIZED) /* -- Mark phase ---------------------------------------------------------- */ /* Mark a TValue (if needed). */ #define gc_marktv(g, tv) \ { lua_assert(!tvisgcv(tv) || (~itype(tv) == gcval(tv)->gch.gct)); \ if (tviswhite(tv)) gc_mark(g, gcV(tv)); } /* Mark a GCobj (if needed). */ #define gc_markobj(g, o) \ { if (iswhite(obj2gco(o))) gc_mark(g, obj2gco(o)); } /* Mark a string object. */ #define gc_mark_str(s) ((s)->marked &= (uint8_t)~LJ_GC_WHITES) /* Mark a white GCobj. */ static void gc_mark(global_State *g, GCobj *o) { int gct = o->gch.gct; lua_assert(iswhite(o) && !isdead(g, o)); white2gray(o); if (LJ_UNLIKELY(gct == ~LJ_TUDATA)) { GCtab *mt = tabref(gco2ud(o)->metatable); gray2black(o); /* Userdata are never gray. */ if (mt) gc_markobj(g, mt); gc_markobj(g, tabref(gco2ud(o)->env)); } else if (LJ_UNLIKELY(gct == ~LJ_TUPVAL)) { GCupval *uv = gco2uv(o); gc_marktv(g, uvval(uv)); if (uv->closed) gray2black(o); /* Closed upvalues are never gray. */ } else if (gct != ~LJ_TSTR && gct != ~LJ_TCDATA) { lua_assert(gct == ~LJ_TFUNC || gct == ~LJ_TTAB || gct == ~LJ_TTHREAD || gct == ~LJ_TPROTO); setgcrefr(o->gch.gclist, g->gc.gray); setgcref(g->gc.gray, o); } } /* Mark GC roots. */ static void gc_mark_gcroot(global_State *g) { ptrdiff_t i; for (i = 0; i < GCROOT_MAX; i++) if (gcref(g->gcroot[i]) != NULL) gc_markobj(g, gcref(g->gcroot[i])); } /* Start a GC cycle and mark the root set. */ static void gc_mark_start(global_State *g) { setgcrefnull(g->gc.gray); setgcrefnull(g->gc.grayagain); setgcrefnull(g->gc.weak); gc_markobj(g, mainthread(g)); gc_markobj(g, tabref(mainthread(g)->env)); gc_marktv(g, &g->registrytv); gc_mark_gcroot(g); g->gc.state = GCSpropagate; } /* Mark open upvalues. */ static void gc_mark_uv(global_State *g) { GCupval *uv; for (uv = uvnext(&g->uvhead); uv != &g->uvhead; uv = uvnext(uv)) { lua_assert(uvprev(uvnext(uv)) == uv && uvnext(uvprev(uv)) == uv); if (isgray(obj2gco(uv))) gc_marktv(g, uvval(uv)); } } /* Mark userdata in mmudata list. */ static void gc_mark_mmudata(global_State *g) { GCobj *root = gcref(g->gc.mmudata); GCobj *u = root; if (u) { do { u = gcnext(u); makewhite(g, u); /* Could be from previous GC. */ gc_mark(g, u); } while (u != root); } } /* Separate userdata objects to be finalized to mmudata list. */ size_t lj_gc_separateudata(global_State *g, int all) { size_t m = 0; GCRef *p = &mainthread(g)->nextgc; GCobj *o; while ((o = gcref(*p)) != NULL) { if (!(iswhite(o) || all) || isfinalized(gco2ud(o))) { p = &o->gch.nextgc; /* Nothing to do. */ } else if (!lj_meta_fastg(g, tabref(gco2ud(o)->metatable), MM_gc)) { markfinalized(o); /* Done, as there's no __gc metamethod. */ p = &o->gch.nextgc; } else { /* Otherwise move userdata to be finalized to mmudata list. */ m += sizeudata(gco2ud(o)); markfinalized(o); *p = o->gch.nextgc; if (gcref(g->gc.mmudata)) { /* Link to end of mmudata list. */ GCobj *root = gcref(g->gc.mmudata); setgcrefr(o->gch.nextgc, root->gch.nextgc); setgcref(root->gch.nextgc, o); setgcref(g->gc.mmudata, o); } else { /* Create circular list. */ setgcref(o->gch.nextgc, o); setgcref(g->gc.mmudata, o); } } } return m; } /* -- Propagation phase --------------------------------------------------- */ /* Traverse a table. */ static int gc_traverse_tab(global_State *g, GCtab *t) { int weak = 0; cTValue *mode; GCtab *mt = tabref(t->metatable); if (mt) gc_markobj(g, mt); mode = lj_meta_fastg(g, mt, MM_mode); if (mode && tvisstr(mode)) { /* Valid __mode field? */ const char *modestr = strVdata(mode); int c; while ((c = *modestr++)) { if (c == 'k') weak |= LJ_GC_WEAKKEY; else if (c == 'v') weak |= LJ_GC_WEAKVAL; else if (c == 'K') weak = (int)(~0u & ~LJ_GC_WEAKVAL); } if (weak > 0) { /* Weak tables are cleared in the atomic phase. */ t->marked = (uint8_t)((t->marked & ~LJ_GC_WEAK) | weak); setgcrefr(t->gclist, g->gc.weak); setgcref(g->gc.weak, obj2gco(t)); } } if (weak == LJ_GC_WEAK) /* Nothing to mark if both keys/values are weak. */ return 1; if (!(weak & LJ_GC_WEAKVAL)) { /* Mark array part. */ MSize i, asize = t->asize; for (i = 0; i < asize; i++) gc_marktv(g, arrayslot(t, i)); } if (t->hmask > 0) { /* Mark hash part. */ Node *node = noderef(t->node); MSize i, hmask = t->hmask; for (i = 0; i <= hmask; i++) { Node *n = &node[i]; if (!tvisnil(&n->val)) { /* Mark non-empty slot. */ lua_assert(!tvisnil(&n->key)); if (!(weak & LJ_GC_WEAKKEY)) gc_marktv(g, &n->key); if (!(weak & LJ_GC_WEAKVAL)) gc_marktv(g, &n->val); } } } return weak; } /* Traverse a function. */ static void gc_traverse_func(global_State *g, GCfunc *fn) { gc_markobj(g, tabref(fn->c.env)); if (isluafunc(fn)) { uint32_t i; lua_assert(fn->l.nupvalues <= funcproto(fn)->sizeuv); gc_markobj(g, funcproto(fn)); for (i = 0; i < fn->l.nupvalues; i++) /* Mark Lua function upvalues. */ gc_markobj(g, &gcref(fn->l.uvptr[i])->uv); } else { uint32_t i; for (i = 0; i < fn->c.nupvalues; i++) /* Mark C function upvalues. */ gc_marktv(g, &fn->c.upvalue[i]); } } #if LJ_HASJIT /* Mark a trace. */ static void gc_marktrace(global_State *g, TraceNo traceno) { GCobj *o = obj2gco(traceref(G2J(g), traceno)); lua_assert(traceno != G2J(g)->cur.traceno); if (iswhite(o)) { white2gray(o); setgcrefr(o->gch.gclist, g->gc.gray); setgcref(g->gc.gray, o); } } /* Traverse a trace. */ static void gc_traverse_trace(global_State *g, GCtrace *T) { IRRef ref; if (T->traceno == 0) return; for (ref = T->nk; ref < REF_TRUE; ref++) { IRIns *ir = &T->ir[ref]; if (ir->o == IR_KGC) gc_markobj(g, ir_kgc(ir)); } if (T->link) gc_marktrace(g, T->link); if (T->nextroot) gc_marktrace(g, T->nextroot); if (T->nextside) gc_marktrace(g, T->nextside); gc_markobj(g, gcref(T->startpt)); } /* The current trace is a GC root while not anchored in the prototype (yet). */ #define gc_traverse_curtrace(g) gc_traverse_trace(g, &G2J(g)->cur) #else #define gc_traverse_curtrace(g) UNUSED(g) #endif /* Traverse a prototype. */ static void gc_traverse_proto(global_State *g, GCproto *pt) { ptrdiff_t i; gc_mark_str(proto_chunkname(pt)); for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) /* Mark collectable consts. */ gc_markobj(g, proto_kgc(pt, i)); #if LJ_HASJIT if (pt->trace) gc_marktrace(g, pt->trace); #endif } /* Traverse the frame structure of a stack. */ static MSize gc_traverse_frames(global_State *g, lua_State *th) { TValue *frame, *top = th->top-1, *bot = tvref(th->stack); /* Note: extra vararg frame not skipped, marks function twice (harmless). */ for (frame = th->base-1; frame > bot; frame = frame_prev(frame)) { GCfunc *fn = frame_func(frame); TValue *ftop = frame; if (isluafunc(fn)) ftop += funcproto(fn)->framesize; if (ftop > top) top = ftop; gc_markobj(g, fn); /* Need to mark hidden function (or L). */ } top++; /* Correct bias of -1 (frame == base-1). */ if (top > tvref(th->maxstack)) top = tvref(th->maxstack); return (MSize)(top - bot); /* Return minimum needed stack size. */ } /* Traverse a thread object. */ static void gc_traverse_thread(global_State *g, lua_State *th) { TValue *o, *top = th->top; for (o = tvref(th->stack)+1; o < top; o++) gc_marktv(g, o); if (g->gc.state == GCSatomic) { top = tvref(th->stack) + th->stacksize; for (; o < top; o++) /* Clear unmarked slots. */ setnilV(o); } gc_markobj(g, tabref(th->env)); lj_state_shrinkstack(th, gc_traverse_frames(g, th)); } /* Propagate one gray object. Traverse it and turn it black. */ static size_t propagatemark(global_State *g) { GCobj *o = gcref(g->gc.gray); int gct = o->gch.gct; lua_assert(isgray(o)); gray2black(o); setgcrefr(g->gc.gray, o->gch.gclist); /* Remove from gray list. */ if (LJ_LIKELY(gct == ~LJ_TTAB)) { GCtab *t = gco2tab(o); if (gc_traverse_tab(g, t) > 0) black2gray(o); /* Keep weak tables gray. */ return sizeof(GCtab) + sizeof(TValue) * t->asize + sizeof(Node) * (t->hmask + 1); } else if (LJ_LIKELY(gct == ~LJ_TFUNC)) { GCfunc *fn = gco2func(o); gc_traverse_func(g, fn); return isluafunc(fn) ? sizeLfunc((MSize)fn->l.nupvalues) : sizeCfunc((MSize)fn->c.nupvalues); } else if (LJ_LIKELY(gct == ~LJ_TPROTO)) { GCproto *pt = gco2pt(o); gc_traverse_proto(g, pt); return pt->sizept; } else if (LJ_LIKELY(gct == ~LJ_TTHREAD)) { lua_State *th = gco2th(o); setgcrefr(th->gclist, g->gc.grayagain); setgcref(g->gc.grayagain, o); black2gray(o); /* Threads are never black. */ gc_traverse_thread(g, th); return sizeof(lua_State) + sizeof(TValue) * th->stacksize; } else { #if LJ_HASJIT GCtrace *T = gco2trace(o); gc_traverse_trace(g, T); return ((sizeof(GCtrace)+7)&~7) + (T->nins-T->nk)*sizeof(IRIns) + T->nsnap*sizeof(SnapShot) + T->nsnapmap*sizeof(SnapEntry); #else lua_assert(0); return 0; #endif } } /* Propagate all gray objects. */ static size_t gc_propagate_gray(global_State *g) { size_t m = 0; while (gcref(g->gc.gray) != NULL) m += propagatemark(g); return m; } /* -- Sweep phase --------------------------------------------------------- */ /* Try to shrink some common data structures. */ static void gc_shrink(global_State *g, lua_State *L) { if (g->strnum <= (g->strmask >> 2) && g->strmask > LJ_MIN_STRTAB*2-1) lj_str_resize(L, g->strmask >> 1); /* Shrink string table. */ if (g->tmpbuf.sz > LJ_MIN_SBUF*2) lj_str_resizebuf(L, &g->tmpbuf, g->tmpbuf.sz >> 1); /* Shrink temp buf. */ } /* Type of GC free functions. */ typedef void (LJ_FASTCALL *GCFreeFunc)(global_State *g, GCobj *o); /* GC free functions for LJ_TSTR .. LJ_TUDATA. ORDER LJ_T */ static const GCFreeFunc gc_freefunc[] = { (GCFreeFunc)lj_str_free, (GCFreeFunc)lj_func_freeuv, (GCFreeFunc)lj_state_free, (GCFreeFunc)lj_func_freeproto, (GCFreeFunc)lj_func_free, #if LJ_HASJIT (GCFreeFunc)lj_trace_free, #else (GCFreeFunc)0, #endif #if LJ_HASFFI (GCFreeFunc)lj_cdata_free, #else (GCFreeFunc)0, #endif (GCFreeFunc)lj_tab_free, (GCFreeFunc)lj_udata_free }; /* Full sweep of a GC list. */ #define gc_fullsweep(g, p) gc_sweep(g, (p), LJ_MAX_MEM) /* Partial sweep of a GC list. */ static GCRef *gc_sweep(global_State *g, GCRef *p, uint32_t lim) { /* Mask with other white and LJ_GC_FIXED. Or LJ_GC_SFIXED on shutdown. */ int ow = otherwhite(g); GCobj *o; while ((o = gcref(*p)) != NULL && lim-- > 0) { if (o->gch.gct == ~LJ_TTHREAD) /* Need to sweep open upvalues, too. */ gc_fullsweep(g, &gco2th(o)->openupval); if (((o->gch.marked ^ LJ_GC_WHITES) & ow)) { /* Black or current white? */ lua_assert(!isdead(g, o) || (o->gch.marked & LJ_GC_FIXED)); makewhite(g, o); /* Value is alive, change to the current white. */ p = &o->gch.nextgc; } else { /* Otherwise value is dead, free it. */ lua_assert(isdead(g, o) || ow == LJ_GC_SFIXED); setgcrefr(*p, o->gch.nextgc); if (o == gcref(g->gc.root)) setgcrefr(g->gc.root, o->gch.nextgc); /* Adjust list anchor. */ gc_freefunc[o->gch.gct - ~LJ_TSTR](g, o); } } return p; } /* Check whether we can clear a key or a value slot from a table. */ static int gc_mayclear(cTValue *o, int val) { if (tvisgcv(o)) { /* Only collectable objects can be weak references. */ if (tvisstr(o)) { /* But strings cannot be used as weak references. */ gc_mark_str(strV(o)); /* And need to be marked. */ return 0; } if (iswhite(gcV(o))) return 1; /* Object is about to be collected. */ if (tvisudata(o) && val && isfinalized(udataV(o))) return 1; /* Finalized userdata is dropped only from values. */ } return 0; /* Cannot clear. */ } /* Clear collected entries from weak tables. */ static void gc_clearweak(GCobj *o) { while (o) { GCtab *t = gco2tab(o); lua_assert((t->marked & LJ_GC_WEAK)); if ((t->marked & LJ_GC_WEAKVAL)) { MSize i, asize = t->asize; for (i = 0; i < asize; i++) { /* Clear array slot when value is about to be collected. */ TValue *tv = arrayslot(t, i); if (gc_mayclear(tv, 1)) setnilV(tv); } } if (t->hmask > 0) { Node *node = noderef(t->node); MSize i, hmask = t->hmask; for (i = 0; i <= hmask; i++) { Node *n = &node[i]; /* Clear hash slot when key or value is about to be collected. */ if (!tvisnil(&n->val) && (gc_mayclear(&n->key, 0) || gc_mayclear(&n->val, 1))) setnilV(&n->val); } } o = gcref(t->gclist); } } /* Call a userdata or cdata finalizer. */ static void gc_call_finalizer(global_State *g, lua_State *L, cTValue *mo, GCobj *o) { /* Save and restore lots of state around the __gc callback. */ uint8_t oldh = hook_save(g); MSize oldt = g->gc.threshold; int errcode; TValue *top; lj_trace_abort(g); top = L->top; L->top = top+2; hook_entergc(g); /* Disable hooks and new traces during __gc. */ g->gc.threshold = LJ_MAX_MEM; /* Prevent GC steps. */ copyTV(L, top, mo); setgcV(L, top+1, o, ~o->gch.gct); errcode = lj_vm_pcall(L, top+1, 1+0, -1); /* Stack: |mo|o| -> | */ hook_restore(g, oldh); g->gc.threshold = oldt; /* Restore GC threshold. */ if (errcode) lj_err_throw(L, errcode); /* Propagate errors. */ } /* Finalize one userdata or cdata object from the mmudata list. */ static void gc_finalize(lua_State *L) { global_State *g = G(L); GCobj *o = gcnext(gcref(g->gc.mmudata)); cTValue *mo; lua_assert(gcref(g->jit_L) == NULL); /* Must not be called on trace. */ /* Unchain from list of userdata to be finalized. */ if (o == gcref(g->gc.mmudata)) setgcrefnull(g->gc.mmudata); else setgcrefr(gcref(g->gc.mmudata)->gch.nextgc, o->gch.nextgc); #if LJ_HASFFI if (o->gch.gct == ~LJ_TCDATA) { TValue tmp, *tv; /* Add cdata back to the GC list and make it white. */ setgcrefr(o->gch.nextgc, g->gc.root); setgcref(g->gc.root, o); makewhite(g, o); o->gch.marked &= (uint8_t)~LJ_GC_CDATA_FIN; /* Resolve finalizer. */ setcdataV(L, &tmp, gco2cd(o)); tv = lj_tab_set(L, ctype_ctsG(g)->finalizer, &tmp); if (!tvisnil(tv)) { g->gc.nocdatafin = 0; copyTV(L, &tmp, tv); setnilV(tv); /* Clear entry in finalizer table. */ gc_call_finalizer(g, L, &tmp, o); } return; } #endif /* Add userdata back to the main userdata list and make it white. */ setgcrefr(o->gch.nextgc, mainthread(g)->nextgc); setgcref(mainthread(g)->nextgc, o); makewhite(g, o); /* Resolve the __gc metamethod. */ mo = lj_meta_fastg(g, tabref(gco2ud(o)->metatable), MM_gc); if (mo) gc_call_finalizer(g, L, mo, o); } /* Finalize all userdata objects from mmudata list. */ void lj_gc_finalize_udata(lua_State *L) { while (gcref(G(L)->gc.mmudata) != NULL) gc_finalize(L); } #if LJ_HASFFI /* Finalize all cdata objects from finalizer table. */ void lj_gc_finalize_cdata(lua_State *L) { global_State *g = G(L); CTState *cts = ctype_ctsG(g); if (cts) { GCtab *t = cts->finalizer; Node *node = noderef(t->node); ptrdiff_t i; setgcrefnull(t->metatable); /* Mark finalizer table as disabled. */ for (i = (ptrdiff_t)t->hmask; i >= 0; i--) if (!tvisnil(&node[i].val) && tviscdata(&node[i].key)) { GCobj *o = gcV(&node[i].key); TValue tmp; makewhite(g, o); o->gch.marked &= (uint8_t)~LJ_GC_CDATA_FIN; copyTV(L, &tmp, &node[i].val); setnilV(&node[i].val); gc_call_finalizer(g, L, &tmp, o); } } } #endif /* Free all remaining GC objects. */ void lj_gc_freeall(global_State *g) { MSize i, strmask; /* Free everything, except super-fixed objects (the main thread). */ g->gc.currentwhite = LJ_GC_WHITES | LJ_GC_SFIXED; gc_fullsweep(g, &g->gc.root); strmask = g->strmask; for (i = 0; i <= strmask; i++) /* Free all string hash chains. */ gc_fullsweep(g, &g->strhash[i]); } /* -- Collector ----------------------------------------------------------- */ /* Atomic part of the GC cycle, transitioning from mark to sweep phase. */ static void atomic(global_State *g, lua_State *L) { size_t udsize; gc_mark_uv(g); /* Need to remark open upvalues (the thread may be dead). */ gc_propagate_gray(g); /* Propagate any left-overs. */ setgcrefr(g->gc.gray, g->gc.weak); /* Empty the list of weak tables. */ setgcrefnull(g->gc.weak); lua_assert(!iswhite(obj2gco(mainthread(g)))); gc_markobj(g, L); /* Mark running thread. */ gc_traverse_curtrace(g); /* Traverse current trace. */ gc_mark_gcroot(g); /* Mark GC roots (again). */ gc_propagate_gray(g); /* Propagate all of the above. */ setgcrefr(g->gc.gray, g->gc.grayagain); /* Empty the 2nd chance list. */ setgcrefnull(g->gc.grayagain); gc_propagate_gray(g); /* Propagate it. */ udsize = lj_gc_separateudata(g, 0); /* Separate userdata to be finalized. */ gc_mark_mmudata(g); /* Mark them. */ udsize += gc_propagate_gray(g); /* And propagate the marks. */ /* All marking done, clear weak tables. */ gc_clearweak(gcref(g->gc.weak)); /* Prepare for sweep phase. */ g->gc.currentwhite = (uint8_t)otherwhite(g); /* Flip current white. */ g->strempty.marked = g->gc.currentwhite; setmref(g->gc.sweep, &g->gc.root); g->gc.estimate = g->gc.total - (MSize)udsize; /* Initial estimate. */ } /* GC state machine. Returns a cost estimate for each step performed. */ static size_t gc_onestep(lua_State *L) { global_State *g = G(L); switch (g->gc.state) { case GCSpause: gc_mark_start(g); /* Start a new GC cycle by marking all GC roots. */ return 0; case GCSpropagate: if (gcref(g->gc.gray) != NULL) return propagatemark(g); /* Propagate one gray object. */ g->gc.state = GCSatomic; /* End of mark phase. */ return 0; case GCSatomic: if (gcref(g->jit_L)) /* Don't run atomic phase on trace. */ return LJ_MAX_MEM; atomic(g, L); g->gc.state = GCSsweepstring; /* Start of sweep phase. */ g->gc.sweepstr = 0; return 0; case GCSsweepstring: { MSize old = g->gc.total; gc_fullsweep(g, &g->strhash[g->gc.sweepstr++]); /* Sweep one chain. */ if (g->gc.sweepstr > g->strmask) g->gc.state = GCSsweep; /* All string hash chains sweeped. */ lua_assert(old >= g->gc.total); g->gc.estimate -= old - g->gc.total; return GCSWEEPCOST; } case GCSsweep: { MSize old = g->gc.total; setmref(g->gc.sweep, gc_sweep(g, mref(g->gc.sweep, GCRef), GCSWEEPMAX)); if (gcref(*mref(g->gc.sweep, GCRef)) == NULL) { gc_shrink(g, L); if (gcref(g->gc.mmudata)) { /* Need any finalizations? */ g->gc.state = GCSfinalize; #if LJ_HASFFI g->gc.nocdatafin = 1; #endif } else { /* Otherwise skip this phase to help the JIT. */ g->gc.state = GCSpause; /* End of GC cycle. */ g->gc.debt = 0; } } lua_assert(old >= g->gc.total); g->gc.estimate -= old - g->gc.total; return GCSWEEPMAX*GCSWEEPCOST; } case GCSfinalize: if (gcref(g->gc.mmudata) != NULL) { if (gcref(g->jit_L)) /* Don't call finalizers on trace. */ return LJ_MAX_MEM; gc_finalize(L); /* Finalize one userdata object. */ if (g->gc.estimate > GCFINALIZECOST) g->gc.estimate -= GCFINALIZECOST; return GCFINALIZECOST; } #if LJ_HASFFI if (!g->gc.nocdatafin) lj_tab_rehash(L, ctype_ctsG(g)->finalizer); #endif g->gc.state = GCSpause; /* End of GC cycle. */ g->gc.debt = 0; return 0; default: lua_assert(0); return 0; } } /* Perform a limited amount of incremental GC steps. */ int LJ_FASTCALL lj_gc_step(lua_State *L) { global_State *g = G(L); MSize lim; int32_t ostate = g->vmstate; setvmstate(g, GC); lim = (GCSTEPSIZE/100) * g->gc.stepmul; if (lim == 0) lim = LJ_MAX_MEM; g->gc.debt += g->gc.total - g->gc.threshold; do { lim -= (MSize)gc_onestep(L); if (g->gc.state == GCSpause) { g->gc.threshold = (g->gc.estimate/100) * g->gc.pause; g->vmstate = ostate; return 1; /* Finished a GC cycle. */ } } while ((int32_t)lim > 0); if (g->gc.debt < GCSTEPSIZE) { g->gc.threshold = g->gc.total + GCSTEPSIZE; } else { g->gc.debt -= GCSTEPSIZE; g->gc.threshold = g->gc.total; } g->vmstate = ostate; return 0; } /* Ditto, but fix the stack top first. */ void LJ_FASTCALL lj_gc_step_fixtop(lua_State *L) { if (curr_funcisL(L)) L->top = curr_topL(L); lj_gc_step(L); } #if LJ_HASJIT /* Perform multiple GC steps. Called from JIT-compiled code. */ int LJ_FASTCALL lj_gc_step_jit(global_State *g, MSize steps) { lua_State *L = gco2th(gcref(g->jit_L)); L->base = mref(G(L)->jit_base, TValue); L->top = curr_topL(L); while (steps-- > 0 && lj_gc_step(L) == 0) ; /* Return 1 to force a trace exit. */ return (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize); } #endif /* Perform a full GC cycle. */ void lj_gc_fullgc(lua_State *L) { global_State *g = G(L); int32_t ostate = g->vmstate; setvmstate(g, GC); if (g->gc.state <= GCSatomic) { /* Caught somewhere in the middle. */ setmref(g->gc.sweep, &g->gc.root); /* Sweep everything (preserving it). */ setgcrefnull(g->gc.gray); /* Reset lists from partial propagation. */ setgcrefnull(g->gc.grayagain); setgcrefnull(g->gc.weak); g->gc.state = GCSsweepstring; /* Fast forward to the sweep phase. */ g->gc.sweepstr = 0; } while (g->gc.state == GCSsweepstring || g->gc.state == GCSsweep) gc_onestep(L); /* Finish sweep. */ lua_assert(g->gc.state == GCSfinalize || g->gc.state == GCSpause); /* Now perform a full GC. */ g->gc.state = GCSpause; do { gc_onestep(L); } while (g->gc.state != GCSpause); g->gc.threshold = (g->gc.estimate/100) * g->gc.pause; g->vmstate = ostate; } /* -- Write barriers ------------------------------------------------------ */ /* Move the GC propagation frontier forward. */ void lj_gc_barrierf(global_State *g, GCobj *o, GCobj *v) { lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o)); lua_assert(g->gc.state != GCSfinalize && g->gc.state != GCSpause); lua_assert(o->gch.gct != ~LJ_TTAB); /* Preserve invariant during propagation. Otherwise it doesn't matter. */ if (g->gc.state == GCSpropagate || g->gc.state == GCSatomic) gc_mark(g, v); /* Move frontier forward. */ else makewhite(g, o); /* Make it white to avoid the following barrier. */ } /* Specialized barrier for closed upvalue. Pass &uv->tv. */ void LJ_FASTCALL lj_gc_barrieruv(global_State *g, TValue *tv) { #define TV2MARKED(x) \ (*((uint8_t *)(x) - offsetof(GCupval, tv) + offsetof(GCupval, marked))) if (g->gc.state == GCSpropagate || g->gc.state == GCSatomic) gc_mark(g, gcV(tv)); else TV2MARKED(tv) = (TV2MARKED(tv) & (uint8_t)~LJ_GC_COLORS) | curwhite(g); #undef TV2MARKED } /* Close upvalue. Also needs a write barrier. */ void lj_gc_closeuv(global_State *g, GCupval *uv) { GCobj *o = obj2gco(uv); /* Copy stack slot to upvalue itself and point to the copy. */ copyTV(mainthread(g), &uv->tv, uvval(uv)); setmref(uv->v, &uv->tv); uv->closed = 1; setgcrefr(o->gch.nextgc, g->gc.root); setgcref(g->gc.root, o); if (isgray(o)) { /* A closed upvalue is never gray, so fix this. */ if (g->gc.state == GCSpropagate || g->gc.state == GCSatomic) { gray2black(o); /* Make it black and preserve invariant. */ if (tviswhite(&uv->tv)) lj_gc_barrierf(g, o, gcV(&uv->tv)); } else { makewhite(g, o); /* Make it white, i.e. sweep the upvalue. */ lua_assert(g->gc.state != GCSfinalize && g->gc.state != GCSpause); } } } #if LJ_HASJIT /* Mark a trace if it's saved during the propagation phase. */ void lj_gc_barriertrace(global_State *g, uint32_t traceno) { if (g->gc.state == GCSpropagate || g->gc.state == GCSatomic) gc_marktrace(g, traceno); } #endif /* -- Allocator ----------------------------------------------------------- */ /* Call pluggable memory allocator to allocate or resize a fragment. */ void *lj_mem_realloc(lua_State *L, void *p, MSize osz, MSize nsz) { global_State *g = G(L); lua_assert((osz == 0) == (p == NULL)); p = g->allocf(g->allocd, p, osz, nsz); if (p == NULL && nsz > 0) lj_err_mem(L); lua_assert((nsz == 0) == (p == NULL)); lua_assert(checkptr32(p)); g->gc.total = (g->gc.total - osz) + nsz; return p; } /* Allocate new GC object and link it to the root set. */ void * LJ_FASTCALL lj_mem_newgco(lua_State *L, MSize size) { global_State *g = G(L); GCobj *o = (GCobj *)g->allocf(g->allocd, NULL, 0, size); if (o == NULL) lj_err_mem(L); lua_assert(checkptr32(o)); g->gc.total += size; setgcrefr(o->gch.nextgc, g->gc.root); setgcref(g->gc.root, o); newwhite(g, o); return o; } /* Resize growable vector. */ void *lj_mem_grow(lua_State *L, void *p, MSize *szp, MSize lim, MSize esz) { MSize sz = (*szp) << 1; if (sz < LJ_MIN_VECSZ) sz = LJ_MIN_VECSZ; if (sz > lim) sz = lim; p = lj_mem_realloc(L, p, (*szp)*esz, sz*esz); *szp = sz; return p; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lib_base.c0000664000000000000000000004121712202141143022267 0ustar rootroot/* ** Base and coroutine library. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Major portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2011 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #include #define lib_base_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lj_obj.h" #include "lj_gc.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_meta.h" #include "lj_state.h" #if LJ_HASFFI #include "lj_ctype.h" #include "lj_cconv.h" #endif #include "lj_bc.h" #include "lj_ff.h" #include "lj_dispatch.h" #include "lj_char.h" #include "lj_strscan.h" #include "lj_lib.h" /* -- Base library: checks ------------------------------------------------ */ #define LJLIB_MODULE_base LJLIB_ASM(assert) LJLIB_REC(.) { GCstr *s; lj_lib_checkany(L, 1); s = lj_lib_optstr(L, 2); if (s) lj_err_callermsg(L, strdata(s)); else lj_err_caller(L, LJ_ERR_ASSERT); return FFH_UNREACHABLE; } /* ORDER LJ_T */ LJLIB_PUSH("nil") LJLIB_PUSH("boolean") LJLIB_PUSH(top-1) /* boolean */ LJLIB_PUSH("userdata") LJLIB_PUSH("string") LJLIB_PUSH("upval") LJLIB_PUSH("thread") LJLIB_PUSH("proto") LJLIB_PUSH("function") LJLIB_PUSH("trace") LJLIB_PUSH("cdata") LJLIB_PUSH("table") LJLIB_PUSH(top-9) /* userdata */ LJLIB_PUSH("number") LJLIB_ASM_(type) LJLIB_REC(.) /* Recycle the lj_lib_checkany(L, 1) from assert. */ /* -- Base library: iterators --------------------------------------------- */ /* This solves a circular dependency problem -- change FF_next_N as needed. */ LJ_STATIC_ASSERT((int)FF_next == FF_next_N); LJLIB_ASM(next) { lj_lib_checktab(L, 1); return FFH_UNREACHABLE; } #if LJ_52 || LJ_HASFFI static int ffh_pairs(lua_State *L, MMS mm) { TValue *o = lj_lib_checkany(L, 1); cTValue *mo = lj_meta_lookup(L, o, mm); if ((LJ_52 || tviscdata(o)) && !tvisnil(mo)) { L->top = o+1; /* Only keep one argument. */ copyTV(L, L->base-1, mo); /* Replace callable. */ return FFH_TAILCALL; } else { if (!tvistab(o)) lj_err_argt(L, 1, LUA_TTABLE); setfuncV(L, o-1, funcV(lj_lib_upvalue(L, 1))); if (mm == MM_pairs) setnilV(o+1); else setintV(o+1, 0); return FFH_RES(3); } } #else #define ffh_pairs(L, mm) (lj_lib_checktab(L, 1), FFH_UNREACHABLE) #endif LJLIB_PUSH(lastcl) LJLIB_ASM(pairs) { return ffh_pairs(L, MM_pairs); } LJLIB_NOREGUV LJLIB_ASM(ipairs_aux) LJLIB_REC(.) { lj_lib_checktab(L, 1); lj_lib_checkint(L, 2); return FFH_UNREACHABLE; } LJLIB_PUSH(lastcl) LJLIB_ASM(ipairs) LJLIB_REC(.) { return ffh_pairs(L, MM_ipairs); } /* -- Base library: getters and setters ----------------------------------- */ LJLIB_ASM_(getmetatable) LJLIB_REC(.) /* Recycle the lj_lib_checkany(L, 1) from assert. */ LJLIB_ASM(setmetatable) LJLIB_REC(.) { GCtab *t = lj_lib_checktab(L, 1); GCtab *mt = lj_lib_checktabornil(L, 2); if (!tvisnil(lj_meta_lookup(L, L->base, MM_metatable))) lj_err_caller(L, LJ_ERR_PROTMT); setgcref(t->metatable, obj2gco(mt)); if (mt) { lj_gc_objbarriert(L, t, mt); } settabV(L, L->base-1, t); return FFH_RES(1); } LJLIB_CF(getfenv) { GCfunc *fn; cTValue *o = L->base; if (!(o < L->top && tvisfunc(o))) { int level = lj_lib_optint(L, 1, 1); o = lj_debug_frame(L, level, &level); if (o == NULL) lj_err_arg(L, 1, LJ_ERR_INVLVL); } fn = &gcval(o)->fn; settabV(L, L->top++, isluafunc(fn) ? tabref(fn->l.env) : tabref(L->env)); return 1; } LJLIB_CF(setfenv) { GCfunc *fn; GCtab *t = lj_lib_checktab(L, 2); cTValue *o = L->base; if (!(o < L->top && tvisfunc(o))) { int level = lj_lib_checkint(L, 1); if (level == 0) { /* NOBARRIER: A thread (i.e. L) is never black. */ setgcref(L->env, obj2gco(t)); return 0; } o = lj_debug_frame(L, level, &level); if (o == NULL) lj_err_arg(L, 1, LJ_ERR_INVLVL); } fn = &gcval(o)->fn; if (!isluafunc(fn)) lj_err_caller(L, LJ_ERR_SETFENV); setgcref(fn->l.env, obj2gco(t)); lj_gc_objbarrier(L, obj2gco(fn), t); setfuncV(L, L->top++, fn); return 1; } LJLIB_ASM(rawget) LJLIB_REC(.) { lj_lib_checktab(L, 1); lj_lib_checkany(L, 2); return FFH_UNREACHABLE; } LJLIB_CF(rawset) LJLIB_REC(.) { lj_lib_checktab(L, 1); lj_lib_checkany(L, 2); L->top = 1+lj_lib_checkany(L, 3); lua_rawset(L, 1); return 1; } LJLIB_CF(rawequal) LJLIB_REC(.) { cTValue *o1 = lj_lib_checkany(L, 1); cTValue *o2 = lj_lib_checkany(L, 2); setboolV(L->top-1, lj_obj_equal(o1, o2)); return 1; } #if LJ_52 LJLIB_CF(rawlen) LJLIB_REC(.) { cTValue *o = L->base; int32_t len; if (L->top > o && tvisstr(o)) len = (int32_t)strV(o)->len; else len = (int32_t)lj_tab_len(lj_lib_checktab(L, 1)); setintV(L->top-1, len); return 1; } #endif LJLIB_CF(unpack) { GCtab *t = lj_lib_checktab(L, 1); int32_t n, i = lj_lib_optint(L, 2, 1); int32_t e = (L->base+3-1 < L->top && !tvisnil(L->base+3-1)) ? lj_lib_checkint(L, 3) : (int32_t)lj_tab_len(t); if (i > e) return 0; n = e - i + 1; if (n <= 0 || !lua_checkstack(L, n)) lj_err_caller(L, LJ_ERR_UNPACK); do { cTValue *tv = lj_tab_getint(t, i); if (tv) { copyTV(L, L->top++, tv); } else { setnilV(L->top++); } } while (i++ < e); return n; } LJLIB_CF(select) LJLIB_REC(.) { int32_t n = (int32_t)(L->top - L->base); if (n >= 1 && tvisstr(L->base) && *strVdata(L->base) == '#') { setintV(L->top-1, n-1); return 1; } else { int32_t i = lj_lib_checkint(L, 1); if (i < 0) i = n + i; else if (i > n) i = n; if (i < 1) lj_err_arg(L, 1, LJ_ERR_IDXRNG); return n - i; } } /* -- Base library: conversions ------------------------------------------- */ LJLIB_ASM(tonumber) LJLIB_REC(.) { int32_t base = lj_lib_optint(L, 2, 10); if (base == 10) { TValue *o = lj_lib_checkany(L, 1); if (lj_strscan_numberobj(o)) { copyTV(L, L->base-1, o); return FFH_RES(1); } #if LJ_HASFFI if (tviscdata(o)) { CTState *cts = ctype_cts(L); CType *ct = lj_ctype_rawref(cts, cdataV(o)->ctypeid); if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); if (ctype_isnum(ct->info) || ctype_iscomplex(ct->info)) { if (LJ_DUALNUM && ctype_isinteger_or_bool(ct->info) && ct->size <= 4 && !(ct->size == 4 && (ct->info & CTF_UNSIGNED))) { int32_t i; lj_cconv_ct_tv(cts, ctype_get(cts, CTID_INT32), (uint8_t *)&i, o, 0); setintV(L->base-1, i); return FFH_RES(1); } lj_cconv_ct_tv(cts, ctype_get(cts, CTID_DOUBLE), (uint8_t *)&(L->base-1)->n, o, 0); return FFH_RES(1); } } #endif } else { const char *p = strdata(lj_lib_checkstr(L, 1)); char *ep; unsigned long ul; if (base < 2 || base > 36) lj_err_arg(L, 2, LJ_ERR_BASERNG); ul = strtoul(p, &ep, base); if (p != ep) { while (lj_char_isspace((unsigned char)(*ep))) ep++; if (*ep == '\0') { if (LJ_DUALNUM && LJ_LIKELY(ul < 0x80000000u)) setintV(L->base-1, (int32_t)ul); else setnumV(L->base-1, (lua_Number)ul); return FFH_RES(1); } } } setnilV(L->base-1); return FFH_RES(1); } LJLIB_PUSH("nil") LJLIB_PUSH("false") LJLIB_PUSH("true") LJLIB_ASM(tostring) LJLIB_REC(.) { TValue *o = lj_lib_checkany(L, 1); cTValue *mo; L->top = o+1; /* Only keep one argument. */ if (!tvisnil(mo = lj_meta_lookup(L, o, MM_tostring))) { copyTV(L, L->base-1, mo); /* Replace callable. */ return FFH_TAILCALL; } else { GCstr *s; if (tvisnumber(o)) { s = lj_str_fromnumber(L, o); } else if (tvispri(o)) { s = strV(lj_lib_upvalue(L, -(int32_t)itype(o))); } else { if (tvisfunc(o) && isffunc(funcV(o))) lua_pushfstring(L, "function: builtin#%d", funcV(o)->c.ffid); else lua_pushfstring(L, "%s: %p", lj_typename(o), lua_topointer(L, 1)); /* Note: lua_pushfstring calls the GC which may invalidate o. */ s = strV(L->top-1); } setstrV(L, L->base-1, s); return FFH_RES(1); } } /* -- Base library: throw and catch errors -------------------------------- */ LJLIB_CF(error) { int32_t level = lj_lib_optint(L, 2, 1); lua_settop(L, 1); if (lua_isstring(L, 1) && level > 0) { luaL_where(L, level); lua_pushvalue(L, 1); lua_concat(L, 2); } return lua_error(L); } LJLIB_ASM(pcall) LJLIB_REC(.) { lj_lib_checkany(L, 1); lj_lib_checkfunc(L, 2); /* For xpcall only. */ return FFH_UNREACHABLE; } LJLIB_ASM_(xpcall) LJLIB_REC(.) /* -- Base library: load Lua code ----------------------------------------- */ static int load_aux(lua_State *L, int status, int envarg) { if (status == 0) { if (tvistab(L->base+envarg-1)) { GCfunc *fn = funcV(L->top-1); GCtab *t = tabV(L->base+envarg-1); setgcref(fn->c.env, obj2gco(t)); lj_gc_objbarrier(L, fn, t); } return 1; } else { setnilV(L->top-2); return 2; } } LJLIB_CF(loadfile) { GCstr *fname = lj_lib_optstr(L, 1); GCstr *mode = lj_lib_optstr(L, 2); int status; lua_settop(L, 3); /* Ensure env arg exists. */ status = luaL_loadfilex(L, fname ? strdata(fname) : NULL, mode ? strdata(mode) : NULL); return load_aux(L, status, 3); } static const char *reader_func(lua_State *L, void *ud, size_t *size) { UNUSED(ud); luaL_checkstack(L, 2, "too many nested functions"); copyTV(L, L->top++, L->base); lua_call(L, 0, 1); /* Call user-supplied function. */ L->top--; if (tvisnil(L->top)) { *size = 0; return NULL; } else if (tvisstr(L->top) || tvisnumber(L->top)) { copyTV(L, L->base+4, L->top); /* Anchor string in reserved stack slot. */ return lua_tolstring(L, 5, size); } else { lj_err_caller(L, LJ_ERR_RDRSTR); return NULL; } } LJLIB_CF(load) { GCstr *name = lj_lib_optstr(L, 2); GCstr *mode = lj_lib_optstr(L, 3); int status; if (L->base < L->top && (tvisstr(L->base) || tvisnumber(L->base))) { GCstr *s = lj_lib_checkstr(L, 1); lua_settop(L, 4); /* Ensure env arg exists. */ status = luaL_loadbufferx(L, strdata(s), s->len, strdata(name ? name : s), mode ? strdata(mode) : NULL); } else { lj_lib_checkfunc(L, 1); lua_settop(L, 5); /* Reserve a slot for the string from the reader. */ status = lua_loadx(L, reader_func, NULL, name ? strdata(name) : "=(load)", mode ? strdata(mode) : NULL); } return load_aux(L, status, 4); } LJLIB_CF(loadstring) { return lj_cf_load(L); } LJLIB_CF(dofile) { GCstr *fname = lj_lib_optstr(L, 1); setnilV(L->top); L->top = L->base+1; if (luaL_loadfile(L, fname ? strdata(fname) : NULL) != 0) lua_error(L); lua_call(L, 0, LUA_MULTRET); return (int)(L->top - L->base) - 1; } /* -- Base library: GC control -------------------------------------------- */ LJLIB_CF(gcinfo) { setintV(L->top++, (G(L)->gc.total >> 10)); return 1; } LJLIB_CF(collectgarbage) { int opt = lj_lib_checkopt(L, 1, LUA_GCCOLLECT, /* ORDER LUA_GC* */ "\4stop\7restart\7collect\5count\1\377\4step\10setpause\12setstepmul"); int32_t data = lj_lib_optint(L, 2, 0); if (opt == LUA_GCCOUNT) { setnumV(L->top, (lua_Number)G(L)->gc.total/1024.0); } else { int res = lua_gc(L, opt, data); if (opt == LUA_GCSTEP) setboolV(L->top, res); else setintV(L->top, res); } L->top++; return 1; } /* -- Base library: miscellaneous functions ------------------------------- */ LJLIB_PUSH(top-2) /* Upvalue holds weak table. */ LJLIB_CF(newproxy) { lua_settop(L, 1); lua_newuserdata(L, 0); if (lua_toboolean(L, 1) == 0) { /* newproxy(): without metatable. */ return 1; } else if (lua_isboolean(L, 1)) { /* newproxy(true): with metatable. */ lua_newtable(L); lua_pushvalue(L, -1); lua_pushboolean(L, 1); lua_rawset(L, lua_upvalueindex(1)); /* Remember mt in weak table. */ } else { /* newproxy(proxy): inherit metatable. */ int validproxy = 0; if (lua_getmetatable(L, 1)) { lua_rawget(L, lua_upvalueindex(1)); validproxy = lua_toboolean(L, -1); lua_pop(L, 1); } if (!validproxy) lj_err_arg(L, 1, LJ_ERR_NOPROXY); lua_getmetatable(L, 1); } lua_setmetatable(L, 2); return 1; } LJLIB_PUSH("tostring") LJLIB_CF(print) { ptrdiff_t i, nargs = L->top - L->base; cTValue *tv = lj_tab_getstr(tabref(L->env), strV(lj_lib_upvalue(L, 1))); int shortcut; if (tv && !tvisnil(tv)) { copyTV(L, L->top++, tv); } else { setstrV(L, L->top++, strV(lj_lib_upvalue(L, 1))); lua_gettable(L, LUA_GLOBALSINDEX); tv = L->top-1; } shortcut = (tvisfunc(tv) && funcV(tv)->c.ffid == FF_tostring); for (i = 0; i < nargs; i++) { const char *str; size_t size; cTValue *o = &L->base[i]; if (shortcut && tvisstr(o)) { str = strVdata(o); size = strV(o)->len; } else if (shortcut && tvisint(o)) { char buf[LJ_STR_INTBUF]; char *p = lj_str_bufint(buf, intV(o)); size = (size_t)(buf+LJ_STR_INTBUF-p); str = p; } else if (shortcut && tvisnum(o)) { char buf[LJ_STR_NUMBUF]; size = lj_str_bufnum(buf, o); str = buf; } else { copyTV(L, L->top+1, o); copyTV(L, L->top, L->top-1); L->top += 2; lua_call(L, 1, 1); str = lua_tolstring(L, -1, &size); if (!str) lj_err_caller(L, LJ_ERR_PRTOSTR); L->top--; } if (i) putchar('\t'); fwrite(str, 1, size, stdout); } putchar('\n'); return 0; } LJLIB_PUSH(top-3) LJLIB_SET(_VERSION) #include "lj_libdef.h" /* -- Coroutine library --------------------------------------------------- */ #define LJLIB_MODULE_coroutine LJLIB_CF(coroutine_status) { const char *s; lua_State *co; if (!(L->top > L->base && tvisthread(L->base))) lj_err_arg(L, 1, LJ_ERR_NOCORO); co = threadV(L->base); if (co == L) s = "running"; else if (co->status == LUA_YIELD) s = "suspended"; else if (co->status != 0) s = "dead"; else if (co->base > tvref(co->stack)+1) s = "normal"; else if (co->top == co->base) s = "dead"; else s = "suspended"; lua_pushstring(L, s); return 1; } LJLIB_CF(coroutine_running) { #if LJ_52 int ismain = lua_pushthread(L); setboolV(L->top++, ismain); return 2; #else if (lua_pushthread(L)) setnilV(L->top++); return 1; #endif } LJLIB_CF(coroutine_create) { lua_State *L1; if (!(L->base < L->top && tvisfunc(L->base))) lj_err_argt(L, 1, LUA_TFUNCTION); L1 = lua_newthread(L); setfuncV(L, L1->top++, funcV(L->base)); return 1; } LJLIB_ASM(coroutine_yield) { lj_err_caller(L, LJ_ERR_CYIELD); return FFH_UNREACHABLE; } static int ffh_resume(lua_State *L, lua_State *co, int wrap) { if (co->cframe != NULL || co->status > LUA_YIELD || (co->status == 0 && co->top == co->base)) { ErrMsg em = co->cframe ? LJ_ERR_CORUN : LJ_ERR_CODEAD; if (wrap) lj_err_caller(L, em); setboolV(L->base-1, 0); setstrV(L, L->base, lj_err_str(L, em)); return FFH_RES(2); } lj_state_growstack(co, (MSize)(L->top - L->base)); return FFH_RETRY; } LJLIB_ASM(coroutine_resume) { if (!(L->top > L->base && tvisthread(L->base))) lj_err_arg(L, 1, LJ_ERR_NOCORO); return ffh_resume(L, threadV(L->base), 0); } LJLIB_NOREG LJLIB_ASM(coroutine_wrap_aux) { return ffh_resume(L, threadV(lj_lib_upvalue(L, 1)), 1); } /* Inline declarations. */ LJ_ASMF void lj_ff_coroutine_wrap_aux(void); #if !(LJ_TARGET_MIPS && defined(ljamalg_c)) LJ_FUNCA_NORET void LJ_FASTCALL lj_ffh_coroutine_wrap_err(lua_State *L, lua_State *co); #endif /* Error handler, called from assembler VM. */ void LJ_FASTCALL lj_ffh_coroutine_wrap_err(lua_State *L, lua_State *co) { co->top--; copyTV(L, L->top, co->top); L->top++; if (tvisstr(L->top-1)) lj_err_callermsg(L, strVdata(L->top-1)); else lj_err_run(L); } /* Forward declaration. */ static void setpc_wrap_aux(lua_State *L, GCfunc *fn); LJLIB_CF(coroutine_wrap) { lj_cf_coroutine_create(L); lj_lib_pushcc(L, lj_ffh_coroutine_wrap_aux, FF_coroutine_wrap_aux, 1); setpc_wrap_aux(L, funcV(L->top-1)); return 1; } #include "lj_libdef.h" /* Fix the PC of wrap_aux. Really ugly workaround. */ static void setpc_wrap_aux(lua_State *L, GCfunc *fn) { setmref(fn->c.pc, &L2GG(L)->bcff[lj_lib_init_coroutine[1]+2]); } /* ------------------------------------------------------------------------ */ static void newproxy_weaktable(lua_State *L) { /* NOBARRIER: The table is new (marked white). */ GCtab *t = lj_tab_new(L, 0, 1); settabV(L, L->top++, t); setgcref(t->metatable, obj2gco(t)); setstrV(L, lj_tab_setstr(L, t, lj_str_newlit(L, "__mode")), lj_str_newlit(L, "kv")); t->nomm = (uint8_t)(~(1u<env); settabV(L, lj_tab_setstr(L, env, lj_str_newlit(L, "_G")), env); lua_pushliteral(L, LUA_VERSION); /* top-3. */ newproxy_weaktable(L); /* top-2. */ LJ_LIB_REG(L, "_G", base); LJ_LIB_REG(L, LUA_COLIBNAME, coroutine); return 2; } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_mem.o0000664000000000000000000003104012213333054022667 0ustar rootrootELF>P @@ UHHH+OHHH9s#F9u FG<vHH9w ]UHV8Wu*f9uGf;FFf3G]UHATSIHF<(u>fyIT$H4LHu/Cfy!IT$HC<(t9u~9tF9r]UHH]LeLmLuH HHLL9uA2BAI~(uEFfx4HDN,πxuHHcHtAM9u xIMAAx(uKEHfEx7EN EN$AyuA9LMcMtAL9uMAM9RIL9u;AH9ȃ Ѓ 0<EAHAI9LH9AEBQ1t&Awg҃1ЃuTLHILHI9t0Ht AMu#IDMELHHAADH]LeLmLuUHHGH AN9u:A< u A@< t;AN<A@N<@w u$@u u HLILH]Nf;Ju(6f9tfwUH]DFBH9UHH]LeLmH HOEN EAyuE EEN DNDAzuADLFXȀw 646ZDcAw E9u9*b Aw A<88teEĻAy(u/AAfxE!E9ut EĻEAAz(u/ABfxE*D E9uEt pEAD9tGE9u=V9<w9vxAJA2Iu9tJ øH]LeLmUHAWAVAUATSH8IAH_HHEEHDG@D9s=DLEH€x(HHfɋ ʉMI9tF<#uNH…t}AO(HAątdHcEMHHLt"HD(HAąt/DE9sHCEFtE9rDHCL<HAHLEH([A\A]A^A_]UHAWAVAUATSH(IDLwAIHEEHHUDED9DCA9DBE9HHEDIHHUHuLt@C;ES;UA$bA9vrAD$IH9s%xx[xDuSxxMxDftEHH9rCHUfC CfCffCHCHEDkE9-LH([A\A]A^A_]UH9B9v@HGLALH Ȁyu  LIt AP9w]UHATSDACHG@9LGIDA9u$IDA9u@AO@uHELAJf@tEA\C2\uEAwoA9tjwi@9zMcB_@9sNHwH9uH9u @%@9r۸ [A\]lj_opt_mem.cta != tbrefb->o == IR_AREF(((tv)->it) == (~4u))(((IRType)((taba->t).irt & IRT_TYPE)) == IRT_TAB) && (((IRType)((tabb->t).irt & IRT_TYPE)) == IRT_TAB)(refa->o==IR_HREF || refa->o==IR_HREFK || refa->o==IR_NEWREF) && (refb->o==IR_HREF || refb->o==IR_HREFK || refb->o==IR_NEWREF)ir->o != IR_TNEW || (((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE)) == IRT_NIL)(((&J->cur.ir[(ir->op1)])))->o == IR_KGC(((((((&J->cur.ir[(ir->op1)])))->o == IR_KGC) ? (void) (0) : __assert_fail ("(((&J->cur.ir[(ir->op1)])))->o == IR_KGC", "lj_opt_mem.c", 192, __PRETTY_FUNCTION__)), (((GCobj *)(uintptr_t)((((&J->cur.ir[(ir->op1)])))->gcr).gcptr32))))->gch.gct == ~(~11u)itype2irt(tv) == ((IRType)(((&J->fold.ins)->t).irt & IRT_TYPE))fwd_ahloadaa_ahrefaa_tableGCC: (Debian 4.7.3-4) 4.7.3zRx IAC D <>AC y  \jAC Cb KAC F $AC T AC  9hC L <SC P F R (HjAC MX  tAC E +AC Ea (AC M (AC M (AC M (<:AC M( (hAC X (AC X (AC X (<AC M* (]AC MK (DgAC MU piAC d  .AC C& .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @*( &,12?@28OW0`u p/( $ (<II> j,K;<CTL e9m:v %j    Q +/| @K, a q : tC<Z]gi'.lj_opt_mem.caa_escapeaa_urefaa_findcnewreassoc_trycseaa_xrefaa_table__PRETTY_FUNCTION__.4124aa_frefaa_ahref__PRETTY_FUNCTION__.4141fwd_ahload__PRETTY_FUNCTION__.4173lj_ir_type_size__assert_faillj_ir_kvaluelj_tab_getlj_ir_knum_u64lj_ir_kgclj_opt_fwd_aloadlj_ir_emitlj_opt_fwd_hloadlj_opt_fwd_hrefklj_opt_cselj_opt_fwd_href_nokeylj_opt_fwd_tptrlj_opt_dse_ahstorelj_opt_fwd_uloadlj_opt_cselimlj_opt_dse_ustorelj_opt_fwd_floadlj_ir_knulllj_opt_dse_fstorelj_opt_fwd_xloadlj_ir_kint64lj_opt_dse_xstorelj_opt_fwd_tab_lenlj_opt_fwd_wasnonnil= K n x }      % * /    h    : D I 8N[ e j ho|   h   ) F q  ! Z&))&G:, & @I`<T :L%x Q | ,  @ l tCZHttarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_debug.c0000664000000000000000000004064112231715321022311 0ustar rootroot/* ** Debugging and introspection. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_debug_c #define LUA_CORE #include "lj_obj.h" #include "lj_err.h" #include "lj_debug.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_state.h" #include "lj_frame.h" #include "lj_bc.h" #if LJ_HASJIT #include "lj_jit.h" #endif /* -- Frames -------------------------------------------------------------- */ /* Get frame corresponding to a level. */ cTValue *lj_debug_frame(lua_State *L, int level, int *size) { cTValue *frame, *nextframe, *bot = tvref(L->stack); /* Traverse frames backwards. */ for (nextframe = frame = L->base-1; frame > bot; ) { if (frame_gc(frame) == obj2gco(L)) level++; /* Skip dummy frames. See lj_meta_call(). */ if (level-- == 0) { *size = (int)(nextframe - frame); return frame; /* Level found. */ } nextframe = frame; if (frame_islua(frame)) { frame = frame_prevl(frame); } else { if (frame_isvarg(frame)) level++; /* Skip vararg pseudo-frame. */ frame = frame_prevd(frame); } } *size = level; return NULL; /* Level not found. */ } /* Invalid bytecode position. */ #define NO_BCPOS (~(BCPos)0) /* Return bytecode position for function/frame or NO_BCPOS. */ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe) { const BCIns *ins; GCproto *pt; BCPos pos; lua_assert(fn->c.gct == ~LJ_TFUNC || fn->c.gct == ~LJ_TTHREAD); if (!isluafunc(fn)) { /* Cannot derive a PC for non-Lua functions. */ return NO_BCPOS; } else if (nextframe == NULL) { /* Lua function on top. */ void *cf = cframe_raw(L->cframe); if (cf == NULL || (char *)cframe_pc(cf) == (char *)cframe_L(cf)) return NO_BCPOS; ins = cframe_pc(cf); /* Only happens during error/hook handling. */ } else { if (frame_islua(nextframe)) { ins = frame_pc(nextframe); } else if (frame_iscont(nextframe)) { ins = frame_contpc(nextframe); } else { /* Lua function below errfunc/gc/hook: find cframe to get the PC. */ void *cf = cframe_raw(L->cframe); TValue *f = L->base-1; for (;;) { if (cf == NULL) return NO_BCPOS; while (cframe_nres(cf) < 0) { if (f >= restorestack(L, -cframe_nres(cf))) break; cf = cframe_raw(cframe_prev(cf)); if (cf == NULL) return NO_BCPOS; } if (f < nextframe) break; if (frame_islua(f)) { f = frame_prevl(f); } else { if (frame_isc(f)) cf = cframe_raw(cframe_prev(cf)); f = frame_prevd(f); } } ins = cframe_pc(cf); } } pt = funcproto(fn); pos = proto_bcpos(pt, ins) - 1; #if LJ_HASJIT if (pos > pt->sizebc) { /* Undo the effects of lj_trace_exit for JLOOP. */ GCtrace *T = (GCtrace *)((char *)(ins-1) - offsetof(GCtrace, startins)); lua_assert(bc_isret(bc_op(ins[-1]))); pos = proto_bcpos(pt, mref(T->startpc, const BCIns)); } #endif return pos; } /* -- Line numbers -------------------------------------------------------- */ /* Get line number for a bytecode position. */ BCLine LJ_FASTCALL lj_debug_line(GCproto *pt, BCPos pc) { const void *lineinfo = proto_lineinfo(pt); if (pc <= pt->sizebc && lineinfo) { BCLine first = pt->firstline; if (pc == pt->sizebc) return first + pt->numline; if (pc-- == 0) return first; if (pt->numline < 256) return first + (BCLine)((const uint8_t *)lineinfo)[pc]; else if (pt->numline < 65536) return first + (BCLine)((const uint16_t *)lineinfo)[pc]; else return first + (BCLine)((const uint32_t *)lineinfo)[pc]; } return 0; } /* Get line number for function/frame. */ static BCLine debug_frameline(lua_State *L, GCfunc *fn, cTValue *nextframe) { BCPos pc = debug_framepc(L, fn, nextframe); if (pc != NO_BCPOS) { GCproto *pt = funcproto(fn); lua_assert(pc <= pt->sizebc); return lj_debug_line(pt, pc); } return -1; } /* -- Variable names ------------------------------------------------------ */ /* Read ULEB128 value. */ static uint32_t debug_read_uleb128(const uint8_t **pp) { const uint8_t *p = *pp; uint32_t v = *p++; if (LJ_UNLIKELY(v >= 0x80)) { int sh = 0; v &= 0x7f; do { v |= ((*p & 0x7f) << (sh += 7)); } while (*p++ >= 0x80); } *pp = p; return v; } /* Get name of a local variable from slot number and PC. */ static const char *debug_varname(const GCproto *pt, BCPos pc, BCReg slot) { const uint8_t *p = proto_varinfo(pt); if (p) { BCPos lastpc = 0; for (;;) { const char *name = (const char *)p; uint32_t vn = *p++; BCPos startpc, endpc; if (vn < VARNAME__MAX) { if (vn == VARNAME_END) break; /* End of varinfo. */ } else { while (*p++) ; /* Skip over variable name string. */ } lastpc = startpc = lastpc + debug_read_uleb128(&p); if (startpc > pc) break; endpc = startpc + debug_read_uleb128(&p); if (pc < endpc && slot-- == 0) { if (vn < VARNAME__MAX) { #define VARNAMESTR(name, str) str "\0" name = VARNAMEDEF(VARNAMESTR); #undef VARNAMESTR if (--vn) while (*name++ || --vn) ; } return name; } } } return NULL; } /* Get name of local variable from 1-based slot number and function/frame. */ static TValue *debug_localname(lua_State *L, const lua_Debug *ar, const char **name, BCReg slot1) { uint32_t offset = (uint32_t)ar->i_ci & 0xffff; uint32_t size = (uint32_t)ar->i_ci >> 16; TValue *frame = tvref(L->stack) + offset; TValue *nextframe = size ? frame + size : NULL; GCfunc *fn = frame_func(frame); BCPos pc = debug_framepc(L, fn, nextframe); if (!nextframe) nextframe = L->top; if ((int)slot1 < 0) { /* Negative slot number is for varargs. */ if (pc != NO_BCPOS) { GCproto *pt = funcproto(fn); if ((pt->flags & PROTO_VARARG)) { slot1 = pt->numparams + (BCReg)(-(int)slot1); if (frame_isvarg(frame)) { /* Vararg frame has been set up? (pc!=0) */ nextframe = frame; frame = frame_prevd(frame); } if (frame + slot1 < nextframe) { *name = "(*vararg)"; return frame+slot1; } } } return NULL; } if (pc != NO_BCPOS && (*name = debug_varname(funcproto(fn), pc, slot1-1)) != NULL) ; else if (slot1 > 0 && frame + slot1 < nextframe) *name = "(*temporary)"; return frame+slot1; } /* Get name of upvalue. */ const char *lj_debug_uvname(GCproto *pt, uint32_t idx) { const uint8_t *p = proto_uvinfo(pt); lua_assert(idx < pt->sizeuv); if (!p) return ""; if (idx) while (*p++ || --idx) ; return (const char *)p; } /* Get name and value of upvalue. */ const char *lj_debug_uvnamev(cTValue *o, uint32_t idx, TValue **tvp) { if (tvisfunc(o)) { GCfunc *fn = funcV(o); if (isluafunc(fn)) { GCproto *pt = funcproto(fn); if (idx < pt->sizeuv) { *tvp = uvval(&gcref(fn->l.uvptr[idx])->uv); return lj_debug_uvname(pt, idx); } } else { if (idx < fn->c.nupvalues) { *tvp = &fn->c.upvalue[idx]; return ""; } } } return NULL; } /* Deduce name of an object from slot number and PC. */ const char *lj_debug_slotname(GCproto *pt, const BCIns *ip, BCReg slot, const char **name) { const char *lname; restart: lname = debug_varname(pt, proto_bcpos(pt, ip), slot); if (lname != NULL) { *name = lname; return "local"; } while (--ip > proto_bc(pt)) { BCIns ins = *ip; BCOp op = bc_op(ins); BCReg ra = bc_a(ins); if (bcmode_a(op) == BCMbase) { if (slot >= ra && (op != BC_KNIL || slot <= bc_d(ins))) return NULL; } else if (bcmode_a(op) == BCMdst && ra == slot) { switch (bc_op(ins)) { case BC_MOV: if (ra == slot) { slot = bc_d(ins); goto restart; } break; case BC_GGET: *name = strdata(gco2str(proto_kgc(pt, ~(ptrdiff_t)bc_d(ins)))); return "global"; case BC_TGETS: *name = strdata(gco2str(proto_kgc(pt, ~(ptrdiff_t)bc_c(ins)))); if (ip > proto_bc(pt)) { BCIns insp = ip[-1]; if (bc_op(insp) == BC_MOV && bc_a(insp) == ra+1 && bc_d(insp) == bc_b(ins)) return "method"; } return "field"; case BC_UGET: *name = lj_debug_uvname(pt, bc_d(ins)); return "upvalue"; default: return NULL; } } } return NULL; } /* Deduce function name from caller of a frame. */ const char *lj_debug_funcname(lua_State *L, TValue *frame, const char **name) { TValue *pframe; GCfunc *fn; BCPos pc; if (frame <= tvref(L->stack)) return NULL; if (frame_isvarg(frame)) frame = frame_prevd(frame); pframe = frame_prev(frame); fn = frame_func(pframe); pc = debug_framepc(L, fn, frame); if (pc != NO_BCPOS) { GCproto *pt = funcproto(fn); const BCIns *ip = &proto_bc(pt)[check_exp(pc < pt->sizebc, pc)]; MMS mm = bcmode_mm(bc_op(*ip)); if (mm == MM_call) { BCReg slot = bc_a(*ip); if (bc_op(*ip) == BC_ITERC) slot -= 3; return lj_debug_slotname(pt, ip, slot, name); } else if (mm != MM__MAX) { *name = strdata(mmname_str(G(L), mm)); return "metamethod"; } } return NULL; } /* -- Source code locations ----------------------------------------------- */ /* Generate shortened source name. */ void lj_debug_shortname(char *out, GCstr *str) { const char *src = strdata(str); if (*src == '=') { strncpy(out, src+1, LUA_IDSIZE); /* Remove first char. */ out[LUA_IDSIZE-1] = '\0'; /* Ensures null termination. */ } else if (*src == '@') { /* Output "source", or "...source". */ size_t len = str->len-1; src++; /* Skip the `@' */ if (len >= LUA_IDSIZE) { src += len-(LUA_IDSIZE-4); /* Get last part of file name. */ *out++ = '.'; *out++ = '.'; *out++ = '.'; } strcpy(out, src); } else { /* Output [string "string"]. */ size_t len; /* Length, up to first control char. */ for (len = 0; len < LUA_IDSIZE-12; len++) if (((const unsigned char *)src)[len] < ' ') break; strcpy(out, "[string \""); out += 9; if (src[len] != '\0') { /* Must truncate? */ if (len > LUA_IDSIZE-15) len = LUA_IDSIZE-15; strncpy(out, src, len); out += len; strcpy(out, "..."); out += 3; } else { strcpy(out, src); out += len; } strcpy(out, "\"]"); } } /* Add current location of a frame to error message. */ void lj_debug_addloc(lua_State *L, const char *msg, cTValue *frame, cTValue *nextframe) { if (frame) { GCfunc *fn = frame_func(frame); if (isluafunc(fn)) { BCLine line = debug_frameline(L, fn, nextframe); if (line >= 0) { char buf[LUA_IDSIZE]; lj_debug_shortname(buf, proto_chunkname(funcproto(fn))); lj_str_pushf(L, "%s:%d: %s", buf, line, msg); return; } } } lj_str_pushf(L, "%s", msg); } /* Push location string for a bytecode position to Lua stack. */ void lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc) { GCstr *name = proto_chunkname(pt); const char *s = strdata(name); MSize i, len = name->len; BCLine line = lj_debug_line(pt, pc); if (*s == '@') { s++; len--; for (i = len; i > 0; i--) if (s[i] == '/' || s[i] == '\\') { s += i+1; break; } lj_str_pushf(L, "%s:%d", s, line); } else if (len > 40) { lj_str_pushf(L, "%p:%d", pt, line); } else if (*s == '=') { lj_str_pushf(L, "%s:%d", s+1, line); } else { lj_str_pushf(L, "\"%s\":%d", s, line); } } /* -- Public debug API ---------------------------------------------------- */ /* lua_getupvalue() and lua_setupvalue() are in lj_api.c. */ LUA_API const char *lua_getlocal(lua_State *L, const lua_Debug *ar, int n) { const char *name = NULL; if (ar) { TValue *o = debug_localname(L, ar, &name, (BCReg)n); if (name) { copyTV(L, L->top, o); incr_top(L); } } else if (tvisfunc(L->top-1) && isluafunc(funcV(L->top-1))) { name = debug_varname(funcproto(funcV(L->top-1)), 0, (BCReg)n-1); } return name; } LUA_API const char *lua_setlocal(lua_State *L, const lua_Debug *ar, int n) { const char *name = NULL; TValue *o = debug_localname(L, ar, &name, (BCReg)n); if (name) copyTV(L, o, L->top-1); L->top--; return name; } int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, int ext) { int opt_f = 0, opt_L = 0; TValue *frame = NULL; TValue *nextframe = NULL; GCfunc *fn; if (*what == '>') { TValue *func = L->top - 1; api_check(L, tvisfunc(func)); fn = funcV(func); L->top--; what++; } else { uint32_t offset = (uint32_t)ar->i_ci & 0xffff; uint32_t size = (uint32_t)ar->i_ci >> 16; lua_assert(offset != 0); frame = tvref(L->stack) + offset; if (size) nextframe = frame + size; lua_assert(frame <= tvref(L->maxstack) && (!nextframe || nextframe <= tvref(L->maxstack))); fn = frame_func(frame); lua_assert(fn->c.gct == ~LJ_TFUNC); } for (; *what; what++) { if (*what == 'S') { if (isluafunc(fn)) { GCproto *pt = funcproto(fn); BCLine firstline = pt->firstline; GCstr *name = proto_chunkname(pt); ar->source = strdata(name); lj_debug_shortname(ar->short_src, name); ar->linedefined = (int)firstline; ar->lastlinedefined = (int)(firstline + pt->numline); ar->what = firstline ? "Lua" : "main"; } else { ar->source = "=[C]"; ar->short_src[0] = '['; ar->short_src[1] = 'C'; ar->short_src[2] = ']'; ar->short_src[3] = '\0'; ar->linedefined = -1; ar->lastlinedefined = -1; ar->what = "C"; } } else if (*what == 'l') { ar->currentline = frame ? debug_frameline(L, fn, nextframe) : -1; } else if (*what == 'u') { ar->nups = fn->c.nupvalues; if (ext) { if (isluafunc(fn)) { GCproto *pt = funcproto(fn); ar->nparams = pt->numparams; ar->isvararg = !!(pt->flags & PROTO_VARARG); } else { ar->nparams = 0; ar->isvararg = 1; } } } else if (*what == 'n') { ar->namewhat = frame ? lj_debug_funcname(L, frame, &ar->name) : NULL; if (ar->namewhat == NULL) { ar->namewhat = ""; ar->name = NULL; } } else if (*what == 'f') { opt_f = 1; } else if (*what == 'L') { opt_L = 1; } else { return 0; /* Bad option. */ } } if (opt_f) { setfuncV(L, L->top, fn); incr_top(L); } if (opt_L) { if (isluafunc(fn)) { GCtab *t = lj_tab_new(L, 0, 0); GCproto *pt = funcproto(fn); const void *lineinfo = proto_lineinfo(pt); if (lineinfo) { BCLine first = pt->firstline; int sz = pt->numline < 256 ? 1 : pt->numline < 65536 ? 2 : 4; MSize i, szl = pt->sizebc-1; for (i = 0; i < szl; i++) { BCLine line = first + (sz == 1 ? (BCLine)((const uint8_t *)lineinfo)[i] : sz == 2 ? (BCLine)((const uint16_t *)lineinfo)[i] : (BCLine)((const uint32_t *)lineinfo)[i]); setboolV(lj_tab_setint(L, t, line), 1); } } settabV(L, L->top, t); } else { setnilV(L->top); } incr_top(L); } return 1; /* Ok. */ } LUA_API int lua_getinfo(lua_State *L, const char *what, lua_Debug *ar) { return lj_debug_getinfo(L, what, (lj_Debug *)ar, 0); } LUA_API int lua_getstack(lua_State *L, int level, lua_Debug *ar) { int size; cTValue *frame = lj_debug_frame(L, level, &size); if (frame) { ar->i_ci = (size << 16) + (int)(frame - tvref(L->stack)); return 1; } else { ar->i_ci = level - size; return 0; } } /* Number of frames for the leading and trailing part of a traceback. */ #define TRACEBACK_LEVELS1 12 #define TRACEBACK_LEVELS2 10 LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, const char *msg, int level) { int top = (int)(L->top - L->base); int lim = TRACEBACK_LEVELS1; lua_Debug ar; if (msg) lua_pushfstring(L, "%s\n", msg); lua_pushliteral(L, "stack traceback:"); while (lua_getstack(L1, level++, &ar)) { GCfunc *fn; if (level > lim) { if (!lua_getstack(L1, level + TRACEBACK_LEVELS2, &ar)) { level--; } else { lua_pushliteral(L, "\n\t..."); lua_getstack(L1, -10, &ar); level = ar.i_ci - TRACEBACK_LEVELS2; } lim = 2147483647; continue; } lua_getinfo(L1, "Snlf", &ar); fn = funcV(L1->top-1); L1->top--; if (isffunc(fn) && !*ar.namewhat) lua_pushfstring(L, "\n\t[builtin#%d]:", fn->c.ffid); else lua_pushfstring(L, "\n\t%s:", ar.short_src); if (ar.currentline > 0) lua_pushfstring(L, "%d:", ar.currentline); if (*ar.namewhat) { lua_pushfstring(L, " in function " LUA_QS, ar.name); } else { if (*ar.what == 'm') { lua_pushliteral(L, " in main chunk"); } else if (*ar.what == 'C') { lua_pushfstring(L, " at %p", fn->c.f); } else { lua_pushfstring(L, " in function <%s:%d>", ar.short_src, ar.linedefined); } } if ((int)(L->top - L->base) - top >= 15) lua_concat(L, (int)(L->top - L->base) - top); } lua_concat(L, (int)(L->top - L->base) - top); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_lex.o0000664000000000000000000005174012213333051022025 0ustar rootrootELF>%@@ UHSHHHwPHHUSHHHt HEHtC,HS0HHS0 H[]UHATSI_HH)S H{SA$HIt$x)S H{SAT$DIt$8)S H{S[A\]Á~HcHUHHcuHH]UHATSHHHXL`Lht#)p)M)U)])e)m)u)}AԺtCw-S@B;CDvHg HK8C@HS8 HHDž(Dž,0HEH0H@H8KXHs`H{L(EUHH]LeLmH HWD?vAD$Hw8HDHC8DcDS@D,S@H]LeLmUHAUATSHHDo A]tA[tS@B;CDv DH? HK8D,C@C,PS,tHC00HHC0 H Ɖs =u^AS@B;CDv H HK8@4C@S,BC,tHC00HHC0 HƉs A=tADA9DEDH[A\A]]UHATSHDg A tA tNC,PS,tHS0HHS0H+C t u.D9t)C,PS,tHS0HHS0HC CXCX=~s$H߸[A\]UHATSIHH{HF,HF0HFxdždžHdždžF(!FXF\VDHv8 HC8CD C,PS,tHS0HHS0HC =uVS,HK09yHAHC0BC,tAHHK0HC { #uUC,PS,tHS0HHS0HC  t uH{ { u~tz LIT$HJIL$BxuPAD$@(tL [A\]UHAUATSHHIAՋw W@B;GDv HO8@4G@C,PS,tHS0HHS0HkC t uHs    ]!I҃ !H߸HmD9us S@B;CDv H HK8@4C@C,PS,tHS0HHS0HC M)S@B;CDv H HK8 C@HMC@MtPK@Q;SDv H> HC8@4S@C,PS,tHS0HHS0H C C,PS,tHS0HHS0HC ACD-S@)DHs8HHKA$AD$xuPA@(tH[A\A]]UHAWAVAUATSHHD Icu]IAeA0W@B;GDv 0 HO80G@C,PS,tHS0HHS0HC xeApDEQS@B;CDv DH HK8D$C@C,PS,tHS0HHS0HiC EDc IcĀxA.tA+tA-u A E9tS@B;CDvH HK8C@H{8LAăLk@vAtsAEuAE$M}I)LAE$IM}AuNL@ f@H@A~v|A@-AAEA L@ fD`IHPHLHH߸H[A\A]A^A_]UHH]LeLmLuH HIG@Dc IctLH-AW s S@B;CDv Hr HK8@4C@C,PS,tHS0HHS0H?C HxS@Hs8HHSAEAExuHRR(t@A D AD$C $HC,PS,tHS0HHS0HsC C,PS,tHS0HHS0HEC - C,PS,tHS0HHS0HC [t C E it) < 0xfffeffffu)ls->lookahead == TK_eofandbreakdoelseelseifendfalseforfunctiongotoifinlocalnilnotorrepeatreturnthentrueuntilwhile.....==>=<=~=::(ls->current == '\n' || ls->current == '\r')!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((lj_char_bits+1)[((ls->current))] & 0x08)fmt == STRSCAN_I64 || fmt == STRSCAN_U64 || fmt == STRSCAN_IMAGsetgcVinclinenumberskip_seplex_numberlj_lex_lookaheadGCC: (Debian 4.7.3-4) 4.7.3zRx  VAC EL  @mAC Ce dX[C y AC J$rAC P] $ AC I  AC C  AC C $<aAC IS (dAC Mw $ AC T AAC Ew CAC Ey (_AC IQ .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.comment.note.GNU-stack.rela.eh_frame @0&,12 @2TP O7\00#eM#zP# uRP p%)  . V@r'p 0 I|Wp7a !    VmX #.=K:XcpA#Cf_lj_lex.cfillbuftokennamessave_growskip_sep__PRETTY_FUNCTION__.4404inclinenumber__PRETTY_FUNCTION__.4384__PRETTY_FUNCTION__.3380read_long_stringlex_number__PRETTY_FUNCTION__.4392llex__PRETTY_FUNCTION__.4509lj_lex_cleanuplj_lex_token2strlj_char_bitslj_str_pushflj_lex_errorlj_err_lexlj_mem_realloc__assert_faillj_lex_setuplj_err_strlj_err_throwlj_parse_keepstrlj_strscan_scanluaopen_ffilj_mem_newgcolj_parse_keepcdatalj_lex_lookaheadlj_lex_nextlj_lex_initlj_str_new @    0G        1!  *  0"D#u  * 0     X  $' 1  6 ; [ %y &   3  & ' P   #  * 0 V  e| 6   ]   l#  * 0z     N  @+ (08@HPg XZ `g hg pZ xg  (08@HPX`hp xi7  (08@HPX`hpx  (08@HPX`hpxXXX X(X0X8X@XHXPXX$`XhXp$xXXXXXXXXXXXXXXXXXXXXg X(X0X8X@gHXPXXX`XhXpXxXXXXXXXXXXXXXXXXXXXXX X(X0X8X@XHXPXXX`XhXpXxXXXXXXXXXXXXXXgXXXXb X(X0X8@XHXPXXX`XhXpXxXXXXXXX@fHjPpXs`xhpx     ( 0 8 @  DVhp|:@7h! #ftarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_alloc.o0000664000000000000000000002411012213333062022320 0ustar rootrootELF>@@ UHHHHH9w HPH9r H@Hu]UHHNt HHȃHH)Hw HWHHHFHD@HG( ]UHAWAVAUATSHHH}HHHHELXMHEHEM&M~MnHEID$t HHÃLHCWHHEHHKDI9w H9~H@Hu'H}I}LMHUȉ OMtM)eHSL)Hs HH IM*Hs(H9sHC(L9Cu HCHCH{HHHWHHHHHw(IpIPH9u!HVHrMH0IPI9tIHHQHJ?Ip(IP(HuIp IP Hu#HHHJ(Hz(uHJ Hz uHMtgIH8L;HuHHHu&AH8!S;M;A uIQ IQ(Ht&LJ0IH HtHJ HQ0IH(HtHJ(HQ0HHHWHH9{u HCHIHHHHWHHHHw;HD HDu щ HHPHxHzHWHGmHHt!@wҍJHH҉HHw8HG(HG SAAAu%D ‰SHHH|HDHG0HHHHHt H9)HHHHHrHH9t-II?HIpH4HuIJHtOHHt HHڃI)IMHHHHHHPJD( JD(HML@II9IƋEAAbLIŋUAH_lI$HI$PI9ZHH@HtHHHI9u@KD=I9$Hu2BHxHH9sLHxLIT$It$ LeHRH(H9uH؃LHq@t HHHH4HH)H)HHXI;T$ uI|$I|$It$ HH~I;T$u#I|$I|$It$HHHVH<>HJIILHHw,LJLBM9uAAE!$MAMHLZ0HJH9tLBIHLA?LJ(HJ(HuLJ HJ Hu#IMLA(Hy(uLA Hy uIMtjLB8K;Hu!KHHu)J8AAE!D$;I;S uIK IK(Ht&LY0LB MtLA IH0LB(MtLA(IH0LLHbHHHVH<>HHHwCHT ITA<$AADAu A $HHJHrHqHNHVHHAt"AwҍJIIA҉ILF8HF(HF AT$ADAAu'D AT$IHKtKTHV0HvHvKHIt I9D)IILLLBIL9t-II?HMANMuIJ4HV0HvHvHJHqHrHNHVHF0HKH؃HUHDHEHEH H9EHMHCMHMII IWLLHuHF#I$HHFI$PHFI$XHF M$HM$PHHI$XIF IFMvH9EwLEL9ELH+EHHUHHbHHHuHNHHHHwCHD IDA$u A $HHPLEL@LBIPI@ HHt!@wҍJHH҉HHUHr8HB(HB AT$AAAu+D AT$HHLEMDIDI@0M@M@IHHt H9)HHHJHH9t1HH?HHNH HuHHEHHP0H@H@ HBHMHHHJHAHQHA0ID$H9v2HH)IL$ID$ HIT$ HHJHHXHI$@AHI$HAHLHH@{HIt$ HH9H L*LzIEIt$ HuLHHPHUHH7HָH([A\A]A^A_]UHH]LeLmLuL}HPIHIHLvHFII Iv IT$HHKHHBI9rLH)LH=#HHMH6HHUI)LuIƋEHUIt HUH}UAHtK .I9O u?LIOH9s3H)I4HH HSHHHFIw IOLHtLw_LL8IHtLCuHCHHHHI)M9LIFHLHLALH]LeLmLuL}UHATSHD AAbID#HH@t HHƃLH^Hߺht FH{g@t fH@t HɸHt Ht fHtHFkLXHdž`HF@HT HTHRHRHH uHFHHtI)IH H[A\]UHAUATSHHHHt%IH;HsH[E,$E,$HuH[A\A]]UHHuHuH@H ]GCC: (Debian 4.7.3-4) 4.7.3zRx 'AC b <GAC B (\$AC M 4JC MBBBBA (AC M (<AC X  EAC C=  <IAC I{  `-AC h .symtab.strtab.shstrtab.rela.text.data.bss.comment.note.GNU-stack.rela.eh_frame @% &,10:OJp' Y"  $ ''G%n$=K [<l}E+It-lj_alloc.csegment_holdinginit_toprelease_unused_segmentslj_alloc_freelj_alloc_malloclj_alloc_realloc__errno_locationmunmapmremapmmap64memcpylj_alloc_createlj_alloc_destroylj_alloc_f(N p fbE\ @'`n @+dttarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_clib.o0000664000000000000000000001647012213333061022150 0ustar rootrootELF> @@ UHH]LeLmH HIIH¾HHH@La ADiHSHrHs By uISR(tH]LeLmUHSHHHHUHSHHH8tH8uX(HHtMH8 tHt)tHHt<)uHHH)HH H[]UHH]LeLmLuL}HPIIIHvHÃxAD$DMg@LHuLEuIUXLHEȋ ItA;WrHHыuyvNtPyH**@@ftiItA;WrHHȋu&@ Hpxt=IuI>IHEȋ ttZMuLmI?Aw9urUHHuJ%t9r' %t9wHHHtăwzt+I@ UA;WrUfPLhCx uPAD$@(tHH]LeLmLuL}UHH]LeLmLuL}H@HIALzEAA/LHu[.LHuLHIHkA?luAiuAbtLH߸IHkDLIH*H8/:HHHH+HHHxIHH¾HHH8t6HHIHLHHutHHILMt,A@LIHuHHHLHL0LLH]LeLmLuL}UHSHHH?HtHH[]UH1H]lj_obj.hGROUPINPUTlj_ctype.hid > 0 && id < cts->toplj_clib.clj_cdata.h%s.solib%sr/* GNU ld script!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))(((ctt->info) & (0xf0000000u|0x08000000u|0x04000000u)) == (((CTInfo)(CT_NUM) << 28) + (0))) && ctt->size <= 4(((GCobj *)(uintptr_t)(ctf->name).gcptr32))->gch.gct == ~(~4u)((((ct->info)) >> 28) == CT_FUNC) || ((((ct->info)) >> 28) == CT_EXTERN)(((((ct->info)) >> 28) <= CT_HASSIZE) ? ct->size : 8) == szctype_checklj_clib_indexlj_cdata_newsetgcVclib_extsymGCC: (Debian 4.7.3-4) 4.7.3zRx $AC P DAC E `AC E (AC X (%AC [ 'AC E] AC M .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @(h &,12l@2dO :W0& `C uH p `  x '-9H a z.    k *9?Mz%Zgnv|'lj_clib.cclib_new__PRETTY_FUNCTION__.3380clib_error_clib_check_lds__PRETTY_FUNCTION__.4061__PRETTY_FUNCTION__.4810__PRETTY_FUNCTION__.4799__PRETTY_FUNCTION__.4222lj_tab_newlj_udata_new__assert_faildlerrorlj_err_callermsgstrchrlj_str_newlj_clib_indexlj_tab_setstrlj_ctype_getnamelj_err_callervdlsymlj_mem_newgcolj_clib_loadlj_str_pushfdlopenfopen64fgetsfcloselj_clib_unloaddlcloselj_clib_default%8 '     N    :  D 8I (N     . 8    8# (F P U  Z      B (     I 'S X ] M!  S!+"<Y{ Y#$ [$!%>"Kay%%' Hdkztarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_errmsg.h0000664000000000000000000001731312202141143022520 0ustar rootroot/* ** VM error messages. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* This file may be included multiple times with different ERRDEF macros. */ /* Basic error handling. */ ERRDEF(ERRMEM, "not enough memory") ERRDEF(ERRERR, "error in error handling") ERRDEF(ERRCPP, "C++ exception") /* Allocations. */ ERRDEF(STROV, "string length overflow") ERRDEF(UDATAOV, "userdata length overflow") ERRDEF(STKOV, "stack overflow") ERRDEF(STKOVM, "stack overflow (%s)") ERRDEF(TABOV, "table overflow") /* Table indexing. */ ERRDEF(NANIDX, "table index is NaN") ERRDEF(NILIDX, "table index is nil") ERRDEF(NEXTIDX, "invalid key to " LUA_QL("next")) /* Metamethod resolving. */ ERRDEF(BADCALL, "attempt to call a %s value") ERRDEF(BADOPRT, "attempt to %s %s " LUA_QS " (a %s value)") ERRDEF(BADOPRV, "attempt to %s a %s value") ERRDEF(BADCMPT, "attempt to compare %s with %s") ERRDEF(BADCMPV, "attempt to compare two %s values") ERRDEF(GETLOOP, "loop in gettable") ERRDEF(SETLOOP, "loop in settable") ERRDEF(OPCALL, "call") ERRDEF(OPINDEX, "index") ERRDEF(OPARITH, "perform arithmetic on") ERRDEF(OPCAT, "concatenate") ERRDEF(OPLEN, "get length of") /* Type checks. */ ERRDEF(BADSELF, "calling " LUA_QS " on bad self (%s)") ERRDEF(BADARG, "bad argument #%d to " LUA_QS " (%s)") ERRDEF(BADTYPE, "%s expected, got %s") ERRDEF(BADVAL, "invalid value") ERRDEF(NOVAL, "value expected") ERRDEF(NOCORO, "coroutine expected") ERRDEF(NOTABN, "nil or table expected") ERRDEF(NOLFUNC, "Lua function expected") ERRDEF(NOFUNCL, "function or level expected") ERRDEF(NOSFT, "string/function/table expected") ERRDEF(NOPROXY, "boolean or proxy expected") ERRDEF(FORINIT, LUA_QL("for") " initial value must be a number") ERRDEF(FORLIM, LUA_QL("for") " limit must be a number") ERRDEF(FORSTEP, LUA_QL("for") " step must be a number") /* C API checks. */ ERRDEF(NOENV, "no calling environment") ERRDEF(CYIELD, "attempt to yield across C-call boundary") ERRDEF(BADLU, "bad light userdata pointer") ERRDEF(NOGCMM, "bad action while in __gc metamethod") #if LJ_TARGET_WINDOWS ERRDEF(BADFPU, "bad FPU precision (use D3DCREATE_FPU_PRESERVE with DirectX)") #endif /* Standard library function errors. */ ERRDEF(ASSERT, "assertion failed!") ERRDEF(PROTMT, "cannot change a protected metatable") ERRDEF(UNPACK, "too many results to unpack") ERRDEF(RDRSTR, "reader function must return a string") ERRDEF(PRTOSTR, LUA_QL("tostring") " must return a string to " LUA_QL("print")) ERRDEF(IDXRNG, "index out of range") ERRDEF(BASERNG, "base out of range") ERRDEF(LVLRNG, "level out of range") ERRDEF(INVLVL, "invalid level") ERRDEF(INVOPT, "invalid option") ERRDEF(INVOPTM, "invalid option " LUA_QS) ERRDEF(INVFMT, "invalid format") ERRDEF(SETFENV, LUA_QL("setfenv") " cannot change environment of given object") ERRDEF(CORUN, "cannot resume running coroutine") ERRDEF(CODEAD, "cannot resume dead coroutine") ERRDEF(COSUSP, "cannot resume non-suspended coroutine") ERRDEF(TABINS, "wrong number of arguments to " LUA_QL("insert")) ERRDEF(TABCAT, "invalid value (%s) at index %d in table for " LUA_QL("concat")) ERRDEF(TABSORT, "invalid order function for sorting") ERRDEF(IOCLFL, "attempt to use a closed file") ERRDEF(IOSTDCL, "standard file is closed") ERRDEF(OSUNIQF, "unable to generate a unique filename") ERRDEF(OSDATEF, "field " LUA_QS " missing in date table") ERRDEF(STRDUMP, "unable to dump given function") ERRDEF(STRSLC, "string slice too long") ERRDEF(STRPATB, "missing " LUA_QL("[") " after " LUA_QL("%f") " in pattern") ERRDEF(STRPATC, "invalid pattern capture") ERRDEF(STRPATE, "malformed pattern (ends with " LUA_QL("%") ")") ERRDEF(STRPATM, "malformed pattern (missing " LUA_QL("]") ")") ERRDEF(STRPATU, "unbalanced pattern") ERRDEF(STRPATX, "pattern too complex") ERRDEF(STRCAPI, "invalid capture index") ERRDEF(STRCAPN, "too many captures") ERRDEF(STRCAPU, "unfinished capture") ERRDEF(STRFMTO, "invalid option " LUA_QL("%%%c") " to " LUA_QL("format")) ERRDEF(STRFMTR, "invalid format (repeated flags)") ERRDEF(STRFMTW, "invalid format (width or precision too long)") ERRDEF(STRGSRV, "invalid replacement value (a %s)") ERRDEF(BADMODN, "name conflict for module " LUA_QS) #if LJ_HASJIT #if LJ_TARGET_X86ORX64 ERRDEF(NOJIT, "JIT compiler disabled, CPU does not support SSE2") #else ERRDEF(NOJIT, "JIT compiler disabled") #endif #elif defined(LJ_ARCH_NOJIT) ERRDEF(NOJIT, "no JIT compiler for this architecture (yet)") #else ERRDEF(NOJIT, "JIT compiler permanently disabled by build option") #endif ERRDEF(JITOPT, "unknown or malformed optimization flag " LUA_QS) /* Lexer/parser errors. */ ERRDEF(XMODE, "attempt to load chunk with wrong mode") ERRDEF(XNEAR, "%s near " LUA_QS) ERRDEF(XELEM, "lexical element too long") ERRDEF(XLINES, "chunk has too many lines") ERRDEF(XLEVELS, "chunk has too many syntax levels") ERRDEF(XNUMBER, "malformed number") ERRDEF(XLSTR, "unfinished long string") ERRDEF(XLCOM, "unfinished long comment") ERRDEF(XSTR, "unfinished string") ERRDEF(XESC, "invalid escape sequence") ERRDEF(XLDELIM, "invalid long string delimiter") ERRDEF(XTOKEN, LUA_QS " expected") ERRDEF(XJUMP, "control structure too long") ERRDEF(XSLOTS, "function or expression too complex") ERRDEF(XLIMC, "chunk has more than %d local variables") ERRDEF(XLIMM, "main function has more than %d %s") ERRDEF(XLIMF, "function at line %d has more than %d %s") ERRDEF(XMATCH, LUA_QS " expected (to close " LUA_QS " at line %d)") ERRDEF(XFIXUP, "function too long for return fixup") ERRDEF(XPARAM, " or " LUA_QL("...") " expected") #if !LJ_52 ERRDEF(XAMBIG, "ambiguous syntax (function call x new statement)") #endif ERRDEF(XFUNARG, "function arguments expected") ERRDEF(XSYMBOL, "unexpected symbol") ERRDEF(XDOTS, "cannot use " LUA_QL("...") " outside a vararg function") ERRDEF(XSYNTAX, "syntax error") ERRDEF(XFOR, LUA_QL("=") " or " LUA_QL("in") " expected") ERRDEF(XBREAK, "no loop to break") ERRDEF(XLUNDEF, "undefined label " LUA_QS) ERRDEF(XLDUP, "duplicate label " LUA_QS) ERRDEF(XGSCOPE, " jumps into the scope of local " LUA_QS) /* Bytecode reader errors. */ ERRDEF(BCFMT, "cannot load incompatible bytecode") ERRDEF(BCBAD, "cannot load malformed bytecode") #if LJ_HASFFI /* FFI errors. */ ERRDEF(FFI_INVTYPE, "invalid C type") ERRDEF(FFI_INVSIZE, "size of C type is unknown or too large") ERRDEF(FFI_BADSCL, "bad storage class") ERRDEF(FFI_DECLSPEC, "declaration specifier expected") ERRDEF(FFI_BADTAG, "undeclared or implicit tag " LUA_QS) ERRDEF(FFI_REDEF, "attempt to redefine " LUA_QS) ERRDEF(FFI_NUMPARAM, "wrong number of type parameters") ERRDEF(FFI_INITOV, "too many initializers for " LUA_QS) ERRDEF(FFI_BADCONV, "cannot convert " LUA_QS " to " LUA_QS) ERRDEF(FFI_BADLEN, "attempt to get length of " LUA_QS) ERRDEF(FFI_BADCONCAT, "attempt to concatenate " LUA_QS " and " LUA_QS) ERRDEF(FFI_BADARITH, "attempt to perform arithmetic on " LUA_QS " and " LUA_QS) ERRDEF(FFI_BADCOMP, "attempt to compare " LUA_QS " with " LUA_QS) ERRDEF(FFI_BADCALL, LUA_QS " is not callable") ERRDEF(FFI_NUMARG, "wrong number of arguments for function call") ERRDEF(FFI_BADMEMBER, LUA_QS " has no member named " LUA_QS) ERRDEF(FFI_BADIDX, LUA_QS " cannot be indexed") ERRDEF(FFI_BADIDXW, LUA_QS " cannot be indexed with " LUA_QS) ERRDEF(FFI_BADMM, LUA_QS " has no " LUA_QS " metamethod") ERRDEF(FFI_WRCONST, "attempt to write to constant location") ERRDEF(FFI_NODECL, "missing declaration for symbol " LUA_QS) ERRDEF(FFI_BADCBACK, "bad callback") #if LJ_OS_NOJIT ERRDEF(FFI_CBACKOV, "no support for callbacks on this OS") #else ERRDEF(FFI_CBACKOV, "too many callbacks") #endif ERRDEF(FFI_NYIPACKBIT, "NYI: packed bit fields") ERRDEF(FFI_NYICALL, "NYI: cannot call this C function (yet)") #endif #undef ERRDEF /* Detecting unused error messages: awk -F, '/^ERRDEF/ { gsub(/ERRDEF./, ""); printf "grep -q LJ_ERR_%s *.[ch] || echo %s\n", $1, $1}' lj_errmsg.h | sh */ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/msvcbuild.bat0000664000000000000000000000701012202141143023034 0ustar rootroot@rem Script to build LuaJIT with MSVC. @rem Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h @rem @rem Either open a "Visual Studio .NET Command Prompt" @rem (Note that the Express Edition does not contain an x64 compiler) @rem -or- @rem Open a "Windows SDK Command Shell" and set the compiler environment: @rem setenv /release /x86 @rem -or- @rem setenv /release /x64 @rem @rem Then cd to this directory and run this script. @if not defined INCLUDE goto :FAIL @setlocal @set LJCOMPILE=cl /nologo /c /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE @set LJLINK=link /nologo @set LJMT=mt /nologo @set LJLIB=lib /nologo @set DASMDIR=..\dynasm @set DASM=%DASMDIR%\dynasm.lua @set LJDLLNAME=lua51.dll @set LJLIBNAME=lua51.lib @set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c %LJCOMPILE% host\minilua.c @if errorlevel 1 goto :BAD %LJLINK% /out:minilua.exe minilua.obj @if errorlevel 1 goto :BAD if exist minilua.exe.manifest^ %LJMT% -manifest minilua.exe.manifest -outputresource:minilua.exe @set DASMFLAGS=-D WIN -D JIT -D FFI -D P64 @set LJARCH=x64 @minilua @if errorlevel 8 goto :X64 @set DASMFLAGS=-D WIN -D JIT -D FFI @set LJARCH=x86 :X64 minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_x86.dasc @if errorlevel 1 goto :BAD %LJCOMPILE% /I "." /I %DASMDIR% host\buildvm*.c @if errorlevel 1 goto :BAD %LJLINK% /out:buildvm.exe buildvm*.obj @if errorlevel 1 goto :BAD if exist buildvm.exe.manifest^ %LJMT% -manifest buildvm.exe.manifest -outputresource:buildvm.exe buildvm -m peobj -o lj_vm.obj @if errorlevel 1 goto :BAD buildvm -m bcdef -o lj_bcdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m ffdef -o lj_ffdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m libdef -o lj_libdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m recdef -o lj_recdef.h %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m vmdef -o jit\vmdef.lua %ALL_LIB% @if errorlevel 1 goto :BAD buildvm -m folddef -o lj_folddef.h lj_opt_fold.c @if errorlevel 1 goto :BAD @if "%1" neq "debug" goto :NODEBUG @shift @set LJCOMPILE=%LJCOMPILE% /Zi @set LJLINK=%LJLINK% /debug :NODEBUG @if "%1"=="amalg" goto :AMALGDLL @if "%1"=="static" goto :STATIC %LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c @if errorlevel 1 goto :BAD %LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj @if errorlevel 1 goto :BAD @goto :MTDLL :STATIC %LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c @if errorlevel 1 goto :BAD %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj @if errorlevel 1 goto :BAD @goto :MTDLL :AMALGDLL %LJCOMPILE% /DLUA_BUILD_AS_DLL ljamalg.c @if errorlevel 1 goto :BAD %LJLINK% /DLL /out:%LJDLLNAME% ljamalg.obj lj_vm.obj @if errorlevel 1 goto :BAD :MTDLL if exist %LJDLLNAME%.manifest^ %LJMT% -manifest %LJDLLNAME%.manifest -outputresource:%LJDLLNAME%;2 %LJCOMPILE% luajit.c @if errorlevel 1 goto :BAD %LJLINK% /out:luajit.exe luajit.obj %LJLIBNAME% @if errorlevel 1 goto :BAD if exist luajit.exe.manifest^ %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe @del *.obj *.manifest minilua.exe buildvm.exe @echo. @echo === Successfully built LuaJIT for Windows/%LJARCH% === @goto :END :BAD @echo. @echo ******************************************************* @echo *** Build FAILED -- Please check the error messages *** @echo ******************************************************* @goto :END :FAIL @echo You must open a "Visual Studio .NET Command Prompt" to run this script :END tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_dce.o0000664000000000000000000000341012213333055022645 0ustar rootrootELF>@@ UHHxHW@HHH^uWHGHH t߈HHHpHJpLcED!_-HcHpf1@@ f@ff@,fv HwL @f=v HOL PUHtfGtYLAHG LHW(Lpt%Av HOL H9wIM9u]GCC: (Debian 4.7.3-4) 4.7.3zRx AC  <uAC p .symtab.strtab.shstrtab.rela.text.data.bss.comment.note.GNU-stack.rela.eh_frame @e &,10:OXJ0  Y  2'ulj_opt_dce.cdce_propagatelj_ir_modelj_opt_dcet @tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/luaconf.h0000664000000000000000000001115612231715321022171 0ustar rootroot/* ** Configuration header. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef luaconf_h #define luaconf_h #include #include /* Default path for loading Lua and C modules with require(). */ #if defined(_WIN32) /* ** In Windows, any exclamation mark ('!') in the path is replaced by the ** path of the directory of the executable file of the current process. */ #define LUA_LDIR "!\\lua\\" #define LUA_CDIR "!\\" #define LUA_PATH_DEFAULT \ ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" #define LUA_CPATH_DEFAULT \ ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" #else /* ** Note to distribution maintainers: do NOT patch the following lines! ** Please read ../doc/install.html#distro and pass PREFIX=/usr instead. */ #ifndef LUA_MULTILIB #define LUA_MULTILIB "lib" #endif #ifndef LUA_LMULTILIB #define LUA_LMULTILIB "lib" #endif #define LUA_LROOT "/usr/local" #define LUA_LUADIR "/lua/5.1/" #define LUA_LJDIR "/luajit-2.0.2/" #ifdef LUA_ROOT #define LUA_JROOT LUA_ROOT #define LUA_RLDIR LUA_ROOT "/share" LUA_LUADIR #define LUA_RCDIR LUA_ROOT "/" LUA_MULTILIB LUA_LUADIR #define LUA_RLPATH ";" LUA_RLDIR "?.lua;" LUA_RLDIR "?/init.lua" #define LUA_RCPATH ";" LUA_RCDIR "?.so" #else #define LUA_JROOT LUA_LROOT #define LUA_RLPATH #define LUA_RCPATH #endif #define LUA_JPATH ";" LUA_JROOT "/share" LUA_LJDIR "?.lua" #define LUA_LLDIR LUA_LROOT "/share" LUA_LUADIR #define LUA_LCDIR LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR #define LUA_LLPATH ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua" #define LUA_LCPATH1 ";" LUA_LCDIR "?.so" #define LUA_LCPATH2 ";" LUA_LCDIR "loadall.so" #define LUA_PATH_DEFAULT "./?.lua" LUA_JPATH LUA_LLPATH LUA_RLPATH #define LUA_CPATH_DEFAULT "./?.so" LUA_LCPATH1 LUA_RCPATH LUA_LCPATH2 #endif /* Environment variable names for path overrides and initialization code. */ #define LUA_PATH "LUA_PATH" #define LUA_CPATH "LUA_CPATH" #define LUA_INIT "LUA_INIT" /* Special file system characters. */ #if defined(_WIN32) #define LUA_DIRSEP "\\" #else #define LUA_DIRSEP "/" #endif #define LUA_PATHSEP ";" #define LUA_PATH_MARK "?" #define LUA_EXECDIR "!" #define LUA_IGMARK "-" #define LUA_PATH_CONFIG \ LUA_DIRSEP "\n" LUA_PATHSEP "\n" LUA_PATH_MARK "\n" \ LUA_EXECDIR "\n" LUA_IGMARK /* Quoting in error messages. */ #define LUA_QL(x) "'" x "'" #define LUA_QS LUA_QL("%s") /* Various tunables. */ #define LUAI_MAXSTACK 65500 /* Max. # of stack slots for a thread (<64K). */ #define LUAI_MAXCSTACK 8000 /* Max. # of stack slots for a C func (<10K). */ #define LUAI_GCPAUSE 200 /* Pause GC until memory is at 200%. */ #define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */ #define LUA_MAXCAPTURES 32 /* Max. pattern captures. */ /* Compatibility with older library function names. */ #define LUA_COMPAT_MOD /* OLD: math.mod, NEW: math.fmod */ #define LUA_COMPAT_GFIND /* OLD: string.gfind, NEW: string.gmatch */ /* Configuration for the frontend (the luajit executable). */ #if defined(luajit_c) #define LUA_PROGNAME "luajit" /* Fallback frontend name. */ #define LUA_PROMPT "> " /* Interactive prompt. */ #define LUA_PROMPT2 ">> " /* Continuation prompt. */ #define LUA_MAXINPUT 512 /* Max. input line length. */ #endif /* Note: changing the following defines breaks the Lua 5.1 ABI. */ #define LUA_INTEGER ptrdiff_t #define LUA_IDSIZE 60 /* Size of lua_Debug.short_src. */ /* ** Size of lauxlib and io.* on-stack buffers. Weird workaround to avoid using ** unreasonable amounts of stack space, but still retain ABI compatibility. ** Blame Lua for depending on BUFSIZ in the ABI, blame **** for wrecking it. */ #define LUAL_BUFFERSIZE (BUFSIZ > 16384 ? 8192 : BUFSIZ) /* The following defines are here only for compatibility with luaconf.h ** from the standard Lua distribution. They must not be changed for LuaJIT. */ #define LUA_NUMBER_DOUBLE #define LUA_NUMBER double #define LUAI_UACNUMBER double #define LUA_NUMBER_SCAN "%lf" #define LUA_NUMBER_FMT "%.14g" #define lua_number2str(s, n) sprintf((s), LUA_NUMBER_FMT, (n)) #define LUAI_MAXNUMBER2STR 32 #define LUA_INTFRMLEN "l" #define LUA_INTFRM_T long /* Linkage of public API functions. */ #if defined(LUA_BUILD_AS_DLL) #if defined(LUA_CORE) || defined(LUA_LIB) #define LUA_API __declspec(dllexport) #else #define LUA_API __declspec(dllimport) #endif #else #define LUA_API extern #endif #define LUALIB_API LUA_API /* Support for internal assertions. */ #if defined(LUA_USE_ASSERT) || defined(LUA_USE_APICHECK) #include #endif #ifdef LUA_USE_ASSERT #define lua_assert(x) assert(x) #endif #ifdef LUA_USE_APICHECK #define luai_apicheck(L, o) { (void)L; assert(o); } #else #define luai_apicheck(L, o) { (void)L; } #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_dispatch.h0000664000000000000000000001037712202141143023023 0ustar rootroot/* ** Instruction dispatch handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_DISPATCH_H #define _LJ_DISPATCH_H #include "lj_obj.h" #include "lj_bc.h" #if LJ_HASJIT #include "lj_jit.h" #endif #if LJ_TARGET_MIPS /* Need our own global offset table for the dreaded MIPS calling conventions. */ #if LJ_HASJIT #define JITGOTDEF(_) _(lj_trace_exit) _(lj_trace_hot) #else #define JITGOTDEF(_) #endif #if LJ_HASFFI #define FFIGOTDEF(_) \ _(lj_meta_equal_cd) _(lj_ccallback_enter) _(lj_ccallback_leave) #else #define FFIGOTDEF(_) #endif #define GOTDEF(_) \ _(floor) _(ceil) _(trunc) _(log) _(log10) _(exp) _(sin) _(cos) _(tan) \ _(asin) _(acos) _(atan) _(sinh) _(cosh) _(tanh) _(frexp) _(modf) _(atan2) \ _(pow) _(fmod) _(ldexp) \ _(lj_dispatch_call) _(lj_dispatch_ins) _(lj_err_throw) \ _(lj_ffh_coroutine_wrap_err) _(lj_func_closeuv) _(lj_func_newL_gc) \ _(lj_gc_barrieruv) _(lj_gc_step) _(lj_gc_step_fixtop) _(lj_meta_arith) \ _(lj_meta_call) _(lj_meta_cat) _(lj_meta_comp) _(lj_meta_equal) \ _(lj_meta_for) _(lj_meta_len) _(lj_meta_tget) _(lj_meta_tset) \ _(lj_state_growstack) _(lj_str_fromnum) _(lj_str_fromnumber) _(lj_str_new) \ _(lj_tab_dup) _(lj_tab_get) _(lj_tab_getinth) _(lj_tab_len) _(lj_tab_new) \ _(lj_tab_newkey) _(lj_tab_next) _(lj_tab_reasize) \ JITGOTDEF(_) FFIGOTDEF(_) enum { #define GOTENUM(name) LJ_GOT_##name, GOTDEF(GOTENUM) #undef GOTENUM LJ_GOT__MAX }; #endif /* Type of hot counter. Must match the code in the assembler VM. */ /* 16 bits are sufficient. Only 0.0015% overhead with maximum slot penalty. */ typedef uint16_t HotCount; /* Number of hot counter hash table entries (must be a power of two). */ #define HOTCOUNT_SIZE 64 #define HOTCOUNT_PCMASK ((HOTCOUNT_SIZE-1)*sizeof(HotCount)) /* Hotcount decrements. */ #define HOTCOUNT_LOOP 2 #define HOTCOUNT_CALL 1 /* This solves a circular dependency problem -- bump as needed. Sigh. */ #define GG_NUM_ASMFF 62 #define GG_LEN_DDISP (BC__MAX + GG_NUM_ASMFF) #define GG_LEN_SDISP BC_FUNCF #define GG_LEN_DISP (GG_LEN_DDISP + GG_LEN_SDISP) /* Global state, main thread and extra fields are allocated together. */ typedef struct GG_State { lua_State L; /* Main thread. */ global_State g; /* Global state. */ #if LJ_TARGET_MIPS ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */ #endif #if LJ_HASJIT jit_State J; /* JIT state. */ HotCount hotcount[HOTCOUNT_SIZE]; /* Hot counters. */ #endif ASMFunction dispatch[GG_LEN_DISP]; /* Instruction dispatch tables. */ BCIns bcff[GG_NUM_ASMFF]; /* Bytecode for ASM fast functions. */ } GG_State; #define GG_OFS(field) ((int)offsetof(GG_State, field)) #define G2GG(gl) ((GG_State *)((char *)(gl) - GG_OFS(g))) #define J2GG(j) ((GG_State *)((char *)(j) - GG_OFS(J))) #define L2GG(L) (G2GG(G(L))) #define J2G(J) (&J2GG(J)->g) #define G2J(gl) (&G2GG(gl)->J) #define L2J(L) (&L2GG(L)->J) #define GG_G2DISP (GG_OFS(dispatch) - GG_OFS(g)) #define GG_DISP2G (GG_OFS(g) - GG_OFS(dispatch)) #define GG_DISP2J (GG_OFS(J) - GG_OFS(dispatch)) #define GG_DISP2HOT (GG_OFS(hotcount) - GG_OFS(dispatch)) #define GG_DISP2STATIC (GG_LEN_DDISP*(int)sizeof(ASMFunction)) #define hotcount_get(gg, pc) \ (gg)->hotcount[(u32ptr(pc)>>2) & (HOTCOUNT_SIZE-1)] #define hotcount_set(gg, pc, val) \ (hotcount_get((gg), (pc)) = (HotCount)(val)) /* Dispatch table management. */ LJ_FUNC void lj_dispatch_init(GG_State *GG); #if LJ_HASJIT LJ_FUNC void lj_dispatch_init_hotcount(global_State *g); #endif LJ_FUNC void lj_dispatch_update(global_State *g); /* Instruction dispatch callback for hooks or when recording. */ LJ_FUNCA void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc); LJ_FUNCA ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns*pc); LJ_FUNCA void LJ_FASTCALL lj_dispatch_return(lua_State *L, const BCIns *pc); #if LJ_HASFFI && !defined(_BUILDVM_H) /* Save/restore errno and GetLastError() around hooks, exits and recording. */ #include #if LJ_TARGET_WINDOWS #define WIN32_LEAN_AND_MEAN #include #define ERRNO_SAVE int olderr = errno; DWORD oldwerr = GetLastError(); #define ERRNO_RESTORE errno = olderr; SetLastError(oldwerr); #else #define ERRNO_SAVE int olderr = errno; #define ERRNO_RESTORE errno = olderr; #endif #else #define ERRNO_SAVE #define ERRNO_RESTORE #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_trace.o0000664000000000000000000005237012213333060022333 0ustar rootrootELF>,@@UHV0f~TuHuDF8AN4TDEAMA wEB$AEt D;<rEH0BH9tDF:H8JtIQt&Nt!EvDNtAEJPuyt;<rL0A H9tD!UtDB&NPf9u FVfB&fD<D9rH0HtXBVftOf9tA9w3f9u FVfBV0A9wBVfu]UHSHHHG0@HrH:HCH[]UHLJ HW`HBHHHJ*H`UHHW`HBHHHJ*H`UHHVPft#;sNPHNV+VHL VHJH)P HxP]UHG%tGWG%@VuG@Uv/HGDHtHHOt LtRuHH9u]Åt*;<s"H04Htf~Tu UH ]UHAUATSHIF&ft[H;r& ;r LH4LAD$&fuH[A\A]]UHAWAVAUATSHH}DwI@A@^MAAMeM~|D9w/DIIA;r! IIIB Hf{Tu HLfCPIB MfAdž(AdžIHǺtAƆIf@t fH@t HɸHt Ht fHtLIHǺtAƆI @t fH@t HɸHt Ht fHtHEȋP9ȖH}HøHH}HMHQHJHuHNBxuPF@(tHH}M#H[A\A]A^A_]UHAVAUATSIHGx@%t^P uDHWh Nt(Kt#QtUtn ID$xH%ADŽ$8LJ8D<AviI$0<u?-uBI$0<uCA$8E$<A$8A9wA$v =fFD9v^I$<I$0I|$`AI$0E9$<v DI$0AE;$<rA$8u?A$@tyI|$`ADŽ$wI$0D$L`At A$I|$_@t fH@t HɸHt Ht fHtfA\$PAD$AD$I$ID$I$ID$ I$ ID$(AƄ$AƄ$AƄ$AƄ$ADŽ$,ID$xAD$0Ml$`AEH9ȖLIH/LIUHJIMBxuPAE@(tIEHPIU*ID$pIUHJIMBxuPAE@(tID$xH@IT$hH)HIEHHIM*A$P t0IUHJIM*A$T IEHHIM*LLLD<D9d[A\A]A^]UHAWAVAUATSH(IHHhHE$ǃHjH} HX Ht%u` HǃX ƃǃPAEz%LHLLKPIUHrIu*HSpIMHqIuAzuJAUR(tHSxHtH@HKhH)HIUHrIu*IUHrIu*HLLLHo HX Ht` HǃX ǃ@tgSPf9SRu]uMǃPHHt"fCRCCǃbHǃǃPHHs4K8ы{0DsPBK$ƄJfDvP&fSVfDp&0HC PD ЃSҋP tf{TuHK@T ;<rH04HP t;<rH0T H@ DCTft ;<rH0f@LPXfSXfDpXHs@Hǃ,DkD+kISCHPIL`H{`ILx`HI$HCID$HCID$HCID$HC ID$ HC(ID$(HC0ID$0HC8ID$8HC@ID$@HCHID$HHCPID$PHCXID$XA$DAD$AD$ CHLH)IL$SHCH4LLMMl$ SHHs LCI|I|$(SHHs(fCPAT$PH0D$LhAt$PLLc`AD$9ȖLIHLIT$HJIL$BxuPAD$@(tID$HPIT$EA*LLǃPǃLIEHPIUfWHX Ht` HǃX Lc`ǃ,HID$PwEvBD,pAuHID$ǃYAP C8E{4DC0H9tH H9uCӴimNA90J`v:EgAH%TH@uP?‰ӰHHfTfDtHH?fC CPfEDEIT$HUAL$$MfCRCAD$K9ȖLHEH1LIT$HJIL$BxuPAD$@(tID$HPIT$U*HC`HPHHsh9BHurHu@HH)HH)‹xuIT$HJIL$BxuHAT$R(txt@H)HID$HPIT$*EHMH)AT$$ID$HpIt$HTHH Jv<H9uPAD$@(tID$HPIT$H HH Jv<H9uPAD$@(tHuLUH0D;8sD8fCPIl$A uxH{xuHChPvEt9ǃP ǃT ǃH?AuLǃPǃHh H([A\A]A^A_]UHHHHHHPHǏHHHHG]UHATSHLH~bH9tHH~9w5H<t5HH9|LLHH)S H{SHH)S H{S)HHH4)S H{SHH)S H{S[A\]UHSHHHwhHG`H@@HGpxuPH@HSx ǃH{`HھuH[]UHH]LeLmLuH HIID0D? fC u3`u*ǃP ǃT ǃIuHE4$H]LeLmLuUHAWAVAUATSH8IIID8I\$`A$P t A;$<rI$0Ht@A9$T rLeLuHUHtC HHEHC H+CH= 8HA$P HCHHHK*A$T HCHHHK*HCHPHSHCHPHSHSI*HHSHH=uڰHHSAHSf.{H HCHH=uHuHLuHC0HHEDpCP)tu@HA$P t A;$<rI$0H@ A$T A$`u]HPtNPA;$|;A$tADŽ$LLAit) < 0xfffeffffu)abort((fn)->c.ffid == 0)J->pt != ((void *)0)J->state == LJ_TRACE_IDLET->root == 0 && pt != ((void *)0)(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace((((((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace) ? (void) (0) : __assert_fail ("(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace", "lj_trace.c", 190, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(((BCReg)((*pc)>>16)))]).gcptr32))) == T((BCOp)((*pc)&0xff)) == BC_JFORIop == BC_ITERL || op == BC_LOOP || bc_isret(op)((((((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace) ? (void) (0) : __assert_fail ("(((BCReg)((*pc)>>16)))>0 && (MSize)(((BCReg)((*pc)>>16)))sizetrace", "lj_trace.c", 205, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(((BCReg)((*pc)>>16)))]).gcptr32))) == T(pt->trace)>0 && (MSize)(pt->trace)sizetrace(T2->nextroot)>0 && (MSize)(T2->nextroot)sizetrace(pt->trace)>0 && (MSize)(pt->trace)<(&((GG_State *)((char *)(g) - ((int)__builtin_offsetof (GG_State, g))))->J)->sizetrace(i)>0 && (MSize)(i)sizetrace!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))((BCOp)((*J->pc)&0xff)) == BC_FORL || ((BCOp)((*J->pc)&0xff)) == BC_ITERL || ((BCOp)((*J->pc)&0xff)) == BC_LOOP || ((BCOp)((*J->pc)&0xff)) == BC_FUNCF(J->freetrace)>0 && (MSize)(J->freetrace)sizetrace((&((GG_State *)((char *)(J) - ((int)__builtin_offsetof (GG_State, J))))->g)->hookmask & 0x40) == 0J->parent != 0 && J->cur.root != 0(J->parent)>0 && (MSize)(J->parent)sizetrace(J->cur.root)>0 && (MSize)(J->cur.root)sizetrace!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))bc_isret(((BCOp)((*J->pc)&0xff)))i == (ptrdiff_t)J->cur.traceno || ((((i)>0 && (MSize)(i)sizetrace) ? (void) (0) : __assert_fail ("(i)>0 && (MSize)(i)sizetrace", "lj_trace.c", 309, __PRETTY_FUNCTION__)), ((GCtrace *)((GCobj *)(uintptr_t)(J->trace[(i)]).gcptr32))) == ((void *)0)T != ((void *)0) && J->exitno < T->nsnaptrace_flushroottrace_unpatchlj_trace_flushprotolj_trace_flushallsetgcVlj_trace_freestatetrace_starttrace_findfreetrace_stopnumberVinttrace_abortcopyTVtrace_downreclj_trace_exittrace_hotside0@GCC: (Debian 4.7.3-4) 4.7.3zRx AC ~ <3AC Ei \4AC x*AC _AC Z UAC P 0eC F $AC Iq (AC M $HGAC G; (p4 AC M" >AC y  $AC C  bAC EX $AC T| ,,AC M .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rela.rodata.rodata.cst8.comment.note.GNU-stack.rela.eh_frame @x;& , 12 @2 T'OxP\)i0)r))XxS ,0  p7 5N3\ u@R$Gs k 4   # <Un`     4* _sU.0=Qwcq -<CVe>x$bclj_trace.ctrace_flushroot__PRETTY_FUNCTION__.5326__PRETTY_FUNCTION__.5314trace_exit_cp__PRETTY_FUNCTION__.5341__PRETTY_FUNCTION__.5351__PRETTY_FUNCTION__.3380trace_start__PRETTY_FUNCTION__.5391__PRETTY_FUNCTION__.5277trace_state__PRETTY_FUNCTION__.5411__PRETTY_FUNCTION__.3440__PRETTY_FUNCTION__.5433__PRETTY_FUNCTION__.3429__PRETTY_FUNCTION__.5418__PRETTY_FUNCTION__.5366__PRETTY_FUNCTION__.5510__PRETTY_FUNCTION__.5475.LC34__assert_faillj_snap_restorelj_trace_errlj_err_throwlj_trace_err_infolj_trace_freelj_trace_reenableprotolj_trace_flushlj_trace_flushprotolj_trace_flushalllj_mcode_freelj_vmevent_preparelj_str_newlj_vmevent_calllj_mem_growlj_record_setuplj_dispatch_updatelj_record_inslj_opt_dcelj_opt_looplj_opt_sinklj_asm_tracelj_asm_patchexitlj_mcode_commitlj_mem_reallocmemcpylj_gc_barriertracelj_mcode_abortlj_trace_initstatelj_trace_freestatelj_ir_k64_freealllj_trace_inslj_vm_cpcalllj_trace_hot__errno_locationlj_trace_exitlj_state_growstacklj_gc_step  # ( \ s }  (   p        % / 4  9 c m r (w             8 Z d i pn !##- 7 < A  @  ( *t+ ), R / P -c sm r xw     j. s  H ) + 8" ,X Rb /g Pl  R / P  ? -G / X 0 + R / P  - 1i 2q 3 4 5 Q [ ` e |    6         = G L >Q ]78V9r99:+ @,7 RA /F PK q-0;  / E  `+w _, R / P r R| / P    e  ( /- H2 ~  / H -   y    x X)x0 `! & (+ = `G L Q b*j>G k T@B?B6 @ E J o y ~    @+D>-E ) . 3     ?   ( ` (08@HPX ` h p x%%%<< <<<<<<? @`|s wL$tk c0tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_emit_arm.h0000664000000000000000000002503312202141143023014 0ustar rootroot/* ** ARM instruction emitter. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Constant encoding --------------------------------------------------- */ static uint8_t emit_invai[16] = { /* AND */ (ARMI_AND^ARMI_BIC) >> 21, /* EOR */ 0, /* SUB */ (ARMI_SUB^ARMI_ADD) >> 21, /* RSB */ 0, /* ADD */ (ARMI_ADD^ARMI_SUB) >> 21, /* ADC */ (ARMI_ADC^ARMI_SBC) >> 21, /* SBC */ (ARMI_SBC^ARMI_ADC) >> 21, /* RSC */ 0, /* TST */ 0, /* TEQ */ 0, /* CMP */ (ARMI_CMP^ARMI_CMN) >> 21, /* CMN */ (ARMI_CMN^ARMI_CMP) >> 21, /* ORR */ 0, /* MOV */ (ARMI_MOV^ARMI_MVN) >> 21, /* BIC */ (ARMI_BIC^ARMI_AND) >> 21, /* MVN */ (ARMI_MVN^ARMI_MOV) >> 21 }; /* Encode constant in K12 format for data processing instructions. */ static uint32_t emit_isk12(ARMIns ai, int32_t n) { uint32_t invai, i, m = (uint32_t)n; /* K12: unsigned 8 bit value, rotated in steps of two bits. */ for (i = 0; i < 4096; i += 256, m = lj_rol(m, 2)) if (m <= 255) return ARMI_K12|m|i; /* Otherwise try negation/complement with the inverse instruction. */ invai = emit_invai[((ai >> 21) & 15)]; if (!invai) return 0; /* Failed. No inverse instruction. */ m = ~(uint32_t)n; if (invai == ((ARMI_SUB^ARMI_ADD) >> 21) || invai == (ARMI_CMP^ARMI_CMN) >> 21) m++; for (i = 0; i < 4096; i += 256, m = lj_rol(m, 2)) if (m <= 255) return ARMI_K12|(invai<<21)|m|i; return 0; /* Failed. */ } /* -- Emit basic instructions --------------------------------------------- */ static void emit_dnm(ASMState *as, ARMIns ai, Reg rd, Reg rn, Reg rm) { *--as->mcp = ai | ARMF_D(rd) | ARMF_N(rn) | ARMF_M(rm); } static void emit_dm(ASMState *as, ARMIns ai, Reg rd, Reg rm) { *--as->mcp = ai | ARMF_D(rd) | ARMF_M(rm); } static void emit_dn(ASMState *as, ARMIns ai, Reg rd, Reg rn) { *--as->mcp = ai | ARMF_D(rd) | ARMF_N(rn); } static void emit_nm(ASMState *as, ARMIns ai, Reg rn, Reg rm) { *--as->mcp = ai | ARMF_N(rn) | ARMF_M(rm); } static void emit_d(ASMState *as, ARMIns ai, Reg rd) { *--as->mcp = ai | ARMF_D(rd); } static void emit_n(ASMState *as, ARMIns ai, Reg rn) { *--as->mcp = ai | ARMF_N(rn); } static void emit_m(ASMState *as, ARMIns ai, Reg rm) { *--as->mcp = ai | ARMF_M(rm); } static void emit_lsox(ASMState *as, ARMIns ai, Reg rd, Reg rn, int32_t ofs) { lua_assert(ofs >= -255 && ofs <= 255); if (ofs < 0) ofs = -ofs; else ai |= ARMI_LS_U; *--as->mcp = ai | ARMI_LS_P | ARMI_LSX_I | ARMF_D(rd) | ARMF_N(rn) | ((ofs & 0xf0) << 4) | (ofs & 0x0f); } static void emit_lso(ASMState *as, ARMIns ai, Reg rd, Reg rn, int32_t ofs) { lua_assert(ofs >= -4095 && ofs <= 4095); /* Combine LDR/STR pairs to LDRD/STRD. */ if (*as->mcp == (ai|ARMI_LS_P|ARMI_LS_U|ARMF_D(rd^1)|ARMF_N(rn)|(ofs^4)) && (ai & ~(ARMI_LDR^ARMI_STR)) == ARMI_STR && rd != rn && (uint32_t)ofs <= 252 && !(ofs & 3) && !((rd ^ (ofs >>2)) & 1) && as->mcp != as->mcloop) { as->mcp++; emit_lsox(as, ai == ARMI_LDR ? ARMI_LDRD : ARMI_STRD, rd&~1, rn, ofs&~4); return; } if (ofs < 0) ofs = -ofs; else ai |= ARMI_LS_U; *--as->mcp = ai | ARMI_LS_P | ARMF_D(rd) | ARMF_N(rn) | ofs; } #if !LJ_SOFTFP static void emit_vlso(ASMState *as, ARMIns ai, Reg rd, Reg rn, int32_t ofs) { lua_assert(ofs >= -1020 && ofs <= 1020 && (ofs&3) == 0); if (ofs < 0) ofs = -ofs; else ai |= ARMI_LS_U; *--as->mcp = ai | ARMI_LS_P | ARMF_D(rd & 15) | ARMF_N(rn) | (ofs >> 2); } #endif /* -- Emit loads/stores --------------------------------------------------- */ /* Prefer spills of BASE/L. */ #define emit_canremat(ref) ((ref) < ASMREF_L) /* Try to find a one step delta relative to another constant. */ static int emit_kdelta1(ASMState *as, Reg d, int32_t i) { RegSet work = ~as->freeset & RSET_GPR; while (work) { Reg r = rset_picktop(work); IRRef ref = regcost_ref(as->cost[r]); lua_assert(r != d); if (emit_canremat(ref)) { int32_t delta = i - (ra_iskref(ref) ? ra_krefk(as, ref) : IR(ref)->i); uint32_t k = emit_isk12(ARMI_ADD, delta); if (k) { if (k == ARMI_K12) emit_dm(as, ARMI_MOV, d, r); else emit_dn(as, ARMI_ADD^k, d, r); return 1; } } rset_clear(work, r); } return 0; /* Failed. */ } /* Try to find a two step delta relative to another constant. */ static int emit_kdelta2(ASMState *as, Reg d, int32_t i) { RegSet work = ~as->freeset & RSET_GPR; while (work) { Reg r = rset_picktop(work); IRRef ref = regcost_ref(as->cost[r]); lua_assert(r != d); if (emit_canremat(ref)) { int32_t other = ra_iskref(ref) ? ra_krefk(as, ref) : IR(ref)->i; if (other) { int32_t delta = i - other; uint32_t sh, inv = 0, k2, k; if (delta < 0) { delta = -delta; inv = ARMI_ADD^ARMI_SUB; } sh = lj_ffs(delta) & ~1; k2 = emit_isk12(0, delta & (255 << sh)); k = emit_isk12(0, delta & ~(255 << sh)); if (k) { emit_dn(as, ARMI_ADD^k2^inv, d, d); emit_dn(as, ARMI_ADD^k^inv, d, r); return 1; } } } rset_clear(work, r); } return 0; /* Failed. */ } /* Load a 32 bit constant into a GPR. */ static void emit_loadi(ASMState *as, Reg r, int32_t i) { uint32_t k = emit_isk12(ARMI_MOV, i); lua_assert(rset_test(as->freeset, r) || r == RID_TMP); if (k) { /* Standard K12 constant. */ emit_d(as, ARMI_MOV^k, r); } else if ((as->flags & JIT_F_ARMV6T2) && (uint32_t)i < 0x00010000u) { /* 16 bit loword constant for ARMv6T2. */ emit_d(as, ARMI_MOVW|(i & 0x0fff)|((i & 0xf000)<<4), r); } else if (emit_kdelta1(as, r, i)) { /* One step delta relative to another constant. */ } else if ((as->flags & JIT_F_ARMV6T2)) { /* 32 bit hiword/loword constant for ARMv6T2. */ emit_d(as, ARMI_MOVT|((i>>16) & 0x0fff)|(((i>>16) & 0xf000)<<4), r); emit_d(as, ARMI_MOVW|(i & 0x0fff)|((i & 0xf000)<<4), r); } else if (emit_kdelta2(as, r, i)) { /* Two step delta relative to another constant. */ } else { /* Otherwise construct the constant with up to 4 instructions. */ /* NYI: use mvn+bic, use pc-relative loads. */ for (;;) { uint32_t sh = lj_ffs(i) & ~1; int32_t m = i & (255 << sh); i &= ~(255 << sh); if (i == 0) { emit_d(as, ARMI_MOV ^ emit_isk12(0, m), r); break; } emit_dn(as, ARMI_ORR ^ emit_isk12(0, m), r, r); } } } #define emit_loada(as, r, addr) emit_loadi(as, (r), i32ptr((addr))) static Reg ra_allock(ASMState *as, int32_t k, RegSet allow); /* Get/set from constant pointer. */ static void emit_lsptr(ASMState *as, ARMIns ai, Reg r, void *p) { int32_t i = i32ptr(p); emit_lso(as, ai, r, ra_allock(as, (i & ~4095), rset_exclude(RSET_GPR, r)), (i & 4095)); } #if !LJ_SOFTFP /* Load a number constant into an FPR. */ static void emit_loadn(ASMState *as, Reg r, cTValue *tv) { int32_t i; if ((as->flags & JIT_F_VFPV3) && !tv->u32.lo) { uint32_t hi = tv->u32.hi; uint32_t b = ((hi >> 22) & 0x1ff); if (!(hi & 0xffff) && (b == 0x100 || b == 0x0ff)) { *--as->mcp = ARMI_VMOVI_D | ARMF_D(r & 15) | ((tv->u32.hi >> 12) & 0x00080000) | ((tv->u32.hi >> 4) & 0x00070000) | ((tv->u32.hi >> 16) & 0x0000000f); return; } } i = i32ptr(tv); emit_vlso(as, ARMI_VLDR_D, r, ra_allock(as, (i & ~1020), RSET_GPR), (i & 1020)); } #endif /* Get/set global_State fields. */ #define emit_getgl(as, r, field) \ emit_lsptr(as, ARMI_LDR, (r), (void *)&J2G(as->J)->field) #define emit_setgl(as, r, field) \ emit_lsptr(as, ARMI_STR, (r), (void *)&J2G(as->J)->field) /* Trace number is determined from pc of exit instruction. */ #define emit_setvmstate(as, i) UNUSED(i) /* -- Emit control-flow instructions -------------------------------------- */ /* Label for internal jumps. */ typedef MCode *MCLabel; /* Return label pointing to current PC. */ #define emit_label(as) ((as)->mcp) static void emit_branch(ASMState *as, ARMIns ai, MCode *target) { MCode *p = as->mcp; ptrdiff_t delta = (target - p) - 1; lua_assert(((delta + 0x00800000) >> 24) == 0); *--p = ai | ((uint32_t)delta & 0x00ffffffu); as->mcp = p; } #define emit_jmp(as, target) emit_branch(as, ARMI_B, (target)) static void emit_call(ASMState *as, void *target) { MCode *p = --as->mcp; ptrdiff_t delta = ((char *)target - (char *)p) - 8; if ((((delta>>2) + 0x00800000) >> 24) == 0) { if ((delta & 1)) *p = ARMI_BLX | ((uint32_t)(delta>>2) & 0x00ffffffu) | ((delta&2) << 27); else *p = ARMI_BL | ((uint32_t)(delta>>2) & 0x00ffffffu); } else { /* Target out of range: need indirect call. But don't use R0-R3. */ Reg r = ra_allock(as, i32ptr(target), RSET_RANGE(RID_R4, RID_R12+1)); *p = ARMI_BLXr | ARMF_M(r); } } /* -- Emit generic operations --------------------------------------------- */ /* Generic move between two regs. */ static void emit_movrr(ASMState *as, IRIns *ir, Reg dst, Reg src) { #if LJ_SOFTFP lua_assert(!irt_isnum(ir->t)); UNUSED(ir); #else if (dst >= RID_MAX_GPR) { emit_dm(as, irt_isnum(ir->t) ? ARMI_VMOV_D : ARMI_VMOV_S, (dst & 15), (src & 15)); return; } #endif if (as->mcp != as->mcloop) { /* Swap early registers for loads/stores. */ MCode ins = *as->mcp, swp = (src^dst); if ((ins & 0x0c000000) == 0x04000000 && (ins & 0x02000010) != 0x02000010) { if (!((ins ^ (dst << 16)) & 0x000f0000)) *as->mcp = ins ^ (swp << 16); /* Swap N in load/store. */ if (!(ins & 0x00100000) && !((ins ^ (dst << 12)) & 0x0000f000)) *as->mcp = ins ^ (swp << 12); /* Swap D in store. */ } } emit_dm(as, ARMI_MOV, dst, src); } /* Generic load of register from stack slot. */ static void emit_spload(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { #if LJ_SOFTFP lua_assert(!irt_isnum(ir->t)); UNUSED(ir); #else if (r >= RID_MAX_GPR) emit_vlso(as, irt_isnum(ir->t) ? ARMI_VLDR_D : ARMI_VLDR_S, r, RID_SP, ofs); else #endif emit_lso(as, ARMI_LDR, r, RID_SP, ofs); } /* Generic store of register to stack slot. */ static void emit_spstore(ASMState *as, IRIns *ir, Reg r, int32_t ofs) { #if LJ_SOFTFP lua_assert(!irt_isnum(ir->t)); UNUSED(ir); #else if (r >= RID_MAX_GPR) emit_vlso(as, irt_isnum(ir->t) ? ARMI_VSTR_D : ARMI_VSTR_S, r, RID_SP, ofs); else #endif emit_lso(as, ARMI_STR, r, RID_SP, ofs); } /* Emit an arithmetic/logic operation with a constant operand. */ static void emit_opk(ASMState *as, ARMIns ai, Reg dest, Reg src, int32_t i, RegSet allow) { uint32_t k = emit_isk12(ai, i); if (k) emit_dn(as, ai^k, dest, src); else emit_dnm(as, ai, dest, src, ra_allock(as, i, allow)); } /* Add offset to pointer. */ static void emit_addptr(ASMState *as, Reg r, int32_t ofs) { if (ofs) emit_opk(as, ARMI_ADD, r, r, ofs, rset_exclude(RSET_GPR, r)); } #define emit_spsub(as, ofs) emit_addptr(as, RID_SP, -(ofs)) tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_asm_x86.h0000664000000000000000000026647012202141143022520 0ustar rootroot/* ** x86/x64 IR assembler (SSA IR -> machine code). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* -- Guard handling ------------------------------------------------------ */ /* Generate an exit stub group at the bottom of the reserved MCode memory. */ static MCode *asm_exitstub_gen(ASMState *as, ExitNo group) { ExitNo i, groupofs = (group*EXITSTUBS_PER_GROUP) & 0xff; MCode *mxp = as->mcbot; MCode *mxpstart = mxp; if (mxp + (2+2)*EXITSTUBS_PER_GROUP+8+5 >= as->mctop) asm_mclimit(as); /* Push low byte of exitno for each exit stub. */ *mxp++ = XI_PUSHi8; *mxp++ = (MCode)groupofs; for (i = 1; i < EXITSTUBS_PER_GROUP; i++) { *mxp++ = XI_JMPs; *mxp++ = (MCode)((2+2)*(EXITSTUBS_PER_GROUP - i) - 2); *mxp++ = XI_PUSHi8; *mxp++ = (MCode)(groupofs + i); } /* Push the high byte of the exitno for each exit stub group. */ *mxp++ = XI_PUSHi8; *mxp++ = (MCode)((group*EXITSTUBS_PER_GROUP)>>8); /* Store DISPATCH at original stack slot 0. Account for the two push ops. */ *mxp++ = XI_MOVmi; *mxp++ = MODRM(XM_OFS8, 0, RID_ESP); *mxp++ = MODRM(XM_SCALE1, RID_ESP, RID_ESP); *mxp++ = 2*sizeof(void *); *(int32_t *)mxp = ptr2addr(J2GG(as->J)->dispatch); mxp += 4; /* Jump to exit handler which fills in the ExitState. */ *mxp++ = XI_JMP; mxp += 4; *((int32_t *)(mxp-4)) = jmprel(mxp, (MCode *)(void *)lj_vm_exit_handler); /* Commit the code for this group (even if assembly fails later on). */ lj_mcode_commitbot(as->J, mxp); as->mcbot = mxp; as->mclim = as->mcbot + MCLIM_REDZONE; return mxpstart; } /* Setup all needed exit stubs. */ static void asm_exitstub_setup(ASMState *as, ExitNo nexits) { ExitNo i; if (nexits >= EXITSTUBS_PER_GROUP*LJ_MAX_EXITSTUBGR) lj_trace_err(as->J, LJ_TRERR_SNAPOV); for (i = 0; i < (nexits+EXITSTUBS_PER_GROUP-1)/EXITSTUBS_PER_GROUP; i++) if (as->J->exitstubgroup[i] == NULL) as->J->exitstubgroup[i] = asm_exitstub_gen(as, i); } /* Emit conditional branch to exit for guard. ** It's important to emit this *after* all registers have been allocated, ** because rematerializations may invalidate the flags. */ static void asm_guardcc(ASMState *as, int cc) { MCode *target = exitstub_addr(as->J, as->snapno); MCode *p = as->mcp; if (LJ_UNLIKELY(p == as->invmcp)) { as->loopinv = 1; *(int32_t *)(p+1) = jmprel(p+5, target); target = p; cc ^= 1; if (as->realign) { emit_sjcc(as, cc, target); return; } } emit_jcc(as, cc, target); } /* -- Memory operand fusion ----------------------------------------------- */ /* Limit linear search to this distance. Avoids O(n^2) behavior. */ #define CONFLICT_SEARCH_LIM 31 /* Check if a reference is a signed 32 bit constant. */ static int asm_isk32(ASMState *as, IRRef ref, int32_t *k) { if (irref_isk(ref)) { IRIns *ir = IR(ref); if (ir->o != IR_KINT64) { *k = ir->i; return 1; } else if (checki32((int64_t)ir_kint64(ir)->u64)) { *k = (int32_t)ir_kint64(ir)->u64; return 1; } } return 0; } /* Check if there's no conflicting instruction between curins and ref. ** Also avoid fusing loads if there are multiple references. */ static int noconflict(ASMState *as, IRRef ref, IROp conflict, int noload) { IRIns *ir = as->ir; IRRef i = as->curins; if (i > ref + CONFLICT_SEARCH_LIM) return 0; /* Give up, ref is too far away. */ while (--i > ref) { if (ir[i].o == conflict) return 0; /* Conflict found. */ else if (!noload && (ir[i].op1 == ref || ir[i].op2 == ref)) return 0; } return 1; /* Ok, no conflict. */ } /* Fuse array base into memory operand. */ static IRRef asm_fuseabase(ASMState *as, IRRef ref) { IRIns *irb = IR(ref); as->mrm.ofs = 0; if (irb->o == IR_FLOAD) { IRIns *ira = IR(irb->op1); lua_assert(irb->op2 == IRFL_TAB_ARRAY); /* We can avoid the FLOAD of t->array for colocated arrays. */ if (ira->o == IR_TNEW && ira->op1 <= LJ_MAX_COLOSIZE && !neverfuse(as) && noconflict(as, irb->op1, IR_NEWREF, 1)) { as->mrm.ofs = (int32_t)sizeof(GCtab); /* Ofs to colocated array. */ return irb->op1; /* Table obj. */ } } else if (irb->o == IR_ADD && irref_isk(irb->op2)) { /* Fuse base offset (vararg load). */ as->mrm.ofs = IR(irb->op2)->i; return irb->op1; } return ref; /* Otherwise use the given array base. */ } /* Fuse array reference into memory operand. */ static void asm_fusearef(ASMState *as, IRIns *ir, RegSet allow) { IRIns *irx; lua_assert(ir->o == IR_AREF); as->mrm.base = (uint8_t)ra_alloc1(as, asm_fuseabase(as, ir->op1), allow); irx = IR(ir->op2); if (irref_isk(ir->op2)) { as->mrm.ofs += 8*irx->i; as->mrm.idx = RID_NONE; } else { rset_clear(allow, as->mrm.base); as->mrm.scale = XM_SCALE8; /* Fuse a constant ADD (e.g. t[i+1]) into the offset. ** Doesn't help much without ABCelim, but reduces register pressure. */ if (!LJ_64 && /* Has bad effects with negative index on x64. */ mayfuse(as, ir->op2) && ra_noreg(irx->r) && irx->o == IR_ADD && irref_isk(irx->op2)) { as->mrm.ofs += 8*IR(irx->op2)->i; as->mrm.idx = (uint8_t)ra_alloc1(as, irx->op1, allow); } else { as->mrm.idx = (uint8_t)ra_alloc1(as, ir->op2, allow); } } } /* Fuse array/hash/upvalue reference into memory operand. ** Caveat: this may allocate GPRs for the base/idx registers. Be sure to ** pass the final allow mask, excluding any GPRs used for other inputs. ** In particular: 2-operand GPR instructions need to call ra_dest() first! */ static void asm_fuseahuref(ASMState *as, IRRef ref, RegSet allow) { IRIns *ir = IR(ref); if (ra_noreg(ir->r)) { switch ((IROp)ir->o) { case IR_AREF: if (mayfuse(as, ref)) { asm_fusearef(as, ir, allow); return; } break; case IR_HREFK: if (mayfuse(as, ref)) { as->mrm.base = (uint8_t)ra_alloc1(as, ir->op1, allow); as->mrm.ofs = (int32_t)(IR(ir->op2)->op2 * sizeof(Node)); as->mrm.idx = RID_NONE; return; } break; case IR_UREFC: if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); GCupval *uv = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv; as->mrm.ofs = ptr2addr(&uv->tv); as->mrm.base = as->mrm.idx = RID_NONE; return; } break; default: lua_assert(ir->o == IR_HREF || ir->o == IR_NEWREF || ir->o == IR_UREFO || ir->o == IR_KKPTR); break; } } as->mrm.base = (uint8_t)ra_alloc1(as, ref, allow); as->mrm.ofs = 0; as->mrm.idx = RID_NONE; } /* Fuse FLOAD/FREF reference into memory operand. */ static void asm_fusefref(ASMState *as, IRIns *ir, RegSet allow) { lua_assert(ir->o == IR_FLOAD || ir->o == IR_FREF); as->mrm.ofs = field_ofs[ir->op2]; as->mrm.idx = RID_NONE; if (irref_isk(ir->op1)) { as->mrm.ofs += IR(ir->op1)->i; as->mrm.base = RID_NONE; } else { as->mrm.base = (uint8_t)ra_alloc1(as, ir->op1, allow); } } /* Fuse string reference into memory operand. */ static void asm_fusestrref(ASMState *as, IRIns *ir, RegSet allow) { IRIns *irr; lua_assert(ir->o == IR_STRREF); as->mrm.base = as->mrm.idx = RID_NONE; as->mrm.scale = XM_SCALE1; as->mrm.ofs = sizeof(GCstr); if (irref_isk(ir->op1)) { as->mrm.ofs += IR(ir->op1)->i; } else { Reg r = ra_alloc1(as, ir->op1, allow); rset_clear(allow, r); as->mrm.base = (uint8_t)r; } irr = IR(ir->op2); if (irref_isk(ir->op2)) { as->mrm.ofs += irr->i; } else { Reg r; /* Fuse a constant add into the offset, e.g. string.sub(s, i+10). */ if (!LJ_64 && /* Has bad effects with negative index on x64. */ mayfuse(as, ir->op2) && irr->o == IR_ADD && irref_isk(irr->op2)) { as->mrm.ofs += IR(irr->op2)->i; r = ra_alloc1(as, irr->op1, allow); } else { r = ra_alloc1(as, ir->op2, allow); } if (as->mrm.base == RID_NONE) as->mrm.base = (uint8_t)r; else as->mrm.idx = (uint8_t)r; } } static void asm_fusexref(ASMState *as, IRRef ref, RegSet allow) { IRIns *ir = IR(ref); as->mrm.idx = RID_NONE; if (ir->o == IR_KPTR || ir->o == IR_KKPTR) { as->mrm.ofs = ir->i; as->mrm.base = RID_NONE; } else if (ir->o == IR_STRREF) { asm_fusestrref(as, ir, allow); } else { as->mrm.ofs = 0; if (canfuse(as, ir) && ir->o == IR_ADD && ra_noreg(ir->r)) { /* Gather (base+idx*sz)+ofs as emitted by cdata ptr/array indexing. */ IRIns *irx; IRRef idx; Reg r; if (asm_isk32(as, ir->op2, &as->mrm.ofs)) { /* Recognize x+ofs. */ ref = ir->op1; ir = IR(ref); if (!(ir->o == IR_ADD && canfuse(as, ir) && ra_noreg(ir->r))) goto noadd; } as->mrm.scale = XM_SCALE1; idx = ir->op1; ref = ir->op2; irx = IR(idx); if (!(irx->o == IR_BSHL || irx->o == IR_ADD)) { /* Try other operand. */ idx = ir->op2; ref = ir->op1; irx = IR(idx); } if (canfuse(as, irx) && ra_noreg(irx->r)) { if (irx->o == IR_BSHL && irref_isk(irx->op2) && IR(irx->op2)->i <= 3) { /* Recognize idx<op1; as->mrm.scale = (uint8_t)(IR(irx->op2)->i << 6); } else if (irx->o == IR_ADD && irx->op1 == irx->op2) { /* FOLD does idx*2 ==> idx<<1 ==> idx+idx. */ idx = irx->op1; as->mrm.scale = XM_SCALE2; } } r = ra_alloc1(as, idx, allow); rset_clear(allow, r); as->mrm.idx = (uint8_t)r; } noadd: as->mrm.base = (uint8_t)ra_alloc1(as, ref, allow); } } /* Fuse load into memory operand. */ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow) { IRIns *ir = IR(ref); if (ra_hasreg(ir->r)) { if (allow != RSET_EMPTY) { /* Fast path. */ ra_noweak(as, ir->r); return ir->r; } fusespill: /* Force a spill if only memory operands are allowed (asm_x87load). */ as->mrm.base = RID_ESP; as->mrm.ofs = ra_spill(as, ir); as->mrm.idx = RID_NONE; return RID_MRM; } if (ir->o == IR_KNUM) { RegSet avail = as->freeset & ~as->modset & RSET_FPR; lua_assert(allow != RSET_EMPTY); if (!(avail & (avail-1))) { /* Fuse if less than two regs available. */ as->mrm.ofs = ptr2addr(ir_knum(ir)); as->mrm.base = as->mrm.idx = RID_NONE; return RID_MRM; } } else if (mayfuse(as, ref)) { RegSet xallow = (allow & RSET_GPR) ? allow : RSET_GPR; if (ir->o == IR_SLOAD) { if (!(ir->op2 & (IRSLOAD_PARENT|IRSLOAD_CONVERT)) && noconflict(as, ref, IR_RETF, 0)) { as->mrm.base = (uint8_t)ra_alloc1(as, REF_BASE, xallow); as->mrm.ofs = 8*((int32_t)ir->op1-1) + ((ir->op2&IRSLOAD_FRAME)?4:0); as->mrm.idx = RID_NONE; return RID_MRM; } } else if (ir->o == IR_FLOAD) { /* Generic fusion is only ok for 32 bit operand (but see asm_comp). */ if ((irt_isint(ir->t) || irt_isu32(ir->t) || irt_isaddr(ir->t)) && noconflict(as, ref, IR_FSTORE, 0)) { asm_fusefref(as, ir, xallow); return RID_MRM; } } else if (ir->o == IR_ALOAD || ir->o == IR_HLOAD || ir->o == IR_ULOAD) { if (noconflict(as, ref, ir->o + IRDELTA_L2S, 0)) { asm_fuseahuref(as, ir->op1, xallow); return RID_MRM; } } else if (ir->o == IR_XLOAD) { /* Generic fusion is not ok for 8/16 bit operands (but see asm_comp). ** Fusing unaligned memory operands is ok on x86 (except for SIMD types). */ if ((!irt_typerange(ir->t, IRT_I8, IRT_U16)) && noconflict(as, ref, IR_XSTORE, 0)) { asm_fusexref(as, ir->op1, xallow); return RID_MRM; } } else if (ir->o == IR_VLOAD) { asm_fuseahuref(as, ir->op1, xallow); return RID_MRM; } } if (!(as->freeset & allow) && (allow == RSET_EMPTY || ra_hasspill(ir->s) || iscrossref(as, ref))) goto fusespill; return ra_allocref(as, ref, allow); } #if LJ_64 /* Don't fuse a 32 bit load into a 64 bit operation. */ static Reg asm_fuseloadm(ASMState *as, IRRef ref, RegSet allow, int is64) { if (is64 && !irt_is64(IR(ref)->t)) return ra_alloc1(as, ref, allow); return asm_fuseload(as, ref, allow); } #else #define asm_fuseloadm(as, ref, allow, is64) asm_fuseload(as, (ref), (allow)) #endif /* -- Calls --------------------------------------------------------------- */ /* Count the required number of stack slots for a call. */ static int asm_count_call_slots(ASMState *as, const CCallInfo *ci, IRRef *args) { uint32_t i, nargs = CCI_NARGS(ci); int nslots = 0; #if LJ_64 if (LJ_ABI_WIN) { nslots = (int)(nargs*2); /* Only matters for more than four args. */ } else { int ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; for (i = 0; i < nargs; i++) if (args[i] && irt_isfp(IR(args[i])->t)) { if (nfpr > 0) nfpr--; else nslots += 2; } else { if (ngpr > 0) ngpr--; else nslots += 2; } } #else int ngpr = 0; if ((ci->flags & CCI_CC_MASK) == CCI_CC_FASTCALL) ngpr = 2; else if ((ci->flags & CCI_CC_MASK) == CCI_CC_THISCALL) ngpr = 1; for (i = 0; i < nargs; i++) if (args[i] && irt_isfp(IR(args[i])->t)) { nslots += irt_isnum(IR(args[i])->t) ? 2 : 1; } else { if (ngpr > 0) ngpr--; else nslots++; } #endif return nslots; } /* Generate a call to a C function. */ static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) { uint32_t n, nargs = CCI_NARGS(ci); int32_t ofs = STACKARG_OFS; #if LJ_64 uint32_t gprs = REGARG_GPRS; Reg fpr = REGARG_FIRSTFPR; #if !LJ_ABI_WIN MCode *patchnfpr = NULL; #endif #else uint32_t gprs = 0; if ((ci->flags & CCI_CC_MASK) != CCI_CC_CDECL) { if ((ci->flags & CCI_CC_MASK) == CCI_CC_THISCALL) gprs = (REGARG_GPRS & 31); else if ((ci->flags & CCI_CC_MASK) == CCI_CC_FASTCALL) gprs = REGARG_GPRS; } #endif if ((void *)ci->func) emit_call(as, ci->func); #if LJ_64 if ((ci->flags & CCI_VARARG)) { /* Special handling for vararg calls. */ #if LJ_ABI_WIN for (n = 0; n < 4 && n < nargs; n++) { IRIns *ir = IR(args[n]); if (irt_isfp(ir->t)) /* Duplicate FPRs in GPRs. */ emit_rr(as, XO_MOVDto, (irt_isnum(ir->t) ? REX_64 : 0) | (fpr+n), ((gprs >> (n*5)) & 31)); /* Either MOVD or MOVQ. */ } #else patchnfpr = --as->mcp; /* Indicate number of used FPRs in register al. */ *--as->mcp = XI_MOVrib | RID_EAX; #endif } #endif for (n = 0; n < nargs; n++) { /* Setup args. */ IRRef ref = args[n]; IRIns *ir = IR(ref); Reg r; #if LJ_64 && LJ_ABI_WIN /* Windows/x64 argument registers are strictly positional. */ r = irt_isfp(ir->t) ? (fpr <= REGARG_LASTFPR ? fpr : 0) : (gprs & 31); fpr++; gprs >>= 5; #elif LJ_64 /* POSIX/x64 argument registers are used in order of appearance. */ if (irt_isfp(ir->t)) { r = fpr <= REGARG_LASTFPR ? fpr++ : 0; } else { r = gprs & 31; gprs >>= 5; } #else if (ref && irt_isfp(ir->t)) { r = 0; } else { r = gprs & 31; gprs >>= 5; if (!ref) continue; } #endif if (r) { /* Argument is in a register. */ if (r < RID_MAX_GPR && ref < ASMREF_TMP1) { #if LJ_64 if (ir->o == IR_KINT64) emit_loadu64(as, r, ir_kint64(ir)->u64); else #endif emit_loadi(as, r, ir->i); } else { lua_assert(rset_test(as->freeset, r)); /* Must have been evicted. */ if (ra_hasreg(ir->r)) { ra_noweak(as, ir->r); emit_movrr(as, ir, r, ir->r); } else { ra_allocref(as, ref, RID2RSET(r)); } } } else if (irt_isfp(ir->t)) { /* FP argument is on stack. */ lua_assert(!(irt_isfloat(ir->t) && irref_isk(ref))); /* No float k. */ if (LJ_32 && (ofs & 4) && irref_isk(ref)) { /* Split stores for unaligned FP consts. */ emit_movmroi(as, RID_ESP, ofs, (int32_t)ir_knum(ir)->u32.lo); emit_movmroi(as, RID_ESP, ofs+4, (int32_t)ir_knum(ir)->u32.hi); } else { r = ra_alloc1(as, ref, RSET_FPR); emit_rmro(as, irt_isnum(ir->t) ? XO_MOVSDto : XO_MOVSSto, r, RID_ESP, ofs); } ofs += (LJ_32 && irt_isfloat(ir->t)) ? 4 : 8; } else { /* Non-FP argument is on stack. */ if (LJ_32 && ref < ASMREF_TMP1) { emit_movmroi(as, RID_ESP, ofs, ir->i); } else { r = ra_alloc1(as, ref, RSET_GPR); emit_movtomro(as, REX_64 + r, RID_ESP, ofs); } ofs += sizeof(intptr_t); } checkmclim(as); } #if LJ_64 && !LJ_ABI_WIN if (patchnfpr) *patchnfpr = fpr - REGARG_FIRSTFPR; #endif } /* Setup result reg/sp for call. Evict scratch regs. */ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) { RegSet drop = RSET_SCRATCH; int hiop = (LJ_32 && (ir+1)->o == IR_HIOP); if ((ci->flags & CCI_NOFPRCLOBBER)) drop &= ~RSET_FPR; if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ if (hiop && ra_hasreg((ir+1)->r)) rset_clear(drop, (ir+1)->r); /* Dest reg handled below. */ ra_evictset(as, drop); /* Evictions must be performed first. */ if (ra_used(ir)) { if (irt_isfp(ir->t)) { int32_t ofs = sps_scale(ir->s); /* Use spill slot or temp slots. */ #if LJ_64 if ((ci->flags & CCI_CASTU64)) { Reg dest = ir->r; if (ra_hasreg(dest)) { ra_free(as, dest); ra_modified(as, dest); emit_rr(as, XO_MOVD, dest|REX_64, RID_RET); /* Really MOVQ. */ } if (ofs) emit_movtomro(as, RID_RET|REX_64, RID_ESP, ofs); } else { ra_destreg(as, ir, RID_FPRET); } #else /* Number result is in x87 st0 for x86 calling convention. */ Reg dest = ir->r; if (ra_hasreg(dest)) { ra_free(as, dest); ra_modified(as, dest); emit_rmro(as, irt_isnum(ir->t) ? XMM_MOVRM(as) : XO_MOVSS, dest, RID_ESP, ofs); } if ((ci->flags & CCI_CASTU64)) { emit_movtomro(as, RID_RETLO, RID_ESP, ofs); emit_movtomro(as, RID_RETHI, RID_ESP, ofs+4); } else { emit_rmro(as, irt_isnum(ir->t) ? XO_FSTPq : XO_FSTPd, irt_isnum(ir->t) ? XOg_FSTPq : XOg_FSTPd, RID_ESP, ofs); } #endif #if LJ_32 } else if (hiop) { ra_destpair(as, ir); #endif } else { lua_assert(!irt_ispri(ir->t)); ra_destreg(as, ir, RID_RET); } } else if (LJ_32 && irt_isfp(ir->t)) { emit_x87op(as, XI_FPOP); /* Pop unused result from x87 st0. */ } } static void asm_call(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX]; const CCallInfo *ci = &lj_ir_callinfo[ir->op2]; asm_collectargs(as, ir, ci, args); asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } /* Return a constant function pointer or NULL for indirect calls. */ static void *asm_callx_func(ASMState *as, IRIns *irf, IRRef func) { #if LJ_32 UNUSED(as); if (irref_isk(func)) return (void *)irf->i; #else if (irref_isk(func)) { MCode *p; if (irf->o == IR_KINT64) p = (MCode *)(void *)ir_k64(irf)->u64; else p = (MCode *)(void *)(uintptr_t)(uint32_t)irf->i; if (p - as->mcp == (int32_t)(p - as->mcp)) return p; /* Call target is still in +-2GB range. */ /* Avoid the indirect case of emit_call(). Try to hoist func addr. */ } #endif return NULL; } static void asm_callx(ASMState *as, IRIns *ir) { IRRef args[CCI_NARGS_MAX*2]; CCallInfo ci; IRRef func; IRIns *irf; int32_t spadj = 0; ci.flags = asm_callx_flags(as, ir); asm_collectargs(as, ir, &ci, args); asm_setupresult(as, ir, &ci); #if LJ_32 /* Have to readjust stack after non-cdecl calls due to callee cleanup. */ if ((ci.flags & CCI_CC_MASK) != CCI_CC_CDECL) spadj = 4 * asm_count_call_slots(as, &ci, args); #endif func = ir->op2; irf = IR(func); if (irf->o == IR_CARG) { func = irf->op1; irf = IR(func); } ci.func = (ASMFunction)asm_callx_func(as, irf, func); if (!(void *)ci.func) { /* Use a (hoistable) non-scratch register for indirect calls. */ RegSet allow = (RSET_GPR & ~RSET_SCRATCH); Reg r = ra_alloc1(as, func, allow); if (LJ_32) emit_spsub(as, spadj); /* Above code may cause restores! */ emit_rr(as, XO_GROUP5, XOg_CALL, r); } else if (LJ_32) { emit_spsub(as, spadj); } asm_gencall(as, &ci, args); } /* -- Returns ------------------------------------------------------------- */ /* Return to lower frame. Guard that it goes to the right spot. */ static void asm_retf(ASMState *as, IRIns *ir) { Reg base = ra_alloc1(as, REF_BASE, RSET_GPR); void *pc = ir_kptr(IR(ir->op2)); int32_t delta = 1+bc_a(*((const BCIns *)pc - 1)); as->topslot -= (BCReg)delta; if ((int32_t)as->topslot < 0) as->topslot = 0; emit_setgl(as, base, jit_base); emit_addptr(as, base, -8*delta); asm_guardcc(as, CC_NE); emit_gmroi(as, XG_ARITHi(XOg_CMP), base, -4, ptr2addr(pc)); } /* -- Type conversions ---------------------------------------------------- */ static void asm_tointg(ASMState *as, IRIns *ir, Reg left) { Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, left)); Reg dest = ra_dest(as, ir, RSET_GPR); asm_guardcc(as, CC_P); asm_guardcc(as, CC_NE); emit_rr(as, XO_UCOMISD, left, tmp); emit_rr(as, XO_CVTSI2SD, tmp, dest); if (!(as->flags & JIT_F_SPLIT_XMM)) emit_rr(as, XO_XORPS, tmp, tmp); /* Avoid partial register stall. */ emit_rr(as, XO_CVTTSD2SI, dest, left); /* Can't fuse since left is needed twice. */ } static void asm_tobit(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); Reg tmp = ra_noreg(IR(ir->op1)->r) ? ra_alloc1(as, ir->op1, RSET_FPR) : ra_scratch(as, RSET_FPR); Reg right = asm_fuseload(as, ir->op2, rset_exclude(RSET_FPR, tmp)); emit_rr(as, XO_MOVDto, tmp, dest); emit_mrm(as, XO_ADDSD, tmp, right); ra_left(as, tmp, ir->op1); } static void asm_conv(ASMState *as, IRIns *ir) { IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); int st64 = (st == IRT_I64 || st == IRT_U64 || (LJ_64 && st == IRT_P64)); int stfp = (st == IRT_NUM || st == IRT_FLOAT); IRRef lref = ir->op1; lua_assert(irt_type(ir->t) != st); lua_assert(!(LJ_32 && (irt_isint64(ir->t) || st64))); /* Handled by SPLIT. */ if (irt_isfp(ir->t)) { Reg dest = ra_dest(as, ir, RSET_FPR); if (stfp) { /* FP to FP conversion. */ Reg left = asm_fuseload(as, lref, RSET_FPR); emit_mrm(as, st == IRT_NUM ? XO_CVTSD2SS : XO_CVTSS2SD, dest, left); if (left == dest) return; /* Avoid the XO_XORPS. */ } else if (LJ_32 && st == IRT_U32) { /* U32 to FP conversion on x86. */ /* number = (2^52+2^51 .. u32) - (2^52+2^51) */ cTValue *k = lj_ir_k64_find(as->J, U64x(43380000,00000000)); Reg bias = ra_scratch(as, rset_exclude(RSET_FPR, dest)); if (irt_isfloat(ir->t)) emit_rr(as, XO_CVTSD2SS, dest, dest); emit_rr(as, XO_SUBSD, dest, bias); /* Subtract 2^52+2^51 bias. */ emit_rr(as, XO_XORPS, dest, bias); /* Merge bias and integer. */ emit_loadn(as, bias, k); emit_mrm(as, XO_MOVD, dest, asm_fuseload(as, lref, RSET_GPR)); return; } else { /* Integer to FP conversion. */ Reg left = (LJ_64 && (st == IRT_U32 || st == IRT_U64)) ? ra_alloc1(as, lref, RSET_GPR) : asm_fuseloadm(as, lref, RSET_GPR, st64); if (LJ_64 && st == IRT_U64) { MCLabel l_end = emit_label(as); const void *k = lj_ir_k64_find(as->J, U64x(43f00000,00000000)); emit_rma(as, XO_ADDSD, dest, k); /* Add 2^64 to compensate. */ emit_sjcc(as, CC_NS, l_end); emit_rr(as, XO_TEST, left|REX_64, left); /* Check if u64 >= 2^63. */ } emit_mrm(as, irt_isnum(ir->t) ? XO_CVTSI2SD : XO_CVTSI2SS, dest|((LJ_64 && (st64 || st == IRT_U32)) ? REX_64 : 0), left); } if (!(as->flags & JIT_F_SPLIT_XMM)) emit_rr(as, XO_XORPS, dest, dest); /* Avoid partial register stall. */ } else if (stfp) { /* FP to integer conversion. */ if (irt_isguard(ir->t)) { /* Checked conversions are only supported from number to int. */ lua_assert(irt_isint(ir->t) && st == IRT_NUM); asm_tointg(as, ir, ra_alloc1(as, lref, RSET_FPR)); } else { Reg dest = ra_dest(as, ir, RSET_GPR); x86Op op = st == IRT_NUM ? ((ir->op2 & IRCONV_TRUNC) ? XO_CVTTSD2SI : XO_CVTSD2SI) : ((ir->op2 & IRCONV_TRUNC) ? XO_CVTTSS2SI : XO_CVTSS2SI); if (LJ_64 ? irt_isu64(ir->t) : irt_isu32(ir->t)) { /* LJ_64: For inputs >= 2^63 add -2^64, convert again. */ /* LJ_32: For inputs >= 2^31 add -2^31, convert again and add 2^31. */ Reg tmp = ra_noreg(IR(lref)->r) ? ra_alloc1(as, lref, RSET_FPR) : ra_scratch(as, RSET_FPR); MCLabel l_end = emit_label(as); if (LJ_32) emit_gri(as, XG_ARITHi(XOg_ADD), dest, (int32_t)0x80000000); emit_rr(as, op, dest|REX_64, tmp); if (st == IRT_NUM) emit_rma(as, XO_ADDSD, tmp, lj_ir_k64_find(as->J, LJ_64 ? U64x(c3f00000,00000000) : U64x(c1e00000,00000000))); else emit_rma(as, XO_ADDSS, tmp, lj_ir_k64_find(as->J, LJ_64 ? U64x(00000000,df800000) : U64x(00000000,cf000000))); emit_sjcc(as, CC_NS, l_end); emit_rr(as, XO_TEST, dest|REX_64, dest); /* Check if dest negative. */ emit_rr(as, op, dest|REX_64, tmp); ra_left(as, tmp, lref); } else { Reg left = asm_fuseload(as, lref, RSET_FPR); if (LJ_64 && irt_isu32(ir->t)) emit_rr(as, XO_MOV, dest, dest); /* Zero hiword. */ emit_mrm(as, op, dest|((LJ_64 && (irt_is64(ir->t) || irt_isu32(ir->t))) ? REX_64 : 0), left); } } } else if (st >= IRT_I8 && st <= IRT_U16) { /* Extend to 32 bit integer. */ Reg left, dest = ra_dest(as, ir, RSET_GPR); RegSet allow = RSET_GPR; x86Op op; lua_assert(irt_isint(ir->t) || irt_isu32(ir->t)); if (st == IRT_I8) { op = XO_MOVSXb; allow = RSET_GPR8; dest |= FORCE_REX; } else if (st == IRT_U8) { op = XO_MOVZXb; allow = RSET_GPR8; dest |= FORCE_REX; } else if (st == IRT_I16) { op = XO_MOVSXw; } else { op = XO_MOVZXw; } left = asm_fuseload(as, lref, allow); /* Add extra MOV if source is already in wrong register. */ if (!LJ_64 && left != RID_MRM && !rset_test(allow, left)) { Reg tmp = ra_scratch(as, allow); emit_rr(as, op, dest, tmp); emit_rr(as, XO_MOV, tmp, left); } else { emit_mrm(as, op, dest, left); } } else { /* 32/64 bit integer conversions. */ if (LJ_32) { /* Only need to handle 32/32 bit no-op (cast) on x86. */ Reg dest = ra_dest(as, ir, RSET_GPR); ra_left(as, dest, lref); /* Do nothing, but may need to move regs. */ } else if (irt_is64(ir->t)) { Reg dest = ra_dest(as, ir, RSET_GPR); if (st64 || !(ir->op2 & IRCONV_SEXT)) { /* 64/64 bit no-op (cast) or 32 to 64 bit zero extension. */ ra_left(as, dest, lref); /* Do nothing, but may need to move regs. */ } else { /* 32 to 64 bit sign extension. */ Reg left = asm_fuseload(as, lref, RSET_GPR); emit_mrm(as, XO_MOVSXd, dest|REX_64, left); } } else { Reg dest = ra_dest(as, ir, RSET_GPR); if (st64) { Reg left = asm_fuseload(as, lref, RSET_GPR); /* This is either a 32 bit reg/reg mov which zeroes the hiword ** or a load of the loword from a 64 bit address. */ emit_mrm(as, XO_MOV, dest, left); } else { /* 32/32 bit no-op (cast). */ ra_left(as, dest, lref); /* Do nothing, but may need to move regs. */ } } } } #if LJ_32 && LJ_HASFFI /* No SSE conversions to/from 64 bit on x86, so resort to ugly x87 code. */ /* 64 bit integer to FP conversion in 32 bit mode. */ static void asm_conv_fp_int64(ASMState *as, IRIns *ir) { Reg hi = ra_alloc1(as, ir->op1, RSET_GPR); Reg lo = ra_alloc1(as, (ir-1)->op1, rset_exclude(RSET_GPR, hi)); int32_t ofs = sps_scale(ir->s); /* Use spill slot or temp slots. */ Reg dest = ir->r; if (ra_hasreg(dest)) { ra_free(as, dest); ra_modified(as, dest); emit_rmro(as, irt_isnum(ir->t) ? XMM_MOVRM(as) : XO_MOVSS, dest, RID_ESP, ofs); } emit_rmro(as, irt_isnum(ir->t) ? XO_FSTPq : XO_FSTPd, irt_isnum(ir->t) ? XOg_FSTPq : XOg_FSTPd, RID_ESP, ofs); if (((ir-1)->op2 & IRCONV_SRCMASK) == IRT_U64) { /* For inputs in [2^63,2^64-1] add 2^64 to compensate. */ MCLabel l_end = emit_label(as); emit_rma(as, XO_FADDq, XOg_FADDq, lj_ir_k64_find(as->J, U64x(43f00000,00000000))); emit_sjcc(as, CC_NS, l_end); emit_rr(as, XO_TEST, hi, hi); /* Check if u64 >= 2^63. */ } else { lua_assert(((ir-1)->op2 & IRCONV_SRCMASK) == IRT_I64); } emit_rmro(as, XO_FILDq, XOg_FILDq, RID_ESP, 0); /* NYI: Avoid narrow-to-wide store-to-load forwarding stall. */ emit_rmro(as, XO_MOVto, hi, RID_ESP, 4); emit_rmro(as, XO_MOVto, lo, RID_ESP, 0); } /* FP to 64 bit integer conversion in 32 bit mode. */ static void asm_conv_int64_fp(ASMState *as, IRIns *ir) { IRType st = (IRType)((ir-1)->op2 & IRCONV_SRCMASK); IRType dt = (((ir-1)->op2 & IRCONV_DSTMASK) >> IRCONV_DSH); Reg lo, hi; lua_assert(st == IRT_NUM || st == IRT_FLOAT); lua_assert(dt == IRT_I64 || dt == IRT_U64); lua_assert(((ir-1)->op2 & IRCONV_TRUNC)); hi = ra_dest(as, ir, RSET_GPR); lo = ra_dest(as, ir-1, rset_exclude(RSET_GPR, hi)); if (ra_used(ir-1)) emit_rmro(as, XO_MOV, lo, RID_ESP, 0); /* NYI: Avoid wide-to-narrow store-to-load forwarding stall. */ if (!(as->flags & JIT_F_SSE3)) { /* Set FPU rounding mode to default. */ emit_rmro(as, XO_FLDCW, XOg_FLDCW, RID_ESP, 4); emit_rmro(as, XO_MOVto, lo, RID_ESP, 4); emit_gri(as, XG_ARITHi(XOg_AND), lo, 0xf3ff); } if (dt == IRT_U64) { /* For inputs in [2^63,2^64-1] add -2^64 and convert again. */ MCLabel l_pop, l_end = emit_label(as); emit_x87op(as, XI_FPOP); l_pop = emit_label(as); emit_sjmp(as, l_end); emit_rmro(as, XO_MOV, hi, RID_ESP, 4); if ((as->flags & JIT_F_SSE3)) emit_rmro(as, XO_FISTTPq, XOg_FISTTPq, RID_ESP, 0); else emit_rmro(as, XO_FISTPq, XOg_FISTPq, RID_ESP, 0); emit_rma(as, XO_FADDq, XOg_FADDq, lj_ir_k64_find(as->J, U64x(c3f00000,00000000))); emit_sjcc(as, CC_NS, l_pop); emit_rr(as, XO_TEST, hi, hi); /* Check if out-of-range (2^63). */ } emit_rmro(as, XO_MOV, hi, RID_ESP, 4); if ((as->flags & JIT_F_SSE3)) { /* Truncation is easy with SSE3. */ emit_rmro(as, XO_FISTTPq, XOg_FISTTPq, RID_ESP, 0); } else { /* Otherwise set FPU rounding mode to truncate before the store. */ emit_rmro(as, XO_FISTPq, XOg_FISTPq, RID_ESP, 0); emit_rmro(as, XO_FLDCW, XOg_FLDCW, RID_ESP, 0); emit_rmro(as, XO_MOVtow, lo, RID_ESP, 0); emit_rmro(as, XO_ARITHw(XOg_OR), lo, RID_ESP, 0); emit_loadi(as, lo, 0xc00); emit_rmro(as, XO_FNSTCW, XOg_FNSTCW, RID_ESP, 0); } if (dt == IRT_U64) emit_x87op(as, XI_FDUP); emit_mrm(as, st == IRT_NUM ? XO_FLDq : XO_FLDd, st == IRT_NUM ? XOg_FLDq: XOg_FLDd, asm_fuseload(as, ir->op1, RSET_EMPTY)); } #endif static void asm_strto(ASMState *as, IRIns *ir) { /* Force a spill slot for the destination register (if any). */ const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_strscan_num]; IRRef args[2]; RegSet drop = RSET_SCRATCH; if ((drop & RSET_FPR) != RSET_FPR && ra_hasreg(ir->r)) rset_set(drop, ir->r); /* WIN64 doesn't spill all FPRs. */ ra_evictset(as, drop); asm_guardcc(as, CC_E); emit_rr(as, XO_TEST, RID_RET, RID_RET); /* Test return status. */ args[0] = ir->op1; /* GCstr *str */ args[1] = ASMREF_TMP1; /* TValue *n */ asm_gencall(as, ci, args); /* Store the result to the spill slot or temp slots. */ emit_rmro(as, XO_LEA, ra_releasetmp(as, ASMREF_TMP1)|REX_64, RID_ESP, sps_scale(ir->s)); } static void asm_tostr(ASMState *as, IRIns *ir) { IRIns *irl = IR(ir->op1); IRRef args[2]; args[0] = ASMREF_L; as->gcsteps++; if (irt_isnum(irl->t)) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromnum]; args[1] = ASMREF_TMP1; /* const lua_Number * */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); emit_rmro(as, XO_LEA, ra_releasetmp(as, ASMREF_TMP1)|REX_64, RID_ESP, ra_spill(as, irl)); } else { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_str_fromint]; args[1] = ir->op1; /* int32_t k */ asm_setupresult(as, ir, ci); /* GCstr * */ asm_gencall(as, ci, args); } } /* -- Memory references --------------------------------------------------- */ static void asm_aref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); asm_fusearef(as, ir, RSET_GPR); if (!(as->mrm.idx == RID_NONE && as->mrm.ofs == 0)) emit_mrm(as, XO_LEA, dest, RID_MRM); else if (as->mrm.base != dest) emit_rr(as, XO_MOV, dest, as->mrm.base); } /* Merge NE(HREF, niltv) check. */ static MCode *merge_href_niltv(ASMState *as, IRIns *ir) { /* Assumes nothing else generates NE of HREF. */ if ((ir[1].o == IR_NE || ir[1].o == IR_EQ) && ir[1].op1 == as->curins && ra_hasreg(ir->r)) { MCode *p = as->mcp; p += (LJ_64 && *p != XI_ARITHi) ? 7+6 : 6+6; /* Ensure no loop branch inversion happened. */ if (p[-6] == 0x0f && p[-5] == XI_JCCn+(CC_NE^(ir[1].o & 1))) { as->mcp = p; /* Kill cmp reg, imm32 + jz exit. */ return p + *(int32_t *)(p-4); /* Return exit address. */ } } return NULL; } /* Inlined hash lookup. Specialized for key type and for const keys. ** The equivalent C code is: ** Node *n = hashkey(t, key); ** do { ** if (lj_obj_equal(&n->key, key)) return &n->val; ** } while ((n = nextnode(n))); ** return niltv(L); */ static void asm_href(ASMState *as, IRIns *ir) { MCode *nilexit = merge_href_niltv(as, ir); /* Do this before any restores. */ RegSet allow = RSET_GPR; Reg dest = ra_dest(as, ir, allow); Reg tab = ra_alloc1(as, ir->op1, rset_clear(allow, dest)); Reg key = RID_NONE, tmp = RID_NONE; IRIns *irkey = IR(ir->op2); int isk = irref_isk(ir->op2); IRType1 kt = irkey->t; uint32_t khash; MCLabel l_end, l_loop, l_next; if (!isk) { rset_clear(allow, tab); key = ra_alloc1(as, ir->op2, irt_isnum(kt) ? RSET_FPR : allow); if (!irt_isstr(kt)) tmp = ra_scratch(as, rset_exclude(allow, key)); } /* Key not found in chain: jump to exit (if merged with NE) or load niltv. */ l_end = emit_label(as); if (nilexit && ir[1].o == IR_NE) { emit_jcc(as, CC_E, nilexit); /* XI_JMP is not found by lj_asm_patchexit. */ nilexit = NULL; } else { emit_loada(as, dest, niltvg(J2G(as->J))); } /* Follow hash chain until the end. */ l_loop = emit_sjcc_label(as, CC_NZ); emit_rr(as, XO_TEST, dest, dest); emit_rmro(as, XO_MOV, dest, dest, offsetof(Node, next)); l_next = emit_label(as); /* Type and value comparison. */ if (nilexit) emit_jcc(as, CC_E, nilexit); else emit_sjcc(as, CC_E, l_end); if (irt_isnum(kt)) { if (isk) { /* Assumes -0.0 is already canonicalized to +0.0. */ emit_gmroi(as, XG_ARITHi(XOg_CMP), dest, offsetof(Node, key.u32.lo), (int32_t)ir_knum(irkey)->u32.lo); emit_sjcc(as, CC_NE, l_next); emit_gmroi(as, XG_ARITHi(XOg_CMP), dest, offsetof(Node, key.u32.hi), (int32_t)ir_knum(irkey)->u32.hi); } else { emit_sjcc(as, CC_P, l_next); emit_rmro(as, XO_UCOMISD, key, dest, offsetof(Node, key.n)); emit_sjcc(as, CC_AE, l_next); /* The type check avoids NaN penalties and complaints from Valgrind. */ #if LJ_64 emit_u32(as, LJ_TISNUM); emit_rmro(as, XO_ARITHi, XOg_CMP, dest, offsetof(Node, key.it)); #else emit_i8(as, LJ_TISNUM); emit_rmro(as, XO_ARITHi8, XOg_CMP, dest, offsetof(Node, key.it)); #endif } #if LJ_64 } else if (irt_islightud(kt)) { emit_rmro(as, XO_CMP, key|REX_64, dest, offsetof(Node, key.u64)); #endif } else { if (!irt_ispri(kt)) { lua_assert(irt_isaddr(kt)); if (isk) emit_gmroi(as, XG_ARITHi(XOg_CMP), dest, offsetof(Node, key.gcr), ptr2addr(ir_kgc(irkey))); else emit_rmro(as, XO_CMP, key, dest, offsetof(Node, key.gcr)); emit_sjcc(as, CC_NE, l_next); } lua_assert(!irt_isnil(kt)); emit_i8(as, irt_toitype(kt)); emit_rmro(as, XO_ARITHi8, XOg_CMP, dest, offsetof(Node, key.it)); } emit_sfixup(as, l_loop); checkmclim(as); /* Load main position relative to tab->node into dest. */ khash = isk ? ir_khash(irkey) : 1; if (khash == 0) { emit_rmro(as, XO_MOV, dest, tab, offsetof(GCtab, node)); } else { emit_rmro(as, XO_ARITH(XOg_ADD), dest, tab, offsetof(GCtab, node)); if ((as->flags & JIT_F_PREFER_IMUL)) { emit_i8(as, sizeof(Node)); emit_rr(as, XO_IMULi8, dest, dest); } else { emit_shifti(as, XOg_SHL, dest, 3); emit_rmrxo(as, XO_LEA, dest, dest, dest, XM_SCALE2, 0); } if (isk) { emit_gri(as, XG_ARITHi(XOg_AND), dest, (int32_t)khash); emit_rmro(as, XO_MOV, dest, tab, offsetof(GCtab, hmask)); } else if (irt_isstr(kt)) { emit_rmro(as, XO_ARITH(XOg_AND), dest, key, offsetof(GCstr, hash)); emit_rmro(as, XO_MOV, dest, tab, offsetof(GCtab, hmask)); } else { /* Must match with hashrot() in lj_tab.c. */ emit_rmro(as, XO_ARITH(XOg_AND), dest, tab, offsetof(GCtab, hmask)); emit_rr(as, XO_ARITH(XOg_SUB), dest, tmp); emit_shifti(as, XOg_ROL, tmp, HASH_ROT3); emit_rr(as, XO_ARITH(XOg_XOR), dest, tmp); emit_shifti(as, XOg_ROL, dest, HASH_ROT2); emit_rr(as, XO_ARITH(XOg_SUB), tmp, dest); emit_shifti(as, XOg_ROL, dest, HASH_ROT1); emit_rr(as, XO_ARITH(XOg_XOR), tmp, dest); if (irt_isnum(kt)) { emit_rr(as, XO_ARITH(XOg_ADD), dest, dest); #if LJ_64 emit_shifti(as, XOg_SHR|REX_64, dest, 32); emit_rr(as, XO_MOV, tmp, dest); emit_rr(as, XO_MOVDto, key|REX_64, dest); #else emit_rmro(as, XO_MOV, dest, RID_ESP, ra_spill(as, irkey)+4); emit_rr(as, XO_MOVDto, key, tmp); #endif } else { emit_rr(as, XO_MOV, tmp, key); emit_rmro(as, XO_LEA, dest, key, HASH_BIAS); } } } } static void asm_hrefk(ASMState *as, IRIns *ir) { IRIns *kslot = IR(ir->op2); IRIns *irkey = IR(kslot->op1); int32_t ofs = (int32_t)(kslot->op2 * sizeof(Node)); Reg dest = ra_used(ir) ? ra_dest(as, ir, RSET_GPR) : RID_NONE; Reg node = ra_alloc1(as, ir->op1, RSET_GPR); #if !LJ_64 MCLabel l_exit; #endif lua_assert(ofs % sizeof(Node) == 0); if (ra_hasreg(dest)) { if (ofs != 0) { if (dest == node && !(as->flags & JIT_F_LEA_AGU)) emit_gri(as, XG_ARITHi(XOg_ADD), dest, ofs); else emit_rmro(as, XO_LEA, dest, node, ofs); } else if (dest != node) { emit_rr(as, XO_MOV, dest, node); } } asm_guardcc(as, CC_NE); #if LJ_64 if (!irt_ispri(irkey->t)) { Reg key = ra_scratch(as, rset_exclude(RSET_GPR, node)); emit_rmro(as, XO_CMP, key|REX_64, node, ofs + (int32_t)offsetof(Node, key.u64)); lua_assert(irt_isnum(irkey->t) || irt_isgcv(irkey->t)); /* Assumes -0.0 is already canonicalized to +0.0. */ emit_loadu64(as, key, irt_isnum(irkey->t) ? ir_knum(irkey)->u64 : ((uint64_t)irt_toitype(irkey->t) << 32) | (uint64_t)(uint32_t)ptr2addr(ir_kgc(irkey))); } else { lua_assert(!irt_isnil(irkey->t)); emit_i8(as, irt_toitype(irkey->t)); emit_rmro(as, XO_ARITHi8, XOg_CMP, node, ofs + (int32_t)offsetof(Node, key.it)); } #else l_exit = emit_label(as); if (irt_isnum(irkey->t)) { /* Assumes -0.0 is already canonicalized to +0.0. */ emit_gmroi(as, XG_ARITHi(XOg_CMP), node, ofs + (int32_t)offsetof(Node, key.u32.lo), (int32_t)ir_knum(irkey)->u32.lo); emit_sjcc(as, CC_NE, l_exit); emit_gmroi(as, XG_ARITHi(XOg_CMP), node, ofs + (int32_t)offsetof(Node, key.u32.hi), (int32_t)ir_knum(irkey)->u32.hi); } else { if (!irt_ispri(irkey->t)) { lua_assert(irt_isgcv(irkey->t)); emit_gmroi(as, XG_ARITHi(XOg_CMP), node, ofs + (int32_t)offsetof(Node, key.gcr), ptr2addr(ir_kgc(irkey))); emit_sjcc(as, CC_NE, l_exit); } lua_assert(!irt_isnil(irkey->t)); emit_i8(as, irt_toitype(irkey->t)); emit_rmro(as, XO_ARITHi8, XOg_CMP, node, ofs + (int32_t)offsetof(Node, key.it)); } #endif } static void asm_newref(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey]; IRRef args[3]; IRIns *irkey; Reg tmp; if (ir->r == RID_SINK) return; args[0] = ASMREF_L; /* lua_State *L */ args[1] = ir->op1; /* GCtab *t */ args[2] = ASMREF_TMP1; /* cTValue *key */ asm_setupresult(as, ir, ci); /* TValue * */ asm_gencall(as, ci, args); tmp = ra_releasetmp(as, ASMREF_TMP1); irkey = IR(ir->op2); if (irt_isnum(irkey->t)) { /* For numbers use the constant itself or a spill slot as a TValue. */ if (irref_isk(ir->op2)) emit_loada(as, tmp, ir_knum(irkey)); else emit_rmro(as, XO_LEA, tmp|REX_64, RID_ESP, ra_spill(as, irkey)); } else { /* Otherwise use g->tmptv to hold the TValue. */ if (!irref_isk(ir->op2)) { Reg src = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, tmp)); emit_movtomro(as, REX_64IR(irkey, src), tmp, 0); } else if (!irt_ispri(irkey->t)) { emit_movmroi(as, tmp, 0, irkey->i); } if (!(LJ_64 && irt_islightud(irkey->t))) emit_movmroi(as, tmp, 4, irt_toitype(irkey->t)); emit_loada(as, tmp, &J2G(as->J)->tmptv); } } static void asm_uref(ASMState *as, IRIns *ir) { /* NYI: Check that UREFO is still open and not aliasing a slot. */ Reg dest = ra_dest(as, ir, RSET_GPR); if (irref_isk(ir->op1)) { GCfunc *fn = ir_kfunc(IR(ir->op1)); MRef *v = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.v; emit_rma(as, XO_MOV, dest, v); } else { Reg uv = ra_scratch(as, RSET_GPR); Reg func = ra_alloc1(as, ir->op1, RSET_GPR); if (ir->o == IR_UREFC) { emit_rmro(as, XO_LEA, dest, uv, offsetof(GCupval, tv)); asm_guardcc(as, CC_NE); emit_i8(as, 1); emit_rmro(as, XO_ARITHib, XOg_CMP, uv, offsetof(GCupval, closed)); } else { emit_rmro(as, XO_MOV, dest, uv, offsetof(GCupval, v)); } emit_rmro(as, XO_MOV, uv, func, (int32_t)offsetof(GCfuncL, uvptr) + 4*(int32_t)(ir->op2 >> 8)); } } static void asm_fref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); asm_fusefref(as, ir, RSET_GPR); emit_mrm(as, XO_LEA, dest, RID_MRM); } static void asm_strref(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); asm_fusestrref(as, ir, RSET_GPR); if (as->mrm.base == RID_NONE) emit_loadi(as, dest, as->mrm.ofs); else if (as->mrm.base == dest && as->mrm.idx == RID_NONE) emit_gri(as, XG_ARITHi(XOg_ADD), dest, as->mrm.ofs); else emit_mrm(as, XO_LEA, dest, RID_MRM); } /* -- Loads and stores ---------------------------------------------------- */ static void asm_fxload(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); x86Op xo; if (ir->o == IR_FLOAD) asm_fusefref(as, ir, RSET_GPR); else asm_fusexref(as, ir->op1, RSET_GPR); /* ir->op2 is ignored -- unaligned loads are ok on x86. */ switch (irt_type(ir->t)) { case IRT_I8: xo = XO_MOVSXb; break; case IRT_U8: xo = XO_MOVZXb; break; case IRT_I16: xo = XO_MOVSXw; break; case IRT_U16: xo = XO_MOVZXw; break; case IRT_NUM: xo = XMM_MOVRM(as); break; case IRT_FLOAT: xo = XO_MOVSS; break; default: if (LJ_64 && irt_is64(ir->t)) dest |= REX_64; else lua_assert(irt_isint(ir->t) || irt_isu32(ir->t) || irt_isaddr(ir->t)); xo = XO_MOV; break; } emit_mrm(as, xo, dest, RID_MRM); } static void asm_fxstore(ASMState *as, IRIns *ir) { RegSet allow = RSET_GPR; Reg src = RID_NONE, osrc = RID_NONE; int32_t k = 0; if (ir->r == RID_SINK) return; /* The IRT_I16/IRT_U16 stores should never be simplified for constant ** values since mov word [mem], imm16 has a length-changing prefix. */ if (irt_isi16(ir->t) || irt_isu16(ir->t) || irt_isfp(ir->t) || !asm_isk32(as, ir->op2, &k)) { RegSet allow8 = irt_isfp(ir->t) ? RSET_FPR : (irt_isi8(ir->t) || irt_isu8(ir->t)) ? RSET_GPR8 : RSET_GPR; src = osrc = ra_alloc1(as, ir->op2, allow8); if (!LJ_64 && !rset_test(allow8, src)) { /* Already in wrong register. */ rset_clear(allow, osrc); src = ra_scratch(as, allow8); } rset_clear(allow, src); } if (ir->o == IR_FSTORE) { asm_fusefref(as, IR(ir->op1), allow); } else { asm_fusexref(as, ir->op1, allow); if (LJ_32 && ir->o == IR_HIOP) as->mrm.ofs += 4; } if (ra_hasreg(src)) { x86Op xo; switch (irt_type(ir->t)) { case IRT_I8: case IRT_U8: xo = XO_MOVtob; src |= FORCE_REX; break; case IRT_I16: case IRT_U16: xo = XO_MOVtow; break; case IRT_NUM: xo = XO_MOVSDto; break; case IRT_FLOAT: xo = XO_MOVSSto; break; #if LJ_64 case IRT_LIGHTUD: lua_assert(0); /* NYI: mask 64 bit lightuserdata. */ #endif default: if (LJ_64 && irt_is64(ir->t)) src |= REX_64; else lua_assert(irt_isint(ir->t) || irt_isu32(ir->t) || irt_isaddr(ir->t)); xo = XO_MOVto; break; } emit_mrm(as, xo, src, RID_MRM); if (!LJ_64 && src != osrc) { ra_noweak(as, osrc); emit_rr(as, XO_MOV, src, osrc); } } else { if (irt_isi8(ir->t) || irt_isu8(ir->t)) { emit_i8(as, k); emit_mrm(as, XO_MOVmib, 0, RID_MRM); } else { lua_assert(irt_is64(ir->t) || irt_isint(ir->t) || irt_isu32(ir->t) || irt_isaddr(ir->t)); emit_i32(as, k); emit_mrm(as, XO_MOVmi, REX_64IR(ir, 0), RID_MRM); } } } #if LJ_64 static Reg asm_load_lightud64(ASMState *as, IRIns *ir, int typecheck) { if (ra_used(ir) || typecheck) { Reg dest = ra_dest(as, ir, RSET_GPR); if (typecheck) { Reg tmp = ra_scratch(as, rset_exclude(RSET_GPR, dest)); asm_guardcc(as, CC_NE); emit_i8(as, -2); emit_rr(as, XO_ARITHi8, XOg_CMP, tmp); emit_shifti(as, XOg_SAR|REX_64, tmp, 47); emit_rr(as, XO_MOV, tmp|REX_64, dest); } return dest; } else { return RID_NONE; } } #endif static void asm_ahuvload(ASMState *as, IRIns *ir) { lua_assert(irt_isnum(ir->t) || irt_ispri(ir->t) || irt_isaddr(ir->t) || (LJ_DUALNUM && irt_isint(ir->t))); #if LJ_64 if (irt_islightud(ir->t)) { Reg dest = asm_load_lightud64(as, ir, 1); if (ra_hasreg(dest)) { asm_fuseahuref(as, ir->op1, RSET_GPR); emit_mrm(as, XO_MOV, dest|REX_64, RID_MRM); } return; } else #endif if (ra_used(ir)) { RegSet allow = irt_isnum(ir->t) ? RSET_FPR : RSET_GPR; Reg dest = ra_dest(as, ir, allow); asm_fuseahuref(as, ir->op1, RSET_GPR); emit_mrm(as, dest < RID_MAX_GPR ? XO_MOV : XMM_MOVRM(as), dest, RID_MRM); } else { asm_fuseahuref(as, ir->op1, RSET_GPR); } /* Always do the type check, even if the load result is unused. */ as->mrm.ofs += 4; asm_guardcc(as, irt_isnum(ir->t) ? CC_AE : CC_NE); if (LJ_64 && irt_type(ir->t) >= IRT_NUM) { lua_assert(irt_isinteger(ir->t) || irt_isnum(ir->t)); emit_u32(as, LJ_TISNUM); emit_mrm(as, XO_ARITHi, XOg_CMP, RID_MRM); } else { emit_i8(as, irt_toitype(ir->t)); emit_mrm(as, XO_ARITHi8, XOg_CMP, RID_MRM); } } static void asm_ahustore(ASMState *as, IRIns *ir) { if (ir->r == RID_SINK) return; if (irt_isnum(ir->t)) { Reg src = ra_alloc1(as, ir->op2, RSET_FPR); asm_fuseahuref(as, ir->op1, RSET_GPR); emit_mrm(as, XO_MOVSDto, src, RID_MRM); #if LJ_64 } else if (irt_islightud(ir->t)) { Reg src = ra_alloc1(as, ir->op2, RSET_GPR); asm_fuseahuref(as, ir->op1, rset_exclude(RSET_GPR, src)); emit_mrm(as, XO_MOVto, src|REX_64, RID_MRM); #endif } else { IRIns *irr = IR(ir->op2); RegSet allow = RSET_GPR; Reg src = RID_NONE; if (!irref_isk(ir->op2)) { src = ra_alloc1(as, ir->op2, allow); rset_clear(allow, src); } asm_fuseahuref(as, ir->op1, allow); if (ra_hasreg(src)) { emit_mrm(as, XO_MOVto, src, RID_MRM); } else if (!irt_ispri(irr->t)) { lua_assert(irt_isaddr(ir->t) || (LJ_DUALNUM && irt_isinteger(ir->t))); emit_i32(as, irr->i); emit_mrm(as, XO_MOVmi, 0, RID_MRM); } as->mrm.ofs += 4; emit_i32(as, (int32_t)irt_toitype(ir->t)); emit_mrm(as, XO_MOVmi, 0, RID_MRM); } } static void asm_sload(ASMState *as, IRIns *ir) { int32_t ofs = 8*((int32_t)ir->op1-1) + ((ir->op2 & IRSLOAD_FRAME) ? 4 : 0); IRType1 t = ir->t; Reg base; lua_assert(!(ir->op2 & IRSLOAD_PARENT)); /* Handled by asm_head_side(). */ lua_assert(irt_isguard(t) || !(ir->op2 & IRSLOAD_TYPECHECK)); lua_assert(LJ_DUALNUM || !irt_isint(t) || (ir->op2 & (IRSLOAD_CONVERT|IRSLOAD_FRAME))); if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(t) && irt_isint(t)) { Reg left = ra_scratch(as, RSET_FPR); asm_tointg(as, ir, left); /* Frees dest reg. Do this before base alloc. */ base = ra_alloc1(as, REF_BASE, RSET_GPR); emit_rmro(as, XMM_MOVRM(as), left, base, ofs); t.irt = IRT_NUM; /* Continue with a regular number type check. */ #if LJ_64 } else if (irt_islightud(t)) { Reg dest = asm_load_lightud64(as, ir, (ir->op2 & IRSLOAD_TYPECHECK)); if (ra_hasreg(dest)) { base = ra_alloc1(as, REF_BASE, RSET_GPR); emit_rmro(as, XO_MOV, dest|REX_64, base, ofs); } return; #endif } else if (ra_used(ir)) { RegSet allow = irt_isnum(t) ? RSET_FPR : RSET_GPR; Reg dest = ra_dest(as, ir, allow); base = ra_alloc1(as, REF_BASE, RSET_GPR); lua_assert(irt_isnum(t) || irt_isint(t) || irt_isaddr(t)); if ((ir->op2 & IRSLOAD_CONVERT)) { t.irt = irt_isint(t) ? IRT_NUM : IRT_INT; /* Check for original type. */ emit_rmro(as, irt_isint(t) ? XO_CVTSI2SD : XO_CVTSD2SI, dest, base, ofs); } else if (irt_isnum(t)) { emit_rmro(as, XMM_MOVRM(as), dest, base, ofs); } else { emit_rmro(as, XO_MOV, dest, base, ofs); } } else { if (!(ir->op2 & IRSLOAD_TYPECHECK)) return; /* No type check: avoid base alloc. */ base = ra_alloc1(as, REF_BASE, RSET_GPR); } if ((ir->op2 & IRSLOAD_TYPECHECK)) { /* Need type check, even if the load result is unused. */ asm_guardcc(as, irt_isnum(t) ? CC_AE : CC_NE); if (LJ_64 && irt_type(t) >= IRT_NUM) { lua_assert(irt_isinteger(t) || irt_isnum(t)); emit_u32(as, LJ_TISNUM); emit_rmro(as, XO_ARITHi, XOg_CMP, base, ofs+4); } else { emit_i8(as, irt_toitype(t)); emit_rmro(as, XO_ARITHi8, XOg_CMP, base, ofs+4); } } } /* -- Allocations --------------------------------------------------------- */ #if LJ_HASFFI static void asm_cnew(ASMState *as, IRIns *ir) { CTState *cts = ctype_ctsG(J2G(as->J)); CTypeID ctypeid = (CTypeID)IR(ir->op1)->i; CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ? lj_ctype_size(cts, ctypeid) : (CTSize)IR(ir->op2)->i; const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco]; IRRef args[2]; lua_assert(sz != CTSIZE_INVALID); args[0] = ASMREF_L; /* lua_State *L */ args[1] = ASMREF_TMP1; /* MSize size */ as->gcsteps++; asm_setupresult(as, ir, ci); /* GCcdata * */ /* Initialize immutable cdata object. */ if (ir->o == IR_CNEWI) { RegSet allow = (RSET_GPR & ~RSET_SCRATCH); #if LJ_64 Reg r64 = sz == 8 ? REX_64 : 0; if (irref_isk(ir->op2)) { IRIns *irk = IR(ir->op2); uint64_t k = irk->o == IR_KINT64 ? ir_k64(irk)->u64 : (uint64_t)(uint32_t)irk->i; if (sz == 4 || checki32((int64_t)k)) { emit_i32(as, (int32_t)k); emit_rmro(as, XO_MOVmi, r64, RID_RET, sizeof(GCcdata)); } else { emit_movtomro(as, RID_ECX + r64, RID_RET, sizeof(GCcdata)); emit_loadu64(as, RID_ECX, k); } } else { Reg r = ra_alloc1(as, ir->op2, allow); emit_movtomro(as, r + r64, RID_RET, sizeof(GCcdata)); } #else int32_t ofs = sizeof(GCcdata); if (sz == 8) { ofs += 4; ir++; lua_assert(ir->o == IR_HIOP); } do { if (irref_isk(ir->op2)) { emit_movmroi(as, RID_RET, ofs, IR(ir->op2)->i); } else { Reg r = ra_alloc1(as, ir->op2, allow); emit_movtomro(as, r, RID_RET, ofs); rset_clear(allow, r); } if (ofs == sizeof(GCcdata)) break; ofs -= 4; ir--; } while (1); #endif lua_assert(sz == 4 || sz == 8); } /* Combine initialization of marked, gct and ctypeid. */ emit_movtomro(as, RID_ECX, RID_RET, offsetof(GCcdata, marked)); emit_gri(as, XG_ARITHi(XOg_OR), RID_ECX, (int32_t)((~LJ_TCDATA<<8)+(ctypeid<<16))); emit_gri(as, XG_ARITHi(XOg_AND), RID_ECX, LJ_GC_WHITES); emit_opgl(as, XO_MOVZXb, RID_ECX, gc.currentwhite); asm_gencall(as, ci, args); emit_loadi(as, ra_releasetmp(as, ASMREF_TMP1), (int32_t)(sz+sizeof(GCcdata))); } #else #define asm_cnew(as, ir) ((void)0) #endif /* -- Write barriers ------------------------------------------------------ */ static void asm_tbar(ASMState *as, IRIns *ir) { Reg tab = ra_alloc1(as, ir->op1, RSET_GPR); Reg tmp = ra_scratch(as, rset_exclude(RSET_GPR, tab)); MCLabel l_end = emit_label(as); emit_movtomro(as, tmp, tab, offsetof(GCtab, gclist)); emit_setgl(as, tab, gc.grayagain); emit_getgl(as, tmp, gc.grayagain); emit_i8(as, ~LJ_GC_BLACK); emit_rmro(as, XO_ARITHib, XOg_AND, tab, offsetof(GCtab, marked)); emit_sjcc(as, CC_Z, l_end); emit_i8(as, LJ_GC_BLACK); emit_rmro(as, XO_GROUP3b, XOg_TEST, tab, offsetof(GCtab, marked)); } static void asm_obar(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_barrieruv]; IRRef args[2]; MCLabel l_end; Reg obj; /* No need for other object barriers (yet). */ lua_assert(IR(ir->op1)->o == IR_UREFC); ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ir->op1; /* TValue *tv */ asm_gencall(as, ci, args); emit_loada(as, ra_releasetmp(as, ASMREF_TMP1), J2G(as->J)); obj = IR(ir->op1)->r; emit_sjcc(as, CC_Z, l_end); emit_i8(as, LJ_GC_WHITES); if (irref_isk(ir->op2)) { GCobj *vp = ir_kgc(IR(ir->op2)); emit_rma(as, XO_GROUP3b, XOg_TEST, &vp->gch.marked); } else { Reg val = ra_alloc1(as, ir->op2, rset_exclude(RSET_SCRATCH&RSET_GPR, obj)); emit_rmro(as, XO_GROUP3b, XOg_TEST, val, (int32_t)offsetof(GChead, marked)); } emit_sjcc(as, CC_Z, l_end); emit_i8(as, LJ_GC_BLACK); emit_rmro(as, XO_GROUP3b, XOg_TEST, obj, (int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)); } /* -- FP/int arithmetic and logic operations ------------------------------ */ /* Load reference onto x87 stack. Force a spill to memory if needed. */ static void asm_x87load(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); if (ir->o == IR_KNUM) { cTValue *tv = ir_knum(ir); if (tvispzero(tv)) /* Use fldz only for +0. */ emit_x87op(as, XI_FLDZ); else if (tvispone(tv)) emit_x87op(as, XI_FLD1); else emit_rma(as, XO_FLDq, XOg_FLDq, tv); } else if (ir->o == IR_CONV && ir->op2 == IRCONV_NUM_INT && !ra_used(ir) && !irref_isk(ir->op1) && mayfuse(as, ir->op1)) { IRIns *iri = IR(ir->op1); emit_rmro(as, XO_FILDd, XOg_FILDd, RID_ESP, ra_spill(as, iri)); } else { emit_mrm(as, XO_FLDq, XOg_FLDq, asm_fuseload(as, ref, RSET_EMPTY)); } } /* Try to rejoin pow from EXP2, MUL and LOG2 (if still unsplit). */ static int fpmjoin_pow(ASMState *as, IRIns *ir) { IRIns *irp = IR(ir->op1); if (irp == ir-1 && irp->o == IR_MUL && !ra_used(irp)) { IRIns *irpp = IR(irp->op1); if (irpp == ir-2 && irpp->o == IR_FPMATH && irpp->op2 == IRFPM_LOG2 && !ra_used(irpp)) { /* The modified regs must match with the *.dasc implementation. */ RegSet drop = RSET_RANGE(RID_XMM0, RID_XMM2+1)|RID2RSET(RID_EAX); IRIns *irx; if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ ra_evictset(as, drop); ra_destreg(as, ir, RID_XMM0); emit_call(as, lj_vm_pow_sse); irx = IR(irpp->op1); if (ra_noreg(irx->r) && ra_gethint(irx->r) == RID_XMM1) irx->r = RID_INIT; /* Avoid allocating xmm1 for x. */ ra_left(as, RID_XMM0, irpp->op1); ra_left(as, RID_XMM1, irp->op2); return 1; } } return 0; } static void asm_fpmath(ASMState *as, IRIns *ir) { IRFPMathOp fpm = ir->o == IR_FPMATH ? (IRFPMathOp)ir->op2 : IRFPM_OTHER; if (fpm == IRFPM_SQRT) { Reg dest = ra_dest(as, ir, RSET_FPR); Reg left = asm_fuseload(as, ir->op1, RSET_FPR); emit_mrm(as, XO_SQRTSD, dest, left); } else if (fpm <= IRFPM_TRUNC) { if (as->flags & JIT_F_SSE4_1) { /* SSE4.1 has a rounding instruction. */ Reg dest = ra_dest(as, ir, RSET_FPR); Reg left = asm_fuseload(as, ir->op1, RSET_FPR); /* ROUNDSD has a 4-byte opcode which doesn't fit in x86Op. ** Let's pretend it's a 3-byte opcode, and compensate afterwards. ** This is atrocious, but the alternatives are much worse. */ /* Round down/up/trunc == 1001/1010/1011. */ emit_i8(as, 0x09 + fpm); emit_mrm(as, XO_ROUNDSD, dest, left); if (LJ_64 && as->mcp[1] != (MCode)(XO_ROUNDSD >> 16)) { as->mcp[0] = as->mcp[1]; as->mcp[1] = 0x0f; /* Swap 0F and REX. */ } *--as->mcp = 0x66; /* 1st byte of ROUNDSD opcode. */ } else { /* Call helper functions for SSE2 variant. */ /* The modified regs must match with the *.dasc implementation. */ RegSet drop = RSET_RANGE(RID_XMM0, RID_XMM3+1)|RID2RSET(RID_EAX); if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ ra_evictset(as, drop); ra_destreg(as, ir, RID_XMM0); emit_call(as, fpm == IRFPM_FLOOR ? lj_vm_floor_sse : fpm == IRFPM_CEIL ? lj_vm_ceil_sse : lj_vm_trunc_sse); ra_left(as, RID_XMM0, ir->op1); } } else if (fpm == IRFPM_EXP2 && fpmjoin_pow(as, ir)) { /* Rejoined to pow(). */ } else { /* Handle x87 ops. */ int32_t ofs = sps_scale(ir->s); /* Use spill slot or temp slots. */ Reg dest = ir->r; if (ra_hasreg(dest)) { ra_free(as, dest); ra_modified(as, dest); emit_rmro(as, XMM_MOVRM(as), dest, RID_ESP, ofs); } emit_rmro(as, XO_FSTPq, XOg_FSTPq, RID_ESP, ofs); switch (fpm) { /* st0 = lj_vm_*(st0) */ case IRFPM_EXP: emit_call(as, lj_vm_exp_x87); break; case IRFPM_EXP2: emit_call(as, lj_vm_exp2_x87); break; case IRFPM_SIN: emit_x87op(as, XI_FSIN); break; case IRFPM_COS: emit_x87op(as, XI_FCOS); break; case IRFPM_TAN: emit_x87op(as, XI_FPOP); emit_x87op(as, XI_FPTAN); break; case IRFPM_LOG: case IRFPM_LOG2: case IRFPM_LOG10: /* Note: the use of fyl2xp1 would be pointless here. When computing ** log(1.0+eps) the precision is already lost after 1.0 is added. ** Subtracting 1.0 won't recover it. OTOH math.log1p would make sense. */ emit_x87op(as, XI_FYL2X); break; case IRFPM_OTHER: switch (ir->o) { case IR_ATAN2: emit_x87op(as, XI_FPATAN); asm_x87load(as, ir->op2); break; case IR_LDEXP: emit_x87op(as, XI_FPOP1); emit_x87op(as, XI_FSCALE); break; default: lua_assert(0); break; } break; default: lua_assert(0); break; } asm_x87load(as, ir->op1); switch (fpm) { case IRFPM_LOG: emit_x87op(as, XI_FLDLN2); break; case IRFPM_LOG2: emit_x87op(as, XI_FLD1); break; case IRFPM_LOG10: emit_x87op(as, XI_FLDLG2); break; case IRFPM_OTHER: if (ir->o == IR_LDEXP) asm_x87load(as, ir->op2); break; default: break; } } } static void asm_fppowi(ASMState *as, IRIns *ir) { /* The modified regs must match with the *.dasc implementation. */ RegSet drop = RSET_RANGE(RID_XMM0, RID_XMM1+1)|RID2RSET(RID_EAX); if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); /* Dest reg handled below. */ ra_evictset(as, drop); ra_destreg(as, ir, RID_XMM0); emit_call(as, lj_vm_powi_sse); ra_left(as, RID_XMM0, ir->op1); ra_left(as, RID_EAX, ir->op2); } #if LJ_64 && LJ_HASFFI static void asm_arith64(ASMState *as, IRIns *ir, IRCallID id) { const CCallInfo *ci = &lj_ir_callinfo[id]; IRRef args[2]; args[0] = ir->op1; args[1] = ir->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } #endif static void asm_intmod(ASMState *as, IRIns *ir) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_vm_modi]; IRRef args[2]; args[0] = ir->op1; args[1] = ir->op2; asm_setupresult(as, ir, ci); asm_gencall(as, ci, args); } static int asm_swapops(ASMState *as, IRIns *ir) { IRIns *irl = IR(ir->op1); IRIns *irr = IR(ir->op2); lua_assert(ra_noreg(irr->r)); if (!irm_iscomm(lj_ir_mode[ir->o])) return 0; /* Can't swap non-commutative operations. */ if (irref_isk(ir->op2)) return 0; /* Don't swap constants to the left. */ if (ra_hasreg(irl->r)) return 1; /* Swap if left already has a register. */ if (ra_samehint(ir->r, irr->r)) return 1; /* Swap if dest and right have matching hints. */ if (as->curins > as->loopref) { /* In variant part? */ if (ir->op2 < as->loopref && !irt_isphi(irr->t)) return 0; /* Keep invariants on the right. */ if (ir->op1 < as->loopref && !irt_isphi(irl->t)) return 1; /* Swap invariants to the right. */ } if (opisfusableload(irl->o)) return 1; /* Swap fusable loads to the right. */ return 0; /* Otherwise don't swap. */ } static void asm_fparith(ASMState *as, IRIns *ir, x86Op xo) { IRRef lref = ir->op1; IRRef rref = ir->op2; RegSet allow = RSET_FPR; Reg dest; Reg right = IR(rref)->r; if (ra_hasreg(right)) { rset_clear(allow, right); ra_noweak(as, right); } dest = ra_dest(as, ir, allow); if (lref == rref) { right = dest; } else if (ra_noreg(right)) { if (asm_swapops(as, ir)) { IRRef tmp = lref; lref = rref; rref = tmp; } right = asm_fuseload(as, rref, rset_clear(allow, dest)); } emit_mrm(as, xo, dest, right); ra_left(as, dest, lref); } static void asm_intarith(ASMState *as, IRIns *ir, x86Arith xa) { IRRef lref = ir->op1; IRRef rref = ir->op2; RegSet allow = RSET_GPR; Reg dest, right; int32_t k = 0; if (as->flagmcp == as->mcp) { /* Drop test r,r instruction. */ as->flagmcp = NULL; as->mcp += (LJ_64 && *as->mcp < XI_TESTb) ? 3 : 2; } right = IR(rref)->r; if (ra_hasreg(right)) { rset_clear(allow, right); ra_noweak(as, right); } dest = ra_dest(as, ir, allow); if (lref == rref) { right = dest; } else if (ra_noreg(right) && !asm_isk32(as, rref, &k)) { if (asm_swapops(as, ir)) { IRRef tmp = lref; lref = rref; rref = tmp; } right = asm_fuseloadm(as, rref, rset_clear(allow, dest), irt_is64(ir->t)); } if (irt_isguard(ir->t)) /* For IR_ADDOV etc. */ asm_guardcc(as, CC_O); if (xa != XOg_X_IMUL) { if (ra_hasreg(right)) emit_mrm(as, XO_ARITH(xa), REX_64IR(ir, dest), right); else emit_gri(as, XG_ARITHi(xa), REX_64IR(ir, dest), k); } else if (ra_hasreg(right)) { /* IMUL r, mrm. */ emit_mrm(as, XO_IMUL, REX_64IR(ir, dest), right); } else { /* IMUL r, r, k. */ /* NYI: use lea/shl/add/sub (FOLD only does 2^k) depending on CPU. */ Reg left = asm_fuseloadm(as, lref, RSET_GPR, irt_is64(ir->t)); x86Op xo; if (checki8(k)) { emit_i8(as, k); xo = XO_IMULi8; } else { emit_i32(as, k); xo = XO_IMULi; } emit_mrm(as, xo, REX_64IR(ir, dest), left); return; } ra_left(as, dest, lref); } /* LEA is really a 4-operand ADD with an independent destination register, ** up to two source registers and an immediate. One register can be scaled ** by 1, 2, 4 or 8. This can be used to avoid moves or to fuse several ** instructions. ** ** Currently only a few common cases are supported: ** - 3-operand ADD: y = a+b; y = a+k with a and b already allocated ** - Left ADD fusion: y = (a+b)+k; y = (a+k)+b ** - Right ADD fusion: y = a+(b+k) ** The ommited variants have already been reduced by FOLD. ** ** There are more fusion opportunities, like gathering shifts or joining ** common references. But these are probably not worth the trouble, since ** array indexing is not decomposed and already makes use of all fields ** of the ModRM operand. */ static int asm_lea(ASMState *as, IRIns *ir) { IRIns *irl = IR(ir->op1); IRIns *irr = IR(ir->op2); RegSet allow = RSET_GPR; Reg dest; as->mrm.base = as->mrm.idx = RID_NONE; as->mrm.scale = XM_SCALE1; as->mrm.ofs = 0; if (ra_hasreg(irl->r)) { rset_clear(allow, irl->r); ra_noweak(as, irl->r); as->mrm.base = irl->r; if (irref_isk(ir->op2) || ra_hasreg(irr->r)) { /* The PHI renaming logic does a better job in some cases. */ if (ra_hasreg(ir->r) && ((irt_isphi(irl->t) && as->phireg[ir->r] == ir->op1) || (irt_isphi(irr->t) && as->phireg[ir->r] == ir->op2))) return 0; if (irref_isk(ir->op2)) { as->mrm.ofs = irr->i; } else { rset_clear(allow, irr->r); ra_noweak(as, irr->r); as->mrm.idx = irr->r; } } else if (irr->o == IR_ADD && mayfuse(as, ir->op2) && irref_isk(irr->op2)) { Reg idx = ra_alloc1(as, irr->op1, allow); rset_clear(allow, idx); as->mrm.idx = (uint8_t)idx; as->mrm.ofs = IR(irr->op2)->i; } else { return 0; } } else if (ir->op1 != ir->op2 && irl->o == IR_ADD && mayfuse(as, ir->op1) && (irref_isk(ir->op2) || irref_isk(irl->op2))) { Reg idx, base = ra_alloc1(as, irl->op1, allow); rset_clear(allow, base); as->mrm.base = (uint8_t)base; if (irref_isk(ir->op2)) { as->mrm.ofs = irr->i; idx = ra_alloc1(as, irl->op2, allow); } else { as->mrm.ofs = IR(irl->op2)->i; idx = ra_alloc1(as, ir->op2, allow); } rset_clear(allow, idx); as->mrm.idx = (uint8_t)idx; } else { return 0; } dest = ra_dest(as, ir, allow); emit_mrm(as, XO_LEA, dest, RID_MRM); return 1; /* Success. */ } static void asm_add(ASMState *as, IRIns *ir) { if (irt_isnum(ir->t)) asm_fparith(as, ir, XO_ADDSD); else if ((as->flags & JIT_F_LEA_AGU) || as->flagmcp == as->mcp || irt_is64(ir->t) || !asm_lea(as, ir)) asm_intarith(as, ir, XOg_ADD); } static void asm_neg_not(ASMState *as, IRIns *ir, x86Group3 xg) { Reg dest = ra_dest(as, ir, RSET_GPR); emit_rr(as, XO_GROUP3, REX_64IR(ir, xg), dest); ra_left(as, dest, ir->op1); } static void asm_min_max(ASMState *as, IRIns *ir, int cc) { Reg right, dest = ra_dest(as, ir, RSET_GPR); IRRef lref = ir->op1, rref = ir->op2; if (irref_isk(rref)) { lref = rref; rref = ir->op1; } right = ra_alloc1(as, rref, rset_exclude(RSET_GPR, dest)); emit_rr(as, XO_CMOV + (cc<<24), REX_64IR(ir, dest), right); emit_rr(as, XO_CMP, REX_64IR(ir, dest), right); ra_left(as, dest, lref); } static void asm_bitswap(ASMState *as, IRIns *ir) { Reg dest = ra_dest(as, ir, RSET_GPR); as->mcp = emit_op(XO_BSWAP + ((dest&7) << 24), REX_64IR(ir, 0), dest, 0, as->mcp, 1); ra_left(as, dest, ir->op1); } static void asm_bitshift(ASMState *as, IRIns *ir, x86Shift xs) { IRRef rref = ir->op2; IRIns *irr = IR(rref); Reg dest; if (irref_isk(rref)) { /* Constant shifts. */ int shift; dest = ra_dest(as, ir, RSET_GPR); shift = irr->i & (irt_is64(ir->t) ? 63 : 31); switch (shift) { case 0: break; case 1: emit_rr(as, XO_SHIFT1, REX_64IR(ir, xs), dest); break; default: emit_shifti(as, REX_64IR(ir, xs), dest, shift); break; } } else { /* Variable shifts implicitly use register cl (i.e. ecx). */ Reg right; dest = ra_dest(as, ir, rset_exclude(RSET_GPR, RID_ECX)); if (dest == RID_ECX) { dest = ra_scratch(as, rset_exclude(RSET_GPR, RID_ECX)); emit_rr(as, XO_MOV, RID_ECX, dest); } right = irr->r; if (ra_noreg(right)) right = ra_allocref(as, rref, RID2RSET(RID_ECX)); else if (right != RID_ECX) ra_scratch(as, RID2RSET(RID_ECX)); emit_rr(as, XO_SHIFTcl, REX_64IR(ir, xs), dest); ra_noweak(as, right); if (right != RID_ECX) emit_rr(as, XO_MOV, RID_ECX, right); } ra_left(as, dest, ir->op1); /* ** Note: avoid using the flags resulting from a shift or rotate! ** All of them cause a partial flag stall, except for r,1 shifts ** (but not rotates). And a shift count of 0 leaves the flags unmodified. */ } /* -- Comparisons --------------------------------------------------------- */ /* Virtual flags for unordered FP comparisons. */ #define VCC_U 0x1000 /* Unordered. */ #define VCC_P 0x2000 /* Needs extra CC_P branch. */ #define VCC_S 0x4000 /* Swap avoids CC_P branch. */ #define VCC_PS (VCC_P|VCC_S) /* Map of comparisons to flags. ORDER IR. */ #define COMPFLAGS(ci, cin, cu, cf) ((ci)+((cu)<<4)+((cin)<<8)+(cf)) static const uint16_t asm_compmap[IR_ABC+1] = { /* signed non-eq unsigned flags */ /* LT */ COMPFLAGS(CC_GE, CC_G, CC_AE, VCC_PS), /* GE */ COMPFLAGS(CC_L, CC_L, CC_B, 0), /* LE */ COMPFLAGS(CC_G, CC_G, CC_A, VCC_PS), /* GT */ COMPFLAGS(CC_LE, CC_L, CC_BE, 0), /* ULT */ COMPFLAGS(CC_AE, CC_A, CC_AE, VCC_U), /* UGE */ COMPFLAGS(CC_B, CC_B, CC_B, VCC_U|VCC_PS), /* ULE */ COMPFLAGS(CC_A, CC_A, CC_A, VCC_U), /* UGT */ COMPFLAGS(CC_BE, CC_B, CC_BE, VCC_U|VCC_PS), /* EQ */ COMPFLAGS(CC_NE, CC_NE, CC_NE, VCC_P), /* NE */ COMPFLAGS(CC_E, CC_E, CC_E, VCC_U|VCC_P), /* ABC */ COMPFLAGS(CC_BE, CC_B, CC_BE, VCC_U|VCC_PS) /* Same as UGT. */ }; /* FP and integer comparisons. */ static void asm_comp(ASMState *as, IRIns *ir, uint32_t cc) { if (irt_isnum(ir->t)) { IRRef lref = ir->op1; IRRef rref = ir->op2; Reg left, right; MCLabel l_around; /* ** An extra CC_P branch is required to preserve ordered/unordered ** semantics for FP comparisons. This can be avoided by swapping ** the operands and inverting the condition (except for EQ and UNE). ** So always try to swap if possible. ** ** Another option would be to swap operands to achieve better memory ** operand fusion. But it's unlikely that this outweighs the cost ** of the extra branches. */ if (cc & VCC_S) { /* Swap? */ IRRef tmp = lref; lref = rref; rref = tmp; cc ^= (VCC_PS|(5<<4)); /* A <-> B, AE <-> BE, PS <-> none */ } left = ra_alloc1(as, lref, RSET_FPR); right = asm_fuseload(as, rref, rset_exclude(RSET_FPR, left)); l_around = emit_label(as); asm_guardcc(as, cc >> 4); if (cc & VCC_P) { /* Extra CC_P branch required? */ if (!(cc & VCC_U)) { asm_guardcc(as, CC_P); /* Branch to exit for ordered comparisons. */ } else if (l_around != as->invmcp) { emit_sjcc(as, CC_P, l_around); /* Branch around for unordered. */ } else { /* Patched to mcloop by asm_loop_fixup. */ as->loopinv = 2; if (as->realign) emit_sjcc(as, CC_P, as->mcp); else emit_jcc(as, CC_P, as->mcp); } } emit_mrm(as, XO_UCOMISD, left, right); } else { IRRef lref = ir->op1, rref = ir->op2; IROp leftop = (IROp)(IR(lref)->o); Reg r64 = REX_64IR(ir, 0); int32_t imm = 0; lua_assert(irt_is64(ir->t) || irt_isint(ir->t) || irt_isu32(ir->t) || irt_isaddr(ir->t) || irt_isu8(ir->t)); /* Swap constants (only for ABC) and fusable loads to the right. */ if (irref_isk(lref) || (!irref_isk(rref) && opisfusableload(leftop))) { if ((cc & 0xc) == 0xc) cc ^= 0x53; /* L <-> G, LE <-> GE */ else if ((cc & 0xa) == 0x2) cc ^= 0x55; /* A <-> B, AE <-> BE */ lref = ir->op2; rref = ir->op1; } if (asm_isk32(as, rref, &imm)) { IRIns *irl = IR(lref); /* Check wether we can use test ins. Not for unsigned, since CF=0. */ int usetest = (imm == 0 && (cc & 0xa) != 0x2); if (usetest && irl->o == IR_BAND && irl+1 == ir && !ra_used(irl)) { /* Combine comp(BAND(ref, r/imm), 0) into test mrm, r/imm. */ Reg right, left = RID_NONE; RegSet allow = RSET_GPR; if (!asm_isk32(as, irl->op2, &imm)) { left = ra_alloc1(as, irl->op2, allow); rset_clear(allow, left); } else { /* Try to Fuse IRT_I8/IRT_U8 loads, too. See below. */ IRIns *irll = IR(irl->op1); if (opisfusableload((IROp)irll->o) && (irt_isi8(irll->t) || irt_isu8(irll->t))) { IRType1 origt = irll->t; /* Temporarily flip types. */ irll->t.irt = (irll->t.irt & ~IRT_TYPE) | IRT_INT; as->curins--; /* Skip to BAND to avoid failing in noconflict(). */ right = asm_fuseload(as, irl->op1, RSET_GPR); as->curins++; irll->t = origt; if (right != RID_MRM) goto test_nofuse; /* Fusion succeeded, emit test byte mrm, imm8. */ asm_guardcc(as, cc); emit_i8(as, (imm & 0xff)); emit_mrm(as, XO_GROUP3b, XOg_TEST, RID_MRM); return; } } as->curins--; /* Skip to BAND to avoid failing in noconflict(). */ right = asm_fuseloadm(as, irl->op1, allow, r64); as->curins++; /* Undo the above. */ test_nofuse: asm_guardcc(as, cc); if (ra_noreg(left)) { emit_i32(as, imm); emit_mrm(as, XO_GROUP3, r64 + XOg_TEST, right); } else { emit_mrm(as, XO_TEST, r64 + left, right); } } else { Reg left; if (opisfusableload((IROp)irl->o) && ((irt_isu8(irl->t) && checku8(imm)) || ((irt_isi8(irl->t) || irt_isi16(irl->t)) && checki8(imm)) || (irt_isu16(irl->t) && checku16(imm) && checki8((int16_t)imm)))) { /* Only the IRT_INT case is fused by asm_fuseload. ** The IRT_I8/IRT_U8 loads and some IRT_I16/IRT_U16 loads ** are handled here. ** Note that cmp word [mem], imm16 should not be generated, ** since it has a length-changing prefix. Compares of a word ** against a sign-extended imm8 are ok, however. */ IRType1 origt = irl->t; /* Temporarily flip types. */ irl->t.irt = (irl->t.irt & ~IRT_TYPE) | IRT_INT; left = asm_fuseload(as, lref, RSET_GPR); irl->t = origt; if (left == RID_MRM) { /* Fusion succeeded? */ if (irt_isu8(irl->t) || irt_isu16(irl->t)) cc >>= 4; /* Need unsigned compare. */ asm_guardcc(as, cc); emit_i8(as, imm); emit_mrm(as, (irt_isi8(origt) || irt_isu8(origt)) ? XO_ARITHib : XO_ARITHiw8, r64 + XOg_CMP, RID_MRM); return; } /* Otherwise handle register case as usual. */ } else { left = asm_fuseloadm(as, lref, irt_isu8(ir->t) ? RSET_GPR8 : RSET_GPR, r64); } asm_guardcc(as, cc); if (usetest && left != RID_MRM) { /* Use test r,r instead of cmp r,0. */ x86Op xo = XO_TEST; if (irt_isu8(ir->t)) { lua_assert(ir->o == IR_EQ || ir->o == IR_NE); xo = XO_TESTb; if (!rset_test(RSET_RANGE(RID_EAX, RID_EBX+1), left)) { if (LJ_64) { left |= FORCE_REX; } else { emit_i32(as, 0xff); emit_mrm(as, XO_GROUP3, XOg_TEST, left); return; } } } emit_rr(as, xo, r64 + left, left); if (irl+1 == ir) /* Referencing previous ins? */ as->flagmcp = as->mcp; /* Set flag to drop test r,r if possible. */ } else { emit_gmrmi(as, XG_ARITHi(XOg_CMP), r64 + left, imm); } } } else { Reg left = ra_alloc1(as, lref, RSET_GPR); Reg right = asm_fuseloadm(as, rref, rset_exclude(RSET_GPR, left), r64); asm_guardcc(as, cc); emit_mrm(as, XO_CMP, r64 + left, right); } } } #if LJ_32 && LJ_HASFFI /* 64 bit integer comparisons in 32 bit mode. */ static void asm_comp_int64(ASMState *as, IRIns *ir) { uint32_t cc = asm_compmap[(ir-1)->o]; RegSet allow = RSET_GPR; Reg lefthi = RID_NONE, leftlo = RID_NONE; Reg righthi = RID_NONE, rightlo = RID_NONE; MCLabel l_around; x86ModRM mrm; as->curins--; /* Skip loword ins. Avoids failing in noconflict(), too. */ /* Allocate/fuse hiword operands. */ if (irref_isk(ir->op2)) { lefthi = asm_fuseload(as, ir->op1, allow); } else { lefthi = ra_alloc1(as, ir->op1, allow); rset_clear(allow, lefthi); righthi = asm_fuseload(as, ir->op2, allow); if (righthi == RID_MRM) { if (as->mrm.base != RID_NONE) rset_clear(allow, as->mrm.base); if (as->mrm.idx != RID_NONE) rset_clear(allow, as->mrm.idx); } else { rset_clear(allow, righthi); } } mrm = as->mrm; /* Save state for hiword instruction. */ /* Allocate/fuse loword operands. */ if (irref_isk((ir-1)->op2)) { leftlo = asm_fuseload(as, (ir-1)->op1, allow); } else { leftlo = ra_alloc1(as, (ir-1)->op1, allow); rset_clear(allow, leftlo); rightlo = asm_fuseload(as, (ir-1)->op2, allow); } /* All register allocations must be performed _before_ this point. */ l_around = emit_label(as); as->invmcp = as->flagmcp = NULL; /* Cannot use these optimizations. */ /* Loword comparison and branch. */ asm_guardcc(as, cc >> 4); /* Always use unsigned compare for loword. */ if (ra_noreg(rightlo)) { int32_t imm = IR((ir-1)->op2)->i; if (imm == 0 && ((cc >> 4) & 0xa) != 0x2 && leftlo != RID_MRM) emit_rr(as, XO_TEST, leftlo, leftlo); else emit_gmrmi(as, XG_ARITHi(XOg_CMP), leftlo, imm); } else { emit_mrm(as, XO_CMP, leftlo, rightlo); } /* Hiword comparison and branches. */ if ((cc & 15) != CC_NE) emit_sjcc(as, CC_NE, l_around); /* Hiword unequal: skip loword compare. */ if ((cc & 15) != CC_E) asm_guardcc(as, cc >> 8); /* Hiword compare without equality check. */ as->mrm = mrm; /* Restore state. */ if (ra_noreg(righthi)) { int32_t imm = IR(ir->op2)->i; if (imm == 0 && (cc & 0xa) != 0x2 && lefthi != RID_MRM) emit_rr(as, XO_TEST, lefthi, lefthi); else emit_gmrmi(as, XG_ARITHi(XOg_CMP), lefthi, imm); } else { emit_mrm(as, XO_CMP, lefthi, righthi); } } #endif /* -- Support for 64 bit ops in 32 bit mode ------------------------------- */ /* Hiword op of a split 64 bit op. Previous op must be the loword op. */ static void asm_hiop(ASMState *as, IRIns *ir) { #if LJ_32 && LJ_HASFFI /* HIOP is marked as a store because it needs its own DCE logic. */ int uselo = ra_used(ir-1), usehi = ra_used(ir); /* Loword/hiword used? */ if (LJ_UNLIKELY(!(as->flags & JIT_F_OPT_DCE))) uselo = usehi = 1; if ((ir-1)->o == IR_CONV) { /* Conversions to/from 64 bit. */ if (usehi || uselo) { if (irt_isfp(ir->t)) asm_conv_fp_int64(as, ir); else asm_conv_int64_fp(as, ir); } as->curins--; /* Always skip the CONV. */ return; } else if ((ir-1)->o <= IR_NE) { /* 64 bit integer comparisons. ORDER IR. */ asm_comp_int64(as, ir); return; } else if ((ir-1)->o == IR_XSTORE) { if ((ir-1)->r != RID_SINK) asm_fxstore(as, ir); return; } if (!usehi) return; /* Skip unused hiword op for all remaining ops. */ switch ((ir-1)->o) { case IR_ADD: as->flagmcp = NULL; as->curins--; asm_intarith(as, ir, XOg_ADC); asm_intarith(as, ir-1, XOg_ADD); break; case IR_SUB: as->flagmcp = NULL; as->curins--; asm_intarith(as, ir, XOg_SBB); asm_intarith(as, ir-1, XOg_SUB); break; case IR_NEG: { Reg dest = ra_dest(as, ir, RSET_GPR); emit_rr(as, XO_GROUP3, XOg_NEG, dest); emit_i8(as, 0); emit_rr(as, XO_ARITHi8, XOg_ADC, dest); ra_left(as, dest, ir->op1); as->curins--; asm_neg_not(as, ir-1, XOg_NEG); break; } case IR_CALLN: case IR_CALLXS: if (!uselo) ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ break; case IR_CNEWI: /* Nothing to do here. Handled by CNEWI itself. */ break; default: lua_assert(0); break; } #else UNUSED(as); UNUSED(ir); lua_assert(0); /* Unused on x64 or without FFI. */ #endif } /* -- Stack handling ------------------------------------------------------ */ /* Check Lua stack size for overflow. Use exit handler as fallback. */ static void asm_stack_check(ASMState *as, BCReg topslot, IRIns *irp, RegSet allow, ExitNo exitno) { /* Try to get an unused temp. register, otherwise spill/restore eax. */ Reg pbase = irp ? irp->r : RID_BASE; Reg r = allow ? rset_pickbot(allow) : RID_EAX; emit_jcc(as, CC_B, exitstub_addr(as->J, exitno)); if (allow == RSET_EMPTY) /* Restore temp. register. */ emit_rmro(as, XO_MOV, r|REX_64, RID_ESP, 0); else ra_modified(as, r); emit_gri(as, XG_ARITHi(XOg_CMP), r, (int32_t)(8*topslot)); if (ra_hasreg(pbase) && pbase != r) emit_rr(as, XO_ARITH(XOg_SUB), r, pbase); else emit_rmro(as, XO_ARITH(XOg_SUB), r, RID_NONE, ptr2addr(&J2G(as->J)->jit_base)); emit_rmro(as, XO_MOV, r, r, offsetof(lua_State, maxstack)); emit_getgl(as, r, jit_L); if (allow == RSET_EMPTY) /* Spill temp. register. */ emit_rmro(as, XO_MOVto, r|REX_64, RID_ESP, 0); } /* Restore Lua stack from on-trace state. */ static void asm_stack_restore(ASMState *as, SnapShot *snap) { SnapEntry *map = &as->T->snapmap[snap->mapofs]; SnapEntry *flinks = &as->T->snapmap[snap_nextofs(as->T, snap)-1]; MSize n, nent = snap->nent; /* Store the value of all modified slots to the Lua stack. */ for (n = 0; n < nent; n++) { SnapEntry sn = map[n]; BCReg s = snap_slot(sn); int32_t ofs = 8*((int32_t)s-1); IRRef ref = snap_ref(sn); IRIns *ir = IR(ref); if ((sn & SNAP_NORESTORE)) continue; if (irt_isnum(ir->t)) { Reg src = ra_alloc1(as, ref, RSET_FPR); emit_rmro(as, XO_MOVSDto, src, RID_BASE, ofs); } else { lua_assert(irt_ispri(ir->t) || irt_isaddr(ir->t) || (LJ_DUALNUM && irt_isinteger(ir->t))); if (!irref_isk(ref)) { Reg src = ra_alloc1(as, ref, rset_exclude(RSET_GPR, RID_BASE)); emit_movtomro(as, REX_64IR(ir, src), RID_BASE, ofs); } else if (!irt_ispri(ir->t)) { emit_movmroi(as, RID_BASE, ofs, ir->i); } if ((sn & (SNAP_CONT|SNAP_FRAME))) { if (s != 0) /* Do not overwrite link to previous frame. */ emit_movmroi(as, RID_BASE, ofs+4, (int32_t)(*flinks--)); } else { if (!(LJ_64 && irt_islightud(ir->t))) emit_movmroi(as, RID_BASE, ofs+4, irt_toitype(ir->t)); } } checkmclim(as); } lua_assert(map + nent == flinks); } /* -- GC handling --------------------------------------------------------- */ /* Check GC threshold and do one or more GC steps. */ static void asm_gc_check(ASMState *as) { const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_step_jit]; IRRef args[2]; MCLabel l_end; Reg tmp; ra_evictset(as, RSET_SCRATCH); l_end = emit_label(as); /* Exit trace if in GCSatomic or GCSfinalize. Avoids syncing GC objects. */ asm_guardcc(as, CC_NE); /* Assumes asm_snap_prep() already done. */ emit_rr(as, XO_TEST, RID_RET, RID_RET); args[0] = ASMREF_TMP1; /* global_State *g */ args[1] = ASMREF_TMP2; /* MSize steps */ asm_gencall(as, ci, args); tmp = ra_releasetmp(as, ASMREF_TMP1); emit_loada(as, tmp, J2G(as->J)); emit_loadi(as, ra_releasetmp(as, ASMREF_TMP2), as->gcsteps); /* Jump around GC step if GC total < GC threshold. */ emit_sjcc(as, CC_B, l_end); emit_opgl(as, XO_ARITH(XOg_CMP), tmp, gc.threshold); emit_getgl(as, tmp, gc.total); as->gcsteps = 0; checkmclim(as); } /* -- Loop handling ------------------------------------------------------- */ /* Fixup the loop branch. */ static void asm_loop_fixup(ASMState *as) { MCode *p = as->mctop; MCode *target = as->mcp; if (as->realign) { /* Realigned loops use short jumps. */ as->realign = NULL; /* Stop another retry. */ lua_assert(((intptr_t)target & 15) == 0); if (as->loopinv) { /* Inverted loop branch? */ p -= 5; p[0] = XI_JMP; lua_assert(target - p >= -128); p[-1] = (MCode)(target - p); /* Patch sjcc. */ if (as->loopinv == 2) p[-3] = (MCode)(target - p + 2); /* Patch opt. short jp. */ } else { lua_assert(target - p >= -128); p[-1] = (MCode)(int8_t)(target - p); /* Patch short jmp. */ p[-2] = XI_JMPs; } } else { MCode *newloop; p[-5] = XI_JMP; if (as->loopinv) { /* Inverted loop branch? */ /* asm_guardcc already inverted the jcc and patched the jmp. */ p -= 5; newloop = target+4; *(int32_t *)(p-4) = (int32_t)(target - p); /* Patch jcc. */ if (as->loopinv == 2) { *(int32_t *)(p-10) = (int32_t)(target - p + 6); /* Patch opt. jp. */ newloop = target+8; } } else { /* Otherwise just patch jmp. */ *(int32_t *)(p-4) = (int32_t)(target - p); newloop = target+3; } /* Realign small loops and shorten the loop branch. */ if (newloop >= p - 128) { as->realign = newloop; /* Force a retry and remember alignment. */ as->curins = as->stopins; /* Abort asm_trace now. */ as->T->nins = as->orignins; /* Remove any added renames. */ } } } /* -- Head of trace ------------------------------------------------------- */ /* Coalesce BASE register for a root trace. */ static void asm_head_root_base(ASMState *as) { IRIns *ir = IR(REF_BASE); Reg r = ir->r; if (ra_hasreg(r)) { ra_free(as, r); if (rset_test(as->modset, r)) ir->r = RID_INIT; /* No inheritance for modified BASE register. */ if (r != RID_BASE) emit_rr(as, XO_MOV, r, RID_BASE); } } /* Coalesce or reload BASE register for a side trace. */ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow) { IRIns *ir = IR(REF_BASE); Reg r = ir->r; if (ra_hasreg(r)) { ra_free(as, r); if (rset_test(as->modset, r)) ir->r = RID_INIT; /* No inheritance for modified BASE register. */ if (irp->r == r) { rset_clear(allow, r); /* Mark same BASE register as coalesced. */ } else if (ra_hasreg(irp->r) && rset_test(as->freeset, irp->r)) { rset_clear(allow, irp->r); emit_rr(as, XO_MOV, r, irp->r); /* Move from coalesced parent reg. */ } else { emit_getgl(as, r, jit_base); /* Otherwise reload BASE. */ } } return allow; } /* -- Tail of trace ------------------------------------------------------- */ /* Fixup the tail code. */ static void asm_tail_fixup(ASMState *as, TraceNo lnk) { /* Note: don't use as->mcp swap + emit_*: emit_op overwrites more bytes. */ MCode *p = as->mctop; MCode *target, *q; int32_t spadj = as->T->spadjust; if (spadj == 0) { p -= ((as->flags & JIT_F_LEA_AGU) ? 7 : 6) + (LJ_64 ? 1 : 0); } else { MCode *p1; /* Patch stack adjustment. */ if (checki8(spadj)) { p -= 3; p1 = p-6; *p1 = (MCode)spadj; } else { p1 = p-9; *(int32_t *)p1 = spadj; } if ((as->flags & JIT_F_LEA_AGU)) { #if LJ_64 p1[-4] = 0x48; #endif p1[-3] = (MCode)XI_LEA; p1[-2] = MODRM(checki8(spadj) ? XM_OFS8 : XM_OFS32, RID_ESP, RID_ESP); p1[-1] = MODRM(XM_SCALE1, RID_ESP, RID_ESP); } else { #if LJ_64 p1[-3] = 0x48; #endif p1[-2] = (MCode)(checki8(spadj) ? XI_ARITHi8 : XI_ARITHi); p1[-1] = MODRM(XM_REG, XOg_ADD, RID_ESP); } } /* Patch exit branch. */ target = lnk ? traceref(as->J, lnk)->mcode : (MCode *)lj_vm_exit_interp; *(int32_t *)(p-4) = jmprel(p, target); p[-5] = XI_JMP; /* Drop unused mcode tail. Fill with NOPs to make the prefetcher happy. */ for (q = as->mctop-1; q >= p; q--) *q = XI_NOP; as->mctop = p; } /* Prepare tail of code. */ static void asm_tail_prep(ASMState *as) { MCode *p = as->mctop; /* Realign and leave room for backwards loop branch or exit branch. */ if (as->realign) { int i = ((int)(intptr_t)as->realign) & 15; /* Fill unused mcode tail with NOPs to make the prefetcher happy. */ while (i-- > 0) *--p = XI_NOP; as->mctop = p; p -= (as->loopinv ? 5 : 2); /* Space for short/near jmp. */ } else { p -= 5; /* Space for exit branch (near jmp). */ } if (as->loopref) { as->invmcp = as->mcp = p; } else { /* Leave room for ESP adjustment: add esp, imm or lea esp, [esp+imm] */ as->mcp = p - (((as->flags & JIT_F_LEA_AGU) ? 7 : 6) + (LJ_64 ? 1 : 0)); as->invmcp = NULL; } } /* -- Instruction dispatch ------------------------------------------------ */ /* Assemble a single instruction. */ static void asm_ir(ASMState *as, IRIns *ir) { switch ((IROp)ir->o) { /* Miscellaneous ops. */ case IR_LOOP: asm_loop(as); break; case IR_NOP: case IR_XBAR: lua_assert(!ra_used(ir)); break; case IR_USE: ra_alloc1(as, ir->op1, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); break; case IR_PHI: asm_phi(as, ir); break; case IR_HIOP: asm_hiop(as, ir); break; case IR_GCSTEP: asm_gcstep(as, ir); break; /* Guarded assertions. */ case IR_LT: case IR_GE: case IR_LE: case IR_GT: case IR_ULT: case IR_UGE: case IR_ULE: case IR_UGT: case IR_EQ: case IR_NE: case IR_ABC: asm_comp(as, ir, asm_compmap[ir->o]); break; case IR_RETF: asm_retf(as, ir); break; /* Bit ops. */ case IR_BNOT: asm_neg_not(as, ir, XOg_NOT); break; case IR_BSWAP: asm_bitswap(as, ir); break; case IR_BAND: asm_intarith(as, ir, XOg_AND); break; case IR_BOR: asm_intarith(as, ir, XOg_OR); break; case IR_BXOR: asm_intarith(as, ir, XOg_XOR); break; case IR_BSHL: asm_bitshift(as, ir, XOg_SHL); break; case IR_BSHR: asm_bitshift(as, ir, XOg_SHR); break; case IR_BSAR: asm_bitshift(as, ir, XOg_SAR); break; case IR_BROL: asm_bitshift(as, ir, XOg_ROL); break; case IR_BROR: asm_bitshift(as, ir, XOg_ROR); break; /* Arithmetic ops. */ case IR_ADD: asm_add(as, ir); break; case IR_SUB: if (irt_isnum(ir->t)) asm_fparith(as, ir, XO_SUBSD); else /* Note: no need for LEA trick here. i-k is encoded as i+(-k). */ asm_intarith(as, ir, XOg_SUB); break; case IR_MUL: if (irt_isnum(ir->t)) asm_fparith(as, ir, XO_MULSD); else asm_intarith(as, ir, XOg_X_IMUL); break; case IR_DIV: #if LJ_64 && LJ_HASFFI if (!irt_isnum(ir->t)) asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_divi64 : IRCALL_lj_carith_divu64); else #endif asm_fparith(as, ir, XO_DIVSD); break; case IR_MOD: #if LJ_64 && LJ_HASFFI if (!irt_isint(ir->t)) asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 : IRCALL_lj_carith_modu64); else #endif asm_intmod(as, ir); break; case IR_NEG: if (irt_isnum(ir->t)) asm_fparith(as, ir, XO_XORPS); else asm_neg_not(as, ir, XOg_NEG); break; case IR_ABS: asm_fparith(as, ir, XO_ANDPS); break; case IR_MIN: if (irt_isnum(ir->t)) asm_fparith(as, ir, XO_MINSD); else asm_min_max(as, ir, CC_G); break; case IR_MAX: if (irt_isnum(ir->t)) asm_fparith(as, ir, XO_MAXSD); else asm_min_max(as, ir, CC_L); break; case IR_FPMATH: case IR_ATAN2: case IR_LDEXP: asm_fpmath(as, ir); break; case IR_POW: #if LJ_64 && LJ_HASFFI if (!irt_isnum(ir->t)) asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 : IRCALL_lj_carith_powu64); else #endif asm_fppowi(as, ir); break; /* Overflow-checking arithmetic ops. Note: don't use LEA here! */ case IR_ADDOV: asm_intarith(as, ir, XOg_ADD); break; case IR_SUBOV: asm_intarith(as, ir, XOg_SUB); break; case IR_MULOV: asm_intarith(as, ir, XOg_X_IMUL); break; /* Memory references. */ case IR_AREF: asm_aref(as, ir); break; case IR_HREF: asm_href(as, ir); break; case IR_HREFK: asm_hrefk(as, ir); break; case IR_NEWREF: asm_newref(as, ir); break; case IR_UREFO: case IR_UREFC: asm_uref(as, ir); break; case IR_FREF: asm_fref(as, ir); break; case IR_STRREF: asm_strref(as, ir); break; /* Loads and stores. */ case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: asm_ahuvload(as, ir); break; case IR_FLOAD: case IR_XLOAD: asm_fxload(as, ir); break; case IR_SLOAD: asm_sload(as, ir); break; case IR_ASTORE: case IR_HSTORE: case IR_USTORE: asm_ahustore(as, ir); break; case IR_FSTORE: case IR_XSTORE: asm_fxstore(as, ir); break; /* Allocations. */ case IR_SNEW: case IR_XSNEW: asm_snew(as, ir); break; case IR_TNEW: asm_tnew(as, ir); break; case IR_TDUP: asm_tdup(as, ir); break; case IR_CNEW: case IR_CNEWI: asm_cnew(as, ir); break; /* Write barriers. */ case IR_TBAR: asm_tbar(as, ir); break; case IR_OBAR: asm_obar(as, ir); break; /* Type conversions. */ case IR_TOBIT: asm_tobit(as, ir); break; case IR_CONV: asm_conv(as, ir); break; case IR_TOSTR: asm_tostr(as, ir); break; case IR_STRTO: asm_strto(as, ir); break; /* Calls. */ case IR_CALLN: case IR_CALLL: case IR_CALLS: asm_call(as, ir); break; case IR_CALLXS: asm_callx(as, ir); break; case IR_CARG: break; default: setintV(&as->J->errinfo, ir->o); lj_trace_err_info(as->J, LJ_TRERR_NYIIR); break; } } /* -- Trace setup --------------------------------------------------------- */ /* Ensure there are enough stack slots for call arguments. */ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) { IRRef args[CCI_NARGS_MAX*2]; int nslots; asm_collectargs(as, ir, ci, args); nslots = asm_count_call_slots(as, ci, args); if (nslots > as->evenspill) /* Leave room for args in stack slots. */ as->evenspill = nslots; #if LJ_64 return irt_isfp(ir->t) ? REGSP_HINT(RID_FPRET) : REGSP_HINT(RID_RET); #else return irt_isfp(ir->t) ? REGSP_INIT : REGSP_HINT(RID_RET); #endif } /* Target-specific setup. */ static void asm_setup_target(ASMState *as) { asm_exitstub_setup(as, as->T->nsnap); } /* -- Trace patching ------------------------------------------------------ */ /* Patch exit jumps of existing machine code to a new target. */ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target) { MCode *p = T->mcode; MCode *mcarea = lj_mcode_patch(J, p, 0); MSize len = T->szmcode; MCode *px = exitstub_addr(J, exitno) - 6; MCode *pe = p+len-6; uint32_t stateaddr = u32ptr(&J2G(J)->vmstate); if (len > 5 && p[len-5] == XI_JMP && p+len-6 + *(int32_t *)(p+len-4) == px) *(int32_t *)(p+len-4) = jmprel(p+len, target); /* Do not patch parent exit for a stack check. Skip beyond vmstate update. */ for (; p < pe; p++) if (*(uint32_t *)(p+(LJ_64 ? 3 : 2)) == stateaddr && p[0] == XI_MOVmi) { p += LJ_64 ? 11 : 10; break; } lua_assert(p < pe); for (; p < pe; p++) { if ((*(uint16_t *)p & 0xf0ff) == 0x800f && p + *(int32_t *)(p+2) == px) { *(int32_t *)(p+2) = jmprel(p+6, target); p += 5; } } lj_mcode_sync(T->mcode, T->mcode + T->szmcode); lj_mcode_patch(J, mcarea, 1); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lualib.h0000664000000000000000000000213112202141143021774 0ustar rootroot/* ** Standard library header. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LUALIB_H #define _LUALIB_H #include "lua.h" #define LUA_FILEHANDLE "FILE*" #define LUA_COLIBNAME "coroutine" #define LUA_MATHLIBNAME "math" #define LUA_STRLIBNAME "string" #define LUA_TABLIBNAME "table" #define LUA_IOLIBNAME "io" #define LUA_OSLIBNAME "os" #define LUA_LOADLIBNAME "package" #define LUA_DBLIBNAME "debug" #define LUA_BITLIBNAME "bit" #define LUA_JITLIBNAME "jit" #define LUA_FFILIBNAME "ffi" LUALIB_API int luaopen_base(lua_State *L); LUALIB_API int luaopen_math(lua_State *L); LUALIB_API int luaopen_string(lua_State *L); LUALIB_API int luaopen_table(lua_State *L); LUALIB_API int luaopen_io(lua_State *L); LUALIB_API int luaopen_os(lua_State *L); LUALIB_API int luaopen_package(lua_State *L); LUALIB_API int luaopen_debug(lua_State *L); LUALIB_API int luaopen_bit(lua_State *L); LUALIB_API int luaopen_jit(lua_State *L); LUALIB_API int luaopen_ffi(lua_State *L); LUALIB_API void luaL_openlibs(lua_State *L); #ifndef lua_assert #define lua_assert(x) ((void)0) #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_vm.o0000664000000000000000000006770012213333063021665 0ustar rootrootELF>x;@@ |D|6ƒf.v CA$||ƒf.w CA$||ƒf.r CA$|l|^ƒf.s CA$ls5|s+f.z u CA$]|R9luԃsċ ʋ9twritEu1ls5|s+f.zt CA$|9luɃsϋ ʋ9tŃwritEutHЋlu& A; u CA$uRHЋlu& A; t CA$uls,Af.z u CA$uls,Af.zt CA$uHЋl9uCA$uTHЋl9t=CA$lsl,‰,CA$lrl,‰,CA$ls CA$lr CA$H,H,ʋA$1|lA$|JHfHnWʋA$|u"W*@ ʋA$|4<‰*K|AXʋA$|xA\ʋA$|BAYʋA$| A^ʋA$|A .ʋA$|AXʋA$|kA\ʋA$|5AYʋA$|A^ʋA$|A ||XʋA$|s|e\ʋA$|0|"YʋA$||^ʋA$|| |y|k 1-ʋA$|$W4‰)\$ULkKHHʋA$HADʋA$HADʋA$*ʋA$AʋA$HЉDA$L Di)9vA$jlmHEHʋA$jl}m ‹DMEtEuA$vAt݉APHЋjlA E@EuA$At}tՉAP΋jANjlMA$HЋjlMAA$l$}(tU4ʉUA$HЋl$URA4\$UKDA$l$UApA;t\$sE% =t-UKDA$̉CHЋl$Ap\$A;tUs/A4UKDA$CHHЋjmAHЋjmA;|,|sf-*f.;EExtH(H,ʋA$}tMAKD̓|wHA|,M#HkMy u69Au1yt2CH)H,‹A$CDIuMtAu|,;EExtH(H,ʋA$}tMAKD|,|sd-*f.;EExtEuBH,H(A$}tۋMAKȃ|6eAAM KHA|/,M#HkEMy uM9AuHyt'ECH,H)A$}tӉ $MA $뾋IuMt A $D$l$|$WH$\$Ul$qeAAE a|z ,;En ExtEu2H HA$}tۋMA0 KȀeAAM KD<$E<Ǎ ʋiEucD$t%D;Ew3D)AD}H)I/AuD<$A$|$W‰\$UK둀eAAE D$|, TZ] ̓A$|, TZ] ̓A$D$LA׋iy Zu]jD$tH)I/AujD$}w] ̓A$uKHэ DyEE΃u )A׋Z뎃뉍LHiHAH)HAiAiA ʉZ] ̓A$D<$Dt$lDDuD}D9sLA|t?*I,HlʉDCDt$D<$A$D);EwDkD}AtFt0IoIH,HDDt뢃D<$D| D+ztDlA9sIGAH9sA9rA9rD<$A$D$D)vۉl$l$;E wIGAHA9r믉UM\$A)׋t$UMAŃ|uAl|u6|u/}u)DDA$CTAD$ZD$u^A׃tI,IoAuD$k9w(KHэDzEEЋA$AGAÍk$){ZD$u:8Cw(KHэDzEEЋA$Dƍk)ZD$uBH, Hj8Cw(KHэDzEEЋA$Dƍk\)뚍 ʁy y  i I|$f.AsA$f.ڍ ʁy y  i I|,f.ACvA$f.҉~fAl. ʁy "y"iIXAx$f.ArA$f.ڍ ʁy {"yn"iIXAx!f.AA$f.݉~fAl. ʋitiAA$ ʋit i)i8A$~fAl.A$AH@@l$AHADL$$Ll$HA$~fAl.JD{̋l$ ;M K9vA$D9vD{̋l$ ;M K9v C@D9v,DzhDxl$ ;M Fщk…t%9s4DyD8DyDxAuD{̋A$@űjL}l$DU;M EAdž8AAdž8U MZwjL}l$DU;M ELnAdž8A(Adž8U MZ!)HLZD D$ouAdž8)ۃtH, Hjul$]D$L$9uUHL$ HM01H(A^A_[]r;U wBʅt)ÉUD$ΉU뢰Hl$mDž룋|$H(A^A_[]HHl$HUDuAư ZBAdž8DKÃUE\$ΉUEj)] ̓A$USAWAVH(|$1L|$DuAư L}0D$HD$ D$D$8EAdž8EUE))ыZD$/USAWAVH(L$USAWAVH(T$|$L}0L|$ l$He0DuAư Adž8U)ӋE)iy-ʉZ] ̓A$USAWAVH(|$l$D}$D+}D$D|$L}0L|$ He0хhу)Dȋ]HcMvL=FLDzEEA)EeK )|$WHHM$D$H${4u.A)A!C*$H$Ck,|$WH‰\$UtKH(H,ʋA$MYY)Ӌi$D$H${5u.A)A!C*$H$Ck,|$WH‰\$UtKH,H(A$MYCH,HiY)Ӌil$U4ʍ‰K\$U[r CA$xrx̓Ήl$U‰\$뤃l$Us\$AAǍ, ‰, DCΉ|$W\$U)ЉYXl$U4‰\$UҍLL$$l$U΍\$UL$$iA9)ʉZ] ̓A$l$UΉ\$UCA jZD$j*jtуH)HiuD$Vjt% 9GŋjD ZBBjZua*mBABjM#HkMy u9At IuijBtwvAwz*}z BEZBjEteAAE z|Ջ2R|$H(ZHjRzE3ZzuBBz AApA;trxl$U\$։U먃tGzl$UUZ2R\$Ut"HjHBHjHB B`*zTjE ZBBB 'zz ZBH?fHnX-B*;EsExt"H(H*F}tՉuظ0*zjE ZBBWBjJAAz 7jj B*ZjJ봃 *Z\$,$z H}0 } Mt ;M \;]  ]l$UUlH)9tH+HC9u΋<$Adž8l$$UwZKD{KD)t;E w[H)HH)D9uCB\$D$HBKKHHË $Dyމ$Unjm Z\$,$H}0 } Mt ;M \;]  ]l$UUlH)9tH+HC9u΋<$Adž8l$$UwNKD{KD)t;E w;H)HH)D9uC\$D$1} މ $Dyމ$U둋l$HE0 UDE1HE0EZZ4 z HfHnTZBD$u.8CwKHэʋA$DH5z* .땁z qz z Q[ z  z  z 6x zk Y zL : z- d z ; z  z  z | zo T zG , z jYE  zz B!zz BjZjBs: t6 r.)*ŋj?jWHPCfHnYBj4몃zjZt4( \B"Bj1x JjWӃzz Bzxzkz ^J4 z99|L]۹z9h|L_ۃz**E ,z*Z} m*ApA;triz\,*Ll$D$HD$l$UT$HƉ\$UZBBApA;trD$vz,jl$zz *l$m ,JD$9r~&l$)|.l D$I|D(ډtѹ1ApA;trFz<z *-,B~} r A9MAD$MuAApA;trVz*E HA9\$D$AM u؋\$<nApA;trzO*E A98\$D$ALArZw y؋\$ApA;truz*E A9\$D$ALarzw y؋\$Vz~Ջ:*azTH8CfHnXf~+H8CfHńzXf~ʼnD$D9JxFXf~!̓؃H8CfHńzXf~ʼnD$D9xXf~ ̓؃iH8CfHńzMXf~ʼnD$D9xXf~1̓؃zH8CfHnXf~3zH8CfHnXf~*D$zz tJH8CfHnXXf~f~럃?z2z %JH8CfHnXXf~f~Mzz JH8CfHnXXf~f~zz JH8CfHnXXf~f~rMzsDz s;JH8CfHnXXf~f~cl$Z\$UDEB;M wYPUPM)Aju] ̓A$ukHՍ݃)U1]Hl$l$\$UDEUE)Hl$UA uSu8 t4A+Au6Au( t$Attl$UމUKkCAML$jmEǍ‹l$UEAIH\$뫉\$\$Dl$UEމD$UHE)HKAUATASARAQAPWVUHl$XUSRQPEeL}LuDuA8Adž8A9P zPRx $>9PzRx  .symtab.strtab.shstrtab.rela.text.data.bss.note.GNU-stack.comment.rela.debug_frame.rela.eh_frame @9jP & :, :1 :A0 :O0:`Jo` a:x\xoH ;k>  Z "H-HH8HCHN Zf9?rx?~EEA5v433)9)b| <J "6X6#6/6;;G56Sk6_6k6w $1CtCCC=1nHL $& $J h   +% $0 Z<LG RX &d "p 3{ @T m ] 0 B  |R c *b6DG|P\kQ.w*CD,XCG\+i ai ^+r`7]C/OC,\o'it/?W6}  OZV! K$5 3@ACVew8A>} T$ *1@HLMJ^.j )y5H,t5)76RJ ,;I[l 1,@Z/^Q=J+WcCpB{_ \] 4  l!Hd! !9 !y& 5 5" A ?":N y")Z "7g "/~ $  %, .% .% 6%, b% j% o% s%B %1 %A %Q &!` (&!q I&" k& & &! &) &+ '! ?'(  g'(  '(# . '= ''L '/]  (1n >( (c 5)6 k)6 ); ); * 6*/ e*L *.  *+ +; +L ,na u,st ,s [-' -6 -a .a z.a .5 /3 C/  L/  U/O) /R: /RL H0RZ 0Fh 0z 0 0W C18 {14  1 1 1D  2 *22&\25b2CCT2gu3]33[T4T4[44^ 5v555 55#515@@(7N7^K8j]8_89,>9buildvm_x86.dasclj_vm_asm_beginlj_BC_ISLTlj_BC_ISGElj_BC_ISLElj_BC_ISGTlj_BC_ISEQVlj_BC_ISNEVlj_BC_ISEQSlj_BC_ISNESlj_BC_ISEQNlj_BC_ISNENlj_BC_ISEQPlj_BC_ISNEPlj_BC_ISTClj_BC_ISFClj_BC_ISTlj_BC_ISFlj_BC_MOVlj_BC_NOTlj_BC_UNMlj_BC_LENlj_tab_lenlj_BC_ADDVNlj_BC_SUBVNlj_BC_MULVNlj_BC_DIVVNlj_BC_MODVNlj_BC_ADDNVlj_BC_SUBNVlj_BC_MULNVlj_BC_DIVNVlj_BC_MODNVlj_BC_ADDVVlj_BC_SUBVVlj_BC_MULVVlj_BC_DIVVVlj_BC_MODVVlj_BC_POWlj_BC_CATlj_meta_catlj_BC_KSTRlj_BC_KCDATAlj_BC_KSHORTlj_BC_KNUMlj_BC_KPRIlj_BC_KNILlj_BC_UGETlj_BC_USETVlj_gc_barrieruvlj_BC_USETSlj_BC_USETNlj_BC_USETPlj_BC_UCLOlj_func_closeuvlj_BC_FNEWlj_func_newL_gclj_BC_TNEWlj_tab_newlj_gc_step_fixtoplj_BC_TDUPlj_tab_duplj_BC_GGETlj_BC_GSETlj_BC_TGETVlj_BC_TGETSlj_BC_TGETBlj_BC_TSETVlj_BC_TSETSlj_tab_newkeylj_BC_TSETBlj_BC_TSETMlj_tab_reasizelj_BC_CALLMlj_BC_CALLlj_BC_CALLMTlj_BC_CALLTlj_BC_ITERClj_BC_ITERNlj_BC_VARGlj_state_growstacklj_BC_ISNEXTlj_BC_RETMlj_BC_RETlj_BC_RET0lj_BC_RET1lj_BC_FORIlj_BC_JFORIlj_BC_FORLlj_BC_IFORLlj_BC_JFORLlj_BC_ITERLlj_BC_IITERLlj_BC_JITERLlj_BC_LOOPlj_BC_ILOOPlj_BC_JLOOPlj_BC_JMPlj_BC_FUNCFlj_BC_IFUNCFlj_BC_JFUNCFlj_BC_FUNCVlj_BC_IFUNCVlj_BC_JFUNCVlj_BC_FUNCClj_BC_FUNCCWlj_vm_returnplj_vm_returnclj_vm_returnlj_vm_leave_cplj_vm_leave_unwlj_vm_unwind_yieldlj_vm_unwind_clj_vm_unwind_c_ehlj_vm_unwind_rethrowlj_err_throwlj_vm_unwind_fflj_vm_unwind_ff_ehlj_vm_growstack_clj_vm_growstack_vlj_vm_growstack_flj_vm_resumelj_vm_pcalllj_vm_calllj_vm_call_dispatchlj_vm_call_dispatch_flj_vm_cpcalllj_cont_dispatchlj_cont_catlj_vmeta_tgetslj_vmeta_tgetblj_vmeta_tgetvlj_meta_tgetlj_cont_ralj_vmeta_tsetslj_vmeta_tsetblj_vmeta_tsetvlj_meta_tsetlj_cont_noplj_vmeta_complj_meta_complj_cont_condtlj_cont_condflj_vmeta_equallj_meta_equallj_vmeta_equal_cdlj_meta_equal_cdlj_vmeta_arith_vnolj_vmeta_arith_vnlj_vmeta_arith_nvolj_vmeta_arith_nvlj_vmeta_unmlj_vmeta_arith_vvolj_vmeta_arith_vvlj_meta_arithlj_vmeta_binoplj_vmeta_lenlj_meta_lenlj_vmeta_call_ralj_vmeta_calllj_meta_calllj_vmeta_forlj_meta_forlj_ff_assertlj_ff_typelj_ff_getmetatablelj_ff_setmetatablelj_ff_rawgetlj_tab_getlj_ff_tonumberlj_ff_tostringlj_str_fromnumlj_ff_nextlj_tab_nextlj_fff_res2lj_ff_pairslj_ff_ipairs_auxlj_tab_getinthlj_fff_res0lj_ff_ipairslj_ff_pcalllj_ff_xpcalllj_ff_coroutine_resumelj_ff_coroutine_wrap_auxlj_ffh_coroutine_wrap_errlj_ff_coroutine_yieldlj_fff_resilj_fff_resnlj_ff_math_abslj_fff_resxmm0lj_fff_res1lj_fff_reslj_fff_res_lj_ff_math_floorlj_ff_math_ceillj_ff_math_sqrtlj_ff_math_loglj_ff_math_log10lj_ff_math_explj_ff_math_sinlj_ff_math_coslj_ff_math_tanlj_ff_math_asinlj_ff_math_acoslj_ff_math_atanlj_ff_math_sinhlj_vm_sinhlj_ff_math_coshlj_vm_coshlj_ff_math_tanhlj_vm_tanhlj_ff_math_deglj_ff_math_radlj_ff_math_atan2lj_ff_math_ldexplj_ff_math_frexplj_ff_math_modflj_ff_math_fmodlj_ff_math_powlj_ff_math_minlj_ff_math_maxlj_ff_string_lenlj_ff_string_bytelj_ff_string_charlj_fff_newstrlj_str_newlj_ff_string_sublj_fff_emptystrlj_ff_string_replj_ff_string_reverselj_ff_string_lowerlj_ff_string_upperlj_ff_table_getnlj_ff_bit_tobitlj_ff_bit_bandlj_ff_bit_borlj_ff_bit_bxorlj_ff_bit_bswaplj_ff_bit_bnotlj_fff_resbitlj_fff_fallback_bit_oplj_ff_bit_lshiftlj_ff_bit_rshiftlj_ff_bit_arshiftlj_ff_bit_rollj_ff_bit_rorlj_fff_fallback_2lj_fff_fallback_1lj_fff_fallbacklj_vm_call_taillj_fff_gcsteplj_gc_steplj_vm_recordlj_vm_rethooklj_vm_inshooklj_dispatch_inslj_cont_hooklj_vm_hotlooplj_trace_hotlj_vm_callhooklj_vm_hotcalllj_dispatch_calllj_vm_exit_handlerlj_trace_exitlj_vm_exit_interplj_vm_floorlj_vm_floor_sselj_vm_ceillj_vm_ceil_sselj_vm_trunclj_vm_trunc_sselj_vm_modlj_vm_log2lj_vm_exp_x87lj_vm_exp2_x87lj_vm_exp2rawlj_vm_powlj_vm_pow_sselj_vm_powi_sselj_vm_foldfpmlj_vm_foldarithlj_vm_cpuidlj_assert_bad_for_arg_typelj_vm_ffi_callbacklj_ccallback_enterlj_cont_ffi_callbacklj_ccallback_leavelj_vm_ffi_calllj_err_unwind_dwarf0? 9 9 >, @ B C E CM-PXxX{XijQ{| !J!+"#X$$X\'''*s-p1X12V2 |2 33{8$,9&  D H'((`'tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lauxlib.h0000664000000000000000000001356612202141143022202 0ustar rootroot/* ** $Id: lauxlib.h,v 1.88.1.1 2007/12/27 13:02:25 roberto Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ #ifndef lauxlib_h #define lauxlib_h #include #include #include "lua.h" #define luaL_getn(L,i) ((int)lua_objlen(L, i)) #define luaL_setn(L,i,j) ((void)0) /* no op! */ /* extra error code for `luaL_load' */ #define LUA_ERRFILE (LUA_ERRERR+1) typedef struct luaL_Reg { const char *name; lua_CFunction func; } luaL_Reg; LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname, const luaL_Reg *l, int nup); LUALIB_API void (luaL_register) (lua_State *L, const char *libname, const luaL_Reg *l); LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname); LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, size_t *l); LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg, const char *def, size_t *l); LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg); LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def); LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg); LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg, lua_Integer def); LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg); LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t); LUALIB_API void (luaL_checkany) (lua_State *L, int narg); LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); LUALIB_API void (luaL_where) (lua_State *L, int lvl); LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, const char *const lst[]); LUALIB_API int (luaL_ref) (lua_State *L, int t); LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename); LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, const char *name); LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); LUALIB_API lua_State *(luaL_newstate) (void); LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, const char *r); LUALIB_API const char *(luaL_findtable) (lua_State *L, int idx, const char *fname, int szhint); /* From Lua 5.2. */ LUALIB_API int luaL_fileresult(lua_State *L, int stat, const char *fname); LUALIB_API int luaL_execresult(lua_State *L, int stat); LUALIB_API int (luaL_loadfilex) (lua_State *L, const char *filename, const char *mode); LUALIB_API int (luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode); LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, const char *msg, int level); /* ** =============================================================== ** some useful macros ** =============================================================== */ #define luaL_argcheck(L, cond,numarg,extramsg) \ ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) #define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) #define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) #define luaL_dofile(L, fn) \ (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) #define luaL_dostring(L, s) \ (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) #define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) /* ** {====================================================== ** Generic Buffer manipulation ** ======================================================= */ typedef struct luaL_Buffer { char *p; /* current position in buffer */ int lvl; /* number of strings in the stack (level) */ lua_State *L; char buffer[LUAL_BUFFERSIZE]; } luaL_Buffer; #define luaL_addchar(B,c) \ ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \ (*(B)->p++ = (char)(c))) /* compatibility only */ #define luaL_putchar(B,c) luaL_addchar(B,c) #define luaL_addsize(B,n) ((B)->p += (n)) LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); LUALIB_API char *(luaL_prepbuffer) (luaL_Buffer *B); LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); LUALIB_API void (luaL_addvalue) (luaL_Buffer *B); LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); /* }====================================================== */ /* compatibility with ref system */ /* pre-defined references */ #define LUA_NOREF (-2) #define LUA_REFNIL (-1) #define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \ (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0)) #define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) #define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref)) #define luaL_reg luaL_Reg #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ff.h0000664000000000000000000000055412202141143021613 0ustar rootroot/* ** Fast function IDs. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #ifndef _LJ_FF_H #define _LJ_FF_H /* Fast function ID. */ typedef enum { FF_LUA_ = FF_LUA, /* Lua function (must be 0). */ FF_C_ = FF_C, /* Regular C function (must be 1). */ #define FFDEF(name) FF_##name, #include "lj_ffdef.h" FF__MAX } FastFunc; #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_func.c0000664000000000000000000001307112202141143022144 0ustar rootroot/* ** Function handling (prototypes, functions and upvalues). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ** ** Portions taken verbatim or adapted from the Lua interpreter. ** Copyright (C) 1994-2008 Lua.org, PUC-Rio. See Copyright Notice in lua.h */ #define lj_func_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_func.h" #include "lj_trace.h" #include "lj_vm.h" /* -- Prototypes ---------------------------------------------------------- */ void LJ_FASTCALL lj_func_freeproto(global_State *g, GCproto *pt) { lj_mem_free(g, pt, pt->sizept); } /* -- Upvalues ------------------------------------------------------------ */ static void unlinkuv(GCupval *uv) { lua_assert(uvprev(uvnext(uv)) == uv && uvnext(uvprev(uv)) == uv); setgcrefr(uvnext(uv)->prev, uv->prev); setgcrefr(uvprev(uv)->next, uv->next); } /* Find existing open upvalue for a stack slot or create a new one. */ static GCupval *func_finduv(lua_State *L, TValue *slot) { global_State *g = G(L); GCRef *pp = &L->openupval; GCupval *p; GCupval *uv; /* Search the sorted list of open upvalues. */ while (gcref(*pp) != NULL && uvval((p = gco2uv(gcref(*pp)))) >= slot) { lua_assert(!p->closed && uvval(p) != &p->tv); if (uvval(p) == slot) { /* Found open upvalue pointing to same slot? */ if (isdead(g, obj2gco(p))) /* Resurrect it, if it's dead. */ flipwhite(obj2gco(p)); return p; } pp = &p->nextgc; } /* No matching upvalue found. Create a new one. */ uv = lj_mem_newt(L, sizeof(GCupval), GCupval); newwhite(g, uv); uv->gct = ~LJ_TUPVAL; uv->closed = 0; /* Still open. */ setmref(uv->v, slot); /* Pointing to the stack slot. */ /* NOBARRIER: The GCupval is new (marked white) and open. */ setgcrefr(uv->nextgc, *pp); /* Insert into sorted list of open upvalues. */ setgcref(*pp, obj2gco(uv)); setgcref(uv->prev, obj2gco(&g->uvhead)); /* Insert into GC list, too. */ setgcrefr(uv->next, g->uvhead.next); setgcref(uvnext(uv)->prev, obj2gco(uv)); setgcref(g->uvhead.next, obj2gco(uv)); lua_assert(uvprev(uvnext(uv)) == uv && uvnext(uvprev(uv)) == uv); return uv; } /* Create an empty and closed upvalue. */ static GCupval *func_emptyuv(lua_State *L) { GCupval *uv = (GCupval *)lj_mem_newgco(L, sizeof(GCupval)); uv->gct = ~LJ_TUPVAL; uv->closed = 1; setnilV(&uv->tv); setmref(uv->v, &uv->tv); return uv; } /* Close all open upvalues pointing to some stack level or above. */ void LJ_FASTCALL lj_func_closeuv(lua_State *L, TValue *level) { GCupval *uv; global_State *g = G(L); while (gcref(L->openupval) != NULL && uvval((uv = gco2uv(gcref(L->openupval)))) >= level) { GCobj *o = obj2gco(uv); lua_assert(!isblack(o) && !uv->closed && uvval(uv) != &uv->tv); setgcrefr(L->openupval, uv->nextgc); /* No longer in open list. */ if (isdead(g, o)) { lj_func_freeuv(g, uv); } else { unlinkuv(uv); lj_gc_closeuv(g, uv); } } } void LJ_FASTCALL lj_func_freeuv(global_State *g, GCupval *uv) { if (!uv->closed) unlinkuv(uv); lj_mem_freet(g, uv); } /* -- Functions (closures) ------------------------------------------------ */ GCfunc *lj_func_newC(lua_State *L, MSize nelems, GCtab *env) { GCfunc *fn = (GCfunc *)lj_mem_newgco(L, sizeCfunc(nelems)); fn->c.gct = ~LJ_TFUNC; fn->c.ffid = FF_C; fn->c.nupvalues = (uint8_t)nelems; /* NOBARRIER: The GCfunc is new (marked white). */ setmref(fn->c.pc, &G(L)->bc_cfunc_ext); setgcref(fn->c.env, obj2gco(env)); return fn; } static GCfunc *func_newL(lua_State *L, GCproto *pt, GCtab *env) { uint32_t count; GCfunc *fn = (GCfunc *)lj_mem_newgco(L, sizeLfunc((MSize)pt->sizeuv)); fn->l.gct = ~LJ_TFUNC; fn->l.ffid = FF_LUA; fn->l.nupvalues = 0; /* Set to zero until upvalues are initialized. */ /* NOBARRIER: Really a setgcref. But the GCfunc is new (marked white). */ setmref(fn->l.pc, proto_bc(pt)); setgcref(fn->l.env, obj2gco(env)); /* Saturating 3 bit counter (0..7) for created closures. */ count = (uint32_t)pt->flags + PROTO_CLCOUNT; pt->flags = (uint8_t)(count - ((count >> PROTO_CLC_BITS) & PROTO_CLCOUNT)); return fn; } /* Create a new Lua function with empty upvalues. */ GCfunc *lj_func_newL_empty(lua_State *L, GCproto *pt, GCtab *env) { GCfunc *fn = func_newL(L, pt, env); MSize i, nuv = pt->sizeuv; /* NOBARRIER: The GCfunc is new (marked white). */ for (i = 0; i < nuv; i++) { GCupval *uv = func_emptyuv(L); uv->dhash = (uint32_t)(uintptr_t)pt ^ ((uint32_t)proto_uv(pt)[i] << 24); setgcref(fn->l.uvptr[i], obj2gco(uv)); } fn->l.nupvalues = (uint8_t)nuv; return fn; } /* Do a GC check and create a new Lua function with inherited upvalues. */ GCfunc *lj_func_newL_gc(lua_State *L, GCproto *pt, GCfuncL *parent) { GCfunc *fn; GCRef *puv; MSize i, nuv; TValue *base; lj_gc_check_fixtop(L); fn = func_newL(L, pt, tabref(parent->env)); /* NOBARRIER: The GCfunc is new (marked white). */ puv = parent->uvptr; nuv = pt->sizeuv; base = L->base; for (i = 0; i < nuv; i++) { uint32_t v = proto_uv(pt)[i]; GCupval *uv; if ((v & PROTO_UV_LOCAL)) { uv = func_finduv(L, base + (v & 0xff)); uv->immutable = ((v / PROTO_UV_IMMUTABLE) & 1); uv->dhash = (uint32_t)(uintptr_t)mref(parent->pc, char) ^ (v << 24); } else { uv = &gcref(puv[v])->uv; } setgcref(fn->l.uvptr[i], obj2gco(uv)); } fn->l.nupvalues = (uint8_t)nuv; return fn; } void LJ_FASTCALL lj_func_free(global_State *g, GCfunc *fn) { MSize size = isluafunc(fn) ? sizeLfunc((MSize)fn->l.nupvalues) : sizeCfunc((MSize)fn->c.nupvalues); lj_mem_free(g, fn, size); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_traceerr.h0000664000000000000000000000405712202141143023031 0ustar rootroot/* ** Trace compiler error messages. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ /* This file may be included multiple times with different TREDEF macros. */ /* Recording. */ TREDEF(RECERR, "error thrown or hook called during recording") TREDEF(TRACEOV, "trace too long") TREDEF(STACKOV, "trace too deep") TREDEF(SNAPOV, "too many snapshots") TREDEF(BLACKL, "blacklisted") TREDEF(NYIBC, "NYI: bytecode %d") /* Recording loop ops. */ TREDEF(LLEAVE, "leaving loop in root trace") TREDEF(LINNER, "inner loop in root trace") TREDEF(LUNROLL, "loop unroll limit reached") /* Recording calls/returns. */ TREDEF(BADTYPE, "bad argument type") TREDEF(CJITOFF, "call to JIT-disabled function") TREDEF(CUNROLL, "call unroll limit reached") TREDEF(DOWNREC, "down-recursion, restarting") TREDEF(NYICF, "NYI: C function %p") TREDEF(NYIFF, "NYI: FastFunc %s") TREDEF(NYIFFU, "NYI: unsupported variant of FastFunc %s") TREDEF(NYIRETL, "NYI: return to lower frame") /* Recording indexed load/store. */ TREDEF(STORENN, "store with nil or NaN key") TREDEF(NOMM, "missing metamethod") TREDEF(IDXLOOP, "looping index lookup") TREDEF(NYITMIX, "NYI: mixed sparse/dense table") /* Recording C data operations. */ TREDEF(NOCACHE, "symbol not in cache") TREDEF(NYICONV, "NYI: unsupported C type conversion") TREDEF(NYICALL, "NYI: unsupported C function type") /* Optimizations. */ TREDEF(GFAIL, "guard would always fail") TREDEF(PHIOV, "too many PHIs") TREDEF(TYPEINS, "persistent type instability") /* Assembler. */ TREDEF(MCODEAL, "failed to allocate mcode memory") TREDEF(MCODEOV, "machine code too long") TREDEF(MCODELM, "hit mcode limit (retrying)") TREDEF(SPILLOV, "too many spill slots") TREDEF(BADRA, "inconsistent register allocation") TREDEF(NYIIR, "NYI: cannot assemble IR instruction %d") TREDEF(NYIPHI, "NYI: PHI shuffling too complex") TREDEF(NYICOAL, "NYI: register coalescing too complex") #undef TREDEF /* Detecting unused error messages: awk -F, '/^TREDEF/ { gsub(/TREDEF./, ""); printf "grep -q LJ_TRERR_%s *.[ch] || echo %s\n", $1, $1}' lj_traceerr.h | sh */ tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_opt_narrow.c0000664000000000000000000006152312202141143023410 0ustar rootroot/* ** NARROW: Narrowing of numbers to integers (double to int32_t). ** STRIPOV: Stripping of overflow checks. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_opt_narrow_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_bc.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_iropt.h" #include "lj_trace.h" #include "lj_vm.h" #include "lj_strscan.h" /* Rationale for narrowing optimizations: ** ** Lua has only a single number type and this is a FP double by default. ** Narrowing doubles to integers does not pay off for the interpreter on a ** current-generation x86/x64 machine. Most FP operations need the same ** amount of execution resources as their integer counterparts, except ** with slightly longer latencies. Longer latencies are a non-issue for ** the interpreter, since they are usually hidden by other overhead. ** ** The total CPU execution bandwidth is the sum of the bandwidth of the FP ** and the integer units, because they execute in parallel. The FP units ** have an equal or higher bandwidth than the integer units. Not using ** them means losing execution bandwidth. Moving work away from them to ** the already quite busy integer units is a losing proposition. ** ** The situation for JIT-compiled code is a bit different: the higher code ** density makes the extra latencies much more visible. Tight loops expose ** the latencies for updating the induction variables. Array indexing ** requires narrowing conversions with high latencies and additional ** guards (to check that the index is really an integer). And many common ** optimizations only work on integers. ** ** One solution would be speculative, eager narrowing of all number loads. ** This causes many problems, like losing -0 or the need to resolve type ** mismatches between traces. It also effectively forces the integer type ** to have overflow-checking semantics. This impedes many basic ** optimizations and requires adding overflow checks to all integer ** arithmetic operations (whereas FP arithmetics can do without). ** ** Always replacing an FP op with an integer op plus an overflow check is ** counter-productive on a current-generation super-scalar CPU. Although ** the overflow check branches are highly predictable, they will clog the ** execution port for the branch unit and tie up reorder buffers. This is ** turning a pure data-flow dependency into a different data-flow ** dependency (with slightly lower latency) *plus* a control dependency. ** In general, you don't want to do this since latencies due to data-flow ** dependencies can be well hidden by out-of-order execution. ** ** A better solution is to keep all numbers as FP values and only narrow ** when it's beneficial to do so. LuaJIT uses predictive narrowing for ** induction variables and demand-driven narrowing for index expressions, ** integer arguments and bit operations. Additionally it can eliminate or ** hoist most of the resulting overflow checks. Regular arithmetic ** computations are never narrowed to integers. ** ** The integer type in the IR has convenient wrap-around semantics and ** ignores overflow. Extra operations have been added for ** overflow-checking arithmetic (ADDOV/SUBOV) instead of an extra type. ** Apart from reducing overall complexity of the compiler, this also ** nicely solves the problem where you want to apply algebraic ** simplifications to ADD, but not to ADDOV. And the x86/x64 assembler can ** use lea instead of an add for integer ADD, but not for ADDOV (lea does ** not affect the flags, but it helps to avoid register moves). ** ** ** All of the above has to be reconsidered for architectures with slow FP ** operations or without a hardware FPU. The dual-number mode of LuaJIT ** addresses this issue. Arithmetic operations are performed on integers ** as far as possible and overflow checks are added as needed. ** ** This implies that narrowing for integer arguments and bit operations ** should also strip overflow checks, e.g. replace ADDOV with ADD. The ** original overflow guards are weak and can be eliminated by DCE, if ** there's no other use. ** ** A slight twist is that it's usually beneficial to use overflow-checked ** integer arithmetics if all inputs are already integers. This is the only ** change that affects the single-number mode, too. */ /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) #define fins (&J->fold.ins) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) #define emitir_raw(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_ir_emit(J)) /* -- Elimination of narrowing type conversions --------------------------- */ /* Narrowing of index expressions and bit operations is demand-driven. The ** trace recorder emits a narrowing type conversion (CONV.int.num or TOBIT) ** in all of these cases (e.g. array indexing or string indexing). FOLD ** already takes care of eliminating simple redundant conversions like ** CONV.int.num(CONV.num.int(x)) ==> x. ** ** But the surrounding code is FP-heavy and arithmetic operations are ** performed on FP numbers (for the single-number mode). Consider a common ** example such as 'x=t[i+1]', with 'i' already an integer (due to induction ** variable narrowing). The index expression would be recorded as ** CONV.int.num(ADD(CONV.num.int(i), 1)) ** which is clearly suboptimal. ** ** One can do better by recursively backpropagating the narrowing type ** conversion across FP arithmetic operations. This turns FP ops into ** their corresponding integer counterparts. Depending on the semantics of ** the conversion they also need to check for overflow. Currently only ADD ** and SUB are supported. ** ** The above example can be rewritten as ** ADDOV(CONV.int.num(CONV.num.int(i)), 1) ** and then into ADDOV(i, 1) after folding of the conversions. The original ** FP ops remain in the IR and are eliminated by DCE since all references to ** them are gone. ** ** [In dual-number mode the trace recorder already emits ADDOV etc., but ** this can be further reduced. See below.] ** ** Special care has to be taken to avoid narrowing across an operation ** which is potentially operating on non-integral operands. One obvious ** case is when an expression contains a non-integral constant, but ends ** up as an integer index at runtime (like t[x+1.5] with x=0.5). ** ** Operations with two non-constant operands illustrate a similar problem ** (like t[a+b] with a=1.5 and b=2.5). Backpropagation has to stop there, ** unless it can be proven that either operand is integral (e.g. by CSEing ** a previous conversion). As a not-so-obvious corollary this logic also ** applies for a whole expression tree (e.g. t[(a+1)+(b+1)]). ** ** Correctness of the transformation is guaranteed by avoiding to expand ** the tree by adding more conversions than the one we would need to emit ** if not backpropagating. TOBIT employs a more optimistic rule, because ** the conversion has special semantics, designed to make the life of the ** compiler writer easier. ;-) ** ** Using on-the-fly backpropagation of an expression tree doesn't work ** because it's unknown whether the transform is correct until the end. ** This either requires IR rollback and cache invalidation for every ** subtree or a two-pass algorithm. The former didn't work out too well, ** so the code now combines a recursive collector with a stack-based ** emitter. ** ** [A recursive backpropagation algorithm with backtracking, employing ** skip-list lookup and round-robin caching, emitting stack operations ** on-the-fly for a stack-based interpreter -- and all of that in a meager ** kilobyte? Yep, compilers are a great treasure chest. Throw away your ** textbooks and read the codebase of a compiler today!] ** ** There's another optimization opportunity for array indexing: it's ** always accompanied by an array bounds-check. The outermost overflow ** check may be delegated to the ABC operation. This works because ABC is ** an unsigned comparison and wrap-around due to overflow creates negative ** numbers. ** ** But this optimization is only valid for constants that cannot overflow ** an int32_t into the range of valid array indexes [0..2^27+1). A check ** for +-2^30 is safe since -2^31 - 2^30 wraps to 2^30 and 2^31-1 + 2^30 ** wraps to -2^30-1. ** ** It's also good enough in practice, since e.g. t[i+1] or t[i-10] are ** quite common. So the above example finally ends up as ADD(i, 1)! ** ** Later on, the assembler is able to fuse the whole array reference and ** the ADD into the memory operands of loads and other instructions. This ** is why LuaJIT is able to generate very pretty (and fast) machine code ** for array indexing. And that, my dear, concludes another story about ** one of the hidden secrets of LuaJIT ... */ /* Maximum backpropagation depth and maximum stack size. */ #define NARROW_MAX_BACKPROP 100 #define NARROW_MAX_STACK 256 /* The stack machine has a 32 bit instruction format: [IROpT | IRRef1] ** The lower 16 bits hold a reference (or 0). The upper 16 bits hold ** the IR opcode + type or one of the following special opcodes: */ enum { NARROW_REF, /* Push ref. */ NARROW_CONV, /* Push conversion of ref. */ NARROW_SEXT, /* Push sign-extension of ref. */ NARROW_INT /* Push KINT ref. The next code holds an int32_t. */ }; typedef uint32_t NarrowIns; #define NARROWINS(op, ref) (((op) << 16) + (ref)) #define narrow_op(ins) ((IROpT)((ins) >> 16)) #define narrow_ref(ins) ((IRRef1)(ins)) /* Context used for narrowing of type conversions. */ typedef struct NarrowConv { jit_State *J; /* JIT compiler state. */ NarrowIns *sp; /* Current stack pointer. */ NarrowIns *maxsp; /* Maximum stack pointer minus redzone. */ int lim; /* Limit on the number of emitted conversions. */ IRRef mode; /* Conversion mode (IRCONV_*). */ IRType t; /* Destination type: IRT_INT or IRT_I64. */ NarrowIns stack[NARROW_MAX_STACK]; /* Stack holding stack-machine code. */ } NarrowConv; /* Lookup a reference in the backpropagation cache. */ static BPropEntry *narrow_bpc_get(jit_State *J, IRRef1 key, IRRef mode) { ptrdiff_t i; for (i = 0; i < BPROP_SLOTS; i++) { BPropEntry *bp = &J->bpropcache[i]; /* Stronger checks are ok, too. */ if (bp->key == key && bp->mode >= mode && ((bp->mode ^ mode) & IRCONV_MODEMASK) == 0) return bp; } return NULL; } /* Add an entry to the backpropagation cache. */ static void narrow_bpc_set(jit_State *J, IRRef1 key, IRRef1 val, IRRef mode) { uint32_t slot = J->bpropslot; BPropEntry *bp = &J->bpropcache[slot]; J->bpropslot = (slot + 1) & (BPROP_SLOTS-1); bp->key = key; bp->val = val; bp->mode = mode; } /* Backpropagate overflow stripping. */ static void narrow_stripov_backprop(NarrowConv *nc, IRRef ref, int depth) { jit_State *J = nc->J; IRIns *ir = IR(ref); if (ir->o == IR_ADDOV || ir->o == IR_SUBOV || (ir->o == IR_MULOV && (nc->mode & IRCONV_CONVMASK) == IRCONV_ANY)) { BPropEntry *bp = narrow_bpc_get(nc->J, ref, IRCONV_TOBIT); if (bp) { ref = bp->val; } else if (++depth < NARROW_MAX_BACKPROP && nc->sp < nc->maxsp) { narrow_stripov_backprop(nc, ir->op1, depth); narrow_stripov_backprop(nc, ir->op2, depth); *nc->sp++ = NARROWINS(IRT(ir->o - IR_ADDOV + IR_ADD, IRT_INT), ref); return; } } *nc->sp++ = NARROWINS(NARROW_REF, ref); } /* Backpropagate narrowing conversion. Return number of needed conversions. */ static int narrow_conv_backprop(NarrowConv *nc, IRRef ref, int depth) { jit_State *J = nc->J; IRIns *ir = IR(ref); IRRef cref; /* Check the easy cases first. */ if (ir->o == IR_CONV && (ir->op2 & IRCONV_SRCMASK) == IRT_INT) { if ((nc->mode & IRCONV_CONVMASK) <= IRCONV_ANY) narrow_stripov_backprop(nc, ir->op1, depth+1); else *nc->sp++ = NARROWINS(NARROW_REF, ir->op1); /* Undo conversion. */ if (nc->t == IRT_I64) *nc->sp++ = NARROWINS(NARROW_SEXT, 0); /* Sign-extend integer. */ return 0; } else if (ir->o == IR_KNUM) { /* Narrow FP constant. */ lua_Number n = ir_knum(ir)->n; if ((nc->mode & IRCONV_CONVMASK) == IRCONV_TOBIT) { /* Allows a wider range of constants. */ int64_t k64 = (int64_t)n; if (n == (lua_Number)k64) { /* Only if const doesn't lose precision. */ *nc->sp++ = NARROWINS(NARROW_INT, 0); *nc->sp++ = (NarrowIns)k64; /* But always truncate to 32 bits. */ return 0; } } else { int32_t k = lj_num2int(n); /* Only if constant is a small integer. */ if (checki16(k) && n == (lua_Number)k) { *nc->sp++ = NARROWINS(NARROW_INT, 0); *nc->sp++ = (NarrowIns)k; return 0; } } return 10; /* Never narrow other FP constants (this is rare). */ } /* Try to CSE the conversion. Stronger checks are ok, too. */ cref = J->chain[fins->o]; while (cref > ref) { IRIns *cr = IR(cref); if (cr->op1 == ref && (fins->o == IR_TOBIT || ((cr->op2 & IRCONV_MODEMASK) == (nc->mode & IRCONV_MODEMASK) && irt_isguard(cr->t) >= irt_isguard(fins->t)))) { *nc->sp++ = NARROWINS(NARROW_REF, cref); return 0; /* Already there, no additional conversion needed. */ } cref = cr->prev; } /* Backpropagate across ADD/SUB. */ if (ir->o == IR_ADD || ir->o == IR_SUB) { /* Try cache lookup first. */ IRRef mode = nc->mode; BPropEntry *bp; /* Inner conversions need a stronger check. */ if ((mode & IRCONV_CONVMASK) == IRCONV_INDEX && depth > 0) mode += IRCONV_CHECK-IRCONV_INDEX; bp = narrow_bpc_get(nc->J, (IRRef1)ref, mode); if (bp) { *nc->sp++ = NARROWINS(NARROW_REF, bp->val); return 0; } else if (nc->t == IRT_I64) { /* Try sign-extending from an existing (checked) conversion to int. */ mode = (IRT_INT<<5)|IRT_NUM|IRCONV_INDEX; bp = narrow_bpc_get(nc->J, (IRRef1)ref, mode); if (bp) { *nc->sp++ = NARROWINS(NARROW_REF, bp->val); *nc->sp++ = NARROWINS(NARROW_SEXT, 0); return 0; } } if (++depth < NARROW_MAX_BACKPROP && nc->sp < nc->maxsp) { NarrowIns *savesp = nc->sp; int count = narrow_conv_backprop(nc, ir->op1, depth); count += narrow_conv_backprop(nc, ir->op2, depth); if (count <= nc->lim) { /* Limit total number of conversions. */ *nc->sp++ = NARROWINS(IRT(ir->o, nc->t), ref); return count; } nc->sp = savesp; /* Too many conversions, need to backtrack. */ } } /* Otherwise add a conversion. */ *nc->sp++ = NARROWINS(NARROW_CONV, ref); return 1; } /* Emit the conversions collected during backpropagation. */ static IRRef narrow_conv_emit(jit_State *J, NarrowConv *nc) { /* The fins fields must be saved now -- emitir() overwrites them. */ IROpT guardot = irt_isguard(fins->t) ? IRTG(IR_ADDOV-IR_ADD, 0) : 0; IROpT convot = fins->ot; IRRef1 convop2 = fins->op2; NarrowIns *next = nc->stack; /* List of instructions from backpropagation. */ NarrowIns *last = nc->sp; NarrowIns *sp = nc->stack; /* Recycle the stack to store operands. */ while (next < last) { /* Simple stack machine to process the ins. list. */ NarrowIns ref = *next++; IROpT op = narrow_op(ref); if (op == NARROW_REF) { *sp++ = ref; } else if (op == NARROW_CONV) { *sp++ = emitir_raw(convot, ref, convop2); /* Raw emit avoids a loop. */ } else if (op == NARROW_SEXT) { lua_assert(sp >= nc->stack+1); sp[-1] = emitir(IRT(IR_CONV, IRT_I64), sp[-1], (IRT_I64<<5)|IRT_INT|IRCONV_SEXT); } else if (op == NARROW_INT) { lua_assert(next < last); *sp++ = nc->t == IRT_I64 ? lj_ir_kint64(J, (int64_t)(int32_t)*next++) : lj_ir_kint(J, *next++); } else { /* Regular IROpT. Pops two operands and pushes one result. */ IRRef mode = nc->mode; lua_assert(sp >= nc->stack+2); sp--; /* Omit some overflow checks for array indexing. See comments above. */ if ((mode & IRCONV_CONVMASK) == IRCONV_INDEX) { if (next == last && irref_isk(narrow_ref(sp[0])) && (uint32_t)IR(narrow_ref(sp[0]))->i + 0x40000000u < 0x80000000u) guardot = 0; else /* Otherwise cache a stronger check. */ mode += IRCONV_CHECK-IRCONV_INDEX; } sp[-1] = emitir(op+guardot, sp[-1], sp[0]); /* Add to cache. */ if (narrow_ref(ref)) narrow_bpc_set(J, narrow_ref(ref), narrow_ref(sp[-1]), mode); } } lua_assert(sp == nc->stack+1); return nc->stack[0]; } /* Narrow a type conversion of an arithmetic operation. */ TRef LJ_FASTCALL lj_opt_narrow_convert(jit_State *J) { if ((J->flags & JIT_F_OPT_NARROW)) { NarrowConv nc; nc.J = J; nc.sp = nc.stack; nc.maxsp = &nc.stack[NARROW_MAX_STACK-4]; nc.t = irt_type(fins->t); if (fins->o == IR_TOBIT) { nc.mode = IRCONV_TOBIT; /* Used only in the backpropagation cache. */ nc.lim = 2; /* TOBIT can use a more optimistic rule. */ } else { nc.mode = fins->op2; nc.lim = 1; } if (narrow_conv_backprop(&nc, fins->op1, 0) <= nc.lim) return narrow_conv_emit(J, &nc); } return NEXTFOLD; } /* -- Narrowing of implicit conversions ----------------------------------- */ /* Recursively strip overflow checks. */ static TRef narrow_stripov(jit_State *J, TRef tr, int lastop, IRRef mode) { IRRef ref = tref_ref(tr); IRIns *ir = IR(ref); int op = ir->o; if (op >= IR_ADDOV && op <= lastop) { BPropEntry *bp = narrow_bpc_get(J, ref, mode); if (bp) { return TREF(bp->val, irt_t(IR(bp->val)->t)); } else { IRRef op1 = ir->op1, op2 = ir->op2; /* The IR may be reallocated. */ op1 = narrow_stripov(J, op1, lastop, mode); op2 = narrow_stripov(J, op2, lastop, mode); tr = emitir(IRT(op - IR_ADDOV + IR_ADD, ((mode & IRCONV_DSTMASK) >> IRCONV_DSH)), op1, op2); narrow_bpc_set(J, ref, tref_ref(tr), mode); } } else if (LJ_64 && (mode & IRCONV_SEXT) && !irt_is64(ir->t)) { tr = emitir(IRT(IR_CONV, IRT_INTP), tr, mode); } return tr; } /* Narrow array index. */ TRef LJ_FASTCALL lj_opt_narrow_index(jit_State *J, TRef tr) { IRIns *ir; lua_assert(tref_isnumber(tr)); if (tref_isnum(tr)) /* Conversion may be narrowed, too. See above. */ return emitir(IRTGI(IR_CONV), tr, IRCONV_INT_NUM|IRCONV_INDEX); /* Omit some overflow checks for array indexing. See comments above. */ ir = IR(tref_ref(tr)); if ((ir->o == IR_ADDOV || ir->o == IR_SUBOV) && irref_isk(ir->op2) && (uint32_t)IR(ir->op2)->i + 0x40000000u < 0x80000000u) return emitir(IRTI(ir->o - IR_ADDOV + IR_ADD), ir->op1, ir->op2); return tr; } /* Narrow conversion to integer operand (overflow undefined). */ TRef LJ_FASTCALL lj_opt_narrow_toint(jit_State *J, TRef tr) { if (tref_isstr(tr)) tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0); if (tref_isnum(tr)) /* Conversion may be narrowed, too. See above. */ return emitir(IRTI(IR_CONV), tr, IRCONV_INT_NUM|IRCONV_ANY); if (!tref_isinteger(tr)) lj_trace_err(J, LJ_TRERR_BADTYPE); /* ** Undefined overflow semantics allow stripping of ADDOV, SUBOV and MULOV. ** Use IRCONV_TOBIT for the cache entries, since the semantics are the same. */ return narrow_stripov(J, tr, IR_MULOV, (IRT_INT<<5)|IRT_INT|IRCONV_TOBIT); } /* Narrow conversion to bitop operand (overflow wrapped). */ TRef LJ_FASTCALL lj_opt_narrow_tobit(jit_State *J, TRef tr) { if (tref_isstr(tr)) tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0); if (tref_isnum(tr)) /* Conversion may be narrowed, too. See above. */ return emitir(IRTI(IR_TOBIT), tr, lj_ir_knum_tobit(J)); if (!tref_isinteger(tr)) lj_trace_err(J, LJ_TRERR_BADTYPE); /* ** Wrapped overflow semantics allow stripping of ADDOV and SUBOV. ** MULOV cannot be stripped due to precision widening. */ return narrow_stripov(J, tr, IR_SUBOV, (IRT_INT<<5)|IRT_INT|IRCONV_TOBIT); } #if LJ_HASFFI /* Narrow C array index (overflow undefined). */ TRef LJ_FASTCALL lj_opt_narrow_cindex(jit_State *J, TRef tr) { lua_assert(tref_isnumber(tr)); if (tref_isnum(tr)) return emitir(IRT(IR_CONV, IRT_INTP), tr, (IRT_INTP<<5)|IRT_NUM|IRCONV_TRUNC|IRCONV_ANY); /* Undefined overflow semantics allow stripping of ADDOV, SUBOV and MULOV. */ return narrow_stripov(J, tr, IR_MULOV, LJ_64 ? ((IRT_INTP<<5)|IRT_INT|IRCONV_SEXT) : ((IRT_INTP<<5)|IRT_INT|IRCONV_TOBIT)); } #endif /* -- Narrowing of arithmetic operators ----------------------------------- */ /* Check whether a number fits into an int32_t (-0 is ok, too). */ static int numisint(lua_Number n) { return (n == (lua_Number)lj_num2int(n)); } /* Narrowing of arithmetic operations. */ TRef lj_opt_narrow_arith(jit_State *J, TRef rb, TRef rc, TValue *vb, TValue *vc, IROp op) { if (tref_isstr(rb)) { rb = emitir(IRTG(IR_STRTO, IRT_NUM), rb, 0); lj_strscan_num(strV(vb), vb); } if (tref_isstr(rc)) { rc = emitir(IRTG(IR_STRTO, IRT_NUM), rc, 0); lj_strscan_num(strV(vc), vc); } /* Must not narrow MUL in non-DUALNUM variant, because it loses -0. */ if ((op >= IR_ADD && op <= (LJ_DUALNUM ? IR_MUL : IR_SUB)) && tref_isinteger(rb) && tref_isinteger(rc) && numisint(lj_vm_foldarith(numberVnum(vb), numberVnum(vc), (int)op - (int)IR_ADD))) return emitir(IRTGI((int)op - (int)IR_ADD + (int)IR_ADDOV), rb, rc); if (!tref_isnum(rb)) rb = emitir(IRTN(IR_CONV), rb, IRCONV_NUM_INT); if (!tref_isnum(rc)) rc = emitir(IRTN(IR_CONV), rc, IRCONV_NUM_INT); return emitir(IRTN(op), rb, rc); } /* Narrowing of unary minus operator. */ TRef lj_opt_narrow_unm(jit_State *J, TRef rc, TValue *vc) { if (tref_isstr(rc)) { rc = emitir(IRTG(IR_STRTO, IRT_NUM), rc, 0); lj_strscan_num(strV(vc), vc); } if (tref_isinteger(rc)) { if ((uint32_t)numberVint(vc) != 0x80000000u) return emitir(IRTGI(IR_SUBOV), lj_ir_kint(J, 0), rc); rc = emitir(IRTN(IR_CONV), rc, IRCONV_NUM_INT); } return emitir(IRTN(IR_NEG), rc, lj_ir_knum_neg(J)); } /* Narrowing of modulo operator. */ TRef lj_opt_narrow_mod(jit_State *J, TRef rb, TRef rc, TValue *vc) { TRef tmp; if (tvisstr(vc) && !lj_strscan_num(strV(vc), vc)) lj_trace_err(J, LJ_TRERR_BADTYPE); if ((LJ_DUALNUM || (J->flags & JIT_F_OPT_NARROW)) && tref_isinteger(rb) && tref_isinteger(rc) && (tvisint(vc) ? intV(vc) != 0 : !tviszero(vc))) { emitir(IRTGI(IR_NE), rc, lj_ir_kint(J, 0)); return emitir(IRTI(IR_MOD), rb, rc); } /* b % c ==> b - floor(b/c)*c */ rb = lj_ir_tonum(J, rb); rc = lj_ir_tonum(J, rc); tmp = emitir(IRTN(IR_DIV), rb, rc); tmp = emitir(IRTN(IR_FPMATH), tmp, IRFPM_FLOOR); tmp = emitir(IRTN(IR_MUL), tmp, rc); return emitir(IRTN(IR_SUB), rb, tmp); } /* Narrowing of power operator or math.pow. */ TRef lj_opt_narrow_pow(jit_State *J, TRef rb, TRef rc, TValue *vc) { if (tvisstr(vc) && !lj_strscan_num(strV(vc), vc)) lj_trace_err(J, LJ_TRERR_BADTYPE); /* Narrowing must be unconditional to preserve (-x)^i semantics. */ if (tvisint(vc) || numisint(numV(vc))) { int checkrange = 0; /* Split pow is faster for bigger exponents. But do this only for (+k)^i. */ if (tref_isk(rb) && (int32_t)ir_knum(IR(tref_ref(rb)))->u32.hi >= 0) { int32_t k = numberVint(vc); if (!(k >= -65536 && k <= 65536)) goto split_pow; checkrange = 1; } if (!tref_isinteger(rc)) { if (tref_isstr(rc)) rc = emitir(IRTG(IR_STRTO, IRT_NUM), rc, 0); /* Guarded conversion to integer! */ rc = emitir(IRTGI(IR_CONV), rc, IRCONV_INT_NUM|IRCONV_CHECK); } if (checkrange && !tref_isk(rc)) { /* Range guard: -65536 <= i <= 65536 */ TRef tmp = emitir(IRTI(IR_ADD), rc, lj_ir_kint(J, 65536)); emitir(IRTGI(IR_ULE), tmp, lj_ir_kint(J, 2*65536)); } return emitir(IRTN(IR_POW), rb, rc); } split_pow: /* FOLD covers most cases, but some are easier to do here. */ if (tref_isk(rb) && tvispone(ir_knum(IR(tref_ref(rb))))) return rb; /* 1 ^ x ==> 1 */ rc = lj_ir_tonum(J, rc); if (tref_isk(rc) && ir_knum(IR(tref_ref(rc)))->n == 0.5) return emitir(IRTN(IR_FPMATH), rb, IRFPM_SQRT); /* x ^ 0.5 ==> sqrt(x) */ /* Split up b^c into exp2(c*log2(b)). Assembler may rejoin later. */ rb = emitir(IRTN(IR_FPMATH), rb, IRFPM_LOG2); rc = emitir(IRTN(IR_MUL), rb, rc); return emitir(IRTN(IR_FPMATH), rc, IRFPM_EXP2); } /* -- Predictive narrowing of induction variables ------------------------- */ /* Narrow a single runtime value. */ static int narrow_forl(jit_State *J, cTValue *o) { if (tvisint(o)) return 1; if (LJ_DUALNUM || (J->flags & JIT_F_OPT_NARROW)) return numisint(numV(o)); return 0; } /* Narrow the FORL index type by looking at the runtime values. */ IRType lj_opt_narrow_forl(jit_State *J, cTValue *tv) { lua_assert(tvisnumber(&tv[FORL_IDX]) && tvisnumber(&tv[FORL_STOP]) && tvisnumber(&tv[FORL_STEP])); /* Narrow only if the runtime values of start/stop/step are all integers. */ if (narrow_forl(J, &tv[FORL_IDX]) && narrow_forl(J, &tv[FORL_STOP]) && narrow_forl(J, &tv[FORL_STEP])) { /* And if the loop index can't possibly overflow. */ lua_Number step = numberVnum(&tv[FORL_STEP]); lua_Number sum = numberVnum(&tv[FORL_STOP]) + step; if (0 <= step ? (sum <= 2147483647.0) : (sum >= -2147483648.0)) return IRT_INT; } return IRT_NUM; } #undef IR #undef fins #undef emitir #undef emitir_raw #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_record.c0000664000000000000000000022134012202141143022467 0ustar rootroot/* ** Trace recorder (bytecode -> SSA IR). ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_record_c #define LUA_CORE #include "lj_obj.h" #if LJ_HASJIT #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_meta.h" #include "lj_frame.h" #if LJ_HASFFI #include "lj_ctype.h" #endif #include "lj_bc.h" #include "lj_ff.h" #include "lj_ir.h" #include "lj_jit.h" #include "lj_ircall.h" #include "lj_iropt.h" #include "lj_trace.h" #include "lj_record.h" #include "lj_ffrecord.h" #include "lj_snap.h" #include "lj_dispatch.h" #include "lj_vm.h" /* Some local macros to save typing. Undef'd at the end. */ #define IR(ref) (&J->cur.ir[(ref)]) /* Pass IR on to next optimization in chain (FOLD). */ #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J)) /* Emit raw IR without passing through optimizations. */ #define emitir_raw(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_ir_emit(J)) /* -- Sanity checks ------------------------------------------------------- */ #ifdef LUA_USE_ASSERT /* Sanity check the whole IR -- sloooow. */ static void rec_check_ir(jit_State *J) { IRRef i, nins = J->cur.nins, nk = J->cur.nk; lua_assert(nk <= REF_BIAS && nins >= REF_BIAS && nins < 65536); for (i = nins-1; i >= nk; i--) { IRIns *ir = IR(i); uint32_t mode = lj_ir_mode[ir->o]; IRRef op1 = ir->op1; IRRef op2 = ir->op2; switch (irm_op1(mode)) { case IRMnone: lua_assert(op1 == 0); break; case IRMref: lua_assert(op1 >= nk); lua_assert(i >= REF_BIAS ? op1 < i : op1 > i); break; case IRMlit: break; case IRMcst: lua_assert(i < REF_BIAS); continue; } switch (irm_op2(mode)) { case IRMnone: lua_assert(op2 == 0); break; case IRMref: lua_assert(op2 >= nk); lua_assert(i >= REF_BIAS ? op2 < i : op2 > i); break; case IRMlit: break; case IRMcst: lua_assert(0); break; } if (ir->prev) { lua_assert(ir->prev >= nk); lua_assert(i >= REF_BIAS ? ir->prev < i : ir->prev > i); lua_assert(ir->o == IR_NOP || IR(ir->prev)->o == ir->o); } } } /* Compare stack slots and frames of the recorder and the VM. */ static void rec_check_slots(jit_State *J) { BCReg s, nslots = J->baseslot + J->maxslot; int32_t depth = 0; cTValue *base = J->L->base - J->baseslot; lua_assert(J->baseslot >= 1 && J->baseslot < LJ_MAX_JSLOTS); lua_assert(J->baseslot == 1 || (J->slot[J->baseslot-1] & TREF_FRAME)); lua_assert(nslots < LJ_MAX_JSLOTS); for (s = 0; s < nslots; s++) { TRef tr = J->slot[s]; if (tr) { cTValue *tv = &base[s]; IRRef ref = tref_ref(tr); IRIns *ir; lua_assert(ref >= J->cur.nk && ref < J->cur.nins); ir = IR(ref); lua_assert(irt_t(ir->t) == tref_t(tr)); if (s == 0) { lua_assert(tref_isfunc(tr)); } else if ((tr & TREF_FRAME)) { GCfunc *fn = gco2func(frame_gc(tv)); BCReg delta = (BCReg)(tv - frame_prev(tv)); lua_assert(tref_isfunc(tr)); if (tref_isk(tr)) lua_assert(fn == ir_kfunc(ir)); lua_assert(s > delta ? (J->slot[s-delta] & TREF_FRAME) : (s == delta)); depth++; } else if ((tr & TREF_CONT)) { lua_assert(ir_kptr(ir) == gcrefp(tv->gcr, void)); lua_assert((J->slot[s+1] & TREF_FRAME)); depth++; } else { if (tvisnumber(tv)) lua_assert(tref_isnumber(tr)); /* Could be IRT_INT etc., too. */ else lua_assert(itype2irt(tv) == tref_type(tr)); if (tref_isk(tr)) { /* Compare constants. */ TValue tvk; lj_ir_kvalue(J->L, &tvk, ir); if (!(tvisnum(&tvk) && tvisnan(&tvk))) lua_assert(lj_obj_equal(tv, &tvk)); else lua_assert(tvisnum(tv) && tvisnan(tv)); } } } } lua_assert(J->framedepth == depth); } #endif /* -- Type handling and specialization ------------------------------------ */ /* Note: these functions return tagged references (TRef). */ /* Specialize a slot to a specific type. Note: slot can be negative! */ static TRef sloadt(jit_State *J, int32_t slot, IRType t, int mode) { /* Caller may set IRT_GUARD in t. */ TRef ref = emitir_raw(IRT(IR_SLOAD, t), (int32_t)J->baseslot+slot, mode); J->base[slot] = ref; return ref; } /* Specialize a slot to the runtime type. Note: slot can be negative! */ static TRef sload(jit_State *J, int32_t slot) { IRType t = itype2irt(&J->L->base[slot]); TRef ref = emitir_raw(IRTG(IR_SLOAD, t), (int32_t)J->baseslot+slot, IRSLOAD_TYPECHECK); if (irtype_ispri(t)) ref = TREF_PRI(t); /* Canonicalize primitive refs. */ J->base[slot] = ref; return ref; } /* Get TRef from slot. Load slot and specialize if not done already. */ #define getslot(J, s) (J->base[(s)] ? J->base[(s)] : sload(J, (int32_t)(s))) /* Get TRef for current function. */ static TRef getcurrf(jit_State *J) { if (J->base[-1]) return J->base[-1]; lua_assert(J->baseslot == 1); return sloadt(J, -1, IRT_FUNC, IRSLOAD_READONLY); } /* Compare for raw object equality. ** Returns 0 if the objects are the same. ** Returns 1 if they are different, but the same type. ** Returns 2 for two different types. ** Comparisons between primitives always return 1 -- no caller cares about it. */ int lj_record_objcmp(jit_State *J, TRef a, TRef b, cTValue *av, cTValue *bv) { int diff = !lj_obj_equal(av, bv); if (!tref_isk2(a, b)) { /* Shortcut, also handles primitives. */ IRType ta = tref_isinteger(a) ? IRT_INT : tref_type(a); IRType tb = tref_isinteger(b) ? IRT_INT : tref_type(b); if (ta != tb) { /* Widen mixed number/int comparisons to number/number comparison. */ if (ta == IRT_INT && tb == IRT_NUM) { a = emitir(IRTN(IR_CONV), a, IRCONV_NUM_INT); ta = IRT_NUM; } else if (ta == IRT_NUM && tb == IRT_INT) { b = emitir(IRTN(IR_CONV), b, IRCONV_NUM_INT); } else { return 2; /* Two different types are never equal. */ } } emitir(IRTG(diff ? IR_NE : IR_EQ, ta), a, b); } return diff; } /* Constify a value. Returns 0 for non-representable object types. */ TRef lj_record_constify(jit_State *J, cTValue *o) { if (tvisgcv(o)) return lj_ir_kgc(J, gcV(o), itype2irt(o)); else if (tvisint(o)) return lj_ir_kint(J, intV(o)); else if (tvisnum(o)) return lj_ir_knumint(J, numV(o)); else if (tvisbool(o)) return TREF_PRI(itype2irt(o)); else return 0; /* Can't represent lightuserdata (pointless). */ } /* -- Record loop ops ----------------------------------------------------- */ /* Loop event. */ typedef enum { LOOPEV_LEAVE, /* Loop is left or not entered. */ LOOPEV_ENTERLO, /* Loop is entered with a low iteration count left. */ LOOPEV_ENTER /* Loop is entered. */ } LoopEvent; /* Canonicalize slots: convert integers to numbers. */ static void canonicalize_slots(jit_State *J) { BCReg s; if (LJ_DUALNUM) return; for (s = J->baseslot+J->maxslot-1; s >= 1; s--) { TRef tr = J->slot[s]; if (tref_isinteger(tr)) { IRIns *ir = IR(tref_ref(tr)); if (!(ir->o == IR_SLOAD && (ir->op2 & IRSLOAD_READONLY))) J->slot[s] = emitir(IRTN(IR_CONV), tr, IRCONV_NUM_INT); } } } /* Stop recording. */ static void rec_stop(jit_State *J, TraceLink linktype, TraceNo lnk) { lj_trace_end(J); J->cur.linktype = (uint8_t)linktype; J->cur.link = (uint16_t)lnk; /* Looping back at the same stack level? */ if (lnk == J->cur.traceno && J->framedepth + J->retdepth == 0) { if ((J->flags & JIT_F_OPT_LOOP)) /* Shall we try to create a loop? */ goto nocanon; /* Do not canonicalize or we lose the narrowing. */ if (J->cur.root) /* Otherwise ensure we always link to the root trace. */ J->cur.link = J->cur.root; } canonicalize_slots(J); nocanon: /* Note: all loop ops must set J->pc to the following instruction! */ lj_snap_add(J); /* Add loop snapshot. */ J->needsnap = 0; J->mergesnap = 1; /* In case recording continues. */ } /* Search bytecode backwards for a int/num constant slot initializer. */ static TRef find_kinit(jit_State *J, const BCIns *endpc, BCReg slot, IRType t) { /* This algorithm is rather simplistic and assumes quite a bit about ** how the bytecode is generated. It works fine for FORI initializers, ** but it won't necessarily work in other cases (e.g. iterator arguments). ** It doesn't do anything fancy, either (like backpropagating MOVs). */ const BCIns *pc, *startpc = proto_bc(J->pt); for (pc = endpc-1; pc > startpc; pc--) { BCIns ins = *pc; BCOp op = bc_op(ins); /* First try to find the last instruction that stores to this slot. */ if (bcmode_a(op) == BCMbase && bc_a(ins) <= slot) { return 0; /* Multiple results, e.g. from a CALL or KNIL. */ } else if (bcmode_a(op) == BCMdst && bc_a(ins) == slot) { if (op == BC_KSHORT || op == BC_KNUM) { /* Found const. initializer. */ /* Now try to verify there's no forward jump across it. */ const BCIns *kpc = pc; for (; pc > startpc; pc--) if (bc_op(*pc) == BC_JMP) { const BCIns *target = pc+bc_j(*pc)+1; if (target > kpc && target <= endpc) return 0; /* Conditional assignment. */ } if (op == BC_KSHORT) { int32_t k = (int32_t)(int16_t)bc_d(ins); return t == IRT_INT ? lj_ir_kint(J, k) : lj_ir_knum(J, (lua_Number)k); } else { cTValue *tv = proto_knumtv(J->pt, bc_d(ins)); if (t == IRT_INT) { int32_t k = numberVint(tv); if (tvisint(tv) || numV(tv) == (lua_Number)k) /* -0 is ok here. */ return lj_ir_kint(J, k); return 0; /* Type mismatch. */ } else { return lj_ir_knum(J, numberVnum(tv)); } } } return 0; /* Non-constant initializer. */ } } return 0; /* No assignment to this slot found? */ } /* Load and optionally convert a FORI argument from a slot. */ static TRef fori_load(jit_State *J, BCReg slot, IRType t, int mode) { int conv = (tvisint(&J->L->base[slot]) != (t==IRT_INT)) ? IRSLOAD_CONVERT : 0; return sloadt(J, (int32_t)slot, t + (((mode & IRSLOAD_TYPECHECK) || (conv && t == IRT_INT && !(mode >> 16))) ? IRT_GUARD : 0), mode + conv); } /* Peek before FORI to find a const initializer. Otherwise load from slot. */ static TRef fori_arg(jit_State *J, const BCIns *fori, BCReg slot, IRType t, int mode) { TRef tr = J->base[slot]; if (!tr) { tr = find_kinit(J, fori, slot, t); if (!tr) tr = fori_load(J, slot, t, mode); } return tr; } /* Return the direction of the FOR loop iterator. ** It's important to exactly reproduce the semantics of the interpreter. */ static int rec_for_direction(cTValue *o) { return (tvisint(o) ? intV(o) : (int32_t)o->u32.hi) >= 0; } /* Simulate the runtime behavior of the FOR loop iterator. */ static LoopEvent rec_for_iter(IROp *op, cTValue *o, int isforl) { lua_Number stopv = numberVnum(&o[FORL_STOP]); lua_Number idxv = numberVnum(&o[FORL_IDX]); lua_Number stepv = numberVnum(&o[FORL_STEP]); if (isforl) idxv += stepv; if (rec_for_direction(&o[FORL_STEP])) { if (idxv <= stopv) { *op = IR_LE; return idxv + 2*stepv > stopv ? LOOPEV_ENTERLO : LOOPEV_ENTER; } *op = IR_GT; return LOOPEV_LEAVE; } else { if (stopv <= idxv) { *op = IR_GE; return idxv + 2*stepv < stopv ? LOOPEV_ENTERLO : LOOPEV_ENTER; } *op = IR_LT; return LOOPEV_LEAVE; } } /* Record checks for FOR loop overflow and step direction. */ static void rec_for_check(jit_State *J, IRType t, int dir, TRef stop, TRef step, int init) { if (!tref_isk(step)) { /* Non-constant step: need a guard for the direction. */ TRef zero = (t == IRT_INT) ? lj_ir_kint(J, 0) : lj_ir_knum_zero(J); emitir(IRTG(dir ? IR_GE : IR_LT, t), step, zero); /* Add hoistable overflow checks for a narrowed FORL index. */ if (init && t == IRT_INT) { if (tref_isk(stop)) { /* Constant stop: optimize check away or to a range check for step. */ int32_t k = IR(tref_ref(stop))->i; if (dir) { if (k > 0) emitir(IRTGI(IR_LE), step, lj_ir_kint(J, (int32_t)0x7fffffff-k)); } else { if (k < 0) emitir(IRTGI(IR_GE), step, lj_ir_kint(J, (int32_t)0x80000000-k)); } } else { /* Stop+step variable: need full overflow check. */ TRef tr = emitir(IRTGI(IR_ADDOV), step, stop); emitir(IRTI(IR_USE), tr, 0); /* ADDOV is weak. Avoid dead result. */ } } } else if (init && t == IRT_INT && !tref_isk(stop)) { /* Constant step: optimize overflow check to a range check for stop. */ int32_t k = IR(tref_ref(step))->i; k = (int32_t)(dir ? 0x7fffffff : 0x80000000) - k; emitir(IRTGI(dir ? IR_LE : IR_GE), stop, lj_ir_kint(J, k)); } } /* Record a FORL instruction. */ static void rec_for_loop(jit_State *J, const BCIns *fori, ScEvEntry *scev, int init) { BCReg ra = bc_a(*fori); cTValue *tv = &J->L->base[ra]; TRef idx = J->base[ra+FORL_IDX]; IRType t = idx ? tref_type(idx) : (init || LJ_DUALNUM) ? lj_opt_narrow_forl(J, tv) : IRT_NUM; int mode = IRSLOAD_INHERIT + ((!LJ_DUALNUM || tvisint(tv) == (t == IRT_INT)) ? IRSLOAD_READONLY : 0); TRef stop = fori_arg(J, fori, ra+FORL_STOP, t, mode); TRef step = fori_arg(J, fori, ra+FORL_STEP, t, mode); int tc, dir = rec_for_direction(&tv[FORL_STEP]); lua_assert(bc_op(*fori) == BC_FORI || bc_op(*fori) == BC_JFORI); scev->t.irt = t; scev->dir = dir; scev->stop = tref_ref(stop); scev->step = tref_ref(step); rec_for_check(J, t, dir, stop, step, init); scev->start = tref_ref(find_kinit(J, fori, ra+FORL_IDX, IRT_INT)); tc = (LJ_DUALNUM && !(scev->start && irref_isk(scev->stop) && irref_isk(scev->step) && tvisint(&tv[FORL_IDX]) == (t == IRT_INT))) ? IRSLOAD_TYPECHECK : 0; if (tc) { J->base[ra+FORL_STOP] = stop; J->base[ra+FORL_STEP] = step; } if (!idx) idx = fori_load(J, ra+FORL_IDX, t, IRSLOAD_INHERIT + tc + (J->scev.start << 16)); if (!init) J->base[ra+FORL_IDX] = idx = emitir(IRT(IR_ADD, t), idx, step); J->base[ra+FORL_EXT] = idx; scev->idx = tref_ref(idx); J->maxslot = ra+FORL_EXT+1; } /* Record FORL/JFORL or FORI/JFORI. */ static LoopEvent rec_for(jit_State *J, const BCIns *fori, int isforl) { BCReg ra = bc_a(*fori); TValue *tv = &J->L->base[ra]; TRef *tr = &J->base[ra]; IROp op; LoopEvent ev; TRef stop; IRType t; if (isforl) { /* Handle FORL/JFORL opcodes. */ TRef idx = tr[FORL_IDX]; if (tref_ref(idx) == J->scev.idx) { t = J->scev.t.irt; stop = J->scev.stop; idx = emitir(IRT(IR_ADD, t), idx, J->scev.step); tr[FORL_EXT] = tr[FORL_IDX] = idx; } else { ScEvEntry scev; rec_for_loop(J, fori, &scev, 0); t = scev.t.irt; stop = scev.stop; } } else { /* Handle FORI/JFORI opcodes. */ BCReg i; lj_meta_for(J->L, tv); t = (LJ_DUALNUM || tref_isint(tr[FORL_IDX])) ? lj_opt_narrow_forl(J, tv) : IRT_NUM; for (i = FORL_IDX; i <= FORL_STEP; i++) { if (!tr[i]) sload(J, ra+i); lua_assert(tref_isnumber_str(tr[i])); if (tref_isstr(tr[i])) tr[i] = emitir(IRTG(IR_STRTO, IRT_NUM), tr[i], 0); if (t == IRT_INT) { if (!tref_isinteger(tr[i])) tr[i] = emitir(IRTGI(IR_CONV), tr[i], IRCONV_INT_NUM|IRCONV_CHECK); } else { if (!tref_isnum(tr[i])) tr[i] = emitir(IRTN(IR_CONV), tr[i], IRCONV_NUM_INT); } } tr[FORL_EXT] = tr[FORL_IDX]; stop = tr[FORL_STOP]; rec_for_check(J, t, rec_for_direction(&tv[FORL_STEP]), stop, tr[FORL_STEP], 1); } ev = rec_for_iter(&op, tv, isforl); if (ev == LOOPEV_LEAVE) { J->maxslot = ra+FORL_EXT+1; J->pc = fori+1; } else { J->maxslot = ra; J->pc = fori+bc_j(*fori)+1; } lj_snap_add(J); emitir(IRTG(op, t), tr[FORL_IDX], stop); if (ev == LOOPEV_LEAVE) { J->maxslot = ra; J->pc = fori+bc_j(*fori)+1; } else { J->maxslot = ra+FORL_EXT+1; J->pc = fori+1; } J->needsnap = 1; return ev; } /* Record ITERL/JITERL. */ static LoopEvent rec_iterl(jit_State *J, const BCIns iterins) { BCReg ra = bc_a(iterins); lua_assert(J->base[ra] != 0); if (!tref_isnil(J->base[ra])) { /* Looping back? */ J->base[ra-1] = J->base[ra]; /* Copy result of ITERC to control var. */ J->maxslot = ra-1+bc_b(J->pc[-1]); J->pc += bc_j(iterins)+1; return LOOPEV_ENTER; } else { J->maxslot = ra-3; J->pc++; return LOOPEV_LEAVE; } } /* Record LOOP/JLOOP. Now, that was easy. */ static LoopEvent rec_loop(jit_State *J, BCReg ra) { if (ra < J->maxslot) J->maxslot = ra; J->pc++; return LOOPEV_ENTER; } /* Check if a loop repeatedly failed to trace because it didn't loop back. */ static int innerloopleft(jit_State *J, const BCIns *pc) { ptrdiff_t i; for (i = 0; i < PENALTY_SLOTS; i++) if (mref(J->penalty[i].pc, const BCIns) == pc) { if ((J->penalty[i].reason == LJ_TRERR_LLEAVE || J->penalty[i].reason == LJ_TRERR_LINNER) && J->penalty[i].val >= 2*PENALTY_MIN) return 1; break; } return 0; } /* Handle the case when an interpreted loop op is hit. */ static void rec_loop_interp(jit_State *J, const BCIns *pc, LoopEvent ev) { if (J->parent == 0) { if (pc == J->startpc && J->framedepth + J->retdepth == 0) { /* Same loop? */ if (ev == LOOPEV_LEAVE) /* Must loop back to form a root trace. */ lj_trace_err(J, LJ_TRERR_LLEAVE); rec_stop(J, LJ_TRLINK_LOOP, J->cur.traceno); /* Looping root trace. */ } else if (ev != LOOPEV_LEAVE) { /* Entering inner loop? */ /* It's usually better to abort here and wait until the inner loop ** is traced. But if the inner loop repeatedly didn't loop back, ** this indicates a low trip count. In this case try unrolling ** an inner loop even in a root trace. But it's better to be a bit ** more conservative here and only do it for very short loops. */ if (bc_j(*pc) != -1 && !innerloopleft(J, pc)) lj_trace_err(J, LJ_TRERR_LINNER); /* Root trace hit an inner loop. */ if ((ev != LOOPEV_ENTERLO && J->loopref && J->cur.nins - J->loopref > 24) || --J->loopunroll < 0) lj_trace_err(J, LJ_TRERR_LUNROLL); /* Limit loop unrolling. */ J->loopref = J->cur.nins; } } else if (ev != LOOPEV_LEAVE) { /* Side trace enters an inner loop. */ J->loopref = J->cur.nins; if (--J->loopunroll < 0) lj_trace_err(J, LJ_TRERR_LUNROLL); /* Limit loop unrolling. */ } /* Side trace continues across a loop that's left or not entered. */ } /* Handle the case when an already compiled loop op is hit. */ static void rec_loop_jit(jit_State *J, TraceNo lnk, LoopEvent ev) { if (J->parent == 0) { /* Root trace hit an inner loop. */ /* Better let the inner loop spawn a side trace back here. */ lj_trace_err(J, LJ_TRERR_LINNER); } else if (ev != LOOPEV_LEAVE) { /* Side trace enters a compiled loop. */ J->instunroll = 0; /* Cannot continue across a compiled loop op. */ if (J->pc == J->startpc && J->framedepth + J->retdepth == 0) rec_stop(J, LJ_TRLINK_LOOP, J->cur.traceno); /* Form an extra loop. */ else rec_stop(J, LJ_TRLINK_ROOT, lnk); /* Link to the loop. */ } /* Side trace continues across a loop that's left or not entered. */ } /* -- Record calls and returns -------------------------------------------- */ /* Specialize to the runtime value of the called function or its prototype. */ static TRef rec_call_specialize(jit_State *J, GCfunc *fn, TRef tr) { TRef kfunc; if (isluafunc(fn)) { GCproto *pt = funcproto(fn); /* Too many closures created? Probably not a monomorphic function. */ if (pt->flags >= PROTO_CLC_POLY) { /* Specialize to prototype instead. */ TRef trpt = emitir(IRT(IR_FLOAD, IRT_P32), tr, IRFL_FUNC_PC); emitir(IRTG(IR_EQ, IRT_P32), trpt, lj_ir_kptr(J, proto_bc(pt))); (void)lj_ir_kgc(J, obj2gco(pt), IRT_PROTO); /* Prevent GC of proto. */ return tr; } } /* Otherwise specialize to the function (closure) value itself. */ kfunc = lj_ir_kfunc(J, fn); emitir(IRTG(IR_EQ, IRT_FUNC), tr, kfunc); return kfunc; } /* Record call setup. */ static void rec_call_setup(jit_State *J, BCReg func, ptrdiff_t nargs) { RecordIndex ix; TValue *functv = &J->L->base[func]; TRef *fbase = &J->base[func]; ptrdiff_t i; for (i = 0; i <= nargs; i++) (void)getslot(J, func+i); /* Ensure func and all args have a reference. */ if (!tref_isfunc(fbase[0])) { /* Resolve __call metamethod. */ ix.tab = fbase[0]; copyTV(J->L, &ix.tabv, functv); if (!lj_record_mm_lookup(J, &ix, MM_call) || !tref_isfunc(ix.mobj)) lj_trace_err(J, LJ_TRERR_NOMM); for (i = ++nargs; i > 0; i--) /* Shift arguments up. */ fbase[i] = fbase[i-1]; fbase[0] = ix.mobj; /* Replace function. */ functv = &ix.mobjv; } fbase[0] = TREF_FRAME | rec_call_specialize(J, funcV(functv), fbase[0]); J->maxslot = (BCReg)nargs; } /* Record call. */ void lj_record_call(jit_State *J, BCReg func, ptrdiff_t nargs) { rec_call_setup(J, func, nargs); /* Bump frame. */ J->framedepth++; J->base += func+1; J->baseslot += func+1; } /* Record tail call. */ void lj_record_tailcall(jit_State *J, BCReg func, ptrdiff_t nargs) { rec_call_setup(J, func, nargs); if (frame_isvarg(J->L->base - 1)) { BCReg cbase = (BCReg)frame_delta(J->L->base - 1); if (--J->framedepth < 0) lj_trace_err(J, LJ_TRERR_NYIRETL); J->baseslot -= (BCReg)cbase; J->base -= cbase; func += cbase; } /* Move func + args down. */ memmove(&J->base[-1], &J->base[func], sizeof(TRef)*(J->maxslot+1)); /* Note: the new TREF_FRAME is now at J->base[-1] (even for slot #0). */ /* Tailcalls can form a loop, so count towards the loop unroll limit. */ if (++J->tailcalled > J->loopunroll) lj_trace_err(J, LJ_TRERR_LUNROLL); } /* Check unroll limits for down-recursion. */ static int check_downrec_unroll(jit_State *J, GCproto *pt) { IRRef ptref; for (ptref = J->chain[IR_KGC]; ptref; ptref = IR(ptref)->prev) if (ir_kgc(IR(ptref)) == obj2gco(pt)) { int count = 0; IRRef ref; for (ref = J->chain[IR_RETF]; ref; ref = IR(ref)->prev) if (IR(ref)->op1 == ptref) count++; if (count) { if (J->pc == J->startpc) { if (count + J->tailcalled > J->param[JIT_P_recunroll]) return 1; } else { lj_trace_err(J, LJ_TRERR_DOWNREC); } } } return 0; } /* Record return. */ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults) { TValue *frame = J->L->base - 1; ptrdiff_t i; for (i = 0; i < gotresults; i++) (void)getslot(J, rbase+i); /* Ensure all results have a reference. */ while (frame_ispcall(frame)) { /* Immediately resolve pcall() returns. */ BCReg cbase = (BCReg)frame_delta(frame); if (--J->framedepth < 0) lj_trace_err(J, LJ_TRERR_NYIRETL); lua_assert(J->baseslot > 1); gotresults++; rbase += cbase; J->baseslot -= (BCReg)cbase; J->base -= cbase; J->base[--rbase] = TREF_TRUE; /* Prepend true to results. */ frame = frame_prevd(frame); } /* Return to lower frame via interpreter for unhandled cases. */ if (J->framedepth == 0 && J->pt && bc_isret(bc_op(*J->pc)) && (!frame_islua(frame) || (J->parent == 0 && !bc_isret(bc_op(J->cur.startins))))) { /* NYI: specialize to frame type and return directly, not via RET*. */ for (i = -1; i < (ptrdiff_t)rbase; i++) J->base[i] = 0; /* Purge dead slots. */ J->maxslot = rbase + (BCReg)gotresults; rec_stop(J, LJ_TRLINK_RETURN, 0); /* Return to interpreter. */ return; } if (frame_isvarg(frame)) { BCReg cbase = (BCReg)frame_delta(frame); if (--J->framedepth < 0) /* NYI: return of vararg func to lower frame. */ lj_trace_err(J, LJ_TRERR_NYIRETL); lua_assert(J->baseslot > 1); rbase += cbase; J->baseslot -= (BCReg)cbase; J->base -= cbase; frame = frame_prevd(frame); } if (frame_islua(frame)) { /* Return to Lua frame. */ BCIns callins = *(frame_pc(frame)-1); ptrdiff_t nresults = bc_b(callins) ? (ptrdiff_t)bc_b(callins)-1 :gotresults; BCReg cbase = bc_a(callins); GCproto *pt = funcproto(frame_func(frame - (cbase+1))); if (J->framedepth == 0 && J->pt && frame == J->L->base - 1) { if (check_downrec_unroll(J, pt)) { J->maxslot = (BCReg)(rbase + gotresults); lj_snap_purge(J); rec_stop(J, LJ_TRLINK_DOWNREC, J->cur.traceno); /* Down-recursion. */ return; } lj_snap_add(J); } for (i = 0; i < nresults; i++) /* Adjust results. */ J->base[i-1] = i < gotresults ? J->base[rbase+i] : TREF_NIL; J->maxslot = cbase+(BCReg)nresults; if (J->framedepth > 0) { /* Return to a frame that is part of the trace. */ J->framedepth--; lua_assert(J->baseslot > cbase+1); J->baseslot -= cbase+1; J->base -= cbase+1; } else if (J->parent == 0 && !bc_isret(bc_op(J->cur.startins))) { /* Return to lower frame would leave the loop in a root trace. */ lj_trace_err(J, LJ_TRERR_LLEAVE); } else { /* Return to lower frame. Guard for the target we return to. */ TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO); TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame)); emitir(IRTG(IR_RETF, IRT_P32), trpt, trpc); J->retdepth++; J->needsnap = 1; lua_assert(J->baseslot == 1); /* Shift result slots up and clear the slots of the new frame below. */ memmove(J->base + cbase, J->base-1, sizeof(TRef)*nresults); memset(J->base-1, 0, sizeof(TRef)*(cbase+1)); } } else if (frame_iscont(frame)) { /* Return to continuation frame. */ ASMFunction cont = frame_contf(frame); BCReg cbase = (BCReg)frame_delta(frame); if ((J->framedepth -= 2) < 0) lj_trace_err(J, LJ_TRERR_NYIRETL); J->baseslot -= (BCReg)cbase; J->base -= cbase; J->maxslot = cbase-2; if (cont == lj_cont_ra) { /* Copy result to destination slot. */ BCReg dst = bc_a(*(frame_contpc(frame)-1)); J->base[dst] = gotresults ? J->base[cbase+rbase] : TREF_NIL; if (dst >= J->maxslot) J->maxslot = dst+1; } else if (cont == lj_cont_nop) { /* Nothing to do here. */ } else if (cont == lj_cont_cat) { lua_assert(0); } else { /* Result type already specialized. */ lua_assert(cont == lj_cont_condf || cont == lj_cont_condt); } } else { lj_trace_err(J, LJ_TRERR_NYIRETL); /* NYI: handle return to C frame. */ } lua_assert(J->baseslot >= 1); } /* -- Metamethod handling ------------------------------------------------- */ /* Prepare to record call to metamethod. */ static BCReg rec_mm_prep(jit_State *J, ASMFunction cont) { BCReg s, top = curr_proto(J->L)->framesize; TRef trcont; setcont(&J->L->base[top], cont); #if LJ_64 trcont = lj_ir_kptr(J, (void *)((int64_t)cont - (int64_t)lj_vm_asm_begin)); #else trcont = lj_ir_kptr(J, (void *)cont); #endif J->base[top] = trcont | TREF_CONT; J->framedepth++; for (s = J->maxslot; s < top; s++) J->base[s] = 0; /* Clear frame gap to avoid resurrecting previous refs. */ return top+1; } /* Record metamethod lookup. */ int lj_record_mm_lookup(jit_State *J, RecordIndex *ix, MMS mm) { RecordIndex mix; GCtab *mt; if (tref_istab(ix->tab)) { mt = tabref(tabV(&ix->tabv)->metatable); mix.tab = emitir(IRT(IR_FLOAD, IRT_TAB), ix->tab, IRFL_TAB_META); } else if (tref_isudata(ix->tab)) { int udtype = udataV(&ix->tabv)->udtype; mt = tabref(udataV(&ix->tabv)->metatable); /* The metatables of special userdata objects are treated as immutable. */ if (udtype != UDTYPE_USERDATA) { cTValue *mo; if (LJ_HASFFI && udtype == UDTYPE_FFI_CLIB) { /* Specialize to the C library namespace object. */ emitir(IRTG(IR_EQ, IRT_P32), ix->tab, lj_ir_kptr(J, udataV(&ix->tabv))); } else { /* Specialize to the type of userdata. */ TRef tr = emitir(IRT(IR_FLOAD, IRT_U8), ix->tab, IRFL_UDATA_UDTYPE); emitir(IRTGI(IR_EQ), tr, lj_ir_kint(J, udtype)); } immutable_mt: mo = lj_tab_getstr(mt, mmname_str(J2G(J), mm)); if (!mo || tvisnil(mo)) return 0; /* No metamethod. */ /* Treat metamethod or index table as immutable, too. */ if (!(tvisfunc(mo) || tvistab(mo))) lj_trace_err(J, LJ_TRERR_BADTYPE); copyTV(J->L, &ix->mobjv, mo); ix->mobj = lj_ir_kgc(J, gcV(mo), tvisfunc(mo) ? IRT_FUNC : IRT_TAB); ix->mtv = mt; ix->mt = TREF_NIL; /* Dummy value for comparison semantics. */ return 1; /* Got metamethod or index table. */ } mix.tab = emitir(IRT(IR_FLOAD, IRT_TAB), ix->tab, IRFL_UDATA_META); } else { /* Specialize to base metatable. Must flush mcode in lua_setmetatable(). */ mt = tabref(basemt_obj(J2G(J), &ix->tabv)); if (mt == NULL) { ix->mt = TREF_NIL; return 0; /* No metamethod. */ } /* The cdata metatable is treated as immutable. */ if (LJ_HASFFI && tref_iscdata(ix->tab)) goto immutable_mt; ix->mt = mix.tab = lj_ir_ktab(J, mt); goto nocheck; } ix->mt = mt ? mix.tab : TREF_NIL; emitir(IRTG(mt ? IR_NE : IR_EQ, IRT_TAB), mix.tab, lj_ir_knull(J, IRT_TAB)); nocheck: if (mt) { GCstr *mmstr = mmname_str(J2G(J), mm); cTValue *mo = lj_tab_getstr(mt, mmstr); if (mo && !tvisnil(mo)) copyTV(J->L, &ix->mobjv, mo); ix->mtv = mt; settabV(J->L, &mix.tabv, mt); setstrV(J->L, &mix.keyv, mmstr); mix.key = lj_ir_kstr(J, mmstr); mix.val = 0; mix.idxchain = 0; ix->mobj = lj_record_idx(J, &mix); return !tref_isnil(ix->mobj); /* 1 if metamethod found, 0 if not. */ } return 0; /* No metamethod. */ } /* Record call to arithmetic metamethod. */ static TRef rec_mm_arith(jit_State *J, RecordIndex *ix, MMS mm) { /* Set up metamethod call first to save ix->tab and ix->tabv. */ BCReg func = rec_mm_prep(J, lj_cont_ra); TRef *base = J->base + func; TValue *basev = J->L->base + func; base[1] = ix->tab; base[2] = ix->key; copyTV(J->L, basev+1, &ix->tabv); copyTV(J->L, basev+2, &ix->keyv); if (!lj_record_mm_lookup(J, ix, mm)) { /* Lookup mm on 1st operand. */ if (mm != MM_unm) { ix->tab = ix->key; copyTV(J->L, &ix->tabv, &ix->keyv); if (lj_record_mm_lookup(J, ix, mm)) /* Lookup mm on 2nd operand. */ goto ok; } lj_trace_err(J, LJ_TRERR_NOMM); } ok: base[0] = ix->mobj; copyTV(J->L, basev+0, &ix->mobjv); lj_record_call(J, func, 2); return 0; /* No result yet. */ } /* Record call to __len metamethod. */ static TRef rec_mm_len(jit_State *J, TRef tr, TValue *tv) { RecordIndex ix; ix.tab = tr; copyTV(J->L, &ix.tabv, tv); if (lj_record_mm_lookup(J, &ix, MM_len)) { BCReg func = rec_mm_prep(J, lj_cont_ra); TRef *base = J->base + func; TValue *basev = J->L->base + func; base[0] = ix.mobj; copyTV(J->L, basev+0, &ix.mobjv); base[1] = tr; copyTV(J->L, basev+1, tv); #if LJ_52 base[2] = tr; copyTV(J->L, basev+2, tv); #else base[2] = TREF_NIL; setnilV(basev+2); #endif lj_record_call(J, func, 2); } else { if (LJ_52 && tref_istab(tr)) return lj_ir_call(J, IRCALL_lj_tab_len, tr); lj_trace_err(J, LJ_TRERR_NOMM); } return 0; /* No result yet. */ } /* Call a comparison metamethod. */ static void rec_mm_callcomp(jit_State *J, RecordIndex *ix, int op) { BCReg func = rec_mm_prep(J, (op&1) ? lj_cont_condf : lj_cont_condt); TRef *base = J->base + func; TValue *tv = J->L->base + func; base[0] = ix->mobj; base[1] = ix->val; base[2] = ix->key; copyTV(J->L, tv+0, &ix->mobjv); copyTV(J->L, tv+1, &ix->valv); copyTV(J->L, tv+2, &ix->keyv); lj_record_call(J, func, 2); } /* Record call to equality comparison metamethod (for tab and udata only). */ static void rec_mm_equal(jit_State *J, RecordIndex *ix, int op) { ix->tab = ix->val; copyTV(J->L, &ix->tabv, &ix->valv); if (lj_record_mm_lookup(J, ix, MM_eq)) { /* Lookup mm on 1st operand. */ cTValue *bv; TRef mo1 = ix->mobj; TValue mo1v; copyTV(J->L, &mo1v, &ix->mobjv); /* Avoid the 2nd lookup and the objcmp if the metatables are equal. */ bv = &ix->keyv; if (tvistab(bv) && tabref(tabV(bv)->metatable) == ix->mtv) { TRef mt2 = emitir(IRT(IR_FLOAD, IRT_TAB), ix->key, IRFL_TAB_META); emitir(IRTG(IR_EQ, IRT_TAB), mt2, ix->mt); } else if (tvisudata(bv) && tabref(udataV(bv)->metatable) == ix->mtv) { TRef mt2 = emitir(IRT(IR_FLOAD, IRT_TAB), ix->key, IRFL_UDATA_META); emitir(IRTG(IR_EQ, IRT_TAB), mt2, ix->mt); } else { /* Lookup metamethod on 2nd operand and compare both. */ ix->tab = ix->key; copyTV(J->L, &ix->tabv, bv); if (!lj_record_mm_lookup(J, ix, MM_eq) || lj_record_objcmp(J, mo1, ix->mobj, &mo1v, &ix->mobjv)) return; } rec_mm_callcomp(J, ix, op); } } /* Record call to ordered comparison metamethods (for arbitrary objects). */ static void rec_mm_comp(jit_State *J, RecordIndex *ix, int op) { ix->tab = ix->val; copyTV(J->L, &ix->tabv, &ix->valv); while (1) { MMS mm = (op & 2) ? MM_le : MM_lt; /* Try __le + __lt or only __lt. */ #if LJ_52 if (!lj_record_mm_lookup(J, ix, mm)) { /* Lookup mm on 1st operand. */ ix->tab = ix->key; copyTV(J->L, &ix->tabv, &ix->keyv); if (!lj_record_mm_lookup(J, ix, mm)) /* Lookup mm on 2nd operand. */ goto nomatch; } rec_mm_callcomp(J, ix, op); return; #else if (lj_record_mm_lookup(J, ix, mm)) { /* Lookup mm on 1st operand. */ cTValue *bv; TRef mo1 = ix->mobj; TValue mo1v; copyTV(J->L, &mo1v, &ix->mobjv); /* Avoid the 2nd lookup and the objcmp if the metatables are equal. */ bv = &ix->keyv; if (tvistab(bv) && tabref(tabV(bv)->metatable) == ix->mtv) { TRef mt2 = emitir(IRT(IR_FLOAD, IRT_TAB), ix->key, IRFL_TAB_META); emitir(IRTG(IR_EQ, IRT_TAB), mt2, ix->mt); } else if (tvisudata(bv) && tabref(udataV(bv)->metatable) == ix->mtv) { TRef mt2 = emitir(IRT(IR_FLOAD, IRT_TAB), ix->key, IRFL_UDATA_META); emitir(IRTG(IR_EQ, IRT_TAB), mt2, ix->mt); } else { /* Lookup metamethod on 2nd operand and compare both. */ ix->tab = ix->key; copyTV(J->L, &ix->tabv, bv); if (!lj_record_mm_lookup(J, ix, mm) || lj_record_objcmp(J, mo1, ix->mobj, &mo1v, &ix->mobjv)) goto nomatch; } rec_mm_callcomp(J, ix, op); return; } #endif nomatch: /* Lookup failed. Retry with __lt and swapped operands. */ if (!(op & 2)) break; /* Already at __lt. Interpreter will throw. */ ix->tab = ix->key; ix->key = ix->val; ix->val = ix->tab; copyTV(J->L, &ix->tabv, &ix->keyv); copyTV(J->L, &ix->keyv, &ix->valv); copyTV(J->L, &ix->valv, &ix->tabv); op ^= 3; } } #if LJ_HASFFI /* Setup call to cdata comparison metamethod. */ static void rec_mm_comp_cdata(jit_State *J, RecordIndex *ix, int op, MMS mm) { lj_snap_add(J); if (tref_iscdata(ix->val)) { ix->tab = ix->val; copyTV(J->L, &ix->tabv, &ix->valv); } else { lua_assert(tref_iscdata(ix->key)); ix->tab = ix->key; copyTV(J->L, &ix->tabv, &ix->keyv); } lj_record_mm_lookup(J, ix, mm); rec_mm_callcomp(J, ix, op); } #endif /* -- Indexed access ------------------------------------------------------ */ /* Record bounds-check. */ static void rec_idx_abc(jit_State *J, TRef asizeref, TRef ikey, uint32_t asize) { /* Try to emit invariant bounds checks. */ if ((J->flags & (JIT_F_OPT_LOOP|JIT_F_OPT_ABC)) == (JIT_F_OPT_LOOP|JIT_F_OPT_ABC)) { IRRef ref = tref_ref(ikey); IRIns *ir = IR(ref); int32_t ofs = 0; IRRef ofsref = 0; /* Handle constant offsets. */ if (ir->o == IR_ADD && irref_isk(ir->op2)) { ofsref = ir->op2; ofs = IR(ofsref)->i; ref = ir->op1; ir = IR(ref); } /* Got scalar evolution analysis results for this reference? */ if (ref == J->scev.idx) { int32_t stop; lua_assert(irt_isint(J->scev.t) && ir->o == IR_SLOAD); stop = numberVint(&(J->L->base - J->baseslot)[ir->op1 + FORL_STOP]); /* Runtime value for stop of loop is within bounds? */ if ((int64_t)stop + ofs < (int64_t)asize) { /* Emit invariant bounds check for stop. */ emitir(IRTG(IR_ABC, IRT_P32), asizeref, ofs == 0 ? J->scev.stop : emitir(IRTI(IR_ADD), J->scev.stop, ofsref)); /* Emit invariant bounds check for start, if not const or negative. */ if (!(J->scev.dir && J->scev.start && (int64_t)IR(J->scev.start)->i + ofs >= 0)) emitir(IRTG(IR_ABC, IRT_P32), asizeref, ikey); return; } } } emitir(IRTGI(IR_ABC), asizeref, ikey); /* Emit regular bounds check. */ } /* Record indexed key lookup. */ static TRef rec_idx_key(jit_State *J, RecordIndex *ix) { TRef key; GCtab *t = tabV(&ix->tabv); ix->oldv = lj_tab_get(J->L, t, &ix->keyv); /* Lookup previous value. */ /* Integer keys are looked up in the array part first. */ key = ix->key; if (tref_isnumber(key)) { int32_t k = numberVint(&ix->keyv); if (!tvisint(&ix->keyv) && numV(&ix->keyv) != (lua_Number)k) k = LJ_MAX_ASIZE; if ((MSize)k < LJ_MAX_ASIZE) { /* Potential array key? */ TRef ikey = lj_opt_narrow_index(J, key); TRef asizeref = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_ASIZE); if ((MSize)k < t->asize) { /* Currently an array key? */ TRef arrayref; rec_idx_abc(J, asizeref, ikey, t->asize); arrayref = emitir(IRT(IR_FLOAD, IRT_P32), ix->tab, IRFL_TAB_ARRAY); return emitir(IRT(IR_AREF, IRT_P32), arrayref, ikey); } else { /* Currently not in array (may be an array extension)? */ emitir(IRTGI(IR_ULE), asizeref, ikey); /* Inv. bounds check. */ if (k == 0 && tref_isk(key)) key = lj_ir_knum_zero(J); /* Canonicalize 0 or +-0.0 to +0.0. */ /* And continue with the hash lookup. */ } } else if (!tref_isk(key)) { /* We can rule out const numbers which failed the integerness test ** above. But all other numbers are potential array keys. */ if (t->asize == 0) { /* True sparse tables have an empty array part. */ /* Guard that the array part stays empty. */ TRef tmp = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_ASIZE); emitir(IRTGI(IR_EQ), tmp, lj_ir_kint(J, 0)); } else { lj_trace_err(J, LJ_TRERR_NYITMIX); } } } /* Otherwise the key is located in the hash part. */ if (t->hmask == 0) { /* Shortcut for empty hash part. */ /* Guard that the hash part stays empty. */ TRef tmp = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK); emitir(IRTGI(IR_EQ), tmp, lj_ir_kint(J, 0)); return lj_ir_kkptr(J, niltvg(J2G(J))); } if (tref_isinteger(key)) /* Hash keys are based on numbers, not ints. */ key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT); if (tref_isk(key)) { /* Optimize lookup of constant hash keys. */ MSize hslot = (MSize)((char *)ix->oldv - (char *)&noderef(t->node)[0].val); if (t->hmask > 0 && hslot <= t->hmask*(MSize)sizeof(Node) && hslot <= 65535*(MSize)sizeof(Node)) { TRef node, kslot; TRef hm = emitir(IRTI(IR_FLOAD), ix->tab, IRFL_TAB_HMASK); emitir(IRTGI(IR_EQ), hm, lj_ir_kint(J, (int32_t)t->hmask)); node = emitir(IRT(IR_FLOAD, IRT_P32), ix->tab, IRFL_TAB_NODE); kslot = lj_ir_kslot(J, key, hslot / sizeof(Node)); return emitir(IRTG(IR_HREFK, IRT_P32), node, kslot); } } /* Fall back to a regular hash lookup. */ return emitir(IRT(IR_HREF, IRT_P32), ix->tab, key); } /* Determine whether a key is NOT one of the fast metamethod names. */ static int nommstr(jit_State *J, TRef key) { if (tref_isstr(key)) { if (tref_isk(key)) { GCstr *str = ir_kstr(IR(tref_ref(key))); uint32_t mm; for (mm = 0; mm <= MM_FAST; mm++) if (mmname_str(J2G(J), mm) == str) return 0; /* MUST be one the fast metamethod names. */ } else { return 0; /* Variable string key MAY be a metamethod name. */ } } return 1; /* CANNOT be a metamethod name. */ } /* Record indexed load/store. */ TRef lj_record_idx(jit_State *J, RecordIndex *ix) { TRef xref; IROp xrefop, loadop; cTValue *oldv; while (!tref_istab(ix->tab)) { /* Handle non-table lookup. */ /* Never call raw lj_record_idx() on non-table. */ lua_assert(ix->idxchain != 0); if (!lj_record_mm_lookup(J, ix, ix->val ? MM_newindex : MM_index)) lj_trace_err(J, LJ_TRERR_NOMM); handlemm: if (tref_isfunc(ix->mobj)) { /* Handle metamethod call. */ BCReg func = rec_mm_prep(J, ix->val ? lj_cont_nop : lj_cont_ra); TRef *base = J->base + func; TValue *tv = J->L->base + func; base[0] = ix->mobj; base[1] = ix->tab; base[2] = ix->key; setfuncV(J->L, tv+0, funcV(&ix->mobjv)); copyTV(J->L, tv+1, &ix->tabv); copyTV(J->L, tv+2, &ix->keyv); if (ix->val) { base[3] = ix->val; copyTV(J->L, tv+3, &ix->valv); lj_record_call(J, func, 3); /* mobj(tab, key, val) */ return 0; } else { lj_record_call(J, func, 2); /* res = mobj(tab, key) */ return 0; /* No result yet. */ } } /* Otherwise retry lookup with metaobject. */ ix->tab = ix->mobj; copyTV(J->L, &ix->tabv, &ix->mobjv); if (--ix->idxchain == 0) lj_trace_err(J, LJ_TRERR_IDXLOOP); } /* First catch nil and NaN keys for tables. */ if (tvisnil(&ix->keyv) || (tvisnum(&ix->keyv) && tvisnan(&ix->keyv))) { if (ix->val) /* Better fail early. */ lj_trace_err(J, LJ_TRERR_STORENN); if (tref_isk(ix->key)) { if (ix->idxchain && lj_record_mm_lookup(J, ix, MM_index)) goto handlemm; return TREF_NIL; } } /* Record the key lookup. */ xref = rec_idx_key(J, ix); xrefop = IR(tref_ref(xref))->o; loadop = xrefop == IR_AREF ? IR_ALOAD : IR_HLOAD; /* The lj_meta_tset() inconsistency is gone, but better play safe. */ oldv = xrefop == IR_KKPTR ? (cTValue *)ir_kptr(IR(tref_ref(xref))) : ix->oldv; if (ix->val == 0) { /* Indexed load */ IRType t = itype2irt(oldv); TRef res; if (oldv == niltvg(J2G(J))) { emitir(IRTG(IR_EQ, IRT_P32), xref, lj_ir_kkptr(J, niltvg(J2G(J)))); res = TREF_NIL; } else { res = emitir(IRTG(loadop, t), xref, 0); } if (t == IRT_NIL && ix->idxchain && lj_record_mm_lookup(J, ix, MM_index)) goto handlemm; if (irtype_ispri(t)) res = TREF_PRI(t); /* Canonicalize primitives. */ return res; } else { /* Indexed store. */ GCtab *mt = tabref(tabV(&ix->tabv)->metatable); int keybarrier = tref_isgcv(ix->key) && !tref_isnil(ix->val); if (tvisnil(oldv)) { /* Previous value was nil? */ /* Need to duplicate the hasmm check for the early guards. */ int hasmm = 0; if (ix->idxchain && mt) { cTValue *mo = lj_tab_getstr(mt, mmname_str(J2G(J), MM_newindex)); hasmm = mo && !tvisnil(mo); } if (hasmm) emitir(IRTG(loadop, IRT_NIL), xref, 0); /* Guard for nil value. */ else if (xrefop == IR_HREF) emitir(IRTG(oldv == niltvg(J2G(J)) ? IR_EQ : IR_NE, IRT_P32), xref, lj_ir_kkptr(J, niltvg(J2G(J)))); if (ix->idxchain && lj_record_mm_lookup(J, ix, MM_newindex)) { lua_assert(hasmm); goto handlemm; } lua_assert(!hasmm); if (oldv == niltvg(J2G(J))) { /* Need to insert a new key. */ TRef key = ix->key; if (tref_isinteger(key)) /* NEWREF needs a TValue as a key. */ key = emitir(IRTN(IR_CONV), key, IRCONV_NUM_INT); xref = emitir(IRT(IR_NEWREF, IRT_P32), ix->tab, key); keybarrier = 0; /* NEWREF already takes care of the key barrier. */ } } else if (!lj_opt_fwd_wasnonnil(J, loadop, tref_ref(xref))) { /* Cannot derive that the previous value was non-nil, must do checks. */ if (xrefop == IR_HREF) /* Guard against store to niltv. */ emitir(IRTG(IR_NE, IRT_P32), xref, lj_ir_kkptr(J, niltvg(J2G(J)))); if (ix->idxchain) { /* Metamethod lookup required? */ /* A check for NULL metatable is cheaper (hoistable) than a load. */ if (!mt) { TRef mtref = emitir(IRT(IR_FLOAD, IRT_TAB), ix->tab, IRFL_TAB_META); emitir(IRTG(IR_EQ, IRT_TAB), mtref, lj_ir_knull(J, IRT_TAB)); } else { IRType t = itype2irt(oldv); emitir(IRTG(loadop, t), xref, 0); /* Guard for non-nil value. */ } } } else { keybarrier = 0; /* Previous non-nil value kept the key alive. */ } /* Convert int to number before storing. */ if (!LJ_DUALNUM && tref_isinteger(ix->val)) ix->val = emitir(IRTN(IR_CONV), ix->val, IRCONV_NUM_INT); emitir(IRT(loadop+IRDELTA_L2S, tref_type(ix->val)), xref, ix->val); if (keybarrier || tref_isgcv(ix->val)) emitir(IRT(IR_TBAR, IRT_NIL), ix->tab, 0); /* Invalidate neg. metamethod cache for stores with certain string keys. */ if (!nommstr(J, ix->key)) { TRef fref = emitir(IRT(IR_FREF, IRT_P32), ix->tab, IRFL_TAB_NOMM); emitir(IRT(IR_FSTORE, IRT_U8), fref, lj_ir_kint(J, 0)); } J->needsnap = 1; return 0; } } /* -- Upvalue access ------------------------------------------------------ */ /* Check whether upvalue is immutable and ok to constify. */ static int rec_upvalue_constify(jit_State *J, GCupval *uvp) { if (uvp->immutable) { cTValue *o = uvval(uvp); /* Don't constify objects that may retain large amounts of memory. */ #if LJ_HASFFI if (tviscdata(o)) { GCcdata *cd = cdataV(o); if (!cdataisv(cd) && !(cd->marked & LJ_GC_CDATA_FIN)) { CType *ct = ctype_raw(ctype_ctsG(J2G(J)), cd->ctypeid); if (!ctype_hassize(ct->info) || ct->size <= 16) return 1; } return 0; } #else UNUSED(J); #endif if (!(tvistab(o) || tvisudata(o) || tvisthread(o))) return 1; } return 0; } /* Record upvalue load/store. */ static TRef rec_upvalue(jit_State *J, uint32_t uv, TRef val) { GCupval *uvp = &gcref(J->fn->l.uvptr[uv])->uv; TRef fn = getcurrf(J); IRRef uref; int needbarrier = 0; if (rec_upvalue_constify(J, uvp)) { /* Try to constify immutable upvalue. */ TRef tr, kfunc; lua_assert(val == 0); if (!tref_isk(fn)) { /* Late specialization of current function. */ if (J->pt->flags >= PROTO_CLC_POLY) goto noconstify; kfunc = lj_ir_kfunc(J, J->fn); emitir(IRTG(IR_EQ, IRT_FUNC), fn, kfunc); J->base[-1] = TREF_FRAME | kfunc; fn = kfunc; } tr = lj_record_constify(J, uvval(uvp)); if (tr) return tr; } noconstify: /* Note: this effectively limits LJ_MAX_UPVAL to 127. */ uv = (uv << 8) | (hashrot(uvp->dhash, uvp->dhash + HASH_BIAS) & 0xff); if (!uvp->closed) { /* In current stack? */ if (uvval(uvp) >= tvref(J->L->stack) && uvval(uvp) < tvref(J->L->maxstack)) { int32_t slot = (int32_t)(uvval(uvp) - (J->L->base - J->baseslot)); if (slot >= 0) { /* Aliases an SSA slot? */ slot -= (int32_t)J->baseslot; /* Note: slot number may be negative! */ /* NYI: add IR to guard that it's still aliasing the same slot. */ if (val == 0) { return getslot(J, slot); } else { J->base[slot] = val; if (slot >= (int32_t)J->maxslot) J->maxslot = (BCReg)(slot+1); return 0; } } } uref = tref_ref(emitir(IRTG(IR_UREFO, IRT_P32), fn, uv)); } else { needbarrier = 1; uref = tref_ref(emitir(IRTG(IR_UREFC, IRT_P32), fn, uv)); } if (val == 0) { /* Upvalue load */ IRType t = itype2irt(uvval(uvp)); TRef res = emitir(IRTG(IR_ULOAD, t), uref, 0); if (irtype_ispri(t)) res = TREF_PRI(t); /* Canonicalize primitive refs. */ return res; } else { /* Upvalue store. */ /* Convert int to number before storing. */ if (!LJ_DUALNUM && tref_isinteger(val)) val = emitir(IRTN(IR_CONV), val, IRCONV_NUM_INT); emitir(IRT(IR_USTORE, tref_type(val)), uref, val); if (needbarrier && tref_isgcv(val)) emitir(IRT(IR_OBAR, IRT_NIL), uref, val); J->needsnap = 1; return 0; } } /* -- Record calls to Lua functions --------------------------------------- */ /* Check unroll limits for calls. */ static void check_call_unroll(jit_State *J, TraceNo lnk) { cTValue *frame = J->L->base - 1; void *pc = mref(frame_func(frame)->l.pc, void); int32_t depth = J->framedepth; int32_t count = 0; if ((J->pt->flags & PROTO_VARARG)) depth--; /* Vararg frame still missing. */ for (; depth > 0; depth--) { /* Count frames with same prototype. */ frame = frame_prev(frame); if (mref(frame_func(frame)->l.pc, void) == pc) count++; } if (J->pc == J->startpc) { if (count + J->tailcalled > J->param[JIT_P_recunroll]) { J->pc++; if (J->framedepth + J->retdepth == 0) rec_stop(J, LJ_TRLINK_TAILREC, J->cur.traceno); /* Tail-recursion. */ else rec_stop(J, LJ_TRLINK_UPREC, J->cur.traceno); /* Up-recursion. */ } } else { if (count > J->param[JIT_P_callunroll]) { if (lnk) { /* Possible tail- or up-recursion. */ lj_trace_flush(J, lnk); /* Flush trace that only returns. */ /* Set a small, pseudo-random hotcount for a quick retry of JFUNC*. */ hotcount_set(J2GG(J), J->pc+1, LJ_PRNG_BITS(J, 4)); } lj_trace_err(J, LJ_TRERR_CUNROLL); } } } /* Record Lua function setup. */ static void rec_func_setup(jit_State *J) { GCproto *pt = J->pt; BCReg s, numparams = pt->numparams; if ((pt->flags & PROTO_NOJIT)) lj_trace_err(J, LJ_TRERR_CJITOFF); if (J->baseslot + pt->framesize >= LJ_MAX_JSLOTS) lj_trace_err(J, LJ_TRERR_STACKOV); /* Fill up missing parameters with nil. */ for (s = J->maxslot; s < numparams; s++) J->base[s] = TREF_NIL; /* The remaining slots should never be read before they are written. */ J->maxslot = numparams; } /* Record Lua vararg function setup. */ static void rec_func_vararg(jit_State *J) { GCproto *pt = J->pt; BCReg s, fixargs, vframe = J->maxslot+1; lua_assert((pt->flags & PROTO_VARARG)); if (J->baseslot + vframe + pt->framesize >= LJ_MAX_JSLOTS) lj_trace_err(J, LJ_TRERR_STACKOV); J->base[vframe-1] = J->base[-1]; /* Copy function up. */ /* Copy fixarg slots up and set their original slots to nil. */ fixargs = pt->numparams < J->maxslot ? pt->numparams : J->maxslot; for (s = 0; s < fixargs; s++) { J->base[vframe+s] = J->base[s]; J->base[s] = TREF_NIL; } J->maxslot = fixargs; J->framedepth++; J->base += vframe; J->baseslot += vframe; } /* Record entry to a Lua function. */ static void rec_func_lua(jit_State *J) { rec_func_setup(J); check_call_unroll(J, 0); } /* Record entry to an already compiled function. */ static void rec_func_jit(jit_State *J, TraceNo lnk) { GCtrace *T; rec_func_setup(J); T = traceref(J, lnk); if (T->linktype == LJ_TRLINK_RETURN) { /* Trace returns to interpreter? */ check_call_unroll(J, lnk); /* Temporarily unpatch JFUNC* to continue recording across function. */ J->patchins = *J->pc; J->patchpc = (BCIns *)J->pc; *J->patchpc = T->startins; return; } J->instunroll = 0; /* Cannot continue across a compiled function. */ if (J->pc == J->startpc && J->framedepth + J->retdepth == 0) rec_stop(J, LJ_TRLINK_TAILREC, J->cur.traceno); /* Extra tail-recursion. */ else rec_stop(J, LJ_TRLINK_ROOT, lnk); /* Link to the function. */ } /* -- Vararg handling ----------------------------------------------------- */ /* Detect y = select(x, ...) idiom. */ static int select_detect(jit_State *J) { BCIns ins = J->pc[1]; if (bc_op(ins) == BC_CALLM && bc_b(ins) == 2 && bc_c(ins) == 1) { cTValue *func = &J->L->base[bc_a(ins)]; if (tvisfunc(func) && funcV(func)->c.ffid == FF_select) return 1; } return 0; } /* Record vararg instruction. */ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults) { int32_t numparams = J->pt->numparams; ptrdiff_t nvararg = frame_delta(J->L->base-1) - numparams - 1; lua_assert(frame_isvarg(J->L->base-1)); if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */ ptrdiff_t i; if (nvararg < 0) nvararg = 0; if (nresults == -1) { nresults = nvararg; J->maxslot = dst + (BCReg)nvararg; } else if (dst + nresults > J->maxslot) { J->maxslot = dst + (BCReg)nresults; } for (i = 0; i < nresults; i++) { J->base[dst+i] = i < nvararg ? J->base[i - nvararg - 1] : TREF_NIL; lua_assert(J->base[dst+i] != 0); } } else { /* Unknown number of varargs passed to trace. */ TRef fr = emitir(IRTI(IR_SLOAD), 0, IRSLOAD_READONLY|IRSLOAD_FRAME); int32_t frofs = 8*(1+numparams)+FRAME_VARG; if (nresults >= 0) { /* Known fixed number of results. */ ptrdiff_t i; if (nvararg > 0) { ptrdiff_t nload = nvararg >= nresults ? nresults : nvararg; TRef vbase; if (nvararg >= nresults) emitir(IRTGI(IR_GE), fr, lj_ir_kint(J, frofs+8*(int32_t)nresults)); else emitir(IRTGI(IR_EQ), fr, lj_ir_kint(J, frame_ftsz(J->L->base-1))); vbase = emitir(IRTI(IR_SUB), REF_BASE, fr); vbase = emitir(IRT(IR_ADD, IRT_P32), vbase, lj_ir_kint(J, frofs-8)); for (i = 0; i < nload; i++) { IRType t = itype2irt(&J->L->base[i-1-nvararg]); TRef aref = emitir(IRT(IR_AREF, IRT_P32), vbase, lj_ir_kint(J, (int32_t)i)); TRef tr = emitir(IRTG(IR_VLOAD, t), aref, 0); if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ J->base[dst+i] = tr; } } else { emitir(IRTGI(IR_LE), fr, lj_ir_kint(J, frofs)); nvararg = 0; } for (i = nvararg; i < nresults; i++) J->base[dst+i] = TREF_NIL; if (dst + (BCReg)nresults > J->maxslot) J->maxslot = dst + (BCReg)nresults; } else if (select_detect(J)) { /* y = select(x, ...) */ TRef tridx = J->base[dst-1]; TRef tr = TREF_NIL; ptrdiff_t idx = lj_ffrecord_select_mode(J, tridx, &J->L->base[dst-1]); if (idx < 0) goto nyivarg; if (idx != 0 && !tref_isinteger(tridx)) tridx = emitir(IRTGI(IR_CONV), tridx, IRCONV_INT_NUM|IRCONV_INDEX); if (idx != 0 && tref_isk(tridx)) { emitir(IRTGI(idx <= nvararg ? IR_GE : IR_LT), fr, lj_ir_kint(J, frofs+8*(int32_t)idx)); frofs -= 8; /* Bias for 1-based index. */ } else if (idx <= nvararg) { /* Compute size. */ TRef tmp = emitir(IRTI(IR_ADD), fr, lj_ir_kint(J, -frofs)); if (numparams) emitir(IRTGI(IR_GE), tmp, lj_ir_kint(J, 0)); tr = emitir(IRTI(IR_BSHR), tmp, lj_ir_kint(J, 3)); if (idx != 0) { tridx = emitir(IRTI(IR_ADD), tridx, lj_ir_kint(J, -1)); rec_idx_abc(J, tr, tridx, (uint32_t)nvararg); } } else { TRef tmp = lj_ir_kint(J, frofs); if (idx != 0) { TRef tmp2 = emitir(IRTI(IR_BSHL), tridx, lj_ir_kint(J, 3)); tmp = emitir(IRTI(IR_ADD), tmp2, tmp); } else { tr = lj_ir_kint(J, 0); } emitir(IRTGI(IR_LT), fr, tmp); } if (idx != 0 && idx <= nvararg) { IRType t; TRef aref, vbase = emitir(IRTI(IR_SUB), REF_BASE, fr); vbase = emitir(IRT(IR_ADD, IRT_P32), vbase, lj_ir_kint(J, frofs-8)); t = itype2irt(&J->L->base[idx-2-nvararg]); aref = emitir(IRT(IR_AREF, IRT_P32), vbase, tridx); tr = emitir(IRTG(IR_VLOAD, t), aref, 0); if (irtype_ispri(t)) tr = TREF_PRI(t); /* Canonicalize primitives. */ } J->base[dst-2] = tr; J->maxslot = dst-1; J->bcskip = 2; /* Skip CALLM + select. */ } else { nyivarg: setintV(&J->errinfo, BC_VARG); lj_trace_err_info(J, LJ_TRERR_NYIBC); } } } /* -- Record allocations -------------------------------------------------- */ static TRef rec_tnew(jit_State *J, uint32_t ah) { uint32_t asize = ah & 0x7ff; uint32_t hbits = ah >> 11; if (asize == 0x7ff) asize = 0x801; return emitir(IRTG(IR_TNEW, IRT_TAB), asize, hbits); } /* -- Record bytecode ops ------------------------------------------------- */ /* Prepare for comparison. */ static void rec_comp_prep(jit_State *J) { /* Prevent merging with snapshot #0 (GC exit) since we fixup the PC. */ if (J->cur.nsnap == 1 && J->cur.snap[0].ref == J->cur.nins) emitir_raw(IRT(IR_NOP, IRT_NIL), 0, 0); lj_snap_add(J); } /* Fixup comparison. */ static void rec_comp_fixup(jit_State *J, const BCIns *pc, int cond) { BCIns jmpins = pc[1]; const BCIns *npc = pc + 2 + (cond ? bc_j(jmpins) : 0); SnapShot *snap = &J->cur.snap[J->cur.nsnap-1]; /* Set PC to opposite target to avoid re-recording the comp. in side trace. */ J->cur.snapmap[snap->mapofs + snap->nent] = SNAP_MKPC(npc); J->needsnap = 1; if (bc_a(jmpins) < J->maxslot) J->maxslot = bc_a(jmpins); lj_snap_shrink(J); /* Shrink last snapshot if possible. */ } /* Record the next bytecode instruction (_before_ it's executed). */ void lj_record_ins(jit_State *J) { cTValue *lbase; RecordIndex ix; const BCIns *pc; BCIns ins; BCOp op; TRef ra, rb, rc; /* Perform post-processing action before recording the next instruction. */ if (LJ_UNLIKELY(J->postproc != LJ_POST_NONE)) { switch (J->postproc) { case LJ_POST_FIXCOMP: /* Fixup comparison. */ pc = frame_pc(&J2G(J)->tmptv); rec_comp_fixup(J, pc, (!tvistruecond(&J2G(J)->tmptv2) ^ (bc_op(*pc)&1))); /* fallthrough */ case LJ_POST_FIXGUARD: /* Fixup and emit pending guard. */ case LJ_POST_FIXGUARDSNAP: /* Fixup and emit pending guard and snapshot. */ if (!tvistruecond(&J2G(J)->tmptv2)) { J->fold.ins.o ^= 1; /* Flip guard to opposite. */ if (J->postproc == LJ_POST_FIXGUARDSNAP) { SnapShot *snap = &J->cur.snap[J->cur.nsnap-1]; J->cur.snapmap[snap->mapofs+snap->nent-1]--; /* False -> true. */ } } lj_opt_fold(J); /* Emit pending guard. */ /* fallthrough */ case LJ_POST_FIXBOOL: if (!tvistruecond(&J2G(J)->tmptv2)) { BCReg s; TValue *tv = J->L->base; for (s = 0; s < J->maxslot; s++) /* Fixup stack slot (if any). */ if (J->base[s] == TREF_TRUE && tvisfalse(&tv[s])) { J->base[s] = TREF_FALSE; break; } } break; case LJ_POST_FIXCONST: { BCReg s; TValue *tv = J->L->base; for (s = 0; s < J->maxslot; s++) /* Constify stack slots (if any). */ if (J->base[s] == TREF_NIL && !tvisnil(&tv[s])) J->base[s] = lj_record_constify(J, &tv[s]); } break; case LJ_POST_FFRETRY: /* Suppress recording of retried fast function. */ if (bc_op(*J->pc) >= BC__MAX) return; break; default: lua_assert(0); break; } J->postproc = LJ_POST_NONE; } /* Need snapshot before recording next bytecode (e.g. after a store). */ if (J->needsnap) { J->needsnap = 0; lj_snap_purge(J); lj_snap_add(J); J->mergesnap = 1; } /* Skip some bytecodes. */ if (LJ_UNLIKELY(J->bcskip > 0)) { J->bcskip--; return; } /* Record only closed loops for root traces. */ pc = J->pc; if (J->framedepth == 0 && (MSize)((char *)pc - (char *)J->bc_min) >= J->bc_extent) lj_trace_err(J, LJ_TRERR_LLEAVE); #ifdef LUA_USE_ASSERT rec_check_slots(J); rec_check_ir(J); #endif /* Keep a copy of the runtime values of var/num/str operands. */ #define rav (&ix.valv) #define rbv (&ix.tabv) #define rcv (&ix.keyv) lbase = J->L->base; ins = *pc; op = bc_op(ins); ra = bc_a(ins); ix.val = 0; switch (bcmode_a(op)) { case BCMvar: copyTV(J->L, rav, &lbase[ra]); ix.val = ra = getslot(J, ra); break; default: break; /* Handled later. */ } rb = bc_b(ins); rc = bc_c(ins); switch (bcmode_b(op)) { case BCMnone: rb = 0; rc = bc_d(ins); break; /* Upgrade rc to 'rd'. */ case BCMvar: copyTV(J->L, rbv, &lbase[rb]); ix.tab = rb = getslot(J, rb); break; default: break; /* Handled later. */ } switch (bcmode_c(op)) { case BCMvar: copyTV(J->L, rcv, &lbase[rc]); ix.key = rc = getslot(J, rc); break; case BCMpri: setitype(rcv, ~rc); ix.key = rc = TREF_PRI(IRT_NIL+rc); break; case BCMnum: { cTValue *tv = proto_knumtv(J->pt, rc); copyTV(J->L, rcv, tv); ix.key = rc = tvisint(tv) ? lj_ir_kint(J, intV(tv)) : lj_ir_knumint(J, numV(tv)); } break; case BCMstr: { GCstr *s = gco2str(proto_kgc(J->pt, ~(ptrdiff_t)rc)); setstrV(J->L, rcv, s); ix.key = rc = lj_ir_kstr(J, s); } break; default: break; /* Handled later. */ } switch (op) { /* -- Comparison ops ---------------------------------------------------- */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: #if LJ_HASFFI if (tref_iscdata(ra) || tref_iscdata(rc)) { rec_mm_comp_cdata(J, &ix, op, ((int)op & 2) ? MM_le : MM_lt); break; } #endif /* Emit nothing for two numeric or string consts. */ if (!(tref_isk2(ra,rc) && tref_isnumber_str(ra) && tref_isnumber_str(rc))) { IRType ta = tref_isinteger(ra) ? IRT_INT : tref_type(ra); IRType tc = tref_isinteger(rc) ? IRT_INT : tref_type(rc); int irop; if (ta != tc) { /* Widen mixed number/int comparisons to number/number comparison. */ if (ta == IRT_INT && tc == IRT_NUM) { ra = emitir(IRTN(IR_CONV), ra, IRCONV_NUM_INT); ta = IRT_NUM; } else if (ta == IRT_NUM && tc == IRT_INT) { rc = emitir(IRTN(IR_CONV), rc, IRCONV_NUM_INT); } else if (LJ_52) { ta = IRT_NIL; /* Force metamethod for different types. */ } else if (!((ta == IRT_FALSE || ta == IRT_TRUE) && (tc == IRT_FALSE || tc == IRT_TRUE))) { break; /* Interpreter will throw for two different types. */ } } rec_comp_prep(J); irop = (int)op - (int)BC_ISLT + (int)IR_LT; if (ta == IRT_NUM) { if ((irop & 1)) irop ^= 4; /* ISGE/ISGT are unordered. */ if (!lj_ir_numcmp(numberVnum(rav), numberVnum(rcv), (IROp)irop)) irop ^= 5; } else if (ta == IRT_INT) { if (!lj_ir_numcmp(numberVnum(rav), numberVnum(rcv), (IROp)irop)) irop ^= 1; } else if (ta == IRT_STR) { if (!lj_ir_strcmp(strV(rav), strV(rcv), (IROp)irop)) irop ^= 1; ra = lj_ir_call(J, IRCALL_lj_str_cmp, ra, rc); rc = lj_ir_kint(J, 0); ta = IRT_INT; } else { rec_mm_comp(J, &ix, (int)op); break; } emitir(IRTG(irop, ta), ra, rc); rec_comp_fixup(J, J->pc, ((int)op ^ irop) & 1); } break; case BC_ISEQV: case BC_ISNEV: case BC_ISEQS: case BC_ISNES: case BC_ISEQN: case BC_ISNEN: case BC_ISEQP: case BC_ISNEP: #if LJ_HASFFI if (tref_iscdata(ra) || tref_iscdata(rc)) { rec_mm_comp_cdata(J, &ix, op, MM_eq); break; } #endif /* Emit nothing for two non-table, non-udata consts. */ if (!(tref_isk2(ra, rc) && !(tref_istab(ra) || tref_isudata(ra)))) { int diff; rec_comp_prep(J); diff = lj_record_objcmp(J, ra, rc, rav, rcv); if (diff == 2 || !(tref_istab(ra) || tref_isudata(ra))) rec_comp_fixup(J, J->pc, ((int)op & 1) == !diff); else if (diff == 1) /* Only check __eq if different, but same type. */ rec_mm_equal(J, &ix, (int)op); } break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: if ((op & 1) == tref_istruecond(rc)) rc = 0; /* Don't store if condition is not true. */ /* fallthrough */ case BC_IST: case BC_ISF: /* Type specialization suffices. */ if (bc_a(pc[1]) < J->maxslot) J->maxslot = bc_a(pc[1]); /* Shrink used slots. */ break; /* -- Unary ops --------------------------------------------------------- */ case BC_NOT: /* Type specialization already forces const result. */ rc = tref_istruecond(rc) ? TREF_FALSE : TREF_TRUE; break; case BC_LEN: if (tref_isstr(rc)) rc = emitir(IRTI(IR_FLOAD), rc, IRFL_STR_LEN); else if (!LJ_52 && tref_istab(rc)) rc = lj_ir_call(J, IRCALL_lj_tab_len, rc); else rc = rec_mm_len(J, rc, rcv); break; /* -- Arithmetic ops ---------------------------------------------------- */ case BC_UNM: if (tref_isnumber_str(rc)) { rc = lj_opt_narrow_unm(J, rc, rcv); } else { ix.tab = rc; copyTV(J->L, &ix.tabv, rcv); rc = rec_mm_arith(J, &ix, MM_unm); } break; case BC_ADDNV: case BC_SUBNV: case BC_MULNV: case BC_DIVNV: case BC_MODNV: /* Swap rb/rc and rbv/rcv. rav is temp. */ ix.tab = rc; ix.key = rc = rb; rb = ix.tab; copyTV(J->L, rav, rbv); copyTV(J->L, rbv, rcv); copyTV(J->L, rcv, rav); if (op == BC_MODNV) goto recmod; /* fallthrough */ case BC_ADDVN: case BC_SUBVN: case BC_MULVN: case BC_DIVVN: case BC_ADDVV: case BC_SUBVV: case BC_MULVV: case BC_DIVVV: { MMS mm = bcmode_mm(op); if (tref_isnumber_str(rb) && tref_isnumber_str(rc)) rc = lj_opt_narrow_arith(J, rb, rc, rbv, rcv, (int)mm - (int)MM_add + (int)IR_ADD); else rc = rec_mm_arith(J, &ix, mm); break; } case BC_MODVN: case BC_MODVV: recmod: if (tref_isnumber_str(rb) && tref_isnumber_str(rc)) rc = lj_opt_narrow_mod(J, rb, rc, rcv); else rc = rec_mm_arith(J, &ix, MM_mod); break; case BC_POW: if (tref_isnumber_str(rb) && tref_isnumber_str(rc)) rc = lj_opt_narrow_pow(J, lj_ir_tonum(J, rb), rc, rcv); else rc = rec_mm_arith(J, &ix, MM_pow); break; /* -- Constant and move ops --------------------------------------------- */ case BC_MOV: /* Clear gap of method call to avoid resurrecting previous refs. */ if (ra > J->maxslot) J->base[ra-1] = 0; break; case BC_KSTR: case BC_KNUM: case BC_KPRI: break; case BC_KSHORT: rc = lj_ir_kint(J, (int32_t)(int16_t)rc); break; case BC_KNIL: while (ra <= rc) J->base[ra++] = TREF_NIL; if (rc >= J->maxslot) J->maxslot = rc+1; break; #if LJ_HASFFI case BC_KCDATA: rc = lj_ir_kgc(J, proto_kgc(J->pt, ~(ptrdiff_t)rc), IRT_CDATA); break; #endif /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: rc = rec_upvalue(J, rc, 0); break; case BC_USETV: case BC_USETS: case BC_USETN: case BC_USETP: rec_upvalue(J, ra, rc); break; /* -- Table ops --------------------------------------------------------- */ case BC_GGET: case BC_GSET: settabV(J->L, &ix.tabv, tabref(J->fn->l.env)); ix.tab = emitir(IRT(IR_FLOAD, IRT_TAB), getcurrf(J), IRFL_FUNC_ENV); ix.idxchain = LJ_MAX_IDXCHAIN; rc = lj_record_idx(J, &ix); break; case BC_TGETB: case BC_TSETB: setintV(&ix.keyv, (int32_t)rc); ix.key = lj_ir_kint(J, (int32_t)rc); /* fallthrough */ case BC_TGETV: case BC_TGETS: case BC_TSETV: case BC_TSETS: ix.idxchain = LJ_MAX_IDXCHAIN; rc = lj_record_idx(J, &ix); break; case BC_TNEW: rc = rec_tnew(J, rc); break; case BC_TDUP: rc = emitir(IRTG(IR_TDUP, IRT_TAB), lj_ir_ktab(J, gco2tab(proto_kgc(J->pt, ~(ptrdiff_t)rc))), 0); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_ITERC: J->base[ra] = getslot(J, ra-3); J->base[ra+1] = getslot(J, ra-2); J->base[ra+2] = getslot(J, ra-1); { /* Do the actual copy now because lj_record_call needs the values. */ TValue *b = &J->L->base[ra]; copyTV(J->L, b, b-3); copyTV(J->L, b+1, b-2); copyTV(J->L, b+2, b-1); } lj_record_call(J, ra, (ptrdiff_t)rc-1); break; /* L->top is set to L->base+ra+rc+NARGS-1+1. See lj_dispatch_ins(). */ case BC_CALLM: rc = (BCReg)(J->L->top - J->L->base) - ra; /* fallthrough */ case BC_CALL: lj_record_call(J, ra, (ptrdiff_t)rc-1); break; case BC_CALLMT: rc = (BCReg)(J->L->top - J->L->base) - ra; /* fallthrough */ case BC_CALLT: lj_record_tailcall(J, ra, (ptrdiff_t)rc-1); break; case BC_VARG: rec_varg(J, ra, (ptrdiff_t)rb-1); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: /* L->top is set to L->base+ra+rc+NRESULTS-1, see lj_dispatch_ins(). */ rc = (BCReg)(J->L->top - J->L->base) - ra + 1; /* fallthrough */ case BC_RET: case BC_RET0: case BC_RET1: lj_record_ret(J, ra, (ptrdiff_t)rc-1); break; /* -- Loops and branches ------------------------------------------------ */ case BC_FORI: if (rec_for(J, pc, 0) != LOOPEV_LEAVE) J->loopref = J->cur.nins; break; case BC_JFORI: lua_assert(bc_op(pc[(ptrdiff_t)rc-BCBIAS_J]) == BC_JFORL); if (rec_for(J, pc, 0) != LOOPEV_LEAVE) /* Link to existing loop. */ rec_stop(J, LJ_TRLINK_ROOT, bc_d(pc[(ptrdiff_t)rc-BCBIAS_J])); /* Continue tracing if the loop is not entered. */ break; case BC_FORL: rec_loop_interp(J, pc, rec_for(J, pc+((ptrdiff_t)rc-BCBIAS_J), 1)); break; case BC_ITERL: rec_loop_interp(J, pc, rec_iterl(J, *pc)); break; case BC_LOOP: rec_loop_interp(J, pc, rec_loop(J, ra)); break; case BC_JFORL: rec_loop_jit(J, rc, rec_for(J, pc+bc_j(traceref(J, rc)->startins), 1)); break; case BC_JITERL: rec_loop_jit(J, rc, rec_iterl(J, traceref(J, rc)->startins)); break; case BC_JLOOP: rec_loop_jit(J, rc, rec_loop(J, ra)); break; case BC_IFORL: case BC_IITERL: case BC_ILOOP: case BC_IFUNCF: case BC_IFUNCV: lj_trace_err(J, LJ_TRERR_BLACKL); break; case BC_JMP: if (ra < J->maxslot) J->maxslot = ra; /* Shrink used slots. */ break; /* -- Function headers -------------------------------------------------- */ case BC_FUNCF: rec_func_lua(J); break; case BC_JFUNCF: rec_func_jit(J, rc); break; case BC_FUNCV: rec_func_vararg(J); rec_func_lua(J); break; case BC_JFUNCV: lua_assert(0); /* Cannot happen. No hotcall counting for varag funcs. */ break; case BC_FUNCC: case BC_FUNCCW: lj_ffrecord_func(J); break; default: if (op >= BC__MAX) { lj_ffrecord_func(J); break; } /* fallthrough */ case BC_ITERN: case BC_ISNEXT: case BC_CAT: case BC_UCLO: case BC_FNEW: case BC_TSETM: setintV(&J->errinfo, (int32_t)op); lj_trace_err_info(J, LJ_TRERR_NYIBC); break; } /* rc == 0 if we have no result yet, e.g. pending __index metamethod call. */ if (bcmode_a(op) == BCMdst && rc) { J->base[ra] = rc; if (ra >= J->maxslot) J->maxslot = ra+1; } #undef rav #undef rbv #undef rcv /* Limit the number of recorded IR instructions. */ if (J->cur.nins > REF_FIRST+(IRRef)J->param[JIT_P_maxrecord]) lj_trace_err(J, LJ_TRERR_TRACEOV); } /* -- Recording setup ----------------------------------------------------- */ /* Setup recording for a root trace started by a hot loop. */ static const BCIns *rec_setup_root(jit_State *J) { /* Determine the next PC and the bytecode range for the loop. */ const BCIns *pcj, *pc = J->pc; BCIns ins = *pc; BCReg ra = bc_a(ins); switch (bc_op(ins)) { case BC_FORL: J->bc_extent = (MSize)(-bc_j(ins))*sizeof(BCIns); pc += 1+bc_j(ins); J->bc_min = pc; break; case BC_ITERL: lua_assert(bc_op(pc[-1]) == BC_ITERC); J->maxslot = ra + bc_b(pc[-1]) - 1; J->bc_extent = (MSize)(-bc_j(ins))*sizeof(BCIns); pc += 1+bc_j(ins); lua_assert(bc_op(pc[-1]) == BC_JMP); J->bc_min = pc; break; case BC_LOOP: /* Only check BC range for real loops, but not for "repeat until true". */ pcj = pc + bc_j(ins); ins = *pcj; if (bc_op(ins) == BC_JMP && bc_j(ins) < 0) { J->bc_min = pcj+1 + bc_j(ins); J->bc_extent = (MSize)(-bc_j(ins))*sizeof(BCIns); } J->maxslot = ra; pc++; break; case BC_RET: case BC_RET0: case BC_RET1: /* No bytecode range check for down-recursive root traces. */ J->maxslot = ra + bc_d(ins); break; case BC_FUNCF: /* No bytecode range check for root traces started by a hot call. */ J->maxslot = J->pt->numparams; pc++; break; default: lua_assert(0); break; } return pc; } /* Setup for recording a new trace. */ void lj_record_setup(jit_State *J) { uint32_t i; /* Initialize state related to current trace. */ memset(J->slot, 0, sizeof(J->slot)); memset(J->chain, 0, sizeof(J->chain)); memset(J->bpropcache, 0, sizeof(J->bpropcache)); J->scev.idx = REF_NIL; J->baseslot = 1; /* Invoking function is at base[-1]. */ J->base = J->slot + J->baseslot; J->maxslot = 0; J->framedepth = 0; J->retdepth = 0; J->instunroll = J->param[JIT_P_instunroll]; J->loopunroll = J->param[JIT_P_loopunroll]; J->tailcalled = 0; J->loopref = 0; J->bc_min = NULL; /* Means no limit. */ J->bc_extent = ~(MSize)0; /* Emit instructions for fixed references. Also triggers initial IR alloc. */ emitir_raw(IRT(IR_BASE, IRT_P32), J->parent, J->exitno); for (i = 0; i <= 2; i++) { IRIns *ir = IR(REF_NIL-i); ir->i = 0; ir->t.irt = (uint8_t)(IRT_NIL+i); ir->o = IR_KPRI; ir->prev = 0; } J->cur.nk = REF_TRUE; J->startpc = J->pc; setmref(J->cur.startpc, J->pc); if (J->parent) { /* Side trace. */ GCtrace *T = traceref(J, J->parent); TraceNo root = T->root ? T->root : J->parent; J->cur.root = (uint16_t)root; J->cur.startins = BCINS_AD(BC_JMP, 0, 0); /* Check whether we could at least potentially form an extra loop. */ if (J->exitno == 0 && T->snap[0].nent == 0) { /* We can narrow a FORL for some side traces, too. */ if (J->pc > proto_bc(J->pt) && bc_op(J->pc[-1]) == BC_JFORI && bc_d(J->pc[bc_j(J->pc[-1])-1]) == root) { lj_snap_add(J); rec_for_loop(J, J->pc-1, &J->scev, 1); goto sidecheck; } } else { J->startpc = NULL; /* Prevent forming an extra loop. */ } lj_snap_replay(J, T); sidecheck: if (traceref(J, J->cur.root)->nchild >= J->param[JIT_P_maxside] || T->snap[J->exitno].count >= J->param[JIT_P_hotexit] + J->param[JIT_P_tryside]) { rec_stop(J, LJ_TRLINK_INTERP, 0); } } else { /* Root trace. */ J->cur.root = 0; J->cur.startins = *J->pc; J->pc = rec_setup_root(J); /* Note: the loop instruction itself is recorded at the end and not ** at the start! So snapshot #0 needs to point to the *next* instruction. */ lj_snap_add(J); if (bc_op(J->cur.startins) == BC_FORL) rec_for_loop(J, J->pc-1, &J->scev, 1); if (1 + J->pt->framesize >= LJ_MAX_JSLOTS) lj_trace_err(J, LJ_TRERR_STACKOV); } #ifdef LUAJIT_ENABLE_CHECKHOOK /* Regularly check for instruction/line hooks from compiled code and ** exit to the interpreter if the hooks are set. ** ** This is a compile-time option and disabled by default, since the ** hook checks may be quite expensive in tight loops. ** ** Note this is only useful if hooks are *not* set most of the time. ** Use this only if you want to *asynchronously* interrupt the execution. ** ** You can set the instruction hook via lua_sethook() with a count of 1 ** from a signal handler or another native thread. Please have a look ** at the first few functions in luajit.c for an example (Ctrl-C handler). */ { TRef tr = emitir(IRT(IR_XLOAD, IRT_U8), lj_ir_kptr(J, &J2G(J)->hookmask), IRXLOAD_VOLATILE); tr = emitir(IRTI(IR_BAND), tr, lj_ir_kint(J, (LUA_MASKLINE|LUA_MASKCOUNT))); emitir(IRTGI(IR_EQ), tr, lj_ir_kint(J, 0)); } #endif } #undef IR #undef emitir_raw #undef emitir #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ccall.c0000664000000000000000000006545312231715321022311 0ustar rootroot/* ** FFI C call handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_ctype.h" #include "lj_cconv.h" #include "lj_cdata.h" #include "lj_ccall.h" #include "lj_trace.h" /* Target-specific handling of register arguments. */ #if LJ_TARGET_X86 /* -- x86 calling conventions --------------------------------------------- */ #if LJ_ABI_WIN #define CCALL_HANDLE_STRUCTRET \ /* Return structs bigger than 8 by reference (on stack only). */ \ cc->retref = (sz > 8); \ if (cc->retref) cc->stack[nsp++] = (GPRArg)dp; #define CCALL_HANDLE_COMPLEXRET CCALL_HANDLE_STRUCTRET #else #if LJ_TARGET_OSX #define CCALL_HANDLE_STRUCTRET \ /* Return structs of size 1, 2, 4 or 8 in registers. */ \ cc->retref = !(sz == 1 || sz == 2 || sz == 4 || sz == 8); \ if (cc->retref) { \ if (ngpr < maxgpr) \ cc->gpr[ngpr++] = (GPRArg)dp; \ else \ cc->stack[nsp++] = (GPRArg)dp; \ } else { /* Struct with single FP field ends up in FPR. */ \ cc->resx87 = ccall_classify_struct(cts, ctr); \ } #define CCALL_HANDLE_STRUCTRET2 \ if (cc->resx87) sp = (uint8_t *)&cc->fpr[0]; \ memcpy(dp, sp, ctr->size); #else #define CCALL_HANDLE_STRUCTRET \ cc->retref = 1; /* Return all structs by reference (in reg or on stack). */ \ if (ngpr < maxgpr) \ cc->gpr[ngpr++] = (GPRArg)dp; \ else \ cc->stack[nsp++] = (GPRArg)dp; #endif #define CCALL_HANDLE_COMPLEXRET \ /* Return complex float in GPRs and complex double by reference. */ \ cc->retref = (sz > 8); \ if (cc->retref) { \ if (ngpr < maxgpr) \ cc->gpr[ngpr++] = (GPRArg)dp; \ else \ cc->stack[nsp++] = (GPRArg)dp; \ } #endif #define CCALL_HANDLE_COMPLEXRET2 \ if (!cc->retref) \ *(int64_t *)dp = *(int64_t *)sp; /* Copy complex float from GPRs. */ #define CCALL_HANDLE_STRUCTARG \ ngpr = maxgpr; /* Pass all structs by value on the stack. */ #define CCALL_HANDLE_COMPLEXARG \ isfp = 1; /* Pass complex by value on stack. */ #define CCALL_HANDLE_REGARG \ if (!isfp) { /* Only non-FP values may be passed in registers. */ \ if (n > 1) { /* Anything > 32 bit is passed on the stack. */ \ if (!LJ_ABI_WIN) ngpr = maxgpr; /* Prevent reordering. */ \ } else if (ngpr + 1 <= maxgpr) { \ dp = &cc->gpr[ngpr]; \ ngpr += n; \ goto done; \ } \ } #elif LJ_TARGET_X64 && LJ_ABI_WIN /* -- Windows/x64 calling conventions ------------------------------------- */ #define CCALL_HANDLE_STRUCTRET \ /* Return structs of size 1, 2, 4 or 8 in a GPR. */ \ cc->retref = !(sz == 1 || sz == 2 || sz == 4 || sz == 8); \ if (cc->retref) cc->gpr[ngpr++] = (GPRArg)dp; #define CCALL_HANDLE_COMPLEXRET CCALL_HANDLE_STRUCTRET #define CCALL_HANDLE_COMPLEXRET2 \ if (!cc->retref) \ *(int64_t *)dp = *(int64_t *)sp; /* Copy complex float from GPRs. */ #define CCALL_HANDLE_STRUCTARG \ /* Pass structs of size 1, 2, 4 or 8 in a GPR by value. */ \ if (!(sz == 1 || sz == 2 || sz == 4 || sz == 8)) { \ rp = cdataptr(lj_cdata_new(cts, did, sz)); \ sz = CTSIZE_PTR; /* Pass all other structs by reference. */ \ } #define CCALL_HANDLE_COMPLEXARG \ /* Pass complex float in a GPR and complex double by reference. */ \ if (sz != 2*sizeof(float)) { \ rp = cdataptr(lj_cdata_new(cts, did, sz)); \ sz = CTSIZE_PTR; \ } /* Windows/x64 argument registers are strictly positional (use ngpr). */ #define CCALL_HANDLE_REGARG \ if (isfp) { \ if (ngpr < maxgpr) { dp = &cc->fpr[ngpr++]; nfpr = ngpr; goto done; } \ } else { \ if (ngpr < maxgpr) { dp = &cc->gpr[ngpr++]; goto done; } \ } #elif LJ_TARGET_X64 /* -- POSIX/x64 calling conventions --------------------------------------- */ #define CCALL_HANDLE_STRUCTRET \ int rcl[2]; rcl[0] = rcl[1] = 0; \ if (ccall_classify_struct(cts, ctr, rcl, 0)) { \ cc->retref = 1; /* Return struct by reference. */ \ cc->gpr[ngpr++] = (GPRArg)dp; \ } else { \ cc->retref = 0; /* Return small structs in registers. */ \ } #define CCALL_HANDLE_STRUCTRET2 \ int rcl[2]; rcl[0] = rcl[1] = 0; \ ccall_classify_struct(cts, ctr, rcl, 0); \ ccall_struct_ret(cc, rcl, dp, ctr->size); #define CCALL_HANDLE_COMPLEXRET \ /* Complex values are returned in one or two FPRs. */ \ cc->retref = 0; #define CCALL_HANDLE_COMPLEXRET2 \ if (ctr->size == 2*sizeof(float)) { /* Copy complex float from FPR. */ \ *(int64_t *)dp = cc->fpr[0].l[0]; \ } else { /* Copy non-contiguous complex double from FPRs. */ \ ((int64_t *)dp)[0] = cc->fpr[0].l[0]; \ ((int64_t *)dp)[1] = cc->fpr[1].l[0]; \ } #define CCALL_HANDLE_STRUCTARG \ int rcl[2]; rcl[0] = rcl[1] = 0; \ if (!ccall_classify_struct(cts, d, rcl, 0)) { \ cc->nsp = nsp; cc->ngpr = ngpr; cc->nfpr = nfpr; \ if (ccall_struct_arg(cc, cts, d, rcl, o, narg)) goto err_nyi; \ nsp = cc->nsp; ngpr = cc->ngpr; nfpr = cc->nfpr; \ continue; \ } /* Pass all other structs by value on stack. */ #define CCALL_HANDLE_COMPLEXARG \ isfp = 2; /* Pass complex in FPRs or on stack. Needs postprocessing. */ #define CCALL_HANDLE_REGARG \ if (isfp) { /* Try to pass argument in FPRs. */ \ int n2 = ctype_isvector(d->info) ? 1 : n; \ if (nfpr + n2 <= CCALL_NARG_FPR) { \ dp = &cc->fpr[nfpr]; \ nfpr += n2; \ goto done; \ } \ } else { /* Try to pass argument in GPRs. */ \ /* Note that reordering is explicitly allowed in the x64 ABI. */ \ if (n <= 2 && ngpr + n <= maxgpr) { \ dp = &cc->gpr[ngpr]; \ ngpr += n; \ goto done; \ } \ } #elif LJ_TARGET_ARM /* -- ARM calling conventions --------------------------------------------- */ #if LJ_ABI_SOFTFP #define CCALL_HANDLE_STRUCTRET \ /* Return structs of size <= 4 in a GPR. */ \ cc->retref = !(sz <= 4); \ if (cc->retref) cc->gpr[ngpr++] = (GPRArg)dp; #define CCALL_HANDLE_COMPLEXRET \ cc->retref = 1; /* Return all complex values by reference. */ \ cc->gpr[ngpr++] = (GPRArg)dp; #define CCALL_HANDLE_COMPLEXRET2 \ UNUSED(dp); /* Nothing to do. */ #define CCALL_HANDLE_STRUCTARG \ /* Pass all structs by value in registers and/or on the stack. */ #define CCALL_HANDLE_COMPLEXARG \ /* Pass complex by value in 2 or 4 GPRs. */ #define CCALL_HANDLE_REGARG_FP1 #define CCALL_HANDLE_REGARG_FP2 #else #define CCALL_HANDLE_STRUCTRET \ cc->retref = !ccall_classify_struct(cts, ctr, ct); \ if (cc->retref) cc->gpr[ngpr++] = (GPRArg)dp; #define CCALL_HANDLE_STRUCTRET2 \ if (ccall_classify_struct(cts, ctr, ct) > 1) sp = (uint8_t *)&cc->fpr[0]; \ memcpy(dp, sp, ctr->size); #define CCALL_HANDLE_COMPLEXRET \ if (!(ct->info & CTF_VARARG)) cc->retref = 0; /* Return complex in FPRs. */ #define CCALL_HANDLE_COMPLEXRET2 \ if (!(ct->info & CTF_VARARG)) memcpy(dp, &cc->fpr[0], ctr->size); #define CCALL_HANDLE_STRUCTARG \ isfp = (ccall_classify_struct(cts, d, ct) > 1); /* Pass all structs by value in registers and/or on the stack. */ #define CCALL_HANDLE_COMPLEXARG \ isfp = 1; /* Pass complex by value in FPRs or on stack. */ #define CCALL_HANDLE_REGARG_FP1 \ if (isfp && !(ct->info & CTF_VARARG)) { \ if ((d->info & CTF_ALIGN) > CTALIGN_PTR) { \ if (nfpr + (n >> 1) <= CCALL_NARG_FPR) { \ dp = &cc->fpr[nfpr]; \ nfpr += (n >> 1); \ goto done; \ } \ } else { \ if (sz > 1 && fprodd != nfpr) fprodd = 0; \ if (fprodd) { \ if (2*nfpr+n <= 2*CCALL_NARG_FPR+1) { \ dp = (void *)&cc->fpr[fprodd-1].f[1]; \ nfpr += (n >> 1); \ if ((n & 1)) fprodd = 0; else fprodd = nfpr-1; \ goto done; \ } \ } else { \ if (2*nfpr+n <= 2*CCALL_NARG_FPR) { \ dp = (void *)&cc->fpr[nfpr]; \ nfpr += (n >> 1); \ if ((n & 1)) fprodd = ++nfpr; else fprodd = 0; \ goto done; \ } \ } \ } \ fprodd = 0; /* No reordering after the first FP value is on stack. */ \ } else { #define CCALL_HANDLE_REGARG_FP2 } #endif #define CCALL_HANDLE_REGARG \ CCALL_HANDLE_REGARG_FP1 \ if ((d->info & CTF_ALIGN) > CTALIGN_PTR) { \ if (ngpr < maxgpr) \ ngpr = (ngpr + 1u) & ~1u; /* Align to regpair. */ \ } \ if (ngpr < maxgpr) { \ dp = &cc->gpr[ngpr]; \ if (ngpr + n > maxgpr) { \ nsp += ngpr + n - maxgpr; /* Assumes contiguous gpr/stack fields. */ \ if (nsp > CCALL_MAXSTACK) goto err_nyi; /* Too many arguments. */ \ ngpr = maxgpr; \ } else { \ ngpr += n; \ } \ goto done; \ } CCALL_HANDLE_REGARG_FP2 #define CCALL_HANDLE_RET \ if ((ct->info & CTF_VARARG)) sp = (uint8_t *)&cc->gpr[0]; #elif LJ_TARGET_PPC /* -- PPC calling conventions --------------------------------------------- */ #define CCALL_HANDLE_STRUCTRET \ cc->retref = 1; /* Return all structs by reference. */ \ cc->gpr[ngpr++] = (GPRArg)dp; #define CCALL_HANDLE_COMPLEXRET \ /* Complex values are returned in 2 or 4 GPRs. */ \ cc->retref = 0; #define CCALL_HANDLE_COMPLEXRET2 \ memcpy(dp, sp, ctr->size); /* Copy complex from GPRs. */ #define CCALL_HANDLE_STRUCTARG \ rp = cdataptr(lj_cdata_new(cts, did, sz)); \ sz = CTSIZE_PTR; /* Pass all structs by reference. */ #define CCALL_HANDLE_COMPLEXARG \ /* Pass complex by value in 2 or 4 GPRs. */ #define CCALL_HANDLE_REGARG \ if (isfp) { /* Try to pass argument in FPRs. */ \ if (nfpr + 1 <= CCALL_NARG_FPR) { \ dp = &cc->fpr[nfpr]; \ nfpr += 1; \ d = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ \ goto done; \ } \ } else { /* Try to pass argument in GPRs. */ \ if (n > 1) { \ lua_assert(n == 2 || n == 4); /* int64_t or complex (float). */ \ if (ctype_isinteger(d->info)) \ ngpr = (ngpr + 1u) & ~1u; /* Align int64_t to regpair. */ \ else if (ngpr + n > maxgpr) \ ngpr = maxgpr; /* Prevent reordering. */ \ } \ if (ngpr + n <= maxgpr) { \ dp = &cc->gpr[ngpr]; \ ngpr += n; \ goto done; \ } \ } #define CCALL_HANDLE_RET \ if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ ctr = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ #elif LJ_TARGET_PPCSPE /* -- PPC/SPE calling conventions ----------------------------------------- */ #define CCALL_HANDLE_STRUCTRET \ cc->retref = 1; /* Return all structs by reference. */ \ cc->gpr[ngpr++] = (GPRArg)dp; #define CCALL_HANDLE_COMPLEXRET \ /* Complex values are returned in 2 or 4 GPRs. */ \ cc->retref = 0; #define CCALL_HANDLE_COMPLEXRET2 \ memcpy(dp, sp, ctr->size); /* Copy complex from GPRs. */ #define CCALL_HANDLE_STRUCTARG \ rp = cdataptr(lj_cdata_new(cts, did, sz)); \ sz = CTSIZE_PTR; /* Pass all structs by reference. */ #define CCALL_HANDLE_COMPLEXARG \ /* Pass complex by value in 2 or 4 GPRs. */ /* PPC/SPE has a softfp ABI. */ #define CCALL_HANDLE_REGARG \ if (n > 1) { /* Doesn't fit in a single GPR? */ \ lua_assert(n == 2 || n == 4); /* int64_t, double or complex (float). */ \ if (n == 2) \ ngpr = (ngpr + 1u) & ~1u; /* Only align 64 bit value to regpair. */ \ else if (ngpr + n > maxgpr) \ ngpr = maxgpr; /* Prevent reordering. */ \ } \ if (ngpr + n <= maxgpr) { \ dp = &cc->gpr[ngpr]; \ ngpr += n; \ goto done; \ } #elif LJ_TARGET_MIPS /* -- MIPS calling conventions -------------------------------------------- */ #define CCALL_HANDLE_STRUCTRET \ cc->retref = 1; /* Return all structs by reference. */ \ cc->gpr[ngpr++] = (GPRArg)dp; #define CCALL_HANDLE_COMPLEXRET \ /* Complex values are returned in 1 or 2 FPRs. */ \ cc->retref = 0; #define CCALL_HANDLE_COMPLEXRET2 \ if (ctr->size == 2*sizeof(float)) { /* Copy complex float from FPRs. */ \ ((float *)dp)[0] = cc->fpr[0].f; \ ((float *)dp)[1] = cc->fpr[1].f; \ } else { /* Copy complex double from FPRs. */ \ ((double *)dp)[0] = cc->fpr[0].d; \ ((double *)dp)[1] = cc->fpr[1].d; \ } #define CCALL_HANDLE_STRUCTARG \ /* Pass all structs by value in registers and/or on the stack. */ #define CCALL_HANDLE_COMPLEXARG \ /* Pass complex by value in 2 or 4 GPRs. */ #define CCALL_HANDLE_REGARG \ if (isfp && nfpr < CCALL_NARG_FPR && !(ct->info & CTF_VARARG)) { \ /* Try to pass argument in FPRs. */ \ dp = n == 1 ? (void *)&cc->fpr[nfpr].f : (void *)&cc->fpr[nfpr].d; \ nfpr++; ngpr += n; \ goto done; \ } else { /* Try to pass argument in GPRs. */ \ nfpr = CCALL_NARG_FPR; \ if ((d->info & CTF_ALIGN) > CTALIGN_PTR) \ ngpr = (ngpr + 1u) & ~1u; /* Align to regpair. */ \ if (ngpr < maxgpr) { \ dp = &cc->gpr[ngpr]; \ if (ngpr + n > maxgpr) { \ nsp += ngpr + n - maxgpr; /* Assumes contiguous gpr/stack fields. */ \ if (nsp > CCALL_MAXSTACK) goto err_nyi; /* Too many arguments. */ \ ngpr = maxgpr; \ } else { \ ngpr += n; \ } \ goto done; \ } \ } #define CCALL_HANDLE_RET \ if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ sp = (uint8_t *)&cc->fpr[0].f; #else #error "Missing calling convention definitions for this architecture" #endif #ifndef CCALL_HANDLE_STRUCTRET2 #define CCALL_HANDLE_STRUCTRET2 \ memcpy(dp, sp, ctr->size); /* Copy struct return value from GPRs. */ #endif /* -- x86 OSX ABI struct classification ----------------------------------- */ #if LJ_TARGET_X86 && LJ_TARGET_OSX /* Check for struct with single FP field. */ static int ccall_classify_struct(CTState *cts, CType *ct) { CTSize sz = ct->size; if (!(sz == sizeof(float) || sz == sizeof(double))) return 0; if ((ct->info & CTF_UNION)) return 0; while (ct->sib) { ct = ctype_get(cts, ct->sib); if (ctype_isfield(ct->info)) { CType *sct = ctype_rawchild(cts, ct); if (ctype_isfp(sct->info)) { if (sct->size == sz) return (sz >> 2); /* Return 1 for float or 2 for double. */ } else if (ctype_isstruct(sct->info)) { if (sct->size) return ccall_classify_struct(cts, sct); } else { break; } } else if (ctype_isbitfield(ct->info)) { break; } else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) { CType *sct = ctype_rawchild(cts, ct); if (sct->size) return ccall_classify_struct(cts, sct); } } return 0; } #endif /* -- x64 struct classification ------------------------------------------- */ #if LJ_TARGET_X64 && !LJ_ABI_WIN /* Register classes for x64 struct classification. */ #define CCALL_RCL_INT 1 #define CCALL_RCL_SSE 2 #define CCALL_RCL_MEM 4 /* NYI: classify vectors. */ static int ccall_classify_struct(CTState *cts, CType *ct, int *rcl, CTSize ofs); /* Classify a C type. */ static void ccall_classify_ct(CTState *cts, CType *ct, int *rcl, CTSize ofs) { if (ctype_isarray(ct->info)) { CType *cct = ctype_rawchild(cts, ct); CTSize eofs, esz = cct->size, asz = ct->size; for (eofs = 0; eofs < asz; eofs += esz) ccall_classify_ct(cts, cct, rcl, ofs+eofs); } else if (ctype_isstruct(ct->info)) { ccall_classify_struct(cts, ct, rcl, ofs); } else { int cl = ctype_isfp(ct->info) ? CCALL_RCL_SSE : CCALL_RCL_INT; lua_assert(ctype_hassize(ct->info)); if ((ofs & (ct->size-1))) cl = CCALL_RCL_MEM; /* Unaligned. */ rcl[(ofs >= 8)] |= cl; } } /* Recursively classify a struct based on its fields. */ static int ccall_classify_struct(CTState *cts, CType *ct, int *rcl, CTSize ofs) { if (ct->size > 16) return CCALL_RCL_MEM; /* Too big, gets memory class. */ while (ct->sib) { CTSize fofs; ct = ctype_get(cts, ct->sib); fofs = ofs+ct->size; if (ctype_isfield(ct->info)) ccall_classify_ct(cts, ctype_rawchild(cts, ct), rcl, fofs); else if (ctype_isbitfield(ct->info)) rcl[(fofs >= 8)] |= CCALL_RCL_INT; /* NYI: unaligned bitfields? */ else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) ccall_classify_struct(cts, ctype_rawchild(cts, ct), rcl, fofs); } return ((rcl[0]|rcl[1]) & CCALL_RCL_MEM); /* Memory class? */ } /* Try to split up a small struct into registers. */ static int ccall_struct_reg(CCallState *cc, GPRArg *dp, int *rcl) { MSize ngpr = cc->ngpr, nfpr = cc->nfpr; uint32_t i; for (i = 0; i < 2; i++) { lua_assert(!(rcl[i] & CCALL_RCL_MEM)); if ((rcl[i] & CCALL_RCL_INT)) { /* Integer class takes precedence. */ if (ngpr >= CCALL_NARG_GPR) return 1; /* Register overflow. */ cc->gpr[ngpr++] = dp[i]; } else if ((rcl[i] & CCALL_RCL_SSE)) { if (nfpr >= CCALL_NARG_FPR) return 1; /* Register overflow. */ cc->fpr[nfpr++].l[0] = dp[i]; } } cc->ngpr = ngpr; cc->nfpr = nfpr; return 0; /* Ok. */ } /* Pass a small struct argument. */ static int ccall_struct_arg(CCallState *cc, CTState *cts, CType *d, int *rcl, TValue *o, int narg) { GPRArg dp[2]; dp[0] = dp[1] = 0; /* Convert to temp. struct. */ lj_cconv_ct_tv(cts, d, (uint8_t *)dp, o, CCF_ARG(narg)); if (ccall_struct_reg(cc, dp, rcl)) { /* Register overflow? Pass on stack. */ MSize nsp = cc->nsp, n = rcl[1] ? 2 : 1; if (nsp + n > CCALL_MAXSTACK) return 1; /* Too many arguments. */ cc->nsp = nsp + n; memcpy(&cc->stack[nsp], dp, n*CTSIZE_PTR); } return 0; /* Ok. */ } /* Combine returned small struct. */ static void ccall_struct_ret(CCallState *cc, int *rcl, uint8_t *dp, CTSize sz) { GPRArg sp[2]; MSize ngpr = 0, nfpr = 0; uint32_t i; for (i = 0; i < 2; i++) { if ((rcl[i] & CCALL_RCL_INT)) { /* Integer class takes precedence. */ sp[i] = cc->gpr[ngpr++]; } else if ((rcl[i] & CCALL_RCL_SSE)) { sp[i] = cc->fpr[nfpr++].l[0]; } } memcpy(dp, sp, sz); } #endif /* -- ARM hard-float ABI struct classification ---------------------------- */ #if LJ_TARGET_ARM && !LJ_ABI_SOFTFP /* Classify a struct based on its fields. */ static unsigned int ccall_classify_struct(CTState *cts, CType *ct, CType *ctf) { CTSize sz = ct->size; unsigned int r = 0, n = 0, isu = (ct->info & CTF_UNION); if ((ctf->info & CTF_VARARG)) goto noth; while (ct->sib) { CType *sct; ct = ctype_get(cts, ct->sib); if (ctype_isfield(ct->info)) { sct = ctype_rawchild(cts, ct); if (ctype_isfp(sct->info)) { r |= sct->size; if (!isu) n++; else if (n == 0) n = 1; } else if (ctype_iscomplex(sct->info)) { r |= (sct->size >> 1); if (!isu) n += 2; else if (n < 2) n = 2; } else if (ctype_isstruct(sct->info)) { goto substruct; } else { goto noth; } } else if (ctype_isbitfield(ct->info)) { goto noth; } else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) { sct = ctype_rawchild(cts, ct); substruct: if (sct->size > 0) { unsigned int s = ccall_classify_struct(cts, sct, ctf); if (s <= 1) goto noth; r |= (s & 255); if (!isu) n += (s >> 8); else if (n < (s >>8)) n = (s >> 8); } } } if ((r == 4 || r == 8) && n <= 4) return r + (n << 8); noth: /* Not a homogeneous float/double aggregate. */ return (sz <= 4); /* Return structs of size <= 4 in a GPR. */ } #endif /* -- Common C call handling ---------------------------------------------- */ /* Infer the destination CTypeID for a vararg argument. */ CTypeID lj_ccall_ctid_vararg(CTState *cts, cTValue *o) { if (tvisnumber(o)) { return CTID_DOUBLE; } else if (tviscdata(o)) { CTypeID id = cdataV(o)->ctypeid; CType *s = ctype_get(cts, id); if (ctype_isrefarray(s->info)) { return lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|ctype_cid(s->info)), CTSIZE_PTR); } else if (ctype_isstruct(s->info) || ctype_isfunc(s->info)) { /* NYI: how to pass a struct by value in a vararg argument? */ return lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR); } else if (ctype_isfp(s->info) && s->size == sizeof(float)) { return CTID_DOUBLE; } else { return id; } } else if (tvisstr(o)) { return CTID_P_CCHAR; } else if (tvisbool(o)) { return CTID_BOOL; } else { return CTID_P_VOID; } } /* Setup arguments for C call. */ static int ccall_set_args(lua_State *L, CTState *cts, CType *ct, CCallState *cc) { int gcsteps = 0; TValue *o, *top = L->top; CTypeID fid; CType *ctr; MSize maxgpr, ngpr = 0, nsp = 0, narg; #if CCALL_NARG_FPR MSize nfpr = 0; #if LJ_TARGET_ARM MSize fprodd = 0; #endif #endif /* Clear unused regs to get some determinism in case of misdeclaration. */ memset(cc->gpr, 0, sizeof(cc->gpr)); #if CCALL_NUM_FPR memset(cc->fpr, 0, sizeof(cc->fpr)); #endif #if LJ_TARGET_X86 /* x86 has several different calling conventions. */ cc->resx87 = 0; switch (ctype_cconv(ct->info)) { case CTCC_FASTCALL: maxgpr = 2; break; case CTCC_THISCALL: maxgpr = 1; break; default: maxgpr = 0; break; } #else maxgpr = CCALL_NARG_GPR; #endif /* Perform required setup for some result types. */ ctr = ctype_rawchild(cts, ct); if (ctype_isvector(ctr->info)) { if (!(CCALL_VECTOR_REG && (ctr->size == 8 || ctr->size == 16))) goto err_nyi; } else if (ctype_iscomplex(ctr->info) || ctype_isstruct(ctr->info)) { /* Preallocate cdata object and anchor it after arguments. */ CTSize sz = ctr->size; GCcdata *cd = lj_cdata_new(cts, ctype_cid(ct->info), sz); void *dp = cdataptr(cd); setcdataV(L, L->top++, cd); if (ctype_isstruct(ctr->info)) { CCALL_HANDLE_STRUCTRET } else { CCALL_HANDLE_COMPLEXRET } #if LJ_TARGET_X86 } else if (ctype_isfp(ctr->info)) { cc->resx87 = ctr->size == sizeof(float) ? 1 : 2; #endif } /* Skip initial attributes. */ fid = ct->sib; while (fid) { CType *ctf = ctype_get(cts, fid); if (!ctype_isattrib(ctf->info)) break; fid = ctf->sib; } /* Walk through all passed arguments. */ for (o = L->base+1, narg = 1; o < top; o++, narg++) { CTypeID did; CType *d; CTSize sz; MSize n, isfp = 0, isva = 0; void *dp, *rp = NULL; if (fid) { /* Get argument type from field. */ CType *ctf = ctype_get(cts, fid); fid = ctf->sib; lua_assert(ctype_isfield(ctf->info)); did = ctype_cid(ctf->info); } else { if (!(ct->info & CTF_VARARG)) lj_err_caller(L, LJ_ERR_FFI_NUMARG); /* Too many arguments. */ did = lj_ccall_ctid_vararg(cts, o); /* Infer vararg type. */ isva = 1; } d = ctype_raw(cts, did); sz = d->size; /* Find out how (by value/ref) and where (GPR/FPR) to pass an argument. */ if (ctype_isnum(d->info)) { if (sz > 8) goto err_nyi; if ((d->info & CTF_FP)) isfp = 1; } else if (ctype_isvector(d->info)) { if (CCALL_VECTOR_REG && (sz == 8 || sz == 16)) isfp = 1; else goto err_nyi; } else if (ctype_isstruct(d->info)) { CCALL_HANDLE_STRUCTARG } else if (ctype_iscomplex(d->info)) { CCALL_HANDLE_COMPLEXARG } else { sz = CTSIZE_PTR; } sz = (sz + CTSIZE_PTR-1) & ~(CTSIZE_PTR-1); n = sz / CTSIZE_PTR; /* Number of GPRs or stack slots needed. */ CCALL_HANDLE_REGARG /* Handle register arguments. */ /* Otherwise pass argument on stack. */ if (CCALL_ALIGN_STACKARG && !rp && (d->info & CTF_ALIGN) > CTALIGN_PTR) { MSize align = (1u << ctype_align(d->info-CTALIGN_PTR)) -1; nsp = (nsp + align) & ~align; /* Align argument on stack. */ } if (nsp + n > CCALL_MAXSTACK) { /* Too many arguments. */ err_nyi: lj_err_caller(L, LJ_ERR_FFI_NYICALL); } dp = &cc->stack[nsp]; nsp += n; isva = 0; done: if (rp) { /* Pass by reference. */ gcsteps++; *(void **)dp = rp; dp = rp; } lj_cconv_ct_tv(cts, d, (uint8_t *)dp, o, CCF_ARG(narg)); /* Extend passed integers to 32 bits at least. */ if (ctype_isinteger_or_bool(d->info) && d->size < 4) { if (d->info & CTF_UNSIGNED) *(uint32_t *)dp = d->size == 1 ? (uint32_t)*(uint8_t *)dp : (uint32_t)*(uint16_t *)dp; else *(int32_t *)dp = d->size == 1 ? (int32_t)*(int8_t *)dp : (int32_t)*(int16_t *)dp; } #if LJ_TARGET_X64 && LJ_ABI_WIN if (isva) { /* Windows/x64 mirrors varargs in both register sets. */ if (nfpr == ngpr) cc->gpr[ngpr-1] = cc->fpr[ngpr-1].l[0]; else cc->fpr[ngpr-1].l[0] = cc->gpr[ngpr-1]; } #else UNUSED(isva); #endif #if LJ_TARGET_X64 && !LJ_ABI_WIN if (isfp == 2 && n == 2 && (uint8_t *)dp == (uint8_t *)&cc->fpr[nfpr-2]) { cc->fpr[nfpr-1].d[0] = cc->fpr[nfpr-2].d[1]; /* Split complex double. */ cc->fpr[nfpr-2].d[1] = 0; } #else UNUSED(isfp); #endif } if (fid) lj_err_caller(L, LJ_ERR_FFI_NUMARG); /* Too few arguments. */ #if LJ_TARGET_X64 || LJ_TARGET_PPC cc->nfpr = nfpr; /* Required for vararg functions. */ #endif cc->nsp = nsp; cc->spadj = (CCALL_SPS_FREE + CCALL_SPS_EXTRA)*CTSIZE_PTR; if (nsp > CCALL_SPS_FREE) cc->spadj += (((nsp-CCALL_SPS_FREE)*CTSIZE_PTR + 15u) & ~15u); return gcsteps; } /* Get results from C call. */ static int ccall_get_results(lua_State *L, CTState *cts, CType *ct, CCallState *cc, int *ret) { CType *ctr = ctype_rawchild(cts, ct); uint8_t *sp = (uint8_t *)&cc->gpr[0]; if (ctype_isvoid(ctr->info)) { *ret = 0; /* Zero results. */ return 0; /* No additional GC step. */ } *ret = 1; /* One result. */ if (ctype_isstruct(ctr->info)) { /* Return cdata object which is already on top of stack. */ if (!cc->retref) { void *dp = cdataptr(cdataV(L->top-1)); /* Use preallocated object. */ CCALL_HANDLE_STRUCTRET2 } return 1; /* One GC step. */ } if (ctype_iscomplex(ctr->info)) { /* Return cdata object which is already on top of stack. */ void *dp = cdataptr(cdataV(L->top-1)); /* Use preallocated object. */ CCALL_HANDLE_COMPLEXRET2 return 1; /* One GC step. */ } if (LJ_BE && ctype_isinteger_or_bool(ctr->info) && ctr->size < CTSIZE_PTR) sp += (CTSIZE_PTR - ctr->size); #if CCALL_NUM_FPR if (ctype_isfp(ctr->info) || ctype_isvector(ctr->info)) sp = (uint8_t *)&cc->fpr[0]; #endif #ifdef CCALL_HANDLE_RET CCALL_HANDLE_RET #endif /* No reference types end up here, so there's no need for the CTypeID. */ lua_assert(!(ctype_isrefarray(ctr->info) || ctype_isstruct(ctr->info))); return lj_cconv_tv_ct(cts, ctr, 0, L->top-1, sp); } /* Call C function. */ int lj_ccall_func(lua_State *L, GCcdata *cd) { CTState *cts = ctype_cts(L); CType *ct = ctype_raw(cts, cd->ctypeid); CTSize sz = CTSIZE_PTR; if (ctype_isptr(ct->info)) { sz = ct->size; ct = ctype_rawchild(cts, ct); } if (ctype_isfunc(ct->info)) { CCallState cc; int gcsteps, ret; cc.func = (void (*)(void))cdata_getptr(cdataptr(cd), sz); gcsteps = ccall_set_args(L, cts, ct, &cc); ct = (CType *)((intptr_t)ct-(intptr_t)cts->tab); cts->cb.slot = ~0u; lj_vm_ffi_call(&cc); if (cts->cb.slot != ~0u) { /* Blacklist function that called a callback. */ TValue tv; setlightudV(&tv, (void *)cc.func); setboolV(lj_tab_set(L, cts->miscmap, &tv), 1); } ct = (CType *)((intptr_t)ct+(intptr_t)cts->tab); /* May be reallocated. */ gcsteps += ccall_get_results(L, cts, ct, &cc, &ret); #if LJ_TARGET_X86 && LJ_ABI_WIN /* Automatically detect __stdcall and fix up C function declaration. */ if (cc.spadj && ctype_cconv(ct->info) == CTCC_CDECL) { CTF_INSERT(ct->info, CCONV, CTCC_STDCALL); lj_trace_abort(G(L)); } #endif while (gcsteps-- > 0) lj_gc_check(L); return ret; } return -1; /* Not a function. */ } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_udata.c0000664000000000000000000000152012202141143022303 0ustar rootroot/* ** Userdata handling. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #define lj_udata_c #define LUA_CORE #include "lj_obj.h" #include "lj_gc.h" #include "lj_udata.h" GCudata *lj_udata_new(lua_State *L, MSize sz, GCtab *env) { GCudata *ud = lj_mem_newt(L, sizeof(GCudata) + sz, GCudata); global_State *g = G(L); newwhite(g, ud); /* Not finalized. */ ud->gct = ~LJ_TUDATA; ud->udtype = UDTYPE_USERDATA; ud->len = sz; /* NOBARRIER: The GCudata is new (marked white). */ setgcrefnull(ud->metatable); setgcref(ud->env, obj2gco(env)); /* Chain to userdata list (after main thread). */ setgcrefr(ud->nextgc, mainthread(g)->nextgc); setgcref(mainthread(g)->nextgc, obj2gco(ud)); return ud; } void LJ_FASTCALL lj_udata_free(global_State *g, GCudata *ud) { lj_mem_free(g, ud, sizeudata(ud)); } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/vm_mips.dasc0000664000000000000000000034750012202141143022675 0ustar rootroot|// Low-level VM code for MIPS CPUs. |// Bytecode interpreter, fast functions and helper functions. |// Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h | |.arch mips |.section code_op, code_sub | |.actionlist build_actionlist |.globals GLOB_ |.globalnames globnames |.externnames extnames | |// Note: The ragged indentation of the instructions is intentional. |// The starting columns indicate data dependencies. | |//----------------------------------------------------------------------- | |// Fixed register assignments for the interpreter. |// Don't use: r0 = 0, r26/r27 = reserved, r28 = gp, r29 = sp, r31 = ra | |// The following must be C callee-save (but BASE is often refetched). |.define BASE, r16 // Base of current Lua stack frame. |.define KBASE, r17 // Constants of current Lua function. |.define PC, r18 // Next PC. |.define DISPATCH, r19 // Opcode dispatch table. |.define LREG, r20 // Register holding lua_State (also in SAVE_L). |.define MULTRES, r21 // Size of multi-result: (nresults+1)*8. |// NYI: r22 currently unused. | |.define JGL, r30 // On-trace: global_State + 32768. | |// Constants for type-comparisons, stores and conversions. C callee-save. |.define TISNIL, r30 |.define TOBIT, f30 // 2^52 + 2^51. | |// The following temporaries are not saved across C calls, except for RA. |.define RA, r23 // Callee-save. |.define RB, r8 |.define RC, r9 |.define RD, r10 |.define INS, r11 | |.define AT, r1 // Assembler temporary. |.define TMP0, r12 |.define TMP1, r13 |.define TMP2, r14 |.define TMP3, r15 | |// Calling conventions. |.define CFUNCADDR, r25 |.define CARG1, r4 |.define CARG2, r5 |.define CARG3, r6 |.define CARG4, r7 | |.define CRET1, r2 |.define CRET2, r3 | |.define FARG1, f12 |.define FARG2, f14 | |.define FRET1, f0 |.define FRET2, f2 | |// Stack layout while in interpreter. Must match with lj_frame.h. |.define CFRAME_SPACE, 112 // Delta for sp. | |.define SAVE_ERRF, 124(sp) // 32 bit C frame info. |.define SAVE_NRES, 120(sp) |.define SAVE_CFRAME, 116(sp) |.define SAVE_L, 112(sp) |//----- 8 byte aligned, ^^^^ 16 byte register save area, owned by interpreter. |.define SAVE_GPR_, 72 // .. 72+10*4: 32 bit GPR saves. |.define SAVE_FPR_, 24 // .. 24+6*8: 64 bit FPR saves. |.define SAVE_PC, 20(sp) |.define ARG5, 16(sp) |.define CSAVE_4, 12(sp) |.define CSAVE_3, 8(sp) |.define CSAVE_2, 4(sp) |.define CSAVE_1, 0(sp) |//----- 8 byte aligned, ^^^^ 16 byte register save area, owned by callee. | |.define ARG5_OFS, 16 |.define SAVE_MULTRES, ARG5 | |.macro saveregs | addiu sp, sp, -CFRAME_SPACE | sw ra, SAVE_GPR_+9*4(sp) | sw r30, SAVE_GPR_+8*4(sp) | sdc1 f30, SAVE_FPR_+5*8(sp) | sw r23, SAVE_GPR_+7*4(sp) | sw r22, SAVE_GPR_+6*4(sp) | sdc1 f28, SAVE_FPR_+4*8(sp) | sw r21, SAVE_GPR_+5*4(sp) | sw r20, SAVE_GPR_+4*4(sp) | sdc1 f26, SAVE_FPR_+3*8(sp) | sw r19, SAVE_GPR_+3*4(sp) | sw r18, SAVE_GPR_+2*4(sp) | sdc1 f24, SAVE_FPR_+2*8(sp) | sw r17, SAVE_GPR_+1*4(sp) | sw r16, SAVE_GPR_+0*4(sp) | sdc1 f22, SAVE_FPR_+1*8(sp) | sdc1 f20, SAVE_FPR_+0*8(sp) |.endmacro | |.macro restoreregs_ret | lw ra, SAVE_GPR_+9*4(sp) | lw r30, SAVE_GPR_+8*4(sp) | ldc1 f30, SAVE_FPR_+5*8(sp) | lw r23, SAVE_GPR_+7*4(sp) | lw r22, SAVE_GPR_+6*4(sp) | ldc1 f28, SAVE_FPR_+4*8(sp) | lw r21, SAVE_GPR_+5*4(sp) | lw r20, SAVE_GPR_+4*4(sp) | ldc1 f26, SAVE_FPR_+3*8(sp) | lw r19, SAVE_GPR_+3*4(sp) | lw r18, SAVE_GPR_+2*4(sp) | ldc1 f24, SAVE_FPR_+2*8(sp) | lw r17, SAVE_GPR_+1*4(sp) | lw r16, SAVE_GPR_+0*4(sp) | ldc1 f22, SAVE_FPR_+1*8(sp) | ldc1 f20, SAVE_FPR_+0*8(sp) | jr ra | addiu sp, sp, CFRAME_SPACE |.endmacro | |// Type definitions. Some of these are only used for documentation. |.type L, lua_State, LREG |.type GL, global_State |.type TVALUE, TValue |.type GCOBJ, GCobj |.type STR, GCstr |.type TAB, GCtab |.type LFUNC, GCfuncL |.type CFUNC, GCfuncC |.type PROTO, GCproto |.type UPVAL, GCupval |.type NODE, Node |.type NARGS8, int |.type TRACE, GCtrace | |//----------------------------------------------------------------------- | |// Trap for not-yet-implemented parts. |.macro NYI; .long 0xf0f0f0f0; .endmacro | |// Macros to mark delay slots. |.macro ., a; a; .endmacro |.macro ., a,b; a,b; .endmacro |.macro ., a,b,c; a,b,c; .endmacro | |//----------------------------------------------------------------------- | |// Endian-specific defines. |.define FRAME_PC, LJ_ENDIAN_SELECT(-4,-8) |.define FRAME_FUNC, LJ_ENDIAN_SELECT(-8,-4) |.define HI, LJ_ENDIAN_SELECT(4,0) |.define LO, LJ_ENDIAN_SELECT(0,4) |.define OFS_RD, LJ_ENDIAN_SELECT(2,0) |.define OFS_RA, LJ_ENDIAN_SELECT(1,2) |.define OFS_OP, LJ_ENDIAN_SELECT(0,3) | |// Instruction decode. |.macro decode_OP1, dst, ins; andi dst, ins, 0xff; .endmacro |.macro decode_OP4a, dst, ins; andi dst, ins, 0xff; .endmacro |.macro decode_OP4b, dst; sll dst, dst, 2; .endmacro |.macro decode_RC4a, dst, ins; srl dst, ins, 14; .endmacro |.macro decode_RC4b, dst; andi dst, dst, 0x3fc; .endmacro |.macro decode_RD4b, dst; sll dst, dst, 2; .endmacro |.macro decode_RA8a, dst, ins; srl dst, ins, 5; .endmacro |.macro decode_RA8b, dst; andi dst, dst, 0x7f8; .endmacro |.macro decode_RB8a, dst, ins; srl dst, ins, 21; .endmacro |.macro decode_RB8b, dst; andi dst, dst, 0x7f8; .endmacro |.macro decode_RD8a, dst, ins; srl dst, ins, 16; .endmacro |.macro decode_RD8b, dst; sll dst, dst, 3; .endmacro |.macro decode_RDtoRC8, dst, src; andi dst, src, 0x7f8; .endmacro | |// Instruction fetch. |.macro ins_NEXT1 | lw INS, 0(PC) | addiu PC, PC, 4 |.endmacro |// Instruction decode+dispatch. |.macro ins_NEXT2 | decode_OP4a TMP1, INS | decode_OP4b TMP1 | addu TMP0, DISPATCH, TMP1 | decode_RD8a RD, INS | lw AT, 0(TMP0) | decode_RA8a RA, INS | decode_RD8b RD | jr AT | decode_RA8b RA |.endmacro |.macro ins_NEXT | ins_NEXT1 | ins_NEXT2 |.endmacro | |// Instruction footer. |.if 1 | // Replicated dispatch. Less unpredictable branches, but higher I-Cache use. | .define ins_next, ins_NEXT | .define ins_next_, ins_NEXT | .define ins_next1, ins_NEXT1 | .define ins_next2, ins_NEXT2 |.else | // Common dispatch. Lower I-Cache use, only one (very) unpredictable branch. | // Affects only certain kinds of benchmarks (and only with -j off). | .macro ins_next | b ->ins_next | .endmacro | .macro ins_next1 | .endmacro | .macro ins_next2 | b ->ins_next | .endmacro | .macro ins_next_ | ->ins_next: | ins_NEXT | .endmacro |.endif | |// Call decode and dispatch. |.macro ins_callt | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | lw PC, LFUNC:RB->pc | lw INS, 0(PC) | addiu PC, PC, 4 | decode_OP4a TMP1, INS | decode_RA8a RA, INS | decode_OP4b TMP1 | decode_RA8b RA | addu TMP0, DISPATCH, TMP1 | lw TMP0, 0(TMP0) | jr TMP0 | addu RA, RA, BASE |.endmacro | |.macro ins_call | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, PC = caller PC | sw PC, FRAME_PC(BASE) | ins_callt |.endmacro | |//----------------------------------------------------------------------- | |.macro branch_RD | srl TMP0, RD, 1 | lui AT, (-(BCBIAS_J*4 >> 16) & 65535) | addu TMP0, TMP0, AT | addu PC, PC, TMP0 |.endmacro | |// Assumes DISPATCH is relative to GL. #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) #define GG_DISP2GOT (GG_OFS(got) - GG_OFS(dispatch)) #define DISPATCH_GOT(name) (GG_DISP2GOT + 4*LJ_GOT_##name) | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | |.macro load_got, func | lw CFUNCADDR, DISPATCH_GOT(func)(DISPATCH) |.endmacro |// Much faster. Sadly, there's no easy way to force the required code layout. |// .macro call_intern, func; bal extern func; .endmacro |.macro call_intern, func; jalr CFUNCADDR; .endmacro |.macro call_extern; jalr CFUNCADDR; .endmacro |.macro jmp_extern; jr CFUNCADDR; .endmacro | |.macro hotcheck, delta, target | srl TMP1, PC, 1 | andi TMP1, TMP1, 126 | addu TMP1, TMP1, DISPATCH | lhu TMP2, GG_DISP2HOT(TMP1) | addiu TMP2, TMP2, -delta | bltz TMP2, target |. sh TMP2, GG_DISP2HOT(TMP1) |.endmacro | |.macro hotloop | hotcheck HOTCOUNT_LOOP, ->vm_hotloop |.endmacro | |.macro hotcall | hotcheck HOTCOUNT_CALL, ->vm_hotcall |.endmacro | |// Set current VM state. Uses TMP0. |.macro li_vmstate, st; li TMP0, ~LJ_VMST_..st; .endmacro |.macro st_vmstate; sw TMP0, DISPATCH_GL(vmstate)(DISPATCH); .endmacro | |// Move table write barrier back. Overwrites mark and tmp. |.macro barrierback, tab, mark, tmp, target | lw tmp, DISPATCH_GL(gc.grayagain)(DISPATCH) | andi mark, mark, ~LJ_GC_BLACK & 255 // black2gray(tab) | sw tab, DISPATCH_GL(gc.grayagain)(DISPATCH) | sb mark, tab->marked | b target |. sw tmp, tab->gclist |.endmacro | |//----------------------------------------------------------------------- /* Generate subroutines used by opcodes and other parts of the VM. */ /* The .code_sub section should be last to help static branch prediction. */ static void build_subroutines(BuildCtx *ctx) { |.code_sub | |//----------------------------------------------------------------------- |//-- Return handling ---------------------------------------------------- |//----------------------------------------------------------------------- | |->vm_returnp: | // See vm_return. Also: TMP2 = previous base. | andi AT, PC, FRAME_P | beqz AT, ->cont_dispatch |. li TMP1, LJ_TTRUE | | // Return from pcall or xpcall fast func. | lw PC, FRAME_PC(TMP2) // Fetch PC of previous frame. | move BASE, TMP2 // Restore caller base. | // Prepending may overwrite the pcall frame, so do it at the end. | sw TMP1, FRAME_PC(RA) // Prepend true to results. | addiu RA, RA, -8 | |->vm_returnc: | addiu RD, RD, 8 // RD = (nresults+1)*8. | andi TMP0, PC, FRAME_TYPE | beqz RD, ->vm_unwind_c_eh |. li CRET1, LUA_YIELD | beqz TMP0, ->BC_RET_Z // Handle regular return to Lua. |. move MULTRES, RD | |->vm_return: | // BASE = base, RA = resultptr, RD/MULTRES = (nresults+1)*8, PC = return | // TMP0 = PC & FRAME_TYPE | li TMP2, -8 | xori AT, TMP0, FRAME_C | and TMP2, PC, TMP2 | bnez AT, ->vm_returnp | subu TMP2, BASE, TMP2 // TMP2 = previous base. | | addiu TMP1, RD, -8 | sw TMP2, L->base | li_vmstate C | lw TMP2, SAVE_NRES | addiu BASE, BASE, -8 | st_vmstate | beqz TMP1, >2 |. sll TMP2, TMP2, 3 |1: | addiu TMP1, TMP1, -8 | ldc1 f0, 0(RA) | addiu RA, RA, 8 | sdc1 f0, 0(BASE) | bnez TMP1, <1 |. addiu BASE, BASE, 8 | |2: | bne TMP2, RD, >6 |3: |. sw BASE, L->top // Store new top. | |->vm_leave_cp: | lw TMP0, SAVE_CFRAME // Restore previous C frame. | move CRET1, r0 // Ok return status for vm_pcall. | sw TMP0, L->cframe | |->vm_leave_unw: | restoreregs_ret | |6: | lw TMP1, L->maxstack | slt AT, TMP2, RD | bnez AT, >7 // Less results wanted? | // More results wanted. Check stack size and fill up results with nil. |. slt AT, BASE, TMP1 | beqz AT, >8 |. nop | sw TISNIL, HI(BASE) | addiu RD, RD, 8 | b <2 |. addiu BASE, BASE, 8 | |7: // Less results wanted. | subu TMP0, RD, TMP2 | subu TMP0, BASE, TMP0 // Either keep top or shrink it. | b <3 |. movn BASE, TMP0, TMP2 // LUA_MULTRET+1 case? | |8: // Corner case: need to grow stack for filling up results. | // This can happen if: | // - A C function grows the stack (a lot). | // - The GC shrinks the stack in between. | // - A return back from a lua_call() with (high) nresults adjustment. | load_got lj_state_growstack | move MULTRES, RD | move CARG2, TMP2 | call_intern lj_state_growstack // (lua_State *L, int n) |. move CARG1, L | lw TMP2, SAVE_NRES | lw BASE, L->top // Need the (realloced) L->top in BASE. | move RD, MULTRES | b <2 |. sll TMP2, TMP2, 3 | |->vm_unwind_c: // Unwind C stack, return from vm_pcall. | // (void *cframe, int errcode) | move sp, CARG1 | move CRET1, CARG2 |->vm_unwind_c_eh: // Landing pad for external unwinder. | lw L, SAVE_L | li TMP0, ~LJ_VMST_C | lw GL:TMP1, L->glref | b ->vm_leave_unw |. sw TMP0, GL:TMP1->vmstate | |->vm_unwind_ff: // Unwind C stack, return from ff pcall. | // (void *cframe) | li AT, -4 | and sp, CARG1, AT |->vm_unwind_ff_eh: // Landing pad for external unwinder. | lw L, SAVE_L | lui TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | li TISNIL, LJ_TNIL | lw BASE, L->base | lw DISPATCH, L->glref // Setup pointer to dispatch table. | mtc1 TMP3, TOBIT | li TMP1, LJ_TFALSE | li_vmstate INTERP | lw PC, FRAME_PC(BASE) // Fetch PC of previous frame. | cvt.d.s TOBIT, TOBIT | addiu RA, BASE, -8 // Results start at BASE-8. | addiu DISPATCH, DISPATCH, GG_G2DISP | sw TMP1, HI(RA) // Prepend false to error message. | st_vmstate | b ->vm_returnc |. li RD, 16 // 2 results: false + error message. | |//----------------------------------------------------------------------- |//-- Grow stack for calls ----------------------------------------------- |//----------------------------------------------------------------------- | |->vm_growstack_c: // Grow stack for C function. | b >2 |. li CARG2, LUA_MINSTACK | |->vm_growstack_l: // Grow stack for Lua function. | // BASE = new base, RA = BASE+framesize*8, RC = nargs*8, PC = first PC | addu RC, BASE, RC | subu RA, RA, BASE | sw BASE, L->base | addiu PC, PC, 4 // Must point after first instruction. | sw RC, L->top | srl CARG2, RA, 3 |2: | // L->base = new base, L->top = top | load_got lj_state_growstack | sw PC, SAVE_PC | call_intern lj_state_growstack // (lua_State *L, int n) |. move CARG1, L | lw BASE, L->base | lw RC, L->top | lw LFUNC:RB, FRAME_FUNC(BASE) | subu RC, RC, BASE | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | ins_callt // Just retry the call. | |//----------------------------------------------------------------------- |//-- Entry points into the assembler VM --------------------------------- |//----------------------------------------------------------------------- | |->vm_resume: // Setup C frame and resume thread. | // (lua_State *L, TValue *base, int nres1 = 0, ptrdiff_t ef = 0) | saveregs | move L, CARG1 | lw DISPATCH, L->glref // Setup pointer to dispatch table. | move BASE, CARG2 | lbu TMP1, L->status | sw L, SAVE_L | li PC, FRAME_CP | addiu TMP0, sp, CFRAME_RESUME | addiu DISPATCH, DISPATCH, GG_G2DISP | sw r0, SAVE_NRES | sw r0, SAVE_ERRF | sw TMP0, L->cframe | sw r0, SAVE_CFRAME | beqz TMP1, >3 |. sw CARG1, SAVE_PC // Any value outside of bytecode is ok. | | // Resume after yield (like a return). | move RA, BASE | lw BASE, L->base | lw TMP1, L->top | lw PC, FRAME_PC(BASE) | lui TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | subu RD, TMP1, BASE | mtc1 TMP3, TOBIT | sb r0, L->status | cvt.d.s TOBIT, TOBIT | li_vmstate INTERP | addiu RD, RD, 8 | st_vmstate | move MULTRES, RD | andi TMP0, PC, FRAME_TYPE | beqz TMP0, ->BC_RET_Z |. li TISNIL, LJ_TNIL | b ->vm_return |. nop | |->vm_pcall: // Setup protected C frame and enter VM. | // (lua_State *L, TValue *base, int nres1, ptrdiff_t ef) | saveregs | sw CARG4, SAVE_ERRF | b >1 |. li PC, FRAME_CP | |->vm_call: // Setup C frame and enter VM. | // (lua_State *L, TValue *base, int nres1) | saveregs | li PC, FRAME_C | |1: // Entry point for vm_pcall above (PC = ftype). | lw TMP1, L:CARG1->cframe | sw CARG3, SAVE_NRES | move L, CARG1 | sw CARG1, SAVE_L | move BASE, CARG2 | sw sp, L->cframe // Add our C frame to cframe chain. | lw DISPATCH, L->glref // Setup pointer to dispatch table. | sw CARG1, SAVE_PC // Any value outside of bytecode is ok. | sw TMP1, SAVE_CFRAME | addiu DISPATCH, DISPATCH, GG_G2DISP | |3: // Entry point for vm_cpcall/vm_resume (BASE = base, PC = ftype). | lw TMP2, L->base // TMP2 = old base (used in vmeta_call). | lui TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | lw TMP1, L->top | mtc1 TMP3, TOBIT | addu PC, PC, BASE | subu NARGS8:RC, TMP1, BASE | subu PC, PC, TMP2 // PC = frame delta + frame type | cvt.d.s TOBIT, TOBIT | li_vmstate INTERP | li TISNIL, LJ_TNIL | st_vmstate | |->vm_call_dispatch: | // TMP2 = old base, BASE = new base, RC = nargs*8, PC = caller PC | lw TMP0, FRAME_PC(BASE) | li AT, LJ_TFUNC | bne TMP0, AT, ->vmeta_call |. lw LFUNC:RB, FRAME_FUNC(BASE) | |->vm_call_dispatch_f: | ins_call | // BASE = new base, RB = func, RC = nargs*8, PC = caller PC | |->vm_cpcall: // Setup protected C frame, call C. | // (lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp) | saveregs | move L, CARG1 | lw TMP0, L:CARG1->stack | sw CARG1, SAVE_L | lw TMP1, L->top | sw CARG1, SAVE_PC // Any value outside of bytecode is ok. | subu TMP0, TMP0, TMP1 // Compute -savestack(L, L->top). | lw TMP1, L->cframe | sw sp, L->cframe // Add our C frame to cframe chain. | sw TMP0, SAVE_NRES // Neg. delta means cframe w/o frame. | sw r0, SAVE_ERRF // No error function. | move CFUNCADDR, CARG4 | jalr CARG4 // (lua_State *L, lua_CFunction func, void *ud) |. sw TMP1, SAVE_CFRAME | move BASE, CRET1 | lw DISPATCH, L->glref // Setup pointer to dispatch table. | li PC, FRAME_CP | bnez CRET1, <3 // Else continue with the call. |. addiu DISPATCH, DISPATCH, GG_G2DISP | b ->vm_leave_cp // No base? Just remove C frame. |. nop | |//----------------------------------------------------------------------- |//-- Metamethod handling ------------------------------------------------ |//----------------------------------------------------------------------- | |// The lj_meta_* functions (except for lj_meta_cat) don't reallocate the |// stack, so BASE doesn't need to be reloaded across these calls. | |//-- Continuation dispatch ---------------------------------------------- | |->cont_dispatch: | // BASE = meta base, RA = resultptr, RD = (nresults+1)*8 | lw TMP0, -16+LO(BASE) // Continuation. | move RB, BASE | move BASE, TMP2 // Restore caller BASE. | lw LFUNC:TMP1, FRAME_FUNC(TMP2) |.if FFI | sltiu AT, TMP0, 2 |.endif | lw PC, -16+HI(RB) // Restore PC from [cont|PC]. | addu TMP2, RA, RD | lw TMP1, LFUNC:TMP1->pc |.if FFI | bnez AT, >1 |.endif |. sw TISNIL, -8+HI(TMP2) // Ensure one valid arg. | // BASE = base, RA = resultptr, RB = meta base | jr TMP0 // Jump to continuation. |. lw KBASE, PC2PROTO(k)(TMP1) | |.if FFI |1: | bnez TMP0, ->cont_ffi_callback // cont = 1: return from FFI callback. | // cont = 0: tailcall from C function. |. addiu TMP1, RB, -16 | b ->vm_call_tail |. subu RC, TMP1, BASE |.endif | |->cont_cat: // RA = resultptr, RB = meta base | lw INS, -4(PC) | addiu CARG2, RB, -16 | ldc1 f0, 0(RA) | decode_RB8a MULTRES, INS | decode_RA8a RA, INS | decode_RB8b MULTRES | decode_RA8b RA | addu TMP1, BASE, MULTRES | sw BASE, L->base | subu CARG3, CARG2, TMP1 | bne TMP1, CARG2, ->BC_CAT_Z |. sdc1 f0, 0(CARG2) | addu RA, BASE, RA | b ->cont_nop |. sdc1 f0, 0(RA) | |//-- Table indexing metamethods ----------------------------------------- | |->vmeta_tgets1: | addiu CARG3, DISPATCH, DISPATCH_GL(tmptv) | li TMP0, LJ_TSTR | sw STR:RC, LO(CARG3) | b >1 |. sw TMP0, HI(CARG3) | |->vmeta_tgets: | addiu CARG2, DISPATCH, DISPATCH_GL(tmptv) | li TMP0, LJ_TTAB | sw TAB:RB, LO(CARG2) | addiu CARG3, DISPATCH, DISPATCH_GL(tmptv2) | sw TMP0, HI(CARG2) | li TMP1, LJ_TSTR | sw STR:RC, LO(CARG3) | b >1 |. sw TMP1, HI(CARG3) | |->vmeta_tgetb: // TMP0 = index | mtc1 TMP0, f0 | cvt.d.w f0, f0 | addiu CARG3, DISPATCH, DISPATCH_GL(tmptv) | sdc1 f0, 0(CARG3) | |->vmeta_tgetv: |1: | load_got lj_meta_tget | sw BASE, L->base | sw PC, SAVE_PC | call_intern lj_meta_tget // (lua_State *L, TValue *o, TValue *k) |. move CARG1, L | // Returns TValue * (finished) or NULL (metamethod). | beqz CRET1, >3 |. addiu TMP1, BASE, -FRAME_CONT | ldc1 f0, 0(CRET1) | ins_next1 | sdc1 f0, 0(RA) | ins_next2 | |3: // Call __index metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k | lw BASE, L->top | sw PC, -16+HI(BASE) // [cont|PC] | subu PC, BASE, TMP1 | lw LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | b ->vm_call_dispatch_f |. li NARGS8:RC, 16 // 2 args for func(t, k). | |//----------------------------------------------------------------------- | |->vmeta_tsets1: | addiu CARG3, DISPATCH, DISPATCH_GL(tmptv) | li TMP0, LJ_TSTR | sw STR:RC, LO(CARG3) | b >1 |. sw TMP0, HI(CARG3) | |->vmeta_tsets: | addiu CARG2, DISPATCH, DISPATCH_GL(tmptv) | li TMP0, LJ_TTAB | sw TAB:RB, LO(CARG2) | addiu CARG3, DISPATCH, DISPATCH_GL(tmptv2) | sw TMP0, HI(CARG2) | li TMP1, LJ_TSTR | sw STR:RC, LO(CARG3) | b >1 |. sw TMP1, HI(CARG3) | |->vmeta_tsetb: // TMP0 = index | mtc1 TMP0, f0 | cvt.d.w f0, f0 | addiu CARG3, DISPATCH, DISPATCH_GL(tmptv) | sdc1 f0, 0(CARG3) | |->vmeta_tsetv: |1: | load_got lj_meta_tset | sw BASE, L->base | sw PC, SAVE_PC | call_intern lj_meta_tset // (lua_State *L, TValue *o, TValue *k) |. move CARG1, L | // Returns TValue * (finished) or NULL (metamethod). | beqz CRET1, >3 |. ldc1 f0, 0(RA) | // NOBARRIER: lj_meta_tset ensures the table is not black. | ins_next1 | sdc1 f0, 0(CRET1) | ins_next2 | |3: // Call __newindex metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k/(v) | addiu TMP1, BASE, -FRAME_CONT | lw BASE, L->top | sw PC, -16+HI(BASE) // [cont|PC] | subu PC, BASE, TMP1 | lw LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | sdc1 f0, 16(BASE) // Copy value to third argument. | b ->vm_call_dispatch_f |. li NARGS8:RC, 24 // 3 args for func(t, k, v) | |//-- Comparison metamethods --------------------------------------------- | |->vmeta_comp: | // CARG2, CARG3 are already set by BC_ISLT/BC_ISGE/BC_ISLE/BC_ISGT. | load_got lj_meta_comp | addiu PC, PC, -4 | sw BASE, L->base | sw PC, SAVE_PC | decode_OP1 CARG4, INS | call_intern lj_meta_comp // (lua_State *L, TValue *o1, *o2, int op) |. move CARG1, L | // Returns 0/1 or TValue * (metamethod). |3: | sltiu AT, CRET1, 2 | beqz AT, ->vmeta_binop | negu TMP2, CRET1 |4: | lhu RD, OFS_RD(PC) | addiu PC, PC, 4 | lui TMP1, (-(BCBIAS_J*4 >> 16) & 65535) | sll RD, RD, 2 | addu RD, RD, TMP1 | and RD, RD, TMP2 | addu PC, PC, RD |->cont_nop: | ins_next | |->cont_ra: // RA = resultptr | lbu TMP1, -4+OFS_RA(PC) | ldc1 f0, 0(RA) | sll TMP1, TMP1, 3 | addu TMP1, BASE, TMP1 | b ->cont_nop |. sdc1 f0, 0(TMP1) | |->cont_condt: // RA = resultptr | lw TMP0, HI(RA) | sltiu AT, TMP0, LJ_TISTRUECOND | b <4 |. negu TMP2, AT // Branch if result is true. | |->cont_condf: // RA = resultptr | lw TMP0, HI(RA) | sltiu AT, TMP0, LJ_TISTRUECOND | b <4 |. addiu TMP2, AT, -1 // Branch if result is false. | |->vmeta_equal: | // CARG2, CARG3, CARG4 are already set by BC_ISEQV/BC_ISNEV. | load_got lj_meta_equal | addiu PC, PC, -4 | sw BASE, L->base | sw PC, SAVE_PC | call_intern lj_meta_equal // (lua_State *L, GCobj *o1, *o2, int ne) |. move CARG1, L | // Returns 0/1 or TValue * (metamethod). | b <3 |. nop | |->vmeta_equal_cd: |.if FFI | load_got lj_meta_equal_cd | move CARG2, INS | addiu PC, PC, -4 | sw BASE, L->base | sw PC, SAVE_PC | call_intern lj_meta_equal_cd // (lua_State *L, BCIns op) |. move CARG1, L | // Returns 0/1 or TValue * (metamethod). | b <3 |. nop |.endif | |//-- Arithmetic metamethods --------------------------------------------- | |->vmeta_unm: | move CARG4, CARG3 | |->vmeta_arith: | load_got lj_meta_arith | decode_OP1 TMP0, INS | sw BASE, L->base | sw PC, SAVE_PC | move CARG2, RA | sw TMP0, ARG5 | call_intern lj_meta_arith // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) |. move CARG1, L | // Returns NULL (finished) or TValue * (metamethod). | beqz CRET1, ->cont_nop |. nop | | // Call metamethod for binary op. |->vmeta_binop: | // BASE = old base, CRET1 = new base, stack = cont/func/o1/o2 | subu TMP1, CRET1, BASE | sw PC, -16+HI(CRET1) // [cont|PC] | move TMP2, BASE | addiu PC, TMP1, FRAME_CONT | move BASE, CRET1 | b ->vm_call_dispatch |. li NARGS8:RC, 16 // 2 args for func(o1, o2). | |->vmeta_len: | // CARG2 already set by BC_LEN. #if LJ_52 | move MULTRES, CARG1 #endif | load_got lj_meta_len | sw BASE, L->base | sw PC, SAVE_PC | call_intern lj_meta_len // (lua_State *L, TValue *o) |. move CARG1, L | // Returns NULL (retry) or TValue * (metamethod base). #if LJ_52 | bnez CRET1, ->vmeta_binop // Binop call for compatibility. |. nop | b ->BC_LEN_Z |. move CARG1, MULTRES #else | b ->vmeta_binop // Binop call for compatibility. |. nop #endif | |//-- Call metamethod ---------------------------------------------------- | |->vmeta_call: // Resolve and call __call metamethod. | // TMP2 = old base, BASE = new base, RC = nargs*8 | load_got lj_meta_call | sw TMP2, L->base // This is the callers base! | addiu CARG2, BASE, -8 | sw PC, SAVE_PC | addu CARG3, BASE, RC | move MULTRES, NARGS8:RC | call_intern lj_meta_call // (lua_State *L, TValue *func, TValue *top) |. move CARG1, L | lw LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | addiu NARGS8:RC, MULTRES, 8 // Got one more argument now. | ins_call | |->vmeta_callt: // Resolve __call for BC_CALLT. | // BASE = old base, RA = new base, RC = nargs*8 | load_got lj_meta_call | sw BASE, L->base | addiu CARG2, RA, -8 | sw PC, SAVE_PC | addu CARG3, RA, RC | move MULTRES, NARGS8:RC | call_intern lj_meta_call // (lua_State *L, TValue *func, TValue *top) |. move CARG1, L | lw TMP1, FRAME_PC(BASE) | lw LFUNC:RB, FRAME_FUNC(RA) // Guaranteed to be a function here. | b ->BC_CALLT_Z |. addiu NARGS8:RC, MULTRES, 8 // Got one more argument now. | |//-- Argument coercion for 'for' statement ------------------------------ | |->vmeta_for: | load_got lj_meta_for | sw BASE, L->base | move CARG2, RA | sw PC, SAVE_PC | move MULTRES, INS | call_intern lj_meta_for // (lua_State *L, TValue *base) |. move CARG1, L |.if JIT | decode_OP1 TMP0, MULTRES | li AT, BC_JFORI |.endif | decode_RA8a RA, MULTRES | decode_RD8a RD, MULTRES | decode_RA8b RA |.if JIT | beq TMP0, AT, =>BC_JFORI |. decode_RD8b RD | b =>BC_FORI |. nop |.else | b =>BC_FORI |. decode_RD8b RD |.endif | |//----------------------------------------------------------------------- |//-- Fast functions ----------------------------------------------------- |//----------------------------------------------------------------------- | |.macro .ffunc, name |->ff_ .. name: |.endmacro | |.macro .ffunc_1, name |->ff_ .. name: | beqz NARGS8:RC, ->fff_fallback |. lw CARG3, HI(BASE) | lw CARG1, LO(BASE) |.endmacro | |.macro .ffunc_2, name |->ff_ .. name: | sltiu AT, NARGS8:RC, 16 | lw CARG3, HI(BASE) | bnez AT, ->fff_fallback |. lw CARG4, 8+HI(BASE) | lw CARG1, LO(BASE) | lw CARG2, 8+LO(BASE) |.endmacro | |.macro .ffunc_n, name // Caveat: has delay slot! |->ff_ .. name: | lw CARG3, HI(BASE) | beqz NARGS8:RC, ->fff_fallback |. ldc1 FARG1, 0(BASE) | sltiu AT, CARG3, LJ_TISNUM | beqz AT, ->fff_fallback |.endmacro | |.macro .ffunc_nn, name // Caveat: has delay slot! |->ff_ .. name: | sltiu AT, NARGS8:RC, 16 | lw CARG3, HI(BASE) | bnez AT, ->fff_fallback |. lw CARG4, 8+HI(BASE) | ldc1 FARG1, 0(BASE) | ldc1 FARG2, 8(BASE) | sltiu TMP0, CARG3, LJ_TISNUM | sltiu TMP1, CARG4, LJ_TISNUM | and TMP0, TMP0, TMP1 | beqz TMP0, ->fff_fallback |.endmacro | |// Inlined GC threshold check. Caveat: uses TMP0 and TMP1 and has delay slot! |.macro ffgccheck | lw TMP0, DISPATCH_GL(gc.total)(DISPATCH) | lw TMP1, DISPATCH_GL(gc.threshold)(DISPATCH) | subu AT, TMP0, TMP1 | bgezal AT, ->fff_gcstep |.endmacro | |//-- Base library: checks ----------------------------------------------- | |.ffunc_1 assert | sltiu AT, CARG3, LJ_TISTRUECOND | beqz AT, ->fff_fallback |. addiu RA, BASE, -8 | lw PC, FRAME_PC(BASE) | addiu RD, NARGS8:RC, 8 // Compute (nresults+1)*8. | addu TMP2, RA, NARGS8:RC | sw CARG3, HI(RA) | addiu TMP1, BASE, 8 | beq BASE, TMP2, ->fff_res // Done if exactly 1 argument. |. sw CARG1, LO(RA) |1: | ldc1 f0, 0(TMP1) | sdc1 f0, -8(TMP1) | bne TMP1, TMP2, <1 |. addiu TMP1, TMP1, 8 | b ->fff_res |. nop | |.ffunc type | lw CARG3, HI(BASE) | li TMP1, LJ_TISNUM | beqz NARGS8:RC, ->fff_fallback |. sltiu TMP0, CARG3, LJ_TISNUM | movz TMP1, CARG3, TMP0 | not TMP1, TMP1 | sll TMP1, TMP1, 3 | addu TMP1, CFUNC:RB, TMP1 | b ->fff_resn |. ldc1 FRET1, CFUNC:TMP1->upvalue | |//-- Base library: getters and setters --------------------------------- | |.ffunc_1 getmetatable | li AT, LJ_TTAB | bne CARG3, AT, >6 |. li AT, LJ_TUDATA |1: // Field metatable must be at same offset for GCtab and GCudata! | lw TAB:CARG1, TAB:CARG1->metatable |2: | lw STR:RC, DISPATCH_GL(gcroot[GCROOT_MMNAME+MM_metatable])(DISPATCH) | beqz TAB:CARG1, ->fff_restv |. li CARG3, LJ_TNIL | lw TMP0, TAB:CARG1->hmask | li CARG3, LJ_TTAB // Use metatable as default result. | lw TMP1, STR:RC->hash | lw NODE:TMP2, TAB:CARG1->node | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | sll TMP0, TMP1, 5 | sll TMP1, TMP1, 3 | subu TMP1, TMP0, TMP1 | addu NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) | li AT, LJ_TSTR |3: // Rearranged logic, because we expect _not_ to find the key. | lw CARG4, offsetof(Node, key)+HI(NODE:TMP2) | lw TMP0, offsetof(Node, key)+LO(NODE:TMP2) | lw NODE:TMP3, NODE:TMP2->next | bne CARG4, AT, >4 |. lw CARG2, offsetof(Node, val)+HI(NODE:TMP2) | beq TMP0, STR:RC, >5 |. lw TMP1, offsetof(Node, val)+LO(NODE:TMP2) |4: | beqz NODE:TMP3, ->fff_restv // Not found, keep default result. |. move NODE:TMP2, NODE:TMP3 | b <3 |. nop |5: | beq CARG2, TISNIL, ->fff_restv // Ditto for nil value. |. nop | move CARG3, CARG2 // Return value of mt.__metatable. | b ->fff_restv |. move CARG1, TMP1 | |6: | beq CARG3, AT, <1 |. sltiu TMP0, CARG3, LJ_TISNUM | li TMP1, LJ_TISNUM | movz TMP1, CARG3, TMP0 | not TMP1, TMP1 | sll TMP1, TMP1, 2 | addu TMP1, DISPATCH, TMP1 | b <2 |. lw TAB:CARG1, DISPATCH_GL(gcroot[GCROOT_BASEMT])(TMP1) | |.ffunc_2 setmetatable | // Fast path: no mt for table yet and not clearing the mt. | li AT, LJ_TTAB | bne CARG3, AT, ->fff_fallback |. addiu CARG4, CARG4, -LJ_TTAB | lw TAB:TMP1, TAB:CARG1->metatable | lbu TMP3, TAB:CARG1->marked | or AT, CARG4, TAB:TMP1 | bnez AT, ->fff_fallback |. andi AT, TMP3, LJ_GC_BLACK // isblack(table) | beqz AT, ->fff_restv |. sw TAB:CARG2, TAB:CARG1->metatable | barrierback TAB:CARG1, TMP3, TMP0, ->fff_restv | |.ffunc rawget | lw CARG4, HI(BASE) | sltiu AT, NARGS8:RC, 16 | lw TAB:CARG2, LO(BASE) | load_got lj_tab_get | addiu CARG4, CARG4, -LJ_TTAB | or AT, AT, CARG4 | bnez AT, ->fff_fallback | addiu CARG3, BASE, 8 | call_intern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) |. move CARG1, L | // Returns cTValue *. | b ->fff_resn |. ldc1 FRET1, 0(CRET1) | |//-- Base library: conversions ------------------------------------------ | |.ffunc tonumber | // Only handles the number case inline (without a base argument). | lw CARG1, HI(BASE) | xori AT, NARGS8:RC, 8 | sltiu CARG1, CARG1, LJ_TISNUM | movn CARG1, r0, AT | beqz CARG1, ->fff_fallback // Exactly one number argument. |. ldc1 FRET1, 0(BASE) | b ->fff_resn |. nop | |.ffunc_1 tostring | // Only handles the string or number case inline. | li AT, LJ_TSTR | // A __tostring method in the string base metatable is ignored. | beq CARG3, AT, ->fff_restv // String key? | // Handle numbers inline, unless a number base metatable is present. |. lw TMP1, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM])(DISPATCH) | sltiu TMP0, CARG3, LJ_TISNUM | sltiu TMP1, TMP1, 1 | and TMP0, TMP0, TMP1 | beqz TMP0, ->fff_fallback |. sw BASE, L->base // Add frame since C call can throw. | ffgccheck |. sw PC, SAVE_PC // Redundant (but a defined value). | load_got lj_str_fromnum | move CARG1, L | call_intern lj_str_fromnum // (lua_State *L, lua_Number *np) |. move CARG2, BASE | // Returns GCstr *. | li CARG3, LJ_TSTR | b ->fff_restv |. move CARG1, CRET1 | |//-- Base library: iterators ------------------------------------------- | |.ffunc next | lw CARG1, HI(BASE) | lw TAB:CARG2, LO(BASE) | beqz NARGS8:RC, ->fff_fallback |. addu TMP2, BASE, NARGS8:RC | li AT, LJ_TTAB | sw TISNIL, HI(TMP2) // Set missing 2nd arg to nil. | bne CARG1, AT, ->fff_fallback |. lw PC, FRAME_PC(BASE) | load_got lj_tab_next | sw BASE, L->base // Add frame since C call can throw. | sw BASE, L->top // Dummy frame length is ok. | addiu CARG3, BASE, 8 | sw PC, SAVE_PC | call_intern lj_tab_next // (lua_State *L, GCtab *t, TValue *key) |. move CARG1, L | // Returns 0 at end of traversal. | beqz CRET1, ->fff_restv // End of traversal: return nil. |. li CARG3, LJ_TNIL | ldc1 f0, 8(BASE) // Copy key and value to results. | addiu RA, BASE, -8 | ldc1 f2, 16(BASE) | li RD, (2+1)*8 | sdc1 f0, 0(RA) | b ->fff_res |. sdc1 f2, 8(RA) | |.ffunc_1 pairs | li AT, LJ_TTAB | bne CARG3, AT, ->fff_fallback |. lw PC, FRAME_PC(BASE) #if LJ_52 | lw TAB:TMP2, TAB:CARG1->metatable | ldc1 f0, CFUNC:RB->upvalue[0] | bnez TAB:TMP2, ->fff_fallback #else | ldc1 f0, CFUNC:RB->upvalue[0] #endif |. addiu RA, BASE, -8 | sw TISNIL, 8+HI(BASE) | li RD, (3+1)*8 | b ->fff_res |. sdc1 f0, 0(RA) | |.ffunc ipairs_aux | sltiu AT, NARGS8:RC, 16 | lw CARG3, HI(BASE) | lw TAB:CARG1, LO(BASE) | lw CARG4, 8+HI(BASE) | bnez AT, ->fff_fallback |. ldc1 FARG2, 8(BASE) | addiu CARG3, CARG3, -LJ_TTAB | sltiu AT, CARG4, LJ_TISNUM | li TMP0, 1 | movn AT, r0, CARG3 | mtc1 TMP0, FARG1 | beqz AT, ->fff_fallback |. lw PC, FRAME_PC(BASE) | cvt.w.d FRET1, FARG2 | cvt.d.w FARG1, FARG1 | lw TMP0, TAB:CARG1->asize | lw TMP1, TAB:CARG1->array | mfc1 TMP2, FRET1 | addiu RA, BASE, -8 | add.d FARG2, FARG2, FARG1 | addiu TMP2, TMP2, 1 | sltu AT, TMP2, TMP0 | sll TMP3, TMP2, 3 | addu TMP3, TMP1, TMP3 | beqz AT, >2 // Not in array part? |. sdc1 FARG2, 0(RA) | lw TMP2, HI(TMP3) | ldc1 f0, 0(TMP3) |1: | beq TMP2, TISNIL, ->fff_res // End of iteration, return 0 results. |. li RD, (0+1)*8 | li RD, (2+1)*8 | b ->fff_res |. sdc1 f0, 8(RA) |2: // Check for empty hash part first. Otherwise call C function. | lw TMP0, TAB:CARG1->hmask | load_got lj_tab_getinth | beqz TMP0, ->fff_res |. li RD, (0+1)*8 | call_intern lj_tab_getinth // (GCtab *t, int32_t key) |. move CARG2, TMP2 | // Returns cTValue * or NULL. | beqz CRET1, ->fff_res |. li RD, (0+1)*8 | lw TMP2, HI(CRET1) | b <1 |. ldc1 f0, 0(CRET1) | |.ffunc_1 ipairs | li AT, LJ_TTAB | bne CARG3, AT, ->fff_fallback |. lw PC, FRAME_PC(BASE) #if LJ_52 | lw TAB:TMP2, TAB:CARG1->metatable | ldc1 f0, CFUNC:RB->upvalue[0] | bnez TAB:TMP2, ->fff_fallback #else | ldc1 f0, CFUNC:RB->upvalue[0] #endif |. addiu RA, BASE, -8 | sw r0, 8+HI(BASE) | sw r0, 8+LO(BASE) | li RD, (3+1)*8 | b ->fff_res |. sdc1 f0, 0(RA) | |//-- Base library: catch errors ---------------------------------------- | |.ffunc pcall | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) | beqz NARGS8:RC, ->fff_fallback | move TMP2, BASE | addiu BASE, BASE, 8 | // Remember active hook before pcall. | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT | andi TMP3, TMP3, 1 | addiu PC, TMP3, 8+FRAME_PCALL | b ->vm_call_dispatch |. addiu NARGS8:RC, NARGS8:RC, -8 | |.ffunc xpcall | sltiu AT, NARGS8:RC, 16 | lw CARG4, 8+HI(BASE) | bnez AT, ->fff_fallback |. ldc1 FARG2, 8(BASE) | ldc1 FARG1, 0(BASE) | lbu TMP1, DISPATCH_GL(hookmask)(DISPATCH) | li AT, LJ_TFUNC | move TMP2, BASE | bne CARG4, AT, ->fff_fallback // Traceback must be a function. | addiu BASE, BASE, 16 | // Remember active hook before pcall. | srl TMP3, TMP3, HOOK_ACTIVE_SHIFT | sdc1 FARG2, 0(TMP2) // Swap function and traceback. | andi TMP3, TMP3, 1 | sdc1 FARG1, 8(TMP2) | addiu PC, TMP3, 16+FRAME_PCALL | b ->vm_call_dispatch |. addiu NARGS8:RC, NARGS8:RC, -16 | |//-- Coroutine library -------------------------------------------------- | |.macro coroutine_resume_wrap, resume |.if resume |.ffunc_1 coroutine_resume | li AT, LJ_TTHREAD | bne CARG3, AT, ->fff_fallback |.else |.ffunc coroutine_wrap_aux | lw L:CARG1, CFUNC:RB->upvalue[0].gcr |.endif | lbu TMP0, L:CARG1->status | lw TMP1, L:CARG1->cframe | lw CARG2, L:CARG1->top | lw TMP2, L:CARG1->base | addiu TMP3, TMP0, -LUA_YIELD | bgtz TMP3, ->fff_fallback // st > LUA_YIELD? |. xor TMP2, TMP2, CARG2 | bnez TMP1, ->fff_fallback // cframe != 0? |. or AT, TMP2, TMP0 | lw TMP0, L:CARG1->maxstack | beqz AT, ->fff_fallback // base == top && st == 0? |. lw PC, FRAME_PC(BASE) | addu TMP2, CARG2, NARGS8:RC | sltu AT, TMP0, TMP2 | bnez AT, ->fff_fallback // Stack overflow? |. sw PC, SAVE_PC | sw BASE, L->base |1: |.if resume | addiu BASE, BASE, 8 // Keep resumed thread in stack for GC. | addiu NARGS8:RC, NARGS8:RC, -8 | addiu TMP2, TMP2, -8 |.endif | sw TMP2, L:CARG1->top | addu TMP1, BASE, NARGS8:RC | move CARG3, CARG2 | sw BASE, L->top |2: // Move args to coroutine. | ldc1 f0, 0(BASE) | sltu AT, BASE, TMP1 | beqz AT, >3 |. addiu BASE, BASE, 8 | sdc1 f0, 0(CARG3) | b <2 |. addiu CARG3, CARG3, 8 |3: | bal ->vm_resume // (lua_State *L, TValue *base, 0, 0) |. move L:RA, L:CARG1 | // Returns thread status. |4: | lw TMP2, L:RA->base | sltiu AT, CRET1, LUA_YIELD+1 | lw TMP3, L:RA->top | li_vmstate INTERP | lw BASE, L->base | st_vmstate | beqz AT, >8 |. subu RD, TMP3, TMP2 | lw TMP0, L->maxstack | beqz RD, >6 // No results? |. addu TMP1, BASE, RD | sltu AT, TMP0, TMP1 | bnez AT, >9 // Need to grow stack? |. addu TMP3, TMP2, RD | sw TMP2, L:RA->top // Clear coroutine stack. | move TMP1, BASE |5: // Move results from coroutine. | ldc1 f0, 0(TMP2) | addiu TMP2, TMP2, 8 | sltu AT, TMP2, TMP3 | sdc1 f0, 0(TMP1) | bnez AT, <5 |. addiu TMP1, TMP1, 8 |6: | andi TMP0, PC, FRAME_TYPE |.if resume | li TMP1, LJ_TTRUE | addiu RA, BASE, -8 | sw TMP1, -8+HI(BASE) // Prepend true to results. | addiu RD, RD, 16 |.else | move RA, BASE | addiu RD, RD, 8 |.endif |7: | sw PC, SAVE_PC | beqz TMP0, ->BC_RET_Z |. move MULTRES, RD | b ->vm_return |. nop | |8: // Coroutine returned with error (at co->top-1). |.if resume | addiu TMP3, TMP3, -8 | li TMP1, LJ_TFALSE | ldc1 f0, 0(TMP3) | sw TMP3, L:RA->top // Remove error from coroutine stack. | li RD, (2+1)*8 | sw TMP1, -8+HI(BASE) // Prepend false to results. | addiu RA, BASE, -8 | sdc1 f0, 0(BASE) // Copy error message. | b <7 |. andi TMP0, PC, FRAME_TYPE |.else | load_got lj_ffh_coroutine_wrap_err | move CARG2, L:RA | call_intern lj_ffh_coroutine_wrap_err // (lua_State *L, lua_State *co) |. move CARG1, L |.endif | |9: // Handle stack expansion on return from yield. | load_got lj_state_growstack | srl CARG2, RD, 3 | call_intern lj_state_growstack // (lua_State *L, int n) |. move CARG1, L | b <4 |. li CRET1, 0 |.endmacro | | coroutine_resume_wrap 1 // coroutine.resume | coroutine_resume_wrap 0 // coroutine.wrap | |.ffunc coroutine_yield | lw TMP0, L->cframe | addu TMP1, BASE, NARGS8:RC | sw BASE, L->base | andi TMP0, TMP0, CFRAME_RESUME | sw TMP1, L->top | beqz TMP0, ->fff_fallback |. li CRET1, LUA_YIELD | sw r0, L->cframe | b ->vm_leave_unw |. sb CRET1, L->status | |//-- Math library ------------------------------------------------------- | |.ffunc_n math_abs |. abs.d FRET1, FARG1 |->fff_resn: | lw PC, FRAME_PC(BASE) | addiu RA, BASE, -8 | b ->fff_res1 |. sdc1 FRET1, -8(BASE) | |->fff_restv: | // CARG3/CARG1 = TValue result. | lw PC, FRAME_PC(BASE) | sw CARG3, -8+HI(BASE) | addiu RA, BASE, -8 | sw CARG1, -8+LO(BASE) |->fff_res1: | // RA = results, PC = return. | li RD, (1+1)*8 |->fff_res: | // RA = results, RD = (nresults+1)*8, PC = return. | andi TMP0, PC, FRAME_TYPE | bnez TMP0, ->vm_return |. move MULTRES, RD | lw INS, -4(PC) | decode_RB8a RB, INS | decode_RB8b RB |5: | sltu AT, RD, RB | bnez AT, >6 // More results expected? |. decode_RA8a TMP0, INS | decode_RA8b TMP0 | ins_next1 | // Adjust BASE. KBASE is assumed to be set for the calling frame. | subu BASE, RA, TMP0 | ins_next2 | |6: // Fill up results with nil. | addu TMP1, RA, RD | addiu RD, RD, 8 | b <5 |. sw TISNIL, -8+HI(TMP1) | |.macro math_extern, func |->ff_math_ .. func: | lw CARG3, HI(BASE) | beqz NARGS8:RC, ->fff_fallback |. load_got func | sltiu AT, CARG3, LJ_TISNUM | beqz AT, ->fff_fallback |. nop | call_extern |. ldc1 FARG1, 0(BASE) | b ->fff_resn |. nop |.endmacro | |.macro math_extern2, func | .ffunc_nn math_ .. func |. load_got func | call_extern |. nop | b ->fff_resn |. nop |.endmacro | |.macro math_round, func | .ffunc_n math_ .. func |. nop | bal ->vm_ .. func |. nop | b ->fff_resn |. nop |.endmacro | | math_round floor | math_round ceil | |.ffunc math_log | lw CARG3, HI(BASE) | li AT, 8 | bne NARGS8:RC, AT, ->fff_fallback // Exactly 1 argument. |. load_got log | sltiu AT, CARG3, LJ_TISNUM | beqz AT, ->fff_fallback |. nop | call_extern |. ldc1 FARG1, 0(BASE) | b ->fff_resn |. nop | | math_extern log10 | math_extern exp | math_extern sin | math_extern cos | math_extern tan | math_extern asin | math_extern acos | math_extern atan | math_extern sinh | math_extern cosh | math_extern tanh | math_extern2 pow | math_extern2 atan2 | math_extern2 fmod | |.ffunc_n math_sqrt |. sqrt.d FRET1, FARG1 | b ->fff_resn |. nop | |->ff_math_deg: |.ffunc_n math_rad |. ldc1 FARG2, CFUNC:RB->upvalue[0] | b ->fff_resn |. mul.d FRET1, FARG1, FARG2 | |.ffunc_nn math_ldexp | cvt.w.d FARG2, FARG2 | load_got ldexp | mfc1 CARG3, FARG2 | call_extern |. nop | b ->fff_resn |. nop | |.ffunc_n math_frexp | load_got frexp | lw PC, FRAME_PC(BASE) | call_extern |. addiu CARG3, DISPATCH, DISPATCH_GL(tmptv) | lw TMP1, DISPATCH_GL(tmptv)(DISPATCH) | addiu RA, BASE, -8 | mtc1 TMP1, FARG2 | sdc1 FRET1, 0(RA) | cvt.d.w FARG2, FARG2 | sdc1 FARG2, 8(RA) | b ->fff_res |. li RD, (2+1)*8 | |.ffunc_n math_modf | load_got modf | lw PC, FRAME_PC(BASE) | call_extern |. addiu CARG3, BASE, -8 | addiu RA, BASE, -8 | sdc1 FRET1, 0(BASE) | b ->fff_res |. li RD, (2+1)*8 | |.macro math_minmax, name, ismax |->ff_ .. name: | lw CARG3, HI(BASE) | beqz NARGS8:RC, ->fff_fallback |. ldc1 FRET1, 0(BASE) | sltiu AT, CARG3, LJ_TISNUM | beqz AT, ->fff_fallback |. addu TMP2, BASE, NARGS8:RC | addiu TMP1, BASE, 8 | beq TMP1, TMP2, ->fff_resn |1: |. lw CARG3, HI(TMP1) | ldc1 FARG1, 0(TMP1) | addiu TMP1, TMP1, 8 | sltiu AT, CARG3, LJ_TISNUM | beqz AT, ->fff_fallback |.if ismax |. c.olt.d FARG1, FRET1 |.else |. c.olt.d FRET1, FARG1 |.endif | bne TMP1, TMP2, <1 |. movf.d FRET1, FARG1 | b ->fff_resn |. nop |.endmacro | | math_minmax math_min, 0 | math_minmax math_max, 1 | |//-- String library ----------------------------------------------------- | |.ffunc_1 string_len | li AT, LJ_TSTR | bne CARG3, AT, ->fff_fallback |. nop | b ->fff_resi |. lw CRET1, STR:CARG1->len | |.ffunc string_byte // Only handle the 1-arg case here. | lw CARG3, HI(BASE) | lw STR:CARG1, LO(BASE) | xori AT, NARGS8:RC, 8 | addiu CARG3, CARG3, -LJ_TSTR | or AT, AT, CARG3 | bnez AT, ->fff_fallback // Need exactly 1 string argument. |. nop | lw TMP0, STR:CARG1->len | lbu TMP1, STR:CARG1[1] // Access is always ok (NUL at end). | addiu RA, BASE, -8 | sltu RD, r0, TMP0 | mtc1 TMP1, f0 | addiu RD, RD, 1 | cvt.d.w f0, f0 | lw PC, FRAME_PC(BASE) | sll RD, RD, 3 // RD = ((str->len != 0)+1)*8 | b ->fff_res |. sdc1 f0, 0(RA) | |.ffunc string_char // Only handle the 1-arg case here. | ffgccheck | lw CARG3, HI(BASE) | ldc1 FARG1, 0(BASE) | li AT, 8 | bne NARGS8:RC, AT, ->fff_fallback // Exactly 1 argument. |. sltiu AT, CARG3, LJ_TISNUM | beqz AT, ->fff_fallback |. li CARG3, 1 | cvt.w.d FARG1, FARG1 | addiu CARG2, sp, ARG5_OFS | sltiu AT, TMP0, 256 | mfc1 TMP0, FARG1 | beqz AT, ->fff_fallback |. sw TMP0, ARG5 |->fff_newstr: | load_got lj_str_new | sw BASE, L->base | sw PC, SAVE_PC | call_intern lj_str_new // (lua_State *L, char *str, size_t l) |. move CARG1, L | // Returns GCstr *. | lw BASE, L->base | move CARG1, CRET1 | b ->fff_restv |. li CARG3, LJ_TSTR | |.ffunc string_sub | ffgccheck | addiu AT, NARGS8:RC, -16 | lw CARG3, 16+HI(BASE) | ldc1 f0, 16(BASE) | lw TMP0, HI(BASE) | lw STR:CARG1, LO(BASE) | bltz AT, ->fff_fallback | lw CARG2, 8+HI(BASE) | ldc1 f2, 8(BASE) | beqz AT, >1 |. li CARG4, -1 | cvt.w.d f0, f0 | sltiu AT, CARG3, LJ_TISNUM | beqz AT, ->fff_fallback |. mfc1 CARG4, f0 |1: | sltiu AT, CARG2, LJ_TISNUM | beqz AT, ->fff_fallback |. li AT, LJ_TSTR | cvt.w.d f2, f2 | bne TMP0, AT, ->fff_fallback |. lw CARG2, STR:CARG1->len | mfc1 CARG3, f2 | // STR:CARG1 = str, CARG2 = str->len, CARG3 = start, CARG4 = end | slt AT, CARG4, r0 | addiu TMP0, CARG2, 1 | addu TMP1, CARG4, TMP0 | slt TMP3, CARG3, r0 | movn CARG4, TMP1, AT // if (end < 0) end += len+1 | addu TMP1, CARG3, TMP0 | movn CARG3, TMP1, TMP3 // if (start < 0) start += len+1 | li TMP2, 1 | slt AT, CARG4, r0 | slt TMP3, r0, CARG3 | movn CARG4, r0, AT // if (end < 0) end = 0 | movz CARG3, TMP2, TMP3 // if (start < 1) start = 1 | slt AT, CARG2, CARG4 | movn CARG4, CARG2, AT // if (end > len) end = len | addu CARG2, STR:CARG1, CARG3 | subu CARG3, CARG4, CARG3 // len = end - start | addiu CARG2, CARG2, sizeof(GCstr)-1 | bgez CARG3, ->fff_newstr |. addiu CARG3, CARG3, 1 // len++ |->fff_emptystr: // Return empty string. | addiu STR:CARG1, DISPATCH, DISPATCH_GL(strempty) | b ->fff_restv |. li CARG3, LJ_TSTR | |.ffunc string_rep // Only handle the 1-char case inline. | ffgccheck | lw TMP0, HI(BASE) | addiu AT, NARGS8:RC, -16 // Exactly 2 arguments. | lw CARG4, 8+HI(BASE) | lw STR:CARG1, LO(BASE) | addiu TMP0, TMP0, -LJ_TSTR | ldc1 f0, 8(BASE) | or AT, AT, TMP0 | bnez AT, ->fff_fallback |. sltiu AT, CARG4, LJ_TISNUM | cvt.w.d f0, f0 | beqz AT, ->fff_fallback |. lw TMP0, STR:CARG1->len | mfc1 CARG3, f0 | lw TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | li AT, 1 | blez CARG3, ->fff_emptystr // Count <= 0? |. sltu AT, AT, TMP0 | beqz TMP0, ->fff_emptystr // Zero length string? |. sltu TMP0, TMP1, CARG3 | or AT, AT, TMP0 | lw CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | bnez AT, ->fff_fallback // Fallback for > 1-char strings. |. lbu TMP0, STR:CARG1[1] | addu TMP2, CARG2, CARG3 |1: // Fill buffer with char. Yes, this is suboptimal code (do you care?). | addiu TMP2, TMP2, -1 | sltu AT, CARG2, TMP2 | bnez AT, <1 |. sb TMP0, 0(TMP2) | b ->fff_newstr |. nop | |.ffunc string_reverse | ffgccheck | lw CARG3, HI(BASE) | lw STR:CARG1, LO(BASE) | beqz NARGS8:RC, ->fff_fallback |. li AT, LJ_TSTR | bne CARG3, AT, ->fff_fallback |. lw TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | lw CARG3, STR:CARG1->len | addiu CARG1, STR:CARG1, #STR | lw CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | sltu AT, TMP1, CARG3 | bnez AT, ->fff_fallback |. addu TMP3, CARG1, CARG3 | addu CARG4, CARG2, CARG3 |1: // Reverse string copy. | lbu TMP1, 0(CARG1) | sltu AT, CARG1, TMP3 | beqz AT, ->fff_newstr |. addiu CARG1, CARG1, 1 | addiu CARG4, CARG4, -1 | b <1 | sb TMP1, 0(CARG4) | |.macro ffstring_case, name, lo | .ffunc name | ffgccheck | lw CARG3, HI(BASE) | lw STR:CARG1, LO(BASE) | beqz NARGS8:RC, ->fff_fallback |. li AT, LJ_TSTR | bne CARG3, AT, ->fff_fallback |. lw TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | lw CARG3, STR:CARG1->len | addiu CARG1, STR:CARG1, #STR | lw CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | sltu AT, TMP1, CARG3 | bnez AT, ->fff_fallback |. addu TMP3, CARG1, CARG3 | move CARG4, CARG2 |1: // ASCII case conversion. | lbu TMP1, 0(CARG1) | sltu AT, CARG1, TMP3 | beqz AT, ->fff_newstr |. addiu TMP0, TMP1, -lo | xori TMP2, TMP1, 0x20 | sltiu AT, TMP0, 26 | movn TMP1, TMP2, AT | addiu CARG1, CARG1, 1 | sb TMP1, 0(CARG4) | b <1 |. addiu CARG4, CARG4, 1 |.endmacro | |ffstring_case string_lower, 65 |ffstring_case string_upper, 97 | |//-- Table library ------------------------------------------------------ | |.ffunc_1 table_getn | li AT, LJ_TTAB | bne CARG3, AT, ->fff_fallback |. load_got lj_tab_len | call_intern lj_tab_len // (GCtab *t) |. nop | // Returns uint32_t (but less than 2^31). | b ->fff_resi |. nop | |//-- Bit library -------------------------------------------------------- | |.macro .ffunc_bit, name | .ffunc_n bit_..name |. add.d FARG1, FARG1, TOBIT | mfc1 CRET1, FARG1 |.endmacro | |.macro .ffunc_bit_op, name, ins | .ffunc_bit name | addiu TMP1, BASE, 8 | addu TMP2, BASE, NARGS8:RC |1: | lw CARG4, HI(TMP1) | beq TMP1, TMP2, ->fff_resi |. ldc1 FARG1, 0(TMP1) | sltiu AT, CARG4, LJ_TISNUM | beqz AT, ->fff_fallback | add.d FARG1, FARG1, TOBIT | mfc1 CARG2, FARG1 | ins CRET1, CRET1, CARG2 | b <1 |. addiu TMP1, TMP1, 8 |.endmacro | |.ffunc_bit_op band, and |.ffunc_bit_op bor, or |.ffunc_bit_op bxor, xor | |.ffunc_bit bswap | srl TMP0, CRET1, 24 | srl TMP2, CRET1, 8 | sll TMP1, CRET1, 24 | andi TMP2, TMP2, 0xff00 | or TMP0, TMP0, TMP1 | andi CRET1, CRET1, 0xff00 | or TMP0, TMP0, TMP2 | sll CRET1, CRET1, 8 | b ->fff_resi |. or CRET1, TMP0, CRET1 | |.ffunc_bit bnot | b ->fff_resi |. not CRET1, CRET1 | |.macro .ffunc_bit_sh, name, ins, shmod | .ffunc_nn bit_..name |. add.d FARG1, FARG1, TOBIT | add.d FARG2, FARG2, TOBIT | mfc1 CARG1, FARG1 | mfc1 CARG2, FARG2 |.if shmod == 1 | li AT, 32 | subu TMP0, AT, CARG2 | sllv CARG2, CARG1, CARG2 | srlv CARG1, CARG1, TMP0 |.elif shmod == 2 | li AT, 32 | subu TMP0, AT, CARG2 | srlv CARG2, CARG1, CARG2 | sllv CARG1, CARG1, TMP0 |.endif | b ->fff_resi |. ins CRET1, CARG1, CARG2 |.endmacro | |.ffunc_bit_sh lshift, sllv, 0 |.ffunc_bit_sh rshift, srlv, 0 |.ffunc_bit_sh arshift, srav, 0 |// Can't use rotrv, since it's only in MIPS32R2. |.ffunc_bit_sh rol, or, 1 |.ffunc_bit_sh ror, or, 2 | |.ffunc_bit tobit |->fff_resi: | mtc1 CRET1, FRET1 | b ->fff_resn |. cvt.d.w FRET1, FRET1 | |//----------------------------------------------------------------------- | |->fff_fallback: // Call fast function fallback handler. | // BASE = new base, RB = CFUNC, RC = nargs*8 | lw TMP3, CFUNC:RB->f | addu TMP1, BASE, NARGS8:RC | lw PC, FRAME_PC(BASE) // Fallback may overwrite PC. | addiu TMP0, TMP1, 8*LUA_MINSTACK | lw TMP2, L->maxstack | sw PC, SAVE_PC // Redundant (but a defined value). | sltu AT, TMP2, TMP0 | sw BASE, L->base | sw TMP1, L->top | bnez AT, >5 // Need to grow stack. |. move CFUNCADDR, TMP3 | jalr TMP3 // (lua_State *L) |. move CARG1, L | // Either throws an error, or recovers and returns -1, 0 or nresults+1. | lw BASE, L->base | sll RD, CRET1, 3 | bgtz CRET1, ->fff_res // Returned nresults+1? |. addiu RA, BASE, -8 |1: // Returned 0 or -1: retry fast path. | lw TMP0, L->top | lw LFUNC:RB, FRAME_FUNC(BASE) | bnez CRET1, ->vm_call_tail // Returned -1? |. subu NARGS8:RC, TMP0, BASE | ins_callt // Returned 0: retry fast path. | |// Reconstruct previous base for vmeta_call during tailcall. |->vm_call_tail: | andi TMP0, PC, FRAME_TYPE | li AT, -4 | bnez TMP0, >3 |. and TMP1, PC, AT | lbu TMP1, OFS_RA(PC) | sll TMP1, TMP1, 3 | addiu TMP1, TMP1, 8 |3: | b ->vm_call_dispatch // Resolve again for tailcall. |. subu TMP2, BASE, TMP1 | |5: // Grow stack for fallback handler. | load_got lj_state_growstack | li CARG2, LUA_MINSTACK | call_intern lj_state_growstack // (lua_State *L, int n) |. move CARG1, L | lw BASE, L->base | b <1 |. li CRET1, 0 // Force retry. | |->fff_gcstep: // Call GC step function. | // BASE = new base, RC = nargs*8 | move MULTRES, ra | load_got lj_gc_step | sw BASE, L->base | addu TMP0, BASE, NARGS8:RC | sw PC, SAVE_PC // Redundant (but a defined value). | sw TMP0, L->top | call_intern lj_gc_step // (lua_State *L) |. move CARG1, L | lw BASE, L->base | move ra, MULTRES | lw TMP0, L->top | lw CFUNC:RB, FRAME_FUNC(BASE) | jr ra |. subu NARGS8:RC, TMP0, BASE | |//----------------------------------------------------------------------- |//-- Special dispatch targets ------------------------------------------- |//----------------------------------------------------------------------- | |->vm_record: // Dispatch target for recording phase. |.if JIT | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) | andi AT, TMP3, HOOK_VMEVENT // No recording while in vmevent. | bnez AT, >5 | // Decrement the hookcount for consistency, but always do the call. |. lw TMP2, DISPATCH_GL(hookcount)(DISPATCH) | andi AT, TMP3, HOOK_ACTIVE | bnez AT, >1 |. addiu TMP2, TMP2, -1 | andi AT, TMP3, LUA_MASKLINE|LUA_MASKCOUNT | beqz AT, >1 |. nop | b >1 |. sw TMP2, DISPATCH_GL(hookcount)(DISPATCH) |.endif | |->vm_rethook: // Dispatch target for return hooks. | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) | andi AT, TMP3, HOOK_ACTIVE // Hook already active? | beqz AT, >1 |5: // Re-dispatch to static ins. |. lw AT, GG_DISP2STATIC(TMP0) // Assumes TMP0 holds DISPATCH+OP*4. | jr AT |. nop | |->vm_inshook: // Dispatch target for instr/line hooks. | lbu TMP3, DISPATCH_GL(hookmask)(DISPATCH) | lw TMP2, DISPATCH_GL(hookcount)(DISPATCH) | andi AT, TMP3, HOOK_ACTIVE // Hook already active? | bnez AT, <5 |. andi AT, TMP3, LUA_MASKLINE|LUA_MASKCOUNT | beqz AT, <5 |. addiu TMP2, TMP2, -1 | beqz TMP2, >1 |. sw TMP2, DISPATCH_GL(hookcount)(DISPATCH) | andi AT, TMP3, LUA_MASKLINE | beqz AT, <5 |1: |. load_got lj_dispatch_ins | sw MULTRES, SAVE_MULTRES | move CARG2, PC | sw BASE, L->base | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. | call_intern lj_dispatch_ins // (lua_State *L, const BCIns *pc) |. move CARG1, L |3: | lw BASE, L->base |4: // Re-dispatch to static ins. | lw INS, -4(PC) | decode_OP4a TMP1, INS | decode_OP4b TMP1 | addu TMP0, DISPATCH, TMP1 | decode_RD8a RD, INS | lw AT, GG_DISP2STATIC(TMP0) | decode_RA8a RA, INS | decode_RD8b RD | jr AT | decode_RA8b RA | |->cont_hook: // Continue from hook yield. | addiu PC, PC, 4 | b <4 |. lw MULTRES, -24+LO(RB) // Restore MULTRES for *M ins. | |->vm_hotloop: // Hot loop counter underflow. |.if JIT | lw LFUNC:TMP1, FRAME_FUNC(BASE) | addiu CARG1, DISPATCH, GG_DISP2J | sw PC, SAVE_PC | lw TMP1, LFUNC:TMP1->pc | move CARG2, PC | sw L, DISPATCH_J(L)(DISPATCH) | lbu TMP1, PC2PROTO(framesize)(TMP1) | load_got lj_trace_hot | sw BASE, L->base | sll TMP1, TMP1, 3 | addu TMP1, BASE, TMP1 | call_intern lj_trace_hot // (jit_State *J, const BCIns *pc) |. sw TMP1, L->top | b <3 |. nop |.endif | |->vm_callhook: // Dispatch target for call hooks. |.if JIT | b >1 |.endif |. move CARG2, PC | |->vm_hotcall: // Hot call counter underflow. |.if JIT | ori CARG2, PC, 1 |1: |.endif | load_got lj_dispatch_call | addu TMP0, BASE, RC | sw PC, SAVE_PC | sw BASE, L->base | subu RA, RA, BASE | sw TMP0, L->top | call_intern lj_dispatch_call // (lua_State *L, const BCIns *pc) |. move CARG1, L | // Returns ASMFunction. | lw BASE, L->base | lw TMP0, L->top | sw r0, SAVE_PC // Invalidate for subsequent line hook. | subu NARGS8:RC, TMP0, BASE | addu RA, BASE, RA | lw LFUNC:RB, FRAME_FUNC(BASE) | jr CRET1 |. lw INS, -4(PC) | |//----------------------------------------------------------------------- |//-- Trace exit handler ------------------------------------------------- |//----------------------------------------------------------------------- | |.macro savex_, a, b | sdc1 f..a, 16+a*8(sp) | sw r..a, 16+32*8+a*4(sp) | sw r..b, 16+32*8+b*4(sp) |.endmacro | |->vm_exit_handler: |.if JIT | addiu sp, sp, -(16+32*8+32*4) | savex_ 0, 1 | savex_ 2, 3 | savex_ 4, 5 | savex_ 6, 7 | savex_ 8, 9 | savex_ 10, 11 | savex_ 12, 13 | savex_ 14, 15 | savex_ 16, 17 | savex_ 18, 19 | savex_ 20, 21 | savex_ 22, 23 | savex_ 24, 25 | savex_ 26, 27 | sdc1 f28, 16+28*8(sp) | sw r28, 16+32*8+28*4(sp) | sdc1 f30, 16+30*8(sp) | sw r30, 16+32*8+30*4(sp) | sw r0, 16+32*8+31*4(sp) // Clear RID_TMP. | li_vmstate EXIT | addiu TMP2, sp, 16+32*8+32*4 // Recompute original value of sp. | addiu DISPATCH, JGL, -GG_DISP2G-32768 | lw TMP1, 0(TMP2) // Load exit number. | st_vmstate | sw TMP2, 16+32*8+29*4(sp) // Store sp in RID_SP. | lw L, DISPATCH_GL(jit_L)(DISPATCH) | lw BASE, DISPATCH_GL(jit_base)(DISPATCH) | load_got lj_trace_exit | sw L, DISPATCH_J(L)(DISPATCH) | sw ra, DISPATCH_J(parent)(DISPATCH) // Store trace number. | sw TMP1, DISPATCH_J(exitno)(DISPATCH) // Store exit number. | addiu CARG1, DISPATCH, GG_DISP2J | sw BASE, L->base | call_intern lj_trace_exit // (jit_State *J, ExitState *ex) |. addiu CARG2, sp, 16 | // Returns MULTRES (unscaled) or negated error code. | lw TMP1, L->cframe | li AT, -4 | lw BASE, L->base | and sp, TMP1, AT | lw PC, SAVE_PC // Get SAVE_PC. | b >1 |. sw L, SAVE_L // Set SAVE_L (on-trace resume/yield). |.endif |->vm_exit_interp: |.if JIT | // CRET1 = MULTRES or negated error code, BASE, PC and JGL set. | lw L, SAVE_L | addiu DISPATCH, JGL, -GG_DISP2G-32768 |1: | bltz CRET1, >3 // Check for error from exit. |. lw LFUNC:TMP1, FRAME_FUNC(BASE) | lui TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | sll MULTRES, CRET1, 3 | li TISNIL, LJ_TNIL | sw MULTRES, SAVE_MULTRES | mtc1 TMP3, TOBIT | lw TMP1, LFUNC:TMP1->pc | sw r0, DISPATCH_GL(jit_L)(DISPATCH) | lw KBASE, PC2PROTO(k)(TMP1) | cvt.d.s TOBIT, TOBIT | // Modified copy of ins_next which handles function header dispatch, too. | lw INS, 0(PC) | addiu PC, PC, 4 | // Assumes TISNIL == ~LJ_VMST_INTERP == -1 | sw TISNIL, DISPATCH_GL(vmstate)(DISPATCH) | decode_OP4a TMP1, INS | decode_OP4b TMP1 | sltiu TMP2, TMP1, BC_FUNCF*4 // Function header? | addu TMP0, DISPATCH, TMP1 | decode_RD8a RD, INS | lw AT, 0(TMP0) | decode_RA8a RA, INS | beqz TMP2, >2 |. decode_RA8b RA | jr AT |. decode_RD8b RD |2: | addiu RC, MULTRES, -8 | jr AT |. add RA, RA, BASE | |3: // Rethrow error from the right C frame. | load_got lj_err_throw | negu CARG2, CRET1 | call_intern lj_err_throw // (lua_State *L, int errcode) |. move CARG1, L |.endif | |//----------------------------------------------------------------------- |//-- Math helper functions ---------------------------------------------- |//----------------------------------------------------------------------- | |// Modifies AT, TMP0, FRET1, FRET2, f4. Keeps all others incl. FARG1. |.macro vm_round, func | lui TMP0, 0x4330 // Hiword of 2^52 (double). | mtc1 r0, f4 | mtc1 TMP0, f5 | abs.d FRET2, FARG1 // |x| | mfc1 AT, f13 | c.olt.d 0, FRET2, f4 | add.d FRET1, FRET2, f4 // (|x| + 2^52) - 2^52 | bc1f 0, >1 // Truncate only if |x| < 2^52. |. sub.d FRET1, FRET1, f4 | slt AT, AT, r0 |.if "func" == "ceil" | lui TMP0, 0xbff0 // Hiword of -1 (double). Preserves -0. |.else | lui TMP0, 0x3ff0 // Hiword of +1 (double). |.endif |.if "func" == "trunc" | mtc1 TMP0, f5 | c.olt.d 0, FRET2, FRET1 // |x| < result? | sub.d FRET2, FRET1, f4 | movt.d FRET1, FRET2, 0 // If yes, subtract +1. | neg.d FRET2, FRET1 | jr ra |. movn.d FRET1, FRET2, AT // Merge sign bit back in. |.else | neg.d FRET2, FRET1 | mtc1 TMP0, f5 | movn.d FRET1, FRET2, AT // Merge sign bit back in. |.if "func" == "ceil" | c.olt.d 0, FRET1, FARG1 // x > result? |.else | c.olt.d 0, FARG1, FRET1 // x < result? |.endif | sub.d FRET2, FRET1, f4 // If yes, subtract +-1. | jr ra |. movt.d FRET1, FRET2, 0 |.endif |1: | jr ra |. mov.d FRET1, FARG1 |.endmacro | |->vm_floor: | vm_round floor |->vm_ceil: | vm_round ceil |->vm_trunc: |.if JIT | vm_round trunc |.endif | |//----------------------------------------------------------------------- |//-- Miscellaneous functions -------------------------------------------- |//----------------------------------------------------------------------- | |//----------------------------------------------------------------------- |//-- FFI helper functions ----------------------------------------------- |//----------------------------------------------------------------------- | |// Handler for callback functions. Callback slot number in r1, g in r2. |->vm_ffi_callback: |.if FFI |.type CTSTATE, CTState, PC | saveregs | lw CTSTATE, GL:r2->ctype_state | addiu DISPATCH, r2, GG_G2DISP | load_got lj_ccallback_enter | sw r1, CTSTATE->cb.slot | sw CARG1, CTSTATE->cb.gpr[0] | sw CARG2, CTSTATE->cb.gpr[1] | sdc1 FARG1, CTSTATE->cb.fpr[0] | sw CARG3, CTSTATE->cb.gpr[2] | sw CARG4, CTSTATE->cb.gpr[3] | sdc1 FARG2, CTSTATE->cb.fpr[1] | addiu TMP0, sp, CFRAME_SPACE+16 | sw TMP0, CTSTATE->cb.stack | sw r0, SAVE_PC // Any value outside of bytecode is ok. | move CARG2, sp | call_intern lj_ccallback_enter // (CTState *cts, void *cf) |. move CARG1, CTSTATE | // Returns lua_State *. | lw BASE, L:CRET1->base | lw RC, L:CRET1->top | move L, CRET1 | lui TMP3, 0x59c0 // TOBIT = 2^52 + 2^51 (float). | lw LFUNC:RB, FRAME_FUNC(BASE) | mtc1 TMP3, TOBIT | li_vmstate INTERP | li TISNIL, LJ_TNIL | subu RC, RC, BASE | st_vmstate | cvt.d.s TOBIT, TOBIT | ins_callt |.endif | |->cont_ffi_callback: // Return from FFI callback. |.if FFI | load_got lj_ccallback_leave | lw CTSTATE, DISPATCH_GL(ctype_state)(DISPATCH) | sw BASE, L->base | sw RB, L->top | sw L, CTSTATE->L | move CARG2, RA | call_intern lj_ccallback_leave // (CTState *cts, TValue *o) |. move CARG1, CTSTATE | lw CRET1, CTSTATE->cb.gpr[0] | ldc1 FRET1, CTSTATE->cb.fpr[0] | lw CRET2, CTSTATE->cb.gpr[1] | b ->vm_leave_unw |. ldc1 FRET2, CTSTATE->cb.fpr[1] |.endif | |->vm_ffi_call: // Call C function via FFI. | // Caveat: needs special frame unwinding, see below. |.if FFI | .type CCSTATE, CCallState, CARG1 | lw TMP1, CCSTATE->spadj | lbu CARG2, CCSTATE->nsp | move TMP2, sp | subu sp, sp, TMP1 | sw ra, -4(TMP2) | sll CARG2, CARG2, 2 | sw r16, -8(TMP2) | sw CCSTATE, -12(TMP2) | move r16, TMP2 | addiu TMP1, CCSTATE, offsetof(CCallState, stack) | addiu TMP2, sp, 16 | beqz CARG2, >2 |. addu TMP3, TMP1, CARG2 |1: | lw TMP0, 0(TMP1) | addiu TMP1, TMP1, 4 | sltu AT, TMP1, TMP3 | sw TMP0, 0(TMP2) | bnez AT, <1 |. addiu TMP2, TMP2, 4 |2: | lw CFUNCADDR, CCSTATE->func | lw CARG2, CCSTATE->gpr[1] | lw CARG3, CCSTATE->gpr[2] | lw CARG4, CCSTATE->gpr[3] | ldc1 FARG1, CCSTATE->fpr[0] | ldc1 FARG2, CCSTATE->fpr[1] | jalr CFUNCADDR |. lw CARG1, CCSTATE->gpr[0] // Do this last, since CCSTATE is CARG1. | lw CCSTATE:TMP1, -12(r16) | lw TMP2, -8(r16) | lw ra, -4(r16) | sw CRET1, CCSTATE:TMP1->gpr[0] | sw CRET2, CCSTATE:TMP1->gpr[1] | sdc1 FRET1, CCSTATE:TMP1->fpr[0] | sdc1 FRET2, CCSTATE:TMP1->fpr[1] | move sp, r16 | jr ra |. move r16, TMP2 |.endif |// Note: vm_ffi_call must be the last function in this object file! | |//----------------------------------------------------------------------- } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; |=>defop: switch (op) { /* -- Comparison ops ---------------------------------------------------- */ /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | // RA = src1*8, RD = src2*8, JMP with RD = target | addu CARG2, BASE, RA | addu CARG3, BASE, RD | lw TMP0, HI(CARG2) | lw TMP1, HI(CARG3) | ldc1 f0, 0(CARG2) | ldc1 f2, 0(CARG3) | sltiu TMP0, TMP0, LJ_TISNUM | sltiu TMP1, TMP1, LJ_TISNUM | lhu TMP2, OFS_RD(PC) | and TMP0, TMP0, TMP1 | addiu PC, PC, 4 | beqz TMP0, ->vmeta_comp |. lui TMP1, (-(BCBIAS_J*4 >> 16) & 65535) | decode_RD4b TMP2 | addu TMP2, TMP2, TMP1 if (op == BC_ISLT || op == BC_ISGE) { | c.olt.d f0, f2 } else { | c.ole.d f0, f2 } if (op == BC_ISLT || op == BC_ISLE) { | movf TMP2, r0 } else { | movt TMP2, r0 } | addu PC, PC, TMP2 |1: | ins_next break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; | // RA = src1*8, RD = src2*8, JMP with RD = target | addu RA, BASE, RA | addiu PC, PC, 4 | lw TMP0, HI(RA) | ldc1 f0, 0(RA) | addu RD, BASE, RD | lhu TMP2, -4+OFS_RD(PC) | lw TMP1, HI(RD) | ldc1 f2, 0(RD) | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | sltiu AT, TMP0, LJ_TISNUM | sltiu CARG1, TMP1, LJ_TISNUM | decode_RD4b TMP2 | and AT, AT, CARG1 | beqz AT, >5 |. addu TMP2, TMP2, TMP3 | c.eq.d f0, f2 if (vk) { | movf TMP2, r0 } else { | movt TMP2, r0 } |1: | addu PC, PC, TMP2 | ins_next |5: // Either or both types are not numbers. | lw CARG2, LO(RA) | lw CARG3, LO(RD) |.if FFI | li TMP3, LJ_TCDATA | beq TMP0, TMP3, ->vmeta_equal_cd |.endif |. sltiu AT, TMP0, LJ_TISPRI // Not a primitive? |.if FFI | beq TMP1, TMP3, ->vmeta_equal_cd |.endif |. xor TMP3, CARG2, CARG3 // Same tv? | xor TMP1, TMP1, TMP0 // Same type? | sltiu CARG1, TMP0, LJ_TISTABUD+1 // Table or userdata? | movz TMP3, r0, AT // Ignore tv if primitive. | movn CARG1, r0, TMP1 // Tab/ud and same type? | or AT, TMP1, TMP3 // Same type && (pri||same tv). | movz CARG1, r0, AT | beqz CARG1, <1 // Done if not tab/ud or not same type or same tv. if (vk) { |. movn TMP2, r0, AT } else { |. movz TMP2, r0, AT } | // Different tables or userdatas. Need to check __eq metamethod. | // Field metatable must be at same offset for GCtab and GCudata! | lw TAB:TMP1, TAB:CARG2->metatable | beqz TAB:TMP1, <1 // No metatable? |. nop | lbu TMP1, TAB:TMP1->nomm | andi TMP1, TMP1, 1<vmeta_equal // Handle __eq metamethod. |. li CARG4, 1-vk // ne = 0 or 1. break; case BC_ISEQS: case BC_ISNES: vk = op == BC_ISEQS; | // RA = src*8, RD = str_const*8 (~), JMP with RD = target | addu RA, BASE, RA | addiu PC, PC, 4 | lw TMP0, HI(RA) | srl RD, RD, 1 | lw STR:TMP3, LO(RA) | subu RD, KBASE, RD | lhu TMP2, -4+OFS_RD(PC) |.if FFI | li AT, LJ_TCDATA | beq TMP0, AT, ->vmeta_equal_cd |.endif |. lw STR:TMP1, -4(RD) // KBASE-4-str_const*4 | addiu TMP0, TMP0, -LJ_TSTR | decode_RD4b TMP2 | xor TMP1, STR:TMP1, STR:TMP3 | or TMP0, TMP0, TMP1 | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | addu TMP2, TMP2, TMP3 if (vk) { | movn TMP2, r0, TMP0 } else { | movz TMP2, r0, TMP0 } | addu PC, PC, TMP2 | ins_next break; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; | // RA = src*8, RD = num_const*8, JMP with RD = target | addu RA, BASE, RA | addiu PC, PC, 4 | lw TMP0, HI(RA) | ldc1 f0, 0(RA) | addu RD, KBASE, RD | lhu TMP2, -4+OFS_RD(PC) | ldc1 f2, 0(RD) | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | sltiu AT, TMP0, LJ_TISNUM | decode_RD4b TMP2 |.if FFI | beqz AT, >5 |.else | beqz AT, >1 |.endif |. addu TMP2, TMP2, TMP3 | c.eq.d f0, f2 if (vk) { | movf TMP2, r0 | addu PC, PC, TMP2 |1: } else { | movt TMP2, r0 |1: | addu PC, PC, TMP2 } | ins_next |.if FFI |5: | li AT, LJ_TCDATA | beq TMP0, AT, ->vmeta_equal_cd |. nop | b <1 |. nop |.endif break; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; | // RA = src*8, RD = primitive_type*8 (~), JMP with RD = target | addu RA, BASE, RA | srl TMP1, RD, 3 | lw TMP0, HI(RA) | lhu TMP2, OFS_RD(PC) | not TMP1, TMP1 | addiu PC, PC, 4 |.if FFI | li AT, LJ_TCDATA | beq TMP0, AT, ->vmeta_equal_cd |.endif |. xor TMP0, TMP0, TMP1 | decode_RD4b TMP2 | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | addu TMP2, TMP2, TMP3 if (vk) { | movn TMP2, r0, TMP0 } else { | movz TMP2, r0, TMP0 } | addu PC, PC, TMP2 | ins_next break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | // RA = dst*8 or unused, RD = src*8, JMP with RD = target | addu RD, BASE, RD | lhu TMP2, OFS_RD(PC) | lw TMP0, HI(RD) | addiu PC, PC, 4 if (op == BC_IST || op == BC_ISF) { | sltiu TMP0, TMP0, LJ_TISTRUECOND | decode_RD4b TMP2 | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | addu TMP2, TMP2, TMP3 if (op == BC_IST) { | movz TMP2, r0, TMP0 } else { | movn TMP2, r0, TMP0 } | addu PC, PC, TMP2 } else { | sltiu TMP0, TMP0, LJ_TISTRUECOND | ldc1 f0, 0(RD) if (op == BC_ISTC) { | beqz TMP0, >1 } else { | bnez TMP0, >1 } |. addu RA, BASE, RA | decode_RD4b TMP2 | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | addu TMP2, TMP2, TMP3 | sdc1 f0, 0(RA) | addu PC, PC, TMP2 |1: } | ins_next break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: | // RA = dst*8, RD = src*8 | addu RD, BASE, RD | addu RA, BASE, RA | ldc1 f0, 0(RD) | ins_next1 | sdc1 f0, 0(RA) | ins_next2 break; case BC_NOT: | // RA = dst*8, RD = src*8 | addu RD, BASE, RD | addu RA, BASE, RA | lw TMP0, HI(RD) | li TMP1, LJ_TFALSE | sltiu TMP0, TMP0, LJ_TISTRUECOND | addiu TMP1, TMP0, LJ_TTRUE | ins_next1 | sw TMP1, HI(RA) | ins_next2 break; case BC_UNM: | // RA = dst*8, RD = src*8 | addu CARG3, BASE, RD | addu RA, BASE, RA | lw TMP0, HI(CARG3) | ldc1 f0, 0(CARG3) | sltiu AT, TMP0, LJ_TISNUM | beqz AT, ->vmeta_unm |. neg.d f0, f0 | ins_next1 | sdc1 f0, 0(RA) | ins_next2 break; case BC_LEN: | // RA = dst*8, RD = src*8 | addu CARG2, BASE, RD | addu RA, BASE, RA | lw TMP0, HI(CARG2) | lw CARG1, LO(CARG2) | li AT, LJ_TSTR | bne TMP0, AT, >2 |. li AT, LJ_TTAB | lw CRET1, STR:CARG1->len |1: | mtc1 CRET1, f0 | cvt.d.w f0, f0 | ins_next1 | sdc1 f0, 0(RA) | ins_next2 |2: | bne TMP0, AT, ->vmeta_len |. nop #if LJ_52 | lw TAB:TMP2, TAB:CARG1->metatable | bnez TAB:TMP2, >9 |. nop |3: #endif |->BC_LEN_Z: | load_got lj_tab_len | call_intern lj_tab_len // (GCtab *t) |. nop | // Returns uint32_t (but less than 2^31). | b <1 |. nop #if LJ_52 |9: | lbu TMP0, TAB:TMP2->nomm | andi TMP0, TMP0, 1<vmeta_len |. nop #endif break; /* -- Binary ops -------------------------------------------------------- */ |.macro ins_arithpre ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); | decode_RB8a RB, INS | decode_RB8b RB | decode_RDtoRC8 RC, RD | // RA = dst*8, RB = src1*8, RC = src2*8 | num_const*8 ||switch (vk) { ||case 0: | addu CARG3, BASE, RB | addu CARG4, KBASE, RC | lw TMP1, HI(CARG3) | ldc1 f20, 0(CARG3) | ldc1 f22, 0(CARG4) | sltiu AT, TMP1, LJ_TISNUM || break; ||case 1: | addu CARG4, BASE, RB | addu CARG3, KBASE, RC | lw TMP1, HI(CARG4) | ldc1 f22, 0(CARG4) | ldc1 f20, 0(CARG3) | sltiu AT, TMP1, LJ_TISNUM || break; ||default: | addu CARG3, BASE, RB | addu CARG4, BASE, RC | lw TMP1, HI(CARG3) | lw TMP2, HI(CARG4) | ldc1 f20, 0(CARG3) | ldc1 f22, 0(CARG4) | sltiu AT, TMP1, LJ_TISNUM | sltiu TMP0, TMP2, LJ_TISNUM | and AT, AT, TMP0 || break; ||} | beqz AT, ->vmeta_arith |. addu RA, BASE, RA |.endmacro | |.macro fpmod, a, b, c |->BC_MODVN_Z: | bal ->vm_floor // floor(b/c) |. div.d FARG1, b, c | mul.d a, FRET1, c | sub.d a, b, a // b - floor(b/c)*c |.endmacro | |.macro ins_arith, ins | ins_arithpre |.if "ins" == "fpmod_" | b ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. |. nop |.else | ins f0, f20, f22 | ins_next1 | sdc1 f0, 0(RA) | ins_next2 |.endif |.endmacro case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | ins_arith add.d break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | ins_arith sub.d break; case BC_MULVN: case BC_MULNV: case BC_MULVV: | ins_arith mul.d break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | ins_arith div.d break; case BC_MODVN: | ins_arith fpmod break; case BC_MODNV: case BC_MODVV: | ins_arith fpmod_ break; case BC_POW: | decode_RB8a RB, INS | decode_RB8b RB | decode_RDtoRC8 RC, RD | addu CARG3, BASE, RB | addu CARG4, BASE, RC | lw TMP1, HI(CARG3) | lw TMP2, HI(CARG4) | ldc1 FARG1, 0(CARG3) | ldc1 FARG2, 0(CARG4) | sltiu AT, TMP1, LJ_TISNUM | sltiu TMP0, TMP2, LJ_TISNUM | and AT, AT, TMP0 | load_got pow | beqz AT, ->vmeta_arith |. addu RA, BASE, RA | call_extern |. nop | ins_next1 | sdc1 FRET1, 0(RA) | ins_next2 break; case BC_CAT: | // RA = dst*8, RB = src_start*8, RC = src_end*8 | decode_RB8a RB, INS | decode_RB8b RB | decode_RDtoRC8 RC, RD | subu CARG3, RC, RB | sw BASE, L->base | addu CARG2, BASE, RC | move MULTRES, RB |->BC_CAT_Z: | load_got lj_meta_cat | srl CARG3, CARG3, 3 | sw PC, SAVE_PC | call_intern lj_meta_cat // (lua_State *L, TValue *top, int left) |. move CARG1, L | // Returns NULL (finished) or TValue * (metamethod). | bnez CRET1, ->vmeta_binop |. lw BASE, L->base | addu RB, BASE, MULTRES | ldc1 f0, 0(RB) | addu RA, BASE, RA | ins_next1 | sdc1 f0, 0(RA) // Copy result from RB to RA. | ins_next2 break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: | // RA = dst*8, RD = str_const*8 (~) | srl TMP1, RD, 1 | subu TMP1, KBASE, TMP1 | ins_next1 | lw TMP0, -4(TMP1) // KBASE-4-str_const*4 | addu RA, BASE, RA | li TMP2, LJ_TSTR | sw TMP0, LO(RA) | sw TMP2, HI(RA) | ins_next2 break; case BC_KCDATA: |.if FFI | // RA = dst*8, RD = cdata_const*8 (~) | srl TMP1, RD, 1 | subu TMP1, KBASE, TMP1 | ins_next1 | lw TMP0, -4(TMP1) // KBASE-4-cdata_const*4 | addu RA, BASE, RA | li TMP2, LJ_TCDATA | sw TMP0, LO(RA) | sw TMP2, HI(RA) | ins_next2 |.endif break; case BC_KSHORT: | // RA = dst*8, RD = int16_literal*8 | sra RD, INS, 16 | mtc1 RD, f0 | addu RA, BASE, RA | cvt.d.w f0, f0 | ins_next1 | sdc1 f0, 0(RA) | ins_next2 break; case BC_KNUM: | // RA = dst*8, RD = num_const*8 | addu RD, KBASE, RD | addu RA, BASE, RA | ldc1 f0, 0(RD) | ins_next1 | sdc1 f0, 0(RA) | ins_next2 break; case BC_KPRI: | // RA = dst*8, RD = primitive_type*8 (~) | srl TMP1, RD, 3 | addu RA, BASE, RA | not TMP0, TMP1 | ins_next1 | sw TMP0, HI(RA) | ins_next2 break; case BC_KNIL: | // RA = base*8, RD = end*8 | addu RA, BASE, RA | sw TISNIL, HI(RA) | addiu RA, RA, 8 | addu RD, BASE, RD |1: | sw TISNIL, HI(RA) | slt AT, RA, RD | bnez AT, <1 |. addiu RA, RA, 8 | ins_next_ break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: | // RA = dst*8, RD = uvnum*8 | lw LFUNC:RB, FRAME_FUNC(BASE) | srl RD, RD, 1 | addu RD, RD, LFUNC:RB | lw UPVAL:RB, LFUNC:RD->uvptr | ins_next1 | lw TMP1, UPVAL:RB->v | ldc1 f0, 0(TMP1) | addu RA, BASE, RA | sdc1 f0, 0(RA) | ins_next2 break; case BC_USETV: | // RA = uvnum*8, RD = src*8 | lw LFUNC:RB, FRAME_FUNC(BASE) | srl RA, RA, 1 | addu RD, BASE, RD | addu RA, RA, LFUNC:RB | ldc1 f0, 0(RD) | lw UPVAL:RB, LFUNC:RA->uvptr | lbu TMP3, UPVAL:RB->marked | lw CARG2, UPVAL:RB->v | andi TMP3, TMP3, LJ_GC_BLACK // isblack(uv) | lbu TMP0, UPVAL:RB->closed | lw TMP2, HI(RD) | sdc1 f0, 0(CARG2) | li AT, LJ_GC_BLACK|1 | or TMP3, TMP3, TMP0 | beq TMP3, AT, >2 // Upvalue is closed and black? |. addiu TMP2, TMP2, -(LJ_TISNUM+1) |1: | ins_next | |2: // Check if new value is collectable. | sltiu AT, TMP2, LJ_TISGCV - (LJ_TISNUM+1) | beqz AT, <1 // tvisgcv(v) |. lw TMP1, LO(RD) | lbu TMP3, GCOBJ:TMP1->gch.marked | andi TMP3, TMP3, LJ_GC_WHITES // iswhite(v) | beqz TMP3, <1 |. load_got lj_gc_barrieruv | // Crossed a write barrier. Move the barrier forward. | call_intern lj_gc_barrieruv // (global_State *g, TValue *tv) |. addiu CARG1, DISPATCH, GG_DISP2G | b <1 |. nop break; case BC_USETS: | // RA = uvnum*8, RD = str_const*8 (~) | lw LFUNC:RB, FRAME_FUNC(BASE) | srl RA, RA, 1 | srl TMP1, RD, 1 | addu RA, RA, LFUNC:RB | subu TMP1, KBASE, TMP1 | lw UPVAL:RB, LFUNC:RA->uvptr | lw STR:TMP1, -4(TMP1) // KBASE-4-str_const*4 | lbu TMP2, UPVAL:RB->marked | lw CARG2, UPVAL:RB->v | lbu TMP3, STR:TMP1->marked | andi AT, TMP2, LJ_GC_BLACK // isblack(uv) | lbu TMP2, UPVAL:RB->closed | li TMP0, LJ_TSTR | sw STR:TMP1, LO(CARG2) | bnez AT, >2 |. sw TMP0, HI(CARG2) |1: | ins_next | |2: // Check if string is white and ensure upvalue is closed. | beqz TMP2, <1 |. andi AT, TMP3, LJ_GC_WHITES // iswhite(str) | beqz AT, <1 |. load_got lj_gc_barrieruv | // Crossed a write barrier. Move the barrier forward. | call_intern lj_gc_barrieruv // (global_State *g, TValue *tv) |. addiu CARG1, DISPATCH, GG_DISP2G | b <1 |. nop break; case BC_USETN: | // RA = uvnum*8, RD = num_const*8 | lw LFUNC:RB, FRAME_FUNC(BASE) | srl RA, RA, 1 | addu RD, KBASE, RD | addu RA, RA, LFUNC:RB | ldc1 f0, 0(RD) | lw UPVAL:RB, LFUNC:RA->uvptr | ins_next1 | lw TMP1, UPVAL:RB->v | sdc1 f0, 0(TMP1) | ins_next2 break; case BC_USETP: | // RA = uvnum*8, RD = primitive_type*8 (~) | lw LFUNC:RB, FRAME_FUNC(BASE) | srl RA, RA, 1 | srl TMP0, RD, 3 | addu RA, RA, LFUNC:RB | not TMP0, TMP0 | lw UPVAL:RB, LFUNC:RA->uvptr | ins_next1 | lw TMP1, UPVAL:RB->v | sw TMP0, HI(TMP1) | ins_next2 break; case BC_UCLO: | // RA = level*8, RD = target | lw TMP2, L->openupval | branch_RD // Do this first since RD is not saved. | load_got lj_func_closeuv | sw BASE, L->base | beqz TMP2, >1 |. move CARG1, L | call_intern lj_func_closeuv // (lua_State *L, TValue *level) |. addu CARG2, BASE, RA | lw BASE, L->base |1: | ins_next break; case BC_FNEW: | // RA = dst*8, RD = proto_const*8 (~) (holding function prototype) | srl TMP1, RD, 1 | load_got lj_func_newL_gc | subu TMP1, KBASE, TMP1 | lw CARG3, FRAME_FUNC(BASE) | lw CARG2, -4(TMP1) // KBASE-4-tab_const*4 | sw BASE, L->base | sw PC, SAVE_PC | // (lua_State *L, GCproto *pt, GCfuncL *parent) | call_intern lj_func_newL_gc |. move CARG1, L | // Returns GCfuncL *. | lw BASE, L->base | li TMP0, LJ_TFUNC | ins_next1 | addu RA, BASE, RA | sw TMP0, HI(RA) | sw LFUNC:CRET1, LO(RA) | ins_next2 break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: case BC_TDUP: | // RA = dst*8, RD = (hbits|asize)*8 | tab_const*8 (~) | lw TMP0, DISPATCH_GL(gc.total)(DISPATCH) | lw TMP1, DISPATCH_GL(gc.threshold)(DISPATCH) | sw BASE, L->base | sw PC, SAVE_PC | sltu AT, TMP0, TMP1 | beqz AT, >5 |1: if (op == BC_TNEW) { | load_got lj_tab_new | srl CARG2, RD, 3 | andi CARG2, CARG2, 0x7ff | li TMP0, 0x801 | addiu AT, CARG2, -0x7ff | srl CARG3, RD, 14 | movz CARG2, TMP0, AT | // (lua_State *L, int32_t asize, uint32_t hbits) | call_intern lj_tab_new |. move CARG1, L | // Returns Table *. } else { | load_got lj_tab_dup | srl TMP1, RD, 1 | subu TMP1, KBASE, TMP1 | move CARG1, L | call_intern lj_tab_dup // (lua_State *L, Table *kt) |. lw CARG2, -4(TMP1) // KBASE-4-str_const*4 | // Returns Table *. } | lw BASE, L->base | ins_next1 | addu RA, BASE, RA | li TMP0, LJ_TTAB | sw TAB:CRET1, LO(RA) | sw TMP0, HI(RA) | ins_next2 |5: | load_got lj_gc_step_fixtop | move MULTRES, RD | call_intern lj_gc_step_fixtop // (lua_State *L) |. move CARG1, L | b <1 |. move RD, MULTRES break; case BC_GGET: | // RA = dst*8, RD = str_const*8 (~) case BC_GSET: | // RA = src*8, RD = str_const*8 (~) | lw LFUNC:TMP2, FRAME_FUNC(BASE) | srl TMP1, RD, 1 | subu TMP1, KBASE, TMP1 | lw TAB:RB, LFUNC:TMP2->env | lw STR:RC, -4(TMP1) // KBASE-4-str_const*4 if (op == BC_GGET) { | b ->BC_TGETS_Z } else { | b ->BC_TSETS_Z } |. addu RA, BASE, RA break; case BC_TGETV: | // RA = dst*8, RB = table*8, RC = key*8 | decode_RB8a RB, INS | decode_RB8b RB | decode_RDtoRC8 RC, RD | addu CARG2, BASE, RB | addu CARG3, BASE, RC | lw TMP1, HI(CARG2) | lw TMP2, HI(CARG3) | lw TAB:RB, LO(CARG2) | li AT, LJ_TTAB | ldc1 f0, 0(CARG3) | bne TMP1, AT, ->vmeta_tgetv |. addu RA, BASE, RA | sltiu AT, TMP2, LJ_TISNUM | beqz AT, >5 |. li AT, LJ_TSTR | | // Convert number key to integer, check for integerness and range. | cvt.w.d f2, f0 | lw TMP0, TAB:RB->asize | mfc1 TMP2, f2 | cvt.d.w f4, f2 | lw TMP1, TAB:RB->array | c.eq.d f0, f4 | sltu AT, TMP2, TMP0 | movf AT, r0 | sll TMP2, TMP2, 3 | beqz AT, ->vmeta_tgetv // Integer key and in array part? |. addu TMP2, TMP1, TMP2 | lw TMP0, HI(TMP2) | beq TMP0, TISNIL, >2 |. ldc1 f0, 0(TMP2) |1: | ins_next1 | sdc1 f0, 0(RA) | ins_next2 | |2: // Check for __index if table value is nil. | lw TAB:TMP2, TAB:RB->metatable | beqz TAB:TMP2, <1 // No metatable: done. |. nop | lbu TMP0, TAB:TMP2->nomm | andi TMP0, TMP0, 1<vmeta_tgetv |. nop | |5: | bne TMP2, AT, ->vmeta_tgetv |. lw STR:RC, LO(CARG3) | b ->BC_TGETS_Z // String key? |. nop break; case BC_TGETS: | // RA = dst*8, RB = table*8, RC = str_const*4 (~) | decode_RB8a RB, INS | decode_RB8b RB | addu CARG2, BASE, RB | decode_RC4a RC, INS | lw TMP0, HI(CARG2) | decode_RC4b RC | li AT, LJ_TTAB | lw TAB:RB, LO(CARG2) | subu CARG3, KBASE, RC | lw STR:RC, -4(CARG3) // KBASE-4-str_const*4 | bne TMP0, AT, ->vmeta_tgets1 |. addu RA, BASE, RA |->BC_TGETS_Z: | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = dst*8 | lw TMP0, TAB:RB->hmask | lw TMP1, STR:RC->hash | lw NODE:TMP2, TAB:RB->node | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | sll TMP0, TMP1, 5 | sll TMP1, TMP1, 3 | subu TMP1, TMP0, TMP1 | addu NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) |1: | lw CARG1, offsetof(Node, key)+HI(NODE:TMP2) | lw TMP0, offsetof(Node, key)+LO(NODE:TMP2) | lw NODE:TMP1, NODE:TMP2->next | lw CARG2, offsetof(Node, val)+HI(NODE:TMP2) | addiu CARG1, CARG1, -LJ_TSTR | xor TMP0, TMP0, STR:RC | or AT, CARG1, TMP0 | bnez AT, >4 |. lw TAB:TMP3, TAB:RB->metatable | beq CARG2, TISNIL, >5 // Key found, but nil value? |. lw CARG1, offsetof(Node, val)+LO(NODE:TMP2) |3: | ins_next1 | sw CARG2, HI(RA) | sw CARG1, LO(RA) | ins_next2 | |4: // Follow hash chain. | bnez NODE:TMP1, <1 |. move NODE:TMP2, NODE:TMP1 | // End of hash chain: key not found, nil result. | |5: // Check for __index if table value is nil. | beqz TAB:TMP3, <3 // No metatable: done. |. li CARG2, LJ_TNIL | lbu TMP0, TAB:TMP3->nomm | andi TMP0, TMP0, 1<vmeta_tgets |. nop break; case BC_TGETB: | // RA = dst*8, RB = table*8, RC = index*8 | decode_RB8a RB, INS | decode_RB8b RB | addu CARG2, BASE, RB | decode_RDtoRC8 RC, RD | lw CARG1, HI(CARG2) | li AT, LJ_TTAB | lw TAB:RB, LO(CARG2) | addu RA, BASE, RA | bne CARG1, AT, ->vmeta_tgetb |. srl TMP0, RC, 3 | lw TMP1, TAB:RB->asize | lw TMP2, TAB:RB->array | sltu AT, TMP0, TMP1 | beqz AT, ->vmeta_tgetb |. addu RC, TMP2, RC | lw TMP1, HI(RC) | beq TMP1, TISNIL, >5 |. ldc1 f0, 0(RC) |1: | ins_next1 | sdc1 f0, 0(RA) | ins_next2 | |5: // Check for __index if table value is nil. | lw TAB:TMP2, TAB:RB->metatable | beqz TAB:TMP2, <1 // No metatable: done. |. nop | lbu TMP1, TAB:TMP2->nomm | andi TMP1, TMP1, 1<vmeta_tgetb // Caveat: preserve TMP0! |. nop break; case BC_TSETV: | // RA = src*8, RB = table*8, RC = key*8 | decode_RB8a RB, INS | decode_RB8b RB | decode_RDtoRC8 RC, RD | addu CARG2, BASE, RB | addu CARG3, BASE, RC | lw TMP1, HI(CARG2) | lw TMP2, HI(CARG3) | lw TAB:RB, LO(CARG2) | li AT, LJ_TTAB | ldc1 f0, 0(CARG3) | bne TMP1, AT, ->vmeta_tsetv |. addu RA, BASE, RA | sltiu AT, TMP2, LJ_TISNUM | beqz AT, >5 |. li AT, LJ_TSTR | | // Convert number key to integer, check for integerness and range. | cvt.w.d f2, f0 | lw TMP0, TAB:RB->asize | mfc1 TMP2, f2 | cvt.d.w f4, f2 | lw TMP1, TAB:RB->array | c.eq.d f0, f4 | sltu AT, TMP2, TMP0 | movf AT, r0 | sll TMP2, TMP2, 3 | beqz AT, ->vmeta_tsetv // Integer key and in array part? |. addu TMP1, TMP1, TMP2 | lbu TMP3, TAB:RB->marked | lw TMP0, HI(TMP1) | beq TMP0, TISNIL, >3 |. ldc1 f0, 0(RA) |1: | andi AT, TMP3, LJ_GC_BLACK // isblack(table) | bnez AT, >7 |. sdc1 f0, 0(TMP1) |2: | ins_next | |3: // Check for __newindex if previous value is nil. | lw TAB:TMP2, TAB:RB->metatable | beqz TAB:TMP2, <1 // No metatable: done. |. nop | lbu TMP2, TAB:TMP2->nomm | andi TMP2, TMP2, 1<vmeta_tsetv |. nop | |5: | bne TMP2, AT, ->vmeta_tsetv |. lw STR:RC, LO(CARG3) | b ->BC_TSETS_Z // String key? |. nop | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0, <2 break; case BC_TSETS: | // RA = src*8, RB = table*8, RC = str_const*8 (~) | decode_RB8a RB, INS | decode_RB8b RB | addu CARG2, BASE, RB | decode_RC4a RC, INS | lw TMP0, HI(CARG2) | decode_RC4b RC | li AT, LJ_TTAB | subu CARG3, KBASE, RC | lw TAB:RB, LO(CARG2) | lw STR:RC, -4(CARG3) // KBASE-4-str_const*4 | bne TMP0, AT, ->vmeta_tsets1 |. addu RA, BASE, RA |->BC_TSETS_Z: | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = BASE+src*8 | lw TMP0, TAB:RB->hmask | lw TMP1, STR:RC->hash | lw NODE:TMP2, TAB:RB->node | sb r0, TAB:RB->nomm // Clear metamethod cache. | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | sll TMP0, TMP1, 5 | sll TMP1, TMP1, 3 | subu TMP1, TMP0, TMP1 | addu NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) | ldc1 f20, 0(RA) |1: | lw CARG1, offsetof(Node, key)+HI(NODE:TMP2) | lw TMP0, offsetof(Node, key)+LO(NODE:TMP2) | li AT, LJ_TSTR | lw NODE:TMP1, NODE:TMP2->next | bne CARG1, AT, >5 |. lw CARG2, offsetof(Node, val)+HI(NODE:TMP2) | bne TMP0, STR:RC, >5 |. lbu TMP3, TAB:RB->marked | beq CARG2, TISNIL, >4 // Key found, but nil value? |. lw TAB:TMP0, TAB:RB->metatable |2: | andi AT, TMP3, LJ_GC_BLACK // isblack(table) | bnez AT, >7 |. sdc1 f20, NODE:TMP2->val |3: | ins_next | |4: // Check for __newindex if previous value is nil. | beqz TAB:TMP0, <2 // No metatable: done. |. nop | lbu TMP0, TAB:TMP0->nomm | andi TMP0, TMP0, 1<vmeta_tsets |. nop | |5: // Follow hash chain. | bnez NODE:TMP1, <1 |. move NODE:TMP2, NODE:TMP1 | // End of hash chain: key not found, add a new one | | // But check for __newindex first. | lw TAB:TMP2, TAB:RB->metatable | beqz TAB:TMP2, >6 // No metatable: continue. |. addiu CARG3, DISPATCH, DISPATCH_GL(tmptv) | lbu TMP0, TAB:TMP2->nomm | andi TMP0, TMP0, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. |. li AT, LJ_TSTR |6: | load_got lj_tab_newkey | sw STR:RC, LO(CARG3) | sw AT, HI(CARG3) | sw BASE, L->base | move CARG2, TAB:RB | sw PC, SAVE_PC | call_intern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k |. move CARG1, L | // Returns TValue *. | lw BASE, L->base | b <3 // No 2nd write barrier needed. |. sdc1 f20, 0(CRET1) | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0, <3 break; case BC_TSETB: | // RA = src*8, RB = table*8, RC = index*8 | decode_RB8a RB, INS | decode_RB8b RB | addu CARG2, BASE, RB | decode_RDtoRC8 RC, RD | lw CARG1, HI(CARG2) | li AT, LJ_TTAB | lw TAB:RB, LO(CARG2) | addu RA, BASE, RA | bne CARG1, AT, ->vmeta_tsetb |. srl TMP0, RC, 3 | lw TMP1, TAB:RB->asize | lw TMP2, TAB:RB->array | sltu AT, TMP0, TMP1 | beqz AT, ->vmeta_tsetb |. addu RC, TMP2, RC | lw TMP1, HI(RC) | lbu TMP3, TAB:RB->marked | beq TMP1, TISNIL, >5 |. ldc1 f0, 0(RA) |1: | andi AT, TMP3, LJ_GC_BLACK // isblack(table) | bnez AT, >7 |. sdc1 f0, 0(RC) |2: | ins_next | |5: // Check for __newindex if previous value is nil. | lw TAB:TMP2, TAB:RB->metatable | beqz TAB:TMP2, <1 // No metatable: done. |. nop | lbu TMP1, TAB:TMP2->nomm | andi TMP1, TMP1, 1<vmeta_tsetb // Caveat: preserve TMP0! |. nop | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0, <2 break; case BC_TSETM: | // RA = base*8 (table at base-1), RD = num_const*8 (start index) | addu RA, BASE, RA |1: | addu TMP3, KBASE, RD | lw TAB:CARG2, -8+LO(RA) // Guaranteed to be a table. | addiu TMP0, MULTRES, -8 | lw TMP3, LO(TMP3) // Integer constant is in lo-word. | beqz TMP0, >4 // Nothing to copy? |. srl CARG3, TMP0, 3 | addu CARG3, CARG3, TMP3 | lw TMP2, TAB:CARG2->asize | sll TMP1, TMP3, 3 | lbu TMP3, TAB:CARG2->marked | lw CARG1, TAB:CARG2->array | sltu AT, TMP2, CARG3 | bnez AT, >5 |. addu TMP2, RA, TMP0 | addu TMP1, TMP1, CARG1 | andi TMP0, TMP3, LJ_GC_BLACK // isblack(table) |3: // Copy result slots to table. | ldc1 f0, 0(RA) | addiu RA, RA, 8 | sltu AT, RA, TMP2 | sdc1 f0, 0(TMP1) | bnez AT, <3 |. addiu TMP1, TMP1, 8 | bnez TMP0, >7 |. nop |4: | ins_next | |5: // Need to resize array part. | load_got lj_tab_reasize | sw BASE, L->base | sw PC, SAVE_PC | move BASE, RD | call_intern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize) |. move CARG1, L | // Must not reallocate the stack. | move RD, BASE | b <1 |. lw BASE, L->base // Reload BASE for lack of a saved register. | |7: // Possible table write barrier for any value. Skip valiswhite check. | barrierback TAB:CARG2, TMP3, TMP0, <4 break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALLM: | // RA = base*8, (RB = (nresults+1)*8,) RC = extra_nargs*8 | decode_RDtoRC8 NARGS8:RC, RD | b ->BC_CALL_Z |. addu NARGS8:RC, NARGS8:RC, MULTRES break; case BC_CALL: | // RA = base*8, (RB = (nresults+1)*8,) RC = (nargs+1)*8 | decode_RDtoRC8 NARGS8:RC, RD |->BC_CALL_Z: | move TMP2, BASE | addu BASE, BASE, RA | li AT, LJ_TFUNC | lw TMP0, HI(BASE) | lw LFUNC:RB, LO(BASE) | addiu BASE, BASE, 8 | bne TMP0, AT, ->vmeta_call |. addiu NARGS8:RC, NARGS8:RC, -8 | ins_call break; case BC_CALLMT: | // RA = base*8, (RB = 0,) RC = extra_nargs*8 | addu NARGS8:RD, NARGS8:RD, MULTRES // BC_CALLT gets RC from RD. | // Fall through. Assumes BC_CALLT follows. break; case BC_CALLT: | // RA = base*8, (RB = 0,) RC = (nargs+1)*8 | addu RA, BASE, RA | li AT, LJ_TFUNC | lw TMP0, HI(RA) | lw LFUNC:RB, LO(RA) | move NARGS8:RC, RD | lw TMP1, FRAME_PC(BASE) | addiu RA, RA, 8 | bne TMP0, AT, ->vmeta_callt |. addiu NARGS8:RC, NARGS8:RC, -8 |->BC_CALLT_Z: | andi TMP0, TMP1, FRAME_TYPE // Caveat: preserve TMP0 until the 'or'. | lbu TMP3, LFUNC:RB->ffid | bnez TMP0, >7 |. xori TMP2, TMP1, FRAME_VARG |1: | sw LFUNC:RB, FRAME_FUNC(BASE) // Copy function down, but keep PC. | sltiu AT, TMP3, 2 // (> FF_C) Calling a fast function? | move TMP2, BASE | beqz NARGS8:RC, >3 |. move TMP3, NARGS8:RC |2: | ldc1 f0, 0(RA) | addiu RA, RA, 8 | addiu TMP3, TMP3, -8 | sdc1 f0, 0(TMP2) | bnez TMP3, <2 |. addiu TMP2, TMP2, 8 |3: | or TMP0, TMP0, AT | beqz TMP0, >5 |. nop |4: | ins_callt | |5: // Tailcall to a fast function with a Lua frame below. | lw INS, -4(TMP1) | decode_RA8a RA, INS | decode_RA8b RA | subu TMP1, BASE, RA | lw LFUNC:TMP1, -8+FRAME_FUNC(TMP1) | lw TMP1, LFUNC:TMP1->pc | b <4 |. lw KBASE, PC2PROTO(k)(TMP1) // Need to prepare KBASE. | |7: // Tailcall from a vararg function. | andi AT, TMP2, FRAME_TYPEP | bnez AT, <1 // Vararg frame below? |. subu TMP2, BASE, TMP2 // Relocate BASE down. | move BASE, TMP2 | lw TMP1, FRAME_PC(TMP2) | b <1 |. andi TMP0, TMP1, FRAME_TYPE break; case BC_ITERC: | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 ((2+1)*8)) | move TMP2, BASE | addu BASE, BASE, RA | li AT, LJ_TFUNC | lw TMP1, -24+HI(BASE) | lw LFUNC:RB, -24+LO(BASE) | ldc1 f2, -8(BASE) | ldc1 f0, -16(BASE) | sw TMP1, HI(BASE) // Copy callable. | sw LFUNC:RB, LO(BASE) | sdc1 f2, 16(BASE) // Copy control var. | sdc1 f0, 8(BASE) // Copy state. | addiu BASE, BASE, 8 | bne TMP1, AT, ->vmeta_call |. li NARGS8:RC, 16 // Iterators get 2 arguments. | ins_call break; case BC_ITERN: | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 (2+1)*8) |.if JIT | // NYI: add hotloop, record BC_ITERN. |.endif | addu RA, BASE, RA | lw TAB:RB, -16+LO(RA) | lw RC, -8+LO(RA) // Get index from control var. | lw TMP0, TAB:RB->asize | lw TMP1, TAB:RB->array | addiu PC, PC, 4 |1: // Traverse array part. | sltu AT, RC, TMP0 | beqz AT, >5 // Index points after array part? |. sll TMP3, RC, 3 | addu TMP3, TMP1, TMP3 | lw TMP2, HI(TMP3) | ldc1 f0, 0(TMP3) | mtc1 RC, f2 | lhu RD, -4+OFS_RD(PC) | beq TMP2, TISNIL, <1 // Skip holes in array part. |. addiu RC, RC, 1 | cvt.d.w f2, f2 | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | sdc1 f0, 8(RA) | decode_RD4b RD | addu RD, RD, TMP3 | sw RC, -8+LO(RA) // Update control var. | addu PC, PC, RD | sdc1 f2, 0(RA) |3: | ins_next | |5: // Traverse hash part. | lw TMP1, TAB:RB->hmask | subu RC, RC, TMP0 | lw TMP2, TAB:RB->node |6: | sltu AT, TMP1, RC // End of iteration? Branch to ITERL+1. | bnez AT, <3 |. sll TMP3, RC, 5 | sll RB, RC, 3 | subu TMP3, TMP3, RB | addu NODE:TMP3, TMP3, TMP2 | lw RB, HI(NODE:TMP3) | ldc1 f0, 0(NODE:TMP3) | lhu RD, -4+OFS_RD(PC) | beq RB, TISNIL, <6 // Skip holes in hash part. |. addiu RC, RC, 1 | ldc1 f2, NODE:TMP3->key | lui TMP3, (-(BCBIAS_J*4 >> 16) & 65535) | sdc1 f0, 8(RA) | addu RC, RC, TMP0 | decode_RD4b RD | addu RD, RD, TMP3 | sdc1 f2, 0(RA) | addu PC, PC, RD | b <3 |. sw RC, -8+LO(RA) // Update control var. break; case BC_ISNEXT: | // RA = base*8, RD = target (points to ITERN) | addu RA, BASE, RA | lw TMP0, -24+HI(RA) | lw CFUNC:TMP1, -24+LO(RA) | lw TMP2, -16+HI(RA) | lw TMP3, -8+HI(RA) | li AT, LJ_TFUNC | bne TMP0, AT, >5 |. addiu TMP2, TMP2, -LJ_TTAB | lbu TMP1, CFUNC:TMP1->ffid | addiu TMP3, TMP3, -LJ_TNIL | srl TMP0, RD, 1 | or TMP2, TMP2, TMP3 | addiu TMP1, TMP1, -FF_next_N | addu TMP0, PC, TMP0 | or TMP1, TMP1, TMP2 | bnez TMP1, >5 |. lui TMP2, (-(BCBIAS_J*4 >> 16) & 65535) | addu PC, TMP0, TMP2 | lui TMP1, 0xfffe | ori TMP1, TMP1, 0x7fff | sw r0, -8+LO(RA) // Initialize control var. | sw TMP1, -8+HI(RA) |1: | ins_next |5: // Despecialize bytecode if any of the checks fail. | li TMP3, BC_JMP | li TMP1, BC_ITERC | sb TMP3, -4+OFS_OP(PC) | addu PC, TMP0, TMP2 | b <1 |. sb TMP1, OFS_OP(PC) break; case BC_VARG: | // RA = base*8, RB = (nresults+1)*8, RC = numparams*8 | lw TMP0, FRAME_PC(BASE) | decode_RDtoRC8 RC, RD | decode_RB8a RB, INS | addu RC, BASE, RC | decode_RB8b RB | addu RA, BASE, RA | addiu RC, RC, FRAME_VARG | addu TMP2, RA, RB | addiu TMP3, BASE, -8 // TMP3 = vtop | subu RC, RC, TMP0 // RC = vbase | // Note: RC may now be even _above_ BASE if nargs was < numparams. | beqz RB, >5 // Copy all varargs? |. subu TMP1, TMP3, RC | addiu TMP2, TMP2, -16 |1: // Copy vararg slots to destination slots. | lw CARG1, HI(RC) | sltu AT, RC, TMP3 | lw CARG2, LO(RC) | addiu RC, RC, 8 | movz CARG1, TISNIL, AT | sw CARG1, HI(RA) | sw CARG2, LO(RA) | sltu AT, RA, TMP2 | bnez AT, <1 |. addiu RA, RA, 8 |3: | ins_next | |5: // Copy all varargs. | lw TMP0, L->maxstack | blez TMP1, <3 // No vararg slots? |. li MULTRES, 8 // MULTRES = (0+1)*8 | addu TMP2, RA, TMP1 | sltu AT, TMP0, TMP2 | bnez AT, >7 |. addiu MULTRES, TMP1, 8 |6: | ldc1 f0, 0(RC) | addiu RC, RC, 8 | sdc1 f0, 0(RA) | sltu AT, RC, TMP3 | bnez AT, <6 // More vararg slots? |. addiu RA, RA, 8 | b <3 |. nop | |7: // Grow stack for varargs. | load_got lj_state_growstack | sw RA, L->top | subu RA, RA, BASE | sw BASE, L->base | subu BASE, RC, BASE // Need delta, because BASE may change. | sw PC, SAVE_PC | srl CARG2, TMP1, 3 | call_intern lj_state_growstack // (lua_State *L, int n) |. move CARG1, L | move RC, BASE | lw BASE, L->base | addu RA, BASE, RA | addu RC, BASE, RC | b <6 |. addiu TMP3, BASE, -8 break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: | // RA = results*8, RD = extra_nresults*8 | addu RD, RD, MULTRES // MULTRES >= 8, so RD >= 8. | // Fall through. Assumes BC_RET follows. break; case BC_RET: | // RA = results*8, RD = (nresults+1)*8 | lw PC, FRAME_PC(BASE) | addu RA, BASE, RA | move MULTRES, RD |1: | andi TMP0, PC, FRAME_TYPE | bnez TMP0, ->BC_RETV_Z |. xori TMP1, PC, FRAME_VARG | |->BC_RET_Z: | // BASE = base, RA = resultptr, RD = (nresults+1)*8, PC = return | lw INS, -4(PC) | addiu TMP2, BASE, -8 | addiu RC, RD, -8 | decode_RA8a TMP0, INS | decode_RB8a RB, INS | decode_RA8b TMP0 | decode_RB8b RB | addu TMP3, TMP2, RB | beqz RC, >3 |. subu BASE, TMP2, TMP0 |2: | ldc1 f0, 0(RA) | addiu RA, RA, 8 | addiu RC, RC, -8 | sdc1 f0, 0(TMP2) | bnez RC, <2 |. addiu TMP2, TMP2, 8 |3: | addiu TMP3, TMP3, -8 |5: | sltu AT, TMP2, TMP3 | bnez AT, >6 |. lw LFUNC:TMP1, FRAME_FUNC(BASE) | ins_next1 | lw TMP1, LFUNC:TMP1->pc | lw KBASE, PC2PROTO(k)(TMP1) | ins_next2 | |6: // Fill up results with nil. | sw TISNIL, HI(TMP2) | b <5 |. addiu TMP2, TMP2, 8 | |->BC_RETV_Z: // Non-standard return case. | andi TMP2, TMP1, FRAME_TYPEP | bnez TMP2, ->vm_return |. nop | // Return from vararg function: relocate BASE down. | subu BASE, BASE, TMP1 | b <1 |. lw PC, FRAME_PC(BASE) break; case BC_RET0: case BC_RET1: | // RA = results*8, RD = (nresults+1)*8 | lw PC, FRAME_PC(BASE) | addu RA, BASE, RA | move MULTRES, RD | andi TMP0, PC, FRAME_TYPE | bnez TMP0, ->BC_RETV_Z |. xori TMP1, PC, FRAME_VARG | | lw INS, -4(PC) | addiu TMP2, BASE, -8 if (op == BC_RET1) { | ldc1 f0, 0(RA) } | decode_RB8a RB, INS | decode_RA8a RA, INS | decode_RB8b RB | decode_RA8b RA if (op == BC_RET1) { | sdc1 f0, 0(TMP2) } | subu BASE, TMP2, RA |5: | sltu AT, RD, RB | bnez AT, >6 |. lw LFUNC:TMP1, FRAME_FUNC(BASE) | ins_next1 | lw TMP1, LFUNC:TMP1->pc | lw KBASE, PC2PROTO(k)(TMP1) | ins_next2 | |6: // Fill up results with nil. | addiu TMP2, TMP2, 8 | addiu RD, RD, 8 | b <5 if (op == BC_RET1) { |. sw TISNIL, HI(TMP2) } else { |. sw TISNIL, -8+HI(TMP2) } break; /* -- Loops and branches ------------------------------------------------ */ case BC_FORL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IFORL follows. break; case BC_JFORI: case BC_JFORL: #if !LJ_HASJIT break; #endif case BC_FORI: case BC_IFORL: | // RA = base*8, RD = target (after end of loop or start of loop) vk = (op == BC_IFORL || op == BC_JFORL); | addu RA, BASE, RA if (vk) { | ldc1 f0, FORL_IDX*8(RA) | ldc1 f4, FORL_STEP*8(RA) | ldc1 f2, FORL_STOP*8(RA) | lw TMP3, FORL_STEP*8+HI(RA) | add.d f0, f0, f4 | sdc1 f0, FORL_IDX*8(RA) } else { | lw TMP1, FORL_IDX*8+HI(RA) | lw TMP3, FORL_STEP*8+HI(RA) | lw TMP2, FORL_STOP*8+HI(RA) | sltiu TMP1, TMP1, LJ_TISNUM | sltiu TMP0, TMP3, LJ_TISNUM | sltiu TMP2, TMP2, LJ_TISNUM | and TMP1, TMP1, TMP0 | and TMP1, TMP1, TMP2 | ldc1 f0, FORL_IDX*8(RA) | beqz TMP1, ->vmeta_for |. ldc1 f2, FORL_STOP*8(RA) } if (op != BC_JFORL) { | srl RD, RD, 1 | lui TMP0, (-(BCBIAS_J*4 >> 16) & 65535) } | c.le.d 0, f0, f2 | c.le.d 1, f2, f0 | sdc1 f0, FORL_EXT*8(RA) if (op == BC_JFORI) { | li TMP1, 1 | li TMP2, 1 | addu TMP0, RD, TMP0 | slt TMP3, TMP3, r0 | movf TMP1, r0, 0 | addu PC, PC, TMP0 | movf TMP2, r0, 1 | lhu RD, -4+OFS_RD(PC) | movn TMP1, TMP2, TMP3 | bnez TMP1, =>BC_JLOOP |. decode_RD8b RD } else if (op == BC_JFORL) { | li TMP1, 1 | li TMP2, 1 | slt TMP3, TMP3, r0 | movf TMP1, r0, 0 | movf TMP2, r0, 1 | movn TMP1, TMP2, TMP3 | bnez TMP1, =>BC_JLOOP |. nop } else { | addu TMP1, RD, TMP0 | slt TMP3, TMP3, r0 | move TMP2, TMP1 if (op == BC_FORI) { | movt TMP1, r0, 0 | movt TMP2, r0, 1 } else { | movf TMP1, r0, 0 | movf TMP2, r0, 1 } | movn TMP1, TMP2, TMP3 | addu PC, PC, TMP1 } | ins_next break; case BC_ITERL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IITERL follows. break; case BC_JITERL: #if !LJ_HASJIT break; #endif case BC_IITERL: | // RA = base*8, RD = target | addu RA, BASE, RA | lw TMP1, HI(RA) | beq TMP1, TISNIL, >1 // Stop if iterator returned nil. |. lw TMP2, LO(RA) if (op == BC_JITERL) { | sw TMP1, -8+HI(RA) | b =>BC_JLOOP |. sw TMP2, -8+LO(RA) } else { | branch_RD // Otherwise save control var + branch. | sw TMP1, -8+HI(RA) | sw TMP2, -8+LO(RA) } |1: | ins_next break; case BC_LOOP: | // RA = base*8, RD = target (loop extent) | // Note: RA/RD is only used by trace recorder to determine scope/extent | // This opcode does NOT jump, it's only purpose is to detect a hot loop. |.if JIT | hotloop |.endif | // Fall through. Assumes BC_ILOOP follows. break; case BC_ILOOP: | // RA = base*8, RD = target (loop extent) | ins_next break; case BC_JLOOP: |.if JIT | // RA = base*8 (ignored), RD = traceno*8 | lw TMP1, DISPATCH_J(trace)(DISPATCH) | srl RD, RD, 1 | li AT, 0 | addu TMP1, TMP1, RD | // Traces on MIPS don't store the trace number, so use 0. | sw AT, DISPATCH_GL(vmstate)(DISPATCH) | lw TRACE:TMP2, 0(TMP1) | sw BASE, DISPATCH_GL(jit_base)(DISPATCH) | sw L, DISPATCH_GL(jit_L)(DISPATCH) | lw TMP2, TRACE:TMP2->mcode | jr TMP2 |. addiu JGL, DISPATCH, GG_DISP2G+32768 |.endif break; case BC_JMP: | // RA = base*8 (only used by trace recorder), RD = target | branch_RD | ins_next break; /* -- Function headers -------------------------------------------------- */ case BC_FUNCF: |.if JIT | hotcall |.endif case BC_FUNCV: /* NYI: compiled vararg functions. */ | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow. break; case BC_JFUNCF: #if !LJ_HASJIT break; #endif case BC_IFUNCF: | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 | lw TMP2, L->maxstack | lbu TMP1, -4+PC2PROTO(numparams)(PC) | lw KBASE, -4+PC2PROTO(k)(PC) | sltu AT, TMP2, RA | bnez AT, ->vm_growstack_l |. sll TMP1, TMP1, 3 if (op != BC_JFUNCF) { | ins_next1 } |2: | sltu AT, NARGS8:RC, TMP1 // Check for missing parameters. | bnez AT, >3 |. addu AT, BASE, NARGS8:RC if (op == BC_JFUNCF) { | decode_RD8a RD, INS | b =>BC_JLOOP |. decode_RD8b RD } else { | ins_next2 } | |3: // Clear missing parameters. | sw TISNIL, HI(AT) | b <2 |. addiu NARGS8:RC, NARGS8:RC, 8 break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif | NYI // NYI: compiled vararg functions break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 | addu TMP1, BASE, RC | lw TMP2, L->maxstack | addu TMP0, RA, RC | sw LFUNC:RB, LO(TMP1) // Store copy of LFUNC. | addiu TMP3, RC, 8+FRAME_VARG | sltu AT, TMP0, TMP2 | lw KBASE, -4+PC2PROTO(k)(PC) | beqz AT, ->vm_growstack_l |. sw TMP3, HI(TMP1) // Store delta + FRAME_VARG. | lbu TMP2, -4+PC2PROTO(numparams)(PC) | move RA, BASE | move RC, TMP1 | ins_next1 | beqz TMP2, >3 |. addiu BASE, TMP1, 8 |1: | lw TMP0, HI(RA) | lw TMP3, LO(RA) | sltu AT, RA, RC // Less args than parameters? | move CARG1, TMP0 | movz TMP0, TISNIL, AT // Clear missing parameters. | movn CARG1, TISNIL, AT // Clear old fixarg slot (help the GC). | sw TMP3, 8+LO(TMP1) | addiu TMP2, TMP2, -1 | sw TMP0, 8+HI(TMP1) | addiu TMP1, TMP1, 8 | sw CARG1, HI(RA) | bnez TMP2, <1 |. addiu RA, RA, 8 |3: | ins_next2 break; case BC_FUNCC: case BC_FUNCCW: | // BASE = new base, RA = BASE+framesize*8, RB = CFUNC, RC = nargs*8 if (op == BC_FUNCC) { | lw CFUNCADDR, CFUNC:RB->f } else { | lw CFUNCADDR, DISPATCH_GL(wrapf)(DISPATCH) } | addu TMP1, RA, NARGS8:RC | lw TMP2, L->maxstack | addu RC, BASE, NARGS8:RC | sw BASE, L->base | sltu AT, TMP2, TMP1 | sw RC, L->top | li_vmstate C if (op == BC_FUNCCW) { | lw CARG2, CFUNC:RB->f } | bnez AT, ->vm_growstack_c // Need to grow stack. |. move CARG1, L | jalr CFUNCADDR // (lua_State *L [, lua_CFunction f]) |. st_vmstate | // Returns nresults. | lw BASE, L->base | sll RD, CRET1, 3 | lw TMP1, L->top | li_vmstate INTERP | lw PC, FRAME_PC(BASE) // Fetch PC of caller. | subu RA, TMP1, RD // RA = L->top - nresults*8 | b ->vm_returnc |. st_vmstate break; /* ---------------------------------------------------------------------- */ default: fprintf(stderr, "Error: undefined opcode BC_%s\n", bc_names[op]); exit(2); break; } } static int build_backend(BuildCtx *ctx) { int op; dasm_growpc(Dst, BC__MAX); build_subroutines(ctx); |.code_op for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op); return BC__MAX; } /* Emit pseudo frame-info for all assembler functions. */ static void emit_asm_debug(BuildCtx *ctx) { int fcofs = (int)((uint8_t *)ctx->glob[GLOB_vm_ffi_call] - ctx->code); int i; switch (ctx->mode) { case BUILD_elfasm: fprintf(ctx->fp, "\t.section .debug_frame,\"\",@progbits\n"); fprintf(ctx->fp, ".Lframe0:\n" "\t.4byte .LECIE0-.LSCIE0\n" ".LSCIE0:\n" "\t.4byte 0xffffffff\n" "\t.byte 0x1\n" "\t.string \"\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 31\n" "\t.byte 0xc\n\t.uleb128 29\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE0:\n\n"); fprintf(ctx->fp, ".LSFDE0:\n" "\t.4byte .LEFDE0-.LASFDE0\n" ".LASFDE0:\n" "\t.4byte .Lframe0\n" "\t.4byte .Lbegin\n" "\t.4byte %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" "\t.byte 0x9f\n\t.sleb128 1\n" "\t.byte 0x9e\n\t.sleb128 2\n", fcofs, CFRAME_SIZE); for (i = 23; i >= 16; i--) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+i, 26-i); for (i = 30; i >= 20; i -= 2) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+32+i, 42-i); fprintf(ctx->fp, "\t.align 2\n" ".LEFDE0:\n\n"); #if LJ_HASFFI fprintf(ctx->fp, ".LSFDE1:\n" "\t.4byte .LEFDE1-.LASFDE1\n" ".LASFDE1:\n" "\t.4byte .Lframe0\n" "\t.4byte lj_vm_ffi_call\n" "\t.4byte %d\n" "\t.byte 0x9f\n\t.uleb128 1\n" "\t.byte 0x90\n\t.uleb128 2\n" "\t.byte 0xd\n\t.uleb128 0x10\n" "\t.align 2\n" ".LEFDE1:\n\n", (int)ctx->codesz - fcofs); #endif fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n"); fprintf(ctx->fp, "\t.globl lj_err_unwind_dwarf\n" ".Lframe1:\n" "\t.4byte .LECIE1-.LSCIE1\n" ".LSCIE1:\n" "\t.4byte 0\n" "\t.byte 0x1\n" "\t.string \"zPR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 31\n" "\t.uleb128 6\n" /* augmentation length */ "\t.byte 0\n" "\t.4byte lj_err_unwind_dwarf\n" "\t.byte 0\n" "\t.byte 0xc\n\t.uleb128 29\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE1:\n\n"); fprintf(ctx->fp, ".LSFDE2:\n" "\t.4byte .LEFDE2-.LASFDE2\n" ".LASFDE2:\n" "\t.4byte .LASFDE2-.Lframe1\n" "\t.4byte .Lbegin\n" "\t.4byte %d\n" "\t.uleb128 0\n" /* augmentation length */ "\t.byte 0xe\n\t.uleb128 %d\n" "\t.byte 0x9f\n\t.sleb128 1\n" "\t.byte 0x9e\n\t.sleb128 2\n", fcofs, CFRAME_SIZE); for (i = 23; i >= 16; i--) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+i, 26-i); for (i = 30; i >= 20; i -= 2) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+32+i, 42-i); fprintf(ctx->fp, "\t.align 2\n" ".LEFDE2:\n\n"); #if LJ_HASFFI fprintf(ctx->fp, ".Lframe2:\n" "\t.4byte .LECIE2-.LSCIE2\n" ".LSCIE2:\n" "\t.4byte 0\n" "\t.byte 0x1\n" "\t.string \"zR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 31\n" "\t.uleb128 1\n" /* augmentation length */ "\t.byte 0\n" "\t.byte 0xc\n\t.uleb128 29\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE2:\n\n"); fprintf(ctx->fp, ".LSFDE3:\n" "\t.4byte .LEFDE3-.LASFDE3\n" ".LASFDE3:\n" "\t.4byte .LASFDE3-.Lframe2\n" "\t.4byte lj_vm_ffi_call\n" "\t.4byte %d\n" "\t.uleb128 0\n" /* augmentation length */ "\t.byte 0x9f\n\t.uleb128 1\n" "\t.byte 0x90\n\t.uleb128 2\n" "\t.byte 0xd\n\t.uleb128 0x10\n" "\t.align 2\n" ".LEFDE3:\n\n", (int)ctx->codesz - fcofs); #endif break; default: break; } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_load.o0000664000000000000000000001550012213333053022150 0ustar rootrootELF>@ @@ UHHFHtHHFH]UHH]LeLmH IIH>u+I\$I $ HIEHHDHH]LeLmUHAUATSHHIHG0@HAI|$pHtxbHuckHHSHJHKBxuPC@(tHEt LLS,HHHSHJHKBxuPC@(tH[A\A]]UHATSHHHuHUHɸHDHMLEHEEHPAHPHSB$9B rHDHĠ[A\]UHA]UHH]LeLmLuH0 HIIHLHHu/8HLH߸AbLH߸IMHHHAH?HHIйHAHunHCHPHSHPHPH Jv;@H9uPC@(tHoHk8HH߸Atop > L->base!((((o)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o)->it) == (((GCobj *)(uintptr_t)((o)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))!((((o1)->it) - ((~4u)+1)) > ((~13u) - ((~4u)+1))) || ((~((o1)->it) == (((GCobj *)(uintptr_t)((o1)->gcr).gcptr32))->gch.gct) && !(((((GCobj *)(uintptr_t)((o1)->gcr).gcptr32)))->gch.marked & ((((global_State *)(void *)(uintptr_t)(L->glref).ptr32))->gc.currentwhite ^ (0x01 | 0x02)) & (0x01 | 0x02)))setgcVcopyTVlua_dumpGCC: (Debian 4.7.3-4) 4.7.3zRx $AC _ $<gAC PR $d)AC I  AC Jw AC L $AC W AC K  AC [ 8AC L X,AC g  xZAC U .symtab.strtab.shstrtab.rela.text.data.bss.rodata.str1.1.rodata.str1.8.rodata.comment.note.GNU-stack.rela.eh_frame @8 &@,@12@Z@2SOW0 `'u(p8  h h $$g%).G`   y%~:#K2:KTdkqx7G gx,Zlj_load.creader_stringreader_filecpparser__PRETTY_FUNCTION__.3969__PRETTY_FUNCTION__.4018__PRETTY_FUNCTION__.4915.LC6feoffreadlj_lex_setupstrchrlj_err_str__assert_faillj_err_throwlj_bcreadlj_parselj_func_newL_emptylua_loadxlj_vm_cpcalllj_lex_cleanuplj_gc_steplua_loadluaL_loadfilexfopen64__errno_locationstrerrorlua_pushfstringferrorstdinfcloseluaL_loadfileluaL_loadbufferxluaL_loadbufferluaL_loadstringlua_dumplj_bcwriteBf    %2?IW      'Ey  "#$ % !% $&' %) $.=&   ((#$  ,%#$ , %(A!\ ar*+  ? I. @$h:K7G<g\x|tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/lj_ctype.c0000664000000000000000000004332712202141143022344 0ustar rootroot/* ** C type management. ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h */ #include "lj_obj.h" #if LJ_HASFFI #include "lj_gc.h" #include "lj_err.h" #include "lj_str.h" #include "lj_tab.h" #include "lj_ctype.h" #include "lj_ccallback.h" /* -- C type definitions -------------------------------------------------- */ /* Predefined typedefs. */ #define CTTDDEF(_) \ /* Vararg handling. */ \ _("va_list", P_VOID) \ _("__builtin_va_list", P_VOID) \ _("__gnuc_va_list", P_VOID) \ /* From stddef.h. */ \ _("ptrdiff_t", INT_PSZ) \ _("size_t", UINT_PSZ) \ _("wchar_t", WCHAR) \ /* Subset of stdint.h. */ \ _("int8_t", INT8) \ _("int16_t", INT16) \ _("int32_t", INT32) \ _("int64_t", INT64) \ _("uint8_t", UINT8) \ _("uint16_t", UINT16) \ _("uint32_t", UINT32) \ _("uint64_t", UINT64) \ _("intptr_t", INT_PSZ) \ _("uintptr_t", UINT_PSZ) \ /* End of typedef list. */ /* Keywords (only the ones we actually care for). */ #define CTKWDEF(_) \ /* Type specifiers. */ \ _("void", -1, CTOK_VOID) \ _("_Bool", 0, CTOK_BOOL) \ _("bool", 1, CTOK_BOOL) \ _("char", 1, CTOK_CHAR) \ _("int", 4, CTOK_INT) \ _("__int8", 1, CTOK_INT) \ _("__int16", 2, CTOK_INT) \ _("__int32", 4, CTOK_INT) \ _("__int64", 8, CTOK_INT) \ _("float", 4, CTOK_FP) \ _("double", 8, CTOK_FP) \ _("long", 0, CTOK_LONG) \ _("short", 0, CTOK_SHORT) \ _("_Complex", 0, CTOK_COMPLEX) \ _("complex", 0, CTOK_COMPLEX) \ _("__complex", 0, CTOK_COMPLEX) \ _("__complex__", 0, CTOK_COMPLEX) \ _("signed", 0, CTOK_SIGNED) \ _("__signed", 0, CTOK_SIGNED) \ _("__signed__", 0, CTOK_SIGNED) \ _("unsigned", 0, CTOK_UNSIGNED) \ /* Type qualifiers. */ \ _("const", 0, CTOK_CONST) \ _("__const", 0, CTOK_CONST) \ _("__const__", 0, CTOK_CONST) \ _("volatile", 0, CTOK_VOLATILE) \ _("__volatile", 0, CTOK_VOLATILE) \ _("__volatile__", 0, CTOK_VOLATILE) \ _("restrict", 0, CTOK_RESTRICT) \ _("__restrict", 0, CTOK_RESTRICT) \ _("__restrict__", 0, CTOK_RESTRICT) \ _("inline", 0, CTOK_INLINE) \ _("__inline", 0, CTOK_INLINE) \ _("__inline__", 0, CTOK_INLINE) \ /* Storage class specifiers. */ \ _("typedef", 0, CTOK_TYPEDEF) \ _("extern", 0, CTOK_EXTERN) \ _("static", 0, CTOK_STATIC) \ _("auto", 0, CTOK_AUTO) \ _("register", 0, CTOK_REGISTER) \ /* GCC Attributes. */ \ _("__extension__", 0, CTOK_EXTENSION) \ _("__attribute", 0, CTOK_ATTRIBUTE) \ _("__attribute__", 0, CTOK_ATTRIBUTE) \ _("asm", 0, CTOK_ASM) \ _("__asm", 0, CTOK_ASM) \ _("__asm__", 0, CTOK_ASM) \ /* MSVC Attributes. */ \ _("__declspec", 0, CTOK_DECLSPEC) \ _("__cdecl", CTCC_CDECL, CTOK_CCDECL) \ _("__thiscall", CTCC_THISCALL, CTOK_CCDECL) \ _("__fastcall", CTCC_FASTCALL, CTOK_CCDECL) \ _("__stdcall", CTCC_STDCALL, CTOK_CCDECL) \ _("__ptr32", 4, CTOK_PTRSZ) \ _("__ptr64", 8, CTOK_PTRSZ) \ /* Other type specifiers. */ \ _("struct", 0, CTOK_STRUCT) \ _("union", 0, CTOK_UNION) \ _("enum", 0, CTOK_ENUM) \ /* Operators. */ \ _("sizeof", 0, CTOK_SIZEOF) \ _("__alignof", 0, CTOK_ALIGNOF) \ _("__alignof__", 0, CTOK_ALIGNOF) \ /* End of keyword list. */ /* Type info for predefined types. Size merged in. */ static CTInfo lj_ctype_typeinfo[] = { #define CTTYINFODEF(id, sz, ct, info) CTINFO((ct),(((sz)&0x3fu)<<10)+(info)), #define CTTDINFODEF(name, id) CTINFO(CT_TYPEDEF, CTID_##id), #define CTKWINFODEF(name, sz, kw) CTINFO(CT_KW,(((sz)&0x3fu)<<10)+(kw)), CTTYDEF(CTTYINFODEF) CTTDDEF(CTTDINFODEF) CTKWDEF(CTKWINFODEF) #undef CTTYINFODEF #undef CTTDINFODEF #undef CTKWINFODEF 0 }; /* Predefined type names collected in a single string. */ static const char * const lj_ctype_typenames = #define CTTDNAMEDEF(name, id) name "\0" #define CTKWNAMEDEF(name, sz, cds) name "\0" CTTDDEF(CTTDNAMEDEF) CTKWDEF(CTKWNAMEDEF) #undef CTTDNAMEDEF #undef CTKWNAMEDEF ; #define CTTYPEINFO_NUM (sizeof(lj_ctype_typeinfo)/sizeof(CTInfo)-1) #ifdef LUAJIT_CTYPE_CHECK_ANCHOR #define CTTYPETAB_MIN CTTYPEINFO_NUM #else #define CTTYPETAB_MIN 128 #endif /* -- C type interning ---------------------------------------------------- */ #define ct_hashtype(info, size) (hashrot(info, size) & CTHASH_MASK) #define ct_hashname(name) \ (hashrot(u32ptr(name), u32ptr(name) + HASH_BIAS) & CTHASH_MASK) /* Create new type element. */ CTypeID lj_ctype_new(CTState *cts, CType **ctp) { CTypeID id = cts->top; CType *ct; lua_assert(cts->L); if (LJ_UNLIKELY(id >= cts->sizetab)) { if (id >= CTID_MAX) lj_err_msg(cts->L, LJ_ERR_TABOV); #ifdef LUAJIT_CTYPE_CHECK_ANCHOR ct = lj_mem_newvec(cts->L, id+1, CType); memcpy(ct, cts->tab, id*sizeof(CType)); memset(cts->tab, 0, id*sizeof(CType)); lj_mem_freevec(cts->g, cts->tab, cts->sizetab, CType); cts->tab = ct; cts->sizetab = id+1; #else lj_mem_growvec(cts->L, cts->tab, cts->sizetab, CTID_MAX, CType); #endif } cts->top = id+1; *ctp = ct = &cts->tab[id]; ct->info = 0; ct->size = 0; ct->sib = 0; ct->next = 0; setgcrefnull(ct->name); return id; } /* Intern a type element. */ CTypeID lj_ctype_intern(CTState *cts, CTInfo info, CTSize size) { uint32_t h = ct_hashtype(info, size); CTypeID id = cts->hash[h]; lua_assert(cts->L); while (id) { CType *ct = ctype_get(cts, id); if (ct->info == info && ct->size == size) return id; id = ct->next; } id = cts->top; if (LJ_UNLIKELY(id >= cts->sizetab)) { if (id >= CTID_MAX) lj_err_msg(cts->L, LJ_ERR_TABOV); lj_mem_growvec(cts->L, cts->tab, cts->sizetab, CTID_MAX, CType); } cts->top = id+1; cts->tab[id].info = info; cts->tab[id].size = size; cts->tab[id].sib = 0; cts->tab[id].next = cts->hash[h]; setgcrefnull(cts->tab[id].name); cts->hash[h] = (CTypeID1)id; return id; } /* Add type element to hash table. */ static void ctype_addtype(CTState *cts, CType *ct, CTypeID id) { uint32_t h = ct_hashtype(ct->info, ct->size); ct->next = cts->hash[h]; cts->hash[h] = (CTypeID1)id; } /* Add named element to hash table. */ void lj_ctype_addname(CTState *cts, CType *ct, CTypeID id) { uint32_t h = ct_hashname(gcref(ct->name)); ct->next = cts->hash[h]; cts->hash[h] = (CTypeID1)id; } /* Get a C type by name, matching the type mask. */ CTypeID lj_ctype_getname(CTState *cts, CType **ctp, GCstr *name, uint32_t tmask) { CTypeID id = cts->hash[ct_hashname(name)]; while (id) { CType *ct = ctype_get(cts, id); if (gcref(ct->name) == obj2gco(name) && ((tmask >> ctype_type(ct->info)) & 1)) { *ctp = ct; return id; } id = ct->next; } *ctp = &cts->tab[0]; /* Simplify caller logic. ctype_get() would assert. */ return 0; } /* Get a struct/union/enum/function field by name. */ CType *lj_ctype_getfieldq(CTState *cts, CType *ct, GCstr *name, CTSize *ofs, CTInfo *qual) { while (ct->sib) { ct = ctype_get(cts, ct->sib); if (gcref(ct->name) == obj2gco(name)) { *ofs = ct->size; return ct; } if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) { CType *fct, *cct = ctype_child(cts, ct); CTInfo q = 0; while (ctype_isattrib(cct->info)) { if (ctype_attrib(cct->info) == CTA_QUAL) q |= cct->size; cct = ctype_child(cts, cct); } fct = lj_ctype_getfieldq(cts, cct, name, ofs, qual); if (fct) { if (qual) *qual |= q; *ofs += ct->size; return fct; } } } return NULL; /* Not found. */ } /* -- C type information -------------------------------------------------- */ /* Follow references and get raw type for a C type ID. */ CType *lj_ctype_rawref(CTState *cts, CTypeID id) { CType *ct = ctype_get(cts, id); while (ctype_isattrib(ct->info) || ctype_isref(ct->info)) ct = ctype_child(cts, ct); return ct; } /* Get size for a C type ID. Does NOT support VLA/VLS. */ CTSize lj_ctype_size(CTState *cts, CTypeID id) { CType *ct = ctype_raw(cts, id); return ctype_hassize(ct->info) ? ct->size : CTSIZE_INVALID; } /* Get size for a variable-length C type. Does NOT support other C types. */ CTSize lj_ctype_vlsize(CTState *cts, CType *ct, CTSize nelem) { uint64_t xsz = 0; if (ctype_isstruct(ct->info)) { CTypeID arrid = 0, fid = ct->sib; xsz = ct->size; /* Add the struct size. */ while (fid) { CType *ctf = ctype_get(cts, fid); if (ctype_type(ctf->info) == CT_FIELD) arrid = ctype_cid(ctf->info); /* Remember last field of VLS. */ fid = ctf->sib; } ct = ctype_raw(cts, arrid); } lua_assert(ctype_isvlarray(ct->info)); /* Must be a VLA. */ ct = ctype_rawchild(cts, ct); /* Get array element. */ lua_assert(ctype_hassize(ct->info)); /* Calculate actual size of VLA and check for overflow. */ xsz += (uint64_t)ct->size * nelem; return xsz < 0x80000000u ? (CTSize)xsz : CTSIZE_INVALID; } /* Get type, qualifiers, size and alignment for a C type ID. */ CTInfo lj_ctype_info(CTState *cts, CTypeID id, CTSize *szp) { CTInfo qual = 0; CType *ct = ctype_get(cts, id); for (;;) { CTInfo info = ct->info; if (ctype_isenum(info)) { /* Follow child. Need to look at its attributes, too. */ } else if (ctype_isattrib(info)) { if (ctype_isxattrib(info, CTA_QUAL)) qual |= ct->size; else if (ctype_isxattrib(info, CTA_ALIGN) && !(qual & CTFP_ALIGNED)) qual |= CTFP_ALIGNED + CTALIGN(ct->size); } else { if (!(qual & CTFP_ALIGNED)) qual |= (info & CTF_ALIGN); qual |= (info & ~(CTF_ALIGN|CTMASK_CID)); lua_assert(ctype_hassize(info) || ctype_isfunc(info)); *szp = ctype_isfunc(info) ? CTSIZE_INVALID : ct->size; break; } ct = ctype_get(cts, ctype_cid(info)); } return qual; } /* Get ctype metamethod. */ cTValue *lj_ctype_meta(CTState *cts, CTypeID id, MMS mm) { CType *ct = ctype_get(cts, id); cTValue *tv; while (ctype_isattrib(ct->info) || ctype_isref(ct->info)) { id = ctype_cid(ct->info); ct = ctype_get(cts, id); } if (ctype_isptr(ct->info) && ctype_isfunc(ctype_get(cts, ctype_cid(ct->info))->info)) tv = lj_tab_getstr(cts->miscmap, &cts->g->strempty); else tv = lj_tab_getinth(cts->miscmap, -(int32_t)id); if (tv && tvistab(tv) && (tv = lj_tab_getstr(tabV(tv), mmname_str(cts->g, mm))) && !tvisnil(tv)) return tv; return NULL; } /* -- C type representation ----------------------------------------------- */ /* Fixed max. length of a C type representation. */ #define CTREPR_MAX 512 typedef struct CTRepr { char *pb, *pe; CTState *cts; lua_State *L; int needsp; int ok; char buf[CTREPR_MAX]; } CTRepr; /* Prepend string. */ static void ctype_prepstr(CTRepr *ctr, const char *str, MSize len) { char *p = ctr->pb; if (ctr->buf + len+1 > p) { ctr->ok = 0; return; } if (ctr->needsp) *--p = ' '; ctr->needsp = 1; p -= len; while (len-- > 0) p[len] = str[len]; ctr->pb = p; } #define ctype_preplit(ctr, str) ctype_prepstr((ctr), "" str, sizeof(str)-1) /* Prepend char. */ static void ctype_prepc(CTRepr *ctr, int c) { if (ctr->buf >= ctr->pb) { ctr->ok = 0; return; } *--ctr->pb = c; } /* Prepend number. */ static void ctype_prepnum(CTRepr *ctr, uint32_t n) { char *p = ctr->pb; if (ctr->buf + 10+1 > p) { ctr->ok = 0; return; } do { *--p = (char)('0' + n % 10); } while (n /= 10); ctr->pb = p; ctr->needsp = 0; } /* Append char. */ static void ctype_appc(CTRepr *ctr, int c) { if (ctr->pe >= ctr->buf + CTREPR_MAX) { ctr->ok = 0; return; } *ctr->pe++ = c; } /* Append number. */ static void ctype_appnum(CTRepr *ctr, uint32_t n) { char buf[10]; char *p = buf+sizeof(buf); char *q = ctr->pe; if (q > ctr->buf + CTREPR_MAX - 10) { ctr->ok = 0; return; } do { *--p = (char)('0' + n % 10); } while (n /= 10); do { *q++ = *p++; } while (p < buf+sizeof(buf)); ctr->pe = q; } /* Prepend qualifiers. */ static void ctype_prepqual(CTRepr *ctr, CTInfo info) { if ((info & CTF_VOLATILE)) ctype_preplit(ctr, "volatile"); if ((info & CTF_CONST)) ctype_preplit(ctr, "const"); } /* Prepend named type. */ static void ctype_preptype(CTRepr *ctr, CType *ct, CTInfo qual, const char *t) { if (gcref(ct->name)) { GCstr *str = gco2str(gcref(ct->name)); ctype_prepstr(ctr, strdata(str), str->len); } else { if (ctr->needsp) ctype_prepc(ctr, ' '); ctype_prepnum(ctr, ctype_typeid(ctr->cts, ct)); ctr->needsp = 1; } ctype_prepstr(ctr, t, (MSize)strlen(t)); ctype_prepqual(ctr, qual); } static void ctype_repr(CTRepr *ctr, CTypeID id) { CType *ct = ctype_get(ctr->cts, id); CTInfo qual = 0; int ptrto = 0; for (;;) { CTInfo info = ct->info; CTSize size = ct->size; switch (ctype_type(info)) { case CT_NUM: if ((info & CTF_BOOL)) { ctype_preplit(ctr, "bool"); } else if ((info & CTF_FP)) { if (size == sizeof(double)) ctype_preplit(ctr, "double"); else if (size == sizeof(float)) ctype_preplit(ctr, "float"); else ctype_preplit(ctr, "long double"); } else if (size == 1) { if (!((info ^ CTF_UCHAR) & CTF_UNSIGNED)) ctype_preplit(ctr, "char"); else if (CTF_UCHAR) ctype_preplit(ctr, "signed char"); else ctype_preplit(ctr, "unsigned char"); } else if (size < 8) { if (size == 4) ctype_preplit(ctr, "int"); else ctype_preplit(ctr, "short"); if ((info & CTF_UNSIGNED)) ctype_preplit(ctr, "unsigned"); } else { ctype_preplit(ctr, "_t"); ctype_prepnum(ctr, size*8); ctype_preplit(ctr, "int"); if ((info & CTF_UNSIGNED)) ctype_prepc(ctr, 'u'); } ctype_prepqual(ctr, (qual|info)); return; case CT_VOID: ctype_preplit(ctr, "void"); ctype_prepqual(ctr, (qual|info)); return; case CT_STRUCT: ctype_preptype(ctr, ct, qual, (info & CTF_UNION) ? "union" : "struct"); return; case CT_ENUM: if (id == CTID_CTYPEID) { ctype_preplit(ctr, "ctype"); return; } ctype_preptype(ctr, ct, qual, "enum"); return; case CT_ATTRIB: if (ctype_attrib(info) == CTA_QUAL) qual |= size; break; case CT_PTR: if ((info & CTF_REF)) { ctype_prepc(ctr, '&'); } else { ctype_prepqual(ctr, (qual|info)); if (LJ_64 && size == 4) ctype_preplit(ctr, "__ptr32"); ctype_prepc(ctr, '*'); } qual = 0; ptrto = 1; ctr->needsp = 1; break; case CT_ARRAY: if (ctype_isrefarray(info)) { ctr->needsp = 1; if (ptrto) { ptrto = 0; ctype_prepc(ctr, '('); ctype_appc(ctr, ')'); } ctype_appc(ctr, '['); if (size != CTSIZE_INVALID) { CTSize csize = ctype_child(ctr->cts, ct)->size; ctype_appnum(ctr, csize ? size/csize : 0); } else if ((info & CTF_VLA)) { ctype_appc(ctr, '?'); } ctype_appc(ctr, ']'); } else if ((info & CTF_COMPLEX)) { if (size == 2*sizeof(float)) ctype_preplit(ctr, "float"); ctype_preplit(ctr, "complex"); return; } else { ctype_preplit(ctr, ")))"); ctype_prepnum(ctr, size); ctype_preplit(ctr, "__attribute__((vector_size("); } break; case CT_FUNC: ctr->needsp = 1; if (ptrto) { ptrto = 0; ctype_prepc(ctr, '('); ctype_appc(ctr, ')'); } ctype_appc(ctr, '('); ctype_appc(ctr, ')'); break; default: lua_assert(0); break; } ct = ctype_get(ctr->cts, ctype_cid(info)); } } /* Return a printable representation of a C type. */ GCstr *lj_ctype_repr(lua_State *L, CTypeID id, GCstr *name) { global_State *g = G(L); CTRepr ctr; ctr.pb = ctr.pe = &ctr.buf[CTREPR_MAX/2]; ctr.cts = ctype_ctsG(g); ctr.L = L; ctr.ok = 1; ctr.needsp = 0; if (name) ctype_prepstr(&ctr, strdata(name), name->len); ctype_repr(&ctr, id); if (LJ_UNLIKELY(!ctr.ok)) return lj_str_newlit(L, "?"); return lj_str_new(L, ctr.pb, ctr.pe - ctr.pb); } /* Convert int64_t/uint64_t to string with 'LL' or 'ULL' suffix. */ GCstr *lj_ctype_repr_int64(lua_State *L, uint64_t n, int isunsigned) { char buf[1+20+3]; char *p = buf+sizeof(buf); int sign = 0; *--p = 'L'; *--p = 'L'; if (isunsigned) { *--p = 'U'; } else if ((int64_t)n < 0) { n = (uint64_t)-(int64_t)n; sign = 1; } do { *--p = (char)('0' + n % 10); } while (n /= 10); if (sign) *--p = '-'; return lj_str_new(L, p, (size_t)(buf+sizeof(buf)-p)); } /* Convert complex to string with 'i' or 'I' suffix. */ GCstr *lj_ctype_repr_complex(lua_State *L, void *sp, CTSize size) { char buf[2*LJ_STR_NUMBUF+2+1]; TValue re, im; size_t len; if (size == 2*sizeof(double)) { re.n = *(double *)sp; im.n = ((double *)sp)[1]; } else { re.n = (double)*(float *)sp; im.n = (double)((float *)sp)[1]; } len = lj_str_bufnum(buf, &re); if (!(im.u32.hi & 0x80000000u) || im.n != im.n) buf[len++] = '+'; len += lj_str_bufnum(buf+len, &im); buf[len] = buf[len-1] >= 'a' ? 'I' : 'i'; return lj_str_new(L, buf, len+1); } /* -- C type state -------------------------------------------------------- */ /* Initialize C type table and state. */ CTState *lj_ctype_init(lua_State *L) { CTState *cts = lj_mem_newt(L, sizeof(CTState), CTState); CType *ct = lj_mem_newvec(L, CTTYPETAB_MIN, CType); const char *name = lj_ctype_typenames; CTypeID id; memset(cts, 0, sizeof(CTState)); cts->tab = ct; cts->sizetab = CTTYPETAB_MIN; cts->top = CTTYPEINFO_NUM; cts->L = NULL; cts->g = G(L); for (id = 0; id < CTTYPEINFO_NUM; id++, ct++) { CTInfo info = lj_ctype_typeinfo[id]; ct->size = (CTSize)((int32_t)(info << 16) >> 26); ct->info = info & 0xffff03ffu; ct->sib = 0; if (ctype_type(info) == CT_KW || ctype_istypedef(info)) { size_t len = strlen(name); GCstr *str = lj_str_new(L, name, len); ctype_setname(ct, str); name += len+1; lj_ctype_addname(cts, ct, id); } else { setgcrefnull(ct->name); ct->next = 0; if (!ctype_isenum(info)) ctype_addtype(cts, ct, id); } } setmref(G(L)->ctype_state, cts); return cts; } /* Free C type table and state. */ void lj_ctype_freestate(global_State *g) { CTState *cts = ctype_ctsG(g); if (cts) { lj_ccallback_mcode_free(cts); lj_mem_freevec(g, cts->tab, cts->sizetab, CType); lj_mem_freevec(g, cts->cb.cbid, cts->cb.sizeid, CTypeID1); lj_mem_freet(g, cts); } } #endif tarantool-1.5.1.218.g1a69fd6/third_party/luajit/src/vm_ppcspe.dasc0000664000000000000000000031357312202141143023222 0ustar rootroot|// Low-level VM code for PowerPC/e500 CPUs. |// Bytecode interpreter, fast functions and helper functions. |// Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h | |.arch ppc |.section code_op, code_sub | |.actionlist build_actionlist |.globals GLOB_ |.globalnames globnames |.externnames extnames | |// Note: The ragged indentation of the instructions is intentional. |// The starting columns indicate data dependencies. | |//----------------------------------------------------------------------- | |// Fixed register assignments for the interpreter. |// Don't use: r1 = sp, r2 and r13 = reserved and/or small data area ptr | |// The following must be C callee-save (but BASE is often refetched). |.define BASE, r14 // Base of current Lua stack frame. |.define KBASE, r15 // Constants of current Lua function. |.define PC, r16 // Next PC. |.define DISPATCH, r17 // Opcode dispatch table. |.define LREG, r18 // Register holding lua_State (also in SAVE_L). |.define MULTRES, r19 // Size of multi-result: (nresults+1)*8. | |// Constants for vectorized type-comparisons (hi+low GPR). C callee-save. |.define TISNUM, r22 |.define TISSTR, r23 |.define TISTAB, r24 |.define TISFUNC, r25 |.define TISNIL, r26 |.define TOBIT, r27 |.define ZERO, TOBIT // Zero in lo word. | |// The following temporaries are not saved across C calls, except for RA. |.define RA, r20 // Callee-save. |.define RB, r10 |.define RC, r11 |.define RD, r12 |.define INS, r7 // Overlaps CARG5. | |.define TMP0, r0 |.define TMP1, r8 |.define TMP2, r9 |.define TMP3, r6 // Overlaps CARG4. | |// Saved temporaries. |.define SAVE0, r21 | |// Calling conventions. |.define CARG1, r3 |.define CARG2, r4 |.define CARG3, r5 |.define CARG4, r6 // Overlaps TMP3. |.define CARG5, r7 // Overlaps INS. | |.define CRET1, r3 |.define CRET2, r4 | |// Stack layout while in interpreter. Must match with lj_frame.h. |.define SAVE_LR, 188(sp) |.define CFRAME_SPACE, 184 // Delta for sp. |// Back chain for sp: 184(sp) <-- sp entering interpreter |.define SAVE_r31, 176(sp) // 64 bit register saves. |.define SAVE_r30, 168(sp) |.define SAVE_r29, 160(sp) |.define SAVE_r28, 152(sp) |.define SAVE_r27, 144(sp) |.define SAVE_r26, 136(sp) |.define SAVE_r25, 128(sp) |.define SAVE_r24, 120(sp) |.define SAVE_r23, 112(sp) |.define SAVE_r22, 104(sp) |.define SAVE_r21, 96(sp) |.define SAVE_r20, 88(sp) |.define SAVE_r19, 80(sp) |.define SAVE_r18, 72(sp) |.define SAVE_r17, 64(sp) |.define SAVE_r16, 56(sp) |.define SAVE_r15, 48(sp) |.define SAVE_r14, 40(sp) |.define SAVE_CR, 36(sp) |.define UNUSED1, 32(sp) |.define SAVE_ERRF, 28(sp) // 32 bit C frame info. |.define SAVE_NRES, 24(sp) |.define SAVE_CFRAME, 20(sp) |.define SAVE_L, 16(sp) |.define SAVE_PC, 12(sp) |.define SAVE_MULTRES, 8(sp) |// Next frame lr: 4(sp) |// Back chain for sp: 0(sp) <-- sp while in interpreter | |.macro save_, reg; evstdd reg, SAVE_..reg; .endmacro |.macro rest_, reg; evldd reg, SAVE_..reg; .endmacro | |.macro saveregs | stwu sp, -CFRAME_SPACE(sp) | save_ r14; save_ r15; save_ r16; save_ r17; save_ r18; save_ r19 | mflr r0; mfcr r12 | save_ r20; save_ r21; save_ r22; save_ r23; save_ r24; save_ r25 | stw r0, SAVE_LR; stw r12, SAVE_CR | save_ r26; save_ r27; save_ r28; save_ r29; save_ r30; save_ r31 |.endmacro | |.macro restoreregs | lwz r0, SAVE_LR; lwz r12, SAVE_CR | rest_ r14; rest_ r15; rest_ r16; rest_ r17; rest_ r18; rest_ r19 | mtlr r0; mtcrf 0x38, r12 | rest_ r20; rest_ r21; rest_ r22; rest_ r23; rest_ r24; rest_ r25 | rest_ r26; rest_ r27; rest_ r28; rest_ r29; rest_ r30; rest_ r31 | addi sp, sp, CFRAME_SPACE |.endmacro | |// Type definitions. Some of these are only used for documentation. |.type L, lua_State, LREG |.type GL, global_State |.type TVALUE, TValue |.type GCOBJ, GCobj |.type STR, GCstr |.type TAB, GCtab |.type LFUNC, GCfuncL |.type CFUNC, GCfuncC |.type PROTO, GCproto |.type UPVAL, GCupval |.type NODE, Node |.type NARGS8, int |.type TRACE, GCtrace | |//----------------------------------------------------------------------- | |// These basic macros should really be part of DynASM. |.macro srwi, rx, ry, n; rlwinm rx, ry, 32-n, n, 31; .endmacro |.macro slwi, rx, ry, n; rlwinm rx, ry, n, 0, 31-n; .endmacro |.macro rotlwi, rx, ry, n; rlwinm rx, ry, n, 0, 31; .endmacro |.macro rotlw, rx, ry, rn; rlwnm rx, ry, rn, 0, 31; .endmacro |.macro subi, rx, ry, i; addi rx, ry, -i; .endmacro | |// Trap for not-yet-implemented parts. |.macro NYI; tw 4, sp, sp; .endmacro | |//----------------------------------------------------------------------- | |// Access to frame relative to BASE. |.define FRAME_PC, -8 |.define FRAME_FUNC, -4 | |// Instruction decode. |.macro decode_OP4, dst, ins; rlwinm dst, ins, 2, 22, 29; .endmacro |.macro decode_RA8, dst, ins; rlwinm dst, ins, 27, 21, 28; .endmacro |.macro decode_RB8, dst, ins; rlwinm dst, ins, 11, 21, 28; .endmacro |.macro decode_RC8, dst, ins; rlwinm dst, ins, 19, 21, 28; .endmacro |.macro decode_RD8, dst, ins; rlwinm dst, ins, 19, 13, 28; .endmacro | |.macro decode_OP1, dst, ins; rlwinm dst, ins, 0, 24, 31; .endmacro |.macro decode_RD4, dst, ins; rlwinm dst, ins, 18, 14, 29; .endmacro | |// Instruction fetch. |.macro ins_NEXT1 | lwz INS, 0(PC) | addi PC, PC, 4 |.endmacro |// Instruction decode+dispatch. |.macro ins_NEXT2 | decode_OP4 TMP1, INS | decode_RB8 RB, INS | decode_RD8 RD, INS | lwzx TMP0, DISPATCH, TMP1 | decode_RA8 RA, INS | decode_RC8 RC, INS | mtctr TMP0 | bctr |.endmacro |.macro ins_NEXT | ins_NEXT1 | ins_NEXT2 |.endmacro | |// Instruction footer. |.if 1 | // Replicated dispatch. Less unpredictable branches, but higher I-Cache use. | .define ins_next, ins_NEXT | .define ins_next_, ins_NEXT | .define ins_next1, ins_NEXT1 | .define ins_next2, ins_NEXT2 |.else | // Common dispatch. Lower I-Cache use, only one (very) unpredictable branch. | // Affects only certain kinds of benchmarks (and only with -j off). | .macro ins_next | b ->ins_next | .endmacro | .macro ins_next1 | .endmacro | .macro ins_next2 | b ->ins_next | .endmacro | .macro ins_next_ | ->ins_next: | ins_NEXT | .endmacro |.endif | |// Call decode and dispatch. |.macro ins_callt | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | lwz PC, LFUNC:RB->pc | lwz INS, 0(PC) | addi PC, PC, 4 | decode_OP4 TMP1, INS | decode_RA8 RA, INS | lwzx TMP0, DISPATCH, TMP1 | add RA, RA, BASE | mtctr TMP0 | bctr |.endmacro | |.macro ins_call | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, PC = caller PC | stw PC, FRAME_PC(BASE) | ins_callt |.endmacro | |//----------------------------------------------------------------------- | |// Macros to test operand types. |.macro checknum, reg; evcmpltu reg, TISNUM; .endmacro |.macro checkstr, reg; evcmpeq reg, TISSTR; .endmacro |.macro checktab, reg; evcmpeq reg, TISTAB; .endmacro |.macro checkfunc, reg; evcmpeq reg, TISFUNC; .endmacro |.macro checknil, reg; evcmpeq reg, TISNIL; .endmacro |.macro checkok, label; blt label; .endmacro |.macro checkfail, label; bge label; .endmacro |.macro checkanyfail, label; bns label; .endmacro |.macro checkallok, label; bso label; .endmacro | |.macro branch_RD | srwi TMP0, RD, 1 | add PC, PC, TMP0 | addis PC, PC, -(BCBIAS_J*4 >> 16) |.endmacro | |// Assumes DISPATCH is relative to GL. #define DISPATCH_GL(field) (GG_DISP2G + (int)offsetof(global_State, field)) #define DISPATCH_J(field) (GG_DISP2J + (int)offsetof(jit_State, field)) | #define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) | |.macro hotloop | NYI |.endmacro | |.macro hotcall | NYI |.endmacro | |// Set current VM state. Uses TMP0. |.macro li_vmstate, st; li TMP0, ~LJ_VMST_..st; .endmacro |.macro st_vmstate; stw TMP0, DISPATCH_GL(vmstate)(DISPATCH); .endmacro | |// Move table write barrier back. Overwrites mark and tmp. |.macro barrierback, tab, mark, tmp | lwz tmp, DISPATCH_GL(gc.grayagain)(DISPATCH) | // Assumes LJ_GC_BLACK is 0x04. | rlwinm mark, mark, 0, 30, 28 // black2gray(tab) | stw tab, DISPATCH_GL(gc.grayagain)(DISPATCH) | stb mark, tab->marked | stw tmp, tab->gclist |.endmacro | |//----------------------------------------------------------------------- /* Generate subroutines used by opcodes and other parts of the VM. */ /* The .code_sub section should be last to help static branch prediction. */ static void build_subroutines(BuildCtx *ctx) { |.code_sub | |//----------------------------------------------------------------------- |//-- Return handling ---------------------------------------------------- |//----------------------------------------------------------------------- | |->vm_returnp: | // See vm_return. Also: TMP2 = previous base. | andi. TMP0, PC, FRAME_P | evsplati TMP1, LJ_TTRUE | beq ->cont_dispatch | | // Return from pcall or xpcall fast func. | lwz PC, FRAME_PC(TMP2) // Fetch PC of previous frame. | mr BASE, TMP2 // Restore caller base. | // Prepending may overwrite the pcall frame, so do it at the end. | stwu TMP1, FRAME_PC(RA) // Prepend true to results. | |->vm_returnc: | addi RD, RD, 8 // RD = (nresults+1)*8. | andi. TMP0, PC, FRAME_TYPE | cmpwi cr1, RD, 0 | li CRET1, LUA_YIELD | beq cr1, ->vm_unwind_c_eh | mr MULTRES, RD | beq ->BC_RET_Z // Handle regular return to Lua. | |->vm_return: | // BASE = base, RA = resultptr, RD/MULTRES = (nresults+1)*8, PC = return | // TMP0 = PC & FRAME_TYPE | cmpwi TMP0, FRAME_C | rlwinm TMP2, PC, 0, 0, 28 | li_vmstate C | sub TMP2, BASE, TMP2 // TMP2 = previous base. | bne ->vm_returnp | | addic. TMP1, RD, -8 | stw TMP2, L->base | lwz TMP2, SAVE_NRES | subi BASE, BASE, 8 | st_vmstate | slwi TMP2, TMP2, 3 | beq >2 |1: | addic. TMP1, TMP1, -8 | evldd TMP0, 0(RA) | addi RA, RA, 8 | evstdd TMP0, 0(BASE) | addi BASE, BASE, 8 | bne <1 | |2: | cmpw TMP2, RD // More/less results wanted? | bne >6 |3: | stw BASE, L->top // Store new top. | |->vm_leave_cp: | lwz TMP0, SAVE_CFRAME // Restore previous C frame. | li CRET1, 0 // Ok return status for vm_pcall. | stw TMP0, L->cframe | |->vm_leave_unw: | restoreregs | blr | |6: | ble >7 // Less results wanted? | // More results wanted. Check stack size and fill up results with nil. | lwz TMP1, L->maxstack | cmplw BASE, TMP1 | bge >8 | evstdd TISNIL, 0(BASE) | addi RD, RD, 8 | addi BASE, BASE, 8 | b <2 | |7: // Less results wanted. | sub TMP0, RD, TMP2 | cmpwi TMP2, 0 // LUA_MULTRET+1 case? | sub TMP0, BASE, TMP0 // Subtract the difference. | iseleq BASE, BASE, TMP0 // Either keep top or shrink it. | b <3 | |8: // Corner case: need to grow stack for filling up results. | // This can happen if: | // - A C function grows the stack (a lot). | // - The GC shrinks the stack in between. | // - A return back from a lua_call() with (high) nresults adjustment. | stw BASE, L->top // Save current top held in BASE (yes). | mr SAVE0, RD | mr CARG2, TMP2 | mr CARG1, L | bl extern lj_state_growstack // (lua_State *L, int n) | lwz TMP2, SAVE_NRES | mr RD, SAVE0 | slwi TMP2, TMP2, 3 | lwz BASE, L->top // Need the (realloced) L->top in BASE. | b <2 | |->vm_unwind_c: // Unwind C stack, return from vm_pcall. | // (void *cframe, int errcode) | mr sp, CARG1 | mr CRET1, CARG2 |->vm_unwind_c_eh: // Landing pad for external unwinder. | lwz L, SAVE_L | li TMP0, ~LJ_VMST_C | lwz GL:TMP1, L->glref | stw TMP0, GL:TMP1->vmstate | b ->vm_leave_unw | |->vm_unwind_ff: // Unwind C stack, return from ff pcall. | // (void *cframe) | rlwinm sp, CARG1, 0, 0, 29 |->vm_unwind_ff_eh: // Landing pad for external unwinder. | lwz L, SAVE_L | evsplati TISNUM, LJ_TISNUM+1 // Setup type comparison constants. | evsplati TISFUNC, LJ_TFUNC | lus TOBIT, 0x4338 | evsplati TISTAB, LJ_TTAB | li TMP0, 0 | lwz BASE, L->base | evmergelo TOBIT, TOBIT, TMP0 | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | evsplati TISSTR, LJ_TSTR | li TMP1, LJ_TFALSE | evsplati TISNIL, LJ_TNIL | li_vmstate INTERP | lwz PC, FRAME_PC(BASE) // Fetch PC of previous frame. | la RA, -8(BASE) // Results start at BASE-8. | addi DISPATCH, DISPATCH, GG_G2DISP | stw TMP1, 0(RA) // Prepend false to error message. | li RD, 16 // 2 results: false + error message. | st_vmstate | b ->vm_returnc | |//----------------------------------------------------------------------- |//-- Grow stack for calls ----------------------------------------------- |//----------------------------------------------------------------------- | |->vm_growstack_c: // Grow stack for C function. | li CARG2, LUA_MINSTACK | b >2 | |->vm_growstack_l: // Grow stack for Lua function. | // BASE = new base, RA = BASE+framesize*8, RC = nargs*8, PC = first PC | add RC, BASE, RC | sub RA, RA, BASE | stw BASE, L->base | addi PC, PC, 4 // Must point after first instruction. | stw RC, L->top | srwi CARG2, RA, 3 |2: | // L->base = new base, L->top = top | stw PC, SAVE_PC | mr CARG1, L | bl extern lj_state_growstack // (lua_State *L, int n) | lwz BASE, L->base | lwz RC, L->top | lwz LFUNC:RB, FRAME_FUNC(BASE) | sub RC, RC, BASE | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC | ins_callt // Just retry the call. | |//----------------------------------------------------------------------- |//-- Entry points into the assembler VM --------------------------------- |//----------------------------------------------------------------------- | |->vm_resume: // Setup C frame and resume thread. | // (lua_State *L, TValue *base, int nres1 = 0, ptrdiff_t ef = 0) | saveregs | mr L, CARG1 | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | mr BASE, CARG2 | lbz TMP1, L->status | stw L, SAVE_L | li PC, FRAME_CP | addi TMP0, sp, CFRAME_RESUME | addi DISPATCH, DISPATCH, GG_G2DISP | stw CARG3, SAVE_NRES | cmplwi TMP1, 0 | stw CARG3, SAVE_ERRF | stw TMP0, L->cframe | stw CARG3, SAVE_CFRAME | stw CARG1, SAVE_PC // Any value outside of bytecode is ok. | beq >3 | | // Resume after yield (like a return). | mr RA, BASE | lwz BASE, L->base | evsplati TISNUM, LJ_TISNUM+1 // Setup type comparison constants. | lwz TMP1, L->top | evsplati TISFUNC, LJ_TFUNC | lus TOBIT, 0x4338 | evsplati TISTAB, LJ_TTAB | lwz PC, FRAME_PC(BASE) | li TMP2, 0 | evsplati TISSTR, LJ_TSTR | sub RD, TMP1, BASE | evmergelo TOBIT, TOBIT, TMP2 | stb CARG3, L->status | andi. TMP0, PC, FRAME_TYPE | li_vmstate INTERP | addi RD, RD, 8 | evsplati TISNIL, LJ_TNIL | mr MULTRES, RD | st_vmstate | beq ->BC_RET_Z | b ->vm_return | |->vm_pcall: // Setup protected C frame and enter VM. | // (lua_State *L, TValue *base, int nres1, ptrdiff_t ef) | saveregs | li PC, FRAME_CP | stw CARG4, SAVE_ERRF | b >1 | |->vm_call: // Setup C frame and enter VM. | // (lua_State *L, TValue *base, int nres1) | saveregs | li PC, FRAME_C | |1: // Entry point for vm_pcall above (PC = ftype). | lwz TMP1, L:CARG1->cframe | stw CARG3, SAVE_NRES | mr L, CARG1 | stw CARG1, SAVE_L | mr BASE, CARG2 | stw sp, L->cframe // Add our C frame to cframe chain. | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | stw CARG1, SAVE_PC // Any value outside of bytecode is ok. | stw TMP1, SAVE_CFRAME | addi DISPATCH, DISPATCH, GG_G2DISP | |3: // Entry point for vm_cpcall/vm_resume (BASE = base, PC = ftype). | lwz TMP2, L->base // TMP2 = old base (used in vmeta_call). | evsplati TISNUM, LJ_TISNUM+1 // Setup type comparison constants. | lwz TMP1, L->top | evsplati TISFUNC, LJ_TFUNC | add PC, PC, BASE | evsplati TISTAB, LJ_TTAB | lus TOBIT, 0x4338 | li TMP0, 0 | sub PC, PC, TMP2 // PC = frame delta + frame type | evsplati TISSTR, LJ_TSTR | sub NARGS8:RC, TMP1, BASE | evmergelo TOBIT, TOBIT, TMP0 | li_vmstate INTERP | evsplati TISNIL, LJ_TNIL | st_vmstate | |->vm_call_dispatch: | // TMP2 = old base, BASE = new base, RC = nargs*8, PC = caller PC | li TMP0, -8 | evlddx LFUNC:RB, BASE, TMP0 | checkfunc LFUNC:RB | checkfail ->vmeta_call | |->vm_call_dispatch_f: | ins_call | // BASE = new base, RB = func, RC = nargs*8, PC = caller PC | |->vm_cpcall: // Setup protected C frame, call C. | // (lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp) | saveregs | mr L, CARG1 | lwz TMP0, L:CARG1->stack | stw CARG1, SAVE_L | lwz TMP1, L->top | stw CARG1, SAVE_PC // Any value outside of bytecode is ok. | sub TMP0, TMP0, TMP1 // Compute -savestack(L, L->top). | lwz TMP1, L->cframe | stw sp, L->cframe // Add our C frame to cframe chain. | li TMP2, 0 | stw TMP0, SAVE_NRES // Neg. delta means cframe w/o frame. | stw TMP2, SAVE_ERRF // No error function. | stw TMP1, SAVE_CFRAME | mtctr CARG4 | bctrl // (lua_State *L, lua_CFunction func, void *ud) | mr. BASE, CRET1 | lwz DISPATCH, L->glref // Setup pointer to dispatch table. | li PC, FRAME_CP | addi DISPATCH, DISPATCH, GG_G2DISP | bne <3 // Else continue with the call. | b ->vm_leave_cp // No base? Just remove C frame. | |//----------------------------------------------------------------------- |//-- Metamethod handling ------------------------------------------------ |//----------------------------------------------------------------------- | |// The lj_meta_* functions (except for lj_meta_cat) don't reallocate the |// stack, so BASE doesn't need to be reloaded across these calls. | |//-- Continuation dispatch ---------------------------------------------- | |->cont_dispatch: | // BASE = meta base, RA = resultptr, RD = (nresults+1)*8 | lwz TMP0, -12(BASE) // Continuation. | mr RB, BASE | mr BASE, TMP2 // Restore caller BASE. | lwz LFUNC:TMP1, FRAME_FUNC(TMP2) | cmplwi TMP0, 0 | lwz PC, -16(RB) // Restore PC from [cont|PC]. | beq >1 | subi TMP2, RD, 8 | lwz TMP1, LFUNC:TMP1->pc | evstddx TISNIL, RA, TMP2 // Ensure one valid arg. | lwz KBASE, PC2PROTO(k)(TMP1) | // BASE = base, RA = resultptr, RB = meta base | mtctr TMP0 | bctr // Jump to continuation. | |1: // Tail call from C function. | subi TMP1, RB, 16 | sub RC, TMP1, BASE | b ->vm_call_tail | |->cont_cat: // RA = resultptr, RB = meta base | lwz INS, -4(PC) | subi CARG2, RB, 16 | decode_RB8 SAVE0, INS | evldd TMP0, 0(RA) | add TMP1, BASE, SAVE0 | stw BASE, L->base | cmplw TMP1, CARG2 | sub CARG3, CARG2, TMP1 | decode_RA8 RA, INS | evstdd TMP0, 0(CARG2) | bne ->BC_CAT_Z | evstddx TMP0, BASE, RA | b ->cont_nop | |//-- Table indexing metamethods ----------------------------------------- | |->vmeta_tgets1: | evmergelo STR:RC, TISSTR, STR:RC | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | decode_RB8 RB, INS | evstdd STR:RC, 0(CARG3) | add CARG2, BASE, RB | b >1 | |->vmeta_tgets: | evmergelo TAB:RB, TISTAB, TAB:RB | la CARG2, DISPATCH_GL(tmptv)(DISPATCH) | evmergelo STR:RC, TISSTR, STR:RC | evstdd TAB:RB, 0(CARG2) | la CARG3, DISPATCH_GL(tmptv2)(DISPATCH) | evstdd STR:RC, 0(CARG3) | b >1 | |->vmeta_tgetb: // TMP0 = index | efdcfsi TMP0, TMP0 | decode_RB8 RB, INS | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | add CARG2, BASE, RB | evstdd TMP0, 0(CARG3) | b >1 | |->vmeta_tgetv: | decode_RB8 RB, INS | decode_RC8 RC, INS | add CARG2, BASE, RB | add CARG3, BASE, RC |1: | stw BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_tget // (lua_State *L, TValue *o, TValue *k) | // Returns TValue * (finished) or NULL (metamethod). | cmplwi CRET1, 0 | beq >3 | evldd TMP0, 0(CRET1) | evstddx TMP0, BASE, RA | ins_next | |3: // Call __index metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k | subfic TMP1, BASE, FRAME_CONT | lwz BASE, L->top | stw PC, -16(BASE) // [cont|PC] | add PC, TMP1, BASE | lwz LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | li NARGS8:RC, 16 // 2 args for func(t, k). | b ->vm_call_dispatch_f | |//----------------------------------------------------------------------- | |->vmeta_tsets1: | evmergelo STR:RC, TISSTR, STR:RC | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | decode_RB8 RB, INS | evstdd STR:RC, 0(CARG3) | add CARG2, BASE, RB | b >1 | |->vmeta_tsets: | evmergelo TAB:RB, TISTAB, TAB:RB | la CARG2, DISPATCH_GL(tmptv)(DISPATCH) | evmergelo STR:RC, TISSTR, STR:RC | evstdd TAB:RB, 0(CARG2) | la CARG3, DISPATCH_GL(tmptv2)(DISPATCH) | evstdd STR:RC, 0(CARG3) | b >1 | |->vmeta_tsetb: // TMP0 = index | efdcfsi TMP0, TMP0 | decode_RB8 RB, INS | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | add CARG2, BASE, RB | evstdd TMP0, 0(CARG3) | b >1 | |->vmeta_tsetv: | decode_RB8 RB, INS | decode_RC8 RC, INS | add CARG2, BASE, RB | add CARG3, BASE, RC |1: | stw BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_tset // (lua_State *L, TValue *o, TValue *k) | // Returns TValue * (finished) or NULL (metamethod). | cmplwi CRET1, 0 | evlddx TMP0, BASE, RA | beq >3 | // NOBARRIER: lj_meta_tset ensures the table is not black. | evstdd TMP0, 0(CRET1) | ins_next | |3: // Call __newindex metamethod. | // BASE = base, L->top = new base, stack = cont/func/t/k/(v) | subfic TMP1, BASE, FRAME_CONT | lwz BASE, L->top | stw PC, -16(BASE) // [cont|PC] | add PC, TMP1, BASE | lwz LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | li NARGS8:RC, 24 // 3 args for func(t, k, v) | evstdd TMP0, 16(BASE) // Copy value to third argument. | b ->vm_call_dispatch_f | |//-- Comparison metamethods --------------------------------------------- | |->vmeta_comp: | mr CARG1, L | subi PC, PC, 4 | add CARG2, BASE, RA | stw PC, SAVE_PC | add CARG3, BASE, RD | stw BASE, L->base | decode_OP1 CARG4, INS | bl extern lj_meta_comp // (lua_State *L, TValue *o1, *o2, int op) | // Returns 0/1 or TValue * (metamethod). |3: | cmplwi CRET1, 1 | bgt ->vmeta_binop |4: | lwz INS, 0(PC) | addi PC, PC, 4 | decode_RD4 TMP2, INS | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | add TMP2, TMP2, TMP3 | isellt PC, PC, TMP2 |->cont_nop: | ins_next | |->cont_ra: // RA = resultptr | lwz INS, -4(PC) | evldd TMP0, 0(RA) | decode_RA8 TMP1, INS | evstddx TMP0, BASE, TMP1 | b ->cont_nop | |->cont_condt: // RA = resultptr | lwz TMP0, 0(RA) | li TMP1, LJ_TTRUE | cmplw TMP1, TMP0 // Branch if result is true. | b <4 | |->cont_condf: // RA = resultptr | lwz TMP0, 0(RA) | li TMP1, LJ_TFALSE | cmplw TMP0, TMP1 // Branch if result is false. | b <4 | |->vmeta_equal: | // CARG2, CARG3, CARG4 are already set by BC_ISEQV/BC_ISNEV. | subi PC, PC, 4 | stw BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_equal // (lua_State *L, GCobj *o1, *o2, int ne) | // Returns 0/1 or TValue * (metamethod). | b <3 | |//-- Arithmetic metamethods --------------------------------------------- | |->vmeta_arith_vn: | add CARG3, BASE, RB | add CARG4, KBASE, RC | b >1 | |->vmeta_arith_nv: | add CARG3, KBASE, RC | add CARG4, BASE, RB | b >1 | |->vmeta_unm: | add CARG3, BASE, RD | mr CARG4, CARG3 | b >1 | |->vmeta_arith_vv: | add CARG3, BASE, RB | add CARG4, BASE, RC |1: | add CARG2, BASE, RA | stw BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | decode_OP1 CARG5, INS // Caveat: CARG5 overlaps INS. | bl extern lj_meta_arith // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) | // Returns NULL (finished) or TValue * (metamethod). | cmplwi CRET1, 0 | beq ->cont_nop | | // Call metamethod for binary op. |->vmeta_binop: | // BASE = old base, CRET1 = new base, stack = cont/func/o1/o2 | sub TMP1, CRET1, BASE | stw PC, -16(CRET1) // [cont|PC] | mr TMP2, BASE | addi PC, TMP1, FRAME_CONT | mr BASE, CRET1 | li NARGS8:RC, 16 // 2 args for func(o1, o2). | b ->vm_call_dispatch | |->vmeta_len: #if LJ_52 | mr SAVE0, CARG1 #endif | add CARG2, BASE, RD | stw BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | bl extern lj_meta_len // (lua_State *L, TValue *o) | // Returns NULL (retry) or TValue * (metamethod base). #if LJ_52 | cmplwi CRET1, 0 | bne ->vmeta_binop // Binop call for compatibility. | mr CARG1, SAVE0 | b ->BC_LEN_Z #else | b ->vmeta_binop // Binop call for compatibility. #endif | |//-- Call metamethod ---------------------------------------------------- | |->vmeta_call: // Resolve and call __call metamethod. | // TMP2 = old base, BASE = new base, RC = nargs*8 | mr CARG1, L | stw TMP2, L->base // This is the callers base! | subi CARG2, BASE, 8 | stw PC, SAVE_PC | add CARG3, BASE, RC | mr SAVE0, NARGS8:RC | bl extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) | lwz LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. | addi NARGS8:RC, SAVE0, 8 // Got one more argument now. | ins_call | |->vmeta_callt: // Resolve __call for BC_CALLT. | // BASE = old base, RA = new base, RC = nargs*8 | mr CARG1, L | stw BASE, L->base | subi CARG2, RA, 8 | stw PC, SAVE_PC | add CARG3, RA, RC | mr SAVE0, NARGS8:RC | bl extern lj_meta_call // (lua_State *L, TValue *func, TValue *top) | lwz TMP1, FRAME_PC(BASE) | addi NARGS8:RC, SAVE0, 8 // Got one more argument now. | lwz LFUNC:RB, FRAME_FUNC(RA) // Guaranteed to be a function here. | b ->BC_CALLT_Z | |//-- Argument coercion for 'for' statement ------------------------------ | |->vmeta_for: | mr CARG1, L | stw BASE, L->base | mr CARG2, RA | stw PC, SAVE_PC | mr SAVE0, INS | bl extern lj_meta_for // (lua_State *L, TValue *base) |.if JIT | decode_OP1 TMP0, SAVE0 |.endif | decode_RA8 RA, SAVE0 |.if JIT | cmpwi TMP0, BC_JFORI |.endif | decode_RD8 RD, SAVE0 |.if JIT | beq =>BC_JFORI |.endif | b =>BC_FORI | |//----------------------------------------------------------------------- |//-- Fast functions ----------------------------------------------------- |//----------------------------------------------------------------------- | |.macro .ffunc, name |->ff_ .. name: |.endmacro | |.macro .ffunc_1, name |->ff_ .. name: | cmplwi NARGS8:RC, 8 | evldd CARG1, 0(BASE) | blt ->fff_fallback |.endmacro | |.macro .ffunc_2, name |->ff_ .. name: | cmplwi NARGS8:RC, 16 | evldd CARG1, 0(BASE) | evldd CARG2, 8(BASE) | blt ->fff_fallback |.endmacro | |.macro .ffunc_n, name | .ffunc_1 name | checknum CARG1 | checkfail ->fff_fallback |.endmacro | |.macro .ffunc_nn, name | .ffunc_2 name | evmergehi TMP0, CARG1, CARG2 | checknum TMP0 | checkanyfail ->fff_fallback |.endmacro | |// Inlined GC threshold check. Caveat: uses TMP0 and TMP1. |.macro ffgccheck | lwz TMP0, DISPATCH_GL(gc.total)(DISPATCH) | lwz TMP1, DISPATCH_GL(gc.threshold)(DISPATCH) | cmplw TMP0, TMP1 | bgel ->fff_gcstep |.endmacro | |//-- Base library: checks ----------------------------------------------- | |.ffunc assert | cmplwi NARGS8:RC, 8 | evldd TMP0, 0(BASE) | blt ->fff_fallback | evaddw TMP1, TISNIL, TISNIL // Synthesize LJ_TFALSE. | la RA, -8(BASE) | evcmpltu cr1, TMP0, TMP1 | lwz PC, FRAME_PC(BASE) | bge cr1, ->fff_fallback | evstdd TMP0, 0(RA) | addi RD, NARGS8:RC, 8 // Compute (nresults+1)*8. | beq ->fff_res // Done if exactly 1 argument. | li TMP1, 8 | subi RC, RC, 8 |1: | cmplw TMP1, RC | evlddx TMP0, BASE, TMP1 | evstddx TMP0, RA, TMP1 | addi TMP1, TMP1, 8 | bne <1 | b ->fff_res | |.ffunc type | cmplwi NARGS8:RC, 8 | lwz CARG1, 0(BASE) | blt ->fff_fallback | li TMP2, ~LJ_TNUMX | cmplw CARG1, TISNUM | not TMP1, CARG1 | isellt TMP1, TMP2, TMP1 | slwi TMP1, TMP1, 3 | la TMP2, CFUNC:RB->upvalue | evlddx STR:CRET1, TMP2, TMP1 | b ->fff_restv | |//-- Base library: getters and setters --------------------------------- | |.ffunc_1 getmetatable | checktab CARG1 | evmergehi TMP1, CARG1, CARG1 | checkfail >6 |1: // Field metatable must be at same offset for GCtab and GCudata! | lwz TAB:RB, TAB:CARG1->metatable |2: | evmr CRET1, TISNIL | cmplwi TAB:RB, 0 | lwz STR:RC, DISPATCH_GL(gcroot[GCROOT_MMNAME+MM_metatable])(DISPATCH) | beq ->fff_restv | lwz TMP0, TAB:RB->hmask | evmergelo CRET1, TISTAB, TAB:RB // Use metatable as default result. | lwz TMP1, STR:RC->hash | lwz NODE:TMP2, TAB:RB->node | evmergelo STR:RC, TISSTR, STR:RC | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | slwi TMP0, TMP1, 5 | slwi TMP1, TMP1, 3 | sub TMP1, TMP0, TMP1 | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) |3: // Rearranged logic, because we expect _not_ to find the key. | evldd TMP0, NODE:TMP2->key | evldd TMP1, NODE:TMP2->val | evcmpeq TMP0, STR:RC | lwz NODE:TMP2, NODE:TMP2->next | checkallok >5 | cmplwi NODE:TMP2, 0 | beq ->fff_restv // Not found, keep default result. | b <3 |5: | checknil TMP1 | checkok ->fff_restv // Ditto for nil value. | evmr CRET1, TMP1 // Return value of mt.__metatable. | b ->fff_restv | |6: | cmpwi TMP1, LJ_TUDATA | not TMP1, TMP1 | beq <1 | checknum CARG1 | slwi TMP1, TMP1, 2 | li TMP2, 4*~LJ_TNUMX | isellt TMP1, TMP2, TMP1 | la TMP2, DISPATCH_GL(gcroot[GCROOT_BASEMT])(DISPATCH) | lwzx TAB:RB, TMP2, TMP1 | b <2 | |.ffunc_2 setmetatable | // Fast path: no mt for table yet and not clearing the mt. | evmergehi TMP0, TAB:CARG1, TAB:CARG2 | checktab TMP0 | checkanyfail ->fff_fallback | lwz TAB:TMP1, TAB:CARG1->metatable | cmplwi TAB:TMP1, 0 | lbz TMP3, TAB:CARG1->marked | bne ->fff_fallback | andi. TMP0, TMP3, LJ_GC_BLACK // isblack(table) | stw TAB:CARG2, TAB:CARG1->metatable | beq ->fff_restv | barrierback TAB:CARG1, TMP3, TMP0 | b ->fff_restv | |.ffunc rawget | cmplwi NARGS8:RC, 16 | evldd CARG2, 0(BASE) | blt ->fff_fallback | checktab CARG2 | la CARG3, 8(BASE) | checkfail ->fff_fallback | mr CARG1, L | bl extern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) | // Returns cTValue *. | evldd CRET1, 0(CRET1) | b ->fff_restv | |//-- Base library: conversions ------------------------------------------ | |.ffunc tonumber | // Only handles the number case inline (without a base argument). | cmplwi NARGS8:RC, 8 | evldd CARG1, 0(BASE) | bne ->fff_fallback // Exactly one argument. | checknum CARG1 | checkok ->fff_restv | b ->fff_fallback | |.ffunc_1 tostring | // Only handles the string or number case inline. | checkstr CARG1 | // A __tostring method in the string base metatable is ignored. | checkok ->fff_restv // String key? | // Handle numbers inline, unless a number base metatable is present. | lwz TMP0, DISPATCH_GL(gcroot[GCROOT_BASEMT_NUM])(DISPATCH) | checknum CARG1 | cmplwi cr1, TMP0, 0 | stw BASE, L->base // Add frame since C call can throw. | crand 4*cr0+eq, 4*cr0+lt, 4*cr1+eq | stw PC, SAVE_PC // Redundant (but a defined value). | bne ->fff_fallback | ffgccheck | mr CARG1, L | mr CARG2, BASE | bl extern lj_str_fromnum // (lua_State *L, lua_Number *np) | // Returns GCstr *. | evmergelo STR:CRET1, TISSTR, STR:CRET1 | b ->fff_restv | |//-- Base library: iterators ------------------------------------------- | |.ffunc next | cmplwi NARGS8:RC, 8 | evldd CARG2, 0(BASE) | blt ->fff_fallback | evstddx TISNIL, BASE, NARGS8:RC // Set missing 2nd arg to nil. | checktab TAB:CARG2 | lwz PC, FRAME_PC(BASE) | checkfail ->fff_fallback | stw BASE, L->base // Add frame since C call can throw. | mr CARG1, L | stw BASE, L->top // Dummy frame length is ok. | la CARG3, 8(BASE) | stw PC, SAVE_PC | bl extern lj_tab_next // (lua_State *L, GCtab *t, TValue *key) | // Returns 0 at end of traversal. | cmplwi CRET1, 0 | evmr CRET1, TISNIL | beq ->fff_restv // End of traversal: return nil. | evldd TMP0, 8(BASE) // Copy key and value to results. | la RA, -8(BASE) | evldd TMP1, 16(BASE) | evstdd TMP0, 0(RA) | li RD, (2+1)*8 | evstdd TMP1, 8(RA) | b ->fff_res | |.ffunc_1 pairs | checktab TAB:CARG1 | lwz PC, FRAME_PC(BASE) | checkfail ->fff_fallback #if LJ_52 | lwz TAB:TMP2, TAB:CARG1->metatable | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] | cmplwi TAB:TMP2, 0 | la RA, -8(BASE) | bne ->fff_fallback #else | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] | la RA, -8(BASE) #endif | evstdd TISNIL, 8(BASE) | li RD, (3+1)*8 | evstdd CFUNC:TMP0, 0(RA) | b ->fff_res | |.ffunc_2 ipairs_aux | checktab TAB:CARG1 | lwz PC, FRAME_PC(BASE) | checkfail ->fff_fallback | checknum CARG2 | lus TMP3, 0x3ff0 | checkfail ->fff_fallback | efdctsi TMP2, CARG2 | lwz TMP0, TAB:CARG1->asize | evmergelo TMP3, TMP3, ZERO | lwz TMP1, TAB:CARG1->array | efdadd CARG2, CARG2, TMP3 | addi TMP2, TMP2, 1 | la RA, -8(BASE) | cmplw TMP0, TMP2 | slwi TMP3, TMP2, 3 | evstdd CARG2, 0(RA) | ble >2 // Not in array part? | evlddx TMP1, TMP1, TMP3 |1: | checknil TMP1 | li RD, (0+1)*8 | checkok ->fff_res // End of iteration, return 0 results. | li RD, (2+1)*8 | evstdd TMP1, 8(RA) | b ->fff_res |2: // Check for empty hash part first. Otherwise call C function. | lwz TMP0, TAB:CARG1->hmask | cmplwi TMP0, 0 | li RD, (0+1)*8 | beq ->fff_res | mr CARG2, TMP2 | bl extern lj_tab_getinth // (GCtab *t, int32_t key) | // Returns cTValue * or NULL. | cmplwi CRET1, 0 | li RD, (0+1)*8 | beq ->fff_res | evldd TMP1, 0(CRET1) | b <1 | |.ffunc_1 ipairs | checktab TAB:CARG1 | lwz PC, FRAME_PC(BASE) | checkfail ->fff_fallback #if LJ_52 | lwz TAB:TMP2, TAB:CARG1->metatable | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] | cmplwi TAB:TMP2, 0 | la RA, -8(BASE) | bne ->fff_fallback #else | evldd CFUNC:TMP0, CFUNC:RB->upvalue[0] | la RA, -8(BASE) #endif | evsplati TMP1, 0 | li RD, (3+1)*8 | evstdd TMP1, 8(BASE) | evstdd CFUNC:TMP0, 0(RA) | b ->fff_res | |//-- Base library: catch errors ---------------------------------------- | |.ffunc pcall | cmplwi NARGS8:RC, 8 | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | blt ->fff_fallback | mr TMP2, BASE | la BASE, 8(BASE) | // Remember active hook before pcall. | rlwinm TMP3, TMP3, 32-HOOK_ACTIVE_SHIFT, 31, 31 | subi NARGS8:RC, NARGS8:RC, 8 | addi PC, TMP3, 8+FRAME_PCALL | b ->vm_call_dispatch | |.ffunc_2 xpcall | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | mr TMP2, BASE | checkfunc CARG2 // Traceback must be a function. | checkfail ->fff_fallback | la BASE, 16(BASE) | // Remember active hook before pcall. | rlwinm TMP3, TMP3, 32-HOOK_ACTIVE_SHIFT, 31, 31 | evstdd CARG2, 0(TMP2) // Swap function and traceback. | subi NARGS8:RC, NARGS8:RC, 16 | evstdd CARG1, 8(TMP2) | addi PC, TMP3, 16+FRAME_PCALL | b ->vm_call_dispatch | |//-- Coroutine library -------------------------------------------------- | |.macro coroutine_resume_wrap, resume |.if resume |.ffunc_1 coroutine_resume | evmergehi TMP0, L:CARG1, L:CARG1 |.else |.ffunc coroutine_wrap_aux | lwz L:CARG1, CFUNC:RB->upvalue[0].gcr |.endif |.if resume | cmpwi TMP0, LJ_TTHREAD | bne ->fff_fallback |.endif | lbz TMP0, L:CARG1->status | lwz TMP1, L:CARG1->cframe | lwz CARG2, L:CARG1->top | cmplwi cr0, TMP0, LUA_YIELD | lwz TMP2, L:CARG1->base | cmplwi cr1, TMP1, 0 | lwz TMP0, L:CARG1->maxstack | cmplw cr7, CARG2, TMP2 | lwz PC, FRAME_PC(BASE) | crorc 4*cr6+lt, 4*cr0+gt, 4*cr1+eq // st>LUA_YIELD || cframe!=0 | add TMP2, CARG2, NARGS8:RC | crandc 4*cr6+gt, 4*cr7+eq, 4*cr0+eq // base==top && st!=LUA_YIELD | cmplw cr1, TMP2, TMP0 | cror 4*cr6+lt, 4*cr6+lt, 4*cr6+gt | stw PC, SAVE_PC | cror 4*cr6+lt, 4*cr6+lt, 4*cr1+gt // cond1 || cond2 || stackov | stw BASE, L->base | blt cr6, ->fff_fallback |1: |.if resume | addi BASE, BASE, 8 // Keep resumed thread in stack for GC. | subi NARGS8:RC, NARGS8:RC, 8 | subi TMP2, TMP2, 8 |.endif | stw TMP2, L:CARG1->top | li TMP1, 0 | stw BASE, L->top |2: // Move args to coroutine. | cmpw TMP1, NARGS8:RC | evlddx TMP0, BASE, TMP1 | beq >3 | evstddx TMP0, CARG2, TMP1 | addi TMP1, TMP1, 8 | b <2 |3: | li CARG3, 0 | mr L:SAVE0, L:CARG1 | li CARG4, 0 | bl ->vm_resume // (lua_State *L, TValue *base, 0, 0) | // Returns thread status. |4: | lwz TMP2, L:SAVE0->base | cmplwi CRET1, LUA_YIELD | lwz TMP3, L:SAVE0->top | li_vmstate INTERP | lwz BASE, L->base | st_vmstate | bgt >8 | sub RD, TMP3, TMP2 | lwz TMP0, L->maxstack | cmplwi RD, 0 | add TMP1, BASE, RD | beq >6 // No results? | cmplw TMP1, TMP0 | li TMP1, 0 | bgt >9 // Need to grow stack? | | subi TMP3, RD, 8 | stw TMP2, L:SAVE0->top // Clear coroutine stack. |5: // Move results from coroutine. | cmplw TMP1, TMP3 | evlddx TMP0, TMP2, TMP1 | evstddx TMP0, BASE, TMP1 | addi TMP1, TMP1, 8 | bne <5 |6: | andi. TMP0, PC, FRAME_TYPE |.if resume | li TMP1, LJ_TTRUE | la RA, -8(BASE) | stw TMP1, -8(BASE) // Prepend true to results. | addi RD, RD, 16 |.else | mr RA, BASE | addi RD, RD, 8 |.endif |7: | stw PC, SAVE_PC | mr MULTRES, RD | beq ->BC_RET_Z | b ->vm_return | |8: // Coroutine returned with error (at co->top-1). |.if resume | andi. TMP0, PC, FRAME_TYPE | la TMP3, -8(TMP3) | li TMP1, LJ_TFALSE | evldd TMP0, 0(TMP3) | stw TMP3, L:SAVE0->top // Remove error from coroutine stack. | li RD, (2+1)*8 | stw TMP1, -8(BASE) // Prepend false to results. | la RA, -8(BASE) | evstdd TMP0, 0(BASE) // Copy error message. | b <7 |.else | mr CARG1, L | mr CARG2, L:SAVE0 | bl extern lj_ffh_coroutine_wrap_err // (lua_State *L, lua_State *co) |.endif | |9: // Handle stack expansion on return from yield. | mr CARG1, L | srwi CARG2, RD, 3 | bl extern lj_state_growstack // (lua_State *L, int n) | li CRET1, 0 | b <4 |.endmacro | | coroutine_resume_wrap 1 // coroutine.resume | coroutine_resume_wrap 0 // coroutine.wrap | |.ffunc coroutine_yield | lwz TMP0, L->cframe | add TMP1, BASE, NARGS8:RC | stw BASE, L->base | andi. TMP0, TMP0, CFRAME_RESUME | stw TMP1, L->top | li CRET1, LUA_YIELD | beq ->fff_fallback | stw ZERO, L->cframe | stb CRET1, L->status | b ->vm_leave_unw | |//-- Math library ------------------------------------------------------- | |.ffunc_n math_abs | efdabs CRET1, CARG1 | // Fallthrough. | |->fff_restv: | // CRET1 = TValue result. | lwz PC, FRAME_PC(BASE) | la RA, -8(BASE) | evstdd CRET1, 0(RA) |->fff_res1: | // RA = results, PC = return. | li RD, (1+1)*8 |->fff_res: | // RA = results, RD = (nresults+1)*8, PC = return. | andi. TMP0, PC, FRAME_TYPE | mr MULTRES, RD | bne ->vm_return | lwz INS, -4(PC) | decode_RB8 RB, INS |5: | cmplw RB, RD // More results expected? | decode_RA8 TMP0, INS | bgt >6 | ins_next1 | // Adjust BASE. KBASE is assumed to be set for the calling frame. | sub BASE, RA, TMP0 | ins_next2 | |6: // Fill up results with nil. | subi TMP1, RD, 8 | addi RD, RD, 8 | evstddx TISNIL, RA, TMP1 | b <5 | |.macro math_extern, func | .ffunc math_ .. func | cmplwi NARGS8:RC, 8 | evldd CARG2, 0(BASE) | blt ->fff_fallback | checknum CARG2 | evmergehi CARG1, CARG2, CARG2 | checkfail ->fff_fallback | bl extern func@plt | evmergelo CRET1, CRET1, CRET2 | b ->fff_restv |.endmacro | |.macro math_extern2, func | .ffunc math_ .. func | cmplwi NARGS8:RC, 16 | evldd CARG2, 0(BASE) | evldd CARG4, 8(BASE) | blt ->fff_fallback | evmergehi CARG1, CARG4, CARG2 | checknum CARG1 | evmergehi CARG3, CARG4, CARG4 | checkanyfail ->fff_fallback | bl extern func@plt | evmergelo CRET1, CRET1, CRET2 | b ->fff_restv |.endmacro | |.macro math_round, func | .ffunc math_ .. func | cmplwi NARGS8:RC, 8 | evldd CARG2, 0(BASE) | blt ->fff_fallback | checknum CARG2 | evmergehi CARG1, CARG2, CARG2 | checkfail ->fff_fallback | lwz PC, FRAME_PC(BASE) | bl ->vm_..func.._hilo; | la RA, -8(BASE) | evstdd CRET2, 0(RA) | b ->fff_res1 |.endmacro | | math_round floor | math_round ceil | | math_extern sqrt | |.ffunc math_log | cmplwi NARGS8:RC, 8 | evldd CARG2, 0(BASE) | bne ->fff_fallback // Need exactly 1 argument. | checknum CARG2 | evmergehi CARG1, CARG2, CARG2 | checkfail ->fff_fallback | bl extern log@plt | evmergelo CRET1, CRET1, CRET2 | b ->fff_restv | | math_extern log10 | math_extern exp | math_extern sin | math_extern cos | math_extern tan | math_extern asin | math_extern acos | math_extern atan | math_extern sinh | math_extern cosh | math_extern tanh | math_extern2 pow | math_extern2 atan2 | math_extern2 fmod | |->ff_math_deg: |.ffunc_n math_rad | evldd CARG2, CFUNC:RB->upvalue[0] | efdmul CRET1, CARG1, CARG2 | b ->fff_restv | |.ffunc math_ldexp | cmplwi NARGS8:RC, 16 | evldd CARG2, 0(BASE) | evldd CARG4, 8(BASE) | blt ->fff_fallback | evmergehi CARG1, CARG4, CARG2 | checknum CARG1 | checkanyfail ->fff_fallback | efdctsi CARG3, CARG4 | bl extern ldexp@plt | evmergelo CRET1, CRET1, CRET2 | b ->fff_restv | |.ffunc math_frexp | cmplwi NARGS8:RC, 8 | evldd CARG2, 0(BASE) | blt ->fff_fallback | checknum CARG2 | evmergehi CARG1, CARG2, CARG2 | checkfail ->fff_fallback | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | lwz PC, FRAME_PC(BASE) | bl extern frexp@plt | lwz TMP1, DISPATCH_GL(tmptv)(DISPATCH) | evmergelo CRET1, CRET1, CRET2 | efdcfsi CRET2, TMP1 | la RA, -8(BASE) | evstdd CRET1, 0(RA) | li RD, (2+1)*8 | evstdd CRET2, 8(RA) | b ->fff_res | |.ffunc math_modf | cmplwi NARGS8:RC, 8 | evldd CARG2, 0(BASE) | blt ->fff_fallback | checknum CARG2 | evmergehi CARG1, CARG2, CARG2 | checkfail ->fff_fallback | la CARG3, -8(BASE) | lwz PC, FRAME_PC(BASE) | bl extern modf@plt | evmergelo CRET1, CRET1, CRET2 | la RA, -8(BASE) | evstdd CRET1, 0(BASE) | li RD, (2+1)*8 | b ->fff_res | |.macro math_minmax, name, cmpop | .ffunc_1 name | checknum CARG1 | li TMP1, 8 | checkfail ->fff_fallback |1: | evlddx CARG2, BASE, TMP1 | cmplw cr1, TMP1, NARGS8:RC | checknum CARG2 | bge cr1, ->fff_restv // Ok, since CRET1 = CARG1. | checkfail ->fff_fallback | cmpop CARG2, CARG1 | addi TMP1, TMP1, 8 | crmove 4*cr0+lt, 4*cr0+gt | evsel CARG1, CARG2, CARG1 | b <1 |.endmacro | | math_minmax math_min, efdtstlt | math_minmax math_max, efdtstgt | |//-- String library ----------------------------------------------------- | |.ffunc_1 string_len | checkstr STR:CARG1 | checkfail ->fff_fallback | lwz TMP0, STR:CARG1->len | efdcfsi CRET1, TMP0 | b ->fff_restv | |.ffunc string_byte // Only handle the 1-arg case here. | cmplwi NARGS8:RC, 8 | evldd STR:CARG1, 0(BASE) | bne ->fff_fallback // Need exactly 1 argument. | checkstr STR:CARG1 | la RA, -8(BASE) | checkfail ->fff_fallback | lwz TMP0, STR:CARG1->len | li RD, (0+1)*8 | lbz TMP1, STR:CARG1[1] // Access is always ok (NUL at end). | li TMP2, (1+1)*8 | cmplwi TMP0, 0 | lwz PC, FRAME_PC(BASE) | efdcfsi CRET1, TMP1 | iseleq RD, RD, TMP2 | evstdd CRET1, 0(RA) | b ->fff_res | |.ffunc string_char // Only handle the 1-arg case here. | ffgccheck | cmplwi NARGS8:RC, 8 | evldd CARG1, 0(BASE) | bne ->fff_fallback // Exactly 1 argument. | checknum CARG1 | la CARG2, DISPATCH_GL(tmptv)(DISPATCH) | checkfail ->fff_fallback | efdctsiz TMP0, CARG1 | li CARG3, 1 | cmplwi TMP0, 255 | stb TMP0, 0(CARG2) | bgt ->fff_fallback |->fff_newstr: | mr CARG1, L | stw BASE, L->base | stw PC, SAVE_PC | bl extern lj_str_new // (lua_State *L, char *str, size_t l) | // Returns GCstr *. | lwz BASE, L->base | evmergelo STR:CRET1, TISSTR, STR:CRET1 | b ->fff_restv | |.ffunc string_sub | ffgccheck | cmplwi NARGS8:RC, 16 | evldd CARG3, 16(BASE) | evldd STR:CARG1, 0(BASE) | blt ->fff_fallback | evldd CARG2, 8(BASE) | li TMP2, -1 | beq >1 | checknum CARG3 | checkfail ->fff_fallback | efdctsiz TMP2, CARG3 |1: | checknum CARG2 | checkfail ->fff_fallback | checkstr STR:CARG1 | efdctsiz TMP1, CARG2 | checkfail ->fff_fallback | lwz TMP0, STR:CARG1->len | cmplw TMP0, TMP2 // len < end? (unsigned compare) | add TMP3, TMP2, TMP0 | blt >5 |2: | cmpwi TMP1, 0 // start <= 0? | add TMP3, TMP1, TMP0 | ble >7 |3: | sub. CARG3, TMP2, TMP1 | addi CARG2, STR:CARG1, #STR-1 | addi CARG3, CARG3, 1 | add CARG2, CARG2, TMP1 | isellt CARG3, r0, CARG3 | b ->fff_newstr | |5: // Negative end or overflow. | cmpw TMP0, TMP2 | addi TMP3, TMP3, 1 | iselgt TMP2, TMP3, TMP0 // end = end > len ? len : end+len+1 | b <2 | |7: // Negative start or underflow. | cmpwi cr1, TMP3, 0 | iseleq TMP1, r0, TMP3 | isel TMP1, r0, TMP1, 4*cr1+lt | addi TMP1, TMP1, 1 // start = 1 + (start ? start+len : 0) | b <3 | |.ffunc string_rep // Only handle the 1-char case inline. | ffgccheck | cmplwi NARGS8:RC, 16 | evldd CARG1, 0(BASE) | evldd CARG2, 8(BASE) | bne ->fff_fallback // Exactly 2 arguments. | checknum CARG2 | checkfail ->fff_fallback | checkstr STR:CARG1 | efdctsiz CARG3, CARG2 | checkfail ->fff_fallback | lwz TMP0, STR:CARG1->len | cmpwi CARG3, 0 | lwz TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | ble >2 // Count <= 0? (or non-int) | cmplwi TMP0, 1 | subi TMP2, CARG3, 1 | blt >2 // Zero length string? | cmplw cr1, TMP1, CARG3 | bne ->fff_fallback // Fallback for > 1-char strings. | lbz TMP0, STR:CARG1[1] | lwz CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | blt cr1, ->fff_fallback |1: // Fill buffer with char. Yes, this is suboptimal code (do you care?). | cmplwi TMP2, 0 | stbx TMP0, CARG2, TMP2 | subi TMP2, TMP2, 1 | bne <1 | b ->fff_newstr |2: // Return empty string. | la STR:CRET1, DISPATCH_GL(strempty)(DISPATCH) | evmergelo CRET1, TISSTR, STR:CRET1 | b ->fff_restv | |.ffunc string_reverse | ffgccheck | cmplwi NARGS8:RC, 8 | evldd CARG1, 0(BASE) | blt ->fff_fallback | checkstr STR:CARG1 | lwz TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | checkfail ->fff_fallback | lwz CARG3, STR:CARG1->len | la CARG1, #STR(STR:CARG1) | lwz CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | li TMP2, 0 | cmplw TMP1, CARG3 | subi TMP3, CARG3, 1 | blt ->fff_fallback |1: // Reverse string copy. | cmpwi TMP3, 0 | lbzx TMP1, CARG1, TMP2 | blt ->fff_newstr | stbx TMP1, CARG2, TMP3 | subi TMP3, TMP3, 1 | addi TMP2, TMP2, 1 | b <1 | |.macro ffstring_case, name, lo | .ffunc name | ffgccheck | cmplwi NARGS8:RC, 8 | evldd CARG1, 0(BASE) | blt ->fff_fallback | checkstr STR:CARG1 | lwz TMP1, DISPATCH_GL(tmpbuf.sz)(DISPATCH) | checkfail ->fff_fallback | lwz CARG3, STR:CARG1->len | la CARG1, #STR(STR:CARG1) | lwz CARG2, DISPATCH_GL(tmpbuf.buf)(DISPATCH) | cmplw TMP1, CARG3 | li TMP2, 0 | blt ->fff_fallback |1: // ASCII case conversion. | cmplw TMP2, CARG3 | lbzx TMP1, CARG1, TMP2 | bge ->fff_newstr | subi TMP0, TMP1, lo | xori TMP3, TMP1, 0x20 | cmplwi TMP0, 26 | isellt TMP1, TMP3, TMP1 | stbx TMP1, CARG2, TMP2 | addi TMP2, TMP2, 1 | b <1 |.endmacro | |ffstring_case string_lower, 65 |ffstring_case string_upper, 97 | |//-- Table library ------------------------------------------------------ | |.ffunc_1 table_getn | checktab CARG1 | checkfail ->fff_fallback | bl extern lj_tab_len // (GCtab *t) | // Returns uint32_t (but less than 2^31). | efdcfsi CRET1, CRET1 | b ->fff_restv | |//-- Bit library -------------------------------------------------------- | |.macro .ffunc_bit, name | .ffunc_n bit_..name | efdadd CARG1, CARG1, TOBIT |.endmacro | |.ffunc_bit tobit |->fff_resbit: | efdcfsi CRET1, CARG1 | b ->fff_restv | |.macro .ffunc_bit_op, name, ins | .ffunc_bit name | li TMP1, 8 |1: | evlddx CARG2, BASE, TMP1 | cmplw cr1, TMP1, NARGS8:RC | checknum CARG2 | bge cr1, ->fff_resbit | checkfail ->fff_fallback | efdadd CARG2, CARG2, TOBIT | ins CARG1, CARG1, CARG2 | addi TMP1, TMP1, 8 | b <1 |.endmacro | |.ffunc_bit_op band, and |.ffunc_bit_op bor, or |.ffunc_bit_op bxor, xor | |.ffunc_bit bswap | rotlwi TMP0, CARG1, 8 | rlwimi TMP0, CARG1, 24, 0, 7 | rlwimi TMP0, CARG1, 24, 16, 23 | efdcfsi CRET1, TMP0 | b ->fff_restv | |.ffunc_bit bnot | not TMP0, CARG1 | efdcfsi CRET1, TMP0 | b ->fff_restv | |.macro .ffunc_bit_sh, name, ins, shmod | .ffunc_nn bit_..name | efdadd CARG2, CARG2, TOBIT | efdadd CARG1, CARG1, TOBIT |.if shmod == 1 | rlwinm CARG2, CARG2, 0, 27, 31 |.elif shmod == 2 | neg CARG2, CARG2 |.endif | ins TMP0, CARG1, CARG2 | efdcfsi CRET1, TMP0 | b ->fff_restv |.endmacro | |.ffunc_bit_sh lshift, slw, 1 |.ffunc_bit_sh rshift, srw, 1 |.ffunc_bit_sh arshift, sraw, 1 |.ffunc_bit_sh rol, rotlw, 0 |.ffunc_bit_sh ror, rotlw, 2 | |//----------------------------------------------------------------------- | |->fff_fallback: // Call fast function fallback handler. | // BASE = new base, RB = CFUNC, RC = nargs*8 | lwz TMP3, CFUNC:RB->f | add TMP1, BASE, NARGS8:RC | lwz PC, FRAME_PC(BASE) // Fallback may overwrite PC. | addi TMP0, TMP1, 8*LUA_MINSTACK | lwz TMP2, L->maxstack | stw PC, SAVE_PC // Redundant (but a defined value). | cmplw TMP0, TMP2 | stw BASE, L->base | stw TMP1, L->top | mr CARG1, L | bgt >5 // Need to grow stack. | mtctr TMP3 | bctrl // (lua_State *L) | // Either throws an error, or recovers and returns -1, 0 or nresults+1. | lwz BASE, L->base | cmpwi CRET1, 0 | slwi RD, CRET1, 3 | la RA, -8(BASE) | bgt ->fff_res // Returned nresults+1? |1: // Returned 0 or -1: retry fast path. | lwz TMP0, L->top | lwz LFUNC:RB, FRAME_FUNC(BASE) | sub NARGS8:RC, TMP0, BASE | bne ->vm_call_tail // Returned -1? | ins_callt // Returned 0: retry fast path. | |// Reconstruct previous base for vmeta_call during tailcall. |->vm_call_tail: | andi. TMP0, PC, FRAME_TYPE | rlwinm TMP1, PC, 0, 0, 28 | bne >3 | lwz INS, -4(PC) | decode_RA8 TMP1, INS | addi TMP1, TMP1, 8 |3: | sub TMP2, BASE, TMP1 | b ->vm_call_dispatch // Resolve again for tailcall. | |5: // Grow stack for fallback handler. | li CARG2, LUA_MINSTACK | bl extern lj_state_growstack // (lua_State *L, int n) | lwz BASE, L->base | cmpw TMP0, TMP0 // Set 4*cr0+eq to force retry. | b <1 | |->fff_gcstep: // Call GC step function. | // BASE = new base, RC = nargs*8 | mflr SAVE0 | stw BASE, L->base | add TMP0, BASE, NARGS8:RC | stw PC, SAVE_PC // Redundant (but a defined value). | stw TMP0, L->top | mr CARG1, L | bl extern lj_gc_step // (lua_State *L) | lwz BASE, L->base | mtlr SAVE0 | lwz TMP0, L->top | sub NARGS8:RC, TMP0, BASE | lwz CFUNC:RB, FRAME_FUNC(BASE) | blr | |//----------------------------------------------------------------------- |//-- Special dispatch targets ------------------------------------------- |//----------------------------------------------------------------------- | |->vm_record: // Dispatch target for recording phase. |.if JIT | NYI |.endif | |->vm_rethook: // Dispatch target for return hooks. | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | andi. TMP0, TMP3, HOOK_ACTIVE // Hook already active? | beq >1 |5: // Re-dispatch to static ins. | addi TMP1, TMP1, GG_DISP2STATIC // Assumes decode_OP4 TMP1, INS. | lwzx TMP0, DISPATCH, TMP1 | mtctr TMP0 | bctr | |->vm_inshook: // Dispatch target for instr/line hooks. | lbz TMP3, DISPATCH_GL(hookmask)(DISPATCH) | lwz TMP2, DISPATCH_GL(hookcount)(DISPATCH) | andi. TMP0, TMP3, HOOK_ACTIVE // Hook already active? | rlwinm TMP0, TMP3, 31-LUA_HOOKLINE, 31, 0 | bne <5 | | cmpwi cr1, TMP0, 0 | addic. TMP2, TMP2, -1 | beq cr1, <5 | stw TMP2, DISPATCH_GL(hookcount)(DISPATCH) | beq >1 | bge cr1, <5 |1: | mr CARG1, L | stw MULTRES, SAVE_MULTRES | mr CARG2, PC | stw BASE, L->base | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. | bl extern lj_dispatch_ins // (lua_State *L, const BCIns *pc) |3: | lwz BASE, L->base |4: // Re-dispatch to static ins. | lwz INS, -4(PC) | decode_OP4 TMP1, INS | decode_RB8 RB, INS | addi TMP1, TMP1, GG_DISP2STATIC | decode_RD8 RD, INS | lwzx TMP0, DISPATCH, TMP1 | decode_RA8 RA, INS | decode_RC8 RC, INS | mtctr TMP0 | bctr | |->cont_hook: // Continue from hook yield. | addi PC, PC, 4 | lwz MULTRES, -20(RB) // Restore MULTRES for *M ins. | b <4 | |->vm_hotloop: // Hot loop counter underflow. |.if JIT | NYI |.endif | |->vm_callhook: // Dispatch target for call hooks. | mr CARG2, PC |.if JIT | b >1 |.endif | |->vm_hotcall: // Hot call counter underflow. |.if JIT | ori CARG2, PC, 1 |1: |.endif | add TMP0, BASE, RC | stw PC, SAVE_PC | mr CARG1, L | stw BASE, L->base | sub RA, RA, BASE | stw TMP0, L->top | bl extern lj_dispatch_call // (lua_State *L, const BCIns *pc) | // Returns ASMFunction. | lwz BASE, L->base | lwz TMP0, L->top | stw ZERO, SAVE_PC // Invalidate for subsequent line hook. | sub NARGS8:RC, TMP0, BASE | add RA, BASE, RA | lwz LFUNC:RB, FRAME_FUNC(BASE) | mtctr CRET1 | bctr | |//----------------------------------------------------------------------- |//-- Trace exit handler ------------------------------------------------- |//----------------------------------------------------------------------- | |->vm_exit_handler: |.if JIT | NYI |.endif |->vm_exit_interp: |.if JIT | NYI |.endif | |//----------------------------------------------------------------------- |//-- Math helper functions ---------------------------------------------- |//----------------------------------------------------------------------- | |// FP value rounding. Called by math.floor/math.ceil fast functions |// and from JIT code. |// |// This can be inlined if the CPU has the frin/friz/frip/frim instructions. |// The alternative hard-float approaches have a deep dependency chain. |// The resulting latency is at least 3x-7x the double-precision FP latency |// (e500v2: 6cy, e600: 5cy, Cell: 10cy) or around 20-70 cycles. |// |// The soft-float approach is tedious, but much faster (e500v2: ~11cy/~6cy). |// However it relies on a fast way to transfer the FP value to GPRs |// (e500v2: 0cy for lo-word, 1cy for hi-word). |// |.macro vm_round, name, mode | // Used temporaries: TMP0, TMP1, TMP2, TMP3. |->name.._efd: // Input: CARG2, output: CRET2 | evmergehi CARG1, CARG2, CARG2 |->name.._hilo: | // Input: CARG1 (hi), CARG2 (hi, lo), output: CRET2 | rlwinm TMP2, CARG1, 12, 21, 31 | addic. TMP2, TMP2, -1023 // exp = exponent(x) - 1023 | li TMP1, -1 | cmplwi cr1, TMP2, 51 // 0 <= exp <= 51? | subfic TMP0, TMP2, 52 | bgt cr1, >1 | lus TMP3, 0xfff0 | slw TMP0, TMP1, TMP0 // lomask = -1 << (52-exp) | sraw TMP1, TMP3, TMP2 // himask = (int32_t)0xfff00000 >> exp |.if mode == 2 // trunc(x): | evmergelo TMP0, TMP1, TMP0 | evand CRET2, CARG2, TMP0 // hi &= himask, lo &= lomask |.else | andc TMP2, CARG2, TMP0 | andc TMP3, CARG1, TMP1 | or TMP2, TMP2, TMP3 // ztest = (hi&~himask) | (lo&~lomask) | srawi TMP3, CARG1, 31 // signmask = (int32_t)hi >> 31 |.if mode == 0 // floor(x): | and. TMP2, TMP2, TMP3 // iszero = ((ztest & signmask) == 0) |.else // ceil(x): | andc. TMP2, TMP2, TMP3 // iszero = ((ztest & ~signmask) == 0) |.endif | and CARG2, CARG2, TMP0 // lo &= lomask | and CARG1, CARG1, TMP1 // hi &= himask | subc TMP0, CARG2, TMP0 | iseleq TMP0, CARG2, TMP0 // lo = iszero ? lo : lo-lomask | sube TMP1, CARG1, TMP1 | iseleq TMP1, CARG1, TMP1 // hi = iszero ? hi : hi-himask+carry | evmergelo CRET2, TMP1, TMP0 |.endif | blr |1: | bgtlr // Already done if >=2^52, +-inf or nan. |.if mode == 2 // trunc(x): | rlwinm TMP1, CARG1, 0, 0, 0 // hi = sign(x) | li TMP0, 0 | evmergelo CRET2, TMP1, TMP0 |.else | rlwinm TMP2, CARG1, 0, 1, 31 | srawi TMP0, CARG1, 31 // signmask = (int32_t)hi >> 31 | or TMP2, TMP2, CARG2 // ztest = abs(hi) | lo | lus TMP1, 0x3ff0 |.if mode == 0 // floor(x): | and. TMP2, TMP2, TMP0 // iszero = ((ztest & signmask) == 0) |.else // ceil(x): | andc. TMP2, TMP2, TMP0 // iszero = ((ztest & ~signmask) == 0) |.endif | li TMP0, 0 | iseleq TMP1, r0, TMP1 | rlwimi CARG1, TMP1, 0, 1, 31 // hi = sign(x) | (iszero ? 0.0 : 1.0) | evmergelo CRET2, CARG1, TMP0 |.endif | blr |.endmacro | |->vm_floor: | mflr CARG3 | evmergelo CARG2, CARG1, CARG2 | bl ->vm_floor_hilo | mtlr CARG3 | evmergehi CRET1, CRET2, CRET2 | blr | | vm_round vm_floor, 0 | vm_round vm_ceil, 1 |.if JIT | vm_round vm_trunc, 2 |.else |->vm_trunc_efd: |->vm_trunc_hilo: |.endif | |//----------------------------------------------------------------------- |//-- Miscellaneous functions -------------------------------------------- |//----------------------------------------------------------------------- | |//----------------------------------------------------------------------- |//-- FFI helper functions ----------------------------------------------- |//----------------------------------------------------------------------- | |->vm_ffi_call: |.if FFI | NYI |.endif | |//----------------------------------------------------------------------- } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop) { int vk = 0; |=>defop: switch (op) { /* -- Comparison ops ---------------------------------------------------- */ /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: | // RA = src1*8, RD = src2*8, JMP with RD = target | evlddx TMP0, BASE, RA | addi PC, PC, 4 | evlddx TMP1, BASE, RD | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | lwz TMP2, -4(PC) | evmergehi RB, TMP0, TMP1 | decode_RD4 TMP2, TMP2 | checknum RB | add TMP2, TMP2, TMP3 | checkanyfail ->vmeta_comp | efdcmplt TMP0, TMP1 if (op == BC_ISLE || op == BC_ISGT) { | efdcmpeq cr1, TMP0, TMP1 | cror 4*cr0+gt, 4*cr0+gt, 4*cr1+gt } if (op == BC_ISLT || op == BC_ISLE) { | iselgt PC, TMP2, PC } else { | iselgt PC, PC, TMP2 } | ins_next break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; | // RA = src1*8, RD = src2*8, JMP with RD = target | evlddx CARG2, BASE, RA | addi PC, PC, 4 | evlddx CARG3, BASE, RD | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | lwz TMP2, -4(PC) | evmergehi RB, CARG2, CARG3 | decode_RD4 TMP2, TMP2 | checknum RB | add TMP2, TMP2, TMP3 | checkanyfail >5 | efdcmpeq CARG2, CARG3 if (vk) { | iselgt PC, TMP2, PC } else { | iselgt PC, PC, TMP2 } |1: | ins_next | |5: // Either or both types are not numbers. | evcmpeq CARG2, CARG3 | not TMP3, RB | cmplwi cr1, TMP3, ~LJ_TISPRI // Primitive? | crorc 4*cr7+lt, 4*cr0+so, 4*cr0+lt // 1: Same tv or different type. | cmplwi cr6, TMP3, ~LJ_TISTABUD // Table or userdata? | crandc 4*cr7+gt, 4*cr0+lt, 4*cr1+gt // 2: Same type and primitive. | mr SAVE0, PC if (vk) { | isel PC, TMP2, PC, 4*cr7+gt } else { | isel TMP2, PC, TMP2, 4*cr7+gt } | cror 4*cr7+lt, 4*cr7+lt, 4*cr7+gt // 1 or 2. if (vk) { | isel PC, TMP2, PC, 4*cr0+so } else { | isel PC, PC, TMP2, 4*cr0+so } | blt cr7, <1 // Done if 1 or 2. | blt cr6, <1 // Done if not tab/ud. | | // Different tables or userdatas. Need to check __eq metamethod. | // Field metatable must be at same offset for GCtab and GCudata! | lwz TAB:TMP2, TAB:CARG2->metatable | li CARG4, 1-vk // ne = 0 or 1. | cmplwi TAB:TMP2, 0 | beq <1 // No metatable? | lbz TMP2, TAB:TMP2->nomm | andi. TMP2, TMP2, 1<vmeta_equal // Handle __eq metamethod. break; case BC_ISEQS: case BC_ISNES: vk = op == BC_ISEQS; | // RA = src*8, RD = str_const*8 (~), JMP with RD = target | evlddx TMP0, BASE, RA | srwi RD, RD, 1 | lwz INS, 0(PC) | subfic RD, RD, -4 | addi PC, PC, 4 | lwzx STR:TMP1, KBASE, RD // KBASE-4-str_const*4 | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | decode_RD4 TMP2, INS | evmergelo STR:TMP1, TISSTR, STR:TMP1 | add TMP2, TMP2, TMP3 | evcmpeq TMP0, STR:TMP1 if (vk) { | isel PC, TMP2, PC, 4*cr0+so } else { | isel PC, PC, TMP2, 4*cr0+so } | ins_next break; case BC_ISEQN: case BC_ISNEN: vk = op == BC_ISEQN; | // RA = src*8, RD = num_const*8, JMP with RD = target | evlddx TMP0, BASE, RA | addi PC, PC, 4 | evlddx TMP1, KBASE, RD | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | lwz INS, -4(PC) | checknum TMP0 | checkfail >5 | efdcmpeq TMP0, TMP1 |1: | decode_RD4 TMP2, INS | add TMP2, TMP2, TMP3 if (vk) { | iselgt PC, TMP2, PC |5: } else { | iselgt PC, PC, TMP2 } |3: | ins_next if (!vk) { |5: | decode_RD4 TMP2, INS | add PC, TMP2, TMP3 | b <3 } break; case BC_ISEQP: case BC_ISNEP: vk = op == BC_ISEQP; | // RA = src*8, RD = primitive_type*8 (~), JMP with RD = target | lwzx TMP0, BASE, RA | srwi TMP1, RD, 3 | lwz INS, 0(PC) | addi PC, PC, 4 | not TMP1, TMP1 | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | cmplw TMP0, TMP1 | decode_RD4 TMP2, INS | add TMP2, TMP2, TMP3 if (vk) { | iseleq PC, TMP2, PC } else { | iseleq PC, PC, TMP2 } | ins_next break; /* -- Unary test and copy ops ------------------------------------------- */ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: | // RA = dst*8 or unused, RD = src*8, JMP with RD = target | evlddx TMP0, BASE, RD | evaddw TMP1, TISNIL, TISNIL // Synthesize LJ_TFALSE. | lwz INS, 0(PC) | evcmpltu TMP0, TMP1 | addi PC, PC, 4 if (op == BC_IST || op == BC_ISF) { | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | decode_RD4 TMP2, INS | add TMP2, TMP2, TMP3 if (op == BC_IST) { | isellt PC, TMP2, PC } else { | isellt PC, PC, TMP2 } } else { if (op == BC_ISTC) { | checkfail >1 } else { | checkok >1 } | addis PC, PC, -(BCBIAS_J*4 >> 16) | decode_RD4 TMP2, INS | evstddx TMP0, BASE, RA | add PC, PC, TMP2 |1: } | ins_next break; /* -- Unary ops --------------------------------------------------------- */ case BC_MOV: | // RA = dst*8, RD = src*8 | ins_next1 | evlddx TMP0, BASE, RD | evstddx TMP0, BASE, RA | ins_next2 break; case BC_NOT: | // RA = dst*8, RD = src*8 | ins_next1 | lwzx TMP0, BASE, RD | subfic TMP1, TMP0, LJ_TTRUE | adde TMP0, TMP0, TMP1 | stwx TMP0, BASE, RA | ins_next2 break; case BC_UNM: | // RA = dst*8, RD = src*8 | evlddx TMP0, BASE, RD | checknum TMP0 | checkfail ->vmeta_unm | efdneg TMP0, TMP0 | ins_next1 | evstddx TMP0, BASE, RA | ins_next2 break; case BC_LEN: | // RA = dst*8, RD = src*8 | evlddx CARG1, BASE, RD | checkstr CARG1 | checkfail >2 | lwz CRET1, STR:CARG1->len |1: | ins_next1 | efdcfsi TMP0, CRET1 | evstddx TMP0, BASE, RA | ins_next2 |2: | checktab CARG1 | checkfail ->vmeta_len #if LJ_52 | lwz TAB:TMP2, TAB:CARG1->metatable | cmplwi TAB:TMP2, 0 | bne >9 |3: #endif |->BC_LEN_Z: | bl extern lj_tab_len // (GCtab *t) | // Returns uint32_t (but less than 2^31). | b <1 #if LJ_52 |9: | lbz TMP0, TAB:TMP2->nomm | andi. TMP0, TMP0, 1<vmeta_len #endif break; /* -- Binary ops -------------------------------------------------------- */ |.macro ins_arithpre, t0, t1 | // RA = dst*8, RB = src1*8, RC = src2*8 | num_const*8 ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); ||switch (vk) { ||case 0: | evlddx t0, BASE, RB | checknum t0 | evlddx t1, KBASE, RC | checkfail ->vmeta_arith_vn || break; ||case 1: | evlddx t1, BASE, RB | checknum t1 | evlddx t0, KBASE, RC | checkfail ->vmeta_arith_nv || break; ||default: | evlddx t0, BASE, RB | evlddx t1, BASE, RC | evmergehi TMP2, t0, t1 | checknum TMP2 | checkanyfail ->vmeta_arith_vv || break; ||} |.endmacro | |.macro ins_arith, ins | ins_arithpre TMP0, TMP1 | ins_next1 | ins TMP0, TMP0, TMP1 | evstddx TMP0, BASE, RA | ins_next2 |.endmacro case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: | ins_arith efdadd break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: | ins_arith efdsub break; case BC_MULVN: case BC_MULNV: case BC_MULVV: | ins_arith efdmul break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: | ins_arith efddiv break; case BC_MODVN: | ins_arithpre RD, SAVE0 |->BC_MODVN_Z: | efddiv CARG2, RD, SAVE0 | bl ->vm_floor_efd // floor(b/c) | efdmul TMP0, CRET2, SAVE0 | ins_next1 | efdsub TMP0, RD, TMP0 // b - floor(b/c)*c | evstddx TMP0, BASE, RA | ins_next2 break; case BC_MODNV: case BC_MODVV: | ins_arithpre RD, SAVE0 | b ->BC_MODVN_Z // Avoid 3 copies. It's slow anyway. break; case BC_POW: | evlddx CARG2, BASE, RB | evlddx CARG4, BASE, RC | evmergehi CARG1, CARG4, CARG2 | checknum CARG1 | evmergehi CARG3, CARG4, CARG4 | checkanyfail ->vmeta_arith_vv | bl extern pow@plt | evmergelo CRET2, CRET1, CRET2 | evstddx CRET2, BASE, RA | ins_next break; case BC_CAT: | // RA = dst*8, RB = src_start*8, RC = src_end*8 | sub CARG3, RC, RB | stw BASE, L->base | add CARG2, BASE, RC | mr SAVE0, RB |->BC_CAT_Z: | stw PC, SAVE_PC | mr CARG1, L | srwi CARG3, CARG3, 3 | bl extern lj_meta_cat // (lua_State *L, TValue *top, int left) | // Returns NULL (finished) or TValue * (metamethod). | cmplwi CRET1, 0 | lwz BASE, L->base | bne ->vmeta_binop | evlddx TMP0, BASE, SAVE0 // Copy result from RB to RA. | evstddx TMP0, BASE, RA | ins_next break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: | // RA = dst*8, RD = str_const*8 (~) | ins_next1 | srwi TMP1, RD, 1 | subfic TMP1, TMP1, -4 | lwzx TMP0, KBASE, TMP1 // KBASE-4-str_const*4 | evmergelo TMP0, TISSTR, TMP0 | evstddx TMP0, BASE, RA | ins_next2 break; case BC_KCDATA: |.if FFI | // RA = dst*8, RD = cdata_const*8 (~) | ins_next1 | srwi TMP1, RD, 1 | subfic TMP1, TMP1, -4 | lwzx TMP0, KBASE, TMP1 // KBASE-4-cdata_const*4 | li TMP2, LJ_TCDATA | evmergelo TMP0, TMP2, TMP0 | evstddx TMP0, BASE, RA | ins_next2 |.endif break; case BC_KSHORT: | // RA = dst*8, RD = int16_literal*8 | srwi TMP1, RD, 3 | extsh TMP1, TMP1 | ins_next1 | efdcfsi TMP0, TMP1 | evstddx TMP0, BASE, RA | ins_next2 break; case BC_KNUM: | // RA = dst*8, RD = num_const*8 | evlddx TMP0, KBASE, RD | ins_next1 | evstddx TMP0, BASE, RA | ins_next2 break; case BC_KPRI: | // RA = dst*8, RD = primitive_type*8 (~) | srwi TMP1, RD, 3 | not TMP0, TMP1 | ins_next1 | stwx TMP0, BASE, RA | ins_next2 break; case BC_KNIL: | // RA = base*8, RD = end*8 | evstddx TISNIL, BASE, RA | addi RA, RA, 8 |1: | evstddx TISNIL, BASE, RA | cmpw RA, RD | addi RA, RA, 8 | blt <1 | ins_next_ break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: | // RA = dst*8, RD = uvnum*8 | ins_next1 | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RD, RD, 1 | addi RD, RD, offsetof(GCfuncL, uvptr) | lwzx UPVAL:RB, LFUNC:RB, RD | lwz TMP1, UPVAL:RB->v | evldd TMP0, 0(TMP1) | evstddx TMP0, BASE, RA | ins_next2 break; case BC_USETV: | // RA = uvnum*8, RD = src*8 | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RA, RA, 1 | addi RA, RA, offsetof(GCfuncL, uvptr) | evlddx TMP1, BASE, RD | lwzx UPVAL:RB, LFUNC:RB, RA | lbz TMP3, UPVAL:RB->marked | lwz CARG2, UPVAL:RB->v | andi. TMP3, TMP3, LJ_GC_BLACK // isblack(uv) | lbz TMP0, UPVAL:RB->closed | evmergehi TMP2, TMP1, TMP1 | evstdd TMP1, 0(CARG2) | cmplwi cr1, TMP0, 0 | cror 4*cr0+eq, 4*cr0+eq, 4*cr1+eq | subi TMP2, TMP2, (LJ_TISNUM+1) | bne >2 // Upvalue is closed and black? |1: | ins_next | |2: // Check if new value is collectable. | cmplwi TMP2, LJ_TISGCV - (LJ_TISNUM+1) | bge <1 // tvisgcv(v) | lbz TMP3, GCOBJ:TMP1->gch.marked | andi. TMP3, TMP3, LJ_GC_WHITES // iswhite(v) | la CARG1, GG_DISP2G(DISPATCH) | // Crossed a write barrier. Move the barrier forward. | beq <1 | bl extern lj_gc_barrieruv // (global_State *g, TValue *tv) | b <1 break; case BC_USETS: | // RA = uvnum*8, RD = str_const*8 (~) | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi TMP1, RD, 1 | srwi RA, RA, 1 | subfic TMP1, TMP1, -4 | addi RA, RA, offsetof(GCfuncL, uvptr) | lwzx STR:TMP1, KBASE, TMP1 // KBASE-4-str_const*4 | lwzx UPVAL:RB, LFUNC:RB, RA | evmergelo STR:TMP1, TISSTR, STR:TMP1 | lbz TMP3, UPVAL:RB->marked | lwz CARG2, UPVAL:RB->v | andi. TMP3, TMP3, LJ_GC_BLACK // isblack(uv) | lbz TMP3, STR:TMP1->marked | lbz TMP2, UPVAL:RB->closed | evstdd STR:TMP1, 0(CARG2) | bne >2 |1: | ins_next | |2: // Check if string is white and ensure upvalue is closed. | andi. TMP3, TMP3, LJ_GC_WHITES // iswhite(str) | cmplwi cr1, TMP2, 0 | cror 4*cr0+eq, 4*cr0+eq, 4*cr1+eq | la CARG1, GG_DISP2G(DISPATCH) | // Crossed a write barrier. Move the barrier forward. | beq <1 | bl extern lj_gc_barrieruv // (global_State *g, TValue *tv) | b <1 break; case BC_USETN: | // RA = uvnum*8, RD = num_const*8 | ins_next1 | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RA, RA, 1 | addi RA, RA, offsetof(GCfuncL, uvptr) | evlddx TMP0, KBASE, RD | lwzx UPVAL:RB, LFUNC:RB, RA | lwz TMP1, UPVAL:RB->v | evstdd TMP0, 0(TMP1) | ins_next2 break; case BC_USETP: | // RA = uvnum*8, RD = primitive_type*8 (~) | ins_next1 | lwz LFUNC:RB, FRAME_FUNC(BASE) | srwi RA, RA, 1 | addi RA, RA, offsetof(GCfuncL, uvptr) | srwi TMP0, RD, 3 | lwzx UPVAL:RB, LFUNC:RB, RA | not TMP0, TMP0 | lwz TMP1, UPVAL:RB->v | stw TMP0, 0(TMP1) | ins_next2 break; case BC_UCLO: | // RA = level*8, RD = target | lwz TMP1, L->openupval | branch_RD // Do this first since RD is not saved. | stw BASE, L->base | cmplwi TMP1, 0 | mr CARG1, L | beq >1 | add CARG2, BASE, RA | bl extern lj_func_closeuv // (lua_State *L, TValue *level) | lwz BASE, L->base |1: | ins_next break; case BC_FNEW: | // RA = dst*8, RD = proto_const*8 (~) (holding function prototype) | srwi TMP1, RD, 1 | stw BASE, L->base | subfic TMP1, TMP1, -4 | stw PC, SAVE_PC | lwzx CARG2, KBASE, TMP1 // KBASE-4-tab_const*4 | mr CARG1, L | lwz CARG3, FRAME_FUNC(BASE) | // (lua_State *L, GCproto *pt, GCfuncL *parent) | bl extern lj_func_newL_gc | // Returns GCfuncL *. | lwz BASE, L->base | evmergelo LFUNC:CRET1, TISFUNC, LFUNC:CRET1 | evstddx LFUNC:CRET1, BASE, RA | ins_next break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: case BC_TDUP: | // RA = dst*8, RD = (hbits|asize)*8 | tab_const*8 (~) | lwz TMP0, DISPATCH_GL(gc.total)(DISPATCH) | mr CARG1, L | lwz TMP1, DISPATCH_GL(gc.threshold)(DISPATCH) | stw BASE, L->base | cmplw TMP0, TMP1 | stw PC, SAVE_PC | bge >5 |1: if (op == BC_TNEW) { | rlwinm CARG2, RD, 29, 21, 31 | rlwinm CARG3, RD, 18, 27, 31 | cmpwi CARG2, 0x7ff | li TMP1, 0x801 | iseleq CARG2, TMP1, CARG2 | bl extern lj_tab_new // (lua_State *L, int32_t asize, uint32_t hbits) | // Returns Table *. } else { | srwi TMP1, RD, 1 | subfic TMP1, TMP1, -4 | lwzx CARG2, KBASE, TMP1 // KBASE-4-tab_const*4 | bl extern lj_tab_dup // (lua_State *L, Table *kt) | // Returns Table *. } | lwz BASE, L->base | evmergelo TAB:CRET1, TISTAB, TAB:CRET1 | evstddx TAB:CRET1, BASE, RA | ins_next |5: | mr SAVE0, RD | bl extern lj_gc_step_fixtop // (lua_State *L) | mr RD, SAVE0 | mr CARG1, L | b <1 break; case BC_GGET: | // RA = dst*8, RD = str_const*8 (~) case BC_GSET: | // RA = src*8, RD = str_const*8 (~) | lwz LFUNC:TMP2, FRAME_FUNC(BASE) | srwi TMP1, RD, 1 | lwz TAB:RB, LFUNC:TMP2->env | subfic TMP1, TMP1, -4 | lwzx STR:RC, KBASE, TMP1 // KBASE-4-str_const*4 if (op == BC_GGET) { | b ->BC_TGETS_Z } else { | b ->BC_TSETS_Z } break; case BC_TGETV: | // RA = dst*8, RB = table*8, RC = key*8 | evlddx TAB:RB, BASE, RB | evlddx RC, BASE, RC | checktab TAB:RB | checkfail ->vmeta_tgetv | checknum RC | checkfail >5 | // Convert number key to integer | efdctsi TMP2, RC | lwz TMP0, TAB:RB->asize | efdcfsi TMP1, TMP2 | cmplw cr0, TMP0, TMP2 | efdcmpeq cr1, RC, TMP1 | lwz TMP1, TAB:RB->array | crand 4*cr0+gt, 4*cr0+gt, 4*cr1+gt | slwi TMP2, TMP2, 3 | ble ->vmeta_tgetv // Integer key and in array part? | evlddx TMP1, TMP1, TMP2 | checknil TMP1 | checkok >2 |1: | evstddx TMP1, BASE, RA | ins_next | |2: // Check for __index if table value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <1 // No metatable: done. | lbz TMP0, TAB:TMP2->nomm | andi. TMP0, TMP0, 1<vmeta_tgetv | |5: | checkstr STR:RC // String key? | checkok ->BC_TGETS_Z | b ->vmeta_tgetv break; case BC_TGETS: | // RA = dst*8, RB = table*8, RC = str_const*8 (~) | evlddx TAB:RB, BASE, RB | srwi TMP1, RC, 1 | checktab TAB:RB | subfic TMP1, TMP1, -4 | lwzx STR:RC, KBASE, TMP1 // KBASE-4-str_const*4 | checkfail ->vmeta_tgets1 |->BC_TGETS_Z: | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = dst*8 | lwz TMP0, TAB:RB->hmask | lwz TMP1, STR:RC->hash | lwz NODE:TMP2, TAB:RB->node | evmergelo STR:RC, TISSTR, STR:RC | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | slwi TMP0, TMP1, 5 | slwi TMP1, TMP1, 3 | sub TMP1, TMP0, TMP1 | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) |1: | evldd TMP0, NODE:TMP2->key | evldd TMP1, NODE:TMP2->val | evcmpeq TMP0, STR:RC | checkanyfail >4 | checknil TMP1 | checkok >5 // Key found, but nil value? |3: | evstddx TMP1, BASE, RA | ins_next | |4: // Follow hash chain. | lwz NODE:TMP2, NODE:TMP2->next | cmplwi NODE:TMP2, 0 | bne <1 | // End of hash chain: key not found, nil result. | evmr TMP1, TISNIL | |5: // Check for __index if table value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <3 // No metatable: done. | lbz TMP0, TAB:TMP2->nomm | andi. TMP0, TMP0, 1<vmeta_tgets break; case BC_TGETB: | // RA = dst*8, RB = table*8, RC = index*8 | evlddx TAB:RB, BASE, RB | srwi TMP0, RC, 3 | checktab TAB:RB | checkfail ->vmeta_tgetb | lwz TMP1, TAB:RB->asize | lwz TMP2, TAB:RB->array | cmplw TMP0, TMP1 | bge ->vmeta_tgetb | evlddx TMP1, TMP2, RC | checknil TMP1 | checkok >5 |1: | ins_next1 | evstddx TMP1, BASE, RA | ins_next2 | |5: // Check for __index if table value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <1 // No metatable: done. | lbz TMP2, TAB:TMP2->nomm | andi. TMP2, TMP2, 1<vmeta_tgetb // Caveat: preserve TMP0! break; case BC_TSETV: | // RA = src*8, RB = table*8, RC = key*8 | evlddx TAB:RB, BASE, RB | evlddx RC, BASE, RC | checktab TAB:RB | checkfail ->vmeta_tsetv | checknum RC | checkfail >5 | // Convert number key to integer | efdctsi TMP2, RC | evlddx SAVE0, BASE, RA | lwz TMP0, TAB:RB->asize | efdcfsi TMP1, TMP2 | cmplw cr0, TMP0, TMP2 | efdcmpeq cr1, RC, TMP1 | lwz TMP1, TAB:RB->array | crand 4*cr0+gt, 4*cr0+gt, 4*cr1+gt | slwi TMP0, TMP2, 3 | ble ->vmeta_tsetv // Integer key and in array part? | lbz TMP3, TAB:RB->marked | evlddx TMP2, TMP1, TMP0 | checknil TMP2 | checkok >3 |1: | andi. TMP2, TMP3, LJ_GC_BLACK // isblack(table) | evstddx SAVE0, TMP1, TMP0 | bne >7 |2: | ins_next | |3: // Check for __newindex if previous value is nil. | lwz TAB:TMP2, TAB:RB->metatable | cmplwi TAB:TMP2, 0 | beq <1 // No metatable: done. | lbz TMP2, TAB:TMP2->nomm | andi. TMP2, TMP2, 1<vmeta_tsetv | |5: | checkstr STR:RC // String key? | checkok ->BC_TSETS_Z | b ->vmeta_tsetv | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0 | b <2 break; case BC_TSETS: | // RA = src*8, RB = table*8, RC = str_const*8 (~) | evlddx TAB:RB, BASE, RB | srwi TMP1, RC, 1 | checktab TAB:RB | subfic TMP1, TMP1, -4 | lwzx STR:RC, KBASE, TMP1 // KBASE-4-str_const*4 | checkfail ->vmeta_tsets1 |->BC_TSETS_Z: | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = src*8 | lwz TMP0, TAB:RB->hmask | lwz TMP1, STR:RC->hash | lwz NODE:TMP2, TAB:RB->node | evmergelo STR:RC, TISSTR, STR:RC | stb ZERO, TAB:RB->nomm // Clear metamethod cache. | and TMP1, TMP1, TMP0 // idx = str->hash & tab->hmask | evlddx SAVE0, BASE, RA | slwi TMP0, TMP1, 5 | slwi TMP1, TMP1, 3 | sub TMP1, TMP0, TMP1 | lbz TMP3, TAB:RB->marked | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) |1: | evldd TMP0, NODE:TMP2->key | evldd TMP1, NODE:TMP2->val | evcmpeq TMP0, STR:RC | checkanyfail >5 | checknil TMP1 | checkok >4 // Key found, but nil value? |2: | andi. TMP0, TMP3, LJ_GC_BLACK // isblack(table) | evstdd SAVE0, NODE:TMP2->val | bne >7 |3: | ins_next | |4: // Check for __newindex if previous value is nil. | lwz TAB:TMP1, TAB:RB->metatable | cmplwi TAB:TMP1, 0 | beq <2 // No metatable: done. | lbz TMP0, TAB:TMP1->nomm | andi. TMP0, TMP0, 1<vmeta_tsets | |5: // Follow hash chain. | lwz NODE:TMP2, NODE:TMP2->next | cmplwi NODE:TMP2, 0 | bne <1 | // End of hash chain: key not found, add a new one. | | // But check for __newindex first. | lwz TAB:TMP1, TAB:RB->metatable | la CARG3, DISPATCH_GL(tmptv)(DISPATCH) | stw PC, SAVE_PC | mr CARG1, L | cmplwi TAB:TMP1, 0 | stw BASE, L->base | beq >6 // No metatable: continue. | lbz TMP0, TAB:TMP1->nomm | andi. TMP0, TMP0, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. |6: | mr CARG2, TAB:RB | evstdd STR:RC, 0(CARG3) | bl extern lj_tab_newkey // (lua_State *L, GCtab *t, TValue *k) | // Returns TValue *. | lwz BASE, L->base | evstdd SAVE0, 0(CRET1) | b <3 // No 2nd write barrier needed. | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0 | b <3 break; case BC_TSETB: | // RA = src*8, RB = table*8, RC = index*8 | evlddx TAB:RB, BASE, RB | srwi TMP0, RC, 3 | checktab TAB:RB | checkfail ->vmeta_tsetb | lwz TMP1, TAB:RB->asize | lwz TMP2, TAB:RB->array | lbz TMP3, TAB:RB->marked | cmplw TMP0, TMP1 | evlddx SAVE0, BASE, RA | bge ->vmeta_tsetb | evlddx TMP1, TMP2, RC | checknil TMP1 | checkok >5 |1: | andi. TMP0, TMP3, LJ_GC_BLACK // isblack(table) | evstddx SAVE0, TMP2, RC | bne >7 |2: | ins_next | |5: // Check for __newindex if previous value is nil. | lwz TAB:TMP1, TAB:RB->metatable | cmplwi TAB:TMP1, 0 | beq <1 // No metatable: done. | lbz TMP1, TAB:TMP1->nomm | andi. TMP1, TMP1, 1<vmeta_tsetb // Caveat: preserve TMP0! | |7: // Possible table write barrier for the value. Skip valiswhite check. | barrierback TAB:RB, TMP3, TMP0 | b <2 break; case BC_TSETM: | // RA = base*8 (table at base-1), RD = num_const*8 (start index) | add RA, BASE, RA |1: | add TMP3, KBASE, RD | lwz TAB:CARG2, -4(RA) // Guaranteed to be a table. | addic. TMP0, MULTRES, -8 | lwz TMP3, 4(TMP3) // Integer constant is in lo-word. | srwi CARG3, TMP0, 3 | beq >4 // Nothing to copy? | add CARG3, CARG3, TMP3 | lwz TMP2, TAB:CARG2->asize | slwi TMP1, TMP3, 3 | lbz TMP3, TAB:CARG2->marked | cmplw CARG3, TMP2 | add TMP2, RA, TMP0 | lwz TMP0, TAB:CARG2->array | bgt >5 | add TMP1, TMP1, TMP0 | andi. TMP0, TMP3, LJ_GC_BLACK // isblack(table) |3: // Copy result slots to table. | evldd TMP0, 0(RA) | addi RA, RA, 8 | cmpw cr1, RA, TMP2 | evstdd TMP0, 0(TMP1) | addi TMP1, TMP1, 8 | blt cr1, <3 | bne >7 |4: | ins_next | |5: // Need to resize array part. | stw BASE, L->base | mr CARG1, L | stw PC, SAVE_PC | mr SAVE0, RD | bl extern lj_tab_reasize // (lua_State *L, GCtab *t, int nasize) | // Must not reallocate the stack. | mr RD, SAVE0 | b <1 | |7: // Possible table write barrier for any value. Skip valiswhite check. | barrierback TAB:CARG2, TMP3, TMP0 | b <4 break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALLM: | // RA = base*8, (RB = (nresults+1)*8,) RC = extra_nargs*8 | add NARGS8:RC, NARGS8:RC, MULTRES | // Fall through. Assumes BC_CALL follows. break; case BC_CALL: | // RA = base*8, (RB = (nresults+1)*8,) RC = (nargs+1)*8 | evlddx LFUNC:RB, BASE, RA | mr TMP2, BASE | add BASE, BASE, RA | subi NARGS8:RC, NARGS8:RC, 8 | checkfunc LFUNC:RB | addi BASE, BASE, 8 | checkfail ->vmeta_call | ins_call break; case BC_CALLMT: | // RA = base*8, (RB = 0,) RC = extra_nargs*8 | add NARGS8:RC, NARGS8:RC, MULTRES | // Fall through. Assumes BC_CALLT follows. break; case BC_CALLT: | // RA = base*8, (RB = 0,) RC = (nargs+1)*8 | evlddx LFUNC:RB, BASE, RA | add RA, BASE, RA | lwz TMP1, FRAME_PC(BASE) | subi NARGS8:RC, NARGS8:RC, 8 | checkfunc LFUNC:RB | addi RA, RA, 8 | checkfail ->vmeta_callt |->BC_CALLT_Z: | andi. TMP0, TMP1, FRAME_TYPE // Caveat: preserve cr0 until the crand. | lbz TMP3, LFUNC:RB->ffid | xori TMP2, TMP1, FRAME_VARG | cmplwi cr1, NARGS8:RC, 0 | bne >7 |1: | stw LFUNC:RB, FRAME_FUNC(BASE) // Copy function down, but keep PC. | li TMP2, 0 | cmplwi cr7, TMP3, 1 // (> FF_C) Calling a fast function? | beq cr1, >3 |2: | addi TMP3, TMP2, 8 | evlddx TMP0, RA, TMP2 | cmplw cr1, TMP3, NARGS8:RC | evstddx TMP0, BASE, TMP2 | mr TMP2, TMP3 | bne cr1, <2 |3: | crand 4*cr0+eq, 4*cr0+eq, 4*cr7+gt | beq >5 |4: | ins_callt | |5: // Tailcall to a fast function with a Lua frame below. | lwz INS, -4(TMP1) | decode_RA8 RA, INS | sub TMP1, BASE, RA | lwz LFUNC:TMP1, FRAME_FUNC-8(TMP1) | lwz TMP1, LFUNC:TMP1->pc | lwz KBASE, PC2PROTO(k)(TMP1) // Need to prepare KBASE. | b <4 | |7: // Tailcall from a vararg function. | andi. TMP0, TMP2, FRAME_TYPEP | bne <1 // Vararg frame below? | sub BASE, BASE, TMP2 // Relocate BASE down. | lwz TMP1, FRAME_PC(BASE) | andi. TMP0, TMP1, FRAME_TYPE | b <1 break; case BC_ITERC: | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 ((2+1)*8)) | subi RA, RA, 24 // evldd doesn't support neg. offsets. | mr TMP2, BASE | evlddx LFUNC:RB, BASE, RA | add BASE, BASE, RA | evldd TMP0, 8(BASE) | evldd TMP1, 16(BASE) | evstdd LFUNC:RB, 24(BASE) // Copy callable. | checkfunc LFUNC:RB | evstdd TMP0, 32(BASE) // Copy state. | li NARGS8:RC, 16 // Iterators get 2 arguments. | evstdd TMP1, 40(BASE) // Copy control var. | addi BASE, BASE, 32 | checkfail ->vmeta_call | ins_call break; case BC_ITERN: | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 (2+1)*8) |.if JIT | // NYI: add hotloop, record BC_ITERN. |.endif | add RA, BASE, RA | lwz TAB:RB, -12(RA) | lwz RC, -4(RA) // Get index from control var. | lwz TMP0, TAB:RB->asize | lwz TMP1, TAB:RB->array | addi PC, PC, 4 |1: // Traverse array part. | cmplw RC, TMP0 | slwi TMP3, RC, 3 | bge >5 // Index points after array part? | evlddx TMP2, TMP1, TMP3 | checknil TMP2 | lwz INS, -4(PC) | checkok >4 | efdcfsi TMP0, RC | addi RC, RC, 1 | addis TMP3, PC, -(BCBIAS_J*4 >> 16) | evstdd TMP2, 8(RA) | decode_RD4 TMP1, INS | stw RC, -4(RA) // Update control var. | add PC, TMP1, TMP3 | evstdd TMP0, 0(RA) |3: | ins_next | |4: // Skip holes in array part. | addi RC, RC, 1 | b <1 | |5: // Traverse hash part. | lwz TMP1, TAB:RB->hmask | sub RC, RC, TMP0 | lwz TMP2, TAB:RB->node |6: | cmplw RC, TMP1 // End of iteration? Branch to ITERL+1. | slwi TMP3, RC, 5 | bgt <3 | slwi RB, RC, 3 | sub TMP3, TMP3, RB | evlddx RB, TMP2, TMP3 | add NODE:TMP3, TMP2, TMP3 | checknil RB | lwz INS, -4(PC) | checkok >7 | evldd TMP3, NODE:TMP3->key | addis TMP2, PC, -(BCBIAS_J*4 >> 16) | evstdd RB, 8(RA) | add RC, RC, TMP0 | decode_RD4 TMP1, INS | evstdd TMP3, 0(RA) | addi RC, RC, 1 | add PC, TMP1, TMP2 | stw RC, -4(RA) // Update control var. | b <3 | |7: // Skip holes in hash part. | addi RC, RC, 1 | b <6 break; case BC_ISNEXT: | // RA = base*8, RD = target (points to ITERN) | add RA, BASE, RA | li TMP2, -24 | evlddx CFUNC:TMP1, RA, TMP2 | lwz TMP2, -16(RA) | lwz TMP3, -8(RA) | evmergehi TMP0, CFUNC:TMP1, CFUNC:TMP1 | cmpwi cr0, TMP2, LJ_TTAB | cmpwi cr1, TMP0, LJ_TFUNC | cmpwi cr6, TMP3, LJ_TNIL | bne cr1, >5 | lbz TMP1, CFUNC:TMP1->ffid | crand 4*cr0+eq, 4*cr0+eq, 4*cr6+eq | cmpwi cr7, TMP1, FF_next_N | srwi TMP0, RD, 1 | crand 4*cr0+eq, 4*cr0+eq, 4*cr7+eq | add TMP3, PC, TMP0 | bne cr0, >5 | lus TMP1, 0xfffe | ori TMP1, TMP1, 0x7fff | stw ZERO, -4(RA) // Initialize control var. | stw TMP1, -8(RA) | addis PC, TMP3, -(BCBIAS_J*4 >> 16) |1: | ins_next |5: // Despecialize bytecode if any of the checks fail. | li TMP0, BC_JMP | li TMP1, BC_ITERC | stb TMP0, -1(PC) | addis PC, TMP3, -(BCBIAS_J*4 >> 16) | stb TMP1, 3(PC) | b <1 break; case BC_VARG: | // RA = base*8, RB = (nresults+1)*8, RC = numparams*8 | lwz TMP0, FRAME_PC(BASE) | add RC, BASE, RC | add RA, BASE, RA | addi RC, RC, FRAME_VARG | add TMP2, RA, RB | subi TMP3, BASE, 8 // TMP3 = vtop | sub RC, RC, TMP0 // RC = vbase | // Note: RC may now be even _above_ BASE if nargs was < numparams. | cmplwi cr1, RB, 0 | sub. TMP1, TMP3, RC | beq cr1, >5 // Copy all varargs? | subi TMP2, TMP2, 16 | ble >2 // No vararg slots? |1: // Copy vararg slots to destination slots. | evldd TMP0, 0(RC) | addi RC, RC, 8 | evstdd TMP0, 0(RA) | cmplw RA, TMP2 | cmplw cr1, RC, TMP3 | bge >3 // All destination slots filled? | addi RA, RA, 8 | blt cr1, <1 // More vararg slots? |2: // Fill up remainder with nil. | evstdd TISNIL, 0(RA) | cmplw RA, TMP2 | addi RA, RA, 8 | blt <2 |3: | ins_next | |5: // Copy all varargs. | lwz TMP0, L->maxstack | li MULTRES, 8 // MULTRES = (0+1)*8 | ble <3 // No vararg slots? | add TMP2, RA, TMP1 | cmplw TMP2, TMP0 | addi MULTRES, TMP1, 8 | bgt >7 |6: | evldd TMP0, 0(RC) | addi RC, RC, 8 | evstdd TMP0, 0(RA) | cmplw RC, TMP3 | addi RA, RA, 8 | blt <6 // More vararg slots? | b <3 | |7: // Grow stack for varargs. | mr CARG1, L | stw RA, L->top | sub SAVE0, RC, BASE // Need delta, because BASE may change. | stw BASE, L->base | sub RA, RA, BASE | stw PC, SAVE_PC | srwi CARG2, TMP1, 3 | bl extern lj_state_growstack // (lua_State *L, int n) | lwz BASE, L->base | add RA, BASE, RA | add RC, BASE, SAVE0 | subi TMP3, BASE, 8 | b <6 break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: | // RA = results*8, RD = extra_nresults*8 | add RD, RD, MULTRES // MULTRES >= 8, so RD >= 8. | // Fall through. Assumes BC_RET follows. break; case BC_RET: | // RA = results*8, RD = (nresults+1)*8 | lwz PC, FRAME_PC(BASE) | add RA, BASE, RA | mr MULTRES, RD |1: | andi. TMP0, PC, FRAME_TYPE | xori TMP1, PC, FRAME_VARG | bne ->BC_RETV_Z | |->BC_RET_Z: | // BASE = base, RA = resultptr, RD = (nresults+1)*8, PC = return | lwz INS, -4(PC) | cmpwi RD, 8 | subi TMP2, BASE, 8 | subi RC, RD, 8 | decode_RB8 RB, INS | beq >3 | li TMP1, 0 |2: | addi TMP3, TMP1, 8 | evlddx TMP0, RA, TMP1 | cmpw TMP3, RC | evstddx TMP0, TMP2, TMP1 | beq >3 | addi TMP1, TMP3, 8 | evlddx TMP0, RA, TMP3 | cmpw TMP1, RC | evstddx TMP0, TMP2, TMP3 | bne <2 |3: |5: | cmplw RB, RD | decode_RA8 RA, INS | bgt >6 | sub BASE, TMP2, RA | lwz LFUNC:TMP1, FRAME_FUNC(BASE) | ins_next1 | lwz TMP1, LFUNC:TMP1->pc | lwz KBASE, PC2PROTO(k)(TMP1) | ins_next2 | |6: // Fill up results with nil. | subi TMP1, RD, 8 | addi RD, RD, 8 | evstddx TISNIL, TMP2, TMP1 | b <5 | |->BC_RETV_Z: // Non-standard return case. | andi. TMP2, TMP1, FRAME_TYPEP | bne ->vm_return | // Return from vararg function: relocate BASE down. | sub BASE, BASE, TMP1 | lwz PC, FRAME_PC(BASE) | b <1 break; case BC_RET0: case BC_RET1: | // RA = results*8, RD = (nresults+1)*8 | lwz PC, FRAME_PC(BASE) | add RA, BASE, RA | mr MULTRES, RD | andi. TMP0, PC, FRAME_TYPE | xori TMP1, PC, FRAME_VARG | bne ->BC_RETV_Z | | lwz INS, -4(PC) | subi TMP2, BASE, 8 | decode_RB8 RB, INS if (op == BC_RET1) { | evldd TMP0, 0(RA) | evstdd TMP0, 0(TMP2) } |5: | cmplw RB, RD | decode_RA8 RA, INS | bgt >6 | sub BASE, TMP2, RA | lwz LFUNC:TMP1, FRAME_FUNC(BASE) | ins_next1 | lwz TMP1, LFUNC:TMP1->pc | lwz KBASE, PC2PROTO(k)(TMP1) | ins_next2 | |6: // Fill up results with nil. | subi TMP1, RD, 8 | addi RD, RD, 8 | evstddx TISNIL, TMP2, TMP1 | b <5 break; /* -- Loops and branches ------------------------------------------------ */ case BC_FORL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IFORL follows. break; case BC_JFORI: case BC_JFORL: #if !LJ_HASJIT break; #endif case BC_FORI: case BC_IFORL: | // RA = base*8, RD = target (after end of loop or start of loop) vk = (op == BC_IFORL || op == BC_JFORL); | add RA, BASE, RA | evldd TMP1, FORL_IDX*8(RA) | evldd TMP3, FORL_STEP*8(RA) | evldd TMP2, FORL_STOP*8(RA) if (!vk) { | evcmpgtu cr0, TMP1, TISNUM | evcmpgtu cr7, TMP3, TISNUM | evcmpgtu cr1, TMP2, TISNUM | cror 4*cr0+lt, 4*cr0+lt, 4*cr7+lt | cror 4*cr0+lt, 4*cr0+lt, 4*cr1+lt | blt ->vmeta_for } if (vk) { | efdadd TMP1, TMP1, TMP3 | evstdd TMP1, FORL_IDX*8(RA) } | evcmpgts TMP3, TISNIL | evstdd TMP1, FORL_EXT*8(RA) | bge >2 | efdcmpgt TMP1, TMP2 |1: if (op != BC_JFORL) { | srwi RD, RD, 1 | add RD, PC, RD if (op == BC_JFORI) { | addis PC, RD, -(BCBIAS_J*4 >> 16) } else { | addis RD, RD, -(BCBIAS_J*4 >> 16) } } if (op == BC_FORI) { | iselgt PC, RD, PC } else if (op == BC_IFORL) { | iselgt PC, PC, RD } else { | ble =>BC_JLOOP } | ins_next |2: | efdcmpgt TMP2, TMP1 | b <1 break; case BC_ITERL: |.if JIT | hotloop |.endif | // Fall through. Assumes BC_IITERL follows. break; case BC_JITERL: #if !LJ_HASJIT break; #endif case BC_IITERL: | // RA = base*8, RD = target | evlddx TMP1, BASE, RA | subi RA, RA, 8 | checknil TMP1 | checkok >1 // Stop if iterator returned nil. if (op == BC_JITERL) { | NYI } else { | branch_RD // Otherwise save control var + branch. | evstddx TMP1, BASE, RA } |1: | ins_next break; case BC_LOOP: | // RA = base*8, RD = target (loop extent) | // Note: RA/RD is only used by trace recorder to determine scope/extent | // This opcode does NOT jump, it's only purpose is to detect a hot loop. |.if JIT | hotloop |.endif | // Fall through. Assumes BC_ILOOP follows. break; case BC_ILOOP: | // RA = base*8, RD = target (loop extent) | ins_next break; case BC_JLOOP: |.if JIT | NYI |.endif break; case BC_JMP: | // RA = base*8 (only used by trace recorder), RD = target | branch_RD | ins_next break; /* -- Function headers -------------------------------------------------- */ case BC_FUNCF: |.if JIT | hotcall |.endif case BC_FUNCV: /* NYI: compiled vararg functions. */ | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow. break; case BC_JFUNCF: #if !LJ_HASJIT break; #endif case BC_IFUNCF: | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 | lwz TMP2, L->maxstack | lbz TMP1, -4+PC2PROTO(numparams)(PC) | lwz KBASE, -4+PC2PROTO(k)(PC) | cmplw RA, TMP2 | slwi TMP1, TMP1, 3 | bgt ->vm_growstack_l | ins_next1 |2: | cmplw NARGS8:RC, TMP1 // Check for missing parameters. | ble >3 if (op == BC_JFUNCF) { | NYI } else { | ins_next2 } | |3: // Clear missing parameters. | evstddx TISNIL, BASE, NARGS8:RC | addi NARGS8:RC, NARGS8:RC, 8 | b <2 break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif | NYI // NYI: compiled vararg functions break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 | lwz TMP2, L->maxstack | add TMP1, BASE, RC | add TMP0, RA, RC | stw LFUNC:RB, 4(TMP1) // Store copy of LFUNC. | addi TMP3, RC, 8+FRAME_VARG | lwz KBASE, -4+PC2PROTO(k)(PC) | cmplw TMP0, TMP2 | stw TMP3, 0(TMP1) // Store delta + FRAME_VARG. | bge ->vm_growstack_l | lbz TMP2, -4+PC2PROTO(numparams)(PC) | mr RA, BASE | mr RC, TMP1 | ins_next1 | cmpwi TMP2, 0 | addi BASE, TMP1, 8 | beq >3 |1: | cmplw RA, RC // Less args than parameters? | evldd TMP0, 0(RA) | bge >4 | evstdd TISNIL, 0(RA) // Clear old fixarg slot (help the GC). | addi RA, RA, 8 |2: | addic. TMP2, TMP2, -1 | evstdd TMP0, 8(TMP1) | addi TMP1, TMP1, 8 | bne <1 |3: | ins_next2 | |4: // Clear missing parameters. | evmr TMP0, TISNIL | b <2 break; case BC_FUNCC: case BC_FUNCCW: | // BASE = new base, RA = BASE+framesize*8, RB = CFUNC, RC = nargs*8 if (op == BC_FUNCC) { | lwz TMP3, CFUNC:RB->f } else { | lwz TMP3, DISPATCH_GL(wrapf)(DISPATCH) } | add TMP1, RA, NARGS8:RC | lwz TMP2, L->maxstack | add RC, BASE, NARGS8:RC | stw BASE, L->base | cmplw TMP1, TMP2 | stw RC, L->top | li_vmstate C | mtctr TMP3 if (op == BC_FUNCCW) { | lwz CARG2, CFUNC:RB->f } | mr CARG1, L | bgt ->vm_growstack_c // Need to grow stack. | st_vmstate | bctrl // (lua_State *L [, lua_CFunction f]) | // Returns nresults. | lwz TMP1, L->top | slwi RD, CRET1, 3 | lwz BASE, L->base | li_vmstate INTERP | lwz PC, FRAME_PC(BASE) // Fetch PC of caller. | sub RA, TMP1, RD // RA = L->top - nresults*8 | st_vmstate | b ->vm_returnc break; /* ---------------------------------------------------------------------- */ default: fprintf(stderr, "Error: undefined opcode BC_%s\n", bc_names[op]); exit(2); break; } } static int build_backend(BuildCtx *ctx) { int op; dasm_growpc(Dst, BC__MAX); build_subroutines(ctx); |.code_op for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op); return BC__MAX; } /* Emit pseudo frame-info for all assembler functions. */ static void emit_asm_debug(BuildCtx *ctx) { int i; switch (ctx->mode) { case BUILD_elfasm: fprintf(ctx->fp, "\t.section .debug_frame,\"\",@progbits\n"); fprintf(ctx->fp, ".Lframe0:\n" "\t.long .LECIE0-.LSCIE0\n" ".LSCIE0:\n" "\t.long 0xffffffff\n" "\t.byte 0x1\n" "\t.string \"\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 65\n" "\t.byte 0xc\n\t.uleb128 1\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE0:\n\n"); fprintf(ctx->fp, ".LSFDE0:\n" "\t.long .LEFDE0-.LASFDE0\n" ".LASFDE0:\n" "\t.long .Lframe0\n" "\t.long .Lbegin\n" "\t.long %d\n" "\t.byte 0xe\n\t.uleb128 %d\n" "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n" "\t.byte 0x5\n\t.uleb128 70\n\t.sleb128 37\n", (int)ctx->codesz, CFRAME_SIZE); for (i = 14; i <= 31; i++) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n" "\t.byte 5\n\t.uleb128 %d\n\t.uleb128 %d\n", 0x80+i, 1+2*(31-i), 1200+i, 2+2*(31-i)); fprintf(ctx->fp, "\t.align 2\n" ".LEFDE0:\n\n"); fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); fprintf(ctx->fp, ".Lframe1:\n" "\t.long .LECIE1-.LSCIE1\n" ".LSCIE1:\n" "\t.long 0\n" "\t.byte 0x1\n" "\t.string \"zPR\"\n" "\t.uleb128 0x1\n" "\t.sleb128 -4\n" "\t.byte 65\n" "\t.uleb128 6\n" /* augmentation length */ "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.long lj_err_unwind_dwarf-.\n" "\t.byte 0x1b\n" /* pcrel|sdata4 */ "\t.byte 0xc\n\t.uleb128 1\n\t.uleb128 0\n" "\t.align 2\n" ".LECIE1:\n\n"); fprintf(ctx->fp, ".LSFDE1:\n" "\t.long .LEFDE1-.LASFDE1\n" ".LASFDE1:\n" "\t.long .LASFDE1-.Lframe1\n" "\t.long .Lbegin-.\n" "\t.long %d\n" "\t.uleb128 0\n" /* augmentation length */ "\t.byte 0xe\n\t.uleb128 %d\n" "\t.byte 0x11\n\t.uleb128 65\n\t.sleb128 -1\n" "\t.byte 0x5\n\t.uleb128 70\n\t.sleb128 37\n", (int)ctx->codesz, CFRAME_SIZE); for (i = 14; i <= 31; i++) fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n" "\t.byte 5\n\t.uleb128 %d\n\t.uleb128 %d\n", 0x80+i, 1+2*(31-i), 1200+i, 2+2*(31-i)); fprintf(ctx->fp, "\t.align 2\n" ".LEFDE1:\n\n"); break; default: break; } } tarantool-1.5.1.218.g1a69fd6/third_party/luajit/Makefile0000664000000000000000000001261212231715321021240 0ustar rootroot############################################################################## # LuaJIT top level Makefile for installation. Requires GNU Make. # # Please read doc/install.html before changing any variables! # # Suitable for POSIX platforms (Linux, *BSD, OSX etc.). # Note: src/Makefile has many more configurable options. # # ##### This Makefile is NOT useful for Windows! ##### # For MSVC, please follow the instructions given in src/msvcbuild.bat. # For MinGW and Cygwin, cd to src and run make with the Makefile there. # # Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h ############################################################################## MAJVER= 2 MINVER= 0 RELVER= 2 VERSION= $(MAJVER).$(MINVER).$(RELVER) ABIVER= 5.1 ############################################################################## # # Change the installation path as needed. This automatically adjusts # the paths in src/luaconf.h, too. Note: PREFIX must be an absolute path! # export PREFIX= /usr/local export MULTILIB= lib ############################################################################## DPREFIX= $(DESTDIR)$(PREFIX) INSTALL_BIN= $(DPREFIX)/bin INSTALL_LIB= $(DPREFIX)/$(MULTILIB) INSTALL_SHARE= $(DPREFIX)/share INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER) INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION) INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit INSTALL_LMODD= $(INSTALL_SHARE)/lua INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER) INSTALL_CMODD= $(INSTALL_LIB)/lua INSTALL_CMOD= $(INSTALL_CMODD)/$(ABIVER) INSTALL_MAN= $(INSTALL_SHARE)/man/man1 INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig INSTALL_TNAME= luajit-$(VERSION) INSTALL_TSYMNAME= luajit INSTALL_ANAME= libluajit-$(ABIVER).a INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER) INSTALL_SOSHORT= libluajit-$(ABIVER).so INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib INSTALL_PCNAME= luajit.pc INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME) INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME) INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT) INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT) INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME) INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME) INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME) INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \ $(INSTALL_PKGCONFIG) $(INSTALL_JITLIB) $(INSTALL_LMOD) $(INSTALL_CMOD) UNINSTALL_DIRS= $(INSTALL_JITLIB) $(INSTALL_LJLIBD) $(INSTALL_INC) \ $(INSTALL_LMOD) $(INSTALL_LMODD) $(INSTALL_CMOD) $(INSTALL_CMODD) RM= rm -f MKDIR= mkdir -p RMDIR= rmdir 2>/dev/null SYMLINK= ln -sf INSTALL_X= install -m 0755 INSTALL_F= install -m 0644 UNINSTALL= $(RM) LDCONFIG= ldconfig -n SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \ -e "s|^multilib=.*|multilib=$(MULTILIB)|" FILE_T= luajit FILE_A= libluajit.a FILE_SO= libluajit.so FILE_MAN= luajit.1 FILE_PC= luajit.pc FILES_INC= lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h FILES_JITLIB= bc.lua v.lua dump.lua dis_x86.lua dis_x64.lua dis_arm.lua \ dis_ppc.lua dis_mips.lua dis_mipsel.lua bcsave.lua vmdef.lua ifeq (,$(findstring Windows,$(OS))) ifeq (Darwin,$(shell uname -s)) INSTALL_SONAME= $(INSTALL_DYLIBNAME) INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_DYLIBSHORT1) INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_DYLIBSHORT2) LDCONFIG= : endif endif ############################################################################## INSTALL_DEP= src/luajit default all $(INSTALL_DEP): @echo "==== Building LuaJIT $(VERSION) ====" $(MAKE) -C src @echo "==== Successfully built LuaJIT $(VERSION) ====" install: $(INSTALL_DEP) @echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ====" $(MKDIR) $(INSTALL_DIRS) cd src && $(INSTALL_X) $(FILE_T) $(INSTALL_T) cd src && test -f $(FILE_A) && $(INSTALL_F) $(FILE_A) $(INSTALL_STATIC) || : $(RM) $(INSTALL_TSYM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) cd src && test -f $(FILE_SO) && \ $(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \ $(LDCONFIG) $(INSTALL_LIB) && \ $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \ $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || : cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN) cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \ $(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \ $(RM) $(FILE_PC).tmp cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC) cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB) $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM) @echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ====" uninstall: @echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ====" $(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC) for file in $(FILES_JITLIB); do \ $(UNINSTALL) $(INSTALL_JITLIB)/$$file; \ done for file in $(FILES_INC); do \ $(UNINSTALL) $(INSTALL_INC)/$$file; \ done $(LDCONFIG) $(INSTALL_LIB) $(RMDIR) $(UNINSTALL_DIRS) || : @echo "==== Successfully uninstalled LuaJIT $(VERSION) from $(PREFIX) ====" ############################################################################## amalg: @echo "Building LuaJIT $(VERSION)" $(MAKE) -C src amalg clean: $(MAKE) -C src clean .PHONY: all install amalg clean ############################################################################## tarantool-1.5.1.218.g1a69fd6/third_party/luajit/README0000664000000000000000000000067112202141143020453 0ustar rootrootREADME for LuaJIT 2.0.2 ----------------------- LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. Project Homepage: http://luajit.org/ LuaJIT is Copyright (C) 2005-2013 Mike Pall. LuaJIT is free software, released under the MIT license. See full Copyright Notice in the COPYRIGHT file or in luajit.h. Documentation for LuaJIT is available in HTML format. Please point your favorite browser to: doc/luajit.html tarantool-1.5.1.218.g1a69fd6/third_party/compat/0000775000000000000000000000000012202131537017570 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/compat/sys/0000775000000000000000000000000012202131537020406 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/compat/sys/cpuid.h0000664000000000000000000001277012202131537021672 0ustar rootroot/* * Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. * * This file is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3, or (at your option) any * later version. * * This file is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * Under Section 7 of GPL version 3, you are granted additional * permissions described in the GCC Runtime Library Exception, version * 3.1, as published by the Free Software Foundation. * * You should have received a copy of the GNU General Public License and * a copy of the GCC Runtime Library Exception along with this program; * see the files COPYING3 and COPYING.RUNTIME respectively. If not, see * . */ /* %ecx */ #define bit_SSE3 (1 << 0) #define bit_PCLMUL (1 << 1) #define bit_SSSE3 (1 << 9) #define bit_FMA (1 << 12) #define bit_CMPXCHG16B (1 << 13) #define bit_SSE4_1 (1 << 19) #define bit_SSE4_2 (1 << 20) #define bit_MOVBE (1 << 22) #define bit_POPCNT (1 << 23) #define bit_AES (1 << 25) #define bit_XSAVE (1 << 26) #define bit_OSXSAVE (1 << 27) #define bit_AVX (1 << 28) #define bit_F16C (1 << 29) #define bit_RDRND (1 << 30) /* %edx */ #define bit_CMPXCHG8B (1 << 8) #define bit_CMOV (1 << 15) #define bit_MMX (1 << 23) #define bit_FXSAVE (1 << 24) #define bit_SSE (1 << 25) #define bit_SSE2 (1 << 26) /* Extended Features */ /* %ecx */ #define bit_LAHF_LM (1 << 0) #define bit_ABM (1 << 5) #define bit_SSE4a (1 << 6) #define bit_XOP (1 << 11) #define bit_LWP (1 << 15) #define bit_FMA4 (1 << 16) #define bit_TBM (1 << 21) /* %edx */ #define bit_MMXEXT (1 << 22) #define bit_LM (1 << 29) #define bit_3DNOWP (1 << 30) #define bit_3DNOW (1 << 31) /* Extended Features (%eax == 7) */ #define bit_FSGSBASE (1 << 0) #define bit_BMI (1 << 3) #if defined(__i386__) && defined(__PIC__) /* %ebx may be the PIC register. */ #if __GNUC__ >= 3 #define __cpuid(level, a, b, c, d) \ __asm__ ("xchg{l}\t{%%}ebx, %1\n\t" \ "cpuid\n\t" \ "xchg{l}\t{%%}ebx, %1\n\t" \ : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ : "0" (level)) #define __cpuid_count(level, count, a, b, c, d) \ __asm__ ("xchg{l}\t{%%}ebx, %1\n\t" \ "cpuid\n\t" \ "xchg{l}\t{%%}ebx, %1\n\t" \ : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count)) #else /* Host GCCs older than 3.0 weren't supporting Intel asm syntax nor alternatives in i386 code. */ #define __cpuid(level, a, b, c, d) \ __asm__ ("xchgl\t%%ebx, %1\n\t" \ "cpuid\n\t" \ "xchgl\t%%ebx, %1\n\t" \ : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ : "0" (level)) #define __cpuid_count(level, count, a, b, c, d) \ __asm__ ("xchgl\t%%ebx, %1\n\t" \ "cpuid\n\t" \ "xchgl\t%%ebx, %1\n\t" \ : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count)) #endif #else #define __cpuid(level, a, b, c, d) \ __asm__ ("cpuid\n\t" \ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level)) #define __cpuid_count(level, count, a, b, c, d) \ __asm__ ("cpuid\n\t" \ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count)) #endif /* Return highest supported input value for cpuid instruction. ext can be either 0x0 or 0x8000000 to return highest supported value for basic or extended cpuid information. Function returns 0 if cpuid is not supported or whatever cpuid returns in eax register. If sig pointer is non-null, then first four bytes of the signature (as found in ebx register) are returned in location pointed by sig. */ static __inline unsigned int __get_cpuid_max (unsigned int __ext, unsigned int *__sig) { unsigned int __eax, __ebx, __ecx, __edx; #ifndef __x86_64__ /* See if we can use cpuid. On AMD64 we always can. */ #if __GNUC__ >= 3 __asm__ ("pushf{l|d}\n\t" "pushf{l|d}\n\t" "pop{l}\t%0\n\t" "mov{l}\t{%0, %1|%1, %0}\n\t" "xor{l}\t{%2, %0|%0, %2}\n\t" "push{l}\t%0\n\t" "popf{l|d}\n\t" "pushf{l|d}\n\t" "pop{l}\t%0\n\t" "popf{l|d}\n\t" : "=&r" (__eax), "=&r" (__ebx) : "i" (0x00200000)); #else /* Host GCCs older than 3.0 weren't supporting Intel asm syntax nor alternatives in i386 code. */ __asm__ ("pushfl\n\t" "pushfl\n\t" "popl\t%0\n\t" "movl\t%0, %1\n\t" "xorl\t%2, %0\n\t" "pushl\t%0\n\t" "popfl\n\t" "pushfl\n\t" "popl\t%0\n\t" "popfl\n\t" : "=&r" (__eax), "=&r" (__ebx) : "i" (0x00200000)); #endif if (!((__eax ^ __ebx) & 0x00200000)) return 0; #endif /* Host supports cpuid. Return highest supported cpuid input value. */ __cpuid (__ext, __eax, __ebx, __ecx, __edx); if (__sig) *__sig = __ebx; return __eax; } /* Return cpuid data for requested cpuid level, as found in returned eax, ebx, ecx and edx registers. The function checks if cpuid is supported and returns 1 for valid cpuid information or 0 for unsupported cpuid level. All pointers are required to be non-null. */ static __inline int __get_cpuid (unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) { unsigned int __ext = __level & 0x80000000; if (__get_cpuid_max (__ext, 0) < __level) return 0; __cpuid (__level, *__eax, *__ebx, *__ecx, *__edx); return 1; } tarantool-1.5.1.218.g1a69fd6/third_party/compat/sys/bsd_time.h0000664000000000000000000001035012202131537022344 0ustar rootroot/* $OpenBSD: time.h,v 1.11 2000/10/10 13:36:48 itojun Exp $ */ /* $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)time.h 8.2 (Berkeley) 7/10/94 */ #ifndef _SYS_TTL_COMPAT_TIME_H_ #define _SYS_TTL_COMPAT_TIME_H_ #include #ifndef TIMEVAL_TO_TIMESPEC #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } #endif #ifndef TIMESPEC_TO_TIMEVAL #define TIMESPEC_TO_TIMEVAL(tv, ts) { \ (tv)->tv_sec = (ts)->tv_sec; \ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ } #endif /** * Enable BSD timer macros for non-BSD code. */ #if !defined(__BSD) && !defined(__USE_BSD) /* Operations on timevals. */ #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #define timeradd(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ if ((vvp)->tv_usec >= 1000000) { \ (vvp)->tv_sec++; \ (vvp)->tv_usec -= 1000000; \ } \ } while (0) #define timersub(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ if ((vvp)->tv_usec < 0) { \ (vvp)->tv_sec--; \ (vvp)->tv_usec += 1000000; \ } \ } while (0) #endif /* !defined(__BSD) && !defined(__USE_BSD) */ /* Operations on timespecs. Include if missing (one API-call check should suffice). */ #if !defined(timespecclear) #define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0 #define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec) #define timespeccmp(tsp, usp, cmp) \ (((tsp)->tv_sec == (usp)->tv_sec) ? \ ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \ ((tsp)->tv_sec cmp (usp)->tv_sec)) #define timespecadd(tsp, usp, vsp) \ do { \ (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ if ((vsp)->tv_nsec >= 1000000000L) { \ (vsp)->tv_sec++; \ (vsp)->tv_nsec -= 1000000000L; \ } \ } while (0) #define timespecsub(tsp, usp, vsp) \ do { \ (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ if ((vsp)->tv_nsec < 0) { \ (vsp)->tv_sec--; \ (vsp)->tv_nsec += 1000000000L; \ } \ } while (0) #endif /* !defined(timespecclear) */ /* --- stuff got cut here - kostja, niels --- */ #endif /* !_SYS_TTL_COMPAT_TIME_H_ */ tarantool-1.5.1.218.g1a69fd6/third_party/compat/unwind.h0000664000000000000000000002161012202131537021245 0ustar rootroot/* Exception handling and frame unwind runtime interface routines. Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, if you include this header file into source files compiled by GCC, this header file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* This is derived from the C++ ABI for IA-64. Where we diverge for cross-architecture compatibility are noted with "@@@". */ #ifndef _UNWIND_H #define _UNWIND_H #ifndef HIDE_EXPORTS #pragma GCC visibility push(default) #endif #ifdef __cplusplus extern "C" { #endif /* Level 1: Base ABI */ /* @@@ The IA-64 ABI uses uint64 throughout. Most places this is inefficient for 32-bit and smaller machines. */ typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); #if defined(__ia64__) && defined(__hpux__) typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__))); #else typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); #endif typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); /* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and consumer of an exception. We'll go along with this for now even on 32-bit machines. We'll need to provide some other option for 16-bit machines and for machines with > 8 bits per byte. */ typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); /* The unwind interface uses reason codes in several contexts to identify the reasons for failures or other actions. */ typedef enum { _URC_NO_REASON = 0, _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_FATAL_PHASE2_ERROR = 2, _URC_FATAL_PHASE1_ERROR = 3, _URC_NORMAL_STOP = 4, _URC_END_OF_STACK = 5, _URC_HANDLER_FOUND = 6, _URC_INSTALL_CONTEXT = 7, _URC_CONTINUE_UNWIND = 8 } _Unwind_Reason_Code; /* The unwind interface uses a pointer to an exception header object as its representation of an exception being thrown. In general, the full representation of an exception object is language- and implementation-specific, but it will be prefixed by a header understood by the unwind interface. */ struct _Unwind_Exception; typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, struct _Unwind_Exception *); struct _Unwind_Exception { _Unwind_Exception_Class exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; _Unwind_Word private_1; _Unwind_Word private_2; /* @@@ The IA-64 ABI says that this structure must be double-word aligned. Taking that literally does not make much sense generically. Instead we provide the maximum alignment required by any type for the machine. */ } __attribute__((__aligned__)); /* The ACTIONS argument to the personality routine is a bitwise OR of one or more of the following constants. */ typedef int _Unwind_Action; #define _UA_SEARCH_PHASE 1 #define _UA_CLEANUP_PHASE 2 #define _UA_HANDLER_FRAME 4 #define _UA_FORCE_UNWIND 8 #define _UA_END_OF_STACK 16 /* This is an opaque type used to refer to a system-specific data structure used by the system unwinder. This context is created and destroyed by the system, and passed to the personality routine during unwinding. */ struct _Unwind_Context; /* Raise an exception, passing along the given exception object. */ extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); /* Raise an exception for forced unwinding. */ typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *, void *); extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); /* Helper to invoke the exception_cleanup routine. */ extern void _Unwind_DeleteException (struct _Unwind_Exception *); /* Resume propagation of an existing exception. This is used after e.g. executing cleanup code, and not to implement rethrowing. */ extern void _Unwind_Resume (struct _Unwind_Exception *); /* @@@ Resume propagation of an FORCE_UNWIND exception, or to rethrow a normal exception that was handled. */ extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *); /* @@@ Use unwind data to perform a stack backtrace. The trace callback is called for every stack frame in the call chain, but no cleanup actions are performed. */ typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (struct _Unwind_Context *, void *); extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *); /* These functions are used for communicating information about the unwind context (i.e. the unwind descriptors and the user register state) between the unwind library and the personality routine and landing pad. Only selected registers maybe manipulated. */ extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int); extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word); extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr); /* @@@ Retrieve the CFA of the given context. */ extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *); extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *); extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *); /* The personality routine is the function in the C++ (or other language) runtime library which serves as an interface between the system unwind library and language-specific exception handling semantics. It is specific to the code fragment described by an unwind info block, and it is always referenced via the pointer in the unwind info block, and hence it has no ABI-specified name. Note that this implies that two different C++ implementations can use different names, and have different contents in the language specific data area. Moreover, that the language specific data area contains no version info because name of the function invoked provides more effective versioning by detecting at link time the lack of code to handle the different data format. */ typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); /* @@@ The following alternate entry points are for setjmp/longjmp based unwinding. */ struct SjLj_Function_Context; extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *); extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *); extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct _Unwind_Exception *); /* @@@ The following provide access to the base addresses for text and data-relative addressing in the LDSA. In order to stay link compatible with the standard ABI for IA-64, we inline these. */ #ifdef __ia64__ #include static inline _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *_C) { /* The GP is stored in R1. */ return _Unwind_GetGR (_C, 1); } static inline _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *_C __attribute__ ((__unused__))) { abort (); return 0; } /* @@@ Retrieve the Backing Store Pointer of the given context. */ extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *); #else extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *); extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *); #endif /* @@@ Given an address, return the entry point of the function that contains it. */ extern void * _Unwind_FindEnclosingFunction (void *pc); #ifdef __cplusplus } #endif #ifndef HIDE_EXPORTS #pragma GCC visibility pop #endif #endif /* unwind.h */ tarantool-1.5.1.218.g1a69fd6/third_party/PMurHash.h0000664000000000000000000000367612202131537020161 0ustar rootroot/*----------------------------------------------------------------------------- * MurmurHash3 was written by Austin Appleby, and is placed in the public * domain. * * This implementation was written by Shane Day, and is also public domain. * * This is a portable ANSI C implementation of MurmurHash3_x86_32 (Murmur3A) * with support for progressive processing. */ /* ------------------------------------------------------------------------- */ /* Determine what native type to use for uint32_t */ /* We can't use the name 'uint32_t' here because it will conflict with * any version provided by the system headers or application. */ /* First look for special cases */ #if defined(_MSC_VER) #define MH_UINT32 unsigned long #endif /* If the compiler says it's C99 then take its word for it */ #if !defined(MH_UINT32) && ( \ defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) #include #define MH_UINT32 uint32_t #endif /* Otherwise try testing against max value macros from limit.h */ #if !defined(MH_UINT32) #include #if (USHRT_MAX == 0xffffffffUL) #define MH_UINT32 unsigned short #elif (UINT_MAX == 0xffffffffUL) #define MH_UINT32 unsigned int #elif (ULONG_MAX == 0xffffffffUL) #define MH_UINT32 unsigned long #endif #endif #if !defined(MH_UINT32) #error Unable to determine type name for unsigned 32-bit int #endif /* I'm yet to work on a platform where 'unsigned char' is not 8 bits */ #define MH_UINT8 unsigned char /* ------------------------------------------------------------------------- */ /* Prototypes */ #ifdef __cplusplus extern "C" { #endif void PMurHash32_Process(MH_UINT32 *ph1, MH_UINT32 *pcarry, const void *key, int len); MH_UINT32 PMurHash32_Result(MH_UINT32 h1, MH_UINT32 carry, MH_UINT32 total_length); MH_UINT32 PMurHash32(MH_UINT32 seed, const void *key, int len); void PMurHash32_test(const void *key, int len, MH_UINT32 seed, void *out); #ifdef __cplusplus } #endif tarantool-1.5.1.218.g1a69fd6/third_party/crc32.h0000664000000000000000000000031612202131537017372 0ustar rootroot#ifndef __BSD_CRC32_H_ #define __BSD_CRC32_H_ #include uint32_t crc32(const void *buf, size_t size); uint32_t crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length); #endif tarantool-1.5.1.218.g1a69fd6/third_party/crc32.c0000664000000000000000000012347012202131537017374 0ustar rootroot/*- * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or * code or tables extracted from it, as desired without restriction. */ /* * First, the polynomial itself and its table of feedback terms. The * polynomial is * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 * * Note that we take it "backwards" and put the highest-order term in * the lowest-order bit. The X^32 term is "implied"; the LSB is the * X^31 term, etc. The X^0 term (usually shown as "+1") results in * the MSB being 1 * * Note that the usual hardware shift register implementation, which * is what we're using (we're merely optimizing it by doing eight-bit * chunks at a time) shifts bits into the lowest-order term. In our * implementation, that means shifting towards the right. Why do we * do it this way? Because the calculated CRC must be transmitted in * order from highest-order term to lowest-order term. UARTs transmit * characters in order from LSB to MSB. By storing the CRC this way * we hand it to the UART in the order low-byte to high-byte; the UART * sends each low-bit to hight-bit; and the result is transmission bit * by bit from highest- to lowest-order term without requiring any bit * shuffling on our part. Reception works similarly * * The feedback terms table consists of 256, 32-bit entries. Notes * * The table can be generated at runtime if desired; code to do so * is shown later. It might not be obvious, but the feedback * terms simply represent the results of eight shift/xor opera * tions for all combinations of data and CRC register values * * The values must be right-shifted by eight bits by the "updcrc * logic; the shift must be unsigned (bring in zeroes). On some * hardware you could probably optimize the shift in assembler by * using byte-swap instructions * polynomial $edb88320 * * * CRC32 code derived from work by Gary S. Brown. */ #include #include uint32_t crc32_table[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; uint32_t crc32(const void *buf, size_t size) { const uint8_t *p = buf; uint32_t crc; crc = ~0U; while (size--) crc = crc32_table[(crc ^ *p++) & 0xFF] ^ (crc >> 8); return crc ^ ~0U; } /* CRC32C routines, these use a different polynomial */ /*****************************************************************/ /* */ /* CRC LOOKUP TABLE */ /* ================ */ /* The following CRC lookup table was generated automagically */ /* by the Rocksoft^tm Model CRC Algorithm Table Generation */ /* Program V1.0 using the following model parameters: */ /* */ /* Width : 4 bytes. */ /* Poly : 0x1EDC6F41L */ /* Reverse : TRUE. */ /* */ /* For more information on the Rocksoft^tm Model CRC Algorithm, */ /* see the document titled "A Painless Guide to CRC Error */ /* Detection Algorithms" by Ross Williams */ /* (ross@guest.adelaide.edu.au.). This document is likely to be */ /* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */ /* */ /*****************************************************************/ static uint32_t crc32c_table[256] = { 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL, 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L, 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL, 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L, 0x9A879FA0L, 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L, 0x5D1D08BFL, 0xAF768BBCL, 0xBC267848L, 0x4E4DFB4BL, 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L, 0x33ED7D2AL, 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L, 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L, 0x6DFE410EL, 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL, 0x30E349B1L, 0xC288CAB2L, 0xD1D83946L, 0x23B3BA45L, 0xF779DEAEL, 0x05125DADL, 0x1642AE59L, 0xE4292D5AL, 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL, 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L, 0x417B1DBCL, 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L, 0x86E18AA3L, 0x748A09A0L, 0x67DAFA54L, 0x95B17957L, 0xCBA24573L, 0x39C9C670L, 0x2A993584L, 0xD8F2B687L, 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L, 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L, 0x96BF4DCCL, 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L, 0xDBFC821CL, 0x2997011FL, 0x3AC7F2EBL, 0xC8AC71E8L, 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L, 0x0F36E6F7L, 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L, 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L, 0xEB1FCBADL, 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L, 0x2C855CB2L, 0xDEEEDFB1L, 0xCDBE2C45L, 0x3FD5AF46L, 0x7198540DL, 0x83F3D70EL, 0x90A324FAL, 0x62C8A7F9L, 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L, 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L, 0x3CDB9BDDL, 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L, 0x82F63B78L, 0x709DB87BL, 0x63CD4B8FL, 0x91A6C88CL, 0x456CAC67L, 0xB7072F64L, 0xA457DC90L, 0x563C5F93L, 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L, 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL, 0x92A8FC17L, 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L, 0x55326B08L, 0xA759E80BL, 0xB4091BFFL, 0x466298FCL, 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL, 0x0B21572CL, 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L, 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L, 0x65D122B9L, 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL, 0x2892ED69L, 0xDAF96E6AL, 0xC9A99D9EL, 0x3BC21E9DL, 0xEF087A76L, 0x1D63F975L, 0x0E330A81L, 0xFC588982L, 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL, 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L, 0x38CC2A06L, 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L, 0xFF56BD19L, 0x0D3D3E1AL, 0x1E6DCDEEL, 0xEC064EEDL, 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L, 0xD0DDD530L, 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL, 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL, 0x8ECEE914L, 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L, 0xD3D3E1ABL, 0x21B862A8L, 0x32E8915CL, 0xC083125FL, 0x144976B4L, 0xE622F5B7L, 0xF5720643L, 0x07198540L, 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L, 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL, 0xE330A81AL, 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL, 0x24AA3F05L, 0xD6C1BC06L, 0xC5914FF2L, 0x37FACCF1L, 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L, 0x7AB90321L, 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL, 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L, 0x34F4F86AL, 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL, 0x79B737BAL, 0x8BDCB4B9L, 0x988C474DL, 0x6AE7C44EL, 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L, 0xAD7D5351L }; static uint32_t singletable_crc32c(uint32_t crc, const void *buf, size_t size) { const uint8_t *p = buf; while (size--) crc = crc32c_table[(crc ^ *p++) & 0xff] ^ (crc >> 8); return crc; } /* * Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved * * * This software program is licensed subject to the BSD License, available at * http://www.opensource.org/licenses/bsd-license.html. * * Abstract: * * Tables for software CRC generation */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o32[256] = { 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 }; /* * end of the CRC lookup table crc_tableil8_o32 */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o40[256] = { 0x00000000, 0x13A29877, 0x274530EE, 0x34E7A899, 0x4E8A61DC, 0x5D28F9AB, 0x69CF5132, 0x7A6DC945, 0x9D14C3B8, 0x8EB65BCF, 0xBA51F356, 0xA9F36B21, 0xD39EA264, 0xC03C3A13, 0xF4DB928A, 0xE7790AFD, 0x3FC5F181, 0x2C6769F6, 0x1880C16F, 0x0B225918, 0x714F905D, 0x62ED082A, 0x560AA0B3, 0x45A838C4, 0xA2D13239, 0xB173AA4E, 0x859402D7, 0x96369AA0, 0xEC5B53E5, 0xFFF9CB92, 0xCB1E630B, 0xD8BCFB7C, 0x7F8BE302, 0x6C297B75, 0x58CED3EC, 0x4B6C4B9B, 0x310182DE, 0x22A31AA9, 0x1644B230, 0x05E62A47, 0xE29F20BA, 0xF13DB8CD, 0xC5DA1054, 0xD6788823, 0xAC154166, 0xBFB7D911, 0x8B507188, 0x98F2E9FF, 0x404E1283, 0x53EC8AF4, 0x670B226D, 0x74A9BA1A, 0x0EC4735F, 0x1D66EB28, 0x298143B1, 0x3A23DBC6, 0xDD5AD13B, 0xCEF8494C, 0xFA1FE1D5, 0xE9BD79A2, 0x93D0B0E7, 0x80722890, 0xB4958009, 0xA737187E, 0xFF17C604, 0xECB55E73, 0xD852F6EA, 0xCBF06E9D, 0xB19DA7D8, 0xA23F3FAF, 0x96D89736, 0x857A0F41, 0x620305BC, 0x71A19DCB, 0x45463552, 0x56E4AD25, 0x2C896460, 0x3F2BFC17, 0x0BCC548E, 0x186ECCF9, 0xC0D23785, 0xD370AFF2, 0xE797076B, 0xF4359F1C, 0x8E585659, 0x9DFACE2E, 0xA91D66B7, 0xBABFFEC0, 0x5DC6F43D, 0x4E646C4A, 0x7A83C4D3, 0x69215CA4, 0x134C95E1, 0x00EE0D96, 0x3409A50F, 0x27AB3D78, 0x809C2506, 0x933EBD71, 0xA7D915E8, 0xB47B8D9F, 0xCE1644DA, 0xDDB4DCAD, 0xE9537434, 0xFAF1EC43, 0x1D88E6BE, 0x0E2A7EC9, 0x3ACDD650, 0x296F4E27, 0x53028762, 0x40A01F15, 0x7447B78C, 0x67E52FFB, 0xBF59D487, 0xACFB4CF0, 0x981CE469, 0x8BBE7C1E, 0xF1D3B55B, 0xE2712D2C, 0xD69685B5, 0xC5341DC2, 0x224D173F, 0x31EF8F48, 0x050827D1, 0x16AABFA6, 0x6CC776E3, 0x7F65EE94, 0x4B82460D, 0x5820DE7A, 0xFBC3FAF9, 0xE861628E, 0xDC86CA17, 0xCF245260, 0xB5499B25, 0xA6EB0352, 0x920CABCB, 0x81AE33BC, 0x66D73941, 0x7575A136, 0x419209AF, 0x523091D8, 0x285D589D, 0x3BFFC0EA, 0x0F186873, 0x1CBAF004, 0xC4060B78, 0xD7A4930F, 0xE3433B96, 0xF0E1A3E1, 0x8A8C6AA4, 0x992EF2D3, 0xADC95A4A, 0xBE6BC23D, 0x5912C8C0, 0x4AB050B7, 0x7E57F82E, 0x6DF56059, 0x1798A91C, 0x043A316B, 0x30DD99F2, 0x237F0185, 0x844819FB, 0x97EA818C, 0xA30D2915, 0xB0AFB162, 0xCAC27827, 0xD960E050, 0xED8748C9, 0xFE25D0BE, 0x195CDA43, 0x0AFE4234, 0x3E19EAAD, 0x2DBB72DA, 0x57D6BB9F, 0x447423E8, 0x70938B71, 0x63311306, 0xBB8DE87A, 0xA82F700D, 0x9CC8D894, 0x8F6A40E3, 0xF50789A6, 0xE6A511D1, 0xD242B948, 0xC1E0213F, 0x26992BC2, 0x353BB3B5, 0x01DC1B2C, 0x127E835B, 0x68134A1E, 0x7BB1D269, 0x4F567AF0, 0x5CF4E287, 0x04D43CFD, 0x1776A48A, 0x23910C13, 0x30339464, 0x4A5E5D21, 0x59FCC556, 0x6D1B6DCF, 0x7EB9F5B8, 0x99C0FF45, 0x8A626732, 0xBE85CFAB, 0xAD2757DC, 0xD74A9E99, 0xC4E806EE, 0xF00FAE77, 0xE3AD3600, 0x3B11CD7C, 0x28B3550B, 0x1C54FD92, 0x0FF665E5, 0x759BACA0, 0x663934D7, 0x52DE9C4E, 0x417C0439, 0xA6050EC4, 0xB5A796B3, 0x81403E2A, 0x92E2A65D, 0xE88F6F18, 0xFB2DF76F, 0xCFCA5FF6, 0xDC68C781, 0x7B5FDFFF, 0x68FD4788, 0x5C1AEF11, 0x4FB87766, 0x35D5BE23, 0x26772654, 0x12908ECD, 0x013216BA, 0xE64B1C47, 0xF5E98430, 0xC10E2CA9, 0xD2ACB4DE, 0xA8C17D9B, 0xBB63E5EC, 0x8F844D75, 0x9C26D502, 0x449A2E7E, 0x5738B609, 0x63DF1E90, 0x707D86E7, 0x0A104FA2, 0x19B2D7D5, 0x2D557F4C, 0x3EF7E73B, 0xD98EEDC6, 0xCA2C75B1, 0xFECBDD28, 0xED69455F, 0x97048C1A, 0x84A6146D, 0xB041BCF4, 0xA3E32483 }; /* * end of the CRC lookup table crc_tableil8_o40 */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o48[256] = { 0x00000000, 0xA541927E, 0x4F6F520D, 0xEA2EC073, 0x9EDEA41A, 0x3B9F3664, 0xD1B1F617, 0x74F06469, 0x38513EC5, 0x9D10ACBB, 0x773E6CC8, 0xD27FFEB6, 0xA68F9ADF, 0x03CE08A1, 0xE9E0C8D2, 0x4CA15AAC, 0x70A27D8A, 0xD5E3EFF4, 0x3FCD2F87, 0x9A8CBDF9, 0xEE7CD990, 0x4B3D4BEE, 0xA1138B9D, 0x045219E3, 0x48F3434F, 0xEDB2D131, 0x079C1142, 0xA2DD833C, 0xD62DE755, 0x736C752B, 0x9942B558, 0x3C032726, 0xE144FB14, 0x4405696A, 0xAE2BA919, 0x0B6A3B67, 0x7F9A5F0E, 0xDADBCD70, 0x30F50D03, 0x95B49F7D, 0xD915C5D1, 0x7C5457AF, 0x967A97DC, 0x333B05A2, 0x47CB61CB, 0xE28AF3B5, 0x08A433C6, 0xADE5A1B8, 0x91E6869E, 0x34A714E0, 0xDE89D493, 0x7BC846ED, 0x0F382284, 0xAA79B0FA, 0x40577089, 0xE516E2F7, 0xA9B7B85B, 0x0CF62A25, 0xE6D8EA56, 0x43997828, 0x37691C41, 0x92288E3F, 0x78064E4C, 0xDD47DC32, 0xC76580D9, 0x622412A7, 0x880AD2D4, 0x2D4B40AA, 0x59BB24C3, 0xFCFAB6BD, 0x16D476CE, 0xB395E4B0, 0xFF34BE1C, 0x5A752C62, 0xB05BEC11, 0x151A7E6F, 0x61EA1A06, 0xC4AB8878, 0x2E85480B, 0x8BC4DA75, 0xB7C7FD53, 0x12866F2D, 0xF8A8AF5E, 0x5DE93D20, 0x29195949, 0x8C58CB37, 0x66760B44, 0xC337993A, 0x8F96C396, 0x2AD751E8, 0xC0F9919B, 0x65B803E5, 0x1148678C, 0xB409F5F2, 0x5E273581, 0xFB66A7FF, 0x26217BCD, 0x8360E9B3, 0x694E29C0, 0xCC0FBBBE, 0xB8FFDFD7, 0x1DBE4DA9, 0xF7908DDA, 0x52D11FA4, 0x1E704508, 0xBB31D776, 0x511F1705, 0xF45E857B, 0x80AEE112, 0x25EF736C, 0xCFC1B31F, 0x6A802161, 0x56830647, 0xF3C29439, 0x19EC544A, 0xBCADC634, 0xC85DA25D, 0x6D1C3023, 0x8732F050, 0x2273622E, 0x6ED23882, 0xCB93AAFC, 0x21BD6A8F, 0x84FCF8F1, 0xF00C9C98, 0x554D0EE6, 0xBF63CE95, 0x1A225CEB, 0x8B277743, 0x2E66E53D, 0xC448254E, 0x6109B730, 0x15F9D359, 0xB0B84127, 0x5A968154, 0xFFD7132A, 0xB3764986, 0x1637DBF8, 0xFC191B8B, 0x595889F5, 0x2DA8ED9C, 0x88E97FE2, 0x62C7BF91, 0xC7862DEF, 0xFB850AC9, 0x5EC498B7, 0xB4EA58C4, 0x11ABCABA, 0x655BAED3, 0xC01A3CAD, 0x2A34FCDE, 0x8F756EA0, 0xC3D4340C, 0x6695A672, 0x8CBB6601, 0x29FAF47F, 0x5D0A9016, 0xF84B0268, 0x1265C21B, 0xB7245065, 0x6A638C57, 0xCF221E29, 0x250CDE5A, 0x804D4C24, 0xF4BD284D, 0x51FCBA33, 0xBBD27A40, 0x1E93E83E, 0x5232B292, 0xF77320EC, 0x1D5DE09F, 0xB81C72E1, 0xCCEC1688, 0x69AD84F6, 0x83834485, 0x26C2D6FB, 0x1AC1F1DD, 0xBF8063A3, 0x55AEA3D0, 0xF0EF31AE, 0x841F55C7, 0x215EC7B9, 0xCB7007CA, 0x6E3195B4, 0x2290CF18, 0x87D15D66, 0x6DFF9D15, 0xC8BE0F6B, 0xBC4E6B02, 0x190FF97C, 0xF321390F, 0x5660AB71, 0x4C42F79A, 0xE90365E4, 0x032DA597, 0xA66C37E9, 0xD29C5380, 0x77DDC1FE, 0x9DF3018D, 0x38B293F3, 0x7413C95F, 0xD1525B21, 0x3B7C9B52, 0x9E3D092C, 0xEACD6D45, 0x4F8CFF3B, 0xA5A23F48, 0x00E3AD36, 0x3CE08A10, 0x99A1186E, 0x738FD81D, 0xD6CE4A63, 0xA23E2E0A, 0x077FBC74, 0xED517C07, 0x4810EE79, 0x04B1B4D5, 0xA1F026AB, 0x4BDEE6D8, 0xEE9F74A6, 0x9A6F10CF, 0x3F2E82B1, 0xD50042C2, 0x7041D0BC, 0xAD060C8E, 0x08479EF0, 0xE2695E83, 0x4728CCFD, 0x33D8A894, 0x96993AEA, 0x7CB7FA99, 0xD9F668E7, 0x9557324B, 0x3016A035, 0xDA386046, 0x7F79F238, 0x0B899651, 0xAEC8042F, 0x44E6C45C, 0xE1A75622, 0xDDA47104, 0x78E5E37A, 0x92CB2309, 0x378AB177, 0x437AD51E, 0xE63B4760, 0x0C158713, 0xA954156D, 0xE5F54FC1, 0x40B4DDBF, 0xAA9A1DCC, 0x0FDB8FB2, 0x7B2BEBDB, 0xDE6A79A5, 0x3444B9D6, 0x91052BA8 }; /* * end of the CRC lookup table crc_tableil8_o48 */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o56[256] = { 0x00000000, 0xDD45AAB8, 0xBF672381, 0x62228939, 0x7B2231F3, 0xA6679B4B, 0xC4451272, 0x1900B8CA, 0xF64463E6, 0x2B01C95E, 0x49234067, 0x9466EADF, 0x8D665215, 0x5023F8AD, 0x32017194, 0xEF44DB2C, 0xE964B13D, 0x34211B85, 0x560392BC, 0x8B463804, 0x924680CE, 0x4F032A76, 0x2D21A34F, 0xF06409F7, 0x1F20D2DB, 0xC2657863, 0xA047F15A, 0x7D025BE2, 0x6402E328, 0xB9474990, 0xDB65C0A9, 0x06206A11, 0xD725148B, 0x0A60BE33, 0x6842370A, 0xB5079DB2, 0xAC072578, 0x71428FC0, 0x136006F9, 0xCE25AC41, 0x2161776D, 0xFC24DDD5, 0x9E0654EC, 0x4343FE54, 0x5A43469E, 0x8706EC26, 0xE524651F, 0x3861CFA7, 0x3E41A5B6, 0xE3040F0E, 0x81268637, 0x5C632C8F, 0x45639445, 0x98263EFD, 0xFA04B7C4, 0x27411D7C, 0xC805C650, 0x15406CE8, 0x7762E5D1, 0xAA274F69, 0xB327F7A3, 0x6E625D1B, 0x0C40D422, 0xD1057E9A, 0xABA65FE7, 0x76E3F55F, 0x14C17C66, 0xC984D6DE, 0xD0846E14, 0x0DC1C4AC, 0x6FE34D95, 0xB2A6E72D, 0x5DE23C01, 0x80A796B9, 0xE2851F80, 0x3FC0B538, 0x26C00DF2, 0xFB85A74A, 0x99A72E73, 0x44E284CB, 0x42C2EEDA, 0x9F874462, 0xFDA5CD5B, 0x20E067E3, 0x39E0DF29, 0xE4A57591, 0x8687FCA8, 0x5BC25610, 0xB4868D3C, 0x69C32784, 0x0BE1AEBD, 0xD6A40405, 0xCFA4BCCF, 0x12E11677, 0x70C39F4E, 0xAD8635F6, 0x7C834B6C, 0xA1C6E1D4, 0xC3E468ED, 0x1EA1C255, 0x07A17A9F, 0xDAE4D027, 0xB8C6591E, 0x6583F3A6, 0x8AC7288A, 0x57828232, 0x35A00B0B, 0xE8E5A1B3, 0xF1E51979, 0x2CA0B3C1, 0x4E823AF8, 0x93C79040, 0x95E7FA51, 0x48A250E9, 0x2A80D9D0, 0xF7C57368, 0xEEC5CBA2, 0x3380611A, 0x51A2E823, 0x8CE7429B, 0x63A399B7, 0xBEE6330F, 0xDCC4BA36, 0x0181108E, 0x1881A844, 0xC5C402FC, 0xA7E68BC5, 0x7AA3217D, 0x52A0C93F, 0x8FE56387, 0xEDC7EABE, 0x30824006, 0x2982F8CC, 0xF4C75274, 0x96E5DB4D, 0x4BA071F5, 0xA4E4AAD9, 0x79A10061, 0x1B838958, 0xC6C623E0, 0xDFC69B2A, 0x02833192, 0x60A1B8AB, 0xBDE41213, 0xBBC47802, 0x6681D2BA, 0x04A35B83, 0xD9E6F13B, 0xC0E649F1, 0x1DA3E349, 0x7F816A70, 0xA2C4C0C8, 0x4D801BE4, 0x90C5B15C, 0xF2E73865, 0x2FA292DD, 0x36A22A17, 0xEBE780AF, 0x89C50996, 0x5480A32E, 0x8585DDB4, 0x58C0770C, 0x3AE2FE35, 0xE7A7548D, 0xFEA7EC47, 0x23E246FF, 0x41C0CFC6, 0x9C85657E, 0x73C1BE52, 0xAE8414EA, 0xCCA69DD3, 0x11E3376B, 0x08E38FA1, 0xD5A62519, 0xB784AC20, 0x6AC10698, 0x6CE16C89, 0xB1A4C631, 0xD3864F08, 0x0EC3E5B0, 0x17C35D7A, 0xCA86F7C2, 0xA8A47EFB, 0x75E1D443, 0x9AA50F6F, 0x47E0A5D7, 0x25C22CEE, 0xF8878656, 0xE1873E9C, 0x3CC29424, 0x5EE01D1D, 0x83A5B7A5, 0xF90696D8, 0x24433C60, 0x4661B559, 0x9B241FE1, 0x8224A72B, 0x5F610D93, 0x3D4384AA, 0xE0062E12, 0x0F42F53E, 0xD2075F86, 0xB025D6BF, 0x6D607C07, 0x7460C4CD, 0xA9256E75, 0xCB07E74C, 0x16424DF4, 0x106227E5, 0xCD278D5D, 0xAF050464, 0x7240AEDC, 0x6B401616, 0xB605BCAE, 0xD4273597, 0x09629F2F, 0xE6264403, 0x3B63EEBB, 0x59416782, 0x8404CD3A, 0x9D0475F0, 0x4041DF48, 0x22635671, 0xFF26FCC9, 0x2E238253, 0xF36628EB, 0x9144A1D2, 0x4C010B6A, 0x5501B3A0, 0x88441918, 0xEA669021, 0x37233A99, 0xD867E1B5, 0x05224B0D, 0x6700C234, 0xBA45688C, 0xA345D046, 0x7E007AFE, 0x1C22F3C7, 0xC167597F, 0xC747336E, 0x1A0299D6, 0x782010EF, 0xA565BA57, 0xBC65029D, 0x6120A825, 0x0302211C, 0xDE478BA4, 0x31035088, 0xEC46FA30, 0x8E647309, 0x5321D9B1, 0x4A21617B, 0x9764CBC3, 0xF54642FA, 0x2803E842 }; /* * end of the CRC lookup table crc_tableil8_o56 */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o64[256] = { 0x00000000, 0x38116FAC, 0x7022DF58, 0x4833B0F4, 0xE045BEB0, 0xD854D11C, 0x906761E8, 0xA8760E44, 0xC5670B91, 0xFD76643D, 0xB545D4C9, 0x8D54BB65, 0x2522B521, 0x1D33DA8D, 0x55006A79, 0x6D1105D5, 0x8F2261D3, 0xB7330E7F, 0xFF00BE8B, 0xC711D127, 0x6F67DF63, 0x5776B0CF, 0x1F45003B, 0x27546F97, 0x4A456A42, 0x725405EE, 0x3A67B51A, 0x0276DAB6, 0xAA00D4F2, 0x9211BB5E, 0xDA220BAA, 0xE2336406, 0x1BA8B557, 0x23B9DAFB, 0x6B8A6A0F, 0x539B05A3, 0xFBED0BE7, 0xC3FC644B, 0x8BCFD4BF, 0xB3DEBB13, 0xDECFBEC6, 0xE6DED16A, 0xAEED619E, 0x96FC0E32, 0x3E8A0076, 0x069B6FDA, 0x4EA8DF2E, 0x76B9B082, 0x948AD484, 0xAC9BBB28, 0xE4A80BDC, 0xDCB96470, 0x74CF6A34, 0x4CDE0598, 0x04EDB56C, 0x3CFCDAC0, 0x51EDDF15, 0x69FCB0B9, 0x21CF004D, 0x19DE6FE1, 0xB1A861A5, 0x89B90E09, 0xC18ABEFD, 0xF99BD151, 0x37516AAE, 0x0F400502, 0x4773B5F6, 0x7F62DA5A, 0xD714D41E, 0xEF05BBB2, 0xA7360B46, 0x9F2764EA, 0xF236613F, 0xCA270E93, 0x8214BE67, 0xBA05D1CB, 0x1273DF8F, 0x2A62B023, 0x625100D7, 0x5A406F7B, 0xB8730B7D, 0x806264D1, 0xC851D425, 0xF040BB89, 0x5836B5CD, 0x6027DA61, 0x28146A95, 0x10050539, 0x7D1400EC, 0x45056F40, 0x0D36DFB4, 0x3527B018, 0x9D51BE5C, 0xA540D1F0, 0xED736104, 0xD5620EA8, 0x2CF9DFF9, 0x14E8B055, 0x5CDB00A1, 0x64CA6F0D, 0xCCBC6149, 0xF4AD0EE5, 0xBC9EBE11, 0x848FD1BD, 0xE99ED468, 0xD18FBBC4, 0x99BC0B30, 0xA1AD649C, 0x09DB6AD8, 0x31CA0574, 0x79F9B580, 0x41E8DA2C, 0xA3DBBE2A, 0x9BCAD186, 0xD3F96172, 0xEBE80EDE, 0x439E009A, 0x7B8F6F36, 0x33BCDFC2, 0x0BADB06E, 0x66BCB5BB, 0x5EADDA17, 0x169E6AE3, 0x2E8F054F, 0x86F90B0B, 0xBEE864A7, 0xF6DBD453, 0xCECABBFF, 0x6EA2D55C, 0x56B3BAF0, 0x1E800A04, 0x269165A8, 0x8EE76BEC, 0xB6F60440, 0xFEC5B4B4, 0xC6D4DB18, 0xABC5DECD, 0x93D4B161, 0xDBE70195, 0xE3F66E39, 0x4B80607D, 0x73910FD1, 0x3BA2BF25, 0x03B3D089, 0xE180B48F, 0xD991DB23, 0x91A26BD7, 0xA9B3047B, 0x01C50A3F, 0x39D46593, 0x71E7D567, 0x49F6BACB, 0x24E7BF1E, 0x1CF6D0B2, 0x54C56046, 0x6CD40FEA, 0xC4A201AE, 0xFCB36E02, 0xB480DEF6, 0x8C91B15A, 0x750A600B, 0x4D1B0FA7, 0x0528BF53, 0x3D39D0FF, 0x954FDEBB, 0xAD5EB117, 0xE56D01E3, 0xDD7C6E4F, 0xB06D6B9A, 0x887C0436, 0xC04FB4C2, 0xF85EDB6E, 0x5028D52A, 0x6839BA86, 0x200A0A72, 0x181B65DE, 0xFA2801D8, 0xC2396E74, 0x8A0ADE80, 0xB21BB12C, 0x1A6DBF68, 0x227CD0C4, 0x6A4F6030, 0x525E0F9C, 0x3F4F0A49, 0x075E65E5, 0x4F6DD511, 0x777CBABD, 0xDF0AB4F9, 0xE71BDB55, 0xAF286BA1, 0x9739040D, 0x59F3BFF2, 0x61E2D05E, 0x29D160AA, 0x11C00F06, 0xB9B60142, 0x81A76EEE, 0xC994DE1A, 0xF185B1B6, 0x9C94B463, 0xA485DBCF, 0xECB66B3B, 0xD4A70497, 0x7CD10AD3, 0x44C0657F, 0x0CF3D58B, 0x34E2BA27, 0xD6D1DE21, 0xEEC0B18D, 0xA6F30179, 0x9EE26ED5, 0x36946091, 0x0E850F3D, 0x46B6BFC9, 0x7EA7D065, 0x13B6D5B0, 0x2BA7BA1C, 0x63940AE8, 0x5B856544, 0xF3F36B00, 0xCBE204AC, 0x83D1B458, 0xBBC0DBF4, 0x425B0AA5, 0x7A4A6509, 0x3279D5FD, 0x0A68BA51, 0xA21EB415, 0x9A0FDBB9, 0xD23C6B4D, 0xEA2D04E1, 0x873C0134, 0xBF2D6E98, 0xF71EDE6C, 0xCF0FB1C0, 0x6779BF84, 0x5F68D028, 0x175B60DC, 0x2F4A0F70, 0xCD796B76, 0xF56804DA, 0xBD5BB42E, 0x854ADB82, 0x2D3CD5C6, 0x152DBA6A, 0x5D1E0A9E, 0x650F6532, 0x081E60E7, 0x300F0F4B, 0x783CBFBF, 0x402DD013, 0xE85BDE57, 0xD04AB1FB, 0x9879010F, 0xA0686EA3 }; /* * end of the CRC lookup table crc_tableil8_o64 */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o72[256] = { 0x00000000, 0xEF306B19, 0xDB8CA0C3, 0x34BCCBDA, 0xB2F53777, 0x5DC55C6E, 0x697997B4, 0x8649FCAD, 0x6006181F, 0x8F367306, 0xBB8AB8DC, 0x54BAD3C5, 0xD2F32F68, 0x3DC34471, 0x097F8FAB, 0xE64FE4B2, 0xC00C303E, 0x2F3C5B27, 0x1B8090FD, 0xF4B0FBE4, 0x72F90749, 0x9DC96C50, 0xA975A78A, 0x4645CC93, 0xA00A2821, 0x4F3A4338, 0x7B8688E2, 0x94B6E3FB, 0x12FF1F56, 0xFDCF744F, 0xC973BF95, 0x2643D48C, 0x85F4168D, 0x6AC47D94, 0x5E78B64E, 0xB148DD57, 0x370121FA, 0xD8314AE3, 0xEC8D8139, 0x03BDEA20, 0xE5F20E92, 0x0AC2658B, 0x3E7EAE51, 0xD14EC548, 0x570739E5, 0xB83752FC, 0x8C8B9926, 0x63BBF23F, 0x45F826B3, 0xAAC84DAA, 0x9E748670, 0x7144ED69, 0xF70D11C4, 0x183D7ADD, 0x2C81B107, 0xC3B1DA1E, 0x25FE3EAC, 0xCACE55B5, 0xFE729E6F, 0x1142F576, 0x970B09DB, 0x783B62C2, 0x4C87A918, 0xA3B7C201, 0x0E045BEB, 0xE13430F2, 0xD588FB28, 0x3AB89031, 0xBCF16C9C, 0x53C10785, 0x677DCC5F, 0x884DA746, 0x6E0243F4, 0x813228ED, 0xB58EE337, 0x5ABE882E, 0xDCF77483, 0x33C71F9A, 0x077BD440, 0xE84BBF59, 0xCE086BD5, 0x213800CC, 0x1584CB16, 0xFAB4A00F, 0x7CFD5CA2, 0x93CD37BB, 0xA771FC61, 0x48419778, 0xAE0E73CA, 0x413E18D3, 0x7582D309, 0x9AB2B810, 0x1CFB44BD, 0xF3CB2FA4, 0xC777E47E, 0x28478F67, 0x8BF04D66, 0x64C0267F, 0x507CEDA5, 0xBF4C86BC, 0x39057A11, 0xD6351108, 0xE289DAD2, 0x0DB9B1CB, 0xEBF65579, 0x04C63E60, 0x307AF5BA, 0xDF4A9EA3, 0x5903620E, 0xB6330917, 0x828FC2CD, 0x6DBFA9D4, 0x4BFC7D58, 0xA4CC1641, 0x9070DD9B, 0x7F40B682, 0xF9094A2F, 0x16392136, 0x2285EAEC, 0xCDB581F5, 0x2BFA6547, 0xC4CA0E5E, 0xF076C584, 0x1F46AE9D, 0x990F5230, 0x763F3929, 0x4283F2F3, 0xADB399EA, 0x1C08B7D6, 0xF338DCCF, 0xC7841715, 0x28B47C0C, 0xAEFD80A1, 0x41CDEBB8, 0x75712062, 0x9A414B7B, 0x7C0EAFC9, 0x933EC4D0, 0xA7820F0A, 0x48B26413, 0xCEFB98BE, 0x21CBF3A7, 0x1577387D, 0xFA475364, 0xDC0487E8, 0x3334ECF1, 0x0788272B, 0xE8B84C32, 0x6EF1B09F, 0x81C1DB86, 0xB57D105C, 0x5A4D7B45, 0xBC029FF7, 0x5332F4EE, 0x678E3F34, 0x88BE542D, 0x0EF7A880, 0xE1C7C399, 0xD57B0843, 0x3A4B635A, 0x99FCA15B, 0x76CCCA42, 0x42700198, 0xAD406A81, 0x2B09962C, 0xC439FD35, 0xF08536EF, 0x1FB55DF6, 0xF9FAB944, 0x16CAD25D, 0x22761987, 0xCD46729E, 0x4B0F8E33, 0xA43FE52A, 0x90832EF0, 0x7FB345E9, 0x59F09165, 0xB6C0FA7C, 0x827C31A6, 0x6D4C5ABF, 0xEB05A612, 0x0435CD0B, 0x308906D1, 0xDFB96DC8, 0x39F6897A, 0xD6C6E263, 0xE27A29B9, 0x0D4A42A0, 0x8B03BE0D, 0x6433D514, 0x508F1ECE, 0xBFBF75D7, 0x120CEC3D, 0xFD3C8724, 0xC9804CFE, 0x26B027E7, 0xA0F9DB4A, 0x4FC9B053, 0x7B757B89, 0x94451090, 0x720AF422, 0x9D3A9F3B, 0xA98654E1, 0x46B63FF8, 0xC0FFC355, 0x2FCFA84C, 0x1B736396, 0xF443088F, 0xD200DC03, 0x3D30B71A, 0x098C7CC0, 0xE6BC17D9, 0x60F5EB74, 0x8FC5806D, 0xBB794BB7, 0x544920AE, 0xB206C41C, 0x5D36AF05, 0x698A64DF, 0x86BA0FC6, 0x00F3F36B, 0xEFC39872, 0xDB7F53A8, 0x344F38B1, 0x97F8FAB0, 0x78C891A9, 0x4C745A73, 0xA344316A, 0x250DCDC7, 0xCA3DA6DE, 0xFE816D04, 0x11B1061D, 0xF7FEE2AF, 0x18CE89B6, 0x2C72426C, 0xC3422975, 0x450BD5D8, 0xAA3BBEC1, 0x9E87751B, 0x71B71E02, 0x57F4CA8E, 0xB8C4A197, 0x8C786A4D, 0x63480154, 0xE501FDF9, 0x0A3196E0, 0x3E8D5D3A, 0xD1BD3623, 0x37F2D291, 0xD8C2B988, 0xEC7E7252, 0x034E194B, 0x8507E5E6, 0x6A378EFF, 0x5E8B4525, 0xB1BB2E3C }; /* * end of the CRC lookup table crc_tableil8_o72 */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o80[256] = { 0x00000000, 0x68032CC8, 0xD0065990, 0xB8057558, 0xA5E0C5D1, 0xCDE3E919, 0x75E69C41, 0x1DE5B089, 0x4E2DFD53, 0x262ED19B, 0x9E2BA4C3, 0xF628880B, 0xEBCD3882, 0x83CE144A, 0x3BCB6112, 0x53C84DDA, 0x9C5BFAA6, 0xF458D66E, 0x4C5DA336, 0x245E8FFE, 0x39BB3F77, 0x51B813BF, 0xE9BD66E7, 0x81BE4A2F, 0xD27607F5, 0xBA752B3D, 0x02705E65, 0x6A7372AD, 0x7796C224, 0x1F95EEEC, 0xA7909BB4, 0xCF93B77C, 0x3D5B83BD, 0x5558AF75, 0xED5DDA2D, 0x855EF6E5, 0x98BB466C, 0xF0B86AA4, 0x48BD1FFC, 0x20BE3334, 0x73767EEE, 0x1B755226, 0xA370277E, 0xCB730BB6, 0xD696BB3F, 0xBE9597F7, 0x0690E2AF, 0x6E93CE67, 0xA100791B, 0xC90355D3, 0x7106208B, 0x19050C43, 0x04E0BCCA, 0x6CE39002, 0xD4E6E55A, 0xBCE5C992, 0xEF2D8448, 0x872EA880, 0x3F2BDDD8, 0x5728F110, 0x4ACD4199, 0x22CE6D51, 0x9ACB1809, 0xF2C834C1, 0x7AB7077A, 0x12B42BB2, 0xAAB15EEA, 0xC2B27222, 0xDF57C2AB, 0xB754EE63, 0x0F519B3B, 0x6752B7F3, 0x349AFA29, 0x5C99D6E1, 0xE49CA3B9, 0x8C9F8F71, 0x917A3FF8, 0xF9791330, 0x417C6668, 0x297F4AA0, 0xE6ECFDDC, 0x8EEFD114, 0x36EAA44C, 0x5EE98884, 0x430C380D, 0x2B0F14C5, 0x930A619D, 0xFB094D55, 0xA8C1008F, 0xC0C22C47, 0x78C7591F, 0x10C475D7, 0x0D21C55E, 0x6522E996, 0xDD279CCE, 0xB524B006, 0x47EC84C7, 0x2FEFA80F, 0x97EADD57, 0xFFE9F19F, 0xE20C4116, 0x8A0F6DDE, 0x320A1886, 0x5A09344E, 0x09C17994, 0x61C2555C, 0xD9C72004, 0xB1C40CCC, 0xAC21BC45, 0xC422908D, 0x7C27E5D5, 0x1424C91D, 0xDBB77E61, 0xB3B452A9, 0x0BB127F1, 0x63B20B39, 0x7E57BBB0, 0x16549778, 0xAE51E220, 0xC652CEE8, 0x959A8332, 0xFD99AFFA, 0x459CDAA2, 0x2D9FF66A, 0x307A46E3, 0x58796A2B, 0xE07C1F73, 0x887F33BB, 0xF56E0EF4, 0x9D6D223C, 0x25685764, 0x4D6B7BAC, 0x508ECB25, 0x388DE7ED, 0x808892B5, 0xE88BBE7D, 0xBB43F3A7, 0xD340DF6F, 0x6B45AA37, 0x034686FF, 0x1EA33676, 0x76A01ABE, 0xCEA56FE6, 0xA6A6432E, 0x6935F452, 0x0136D89A, 0xB933ADC2, 0xD130810A, 0xCCD53183, 0xA4D61D4B, 0x1CD36813, 0x74D044DB, 0x27180901, 0x4F1B25C9, 0xF71E5091, 0x9F1D7C59, 0x82F8CCD0, 0xEAFBE018, 0x52FE9540, 0x3AFDB988, 0xC8358D49, 0xA036A181, 0x1833D4D9, 0x7030F811, 0x6DD54898, 0x05D66450, 0xBDD31108, 0xD5D03DC0, 0x8618701A, 0xEE1B5CD2, 0x561E298A, 0x3E1D0542, 0x23F8B5CB, 0x4BFB9903, 0xF3FEEC5B, 0x9BFDC093, 0x546E77EF, 0x3C6D5B27, 0x84682E7F, 0xEC6B02B7, 0xF18EB23E, 0x998D9EF6, 0x2188EBAE, 0x498BC766, 0x1A438ABC, 0x7240A674, 0xCA45D32C, 0xA246FFE4, 0xBFA34F6D, 0xD7A063A5, 0x6FA516FD, 0x07A63A35, 0x8FD9098E, 0xE7DA2546, 0x5FDF501E, 0x37DC7CD6, 0x2A39CC5F, 0x423AE097, 0xFA3F95CF, 0x923CB907, 0xC1F4F4DD, 0xA9F7D815, 0x11F2AD4D, 0x79F18185, 0x6414310C, 0x0C171DC4, 0xB412689C, 0xDC114454, 0x1382F328, 0x7B81DFE0, 0xC384AAB8, 0xAB878670, 0xB66236F9, 0xDE611A31, 0x66646F69, 0x0E6743A1, 0x5DAF0E7B, 0x35AC22B3, 0x8DA957EB, 0xE5AA7B23, 0xF84FCBAA, 0x904CE762, 0x2849923A, 0x404ABEF2, 0xB2828A33, 0xDA81A6FB, 0x6284D3A3, 0x0A87FF6B, 0x17624FE2, 0x7F61632A, 0xC7641672, 0xAF673ABA, 0xFCAF7760, 0x94AC5BA8, 0x2CA92EF0, 0x44AA0238, 0x594FB2B1, 0x314C9E79, 0x8949EB21, 0xE14AC7E9, 0x2ED97095, 0x46DA5C5D, 0xFEDF2905, 0x96DC05CD, 0x8B39B544, 0xE33A998C, 0x5B3FECD4, 0x333CC01C, 0x60F48DC6, 0x08F7A10E, 0xB0F2D456, 0xD8F1F89E, 0xC5144817, 0xAD1764DF, 0x15121187, 0x7D113D4F }; /* * end of the CRC lookup table crc_tableil8_o80 */ /* * The following CRC lookup table was generated automagically using the * following model parameters: * * Generator Polynomial = ................. 0x1EDC6F41 * Generator Polynomial Length = .......... 32 bits * Reflected Bits = ....................... TRUE * Table Generation Offset = .............. 32 bits * Number of Slices = ..................... 8 slices * Slice Lengths = ........................ 8 8 8 8 8 8 8 8 * Directory Name = ....................... .\ * File Name = ............................ 8x256_tables.c */ static uint32_t sctp_crc_tableil8_o88[256] = { 0x00000000, 0x493C7D27, 0x9278FA4E, 0xDB448769, 0x211D826D, 0x6821FF4A, 0xB3657823, 0xFA590504, 0x423B04DA, 0x0B0779FD, 0xD043FE94, 0x997F83B3, 0x632686B7, 0x2A1AFB90, 0xF15E7CF9, 0xB86201DE, 0x847609B4, 0xCD4A7493, 0x160EF3FA, 0x5F328EDD, 0xA56B8BD9, 0xEC57F6FE, 0x37137197, 0x7E2F0CB0, 0xC64D0D6E, 0x8F717049, 0x5435F720, 0x1D098A07, 0xE7508F03, 0xAE6CF224, 0x7528754D, 0x3C14086A, 0x0D006599, 0x443C18BE, 0x9F789FD7, 0xD644E2F0, 0x2C1DE7F4, 0x65219AD3, 0xBE651DBA, 0xF759609D, 0x4F3B6143, 0x06071C64, 0xDD439B0D, 0x947FE62A, 0x6E26E32E, 0x271A9E09, 0xFC5E1960, 0xB5626447, 0x89766C2D, 0xC04A110A, 0x1B0E9663, 0x5232EB44, 0xA86BEE40, 0xE1579367, 0x3A13140E, 0x732F6929, 0xCB4D68F7, 0x827115D0, 0x593592B9, 0x1009EF9E, 0xEA50EA9A, 0xA36C97BD, 0x782810D4, 0x31146DF3, 0x1A00CB32, 0x533CB615, 0x8878317C, 0xC1444C5B, 0x3B1D495F, 0x72213478, 0xA965B311, 0xE059CE36, 0x583BCFE8, 0x1107B2CF, 0xCA4335A6, 0x837F4881, 0x79264D85, 0x301A30A2, 0xEB5EB7CB, 0xA262CAEC, 0x9E76C286, 0xD74ABFA1, 0x0C0E38C8, 0x453245EF, 0xBF6B40EB, 0xF6573DCC, 0x2D13BAA5, 0x642FC782, 0xDC4DC65C, 0x9571BB7B, 0x4E353C12, 0x07094135, 0xFD504431, 0xB46C3916, 0x6F28BE7F, 0x2614C358, 0x1700AEAB, 0x5E3CD38C, 0x857854E5, 0xCC4429C2, 0x361D2CC6, 0x7F2151E1, 0xA465D688, 0xED59ABAF, 0x553BAA71, 0x1C07D756, 0xC743503F, 0x8E7F2D18, 0x7426281C, 0x3D1A553B, 0xE65ED252, 0xAF62AF75, 0x9376A71F, 0xDA4ADA38, 0x010E5D51, 0x48322076, 0xB26B2572, 0xFB575855, 0x2013DF3C, 0x692FA21B, 0xD14DA3C5, 0x9871DEE2, 0x4335598B, 0x0A0924AC, 0xF05021A8, 0xB96C5C8F, 0x6228DBE6, 0x2B14A6C1, 0x34019664, 0x7D3DEB43, 0xA6796C2A, 0xEF45110D, 0x151C1409, 0x5C20692E, 0x8764EE47, 0xCE589360, 0x763A92BE, 0x3F06EF99, 0xE44268F0, 0xAD7E15D7, 0x572710D3, 0x1E1B6DF4, 0xC55FEA9D, 0x8C6397BA, 0xB0779FD0, 0xF94BE2F7, 0x220F659E, 0x6B3318B9, 0x916A1DBD, 0xD856609A, 0x0312E7F3, 0x4A2E9AD4, 0xF24C9B0A, 0xBB70E62D, 0x60346144, 0x29081C63, 0xD3511967, 0x9A6D6440, 0x4129E329, 0x08159E0E, 0x3901F3FD, 0x703D8EDA, 0xAB7909B3, 0xE2457494, 0x181C7190, 0x51200CB7, 0x8A648BDE, 0xC358F6F9, 0x7B3AF727, 0x32068A00, 0xE9420D69, 0xA07E704E, 0x5A27754A, 0x131B086D, 0xC85F8F04, 0x8163F223, 0xBD77FA49, 0xF44B876E, 0x2F0F0007, 0x66337D20, 0x9C6A7824, 0xD5560503, 0x0E12826A, 0x472EFF4D, 0xFF4CFE93, 0xB67083B4, 0x6D3404DD, 0x240879FA, 0xDE517CFE, 0x976D01D9, 0x4C2986B0, 0x0515FB97, 0x2E015D56, 0x673D2071, 0xBC79A718, 0xF545DA3F, 0x0F1CDF3B, 0x4620A21C, 0x9D642575, 0xD4585852, 0x6C3A598C, 0x250624AB, 0xFE42A3C2, 0xB77EDEE5, 0x4D27DBE1, 0x041BA6C6, 0xDF5F21AF, 0x96635C88, 0xAA7754E2, 0xE34B29C5, 0x380FAEAC, 0x7133D38B, 0x8B6AD68F, 0xC256ABA8, 0x19122CC1, 0x502E51E6, 0xE84C5038, 0xA1702D1F, 0x7A34AA76, 0x3308D751, 0xC951D255, 0x806DAF72, 0x5B29281B, 0x1215553C, 0x230138CF, 0x6A3D45E8, 0xB179C281, 0xF845BFA6, 0x021CBAA2, 0x4B20C785, 0x906440EC, 0xD9583DCB, 0x613A3C15, 0x28064132, 0xF342C65B, 0xBA7EBB7C, 0x4027BE78, 0x091BC35F, 0xD25F4436, 0x9B633911, 0xA777317B, 0xEE4B4C5C, 0x350FCB35, 0x7C33B612, 0x866AB316, 0xCF56CE31, 0x14124958, 0x5D2E347F, 0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8, 0xC451B7CC, 0x8D6DCAEB, 0x56294D82, 0x1F1530A5 }; /* * end of the CRC lookup table crc_tableil8_o88 */ static uint32_t crc32c_sb8_64_bit(uint32_t crc, const unsigned char *p_buf, uint32_t length, uint32_t init_bytes) { uint32_t li; uint32_t term1, term2; uint32_t running_length; uint32_t end_bytes; running_length = ((length - init_bytes) / 8) * 8; end_bytes = length - init_bytes - running_length; for (li = 0; li < init_bytes; li++) crc = sctp_crc_tableil8_o32[(crc ^ *p_buf++) & 0x000000FF] ^ (crc >> 8); for (li = 0; li < running_length / 8; li++) { #if BYTE_ORDER == BIG_ENDIAN crc ^= *p_buf++; crc ^= (*p_buf++) << 8; crc ^= (*p_buf++) << 16; crc ^= (*p_buf++) << 24; #else crc ^= *(const uint32_t *) p_buf; p_buf += 4; #endif term1 = sctp_crc_tableil8_o88[crc & 0x000000FF] ^ sctp_crc_tableil8_o80[(crc >> 8) & 0x000000FF]; term2 = crc >> 16; crc = term1 ^ sctp_crc_tableil8_o72[term2 & 0x000000FF] ^ sctp_crc_tableil8_o64[(term2 >> 8) & 0x000000FF]; #if BYTE_ORDER == BIG_ENDIAN crc ^= sctp_crc_tableil8_o56[*p_buf++]; crc ^= sctp_crc_tableil8_o48[*p_buf++]; crc ^= sctp_crc_tableil8_o40[*p_buf++]; crc ^= sctp_crc_tableil8_o32[*p_buf++]; #else term1 = sctp_crc_tableil8_o56[(*(const uint32_t *) p_buf) & 0x000000FF] ^ sctp_crc_tableil8_o48[((*(const uint32_t *) p_buf) >> 8) & 0x000000FF]; term2 = (*(const uint32_t *) p_buf) >> 16; crc = crc ^ term1 ^ sctp_crc_tableil8_o40[term2 & 0x000000FF] ^ sctp_crc_tableil8_o32[(term2 >> 8) & 0x000000FF]; p_buf += 4; #endif } for (li = 0; li < end_bytes; li++) crc = sctp_crc_tableil8_o32[(crc ^ *p_buf++) & 0x000000FF] ^ (crc >> 8); return crc; } static uint32_t multitable_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) { uint32_t to_even_word; if (length == 0) { return (crc32c); } to_even_word = (4 - (((uintptr_t) buffer) & 0x3)); return (crc32c_sb8_64_bit(crc32c, buffer, length, to_even_word)); } uint32_t crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) { if (length < 4) { return (singletable_crc32c(crc32c, buffer, length)); } else { return (multitable_crc32c(crc32c, buffer, length)); } } tarantool-1.5.1.218.g1a69fd6/third_party/base64.h0000664000000000000000000000541012202131537017542 0ustar rootroot#ifndef BASE64_H #define BASE64_H /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * This is part of the libb64 project, and has been placed in the * public domain. For details, see * http://sourceforge.net/projects/libb64 */ #ifdef __cplusplus extern "C" { #endif #define BASE64_CHARS_PER_LINE 72 static inline int base64_bufsize(int binsize) { int datasize = binsize * 4/3 + 4; int newlines = ((datasize + BASE64_CHARS_PER_LINE - 1)/ BASE64_CHARS_PER_LINE); return datasize + newlines; } /** * Encode a binary stream into BASE64 text. * * @pre the buffer size is at least 4/3 of the stream * size + stream_size/72 (newlines) + 4 * * @param[in] in_bin the binary input stream to decode * @param[in] in_len size of the input * @param[out] out_base64 output buffer for the encoded data * @param[in] out_len buffer size, must be at least * 4/3 of the input size * * @return the size of encoded output */ int base64_encode(const char *in_bin, int in_len, char *out_base64, int out_len); /** * Decode a BASE64 text into a binary * * @param[in] in_base64 the BASE64 stream to decode * @param[in] in_len size of the input * @param[out] out_bin output buffer size * @param[in] out_len buffer size * * @pre the output buffer size must be at least * 3/4 + 1 of the size of the input * * @return the size of decoded output */ int base64_decode(const char *in_base64, int in_len, char *out_bin, int out_len); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* BASE64_H */ tarantool-1.5.1.218.g1a69fd6/third_party/sptree.h0000664000000000000000000017333612231715276020007 0ustar rootroot/* * Copyright (C) 2012 Mail.RU * Copyright (C) 2010 Teodor Sigaev * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SPTREE_H_ #define _SPTREE_H_ #include #include #include #include #include #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ #ifndef SPTREE_NODE_SELF /* * user could suggest pointer's storage himself */ typedef uint32_t spnode_t; #define SPNIL (0xffffffff) typedef struct sptree_node_pointers { uint32_t left; /* sizeof(spnode_t) >= sizeof(sptree_node_pointers.left) !!! */ uint32_t right; } sptree_node_pointers; #define GET_SPNODE_LEFT(snp) ( (snp)->left ) #define SET_SPNODE_LEFT(snp, v) (snp)->left = (v) #define GET_SPNODE_RIGHT(snp) ( (snp)->right ) #define SET_SPNODE_RIGHT(snp, v) (snp)->right = (v) #endif /* SPTREE_NODE_SELF */ #ifndef alpha #define alpha ((double)0.75) #endif #define COUNTALPHA(size) floor(log((double)(size))/log((double)1.0/alpha)) #define _GET_SPNODE_LEFT(n) GET_SPNODE_LEFT( t->lrpointers + (n) ) #define _SET_SPNODE_LEFT(n, v) SET_SPNODE_LEFT( t->lrpointers + (n), (v) ) #define _GET_SPNODE_RIGHT(n) GET_SPNODE_RIGHT( t->lrpointers + (n) ) #define _SET_SPNODE_RIGHT(n, v) SET_SPNODE_RIGHT( t->lrpointers + (n), (v) ) #define ITHELEM(t, i) ( (char *) (t)->members + (t)->elemsize * (i) ) #define ELEMIDX(t, e) ( ((e) - (t)->members) / (t)->elemsize ) /* * makes definition of tree with methods, name should * be unique across all definitions. * * Methods: * void sptree_NAME_init(sptree_NAME *tree, size_t elemsize, void *array, * spnode_t array_len, spnode_t array_size, * int (*compare)(const void *key, const void *elem, void *arg), * int (*elemcompare)(const void *e1, const void *e2, void *arg), * void *arg) * * void sptree_NAME_replace(sptree_NAME *tree, void *value, void **p_oldvalue) * void sptree_NAME_delete(sptree_NAME *tree, void *value) * void* sptree_NAME_find(sptree_NAME *tree, void *key) * * spnode_t sptree_NAME_walk(sptree_NAME *t, void* array, spnode_t limit, spnode_t offset) * void sptree_NAME_walk_cb(sptree_NAME *t, int (*cb)(void* cb_arg, void* elem), void *cb_arg) * * sptree_NAME_iterator* sptree_NAME_iterator_init(sptree_NAME *t) * void sptree_NAME_iterator_init_set(sptree_NAME *t, sptree_NAME_iterator **iterator, void *start) * sptree_NAME_iterator* sptree_NAME_iterator_reverse_init(sptree_NAME *t) * void sptree_NAME_iterator_reverse_init_set(sptree_NAME *t, sptree_NAME_iterator **iterator, void *start) * void sptree_NAME_iterator_free(sptree_NAME_iterator *i) * * void* sptree_NAME_iterator_next(sptree_NAME_iterator *i) * void* sptree_NAME_iterator_reverse_next(sptree_NAME_iterator *i) */ #define SPTREE_DEF(name, realloc) \ typedef struct sptree_##name { \ void *members; \ sptree_node_pointers *lrpointers; \ \ spnode_t nmember; \ spnode_t ntotal; \ \ int (*compare)(const void *key, const void *elem, void *); \ int (*elemcompare)(const void *e1, const void *e2, void *); \ void* arg; \ size_t elemsize; \ \ spnode_t root; \ spnode_t garbage_head; \ spnode_t size; \ spnode_t max_size; \ spnode_t max_depth; \ } sptree_##name; \ \ static spnode_t \ sptree_##name##_mktree(sptree_##name *t, spnode_t depth, spnode_t start, spnode_t end) { \ spnode_t half = ( (end + start) >> 1 ), tmp; \ \ if (depth > t->max_depth) t->max_depth = depth; \ \ if ( half == start || \ ( tmp = sptree_##name##_mktree(t, depth+1, start, half)) == half ) \ _SET_SPNODE_LEFT(half, SPNIL); \ else \ _SET_SPNODE_LEFT(half, tmp); \ if ( half+1 >= end || \ ( tmp = sptree_##name##_mktree(t, depth+1, half+1, end)) == half ) \ _SET_SPNODE_RIGHT(half, SPNIL); \ else \ _SET_SPNODE_RIGHT(half, tmp); \ \ return half; \ } \ \ static inline void \ sptree_##name##_init(sptree_##name *t, size_t elemsize, void *m, \ spnode_t nm, spnode_t nt, \ int (*compare)(const void *, const void *, void *), \ int (*elemcompare)(const void *, const void *, void *), \ void *arg) { \ memset(t, 0, sizeof(*t)); \ t->members = m; \ t->max_size = t->size = t->nmember = nm; \ t->ntotal = (nt==0) ? nm : nt; \ t->compare = compare != NULL ? compare : elemcompare; \ t->elemcompare = elemcompare != NULL ? elemcompare : compare; \ t->arg = arg; \ t->elemsize = elemsize; \ t->garbage_head = t->root = SPNIL; \ \ if (t->ntotal == 0 || t->members == NULL) { /* from scratch */ \ if (t->ntotal == 0) { \ t->members = NULL; \ t->ntotal = 64; \ } \ \ if (t->members == NULL) \ t->members = realloc(NULL, elemsize * t->ntotal); \ } \ t->lrpointers = (sptree_node_pointers *) realloc(NULL, \ sizeof(sptree_node_pointers) * t->ntotal); \ \ if (t->nmember == 1) { \ t->root = 0; \ _SET_SPNODE_RIGHT(0, SPNIL); \ _SET_SPNODE_LEFT(0, SPNIL); \ } else if (t->nmember > 1) { \ qsort_arg(t->members, t->nmember, elemsize, t->elemcompare, t->arg); \ /* create tree */ \ t->root = sptree_##name##_mktree(t, 1, 0, t->nmember); \ } \ } \ \ static inline void \ sptree_##name##_destroy(sptree_##name *t) { \ if (t == NULL) return; \ free(t->members); \ free(t->lrpointers); \ } \ \ /** Nodes in the garbage list have a loop on their right link. */ \ static inline bool \ sptree_##name##_node_is_deleted(const sptree_##name *t, spnode_t node) { \ \ return _GET_SPNODE_RIGHT(node) == node; \ } \ \ static inline void* \ sptree_##name##_find(const sptree_##name *t, void *k) { \ spnode_t node = t->root; \ while(node != SPNIL) { \ int r = t->compare(k, ITHELEM(t, node), t->arg); \ if (r > 0) { \ node = _GET_SPNODE_RIGHT(node); \ } else if (r < 0) { \ node = _GET_SPNODE_LEFT(node); \ } else { \ return ITHELEM(t, node); \ } \ } \ return NULL; \ } \ \ static inline void* \ sptree_##name##_first(const sptree_##name *t) { \ spnode_t node = t->root; \ spnode_t first = SPNIL; \ while (node != SPNIL) { \ first = node; \ node = _GET_SPNODE_LEFT(node); \ } \ if (first != SPNIL) \ return ITHELEM(t, first); \ return NULL; \ } \ \ static inline void* \ sptree_##name##_last(const sptree_##name *t) { \ spnode_t node = t->root; \ spnode_t last = SPNIL; \ while (node != SPNIL) { \ last = node; \ node = _GET_SPNODE_RIGHT(node); \ } \ if (last != SPNIL) \ return ITHELEM(t, last); \ return NULL; \ } \ \ static inline void* \ sptree_##name##_random(const sptree_##name *t, spnode_t rnd) { \ for (spnode_t i = 0; i < t->size; i++, rnd++) { \ rnd %= t->nmember; \ if (!sptree_##name##_node_is_deleted(t, rnd)) \ return ITHELEM(t, rnd); \ \ } \ \ return NULL; \ } \ static inline spnode_t \ sptree_##name##_size_of_subtree(sptree_##name *t, spnode_t node) { \ if (node == SPNIL) \ return 0; \ return 1 + \ sptree_##name##_size_of_subtree(t, _GET_SPNODE_LEFT(node)) + \ sptree_##name##_size_of_subtree(t, _GET_SPNODE_RIGHT(node)); \ } \ \ static inline spnode_t \ sptree_##name##_get_place(sptree_##name *t) { \ spnode_t node; \ if (t->garbage_head != SPNIL) { \ node = t->garbage_head; \ t->garbage_head = _GET_SPNODE_LEFT(t->garbage_head); \ } else { \ if (t->nmember >= t->ntotal) { \ t->ntotal *= 2; \ t->members = realloc(t->members, t->ntotal * t->elemsize); \ t->lrpointers = (sptree_node_pointers *) realloc(t->lrpointers, \ t->ntotal * sizeof(sptree_node_pointers)); \ } \ \ node = t->nmember; \ t->nmember++; \ } \ _SET_SPNODE_LEFT(node, SPNIL); \ _SET_SPNODE_RIGHT(node, SPNIL); \ return node; \ } \ \ static inline spnode_t \ sptree_##name##_flatten_tree(sptree_##name *t, spnode_t root, spnode_t head) { \ spnode_t node; \ if (root == SPNIL) \ return head; \ node = sptree_##name##_flatten_tree(t, _GET_SPNODE_RIGHT(root), head); \ _SET_SPNODE_RIGHT(root, node); \ return sptree_##name##_flatten_tree(t, _GET_SPNODE_LEFT(root), root); \ } \ \ static inline spnode_t \ sptree_##name##_build_tree(sptree_##name *t, spnode_t node, spnode_t size) { \ spnode_t tmp; \ if (size == 0) { \ _SET_SPNODE_LEFT(node, SPNIL); \ return node; \ } \ spnode_t root = sptree_##name##_build_tree(t, \ node, ceil(((double)size-1.0)/2.0)); \ spnode_t list = sptree_##name##_build_tree(t, \ _GET_SPNODE_RIGHT(root), floor(((double)size-1.0)/2.0)); \ tmp = _GET_SPNODE_LEFT(list); \ _SET_SPNODE_RIGHT(root, tmp); \ _SET_SPNODE_LEFT(list, root); \ \ return list; \ } \ \ static inline spnode_t \ sptree_##name##_balance(sptree_##name *t, spnode_t node, spnode_t size) { \ spnode_t fake = sptree_##name##_get_place(t); \ spnode_t z; \ \ z = sptree_##name##_flatten_tree(t, node, fake); \ sptree_##name##_build_tree(t, z, size); \ \ z = _GET_SPNODE_LEFT(fake); \ _SET_SPNODE_LEFT(fake, t->garbage_head); \ /* \ * Loop back on the right link indicates that the node \ * is in the garbage list. \ */ \ _SET_SPNODE_RIGHT(fake, fake); \ t->garbage_head = fake; \ return z; \ } \ \ static inline void \ sptree_##name##_replace(sptree_##name *t, void *v, void **p_old) { \ spnode_t node, depth = 0; \ spnode_t path[ t->max_depth + 2]; \ \ if (t->root == SPNIL) { \ _SET_SPNODE_LEFT(0, SPNIL); \ _SET_SPNODE_RIGHT(0, SPNIL); \ memcpy(t->members, v, t->elemsize); \ t->root = 0; \ t->garbage_head = SPNIL; \ t->nmember = 1; \ t->size=1; \ if (p_old) \ *p_old = NULL; \ return; \ } else { \ spnode_t parent = t->root; \ \ for(;;) { \ int r = t->elemcompare(v, ITHELEM(t, parent), t->arg); \ if (r==0) { \ if (p_old) \ memcpy(*p_old, ITHELEM(t, parent), t->elemsize); \ memcpy(ITHELEM(t, parent), v, t->elemsize); \ return; \ } \ path[depth] = parent; \ depth++; \ if (r>0) { \ if (_GET_SPNODE_RIGHT(parent) == SPNIL) { \ node = sptree_##name##_get_place(t); \ memcpy(ITHELEM(t, node), v, t->elemsize); \ _SET_SPNODE_RIGHT(parent, node); \ break; \ } else { \ parent = _GET_SPNODE_RIGHT(parent); \ } \ } else { \ if (_GET_SPNODE_LEFT(parent) == SPNIL) { \ node = sptree_##name##_get_place(t); \ memcpy(ITHELEM(t, node), v, t->elemsize); \ _SET_SPNODE_LEFT(parent, node); \ break; \ } else { \ parent = _GET_SPNODE_LEFT(parent); \ } \ } \ } \ } \ if (p_old) \ *p_old = NULL; \ \ t->size++; \ if ( t->size > t->max_size ) \ t->max_size = t->size; \ if ( depth > t->max_depth ) \ t->max_depth = depth; \ \ if ( (double)depth > COUNTALPHA(t->size)) { \ spnode_t parent; \ spnode_t i, size = 1 ; \ \ path[depth] = node; \ \ for (i = 1; ; i++) { \ if (i < depth) { \ parent = path[ depth - i ]; \ size += 1 + sptree_##name##_size_of_subtree( t, \ _GET_SPNODE_RIGHT(parent) == path[depth - i + 1] ? \ _GET_SPNODE_LEFT(parent) : _GET_SPNODE_RIGHT(parent)); \ if ((double)i > COUNTALPHA(size)) { \ spnode_t n = sptree_##name##_balance(t, parent, size); \ spnode_t pp = path[ depth - i - 1 ]; \ if (_GET_SPNODE_LEFT(pp) == parent) \ _SET_SPNODE_LEFT(pp, n); \ else \ _SET_SPNODE_RIGHT(pp, n); \ break; \ } \ } else { \ t->root = sptree_##name##_balance(t, t->root, t->size); \ t->max_size = t->size; \ break; \ } \ } \ } \ } \ \ static inline void \ sptree_##name##_delete(sptree_##name *t, void *k) { \ spnode_t node = t->root; \ spnode_t parent = SPNIL; \ int lr = 0; \ while(node != SPNIL) { \ int r = t->elemcompare(k, ITHELEM(t, node), t->arg); \ if (r > 0) { \ parent = node; \ node = _GET_SPNODE_RIGHT(node); \ lr = +1; \ } else if (r < 0) { \ parent = node; \ node = _GET_SPNODE_LEFT(node); \ lr = -1; \ } else {/* found */ \ if (_GET_SPNODE_LEFT(node) == SPNIL && _GET_SPNODE_RIGHT(node) == SPNIL) { \ if ( parent == SPNIL ) \ t->root = SPNIL; \ else if (lr <0) \ _SET_SPNODE_LEFT(parent, SPNIL); \ else \ _SET_SPNODE_RIGHT(parent, SPNIL); \ } else if (_GET_SPNODE_LEFT(node) == SPNIL) { \ spnode_t child = _GET_SPNODE_RIGHT(node); \ if (parent == SPNIL) t->root = child; \ else if (lr <0) _SET_SPNODE_LEFT(parent, child); \ else _SET_SPNODE_RIGHT(parent, child); \ } else if (_GET_SPNODE_RIGHT(node) == SPNIL) { \ spnode_t child = _GET_SPNODE_LEFT(node); \ if (parent == SPNIL) t->root = child; \ else if (lr <0) _SET_SPNODE_LEFT(parent, child); \ else _SET_SPNODE_RIGHT(parent, child); \ } else { \ spnode_t todel = _GET_SPNODE_LEFT(node); \ \ parent = SPNIL; \ for(;;) { \ if ( _GET_SPNODE_RIGHT(todel) != SPNIL ) { \ parent = todel; \ todel = _GET_SPNODE_RIGHT(todel); \ } else \ break; \ } \ memcpy(ITHELEM(t, node), ITHELEM(t, todel), t->elemsize); \ if (parent != SPNIL) \ _SET_SPNODE_RIGHT(parent, _GET_SPNODE_LEFT(todel)); \ else \ _SET_SPNODE_LEFT(node, _GET_SPNODE_LEFT(todel)); \ node = todel; /* node to delete */ \ } \ \ _SET_SPNODE_LEFT(node, t->garbage_head); \ /* \ * Loop back on the right link indicates that the node \ * is in the garbage list. \ */ \ _SET_SPNODE_RIGHT(node, node); \ t->garbage_head = node; \ \ break; \ } \ } \ \ if (node == SPNIL) /* not found */ \ return; \ \ t->size --; \ if ( t->size > 0 && (double)t->size < alpha * t->max_size ) { \ t->root = sptree_##name##_balance(t, t->root, t->size); \ t->max_size = t->size; \ } \ } \ \ static inline spnode_t \ sptree_##name##_walk(sptree_##name *t, void* array, spnode_t limit, spnode_t offset) { \ int level = 0; \ spnode_t count= 0, \ node, \ stack[ t->max_depth + 1 ]; \ \ if (t->root == SPNIL) return 0; \ stack[0] = t->root; \ \ while( (node = _GET_SPNODE_LEFT( stack[level] )) != SPNIL ) { \ level++; \ stack[level] = node; \ } \ \ while( count < offset + limit && level >= 0 ) { \ \ if (count >= offset) \ memcpy((char *) array + (count-offset) * t->elemsize, \ ITHELEM(t, stack[level]), t->elemsize); \ count++; \ \ node = _GET_SPNODE_RIGHT( stack[level] ); \ level--; \ while( node != SPNIL ) { \ level++; \ stack[level] = node; \ node = _GET_SPNODE_LEFT( stack[level] ); \ } \ } \ \ return (count > offset) ? count - offset : 0; \ } \ \ static inline void \ sptree_##name##_walk_cb(sptree_##name *t, int (*cb)(void*, void*), void *cb_arg ) { \ int level = 0; \ spnode_t node, \ stack[ t->max_depth + 1 ]; \ \ if (t->root == SPNIL) return; \ stack[0] = t->root; \ \ while( (node = _GET_SPNODE_LEFT( stack[level] )) != SPNIL ) { \ level++; \ stack[level] = node; \ } \ \ while( level >= 0 ) { \ if ( cb(cb_arg, ITHELEM(t, stack[level])) == 0 ) \ return; \ \ node = _GET_SPNODE_RIGHT( stack[level] ); \ level--; \ while( node != SPNIL ) { \ level++; \ stack[level] = node; \ node = _GET_SPNODE_LEFT( stack[level] ); \ } \ } \ } \ \ typedef struct sptree_##name##_iterator { \ const sptree_##name *t; \ int level; \ int max_depth; \ spnode_t stack[0]; \ } sptree_##name##_iterator; \ \ static inline sptree_##name##_iterator * \ sptree_##name##_iterator_alloc(sptree_##name *t) { \ sptree_##name##_iterator *i = (sptree_##name##_iterator *) \ realloc(NULL, sizeof(*i) + sizeof(spnode_t) * (t->max_depth + 1)); \ i->t = t; \ i->level = 0; \ i->stack[0] = t->root; \ return i; \ } \ \ static inline sptree_##name##_iterator * \ sptree_##name##_iterator_init(sptree_##name *t) { \ sptree_##name##_iterator *i; \ spnode_t node; \ \ if (t->root == SPNIL) return NULL; \ i = sptree_##name##_iterator_alloc(t); \ \ while( (node = _GET_SPNODE_LEFT( i->stack[i->level] )) != SPNIL ) { \ i->level++; \ i->stack[i->level] = node; \ } \ \ return i; \ } \ \ static inline void \ sptree_##name##_iterator_init_set(const sptree_##name *t, sptree_##name##_iterator **i, \ void *k) { \ spnode_t node; \ int lastLevelEq = -1, cmp; \ \ if ((*i) == NULL || t->max_depth > (*i)->max_depth) \ *i = (sptree_##name##_iterator *) realloc(*i, sizeof(**i) + \ sizeof(spnode_t) * (t->max_depth + 31)); \ \ (*i)->t = t; \ (*i)->level = -1; \ if (t->root == SPNIL) { \ (*i)->max_depth = 0; /* valgrind points out it's used in the check above ^.*/ \ return; \ } \ \ (*i)->max_depth = t->max_depth; \ (*i)->stack[0] = t->root; \ \ node = t->root; \ while(node != SPNIL) { \ cmp = t->compare(k, ITHELEM(t, node), t->arg); \ \ (*i)->level++; \ (*i)->stack[(*i)->level] = node; \ \ if (cmp > 0) { \ (*i)->level--; /* exclude current node from path, ie "mark as visited" */ \ node = _GET_SPNODE_RIGHT(node); \ } else if (cmp < 0) { \ node = _GET_SPNODE_LEFT(node); \ } else { \ lastLevelEq = (*i)->level; \ node = _GET_SPNODE_LEFT(node); /* one way iterator: from left to right */ \ } \ } \ \ if (lastLevelEq >= 0) \ (*i)->level = lastLevelEq; \ } \ \ static inline sptree_##name##_iterator * \ sptree_##name##_iterator_reverse_init(sptree_##name *t) { \ sptree_##name##_iterator *i; \ spnode_t node; \ \ if (t->root == SPNIL) return NULL; \ i = sptree_##name##_iterator_alloc(t); \ \ while( (node = _GET_SPNODE_RIGHT( i->stack[i->level] )) != SPNIL ) { \ i->level++; \ i->stack[i->level] = node; \ } \ \ return i; \ } \ \ static inline void \ sptree_##name##_iterator_reverse_init_set(const sptree_##name *t, \ sptree_##name##_iterator **i, void *k) { \ spnode_t node; \ int lastLevelEq = -1, cmp; \ \ if ((*i) == NULL || t->max_depth > (*i)->max_depth) \ *i = (sptree_##name##_iterator *) realloc(*i, sizeof(**i) + \ sizeof(spnode_t) * (t->max_depth + 31)); \ \ (*i)->t = t; \ (*i)->level = -1; \ if (t->root == SPNIL) { \ (*i)->max_depth = 0; \ return; \ } \ \ (*i)->max_depth = t->max_depth; \ (*i)->stack[0] = t->root; \ \ node = t->root; \ while(node != SPNIL) { \ cmp = t->compare(k, ITHELEM(t, node), t->arg); \ \ (*i)->level++; \ (*i)->stack[(*i)->level] = node; \ \ if (cmp < 0) { \ (*i)->level--; \ node = _GET_SPNODE_LEFT(node); \ } else if (cmp > 0) { \ node = _GET_SPNODE_RIGHT(node); \ } else { \ lastLevelEq = (*i)->level; \ node = _GET_SPNODE_RIGHT(node); \ } \ } \ \ if (lastLevelEq >= 0) \ (*i)->level = lastLevelEq; \ } \ \ static inline void \ sptree_##name##_iterator_free(sptree_##name##_iterator *i) { \ if (i == NULL) return; \ free(i); \ } \ \ /** \ * Get the last node on the iterator stack, check \ * if the node is not deleted. \ */ \ static inline spnode_t \ sptree_##name##_iterator_next_node(sptree_##name##_iterator *i) { \ \ while (i->level >= 0) { \ spnode_t return_node = i->stack[i->level--]; \ if (! sptree_##name##_node_is_deleted(i->t, return_node)) \ return return_node; \ } \ return SPNIL; \ } \ \ static inline void* \ sptree_##name##_iterator_next(sptree_##name##_iterator *i) { \ \ if (i == NULL) return NULL; \ \ const sptree_##name *t = i->t; \ spnode_t returnNode = sptree_##name##_iterator_next_node(i); \ \ if (returnNode == SPNIL) return NULL; \ \ spnode_t node = _GET_SPNODE_RIGHT(returnNode); \ while (node != SPNIL) { \ i->level++; \ i->stack[i->level] = node; \ node = _GET_SPNODE_LEFT(i->stack[i->level]); \ } \ \ return ITHELEM(t, returnNode); \ } \ \ static inline void* \ sptree_##name##_iterator_reverse_next(sptree_##name##_iterator *i) { \ \ if (i == NULL) return NULL; \ \ const sptree_##name *t = i->t; \ spnode_t returnNode = sptree_##name##_iterator_next_node(i); \ \ if (returnNode == SPNIL) return NULL; \ \ spnode_t node = _GET_SPNODE_LEFT(returnNode); \ while (node != SPNIL) { \ i->level++; \ i->stack[i->level] = node; \ node = _GET_SPNODE_RIGHT(i->stack[i->level]); \ } \ return ITHELEM(t, returnNode); \ } /* * vim: ts=4 sts=4 et */ #endif #if defined(__cplusplus) } #endif /* defined(__cplusplus) */ tarantool-1.5.1.218.g1a69fd6/third_party/libev/0000775000000000000000000000000012242653255017420 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/libev/ev_poll.c0000664000000000000000000001053312202131537021214 0ustar rootroot/* * libev poll fd activity backend * * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #include void inline_size pollidx_init (int *base, int count) { /* consider using memset (.., -1, ...), which is practically guaranteed * to work on all systems implementing poll */ while (count--) *base++ = -1; } static void poll_modify (EV_P_ int fd, int oev, int nev) { int idx; if (oev == nev) return; array_needsize (int, pollidxs, pollidxmax, fd + 1, pollidx_init); idx = pollidxs [fd]; if (idx < 0) /* need to allocate a new pollfd */ { pollidxs [fd] = idx = pollcnt++; array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2); polls [idx].fd = fd; } assert (polls [idx].fd == fd); if (nev) polls [idx].events = (nev & EV_READ ? POLLIN : 0) | (nev & EV_WRITE ? POLLOUT : 0); else /* remove pollfd */ { pollidxs [fd] = -1; if (expect_true (idx < --pollcnt)) { polls [idx] = polls [pollcnt]; pollidxs [polls [idx].fd] = idx; } } } static void poll_poll (EV_P_ ev_tstamp timeout) { struct pollfd *p; int res; EV_RELEASE_CB; res = poll (polls, pollcnt, timeout * 1e3); EV_ACQUIRE_CB; if (expect_false (res < 0)) { if (errno == EBADF) fd_ebadf (EV_A); else if (errno == ENOMEM && !syserr_cb) fd_enomem (EV_A); else if (errno != EINTR) ev_syserr ("(libev) poll"); } else for (p = polls; res; ++p) { assert (("libev: poll() returned illegal result, broken BSD kernel?", p < polls + pollcnt)); if (expect_false (p->revents)) /* this expect is debatable */ { --res; if (expect_false (p->revents & POLLNVAL)) fd_kill (EV_A_ p->fd); else fd_event ( EV_A_ p->fd, (p->revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) ); } } } int inline_size poll_init (EV_P_ int flags) { backend_mintime = 1e-3; backend_modify = poll_modify; backend_poll = poll_poll; pollidxs = 0; pollidxmax = 0; polls = 0; pollmax = 0; pollcnt = 0; return EVBACKEND_POLL; } void inline_size poll_destroy (EV_P) { ev_free (pollidxs); ev_free (polls); } tarantool-1.5.1.218.g1a69fd6/third_party/libev/configure.ac0000664000000000000000000000062512202131537021677 0ustar rootrootorig_CFLAGS="$CFLAGS" AC_INIT AC_CONFIG_SRCDIR([ev_epoll.c]) AM_INIT_AUTOMAKE(libev,4.11) dnl also update ev.h! AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE AC_PROG_CC dnl Supply default CFLAGS, if not specified if test -z "$orig_CFLAGS"; then if test x$GCC = xyes; then CFLAGS="-g -O3" fi fi AC_PROG_INSTALL AC_PROG_LIBTOOL m4_include([libev.m4]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT tarantool-1.5.1.218.g1a69fd6/third_party/libev/mkinstalldirs0000775000000000000000000000370412202131537022220 0ustar rootroot#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here tarantool-1.5.1.218.g1a69fd6/third_party/libev/ltmain.sh0000775000000000000000000073337712202131537021255 0ustar rootroot# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6b Debian-2.2.6b-2" TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 tarantool-1.5.1.218.g1a69fd6/third_party/libev/configure0000775000000000000000000136240712202131537021332 0ustar rootroot#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="ev_epoll.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld enable_libtool_lock ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=libev VERSION=4.04 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:4494: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:4497: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:4500: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5706 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7231: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7235: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7570: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7574: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7675: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7679: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7730: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7734: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10114 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10210 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: if test "x$GCC" = xyes ; then CFLAGS="-O3 $CFLAGS" fi for ac_header in sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in clock_gettime do : ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CLOCK_GETTIME 1 _ACEOF else if test $(uname) = Linux; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5 $as_echo_n "checking for clock_gettime syscall... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_have_clock_syscall=1 $as_echo "#define HAVE_CLOCK_SYSCALL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi unset ac_cv_func_clock_gettime for ac_func in clock_gettime do : ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CLOCK_GETTIME 1 _ACEOF fi done fi fi done for ac_func in nanosleep do : ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" if test "x$ac_cv_func_nanosleep" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NANOSLEEP 1 _ACEOF else if test -z "$LIBEV_M4_AVOID_LIBRT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 $as_echo_n "checking for nanosleep in -lrt... " >&6; } if test "${ac_cv_lib_rt_nanosleep+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char nanosleep (); int main () { return nanosleep (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_nanosleep=yes else ac_cv_lib_rt_nanosleep=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 $as_echo "$ac_cv_lib_rt_nanosleep" >&6; } if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi unset ac_cv_func_nanosleep for ac_func in nanosleep do : ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" if test "x$ac_cv_func_nanosleep" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NANOSLEEP 1 _ACEOF fi done fi fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5 $as_echo_n "checking for ceil in -lm... " >&6; } if test "${ac_cv_lib_m_ceil+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ceil (); int main () { return ceil (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_ceil=yes else ac_cv_lib_m_ceil=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ceil" >&5 $as_echo "$ac_cv_lib_m_ceil" >&6; } if test "x$ac_cv_lib_m_ceil" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi tarantool-1.5.1.218.g1a69fd6/third_party/libev/update_ev_c0000775000000000000000000000023312202131537021610 0ustar rootroot#!/bin/sh -e ( sed -ne '1,\%/\* ECB.H BEGIN \*/%p' ev.c cat ~/src/libecb/ecb.h sed -ne '\%/\* ECB.H END \*/%,$p' ev.c ) >ev.c~ && mv ev.c~ ev.c tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev_select.c0000664000000000000000000002115512202131537021527 0ustar rootroot/* * libev select fd activity backend * * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef _WIN32 /* for unix systems */ # include # ifndef __hpux /* for REAL unix systems */ # include # endif #endif #ifndef EV_SELECT_USE_FD_SET # ifdef NFDBITS # define EV_SELECT_USE_FD_SET 0 # else # define EV_SELECT_USE_FD_SET 1 # endif #endif #if EV_SELECT_IS_WINSOCKET # undef EV_SELECT_USE_FD_SET # define EV_SELECT_USE_FD_SET 1 # undef NFDBITS # define NFDBITS 0 #endif #if !EV_SELECT_USE_FD_SET # define NFDBYTES (NFDBITS / 8) #endif #include static void select_modify (EV_P_ int fd, int oev, int nev) { if (oev == nev) return; { #if EV_SELECT_USE_FD_SET #if EV_SELECT_IS_WINSOCKET SOCKET handle = anfds [fd].handle; #else int handle = fd; #endif assert (("libev: fd >= FD_SETSIZE passed to fd_set-based select backend", fd < FD_SETSIZE)); /* FD_SET is broken on windows (it adds the fd to a set twice or more, * which eventually leads to overflows). Need to call it only on changes. */ #if EV_SELECT_IS_WINSOCKET if ((oev ^ nev) & EV_READ) #endif if (nev & EV_READ) FD_SET (handle, (fd_set *)vec_ri); else FD_CLR (handle, (fd_set *)vec_ri); #if EV_SELECT_IS_WINSOCKET if ((oev ^ nev) & EV_WRITE) #endif if (nev & EV_WRITE) FD_SET (handle, (fd_set *)vec_wi); else FD_CLR (handle, (fd_set *)vec_wi); #else int word = fd / NFDBITS; fd_mask mask = 1UL << (fd % NFDBITS); if (expect_false (vec_max <= word)) { int new_max = word + 1; vec_ri = ev_realloc (vec_ri, new_max * NFDBYTES); vec_ro = ev_realloc (vec_ro, new_max * NFDBYTES); /* could free/malloc */ vec_wi = ev_realloc (vec_wi, new_max * NFDBYTES); vec_wo = ev_realloc (vec_wo, new_max * NFDBYTES); /* could free/malloc */ #ifdef _WIN32 vec_eo = ev_realloc (vec_eo, new_max * NFDBYTES); /* could free/malloc */ #endif for (; vec_max < new_max; ++vec_max) ((fd_mask *)vec_ri) [vec_max] = ((fd_mask *)vec_wi) [vec_max] = 0; } ((fd_mask *)vec_ri) [word] |= mask; if (!(nev & EV_READ)) ((fd_mask *)vec_ri) [word] &= ~mask; ((fd_mask *)vec_wi) [word] |= mask; if (!(nev & EV_WRITE)) ((fd_mask *)vec_wi) [word] &= ~mask; #endif } } static void select_poll (EV_P_ ev_tstamp timeout) { struct timeval tv; int res; int fd_setsize; EV_RELEASE_CB; EV_TV_SET (tv, timeout); #if EV_SELECT_USE_FD_SET fd_setsize = sizeof (fd_set); #else fd_setsize = vec_max * NFDBYTES; #endif memcpy (vec_ro, vec_ri, fd_setsize); memcpy (vec_wo, vec_wi, fd_setsize); #ifdef _WIN32 /* pass in the write set as except set. * the idea behind this is to work around a windows bug that causes * errors to be reported as an exception and not by setting * the writable bit. this is so uncontrollably lame. */ memcpy (vec_eo, vec_wi, fd_setsize); res = select (vec_max * NFDBITS, (fd_set *)vec_ro, (fd_set *)vec_wo, (fd_set *)vec_eo, &tv); #elif EV_SELECT_USE_FD_SET fd_setsize = anfdmax < FD_SETSIZE ? anfdmax : FD_SETSIZE; res = select (fd_setsize, (fd_set *)vec_ro, (fd_set *)vec_wo, 0, &tv); #else res = select (vec_max * NFDBITS, (fd_set *)vec_ro, (fd_set *)vec_wo, 0, &tv); #endif EV_ACQUIRE_CB; if (expect_false (res < 0)) { #if EV_SELECT_IS_WINSOCKET errno = WSAGetLastError (); #endif #ifdef WSABASEERR /* on windows, select returns incompatible error codes, fix this */ if (errno >= WSABASEERR && errno < WSABASEERR + 1000) if (errno == WSAENOTSOCK) errno = EBADF; else errno -= WSABASEERR; #endif #ifdef _WIN32 /* select on windows erroneously returns EINVAL when no fd sets have been * provided (this is documented). what microsoft doesn't tell you that this bug * exists even when the fd sets _are_ provided, so we have to check for this bug * here and emulate by sleeping manually. * we also get EINVAL when the timeout is invalid, but we ignore this case here * and assume that EINVAL always means: you have to wait manually. */ if (errno == EINVAL) { if (timeout) { unsigned long ms = timeout * 1e3; Sleep (ms ? ms : 1); } return; } #endif if (errno == EBADF) fd_ebadf (EV_A); else if (errno == ENOMEM && !syserr_cb) fd_enomem (EV_A); else if (errno != EINTR) ev_syserr ("(libev) select"); return; } #if EV_SELECT_USE_FD_SET { int fd; for (fd = 0; fd < anfdmax; ++fd) if (anfds [fd].events) { int events = 0; #if EV_SELECT_IS_WINSOCKET SOCKET handle = anfds [fd].handle; #else int handle = fd; #endif if (FD_ISSET (handle, (fd_set *)vec_ro)) events |= EV_READ; if (FD_ISSET (handle, (fd_set *)vec_wo)) events |= EV_WRITE; #ifdef _WIN32 if (FD_ISSET (handle, (fd_set *)vec_eo)) events |= EV_WRITE; #endif if (expect_true (events)) fd_event (EV_A_ fd, events); } } #else { int word, bit; for (word = vec_max; word--; ) { fd_mask word_r = ((fd_mask *)vec_ro) [word]; fd_mask word_w = ((fd_mask *)vec_wo) [word]; #ifdef _WIN32 word_w |= ((fd_mask *)vec_eo) [word]; #endif if (word_r || word_w) for (bit = NFDBITS; bit--; ) { fd_mask mask = 1UL << bit; int events = 0; events |= word_r & mask ? EV_READ : 0; events |= word_w & mask ? EV_WRITE : 0; if (expect_true (events)) fd_event (EV_A_ word * NFDBITS + bit, events); } } } #endif } int inline_size select_init (EV_P_ int flags) { backend_mintime = 1e-6; backend_modify = select_modify; backend_poll = select_poll; #if EV_SELECT_USE_FD_SET vec_ri = ev_malloc (sizeof (fd_set)); FD_ZERO ((fd_set *)vec_ri); vec_ro = ev_malloc (sizeof (fd_set)); vec_wi = ev_malloc (sizeof (fd_set)); FD_ZERO ((fd_set *)vec_wi); vec_wo = ev_malloc (sizeof (fd_set)); #ifdef _WIN32 vec_eo = ev_malloc (sizeof (fd_set)); #endif #else vec_max = 0; vec_ri = 0; vec_ro = 0; vec_wi = 0; vec_wo = 0; #ifdef _WIN32 vec_eo = 0; #endif #endif return EVBACKEND_SELECT; } void inline_size select_destroy (EV_P) { ev_free (vec_ri); ev_free (vec_ro); ev_free (vec_wi); ev_free (vec_wo); #ifdef _WIN32 ev_free (vec_eo); #endif } tarantool-1.5.1.218.g1a69fd6/third_party/libev/autogen.sh0000664000000000000000000000006212202131537021402 0ustar rootroot#!/bin/sh autoreconf --install --symlink --force tarantool-1.5.1.218.g1a69fd6/third_party/libev/README.embed0000664000000000000000000000014712202131537021343 0ustar rootrootThis file is now included in the main libev documentation, see http://cvs.schmorp.de/libev/ev.html tarantool-1.5.1.218.g1a69fd6/third_party/libev/event.c0000664000000000000000000002333612202131537020702 0ustar rootroot/* * libevent compatibility layer * * Copyright (c) 2007,2008,2009,2010,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #include #include #include #ifdef EV_EVENT_H # include EV_EVENT_H #else # include "event.h" #endif #if EV_MULTIPLICITY # define dLOOPev struct ev_loop *loop = (struct ev_loop *)ev->ev_base # define dLOOPbase struct ev_loop *loop = (struct ev_loop *)base #else # define dLOOPev # define dLOOPbase #endif /* never accessed, will always be cast from/to ev_loop */ struct event_base { int dummy; }; static struct event_base *ev_x_cur; static ev_tstamp ev_tv_get (struct timeval *tv) { if (tv) { ev_tstamp after = tv->tv_sec + tv->tv_usec * 1e-6; return after ? after : 1e-6; } else return -1.; } #define EVENT_STRINGIFY(s) # s #define EVENT_VERSION(a,b) EVENT_STRINGIFY (a) "." EVENT_STRINGIFY (b) const char * event_get_version (void) { /* returns ABI, not API or library, version */ return EVENT_VERSION (EV_VERSION_MAJOR, EV_VERSION_MINOR); } const char * event_get_method (void) { return "libev"; } void *event_init (void) { #if EV_MULTIPLICITY if (ev_x_cur) ev_x_cur = (struct event_base *)ev_loop_new (EVFLAG_AUTO); else ev_x_cur = (struct event_base *)ev_default_loop (EVFLAG_AUTO); #else assert (("libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY", !ev_x_cur)); ev_x_cur = (struct event_base *)(long)ev_default_loop (EVFLAG_AUTO); #endif return ev_x_cur; } const char * event_base_get_method (const struct event_base *base) { return "libev"; } struct event_base * event_base_new (void) { #if EV_MULTIPLICITY return (struct event_base *)ev_loop_new (EVFLAG_AUTO); #else assert (("libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY")); return NULL; #endif } void event_base_free (struct event_base *base) { dLOOPbase; #if EV_MULTIPLICITY if (!ev_is_default_loop (loop)) ev_loop_destroy (loop); #endif } int event_dispatch (void) { return event_base_dispatch (ev_x_cur); } #ifdef EV_STANDALONE void event_set_log_callback (event_log_cb cb) { /* nop */ } #endif int event_loop (int flags) { return event_base_loop (ev_x_cur, flags); } int event_loopexit (struct timeval *tv) { return event_base_loopexit (ev_x_cur, tv); } event_callback_fn event_get_callback (const struct event *ev) { return ev->ev_callback; } static void ev_x_cb (struct event *ev, int revents) { revents &= EV_READ | EV_WRITE | EV_TIMER | EV_SIGNAL; ev->ev_res = revents; ev->ev_callback (ev->ev_fd, (short)revents, ev->ev_arg); } static void ev_x_cb_sig (EV_P_ struct ev_signal *w, int revents) { struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, iosig.sig)); if (revents & EV_ERROR) event_del (ev); ev_x_cb (ev, revents); } static void ev_x_cb_io (EV_P_ struct ev_io *w, int revents) { struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, iosig.io)); if ((revents & EV_ERROR) || !(ev->ev_events & EV_PERSIST)) event_del (ev); ev_x_cb (ev, revents); } static void ev_x_cb_to (EV_P_ struct ev_timer *w, int revents) { struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, to)); event_del (ev); ev_x_cb (ev, revents); } void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg) { if (events & EV_SIGNAL) ev_init (&ev->iosig.sig, ev_x_cb_sig); else ev_init (&ev->iosig.io, ev_x_cb_io); ev_init (&ev->to, ev_x_cb_to); ev->ev_base = ev_x_cur; /* not threadsafe, but it's how libevent works */ ev->ev_fd = fd; ev->ev_events = events; ev->ev_pri = 0; ev->ev_callback = cb; ev->ev_arg = arg; ev->ev_res = 0; ev->ev_flags = EVLIST_INIT; } int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv) { return event_base_once (ev_x_cur, fd, events, cb, arg, tv); } int event_add (struct event *ev, struct timeval *tv) { dLOOPev; if (ev->ev_events & EV_SIGNAL) { if (!ev_is_active (&ev->iosig.sig)) { ev_signal_set (&ev->iosig.sig, ev->ev_fd); ev_signal_start (EV_A_ &ev->iosig.sig); ev->ev_flags |= EVLIST_SIGNAL; } } else if (ev->ev_events & (EV_READ | EV_WRITE)) { if (!ev_is_active (&ev->iosig.io)) { ev_io_set (&ev->iosig.io, ev->ev_fd, ev->ev_events & (EV_READ | EV_WRITE)); ev_io_start (EV_A_ &ev->iosig.io); ev->ev_flags |= EVLIST_INSERTED; } } if (tv) { ev->to.repeat = ev_tv_get (tv); ev_timer_again (EV_A_ &ev->to); ev->ev_flags |= EVLIST_TIMEOUT; } else { ev_timer_stop (EV_A_ &ev->to); ev->ev_flags &= ~EVLIST_TIMEOUT; } ev->ev_flags |= EVLIST_ACTIVE; return 0; } int event_del (struct event *ev) { dLOOPev; if (ev->ev_events & EV_SIGNAL) ev_signal_stop (EV_A_ &ev->iosig.sig); else if (ev->ev_events & (EV_READ | EV_WRITE)) ev_io_stop (EV_A_ &ev->iosig.io); if (ev_is_active (&ev->to)) ev_timer_stop (EV_A_ &ev->to); ev->ev_flags = EVLIST_INIT; return 0; } void event_active (struct event *ev, int res, short ncalls) { dLOOPev; if (res & EV_TIMEOUT) ev_feed_event (EV_A_ &ev->to, res & EV_TIMEOUT); if (res & EV_SIGNAL) ev_feed_event (EV_A_ &ev->iosig.sig, res & EV_SIGNAL); if (res & (EV_READ | EV_WRITE)) ev_feed_event (EV_A_ &ev->iosig.io, res & (EV_READ | EV_WRITE)); } int event_pending (struct event *ev, short events, struct timeval *tv) { short revents = 0; dLOOPev; if (ev->ev_events & EV_SIGNAL) { /* sig */ if (ev_is_active (&ev->iosig.sig) || ev_is_pending (&ev->iosig.sig)) revents |= EV_SIGNAL; } else if (ev->ev_events & (EV_READ | EV_WRITE)) { /* io */ if (ev_is_active (&ev->iosig.io) || ev_is_pending (&ev->iosig.io)) revents |= ev->ev_events & (EV_READ | EV_WRITE); } if (ev->ev_events & EV_TIMEOUT || ev_is_active (&ev->to) || ev_is_pending (&ev->to)) { revents |= EV_TIMEOUT; if (tv) { ev_tstamp at = ev_now (EV_A); tv->tv_sec = (long)at; tv->tv_usec = (long)((at - (ev_tstamp)tv->tv_sec) * 1e6); } } return events & revents; } int event_priority_init (int npri) { return event_base_priority_init (ev_x_cur, npri); } int event_priority_set (struct event *ev, int pri) { ev->ev_pri = pri; return 0; } int event_base_set (struct event_base *base, struct event *ev) { ev->ev_base = base; return 0; } int event_base_loop (struct event_base *base, int flags) { dLOOPbase; return !ev_run (EV_A_ flags); } int event_base_dispatch (struct event_base *base) { return event_base_loop (base, 0); } static void ev_x_loopexit_cb (int revents, void *base) { dLOOPbase; ev_break (EV_A_ EVBREAK_ONE); } int event_base_loopexit (struct event_base *base, struct timeval *tv) { ev_tstamp after = ev_tv_get (tv); dLOOPbase; ev_once (EV_A_ -1, 0, after >= 0. ? after : 0., ev_x_loopexit_cb, (void *)base); return 0; } struct ev_x_once { int fd; void (*cb)(int, short, void *); void *arg; }; static void ev_x_once_cb (int revents, void *arg) { struct ev_x_once *once = (struct ev_x_once *)arg; once->cb (once->fd, (short)revents, once->arg); free (once); } int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv) { struct ev_x_once *once = (struct ev_x_once *)malloc (sizeof (struct ev_x_once)); dLOOPbase; if (!once) return -1; once->fd = fd; once->cb = cb; once->arg = arg; ev_once (EV_A_ fd, events & (EV_READ | EV_WRITE), ev_tv_get (tv), ev_x_once_cb, (void *)once); return 0; } int event_base_priority_init (struct event_base *base, int npri) { /*dLOOPbase;*/ return 0; } tarantool-1.5.1.218.g1a69fd6/third_party/libev/depcomp0000775000000000000000000004426712202131537021000 0ustar rootroot#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: tarantool-1.5.1.218.g1a69fd6/third_party/libev/Makefile.am0000664000000000000000000000102512202131537021440 0ustar rootrootAUTOMAKE_OPTIONS = foreign VERSION_INFO = 4:0:0 EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ ev_vars.h ev_wrap.h \ ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ ev.3 ev.pod Symbols.ev Symbols.event man_MANS = ev.3 include_HEADERS = ev.h ev++.h event.h lib_LTLIBRARIES = libev.la libev_la_SOURCES = ev.c event.c libev_la_LDFLAGS = -version-info $(VERSION_INFO) ev.3: ev.pod pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@ tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev.30000664000000000000000000100430512202131537020107 0ustar rootroot.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "LIBEV 3" .TH LIBEV 3 "2012-05-26" "libev-4.11" "libev - high performance full featured event loop" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" libev \- a high performance full\-featured event loop written in C .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& #include .Ve .SS "\s-1EXAMPLE\s0 \s-1PROGRAM\s0" .IX Subsection "EXAMPLE PROGRAM" .Vb 2 \& // a single header file is required \& #include \& \& #include // for puts \& \& // every watcher type has its own typedef\*(Aqd struct \& // with the name ev_TYPE \& ev_io stdin_watcher; \& ev_timer timeout_watcher; \& \& // all watcher callbacks have a similar signature \& // this callback is called when data is readable on stdin \& static void \& stdin_cb (EV_P_ ev_io *w, int revents) \& { \& puts ("stdin ready"); \& // for one\-shot events, one must manually stop the watcher \& // with its corresponding stop function. \& ev_io_stop (EV_A_ w); \& \& // this causes all nested ev_run\*(Aqs to stop iterating \& ev_break (EV_A_ EVBREAK_ALL); \& } \& \& // another callback, this time for a time\-out \& static void \& timeout_cb (EV_P_ ev_timer *w, int revents) \& { \& puts ("timeout"); \& // this causes the innermost ev_run to stop iterating \& ev_break (EV_A_ EVBREAK_ONE); \& } \& \& int \& main (void) \& { \& // use the default event loop unless you have special needs \& struct ev_loop *loop = EV_DEFAULT; \& \& // initialise an io watcher, then start it \& // this one will watch for stdin to become readable \& ev_io_init (&stdin_watcher, stdin_cb, /*STDIN_FILENO*/ 0, EV_READ); \& ev_io_start (loop, &stdin_watcher); \& \& // initialise a timer watcher, then start it \& // simple non\-repeating 5.5 second timeout \& ev_timer_init (&timeout_watcher, timeout_cb, 5.5, 0.); \& ev_timer_start (loop, &timeout_watcher); \& \& // now wait for events to arrive \& ev_run (loop, 0); \& \& // break was called, so exit \& return 0; \& } .Ve .SH "ABOUT THIS DOCUMENT" .IX Header "ABOUT THIS DOCUMENT" This document documents the libev software package. .PP The newest version of this document is also available as an html-formatted web page you might find easier to navigate when reading it for the first time: . .PP While this document tries to be as complete as possible in documenting libev, its usage and the rationale behind its design, it is not a tutorial on event-based programming, nor will it introduce event-based programming with libev. .PP Familiarity with event based programming techniques in general is assumed throughout this document. .SH "WHAT TO READ WHEN IN A HURRY" .IX Header "WHAT TO READ WHEN IN A HURRY" This manual tries to be very detailed, but unfortunately, this also makes it very long. If you just want to know the basics of libev, I suggest reading \*(L"\s-1ANATOMY\s0 \s-1OF\s0 A \s-1WATCHER\s0\*(R", then the \*(L"\s-1EXAMPLE\s0 \s-1PROGRAM\s0\*(R" above and look up the missing functions in \*(L"\s-1GLOBAL\s0 \s-1FUNCTIONS\s0\*(R" and the \f(CW\*(C`ev_io\*(C'\fR and \&\f(CW\*(C`ev_timer\*(C'\fR sections in \*(L"\s-1WATCHER\s0 \s-1TYPES\s0\*(R". .SH "ABOUT LIBEV" .IX Header "ABOUT LIBEV" Libev is an event loop: you register interest in certain events (such as a file descriptor being readable or a timeout occurring), and it will manage these event sources and provide your program with events. .PP To do this, it must take more or less complete control over your process (or thread) by executing the \fIevent loop\fR handler, and will then communicate events via a callback mechanism. .PP You register interest in certain events by registering so-called \fIevent watchers\fR, which are relatively small C structures you initialise with the details of the event, and then hand it over to libev by \fIstarting\fR the watcher. .SS "\s-1FEATURES\s0" .IX Subsection "FEATURES" Libev supports \f(CW\*(C`select\*(C'\fR, \f(CW\*(C`poll\*(C'\fR, the Linux-specific \f(CW\*(C`epoll\*(C'\fR, the BSD-specific \f(CW\*(C`kqueue\*(C'\fR and the Solaris-specific event port mechanisms for file descriptor events (\f(CW\*(C`ev_io\*(C'\fR), the Linux \f(CW\*(C`inotify\*(C'\fR interface (for \f(CW\*(C`ev_stat\*(C'\fR), Linux eventfd/signalfd (for faster and cleaner inter-thread wakeup (\f(CW\*(C`ev_async\*(C'\fR)/signal handling (\f(CW\*(C`ev_signal\*(C'\fR)) relative timers (\f(CW\*(C`ev_timer\*(C'\fR), absolute timers with customised rescheduling (\f(CW\*(C`ev_periodic\*(C'\fR), synchronous signals (\f(CW\*(C`ev_signal\*(C'\fR), process status change events (\f(CW\*(C`ev_child\*(C'\fR), and event watchers dealing with the event loop mechanism itself (\f(CW\*(C`ev_idle\*(C'\fR, \f(CW\*(C`ev_embed\*(C'\fR, \f(CW\*(C`ev_prepare\*(C'\fR and \&\f(CW\*(C`ev_check\*(C'\fR watchers) as well as file watchers (\f(CW\*(C`ev_stat\*(C'\fR) and even limited support for fork events (\f(CW\*(C`ev_fork\*(C'\fR). .PP It also is quite fast (see this benchmark comparing it to libevent for example). .SS "\s-1CONVENTIONS\s0" .IX Subsection "CONVENTIONS" Libev is very configurable. In this manual the default (and most common) configuration will be described, which supports multiple event loops. For more info about various configuration options please have a look at \&\fB\s-1EMBED\s0\fR section in this manual. If libev was configured without support for multiple event loops, then all functions taking an initial argument of name \f(CW\*(C`loop\*(C'\fR (which is always of type \f(CW\*(C`struct ev_loop *\*(C'\fR) will not have this argument. .SS "\s-1TIME\s0 \s-1REPRESENTATION\s0" .IX Subsection "TIME REPRESENTATION" Libev represents time as a single floating point number, representing the (fractional) number of seconds since the (\s-1POSIX\s0) epoch (in practice somewhere near the beginning of 1970, details are complicated, don't ask). This type is called \f(CW\*(C`ev_tstamp\*(C'\fR, which is what you should use too. It usually aliases to the \f(CW\*(C`double\*(C'\fR type in C. When you need to do any calculations on it, you should treat it as some floating point value. .PP Unlike the name component \f(CW\*(C`stamp\*(C'\fR might indicate, it is also used for time differences (e.g. delays) throughout libev. .SH "ERROR HANDLING" .IX Header "ERROR HANDLING" Libev knows three classes of errors: operating system errors, usage errors and internal errors (bugs). .PP When libev catches an operating system error it cannot handle (for example a system call indicating a condition libev cannot fix), it calls the callback set via \f(CW\*(C`ev_set_syserr_cb\*(C'\fR, which is supposed to fix the problem or abort. The default is to print a diagnostic message and to call \f(CW\*(C`abort ()\*(C'\fR. .PP When libev detects a usage error such as a negative timer interval, then it will print a diagnostic message and abort (via the \f(CW\*(C`assert\*(C'\fR mechanism, so \f(CW\*(C`NDEBUG\*(C'\fR will disable this checking): these are programming errors in the libev caller and need to be fixed there. .PP Libev also has a few internal error-checking \f(CW\*(C`assert\*(C'\fRions, and also has extensive consistency checking code. These do not trigger under normal circumstances, as they indicate either a bug in libev or worse. .SH "GLOBAL FUNCTIONS" .IX Header "GLOBAL FUNCTIONS" These functions can be called anytime, even before initialising the library in any way. .IP "ev_tstamp ev_time ()" 4 .IX Item "ev_tstamp ev_time ()" Returns the current time as libev would use it. Please note that the \&\f(CW\*(C`ev_now\*(C'\fR function is usually faster and also often returns the timestamp you actually want to know. Also interesting is the combination of \&\f(CW\*(C`ev_now_update\*(C'\fR and \f(CW\*(C`ev_now\*(C'\fR. .IP "ev_sleep (ev_tstamp interval)" 4 .IX Item "ev_sleep (ev_tstamp interval)" Sleep for the given interval: The current thread will be blocked until either it is interrupted or the given time interval has passed (approximately \- it might return a bit earlier even if not interrupted). Returns immediately if \f(CW\*(C`interval <= 0\*(C'\fR. .Sp Basically this is a sub-second-resolution \f(CW\*(C`sleep ()\*(C'\fR. .Sp The range of the \f(CW\*(C`interval\*(C'\fR is limited \- libev only guarantees to work with sleep times of up to one day (\f(CW\*(C`interval <= 86400\*(C'\fR). .IP "int ev_version_major ()" 4 .IX Item "int ev_version_major ()" .PD 0 .IP "int ev_version_minor ()" 4 .IX Item "int ev_version_minor ()" .PD You can find out the major and minor \s-1ABI\s0 version numbers of the library you linked against by calling the functions \f(CW\*(C`ev_version_major\*(C'\fR and \&\f(CW\*(C`ev_version_minor\*(C'\fR. If you want, you can compare against the global symbols \f(CW\*(C`EV_VERSION_MAJOR\*(C'\fR and \f(CW\*(C`EV_VERSION_MINOR\*(C'\fR, which specify the version of the library your program was compiled against. .Sp These version numbers refer to the \s-1ABI\s0 version of the library, not the release version. .Sp Usually, it's a good idea to terminate if the major versions mismatch, as this indicates an incompatible change. Minor versions are usually compatible to older versions, so a larger minor version alone is usually not a problem. .Sp Example: Make sure we haven't accidentally been linked against the wrong version (note, however, that this will not detect other \s-1ABI\s0 mismatches, such as \s-1LFS\s0 or reentrancy). .Sp .Vb 3 \& assert (("libev version mismatch", \& ev_version_major () == EV_VERSION_MAJOR \& && ev_version_minor () >= EV_VERSION_MINOR)); .Ve .IP "unsigned int ev_supported_backends ()" 4 .IX Item "unsigned int ev_supported_backends ()" Return the set of all backends (i.e. their corresponding \f(CW\*(C`EV_BACKEND_*\*(C'\fR value) compiled into this binary of libev (independent of their availability on the system you are running on). See \f(CW\*(C`ev_default_loop\*(C'\fR for a description of the set values. .Sp Example: make sure we have the epoll method, because yeah this is cool and a must have and can we have a torrent of it please!!!11 .Sp .Vb 2 \& assert (("sorry, no epoll, no sex", \& ev_supported_backends () & EVBACKEND_EPOLL)); .Ve .IP "unsigned int ev_recommended_backends ()" 4 .IX Item "unsigned int ev_recommended_backends ()" Return the set of all backends compiled into this binary of libev and also recommended for this platform, meaning it will work for most file descriptor types. This set is often smaller than the one returned by \&\f(CW\*(C`ev_supported_backends\*(C'\fR, as for example kqueue is broken on most BSDs and will not be auto-detected unless you explicitly request it (assuming you know what you are doing). This is the set of backends that libev will probe for if you specify no backends explicitly. .IP "unsigned int ev_embeddable_backends ()" 4 .IX Item "unsigned int ev_embeddable_backends ()" Returns the set of backends that are embeddable in other event loops. This value is platform-specific but can include backends not available on the current system. To find which embeddable backends might be supported on the current system, you would need to look at \f(CW\*(C`ev_embeddable_backends () & ev_supported_backends ()\*(C'\fR, likewise for recommended ones. .Sp See the description of \f(CW\*(C`ev_embed\*(C'\fR watchers for more info. .IP "ev_set_allocator (void *(*cb)(void *ptr, long size) throw ())" 4 .IX Item "ev_set_allocator (void *(*cb)(void *ptr, long size) throw ())" Sets the allocation function to use (the prototype is similar \- the semantics are identical to the \f(CW\*(C`realloc\*(C'\fR C89/SuS/POSIX function). It is used to allocate and free memory (no surprises here). If it returns zero when memory needs to be allocated (\f(CW\*(C`size != 0\*(C'\fR), the library might abort or take some potentially destructive action. .Sp Since some systems (at least OpenBSD and Darwin) fail to implement correct \f(CW\*(C`realloc\*(C'\fR semantics, libev will use a wrapper around the system \&\f(CW\*(C`realloc\*(C'\fR and \f(CW\*(C`free\*(C'\fR functions by default. .Sp You could override this function in high-availability programs to, say, free some memory if it cannot allocate memory, to use a special allocator, or even to sleep a while and retry until some memory is available. .Sp Example: Replace the libev allocator with one that waits a bit and then retries (example requires a standards-compliant \f(CW\*(C`realloc\*(C'\fR). .Sp .Vb 6 \& static void * \& persistent_realloc (void *ptr, size_t size) \& { \& for (;;) \& { \& void *newptr = realloc (ptr, size); \& \& if (newptr) \& return newptr; \& \& sleep (60); \& } \& } \& \& ... \& ev_set_allocator (persistent_realloc); .Ve .IP "ev_set_syserr_cb (void (*cb)(const char *msg) throw ())" 4 .IX Item "ev_set_syserr_cb (void (*cb)(const char *msg) throw ())" Set the callback function to call on a retryable system call error (such as failed select, poll, epoll_wait). The message is a printable string indicating the system call or subsystem causing the problem. If this callback is set, then libev will expect it to remedy the situation, no matter what, when it returns. That is, libev will generally retry the requested operation, or, if the condition doesn't go away, do bad stuff (such as abort). .Sp Example: This is basically the same thing that libev does internally, too. .Sp .Vb 6 \& static void \& fatal_error (const char *msg) \& { \& perror (msg); \& abort (); \& } \& \& ... \& ev_set_syserr_cb (fatal_error); .Ve .IP "ev_feed_signal (int signum)" 4 .IX Item "ev_feed_signal (int signum)" This function can be used to \*(L"simulate\*(R" a signal receive. It is completely safe to call this function at any time, from any context, including signal handlers or random threads. .Sp Its main use is to customise signal handling in your process, especially in the presence of threads. For example, you could block signals by default in all threads (and specifying \f(CW\*(C`EVFLAG_NOSIGMASK\*(C'\fR when creating any loops), and in one thread, use \f(CW\*(C`sigwait\*(C'\fR or any other mechanism to wait for signals, then \*(L"deliver\*(R" them to libev by calling \&\f(CW\*(C`ev_feed_signal\*(C'\fR. .SH "FUNCTIONS CONTROLLING EVENT LOOPS" .IX Header "FUNCTIONS CONTROLLING EVENT LOOPS" An event loop is described by a \f(CW\*(C`struct ev_loop *\*(C'\fR (the \f(CW\*(C`struct\*(C'\fR is \&\fInot\fR optional in this case unless libev 3 compatibility is disabled, as libev 3 had an \f(CW\*(C`ev_loop\*(C'\fR function colliding with the struct name). .PP The library knows two types of such loops, the \fIdefault\fR loop, which supports child process events, and dynamically created event loops which do not. .IP "struct ev_loop *ev_default_loop (unsigned int flags)" 4 .IX Item "struct ev_loop *ev_default_loop (unsigned int flags)" This returns the \*(L"default\*(R" event loop object, which is what you should normally use when you just need \*(L"the event loop\*(R". Event loop objects and the \f(CW\*(C`flags\*(C'\fR parameter are described in more detail in the entry for \&\f(CW\*(C`ev_loop_new\*(C'\fR. .Sp If the default loop is already initialised then this function simply returns it (and ignores the flags. If that is troubling you, check \&\f(CW\*(C`ev_backend ()\*(C'\fR afterwards). Otherwise it will create it with the given flags, which should almost always be \f(CW0\fR, unless the caller is also the one calling \f(CW\*(C`ev_run\*(C'\fR or otherwise qualifies as \*(L"the main program\*(R". .Sp If you don't know what event loop to use, use the one returned from this function (or via the \f(CW\*(C`EV_DEFAULT\*(C'\fR macro). .Sp Note that this function is \fInot\fR thread-safe, so if you want to use it from multiple threads, you have to employ some kind of mutex (note also that this case is unlikely, as loops cannot be shared easily between threads anyway). .Sp The default loop is the only loop that can handle \f(CW\*(C`ev_child\*(C'\fR watchers, and to do this, it always registers a handler for \f(CW\*(C`SIGCHLD\*(C'\fR. If this is a problem for your application you can either create a dynamic loop with \&\f(CW\*(C`ev_loop_new\*(C'\fR which doesn't do that, or you can simply overwrite the \&\f(CW\*(C`SIGCHLD\*(C'\fR signal handler \fIafter\fR calling \f(CW\*(C`ev_default_init\*(C'\fR. .Sp Example: This is the most typical usage. .Sp .Vb 2 \& if (!ev_default_loop (0)) \& fatal ("could not initialise libev, bad $LIBEV_FLAGS in environment?"); .Ve .Sp Example: Restrict libev to the select and poll backends, and do not allow environment settings to be taken into account: .Sp .Vb 1 \& ev_default_loop (EVBACKEND_POLL | EVBACKEND_SELECT | EVFLAG_NOENV); .Ve .IP "struct ev_loop *ev_loop_new (unsigned int flags)" 4 .IX Item "struct ev_loop *ev_loop_new (unsigned int flags)" This will create and initialise a new event loop object. If the loop could not be initialised, returns false. .Sp This function is thread-safe, and one common way to use libev with threads is indeed to create one loop per thread, and using the default loop in the \*(L"main\*(R" or \*(L"initial\*(R" thread. .Sp The flags argument can be used to specify special behaviour or specific backends to use, and is usually specified as \f(CW0\fR (or \f(CW\*(C`EVFLAG_AUTO\*(C'\fR). .Sp The following flags are supported: .RS 4 .ie n .IP """EVFLAG_AUTO""" 4 .el .IP "\f(CWEVFLAG_AUTO\fR" 4 .IX Item "EVFLAG_AUTO" The default flags value. Use this if you have no clue (it's the right thing, believe me). .ie n .IP """EVFLAG_NOENV""" 4 .el .IP "\f(CWEVFLAG_NOENV\fR" 4 .IX Item "EVFLAG_NOENV" If this flag bit is or'ed into the flag value (or the program runs setuid or setgid) then libev will \fInot\fR look at the environment variable \&\f(CW\*(C`LIBEV_FLAGS\*(C'\fR. Otherwise (the default), this environment variable will override the flags completely if it is found in the environment. This is useful to try out specific backends to test their performance, or to work around bugs. .ie n .IP """EVFLAG_FORKCHECK""" 4 .el .IP "\f(CWEVFLAG_FORKCHECK\fR" 4 .IX Item "EVFLAG_FORKCHECK" Instead of calling \f(CW\*(C`ev_loop_fork\*(C'\fR manually after a fork, you can also make libev check for a fork in each iteration by enabling this flag. .Sp This works by calling \f(CW\*(C`getpid ()\*(C'\fR on every iteration of the loop, and thus this might slow down your event loop if you do a lot of loop iterations and little real work, but is usually not noticeable (on my GNU/Linux system for example, \f(CW\*(C`getpid\*(C'\fR is actually a simple 5\-insn sequence without a system call and thus \fIvery\fR fast, but my GNU/Linux system also has \&\f(CW\*(C`pthread_atfork\*(C'\fR which is even faster). .Sp The big advantage of this flag is that you can forget about fork (and forget about forgetting to tell libev about forking) when you use this flag. .Sp This flag setting cannot be overridden or specified in the \f(CW\*(C`LIBEV_FLAGS\*(C'\fR environment variable. .ie n .IP """EVFLAG_NOINOTIFY""" 4 .el .IP "\f(CWEVFLAG_NOINOTIFY\fR" 4 .IX Item "EVFLAG_NOINOTIFY" When this flag is specified, then libev will not attempt to use the \&\fIinotify\fR \s-1API\s0 for its \f(CW\*(C`ev_stat\*(C'\fR watchers. Apart from debugging and testing, this flag can be useful to conserve inotify file descriptors, as otherwise each loop using \f(CW\*(C`ev_stat\*(C'\fR watchers consumes one inotify handle. .ie n .IP """EVFLAG_SIGNALFD""" 4 .el .IP "\f(CWEVFLAG_SIGNALFD\fR" 4 .IX Item "EVFLAG_SIGNALFD" When this flag is specified, then libev will attempt to use the \&\fIsignalfd\fR \s-1API\s0 for its \f(CW\*(C`ev_signal\*(C'\fR (and \f(CW\*(C`ev_child\*(C'\fR) watchers. This \s-1API\s0 delivers signals synchronously, which makes it both faster and might make it possible to get the queued signal data. It can also simplify signal handling with threads, as long as you properly block signals in your threads that are not interested in handling them. .Sp Signalfd will not be used by default as this changes your signal mask, and there are a lot of shoddy libraries and programs (glib's threadpool for example) that can't properly initialise their signal masks. .ie n .IP """EVFLAG_NOSIGMASK""" 4 .el .IP "\f(CWEVFLAG_NOSIGMASK\fR" 4 .IX Item "EVFLAG_NOSIGMASK" When this flag is specified, then libev will avoid to modify the signal mask. Specifically, this means you have to make sure signals are unblocked when you want to receive them. .Sp This behaviour is useful when you want to do your own signal handling, or want to handle signals only in specific threads and want to avoid libev unblocking the signals. .Sp It's also required by \s-1POSIX\s0 in a threaded program, as libev calls \&\f(CW\*(C`sigprocmask\*(C'\fR, whose behaviour is officially unspecified. .Sp This flag's behaviour will become the default in future versions of libev. .ie n .IP """EVBACKEND_SELECT"" (value 1, portable select backend)" 4 .el .IP "\f(CWEVBACKEND_SELECT\fR (value 1, portable select backend)" 4 .IX Item "EVBACKEND_SELECT (value 1, portable select backend)" This is your standard \fIselect\fR\|(2) backend. Not \fIcompletely\fR standard, as libev tries to roll its own fd_set with no limits on the number of fds, but if that fails, expect a fairly low limit on the number of fds when using this backend. It doesn't scale too well (O(highest_fd)), but its usually the fastest backend for a low number of (low-numbered :) fds. .Sp To get good performance out of this backend you need a high amount of parallelism (most of the file descriptors should be busy). If you are writing a server, you should \f(CW\*(C`accept ()\*(C'\fR in a loop to accept as many connections as possible during one iteration. You might also want to have a look at \f(CW\*(C`ev_set_io_collect_interval ()\*(C'\fR to increase the amount of readiness notifications you get per iteration. .Sp This backend maps \f(CW\*(C`EV_READ\*(C'\fR to the \f(CW\*(C`readfds\*(C'\fR set and \f(CW\*(C`EV_WRITE\*(C'\fR to the \&\f(CW\*(C`writefds\*(C'\fR set (and to work around Microsoft Windows bugs, also onto the \&\f(CW\*(C`exceptfds\*(C'\fR set on that platform). .ie n .IP """EVBACKEND_POLL"" (value 2, poll backend, available everywhere except on windows)" 4 .el .IP "\f(CWEVBACKEND_POLL\fR (value 2, poll backend, available everywhere except on windows)" 4 .IX Item "EVBACKEND_POLL (value 2, poll backend, available everywhere except on windows)" And this is your standard \fIpoll\fR\|(2) backend. It's more complicated than select, but handles sparse fds better and has no artificial limit on the number of fds you can use (except it will slow down considerably with a lot of inactive fds). It scales similarly to select, i.e. O(total_fds). See the entry for \f(CW\*(C`EVBACKEND_SELECT\*(C'\fR, above, for performance tips. .Sp This backend maps \f(CW\*(C`EV_READ\*(C'\fR to \f(CW\*(C`POLLIN | POLLERR | POLLHUP\*(C'\fR, and \&\f(CW\*(C`EV_WRITE\*(C'\fR to \f(CW\*(C`POLLOUT | POLLERR | POLLHUP\*(C'\fR. .ie n .IP """EVBACKEND_EPOLL"" (value 4, Linux)" 4 .el .IP "\f(CWEVBACKEND_EPOLL\fR (value 4, Linux)" 4 .IX Item "EVBACKEND_EPOLL (value 4, Linux)" Use the linux-specific \fIepoll\fR\|(7) interface (for both pre\- and post\-2.6.9 kernels). .Sp For few fds, this backend is a bit little slower than poll and select, but it scales phenomenally better. While poll and select usually scale like O(total_fds) where total_fds is the total number of fds (or the highest fd), epoll scales either O(1) or O(active_fds). .Sp The epoll mechanism deserves honorable mention as the most misdesigned of the more advanced event mechanisms: mere annoyances include silently dropping file descriptors, requiring a system call per change per file descriptor (and unnecessary guessing of parameters), problems with dup, returning before the timeout value, resulting in additional iterations (and only giving 5ms accuracy while select on the same platform gives 0.1ms) and so on. The biggest issue is fork races, however \- if a program forks then \fIboth\fR parent and child process have to recreate the epoll set, which can take considerable time (one syscall per file descriptor) and is of course hard to detect. .Sp Epoll is also notoriously buggy \- embedding epoll fds \fIshould\fR work, but of course \fIdoesn't\fR, and epoll just loves to report events for totally \fIdifferent\fR file descriptors (even already closed ones, so one cannot even remove them from the set) than registered in the set (especially on \s-1SMP\s0 systems). Libev tries to counter these spurious notifications by employing an additional generation counter and comparing that against the events to filter out spurious ones, recreating the set when required. Epoll also erroneously rounds down timeouts, but gives you no way to know when and by how much, so sometimes you have to busy-wait because epoll returns immediately despite a nonzero timeout. And last not least, it also refuses to work with some file descriptors which work perfectly fine with \f(CW\*(C`select\*(C'\fR (files, many character devices...). .Sp Epoll is truly the train wreck among event poll mechanisms, a frankenpoll, cobbled together in a hurry, no thought to design or interaction with others. Oh, the pain, will it ever stop... .Sp While stopping, setting and starting an I/O watcher in the same iteration will result in some caching, there is still a system call per such incident (because the same \fIfile descriptor\fR could point to a different \&\fIfile description\fR now), so its best to avoid that. Also, \f(CW\*(C`dup ()\*(C'\fR'ed file descriptors might not work very well if you register events for both file descriptors. .Sp Best performance from this backend is achieved by not unregistering all watchers for a file descriptor until it has been closed, if possible, i.e. keep at least one watcher active per fd at all times. Stopping and starting a watcher (without re-setting it) also usually doesn't cause extra overhead. A fork can both result in spurious notifications as well as in libev having to destroy and recreate the epoll object, which can take considerable time and thus should be avoided. .Sp All this means that, in practice, \f(CW\*(C`EVBACKEND_SELECT\*(C'\fR can be as fast or faster than epoll for maybe up to a hundred file descriptors, depending on the usage. So sad. .Sp While nominally embeddable in other event loops, this feature is broken in all kernel versions tested so far. .Sp This backend maps \f(CW\*(C`EV_READ\*(C'\fR and \f(CW\*(C`EV_WRITE\*(C'\fR in the same way as \&\f(CW\*(C`EVBACKEND_POLL\*(C'\fR. .ie n .IP """EVBACKEND_KQUEUE"" (value 8, most \s-1BSD\s0 clones)" 4 .el .IP "\f(CWEVBACKEND_KQUEUE\fR (value 8, most \s-1BSD\s0 clones)" 4 .IX Item "EVBACKEND_KQUEUE (value 8, most BSD clones)" Kqueue deserves special mention, as at the time of this writing, it was broken on all BSDs except NetBSD (usually it doesn't work reliably with anything but sockets and pipes, except on Darwin, where of course it's completely useless). Unlike epoll, however, whose brokenness is by design, these kqueue bugs can (and eventually will) be fixed without \s-1API\s0 changes to existing programs. For this reason it's not being \&\*(L"auto-detected\*(R" unless you explicitly specify it in the flags (i.e. using \&\f(CW\*(C`EVBACKEND_KQUEUE\*(C'\fR) or libev was compiled on a known-to-be-good (\-enough) system like NetBSD. .Sp You still can embed kqueue into a normal poll or select backend and use it only for sockets (after having made sure that sockets work with kqueue on the target platform). See \f(CW\*(C`ev_embed\*(C'\fR watchers for more info. .Sp It scales in the same way as the epoll backend, but the interface to the kernel is more efficient (which says nothing about its actual speed, of course). While stopping, setting and starting an I/O watcher does never cause an extra system call as with \f(CW\*(C`EVBACKEND_EPOLL\*(C'\fR, it still adds up to two event changes per incident. Support for \f(CW\*(C`fork ()\*(C'\fR is very bad (you might have to leak fd's on fork, but it's more sane than epoll) and it drops fds silently in similarly hard-to-detect cases .Sp This backend usually performs well under most conditions. .Sp While nominally embeddable in other event loops, this doesn't work everywhere, so you might need to test for this. And since it is broken almost everywhere, you should only use it when you have a lot of sockets (for which it usually works), by embedding it into another event loop (e.g. \f(CW\*(C`EVBACKEND_SELECT\*(C'\fR or \f(CW\*(C`EVBACKEND_POLL\*(C'\fR (but \f(CW\*(C`poll\*(C'\fR is of course also broken on \s-1OS\s0 X)) and, did I mention it, using it only for sockets. .Sp This backend maps \f(CW\*(C`EV_READ\*(C'\fR into an \f(CW\*(C`EVFILT_READ\*(C'\fR kevent with \&\f(CW\*(C`NOTE_EOF\*(C'\fR, and \f(CW\*(C`EV_WRITE\*(C'\fR into an \f(CW\*(C`EVFILT_WRITE\*(C'\fR kevent with \&\f(CW\*(C`NOTE_EOF\*(C'\fR. .ie n .IP """EVBACKEND_DEVPOLL"" (value 16, Solaris 8)" 4 .el .IP "\f(CWEVBACKEND_DEVPOLL\fR (value 16, Solaris 8)" 4 .IX Item "EVBACKEND_DEVPOLL (value 16, Solaris 8)" This is not implemented yet (and might never be, unless you send me an implementation). According to reports, \f(CW\*(C`/dev/poll\*(C'\fR only supports sockets and is not embeddable, which would limit the usefulness of this backend immensely. .ie n .IP """EVBACKEND_PORT"" (value 32, Solaris 10)" 4 .el .IP "\f(CWEVBACKEND_PORT\fR (value 32, Solaris 10)" 4 .IX Item "EVBACKEND_PORT (value 32, Solaris 10)" This uses the Solaris 10 event port mechanism. As with everything on Solaris, it's really slow, but it still scales very well (O(active_fds)). .Sp While this backend scales well, it requires one system call per active file descriptor per loop iteration. For small and medium numbers of file descriptors a \*(L"slow\*(R" \f(CW\*(C`EVBACKEND_SELECT\*(C'\fR or \f(CW\*(C`EVBACKEND_POLL\*(C'\fR backend might perform better. .Sp On the positive side, this backend actually performed fully to specification in all tests and is fully embeddable, which is a rare feat among the OS-specific backends (I vastly prefer correctness over speed hacks). .Sp On the negative side, the interface is \fIbizarre\fR \- so bizarre that even sun itself gets it wrong in their code examples: The event polling function sometimes returns events to the caller even though an error occurred, but with no indication whether it has done so or not (yes, it's even documented that way) \- deadly for edge-triggered interfaces where you absolutely have to know whether an event occurred or not because you have to re-arm the watcher. .Sp Fortunately libev seems to be able to work around these idiocies. .Sp This backend maps \f(CW\*(C`EV_READ\*(C'\fR and \f(CW\*(C`EV_WRITE\*(C'\fR in the same way as \&\f(CW\*(C`EVBACKEND_POLL\*(C'\fR. .ie n .IP """EVBACKEND_ALL""" 4 .el .IP "\f(CWEVBACKEND_ALL\fR" 4 .IX Item "EVBACKEND_ALL" Try all backends (even potentially broken ones that wouldn't be tried with \f(CW\*(C`EVFLAG_AUTO\*(C'\fR). Since this is a mask, you can do stuff such as \&\f(CW\*(C`EVBACKEND_ALL & ~EVBACKEND_KQUEUE\*(C'\fR. .Sp It is definitely not recommended to use this flag, use whatever \&\f(CW\*(C`ev_recommended_backends ()\*(C'\fR returns, or simply do not specify a backend at all. .ie n .IP """EVBACKEND_MASK""" 4 .el .IP "\f(CWEVBACKEND_MASK\fR" 4 .IX Item "EVBACKEND_MASK" Not a backend at all, but a mask to select all backend bits from a \&\f(CW\*(C`flags\*(C'\fR value, in case you want to mask out any backends from a flags value (e.g. when modifying the \f(CW\*(C`LIBEV_FLAGS\*(C'\fR environment variable). .RE .RS 4 .Sp If one or more of the backend flags are or'ed into the flags value, then only these backends will be tried (in the reverse order as listed here). If none are specified, all backends in \f(CW\*(C`ev_recommended_backends ()\*(C'\fR will be tried. .Sp Example: Try to create a event loop that uses epoll and nothing else. .Sp .Vb 3 \& struct ev_loop *epoller = ev_loop_new (EVBACKEND_EPOLL | EVFLAG_NOENV); \& if (!epoller) \& fatal ("no epoll found here, maybe it hides under your chair"); .Ve .Sp Example: Use whatever libev has to offer, but make sure that kqueue is used if available. .Sp .Vb 1 \& struct ev_loop *loop = ev_loop_new (ev_recommended_backends () | EVBACKEND_KQUEUE); .Ve .RE .IP "ev_loop_destroy (loop)" 4 .IX Item "ev_loop_destroy (loop)" Destroys an event loop object (frees all memory and kernel state etc.). None of the active event watchers will be stopped in the normal sense, so e.g. \f(CW\*(C`ev_is_active\*(C'\fR might still return true. It is your responsibility to either stop all watchers cleanly yourself \fIbefore\fR calling this function, or cope with the fact afterwards (which is usually the easiest thing, you can just ignore the watchers and/or \f(CW\*(C`free ()\*(C'\fR them for example). .Sp Note that certain global state, such as signal state (and installed signal handlers), will not be freed by this function, and related watchers (such as signal and child watchers) would need to be stopped manually. .Sp This function is normally used on loop objects allocated by \&\f(CW\*(C`ev_loop_new\*(C'\fR, but it can also be used on the default loop returned by \&\f(CW\*(C`ev_default_loop\*(C'\fR, in which case it is not thread-safe. .Sp Note that it is not advisable to call this function on the default loop except in the rare occasion where you really need to free its resources. If you need dynamically allocated loops it is better to use \f(CW\*(C`ev_loop_new\*(C'\fR and \f(CW\*(C`ev_loop_destroy\*(C'\fR. .IP "ev_loop_fork (loop)" 4 .IX Item "ev_loop_fork (loop)" This function sets a flag that causes subsequent \f(CW\*(C`ev_run\*(C'\fR iterations to reinitialise the kernel state for backends that have one. Despite the name, you can call it anytime, but it makes most sense after forking, in the child process. You \fImust\fR call it (or use \f(CW\*(C`EVFLAG_FORKCHECK\*(C'\fR) in the child before resuming or calling \f(CW\*(C`ev_run\*(C'\fR. .Sp Again, you \fIhave\fR to call it on \fIany\fR loop that you want to re-use after a fork, \fIeven if you do not plan to use the loop in the parent\fR. This is because some kernel interfaces *cough* \fIkqueue\fR *cough* do funny things during fork. .Sp On the other hand, you only need to call this function in the child process if and only if you want to use the event loop in the child. If you just fork+exec or create a new loop in the child, you don't have to call it at all (in fact, \f(CW\*(C`epoll\*(C'\fR is so badly broken that it makes a difference, but libev will usually detect this case on its own and do a costly reset of the backend). .Sp The function itself is quite fast and it's usually not a problem to call it just in case after a fork. .Sp Example: Automate calling \f(CW\*(C`ev_loop_fork\*(C'\fR on the default loop when using pthreads. .Sp .Vb 5 \& static void \& post_fork_child (void) \& { \& ev_loop_fork (EV_DEFAULT); \& } \& \& ... \& pthread_atfork (0, 0, post_fork_child); .Ve .IP "int ev_is_default_loop (loop)" 4 .IX Item "int ev_is_default_loop (loop)" Returns true when the given loop is, in fact, the default loop, and false otherwise. .IP "unsigned int ev_iteration (loop)" 4 .IX Item "unsigned int ev_iteration (loop)" Returns the current iteration count for the event loop, which is identical to the number of times libev did poll for new events. It starts at \f(CW0\fR and happily wraps around with enough iterations. .Sp This value can sometimes be useful as a generation counter of sorts (it \&\*(L"ticks\*(R" the number of loop iterations), as it roughly corresponds with \&\f(CW\*(C`ev_prepare\*(C'\fR and \f(CW\*(C`ev_check\*(C'\fR calls \- and is incremented between the prepare and check phases. .IP "unsigned int ev_depth (loop)" 4 .IX Item "unsigned int ev_depth (loop)" Returns the number of times \f(CW\*(C`ev_run\*(C'\fR was entered minus the number of times \f(CW\*(C`ev_run\*(C'\fR was exited normally, in other words, the recursion depth. .Sp Outside \f(CW\*(C`ev_run\*(C'\fR, this number is zero. In a callback, this number is \&\f(CW1\fR, unless \f(CW\*(C`ev_run\*(C'\fR was invoked recursively (or from another thread), in which case it is higher. .Sp Leaving \f(CW\*(C`ev_run\*(C'\fR abnormally (setjmp/longjmp, cancelling the thread, throwing an exception etc.), doesn't count as \*(L"exit\*(R" \- consider this as a hint to avoid such ungentleman-like behaviour unless it's really convenient, in which case it is fully supported. .IP "unsigned int ev_backend (loop)" 4 .IX Item "unsigned int ev_backend (loop)" Returns one of the \f(CW\*(C`EVBACKEND_*\*(C'\fR flags indicating the event backend in use. .IP "ev_tstamp ev_now (loop)" 4 .IX Item "ev_tstamp ev_now (loop)" Returns the current \*(L"event loop time\*(R", which is the time the event loop received events and started processing them. This timestamp does not change as long as callbacks are being processed, and this is also the base time used for relative timers. You can treat it as the timestamp of the event occurring (or more correctly, libev finding out about it). .IP "ev_now_update (loop)" 4 .IX Item "ev_now_update (loop)" Establishes the current time by querying the kernel, updating the time returned by \f(CW\*(C`ev_now ()\*(C'\fR in the progress. This is a costly operation and is usually done automatically within \f(CW\*(C`ev_run ()\*(C'\fR. .Sp This function is rarely useful, but when some event callback runs for a very long time without entering the event loop, updating libev's idea of the current time is a good idea. .Sp See also \*(L"The special problem of time updates\*(R" in the \f(CW\*(C`ev_timer\*(C'\fR section. .IP "ev_suspend (loop)" 4 .IX Item "ev_suspend (loop)" .PD 0 .IP "ev_resume (loop)" 4 .IX Item "ev_resume (loop)" .PD These two functions suspend and resume an event loop, for use when the loop is not used for a while and timeouts should not be processed. .Sp A typical use case would be an interactive program such as a game: When the user presses \f(CW\*(C`^Z\*(C'\fR to suspend the game and resumes it an hour later it would be best to handle timeouts as if no time had actually passed while the program was suspended. This can be achieved by calling \f(CW\*(C`ev_suspend\*(C'\fR in your \f(CW\*(C`SIGTSTP\*(C'\fR handler, sending yourself a \f(CW\*(C`SIGSTOP\*(C'\fR and calling \&\f(CW\*(C`ev_resume\*(C'\fR directly afterwards to resume timer processing. .Sp Effectively, all \f(CW\*(C`ev_timer\*(C'\fR watchers will be delayed by the time spend between \f(CW\*(C`ev_suspend\*(C'\fR and \f(CW\*(C`ev_resume\*(C'\fR, and all \f(CW\*(C`ev_periodic\*(C'\fR watchers will be rescheduled (that is, they will lose any events that would have occurred while suspended). .Sp After calling \f(CW\*(C`ev_suspend\*(C'\fR you \fBmust not\fR call \fIany\fR function on the given loop other than \f(CW\*(C`ev_resume\*(C'\fR, and you \fBmust not\fR call \f(CW\*(C`ev_resume\*(C'\fR without a previous call to \f(CW\*(C`ev_suspend\*(C'\fR. .Sp Calling \f(CW\*(C`ev_suspend\*(C'\fR/\f(CW\*(C`ev_resume\*(C'\fR has the side effect of updating the event loop time (see \f(CW\*(C`ev_now_update\*(C'\fR). .IP "bool ev_run (loop, int flags)" 4 .IX Item "bool ev_run (loop, int flags)" Finally, this is it, the event handler. This function usually is called after you have initialised all your watchers and you want to start handling events. It will ask the operating system for any new events, call the watcher callbacks, and then repeat the whole process indefinitely: This is why event loops are called \fIloops\fR. .Sp If the flags argument is specified as \f(CW0\fR, it will keep handling events until either no event watchers are active anymore or \f(CW\*(C`ev_break\*(C'\fR was called. .Sp The return value is false if there are no more active watchers (which usually means \*(L"all jobs done\*(R" or \*(L"deadlock\*(R"), and true in all other cases (which usually means " you should call \f(CW\*(C`ev_run\*(C'\fR again"). .Sp Please note that an explicit \f(CW\*(C`ev_break\*(C'\fR is usually better than relying on all watchers to be stopped when deciding when a program has finished (especially in interactive programs), but having a program that automatically loops as long as it has to and no longer by virtue of relying on its watchers stopping correctly, that is truly a thing of beauty. .Sp This function is \fImostly\fR exception-safe \- you can break out of a \&\f(CW\*(C`ev_run\*(C'\fR call by calling \f(CW\*(C`longjmp\*(C'\fR in a callback, throwing a \*(C+ exception and so on. This does not decrement the \f(CW\*(C`ev_depth\*(C'\fR value, nor will it clear any outstanding \f(CW\*(C`EVBREAK_ONE\*(C'\fR breaks. .Sp A flags value of \f(CW\*(C`EVRUN_NOWAIT\*(C'\fR will look for new events, will handle those events and any already outstanding ones, but will not wait and block your process in case there are no events and will return after one iteration of the loop. This is sometimes useful to poll and handle new events while doing lengthy calculations, to keep the program responsive. .Sp A flags value of \f(CW\*(C`EVRUN_ONCE\*(C'\fR will look for new events (waiting if necessary) and will handle those and any already outstanding ones. It will block your process until at least one new event arrives (which could be an event internal to libev itself, so there is no guarantee that a user-registered callback will be called), and will return after one iteration of the loop. .Sp This is useful if you are waiting for some external event in conjunction with something not expressible using other libev watchers (i.e. "roll your own \f(CW\*(C`ev_run\*(C'\fR"). However, a pair of \f(CW\*(C`ev_prepare\*(C'\fR/\f(CW\*(C`ev_check\*(C'\fR watchers is usually a better approach for this kind of thing. .Sp Here are the gory details of what \f(CW\*(C`ev_run\*(C'\fR does (this is for your understanding, not a guarantee that things will work exactly like this in future versions): .Sp .Vb 10 \& \- Increment loop depth. \& \- Reset the ev_break status. \& \- Before the first iteration, call any pending watchers. \& LOOP: \& \- If EVFLAG_FORKCHECK was used, check for a fork. \& \- If a fork was detected (by any means), queue and call all fork watchers. \& \- Queue and call all prepare watchers. \& \- If ev_break was called, goto FINISH. \& \- If we have been forked, detach and recreate the kernel state \& as to not disturb the other process. \& \- Update the kernel state with all outstanding changes. \& \- Update the "event loop time" (ev_now ()). \& \- Calculate for how long to sleep or block, if at all \& (active idle watchers, EVRUN_NOWAIT or not having \& any active watchers at all will result in not sleeping). \& \- Sleep if the I/O and timer collect interval say so. \& \- Increment loop iteration counter. \& \- Block the process, waiting for any events. \& \- Queue all outstanding I/O (fd) events. \& \- Update the "event loop time" (ev_now ()), and do time jump adjustments. \& \- Queue all expired timers. \& \- Queue all expired periodics. \& \- Queue all idle watchers with priority higher than that of pending events. \& \- Queue all check watchers. \& \- Call all queued watchers in reverse order (i.e. check watchers first). \& Signals and child watchers are implemented as I/O watchers, and will \& be handled here by queueing them when their watcher gets executed. \& \- If ev_break has been called, or EVRUN_ONCE or EVRUN_NOWAIT \& were used, or there are no active watchers, goto FINISH, otherwise \& continue with step LOOP. \& FINISH: \& \- Reset the ev_break status iff it was EVBREAK_ONE. \& \- Decrement the loop depth. \& \- Return. .Ve .Sp Example: Queue some jobs and then loop until no events are outstanding anymore. .Sp .Vb 4 \& ... queue jobs here, make sure they register event watchers as long \& ... as they still have work to do (even an idle watcher will do..) \& ev_run (my_loop, 0); \& ... jobs done or somebody called break. yeah! .Ve .IP "ev_break (loop, how)" 4 .IX Item "ev_break (loop, how)" Can be used to make a call to \f(CW\*(C`ev_run\*(C'\fR return early (but only after it has processed all outstanding events). The \f(CW\*(C`how\*(C'\fR argument must be either \&\f(CW\*(C`EVBREAK_ONE\*(C'\fR, which will make the innermost \f(CW\*(C`ev_run\*(C'\fR call return, or \&\f(CW\*(C`EVBREAK_ALL\*(C'\fR, which will make all nested \f(CW\*(C`ev_run\*(C'\fR calls return. .Sp This \*(L"break state\*(R" will be cleared on the next call to \f(CW\*(C`ev_run\*(C'\fR. .Sp It is safe to call \f(CW\*(C`ev_break\*(C'\fR from outside any \f(CW\*(C`ev_run\*(C'\fR calls, too, in which case it will have no effect. .IP "ev_ref (loop)" 4 .IX Item "ev_ref (loop)" .PD 0 .IP "ev_unref (loop)" 4 .IX Item "ev_unref (loop)" .PD Ref/unref can be used to add or remove a reference count on the event loop: Every watcher keeps one reference, and as long as the reference count is nonzero, \f(CW\*(C`ev_run\*(C'\fR will not return on its own. .Sp This is useful when you have a watcher that you never intend to unregister, but that nevertheless should not keep \f(CW\*(C`ev_run\*(C'\fR from returning. In such a case, call \f(CW\*(C`ev_unref\*(C'\fR after starting, and \f(CW\*(C`ev_ref\*(C'\fR before stopping it. .Sp As an example, libev itself uses this for its internal signal pipe: It is not visible to the libev user and should not keep \f(CW\*(C`ev_run\*(C'\fR from exiting if no event watchers registered by it are active. It is also an excellent way to do this for generic recurring timers or from within third-party libraries. Just remember to \fIunref after start\fR and \fIref before stop\fR (but only if the watcher wasn't active before, or was active before, respectively. Note also that libev might stop watchers itself (e.g. non-repeating timers) in which case you have to \f(CW\*(C`ev_ref\*(C'\fR in the callback). .Sp Example: Create a signal watcher, but keep it from keeping \f(CW\*(C`ev_run\*(C'\fR running when nothing else is active. .Sp .Vb 4 \& ev_signal exitsig; \& ev_signal_init (&exitsig, sig_cb, SIGINT); \& ev_signal_start (loop, &exitsig); \& ev_unref (loop); .Ve .Sp Example: For some weird reason, unregister the above signal handler again. .Sp .Vb 2 \& ev_ref (loop); \& ev_signal_stop (loop, &exitsig); .Ve .IP "ev_set_io_collect_interval (loop, ev_tstamp interval)" 4 .IX Item "ev_set_io_collect_interval (loop, ev_tstamp interval)" .PD 0 .IP "ev_set_timeout_collect_interval (loop, ev_tstamp interval)" 4 .IX Item "ev_set_timeout_collect_interval (loop, ev_tstamp interval)" .PD These advanced functions influence the time that libev will spend waiting for events. Both time intervals are by default \f(CW0\fR, meaning that libev will try to invoke timer/periodic callbacks and I/O callbacks with minimum latency. .Sp Setting these to a higher value (the \f(CW\*(C`interval\*(C'\fR \fImust\fR be >= \f(CW0\fR) allows libev to delay invocation of I/O and timer/periodic callbacks to increase efficiency of loop iterations (or to increase power-saving opportunities). .Sp The idea is that sometimes your program runs just fast enough to handle one (or very few) event(s) per loop iteration. While this makes the program responsive, it also wastes a lot of \s-1CPU\s0 time to poll for new events, especially with backends like \f(CW\*(C`select ()\*(C'\fR which have a high overhead for the actual polling but can deliver many events at once. .Sp By setting a higher \fIio collect interval\fR you allow libev to spend more time collecting I/O events, so you can handle more events per iteration, at the cost of increasing latency. Timeouts (both \f(CW\*(C`ev_periodic\*(C'\fR and \&\f(CW\*(C`ev_timer\*(C'\fR) will not be affected. Setting this to a non-null value will introduce an additional \f(CW\*(C`ev_sleep ()\*(C'\fR call into most loop iterations. The sleep time ensures that libev will not poll for I/O events more often then once per this interval, on average (as long as the host time resolution is good enough). .Sp Likewise, by setting a higher \fItimeout collect interval\fR you allow libev to spend more time collecting timeouts, at the expense of increased latency/jitter/inexactness (the watcher callback will be called later). \f(CW\*(C`ev_io\*(C'\fR watchers will not be affected. Setting this to a non-null value will not introduce any overhead in libev. .Sp Many (busy) programs can usually benefit by setting the I/O collect interval to a value near \f(CW0.1\fR or so, which is often enough for interactive servers (of course not for games), likewise for timeouts. It usually doesn't make much sense to set it to a lower value than \f(CW0.01\fR, as this approaches the timing granularity of most systems. Note that if you do transactions with the outside world and you can't increase the parallelity, then this setting will limit your transaction rate (if you need to poll once per transaction and the I/O collect interval is 0.01, then you can't do more than 100 transactions per second). .Sp Setting the \fItimeout collect interval\fR can improve the opportunity for saving power, as the program will \*(L"bundle\*(R" timer callback invocations that are \*(L"near\*(R" in time together, by delaying some, thus reducing the number of times the process sleeps and wakes up again. Another useful technique to reduce iterations/wake\-ups is to use \f(CW\*(C`ev_periodic\*(C'\fR watchers and make sure they fire on, say, one-second boundaries only. .Sp Example: we only need 0.1s timeout granularity, and we wish not to poll more often than 100 times per second: .Sp .Vb 2 \& ev_set_timeout_collect_interval (EV_DEFAULT_UC_ 0.1); \& ev_set_io_collect_interval (EV_DEFAULT_UC_ 0.01); .Ve .IP "ev_invoke_pending (loop)" 4 .IX Item "ev_invoke_pending (loop)" This call will simply invoke all pending watchers while resetting their pending state. Normally, \f(CW\*(C`ev_run\*(C'\fR does this automatically when required, but when overriding the invoke callback this call comes handy. This function can be invoked from a watcher \- this can be useful for example when you want to do some lengthy calculation and want to pass further event handling to another thread (you still have to make sure only one thread executes within \f(CW\*(C`ev_invoke_pending\*(C'\fR or \f(CW\*(C`ev_run\*(C'\fR of course). .IP "int ev_pending_count (loop)" 4 .IX Item "int ev_pending_count (loop)" Returns the number of pending watchers \- zero indicates that no watchers are pending. .IP "ev_set_invoke_pending_cb (loop, void (*invoke_pending_cb)(\s-1EV_P\s0))" 4 .IX Item "ev_set_invoke_pending_cb (loop, void (*invoke_pending_cb)(EV_P))" This overrides the invoke pending functionality of the loop: Instead of invoking all pending watchers when there are any, \f(CW\*(C`ev_run\*(C'\fR will call this callback instead. This is useful, for example, when you want to invoke the actual watchers inside another context (another thread etc.). .Sp If you want to reset the callback, use \f(CW\*(C`ev_invoke_pending\*(C'\fR as new callback. .IP "ev_set_loop_release_cb (loop, void (*release)(\s-1EV_P\s0) throw (), void (*acquire)(\s-1EV_P\s0) throw ())" 4 .IX Item "ev_set_loop_release_cb (loop, void (*release)(EV_P) throw (), void (*acquire)(EV_P) throw ())" Sometimes you want to share the same loop between multiple threads. This can be done relatively simply by putting mutex_lock/unlock calls around each call to a libev function. .Sp However, \f(CW\*(C`ev_run\*(C'\fR can run an indefinite time, so it is not feasible to wait for it to return. One way around this is to wake up the event loop via \f(CW\*(C`ev_break\*(C'\fR and \f(CW\*(C`ev_async_send\*(C'\fR, another way is to set these \&\fIrelease\fR and \fIacquire\fR callbacks on the loop. .Sp When set, then \f(CW\*(C`release\*(C'\fR will be called just before the thread is suspended waiting for new events, and \f(CW\*(C`acquire\*(C'\fR is called just afterwards. .Sp Ideally, \f(CW\*(C`release\*(C'\fR will just call your mutex_unlock function, and \&\f(CW\*(C`acquire\*(C'\fR will just call the mutex_lock function again. .Sp While event loop modifications are allowed between invocations of \&\f(CW\*(C`release\*(C'\fR and \f(CW\*(C`acquire\*(C'\fR (that's their only purpose after all), no modifications done will affect the event loop, i.e. adding watchers will have no effect on the set of file descriptors being watched, or the time waited. Use an \f(CW\*(C`ev_async\*(C'\fR watcher to wake up \f(CW\*(C`ev_run\*(C'\fR when you want it to take note of any changes you made. .Sp In theory, threads executing \f(CW\*(C`ev_run\*(C'\fR will be async-cancel safe between invocations of \f(CW\*(C`release\*(C'\fR and \f(CW\*(C`acquire\*(C'\fR. .Sp See also the locking example in the \f(CW\*(C`THREADS\*(C'\fR section later in this document. .IP "ev_set_userdata (loop, void *data)" 4 .IX Item "ev_set_userdata (loop, void *data)" .PD 0 .IP "void *ev_userdata (loop)" 4 .IX Item "void *ev_userdata (loop)" .PD Set and retrieve a single \f(CW\*(C`void *\*(C'\fR associated with a loop. When \&\f(CW\*(C`ev_set_userdata\*(C'\fR has never been called, then \f(CW\*(C`ev_userdata\*(C'\fR returns \&\f(CW0\fR. .Sp These two functions can be used to associate arbitrary data with a loop, and are intended solely for the \f(CW\*(C`invoke_pending_cb\*(C'\fR, \f(CW\*(C`release\*(C'\fR and \&\f(CW\*(C`acquire\*(C'\fR callbacks described above, but of course can be (ab\-)used for any other purpose as well. .IP "ev_verify (loop)" 4 .IX Item "ev_verify (loop)" This function only does something when \f(CW\*(C`EV_VERIFY\*(C'\fR support has been compiled in, which is the default for non-minimal builds. It tries to go through all internal structures and checks them for validity. If anything is found to be inconsistent, it will print an error message to standard error and call \f(CW\*(C`abort ()\*(C'\fR. .Sp This can be used to catch bugs inside libev itself: under normal circumstances, this function will never abort as of course libev keeps its data structures consistent. .SH "ANATOMY OF A WATCHER" .IX Header "ANATOMY OF A WATCHER" In the following description, uppercase \f(CW\*(C`TYPE\*(C'\fR in names stands for the watcher type, e.g. \f(CW\*(C`ev_TYPE_start\*(C'\fR can mean \f(CW\*(C`ev_timer_start\*(C'\fR for timer watchers and \f(CW\*(C`ev_io_start\*(C'\fR for I/O watchers. .PP A watcher is an opaque structure that you allocate and register to record your interest in some event. To make a concrete example, imagine you want to wait for \s-1STDIN\s0 to become readable, you would create an \f(CW\*(C`ev_io\*(C'\fR watcher for that: .PP .Vb 5 \& static void my_cb (struct ev_loop *loop, ev_io *w, int revents) \& { \& ev_io_stop (w); \& ev_break (loop, EVBREAK_ALL); \& } \& \& struct ev_loop *loop = ev_default_loop (0); \& \& ev_io stdin_watcher; \& \& ev_init (&stdin_watcher, my_cb); \& ev_io_set (&stdin_watcher, STDIN_FILENO, EV_READ); \& ev_io_start (loop, &stdin_watcher); \& \& ev_run (loop, 0); .Ve .PP As you can see, you are responsible for allocating the memory for your watcher structures (and it is \fIusually\fR a bad idea to do this on the stack). .PP Each watcher has an associated watcher structure (called \f(CW\*(C`struct ev_TYPE\*(C'\fR or simply \f(CW\*(C`ev_TYPE\*(C'\fR, as typedefs are provided for all watcher structs). .PP Each watcher structure must be initialised by a call to \f(CW\*(C`ev_init (watcher *, callback)\*(C'\fR, which expects a callback to be provided. This callback is invoked each time the event occurs (or, in the case of I/O watchers, each time the event loop detects that the file descriptor given is readable and/or writable). .PP Each watcher type further has its own \f(CW\*(C`ev_TYPE_set (watcher *, ...)\*(C'\fR macro to configure it, with arguments specific to the watcher type. There is also a macro to combine initialisation and setting in one call: \f(CW\*(C`ev_TYPE_init (watcher *, callback, ...)\*(C'\fR. .PP To make the watcher actually watch out for events, you have to start it with a watcher-specific start function (\f(CW\*(C`ev_TYPE_start (loop, watcher *)\*(C'\fR), and you can stop watching for events at any time by calling the corresponding stop function (\f(CW\*(C`ev_TYPE_stop (loop, watcher *)\*(C'\fR. .PP As long as your watcher is active (has been started but not stopped) you must not touch the values stored in it. Most specifically you must never reinitialise it or call its \f(CW\*(C`ev_TYPE_set\*(C'\fR macro. .PP Each and every callback receives the event loop pointer as first, the registered watcher structure as second, and a bitset of received events as third argument. .PP The received events usually include a single bit per event type received (you can receive multiple events at the same time). The possible bit masks are: .ie n .IP """EV_READ""" 4 .el .IP "\f(CWEV_READ\fR" 4 .IX Item "EV_READ" .PD 0 .ie n .IP """EV_WRITE""" 4 .el .IP "\f(CWEV_WRITE\fR" 4 .IX Item "EV_WRITE" .PD The file descriptor in the \f(CW\*(C`ev_io\*(C'\fR watcher has become readable and/or writable. .ie n .IP """EV_TIMER""" 4 .el .IP "\f(CWEV_TIMER\fR" 4 .IX Item "EV_TIMER" The \f(CW\*(C`ev_timer\*(C'\fR watcher has timed out. .ie n .IP """EV_PERIODIC""" 4 .el .IP "\f(CWEV_PERIODIC\fR" 4 .IX Item "EV_PERIODIC" The \f(CW\*(C`ev_periodic\*(C'\fR watcher has timed out. .ie n .IP """EV_SIGNAL""" 4 .el .IP "\f(CWEV_SIGNAL\fR" 4 .IX Item "EV_SIGNAL" The signal specified in the \f(CW\*(C`ev_signal\*(C'\fR watcher has been received by a thread. .ie n .IP """EV_CHILD""" 4 .el .IP "\f(CWEV_CHILD\fR" 4 .IX Item "EV_CHILD" The pid specified in the \f(CW\*(C`ev_child\*(C'\fR watcher has received a status change. .ie n .IP """EV_STAT""" 4 .el .IP "\f(CWEV_STAT\fR" 4 .IX Item "EV_STAT" The path specified in the \f(CW\*(C`ev_stat\*(C'\fR watcher changed its attributes somehow. .ie n .IP """EV_IDLE""" 4 .el .IP "\f(CWEV_IDLE\fR" 4 .IX Item "EV_IDLE" The \f(CW\*(C`ev_idle\*(C'\fR watcher has determined that you have nothing better to do. .ie n .IP """EV_PREPARE""" 4 .el .IP "\f(CWEV_PREPARE\fR" 4 .IX Item "EV_PREPARE" .PD 0 .ie n .IP """EV_CHECK""" 4 .el .IP "\f(CWEV_CHECK\fR" 4 .IX Item "EV_CHECK" .PD All \f(CW\*(C`ev_prepare\*(C'\fR watchers are invoked just \fIbefore\fR \f(CW\*(C`ev_run\*(C'\fR starts to gather new events, and all \f(CW\*(C`ev_check\*(C'\fR watchers are queued (not invoked) just after \f(CW\*(C`ev_run\*(C'\fR has gathered them, but before it queues any callbacks for any received events. That means \f(CW\*(C`ev_prepare\*(C'\fR watchers are the last watchers invoked before the event loop sleeps or polls for new events, and \&\f(CW\*(C`ev_check\*(C'\fR watchers will be invoked before any other watchers of the same or lower priority within an event loop iteration. .Sp Callbacks of both watcher types can start and stop as many watchers as they want, and all of them will be taken into account (for example, a \&\f(CW\*(C`ev_prepare\*(C'\fR watcher might start an idle watcher to keep \f(CW\*(C`ev_run\*(C'\fR from blocking). .ie n .IP """EV_EMBED""" 4 .el .IP "\f(CWEV_EMBED\fR" 4 .IX Item "EV_EMBED" The embedded event loop specified in the \f(CW\*(C`ev_embed\*(C'\fR watcher needs attention. .ie n .IP """EV_FORK""" 4 .el .IP "\f(CWEV_FORK\fR" 4 .IX Item "EV_FORK" The event loop has been resumed in the child process after fork (see \&\f(CW\*(C`ev_fork\*(C'\fR). .ie n .IP """EV_CLEANUP""" 4 .el .IP "\f(CWEV_CLEANUP\fR" 4 .IX Item "EV_CLEANUP" The event loop is about to be destroyed (see \f(CW\*(C`ev_cleanup\*(C'\fR). .ie n .IP """EV_ASYNC""" 4 .el .IP "\f(CWEV_ASYNC\fR" 4 .IX Item "EV_ASYNC" The given async watcher has been asynchronously notified (see \f(CW\*(C`ev_async\*(C'\fR). .ie n .IP """EV_CUSTOM""" 4 .el .IP "\f(CWEV_CUSTOM\fR" 4 .IX Item "EV_CUSTOM" Not ever sent (or otherwise used) by libev itself, but can be freely used by libev users to signal watchers (e.g. via \f(CW\*(C`ev_feed_event\*(C'\fR). .ie n .IP """EV_ERROR""" 4 .el .IP "\f(CWEV_ERROR\fR" 4 .IX Item "EV_ERROR" An unspecified error has occurred, the watcher has been stopped. This might happen because the watcher could not be properly started because libev ran out of memory, a file descriptor was found to be closed or any other problem. Libev considers these application bugs. .Sp You best act on it by reporting the problem and somehow coping with the watcher being stopped. Note that well-written programs should not receive an error ever, so when your watcher receives it, this usually indicates a bug in your program. .Sp Libev will usually signal a few \*(L"dummy\*(R" events together with an error, for example it might indicate that a fd is readable or writable, and if your callbacks is well-written it can just attempt the operation and cope with the error from \fIread()\fR or \fIwrite()\fR. This will not work in multi-threaded programs, though, as the fd could already be closed and reused for another thing, so beware. .SS "\s-1GENERIC\s0 \s-1WATCHER\s0 \s-1FUNCTIONS\s0" .IX Subsection "GENERIC WATCHER FUNCTIONS" .ie n .IP """ev_init"" (ev_TYPE *watcher, callback)" 4 .el .IP "\f(CWev_init\fR (ev_TYPE *watcher, callback)" 4 .IX Item "ev_init (ev_TYPE *watcher, callback)" This macro initialises the generic portion of a watcher. The contents of the watcher object can be arbitrary (so \f(CW\*(C`malloc\*(C'\fR will do). Only the generic parts of the watcher are initialised, you \fIneed\fR to call the type-specific \f(CW\*(C`ev_TYPE_set\*(C'\fR macro afterwards to initialise the type-specific parts. For each type there is also a \f(CW\*(C`ev_TYPE_init\*(C'\fR macro which rolls both calls into one. .Sp You can reinitialise a watcher at any time as long as it has been stopped (or never started) and there are no pending events outstanding. .Sp The callback is always of type \f(CW\*(C`void (*)(struct ev_loop *loop, ev_TYPE *watcher, int revents)\*(C'\fR. .Sp Example: Initialise an \f(CW\*(C`ev_io\*(C'\fR watcher in two steps. .Sp .Vb 3 \& ev_io w; \& ev_init (&w, my_cb); \& ev_io_set (&w, STDIN_FILENO, EV_READ); .Ve .ie n .IP """ev_TYPE_set"" (ev_TYPE *watcher, [args])" 4 .el .IP "\f(CWev_TYPE_set\fR (ev_TYPE *watcher, [args])" 4 .IX Item "ev_TYPE_set (ev_TYPE *watcher, [args])" This macro initialises the type-specific parts of a watcher. You need to call \f(CW\*(C`ev_init\*(C'\fR at least once before you call this macro, but you can call \f(CW\*(C`ev_TYPE_set\*(C'\fR any number of times. You must not, however, call this macro on a watcher that is active (it can be pending, however, which is a difference to the \f(CW\*(C`ev_init\*(C'\fR macro). .Sp Although some watcher types do not have type-specific arguments (e.g. \f(CW\*(C`ev_prepare\*(C'\fR) you still need to call its \f(CW\*(C`set\*(C'\fR macro. .Sp See \f(CW\*(C`ev_init\*(C'\fR, above, for an example. .ie n .IP """ev_TYPE_init"" (ev_TYPE *watcher, callback, [args])" 4 .el .IP "\f(CWev_TYPE_init\fR (ev_TYPE *watcher, callback, [args])" 4 .IX Item "ev_TYPE_init (ev_TYPE *watcher, callback, [args])" This convenience macro rolls both \f(CW\*(C`ev_init\*(C'\fR and \f(CW\*(C`ev_TYPE_set\*(C'\fR macro calls into a single call. This is the most convenient method to initialise a watcher. The same limitations apply, of course. .Sp Example: Initialise and set an \f(CW\*(C`ev_io\*(C'\fR watcher in one step. .Sp .Vb 1 \& ev_io_init (&w, my_cb, STDIN_FILENO, EV_READ); .Ve .ie n .IP """ev_TYPE_start"" (loop, ev_TYPE *watcher)" 4 .el .IP "\f(CWev_TYPE_start\fR (loop, ev_TYPE *watcher)" 4 .IX Item "ev_TYPE_start (loop, ev_TYPE *watcher)" Starts (activates) the given watcher. Only active watchers will receive events. If the watcher is already active nothing will happen. .Sp Example: Start the \f(CW\*(C`ev_io\*(C'\fR watcher that is being abused as example in this whole section. .Sp .Vb 1 \& ev_io_start (EV_DEFAULT_UC, &w); .Ve .ie n .IP """ev_TYPE_stop"" (loop, ev_TYPE *watcher)" 4 .el .IP "\f(CWev_TYPE_stop\fR (loop, ev_TYPE *watcher)" 4 .IX Item "ev_TYPE_stop (loop, ev_TYPE *watcher)" Stops the given watcher if active, and clears the pending status (whether the watcher was active or not). .Sp It is possible that stopped watchers are pending \- for example, non-repeating timers are being stopped when they become pending \- but calling \f(CW\*(C`ev_TYPE_stop\*(C'\fR ensures that the watcher is neither active nor pending. If you want to free or reuse the memory used by the watcher it is therefore a good idea to always call its \f(CW\*(C`ev_TYPE_stop\*(C'\fR function. .IP "bool ev_is_active (ev_TYPE *watcher)" 4 .IX Item "bool ev_is_active (ev_TYPE *watcher)" Returns a true value iff the watcher is active (i.e. it has been started and not yet been stopped). As long as a watcher is active you must not modify it. .IP "bool ev_is_pending (ev_TYPE *watcher)" 4 .IX Item "bool ev_is_pending (ev_TYPE *watcher)" Returns a true value iff the watcher is pending, (i.e. it has outstanding events but its callback has not yet been invoked). As long as a watcher is pending (but not active) you must not call an init function on it (but \&\f(CW\*(C`ev_TYPE_set\*(C'\fR is safe), you must not change its priority, and you must make sure the watcher is available to libev (e.g. you cannot \f(CW\*(C`free ()\*(C'\fR it). .IP "callback ev_cb (ev_TYPE *watcher)" 4 .IX Item "callback ev_cb (ev_TYPE *watcher)" Returns the callback currently set on the watcher. .IP "ev_set_cb (ev_TYPE *watcher, callback)" 4 .IX Item "ev_set_cb (ev_TYPE *watcher, callback)" Change the callback. You can change the callback at virtually any time (modulo threads). .IP "ev_set_priority (ev_TYPE *watcher, int priority)" 4 .IX Item "ev_set_priority (ev_TYPE *watcher, int priority)" .PD 0 .IP "int ev_priority (ev_TYPE *watcher)" 4 .IX Item "int ev_priority (ev_TYPE *watcher)" .PD Set and query the priority of the watcher. The priority is a small integer between \f(CW\*(C`EV_MAXPRI\*(C'\fR (default: \f(CW2\fR) and \f(CW\*(C`EV_MINPRI\*(C'\fR (default: \f(CW\*(C`\-2\*(C'\fR). Pending watchers with higher priority will be invoked before watchers with lower priority, but priority will not keep watchers from being executed (except for \f(CW\*(C`ev_idle\*(C'\fR watchers). .Sp If you need to suppress invocation when higher priority events are pending you need to look at \f(CW\*(C`ev_idle\*(C'\fR watchers, which provide this functionality. .Sp You \fImust not\fR change the priority of a watcher as long as it is active or pending. .Sp Setting a priority outside the range of \f(CW\*(C`EV_MINPRI\*(C'\fR to \f(CW\*(C`EV_MAXPRI\*(C'\fR is fine, as long as you do not mind that the priority value you query might or might not have been clamped to the valid range. .Sp The default priority used by watchers when no priority has been set is always \f(CW0\fR, which is supposed to not be too high and not be too low :). .Sp See \*(L"\s-1WATCHER\s0 \s-1PRIORITY\s0 \s-1MODELS\s0\*(R", below, for a more thorough treatment of priorities. .IP "ev_invoke (loop, ev_TYPE *watcher, int revents)" 4 .IX Item "ev_invoke (loop, ev_TYPE *watcher, int revents)" Invoke the \f(CW\*(C`watcher\*(C'\fR with the given \f(CW\*(C`loop\*(C'\fR and \f(CW\*(C`revents\*(C'\fR. Neither \&\f(CW\*(C`loop\*(C'\fR nor \f(CW\*(C`revents\*(C'\fR need to be valid as long as the watcher callback can deal with that fact, as both are simply passed through to the callback. .IP "int ev_clear_pending (loop, ev_TYPE *watcher)" 4 .IX Item "int ev_clear_pending (loop, ev_TYPE *watcher)" If the watcher is pending, this function clears its pending status and returns its \f(CW\*(C`revents\*(C'\fR bitset (as if its callback was invoked). If the watcher isn't pending it does nothing and returns \f(CW0\fR. .Sp Sometimes it can be useful to \*(L"poll\*(R" a watcher instead of waiting for its callback to be invoked, which can be accomplished with this function. .IP "ev_feed_event (loop, ev_TYPE *watcher, int revents)" 4 .IX Item "ev_feed_event (loop, ev_TYPE *watcher, int revents)" Feeds the given event set into the event loop, as if the specified event had happened for the specified watcher (which must be a pointer to an initialised but not necessarily started event watcher). Obviously you must not free the watcher as long as it has pending events. .Sp Stopping the watcher, letting libev invoke it, or calling \&\f(CW\*(C`ev_clear_pending\*(C'\fR will clear the pending event, even if the watcher was not started in the first place. .Sp See also \f(CW\*(C`ev_feed_fd_event\*(C'\fR and \f(CW\*(C`ev_feed_signal_event\*(C'\fR for related functions that do not need a watcher. .PP See also the \*(L"\s-1ASSOCIATING\s0 \s-1CUSTOM\s0 \s-1DATA\s0 \s-1WITH\s0 A \s-1WATCHER\s0\*(R" and \*(L"\s-1BUILDING\s0 \s-1YOUR\s0 \&\s-1OWN\s0 \s-1COMPOSITE\s0 \s-1WATCHERS\s0\*(R" idioms. .SS "\s-1WATCHER\s0 \s-1STATES\s0" .IX Subsection "WATCHER STATES" There are various watcher states mentioned throughout this manual \- active, pending and so on. In this section these states and the rules to transition between them will be described in more detail \- and while these rules might look complicated, they usually do \*(L"the right thing\*(R". .IP "initialiased" 4 .IX Item "initialiased" Before a watcher can be registered with the event loop it has to be initialised. This can be done with a call to \f(CW\*(C`ev_TYPE_init\*(C'\fR, or calls to \&\f(CW\*(C`ev_init\*(C'\fR followed by the watcher-specific \f(CW\*(C`ev_TYPE_set\*(C'\fR function. .Sp In this state it is simply some block of memory that is suitable for use in an event loop. It can be moved around, freed, reused etc. at will \- as long as you either keep the memory contents intact, or call \&\f(CW\*(C`ev_TYPE_init\*(C'\fR again. .IP "started/running/active" 4 .IX Item "started/running/active" Once a watcher has been started with a call to \f(CW\*(C`ev_TYPE_start\*(C'\fR it becomes property of the event loop, and is actively waiting for events. While in this state it cannot be accessed (except in a few documented ways), moved, freed or anything else \- the only legal thing is to keep a pointer to it, and call libev functions on it that are documented to work on active watchers. .IP "pending" 4 .IX Item "pending" If a watcher is active and libev determines that an event it is interested in has occurred (such as a timer expiring), it will become pending. It will stay in this pending state until either it is stopped or its callback is about to be invoked, so it is not normally pending inside the watcher callback. .Sp The watcher might or might not be active while it is pending (for example, an expired non-repeating timer can be pending but no longer active). If it is stopped, it can be freely accessed (e.g. by calling \f(CW\*(C`ev_TYPE_set\*(C'\fR), but it is still property of the event loop at this time, so cannot be moved, freed or reused. And if it is active the rules described in the previous item still apply. .Sp It is also possible to feed an event on a watcher that is not active (e.g. via \f(CW\*(C`ev_feed_event\*(C'\fR), in which case it becomes pending without being active. .IP "stopped" 4 .IX Item "stopped" A watcher can be stopped implicitly by libev (in which case it might still be pending), or explicitly by calling its \f(CW\*(C`ev_TYPE_stop\*(C'\fR function. The latter will clear any pending state the watcher might be in, regardless of whether it was active or not, so stopping a watcher explicitly before freeing it is often a good idea. .Sp While stopped (and not pending) the watcher is essentially in the initialised state, that is, it can be reused, moved, modified in any way you wish (but when you trash the memory block, you need to \f(CW\*(C`ev_TYPE_init\*(C'\fR it again). .SS "\s-1WATCHER\s0 \s-1PRIORITY\s0 \s-1MODELS\s0" .IX Subsection "WATCHER PRIORITY MODELS" Many event loops support \fIwatcher priorities\fR, which are usually small integers that influence the ordering of event callback invocation between watchers in some way, all else being equal. .PP In libev, Watcher priorities can be set using \f(CW\*(C`ev_set_priority\*(C'\fR. See its description for the more technical details such as the actual priority range. .PP There are two common ways how these these priorities are being interpreted by event loops: .PP In the more common lock-out model, higher priorities \*(L"lock out\*(R" invocation of lower priority watchers, which means as long as higher priority watchers receive events, lower priority watchers are not being invoked. .PP The less common only-for-ordering model uses priorities solely to order callback invocation within a single event loop iteration: Higher priority watchers are invoked before lower priority ones, but they all get invoked before polling for new events. .PP Libev uses the second (only-for-ordering) model for all its watchers except for idle watchers (which use the lock-out model). .PP The rationale behind this is that implementing the lock-out model for watchers is not well supported by most kernel interfaces, and most event libraries will just poll for the same events again and again as long as their callbacks have not been executed, which is very inefficient in the common case of one high-priority watcher locking out a mass of lower priority ones. .PP Static (ordering) priorities are most useful when you have two or more watchers handling the same resource: a typical usage example is having an \&\f(CW\*(C`ev_io\*(C'\fR watcher to receive data, and an associated \f(CW\*(C`ev_timer\*(C'\fR to handle timeouts. Under load, data might be received while the program handles other jobs, but since timers normally get invoked first, the timeout handler will be executed before checking for data. In that case, giving the timer a lower priority than the I/O watcher ensures that I/O will be handled first even under adverse conditions (which is usually, but not always, what you want). .PP Since idle watchers use the \*(L"lock-out\*(R" model, meaning that idle watchers will only be executed when no same or higher priority watchers have received events, they can be used to implement the \*(L"lock-out\*(R" model when required. .PP For example, to emulate how many other event libraries handle priorities, you can associate an \f(CW\*(C`ev_idle\*(C'\fR watcher to each such watcher, and in the normal watcher callback, you just start the idle watcher. The real processing is done in the idle watcher callback. This causes libev to continuously poll and process kernel event data for the watcher, but when the lock-out case is known to be rare (which in turn is rare :), this is workable. .PP Usually, however, the lock-out model implemented that way will perform miserably under the type of load it was designed to handle. In that case, it might be preferable to stop the real watcher before starting the idle watcher, so the kernel will not have to process the event in case the actual processing will be delayed for considerable time. .PP Here is an example of an I/O watcher that should run at a strictly lower priority than the default, and which should only process data when no other events are pending: .PP .Vb 2 \& ev_idle idle; // actual processing watcher \& ev_io io; // actual event watcher \& \& static void \& io_cb (EV_P_ ev_io *w, int revents) \& { \& // stop the I/O watcher, we received the event, but \& // are not yet ready to handle it. \& ev_io_stop (EV_A_ w); \& \& // start the idle watcher to handle the actual event. \& // it will not be executed as long as other watchers \& // with the default priority are receiving events. \& ev_idle_start (EV_A_ &idle); \& } \& \& static void \& idle_cb (EV_P_ ev_idle *w, int revents) \& { \& // actual processing \& read (STDIN_FILENO, ...); \& \& // have to start the I/O watcher again, as \& // we have handled the event \& ev_io_start (EV_P_ &io); \& } \& \& // initialisation \& ev_idle_init (&idle, idle_cb); \& ev_io_init (&io, io_cb, STDIN_FILENO, EV_READ); \& ev_io_start (EV_DEFAULT_ &io); .Ve .PP In the \*(L"real\*(R" world, it might also be beneficial to start a timer, so that low-priority connections can not be locked out forever under load. This enables your program to keep a lower latency for important connections during short periods of high load, while not completely locking out less important ones. .SH "WATCHER TYPES" .IX Header "WATCHER TYPES" This section describes each watcher in detail, but will not repeat information given in the last section. Any initialisation/set macros, functions and members specific to the watcher type are explained. .PP Members are additionally marked with either \fI[read\-only]\fR, meaning that, while the watcher is active, you can look at the member and expect some sensible content, but you must not modify it (you can modify it while the watcher is stopped to your hearts content), or \fI[read\-write]\fR, which means you can expect it to have some sensible content while the watcher is active, but you can also modify it. Modifying it may not do something sensible or take immediate effect (or do anything at all), but libev will not crash or malfunction in any way. .ie n .SS """ev_io"" \- is this file descriptor readable or writable?" .el .SS "\f(CWev_io\fP \- is this file descriptor readable or writable?" .IX Subsection "ev_io - is this file descriptor readable or writable?" I/O watchers check whether a file descriptor is readable or writable in each iteration of the event loop, or, more precisely, when reading would not block the process and writing would at least be able to write some data. This behaviour is called level-triggering because you keep receiving events as long as the condition persists. Remember you can stop the watcher if you don't want to act on the event and neither want to receive future events. .PP In general you can register as many read and/or write event watchers per fd as you want (as long as you don't confuse yourself). Setting all file descriptors to non-blocking mode is also usually a good idea (but not required if you know what you are doing). .PP Another thing you have to watch out for is that it is quite easy to receive \*(L"spurious\*(R" readiness notifications, that is, your callback might be called with \f(CW\*(C`EV_READ\*(C'\fR but a subsequent \f(CW\*(C`read\*(C'\fR(2) will actually block because there is no data. It is very easy to get into this situation even with a relatively standard program structure. Thus it is best to always use non-blocking I/O: An extra \f(CW\*(C`read\*(C'\fR(2) returning \f(CW\*(C`EAGAIN\*(C'\fR is far preferable to a program hanging until some data arrives. .PP If you cannot run the fd in non-blocking mode (for example you should not play around with an Xlib connection), then you have to separately re-test whether a file descriptor is really ready with a known-to-be good interface such as poll (fortunately in the case of Xlib, it already does this on its own, so its quite safe to use). Some people additionally use \f(CW\*(C`SIGALRM\*(C'\fR and an interval timer, just to be sure you won't block indefinitely. .PP But really, best use non-blocking mode. .PP \fIThe special problem of disappearing file descriptors\fR .IX Subsection "The special problem of disappearing file descriptors" .PP Some backends (e.g. kqueue, epoll) need to be told about closing a file descriptor (either due to calling \f(CW\*(C`close\*(C'\fR explicitly or any other means, such as \f(CW\*(C`dup2\*(C'\fR). The reason is that you register interest in some file descriptor, but when it goes away, the operating system will silently drop this interest. If another file descriptor with the same number then is registered with libev, there is no efficient way to see that this is, in fact, a different file descriptor. .PP To avoid having to explicitly tell libev about such cases, libev follows the following policy: Each time \f(CW\*(C`ev_io_set\*(C'\fR is being called, libev will assume that this is potentially a new file descriptor, otherwise it is assumed that the file descriptor stays the same. That means that you \fIhave\fR to call \f(CW\*(C`ev_io_set\*(C'\fR (or \f(CW\*(C`ev_io_init\*(C'\fR) when you change the descriptor even if the file descriptor number itself did not change. .PP This is how one would do it normally anyway, the important point is that the libev application should not optimise around libev but should leave optimisations to libev. .PP \fIThe special problem of dup'ed file descriptors\fR .IX Subsection "The special problem of dup'ed file descriptors" .PP Some backends (e.g. epoll), cannot register events for file descriptors, but only events for the underlying file descriptions. That means when you have \f(CW\*(C`dup ()\*(C'\fR'ed file descriptors or weirder constellations, and register events for them, only one file descriptor might actually receive events. .PP There is no workaround possible except not registering events for potentially \f(CW\*(C`dup ()\*(C'\fR'ed file descriptors, or to resort to \&\f(CW\*(C`EVBACKEND_SELECT\*(C'\fR or \f(CW\*(C`EVBACKEND_POLL\*(C'\fR. .PP \fIThe special problem of files\fR .IX Subsection "The special problem of files" .PP Many people try to use \f(CW\*(C`select\*(C'\fR (or libev) on file descriptors representing files, and expect it to become ready when their program doesn't block on disk accesses (which can take a long time on their own). .PP However, this cannot ever work in the \*(L"expected\*(R" way \- you get a readiness notification as soon as the kernel knows whether and how much data is there, and in the case of open files, that's always the case, so you always get a readiness notification instantly, and your read (or possibly write) will still block on the disk I/O. .PP Another way to view it is that in the case of sockets, pipes, character devices and so on, there is another party (the sender) that delivers data on its own, but in the case of files, there is no such thing: the disk will not send data on its own, simply because it doesn't know what you wish to read \- you would first have to request some data. .PP Since files are typically not-so-well supported by advanced notification mechanism, libev tries hard to emulate \s-1POSIX\s0 behaviour with respect to files, even though you should not use it. The reason for this is convenience: sometimes you want to watch \s-1STDIN\s0 or \s-1STDOUT\s0, which is usually a tty, often a pipe, but also sometimes files or special devices (for example, \f(CW\*(C`epoll\*(C'\fR on Linux works with \fI/dev/random\fR but not with \&\fI/dev/urandom\fR), and even though the file might better be served with asynchronous I/O instead of with non-blocking I/O, it is still useful when it \*(L"just works\*(R" instead of freezing. .PP So avoid file descriptors pointing to files when you know it (e.g. use libeio), but use them when it is convenient, e.g. for \s-1STDIN/STDOUT\s0, or when you rarely read from a file instead of from a socket, and want to reuse the same code path. .PP \fIThe special problem of fork\fR .IX Subsection "The special problem of fork" .PP Some backends (epoll, kqueue) do not support \f(CW\*(C`fork ()\*(C'\fR at all or exhibit useless behaviour. Libev fully supports fork, but needs to be told about it in the child if you want to continue to use it in the child. .PP To support fork in your child processes, you have to call \f(CW\*(C`ev_loop_fork ()\*(C'\fR after a fork in the child, enable \f(CW\*(C`EVFLAG_FORKCHECK\*(C'\fR, or resort to \&\f(CW\*(C`EVBACKEND_SELECT\*(C'\fR or \f(CW\*(C`EVBACKEND_POLL\*(C'\fR. .PP \fIThe special problem of \s-1SIGPIPE\s0\fR .IX Subsection "The special problem of SIGPIPE" .PP While not really specific to libev, it is easy to forget about \f(CW\*(C`SIGPIPE\*(C'\fR: when writing to a pipe whose other end has been closed, your program gets sent a \s-1SIGPIPE\s0, which, by default, aborts your program. For most programs this is sensible behaviour, for daemons, this is usually undesirable. .PP So when you encounter spurious, unexplained daemon exits, make sure you ignore \s-1SIGPIPE\s0 (and maybe make sure you log the exit status of your daemon somewhere, as that would have given you a big clue). .PP \fIThe special problem of \fIaccept()\fIing when you can't\fR .IX Subsection "The special problem of accept()ing when you can't" .PP Many implementations of the \s-1POSIX\s0 \f(CW\*(C`accept\*(C'\fR function (for example, found in post\-2004 Linux) have the peculiar behaviour of not removing a connection from the pending queue in all error cases. .PP For example, larger servers often run out of file descriptors (because of resource limits), causing \f(CW\*(C`accept\*(C'\fR to fail with \f(CW\*(C`ENFILE\*(C'\fR but not rejecting the connection, leading to libev signalling readiness on the next iteration again (the connection still exists after all), and typically causing the program to loop at 100% \s-1CPU\s0 usage. .PP Unfortunately, the set of errors that cause this issue differs between operating systems, there is usually little the app can do to remedy the situation, and no known thread-safe method of removing the connection to cope with overload is known (to me). .PP One of the easiest ways to handle this situation is to just ignore it \&\- when the program encounters an overload, it will just loop until the situation is over. While this is a form of busy waiting, no \s-1OS\s0 offers an event-based way to handle this situation, so it's the best one can do. .PP A better way to handle the situation is to log any errors other than \&\f(CW\*(C`EAGAIN\*(C'\fR and \f(CW\*(C`EWOULDBLOCK\*(C'\fR, making sure not to flood the log with such messages, and continue as usual, which at least gives the user an idea of what could be wrong (\*(L"raise the ulimit!\*(R"). For extra points one could stop the \f(CW\*(C`ev_io\*(C'\fR watcher on the listening fd \*(L"for a while\*(R", which reduces \s-1CPU\s0 usage. .PP If your program is single-threaded, then you could also keep a dummy file descriptor for overload situations (e.g. by opening \fI/dev/null\fR), and when you run into \f(CW\*(C`ENFILE\*(C'\fR or \f(CW\*(C`EMFILE\*(C'\fR, close it, run \f(CW\*(C`accept\*(C'\fR, close that fd, and create a new dummy fd. This will gracefully refuse clients under typical overload conditions. .PP The last way to handle it is to simply log the error and \f(CW\*(C`exit\*(C'\fR, as is often done with \f(CW\*(C`malloc\*(C'\fR failures, but this results in an easy opportunity for a DoS attack. .PP \fIWatcher-Specific Functions\fR .IX Subsection "Watcher-Specific Functions" .IP "ev_io_init (ev_io *, callback, int fd, int events)" 4 .IX Item "ev_io_init (ev_io *, callback, int fd, int events)" .PD 0 .IP "ev_io_set (ev_io *, int fd, int events)" 4 .IX Item "ev_io_set (ev_io *, int fd, int events)" .PD Configures an \f(CW\*(C`ev_io\*(C'\fR watcher. The \f(CW\*(C`fd\*(C'\fR is the file descriptor to receive events for and \f(CW\*(C`events\*(C'\fR is either \f(CW\*(C`EV_READ\*(C'\fR, \f(CW\*(C`EV_WRITE\*(C'\fR or \&\f(CW\*(C`EV_READ | EV_WRITE\*(C'\fR, to express the desire to receive the given events. .IP "int fd [read\-only]" 4 .IX Item "int fd [read-only]" The file descriptor being watched. .IP "int events [read\-only]" 4 .IX Item "int events [read-only]" The events being watched. .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: Call \f(CW\*(C`stdin_readable_cb\*(C'\fR when \s-1STDIN_FILENO\s0 has become, well readable, but only once. Since it is likely line-buffered, you could attempt to read a whole line in the callback. .PP .Vb 6 \& static void \& stdin_readable_cb (struct ev_loop *loop, ev_io *w, int revents) \& { \& ev_io_stop (loop, w); \& .. read from stdin here (or from w\->fd) and handle any I/O errors \& } \& \& ... \& struct ev_loop *loop = ev_default_init (0); \& ev_io stdin_readable; \& ev_io_init (&stdin_readable, stdin_readable_cb, STDIN_FILENO, EV_READ); \& ev_io_start (loop, &stdin_readable); \& ev_run (loop, 0); .Ve .ie n .SS """ev_timer"" \- relative and optionally repeating timeouts" .el .SS "\f(CWev_timer\fP \- relative and optionally repeating timeouts" .IX Subsection "ev_timer - relative and optionally repeating timeouts" Timer watchers are simple relative timers that generate an event after a given time, and optionally repeating in regular intervals after that. .PP The timers are based on real time, that is, if you register an event that times out after an hour and you reset your system clock to January last year, it will still time out after (roughly) one hour. \*(L"Roughly\*(R" because detecting time jumps is hard, and some inaccuracies are unavoidable (the monotonic clock option helps a lot here). .PP The callback is guaranteed to be invoked only \fIafter\fR its timeout has passed (not \fIat\fR, so on systems with very low-resolution clocks this might introduce a small delay, see \*(L"the special problem of being too early\*(R", below). If multiple timers become ready during the same loop iteration then the ones with earlier time-out values are invoked before ones of the same priority with later time-out values (but this is no longer true when a callback calls \f(CW\*(C`ev_run\*(C'\fR recursively). .PP \fIBe smart about timeouts\fR .IX Subsection "Be smart about timeouts" .PP Many real-world problems involve some kind of timeout, usually for error recovery. A typical example is an \s-1HTTP\s0 request \- if the other side hangs, you want to raise some error after a while. .PP What follows are some ways to handle this problem, from obvious and inefficient to smart and efficient. .PP In the following, a 60 second activity timeout is assumed \- a timeout that gets reset to 60 seconds each time there is activity (e.g. each time some data or other life sign was received). .IP "1. Use a timer and stop, reinitialise and start it on activity." 4 .IX Item "1. Use a timer and stop, reinitialise and start it on activity." This is the most obvious, but not the most simple way: In the beginning, start the watcher: .Sp .Vb 2 \& ev_timer_init (timer, callback, 60., 0.); \& ev_timer_start (loop, timer); .Ve .Sp Then, each time there is some activity, \f(CW\*(C`ev_timer_stop\*(C'\fR it, initialise it and start it again: .Sp .Vb 3 \& ev_timer_stop (loop, timer); \& ev_timer_set (timer, 60., 0.); \& ev_timer_start (loop, timer); .Ve .Sp This is relatively simple to implement, but means that each time there is some activity, libev will first have to remove the timer from its internal data structure and then add it again. Libev tries to be fast, but it's still not a constant-time operation. .ie n .IP "2. Use a timer and re-start it with ""ev_timer_again"" inactivity." 4 .el .IP "2. Use a timer and re-start it with \f(CWev_timer_again\fR inactivity." 4 .IX Item "2. Use a timer and re-start it with ev_timer_again inactivity." This is the easiest way, and involves using \f(CW\*(C`ev_timer_again\*(C'\fR instead of \&\f(CW\*(C`ev_timer_start\*(C'\fR. .Sp To implement this, configure an \f(CW\*(C`ev_timer\*(C'\fR with a \f(CW\*(C`repeat\*(C'\fR value of \f(CW60\fR and then call \f(CW\*(C`ev_timer_again\*(C'\fR at start and each time you successfully read or write some data. If you go into an idle state where you do not expect data to travel on the socket, you can \f(CW\*(C`ev_timer_stop\*(C'\fR the timer, and \f(CW\*(C`ev_timer_again\*(C'\fR will automatically restart it if need be. .Sp That means you can ignore both the \f(CW\*(C`ev_timer_start\*(C'\fR function and the \&\f(CW\*(C`after\*(C'\fR argument to \f(CW\*(C`ev_timer_set\*(C'\fR, and only ever use the \f(CW\*(C`repeat\*(C'\fR member and \f(CW\*(C`ev_timer_again\*(C'\fR. .Sp At start: .Sp .Vb 3 \& ev_init (timer, callback); \& timer\->repeat = 60.; \& ev_timer_again (loop, timer); .Ve .Sp Each time there is some activity: .Sp .Vb 1 \& ev_timer_again (loop, timer); .Ve .Sp It is even possible to change the time-out on the fly, regardless of whether the watcher is active or not: .Sp .Vb 2 \& timer\->repeat = 30.; \& ev_timer_again (loop, timer); .Ve .Sp This is slightly more efficient then stopping/starting the timer each time you want to modify its timeout value, as libev does not have to completely remove and re-insert the timer from/into its internal data structure. .Sp It is, however, even simpler than the \*(L"obvious\*(R" way to do it. .IP "3. Let the timer time out, but then re-arm it as required." 4 .IX Item "3. Let the timer time out, but then re-arm it as required." This method is more tricky, but usually most efficient: Most timeouts are relatively long compared to the intervals between other activity \- in our example, within 60 seconds, there are usually many I/O events with associated activity resets. .Sp In this case, it would be more efficient to leave the \f(CW\*(C`ev_timer\*(C'\fR alone, but remember the time of last activity, and check for a real timeout only within the callback: .Sp .Vb 3 \& ev_tstamp timeout = 60.; \& ev_tstamp last_activity; // time of last activity \& ev_timer timer; \& \& static void \& callback (EV_P_ ev_timer *w, int revents) \& { \& // calculate when the timeout would happen \& ev_tstamp after = last_activity \- ev_now (EV_A) + timeout; \& \& // if negative, it means we the timeout already occurred \& if (after < 0.) \& { \& // timeout occurred, take action \& } \& else \& { \& // callback was invoked, but there was some recent \& // activity. simply restart the timer to time out \& // after "after" seconds, which is the earliest time \& // the timeout can occur. \& ev_timer_set (w, after, 0.); \& ev_timer_start (EV_A_ w); \& } \& } .Ve .Sp To summarise the callback: first calculate in how many seconds the timeout will occur (by calculating the absolute time when it would occur, \&\f(CW\*(C`last_activity + timeout\*(C'\fR, and subtracting the current time, \f(CW\*(C`ev_now (EV_A)\*(C'\fR from that). .Sp If this value is negative, then we are already past the timeout, i.e. we timed out, and need to do whatever is needed in this case. .Sp Otherwise, we now the earliest time at which the timeout would trigger, and simply start the timer with this timeout value. .Sp In other words, each time the callback is invoked it will check whether the timeout occurred. If not, it will simply reschedule itself to check again at the earliest time it could time out. Rinse. Repeat. .Sp This scheme causes more callback invocations (about one every 60 seconds minus half the average time between activity), but virtually no calls to libev to change the timeout. .Sp To start the machinery, simply initialise the watcher and set \&\f(CW\*(C`last_activity\*(C'\fR to the current time (meaning there was some activity just now), then call the callback, which will \*(L"do the right thing\*(R" and start the timer: .Sp .Vb 3 \& last_activity = ev_now (EV_A); \& ev_init (&timer, callback); \& callback (EV_A_ &timer, 0); .Ve .Sp When there is some activity, simply store the current time in \&\f(CW\*(C`last_activity\*(C'\fR, no libev calls at all: .Sp .Vb 2 \& if (activity detected) \& last_activity = ev_now (EV_A); .Ve .Sp When your timeout value changes, then the timeout can be changed by simply providing a new value, stopping the timer and calling the callback, which will again do the right thing (for example, time out immediately :). .Sp .Vb 3 \& timeout = new_value; \& ev_timer_stop (EV_A_ &timer); \& callback (EV_A_ &timer, 0); .Ve .Sp This technique is slightly more complex, but in most cases where the time-out is unlikely to be triggered, much more efficient. .IP "4. Wee, just use a double-linked list for your timeouts." 4 .IX Item "4. Wee, just use a double-linked list for your timeouts." If there is not one request, but many thousands (millions...), all employing some kind of timeout with the same timeout value, then one can do even better: .Sp When starting the timeout, calculate the timeout value and put the timeout at the \fIend\fR of the list. .Sp Then use an \f(CW\*(C`ev_timer\*(C'\fR to fire when the timeout at the \fIbeginning\fR of the list is expected to fire (for example, using the technique #3). .Sp When there is some activity, remove the timer from the list, recalculate the timeout, append it to the end of the list again, and make sure to update the \f(CW\*(C`ev_timer\*(C'\fR if it was taken from the beginning of the list. .Sp This way, one can manage an unlimited number of timeouts in O(1) time for starting, stopping and updating the timers, at the expense of a major complication, and having to use a constant timeout. The constant timeout ensures that the list stays sorted. .PP So which method the best? .PP Method #2 is a simple no-brain-required solution that is adequate in most situations. Method #3 requires a bit more thinking, but handles many cases better, and isn't very complicated either. In most case, choosing either one is fine, with #3 being better in typical situations. .PP Method #1 is almost always a bad idea, and buys you nothing. Method #4 is rather complicated, but extremely efficient, something that really pays off after the first million or so of active timers, i.e. it's usually overkill :) .PP \fIThe special problem of being too early\fR .IX Subsection "The special problem of being too early" .PP If you ask a timer to call your callback after three seconds, then you expect it to be invoked after three seconds \- but of course, this cannot be guaranteed to infinite precision. Less obviously, it cannot be guaranteed to any precision by libev \- imagine somebody suspending the process with a \s-1STOP\s0 signal for a few hours for example. .PP So, libev tries to invoke your callback as soon as possible \fIafter\fR the delay has occurred, but cannot guarantee this. .PP A less obvious failure mode is calling your callback too early: many event loops compare timestamps with a \*(L"elapsed delay >= requested delay\*(R", but this can cause your callback to be invoked much earlier than you would expect. .PP To see why, imagine a system with a clock that only offers full second resolution (think windows if you can't come up with a broken enough \s-1OS\s0 yourself). If you schedule a one-second timer at the time 500.9, then the event loop will schedule your timeout to elapse at a system time of 500 (500.9 truncated to the resolution) + 1, or 501. .PP If an event library looks at the timeout 0.1s later, it will see \*(L"501 >= 501\*(R" and invoke the callback 0.1s after it was started, even though a one-second delay was requested \- this is being \*(L"too early\*(R", despite best intentions. .PP This is the reason why libev will never invoke the callback if the elapsed delay equals the requested delay, but only when the elapsed delay is larger than the requested delay. In the example above, libev would only invoke the callback at system time 502, or 1.1s after the timer was started. .PP So, while libev cannot guarantee that your callback will be invoked exactly when requested, it \fIcan\fR and \fIdoes\fR guarantee that the requested delay has actually elapsed, or in other words, it always errs on the \*(L"too late\*(R" side of things. .PP \fIThe special problem of time updates\fR .IX Subsection "The special problem of time updates" .PP Establishing the current time is a costly operation (it usually takes at least one system call): \s-1EV\s0 therefore updates its idea of the current time only before and after \f(CW\*(C`ev_run\*(C'\fR collects new events, which causes a growing difference between \f(CW\*(C`ev_now ()\*(C'\fR and \f(CW\*(C`ev_time ()\*(C'\fR when handling lots of events in one iteration. .PP The relative timeouts are calculated relative to the \f(CW\*(C`ev_now ()\*(C'\fR time. This is usually the right thing as this timestamp refers to the time of the event triggering whatever timeout you are modifying/starting. If you suspect event processing to be delayed and you \fIneed\fR to base the timeout on the current time, use something like this to adjust for this: .PP .Vb 1 \& ev_timer_set (&timer, after + ev_now () \- ev_time (), 0.); .Ve .PP If the event loop is suspended for a long time, you can also force an update of the time returned by \f(CW\*(C`ev_now ()\*(C'\fR by calling \f(CW\*(C`ev_now_update ()\*(C'\fR. .PP \fIThe special problem of unsynchronised clocks\fR .IX Subsection "The special problem of unsynchronised clocks" .PP Modern systems have a variety of clocks \- libev itself uses the normal \&\*(L"wall clock\*(R" clock and, if available, the monotonic clock (to avoid time jumps). .PP Neither of these clocks is synchronised with each other or any other clock on the system, so \f(CW\*(C`ev_time ()\*(C'\fR might return a considerably different time than \f(CW\*(C`gettimeofday ()\*(C'\fR or \f(CW\*(C`time ()\*(C'\fR. On a GNU/Linux system, for example, a call to \f(CW\*(C`gettimeofday\*(C'\fR might return a second count that is one higher than a directly following call to \f(CW\*(C`time\*(C'\fR. .PP The moral of this is to only compare libev-related timestamps with \&\f(CW\*(C`ev_time ()\*(C'\fR and \f(CW\*(C`ev_now ()\*(C'\fR, at least if you want better precision than a second or so. .PP One more problem arises due to this lack of synchronisation: if libev uses the system monotonic clock and you compare timestamps from \f(CW\*(C`ev_time\*(C'\fR or \f(CW\*(C`ev_now\*(C'\fR from when you started your timer and when your callback is invoked, you will find that sometimes the callback is a bit \*(L"early\*(R". .PP This is because \f(CW\*(C`ev_timer\*(C'\fRs work in real time, not wall clock time, so libev makes sure your callback is not invoked before the delay happened, \&\fImeasured according to the real time\fR, not the system clock. .PP If your timeouts are based on a physical timescale (e.g. \*(L"time out this connection after 100 seconds\*(R") then this shouldn't bother you as it is exactly the right behaviour. .PP If you want to compare wall clock/system timestamps to your timers, then you need to use \f(CW\*(C`ev_periodic\*(C'\fRs, as these are based on the wall clock time, where your comparisons will always generate correct results. .PP \fIThe special problems of suspended animation\fR .IX Subsection "The special problems of suspended animation" .PP When you leave the server world it is quite customary to hit machines that can suspend/hibernate \- what happens to the clocks during such a suspend? .PP Some quick tests made with a Linux 2.6.28 indicate that a suspend freezes all processes, while the clocks (\f(CW\*(C`times\*(C'\fR, \f(CW\*(C`CLOCK_MONOTONIC\*(C'\fR) continue to run until the system is suspended, but they will not advance while the system is suspended. That means, on resume, it will be as if the program was frozen for a few seconds, but the suspend time will not be counted towards \f(CW\*(C`ev_timer\*(C'\fR when a monotonic clock source is used. The real time clock advanced as expected, but if it is used as sole clocksource, then a long suspend would be detected as a time jump by libev, and timers would be adjusted accordingly. .PP I would not be surprised to see different behaviour in different between operating systems, \s-1OS\s0 versions or even different hardware. .PP The other form of suspend (job control, or sending a \s-1SIGSTOP\s0) will see a time jump in the monotonic clocks and the realtime clock. If the program is suspended for a very long time, and monotonic clock sources are in use, then you can expect \f(CW\*(C`ev_timer\*(C'\fRs to expire as the full suspension time will be counted towards the timers. When no monotonic clock source is in use, then libev will again assume a timejump and adjust accordingly. .PP It might be beneficial for this latter case to call \f(CW\*(C`ev_suspend\*(C'\fR and \f(CW\*(C`ev_resume\*(C'\fR in code that handles \f(CW\*(C`SIGTSTP\*(C'\fR, to at least get deterministic behaviour in this case (you can do nothing against \&\f(CW\*(C`SIGSTOP\*(C'\fR). .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_timer_init (ev_timer *, callback, ev_tstamp after, ev_tstamp repeat)" 4 .IX Item "ev_timer_init (ev_timer *, callback, ev_tstamp after, ev_tstamp repeat)" .PD 0 .IP "ev_timer_set (ev_timer *, ev_tstamp after, ev_tstamp repeat)" 4 .IX Item "ev_timer_set (ev_timer *, ev_tstamp after, ev_tstamp repeat)" .PD Configure the timer to trigger after \f(CW\*(C`after\*(C'\fR seconds. If \f(CW\*(C`repeat\*(C'\fR is \f(CW0.\fR, then it will automatically be stopped once the timeout is reached. If it is positive, then the timer will automatically be configured to trigger again \f(CW\*(C`repeat\*(C'\fR seconds later, again, and again, until stopped manually. .Sp The timer itself will do a best-effort at avoiding drift, that is, if you configure a timer to trigger every 10 seconds, then it will normally trigger at exactly 10 second intervals. If, however, your program cannot keep up with the timer (because it takes longer than those 10 seconds to do stuff) the timer will not fire more than once per event loop iteration. .IP "ev_timer_again (loop, ev_timer *)" 4 .IX Item "ev_timer_again (loop, ev_timer *)" This will act as if the timer timed out, and restarts it again if it is repeating. It basically works like calling \f(CW\*(C`ev_timer_stop\*(C'\fR, updating the timeout to the \f(CW\*(C`repeat\*(C'\fR value and calling \f(CW\*(C`ev_timer_start\*(C'\fR. .Sp The exact semantics are as in the following rules, all of which will be applied to the watcher: .RS 4 .IP "If the timer is pending, the pending status is always cleared." 4 .IX Item "If the timer is pending, the pending status is always cleared." .PD 0 .IP "If the timer is started but non-repeating, stop it (as if it timed out, without invoking it)." 4 .IX Item "If the timer is started but non-repeating, stop it (as if it timed out, without invoking it)." .ie n .IP "If the timer is repeating, make the ""repeat"" value the new timeout and start the timer, if necessary." 4 .el .IP "If the timer is repeating, make the \f(CWrepeat\fR value the new timeout and start the timer, if necessary." 4 .IX Item "If the timer is repeating, make the repeat value the new timeout and start the timer, if necessary." .RE .RS 4 .PD .Sp This sounds a bit complicated, see \*(L"Be smart about timeouts\*(R", above, for a usage example. .RE .IP "ev_tstamp ev_timer_remaining (loop, ev_timer *)" 4 .IX Item "ev_tstamp ev_timer_remaining (loop, ev_timer *)" Returns the remaining time until a timer fires. If the timer is active, then this time is relative to the current event loop time, otherwise it's the timeout value currently configured. .Sp That is, after an \f(CW\*(C`ev_timer_set (w, 5, 7)\*(C'\fR, \f(CW\*(C`ev_timer_remaining\*(C'\fR returns \&\f(CW5\fR. When the timer is started and one second passes, \f(CW\*(C`ev_timer_remaining\*(C'\fR will return \f(CW4\fR. When the timer expires and is restarted, it will return roughly \f(CW7\fR (likely slightly less as callback invocation takes some time, too), and so on. .IP "ev_tstamp repeat [read\-write]" 4 .IX Item "ev_tstamp repeat [read-write]" The current \f(CW\*(C`repeat\*(C'\fR value. Will be used each time the watcher times out or \f(CW\*(C`ev_timer_again\*(C'\fR is called, and determines the next timeout (if any), which is also when any modifications are taken into account. .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: Create a timer that fires after 60 seconds. .PP .Vb 5 \& static void \& one_minute_cb (struct ev_loop *loop, ev_timer *w, int revents) \& { \& .. one minute over, w is actually stopped right here \& } \& \& ev_timer mytimer; \& ev_timer_init (&mytimer, one_minute_cb, 60., 0.); \& ev_timer_start (loop, &mytimer); .Ve .PP Example: Create a timeout timer that times out after 10 seconds of inactivity. .PP .Vb 5 \& static void \& timeout_cb (struct ev_loop *loop, ev_timer *w, int revents) \& { \& .. ten seconds without any activity \& } \& \& ev_timer mytimer; \& ev_timer_init (&mytimer, timeout_cb, 0., 10.); /* note, only repeat used */ \& ev_timer_again (&mytimer); /* start timer */ \& ev_run (loop, 0); \& \& // and in some piece of code that gets executed on any "activity": \& // reset the timeout to start ticking again at 10 seconds \& ev_timer_again (&mytimer); .Ve .ie n .SS """ev_periodic"" \- to cron or not to cron?" .el .SS "\f(CWev_periodic\fP \- to cron or not to cron?" .IX Subsection "ev_periodic - to cron or not to cron?" Periodic watchers are also timers of a kind, but they are very versatile (and unfortunately a bit complex). .PP Unlike \f(CW\*(C`ev_timer\*(C'\fR, periodic watchers are not based on real time (or relative time, the physical time that passes) but on wall clock time (absolute time, the thing you can read on your calender or clock). The difference is that wall clock time can run faster or slower than real time, and time jumps are not uncommon (e.g. when you adjust your wrist-watch). .PP You can tell a periodic watcher to trigger after some specific point in time: for example, if you tell a periodic watcher to trigger \*(L"in 10 seconds\*(R" (by specifying e.g. \f(CW\*(C`ev_now () + 10.\*(C'\fR, that is, an absolute time not a delay) and then reset your system clock to January of the previous year, then it will take a year or more to trigger the event (unlike an \&\f(CW\*(C`ev_timer\*(C'\fR, which would still trigger roughly 10 seconds after starting it, as it uses a relative timeout). .PP \&\f(CW\*(C`ev_periodic\*(C'\fR watchers can also be used to implement vastly more complex timers, such as triggering an event on each \*(L"midnight, local time\*(R", or other complicated rules. This cannot be done with \f(CW\*(C`ev_timer\*(C'\fR watchers, as those cannot react to time jumps. .PP As with timers, the callback is guaranteed to be invoked only when the point in time where it is supposed to trigger has passed. If multiple timers become ready during the same loop iteration then the ones with earlier time-out values are invoked before ones with later time-out values (but this is no longer true when a callback calls \f(CW\*(C`ev_run\*(C'\fR recursively). .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_periodic_init (ev_periodic *, callback, ev_tstamp offset, ev_tstamp interval, reschedule_cb)" 4 .IX Item "ev_periodic_init (ev_periodic *, callback, ev_tstamp offset, ev_tstamp interval, reschedule_cb)" .PD 0 .IP "ev_periodic_set (ev_periodic *, ev_tstamp offset, ev_tstamp interval, reschedule_cb)" 4 .IX Item "ev_periodic_set (ev_periodic *, ev_tstamp offset, ev_tstamp interval, reschedule_cb)" .PD Lots of arguments, let's sort it out... There are basically three modes of operation, and we will explain them from simplest to most complex: .RS 4 .IP "\(bu" 4 absolute timer (offset = absolute time, interval = 0, reschedule_cb = 0) .Sp In this configuration the watcher triggers an event after the wall clock time \f(CW\*(C`offset\*(C'\fR has passed. It will not repeat and will not adjust when a time jump occurs, that is, if it is to be run at January 1st 2011 then it will be stopped and invoked when the system clock reaches or surpasses this point in time. .IP "\(bu" 4 repeating interval timer (offset = offset within interval, interval > 0, reschedule_cb = 0) .Sp In this mode the watcher will always be scheduled to time out at the next \&\f(CW\*(C`offset + N * interval\*(C'\fR time (for some integer N, which can also be negative) and then repeat, regardless of any time jumps. The \f(CW\*(C`offset\*(C'\fR argument is merely an offset into the \f(CW\*(C`interval\*(C'\fR periods. .Sp This can be used to create timers that do not drift with respect to the system clock, for example, here is an \f(CW\*(C`ev_periodic\*(C'\fR that triggers each hour, on the hour (with respect to \s-1UTC\s0): .Sp .Vb 1 \& ev_periodic_set (&periodic, 0., 3600., 0); .Ve .Sp This doesn't mean there will always be 3600 seconds in between triggers, but only that the callback will be called when the system time shows a full hour (\s-1UTC\s0), or more correctly, when the system time is evenly divisible by 3600. .Sp Another way to think about it (for the mathematically inclined) is that \&\f(CW\*(C`ev_periodic\*(C'\fR will try to run the callback in this mode at the next possible time where \f(CW\*(C`time = offset (mod interval)\*(C'\fR, regardless of any time jumps. .Sp The \f(CW\*(C`interval\*(C'\fR \fI\s-1MUST\s0\fR be positive, and for numerical stability, the interval value should be higher than \f(CW\*(C`1/8192\*(C'\fR (which is around 100 microseconds) and \f(CW\*(C`offset\*(C'\fR should be higher than \f(CW0\fR and should have at most a similar magnitude as the current time (say, within a factor of ten). Typical values for offset are, in fact, \f(CW0\fR or something between \&\f(CW0\fR and \f(CW\*(C`interval\*(C'\fR, which is also the recommended range. .Sp Note also that there is an upper limit to how often a timer can fire (\s-1CPU\s0 speed for example), so if \f(CW\*(C`interval\*(C'\fR is very small then timing stability will of course deteriorate. Libev itself tries to be exact to be about one millisecond (if the \s-1OS\s0 supports it and the machine is fast enough). .IP "\(bu" 4 manual reschedule mode (offset ignored, interval ignored, reschedule_cb = callback) .Sp In this mode the values for \f(CW\*(C`interval\*(C'\fR and \f(CW\*(C`offset\*(C'\fR are both being ignored. Instead, each time the periodic watcher gets scheduled, the reschedule callback will be called with the watcher as first, and the current time as second argument. .Sp \&\s-1NOTE:\s0 \fIThis callback \s-1MUST\s0 \s-1NOT\s0 stop or destroy any periodic watcher, ever, or make \s-1ANY\s0 other event loop modifications whatsoever, unless explicitly allowed by documentation here\fR. .Sp If you need to stop it, return \f(CW\*(C`now + 1e30\*(C'\fR (or so, fudge fudge) and stop it afterwards (e.g. by starting an \f(CW\*(C`ev_prepare\*(C'\fR watcher, which is the only event loop modification you are allowed to do). .Sp The callback prototype is \f(CW\*(C`ev_tstamp (*reschedule_cb)(ev_periodic *w, ev_tstamp now)\*(C'\fR, e.g.: .Sp .Vb 5 \& static ev_tstamp \& my_rescheduler (ev_periodic *w, ev_tstamp now) \& { \& return now + 60.; \& } .Ve .Sp It must return the next time to trigger, based on the passed time value (that is, the lowest time value larger than to the second argument). It will usually be called just before the callback will be triggered, but might be called at other times, too. .Sp \&\s-1NOTE:\s0 \fIThis callback must always return a time that is higher than or equal to the passed \f(CI\*(C`now\*(C'\fI value\fR. .Sp This can be used to create very complex timers, such as a timer that triggers on \*(L"next midnight, local time\*(R". To do this, you would calculate the next midnight after \f(CW\*(C`now\*(C'\fR and return the timestamp value for this. How you do this is, again, up to you (but it is not trivial, which is the main reason I omitted it as an example). .RE .RS 4 .RE .IP "ev_periodic_again (loop, ev_periodic *)" 4 .IX Item "ev_periodic_again (loop, ev_periodic *)" Simply stops and restarts the periodic watcher again. This is only useful when you changed some parameters or the reschedule callback would return a different time than the last time it was called (e.g. in a crond like program when the crontabs have changed). .IP "ev_tstamp ev_periodic_at (ev_periodic *)" 4 .IX Item "ev_tstamp ev_periodic_at (ev_periodic *)" When active, returns the absolute time that the watcher is supposed to trigger next. This is not the same as the \f(CW\*(C`offset\*(C'\fR argument to \&\f(CW\*(C`ev_periodic_set\*(C'\fR, but indeed works even in interval and manual rescheduling modes. .IP "ev_tstamp offset [read\-write]" 4 .IX Item "ev_tstamp offset [read-write]" When repeating, this contains the offset value, otherwise this is the absolute point in time (the \f(CW\*(C`offset\*(C'\fR value passed to \f(CW\*(C`ev_periodic_set\*(C'\fR, although libev might modify this value for better numerical stability). .Sp Can be modified any time, but changes only take effect when the periodic timer fires or \f(CW\*(C`ev_periodic_again\*(C'\fR is being called. .IP "ev_tstamp interval [read\-write]" 4 .IX Item "ev_tstamp interval [read-write]" The current interval value. Can be modified any time, but changes only take effect when the periodic timer fires or \f(CW\*(C`ev_periodic_again\*(C'\fR is being called. .IP "ev_tstamp (*reschedule_cb)(ev_periodic *w, ev_tstamp now) [read\-write]" 4 .IX Item "ev_tstamp (*reschedule_cb)(ev_periodic *w, ev_tstamp now) [read-write]" The current reschedule callback, or \f(CW0\fR, if this functionality is switched off. Can be changed any time, but changes only take effect when the periodic timer fires or \f(CW\*(C`ev_periodic_again\*(C'\fR is being called. .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: Call a callback every hour, or, more precisely, whenever the system time is divisible by 3600. The callback invocation times have potentially a lot of jitter, but good long-term stability. .PP .Vb 5 \& static void \& clock_cb (struct ev_loop *loop, ev_periodic *w, int revents) \& { \& ... its now a full hour (UTC, or TAI or whatever your clock follows) \& } \& \& ev_periodic hourly_tick; \& ev_periodic_init (&hourly_tick, clock_cb, 0., 3600., 0); \& ev_periodic_start (loop, &hourly_tick); .Ve .PP Example: The same as above, but use a reschedule callback to do it: .PP .Vb 1 \& #include \& \& static ev_tstamp \& my_scheduler_cb (ev_periodic *w, ev_tstamp now) \& { \& return now + (3600. \- fmod (now, 3600.)); \& } \& \& ev_periodic_init (&hourly_tick, clock_cb, 0., 0., my_scheduler_cb); .Ve .PP Example: Call a callback every hour, starting now: .PP .Vb 4 \& ev_periodic hourly_tick; \& ev_periodic_init (&hourly_tick, clock_cb, \& fmod (ev_now (loop), 3600.), 3600., 0); \& ev_periodic_start (loop, &hourly_tick); .Ve .ie n .SS """ev_signal"" \- signal me when a signal gets signalled!" .el .SS "\f(CWev_signal\fP \- signal me when a signal gets signalled!" .IX Subsection "ev_signal - signal me when a signal gets signalled!" Signal watchers will trigger an event when the process receives a specific signal one or more times. Even though signals are very asynchronous, libev will try its best to deliver signals synchronously, i.e. as part of the normal event processing, like any other event. .PP If you want signals to be delivered truly asynchronously, just use \&\f(CW\*(C`sigaction\*(C'\fR as you would do without libev and forget about sharing the signal. You can even use \f(CW\*(C`ev_async\*(C'\fR from a signal handler to synchronously wake up an event loop. .PP You can configure as many watchers as you like for the same signal, but only within the same loop, i.e. you can watch for \f(CW\*(C`SIGINT\*(C'\fR in your default loop and for \f(CW\*(C`SIGIO\*(C'\fR in another loop, but you cannot watch for \&\f(CW\*(C`SIGINT\*(C'\fR in both the default loop and another loop at the same time. At the moment, \f(CW\*(C`SIGCHLD\*(C'\fR is permanently tied to the default loop. .PP When the first watcher gets started will libev actually register something with the kernel (thus it coexists with your own signal handlers as long as you don't register any with libev for the same signal). .PP If possible and supported, libev will install its handlers with \&\f(CW\*(C`SA_RESTART\*(C'\fR (or equivalent) behaviour enabled, so system calls should not be unduly interrupted. If you have a problem with system calls getting interrupted by signals you can block all signals in an \f(CW\*(C`ev_check\*(C'\fR watcher and unblock them in an \f(CW\*(C`ev_prepare\*(C'\fR watcher. .PP \fIThe special problem of inheritance over fork/execve/pthread_create\fR .IX Subsection "The special problem of inheritance over fork/execve/pthread_create" .PP Both the signal mask (\f(CW\*(C`sigprocmask\*(C'\fR) and the signal disposition (\f(CW\*(C`sigaction\*(C'\fR) are unspecified after starting a signal watcher (and after stopping it again), that is, libev might or might not block the signal, and might or might not set or restore the installed signal handler (but see \f(CW\*(C`EVFLAG_NOSIGMASK\*(C'\fR). .PP While this does not matter for the signal disposition (libev never sets signals to \f(CW\*(C`SIG_IGN\*(C'\fR, so handlers will be reset to \f(CW\*(C`SIG_DFL\*(C'\fR on \&\f(CW\*(C`execve\*(C'\fR), this matters for the signal mask: many programs do not expect certain signals to be blocked. .PP This means that before calling \f(CW\*(C`exec\*(C'\fR (from the child) you should reset the signal mask to whatever \*(L"default\*(R" you expect (all clear is a good choice usually). .PP The simplest way to ensure that the signal mask is reset in the child is to install a fork handler with \f(CW\*(C`pthread_atfork\*(C'\fR that resets it. That will catch fork calls done by libraries (such as the libc) as well. .PP In current versions of libev, the signal will not be blocked indefinitely unless you use the \f(CW\*(C`signalfd\*(C'\fR \s-1API\s0 (\f(CW\*(C`EV_SIGNALFD\*(C'\fR). While this reduces the window of opportunity for problems, it will not go away, as libev \&\fIhas\fR to modify the signal mask, at least temporarily. .PP So I can't stress this enough: \fIIf you do not reset your signal mask when you expect it to be empty, you have a race condition in your code\fR. This is not a libev-specific thing, this is true for most event libraries. .PP \fIThe special problem of threads signal handling\fR .IX Subsection "The special problem of threads signal handling" .PP \&\s-1POSIX\s0 threads has problematic signal handling semantics, specifically, a lot of functionality (sigfd, sigwait etc.) only really works if all threads in a process block signals, which is hard to achieve. .PP When you want to use sigwait (or mix libev signal handling with your own for the same signals), you can tackle this problem by globally blocking all signals before creating any threads (or creating them with a fully set sigprocmask) and also specifying the \f(CW\*(C`EVFLAG_NOSIGMASK\*(C'\fR when creating loops. Then designate one thread as \*(L"signal receiver thread\*(R" which handles these signals. You can pass on any signals that libev might be interested in by calling \f(CW\*(C`ev_feed_signal\*(C'\fR. .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_signal_init (ev_signal *, callback, int signum)" 4 .IX Item "ev_signal_init (ev_signal *, callback, int signum)" .PD 0 .IP "ev_signal_set (ev_signal *, int signum)" 4 .IX Item "ev_signal_set (ev_signal *, int signum)" .PD Configures the watcher to trigger on the given signal number (usually one of the \f(CW\*(C`SIGxxx\*(C'\fR constants). .IP "int signum [read\-only]" 4 .IX Item "int signum [read-only]" The signal the watcher watches out for. .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: Try to exit cleanly on \s-1SIGINT\s0. .PP .Vb 5 \& static void \& sigint_cb (struct ev_loop *loop, ev_signal *w, int revents) \& { \& ev_break (loop, EVBREAK_ALL); \& } \& \& ev_signal signal_watcher; \& ev_signal_init (&signal_watcher, sigint_cb, SIGINT); \& ev_signal_start (loop, &signal_watcher); .Ve .ie n .SS """ev_child"" \- watch out for process status changes" .el .SS "\f(CWev_child\fP \- watch out for process status changes" .IX Subsection "ev_child - watch out for process status changes" Child watchers trigger when your process receives a \s-1SIGCHLD\s0 in response to some child status changes (most typically when a child of yours dies or exits). It is permissible to install a child watcher \fIafter\fR the child has been forked (which implies it might have already exited), as long as the event loop isn't entered (or is continued from a watcher), i.e., forking and then immediately registering a watcher for the child is fine, but forking and registering a watcher a few event loop iterations later or in the next callback invocation is not. .PP Only the default event loop is capable of handling signals, and therefore you can only register child watchers in the default event loop. .PP Due to some design glitches inside libev, child watchers will always be handled at maximum priority (their priority is set to \f(CW\*(C`EV_MAXPRI\*(C'\fR by libev) .PP \fIProcess Interaction\fR .IX Subsection "Process Interaction" .PP Libev grabs \f(CW\*(C`SIGCHLD\*(C'\fR as soon as the default event loop is initialised. This is necessary to guarantee proper behaviour even if the first child watcher is started after the child exits. The occurrence of \f(CW\*(C`SIGCHLD\*(C'\fR is recorded asynchronously, but child reaping is done synchronously as part of the event loop processing. Libev always reaps all children, even ones not watched. .PP \fIOverriding the Built-In Processing\fR .IX Subsection "Overriding the Built-In Processing" .PP Libev offers no special support for overriding the built-in child processing, but if your application collides with libev's default child handler, you can override it easily by installing your own handler for \&\f(CW\*(C`SIGCHLD\*(C'\fR after initialising the default loop, and making sure the default loop never gets destroyed. You are encouraged, however, to use an event-based approach to child reaping and thus use libev's support for that, so other libev users can use \f(CW\*(C`ev_child\*(C'\fR watchers freely. .PP \fIStopping the Child Watcher\fR .IX Subsection "Stopping the Child Watcher" .PP Currently, the child watcher never gets stopped, even when the child terminates, so normally one needs to stop the watcher in the callback. Future versions of libev might stop the watcher automatically when a child exit is detected (calling \f(CW\*(C`ev_child_stop\*(C'\fR twice is not a problem). .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_child_init (ev_child *, callback, int pid, int trace)" 4 .IX Item "ev_child_init (ev_child *, callback, int pid, int trace)" .PD 0 .IP "ev_child_set (ev_child *, int pid, int trace)" 4 .IX Item "ev_child_set (ev_child *, int pid, int trace)" .PD Configures the watcher to wait for status changes of process \f(CW\*(C`pid\*(C'\fR (or \&\fIany\fR process if \f(CW\*(C`pid\*(C'\fR is specified as \f(CW0\fR). The callback can look at the \f(CW\*(C`rstatus\*(C'\fR member of the \f(CW\*(C`ev_child\*(C'\fR watcher structure to see the status word (use the macros from \f(CW\*(C`sys/wait.h\*(C'\fR and see your systems \&\f(CW\*(C`waitpid\*(C'\fR documentation). The \f(CW\*(C`rpid\*(C'\fR member contains the pid of the process causing the status change. \f(CW\*(C`trace\*(C'\fR must be either \f(CW0\fR (only activate the watcher when the process terminates) or \f(CW1\fR (additionally activate the watcher when the process is stopped or continued). .IP "int pid [read\-only]" 4 .IX Item "int pid [read-only]" The process id this watcher watches out for, or \f(CW0\fR, meaning any process id. .IP "int rpid [read\-write]" 4 .IX Item "int rpid [read-write]" The process id that detected a status change. .IP "int rstatus [read\-write]" 4 .IX Item "int rstatus [read-write]" The process exit/trace status caused by \f(CW\*(C`rpid\*(C'\fR (see your systems \&\f(CW\*(C`waitpid\*(C'\fR and \f(CW\*(C`sys/wait.h\*(C'\fR documentation for details). .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: \f(CW\*(C`fork()\*(C'\fR a new process and install a child handler to wait for its completion. .PP .Vb 1 \& ev_child cw; \& \& static void \& child_cb (EV_P_ ev_child *w, int revents) \& { \& ev_child_stop (EV_A_ w); \& printf ("process %d exited with status %x\en", w\->rpid, w\->rstatus); \& } \& \& pid_t pid = fork (); \& \& if (pid < 0) \& // error \& else if (pid == 0) \& { \& // the forked child executes here \& exit (1); \& } \& else \& { \& ev_child_init (&cw, child_cb, pid, 0); \& ev_child_start (EV_DEFAULT_ &cw); \& } .Ve .ie n .SS """ev_stat"" \- did the file attributes just change?" .el .SS "\f(CWev_stat\fP \- did the file attributes just change?" .IX Subsection "ev_stat - did the file attributes just change?" This watches a file system path for attribute changes. That is, it calls \&\f(CW\*(C`stat\*(C'\fR on that path in regular intervals (or when the \s-1OS\s0 says it changed) and sees if it changed compared to the last time, invoking the callback if it did. .PP The path does not need to exist: changing from \*(L"path exists\*(R" to \*(L"path does not exist\*(R" is a status change like any other. The condition \*(L"path does not exist\*(R" (or more correctly \*(L"path cannot be stat'ed\*(R") is signified by the \&\f(CW\*(C`st_nlink\*(C'\fR field being zero (which is otherwise always forced to be at least one) and all the other fields of the stat buffer having unspecified contents. .PP The path \fImust not\fR end in a slash or contain special components such as \&\f(CW\*(C`.\*(C'\fR or \f(CW\*(C`..\*(C'\fR. The path \fIshould\fR be absolute: If it is relative and your working directory changes, then the behaviour is undefined. .PP Since there is no portable change notification interface available, the portable implementation simply calls \f(CWstat(2)\fR regularly on the path to see if it changed somehow. You can specify a recommended polling interval for this case. If you specify a polling interval of \f(CW0\fR (highly recommended!) then a \fIsuitable, unspecified default\fR value will be used (which you can expect to be around five seconds, although this might change dynamically). Libev will also impose a minimum interval which is currently around \f(CW0.1\fR, but that's usually overkill. .PP This watcher type is not meant for massive numbers of stat watchers, as even with OS-supported change notifications, this can be resource-intensive. .PP At the time of this writing, the only OS-specific interface implemented is the Linux inotify interface (implementing kqueue support is left as an exercise for the reader. Note, however, that the author sees no way of implementing \f(CW\*(C`ev_stat\*(C'\fR semantics with kqueue, except as a hint). .PP \fI\s-1ABI\s0 Issues (Largefile Support)\fR .IX Subsection "ABI Issues (Largefile Support)" .PP Libev by default (unless the user overrides this) uses the default compilation environment, which means that on systems with large file support disabled by default, you get the 32 bit version of the stat structure. When using the library from programs that change the \s-1ABI\s0 to use 64 bit file offsets the programs will fail. In that case you have to compile libev with the same flags to get binary compatibility. This is obviously the case with any flags that change the \s-1ABI\s0, but the problem is most noticeably displayed with ev_stat and large file support. .PP The solution for this is to lobby your distribution maker to make large file interfaces available by default (as e.g. FreeBSD does) and not optional. Libev cannot simply switch on large file support because it has to exchange stat structures with application programs compiled using the default compilation environment. .PP \fIInotify and Kqueue\fR .IX Subsection "Inotify and Kqueue" .PP When \f(CW\*(C`inotify (7)\*(C'\fR support has been compiled into libev and present at runtime, it will be used to speed up change detection where possible. The inotify descriptor will be created lazily when the first \f(CW\*(C`ev_stat\*(C'\fR watcher is being started. .PP Inotify presence does not change the semantics of \f(CW\*(C`ev_stat\*(C'\fR watchers except that changes might be detected earlier, and in some cases, to avoid making regular \f(CW\*(C`stat\*(C'\fR calls. Even in the presence of inotify support there are many cases where libev has to resort to regular \f(CW\*(C`stat\*(C'\fR polling, but as long as kernel 2.6.25 or newer is used (2.6.24 and older have too many bugs), the path exists (i.e. stat succeeds), and the path resides on a local filesystem (libev currently assumes only ext2/3, jfs, reiserfs and xfs are fully working) libev usually gets away without polling. .PP There is no support for kqueue, as apparently it cannot be used to implement this functionality, due to the requirement of having a file descriptor open on the object at all times, and detecting renames, unlinks etc. is difficult. .PP \fI\f(CI\*(C`stat ()\*(C'\fI is a synchronous operation\fR .IX Subsection "stat () is a synchronous operation" .PP Libev doesn't normally do any kind of I/O itself, and so is not blocking the process. The exception are \f(CW\*(C`ev_stat\*(C'\fR watchers \- those call \f(CW\*(C`stat ()\*(C'\fR, which is a synchronous operation. .PP For local paths, this usually doesn't matter: unless the system is very busy or the intervals between stat's are large, a stat call will be fast, as the path data is usually in memory already (except when starting the watcher). .PP For networked file systems, calling \f(CW\*(C`stat ()\*(C'\fR can block an indefinite time due to network issues, and even under good conditions, a stat call often takes multiple milliseconds. .PP Therefore, it is best to avoid using \f(CW\*(C`ev_stat\*(C'\fR watchers on networked paths, although this is fully supported by libev. .PP \fIThe special problem of stat time resolution\fR .IX Subsection "The special problem of stat time resolution" .PP The \f(CW\*(C`stat ()\*(C'\fR system call only supports full-second resolution portably, and even on systems where the resolution is higher, most file systems still only support whole seconds. .PP That means that, if the time is the only thing that changes, you can easily miss updates: on the first update, \f(CW\*(C`ev_stat\*(C'\fR detects a change and calls your callback, which does something. When there is another update within the same second, \f(CW\*(C`ev_stat\*(C'\fR will be unable to detect unless the stat data does change in other ways (e.g. file size). .PP The solution to this is to delay acting on a change for slightly more than a second (or till slightly after the next full second boundary), using a roughly one-second-delay \f(CW\*(C`ev_timer\*(C'\fR (e.g. \f(CW\*(C`ev_timer_set (w, 0., 1.02); ev_timer_again (loop, w)\*(C'\fR). .PP The \f(CW.02\fR offset is added to work around small timing inconsistencies of some operating systems (where the second counter of the current time might be be delayed. One such system is the Linux kernel, where a call to \&\f(CW\*(C`gettimeofday\*(C'\fR might return a timestamp with a full second later than a subsequent \f(CW\*(C`time\*(C'\fR call \- if the equivalent of \f(CW\*(C`time ()\*(C'\fR is used to update file times then there will be a small window where the kernel uses the previous second to update file times but libev might already execute the timer callback). .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_stat_init (ev_stat *, callback, const char *path, ev_tstamp interval)" 4 .IX Item "ev_stat_init (ev_stat *, callback, const char *path, ev_tstamp interval)" .PD 0 .IP "ev_stat_set (ev_stat *, const char *path, ev_tstamp interval)" 4 .IX Item "ev_stat_set (ev_stat *, const char *path, ev_tstamp interval)" .PD Configures the watcher to wait for status changes of the given \&\f(CW\*(C`path\*(C'\fR. The \f(CW\*(C`interval\*(C'\fR is a hint on how quickly a change is expected to be detected and should normally be specified as \f(CW0\fR to let libev choose a suitable value. The memory pointed to by \f(CW\*(C`path\*(C'\fR must point to the same path for as long as the watcher is active. .Sp The callback will receive an \f(CW\*(C`EV_STAT\*(C'\fR event when a change was detected, relative to the attributes at the time the watcher was started (or the last change was detected). .IP "ev_stat_stat (loop, ev_stat *)" 4 .IX Item "ev_stat_stat (loop, ev_stat *)" Updates the stat buffer immediately with new values. If you change the watched path in your callback, you could call this function to avoid detecting this change (while introducing a race condition if you are not the only one changing the path). Can also be useful simply to find out the new values. .IP "ev_statdata attr [read\-only]" 4 .IX Item "ev_statdata attr [read-only]" The most-recently detected attributes of the file. Although the type is \&\f(CW\*(C`ev_statdata\*(C'\fR, this is usually the (or one of the) \f(CW\*(C`struct stat\*(C'\fR types suitable for your system, but you can only rely on the POSIX-standardised members to be present. If the \f(CW\*(C`st_nlink\*(C'\fR member is \f(CW0\fR, then there was some error while \f(CW\*(C`stat\*(C'\fRing the file. .IP "ev_statdata prev [read\-only]" 4 .IX Item "ev_statdata prev [read-only]" The previous attributes of the file. The callback gets invoked whenever \&\f(CW\*(C`prev\*(C'\fR != \f(CW\*(C`attr\*(C'\fR, or, more precisely, one or more of these members differ: \f(CW\*(C`st_dev\*(C'\fR, \f(CW\*(C`st_ino\*(C'\fR, \f(CW\*(C`st_mode\*(C'\fR, \f(CW\*(C`st_nlink\*(C'\fR, \f(CW\*(C`st_uid\*(C'\fR, \&\f(CW\*(C`st_gid\*(C'\fR, \f(CW\*(C`st_rdev\*(C'\fR, \f(CW\*(C`st_size\*(C'\fR, \f(CW\*(C`st_atime\*(C'\fR, \f(CW\*(C`st_mtime\*(C'\fR, \f(CW\*(C`st_ctime\*(C'\fR. .IP "ev_tstamp interval [read\-only]" 4 .IX Item "ev_tstamp interval [read-only]" The specified interval. .IP "const char *path [read\-only]" 4 .IX Item "const char *path [read-only]" The file system path that is being watched. .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: Watch \f(CW\*(C`/etc/passwd\*(C'\fR for attribute changes. .PP .Vb 10 \& static void \& passwd_cb (struct ev_loop *loop, ev_stat *w, int revents) \& { \& /* /etc/passwd changed in some way */ \& if (w\->attr.st_nlink) \& { \& printf ("passwd current size %ld\en", (long)w\->attr.st_size); \& printf ("passwd current atime %ld\en", (long)w\->attr.st_mtime); \& printf ("passwd current mtime %ld\en", (long)w\->attr.st_mtime); \& } \& else \& /* you shalt not abuse printf for puts */ \& puts ("wow, /etc/passwd is not there, expect problems. " \& "if this is windows, they already arrived\en"); \& } \& \& ... \& ev_stat passwd; \& \& ev_stat_init (&passwd, passwd_cb, "/etc/passwd", 0.); \& ev_stat_start (loop, &passwd); .Ve .PP Example: Like above, but additionally use a one-second delay so we do not miss updates (however, frequent updates will delay processing, too, so one might do the work both on \f(CW\*(C`ev_stat\*(C'\fR callback invocation \fIand\fR on \&\f(CW\*(C`ev_timer\*(C'\fR callback invocation). .PP .Vb 2 \& static ev_stat passwd; \& static ev_timer timer; \& \& static void \& timer_cb (EV_P_ ev_timer *w, int revents) \& { \& ev_timer_stop (EV_A_ w); \& \& /* now it\*(Aqs one second after the most recent passwd change */ \& } \& \& static void \& stat_cb (EV_P_ ev_stat *w, int revents) \& { \& /* reset the one\-second timer */ \& ev_timer_again (EV_A_ &timer); \& } \& \& ... \& ev_stat_init (&passwd, stat_cb, "/etc/passwd", 0.); \& ev_stat_start (loop, &passwd); \& ev_timer_init (&timer, timer_cb, 0., 1.02); .Ve .ie n .SS """ev_idle"" \- when you've got nothing better to do..." .el .SS "\f(CWev_idle\fP \- when you've got nothing better to do..." .IX Subsection "ev_idle - when you've got nothing better to do..." Idle watchers trigger events when no other events of the same or higher priority are pending (prepare, check and other idle watchers do not count as receiving \*(L"events\*(R"). .PP That is, as long as your process is busy handling sockets or timeouts (or even signals, imagine) of the same or higher priority it will not be triggered. But when your process is idle (or only lower-priority watchers are pending), the idle watchers are being called once per event loop iteration \- until stopped, that is, or your process receives more events and becomes busy again with higher priority stuff. .PP The most noteworthy effect is that as long as any idle watchers are active, the process will not block when waiting for new events. .PP Apart from keeping your process non-blocking (which is a useful effect on its own sometimes), idle watchers are a good place to do \&\*(L"pseudo-background processing\*(R", or delay processing stuff to after the event loop has handled all outstanding events. .PP \fIAbusing an \f(CI\*(C`ev_idle\*(C'\fI watcher for its side-effect\fR .IX Subsection "Abusing an ev_idle watcher for its side-effect" .PP As long as there is at least one active idle watcher, libev will never sleep unnecessarily. Or in other words, it will loop as fast as possible. For this to work, the idle watcher doesn't need to be invoked at all \- the lowest priority will do. .PP This mode of operation can be useful together with an \f(CW\*(C`ev_check\*(C'\fR watcher, to do something on each event loop iteration \- for example to balance load between different connections. .PP See \*(L"Abusing an ev_check watcher for its side-effect\*(R" for a longer example. .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_idle_init (ev_idle *, callback)" 4 .IX Item "ev_idle_init (ev_idle *, callback)" Initialises and configures the idle watcher \- it has no parameters of any kind. There is a \f(CW\*(C`ev_idle_set\*(C'\fR macro, but using it is utterly pointless, believe me. .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: Dynamically allocate an \f(CW\*(C`ev_idle\*(C'\fR watcher, start it, and in the callback, free it. Also, use no error checking, as usual. .PP .Vb 5 \& static void \& idle_cb (struct ev_loop *loop, ev_idle *w, int revents) \& { \& // stop the watcher \& ev_idle_stop (loop, w); \& \& // now we can free it \& free (w); \& \& // now do something you wanted to do when the program has \& // no longer anything immediate to do. \& } \& \& ev_idle *idle_watcher = malloc (sizeof (ev_idle)); \& ev_idle_init (idle_watcher, idle_cb); \& ev_idle_start (loop, idle_watcher); .Ve .ie n .SS """ev_prepare"" and ""ev_check"" \- customise your event loop!" .el .SS "\f(CWev_prepare\fP and \f(CWev_check\fP \- customise your event loop!" .IX Subsection "ev_prepare and ev_check - customise your event loop!" Prepare and check watchers are often (but not always) used in pairs: prepare watchers get invoked before the process blocks and check watchers afterwards. .PP You \fImust not\fR call \f(CW\*(C`ev_run\*(C'\fR or similar functions that enter the current event loop from either \f(CW\*(C`ev_prepare\*(C'\fR or \f(CW\*(C`ev_check\*(C'\fR watchers. Other loops than the current one are fine, however. The rationale behind this is that you do not need to check for recursion in those watchers, i.e. the sequence will always be \f(CW\*(C`ev_prepare\*(C'\fR, blocking, \&\f(CW\*(C`ev_check\*(C'\fR so if you have one watcher of each kind they will always be called in pairs bracketing the blocking call. .PP Their main purpose is to integrate other event mechanisms into libev and their use is somewhat advanced. They could be used, for example, to track variable changes, implement your own watchers, integrate net-snmp or a coroutine library and lots more. They are also occasionally useful if you cache some data and want to flush it before blocking (for example, in X programs you might want to do an \f(CW\*(C`XFlush ()\*(C'\fR in an \f(CW\*(C`ev_prepare\*(C'\fR watcher). .PP This is done by examining in each prepare call which file descriptors need to be watched by the other library, registering \f(CW\*(C`ev_io\*(C'\fR watchers for them and starting an \f(CW\*(C`ev_timer\*(C'\fR watcher for any timeouts (many libraries provide exactly this functionality). Then, in the check watcher, you check for any events that occurred (by checking the pending status of all watchers and stopping them) and call back into the library. The I/O and timer callbacks will never actually be called (but must be valid nevertheless, because you never know, you know?). .PP As another example, the Perl Coro module uses these hooks to integrate coroutines into libev programs, by yielding to other active coroutines during each prepare and only letting the process block if no coroutines are ready to run (it's actually more complicated: it only runs coroutines with priority higher than or equal to the event loop and one coroutine of lower priority, but only once, using idle watchers to keep the event loop from blocking if lower-priority coroutines are active, thus mapping low-priority coroutines to idle/background tasks). .PP When used for this purpose, it is recommended to give \f(CW\*(C`ev_check\*(C'\fR watchers highest (\f(CW\*(C`EV_MAXPRI\*(C'\fR) priority, to ensure that they are being run before any other watchers after the poll (this doesn't matter for \f(CW\*(C`ev_prepare\*(C'\fR watchers). .PP Also, \f(CW\*(C`ev_check\*(C'\fR watchers (and \f(CW\*(C`ev_prepare\*(C'\fR watchers, too) should not activate (\*(L"feed\*(R") events into libev. While libev fully supports this, they might get executed before other \f(CW\*(C`ev_check\*(C'\fR watchers did their job. As \&\f(CW\*(C`ev_check\*(C'\fR watchers are often used to embed other (non-libev) event loops those other event loops might be in an unusable state until their \&\f(CW\*(C`ev_check\*(C'\fR watcher ran (always remind yourself to coexist peacefully with others). .PP \fIAbusing an \f(CI\*(C`ev_check\*(C'\fI watcher for its side-effect\fR .IX Subsection "Abusing an ev_check watcher for its side-effect" .PP \&\f(CW\*(C`ev_check\*(C'\fR (and less often also \f(CW\*(C`ev_prepare\*(C'\fR) watchers can also be useful because they are called once per event loop iteration. For example, if you want to handle a large number of connections fairly, you normally only do a bit of work for each active connection, and if there is more work to do, you wait for the next event loop iteration, so other connections have a chance of making progress. .PP Using an \f(CW\*(C`ev_check\*(C'\fR watcher is almost enough: it will be called on the next event loop iteration. However, that isn't as soon as possible \- without external events, your \f(CW\*(C`ev_check\*(C'\fR watcher will not be invoked. .PP This is where \f(CW\*(C`ev_idle\*(C'\fR watchers come in handy \- all you need is a single global idle watcher that is active as long as you have one active \&\f(CW\*(C`ev_check\*(C'\fR watcher. The \f(CW\*(C`ev_idle\*(C'\fR watcher makes sure the event loop will not sleep, and the \f(CW\*(C`ev_check\*(C'\fR watcher makes sure a callback gets invoked. Neither watcher alone can do that. .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_prepare_init (ev_prepare *, callback)" 4 .IX Item "ev_prepare_init (ev_prepare *, callback)" .PD 0 .IP "ev_check_init (ev_check *, callback)" 4 .IX Item "ev_check_init (ev_check *, callback)" .PD Initialises and configures the prepare or check watcher \- they have no parameters of any kind. There are \f(CW\*(C`ev_prepare_set\*(C'\fR and \f(CW\*(C`ev_check_set\*(C'\fR macros, but using them is utterly, utterly, utterly and completely pointless. .PP \fIExamples\fR .IX Subsection "Examples" .PP There are a number of principal ways to embed other event loops or modules into libev. Here are some ideas on how to include libadns into libev (there is a Perl module named \f(CW\*(C`EV::ADNS\*(C'\fR that does this, which you could use as a working example. Another Perl module named \f(CW\*(C`EV::Glib\*(C'\fR embeds a Glib main context into libev, and finally, \f(CW\*(C`Glib::EV\*(C'\fR embeds \s-1EV\s0 into the Glib event loop). .PP Method 1: Add \s-1IO\s0 watchers and a timeout watcher in a prepare handler, and in a check watcher, destroy them and call into libadns. What follows is pseudo-code only of course. This requires you to either use a low priority for the check watcher or use \f(CW\*(C`ev_clear_pending\*(C'\fR explicitly, as the callbacks for the IO/timeout watchers might not have been called yet. .PP .Vb 2 \& static ev_io iow [nfd]; \& static ev_timer tw; \& \& static void \& io_cb (struct ev_loop *loop, ev_io *w, int revents) \& { \& } \& \& // create io watchers for each fd and a timer before blocking \& static void \& adns_prepare_cb (struct ev_loop *loop, ev_prepare *w, int revents) \& { \& int timeout = 3600000; \& struct pollfd fds [nfd]; \& // actual code will need to loop here and realloc etc. \& adns_beforepoll (ads, fds, &nfd, &timeout, timeval_from (ev_time ())); \& \& /* the callback is illegal, but won\*(Aqt be called as we stop during check */ \& ev_timer_init (&tw, 0, timeout * 1e\-3, 0.); \& ev_timer_start (loop, &tw); \& \& // create one ev_io per pollfd \& for (int i = 0; i < nfd; ++i) \& { \& ev_io_init (iow + i, io_cb, fds [i].fd, \& ((fds [i].events & POLLIN ? EV_READ : 0) \& | (fds [i].events & POLLOUT ? EV_WRITE : 0))); \& \& fds [i].revents = 0; \& ev_io_start (loop, iow + i); \& } \& } \& \& // stop all watchers after blocking \& static void \& adns_check_cb (struct ev_loop *loop, ev_check *w, int revents) \& { \& ev_timer_stop (loop, &tw); \& \& for (int i = 0; i < nfd; ++i) \& { \& // set the relevant poll flags \& // could also call adns_processreadable etc. here \& struct pollfd *fd = fds + i; \& int revents = ev_clear_pending (iow + i); \& if (revents & EV_READ ) fd\->revents |= fd\->events & POLLIN; \& if (revents & EV_WRITE) fd\->revents |= fd\->events & POLLOUT; \& \& // now stop the watcher \& ev_io_stop (loop, iow + i); \& } \& \& adns_afterpoll (adns, fds, nfd, timeval_from (ev_now (loop)); \& } .Ve .PP Method 2: This would be just like method 1, but you run \f(CW\*(C`adns_afterpoll\*(C'\fR in the prepare watcher and would dispose of the check watcher. .PP Method 3: If the module to be embedded supports explicit event notification (libadns does), you can also make use of the actual watcher callbacks, and only destroy/create the watchers in the prepare watcher. .PP .Vb 5 \& static void \& timer_cb (EV_P_ ev_timer *w, int revents) \& { \& adns_state ads = (adns_state)w\->data; \& update_now (EV_A); \& \& adns_processtimeouts (ads, &tv_now); \& } \& \& static void \& io_cb (EV_P_ ev_io *w, int revents) \& { \& adns_state ads = (adns_state)w\->data; \& update_now (EV_A); \& \& if (revents & EV_READ ) adns_processreadable (ads, w\->fd, &tv_now); \& if (revents & EV_WRITE) adns_processwriteable (ads, w\->fd, &tv_now); \& } \& \& // do not ever call adns_afterpoll .Ve .PP Method 4: Do not use a prepare or check watcher because the module you want to embed is not flexible enough to support it. Instead, you can override their poll function. The drawback with this solution is that the main loop is now no longer controllable by \s-1EV\s0. The \f(CW\*(C`Glib::EV\*(C'\fR module uses this approach, effectively embedding \s-1EV\s0 as a client into the horrible libglib event loop. .PP .Vb 4 \& static gint \& event_poll_func (GPollFD *fds, guint nfds, gint timeout) \& { \& int got_events = 0; \& \& for (n = 0; n < nfds; ++n) \& // create/start io watcher that sets the relevant bits in fds[n] and increment got_events \& \& if (timeout >= 0) \& // create/start timer \& \& // poll \& ev_run (EV_A_ 0); \& \& // stop timer again \& if (timeout >= 0) \& ev_timer_stop (EV_A_ &to); \& \& // stop io watchers again \- their callbacks should have set \& for (n = 0; n < nfds; ++n) \& ev_io_stop (EV_A_ iow [n]); \& \& return got_events; \& } .Ve .ie n .SS """ev_embed"" \- when one backend isn't enough..." .el .SS "\f(CWev_embed\fP \- when one backend isn't enough..." .IX Subsection "ev_embed - when one backend isn't enough..." This is a rather advanced watcher type that lets you embed one event loop into another (currently only \f(CW\*(C`ev_io\*(C'\fR events are supported in the embedded loop, other types of watchers might be handled in a delayed or incorrect fashion and must not be used). .PP There are primarily two reasons you would want that: work around bugs and prioritise I/O. .PP As an example for a bug workaround, the kqueue backend might only support sockets on some platform, so it is unusable as generic backend, but you still want to make use of it because you have many sockets and it scales so nicely. In this case, you would create a kqueue-based loop and embed it into your default loop (which might use e.g. poll). Overall operation will be a bit slower because first libev has to call \f(CW\*(C`poll\*(C'\fR and then \&\f(CW\*(C`kevent\*(C'\fR, but at least you can use both mechanisms for what they are best: \f(CW\*(C`kqueue\*(C'\fR for scalable sockets and \f(CW\*(C`poll\*(C'\fR if you want it to work :) .PP As for prioritising I/O: under rare circumstances you have the case where some fds have to be watched and handled very quickly (with low latency), and even priorities and idle watchers might have too much overhead. In this case you would put all the high priority stuff in one loop and all the rest in a second one, and embed the second one in the first. .PP As long as the watcher is active, the callback will be invoked every time there might be events pending in the embedded loop. The callback must then call \f(CW\*(C`ev_embed_sweep (mainloop, watcher)\*(C'\fR to make a single sweep and invoke their callbacks (the callback doesn't need to invoke the \&\f(CW\*(C`ev_embed_sweep\*(C'\fR function directly, it could also start an idle watcher to give the embedded loop strictly lower priority for example). .PP You can also set the callback to \f(CW0\fR, in which case the embed watcher will automatically execute the embedded loop sweep whenever necessary. .PP Fork detection will be handled transparently while the \f(CW\*(C`ev_embed\*(C'\fR watcher is active, i.e., the embedded loop will automatically be forked when the embedding loop forks. In other cases, the user is responsible for calling \&\f(CW\*(C`ev_loop_fork\*(C'\fR on the embedded loop. .PP Unfortunately, not all backends are embeddable: only the ones returned by \&\f(CW\*(C`ev_embeddable_backends\*(C'\fR are, which, unfortunately, does not include any portable one. .PP So when you want to use this feature you will always have to be prepared that you cannot get an embeddable loop. The recommended way to get around this is to have a separate variables for your embeddable loop, try to create it, and if that fails, use the normal loop for everything. .PP \fI\f(CI\*(C`ev_embed\*(C'\fI and fork\fR .IX Subsection "ev_embed and fork" .PP While the \f(CW\*(C`ev_embed\*(C'\fR watcher is running, forks in the embedding loop will automatically be applied to the embedded loop as well, so no special fork handling is required in that case. When the watcher is not running, however, it is still the task of the libev user to call \f(CW\*(C`ev_loop_fork ()\*(C'\fR as applicable. .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_embed_init (ev_embed *, callback, struct ev_loop *embedded_loop)" 4 .IX Item "ev_embed_init (ev_embed *, callback, struct ev_loop *embedded_loop)" .PD 0 .IP "ev_embed_set (ev_embed *, callback, struct ev_loop *embedded_loop)" 4 .IX Item "ev_embed_set (ev_embed *, callback, struct ev_loop *embedded_loop)" .PD Configures the watcher to embed the given loop, which must be embeddable. If the callback is \f(CW0\fR, then \f(CW\*(C`ev_embed_sweep\*(C'\fR will be invoked automatically, otherwise it is the responsibility of the callback to invoke it (it will continue to be called until the sweep has been done, if you do not want that, you need to temporarily stop the embed watcher). .IP "ev_embed_sweep (loop, ev_embed *)" 4 .IX Item "ev_embed_sweep (loop, ev_embed *)" Make a single, non-blocking sweep over the embedded loop. This works similarly to \f(CW\*(C`ev_run (embedded_loop, EVRUN_NOWAIT)\*(C'\fR, but in the most appropriate way for embedded loops. .IP "struct ev_loop *other [read\-only]" 4 .IX Item "struct ev_loop *other [read-only]" The embedded event loop. .PP \fIExamples\fR .IX Subsection "Examples" .PP Example: Try to get an embeddable event loop and embed it into the default event loop. If that is not possible, use the default loop. The default loop is stored in \f(CW\*(C`loop_hi\*(C'\fR, while the embeddable loop is stored in \&\f(CW\*(C`loop_lo\*(C'\fR (which is \f(CW\*(C`loop_hi\*(C'\fR in the case no embeddable loop can be used). .PP .Vb 3 \& struct ev_loop *loop_hi = ev_default_init (0); \& struct ev_loop *loop_lo = 0; \& ev_embed embed; \& \& // see if there is a chance of getting one that works \& // (remember that a flags value of 0 means autodetection) \& loop_lo = ev_embeddable_backends () & ev_recommended_backends () \& ? ev_loop_new (ev_embeddable_backends () & ev_recommended_backends ()) \& : 0; \& \& // if we got one, then embed it, otherwise default to loop_hi \& if (loop_lo) \& { \& ev_embed_init (&embed, 0, loop_lo); \& ev_embed_start (loop_hi, &embed); \& } \& else \& loop_lo = loop_hi; .Ve .PP Example: Check if kqueue is available but not recommended and create a kqueue backend for use with sockets (which usually work with any kqueue implementation). Store the kqueue/socket\-only event loop in \&\f(CW\*(C`loop_socket\*(C'\fR. (One might optionally use \f(CW\*(C`EVFLAG_NOENV\*(C'\fR, too). .PP .Vb 3 \& struct ev_loop *loop = ev_default_init (0); \& struct ev_loop *loop_socket = 0; \& ev_embed embed; \& \& if (ev_supported_backends () & ~ev_recommended_backends () & EVBACKEND_KQUEUE) \& if ((loop_socket = ev_loop_new (EVBACKEND_KQUEUE)) \& { \& ev_embed_init (&embed, 0, loop_socket); \& ev_embed_start (loop, &embed); \& } \& \& if (!loop_socket) \& loop_socket = loop; \& \& // now use loop_socket for all sockets, and loop for everything else .Ve .ie n .SS """ev_fork"" \- the audacity to resume the event loop after a fork" .el .SS "\f(CWev_fork\fP \- the audacity to resume the event loop after a fork" .IX Subsection "ev_fork - the audacity to resume the event loop after a fork" Fork watchers are called when a \f(CW\*(C`fork ()\*(C'\fR was detected (usually because whoever is a good citizen cared to tell libev about it by calling \&\f(CW\*(C`ev_default_fork\*(C'\fR or \f(CW\*(C`ev_loop_fork\*(C'\fR). The invocation is done before the event loop blocks next and before \f(CW\*(C`ev_check\*(C'\fR watchers are being called, and only in the child after the fork. If whoever good citizen calling \&\f(CW\*(C`ev_default_fork\*(C'\fR cheats and calls it in the wrong process, the fork handlers will be invoked, too, of course. .PP \fIThe special problem of life after fork \- how is it possible?\fR .IX Subsection "The special problem of life after fork - how is it possible?" .PP Most uses of \f(CW\*(C`fork()\*(C'\fR consist of forking, then some simple calls to set up/change the process environment, followed by a call to \f(CW\*(C`exec()\*(C'\fR. This sequence should be handled by libev without any problems. .PP This changes when the application actually wants to do event handling in the child, or both parent in child, in effect \*(L"continuing\*(R" after the fork. .PP The default mode of operation (for libev, with application help to detect forks) is to duplicate all the state in the child, as would be expected when \fIeither\fR the parent \fIor\fR the child process continues. .PP When both processes want to continue using libev, then this is usually the wrong result. In that case, usually one process (typically the parent) is supposed to continue with all watchers in place as before, while the other process typically wants to start fresh, i.e. without any active watchers. .PP The cleanest and most efficient way to achieve that with libev is to simply create a new event loop, which of course will be \*(L"empty\*(R", and use that for new watchers. This has the advantage of not touching more memory than necessary, and thus avoiding the copy-on-write, and the disadvantage of having to use multiple event loops (which do not support signal watchers). .PP When this is not possible, or you want to use the default loop for other reasons, then in the process that wants to start \*(L"fresh\*(R", call \&\f(CW\*(C`ev_loop_destroy (EV_DEFAULT)\*(C'\fR followed by \f(CW\*(C`ev_default_loop (...)\*(C'\fR. Destroying the default loop will \*(L"orphan\*(R" (not stop) all registered watchers, so you have to be careful not to execute code that modifies those watchers. Note also that in that case, you have to re-register any signal watchers. .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_fork_init (ev_fork *, callback)" 4 .IX Item "ev_fork_init (ev_fork *, callback)" Initialises and configures the fork watcher \- it has no parameters of any kind. There is a \f(CW\*(C`ev_fork_set\*(C'\fR macro, but using it is utterly pointless, really. .ie n .SS """ev_cleanup"" \- even the best things end" .el .SS "\f(CWev_cleanup\fP \- even the best things end" .IX Subsection "ev_cleanup - even the best things end" Cleanup watchers are called just before the event loop is being destroyed by a call to \f(CW\*(C`ev_loop_destroy\*(C'\fR. .PP While there is no guarantee that the event loop gets destroyed, cleanup watchers provide a convenient method to install cleanup hooks for your program, worker threads and so on \- you just to make sure to destroy the loop when you want them to be invoked. .PP Cleanup watchers are invoked in the same way as any other watcher. Unlike all other watchers, they do not keep a reference to the event loop (which makes a lot of sense if you think about it). Like all other watchers, you can call libev functions in the callback, except \f(CW\*(C`ev_cleanup_start\*(C'\fR. .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_cleanup_init (ev_cleanup *, callback)" 4 .IX Item "ev_cleanup_init (ev_cleanup *, callback)" Initialises and configures the cleanup watcher \- it has no parameters of any kind. There is a \f(CW\*(C`ev_cleanup_set\*(C'\fR macro, but using it is utterly pointless, I assure you. .PP Example: Register an atexit handler to destroy the default loop, so any cleanup functions are called. .PP .Vb 5 \& static void \& program_exits (void) \& { \& ev_loop_destroy (EV_DEFAULT_UC); \& } \& \& ... \& atexit (program_exits); .Ve .ie n .SS """ev_async"" \- how to wake up an event loop" .el .SS "\f(CWev_async\fP \- how to wake up an event loop" .IX Subsection "ev_async - how to wake up an event loop" In general, you cannot use an \f(CW\*(C`ev_loop\*(C'\fR from multiple threads or other asynchronous sources such as signal handlers (as opposed to multiple event loops \- those are of course safe to use in different threads). .PP Sometimes, however, you need to wake up an event loop you do not control, for example because it belongs to another thread. This is what \f(CW\*(C`ev_async\*(C'\fR watchers do: as long as the \f(CW\*(C`ev_async\*(C'\fR watcher is active, you can signal it by calling \f(CW\*(C`ev_async_send\*(C'\fR, which is thread\- and signal safe. .PP This functionality is very similar to \f(CW\*(C`ev_signal\*(C'\fR watchers, as signals, too, are asynchronous in nature, and signals, too, will be compressed (i.e. the number of callback invocations may be less than the number of \&\f(CW\*(C`ev_async_send\*(C'\fR calls). In fact, you could use signal watchers as a kind of \*(L"global async watchers\*(R" by using a watcher on an otherwise unused signal, and \f(CW\*(C`ev_feed_signal\*(C'\fR to signal this watcher from another thread, even without knowing which loop owns the signal. .PP \fIQueueing\fR .IX Subsection "Queueing" .PP \&\f(CW\*(C`ev_async\*(C'\fR does not support queueing of data in any way. The reason is that the author does not know of a simple (or any) algorithm for a multiple-writer-single-reader queue that works in all cases and doesn't need elaborate support such as pthreads or unportable memory access semantics. .PP That means that if you want to queue data, you have to provide your own queue. But at least I can tell you how to implement locking around your queue: .IP "queueing from a signal handler context" 4 .IX Item "queueing from a signal handler context" To implement race-free queueing, you simply add to the queue in the signal handler but you block the signal handler in the watcher callback. Here is an example that does that for some fictitious \s-1SIGUSR1\s0 handler: .Sp .Vb 1 \& static ev_async mysig; \& \& static void \& sigusr1_handler (void) \& { \& sometype data; \& \& // no locking etc. \& queue_put (data); \& ev_async_send (EV_DEFAULT_ &mysig); \& } \& \& static void \& mysig_cb (EV_P_ ev_async *w, int revents) \& { \& sometype data; \& sigset_t block, prev; \& \& sigemptyset (&block); \& sigaddset (&block, SIGUSR1); \& sigprocmask (SIG_BLOCK, &block, &prev); \& \& while (queue_get (&data)) \& process (data); \& \& if (sigismember (&prev, SIGUSR1) \& sigprocmask (SIG_UNBLOCK, &block, 0); \& } .Ve .Sp (Note: pthreads in theory requires you to use \f(CW\*(C`pthread_setmask\*(C'\fR instead of \f(CW\*(C`sigprocmask\*(C'\fR when you use threads, but libev doesn't do it either...). .IP "queueing from a thread context" 4 .IX Item "queueing from a thread context" The strategy for threads is different, as you cannot (easily) block threads but you can easily preempt them, so to queue safely you need to employ a traditional mutex lock, such as in this pthread example: .Sp .Vb 2 \& static ev_async mysig; \& static pthread_mutex_t mymutex = PTHREAD_MUTEX_INITIALIZER; \& \& static void \& otherthread (void) \& { \& // only need to lock the actual queueing operation \& pthread_mutex_lock (&mymutex); \& queue_put (data); \& pthread_mutex_unlock (&mymutex); \& \& ev_async_send (EV_DEFAULT_ &mysig); \& } \& \& static void \& mysig_cb (EV_P_ ev_async *w, int revents) \& { \& pthread_mutex_lock (&mymutex); \& \& while (queue_get (&data)) \& process (data); \& \& pthread_mutex_unlock (&mymutex); \& } .Ve .PP \fIWatcher-Specific Functions and Data Members\fR .IX Subsection "Watcher-Specific Functions and Data Members" .IP "ev_async_init (ev_async *, callback)" 4 .IX Item "ev_async_init (ev_async *, callback)" Initialises and configures the async watcher \- it has no parameters of any kind. There is a \f(CW\*(C`ev_async_set\*(C'\fR macro, but using it is utterly pointless, trust me. .IP "ev_async_send (loop, ev_async *)" 4 .IX Item "ev_async_send (loop, ev_async *)" Sends/signals/activates the given \f(CW\*(C`ev_async\*(C'\fR watcher, that is, feeds an \f(CW\*(C`EV_ASYNC\*(C'\fR event on the watcher into the event loop, and instantly returns. .Sp Unlike \f(CW\*(C`ev_feed_event\*(C'\fR, this call is safe to do from other threads, signal or similar contexts (see the discussion of \f(CW\*(C`EV_ATOMIC_T\*(C'\fR in the embedding section below on what exactly this means). .Sp Note that, as with other watchers in libev, multiple events might get compressed into a single callback invocation (another way to look at this is that \f(CW\*(C`ev_async\*(C'\fR watchers are level-triggered: they are set on \&\f(CW\*(C`ev_async_send\*(C'\fR, reset when the event loop detects that). .Sp This call incurs the overhead of at most one extra system call per event loop iteration, if the event loop is blocked, and no syscall at all if the event loop (or your program) is processing events. That means that repeated calls are basically free (there is no need to avoid calls for performance reasons) and that the overhead becomes smaller (typically zero) under load. .IP "bool = ev_async_pending (ev_async *)" 4 .IX Item "bool = ev_async_pending (ev_async *)" Returns a non-zero value when \f(CW\*(C`ev_async_send\*(C'\fR has been called on the watcher but the event has not yet been processed (or even noted) by the event loop. .Sp \&\f(CW\*(C`ev_async_send\*(C'\fR sets a flag in the watcher and wakes up the loop. When the loop iterates next and checks for the watcher to have become active, it will reset the flag again. \f(CW\*(C`ev_async_pending\*(C'\fR can be used to very quickly check whether invoking the loop might be a good idea. .Sp Not that this does \fInot\fR check whether the watcher itself is pending, only whether it has been requested to make this watcher pending: there is a time window between the event loop checking and resetting the async notification, and the callback being invoked. .SH "OTHER FUNCTIONS" .IX Header "OTHER FUNCTIONS" There are some other functions of possible interest. Described. Here. Now. .IP "ev_once (loop, int fd, int events, ev_tstamp timeout, callback)" 4 .IX Item "ev_once (loop, int fd, int events, ev_tstamp timeout, callback)" This function combines a simple timer and an I/O watcher, calls your callback on whichever event happens first and automatically stops both watchers. This is useful if you want to wait for a single event on an fd or timeout without having to allocate/configure/start/stop/free one or more watchers yourself. .Sp If \f(CW\*(C`fd\*(C'\fR is less than 0, then no I/O watcher will be started and the \&\f(CW\*(C`events\*(C'\fR argument is being ignored. Otherwise, an \f(CW\*(C`ev_io\*(C'\fR watcher for the given \f(CW\*(C`fd\*(C'\fR and \f(CW\*(C`events\*(C'\fR set will be created and started. .Sp If \f(CW\*(C`timeout\*(C'\fR is less than 0, then no timeout watcher will be started. Otherwise an \f(CW\*(C`ev_timer\*(C'\fR watcher with after = \f(CW\*(C`timeout\*(C'\fR (and repeat = 0) will be started. \f(CW0\fR is a valid timeout. .Sp The callback has the type \f(CW\*(C`void (*cb)(int revents, void *arg)\*(C'\fR and is passed an \f(CW\*(C`revents\*(C'\fR set like normal event callbacks (a combination of \&\f(CW\*(C`EV_ERROR\*(C'\fR, \f(CW\*(C`EV_READ\*(C'\fR, \f(CW\*(C`EV_WRITE\*(C'\fR or \f(CW\*(C`EV_TIMER\*(C'\fR) and the \f(CW\*(C`arg\*(C'\fR value passed to \f(CW\*(C`ev_once\*(C'\fR. Note that it is possible to receive \fIboth\fR a timeout and an io event at the same time \- you probably should give io events precedence. .Sp Example: wait up to ten seconds for data to appear on \s-1STDIN_FILENO\s0. .Sp .Vb 7 \& static void stdin_ready (int revents, void *arg) \& { \& if (revents & EV_READ) \& /* stdin might have data for us, joy! */; \& else if (revents & EV_TIMER) \& /* doh, nothing entered */; \& } \& \& ev_once (STDIN_FILENO, EV_READ, 10., stdin_ready, 0); .Ve .IP "ev_feed_fd_event (loop, int fd, int revents)" 4 .IX Item "ev_feed_fd_event (loop, int fd, int revents)" Feed an event on the given fd, as if a file descriptor backend detected the given events. .IP "ev_feed_signal_event (loop, int signum)" 4 .IX Item "ev_feed_signal_event (loop, int signum)" Feed an event as if the given signal occurred. See also \f(CW\*(C`ev_feed_signal\*(C'\fR, which is async-safe. .SH "COMMON OR USEFUL IDIOMS (OR BOTH)" .IX Header "COMMON OR USEFUL IDIOMS (OR BOTH)" This section explains some common idioms that are not immediately obvious. Note that examples are sprinkled over the whole manual, and this section only contains stuff that wouldn't fit anywhere else. .SS "\s-1ASSOCIATING\s0 \s-1CUSTOM\s0 \s-1DATA\s0 \s-1WITH\s0 A \s-1WATCHER\s0" .IX Subsection "ASSOCIATING CUSTOM DATA WITH A WATCHER" Each watcher has, by default, a \f(CW\*(C`void *data\*(C'\fR member that you can read or modify at any time: libev will completely ignore it. This can be used to associate arbitrary data with your watcher. If you need more data and don't want to allocate memory separately and store a pointer to it in that data member, you can also \*(L"subclass\*(R" the watcher type and provide your own data: .PP .Vb 7 \& struct my_io \& { \& ev_io io; \& int otherfd; \& void *somedata; \& struct whatever *mostinteresting; \& }; \& \& ... \& struct my_io w; \& ev_io_init (&w.io, my_cb, fd, EV_READ); .Ve .PP And since your callback will be called with a pointer to the watcher, you can cast it back to your own type: .PP .Vb 5 \& static void my_cb (struct ev_loop *loop, ev_io *w_, int revents) \& { \& struct my_io *w = (struct my_io *)w_; \& ... \& } .Ve .PP More interesting and less C\-conformant ways of casting your callback function type instead have been omitted. .SS "\s-1BUILDING\s0 \s-1YOUR\s0 \s-1OWN\s0 \s-1COMPOSITE\s0 \s-1WATCHERS\s0" .IX Subsection "BUILDING YOUR OWN COMPOSITE WATCHERS" Another common scenario is to use some data structure with multiple embedded watchers, in effect creating your own watcher that combines multiple libev event sources into one \*(L"super-watcher\*(R": .PP .Vb 6 \& struct my_biggy \& { \& int some_data; \& ev_timer t1; \& ev_timer t2; \& } .Ve .PP In this case getting the pointer to \f(CW\*(C`my_biggy\*(C'\fR is a bit more complicated: Either you store the address of your \f(CW\*(C`my_biggy\*(C'\fR struct in the \f(CW\*(C`data\*(C'\fR member of the watcher (for woozies or \*(C+ coders), or you need to use some pointer arithmetic using \f(CW\*(C`offsetof\*(C'\fR inside your watchers (for real programmers): .PP .Vb 1 \& #include \& \& static void \& t1_cb (EV_P_ ev_timer *w, int revents) \& { \& struct my_biggy big = (struct my_biggy *) \& (((char *)w) \- offsetof (struct my_biggy, t1)); \& } \& \& static void \& t2_cb (EV_P_ ev_timer *w, int revents) \& { \& struct my_biggy big = (struct my_biggy *) \& (((char *)w) \- offsetof (struct my_biggy, t2)); \& } .Ve .SS "\s-1AVOIDING\s0 \s-1FINISHING\s0 \s-1BEFORE\s0 \s-1RETURNING\s0" .IX Subsection "AVOIDING FINISHING BEFORE RETURNING" Often you have structures like this in event-based programs: .PP .Vb 4 \& callback () \& { \& free (request); \& } \& \& request = start_new_request (..., callback); .Ve .PP The intent is to start some \*(L"lengthy\*(R" operation. The \f(CW\*(C`request\*(C'\fR could be used to cancel the operation, or do other things with it. .PP It's not uncommon to have code paths in \f(CW\*(C`start_new_request\*(C'\fR that immediately invoke the callback, for example, to report errors. Or you add some caching layer that finds that it can skip the lengthy aspects of the operation and simply invoke the callback with the result. .PP The problem here is that this will happen \fIbefore\fR \f(CW\*(C`start_new_request\*(C'\fR has returned, so \f(CW\*(C`request\*(C'\fR is not set. .PP Even if you pass the request by some safer means to the callback, you might want to do something to the request after starting it, such as canceling it, which probably isn't working so well when the callback has already been invoked. .PP A common way around all these issues is to make sure that \&\f(CW\*(C`start_new_request\*(C'\fR \fIalways\fR returns before the callback is invoked. If \&\f(CW\*(C`start_new_request\*(C'\fR immediately knows the result, it can artificially delay invoking the callback by e.g. using a \f(CW\*(C`prepare\*(C'\fR or \f(CW\*(C`idle\*(C'\fR watcher for example, or more sneakily, by reusing an existing (stopped) watcher and pushing it into the pending queue: .PP .Vb 2 \& ev_set_cb (watcher, callback); \& ev_feed_event (EV_A_ watcher, 0); .Ve .PP This way, \f(CW\*(C`start_new_request\*(C'\fR can safely return before the callback is invoked, while not delaying callback invocation too much. .SS "\s-1MODEL/NESTED\s0 \s-1EVENT\s0 \s-1LOOP\s0 \s-1INVOCATIONS\s0 \s-1AND\s0 \s-1EXIT\s0 \s-1CONDITIONS\s0" .IX Subsection "MODEL/NESTED EVENT LOOP INVOCATIONS AND EXIT CONDITIONS" Often (especially in \s-1GUI\s0 toolkits) there are places where you have \&\fImodal\fR interaction, which is most easily implemented by recursively invoking \f(CW\*(C`ev_run\*(C'\fR. .PP This brings the problem of exiting \- a callback might want to finish the main \f(CW\*(C`ev_run\*(C'\fR call, but not the nested one (e.g. user clicked \*(L"Quit\*(R", but a modal \*(L"Are you sure?\*(R" dialog is still waiting), or just the nested one and not the main one (e.g. user clocked \*(L"Ok\*(R" in a modal dialog), or some other combination: In these cases, \f(CW\*(C`ev_break\*(C'\fR will not work alone. .PP The solution is to maintain \*(L"break this loop\*(R" variable for each \f(CW\*(C`ev_run\*(C'\fR invocation, and use a loop around \f(CW\*(C`ev_run\*(C'\fR until the condition is triggered, using \f(CW\*(C`EVRUN_ONCE\*(C'\fR: .PP .Vb 2 \& // main loop \& int exit_main_loop = 0; \& \& while (!exit_main_loop) \& ev_run (EV_DEFAULT_ EVRUN_ONCE); \& \& // in a modal watcher \& int exit_nested_loop = 0; \& \& while (!exit_nested_loop) \& ev_run (EV_A_ EVRUN_ONCE); .Ve .PP To exit from any of these loops, just set the corresponding exit variable: .PP .Vb 2 \& // exit modal loop \& exit_nested_loop = 1; \& \& // exit main program, after modal loop is finished \& exit_main_loop = 1; \& \& // exit both \& exit_main_loop = exit_nested_loop = 1; .Ve .SS "\s-1THREAD\s0 \s-1LOCKING\s0 \s-1EXAMPLE\s0" .IX Subsection "THREAD LOCKING EXAMPLE" Here is a fictitious example of how to run an event loop in a different thread from where callbacks are being invoked and watchers are created/added/removed. .PP For a real-world example, see the \f(CW\*(C`EV::Loop::Async\*(C'\fR perl module, which uses exactly this technique (which is suited for many high-level languages). .PP The example uses a pthread mutex to protect the loop data, a condition variable to wait for callback invocations, an async watcher to notify the event loop thread and an unspecified mechanism to wake up the main thread. .PP First, you need to associate some data with the event loop: .PP .Vb 6 \& typedef struct { \& mutex_t lock; /* global loop lock */ \& ev_async async_w; \& thread_t tid; \& cond_t invoke_cv; \& } userdata; \& \& void prepare_loop (EV_P) \& { \& // for simplicity, we use a static userdata struct. \& static userdata u; \& \& ev_async_init (&u\->async_w, async_cb); \& ev_async_start (EV_A_ &u\->async_w); \& \& pthread_mutex_init (&u\->lock, 0); \& pthread_cond_init (&u\->invoke_cv, 0); \& \& // now associate this with the loop \& ev_set_userdata (EV_A_ u); \& ev_set_invoke_pending_cb (EV_A_ l_invoke); \& ev_set_loop_release_cb (EV_A_ l_release, l_acquire); \& \& // then create the thread running ev_run \& pthread_create (&u\->tid, 0, l_run, EV_A); \& } .Ve .PP The callback for the \f(CW\*(C`ev_async\*(C'\fR watcher does nothing: the watcher is used solely to wake up the event loop so it takes notice of any new watchers that might have been added: .PP .Vb 5 \& static void \& async_cb (EV_P_ ev_async *w, int revents) \& { \& // just used for the side effects \& } .Ve .PP The \f(CW\*(C`l_release\*(C'\fR and \f(CW\*(C`l_acquire\*(C'\fR callbacks simply unlock/lock the mutex protecting the loop data, respectively. .PP .Vb 6 \& static void \& l_release (EV_P) \& { \& userdata *u = ev_userdata (EV_A); \& pthread_mutex_unlock (&u\->lock); \& } \& \& static void \& l_acquire (EV_P) \& { \& userdata *u = ev_userdata (EV_A); \& pthread_mutex_lock (&u\->lock); \& } .Ve .PP The event loop thread first acquires the mutex, and then jumps straight into \f(CW\*(C`ev_run\*(C'\fR: .PP .Vb 4 \& void * \& l_run (void *thr_arg) \& { \& struct ev_loop *loop = (struct ev_loop *)thr_arg; \& \& l_acquire (EV_A); \& pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0); \& ev_run (EV_A_ 0); \& l_release (EV_A); \& \& return 0; \& } .Ve .PP Instead of invoking all pending watchers, the \f(CW\*(C`l_invoke\*(C'\fR callback will signal the main thread via some unspecified mechanism (signals? pipe writes? \f(CW\*(C`Async::Interrupt\*(C'\fR?) and then waits until all pending watchers have been called (in a while loop because a) spurious wakeups are possible and b) skipping inter-thread-communication when there are no pending watchers is very beneficial): .PP .Vb 4 \& static void \& l_invoke (EV_P) \& { \& userdata *u = ev_userdata (EV_A); \& \& while (ev_pending_count (EV_A)) \& { \& wake_up_other_thread_in_some_magic_or_not_so_magic_way (); \& pthread_cond_wait (&u\->invoke_cv, &u\->lock); \& } \& } .Ve .PP Now, whenever the main thread gets told to invoke pending watchers, it will grab the lock, call \f(CW\*(C`ev_invoke_pending\*(C'\fR and then signal the loop thread to continue: .PP .Vb 4 \& static void \& real_invoke_pending (EV_P) \& { \& userdata *u = ev_userdata (EV_A); \& \& pthread_mutex_lock (&u\->lock); \& ev_invoke_pending (EV_A); \& pthread_cond_signal (&u\->invoke_cv); \& pthread_mutex_unlock (&u\->lock); \& } .Ve .PP Whenever you want to start/stop a watcher or do other modifications to an event loop, you will now have to lock: .PP .Vb 2 \& ev_timer timeout_watcher; \& userdata *u = ev_userdata (EV_A); \& \& ev_timer_init (&timeout_watcher, timeout_cb, 5.5, 0.); \& \& pthread_mutex_lock (&u\->lock); \& ev_timer_start (EV_A_ &timeout_watcher); \& ev_async_send (EV_A_ &u\->async_w); \& pthread_mutex_unlock (&u\->lock); .Ve .PP Note that sending the \f(CW\*(C`ev_async\*(C'\fR watcher is required because otherwise an event loop currently blocking in the kernel will have no knowledge about the newly added timer. By waking up the loop it will pick up any new watchers in the next event loop iteration. .SS "\s-1THREADS\s0, \s-1COROUTINES\s0, \s-1CONTINUATIONS\s0, \s-1QUEUES\s0... \s-1INSTEAD\s0 \s-1OF\s0 \s-1CALLBACKS\s0" .IX Subsection "THREADS, COROUTINES, CONTINUATIONS, QUEUES... INSTEAD OF CALLBACKS" While the overhead of a callback that e.g. schedules a thread is small, it is still an overhead. If you embed libev, and your main usage is with some kind of threads or coroutines, you might want to customise libev so that doesn't need callbacks anymore. .PP Imagine you have coroutines that you can switch to using a function \&\f(CW\*(C`switch_to (coro)\*(C'\fR, that libev runs in a coroutine called \f(CW\*(C`libev_coro\*(C'\fR and that due to some magic, the currently active coroutine is stored in a global called \f(CW\*(C`current_coro\*(C'\fR. Then you can build your own \*(L"wait for libev event\*(R" primitive by changing \f(CW\*(C`EV_CB_DECLARE\*(C'\fR and \f(CW\*(C`EV_CB_INVOKE\*(C'\fR (note the differing \f(CW\*(C`;\*(C'\fR conventions): .PP .Vb 2 \& #define EV_CB_DECLARE(type) struct my_coro *cb; \& #define EV_CB_INVOKE(watcher) switch_to ((watcher)\->cb) .Ve .PP That means instead of having a C callback function, you store the coroutine to switch to in each watcher, and instead of having libev call your callback, you instead have it switch to that coroutine. .PP A coroutine might now wait for an event with a function called \&\f(CW\*(C`wait_for_event\*(C'\fR. (the watcher needs to be started, as always, but it doesn't matter when, or whether the watcher is active or not when this function is called): .PP .Vb 6 \& void \& wait_for_event (ev_watcher *w) \& { \& ev_set_cb (w, current_coro); \& switch_to (libev_coro); \& } .Ve .PP That basically suspends the coroutine inside \f(CW\*(C`wait_for_event\*(C'\fR and continues the libev coroutine, which, when appropriate, switches back to this or any other coroutine. .PP You can do similar tricks if you have, say, threads with an event queue \- instead of storing a coroutine, you store the queue object and instead of switching to a coroutine, you push the watcher onto the queue and notify any waiters. .PP To embed libev, see \*(L"\s-1EMBEDDING\s0\*(R", but in short, it's easiest to create two files, \fImy_ev.h\fR and \fImy_ev.c\fR that include the respective libev files: .PP .Vb 4 \& // my_ev.h \& #define EV_CB_DECLARE(type) struct my_coro *cb; \& #define EV_CB_INVOKE(watcher) switch_to ((watcher)\->cb); \& #include "../libev/ev.h" \& \& // my_ev.c \& #define EV_H "my_ev.h" \& #include "../libev/ev.c" .Ve .PP And then use \fImy_ev.h\fR when you would normally use \fIev.h\fR, and compile \&\fImy_ev.c\fR into your project. When properly specifying include paths, you can even use \fIev.h\fR as header file name directly. .SH "LIBEVENT EMULATION" .IX Header "LIBEVENT EMULATION" Libev offers a compatibility emulation layer for libevent. It cannot emulate the internals of libevent, so here are some usage hints: .IP "\(bu" 4 Only the libevent\-1.4.1\-beta \s-1API\s0 is being emulated. .Sp This was the newest libevent version available when libev was implemented, and is still mostly unchanged in 2010. .IP "\(bu" 4 Use it by including , as usual. .IP "\(bu" 4 The following members are fully supported: ev_base, ev_callback, ev_arg, ev_fd, ev_res, ev_events. .IP "\(bu" 4 Avoid using ev_flags and the EVLIST_*\-macros, while it is maintained by libev, it does not work exactly the same way as in libevent (consider it a private \s-1API\s0). .IP "\(bu" 4 Priorities are not currently supported. Initialising priorities will fail and all watchers will have the same priority, even though there is an ev_pri field. .IP "\(bu" 4 In libevent, the last base created gets the signals, in libev, the base that registered the signal gets the signals. .IP "\(bu" 4 Other members are not supported. .IP "\(bu" 4 The libev emulation is \fInot\fR \s-1ABI\s0 compatible to libevent, you need to use the libev header file and library. .SH "\*(C+ SUPPORT" .IX Header " SUPPORT" .SS "C \s-1API\s0" .IX Subsection "C API" The normal C \s-1API\s0 should work fine when used from \*(C+: both ev.h and the libev sources can be compiled as \*(C+. Therefore, code that uses the C \s-1API\s0 will work fine. .PP Proper exception specifications might have to be added to callbacks passed to libev: exceptions may be thrown only from watcher callbacks, all other callbacks (allocator, syserr, loop acquire/release and periodic reschedule callbacks) must not throw exceptions, and might need a \f(CW\*(C`throw ()\*(C'\fR specification. If you have code that needs to be compiled as both C and \*(C+ you can use the \f(CW\*(C`EV_THROW\*(C'\fR macro for this: .PP .Vb 6 \& static void \& fatal_error (const char *msg) EV_THROW \& { \& perror (msg); \& abort (); \& } \& \& ... \& ev_set_syserr_cb (fatal_error); .Ve .PP The only \s-1API\s0 functions that can currently throw exceptions are \f(CW\*(C`ev_run\*(C'\fR, \&\f(CW\*(C`ev_invoke\*(C'\fR, \f(CW\*(C`ev_invoke_pending\*(C'\fR and \f(CW\*(C`ev_loop_destroy\*(C'\fR (the latter because it runs cleanup watchers). .PP Throwing exceptions in watcher callbacks is only supported if libev itself is compiled with a \*(C+ compiler or your C and \*(C+ environments allow throwing exceptions through C libraries (most do). .SS "\*(C+ \s-1API\s0" .IX Subsection " API" Libev comes with some simplistic wrapper classes for \*(C+ that mainly allow you to use some convenience methods to start/stop watchers and also change the callback model to a model using method callbacks on objects. .PP To use it, .PP .Vb 1 \& #include .Ve .PP This automatically includes \fIev.h\fR and puts all of its definitions (many of them macros) into the global namespace. All \*(C+ specific things are put into the \f(CW\*(C`ev\*(C'\fR namespace. It should support all the same embedding options as \fIev.h\fR, most notably \f(CW\*(C`EV_MULTIPLICITY\*(C'\fR. .PP Care has been taken to keep the overhead low. The only data member the \*(C+ classes add (compared to plain C\-style watchers) is the event loop pointer that the watcher is associated with (or no additional members at all if you disable \f(CW\*(C`EV_MULTIPLICITY\*(C'\fR when embedding libev). .PP Currently, functions, static and non-static member functions and classes with \f(CW\*(C`operator ()\*(C'\fR can be used as callbacks. Other types should be easy to add as long as they only need one additional pointer for context. If you need support for other types of functors please contact the author (preferably after implementing it). .PP For all this to work, your \*(C+ compiler either has to use the same calling conventions as your C compiler (for static member functions), or you have to embed libev and compile libev itself as \*(C+. .PP Here is a list of things available in the \f(CW\*(C`ev\*(C'\fR namespace: .ie n .IP """ev::READ"", ""ev::WRITE"" etc." 4 .el .IP "\f(CWev::READ\fR, \f(CWev::WRITE\fR etc." 4 .IX Item "ev::READ, ev::WRITE etc." These are just enum values with the same values as the \f(CW\*(C`EV_READ\*(C'\fR etc. macros from \fIev.h\fR. .ie n .IP """ev::tstamp"", ""ev::now""" 4 .el .IP "\f(CWev::tstamp\fR, \f(CWev::now\fR" 4 .IX Item "ev::tstamp, ev::now" Aliases to the same types/functions as with the \f(CW\*(C`ev_\*(C'\fR prefix. .ie n .IP """ev::io"", ""ev::timer"", ""ev::periodic"", ""ev::idle"", ""ev::sig"" etc." 4 .el .IP "\f(CWev::io\fR, \f(CWev::timer\fR, \f(CWev::periodic\fR, \f(CWev::idle\fR, \f(CWev::sig\fR etc." 4 .IX Item "ev::io, ev::timer, ev::periodic, ev::idle, ev::sig etc." For each \f(CW\*(C`ev_TYPE\*(C'\fR watcher in \fIev.h\fR there is a corresponding class of the same name in the \f(CW\*(C`ev\*(C'\fR namespace, with the exception of \f(CW\*(C`ev_signal\*(C'\fR which is called \f(CW\*(C`ev::sig\*(C'\fR to avoid clashes with the \f(CW\*(C`signal\*(C'\fR macro defined by many implementations. .Sp All of those classes have these methods: .RS 4 .IP "ev::TYPE::TYPE ()" 4 .IX Item "ev::TYPE::TYPE ()" .PD 0 .IP "ev::TYPE::TYPE (loop)" 4 .IX Item "ev::TYPE::TYPE (loop)" .IP "ev::TYPE::~TYPE" 4 .IX Item "ev::TYPE::~TYPE" .PD The constructor (optionally) takes an event loop to associate the watcher with. If it is omitted, it will use \f(CW\*(C`EV_DEFAULT\*(C'\fR. .Sp The constructor calls \f(CW\*(C`ev_init\*(C'\fR for you, which means you have to call the \&\f(CW\*(C`set\*(C'\fR method before starting it. .Sp It will not set a callback, however: You have to call the templated \f(CW\*(C`set\*(C'\fR method to set a callback before you can start the watcher. .Sp (The reason why you have to use a method is a limitation in \*(C+ which does not allow explicit template arguments for constructors). .Sp The destructor automatically stops the watcher if it is active. .IP "w\->set (object *)" 4 .IX Item "w->set (object *)" This method sets the callback method to call. The method has to have a signature of \f(CW\*(C`void (*)(ev_TYPE &, int)\*(C'\fR, it receives the watcher as first argument and the \f(CW\*(C`revents\*(C'\fR as second. The object must be given as parameter and is stored in the \f(CW\*(C`data\*(C'\fR member of the watcher. .Sp This method synthesizes efficient thunking code to call your method from the C callback that libev requires. If your compiler can inline your callback (i.e. it is visible to it at the place of the \f(CW\*(C`set\*(C'\fR call and your compiler is good :), then the method will be fully inlined into the thunking function, making it as fast as a direct C callback. .Sp Example: simple class declaration and watcher initialisation .Sp .Vb 4 \& struct myclass \& { \& void io_cb (ev::io &w, int revents) { } \& } \& \& myclass obj; \& ev::io iow; \& iow.set (&obj); .Ve .IP "w\->set (object *)" 4 .IX Item "w->set (object *)" This is a variation of a method callback \- leaving out the method to call will default the method to \f(CW\*(C`operator ()\*(C'\fR, which makes it possible to use functor objects without having to manually specify the \f(CW\*(C`operator ()\*(C'\fR all the time. Incidentally, you can then also leave out the template argument list. .Sp The \f(CW\*(C`operator ()\*(C'\fR method prototype must be \f(CW\*(C`void operator ()(watcher &w, int revents)\*(C'\fR. .Sp See the method\-\f(CW\*(C`set\*(C'\fR above for more details. .Sp Example: use a functor object as callback. .Sp .Vb 7 \& struct myfunctor \& { \& void operator() (ev::io &w, int revents) \& { \& ... \& } \& } \& \& myfunctor f; \& \& ev::io w; \& w.set (&f); .Ve .IP "w\->set (void *data = 0)" 4 .IX Item "w->set (void *data = 0)" Also sets a callback, but uses a static method or plain function as callback. The optional \f(CW\*(C`data\*(C'\fR argument will be stored in the watcher's \&\f(CW\*(C`data\*(C'\fR member and is free for you to use. .Sp The prototype of the \f(CW\*(C`function\*(C'\fR must be \f(CW\*(C`void (*)(ev::TYPE &w, int)\*(C'\fR. .Sp See the method\-\f(CW\*(C`set\*(C'\fR above for more details. .Sp Example: Use a plain function as callback. .Sp .Vb 2 \& static void io_cb (ev::io &w, int revents) { } \& iow.set (); .Ve .IP "w\->set (loop)" 4 .IX Item "w->set (loop)" Associates a different \f(CW\*(C`struct ev_loop\*(C'\fR with this watcher. You can only do this when the watcher is inactive (and not pending either). .IP "w\->set ([arguments])" 4 .IX Item "w->set ([arguments])" Basically the same as \f(CW\*(C`ev_TYPE_set\*(C'\fR, with the same arguments. Either this method or a suitable start method must be called at least once. Unlike the C counterpart, an active watcher gets automatically stopped and restarted when reconfiguring it with this method. .IP "w\->start ()" 4 .IX Item "w->start ()" Starts the watcher. Note that there is no \f(CW\*(C`loop\*(C'\fR argument, as the constructor already stores the event loop. .IP "w\->start ([arguments])" 4 .IX Item "w->start ([arguments])" Instead of calling \f(CW\*(C`set\*(C'\fR and \f(CW\*(C`start\*(C'\fR methods separately, it is often convenient to wrap them in one call. Uses the same type of arguments as the configure \f(CW\*(C`set\*(C'\fR method of the watcher. .IP "w\->stop ()" 4 .IX Item "w->stop ()" Stops the watcher if it is active. Again, no \f(CW\*(C`loop\*(C'\fR argument. .ie n .IP "w\->again () (""ev::timer"", ""ev::periodic"" only)" 4 .el .IP "w\->again () (\f(CWev::timer\fR, \f(CWev::periodic\fR only)" 4 .IX Item "w->again () (ev::timer, ev::periodic only)" For \f(CW\*(C`ev::timer\*(C'\fR and \f(CW\*(C`ev::periodic\*(C'\fR, this invokes the corresponding \&\f(CW\*(C`ev_TYPE_again\*(C'\fR function. .ie n .IP "w\->sweep () (""ev::embed"" only)" 4 .el .IP "w\->sweep () (\f(CWev::embed\fR only)" 4 .IX Item "w->sweep () (ev::embed only)" Invokes \f(CW\*(C`ev_embed_sweep\*(C'\fR. .ie n .IP "w\->update () (""ev::stat"" only)" 4 .el .IP "w\->update () (\f(CWev::stat\fR only)" 4 .IX Item "w->update () (ev::stat only)" Invokes \f(CW\*(C`ev_stat_stat\*(C'\fR. .RE .RS 4 .RE .PP Example: Define a class with two I/O and idle watchers, start the I/O watchers in the constructor. .PP .Vb 5 \& class myclass \& { \& ev::io io ; void io_cb (ev::io &w, int revents); \& ev::io io2 ; void io2_cb (ev::io &w, int revents); \& ev::idle idle; void idle_cb (ev::idle &w, int revents); \& \& myclass (int fd) \& { \& io .set (this); \& io2 .set (this); \& idle.set (this); \& \& io.set (fd, ev::WRITE); // configure the watcher \& io.start (); // start it whenever convenient \& \& io2.start (fd, ev::READ); // set + start in one call \& } \& }; .Ve .SH "OTHER LANGUAGE BINDINGS" .IX Header "OTHER LANGUAGE BINDINGS" Libev does not offer other language bindings itself, but bindings for a number of languages exist in the form of third-party packages. If you know any interesting language binding in addition to the ones listed here, drop me a note. .IP "Perl" 4 .IX Item "Perl" The \s-1EV\s0 module implements the full libev \s-1API\s0 and is actually used to test libev. \s-1EV\s0 is developed together with libev. Apart from the \s-1EV\s0 core module, there are additional modules that implement libev-compatible interfaces to \f(CW\*(C`libadns\*(C'\fR (\f(CW\*(C`EV::ADNS\*(C'\fR, but \f(CW\*(C`AnyEvent::DNS\*(C'\fR is preferred nowadays), \&\f(CW\*(C`Net::SNMP\*(C'\fR (\f(CW\*(C`Net::SNMP::EV\*(C'\fR) and the \f(CW\*(C`libglib\*(C'\fR event core (\f(CW\*(C`Glib::EV\*(C'\fR and \f(CW\*(C`EV::Glib\*(C'\fR). .Sp It can be found and installed via \s-1CPAN\s0, its homepage is at . .IP "Python" 4 .IX Item "Python" Python bindings can be found at . It seems to be quite complete and well-documented. .IP "Ruby" 4 .IX Item "Ruby" Tony Arcieri has written a ruby extension that offers access to a subset of the libev \s-1API\s0 and adds file handle abstractions, asynchronous \s-1DNS\s0 and more on top of it. It can be found via gem servers. Its homepage is at . .Sp Roger Pack reports that using the link order \f(CW\*(C`\-lws2_32 \-lmsvcrt\-ruby\-190\*(C'\fR makes rev work even on mingw. .IP "Haskell" 4 .IX Item "Haskell" A haskell binding to libev is available at http://hackage.haskell.org/cgi\-bin/hackage\-scripts/package/hlibev . .IP "D" 4 .IX Item "D" Leandro Lucarella has written a D language binding (\fIev.d\fR) for libev, to be found at . .IP "Ocaml" 4 .IX Item "Ocaml" Erkki Seppala has written Ocaml bindings for libev, to be found at http://modeemi.cs.tut.fi/~flux/software/ocaml\-ev/ . .IP "Lua" 4 .IX Item "Lua" Brian Maher has written a partial interface to libev for lua (at the time of this writing, only \f(CW\*(C`ev_io\*(C'\fR and \f(CW\*(C`ev_timer\*(C'\fR), to be found at http://github.com/brimworks/lua\-ev . .IP "Javascript" 4 .IX Item "Javascript" Node.js () uses libev as the underlying event library. .IP "Others" 4 .IX Item "Others" There are others, and I stopped counting. .SH "MACRO MAGIC" .IX Header "MACRO MAGIC" Libev can be compiled with a variety of options, the most fundamental of which is \f(CW\*(C`EV_MULTIPLICITY\*(C'\fR. This option determines whether (most) functions and callbacks have an initial \f(CW\*(C`struct ev_loop *\*(C'\fR argument. .PP To make it easier to write programs that cope with either variant, the following macros are defined: .ie n .IP """EV_A"", ""EV_A_""" 4 .el .IP "\f(CWEV_A\fR, \f(CWEV_A_\fR" 4 .IX Item "EV_A, EV_A_" This provides the loop \fIargument\fR for functions, if one is required (\*(L"ev loop argument\*(R"). The \f(CW\*(C`EV_A\*(C'\fR form is used when this is the sole argument, \&\f(CW\*(C`EV_A_\*(C'\fR is used when other arguments are following. Example: .Sp .Vb 3 \& ev_unref (EV_A); \& ev_timer_add (EV_A_ watcher); \& ev_run (EV_A_ 0); .Ve .Sp It assumes the variable \f(CW\*(C`loop\*(C'\fR of type \f(CW\*(C`struct ev_loop *\*(C'\fR is in scope, which is often provided by the following macro. .ie n .IP """EV_P"", ""EV_P_""" 4 .el .IP "\f(CWEV_P\fR, \f(CWEV_P_\fR" 4 .IX Item "EV_P, EV_P_" This provides the loop \fIparameter\fR for functions, if one is required (\*(L"ev loop parameter\*(R"). The \f(CW\*(C`EV_P\*(C'\fR form is used when this is the sole parameter, \&\f(CW\*(C`EV_P_\*(C'\fR is used when other parameters are following. Example: .Sp .Vb 2 \& // this is how ev_unref is being declared \& static void ev_unref (EV_P); \& \& // this is how you can declare your typical callback \& static void cb (EV_P_ ev_timer *w, int revents) .Ve .Sp It declares a parameter \f(CW\*(C`loop\*(C'\fR of type \f(CW\*(C`struct ev_loop *\*(C'\fR, quite suitable for use with \f(CW\*(C`EV_A\*(C'\fR. .ie n .IP """EV_DEFAULT"", ""EV_DEFAULT_""" 4 .el .IP "\f(CWEV_DEFAULT\fR, \f(CWEV_DEFAULT_\fR" 4 .IX Item "EV_DEFAULT, EV_DEFAULT_" Similar to the other two macros, this gives you the value of the default loop, if multiple loops are supported (\*(L"ev loop default\*(R"). The default loop will be initialised if it isn't already initialised. .Sp For non-multiplicity builds, these macros do nothing, so you always have to initialise the loop somewhere. .ie n .IP """EV_DEFAULT_UC"", ""EV_DEFAULT_UC_""" 4 .el .IP "\f(CWEV_DEFAULT_UC\fR, \f(CWEV_DEFAULT_UC_\fR" 4 .IX Item "EV_DEFAULT_UC, EV_DEFAULT_UC_" Usage identical to \f(CW\*(C`EV_DEFAULT\*(C'\fR and \f(CW\*(C`EV_DEFAULT_\*(C'\fR, but requires that the default loop has been initialised (\f(CW\*(C`UC\*(C'\fR == unchecked). Their behaviour is undefined when the default loop has not been initialised by a previous execution of \f(CW\*(C`EV_DEFAULT\*(C'\fR, \f(CW\*(C`EV_DEFAULT_\*(C'\fR or \f(CW\*(C`ev_default_init (...)\*(C'\fR. .Sp It is often prudent to use \f(CW\*(C`EV_DEFAULT\*(C'\fR when initialising the first watcher in a function but use \f(CW\*(C`EV_DEFAULT_UC\*(C'\fR afterwards. .PP Example: Declare and initialise a check watcher, utilising the above macros so it will work regardless of whether multiple loops are supported or not. .PP .Vb 5 \& static void \& check_cb (EV_P_ ev_timer *w, int revents) \& { \& ev_check_stop (EV_A_ w); \& } \& \& ev_check check; \& ev_check_init (&check, check_cb); \& ev_check_start (EV_DEFAULT_ &check); \& ev_run (EV_DEFAULT_ 0); .Ve .SH "EMBEDDING" .IX Header "EMBEDDING" Libev can (and often is) directly embedded into host applications. Examples of applications that embed it include the Deliantra Game Server, the \s-1EV\s0 perl module, the \s-1GNU\s0 Virtual Private Ethernet (gvpe) and rxvt-unicode. .PP The goal is to enable you to just copy the necessary files into your source directory without having to change even a single line in them, so you can easily upgrade by simply copying (or having a checked-out copy of libev somewhere in your source tree). .SS "\s-1FILESETS\s0" .IX Subsection "FILESETS" Depending on what features you need you need to include one or more sets of files in your application. .PP \fI\s-1CORE\s0 \s-1EVENT\s0 \s-1LOOP\s0\fR .IX Subsection "CORE EVENT LOOP" .PP To include only the libev core (all the \f(CW\*(C`ev_*\*(C'\fR functions), with manual configuration (no autoconf): .PP .Vb 2 \& #define EV_STANDALONE 1 \& #include "ev.c" .Ve .PP This will automatically include \fIev.h\fR, too, and should be done in a single C source file only to provide the function implementations. To use it, do the same for \fIev.h\fR in all files wishing to use this \s-1API\s0 (best done by writing a wrapper around \fIev.h\fR that you can include instead and where you can put other configuration options): .PP .Vb 2 \& #define EV_STANDALONE 1 \& #include "ev.h" .Ve .PP Both header files and implementation files can be compiled with a \*(C+ compiler (at least, that's a stated goal, and breakage will be treated as a bug). .PP You need the following files in your source tree, or in a directory in your include path (e.g. in libev/ when using \-Ilibev): .PP .Vb 4 \& ev.h \& ev.c \& ev_vars.h \& ev_wrap.h \& \& ev_win32.c required on win32 platforms only \& \& ev_select.c only when select backend is enabled (which is enabled by default) \& ev_poll.c only when poll backend is enabled (disabled by default) \& ev_epoll.c only when the epoll backend is enabled (disabled by default) \& ev_kqueue.c only when the kqueue backend is enabled (disabled by default) \& ev_port.c only when the solaris port backend is enabled (disabled by default) .Ve .PP \&\fIev.c\fR includes the backend files directly when enabled, so you only need to compile this single file. .PP \fI\s-1LIBEVENT\s0 \s-1COMPATIBILITY\s0 \s-1API\s0\fR .IX Subsection "LIBEVENT COMPATIBILITY API" .PP To include the libevent compatibility \s-1API\s0, also include: .PP .Vb 1 \& #include "event.c" .Ve .PP in the file including \fIev.c\fR, and: .PP .Vb 1 \& #include "event.h" .Ve .PP in the files that want to use the libevent \s-1API\s0. This also includes \fIev.h\fR. .PP You need the following additional files for this: .PP .Vb 2 \& event.h \& event.c .Ve .PP \fI\s-1AUTOCONF\s0 \s-1SUPPORT\s0\fR .IX Subsection "AUTOCONF SUPPORT" .PP Instead of using \f(CW\*(C`EV_STANDALONE=1\*(C'\fR and providing your configuration in whatever way you want, you can also \f(CW\*(C`m4_include([libev.m4])\*(C'\fR in your \&\fIconfigure.ac\fR and leave \f(CW\*(C`EV_STANDALONE\*(C'\fR undefined. \fIev.c\fR will then include \fIconfig.h\fR and configure itself accordingly. .PP For this of course you need the m4 file: .PP .Vb 1 \& libev.m4 .Ve .SS "\s-1PREPROCESSOR\s0 \s-1SYMBOLS/MACROS\s0" .IX Subsection "PREPROCESSOR SYMBOLS/MACROS" Libev can be configured via a variety of preprocessor symbols you have to define before including (or compiling) any of its files. The default in the absence of autoconf is documented for every option. .PP Symbols marked with \*(L"(h)\*(R" do not change the \s-1ABI\s0, and can have different values when compiling libev vs. including \fIev.h\fR, so it is permissible to redefine them before including \fIev.h\fR without breaking compatibility to a compiled library. All other symbols change the \s-1ABI\s0, which means all users of libev and the libev code itself must be compiled with compatible settings. .IP "\s-1EV_COMPAT3\s0 (h)" 4 .IX Item "EV_COMPAT3 (h)" Backwards compatibility is a major concern for libev. This is why this release of libev comes with wrappers for the functions and symbols that have been renamed between libev version 3 and 4. .Sp You can disable these wrappers (to test compatibility with future versions) by defining \f(CW\*(C`EV_COMPAT3\*(C'\fR to \f(CW0\fR when compiling your sources. This has the additional advantage that you can drop the \f(CW\*(C`struct\*(C'\fR from \f(CW\*(C`struct ev_loop\*(C'\fR declarations, as libev will provide an \f(CW\*(C`ev_loop\*(C'\fR typedef in that case. .Sp In some future version, the default for \f(CW\*(C`EV_COMPAT3\*(C'\fR will become \f(CW0\fR, and in some even more future version the compatibility code will be removed completely. .IP "\s-1EV_STANDALONE\s0 (h)" 4 .IX Item "EV_STANDALONE (h)" Must always be \f(CW1\fR if you do not use autoconf configuration, which keeps libev from including \fIconfig.h\fR, and it also defines dummy implementations for some libevent functions (such as logging, which is not supported). It will also not define any of the structs usually found in \&\fIevent.h\fR that are not directly supported by the libev core alone. .Sp In standalone mode, libev will still try to automatically deduce the configuration, but has to be more conservative. .IP "\s-1EV_USE_FLOOR\s0" 4 .IX Item "EV_USE_FLOOR" If defined to be \f(CW1\fR, libev will use the \f(CW\*(C`floor ()\*(C'\fR function for its periodic reschedule calculations, otherwise libev will fall back on a portable (slower) implementation. If you enable this, you usually have to link against libm or something equivalent. Enabling this when the \f(CW\*(C`floor\*(C'\fR function is not available will fail, so the safe default is to not enable this. .IP "\s-1EV_USE_MONOTONIC\s0" 4 .IX Item "EV_USE_MONOTONIC" If defined to be \f(CW1\fR, libev will try to detect the availability of the monotonic clock option at both compile time and runtime. Otherwise no use of the monotonic clock option will be attempted. If you enable this, you usually have to link against librt or something similar. Enabling it when the functionality isn't available is safe, though, although you have to make sure you link against any libraries where the \f(CW\*(C`clock_gettime\*(C'\fR function is hiding in (often \fI\-lrt\fR). See also \f(CW\*(C`EV_USE_CLOCK_SYSCALL\*(C'\fR. .IP "\s-1EV_USE_REALTIME\s0" 4 .IX Item "EV_USE_REALTIME" If defined to be \f(CW1\fR, libev will try to detect the availability of the real-time clock option at compile time (and assume its availability at runtime if successful). Otherwise no use of the real-time clock option will be attempted. This effectively replaces \f(CW\*(C`gettimeofday\*(C'\fR by \f(CW\*(C`clock_get (CLOCK_REALTIME, ...)\*(C'\fR and will not normally affect correctness. See the note about libraries in the description of \&\f(CW\*(C`EV_USE_MONOTONIC\*(C'\fR, though. Defaults to the opposite value of \&\f(CW\*(C`EV_USE_CLOCK_SYSCALL\*(C'\fR. .IP "\s-1EV_USE_CLOCK_SYSCALL\s0" 4 .IX Item "EV_USE_CLOCK_SYSCALL" If defined to be \f(CW1\fR, libev will try to use a direct syscall instead of calling the system-provided \f(CW\*(C`clock_gettime\*(C'\fR function. This option exists because on GNU/Linux, \f(CW\*(C`clock_gettime\*(C'\fR is in \f(CW\*(C`librt\*(C'\fR, but \f(CW\*(C`librt\*(C'\fR unconditionally pulls in \f(CW\*(C`libpthread\*(C'\fR, slowing down single-threaded programs needlessly. Using a direct syscall is slightly slower (in theory), because no optimised vdso implementation can be used, but avoids the pthread dependency. Defaults to \f(CW1\fR on GNU/Linux with glibc 2.x or higher, as it simplifies linking (no need for \f(CW\*(C`\-lrt\*(C'\fR). .IP "\s-1EV_USE_NANOSLEEP\s0" 4 .IX Item "EV_USE_NANOSLEEP" If defined to be \f(CW1\fR, libev will assume that \f(CW\*(C`nanosleep ()\*(C'\fR is available and will use it for delays. Otherwise it will use \f(CW\*(C`select ()\*(C'\fR. .IP "\s-1EV_USE_EVENTFD\s0" 4 .IX Item "EV_USE_EVENTFD" If defined to be \f(CW1\fR, then libev will assume that \f(CW\*(C`eventfd ()\*(C'\fR is available and will probe for kernel support at runtime. This will improve \&\f(CW\*(C`ev_signal\*(C'\fR and \f(CW\*(C`ev_async\*(C'\fR performance and reduce resource consumption. If undefined, it will be enabled if the headers indicate GNU/Linux + Glibc 2.7 or newer, otherwise disabled. .IP "\s-1EV_USE_SELECT\s0" 4 .IX Item "EV_USE_SELECT" If undefined or defined to be \f(CW1\fR, libev will compile in support for the \&\f(CW\*(C`select\*(C'\fR(2) backend. No attempt at auto-detection will be done: if no other method takes over, select will be it. Otherwise the select backend will not be compiled in. .IP "\s-1EV_SELECT_USE_FD_SET\s0" 4 .IX Item "EV_SELECT_USE_FD_SET" If defined to \f(CW1\fR, then the select backend will use the system \f(CW\*(C`fd_set\*(C'\fR structure. This is useful if libev doesn't compile due to a missing \&\f(CW\*(C`NFDBITS\*(C'\fR or \f(CW\*(C`fd_mask\*(C'\fR definition or it mis-guesses the bitset layout on exotic systems. This usually limits the range of file descriptors to some low limit such as 1024 or might have other limitations (winsocket only allows 64 sockets). The \f(CW\*(C`FD_SETSIZE\*(C'\fR macro, set before compilation, configures the maximum size of the \f(CW\*(C`fd_set\*(C'\fR. .IP "\s-1EV_SELECT_IS_WINSOCKET\s0" 4 .IX Item "EV_SELECT_IS_WINSOCKET" When defined to \f(CW1\fR, the select backend will assume that select/socket/connect etc. don't understand file descriptors but wants osf handles on win32 (this is the case when the select to be used is the winsock select). This means that it will call \&\f(CW\*(C`_get_osfhandle\*(C'\fR on the fd to convert it to an \s-1OS\s0 handle. Otherwise, it is assumed that all these functions actually work on fds, even on win32. Should not be defined on non\-win32 platforms. .IP "\s-1EV_FD_TO_WIN32_HANDLE\s0(fd)" 4 .IX Item "EV_FD_TO_WIN32_HANDLE(fd)" If \f(CW\*(C`EV_SELECT_IS_WINSOCKET\*(C'\fR is enabled, then libev needs a way to map file descriptors to socket handles. When not defining this symbol (the default), then libev will call \f(CW\*(C`_get_osfhandle\*(C'\fR, which is usually correct. In some cases, programs use their own file descriptor management, in which case they can provide this function to map fds to socket handles. .IP "\s-1EV_WIN32_HANDLE_TO_FD\s0(handle)" 4 .IX Item "EV_WIN32_HANDLE_TO_FD(handle)" If \f(CW\*(C`EV_SELECT_IS_WINSOCKET\*(C'\fR then libev maps handles to file descriptors using the standard \f(CW\*(C`_open_osfhandle\*(C'\fR function. For programs implementing their own fd to handle mapping, overwriting this function makes it easier to do so. This can be done by defining this macro to an appropriate value. .IP "\s-1EV_WIN32_CLOSE_FD\s0(fd)" 4 .IX Item "EV_WIN32_CLOSE_FD(fd)" If programs implement their own fd to handle mapping on win32, then this macro can be used to override the \f(CW\*(C`close\*(C'\fR function, useful to unregister file descriptors again. Note that the replacement function has to close the underlying \s-1OS\s0 handle. .IP "\s-1EV_USE_WSASOCKET\s0" 4 .IX Item "EV_USE_WSASOCKET" If defined to be \f(CW1\fR, libev will use \f(CW\*(C`WSASocket\*(C'\fR to create its internal communication socket, which works better in some environments. Otherwise, the normal \f(CW\*(C`socket\*(C'\fR function will be used, which works better in other environments. .IP "\s-1EV_USE_POLL\s0" 4 .IX Item "EV_USE_POLL" If defined to be \f(CW1\fR, libev will compile in support for the \f(CW\*(C`poll\*(C'\fR(2) backend. Otherwise it will be enabled on non\-win32 platforms. It takes precedence over select. .IP "\s-1EV_USE_EPOLL\s0" 4 .IX Item "EV_USE_EPOLL" If defined to be \f(CW1\fR, libev will compile in support for the Linux \&\f(CW\*(C`epoll\*(C'\fR(7) backend. Its availability will be detected at runtime, otherwise another method will be used as fallback. This is the preferred backend for GNU/Linux systems. If undefined, it will be enabled if the headers indicate GNU/Linux + Glibc 2.4 or newer, otherwise disabled. .IP "\s-1EV_USE_KQUEUE\s0" 4 .IX Item "EV_USE_KQUEUE" If defined to be \f(CW1\fR, libev will compile in support for the \s-1BSD\s0 style \&\f(CW\*(C`kqueue\*(C'\fR(2) backend. Its actual availability will be detected at runtime, otherwise another method will be used as fallback. This is the preferred backend for \s-1BSD\s0 and BSD-like systems, although on most BSDs kqueue only supports some types of fds correctly (the only platform we found that supports ptys for example was NetBSD), so kqueue might be compiled in, but not be used unless explicitly requested. The best way to use it is to find out whether kqueue supports your type of fd properly and use an embedded kqueue loop. .IP "\s-1EV_USE_PORT\s0" 4 .IX Item "EV_USE_PORT" If defined to be \f(CW1\fR, libev will compile in support for the Solaris 10 port style backend. Its availability will be detected at runtime, otherwise another method will be used as fallback. This is the preferred backend for Solaris 10 systems. .IP "\s-1EV_USE_DEVPOLL\s0" 4 .IX Item "EV_USE_DEVPOLL" Reserved for future expansion, works like the \s-1USE\s0 symbols above. .IP "\s-1EV_USE_INOTIFY\s0" 4 .IX Item "EV_USE_INOTIFY" If defined to be \f(CW1\fR, libev will compile in support for the Linux inotify interface to speed up \f(CW\*(C`ev_stat\*(C'\fR watchers. Its actual availability will be detected at runtime. If undefined, it will be enabled if the headers indicate GNU/Linux + Glibc 2.4 or newer, otherwise disabled. .IP "\s-1EV_NO_SMP\s0" 4 .IX Item "EV_NO_SMP" If defined to be \f(CW1\fR, libev will assume that memory is always coherent between threads, that is, threads can be used, but threads never run on different cpus (or different cpu cores). This reduces dependencies and makes libev faster. .IP "\s-1EV_NO_THREADS\s0" 4 .IX Item "EV_NO_THREADS" If defined to be \f(CW1\fR, libev will assume that it will never be called from different threads, which is a stronger assumption than \f(CW\*(C`EV_NO_SMP\*(C'\fR, above. This reduces dependencies and makes libev faster. .IP "\s-1EV_ATOMIC_T\s0" 4 .IX Item "EV_ATOMIC_T" Libev requires an integer type (suitable for storing \f(CW0\fR or \f(CW1\fR) whose access is atomic and serialised with respect to other threads or signal contexts. No such type is easily found in the C language, so you can provide your own type that you know is safe for your purposes. It is used both for signal handler \*(L"locking\*(R" as well as for signal and thread safety in \f(CW\*(C`ev_async\*(C'\fR watchers. .Sp In the absence of this define, libev will use \f(CW\*(C`sig_atomic_t volatile\*(C'\fR (from \fIsignal.h\fR), which is usually good enough on most platforms, although strictly speaking using a type that also implies a memory fence is required. .IP "\s-1EV_H\s0 (h)" 4 .IX Item "EV_H (h)" The name of the \fIev.h\fR header file used to include it. The default if undefined is \f(CW"ev.h"\fR in \fIevent.h\fR, \fIev.c\fR and \fIev++.h\fR. This can be used to virtually rename the \fIev.h\fR header file in case of conflicts. .IP "\s-1EV_CONFIG_H\s0 (h)" 4 .IX Item "EV_CONFIG_H (h)" If \f(CW\*(C`EV_STANDALONE\*(C'\fR isn't \f(CW1\fR, this variable can be used to override \&\fIev.c\fR's idea of where to find the \fIconfig.h\fR file, similarly to \&\f(CW\*(C`EV_H\*(C'\fR, above. .IP "\s-1EV_EVENT_H\s0 (h)" 4 .IX Item "EV_EVENT_H (h)" Similarly to \f(CW\*(C`EV_H\*(C'\fR, this macro can be used to override \fIevent.c\fR's idea of how the \fIevent.h\fR header can be found, the default is \f(CW"event.h"\fR. .IP "\s-1EV_PROTOTYPES\s0 (h)" 4 .IX Item "EV_PROTOTYPES (h)" If defined to be \f(CW0\fR, then \fIev.h\fR will not define any function prototypes, but still define all the structs and other symbols. This is occasionally useful if you want to provide your own wrapper functions around libev functions. .IP "\s-1EV_MULTIPLICITY\s0" 4 .IX Item "EV_MULTIPLICITY" If undefined or defined to \f(CW1\fR, then all event-loop-specific functions will have the \f(CW\*(C`struct ev_loop *\*(C'\fR as first argument, and you can create additional independent event loops. Otherwise there will be no support for multiple event loops and there is no first event loop pointer argument. Instead, all functions act on the single default loop. .Sp Note that \f(CW\*(C`EV_DEFAULT\*(C'\fR and \f(CW\*(C`EV_DEFAULT_\*(C'\fR will no longer provide a default loop when multiplicity is switched off \- you always have to initialise the loop manually in this case. .IP "\s-1EV_MINPRI\s0" 4 .IX Item "EV_MINPRI" .PD 0 .IP "\s-1EV_MAXPRI\s0" 4 .IX Item "EV_MAXPRI" .PD The range of allowed priorities. \f(CW\*(C`EV_MINPRI\*(C'\fR must be smaller or equal to \&\f(CW\*(C`EV_MAXPRI\*(C'\fR, but otherwise there are no non-obvious limitations. You can provide for more priorities by overriding those symbols (usually defined to be \f(CW\*(C`\-2\*(C'\fR and \f(CW2\fR, respectively). .Sp When doing priority-based operations, libev usually has to linearly search all the priorities, so having many of them (hundreds) uses a lot of space and time, so using the defaults of five priorities (\-2 .. +2) is usually fine. .Sp If your embedding application does not need any priorities, defining these both to \f(CW0\fR will save some memory and \s-1CPU\s0. .IP "\s-1EV_PERIODIC_ENABLE\s0, \s-1EV_IDLE_ENABLE\s0, \s-1EV_EMBED_ENABLE\s0, \s-1EV_STAT_ENABLE\s0, \s-1EV_PREPARE_ENABLE\s0, \s-1EV_CHECK_ENABLE\s0, \s-1EV_FORK_ENABLE\s0, \s-1EV_SIGNAL_ENABLE\s0, \s-1EV_ASYNC_ENABLE\s0, \s-1EV_CHILD_ENABLE\s0." 4 .IX Item "EV_PERIODIC_ENABLE, EV_IDLE_ENABLE, EV_EMBED_ENABLE, EV_STAT_ENABLE, EV_PREPARE_ENABLE, EV_CHECK_ENABLE, EV_FORK_ENABLE, EV_SIGNAL_ENABLE, EV_ASYNC_ENABLE, EV_CHILD_ENABLE." If undefined or defined to be \f(CW1\fR (and the platform supports it), then the respective watcher type is supported. If defined to be \f(CW0\fR, then it is not. Disabling watcher types mainly saves code size. .IP "\s-1EV_FEATURES\s0" 4 .IX Item "EV_FEATURES" If you need to shave off some kilobytes of code at the expense of some speed (but with the full \s-1API\s0), you can define this symbol to request certain subsets of functionality. The default is to enable all features that can be enabled on the platform. .Sp A typical way to use this symbol is to define it to \f(CW0\fR (or to a bitset with some broad features you want) and then selectively re-enable additional parts you want, for example if you want everything minimal, but multiple event loop support, async and child watchers and the poll backend, use this: .Sp .Vb 5 \& #define EV_FEATURES 0 \& #define EV_MULTIPLICITY 1 \& #define EV_USE_POLL 1 \& #define EV_CHILD_ENABLE 1 \& #define EV_ASYNC_ENABLE 1 .Ve .Sp The actual value is a bitset, it can be a combination of the following values (by default, all of these are enabled): .RS 4 .ie n .IP "1 \- faster/larger code" 4 .el .IP "\f(CW1\fR \- faster/larger code" 4 .IX Item "1 - faster/larger code" Use larger code to speed up some operations. .Sp Currently this is used to override some inlining decisions (enlarging the code size by roughly 30% on amd64). .Sp When optimising for size, use of compiler flags such as \f(CW\*(C`\-Os\*(C'\fR with gcc is recommended, as well as \f(CW\*(C`\-DNDEBUG\*(C'\fR, as libev contains a number of assertions. .Sp The default is off when \f(CW\*(C`_\|_OPTIMIZE_SIZE_\|_\*(C'\fR is defined by your compiler (e.g. gcc with \f(CW\*(C`\-Os\*(C'\fR). .ie n .IP "2 \- faster/larger data structures" 4 .el .IP "\f(CW2\fR \- faster/larger data structures" 4 .IX Item "2 - faster/larger data structures" Replaces the small 2\-heap for timer management by a faster 4\-heap, larger hash table sizes and so on. This will usually further increase code size and can additionally have an effect on the size of data structures at runtime. .Sp The default is off when \f(CW\*(C`_\|_OPTIMIZE_SIZE_\|_\*(C'\fR is defined by your compiler (e.g. gcc with \f(CW\*(C`\-Os\*(C'\fR). .ie n .IP "4 \- full \s-1API\s0 configuration" 4 .el .IP "\f(CW4\fR \- full \s-1API\s0 configuration" 4 .IX Item "4 - full API configuration" This enables priorities (sets \f(CW\*(C`EV_MAXPRI\*(C'\fR=2 and \f(CW\*(C`EV_MINPRI\*(C'\fR=\-2), and enables multiplicity (\f(CW\*(C`EV_MULTIPLICITY\*(C'\fR=1). .ie n .IP "8 \- full \s-1API\s0" 4 .el .IP "\f(CW8\fR \- full \s-1API\s0" 4 .IX Item "8 - full API" This enables a lot of the \*(L"lesser used\*(R" \s-1API\s0 functions. See \f(CW\*(C`ev.h\*(C'\fR for details on which parts of the \s-1API\s0 are still available without this feature, and do not complain if this subset changes over time. .ie n .IP "16 \- enable all optional watcher types" 4 .el .IP "\f(CW16\fR \- enable all optional watcher types" 4 .IX Item "16 - enable all optional watcher types" Enables all optional watcher types. If you want to selectively enable only some watcher types other than I/O and timers (e.g. prepare, embed, async, child...) you can enable them manually by defining \&\f(CW\*(C`EV_watchertype_ENABLE\*(C'\fR to \f(CW1\fR instead. .ie n .IP "32 \- enable all backends" 4 .el .IP "\f(CW32\fR \- enable all backends" 4 .IX Item "32 - enable all backends" This enables all backends \- without this feature, you need to enable at least one backend manually (\f(CW\*(C`EV_USE_SELECT\*(C'\fR is a good choice). .ie n .IP "64 \- enable OS-specific ""helper"" APIs" 4 .el .IP "\f(CW64\fR \- enable OS-specific ``helper'' APIs" 4 .IX Item "64 - enable OS-specific helper APIs" Enable inotify, eventfd, signalfd and similar OS-specific helper APIs by default. .RE .RS 4 .Sp Compiling with \f(CW\*(C`gcc \-Os \-DEV_STANDALONE \-DEV_USE_EPOLL=1 \-DEV_FEATURES=0\*(C'\fR reduces the compiled size of libev from 24.7Kb code/2.8Kb data to 6.5Kb code/0.3Kb data on my GNU/Linux amd64 system, while still giving you I/O watchers, timers and monotonic clock support. .Sp With an intelligent-enough linker (gcc+binutils are intelligent enough when you use \f(CW\*(C`\-Wl,\-\-gc\-sections \-ffunction\-sections\*(C'\fR) functions unused by your program might be left out as well \- a binary starting a timer and an I/O watcher then might come out at only 5Kb. .RE .IP "\s-1EV_API_STATIC\s0" 4 .IX Item "EV_API_STATIC" If this symbol is defined (by default it is not), then all identifiers will have static linkage. This means that libev will not export any identifiers, and you cannot link against libev anymore. This can be useful when you embed libev, only want to use libev functions in a single file, and do not want its identifiers to be visible. .Sp To use this, define \f(CW\*(C`EV_API_STATIC\*(C'\fR and include \fIev.c\fR in the file that wants to use libev. .Sp This option only works when libev is compiled with a C compiler, as \*(C+ doesn't support the required declaration syntax. .IP "\s-1EV_AVOID_STDIO\s0" 4 .IX Item "EV_AVOID_STDIO" If this is set to \f(CW1\fR at compiletime, then libev will avoid using stdio functions (printf, scanf, perror etc.). This will increase the code size somewhat, but if your program doesn't otherwise depend on stdio and your libc allows it, this avoids linking in the stdio library which is quite big. .Sp Note that error messages might become less precise when this option is enabled. .IP "\s-1EV_NSIG\s0" 4 .IX Item "EV_NSIG" The highest supported signal number, +1 (or, the number of signals): Normally, libev tries to deduce the maximum number of signals automatically, but sometimes this fails, in which case it can be specified. Also, using a lower number than detected (\f(CW32\fR should be good for about any system in existence) can save some memory, as libev statically allocates some 12\-24 bytes per signal number. .IP "\s-1EV_PID_HASHSIZE\s0" 4 .IX Item "EV_PID_HASHSIZE" \&\f(CW\*(C`ev_child\*(C'\fR watchers use a small hash table to distribute workload by pid. The default size is \f(CW16\fR (or \f(CW1\fR with \f(CW\*(C`EV_FEATURES\*(C'\fR disabled), usually more than enough. If you need to manage thousands of children you might want to increase this value (\fImust\fR be a power of two). .IP "\s-1EV_INOTIFY_HASHSIZE\s0" 4 .IX Item "EV_INOTIFY_HASHSIZE" \&\f(CW\*(C`ev_stat\*(C'\fR watchers use a small hash table to distribute workload by inotify watch id. The default size is \f(CW16\fR (or \f(CW1\fR with \f(CW\*(C`EV_FEATURES\*(C'\fR disabled), usually more than enough. If you need to manage thousands of \&\f(CW\*(C`ev_stat\*(C'\fR watchers you might want to increase this value (\fImust\fR be a power of two). .IP "\s-1EV_USE_4HEAP\s0" 4 .IX Item "EV_USE_4HEAP" Heaps are not very cache-efficient. To improve the cache-efficiency of the timer and periodics heaps, libev uses a 4\-heap when this symbol is defined to \f(CW1\fR. The 4\-heap uses more complicated (longer) code but has noticeably faster performance with many (thousands) of watchers. .Sp The default is \f(CW1\fR, unless \f(CW\*(C`EV_FEATURES\*(C'\fR overrides it, in which case it will be \f(CW0\fR. .IP "\s-1EV_HEAP_CACHE_AT\s0" 4 .IX Item "EV_HEAP_CACHE_AT" Heaps are not very cache-efficient. To improve the cache-efficiency of the timer and periodics heaps, libev can cache the timestamp (\fIat\fR) within the heap structure (selected by defining \f(CW\*(C`EV_HEAP_CACHE_AT\*(C'\fR to \f(CW1\fR), which uses 8\-12 bytes more per watcher and a few hundred bytes more code, but avoids random read accesses on heap changes. This improves performance noticeably with many (hundreds) of watchers. .Sp The default is \f(CW1\fR, unless \f(CW\*(C`EV_FEATURES\*(C'\fR overrides it, in which case it will be \f(CW0\fR. .IP "\s-1EV_VERIFY\s0" 4 .IX Item "EV_VERIFY" Controls how much internal verification (see \f(CW\*(C`ev_verify ()\*(C'\fR) will be done: If set to \f(CW0\fR, no internal verification code will be compiled in. If set to \f(CW1\fR, then verification code will be compiled in, but not called. If set to \f(CW2\fR, then the internal verification code will be called once per loop, which can slow down libev. If set to \f(CW3\fR, then the verification code will be called very frequently, which will slow down libev considerably. .Sp The default is \f(CW1\fR, unless \f(CW\*(C`EV_FEATURES\*(C'\fR overrides it, in which case it will be \f(CW0\fR. .IP "\s-1EV_COMMON\s0" 4 .IX Item "EV_COMMON" By default, all watchers have a \f(CW\*(C`void *data\*(C'\fR member. By redefining this macro to something else you can include more and other types of members. You have to define it each time you include one of the files, though, and it must be identical each time. .Sp For example, the perl \s-1EV\s0 module uses something like this: .Sp .Vb 3 \& #define EV_COMMON \e \& SV *self; /* contains this struct */ \e \& SV *cb_sv, *fh /* note no trailing ";" */ .Ve .IP "\s-1EV_CB_DECLARE\s0 (type)" 4 .IX Item "EV_CB_DECLARE (type)" .PD 0 .IP "\s-1EV_CB_INVOKE\s0 (watcher, revents)" 4 .IX Item "EV_CB_INVOKE (watcher, revents)" .IP "ev_set_cb (ev, cb)" 4 .IX Item "ev_set_cb (ev, cb)" .PD Can be used to change the callback member declaration in each watcher, and the way callbacks are invoked and set. Must expand to a struct member definition and a statement, respectively. See the \fIev.h\fR header file for their default definitions. One possible use for overriding these is to avoid the \f(CW\*(C`struct ev_loop *\*(C'\fR as first argument in all cases, or to use method calls instead of plain function calls in \*(C+. .SS "\s-1EXPORTED\s0 \s-1API\s0 \s-1SYMBOLS\s0" .IX Subsection "EXPORTED API SYMBOLS" If you need to re-export the \s-1API\s0 (e.g. via a \s-1DLL\s0) and you need a list of exported symbols, you can use the provided \fISymbol.*\fR files which list all public symbols, one per line: .PP .Vb 2 \& Symbols.ev for libev proper \& Symbols.event for the libevent emulation .Ve .PP This can also be used to rename all public symbols to avoid clashes with multiple versions of libev linked together (which is obviously bad in itself, but sometimes it is inconvenient to avoid this). .PP A sed command like this will create wrapper \f(CW\*(C`#define\*(C'\fR's that you need to include before including \fIev.h\fR: .PP .Vb 1 \& wrap.h .Ve .PP This would create a file \fIwrap.h\fR which essentially looks like this: .PP .Vb 4 \& #define ev_backend myprefix_ev_backend \& #define ev_check_start myprefix_ev_check_start \& #define ev_check_stop myprefix_ev_check_stop \& ... .Ve .SS "\s-1EXAMPLES\s0" .IX Subsection "EXAMPLES" For a real-world example of a program the includes libev verbatim, you can have a look at the \s-1EV\s0 perl module (). It has the libev files in the \fIlibev/\fR subdirectory and includes them in the \fI\s-1EV/EVAPI\s0.h\fR (public interface) and \fI\s-1EV\s0.xs\fR (implementation) files. Only the \fI\s-1EV\s0.xs\fR file will be compiled. It is pretty complex because it provides its own header file. .PP The usage in rxvt-unicode is simpler. It has a \fIev_cpp.h\fR header file that everybody includes and which overrides some configure choices: .PP .Vb 8 \& #define EV_FEATURES 8 \& #define EV_USE_SELECT 1 \& #define EV_PREPARE_ENABLE 1 \& #define EV_IDLE_ENABLE 1 \& #define EV_SIGNAL_ENABLE 1 \& #define EV_CHILD_ENABLE 1 \& #define EV_USE_STDEXCEPT 0 \& #define EV_CONFIG_H \& \& #include "ev++.h" .Ve .PP And a \fIev_cpp.C\fR implementation file that contains libev proper and is compiled: .PP .Vb 2 \& #include "ev_cpp.h" \& #include "ev.c" .Ve .SH "INTERACTION WITH OTHER PROGRAMS, LIBRARIES OR THE ENVIRONMENT" .IX Header "INTERACTION WITH OTHER PROGRAMS, LIBRARIES OR THE ENVIRONMENT" .SS "\s-1THREADS\s0 \s-1AND\s0 \s-1COROUTINES\s0" .IX Subsection "THREADS AND COROUTINES" \fI\s-1THREADS\s0\fR .IX Subsection "THREADS" .PP All libev functions are reentrant and thread-safe unless explicitly documented otherwise, but libev implements no locking itself. This means that you can use as many loops as you want in parallel, as long as there are no concurrent calls into any libev function with the same loop parameter (\f(CW\*(C`ev_default_*\*(C'\fR calls have an implicit default loop parameter, of course): libev guarantees that different event loops share no data structures that need any locking. .PP Or to put it differently: calls with different loop parameters can be done concurrently from multiple threads, calls with the same loop parameter must be done serially (but can be done from different threads, as long as only one thread ever is inside a call at any point in time, e.g. by using a mutex per loop). .PP Specifically to support threads (and signal handlers), libev implements so-called \f(CW\*(C`ev_async\*(C'\fR watchers, which allow some limited form of concurrency on the same event loop, namely waking it up \*(L"from the outside\*(R". .PP If you want to know which design (one loop, locking, or multiple loops without or something else still) is best for your problem, then I cannot help you, but here is some generic advice: .IP "\(bu" 4 most applications have a main thread: use the default libev loop in that thread, or create a separate thread running only the default loop. .Sp This helps integrating other libraries or software modules that use libev themselves and don't care/know about threading. .IP "\(bu" 4 one loop per thread is usually a good model. .Sp Doing this is almost never wrong, sometimes a better-performance model exists, but it is always a good start. .IP "\(bu" 4 other models exist, such as the leader/follower pattern, where one loop is handed through multiple threads in a kind of round-robin fashion. .Sp Choosing a model is hard \- look around, learn, know that usually you can do better than you currently do :\-) .IP "\(bu" 4 often you need to talk to some other thread which blocks in the event loop. .Sp \&\f(CW\*(C`ev_async\*(C'\fR watchers can be used to wake them up from other threads safely (or from signal contexts...). .Sp An example use would be to communicate signals or other events that only work in the default loop by registering the signal watcher with the default loop and triggering an \f(CW\*(C`ev_async\*(C'\fR watcher from the default loop watcher callback into the event loop interested in the signal. .PP See also \*(L"\s-1THREAD\s0 \s-1LOCKING\s0 \s-1EXAMPLE\s0\*(R". .PP \fI\s-1COROUTINES\s0\fR .IX Subsection "COROUTINES" .PP Libev is very accommodating to coroutines (\*(L"cooperative threads\*(R"): libev fully supports nesting calls to its functions from different coroutines (e.g. you can call \f(CW\*(C`ev_run\*(C'\fR on the same loop from two different coroutines, and switch freely between both coroutines running the loop, as long as you don't confuse yourself). The only exception is that you must not do this from \f(CW\*(C`ev_periodic\*(C'\fR reschedule callbacks. .PP Care has been taken to ensure that libev does not keep local state inside \&\f(CW\*(C`ev_run\*(C'\fR, and other calls do not usually allow for coroutine switches as they do not call any callbacks. .SS "\s-1COMPILER\s0 \s-1WARNINGS\s0" .IX Subsection "COMPILER WARNINGS" Depending on your compiler and compiler settings, you might get no or a lot of warnings when compiling libev code. Some people are apparently scared by this. .PP However, these are unavoidable for many reasons. For one, each compiler has different warnings, and each user has different tastes regarding warning options. \*(L"Warn-free\*(R" code therefore cannot be a goal except when targeting a specific compiler and compiler-version. .PP Another reason is that some compiler warnings require elaborate workarounds, or other changes to the code that make it less clear and less maintainable. .PP And of course, some compiler warnings are just plain stupid, or simply wrong (because they don't actually warn about the condition their message seems to warn about). For example, certain older gcc versions had some warnings that resulted in an extreme number of false positives. These have been fixed, but some people still insist on making code warn-free with such buggy versions. .PP While libev is written to generate as few warnings as possible, \&\*(L"warn-free\*(R" code is not a goal, and it is recommended not to build libev with any compiler warnings enabled unless you are prepared to cope with them (e.g. by ignoring them). Remember that warnings are just that: warnings, not errors, or proof of bugs. .SS "\s-1VALGRIND\s0" .IX Subsection "VALGRIND" Valgrind has a special section here because it is a popular tool that is highly useful. Unfortunately, valgrind reports are very hard to interpret. .PP If you think you found a bug (memory leak, uninitialised data access etc.) in libev, then check twice: If valgrind reports something like: .PP .Vb 3 \& ==2274== definitely lost: 0 bytes in 0 blocks. \& ==2274== possibly lost: 0 bytes in 0 blocks. \& ==2274== still reachable: 256 bytes in 1 blocks. .Ve .PP Then there is no memory leak, just as memory accounted to global variables is not a memleak \- the memory is still being referenced, and didn't leak. .PP Similarly, under some circumstances, valgrind might report kernel bugs as if it were a bug in libev (e.g. in realloc or in the poll backend, although an acceptable workaround has been found here), or it might be confused. .PP Keep in mind that valgrind is a very good tool, but only a tool. Don't make it into some kind of religion. .PP If you are unsure about something, feel free to contact the mailing list with the full valgrind report and an explanation on why you think this is a bug in libev (best check the archives, too :). However, don't be annoyed when you get a brisk \*(L"this is no bug\*(R" answer and take the chance of learning how to interpret valgrind properly. .PP If you need, for some reason, empty reports from valgrind for your project I suggest using suppression lists. .SH "PORTABILITY NOTES" .IX Header "PORTABILITY NOTES" .SS "\s-1GNU/LINUX\s0 32 \s-1BIT\s0 \s-1LIMITATIONS\s0" .IX Subsection "GNU/LINUX 32 BIT LIMITATIONS" GNU/Linux is the only common platform that supports 64 bit file/large file interfaces but \fIdisables\fR them by default. .PP That means that libev compiled in the default environment doesn't support files larger than 2GiB or so, which mainly affects \f(CW\*(C`ev_stat\*(C'\fR watchers. .PP Unfortunately, many programs try to work around this GNU/Linux issue by enabling the large file \s-1API\s0, which makes them incompatible with the standard libev compiled for their system. .PP Likewise, libev cannot enable the large file \s-1API\s0 itself as this would suddenly make it incompatible to the default compile time environment, i.e. all programs not using special compile switches. .SS "\s-1OS/X\s0 \s-1AND\s0 \s-1DARWIN\s0 \s-1BUGS\s0" .IX Subsection "OS/X AND DARWIN BUGS" The whole thing is a bug if you ask me \- basically any system interface you touch is broken, whether it is locales, poll, kqueue or even the OpenGL drivers. .PP \fI\f(CI\*(C`kqueue\*(C'\fI is buggy\fR .IX Subsection "kqueue is buggy" .PP The kqueue syscall is broken in all known versions \- most versions support only sockets, many support pipes. .PP Libev tries to work around this by not using \f(CW\*(C`kqueue\*(C'\fR by default on this rotten platform, but of course you can still ask for it when creating a loop \- embedding a socket-only kqueue loop into a select-based one is probably going to work well. .PP \fI\f(CI\*(C`poll\*(C'\fI is buggy\fR .IX Subsection "poll is buggy" .PP Instead of fixing \f(CW\*(C`kqueue\*(C'\fR, Apple replaced their (working) \f(CW\*(C`poll\*(C'\fR implementation by something calling \f(CW\*(C`kqueue\*(C'\fR internally around the 10.5.6 release, so now \f(CW\*(C`kqueue\*(C'\fR \fIand\fR \f(CW\*(C`poll\*(C'\fR are broken. .PP Libev tries to work around this by not using \f(CW\*(C`poll\*(C'\fR by default on this rotten platform, but of course you can still ask for it when creating a loop. .PP \fI\f(CI\*(C`select\*(C'\fI is buggy\fR .IX Subsection "select is buggy" .PP All that's left is \f(CW\*(C`select\*(C'\fR, and of course Apple found a way to fuck this one up as well: On \s-1OS/X\s0, \f(CW\*(C`select\*(C'\fR actively limits the number of file descriptors you can pass in to 1024 \- your program suddenly crashes when you use more. .PP There is an undocumented \*(L"workaround\*(R" for this \- defining \&\f(CW\*(C`_DARWIN_UNLIMITED_SELECT\*(C'\fR, which libev tries to use, so select \fIshould\fR work on \s-1OS/X\s0. .SS "\s-1SOLARIS\s0 \s-1PROBLEMS\s0 \s-1AND\s0 \s-1WORKAROUNDS\s0" .IX Subsection "SOLARIS PROBLEMS AND WORKAROUNDS" \fI\f(CI\*(C`errno\*(C'\fI reentrancy\fR .IX Subsection "errno reentrancy" .PP The default compile environment on Solaris is unfortunately so thread-unsafe that you can't even use components/libraries compiled without \f(CW\*(C`\-D_REENTRANT\*(C'\fR in a threaded program, which, of course, isn't defined by default. A valid, if stupid, implementation choice. .PP If you want to use libev in threaded environments you have to make sure it's compiled with \f(CW\*(C`_REENTRANT\*(C'\fR defined. .PP \fIEvent port backend\fR .IX Subsection "Event port backend" .PP The scalable event interface for Solaris is called \*(L"event ports\*(R". Unfortunately, this mechanism is very buggy in all major releases. If you run into high \s-1CPU\s0 usage, your program freezes or you get a large number of spurious wakeups, make sure you have all the relevant and latest kernel patches applied. No, I don't know which ones, but there are multiple ones to apply, and afterwards, event ports actually work great. .PP If you can't get it to work, you can try running the program by setting the environment variable \f(CW\*(C`LIBEV_FLAGS=3\*(C'\fR to only allow \f(CW\*(C`poll\*(C'\fR and \&\f(CW\*(C`select\*(C'\fR backends. .SS "\s-1AIX\s0 \s-1POLL\s0 \s-1BUG\s0" .IX Subsection "AIX POLL BUG" \&\s-1AIX\s0 unfortunately has a broken \f(CW\*(C`poll.h\*(C'\fR header. Libev works around this by trying to avoid the poll backend altogether (i.e. it's not even compiled in), which normally isn't a big problem as \f(CW\*(C`select\*(C'\fR works fine with large bitsets on \s-1AIX\s0, and \s-1AIX\s0 is dead anyway. .SS "\s-1WIN32\s0 \s-1PLATFORM\s0 \s-1LIMITATIONS\s0 \s-1AND\s0 \s-1WORKAROUNDS\s0" .IX Subsection "WIN32 PLATFORM LIMITATIONS AND WORKAROUNDS" \fIGeneral issues\fR .IX Subsection "General issues" .PP Win32 doesn't support any of the standards (e.g. \s-1POSIX\s0) that libev requires, and its I/O model is fundamentally incompatible with the \s-1POSIX\s0 model. Libev still offers limited functionality on this platform in the form of the \f(CW\*(C`EVBACKEND_SELECT\*(C'\fR backend, and only supports socket descriptors. This only applies when using Win32 natively, not when using e.g. cygwin. Actually, it only applies to the microsofts own compilers, as every compiler comes with a slightly differently broken/incompatible environment. .PP Lifting these limitations would basically require the full re-implementation of the I/O system. If you are into this kind of thing, then note that glib does exactly that for you in a very portable way (note also that glib is the slowest event library known to man). .PP There is no supported compilation method available on windows except embedding it into other applications. .PP Sensible signal handling is officially unsupported by Microsoft \- libev tries its best, but under most conditions, signals will simply not work. .PP Not a libev limitation but worth mentioning: windows apparently doesn't accept large writes: instead of resulting in a partial write, windows will either accept everything or return \f(CW\*(C`ENOBUFS\*(C'\fR if the buffer is too large, so make sure you only write small amounts into your sockets (less than a megabyte seems safe, but this apparently depends on the amount of memory available). .PP Due to the many, low, and arbitrary limits on the win32 platform and the abysmal performance of winsockets, using a large number of sockets is not recommended (and not reasonable). If your program needs to use more than a hundred or so sockets, then likely it needs to use a totally different implementation for windows, as libev offers the \s-1POSIX\s0 readiness notification model, which cannot be implemented efficiently on windows (due to Microsoft monopoly games). .PP A typical way to use libev under windows is to embed it (see the embedding section for details) and use the following \fIevwrap.h\fR header file instead of \fIev.h\fR: .PP .Vb 2 \& #define EV_STANDALONE /* keeps ev from requiring config.h */ \& #define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */ \& \& #include "ev.h" .Ve .PP And compile the following \fIevwrap.c\fR file into your project (make sure you do \fInot\fR compile the \fIev.c\fR or any other embedded source files!): .PP .Vb 2 \& #include "evwrap.h" \& #include "ev.c" .Ve .PP \fIThe winsocket \f(CI\*(C`select\*(C'\fI function\fR .IX Subsection "The winsocket select function" .PP The winsocket \f(CW\*(C`select\*(C'\fR function doesn't follow \s-1POSIX\s0 in that it requires socket \fIhandles\fR and not socket \fIfile descriptors\fR (it is also extremely buggy). This makes select very inefficient, and also requires a mapping from file descriptors to socket handles (the Microsoft C runtime provides the function \f(CW\*(C`_open_osfhandle\*(C'\fR for this). See the discussion of the \f(CW\*(C`EV_SELECT_USE_FD_SET\*(C'\fR, \f(CW\*(C`EV_SELECT_IS_WINSOCKET\*(C'\fR and \&\f(CW\*(C`EV_FD_TO_WIN32_HANDLE\*(C'\fR preprocessor symbols for more info. .PP The configuration for a \*(L"naked\*(R" win32 using the Microsoft runtime libraries and raw winsocket select is: .PP .Vb 2 \& #define EV_USE_SELECT 1 \& #define EV_SELECT_IS_WINSOCKET 1 /* forces EV_SELECT_USE_FD_SET, too */ .Ve .PP Note that winsockets handling of fd sets is O(n), so you can easily get a complexity in the O(nA\*^X) range when using win32. .PP \fILimited number of file descriptors\fR .IX Subsection "Limited number of file descriptors" .PP Windows has numerous arbitrary (and low) limits on things. .PP Early versions of winsocket's select only supported waiting for a maximum of \f(CW64\fR handles (probably owning to the fact that all windows kernels can only wait for \f(CW64\fR things at the same time internally; Microsoft recommends spawning a chain of threads and wait for 63 handles and the previous thread in each. Sounds great!). .PP Newer versions support more handles, but you need to define \f(CW\*(C`FD_SETSIZE\*(C'\fR to some high number (e.g. \f(CW2048\fR) before compiling the winsocket select call (which might be in libev or elsewhere, for example, perl and many other interpreters do their own select emulation on windows). .PP Another limit is the number of file descriptors in the Microsoft runtime libraries, which by default is \f(CW64\fR (there must be a hidden \fI64\fR fetish or something like this inside Microsoft). You can increase this by calling \f(CW\*(C`_setmaxstdio\*(C'\fR, which can increase this limit to \f(CW2048\fR (another arbitrary limit), but is broken in many versions of the Microsoft runtime libraries. This might get you to about \f(CW512\fR or \f(CW2048\fR sockets (depending on windows version and/or the phase of the moon). To get more, you need to wrap all I/O functions and provide your own fd management, but the cost of calling select (O(nA\*^X)) will likely make this unworkable. .SS "\s-1PORTABILITY\s0 \s-1REQUIREMENTS\s0" .IX Subsection "PORTABILITY REQUIREMENTS" In addition to a working ISO-C implementation and of course the backend-specific APIs, libev relies on a few additional extensions: .ie n .IP """void (*)(ev_watcher_type *, int revents)"" must have compatible calling conventions regardless of ""ev_watcher_type *""." 4 .el .IP "\f(CWvoid (*)(ev_watcher_type *, int revents)\fR must have compatible calling conventions regardless of \f(CWev_watcher_type *\fR." 4 .IX Item "void (*)(ev_watcher_type *, int revents) must have compatible calling conventions regardless of ev_watcher_type *." Libev assumes not only that all watcher pointers have the same internal structure (guaranteed by \s-1POSIX\s0 but not by \s-1ISO\s0 C for example), but it also assumes that the same (machine) code can be used to call any watcher callback: The watcher callbacks have different type signatures, but libev calls them using an \f(CW\*(C`ev_watcher *\*(C'\fR internally. .IP "pointer accesses must be thread-atomic" 4 .IX Item "pointer accesses must be thread-atomic" Accessing a pointer value must be atomic, it must both be readable and writable in one piece \- this is the case on all current architectures. .ie n .IP """sig_atomic_t volatile"" must be thread-atomic as well" 4 .el .IP "\f(CWsig_atomic_t volatile\fR must be thread-atomic as well" 4 .IX Item "sig_atomic_t volatile must be thread-atomic as well" The type \f(CW\*(C`sig_atomic_t volatile\*(C'\fR (or whatever is defined as \&\f(CW\*(C`EV_ATOMIC_T\*(C'\fR) must be atomic with respect to accesses from different threads. This is not part of the specification for \f(CW\*(C`sig_atomic_t\*(C'\fR, but is believed to be sufficiently portable. .ie n .IP """sigprocmask"" must work in a threaded environment" 4 .el .IP "\f(CWsigprocmask\fR must work in a threaded environment" 4 .IX Item "sigprocmask must work in a threaded environment" Libev uses \f(CW\*(C`sigprocmask\*(C'\fR to temporarily block signals. This is not allowed in a threaded program (\f(CW\*(C`pthread_sigmask\*(C'\fR has to be used). Typical pthread implementations will either allow \f(CW\*(C`sigprocmask\*(C'\fR in the \*(L"main thread\*(R" or will block signals process-wide, both behaviours would be compatible with libev. Interaction between \f(CW\*(C`sigprocmask\*(C'\fR and \&\f(CW\*(C`pthread_sigmask\*(C'\fR could complicate things, however. .Sp The most portable way to handle signals is to block signals in all threads except the initial one, and run the default loop in the initial thread as well. .ie n .IP """long"" must be large enough for common memory allocation sizes" 4 .el .IP "\f(CWlong\fR must be large enough for common memory allocation sizes" 4 .IX Item "long must be large enough for common memory allocation sizes" To improve portability and simplify its \s-1API\s0, libev uses \f(CW\*(C`long\*(C'\fR internally instead of \f(CW\*(C`size_t\*(C'\fR when allocating its data structures. On non-POSIX systems (Microsoft...) this might be unexpectedly low, but is still at least 31 bits everywhere, which is enough for hundreds of millions of watchers. .ie n .IP """double"" must hold a time value in seconds with enough accuracy" 4 .el .IP "\f(CWdouble\fR must hold a time value in seconds with enough accuracy" 4 .IX Item "double must hold a time value in seconds with enough accuracy" The type \f(CW\*(C`double\*(C'\fR is used to represent timestamps. It is required to have at least 51 bits of mantissa (and 9 bits of exponent), which is good enough for at least into the year 4000 with millisecond accuracy (the design goal for libev). This requirement is overfulfilled by implementations using \s-1IEEE\s0 754, which is basically all existing ones. .Sp With \s-1IEEE\s0 754 doubles, you get microsecond accuracy until at least the year 2255 (and millisecond accuracy till the year 287396 \- by then, libev is either obsolete or somebody patched it to use \f(CW\*(C`long double\*(C'\fR or something like that, just kidding). .PP If you know of other additional requirements drop me a note. .SH "ALGORITHMIC COMPLEXITIES" .IX Header "ALGORITHMIC COMPLEXITIES" In this section the complexities of (many of) the algorithms used inside libev will be documented. For complexity discussions about backends see the documentation for \f(CW\*(C`ev_default_init\*(C'\fR. .PP All of the following are about amortised time: If an array needs to be extended, libev needs to realloc and move the whole array, but this happens asymptotically rarer with higher number of elements, so O(1) might mean that libev does a lengthy realloc operation in rare cases, but on average it is much faster and asymptotically approaches constant time. .IP "Starting and stopping timer/periodic watchers: O(log skipped_other_timers)" 4 .IX Item "Starting and stopping timer/periodic watchers: O(log skipped_other_timers)" This means that, when you have a watcher that triggers in one hour and there are 100 watchers that would trigger before that, then inserting will have to skip roughly seven (\f(CW\*(C`ld 100\*(C'\fR) of these watchers. .IP "Changing timer/periodic watchers (by autorepeat or calling again): O(log skipped_other_timers)" 4 .IX Item "Changing timer/periodic watchers (by autorepeat or calling again): O(log skipped_other_timers)" That means that changing a timer costs less than removing/adding them, as only the relative motion in the event queue has to be paid for. .IP "Starting io/check/prepare/idle/signal/child/fork/async watchers: O(1)" 4 .IX Item "Starting io/check/prepare/idle/signal/child/fork/async watchers: O(1)" These just add the watcher into an array or at the head of a list. .IP "Stopping check/prepare/idle/fork/async watchers: O(1)" 4 .IX Item "Stopping check/prepare/idle/fork/async watchers: O(1)" .PD 0 .IP "Stopping an io/signal/child watcher: O(number_of_watchers_for_this_(fd/signal/pid % \s-1EV_PID_HASHSIZE\s0))" 4 .IX Item "Stopping an io/signal/child watcher: O(number_of_watchers_for_this_(fd/signal/pid % EV_PID_HASHSIZE))" .PD These watchers are stored in lists, so they need to be walked to find the correct watcher to remove. The lists are usually short (you don't usually have many watchers waiting for the same fd or signal: one is typical, two is rare). .IP "Finding the next timer in each loop iteration: O(1)" 4 .IX Item "Finding the next timer in each loop iteration: O(1)" By virtue of using a binary or 4\-heap, the next timer is always found at a fixed position in the storage array. .IP "Each change on a file descriptor per loop iteration: O(number_of_watchers_for_this_fd)" 4 .IX Item "Each change on a file descriptor per loop iteration: O(number_of_watchers_for_this_fd)" A change means an I/O watcher gets started or stopped, which requires libev to recalculate its status (and possibly tell the kernel, depending on backend and whether \f(CW\*(C`ev_io_set\*(C'\fR was used). .IP "Activating one watcher (putting it into the pending state): O(1)" 4 .IX Item "Activating one watcher (putting it into the pending state): O(1)" .PD 0 .IP "Priority handling: O(number_of_priorities)" 4 .IX Item "Priority handling: O(number_of_priorities)" .PD Priorities are implemented by allocating some space for each priority. When doing priority-based operations, libev usually has to linearly search all the priorities, but starting/stopping and activating watchers becomes O(1) with respect to priority handling. .IP "Sending an ev_async: O(1)" 4 .IX Item "Sending an ev_async: O(1)" .PD 0 .IP "Processing ev_async_send: O(number_of_async_watchers)" 4 .IX Item "Processing ev_async_send: O(number_of_async_watchers)" .IP "Processing signals: O(max_signal_number)" 4 .IX Item "Processing signals: O(max_signal_number)" .PD Sending involves a system call \fIiff\fR there were no other \f(CW\*(C`ev_async_send\*(C'\fR calls in the current loop iteration and the loop is currently blocked. Checking for async and signal events involves iterating over all running async watchers or all signal numbers. .SH "PORTING FROM LIBEV 3.X TO 4.X" .IX Header "PORTING FROM LIBEV 3.X TO 4.X" The major version 4 introduced some incompatible changes to the \s-1API\s0. .PP At the moment, the \f(CW\*(C`ev.h\*(C'\fR header file provides compatibility definitions for all changes, so most programs should still compile. The compatibility layer might be removed in later versions of libev, so better update to the new \s-1API\s0 early than late. .ie n .IP """EV_COMPAT3"" backwards compatibility mechanism" 4 .el .IP "\f(CWEV_COMPAT3\fR backwards compatibility mechanism" 4 .IX Item "EV_COMPAT3 backwards compatibility mechanism" The backward compatibility mechanism can be controlled by \&\f(CW\*(C`EV_COMPAT3\*(C'\fR. See \*(L"\s-1PREPROCESSOR\s0 \s-1SYMBOLS/MACROS\s0\*(R" in the \*(L"\s-1EMBEDDING\s0\*(R" section. .ie n .IP """ev_default_destroy"" and ""ev_default_fork"" have been removed" 4 .el .IP "\f(CWev_default_destroy\fR and \f(CWev_default_fork\fR have been removed" 4 .IX Item "ev_default_destroy and ev_default_fork have been removed" These calls can be replaced easily by their \f(CW\*(C`ev_loop_xxx\*(C'\fR counterparts: .Sp .Vb 2 \& ev_loop_destroy (EV_DEFAULT_UC); \& ev_loop_fork (EV_DEFAULT); .Ve .IP "function/symbol renames" 4 .IX Item "function/symbol renames" A number of functions and symbols have been renamed: .Sp .Vb 3 \& ev_loop => ev_run \& EVLOOP_NONBLOCK => EVRUN_NOWAIT \& EVLOOP_ONESHOT => EVRUN_ONCE \& \& ev_unloop => ev_break \& EVUNLOOP_CANCEL => EVBREAK_CANCEL \& EVUNLOOP_ONE => EVBREAK_ONE \& EVUNLOOP_ALL => EVBREAK_ALL \& \& EV_TIMEOUT => EV_TIMER \& \& ev_loop_count => ev_iteration \& ev_loop_depth => ev_depth \& ev_loop_verify => ev_verify .Ve .Sp Most functions working on \f(CW\*(C`struct ev_loop\*(C'\fR objects don't have an \&\f(CW\*(C`ev_loop_\*(C'\fR prefix, so it was removed; \f(CW\*(C`ev_loop\*(C'\fR, \f(CW\*(C`ev_unloop\*(C'\fR and associated constants have been renamed to not collide with the \f(CW\*(C`struct ev_loop\*(C'\fR anymore and \f(CW\*(C`EV_TIMER\*(C'\fR now follows the same naming scheme as all other watcher types. Note that \f(CW\*(C`ev_loop_fork\*(C'\fR is still called \&\f(CW\*(C`ev_loop_fork\*(C'\fR because it would otherwise clash with the \f(CW\*(C`ev_fork\*(C'\fR typedef. .ie n .IP """EV_MINIMAL"" mechanism replaced by ""EV_FEATURES""" 4 .el .IP "\f(CWEV_MINIMAL\fR mechanism replaced by \f(CWEV_FEATURES\fR" 4 .IX Item "EV_MINIMAL mechanism replaced by EV_FEATURES" The preprocessor symbol \f(CW\*(C`EV_MINIMAL\*(C'\fR has been replaced by a different mechanism, \f(CW\*(C`EV_FEATURES\*(C'\fR. Programs using \f(CW\*(C`EV_MINIMAL\*(C'\fR usually compile and work, but the library code will of course be larger. .SH "GLOSSARY" .IX Header "GLOSSARY" .IP "active" 4 .IX Item "active" A watcher is active as long as it has been started and not yet stopped. See \*(L"\s-1WATCHER\s0 \s-1STATES\s0\*(R" for details. .IP "application" 4 .IX Item "application" In this document, an application is whatever is using libev. .IP "backend" 4 .IX Item "backend" The part of the code dealing with the operating system interfaces. .IP "callback" 4 .IX Item "callback" The address of a function that is called when some event has been detected. Callbacks are being passed the event loop, the watcher that received the event, and the actual event bitset. .IP "callback/watcher invocation" 4 .IX Item "callback/watcher invocation" The act of calling the callback associated with a watcher. .IP "event" 4 .IX Item "event" A change of state of some external event, such as data now being available for reading on a file descriptor, time having passed or simply not having any other events happening anymore. .Sp In libev, events are represented as single bits (such as \f(CW\*(C`EV_READ\*(C'\fR or \&\f(CW\*(C`EV_TIMER\*(C'\fR). .IP "event library" 4 .IX Item "event library" A software package implementing an event model and loop. .IP "event loop" 4 .IX Item "event loop" An entity that handles and processes external events and converts them into callback invocations. .IP "event model" 4 .IX Item "event model" The model used to describe how an event loop handles and processes watchers and events. .IP "pending" 4 .IX Item "pending" A watcher is pending as soon as the corresponding event has been detected. See \*(L"\s-1WATCHER\s0 \s-1STATES\s0\*(R" for details. .IP "real time" 4 .IX Item "real time" The physical time that is observed. It is apparently strictly monotonic :) .IP "wall-clock time" 4 .IX Item "wall-clock time" The time and date as shown on clocks. Unlike real time, it can actually be wrong and jump forwards and backwards, e.g. when you adjust your clock. .IP "watcher" 4 .IX Item "watcher" A data structure that describes interest in certain events. Watchers need to be started (attached to an event loop) before they can receive events. .SH "AUTHOR" .IX Header "AUTHOR" Marc Lehmann , with repeated corrections by Mikael Magnusson and Emanuele Giaquinta, and minor corrections by many others. tarantool-1.5.1.218.g1a69fd6/third_party/libev/Makefile.in0000664000000000000000000006232412202131537021462 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure config.guess \ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libev.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libev_la_LIBADD = am_libev_la_OBJECTS = ev.lo event.lo libev_la_OBJECTS = $(am_libev_la_OBJECTS) libev_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libev_la_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libev_la_SOURCES) DIST_SOURCES = $(libev_la_SOURCES) man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign VERSION_INFO = 4:0:0 EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ ev_vars.h ev_wrap.h \ ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ ev.3 ev.pod man_MANS = ev.3 include_HEADERS = ev.h ev++.h event.h lib_LTLIBRARIES = libev.la libev_la_SOURCES = ev.c event.c libev_la_LDFLAGS = -version-info $(VERSION_INFO) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libev.la: $(libev_la_OBJECTS) $(libev_la_DEPENDENCIES) $(libev_la_LINK) -rpath $(libdir) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-man3: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list=''; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(MANS) $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-man uninstall-man: uninstall-man3 .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-man3 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-man uninstall-man3 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tarantool-1.5.1.218.g1a69fd6/third_party/libev/event.h0000664000000000000000000001415412202131537020705 0ustar rootroot/* * libevent compatibility header, only core events supported * * Copyright (c) 2007,2008,2010,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef EVENT_H_ #define EVENT_H_ #ifdef EV_H # include EV_H #else # include "ev.h" #endif #ifndef EVLOOP_NONBLOCK # define EVLOOP_NONBLOCK EVRUN_NOWAIT #endif #ifndef EVLOOP_ONESHOT # define EVLOOP_ONESHOT EVRUN_ONCE #endif #ifndef EV_TIMEOUT # define EV_TIMEOUT EV_TIMER #endif #ifdef __cplusplus extern "C" { #endif /* we need sys/time.h for struct timeval only */ #if !defined (WIN32) || defined (__MINGW32__) # include /* mingw seems to need this, for whatever reason */ # include #endif struct event_base; #define EVLIST_TIMEOUT 0x01 #define EVLIST_INSERTED 0x02 #define EVLIST_SIGNAL 0x04 #define EVLIST_ACTIVE 0x08 #define EVLIST_INTERNAL 0x10 #define EVLIST_INIT 0x80 typedef void (*event_callback_fn)(int, short, void *); struct event { /* libev watchers we map onto */ union { struct ev_io io; struct ev_signal sig; } iosig; struct ev_timer to; /* compatibility slots */ struct event_base *ev_base; event_callback_fn ev_callback; void *ev_arg; int ev_fd; int ev_pri; int ev_res; int ev_flags; short ev_events; }; event_callback_fn event_get_callback (const struct event *ev); #define EV_READ EV_READ #define EV_WRITE EV_WRITE #define EV_PERSIST 0x10 #define EV_ET 0x20 /* nop */ #define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd) #define EVENT_FD(ev) ((int) (ev)->ev_fd) #define event_initialized(ev) ((ev)->ev_flags & EVLIST_INIT) #define evtimer_add(ev,tv) event_add (ev, tv) #define evtimer_set(ev,cb,data) event_set (ev, -1, 0, cb, data) #define evtimer_del(ev) event_del (ev) #define evtimer_pending(ev,tv) event_pending (ev, EV_TIMEOUT, tv) #define evtimer_initialized(ev) event_initialized (ev) #define timeout_add(ev,tv) evtimer_add (ev, tv) #define timeout_set(ev,cb,data) evtimer_set (ev, cb, data) #define timeout_del(ev) evtimer_del (ev) #define timeout_pending(ev,tv) evtimer_pending (ev, tv) #define timeout_initialized(ev) evtimer_initialized (ev) #define signal_add(ev,tv) event_add (ev, tv) #define signal_set(ev,sig,cb,data) event_set (ev, sig, EV_SIGNAL | EV_PERSIST, cb, data) #define signal_del(ev) event_del (ev) #define signal_pending(ev,tv) event_pending (ev, EV_SIGNAL, tv) #define signal_initialized(ev) event_initialized (ev) const char *event_get_version (void); const char *event_get_method (void); void *event_init (void); void event_base_free (struct event_base *base); #define EVLOOP_ONCE EVLOOP_ONESHOT int event_loop (int); int event_loopexit (struct timeval *tv); int event_dispatch (void); #define _EVENT_LOG_DEBUG 0 #define _EVENT_LOG_MSG 1 #define _EVENT_LOG_WARN 2 #define _EVENT_LOG_ERR 3 typedef void (*event_log_cb)(int severity, const char *msg); void event_set_log_callback(event_log_cb cb); void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg); int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); int event_add (struct event *ev, struct timeval *tv); int event_del (struct event *ev); void event_active (struct event *ev, int res, short ncalls); /* ncalls is being ignored */ int event_pending (struct event *ev, short, struct timeval *tv); int event_priority_init (int npri); int event_priority_set (struct event *ev, int pri); struct event_base *event_base_new (void); const char *event_base_get_method (const struct event_base *); int event_base_set (struct event_base *base, struct event *ev); int event_base_loop (struct event_base *base, int); int event_base_loopexit (struct event_base *base, struct timeval *tv); int event_base_dispatch (struct event_base *base); int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); int event_base_priority_init (struct event_base *base, int fd); /* next line is different in the libevent+libev version */ /*libevent-include*/ #ifdef __cplusplus } #endif #endif tarantool-1.5.1.218.g1a69fd6/third_party/libev/libev.m40000664000000000000000000000304612202131537020754 0ustar rootrootdnl this file is part of libev, do not make local modifications dnl http://software.schmorp.de/pkg/libev dnl libev support AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h) AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd) AC_CHECK_FUNCS(clock_gettime, [], [ dnl on linux, try syscall wrapper first if test $(uname) = Linux; then AC_MSG_CHECKING(for clock_gettime syscall) AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include #include #include ], [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])], [ac_have_clock_syscall=1 AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, Define to 1 to use the syscall interface for clock_gettime) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then AC_CHECK_LIB(rt, clock_gettime) unset ac_cv_func_clock_gettime AC_CHECK_FUNCS(clock_gettime) fi ]) AC_CHECK_FUNCS(nanosleep, [], [ if test -z "$LIBEV_M4_AVOID_LIBRT"; then AC_CHECK_LIB(rt, nanosleep) unset ac_cv_func_nanosleep AC_CHECK_FUNCS(nanosleep) fi ]) if test -z "$LIBEV_M4_AVOID_LIBM"; then LIBM=m fi AC_SEARCH_LIBS(floor, $LIBM, [AC_DEFINE(HAVE_FLOOR, 1, Define to 1 if the floor function is available)]) tarantool-1.5.1.218.g1a69fd6/third_party/libev/config.h.in0000664000000000000000000000634512202131537021441 0ustar rootroot/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* "use syscall interface for clock_gettime" */ #undef HAVE_CLOCK_SYSCALL /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `epoll_ctl' function. */ #undef HAVE_EPOLL_CTL /* Define to 1 if you have the `eventfd' function. */ #undef HAVE_EVENTFD /* Define to 1 if you have the `inotify_init' function. */ #undef HAVE_INOTIFY_INIT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `kqueue' function. */ #undef HAVE_KQUEUE /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H /* Define to 1 if you have the `port_create' function. */ #undef HAVE_PORT_CREATE /* Define to 1 if you have the header file. */ #undef HAVE_PORT_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `signalfd' function. */ #undef HAVE_SIGNALFD /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EPOLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENTFD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INOTIFY_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SIGNALFD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev_wrap.h0000664000000000000000000001265612202131537021234 0ustar rootroot/* DO NOT EDIT, automatically generated by update_ev_wrap */ #ifndef EV_WRAP_H #define EV_WRAP_H #define acquire_cb ((loop)->acquire_cb) #define activecnt ((loop)->activecnt) #define anfdmax ((loop)->anfdmax) #define anfds ((loop)->anfds) #define async_pending ((loop)->async_pending) #define asynccnt ((loop)->asynccnt) #define asyncmax ((loop)->asyncmax) #define asyncs ((loop)->asyncs) #define backend ((loop)->backend) #define backend_fd ((loop)->backend_fd) #define backend_mintime ((loop)->backend_mintime) #define backend_modify ((loop)->backend_modify) #define backend_poll ((loop)->backend_poll) #define checkcnt ((loop)->checkcnt) #define checkmax ((loop)->checkmax) #define checks ((loop)->checks) #define cleanupcnt ((loop)->cleanupcnt) #define cleanupmax ((loop)->cleanupmax) #define cleanups ((loop)->cleanups) #define curpid ((loop)->curpid) #define epoll_epermcnt ((loop)->epoll_epermcnt) #define epoll_epermmax ((loop)->epoll_epermmax) #define epoll_eperms ((loop)->epoll_eperms) #define epoll_eventmax ((loop)->epoll_eventmax) #define epoll_events ((loop)->epoll_events) #define evfd ((loop)->evfd) #define evpipe ((loop)->evpipe) #define fdchangecnt ((loop)->fdchangecnt) #define fdchangemax ((loop)->fdchangemax) #define fdchanges ((loop)->fdchanges) #define forkcnt ((loop)->forkcnt) #define forkmax ((loop)->forkmax) #define forks ((loop)->forks) #define fs_2625 ((loop)->fs_2625) #define fs_fd ((loop)->fs_fd) #define fs_hash ((loop)->fs_hash) #define fs_w ((loop)->fs_w) #define idleall ((loop)->idleall) #define idlecnt ((loop)->idlecnt) #define idlemax ((loop)->idlemax) #define idles ((loop)->idles) #define invoke_cb ((loop)->invoke_cb) #define io_blocktime ((loop)->io_blocktime) #define iocp ((loop)->iocp) #define kqueue_changecnt ((loop)->kqueue_changecnt) #define kqueue_changemax ((loop)->kqueue_changemax) #define kqueue_changes ((loop)->kqueue_changes) #define kqueue_eventmax ((loop)->kqueue_eventmax) #define kqueue_events ((loop)->kqueue_events) #define kqueue_fd_pid ((loop)->kqueue_fd_pid) #define loop_count ((loop)->loop_count) #define loop_depth ((loop)->loop_depth) #define loop_done ((loop)->loop_done) #define mn_now ((loop)->mn_now) #define now_floor ((loop)->now_floor) #define origflags ((loop)->origflags) #define pending_w ((loop)->pending_w) #define pendingcnt ((loop)->pendingcnt) #define pendingmax ((loop)->pendingmax) #define pendingpri ((loop)->pendingpri) #define pendings ((loop)->pendings) #define periodiccnt ((loop)->periodiccnt) #define periodicmax ((loop)->periodicmax) #define periodics ((loop)->periodics) #define pipe_w ((loop)->pipe_w) #define pipe_write_skipped ((loop)->pipe_write_skipped) #define pipe_write_wanted ((loop)->pipe_write_wanted) #define pollcnt ((loop)->pollcnt) #define pollidxmax ((loop)->pollidxmax) #define pollidxs ((loop)->pollidxs) #define pollmax ((loop)->pollmax) #define polls ((loop)->polls) #define port_eventmax ((loop)->port_eventmax) #define port_events ((loop)->port_events) #define postfork ((loop)->postfork) #define preparecnt ((loop)->preparecnt) #define preparemax ((loop)->preparemax) #define prepares ((loop)->prepares) #define release_cb ((loop)->release_cb) #define rfeedcnt ((loop)->rfeedcnt) #define rfeedmax ((loop)->rfeedmax) #define rfeeds ((loop)->rfeeds) #define rtmn_diff ((loop)->rtmn_diff) #define sig_pending ((loop)->sig_pending) #define sigfd ((loop)->sigfd) #define sigfd_set ((loop)->sigfd_set) #define sigfd_w ((loop)->sigfd_w) #define timeout_blocktime ((loop)->timeout_blocktime) #define timercnt ((loop)->timercnt) #define timermax ((loop)->timermax) #define timers ((loop)->timers) #define userdata ((loop)->userdata) #define vec_eo ((loop)->vec_eo) #define vec_max ((loop)->vec_max) #define vec_ri ((loop)->vec_ri) #define vec_ro ((loop)->vec_ro) #define vec_wi ((loop)->vec_wi) #define vec_wo ((loop)->vec_wo) #else #undef EV_WRAP_H #undef acquire_cb #undef activecnt #undef anfdmax #undef anfds #undef async_pending #undef asynccnt #undef asyncmax #undef asyncs #undef backend #undef backend_fd #undef backend_mintime #undef backend_modify #undef backend_poll #undef checkcnt #undef checkmax #undef checks #undef cleanupcnt #undef cleanupmax #undef cleanups #undef curpid #undef epoll_epermcnt #undef epoll_epermmax #undef epoll_eperms #undef epoll_eventmax #undef epoll_events #undef evfd #undef evpipe #undef fdchangecnt #undef fdchangemax #undef fdchanges #undef forkcnt #undef forkmax #undef forks #undef fs_2625 #undef fs_fd #undef fs_hash #undef fs_w #undef idleall #undef idlecnt #undef idlemax #undef idles #undef invoke_cb #undef io_blocktime #undef iocp #undef kqueue_changecnt #undef kqueue_changemax #undef kqueue_changes #undef kqueue_eventmax #undef kqueue_events #undef kqueue_fd_pid #undef loop_count #undef loop_depth #undef loop_done #undef mn_now #undef now_floor #undef origflags #undef pending_w #undef pendingcnt #undef pendingmax #undef pendingpri #undef pendings #undef periodiccnt #undef periodicmax #undef periodics #undef pipe_w #undef pipe_write_skipped #undef pipe_write_wanted #undef pollcnt #undef pollidxmax #undef pollidxs #undef pollmax #undef polls #undef port_eventmax #undef port_events #undef postfork #undef preparecnt #undef preparemax #undef prepares #undef release_cb #undef rfeedcnt #undef rfeedmax #undef rfeeds #undef rtmn_diff #undef sig_pending #undef sigfd #undef sigfd_set #undef sigfd_w #undef timeout_blocktime #undef timercnt #undef timermax #undef timers #undef userdata #undef vec_eo #undef vec_max #undef vec_ri #undef vec_ro #undef vec_wi #undef vec_wo #endif tarantool-1.5.1.218.g1a69fd6/third_party/libev/event_compat.h0000664000000000000000000001643112202131537022250 0ustar rootroot/* * Copyright (c) 2000-2004 Niels Provos * Copyright (c) 2008 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # include # undef WIN32_LEAN_AND_MEAN typedef unsigned char u_char; typedef unsigned short u_short; #else # include # include # include #endif #include /* Fix so that ppl dont have to run with */ #ifndef TAILQ_ENTRY #define _EVENT_DEFINED_TQENTRY #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ } #endif /* !TAILQ_ENTRY */ #ifndef RB_ENTRY #define _EVENT_DEFINED_RBENTRY #define RB_ENTRY(type) \ struct { \ struct type *rbe_left; /* left element */ \ struct type *rbe_right; /* right element */ \ struct type *rbe_parent; /* parent element */ \ int rbe_color; /* node color */ \ } #endif /* !RB_ENTRY */ /* * Key-Value pairs. Can be used for HTTP headers but also for * query argument parsing. */ struct evkeyval { TAILQ_ENTRY(evkeyval) next; char *key; char *value; }; #ifdef _EVENT_DEFINED_TQENTRY #undef TAILQ_ENTRY struct event_list; struct evkeyvalq; #undef _EVENT_DEFINED_TQENTRY #else TAILQ_HEAD (event_list, event); TAILQ_HEAD (evkeyvalq, evkeyval); #endif /* _EVENT_DEFINED_TQENTRY */ #ifdef _EVENT_DEFINED_RBENTRY #undef RB_ENTRY #undef _EVENT_DEFINED_RBENTRY #endif /* _EVENT_DEFINED_RBENTRY */ struct eventop { char *name; void *(*init)(struct event_base *); int (*add)(void *, struct event *); int (*del)(void *, struct event *); int (*recalc)(struct event_base *, void *, int); int (*dispatch)(struct event_base *, void *, struct timeval *); void (*dealloc)(struct event_base *, void *); }; /* These functions deal with buffering input and output */ struct evbuffer { u_char *buffer; u_char *orig_buffer; size_t misalign; size_t totallen; size_t off; void (*cb)(struct evbuffer *, size_t, size_t, void *); void *cbarg; }; /* Just for error reporting - use other constants otherwise */ #define EVBUFFER_READ 0x01 #define EVBUFFER_WRITE 0x02 #define EVBUFFER_EOF 0x10 #define EVBUFFER_ERROR 0x20 #define EVBUFFER_TIMEOUT 0x40 struct bufferevent; typedef void (*evbuffercb)(struct bufferevent *, void *); typedef void (*everrorcb)(struct bufferevent *, short what, void *); struct event_watermark { size_t low; size_t high; }; struct bufferevent { struct event ev_read; struct event ev_write; struct evbuffer *input; struct evbuffer *output; struct event_watermark wm_read; struct event_watermark wm_write; evbuffercb readcb; evbuffercb writecb; everrorcb errorcb; void *cbarg; int timeout_read; /* in seconds */ int timeout_write; /* in seconds */ short enabled; /* events that are currently enabled */ }; struct bufferevent *bufferevent_new(int fd, evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg); int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev); int bufferevent_priority_set(struct bufferevent *bufev, int pri); void bufferevent_free(struct bufferevent *bufev); int bufferevent_write(struct bufferevent *bufev, const void *data, size_t size); int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf); size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size); int bufferevent_enable(struct bufferevent *bufev, short event); int bufferevent_disable(struct bufferevent *bufev, short event); void bufferevent_settimeout(struct bufferevent *bufev, int timeout_read, int timeout_write); #define EVBUFFER_LENGTH(x) (x)->off #define EVBUFFER_DATA(x) (x)->buffer #define EVBUFFER_INPUT(x) (x)->input #define EVBUFFER_OUTPUT(x) (x)->output struct evbuffer *evbuffer_new(void); void evbuffer_free(struct evbuffer *); int evbuffer_expand(struct evbuffer *, size_t); int evbuffer_add(struct evbuffer *, const void *, size_t); int evbuffer_remove(struct evbuffer *, void *, size_t); char *evbuffer_readline(struct evbuffer *); int evbuffer_add_buffer(struct evbuffer *, struct evbuffer *); int evbuffer_add_printf(struct evbuffer *, const char *fmt, ...); int evbuffer_add_vprintf(struct evbuffer *, const char *fmt, va_list ap); void evbuffer_drain(struct evbuffer *, size_t); int evbuffer_write(struct evbuffer *, int); int evbuffer_read(struct evbuffer *, int, int); u_char *evbuffer_find(struct evbuffer *, const u_char *, size_t); void evbuffer_setcb(struct evbuffer *, void (*)(struct evbuffer *, size_t, size_t, void *), void *); /* * Marshaling tagged data - We assume that all tags are inserted in their * numeric order - so that unknown tags will always be higher than the * known ones - and we can just ignore the end of an event buffer. */ void evtag_init(void); void evtag_marshal(struct evbuffer *evbuf, uint32_t tag, const void *data, uint32_t len); void encode_int(struct evbuffer *evbuf, uint32_t number); void evtag_marshal_int(struct evbuffer *evbuf, uint32_t tag, uint32_t integer); void evtag_marshal_string(struct evbuffer *buf, uint32_t tag, const char *string); void evtag_marshal_timeval(struct evbuffer *evbuf, uint32_t tag, struct timeval *tv); int evtag_unmarshal(struct evbuffer *src, uint32_t *ptag, struct evbuffer *dst); int evtag_peek(struct evbuffer *evbuf, uint32_t *ptag); int evtag_peek_length(struct evbuffer *evbuf, uint32_t *plength); int evtag_payload_length(struct evbuffer *evbuf, uint32_t *plength); int evtag_consume(struct evbuffer *evbuf); int evtag_unmarshal_int(struct evbuffer *evbuf, uint32_t need_tag, uint32_t *pinteger); int evtag_unmarshal_fixed(struct evbuffer *src, uint32_t need_tag, void *data, size_t len); int evtag_unmarshal_string(struct evbuffer *evbuf, uint32_t need_tag, char **pstring); int evtag_unmarshal_timeval(struct evbuffer *evbuf, uint32_t need_tag, struct timeval *ptv); #ifdef __cplusplus } #endif tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev.c0000664000000000000000000033373212202131537020177 0ustar rootroot/* * libev event processing core, watcher management * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ /* this big block deduces configuration from config.h */ #ifndef EV_STANDALONE # ifdef EV_CONFIG_H # include EV_CONFIG_H # else # include "config.h" # endif #if HAVE_FLOOR # ifndef EV_USE_FLOOR # define EV_USE_FLOOR 1 # endif #endif # if HAVE_CLOCK_SYSCALL # ifndef EV_USE_CLOCK_SYSCALL # define EV_USE_CLOCK_SYSCALL 1 # ifndef EV_USE_REALTIME # define EV_USE_REALTIME 0 # endif # ifndef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 1 # endif # endif # elif !defined EV_USE_CLOCK_SYSCALL # define EV_USE_CLOCK_SYSCALL 0 # endif # if HAVE_CLOCK_GETTIME # ifndef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 1 # endif # ifndef EV_USE_REALTIME # define EV_USE_REALTIME 0 # endif # else # ifndef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 0 # endif # ifndef EV_USE_REALTIME # define EV_USE_REALTIME 0 # endif # endif # if HAVE_NANOSLEEP # ifndef EV_USE_NANOSLEEP # define EV_USE_NANOSLEEP EV_FEATURE_OS # endif # else # undef EV_USE_NANOSLEEP # define EV_USE_NANOSLEEP 0 # endif # if HAVE_SELECT && HAVE_SYS_SELECT_H # ifndef EV_USE_SELECT # define EV_USE_SELECT EV_FEATURE_BACKENDS # endif # else # undef EV_USE_SELECT # define EV_USE_SELECT 0 # endif # if HAVE_POLL && HAVE_POLL_H # ifndef EV_USE_POLL # define EV_USE_POLL EV_FEATURE_BACKENDS # endif # else # undef EV_USE_POLL # define EV_USE_POLL 0 # endif # if HAVE_EPOLL_CTL && HAVE_SYS_EPOLL_H # ifndef EV_USE_EPOLL # define EV_USE_EPOLL EV_FEATURE_BACKENDS # endif # else # undef EV_USE_EPOLL # define EV_USE_EPOLL 0 # endif # if HAVE_KQUEUE && HAVE_SYS_EVENT_H # ifndef EV_USE_KQUEUE # define EV_USE_KQUEUE EV_FEATURE_BACKENDS # endif # else # undef EV_USE_KQUEUE # define EV_USE_KQUEUE 0 # endif # if HAVE_PORT_H && HAVE_PORT_CREATE # ifndef EV_USE_PORT # define EV_USE_PORT EV_FEATURE_BACKENDS # endif # else # undef EV_USE_PORT # define EV_USE_PORT 0 # endif # if HAVE_INOTIFY_INIT && HAVE_SYS_INOTIFY_H # ifndef EV_USE_INOTIFY # define EV_USE_INOTIFY EV_FEATURE_OS # endif # else # undef EV_USE_INOTIFY # define EV_USE_INOTIFY 0 # endif # if HAVE_SIGNALFD && HAVE_SYS_SIGNALFD_H # ifndef EV_USE_SIGNALFD # define EV_USE_SIGNALFD EV_FEATURE_OS # endif # else # undef EV_USE_SIGNALFD # define EV_USE_SIGNALFD 0 # endif # if HAVE_EVENTFD # ifndef EV_USE_EVENTFD # define EV_USE_EVENTFD EV_FEATURE_OS # endif # else # undef EV_USE_EVENTFD # define EV_USE_EVENTFD 0 # endif #endif #include #include #include #include #include #include #include #include #include #include #include #ifdef EV_H # include EV_H #else # include "ev.h" #endif #if EV_NO_THREADS # undef EV_NO_SMP # define EV_NO_SMP 1 # undef ECB_NO_THREADS # define ECB_NO_THREADS 1 #endif #if EV_NO_SMP # undef EV_NO_SMP # define ECB_NO_SMP 1 #endif #ifndef _WIN32 # include # include # include #else # include # define WIN32_LEAN_AND_MEAN # include # include # ifndef EV_SELECT_IS_WINSOCKET # define EV_SELECT_IS_WINSOCKET 1 # endif # undef EV_AVOID_STDIO #endif /* OS X, in its infinite idiocy, actually HARDCODES * a limit of 1024 into their select. Where people have brains, * OS X engineers apparently have a vacuum. Or maybe they were * ordered to have a vacuum, or they do anything for money. * This might help. Or not. */ #define _DARWIN_UNLIMITED_SELECT 1 /* this block tries to deduce configuration from header-defined symbols and defaults */ /* try to deduce the maximum number of signals on this platform */ #if defined EV_NSIG /* use what's provided */ #elif defined NSIG # define EV_NSIG (NSIG) #elif defined _NSIG # define EV_NSIG (_NSIG) #elif defined SIGMAX # define EV_NSIG (SIGMAX+1) #elif defined SIG_MAX # define EV_NSIG (SIG_MAX+1) #elif defined _SIG_MAX # define EV_NSIG (_SIG_MAX+1) #elif defined MAXSIG # define EV_NSIG (MAXSIG+1) #elif defined MAX_SIG # define EV_NSIG (MAX_SIG+1) #elif defined SIGARRAYSIZE # define EV_NSIG (SIGARRAYSIZE) /* Assume ary[SIGARRAYSIZE] */ #elif defined _sys_nsig # define EV_NSIG (_sys_nsig) /* Solaris 2.5 */ #else # error "unable to find value for NSIG, please report" /* to make it compile regardless, just remove the above line, */ /* but consider reporting it, too! :) */ # define EV_NSIG 65 #endif #ifndef EV_USE_FLOOR # define EV_USE_FLOOR 0 #endif #ifndef EV_USE_CLOCK_SYSCALL # if __linux && __GLIBC__ >= 2 # define EV_USE_CLOCK_SYSCALL EV_FEATURE_OS # else # define EV_USE_CLOCK_SYSCALL 0 # endif #endif #ifndef EV_USE_MONOTONIC # if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 # define EV_USE_MONOTONIC EV_FEATURE_OS # else # define EV_USE_MONOTONIC 0 # endif #endif #ifndef EV_USE_REALTIME # define EV_USE_REALTIME !EV_USE_CLOCK_SYSCALL #endif #ifndef EV_USE_NANOSLEEP # if _POSIX_C_SOURCE >= 199309L # define EV_USE_NANOSLEEP EV_FEATURE_OS # else # define EV_USE_NANOSLEEP 0 # endif #endif #ifndef EV_USE_SELECT # define EV_USE_SELECT EV_FEATURE_BACKENDS #endif #ifndef EV_USE_POLL # ifdef _WIN32 # define EV_USE_POLL 0 # else # define EV_USE_POLL EV_FEATURE_BACKENDS # endif #endif #ifndef EV_USE_EPOLL # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) # define EV_USE_EPOLL EV_FEATURE_BACKENDS # else # define EV_USE_EPOLL 0 # endif #endif #ifndef EV_USE_KQUEUE # define EV_USE_KQUEUE 0 #endif #ifndef EV_USE_PORT # define EV_USE_PORT 0 #endif #ifndef EV_USE_INOTIFY # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) # define EV_USE_INOTIFY EV_FEATURE_OS # else # define EV_USE_INOTIFY 0 # endif #endif #ifndef EV_PID_HASHSIZE # define EV_PID_HASHSIZE EV_FEATURE_DATA ? 16 : 1 #endif #ifndef EV_INOTIFY_HASHSIZE # define EV_INOTIFY_HASHSIZE EV_FEATURE_DATA ? 16 : 1 #endif #ifndef EV_USE_EVENTFD # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) # define EV_USE_EVENTFD EV_FEATURE_OS # else # define EV_USE_EVENTFD 0 # endif #endif #ifndef EV_USE_SIGNALFD # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) # define EV_USE_SIGNALFD EV_FEATURE_OS # else # define EV_USE_SIGNALFD 0 # endif #endif #if 0 /* debugging */ # define EV_VERIFY 3 # define EV_USE_4HEAP 1 # define EV_HEAP_CACHE_AT 1 #endif #ifndef EV_VERIFY # define EV_VERIFY (EV_FEATURE_API ? 1 : 0) #endif #ifndef EV_USE_4HEAP # define EV_USE_4HEAP EV_FEATURE_DATA #endif #ifndef EV_HEAP_CACHE_AT # define EV_HEAP_CACHE_AT EV_FEATURE_DATA #endif /* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */ /* which makes programs even slower. might work on other unices, too. */ #if EV_USE_CLOCK_SYSCALL # include # ifdef SYS_clock_gettime # define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) # undef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 1 # else # undef EV_USE_CLOCK_SYSCALL # define EV_USE_CLOCK_SYSCALL 0 # endif #endif /* this block fixes any misconfiguration where we know we run into trouble otherwise */ #ifdef _AIX /* AIX has a completely broken poll.h header */ # undef EV_USE_POLL # define EV_USE_POLL 0 #endif #ifndef CLOCK_MONOTONIC # undef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 0 #endif #ifndef CLOCK_REALTIME # undef EV_USE_REALTIME # define EV_USE_REALTIME 0 #endif #if !EV_STAT_ENABLE # undef EV_USE_INOTIFY # define EV_USE_INOTIFY 0 #endif #if !EV_USE_NANOSLEEP /* hp-ux has it in sys/time.h, which we unconditionally include above */ # if !defined _WIN32 && !defined __hpux # include # endif #endif #if EV_USE_INOTIFY # include # include /* some very old inotify.h headers don't have IN_DONT_FOLLOW */ # ifndef IN_DONT_FOLLOW # undef EV_USE_INOTIFY # define EV_USE_INOTIFY 0 # endif #endif #if EV_USE_EVENTFD /* our minimum requirement is glibc 2.7 which has the stub, but not the header */ # include # ifndef EFD_NONBLOCK # define EFD_NONBLOCK O_NONBLOCK # endif # ifndef EFD_CLOEXEC # ifdef O_CLOEXEC # define EFD_CLOEXEC O_CLOEXEC # else # define EFD_CLOEXEC 02000000 # endif # endif EV_CPP(extern "C") int (eventfd) (unsigned int initval, int flags); #endif #if EV_USE_SIGNALFD /* our minimum requirement is glibc 2.7 which has the stub, but not the header */ # include # ifndef SFD_NONBLOCK # define SFD_NONBLOCK O_NONBLOCK # endif # ifndef SFD_CLOEXEC # ifdef O_CLOEXEC # define SFD_CLOEXEC O_CLOEXEC # else # define SFD_CLOEXEC 02000000 # endif # endif EV_CPP (extern "C") int signalfd (int fd, const sigset_t *mask, int flags); struct signalfd_siginfo { uint32_t ssi_signo; char pad[128 - sizeof (uint32_t)]; }; #endif /**/ #if EV_VERIFY >= 3 # define EV_FREQUENT_CHECK ev_verify (EV_A) #else # define EV_FREQUENT_CHECK do { } while (0) #endif /* * This is used to work around floating point rounding problems. * This value is good at least till the year 4000. */ #define MIN_INTERVAL 0.0001220703125 /* 1/2**13, good till 4000 */ /*#define MIN_INTERVAL 0.00000095367431640625 /* 1/2**20, good till 2200 */ #define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */ #define MAX_BLOCKTIME 59.743 /* never wait longer than this time (to detect time jumps) */ #define EV_TV_SET(tv,t) do { tv.tv_sec = (long)t; tv.tv_usec = (long)((t - tv.tv_sec) * 1e6); } while (0) #define EV_TS_SET(ts,t) do { ts.tv_sec = (long)t; ts.tv_nsec = (long)((t - ts.tv_sec) * 1e9); } while (0) /* the following is ecb.h embedded into libev - use update_ev_c to update from an external copy */ /* ECB.H BEGIN */ /* * libecb - http://software.schmorp.de/pkg/libecb * * Copyright (©) 2009-2012 Marc Alexander Lehmann * Copyright (©) 2011 Emanuele Giaquinta * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ECB_H #define ECB_H /* 16 bits major, 16 bits minor */ #define ECB_VERSION 0x00010001 #ifdef _WIN32 typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed int int32_t; typedef unsigned int uint32_t; #if __GNUC__ typedef signed long long int64_t; typedef unsigned long long uint64_t; #else /* _MSC_VER || __BORLANDC__ */ typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; #endif #ifdef _WIN64 #define ECB_PTRSIZE 8 typedef uint64_t uintptr_t; typedef int64_t intptr_t; #else #define ECB_PTRSIZE 4 typedef uint32_t uintptr_t; typedef int32_t intptr_t; #endif typedef intptr_t ptrdiff_t; #else #include #if UINTMAX_MAX > 0xffffffffU #define ECB_PTRSIZE 8 #else #define ECB_PTRSIZE 4 #endif #endif /* many compilers define _GNUC_ to some versions but then only implement * what their idiot authors think are the "more important" extensions, * causing enormous grief in return for some better fake benchmark numbers. * or so. * we try to detect these and simply assume they are not gcc - if they have * an issue with that they should have done it right in the first place. */ #ifndef ECB_GCC_VERSION #if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__ #define ECB_GCC_VERSION(major,minor) 0 #else #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) #endif #endif #define ECB_C (__STDC__+0) /* this assumes that __STDC__ is either empty or a number */ #define ECB_C99 (__STDC_VERSION__ >= 199901L) #define ECB_C11 (__STDC_VERSION__ >= 201112L) #define ECB_CPP (__cplusplus+0) #define ECB_CPP11 (__cplusplus >= 201103L) /*****************************************************************************/ /* ECB_NO_THREADS - ecb is not used by multiple threads, ever */ /* ECB_NO_SMP - ecb might be used in multiple threads, but only on a single cpu */ #if ECB_NO_THREADS #define ECB_NO_SMP 1 #endif #if ECB_NO_SMP #define ECB_MEMORY_FENCE do { } while (0) #endif #ifndef ECB_MEMORY_FENCE #if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 #if __i386 || __i386__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif __amd64 || __amd64__ || __x86_64 || __x86_64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") #elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ \ || defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory") #elif defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ \ || defined __ARM_ARCH_7M__ || defined __ARM_ARCH_7R__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("dmb" : : : "memory") #elif __sparc || __sparc__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore") #elif defined __s390__ || defined __s390x__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory") #elif defined __mips__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") #elif defined __alpha__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory") #elif defined __hppa__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif defined __ia64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mf" : : : "memory") #endif #endif #endif #ifndef ECB_MEMORY_FENCE #if ECB_GCC_VERSION(4,7) /* see comment below (stdatomic.h) about the C11 memory model. */ #define ECB_MEMORY_FENCE __atomic_thread_fence (__ATOMIC_SEQ_CST) #elif defined __clang && __has_feature (cxx_atomic) /* see comment below (stdatomic.h) about the C11 memory model. */ #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST) #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__ #define ECB_MEMORY_FENCE __sync_synchronize () #elif _MSC_VER >= 1400 /* VC++ 2005 */ #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier) #define ECB_MEMORY_FENCE _ReadWriteBarrier () #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */ #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier () #elif defined _WIN32 #include #define ECB_MEMORY_FENCE MemoryBarrier () /* actually just xchg on x86... scary */ #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 #include #define ECB_MEMORY_FENCE __machine_rw_barrier () #define ECB_MEMORY_FENCE_ACQUIRE __machine_r_barrier () #define ECB_MEMORY_FENCE_RELEASE __machine_w_barrier () #elif __xlC__ #define ECB_MEMORY_FENCE __sync () #endif #endif #ifndef ECB_MEMORY_FENCE #if ECB_C11 && !defined __STDC_NO_ATOMICS__ /* we assume that these memory fences work on all variables/all memory accesses, */ /* not just C11 atomics and atomic accesses */ #include /* Unfortunately, neither gcc 4.7 nor clang 3.1 generate any instructions for */ /* any fence other than seq_cst, which isn't very efficient for us. */ /* Why that is, we don't know - either the C11 memory model is quite useless */ /* for most usages, or gcc and clang have a bug */ /* I *currently* lean towards the latter, and inefficiently implement */ /* all three of ecb's fences as a seq_cst fence */ #define ECB_MEMORY_FENCE atomic_thread_fence (memory_order_seq_cst) #endif #endif #ifndef ECB_MEMORY_FENCE #if !ECB_AVOID_PTHREADS /* * if you get undefined symbol references to pthread_mutex_lock, * or failure to find pthread.h, then you should implement * the ECB_MEMORY_FENCE operations for your cpu/compiler * OR provide pthread.h and link against the posix thread library * of your system. */ #include #define ECB_NEEDS_PTHREADS 1 #define ECB_MEMORY_FENCE_NEEDS_PTHREADS 1 static pthread_mutex_t ecb_mf_lock = PTHREAD_MUTEX_INITIALIZER; #define ECB_MEMORY_FENCE do { pthread_mutex_lock (&ecb_mf_lock); pthread_mutex_unlock (&ecb_mf_lock); } while (0) #endif #endif #if !defined ECB_MEMORY_FENCE_ACQUIRE && defined ECB_MEMORY_FENCE #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE #endif #if !defined ECB_MEMORY_FENCE_RELEASE && defined ECB_MEMORY_FENCE #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE #endif /*****************************************************************************/ #if __cplusplus #define ecb_inline static inline #elif ECB_GCC_VERSION(2,5) #define ecb_inline static __inline__ #elif ECB_C99 #define ecb_inline static inline #else #define ecb_inline static #endif #if ECB_GCC_VERSION(3,3) #define ecb_restrict __restrict__ #elif ECB_C99 #define ecb_restrict restrict #else #define ecb_restrict #endif typedef int ecb_bool; #define ECB_CONCAT_(a, b) a ## b #define ECB_CONCAT(a, b) ECB_CONCAT_(a, b) #define ECB_STRINGIFY_(a) # a #define ECB_STRINGIFY(a) ECB_STRINGIFY_(a) #define ecb_function_ ecb_inline #if ECB_GCC_VERSION(3,1) #define ecb_attribute(attrlist) __attribute__(attrlist) #define ecb_is_constant(expr) __builtin_constant_p (expr) #define ecb_expect(expr,value) __builtin_expect ((expr),(value)) #define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality) #else #define ecb_attribute(attrlist) #define ecb_is_constant(expr) 0 #define ecb_expect(expr,value) (expr) #define ecb_prefetch(addr,rw,locality) #endif /* no emulation for ecb_decltype */ #if ECB_GCC_VERSION(4,5) #define ecb_decltype(x) __decltype(x) #elif ECB_GCC_VERSION(3,0) #define ecb_decltype(x) __typeof(x) #endif #define ecb_noinline ecb_attribute ((__noinline__)) #define ecb_unused ecb_attribute ((__unused__)) #define ecb_const ecb_attribute ((__const__)) #define ecb_pure ecb_attribute ((__pure__)) #if ECB_C11 #define ecb_noreturn _Noreturn #else #define ecb_noreturn ecb_attribute ((__noreturn__)) #endif #if ECB_GCC_VERSION(4,3) #define ecb_artificial ecb_attribute ((__artificial__)) #define ecb_hot ecb_attribute ((__hot__)) #define ecb_cold ecb_attribute ((__cold__)) #else #define ecb_artificial #define ecb_hot #define ecb_cold #endif /* put around conditional expressions if you are very sure that the */ /* expression is mostly true or mostly false. note that these return */ /* booleans, not the expression. */ #define ecb_expect_false(expr) ecb_expect (!!(expr), 0) #define ecb_expect_true(expr) ecb_expect (!!(expr), 1) /* for compatibility to the rest of the world */ #define ecb_likely(expr) ecb_expect_true (expr) #define ecb_unlikely(expr) ecb_expect_false (expr) /* count trailing zero bits and count # of one bits */ #if ECB_GCC_VERSION(3,4) /* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */ #define ecb_ld32(x) (__builtin_clz (x) ^ 31) #define ecb_ld64(x) (__builtin_clzll (x) ^ 63) #define ecb_ctz32(x) __builtin_ctz (x) #define ecb_ctz64(x) __builtin_ctzll (x) #define ecb_popcount32(x) __builtin_popcount (x) /* no popcountll */ #else ecb_function_ int ecb_ctz32 (uint32_t x) ecb_const; ecb_function_ int ecb_ctz32 (uint32_t x) { int r = 0; x &= ~x + 1; /* this isolates the lowest bit */ #if ECB_branchless_on_i386 r += !!(x & 0xaaaaaaaa) << 0; r += !!(x & 0xcccccccc) << 1; r += !!(x & 0xf0f0f0f0) << 2; r += !!(x & 0xff00ff00) << 3; r += !!(x & 0xffff0000) << 4; #else if (x & 0xaaaaaaaa) r += 1; if (x & 0xcccccccc) r += 2; if (x & 0xf0f0f0f0) r += 4; if (x & 0xff00ff00) r += 8; if (x & 0xffff0000) r += 16; #endif return r; } ecb_function_ int ecb_ctz64 (uint64_t x) ecb_const; ecb_function_ int ecb_ctz64 (uint64_t x) { int shift = x & 0xffffffffU ? 0 : 32; return ecb_ctz32 (x >> shift) + shift; } ecb_function_ int ecb_popcount32 (uint32_t x) ecb_const; ecb_function_ int ecb_popcount32 (uint32_t x) { x -= (x >> 1) & 0x55555555; x = ((x >> 2) & 0x33333333) + (x & 0x33333333); x = ((x >> 4) + x) & 0x0f0f0f0f; x *= 0x01010101; return x >> 24; } ecb_function_ int ecb_ld32 (uint32_t x) ecb_const; ecb_function_ int ecb_ld32 (uint32_t x) { int r = 0; if (x >> 16) { x >>= 16; r += 16; } if (x >> 8) { x >>= 8; r += 8; } if (x >> 4) { x >>= 4; r += 4; } if (x >> 2) { x >>= 2; r += 2; } if (x >> 1) { r += 1; } return r; } ecb_function_ int ecb_ld64 (uint64_t x) ecb_const; ecb_function_ int ecb_ld64 (uint64_t x) { int r = 0; if (x >> 32) { x >>= 32; r += 32; } return r + ecb_ld32 (x); } #endif ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) ecb_const; ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); } ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) ecb_const; ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); } ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) ecb_const; ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) { return ( (x * 0x0802U & 0x22110U) | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16; } ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) ecb_const; ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) { x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1); x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2); x = ((x >> 4) & 0x0f0f) | ((x & 0x0f0f) << 4); x = ( x >> 8 ) | ( x << 8); return x; } ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) ecb_const; ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) { x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); x = ((x >> 4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) << 4); x = ((x >> 8) & 0x00ff00ff) | ((x & 0x00ff00ff) << 8); x = ( x >> 16 ) | ( x << 16); return x; } /* popcount64 is only available on 64 bit cpus as gcc builtin */ /* so for this version we are lazy */ ecb_function_ int ecb_popcount64 (uint64_t x) ecb_const; ecb_function_ int ecb_popcount64 (uint64_t x) { return ecb_popcount32 (x) + ecb_popcount32 (x >> 32); } ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) ecb_const; ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) ecb_const; ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) ecb_const; ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) ecb_const; ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) ecb_const; ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) ecb_const; ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) ecb_const; ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) ecb_const; ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); } ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); } ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); } ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); } ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); } ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); } ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); } ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); } #if ECB_GCC_VERSION(4,3) #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16) #define ecb_bswap32(x) __builtin_bswap32 (x) #define ecb_bswap64(x) __builtin_bswap64 (x) #else ecb_function_ uint16_t ecb_bswap16 (uint16_t x) ecb_const; ecb_function_ uint16_t ecb_bswap16 (uint16_t x) { return ecb_rotl16 (x, 8); } ecb_function_ uint32_t ecb_bswap32 (uint32_t x) ecb_const; ecb_function_ uint32_t ecb_bswap32 (uint32_t x) { return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16); } ecb_function_ uint64_t ecb_bswap64 (uint64_t x) ecb_const; ecb_function_ uint64_t ecb_bswap64 (uint64_t x) { return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32); } #endif #if ECB_GCC_VERSION(4,5) #define ecb_unreachable() __builtin_unreachable () #else /* this seems to work fine, but gcc always emits a warning for it :/ */ ecb_inline void ecb_unreachable (void) ecb_noreturn; ecb_inline void ecb_unreachable (void) { } #endif /* try to tell the compiler that some condition is definitely true */ #define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0) ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const; ecb_inline unsigned char ecb_byteorder_helper (void) { const uint32_t u = 0x11223344; return *(unsigned char *)&u; } ecb_inline ecb_bool ecb_big_endian (void) ecb_const; ecb_inline ecb_bool ecb_big_endian (void) { return ecb_byteorder_helper () == 0x11; } ecb_inline ecb_bool ecb_little_endian (void) ecb_const; ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; } #if ECB_GCC_VERSION(3,0) || ECB_C99 #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0)) #else #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n))) #endif #if __cplusplus template static inline T ecb_div_rd (T val, T div) { return val < 0 ? - ((-val + div - 1) / div) : (val ) / div; } template static inline T ecb_div_ru (T val, T div) { return val < 0 ? - ((-val ) / div) : (val + div - 1) / div; } #else #define ecb_div_rd(val,div) ((val) < 0 ? - ((-(val) + (div) - 1) / (div)) : ((val) ) / (div)) #define ecb_div_ru(val,div) ((val) < 0 ? - ((-(val) ) / (div)) : ((val) + (div) - 1) / (div)) #endif #if ecb_cplusplus_does_not_suck /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */ template static inline int ecb_array_length (const T (&arr)[N]) { return N; } #else #define ecb_array_length(name) (sizeof (name) / sizeof (name [0])) #endif #endif /* ECB.H END */ #if ECB_MEMORY_FENCE_NEEDS_PTHREADS /* if your architecture doesn't need memory fences, e.g. because it is * single-cpu/core, or if you use libev in a project that doesn't use libev * from multiple threads, then you can define ECB_AVOID_PTHREADS when compiling * libev, in which cases the memory fences become nops. * alternatively, you can remove this #error and link against libpthread, * which will then provide the memory fences. */ # error "memory fences not defined for your architecture, please report" #endif #ifndef ECB_MEMORY_FENCE # define ECB_MEMORY_FENCE do { } while (0) # define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE # define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE #endif #define expect_false(cond) ecb_expect_false (cond) #define expect_true(cond) ecb_expect_true (cond) #define noinline ecb_noinline #define inline_size ecb_inline #if EV_FEATURE_CODE # define inline_speed ecb_inline #else # define inline_speed static noinline #endif #define NUMPRI (EV_MAXPRI - EV_MINPRI + 1) #if EV_MINPRI == EV_MAXPRI # define ABSPRI(w) (((W)w), 0) #else # define ABSPRI(w) (((W)w)->priority - EV_MINPRI) #endif #define EMPTY /* required for microsofts broken pseudo-c compiler */ #define EMPTY2(a,b) /* used to suppress some warnings */ typedef ev_watcher *W; typedef ev_watcher_list *WL; typedef ev_watcher_time *WT; #define ev_active(w) ((W)(w))->active #define ev_at(w) ((WT)(w))->at #if EV_USE_REALTIME /* sig_atomic_t is used to avoid per-thread variables or locking but still */ /* giving it a reasonably high chance of working on typical architectures */ static EV_ATOMIC_T have_realtime; /* did clock_gettime (CLOCK_REALTIME) work? */ #endif #if EV_USE_MONOTONIC static EV_ATOMIC_T have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work? */ #endif #ifndef EV_FD_TO_WIN32_HANDLE # define EV_FD_TO_WIN32_HANDLE(fd) _get_osfhandle (fd) #endif #ifndef EV_WIN32_HANDLE_TO_FD # define EV_WIN32_HANDLE_TO_FD(handle) _open_osfhandle (handle, 0) #endif #ifndef EV_WIN32_CLOSE_FD # define EV_WIN32_CLOSE_FD(fd) close (fd) #endif #ifdef _WIN32 # include "ev_win32.c" #endif /*****************************************************************************/ /* define a suitable floor function (only used by periodics atm) */ #if EV_USE_FLOOR # include # define ev_floor(v) floor (v) #else #include /* a floor() replacement function, should be independent of ev_tstamp type */ static ev_tstamp noinline ev_floor (ev_tstamp v) { /* the choice of shift factor is not terribly important */ #if FLT_RADIX != 2 /* assume FLT_RADIX == 10 */ const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 10000000000000000000. : 1000000000.; #else const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 18446744073709551616. : 4294967296.; #endif /* argument too large for an unsigned long? */ if (expect_false (v >= shift)) { ev_tstamp f; if (v == v - 1.) return v; /* very large number */ f = shift * ev_floor (v * (1. / shift)); return f + ev_floor (v - f); } /* special treatment for negative args? */ if (expect_false (v < 0.)) { ev_tstamp f = -ev_floor (-v); return f - (f == v ? 0 : 1); } /* fits into an unsigned long */ return (unsigned long)v; } #endif /*****************************************************************************/ #ifdef __linux # include #endif static unsigned int noinline ecb_cold ev_linux_version (void) { #ifdef __linux unsigned int v = 0; struct utsname buf; int i; char *p = buf.release; if (uname (&buf)) return 0; for (i = 3+1; --i; ) { unsigned int c = 0; for (;;) { if (*p >= '0' && *p <= '9') c = c * 10 + *p++ - '0'; else { p += *p == '.'; break; } } v = (v << 8) | c; } return v; #else return 0; #endif } /*****************************************************************************/ #if EV_AVOID_STDIO static void noinline ecb_cold ev_printerr (const char *msg) { write (STDERR_FILENO, msg, strlen (msg)); } #endif static void (*syserr_cb)(const char *msg) EV_THROW; void ecb_cold ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW { syserr_cb = cb; } static void noinline ecb_cold ev_syserr (const char *msg) { if (!msg) msg = "(libev) system error"; if (syserr_cb) syserr_cb (msg); else { #if EV_AVOID_STDIO ev_printerr (msg); ev_printerr (": "); ev_printerr (strerror (errno)); ev_printerr ("\n"); #else perror (msg); #endif abort (); } } static void * ev_realloc_emul (void *ptr, long size) EV_THROW { /* some systems, notably openbsd and darwin, fail to properly * implement realloc (x, 0) (as required by both ansi c-89 and * the single unix specification, so work around them here. * recently, also (at least) fedora and debian started breaking it, * despite documenting it otherwise. */ if (size) return realloc (ptr, size); free (ptr); return 0; } static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul; void ecb_cold ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW { alloc = cb; } inline_speed void * ev_realloc (void *ptr, long size) { ptr = alloc (ptr, size); if (!ptr && size) { #if EV_AVOID_STDIO ev_printerr ("(libev) memory allocation failed, aborting.\n"); #else fprintf (stderr, "(libev) cannot allocate %ld bytes, aborting.", size); #endif abort (); } return ptr; } #define ev_malloc(size) ev_realloc (0, (size)) #define ev_free(ptr) ev_realloc ((ptr), 0) /*****************************************************************************/ /* set in reify when reification needed */ #define EV_ANFD_REIFY 1 /* file descriptor info structure */ typedef struct { WL head; unsigned char events; /* the events watched for */ unsigned char reify; /* flag set when this ANFD needs reification (EV_ANFD_REIFY, EV__IOFDSET) */ unsigned char emask; /* the epoll backend stores the actual kernel mask in here */ unsigned char unused; #if EV_USE_EPOLL unsigned int egen; /* generation counter to counter epoll bugs */ #endif #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP SOCKET handle; #endif #if EV_USE_IOCP OVERLAPPED or, ow; #endif } ANFD; /* stores the pending event set for a given watcher */ typedef struct { W w; int events; /* the pending event set for the given watcher */ } ANPENDING; #if EV_USE_INOTIFY /* hash table entry per inotify-id */ typedef struct { WL head; } ANFS; #endif /* Heap Entry */ #if EV_HEAP_CACHE_AT /* a heap element */ typedef struct { ev_tstamp at; WT w; } ANHE; #define ANHE_w(he) (he).w /* access watcher, read-write */ #define ANHE_at(he) (he).at /* access cached at, read-only */ #define ANHE_at_cache(he) (he).at = (he).w->at /* update at from watcher */ #else /* a heap element */ typedef WT ANHE; #define ANHE_w(he) (he) #define ANHE_at(he) (he)->at #define ANHE_at_cache(he) #endif #if EV_MULTIPLICITY struct ev_loop { ev_tstamp ev_rt_now; #define ev_rt_now ((loop)->ev_rt_now) #define VAR(name,decl) decl; #include "ev_vars.h" #undef VAR }; #include "ev_wrap.h" static struct ev_loop default_loop_struct; EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */ #else #ifdef EV_API_STATIC static ev_tstamp ev_rt_now = 0; #else ev_tstamp ev_rt_now = 0; #endif #define VAR(name,decl) static decl; #include "ev_vars.h" #undef VAR static int ev_default_loop_ptr; #endif #if EV_FEATURE_API # define EV_RELEASE_CB if (expect_false (release_cb)) release_cb (EV_A) # define EV_ACQUIRE_CB if (expect_false (acquire_cb)) acquire_cb (EV_A) # define EV_INVOKE_PENDING invoke_cb (EV_A) #else # define EV_RELEASE_CB (void)0 # define EV_ACQUIRE_CB (void)0 # define EV_INVOKE_PENDING ev_invoke_pending (EV_A) #endif #define EVBREAK_RECURSE 0x80 /*****************************************************************************/ #ifndef EV_HAVE_EV_TIME ev_tstamp ev_time (void) EV_THROW { #if EV_USE_REALTIME if (expect_true (have_realtime)) { struct timespec ts; clock_gettime (CLOCK_REALTIME, &ts); return ts.tv_sec + ts.tv_nsec * 1e-9; } #endif struct timeval tv; gettimeofday (&tv, 0); return tv.tv_sec + tv.tv_usec * 1e-6; } #endif inline_size ev_tstamp get_clock (void) { #if EV_USE_MONOTONIC if (expect_true (have_monotonic)) { struct timespec ts; clock_gettime (CLOCK_MONOTONIC, &ts); return ts.tv_sec + ts.tv_nsec * 1e-9; } #endif return ev_time (); } #if EV_MULTIPLICITY ev_tstamp ev_now (EV_P) EV_THROW { return ev_rt_now; } #endif void ev_sleep (ev_tstamp delay) EV_THROW { if (delay > 0.) { #if EV_USE_NANOSLEEP struct timespec ts; EV_TS_SET (ts, delay); nanosleep (&ts, 0); #elif defined _WIN32 Sleep ((unsigned long)(delay * 1e3)); #else struct timeval tv; /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */ /* something not guaranteed by newer posix versions, but guaranteed */ /* by older ones */ EV_TV_SET (tv, delay); select (0, 0, 0, 0, &tv); #endif } } /*****************************************************************************/ #define MALLOC_ROUND 4096 /* prefer to allocate in chunks of this size, must be 2**n and >> 4 longs */ /* find a suitable new size for the given array, */ /* hopefully by rounding to a nice-to-malloc size */ inline_size int array_nextsize (int elem, int cur, int cnt) { int ncur = cur + 1; do ncur <<= 1; while (cnt > ncur); /* if size is large, round to MALLOC_ROUND - 4 * longs to accommodate malloc overhead */ if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4) { ncur *= elem; ncur = (ncur + elem + (MALLOC_ROUND - 1) + sizeof (void *) * 4) & ~(MALLOC_ROUND - 1); ncur = ncur - sizeof (void *) * 4; ncur /= elem; } return ncur; } static void * noinline ecb_cold array_realloc (int elem, void *base, int *cur, int cnt) { *cur = array_nextsize (elem, *cur, cnt); return ev_realloc (base, elem * *cur); } #define array_init_zero(base,count) \ memset ((void *)(base), 0, sizeof (*(base)) * (count)) #define array_needsize(type,base,cur,cnt,init) \ if (expect_false ((cnt) > (cur))) \ { \ int ecb_unused ocur_ = (cur); \ (base) = (type *)array_realloc \ (sizeof (type), (base), &(cur), (cnt)); \ init ((base) + (ocur_), (cur) - ocur_); \ } #if 0 #define array_slim(type,stem) \ if (stem ## max < array_roundsize (stem ## cnt >> 2)) \ { \ stem ## max = array_roundsize (stem ## cnt >> 1); \ base = (type *)ev_realloc (base, sizeof (type) * (stem ## max));\ fprintf (stderr, "slimmed down " # stem " to %d\n", stem ## max);/*D*/\ } #endif #define array_free(stem, idx) \ ev_free (stem ## s idx); stem ## cnt idx = stem ## max idx = 0; stem ## s idx = 0 /*****************************************************************************/ /* dummy callback for pending events */ static void noinline pendingcb (EV_P_ ev_prepare *w, int revents) { } void noinline ev_feed_event (EV_P_ void *w, int revents) EV_THROW { W w_ = (W)w; int pri = ABSPRI (w_); if (expect_false (w_->pending)) pendings [pri][w_->pending - 1].events |= revents; else { w_->pending = ++pendingcnt [pri]; array_needsize (ANPENDING, pendings [pri], pendingmax [pri], w_->pending, EMPTY2); pendings [pri][w_->pending - 1].w = w_; pendings [pri][w_->pending - 1].events = revents; } pendingpri = NUMPRI - 1; } inline_speed void feed_reverse (EV_P_ W w) { array_needsize (W, rfeeds, rfeedmax, rfeedcnt + 1, EMPTY2); rfeeds [rfeedcnt++] = w; } inline_size void feed_reverse_done (EV_P_ int revents) { do ev_feed_event (EV_A_ rfeeds [--rfeedcnt], revents); while (rfeedcnt); } inline_speed void queue_events (EV_P_ W *events, int eventcnt, int type) { int i; for (i = 0; i < eventcnt; ++i) ev_feed_event (EV_A_ events [i], type); } /*****************************************************************************/ inline_speed void fd_event_nocheck (EV_P_ int fd, int revents) { ANFD *anfd = anfds + fd; ev_io *w; for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next) { int ev = w->events & revents; if (ev) ev_feed_event (EV_A_ (W)w, ev); } } /* do not submit kernel events for fds that have reify set */ /* because that means they changed while we were polling for new events */ inline_speed void fd_event (EV_P_ int fd, int revents) { ANFD *anfd = anfds + fd; if (expect_true (!anfd->reify)) fd_event_nocheck (EV_A_ fd, revents); } void ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW { if (fd >= 0 && fd < anfdmax) fd_event_nocheck (EV_A_ fd, revents); } /* make sure the external fd watch events are in-sync */ /* with the kernel/libev internal state */ inline_size void fd_reify (EV_P) { int i; #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP for (i = 0; i < fdchangecnt; ++i) { int fd = fdchanges [i]; ANFD *anfd = anfds + fd; if (anfd->reify & EV__IOFDSET && anfd->head) { SOCKET handle = EV_FD_TO_WIN32_HANDLE (fd); if (handle != anfd->handle) { unsigned long arg; assert (("libev: only socket fds supported in this configuration", ioctlsocket (handle, FIONREAD, &arg) == 0)); /* handle changed, but fd didn't - we need to do it in two steps */ backend_modify (EV_A_ fd, anfd->events, 0); anfd->events = 0; anfd->handle = handle; } } } #endif for (i = 0; i < fdchangecnt; ++i) { int fd = fdchanges [i]; ANFD *anfd = anfds + fd; ev_io *w; unsigned char o_events = anfd->events; unsigned char o_reify = anfd->reify; anfd->reify = 0; /*if (expect_true (o_reify & EV_ANFD_REIFY)) probably a deoptimisation */ { anfd->events = 0; for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next) anfd->events |= (unsigned char)w->events; if (o_events != anfd->events) o_reify = EV__IOFDSET; /* actually |= */ } if (o_reify & EV__IOFDSET) backend_modify (EV_A_ fd, o_events, anfd->events); } fdchangecnt = 0; } /* something about the given fd changed */ inline_size void fd_change (EV_P_ int fd, int flags) { unsigned char reify = anfds [fd].reify; anfds [fd].reify |= flags; if (expect_true (!reify)) { ++fdchangecnt; array_needsize (int, fdchanges, fdchangemax, fdchangecnt, EMPTY2); fdchanges [fdchangecnt - 1] = fd; } } /* the given fd is invalid/unusable, so make sure it doesn't hurt us anymore */ inline_speed void ecb_cold fd_kill (EV_P_ int fd) { ev_io *w; while ((w = (ev_io *)anfds [fd].head)) { ev_io_stop (EV_A_ w); ev_feed_event (EV_A_ (W)w, EV_ERROR | EV_READ | EV_WRITE); } } /* check whether the given fd is actually valid, for error recovery */ inline_size int ecb_cold fd_valid (int fd) { #ifdef _WIN32 return EV_FD_TO_WIN32_HANDLE (fd) != -1; #else return fcntl (fd, F_GETFD) != -1; #endif } /* called on EBADF to verify fds */ static void noinline ecb_cold fd_ebadf (EV_P) { int fd; for (fd = 0; fd < anfdmax; ++fd) if (anfds [fd].events) if (!fd_valid (fd) && errno == EBADF) fd_kill (EV_A_ fd); } /* called on ENOMEM in select/poll to kill some fds and retry */ static void noinline ecb_cold fd_enomem (EV_P) { int fd; for (fd = anfdmax; fd--; ) if (anfds [fd].events) { fd_kill (EV_A_ fd); break; } } /* usually called after fork if backend needs to re-arm all fds from scratch */ static void noinline fd_rearm_all (EV_P) { int fd; for (fd = 0; fd < anfdmax; ++fd) if (anfds [fd].events) { anfds [fd].events = 0; anfds [fd].emask = 0; fd_change (EV_A_ fd, EV__IOFDSET | EV_ANFD_REIFY); } } /* used to prepare libev internal fd's */ /* this is not fork-safe */ inline_speed void fd_intern (int fd) { #ifdef _WIN32 unsigned long arg = 1; ioctlsocket (EV_FD_TO_WIN32_HANDLE (fd), FIONBIO, &arg); #else fcntl (fd, F_SETFD, FD_CLOEXEC); fcntl (fd, F_SETFL, O_NONBLOCK); #endif } /*****************************************************************************/ /* * the heap functions want a real array index. array index 0 is guaranteed to not * be in-use at any time. the first heap entry is at array [HEAP0]. DHEAP gives * the branching factor of the d-tree. */ /* * at the moment we allow libev the luxury of two heaps, * a small-code-size 2-heap one and a ~1.5kb larger 4-heap * which is more cache-efficient. * the difference is about 5% with 50000+ watchers. */ #if EV_USE_4HEAP #define DHEAP 4 #define HEAP0 (DHEAP - 1) /* index of first element in heap */ #define HPARENT(k) ((((k) - HEAP0 - 1) / DHEAP) + HEAP0) #define UPHEAP_DONE(p,k) ((p) == (k)) /* away from the root */ inline_speed void downheap (ANHE *heap, int N, int k) { ANHE he = heap [k]; ANHE *E = heap + N + HEAP0; for (;;) { ev_tstamp minat; ANHE *minpos; ANHE *pos = heap + DHEAP * (k - HEAP0) + HEAP0 + 1; /* find minimum child */ if (expect_true (pos + DHEAP - 1 < E)) { /* fast path */ (minpos = pos + 0), (minat = ANHE_at (*minpos)); if ( ANHE_at (pos [1]) < minat) (minpos = pos + 1), (minat = ANHE_at (*minpos)); if ( ANHE_at (pos [2]) < minat) (minpos = pos + 2), (minat = ANHE_at (*minpos)); if ( ANHE_at (pos [3]) < minat) (minpos = pos + 3), (minat = ANHE_at (*minpos)); } else if (pos < E) { /* slow path */ (minpos = pos + 0), (minat = ANHE_at (*minpos)); if (pos + 1 < E && ANHE_at (pos [1]) < minat) (minpos = pos + 1), (minat = ANHE_at (*minpos)); if (pos + 2 < E && ANHE_at (pos [2]) < minat) (minpos = pos + 2), (minat = ANHE_at (*minpos)); if (pos + 3 < E && ANHE_at (pos [3]) < minat) (minpos = pos + 3), (minat = ANHE_at (*minpos)); } else break; if (ANHE_at (he) <= minat) break; heap [k] = *minpos; ev_active (ANHE_w (*minpos)) = k; k = minpos - heap; } heap [k] = he; ev_active (ANHE_w (he)) = k; } #else /* 4HEAP */ #define HEAP0 1 #define HPARENT(k) ((k) >> 1) #define UPHEAP_DONE(p,k) (!(p)) /* away from the root */ inline_speed void downheap (ANHE *heap, int N, int k) { ANHE he = heap [k]; for (;;) { int c = k << 1; if (c >= N + HEAP0) break; c += c + 1 < N + HEAP0 && ANHE_at (heap [c]) > ANHE_at (heap [c + 1]) ? 1 : 0; if (ANHE_at (he) <= ANHE_at (heap [c])) break; heap [k] = heap [c]; ev_active (ANHE_w (heap [k])) = k; k = c; } heap [k] = he; ev_active (ANHE_w (he)) = k; } #endif /* towards the root */ inline_speed void upheap (ANHE *heap, int k) { ANHE he = heap [k]; for (;;) { int p = HPARENT (k); if (UPHEAP_DONE (p, k) || ANHE_at (heap [p]) <= ANHE_at (he)) break; heap [k] = heap [p]; ev_active (ANHE_w (heap [k])) = k; k = p; } heap [k] = he; ev_active (ANHE_w (he)) = k; } /* move an element suitably so it is in a correct place */ inline_size void adjustheap (ANHE *heap, int N, int k) { if (k > HEAP0 && ANHE_at (heap [k]) <= ANHE_at (heap [HPARENT (k)])) upheap (heap, k); else downheap (heap, N, k); } /* rebuild the heap: this function is used only once and executed rarely */ inline_size void reheap (ANHE *heap, int N) { int i; /* we don't use floyds algorithm, upheap is simpler and is more cache-efficient */ /* also, this is easy to implement and correct for both 2-heaps and 4-heaps */ for (i = 0; i < N; ++i) upheap (heap, i + HEAP0); } /*****************************************************************************/ /* associate signal watchers to a signal signal */ typedef struct { EV_ATOMIC_T pending; #if EV_MULTIPLICITY EV_P; #endif WL head; } ANSIG; static ANSIG signals [EV_NSIG - 1]; /*****************************************************************************/ #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE static void noinline ecb_cold evpipe_init (EV_P) { if (!ev_is_active (&pipe_w)) { int fds [2]; # if EV_USE_EVENTFD fds [0] = -1; fds [1] = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC); if (fds [1] < 0 && errno == EINVAL) fds [1] = eventfd (0, 0); if (fds [1] < 0) # endif { while (pipe (fds)) ev_syserr ("(libev) error creating signal/async pipe"); fd_intern (fds [0]); } fd_intern (fds [1]); evpipe [0] = fds [0]; if (evpipe [1] < 0) evpipe [1] = fds [1]; /* first call, set write fd */ else { /* on subsequent calls, do not change evpipe [1] */ /* so that evpipe_write can always rely on its value. */ /* this branch does not do anything sensible on windows, */ /* so must not be executed on windows */ dup2 (fds [1], evpipe [1]); close (fds [1]); } ev_io_set (&pipe_w, evpipe [0] < 0 ? evpipe [1] : evpipe [0], EV_READ); ev_io_start (EV_A_ &pipe_w); ev_unref (EV_A); /* watcher should not keep loop alive */ } } inline_speed void evpipe_write (EV_P_ EV_ATOMIC_T *flag) { ECB_MEMORY_FENCE; /* push out the write before this function was called, acquire flag */ if (expect_true (*flag)) return; *flag = 1; ECB_MEMORY_FENCE_RELEASE; /* make sure flag is visible before the wakeup */ pipe_write_skipped = 1; ECB_MEMORY_FENCE; /* make sure pipe_write_skipped is visible before we check pipe_write_wanted */ if (pipe_write_wanted) { int old_errno; pipe_write_skipped = 0; ECB_MEMORY_FENCE_RELEASE; old_errno = errno; /* save errno because write will clobber it */ #if EV_USE_EVENTFD if (evpipe [0] < 0) { uint64_t counter = 1; write (evpipe [1], &counter, sizeof (uint64_t)); } else #endif { #ifdef _WIN32 WSABUF buf; DWORD sent; buf.buf = &buf; buf.len = 1; WSASend (EV_FD_TO_WIN32_HANDLE (evpipe [1]), &buf, 1, &sent, 0, 0, 0); #else write (evpipe [1], &(evpipe [1]), 1); #endif } errno = old_errno; } } /* called whenever the libev signal pipe */ /* got some events (signal, async) */ static void pipecb (EV_P_ ev_io *iow, int revents) { int i; if (revents & EV_READ) { #if EV_USE_EVENTFD if (evpipe [0] < 0) { uint64_t counter; read (evpipe [1], &counter, sizeof (uint64_t)); } else #endif { char dummy[4]; #ifdef _WIN32 WSABUF buf; DWORD recvd; DWORD flags = 0; buf.buf = dummy; buf.len = sizeof (dummy); WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, &flags, 0, 0); #else read (evpipe [0], &dummy, sizeof (dummy)); #endif } } pipe_write_skipped = 0; ECB_MEMORY_FENCE; /* push out skipped, acquire flags */ #if EV_SIGNAL_ENABLE if (sig_pending) { sig_pending = 0; ECB_MEMORY_FENCE; for (i = EV_NSIG - 1; i--; ) if (expect_false (signals [i].pending)) ev_feed_signal_event (EV_A_ i + 1); } #endif #if EV_ASYNC_ENABLE if (async_pending) { async_pending = 0; ECB_MEMORY_FENCE; for (i = asynccnt; i--; ) if (asyncs [i]->sent) { asyncs [i]->sent = 0; ECB_MEMORY_FENCE_RELEASE; ev_feed_event (EV_A_ asyncs [i], EV_ASYNC); } } #endif } /*****************************************************************************/ void ev_feed_signal (int signum) EV_THROW { #if EV_MULTIPLICITY EV_P = signals [signum - 1].loop; if (!EV_A) return; #endif signals [signum - 1].pending = 1; evpipe_write (EV_A_ &sig_pending); } static void ev_sighandler (int signum) { #ifdef _WIN32 signal (signum, ev_sighandler); #endif ev_feed_signal (signum); } void noinline ev_feed_signal_event (EV_P_ int signum) EV_THROW { WL w; if (expect_false (signum <= 0 || signum >= EV_NSIG)) return; --signum; #if EV_MULTIPLICITY /* it is permissible to try to feed a signal to the wrong loop */ /* or, likely more useful, feeding a signal nobody is waiting for */ if (expect_false (signals [signum].loop != EV_A)) return; #endif signals [signum].pending = 0; ECB_MEMORY_FENCE_RELEASE; for (w = signals [signum].head; w; w = w->next) ev_feed_event (EV_A_ (W)w, EV_SIGNAL); } #if EV_USE_SIGNALFD static void sigfdcb (EV_P_ ev_io *iow, int revents) { struct signalfd_siginfo si[2], *sip; /* these structs are big */ for (;;) { ssize_t res = read (sigfd, si, sizeof (si)); /* not ISO-C, as res might be -1, but works with SuS */ for (sip = si; (char *)sip < (char *)si + res; ++sip) ev_feed_signal_event (EV_A_ sip->ssi_signo); if (res < (ssize_t)sizeof (si)) break; } } #endif #endif /*****************************************************************************/ #if EV_CHILD_ENABLE static WL childs [EV_PID_HASHSIZE]; static ev_signal childev; #ifndef WIFCONTINUED # define WIFCONTINUED(status) 0 #endif /* handle a single child status event */ inline_speed void child_reap (EV_P_ int chain, int pid, int status) { ev_child *w; int traced = WIFSTOPPED (status) || WIFCONTINUED (status); for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next) { if ((w->pid == pid || !w->pid) && (!traced || (w->flags & 1))) { ev_set_priority (w, EV_MAXPRI); /* need to do it *now*, this *must* be the same prio as the signal watcher itself */ w->rpid = pid; w->rstatus = status; ev_feed_event (EV_A_ (W)w, EV_CHILD); } } } #ifndef WCONTINUED # define WCONTINUED 0 #endif /* called on sigchld etc., calls waitpid */ static void childcb (EV_P_ ev_signal *sw, int revents) { int pid, status; /* some systems define WCONTINUED but then fail to support it (linux 2.4) */ if (0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED))) if (!WCONTINUED || errno != EINVAL || 0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED))) return; /* make sure we are called again until all children have been reaped */ /* we need to do it this way so that the callback gets called before we continue */ ev_feed_event (EV_A_ (W)sw, EV_SIGNAL); child_reap (EV_A_ pid, pid, status); if ((EV_PID_HASHSIZE) > 1) child_reap (EV_A_ 0, pid, status); /* this might trigger a watcher twice, but feed_event catches that */ } #endif /*****************************************************************************/ #if EV_USE_IOCP # include "ev_iocp.c" #endif #if EV_USE_PORT # include "ev_port.c" #endif #if EV_USE_KQUEUE # include "ev_kqueue.c" #endif #if EV_USE_EPOLL # include "ev_epoll.c" #endif #if EV_USE_POLL # include "ev_poll.c" #endif #if EV_USE_SELECT # include "ev_select.c" #endif int ecb_cold ev_version_major (void) EV_THROW { return EV_VERSION_MAJOR; } int ecb_cold ev_version_minor (void) EV_THROW { return EV_VERSION_MINOR; } /* return true if we are running with elevated privileges and should ignore env variables */ int inline_size ecb_cold enable_secure (void) { #ifdef _WIN32 return 0; #else return getuid () != geteuid () || getgid () != getegid (); #endif } unsigned int ecb_cold ev_supported_backends (void) EV_THROW { unsigned int flags = 0; if (EV_USE_PORT ) flags |= EVBACKEND_PORT; if (EV_USE_KQUEUE) flags |= EVBACKEND_KQUEUE; if (EV_USE_EPOLL ) flags |= EVBACKEND_EPOLL; if (EV_USE_POLL ) flags |= EVBACKEND_POLL; if (EV_USE_SELECT) flags |= EVBACKEND_SELECT; return flags; } unsigned int ecb_cold ev_recommended_backends (void) EV_THROW { unsigned int flags = ev_supported_backends (); #ifndef __NetBSD__ /* kqueue is borked on everything but netbsd apparently */ /* it usually doesn't work correctly on anything but sockets and pipes */ flags &= ~EVBACKEND_KQUEUE; #endif #ifdef __APPLE__ /* only select works correctly on that "unix-certified" platform */ flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */ flags &= ~EVBACKEND_POLL; /* poll is based on kqueue from 10.5 onwards */ #endif #ifdef __FreeBSD__ flags &= ~EVBACKEND_POLL; /* poll return value is unusable (http://forums.freebsd.org/archive/index.php/t-10270.html) */ #endif return flags; } unsigned int ecb_cold ev_embeddable_backends (void) EV_THROW { int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT; /* epoll embeddability broken on all linux versions up to at least 2.6.23 */ if (ev_linux_version () < 0x020620) /* disable it on linux < 2.6.32 */ flags &= ~EVBACKEND_EPOLL; return flags; } unsigned int ev_backend (EV_P) EV_THROW { return backend; } #if EV_FEATURE_API unsigned int ev_iteration (EV_P) EV_THROW { return loop_count; } unsigned int ev_depth (EV_P) EV_THROW { return loop_depth; } void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW { io_blocktime = interval; } void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW { timeout_blocktime = interval; } void ev_set_userdata (EV_P_ void *data) EV_THROW { userdata = data; } void * ev_userdata (EV_P) EV_THROW { return userdata; } void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW { invoke_cb = invoke_pending_cb; } void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW { release_cb = release; acquire_cb = acquire; } #endif /* initialise a loop structure, must be zero-initialised */ static void noinline ecb_cold loop_init (EV_P_ unsigned int flags) EV_THROW { if (!backend) { origflags = flags; #if EV_USE_REALTIME if (!have_realtime) { struct timespec ts; if (!clock_gettime (CLOCK_REALTIME, &ts)) have_realtime = 1; } #endif #if EV_USE_MONOTONIC if (!have_monotonic) { struct timespec ts; if (!clock_gettime (CLOCK_MONOTONIC, &ts)) have_monotonic = 1; } #endif /* pid check not overridable via env */ #ifndef _WIN32 if (flags & EVFLAG_FORKCHECK) curpid = getpid (); #endif if (!(flags & EVFLAG_NOENV) && !enable_secure () && getenv ("LIBEV_FLAGS")) flags = atoi (getenv ("LIBEV_FLAGS")); ev_rt_now = ev_time (); mn_now = get_clock (); now_floor = mn_now; rtmn_diff = ev_rt_now - mn_now; #if EV_FEATURE_API invoke_cb = ev_invoke_pending; #endif io_blocktime = 0.; timeout_blocktime = 0.; backend = 0; backend_fd = -1; sig_pending = 0; #if EV_ASYNC_ENABLE async_pending = 0; #endif pipe_write_skipped = 0; pipe_write_wanted = 0; evpipe [0] = -1; evpipe [1] = -1; #if EV_USE_INOTIFY fs_fd = flags & EVFLAG_NOINOTIFY ? -1 : -2; #endif #if EV_USE_SIGNALFD sigfd = flags & EVFLAG_SIGNALFD ? -2 : -1; #endif if (!(flags & EVBACKEND_MASK)) flags |= ev_recommended_backends (); #if EV_USE_IOCP if (!backend && (flags & EVBACKEND_IOCP )) backend = iocp_init (EV_A_ flags); #endif #if EV_USE_PORT if (!backend && (flags & EVBACKEND_PORT )) backend = port_init (EV_A_ flags); #endif #if EV_USE_KQUEUE if (!backend && (flags & EVBACKEND_KQUEUE)) backend = kqueue_init (EV_A_ flags); #endif #if EV_USE_EPOLL if (!backend && (flags & EVBACKEND_EPOLL )) backend = epoll_init (EV_A_ flags); #endif #if EV_USE_POLL if (!backend && (flags & EVBACKEND_POLL )) backend = poll_init (EV_A_ flags); #endif #if EV_USE_SELECT if (!backend && (flags & EVBACKEND_SELECT)) backend = select_init (EV_A_ flags); #endif ev_prepare_init (&pending_w, pendingcb); #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE ev_init (&pipe_w, pipecb); ev_set_priority (&pipe_w, EV_MAXPRI); #endif } } /* free up a loop structure */ void ecb_cold ev_loop_destroy (EV_P) { int i; #if EV_MULTIPLICITY /* mimic free (0) */ if (!EV_A) return; #endif #if EV_CLEANUP_ENABLE /* queue cleanup watchers (and execute them) */ if (expect_false (cleanupcnt)) { queue_events (EV_A_ (W *)cleanups, cleanupcnt, EV_CLEANUP); EV_INVOKE_PENDING; } #endif #if EV_CHILD_ENABLE if (ev_is_default_loop (EV_A) && ev_is_active (&childev)) { ev_ref (EV_A); /* child watcher */ ev_signal_stop (EV_A_ &childev); } #endif if (ev_is_active (&pipe_w)) { /*ev_ref (EV_A);*/ /*ev_io_stop (EV_A_ &pipe_w);*/ if (evpipe [0] >= 0) EV_WIN32_CLOSE_FD (evpipe [0]); if (evpipe [1] >= 0) EV_WIN32_CLOSE_FD (evpipe [1]); } #if EV_USE_SIGNALFD if (ev_is_active (&sigfd_w)) close (sigfd); #endif #if EV_USE_INOTIFY if (fs_fd >= 0) close (fs_fd); #endif if (backend_fd >= 0) close (backend_fd); #if EV_USE_IOCP if (backend == EVBACKEND_IOCP ) iocp_destroy (EV_A); #endif #if EV_USE_PORT if (backend == EVBACKEND_PORT ) port_destroy (EV_A); #endif #if EV_USE_KQUEUE if (backend == EVBACKEND_KQUEUE) kqueue_destroy (EV_A); #endif #if EV_USE_EPOLL if (backend == EVBACKEND_EPOLL ) epoll_destroy (EV_A); #endif #if EV_USE_POLL if (backend == EVBACKEND_POLL ) poll_destroy (EV_A); #endif #if EV_USE_SELECT if (backend == EVBACKEND_SELECT) select_destroy (EV_A); #endif for (i = NUMPRI; i--; ) { array_free (pending, [i]); #if EV_IDLE_ENABLE array_free (idle, [i]); #endif } ev_free (anfds); anfds = 0; anfdmax = 0; /* have to use the microsoft-never-gets-it-right macro */ array_free (rfeed, EMPTY); array_free (fdchange, EMPTY); array_free (timer, EMPTY); #if EV_PERIODIC_ENABLE array_free (periodic, EMPTY); #endif #if EV_FORK_ENABLE array_free (fork, EMPTY); #endif #if EV_CLEANUP_ENABLE array_free (cleanup, EMPTY); #endif array_free (prepare, EMPTY); array_free (check, EMPTY); #if EV_ASYNC_ENABLE array_free (async, EMPTY); #endif backend = 0; #if EV_MULTIPLICITY if (ev_is_default_loop (EV_A)) #endif ev_default_loop_ptr = 0; #if EV_MULTIPLICITY else ev_free (EV_A); #endif } #if EV_USE_INOTIFY inline_size void infy_fork (EV_P); #endif inline_size void loop_fork (EV_P) { #if EV_USE_PORT if (backend == EVBACKEND_PORT ) port_fork (EV_A); #endif #if EV_USE_KQUEUE if (backend == EVBACKEND_KQUEUE) kqueue_fork (EV_A); #endif #if EV_USE_EPOLL if (backend == EVBACKEND_EPOLL ) epoll_fork (EV_A); #endif #if EV_USE_INOTIFY infy_fork (EV_A); #endif #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE if (ev_is_active (&pipe_w)) { /* pipe_write_wanted must be false now, so modifying fd vars should be safe */ ev_ref (EV_A); ev_io_stop (EV_A_ &pipe_w); if (evpipe [0] >= 0) EV_WIN32_CLOSE_FD (evpipe [0]); evpipe_init (EV_A); /* iterate over everything, in case we missed something before */ ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM); } #endif postfork = 0; } #if EV_MULTIPLICITY struct ev_loop * ecb_cold ev_loop_new (unsigned int flags) EV_THROW { EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop)); memset (EV_A, 0, sizeof (struct ev_loop)); loop_init (EV_A_ flags); if (ev_backend (EV_A)) return EV_A; ev_free (EV_A); return 0; } #endif /* multiplicity */ #if EV_VERIFY static void noinline ecb_cold verify_watcher (EV_P_ W w) { assert (("libev: watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI)); if (w->pending) assert (("libev: pending watcher not on pending queue", pendings [ABSPRI (w)][w->pending - 1].w == w)); } static void noinline ecb_cold verify_heap (EV_P_ ANHE *heap, int N) { int i; for (i = HEAP0; i < N + HEAP0; ++i) { assert (("libev: active index mismatch in heap", ev_active (ANHE_w (heap [i])) == i)); assert (("libev: heap condition violated", i == HEAP0 || ANHE_at (heap [HPARENT (i)]) <= ANHE_at (heap [i]))); assert (("libev: heap at cache mismatch", ANHE_at (heap [i]) == ev_at (ANHE_w (heap [i])))); verify_watcher (EV_A_ (W)ANHE_w (heap [i])); } } static void noinline ecb_cold array_verify (EV_P_ W *ws, int cnt) { while (cnt--) { assert (("libev: active index mismatch", ev_active (ws [cnt]) == cnt + 1)); verify_watcher (EV_A_ ws [cnt]); } } #endif #if EV_FEATURE_API void ecb_cold ev_verify (EV_P) EV_THROW { #if EV_VERIFY int i; WL w, w2; assert (activecnt >= -1); assert (fdchangemax >= fdchangecnt); for (i = 0; i < fdchangecnt; ++i) assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0)); assert (anfdmax >= 0); for (i = 0; i < anfdmax; ++i) { int j = 0; for (w = w2 = anfds [i].head; w; w = w->next) { verify_watcher (EV_A_ (W)w); if (j++ & 1) { assert (("libev: io watcher list contains a loop", w != w2)); w2 = w2->next; } assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1)); assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)); } } assert (timermax >= timercnt); verify_heap (EV_A_ timers, timercnt); #if EV_PERIODIC_ENABLE assert (periodicmax >= periodiccnt); verify_heap (EV_A_ periodics, periodiccnt); #endif for (i = NUMPRI; i--; ) { assert (pendingmax [i] >= pendingcnt [i]); #if EV_IDLE_ENABLE assert (idleall >= 0); assert (idlemax [i] >= idlecnt [i]); array_verify (EV_A_ (W *)idles [i], idlecnt [i]); #endif } #if EV_FORK_ENABLE assert (forkmax >= forkcnt); array_verify (EV_A_ (W *)forks, forkcnt); #endif #if EV_CLEANUP_ENABLE assert (cleanupmax >= cleanupcnt); array_verify (EV_A_ (W *)cleanups, cleanupcnt); #endif #if EV_ASYNC_ENABLE assert (asyncmax >= asynccnt); array_verify (EV_A_ (W *)asyncs, asynccnt); #endif #if EV_PREPARE_ENABLE assert (preparemax >= preparecnt); array_verify (EV_A_ (W *)prepares, preparecnt); #endif #if EV_CHECK_ENABLE assert (checkmax >= checkcnt); array_verify (EV_A_ (W *)checks, checkcnt); #endif # if 0 #if EV_CHILD_ENABLE for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next) for (signum = EV_NSIG; signum--; ) if (signals [signum].pending) #endif # endif #endif } #endif #if EV_MULTIPLICITY struct ev_loop * ecb_cold #else int #endif ev_default_loop (unsigned int flags) EV_THROW { if (!ev_default_loop_ptr) { #if EV_MULTIPLICITY EV_P = ev_default_loop_ptr = &default_loop_struct; #else ev_default_loop_ptr = 1; #endif loop_init (EV_A_ flags); if (ev_backend (EV_A)) { #if EV_CHILD_ENABLE ev_signal_init (&childev, childcb, SIGCHLD); ev_set_priority (&childev, EV_MAXPRI); ev_signal_start (EV_A_ &childev); ev_unref (EV_A); /* child watcher should not keep loop alive */ #endif } else ev_default_loop_ptr = 0; } return ev_default_loop_ptr; } void ev_loop_fork (EV_P) EV_THROW { postfork = 1; } /*****************************************************************************/ void ev_invoke (EV_P_ void *w, int revents) { EV_CB_INVOKE ((W)w, revents); } unsigned int ev_pending_count (EV_P) EV_THROW { int pri; unsigned int count = 0; for (pri = NUMPRI; pri--; ) count += pendingcnt [pri]; return count; } void noinline ev_invoke_pending (EV_P) { pendingpri = NUMPRI; while (pendingpri) /* pendingpri possibly gets modified in the inner loop */ { --pendingpri; while (pendingcnt [pendingpri]) { ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri]; p->w->pending = 0; EV_CB_INVOKE (p->w, p->events); EV_FREQUENT_CHECK; } } } #if EV_IDLE_ENABLE /* make idle watchers pending. this handles the "call-idle */ /* only when higher priorities are idle" logic */ inline_size void idle_reify (EV_P) { if (expect_false (idleall)) { int pri; for (pri = NUMPRI; pri--; ) { if (pendingcnt [pri]) break; if (idlecnt [pri]) { queue_events (EV_A_ (W *)idles [pri], idlecnt [pri], EV_IDLE); break; } } } } #endif /* make timers pending */ inline_size void timers_reify (EV_P) { EV_FREQUENT_CHECK; if (timercnt && ANHE_at (timers [HEAP0]) < mn_now) { do { ev_timer *w = (ev_timer *)ANHE_w (timers [HEAP0]); /*assert (("libev: inactive timer on timer heap detected", ev_is_active (w)));*/ /* first reschedule or stop timer */ if (w->repeat) { ev_at (w) += w->repeat; if (ev_at (w) < mn_now) ev_at (w) = mn_now; assert (("libev: negative ev_timer repeat value found while processing timers", w->repeat > 0.)); ANHE_at_cache (timers [HEAP0]); downheap (timers, timercnt, HEAP0); } else ev_timer_stop (EV_A_ w); /* nonrepeating: stop timer */ EV_FREQUENT_CHECK; feed_reverse (EV_A_ (W)w); } while (timercnt && ANHE_at (timers [HEAP0]) < mn_now); feed_reverse_done (EV_A_ EV_TIMER); } } #if EV_PERIODIC_ENABLE static void noinline periodic_recalc (EV_P_ ev_periodic *w) { ev_tstamp interval = w->interval > MIN_INTERVAL ? w->interval : MIN_INTERVAL; ev_tstamp at = w->offset + interval * ev_floor ((ev_rt_now - w->offset) / interval); /* the above almost always errs on the low side */ while (at <= ev_rt_now) { ev_tstamp nat = at + w->interval; /* when resolution fails us, we use ev_rt_now */ if (expect_false (nat == at)) { at = ev_rt_now; break; } at = nat; } ev_at (w) = at; } /* make periodics pending */ inline_size void periodics_reify (EV_P) { EV_FREQUENT_CHECK; while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now) { do { ev_periodic *w = (ev_periodic *)ANHE_w (periodics [HEAP0]); /*assert (("libev: inactive timer on periodic heap detected", ev_is_active (w)));*/ /* first reschedule or stop timer */ if (w->reschedule_cb) { ev_at (w) = w->reschedule_cb (w, ev_rt_now); assert (("libev: ev_periodic reschedule callback returned time in the past", ev_at (w) >= ev_rt_now)); ANHE_at_cache (periodics [HEAP0]); downheap (periodics, periodiccnt, HEAP0); } else if (w->interval) { periodic_recalc (EV_A_ w); ANHE_at_cache (periodics [HEAP0]); downheap (periodics, periodiccnt, HEAP0); } else ev_periodic_stop (EV_A_ w); /* nonrepeating: stop timer */ EV_FREQUENT_CHECK; feed_reverse (EV_A_ (W)w); } while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now); feed_reverse_done (EV_A_ EV_PERIODIC); } } /* simply recalculate all periodics */ /* TODO: maybe ensure that at least one event happens when jumping forward? */ static void noinline ecb_cold periodics_reschedule (EV_P) { int i; /* adjust periodics after time jump */ for (i = HEAP0; i < periodiccnt + HEAP0; ++i) { ev_periodic *w = (ev_periodic *)ANHE_w (periodics [i]); if (w->reschedule_cb) ev_at (w) = w->reschedule_cb (w, ev_rt_now); else if (w->interval) periodic_recalc (EV_A_ w); ANHE_at_cache (periodics [i]); } reheap (periodics, periodiccnt); } #endif /* adjust all timers by a given offset */ static void noinline ecb_cold timers_reschedule (EV_P_ ev_tstamp adjust) { int i; for (i = 0; i < timercnt; ++i) { ANHE *he = timers + i + HEAP0; ANHE_w (*he)->at += adjust; ANHE_at_cache (*he); } } /* fetch new monotonic and realtime times from the kernel */ /* also detect if there was a timejump, and act accordingly */ inline_speed void time_update (EV_P_ ev_tstamp max_block) { #if EV_USE_MONOTONIC if (expect_true (have_monotonic)) { int i; ev_tstamp odiff = rtmn_diff; mn_now = get_clock (); /* only fetch the realtime clock every 0.5*MIN_TIMEJUMP seconds */ /* interpolate in the meantime */ if (expect_true (mn_now - now_floor < MIN_TIMEJUMP * .5)) { ev_rt_now = rtmn_diff + mn_now; return; } now_floor = mn_now; ev_rt_now = ev_time (); /* loop a few times, before making important decisions. * on the choice of "4": one iteration isn't enough, * in case we get preempted during the calls to * ev_time and get_clock. a second call is almost guaranteed * to succeed in that case, though. and looping a few more times * doesn't hurt either as we only do this on time-jumps or * in the unlikely event of having been preempted here. */ for (i = 4; --i; ) { ev_tstamp diff; rtmn_diff = ev_rt_now - mn_now; diff = odiff - rtmn_diff; if (expect_true ((diff < 0. ? -diff : diff) < MIN_TIMEJUMP)) return; /* all is well */ ev_rt_now = ev_time (); mn_now = get_clock (); now_floor = mn_now; } /* no timer adjustment, as the monotonic clock doesn't jump */ /* timers_reschedule (EV_A_ rtmn_diff - odiff) */ # if EV_PERIODIC_ENABLE periodics_reschedule (EV_A); # endif } else #endif { ev_rt_now = ev_time (); if (expect_false (mn_now > ev_rt_now || ev_rt_now > mn_now + max_block + MIN_TIMEJUMP)) { /* adjust timers. this is easy, as the offset is the same for all of them */ timers_reschedule (EV_A_ ev_rt_now - mn_now); #if EV_PERIODIC_ENABLE periodics_reschedule (EV_A); #endif } mn_now = ev_rt_now; } } int ev_run (EV_P_ int flags) { #if EV_FEATURE_API ++loop_depth; #endif assert (("libev: ev_loop recursion during release detected", loop_done != EVBREAK_RECURSE)); loop_done = EVBREAK_CANCEL; EV_INVOKE_PENDING; /* in case we recurse, ensure ordering stays nice and clean */ do { #if EV_VERIFY >= 2 ev_verify (EV_A); #endif #ifndef _WIN32 if (expect_false (curpid)) /* penalise the forking check even more */ if (expect_false (getpid () != curpid)) { curpid = getpid (); postfork = 1; } #endif #if EV_FORK_ENABLE /* we might have forked, so queue fork handlers */ if (expect_false (postfork)) if (forkcnt) { queue_events (EV_A_ (W *)forks, forkcnt, EV_FORK); EV_INVOKE_PENDING; } #endif #if EV_PREPARE_ENABLE /* queue prepare watchers (and execute them) */ if (expect_false (preparecnt)) { queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE); EV_INVOKE_PENDING; } #endif if (expect_false (loop_done)) break; /* we might have forked, so reify kernel state if necessary */ if (expect_false (postfork)) loop_fork (EV_A); /* update fd-related kernel structures */ fd_reify (EV_A); /* calculate blocking time */ { ev_tstamp waittime = 0.; ev_tstamp sleeptime = 0.; /* remember old timestamp for io_blocktime calculation */ ev_tstamp prev_mn_now = mn_now; /* update time to cancel out callback processing overhead */ time_update (EV_A_ 1e100); /* from now on, we want a pipe-wake-up */ pipe_write_wanted = 1; ECB_MEMORY_FENCE; /* make sure pipe_write_wanted is visible before we check for potential skips */ if (expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped))) { waittime = MAX_BLOCKTIME; if (timercnt) { ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now; if (waittime > to) waittime = to; } #if EV_PERIODIC_ENABLE if (periodiccnt) { ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now; if (waittime > to) waittime = to; } #endif /* don't let timeouts decrease the waittime below timeout_blocktime */ if (expect_false (waittime < timeout_blocktime)) waittime = timeout_blocktime; /* at this point, we NEED to wait, so we have to ensure */ /* to pass a minimum nonzero value to the backend */ if (expect_false (waittime < backend_mintime)) waittime = backend_mintime; /* extra check because io_blocktime is commonly 0 */ if (expect_false (io_blocktime)) { sleeptime = io_blocktime - (mn_now - prev_mn_now); if (sleeptime > waittime - backend_mintime) sleeptime = waittime - backend_mintime; if (expect_true (sleeptime > 0.)) { ev_sleep (sleeptime); waittime -= sleeptime; } } } #if EV_FEATURE_API ++loop_count; #endif assert ((loop_done = EVBREAK_RECURSE, 1)); /* assert for side effect */ backend_poll (EV_A_ waittime); assert ((loop_done = EVBREAK_CANCEL, 1)); /* assert for side effect */ pipe_write_wanted = 0; /* just an optimisation, no fence needed */ ECB_MEMORY_FENCE_ACQUIRE; if (pipe_write_skipped) { assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w))); ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM); } /* update ev_rt_now, do magic */ time_update (EV_A_ waittime + sleeptime); } /* queue pending timers and reschedule them */ timers_reify (EV_A); /* relative timers called last */ #if EV_PERIODIC_ENABLE periodics_reify (EV_A); /* absolute timers called first */ #endif #if EV_IDLE_ENABLE /* queue idle watchers unless other events are pending */ idle_reify (EV_A); #endif #if EV_CHECK_ENABLE /* queue check watchers, to be executed first */ if (expect_false (checkcnt)) queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); #endif EV_INVOKE_PENDING; } while (expect_true ( activecnt && !loop_done && !(flags & (EVRUN_ONCE | EVRUN_NOWAIT)) )); if (loop_done == EVBREAK_ONE) loop_done = EVBREAK_CANCEL; #if EV_FEATURE_API --loop_depth; #endif return activecnt; } void ev_break (EV_P_ int how) EV_THROW { loop_done = how; } void ev_ref (EV_P) EV_THROW { ++activecnt; } void ev_unref (EV_P) EV_THROW { --activecnt; } void ev_now_update (EV_P) EV_THROW { time_update (EV_A_ 1e100); } void ev_suspend (EV_P) EV_THROW { ev_now_update (EV_A); } void ev_resume (EV_P) EV_THROW { ev_tstamp mn_prev = mn_now; ev_now_update (EV_A); timers_reschedule (EV_A_ mn_now - mn_prev); #if EV_PERIODIC_ENABLE /* TODO: really do this? */ periodics_reschedule (EV_A); #endif } /*****************************************************************************/ /* singly-linked list management, used when the expected list length is short */ inline_size void wlist_add (WL *head, WL elem) { elem->next = *head; *head = elem; } inline_size void wlist_del (WL *head, WL elem) { while (*head) { if (expect_true (*head == elem)) { *head = elem->next; break; } head = &(*head)->next; } } /* internal, faster, version of ev_clear_pending */ inline_speed void clear_pending (EV_P_ W w) { if (w->pending) { pendings [ABSPRI (w)][w->pending - 1].w = (W)&pending_w; w->pending = 0; } } int ev_clear_pending (EV_P_ void *w) EV_THROW { W w_ = (W)w; int pending = w_->pending; if (expect_true (pending)) { ANPENDING *p = pendings [ABSPRI (w_)] + pending - 1; p->w = (W)&pending_w; w_->pending = 0; return p->events; } else return 0; } inline_size void pri_adjust (EV_P_ W w) { int pri = ev_priority (w); pri = pri < EV_MINPRI ? EV_MINPRI : pri; pri = pri > EV_MAXPRI ? EV_MAXPRI : pri; ev_set_priority (w, pri); } inline_speed void ev_start (EV_P_ W w, int active) { pri_adjust (EV_A_ w); w->active = active; ev_ref (EV_A); } inline_size void ev_stop (EV_P_ W w) { ev_unref (EV_A); w->active = 0; } /*****************************************************************************/ void noinline ev_io_start (EV_P_ ev_io *w) EV_THROW { int fd = w->fd; if (expect_false (ev_is_active (w))) return; assert (("libev: ev_io_start called with negative fd", fd >= 0)); assert (("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE)))); EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, 1); array_needsize (ANFD, anfds, anfdmax, fd + 1, array_init_zero); wlist_add (&anfds[fd].head, (WL)w); /* common bug, apparently */ assert (("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w)); fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY); w->events &= ~EV__IOFDSET; EV_FREQUENT_CHECK; } void noinline ev_io_stop (EV_P_ ev_io *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; assert (("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax)); EV_FREQUENT_CHECK; wlist_del (&anfds[w->fd].head, (WL)w); ev_stop (EV_A_ (W)w); fd_change (EV_A_ w->fd, EV_ANFD_REIFY); EV_FREQUENT_CHECK; } void noinline ev_timer_start (EV_P_ ev_timer *w) EV_THROW { if (expect_false (ev_is_active (w))) return; ev_at (w) += mn_now; assert (("libev: ev_timer_start called with negative timer repeat value", w->repeat >= 0.)); EV_FREQUENT_CHECK; ++timercnt; ev_start (EV_A_ (W)w, timercnt + HEAP0 - 1); array_needsize (ANHE, timers, timermax, ev_active (w) + 1, EMPTY2); ANHE_w (timers [ev_active (w)]) = (WT)w; ANHE_at_cache (timers [ev_active (w)]); upheap (timers, ev_active (w)); EV_FREQUENT_CHECK; /*assert (("libev: internal timer heap corruption", timers [ev_active (w)] == (WT)w));*/ } void noinline ev_timer_stop (EV_P_ ev_timer *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); assert (("libev: internal timer heap corruption", ANHE_w (timers [active]) == (WT)w)); --timercnt; if (expect_true (active < timercnt + HEAP0)) { timers [active] = timers [timercnt + HEAP0]; adjustheap (timers, timercnt, active); } } ev_at (w) -= mn_now; ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } void noinline ev_timer_again (EV_P_ ev_timer *w) EV_THROW { EV_FREQUENT_CHECK; clear_pending (EV_A_ (W)w); if (ev_is_active (w)) { if (w->repeat) { ev_at (w) = mn_now + w->repeat; ANHE_at_cache (timers [ev_active (w)]); adjustheap (timers, timercnt, ev_active (w)); } else ev_timer_stop (EV_A_ w); } else if (w->repeat) { ev_at (w) = w->repeat; ev_timer_start (EV_A_ w); } EV_FREQUENT_CHECK; } ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW { return ev_at (w) - (ev_is_active (w) ? mn_now : 0.); } #if EV_PERIODIC_ENABLE void noinline ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW { if (expect_false (ev_is_active (w))) return; if (w->reschedule_cb) ev_at (w) = w->reschedule_cb (w, ev_rt_now); else if (w->interval) { assert (("libev: ev_periodic_start called with negative interval value", w->interval >= 0.)); periodic_recalc (EV_A_ w); } else ev_at (w) = w->offset; EV_FREQUENT_CHECK; ++periodiccnt; ev_start (EV_A_ (W)w, periodiccnt + HEAP0 - 1); array_needsize (ANHE, periodics, periodicmax, ev_active (w) + 1, EMPTY2); ANHE_w (periodics [ev_active (w)]) = (WT)w; ANHE_at_cache (periodics [ev_active (w)]); upheap (periodics, ev_active (w)); EV_FREQUENT_CHECK; /*assert (("libev: internal periodic heap corruption", ANHE_w (periodics [ev_active (w)]) == (WT)w));*/ } void noinline ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); assert (("libev: internal periodic heap corruption", ANHE_w (periodics [active]) == (WT)w)); --periodiccnt; if (expect_true (active < periodiccnt + HEAP0)) { periodics [active] = periodics [periodiccnt + HEAP0]; adjustheap (periodics, periodiccnt, active); } } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } void noinline ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW { /* TODO: use adjustheap and recalculation */ ev_periodic_stop (EV_A_ w); ev_periodic_start (EV_A_ w); } #endif #ifndef SA_RESTART # define SA_RESTART 0 #endif #if EV_SIGNAL_ENABLE void noinline ev_signal_start (EV_P_ ev_signal *w) EV_THROW { if (expect_false (ev_is_active (w))) return; assert (("libev: ev_signal_start called with illegal signal number", w->signum > 0 && w->signum < EV_NSIG)); #if EV_MULTIPLICITY assert (("libev: a signal must not be attached to two different loops", !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop)); signals [w->signum - 1].loop = EV_A; #endif EV_FREQUENT_CHECK; #if EV_USE_SIGNALFD if (sigfd == -2) { sigfd = signalfd (-1, &sigfd_set, SFD_NONBLOCK | SFD_CLOEXEC); if (sigfd < 0 && errno == EINVAL) sigfd = signalfd (-1, &sigfd_set, 0); /* retry without flags */ if (sigfd >= 0) { fd_intern (sigfd); /* doing it twice will not hurt */ sigemptyset (&sigfd_set); ev_io_init (&sigfd_w, sigfdcb, sigfd, EV_READ); ev_set_priority (&sigfd_w, EV_MAXPRI); ev_io_start (EV_A_ &sigfd_w); ev_unref (EV_A); /* signalfd watcher should not keep loop alive */ } } if (sigfd >= 0) { /* TODO: check .head */ sigaddset (&sigfd_set, w->signum); sigprocmask (SIG_BLOCK, &sigfd_set, 0); signalfd (sigfd, &sigfd_set, 0); } #endif ev_start (EV_A_ (W)w, 1); wlist_add (&signals [w->signum - 1].head, (WL)w); if (!((WL)w)->next) # if EV_USE_SIGNALFD if (sigfd < 0) /*TODO*/ # endif { # ifdef _WIN32 evpipe_init (EV_A); signal (w->signum, ev_sighandler); # else struct sigaction sa; evpipe_init (EV_A); sa.sa_handler = ev_sighandler; sigfillset (&sa.sa_mask); sa.sa_flags = SA_RESTART; /* if restarting works we save one iteration */ sigaction (w->signum, &sa, 0); if (origflags & EVFLAG_NOSIGMASK) { sigemptyset (&sa.sa_mask); sigaddset (&sa.sa_mask, w->signum); sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0); } #endif } EV_FREQUENT_CHECK; } void noinline ev_signal_stop (EV_P_ ev_signal *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; wlist_del (&signals [w->signum - 1].head, (WL)w); ev_stop (EV_A_ (W)w); if (!signals [w->signum - 1].head) { #if EV_MULTIPLICITY signals [w->signum - 1].loop = 0; /* unattach from signal */ #endif #if EV_USE_SIGNALFD if (sigfd >= 0) { sigset_t ss; sigemptyset (&ss); sigaddset (&ss, w->signum); sigdelset (&sigfd_set, w->signum); signalfd (sigfd, &sigfd_set, 0); sigprocmask (SIG_UNBLOCK, &ss, 0); } else #endif signal (w->signum, SIG_DFL); } EV_FREQUENT_CHECK; } #endif #if EV_CHILD_ENABLE void ev_child_start (EV_P_ ev_child *w) EV_THROW { #if EV_MULTIPLICITY assert (("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr)); #endif if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, 1); wlist_add (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w); EV_FREQUENT_CHECK; } void ev_child_stop (EV_P_ ev_child *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; wlist_del (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w); ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_STAT_ENABLE # ifdef _WIN32 # undef lstat # define lstat(a,b) _stati64 (a,b) # endif #define DEF_STAT_INTERVAL 5.0074891 #define NFS_STAT_INTERVAL 30.1074891 /* for filesystems potentially failing inotify */ #define MIN_STAT_INTERVAL 0.1074891 static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents); #if EV_USE_INOTIFY /* the * 2 is to allow for alignment padding, which for some reason is >> 8 */ # define EV_INOTIFY_BUFSIZE (sizeof (struct inotify_event) * 2 + NAME_MAX) static void noinline infy_add (EV_P_ ev_stat *w) { w->wd = inotify_add_watch (fs_fd, w->path, IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF | IN_MODIFY | IN_DONT_FOLLOW | IN_MASK_ADD); if (w->wd >= 0) { struct statfs sfs; /* now local changes will be tracked by inotify, but remote changes won't */ /* unless the filesystem is known to be local, we therefore still poll */ /* also do poll on <2.6.25, but with normal frequency */ if (!fs_2625) w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; else if (!statfs (w->path, &sfs) && (sfs.f_type == 0x1373 /* devfs */ || sfs.f_type == 0xEF53 /* ext2/3 */ || sfs.f_type == 0x3153464a /* jfs */ || sfs.f_type == 0x52654973 /* reiser3 */ || sfs.f_type == 0x01021994 /* tempfs */ || sfs.f_type == 0x58465342 /* xfs */)) w->timer.repeat = 0.; /* filesystem is local, kernel new enough */ else w->timer.repeat = w->interval ? w->interval : NFS_STAT_INTERVAL; /* remote, use reduced frequency */ } else { /* can't use inotify, continue to stat */ w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; /* if path is not there, monitor some parent directory for speedup hints */ /* note that exceeding the hardcoded path limit is not a correctness issue, */ /* but an efficiency issue only */ if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096) { char path [4096]; strcpy (path, w->path); do { int mask = IN_MASK_ADD | IN_DELETE_SELF | IN_MOVE_SELF | (errno == EACCES ? IN_ATTRIB : IN_CREATE | IN_MOVED_TO); char *pend = strrchr (path, '/'); if (!pend || pend == path) break; *pend = 0; w->wd = inotify_add_watch (fs_fd, path, mask); } while (w->wd < 0 && (errno == ENOENT || errno == EACCES)); } } if (w->wd >= 0) wlist_add (&fs_hash [w->wd & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w); /* now re-arm timer, if required */ if (ev_is_active (&w->timer)) ev_ref (EV_A); ev_timer_again (EV_A_ &w->timer); if (ev_is_active (&w->timer)) ev_unref (EV_A); } static void noinline infy_del (EV_P_ ev_stat *w) { int slot; int wd = w->wd; if (wd < 0) return; w->wd = -2; slot = wd & ((EV_INOTIFY_HASHSIZE) - 1); wlist_del (&fs_hash [slot].head, (WL)w); /* remove this watcher, if others are watching it, they will rearm */ inotify_rm_watch (fs_fd, wd); } static void noinline infy_wd (EV_P_ int slot, int wd, struct inotify_event *ev) { if (slot < 0) /* overflow, need to check for all hash slots */ for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot) infy_wd (EV_A_ slot, wd, ev); else { WL w_; for (w_ = fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head; w_; ) { ev_stat *w = (ev_stat *)w_; w_ = w_->next; /* lets us remove this watcher and all before it */ if (w->wd == wd || wd == -1) { if (ev->mask & (IN_IGNORED | IN_UNMOUNT | IN_DELETE_SELF)) { wlist_del (&fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w); w->wd = -1; infy_add (EV_A_ w); /* re-add, no matter what */ } stat_timer_cb (EV_A_ &w->timer, 0); } } } } static void infy_cb (EV_P_ ev_io *w, int revents) { char buf [EV_INOTIFY_BUFSIZE]; int ofs; int len = read (fs_fd, buf, sizeof (buf)); for (ofs = 0; ofs < len; ) { struct inotify_event *ev = (struct inotify_event *)(buf + ofs); infy_wd (EV_A_ ev->wd, ev->wd, ev); ofs += sizeof (struct inotify_event) + ev->len; } } inline_size void ecb_cold ev_check_2625 (EV_P) { /* kernels < 2.6.25 are borked * http://www.ussg.indiana.edu/hypermail/linux/kernel/0711.3/1208.html */ if (ev_linux_version () < 0x020619) return; fs_2625 = 1; } inline_size int infy_newfd (void) { #if defined IN_CLOEXEC && defined IN_NONBLOCK int fd = inotify_init1 (IN_CLOEXEC | IN_NONBLOCK); if (fd >= 0) return fd; #endif return inotify_init (); } inline_size void infy_init (EV_P) { if (fs_fd != -2) return; fs_fd = -1; ev_check_2625 (EV_A); fs_fd = infy_newfd (); if (fs_fd >= 0) { fd_intern (fs_fd); ev_io_init (&fs_w, infy_cb, fs_fd, EV_READ); ev_set_priority (&fs_w, EV_MAXPRI); ev_io_start (EV_A_ &fs_w); ev_unref (EV_A); } } inline_size void infy_fork (EV_P) { int slot; if (fs_fd < 0) return; ev_ref (EV_A); ev_io_stop (EV_A_ &fs_w); close (fs_fd); fs_fd = infy_newfd (); if (fs_fd >= 0) { fd_intern (fs_fd); ev_io_set (&fs_w, fs_fd, EV_READ); ev_io_start (EV_A_ &fs_w); ev_unref (EV_A); } for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot) { WL w_ = fs_hash [slot].head; fs_hash [slot].head = 0; while (w_) { ev_stat *w = (ev_stat *)w_; w_ = w_->next; /* lets us add this watcher */ w->wd = -1; if (fs_fd >= 0) infy_add (EV_A_ w); /* re-add, no matter what */ else { w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; if (ev_is_active (&w->timer)) ev_ref (EV_A); ev_timer_again (EV_A_ &w->timer); if (ev_is_active (&w->timer)) ev_unref (EV_A); } } } } #endif #ifdef _WIN32 # define EV_LSTAT(p,b) _stati64 (p, b) #else # define EV_LSTAT(p,b) lstat (p, b) #endif void ev_stat_stat (EV_P_ ev_stat *w) EV_THROW { if (lstat (w->path, &w->attr) < 0) w->attr.st_nlink = 0; else if (!w->attr.st_nlink) w->attr.st_nlink = 1; } static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents) { ev_stat *w = (ev_stat *)(((char *)w_) - offsetof (ev_stat, timer)); ev_statdata prev = w->attr; ev_stat_stat (EV_A_ w); /* memcmp doesn't work on netbsd, they.... do stuff to their struct stat */ if ( prev.st_dev != w->attr.st_dev || prev.st_ino != w->attr.st_ino || prev.st_mode != w->attr.st_mode || prev.st_nlink != w->attr.st_nlink || prev.st_uid != w->attr.st_uid || prev.st_gid != w->attr.st_gid || prev.st_rdev != w->attr.st_rdev || prev.st_size != w->attr.st_size || prev.st_atime != w->attr.st_atime || prev.st_mtime != w->attr.st_mtime || prev.st_ctime != w->attr.st_ctime ) { /* we only update w->prev on actual differences */ /* in case we test more often than invoke the callback, */ /* to ensure that prev is always different to attr */ w->prev = prev; #if EV_USE_INOTIFY if (fs_fd >= 0) { infy_del (EV_A_ w); infy_add (EV_A_ w); ev_stat_stat (EV_A_ w); /* avoid race... */ } #endif ev_feed_event (EV_A_ w, EV_STAT); } } void ev_stat_start (EV_P_ ev_stat *w) EV_THROW { if (expect_false (ev_is_active (w))) return; ev_stat_stat (EV_A_ w); if (w->interval < MIN_STAT_INTERVAL && w->interval) w->interval = MIN_STAT_INTERVAL; ev_timer_init (&w->timer, stat_timer_cb, 0., w->interval ? w->interval : DEF_STAT_INTERVAL); ev_set_priority (&w->timer, ev_priority (w)); #if EV_USE_INOTIFY infy_init (EV_A); if (fs_fd >= 0) infy_add (EV_A_ w); else #endif { ev_timer_again (EV_A_ &w->timer); ev_unref (EV_A); } ev_start (EV_A_ (W)w, 1); EV_FREQUENT_CHECK; } void ev_stat_stop (EV_P_ ev_stat *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; #if EV_USE_INOTIFY infy_del (EV_A_ w); #endif if (ev_is_active (&w->timer)) { ev_ref (EV_A); ev_timer_stop (EV_A_ &w->timer); } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_IDLE_ENABLE void ev_idle_start (EV_P_ ev_idle *w) EV_THROW { if (expect_false (ev_is_active (w))) return; pri_adjust (EV_A_ (W)w); EV_FREQUENT_CHECK; { int active = ++idlecnt [ABSPRI (w)]; ++idleall; ev_start (EV_A_ (W)w, active); array_needsize (ev_idle *, idles [ABSPRI (w)], idlemax [ABSPRI (w)], active, EMPTY2); idles [ABSPRI (w)][active - 1] = w; } EV_FREQUENT_CHECK; } void ev_idle_stop (EV_P_ ev_idle *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); idles [ABSPRI (w)][active - 1] = idles [ABSPRI (w)][--idlecnt [ABSPRI (w)]]; ev_active (idles [ABSPRI (w)][active - 1]) = active; ev_stop (EV_A_ (W)w); --idleall; } EV_FREQUENT_CHECK; } #endif #if EV_PREPARE_ENABLE void ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++preparecnt); array_needsize (ev_prepare *, prepares, preparemax, preparecnt, EMPTY2); prepares [preparecnt - 1] = w; EV_FREQUENT_CHECK; } void ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); prepares [active - 1] = prepares [--preparecnt]; ev_active (prepares [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_CHECK_ENABLE void ev_check_start (EV_P_ ev_check *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++checkcnt); array_needsize (ev_check *, checks, checkmax, checkcnt, EMPTY2); checks [checkcnt - 1] = w; EV_FREQUENT_CHECK; } void ev_check_stop (EV_P_ ev_check *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); checks [active - 1] = checks [--checkcnt]; ev_active (checks [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_EMBED_ENABLE void noinline ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW { ev_run (w->other, EVRUN_NOWAIT); } static void embed_io_cb (EV_P_ ev_io *io, int revents) { ev_embed *w = (ev_embed *)(((char *)io) - offsetof (ev_embed, io)); if (ev_cb (w)) ev_feed_event (EV_A_ (W)w, EV_EMBED); else ev_run (w->other, EVRUN_NOWAIT); } static void embed_prepare_cb (EV_P_ ev_prepare *prepare, int revents) { ev_embed *w = (ev_embed *)(((char *)prepare) - offsetof (ev_embed, prepare)); { EV_P = w->other; while (fdchangecnt) { fd_reify (EV_A); ev_run (EV_A_ EVRUN_NOWAIT); } } } static void embed_fork_cb (EV_P_ ev_fork *fork_w, int revents) { ev_embed *w = (ev_embed *)(((char *)fork_w) - offsetof (ev_embed, fork)); ev_embed_stop (EV_A_ w); { EV_P = w->other; ev_loop_fork (EV_A); ev_run (EV_A_ EVRUN_NOWAIT); } ev_embed_start (EV_A_ w); } #if 0 static void embed_idle_cb (EV_P_ ev_idle *idle, int revents) { ev_idle_stop (EV_A_ idle); } #endif void ev_embed_start (EV_P_ ev_embed *w) EV_THROW { if (expect_false (ev_is_active (w))) return; { EV_P = w->other; assert (("libev: loop to be embedded is not embeddable", backend & ev_embeddable_backends ())); ev_io_init (&w->io, embed_io_cb, backend_fd, EV_READ); } EV_FREQUENT_CHECK; ev_set_priority (&w->io, ev_priority (w)); ev_io_start (EV_A_ &w->io); ev_prepare_init (&w->prepare, embed_prepare_cb); ev_set_priority (&w->prepare, EV_MINPRI); ev_prepare_start (EV_A_ &w->prepare); ev_fork_init (&w->fork, embed_fork_cb); ev_fork_start (EV_A_ &w->fork); /*ev_idle_init (&w->idle, e,bed_idle_cb);*/ ev_start (EV_A_ (W)w, 1); EV_FREQUENT_CHECK; } void ev_embed_stop (EV_P_ ev_embed *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_io_stop (EV_A_ &w->io); ev_prepare_stop (EV_A_ &w->prepare); ev_fork_stop (EV_A_ &w->fork); ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_FORK_ENABLE void ev_fork_start (EV_P_ ev_fork *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++forkcnt); array_needsize (ev_fork *, forks, forkmax, forkcnt, EMPTY2); forks [forkcnt - 1] = w; EV_FREQUENT_CHECK; } void ev_fork_stop (EV_P_ ev_fork *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); forks [active - 1] = forks [--forkcnt]; ev_active (forks [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_CLEANUP_ENABLE void ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++cleanupcnt); array_needsize (ev_cleanup *, cleanups, cleanupmax, cleanupcnt, EMPTY2); cleanups [cleanupcnt - 1] = w; /* cleanup watchers should never keep a refcount on the loop */ ev_unref (EV_A); EV_FREQUENT_CHECK; } void ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_ref (EV_A); { int active = ev_active (w); cleanups [active - 1] = cleanups [--cleanupcnt]; ev_active (cleanups [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_ASYNC_ENABLE void ev_async_start (EV_P_ ev_async *w) EV_THROW { if (expect_false (ev_is_active (w))) return; w->sent = 0; evpipe_init (EV_A); EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++asynccnt); array_needsize (ev_async *, asyncs, asyncmax, asynccnt, EMPTY2); asyncs [asynccnt - 1] = w; EV_FREQUENT_CHECK; } void ev_async_stop (EV_P_ ev_async *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); asyncs [active - 1] = asyncs [--asynccnt]; ev_active (asyncs [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } void ev_async_send (EV_P_ ev_async *w) EV_THROW { w->sent = 1; evpipe_write (EV_A_ &async_pending); } #endif /*****************************************************************************/ struct ev_once { ev_io io; ev_timer to; void (*cb)(int revents, void *arg); void *arg; }; static void once_cb (EV_P_ struct ev_once *once, int revents) { void (*cb)(int revents, void *arg) = once->cb; void *arg = once->arg; ev_io_stop (EV_A_ &once->io); ev_timer_stop (EV_A_ &once->to); ev_free (once); cb (revents, arg); } static void once_cb_io (EV_P_ ev_io *w, int revents) { struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io)); once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->to)); } static void once_cb_to (EV_P_ ev_timer *w, int revents) { struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to)); once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->io)); } void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW { struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once)); if (expect_false (!once)) { cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMER, arg); return; } once->cb = cb; once->arg = arg; ev_init (&once->io, once_cb_io); if (fd >= 0) { ev_io_set (&once->io, fd, events); ev_io_start (EV_A_ &once->io); } ev_init (&once->to, once_cb_to); if (timeout >= 0.) { ev_timer_set (&once->to, timeout, 0.); ev_timer_start (EV_A_ &once->to); } } /*****************************************************************************/ #if EV_WALK_ENABLE void ecb_cold ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW { int i, j; ev_watcher_list *wl, *wn; if (types & (EV_IO | EV_EMBED)) for (i = 0; i < anfdmax; ++i) for (wl = anfds [i].head; wl; ) { wn = wl->next; #if EV_EMBED_ENABLE if (ev_cb ((ev_io *)wl) == embed_io_cb) { if (types & EV_EMBED) cb (EV_A_ EV_EMBED, ((char *)wl) - offsetof (struct ev_embed, io)); } else #endif #if EV_USE_INOTIFY if (ev_cb ((ev_io *)wl) == infy_cb) ; else #endif if ((ev_io *)wl != &pipe_w) if (types & EV_IO) cb (EV_A_ EV_IO, wl); wl = wn; } if (types & (EV_TIMER | EV_STAT)) for (i = timercnt + HEAP0; i-- > HEAP0; ) #if EV_STAT_ENABLE /*TODO: timer is not always active*/ if (ev_cb ((ev_timer *)ANHE_w (timers [i])) == stat_timer_cb) { if (types & EV_STAT) cb (EV_A_ EV_STAT, ((char *)ANHE_w (timers [i])) - offsetof (struct ev_stat, timer)); } else #endif if (types & EV_TIMER) cb (EV_A_ EV_TIMER, ANHE_w (timers [i])); #if EV_PERIODIC_ENABLE if (types & EV_PERIODIC) for (i = periodiccnt + HEAP0; i-- > HEAP0; ) cb (EV_A_ EV_PERIODIC, ANHE_w (periodics [i])); #endif #if EV_IDLE_ENABLE if (types & EV_IDLE) for (j = NUMPRI; j--; ) for (i = idlecnt [j]; i--; ) cb (EV_A_ EV_IDLE, idles [j][i]); #endif #if EV_FORK_ENABLE if (types & EV_FORK) for (i = forkcnt; i--; ) if (ev_cb (forks [i]) != embed_fork_cb) cb (EV_A_ EV_FORK, forks [i]); #endif #if EV_ASYNC_ENABLE if (types & EV_ASYNC) for (i = asynccnt; i--; ) cb (EV_A_ EV_ASYNC, asyncs [i]); #endif #if EV_PREPARE_ENABLE if (types & EV_PREPARE) for (i = preparecnt; i--; ) # if EV_EMBED_ENABLE if (ev_cb (prepares [i]) != embed_prepare_cb) # endif cb (EV_A_ EV_PREPARE, prepares [i]); #endif #if EV_CHECK_ENABLE if (types & EV_CHECK) for (i = checkcnt; i--; ) cb (EV_A_ EV_CHECK, checks [i]); #endif #if EV_SIGNAL_ENABLE if (types & EV_SIGNAL) for (i = 0; i < EV_NSIG - 1; ++i) for (wl = signals [i].head; wl; ) { wn = wl->next; cb (EV_A_ EV_SIGNAL, wl); wl = wn; } #endif #if EV_CHILD_ENABLE if (types & EV_CHILD) for (i = (EV_PID_HASHSIZE); i--; ) for (wl = childs [i]; wl; ) { wn = wl->next; cb (EV_A_ EV_CHILD, wl); wl = wn; } #endif /* EV_STAT 0x00001000 /* stat data changed */ /* EV_EMBED 0x00010000 /* embedded event loop needs sweep */ } #endif #if EV_MULTIPLICITY #include "ev_wrap.h" #endif tarantool-1.5.1.218.g1a69fd6/third_party/libev/update_symbols0000775000000000000000000000030612202131537022365 0ustar rootroot#!/bin/sh make ev.o event.o || exit nm ev.o | perl -ne 'print "$1\n" if /\S+ [A-Z] (\S+)/' > Symbols.ev nm event.o | perl -ne 'print "$1\n" if /\S+ [A-Z] (\S+)/' > Symbols.event tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev.h0000664000000000000000000007026212202131537020200 0ustar rootroot/* * libev native API header * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef EV_H_ #define EV_H_ #ifdef __cplusplus # define EV_CPP(x) x #else # define EV_CPP(x) #endif #define EV_THROW EV_CPP(throw()) EV_CPP(extern "C" {) /*****************************************************************************/ /* pre-4.0 compatibility */ #ifndef EV_COMPAT3 # define EV_COMPAT3 1 #endif #ifndef EV_FEATURES # if defined __OPTIMIZE_SIZE__ # define EV_FEATURES 0x7c # else # define EV_FEATURES 0x7f # endif #endif #define EV_FEATURE_CODE ((EV_FEATURES) & 1) #define EV_FEATURE_DATA ((EV_FEATURES) & 2) #define EV_FEATURE_CONFIG ((EV_FEATURES) & 4) #define EV_FEATURE_API ((EV_FEATURES) & 8) #define EV_FEATURE_WATCHERS ((EV_FEATURES) & 16) #define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32) #define EV_FEATURE_OS ((EV_FEATURES) & 64) /* these priorities are inclusive, higher priorities will be invoked earlier */ #ifndef EV_MINPRI # define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0) #endif #ifndef EV_MAXPRI # define EV_MAXPRI (EV_FEATURE_CONFIG ? +2 : 0) #endif #ifndef EV_MULTIPLICITY # define EV_MULTIPLICITY EV_FEATURE_CONFIG #endif #ifndef EV_PERIODIC_ENABLE # define EV_PERIODIC_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_STAT_ENABLE # define EV_STAT_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_PREPARE_ENABLE # define EV_PREPARE_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_CHECK_ENABLE # define EV_CHECK_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_IDLE_ENABLE # define EV_IDLE_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_FORK_ENABLE # define EV_FORK_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_CLEANUP_ENABLE # define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_SIGNAL_ENABLE # define EV_SIGNAL_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_CHILD_ENABLE # ifdef _WIN32 # define EV_CHILD_ENABLE 0 # else # define EV_CHILD_ENABLE EV_FEATURE_WATCHERS #endif #endif #ifndef EV_ASYNC_ENABLE # define EV_ASYNC_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_EMBED_ENABLE # define EV_EMBED_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_WALK_ENABLE # define EV_WALK_ENABLE 0 /* not yet */ #endif /*****************************************************************************/ #if EV_CHILD_ENABLE && !EV_SIGNAL_ENABLE # undef EV_SIGNAL_ENABLE # define EV_SIGNAL_ENABLE 1 #endif /*****************************************************************************/ typedef double ev_tstamp; #ifndef EV_ATOMIC_T # include # define EV_ATOMIC_T sig_atomic_t volatile #endif #if EV_STAT_ENABLE # ifdef _WIN32 # include # include # endif # include #endif /* support multiple event loops? */ #if EV_MULTIPLICITY struct ev_loop; # define EV_P struct ev_loop *loop /* a loop as sole parameter in a declaration */ # define EV_P_ EV_P, /* a loop as first of multiple parameters */ # define EV_A loop /* a loop as sole argument to a function call */ # define EV_A_ EV_A, /* a loop as first of multiple arguments */ # define EV_DEFAULT_UC ev_default_loop_uc_ () /* the default loop, if initialised, as sole arg */ # define EV_DEFAULT_UC_ EV_DEFAULT_UC, /* the default loop as first of multiple arguments */ # define EV_DEFAULT ev_default_loop (0) /* the default loop as sole arg */ # define EV_DEFAULT_ EV_DEFAULT, /* the default loop as first of multiple arguments */ #else # define EV_P void # define EV_P_ # define EV_A # define EV_A_ # define EV_DEFAULT # define EV_DEFAULT_ # define EV_DEFAULT_UC # define EV_DEFAULT_UC_ # undef EV_EMBED_ENABLE #endif /* EV_INLINE is used for functions in header files */ #if __STDC_VERSION__ >= 199901L || __GNUC__ >= 3 # define EV_INLINE static inline #else # define EV_INLINE static #endif #ifdef EV_API_STATIC # define EV_API_DECL static #else # define EV_API_DECL extern #endif /* EV_PROTOTYPES can be used to switch of prototype declarations */ #ifndef EV_PROTOTYPES # define EV_PROTOTYPES 1 #endif /*****************************************************************************/ #define EV_VERSION_MAJOR 4 #define EV_VERSION_MINOR 11 /* eventmask, revents, events... */ enum { EV_UNDEF = 0xFFFFFFFF, /* guaranteed to be invalid */ EV_NONE = 0x00, /* no events */ EV_READ = 0x01, /* ev_io detected read will not block */ EV_WRITE = 0x02, /* ev_io detected write will not block */ EV__IOFDSET = 0x80, /* internal use only */ EV_IO = EV_READ, /* alias for type-detection */ EV_TIMER = 0x00000100, /* timer timed out */ #if EV_COMPAT3 EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */ #endif EV_PERIODIC = 0x00000200, /* periodic timer timed out */ EV_SIGNAL = 0x00000400, /* signal was received */ EV_CHILD = 0x00000800, /* child/pid had status change */ EV_STAT = 0x00001000, /* stat data changed */ EV_IDLE = 0x00002000, /* event loop is idling */ EV_PREPARE = 0x00004000, /* event loop about to poll */ EV_CHECK = 0x00008000, /* event loop finished poll */ EV_EMBED = 0x00010000, /* embedded event loop needs sweep */ EV_FORK = 0x00020000, /* event loop resumed in child */ EV_CLEANUP = 0x00040000, /* event loop resumed in child */ EV_ASYNC = 0x00080000, /* async intra-loop signal */ EV_CUSTOM = 0x01000000, /* for use by user code */ EV_ERROR = 0x80000000 /* sent when an error occurs */ }; /* can be used to add custom fields to all watchers, while losing binary compatibility */ #ifndef EV_COMMON # define EV_COMMON void *data; #endif #ifndef EV_CB_DECLARE # define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents); #endif #ifndef EV_CB_INVOKE # define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents)) #endif /* not official, do not use */ #define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents) /* * struct member types: * private: you may look at them, but not change them, * and they might not mean anything to you. * ro: can be read anytime, but only changed when the watcher isn't active. * rw: can be read and modified anytime, even when the watcher is active. * * some internal details that might be helpful for debugging: * * active is either 0, which means the watcher is not active, * or the array index of the watcher (periodics, timers) * or the array index + 1 (most other watchers) * or simply 1 for watchers that aren't in some array. * pending is either 0, in which case the watcher isn't, * or the array index + 1 in the pendings array. */ #if EV_MINPRI == EV_MAXPRI # define EV_DECL_PRIORITY #elif !defined (EV_DECL_PRIORITY) # define EV_DECL_PRIORITY int priority; #endif /* shared by all watchers */ #define EV_WATCHER(type) \ int active; /* private */ \ int pending; /* private */ \ EV_DECL_PRIORITY /* private */ \ EV_COMMON /* rw */ \ EV_CB_DECLARE (type) /* private */ #define EV_WATCHER_LIST(type) \ EV_WATCHER (type) \ struct ev_watcher_list *next; /* private */ #define EV_WATCHER_TIME(type) \ EV_WATCHER (type) \ ev_tstamp at; /* private */ /* base class, nothing to see here unless you subclass */ typedef struct ev_watcher { EV_WATCHER (ev_watcher) } ev_watcher; /* base class, nothing to see here unless you subclass */ typedef struct ev_watcher_list { EV_WATCHER_LIST (ev_watcher_list) } ev_watcher_list; /* base class, nothing to see here unless you subclass */ typedef struct ev_watcher_time { EV_WATCHER_TIME (ev_watcher_time) } ev_watcher_time; /* invoked when fd is either EV_READable or EV_WRITEable */ /* revent EV_READ, EV_WRITE */ typedef struct ev_io { EV_WATCHER_LIST (ev_io) int fd; /* ro */ int events; /* ro */ } ev_io; /* invoked after a specific time, repeatable (based on monotonic clock) */ /* revent EV_TIMEOUT */ typedef struct ev_timer { EV_WATCHER_TIME (ev_timer) ev_tstamp repeat; /* rw */ } ev_timer; /* invoked at some specific time, possibly repeating at regular intervals (based on UTC) */ /* revent EV_PERIODIC */ typedef struct ev_periodic { EV_WATCHER_TIME (ev_periodic) ev_tstamp offset; /* rw */ ev_tstamp interval; /* rw */ ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) EV_THROW; /* rw */ } ev_periodic; /* invoked when the given signal has been received */ /* revent EV_SIGNAL */ typedef struct ev_signal { EV_WATCHER_LIST (ev_signal) int signum; /* ro */ } ev_signal; /* invoked when sigchld is received and waitpid indicates the given pid */ /* revent EV_CHILD */ /* does not support priorities */ typedef struct ev_child { EV_WATCHER_LIST (ev_child) int flags; /* private */ int pid; /* ro */ int rpid; /* rw, holds the received pid */ int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */ } ev_child; #if EV_STAT_ENABLE /* st_nlink = 0 means missing file or other error */ # ifdef _WIN32 typedef struct _stati64 ev_statdata; # else typedef struct stat ev_statdata; # endif /* invoked each time the stat data changes for a given path */ /* revent EV_STAT */ typedef struct ev_stat { EV_WATCHER_LIST (ev_stat) ev_timer timer; /* private */ ev_tstamp interval; /* ro */ const char *path; /* ro */ ev_statdata prev; /* ro */ ev_statdata attr; /* ro */ int wd; /* wd for inotify, fd for kqueue */ } ev_stat; #endif #if EV_IDLE_ENABLE /* invoked when the nothing else needs to be done, keeps the process from blocking */ /* revent EV_IDLE */ typedef struct ev_idle { EV_WATCHER (ev_idle) } ev_idle; #endif /* invoked for each run of the mainloop, just before the blocking call */ /* you can still change events in any way you like */ /* revent EV_PREPARE */ typedef struct ev_prepare { EV_WATCHER (ev_prepare) } ev_prepare; /* invoked for each run of the mainloop, just after the blocking call */ /* revent EV_CHECK */ typedef struct ev_check { EV_WATCHER (ev_check) } ev_check; #if EV_FORK_ENABLE /* the callback gets invoked before check in the child process when a fork was detected */ /* revent EV_FORK */ typedef struct ev_fork { EV_WATCHER (ev_fork) } ev_fork; #endif #if EV_CLEANUP_ENABLE /* is invoked just before the loop gets destroyed */ /* revent EV_CLEANUP */ typedef struct ev_cleanup { EV_WATCHER (ev_cleanup) } ev_cleanup; #endif #if EV_EMBED_ENABLE /* used to embed an event loop inside another */ /* the callback gets invoked when the event loop has handled events, and can be 0 */ typedef struct ev_embed { EV_WATCHER (ev_embed) struct ev_loop *other; /* ro */ ev_io io; /* private */ ev_prepare prepare; /* private */ ev_check check; /* unused */ ev_timer timer; /* unused */ ev_periodic periodic; /* unused */ ev_idle idle; /* unused */ ev_fork fork; /* private */ #if EV_CLEANUP_ENABLE ev_cleanup cleanup; /* unused */ #endif } ev_embed; #endif #if EV_ASYNC_ENABLE /* invoked when somebody calls ev_async_send on the watcher */ /* revent EV_ASYNC */ typedef struct ev_async { EV_WATCHER (ev_async) EV_ATOMIC_T sent; /* private */ } ev_async; # define ev_async_pending(w) (+(w)->sent) #endif /* the presence of this union forces similar struct layout */ union ev_any_watcher { struct ev_watcher w; struct ev_watcher_list wl; struct ev_io io; struct ev_timer timer; struct ev_periodic periodic; struct ev_signal signal; struct ev_child child; #if EV_STAT_ENABLE struct ev_stat stat; #endif #if EV_IDLE_ENABLE struct ev_idle idle; #endif struct ev_prepare prepare; struct ev_check check; #if EV_FORK_ENABLE struct ev_fork fork; #endif #if EV_CLEANUP_ENABLE struct ev_cleanup cleanup; #endif #if EV_EMBED_ENABLE struct ev_embed embed; #endif #if EV_ASYNC_ENABLE struct ev_async async; #endif }; /* flag bits for ev_default_loop and ev_loop_new */ enum { /* the default */ EVFLAG_AUTO = 0x00000000U, /* not quite a mask */ /* flag bits */ EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */ EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */ /* debugging/feature disable */ EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */ #if EV_COMPAT3 EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */ #endif EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */ EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */ }; /* method bits to be ored together */ enum { EVBACKEND_SELECT = 0x00000001U, /* about anywhere */ EVBACKEND_POLL = 0x00000002U, /* !win */ EVBACKEND_EPOLL = 0x00000004U, /* linux */ EVBACKEND_KQUEUE = 0x00000008U, /* bsd */ EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ EVBACKEND_ALL = 0x0000003FU, /* all known backends */ EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ }; #if EV_PROTOTYPES EV_API_DECL int ev_version_major (void) EV_THROW; EV_API_DECL int ev_version_minor (void) EV_THROW; EV_API_DECL unsigned int ev_supported_backends (void) EV_THROW; EV_API_DECL unsigned int ev_recommended_backends (void) EV_THROW; EV_API_DECL unsigned int ev_embeddable_backends (void) EV_THROW; EV_API_DECL ev_tstamp ev_time (void) EV_THROW; EV_API_DECL void ev_sleep (ev_tstamp delay) EV_THROW; /* sleep for a while */ /* Sets the allocation function to use, works like realloc. * It is used to allocate and free memory. * If it returns zero when memory needs to be allocated, the library might abort * or take some potentially destructive action. * The default is your system realloc function. */ EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW; /* set the callback function to call on a * retryable syscall error * (such as failed select, poll, epoll_wait) */ EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW; #if EV_MULTIPLICITY /* the default loop is the only one that handles signals and child watchers */ /* you can call this as often as you like */ EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; #ifdef EV_API_STATIC EV_API_DECL struct ev_loop *ev_default_loop_ptr; #endif EV_INLINE struct ev_loop * ev_default_loop_uc_ (void) EV_THROW { extern struct ev_loop *ev_default_loop_ptr; return ev_default_loop_ptr; } EV_INLINE int ev_is_default_loop (EV_P) EV_THROW { return EV_A == EV_DEFAULT_UC; } /* create and destroy alternative loops that don't handle signals */ EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_THROW; EV_API_DECL ev_tstamp ev_now (EV_P) EV_THROW; /* time w.r.t. timers and the eventloop, updated after each poll */ #else EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; /* returns true when successful */ EV_API_DECL ev_tstamp ev_rt_now; EV_INLINE ev_tstamp ev_now (void) EV_THROW { return ev_rt_now; } /* looks weird, but ev_is_default_loop (EV_A) still works if this exists */ EV_INLINE int ev_is_default_loop (void) EV_THROW { return 1; } #endif /* multiplicity */ /* destroy event loops, also works for the default loop */ EV_API_DECL void ev_loop_destroy (EV_P); /* this needs to be called after fork, to duplicate the loop */ /* when you want to re-use it in the child */ /* you can call it in either the parent or the child */ /* you can actually call it at any time, anywhere :) */ EV_API_DECL void ev_loop_fork (EV_P) EV_THROW; EV_API_DECL unsigned int ev_backend (EV_P) EV_THROW; /* backend in use by loop */ EV_API_DECL void ev_now_update (EV_P) EV_THROW; /* update event loop time */ #if EV_WALK_ENABLE /* walk (almost) all watchers in the loop of a given type, invoking the */ /* callback on every such watcher. The callback might stop the watcher, */ /* but do nothing else with the loop */ EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW; #endif #endif /* prototypes */ /* ev_run flags values */ enum { EVRUN_NOWAIT = 1, /* do not block/wait */ EVRUN_ONCE = 2 /* block *once* only */ }; /* ev_break how values */ enum { EVBREAK_CANCEL = 0, /* undo unloop */ EVBREAK_ONE = 1, /* unloop once */ EVBREAK_ALL = 2 /* unloop all loops */ }; #if EV_PROTOTYPES EV_API_DECL int ev_run (EV_P_ int flags EV_CPP (= 0)); EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)) EV_THROW; /* break out of the loop */ /* * ref/unref can be used to add or remove a refcount on the mainloop. every watcher * keeps one reference. if you have a long-running watcher you never unregister that * should not keep ev_loop from running, unref() after starting, and ref() before stopping. */ EV_API_DECL void ev_ref (EV_P) EV_THROW; EV_API_DECL void ev_unref (EV_P) EV_THROW; /* * convenience function, wait for a single event, without registering an event watcher * if timeout is < 0, do wait indefinitely */ EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW; # if EV_FEATURE_API EV_API_DECL unsigned int ev_iteration (EV_P) EV_THROW; /* number of loop iterations */ EV_API_DECL unsigned int ev_depth (EV_P) EV_THROW; /* #ev_loop enters - #ev_loop leaves */ EV_API_DECL void ev_verify (EV_P) EV_THROW; /* abort if loop data corrupted */ EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */ EV_API_DECL void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */ /* advanced stuff for threading etc. support, see docs */ EV_API_DECL void ev_set_userdata (EV_P_ void *data) EV_THROW; EV_API_DECL void *ev_userdata (EV_P) EV_THROW; EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW; EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P) EV_THROW) EV_THROW; EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */ EV_API_DECL void ev_invoke_pending (EV_P); /* invoke all pending watchers */ /* * stop/start the timer handling. */ EV_API_DECL void ev_suspend (EV_P) EV_THROW; EV_API_DECL void ev_resume (EV_P) EV_THROW; #endif #endif /* these may evaluate ev multiple times, and the other arguments at most once */ /* either use ev_init + ev_TYPE_set, or the ev_TYPE_init macro, below, to first initialise a watcher */ #define ev_init(ev,cb_) do { \ ((ev_watcher *)(void *)(ev))->active = \ ((ev_watcher *)(void *)(ev))->pending = 0; \ ev_set_priority ((ev), 0); \ ev_set_cb ((ev), cb_); \ } while (0) #define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV__IOFDSET; } while (0) #define ev_timer_set(ev,after_,repeat_) do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0) #define ev_periodic_set(ev,ofs_,ival_,rcb_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb = (rcb_); } while (0) #define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0) #define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0) #define ev_stat_set(ev,path_,interval_) do { (ev)->path = (path_); (ev)->interval = (interval_); (ev)->wd = -2; } while (0) #define ev_idle_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_prepare_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_check_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_embed_set(ev,other_) do { (ev)->other = (other_); } while (0) #define ev_fork_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_cleanup_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_async_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_io_init(ev,cb,fd,events) do { ev_init ((ev), (cb)); ev_io_set ((ev),(fd),(events)); } while (0) #define ev_timer_init(ev,cb,after,repeat) do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0) #define ev_periodic_init(ev,cb,ofs,ival,rcb) do { ev_init ((ev), (cb)); ev_periodic_set ((ev),(ofs),(ival),(rcb)); } while (0) #define ev_signal_init(ev,cb,signum) do { ev_init ((ev), (cb)); ev_signal_set ((ev), (signum)); } while (0) #define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0) #define ev_stat_init(ev,cb,path,interval) do { ev_init ((ev), (cb)); ev_stat_set ((ev),(path),(interval)); } while (0) #define ev_idle_init(ev,cb) do { ev_init ((ev), (cb)); ev_idle_set ((ev)); } while (0) #define ev_prepare_init(ev,cb) do { ev_init ((ev), (cb)); ev_prepare_set ((ev)); } while (0) #define ev_check_init(ev,cb) do { ev_init ((ev), (cb)); ev_check_set ((ev)); } while (0) #define ev_embed_init(ev,cb,other) do { ev_init ((ev), (cb)); ev_embed_set ((ev),(other)); } while (0) #define ev_fork_init(ev,cb) do { ev_init ((ev), (cb)); ev_fork_set ((ev)); } while (0) #define ev_cleanup_init(ev,cb) do { ev_init ((ev), (cb)); ev_cleanup_set ((ev)); } while (0) #define ev_async_init(ev,cb) do { ev_init ((ev), (cb)); ev_async_set ((ev)); } while (0) #define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */ #define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */ #define ev_cb(ev) (ev)->cb /* rw */ #if EV_MINPRI == EV_MAXPRI # define ev_priority(ev) ((ev), EV_MINPRI) # define ev_set_priority(ev,pri) ((ev), (pri)) #else # define ev_priority(ev) (+(((ev_watcher *)(void *)(ev))->priority)) # define ev_set_priority(ev,pri) ( (ev_watcher *)(void *)(ev))->priority = (pri) #endif #define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at) #ifndef ev_set_cb # define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_) #endif /* stopping (enabling, adding) a watcher does nothing if it is already running */ /* stopping (disabling, deleting) a watcher does nothing unless its already running */ #if EV_PROTOTYPES /* feeds an event into a watcher as if the event actually occurred */ /* accepts any ev_watcher type */ EV_API_DECL void ev_feed_event (EV_P_ void *w, int revents) EV_THROW; EV_API_DECL void ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW; #if EV_SIGNAL_ENABLE EV_API_DECL void ev_feed_signal (int signum) EV_THROW; EV_API_DECL void ev_feed_signal_event (EV_P_ int signum) EV_THROW; #endif EV_API_DECL void ev_invoke (EV_P_ void *w, int revents); EV_API_DECL int ev_clear_pending (EV_P_ void *w) EV_THROW; EV_API_DECL void ev_io_start (EV_P_ ev_io *w) EV_THROW; EV_API_DECL void ev_io_stop (EV_P_ ev_io *w) EV_THROW; EV_API_DECL void ev_timer_start (EV_P_ ev_timer *w) EV_THROW; EV_API_DECL void ev_timer_stop (EV_P_ ev_timer *w) EV_THROW; /* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */ EV_API_DECL void ev_timer_again (EV_P_ ev_timer *w) EV_THROW; /* return remaining time */ EV_API_DECL ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW; #if EV_PERIODIC_ENABLE EV_API_DECL void ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW; EV_API_DECL void ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW; EV_API_DECL void ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW; #endif /* only supported in the default loop */ #if EV_SIGNAL_ENABLE EV_API_DECL void ev_signal_start (EV_P_ ev_signal *w) EV_THROW; EV_API_DECL void ev_signal_stop (EV_P_ ev_signal *w) EV_THROW; #endif /* only supported in the default loop */ # if EV_CHILD_ENABLE EV_API_DECL void ev_child_start (EV_P_ ev_child *w) EV_THROW; EV_API_DECL void ev_child_stop (EV_P_ ev_child *w) EV_THROW; # endif # if EV_STAT_ENABLE EV_API_DECL void ev_stat_start (EV_P_ ev_stat *w) EV_THROW; EV_API_DECL void ev_stat_stop (EV_P_ ev_stat *w) EV_THROW; EV_API_DECL void ev_stat_stat (EV_P_ ev_stat *w) EV_THROW; # endif # if EV_IDLE_ENABLE EV_API_DECL void ev_idle_start (EV_P_ ev_idle *w) EV_THROW; EV_API_DECL void ev_idle_stop (EV_P_ ev_idle *w) EV_THROW; # endif #if EV_PREPARE_ENABLE EV_API_DECL void ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW; EV_API_DECL void ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW; #endif #if EV_CHECK_ENABLE EV_API_DECL void ev_check_start (EV_P_ ev_check *w) EV_THROW; EV_API_DECL void ev_check_stop (EV_P_ ev_check *w) EV_THROW; #endif # if EV_FORK_ENABLE EV_API_DECL void ev_fork_start (EV_P_ ev_fork *w) EV_THROW; EV_API_DECL void ev_fork_stop (EV_P_ ev_fork *w) EV_THROW; # endif # if EV_CLEANUP_ENABLE EV_API_DECL void ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW; EV_API_DECL void ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW; # endif # if EV_EMBED_ENABLE /* only supported when loop to be embedded is in fact embeddable */ EV_API_DECL void ev_embed_start (EV_P_ ev_embed *w) EV_THROW; EV_API_DECL void ev_embed_stop (EV_P_ ev_embed *w) EV_THROW; EV_API_DECL void ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW; # endif # if EV_ASYNC_ENABLE EV_API_DECL void ev_async_start (EV_P_ ev_async *w) EV_THROW; EV_API_DECL void ev_async_stop (EV_P_ ev_async *w) EV_THROW; EV_API_DECL void ev_async_send (EV_P_ ev_async *w) EV_THROW; # endif #if EV_COMPAT3 #define EVLOOP_NONBLOCK EVRUN_NOWAIT #define EVLOOP_ONESHOT EVRUN_ONCE #define EVUNLOOP_CANCEL EVBREAK_CANCEL #define EVUNLOOP_ONE EVBREAK_ONE #define EVUNLOOP_ALL EVBREAK_ALL #if EV_PROTOTYPES EV_INLINE void ev_loop (EV_P_ int flags) { ev_run (EV_A_ flags); } EV_INLINE void ev_unloop (EV_P_ int how ) { ev_break (EV_A_ how ); } EV_INLINE void ev_default_destroy (void) { ev_loop_destroy (EV_DEFAULT); } EV_INLINE void ev_default_fork (void) { ev_loop_fork (EV_DEFAULT); } #if EV_FEATURE_API EV_INLINE unsigned int ev_loop_count (EV_P) { return ev_iteration (EV_A); } EV_INLINE unsigned int ev_loop_depth (EV_P) { return ev_depth (EV_A); } EV_INLINE void ev_loop_verify (EV_P) { ev_verify (EV_A); } #endif #endif #else typedef struct ev_loop ev_loop; #endif #endif EV_CPP(}) #endif tarantool-1.5.1.218.g1a69fd6/third_party/libev/missing0000775000000000000000000002403212202131537021006 0ustar rootroot#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev_port.c0000664000000000000000000001440412202131537021233 0ustar rootroot/* * libev solaris event port backend * * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ /* useful reading: * * http://bugs.opensolaris.org/view_bug.do?bug_id=6268715 (random results) * http://bugs.opensolaris.org/view_bug.do?bug_id=6455223 (just totally broken) * http://bugs.opensolaris.org/view_bug.do?bug_id=6873782 (manpage ETIME) * http://bugs.opensolaris.org/view_bug.do?bug_id=6874410 (implementation ETIME) * http://www.mail-archive.com/networking-discuss@opensolaris.org/msg11898.html ETIME vs. nget * http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/event_port.c (libc) * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/portfs/port.c#1325 (kernel) */ #include #include #include #include #include #include void inline_speed port_associate_and_check (EV_P_ int fd, int ev) { if (0 > port_associate ( backend_fd, PORT_SOURCE_FD, fd, (ev & EV_READ ? POLLIN : 0) | (ev & EV_WRITE ? POLLOUT : 0), 0 ) ) { if (errno == EBADFD) fd_kill (EV_A_ fd); else ev_syserr ("(libev) port_associate"); } } static void port_modify (EV_P_ int fd, int oev, int nev) { /* we need to reassociate no matter what, as closes are * once more silently being discarded. */ if (!nev) { if (oev) port_dissociate (backend_fd, PORT_SOURCE_FD, fd); } else port_associate_and_check (EV_A_ fd, nev); } static void port_poll (EV_P_ ev_tstamp timeout) { int res, i; struct timespec ts; uint_t nget = 1; /* we initialise this to something we will skip in the loop, as */ /* port_getn can return with nget unchanged, but no indication */ /* whether it was the original value or has been updated :/ */ port_events [0].portev_source = 0; EV_RELEASE_CB; EV_TS_SET (ts, timeout); res = port_getn (backend_fd, port_events, port_eventmax, &nget, &ts); EV_ACQUIRE_CB; /* port_getn may or may not set nget on error */ /* so we rely on port_events [0].portev_source not being updated */ if (res == -1 && errno != ETIME && errno != EINTR) ev_syserr ("(libev) port_getn (see http://bugs.opensolaris.org/view_bug.do?bug_id=6268715, try LIBEV_FLAGS=3 env variable)"); for (i = 0; i < nget; ++i) { if (port_events [i].portev_source == PORT_SOURCE_FD) { int fd = port_events [i].portev_object; fd_event ( EV_A_ fd, (port_events [i].portev_events & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) | (port_events [i].portev_events & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) ); fd_change (EV_A_ fd, EV__IOFDSET); } } if (expect_false (nget == port_eventmax)) { ev_free (port_events); port_eventmax = array_nextsize (sizeof (port_event_t), port_eventmax, port_eventmax + 1); port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax); } } int inline_size port_init (EV_P_ int flags) { /* Initialize the kernel queue */ if ((backend_fd = port_create ()) < 0) return 0; assert (("libev: PORT_SOURCE_FD must not be zero", PORT_SOURCE_FD)); fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ /* if my reading of the opensolaris kernel sources are correct, then * opensolaris does something very stupid: it checks if the time has already * elapsed and doesn't round up if that is the case,m otherwise it DOES round * up. Since we can't know what the case is, we need to guess by using a * "large enough" timeout. Normally, 1e-9 would be correct. */ backend_mintime = 1e-3; /* needed to compensate for port_getn returning early */ backend_modify = port_modify; backend_poll = port_poll; port_eventmax = 64; /* initial number of events receivable per poll */ port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax); return EVBACKEND_PORT; } void inline_size port_destroy (EV_P) { ev_free (port_events); } void inline_size port_fork (EV_P) { close (backend_fd); while ((backend_fd = port_create ()) < 0) ev_syserr ("(libev) port"); fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* re-register interest in fds */ fd_rearm_all (EV_A); } tarantool-1.5.1.218.g1a69fd6/third_party/libev/Changes0000664000000000000000000006060512202131537020710 0ustar rootrootRevision history for libev, a high-performance and full-featured event loop. TODO: ev_loop_wakeup TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone) TODO: faq, process a thing in each iteration TODO: dbeugging tips, ev_verify, ev_init twice TODO: ev_break for immediate exit (EVBREAK_NOW?) TODO: ev_feed_child_event TODO: document the special problem of signals around fork. TODO: store pid for each signal TODO: document file descriptor usage per loop TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork - destroying a non-default loop would stop the global waitpid watcher (Denis Bilenko). - queueing pending watchers of higher priority from a watcher now invokes them in a timely fashion (reported by Denis Bilenko). - add throw() to all libev functions that cannot throw exceptions, for further code size decrease when compiling for C++. - add throw () to callbacks that must not throw exceptions (allocator, syserr, loop acquire/release, periodic reschedule cbs). - fix event_base_loop return code, add event_get_callback, event_base_new, event_base_get_method calls to improve libevent 1.x emulation and add some libevent 2.x functionality (based on a patch by Jeff Davey). - add more memory fences to fix a bug reported by Jeff Davey. Better be overfenced than underprotected. - ev_run now returns a boolean status (true meaning watchers are still active). - ev_once: undef EV_ERROR in ev_kqueue.c, to avoid clashing with libev's EV_ERROR (reported by 191919). - (ecb) add memory fence support for xlC (Darin McBride). - (ecb) add memory fence support for gcc-mips (Anton Kirilov). - (ecb) add memory fence support for gcc-alpha (Christian Weisgerber). - work around some kernels losing file descriptors by leaking the kqueue descriptor in the child. - include sys/syscall.h instead of plain syscall.h. - check for io watcher loops in ev_verify, check for the most common reported usage bug in ev_io_start. - chose socket vs. WSASocket at compiletime using EV_USE_WSASOCKET. - always use WSASend/WSARecv directly on windows, hoping that this works in all cases (unlike read/write/send/recv...). - try to detect signals around a fork faster (test program by Denis Bilenko). - work around recent glibc versions that leak memory in realloc. - rename ev::embed::set to ev::embed::set_embed to avoid clashing the watcher base set (loop) method. - rewrite the async/signal pipe logic to always keep a valid fd, which simplifies (and hopefuly correctifies :) the race checking on fork, at the cost of one extra fd. 4.11 Sat Feb 4 19:52:39 CET 2012 - INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as was documented already, but not implemented in the repeating case. - new compiletime symbols: EV_NO_SMP and EV_NO_THREADS. - fix a race where the workaround against the epoll fork bugs caused signals to not be handled anymore. - correct backend_fudge for most backends, and implement a windows specific workaround to avoid looping because we call both select and Sleep, both with different time resolutions. - document range and guarantees of ev_sleep. - document reasonable ranges for periodics interval and offset. - rename backend_fudge to backend_mintime to avoid future confusion :) - change the default periodic reschedule function to hopefully be more exact and correct even in corner cases or in the far future. - do not rely on -lm anymore: use it when available but use our own floor () if it is missing. This should make it easier to embed, as no external libraries are required. - strategically import macros from libecb and mark rarely-used functions as cache-cold (saving almost 2k code size on typical amd64 setups). - add Symbols.ev and Symbols.event files, that were missing. - fix backend_mintime value for epoll (was 1/1024, is 1/1000 now). - fix #3 "be smart about timeouts" to not "deadlock" when timeout == now, also improve the section overall. - avoid "AVOIDING FINISHING BEFORE RETURNING" idiom. - support new EV_API_STATIC mode to make all libev symbols static. - supply default CFLAGS of -g -O3 with gcc when original CFLAGS were empty. 4.04 Wed Feb 16 09:01:51 CET 2011 - fix two problems in the native win32 backend, where reuse of fd's with different underlying handles caused handles not to be removed or added to the select set (analyzed and tested by Bert Belder). - do no rely on ceil() in ev_e?poll.c. - backport libev to HP-UX versions before 11 v3. - configure did not detect nanosleep and clock_gettime properly when they are available in the libc (as opposed to -lrt). 4.03 Tue Jan 11 14:37:25 CET 2011 - officially support polling files with all backends. - support files, /dev/zero etc. the same way as select in the epoll backend, by generating events on our own. - ports backend: work around solaris bug 6874410 and many related ones (EINTR, maybe more), with no performance loss (note that the solaris bug report is actually wrong, reality is far more bizarre and broken than that). - define EV_READ/EV_WRITE as macros in event.h, as some programs use #ifdef to test for them. - new (experimental) function: ev_feed_signal. - new (to become default) EVFLAG_NOSIGMASK flag. - new EVBACKEND_MASK symbol. - updated COMMON IDIOMS SECTION. 4.01 Fri Nov 5 21:51:29 CET 2010 - automake fucked it up, apparently, --add-missing -f is not quite enough to make it update its files, so 4.00 didn't install ev++.h and event.h on make install. grrr. - ev_loop(count|depth) didn't return anything (Robin Haberkorn). - change EV_UNDEF to 0xffffffff to silence some overzealous compilers. - use "(libev) " prefix for all libev error messages now. 4.00 Mon Oct 25 12:32:12 CEST 2010 - "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading. - ev_embed_stop did not correctly stop the watcher (very good testcase by Vladimir Timofeev). - ev_run will now always update the current loop time - it erroneously didn't when idle watchers were active, causing timers not to fire. - fix a bug where a timeout of zero caused the timer not to fire in the libevent emulation (testcase by Péter Szabó). - applied win32 fixes by Michael Lenaghan (also James Mansion). - replace EV_MINIMAL by EV_FEATURES. - prefer EPOLL_CTL_ADD over EPOLL_CTL_MOD in some more cases, as it seems the former is *much* faster than the latter. - linux kernel version detection (for inotify bug workarounds) did not work properly. - reduce the number of spurious wake-ups with the ports backend. - remove dependency on sys/queue.h on freebsd (patch by Vanilla Hsu). - do async init within ev_async_start, not ev_async_set, which avoids an API quirk where the set function must be called in the C++ API even when there is nothing to set. - add (undocumented) EV_ENABLE when adding events with kqueue, this might help with OS X, which seems to need it despite documenting not to need it (helpfully pointed out by Tilghman Lesher). - do not use poll by default on freebsd, it's broken (what isn't on freebsd...). - allow to embed epoll on kernels >= 2.6.32. - configure now prepends -O3, not appends it, so one can still override it. - ev.pod: greatly expanded the portability section, added a porting section, a description of watcher states and made lots of minor fixes. - disable poll backend on AIX, the poll header spams the namespace and it's not worth working around dead platforms (reported and analyzed by Aivars Kalvans). - improve header file compatibility of the standalone eventfd code in an obscure case. - implement EV_AVOID_STDIO option. - do not use sscanf to parse linux version number (smaller, faster, no sscanf dependency). - new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings. - update libev.m4 HAVE_CLOCK_SYSCALL test for newer glibcs. - add section on accept() problems to the manpage. - rename EV_TIMEOUT to EV_TIMER. - rename ev_loop_count/depth/verify/loop/unloop. - remove ev_default_destroy and ev_default_fork. - switch to two-digit minor version. - work around an apparent gentoo compiler bug. - define _DARWIN_UNLIMITED_SELECT. just so. - use enum instead of #define for most constants. - improve compatibility to older C++ compilers. - (experimental) ev_run/ev_default_loop/ev_break/ev_loop_new have now default arguments when compiled as C++. - enable automake dependency tracking. - ev_loop_new no longer leaks memory when loop creation failed. - new ev_cleanup watcher type. 3.9 Thu Dec 31 07:59:59 CET 2009 - signalfd is no longer used by default and has to be requested explicitly - this means that easy to catch bugs become hard to catch race conditions, but the users have spoken. - point out the unspecified signal mask in the documentation, and that this is a race condition regardless of EV_SIGNALFD. - backport inotify code to C89. - inotify file descriptors could leak into child processes. - ev_stat watchers could keep an erroneous extra ref on the loop, preventing exit when unregistering all watchers (testcases provided by ry@tinyclouds.org). - implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration symbols to make it easier for apps to do their own fd management. - support EV_IDLE_ENABLE being disabled in ev++.h (patch by Didier Spezia). - take advantage of inotify_init1, if available, to set cloexec/nonblock on fd creation, to avoid races. - the signal handling pipe wasn't always initialised under windows (analysed by lekma). - changed minimum glibc requirement from glibc 2.9 to 2.7, for signalfd. - add missing string.h include (Denis F. Latypoff). - only replace ev_stat.prev when we detect an actual difference, so prev is (almost) always different to attr. this might have caused the problems with 04_stat.t. - add ev::timer->remaining () method to C++ API. 3.8 Sun Aug 9 14:30:45 CEST 2009 - incompatible change: do not necessarily reset signal handler to SIG_DFL when a sighandler is stopped. - ev_default_destroy did not properly free or zero some members, potentially causing crashes and memory corruption on repeated ev_default_destroy/ev_default_loop calls. - take advantage of signalfd on GNU/Linux systems. - document that the signal mask might be in an unspecified state when using libev's signal handling. - take advantage of some GNU/Linux calls to set cloexec/nonblock on fd creation, to avoid race conditions. 3.7 Fri Jul 17 16:36:32 CEST 2009 - ev_unloop and ev_loop wrongly used a global variable to exit loops, instead of using a per-loop variable (bug caught by accident...). - the ev_set_io_collect_interval interpretation has changed. - add new functionality: ev_set_userdata, ev_userdata, ev_set_invoke_pending_cb, ev_set_loop_release_cb, ev_invoke_pending, ev_pending_count, together with a long example about thread locking. - add ev_timer_remaining (as requested by Denis F. Latypoff). - add ev_loop_depth. - calling ev_unloop in fork/prepare watchers will no longer poll for new events. - Denis F. Latypoff corrected many typos in example code snippets. - honor autoconf detection of EV_USE_CLOCK_SYSCALL, also double- check that the syscall number is available before trying to use it (reported by ry@tinyclouds). - use GetSystemTimeAsFileTime instead of _timeb on windows, for slightly higher accuracy. - properly declare ev_loop_verify and ev_now_update even when !EV_MULTIPLICITY. - do not compile in any priority code when EV_MAXPRI == EV_MINPRI. - support EV_MINIMAL==2 for a reduced API. - actually 0-initialise struct sigaction when installing signals. - add section on hibernate and stopped processes to ev_timer docs. 3.6 Tue Apr 28 02:49:30 CEST 2009 - multiple timers becoming ready within an event loop iteration will be invoked in the "correct" order now. - do not leave the event loop early just because we have no active watchers, fixing a problem when embedding a kqueue loop that has active kernel events but no registered watchers (reported by blacksand blacksand). - correctly zero the idx values for arrays, so destroying and reinitialising the default loop actually works (patch by Malek Hadj-Ali). - implement ev_suspend and ev_resume. - new EV_CUSTOM revents flag for use by applications. - add documentation section about priorities. - add a glossary to the dcoumentation. - extend the ev_fork description slightly. - optimize a jump out of call_pending. 3.53 Sun Feb 15 02:38:20 CET 2009 - fix a bug in event pipe creation on win32 that would cause a failed assertion on event loop creation (patch by Malek Hadj-Ali). - probe for CLOCK_REALTIME support at runtime as well and fall back to gettimeofday if there is an error, to support older operating systems with newer header files/libraries. - prefer gettimeofday over clock_gettime with USE_CLOCK_SYSCALL (default most everywhere), otherwise not. 3.52 Wed Jan 7 21:43:02 CET 2009 - fix compilation of select backend in fd_set mode when NFDBITS is missing (to get it to compile on QNX, reported by Rodrigo Campos). - better select-nfds handling when select backend is in fd_set mode. - diagnose fd_set overruns when select backend is in fd_set mode. - due to a thinko, instead of disabling everything but select on the borked OS X platform, everything but select was allowed (reported by Emanuele Giaquinta). - actually verify that local and remote port are matching in libev's socketpair emulation, which makes denial-of-service attacks harder (but not impossible - it's windows). Make sure it even works under vista, which thinks that getpeer/sockname should return fantasy port numbers. - include "libev" in all assertion messages for potentially clearer diagnostics. - event_get_version (libevent compatibility) returned a useless string instead of the expected version string (patch by W.C.A. Wijngaards). 3.51 Wed Dec 24 23:00:11 CET 2008 - fix a bug where an inotify watcher was added twice, causing freezes on hash collisions (reported and analysed by Graham Leggett). - new config symbol, EV_USE_CLOCK_SYSCALL, to make libev use a direct syscall - slower, but no dependency on librt et al. - assume negative return values != -1 signals success of port_getn (http://cvs.epicsol.org/cgi/viewcvs.cgi/epic5/source/newio.c?rev=1.52) (no known failure reports, but it doesn't hurt). - fork detection in ev_embed now stops and restarts the watcher automatically. - EXPERIMENTAL: default the method to operator () in ev++.h, to make it nicer to use functors (requested by Benedek László). - fixed const object callbacks in ev++.h. - replaced loop_ref argument of watcher.set (loop) by a direct ev_loop * in ev++.h, to avoid clashes with functor patch. - do not try to watch the empty string via inotify. - inotify watchers could be leaked under certain circumstances. - OS X 10.5 is actually even more broken than earlier versions, so fall back to select on that piece of garbage. - fixed some weirdness in the ev_embed documentation. 3.49 Wed Nov 19 11:26:53 CET 2008 - ev_stat watchers will now use inotify as a mere hint on kernels <2.6.25, or if the filesystem is not in the "known to be good" list. - better mingw32 compatibility (it's not as borked as native win32) (analysed by Roger Pack). - include stdio.h in the example program, as too many people are confused by the weird C language otherwise. I guess the next thing I get told is that the "..." ellipses in the examples don't compile with their C compiler. 3.48 Thu Oct 30 09:02:37 CET 2008 - further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll backend by assuming the kernel event mask hasn't changed if ADD fails with EEXIST. - work around spurious event notification bugs in epoll by using a 32-bit generation counter. recreate kernel state if we receive spurious notifications or unwanted events. this is very costly, but I didn't come up with this horrible design. - use memset to initialise most arrays now and do away with the init functions. - expand time-out strategies into a "Be smart about timeouts" section. - drop the "struct" from all ev_watcher declarations in the documentation and did other clarifications (yeah, it was a mistake to have a struct AND a function called ev_loop). - fix a bug where ev_default would not initialise the default loop again after it was destroyed with ev_default_destroy. - rename syserr to ev_syserr to avoid name clashes when embedding, do similar changes for event.c. 3.45 Tue Oct 21 21:59:26 CEST 2008 - disable inotify usage on linux <2.6.25, as it is broken (reported by Yoann Vandoorselaere). - ev_stat erroneously would try to add inotify watchers even when inotify wasn't available (this should only have a performance impact). - ev_once now passes both timeout and io to the callback if both occur concurrently, instead of giving timeouts precedence. - disable EV_USE_INOTIFY when sys/inotify.h is too old. 3.44 Mon Sep 29 05:18:39 CEST 2008 - embed watchers now automatically invoke ev_loop_fork on the embedded loop when the parent loop forks. - new function: ev_now_update (loop). - verify_watcher was not marked static. - improve the "associating..." manpage section. - documentation tweaks here and there. 3.43 Sun Jul 6 05:34:41 CEST 2008 - include more include files on windows to get struct _stati64 (reported by Chris Hulbert, but doesn't quite fix his issue). - add missing #include in ev.c on windows (reported by Matt Tolton). 3.42 Tue Jun 17 12:12:07 CEST 2008 - work around yet another windows bug: FD_SET actually adds fd's multiple times to the fd_*SET*, despite official MSN docs claiming otherwise. Reported and well-analysed by Matt Tolton. - define NFDBITS to 0 when EV_SELECT_IS_WINSOCKET to make it compile (reported any analysed by Chris Hulbert). - fix a bug in ev_ebadf (this function is only used to catch programming errors in the libev user). reported by Matt Tolton. - fix a bug in fd_intern on win32 (could lead to compile errors under some circumstances, but would work correctly if it compiles). reported by Matt Tolton. - (try to) work around missing lstat on windows. - pass in the write fd set as except fd set under windows. windows is so uncontrollably lame that it requires this. this means that switching off oobinline is not supported (but tcp/ip doesn't have oob, so that would be stupid anyways. - use posix module symbol to auto-detect monotonic clock presence and some other default values. 3.41 Fri May 23 18:42:54 CEST 2008 - work around an obscure bug in winsocket select: if you provide only empty fd sets then select returns WSAEINVAL. how sucky. - improve timer scheduling stability and reduce use of time_epsilon. - use 1-based 2-heap for EV_MINIMAL, simplifies code, reduces codesize and makes for better cache-efficiency. - use 3-based 4-heap for !EV_MINIMAL. this makes better use of cpu cache lines and gives better growth behaviour than 2-based heaps. - cache timestamp within heap for !EV_MINIMAL, to avoid random memory accesses. - document/add EV_USE_4HEAP and EV_HEAP_CACHE_AT. - fix a potential aliasing issue in ev_timer_again. - add/document ev_periodic_at, retract direct access to ->at. - improve ev_stat docs. - add portability requirements section. - fix manpage headers etc. - normalise WSA error codes to lower range on windows. - add consistency check code that can be called automatically or on demand to check for internal structures (ev_loop_verify). 3.31 Wed Apr 16 20:45:04 CEST 2008 - added last minute fix for ev_poll.c by Brandon Black. 3.3 Wed Apr 16 19:04:10 CEST 2008 - event_base_loopexit should return 0 on success (W.C.A. Wijngaards). - added linux eventfd support. - try to autodetect epoll and inotify support by libc header version if not using autoconf. - new symbols: EV_DEFAULT_UC and EV_DEFAULT_UC_. - declare functions defined in ev.h as inline if C99 or gcc are available. - enable inlining with gcc versions 2 and 3. - work around broken poll implementations potentially not clearing revents field in ev_poll (Brandon Black) (no such systems are known at this time). - work around a bug in realloc on openbsd and darwin, also makes the erroneous valgrind complaints go away (noted by various people). - fix ev_async_pending, add c++ wrapper for ev_async (based on patch sent by Johannes Deisenhofer). - add sensible set method to ev::embed. - made integer constants type int in ev.h. 3.2 Wed Apr 2 17:11:19 CEST 2008 - fix a 64 bit overflow issue in the select backend, by using fd_mask instead of int for the mask. - rename internal sighandler to avoid clash with very old perls. - entering ev_loop will not clear the ONESHOT or NONBLOCKING flags of any outer loops anymore. - add ev_async_pending. 3.1 Thu Mar 13 13:45:22 CET 2008 - implement ev_async watchers. - only initialise signal pipe on demand. - make use of sig_atomic_t configurable. - improved documentation. 3.0 Mon Jan 28 13:14:47 CET 2008 - API/ABI bump to version 3.0. - ev++.h includes "ev.h" by default now, not . - slightly improved documentation. - speed up signal detection after a fork. - only optionally return trace status changed in ev_child watchers. - experimental (and undocumented) loop wrappers for ev++.h. 2.01 Tue Dec 25 08:04:41 CET 2007 - separate Changes file. - fix ev_path_set => ev_stat_set typo. - remove event_compat.h from the libev tarball. - change how include files are found. - doc updates. - update licenses, explicitly allow for GPL relicensing. 2.0 Sat Dec 22 17:47:03 CET 2007 - new ev_sleep, ev_set_(io|timeout)_collect_interval. - removed epoll from embeddable fd set. - fix embed watchers. - renamed ev_embed.loop to other. - added exported Symbol tables. - undefine member wrapper macros at the end of ev.c. - respect EV_H in ev++.h. 1.86 Tue Dec 18 02:36:57 CET 2007 - fix memleak on loop destroy (not relevant for perl). 1.85 Fri Dec 14 20:32:40 CET 2007 - fix some aliasing issues w.r.t. timers and periodics (not relevant for perl). (for historic versions refer to EV/Changes, found in the Perl interface) 0.1 Wed Oct 31 21:31:48 CET 2007 - original version; hacked together in <24h. tarantool-1.5.1.218.g1a69fd6/third_party/libev/CVS/0000775000000000000000000000000012202131537020041 5ustar rootroottarantool-1.5.1.218.g1a69fd6/third_party/libev/CVS/Root0000664000000000000000000000005712202131537020711 0ustar rootroot:pserver:anonymous@cvs.schmorp.de/schmorpforge tarantool-1.5.1.218.g1a69fd6/third_party/libev/CVS/Repository0000664000000000000000000000000612202131537022137 0ustar rootrootlibev tarantool-1.5.1.218.g1a69fd6/third_party/libev/CVS/Entries0000664000000000000000000000242312202131537021376 0ustar rootroot/Changes/1.279/Mon Sep 3 19:51:13 2012// /LICENSE/1.10/Thu Aug 23 21:30:38 2012// /Makefile.am/1.9/Thu Aug 23 21:30:38 2012// /README/1.21/Thu Aug 23 21:30:38 2012// /README.embed/1.29/Thu Aug 23 21:30:38 2012// /Symbols.ev/1.14/Thu Aug 23 21:30:38 2012// /Symbols.event/1.4/Mon Sep 3 19:51:13 2012// /autogen.sh/1.3/Thu Aug 23 21:30:38 2012// /configure.ac/1.34/Thu Aug 23 21:30:38 2012// /ev++.h/1.61/Mon Sep 3 19:51:13 2012// /ev_epoll.c/1.67/Mon Sep 3 19:51:13 2012// /ev_kqueue.c/1.54/Thu Aug 23 21:30:38 2012// /ev_poll.c/1.39/Thu Aug 23 21:30:38 2012// /ev_port.c/1.28/Thu Aug 23 21:30:38 2012// /ev_select.c/1.55/Thu Aug 23 21:30:38 2012// /ev_vars.h/1.53/Mon Sep 3 19:51:13 2012// /ev_win32.c/1.15/Thu Aug 23 21:30:38 2012// /ev_wrap.h/1.37/Mon Sep 3 19:51:13 2012// /event.c/1.52/Thu Aug 23 21:30:38 2012// /event.h/1.26/Thu Aug 23 21:30:38 2012// /event_compat.h/1.8/Thu Aug 23 21:30:38 2012// /import_libevent/1.29/Thu Aug 23 21:30:38 2012// /libev.m4/1.15/Thu Aug 23 21:30:38 2012// /update_ev_c/1.2/Thu Aug 23 21:30:38 2012// /update_ev_wrap/1.6/Mon Sep 3 19:51:13 2012// /update_symbols/1.1/Thu Aug 23 21:30:38 2012// /ev.3/1.95/Mon Sep 3 19:53:02 2012// /ev.c/1.448/Mon Sep 3 19:53:02 2012// /ev.h/1.169/Mon Sep 3 19:53:02 2012// /ev.pod/1.421/Mon Sep 3 19:53:02 2012// D tarantool-1.5.1.218.g1a69fd6/third_party/libev/config.guess0000775000000000000000000012753412202131537021742 0ustar rootroot#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: tarantool-1.5.1.218.g1a69fd6/third_party/libev/install-sh0000775000000000000000000001572212202131537021421 0ustar rootroot#!/bin/sh # # install - install a program, script, or datafile # # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do pathcomp=$pathcomp$1 shift if [ ! -d "$pathcomp" ] ; then $mkdirprog "$pathcomp" else : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename "$dst"` else : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now remove or move aside any old file at destination location. We try this # two ways since rm can't unlink itself on some systems and the destination # file might be busy for other reasons. In this case, the final cleanup # might fail but the new file should still install successfully. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev++.h0000664000000000000000000004773712202131537020341 0ustar rootroot/* * libev simple C++ wrapper classes * * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef EVPP_H__ #define EVPP_H__ #ifdef EV_H # include EV_H #else # include "ev.h" #endif #ifndef EV_USE_STDEXCEPT # define EV_USE_STDEXCEPT 1 #endif #if EV_USE_STDEXCEPT # include #endif namespace ev { typedef ev_tstamp tstamp; enum { UNDEF = EV_UNDEF, NONE = EV_NONE, READ = EV_READ, WRITE = EV_WRITE, #if EV_COMPAT3 TIMEOUT = EV_TIMEOUT, #endif TIMER = EV_TIMER, PERIODIC = EV_PERIODIC, SIGNAL = EV_SIGNAL, CHILD = EV_CHILD, STAT = EV_STAT, IDLE = EV_IDLE, CHECK = EV_CHECK, PREPARE = EV_PREPARE, FORK = EV_FORK, ASYNC = EV_ASYNC, EMBED = EV_EMBED, # undef ERROR // some systems stupidly #define ERROR ERROR = EV_ERROR }; enum { AUTO = EVFLAG_AUTO, NOENV = EVFLAG_NOENV, FORKCHECK = EVFLAG_FORKCHECK, SELECT = EVBACKEND_SELECT, POLL = EVBACKEND_POLL, EPOLL = EVBACKEND_EPOLL, KQUEUE = EVBACKEND_KQUEUE, DEVPOLL = EVBACKEND_DEVPOLL, PORT = EVBACKEND_PORT }; enum { #if EV_COMPAT3 NONBLOCK = EVLOOP_NONBLOCK, ONESHOT = EVLOOP_ONESHOT, #endif NOWAIT = EVRUN_NOWAIT, ONCE = EVRUN_ONCE }; enum how_t { ONE = EVBREAK_ONE, ALL = EVBREAK_ALL }; struct bad_loop #if EV_USE_STDEXCEPT : std::runtime_error #endif { #if EV_USE_STDEXCEPT bad_loop () : std::runtime_error ("libev event loop cannot be initialized, bad value of LIBEV_FLAGS?") { } #endif }; #ifdef EV_AX # undef EV_AX #endif #ifdef EV_AX_ # undef EV_AX_ #endif #if EV_MULTIPLICITY # define EV_AX raw_loop # define EV_AX_ raw_loop, #else # define EV_AX # define EV_AX_ #endif struct loop_ref { loop_ref (EV_P) throw () #if EV_MULTIPLICITY : EV_AX (EV_A) #endif { } bool operator == (const loop_ref &other) const throw () { #if EV_MULTIPLICITY return EV_AX == other.EV_AX; #else return true; #endif } bool operator != (const loop_ref &other) const throw () { #if EV_MULTIPLICITY return ! (*this == other); #else return false; #endif } #if EV_MULTIPLICITY bool operator == (const EV_P) const throw () { return this->EV_AX == EV_A; } bool operator != (const EV_P) const throw () { return (*this == EV_A); } operator struct ev_loop * () const throw () { return EV_AX; } operator const struct ev_loop * () const throw () { return EV_AX; } bool is_default () const throw () { return EV_AX == ev_default_loop (0); } #endif #if EV_COMPAT3 void loop (int flags = 0) { ev_run (EV_AX_ flags); } void unloop (how_t how = ONE) throw () { ev_break (EV_AX_ how); } #endif void run (int flags = 0) { ev_run (EV_AX_ flags); } void break_loop (how_t how = ONE) throw () { ev_break (EV_AX_ how); } void post_fork () throw () { ev_loop_fork (EV_AX); } unsigned int backend () const throw () { return ev_backend (EV_AX); } tstamp now () const throw () { return ev_now (EV_AX); } void ref () throw () { ev_ref (EV_AX); } void unref () throw () { ev_unref (EV_AX); } #if EV_FEATURE_API unsigned int iteration () const throw () { return ev_iteration (EV_AX); } unsigned int depth () const throw () { return ev_depth (EV_AX); } void set_io_collect_interval (tstamp interval) throw () { ev_set_io_collect_interval (EV_AX_ interval); } void set_timeout_collect_interval (tstamp interval) throw () { ev_set_timeout_collect_interval (EV_AX_ interval); } #endif // function callback void once (int fd, int events, tstamp timeout, void (*cb)(int, void *), void *arg = 0) throw () { ev_once (EV_AX_ fd, events, timeout, cb, arg); } // method callback template void once (int fd, int events, tstamp timeout, K *object) throw () { once (fd, events, timeout, method_thunk, object); } // default method == operator () template void once (int fd, int events, tstamp timeout, K *object) throw () { once (fd, events, timeout, method_thunk, object); } template static void method_thunk (int revents, void *arg) { (static_cast(arg)->*method) (revents); } // no-argument method callback template void once (int fd, int events, tstamp timeout, K *object) throw () { once (fd, events, timeout, method_noargs_thunk, object); } template static void method_noargs_thunk (int revents, void *arg) { (static_cast(arg)->*method) (); } // simpler function callback template void once (int fd, int events, tstamp timeout) throw () { once (fd, events, timeout, simpler_func_thunk); } template static void simpler_func_thunk (int revents, void *arg) { (*cb) (revents); } // simplest function callback template void once (int fd, int events, tstamp timeout) throw () { once (fd, events, timeout, simplest_func_thunk); } template static void simplest_func_thunk (int revents, void *arg) { (*cb) (); } void feed_fd_event (int fd, int revents) throw () { ev_feed_fd_event (EV_AX_ fd, revents); } void feed_signal_event (int signum) throw () { ev_feed_signal_event (EV_AX_ signum); } #if EV_MULTIPLICITY struct ev_loop* EV_AX; #endif }; #if EV_MULTIPLICITY struct dynamic_loop : loop_ref { dynamic_loop (unsigned int flags = AUTO) throw (bad_loop) : loop_ref (ev_loop_new (flags)) { if (!EV_AX) throw bad_loop (); } ~dynamic_loop () throw () { ev_loop_destroy (EV_AX); EV_AX = 0; } private: dynamic_loop (const dynamic_loop &); dynamic_loop & operator= (const dynamic_loop &); }; #endif struct default_loop : loop_ref { default_loop (unsigned int flags = AUTO) throw (bad_loop) #if EV_MULTIPLICITY : loop_ref (ev_default_loop (flags)) #endif { if ( #if EV_MULTIPLICITY !EV_AX #else !ev_default_loop (flags) #endif ) throw bad_loop (); } private: default_loop (const default_loop &); default_loop &operator = (const default_loop &); }; inline loop_ref get_default_loop () throw () { #if EV_MULTIPLICITY return ev_default_loop (0); #else return loop_ref (); #endif } #undef EV_AX #undef EV_AX_ #undef EV_PX #undef EV_PX_ #if EV_MULTIPLICITY # define EV_PX loop_ref EV_A # define EV_PX_ loop_ref EV_A_ #else # define EV_PX # define EV_PX_ #endif template struct base : ev_watcher { #if EV_MULTIPLICITY EV_PX; // loop set void set (EV_P) throw () { this->EV_A = EV_A; } #endif base (EV_PX) throw () #if EV_MULTIPLICITY : EV_A (EV_A) #endif { ev_init (this, 0); } void set_ (const void *data, void (*cb)(EV_P_ ev_watcher *w, int revents)) throw () { this->data = (void *)data; ev_set_cb (static_cast(this), cb); } // function callback template void set (void *data = 0) throw () { set_ (data, function_thunk); } template static void function_thunk (EV_P_ ev_watcher *w, int revents) { function (*static_cast(w), revents); } // method callback template void set (K *object) throw () { set_ (object, method_thunk); } // default method == operator () template void set (K *object) throw () { set_ (object, method_thunk); } template static void method_thunk (EV_P_ ev_watcher *w, int revents) { (static_cast(w->data)->*method) (*static_cast(w), revents); } // no-argument callback template void set (K *object) throw () { set_ (object, method_noargs_thunk); } template static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents) { (static_cast(w->data)->*method) (); } void operator ()(int events = EV_UNDEF) { return ev_cb (static_cast(this)) (static_cast(this), events); } bool is_active () const throw () { return ev_is_active (static_cast(this)); } bool is_pending () const throw () { return ev_is_pending (static_cast(this)); } void feed_event (int revents) throw () { ev_feed_event (EV_A_ static_cast(this), revents); } }; inline tstamp now (EV_P) throw () { return ev_now (EV_A); } inline void delay (tstamp interval) throw () { ev_sleep (interval); } inline int version_major () throw () { return ev_version_major (); } inline int version_minor () throw () { return ev_version_minor (); } inline unsigned int supported_backends () throw () { return ev_supported_backends (); } inline unsigned int recommended_backends () throw () { return ev_recommended_backends (); } inline unsigned int embeddable_backends () throw () { return ev_embeddable_backends (); } inline void set_allocator (void *(*cb)(void *ptr, long size) throw ()) throw () { ev_set_allocator (cb); } inline void set_syserr_cb (void (*cb)(const char *msg) throw ()) throw () { ev_set_syserr_cb (cb); } #if EV_MULTIPLICITY #define EV_CONSTRUCT(cppstem,cstem) \ (EV_PX = get_default_loop ()) throw () \ : base (EV_A) \ { \ } #else #define EV_CONSTRUCT(cppstem,cstem) \ () throw () \ { \ } #endif /* using a template here would require quite a bit more lines, * so a macro solution was chosen */ #define EV_BEGIN_WATCHER(cppstem,cstem) \ \ struct cppstem : base \ { \ void start () throw () \ { \ ev_ ## cstem ## _start (EV_A_ static_cast(this)); \ } \ \ void stop () throw () \ { \ ev_ ## cstem ## _stop (EV_A_ static_cast(this)); \ } \ \ cppstem EV_CONSTRUCT(cppstem,cstem) \ \ ~cppstem () throw () \ { \ stop (); \ } \ \ using base::set; \ \ private: \ \ cppstem (const cppstem &o); \ \ cppstem &operator =(const cppstem &o); \ \ public: #define EV_END_WATCHER(cppstem,cstem) \ }; EV_BEGIN_WATCHER (io, io) void set (int fd, int events) throw () { int active = is_active (); if (active) stop (); ev_io_set (static_cast(this), fd, events); if (active) start (); } void set (int events) throw () { int active = is_active (); if (active) stop (); ev_io_set (static_cast(this), fd, events); if (active) start (); } void start (int fd, int events) throw () { set (fd, events); start (); } EV_END_WATCHER (io, io) EV_BEGIN_WATCHER (timer, timer) void set (ev_tstamp after, ev_tstamp repeat = 0.) throw () { int active = is_active (); if (active) stop (); ev_timer_set (static_cast(this), after, repeat); if (active) start (); } void start (ev_tstamp after, ev_tstamp repeat = 0.) throw () { set (after, repeat); start (); } void again () throw () { ev_timer_again (EV_A_ static_cast(this)); } ev_tstamp remaining () { return ev_timer_remaining (EV_A_ static_cast(this)); } EV_END_WATCHER (timer, timer) #if EV_PERIODIC_ENABLE EV_BEGIN_WATCHER (periodic, periodic) void set (ev_tstamp at, ev_tstamp interval = 0.) throw () { int active = is_active (); if (active) stop (); ev_periodic_set (static_cast(this), at, interval, 0); if (active) start (); } void start (ev_tstamp at, ev_tstamp interval = 0.) throw () { set (at, interval); start (); } void again () throw () { ev_periodic_again (EV_A_ static_cast(this)); } EV_END_WATCHER (periodic, periodic) #endif #if EV_SIGNAL_ENABLE EV_BEGIN_WATCHER (sig, signal) void set (int signum) throw () { int active = is_active (); if (active) stop (); ev_signal_set (static_cast(this), signum); if (active) start (); } void start (int signum) throw () { set (signum); start (); } EV_END_WATCHER (sig, signal) #endif #if EV_CHILD_ENABLE EV_BEGIN_WATCHER (child, child) void set (int pid, int trace = 0) throw () { int active = is_active (); if (active) stop (); ev_child_set (static_cast(this), pid, trace); if (active) start (); } void start (int pid, int trace = 0) throw () { set (pid, trace); start (); } EV_END_WATCHER (child, child) #endif #if EV_STAT_ENABLE EV_BEGIN_WATCHER (stat, stat) void set (const char *path, ev_tstamp interval = 0.) throw () { int active = is_active (); if (active) stop (); ev_stat_set (static_cast(this), path, interval); if (active) start (); } void start (const char *path, ev_tstamp interval = 0.) throw () { stop (); set (path, interval); start (); } void update () throw () { ev_stat_stat (EV_A_ static_cast(this)); } EV_END_WATCHER (stat, stat) #endif #if EV_IDLE_ENABLE EV_BEGIN_WATCHER (idle, idle) void set () throw () { } EV_END_WATCHER (idle, idle) #endif #if EV_PREPARE_ENABLE EV_BEGIN_WATCHER (prepare, prepare) void set () throw () { } EV_END_WATCHER (prepare, prepare) #endif #if EV_CHECK_ENABLE EV_BEGIN_WATCHER (check, check) void set () throw () { } EV_END_WATCHER (check, check) #endif #if EV_EMBED_ENABLE EV_BEGIN_WATCHER (embed, embed) void set_embed (struct ev_loop *embedded_loop) throw () { int active = is_active (); if (active) stop (); ev_embed_set (static_cast(this), embedded_loop); if (active) start (); } void start (struct ev_loop *embedded_loop) throw () { set (embedded_loop); start (); } void sweep () { ev_embed_sweep (EV_A_ static_cast(this)); } EV_END_WATCHER (embed, embed) #endif #if EV_FORK_ENABLE EV_BEGIN_WATCHER (fork, fork) void set () throw () { } EV_END_WATCHER (fork, fork) #endif #if EV_ASYNC_ENABLE EV_BEGIN_WATCHER (async, async) void send () throw () { ev_async_send (EV_A_ static_cast(this)); } bool async_pending () throw () { return ev_async_pending (static_cast(this)); } EV_END_WATCHER (async, async) #endif #undef EV_PX #undef EV_PX_ #undef EV_CONSTRUCT #undef EV_BEGIN_WATCHER #undef EV_END_WATCHER } #endif tarantool-1.5.1.218.g1a69fd6/third_party/libev/Symbols.event0000664000000000000000000000057212202131537022105 0ustar rootrootevent_active event_add event_base_dispatch event_base_free event_base_get_method event_base_loop event_base_loopexit event_base_new event_base_once event_base_priority_init event_base_set event_del event_dispatch event_get_callback event_get_method event_get_version event_init event_loop event_loopexit event_once event_pending event_priority_init event_priority_set event_set tarantool-1.5.1.218.g1a69fd6/third_party/libev/import_libevent0000775000000000000000000000644312202131537022545 0ustar rootroot#!/bin/sh LE=../libevent-1.4.3-stable if ! [ -e evbuffer.c ]; then echo do not run this programm unless you know what you are doing exit 1 fi # this program combines libev and libevent into a single package cvs update -AdP libev rsync -avP libev/. . --exclude CVS rm -f configure.ac cp $LE/evdns.h . perl -i -pe 's%^/.libevent-include./%#include "event_compat.h"%' event.h perl -ne ' s/\s+char buf\[64\];/\tchar buf[96];/; if (/#include "event.h"/) { print "#ifndef EV_STANDALONE\n$_#endif\n"; next; } if (/#include "misc.h"/) { print "#ifndef EV_STANDALONE\n$_#endif\n"; next; } if (/#include "(unistd.h|sys\/time.h)"/) { print "#ifndef WIN32\n$_#endif\n"; next; } next if /#include "log.h"/; print; ' <$LE/evdns.c >evdns.c cp $LE/autogen.sh . cp $LE/epoll_sub.c . cp $LE/evbuffer.c . cp $LE/buffer.c . cp $LE/evhttp.h . cp $LE/evutil.h . cp $LE/evutil.c . cp $LE/event-config.h . cp $LE/event-internal.h . cp $LE/evrpc.h . cp $LE/evrpc.c . cp $LE/evrpc-internal.h . cp $LE/http.c . cp $LE/event_tagging.c . cp $LE/http-internal.h . cp $LE/strlcpy-internal.h . cp $LE/log.c . cp $LE/log.h . cp $LE/strlcpy.c . rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del #rename 's/libevent/libev/' WIN32-Prj/lib* cp $LE/aclocal.m4 . #cp $LE/acconfig.h . cp $LE/config.h.in . cp $LE/event_rpcgen.py . cp $LE/*.3 . #perl -i -pe 's/libevent/libev/g' sample/Makefile.am #perl -i -pe 's/libevent/libev/g' test/Makefile.am perl -i -pe 's/#include $/#include "event.h"/' test/*.c perl -i -ne ' next if /"event-internal.h"/; s/base\d?->sig.ev_signal_added/0/; s/base\d?->sig.ev_signal_pair\[0\]/-1/; s/base->sig.evsignal_caught/0/; next if /^\ttest_signal_(dealloc|pipeloss|switchbase|assert|restore)\(\)/; next if /^\ttest_simplesignal\(\)/; # non-default-loop next if /^\ttest_immediatesignal\(\)/; # non-default-loop next if /test_priorities\(\d\)/; print; ' test/regress.c perl -ne ' s/\bmin_heap.h\b//g; s/\bsignal.c\b//g; s/\bevport.c\b//g; s/\bkqueue.c\b//g; s/\bdevpoll.c\b//g; s/\brtsig.c\b//g; s/\bselect.c\b//g; s/\bpoll.c\b//g; s/\bepoll.c\b//g; s/\bepoll_sub.c\b//g; s/\bevent-internal.h\b//g; s/\bevsignal.h\b//g; s/^(man_MANS\s*=)/$1 ev.3 /; s/^(EXTRA_DIST\s*=)/$1 libev.m4 ev.h ev_vars.h ev_wrap.h event_compat.h ev++.h ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c ev.3 ev.pod /; s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h ev++.h /; s/^(CORE_SRC\s*=)/$1 ev.c /; s/^(SYS_LIBS\s*=)/$1 -lm /; #s/libevent/libev/g; print; ' <$LE/Makefile.am >Makefile.am perl -ne ' #s/-Wall/-Wall -Wno-comment -Wunused-function -Wno-unused-value/; s/-Wall//g; #s/libevent/libev/g; #VERSION s/AM_INIT_AUTOMAKE\s*\(.*,(.*)\)/AM_INIT_AUTOMAKE(libevent-$1+libev,3.1)/; s/AC_LIBOBJ\(select\)/: ;/g; s/AC_LIBOBJ\(poll\)/: ;/g; s/AC_LIBOBJ\(kqueue\)/: ;/g; s/AC_LIBOBJ\(epoll\)/: ;/g; s/AC_LIBOBJ\(devpoll\)/: ;/g; s/AC_LIBOBJ\(evport\)/: ;/g; s/AC_LIBOBJ\(signal\)/: ;/g; s/AC_LIBOBJ\(rtsig\)/: ;/g; print "m4_include([libev.m4])\n" if /^AC_OUTPUT/; print; ' <$LE/configure.in >configure.in aclocal-1.7 automake-1.7 --add-missing autoconf autoheader libtoolize CC="ccache gcc" ./configure --prefix=/opt/libev --disable-shared "$@" tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev_win32.c0000664000000000000000000001217712202131537021216 0ustar rootroot/* * libev win32 compatibility cruft (_not_ a backend) * * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifdef _WIN32 /* timeb.h is actually xsi legacy functionality */ #include /* note: the comment below could not be substantiated, but what would I care */ /* MSDN says this is required to handle SIGFPE */ /* my wild guess would be that using something floating-pointy is required */ /* for the crt to do something about it */ volatile double SIGFPE_REQ = 0.0f; static SOCKET ev_tcp_socket (void) { #if EV_USE_WSASOCKET return WSASocket (AF_INET, SOCK_STREAM, 0, 0, 0, 0); #else return socket (AF_INET, SOCK_STREAM, 0); #endif } /* oh, the humanity! */ static int ev_pipe (int filedes [2]) { struct sockaddr_in addr = { 0 }; int addr_size = sizeof (addr); struct sockaddr_in adr2; int adr2_size = sizeof (adr2); SOCKET listener; SOCKET sock [2] = { -1, -1 }; if ((listener = ev_tcp_socket ()) == INVALID_SOCKET) return -1; addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); addr.sin_port = 0; if (bind (listener, (struct sockaddr *)&addr, addr_size)) goto fail; if (getsockname (listener, (struct sockaddr *)&addr, &addr_size)) goto fail; if (listen (listener, 1)) goto fail; if ((sock [0] = ev_tcp_socket ()) == INVALID_SOCKET) goto fail; if (connect (sock [0], (struct sockaddr *)&addr, addr_size)) goto fail; if ((sock [1] = accept (listener, 0, 0)) < 0) goto fail; /* windows vista returns fantasy port numbers for sockets: * example for two interconnected tcp sockets: * * (Socket::unpack_sockaddr_in getsockname $sock0)[0] == 53364 * (Socket::unpack_sockaddr_in getpeername $sock0)[0] == 53363 * (Socket::unpack_sockaddr_in getsockname $sock1)[0] == 53363 * (Socket::unpack_sockaddr_in getpeername $sock1)[0] == 53365 * * wow! tridirectional sockets! * * this way of checking ports seems to work: */ if (getpeername (sock [0], (struct sockaddr *)&addr, &addr_size)) goto fail; if (getsockname (sock [1], (struct sockaddr *)&adr2, &adr2_size)) goto fail; errno = WSAEINVAL; if (addr_size != adr2_size || addr.sin_addr.s_addr != adr2.sin_addr.s_addr /* just to be sure, I mean, it's windows */ || addr.sin_port != adr2.sin_port) goto fail; closesocket (listener); #if EV_SELECT_IS_WINSOCKET filedes [0] = EV_WIN32_HANDLE_TO_FD (sock [0]); filedes [1] = EV_WIN32_HANDLE_TO_FD (sock [1]); #else /* when select isn't winsocket, we also expect socket, connect, accept etc. * to work on fds */ filedes [0] = sock [0]; filedes [1] = sock [1]; #endif return 0; fail: closesocket (listener); if (sock [0] != INVALID_SOCKET) closesocket (sock [0]); if (sock [1] != INVALID_SOCKET) closesocket (sock [1]); return -1; } #undef pipe #define pipe(filedes) ev_pipe (filedes) #define EV_HAVE_EV_TIME 1 ev_tstamp ev_time (void) { FILETIME ft; ULARGE_INTEGER ui; GetSystemTimeAsFileTime (&ft); ui.u.LowPart = ft.dwLowDateTime; ui.u.HighPart = ft.dwHighDateTime; /* msvc cannot convert ulonglong to double... yes, it is that sucky */ return (LONGLONG)(ui.QuadPart - 116444736000000000) * 1e-7; } #endif tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev_vars.h0000664000000000000000000001401112202131537021221 0ustar rootroot/* * loop member variable declarations * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #define VARx(type,name) VAR(name, type name) VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */ VARx(ev_tstamp, mn_now) /* monotonic clock "now" */ VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */ /* for reverse feeding of events */ VARx(W *, rfeeds) VARx(int, rfeedmax) VARx(int, rfeedcnt) VAR (pendings, ANPENDING *pendings [NUMPRI]) VAR (pendingmax, int pendingmax [NUMPRI]) VAR (pendingcnt, int pendingcnt [NUMPRI]) VARx(int, pendingpri) /* highest priority currently pending */ VARx(ev_prepare, pending_w) /* dummy pending watcher */ VARx(ev_tstamp, io_blocktime) VARx(ev_tstamp, timeout_blocktime) VARx(int, backend) VARx(int, activecnt) /* total number of active events ("refcount") */ VARx(EV_ATOMIC_T, loop_done) /* signal by ev_break */ VARx(int, backend_fd) VARx(ev_tstamp, backend_mintime) /* assumed typical timer resolution */ VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev)) VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout)) VARx(ANFD *, anfds) VARx(int, anfdmax) VAR (evpipe, int evpipe [2]) VARx(ev_io, pipe_w) VARx(EV_ATOMIC_T, pipe_write_wanted) VARx(EV_ATOMIC_T, pipe_write_skipped) #if !defined(_WIN32) || EV_GENWRAP VARx(pid_t, curpid) #endif VARx(char, postfork) /* true if we need to recreate kernel state after fork */ #if EV_USE_SELECT || EV_GENWRAP VARx(void *, vec_ri) VARx(void *, vec_ro) VARx(void *, vec_wi) VARx(void *, vec_wo) #if defined(_WIN32) || EV_GENWRAP VARx(void *, vec_eo) #endif VARx(int, vec_max) #endif #if EV_USE_POLL || EV_GENWRAP VARx(struct pollfd *, polls) VARx(int, pollmax) VARx(int, pollcnt) VARx(int *, pollidxs) /* maps fds into structure indices */ VARx(int, pollidxmax) #endif #if EV_USE_EPOLL || EV_GENWRAP VARx(struct epoll_event *, epoll_events) VARx(int, epoll_eventmax) VARx(int *, epoll_eperms) VARx(int, epoll_epermcnt) VARx(int, epoll_epermmax) #endif #if EV_USE_KQUEUE || EV_GENWRAP VARx(pid_t, kqueue_fd_pid) VARx(struct kevent *, kqueue_changes) VARx(int, kqueue_changemax) VARx(int, kqueue_changecnt) VARx(struct kevent *, kqueue_events) VARx(int, kqueue_eventmax) #endif #if EV_USE_PORT || EV_GENWRAP VARx(struct port_event *, port_events) VARx(int, port_eventmax) #endif #if EV_USE_IOCP || EV_GENWRAP VARx(HANDLE, iocp) #endif VARx(int *, fdchanges) VARx(int, fdchangemax) VARx(int, fdchangecnt) VARx(ANHE *, timers) VARx(int, timermax) VARx(int, timercnt) #if EV_PERIODIC_ENABLE || EV_GENWRAP VARx(ANHE *, periodics) VARx(int, periodicmax) VARx(int, periodiccnt) #endif #if EV_IDLE_ENABLE || EV_GENWRAP VAR (idles, ev_idle **idles [NUMPRI]) VAR (idlemax, int idlemax [NUMPRI]) VAR (idlecnt, int idlecnt [NUMPRI]) #endif VARx(int, idleall) /* total number */ VARx(struct ev_prepare **, prepares) VARx(int, preparemax) VARx(int, preparecnt) VARx(struct ev_check **, checks) VARx(int, checkmax) VARx(int, checkcnt) #if EV_FORK_ENABLE || EV_GENWRAP VARx(struct ev_fork **, forks) VARx(int, forkmax) VARx(int, forkcnt) #endif #if EV_CLEANUP_ENABLE || EV_GENWRAP VARx(struct ev_cleanup **, cleanups) VARx(int, cleanupmax) VARx(int, cleanupcnt) #endif #if EV_ASYNC_ENABLE || EV_GENWRAP VARx(EV_ATOMIC_T, async_pending) VARx(struct ev_async **, asyncs) VARx(int, asyncmax) VARx(int, asynccnt) #endif #if EV_USE_INOTIFY || EV_GENWRAP VARx(int, fs_fd) VARx(ev_io, fs_w) VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) #endif VARx(EV_ATOMIC_T, sig_pending) #if EV_USE_SIGNALFD || EV_GENWRAP VARx(int, sigfd) VARx(ev_io, sigfd_w) VARx(sigset_t, sigfd_set) #endif VARx(unsigned int, origflags) /* original loop flags */ #if EV_FEATURE_API || EV_GENWRAP VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ VARx(void *, userdata) VAR (release_cb, void (*release_cb)(EV_P) EV_THROW) VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW) VAR (invoke_cb , void (*invoke_cb) (EV_P)) #endif #undef VARx tarantool-1.5.1.218.g1a69fd6/third_party/libev/ev.pod0000664000000000000000000065021612202131537020536 0ustar rootroot=head1 NAME libev - a high performance full-featured event loop written in C =head1 SYNOPSIS #include =head2 EXAMPLE PROGRAM // a single header file is required #include #include // for puts // every watcher type has its own typedef'd struct // with the name ev_TYPE ev_io stdin_watcher; ev_timer timeout_watcher; // all watcher callbacks have a similar signature // this callback is called when data is readable on stdin static void stdin_cb (EV_P_ ev_io *w, int revents) { puts ("stdin ready"); // for one-shot events, one must manually stop the watcher // with its corresponding stop function. ev_io_stop (EV_A_ w); // this causes all nested ev_run's to stop iterating ev_break (EV_A_ EVBREAK_ALL); } // another callback, this time for a time-out static void timeout_cb (EV_P_ ev_timer *w, int revents) { puts ("timeout"); // this causes the innermost ev_run to stop iterating ev_break (EV_A_ EVBREAK_ONE); } int main (void) { // use the default event loop unless you have special needs struct ev_loop *loop = EV_DEFAULT; // initialise an io watcher, then start it // this one will watch for stdin to become readable ev_io_init (&stdin_watcher, stdin_cb, /*STDIN_FILENO*/ 0, EV_READ); ev_io_start (loop, &stdin_watcher); // initialise a timer watcher, then start it // simple non-repeating 5.5 second timeout ev_timer_init (&timeout_watcher, timeout_cb, 5.5, 0.); ev_timer_start (loop, &timeout_watcher); // now wait for events to arrive ev_run (loop, 0); // break was called, so exit return 0; } =head1 ABOUT THIS DOCUMENT This document documents the libev software package. The newest version of this document is also available as an html-formatted web page you might find easier to navigate when reading it for the first time: L. While this document tries to be as complete as possible in documenting libev, its usage and the rationale behind its design, it is not a tutorial on event-based programming, nor will it introduce event-based programming with libev. Familiarity with event based programming techniques in general is assumed throughout this document. =head1 WHAT TO READ WHEN IN A HURRY This manual tries to be very detailed, but unfortunately, this also makes it very long. If you just want to know the basics of libev, I suggest reading L, then the L above and look up the missing functions in L and the C and C sections in L. =head1 ABOUT LIBEV Libev is an event loop: you register interest in certain events (such as a file descriptor being readable or a timeout occurring), and it will manage these event sources and provide your program with events. To do this, it must take more or less complete control over your process (or thread) by executing the I handler, and will then communicate events via a callback mechanism. You register interest in certain events by registering so-called I, which are relatively small C structures you initialise with the details of the event, and then hand it over to libev by I the watcher. =head2 FEATURES Libev supports C (files, many character devices...). Epoll is truly the train wreck among event poll mechanisms, a frankenpoll, cobbled together in a hurry, no thought to design or interaction with others. Oh, the pain, will it ever stop... While stopping, setting and starting an I/O watcher in the same iteration will result in some caching, there is still a system call per such incident (because the same I could point to a different I now), so its best to avoid that. Also, C'ed file descriptors might not work very well if you register events for both file descriptors. Best performance from this backend is achieved by not unregistering all watchers for a file descriptor until it has been closed, if possible, i.e. keep at least one watcher active per fd at all times. Stopping and starting a watcher (without re-setting it) also usually doesn't cause extra overhead. A fork can both result in spurious notifications as well as in libev having to destroy and recreate the epoll object, which can take considerable time and thus should be avoided. All this means that, in practice, C can be as fast or faster than epoll for maybe up to a hundred file descriptors, depending on the usage. So sad. While nominally embeddable in other event loops, this feature is broken in all kernel versions tested so far. This backend maps C and C in the same way as C. =item C (value 8, most BSD clones) Kqueue deserves special mention, as at the time of this writing, it was broken on all BSDs except NetBSD (usually it doesn't work reliably with anything but sockets and pipes, except on Darwin, where of course it's completely useless). Unlike epoll, however, whose brokenness is by design, these kqueue bugs can (and eventually will) be fixed without API changes to existing programs. For this reason it's not being "auto-detected" unless you explicitly specify it in the flags (i.e. using C) or libev was compiled on a known-to-be-good (-enough) system like NetBSD. You still can embed kqueue into a normal poll or select backend and use it only for sockets (after having made sure that sockets work with kqueue on the target platform). See C watchers for more info. It scales in the same way as the epoll backend, but the interface to the kernel is more efficient (which says nothing about its actual speed, of course). While stopping, setting and starting an I/O watcher does never cause an extra system call as with C, it still adds up to two event changes per incident. Support for C is very bad (you might have to leak fd's on fork, but it's more sane than epoll) and it drops fds silently in similarly hard-to-detect cases This backend usually performs well under most conditions. While nominally embeddable in other event loops, this doesn't work everywhere, so you might need to test for this. And since it is broken almost everywhere, you should only use it when you have a lot of sockets (for which it usually works), by embedding it into another event loop (e.g. C or C (but C is of course also broken on OS X)) and, did I mention it, using it only for sockets. This backend maps C into an C kevent with C, and C into an C kevent with C. =item C (value 16, Solaris 8) This is not implemented yet (and might never be, unless you send me an implementation). According to reports, C only supports sockets and is not embeddable, which would limit the usefulness of this backend immensely. =item C (value 32, Solaris 10) This uses the Solaris 10 event port mechanism. As with everything on Solaris, it's really slow, but it still scales very well (O(active_fds)). While this backend scales well, it requires one system call per active file descriptor per loop iteration. For small and medium numbers of file descriptors a "slow" C or C backend might perform better. On the positive side, this backend actually performed fully to specification in all tests and is fully embeddable, which is a rare feat among the OS-specific backends (I vastly prefer correctness over speed hacks). On the negative side, the interface is I - so bizarre that even sun itself gets it wrong in their code examples: The event polling function sometimes returns events to the caller even though an error occurred, but with no indication whether it has done so or not (yes, it's even documented that way) - deadly for edge-triggered interfaces where you absolutely have to know whether an event occurred or not because you have to re-arm the watcher. Fortunately libev seems to be able to work around these idiocies. This backend maps C and C in the same way as C. =item C Try all backends (even potentially broken ones that wouldn't be tried with C). Since this is a mask, you can do stuff such as C. It is definitely not recommended to use this flag, use whatever C returns, or simply do not specify a backend at all. =item C Not a backend at all, but a mask to select all backend bits from a C value, in case you want to mask out any backends from a flags value (e.g. when modifying the C environment variable). =back If one or more of the backend flags are or'ed into the flags value, then only these backends will be tried (in the reverse order as listed here). If none are specified, all backends in C will be tried. Example: Try to create a event loop that uses epoll and nothing else. struct ev_loop *epoller = ev_loop_new (EVBACKEND_EPOLL | EVFLAG_NOENV); if (!epoller) fatal ("no epoll found here, maybe it hides under your chair"); Example: Use whatever libev has to offer, but make sure that kqueue is used if available. struct ev_loop *loop = ev_loop_new (ev_recommended_backends () | EVBACKEND_KQUEUE); =item ev_loop_destroy (loop) Destroys an event loop object (frees all memory and kernel state etc.). None of the active event watchers will be stopped in the normal sense, so e.g. C might still return true. It is your responsibility to either stop all watchers cleanly yourself I calling this function, or cope with the fact afterwards (which is usually the easiest thing, you can just ignore the watchers and/or C them for example). Note that certain global state, such as signal state (and installed signal handlers), will not be freed by this function, and related watchers (such as signal and child watchers) would need to be stopped manually. This function is normally used on loop objects allocated by C, but it can also be used on the default loop returned by C, in which case it is not thread-safe. Note that it is not advisable to call this function on the default loop except in the rare occasion where you really need to free its resources. If you need dynamically allocated loops it is better to use C and C. =item ev_loop_fork (loop) This function sets a flag that causes subsequent C iterations to reinitialise the kernel state for backends that have one. Despite the name, you can call it anytime, but it makes most sense after forking, in the child process. You I call it (or use C) in the child before resuming or calling C. Again, you I to call it on I loop that you want to re-use after a fork, I. This is because some kernel interfaces *cough* I *cough* do funny things during fork. On the other hand, you only need to call this function in the child process if and only if you want to use the event loop in the child. If you just fork+exec or create a new loop in the child, you don't have to call it at all (in fact, C is so badly broken that it makes a difference, but libev will usually detect this case on its own and do a costly reset of the backend). The function itself is quite fast and it's usually not a problem to call it just in case after a fork. Example: Automate calling C on the default loop when using pthreads. static void post_fork_child (void) { ev_loop_fork (EV_DEFAULT); } ... pthread_atfork (0, 0, post_fork_child); =item int ev_is_default_loop (loop) Returns true when the given loop is, in fact, the default loop, and false otherwise. =item unsigned int ev_iteration (loop) Returns the current iteration count for the event loop, which is identical to the number of times libev did poll for new events. It starts at C<0> and happily wraps around with enough iterations. This value can sometimes be useful as a generation counter of sorts (it "ticks" the number of loop iterations), as it roughly corresponds with C and C calls - and is incremented between the prepare and check phases. =item unsigned int ev_depth (loop) Returns the number of times C was entered minus the number of times C was exited normally, in other words, the recursion depth. Outside C, this number is zero. In a callback, this number is C<1>, unless C was invoked recursively (or from another thread), in which case it is higher. Leaving C abnormally (setjmp/longjmp, cancelling the thread, throwing an exception etc.), doesn't count as "exit" - consider this as a hint to avoid such ungentleman-like behaviour unless it's really convenient, in which case it is fully supported. =item unsigned int ev_backend (loop) Returns one of the C flags indicating the event backend in use. =item ev_tstamp ev_now (loop) Returns the current "event loop time", which is the time the event loop received events and started processing them. This timestamp does not change as long as callbacks are being processed, and this is also the base time used for relative timers. You can treat it as the timestamp of the event occurring (or more correctly, libev finding out about it). =item ev_now_update (loop) Establishes the current time by querying the kernel, updating the time returned by C in the progress. This is a costly operation and is usually done automatically within C. This function is rarely useful, but when some event callback runs for a very long time without entering the event loop, updating libev's idea of the current time is a good idea. See also L in the C section. =item ev_suspend (loop) =item ev_resume (loop) These two functions suspend and resume an event loop, for use when the loop is not used for a while and timeouts should not be processed. A typical use case would be an interactive program such as a game: When the user presses C<^Z> to suspend the game and resumes it an hour later it would be best to handle timeouts as if no time had actually passed while the program was suspended. This can be achieved by calling C in your C handler, sending yourself a C and calling C directly afterwards to resume timer processing. Effectively, all C watchers will be delayed by the time spend between C and C, and all C watchers will be rescheduled (that is, they will lose any events that would have occurred while suspended). After calling C you B call I function on the given loop other than C, and you B call C without a previous call to C. Calling C/C has the side effect of updating the event loop time (see C). =item bool ev_run (loop, int flags) Finally, this is it, the event handler. This function usually is called after you have initialised all your watchers and you want to start handling events. It will ask the operating system for any new events, call the watcher callbacks, and then repeat the whole process indefinitely: This is why event loops are called I. If the flags argument is specified as C<0>, it will keep handling events until either no event watchers are active anymore or C was called. The return value is false if there are no more active watchers (which usually means "all jobs done" or "deadlock"), and true in all other cases (which usually means " you should call C again"). Please note that an explicit C is usually better than relying on all watchers to be stopped when deciding when a program has finished (especially in interactive programs), but having a program that automatically loops as long as it has to and no longer by virtue of relying on its watchers stopping correctly, that is truly a thing of beauty. This function is I exception-safe - you can break out of a C call by calling C in a callback, throwing a C++ exception and so on. This does not decrement the C value, nor will it clear any outstanding C breaks. A flags value of C will look for new events, will handle those events and any already outstanding ones, but will not wait and block your process in case there are no events and will return after one iteration of the loop. This is sometimes useful to poll and handle new events while doing lengthy calculations, to keep the program responsive. A flags value of C will look for new events (waiting if necessary) and will handle those and any already outstanding ones. It will block your process until at least one new event arrives (which could be an event internal to libev itself, so there is no guarantee that a user-registered callback will be called), and will return after one iteration of the loop. This is useful if you are waiting for some external event in conjunction with something not expressible using other libev watchers (i.e. "roll your own C"). However, a pair of C/C watchers is usually a better approach for this kind of thing. Here are the gory details of what C does (this is for your understanding, not a guarantee that things will work exactly like this in future versions): - Increment loop depth. - Reset the ev_break status. - Before the first iteration, call any pending watchers. LOOP: - If EVFLAG_FORKCHECK was used, check for a fork. - If a fork was detected (by any means), queue and call all fork watchers. - Queue and call all prepare watchers. - If ev_break was called, goto FINISH. - If we have been forked, detach and recreate the kernel state as to not disturb the other process. - Update the kernel state with all outstanding changes. - Update the "event loop time" (ev_now ()). - Calculate for how long to sleep or block, if at all (active idle watchers, EVRUN_NOWAIT or not having any active watchers at all will result in not sleeping). - Sleep if the I/O and timer collect interval say so. - Increment loop iteration counter. - Block the process, waiting for any events. - Queue all outstanding I/O (fd) events. - Update the "event loop time" (ev_now ()), and do time jump adjustments. - Queue all expired timers. - Queue all expired periodics. - Queue all idle watchers with priority higher than that of pending events. - Queue all check watchers. - Call all queued watchers in reverse order (i.e. check watchers first). Signals and child watchers are implemented as I/O watchers, and will be handled here by queueing them when their watcher gets executed. - If ev_break has been called, or EVRUN_ONCE or EVRUN_NOWAIT were used, or there are no active watchers, goto FINISH, otherwise continue with step LOOP. FINISH: - Reset the ev_break status iff it was EVBREAK_ONE. - Decrement the loop depth. - Return. Example: Queue some jobs and then loop until no events are outstanding anymore. ... queue jobs here, make sure they register event watchers as long ... as they still have work to do (even an idle watcher will do..) ev_run (my_loop, 0); ... jobs done or somebody called break. yeah! =item ev_break (loop, how) Can be used to make a call to C return early (but only after it has processed all outstanding events). The C argument must be either C, which will make the innermost C call return, or C, which will make all nested C calls return. This "break state" will be cleared on the next call to C. It is safe to call C from outside any C calls, too, in which case it will have no effect. =item ev_ref (loop) =item ev_unref (loop) Ref/unref can be used to add or remove a reference count on the event loop: Every watcher keeps one reference, and as long as the reference count is nonzero, C will not return on its own. This is useful when you have a watcher that you never intend to unregister, but that nevertheless should not keep C from returning. In such a case, call C after starting, and C before stopping it. As an example, libev itself uses this for its internal signal pipe: It is not visible to the libev user and should not keep C from exiting if no event watchers registered by it are active. It is also an excellent way to do this for generic recurring timers or from within third-party libraries. Just remember to I and I (but only if the watcher wasn't active before, or was active before, respectively. Note also that libev might stop watchers itself (e.g. non-repeating timers) in which case you have to C in the callback). Example: Create a signal watcher, but keep it from keeping C running when nothing else is active. ev_signal exitsig; ev_signal_init (&exitsig, sig_cb, SIGINT); ev_signal_start (loop, &exitsig); ev_unref (loop); Example: For some weird reason, unregister the above signal handler again. ev_ref (loop); ev_signal_stop (loop, &exitsig); =item ev_set_io_collect_interval (loop, ev_tstamp interval) =item ev_set_timeout_collect_interval (loop, ev_tstamp interval) These advanced functions influence the time that libev will spend waiting for events. Both time intervals are by default C<0>, meaning that libev will try to invoke timer/periodic callbacks and I/O callbacks with minimum latency. Setting these to a higher value (the C I be >= C<0>) allows libev to delay invocation of I/O and timer/periodic callbacks to increase efficiency of loop iterations (or to increase power-saving opportunities). The idea is that sometimes your program runs just fast enough to handle one (or very few) event(s) per loop iteration. While this makes the program responsive, it also wastes a lot of CPU time to poll for new events, especially with backends like C (or libev) on file descriptors representing files, and expect it to become ready when their program doesn't block on disk accesses (which can take a long time on their own). However, this cannot ever work in the "expected" way - you get a readiness notification as soon as the kernel knows whether and how much data is there, and in the case of open files, that's always the case, so you always get a readiness notification instantly, and your read (or possibly write) will still block on the disk I/O. Another way to view it is that in the case of sockets, pipes, character devices and so on, there is another party (the sender) that delivers data on its own, but in the case of files, there is no such thing: the disk will not send data on its own, simply because it doesn't know what you wish to read - you would first have to request some data. Since files are typically not-so-well supported by advanced notification mechanism, libev tries hard to emulate POSIX behaviour with respect to files, even though you should not use it. The reason for this is convenience: sometimes you want to watch STDIN or STDOUT, which is usually a tty, often a pipe, but also sometimes files or special devices (for example, C on Linux works with F but not with F), and even though the file might better be served with asynchronous I/O instead of with non-blocking I/O, it is still useful when it "just works" instead of freezing. So avoid file descriptors pointing to files when you know it (e.g. use libeio), but use them when it is convenient, e.g. for STDIN/STDOUT, or when you rarely read from a file instead of from a socket, and want to reuse the same code path. =head3 The special problem of fork Some backends (epoll, kqueue) do not support C at all or exhibit useless behaviour. Libev fully supports fork, but needs to be told about it in the child if you want to continue to use it in the child. To support fork in your child processes, you have to call C after a fork in the child, enable C, or resort to C or C. =head3 The special problem of SIGPIPE While not really specific to libev, it is easy to forget about C: when writing to a pipe whose other end has been closed, your program gets sent a SIGPIPE, which, by default, aborts your program. For most programs this is sensible behaviour, for daemons, this is usually undesirable. So when you encounter spurious, unexplained daemon exits, make sure you ignore SIGPIPE (and maybe make sure you log the exit status of your daemon somewhere, as that would have given you a big clue). =head3 The special problem of accept()ing when you can't Many implementations of the POSIX C function (for example, found in post-2004 Linux) have the peculiar behaviour of not removing a connection from the pending queue in all error cases. For example, larger servers often run out of file descriptors (because of resource limits), causing C to fail with C but not rejecting the connection, leading to libev signalling readiness on the next iteration again (the connection still exists after all), and typically causing the program to loop at 100% CPU usage. Unfortunately, the set of errors that cause this issue differs between operating systems, there is usually little the app can do to remedy the situation, and no known thread-safe method of removing the connection to cope with overload is known (to me). One of the easiest ways to handle this situation is to just ignore it - when the program encounters an overload, it will just loop until the situation is over. While this is a form of busy waiting, no OS offers an event-based way to handle this situation, so it's the best one can do. A better way to handle the situation is to log any errors other than C and C, making sure not to flood the log with such messages, and continue as usual, which at least gives the user an idea of what could be wrong ("raise the ulimit!"). For extra points one could stop the C watcher on the listening fd "for a while", which reduces CPU usage. If your program is single-threaded, then you could also keep a dummy file descriptor for overload situations (e.g. by opening F), and when you run into C or C, close it, run C, close that fd, and create a new dummy fd. This will gracefully refuse clients under typical overload conditions. The last way to handle it is to simply log the error and C, as is often done with C failures, but this results in an easy opportunity for a DoS attack. =head3 Watcher-Specific Functions =over 4 =item ev_io_init (ev_io *, callback, int fd, int events) =item ev_io_set (ev_io *, int fd, int events) Configures an C watcher. The C is the file descriptor to receive events for and C is either C, C or C, to express the desire to receive the given events. =item int fd [read-only] The file descriptor being watched. =item int events [read-only] The events being watched. =back =head3 Examples Example: Call C when STDIN_FILENO has become, well readable, but only once. Since it is likely line-buffered, you could attempt to read a whole line in the callback. static void stdin_readable_cb (struct ev_loop *loop, ev_io *w, int revents) { ev_io_stop (loop, w); .. read from stdin here (or from w->fd) and handle any I/O errors } ... struct ev_loop *loop = ev_default_init (0); ev_io stdin_readable; ev_io_init (&stdin_readable, stdin_readable_cb, STDIN_FILENO, EV_READ); ev_io_start (loop, &stdin_readable); ev_run (loop, 0); =head2 C - relative and optionally repeating timeouts Timer watchers are simple relative timers that generate an event after a given time, and optionally repeating in regular intervals after that. The timers are based on real time, that is, if you register an event that times out after an hour and you reset your system clock to January last year, it will still time out after (roughly) one hour. "Roughly" because detecting time jumps is hard, and some inaccuracies are unavoidable (the monotonic clock option helps a lot here). The callback is guaranteed to be invoked only I its timeout has passed (not I, so on systems with very low-resolution clocks this might introduce a small delay, see "the special problem of being too early", below). If multiple timers become ready during the same loop iteration then the ones with earlier time-out values are invoked before ones of the same priority with later time-out values (but this is no longer true when a callback calls C recursively). =head3 Be smart about timeouts Many real-world problems involve some kind of timeout, usually for error recovery. A typical example is an HTTP request - if the other side hangs, you want to raise some error after a while. What follows are some ways to handle this problem, from obvious and inefficient to smart and efficient. In the following, a 60 second activity timeout is assumed - a timeout that gets reset to 60 seconds each time there is activity (e.g. each time some data or other life sign was received). =over 4 =item 1. Use a timer and stop, reinitialise and start it on activity. This is the most obvious, but not the most simple way: In the beginning, start the watcher: ev_timer_init (timer, callback, 60., 0.); ev_timer_start (loop, timer); Then, each time there is some activity, C it, initialise it and start it again: ev_timer_stop (loop, timer); ev_timer_set (timer, 60., 0.); ev_timer_start (loop, timer); This is relatively simple to implement, but means that each time there is some activity, libev will first have to remove the timer from its internal data structure and then add it again. Libev tries to be fast, but it's still not a constant-time operation. =item 2. Use a timer and re-start it with C inactivity. This is the easiest way, and involves using C instead of C. To implement this, configure an C with a C value of C<60> and then call C at start and each time you successfully read or write some data. If you go into an idle state where you do not expect data to travel on the socket, you can C the timer, and C will automatically restart it if need be. That means you can ignore both the C function and the C argument to C, and only ever use the C member and C. At start: ev_init (timer, callback); timer->repeat = 60.; ev_timer_again (loop, timer); Each time there is some activity: ev_timer_again (loop, timer); It is even possible to change the time-out on the fly, regardless of whether the watcher is active or not: timer->repeat = 30.; ev_timer_again (loop, timer); This is slightly more efficient then stopping/starting the timer each time you want to modify its timeout value, as libev does not have to completely remove and re-insert the timer from/into its internal data structure. It is, however, even simpler than the "obvious" way to do it. =item 3. Let the timer time out, but then re-arm it as required. This method is more tricky, but usually most efficient: Most timeouts are relatively long compared to the intervals between other activity - in our example, within 60 seconds, there are usually many I/O events with associated activity resets. In this case, it would be more efficient to leave the C alone, but remember the time of last activity, and check for a real timeout only within the callback: ev_tstamp timeout = 60.; ev_tstamp last_activity; // time of last activity ev_timer timer; static void callback (EV_P_ ev_timer *w, int revents) { // calculate when the timeout would happen ev_tstamp after = last_activity - ev_now (EV_A) + timeout; // if negative, it means we the timeout already occurred if (after < 0.) { // timeout occurred, take action } else { // callback was invoked, but there was some recent // activity. simply restart the timer to time out // after "after" seconds, which is the earliest time // the timeout can occur. ev_timer_set (w, after, 0.); ev_timer_start (EV_A_ w); } } To summarise the callback: first calculate in how many seconds the timeout will occur (by calculating the absolute time when it would occur, C, and subtracting the current time, C from that). If this value is negative, then we are already past the timeout, i.e. we timed out, and need to do whatever is needed in this case. Otherwise, we now the earliest time at which the timeout would trigger, and simply start the timer with this timeout value. In other words, each time the callback is invoked it will check whether the timeout occurred. If not, it will simply reschedule itself to check again at the earliest time it could time out. Rinse. Repeat. This scheme causes more callback invocations (about one every 60 seconds minus half the average time between activity), but virtually no calls to libev to change the timeout. To start the machinery, simply initialise the watcher and set C to the current time (meaning there was some activity just now), then call the callback, which will "do the right thing" and start the timer: last_activity = ev_now (EV_A); ev_init (&timer, callback); callback (EV_A_ &timer, 0); When there is some activity, simply store the current time in C, no libev calls at all: if (activity detected) last_activity = ev_now (EV_A); When your timeout value changes, then the timeout can be changed by simply providing a new value, stopping the timer and calling the callback, which will again do the right thing (for example, time out immediately :). timeout = new_value; ev_timer_stop (EV_A_ &timer); callback (EV_A_ &timer, 0); This technique is slightly more complex, but in most cases where the time-out is unlikely to be triggered, much more efficient. =item 4. Wee, just use a double-linked list for your timeouts. If there is not one request, but many thousands (millions...), all employing some kind of timeout with the same timeout value, then one can do even better: When starting the timeout, calculate the timeout value and put the timeout at the I of the list. Then use an C to fire when the timeout at the I of the list is expected to fire (for example, using the technique #3). When there is some activity, remove the timer from the list, recalculate the timeout, append it to the end of the list again, and make sure to update the C if it was taken from the beginning of the list. This way, one can manage an unlimited number of timeouts in O(1) time for starting, stopping and updating the timers, at the expense of a major complication, and having to use a constant timeout. The constant timeout ensures that the list stays sorted. =back So which method the best? Method #2 is a simple no-brain-required solution that is adequate in most situations. Method #3 requires a bit more thinking, but handles many cases better, and isn't very complicated either. In most case, choosing either one is fine, with #3 being better in typical situations. Method #1 is almost always a bad idea, and buys you nothing. Method #4 is rather complicated, but extremely efficient, something that really pays off after the first million or so of active timers, i.e. it's usually overkill :) =head3 The special problem of being too early If you ask a timer to call your callback after three seconds, then you expect it to be invoked after three seconds - but of course, this cannot be guaranteed to infinite precision. Less obviously, it cannot be guaranteed to any precision by libev - imagine somebody suspending the process with a STOP signal for a few hours for example. So, libev tries to invoke your callback as soon as possible I the delay has occurred, but cannot guarantee this. A less obvious failure mode is calling your callback too early: many event loops compare timestamps with a "elapsed delay >= requested delay", but this can cause your callback to be invoked much earlier than you would expect. To see why, imagine a system with a clock that only offers full second resolution (think windows if you can't come up with a broken enough OS yourself). If you schedule a one-second timer at the time 500.9, then the event loop will schedule your timeout to elapse at a system time of 500 (500.9 truncated to the resolution) + 1, or 501. If an event library looks at the timeout 0.1s later, it will see "501 >= 501" and invoke the callback 0.1s after it was started, even though a one-second delay was requested - this is being "too early", despite best intentions. This is the reason why libev will never invoke the callback if the elapsed delay equals the requested delay, but only when the elapsed delay is larger than the requested delay. In the example above, libev would only invoke the callback at system time 502, or 1.1s after the timer was started. So, while libev cannot guarantee that your callback will be invoked exactly when requested, it I and I guarantee that the requested delay has actually elapsed, or in other words, it always errs on the "too late" side of things. =head3 The special problem of time updates Establishing the current time is a costly operation (it usually takes at least one system call): EV therefore updates its idea of the current time only before and after C collects new events, which causes a growing difference between C and C when handling lots of events in one iteration. The relative timeouts are calculated relative to the C time. This is usually the right thing as this timestamp refers to the time of the event triggering whatever timeout you are modifying/starting. If you suspect event processing to be delayed and you I to base the timeout on the current time, use something like this to adjust for this: ev_timer_set (&timer, after + ev_now () - ev_time (), 0.); If the event loop is suspended for a long time, you can also force an update of the time returned by C by calling C. =head3 The special problem of unsynchronised clocks Modern systems have a variety of clocks - libev itself uses the normal "wall clock" clock and, if available, the monotonic clock (to avoid time jumps). Neither of these clocks is synchronised with each other or any other clock on the system, so C might return a considerably different time than C or C